refactor(editor): cleanup dead code (#12281)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Streamlined and consolidated block and inline extension exports by removing multiple block-spec and inline extension arrays from public APIs. - Reduced exported constants, types, and utility functions related to various block and embed features. - Simplified the codebase by removing deprecated type guards, adapter extensions, and redundant extension groupings. - **Chores** - Cleaned up internal APIs by deleting unused exports, imports, and outdated code, enhancing maintainability. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
import type { ExtensionType } from '@blocksuite/store';
|
||||
|
||||
import { FootNoteInlineSpecExtension } from './inline-spec';
|
||||
|
||||
export const inlineFootnoteExtensions: ExtensionType[] = [
|
||||
FootNoteInlineSpecExtension,
|
||||
];
|
||||
@@ -1,5 +1,4 @@
|
||||
export * from './adapters';
|
||||
export * from './exts';
|
||||
export * from './footnote-node/footnote-config.js';
|
||||
export { AffineFootnoteNode } from './footnote-node/footnote-node.js';
|
||||
export * from './inline-spec';
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
import {
|
||||
LatexEditorUnitSpecExtension,
|
||||
LatexInlineSpecExtension,
|
||||
} from './inline-spec';
|
||||
import { LatexEditorInlineManagerExtension } from './latex-node/latex-editor-menu';
|
||||
|
||||
export const inlineLatexExtensions = [
|
||||
LatexInlineSpecExtension,
|
||||
LatexEditorUnitSpecExtension,
|
||||
LatexEditorInlineManagerExtension,
|
||||
];
|
||||
@@ -3,7 +3,6 @@ import type RemarkMath from 'remark-math';
|
||||
|
||||
export * from './adapters';
|
||||
export * from './command';
|
||||
export * from './exts';
|
||||
export * from './inline-spec';
|
||||
export * from './markdown';
|
||||
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
import type { ExtensionType } from '@blocksuite/store';
|
||||
|
||||
import { LinkInlineSpecExtension } from './inline-spec';
|
||||
import { linkToolbar } from './toolbar';
|
||||
|
||||
export const inlineLinkExtensions: ExtensionType[] = [
|
||||
LinkInlineSpecExtension,
|
||||
linkToolbar,
|
||||
];
|
||||
@@ -1,6 +1,5 @@
|
||||
export * from './adapters';
|
||||
export * from './command';
|
||||
export * from './exts';
|
||||
export * from './inline-spec';
|
||||
export * from './link-node';
|
||||
export * from './markdown';
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
import type { ExtensionType } from '@blocksuite/store';
|
||||
|
||||
import { MentionInlineSpecExtension } from './inline-spec';
|
||||
|
||||
export const inlineMentionExtensions: ExtensionType[] = [
|
||||
MentionInlineSpecExtension,
|
||||
];
|
||||
@@ -1,4 +1,3 @@
|
||||
export * from './affine-mention';
|
||||
export * from './effects';
|
||||
export * from './exts';
|
||||
export * from './inline-spec';
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
import { InlineAdapterExtensions } from './adapters/extensions';
|
||||
import { DefaultInlineManagerExtension } from './default-inline-manager';
|
||||
import { InlineSpecExtensions } from './inline-spec';
|
||||
import { MarkdownExtensions } from './markdown';
|
||||
|
||||
export const inlinePresetExtensions = [
|
||||
DefaultInlineManagerExtension,
|
||||
...MarkdownExtensions,
|
||||
...InlineSpecExtensions,
|
||||
...InlineAdapterExtensions,
|
||||
];
|
||||
@@ -5,7 +5,6 @@ declare type _GLOBAL_ = typeof RichTextEffects;
|
||||
export * from './adapters/extensions';
|
||||
export * from './command';
|
||||
export * from './default-inline-manager';
|
||||
export * from './exts';
|
||||
export * from './inline-spec';
|
||||
export * from './keymap';
|
||||
export * from './markdown';
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
import type { ExtensionType } from '@blocksuite/store';
|
||||
|
||||
import { ReferenceInlineSpecExtension } from './inline-spec';
|
||||
import { RefNodeSlotsExtension } from './reference-node';
|
||||
import { referenceNodeToolbar } from './toolbar';
|
||||
|
||||
export const inlineReferenceExtensions: ExtensionType[] = [
|
||||
referenceNodeToolbar,
|
||||
ReferenceInlineSpecExtension,
|
||||
RefNodeSlotsExtension,
|
||||
];
|
||||
@@ -1,5 +1,4 @@
|
||||
export * from './adapters';
|
||||
export * from './exts';
|
||||
export * from './inline-spec';
|
||||
export * from './reference-node';
|
||||
export * from './toolbar';
|
||||
|
||||
Reference in New Issue
Block a user