@blocknote/core 0.31.0 → 0.31.1
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 +8 -8
- package/dist/blocknote.cjs.map +1 -1
- package/dist/blocknote.js +453 -397
- package/dist/blocknote.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/webpack-stats.json +1 -1
- package/package.json +2 -2
- package/src/editor/BlockNoteEditor.ts +41 -7
- package/src/editor/BlockNoteExtension.ts +2 -2
- package/src/extensions/Collaboration/CursorPlugin.ts +1 -1
- package/src/extensions/Collaboration/ForkYDocPlugin.ts +1 -1
- package/src/extensions/Collaboration/SyncPlugin.ts +1 -1
- package/src/extensions/Collaboration/UndoPlugin.ts +1 -1
- package/src/extensions/Comments/CommentsPlugin.ts +4 -0
- package/src/extensions/FilePanel/FilePanelPlugin.ts +4 -0
- package/src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts +4 -0
- package/src/extensions/LinkToolbar/LinkToolbarPlugin.ts +4 -0
- package/src/extensions/NodeSelectionKeyboard/NodeSelectionKeyboardPlugin.ts +4 -0
- package/src/extensions/Placeholder/PlaceholderPlugin.ts +4 -0
- package/src/extensions/PreviousBlockType/PreviousBlockTypePlugin.ts +4 -0
- package/src/extensions/ShowSelection/ShowSelectionPlugin.ts +4 -0
- package/src/extensions/SideMenu/SideMenuPlugin.ts +4 -0
- package/src/extensions/SuggestionMenu/SuggestionPlugin.ts +4 -0
- package/src/extensions/TableHandles/TableHandlesPlugin.ts +4 -0
- package/types/src/editor/BlockNoteEditor.d.ts +7 -1
- package/types/src/editor/BlockNoteExtension.d.ts +1 -1
- package/types/src/extensions/Collaboration/CursorPlugin.d.ts +1 -1
- package/types/src/extensions/Collaboration/ForkYDocPlugin.d.ts +1 -1
- package/types/src/extensions/Collaboration/SyncPlugin.d.ts +1 -1
- package/types/src/extensions/Collaboration/UndoPlugin.d.ts +1 -1
- package/types/src/extensions/Comments/CommentsPlugin.d.ts +1 -0
- package/types/src/extensions/FilePanel/FilePanelPlugin.d.ts +1 -0
- package/types/src/extensions/FormattingToolbar/FormattingToolbarPlugin.d.ts +1 -0
- package/types/src/extensions/LinkToolbar/LinkToolbarPlugin.d.ts +1 -0
- package/types/src/extensions/NodeSelectionKeyboard/NodeSelectionKeyboardPlugin.d.ts +1 -0
- package/types/src/extensions/Placeholder/PlaceholderPlugin.d.ts +1 -0
- package/types/src/extensions/PreviousBlockType/PreviousBlockTypePlugin.d.ts +1 -0
- package/types/src/extensions/ShowSelection/ShowSelectionPlugin.d.ts +1 -0
- package/types/src/extensions/SideMenu/SideMenuPlugin.d.ts +1 -0
- package/types/src/extensions/SuggestionMenu/SuggestionPlugin.d.ts +1 -0
- package/types/src/extensions/TableHandles/TableHandlesPlugin.d.ts +1 -0
- package/types/src/api/blockManipulation/commands/removeBlocks/removeBlocks.d.ts +0 -4
- package/types/src/api/blockManipulation/commands/removeBlocks/removeBlocks.test.d.ts +0 -1
- package/types/src/api/blockManipulation/selections/selection.test.d.ts +0 -1
- package/types/src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.d.ts +0 -5
- package/types/src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.test.d.ts +0 -1
- package/types/src/api/blockManipulation/transactions.test.d.ts +0 -0
- package/types/src/api/clipboard/clipboardExternal.test.d.ts +0 -1
- package/types/src/api/clipboard/clipboardInternal.test.d.ts +0 -1
- package/types/src/api/clipboard/testUtil.d.ts +0 -541
- package/types/src/api/exporters/html/htmlConversion.test.d.ts +0 -1
- package/types/src/api/exporters/markdown/markdownExporter.test.d.ts +0 -1
- package/types/src/api/nodeConversions/nodeConversions.test.d.ts +0 -1
- package/types/src/api/parsers/html/parseHTML.test.d.ts +0 -1
- package/types/src/api/parsers/markdown/parseMarkdown.test.d.ts +0 -1
- package/types/src/api/testUtil/cases/customBlocks.d.ts +0 -670
- package/types/src/api/testUtil/cases/customInlineContent.d.ts +0 -558
- package/types/src/api/testUtil/cases/customStyles.d.ts +0 -552
- package/types/src/api/testUtil/cases/defaultSchema.d.ts +0 -4
- package/types/src/api/testUtil/index.d.ts +0 -14
- package/types/src/api/testUtil/partialBlockTestUtil.d.ts +0 -9
- package/types/src/api/testUtil/paste.d.ts +0 -2
- package/types/src/blocks/CodeBlockContent/defaultSupportedLanguages.d.ts +0 -6
- package/types/src/extensions/Collaboration/createCollaborationExtensions.d.ts +0 -17
package/dist/webpack-stats.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"builtAt":1747754359816,"assets":[{"name":"blocknote.cjs","size":190198},{"name":"comments.cjs","size":11826},{"name":"locales.cjs","size":122928},{"name":"en-BXVKCwYt.cjs","size":5518},{"name":"en-BXVKCwYt.cjs.map","size":12761},{"name":"comments.cjs.map","size":47628},{"name":"locales.cjs.map","size":259333},{"name":"blocknote.cjs.map","size":910812}],"chunks":[{"id":"a1ee98a","entry":true,"initial":true,"files":["blocknote.cjs"],"names":["blocknote"]},{"id":"1627b02","entry":true,"initial":true,"files":["comments.cjs"],"names":["comments"]},{"id":"9eaffe2","entry":true,"initial":true,"files":["locales.cjs"],"names":["locales"]},{"id":"a1e239a","entry":false,"initial":true,"files":["en-BXVKCwYt.cjs"],"names":["en"]}],"modules":[{"name":"./src/extensions/UniqueID/UniqueID.ts","size":9054,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/types.ts","size":302,"chunks":["a1ee98a"]},{"name":"./src/util/table.ts","size":1212,"chunks":["a1ee98a"]},{"name":"./src/util/typescript.ts","size":331,"chunks":["a1ee98a"]},{"name":"./src/util/browser.ts","size":536,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlockHelpers.ts","size":2080,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultProps.ts","size":269,"chunks":["a1ee98a"]},{"name":"./src/util/string.ts","size":299,"chunks":["a1ee98a"]},{"name":"./src/schema/blocks/internal.ts","size":4072,"chunks":["a1ee98a"]},{"name":"./src/schema/blocks/createSpec.ts","size":3612,"chunks":["a1ee98a"]},{"name":"./src/api/getBlockInfoFromPos.ts","size":3797,"chunks":["a1ee98a"]},{"name":"./src/api/pmUtil.ts","size":651,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/nodeToBlock.ts","size":13005,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/internal.ts","size":1398,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/createSpec.ts","size":2559,"chunks":["a1ee98a"]},{"name":"./src/schema/styles/internal.ts","size":1162,"chunks":["a1ee98a"]},{"name":"./src/schema/styles/createSpec.ts","size":1263,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/tables/tables.ts","size":10346,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/blockToNode.ts","size":7135,"chunks":["a1ee98a"]},{"name":"./src/api/nodeUtil.ts","size":3150,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/insertBlocks/insertBlocks.ts","size":785,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.ts","size":1876,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/updateBlock/updateBlock.ts","size":5637,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/util/serializeBlocksExternalHTML.ts","size":5025,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/externalHTMLExporter.ts","size":886,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/util/serializeBlocksInternalHTML.ts","size":3099,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/internalHTMLSerializer.ts","size":288,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/parse/parseFigureElement.ts","size":342,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createAddFileButton.ts","size":1710,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createFileNameWithIcon.ts","size":753,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createFileBlockWrapper.ts","size":1428,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/toExternalHTML/createFigureWithCaption.ts","size":307,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/toExternalHTML/createLinkWithCaption.ts","size":294,"chunks":["a1ee98a"]},{"name":"./src/blocks/AudioBlockContent/parseAudioElement.ts","size":108,"chunks":["a1ee98a"]},{"name":"./src/blocks/AudioBlockContent/AudioBlockContent.ts","size":3219,"chunks":["a1ee98a"]},{"name":"./src/blocks/CodeBlockContent/CodeBlockContent.ts","size":9248,"chunks":["a1ee98a"]},{"name":"./src/extensions/BackgroundColor/BackgroundColorMark.ts","size":946,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextColor/TextColorMark.ts","size":866,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/parse/parseEmbedElement.ts","size":108,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/FileBlockContent.ts","size":1524,"chunks":["a1ee98a"]},{"name":"./src/blocks/HeadingBlockContent/HeadingBlockContent.ts","size":3376,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createResizableFileBlockWrapper.ts","size":4836,"chunks":["a1ee98a"]},{"name":"./src/blocks/ImageBlockContent/parseImageElement.ts","size":175,"chunks":["a1ee98a"]},{"name":"./src/blocks/ImageBlockContent/ImageBlockContent.ts","size":3374,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/getListItemContent.ts","size":1425,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/splitBlock/splitBlock.ts","size":868,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/ListItemKeyboardShortcuts.ts","size":1443,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.ts","size":3121,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/CheckListItemBlockContent/CheckListItemBlockContent.ts","size":7286,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListIndexingPlugin.ts","size":2207,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.ts","size":4057,"chunks":["a1ee98a"]},{"name":"./src/blocks/ParagraphBlockContent/ParagraphBlockContent.ts","size":1520,"chunks":["a1ee98a"]},{"name":"./src/blocks/QuoteBlockContent/QuoteBlockContent.ts","size":1953,"chunks":["a1ee98a"]},{"name":"./src/blocks/TableBlockContent/TableExtension.ts","size":2297,"chunks":["a1ee98a"]},{"name":"./src/blocks/TableBlockContent/TableBlockContent.ts","size":6183,"chunks":["a1ee98a"]},{"name":"./src/blocks/VideoBlockContent/parseVideoElement.ts","size":175,"chunks":["a1ee98a"]},{"name":"./src/blocks/VideoBlockContent/VideoBlockContent.ts","size":3293,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlocks.ts","size":1163,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlockTypeGuards.ts","size":1688,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/uploadToTmpFilesDotOrg_DEV_ONLY.ts","size":316,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts","size":7012,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteSchema.ts","size":1044,"chunks":["a1ee98a"]},{"name":"./src/blocks/PageBreakBlockContent/PageBreakBlockContent.ts","size":854,"chunks":["a1ee98a"]},{"name":"./src/blocks/PageBreakBlockContent/schema.ts","size":350,"chunks":["a1ee98a"]},{"name":"./src/blocks/PageBreakBlockContent/getPageBreakSlashMenuItems.ts","size":536,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/moveBlocks/moveBlocks.ts","size":5642,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/nestBlock/nestBlock.ts","size":2284,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/getBlock/getBlock.ts","size":1895,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/insertContentAt.ts","size":1049,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/selections/selection.ts","size":5093,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/selections/textCursorPosition.ts","size":2430,"chunks":["a1ee98a"]},{"name":"./src/util/esmDependencies.ts","size":820,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/removeUnderlinesRehypePlugin.ts","size":752,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/util/addSpacesToCheckboxesRehypePlugin.ts","size":969,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/markdownExporter.ts","size":837,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/html/util/nestedLists.ts","size":2174,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/html/parseHTML.ts","size":429,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/markdown/parseMarkdown.ts","size":1129,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/acceptedMIMETypes.ts","size":134,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/handleFileInsertion.ts","size":3928,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/fileDropExtension.ts","size":884,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/markdown/detectMarkdown.ts","size":1112,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/handleVSCodePaste.ts","size":661,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/pasteExtension.ts","size":2412,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/fragmentToBlocks.ts","size":629,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/toClipboard/copyExtension.ts","size":5159,"chunks":["a1ee98a"]},{"name":"./src/extensions/BackgroundColor/BackgroundColorExtension.ts","size":819,"chunks":["a1ee98a"]},{"name":"./src/util/EventEmitter.ts","size":744,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteExtension.ts","size":347,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/CursorPlugin.ts","size":3786,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/SyncPlugin.ts","size":245,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/UndoPlugin.ts","size":228,"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":7771,"chunks":["a1ee98a"]},{"name":"./src/extensions/FilePanel/FilePanelPlugin.ts","size":4090,"chunks":["a1ee98a"]},{"name":"./src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts","size":6030,"chunks":["a1ee98a"]},{"name":"./src/extensions/HardBreak/HardBreak.ts","size":376,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/mergeBlocks/mergeBlocks.ts","size":3228,"chunks":["a1ee98a"]},{"name":"./src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts","size":18080,"chunks":["a1ee98a"]},{"name":"./src/extensions/LinkToolbar/LinkToolbarPlugin.ts","size":7652,"chunks":["a1ee98a"]},{"name":"./src/extensions/LinkToolbar/protocols.ts","size":172,"chunks":["a1ee98a"]},{"name":"./src/extensions/NodeSelectionKeyboard/NodeSelectionKeyboardPlugin.ts","size":1310,"chunks":["a1ee98a"]},{"name":"./src/extensions/Placeholder/PlaceholderPlugin.ts","size":3848,"chunks":["a1ee98a"]},{"name":"./src/extensions/PreviousBlockType/PreviousBlockTypePlugin.ts","size":5179,"chunks":["a1ee98a"]},{"name":"./src/extensions/ShowSelection/ShowSelectionPlugin.ts","size":994,"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":14134,"chunks":["a1ee98a"]},{"name":"./src/api/positionMapping.ts","size":1652,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/SuggestionPlugin.ts","size":9029,"chunks":["a1ee98a"]},{"name":"./src/extensions/Suggestions/SuggestionMarks.ts","size":4452,"chunks":["a1ee98a"]},{"name":"./src/extensions/TableHandles/TableHandlesPlugin.ts","size":27287,"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":3912,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteExtensions.ts","size":5400,"chunks":["a1ee98a"]},{"name":"./src/editor/transformPasted.ts","size":2604,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteTipTapEditor.ts","size":5702,"chunks":["a1ee98a"]},{"name":"./src/style.css","size":0,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteEditor.ts","size":36762,"chunks":["a1ee98a"]},{"name":"./src/editor/defaultColors.ts","size":1193,"chunks":["a1ee98a"]},{"name":"./src/exporter/Exporter.ts","size":1075,"chunks":["a1ee98a"]},{"name":"./src/exporter/mapping.ts","size":197,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/getDefaultEmojiPickerItems.ts","size":1204,"chunks":["a1ee98a"]},{"name":"./src/util/combineByGroup.ts","size":550,"chunks":["a1ee98a"]},{"name":"./src/index.ts","size":0,"chunks":["a1ee98a"]},{"name":"./src/comments/threadstore/ThreadStoreAuth.ts","size":25,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/DefaultThreadStoreAuth.ts","size":2014,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/ThreadStore.ts","size":77,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/TipTapThreadStore.ts","size":5321,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/yjsHelpers.ts","size":3002,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/YjsThreadStoreBase.ts","size":790,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/RESTYjsThreadStore.ts","size":2069,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/YjsThreadStore.ts","size":7267,"chunks":["1627b02"]},{"name":"./src/comments/index.ts","size":0,"chunks":["1627b02"]},{"name":"./src/i18n/locales/ar.ts","size":7874,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/de.ts","size":8600,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/es.ts","size":8457,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/fr.ts","size":9228,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/hr.ts","size":8490,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/is.ts","size":8222,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/it.ts","size":8553,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ja.ts","size":7485,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ko.ts","size":7261,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/nl.ts","size":8458,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/no.ts","size":8333,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/pl.ts","size":8145,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/pt.ts","size":8391,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ru.ts","size":9077,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/sk.ts","size":8288,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/uk.ts","size":9004,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/vi.ts","size":8253,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/zh.ts","size":7179,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/zh-tw.ts","size":7204,"chunks":["9eaffe2"]},{"name":"./src/i18n/index.ts","size":0,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/en.ts","size":7979,"chunks":["a1e239a"]}]}
|
|
1
|
+
{"builtAt":1747989946961,"assets":[{"name":"blocknote.cjs","size":190950},{"name":"comments.cjs","size":11826},{"name":"locales.cjs","size":122928},{"name":"en-BXVKCwYt.cjs","size":5518},{"name":"en-BXVKCwYt.cjs.map","size":12761},{"name":"comments.cjs.map","size":47628},{"name":"locales.cjs.map","size":259333},{"name":"blocknote.cjs.map","size":913210}],"chunks":[{"id":"a1ee98a","entry":true,"initial":true,"files":["blocknote.cjs"],"names":["blocknote"]},{"id":"1627b02","entry":true,"initial":true,"files":["comments.cjs"],"names":["comments"]},{"id":"9eaffe2","entry":true,"initial":true,"files":["locales.cjs"],"names":["locales"]},{"id":"a1e239a","entry":false,"initial":true,"files":["en-BXVKCwYt.cjs"],"names":["en"]}],"modules":[{"name":"./src/extensions/UniqueID/UniqueID.ts","size":9054,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/types.ts","size":302,"chunks":["a1ee98a"]},{"name":"./src/util/table.ts","size":1212,"chunks":["a1ee98a"]},{"name":"./src/util/typescript.ts","size":331,"chunks":["a1ee98a"]},{"name":"./src/util/browser.ts","size":536,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlockHelpers.ts","size":2080,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultProps.ts","size":269,"chunks":["a1ee98a"]},{"name":"./src/util/string.ts","size":299,"chunks":["a1ee98a"]},{"name":"./src/schema/blocks/internal.ts","size":4072,"chunks":["a1ee98a"]},{"name":"./src/schema/blocks/createSpec.ts","size":3612,"chunks":["a1ee98a"]},{"name":"./src/api/getBlockInfoFromPos.ts","size":3797,"chunks":["a1ee98a"]},{"name":"./src/api/pmUtil.ts","size":651,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/nodeToBlock.ts","size":13005,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/internal.ts","size":1398,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/createSpec.ts","size":2559,"chunks":["a1ee98a"]},{"name":"./src/schema/styles/internal.ts","size":1162,"chunks":["a1ee98a"]},{"name":"./src/schema/styles/createSpec.ts","size":1263,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/tables/tables.ts","size":10346,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/blockToNode.ts","size":7135,"chunks":["a1ee98a"]},{"name":"./src/api/nodeUtil.ts","size":3150,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/insertBlocks/insertBlocks.ts","size":785,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.ts","size":1876,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/updateBlock/updateBlock.ts","size":5637,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/util/serializeBlocksExternalHTML.ts","size":5025,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/externalHTMLExporter.ts","size":886,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/util/serializeBlocksInternalHTML.ts","size":3099,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/internalHTMLSerializer.ts","size":288,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/parse/parseFigureElement.ts","size":342,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createAddFileButton.ts","size":1710,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createFileNameWithIcon.ts","size":753,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createFileBlockWrapper.ts","size":1428,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/toExternalHTML/createFigureWithCaption.ts","size":307,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/toExternalHTML/createLinkWithCaption.ts","size":294,"chunks":["a1ee98a"]},{"name":"./src/blocks/AudioBlockContent/parseAudioElement.ts","size":108,"chunks":["a1ee98a"]},{"name":"./src/blocks/AudioBlockContent/AudioBlockContent.ts","size":3219,"chunks":["a1ee98a"]},{"name":"./src/blocks/CodeBlockContent/CodeBlockContent.ts","size":9248,"chunks":["a1ee98a"]},{"name":"./src/extensions/BackgroundColor/BackgroundColorMark.ts","size":946,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextColor/TextColorMark.ts","size":866,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/parse/parseEmbedElement.ts","size":108,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/FileBlockContent.ts","size":1524,"chunks":["a1ee98a"]},{"name":"./src/blocks/HeadingBlockContent/HeadingBlockContent.ts","size":3376,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createResizableFileBlockWrapper.ts","size":4836,"chunks":["a1ee98a"]},{"name":"./src/blocks/ImageBlockContent/parseImageElement.ts","size":175,"chunks":["a1ee98a"]},{"name":"./src/blocks/ImageBlockContent/ImageBlockContent.ts","size":3374,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/getListItemContent.ts","size":1425,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/splitBlock/splitBlock.ts","size":868,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/ListItemKeyboardShortcuts.ts","size":1443,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.ts","size":3121,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/CheckListItemBlockContent/CheckListItemBlockContent.ts","size":7286,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListIndexingPlugin.ts","size":2207,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.ts","size":4057,"chunks":["a1ee98a"]},{"name":"./src/blocks/ParagraphBlockContent/ParagraphBlockContent.ts","size":1520,"chunks":["a1ee98a"]},{"name":"./src/blocks/QuoteBlockContent/QuoteBlockContent.ts","size":1953,"chunks":["a1ee98a"]},{"name":"./src/blocks/TableBlockContent/TableExtension.ts","size":2297,"chunks":["a1ee98a"]},{"name":"./src/blocks/TableBlockContent/TableBlockContent.ts","size":6183,"chunks":["a1ee98a"]},{"name":"./src/blocks/VideoBlockContent/parseVideoElement.ts","size":175,"chunks":["a1ee98a"]},{"name":"./src/blocks/VideoBlockContent/VideoBlockContent.ts","size":3293,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlocks.ts","size":1163,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlockTypeGuards.ts","size":1688,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/uploadToTmpFilesDotOrg_DEV_ONLY.ts","size":316,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts","size":7012,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteSchema.ts","size":1044,"chunks":["a1ee98a"]},{"name":"./src/blocks/PageBreakBlockContent/PageBreakBlockContent.ts","size":854,"chunks":["a1ee98a"]},{"name":"./src/blocks/PageBreakBlockContent/schema.ts","size":350,"chunks":["a1ee98a"]},{"name":"./src/blocks/PageBreakBlockContent/getPageBreakSlashMenuItems.ts","size":536,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/moveBlocks/moveBlocks.ts","size":5642,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/nestBlock/nestBlock.ts","size":2284,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/getBlock/getBlock.ts","size":1895,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/insertContentAt.ts","size":1049,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/selections/selection.ts","size":5093,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/selections/textCursorPosition.ts","size":2430,"chunks":["a1ee98a"]},{"name":"./src/util/esmDependencies.ts","size":820,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/removeUnderlinesRehypePlugin.ts","size":752,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/util/addSpacesToCheckboxesRehypePlugin.ts","size":969,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/markdownExporter.ts","size":837,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/html/util/nestedLists.ts","size":2174,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/html/parseHTML.ts","size":429,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/markdown/parseMarkdown.ts","size":1129,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/acceptedMIMETypes.ts","size":134,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/handleFileInsertion.ts","size":3928,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/fileDropExtension.ts","size":884,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/markdown/detectMarkdown.ts","size":1112,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/handleVSCodePaste.ts","size":661,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/pasteExtension.ts","size":2412,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/fragmentToBlocks.ts","size":629,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/toClipboard/copyExtension.ts","size":5159,"chunks":["a1ee98a"]},{"name":"./src/extensions/BackgroundColor/BackgroundColorExtension.ts","size":819,"chunks":["a1ee98a"]},{"name":"./src/util/EventEmitter.ts","size":744,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteExtension.ts","size":345,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/CursorPlugin.ts","size":3785,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/SyncPlugin.ts","size":244,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/UndoPlugin.ts","size":227,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/CommentMark.ts","size":1428,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/userstore/UserStore.ts","size":1354,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/CommentsPlugin.ts","size":7815,"chunks":["a1ee98a"]},{"name":"./src/extensions/FilePanel/FilePanelPlugin.ts","size":4135,"chunks":["a1ee98a"]},{"name":"./src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts","size":6083,"chunks":["a1ee98a"]},{"name":"./src/extensions/HardBreak/HardBreak.ts","size":376,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/mergeBlocks/mergeBlocks.ts","size":3228,"chunks":["a1ee98a"]},{"name":"./src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts","size":18080,"chunks":["a1ee98a"]},{"name":"./src/extensions/LinkToolbar/LinkToolbarPlugin.ts","size":7699,"chunks":["a1ee98a"]},{"name":"./src/extensions/LinkToolbar/protocols.ts","size":172,"chunks":["a1ee98a"]},{"name":"./src/extensions/NodeSelectionKeyboard/NodeSelectionKeyboardPlugin.ts","size":1367,"chunks":["a1ee98a"]},{"name":"./src/extensions/Placeholder/PlaceholderPlugin.ts","size":3895,"chunks":["a1ee98a"]},{"name":"./src/extensions/PreviousBlockType/PreviousBlockTypePlugin.ts","size":5232,"chunks":["a1ee98a"]},{"name":"./src/extensions/ShowSelection/ShowSelectionPlugin.ts","size":1043,"chunks":["a1ee98a"]},{"name":"./src/extensions/getDraggableBlockFromElement.ts","size":404,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/MultipleNodeSelection.ts","size":1700,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/dragging.ts","size":4718,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/SideMenuPlugin.ts","size":14178,"chunks":["a1ee98a"]},{"name":"./src/api/positionMapping.ts","size":1652,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/SuggestionPlugin.ts","size":9079,"chunks":["a1ee98a"]},{"name":"./src/extensions/Suggestions/SuggestionMarks.ts","size":4452,"chunks":["a1ee98a"]},{"name":"./src/extensions/TableHandles/TableHandlesPlugin.ts","size":27335,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextAlignment/TextAlignmentExtension.ts","size":976,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextColor/TextColorExtension.ts","size":753,"chunks":["a1ee98a"]},{"name":"./src/extensions/TrailingNode/TrailingNodeExtension.ts","size":1563,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/BlockContainer.ts","size":2170,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/BlockGroup.ts","size":1146,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/Doc.ts","size":134,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/ForkYDocPlugin.ts","size":3911,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteExtensions.ts","size":5400,"chunks":["a1ee98a"]},{"name":"./src/editor/transformPasted.ts","size":2604,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteTipTapEditor.ts","size":5702,"chunks":["a1ee98a"]},{"name":"./src/style.css","size":0,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteEditor.ts","size":37455,"chunks":["a1ee98a"]},{"name":"./src/editor/defaultColors.ts","size":1193,"chunks":["a1ee98a"]},{"name":"./src/exporter/Exporter.ts","size":1075,"chunks":["a1ee98a"]},{"name":"./src/exporter/mapping.ts","size":197,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/getDefaultEmojiPickerItems.ts","size":1204,"chunks":["a1ee98a"]},{"name":"./src/util/combineByGroup.ts","size":550,"chunks":["a1ee98a"]},{"name":"./src/index.ts","size":0,"chunks":["a1ee98a"]},{"name":"./src/comments/threadstore/ThreadStoreAuth.ts","size":25,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/DefaultThreadStoreAuth.ts","size":2014,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/ThreadStore.ts","size":77,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/TipTapThreadStore.ts","size":5321,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/yjsHelpers.ts","size":3002,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/YjsThreadStoreBase.ts","size":790,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/RESTYjsThreadStore.ts","size":2069,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/YjsThreadStore.ts","size":7267,"chunks":["1627b02"]},{"name":"./src/comments/index.ts","size":0,"chunks":["1627b02"]},{"name":"./src/i18n/locales/ar.ts","size":7874,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/de.ts","size":8600,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/es.ts","size":8457,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/fr.ts","size":9228,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/hr.ts","size":8490,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/is.ts","size":8222,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/it.ts","size":8553,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ja.ts","size":7485,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ko.ts","size":7261,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/nl.ts","size":8458,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/no.ts","size":8333,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/pl.ts","size":8145,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/pt.ts","size":8391,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ru.ts","size":9077,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/sk.ts","size":8288,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/uk.ts","size":9004,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/vi.ts","size":8253,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/zh.ts","size":7179,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/zh-tw.ts","size":7204,"chunks":["9eaffe2"]},{"name":"./src/i18n/index.ts","size":0,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/en.ts","size":7979,"chunks":["a1e239a"]}]}
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"directory": "packages/core"
|
|
12
12
|
},
|
|
13
13
|
"license": "MPL-2.0",
|
|
14
|
-
"version": "0.31.
|
|
14
|
+
"version": "0.31.1",
|
|
15
15
|
"files": [
|
|
16
16
|
"dist",
|
|
17
17
|
"types",
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
},
|
|
128
128
|
"eslintConfig": {
|
|
129
129
|
"extends": [
|
|
130
|
-
"../../.eslintrc.
|
|
130
|
+
"../../.eslintrc.json"
|
|
131
131
|
]
|
|
132
132
|
},
|
|
133
133
|
"gitHead": "37614ab348dcc7faa830a9a88437b37197a2162d",
|
|
@@ -380,7 +380,14 @@ export type BlockNoteEditorOptions<
|
|
|
380
380
|
*
|
|
381
381
|
* @deprecated, should use `extensions` instead
|
|
382
382
|
*/
|
|
383
|
-
_extensions: Record<
|
|
383
|
+
_extensions: Record<
|
|
384
|
+
string,
|
|
385
|
+
| { plugin: Plugin; priority?: number }
|
|
386
|
+
| ((editor: BlockNoteEditor<any, any, any>) => {
|
|
387
|
+
plugin: Plugin;
|
|
388
|
+
priority?: number;
|
|
389
|
+
})
|
|
390
|
+
>;
|
|
384
391
|
|
|
385
392
|
/**
|
|
386
393
|
* Register
|
|
@@ -630,17 +637,44 @@ export class BlockNoteEditor<
|
|
|
630
637
|
// factory
|
|
631
638
|
ext = ext(this);
|
|
632
639
|
}
|
|
633
|
-
const key = (ext.constructor as any).
|
|
640
|
+
const key = (ext.constructor as any).key();
|
|
641
|
+
if (!key) {
|
|
642
|
+
throw new Error(
|
|
643
|
+
`Extension ${ext.constructor.name} does not have a key method`,
|
|
644
|
+
);
|
|
645
|
+
}
|
|
646
|
+
if (this.extensions[key]) {
|
|
647
|
+
throw new Error(
|
|
648
|
+
`Extension ${ext.constructor.name} already exists with key ${key}`,
|
|
649
|
+
);
|
|
650
|
+
}
|
|
634
651
|
this.extensions[key] = ext;
|
|
635
652
|
}
|
|
636
653
|
|
|
637
654
|
// (when passed in via the deprecated `_extensions` option)
|
|
638
655
|
Object.entries(newOptions._extensions || {}).forEach(([key, ext]) => {
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
656
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
657
|
+
const editor = this;
|
|
658
|
+
|
|
659
|
+
const instance = typeof ext === "function" ? ext(editor) : ext;
|
|
660
|
+
if (!("plugin" in instance)) {
|
|
661
|
+
// Assume it is an Extension/Mark/Node
|
|
662
|
+
this.extensions[key] = instance;
|
|
663
|
+
return;
|
|
642
664
|
}
|
|
643
|
-
|
|
665
|
+
|
|
666
|
+
this.extensions[key] = new (class extends BlockNoteExtension {
|
|
667
|
+
public static key() {
|
|
668
|
+
return key;
|
|
669
|
+
}
|
|
670
|
+
constructor() {
|
|
671
|
+
super();
|
|
672
|
+
this.addProsemirrorPlugin(instance.plugin);
|
|
673
|
+
}
|
|
674
|
+
public get priority() {
|
|
675
|
+
return instance.priority;
|
|
676
|
+
}
|
|
677
|
+
})();
|
|
644
678
|
});
|
|
645
679
|
|
|
646
680
|
this.formattingToolbar = this.extensions["formattingToolbar"] as any;
|
|
@@ -901,7 +935,7 @@ export class BlockNoteEditor<
|
|
|
901
935
|
*/
|
|
902
936
|
public extension<T extends BlockNoteExtension>(
|
|
903
937
|
ext: { new (...args: any[]): T } & typeof BlockNoteExtension,
|
|
904
|
-
key = ext.
|
|
938
|
+
key = ext.key(),
|
|
905
939
|
): T {
|
|
906
940
|
const extension = this.extensions[key] as T;
|
|
907
941
|
if (!extension) {
|
|
@@ -4,8 +4,8 @@ import { EventEmitter } from "../util/EventEmitter.js";
|
|
|
4
4
|
export abstract class BlockNoteExtension<
|
|
5
5
|
TEvent extends Record<string, any> = any,
|
|
6
6
|
> extends EventEmitter<TEvent> {
|
|
7
|
-
public static
|
|
8
|
-
throw new Error("You must implement the
|
|
7
|
+
public static key(): string {
|
|
8
|
+
throw new Error("You must implement the key method in your extension");
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
protected addProsemirrorPlugin(plugin: Plugin) {
|
|
@@ -139,6 +139,10 @@ export class FilePanelProsemirrorPlugin<
|
|
|
139
139
|
I extends InlineContentSchema,
|
|
140
140
|
S extends StyleSchema,
|
|
141
141
|
> extends BlockNoteExtension {
|
|
142
|
+
public static key() {
|
|
143
|
+
return "filePanel";
|
|
144
|
+
}
|
|
145
|
+
|
|
142
146
|
private view: FilePanelView<I, S> | undefined;
|
|
143
147
|
|
|
144
148
|
constructor(editor: BlockNoteEditor<Record<string, FileBlockConfig>, I, S>) {
|
|
@@ -266,6 +266,10 @@ export const formattingToolbarPluginKey = new PluginKey(
|
|
|
266
266
|
);
|
|
267
267
|
|
|
268
268
|
export class FormattingToolbarProsemirrorPlugin extends BlockNoteExtension {
|
|
269
|
+
public static key() {
|
|
270
|
+
return "formattingToolbar";
|
|
271
|
+
}
|
|
272
|
+
|
|
269
273
|
private view: FormattingToolbarView | undefined;
|
|
270
274
|
|
|
271
275
|
constructor(editor: BlockNoteEditor<any, any, any>) {
|
|
@@ -302,6 +302,10 @@ export class LinkToolbarProsemirrorPlugin<
|
|
|
302
302
|
I extends InlineContentSchema,
|
|
303
303
|
S extends StyleSchema,
|
|
304
304
|
> extends BlockNoteExtension {
|
|
305
|
+
public static key() {
|
|
306
|
+
return "linkToolbar";
|
|
307
|
+
}
|
|
308
|
+
|
|
305
309
|
private view: LinkToolbarView | undefined;
|
|
306
310
|
|
|
307
311
|
constructor(editor: BlockNoteEditor<BSchema, I, S>) {
|
|
@@ -17,6 +17,10 @@ const PLUGIN_KEY = new PluginKey("node-selection-keyboard");
|
|
|
17
17
|
// keystrokes, this brings us most of the way to Notion's UX without much added
|
|
18
18
|
// complexity.
|
|
19
19
|
export class NodeSelectionKeyboardPlugin extends BlockNoteExtension {
|
|
20
|
+
public static key() {
|
|
21
|
+
return "nodeSelectionKeyboard";
|
|
22
|
+
}
|
|
23
|
+
|
|
20
24
|
constructor() {
|
|
21
25
|
super();
|
|
22
26
|
this.addProsemirrorPlugin(
|
|
@@ -7,6 +7,10 @@ import { BlockNoteExtension } from "../../editor/BlockNoteExtension.js";
|
|
|
7
7
|
const PLUGIN_KEY = new PluginKey(`blocknote-placeholder`);
|
|
8
8
|
|
|
9
9
|
export class PlaceholderPlugin extends BlockNoteExtension {
|
|
10
|
+
public static key() {
|
|
11
|
+
return "placeholder";
|
|
12
|
+
}
|
|
13
|
+
|
|
10
14
|
constructor(
|
|
11
15
|
editor: BlockNoteEditor<any, any, any>,
|
|
12
16
|
placeholders: Record<
|
|
@@ -25,6 +25,10 @@ const nodeAttributes: Record<string, string> = {
|
|
|
25
25
|
* Solution: When attributes change on a node, this plugin sets a data-* attribute with the "previous" value. This way we can still use CSS transitions. (See block.module.css)
|
|
26
26
|
*/
|
|
27
27
|
export class PreviousBlockTypePlugin extends BlockNoteExtension {
|
|
28
|
+
public static key() {
|
|
29
|
+
return "previousBlockType";
|
|
30
|
+
}
|
|
31
|
+
|
|
28
32
|
constructor() {
|
|
29
33
|
super();
|
|
30
34
|
let timeout: ReturnType<typeof setTimeout>;
|
|
@@ -11,6 +11,10 @@ const PLUGIN_KEY = new PluginKey(`blocknote-show-selection`);
|
|
|
11
11
|
* text editor is not focused.
|
|
12
12
|
*/
|
|
13
13
|
export class ShowSelectionPlugin extends BlockNoteExtension {
|
|
14
|
+
public static key() {
|
|
15
|
+
return "showSelection";
|
|
16
|
+
}
|
|
17
|
+
|
|
14
18
|
private enabled = false;
|
|
15
19
|
|
|
16
20
|
public constructor(private readonly editor: BlockNoteEditor<any, any, any>) {
|
|
@@ -609,6 +609,10 @@ export class SideMenuProsemirrorPlugin<
|
|
|
609
609
|
I extends InlineContentSchema,
|
|
610
610
|
S extends StyleSchema,
|
|
611
611
|
> extends BlockNoteExtension {
|
|
612
|
+
public static key() {
|
|
613
|
+
return "sideMenu";
|
|
614
|
+
}
|
|
615
|
+
|
|
612
616
|
public view: SideMenuView<BSchema, I, S> | undefined;
|
|
613
617
|
|
|
614
618
|
constructor(
|
|
@@ -167,6 +167,10 @@ export class SuggestionMenuProseMirrorPlugin<
|
|
|
167
167
|
I extends InlineContentSchema,
|
|
168
168
|
S extends StyleSchema,
|
|
169
169
|
> extends BlockNoteExtension {
|
|
170
|
+
public static key() {
|
|
171
|
+
return "suggestionMenu";
|
|
172
|
+
}
|
|
173
|
+
|
|
170
174
|
private view: SuggestionMenuView<BSchema, I, S> | undefined;
|
|
171
175
|
private triggerCharacters: string[] = [];
|
|
172
176
|
|
|
@@ -618,6 +618,10 @@ export class TableHandlesProsemirrorPlugin<
|
|
|
618
618
|
I extends InlineContentSchema,
|
|
619
619
|
S extends StyleSchema,
|
|
620
620
|
> extends BlockNoteExtension {
|
|
621
|
+
public static key() {
|
|
622
|
+
return "tableHandles";
|
|
623
|
+
}
|
|
624
|
+
|
|
621
625
|
private view: TableHandlesView<I, S> | undefined;
|
|
622
626
|
|
|
623
627
|
constructor(
|
|
@@ -235,7 +235,13 @@ export type BlockNoteEditorOptions<BSchema extends BlockSchema, ISchema extends
|
|
|
235
235
|
*
|
|
236
236
|
* @deprecated, should use `extensions` instead
|
|
237
237
|
*/
|
|
238
|
-
_extensions: Record<string,
|
|
238
|
+
_extensions: Record<string, {
|
|
239
|
+
plugin: Plugin;
|
|
240
|
+
priority?: number;
|
|
241
|
+
} | ((editor: BlockNoteEditor<any, any, any>) => {
|
|
242
|
+
plugin: Plugin;
|
|
243
|
+
priority?: number;
|
|
244
|
+
})>;
|
|
239
245
|
/**
|
|
240
246
|
* Register
|
|
241
247
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Plugin } from "prosemirror-state";
|
|
2
2
|
import { EventEmitter } from "../util/EventEmitter.js";
|
|
3
3
|
export declare abstract class BlockNoteExtension<TEvent extends Record<string, any> = any> extends EventEmitter<TEvent> {
|
|
4
|
-
static
|
|
4
|
+
static key(): string;
|
|
5
5
|
protected addProsemirrorPlugin(plugin: Plugin): void;
|
|
6
6
|
readonly plugins: Plugin[];
|
|
7
7
|
get priority(): number | undefined;
|
|
@@ -8,7 +8,7 @@ export type CollaborationUser = {
|
|
|
8
8
|
};
|
|
9
9
|
export declare class CursorPlugin extends BlockNoteExtension {
|
|
10
10
|
private collaboration;
|
|
11
|
-
static
|
|
11
|
+
static key(): string;
|
|
12
12
|
private provider;
|
|
13
13
|
private recentlyUpdatedCursors;
|
|
14
14
|
constructor(collaboration: {
|
|
@@ -3,7 +3,7 @@ import { BlockNoteExtension } from "../../editor/BlockNoteExtension.js";
|
|
|
3
3
|
export declare class ForkYDocPlugin extends BlockNoteExtension<{
|
|
4
4
|
forked: boolean;
|
|
5
5
|
}> {
|
|
6
|
-
static
|
|
6
|
+
static key(): string;
|
|
7
7
|
private editor;
|
|
8
8
|
private collaboration;
|
|
9
9
|
constructor({ editor, collaboration, }: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as Y from "yjs";
|
|
2
2
|
import { BlockNoteExtension } from "../../editor/BlockNoteExtension.js";
|
|
3
3
|
export declare class SyncPlugin extends BlockNoteExtension {
|
|
4
|
-
static
|
|
4
|
+
static key(): string;
|
|
5
5
|
constructor(fragment: Y.XmlFragment);
|
|
6
6
|
get priority(): number;
|
|
7
7
|
}
|
|
@@ -6,6 +6,7 @@ export declare class CommentsPlugin extends BlockNoteExtension {
|
|
|
6
6
|
private readonly editor;
|
|
7
7
|
readonly threadStore: ThreadStore;
|
|
8
8
|
private readonly markType;
|
|
9
|
+
static key(): string;
|
|
9
10
|
readonly userStore: UserStore<User>;
|
|
10
11
|
/**
|
|
11
12
|
* Whether a comment is currently being composed
|
|
@@ -22,6 +22,7 @@ export declare class FilePanelView<I extends InlineContentSchema, S extends Styl
|
|
|
22
22
|
destroy(): void;
|
|
23
23
|
}
|
|
24
24
|
export declare class FilePanelProsemirrorPlugin<I extends InlineContentSchema, S extends StyleSchema> extends BlockNoteExtension {
|
|
25
|
+
static key(): string;
|
|
25
26
|
private view;
|
|
26
27
|
constructor(editor: BlockNoteEditor<Record<string, FileBlockConfig>, I, S>);
|
|
27
28
|
get shown(): boolean;
|
|
@@ -32,6 +32,7 @@ export declare class FormattingToolbarView implements PluginView {
|
|
|
32
32
|
}
|
|
33
33
|
export declare const formattingToolbarPluginKey: PluginKey<any>;
|
|
34
34
|
export declare class FormattingToolbarProsemirrorPlugin extends BlockNoteExtension {
|
|
35
|
+
static key(): string;
|
|
35
36
|
private view;
|
|
36
37
|
constructor(editor: BlockNoteEditor<any, any, any>);
|
|
37
38
|
get shown(): boolean;
|
|
@@ -9,6 +9,7 @@ export type LinkToolbarState = UiElementPosition & {
|
|
|
9
9
|
};
|
|
10
10
|
export declare const linkToolbarPluginKey: PluginKey<any>;
|
|
11
11
|
export declare class LinkToolbarProsemirrorPlugin<BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema> extends BlockNoteExtension {
|
|
12
|
+
static key(): string;
|
|
12
13
|
private view;
|
|
13
14
|
constructor(editor: BlockNoteEditor<BSchema, I, S>);
|
|
14
15
|
onUpdate(callback: (state: LinkToolbarState) => void): () => void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { BlockNoteEditor } from "../../editor/BlockNoteEditor.js";
|
|
2
2
|
import { BlockNoteExtension } from "../../editor/BlockNoteExtension.js";
|
|
3
3
|
export declare class PlaceholderPlugin extends BlockNoteExtension {
|
|
4
|
+
static key(): string;
|
|
4
5
|
constructor(editor: BlockNoteEditor<any, any, any>, placeholders: Record<string | "default" | "emptyDocument", string | undefined>);
|
|
5
6
|
}
|
|
@@ -8,5 +8,6 @@ import { BlockNoteExtension } from "../../editor/BlockNoteExtension.js";
|
|
|
8
8
|
* Solution: When attributes change on a node, this plugin sets a data-* attribute with the "previous" value. This way we can still use CSS transitions. (See block.module.css)
|
|
9
9
|
*/
|
|
10
10
|
export declare class PreviousBlockTypePlugin extends BlockNoteExtension {
|
|
11
|
+
static key(): string;
|
|
11
12
|
constructor();
|
|
12
13
|
}
|
|
@@ -7,6 +7,7 @@ import { BlockNoteExtension } from "../../editor/BlockNoteExtension.js";
|
|
|
7
7
|
*/
|
|
8
8
|
export declare class ShowSelectionPlugin extends BlockNoteExtension {
|
|
9
9
|
private readonly editor;
|
|
10
|
+
static key(): string;
|
|
10
11
|
private enabled;
|
|
11
12
|
constructor(editor: BlockNoteEditor<any, any, any>);
|
|
12
13
|
setEnabled(enabled: boolean): void;
|
|
@@ -61,6 +61,7 @@ export declare class SideMenuView<BSchema extends BlockSchema, I extends InlineC
|
|
|
61
61
|
export declare const sideMenuPluginKey: PluginKey<any>;
|
|
62
62
|
export declare class SideMenuProsemirrorPlugin<BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema> extends BlockNoteExtension {
|
|
63
63
|
private readonly editor;
|
|
64
|
+
static key(): string;
|
|
64
65
|
view: SideMenuView<BSchema, I, S> | undefined;
|
|
65
66
|
constructor(editor: BlockNoteEditor<BSchema, I, S>, sideMenuDetection: "viewport" | "editor");
|
|
66
67
|
onUpdate(callback: (state: SideMenuState<BSchema, I, S>) => void): () => void;
|
|
@@ -17,6 +17,7 @@ export type SuggestionMenuState = UiElementPosition & {
|
|
|
17
17
|
* - This version handles key events differently
|
|
18
18
|
*/
|
|
19
19
|
export declare class SuggestionMenuProseMirrorPlugin<BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema> extends BlockNoteExtension {
|
|
20
|
+
static key(): string;
|
|
20
21
|
private view;
|
|
21
22
|
private triggerCharacters;
|
|
22
23
|
constructor(editor: BlockNoteEditor<BSchema, I, S>);
|
|
@@ -44,6 +44,7 @@ export declare class TableHandlesView<I extends InlineContentSchema, S extends S
|
|
|
44
44
|
export declare const tableHandlesPluginKey: PluginKey<any>;
|
|
45
45
|
export declare class TableHandlesProsemirrorPlugin<I extends InlineContentSchema, S extends StyleSchema> extends BlockNoteExtension {
|
|
46
46
|
private readonly editor;
|
|
47
|
+
static key(): string;
|
|
47
48
|
private view;
|
|
48
49
|
constructor(editor: BlockNoteEditor<BlockSchemaWithBlock<"table", DefaultBlockSchema["table"]>, I, S>);
|
|
49
50
|
onUpdate(callback: (state: TableHandlesState<I, S>) => void): () => void;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { Block } from "../../../../blocks/defaultBlocks.js";
|
|
2
|
-
import type { BlockNoteEditor } from "../../../../editor/BlockNoteEditor";
|
|
3
|
-
import { BlockIdentifier, BlockSchema, InlineContentSchema, StyleSchema } from "../../../../schema/index.js";
|
|
4
|
-
export declare function removeBlocks<BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema>(editor: BlockNoteEditor<BSchema, I, S>, blocksToRemove: BlockIdentifier[]): Block<BSchema, I, S>[];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/types/src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { type Transaction } from "prosemirror-state";
|
|
2
|
-
import type { TextCursorPosition } from "../../../../editor/cursorPositionTypes.js";
|
|
3
|
-
import type { BlockIdentifier, BlockSchema, InlineContentSchema, StyleSchema } from "../../../../schema/index.js";
|
|
4
|
-
export declare function getTextCursorPosition<BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema>(tr: Transaction): TextCursorPosition<BSchema, I, S>;
|
|
5
|
-
export declare function setTextCursorPosition(tr: Transaction, targetBlock: BlockIdentifier, placement?: "start" | "end"): void;
|
package/types/src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.test.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|