@blocknote/core 0.26.0 → 0.27.2
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 +11 -10
- package/dist/blocknote.cjs.map +1 -1
- package/dist/blocknote.js +3685 -9960
- package/dist/blocknote.js.map +1 -1
- package/dist/comments.cjs.map +1 -1
- package/dist/comments.js.map +1 -1
- package/dist/en-B7ycW7c8.js +360 -0
- package/dist/en-B7ycW7c8.js.map +1 -0
- package/dist/en-D4taoCs4.cjs +2 -0
- package/dist/en-D4taoCs4.cjs.map +1 -0
- package/dist/locales.cjs +2 -0
- package/dist/locales.cjs.map +1 -0
- package/dist/locales.js +6129 -0
- package/dist/locales.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +36 -31
- package/src/api/clipboard/__snapshots__/internal/basicBlocks.html +1 -1
- package/src/api/clipboard/__snapshots__/internal/basicBlocksWithProps.html +1 -1
- package/src/api/clipboard/clipboardExternal.test.ts +1 -1
- package/src/api/clipboard/clipboardInternal.test.ts +1 -1
- package/src/api/clipboard/fromClipboard/acceptedMIMETypes.ts +1 -0
- package/src/api/clipboard/fromClipboard/pasteExtension.ts +96 -42
- package/src/api/exporters/html/__snapshots__/codeBlock/contains-newlines/external.html +1 -1
- package/src/api/exporters/html/__snapshots__/codeBlock/contains-newlines/internal.html +1 -1
- package/src/api/exporters/html/__snapshots__/codeBlock/defaultLanguage/external.html +1 -1
- package/src/api/exporters/html/__snapshots__/codeBlock/defaultLanguage/internal.html +1 -1
- package/src/api/exporters/html/__snapshots__/codeBlock/empty/external.html +1 -1
- package/src/api/exporters/html/__snapshots__/codeBlock/empty/internal.html +1 -1
- package/src/api/exporters/html/__snapshots__/codeBlock/python/external.html +1 -1
- package/src/api/exporters/html/__snapshots__/codeBlock/python/internal.html +1 -1
- package/src/api/exporters/html/htmlConversion.test.ts +2 -2
- package/src/api/exporters/html/util/serializeBlocksExternalHTML.ts +4 -4
- package/src/api/exporters/markdown/__snapshots__/codeBlock/defaultLanguage/markdown.md +1 -1
- package/src/api/exporters/markdown/__snapshots__/codeBlock/empty/markdown.md +1 -1
- package/src/api/exporters/markdown/__snapshots__/complex/misc/markdown.md +1 -1
- package/src/api/exporters/markdown/__snapshots__/lists/basic/markdown.md +8 -6
- package/src/api/exporters/markdown/__snapshots__/lists/nested/markdown.md +6 -6
- package/src/api/exporters/markdown/markdownExporter.test.ts +2 -2
- package/src/api/nodeConversions/__snapshots__/nodeConversions.test.ts.snap +2 -2
- package/src/api/parsers/html/__snapshots__/parse-codeblocks.json +1 -1
- package/src/api/parsers/html/parseHTML.test.ts +1 -1
- package/src/api/parsers/markdown/__snapshots__/pasted/whitespace bold.json +42 -0
- package/src/api/parsers/markdown/__snapshots__/whitespace bold.json +19 -0
- package/src/api/parsers/markdown/detectMarkdown.ts +60 -0
- package/src/api/parsers/markdown/parseMarkdown.test.ts +7 -2
- package/src/api/parsers/markdown/parseMarkdown.ts +19 -18
- package/src/api/testUtil/cases/defaultSchema.ts +13 -0
- package/src/blocks/CodeBlockContent/CodeBlockContent.ts +100 -69
- package/src/blocks/QuoteBlockContent/QuoteBlockContent.ts +98 -0
- package/src/blocks/TableBlockContent/TableExtension.ts +1 -1
- package/src/blocks/defaultBlocks.ts +2 -2
- package/src/editor/Block.css +13 -0
- package/src/editor/BlockNoteEditor.ts +102 -10
- package/src/editor/BlockNoteExtensions.ts +18 -4
- package/src/extensions/Comments/CommentsPlugin.ts +1 -1
- package/src/extensions/HardBreak/HardBreak.ts +35 -0
- package/src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts +100 -3
- package/src/extensions/SuggestionMenu/SuggestionPlugin.ts +3 -1
- package/src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts +12 -0
- package/src/i18n/index.ts +2 -0
- package/src/i18n/locales/ar.ts +6 -0
- package/src/i18n/locales/de.ts +6 -0
- package/src/i18n/locales/en.ts +6 -0
- package/src/i18n/locales/es.ts +6 -0
- package/src/i18n/locales/fr.ts +6 -0
- package/src/i18n/locales/hr.ts +6 -0
- package/src/i18n/locales/is.ts +6 -0
- package/src/i18n/locales/it.ts +6 -0
- package/src/i18n/locales/ja.ts +6 -0
- package/src/i18n/locales/ko.ts +6 -0
- package/src/i18n/locales/nl.ts +6 -0
- package/src/i18n/locales/no.ts +6 -0
- package/src/i18n/locales/pl.ts +6 -0
- package/src/i18n/locales/pt.ts +6 -0
- package/src/i18n/locales/ru.ts +6 -0
- package/src/i18n/locales/uk.ts +6 -0
- package/src/i18n/locales/vi.ts +6 -0
- package/src/i18n/locales/zh.ts +6 -0
- package/src/index.ts +2 -3
- package/src/locales.ts +1 -0
- package/src/schema/blocks/types.ts +1 -0
- package/types/src/api/blockManipulation/commands/updateBlock/updateBlock.d.ts +1 -1
- package/types/src/api/blockManipulation/setupTestEnv.d.ts +34 -2
- package/types/src/api/clipboard/fromClipboard/acceptedMIMETypes.d.ts +1 -1
- package/types/src/api/clipboard/fromClipboard/fileDropExtension.d.ts +2 -2
- package/types/src/api/clipboard/fromClipboard/pasteExtension.d.ts +3 -3
- package/types/src/api/clipboard/testUtil.d.ts +66 -34
- package/types/src/api/clipboard/toClipboard/copyExtension.d.ts +1 -1
- package/types/src/api/exporters/html/externalHTMLExporter.d.ts +2 -2
- package/types/src/api/exporters/html/internalHTMLSerializer.d.ts +2 -2
- package/types/src/api/exporters/html/util/serializeBlocksExternalHTML.d.ts +1 -1
- package/types/src/api/exporters/html/util/serializeBlocksInternalHTML.d.ts +1 -1
- package/types/src/api/parsers/markdown/detectMarkdown.d.ts +6 -0
- package/types/src/api/parsers/markdown/parseMarkdown.d.ts +1 -0
- package/types/src/api/testUtil/cases/customBlocks.d.ts +72 -40
- package/types/src/api/testUtil/cases/customInlineContent.d.ts +34 -2
- package/types/src/api/testUtil/cases/customStyles.d.ts +34 -2
- package/types/src/blocks/AudioBlockContent/AudioBlockContent.d.ts +3 -3
- package/types/src/blocks/CodeBlockContent/CodeBlockContent.d.ts +46 -34
- package/types/src/blocks/FileBlockContent/FileBlockContent.d.ts +3 -3
- package/types/src/blocks/FileBlockContent/helpers/render/createFileBlockWrapper.d.ts +1 -1
- package/types/src/blocks/HeadingBlockContent/HeadingBlockContent.d.ts +2 -2
- package/types/src/blocks/ImageBlockContent/ImageBlockContent.d.ts +2 -2
- package/types/src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.d.ts +2 -2
- package/types/src/blocks/ListItemBlockContent/CheckListItemBlockContent/CheckListItemBlockContent.d.ts +2 -2
- package/types/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.d.ts +2 -2
- package/types/src/blocks/PageBreakBlockContent/PageBreakBlockContent.d.ts +2 -2
- package/types/src/blocks/PageBreakBlockContent/schema.d.ts +13 -13
- package/types/src/blocks/ParagraphBlockContent/ParagraphBlockContent.d.ts +2 -2
- package/types/src/blocks/QuoteBlockContent/QuoteBlockContent.d.ts +52 -0
- package/types/src/blocks/TableBlockContent/TableBlockContent.d.ts +2 -2
- package/types/src/blocks/VideoBlockContent/VideoBlockContent.d.ts +2 -2
- package/types/src/blocks/defaultBlockHelpers.d.ts +2 -2
- package/types/src/blocks/defaultBlocks.d.ts +107 -44
- package/types/src/comments/threadstore/yjs/YjsThreadStore.d.ts +3 -3
- package/types/src/editor/BlockNoteEditor.d.ts +58 -0
- package/types/src/editor/BlockNoteExtensions.d.ts +3 -2
- package/types/src/exporter/mapping.d.ts +2 -2
- package/types/src/extensions/BackgroundColor/BackgroundColorMark.d.ts +1 -1
- package/types/src/extensions/Collaboration/createCollaborationExtensions.d.ts +1 -1
- package/types/src/extensions/HardBreak/HardBreak.d.ts +2 -0
- package/types/src/extensions/TableHandles/TableHandlesPlugin.d.ts +4 -4
- package/types/src/extensions/TextColor/TextColorMark.d.ts +1 -1
- package/types/src/i18n/index.d.ts +2 -0
- package/types/src/i18n/locales/en.d.ts +7 -1
- package/types/src/index.d.ts +1 -2
- package/types/src/locales.d.ts +1 -0
- package/types/src/pm-nodes/BlockContainer.d.ts +2 -7
- package/types/src/pm-nodes/BlockGroup.d.ts +2 -7
- package/types/src/schema/blocks/types.d.ts +1 -0
- package/types/src/schema/inlineContent/internal.d.ts +1 -1
- package/README.md +0 -125
- package/src/blocks/CodeBlockContent/defaultSupportedLanguages.ts +0 -116
- package/types/src/blocks/CodeBlockContent/defaultSupportedLanguages.d.ts +0 -6
- package/types/src/extensions/Comments/threadstore/DefaultThreadStoreAuth.d.ts +0 -47
- package/types/src/extensions/Comments/threadstore/ThreadStore.d.ts +0 -121
- package/types/src/extensions/Comments/threadstore/ThreadStoreAuth.d.ts +0 -12
- package/types/src/extensions/Comments/threadstore/TipTapThreadStore.d.ts +0 -97
- package/types/src/extensions/Comments/threadstore/yjs/RESTYjsThreadStore.d.ts +0 -83
- package/types/src/extensions/Comments/threadstore/yjs/YjsThreadStore.d.ts +0 -79
- package/types/src/extensions/Comments/threadstore/yjs/YjsThreadStore.test.d.ts +0 -1
- package/types/src/extensions/Comments/threadstore/yjs/YjsThreadStoreBase.d.ts +0 -15
- package/types/src/extensions/Comments/threadstore/yjs/yjsHelpers.d.ts +0 -13
- package/types/src/extensions/Comments/types.d.ts +0 -109
- package/types/src/models/User.d.ts +0 -5
package/dist/webpack-stats.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"builtAt":1742379509520,"assets":[{"name":"blocknote.cjs","size":290407},{"name":"comments.cjs","size":11826},{"name":"comments.cjs.map","size":47556},{"name":"blocknote.cjs.map","size":1068595}],"chunks":[{"id":"a1ee98a","entry":true,"initial":true,"files":["blocknote.cjs"],"names":["blocknote"]},{"id":"1627b02","entry":true,"initial":true,"files":["comments.cjs"],"names":["comments"]}],"modules":[{"name":"./src/i18n/locales/ar.ts","size":7747,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/de.ts","size":8463,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/en.ts","size":7849,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/es.ts","size":8327,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/fr.ts","size":9094,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/hr.ts","size":8359,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/is.ts","size":8080,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/it.ts","size":8419,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/ja.ts","size":7369,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/ko.ts","size":7145,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/nl.ts","size":8321,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/no.ts","size":8191,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/pl.ts","size":8011,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/pt.ts","size":8259,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/ru.ts","size":8944,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/uk.ts","size":8877,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/vi.ts","size":8114,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/zh.ts","size":7068,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/index.ts","size":0,"chunks":["a1ee98a"]},{"name":"./src/util/typescript.ts","size":331,"chunks":["a1ee98a"]},{"name":"./src/api/getBlockInfoFromPos.ts","size":3648,"chunks":["a1ee98a"]},{"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/browser.ts","size":536,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlockHelpers.ts","size":1755,"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":4130,"chunks":["a1ee98a"]},{"name":"./src/schema/blocks/createSpec.ts","size":3609,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/nodeToBlock.ts","size":9521,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/internal.ts","size":1398,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/createSpec.ts","size":2739,"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":6903,"chunks":["a1ee98a"]},{"name":"./src/api/nodeUtil.ts","size":490,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/updateBlock/updateBlock.ts","size":4754,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/util/serializeBlocksExternalHTML.ts","size":5122,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/externalHTMLExporter.ts","size":886,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/util/serializeBlocksInternalHTML.ts","size":3264,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/internalHTMLSerializer.ts","size":288,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/parse/parseFigureElement.ts","size":342,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createAddFileButton.ts","size":1725,"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":3155,"chunks":["a1ee98a"]},{"name":"./src/blocks/CodeBlockContent/defaultSupportedLanguages.ts","size":1707,"chunks":["a1ee98a"]},{"name":"./src/blocks/CodeBlockContent/CodeBlockContent.ts","size":9104,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/parse/parseEmbedElement.ts","size":108,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/FileBlockContent.ts","size":1460,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createResizableFileBlockWrapper.ts","size":4637,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/uploadToTmpFilesDotOrg_DEV_ONLY.ts","size":316,"chunks":["a1ee98a"]},{"name":"./src/blocks/ImageBlockContent/parseImageElement.ts","size":175,"chunks":["a1ee98a"]},{"name":"./src/blocks/ImageBlockContent/ImageBlockContent.ts","size":3243,"chunks":["a1ee98a"]},{"name":"./src/blocks/PageBreakBlockContent/PageBreakBlockContent.ts","size":854,"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/HeadingBlockContent/HeadingBlockContent.ts","size":3418,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/splitBlock/splitBlock.ts","size":868,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/ListItemKeyboardShortcuts.ts","size":1429,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.ts","size":3415,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/CheckListItemBlockContent/CheckListItemBlockContent.ts","size":7148,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListIndexingPlugin.ts","size":2207,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.ts","size":4427,"chunks":["a1ee98a"]},{"name":"./src/blocks/ParagraphBlockContent/ParagraphBlockContent.ts","size":1434,"chunks":["a1ee98a"]},{"name":"./src/blocks/TableBlockContent/TableExtension.ts","size":2275,"chunks":["a1ee98a"]},{"name":"./src/blocks/TableBlockContent/TableBlockContent.ts","size":4708,"chunks":["a1ee98a"]},{"name":"./src/blocks/VideoBlockContent/parseVideoElement.ts","size":175,"chunks":["a1ee98a"]},{"name":"./src/blocks/VideoBlockContent/VideoBlockContent.ts","size":3162,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlocks.ts","size":1147,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlockTypeGuards.ts","size":1688,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts","size":6811,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteSchema.ts","size":1044,"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/insertBlocks/insertBlocks.ts","size":1141,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/moveBlocks/moveBlocks.ts","size":5693,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/nestBlock/nestBlock.ts","size":2324,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.ts","size":2533,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/removeBlocks/removeBlocks.ts","size":123,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/getBlock/getBlock.ts","size":2452,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/insertContentAt.ts","size":1120,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/selections/selection.ts","size":4698,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.ts","size":2880,"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":503,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/markdown/parseMarkdown.ts","size":1097,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/acceptedMIMETypes.ts","size":115,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/handleFileInsertion.ts","size":3917,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/fileDropExtension.ts","size":884,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/handleVSCodePaste.ts","size":661,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/pasteExtension.ts","size":1552,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/fragmentToBlocks.ts","size":859,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/toClipboard/copyExtension.ts","size":5228,"chunks":["a1ee98a"]},{"name":"./src/extensions/BackgroundColor/BackgroundColorExtension.ts","size":819,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/createCollaborationExtensions.ts","size":3553,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/CommentMark.ts","size":1428,"chunks":["a1ee98a"]},{"name":"./src/util/EventEmitter.ts","size":744,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/userstore/UserStore.ts","size":1354,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/CommentsPlugin.ts","size":7660,"chunks":["a1ee98a"]},{"name":"./src/extensions/FilePanel/FilePanelPlugin.ts","size":3584,"chunks":["a1ee98a"]},{"name":"./src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts","size":5323,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/mergeBlocks/mergeBlocks.ts","size":3228,"chunks":["a1ee98a"]},{"name":"./src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts","size":14774,"chunks":["a1ee98a"]},{"name":"./src/extensions/LinkToolbar/LinkToolbarPlugin.ts","size":7611,"chunks":["a1ee98a"]},{"name":"./src/extensions/LinkToolbar/protocols.ts","size":172,"chunks":["a1ee98a"]},{"name":"./src/extensions/NodeSelectionKeyboard/NodeSelectionKeyboardPlugin.ts","size":1195,"chunks":["a1ee98a"]},{"name":"./src/extensions/Placeholder/PlaceholderPlugin.ts","size":3609,"chunks":["a1ee98a"]},{"name":"./src/extensions/PreviousBlockType/PreviousBlockTypePlugin.ts","size":4826,"chunks":["a1ee98a"]},{"name":"./src/extensions/ShowSelection/ShowSelectionPlugin.ts","size":967,"chunks":["a1ee98a"]},{"name":"./src/extensions/getDraggableBlockFromElement.ts","size":404,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/MultipleNodeSelection.ts","size":1616,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/dragging.ts","size":4733,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/SideMenuPlugin.ts","size":14087,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/SuggestionPlugin.ts","size":8070,"chunks":["a1ee98a"]},{"name":"./src/extensions/TableHandles/TableHandlesPlugin.ts","size":26718,"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":2038,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/BlockGroup.ts","size":1102,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/Doc.ts","size":90,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteExtensions.ts","size":4887,"chunks":["a1ee98a"]},{"name":"./src/editor/transformPasted.ts","size":2604,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteTipTapEditor.ts","size":3938,"chunks":["a1ee98a"]},{"name":"./src/style.css","size":0,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteEditor.ts","size":29570,"chunks":["a1ee98a"]},{"name":"./src/editor/defaultColors.ts","size":1193,"chunks":["a1ee98a"]},{"name":"./src/exporter/Exporter.ts","size":1075,"chunks":["a1ee98a"]},{"name":"./src/exporter/mapping.ts","size":197,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/getDefaultEmojiPickerItems.ts","size":1204,"chunks":["a1ee98a"]},{"name":"./src/util/combineByGroup.ts","size":550,"chunks":["a1ee98a"]},{"name":"./src/api/testUtil/partialBlockTestUtil.ts","size":3860,"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"]}]}
|
|
1
|
+
{"builtAt":1743885337120,"assets":[{"name":"blocknote.cjs","size":179331},{"name":"comments.cjs","size":11826},{"name":"locales.cjs","size":111456},{"name":"en-D4taoCs4.cjs","size":5539},{"name":"en-D4taoCs4.cjs.map","size":12801},{"name":"comments.cjs.map","size":47589},{"name":"locales.cjs.map","size":233666},{"name":"blocknote.cjs.map","size":844054}],"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-D4taoCs4.cjs"],"names":["en"]}],"modules":[{"name":"./src/util/typescript.ts","size":331,"chunks":["a1ee98a"]},{"name":"./src/api/getBlockInfoFromPos.ts","size":3648,"chunks":["a1ee98a"]},{"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/browser.ts","size":536,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlockHelpers.ts","size":1755,"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":4130,"chunks":["a1ee98a"]},{"name":"./src/schema/blocks/createSpec.ts","size":3609,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/nodeToBlock.ts","size":9521,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/internal.ts","size":1398,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/createSpec.ts","size":2739,"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":6874,"chunks":["a1ee98a"]},{"name":"./src/api/nodeUtil.ts","size":490,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/updateBlock/updateBlock.ts","size":4754,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/util/serializeBlocksExternalHTML.ts","size":5160,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/externalHTMLExporter.ts","size":886,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/util/serializeBlocksInternalHTML.ts","size":3264,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/internalHTMLSerializer.ts","size":288,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/parse/parseFigureElement.ts","size":342,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createAddFileButton.ts","size":1725,"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":3155,"chunks":["a1ee98a"]},{"name":"./src/blocks/CodeBlockContent/CodeBlockContent.ts","size":9013,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/parse/parseEmbedElement.ts","size":108,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/FileBlockContent.ts","size":1460,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createResizableFileBlockWrapper.ts","size":4637,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/uploadToTmpFilesDotOrg_DEV_ONLY.ts","size":316,"chunks":["a1ee98a"]},{"name":"./src/blocks/ImageBlockContent/parseImageElement.ts","size":175,"chunks":["a1ee98a"]},{"name":"./src/blocks/ImageBlockContent/ImageBlockContent.ts","size":3243,"chunks":["a1ee98a"]},{"name":"./src/blocks/PageBreakBlockContent/PageBreakBlockContent.ts","size":854,"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/HeadingBlockContent/HeadingBlockContent.ts","size":3418,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/splitBlock/splitBlock.ts","size":868,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/ListItemKeyboardShortcuts.ts","size":1429,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.ts","size":3415,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/CheckListItemBlockContent/CheckListItemBlockContent.ts","size":7148,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListIndexingPlugin.ts","size":2207,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.ts","size":4427,"chunks":["a1ee98a"]},{"name":"./src/blocks/ParagraphBlockContent/ParagraphBlockContent.ts","size":1434,"chunks":["a1ee98a"]},{"name":"./src/blocks/QuoteBlockContent/QuoteBlockContent.ts","size":1927,"chunks":["a1ee98a"]},{"name":"./src/blocks/TableBlockContent/TableExtension.ts","size":2297,"chunks":["a1ee98a"]},{"name":"./src/blocks/TableBlockContent/TableBlockContent.ts","size":4708,"chunks":["a1ee98a"]},{"name":"./src/blocks/VideoBlockContent/parseVideoElement.ts","size":175,"chunks":["a1ee98a"]},{"name":"./src/blocks/VideoBlockContent/VideoBlockContent.ts","size":3162,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlocks.ts","size":1163,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlockTypeGuards.ts","size":1688,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts","size":7072,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteSchema.ts","size":1044,"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/insertBlocks/insertBlocks.ts","size":1141,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/moveBlocks/moveBlocks.ts","size":5693,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/nestBlock/nestBlock.ts","size":2324,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.ts","size":2533,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/removeBlocks/removeBlocks.ts","size":123,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/getBlock/getBlock.ts","size":2452,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/insertContentAt.ts","size":1120,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/selections/selection.ts","size":4698,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.ts","size":2880,"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":503,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/markdown/parseMarkdown.ts","size":1201,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/acceptedMIMETypes.ts","size":134,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/handleFileInsertion.ts","size":3917,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/fileDropExtension.ts","size":884,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/handleVSCodePaste.ts","size":661,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/markdown/detectMarkdown.ts","size":1112,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/pasteExtension.ts","size":2109,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/fragmentToBlocks.ts","size":859,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/toClipboard/copyExtension.ts","size":5228,"chunks":["a1ee98a"]},{"name":"./src/extensions/BackgroundColor/BackgroundColorExtension.ts","size":819,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/createCollaborationExtensions.ts","size":3553,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/CommentMark.ts","size":1428,"chunks":["a1ee98a"]},{"name":"./src/util/EventEmitter.ts","size":744,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/userstore/UserStore.ts","size":1354,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/CommentsPlugin.ts","size":7656,"chunks":["a1ee98a"]},{"name":"./src/extensions/FilePanel/FilePanelPlugin.ts","size":3584,"chunks":["a1ee98a"]},{"name":"./src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts","size":5323,"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":18010,"chunks":["a1ee98a"]},{"name":"./src/extensions/LinkToolbar/LinkToolbarPlugin.ts","size":7611,"chunks":["a1ee98a"]},{"name":"./src/extensions/LinkToolbar/protocols.ts","size":172,"chunks":["a1ee98a"]},{"name":"./src/extensions/NodeSelectionKeyboard/NodeSelectionKeyboardPlugin.ts","size":1195,"chunks":["a1ee98a"]},{"name":"./src/extensions/Placeholder/PlaceholderPlugin.ts","size":3609,"chunks":["a1ee98a"]},{"name":"./src/extensions/PreviousBlockType/PreviousBlockTypePlugin.ts","size":4826,"chunks":["a1ee98a"]},{"name":"./src/extensions/ShowSelection/ShowSelectionPlugin.ts","size":967,"chunks":["a1ee98a"]},{"name":"./src/extensions/getDraggableBlockFromElement.ts","size":404,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/MultipleNodeSelection.ts","size":1616,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/dragging.ts","size":4733,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/SideMenuPlugin.ts","size":14087,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/SuggestionPlugin.ts","size":8104,"chunks":["a1ee98a"]},{"name":"./src/extensions/TableHandles/TableHandlesPlugin.ts","size":26718,"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":2038,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/BlockGroup.ts","size":1102,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/Doc.ts","size":90,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteExtensions.ts","size":4928,"chunks":["a1ee98a"]},{"name":"./src/editor/transformPasted.ts","size":2604,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteTipTapEditor.ts","size":3938,"chunks":["a1ee98a"]},{"name":"./src/style.css","size":0,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteEditor.ts","size":31088,"chunks":["a1ee98a"]},{"name":"./src/editor/defaultColors.ts","size":1193,"chunks":["a1ee98a"]},{"name":"./src/exporter/Exporter.ts","size":1075,"chunks":["a1ee98a"]},{"name":"./src/exporter/mapping.ts","size":197,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/getDefaultEmojiPickerItems.ts","size":1204,"chunks":["a1ee98a"]},{"name":"./src/util/combineByGroup.ts","size":550,"chunks":["a1ee98a"]},{"name":"./src/api/testUtil/partialBlockTestUtil.ts","size":3860,"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":7904,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/de.ts","size":8626,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/es.ts","size":8483,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/fr.ts","size":9256,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/hr.ts","size":8518,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/is.ts","size":8246,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/it.ts","size":8582,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ja.ts","size":7506,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ko.ts","size":7283,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/nl.ts","size":8481,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/no.ts","size":8357,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/pl.ts","size":8172,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/pt.ts","size":8419,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ru.ts","size":9103,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/uk.ts","size":9034,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/vi.ts","size":8281,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/zh.ts","size":7200,"chunks":["9eaffe2"]},{"name":"./src/i18n/index.ts","size":0,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/en.ts","size":8004,"chunks":["a1e239a"]}]}
|
package/package.json
CHANGED
|
@@ -5,8 +5,13 @@
|
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"*.css"
|
|
7
7
|
],
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/TypeCellOS/BlockNote.git",
|
|
11
|
+
"directory": "packages/core"
|
|
12
|
+
},
|
|
8
13
|
"license": "MPL-2.0",
|
|
9
|
-
"version": "0.
|
|
14
|
+
"version": "0.27.2",
|
|
10
15
|
"files": [
|
|
11
16
|
"dist",
|
|
12
17
|
"types",
|
|
@@ -49,27 +54,22 @@
|
|
|
49
54
|
"types": "./types/src/comments/index.d.ts",
|
|
50
55
|
"import": "./dist/comments.js",
|
|
51
56
|
"require": "./dist/comments.cjs"
|
|
57
|
+
},
|
|
58
|
+
"./locales": {
|
|
59
|
+
"types": "./types/src/i18n/index.d.ts",
|
|
60
|
+
"import": "./dist/locales.js",
|
|
61
|
+
"require": "./dist/locales.cjs"
|
|
52
62
|
}
|
|
53
63
|
},
|
|
54
|
-
"scripts": {
|
|
55
|
-
"dev": "vite",
|
|
56
|
-
"build": "tsc && vite build",
|
|
57
|
-
"build-bundled": "tsc && vite build --config vite.config.bundled.ts && git checkout tmp-releases && rm -rf ../../release && mv ../../release-tmp ../../release",
|
|
58
|
-
"preview": "vite preview",
|
|
59
|
-
"lint": "eslint src --max-warnings 0",
|
|
60
|
-
"test": "vitest --run",
|
|
61
|
-
"test-watch": "vitest watch",
|
|
62
|
-
"clean": "rimraf dist && rimraf types"
|
|
63
|
-
},
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"@emoji-mart/data": "^1.2.1",
|
|
66
|
+
"@shikijs/types": "3.2.1",
|
|
66
67
|
"@tiptap/core": "^2.11.5",
|
|
67
68
|
"@tiptap/extension-bold": "^2.11.5",
|
|
68
69
|
"@tiptap/extension-code": "^2.11.5",
|
|
69
70
|
"@tiptap/extension-collaboration": "^2.11.5",
|
|
70
71
|
"@tiptap/extension-collaboration-cursor": "^2.11.5",
|
|
71
72
|
"@tiptap/extension-gapcursor": "^2.11.5",
|
|
72
|
-
"@tiptap/extension-hard-break": "^2.11.5",
|
|
73
73
|
"@tiptap/extension-history": "^2.11.5",
|
|
74
74
|
"@tiptap/extension-horizontal-rule": "^2.11.5",
|
|
75
75
|
"@tiptap/extension-italic": "^2.11.5",
|
|
@@ -83,26 +83,25 @@
|
|
|
83
83
|
"@tiptap/extension-underline": "^2.11.5",
|
|
84
84
|
"@tiptap/pm": "^2.11.5",
|
|
85
85
|
"emoji-mart": "^5.6.0",
|
|
86
|
-
"hast-util-from-dom": "^
|
|
86
|
+
"hast-util-from-dom": "^5.0.1",
|
|
87
87
|
"prosemirror-dropcursor": "^1.8.1",
|
|
88
|
-
"prosemirror-highlight": "^0.
|
|
88
|
+
"prosemirror-highlight": "^0.13.0",
|
|
89
89
|
"prosemirror-model": "^1.24.1",
|
|
90
90
|
"prosemirror-state": "^1.4.3",
|
|
91
91
|
"prosemirror-tables": "^1.6.4",
|
|
92
92
|
"prosemirror-transform": "^1.10.2",
|
|
93
93
|
"prosemirror-view": "^1.38.1",
|
|
94
|
-
"rehype-format": "^5.0.
|
|
95
|
-
"rehype-parse": "^
|
|
96
|
-
"rehype-remark": "^
|
|
97
|
-
"rehype-stringify": "^
|
|
98
|
-
"remark-gfm": "^
|
|
99
|
-
"remark-parse": "^
|
|
100
|
-
"remark-rehype": "^
|
|
101
|
-
"remark-stringify": "^
|
|
102
|
-
"
|
|
103
|
-
"unified": "^10.1.2",
|
|
94
|
+
"rehype-format": "^5.0.1",
|
|
95
|
+
"rehype-parse": "^9.0.1",
|
|
96
|
+
"rehype-remark": "^10.0.0",
|
|
97
|
+
"rehype-stringify": "^10.0.1",
|
|
98
|
+
"remark-gfm": "^4.0.1",
|
|
99
|
+
"remark-parse": "^11.0.0",
|
|
100
|
+
"remark-rehype": "^11.1.1",
|
|
101
|
+
"remark-stringify": "^11.0.0",
|
|
102
|
+
"unified": "^11.0.5",
|
|
104
103
|
"uuid": "^8.3.2",
|
|
105
|
-
"y-prosemirror": "1.
|
|
104
|
+
"y-prosemirror": "1.3.0",
|
|
106
105
|
"y-protocols": "^1.0.6",
|
|
107
106
|
"yjs": "^13.6.15"
|
|
108
107
|
},
|
|
@@ -133,9 +132,15 @@
|
|
|
133
132
|
"../../.eslintrc.js"
|
|
134
133
|
]
|
|
135
134
|
},
|
|
136
|
-
"
|
|
137
|
-
|
|
138
|
-
"
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
135
|
+
"gitHead": "37614ab348dcc7faa830a9a88437b37197a2162d",
|
|
136
|
+
"scripts": {
|
|
137
|
+
"dev": "vite",
|
|
138
|
+
"build": "tsc && vite build",
|
|
139
|
+
"build-bundled": "tsc && vite build --config vite.config.bundled.ts && git checkout tmp-releases && rm -rf ../../release && mv ../../release-tmp ../../release",
|
|
140
|
+
"preview": "vite preview",
|
|
141
|
+
"lint": "eslint src --max-warnings 0",
|
|
142
|
+
"test": "vitest --run",
|
|
143
|
+
"test-watch": "vitest watch",
|
|
144
|
+
"clean": "rimraf dist && rimraf types"
|
|
145
|
+
}
|
|
146
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<p>Paragraph</p><h1>Heading</h1><ol><li><p>Numbered List Item</p></li></ol><ul><li><p>Bullet List Item</p></li><li><input type="checkbox"><p class="bn-inline-content">Check List Item</p></li></ul><pre><code class="bn-inline-content language-
|
|
1
|
+
<p>Paragraph</p><h1>Heading</h1><ol><li><p>Numbered List Item</p></li></ol><ul><li><p>Bullet List Item</p></li><li><input type="checkbox"><p class="bn-inline-content">Check List Item</p></li></ul><pre><code class="bn-inline-content language-text" data-language="text">console.log("Hello World");</code></pre><table><tr><td colspan="1" rowspan="1"><p>Table Cell</p></td><td colspan="1" rowspan="1"><p>Table Cell</p></td><td colspan="1" rowspan="1"><p>Table Cell</p></td></tr><tr><td colspan="1" rowspan="1"><p>Table Cell</p></td><td colspan="1" rowspan="1"><p>Table Cell</p></td><td colspan="1" rowspan="1"><p>Table Cell</p></td></tr><tr><td colspan="1" rowspan="1"><p>Table Cell</p></td><td colspan="1" rowspan="1"><p>Table Cell</p></td><td colspan="1" rowspan="1"><p>Table Cell</p></td></tr></table><p>Add image</p><p data-text-color="red"></p>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<p data-text-color="red">Paragraph</p><h2 data-level="2">Heading</h2><ol start="2"><li><p data-start="2">Numbered List Item</p></li></ol><ul><li><p data-background-color="red">Bullet List Item</p></li><li><input type="checkbox" checked="" data-checked="true"><p class="bn-inline-content">Check List Item</p></li></ul><pre><code class="bn-inline-content language-typescript">console.log("Hello World");</code></pre><table><tr><td colspan="1" rowspan="1"><p>Table Cell</p></td><td colspan="1" rowspan="1"><p>Table Cell</p></td><td colspan="1" rowspan="1"><p>Table Cell</p></td></tr><tr><td colspan="1" rowspan="1"><p>Table Cell</p></td><td colspan="1" rowspan="1"><p>Table Cell</p></td><td colspan="1" rowspan="1"><p>Table Cell</p></td></tr><tr><td colspan="1" rowspan="1"><p>Table Cell</p></td><td colspan="1" rowspan="1"><p>Table Cell</p></td><td colspan="1" rowspan="1"><p>Table Cell</p></td></tr></table><figure data-name="1280px-Placeholder_view_vector.svg.png" data-url="https://upload.wikimedia.org/wikipedia/commons/thumb/3/3f/Placeholder_view_vector.svg/1280px-Placeholder_view_vector.svg.png" data-caption="Placeholder" data-preview-width="256"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/3/3f/Placeholder_view_vector.svg/1280px-Placeholder_view_vector.svg.png" alt="1280px-Placeholder_view_vector.svg.png" width="256"><figcaption>Placeholder</figcaption></figure><p></p>
|
|
1
|
+
<p data-text-color="red">Paragraph</p><h2 data-level="2">Heading</h2><ol start="2"><li><p data-start="2">Numbered List Item</p></li></ol><ul><li><p data-background-color="red">Bullet List Item</p></li><li><input type="checkbox" checked="" data-checked="true"><p class="bn-inline-content">Check List Item</p></li></ul><pre><code class="bn-inline-content language-typescript" data-language="typescript">console.log("Hello World");</code></pre><table><tr><td colspan="1" rowspan="1"><p>Table Cell</p></td><td colspan="1" rowspan="1"><p>Table Cell</p></td><td colspan="1" rowspan="1"><p>Table Cell</p></td></tr><tr><td colspan="1" rowspan="1"><p>Table Cell</p></td><td colspan="1" rowspan="1"><p>Table Cell</p></td><td colspan="1" rowspan="1"><p>Table Cell</p></td></tr><tr><td colspan="1" rowspan="1"><p>Table Cell</p></td><td colspan="1" rowspan="1"><p>Table Cell</p></td><td colspan="1" rowspan="1"><p>Table Cell</p></td></tr></table><figure data-name="1280px-Placeholder_view_vector.svg.png" data-url="https://upload.wikimedia.org/wikipedia/commons/thumb/3/3f/Placeholder_view_vector.svg/1280px-Placeholder_view_vector.svg.png" data-caption="Placeholder" data-preview-width="256"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/3/3f/Placeholder_view_vector.svg/1280px-Placeholder_view_vector.svg.png" alt="1280px-Placeholder_view_vector.svg.png" width="256"><figcaption>Placeholder</figcaption></figure><p></p>
|
|
@@ -97,7 +97,7 @@ describe("Test external clipboard HTML", () => {
|
|
|
97
97
|
new ClipboardEvent("paste")
|
|
98
98
|
);
|
|
99
99
|
|
|
100
|
-
expect(editor.document).toMatchFileSnapshot(
|
|
100
|
+
await expect(editor.document).toMatchFileSnapshot(
|
|
101
101
|
`./__snapshots__/external/${testCase.testName}.html`
|
|
102
102
|
);
|
|
103
103
|
}
|
|
@@ -1,23 +1,100 @@
|
|
|
1
1
|
import { Extension } from "@tiptap/core";
|
|
2
2
|
import { Plugin } from "prosemirror-state";
|
|
3
3
|
|
|
4
|
-
import type {
|
|
4
|
+
import type {
|
|
5
|
+
BlockNoteEditor,
|
|
6
|
+
BlockNoteEditorOptions,
|
|
7
|
+
} from "../../../editor/BlockNoteEditor";
|
|
5
8
|
import {
|
|
6
9
|
BlockSchema,
|
|
7
10
|
InlineContentSchema,
|
|
8
11
|
StyleSchema,
|
|
9
12
|
} from "../../../schema/index.js";
|
|
10
|
-
import { nestedListsToBlockNoteStructure } from "../../parsers/html/util/nestedLists.js";
|
|
11
13
|
import { acceptedMIMETypes } from "./acceptedMIMETypes.js";
|
|
12
14
|
import { handleFileInsertion } from "./handleFileInsertion.js";
|
|
13
15
|
import { handleVSCodePaste } from "./handleVSCodePaste.js";
|
|
16
|
+
import { isMarkdown } from "../../parsers/markdown/detectMarkdown.js";
|
|
17
|
+
|
|
18
|
+
function defaultPasteHandler({
|
|
19
|
+
event,
|
|
20
|
+
editor,
|
|
21
|
+
prioritizeMarkdownOverHTML,
|
|
22
|
+
plainTextAsMarkdown,
|
|
23
|
+
}: {
|
|
24
|
+
event: ClipboardEvent;
|
|
25
|
+
editor: BlockNoteEditor<any, any, any>;
|
|
26
|
+
prioritizeMarkdownOverHTML: boolean;
|
|
27
|
+
plainTextAsMarkdown: boolean;
|
|
28
|
+
}) {
|
|
29
|
+
let format: (typeof acceptedMIMETypes)[number] | undefined;
|
|
30
|
+
for (const mimeType of acceptedMIMETypes) {
|
|
31
|
+
if (event.clipboardData!.types.includes(mimeType)) {
|
|
32
|
+
format = mimeType;
|
|
33
|
+
break;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
if (!format) {
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (format === "vscode-editor-data") {
|
|
42
|
+
handleVSCodePaste(event, editor.prosemirrorView!);
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
if (format === "Files") {
|
|
47
|
+
handleFileInsertion(event, editor);
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const data = event.clipboardData!.getData(format);
|
|
52
|
+
|
|
53
|
+
if (format === "blocknote/html") {
|
|
54
|
+
// Is blocknote/html, so no need to convert it
|
|
55
|
+
editor.pasteHTML(data, true);
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (format === "text/markdown") {
|
|
60
|
+
editor.pasteMarkdown(data);
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if (prioritizeMarkdownOverHTML) {
|
|
65
|
+
// Use plain text instead of HTML if it looks like Markdown
|
|
66
|
+
const plainText = event.clipboardData!.getData("text/plain");
|
|
67
|
+
|
|
68
|
+
if (isMarkdown(plainText)) {
|
|
69
|
+
editor.pasteMarkdown(plainText);
|
|
70
|
+
return true;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (format === "text/html") {
|
|
75
|
+
editor.pasteHTML(data);
|
|
76
|
+
return true;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if (plainTextAsMarkdown) {
|
|
80
|
+
editor.pasteMarkdown(data);
|
|
81
|
+
return true;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
editor.pasteText(data);
|
|
85
|
+
return true;
|
|
86
|
+
}
|
|
14
87
|
|
|
15
88
|
export const createPasteFromClipboardExtension = <
|
|
16
89
|
BSchema extends BlockSchema,
|
|
17
90
|
I extends InlineContentSchema,
|
|
18
91
|
S extends StyleSchema
|
|
19
92
|
>(
|
|
20
|
-
editor: BlockNoteEditor<BSchema, I, S
|
|
93
|
+
editor: BlockNoteEditor<BSchema, I, S>,
|
|
94
|
+
pasteHandler: Exclude<
|
|
95
|
+
BlockNoteEditorOptions<any, any, any>["pasteHandler"],
|
|
96
|
+
undefined
|
|
97
|
+
>
|
|
21
98
|
) =>
|
|
22
99
|
Extension.create({
|
|
23
100
|
name: "pasteFromClipboard",
|
|
@@ -26,51 +103,28 @@ export const createPasteFromClipboardExtension = <
|
|
|
26
103
|
new Plugin({
|
|
27
104
|
props: {
|
|
28
105
|
handleDOMEvents: {
|
|
29
|
-
paste(
|
|
106
|
+
paste(_view, event) {
|
|
30
107
|
event.preventDefault();
|
|
31
108
|
|
|
32
109
|
if (!editor.isEditable) {
|
|
33
110
|
return;
|
|
34
111
|
}
|
|
35
112
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if (format === "Files") {
|
|
53
|
-
handleFileInsertion(event, editor);
|
|
54
|
-
return true;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
let data = event.clipboardData!.getData(format);
|
|
58
|
-
|
|
59
|
-
if (format === "blocknote/html") {
|
|
60
|
-
view.pasteHTML(data);
|
|
61
|
-
return true;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
if (format === "text/html") {
|
|
65
|
-
const htmlNode = nestedListsToBlockNoteStructure(data.trim());
|
|
66
|
-
data = htmlNode.innerHTML;
|
|
67
|
-
view.pasteHTML(data);
|
|
68
|
-
return true;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
view.pasteText(data);
|
|
72
|
-
|
|
73
|
-
return true;
|
|
113
|
+
return pasteHandler({
|
|
114
|
+
event,
|
|
115
|
+
editor,
|
|
116
|
+
defaultPasteHandler: ({
|
|
117
|
+
prioritizeMarkdownOverHTML = true,
|
|
118
|
+
plainTextAsMarkdown = true,
|
|
119
|
+
} = {}) => {
|
|
120
|
+
return defaultPasteHandler({
|
|
121
|
+
event,
|
|
122
|
+
editor,
|
|
123
|
+
prioritizeMarkdownOverHTML,
|
|
124
|
+
plainTextAsMarkdown,
|
|
125
|
+
});
|
|
126
|
+
},
|
|
127
|
+
});
|
|
74
128
|
},
|
|
75
129
|
},
|
|
76
130
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<pre><code class="bn-inline-content language-javascript">const hello = 'world';<br>console.log(hello);<br></code></pre>
|
|
1
|
+
<pre><code class="bn-inline-content language-javascript" data-language="javascript">const hello = 'world';<br>console.log(hello);<br></code></pre>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
<div class="bn-block-group" data-node-type="blockGroup"><div class="bn-block-outer" data-node-type="blockOuter" data-id="1"><div class="bn-block" data-node-type="blockContainer" data-id="1"><div class="bn-block-content" data-content-type="codeBlock"><pre><code class="bn-inline-content language-javascript">const hello = 'world';
|
|
1
|
+
<div class="bn-block-group" data-node-type="blockGroup"><div class="bn-block-outer" data-node-type="blockOuter" data-id="1"><div class="bn-block" data-node-type="blockContainer" data-id="1"><div class="bn-block-content" data-content-type="codeBlock"><pre><code class="bn-inline-content language-javascript" data-language="javascript">const hello = 'world';
|
|
2
2
|
console.log(hello);
|
|
3
3
|
</code></pre></div></div></div></div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<pre><code class="bn-inline-content language-
|
|
1
|
+
<pre><code class="bn-inline-content language-text" data-language="text">console.log('Hello, world!');</code></pre>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<div class="bn-block-group" data-node-type="blockGroup"><div class="bn-block-outer" data-node-type="blockOuter" data-id="1"><div class="bn-block" data-node-type="blockContainer" data-id="1"><div class="bn-block-content" data-content-type="codeBlock"><pre><code class="bn-inline-content language-
|
|
1
|
+
<div class="bn-block-group" data-node-type="blockGroup"><div class="bn-block-outer" data-node-type="blockOuter" data-id="1"><div class="bn-block" data-node-type="blockContainer" data-id="1"><div class="bn-block-content" data-content-type="codeBlock"><pre><code class="bn-inline-content language-text" data-language="text">console.log('Hello, world!');</code></pre></div></div></div></div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<pre><code class="bn-inline-content language-
|
|
1
|
+
<pre><code class="bn-inline-content language-text" data-language="text"></code></pre>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<div class="bn-block-group" data-node-type="blockGroup"><div class="bn-block-outer" data-node-type="blockOuter" data-id="1"><div class="bn-block" data-node-type="blockContainer" data-id="1"><div class="bn-block-content" data-content-type="codeBlock"><pre><code class="bn-inline-content language-
|
|
1
|
+
<div class="bn-block-group" data-node-type="blockGroup"><div class="bn-block-outer" data-node-type="blockOuter" data-id="1"><div class="bn-block" data-node-type="blockContainer" data-id="1"><div class="bn-block-content" data-content-type="codeBlock"><pre><code class="bn-inline-content language-text" data-language="text"></code></pre></div></div></div></div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<pre><code class="bn-inline-content language-python">print('Hello, world!')</code></pre>
|
|
1
|
+
<pre><code class="bn-inline-content language-python" data-language="python">print('Hello, world!')</code></pre>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<div class="bn-block-group" data-node-type="blockGroup"><div class="bn-block-outer" data-node-type="blockOuter" data-id="1"><div class="bn-block" data-node-type="blockContainer" data-id="1"><div class="bn-block-content" data-content-type="codeBlock"><pre><code class="bn-inline-content language-python">print('Hello, world!')</code></pre></div></div></div></div>
|
|
1
|
+
<div class="bn-block-group" data-node-type="blockGroup"><div class="bn-block-outer" data-node-type="blockOuter" data-id="1"><div class="bn-block" data-node-type="blockContainer" data-id="1"><div class="bn-block-content" data-content-type="codeBlock"><pre><code class="bn-inline-content language-python" data-language="python">print('Hello, world!')</code></pre></div></div></div></div>
|
|
@@ -39,7 +39,7 @@ async function convertToHTMLAndCompareSnapshots<
|
|
|
39
39
|
"/" +
|
|
40
40
|
snapshotName +
|
|
41
41
|
"/internal.html";
|
|
42
|
-
expect(internalHTML).toMatchFileSnapshot(internalHTMLSnapshotPath);
|
|
42
|
+
await expect(internalHTML).toMatchFileSnapshot(internalHTMLSnapshotPath);
|
|
43
43
|
|
|
44
44
|
// turn the internalHTML back into blocks, and make sure no data was lost
|
|
45
45
|
const fullBlocks = partialBlocksToBlocksForTesting(editor.schema, blocks);
|
|
@@ -57,7 +57,7 @@ async function convertToHTMLAndCompareSnapshots<
|
|
|
57
57
|
"/" +
|
|
58
58
|
snapshotName +
|
|
59
59
|
"/external.html";
|
|
60
|
-
expect(externalHTML).toMatchFileSnapshot(externalHTMLSnapshotPath);
|
|
60
|
+
await expect(externalHTML).toMatchFileSnapshot(externalHTMLSnapshotPath);
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
const testCases = [
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
function addAttributesAndRemoveClasses(element: HTMLElement) {
|
|
17
17
|
// Removes all BlockNote specific class names.
|
|
18
18
|
const className =
|
|
19
|
-
|
|
19
|
+
Array.from(element.classList).filter(
|
|
20
20
|
(className) => !className.startsWith("bn-")
|
|
21
21
|
) || [];
|
|
22
22
|
|
|
@@ -122,7 +122,7 @@ function serializeBlock<
|
|
|
122
122
|
|
|
123
123
|
// the container node is just used as a workaround to get some block-level attributes.
|
|
124
124
|
// we should change toExternalHTML so that this is not necessary
|
|
125
|
-
const attrs =
|
|
125
|
+
const attrs = Array.from(bc.dom.attributes);
|
|
126
126
|
|
|
127
127
|
const ret = editor.blockImplementations[
|
|
128
128
|
block.type as any
|
|
@@ -130,7 +130,7 @@ function serializeBlock<
|
|
|
130
130
|
|
|
131
131
|
const elementFragment = doc.createDocumentFragment();
|
|
132
132
|
if (ret.dom.classList.contains("bn-block-content")) {
|
|
133
|
-
const blockContentDataAttributes = [...attrs, ...ret.dom.attributes].filter(
|
|
133
|
+
const blockContentDataAttributes = [...attrs, ...Array.from(ret.dom.attributes)].filter(
|
|
134
134
|
(attr) =>
|
|
135
135
|
attr.name.startsWith("data") &&
|
|
136
136
|
attr.name !== "data-content-type" &&
|
|
@@ -148,7 +148,7 @@ function serializeBlock<
|
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
addAttributesAndRemoveClasses(ret.dom.firstChild! as HTMLElement);
|
|
151
|
-
elementFragment.append(...ret.dom.childNodes);
|
|
151
|
+
elementFragment.append(...Array.from(ret.dom.childNodes));
|
|
152
152
|
} else {
|
|
153
153
|
elementFragment.append(ret.dom);
|
|
154
154
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
```
|
|
1
|
+
```text
|
|
2
2
|
```
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
*
|
|
2
|
-
* Bullet List Item 2
|
|
1
|
+
* Bullet List Item 1
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
2. Numbered List Item 2
|
|
3
|
+
* Bullet List Item 2
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
1. Numbered List Item 1
|
|
6
|
+
|
|
7
|
+
2. Numbered List Item 2
|
|
8
|
+
|
|
9
|
+
* [ ] Check List Item 1
|
|
10
|
+
* [x] Check List Item 2
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
*
|
|
1
|
+
* Bullet List Item 1
|
|
2
2
|
|
|
3
|
-
*
|
|
3
|
+
* Bullet List Item 2
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
1. Numbered List Item 1
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
2. Numbered List Item 2
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
* [ ] Check List Item 1
|
|
10
|
+
* [x] Check List Item 2
|
|
@@ -40,7 +40,7 @@ async function convertToMarkdownAndCompareSnapshots<
|
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
expect(md).toMatchFileSnapshot(snapshotPath);
|
|
43
|
+
await expect(md).toMatchFileSnapshot(snapshotPath);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
const testCases = [
|
|
@@ -71,7 +71,7 @@ describe("markdownExporter", () => {
|
|
|
71
71
|
|
|
72
72
|
for (const document of testCase.documents) {
|
|
73
73
|
// eslint-disable-next-line no-loop-func
|
|
74
|
-
it("Convert " + document.name + " to
|
|
74
|
+
it("Convert " + document.name + " to Markdown", async () => {
|
|
75
75
|
const nameSplit = document.name.split("/");
|
|
76
76
|
await convertToMarkdownAndCompareSnapshots(
|
|
77
77
|
editor,
|