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,4 +1,3 @@
import type { ExtensionType } from '@blocksuite/block-std';
import { BlockSuiteError, ErrorCode } from '@blocksuite/global/exceptions';
import { sha } from '@blocksuite/global/utils';
import {
@@ -6,6 +5,7 @@ import {
BaseAdapter,
type BlockSnapshot,
type DocSnapshot,
type ExtensionType,
type FromBlockSnapshotPayload,
type FromBlockSnapshotResult,
type FromDocSnapshotPayload,

View File

@@ -1,8 +1,8 @@
import type { ExtensionType } from '@blocksuite/block-std';
import {
createIdentifier,
type ServiceIdentifier,
} from '@blocksuite/global/di';
import type { ExtensionType } from '@blocksuite/store';
import type { BlockAdapterMatcher } from '../types/adapter.js';
import type { HtmlAST } from '../types/hast.js';

View File

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

View File

@@ -1,5 +1,4 @@
import { DefaultTheme, NoteDisplayMode } from '@blocksuite/affine-model';
import type { ExtensionType } from '@blocksuite/block-std';
import type { ServiceProvider } from '@blocksuite/global/di';
import {
type AssetsManager,
@@ -8,6 +7,7 @@ import {
type BlockSnapshot,
BlockSnapshotSchema,
type DocSnapshot,
type ExtensionType,
type FromBlockSnapshotPayload,
type FromBlockSnapshotResult,
type FromDocSnapshotPayload,

View File

@@ -1,4 +1,3 @@
import type { ExtensionType } from '@blocksuite/block-std';
import { BlockSuiteError, ErrorCode } from '@blocksuite/global/exceptions';
import { sha } from '@blocksuite/global/utils';
import {
@@ -6,6 +5,7 @@ import {
BaseAdapter,
type BlockSnapshot,
type DocSnapshot,
type ExtensionType,
type FromBlockSnapshotPayload,
type FromBlockSnapshotResult,
type FromDocSnapshotPayload,

View File

@@ -1,8 +1,8 @@
import type { ExtensionType } from '@blocksuite/block-std';
import {
createIdentifier,
type ServiceIdentifier,
} from '@blocksuite/global/di';
import type { ExtensionType } from '@blocksuite/store';
import type { BlockAdapterMatcher } from '../types/adapter.js';
import type { MarkdownDeltaConverter } from './delta-converter.js';

View File

@@ -1,9 +1,9 @@
import type { ExtensionType } from '@blocksuite/block-std';
import {
createIdentifier,
type ServiceIdentifier,
} from '@blocksuite/global/di';
import type { DeltaInsert } from '@blocksuite/inline/types';
import type { ExtensionType } from '@blocksuite/store';
import type { PhrasingContent } from 'mdast';
import type { AffineTextAttributes } from '../../types/index.js';

View File

@@ -1,5 +1,4 @@
import { DefaultTheme, NoteDisplayMode } from '@blocksuite/affine-model';
import type { ExtensionType } from '@blocksuite/block-std';
import type { ServiceProvider } from '@blocksuite/global/di';
import {
type AssetsManager,
@@ -8,6 +7,7 @@ import {
type BlockSnapshot,
BlockSnapshotSchema,
type DocSnapshot,
type ExtensionType,
type FromBlockSnapshotPayload,
type FromBlockSnapshotResult,
type FromDocSnapshotPayload,

View File

@@ -1,8 +1,8 @@
import type { ExtensionType } from '@blocksuite/block-std';
import {
createIdentifier,
type ServiceIdentifier,
} from '@blocksuite/global/di';
import type { ExtensionType } from '@blocksuite/store';
import type { BlockAdapterMatcher } from '../types/adapter.js';
import type { HtmlAST } from '../types/hast.js';

View File

@@ -1,10 +1,10 @@
import type { ExtensionType } from '@blocksuite/block-std';
import {
createIdentifier,
type ServiceIdentifier,
} from '@blocksuite/global/di';
import { isEqual } from '@blocksuite/global/utils';
import type { DeltaInsert } from '@blocksuite/inline';
import type { ExtensionType } from '@blocksuite/store';
import type { AffineTextAttributes } from '../../types/index.js';
import {

View File

@@ -1,5 +1,4 @@
import { DefaultTheme, NoteDisplayMode } from '@blocksuite/affine-model';
import type { ExtensionType } from '@blocksuite/block-std';
import type { ServiceProvider } from '@blocksuite/global/di';
import { BlockSuiteError, ErrorCode } from '@blocksuite/global/exceptions';
import {
@@ -8,6 +7,7 @@ import {
BaseAdapter,
type BlockSnapshot,
type DocSnapshot,
type ExtensionType,
type FromBlockSnapshotPayload,
type FromBlockSnapshotResult,
type FromDocSnapshotPayload,

View File

@@ -1,5 +1,4 @@
import { DefaultTheme } from '@blocksuite/affine-model';
import type { ExtensionType } from '@blocksuite/block-std';
import { BlockSuiteError, ErrorCode } from '@blocksuite/global/exceptions';
import type { DeltaInsert } from '@blocksuite/inline';
import {
@@ -7,6 +6,7 @@ import {
BaseAdapter,
type BlockSnapshot,
type DocSnapshot,
type ExtensionType,
type FromBlockSnapshotResult,
type FromDocSnapshotResult,
type FromSliceSnapshotResult,

View File

@@ -1,8 +1,8 @@
import type { ExtensionType } from '@blocksuite/block-std';
import {
createIdentifier,
type ServiceIdentifier,
} from '@blocksuite/global/di';
import type { ExtensionType } from '@blocksuite/store';
import type { BlockAdapterMatcher, TextBuffer } from '../types/adapter.js';

View File

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

View File

@@ -1,5 +1,4 @@
import { DefaultTheme, NoteDisplayMode } from '@blocksuite/affine-model';
import type { ExtensionType } from '@blocksuite/block-std';
import type { ServiceProvider } from '@blocksuite/global/di';
import {
type AssetsManager,
@@ -8,6 +7,7 @@ import {
type BlockSnapshot,
BlockSnapshotSchema,
type DocSnapshot,
type ExtensionType,
type FromBlockSnapshotPayload,
type FromBlockSnapshotResult,
type FromDocSnapshotPayload,