@blocknote/core 0.21.0 → 0.23.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.js +2320 -1692
- package/dist/blocknote.js.map +1 -1
- package/dist/blocknote.umd.cjs +7 -7
- package/dist/blocknote.umd.cjs.map +1 -1
- package/dist/style.css +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +3 -3
- package/src/api/clipboard/__snapshots__/external/pasteEndOfParagraph.html +96 -0
- package/src/api/clipboard/__snapshots__/external/pasteEndOfParagraphText.html +96 -0
- package/src/api/clipboard/__snapshots__/external/pasteImage.html +111 -0
- package/src/api/clipboard/__snapshots__/external/pasteParagraphInCustomBlock.html +96 -0
- package/src/api/clipboard/__snapshots__/external/pasteTable.html +149 -0
- package/src/api/clipboard/__snapshots__/external/pasteTableInExistingTable.html +124 -0
- package/src/api/clipboard/__snapshots__/internal/basicBlocks.html +1 -0
- package/src/api/clipboard/__snapshots__/internal/basicBlocksWithProps.html +1 -0
- package/src/api/clipboard/__snapshots__/internal/paragraphInCustomBlock.html +1 -0
- package/src/api/clipboard/clipboardExternal.test.ts +161 -0
- package/src/api/clipboard/{clipboard.test.ts → clipboardInternal.test.ts} +186 -38
- package/src/api/clipboard/testUtil.ts +27 -0
- package/src/api/clipboard/toClipboard/copyExtension.ts +1 -0
- package/src/api/exporters/html/__snapshots__/pageBreak/basic/external.html +1 -0
- package/src/api/exporters/html/__snapshots__/pageBreak/basic/internal.html +1 -0
- package/src/api/exporters/html/util/serializeBlocksExternalHTML.ts +7 -1
- package/src/api/exporters/html/util/serializeBlocksInternalHTML.ts +3 -1
- package/src/api/exporters/markdown/__snapshots__/pageBreak/basic/markdown.md +0 -0
- package/src/api/nodeConversions/__snapshots__/nodeConversions.test.ts.snap +16 -0
- package/src/api/nodeConversions/nodeToBlock.ts +4 -1
- package/src/api/parsers/html/__snapshots__/parse-codeblocks.json +62 -0
- package/src/api/parsers/html/parseHTML.test.ts +9 -0
- package/src/api/parsers/markdown/__snapshots__/pasted/styled.json +2 -2
- package/src/api/testUtil/cases/defaultSchema.ts +15 -1
- package/src/api/testUtil/partialBlockTestUtil.ts +4 -1
- package/src/blocks/CodeBlockContent/CodeBlockContent.ts +32 -11
- package/src/blocks/HeadingBlockContent/HeadingBlockContent.ts +3 -28
- package/src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.ts +1 -1
- package/src/blocks/ListItemBlockContent/CheckListItemBlockContent/CheckListItemBlockContent.ts +4 -16
- package/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListIndexingPlugin.ts +11 -3
- package/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.ts +26 -6
- package/src/blocks/PageBreakBlockContent/PageBreakBlockContent.ts +49 -0
- package/src/blocks/PageBreakBlockContent/getPageBreakSlashMenuItems.ts +45 -0
- package/src/blocks/PageBreakBlockContent/schema.ts +40 -0
- package/src/editor/Block.css +18 -4
- package/src/editor/BlockNoteEditor.test.ts +21 -1
- package/src/editor/BlockNoteEditor.ts +17 -0
- package/src/editor/BlockNoteExtensions.ts +111 -16
- package/src/editor/editor.css +28 -13
- package/src/editor/transformPasted.ts +57 -4
- package/src/extensions/SideMenu/SideMenuPlugin.ts +115 -23
- package/src/extensions/SideMenu/dragging.ts +0 -1
- package/src/extensions/SuggestionMenu/DefaultSuggestionItem.ts +1 -1
- 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 +47 -17
- package/src/i18n/locales/hr.ts +72 -54
- package/src/i18n/locales/index.ts +1 -0
- package/src/i18n/locales/is.ts +6 -0
- package/src/i18n/locales/it.ts +315 -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/pl.ts +6 -0
- package/src/i18n/locales/pt.ts +6 -0
- package/src/i18n/locales/ru.ts +6 -0
- package/src/i18n/locales/vi.ts +6 -0
- package/src/i18n/locales/zh.ts +6 -0
- package/src/index.ts +3 -0
- package/src/schema/blocks/createSpec.ts +1 -1
- package/src/schema/blocks/internal.ts +16 -6
- package/src/schema/inlineContent/internal.ts +4 -1
- package/src/schema/propTypes.ts +41 -18
- package/types/src/api/blockManipulation/setupTestEnv.d.ts +8 -0
- package/types/src/api/clipboard/clipboardInternal.test.d.ts +1 -0
- package/types/src/api/clipboard/testUtil.d.ts +509 -0
- package/types/src/api/testUtil/cases/customBlocks.d.ts +8 -0
- package/types/src/api/testUtil/cases/customInlineContent.d.ts +8 -0
- package/types/src/api/testUtil/cases/customStyles.d.ts +8 -0
- package/types/src/api/testUtil/cases/defaultSchema.d.ts +2 -1
- package/types/src/blocks/CodeBlockContent/CodeBlockContent.d.ts +2 -0
- package/types/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.d.ts +12 -0
- package/types/src/blocks/PageBreakBlockContent/PageBreakBlockContent.d.ts +31 -0
- package/types/src/blocks/PageBreakBlockContent/getPageBreakSlashMenuItems.d.ts +8 -0
- package/types/src/blocks/PageBreakBlockContent/schema.d.ts +86 -0
- package/types/src/blocks/defaultBlocks.d.ts +16 -0
- package/types/src/editor/BlockNoteEditor.d.ts +15 -0
- package/types/src/editor/BlockNoteExtensions.d.ts +2 -0
- package/types/src/editor/transformPasted.d.ts +8 -4
- package/types/src/extensions/SideMenu/SideMenuPlugin.d.ts +25 -5
- package/types/src/extensions/SuggestionMenu/DefaultSuggestionItem.d.ts +1 -1
- package/types/src/i18n/locales/de.d.ts +6 -0
- package/types/src/i18n/locales/en.d.ts +6 -0
- package/types/src/i18n/locales/es.d.ts +6 -0
- package/types/src/i18n/locales/hr.d.ts +6 -0
- package/types/src/i18n/locales/index.d.ts +1 -0
- package/types/src/i18n/locales/it.d.ts +245 -0
- package/types/src/index.d.ts +3 -0
- package/types/src/schema/propTypes.d.ts +20 -2
- package/dist/src/api/blockManipulation/commands/insertBlocks/insertBlocks.js +0 -30
- package/dist/src/api/blockManipulation/commands/insertBlocks/insertBlocks.js.map +0 -1
- package/dist/src/api/blockManipulation/commands/insertBlocks/insertBlocks.test.js +0 -99
- package/dist/src/api/blockManipulation/commands/insertBlocks/insertBlocks.test.js.map +0 -1
- package/dist/src/api/blockManipulation/commands/mergeBlocks/mergeBlocks.js +0 -97
- package/dist/src/api/blockManipulation/commands/mergeBlocks/mergeBlocks.js.map +0 -1
- package/dist/src/api/blockManipulation/commands/mergeBlocks/mergeBlocks.test.js +0 -88
- package/dist/src/api/blockManipulation/commands/mergeBlocks/mergeBlocks.test.js.map +0 -1
- package/dist/src/api/blockManipulation/commands/moveBlocks/moveBlocks.js +0 -219
- package/dist/src/api/blockManipulation/commands/moveBlocks/moveBlocks.js.map +0 -1
- package/dist/src/api/blockManipulation/commands/moveBlocks/moveBlocks.test.js +0 -175
- package/dist/src/api/blockManipulation/commands/moveBlocks/moveBlocks.test.js.map +0 -1
- package/dist/src/api/blockManipulation/commands/nestBlock/nestBlock.js +0 -57
- package/dist/src/api/blockManipulation/commands/nestBlock/nestBlock.js.map +0 -1
- package/dist/src/api/blockManipulation/commands/removeBlocks/removeBlocks.js +0 -5
- package/dist/src/api/blockManipulation/commands/removeBlocks/removeBlocks.js.map +0 -1
- package/dist/src/api/blockManipulation/commands/removeBlocks/removeBlocks.test.js +0 -31
- package/dist/src/api/blockManipulation/commands/removeBlocks/removeBlocks.test.js.map +0 -1
- package/dist/src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.js +0 -71
- package/dist/src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.js.map +0 -1
- package/dist/src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.test.js +0 -157
- package/dist/src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.test.js.map +0 -1
- package/dist/src/api/blockManipulation/commands/splitBlock/splitBlock.js +0 -27
- package/dist/src/api/blockManipulation/commands/splitBlock/splitBlock.js.map +0 -1
- package/dist/src/api/blockManipulation/commands/splitBlock/splitBlock.test.js +0 -67
- package/dist/src/api/blockManipulation/commands/splitBlock/splitBlock.test.js.map +0 -1
- package/dist/src/api/blockManipulation/commands/updateBlock/updateBlock.js +0 -148
- package/dist/src/api/blockManipulation/commands/updateBlock/updateBlock.js.map +0 -1
- package/dist/src/api/blockManipulation/commands/updateBlock/updateBlock.test.js +0 -252
- package/dist/src/api/blockManipulation/commands/updateBlock/updateBlock.test.js.map +0 -1
- package/dist/src/api/blockManipulation/getBlock/getBlock.js +0 -56
- package/dist/src/api/blockManipulation/getBlock/getBlock.js.map +0 -1
- package/dist/src/api/blockManipulation/insertContentAt.js +0 -64
- package/dist/src/api/blockManipulation/insertContentAt.js.map +0 -1
- package/dist/src/api/blockManipulation/selections/selection.js +0 -149
- package/dist/src/api/blockManipulation/selections/selection.js.map +0 -1
- package/dist/src/api/blockManipulation/selections/selection.test.js +0 -39
- package/dist/src/api/blockManipulation/selections/selection.test.js.map +0 -1
- package/dist/src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.js +0 -79
- package/dist/src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.js.map +0 -1
- package/dist/src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.test.js +0 -33
- package/dist/src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.test.js.map +0 -1
- package/dist/src/api/blockManipulation/setupTestEnv.js +0 -172
- package/dist/src/api/blockManipulation/setupTestEnv.js.map +0 -1
- package/dist/src/api/clipboard/clipboard.test.js +0 -249
- package/dist/src/api/clipboard/clipboard.test.js.map +0 -1
- package/dist/src/api/clipboard/fromClipboard/acceptedMIMETypes.js +0 -8
- package/dist/src/api/clipboard/fromClipboard/acceptedMIMETypes.js.map +0 -1
- package/dist/src/api/clipboard/fromClipboard/fileDropExtension.js +0 -38
- package/dist/src/api/clipboard/fromClipboard/fileDropExtension.js.map +0 -1
- package/dist/src/api/clipboard/fromClipboard/handleFileInsertion.js +0 -111
- package/dist/src/api/clipboard/fromClipboard/handleFileInsertion.js.map +0 -1
- package/dist/src/api/clipboard/fromClipboard/handleVSCodePaste.js +0 -25
- package/dist/src/api/clipboard/fromClipboard/handleVSCodePaste.js.map +0 -1
- package/dist/src/api/clipboard/fromClipboard/pasteExtension.js +0 -57
- package/dist/src/api/clipboard/fromClipboard/pasteExtension.js.map +0 -1
- package/dist/src/api/clipboard/toClipboard/copyExtension.js +0 -134
- package/dist/src/api/clipboard/toClipboard/copyExtension.js.map +0 -1
- package/dist/src/api/exporters/html/externalHTMLExporter.js +0 -35
- package/dist/src/api/exporters/html/externalHTMLExporter.js.map +0 -1
- package/dist/src/api/exporters/html/htmlConversion.test.js +0 -72
- package/dist/src/api/exporters/html/htmlConversion.test.js.map +0 -1
- package/dist/src/api/exporters/html/internalHTMLSerializer.js +0 -21
- package/dist/src/api/exporters/html/internalHTMLSerializer.js.map +0 -1
- package/dist/src/api/exporters/html/util/serializeBlocksExternalHTML.js +0 -141
- package/dist/src/api/exporters/html/util/serializeBlocksExternalHTML.js.map +0 -1
- package/dist/src/api/exporters/html/util/serializeBlocksInternalHTML.js +0 -96
- package/dist/src/api/exporters/html/util/serializeBlocksInternalHTML.js.map +0 -1
- package/dist/src/api/exporters/markdown/markdownExporter.js +0 -31
- package/dist/src/api/exporters/markdown/markdownExporter.js.map +0 -1
- package/dist/src/api/exporters/markdown/markdownExporter.test.js +0 -57
- package/dist/src/api/exporters/markdown/markdownExporter.test.js.map +0 -1
- package/dist/src/api/exporters/markdown/removeUnderlinesRehypePlugin.js +0 -33
- package/dist/src/api/exporters/markdown/removeUnderlinesRehypePlugin.js.map +0 -1
- package/dist/src/api/exporters/markdown/util/addSpacesToCheckboxesRehypePlugin.js +0 -37
- package/dist/src/api/exporters/markdown/util/addSpacesToCheckboxesRehypePlugin.js.map +0 -1
- package/dist/src/api/getBlockInfoFromPos.js +0 -165
- package/dist/src/api/getBlockInfoFromPos.js.map +0 -1
- package/dist/src/api/nodeConversions/blockToNode.js +0 -197
- package/dist/src/api/nodeConversions/blockToNode.js.map +0 -1
- package/dist/src/api/nodeConversions/fragmentToBlocks.js +0 -50
- package/dist/src/api/nodeConversions/fragmentToBlocks.js.map +0 -1
- package/dist/src/api/nodeConversions/nodeConversions.test.js +0 -54
- package/dist/src/api/nodeConversions/nodeConversions.test.js.map +0 -1
- package/dist/src/api/nodeConversions/nodeToBlock.js +0 -316
- package/dist/src/api/nodeConversions/nodeToBlock.js.map +0 -1
- package/dist/src/api/nodeUtil.js +0 -28
- package/dist/src/api/nodeUtil.js.map +0 -1
- package/dist/src/api/parsers/html/parseHTML.js +0 -19
- package/dist/src/api/parsers/html/parseHTML.js.map +0 -1
- package/dist/src/api/parsers/html/parseHTML.test.js +0 -470
- package/dist/src/api/parsers/html/parseHTML.test.js.map +0 -1
- package/dist/src/api/parsers/html/util/nestedLists.js +0 -106
- package/dist/src/api/parsers/html/util/nestedLists.js.map +0 -1
- package/dist/src/api/parsers/html/util/nestedLists.test.js +0 -166
- package/dist/src/api/parsers/html/util/nestedLists.test.js.map +0 -1
- package/dist/src/api/parsers/markdown/parseMarkdown.js +0 -52
- package/dist/src/api/parsers/markdown/parseMarkdown.js.map +0 -1
- package/dist/src/api/parsers/markdown/parseMarkdown.test.js +0 -112
- package/dist/src/api/parsers/markdown/parseMarkdown.test.js.map +0 -1
- package/dist/src/api/testUtil/cases/customBlocks.js +0 -313
- package/dist/src/api/testUtil/cases/customBlocks.js.map +0 -1
- package/dist/src/api/testUtil/cases/customInlineContent.js +0 -91
- package/dist/src/api/testUtil/cases/customInlineContent.js.map +0 -1
- package/dist/src/api/testUtil/cases/customStyles.js +0 -83
- package/dist/src/api/testUtil/cases/customStyles.js.map +0 -1
- package/dist/src/api/testUtil/cases/defaultSchema.js +0 -673
- package/dist/src/api/testUtil/cases/defaultSchema.js.map +0 -1
- package/dist/src/api/testUtil/index.js +0 -2
- package/dist/src/api/testUtil/index.js.map +0 -1
- package/dist/src/api/testUtil/partialBlockTestUtil.js +0 -114
- package/dist/src/api/testUtil/partialBlockTestUtil.js.map +0 -1
- package/dist/src/api/testUtil/paste.js +0 -29
- package/dist/src/api/testUtil/paste.js.map +0 -1
- package/dist/src/blocks/AudioBlockContent/AudioBlockContent.js +0 -104
- package/dist/src/blocks/AudioBlockContent/AudioBlockContent.js.map +0 -1
- package/dist/src/blocks/AudioBlockContent/parseAudioElement.js +0 -5
- package/dist/src/blocks/AudioBlockContent/parseAudioElement.js.map +0 -1
- package/dist/src/blocks/CodeBlockContent/CodeBlockContent.js +0 -281
- package/dist/src/blocks/CodeBlockContent/CodeBlockContent.js.map +0 -1
- package/dist/src/blocks/CodeBlockContent/defaultSupportedLanguages.js +0 -110
- package/dist/src/blocks/CodeBlockContent/defaultSupportedLanguages.js.map +0 -1
- package/dist/src/blocks/FileBlockContent/FileBlockContent.js +0 -71
- package/dist/src/blocks/FileBlockContent/FileBlockContent.js.map +0 -1
- package/dist/src/blocks/FileBlockContent/helpers/parse/parseEmbedElement.js +0 -5
- package/dist/src/blocks/FileBlockContent/helpers/parse/parseEmbedElement.js.map +0 -1
- package/dist/src/blocks/FileBlockContent/helpers/parse/parseFigureElement.js +0 -10
- package/dist/src/blocks/FileBlockContent/helpers/parse/parseFigureElement.js.map +0 -1
- package/dist/src/blocks/FileBlockContent/helpers/render/createAddFileButton.js +0 -39
- package/dist/src/blocks/FileBlockContent/helpers/render/createAddFileButton.js.map +0 -1
- package/dist/src/blocks/FileBlockContent/helpers/render/createFileBlockWrapper.js +0 -51
- package/dist/src/blocks/FileBlockContent/helpers/render/createFileBlockWrapper.js.map +0 -1
- package/dist/src/blocks/FileBlockContent/helpers/render/createFileNameWithIcon.js +0 -17
- package/dist/src/blocks/FileBlockContent/helpers/render/createFileNameWithIcon.js.map +0 -1
- package/dist/src/blocks/FileBlockContent/helpers/render/createResizableFileBlockWrapper.js +0 -147
- package/dist/src/blocks/FileBlockContent/helpers/render/createResizableFileBlockWrapper.js.map +0 -1
- package/dist/src/blocks/FileBlockContent/helpers/toExternalHTML/createFigureWithCaption.js +0 -9
- package/dist/src/blocks/FileBlockContent/helpers/toExternalHTML/createFigureWithCaption.js.map +0 -1
- package/dist/src/blocks/FileBlockContent/helpers/toExternalHTML/createLinkWithCaption.js +0 -11
- package/dist/src/blocks/FileBlockContent/helpers/toExternalHTML/createLinkWithCaption.js.map +0 -1
- package/dist/src/blocks/FileBlockContent/uploadToTmpFilesDotOrg_DEV_ONLY.js +0 -15
- package/dist/src/blocks/FileBlockContent/uploadToTmpFilesDotOrg_DEV_ONLY.js.map +0 -1
- package/dist/src/blocks/HeadingBlockContent/HeadingBlockContent.js +0 -145
- package/dist/src/blocks/HeadingBlockContent/HeadingBlockContent.js.map +0 -1
- package/dist/src/blocks/ImageBlockContent/ImageBlockContent.js +0 -114
- package/dist/src/blocks/ImageBlockContent/ImageBlockContent.js.map +0 -1
- package/dist/src/blocks/ImageBlockContent/parseImageElement.js +0 -6
- package/dist/src/blocks/ImageBlockContent/parseImageElement.js.map +0 -1
- package/dist/src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.js +0 -113
- package/dist/src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.js.map +0 -1
- package/dist/src/blocks/ListItemBlockContent/CheckListItemBlockContent/CheckListItemBlockContent.js +0 -224
- package/dist/src/blocks/ListItemBlockContent/CheckListItemBlockContent/CheckListItemBlockContent.js.map +0 -1
- package/dist/src/blocks/ListItemBlockContent/ListItemKeyboardShortcuts.js +0 -45
- package/dist/src/blocks/ListItemBlockContent/ListItemKeyboardShortcuts.js.map +0 -1
- package/dist/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListIndexingPlugin.js +0 -58
- package/dist/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListIndexingPlugin.js.map +0 -1
- package/dist/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.js +0 -130
- package/dist/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.js.map +0 -1
- package/dist/src/blocks/ParagraphBlockContent/ParagraphBlockContent.js +0 -52
- package/dist/src/blocks/ParagraphBlockContent/ParagraphBlockContent.js.map +0 -1
- package/dist/src/blocks/TableBlockContent/TableBlockContent.js +0 -129
- package/dist/src/blocks/TableBlockContent/TableBlockContent.js.map +0 -1
- package/dist/src/blocks/TableBlockContent/TableExtension.js +0 -64
- package/dist/src/blocks/TableBlockContent/TableExtension.js.map +0 -1
- package/dist/src/blocks/VideoBlockContent/VideoBlockContent.js +0 -114
- package/dist/src/blocks/VideoBlockContent/VideoBlockContent.js.map +0 -1
- package/dist/src/blocks/VideoBlockContent/parseVideoElement.js +0 -6
- package/dist/src/blocks/VideoBlockContent/parseVideoElement.js.map +0 -1
- package/dist/src/blocks/defaultBlockHelpers.js +0 -50
- package/dist/src/blocks/defaultBlockHelpers.js.map +0 -1
- package/dist/src/blocks/defaultBlockTypeGuards.js +0 -40
- package/dist/src/blocks/defaultBlockTypeGuards.js.map +0 -1
- package/dist/src/blocks/defaultBlocks.js +0 -50
- package/dist/src/blocks/defaultBlocks.js.map +0 -1
- package/dist/src/blocks/defaultProps.js +0 -19
- package/dist/src/blocks/defaultProps.js.map +0 -1
- package/dist/src/editor/BlockNoteEditor.js +0 -751
- package/dist/src/editor/BlockNoteEditor.js.map +0 -1
- package/dist/src/editor/BlockNoteEditor.test.js +0 -65
- package/dist/src/editor/BlockNoteEditor.test.js.map +0 -1
- package/dist/src/editor/BlockNoteExtensions.js +0 -192
- package/dist/src/editor/BlockNoteExtensions.js.map +0 -1
- package/dist/src/editor/BlockNoteSchema.js +0 -38
- package/dist/src/editor/BlockNoteSchema.js.map +0 -1
- package/dist/src/editor/BlockNoteTipTapEditor.js +0 -169
- package/dist/src/editor/BlockNoteTipTapEditor.js.map +0 -1
- package/dist/src/editor/cursorPositionTypes.js +0 -2
- package/dist/src/editor/cursorPositionTypes.js.map +0 -1
- package/dist/src/editor/defaultColors.js +0 -77
- package/dist/src/editor/defaultColors.js.map +0 -1
- package/dist/src/editor/selectionTypes.js +0 -2
- package/dist/src/editor/selectionTypes.js.map +0 -1
- package/dist/src/editor/transformPasted.js +0 -79
- package/dist/src/editor/transformPasted.js.map +0 -1
- package/dist/src/exporter/Exporter.js +0 -36
- package/dist/src/exporter/Exporter.js.map +0 -1
- package/dist/src/exporter/index.js +0 -3
- package/dist/src/exporter/index.js.map +0 -1
- package/dist/src/exporter/mapping.js +0 -12
- package/dist/src/exporter/mapping.js.map +0 -1
- package/dist/src/extensions/BackgroundColor/BackgroundColorExtension.js +0 -30
- package/dist/src/extensions/BackgroundColor/BackgroundColorExtension.js.map +0 -1
- package/dist/src/extensions/BackgroundColor/BackgroundColorMark.js +0 -39
- package/dist/src/extensions/BackgroundColor/BackgroundColorMark.js.map +0 -1
- package/dist/src/extensions/FilePanel/FilePanelPlugin.js +0 -131
- package/dist/src/extensions/FilePanel/FilePanelPlugin.js.map +0 -1
- package/dist/src/extensions/FormattingToolbar/FormattingToolbarPlugin.js +0 -197
- package/dist/src/extensions/FormattingToolbar/FormattingToolbarPlugin.js.map +0 -1
- package/dist/src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.js +0 -341
- package/dist/src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.js.map +0 -1
- package/dist/src/extensions/LinkToolbar/LinkToolbarPlugin.js +0 -251
- package/dist/src/extensions/LinkToolbar/LinkToolbarPlugin.js.map +0 -1
- package/dist/src/extensions/LinkToolbar/protocols.js +0 -14
- package/dist/src/extensions/LinkToolbar/protocols.js.map +0 -1
- package/dist/src/extensions/NodeSelectionKeyboard/NodeSelectionKeyboardPlugin.js +0 -54
- package/dist/src/extensions/NodeSelectionKeyboard/NodeSelectionKeyboardPlugin.js.map +0 -1
- package/dist/src/extensions/Placeholder/PlaceholderPlugin.js +0 -90
- package/dist/src/extensions/Placeholder/PlaceholderPlugin.js.map +0 -1
- package/dist/src/extensions/PreviousBlockType/PreviousBlockTypePlugin.js +0 -187
- package/dist/src/extensions/PreviousBlockType/PreviousBlockTypePlugin.js.map +0 -1
- package/dist/src/extensions/SideMenu/MultipleNodeSelection.js +0 -68
- package/dist/src/extensions/SideMenu/MultipleNodeSelection.js.map +0 -1
- package/dist/src/extensions/SideMenu/SideMenuPlugin.js +0 -347
- package/dist/src/extensions/SideMenu/SideMenuPlugin.js.map +0 -1
- package/dist/src/extensions/SideMenu/dragging.js +0 -135
- package/dist/src/extensions/SideMenu/dragging.js.map +0 -1
- package/dist/src/extensions/SuggestionMenu/DefaultGridSuggestionItem.js +0 -2
- package/dist/src/extensions/SuggestionMenu/DefaultGridSuggestionItem.js.map +0 -1
- package/dist/src/extensions/SuggestionMenu/DefaultSuggestionItem.js +0 -2
- package/dist/src/extensions/SuggestionMenu/DefaultSuggestionItem.js.map +0 -1
- package/dist/src/extensions/SuggestionMenu/SuggestionPlugin.js +0 -245
- package/dist/src/extensions/SuggestionMenu/SuggestionPlugin.js.map +0 -1
- package/dist/src/extensions/SuggestionMenu/getDefaultEmojiPickerItems.js +0 -26
- package/dist/src/extensions/SuggestionMenu/getDefaultEmojiPickerItems.js.map +0 -1
- package/dist/src/extensions/SuggestionMenu/getDefaultSlashMenuItems.js +0 -241
- package/dist/src/extensions/SuggestionMenu/getDefaultSlashMenuItems.js.map +0 -1
- package/dist/src/extensions/TableHandles/TableHandlesPlugin.js +0 -579
- package/dist/src/extensions/TableHandles/TableHandlesPlugin.js.map +0 -1
- package/dist/src/extensions/TextAlignment/TextAlignmentExtension.js +0 -36
- package/dist/src/extensions/TextAlignment/TextAlignmentExtension.js.map +0 -1
- package/dist/src/extensions/TextColor/TextColorExtension.js +0 -29
- package/dist/src/extensions/TextColor/TextColorExtension.js.map +0 -1
- package/dist/src/extensions/TextColor/TextColorMark.js +0 -37
- package/dist/src/extensions/TextColor/TextColorMark.js.map +0 -1
- package/dist/src/extensions/TrailingNode/TrailingNodeExtension.js +0 -58
- package/dist/src/extensions/TrailingNode/TrailingNodeExtension.js.map +0 -1
- package/dist/src/extensions/UniqueID/UniqueID.js +0 -283
- package/dist/src/extensions/UniqueID/UniqueID.js.map +0 -1
- package/dist/src/extensions/getDraggableBlockFromElement.js +0 -13
- package/dist/src/extensions/getDraggableBlockFromElement.js.map +0 -1
- package/dist/src/extensions-shared/UiElementPosition.js +0 -2
- package/dist/src/extensions-shared/UiElementPosition.js.map +0 -1
- package/dist/src/i18n/dictionary.js +0 -4
- package/dist/src/i18n/dictionary.js.map +0 -1
- package/dist/src/i18n/locales/ar.js +0 -298
- package/dist/src/i18n/locales/ar.js.map +0 -1
- package/dist/src/i18n/locales/de.js +0 -313
- package/dist/src/i18n/locales/de.js.map +0 -1
- package/dist/src/i18n/locales/en.js +0 -314
- package/dist/src/i18n/locales/en.js.map +0 -1
- package/dist/src/i18n/locales/es.js +0 -312
- package/dist/src/i18n/locales/es.js.map +0 -1
- package/dist/src/i18n/locales/fr.js +0 -313
- package/dist/src/i18n/locales/fr.js.map +0 -1
- package/dist/src/i18n/locales/hr.js +0 -308
- package/dist/src/i18n/locales/hr.js.map +0 -1
- package/dist/src/i18n/locales/index.js +0 -16
- package/dist/src/i18n/locales/index.js.map +0 -1
- package/dist/src/i18n/locales/is.js +0 -305
- package/dist/src/i18n/locales/is.js.map +0 -1
- package/dist/src/i18n/locales/ja.js +0 -333
- package/dist/src/i18n/locales/ja.js.map +0 -1
- package/dist/src/i18n/locales/ko.js +0 -326
- package/dist/src/i18n/locales/ko.js.map +0 -1
- package/dist/src/i18n/locales/nl.js +0 -313
- package/dist/src/i18n/locales/nl.js.map +0 -1
- package/dist/src/i18n/locales/pl.js +0 -297
- package/dist/src/i18n/locales/pl.js.map +0 -1
- package/dist/src/i18n/locales/pt.js +0 -305
- package/dist/src/i18n/locales/pt.js.map +0 -1
- package/dist/src/i18n/locales/ru.js +0 -340
- package/dist/src/i18n/locales/ru.js.map +0 -1
- package/dist/src/i18n/locales/vi.js +0 -312
- package/dist/src/i18n/locales/vi.js.map +0 -1
- package/dist/src/i18n/locales/zh.js +0 -346
- package/dist/src/i18n/locales/zh.js.map +0 -1
- package/dist/src/index.js +0 -63
- package/dist/src/index.js.map +0 -1
- package/dist/src/pm-nodes/BlockContainer.js +0 -72
- package/dist/src/pm-nodes/BlockContainer.js.map +0 -1
- package/dist/src/pm-nodes/BlockGroup.js +0 -43
- package/dist/src/pm-nodes/BlockGroup.js.map +0 -1
- package/dist/src/pm-nodes/Doc.js +0 -7
- package/dist/src/pm-nodes/Doc.js.map +0 -1
- package/dist/src/pm-nodes/index.js +0 -4
- package/dist/src/pm-nodes/index.js.map +0 -1
- package/dist/src/schema/blocks/createSpec.js +0 -126
- package/dist/src/schema/blocks/createSpec.js.map +0 -1
- package/dist/src/schema/blocks/internal.js +0 -147
- package/dist/src/schema/blocks/internal.js.map +0 -1
- package/dist/src/schema/blocks/types.js +0 -2
- package/dist/src/schema/blocks/types.js.map +0 -1
- package/dist/src/schema/index.js +0 -11
- package/dist/src/schema/index.js.map +0 -1
- package/dist/src/schema/inlineContent/createSpec.js +0 -64
- package/dist/src/schema/inlineContent/createSpec.js.map +0 -1
- package/dist/src/schema/inlineContent/internal.js +0 -52
- package/dist/src/schema/inlineContent/internal.js.map +0 -1
- package/dist/src/schema/inlineContent/types.js +0 -10
- package/dist/src/schema/inlineContent/types.js.map +0 -1
- package/dist/src/schema/propTypes.js +0 -2
- package/dist/src/schema/propTypes.js.map +0 -1
- package/dist/src/schema/styles/createSpec.js +0 -48
- package/dist/src/schema/styles/createSpec.js.map +0 -1
- package/dist/src/schema/styles/internal.js +0 -53
- package/dist/src/schema/styles/internal.js.map +0 -1
- package/dist/src/schema/styles/types.js +0 -2
- package/dist/src/schema/styles/types.js.map +0 -1
- package/dist/src/util/EventEmitter.js +0 -33
- package/dist/src/util/EventEmitter.js.map +0 -1
- package/dist/src/util/browser.js +0 -17
- package/dist/src/util/browser.js.map +0 -1
- package/dist/src/util/combineByGroup.js +0 -20
- package/dist/src/util/combineByGroup.js.map +0 -1
- package/dist/src/util/esmDependencies.js +0 -35
- package/dist/src/util/esmDependencies.js.map +0 -1
- package/dist/src/util/string.js +0 -14
- package/dist/src/util/string.js.map +0 -1
- package/dist/src/util/typescript.js +0 -12
- package/dist/src/util/typescript.js.map +0 -1
- /package/src/api/clipboard/__snapshots__/{childToParent.html → internal/childToParent.html} +0 -0
- /package/src/api/clipboard/__snapshots__/{childrenToNextParent.html → internal/childrenToNextParent.html} +0 -0
- /package/src/api/clipboard/__snapshots__/{childrenToNextParentsChildren.html → internal/childrenToNextParentsChildren.html} +0 -0
- /package/src/api/clipboard/__snapshots__/{image.html → internal/image.html} +0 -0
- /package/src/api/clipboard/__snapshots__/{multipleChildren.html → internal/multipleChildren.html} +0 -0
- /package/src/api/clipboard/__snapshots__/{multipleStyledText.html → internal/multipleStyledText.html} +0 -0
- /package/src/api/clipboard/__snapshots__/{nestedImage.html → internal/nestedImage.html} +0 -0
- /package/src/api/clipboard/__snapshots__/{partialChildToParent.html → internal/partialChildToParent.html} +0 -0
- /package/src/api/clipboard/__snapshots__/{styledText.html → internal/styledText.html} +0 -0
- /package/src/api/clipboard/__snapshots__/{tableAllCells.html → internal/tableAllCells.html} +0 -0
- /package/src/api/clipboard/__snapshots__/{tableCell.html → internal/tableCell.html} +0 -0
- /package/src/api/clipboard/__snapshots__/{tableCellText.html → internal/tableCellText.html} +0 -0
- /package/src/api/clipboard/__snapshots__/{tableRow.html → internal/tableRow.html} +0 -0
- /package/src/api/clipboard/__snapshots__/{unstyledText.html → internal/unstyledText.html} +0 -0
- /package/types/src/api/clipboard/{clipboard.test.d.ts → clipboardExternal.test.d.ts} +0 -0
|
@@ -46,7 +46,10 @@ export function propsToAttributes(propSchema: PropSchema): Attributes {
|
|
|
46
46
|
return null;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
if (
|
|
49
|
+
if (
|
|
50
|
+
(spec.default === undefined && spec.type === "boolean") ||
|
|
51
|
+
(spec.default !== undefined && typeof spec.default === "boolean")
|
|
52
|
+
) {
|
|
50
53
|
if (value === "true") {
|
|
51
54
|
return true;
|
|
52
55
|
}
|
|
@@ -58,7 +61,10 @@ export function propsToAttributes(propSchema: PropSchema): Attributes {
|
|
|
58
61
|
return null;
|
|
59
62
|
}
|
|
60
63
|
|
|
61
|
-
if (
|
|
64
|
+
if (
|
|
65
|
+
(spec.default === undefined && spec.type === "number") ||
|
|
66
|
+
(spec.default !== undefined && typeof spec.default === "number")
|
|
67
|
+
) {
|
|
62
68
|
const asNumber = parseFloat(value);
|
|
63
69
|
const isNumeric =
|
|
64
70
|
!Number.isNaN(asNumber) && Number.isFinite(asNumber);
|
|
@@ -72,12 +78,14 @@ export function propsToAttributes(propSchema: PropSchema): Attributes {
|
|
|
72
78
|
|
|
73
79
|
return value;
|
|
74
80
|
},
|
|
75
|
-
renderHTML: (attributes) =>
|
|
76
|
-
|
|
81
|
+
renderHTML: (attributes) => {
|
|
82
|
+
// don't render to html if the value is the same as the default
|
|
83
|
+
return attributes[name] !== spec.default
|
|
77
84
|
? {
|
|
78
85
|
[camelToDataKebab(name)]: attributes[name],
|
|
79
86
|
}
|
|
80
|
-
: {}
|
|
87
|
+
: {};
|
|
88
|
+
},
|
|
81
89
|
};
|
|
82
90
|
});
|
|
83
91
|
|
|
@@ -173,7 +181,9 @@ export function wrapInBlockStructure<
|
|
|
173
181
|
// which are already added as HTML attributes to the parent `blockContent`
|
|
174
182
|
// element (inheritedProps) and props set to their default values.
|
|
175
183
|
for (const [prop, value] of Object.entries(blockProps)) {
|
|
176
|
-
|
|
184
|
+
const spec = propSchema[prop];
|
|
185
|
+
const defaultValue = spec.default;
|
|
186
|
+
if (!inheritedProps.includes(prop) && value !== defaultValue) {
|
|
177
187
|
blockContent.setAttribute(camelToDataKebab(prop), value);
|
|
178
188
|
}
|
|
179
189
|
}
|
|
@@ -34,7 +34,10 @@ export function addInlineContentAttributes<
|
|
|
34
34
|
// Adds props as HTML attributes in kebab-case with "data-" prefix. Skips props
|
|
35
35
|
// set to their default values.
|
|
36
36
|
Object.entries(inlineContentProps)
|
|
37
|
-
.filter(([prop, value]) =>
|
|
37
|
+
.filter(([prop, value]) => {
|
|
38
|
+
const spec = propSchema[prop];
|
|
39
|
+
return value !== spec.default;
|
|
40
|
+
})
|
|
38
41
|
.map(([prop, value]) => {
|
|
39
42
|
return [camelToDataKebab(prop), value];
|
|
40
43
|
})
|
package/src/schema/propTypes.ts
CHANGED
|
@@ -1,9 +1,24 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
// The PropSpec specifies the type of a prop and possibly a default value.
|
|
2
|
+
// Note that props are always optional when used as "input"
|
|
3
|
+
// (i.e., when creating a PartialBlock, for example by calling `insertBlocks({...})`)
|
|
4
|
+
//
|
|
5
|
+
// However, internally they're always set to `default`, unless a prop is marked optional
|
|
6
|
+
//
|
|
7
|
+
// At some point we should migrate this to zod or effect-schema
|
|
8
|
+
export type PropSpec<PType extends boolean | number | string> =
|
|
9
|
+
| {
|
|
10
|
+
// We infer the type of the prop from the default value
|
|
11
|
+
default: PType;
|
|
12
|
+
// a list of possible values, for example for a string prop (this will then be used as a string union type)
|
|
13
|
+
values?: readonly PType[];
|
|
14
|
+
}
|
|
15
|
+
| {
|
|
16
|
+
default: undefined;
|
|
17
|
+
// Because there is no default value (for an optional prop, the default value is undefined),
|
|
18
|
+
// we need to specify the type of the prop manually (we can't infer it from the default value)
|
|
19
|
+
type: "string" | "number" | "boolean";
|
|
20
|
+
values?: readonly PType[];
|
|
21
|
+
};
|
|
7
22
|
|
|
8
23
|
// Defines multiple block prop specs. The key of each prop is the name of the
|
|
9
24
|
// prop, while the value is a corresponding prop spec. This should be included
|
|
@@ -16,17 +31,25 @@ export type PropSchema = Record<string, PropSpec<boolean | number | string>>;
|
|
|
16
31
|
// each prop spec into a union type of its possible values, or a string if no
|
|
17
32
|
// values are specified.
|
|
18
33
|
export type Props<PSchema extends PropSchema> = {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
: number
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
: string
|
|
34
|
+
// for required props, get type from type of "default" value,
|
|
35
|
+
// and if values are specified, get type from values
|
|
36
|
+
[PName in keyof PSchema]: (
|
|
37
|
+
PSchema[PName] extends { default: boolean } | { type: "boolean" }
|
|
38
|
+
? PSchema[PName]["values"] extends readonly boolean[]
|
|
39
|
+
? PSchema[PName]["values"][number]
|
|
40
|
+
: boolean
|
|
41
|
+
: PSchema[PName] extends { default: number } | { type: "number" }
|
|
42
|
+
? PSchema[PName]["values"] extends readonly number[]
|
|
43
|
+
? PSchema[PName]["values"][number]
|
|
44
|
+
: number
|
|
45
|
+
: PSchema[PName] extends { default: string } | { type: "string" }
|
|
46
|
+
? PSchema[PName]["values"] extends readonly string[]
|
|
47
|
+
? PSchema[PName]["values"][number]
|
|
48
|
+
: string
|
|
49
|
+
: never
|
|
50
|
+
) extends infer T
|
|
51
|
+
? PSchema[PName] extends { optional: true }
|
|
52
|
+
? T | undefined
|
|
53
|
+
: T
|
|
31
54
|
: never;
|
|
32
55
|
};
|
|
@@ -137,6 +137,10 @@ export declare function setupTestEnv(): () => BlockNoteEditor<import("../../inde
|
|
|
137
137
|
type: "numberedListItem";
|
|
138
138
|
content: "inline";
|
|
139
139
|
propSchema: {
|
|
140
|
+
start: {
|
|
141
|
+
default: undefined;
|
|
142
|
+
type: "number";
|
|
143
|
+
};
|
|
140
144
|
backgroundColor: {
|
|
141
145
|
default: "default";
|
|
142
146
|
};
|
|
@@ -153,6 +157,10 @@ export declare function setupTestEnv(): () => BlockNoteEditor<import("../../inde
|
|
|
153
157
|
type: "numberedListItem";
|
|
154
158
|
content: "inline";
|
|
155
159
|
propSchema: {
|
|
160
|
+
start: {
|
|
161
|
+
default: undefined;
|
|
162
|
+
type: "number";
|
|
163
|
+
};
|
|
156
164
|
backgroundColor: {
|
|
157
165
|
default: "default";
|
|
158
166
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,509 @@
|
|
|
1
|
+
import { BlockNoteSchema } from "../../editor/BlockNoteSchema.js";
|
|
2
|
+
export declare const schema: BlockNoteSchema<import("../../schema/index.js").BlockSchemaFromSpecs<{
|
|
3
|
+
customParagraph: any;
|
|
4
|
+
paragraph: {
|
|
5
|
+
config: {
|
|
6
|
+
type: "paragraph";
|
|
7
|
+
content: "inline";
|
|
8
|
+
propSchema: {
|
|
9
|
+
backgroundColor: {
|
|
10
|
+
default: "default";
|
|
11
|
+
};
|
|
12
|
+
textColor: {
|
|
13
|
+
default: "default";
|
|
14
|
+
};
|
|
15
|
+
textAlignment: {
|
|
16
|
+
default: "left";
|
|
17
|
+
values: readonly ["left", "center", "right", "justify"];
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
implementation: import("../../schema/index.js").TiptapBlockImplementation<{
|
|
22
|
+
type: "paragraph";
|
|
23
|
+
content: "inline";
|
|
24
|
+
propSchema: {
|
|
25
|
+
backgroundColor: {
|
|
26
|
+
default: "default";
|
|
27
|
+
};
|
|
28
|
+
textColor: {
|
|
29
|
+
default: "default";
|
|
30
|
+
};
|
|
31
|
+
textAlignment: {
|
|
32
|
+
default: "left";
|
|
33
|
+
values: readonly ["left", "center", "right", "justify"];
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
}, any, import("../../schema/index.js").InlineContentSchema, import("../../schema/index.js").StyleSchema>;
|
|
37
|
+
};
|
|
38
|
+
heading: {
|
|
39
|
+
config: {
|
|
40
|
+
type: "heading";
|
|
41
|
+
content: "inline";
|
|
42
|
+
propSchema: {
|
|
43
|
+
level: {
|
|
44
|
+
default: number;
|
|
45
|
+
values: readonly [1, 2, 3];
|
|
46
|
+
};
|
|
47
|
+
backgroundColor: {
|
|
48
|
+
default: "default";
|
|
49
|
+
};
|
|
50
|
+
textColor: {
|
|
51
|
+
default: "default";
|
|
52
|
+
};
|
|
53
|
+
textAlignment: {
|
|
54
|
+
default: "left";
|
|
55
|
+
values: readonly ["left", "center", "right", "justify"];
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
implementation: import("../../schema/index.js").TiptapBlockImplementation<{
|
|
60
|
+
type: "heading";
|
|
61
|
+
content: "inline";
|
|
62
|
+
propSchema: {
|
|
63
|
+
level: {
|
|
64
|
+
default: number;
|
|
65
|
+
values: readonly [1, 2, 3];
|
|
66
|
+
};
|
|
67
|
+
backgroundColor: {
|
|
68
|
+
default: "default";
|
|
69
|
+
};
|
|
70
|
+
textColor: {
|
|
71
|
+
default: "default";
|
|
72
|
+
};
|
|
73
|
+
textAlignment: {
|
|
74
|
+
default: "left";
|
|
75
|
+
values: readonly ["left", "center", "right", "justify"];
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
}, any, import("../../schema/index.js").InlineContentSchema, import("../../schema/index.js").StyleSchema>;
|
|
79
|
+
};
|
|
80
|
+
codeBlock: {
|
|
81
|
+
config: {
|
|
82
|
+
type: "codeBlock";
|
|
83
|
+
content: "inline";
|
|
84
|
+
propSchema: {
|
|
85
|
+
language: {
|
|
86
|
+
default: string;
|
|
87
|
+
values: string[];
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
implementation: import("../../schema/index.js").TiptapBlockImplementation<{
|
|
92
|
+
type: "codeBlock";
|
|
93
|
+
content: "inline";
|
|
94
|
+
propSchema: {
|
|
95
|
+
language: {
|
|
96
|
+
default: string;
|
|
97
|
+
values: string[];
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
}, any, import("../../schema/index.js").InlineContentSchema, import("../../schema/index.js").StyleSchema>;
|
|
101
|
+
};
|
|
102
|
+
bulletListItem: {
|
|
103
|
+
config: {
|
|
104
|
+
type: "bulletListItem";
|
|
105
|
+
content: "inline";
|
|
106
|
+
propSchema: {
|
|
107
|
+
backgroundColor: {
|
|
108
|
+
default: "default";
|
|
109
|
+
};
|
|
110
|
+
textColor: {
|
|
111
|
+
default: "default";
|
|
112
|
+
};
|
|
113
|
+
textAlignment: {
|
|
114
|
+
default: "left";
|
|
115
|
+
values: readonly ["left", "center", "right", "justify"];
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
implementation: import("../../schema/index.js").TiptapBlockImplementation<{
|
|
120
|
+
type: "bulletListItem";
|
|
121
|
+
content: "inline";
|
|
122
|
+
propSchema: {
|
|
123
|
+
backgroundColor: {
|
|
124
|
+
default: "default";
|
|
125
|
+
};
|
|
126
|
+
textColor: {
|
|
127
|
+
default: "default";
|
|
128
|
+
};
|
|
129
|
+
textAlignment: {
|
|
130
|
+
default: "left";
|
|
131
|
+
values: readonly ["left", "center", "right", "justify"];
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
}, any, import("../../schema/index.js").InlineContentSchema, import("../../schema/index.js").StyleSchema>;
|
|
135
|
+
};
|
|
136
|
+
numberedListItem: {
|
|
137
|
+
config: {
|
|
138
|
+
type: "numberedListItem";
|
|
139
|
+
content: "inline";
|
|
140
|
+
propSchema: {
|
|
141
|
+
start: {
|
|
142
|
+
default: undefined;
|
|
143
|
+
type: "number";
|
|
144
|
+
};
|
|
145
|
+
backgroundColor: {
|
|
146
|
+
default: "default";
|
|
147
|
+
};
|
|
148
|
+
textColor: {
|
|
149
|
+
default: "default";
|
|
150
|
+
};
|
|
151
|
+
textAlignment: {
|
|
152
|
+
default: "left";
|
|
153
|
+
values: readonly ["left", "center", "right", "justify"];
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
implementation: import("../../schema/index.js").TiptapBlockImplementation<{
|
|
158
|
+
type: "numberedListItem";
|
|
159
|
+
content: "inline";
|
|
160
|
+
propSchema: {
|
|
161
|
+
start: {
|
|
162
|
+
default: undefined;
|
|
163
|
+
type: "number";
|
|
164
|
+
};
|
|
165
|
+
backgroundColor: {
|
|
166
|
+
default: "default";
|
|
167
|
+
};
|
|
168
|
+
textColor: {
|
|
169
|
+
default: "default";
|
|
170
|
+
};
|
|
171
|
+
textAlignment: {
|
|
172
|
+
default: "left";
|
|
173
|
+
values: readonly ["left", "center", "right", "justify"];
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
}, any, import("../../schema/index.js").InlineContentSchema, import("../../schema/index.js").StyleSchema>;
|
|
177
|
+
};
|
|
178
|
+
checkListItem: {
|
|
179
|
+
config: {
|
|
180
|
+
type: "checkListItem";
|
|
181
|
+
content: "inline";
|
|
182
|
+
propSchema: {
|
|
183
|
+
checked: {
|
|
184
|
+
default: false;
|
|
185
|
+
};
|
|
186
|
+
backgroundColor: {
|
|
187
|
+
default: "default";
|
|
188
|
+
};
|
|
189
|
+
textColor: {
|
|
190
|
+
default: "default";
|
|
191
|
+
};
|
|
192
|
+
textAlignment: {
|
|
193
|
+
default: "left";
|
|
194
|
+
values: readonly ["left", "center", "right", "justify"];
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
};
|
|
198
|
+
implementation: import("../../schema/index.js").TiptapBlockImplementation<{
|
|
199
|
+
type: "checkListItem";
|
|
200
|
+
content: "inline";
|
|
201
|
+
propSchema: {
|
|
202
|
+
checked: {
|
|
203
|
+
default: false;
|
|
204
|
+
};
|
|
205
|
+
backgroundColor: {
|
|
206
|
+
default: "default";
|
|
207
|
+
};
|
|
208
|
+
textColor: {
|
|
209
|
+
default: "default";
|
|
210
|
+
};
|
|
211
|
+
textAlignment: {
|
|
212
|
+
default: "left";
|
|
213
|
+
values: readonly ["left", "center", "right", "justify"];
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
}, any, import("../../schema/index.js").InlineContentSchema, import("../../schema/index.js").StyleSchema>;
|
|
217
|
+
};
|
|
218
|
+
table: {
|
|
219
|
+
config: {
|
|
220
|
+
type: "table";
|
|
221
|
+
content: "table";
|
|
222
|
+
propSchema: {
|
|
223
|
+
textColor: {
|
|
224
|
+
default: "default";
|
|
225
|
+
};
|
|
226
|
+
};
|
|
227
|
+
};
|
|
228
|
+
implementation: import("../../schema/index.js").TiptapBlockImplementation<{
|
|
229
|
+
type: "table";
|
|
230
|
+
content: "table";
|
|
231
|
+
propSchema: {
|
|
232
|
+
textColor: {
|
|
233
|
+
default: "default";
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
}, any, import("../../schema/index.js").InlineContentSchema, import("../../schema/index.js").StyleSchema>;
|
|
237
|
+
};
|
|
238
|
+
file: {
|
|
239
|
+
config: {
|
|
240
|
+
type: "file";
|
|
241
|
+
propSchema: {
|
|
242
|
+
backgroundColor: {
|
|
243
|
+
default: "default";
|
|
244
|
+
};
|
|
245
|
+
name: {
|
|
246
|
+
default: "";
|
|
247
|
+
};
|
|
248
|
+
url: {
|
|
249
|
+
default: "";
|
|
250
|
+
};
|
|
251
|
+
caption: {
|
|
252
|
+
default: "";
|
|
253
|
+
};
|
|
254
|
+
};
|
|
255
|
+
content: "none";
|
|
256
|
+
isFileBlock: true;
|
|
257
|
+
};
|
|
258
|
+
implementation: import("../../schema/index.js").TiptapBlockImplementation<{
|
|
259
|
+
type: "file";
|
|
260
|
+
propSchema: {
|
|
261
|
+
backgroundColor: {
|
|
262
|
+
default: "default";
|
|
263
|
+
};
|
|
264
|
+
name: {
|
|
265
|
+
default: "";
|
|
266
|
+
};
|
|
267
|
+
url: {
|
|
268
|
+
default: "";
|
|
269
|
+
};
|
|
270
|
+
caption: {
|
|
271
|
+
default: "";
|
|
272
|
+
};
|
|
273
|
+
};
|
|
274
|
+
content: "none";
|
|
275
|
+
isFileBlock: true;
|
|
276
|
+
}, any, import("../../schema/index.js").InlineContentSchema, import("../../schema/index.js").StyleSchema>;
|
|
277
|
+
};
|
|
278
|
+
image: {
|
|
279
|
+
config: {
|
|
280
|
+
type: "image";
|
|
281
|
+
propSchema: {
|
|
282
|
+
textAlignment: {
|
|
283
|
+
default: "left";
|
|
284
|
+
values: readonly ["left", "center", "right", "justify"];
|
|
285
|
+
};
|
|
286
|
+
backgroundColor: {
|
|
287
|
+
default: "default";
|
|
288
|
+
};
|
|
289
|
+
name: {
|
|
290
|
+
default: "";
|
|
291
|
+
};
|
|
292
|
+
url: {
|
|
293
|
+
default: "";
|
|
294
|
+
};
|
|
295
|
+
caption: {
|
|
296
|
+
default: "";
|
|
297
|
+
};
|
|
298
|
+
showPreview: {
|
|
299
|
+
default: true;
|
|
300
|
+
};
|
|
301
|
+
previewWidth: {
|
|
302
|
+
default: number;
|
|
303
|
+
};
|
|
304
|
+
};
|
|
305
|
+
content: "none";
|
|
306
|
+
isFileBlock: true;
|
|
307
|
+
fileBlockAccept: string[];
|
|
308
|
+
};
|
|
309
|
+
implementation: import("../../schema/index.js").TiptapBlockImplementation<{
|
|
310
|
+
type: "image";
|
|
311
|
+
propSchema: {
|
|
312
|
+
textAlignment: {
|
|
313
|
+
default: "left";
|
|
314
|
+
values: readonly ["left", "center", "right", "justify"];
|
|
315
|
+
};
|
|
316
|
+
backgroundColor: {
|
|
317
|
+
default: "default";
|
|
318
|
+
};
|
|
319
|
+
name: {
|
|
320
|
+
default: "";
|
|
321
|
+
};
|
|
322
|
+
url: {
|
|
323
|
+
default: "";
|
|
324
|
+
};
|
|
325
|
+
caption: {
|
|
326
|
+
default: "";
|
|
327
|
+
};
|
|
328
|
+
showPreview: {
|
|
329
|
+
default: true;
|
|
330
|
+
};
|
|
331
|
+
previewWidth: {
|
|
332
|
+
default: number;
|
|
333
|
+
};
|
|
334
|
+
};
|
|
335
|
+
content: "none";
|
|
336
|
+
isFileBlock: true;
|
|
337
|
+
fileBlockAccept: string[];
|
|
338
|
+
}, any, import("../../schema/index.js").InlineContentSchema, import("../../schema/index.js").StyleSchema>;
|
|
339
|
+
};
|
|
340
|
+
video: {
|
|
341
|
+
config: {
|
|
342
|
+
type: "video";
|
|
343
|
+
propSchema: {
|
|
344
|
+
textAlignment: {
|
|
345
|
+
default: "left";
|
|
346
|
+
values: readonly ["left", "center", "right", "justify"];
|
|
347
|
+
};
|
|
348
|
+
backgroundColor: {
|
|
349
|
+
default: "default";
|
|
350
|
+
};
|
|
351
|
+
name: {
|
|
352
|
+
default: "";
|
|
353
|
+
};
|
|
354
|
+
url: {
|
|
355
|
+
default: "";
|
|
356
|
+
};
|
|
357
|
+
caption: {
|
|
358
|
+
default: "";
|
|
359
|
+
};
|
|
360
|
+
showPreview: {
|
|
361
|
+
default: true;
|
|
362
|
+
};
|
|
363
|
+
previewWidth: {
|
|
364
|
+
default: number;
|
|
365
|
+
};
|
|
366
|
+
};
|
|
367
|
+
content: "none";
|
|
368
|
+
isFileBlock: true;
|
|
369
|
+
fileBlockAccept: string[];
|
|
370
|
+
};
|
|
371
|
+
implementation: import("../../schema/index.js").TiptapBlockImplementation<{
|
|
372
|
+
type: "video";
|
|
373
|
+
propSchema: {
|
|
374
|
+
textAlignment: {
|
|
375
|
+
default: "left";
|
|
376
|
+
values: readonly ["left", "center", "right", "justify"];
|
|
377
|
+
};
|
|
378
|
+
backgroundColor: {
|
|
379
|
+
default: "default";
|
|
380
|
+
};
|
|
381
|
+
name: {
|
|
382
|
+
default: "";
|
|
383
|
+
};
|
|
384
|
+
url: {
|
|
385
|
+
default: "";
|
|
386
|
+
};
|
|
387
|
+
caption: {
|
|
388
|
+
default: "";
|
|
389
|
+
};
|
|
390
|
+
showPreview: {
|
|
391
|
+
default: true;
|
|
392
|
+
};
|
|
393
|
+
previewWidth: {
|
|
394
|
+
default: number;
|
|
395
|
+
};
|
|
396
|
+
};
|
|
397
|
+
content: "none";
|
|
398
|
+
isFileBlock: true;
|
|
399
|
+
fileBlockAccept: string[];
|
|
400
|
+
}, any, import("../../schema/index.js").InlineContentSchema, import("../../schema/index.js").StyleSchema>;
|
|
401
|
+
};
|
|
402
|
+
audio: {
|
|
403
|
+
config: {
|
|
404
|
+
type: "audio";
|
|
405
|
+
propSchema: {
|
|
406
|
+
backgroundColor: {
|
|
407
|
+
default: "default";
|
|
408
|
+
};
|
|
409
|
+
name: {
|
|
410
|
+
default: "";
|
|
411
|
+
};
|
|
412
|
+
url: {
|
|
413
|
+
default: "";
|
|
414
|
+
};
|
|
415
|
+
caption: {
|
|
416
|
+
default: "";
|
|
417
|
+
};
|
|
418
|
+
showPreview: {
|
|
419
|
+
default: true;
|
|
420
|
+
};
|
|
421
|
+
};
|
|
422
|
+
content: "none";
|
|
423
|
+
isFileBlock: true;
|
|
424
|
+
fileBlockAccept: string[];
|
|
425
|
+
};
|
|
426
|
+
implementation: import("../../schema/index.js").TiptapBlockImplementation<{
|
|
427
|
+
type: "audio";
|
|
428
|
+
propSchema: {
|
|
429
|
+
backgroundColor: {
|
|
430
|
+
default: "default";
|
|
431
|
+
};
|
|
432
|
+
name: {
|
|
433
|
+
default: "";
|
|
434
|
+
};
|
|
435
|
+
url: {
|
|
436
|
+
default: "";
|
|
437
|
+
};
|
|
438
|
+
caption: {
|
|
439
|
+
default: "";
|
|
440
|
+
};
|
|
441
|
+
showPreview: {
|
|
442
|
+
default: true;
|
|
443
|
+
};
|
|
444
|
+
};
|
|
445
|
+
content: "none";
|
|
446
|
+
isFileBlock: true;
|
|
447
|
+
fileBlockAccept: string[];
|
|
448
|
+
}, any, import("../../schema/index.js").InlineContentSchema, import("../../schema/index.js").StyleSchema>;
|
|
449
|
+
};
|
|
450
|
+
}>, import("../../schema/index.js").InlineContentSchemaFromSpecs<{
|
|
451
|
+
text: {
|
|
452
|
+
config: "text";
|
|
453
|
+
implementation: any;
|
|
454
|
+
};
|
|
455
|
+
link: {
|
|
456
|
+
config: "link";
|
|
457
|
+
implementation: any;
|
|
458
|
+
};
|
|
459
|
+
}>, import("../../schema/index.js").StyleSchemaFromSpecs<{
|
|
460
|
+
bold: {
|
|
461
|
+
config: {
|
|
462
|
+
type: string;
|
|
463
|
+
propSchema: "boolean";
|
|
464
|
+
};
|
|
465
|
+
implementation: import("../../schema/index.js").StyleImplementation;
|
|
466
|
+
};
|
|
467
|
+
italic: {
|
|
468
|
+
config: {
|
|
469
|
+
type: string;
|
|
470
|
+
propSchema: "boolean";
|
|
471
|
+
};
|
|
472
|
+
implementation: import("../../schema/index.js").StyleImplementation;
|
|
473
|
+
};
|
|
474
|
+
underline: {
|
|
475
|
+
config: {
|
|
476
|
+
type: string;
|
|
477
|
+
propSchema: "boolean";
|
|
478
|
+
};
|
|
479
|
+
implementation: import("../../schema/index.js").StyleImplementation;
|
|
480
|
+
};
|
|
481
|
+
strike: {
|
|
482
|
+
config: {
|
|
483
|
+
type: string;
|
|
484
|
+
propSchema: "boolean";
|
|
485
|
+
};
|
|
486
|
+
implementation: import("../../schema/index.js").StyleImplementation;
|
|
487
|
+
};
|
|
488
|
+
code: {
|
|
489
|
+
config: {
|
|
490
|
+
type: string;
|
|
491
|
+
propSchema: "boolean";
|
|
492
|
+
};
|
|
493
|
+
implementation: import("../../schema/index.js").StyleImplementation;
|
|
494
|
+
};
|
|
495
|
+
textColor: {
|
|
496
|
+
config: {
|
|
497
|
+
type: string;
|
|
498
|
+
propSchema: "string";
|
|
499
|
+
};
|
|
500
|
+
implementation: import("../../schema/index.js").StyleImplementation;
|
|
501
|
+
};
|
|
502
|
+
backgroundColor: {
|
|
503
|
+
config: {
|
|
504
|
+
type: string;
|
|
505
|
+
propSchema: "string";
|
|
506
|
+
};
|
|
507
|
+
implementation: import("../../schema/index.js").StyleImplementation;
|
|
508
|
+
};
|
|
509
|
+
}>>;
|
|
@@ -265,6 +265,10 @@ declare const schema: BlockNoteSchema<import("../../../schema/index.js").BlockSc
|
|
|
265
265
|
type: "numberedListItem";
|
|
266
266
|
content: "inline";
|
|
267
267
|
propSchema: {
|
|
268
|
+
start: {
|
|
269
|
+
default: undefined;
|
|
270
|
+
type: "number";
|
|
271
|
+
};
|
|
268
272
|
backgroundColor: {
|
|
269
273
|
default: "default";
|
|
270
274
|
};
|
|
@@ -281,6 +285,10 @@ declare const schema: BlockNoteSchema<import("../../../schema/index.js").BlockSc
|
|
|
281
285
|
type: "numberedListItem";
|
|
282
286
|
content: "inline";
|
|
283
287
|
propSchema: {
|
|
288
|
+
start: {
|
|
289
|
+
default: undefined;
|
|
290
|
+
type: "number";
|
|
291
|
+
};
|
|
284
292
|
backgroundColor: {
|
|
285
293
|
default: "default";
|
|
286
294
|
};
|