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