feat(core): add edgelessTheme property and edgelessDefault theme setting (#8614)

close AF-1430 AF-1471

https://github.com/user-attachments/assets/d997ac6c-ce94-4fa4-ab34-29b36c7796ea
This commit is contained in:
JimmFly
2024-11-01 03:58:02 +00:00
parent 1f6cce2f5e
commit 10b1f233d9
28 changed files with 553 additions and 181 deletions
@@ -39,4 +39,10 @@ export const BUILT_IN_CUSTOM_PROPERTY_TYPE = [
show: 'always-hide',
index: 'a0000006',
},
{
id: 'edgelessTheme',
type: 'edgelessTheme',
show: 'always-hide',
index: 'a0000007',
},
] as DocCustomPropertyInfo[];
@@ -0,0 +1,6 @@
import { Entity } from '../../../framework';
import { LiveData } from '../../../livedata';
export class AppTheme extends Entity {
theme$ = new LiveData<string | undefined>(undefined);
}
@@ -0,0 +1,9 @@
export { AppThemeService } from './services/theme';
import type { Framework } from '../../framework';
import { AppTheme } from './entities/theme';
import { AppThemeService } from './services/theme';
export function configureAppThemeModule(framework: Framework) {
framework.service(AppThemeService).entity(AppTheme);
}
@@ -0,0 +1,6 @@
import { Service } from '../../../framework';
import { AppTheme } from '../entities/theme';
export class AppThemeService extends Service {
appTheme = this.framework.createEntity(AppTheme);
}