feat(editor): selection as store extension (#9605)

This commit is contained in:
Saul-Mirone
2025-01-09 11:49:23 +00:00
parent c2d8c23f13
commit 126ab18967
39 changed files with 176 additions and 204 deletions
@@ -4,7 +4,6 @@ export * from './config.js';
export * from './flavour.js';
export * from './keymap.js';
export * from './lifecycle-watcher.js';
export * from './selection.js';
export * from './service.js';
export * from './service-watcher.js';
export * from './widget-view-map.js';
@@ -1,14 +0,0 @@
import type { ExtensionType } from '@blocksuite/store';
import { SelectionIdentifier } from '../identifier.js';
import type { SelectionConstructor } from '../selection/index.js';
export function SelectionExtension(
selectionCtor: SelectionConstructor
): ExtensionType {
return {
setup: di => {
di.addImpl(SelectionIdentifier(selectionCtor.type), () => selectionCtor);
},
};
}