mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-15 05:37:32 +00:00
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,17 +1,7 @@
|
||||
import type {
|
||||
EmbedCardStyle,
|
||||
FootNote,
|
||||
ReferenceInfo,
|
||||
} from '@blocksuite/affine-model';
|
||||
import type { BlockComponent } from '@blocksuite/std';
|
||||
import type { FootNote, ReferenceInfo } from '@blocksuite/affine-model';
|
||||
import type { InlineEditor } from '@blocksuite/std/inline';
|
||||
import type { BlockModel } from '@blocksuite/store';
|
||||
export * from './uni-component';
|
||||
export interface EditingState {
|
||||
element: BlockComponent;
|
||||
model: BlockModel;
|
||||
rect: DOMRect;
|
||||
}
|
||||
|
||||
export type NoteChildrenFlavour =
|
||||
| 'affine:paragraph'
|
||||
@@ -38,13 +28,6 @@ export interface Viewport {
|
||||
|
||||
export type ExtendedModel = BlockModel & Record<string, any>;
|
||||
|
||||
export type EmbedOptions = {
|
||||
flavour: string;
|
||||
urlRegex: RegExp;
|
||||
styles: EmbedCardStyle[];
|
||||
viewType: 'card' | 'embed';
|
||||
};
|
||||
|
||||
export type IndentContext = {
|
||||
blockId: string;
|
||||
inlineIndex: number;
|
||||
@@ -75,3 +58,13 @@ export interface AffineTextAttributes {
|
||||
}
|
||||
|
||||
export type AffineInlineEditor = InlineEditor<AffineTextAttributes>;
|
||||
|
||||
export type SelectedRect = {
|
||||
left: number;
|
||||
top: number;
|
||||
width: number;
|
||||
height: number;
|
||||
borderWidth: number;
|
||||
borderStyle: string;
|
||||
rotate: number;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user