refactor(editor): remove selection global types (#9532)

Closes: [BS-2217](https://linear.app/affine-design/issue/BS-2217/remove-global-types-in-selection)
This commit is contained in:
Saul-Mirone
2025-01-06 03:45:10 +00:00
parent 8669936f2f
commit fc863e484c
105 changed files with 501 additions and 358 deletions
@@ -1,7 +1,7 @@
import { INLINE_ROOT_ATTR, type InlineRootElement } from '@blocksuite/inline';
import { LifeCycleWatcher } from '../extension/index.js';
import type { TextSelection } from '../selection/index.js';
import { TextSelection } from '../selection/index.js';
import type { BlockComponent } from '../view/element/block-component.js';
import { BLOCK_ID_ATTR } from '../view/index.js';
import { RANGE_QUERY_EXCLUDE_ATTR, RANGE_SYNC_EXCLUDE_ATTR } from './consts.js';
@@ -163,7 +163,7 @@ export class RangeManager extends LifeCycleWatcher {
return null;
}
return this.std.host.selection.create('text', {
return this.std.host.selection.create(TextSelection, {
from: {
blockId: startBlock.blockId,
index: startInlineRange.index,