@blocknote/core 0.19.1 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/dist/blocknote.js +1791 -1483
  2. package/dist/blocknote.js.map +1 -1
  3. package/dist/blocknote.umd.cjs +6 -6
  4. package/dist/blocknote.umd.cjs.map +1 -1
  5. package/dist/src/api/blockManipulation/commands/insertBlocks/insertBlocks.js +6 -3
  6. package/dist/src/api/blockManipulation/commands/insertBlocks/insertBlocks.js.map +1 -1
  7. package/dist/src/api/blockManipulation/commands/moveBlocks/moveBlocks.js +219 -0
  8. package/dist/src/api/blockManipulation/commands/moveBlocks/moveBlocks.js.map +1 -0
  9. package/dist/src/api/blockManipulation/commands/moveBlocks/moveBlocks.test.js +175 -0
  10. package/dist/src/api/blockManipulation/commands/moveBlocks/moveBlocks.test.js.map +1 -0
  11. package/dist/src/api/blockManipulation/commands/splitBlock/splitBlock.test.js +3 -0
  12. package/dist/src/api/blockManipulation/commands/splitBlock/splitBlock.test.js.map +1 -1
  13. package/dist/src/api/blockManipulation/commands/updateBlock/updateBlock.js +6 -3
  14. package/dist/src/api/blockManipulation/commands/updateBlock/updateBlock.js.map +1 -1
  15. package/dist/src/api/blockManipulation/getBlock/getBlock.js +56 -0
  16. package/dist/src/api/blockManipulation/getBlock/getBlock.js.map +1 -0
  17. package/dist/src/api/blockManipulation/selections/selection.js +149 -0
  18. package/dist/src/api/blockManipulation/selections/selection.js.map +1 -0
  19. package/dist/src/api/blockManipulation/selections/selection.test.js +39 -0
  20. package/dist/src/api/blockManipulation/selections/selection.test.js.map +1 -0
  21. package/dist/src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.js +3 -0
  22. package/dist/src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.js.map +1 -1
  23. package/dist/src/api/clipboard/fromClipboard/handleVSCodePaste.js +3 -3
  24. package/dist/src/api/clipboard/fromClipboard/handleVSCodePaste.js.map +1 -1
  25. package/dist/src/api/nodeUtil.js +1 -1
  26. package/dist/src/api/nodeUtil.js.map +1 -1
  27. package/dist/src/blocks/CodeBlockContent/CodeBlockContent.js +15 -7
  28. package/dist/src/blocks/CodeBlockContent/CodeBlockContent.js.map +1 -1
  29. package/dist/src/blocks/CodeBlockContent/defaultSupportedLanguages.js +38 -18
  30. package/dist/src/blocks/CodeBlockContent/defaultSupportedLanguages.js.map +1 -1
  31. package/dist/src/blocks/TableBlockContent/TableExtension.js +8 -1
  32. package/dist/src/blocks/TableBlockContent/TableExtension.js.map +1 -1
  33. package/dist/src/editor/BlockNoteEditor.js +59 -57
  34. package/dist/src/editor/BlockNoteEditor.js.map +1 -1
  35. package/dist/src/editor/BlockNoteExtensions.js +2 -1
  36. package/dist/src/editor/BlockNoteExtensions.js.map +1 -1
  37. package/dist/src/extensions/FormattingToolbar/FormattingToolbarPlugin.js +4 -2
  38. package/dist/src/extensions/FormattingToolbar/FormattingToolbarPlugin.js.map +1 -1
  39. package/dist/src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.js +10 -8
  40. package/dist/src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.js.map +1 -1
  41. package/dist/src/extensions/LinkToolbar/LinkToolbarPlugin.js +7 -3
  42. package/dist/src/extensions/LinkToolbar/LinkToolbarPlugin.js.map +1 -1
  43. package/dist/src/extensions/Placeholder/PlaceholderPlugin.js +13 -7
  44. package/dist/src/extensions/Placeholder/PlaceholderPlugin.js.map +1 -1
  45. package/dist/src/extensions/SideMenu/SideMenuPlugin.js +5 -1
  46. package/dist/src/extensions/SideMenu/SideMenuPlugin.js.map +1 -1
  47. package/dist/src/extensions/SideMenu/dragging.js +5 -1
  48. package/dist/src/extensions/SideMenu/dragging.js.map +1 -1
  49. package/dist/src/extensions/SuggestionMenu/getDefaultSlashMenuItems.js +0 -3
  50. package/dist/src/extensions/SuggestionMenu/getDefaultSlashMenuItems.js.map +1 -1
  51. package/dist/src/extensions/TableHandles/TableHandlesPlugin.js +25 -8
  52. package/dist/src/extensions/TableHandles/TableHandlesPlugin.js.map +1 -1
  53. package/dist/src/i18n/locales/ru.js +1 -1
  54. package/dist/src/index.js +1 -0
  55. package/dist/src/index.js.map +1 -1
  56. package/dist/style.css +1 -1
  57. package/dist/tsconfig.tsbuildinfo +1 -1
  58. package/dist/webpack-stats.json +1 -1
  59. package/package.json +3 -3
  60. package/src/api/blockManipulation/commands/insertBlocks/insertBlocks.ts +6 -6
  61. package/src/api/blockManipulation/commands/moveBlocks/__snapshots__/moveBlocks.test.ts.snap +9506 -0
  62. package/src/api/blockManipulation/commands/moveBlocks/moveBlocks.test.ts +295 -0
  63. package/src/api/blockManipulation/commands/moveBlocks/moveBlocks.ts +338 -0
  64. package/src/api/blockManipulation/commands/splitBlock/splitBlock.test.ts +4 -0
  65. package/src/api/blockManipulation/commands/updateBlock/updateBlock.ts +11 -3
  66. package/src/api/blockManipulation/getBlock/getBlock.ts +141 -0
  67. package/src/api/blockManipulation/selections/__snapshots__/selection.test.ts.snap +660 -0
  68. package/src/api/blockManipulation/selections/selection.test.ts +56 -0
  69. package/src/api/blockManipulation/selections/selection.ts +244 -0
  70. package/src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.ts +4 -0
  71. package/src/api/clipboard/fromClipboard/handleVSCodePaste.ts +4 -4
  72. package/src/api/nodeUtil.ts +2 -2
  73. package/src/blocks/CodeBlockContent/CodeBlockContent.ts +18 -8
  74. package/src/blocks/CodeBlockContent/defaultSupportedLanguages.ts +38 -18
  75. package/src/blocks/TableBlockContent/TableExtension.ts +12 -1
  76. package/src/editor/Block.css +3 -0
  77. package/src/editor/BlockNoteEditor.ts +93 -85
  78. package/src/editor/BlockNoteExtensions.ts +3 -1
  79. package/src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts +4 -2
  80. package/src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts +11 -8
  81. package/src/extensions/LinkToolbar/LinkToolbarPlugin.ts +11 -4
  82. package/src/extensions/Placeholder/PlaceholderPlugin.ts +23 -15
  83. package/src/extensions/SideMenu/SideMenuPlugin.ts +5 -1
  84. package/src/extensions/SideMenu/dragging.ts +5 -1
  85. package/src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts +0 -5
  86. package/src/extensions/TableHandles/TableHandlesPlugin.ts +34 -9
  87. package/src/i18n/locales/ru.ts +1 -1
  88. package/src/index.ts +1 -0
  89. package/types/src/api/blockManipulation/commands/moveBlocks/moveBlocks.d.ts +15 -0
  90. package/types/src/api/blockManipulation/getBlock/getBlock.d.ts +7 -0
  91. package/types/src/api/blockManipulation/selections/selection.d.ts +5 -0
  92. package/types/src/api/blockManipulation/selections/selection.test.d.ts +1 -0
  93. package/types/src/api/nodeUtil.d.ts +1 -1
  94. package/types/src/editor/BlockNoteEditor.d.ts +54 -10
  95. package/types/src/editor/BlockNoteExtensions.d.ts +1 -0
  96. package/types/src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.d.ts +1 -0
  97. package/types/src/extensions/SideMenu/SideMenuPlugin.d.ts +1 -1
  98. package/types/src/index.d.ts +1 -0
  99. package/types/src/pm-nodes/BlockContainer.d.ts +2 -2
  100. package/types/src/pm-nodes/BlockGroup.d.ts +2 -2
  101. package/dist/src/api/blockManipulation/commands/moveBlock/moveBlock.js +0 -116
  102. package/dist/src/api/blockManipulation/commands/moveBlock/moveBlock.js.map +0 -1
  103. package/dist/src/api/blockManipulation/commands/moveBlock/moveBlock.test.js +0 -110
  104. package/dist/src/api/blockManipulation/commands/moveBlock/moveBlock.test.js.map +0 -1
  105. package/src/api/blockManipulation/commands/moveBlock/__snapshots__/moveBlock.test.ts.snap +0 -3799
  106. package/src/api/blockManipulation/commands/moveBlock/moveBlock.test.ts +0 -196
  107. package/src/api/blockManipulation/commands/moveBlock/moveBlock.ts +0 -176
  108. package/types/src/api/blockManipulation/commands/moveBlock/moveBlock.d.ts +0 -5
  109. /package/types/src/api/blockManipulation/commands/{moveBlock/moveBlock.test.d.ts → moveBlocks/moveBlocks.test.d.ts} +0 -0
@@ -123,6 +123,20 @@ export type BlockNoteEditorOptions<BSchema extends BlockSchema, ISchema extends
123
123
  */
124
124
  setIdAttribute?: boolean;
125
125
  dropCursor?: (opts: any) => Plugin;
126
+ /**
127
+ Select desired behavior when pressing `Tab` (or `Shift-Tab`). Specifically,
128
+ what should happen when a user has selected multiple blocks while a toolbar
129
+ is open:
130
+ - `"prefer-navigate-ui"`: Change focus to the toolbar. The user needs to
131
+ first press `Escape` to close the toolbar, and can then indent multiple
132
+ blocks. Better for keyboard accessibility.
133
+ - `"prefer-indent"`: Regardless of whether toolbars are open, indent the
134
+ selection of blocks. In this case, it's not possible to navigate toolbars
135
+ with the keyboard.
136
+
137
+ @default "prefer-navigate-ui"
138
+ */
139
+ tabBehavior: "prefer-navigate-ui" | "prefer-indent";
126
140
  };
127
141
  export declare class BlockNoteEditor<BSchema extends BlockSchema = DefaultBlockSchema, ISchema extends InlineContentSchema = DefaultInlineContentSchema, SSchema extends StyleSchema = DefaultStyleSchema> {
128
142
  protected readonly options: Partial<BlockNoteEditorOptions<any, any, any>>;
@@ -210,10 +224,39 @@ export declare class BlockNoteEditor<BSchema extends BlockSchema = DefaultBlockS
210
224
  get document(): Block<BSchema, ISchema, SSchema>[];
211
225
  /**
212
226
  * Gets a snapshot of an existing block from the editor.
213
- * @param blockIdentifier The identifier of an existing block that should be retrieved.
214
- * @returns The block that matches the identifier, or `undefined` if no matching block was found.
227
+ * @param blockIdentifier The identifier of an existing block that should be
228
+ * retrieved.
229
+ * @returns The block that matches the identifier, or `undefined` if no
230
+ * matching block was found.
215
231
  */
216
232
  getBlock(blockIdentifier: BlockIdentifier): Block<BSchema, ISchema, SSchema> | undefined;
233
+ /**
234
+ * Gets a snapshot of the previous sibling of an existing block from the
235
+ * editor.
236
+ * @param blockIdentifier The identifier of an existing block for which the
237
+ * previous sibling should be retrieved.
238
+ * @returns The previous sibling of the block that matches the identifier.
239
+ * `undefined` if no matching block was found, or it's the first child/block
240
+ * in the document.
241
+ */
242
+ getPrevBlock(blockIdentifier: BlockIdentifier): Block<BSchema, ISchema, SSchema> | undefined;
243
+ /**
244
+ * Gets a snapshot of the next sibling of an existing block from the editor.
245
+ * @param blockIdentifier The identifier of an existing block for which the
246
+ * next sibling should be retrieved.
247
+ * @returns The next sibling of the block that matches the identifier.
248
+ * `undefined` if no matching block was found, or it's the last child/block in
249
+ * the document.
250
+ */
251
+ getNextBlock(blockIdentifier: BlockIdentifier): Block<BSchema, ISchema, SSchema> | undefined;
252
+ /**
253
+ * Gets a snapshot of the parent of an existing block from the editor.
254
+ * @param blockIdentifier The identifier of an existing block for which the
255
+ * parent should be retrieved.
256
+ * @returns The parent of the block that matches the identifier. `undefined`
257
+ * if no matching block was found, or the block isn't nested.
258
+ */
259
+ getParentBlock(blockIdentifier: BlockIdentifier): Block<BSchema, ISchema, SSchema> | undefined;
217
260
  /**
218
261
  * Traverses all blocks in the editor depth-first, and executes a callback for each.
219
262
  * @param callback The callback to execute for each block. Returning `false` stops the traversal.
@@ -246,6 +289,7 @@ export declare class BlockNoteEditor<BSchema extends BlockSchema = DefaultBlockS
246
289
  * Gets a snapshot of the current selection.
247
290
  */
248
291
  getSelection(): Selection<BSchema, ISchema, SSchema> | undefined;
292
+ setSelection(startBlock: BlockIdentifier, endBlock: BlockIdentifier): void;
249
293
  /**
250
294
  * Checks if the editor is currently editable, or if it's locked.
251
295
  * @returns True if the editor is editable, false otherwise.
@@ -345,17 +389,17 @@ export declare class BlockNoteEditor<BSchema extends BlockSchema = DefaultBlockS
345
389
  */
346
390
  unnestBlock(): void;
347
391
  /**
348
- * Moves the block containing the text cursor up. If the previous block has
349
- * children, moves it to the end of its children. If there is no previous
350
- * block, but the current block is nested, moves it out of & before its parent.
392
+ * Moves the selected blocks up. If the previous block has children, moves
393
+ * them to the end of its children. If there is no previous block, but the
394
+ * current blocks share a common parent, moves them out of & before it.
351
395
  */
352
- moveBlockUp(): void;
396
+ moveBlocksUp(): void;
353
397
  /**
354
- * Moves the block containing the text cursor down. If the next block has
355
- * children, moves it to the start of its children. If there is no next block,
356
- * but the current block is nested, moves it out of & after its parent.
398
+ * Moves the selected blocks down. If the next block has children, moves
399
+ * them to the start of its children. If there is no next block, but the
400
+ * current blocks share a common parent, moves them out of & after it.
357
401
  */
358
- moveBlockDown(): void;
402
+ moveBlocksDown(): void;
359
403
  /**
360
404
  * Exports blocks into a simplified HTML string. To better conform to HTML standards, children of blocks which aren't list
361
405
  * items are un-nested in the output HTML.
@@ -25,6 +25,7 @@ type ExtensionOptions<BSchema extends BlockSchema, I extends InlineContentSchema
25
25
  tableHandles: boolean;
26
26
  dropCursor: (opts: any) => Plugin;
27
27
  placeholders: Record<string | "default", string>;
28
+ tabBehavior?: "prefer-navigate-ui" | "prefer-indent";
28
29
  };
29
30
  /**
30
31
  * Get all the Tiptap extensions BlockNote is configured with by default
@@ -2,4 +2,5 @@ import { Extension } from "@tiptap/core";
2
2
  import { BlockNoteEditor } from "../../editor/BlockNoteEditor.js";
3
3
  export declare const KeyboardShortcutsExtension: Extension<{
4
4
  editor: BlockNoteEditor<any, any, any>;
5
+ tabBehavior: "prefer-navigate-ui" | "prefer-indent";
5
6
  }, any>;
@@ -64,7 +64,7 @@ export declare class SideMenuProsemirrorPlugin<BSchema extends BlockSchema, I ex
64
64
  * attached to the same block regardless of which block is hovered by the
65
65
  * mouse cursor.
66
66
  */
67
- freezeMenu: () => boolean;
67
+ freezeMenu: () => void;
68
68
  /**
69
69
  * Unfreezes the side menu. When frozen, the side menu will stay
70
70
  * attached to the same block regardless of which block is hovered by the
@@ -43,6 +43,7 @@ export * from "./util/string.js";
43
43
  export * from "./util/typescript.js";
44
44
  export { UnreachableCaseError, assertEmpty } from "./util/typescript.js";
45
45
  export { locales };
46
+ export * from "./api/blockManipulation/commands/updateBlock/updateBlock.js";
46
47
  export * from "./api/nodeConversions/blockToNode.js";
47
48
  export * from "./api/nodeConversions/nodeToBlock.js";
48
49
  export * from "./api/testUtil/partialBlockTestUtil.js";
@@ -5,10 +5,10 @@ import type { BlockNoteEditor } from "../editor/BlockNoteEditor.js";
5
5
  */
6
6
  export declare const BlockContainer: Node<{
7
7
  domAttributes?: Partial<{
8
- blockGroup: Record<string, string>;
9
8
  blockContent: Record<string, string>;
10
- block: Record<string, string>;
9
+ blockGroup: Record<string, string>;
11
10
  editor: Record<string, string>;
11
+ block: Record<string, string>;
12
12
  inlineContent: Record<string, string>;
13
13
  }> | undefined;
14
14
  editor: BlockNoteEditor<any, any, any>;
@@ -1,10 +1,10 @@
1
1
  import { Node } from "@tiptap/core";
2
2
  export declare const BlockGroup: Node<{
3
3
  domAttributes?: Partial<{
4
- blockGroup: Record<string, string>;
5
4
  blockContent: Record<string, string>;
6
- block: Record<string, string>;
5
+ blockGroup: Record<string, string>;
7
6
  editor: Record<string, string>;
7
+ block: Record<string, string>;
8
8
  inlineContent: Record<string, string>;
9
9
  }> | undefined;
10
10
  }, any>;
@@ -1,116 +0,0 @@
1
- import { NodeSelection, TextSelection } from "prosemirror-state";
2
- import { CellSelection } from "prosemirror-tables";
3
- import { getBlockInfoFromSelection } from "../../../getBlockInfoFromPos.js";
4
- import { getNodeById } from "../../../nodeUtil.js";
5
- // `getBlockSelectionData` and `updateBlockSelectionFromData` are used to save
6
- // and restore the selection within a block, when the block is moved.
7
- function getBlockSelectionData(editor) {
8
- const { bnBlock } = getBlockInfoFromSelection(editor._tiptapEditor.state);
9
- const selectionData = {
10
- blockId: bnBlock.node.attrs.id,
11
- blockPos: bnBlock.beforePos,
12
- };
13
- if (editor._tiptapEditor.state.selection instanceof CellSelection) {
14
- return {
15
- ...selectionData,
16
- type: "cell",
17
- anchorCell: editor._tiptapEditor.state.selection
18
- .$anchorCell.pos,
19
- headCell: editor._tiptapEditor.state.selection
20
- .$headCell.pos,
21
- };
22
- }
23
- else if (editor._tiptapEditor.state.selection instanceof NodeSelection) {
24
- return {
25
- ...selectionData,
26
- type: "node",
27
- from: editor._tiptapEditor.state.selection.from,
28
- };
29
- }
30
- else {
31
- return {
32
- ...selectionData,
33
- type: "text",
34
- anchor: editor._tiptapEditor.state.selection.anchor,
35
- head: editor._tiptapEditor.state.selection.head,
36
- };
37
- }
38
- }
39
- function updateBlockSelectionFromData(editor, data) {
40
- const blockPos = getNodeById(data.blockId, editor._tiptapEditor.state.doc).posBeforeNode;
41
- let selection;
42
- if (data.type === "cell") {
43
- selection = CellSelection.create(editor._tiptapEditor.state.doc, data.anchorCell + (blockPos - data.blockPos), data.headCell + (blockPos - data.blockPos));
44
- }
45
- else if (data.type === "node") {
46
- selection = NodeSelection.create(editor._tiptapEditor.state.doc, data.from + (blockPos - data.blockPos));
47
- }
48
- else {
49
- selection = TextSelection.create(editor._tiptapEditor.state.doc, data.anchor + (blockPos - data.blockPos), data.head + (blockPos - data.blockPos));
50
- }
51
- editor._tiptapEditor.view.dispatch(editor._tiptapEditor.state.tr.setSelection(selection));
52
- }
53
- export function moveSelectedBlockAndSelection(editor, referenceBlock, placement) {
54
- const { block } = editor.getTextCursorPosition();
55
- const selectionData = getBlockSelectionData(editor);
56
- editor.removeBlocks([block]);
57
- editor.insertBlocks([block], referenceBlock, placement);
58
- updateBlockSelectionFromData(editor, selectionData);
59
- }
60
- export function moveBlockUp(editor) {
61
- // This function currently only supports moving a single block.
62
- const editorSelection = editor.getSelection();
63
- if (editorSelection && editorSelection.blocks.length > 1) {
64
- return;
65
- }
66
- const { prevBlock, parentBlock } = editor.getTextCursorPosition();
67
- let referenceBlockId;
68
- let placement;
69
- if (!prevBlock) {
70
- if (parentBlock) {
71
- referenceBlockId = parentBlock.id;
72
- placement = "before";
73
- }
74
- }
75
- else if (prevBlock.children.length > 0) {
76
- referenceBlockId = prevBlock.children[prevBlock.children.length - 1].id;
77
- placement = "after";
78
- }
79
- else {
80
- referenceBlockId = prevBlock.id;
81
- placement = "before";
82
- }
83
- if (!referenceBlockId || !placement) {
84
- return;
85
- }
86
- moveSelectedBlockAndSelection(editor, referenceBlockId, placement);
87
- }
88
- export function moveBlockDown(editor) {
89
- // This function currently only supports moving a single block.
90
- const editorSelection = editor.getSelection();
91
- if (editorSelection && editorSelection.blocks.length > 1) {
92
- return;
93
- }
94
- const { nextBlock, parentBlock } = editor.getTextCursorPosition();
95
- let referenceBlockId;
96
- let placement;
97
- if (!nextBlock) {
98
- if (parentBlock) {
99
- referenceBlockId = parentBlock.id;
100
- placement = "after";
101
- }
102
- }
103
- else if (nextBlock.children.length > 0) {
104
- referenceBlockId = nextBlock.children[0].id;
105
- placement = "before";
106
- }
107
- else {
108
- referenceBlockId = nextBlock.id;
109
- placement = "after";
110
- }
111
- if (!referenceBlockId || !placement) {
112
- return;
113
- }
114
- moveSelectedBlockAndSelection(editor, referenceBlockId, placement);
115
- }
116
- //# sourceMappingURL=moveBlock.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"moveBlock.js","sourceRoot":"","sources":["../../../../../../src/api/blockManipulation/commands/moveBlock/moveBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAa,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAInD,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAsBnD,8EAA8E;AAC9E,qEAAqE;AACrE,SAAS,qBAAqB,CAC5B,MAAsC;IAEtC,MAAM,EAAE,OAAO,EAAE,GAAG,yBAAyB,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAE1E,MAAM,aAAa,GAAG;QACpB,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;QAC9B,QAAQ,EAAE,OAAO,CAAC,SAAS;KAC5B,CAAC;IAEF,IAAI,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,SAAS,YAAY,aAAa,EAAE,CAAC;QAClE,OAAO;YACL,GAAG,aAAa;YAChB,IAAI,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AClC,SAAS,GAAG,OAAO,CAAC;QACtB,CAAC;IACH,CAAC;SAAM,IAAI,SAAS,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACzC,gBAAgB,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAC5C,SAAS,GAAG,QAAQ,CAAC;IACvB,CAAC;SAAM,CAAC;QACN,gBAAgB,GAAG,SAAS,CAAC,EAAE,CAAC;QAChC,SAAS,GAAG,OAAO,CAAC;IACtB,CAAC;IAED,IAAI,CAAC,gBAAgB,IAAI,CAAC,SAAS,EAAE,CAAC;QACpC,OAAO;IACT,CAAC;IAED,6BAA6B,CAAC,MAAM,EAAE,gBAAgB,EAAE,SAAS,CAAC,CAAC;AACrE,CAAC"}
@@ -1,110 +0,0 @@
1
- import { NodeSelection, TextSelection } from "prosemirror-state";
2
- import { CellSelection } from "prosemirror-tables";
3
- import { describe, expect, it } from "vitest";
4
- import { getBlockInfoFromSelection } from "../../../getBlockInfoFromPos.js";
5
- import { setupTestEnv } from "../../setupTestEnv.js";
6
- import { moveBlockDown, moveBlockUp, moveSelectedBlockAndSelection, } from "./moveBlock.js";
7
- const getEditor = setupTestEnv();
8
- function makeSelectionSpanContent(selectionType) {
9
- const blockInfo = getBlockInfoFromSelection(getEditor()._tiptapEditor.state);
10
- if (!blockInfo.isBlockContainer) {
11
- throw new Error(`Selection points to a ${blockInfo.blockNoteType} node, not a blockContainer node`);
12
- }
13
- const { blockContent } = blockInfo;
14
- if (selectionType === "cell") {
15
- getEditor()._tiptapEditor.view.dispatch(getEditor()._tiptapEditor.state.tr.setSelection(CellSelection.create(getEditor()._tiptapEditor.state.doc, getEditor()
16
- ._tiptapEditor.state.doc.resolve(blockContent.beforePos + 3)
17
- .before(), getEditor()
18
- ._tiptapEditor.state.doc.resolve(blockContent.afterPos - 3)
19
- .before())));
20
- }
21
- else if (selectionType === "node") {
22
- const resolvedContentStartPos = getEditor()._tiptapEditor.state.doc.resolve(blockContent.beforePos);
23
- getEditor()._tiptapEditor.view.dispatch(getEditor()._tiptapEditor.state.tr.setSelection(NodeSelection.create(getEditor()._tiptapEditor.state.doc, getEditor()
24
- ._tiptapEditor.state.doc.resolve(resolvedContentStartPos.after(resolvedContentStartPos.depth + 1))
25
- .start())));
26
- }
27
- else {
28
- const resolvedContentStartPos = getEditor()._tiptapEditor.state.doc.resolve(blockContent.beforePos);
29
- const resolvedContentEndPos = getEditor()._tiptapEditor.state.doc.resolve(blockContent.afterPos);
30
- getEditor()._tiptapEditor.view.dispatch(getEditor()._tiptapEditor.state.tr.setSelection(TextSelection.create(getEditor()._tiptapEditor.state.doc, getEditor()
31
- ._tiptapEditor.state.doc.resolve(resolvedContentStartPos.after(resolvedContentStartPos.depth + 1))
32
- .start(), getEditor()
33
- ._tiptapEditor.state.doc.resolve(resolvedContentEndPos.before(resolvedContentEndPos.depth + 1))
34
- .end())));
35
- }
36
- }
37
- describe("Test moveSelectedBlockAndSelection", () => {
38
- it("Text selection", () => {
39
- getEditor().setTextCursorPosition("paragraph-1");
40
- makeSelectionSpanContent("text");
41
- moveSelectedBlockAndSelection(getEditor(), "paragraph-0", "before");
42
- const selection = getEditor()._tiptapEditor.state.selection;
43
- getEditor().setTextCursorPosition("paragraph-1");
44
- makeSelectionSpanContent("text");
45
- expect(selection.eq(getEditor()._tiptapEditor.state.selection)).toBeTruthy();
46
- });
47
- it("Node selection", () => {
48
- getEditor().setTextCursorPosition("image-0");
49
- makeSelectionSpanContent("node");
50
- moveSelectedBlockAndSelection(getEditor(), "paragraph-0", "before");
51
- const selection = getEditor()._tiptapEditor.state.selection;
52
- getEditor().setTextCursorPosition("image-0");
53
- makeSelectionSpanContent("node");
54
- expect(selection.eq(getEditor()._tiptapEditor.state.selection)).toBeTruthy();
55
- });
56
- it("Cell selection", () => {
57
- getEditor().setTextCursorPosition("table-0");
58
- makeSelectionSpanContent("cell");
59
- moveSelectedBlockAndSelection(getEditor(), "paragraph-0", "before");
60
- const selection = getEditor()._tiptapEditor.state.selection;
61
- getEditor().setTextCursorPosition("table-0");
62
- makeSelectionSpanContent("cell");
63
- expect(selection.eq(getEditor()._tiptapEditor.state.selection)).toBeTruthy();
64
- });
65
- });
66
- describe("Test moveBlockUp", () => {
67
- it("Basic", () => {
68
- getEditor().setTextCursorPosition("paragraph-1");
69
- moveBlockUp(getEditor());
70
- expect(getEditor().document).toMatchSnapshot();
71
- });
72
- it("Into children", () => {
73
- getEditor().setTextCursorPosition("paragraph-2");
74
- moveBlockUp(getEditor());
75
- expect(getEditor().document).toMatchSnapshot();
76
- });
77
- it("Out of children", () => {
78
- getEditor().setTextCursorPosition("nested-paragraph-1");
79
- moveBlockUp(getEditor());
80
- expect(getEditor().document).toMatchSnapshot();
81
- });
82
- it("First block", () => {
83
- getEditor().setTextCursorPosition("paragraph-0");
84
- moveBlockUp(getEditor());
85
- expect(getEditor().document).toMatchSnapshot();
86
- });
87
- });
88
- describe("Test moveBlockDown", () => {
89
- it("Basic", () => {
90
- getEditor().setTextCursorPosition("paragraph-0");
91
- moveBlockDown(getEditor());
92
- expect(getEditor().document).toMatchSnapshot();
93
- });
94
- it("Into children", () => {
95
- getEditor().setTextCursorPosition("paragraph-1");
96
- moveBlockDown(getEditor());
97
- expect(getEditor().document).toMatchSnapshot();
98
- });
99
- it("Out of children", () => {
100
- getEditor().setTextCursorPosition("nested-paragraph-1");
101
- moveBlockDown(getEditor());
102
- expect(getEditor().document).toMatchSnapshot();
103
- });
104
- it("Last block", () => {
105
- getEditor().setTextCursorPosition("trailing-paragraph");
106
- moveBlockDown(getEditor());
107
- expect(getEditor().document).toMatchSnapshot();
108
- });
109
- });
110
- //# sourceMappingURL=moveBlock.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"moveBlock.test.js","sourceRoot":"","sources":["../../../../../../src/api/blockManipulation/commands/moveBlock/moveBlock.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM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