@blocknote/core 0.31.1 → 0.31.3

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 (45) hide show
  1. package/dist/blocknote.cjs +7 -7
  2. package/dist/blocknote.cjs.map +1 -1
  3. package/dist/blocknote.js +506 -485
  4. package/dist/blocknote.js.map +1 -1
  5. package/dist/{en-BXVKCwYt.cjs → en-C0Chm3Nc.cjs} +2 -2
  6. package/dist/{en-BXVKCwYt.cjs.map → en-C0Chm3Nc.cjs.map} +1 -1
  7. package/dist/{en-qGo6sk9V.js → en-CdzlzPhp.js} +4 -1
  8. package/dist/{en-qGo6sk9V.js.map → en-CdzlzPhp.js.map} +1 -1
  9. package/dist/locales.cjs +1 -1
  10. package/dist/locales.cjs.map +1 -1
  11. package/dist/locales.js +62 -5
  12. package/dist/locales.js.map +1 -1
  13. package/dist/style.css +1 -1
  14. package/dist/tsconfig.tsbuildinfo +1 -1
  15. package/dist/webpack-stats.json +1 -1
  16. package/package.json +1 -1
  17. package/src/api/nodeConversions/blockToNode.ts +6 -2
  18. package/src/editor/Block.css +14 -19
  19. package/src/editor/BlockNoteExtensions.ts +1 -1
  20. package/src/extensions/Collaboration/ForkYDocPlugin.ts +26 -8
  21. package/src/extensions/Collaboration/UndoPlugin.ts +3 -2
  22. package/src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts +16 -4
  23. package/src/i18n/locales/ar.ts +3 -0
  24. package/src/i18n/locales/de.ts +3 -0
  25. package/src/i18n/locales/en.ts +3 -0
  26. package/src/i18n/locales/es.ts +3 -0
  27. package/src/i18n/locales/fr.ts +3 -0
  28. package/src/i18n/locales/hr.ts +3 -0
  29. package/src/i18n/locales/is.ts +3 -0
  30. package/src/i18n/locales/it.ts +3 -0
  31. package/src/i18n/locales/ja.ts +3 -0
  32. package/src/i18n/locales/ko.ts +3 -0
  33. package/src/i18n/locales/nl.ts +3 -0
  34. package/src/i18n/locales/no.ts +3 -0
  35. package/src/i18n/locales/pl.ts +3 -0
  36. package/src/i18n/locales/pt.ts +3 -0
  37. package/src/i18n/locales/ru.ts +3 -0
  38. package/src/i18n/locales/sk.ts +3 -0
  39. package/src/i18n/locales/uk.ts +3 -0
  40. package/src/i18n/locales/vi.ts +3 -0
  41. package/src/i18n/locales/zh-tw.ts +3 -0
  42. package/src/i18n/locales/zh.ts +3 -0
  43. package/types/src/extensions/Collaboration/UndoPlugin.d.ts +4 -1
  44. package/types/src/i18n/locales/en.d.ts +3 -0
  45. package/types/src/i18n/locales/sk.d.ts +3 -0
@@ -1 +1 @@
1
- {"builtAt":1747989946961,"assets":[{"name":"blocknote.cjs","size":190950},{"name":"comments.cjs","size":11826},{"name":"locales.cjs","size":122928},{"name":"en-BXVKCwYt.cjs","size":5518},{"name":"en-BXVKCwYt.cjs.map","size":12761},{"name":"comments.cjs.map","size":47628},{"name":"locales.cjs.map","size":259333},{"name":"blocknote.cjs.map","size":913210}],"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-BXVKCwYt.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":536,"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":3612,"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":7135,"chunks":["a1ee98a"]},{"name":"./src/api/nodeUtil.ts","size":3150,"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/HeadingBlockContent/HeadingBlockContent.ts","size":3376,"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/blocks/ListItemBlockContent/getListItemContent.ts","size":1425,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/splitBlock/splitBlock.ts","size":868,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/ListItemKeyboardShortcuts.ts","size":1443,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.ts","size":3121,"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":4057,"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":1163,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlockTypeGuards.ts","size":1688,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/uploadToTmpFilesDotOrg_DEV_ONLY.ts","size":316,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts","size":7012,"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":2284,"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":1112,"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/Collaboration/CursorPlugin.ts","size":3785,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/SyncPlugin.ts","size":244,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/UndoPlugin.ts","size":227,"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":6083,"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":18080,"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":14178,"chunks":["a1ee98a"]},{"name":"./src/api/positionMapping.ts","size":1652,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/SuggestionPlugin.ts","size":9079,"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":3911,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteExtensions.ts","size":5400,"chunks":["a1ee98a"]},{"name":"./src/editor/transformPasted.ts","size":2604,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteTipTapEditor.ts","size":5702,"chunks":["a1ee98a"]},{"name":"./src/style.css","size":0,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteEditor.ts","size":37455,"chunks":["a1ee98a"]},{"name":"./src/editor/defaultColors.ts","size":1193,"chunks":["a1ee98a"]},{"name":"./src/exporter/Exporter.ts","size":1075,"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":7874,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/de.ts","size":8600,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/es.ts","size":8457,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/fr.ts","size":9228,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/hr.ts","size":8490,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/is.ts","size":8222,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/it.ts","size":8553,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ja.ts","size":7485,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ko.ts","size":7261,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/nl.ts","size":8458,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/no.ts","size":8333,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/pl.ts","size":8145,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/pt.ts","size":8391,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ru.ts","size":9077,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/sk.ts","size":8288,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/uk.ts","size":9004,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/vi.ts","size":8253,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/zh.ts","size":7179,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/zh-tw.ts","size":7204,"chunks":["9eaffe2"]},{"name":"./src/i18n/index.ts","size":0,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/en.ts","size":7979,"chunks":["a1e239a"]}]}
1
+ {"builtAt":1750242497062,"assets":[{"name":"blocknote.cjs","size":191470},{"name":"comments.cjs","size":11826},{"name":"locales.cjs","size":124426},{"name":"en-C0Chm3Nc.cjs","size":5586},{"name":"en-C0Chm3Nc.cjs.map","size":12892},{"name":"comments.cjs.map","size":47628},{"name":"locales.cjs.map","size":262029},{"name":"blocknote.cjs.map","size":915002}],"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-C0Chm3Nc.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":536,"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":3612,"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":3150,"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/HeadingBlockContent/HeadingBlockContent.ts","size":3376,"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/blocks/ListItemBlockContent/getListItemContent.ts","size":1425,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/splitBlock/splitBlock.ts","size":868,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/ListItemKeyboardShortcuts.ts","size":1443,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.ts","size":3121,"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":4057,"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":1163,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlockTypeGuards.ts","size":1688,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/uploadToTmpFilesDotOrg_DEV_ONLY.ts","size":316,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts","size":7012,"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":2284,"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":1112,"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/Collaboration/CursorPlugin.ts","size":3785,"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":6083,"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":14178,"chunks":["a1ee98a"]},{"name":"./src/api/positionMapping.ts","size":1652,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/SuggestionPlugin.ts","size":9079,"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":5423,"chunks":["a1ee98a"]},{"name":"./src/editor/transformPasted.ts","size":2604,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteTipTapEditor.ts","size":5702,"chunks":["a1ee98a"]},{"name":"./src/style.css","size":0,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteEditor.ts","size":37455,"chunks":["a1ee98a"]},{"name":"./src/editor/defaultColors.ts","size":1193,"chunks":["a1ee98a"]},{"name":"./src/exporter/Exporter.ts","size":1075,"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":7962,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/de.ts","size":8698,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/es.ts","size":8549,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/fr.ts","size":9323,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/hr.ts","size":8580,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/is.ts","size":8308,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/it.ts","size":8645,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ja.ts","size":7566,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ko.ts","size":7338,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/nl.ts","size":8551,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/no.ts","size":8422,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/pl.ts","size":8236,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/pt.ts","size":8482,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ru.ts","size":9171,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/sk.ts","size":8378,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/uk.ts","size":9104,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/vi.ts","size":8341,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/zh.ts","size":7256,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/zh-tw.ts","size":7281,"chunks":["9eaffe2"]},{"name":"./src/i18n/index.ts","size":0,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/en.ts","size":8065,"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.31.1",
14
+ "version": "0.31.3",
15
15
  "files": [
16
16
  "dist",
17
17
  "types",
@@ -40,9 +40,13 @@ function styledTextToNodes<T extends StyleSchema>(
40
40
  }
41
41
 
42
42
  if (config.propSchema === "boolean") {
43
- marks.push(schema.mark(style));
43
+ if (value) {
44
+ marks.push(schema.mark(style));
45
+ }
44
46
  } else if (config.propSchema === "string") {
45
- marks.push(schema.mark(style, { stringValue: value }));
47
+ if (value) {
48
+ marks.push(schema.mark(style, { stringValue: value }));
49
+ }
46
50
  } else {
47
51
  throw new UnreachableCaseError(config.propSchema);
48
52
  }
@@ -15,26 +15,9 @@ BASIC STYLES
15
15
 
16
16
  .bn-block-content {
17
17
  padding: 3px 0;
18
+ display: flex;
18
19
  transition: font-size 0.2s;
19
20
  width: 100%;
20
- /*
21
- because the content elements are display: block
22
- we use flex to position them next to list markers
23
- */
24
- }
25
-
26
- /* We can't set `display: flex` on `.bn-block-content` while it has inline
27
- content (see #1629). However, it's necessary to set alignment of blocks
28
- without content as these can't use `text-align`, so this additional rule is
29
- used. */
30
- .bn-block-content:not(:has(.bn-inline-content)) {
31
- display: flex;
32
- }
33
-
34
- .bn-block-content::before {
35
- /* content: ""; */
36
- transition: all 0.2s;
37
- /*margin: 0px;*/
38
21
  }
39
22
 
40
23
  .bn-block-content.ProseMirror-selectednode > *,
@@ -44,6 +27,19 @@ used. */
44
27
  outline: 4px solid rgb(100, 160, 255);
45
28
  }
46
29
 
30
+ .bn-block-content::before {
31
+ content: "";
32
+ margin-right: 0;
33
+ transition: all 0.2s;
34
+ /* Workaround for selection issue on Chrome, see #1588 and also here:
35
+ https://discuss.prosemirror.net/t/mouse-down-selection-behaviour-different-on-chrome/8426
36
+ The :before element causes the selection to be set in the wrong place vs
37
+ other browsers. Setting no height fixes this, while list item indicators are
38
+ still displayed fine as overflow is not hidden. */
39
+ height: 0;
40
+ overflow: visible;
41
+ }
42
+
47
43
  .bn-inline-content {
48
44
  width: 100%;
49
45
  }
@@ -175,7 +171,6 @@ NESTED BLOCKS
175
171
  .bn-block-content::before {
176
172
  margin-right: 0;
177
173
  content: "";
178
- display: inline;
179
174
  }
180
175
 
181
176
  /* Ordered */
@@ -116,7 +116,7 @@ export const getBlockNoteExtensions = <
116
116
 
117
117
  if (opts.collaboration) {
118
118
  ret["ySyncPlugin"] = new SyncPlugin(opts.collaboration.fragment);
119
- ret["yUndoPlugin"] = new UndoPlugin();
119
+ ret["yUndoPlugin"] = new UndoPlugin({ editor: opts.editor });
120
120
 
121
121
  if (opts.collaboration.provider?.awareness) {
122
122
  ret["yCursorPlugin"] = new CursorPlugin(opts.collaboration);
@@ -86,6 +86,7 @@ export class ForkYDocPlugin extends BlockNoteExtension<{
86
86
  private forkedState:
87
87
  | {
88
88
  originalFragment: Y.XmlFragment;
89
+ undoStack: Y.UndoManager["undoStack"];
89
90
  forkedFragment: Y.XmlFragment;
90
91
  }
91
92
  | undefined;
@@ -114,6 +115,8 @@ export class ForkYDocPlugin extends BlockNoteExtension<{
114
115
  const forkedFragment = this.findTypeInOtherYdoc(originalFragment, doc);
115
116
 
116
117
  this.forkedState = {
118
+ undoStack: yUndoPluginKey.getState(this.editor.prosemirrorState)!
119
+ .undoManager.undoStack,
117
120
  originalFragment,
118
121
  forkedFragment,
119
122
  };
@@ -128,7 +131,9 @@ export class ForkYDocPlugin extends BlockNoteExtension<{
128
131
  this.editor._tiptapEditor.registerPlugin(
129
132
  new SyncPlugin(forkedFragment).plugins[0],
130
133
  );
131
- this.editor._tiptapEditor.registerPlugin(new UndoPlugin().plugins[0]);
134
+ this.editor._tiptapEditor.registerPlugin(
135
+ new UndoPlugin({ editor: this.editor }).plugins[0],
136
+ );
132
137
  // No need to register the cursor plugin again, it's a local fork
133
138
  this.emit("forked", true);
134
139
  }
@@ -146,17 +151,15 @@ export class ForkYDocPlugin extends BlockNoteExtension<{
146
151
  this.editor._tiptapEditor.unregisterPlugin(ySyncPluginKey);
147
152
  this.editor._tiptapEditor.unregisterPlugin(yUndoPluginKey);
148
153
 
149
- const { originalFragment, forkedFragment } = this.forkedState;
150
- if (keepChanges) {
151
- // Apply any changes that have been made to the fork, onto the original doc
152
- const update = Y.encodeStateAsUpdate(forkedFragment.doc!);
153
- Y.applyUpdate(originalFragment.doc!, update);
154
- }
154
+ const { originalFragment, forkedFragment, undoStack } = this.forkedState;
155
155
  this.editor.extensions["ySyncPlugin"] = new SyncPlugin(originalFragment);
156
156
  this.editor.extensions["yCursorPlugin"] = new CursorPlugin(
157
157
  this.collaboration!,
158
158
  );
159
- this.editor.extensions["yUndoPlugin"] = new UndoPlugin();
159
+ this.editor.extensions["yUndoPlugin"] = new UndoPlugin({
160
+ editor: this.editor,
161
+ });
162
+
160
163
  // Register the plugins again, based on the original fragment
161
164
  this.editor._tiptapEditor.registerPlugin(
162
165
  this.editor.extensions["ySyncPlugin"].plugins[0],
@@ -167,6 +170,21 @@ export class ForkYDocPlugin extends BlockNoteExtension<{
167
170
  this.editor._tiptapEditor.registerPlugin(
168
171
  this.editor.extensions["yUndoPlugin"].plugins[0],
169
172
  );
173
+
174
+ // Reset the undo stack to the original undo stack
175
+ yUndoPluginKey.getState(
176
+ this.editor.prosemirrorState,
177
+ )!.undoManager.undoStack = undoStack;
178
+
179
+ if (keepChanges) {
180
+ // Apply any changes that have been made to the fork, onto the original doc
181
+ const update = Y.encodeStateAsUpdate(
182
+ forkedFragment.doc!,
183
+ Y.encodeStateVector(originalFragment.doc!),
184
+ );
185
+ // Applying this change will add to the undo stack, allowing it to be undone normally
186
+ Y.applyUpdate(originalFragment.doc!, update, this.editor);
187
+ }
170
188
  // Reset the forked state
171
189
  this.forkedState = undefined;
172
190
  this.emit("forked", false);
@@ -1,4 +1,5 @@
1
1
  import { yUndoPlugin } from "y-prosemirror";
2
+ import { BlockNoteEditor } from "../../editor/BlockNoteEditor.js";
2
3
  import { BlockNoteExtension } from "../../editor/BlockNoteExtension.js";
3
4
 
4
5
  export class UndoPlugin extends BlockNoteExtension {
@@ -6,9 +7,9 @@ export class UndoPlugin extends BlockNoteExtension {
6
7
  return "yUndoPlugin";
7
8
  }
8
9
 
9
- constructor() {
10
+ constructor({ editor }: { editor: BlockNoteEditor<any, any, any> }) {
10
11
  super();
11
- this.addProsemirrorPlugin(yUndoPlugin());
12
+ this.addProsemirrorPlugin(yUndoPlugin({ trackedOrigins: [editor] }));
12
13
  }
13
14
 
14
15
  public get priority() {
@@ -434,7 +434,7 @@ export const KeyboardShortcutsExtension = Extension.create<{
434
434
  ]);
435
435
 
436
436
  const handleEnter = (withShift = false) => {
437
- return this.editor.commands.first(({ commands }) => [
437
+ return this.editor.commands.first(({ commands, tr }) => [
438
438
  // Removes a level of nesting if the block is empty & indented, while the selection is also empty & at the start
439
439
  // of the block.
440
440
  () =>
@@ -486,9 +486,21 @@ export const KeyboardShortcutsExtension = Extension.create<{
486
486
  // both enter and shift+enter.
487
487
  blockHardBreakShortcut === "enter"
488
488
  ) {
489
- return commands.insertContent({
490
- type: "hardBreak",
491
- });
489
+ const marks =
490
+ tr.storedMarks ||
491
+ tr.selection.$head
492
+ .marks()
493
+ .filter((m) =>
494
+ this.editor.extensionManager.splittableMarks.includes(
495
+ m.type.name,
496
+ ),
497
+ );
498
+
499
+ tr.insert(
500
+ tr.selection.head,
501
+ tr.doc.type.schema.nodes.hardBreak.create(),
502
+ ).ensureMarks(marks);
503
+ return true;
492
504
  }
493
505
 
494
506
  return false;
@@ -320,6 +320,9 @@ export const ar: Dictionary = {
320
320
  },
321
321
  },
322
322
  comments: {
323
+ edited: "تم التحرير",
324
+ save_button_text: "حفظ",
325
+ cancel_button_text: "إلغاء",
323
326
  actions: {
324
327
  add_reaction: "أضف تفاعلًا",
325
328
  resolve: "حل",
@@ -334,6 +334,9 @@ export const de: Dictionary = {
334
334
  },
335
335
  },
336
336
  comments: {
337
+ edited: "bearbeitet",
338
+ save_button_text: "Speichern",
339
+ cancel_button_text: "Abbrechen",
337
340
  actions: {
338
341
  add_reaction: "Reaktion hinzufügen",
339
342
  resolve: "Lösen",
@@ -335,6 +335,9 @@ export const en = {
335
335
  },
336
336
  },
337
337
  comments: {
338
+ edited: "edited",
339
+ save_button_text: "Save",
340
+ cancel_button_text: "Cancel",
338
341
  actions: {
339
342
  add_reaction: "Add reaction",
340
343
  resolve: "Resolve",
@@ -333,6 +333,9 @@ export const es: Dictionary = {
333
333
  },
334
334
  },
335
335
  comments: {
336
+ edited: "editado",
337
+ save_button_text: "Guardar",
338
+ cancel_button_text: "Cancelar",
336
339
  actions: {
337
340
  add_reaction: "Agregar reacción",
338
341
  resolve: "Resolver",
@@ -359,6 +359,9 @@ export const fr: Dictionary = {
359
359
  },
360
360
  },
361
361
  comments: {
362
+ edited: "modifié",
363
+ save_button_text: "Enregistrer",
364
+ cancel_button_text: "Annuler",
362
365
  actions: {
363
366
  add_reaction: "Ajouter une réaction",
364
367
  resolve: "Résoudre",
@@ -348,6 +348,9 @@ export const hr: Dictionary = {
348
348
  },
349
349
  },
350
350
  comments: {
351
+ edited: "uredio",
352
+ save_button_text: "Spremi",
353
+ cancel_button_text: "Odustani",
351
354
  actions: {
352
355
  add_reaction: "Dodaj reakciju",
353
356
  resolve: "Riješi",
@@ -327,6 +327,9 @@ export const is: Dictionary = {
327
327
  },
328
328
  },
329
329
  comments: {
330
+ edited: "breytt",
331
+ save_button_text: "Vista",
332
+ cancel_button_text: "Hætta",
330
333
  actions: {
331
334
  add_reaction: "Bæta við viðbrögðum",
332
335
  resolve: "Leysa",
@@ -336,6 +336,9 @@ export const it: Dictionary = {
336
336
  },
337
337
  },
338
338
  comments: {
339
+ edited: "modificato",
340
+ save_button_text: "Salva",
341
+ cancel_button_text: "Annulla",
339
342
  actions: {
340
343
  add_reaction: "Aggiungi reazione",
341
344
  resolve: "Risolvi",
@@ -355,6 +355,9 @@ export const ja: Dictionary = {
355
355
  },
356
356
  },
357
357
  comments: {
358
+ edited: "編集済み",
359
+ save_button_text: "保存",
360
+ cancel_button_text: "キャンセル",
358
361
  actions: {
359
362
  add_reaction: "リアクションを追加",
360
363
  resolve: "解決",
@@ -348,6 +348,9 @@ export const ko: Dictionary = {
348
348
  },
349
349
  },
350
350
  comments: {
351
+ edited: "수정됨",
352
+ save_button_text: "저장",
353
+ cancel_button_text: "취소",
351
354
  actions: {
352
355
  add_reaction: "반응 추가",
353
356
  resolve: "해결",
@@ -334,6 +334,9 @@ export const nl: Dictionary = {
334
334
  },
335
335
  },
336
336
  comments: {
337
+ edited: "bewerkt",
338
+ save_button_text: "Opslaan",
339
+ cancel_button_text: "Annuleren",
337
340
  actions: {
338
341
  add_reaction: "Reactie toevoegen",
339
342
  resolve: "Oplossen",
@@ -334,6 +334,9 @@ export const no: Dictionary = {
334
334
  },
335
335
  },
336
336
  comments: {
337
+ edited: "redigert",
338
+ save_button_text: "Lagre",
339
+ cancel_button_text: "Avbryt",
337
340
  actions: {
338
341
  add_reaction: "Legg til reaksjon",
339
342
  resolve: "Løs",
@@ -319,6 +319,9 @@ export const pl: Dictionary = {
319
319
  },
320
320
  },
321
321
  comments: {
322
+ edited: "edytowany",
323
+ save_button_text: "Zapisz",
324
+ cancel_button_text: "Anuluj",
322
325
  actions: {
323
326
  add_reaction: "Dodaj reakcję",
324
327
  resolve: "Rozwiąż",
@@ -327,6 +327,9 @@ export const pt: Dictionary = {
327
327
  },
328
328
  },
329
329
  comments: {
330
+ edited: "editado",
331
+ save_button_text: "Salvar",
332
+ cancel_button_text: "Cancelar",
330
333
  actions: {
331
334
  add_reaction: "Adicionar reação",
332
335
  resolve: "Resolver",
@@ -362,6 +362,9 @@ export const ru: Dictionary = {
362
362
  },
363
363
  },
364
364
  comments: {
365
+ edited: "изменен",
366
+ save_button_text: "Сохранить",
367
+ cancel_button_text: "Отменить",
365
368
  actions: {
366
369
  add_reaction: "Добавить реакцию",
367
370
  resolve: "Решить",
@@ -333,6 +333,9 @@ export const sk = {
333
333
  },
334
334
  },
335
335
  comments: {
336
+ edited: "upravený",
337
+ save_button_text: "Uložiť",
338
+ cancel_button_text: "Zrušiť",
336
339
  actions: {
337
340
  add_reaction: "Pridať reakciu",
338
341
  resolve: "Vyriešiť",
@@ -359,6 +359,9 @@ export const uk: Dictionary = {
359
359
  },
360
360
  },
361
361
  comments: {
362
+ edited: "відредаговано",
363
+ save_button_text: "Зберегти",
364
+ cancel_button_text: "Скасувати",
362
365
  actions: {
363
366
  add_reaction: "Додати реакцію",
364
367
  resolve: "Вирішити",
@@ -334,6 +334,9 @@ export const vi: Dictionary = {
334
334
  },
335
335
  },
336
336
  comments: {
337
+ edited: "đã chỉnh sửa",
338
+ save_button_text: "Lưu",
339
+ cancel_button_text: "Hủy",
337
340
  actions: {
338
341
  add_reaction: "Thêm phản ứng",
339
342
  resolve: "Giải quyết",
@@ -368,6 +368,9 @@ export const zhTW: Dictionary = {
368
368
  },
369
369
  },
370
370
  comments: {
371
+ edited: "已編輯",
372
+ save_button_text: "儲存",
373
+ cancel_button_text: "取消",
371
374
  actions: {
372
375
  add_reaction: "新增回應",
373
376
  resolve: "解決",
@@ -368,6 +368,9 @@ export const zh: Dictionary = {
368
368
  },
369
369
  },
370
370
  comments: {
371
+ edited: "已编辑",
372
+ save_button_text: "保存",
373
+ cancel_button_text: "取消",
371
374
  actions: {
372
375
  add_reaction: "添加反应",
373
376
  resolve: "解决",
@@ -1,6 +1,9 @@
1
+ import { BlockNoteEditor } from "../../editor/BlockNoteEditor.js";
1
2
  import { BlockNoteExtension } from "../../editor/BlockNoteExtension.js";
2
3
  export declare class UndoPlugin extends BlockNoteExtension {
3
4
  static key(): string;
4
- constructor();
5
+ constructor({ editor }: {
6
+ editor: BlockNoteEditor<any, any, any>;
7
+ });
5
8
  get priority(): number;
6
9
  }
@@ -256,6 +256,9 @@ export declare const en: {
256
256
  };
257
257
  };
258
258
  comments: {
259
+ edited: string;
260
+ save_button_text: string;
261
+ cancel_button_text: string;
259
262
  actions: {
260
263
  add_reaction: string;
261
264
  resolve: string;
@@ -291,6 +291,9 @@ export declare const sk: {
291
291
  };
292
292
  };
293
293
  comments: {
294
+ edited: string;
295
+ save_button_text: string;
296
+ cancel_button_text: string;
294
297
  actions: {
295
298
  add_reaction: string;
296
299
  resolve: string;