mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
feat(editor): selection as store extension (#9605)
This commit is contained in:
@@ -4,7 +4,11 @@ import {
|
||||
handleError,
|
||||
} from '@blocksuite/global/exceptions';
|
||||
import { SignalWatcher, Slot, WithDisposable } from '@blocksuite/global/utils';
|
||||
import { type BlockModel, Store } from '@blocksuite/store';
|
||||
import {
|
||||
type BlockModel,
|
||||
Store,
|
||||
type StoreSelectionExtension,
|
||||
} from '@blocksuite/store';
|
||||
import { createContext, provide } from '@lit/context';
|
||||
import { css, LitElement, nothing, type TemplateResult } from 'lit';
|
||||
import { property } from 'lit/decorators.js';
|
||||
@@ -16,7 +20,6 @@ import type { UIEventDispatcher } from '../../event/index.js';
|
||||
import { WidgetViewMapIdentifier } from '../../identifier.js';
|
||||
import type { RangeManager } from '../../range/index.js';
|
||||
import type { BlockStdScope } from '../../scope/block-std-scope.js';
|
||||
import type { SelectionManager } from '../../selection/index.js';
|
||||
import { PropTypes, requiredProperties } from '../decorators/index.js';
|
||||
import type { ViewStore } from '../view-store.js';
|
||||
import { BLOCK_ID_ATTR, WIDGET_ID_ATTR } from './consts.js';
|
||||
@@ -114,7 +117,7 @@ export class EditorHost extends SignalWatcher(
|
||||
return this.std.range;
|
||||
}
|
||||
|
||||
get selection(): SelectionManager {
|
||||
get selection(): StoreSelectionExtension {
|
||||
return this.std.selection;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user