@blocknote/core 0.36.1 → 0.38.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.
- package/dist/blocknote.cjs +9 -9
- package/dist/blocknote.cjs.map +1 -1
- package/dist/blocknote.js +1689 -1715
- package/dist/blocknote.js.map +1 -1
- package/dist/{en-CvDoFvhc.js → en-Bq3Es3Np.js} +6 -12
- package/dist/en-Bq3Es3Np.js.map +1 -0
- package/dist/en-D3B48eJ7.cjs +2 -0
- package/dist/en-D3B48eJ7.cjs.map +1 -0
- package/dist/locales.cjs +1 -1
- package/dist/locales.cjs.map +1 -1
- package/dist/locales.js +109 -229
- package/dist/locales.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +7 -7
- package/src/api/clipboard/toClipboard/copyExtension.ts +0 -2
- package/src/api/exporters/html/externalHTMLExporter.ts +0 -1
- package/src/api/exporters/markdown/markdownExporter.ts +13 -22
- package/src/api/exporters/markdown/util/addSpacesToCheckboxesRehypePlugin.ts +2 -12
- package/src/api/parsers/html/parseHTML.ts +3 -2
- package/src/api/parsers/html/util/nestedLists.test.ts +8 -8
- package/src/api/parsers/markdown/parseMarkdown.ts +17 -14
- package/src/api/positionMapping.test.ts +155 -34
- package/src/api/positionMapping.ts +2 -2
- package/src/blocks/AudioBlockContent/AudioBlockContent.ts +0 -1
- package/src/blocks/FileBlockContent/helpers/render/createAddFileButton.ts +3 -2
- package/src/blocks/FileBlockContent/helpers/render/createFileBlockWrapper.ts +1 -7
- package/src/blocks/FileBlockContent/helpers/render/createResizableFileBlockWrapper.ts +64 -17
- package/src/blocks/ImageBlockContent/ImageBlockContent.ts +0 -1
- package/src/blocks/TableBlockContent/TableBlockContent.ts +2 -5
- package/src/blocks/VideoBlockContent/VideoBlockContent.ts +0 -1
- package/src/editor/BlockNoteEditor.ts +17 -23
- package/src/editor/BlockNoteExtensions.ts +3 -0
- package/src/editor/editor.css +5 -0
- package/src/extensions/Comments/CommentsPlugin.ts +2 -0
- package/src/extensions/SideMenu/SideMenuPlugin.ts +0 -2
- package/src/i18n/locales/ar.ts +6 -12
- package/src/i18n/locales/de.ts +6 -12
- package/src/i18n/locales/en.ts +6 -12
- package/src/i18n/locales/es.ts +6 -12
- package/src/i18n/locales/fr.ts +6 -12
- package/src/i18n/locales/he.ts +6 -12
- package/src/i18n/locales/hr.ts +6 -12
- package/src/i18n/locales/is.ts +6 -12
- package/src/i18n/locales/it.ts +6 -12
- package/src/i18n/locales/ja.ts +6 -12
- package/src/i18n/locales/ko.ts +6 -12
- package/src/i18n/locales/nl.ts +6 -12
- package/src/i18n/locales/no.ts +6 -12
- package/src/i18n/locales/pl.ts +6 -12
- package/src/i18n/locales/pt.ts +6 -12
- package/src/i18n/locales/ru.ts +6 -12
- package/src/i18n/locales/sk.ts +6 -12
- package/src/i18n/locales/uk.ts +6 -12
- package/src/i18n/locales/vi.ts +6 -12
- package/src/i18n/locales/zh-tw.ts +6 -12
- package/src/i18n/locales/zh.ts +6 -12
- package/src/index.ts +0 -1
- package/types/src/api/exporters/markdown/markdownExporter.d.ts +1 -1
- package/types/src/api/parsers/html/parseHTML.d.ts +1 -1
- package/types/src/api/parsers/markdown/parseMarkdown.d.ts +2 -2
- package/types/src/blocks/FileBlockContent/helpers/render/createAddFileButton.d.ts +1 -1
- package/types/src/blocks/FileBlockContent/helpers/render/createFileBlockWrapper.d.ts +1 -1
- package/types/src/blocks/FileBlockContent/helpers/render/createResizableFileBlockWrapper.d.ts +1 -1
- package/types/src/editor/BlockNoteEditor.d.ts +6 -9
- package/types/src/editor/BlockNoteExtensions.d.ts +2 -0
- package/types/src/extensions/Comments/CommentsPlugin.d.ts +3 -1
- package/types/src/i18n/locales/en.d.ts +1 -12
- package/types/src/i18n/locales/sk.d.ts +1 -12
- package/types/src/index.d.ts +0 -1
- package/dist/en-CvDoFvhc.js.map +0 -1
- package/dist/en-ub2yVBX0.cjs +0 -2
- package/dist/en-ub2yVBX0.cjs.map +0 -1
- package/src/util/esmDependencies.ts +0 -51
- package/types/src/util/esmDependencies.d.ts +0 -24
package/dist/webpack-stats.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"builtAt":1756302964421,"assets":[{"name":"blocknote.cjs","size":202097},{"name":"comments.cjs","size":11826},{"name":"locales.cjs","size":159619},{"name":"en-ub2yVBX0.cjs","size":6684},{"name":"en-ub2yVBX0.cjs.map","size":15098},{"name":"comments.cjs.map","size":47628},{"name":"locales.cjs.map","size":328798},{"name":"blocknote.cjs.map","size":967777}],"chunks":[{"id":"a1ee98a","entry":true,"initial":true,"files":["blocknote.cjs"],"names":["blocknote"]},{"id":"1627b02","entry":true,"initial":true,"files":["comments.cjs"],"names":["comments"]},{"id":"9eaffe2","entry":true,"initial":true,"files":["locales.cjs"],"names":["locales"]},{"id":"a1e239a","entry":false,"initial":true,"files":["en-ub2yVBX0.cjs"],"names":["en"]}],"modules":[{"name":"./src/extensions/UniqueID/UniqueID.ts","size":9054,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/types.ts","size":302,"chunks":["a1ee98a"]},{"name":"./src/util/table.ts","size":1212,"chunks":["a1ee98a"]},{"name":"./src/util/typescript.ts","size":331,"chunks":["a1ee98a"]},{"name":"./src/util/browser.ts","size":643,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlockHelpers.ts","size":2080,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultProps.ts","size":269,"chunks":["a1ee98a"]},{"name":"./src/util/string.ts","size":299,"chunks":["a1ee98a"]},{"name":"./src/schema/blocks/internal.ts","size":4072,"chunks":["a1ee98a"]},{"name":"./src/schema/blocks/createSpec.ts","size":3647,"chunks":["a1ee98a"]},{"name":"./src/api/getBlockInfoFromPos.ts","size":3797,"chunks":["a1ee98a"]},{"name":"./src/api/pmUtil.ts","size":651,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/nodeToBlock.ts","size":13005,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/internal.ts","size":1398,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/createSpec.ts","size":2559,"chunks":["a1ee98a"]},{"name":"./src/schema/styles/internal.ts","size":1162,"chunks":["a1ee98a"]},{"name":"./src/schema/styles/createSpec.ts","size":1263,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/tables/tables.ts","size":10346,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/blockToNode.ts","size":7193,"chunks":["a1ee98a"]},{"name":"./src/api/nodeUtil.ts","size":549,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/insertBlocks/insertBlocks.ts","size":785,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.ts","size":1876,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/updateBlock/updateBlock.ts","size":8371,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/util/serializeBlocksExternalHTML.ts","size":5025,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/externalHTMLExporter.ts","size":886,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/util/serializeBlocksInternalHTML.ts","size":3099,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/internalHTMLSerializer.ts","size":288,"chunks":["a1ee98a"]},{"name":"./src/api/getBlocksChangedByTransaction.ts","size":6513,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/parse/parseFigureElement.ts","size":342,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createAddFileButton.ts","size":1710,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createFileNameWithIcon.ts","size":753,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createFileBlockWrapper.ts","size":1428,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/toExternalHTML/createFigureWithCaption.ts","size":307,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/toExternalHTML/createLinkWithCaption.ts","size":294,"chunks":["a1ee98a"]},{"name":"./src/blocks/AudioBlockContent/parseAudioElement.ts","size":108,"chunks":["a1ee98a"]},{"name":"./src/blocks/AudioBlockContent/AudioBlockContent.ts","size":3219,"chunks":["a1ee98a"]},{"name":"./src/blocks/CodeBlockContent/CodeBlockContent.ts","size":9248,"chunks":["a1ee98a"]},{"name":"./src/extensions/BackgroundColor/BackgroundColorMark.ts","size":946,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextColor/TextColorMark.ts","size":866,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/parse/parseEmbedElement.ts","size":108,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/FileBlockContent.ts","size":1524,"chunks":["a1ee98a"]},{"name":"./src/blocks/ToggleWrapper/createToggleWrapper.ts","size":5204,"chunks":["a1ee98a"]},{"name":"./src/blocks/HeadingBlockContent/HeadingBlockContent.ts","size":3467,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createResizableFileBlockWrapper.ts","size":4836,"chunks":["a1ee98a"]},{"name":"./src/blocks/ImageBlockContent/parseImageElement.ts","size":224,"chunks":["a1ee98a"]},{"name":"./src/blocks/ImageBlockContent/ImageBlockContent.ts","size":3374,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/splitBlock/splitBlock.ts","size":868,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/ListItemKeyboardShortcuts.ts","size":1495,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/ToggleListItemBlockContent/ToggleListItemBlockContent.ts","size":2228,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/getListItemContent.ts","size":1425,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.ts","size":3162,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/CheckListItemBlockContent/CheckListItemBlockContent.ts","size":7286,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListIndexingPlugin.ts","size":2207,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.ts","size":4098,"chunks":["a1ee98a"]},{"name":"./src/blocks/ParagraphBlockContent/ParagraphBlockContent.ts","size":1520,"chunks":["a1ee98a"]},{"name":"./src/blocks/QuoteBlockContent/QuoteBlockContent.ts","size":2338,"chunks":["a1ee98a"]},{"name":"./src/blocks/TableBlockContent/TableExtension.ts","size":2297,"chunks":["a1ee98a"]},{"name":"./src/blocks/TableBlockContent/TableBlockContent.ts","size":6848,"chunks":["a1ee98a"]},{"name":"./src/blocks/VideoBlockContent/parseVideoElement.ts","size":175,"chunks":["a1ee98a"]},{"name":"./src/blocks/VideoBlockContent/VideoBlockContent.ts","size":3293,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlocks.ts","size":1197,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlockTypeGuards.ts","size":2098,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/uploadToTmpFilesDotOrg_DEV_ONLY.ts","size":316,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts","size":8656,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteSchema.ts","size":1044,"chunks":["a1ee98a"]},{"name":"./src/blocks/PageBreakBlockContent/PageBreakBlockContent.ts","size":854,"chunks":["a1ee98a"]},{"name":"./src/blocks/PageBreakBlockContent/schema.ts","size":350,"chunks":["a1ee98a"]},{"name":"./src/blocks/PageBreakBlockContent/getPageBreakSlashMenuItems.ts","size":536,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/moveBlocks/moveBlocks.ts","size":5642,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/nestBlock/nestBlock.ts","size":2035,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/getBlock/getBlock.ts","size":1895,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/insertContentAt.ts","size":1049,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/selections/selection.ts","size":5093,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/selections/textCursorPosition.ts","size":2430,"chunks":["a1ee98a"]},{"name":"./src/util/esmDependencies.ts","size":820,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/removeUnderlinesRehypePlugin.ts","size":752,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/util/addSpacesToCheckboxesRehypePlugin.ts","size":969,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/markdownExporter.ts","size":837,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/html/util/nestedLists.ts","size":2174,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/html/parseHTML.ts","size":429,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/markdown/parseMarkdown.ts","size":1129,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/acceptedMIMETypes.ts","size":134,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/handleFileInsertion.ts","size":4255,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/fileDropExtension.ts","size":884,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/markdown/detectMarkdown.ts","size":1140,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/handleVSCodePaste.ts","size":661,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/pasteExtension.ts","size":2412,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/fragmentToBlocks.ts","size":629,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/toClipboard/copyExtension.ts","size":5192,"chunks":["a1ee98a"]},{"name":"./src/extensions/BackgroundColor/BackgroundColorExtension.ts","size":819,"chunks":["a1ee98a"]},{"name":"./src/util/EventEmitter.ts","size":744,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteExtension.ts","size":345,"chunks":["a1ee98a"]},{"name":"./src/extensions/BlockChange/BlockChangePlugin.ts","size":988,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/CursorPlugin.ts","size":4699,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/SyncPlugin.ts","size":244,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/UndoPlugin.ts","size":265,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/CommentMark.ts","size":1428,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/userstore/UserStore.ts","size":1354,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/CommentsPlugin.ts","size":7815,"chunks":["a1ee98a"]},{"name":"./src/extensions/FilePanel/FilePanelPlugin.ts","size":4135,"chunks":["a1ee98a"]},{"name":"./src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts","size":7052,"chunks":["a1ee98a"]},{"name":"./src/extensions/HardBreak/HardBreak.ts","size":376,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/mergeBlocks/mergeBlocks.ts","size":3228,"chunks":["a1ee98a"]},{"name":"./src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts","size":18379,"chunks":["a1ee98a"]},{"name":"./src/extensions/LinkToolbar/LinkToolbarPlugin.ts","size":7699,"chunks":["a1ee98a"]},{"name":"./src/extensions/LinkToolbar/protocols.ts","size":172,"chunks":["a1ee98a"]},{"name":"./src/extensions/NodeSelectionKeyboard/NodeSelectionKeyboardPlugin.ts","size":1367,"chunks":["a1ee98a"]},{"name":"./src/extensions/Placeholder/PlaceholderPlugin.ts","size":3895,"chunks":["a1ee98a"]},{"name":"./src/extensions/PreviousBlockType/PreviousBlockTypePlugin.ts","size":5232,"chunks":["a1ee98a"]},{"name":"./src/extensions/ShowSelection/ShowSelectionPlugin.ts","size":1043,"chunks":["a1ee98a"]},{"name":"./src/extensions/getDraggableBlockFromElement.ts","size":404,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/MultipleNodeSelection.ts","size":1700,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/dragging.ts","size":4718,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/SideMenuPlugin.ts","size":16723,"chunks":["a1ee98a"]},{"name":"./src/api/positionMapping.ts","size":1652,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/SuggestionPlugin.ts","size":9360,"chunks":["a1ee98a"]},{"name":"./src/extensions/Suggestions/SuggestionMarks.ts","size":4452,"chunks":["a1ee98a"]},{"name":"./src/extensions/TableHandles/TableHandlesPlugin.ts","size":27335,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextAlignment/TextAlignmentExtension.ts","size":976,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextColor/TextColorExtension.ts","size":753,"chunks":["a1ee98a"]},{"name":"./src/extensions/TrailingNode/TrailingNodeExtension.ts","size":1563,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/BlockContainer.ts","size":2170,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/BlockGroup.ts","size":1146,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/Doc.ts","size":134,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/ForkYDocPlugin.ts","size":4307,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteExtensions.ts","size":5435,"chunks":["a1ee98a"]},{"name":"./src/editor/transformPasted.ts","size":2604,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteTipTapEditor.ts","size":5736,"chunks":["a1ee98a"]},{"name":"./src/style.css","size":0,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteEditor.ts","size":37801,"chunks":["a1ee98a"]},{"name":"./src/editor/defaultColors.ts","size":1193,"chunks":["a1ee98a"]},{"name":"./src/exporter/Exporter.ts","size":1101,"chunks":["a1ee98a"]},{"name":"./src/exporter/mapping.ts","size":197,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/getDefaultEmojiPickerItems.ts","size":1204,"chunks":["a1ee98a"]},{"name":"./src/util/combineByGroup.ts","size":550,"chunks":["a1ee98a"]},{"name":"./src/index.ts","size":0,"chunks":["a1ee98a"]},{"name":"./src/comments/threadstore/ThreadStoreAuth.ts","size":25,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/DefaultThreadStoreAuth.ts","size":2014,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/ThreadStore.ts","size":77,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/TipTapThreadStore.ts","size":5321,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/yjsHelpers.ts","size":3002,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/YjsThreadStoreBase.ts","size":790,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/RESTYjsThreadStore.ts","size":2069,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/YjsThreadStore.ts","size":7267,"chunks":["1627b02"]},{"name":"./src/comments/index.ts","size":0,"chunks":["1627b02"]},{"name":"./src/i18n/locales/ar.ts","size":9460,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/de.ts","size":10643,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/es.ts","size":10181,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/fr.ts","size":11129,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/he.ts","size":9193,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/hr.ts","size":10002,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/is.ts","size":10183,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/it.ts","size":10607,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ja.ts","size":9036,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ko.ts","size":8532,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/nl.ts","size":10113,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/no.ts","size":10289,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/pl.ts","size":9828,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/pt.ts","size":9982,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ru.ts","size":11154,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/sk.ts","size":9870,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/uk.ts","size":10817,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/vi.ts","size":9858,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/zh.ts","size":8510,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/zh-tw.ts","size":8550,"chunks":["9eaffe2"]},{"name":"./src/i18n/index.ts","size":0,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/en.ts","size":9502,"chunks":["a1e239a"]}]}
|
|
1
|
+
{"builtAt":1758009858655,"assets":[{"name":"blocknote.cjs","size":201865},{"name":"comments.cjs","size":11826},{"name":"locales.cjs","size":158539},{"name":"en-D3B48eJ7.cjs","size":6630},{"name":"en-D3B48eJ7.cjs.map","size":14973},{"name":"comments.cjs.map","size":47628},{"name":"locales.cjs.map","size":326303},{"name":"blocknote.cjs.map","size":966585}],"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-D3B48eJ7.cjs"],"names":["en"]}],"modules":[{"name":"./src/extensions/UniqueID/UniqueID.ts","size":9054,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/types.ts","size":302,"chunks":["a1ee98a"]},{"name":"./src/util/table.ts","size":1212,"chunks":["a1ee98a"]},{"name":"./src/util/typescript.ts","size":331,"chunks":["a1ee98a"]},{"name":"./src/util/browser.ts","size":643,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlockHelpers.ts","size":2080,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultProps.ts","size":269,"chunks":["a1ee98a"]},{"name":"./src/util/string.ts","size":299,"chunks":["a1ee98a"]},{"name":"./src/schema/blocks/internal.ts","size":4072,"chunks":["a1ee98a"]},{"name":"./src/schema/blocks/createSpec.ts","size":3647,"chunks":["a1ee98a"]},{"name":"./src/api/getBlockInfoFromPos.ts","size":3797,"chunks":["a1ee98a"]},{"name":"./src/api/pmUtil.ts","size":651,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/nodeToBlock.ts","size":13005,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/internal.ts","size":1398,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/createSpec.ts","size":2559,"chunks":["a1ee98a"]},{"name":"./src/schema/styles/internal.ts","size":1162,"chunks":["a1ee98a"]},{"name":"./src/schema/styles/createSpec.ts","size":1263,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/tables/tables.ts","size":10346,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/blockToNode.ts","size":7193,"chunks":["a1ee98a"]},{"name":"./src/api/nodeUtil.ts","size":549,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/insertBlocks/insertBlocks.ts","size":785,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.ts","size":1876,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/updateBlock/updateBlock.ts","size":8371,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/util/serializeBlocksExternalHTML.ts","size":5025,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/externalHTMLExporter.ts","size":886,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/util/serializeBlocksInternalHTML.ts","size":3099,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/internalHTMLSerializer.ts","size":288,"chunks":["a1ee98a"]},{"name":"./src/api/getBlocksChangedByTransaction.ts","size":6513,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/parse/parseFigureElement.ts","size":342,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createAddFileButton.ts","size":1809,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createFileNameWithIcon.ts","size":753,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createFileBlockWrapper.ts","size":1374,"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":3162,"chunks":["a1ee98a"]},{"name":"./src/blocks/CodeBlockContent/CodeBlockContent.ts","size":9248,"chunks":["a1ee98a"]},{"name":"./src/extensions/BackgroundColor/BackgroundColorMark.ts","size":946,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextColor/TextColorMark.ts","size":866,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/parse/parseEmbedElement.ts","size":108,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/FileBlockContent.ts","size":1524,"chunks":["a1ee98a"]},{"name":"./src/blocks/ToggleWrapper/createToggleWrapper.ts","size":5204,"chunks":["a1ee98a"]},{"name":"./src/blocks/HeadingBlockContent/HeadingBlockContent.ts","size":3467,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createResizableFileBlockWrapper.ts","size":6266,"chunks":["a1ee98a"]},{"name":"./src/blocks/ImageBlockContent/parseImageElement.ts","size":224,"chunks":["a1ee98a"]},{"name":"./src/blocks/ImageBlockContent/ImageBlockContent.ts","size":3317,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/splitBlock/splitBlock.ts","size":868,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/ListItemKeyboardShortcuts.ts","size":1495,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/ToggleListItemBlockContent/ToggleListItemBlockContent.ts","size":2228,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/getListItemContent.ts","size":1425,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.ts","size":3162,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/CheckListItemBlockContent/CheckListItemBlockContent.ts","size":7286,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListIndexingPlugin.ts","size":2207,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.ts","size":4098,"chunks":["a1ee98a"]},{"name":"./src/blocks/ParagraphBlockContent/ParagraphBlockContent.ts","size":1520,"chunks":["a1ee98a"]},{"name":"./src/blocks/QuoteBlockContent/QuoteBlockContent.ts","size":2338,"chunks":["a1ee98a"]},{"name":"./src/blocks/TableBlockContent/TableExtension.ts","size":2297,"chunks":["a1ee98a"]},{"name":"./src/blocks/TableBlockContent/TableBlockContent.ts","size":6815,"chunks":["a1ee98a"]},{"name":"./src/blocks/VideoBlockContent/parseVideoElement.ts","size":175,"chunks":["a1ee98a"]},{"name":"./src/blocks/VideoBlockContent/VideoBlockContent.ts","size":3236,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlocks.ts","size":1197,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlockTypeGuards.ts","size":2098,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/uploadToTmpFilesDotOrg_DEV_ONLY.ts","size":316,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts","size":8656,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteSchema.ts","size":1044,"chunks":["a1ee98a"]},{"name":"./src/blocks/PageBreakBlockContent/PageBreakBlockContent.ts","size":854,"chunks":["a1ee98a"]},{"name":"./src/blocks/PageBreakBlockContent/schema.ts","size":350,"chunks":["a1ee98a"]},{"name":"./src/blocks/PageBreakBlockContent/getPageBreakSlashMenuItems.ts","size":536,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/moveBlocks/moveBlocks.ts","size":5642,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/nestBlock/nestBlock.ts","size":2035,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/getBlock/getBlock.ts","size":1895,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/insertContentAt.ts","size":1049,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/selections/selection.ts","size":5093,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/selections/textCursorPosition.ts","size":2430,"chunks":["a1ee98a"]},{"name":"./src/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":423,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/markdown/parseMarkdown.ts","size":1067,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/acceptedMIMETypes.ts","size":134,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/handleFileInsertion.ts","size":4255,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/fileDropExtension.ts","size":884,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/markdown/detectMarkdown.ts","size":1140,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/handleVSCodePaste.ts","size":661,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/pasteExtension.ts","size":2412,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/fragmentToBlocks.ts","size":629,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/toClipboard/copyExtension.ts","size":5159,"chunks":["a1ee98a"]},{"name":"./src/extensions/BackgroundColor/BackgroundColorExtension.ts","size":819,"chunks":["a1ee98a"]},{"name":"./src/util/EventEmitter.ts","size":744,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteExtension.ts","size":345,"chunks":["a1ee98a"]},{"name":"./src/extensions/BlockChange/BlockChangePlugin.ts","size":988,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/CursorPlugin.ts","size":4699,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/SyncPlugin.ts","size":244,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/UndoPlugin.ts","size":265,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/CommentMark.ts","size":1428,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/userstore/UserStore.ts","size":1354,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/CommentsPlugin.ts","size":7888,"chunks":["a1ee98a"]},{"name":"./src/extensions/FilePanel/FilePanelPlugin.ts","size":4135,"chunks":["a1ee98a"]},{"name":"./src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts","size":7052,"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":16690,"chunks":["a1ee98a"]},{"name":"./src/api/positionMapping.ts","size":1653,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/SuggestionPlugin.ts","size":9360,"chunks":["a1ee98a"]},{"name":"./src/extensions/Suggestions/SuggestionMarks.ts","size":4452,"chunks":["a1ee98a"]},{"name":"./src/extensions/TableHandles/TableHandlesPlugin.ts","size":27335,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextAlignment/TextAlignmentExtension.ts","size":976,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextColor/TextColorExtension.ts","size":753,"chunks":["a1ee98a"]},{"name":"./src/extensions/TrailingNode/TrailingNodeExtension.ts","size":1563,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/BlockContainer.ts","size":2170,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/BlockGroup.ts","size":1146,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/Doc.ts","size":134,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/ForkYDocPlugin.ts","size":4307,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteExtensions.ts","size":5463,"chunks":["a1ee98a"]},{"name":"./src/editor/transformPasted.ts","size":2604,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteTipTapEditor.ts","size":5736,"chunks":["a1ee98a"]},{"name":"./src/style.css","size":0,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteEditor.ts","size":37606,"chunks":["a1ee98a"]},{"name":"./src/editor/defaultColors.ts","size":1193,"chunks":["a1ee98a"]},{"name":"./src/exporter/Exporter.ts","size":1101,"chunks":["a1ee98a"]},{"name":"./src/exporter/mapping.ts","size":197,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/getDefaultEmojiPickerItems.ts","size":1204,"chunks":["a1ee98a"]},{"name":"./src/util/combineByGroup.ts","size":550,"chunks":["a1ee98a"]},{"name":"./src/index.ts","size":0,"chunks":["a1ee98a"]},{"name":"./src/comments/threadstore/ThreadStoreAuth.ts","size":25,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/DefaultThreadStoreAuth.ts","size":2014,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/ThreadStore.ts","size":77,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/TipTapThreadStore.ts","size":5321,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/yjsHelpers.ts","size":3002,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/YjsThreadStoreBase.ts","size":790,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/RESTYjsThreadStore.ts","size":2069,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/YjsThreadStore.ts","size":7267,"chunks":["1627b02"]},{"name":"./src/comments/index.ts","size":0,"chunks":["1627b02"]},{"name":"./src/i18n/locales/ar.ts","size":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/i18n/locales/en.ts","size":9415,"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.
|
|
14
|
+
"version": "0.38.0",
|
|
15
15
|
"files": [
|
|
16
16
|
"dist",
|
|
17
17
|
"types",
|
|
@@ -86,28 +86,28 @@
|
|
|
86
86
|
"hast-util-from-dom": "^5.0.1",
|
|
87
87
|
"prosemirror-dropcursor": "^1.8.2",
|
|
88
88
|
"prosemirror-highlight": "^0.13.0",
|
|
89
|
-
"prosemirror-model": "^1.25.
|
|
89
|
+
"prosemirror-model": "^1.25.3",
|
|
90
90
|
"prosemirror-state": "^1.4.3",
|
|
91
91
|
"prosemirror-tables": "^1.6.4",
|
|
92
92
|
"prosemirror-transform": "^1.10.4",
|
|
93
|
-
"prosemirror-view": "^1.
|
|
93
|
+
"prosemirror-view": "^1.40.1",
|
|
94
94
|
"rehype-format": "^5.0.1",
|
|
95
95
|
"rehype-parse": "^9.0.1",
|
|
96
|
-
"rehype-remark": "^10.0.
|
|
96
|
+
"rehype-remark": "^10.0.1",
|
|
97
97
|
"rehype-stringify": "^10.0.1",
|
|
98
98
|
"remark-gfm": "^4.0.1",
|
|
99
99
|
"remark-parse": "^11.0.0",
|
|
100
|
-
"remark-rehype": "^11.1.
|
|
100
|
+
"remark-rehype": "^11.1.2",
|
|
101
101
|
"remark-stringify": "^11.0.0",
|
|
102
102
|
"unified": "^11.0.5",
|
|
103
103
|
"uuid": "^8.3.2",
|
|
104
|
-
"y-prosemirror": "^1.3.
|
|
104
|
+
"y-prosemirror": "^1.3.7",
|
|
105
105
|
"y-protocols": "^1.0.6",
|
|
106
106
|
"yjs": "^13.6.27"
|
|
107
107
|
},
|
|
108
108
|
"devDependencies": {
|
|
109
109
|
"@types/emoji-mart": "^3.0.14",
|
|
110
|
-
"@types/hast": "^3.0.
|
|
110
|
+
"@types/hast": "^3.0.4",
|
|
111
111
|
"@types/uuid": "^8.3.4",
|
|
112
112
|
"eslint": "^8.10.0",
|
|
113
113
|
"jsdom": "^25.0.1",
|
|
@@ -17,7 +17,6 @@ import {
|
|
|
17
17
|
contentNodeToInlineContent,
|
|
18
18
|
contentNodeToTableContent,
|
|
19
19
|
} from "../../nodeConversions/nodeToBlock.js";
|
|
20
|
-
import { initializeESMDependencies } from "../../../util/esmDependencies.js";
|
|
21
20
|
|
|
22
21
|
function fragmentToExternalHTML<
|
|
23
22
|
BSchema extends BlockSchema,
|
|
@@ -209,7 +208,6 @@ export const createCopyToClipboardExtension = <
|
|
|
209
208
|
Extension.create<{ editor: BlockNoteEditor<BSchema, I, S> }, undefined>({
|
|
210
209
|
name: "copyToClipboard",
|
|
211
210
|
addProseMirrorPlugins() {
|
|
212
|
-
initializeESMDependencies();
|
|
213
211
|
return [
|
|
214
212
|
new Plugin({
|
|
215
213
|
props: {
|
|
@@ -28,7 +28,6 @@ import {
|
|
|
28
28
|
// 4. The HTML is wrapped in a single `div` element.
|
|
29
29
|
|
|
30
30
|
// Needs to be sync because it's used in drag handler event (SideMenuPlugin)
|
|
31
|
-
// Ideally, call `await initializeESMDependencies()` before calling this function
|
|
32
31
|
export const createExternalHTMLExporter = <
|
|
33
32
|
BSchema extends BlockSchema,
|
|
34
33
|
I extends InlineContentSchema,
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { Schema } from "prosemirror-model";
|
|
2
|
+
import rehypeParse from "rehype-parse";
|
|
3
|
+
import rehypeRemark from "rehype-remark";
|
|
4
|
+
import remarkGfm from "remark-gfm";
|
|
5
|
+
import remarkStringify from "remark-stringify";
|
|
6
|
+
import { unified } from "unified";
|
|
7
|
+
|
|
2
8
|
import { PartialBlock } from "../../../blocks/defaultBlocks.js";
|
|
3
9
|
import type { BlockNoteEditor } from "../../../editor/BlockNoteEditor.js";
|
|
4
10
|
import {
|
|
@@ -6,33 +12,19 @@ import {
|
|
|
6
12
|
InlineContentSchema,
|
|
7
13
|
StyleSchema,
|
|
8
14
|
} from "../../../schema/index.js";
|
|
9
|
-
import {
|
|
10
|
-
esmDependencies,
|
|
11
|
-
initializeESMDependencies,
|
|
12
|
-
} from "../../../util/esmDependencies.js";
|
|
13
15
|
import { createExternalHTMLExporter } from "../html/externalHTMLExporter.js";
|
|
14
16
|
import { removeUnderlines } from "./removeUnderlinesRehypePlugin.js";
|
|
15
17
|
import { addSpacesToCheckboxes } from "./util/addSpacesToCheckboxesRehypePlugin.js";
|
|
16
18
|
|
|
17
19
|
// Needs to be sync because it's used in drag handler event (SideMenuPlugin)
|
|
18
|
-
// Ideally, call `await initializeESMDependencies()` before calling this function
|
|
19
20
|
export function cleanHTMLToMarkdown(cleanHTMLString: string) {
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
if (!deps) {
|
|
23
|
-
throw new Error(
|
|
24
|
-
"cleanHTMLToMarkdown requires ESM dependencies to be initialized",
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const markdownString = deps.unified
|
|
29
|
-
.unified()
|
|
30
|
-
.use(deps.rehypeParse.default, { fragment: true })
|
|
21
|
+
const markdownString = unified()
|
|
22
|
+
.use(rehypeParse, { fragment: true })
|
|
31
23
|
.use(removeUnderlines)
|
|
32
24
|
.use(addSpacesToCheckboxes)
|
|
33
|
-
.use(
|
|
34
|
-
.use(
|
|
35
|
-
.use(
|
|
25
|
+
.use(rehypeRemark)
|
|
26
|
+
.use(remarkGfm)
|
|
27
|
+
.use(remarkStringify, {
|
|
36
28
|
handlers: { text: (node) => node.value },
|
|
37
29
|
})
|
|
38
30
|
.processSync(cleanHTMLString);
|
|
@@ -40,7 +32,7 @@ export function cleanHTMLToMarkdown(cleanHTMLString: string) {
|
|
|
40
32
|
return markdownString.value as string;
|
|
41
33
|
}
|
|
42
34
|
|
|
43
|
-
export
|
|
35
|
+
export function blocksToMarkdown<
|
|
44
36
|
BSchema extends BlockSchema,
|
|
45
37
|
I extends InlineContentSchema,
|
|
46
38
|
S extends StyleSchema,
|
|
@@ -49,8 +41,7 @@ export async function blocksToMarkdown<
|
|
|
49
41
|
schema: Schema,
|
|
50
42
|
editor: BlockNoteEditor<BSchema, I, S>,
|
|
51
43
|
options: { document?: Document },
|
|
52
|
-
):
|
|
53
|
-
await initializeESMDependencies();
|
|
44
|
+
): string {
|
|
54
45
|
const exporter = createExternalHTMLExporter(schema, editor);
|
|
55
46
|
const externalHTML = exporter.exportBlocks(blocks, options);
|
|
56
47
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Element as HASTElement, Parent as HASTParent } from "hast";
|
|
2
|
-
import {
|
|
2
|
+
import { fromDom } from "hast-util-from-dom";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Rehype plugin which adds a space after each checkbox input element. This is
|
|
@@ -7,14 +7,6 @@ import { esmDependencies } from "../../../../util/esmDependencies.js";
|
|
|
7
7
|
* itself, but these are needed for correct Markdown syntax.
|
|
8
8
|
*/
|
|
9
9
|
export function addSpacesToCheckboxes() {
|
|
10
|
-
const deps = esmDependencies;
|
|
11
|
-
|
|
12
|
-
if (!deps) {
|
|
13
|
-
throw new Error(
|
|
14
|
-
"addSpacesToCheckboxes requires ESM dependencies to be initialized",
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
10
|
const helper = (tree: HASTParent) => {
|
|
19
11
|
if (tree.children && "length" in tree.children && tree.children.length) {
|
|
20
12
|
for (let i = tree.children.length - 1; i >= 0; i--) {
|
|
@@ -37,9 +29,7 @@ export function addSpacesToCheckboxes() {
|
|
|
37
29
|
nextChild.children.splice(
|
|
38
30
|
0,
|
|
39
31
|
0,
|
|
40
|
-
|
|
41
|
-
document.createTextNode(" "),
|
|
42
|
-
) as HASTElement,
|
|
32
|
+
fromDom(document.createTextNode(" ")) as HASTElement,
|
|
43
33
|
);
|
|
44
34
|
} else {
|
|
45
35
|
helper(child as HASTParent);
|
|
@@ -8,11 +8,12 @@ import {
|
|
|
8
8
|
import { Block } from "../../../blocks/defaultBlocks.js";
|
|
9
9
|
import { nodeToBlock } from "../../nodeConversions/nodeToBlock.js";
|
|
10
10
|
import { nestedListsToBlockNoteStructure } from "./util/nestedLists.js";
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
export function HTMLToBlocks<
|
|
12
13
|
BSchema extends BlockSchema,
|
|
13
14
|
I extends InlineContentSchema,
|
|
14
15
|
S extends StyleSchema,
|
|
15
|
-
>(html: string, pmSchema: Schema):
|
|
16
|
+
>(html: string, pmSchema: Schema): Block<BSchema, I, S>[] {
|
|
16
17
|
const htmlNode = nestedListsToBlockNoteStructure(html);
|
|
17
18
|
const parser = DOMParser.fromSchema(pmSchema);
|
|
18
19
|
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
|
-
import { initializeESMDependencies } from "../../../../util/esmDependencies.js";
|
|
3
2
|
import { nestedListsToBlockNoteStructure } from "./nestedLists.js";
|
|
3
|
+
import { unified } from "unified";
|
|
4
|
+
import rehypeParse from "rehype-parse";
|
|
5
|
+
import rehypeFormat from "rehype-format";
|
|
6
|
+
import rehypeStringify from "rehype-stringify";
|
|
4
7
|
|
|
5
8
|
async function testHTML(html: string) {
|
|
6
|
-
const deps = await initializeESMDependencies();
|
|
7
|
-
|
|
8
9
|
const htmlNode = nestedListsToBlockNoteStructure(html);
|
|
9
10
|
|
|
10
|
-
const pretty = await
|
|
11
|
-
.
|
|
12
|
-
.use(
|
|
13
|
-
.use(
|
|
14
|
-
.use(deps.rehypeStringify.default)
|
|
11
|
+
const pretty = await unified()
|
|
12
|
+
.use(rehypeParse, { fragment: true })
|
|
13
|
+
.use(rehypeFormat)
|
|
14
|
+
.use(rehypeStringify)
|
|
15
15
|
.process(htmlNode.innerHTML);
|
|
16
16
|
|
|
17
17
|
expect(pretty.value).toMatchSnapshot();
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import { Schema } from "prosemirror-model";
|
|
2
|
+
import remarkGfm from "remark-gfm";
|
|
3
|
+
import remarkParse from "remark-parse";
|
|
4
|
+
import remarkRehype, {
|
|
5
|
+
defaultHandlers as remarkRehypeDefaultHandlers,
|
|
6
|
+
} from "remark-rehype";
|
|
7
|
+
import rehypeStringify from "rehype-stringify";
|
|
8
|
+
import { unified } from "unified";
|
|
2
9
|
|
|
3
10
|
import { Block } from "../../../blocks/defaultBlocks.js";
|
|
4
11
|
import {
|
|
@@ -6,7 +13,6 @@ import {
|
|
|
6
13
|
InlineContentSchema,
|
|
7
14
|
StyleSchema,
|
|
8
15
|
} from "../../../schema/index.js";
|
|
9
|
-
import { initializeESMDependencies } from "../../../util/esmDependencies.js";
|
|
10
16
|
import { HTMLToBlocks } from "../html/parseHTML.js";
|
|
11
17
|
|
|
12
18
|
// modified version of https://github.com/syntax-tree/mdast-util-to-hast/blob/main/lib/handlers/code.js
|
|
@@ -48,31 +54,28 @@ function code(state: any, node: any) {
|
|
|
48
54
|
return result;
|
|
49
55
|
}
|
|
50
56
|
|
|
51
|
-
export
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
.
|
|
56
|
-
.use(deps.remarkParse.default)
|
|
57
|
-
.use(deps.remarkGfm.default)
|
|
58
|
-
.use(deps.remarkRehype.default, {
|
|
57
|
+
export function markdownToHTML(markdown: string): string {
|
|
58
|
+
const htmlString = unified()
|
|
59
|
+
.use(remarkParse)
|
|
60
|
+
.use(remarkGfm)
|
|
61
|
+
.use(remarkRehype, {
|
|
59
62
|
handlers: {
|
|
60
|
-
...(
|
|
63
|
+
...(remarkRehypeDefaultHandlers as any),
|
|
61
64
|
code,
|
|
62
65
|
},
|
|
63
66
|
})
|
|
64
|
-
.use(
|
|
67
|
+
.use(rehypeStringify)
|
|
65
68
|
.processSync(markdown);
|
|
66
69
|
|
|
67
70
|
return htmlString.value as string;
|
|
68
71
|
}
|
|
69
72
|
|
|
70
|
-
export
|
|
73
|
+
export function markdownToBlocks<
|
|
71
74
|
BSchema extends BlockSchema,
|
|
72
75
|
I extends InlineContentSchema,
|
|
73
76
|
S extends StyleSchema,
|
|
74
|
-
>(markdown: string, pmSchema: Schema):
|
|
75
|
-
const htmlString =
|
|
77
|
+
>(markdown: string, pmSchema: Schema): Block<BSchema, I, S>[] {
|
|
78
|
+
const htmlString = markdownToHTML(markdown);
|
|
76
79
|
|
|
77
80
|
return HTMLToBlocks(htmlString, pmSchema);
|
|
78
81
|
}
|