refactor(editor): remove dependency of command global types (#9903)

Closes: [BS-2216](https://linear.app/affine-design/issue/BS-2216/remove-global-types-in-command)
This commit is contained in:
Saul-Mirone
2025-01-27 12:28:46 +00:00
parent 4b549e0484
commit 17bf75e843
170 changed files with 1461 additions and 2124 deletions
@@ -1,16 +1,3 @@
import type { IndentContext } from '@blocksuite/affine-shared/types';
import type { addParagraphCommand } from './commands/add-paragraph.js';
import type { appendParagraphCommand } from './commands/append-paragraph.js';
import type {
canDedentParagraphCommand,
dedentParagraphCommand,
} from './commands/dedent-paragraph.js';
import type {
canIndentParagraphCommand,
indentParagraphCommand,
} from './commands/indent-paragraph.js';
import type { splitParagraphCommand } from './commands/split-paragraph.js';
import { effects as ParagraphHeadingIconEffects } from './heading-icon.js';
import { ParagraphBlockComponent } from './paragraph-block.js';
import type { ParagraphBlockService } from './paragraph-service.js';
@@ -25,19 +12,6 @@ declare global {
interface BlockServices {
'affine:paragraph': ParagraphBlockService;
}
interface Commands {
addParagraph: typeof addParagraphCommand;
appendParagraph: typeof appendParagraphCommand;
canIndentParagraph: typeof canIndentParagraphCommand;
canDedentParagraph: typeof canDedentParagraphCommand;
dedentParagraph: typeof dedentParagraphCommand;
indentParagraph: typeof indentParagraphCommand;
splitParagraph: typeof splitParagraphCommand;
}
interface CommandContext {
paragraphConvertedId?: string;
indentContext?: IndentContext;
}
}
interface HTMLElementTagNameMap {
'affine-paragraph': ParagraphBlockComponent;