@blocknote/core 0.13.2 → 0.13.4
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 +5730 -2891
- 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/webpack-stats.json +1 -1
- package/package.json +2 -2
- package/src/api/exporters/html/__snapshots__/file/basic/external.html +1 -0
- package/src/api/exporters/html/__snapshots__/file/basic/internal.html +1 -0
- package/src/api/exporters/html/__snapshots__/file/button/external.html +1 -0
- package/src/api/exporters/html/__snapshots__/file/button/internal.html +1 -0
- package/src/api/exporters/html/__snapshots__/file/nested/external.html +1 -0
- package/src/api/exporters/html/__snapshots__/file/nested/internal.html +1 -0
- package/src/api/exporters/html/__snapshots__/file/noCaption/external.html +1 -0
- package/src/api/exporters/html/__snapshots__/file/noCaption/internal.html +1 -0
- package/src/api/exporters/html/__snapshots__/file/noName/external.html +1 -0
- package/src/api/exporters/html/__snapshots__/file/noName/internal.html +1 -0
- package/src/api/exporters/html/__snapshots__/image/basic/external.html +1 -1
- package/src/api/exporters/html/__snapshots__/image/basic/internal.html +1 -1
- package/src/api/exporters/html/__snapshots__/image/button/external.html +1 -1
- package/src/api/exporters/html/__snapshots__/image/button/internal.html +1 -1
- package/src/api/exporters/html/__snapshots__/image/nested/external.html +1 -1
- package/src/api/exporters/html/__snapshots__/image/nested/internal.html +1 -1
- package/src/api/exporters/html/__snapshots__/image/noCaption/external.html +1 -0
- package/src/api/exporters/html/__snapshots__/image/noCaption/internal.html +1 -0
- package/src/api/exporters/html/__snapshots__/image/noName/external.html +1 -0
- package/src/api/exporters/html/__snapshots__/image/noName/internal.html +1 -0
- package/src/api/exporters/html/__snapshots__/image/noPreview/external.html +1 -0
- package/src/api/exporters/html/__snapshots__/image/noPreview/internal.html +1 -0
- package/src/api/exporters/html/__snapshots__/lists/basic/external.html +1 -0
- package/src/api/exporters/html/__snapshots__/lists/basic/internal.html +1 -0
- package/src/api/exporters/html/__snapshots__/lists/nested/external.html +1 -0
- package/src/api/exporters/html/__snapshots__/lists/nested/internal.html +1 -0
- package/src/api/exporters/html/__snapshots__/simpleFile/basic/external.html +1 -0
- package/src/api/exporters/html/__snapshots__/simpleFile/basic/internal.html +1 -0
- package/src/api/exporters/html/__snapshots__/simpleFile/button/external.html +1 -0
- package/src/api/exporters/html/__snapshots__/simpleFile/button/internal.html +1 -0
- package/src/api/exporters/html/__snapshots__/simpleFile/nested/external.html +1 -0
- package/src/api/exporters/html/__snapshots__/simpleFile/nested/internal.html +1 -0
- package/src/api/exporters/html/__snapshots__/simpleImage/basic/external.html +1 -1
- package/src/api/exporters/html/__snapshots__/simpleImage/basic/internal.html +1 -1
- package/src/api/exporters/html/__snapshots__/simpleImage/button/external.html +1 -1
- package/src/api/exporters/html/__snapshots__/simpleImage/button/internal.html +1 -1
- package/src/api/exporters/html/__snapshots__/simpleImage/nested/external.html +1 -1
- package/src/api/exporters/html/__snapshots__/simpleImage/nested/internal.html +1 -1
- package/src/api/exporters/html/__snapshots__/simpleImage/noCaption/external.html +1 -0
- package/src/api/exporters/html/__snapshots__/simpleImage/noCaption/internal.html +1 -0
- package/src/api/exporters/html/__snapshots__/simpleImage/noName/external.html +1 -0
- package/src/api/exporters/html/__snapshots__/simpleImage/noName/internal.html +1 -0
- package/src/api/exporters/html/__snapshots__/simpleImage/noPreview/external.html +1 -0
- package/src/api/exporters/html/__snapshots__/simpleImage/noPreview/internal.html +1 -0
- package/src/api/exporters/html/externalHTMLExporter.ts +4 -3
- package/src/api/exporters/html/util/simplifyBlocksRehypePlugin.ts +1 -1
- package/src/api/exporters/markdown/__snapshots__/file/basic/markdown.md +3 -0
- package/src/api/exporters/markdown/__snapshots__/file/button/markdown.md +1 -0
- package/src/api/exporters/markdown/__snapshots__/file/nested/markdown.md +7 -0
- package/src/api/exporters/markdown/__snapshots__/file/noCaption/markdown.md +1 -0
- package/src/api/exporters/markdown/__snapshots__/file/noName/markdown.md +3 -0
- package/src/api/exporters/markdown/__snapshots__/image/basic/markdown.md +1 -1
- package/src/api/exporters/markdown/__snapshots__/image/button/markdown.md +1 -1
- package/src/api/exporters/markdown/__snapshots__/image/nested/markdown.md +2 -2
- package/src/api/exporters/markdown/__snapshots__/image/noCaption/markdown.md +1 -0
- package/src/api/exporters/markdown/__snapshots__/image/noName/markdown.md +3 -0
- package/src/api/exporters/markdown/__snapshots__/image/noPreview/markdown.md +3 -0
- package/src/api/exporters/markdown/__snapshots__/lists/basic/markdown.md +8 -0
- package/src/api/exporters/markdown/__snapshots__/lists/nested/markdown.md +10 -0
- package/src/api/exporters/markdown/__snapshots__/simpleFile/basic/markdown.md +3 -0
- package/src/api/exporters/markdown/__snapshots__/simpleFile/button/markdown.md +1 -0
- package/src/api/exporters/markdown/__snapshots__/simpleFile/nested/markdown.md +7 -0
- package/src/api/exporters/markdown/__snapshots__/simpleImage/basic/markdown.md +3 -1
- package/src/api/exporters/markdown/__snapshots__/simpleImage/button/markdown.md +1 -0
- package/src/api/exporters/markdown/__snapshots__/simpleImage/nested/markdown.md +6 -2
- package/src/api/exporters/markdown/__snapshots__/simpleImage/noCaption/markdown.md +1 -0
- package/src/api/exporters/markdown/__snapshots__/simpleImage/noName/markdown.md +3 -0
- package/src/api/exporters/markdown/__snapshots__/simpleImage/noPreview/markdown.md +3 -0
- package/src/api/exporters/markdown/markdownExporter.ts +2 -0
- package/src/api/exporters/markdown/util/addSpacesToCheckboxesRehypePlugin.ts +42 -0
- package/src/api/nodeConversions/__snapshots__/nodeConversions.test.ts.snap +262 -4
- package/src/api/parsers/html/__snapshots__/paste/list-test.json +74 -2
- package/src/api/parsers/html/__snapshots__/paste/parse-basic-block-types.json +3 -1
- package/src/api/parsers/html/__snapshots__/paste/parse-fake-image-caption.json +3 -1
- package/src/api/parsers/html/__snapshots__/paste/parse-mixed-nested-lists.json +135 -10
- package/src/api/parsers/html/__snapshots__/paste/parse-nested-lists-with-paragraphs.json +132 -7
- package/src/api/parsers/html/__snapshots__/paste/parse-nested-lists.json +111 -3
- package/src/api/parsers/html/parseHTML.test.ts +166 -95
- package/src/api/testUtil/cases/customBlocks.ts +82 -33
- package/src/api/testUtil/cases/customInlineContent.ts +1 -1
- package/src/api/testUtil/cases/customStyles.ts +1 -1
- package/src/api/testUtil/cases/defaultSchema.ts +185 -4
- package/src/blocks/AudioBlockContent/AudioBlockContent.ts +163 -0
- package/src/blocks/AudioBlockContent/audioBlockHelpers.ts +5 -0
- package/src/blocks/FileBlockContent/FileBlockContent.ts +120 -0
- package/src/blocks/FileBlockContent/fileBlockHelpers.ts +377 -0
- package/src/blocks/ImageBlockContent/ImageBlockContent.ts +134 -354
- package/src/blocks/ImageBlockContent/imageBlockHelpers.ts +6 -0
- package/src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.ts +3 -0
- package/src/blocks/ListItemBlockContent/CheckListItemBlockContent/CheckListItemBlockContent.ts +266 -0
- package/src/blocks/ListItemBlockContent/ListItemKeyboardShortcuts.ts +2 -1
- package/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.ts +1 -0
- package/src/blocks/VideoBlockContent/VideoBlockContent.ts +181 -0
- package/src/blocks/VideoBlockContent/videoBlockHelpers.ts +6 -0
- package/src/blocks/defaultBlockTypeGuards.ts +53 -1
- package/src/blocks/defaultBlocks.ts +11 -2
- package/src/editor/Block.css +89 -27
- package/src/editor/BlockNoteEditor.ts +24 -10
- package/src/editor/BlockNoteSchema.ts +12 -3
- package/src/editor/transformPasted.ts +2 -1
- package/src/extensions/{ImagePanel/ImageToolbarPlugin.ts → FilePanel/FilePanelPlugin.ts} +22 -25
- package/src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts +14 -2
- package/src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts +72 -2
- package/src/extensions/TableHandles/TableHandlesPlugin.ts +27 -27
- package/src/extensions/TextAlignment/TextAlignmentExtension.ts +7 -1
- package/src/i18n/locales/en.ts +117 -11
- package/src/i18n/locales/fr.ts +118 -11
- package/src/i18n/locales/index.ts +8 -2
- package/src/i18n/locales/is.ts +295 -0
- package/src/i18n/locales/ja.ts +323 -0
- package/src/i18n/locales/ko.ts +307 -0
- package/src/i18n/locales/nl.ts +108 -8
- package/src/i18n/locales/pl.ts +287 -0
- package/src/i18n/locales/pt.ts +295 -0
- package/src/i18n/locales/vi.ts +295 -0
- package/src/i18n/locales/zh.ts +123 -8
- package/src/index.ts +9 -2
- package/src/pm-nodes/BlockContainer.ts +18 -6
- package/src/schema/blocks/createSpec.ts +1 -0
- package/src/schema/blocks/internal.ts +10 -0
- package/src/schema/blocks/types.ts +40 -5
- package/src/util/string.ts +12 -0
- package/types/src/api/exporters/markdown/util/addSpacesToCheckboxesRehypePlugin.d.ts +7 -0
- package/types/src/api/testUtil/cases/customBlocks.d.ts +272 -54
- package/types/src/api/testUtil/cases/customInlineContent.d.ts +222 -16
- package/types/src/api/testUtil/cases/customStyles.d.ts +222 -16
- package/types/src/blocks/AudioBlockContent/AudioBlockContent.d.ts +101 -0
- package/types/src/blocks/AudioBlockContent/audioBlockHelpers.d.ts +3 -0
- package/types/src/blocks/FileBlockContent/FileBlockContent.d.ts +93 -0
- package/types/src/blocks/FileBlockContent/fileBlockHelpers.d.ts +30 -0
- package/types/src/blocks/ImageBlockContent/ImageBlockContent.d.ts +50 -14
- package/types/src/blocks/ImageBlockContent/imageBlockHelpers.d.ts +4 -0
- package/types/src/blocks/ListItemBlockContent/CheckListItemBlockContent/CheckListItemBlockContent.d.ts +55 -0
- package/types/src/blocks/VideoBlockContent/VideoBlockContent.d.ts +129 -0
- package/types/src/blocks/VideoBlockContent/videoBlockHelpers.d.ts +4 -0
- package/types/src/blocks/defaultBlockTypeGuards.d.ts +6 -1
- package/types/src/blocks/defaultBlocks.d.ts +444 -32
- package/types/src/editor/BlockNoteEditor.d.ts +12 -5
- package/types/src/extensions/{ImagePanel/ImageToolbarPlugin.d.ts → FilePanel/FilePanelPlugin.d.ts} +9 -12
- package/types/src/extensions/TableHandles/TableHandlesPlugin.d.ts +1 -1
- package/types/src/i18n/locales/en.d.ts +56 -7
- package/types/src/i18n/locales/fr.d.ts +2 -184
- package/types/src/i18n/locales/index.d.ts +7 -1
- package/types/src/i18n/locales/is.d.ts +2 -0
- package/types/src/i18n/locales/ja.d.ts +2 -0
- package/types/src/i18n/locales/ko.d.ts +2 -0
- package/types/src/i18n/locales/pl.d.ts +2 -0
- package/types/src/i18n/locales/pt.d.ts +2 -0
- package/types/src/i18n/locales/vi.d.ts +2 -0
- package/types/src/index.d.ts +8 -2
- package/types/src/pm-nodes/BlockContainer.d.ts +1 -1
- package/types/src/schema/blocks/internal.d.ts +1 -1
- package/types/src/schema/blocks/types.d.ts +25 -1
- package/types/src/util/string.d.ts +1 -0
- /package/src/blocks/{ImageBlockContent → FileBlockContent}/uploadToTmpFilesDotOrg_DEV_ONLY.ts +0 -0
- /package/types/src/blocks/{ImageBlockContent → FileBlockContent}/uploadToTmpFilesDotOrg_DEV_ONLY.d.ts +0 -0
|
@@ -146,6 +146,120 @@ declare const schema: BlockNoteSchema<import("../../..").BlockSchemaFromSpecs<{
|
|
|
146
146
|
};
|
|
147
147
|
}, any, import("../../..").InlineContentSchema, import("../../..").StyleSchema>;
|
|
148
148
|
};
|
|
149
|
+
checkListItem: {
|
|
150
|
+
config: {
|
|
151
|
+
type: "checkListItem";
|
|
152
|
+
content: "inline";
|
|
153
|
+
propSchema: {
|
|
154
|
+
checked: {
|
|
155
|
+
default: false;
|
|
156
|
+
};
|
|
157
|
+
backgroundColor: {
|
|
158
|
+
default: "default";
|
|
159
|
+
};
|
|
160
|
+
textColor: {
|
|
161
|
+
default: "default";
|
|
162
|
+
};
|
|
163
|
+
textAlignment: {
|
|
164
|
+
default: "left";
|
|
165
|
+
values: readonly ["left", "center", "right", "justify"];
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
implementation: import("../../..").TiptapBlockImplementation<{
|
|
170
|
+
type: "checkListItem";
|
|
171
|
+
content: "inline";
|
|
172
|
+
propSchema: {
|
|
173
|
+
checked: {
|
|
174
|
+
default: false;
|
|
175
|
+
};
|
|
176
|
+
backgroundColor: {
|
|
177
|
+
default: "default";
|
|
178
|
+
};
|
|
179
|
+
textColor: {
|
|
180
|
+
default: "default";
|
|
181
|
+
};
|
|
182
|
+
textAlignment: {
|
|
183
|
+
default: "left";
|
|
184
|
+
values: readonly ["left", "center", "right", "justify"];
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
}, any, import("../../..").InlineContentSchema, import("../../..").StyleSchema>;
|
|
188
|
+
};
|
|
189
|
+
table: {
|
|
190
|
+
config: {
|
|
191
|
+
type: "table";
|
|
192
|
+
content: "table";
|
|
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
|
+
};
|
|
206
|
+
implementation: import("../../..").TiptapBlockImplementation<{
|
|
207
|
+
type: "table";
|
|
208
|
+
content: "table";
|
|
209
|
+
propSchema: {
|
|
210
|
+
backgroundColor: {
|
|
211
|
+
default: "default";
|
|
212
|
+
};
|
|
213
|
+
textColor: {
|
|
214
|
+
default: "default";
|
|
215
|
+
};
|
|
216
|
+
textAlignment: {
|
|
217
|
+
default: "left";
|
|
218
|
+
values: readonly ["left", "center", "right", "justify"];
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
}, any, import("../../..").InlineContentSchema, import("../../..").StyleSchema>;
|
|
222
|
+
};
|
|
223
|
+
file: {
|
|
224
|
+
config: {
|
|
225
|
+
type: "file";
|
|
226
|
+
propSchema: {
|
|
227
|
+
backgroundColor: {
|
|
228
|
+
default: "default";
|
|
229
|
+
};
|
|
230
|
+
name: {
|
|
231
|
+
default: "";
|
|
232
|
+
};
|
|
233
|
+
url: {
|
|
234
|
+
default: "";
|
|
235
|
+
};
|
|
236
|
+
caption: {
|
|
237
|
+
default: "";
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
content: "none";
|
|
241
|
+
isFileBlock: true;
|
|
242
|
+
};
|
|
243
|
+
implementation: import("../../..").TiptapBlockImplementation<{
|
|
244
|
+
type: "file";
|
|
245
|
+
propSchema: {
|
|
246
|
+
backgroundColor: {
|
|
247
|
+
default: "default";
|
|
248
|
+
};
|
|
249
|
+
name: {
|
|
250
|
+
default: "";
|
|
251
|
+
};
|
|
252
|
+
url: {
|
|
253
|
+
default: "";
|
|
254
|
+
};
|
|
255
|
+
caption: {
|
|
256
|
+
default: "";
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
content: "none";
|
|
260
|
+
isFileBlock: true;
|
|
261
|
+
}, any, import("../../..").InlineContentSchema, import("../../..").StyleSchema>;
|
|
262
|
+
};
|
|
149
263
|
image: {
|
|
150
264
|
config: {
|
|
151
265
|
type: "image";
|
|
@@ -157,17 +271,25 @@ declare const schema: BlockNoteSchema<import("../../..").BlockSchemaFromSpecs<{
|
|
|
157
271
|
backgroundColor: {
|
|
158
272
|
default: "default";
|
|
159
273
|
};
|
|
274
|
+
name: {
|
|
275
|
+
default: "";
|
|
276
|
+
};
|
|
160
277
|
url: {
|
|
161
278
|
default: "";
|
|
162
279
|
};
|
|
163
280
|
caption: {
|
|
164
281
|
default: "";
|
|
165
282
|
};
|
|
166
|
-
|
|
167
|
-
default:
|
|
283
|
+
showPreview: {
|
|
284
|
+
default: true;
|
|
285
|
+
};
|
|
286
|
+
previewWidth: {
|
|
287
|
+
default: number;
|
|
168
288
|
};
|
|
169
289
|
};
|
|
170
290
|
content: "none";
|
|
291
|
+
isFileBlock: true;
|
|
292
|
+
fileBlockAcceptMimeTypes: string[];
|
|
171
293
|
};
|
|
172
294
|
implementation: import("../../..").TiptapBlockImplementation<{
|
|
173
295
|
type: "image";
|
|
@@ -179,51 +301,135 @@ declare const schema: BlockNoteSchema<import("../../..").BlockSchemaFromSpecs<{
|
|
|
179
301
|
backgroundColor: {
|
|
180
302
|
default: "default";
|
|
181
303
|
};
|
|
304
|
+
name: {
|
|
305
|
+
default: "";
|
|
306
|
+
};
|
|
182
307
|
url: {
|
|
183
308
|
default: "";
|
|
184
309
|
};
|
|
185
310
|
caption: {
|
|
186
311
|
default: "";
|
|
187
312
|
};
|
|
188
|
-
|
|
189
|
-
default:
|
|
313
|
+
showPreview: {
|
|
314
|
+
default: true;
|
|
315
|
+
};
|
|
316
|
+
previewWidth: {
|
|
317
|
+
default: number;
|
|
190
318
|
};
|
|
191
319
|
};
|
|
192
320
|
content: "none";
|
|
321
|
+
isFileBlock: true;
|
|
322
|
+
fileBlockAcceptMimeTypes: string[];
|
|
193
323
|
}, any, import("../../..").InlineContentSchema, import("../../..").StyleSchema>;
|
|
194
324
|
};
|
|
195
|
-
|
|
325
|
+
video: {
|
|
196
326
|
config: {
|
|
197
|
-
type: "
|
|
198
|
-
content: "table";
|
|
327
|
+
type: "video";
|
|
199
328
|
propSchema: {
|
|
329
|
+
textAlignment: {
|
|
330
|
+
default: "left";
|
|
331
|
+
values: readonly ["left", "center", "right", "justify"];
|
|
332
|
+
};
|
|
200
333
|
backgroundColor: {
|
|
201
334
|
default: "default";
|
|
202
335
|
};
|
|
203
|
-
|
|
204
|
-
default: "
|
|
336
|
+
name: {
|
|
337
|
+
default: "";
|
|
338
|
+
};
|
|
339
|
+
url: {
|
|
340
|
+
default: "";
|
|
341
|
+
};
|
|
342
|
+
caption: {
|
|
343
|
+
default: "";
|
|
205
344
|
};
|
|
345
|
+
showPreview: {
|
|
346
|
+
default: true;
|
|
347
|
+
};
|
|
348
|
+
previewWidth: {
|
|
349
|
+
default: number;
|
|
350
|
+
};
|
|
351
|
+
};
|
|
352
|
+
content: "none";
|
|
353
|
+
isFileBlock: true;
|
|
354
|
+
fileBlockAcceptMimeTypes: string[];
|
|
355
|
+
};
|
|
356
|
+
implementation: import("../../..").TiptapBlockImplementation<{
|
|
357
|
+
type: "video";
|
|
358
|
+
propSchema: {
|
|
206
359
|
textAlignment: {
|
|
207
360
|
default: "left";
|
|
208
361
|
values: readonly ["left", "center", "right", "justify"];
|
|
209
362
|
};
|
|
363
|
+
backgroundColor: {
|
|
364
|
+
default: "default";
|
|
365
|
+
};
|
|
366
|
+
name: {
|
|
367
|
+
default: "";
|
|
368
|
+
};
|
|
369
|
+
url: {
|
|
370
|
+
default: "";
|
|
371
|
+
};
|
|
372
|
+
caption: {
|
|
373
|
+
default: "";
|
|
374
|
+
};
|
|
375
|
+
showPreview: {
|
|
376
|
+
default: true;
|
|
377
|
+
};
|
|
378
|
+
previewWidth: {
|
|
379
|
+
default: number;
|
|
380
|
+
};
|
|
210
381
|
};
|
|
382
|
+
content: "none";
|
|
383
|
+
isFileBlock: true;
|
|
384
|
+
fileBlockAcceptMimeTypes: string[];
|
|
385
|
+
}, any, import("../../..").InlineContentSchema, import("../../..").StyleSchema>;
|
|
386
|
+
};
|
|
387
|
+
audio: {
|
|
388
|
+
config: {
|
|
389
|
+
type: "audio";
|
|
390
|
+
propSchema: {
|
|
391
|
+
backgroundColor: {
|
|
392
|
+
default: "default";
|
|
393
|
+
};
|
|
394
|
+
name: {
|
|
395
|
+
default: "";
|
|
396
|
+
};
|
|
397
|
+
url: {
|
|
398
|
+
default: "";
|
|
399
|
+
};
|
|
400
|
+
caption: {
|
|
401
|
+
default: "";
|
|
402
|
+
};
|
|
403
|
+
showPreview: {
|
|
404
|
+
default: true;
|
|
405
|
+
};
|
|
406
|
+
};
|
|
407
|
+
content: "none";
|
|
408
|
+
isFileBlock: true;
|
|
409
|
+
fileBlockAcceptMimeTypes: string[];
|
|
211
410
|
};
|
|
212
411
|
implementation: import("../../..").TiptapBlockImplementation<{
|
|
213
|
-
type: "
|
|
214
|
-
content: "table";
|
|
412
|
+
type: "audio";
|
|
215
413
|
propSchema: {
|
|
216
414
|
backgroundColor: {
|
|
217
415
|
default: "default";
|
|
218
416
|
};
|
|
219
|
-
|
|
220
|
-
default: "
|
|
417
|
+
name: {
|
|
418
|
+
default: "";
|
|
221
419
|
};
|
|
222
|
-
|
|
223
|
-
default: "
|
|
224
|
-
|
|
420
|
+
url: {
|
|
421
|
+
default: "";
|
|
422
|
+
};
|
|
423
|
+
caption: {
|
|
424
|
+
default: "";
|
|
425
|
+
};
|
|
426
|
+
showPreview: {
|
|
427
|
+
default: true;
|
|
225
428
|
};
|
|
226
429
|
};
|
|
430
|
+
content: "none";
|
|
431
|
+
isFileBlock: true;
|
|
432
|
+
fileBlockAcceptMimeTypes: string[];
|
|
227
433
|
}, any, import("../../..").InlineContentSchema, import("../../..").StyleSchema>;
|
|
228
434
|
};
|
|
229
435
|
}>, import("../../..").InlineContentSchemaFromSpecs<{
|
|
@@ -146,6 +146,120 @@ declare const schema: BlockNoteSchema<import("../../..").BlockSchemaFromSpecs<{
|
|
|
146
146
|
};
|
|
147
147
|
}, any, import("../../..").InlineContentSchema, import("../../..").StyleSchema>;
|
|
148
148
|
};
|
|
149
|
+
checkListItem: {
|
|
150
|
+
config: {
|
|
151
|
+
type: "checkListItem";
|
|
152
|
+
content: "inline";
|
|
153
|
+
propSchema: {
|
|
154
|
+
checked: {
|
|
155
|
+
default: false;
|
|
156
|
+
};
|
|
157
|
+
backgroundColor: {
|
|
158
|
+
default: "default";
|
|
159
|
+
};
|
|
160
|
+
textColor: {
|
|
161
|
+
default: "default";
|
|
162
|
+
};
|
|
163
|
+
textAlignment: {
|
|
164
|
+
default: "left";
|
|
165
|
+
values: readonly ["left", "center", "right", "justify"];
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
implementation: import("../../..").TiptapBlockImplementation<{
|
|
170
|
+
type: "checkListItem";
|
|
171
|
+
content: "inline";
|
|
172
|
+
propSchema: {
|
|
173
|
+
checked: {
|
|
174
|
+
default: false;
|
|
175
|
+
};
|
|
176
|
+
backgroundColor: {
|
|
177
|
+
default: "default";
|
|
178
|
+
};
|
|
179
|
+
textColor: {
|
|
180
|
+
default: "default";
|
|
181
|
+
};
|
|
182
|
+
textAlignment: {
|
|
183
|
+
default: "left";
|
|
184
|
+
values: readonly ["left", "center", "right", "justify"];
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
}, any, import("../../..").InlineContentSchema, import("../../..").StyleSchema>;
|
|
188
|
+
};
|
|
189
|
+
table: {
|
|
190
|
+
config: {
|
|
191
|
+
type: "table";
|
|
192
|
+
content: "table";
|
|
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
|
+
};
|
|
206
|
+
implementation: import("../../..").TiptapBlockImplementation<{
|
|
207
|
+
type: "table";
|
|
208
|
+
content: "table";
|
|
209
|
+
propSchema: {
|
|
210
|
+
backgroundColor: {
|
|
211
|
+
default: "default";
|
|
212
|
+
};
|
|
213
|
+
textColor: {
|
|
214
|
+
default: "default";
|
|
215
|
+
};
|
|
216
|
+
textAlignment: {
|
|
217
|
+
default: "left";
|
|
218
|
+
values: readonly ["left", "center", "right", "justify"];
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
}, any, import("../../..").InlineContentSchema, import("../../..").StyleSchema>;
|
|
222
|
+
};
|
|
223
|
+
file: {
|
|
224
|
+
config: {
|
|
225
|
+
type: "file";
|
|
226
|
+
propSchema: {
|
|
227
|
+
backgroundColor: {
|
|
228
|
+
default: "default";
|
|
229
|
+
};
|
|
230
|
+
name: {
|
|
231
|
+
default: "";
|
|
232
|
+
};
|
|
233
|
+
url: {
|
|
234
|
+
default: "";
|
|
235
|
+
};
|
|
236
|
+
caption: {
|
|
237
|
+
default: "";
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
content: "none";
|
|
241
|
+
isFileBlock: true;
|
|
242
|
+
};
|
|
243
|
+
implementation: import("../../..").TiptapBlockImplementation<{
|
|
244
|
+
type: "file";
|
|
245
|
+
propSchema: {
|
|
246
|
+
backgroundColor: {
|
|
247
|
+
default: "default";
|
|
248
|
+
};
|
|
249
|
+
name: {
|
|
250
|
+
default: "";
|
|
251
|
+
};
|
|
252
|
+
url: {
|
|
253
|
+
default: "";
|
|
254
|
+
};
|
|
255
|
+
caption: {
|
|
256
|
+
default: "";
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
content: "none";
|
|
260
|
+
isFileBlock: true;
|
|
261
|
+
}, any, import("../../..").InlineContentSchema, import("../../..").StyleSchema>;
|
|
262
|
+
};
|
|
149
263
|
image: {
|
|
150
264
|
config: {
|
|
151
265
|
type: "image";
|
|
@@ -157,17 +271,25 @@ declare const schema: BlockNoteSchema<import("../../..").BlockSchemaFromSpecs<{
|
|
|
157
271
|
backgroundColor: {
|
|
158
272
|
default: "default";
|
|
159
273
|
};
|
|
274
|
+
name: {
|
|
275
|
+
default: "";
|
|
276
|
+
};
|
|
160
277
|
url: {
|
|
161
278
|
default: "";
|
|
162
279
|
};
|
|
163
280
|
caption: {
|
|
164
281
|
default: "";
|
|
165
282
|
};
|
|
166
|
-
|
|
167
|
-
default:
|
|
283
|
+
showPreview: {
|
|
284
|
+
default: true;
|
|
285
|
+
};
|
|
286
|
+
previewWidth: {
|
|
287
|
+
default: number;
|
|
168
288
|
};
|
|
169
289
|
};
|
|
170
290
|
content: "none";
|
|
291
|
+
isFileBlock: true;
|
|
292
|
+
fileBlockAcceptMimeTypes: string[];
|
|
171
293
|
};
|
|
172
294
|
implementation: import("../../..").TiptapBlockImplementation<{
|
|
173
295
|
type: "image";
|
|
@@ -179,51 +301,135 @@ declare const schema: BlockNoteSchema<import("../../..").BlockSchemaFromSpecs<{
|
|
|
179
301
|
backgroundColor: {
|
|
180
302
|
default: "default";
|
|
181
303
|
};
|
|
304
|
+
name: {
|
|
305
|
+
default: "";
|
|
306
|
+
};
|
|
182
307
|
url: {
|
|
183
308
|
default: "";
|
|
184
309
|
};
|
|
185
310
|
caption: {
|
|
186
311
|
default: "";
|
|
187
312
|
};
|
|
188
|
-
|
|
189
|
-
default:
|
|
313
|
+
showPreview: {
|
|
314
|
+
default: true;
|
|
315
|
+
};
|
|
316
|
+
previewWidth: {
|
|
317
|
+
default: number;
|
|
190
318
|
};
|
|
191
319
|
};
|
|
192
320
|
content: "none";
|
|
321
|
+
isFileBlock: true;
|
|
322
|
+
fileBlockAcceptMimeTypes: string[];
|
|
193
323
|
}, any, import("../../..").InlineContentSchema, import("../../..").StyleSchema>;
|
|
194
324
|
};
|
|
195
|
-
|
|
325
|
+
video: {
|
|
196
326
|
config: {
|
|
197
|
-
type: "
|
|
198
|
-
content: "table";
|
|
327
|
+
type: "video";
|
|
199
328
|
propSchema: {
|
|
329
|
+
textAlignment: {
|
|
330
|
+
default: "left";
|
|
331
|
+
values: readonly ["left", "center", "right", "justify"];
|
|
332
|
+
};
|
|
200
333
|
backgroundColor: {
|
|
201
334
|
default: "default";
|
|
202
335
|
};
|
|
203
|
-
|
|
204
|
-
default: "
|
|
336
|
+
name: {
|
|
337
|
+
default: "";
|
|
338
|
+
};
|
|
339
|
+
url: {
|
|
340
|
+
default: "";
|
|
341
|
+
};
|
|
342
|
+
caption: {
|
|
343
|
+
default: "";
|
|
205
344
|
};
|
|
345
|
+
showPreview: {
|
|
346
|
+
default: true;
|
|
347
|
+
};
|
|
348
|
+
previewWidth: {
|
|
349
|
+
default: number;
|
|
350
|
+
};
|
|
351
|
+
};
|
|
352
|
+
content: "none";
|
|
353
|
+
isFileBlock: true;
|
|
354
|
+
fileBlockAcceptMimeTypes: string[];
|
|
355
|
+
};
|
|
356
|
+
implementation: import("../../..").TiptapBlockImplementation<{
|
|
357
|
+
type: "video";
|
|
358
|
+
propSchema: {
|
|
206
359
|
textAlignment: {
|
|
207
360
|
default: "left";
|
|
208
361
|
values: readonly ["left", "center", "right", "justify"];
|
|
209
362
|
};
|
|
363
|
+
backgroundColor: {
|
|
364
|
+
default: "default";
|
|
365
|
+
};
|
|
366
|
+
name: {
|
|
367
|
+
default: "";
|
|
368
|
+
};
|
|
369
|
+
url: {
|
|
370
|
+
default: "";
|
|
371
|
+
};
|
|
372
|
+
caption: {
|
|
373
|
+
default: "";
|
|
374
|
+
};
|
|
375
|
+
showPreview: {
|
|
376
|
+
default: true;
|
|
377
|
+
};
|
|
378
|
+
previewWidth: {
|
|
379
|
+
default: number;
|
|
380
|
+
};
|
|
210
381
|
};
|
|
382
|
+
content: "none";
|
|
383
|
+
isFileBlock: true;
|
|
384
|
+
fileBlockAcceptMimeTypes: string[];
|
|
385
|
+
}, any, import("../../..").InlineContentSchema, import("../../..").StyleSchema>;
|
|
386
|
+
};
|
|
387
|
+
audio: {
|
|
388
|
+
config: {
|
|
389
|
+
type: "audio";
|
|
390
|
+
propSchema: {
|
|
391
|
+
backgroundColor: {
|
|
392
|
+
default: "default";
|
|
393
|
+
};
|
|
394
|
+
name: {
|
|
395
|
+
default: "";
|
|
396
|
+
};
|
|
397
|
+
url: {
|
|
398
|
+
default: "";
|
|
399
|
+
};
|
|
400
|
+
caption: {
|
|
401
|
+
default: "";
|
|
402
|
+
};
|
|
403
|
+
showPreview: {
|
|
404
|
+
default: true;
|
|
405
|
+
};
|
|
406
|
+
};
|
|
407
|
+
content: "none";
|
|
408
|
+
isFileBlock: true;
|
|
409
|
+
fileBlockAcceptMimeTypes: string[];
|
|
211
410
|
};
|
|
212
411
|
implementation: import("../../..").TiptapBlockImplementation<{
|
|
213
|
-
type: "
|
|
214
|
-
content: "table";
|
|
412
|
+
type: "audio";
|
|
215
413
|
propSchema: {
|
|
216
414
|
backgroundColor: {
|
|
217
415
|
default: "default";
|
|
218
416
|
};
|
|
219
|
-
|
|
220
|
-
default: "
|
|
417
|
+
name: {
|
|
418
|
+
default: "";
|
|
221
419
|
};
|
|
222
|
-
|
|
223
|
-
default: "
|
|
224
|
-
|
|
420
|
+
url: {
|
|
421
|
+
default: "";
|
|
422
|
+
};
|
|
423
|
+
caption: {
|
|
424
|
+
default: "";
|
|
425
|
+
};
|
|
426
|
+
showPreview: {
|
|
427
|
+
default: true;
|
|
225
428
|
};
|
|
226
429
|
};
|
|
430
|
+
content: "none";
|
|
431
|
+
isFileBlock: true;
|
|
432
|
+
fileBlockAcceptMimeTypes: string[];
|
|
227
433
|
}, any, import("../../..").InlineContentSchema, import("../../..").StyleSchema>;
|
|
228
434
|
};
|
|
229
435
|
}>, import("../../..").InlineContentSchemaFromSpecs<{
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import type { BlockNoteEditor } from "../../editor/BlockNoteEditor";
|
|
2
|
+
import { BlockFromConfig, Props } from "../../schema";
|
|
3
|
+
export declare const audioPropSchema: {
|
|
4
|
+
backgroundColor: {
|
|
5
|
+
default: "default";
|
|
6
|
+
};
|
|
7
|
+
name: {
|
|
8
|
+
default: "";
|
|
9
|
+
};
|
|
10
|
+
url: {
|
|
11
|
+
default: "";
|
|
12
|
+
};
|
|
13
|
+
caption: {
|
|
14
|
+
default: "";
|
|
15
|
+
};
|
|
16
|
+
showPreview: {
|
|
17
|
+
default: true;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export declare const audioBlockConfig: {
|
|
21
|
+
type: "audio";
|
|
22
|
+
propSchema: {
|
|
23
|
+
backgroundColor: {
|
|
24
|
+
default: "default";
|
|
25
|
+
};
|
|
26
|
+
name: {
|
|
27
|
+
default: "";
|
|
28
|
+
};
|
|
29
|
+
url: {
|
|
30
|
+
default: "";
|
|
31
|
+
};
|
|
32
|
+
caption: {
|
|
33
|
+
default: "";
|
|
34
|
+
};
|
|
35
|
+
showPreview: {
|
|
36
|
+
default: true;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
content: "none";
|
|
40
|
+
isFileBlock: true;
|
|
41
|
+
fileBlockAcceptMimeTypes: string[];
|
|
42
|
+
};
|
|
43
|
+
export declare const audioRender: (block: BlockFromConfig<typeof audioBlockConfig, any, any>, editor: BlockNoteEditor<any, any, any>) => {
|
|
44
|
+
dom: HTMLDivElement;
|
|
45
|
+
destroy: () => void;
|
|
46
|
+
} | {
|
|
47
|
+
dom: HTMLDivElement;
|
|
48
|
+
destroy?: undefined;
|
|
49
|
+
};
|
|
50
|
+
export declare const audioParse: (element: HTMLElement) => Partial<Props<typeof audioBlockConfig.propSchema>> | undefined;
|
|
51
|
+
export declare const audioToExternalHTML: (block: BlockFromConfig<typeof audioBlockConfig, any, any>) => {
|
|
52
|
+
dom: HTMLElement;
|
|
53
|
+
};
|
|
54
|
+
export declare const AudioBlock: {
|
|
55
|
+
config: {
|
|
56
|
+
type: "audio";
|
|
57
|
+
propSchema: {
|
|
58
|
+
backgroundColor: {
|
|
59
|
+
default: "default";
|
|
60
|
+
};
|
|
61
|
+
name: {
|
|
62
|
+
default: "";
|
|
63
|
+
};
|
|
64
|
+
url: {
|
|
65
|
+
default: "";
|
|
66
|
+
};
|
|
67
|
+
caption: {
|
|
68
|
+
default: "";
|
|
69
|
+
};
|
|
70
|
+
showPreview: {
|
|
71
|
+
default: true;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
content: "none";
|
|
75
|
+
isFileBlock: true;
|
|
76
|
+
fileBlockAcceptMimeTypes: string[];
|
|
77
|
+
};
|
|
78
|
+
implementation: import("../../schema").TiptapBlockImplementation<{
|
|
79
|
+
type: "audio";
|
|
80
|
+
propSchema: {
|
|
81
|
+
backgroundColor: {
|
|
82
|
+
default: "default";
|
|
83
|
+
};
|
|
84
|
+
name: {
|
|
85
|
+
default: "";
|
|
86
|
+
};
|
|
87
|
+
url: {
|
|
88
|
+
default: "";
|
|
89
|
+
};
|
|
90
|
+
caption: {
|
|
91
|
+
default: "";
|
|
92
|
+
};
|
|
93
|
+
showPreview: {
|
|
94
|
+
default: true;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
content: "none";
|
|
98
|
+
isFileBlock: true;
|
|
99
|
+
fileBlockAcceptMimeTypes: string[];
|
|
100
|
+
}, any, import("../../schema").InlineContentSchema, import("../../schema").StyleSchema>;
|
|
101
|
+
};
|