@blocknote/core 0.38.0 → 0.39.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/BlockNoteSchema-DmZ6UQfY.cjs +11 -0
- package/dist/BlockNoteSchema-DmZ6UQfY.cjs.map +1 -0
- package/dist/BlockNoteSchema-oR047ACf.js +4275 -0
- package/dist/BlockNoteSchema-oR047ACf.js.map +1 -0
- package/dist/blocknote.cjs +4 -12
- package/dist/blocknote.cjs.map +1 -1
- package/dist/blocknote.js +3296 -7187
- package/dist/blocknote.js.map +1 -1
- package/dist/blocks.cjs +2 -0
- package/dist/blocks.cjs.map +1 -0
- package/dist/blocks.js +71 -0
- package/dist/blocks.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +19 -16
- package/src/api/blockManipulation/commands/insertBlocks/insertBlocks.ts +1 -1
- package/src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.ts +2 -2
- package/src/api/blockManipulation/commands/splitBlock/splitBlock.ts +34 -25
- package/src/api/blockManipulation/setupTestEnv.ts +0 -1
- package/src/api/clipboard/fromClipboard/handleFileInsertion.ts +4 -8
- package/src/api/clipboard/toClipboard/copyExtension.ts +1 -1
- package/src/api/exporters/html/util/serializeBlocksExternalHTML.ts +128 -28
- package/src/api/exporters/html/util/serializeBlocksInternalHTML.ts +101 -41
- package/src/api/pmUtil.ts +1 -1
- package/src/api/positionMapping.test.ts +58 -15
- package/src/api/positionMapping.ts +2 -4
- package/src/blocks/Audio/block.ts +174 -0
- package/src/blocks/BlockNoteSchema.ts +59 -0
- package/src/blocks/Code/block.ts +303 -0
- package/src/blocks/Code/shiki.ts +73 -0
- package/src/blocks/File/block.ts +98 -0
- package/src/blocks/{FileBlockContent → File}/helpers/render/createAddFileButton.ts +5 -2
- package/src/blocks/{FileBlockContent → File}/helpers/render/createFileBlockWrapper.ts +15 -6
- package/src/blocks/{FileBlockContent → File}/helpers/render/createFileNameWithIcon.ts +15 -2
- package/src/blocks/{FileBlockContent → File}/helpers/render/createResizableFileBlockWrapper.ts +21 -2
- package/src/blocks/Heading/block.ts +138 -0
- package/src/blocks/Image/block.ts +190 -0
- package/src/blocks/ListItem/BulletListItem/block.ts +116 -0
- package/src/blocks/ListItem/CheckListItem/block.ts +175 -0
- package/src/blocks/ListItem/NumberedListItem/IndexingPlugin.ts +173 -0
- package/src/blocks/ListItem/NumberedListItem/block.ts +133 -0
- package/src/blocks/ListItem/ToggleListItem/block.ts +78 -0
- package/src/blocks/PageBreak/block.ts +72 -0
- package/src/blocks/{PageBreakBlockContent → PageBreak}/getPageBreakSlashMenuItems.ts +9 -7
- package/src/blocks/Paragraph/block.ts +80 -0
- package/src/blocks/Quote/block.ts +90 -0
- package/src/blocks/{TableBlockContent/TableBlockContent.ts → Table/block.ts} +169 -51
- package/src/blocks/ToggleWrapper/createToggleWrapper.ts +1 -1
- package/src/blocks/Video/block.ts +143 -0
- package/src/blocks/defaultBlockHelpers.ts +2 -2
- package/src/blocks/defaultBlockTypeGuards.ts +143 -174
- package/src/blocks/defaultBlocks.ts +107 -35
- package/src/blocks/defaultProps.ts +145 -4
- package/src/blocks/index.ts +26 -0
- package/src/blocks/utils/listItemEnterHandler.ts +42 -0
- package/src/editor/Block.css +54 -18
- package/src/editor/BlockNoteEditor.ts +251 -210
- package/src/editor/BlockNoteExtension.ts +92 -0
- package/src/editor/BlockNoteExtensions.ts +18 -17
- package/src/editor/defaultColors.ts +2 -2
- package/src/exporter/Exporter.ts +1 -1
- package/src/exporter/mapping.ts +1 -1
- package/src/extensions/BackgroundColor/BackgroundColorExtension.ts +3 -20
- package/src/extensions/BackgroundColor/BackgroundColorMark.ts +6 -8
- package/src/extensions/BlockChange/BlockChangePlugin.ts +2 -1
- package/src/extensions/Collaboration/__snapshots__/fork-yjs-snap-editor-forked.json +2 -2
- package/src/extensions/Collaboration/__snapshots__/fork-yjs-snap-editor.json +2 -2
- package/src/extensions/Collaboration/__snapshots__/fork-yjs-snap-forked.html +1 -1
- package/src/extensions/Collaboration/__snapshots__/fork-yjs-snap.html +1 -1
- package/src/extensions/Collaboration/schemaMigration/SchemaMigrationPlugin.ts +52 -0
- package/src/extensions/Collaboration/schemaMigration/migrationRules/index.ts +4 -0
- package/src/extensions/Collaboration/schemaMigration/migrationRules/migrationRule.ts +4 -0
- package/src/extensions/Collaboration/schemaMigration/migrationRules/moveColorAttributes.ts +78 -0
- package/src/extensions/Comments/CommentsPlugin.ts +1 -1
- package/src/extensions/FilePanel/FilePanelPlugin.ts +5 -10
- package/src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts +1 -1
- package/src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts +4 -3
- package/src/extensions/Placeholder/PlaceholderPlugin.ts +2 -2
- package/src/extensions/PreviousBlockType/PreviousBlockTypePlugin.ts +1 -23
- package/src/extensions/SuggestionMenu/SuggestionPlugin.ts +0 -5
- package/src/extensions/SuggestionMenu/getDefaultEmojiPickerItems.ts +6 -2
- package/src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts +24 -17
- package/src/extensions/TableHandles/TableHandlesPlugin.ts +2 -2
- package/src/extensions/TextAlignment/TextAlignmentExtension.ts +5 -11
- package/src/extensions/TextColor/TextColorExtension.ts +3 -17
- package/src/extensions/TextColor/TextColorMark.ts +4 -9
- package/src/extensions/UniqueID/UniqueID.ts +6 -13
- package/src/index.ts +2 -28
- package/src/schema/blocks/createSpec.ts +342 -169
- package/src/schema/blocks/internal.ts +77 -138
- package/src/schema/blocks/types.ts +264 -94
- package/src/schema/index.ts +1 -0
- package/src/schema/inlineContent/createSpec.ts +99 -21
- package/src/schema/inlineContent/internal.ts +16 -7
- package/src/schema/inlineContent/types.ts +24 -2
- package/src/schema/propTypes.ts +15 -9
- package/src/schema/schema.ts +209 -0
- package/src/schema/styles/createSpec.ts +79 -31
- package/src/schema/styles/internal.ts +61 -2
- package/src/schema/styles/types.ts +17 -3
- package/src/util/topo-sort.test.ts +125 -0
- package/src/util/topo-sort.ts +160 -0
- package/types/src/api/blockManipulation/commands/splitBlock/splitBlock.d.ts +2 -1
- package/types/src/api/blockManipulation/selections/selection.d.ts +1 -1
- package/types/src/api/blockManipulation/setupTestEnv.d.ts +29 -543
- package/types/src/api/exporters/html/util/serializeBlocksExternalHTML.d.ts +1 -1
- package/types/src/api/exporters/html/util/serializeBlocksInternalHTML.d.ts +1 -1
- package/types/src/api/pmUtil.d.ts +1 -1
- package/types/src/blocks/Audio/block.d.ts +58 -0
- package/types/src/blocks/BlockNoteSchema.d.ts +18 -0
- package/types/src/blocks/{CodeBlockContent/CodeBlockContent.d.ts → Code/block.d.ts} +25 -26
- package/types/src/blocks/Code/shiki.d.ts +4 -0
- package/types/src/blocks/File/block.d.ts +37 -0
- package/types/src/blocks/File/helpers/render/createAddFileButton.d.ts +6 -0
- package/types/src/blocks/File/helpers/render/createFileBlockWrapper.d.ts +25 -0
- package/types/src/blocks/{FileBlockContent → File}/helpers/render/createFileNameWithIcon.d.ts +6 -2
- package/types/src/blocks/File/helpers/render/createResizableFileBlockWrapper.d.ts +31 -0
- package/types/src/blocks/Heading/block.d.ts +71 -0
- package/types/src/blocks/Image/block.d.ts +102 -0
- package/types/src/blocks/ListItem/BulletListItem/block.d.ts +25 -0
- package/types/src/blocks/ListItem/CheckListItem/block.d.ts +33 -0
- package/types/src/blocks/ListItem/NumberedListItem/IndexingPlugin.d.ts +8 -0
- package/types/src/blocks/ListItem/NumberedListItem/block.d.ts +33 -0
- package/types/src/blocks/ListItem/ToggleListItem/block.d.ts +25 -0
- package/types/src/blocks/PageBreak/block.d.ts +11 -0
- package/types/src/blocks/{PageBreakBlockContent → PageBreak}/getPageBreakSlashMenuItems.d.ts +4 -2
- package/types/src/blocks/Paragraph/block.d.ts +25 -0
- package/types/src/blocks/Quote/block.d.ts +17 -0
- package/types/src/blocks/Table/block.d.ts +21 -0
- package/types/src/blocks/Video/block.d.ts +67 -0
- package/types/src/blocks/defaultBlockHelpers.d.ts +1 -1
- package/types/src/blocks/defaultBlockTypeGuards.d.ts +15 -36
- package/types/src/blocks/defaultBlocks.d.ts +221 -1060
- package/types/src/blocks/defaultProps.d.ts +17 -1
- package/types/src/blocks/index.d.ts +24 -0
- package/types/src/blocks/utils/listItemEnterHandler.d.ts +2 -0
- package/types/src/editor/BlockNoteEditor.d.ts +33 -66
- package/types/src/editor/BlockNoteExtension.d.ts +67 -0
- package/types/src/editor/BlockNoteExtensions.d.ts +1 -1
- package/types/src/editor/defaultColors.d.ts +8 -76
- package/types/src/exporter/Exporter.d.ts +1 -1
- package/types/src/exporter/mapping.d.ts +1 -1
- package/types/src/extensions/BackgroundColor/BackgroundColorMark.d.ts +4 -1
- package/types/src/extensions/Collaboration/schemaMigration/SchemaMigrationPlugin.d.ts +7 -0
- package/types/src/extensions/Collaboration/schemaMigration/migrationRules/index.d.ts +3 -0
- package/types/src/extensions/Collaboration/schemaMigration/migrationRules/migrationRule.d.ts +3 -0
- package/types/src/extensions/Collaboration/schemaMigration/migrationRules/moveColorAttributes.d.ts +2 -0
- package/types/src/extensions/Comments/CommentsPlugin.d.ts +1 -1
- package/types/src/extensions/FilePanel/FilePanelPlugin.d.ts +4 -4
- package/types/src/extensions/TextColor/TextColorMark.d.ts +4 -1
- package/types/src/index.d.ts +2 -25
- package/types/src/schema/blocks/createSpec.d.ts +16 -36
- package/types/src/schema/blocks/internal.d.ts +11 -33
- package/types/src/schema/blocks/types.d.ts +181 -57
- package/types/src/schema/index.d.ts +1 -0
- package/types/src/schema/inlineContent/createSpec.d.ts +36 -2
- package/types/src/schema/inlineContent/internal.d.ts +7 -15
- package/types/src/schema/inlineContent/types.d.ts +15 -1
- package/types/src/schema/propTypes.d.ts +4 -4
- package/types/src/schema/schema.d.ts +40 -0
- package/types/src/schema/styles/createSpec.d.ts +6 -4
- package/types/src/schema/styles/internal.d.ts +6 -3
- package/types/src/schema/styles/types.d.ts +11 -2
- package/types/src/util/topo-sort.d.ts +18 -0
- package/types/src/util/topo-sort.test.d.ts +1 -0
- package/src/blocks/AudioBlockContent/AudioBlockContent.ts +0 -144
- package/src/blocks/CodeBlockContent/CodeBlockContent.ts +0 -445
- package/src/blocks/FileBlockContent/FileBlockContent.ts +0 -100
- package/src/blocks/HeadingBlockContent/HeadingBlockContent.ts +0 -159
- package/src/blocks/ImageBlockContent/ImageBlockContent.ts +0 -159
- package/src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.ts +0 -134
- package/src/blocks/ListItemBlockContent/CheckListItemBlockContent/CheckListItemBlockContent.ts +0 -299
- package/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListIndexingPlugin.ts +0 -86
- package/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.ts +0 -172
- package/src/blocks/ListItemBlockContent/ToggleListItemBlockContent/ToggleListItemBlockContent.ts +0 -104
- package/src/blocks/PageBreakBlockContent/PageBreakBlockContent.ts +0 -49
- package/src/blocks/PageBreakBlockContent/schema.ts +0 -40
- package/src/blocks/ParagraphBlockContent/ParagraphBlockContent.ts +0 -78
- package/src/blocks/QuoteBlockContent/QuoteBlockContent.ts +0 -121
- package/src/blocks/VideoBlockContent/VideoBlockContent.ts +0 -158
- package/src/editor/BlockNoteSchema.ts +0 -107
- package/src/editor/BlockNoteTipTapEditor.ts +0 -335
- package/types/src/blocks/AudioBlockContent/AudioBlockContent.d.ts +0 -99
- package/types/src/blocks/FileBlockContent/FileBlockContent.d.ts +0 -90
- package/types/src/blocks/FileBlockContent/helpers/render/createAddFileButton.d.ts +0 -6
- package/types/src/blocks/FileBlockContent/helpers/render/createFileBlockWrapper.d.ts +0 -9
- package/types/src/blocks/FileBlockContent/helpers/render/createResizableFileBlockWrapper.d.ts +0 -9
- package/types/src/blocks/HeadingBlockContent/HeadingBlockContent.d.ts +0 -67
- package/types/src/blocks/ImageBlockContent/ImageBlockContent.d.ts +0 -131
- package/types/src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.d.ts +0 -46
- package/types/src/blocks/ListItemBlockContent/CheckListItemBlockContent/CheckListItemBlockContent.d.ts +0 -55
- package/types/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListIndexingPlugin.d.ts +0 -2
- package/types/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.d.ts +0 -58
- package/types/src/blocks/ListItemBlockContent/ToggleListItemBlockContent/ToggleListItemBlockContent.d.ts +0 -46
- package/types/src/blocks/PageBreakBlockContent/PageBreakBlockContent.d.ts +0 -31
- package/types/src/blocks/PageBreakBlockContent/schema.d.ts +0 -86
- package/types/src/blocks/ParagraphBlockContent/ParagraphBlockContent.d.ts +0 -52
- package/types/src/blocks/QuoteBlockContent/QuoteBlockContent.d.ts +0 -52
- package/types/src/blocks/TableBlockContent/TableBlockContent.d.ts +0 -39
- package/types/src/blocks/VideoBlockContent/VideoBlockContent.d.ts +0 -131
- package/types/src/editor/BlockNoteSchema.d.ts +0 -34
- package/types/src/editor/BlockNoteTipTapEditor.d.ts +0 -43
- /package/src/blocks/{AudioBlockContent → Audio}/parseAudioElement.ts +0 -0
- /package/src/blocks/{FileBlockContent → File}/helpers/parse/parseEmbedElement.ts +0 -0
- /package/src/blocks/{FileBlockContent → File}/helpers/parse/parseFigureElement.ts +0 -0
- /package/src/blocks/{FileBlockContent → File}/helpers/toExternalHTML/createFigureWithCaption.ts +0 -0
- /package/src/blocks/{FileBlockContent → File}/helpers/toExternalHTML/createLinkWithCaption.ts +0 -0
- /package/src/blocks/{FileBlockContent → File/helpers}/uploadToTmpFilesDotOrg_DEV_ONLY.ts +0 -0
- /package/src/blocks/{ImageBlockContent → Image}/parseImageElement.ts +0 -0
- /package/src/blocks/{ListItemBlockContent → ListItem}/ListItemKeyboardShortcuts.ts +0 -0
- /package/src/blocks/{ListItemBlockContent → ListItem}/getListItemContent.ts +0 -0
- /package/src/blocks/{TableBlockContent → Table}/TableExtension.ts +0 -0
- /package/src/blocks/{VideoBlockContent → Video}/parseVideoElement.ts +0 -0
- /package/types/src/blocks/{AudioBlockContent → Audio}/parseAudioElement.d.ts +0 -0
- /package/types/src/blocks/{FileBlockContent → File}/helpers/parse/parseEmbedElement.d.ts +0 -0
- /package/types/src/blocks/{FileBlockContent → File}/helpers/parse/parseFigureElement.d.ts +0 -0
- /package/types/src/blocks/{FileBlockContent → File}/helpers/toExternalHTML/createFigureWithCaption.d.ts +0 -0
- /package/types/src/blocks/{FileBlockContent → File}/helpers/toExternalHTML/createLinkWithCaption.d.ts +0 -0
- /package/types/src/blocks/{FileBlockContent → File/helpers}/uploadToTmpFilesDotOrg_DEV_ONLY.d.ts +0 -0
- /package/types/src/blocks/{ImageBlockContent → Image}/parseImageElement.d.ts +0 -0
- /package/types/src/blocks/{ListItemBlockContent → ListItem}/ListItemKeyboardShortcuts.d.ts +0 -0
- /package/types/src/blocks/{ListItemBlockContent → ListItem}/getListItemContent.d.ts +0 -0
- /package/types/src/blocks/{TableBlockContent → Table}/TableExtension.d.ts +0 -0
- /package/types/src/blocks/{VideoBlockContent → Video}/parseVideoElement.d.ts +0 -0
|
@@ -1,528 +1,5 @@
|
|
|
1
1
|
import { BlockNoteEditor } from "../../editor/BlockNoteEditor.js";
|
|
2
|
-
export declare function setupTestEnv(): () => BlockNoteEditor<import("../../index.js").
|
|
3
|
-
paragraph: {
|
|
4
|
-
config: {
|
|
5
|
-
type: "paragraph";
|
|
6
|
-
content: "inline";
|
|
7
|
-
propSchema: {
|
|
8
|
-
backgroundColor: {
|
|
9
|
-
default: "default";
|
|
10
|
-
};
|
|
11
|
-
textColor: {
|
|
12
|
-
default: "default";
|
|
13
|
-
};
|
|
14
|
-
textAlignment: {
|
|
15
|
-
default: "left";
|
|
16
|
-
values: readonly ["left", "center", "right", "justify"];
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
implementation: import("../../index.js").TiptapBlockImplementation<{
|
|
21
|
-
type: "paragraph";
|
|
22
|
-
content: "inline";
|
|
23
|
-
propSchema: {
|
|
24
|
-
backgroundColor: {
|
|
25
|
-
default: "default";
|
|
26
|
-
};
|
|
27
|
-
textColor: {
|
|
28
|
-
default: "default";
|
|
29
|
-
};
|
|
30
|
-
textAlignment: {
|
|
31
|
-
default: "left";
|
|
32
|
-
values: readonly ["left", "center", "right", "justify"];
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
}, any, import("../../index.js").InlineContentSchema, import("../../index.js").StyleSchema>;
|
|
36
|
-
};
|
|
37
|
-
heading: {
|
|
38
|
-
config: {
|
|
39
|
-
type: "heading";
|
|
40
|
-
content: "inline";
|
|
41
|
-
propSchema: {
|
|
42
|
-
level: {
|
|
43
|
-
default: number;
|
|
44
|
-
values: readonly [1, 2, 3, 4, 5, 6];
|
|
45
|
-
};
|
|
46
|
-
isToggleable: {
|
|
47
|
-
default: false;
|
|
48
|
-
};
|
|
49
|
-
backgroundColor: {
|
|
50
|
-
default: "default";
|
|
51
|
-
};
|
|
52
|
-
textColor: {
|
|
53
|
-
default: "default";
|
|
54
|
-
};
|
|
55
|
-
textAlignment: {
|
|
56
|
-
default: "left";
|
|
57
|
-
values: readonly ["left", "center", "right", "justify"];
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
implementation: import("../../index.js").TiptapBlockImplementation<{
|
|
62
|
-
type: "heading";
|
|
63
|
-
content: "inline";
|
|
64
|
-
propSchema: {
|
|
65
|
-
level: {
|
|
66
|
-
default: number;
|
|
67
|
-
values: readonly [1, 2, 3, 4, 5, 6];
|
|
68
|
-
};
|
|
69
|
-
isToggleable: {
|
|
70
|
-
default: false;
|
|
71
|
-
};
|
|
72
|
-
backgroundColor: {
|
|
73
|
-
default: "default";
|
|
74
|
-
};
|
|
75
|
-
textColor: {
|
|
76
|
-
default: "default";
|
|
77
|
-
};
|
|
78
|
-
textAlignment: {
|
|
79
|
-
default: "left";
|
|
80
|
-
values: readonly ["left", "center", "right", "justify"];
|
|
81
|
-
};
|
|
82
|
-
};
|
|
83
|
-
}, any, import("../../index.js").InlineContentSchema, import("../../index.js").StyleSchema>;
|
|
84
|
-
};
|
|
85
|
-
quote: {
|
|
86
|
-
config: {
|
|
87
|
-
type: "quote";
|
|
88
|
-
content: "inline";
|
|
89
|
-
propSchema: {
|
|
90
|
-
backgroundColor: {
|
|
91
|
-
default: "default";
|
|
92
|
-
};
|
|
93
|
-
textColor: {
|
|
94
|
-
default: "default";
|
|
95
|
-
};
|
|
96
|
-
textAlignment: {
|
|
97
|
-
default: "left";
|
|
98
|
-
values: readonly ["left", "center", "right", "justify"];
|
|
99
|
-
};
|
|
100
|
-
};
|
|
101
|
-
};
|
|
102
|
-
implementation: import("../../index.js").TiptapBlockImplementation<{
|
|
103
|
-
type: "quote";
|
|
104
|
-
content: "inline";
|
|
105
|
-
propSchema: {
|
|
106
|
-
backgroundColor: {
|
|
107
|
-
default: "default";
|
|
108
|
-
};
|
|
109
|
-
textColor: {
|
|
110
|
-
default: "default";
|
|
111
|
-
};
|
|
112
|
-
textAlignment: {
|
|
113
|
-
default: "left";
|
|
114
|
-
values: readonly ["left", "center", "right", "justify"];
|
|
115
|
-
};
|
|
116
|
-
};
|
|
117
|
-
}, any, import("../../index.js").InlineContentSchema, import("../../index.js").StyleSchema>;
|
|
118
|
-
};
|
|
119
|
-
codeBlock: {
|
|
120
|
-
config: {
|
|
121
|
-
type: "codeBlock";
|
|
122
|
-
content: "inline";
|
|
123
|
-
propSchema: {
|
|
124
|
-
language: {
|
|
125
|
-
default: string;
|
|
126
|
-
};
|
|
127
|
-
};
|
|
128
|
-
};
|
|
129
|
-
implementation: import("../../index.js").TiptapBlockImplementation<{
|
|
130
|
-
type: "codeBlock";
|
|
131
|
-
content: "inline";
|
|
132
|
-
propSchema: {
|
|
133
|
-
language: {
|
|
134
|
-
default: string;
|
|
135
|
-
};
|
|
136
|
-
};
|
|
137
|
-
}, any, import("../../index.js").InlineContentSchema, import("../../index.js").StyleSchema>;
|
|
138
|
-
};
|
|
139
|
-
toggleListItem: {
|
|
140
|
-
config: {
|
|
141
|
-
type: "toggleListItem";
|
|
142
|
-
content: "inline";
|
|
143
|
-
propSchema: {
|
|
144
|
-
backgroundColor: {
|
|
145
|
-
default: "default";
|
|
146
|
-
};
|
|
147
|
-
textColor: {
|
|
148
|
-
default: "default";
|
|
149
|
-
};
|
|
150
|
-
textAlignment: {
|
|
151
|
-
default: "left";
|
|
152
|
-
values: readonly ["left", "center", "right", "justify"];
|
|
153
|
-
};
|
|
154
|
-
};
|
|
155
|
-
};
|
|
156
|
-
implementation: import("../../index.js").TiptapBlockImplementation<{
|
|
157
|
-
type: "toggleListItem";
|
|
158
|
-
content: "inline";
|
|
159
|
-
propSchema: {
|
|
160
|
-
backgroundColor: {
|
|
161
|
-
default: "default";
|
|
162
|
-
};
|
|
163
|
-
textColor: {
|
|
164
|
-
default: "default";
|
|
165
|
-
};
|
|
166
|
-
textAlignment: {
|
|
167
|
-
default: "left";
|
|
168
|
-
values: readonly ["left", "center", "right", "justify"];
|
|
169
|
-
};
|
|
170
|
-
};
|
|
171
|
-
}, any, import("../../index.js").InlineContentSchema, import("../../index.js").StyleSchema>;
|
|
172
|
-
};
|
|
173
|
-
bulletListItem: {
|
|
174
|
-
config: {
|
|
175
|
-
type: "bulletListItem";
|
|
176
|
-
content: "inline";
|
|
177
|
-
propSchema: {
|
|
178
|
-
backgroundColor: {
|
|
179
|
-
default: "default";
|
|
180
|
-
};
|
|
181
|
-
textColor: {
|
|
182
|
-
default: "default";
|
|
183
|
-
};
|
|
184
|
-
textAlignment: {
|
|
185
|
-
default: "left";
|
|
186
|
-
values: readonly ["left", "center", "right", "justify"];
|
|
187
|
-
};
|
|
188
|
-
};
|
|
189
|
-
};
|
|
190
|
-
implementation: import("../../index.js").TiptapBlockImplementation<{
|
|
191
|
-
type: "bulletListItem";
|
|
192
|
-
content: "inline";
|
|
193
|
-
propSchema: {
|
|
194
|
-
backgroundColor: {
|
|
195
|
-
default: "default";
|
|
196
|
-
};
|
|
197
|
-
textColor: {
|
|
198
|
-
default: "default";
|
|
199
|
-
};
|
|
200
|
-
textAlignment: {
|
|
201
|
-
default: "left";
|
|
202
|
-
values: readonly ["left", "center", "right", "justify"];
|
|
203
|
-
};
|
|
204
|
-
};
|
|
205
|
-
}, any, import("../../index.js").InlineContentSchema, import("../../index.js").StyleSchema>;
|
|
206
|
-
};
|
|
207
|
-
numberedListItem: {
|
|
208
|
-
config: {
|
|
209
|
-
type: "numberedListItem";
|
|
210
|
-
content: "inline";
|
|
211
|
-
propSchema: {
|
|
212
|
-
start: {
|
|
213
|
-
default: undefined;
|
|
214
|
-
type: "number";
|
|
215
|
-
};
|
|
216
|
-
backgroundColor: {
|
|
217
|
-
default: "default";
|
|
218
|
-
};
|
|
219
|
-
textColor: {
|
|
220
|
-
default: "default";
|
|
221
|
-
};
|
|
222
|
-
textAlignment: {
|
|
223
|
-
default: "left";
|
|
224
|
-
values: readonly ["left", "center", "right", "justify"];
|
|
225
|
-
};
|
|
226
|
-
};
|
|
227
|
-
};
|
|
228
|
-
implementation: import("../../index.js").TiptapBlockImplementation<{
|
|
229
|
-
type: "numberedListItem";
|
|
230
|
-
content: "inline";
|
|
231
|
-
propSchema: {
|
|
232
|
-
start: {
|
|
233
|
-
default: undefined;
|
|
234
|
-
type: "number";
|
|
235
|
-
};
|
|
236
|
-
backgroundColor: {
|
|
237
|
-
default: "default";
|
|
238
|
-
};
|
|
239
|
-
textColor: {
|
|
240
|
-
default: "default";
|
|
241
|
-
};
|
|
242
|
-
textAlignment: {
|
|
243
|
-
default: "left";
|
|
244
|
-
values: readonly ["left", "center", "right", "justify"];
|
|
245
|
-
};
|
|
246
|
-
};
|
|
247
|
-
}, any, import("../../index.js").InlineContentSchema, import("../../index.js").StyleSchema>;
|
|
248
|
-
};
|
|
249
|
-
checkListItem: {
|
|
250
|
-
config: {
|
|
251
|
-
type: "checkListItem";
|
|
252
|
-
content: "inline";
|
|
253
|
-
propSchema: {
|
|
254
|
-
checked: {
|
|
255
|
-
default: false;
|
|
256
|
-
};
|
|
257
|
-
backgroundColor: {
|
|
258
|
-
default: "default";
|
|
259
|
-
};
|
|
260
|
-
textColor: {
|
|
261
|
-
default: "default";
|
|
262
|
-
};
|
|
263
|
-
textAlignment: {
|
|
264
|
-
default: "left";
|
|
265
|
-
values: readonly ["left", "center", "right", "justify"];
|
|
266
|
-
};
|
|
267
|
-
};
|
|
268
|
-
};
|
|
269
|
-
implementation: import("../../index.js").TiptapBlockImplementation<{
|
|
270
|
-
type: "checkListItem";
|
|
271
|
-
content: "inline";
|
|
272
|
-
propSchema: {
|
|
273
|
-
checked: {
|
|
274
|
-
default: false;
|
|
275
|
-
};
|
|
276
|
-
backgroundColor: {
|
|
277
|
-
default: "default";
|
|
278
|
-
};
|
|
279
|
-
textColor: {
|
|
280
|
-
default: "default";
|
|
281
|
-
};
|
|
282
|
-
textAlignment: {
|
|
283
|
-
default: "left";
|
|
284
|
-
values: readonly ["left", "center", "right", "justify"];
|
|
285
|
-
};
|
|
286
|
-
};
|
|
287
|
-
}, any, import("../../index.js").InlineContentSchema, import("../../index.js").StyleSchema>;
|
|
288
|
-
};
|
|
289
|
-
table: {
|
|
290
|
-
config: {
|
|
291
|
-
type: "table";
|
|
292
|
-
content: "table";
|
|
293
|
-
propSchema: {
|
|
294
|
-
textColor: {
|
|
295
|
-
default: "default";
|
|
296
|
-
};
|
|
297
|
-
};
|
|
298
|
-
};
|
|
299
|
-
implementation: import("../../index.js").TiptapBlockImplementation<{
|
|
300
|
-
type: "table";
|
|
301
|
-
content: "table";
|
|
302
|
-
propSchema: {
|
|
303
|
-
textColor: {
|
|
304
|
-
default: "default";
|
|
305
|
-
};
|
|
306
|
-
};
|
|
307
|
-
}, any, import("../../index.js").InlineContentSchema, import("../../index.js").StyleSchema>;
|
|
308
|
-
};
|
|
309
|
-
file: {
|
|
310
|
-
config: {
|
|
311
|
-
type: "file";
|
|
312
|
-
propSchema: {
|
|
313
|
-
backgroundColor: {
|
|
314
|
-
default: "default";
|
|
315
|
-
};
|
|
316
|
-
name: {
|
|
317
|
-
default: "";
|
|
318
|
-
};
|
|
319
|
-
url: {
|
|
320
|
-
default: "";
|
|
321
|
-
};
|
|
322
|
-
caption: {
|
|
323
|
-
default: "";
|
|
324
|
-
};
|
|
325
|
-
};
|
|
326
|
-
content: "none";
|
|
327
|
-
isFileBlock: true;
|
|
328
|
-
};
|
|
329
|
-
implementation: import("../../index.js").TiptapBlockImplementation<{
|
|
330
|
-
type: "file";
|
|
331
|
-
propSchema: {
|
|
332
|
-
backgroundColor: {
|
|
333
|
-
default: "default";
|
|
334
|
-
};
|
|
335
|
-
name: {
|
|
336
|
-
default: "";
|
|
337
|
-
};
|
|
338
|
-
url: {
|
|
339
|
-
default: "";
|
|
340
|
-
};
|
|
341
|
-
caption: {
|
|
342
|
-
default: "";
|
|
343
|
-
};
|
|
344
|
-
};
|
|
345
|
-
content: "none";
|
|
346
|
-
isFileBlock: true;
|
|
347
|
-
}, any, import("../../index.js").InlineContentSchema, import("../../index.js").StyleSchema>;
|
|
348
|
-
};
|
|
349
|
-
image: {
|
|
350
|
-
config: {
|
|
351
|
-
type: "image";
|
|
352
|
-
propSchema: {
|
|
353
|
-
textAlignment: {
|
|
354
|
-
default: "left";
|
|
355
|
-
values: readonly ["left", "center", "right", "justify"];
|
|
356
|
-
};
|
|
357
|
-
backgroundColor: {
|
|
358
|
-
default: "default";
|
|
359
|
-
};
|
|
360
|
-
name: {
|
|
361
|
-
default: "";
|
|
362
|
-
};
|
|
363
|
-
url: {
|
|
364
|
-
default: "";
|
|
365
|
-
};
|
|
366
|
-
caption: {
|
|
367
|
-
default: "";
|
|
368
|
-
};
|
|
369
|
-
showPreview: {
|
|
370
|
-
default: true;
|
|
371
|
-
};
|
|
372
|
-
previewWidth: {
|
|
373
|
-
default: undefined;
|
|
374
|
-
type: "number";
|
|
375
|
-
};
|
|
376
|
-
};
|
|
377
|
-
content: "none";
|
|
378
|
-
isFileBlock: true;
|
|
379
|
-
fileBlockAccept: string[];
|
|
380
|
-
};
|
|
381
|
-
implementation: import("../../index.js").TiptapBlockImplementation<{
|
|
382
|
-
type: "image";
|
|
383
|
-
propSchema: {
|
|
384
|
-
textAlignment: {
|
|
385
|
-
default: "left";
|
|
386
|
-
values: readonly ["left", "center", "right", "justify"];
|
|
387
|
-
};
|
|
388
|
-
backgroundColor: {
|
|
389
|
-
default: "default";
|
|
390
|
-
};
|
|
391
|
-
name: {
|
|
392
|
-
default: "";
|
|
393
|
-
};
|
|
394
|
-
url: {
|
|
395
|
-
default: "";
|
|
396
|
-
};
|
|
397
|
-
caption: {
|
|
398
|
-
default: "";
|
|
399
|
-
};
|
|
400
|
-
showPreview: {
|
|
401
|
-
default: true;
|
|
402
|
-
};
|
|
403
|
-
previewWidth: {
|
|
404
|
-
default: undefined;
|
|
405
|
-
type: "number";
|
|
406
|
-
};
|
|
407
|
-
};
|
|
408
|
-
content: "none";
|
|
409
|
-
isFileBlock: true;
|
|
410
|
-
fileBlockAccept: string[];
|
|
411
|
-
}, any, import("../../index.js").InlineContentSchema, import("../../index.js").StyleSchema>;
|
|
412
|
-
};
|
|
413
|
-
video: {
|
|
414
|
-
config: {
|
|
415
|
-
type: "video";
|
|
416
|
-
propSchema: {
|
|
417
|
-
textAlignment: {
|
|
418
|
-
default: "left";
|
|
419
|
-
values: readonly ["left", "center", "right", "justify"];
|
|
420
|
-
};
|
|
421
|
-
backgroundColor: {
|
|
422
|
-
default: "default";
|
|
423
|
-
};
|
|
424
|
-
name: {
|
|
425
|
-
default: "";
|
|
426
|
-
};
|
|
427
|
-
url: {
|
|
428
|
-
default: "";
|
|
429
|
-
};
|
|
430
|
-
caption: {
|
|
431
|
-
default: "";
|
|
432
|
-
};
|
|
433
|
-
showPreview: {
|
|
434
|
-
default: true;
|
|
435
|
-
};
|
|
436
|
-
previewWidth: {
|
|
437
|
-
default: undefined;
|
|
438
|
-
type: "number";
|
|
439
|
-
};
|
|
440
|
-
};
|
|
441
|
-
content: "none";
|
|
442
|
-
isFileBlock: true;
|
|
443
|
-
fileBlockAccept: string[];
|
|
444
|
-
};
|
|
445
|
-
implementation: import("../../index.js").TiptapBlockImplementation<{
|
|
446
|
-
type: "video";
|
|
447
|
-
propSchema: {
|
|
448
|
-
textAlignment: {
|
|
449
|
-
default: "left";
|
|
450
|
-
values: readonly ["left", "center", "right", "justify"];
|
|
451
|
-
};
|
|
452
|
-
backgroundColor: {
|
|
453
|
-
default: "default";
|
|
454
|
-
};
|
|
455
|
-
name: {
|
|
456
|
-
default: "";
|
|
457
|
-
};
|
|
458
|
-
url: {
|
|
459
|
-
default: "";
|
|
460
|
-
};
|
|
461
|
-
caption: {
|
|
462
|
-
default: "";
|
|
463
|
-
};
|
|
464
|
-
showPreview: {
|
|
465
|
-
default: true;
|
|
466
|
-
};
|
|
467
|
-
previewWidth: {
|
|
468
|
-
default: undefined;
|
|
469
|
-
type: "number";
|
|
470
|
-
};
|
|
471
|
-
};
|
|
472
|
-
content: "none";
|
|
473
|
-
isFileBlock: true;
|
|
474
|
-
fileBlockAccept: string[];
|
|
475
|
-
}, any, import("../../index.js").InlineContentSchema, import("../../index.js").StyleSchema>;
|
|
476
|
-
};
|
|
477
|
-
audio: {
|
|
478
|
-
config: {
|
|
479
|
-
type: "audio";
|
|
480
|
-
propSchema: {
|
|
481
|
-
backgroundColor: {
|
|
482
|
-
default: "default";
|
|
483
|
-
};
|
|
484
|
-
name: {
|
|
485
|
-
default: "";
|
|
486
|
-
};
|
|
487
|
-
url: {
|
|
488
|
-
default: "";
|
|
489
|
-
};
|
|
490
|
-
caption: {
|
|
491
|
-
default: "";
|
|
492
|
-
};
|
|
493
|
-
showPreview: {
|
|
494
|
-
default: true;
|
|
495
|
-
};
|
|
496
|
-
};
|
|
497
|
-
content: "none";
|
|
498
|
-
isFileBlock: true;
|
|
499
|
-
fileBlockAccept: string[];
|
|
500
|
-
};
|
|
501
|
-
implementation: import("../../index.js").TiptapBlockImplementation<{
|
|
502
|
-
type: "audio";
|
|
503
|
-
propSchema: {
|
|
504
|
-
backgroundColor: {
|
|
505
|
-
default: "default";
|
|
506
|
-
};
|
|
507
|
-
name: {
|
|
508
|
-
default: "";
|
|
509
|
-
};
|
|
510
|
-
url: {
|
|
511
|
-
default: "";
|
|
512
|
-
};
|
|
513
|
-
caption: {
|
|
514
|
-
default: "";
|
|
515
|
-
};
|
|
516
|
-
showPreview: {
|
|
517
|
-
default: true;
|
|
518
|
-
};
|
|
519
|
-
};
|
|
520
|
-
content: "none";
|
|
521
|
-
isFileBlock: true;
|
|
522
|
-
fileBlockAccept: string[];
|
|
523
|
-
}, any, import("../../index.js").InlineContentSchema, import("../../index.js").StyleSchema>;
|
|
524
|
-
};
|
|
525
|
-
}>, import("../../index.js").InlineContentSchemaFromSpecs<{
|
|
2
|
+
export declare function setupTestEnv(): () => BlockNoteEditor<import("../../index.js")._DefaultBlockSchema, import("../../index.js").InlineContentSchemaFromSpecs<{
|
|
526
3
|
text: {
|
|
527
4
|
config: "text";
|
|
528
5
|
implementation: any;
|
|
@@ -537,48 +14,57 @@ export declare function setupTestEnv(): () => BlockNoteEditor<import("../../inde
|
|
|
537
14
|
type: string;
|
|
538
15
|
propSchema: "boolean";
|
|
539
16
|
};
|
|
540
|
-
implementation: import("../../index.js").StyleImplementation
|
|
17
|
+
implementation: import("../../index.js").StyleImplementation<{
|
|
18
|
+
type: string;
|
|
19
|
+
propSchema: "boolean";
|
|
20
|
+
}>;
|
|
541
21
|
};
|
|
542
22
|
italic: {
|
|
543
23
|
config: {
|
|
544
24
|
type: string;
|
|
545
25
|
propSchema: "boolean";
|
|
546
26
|
};
|
|
547
|
-
implementation: import("../../index.js").StyleImplementation
|
|
27
|
+
implementation: import("../../index.js").StyleImplementation<{
|
|
28
|
+
type: string;
|
|
29
|
+
propSchema: "boolean";
|
|
30
|
+
}>;
|
|
548
31
|
};
|
|
549
32
|
underline: {
|
|
550
33
|
config: {
|
|
551
34
|
type: string;
|
|
552
35
|
propSchema: "boolean";
|
|
553
36
|
};
|
|
554
|
-
implementation: import("../../index.js").StyleImplementation
|
|
37
|
+
implementation: import("../../index.js").StyleImplementation<{
|
|
38
|
+
type: string;
|
|
39
|
+
propSchema: "boolean";
|
|
40
|
+
}>;
|
|
555
41
|
};
|
|
556
42
|
strike: {
|
|
557
43
|
config: {
|
|
558
44
|
type: string;
|
|
559
45
|
propSchema: "boolean";
|
|
560
46
|
};
|
|
561
|
-
implementation: import("../../index.js").StyleImplementation
|
|
562
|
-
};
|
|
563
|
-
code: {
|
|
564
|
-
config: {
|
|
47
|
+
implementation: import("../../index.js").StyleImplementation<{
|
|
565
48
|
type: string;
|
|
566
49
|
propSchema: "boolean";
|
|
567
|
-
}
|
|
568
|
-
implementation: import("../../index.js").StyleImplementation;
|
|
50
|
+
}>;
|
|
569
51
|
};
|
|
570
|
-
|
|
52
|
+
code: {
|
|
571
53
|
config: {
|
|
572
54
|
type: string;
|
|
573
|
-
propSchema: "
|
|
55
|
+
propSchema: "boolean";
|
|
574
56
|
};
|
|
575
|
-
implementation: import("../../index.js").StyleImplementation
|
|
576
|
-
};
|
|
577
|
-
backgroundColor: {
|
|
578
|
-
config: {
|
|
57
|
+
implementation: import("../../index.js").StyleImplementation<{
|
|
579
58
|
type: string;
|
|
580
|
-
propSchema: "
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
|
|
59
|
+
propSchema: "boolean";
|
|
60
|
+
}>;
|
|
61
|
+
};
|
|
62
|
+
textColor: import("../../index.js").StyleSpec<{
|
|
63
|
+
readonly type: "textColor";
|
|
64
|
+
readonly propSchema: "string";
|
|
65
|
+
}>;
|
|
66
|
+
backgroundColor: import("../../index.js").StyleSpec<{
|
|
67
|
+
readonly type: "backgroundColor";
|
|
68
|
+
readonly propSchema: "string";
|
|
69
|
+
}>;
|
|
584
70
|
}>>;
|
|
@@ -4,7 +4,7 @@ import type { BlockNoteEditor } from "../../../../editor/BlockNoteEditor.js";
|
|
|
4
4
|
import { BlockSchema, InlineContentSchema, StyleSchema } from "../../../../schema/index.js";
|
|
5
5
|
export declare function serializeInlineContentExternalHTML<BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema>(editor: BlockNoteEditor<any, I, S>, blockContent: PartialBlock<BSchema, I, S>["content"], serializer: DOMSerializer, options?: {
|
|
6
6
|
document?: Document;
|
|
7
|
-
}):
|
|
7
|
+
}): DocumentFragment;
|
|
8
8
|
export declare const serializeBlocksExternalHTML: <BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema>(editor: BlockNoteEditor<BSchema, I, S>, blocks: PartialBlock<BSchema, I, S>[], serializer: DOMSerializer, orderedListItemBlockTypes: Set<string>, unorderedListItemBlockTypes: Set<string>, options?: {
|
|
9
9
|
document?: Document;
|
|
10
10
|
}) => DocumentFragment;
|
|
@@ -4,7 +4,7 @@ import type { BlockNoteEditor } from "../../../../editor/BlockNoteEditor.js";
|
|
|
4
4
|
import { BlockSchema, InlineContentSchema, StyleSchema } from "../../../../schema/index.js";
|
|
5
5
|
export declare function serializeInlineContentInternalHTML<BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema>(editor: BlockNoteEditor<any, I, S>, blockContent: PartialBlock<BSchema, I, S>["content"], serializer: DOMSerializer, blockType?: string, options?: {
|
|
6
6
|
document?: Document;
|
|
7
|
-
}):
|
|
7
|
+
}): DocumentFragment;
|
|
8
8
|
export declare const serializeBlocksInternalHTML: <BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema>(editor: BlockNoteEditor<BSchema, I, S>, blocks: PartialBlock<BSchema, I, S>[], serializer: DOMSerializer, options?: {
|
|
9
9
|
document?: Document;
|
|
10
10
|
}) => HTMLElement;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Node, Schema } from "prosemirror-model";
|
|
2
2
|
import { Transform } from "prosemirror-transform";
|
|
3
|
-
import { BlockNoteSchema } from "../
|
|
3
|
+
import { BlockNoteSchema } from "../blocks/BlockNoteSchema.js";
|
|
4
4
|
import type { BlockSchema } from "../schema/blocks/types.js";
|
|
5
5
|
import type { InlineContentSchema } from "../schema/inlineContent/types.js";
|
|
6
6
|
import type { StyleSchema } from "../schema/styles/types.js";
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { BlockNoteEditor } from "../../editor/BlockNoteEditor.js";
|
|
2
|
+
import { BlockFromConfig } from "../../schema/index.js";
|
|
3
|
+
export declare const FILE_AUDIO_ICON_SVG = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M2 16.0001H5.88889L11.1834 20.3319C11.2727 20.405 11.3846 20.4449 11.5 20.4449C11.7761 20.4449 12 20.2211 12 19.9449V4.05519C12 3.93977 11.9601 3.8279 11.887 3.73857C11.7121 3.52485 11.3971 3.49335 11.1834 3.66821L5.88889 8.00007H2C1.44772 8.00007 1 8.44778 1 9.00007V15.0001C1 15.5524 1.44772 16.0001 2 16.0001ZM23 12C23 15.292 21.5539 18.2463 19.2622 20.2622L17.8445 18.8444C19.7758 17.1937 21 14.7398 21 12C21 9.26016 19.7758 6.80629 17.8445 5.15557L19.2622 3.73779C21.5539 5.75368 23 8.70795 23 12ZM18 12C18 10.0883 17.106 8.38548 15.7133 7.28673L14.2842 8.71584C15.3213 9.43855 16 10.64 16 12C16 13.36 15.3213 14.5614 14.2842 15.2841L15.7133 16.7132C17.106 15.6145 18 13.9116 18 12Z\"></path></svg>";
|
|
4
|
+
export interface AudioOptions {
|
|
5
|
+
icon?: string;
|
|
6
|
+
}
|
|
7
|
+
export type AudioBlockConfig = ReturnType<typeof createAudioBlockConfig>;
|
|
8
|
+
export declare const createAudioBlockConfig: (options: AudioOptions) => import("../../index.js").BlockConfig<"audio", {
|
|
9
|
+
readonly backgroundColor: {
|
|
10
|
+
default: "default";
|
|
11
|
+
};
|
|
12
|
+
readonly name: {
|
|
13
|
+
readonly default: "";
|
|
14
|
+
};
|
|
15
|
+
readonly url: {
|
|
16
|
+
readonly default: "";
|
|
17
|
+
};
|
|
18
|
+
readonly caption: {
|
|
19
|
+
readonly default: "";
|
|
20
|
+
};
|
|
21
|
+
readonly showPreview: {
|
|
22
|
+
readonly default: true;
|
|
23
|
+
};
|
|
24
|
+
}, "none">;
|
|
25
|
+
export declare const audioParse: (_config?: AudioOptions) => (element: HTMLElement) => {
|
|
26
|
+
backgroundColor: string | undefined;
|
|
27
|
+
url: string | undefined;
|
|
28
|
+
} | {
|
|
29
|
+
backgroundColor: string | undefined;
|
|
30
|
+
caption: string | undefined;
|
|
31
|
+
url: string | undefined;
|
|
32
|
+
} | undefined;
|
|
33
|
+
export declare const audioRender: (config?: AudioOptions) => (block: BlockFromConfig<ReturnType<typeof createAudioBlockConfig>, any, any>, editor: BlockNoteEditor<Record<"audio", ReturnType<typeof createAudioBlockConfig>>, any, any>) => {
|
|
34
|
+
dom: HTMLElement;
|
|
35
|
+
destroy?: () => void;
|
|
36
|
+
};
|
|
37
|
+
export declare const audioToExternalHTML: (_config?: AudioOptions) => (block: BlockFromConfig<ReturnType<typeof createAudioBlockConfig>, any, any>, _editor: BlockNoteEditor<Record<"audio", ReturnType<typeof createAudioBlockConfig>>, any, any>) => {
|
|
38
|
+
dom: HTMLElement;
|
|
39
|
+
};
|
|
40
|
+
export declare const createAudioBlockSpec: (options?: Partial<{
|
|
41
|
+
icon: string;
|
|
42
|
+
}> | undefined) => import("../../index.js").BlockSpec<"audio", {
|
|
43
|
+
readonly backgroundColor: {
|
|
44
|
+
default: "default";
|
|
45
|
+
};
|
|
46
|
+
readonly name: {
|
|
47
|
+
readonly default: "";
|
|
48
|
+
};
|
|
49
|
+
readonly url: {
|
|
50
|
+
readonly default: "";
|
|
51
|
+
};
|
|
52
|
+
readonly caption: {
|
|
53
|
+
readonly default: "";
|
|
54
|
+
};
|
|
55
|
+
readonly showPreview: {
|
|
56
|
+
readonly default: true;
|
|
57
|
+
};
|
|
58
|
+
}, "none">;
|