refactor(editor): move extension to store (#9552)

This commit is contained in:
Saul-Mirone
2025-01-06 15:15:14 +00:00
parent 46c8c4a408
commit f778d1a28a
127 changed files with 170 additions and 207 deletions

View File

@@ -1,9 +1,9 @@
import type { TextBuffer } from '@blocksuite/affine-shared/adapters';
import type { ExtensionType } from '@blocksuite/block-std';
import {
createIdentifier,
type ServiceIdentifier,
} from '@blocksuite/global/di';
import type { ExtensionType } from '@blocksuite/store';
import type { ElementModelMatcher } from '../../type.js';

View File

@@ -1,12 +1,8 @@
import { EditPropsStore } from '@blocksuite/affine-shared/services';
import {
type BlockStdScope,
Extension,
StdIdentifier,
} from '@blocksuite/block-std';
import { type BlockStdScope, StdIdentifier } from '@blocksuite/block-std';
import { GfxControllerIdentifier } from '@blocksuite/block-std/gfx';
import { type Container, createIdentifier } from '@blocksuite/global/di';
import type { BlockModel } from '@blocksuite/store';
import { type BlockModel, Extension } from '@blocksuite/store';
import type { SurfaceBlockModel } from '../surface-model';
import { getLastPropsKey } from '../utils/get-last-props-key';

View File

@@ -1,7 +1,7 @@
import type { FrameBlockModel } from '@blocksuite/affine-model';
import type { ExtensionType } from '@blocksuite/block-std';
import { createIdentifier } from '@blocksuite/global/di';
import { Slot } from '@blocksuite/global/utils';
import type { ExtensionType } from '@blocksuite/store';
export const EdgelessLegacySlotIdentifier = createIdentifier<{
readonlyUpdated: Slot<boolean>;

View File

@@ -1,10 +1,10 @@
import { Extension } from '@blocksuite/block-std';
import {
type GfxController,
GfxControllerIdentifier,
} from '@blocksuite/block-std/gfx';
import { type Container, createIdentifier } from '@blocksuite/global/di';
import { BlockSuiteError, ErrorCode } from '@blocksuite/global/exceptions';
import { Extension } from '@blocksuite/store';
import type { RoughCanvas } from '../utils/rough/canvas.js';
import type { CanvasRenderer } from './canvas-renderer.js';

View File

@@ -2,9 +2,9 @@ import { HighlightSelectionExtension } from '@blocksuite/affine-shared/selection
import {
BlockViewExtension,
CommandExtension,
type ExtensionType,
FlavourExtension,
} from '@blocksuite/block-std';
import type { ExtensionType } from '@blocksuite/store';
import { literal } from 'lit/static-html.js';
import {