mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-25 18:26:05 +08:00
refactor(editor): move focus block commands to blocksuite/shared (#10671)
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import { focusBlockEnd, focusBlockStart } from '@blocksuite/affine-block-note';
|
|
||||||
import {
|
import {
|
||||||
|
focusBlockEnd,
|
||||||
|
focusBlockStart,
|
||||||
getNextBlockCommand,
|
getNextBlockCommand,
|
||||||
getPrevBlockCommand,
|
getPrevBlockCommand,
|
||||||
} from '@blocksuite/affine-shared/commands';
|
} from '@blocksuite/affine-shared/commands';
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ export { dedentBlock } from './dedent-block.js';
|
|||||||
export { dedentBlockToRoot } from './dedent-block-to-root.js';
|
export { dedentBlockToRoot } from './dedent-block-to-root.js';
|
||||||
export { dedentBlocks } from './dedent-blocks.js';
|
export { dedentBlocks } from './dedent-blocks.js';
|
||||||
export { dedentBlocksToRoot } from './dedent-blocks-to-root.js';
|
export { dedentBlocksToRoot } from './dedent-blocks-to-root.js';
|
||||||
export { focusBlockEnd } from './focus-block-end.js';
|
|
||||||
export { focusBlockStart } from './focus-block-start.js';
|
|
||||||
export { indentBlock } from './indent-block.js';
|
export { indentBlock } from './indent-block.js';
|
||||||
export { indentBlocks } from './indent-blocks.js';
|
export { indentBlocks } from './indent-blocks.js';
|
||||||
export { selectBlock } from './select-block.js';
|
export { selectBlock } from './select-block.js';
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ import {
|
|||||||
ParagraphBlockModel,
|
ParagraphBlockModel,
|
||||||
} from '@blocksuite/affine-model';
|
} from '@blocksuite/affine-model';
|
||||||
import {
|
import {
|
||||||
|
focusBlockEnd,
|
||||||
|
focusBlockStart,
|
||||||
getBlockSelectionsCommand,
|
getBlockSelectionsCommand,
|
||||||
getNextBlockCommand,
|
getNextBlockCommand,
|
||||||
getPrevBlockCommand,
|
getPrevBlockCommand,
|
||||||
@@ -28,8 +30,6 @@ import type { BaseSelection, BlockModel } from '@blocksuite/store';
|
|||||||
import {
|
import {
|
||||||
dedentBlocks,
|
dedentBlocks,
|
||||||
dedentBlocksToRoot,
|
dedentBlocksToRoot,
|
||||||
focusBlockEnd,
|
|
||||||
focusBlockStart,
|
|
||||||
indentBlocks,
|
indentBlocks,
|
||||||
selectBlock,
|
selectBlock,
|
||||||
selectBlocksBetween,
|
selectBlocksBetween,
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ export {
|
|||||||
retainFirstModelCommand,
|
retainFirstModelCommand,
|
||||||
} from './model-crud/index.js';
|
} from './model-crud/index.js';
|
||||||
export {
|
export {
|
||||||
|
focusBlockEnd,
|
||||||
|
focusBlockStart,
|
||||||
getBlockSelectionsCommand,
|
getBlockSelectionsCommand,
|
||||||
getImageSelectionsCommand,
|
getImageSelectionsCommand,
|
||||||
getRangeRects,
|
getRangeRects,
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
export { getBlockSelectionsCommand } from './get-block-selections.js';
|
export { focusBlockEnd } from './focus-block-end';
|
||||||
export { getImageSelectionsCommand } from './get-image-selections.js';
|
export { focusBlockStart } from './focus-block-start';
|
||||||
|
export { getBlockSelectionsCommand } from './get-block-selections';
|
||||||
|
export { getImageSelectionsCommand } from './get-image-selections';
|
||||||
export {
|
export {
|
||||||
getRangeRects,
|
getRangeRects,
|
||||||
getSelectionRectsCommand,
|
getSelectionRectsCommand,
|
||||||
type SelectionRect,
|
type SelectionRect,
|
||||||
} from './get-selection-rects.js';
|
} from './get-selection-rects';
|
||||||
export { getTextSelectionCommand } from './get-text-selection.js';
|
export { getTextSelectionCommand } from './get-text-selection';
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import { addSiblingAttachmentBlocks } from '@blocksuite/affine-block-attachment';
|
import { addSiblingAttachmentBlocks } from '@blocksuite/affine-block-attachment';
|
||||||
import { insertImagesCommand } from '@blocksuite/affine-block-image';
|
import { insertImagesCommand } from '@blocksuite/affine-block-image';
|
||||||
import { insertLatexBlockCommand } from '@blocksuite/affine-block-latex';
|
import { insertLatexBlockCommand } from '@blocksuite/affine-block-latex';
|
||||||
import { focusBlockEnd } from '@blocksuite/affine-block-note';
|
|
||||||
import { getSurfaceBlock } from '@blocksuite/affine-block-surface';
|
import { getSurfaceBlock } from '@blocksuite/affine-block-surface';
|
||||||
import { insertSurfaceRefBlockCommand } from '@blocksuite/affine-block-surface-ref';
|
import { insertSurfaceRefBlockCommand } from '@blocksuite/affine-block-surface-ref';
|
||||||
import { insertTableBlockCommand } from '@blocksuite/affine-block-table';
|
import { insertTableBlockCommand } from '@blocksuite/affine-block-table';
|
||||||
@@ -19,6 +18,7 @@ import type {
|
|||||||
ParagraphBlockModel,
|
ParagraphBlockModel,
|
||||||
} from '@blocksuite/affine-model';
|
} from '@blocksuite/affine-model';
|
||||||
import {
|
import {
|
||||||
|
focusBlockEnd,
|
||||||
getSelectedModelsCommand,
|
getSelectedModelsCommand,
|
||||||
getTextSelectionCommand,
|
getTextSelectionCommand,
|
||||||
} from '@blocksuite/affine-shared/commands';
|
} from '@blocksuite/affine-shared/commands';
|
||||||
|
|||||||
Reference in New Issue
Block a user