@blocknote/core 0.30.0 → 0.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/blocknote.cjs +9 -9
- package/dist/blocknote.cjs.map +1 -1
- package/dist/blocknote.js +2771 -2245
- package/dist/blocknote.js.map +1 -1
- package/dist/comments.cjs.map +1 -1
- package/dist/comments.js.map +1 -1
- package/dist/{en-D4taoCs4.cjs → en-BXVKCwYt.cjs} +2 -2
- package/dist/en-BXVKCwYt.cjs.map +1 -0
- package/dist/{en-B7ycW7c8.js → en-qGo6sk9V.js} +2 -3
- package/dist/en-qGo6sk9V.js.map +1 -0
- package/dist/locales.cjs +1 -1
- package/dist/locales.cjs.map +1 -1
- package/dist/locales.js +20 -39
- package/dist/locales.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +8 -7
- package/src/api/README.md +1 -1
- package/src/api/blockManipulation/commands/insertBlocks/insertBlocks.test.ts +19 -14
- package/src/api/blockManipulation/commands/insertBlocks/insertBlocks.ts +7 -8
- package/src/api/blockManipulation/commands/mergeBlocks/mergeBlocks.test.ts +3 -3
- package/src/api/blockManipulation/commands/mergeBlocks/mergeBlocks.ts +12 -12
- package/src/api/blockManipulation/commands/moveBlocks/moveBlocks.test.ts +14 -14
- package/src/api/blockManipulation/commands/moveBlocks/moveBlocks.ts +16 -16
- package/src/api/blockManipulation/commands/nestBlock/nestBlock.ts +8 -8
- package/src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.test.ts +12 -12
- package/src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.ts +8 -8
- package/src/api/blockManipulation/commands/splitBlock/splitBlock.test.ts +10 -10
- package/src/api/blockManipulation/commands/splitBlock/splitBlock.ts +2 -2
- package/src/api/blockManipulation/commands/updateBlock/__snapshots__/updateBlock.test.ts.snap +2816 -0
- package/src/api/blockManipulation/commands/updateBlock/updateBlock.test.ts +200 -42
- package/src/api/blockManipulation/commands/updateBlock/updateBlock.ts +104 -34
- package/src/api/blockManipulation/getBlock/getBlock.ts +9 -9
- package/src/api/blockManipulation/insertContentAt.ts +1 -1
- package/src/api/blockManipulation/selections/selection.ts +59 -12
- package/src/api/blockManipulation/selections/{textCursorPosition/textCursorPosition.ts → textCursorPosition.ts} +13 -13
- package/src/api/blockManipulation/tables/tables.test.ts +106 -106
- package/src/api/blockManipulation/tables/tables.ts +35 -35
- package/src/api/clipboard/fromClipboard/fileDropExtension.ts +2 -2
- package/src/api/clipboard/fromClipboard/handleFileInsertion.ts +9 -9
- package/src/api/clipboard/fromClipboard/handleVSCodePaste.ts +3 -3
- package/src/api/clipboard/fromClipboard/pasteExtension.ts +3 -3
- package/src/api/clipboard/toClipboard/copyExtension.ts +22 -22
- package/src/api/exporters/html/externalHTMLExporter.ts +6 -6
- package/src/api/exporters/html/internalHTMLSerializer.ts +3 -3
- package/src/api/exporters/html/util/serializeBlocksExternalHTML.ts +16 -16
- package/src/api/exporters/html/util/serializeBlocksInternalHTML.ts +14 -14
- package/src/api/exporters/markdown/markdownExporter.ts +3 -3
- package/src/api/exporters/markdown/util/addSpacesToCheckboxesRehypePlugin.ts +3 -3
- package/src/api/getBlockInfoFromPos.ts +6 -6
- package/src/api/nodeConversions/blockToNode.ts +31 -28
- package/src/api/nodeConversions/fragmentToBlocks.ts +1 -1
- package/src/api/nodeConversions/nodeToBlock.ts +240 -41
- package/src/api/nodeUtil.test.ts +16 -16
- package/src/api/nodeUtil.ts +10 -10
- package/src/api/parsers/html/parseHTML.ts +1 -1
- package/src/api/parsers/html/util/nestedLists.ts +2 -2
- package/src/api/parsers/markdown/parseMarkdown.ts +1 -1
- package/src/api/pmUtil.ts +7 -7
- package/src/api/positionMapping.test.ts +3 -3
- package/src/api/positionMapping.ts +5 -5
- package/src/blocks/AudioBlockContent/AudioBlockContent.ts +4 -4
- package/src/blocks/CodeBlockContent/CodeBlockContent.ts +18 -18
- package/src/blocks/FileBlockContent/FileBlockContent.ts +2 -2
- package/src/blocks/FileBlockContent/helpers/parse/parseFigureElement.ts +2 -2
- package/src/blocks/FileBlockContent/helpers/render/createAddFileButton.ts +6 -6
- package/src/blocks/FileBlockContent/helpers/render/createFileBlockWrapper.ts +2 -2
- package/src/blocks/FileBlockContent/helpers/render/createFileNameWithIcon.ts +1 -1
- package/src/blocks/FileBlockContent/helpers/render/createResizableFileBlockWrapper.ts +7 -7
- package/src/blocks/FileBlockContent/helpers/toExternalHTML/createFigureWithCaption.ts +1 -1
- package/src/blocks/FileBlockContent/helpers/toExternalHTML/createLinkWithCaption.ts +1 -1
- package/src/blocks/FileBlockContent/uploadToTmpFilesDotOrg_DEV_ONLY.ts +2 -2
- package/src/blocks/HeadingBlockContent/HeadingBlockContent.ts +6 -6
- package/src/blocks/ImageBlockContent/ImageBlockContent.ts +4 -4
- package/src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.ts +4 -4
- package/src/blocks/ListItemBlockContent/CheckListItemBlockContent/CheckListItemBlockContent.ts +10 -10
- package/src/blocks/ListItemBlockContent/ListItemKeyboardShortcuts.ts +1 -1
- package/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListIndexingPlugin.ts +1 -1
- package/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.ts +4 -4
- package/src/blocks/ListItemBlockContent/getListItemContent.ts +5 -5
- package/src/blocks/PageBreakBlockContent/PageBreakBlockContent.ts +1 -1
- package/src/blocks/PageBreakBlockContent/getPageBreakSlashMenuItems.ts +3 -3
- package/src/blocks/PageBreakBlockContent/schema.ts +2 -2
- package/src/blocks/ParagraphBlockContent/ParagraphBlockContent.ts +3 -3
- package/src/blocks/QuoteBlockContent/QuoteBlockContent.ts +4 -4
- package/src/blocks/README.md +1 -1
- package/src/blocks/TableBlockContent/TableBlockContent.ts +37 -7
- package/src/blocks/TableBlockContent/TableExtension.ts +3 -3
- package/src/blocks/VideoBlockContent/VideoBlockContent.ts +4 -4
- package/src/blocks/defaultBlockHelpers.ts +8 -8
- package/src/blocks/defaultBlockTypeGuards.ts +16 -16
- package/src/blocks/defaultBlocks.ts +3 -3
- package/src/comments/threadstore/DefaultThreadStoreAuth.ts +3 -3
- package/src/comments/threadstore/ThreadStore.ts +1 -1
- package/src/comments/threadstore/TipTapThreadStore.ts +10 -10
- package/src/comments/threadstore/yjs/RESTYjsThreadStore.ts +4 -4
- package/src/comments/threadstore/yjs/YjsThreadStore.test.ts +2 -2
- package/src/comments/threadstore/yjs/YjsThreadStore.ts +14 -14
- package/src/comments/threadstore/yjs/YjsThreadStoreBase.ts +1 -1
- package/src/comments/threadstore/yjs/yjsHelpers.ts +6 -6
- package/src/editor/Block.css +35 -1
- package/src/editor/BlockNoteEditor.test.ts +10 -3
- package/src/editor/BlockNoteEditor.ts +95 -38
- package/src/editor/BlockNoteExtension.ts +26 -0
- package/src/editor/BlockNoteExtensions.ts +38 -22
- package/src/editor/BlockNoteSchema.ts +4 -4
- package/src/editor/BlockNoteTipTapEditor.ts +33 -12
- package/src/editor/README.md +1 -1
- package/src/editor/cursorPositionTypes.ts +1 -1
- package/src/editor/editor.css +15 -3
- package/src/editor/selectionTypes.ts +1 -1
- package/src/editor/transformPasted.ts +2 -2
- package/src/exporter/Exporter.ts +5 -5
- package/src/exporter/mapping.ts +7 -7
- package/src/extensions/BackgroundColor/BackgroundColorMark.ts +1 -1
- package/src/extensions/Collaboration/CursorPlugin.ts +15 -9
- package/src/extensions/Collaboration/ForkYDocPlugin.test.ts +166 -0
- package/src/extensions/Collaboration/ForkYDocPlugin.ts +174 -0
- package/src/extensions/Collaboration/SyncPlugin.ts +7 -4
- package/src/extensions/Collaboration/UndoPlugin.ts +7 -4
- package/src/extensions/Collaboration/__snapshots__/fork-yjs-snap-editor-forked.json +30 -0
- package/src/extensions/Collaboration/__snapshots__/fork-yjs-snap-editor.json +30 -0
- package/src/extensions/Collaboration/__snapshots__/fork-yjs-snap-forked.html +1 -0
- package/src/extensions/Collaboration/__snapshots__/fork-yjs-snap.html +1 -0
- package/src/extensions/Comments/CommentsPlugin.ts +80 -75
- package/src/extensions/Comments/userstore/UserStore.ts +2 -2
- package/src/extensions/FilePanel/FilePanelPlugin.ts +56 -55
- package/src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts +60 -30
- package/src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts +26 -26
- package/src/extensions/LinkToolbar/LinkToolbarPlugin.ts +33 -32
- package/src/extensions/NodeSelectionKeyboard/NodeSelectionKeyboardPlugin.ts +45 -42
- package/src/extensions/Placeholder/PlaceholderPlugin.ts +113 -110
- package/src/extensions/PreviousBlockType/PreviousBlockTypePlugin.ts +179 -170
- package/src/extensions/README.md +1 -1
- package/src/extensions/ShowSelection/ShowSelectionPlugin.ts +22 -19
- package/src/extensions/SideMenu/MultipleNodeSelection.ts +1 -1
- package/src/extensions/SideMenu/SideMenuPlugin.ts +49 -48
- package/src/extensions/SideMenu/dragging.ts +8 -8
- package/src/extensions/SuggestionMenu/SuggestionPlugin.ts +176 -176
- package/src/extensions/SuggestionMenu/getDefaultEmojiPickerItems.ts +2 -2
- package/src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts +16 -16
- package/src/extensions/Suggestions/SuggestionMarks.ts +175 -0
- package/src/extensions/TableHandles/TableHandlesPlugin.ts +199 -195
- package/src/extensions/TrailingNode/TrailingNodeExtension.ts +1 -1
- package/src/extensions/UniqueID/UniqueID.ts +6 -6
- package/src/extensions/getDraggableBlockFromElement.ts +1 -1
- package/src/fonts/inter.css +18 -9
- package/src/i18n/locales/ar.ts +0 -1
- package/src/i18n/locales/de.ts +0 -1
- package/src/i18n/locales/en.ts +0 -1
- package/src/i18n/locales/es.ts +0 -1
- package/src/i18n/locales/fr.ts +0 -1
- package/src/i18n/locales/hr.ts +0 -1
- package/src/i18n/locales/is.ts +0 -1
- package/src/i18n/locales/it.ts +0 -1
- package/src/i18n/locales/ja.ts +0 -1
- package/src/i18n/locales/ko.ts +0 -1
- package/src/i18n/locales/nl.ts +0 -1
- package/src/i18n/locales/no.ts +0 -1
- package/src/i18n/locales/pl.ts +0 -1
- package/src/i18n/locales/pt.ts +0 -1
- package/src/i18n/locales/ru.ts +0 -1
- package/src/i18n/locales/sk.ts +0 -1
- package/src/i18n/locales/uk.ts +0 -1
- package/src/i18n/locales/vi.ts +0 -1
- package/src/i18n/locales/zh-tw.ts +0 -1
- package/src/i18n/locales/zh.ts +0 -1
- package/src/index.ts +18 -8
- package/src/locales.ts +1 -1
- package/src/pm-nodes/BlockContainer.ts +1 -1
- package/src/pm-nodes/BlockGroup.ts +2 -2
- package/src/pm-nodes/Doc.ts +5 -4
- package/src/schema/README.md +1 -1
- package/src/schema/blocks/createSpec.ts +14 -14
- package/src/schema/blocks/internal.ts +17 -17
- package/src/schema/blocks/types.ts +25 -25
- package/src/schema/inlineContent/createSpec.ts +16 -20
- package/src/schema/inlineContent/internal.ts +9 -9
- package/src/schema/inlineContent/types.ts +26 -26
- package/src/schema/propTypes.ts +8 -8
- package/src/schema/styles/createSpec.ts +2 -2
- package/src/schema/styles/internal.ts +7 -7
- package/src/schema/styles/types.ts +2 -2
- package/src/util/EventEmitter.ts +4 -4
- package/src/util/README.md +1 -1
- package/src/util/combineByGroup.ts +1 -1
- package/src/util/table.ts +33 -30
- package/types/src/api/blockManipulation/commands/insertBlocks/insertBlocks.d.ts +1 -1
- package/types/src/api/blockManipulation/commands/removeBlocks/removeBlocks.d.ts +4 -0
- package/types/src/api/blockManipulation/commands/removeBlocks/removeBlocks.test.d.ts +1 -0
- package/types/src/api/blockManipulation/commands/updateBlock/updateBlock.d.ts +3 -1
- package/types/src/api/blockManipulation/selections/selection.d.ts +10 -0
- package/types/src/api/blockManipulation/selections/textCursorPosition.d.ts +5 -0
- package/types/src/api/blockManipulation/transactions.test.d.ts +0 -0
- package/types/src/api/clipboard/clipboardExternal.test.d.ts +1 -0
- package/types/src/api/clipboard/clipboardInternal.test.d.ts +1 -0
- package/types/src/api/clipboard/testUtil.d.ts +541 -0
- package/types/src/api/exporters/html/htmlConversion.test.d.ts +1 -0
- package/types/src/api/exporters/markdown/markdownExporter.test.d.ts +1 -0
- package/types/src/api/nodeConversions/nodeConversions.test.d.ts +1 -0
- package/types/src/api/nodeConversions/nodeToBlock.d.ts +39 -2
- package/types/src/api/parsers/html/parseHTML.test.d.ts +1 -0
- package/types/src/api/parsers/markdown/parseMarkdown.test.d.ts +1 -0
- package/types/src/api/pmUtil.d.ts +3 -3
- package/types/src/api/testUtil/cases/customBlocks.d.ts +670 -0
- package/types/src/api/testUtil/cases/customInlineContent.d.ts +558 -0
- package/types/src/api/testUtil/cases/customStyles.d.ts +552 -0
- package/types/src/api/testUtil/cases/defaultSchema.d.ts +4 -0
- package/types/src/api/testUtil/index.d.ts +14 -0
- package/types/src/api/testUtil/partialBlockTestUtil.d.ts +9 -0
- package/types/src/api/testUtil/paste.d.ts +2 -0
- package/types/src/blocks/CodeBlockContent/defaultSupportedLanguages.d.ts +6 -0
- package/types/src/blocks/TableBlockContent/TableBlockContent.d.ts +9 -1
- package/types/src/editor/BlockNoteEditor.d.ts +58 -10
- package/types/src/editor/BlockNoteExtension.d.ts +9 -0
- package/types/src/editor/BlockNoteExtensions.d.ts +2 -2
- package/types/src/editor/BlockNoteTipTapEditor.d.ts +2 -2
- package/types/src/extensions/Collaboration/CursorPlugin.d.ts +3 -3
- package/types/src/extensions/Collaboration/ForkYDocPlugin.d.ts +41 -0
- package/types/src/extensions/Collaboration/ForkYDocPlugin.test.d.ts +1 -0
- package/types/src/extensions/Collaboration/SyncPlugin.d.ts +3 -3
- package/types/src/extensions/Collaboration/UndoPlugin.d.ts +3 -3
- package/types/src/extensions/Collaboration/createCollaborationExtensions.d.ts +17 -0
- package/types/src/extensions/Comments/CommentsPlugin.d.ts +2 -4
- package/types/src/extensions/FilePanel/FilePanelPlugin.d.ts +3 -4
- package/types/src/extensions/FormattingToolbar/FormattingToolbarPlugin.d.ts +5 -5
- package/types/src/extensions/LinkToolbar/LinkToolbarPlugin.d.ts +3 -4
- package/types/src/extensions/NodeSelectionKeyboard/NodeSelectionKeyboardPlugin.d.ts +2 -3
- package/types/src/extensions/Placeholder/PlaceholderPlugin.d.ts +2 -3
- package/types/src/extensions/PreviousBlockType/PreviousBlockTypePlugin.d.ts +2 -3
- package/types/src/extensions/ShowSelection/ShowSelectionPlugin.d.ts +2 -3
- package/types/src/extensions/SideMenu/SideMenuPlugin.d.ts +3 -4
- package/types/src/extensions/SuggestionMenu/SuggestionPlugin.d.ts +2 -4
- package/types/src/extensions/Suggestions/SuggestionMarks.d.ts +4 -0
- package/types/src/extensions/TableHandles/TableHandlesPlugin.d.ts +5 -6
- package/types/src/i18n/locales/en.d.ts +0 -1
- package/types/src/i18n/locales/sk.d.ts +0 -1
- package/types/src/index.d.ts +15 -8
- package/dist/en-B7ycW7c8.js.map +0 -1
- package/dist/en-D4taoCs4.cjs.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/src/api/blockManipulation/selections/__snapshots__/selection.test.ts.snap +0 -844
- package/src/api/blockManipulation/selections/selection.test.ts +0 -72
- package/src/api/blockManipulation/selections/textCursorPosition/__snapshots__/textCursorPosition.test.ts.snap +0 -316
- package/src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.test.ts +0 -74
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.bn-block-outer{line-height:1.5;transition:margin .2s}.bn-block{display:flex;flex-direction:column}.bn-block-content{padding:3px 0;transition:font-size .2s;width:100%}.bn-block-content:before{transition:all .2s}.bn-block-content.ProseMirror-selectednode>*,.ProseMirror-selectednode>.bn-block-content>*{border-radius:4px;outline:4px solid rgb(100,160,255)}.bn-inline-content{width:100%}.bn-block-group .bn-block-group{margin-left:1.5em}.bn-block-group .bn-block-group>.bn-block-outer{position:relative}.bn-block-group .bn-block-group>.bn-block-outer:not([data-prev-depth-changed]):before{content:" ";display:inline;position:absolute;left:-20px;height:100%;transition:all .2s .1s}.bn-block-group .bn-block-group>.bn-block-outer[data-prev-depth-change="-2"]:before{height:0}.bn-inline-content code{font-family:monospace}[data-prev-depth-change="1"]{--x: 1}[data-prev-depth-change="2"]{--x: 2}[data-prev-depth-change="3"]{--x: 3}[data-prev-depth-change="4"]{--x: 4}[data-prev-depth-change="5"]{--x: 5}[data-prev-depth-change="-1"]{--x: -1}[data-prev-depth-change="-2"]{--x: -2}[data-prev-depth-change="-3"]{--x: -3}[data-prev-depth-change="-4"]{--x: -4}[data-prev-depth-change="-5"]{--x: -5}.bn-block-outer[data-prev-depth-change]{margin-left:calc(10px * var(--x))}.bn-block-outer[data-prev-depth-change] .bn-block-outer[data-prev-depth-change]{margin-left:0}[data-content-type=heading]{--level: 3em}[data-content-type=heading][data-level="2"]{--level: 2em}[data-content-type=heading][data-level="3"]{--level: 1.3em}[data-prev-level="1"]{--prev-level: 3em}[data-prev-level="2"]{--prev-level: 2em}[data-prev-level="3"]{--prev-level: 1.3em}.bn-block-outer[data-prev-type=heading]>.bn-block>.bn-block-content{font-size:var(--prev-level);font-weight:700}.bn-block-outer:not([data-prev-type])>.bn-block>.bn-block-content[data-content-type=heading]{font-size:var(--level);font-weight:700}[data-content-type=quote] blockquote{border-left:2px solid rgb(125,121,122);color:#7d797a;margin:0;padding-left:1em}.bn-block-content:before{margin-right:0;content:"";display:inline}.bn-block-content[data-content-type=numberedListItem]{display:flex;gap:.5em}[data-content-type=numberedListItem]{--index: attr(data-index)}[data-prev-type=numberedListItem]{--prev-index: attr(data-prev-index)}.bn-block-outer[data-prev-type=numberedListItem]:not([data-prev-index=none])>.bn-block>.bn-block-content:before{content:var(--prev-index) "."}.bn-block-outer:not([data-prev-type])>.bn-block>.bn-block-content[data-content-type=numberedListItem]:before{content:var(--index) "."}.bn-block-content[data-content-type=bulletListItem]{display:flex;gap:.5em}.bn-block-content[data-content-type=checkListItem]>div{display:flex;width:100%}.bn-block-content[data-content-type=checkListItem]>div>div>input{margin:0;margin-inline-end:.5em;cursor:pointer}.bn-block-content[data-content-type=checkListItem][data-checked=true] .bn-inline-content{text-decoration:line-through}.bn-block-content[data-text-alignment=center]{justify-content:center}.bn-block-content[data-text-alignment=right]{justify-content:flex-end}.bn-block-outer[data-prev-type=bulletListItem]>.bn-block>.bn-block-content:before{content:"•"}.bn-block-outer:not([data-prev-type])>.bn-block>.bn-block-content[data-content-type=bulletListItem]:before{content:"•"}[data-content-type=bulletListItem]~.bn-block-group>.bn-block-outer[data-prev-type=bulletListItem]>.bn-block>.bn-block-content:before{content:"◦"}[data-content-type=bulletListItem]~.bn-block-group>.bn-block-outer:not([data-prev-type])>.bn-block>.bn-block-content[data-content-type=bulletListItem]:before{content:"◦"}[data-content-type=bulletListItem]~.bn-block-group [data-content-type=bulletListItem]~.bn-block-group>.bn-block-outer[data-prev-type=bulletListItem]>.bn-block>.bn-block-content:before{content:"▪"}[data-content-type=bulletListItem]~.bn-block-group [data-content-type=bulletListItem]~.bn-block-group>.bn-block-outer:not([data-prev-type])>.bn-block>.bn-block-content[data-content-type=bulletListItem]:before{content:"▪"}.bn-block-content[data-content-type=codeBlock]{position:relative;background-color:#161616;color:#fff;border-radius:8px}.bn-block-content[data-content-type=codeBlock]>pre{white-space:pre;overflow-x:auto;margin:0;width:100%;-moz-tab-size:2;tab-size:2;padding:24px}.bn-block-content[data-content-type=codeBlock]>div{outline:none!important}.bn-block-content[data-content-type=codeBlock]>div>select{outline:none!important;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-user-select:none;user-select:none;border:none;cursor:pointer;background-color:transparent;position:absolute;top:8px;left:18px;font-size:.8em;color:#fff;opacity:0;transition:opacity .3s;transition-delay:1s}.bn-block-content[data-content-type=codeBlock]>div>select>option{color:#000}.bn-block-content[data-content-type=codeBlock]:hover>div>select,.bn-block-content[data-content-type=codeBlock]>div>select:focus{opacity:.5;transition-delay:.1s}.bn-block-content[data-content-type=pageBreak]>div{width:100%;height:0;border-top:dotted rgb(125,121,122) 2px;margin-block:11px}@media print{.bn-block-content[data-content-type=pageBreak]>div{page-break-after:always}}[data-file-block] .bn-file-block-content-wrapper{cursor:pointer;display:flex;flex-direction:column;-webkit-user-select:none;user-select:none}[data-file-block] .bn-file-block-content-wrapper:has(.bn-add-file-button),[data-file-block] .bn-file-block-content-wrapper:has(.bn-file-name-with-icon){width:100%}[data-file-block] .bn-add-file-button{align-items:center;background-color:#f2f1ee;border-radius:4px;color:#7d797a;display:flex;gap:10px;padding:12px}.bn-editor[contenteditable=true] [data-file-block] .bn-add-file-button:hover,[data-file-block] .bn-file-name-with-icon:hover,.ProseMirror-selectednode .bn-file-name-with-icon{background-color:#e1e1e1}[data-file-block] .bn-add-file-button-icon,[data-file-block] .bn-file-icon{width:24px;height:24px}[data-file-block] .bn-add-file-button-text{font-size:.9rem}[data-file-block] .bn-file-name-with-icon{border-radius:4px;display:flex;gap:4px;padding:4px}[data-file-block] .bn-file-caption{font-size:.8em;padding-block:4px;word-break:break-word}[data-file-block] .bn-file-caption:empty{padding-block:0}[data-file-block] .bn-resize-handle{position:absolute;width:8px;height:30px;background-color:#000;border:1px solid white;border-radius:4px;cursor:ew-resize}[data-file-block] .bn-visual-media-wrapper{display:flex;align-items:center;position:relative;max-width:100%}[data-file-block] .bn-visual-media{border-radius:4px;width:100%}[data-content-type=audio]>.bn-file-block-content-wrapper,.bn-audio{width:100%}.bn-inline-content:has(>.ProseMirror-trailingBreak:only-child):before{pointer-events:none;height:0;position:absolute;font-style:italic}[data-text-color=gray]{color:#9b9a97}[data-text-color=brown]{color:#64473a}[data-text-color=red]{color:#e03e3e}[data-text-color=orange]{color:#d9730d}[data-text-color=yellow]{color:#dfab01}[data-text-color=green]{color:#4d6461}[data-text-color=blue]{color:#0b6e99}[data-text-color=purple]{color:#6940a5}[data-text-color=pink]{color:#ad1a72}[data-background-color=gray]{background-color:#ebeced}[data-background-color=brown]{background-color:#e9e5e3}[data-background-color=red]{background-color:#fbe4e4}[data-background-color=orange]{background-color:#f6e9d9}[data-background-color=yellow]{background-color:#fbf3db}[data-background-color=green]{background-color:#ddedea}[data-background-color=blue]{background-color:#ddebf1}[data-background-color=purple]{background-color:#eae4f2}[data-background-color=pink]{background-color:#f4dfeb}[data-text-alignment=left]{justify-content:flex-start!important;text-align:left!important}[data-text-alignment=center]{justify-content:center!important;text-align:center!important}[data-text-alignment=right]{justify-content:flex-end!important;text-align:right!important}[data-text-alignment=justify]{justify-content:flex-start!important;text-align:justify!important}.bn-block-column-list{display:flex;flex-direction:row}.bn-block-column{flex:1;padding:12px 20px;overflow-x:auto}.bn-block-column:first-child{padding-left:0}.bn-block-column:last-child{padding-right:0}.bn-thread-mark:not([data-orphan=true]){background:#ffc80026}.bn-thread-mark .bn-thread-mark-selected{background:#ffc80040}.ProseMirror .tableWrapper{overflow-x:auto}.ProseMirror table{border-collapse:collapse;table-layout:fixed;width:100%;overflow:hidden}.ProseMirror td,.ProseMirror th{vertical-align:top;box-sizing:border-box;position:relative}.ProseMirror td:not([data-colwidth]):not(.column-resize-dragging),.ProseMirror th:not([data-colwidth]):not(.column-resize-dragging){min-width:var(--default-cell-min-width)}.ProseMirror .column-resize-handle{position:absolute;right:-2px;top:0;bottom:0;width:4px;z-index:20;background-color:#adf;pointer-events:none}.ProseMirror.resize-cursor{cursor:ew-resize;cursor:col-resize}.ProseMirror .selectedCell:after{z-index:2;position:absolute;content:"";left:0;right:0;top:0;bottom:0;background:#c8c8ff66;pointer-events:none}.bn-editor{outline:none;padding-inline:54px;--N800: #172b4d;--N40: #dfe1e6}.bn-comment-editor{width:100%;padding:0}.bn-comment-editor .bn-editor{padding:0}.bn-root{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.bn-root *,.bn-root *:before,.bn-root *:after{-webkit-box-sizing:inherit;-moz-box-sizing:inherit;box-sizing:inherit}.bn-default-styles p,.bn-default-styles h1,.bn-default-styles h2,.bn-default-styles h3,.bn-default-styles li{margin:0;padding:0;font-size:inherit;min-width:2px!important}.bn-default-styles{font-size:16px;font-weight:400;font-family:Inter,SF Pro Display,-apple-system,BlinkMacSystemFont,Open Sans,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.bn-table-drop-cursor{position:absolute;z-index:20;background-color:#adf;pointer-events:none}.bn-drag-preview{position:absolute;top:0;left:0;padding:10px;opacity:.001}.bn-editor .bn-collaboration-cursor__base{position:relative}.bn-editor .bn-collaboration-cursor__base .bn-collaboration-cursor__caret{position:absolute;width:2px;top:1px;bottom:-2px;left:-1px}.bn-editor .bn-collaboration-cursor__base .bn-collaboration-cursor__label{pointer-events:none;border-radius:0 1.5px 1.5px 0;font-size:12px;font-style:normal;font-weight:600;line-height:normal;left:0;overflow:hidden;position:absolute;white-space:nowrap;-webkit-user-select:none;user-select:none;color:transparent;max-height:5px;max-width:4px;padding:0;top:-1px;transition:all .2s}.bn-editor .bn-collaboration-cursor__base[data-active] .bn-collaboration-cursor__label{color:#0d0d0d;max-height:1.1rem;max-width:20rem;padding:.1rem .3rem;top:-17px;left:0;border-radius:3px 3px 3px 0;transition:all .2s}.bn-editor [data-content-type=table] .tableWrapper{position:relative;top:-16px;left:-16px;min-width:calc(100% + 16px);padding-bottom:16px;overflow-y:hidden}.bn-editor [data-content-type=table] .tableWrapper-inner{padding:16px}.bn-editor [data-content-type=table] table{width:auto!important;word-break:break-word}.bn-editor [data-content-type=table] th,.bn-editor [data-content-type=table] td{border:1px solid #ddd;padding:5px 10px}.bn-editor [data-content-type=table] th{font-weight:700;text-align:left}.ProseMirror td,.ProseMirror th{min-width:auto!important}.ProseMirror td:not([colwidth]):not(.column-resize-dragging),.ProseMirror th:not([colwidth]):not(.column-resize-dragging){min-width:var(--default-cell-min-width)!important}.prosemirror-dropcursor-block{transition-property:top,bottom;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.prosemirror-dropcursor-vertical{transition-property:left,right}[data-show-selection]{background-color:highlight;padding:2px 0}
|
|
1
|
+
.bn-block-outer{line-height:1.5;transition:margin .2s}.bn-block{display:flex;flex-direction:column}.bn-block-content{padding:3px 0;transition:font-size .2s;width:100%}.bn-block-content:not(:has(.bn-inline-content)){display:flex}.bn-block-content:before{transition:all .2s}.bn-block-content.ProseMirror-selectednode>*,.ProseMirror-selectednode>.bn-block-content>*{border-radius:4px;outline:4px solid rgb(100,160,255)}.bn-inline-content{width:100%}.bn-block-group .bn-block-group{margin-left:1.5em}.bn-block-group .bn-block-group>.bn-block-outer{position:relative}.bn-block-group .bn-block-group>.bn-block-outer:not([data-prev-depth-changed]):before{content:" ";display:inline;position:absolute;left:-20px;height:100%;transition:all .2s .1s}.bn-block-group .bn-block-group>.bn-block-outer[data-prev-depth-change="-2"]:before{height:0}.bn-inline-content code{font-family:monospace}[data-prev-depth-change="1"]{--x: 1}[data-prev-depth-change="2"]{--x: 2}[data-prev-depth-change="3"]{--x: 3}[data-prev-depth-change="4"]{--x: 4}[data-prev-depth-change="5"]{--x: 5}[data-prev-depth-change="-1"]{--x: -1}[data-prev-depth-change="-2"]{--x: -2}[data-prev-depth-change="-3"]{--x: -3}[data-prev-depth-change="-4"]{--x: -4}[data-prev-depth-change="-5"]{--x: -5}.bn-block-outer[data-prev-depth-change]{margin-left:calc(10px * var(--x))}.bn-block-outer[data-prev-depth-change] .bn-block-outer[data-prev-depth-change]{margin-left:0}[data-content-type=heading]{--level: 3em}[data-content-type=heading][data-level="2"]{--level: 2em}[data-content-type=heading][data-level="3"]{--level: 1.3em}[data-prev-level="1"]{--prev-level: 3em}[data-prev-level="2"]{--prev-level: 2em}[data-prev-level="3"]{--prev-level: 1.3em}.bn-block-outer[data-prev-type=heading]>.bn-block>.bn-block-content{font-size:var(--prev-level);font-weight:700}.bn-block-outer:not([data-prev-type])>.bn-block>.bn-block-content[data-content-type=heading],.bn-block-outer:not([data-prev-type])>.bn-block>div[data-type=modification]>div[data-type=modification]>.bn-block-content[data-content-type=heading]{font-size:var(--level);font-weight:700}[data-content-type=quote] blockquote{border-left:2px solid rgb(125,121,122);color:#7d797a;margin:0;padding-left:1em}.bn-block-content:before{margin-right:0;content:"";display:inline}.bn-block-content[data-content-type=numberedListItem]{display:flex;gap:.5em}[data-content-type=numberedListItem]{--index: attr(data-index)}[data-prev-type=numberedListItem]{--prev-index: attr(data-prev-index)}.bn-block-outer[data-prev-type=numberedListItem]:not([data-prev-index=none])>.bn-block>.bn-block-content:before{content:var(--prev-index) "."}.bn-block-outer:not([data-prev-type])>.bn-block>.bn-block-content[data-content-type=numberedListItem]:before,.bn-block-outer:not([data-prev-type])>.bn-block>div[data-type=modification]>.bn-block-content[data-content-type=numberedListItem]:before{content:var(--index) "."}.bn-block-content[data-content-type=bulletListItem]{display:flex;gap:.5em}.bn-block-content[data-content-type=checkListItem]>div{display:flex;width:100%}.bn-block-content[data-content-type=checkListItem]>div>div>input{margin:0;margin-inline-end:.5em;cursor:pointer}.bn-block-content[data-content-type=checkListItem][data-checked=true] .bn-inline-content{text-decoration:line-through}.bn-block-content[data-text-alignment=center]{justify-content:center}.bn-block-content[data-text-alignment=right]{justify-content:flex-end}.bn-block-outer[data-prev-type=bulletListItem]>.bn-block>.bn-block-content:before{content:"•"}.bn-block-outer:not([data-prev-type])>.bn-block>.bn-block-content[data-content-type=bulletListItem]:before,.bn-block-outer:not([data-prev-type])>.bn-block>div[data-type=modification]>.bn-block-content[data-content-type=bulletListItem]:before{content:"•"}[data-content-type=bulletListItem]~.bn-block-group>.bn-block-outer[data-prev-type=bulletListItem]>.bn-block>.bn-block-content:before{content:"◦"}[data-content-type=bulletListItem]~.bn-block-group>.bn-block-outer:not([data-prev-type])>.bn-block>.bn-block-content[data-content-type=bulletListItem]:before,[data-content-type=bulletListItem]~.bn-block-group>.bn-block-outer:not([data-prev-type])>.bn-block>div[data-type=modification]>.bn-block-content[data-content-type=bulletListItem]:before{content:"◦"}[data-content-type=bulletListItem]~.bn-block-group [data-content-type=bulletListItem]~.bn-block-group>.bn-block-outer[data-prev-type=bulletListItem]>.bn-block>.bn-block-content:before{content:"▪"}[data-content-type=bulletListItem]~.bn-block-group [data-content-type=bulletListItem]~.bn-block-group>.bn-block-outer:not([data-prev-type])>.bn-block>.bn-block-content[data-content-type=bulletListItem]:before,[data-content-type=bulletListItem]~.bn-block-group [data-content-type=bulletListItem]~.bn-block-group>.bn-block-outer:not([data-prev-type])>.bn-block>div[data-type=modification]>.bn-block-content[data-content-type=bulletListItem]:before{content:"▪"}.bn-block-content[data-content-type=codeBlock]{position:relative;background-color:#161616;color:#fff;border-radius:8px}.bn-block-content[data-content-type=codeBlock]>pre{white-space:pre;overflow-x:auto;margin:0;width:100%;-moz-tab-size:2;tab-size:2;padding:24px}.bn-block-content[data-content-type=codeBlock]>div{outline:none!important}.bn-block-content[data-content-type=codeBlock]>div>select{outline:none!important;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-user-select:none;user-select:none;border:none;cursor:pointer;background-color:transparent;position:absolute;top:8px;left:18px;font-size:.8em;color:#fff;opacity:0;transition:opacity .3s;transition-delay:1s}.bn-block-content[data-content-type=codeBlock]>div>select>option{color:#000}.bn-block-content[data-content-type=codeBlock]:hover>div>select,.bn-block-content[data-content-type=codeBlock]>div>select:focus{opacity:.5;transition-delay:.1s}.bn-block-content[data-content-type=pageBreak]>div{width:100%;height:0;border-top:dotted rgb(125,121,122) 2px;margin-block:11px}@media print{.bn-block-content[data-content-type=pageBreak]>div{page-break-after:always}}[data-file-block] .bn-file-block-content-wrapper{cursor:pointer;display:flex;flex-direction:column;-webkit-user-select:none;user-select:none}[data-file-block] .bn-file-block-content-wrapper:has(.bn-add-file-button),[data-file-block] .bn-file-block-content-wrapper:has(.bn-file-name-with-icon){width:100%}[data-file-block] .bn-add-file-button{align-items:center;background-color:#f2f1ee;border-radius:4px;color:#7d797a;display:flex;gap:10px;padding:12px}.bn-editor[contenteditable=true] [data-file-block] .bn-add-file-button:hover,[data-file-block] .bn-file-name-with-icon:hover,.ProseMirror-selectednode .bn-file-name-with-icon{background-color:#e1e1e1}[data-file-block] .bn-add-file-button-icon,[data-file-block] .bn-file-icon{width:24px;height:24px}[data-file-block] .bn-add-file-button-text{font-size:.9rem}[data-file-block] .bn-file-name-with-icon{border-radius:4px;display:flex;gap:4px;padding:4px}[data-file-block] .bn-file-caption{font-size:.8em;padding-block:4px;word-break:break-word}[data-file-block] .bn-file-caption:empty{padding-block:0}[data-file-block] .bn-resize-handle{position:absolute;width:8px;height:30px;background-color:#000;border:1px solid white;border-radius:4px;cursor:ew-resize}[data-file-block] .bn-visual-media-wrapper{display:flex;align-items:center;position:relative;max-width:100%}[data-file-block] .bn-visual-media{border-radius:4px;width:100%}[data-content-type=audio]>.bn-file-block-content-wrapper,.bn-audio{width:100%}.bn-inline-content:has(>.ProseMirror-trailingBreak:only-child):before{pointer-events:none;height:0;position:absolute;font-style:italic}[data-text-color=gray]{color:#9b9a97}[data-text-color=brown]{color:#64473a}[data-text-color=red]{color:#e03e3e}[data-text-color=orange]{color:#d9730d}[data-text-color=yellow]{color:#dfab01}[data-text-color=green]{color:#4d6461}[data-text-color=blue]{color:#0b6e99}[data-text-color=purple]{color:#6940a5}[data-text-color=pink]{color:#ad1a72}[data-background-color=gray]{background-color:#ebeced}[data-background-color=brown]{background-color:#e9e5e3}[data-background-color=red]{background-color:#fbe4e4}[data-background-color=orange]{background-color:#f6e9d9}[data-background-color=yellow]{background-color:#fbf3db}[data-background-color=green]{background-color:#ddedea}[data-background-color=blue]{background-color:#ddebf1}[data-background-color=purple]{background-color:#eae4f2}[data-background-color=pink]{background-color:#f4dfeb}[data-text-alignment=left]{justify-content:flex-start!important;text-align:left!important}[data-text-alignment=center]{justify-content:center!important;text-align:center!important}[data-text-alignment=right]{justify-content:flex-end!important;text-align:right!important}[data-text-alignment=justify]{justify-content:flex-start!important;text-align:justify!important}.bn-block-column-list{display:flex;flex-direction:row}.bn-block-column{flex:1;padding:12px 20px;overflow-x:auto}.bn-block-column:first-child{padding-left:0}.bn-block-column:last-child{padding-right:0}.bn-thread-mark:not([data-orphan=true]){background:#ffc80026}.bn-thread-mark .bn-thread-mark-selected{background:#ffc80040}.ProseMirror .tableWrapper{overflow-x:auto}.ProseMirror table{border-collapse:collapse;table-layout:fixed;width:100%;overflow:hidden}.ProseMirror td,.ProseMirror th{vertical-align:top;box-sizing:border-box;position:relative}.ProseMirror td:not([data-colwidth]):not(.column-resize-dragging),.ProseMirror th:not([data-colwidth]):not(.column-resize-dragging){min-width:var(--default-cell-min-width)}.ProseMirror .column-resize-handle{position:absolute;right:-2px;top:0;bottom:0;width:4px;z-index:20;background-color:#adf;pointer-events:none}.ProseMirror.resize-cursor{cursor:ew-resize;cursor:col-resize}.ProseMirror .selectedCell:after{z-index:2;position:absolute;content:"";left:0;right:0;top:0;bottom:0;background:#c8c8ff66;pointer-events:none}.bn-editor{outline:none;padding-inline:54px;--N800: #172b4d;--N40: #dfe1e6}.bn-comment-editor{width:100%;padding:0}.bn-comment-editor .bn-editor{padding:0}.bn-root{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.bn-root *,.bn-root *:before,.bn-root *:after{-webkit-box-sizing:inherit;-moz-box-sizing:inherit;box-sizing:inherit}.bn-default-styles p,.bn-default-styles h1,.bn-default-styles h2,.bn-default-styles h3,.bn-default-styles li{margin:0;padding:0;font-size:inherit;min-width:2px!important}.bn-default-styles{font-size:16px;font-weight:400;font-family:Inter,SF Pro Display,-apple-system,BlinkMacSystemFont,Open Sans,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.bn-table-drop-cursor{position:absolute;z-index:20;background-color:#adf;pointer-events:none}.bn-drag-preview{position:absolute;top:0;left:0;padding:10px;opacity:.001}.bn-editor .bn-collaboration-cursor__base{position:relative}.bn-editor .bn-collaboration-cursor__base .bn-collaboration-cursor__caret{position:absolute;width:2px;top:1px;bottom:-2px;left:-1px}.bn-editor .bn-collaboration-cursor__base .bn-collaboration-cursor__label{pointer-events:none;border-radius:0 1.5px 1.5px 0;font-size:12px;font-style:normal;font-weight:600;line-height:normal;left:0;overflow:hidden;position:absolute;white-space:nowrap;-webkit-user-select:none;user-select:none;color:transparent;max-height:5px;max-width:4px;padding:0;top:-1px;transition:all .2s}.bn-editor .bn-collaboration-cursor__base[data-active] .bn-collaboration-cursor__label{color:#0d0d0d;max-height:1.1rem;max-width:20rem;padding:.1rem .3rem;top:-17px;left:0;border-radius:3px 3px 3px 0;transition:all .2s}.bn-editor [data-content-type=table] .tableWrapper{position:relative;top:-16px;left:-16px;min-width:calc(100% + 16px);padding-bottom:16px;overflow-y:hidden}.bn-editor [data-content-type=table] .tableWrapper-inner{padding:16px}.bn-editor [data-content-type=table] table{width:auto!important;word-break:break-word}.bn-editor [data-content-type=table] th,.bn-editor [data-content-type=table] td{border:1px solid #ddd;padding:5px 10px}.bn-editor [data-content-type=table] th{font-weight:700;text-align:left}.ProseMirror td,.ProseMirror th{min-width:auto!important}.ProseMirror td:not([colwidth]):not(.column-resize-dragging),.ProseMirror th:not([colwidth]):not(.column-resize-dragging){min-width:var(--default-cell-min-width)!important}.prosemirror-dropcursor-block{transition-property:top,bottom;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.prosemirror-dropcursor-vertical{transition-property:left,right}[data-show-selection]{background-color:highlight;padding:2px 0}
|
package/dist/webpack-stats.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"builtAt":1746802429660,"assets":[{"name":"blocknote.cjs","size":181304},{"name":"comments.cjs","size":11826},{"name":"locales.cjs","size":123402},{"name":"en-D4taoCs4.cjs","size":5539},{"name":"en-D4taoCs4.cjs.map","size":12801},{"name":"comments.cjs.map","size":47589},{"name":"locales.cjs.map","size":260168},{"name":"blocknote.cjs.map","size":871512}],"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":3792,"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":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/pmUtil.ts","size":651,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/nodeToBlock.ts","size":9637,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/internal.ts","size":1398,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/createSpec.ts","size":2644,"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":7095,"chunks":["a1ee98a"]},{"name":"./src/api/nodeUtil.ts","size":3150,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/updateBlock/updateBlock.ts","size":4066,"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":1706,"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":9214,"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/FileBlockContent/helpers/render/createResizableFileBlockWrapper.ts","size":4836,"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":3374,"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":3376,"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":5724,"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/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts","size":6996,"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":785,"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/commands/replaceBlocks/replaceBlocks.ts","size":1876,"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":4290,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/selections/textCursorPosition/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/extensions/Collaboration/CursorPlugin.ts","size":3675,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/UndoPlugin.ts","size":137,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/SyncPlugin.ts","size":154,"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":7583,"chunks":["a1ee98a"]},{"name":"./src/extensions/FilePanel/FilePanelPlugin.ts","size":3991,"chunks":["a1ee98a"]},{"name":"./src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts","size":5288,"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":7597,"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":911,"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":14087,"chunks":["a1ee98a"]},{"name":"./src/api/positionMapping.ts","size":1652,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/SuggestionPlugin.ts","size":8776,"chunks":["a1ee98a"]},{"name":"./src/extensions/TableHandles/TableHandlesPlugin.ts","size":27045,"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":2126,"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":5105,"chunks":["a1ee98a"]},{"name":"./src/editor/transformPasted.ts","size":2604,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteTipTapEditor.ts","size":5245,"chunks":["a1ee98a"]},{"name":"./src/style.css","size":0,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteEditor.ts","size":35450,"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":7904,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/de.ts","size":8624,"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/sk.ts","size":8317,"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/locales/zh-tw.ts","size":7225,"chunks":["9eaffe2"]},{"name":"./src/i18n/index.ts","size":0,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/en.ts","size":8004,"chunks":["a1e239a"]}]}
|
|
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"]}]}
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"directory": "packages/core"
|
|
12
12
|
},
|
|
13
13
|
"license": "MPL-2.0",
|
|
14
|
-
"version": "0.
|
|
14
|
+
"version": "0.31.0",
|
|
15
15
|
"files": [
|
|
16
16
|
"dist",
|
|
17
17
|
"types",
|
|
@@ -44,11 +44,13 @@
|
|
|
44
44
|
},
|
|
45
45
|
"./style.css": {
|
|
46
46
|
"import": "./dist/style.css",
|
|
47
|
-
"require": "./dist/style.css"
|
|
47
|
+
"require": "./dist/style.css",
|
|
48
|
+
"style": "./dist/style.css"
|
|
48
49
|
},
|
|
49
50
|
"./fonts/inter.css": {
|
|
50
51
|
"import": "./src/fonts/inter.css",
|
|
51
|
-
"require": "./src/fonts/inter.css"
|
|
52
|
+
"require": "./src/fonts/inter.css",
|
|
53
|
+
"style": "./src/fonts/inter.css"
|
|
52
54
|
},
|
|
53
55
|
"./comments": {
|
|
54
56
|
"types": "./types/src/comments/index.d.ts",
|
|
@@ -64,7 +66,7 @@
|
|
|
64
66
|
"dependencies": {
|
|
65
67
|
"@emoji-mart/data": "^1.2.1",
|
|
66
68
|
"@shikijs/types": "3.2.1",
|
|
67
|
-
"@tiptap/core": "^2.
|
|
69
|
+
"@tiptap/core": "^2.12.0",
|
|
68
70
|
"@tiptap/extension-bold": "^2.11.5",
|
|
69
71
|
"@tiptap/extension-code": "^2.11.5",
|
|
70
72
|
"@tiptap/extension-gapcursor": "^2.11.5",
|
|
@@ -76,10 +78,9 @@
|
|
|
76
78
|
"@tiptap/extension-strike": "^2.11.5",
|
|
77
79
|
"@tiptap/extension-table-cell": "^2.11.5",
|
|
78
80
|
"@tiptap/extension-table-header": "^2.11.5",
|
|
79
|
-
"@tiptap/extension-table-row": "^2.11.5",
|
|
80
81
|
"@tiptap/extension-text": "^2.11.5",
|
|
81
82
|
"@tiptap/extension-underline": "^2.11.5",
|
|
82
|
-
"@tiptap/pm": "^2.
|
|
83
|
+
"@tiptap/pm": "^2.12.0",
|
|
83
84
|
"emoji-mart": "^5.6.0",
|
|
84
85
|
"hast-util-from-dom": "^5.0.1",
|
|
85
86
|
"prosemirror-dropcursor": "^1.8.1",
|
|
@@ -87,7 +88,7 @@
|
|
|
87
88
|
"prosemirror-model": "^1.25.1",
|
|
88
89
|
"prosemirror-state": "^1.4.3",
|
|
89
90
|
"prosemirror-tables": "^1.6.4",
|
|
90
|
-
"prosemirror-transform": "^1.10.
|
|
91
|
+
"prosemirror-transform": "^1.10.4",
|
|
91
92
|
"prosemirror-view": "^1.38.1",
|
|
92
93
|
"rehype-format": "^5.0.1",
|
|
93
94
|
"rehype-parse": "^9.0.1",
|
package/src/api/README.md
CHANGED
|
@@ -5,4 +5,4 @@ Implements the BlockNote API surface
|
|
|
5
5
|
- `blockManipulation`: API to insert / update / remove blocks
|
|
6
6
|
- `exporters`: exporting to HTML / markdown / other formats
|
|
7
7
|
- `nodeConversions`: internal API for converting between BlockNote Schema (Blocks) and Prosemirror (Nodes)
|
|
8
|
-
- `parsers`: importing from HTML / markdown / other formats
|
|
8
|
+
- `parsers`: importing from HTML / markdown / other formats
|
|
@@ -12,17 +12,17 @@ function insertBlocks(
|
|
|
12
12
|
editor: BlockNoteEditor,
|
|
13
13
|
blocksToInsert: PartialBlock<any, any, any>[],
|
|
14
14
|
referenceBlock: BlockIdentifier,
|
|
15
|
-
placement: "before" | "after" = "before"
|
|
15
|
+
placement: "before" | "after" = "before",
|
|
16
16
|
) {
|
|
17
17
|
return editor.transact((tr) =>
|
|
18
|
-
insertBlocksTr(tr, blocksToInsert, referenceBlock, placement)
|
|
18
|
+
insertBlocksTr(tr, blocksToInsert, referenceBlock, placement),
|
|
19
19
|
);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
describe("Test insertBlocks", () => {
|
|
23
23
|
it("Insert single basic block before (without type)", () => {
|
|
24
24
|
expect(
|
|
25
|
-
insertBlocks(getEditor(), [{ content: "test" }], "paragraph-0", "before")
|
|
25
|
+
insertBlocks(getEditor(), [{ content: "test" }], "paragraph-0", "before"),
|
|
26
26
|
).toMatchSnapshot();
|
|
27
27
|
|
|
28
28
|
expect(getEditor().document).toMatchSnapshot();
|
|
@@ -34,8 +34,8 @@ describe("Test insertBlocks", () => {
|
|
|
34
34
|
getEditor(),
|
|
35
35
|
[{ type: "paragraph" }],
|
|
36
36
|
"paragraph-0",
|
|
37
|
-
"before"
|
|
38
|
-
)
|
|
37
|
+
"before",
|
|
38
|
+
),
|
|
39
39
|
).toMatchSnapshot();
|
|
40
40
|
|
|
41
41
|
expect(getEditor().document).toMatchSnapshot();
|
|
@@ -43,7 +43,12 @@ describe("Test insertBlocks", () => {
|
|
|
43
43
|
|
|
44
44
|
it("Insert single basic block after", () => {
|
|
45
45
|
expect(
|
|
46
|
-
insertBlocks(
|
|
46
|
+
insertBlocks(
|
|
47
|
+
getEditor(),
|
|
48
|
+
[{ type: "paragraph" }],
|
|
49
|
+
"paragraph-0",
|
|
50
|
+
"after",
|
|
51
|
+
),
|
|
47
52
|
).toMatchSnapshot();
|
|
48
53
|
|
|
49
54
|
expect(getEditor().document).toMatchSnapshot();
|
|
@@ -59,8 +64,8 @@ describe("Test insertBlocks", () => {
|
|
|
59
64
|
{ type: "paragraph", content: "Inserted paragraph 3" },
|
|
60
65
|
],
|
|
61
66
|
"paragraph-0",
|
|
62
|
-
"before"
|
|
63
|
-
)
|
|
67
|
+
"before",
|
|
68
|
+
),
|
|
64
69
|
).toMatchSnapshot();
|
|
65
70
|
|
|
66
71
|
expect(getEditor().document).toMatchSnapshot();
|
|
@@ -76,8 +81,8 @@ describe("Test insertBlocks", () => {
|
|
|
76
81
|
{ type: "paragraph", content: "Inserted paragraph 3" },
|
|
77
82
|
],
|
|
78
83
|
"paragraph-0",
|
|
79
|
-
"after"
|
|
80
|
-
)
|
|
84
|
+
"after",
|
|
85
|
+
),
|
|
81
86
|
).toMatchSnapshot();
|
|
82
87
|
|
|
83
88
|
expect(getEditor().document).toMatchSnapshot();
|
|
@@ -119,8 +124,8 @@ describe("Test insertBlocks", () => {
|
|
|
119
124
|
},
|
|
120
125
|
],
|
|
121
126
|
"paragraph-0",
|
|
122
|
-
"before"
|
|
123
|
-
)
|
|
127
|
+
"before",
|
|
128
|
+
),
|
|
124
129
|
).toMatchSnapshot();
|
|
125
130
|
|
|
126
131
|
expect(getEditor().document).toMatchSnapshot();
|
|
@@ -162,8 +167,8 @@ describe("Test insertBlocks", () => {
|
|
|
162
167
|
},
|
|
163
168
|
],
|
|
164
169
|
"paragraph-0",
|
|
165
|
-
"after"
|
|
166
|
-
)
|
|
170
|
+
"after",
|
|
171
|
+
),
|
|
167
172
|
).toMatchSnapshot();
|
|
168
173
|
|
|
169
174
|
expect(getEditor().document).toMatchSnapshot();
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Fragment, Slice } from "prosemirror-model";
|
|
2
|
-
|
|
2
|
+
import type { Transaction } from "prosemirror-state";
|
|
3
|
+
import { ReplaceStep } from "prosemirror-transform";
|
|
3
4
|
import { Block, PartialBlock } from "../../../../blocks/defaultBlocks.js";
|
|
4
5
|
import {
|
|
5
6
|
BlockIdentifier,
|
|
@@ -10,25 +11,23 @@ import {
|
|
|
10
11
|
import { blockToNode } from "../../../nodeConversions/blockToNode.js";
|
|
11
12
|
import { nodeToBlock } from "../../../nodeConversions/nodeToBlock.js";
|
|
12
13
|
import { getNodeById } from "../../../nodeUtil.js";
|
|
13
|
-
import { ReplaceStep } from "prosemirror-transform";
|
|
14
|
-
import type { Transaction } from "prosemirror-state";
|
|
15
14
|
import { getPmSchema } from "../../../pmUtil.js";
|
|
16
15
|
|
|
17
16
|
export function insertBlocks<
|
|
18
17
|
BSchema extends BlockSchema,
|
|
19
18
|
I extends InlineContentSchema,
|
|
20
|
-
S extends StyleSchema
|
|
19
|
+
S extends StyleSchema,
|
|
21
20
|
>(
|
|
22
21
|
tr: Transaction,
|
|
23
22
|
blocksToInsert: PartialBlock<BSchema, I, S>[],
|
|
24
23
|
referenceBlock: BlockIdentifier,
|
|
25
|
-
placement: "before" | "after" = "before"
|
|
24
|
+
placement: "before" | "after" = "before",
|
|
26
25
|
): Block<BSchema, I, S>[] {
|
|
27
26
|
const id =
|
|
28
27
|
typeof referenceBlock === "string" ? referenceBlock : referenceBlock.id;
|
|
29
28
|
const pmSchema = getPmSchema(tr);
|
|
30
29
|
const nodesToInsert = blocksToInsert.map((block) =>
|
|
31
|
-
blockToNode(block, pmSchema)
|
|
30
|
+
blockToNode(block, pmSchema),
|
|
32
31
|
);
|
|
33
32
|
|
|
34
33
|
const posInfo = getNodeById(id, tr.doc);
|
|
@@ -42,13 +41,13 @@ export function insertBlocks<
|
|
|
42
41
|
}
|
|
43
42
|
|
|
44
43
|
tr.step(
|
|
45
|
-
new ReplaceStep(pos, pos, new Slice(Fragment.from(nodesToInsert), 0, 0))
|
|
44
|
+
new ReplaceStep(pos, pos, new Slice(Fragment.from(nodesToInsert), 0, 0)),
|
|
46
45
|
);
|
|
47
46
|
|
|
48
47
|
// Now that the `PartialBlock`s have been converted to nodes, we can
|
|
49
48
|
// re-convert them into full `Block`s.
|
|
50
49
|
const insertedBlocks = nodesToInsert.map((node) =>
|
|
51
|
-
nodeToBlock(node, pmSchema)
|
|
50
|
+
nodeToBlock(node, pmSchema),
|
|
52
51
|
);
|
|
53
52
|
|
|
54
53
|
return insertedBlocks;
|
|
@@ -8,13 +8,13 @@ const getEditor = setupTestEnv();
|
|
|
8
8
|
|
|
9
9
|
function mergeBlocks(posBetweenBlocks: number) {
|
|
10
10
|
return getEditor()._tiptapEditor.commands.command(
|
|
11
|
-
mergeBlocksCommand(posBetweenBlocks)
|
|
11
|
+
mergeBlocksCommand(posBetweenBlocks),
|
|
12
12
|
);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
function getPosBeforeSelectedBlock() {
|
|
16
16
|
return getEditor().transact(
|
|
17
|
-
(tr) => getBlockInfoFromTransaction(tr).bnBlock.beforePos
|
|
17
|
+
(tr) => getBlockInfoFromTransaction(tr).bnBlock.beforePos,
|
|
18
18
|
);
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -63,7 +63,7 @@ describe("Test mergeBlocks", () => {
|
|
|
63
63
|
getEditor().setTextCursorPosition("paragraph-0", "end");
|
|
64
64
|
|
|
65
65
|
const firstBlockEndOffset = getEditor().transact(
|
|
66
|
-
(tr) => tr.selection.$anchor.parentOffset
|
|
66
|
+
(tr) => tr.selection.$anchor.parentOffset,
|
|
67
67
|
);
|
|
68
68
|
|
|
69
69
|
getEditor().setTextCursorPosition("paragraph-1");
|
|
@@ -20,11 +20,11 @@ export const getParentBlockInfo = (doc: Node, beforePos: number) => {
|
|
|
20
20
|
// get start pos of parent
|
|
21
21
|
const parentBeforePos = $pos.posAtIndex(
|
|
22
22
|
$pos.index($pos.depth - 1),
|
|
23
|
-
$pos.depth - 1
|
|
23
|
+
$pos.depth - 1,
|
|
24
24
|
);
|
|
25
25
|
|
|
26
26
|
const parentBlockInfo = getBlockInfoFromResolvedPos(
|
|
27
|
-
doc.resolve(parentBeforePos)
|
|
27
|
+
doc.resolve(parentBeforePos),
|
|
28
28
|
);
|
|
29
29
|
return parentBlockInfo;
|
|
30
30
|
};
|
|
@@ -45,7 +45,7 @@ export const getPrevBlockInfo = (doc: Node, beforePos: number) => {
|
|
|
45
45
|
const prevBlockBeforePos = $pos.posAtIndex(indexInParent - 1);
|
|
46
46
|
|
|
47
47
|
const prevBlockInfo = getBlockInfoFromResolvedPos(
|
|
48
|
-
doc.resolve(prevBlockBeforePos)
|
|
48
|
+
doc.resolve(prevBlockBeforePos),
|
|
49
49
|
);
|
|
50
50
|
return prevBlockInfo;
|
|
51
51
|
};
|
|
@@ -86,12 +86,12 @@ const mergeBlocks = (
|
|
|
86
86
|
state: EditorState,
|
|
87
87
|
dispatch: ((args?: any) => any) | undefined,
|
|
88
88
|
prevBlockInfo: BlockInfo,
|
|
89
|
-
nextBlockInfo: BlockInfo
|
|
89
|
+
nextBlockInfo: BlockInfo,
|
|
90
90
|
) => {
|
|
91
91
|
// Un-nests all children of the next block.
|
|
92
92
|
if (!nextBlockInfo.isBlockContainer) {
|
|
93
93
|
throw new Error(
|
|
94
|
-
`Attempted to merge block at position ${nextBlockInfo.bnBlock.beforePos} into previous block at position ${prevBlockInfo.bnBlock.beforePos}, but next block is not a block container
|
|
94
|
+
`Attempted to merge block at position ${nextBlockInfo.bnBlock.beforePos} into previous block at position ${prevBlockInfo.bnBlock.beforePos}, but next block is not a block container`,
|
|
95
95
|
);
|
|
96
96
|
}
|
|
97
97
|
|
|
@@ -99,10 +99,10 @@ const mergeBlocks = (
|
|
|
99
99
|
// group nodes.
|
|
100
100
|
if (nextBlockInfo.childContainer) {
|
|
101
101
|
const childBlocksStart = state.doc.resolve(
|
|
102
|
-
nextBlockInfo.childContainer.beforePos + 1
|
|
102
|
+
nextBlockInfo.childContainer.beforePos + 1,
|
|
103
103
|
);
|
|
104
104
|
const childBlocksEnd = state.doc.resolve(
|
|
105
|
-
nextBlockInfo.childContainer.afterPos - 1
|
|
105
|
+
nextBlockInfo.childContainer.afterPos - 1,
|
|
106
106
|
);
|
|
107
107
|
const childBlocksRange = childBlocksStart.blockRange(childBlocksEnd);
|
|
108
108
|
|
|
@@ -118,7 +118,7 @@ const mergeBlocks = (
|
|
|
118
118
|
if (dispatch) {
|
|
119
119
|
if (!prevBlockInfo.isBlockContainer) {
|
|
120
120
|
throw new Error(
|
|
121
|
-
`Attempted to merge block at position ${nextBlockInfo.bnBlock.beforePos} into previous block at position ${prevBlockInfo.bnBlock.beforePos}, but previous block is not a block container
|
|
121
|
+
`Attempted to merge block at position ${nextBlockInfo.bnBlock.beforePos} into previous block at position ${prevBlockInfo.bnBlock.beforePos}, but previous block is not a block container`,
|
|
122
122
|
);
|
|
123
123
|
}
|
|
124
124
|
|
|
@@ -126,8 +126,8 @@ const mergeBlocks = (
|
|
|
126
126
|
dispatch(
|
|
127
127
|
state.tr.delete(
|
|
128
128
|
prevBlockInfo.blockContent.afterPos - 1,
|
|
129
|
-
nextBlockInfo.blockContent.beforePos + 1
|
|
130
|
-
)
|
|
129
|
+
nextBlockInfo.blockContent.beforePos + 1,
|
|
130
|
+
),
|
|
131
131
|
);
|
|
132
132
|
}
|
|
133
133
|
|
|
@@ -148,7 +148,7 @@ export const mergeBlocksCommand =
|
|
|
148
148
|
|
|
149
149
|
const prevBlockInfo = getPrevBlockInfo(
|
|
150
150
|
state.doc,
|
|
151
|
-
nextBlockInfo.bnBlock.beforePos
|
|
151
|
+
nextBlockInfo.bnBlock.beforePos,
|
|
152
152
|
);
|
|
153
153
|
|
|
154
154
|
if (!prevBlockInfo) {
|
|
@@ -157,7 +157,7 @@ export const mergeBlocksCommand =
|
|
|
157
157
|
|
|
158
158
|
const bottomNestedBlockInfo = getBottomNestedBlockInfo(
|
|
159
159
|
state.doc,
|
|
160
|
-
prevBlockInfo
|
|
160
|
+
prevBlockInfo,
|
|
161
161
|
);
|
|
162
162
|
|
|
163
163
|
if (!canMerge(bottomNestedBlockInfo, nextBlockInfo)) {
|
|
@@ -14,11 +14,11 @@ const getEditor = setupTestEnv();
|
|
|
14
14
|
|
|
15
15
|
function makeSelectionSpanContent(selectionType: "text" | "node" | "cell") {
|
|
16
16
|
const blockInfo = getEditor().transact((tr) =>
|
|
17
|
-
getBlockInfoFromTransaction(tr)
|
|
17
|
+
getBlockInfoFromTransaction(tr),
|
|
18
18
|
);
|
|
19
19
|
if (!blockInfo.isBlockContainer) {
|
|
20
20
|
throw new Error(
|
|
21
|
-
`Selection points to a ${blockInfo.blockNoteType} node, not a blockContainer node
|
|
21
|
+
`Selection points to a ${blockInfo.blockNoteType} node, not a blockContainer node`,
|
|
22
22
|
);
|
|
23
23
|
}
|
|
24
24
|
const { blockContent } = blockInfo;
|
|
@@ -30,13 +30,13 @@ function makeSelectionSpanContent(selectionType: "text" | "node" | "cell") {
|
|
|
30
30
|
CellSelection.create(
|
|
31
31
|
tr.doc,
|
|
32
32
|
tr.doc.resolve(blockContent.beforePos + 3).before(),
|
|
33
|
-
tr.doc.resolve(blockContent.afterPos - 3).before()
|
|
34
|
-
)
|
|
35
|
-
)
|
|
33
|
+
tr.doc.resolve(blockContent.afterPos - 3).before(),
|
|
34
|
+
),
|
|
35
|
+
),
|
|
36
36
|
);
|
|
37
37
|
} else if (selectionType === "node") {
|
|
38
38
|
editor.transact((tr) =>
|
|
39
|
-
tr.setSelection(NodeSelection.create(tr.doc, blockContent.beforePos))
|
|
39
|
+
tr.setSelection(NodeSelection.create(tr.doc, blockContent.beforePos)),
|
|
40
40
|
);
|
|
41
41
|
} else {
|
|
42
42
|
editor.transact((tr) =>
|
|
@@ -44,9 +44,9 @@ function makeSelectionSpanContent(selectionType: "text" | "node" | "cell") {
|
|
|
44
44
|
TextSelection.create(
|
|
45
45
|
tr.doc,
|
|
46
46
|
blockContent.beforePos + 1,
|
|
47
|
-
blockContent.afterPos - 1
|
|
48
|
-
)
|
|
49
|
-
)
|
|
47
|
+
blockContent.afterPos - 1,
|
|
48
|
+
),
|
|
49
|
+
),
|
|
50
50
|
);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -63,7 +63,7 @@ describe("Test moveSelectedBlockAndSelection", () => {
|
|
|
63
63
|
makeSelectionSpanContent("text");
|
|
64
64
|
|
|
65
65
|
expect(
|
|
66
|
-
selection.eq(getEditor().transact((tr) => tr.selection))
|
|
66
|
+
selection.eq(getEditor().transact((tr) => tr.selection)),
|
|
67
67
|
).toBeTruthy();
|
|
68
68
|
});
|
|
69
69
|
|
|
@@ -78,7 +78,7 @@ describe("Test moveSelectedBlockAndSelection", () => {
|
|
|
78
78
|
makeSelectionSpanContent("node");
|
|
79
79
|
|
|
80
80
|
expect(
|
|
81
|
-
selection.eq(getEditor().transact((tr) => tr.selection))
|
|
81
|
+
selection.eq(getEditor().transact((tr) => tr.selection)),
|
|
82
82
|
).toBeTruthy();
|
|
83
83
|
});
|
|
84
84
|
|
|
@@ -93,7 +93,7 @@ describe("Test moveSelectedBlockAndSelection", () => {
|
|
|
93
93
|
makeSelectionSpanContent("cell");
|
|
94
94
|
|
|
95
95
|
expect(
|
|
96
|
-
selection.eq(getEditor().transact((tr) => tr.selection))
|
|
96
|
+
selection.eq(getEditor().transact((tr) => tr.selection)),
|
|
97
97
|
).toBeTruthy();
|
|
98
98
|
});
|
|
99
99
|
|
|
@@ -106,7 +106,7 @@ describe("Test moveSelectedBlockAndSelection", () => {
|
|
|
106
106
|
getEditor().setSelection("paragraph-1", "paragraph-2");
|
|
107
107
|
|
|
108
108
|
expect(
|
|
109
|
-
selection.eq(getEditor().transact((tr) => tr.selection))
|
|
109
|
+
selection.eq(getEditor().transact((tr) => tr.selection)),
|
|
110
110
|
).toBeTruthy();
|
|
111
111
|
});
|
|
112
112
|
|
|
@@ -119,7 +119,7 @@ describe("Test moveSelectedBlockAndSelection", () => {
|
|
|
119
119
|
getEditor().setSelection("paragraph-6", "table-0");
|
|
120
120
|
|
|
121
121
|
expect(
|
|
122
|
-
selection.eq(getEditor().transact((tr) => tr.selection))
|
|
122
|
+
selection.eq(getEditor().transact((tr) => tr.selection)),
|
|
123
123
|
).toBeTruthy();
|
|
124
124
|
});
|
|
125
125
|
});
|