@blocknote/core 0.39.1 → 0.41.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 (102) hide show
  1. package/dist/BlockNoteSchema-COA0fsXW.cjs +11 -0
  2. package/dist/BlockNoteSchema-COA0fsXW.cjs.map +1 -0
  3. package/dist/{BlockNoteSchema-oR047ACf.js → BlockNoteSchema-CYRHak18.js} +681 -581
  4. package/dist/BlockNoteSchema-CYRHak18.js.map +1 -0
  5. package/dist/blocknote.cjs +4 -4
  6. package/dist/blocknote.cjs.map +1 -1
  7. package/dist/blocknote.js +3663 -2816
  8. package/dist/blocknote.js.map +1 -1
  9. package/dist/blocks.cjs +1 -1
  10. package/dist/blocks.js +51 -49
  11. package/dist/en-Cl87Uuyf.cjs +2 -0
  12. package/dist/en-Cl87Uuyf.cjs.map +1 -0
  13. package/dist/{en-Bq3Es3Np.js → en-njEqD7AG.js} +9 -3
  14. package/dist/en-njEqD7AG.js.map +1 -0
  15. package/dist/locales.cjs +1 -1
  16. package/dist/locales.cjs.map +1 -1
  17. package/dist/locales.js +122 -2
  18. package/dist/locales.js.map +1 -1
  19. package/dist/style.css +1 -1
  20. package/dist/tsconfig.tsbuildinfo +1 -1
  21. package/dist/webpack-stats.json +1 -1
  22. package/package.json +4 -3
  23. package/src/api/exporters/html/externalHTMLExporter.ts +1 -1
  24. package/src/api/exporters/html/util/serializeBlocksInternalHTML.ts +2 -1
  25. package/src/api/exporters/markdown/markdownExporter.ts +3 -1
  26. package/src/api/exporters/markdown/util/convertVideoToMarkdownRehypePlugin.ts +19 -0
  27. package/src/api/parsers/markdown/parseMarkdown.ts +31 -0
  28. package/src/blocks/Code/block.ts +14 -14
  29. package/src/blocks/Divider/block.ts +49 -0
  30. package/src/blocks/ListItem/BulletListItem/block.ts +9 -1
  31. package/src/blocks/ListItem/CheckListItem/block.ts +1 -0
  32. package/src/blocks/ListItem/NumberedListItem/block.ts +9 -1
  33. package/src/blocks/Table/block.ts +56 -1
  34. package/src/blocks/ToggleWrapper/createToggleWrapper.ts +1 -1
  35. package/src/blocks/defaultBlocks.ts +16 -14
  36. package/src/blocks/index.ts +1 -0
  37. package/src/editor/Block.css +14 -20
  38. package/src/editor/BlockNoteEditor.test.ts +40 -0
  39. package/src/editor/BlockNoteEditor.ts +257 -465
  40. package/src/editor/BlockNoteExtensions.ts +3 -1
  41. package/src/editor/managers/BlockManager.ts +251 -0
  42. package/src/editor/managers/CollaborationManager.ts +212 -0
  43. package/src/editor/managers/EventManager.ts +134 -0
  44. package/src/editor/managers/ExportManager.ts +137 -0
  45. package/src/editor/managers/ExtensionManager.ts +130 -0
  46. package/src/editor/managers/SelectionManager.ts +114 -0
  47. package/src/editor/managers/StateManager.ts +238 -0
  48. package/src/editor/managers/StyleManager.ts +182 -0
  49. package/src/editor/managers/index.ts +11 -0
  50. package/src/extensions/Comments/CommentsPlugin.ts +7 -4
  51. package/src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts +10 -0
  52. package/src/i18n/locales/ar.ts +6 -0
  53. package/src/i18n/locales/de.ts +6 -0
  54. package/src/i18n/locales/en.ts +6 -0
  55. package/src/i18n/locales/es.ts +6 -0
  56. package/src/i18n/locales/fr.ts +6 -0
  57. package/src/i18n/locales/he.ts +6 -0
  58. package/src/i18n/locales/hr.ts +6 -0
  59. package/src/i18n/locales/is.ts +6 -0
  60. package/src/i18n/locales/it.ts +6 -0
  61. package/src/i18n/locales/ja.ts +6 -0
  62. package/src/i18n/locales/ko.ts +6 -0
  63. package/src/i18n/locales/nl.ts +6 -0
  64. package/src/i18n/locales/no.ts +6 -0
  65. package/src/i18n/locales/pl.ts +6 -0
  66. package/src/i18n/locales/pt.ts +6 -0
  67. package/src/i18n/locales/ru.ts +6 -0
  68. package/src/i18n/locales/sk.ts +6 -0
  69. package/src/i18n/locales/uk.ts +6 -0
  70. package/src/i18n/locales/vi.ts +6 -0
  71. package/src/i18n/locales/zh-tw.ts +6 -0
  72. package/src/i18n/locales/zh.ts +6 -0
  73. package/src/schema/blocks/createSpec.ts +1 -0
  74. package/src/util/string.ts +21 -0
  75. package/types/src/api/exporters/markdown/util/convertVideoToMarkdownRehypePlugin.d.ts +2 -0
  76. package/types/src/blocks/Divider/block.d.ts +3 -0
  77. package/types/src/blocks/Heading/block.d.ts +3 -3
  78. package/types/src/blocks/defaultBlocks.d.ts +2 -1
  79. package/types/src/blocks/index.d.ts +1 -0
  80. package/types/src/editor/BlockNoteEditor.d.ts +75 -48
  81. package/types/src/editor/BlockNoteExtensions.d.ts +2 -1
  82. package/types/src/editor/managers/BlockManager.d.ts +114 -0
  83. package/types/src/editor/managers/CollaborationManager.d.ts +115 -0
  84. package/types/src/editor/managers/EventManager.d.ts +58 -0
  85. package/types/src/editor/managers/ExportManager.d.ts +64 -0
  86. package/types/src/editor/managers/ExtensionManager.d.ts +68 -0
  87. package/types/src/editor/managers/SelectionManager.d.ts +54 -0
  88. package/types/src/editor/managers/StateManager.d.ts +115 -0
  89. package/types/src/editor/managers/StyleManager.d.ts +48 -0
  90. package/types/src/editor/managers/index.d.ts +8 -0
  91. package/types/src/extensions/Comments/CommentsPlugin.d.ts +4 -3
  92. package/types/src/i18n/locales/en.d.ts +6 -0
  93. package/types/src/i18n/locales/sk.d.ts +6 -0
  94. package/types/src/util/string.d.ts +1 -0
  95. package/dist/BlockNoteSchema-DmZ6UQfY.cjs +0 -11
  96. package/dist/BlockNoteSchema-DmZ6UQfY.cjs.map +0 -1
  97. package/dist/BlockNoteSchema-oR047ACf.js.map +0 -1
  98. package/dist/en-Bq3Es3Np.js.map +0 -1
  99. package/dist/en-D3B48eJ7.cjs +0 -2
  100. package/dist/en-D3B48eJ7.cjs.map +0 -1
  101. /package/src/api/exporters/markdown/{removeUnderlinesRehypePlugin.ts → util/removeUnderlinesRehypePlugin.ts} +0 -0
  102. /package/types/src/api/exporters/markdown/{removeUnderlinesRehypePlugin.d.ts → util/removeUnderlinesRehypePlugin.d.ts} +0 -0
@@ -1 +1 @@
1
- {"builtAt":1758287623821,"assets":[{"name":"blocks.cjs","size":3743},{"name":"comments.cjs","size":11826},{"name":"locales.cjs","size":158539},{"name":"blocknote.cjs","size":131548},{"name":"en-D3B48eJ7.cjs","size":6630},{"name":"BlockNoteSchema-DmZ6UQfY.cjs","size":83376},{"name":"en-D3B48eJ7.cjs.map","size":14973},{"name":"BlockNoteSchema-DmZ6UQfY.cjs.map","size":409974},{"name":"comments.cjs.map","size":47628},{"name":"blocks.cjs.map","size":91},{"name":"locales.cjs.map","size":326303},{"name":"blocknote.cjs.map","size":580938}],"chunks":[{"id":"c90dbef","entry":true,"initial":true,"files":["blocks.cjs"],"names":["blocks"]},{"id":"1627b02","entry":true,"initial":true,"files":["comments.cjs"],"names":["comments"]},{"id":"9eaffe2","entry":true,"initial":true,"files":["locales.cjs"],"names":["locales"]},{"id":"a1ee98a","entry":true,"initial":true,"files":["blocknote.cjs"],"names":["blocknote"]},{"id":"a1e239a","entry":false,"initial":true,"files":["en-D3B48eJ7.cjs"],"names":["en"]},{"id":"7515671","entry":false,"initial":true,"files":["BlockNoteSchema-DmZ6UQfY.cjs"],"names":["BlockNoteSchema"]}],"modules":[{"name":"./src/blocks/index.ts","size":0,"chunks":["c90dbef"]},{"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":9373,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/de.ts","size":10556,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/es.ts","size":10094,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/fr.ts","size":11042,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/he.ts","size":9106,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/hr.ts","size":9915,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/is.ts","size":10096,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/it.ts","size":10520,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ja.ts","size":8949,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ko.ts","size":8445,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/nl.ts","size":10026,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/no.ts","size":10202,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/pl.ts","size":9741,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/pt.ts","size":9895,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ru.ts","size":11067,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/sk.ts","size":9783,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/uk.ts","size":10730,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/vi.ts","size":9771,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/zh.ts","size":8423,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/zh-tw.ts","size":8463,"chunks":["9eaffe2"]},{"name":"./src/i18n/index.ts","size":0,"chunks":["9eaffe2"]},{"name":"./src/schema/inlineContent/createSpec.ts","size":3784,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/insertBlocks/insertBlocks.ts","size":849,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.ts","size":1940,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/util/serializeBlocksExternalHTML.ts","size":7444,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/externalHTMLExporter.ts","size":886,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/util/serializeBlocksInternalHTML.ts","size":4914,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/internalHTMLSerializer.ts","size":288,"chunks":["a1ee98a"]},{"name":"./src/api/getBlocksChangedByTransaction.ts","size":6577,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/moveBlocks/moveBlocks.ts","size":5706,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/nestBlock/nestBlock.ts","size":2067,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/getBlock/getBlock.ts","size":2087,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/insertContentAt.ts","size":1049,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/selections/selection.ts","size":5301,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/selections/textCursorPosition.ts","size":2606,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/removeUnderlinesRehypePlugin.ts","size":752,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/util/addSpacesToCheckboxesRehypePlugin.ts","size":775,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/markdownExporter.ts","size":646,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/html/util/nestedLists.ts","size":2174,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/html/parseHTML.ts","size":439,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/markdown/parseMarkdown.ts","size":1067,"chunks":["a1ee98a"]},{"name":"./src/style.css","size":0,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/acceptedMIMETypes.ts","size":134,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/handleFileInsertion.ts","size":4176,"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":677,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/toClipboard/copyExtension.ts","size":5191,"chunks":["a1ee98a"]},{"name":"./src/extensions/BackgroundColor/BackgroundColorExtension.ts","size":308,"chunks":["a1ee98a"]},{"name":"./src/extensions/BlockChange/BlockChangePlugin.ts","size":1064,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/CursorPlugin.ts","size":4715,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/SyncPlugin.ts","size":260,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/UndoPlugin.ts","size":281,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/ForkYDocPlugin.ts","size":4323,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/schemaMigration/migrationRules/moveColorAttributes.ts","size":1403,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/schemaMigration/migrationRules/index.ts","size":45,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/schemaMigration/SchemaMigrationPlugin.ts","size":882,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/CommentMark.ts","size":1428,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/userstore/UserStore.ts","size":1370,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/CommentsPlugin.ts","size":7904,"chunks":["a1ee98a"]},{"name":"./src/extensions/FilePanel/FilePanelPlugin.ts","size":4151,"chunks":["a1ee98a"]},{"name":"./src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts","size":7068,"chunks":["a1ee98a"]},{"name":"./src/extensions/HardBreak/HardBreak.ts","size":376,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/mergeBlocks/mergeBlocks.ts","size":3292,"chunks":["a1ee98a"]},{"name":"./src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts","size":18593,"chunks":["a1ee98a"]},{"name":"./src/extensions/LinkToolbar/LinkToolbarPlugin.ts","size":7731,"chunks":["a1ee98a"]},{"name":"./src/extensions/LinkToolbar/protocols.ts","size":172,"chunks":["a1ee98a"]},{"name":"./src/extensions/NodeSelectionKeyboard/NodeSelectionKeyboardPlugin.ts","size":1383,"chunks":["a1ee98a"]},{"name":"./src/extensions/Placeholder/PlaceholderPlugin.ts","size":3813,"chunks":["a1ee98a"]},{"name":"./src/extensions/PreviousBlockType/PreviousBlockTypePlugin.ts","size":4843,"chunks":["a1ee98a"]},{"name":"./src/extensions/ShowSelection/ShowSelectionPlugin.ts","size":1059,"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":4744,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/SideMenuPlugin.ts","size":16659,"chunks":["a1ee98a"]},{"name":"./src/api/positionMapping.ts","size":1639,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/SuggestionPlugin.ts","size":9266,"chunks":["a1ee98a"]},{"name":"./src/extensions/Suggestions/SuggestionMarks.ts","size":4452,"chunks":["a1ee98a"]},{"name":"./src/extensions/TableHandles/TableHandlesPlugin.ts","size":27500,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextAlignment/TextAlignmentExtension.ts","size":936,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextColor/TextColorExtension.ts","size":293,"chunks":["a1ee98a"]},{"name":"./src/extensions/TrailingNode/TrailingNodeExtension.ts","size":1563,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/BlockContainer.ts","size":2186,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/BlockGroup.ts","size":1162,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/Doc.ts","size":134,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteExtensions.ts","size":5410,"chunks":["a1ee98a"]},{"name":"./src/editor/transformPasted.ts","size":2620,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteEditor.ts","size":39463,"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":1296,"chunks":["a1ee98a"]},{"name":"./src/util/combineByGroup.ts","size":550,"chunks":["a1ee98a"]},{"name":"./src/index.ts","size":0,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/en.ts","size":9415,"chunks":["a1e239a"]},{"name":"./src/extensions/UniqueID/UniqueID.ts","size":8905,"chunks":["7515671"]},{"name":"./src/schema/inlineContent/types.ts","size":302,"chunks":["7515671"]},{"name":"./src/util/table.ts","size":1212,"chunks":["7515671"]},{"name":"./src/util/typescript.ts","size":331,"chunks":["7515671"]},{"name":"./src/util/browser.ts","size":643,"chunks":["7515671"]},{"name":"./src/blocks/defaultBlockHelpers.ts","size":2103,"chunks":["7515671"]},{"name":"./src/util/string.ts","size":299,"chunks":["7515671"]},{"name":"./src/schema/blocks/internal.ts","size":3387,"chunks":["7515671"]},{"name":"./src/schema/blocks/createSpec.ts","size":6635,"chunks":["7515671"]},{"name":"./src/api/getBlockInfoFromPos.ts","size":3797,"chunks":["7515671"]},{"name":"./src/api/pmUtil.ts","size":651,"chunks":["7515671"]},{"name":"./src/api/nodeConversions/nodeToBlock.ts","size":13005,"chunks":["7515671"]},{"name":"./src/schema/inlineContent/internal.ts","size":1428,"chunks":["7515671"]},{"name":"./src/schema/styles/internal.ts","size":2909,"chunks":["7515671"]},{"name":"./src/schema/styles/createSpec.ts","size":2276,"chunks":["7515671"]},{"name":"./src/util/topo-sort.ts","size":2271,"chunks":["7515671"]},{"name":"./src/schema/schema.ts","size":3360,"chunks":["7515671"]},{"name":"./src/api/blockManipulation/tables/tables.ts","size":10346,"chunks":["7515671"]},{"name":"./src/api/nodeConversions/blockToNode.ts","size":7193,"chunks":["7515671"]},{"name":"./src/api/nodeUtil.ts","size":549,"chunks":["7515671"]},{"name":"./src/api/blockManipulation/commands/updateBlock/updateBlock.ts","size":8371,"chunks":["7515671"]},{"name":"./src/editor/defaultColors.ts","size":1193,"chunks":["7515671"]},{"name":"./src/blocks/defaultProps.ts","size":3350,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/parse/parseFigureElement.ts","size":342,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/render/createAddFileButton.ts","size":1809,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/render/createFileNameWithIcon.ts","size":753,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/render/createFileBlockWrapper.ts","size":1374,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/toExternalHTML/createFigureWithCaption.ts","size":307,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/toExternalHTML/createLinkWithCaption.ts","size":294,"chunks":["7515671"]},{"name":"./src/blocks/Audio/parseAudioElement.ts","size":108,"chunks":["7515671"]},{"name":"./src/blocks/Audio/block.ts","size":3593,"chunks":["7515671"]},{"name":"./src/util/EventEmitter.ts","size":744,"chunks":["7515671"]},{"name":"./src/editor/BlockNoteExtension.ts","size":1873,"chunks":["7515671"]},{"name":"./src/blocks/Code/shiki.ts","size":1699,"chunks":["7515671"]},{"name":"./src/blocks/Code/block.ts","size":6492,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/parse/parseEmbedElement.ts","size":108,"chunks":["7515671"]},{"name":"./src/blocks/File/block.ts","size":1766,"chunks":["7515671"]},{"name":"./src/blocks/ToggleWrapper/createToggleWrapper.ts","size":5207,"chunks":["7515671"]},{"name":"./src/blocks/Heading/block.ts","size":2639,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/render/createResizableFileBlockWrapper.ts","size":6266,"chunks":["7515671"]},{"name":"./src/blocks/Image/parseImageElement.ts","size":224,"chunks":["7515671"]},{"name":"./src/blocks/Image/block.ts","size":3777,"chunks":["7515671"]},{"name":"./src/api/blockManipulation/commands/splitBlock/splitBlock.ts","size":909,"chunks":["7515671"]},{"name":"./src/blocks/utils/listItemEnterHandler.ts","size":880,"chunks":["7515671"]},{"name":"./src/blocks/ListItem/getListItemContent.ts","size":1425,"chunks":["7515671"]},{"name":"./src/blocks/ListItem/BulletListItem/block.ts","size":2186,"chunks":["7515671"]},{"name":"./src/blocks/ListItem/CheckListItem/block.ts","size":3824,"chunks":["7515671"]},{"name":"./src/blocks/ListItem/NumberedListItem/IndexingPlugin.ts","size":3124,"chunks":["7515671"]},{"name":"./src/blocks/ListItem/NumberedListItem/block.ts","size":2718,"chunks":["7515671"]},{"name":"./src/blocks/ListItem/ToggleListItem/block.ts","size":1458,"chunks":["7515671"]},{"name":"./src/blocks/PageBreak/block.ts","size":883,"chunks":["7515671"]},{"name":"./src/blocks/Paragraph/block.ts","size":1337,"chunks":["7515671"]},{"name":"./src/blocks/Quote/block.ts","size":1654,"chunks":["7515671"]},{"name":"./src/blocks/Table/TableExtension.ts","size":2297,"chunks":["7515671"]},{"name":"./src/blocks/Table/block.ts","size":8298,"chunks":["7515671"]},{"name":"./src/blocks/Video/parseVideoElement.ts","size":175,"chunks":["7515671"]},{"name":"./src/blocks/Video/block.ts","size":3577,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/uploadToTmpFilesDotOrg_DEV_ONLY.ts","size":316,"chunks":["7515671"]},{"name":"./src/blocks/defaultBlockTypeGuards.ts","size":2213,"chunks":["7515671"]},{"name":"./src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts","size":8782,"chunks":["7515671"]},{"name":"./src/blocks/PageBreak/getPageBreakSlashMenuItems.ts","size":447,"chunks":["7515671"]},{"name":"./src/blocks/defaultBlocks.ts","size":2814,"chunks":["7515671"]},{"name":"./src/blocks/BlockNoteSchema.ts","size":330,"chunks":["7515671"]}]}
1
+ {"builtAt":1759917838321,"assets":[{"name":"blocks.cjs","size":3859},{"name":"comments.cjs","size":11826},{"name":"locales.cjs","size":161252},{"name":"blocknote.cjs","size":140748},{"name":"en-Cl87Uuyf.cjs","size":6760},{"name":"BlockNoteSchema-COA0fsXW.cjs","size":84766},{"name":"en-Cl87Uuyf.cjs.map","size":15254},{"name":"BlockNoteSchema-COA0fsXW.cjs.map","size":416105},{"name":"blocks.cjs.map","size":91},{"name":"comments.cjs.map","size":47628},{"name":"locales.cjs.map","size":331893},{"name":"blocknote.cjs.map","size":631064}],"chunks":[{"id":"c90dbef","entry":true,"initial":true,"files":["blocks.cjs"],"names":["blocks"]},{"id":"1627b02","entry":true,"initial":true,"files":["comments.cjs"],"names":["comments"]},{"id":"9eaffe2","entry":true,"initial":true,"files":["locales.cjs"],"names":["locales"]},{"id":"a1ee98a","entry":true,"initial":true,"files":["blocknote.cjs"],"names":["blocknote"]},{"id":"a1e239a","entry":false,"initial":true,"files":["en-Cl87Uuyf.cjs"],"names":["en"]},{"id":"7515671","entry":false,"initial":true,"files":["BlockNoteSchema-COA0fsXW.cjs"],"names":["BlockNoteSchema"]}],"modules":[{"name":"./src/blocks/index.ts","size":0,"chunks":["c90dbef"]},{"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":9531,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/de.ts","size":10742,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/es.ts","size":10261,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/fr.ts","size":11221,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/he.ts","size":9268,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/hr.ts","size":10088,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/is.ts","size":10269,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/it.ts","size":10687,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ja.ts","size":9098,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ko.ts","size":8586,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/nl.ts","size":10215,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/no.ts","size":10394,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/pl.ts","size":9911,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/pt.ts","size":10066,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ru.ts","size":11236,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/sk.ts","size":9951,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/uk.ts","size":10896,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/vi.ts","size":9932,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/zh.ts","size":8562,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/zh-tw.ts","size":8602,"chunks":["9eaffe2"]},{"name":"./src/i18n/index.ts","size":0,"chunks":["9eaffe2"]},{"name":"./src/schema/inlineContent/createSpec.ts","size":3784,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/insertBlocks/insertBlocks.ts","size":849,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.ts","size":1940,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/util/serializeBlocksExternalHTML.ts","size":7444,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/externalHTMLExporter.ts","size":904,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/util/serializeBlocksInternalHTML.ts","size":4965,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/internalHTMLSerializer.ts","size":288,"chunks":["a1ee98a"]},{"name":"./src/api/getBlocksChangedByTransaction.ts","size":6577,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/acceptedMIMETypes.ts","size":134,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/handleFileInsertion.ts","size":4176,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/fileDropExtension.ts","size":884,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/markdown/detectMarkdown.ts","size":1144,"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/exporters/markdown/util/removeUnderlinesRehypePlugin.ts","size":752,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/util/addSpacesToCheckboxesRehypePlugin.ts","size":775,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/util/convertVideoToMarkdownRehypePlugin.ts","size":470,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/markdownExporter.ts","size":674,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/fragmentToBlocks.ts","size":677,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/toClipboard/copyExtension.ts","size":5191,"chunks":["a1ee98a"]},{"name":"./src/extensions/BackgroundColor/BackgroundColorExtension.ts","size":308,"chunks":["a1ee98a"]},{"name":"./src/extensions/BlockChange/BlockChangePlugin.ts","size":1064,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/CursorPlugin.ts","size":4715,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/SyncPlugin.ts","size":260,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/UndoPlugin.ts","size":281,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/ForkYDocPlugin.ts","size":4323,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/schemaMigration/migrationRules/moveColorAttributes.ts","size":1403,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/schemaMigration/migrationRules/index.ts","size":45,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/schemaMigration/SchemaMigrationPlugin.ts","size":882,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/CommentMark.ts","size":1428,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/userstore/UserStore.ts","size":1370,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/CommentsPlugin.ts","size":7942,"chunks":["a1ee98a"]},{"name":"./src/extensions/FilePanel/FilePanelPlugin.ts","size":4151,"chunks":["a1ee98a"]},{"name":"./src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts","size":7068,"chunks":["a1ee98a"]},{"name":"./src/extensions/HardBreak/HardBreak.ts","size":376,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/mergeBlocks/mergeBlocks.ts","size":3292,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/nestBlock/nestBlock.ts","size":2067,"chunks":["a1ee98a"]},{"name":"./src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts","size":18593,"chunks":["a1ee98a"]},{"name":"./src/extensions/LinkToolbar/LinkToolbarPlugin.ts","size":7731,"chunks":["a1ee98a"]},{"name":"./src/extensions/LinkToolbar/protocols.ts","size":172,"chunks":["a1ee98a"]},{"name":"./src/extensions/NodeSelectionKeyboard/NodeSelectionKeyboardPlugin.ts","size":1383,"chunks":["a1ee98a"]},{"name":"./src/extensions/Placeholder/PlaceholderPlugin.ts","size":3813,"chunks":["a1ee98a"]},{"name":"./src/extensions/PreviousBlockType/PreviousBlockTypePlugin.ts","size":4843,"chunks":["a1ee98a"]},{"name":"./src/extensions/ShowSelection/ShowSelectionPlugin.ts","size":1059,"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":4744,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/SideMenuPlugin.ts","size":16659,"chunks":["a1ee98a"]},{"name":"./src/api/positionMapping.ts","size":1639,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/SuggestionPlugin.ts","size":9266,"chunks":["a1ee98a"]},{"name":"./src/extensions/Suggestions/SuggestionMarks.ts","size":4452,"chunks":["a1ee98a"]},{"name":"./src/extensions/TableHandles/TableHandlesPlugin.ts","size":27510,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextAlignment/TextAlignmentExtension.ts","size":936,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextColor/TextColorExtension.ts","size":293,"chunks":["a1ee98a"]},{"name":"./src/extensions/TrailingNode/TrailingNodeExtension.ts","size":1563,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/BlockContainer.ts","size":2186,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/BlockGroup.ts","size":1162,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/Doc.ts","size":134,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteExtensions.ts","size":5444,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/moveBlocks/moveBlocks.ts","size":5706,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/getBlock/getBlock.ts","size":2087,"chunks":["a1ee98a"]},{"name":"./src/editor/managers/BlockManager.ts","size":6469,"chunks":["a1ee98a"]},{"name":"./src/editor/managers/CollaborationManager.ts","size":2919,"chunks":["a1ee98a"]},{"name":"./src/editor/managers/EventManager.ts","size":1929,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/html/util/nestedLists.ts","size":2170,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/html/parseHTML.ts","size":439,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/markdown/parseMarkdown.ts","size":1760,"chunks":["a1ee98a"]},{"name":"./src/editor/managers/ExportManager.ts","size":3700,"chunks":["a1ee98a"]},{"name":"./src/editor/managers/ExtensionManager.ts","size":2087,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/selections/selection.ts","size":5301,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/selections/textCursorPosition.ts","size":2606,"chunks":["a1ee98a"]},{"name":"./src/editor/managers/SelectionManager.ts","size":2588,"chunks":["a1ee98a"]},{"name":"./src/editor/managers/StateManager.ts","size":5730,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/insertContentAt.ts","size":1049,"chunks":["a1ee98a"]},{"name":"./src/editor/managers/StyleManager.ts","size":4342,"chunks":["a1ee98a"]},{"name":"./src/editor/transformPasted.ts","size":2620,"chunks":["a1ee98a"]},{"name":"./src/style.css","size":0,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteEditor.ts","size":35370,"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":1296,"chunks":["a1ee98a"]},{"name":"./src/util/combineByGroup.ts","size":550,"chunks":["a1ee98a"]},{"name":"./src/index.ts","size":0,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/en.ts","size":9591,"chunks":["a1e239a"]},{"name":"./src/extensions/UniqueID/UniqueID.ts","size":8905,"chunks":["7515671"]},{"name":"./src/schema/inlineContent/types.ts","size":302,"chunks":["7515671"]},{"name":"./src/util/table.ts","size":1212,"chunks":["7515671"]},{"name":"./src/util/typescript.ts","size":331,"chunks":["7515671"]},{"name":"./src/util/browser.ts","size":643,"chunks":["7515671"]},{"name":"./src/blocks/defaultBlockHelpers.ts","size":2103,"chunks":["7515671"]},{"name":"./src/util/string.ts","size":656,"chunks":["7515671"]},{"name":"./src/schema/blocks/internal.ts","size":3387,"chunks":["7515671"]},{"name":"./src/schema/blocks/createSpec.ts","size":6665,"chunks":["7515671"]},{"name":"./src/api/getBlockInfoFromPos.ts","size":3797,"chunks":["7515671"]},{"name":"./src/api/pmUtil.ts","size":651,"chunks":["7515671"]},{"name":"./src/api/nodeConversions/nodeToBlock.ts","size":13005,"chunks":["7515671"]},{"name":"./src/schema/inlineContent/internal.ts","size":1428,"chunks":["7515671"]},{"name":"./src/schema/styles/internal.ts","size":2909,"chunks":["7515671"]},{"name":"./src/schema/styles/createSpec.ts","size":2276,"chunks":["7515671"]},{"name":"./src/util/topo-sort.ts","size":2271,"chunks":["7515671"]},{"name":"./src/schema/schema.ts","size":3360,"chunks":["7515671"]},{"name":"./src/api/blockManipulation/tables/tables.ts","size":10346,"chunks":["7515671"]},{"name":"./src/api/nodeConversions/blockToNode.ts","size":7193,"chunks":["7515671"]},{"name":"./src/api/nodeUtil.ts","size":549,"chunks":["7515671"]},{"name":"./src/api/blockManipulation/commands/updateBlock/updateBlock.ts","size":8371,"chunks":["7515671"]},{"name":"./src/editor/defaultColors.ts","size":1193,"chunks":["7515671"]},{"name":"./src/blocks/defaultProps.ts","size":3350,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/parse/parseFigureElement.ts","size":342,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/render/createAddFileButton.ts","size":1809,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/render/createFileNameWithIcon.ts","size":753,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/render/createFileBlockWrapper.ts","size":1374,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/toExternalHTML/createFigureWithCaption.ts","size":307,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/toExternalHTML/createLinkWithCaption.ts","size":294,"chunks":["7515671"]},{"name":"./src/blocks/Audio/parseAudioElement.ts","size":108,"chunks":["7515671"]},{"name":"./src/blocks/Audio/block.ts","size":3593,"chunks":["7515671"]},{"name":"./src/util/EventEmitter.ts","size":744,"chunks":["7515671"]},{"name":"./src/editor/BlockNoteExtension.ts","size":1873,"chunks":["7515671"]},{"name":"./src/blocks/Code/shiki.ts","size":1699,"chunks":["7515671"]},{"name":"./src/blocks/Code/block.ts","size":6492,"chunks":["7515671"]},{"name":"./src/blocks/Divider/block.ts","size":747,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/parse/parseEmbedElement.ts","size":108,"chunks":["7515671"]},{"name":"./src/blocks/File/block.ts","size":1766,"chunks":["7515671"]},{"name":"./src/blocks/ToggleWrapper/createToggleWrapper.ts","size":5204,"chunks":["7515671"]},{"name":"./src/blocks/Heading/block.ts","size":2639,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/render/createResizableFileBlockWrapper.ts","size":6266,"chunks":["7515671"]},{"name":"./src/blocks/Image/parseImageElement.ts","size":224,"chunks":["7515671"]},{"name":"./src/blocks/Image/block.ts","size":3777,"chunks":["7515671"]},{"name":"./src/api/blockManipulation/commands/splitBlock/splitBlock.ts","size":909,"chunks":["7515671"]},{"name":"./src/blocks/utils/listItemEnterHandler.ts","size":880,"chunks":["7515671"]},{"name":"./src/blocks/ListItem/getListItemContent.ts","size":1425,"chunks":["7515671"]},{"name":"./src/blocks/ListItem/BulletListItem/block.ts","size":2399,"chunks":["7515671"]},{"name":"./src/blocks/ListItem/CheckListItem/block.ts","size":3824,"chunks":["7515671"]},{"name":"./src/blocks/ListItem/NumberedListItem/IndexingPlugin.ts","size":3124,"chunks":["7515671"]},{"name":"./src/blocks/ListItem/NumberedListItem/block.ts","size":2929,"chunks":["7515671"]},{"name":"./src/blocks/ListItem/ToggleListItem/block.ts","size":1458,"chunks":["7515671"]},{"name":"./src/blocks/PageBreak/block.ts","size":883,"chunks":["7515671"]},{"name":"./src/blocks/Paragraph/block.ts","size":1337,"chunks":["7515671"]},{"name":"./src/blocks/Quote/block.ts","size":1654,"chunks":["7515671"]},{"name":"./src/blocks/Table/TableExtension.ts","size":2297,"chunks":["7515671"]},{"name":"./src/blocks/Table/block.ts","size":9792,"chunks":["7515671"]},{"name":"./src/blocks/Video/parseVideoElement.ts","size":175,"chunks":["7515671"]},{"name":"./src/blocks/Video/block.ts","size":3577,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/uploadToTmpFilesDotOrg_DEV_ONLY.ts","size":316,"chunks":["7515671"]},{"name":"./src/blocks/defaultBlockTypeGuards.ts","size":2213,"chunks":["7515671"]},{"name":"./src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts","size":9024,"chunks":["7515671"]},{"name":"./src/blocks/PageBreak/getPageBreakSlashMenuItems.ts","size":447,"chunks":["7515671"]},{"name":"./src/blocks/defaultBlocks.ts","size":2851,"chunks":["7515671"]},{"name":"./src/blocks/BlockNoteSchema.ts","size":330,"chunks":["7515671"]}]}
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "directory": "packages/core"
12
12
  },
13
13
  "license": "MPL-2.0",
14
- "version": "0.39.1",
14
+ "version": "0.41.0",
15
15
  "files": [
16
16
  "dist",
17
17
  "types",
@@ -70,7 +70,7 @@
70
70
  },
71
71
  "dependencies": {
72
72
  "@emoji-mart/data": "^1.2.1",
73
- "@shikijs/types": "3.2.1",
73
+ "@shikijs/types": "3.13.0",
74
74
  "@tiptap/core": "^3.4.3",
75
75
  "@tiptap/extension-bold": "^3",
76
76
  "@tiptap/extension-code": "^3",
@@ -93,7 +93,7 @@
93
93
  "prosemirror-state": "^1.4.3",
94
94
  "prosemirror-tables": "^1.6.4",
95
95
  "prosemirror-transform": "^1.10.4",
96
- "prosemirror-view": "^1.40.1",
96
+ "prosemirror-view": "^1.41.2",
97
97
  "rehype-format": "^5.0.1",
98
98
  "rehype-parse": "^9.0.1",
99
99
  "rehype-remark": "^10.0.1",
@@ -103,6 +103,7 @@
103
103
  "remark-rehype": "^11.1.2",
104
104
  "remark-stringify": "^11.0.0",
105
105
  "unified": "^11.0.5",
106
+ "unist-util-visit": "^5.0.0",
106
107
  "uuid": "^8.3.2",
107
108
  "y-prosemirror": "^1.3.7",
108
109
  "y-protocols": "^1.0.6",
@@ -48,7 +48,7 @@ export const createExternalHTMLExporter = <
48
48
  blocks,
49
49
  serializer,
50
50
  new Set<string>(["numberedListItem"]),
51
- new Set<string>(["bulletListItem", "checkListItem"]),
51
+ new Set<string>(["bulletListItem", "checkListItem", "toggleListItem"]),
52
52
  options,
53
53
  );
54
54
  const div = document.createElement("div");
@@ -147,6 +147,7 @@ function serializeBlock<
147
147
  (props as any)[name] = spec.default;
148
148
  }
149
149
  }
150
+ const children = block.children || [];
150
151
 
151
152
  const impl = editor.blockImplementations[block.type as any].implementation;
152
153
  const ret = impl.render.call(
@@ -154,7 +155,7 @@ function serializeBlock<
154
155
  renderType: "dom",
155
156
  props: undefined,
156
157
  },
157
- { ...block, props } as any,
158
+ { ...block, props, children } as any,
158
159
  editor as any,
159
160
  );
160
161
 
@@ -13,13 +13,15 @@ import {
13
13
  StyleSchema,
14
14
  } from "../../../schema/index.js";
15
15
  import { createExternalHTMLExporter } from "../html/externalHTMLExporter.js";
16
- import { removeUnderlines } from "./removeUnderlinesRehypePlugin.js";
16
+ import { removeUnderlines } from "./util/removeUnderlinesRehypePlugin.js";
17
17
  import { addSpacesToCheckboxes } from "./util/addSpacesToCheckboxesRehypePlugin.js";
18
+ import { convertVideoToMarkdown } from "./util/convertVideoToMarkdownRehypePlugin.js";
18
19
 
19
20
  // Needs to be sync because it's used in drag handler event (SideMenuPlugin)
20
21
  export function cleanHTMLToMarkdown(cleanHTMLString: string) {
21
22
  const markdownString = unified()
22
23
  .use(rehypeParse, { fragment: true })
24
+ .use(convertVideoToMarkdown)
23
25
  .use(removeUnderlines)
24
26
  .use(addSpacesToCheckboxes)
25
27
  .use(rehypeRemark)
@@ -0,0 +1,19 @@
1
+ import { Parent as HASTParent } from "hast";
2
+ import { visit } from "unist-util-visit";
3
+
4
+ // Originally, rehypeParse parses videos as links, which is incorrect.
5
+ export function convertVideoToMarkdown() {
6
+ return (tree: HASTParent) => {
7
+ visit(tree, "element", (node, index, parent) => {
8
+ if (parent && node.tagName === "video") {
9
+ const src = node.properties?.src || node.properties?.["data-url"] || "";
10
+ const name =
11
+ node.properties?.title || node.properties?.["data-name"] || "";
12
+ parent.children[index!] = {
13
+ type: "text",
14
+ value: `![${name}](${src})`,
15
+ };
16
+ }
17
+ });
18
+ };
19
+ }
@@ -14,6 +14,7 @@ import {
14
14
  StyleSchema,
15
15
  } from "../../../schema/index.js";
16
16
  import { HTMLToBlocks } from "../html/parseHTML.js";
17
+ import { isVideoUrl } from "../../../util/string.js";
17
18
 
18
19
  // modified version of https://github.com/syntax-tree/mdast-util-to-hast/blob/main/lib/handlers/code.js
19
20
  // that outputs a data-language attribute instead of a CSS class (e.g.: language-typescript)
@@ -54,6 +55,27 @@ function code(state: any, node: any) {
54
55
  return result;
55
56
  }
56
57
 
58
+ function video(state: any, node: any) {
59
+ const url = String(node?.url || "");
60
+ const title = node?.title ? String(node.title) : undefined;
61
+
62
+ let result: any = {
63
+ type: "element",
64
+ tagName: "video",
65
+ properties: {
66
+ src: url,
67
+ "data-name": title,
68
+ "data-url": url,
69
+ controls: true,
70
+ },
71
+ children: [],
72
+ };
73
+ state.patch?.(node, result);
74
+ result = state.applyData ? state.applyData(node, result) : result;
75
+
76
+ return result;
77
+ }
78
+
57
79
  export function markdownToHTML(markdown: string): string {
58
80
  const htmlString = unified()
59
81
  .use(remarkParse)
@@ -61,6 +83,15 @@ export function markdownToHTML(markdown: string): string {
61
83
  .use(remarkRehype, {
62
84
  handlers: {
63
85
  ...(remarkRehypeDefaultHandlers as any),
86
+ image: (state: any, node: any) => {
87
+ const url = String(node?.url || "");
88
+
89
+ if (isVideoUrl(url)) {
90
+ return video(state, node);
91
+ } else {
92
+ return remarkRehypeDefaultHandlers.image(state, node);
93
+ }
94
+ },
64
95
  code,
65
96
  },
66
97
  })
@@ -117,18 +117,6 @@ export const createCodeBlockSpec = createBlockSpec(
117
117
  if (options.supportedLanguages) {
118
118
  const select = document.createElement("select");
119
119
 
120
- const handleLanguageChange = (event: Event) => {
121
- const language = (event.target as HTMLSelectElement).value;
122
-
123
- editor.updateBlock(block.id, { props: { language } });
124
- };
125
- select.addEventListener("change", handleLanguageChange);
126
-
127
- const selectWrapper = document.createElement("div");
128
- selectWrapper.contentEditable = "false";
129
- select.value =
130
- block.props.language || options.defaultLanguage || "text";
131
-
132
120
  Object.entries(options.supportedLanguages ?? {}).forEach(
133
121
  ([id, { name }]) => {
134
122
  const option = document.createElement("option");
@@ -138,11 +126,23 @@ export const createCodeBlockSpec = createBlockSpec(
138
126
  select.appendChild(option);
139
127
  },
140
128
  );
141
- selectWrapper.appendChild(select);
142
- wrapper.appendChild(selectWrapper);
129
+ select.value =
130
+ block.props.language || options.defaultLanguage || "text";
143
131
 
132
+ const handleLanguageChange = (event: Event) => {
133
+ const language = (event.target as HTMLSelectElement).value;
134
+
135
+ editor.updateBlock(block.id, { props: { language } });
136
+ };
137
+ select.addEventListener("change", handleLanguageChange);
144
138
  removeSelectChangeListener = () =>
145
139
  select.removeEventListener("change", handleLanguageChange);
140
+
141
+ const selectWrapper = document.createElement("div");
142
+ selectWrapper.contentEditable = "false";
143
+
144
+ selectWrapper.appendChild(select);
145
+ wrapper.appendChild(selectWrapper);
146
146
  }
147
147
  wrapper.appendChild(pre);
148
148
 
@@ -0,0 +1,49 @@
1
+ import { createBlockNoteExtension } from "../../editor/BlockNoteExtension.js";
2
+ import { createBlockConfig, createBlockSpec } from "../../schema/index.js";
3
+
4
+ export type DividerBlockConfig = ReturnType<typeof createDividerBlockConfig>;
5
+
6
+ export const createDividerBlockConfig = createBlockConfig(
7
+ () =>
8
+ ({
9
+ type: "divider" as const,
10
+ propSchema: {},
11
+ content: "none",
12
+ }) as const,
13
+ );
14
+
15
+ export const createDividerBlockSpec = createBlockSpec(
16
+ createDividerBlockConfig,
17
+ {
18
+ meta: {
19
+ isolating: false,
20
+ },
21
+ parse(element) {
22
+ if (element.tagName === "HR") {
23
+ return {};
24
+ }
25
+
26
+ return undefined;
27
+ },
28
+ render() {
29
+ const dom = document.createElement("hr");
30
+
31
+ return {
32
+ dom,
33
+ };
34
+ },
35
+ },
36
+ [
37
+ createBlockNoteExtension({
38
+ key: "divider-block-shortcuts",
39
+ inputRules: [
40
+ {
41
+ find: new RegExp(`^---$`),
42
+ replace() {
43
+ return { type: "divider", props: {}, content: [] };
44
+ },
45
+ },
46
+ ],
47
+ }),
48
+ ],
49
+ );
@@ -1,3 +1,4 @@
1
+ import { getBlockInfoFromSelection } from "../../../api/getBlockInfoFromPos.js";
1
2
  import { createBlockNoteExtension } from "../../../editor/BlockNoteExtension.js";
2
3
  import { createBlockConfig, createBlockSpec } from "../../../schema/index.js";
3
4
  import {
@@ -103,7 +104,14 @@ export const createBulletListItemBlockSpec = createBlockSpec(
103
104
  inputRules: [
104
105
  {
105
106
  find: new RegExp(`^[-+*]\\s$`),
106
- replace() {
107
+ replace({ editor }) {
108
+ const blockInfo = getBlockInfoFromSelection(
109
+ editor.prosemirrorState,
110
+ );
111
+
112
+ if (blockInfo.blockNoteType === "heading") {
113
+ return;
114
+ }
107
115
  return {
108
116
  type: "bulletListItem",
109
117
  props: {},
@@ -75,6 +75,7 @@ export const createCheckListItemBlockSpec = createBlockSpec(
75
75
  getListItemContent(el, schema, "checkListItem"),
76
76
  render(block, editor) {
77
77
  const dom = document.createDocumentFragment();
78
+
78
79
  const checkbox = document.createElement("input");
79
80
  checkbox.type = "checkbox";
80
81
  checkbox.checked = block.props.checked;
@@ -1,3 +1,4 @@
1
+ import { getBlockInfoFromSelection } from "../../../api/getBlockInfoFromPos.js";
1
2
  import { createBlockNoteExtension } from "../../../editor/BlockNoteExtension.js";
2
3
  import { createBlockConfig, createBlockSpec } from "../../../schema/index.js";
3
4
  import {
@@ -95,7 +96,14 @@ export const createNumberedListItemBlockSpec = createBlockSpec(
95
96
  inputRules: [
96
97
  {
97
98
  find: new RegExp(`^(\\d+)\\.\\s$`),
98
- replace({ match }) {
99
+ replace({ match, editor }) {
100
+ const blockInfo = getBlockInfoFromSelection(
101
+ editor.prosemirrorState,
102
+ );
103
+
104
+ if (blockInfo.blockNoteType === "heading") {
105
+ return;
106
+ }
99
107
  const start = parseInt(match[1]);
100
108
  return {
101
109
  type: "numberedListItem",
@@ -1,11 +1,12 @@
1
1
  import { Node, mergeAttributes } from "@tiptap/core";
2
2
  import { DOMParser, Fragment, Node as PMNode, Schema } from "prosemirror-model";
3
- import { TableView } from "prosemirror-tables";
3
+ import { CellSelection, TableView } from "prosemirror-tables";
4
4
  import { NodeView } from "prosemirror-view";
5
5
  import { createBlockNoteExtension } from "../../editor/BlockNoteExtension.js";
6
6
  import {
7
7
  BlockConfig,
8
8
  createBlockSpecFromTiptapNode,
9
+ TableContent,
9
10
  } from "../../schema/index.js";
10
11
  import { mergeCSSClasses } from "../../util/browser.js";
11
12
  import { createDefaultBlockDOMOutputSpec } from "../defaultBlockHelpers.js";
@@ -394,6 +395,60 @@ export const createTableBlockSpec = () =>
394
395
  TiptapTableRow,
395
396
  ],
396
397
  }),
398
+ // Extension for keyboard shortcut which deletes the table if it's empty
399
+ // and all cells are selected. Uses a separate extension as it needs
400
+ // priority over keyboard handlers in the `TableExtension`'s
401
+ // `tableEditing` plugin.
402
+ createBlockNoteExtension({
403
+ key: "table-keyboard-delete",
404
+ keyboardShortcuts: {
405
+ Backspace: ({ editor }) => {
406
+ if (!(editor.prosemirrorState.selection instanceof CellSelection)) {
407
+ return false;
408
+ }
409
+
410
+ const block = editor.getTextCursorPosition().block;
411
+ const content = block.content as TableContent<any, any>;
412
+
413
+ let numCells = 0;
414
+ for (const row of content.rows) {
415
+ for (const cell of row.cells) {
416
+ // Returns `false` if any cell isn't empty.
417
+ if (
418
+ ("type" in cell && cell.content.length > 0) ||
419
+ (!("type" in cell) && cell.length > 0)
420
+ ) {
421
+ return false;
422
+ }
423
+
424
+ numCells++;
425
+ }
426
+ }
427
+
428
+ // Need to use ProseMirror API to check number of selected cells.
429
+ let selectionNumCells = 0;
430
+ editor.prosemirrorState.selection.forEachCell(() => {
431
+ selectionNumCells++;
432
+ });
433
+
434
+ if (selectionNumCells < numCells) {
435
+ return false;
436
+ }
437
+
438
+ editor.transact(() => {
439
+ const selectionBlock =
440
+ editor.getPrevBlock(block) || editor.getNextBlock(block);
441
+ if (selectionBlock) {
442
+ editor.setTextCursorPosition(block);
443
+ }
444
+
445
+ editor.removeBlocks([block]);
446
+ });
447
+
448
+ return true;
449
+ },
450
+ },
451
+ }),
397
452
  ],
398
453
  );
399
454
 
@@ -28,7 +28,7 @@ export const createToggleWrapper = (
28
28
  ignoreMutation?: (mutation: ViewMutationRecord) => boolean;
29
29
  destroy?: () => void;
30
30
  } => {
31
- if (!("isToggleable" in block.props) || !block.props.isToggleable) {
31
+ if ("isToggleable" in block.props && !block.props.isToggleable) {
32
32
  return {
33
33
  dom: renderedElement,
34
34
  };
@@ -3,11 +3,26 @@ import Code from "@tiptap/extension-code";
3
3
  import Italic from "@tiptap/extension-italic";
4
4
  import Strike from "@tiptap/extension-strike";
5
5
  import Underline from "@tiptap/extension-underline";
6
+ import { COLORS_DEFAULT } from "../editor/defaultColors.js";
7
+ import {
8
+ BlockNoDefaults,
9
+ BlockSchema,
10
+ InlineContentSchema,
11
+ InlineContentSpecs,
12
+ PartialBlockNoDefaults,
13
+ StyleSchema,
14
+ StyleSpecs,
15
+ createStyleSpec,
16
+ createStyleSpecFromTipTapMark,
17
+ getInlineContentSchemaFromSpecs,
18
+ getStyleSchemaFromSpecs,
19
+ } from "../schema/index.js";
6
20
  import {
7
21
  createAudioBlockSpec,
8
22
  createBulletListItemBlockSpec,
9
23
  createCheckListItemBlockSpec,
10
24
  createCodeBlockSpec,
25
+ createDividerBlockSpec,
11
26
  createFileBlockSpec,
12
27
  createHeadingBlockSpec,
13
28
  createImageBlockSpec,
@@ -18,27 +33,14 @@ import {
18
33
  createVideoBlockSpec,
19
34
  defaultProps,
20
35
  } from "./index.js";
21
- import {
22
- BlockNoDefaults,
23
- BlockSchema,
24
- InlineContentSchema,
25
- InlineContentSpecs,
26
- PartialBlockNoDefaults,
27
- StyleSchema,
28
- StyleSpecs,
29
- createStyleSpec,
30
- createStyleSpecFromTipTapMark,
31
- getInlineContentSchemaFromSpecs,
32
- getStyleSchemaFromSpecs,
33
- } from "../schema/index.js";
34
36
  import { createTableBlockSpec } from "./Table/block.js";
35
- import { COLORS_DEFAULT } from "../editor/defaultColors.js";
36
37
 
37
38
  export const defaultBlockSpecs = {
38
39
  audio: createAudioBlockSpec(),
39
40
  bulletListItem: createBulletListItemBlockSpec(),
40
41
  checkListItem: createCheckListItemBlockSpec(),
41
42
  codeBlock: createCodeBlockSpec(),
43
+ divider: createDividerBlockSpec(),
42
44
  file: createFileBlockSpec(),
43
45
  heading: createHeadingBlockSpec(),
44
46
  image: createImageBlockSpec(),
@@ -1,6 +1,7 @@
1
1
  export * from "./Audio/block.js";
2
2
  export * from "./Audio/parseAudioElement.js";
3
3
  export * from "./Code/block.js";
4
+ export * from "./Divider/block.js";
4
5
  export * from "./File/block.js";
5
6
  export * from "./Heading/block.js";
6
7
  export * from "./Image/block.js";
@@ -184,6 +184,14 @@ NESTED BLOCKS
184
184
  padding-left: 1em;
185
185
  }
186
186
 
187
+ /* DIVIDERS */
188
+ [data-content-type="divider"] hr {
189
+ border: none;
190
+ border-top: 1px solid rgb(125, 121, 122);
191
+ margin: 0.5em 0;
192
+ flex: 1;
193
+ }
194
+
187
195
  /* LISTS */
188
196
 
189
197
  .bn-block-content::before {
@@ -232,21 +240,13 @@ NESTED BLOCKS
232
240
  }
233
241
 
234
242
  /* Checked */
235
- .bn-block-content[data-content-type="checkListItem"] > div {
236
- display: flex;
237
- width: 100%;
238
- }
239
-
240
- .bn-block-content[data-content-type="checkListItem"] > div > div {
241
- display: flex;
242
- justify-content: center;
243
- min-width: 24px;
244
- padding-right: 4px;
245
- }
246
-
247
- .bn-block-content[data-content-type="checkListItem"] > div > div > input {
248
- margin: 0;
243
+ .bn-block-content[data-content-type="checkListItem"] > input {
249
244
  cursor: pointer;
245
+ height: 24px;
246
+ margin-left: 4px;
247
+ margin-right: 8px;
248
+ margin-top: 0;
249
+ width: 12px;
250
250
  }
251
251
 
252
252
  .bn-block-content[data-content-type="checkListItem"][data-checked="true"]
@@ -263,12 +263,6 @@ NESTED BLOCKS
263
263
  }
264
264
 
265
265
  /* Toggle */
266
- .bn-block-content:has(.bn-toggle-wrapper) > div {
267
- display: flex;
268
- flex-direction: column;
269
- gap: 4px;
270
- }
271
-
272
266
  .bn-block:has(
273
267
  > .bn-block-content > div > .bn-toggle-wrapper[data-show-children="false"]
274
268
  )