mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 13:25:12 +00:00
refactor(editor): move extension to store (#9552)
This commit is contained in:
@@ -4,7 +4,6 @@ import {
|
||||
AIParagraphBlockSpec,
|
||||
} from '@affine/core/blocksuite/presets/ai';
|
||||
import { AIChatBlockSpec } from '@affine/core/blocksuite/presets/blocks/ai-chat-block';
|
||||
import type { ExtensionType } from '@blocksuite/affine/block-std';
|
||||
import {
|
||||
AdapterFactoryExtensions,
|
||||
AttachmentBlockSpec,
|
||||
@@ -23,6 +22,7 @@ import {
|
||||
RefNodeSlotsExtension,
|
||||
RichTextExtensions,
|
||||
} from '@blocksuite/affine/blocks';
|
||||
import type { ExtensionType } from '@blocksuite/affine/store';
|
||||
|
||||
const CommonBlockSpecs: ExtensionType[] = [
|
||||
RefNodeSlotsExtension,
|
||||
|
||||
@@ -11,7 +11,6 @@ import { AppThemeService } from '@affine/core/modules/theme';
|
||||
import { mixpanel } from '@affine/track';
|
||||
import {
|
||||
ConfigExtension,
|
||||
type ExtensionType,
|
||||
LifeCycleWatcher,
|
||||
StdIdentifier,
|
||||
} from '@blocksuite/affine/block-std';
|
||||
@@ -33,6 +32,7 @@ import {
|
||||
TelemetryProvider,
|
||||
ThemeExtensionIdentifier,
|
||||
} from '@blocksuite/affine/blocks';
|
||||
import type { ExtensionType } from '@blocksuite/affine/store';
|
||||
import {
|
||||
createSignalFromObservable,
|
||||
referenceToNode,
|
||||
|
||||
@@ -32,7 +32,6 @@ import {
|
||||
BlockServiceWatcher,
|
||||
BlockViewIdentifier,
|
||||
ConfigIdentifier,
|
||||
type ExtensionType,
|
||||
type WidgetComponent,
|
||||
} from '@blocksuite/affine/block-std';
|
||||
import type {
|
||||
@@ -60,7 +59,11 @@ import {
|
||||
ReferenceNodeConfigExtension,
|
||||
} from '@blocksuite/affine/blocks';
|
||||
import { Bound } from '@blocksuite/affine/global/utils';
|
||||
import { type BlockSnapshot, Text } from '@blocksuite/affine/store';
|
||||
import {
|
||||
type BlockSnapshot,
|
||||
type ExtensionType,
|
||||
Text,
|
||||
} from '@blocksuite/affine/store';
|
||||
import type { ReferenceParams } from '@blocksuite/affine-model';
|
||||
import { type FrameworkProvider } from '@toeverything/infra';
|
||||
import { type TemplateResult } from 'lit';
|
||||
|
||||
@@ -2,13 +2,13 @@ import { AIEdgelessRootBlockSpec } from '@affine/core/blocksuite/presets/ai';
|
||||
import { FeatureFlagService } from '@affine/core/modules/feature-flag';
|
||||
import { builtInTemplates as builtInEdgelessTemplates } from '@affine/templates/edgeless';
|
||||
import { builtInTemplates as builtInStickersTemplates } from '@affine/templates/stickers';
|
||||
import type { ExtensionType } from '@blocksuite/affine/block-std';
|
||||
import type { TemplateManager } from '@blocksuite/affine/blocks';
|
||||
import {
|
||||
EdgelessRootBlockSpec,
|
||||
EdgelessTemplatePanel,
|
||||
SpecProvider,
|
||||
} from '@blocksuite/affine/blocks';
|
||||
import type { ExtensionType } from '@blocksuite/affine/store';
|
||||
import { type FrameworkProvider } from '@toeverything/infra';
|
||||
|
||||
import { enableAffineExtension, enableAIExtension } from './custom/root-block';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { AIPageRootBlockSpec } from '@affine/core/blocksuite/presets/ai';
|
||||
import { FeatureFlagService } from '@affine/core/modules/feature-flag';
|
||||
import type { ExtensionType } from '@blocksuite/affine/block-std';
|
||||
import { PageRootBlockSpec, SpecProvider } from '@blocksuite/affine/blocks';
|
||||
import type { ExtensionType } from '@blocksuite/affine/store';
|
||||
import { type FrameworkProvider } from '@toeverything/infra';
|
||||
|
||||
import { enableAffineExtension, enableAIExtension } from './custom/root-block';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { AIChatBlockSpec } from '@affine/core/blocksuite/presets/blocks/ai-chat-block';
|
||||
import type { ExtensionType } from '@blocksuite/affine/block-std';
|
||||
import { SpecProvider } from '@blocksuite/affine/blocks';
|
||||
import type { ExtensionType } from '@blocksuite/affine/store';
|
||||
|
||||
import { getFontConfigExtension } from './font-extension';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user