mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 12:55:00 +00:00
refactor(editor): remove unused block dependencies (#11959)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Chores** - Updated package dependencies to reduce the number of direct dependencies for improved maintainability. No changes to user-facing features or functionality. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -12,19 +12,14 @@
|
||||
"dependencies": {
|
||||
"@blocksuite/affine-block-attachment": "workspace:*",
|
||||
"@blocksuite/affine-block-bookmark": "workspace:*",
|
||||
"@blocksuite/affine-block-data-view": "workspace:*",
|
||||
"@blocksuite/affine-block-database": "workspace:*",
|
||||
"@blocksuite/affine-block-edgeless-text": "workspace:*",
|
||||
"@blocksuite/affine-block-embed": "workspace:*",
|
||||
"@blocksuite/affine-block-frame": "workspace:*",
|
||||
"@blocksuite/affine-block-image": "workspace:*",
|
||||
"@blocksuite/affine-block-latex": "workspace:*",
|
||||
"@blocksuite/affine-block-list": "workspace:*",
|
||||
"@blocksuite/affine-block-note": "workspace:*",
|
||||
"@blocksuite/affine-block-paragraph": "workspace:*",
|
||||
"@blocksuite/affine-block-surface": "workspace:*",
|
||||
"@blocksuite/affine-block-surface-ref": "workspace:*",
|
||||
"@blocksuite/affine-block-table": "workspace:*",
|
||||
"@blocksuite/affine-components": "workspace:*",
|
||||
"@blocksuite/affine-fragment-doc-title": "workspace:*",
|
||||
"@blocksuite/affine-gfx-brush": "workspace:*",
|
||||
@@ -33,12 +28,8 @@
|
||||
"@blocksuite/affine-gfx-mindmap": "workspace:*",
|
||||
"@blocksuite/affine-gfx-note": "workspace:*",
|
||||
"@blocksuite/affine-gfx-shape": "workspace:*",
|
||||
"@blocksuite/affine-gfx-template": "workspace:*",
|
||||
"@blocksuite/affine-gfx-text": "workspace:*",
|
||||
"@blocksuite/affine-inline-latex": "workspace:*",
|
||||
"@blocksuite/affine-inline-link": "workspace:*",
|
||||
"@blocksuite/affine-inline-preset": "workspace:*",
|
||||
"@blocksuite/affine-inline-reference": "workspace:*",
|
||||
"@blocksuite/affine-model": "workspace:*",
|
||||
"@blocksuite/affine-rich-text": "workspace:*",
|
||||
"@blocksuite/affine-shared": "workspace:*",
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import type * as BrushEffect from '@blocksuite/affine-gfx-brush';
|
||||
import type * as NoteEffect from '@blocksuite/affine-gfx-note';
|
||||
import type * as ShapeEffect from '@blocksuite/affine-gfx-shape';
|
||||
import { TextTool } from '@blocksuite/affine-gfx-text';
|
||||
import { InteractivityManager } from '@blocksuite/std/gfx';
|
||||
import type { ExtensionType } from '@blocksuite/store';
|
||||
|
||||
@@ -11,7 +10,6 @@ import { DefaultTool } from './gfx-tool/default-tool.js';
|
||||
import { EmptyTool } from './gfx-tool/empty-tool.js';
|
||||
import { PanTool } from './gfx-tool/pan-tool.js';
|
||||
import { AltCloneExtension } from './interact-extensions/clone-ext.js';
|
||||
import { DblClickAddEdgelessText } from './interact-extensions/dblclick-add-edgeless-text.js';
|
||||
import { SnapExtension } from './interact-extensions/snap-manager.js';
|
||||
import { EditPropsMiddlewareBuilder } from './middlewares/base.js';
|
||||
import { SnapOverlay } from './utils/snap-manager.js';
|
||||
@@ -24,14 +22,12 @@ declare type _GLOBAL_ =
|
||||
export const EdgelessToolExtension: ExtensionType[] = [
|
||||
DefaultTool,
|
||||
PanTool,
|
||||
TextTool,
|
||||
EmptyTool,
|
||||
];
|
||||
|
||||
export const EdgelessEditExtensions: ExtensionType[] = [
|
||||
InteractivityManager,
|
||||
SnapExtension,
|
||||
DblClickAddEdgelessText,
|
||||
];
|
||||
|
||||
export const EdgelessBuiltInManager: ExtensionType[] = [
|
||||
|
||||
@@ -9,19 +9,14 @@
|
||||
"references": [
|
||||
{ "path": "../attachment" },
|
||||
{ "path": "../bookmark" },
|
||||
{ "path": "../data-view" },
|
||||
{ "path": "../database" },
|
||||
{ "path": "../edgeless-text" },
|
||||
{ "path": "../embed" },
|
||||
{ "path": "../frame" },
|
||||
{ "path": "../image" },
|
||||
{ "path": "../latex" },
|
||||
{ "path": "../list" },
|
||||
{ "path": "../note" },
|
||||
{ "path": "../paragraph" },
|
||||
{ "path": "../surface" },
|
||||
{ "path": "../surface-ref" },
|
||||
{ "path": "../table" },
|
||||
{ "path": "../../components" },
|
||||
{ "path": "../../fragments/doc-title" },
|
||||
{ "path": "../../gfx/brush" },
|
||||
@@ -30,12 +25,8 @@
|
||||
{ "path": "../../gfx/mindmap" },
|
||||
{ "path": "../../gfx/note" },
|
||||
{ "path": "../../gfx/shape" },
|
||||
{ "path": "../../gfx/template" },
|
||||
{ "path": "../../gfx/text" },
|
||||
{ "path": "../../inlines/latex" },
|
||||
{ "path": "../../inlines/link" },
|
||||
{ "path": "../../inlines/preset" },
|
||||
{ "path": "../../inlines/reference" },
|
||||
{ "path": "../../model" },
|
||||
{ "path": "../../rich-text" },
|
||||
{ "path": "../../shared" },
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
import {
|
||||
addText,
|
||||
insertEdgelessTextCommand,
|
||||
} from '@blocksuite/affine-gfx-text';
|
||||
import {
|
||||
FeatureFlagService,
|
||||
TelemetryProvider,
|
||||
@@ -11,6 +7,9 @@ import {
|
||||
InteractivityExtension,
|
||||
} from '@blocksuite/std/gfx';
|
||||
|
||||
import { insertEdgelessTextCommand } from './commands';
|
||||
import { addText } from './edgeless-text-editor';
|
||||
|
||||
export class DblClickAddEdgelessText extends InteractivityExtension {
|
||||
static override key = 'dbl-click-add-edgeless-text';
|
||||
|
||||
@@ -3,9 +3,11 @@ import {
|
||||
ViewExtensionProvider,
|
||||
} from '@blocksuite/affine-ext-loader';
|
||||
|
||||
import { DblClickAddEdgelessText } from './dblclick-add-edgeless-text';
|
||||
import { effects } from './effects';
|
||||
import { TextElementRendererExtension } from './element-renderer';
|
||||
import { TextElementView } from './element-view';
|
||||
import { TextTool } from './tool';
|
||||
import { textToolbarExtension } from './toolbar';
|
||||
|
||||
export class TextViewExtension extends ViewExtensionProvider {
|
||||
@@ -21,7 +23,9 @@ export class TextViewExtension extends ViewExtensionProvider {
|
||||
context.register(TextElementView);
|
||||
context.register(TextElementRendererExtension);
|
||||
if (this.isEdgeless(context.scope)) {
|
||||
context.register(TextTool);
|
||||
context.register(textToolbarExtension);
|
||||
context.register(DblClickAddEdgelessText);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user