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

@@ -8,13 +8,12 @@ import {
import {
type BlockStdScope,
type EditorHost,
type ExtensionType,
LifeCycleWatcher,
} from '@blocksuite/block-std';
import { createIdentifier } from '@blocksuite/global/di';
import type { IVec } from '@blocksuite/global/utils';
import { Point } from '@blocksuite/global/utils';
import type { BlockModel } from '@blocksuite/store';
import type { BlockModel, ExtensionType } from '@blocksuite/store';
import type { DragIndicator } from './index.js';

View File

@@ -1,5 +1,5 @@
import type { ExtensionType } from '@blocksuite/block-std';
import { createIdentifier } from '@blocksuite/global/di';
import type { ExtensionType } from '@blocksuite/store';
import type { PeekViewService } from './type.js';

View File

@@ -1,4 +1,4 @@
import type { ExtensionType } from '@blocksuite/block-std';
import type { ExtensionType } from '@blocksuite/store';
import { InlineManagerExtension } from './extension/index.js';
import {

View File

@@ -1,9 +1,5 @@
import type { AffineTextAttributes } from '@blocksuite/affine-shared/types';
import {
type BlockStdScope,
type ExtensionType,
StdIdentifier,
} from '@blocksuite/block-std';
import { type BlockStdScope, StdIdentifier } from '@blocksuite/block-std';
import {
createIdentifier,
type ServiceIdentifier,
@@ -16,6 +12,7 @@ import {
KEYBOARD_ALLOW_DEFAULT,
type KeyboardBindingContext,
} from '@blocksuite/inline';
import type { ExtensionType } from '@blocksuite/store';
import type * as Y from 'yjs';
import { z, type ZodObject, type ZodTypeAny } from 'zod';

View File

@@ -1,10 +1,10 @@
import type { AffineTextAttributes } from '@blocksuite/affine-shared/types';
import type { ExtensionType } from '@blocksuite/block-std';
import {
createIdentifier,
type ServiceIdentifier,
type ServiceProvider,
} from '@blocksuite/global/di';
import type { ExtensionType } from '@blocksuite/store';
import type { InlineSpecs } from './type.js';

View File

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

View File

@@ -1,6 +1,6 @@
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';
import type { RefNodeSlots } from '../inline/index.js';

View File

@@ -1,8 +1,9 @@
import type { BlockComponent, ExtensionType } from '@blocksuite/block-std';
import type { BlockComponent } from '@blocksuite/block-std';
import {
KEYBOARD_ALLOW_DEFAULT,
KEYBOARD_PREVENT_DEFAULT,
} from '@blocksuite/inline';
import type { ExtensionType } from '@blocksuite/store';
import { InlineMarkdownExtension } from '../../extension/markdown-matcher.js';

View File

@@ -1,5 +1,6 @@
import type { BlockStdScope, ExtensionType } from '@blocksuite/block-std';
import type { BlockStdScope } from '@blocksuite/block-std';
import { createIdentifier } from '@blocksuite/global/di';
import type { ExtensionType } from '@blocksuite/store';
import type { TemplateResult } from 'lit';
import type { AffineReference } from './reference-node.js';