refactor(editor): improve std structure (#10993)

This commit is contained in:
Saul-Mirone
2025-03-19 11:37:55 +00:00
parent 9211fbf68c
commit a9b53839a6
18 changed files with 19 additions and 19 deletions
@@ -6,4 +6,5 @@ export * from './flavour.js';
export * from './keymap.js';
export * from './lifecycle-watcher.js';
export * from './service.js';
export * from './service-manager.js';
export * from './widget-view-map.js';
@@ -0,0 +1,22 @@
import { LifeCycleWatcher } from '../extension/index.js';
import { BlockServiceIdentifier } from '../identifier.js';
export class ServiceManager extends LifeCycleWatcher {
static override readonly key = 'serviceManager';
override mounted() {
super.mounted();
this.std.provider.getAll(BlockServiceIdentifier).forEach(service => {
service.mounted();
});
}
override unmounted() {
super.unmounted();
this.std.provider.getAll(BlockServiceIdentifier).forEach(service => {
service.unmounted();
});
}
}