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

View File

@@ -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';

View File

@@ -3,9 +3,8 @@ export * from './command/index.js';
export * from './event/index.js';
export * from './extension/index.js';
export * from './identifier.js';
export * from './range/index.js';
export * from './inline/index.js';
export * from './scope/index.js';
export * from './selection/index.js';
export * from './service/index.js';
export * from './spec/index.js';
export * from './view/index.js';

View File

@@ -0,0 +1 @@
export * from './range';

View File

@@ -1,8 +1,8 @@
import type { InlineRange, InlineRangeProvider } from '@blocksuite/inline';
import { signal } from '@preact/signals-core';
import { TextSelection } from '../selection/index.js';
import type { BlockComponent } from '../view/element/block-component.js';
import { TextSelection } from '../../selection/index.js';
import type { BlockComponent } from '../../view/element/block-component.js';
import { isActiveInEditor } from './active.js';
export const getInlineRangeProvider: (

View File

@@ -1,9 +1,9 @@
import type { BaseSelection, BlockModel } from '@blocksuite/store';
import throttle from 'lodash-es/throttle';
import { TextSelection } from '../selection/index.js';
import type { BlockComponent } from '../view/element/block-component.js';
import { BLOCK_ID_ATTR } from '../view/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 { isActiveInEditor } from './active.js';
import { RANGE_SYNC_EXCLUDE_ATTR } from './consts.js';
import type { RangeManager } from './range-manager.js';

View File

@@ -1,9 +1,9 @@
import { INLINE_ROOT_ATTR, type InlineRootElement } from '@blocksuite/inline';
import { LifeCycleWatcher } from '../extension/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 { LifeCycleWatcher } from '../../extension/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';
import { RangeBinding } from './range-binding.js';

View File

@@ -11,6 +11,7 @@ import { CommandManager } from '../command/index.js';
import { UIEventDispatcher } from '../event/index.js';
import { DndController } from '../extension/dnd/index.js';
import { EditorLifeCycleExtension } from '../extension/editor-life-cycle.js';
import { ServiceManager } from '../extension/service-manager.js';
import { GfxController } from '../gfx/controller.js';
import { GridManager, LayerManager } from '../gfx/index.js';
import { GfxSelectionManager } from '../gfx/selection.js';
@@ -21,8 +22,7 @@ import {
LifeCycleWatcherIdentifier,
StdIdentifier,
} from '../identifier.js';
import { RangeManager } from '../range/index.js';
import { ServiceManager } from '../service/index.js';
import { RangeManager } from '../inline/index.js';
import { EditorHost } from '../view/element/index.js';
import { ViewStore } from '../view/view-store.js';

View File

@@ -1 +1,4 @@
export * from './variants/index.js';
export * from './block.js';
export * from './cursor.js';
export * from './surface.js';
export * from './text.js';

View File

@@ -1,4 +0,0 @@
export * from './block.js';
export * from './cursor.js';
export * from './surface.js';
export * from './text.js';

View File

@@ -18,7 +18,7 @@ import { html, type StaticValue, unsafeStatic } from 'lit/static-html.js';
import type { CommandManager } from '../../command/index.js';
import type { UIEventDispatcher } from '../../event/index.js';
import { WidgetViewIdentifier } from '../../identifier.js';
import type { RangeManager } from '../../range/index.js';
import type { RangeManager } from '../../inline/index.js';
import type { BlockStdScope } from '../../scope/block-std-scope.js';
import { PropTypes, requiredProperties } from '../decorators/index.js';
import type { ViewStore } from '../view-store.js';