@blocknote/core 0.34.0 → 0.36.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 (59) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +7 -25
  3. package/dist/blocknote.cjs +8 -8
  4. package/dist/blocknote.cjs.map +1 -1
  5. package/dist/blocknote.js +1164 -1082
  6. package/dist/blocknote.js.map +1 -1
  7. package/dist/{en-Dx9fwHD4.js → en-CvDoFvhc.js} +4 -1
  8. package/dist/en-CvDoFvhc.js.map +1 -0
  9. package/dist/{en-CsgPjHa4.cjs → en-ub2yVBX0.cjs} +2 -2
  10. package/dist/en-ub2yVBX0.cjs.map +1 -0
  11. package/dist/locales.cjs +1 -1
  12. package/dist/locales.cjs.map +1 -1
  13. package/dist/locales.js +62 -2
  14. package/dist/locales.js.map +1 -1
  15. package/dist/style.css +1 -1
  16. package/dist/tsconfig.tsbuildinfo +1 -1
  17. package/dist/webpack-stats.json +1 -1
  18. package/package.json +17 -17
  19. package/src/api/blockManipulation/commands/updateBlock/updateBlock.ts +132 -4
  20. package/src/api/clipboard/fromClipboard/handleFileInsertion.ts +12 -1
  21. package/src/api/clipboard/toClipboard/copyExtension.ts +2 -0
  22. package/src/api/nodeUtil.ts +5 -1
  23. package/src/blocks/ImageBlockContent/parseImageElement.ts +2 -1
  24. package/src/blocks/QuoteBlockContent/QuoteBlockContent.ts +23 -1
  25. package/src/blocks/ToggleWrapper/createToggleWrapper.ts +2 -1
  26. package/src/editor/BlockNoteEditor.ts +79 -29
  27. package/src/editor/editor.css +8 -17
  28. package/src/extensions/Collaboration/ForkYDocPlugin.ts +1 -1
  29. package/src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts +57 -1
  30. package/src/extensions/SideMenu/SideMenuPlugin.ts +12 -23
  31. package/src/i18n/locales/ar.ts +3 -0
  32. package/src/i18n/locales/de.ts +4 -0
  33. package/src/i18n/locales/en.ts +3 -0
  34. package/src/i18n/locales/es.ts +3 -0
  35. package/src/i18n/locales/fr.ts +3 -0
  36. package/src/i18n/locales/he.ts +3 -0
  37. package/src/i18n/locales/hr.ts +3 -0
  38. package/src/i18n/locales/is.ts +3 -0
  39. package/src/i18n/locales/it.ts +3 -0
  40. package/src/i18n/locales/ja.ts +3 -0
  41. package/src/i18n/locales/ko.ts +4 -1
  42. package/src/i18n/locales/nl.ts +3 -0
  43. package/src/i18n/locales/no.ts +3 -0
  44. package/src/i18n/locales/pl.ts +4 -0
  45. package/src/i18n/locales/pt.ts +3 -0
  46. package/src/i18n/locales/ru.ts +3 -0
  47. package/src/i18n/locales/sk.ts +3 -0
  48. package/src/i18n/locales/uk.ts +3 -0
  49. package/src/i18n/locales/vi.ts +3 -0
  50. package/src/i18n/locales/zh-tw.ts +3 -0
  51. package/src/i18n/locales/zh.ts +3 -0
  52. package/types/src/api/blockManipulation/commands/updateBlock/updateBlock.d.ts +16 -3
  53. package/types/src/api/nodeUtil.d.ts +5 -1
  54. package/types/src/blocks/ImageBlockContent/parseImageElement.d.ts +1 -0
  55. package/types/src/editor/BlockNoteEditor.d.ts +79 -29
  56. package/types/src/i18n/locales/en.d.ts +3 -0
  57. package/types/src/i18n/locales/sk.d.ts +3 -0
  58. package/dist/en-CsgPjHa4.cjs.map +0 -1
  59. package/dist/en-Dx9fwHD4.js.map +0 -1
@@ -1 +1 @@
1
- {"builtAt":1752763345306,"assets":[{"name":"blocknote.cjs","size":198258},{"name":"comments.cjs","size":11826},{"name":"locales.cjs","size":157807},{"name":"en-CsgPjHa4.cjs","size":6613},{"name":"en-CsgPjHa4.cjs.map","size":14979},{"name":"comments.cjs.map","size":47628},{"name":"locales.cjs.map","size":326018},{"name":"blocknote.cjs.map","size":945164}],"chunks":[{"id":"a1ee98a","entry":true,"initial":true,"files":["blocknote.cjs"],"names":["blocknote"]},{"id":"1627b02","entry":true,"initial":true,"files":["comments.cjs"],"names":["comments"]},{"id":"9eaffe2","entry":true,"initial":true,"files":["locales.cjs"],"names":["locales"]},{"id":"a1e239a","entry":false,"initial":true,"files":["en-CsgPjHa4.cjs"],"names":["en"]}],"modules":[{"name":"./src/extensions/UniqueID/UniqueID.ts","size":9054,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/types.ts","size":302,"chunks":["a1ee98a"]},{"name":"./src/util/table.ts","size":1212,"chunks":["a1ee98a"]},{"name":"./src/util/typescript.ts","size":331,"chunks":["a1ee98a"]},{"name":"./src/util/browser.ts","size":643,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlockHelpers.ts","size":2080,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultProps.ts","size":269,"chunks":["a1ee98a"]},{"name":"./src/util/string.ts","size":299,"chunks":["a1ee98a"]},{"name":"./src/schema/blocks/internal.ts","size":4072,"chunks":["a1ee98a"]},{"name":"./src/schema/blocks/createSpec.ts","size":3647,"chunks":["a1ee98a"]},{"name":"./src/api/getBlockInfoFromPos.ts","size":3797,"chunks":["a1ee98a"]},{"name":"./src/api/pmUtil.ts","size":651,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/nodeToBlock.ts","size":13005,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/internal.ts","size":1398,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/createSpec.ts","size":2559,"chunks":["a1ee98a"]},{"name":"./src/schema/styles/internal.ts","size":1162,"chunks":["a1ee98a"]},{"name":"./src/schema/styles/createSpec.ts","size":1263,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/tables/tables.ts","size":10346,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/blockToNode.ts","size":7193,"chunks":["a1ee98a"]},{"name":"./src/api/nodeUtil.ts","size":3625,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/insertBlocks/insertBlocks.ts","size":785,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.ts","size":1876,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/updateBlock/updateBlock.ts","size":5637,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/util/serializeBlocksExternalHTML.ts","size":5025,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/externalHTMLExporter.ts","size":886,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/util/serializeBlocksInternalHTML.ts","size":3099,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/internalHTMLSerializer.ts","size":288,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/parse/parseFigureElement.ts","size":342,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createAddFileButton.ts","size":1710,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createFileNameWithIcon.ts","size":753,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createFileBlockWrapper.ts","size":1428,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/toExternalHTML/createFigureWithCaption.ts","size":307,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/toExternalHTML/createLinkWithCaption.ts","size":294,"chunks":["a1ee98a"]},{"name":"./src/blocks/AudioBlockContent/parseAudioElement.ts","size":108,"chunks":["a1ee98a"]},{"name":"./src/blocks/AudioBlockContent/AudioBlockContent.ts","size":3219,"chunks":["a1ee98a"]},{"name":"./src/blocks/CodeBlockContent/CodeBlockContent.ts","size":9248,"chunks":["a1ee98a"]},{"name":"./src/extensions/BackgroundColor/BackgroundColorMark.ts","size":946,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextColor/TextColorMark.ts","size":866,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/parse/parseEmbedElement.ts","size":108,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/FileBlockContent.ts","size":1524,"chunks":["a1ee98a"]},{"name":"./src/blocks/ToggleWrapper/createToggleWrapper.ts","size":5193,"chunks":["a1ee98a"]},{"name":"./src/blocks/HeadingBlockContent/HeadingBlockContent.ts","size":3467,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createResizableFileBlockWrapper.ts","size":4836,"chunks":["a1ee98a"]},{"name":"./src/blocks/ImageBlockContent/parseImageElement.ts","size":175,"chunks":["a1ee98a"]},{"name":"./src/blocks/ImageBlockContent/ImageBlockContent.ts","size":3374,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/splitBlock/splitBlock.ts","size":868,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/ListItemKeyboardShortcuts.ts","size":1495,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/ToggleListItemBlockContent/ToggleListItemBlockContent.ts","size":2228,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/getListItemContent.ts","size":1425,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.ts","size":3162,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/CheckListItemBlockContent/CheckListItemBlockContent.ts","size":7286,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListIndexingPlugin.ts","size":2207,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.ts","size":4098,"chunks":["a1ee98a"]},{"name":"./src/blocks/ParagraphBlockContent/ParagraphBlockContent.ts","size":1520,"chunks":["a1ee98a"]},{"name":"./src/blocks/QuoteBlockContent/QuoteBlockContent.ts","size":1953,"chunks":["a1ee98a"]},{"name":"./src/blocks/TableBlockContent/TableExtension.ts","size":2297,"chunks":["a1ee98a"]},{"name":"./src/blocks/TableBlockContent/TableBlockContent.ts","size":6183,"chunks":["a1ee98a"]},{"name":"./src/blocks/VideoBlockContent/parseVideoElement.ts","size":175,"chunks":["a1ee98a"]},{"name":"./src/blocks/VideoBlockContent/VideoBlockContent.ts","size":3293,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlocks.ts","size":1197,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlockTypeGuards.ts","size":2098,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/uploadToTmpFilesDotOrg_DEV_ONLY.ts","size":316,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts","size":8656,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteSchema.ts","size":1044,"chunks":["a1ee98a"]},{"name":"./src/blocks/PageBreakBlockContent/PageBreakBlockContent.ts","size":854,"chunks":["a1ee98a"]},{"name":"./src/blocks/PageBreakBlockContent/schema.ts","size":350,"chunks":["a1ee98a"]},{"name":"./src/blocks/PageBreakBlockContent/getPageBreakSlashMenuItems.ts","size":536,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/moveBlocks/moveBlocks.ts","size":5642,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/nestBlock/nestBlock.ts","size":2035,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/getBlock/getBlock.ts","size":1895,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/insertContentAt.ts","size":1049,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/selections/selection.ts","size":5093,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/selections/textCursorPosition.ts","size":2430,"chunks":["a1ee98a"]},{"name":"./src/util/esmDependencies.ts","size":820,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/removeUnderlinesRehypePlugin.ts","size":752,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/util/addSpacesToCheckboxesRehypePlugin.ts","size":969,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/markdownExporter.ts","size":837,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/html/util/nestedLists.ts","size":2174,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/html/parseHTML.ts","size":429,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/markdown/parseMarkdown.ts","size":1129,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/acceptedMIMETypes.ts","size":134,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/handleFileInsertion.ts","size":3928,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/fileDropExtension.ts","size":884,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/markdown/detectMarkdown.ts","size":1140,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/handleVSCodePaste.ts","size":661,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/pasteExtension.ts","size":2412,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/fragmentToBlocks.ts","size":629,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/toClipboard/copyExtension.ts","size":5159,"chunks":["a1ee98a"]},{"name":"./src/extensions/BackgroundColor/BackgroundColorExtension.ts","size":819,"chunks":["a1ee98a"]},{"name":"./src/util/EventEmitter.ts","size":744,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteExtension.ts","size":345,"chunks":["a1ee98a"]},{"name":"./src/extensions/BlockChange/BlockChangePlugin.ts","size":988,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/CursorPlugin.ts","size":4699,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/SyncPlugin.ts","size":244,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/UndoPlugin.ts","size":265,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/CommentMark.ts","size":1428,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/userstore/UserStore.ts","size":1354,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/CommentsPlugin.ts","size":7815,"chunks":["a1ee98a"]},{"name":"./src/extensions/FilePanel/FilePanelPlugin.ts","size":4135,"chunks":["a1ee98a"]},{"name":"./src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts","size":6101,"chunks":["a1ee98a"]},{"name":"./src/extensions/HardBreak/HardBreak.ts","size":376,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/mergeBlocks/mergeBlocks.ts","size":3228,"chunks":["a1ee98a"]},{"name":"./src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts","size":18379,"chunks":["a1ee98a"]},{"name":"./src/extensions/LinkToolbar/LinkToolbarPlugin.ts","size":7699,"chunks":["a1ee98a"]},{"name":"./src/extensions/LinkToolbar/protocols.ts","size":172,"chunks":["a1ee98a"]},{"name":"./src/extensions/NodeSelectionKeyboard/NodeSelectionKeyboardPlugin.ts","size":1367,"chunks":["a1ee98a"]},{"name":"./src/extensions/Placeholder/PlaceholderPlugin.ts","size":3895,"chunks":["a1ee98a"]},{"name":"./src/extensions/PreviousBlockType/PreviousBlockTypePlugin.ts","size":5232,"chunks":["a1ee98a"]},{"name":"./src/extensions/ShowSelection/ShowSelectionPlugin.ts","size":1043,"chunks":["a1ee98a"]},{"name":"./src/extensions/getDraggableBlockFromElement.ts","size":404,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/MultipleNodeSelection.ts","size":1700,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/dragging.ts","size":4718,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/SideMenuPlugin.ts","size":16787,"chunks":["a1ee98a"]},{"name":"./src/api/positionMapping.ts","size":1652,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/SuggestionPlugin.ts","size":9360,"chunks":["a1ee98a"]},{"name":"./src/extensions/Suggestions/SuggestionMarks.ts","size":4452,"chunks":["a1ee98a"]},{"name":"./src/extensions/TableHandles/TableHandlesPlugin.ts","size":27335,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextAlignment/TextAlignmentExtension.ts","size":976,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextColor/TextColorExtension.ts","size":753,"chunks":["a1ee98a"]},{"name":"./src/extensions/TrailingNode/TrailingNodeExtension.ts","size":1563,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/BlockContainer.ts","size":2170,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/BlockGroup.ts","size":1146,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/Doc.ts","size":134,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/ForkYDocPlugin.ts","size":4306,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteExtensions.ts","size":5435,"chunks":["a1ee98a"]},{"name":"./src/editor/transformPasted.ts","size":2604,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteTipTapEditor.ts","size":5736,"chunks":["a1ee98a"]},{"name":"./src/style.css","size":0,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteEditor.ts","size":37799,"chunks":["a1ee98a"]},{"name":"./src/editor/defaultColors.ts","size":1193,"chunks":["a1ee98a"]},{"name":"./src/exporter/Exporter.ts","size":1101,"chunks":["a1ee98a"]},{"name":"./src/exporter/mapping.ts","size":197,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/getDefaultEmojiPickerItems.ts","size":1204,"chunks":["a1ee98a"]},{"name":"./src/util/combineByGroup.ts","size":550,"chunks":["a1ee98a"]},{"name":"./src/index.ts","size":0,"chunks":["a1ee98a"]},{"name":"./src/comments/threadstore/ThreadStoreAuth.ts","size":25,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/DefaultThreadStoreAuth.ts","size":2014,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/ThreadStore.ts","size":77,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/TipTapThreadStore.ts","size":5321,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/yjsHelpers.ts","size":3002,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/YjsThreadStoreBase.ts","size":790,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/RESTYjsThreadStore.ts","size":2069,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/YjsThreadStore.ts","size":7267,"chunks":["1627b02"]},{"name":"./src/comments/index.ts","size":0,"chunks":["1627b02"]},{"name":"./src/i18n/locales/ar.ts","size":9382,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/de.ts","size":10527,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/es.ts","size":10087,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/fr.ts","size":11038,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/he.ts","size":9115,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/hr.ts","size":9907,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/is.ts","size":10089,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/it.ts","size":10512,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ja.ts","size":8965,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ko.ts","size":8454,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/nl.ts","size":10016,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/no.ts","size":10196,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/pl.ts","size":9721,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/pt.ts","size":9888,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ru.ts","size":11054,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/sk.ts","size":9773,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/uk.ts","size":10721,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/vi.ts","size":9777,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/zh.ts","size":8448,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/zh-tw.ts","size":8488,"chunks":["9eaffe2"]},{"name":"./src/i18n/index.ts","size":0,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/en.ts","size":9418,"chunks":["a1e239a"]}]}
1
+ {"builtAt":1756129017162,"assets":[{"name":"blocknote.cjs","size":200464},{"name":"comments.cjs","size":11826},{"name":"locales.cjs","size":159619},{"name":"en-ub2yVBX0.cjs","size":6684},{"name":"en-ub2yVBX0.cjs.map","size":15098},{"name":"comments.cjs.map","size":47628},{"name":"locales.cjs.map","size":328798},{"name":"blocknote.cjs.map","size":957749}],"chunks":[{"id":"a1ee98a","entry":true,"initial":true,"files":["blocknote.cjs"],"names":["blocknote"]},{"id":"1627b02","entry":true,"initial":true,"files":["comments.cjs"],"names":["comments"]},{"id":"9eaffe2","entry":true,"initial":true,"files":["locales.cjs"],"names":["locales"]},{"id":"a1e239a","entry":false,"initial":true,"files":["en-ub2yVBX0.cjs"],"names":["en"]}],"modules":[{"name":"./src/extensions/UniqueID/UniqueID.ts","size":9054,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/types.ts","size":302,"chunks":["a1ee98a"]},{"name":"./src/util/table.ts","size":1212,"chunks":["a1ee98a"]},{"name":"./src/util/typescript.ts","size":331,"chunks":["a1ee98a"]},{"name":"./src/util/browser.ts","size":643,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlockHelpers.ts","size":2080,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultProps.ts","size":269,"chunks":["a1ee98a"]},{"name":"./src/util/string.ts","size":299,"chunks":["a1ee98a"]},{"name":"./src/schema/blocks/internal.ts","size":4072,"chunks":["a1ee98a"]},{"name":"./src/schema/blocks/createSpec.ts","size":3647,"chunks":["a1ee98a"]},{"name":"./src/api/getBlockInfoFromPos.ts","size":3797,"chunks":["a1ee98a"]},{"name":"./src/api/pmUtil.ts","size":651,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/nodeToBlock.ts","size":13005,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/internal.ts","size":1398,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/createSpec.ts","size":2559,"chunks":["a1ee98a"]},{"name":"./src/schema/styles/internal.ts","size":1162,"chunks":["a1ee98a"]},{"name":"./src/schema/styles/createSpec.ts","size":1263,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/tables/tables.ts","size":10346,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/blockToNode.ts","size":7193,"chunks":["a1ee98a"]},{"name":"./src/api/nodeUtil.ts","size":3625,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/insertBlocks/insertBlocks.ts","size":785,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.ts","size":1876,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/updateBlock/updateBlock.ts","size":8371,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/util/serializeBlocksExternalHTML.ts","size":5025,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/externalHTMLExporter.ts","size":886,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/util/serializeBlocksInternalHTML.ts","size":3099,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/internalHTMLSerializer.ts","size":288,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/parse/parseFigureElement.ts","size":342,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createAddFileButton.ts","size":1710,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createFileNameWithIcon.ts","size":753,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createFileBlockWrapper.ts","size":1428,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/toExternalHTML/createFigureWithCaption.ts","size":307,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/toExternalHTML/createLinkWithCaption.ts","size":294,"chunks":["a1ee98a"]},{"name":"./src/blocks/AudioBlockContent/parseAudioElement.ts","size":108,"chunks":["a1ee98a"]},{"name":"./src/blocks/AudioBlockContent/AudioBlockContent.ts","size":3219,"chunks":["a1ee98a"]},{"name":"./src/blocks/CodeBlockContent/CodeBlockContent.ts","size":9248,"chunks":["a1ee98a"]},{"name":"./src/extensions/BackgroundColor/BackgroundColorMark.ts","size":946,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextColor/TextColorMark.ts","size":866,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/parse/parseEmbedElement.ts","size":108,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/FileBlockContent.ts","size":1524,"chunks":["a1ee98a"]},{"name":"./src/blocks/ToggleWrapper/createToggleWrapper.ts","size":5204,"chunks":["a1ee98a"]},{"name":"./src/blocks/HeadingBlockContent/HeadingBlockContent.ts","size":3467,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createResizableFileBlockWrapper.ts","size":4836,"chunks":["a1ee98a"]},{"name":"./src/blocks/ImageBlockContent/parseImageElement.ts","size":224,"chunks":["a1ee98a"]},{"name":"./src/blocks/ImageBlockContent/ImageBlockContent.ts","size":3374,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/splitBlock/splitBlock.ts","size":868,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/ListItemKeyboardShortcuts.ts","size":1495,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/ToggleListItemBlockContent/ToggleListItemBlockContent.ts","size":2228,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/getListItemContent.ts","size":1425,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.ts","size":3162,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/CheckListItemBlockContent/CheckListItemBlockContent.ts","size":7286,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListIndexingPlugin.ts","size":2207,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.ts","size":4098,"chunks":["a1ee98a"]},{"name":"./src/blocks/ParagraphBlockContent/ParagraphBlockContent.ts","size":1520,"chunks":["a1ee98a"]},{"name":"./src/blocks/QuoteBlockContent/QuoteBlockContent.ts","size":2338,"chunks":["a1ee98a"]},{"name":"./src/blocks/TableBlockContent/TableExtension.ts","size":2297,"chunks":["a1ee98a"]},{"name":"./src/blocks/TableBlockContent/TableBlockContent.ts","size":6183,"chunks":["a1ee98a"]},{"name":"./src/blocks/VideoBlockContent/parseVideoElement.ts","size":175,"chunks":["a1ee98a"]},{"name":"./src/blocks/VideoBlockContent/VideoBlockContent.ts","size":3293,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlocks.ts","size":1197,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlockTypeGuards.ts","size":2098,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/uploadToTmpFilesDotOrg_DEV_ONLY.ts","size":316,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts","size":8656,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteSchema.ts","size":1044,"chunks":["a1ee98a"]},{"name":"./src/blocks/PageBreakBlockContent/PageBreakBlockContent.ts","size":854,"chunks":["a1ee98a"]},{"name":"./src/blocks/PageBreakBlockContent/schema.ts","size":350,"chunks":["a1ee98a"]},{"name":"./src/blocks/PageBreakBlockContent/getPageBreakSlashMenuItems.ts","size":536,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/moveBlocks/moveBlocks.ts","size":5642,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/nestBlock/nestBlock.ts","size":2035,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/getBlock/getBlock.ts","size":1895,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/insertContentAt.ts","size":1049,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/selections/selection.ts","size":5093,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/selections/textCursorPosition.ts","size":2430,"chunks":["a1ee98a"]},{"name":"./src/util/esmDependencies.ts","size":820,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/removeUnderlinesRehypePlugin.ts","size":752,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/util/addSpacesToCheckboxesRehypePlugin.ts","size":969,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/markdownExporter.ts","size":837,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/html/util/nestedLists.ts","size":2174,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/html/parseHTML.ts","size":429,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/markdown/parseMarkdown.ts","size":1129,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/acceptedMIMETypes.ts","size":134,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/handleFileInsertion.ts","size":4255,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/fileDropExtension.ts","size":884,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/markdown/detectMarkdown.ts","size":1140,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/handleVSCodePaste.ts","size":661,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/pasteExtension.ts","size":2412,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/fragmentToBlocks.ts","size":629,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/toClipboard/copyExtension.ts","size":5192,"chunks":["a1ee98a"]},{"name":"./src/extensions/BackgroundColor/BackgroundColorExtension.ts","size":819,"chunks":["a1ee98a"]},{"name":"./src/util/EventEmitter.ts","size":744,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteExtension.ts","size":345,"chunks":["a1ee98a"]},{"name":"./src/extensions/BlockChange/BlockChangePlugin.ts","size":988,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/CursorPlugin.ts","size":4699,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/SyncPlugin.ts","size":244,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/UndoPlugin.ts","size":265,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/CommentMark.ts","size":1428,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/userstore/UserStore.ts","size":1354,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/CommentsPlugin.ts","size":7815,"chunks":["a1ee98a"]},{"name":"./src/extensions/FilePanel/FilePanelPlugin.ts","size":4135,"chunks":["a1ee98a"]},{"name":"./src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts","size":7075,"chunks":["a1ee98a"]},{"name":"./src/extensions/HardBreak/HardBreak.ts","size":376,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/mergeBlocks/mergeBlocks.ts","size":3228,"chunks":["a1ee98a"]},{"name":"./src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts","size":18379,"chunks":["a1ee98a"]},{"name":"./src/extensions/LinkToolbar/LinkToolbarPlugin.ts","size":7699,"chunks":["a1ee98a"]},{"name":"./src/extensions/LinkToolbar/protocols.ts","size":172,"chunks":["a1ee98a"]},{"name":"./src/extensions/NodeSelectionKeyboard/NodeSelectionKeyboardPlugin.ts","size":1367,"chunks":["a1ee98a"]},{"name":"./src/extensions/Placeholder/PlaceholderPlugin.ts","size":3895,"chunks":["a1ee98a"]},{"name":"./src/extensions/PreviousBlockType/PreviousBlockTypePlugin.ts","size":5232,"chunks":["a1ee98a"]},{"name":"./src/extensions/ShowSelection/ShowSelectionPlugin.ts","size":1043,"chunks":["a1ee98a"]},{"name":"./src/extensions/getDraggableBlockFromElement.ts","size":404,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/MultipleNodeSelection.ts","size":1700,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/dragging.ts","size":4718,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/SideMenuPlugin.ts","size":16723,"chunks":["a1ee98a"]},{"name":"./src/api/positionMapping.ts","size":1652,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/SuggestionPlugin.ts","size":9360,"chunks":["a1ee98a"]},{"name":"./src/extensions/Suggestions/SuggestionMarks.ts","size":4452,"chunks":["a1ee98a"]},{"name":"./src/extensions/TableHandles/TableHandlesPlugin.ts","size":27335,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextAlignment/TextAlignmentExtension.ts","size":976,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextColor/TextColorExtension.ts","size":753,"chunks":["a1ee98a"]},{"name":"./src/extensions/TrailingNode/TrailingNodeExtension.ts","size":1563,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/BlockContainer.ts","size":2170,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/BlockGroup.ts","size":1146,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/Doc.ts","size":134,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/ForkYDocPlugin.ts","size":4307,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteExtensions.ts","size":5435,"chunks":["a1ee98a"]},{"name":"./src/editor/transformPasted.ts","size":2604,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteTipTapEditor.ts","size":5736,"chunks":["a1ee98a"]},{"name":"./src/style.css","size":0,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteEditor.ts","size":37801,"chunks":["a1ee98a"]},{"name":"./src/editor/defaultColors.ts","size":1193,"chunks":["a1ee98a"]},{"name":"./src/exporter/Exporter.ts","size":1101,"chunks":["a1ee98a"]},{"name":"./src/exporter/mapping.ts","size":197,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/getDefaultEmojiPickerItems.ts","size":1204,"chunks":["a1ee98a"]},{"name":"./src/util/combineByGroup.ts","size":550,"chunks":["a1ee98a"]},{"name":"./src/index.ts","size":0,"chunks":["a1ee98a"]},{"name":"./src/comments/threadstore/ThreadStoreAuth.ts","size":25,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/DefaultThreadStoreAuth.ts","size":2014,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/ThreadStore.ts","size":77,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/TipTapThreadStore.ts","size":5321,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/yjsHelpers.ts","size":3002,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/YjsThreadStoreBase.ts","size":790,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/RESTYjsThreadStore.ts","size":2069,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/YjsThreadStore.ts","size":7267,"chunks":["1627b02"]},{"name":"./src/comments/index.ts","size":0,"chunks":["1627b02"]},{"name":"./src/i18n/locales/ar.ts","size":9460,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/de.ts","size":10643,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/es.ts","size":10181,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/fr.ts","size":11129,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/he.ts","size":9193,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/hr.ts","size":10002,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/is.ts","size":10183,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/it.ts","size":10607,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ja.ts","size":9036,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ko.ts","size":8532,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/nl.ts","size":10113,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/no.ts","size":10289,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/pl.ts","size":9828,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/pt.ts","size":9982,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ru.ts","size":11154,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/sk.ts","size":9870,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/uk.ts","size":10817,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/vi.ts","size":9858,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/zh.ts","size":8510,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/zh-tw.ts","size":8550,"chunks":["9eaffe2"]},{"name":"./src/i18n/index.ts","size":0,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/en.ts","size":9502,"chunks":["a1e239a"]}]}
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "directory": "packages/core"
12
12
  },
13
13
  "license": "MPL-2.0",
14
- "version": "0.34.0",
14
+ "version": "0.36.0",
15
15
  "files": [
16
16
  "dist",
17
17
  "types",
@@ -66,21 +66,21 @@
66
66
  "dependencies": {
67
67
  "@emoji-mart/data": "^1.2.1",
68
68
  "@shikijs/types": "3.2.1",
69
- "@tiptap/core": "^2.12.0",
70
- "@tiptap/extension-bold": "^2.11.5",
71
- "@tiptap/extension-code": "^2.11.5",
72
- "@tiptap/extension-gapcursor": "^2.11.5",
73
- "@tiptap/extension-history": "^2.11.5",
74
- "@tiptap/extension-horizontal-rule": "^2.11.5",
75
- "@tiptap/extension-italic": "^2.11.5",
76
- "@tiptap/extension-link": "^2.11.5",
77
- "@tiptap/extension-paragraph": "^2.11.5",
78
- "@tiptap/extension-strike": "^2.11.5",
79
- "@tiptap/extension-table-cell": "^2.11.5",
80
- "@tiptap/extension-table-header": "^2.11.5",
81
- "@tiptap/extension-text": "^2.11.5",
82
- "@tiptap/extension-underline": "^2.11.5",
83
- "@tiptap/pm": "^2.12.0",
69
+ "@tiptap/core": "^2.26.1",
70
+ "@tiptap/extension-bold": "^2.26.1",
71
+ "@tiptap/extension-code": "^2.26.1",
72
+ "@tiptap/extension-gapcursor": "^2.26.1",
73
+ "@tiptap/extension-history": "^2.26.1",
74
+ "@tiptap/extension-horizontal-rule": "^2.26.1",
75
+ "@tiptap/extension-italic": "^2.26.1",
76
+ "@tiptap/extension-link": "^2.26.1",
77
+ "@tiptap/extension-paragraph": "^2.26.1",
78
+ "@tiptap/extension-strike": "^2.26.1",
79
+ "@tiptap/extension-table-cell": "^2.26.1",
80
+ "@tiptap/extension-table-header": "^2.26.1",
81
+ "@tiptap/extension-text": "^2.26.1",
82
+ "@tiptap/extension-underline": "^2.26.1",
83
+ "@tiptap/pm": "^2.26.1",
84
84
  "emoji-mart": "^5.6.0",
85
85
  "hast-util-from-dom": "^5.0.1",
86
86
  "prosemirror-dropcursor": "^1.8.2",
@@ -102,7 +102,7 @@
102
102
  "uuid": "^8.3.2",
103
103
  "y-prosemirror": "^1.3.4",
104
104
  "y-protocols": "^1.0.6",
105
- "yjs": "^13.6.15"
105
+ "yjs": "^13.6.27"
106
106
  },
107
107
  "devDependencies": {
108
108
  "@types/emoji-mart": "^3.0.14",
@@ -4,9 +4,10 @@ import {
4
4
  type Node as PMNode,
5
5
  Slice,
6
6
  } from "prosemirror-model";
7
- import type { Transaction } from "prosemirror-state";
8
-
7
+ import { TextSelection, Transaction } from "prosemirror-state";
8
+ import { TableMap } from "prosemirror-tables";
9
9
  import { ReplaceStep, Transform } from "prosemirror-transform";
10
+
10
11
  import type { Block, PartialBlock } from "../../../../blocks/defaultBlocks.js";
11
12
  import type {
12
13
  BlockIdentifier,
@@ -56,7 +57,7 @@ export function updateBlockTr<
56
57
  I extends InlineContentSchema,
57
58
  S extends StyleSchema,
58
59
  >(
59
- tr: Transform,
60
+ tr: Transform | Transaction,
60
61
  posBeforeBlock: number,
61
62
  block: PartialBlock<BSchema, I, S>,
62
63
  replaceFromPos?: number,
@@ -64,6 +65,11 @@ export function updateBlockTr<
64
65
  ) {
65
66
  const blockInfo = getBlockInfoFromResolvedPos(tr.doc.resolve(posBeforeBlock));
66
67
 
68
+ let cellAnchor: CellAnchor | null = null;
69
+ if (blockInfo.blockNoteType === "table") {
70
+ cellAnchor = captureCellAnchor(tr);
71
+ }
72
+
67
73
  const pmSchema = getPmSchema(tr);
68
74
 
69
75
  if (
@@ -143,6 +149,10 @@ export function updateBlockTr<
143
149
  ...blockInfo.bnBlock.node.attrs,
144
150
  ...block.props,
145
151
  });
152
+
153
+ if (cellAnchor) {
154
+ restoreCellAnchor(tr, blockInfo, cellAnchor);
155
+ }
146
156
  }
147
157
 
148
158
  function updateBlockContentNode<
@@ -301,7 +311,7 @@ export function updateBlock<
301
311
  I extends InlineContentSchema = any,
302
312
  S extends StyleSchema = any,
303
313
  >(
304
- tr: Transaction,
314
+ tr: Transform,
305
315
  blockToUpdate: BlockIdentifier,
306
316
  update: PartialBlock<BSchema, I, S>,
307
317
  replaceFromPos?: number,
@@ -329,3 +339,121 @@ export function updateBlock<
329
339
  const pmSchema = getPmSchema(tr);
330
340
  return nodeToBlock(blockContainerNode, pmSchema);
331
341
  }
342
+
343
+ type CellAnchor = { row: number; col: number; offset: number };
344
+
345
+ /**
346
+ * Captures the cell anchor from the current selection.
347
+ * @param tr - The transaction to capture the cell anchor from.
348
+ *
349
+ * @returns The cell anchor, or null if no cell is selected.
350
+ */
351
+ export function captureCellAnchor(tr: Transform): CellAnchor | null {
352
+ const sel = "selection" in tr ? tr.selection : null;
353
+ if (!(sel instanceof TextSelection)) {
354
+ return null;
355
+ }
356
+
357
+ const $head = tr.doc.resolve(sel.head);
358
+ // Find enclosing cell and table
359
+ let cellDepth = -1;
360
+ let tableDepth = -1;
361
+ for (let d = $head.depth; d >= 0; d--) {
362
+ const name = $head.node(d).type.name;
363
+ if (cellDepth < 0 && (name === "tableCell" || name === "tableHeader")) {
364
+ cellDepth = d;
365
+ }
366
+ if (name === "table") {
367
+ tableDepth = d;
368
+ break;
369
+ }
370
+ }
371
+ if (cellDepth < 0 || tableDepth < 0) {
372
+ return null;
373
+ }
374
+
375
+ // Absolute positions (before the cell)
376
+ const cellPos = $head.before(cellDepth);
377
+ const tablePos = $head.before(tableDepth);
378
+ const table = tr.doc.nodeAt(tablePos);
379
+ if (!table || table.type.name !== "table") {
380
+ return null;
381
+ }
382
+
383
+ // Visual grid position via TableMap (handles spans)
384
+ const map = TableMap.get(table);
385
+ const rel = cellPos - (tablePos + 1); // relative to inside table
386
+ const idx = map.map.indexOf(rel);
387
+ if (idx < 0) {
388
+ return null;
389
+ }
390
+
391
+ const row = Math.floor(idx / map.width);
392
+ const col = idx % map.width;
393
+
394
+ // Caret offset relative to the start of paragraph text
395
+ const paraPos = cellPos + 1; // pos BEFORE tableParagraph
396
+ const textStart = paraPos + 1; // start of paragraph text
397
+ const offset = Math.max(0, sel.head - textStart);
398
+
399
+ return { row, col, offset };
400
+ }
401
+
402
+ function restoreCellAnchor(
403
+ tr: Transform | Transaction,
404
+ blockInfo: BlockInfo,
405
+ a: CellAnchor,
406
+ ): boolean {
407
+ if (blockInfo.blockNoteType !== "table") {
408
+ return false;
409
+ }
410
+
411
+ // 1) Resolve the table node in the current document
412
+ let tablePos = -1;
413
+
414
+ if (blockInfo.isBlockContainer) {
415
+ // Prefer the blockContent position when available (points directly at the PM table node)
416
+ tablePos = tr.mapping.map(blockInfo.blockContent.beforePos);
417
+ } else {
418
+ // Fallback: scan within the mapped bnBlock range to find the inner table node
419
+ const start = tr.mapping.map(blockInfo.bnBlock.beforePos);
420
+ const end = start + (tr.doc.nodeAt(start)?.nodeSize || 0);
421
+ tr.doc.nodesBetween(start, end, (node, pos) => {
422
+ if (node.type.name === "table") {
423
+ tablePos = pos;
424
+ return false;
425
+ }
426
+ return true;
427
+ });
428
+ }
429
+
430
+ const table = tablePos >= 0 ? tr.doc.nodeAt(tablePos) : null;
431
+ if (!table || table.type.name !== "table") {
432
+ return false;
433
+ }
434
+
435
+ // 2) Clamp row/col to the table’s current grid
436
+ const map = TableMap.get(table);
437
+ const row = Math.max(0, Math.min(a.row, map.height - 1));
438
+ const col = Math.max(0, Math.min(a.col, map.width - 1));
439
+
440
+ // 3) Compute the absolute position of the target cell (pos BEFORE the cell)
441
+ const cellIndex = row * map.width + col;
442
+ const relCellPos = map.map[cellIndex]; // relative to (tablePos + 1)
443
+ if (relCellPos == null) {
444
+ return false;
445
+ }
446
+ const cellPos = tablePos + 1 + relCellPos;
447
+
448
+ // 4) Place the caret inside the cell, clamping the text offset
449
+ const textPos = cellPos + 1;
450
+ const textNode = tr.doc.nodeAt(textPos);
451
+ const textStart = textPos + 1;
452
+ const max = textNode ? textNode.content.size : 0;
453
+ const head = textStart + Math.max(0, Math.min(a.offset, max));
454
+
455
+ if ("selection" in tr) {
456
+ tr.setSelection(TextSelection.create(tr.doc, head));
457
+ }
458
+ return true;
459
+ }
@@ -49,6 +49,7 @@ function insertOrUpdateBlock<
49
49
  editor: BlockNoteEditor<BSchema, I, S>,
50
50
  referenceBlock: Block<BSchema, I, S>,
51
51
  newBlock: PartialBlock<BSchema, I, S>,
52
+ placement: "before" | "after" = "after",
52
53
  ) {
53
54
  let insertedBlockId: string | undefined;
54
55
 
@@ -61,7 +62,7 @@ function insertOrUpdateBlock<
61
62
  insertedBlockId = editor.insertBlocks(
62
63
  [newBlock],
63
64
  referenceBlock,
64
- "after",
65
+ placement,
65
66
  )[0].id;
66
67
  }
67
68
 
@@ -156,16 +157,26 @@ export async function handleFileInsertion<
156
157
  };
157
158
 
158
159
  const pos = editor.prosemirrorView?.posAtCoords(coords);
160
+
159
161
  if (!pos) {
160
162
  return;
161
163
  }
162
164
 
163
165
  insertedBlockId = editor.transact((tr) => {
164
166
  const posInfo = getNearestBlockPos(tr.doc, pos.pos);
167
+ const blockElement = editor.prosemirrorView?.dom.querySelector(
168
+ `[data-id="${posInfo.node.attrs.id}"]`,
169
+ );
170
+
171
+ const blockRect = blockElement?.getBoundingClientRect();
172
+
165
173
  return insertOrUpdateBlock(
166
174
  editor,
167
175
  editor.getBlock(posInfo.node.attrs.id)!,
168
176
  fileBlock,
177
+ blockRect && (blockRect.top + blockRect.bottom) / 2 > coords.top
178
+ ? "before"
179
+ : "after",
169
180
  );
170
181
  });
171
182
  } else {
@@ -17,6 +17,7 @@ import {
17
17
  contentNodeToInlineContent,
18
18
  contentNodeToTableContent,
19
19
  } from "../../nodeConversions/nodeToBlock.js";
20
+ import { initializeESMDependencies } from "../../../util/esmDependencies.js";
20
21
 
21
22
  function fragmentToExternalHTML<
22
23
  BSchema extends BlockSchema,
@@ -208,6 +209,7 @@ export const createCopyToClipboardExtension = <
208
209
  Extension.create<{ editor: BlockNoteEditor<BSchema, I, S> }, undefined>({
209
210
  name: "copyToClipboard",
210
211
  addProseMirrorPlugins() {
212
+ initializeESMDependencies();
211
213
  return [
212
214
  new Plugin({
213
215
  props: {
@@ -113,7 +113,11 @@ export type BlocksChanged<
113
113
  | {
114
114
  type: "move";
115
115
  /**
116
- * The previous block.
116
+ * The affected block.
117
+ */
118
+ block: Block<BSchema, ISchema, SSchema>;
119
+ /**
120
+ * The block before the move.
117
121
  */
118
122
  prevBlock: Block<BSchema, ISchema, SSchema>;
119
123
  /**
@@ -1,6 +1,7 @@
1
1
  export const parseImageElement = (imageElement: HTMLImageElement) => {
2
2
  const url = imageElement.src || undefined;
3
3
  const previewWidth = imageElement.width || undefined;
4
+ const name = imageElement.alt || undefined;
4
5
 
5
- return { url, previewWidth };
6
+ return { url, previewWidth, name };
6
7
  };
@@ -2,11 +2,15 @@ import {
2
2
  createBlockSpecFromStronglyTypedTiptapNode,
3
3
  createStronglyTypedTiptapNode,
4
4
  } from "../../schema/index.js";
5
- import { createDefaultBlockDOMOutputSpec } from "../defaultBlockHelpers.js";
5
+ import {
6
+ createDefaultBlockDOMOutputSpec,
7
+ mergeParagraphs,
8
+ } from "../defaultBlockHelpers.js";
6
9
  import { defaultProps } from "../defaultProps.js";
7
10
  import { getBlockInfoFromSelection } from "../../api/getBlockInfoFromPos.js";
8
11
  import { updateBlockCommand } from "../../api/blockManipulation/commands/updateBlock/updateBlock.js";
9
12
  import { InputRule } from "@tiptap/core";
13
+ import { DOMParser } from "prosemirror-model";
10
14
 
11
15
  export const quotePropSchema = {
12
16
  ...defaultProps,
@@ -76,6 +80,24 @@ export const QuoteBlockContent = createStronglyTypedTiptapNode({
76
80
  {
77
81
  tag: "blockquote",
78
82
  node: "quote",
83
+ getContent: (node, schema) => {
84
+ // Parse the blockquote content as inline content
85
+ const element = node as HTMLElement;
86
+
87
+ // Clone to avoid modifying the original
88
+ const clone = element.cloneNode(true) as HTMLElement;
89
+
90
+ // Merge multiple paragraphs into one with line breaks
91
+ mergeParagraphs(clone);
92
+
93
+ // Parse the content directly as a paragraph to extract inline content
94
+ const parser = DOMParser.fromSchema(schema);
95
+ const parsed = parser.parse(clone, {
96
+ topNode: schema.nodes.paragraph.create(),
97
+ });
98
+
99
+ return parsed.content;
100
+ },
79
101
  },
80
102
  ];
81
103
  },
@@ -77,7 +77,8 @@ export const createToggleWrapper = (
77
77
  const toggleAddBlockButton = document.createElement("button");
78
78
  toggleAddBlockButton.className = "bn-toggle-add-block-button";
79
79
  toggleAddBlockButton.type = "button";
80
- toggleAddBlockButton.textContent = "Empty toggle. Click to add a block.";
80
+ toggleAddBlockButton.textContent =
81
+ editor.dictionary.toggle_blocks.add_block_button;
81
82
  const toggleAddBlockButtonMouseDown = (event: MouseEvent) =>
82
83
  event.preventDefault();
83
84
  toggleAddBlockButton.addEventListener(