@blocknote/core 0.13.2 → 0.13.3
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 +5282 -2785
- 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__/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/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__/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/nodeConversions/__snapshots__/nodeConversions.test.ts.snap +212 -4
- 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/testUtil/cases/customBlocks.ts +79 -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 +114 -4
- package/src/blocks/AudioBlockContent/AudioBlockContent.ts +162 -0
- package/src/blocks/AudioBlockContent/audioBlockHelpers.ts +5 -0
- package/src/blocks/FileBlockContent/FileBlockContent.ts +121 -0
- package/src/blocks/FileBlockContent/fileBlockHelpers.ts +377 -0
- package/src/blocks/ImageBlockContent/ImageBlockContent.ts +135 -356
- package/src/blocks/ImageBlockContent/imageBlockHelpers.ts +6 -0
- package/src/blocks/VideoBlockContent/VideoBlockContent.ts +182 -0
- package/src/blocks/VideoBlockContent/videoBlockHelpers.ts +6 -0
- package/src/blocks/defaultBlockTypeGuards.ts +53 -1
- package/src/blocks/defaultBlocks.ts +8 -2
- package/src/editor/Block.css +67 -27
- package/src/editor/BlockNoteEditor.ts +14 -10
- package/src/editor/BlockNoteSchema.ts +12 -3
- 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 +59 -2
- package/src/i18n/locales/en.ts +102 -11
- package/src/i18n/locales/fr.ts +104 -11
- package/src/i18n/locales/index.ts +8 -2
- package/src/i18n/locales/is.ts +288 -0
- package/src/i18n/locales/ja.ts +300 -0
- package/src/i18n/locales/ko.ts +292 -0
- package/src/i18n/locales/nl.ts +101 -8
- package/src/i18n/locales/pl.ts +280 -0
- package/src/i18n/locales/pt.ts +281 -0
- package/src/i18n/locales/vi.ts +281 -0
- package/src/i18n/locales/zh.ts +107 -8
- package/src/index.ts +9 -2
- package/src/pm-nodes/BlockContainer.ts +2 -2
- package/src/schema/blocks/createSpec.ts +1 -0
- package/src/schema/blocks/internal.ts +10 -0
- package/src/schema/blocks/types.ts +41 -5
- package/src/util/string.ts +12 -0
- package/types/src/api/testUtil/cases/customBlocks.d.ts +228 -42
- package/types/src/api/testUtil/cases/customInlineContent.d.ts +178 -4
- package/types/src/api/testUtil/cases/customStyles.d.ts +178 -4
- package/types/src/blocks/AudioBlockContent/AudioBlockContent.d.ts +104 -0
- package/types/src/blocks/AudioBlockContent/audioBlockHelpers.d.ts +3 -0
- package/types/src/blocks/FileBlockContent/FileBlockContent.d.ts +96 -0
- package/types/src/blocks/FileBlockContent/fileBlockHelpers.d.ts +30 -0
- package/types/src/blocks/ImageBlockContent/ImageBlockContent.d.ts +53 -14
- package/types/src/blocks/ImageBlockContent/imageBlockHelpers.d.ts +4 -0
- package/types/src/blocks/VideoBlockContent/VideoBlockContent.d.ts +132 -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 +356 -8
- package/types/src/editor/BlockNoteEditor.d.ts +5 -5
- package/types/src/extensions/{ImagePanel/ImageToolbarPlugin.d.ts → FilePanel/FilePanelPlugin.d.ts} +9 -12
- package/types/src/i18n/locales/en.d.ts +49 -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/schema/blocks/internal.d.ts +1 -1
- package/types/src/schema/blocks/types.d.ts +26 -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,48 @@ declare const schema: BlockNoteSchema<import("../../..").BlockSchemaFromSpecs<{
|
|
|
146
146
|
};
|
|
147
147
|
}, any, import("../../..").InlineContentSchema, import("../../..").StyleSchema>;
|
|
148
148
|
};
|
|
149
|
+
file: {
|
|
150
|
+
config: {
|
|
151
|
+
type: "file";
|
|
152
|
+
propSchema: {
|
|
153
|
+
backgroundColor: {
|
|
154
|
+
default: "default";
|
|
155
|
+
};
|
|
156
|
+
name: {
|
|
157
|
+
default: "";
|
|
158
|
+
};
|
|
159
|
+
url: {
|
|
160
|
+
default: "";
|
|
161
|
+
};
|
|
162
|
+
caption: {
|
|
163
|
+
default: "";
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
content: "none";
|
|
167
|
+
isFileBlock: true;
|
|
168
|
+
isFileBlockPlaceholder: (block: any) => boolean;
|
|
169
|
+
};
|
|
170
|
+
implementation: import("../../..").TiptapBlockImplementation<{
|
|
171
|
+
type: "file";
|
|
172
|
+
propSchema: {
|
|
173
|
+
backgroundColor: {
|
|
174
|
+
default: "default";
|
|
175
|
+
};
|
|
176
|
+
name: {
|
|
177
|
+
default: "";
|
|
178
|
+
};
|
|
179
|
+
url: {
|
|
180
|
+
default: "";
|
|
181
|
+
};
|
|
182
|
+
caption: {
|
|
183
|
+
default: "";
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
content: "none";
|
|
187
|
+
isFileBlock: true;
|
|
188
|
+
isFileBlockPlaceholder: (block: any) => boolean;
|
|
189
|
+
}, any, import("../../..").InlineContentSchema, import("../../..").StyleSchema>;
|
|
190
|
+
};
|
|
149
191
|
image: {
|
|
150
192
|
config: {
|
|
151
193
|
type: "image";
|
|
@@ -157,17 +199,26 @@ declare const schema: BlockNoteSchema<import("../../..").BlockSchemaFromSpecs<{
|
|
|
157
199
|
backgroundColor: {
|
|
158
200
|
default: "default";
|
|
159
201
|
};
|
|
202
|
+
name: {
|
|
203
|
+
default: "";
|
|
204
|
+
};
|
|
160
205
|
url: {
|
|
161
206
|
default: "";
|
|
162
207
|
};
|
|
163
208
|
caption: {
|
|
164
209
|
default: "";
|
|
165
210
|
};
|
|
166
|
-
|
|
167
|
-
default:
|
|
211
|
+
showPreview: {
|
|
212
|
+
default: true;
|
|
213
|
+
};
|
|
214
|
+
previewWidth: {
|
|
215
|
+
default: number;
|
|
168
216
|
};
|
|
169
217
|
};
|
|
170
218
|
content: "none";
|
|
219
|
+
isFileBlock: true;
|
|
220
|
+
isFileBlockPlaceholder: (block: any) => boolean;
|
|
221
|
+
fileBlockAcceptMimeTypes: string[];
|
|
171
222
|
};
|
|
172
223
|
implementation: import("../../..").TiptapBlockImplementation<{
|
|
173
224
|
type: "image";
|
|
@@ -179,17 +230,140 @@ declare const schema: BlockNoteSchema<import("../../..").BlockSchemaFromSpecs<{
|
|
|
179
230
|
backgroundColor: {
|
|
180
231
|
default: "default";
|
|
181
232
|
};
|
|
233
|
+
name: {
|
|
234
|
+
default: "";
|
|
235
|
+
};
|
|
236
|
+
url: {
|
|
237
|
+
default: "";
|
|
238
|
+
};
|
|
239
|
+
caption: {
|
|
240
|
+
default: "";
|
|
241
|
+
};
|
|
242
|
+
showPreview: {
|
|
243
|
+
default: true;
|
|
244
|
+
};
|
|
245
|
+
previewWidth: {
|
|
246
|
+
default: number;
|
|
247
|
+
};
|
|
248
|
+
};
|
|
249
|
+
content: "none";
|
|
250
|
+
isFileBlock: true;
|
|
251
|
+
isFileBlockPlaceholder: (block: any) => boolean;
|
|
252
|
+
fileBlockAcceptMimeTypes: string[];
|
|
253
|
+
}, any, import("../../..").InlineContentSchema, import("../../..").StyleSchema>;
|
|
254
|
+
};
|
|
255
|
+
video: {
|
|
256
|
+
config: {
|
|
257
|
+
type: "video";
|
|
258
|
+
propSchema: {
|
|
259
|
+
textAlignment: {
|
|
260
|
+
default: "left";
|
|
261
|
+
values: readonly ["left", "center", "right", "justify"];
|
|
262
|
+
};
|
|
263
|
+
backgroundColor: {
|
|
264
|
+
default: "default";
|
|
265
|
+
};
|
|
266
|
+
name: {
|
|
267
|
+
default: "";
|
|
268
|
+
};
|
|
269
|
+
url: {
|
|
270
|
+
default: "";
|
|
271
|
+
};
|
|
272
|
+
caption: {
|
|
273
|
+
default: "";
|
|
274
|
+
};
|
|
275
|
+
showPreview: {
|
|
276
|
+
default: true;
|
|
277
|
+
};
|
|
278
|
+
previewWidth: {
|
|
279
|
+
default: number;
|
|
280
|
+
};
|
|
281
|
+
};
|
|
282
|
+
content: "none";
|
|
283
|
+
isFileBlock: true;
|
|
284
|
+
isFileBlockPlaceholder: (block: any) => boolean;
|
|
285
|
+
fileBlockAcceptMimeTypes: string[];
|
|
286
|
+
};
|
|
287
|
+
implementation: import("../../..").TiptapBlockImplementation<{
|
|
288
|
+
type: "video";
|
|
289
|
+
propSchema: {
|
|
290
|
+
textAlignment: {
|
|
291
|
+
default: "left";
|
|
292
|
+
values: readonly ["left", "center", "right", "justify"];
|
|
293
|
+
};
|
|
294
|
+
backgroundColor: {
|
|
295
|
+
default: "default";
|
|
296
|
+
};
|
|
297
|
+
name: {
|
|
298
|
+
default: "";
|
|
299
|
+
};
|
|
300
|
+
url: {
|
|
301
|
+
default: "";
|
|
302
|
+
};
|
|
303
|
+
caption: {
|
|
304
|
+
default: "";
|
|
305
|
+
};
|
|
306
|
+
showPreview: {
|
|
307
|
+
default: true;
|
|
308
|
+
};
|
|
309
|
+
previewWidth: {
|
|
310
|
+
default: number;
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
content: "none";
|
|
314
|
+
isFileBlock: true;
|
|
315
|
+
isFileBlockPlaceholder: (block: any) => boolean;
|
|
316
|
+
fileBlockAcceptMimeTypes: string[];
|
|
317
|
+
}, any, import("../../..").InlineContentSchema, import("../../..").StyleSchema>;
|
|
318
|
+
};
|
|
319
|
+
audio: {
|
|
320
|
+
config: {
|
|
321
|
+
type: "audio";
|
|
322
|
+
propSchema: {
|
|
323
|
+
backgroundColor: {
|
|
324
|
+
default: "default";
|
|
325
|
+
};
|
|
326
|
+
name: {
|
|
327
|
+
default: "";
|
|
328
|
+
};
|
|
329
|
+
url: {
|
|
330
|
+
default: "";
|
|
331
|
+
};
|
|
332
|
+
caption: {
|
|
333
|
+
default: "";
|
|
334
|
+
};
|
|
335
|
+
showPreview: {
|
|
336
|
+
default: true;
|
|
337
|
+
};
|
|
338
|
+
};
|
|
339
|
+
content: "none";
|
|
340
|
+
isFileBlock: true;
|
|
341
|
+
isFileBlockPlaceholder: (block: any) => boolean;
|
|
342
|
+
fileBlockAcceptMimeTypes: string[];
|
|
343
|
+
};
|
|
344
|
+
implementation: import("../../..").TiptapBlockImplementation<{
|
|
345
|
+
type: "audio";
|
|
346
|
+
propSchema: {
|
|
347
|
+
backgroundColor: {
|
|
348
|
+
default: "default";
|
|
349
|
+
};
|
|
350
|
+
name: {
|
|
351
|
+
default: "";
|
|
352
|
+
};
|
|
182
353
|
url: {
|
|
183
354
|
default: "";
|
|
184
355
|
};
|
|
185
356
|
caption: {
|
|
186
357
|
default: "";
|
|
187
358
|
};
|
|
188
|
-
|
|
189
|
-
default:
|
|
359
|
+
showPreview: {
|
|
360
|
+
default: true;
|
|
190
361
|
};
|
|
191
362
|
};
|
|
192
363
|
content: "none";
|
|
364
|
+
isFileBlock: true;
|
|
365
|
+
isFileBlockPlaceholder: (block: any) => boolean;
|
|
366
|
+
fileBlockAcceptMimeTypes: string[];
|
|
193
367
|
}, any, import("../../..").InlineContentSchema, import("../../..").StyleSchema>;
|
|
194
368
|
};
|
|
195
369
|
table: {
|
|
@@ -146,6 +146,48 @@ declare const schema: BlockNoteSchema<import("../../..").BlockSchemaFromSpecs<{
|
|
|
146
146
|
};
|
|
147
147
|
}, any, import("../../..").InlineContentSchema, import("../../..").StyleSchema>;
|
|
148
148
|
};
|
|
149
|
+
file: {
|
|
150
|
+
config: {
|
|
151
|
+
type: "file";
|
|
152
|
+
propSchema: {
|
|
153
|
+
backgroundColor: {
|
|
154
|
+
default: "default";
|
|
155
|
+
};
|
|
156
|
+
name: {
|
|
157
|
+
default: "";
|
|
158
|
+
};
|
|
159
|
+
url: {
|
|
160
|
+
default: "";
|
|
161
|
+
};
|
|
162
|
+
caption: {
|
|
163
|
+
default: "";
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
content: "none";
|
|
167
|
+
isFileBlock: true;
|
|
168
|
+
isFileBlockPlaceholder: (block: any) => boolean;
|
|
169
|
+
};
|
|
170
|
+
implementation: import("../../..").TiptapBlockImplementation<{
|
|
171
|
+
type: "file";
|
|
172
|
+
propSchema: {
|
|
173
|
+
backgroundColor: {
|
|
174
|
+
default: "default";
|
|
175
|
+
};
|
|
176
|
+
name: {
|
|
177
|
+
default: "";
|
|
178
|
+
};
|
|
179
|
+
url: {
|
|
180
|
+
default: "";
|
|
181
|
+
};
|
|
182
|
+
caption: {
|
|
183
|
+
default: "";
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
content: "none";
|
|
187
|
+
isFileBlock: true;
|
|
188
|
+
isFileBlockPlaceholder: (block: any) => boolean;
|
|
189
|
+
}, any, import("../../..").InlineContentSchema, import("../../..").StyleSchema>;
|
|
190
|
+
};
|
|
149
191
|
image: {
|
|
150
192
|
config: {
|
|
151
193
|
type: "image";
|
|
@@ -157,17 +199,26 @@ declare const schema: BlockNoteSchema<import("../../..").BlockSchemaFromSpecs<{
|
|
|
157
199
|
backgroundColor: {
|
|
158
200
|
default: "default";
|
|
159
201
|
};
|
|
202
|
+
name: {
|
|
203
|
+
default: "";
|
|
204
|
+
};
|
|
160
205
|
url: {
|
|
161
206
|
default: "";
|
|
162
207
|
};
|
|
163
208
|
caption: {
|
|
164
209
|
default: "";
|
|
165
210
|
};
|
|
166
|
-
|
|
167
|
-
default:
|
|
211
|
+
showPreview: {
|
|
212
|
+
default: true;
|
|
213
|
+
};
|
|
214
|
+
previewWidth: {
|
|
215
|
+
default: number;
|
|
168
216
|
};
|
|
169
217
|
};
|
|
170
218
|
content: "none";
|
|
219
|
+
isFileBlock: true;
|
|
220
|
+
isFileBlockPlaceholder: (block: any) => boolean;
|
|
221
|
+
fileBlockAcceptMimeTypes: string[];
|
|
171
222
|
};
|
|
172
223
|
implementation: import("../../..").TiptapBlockImplementation<{
|
|
173
224
|
type: "image";
|
|
@@ -179,17 +230,140 @@ declare const schema: BlockNoteSchema<import("../../..").BlockSchemaFromSpecs<{
|
|
|
179
230
|
backgroundColor: {
|
|
180
231
|
default: "default";
|
|
181
232
|
};
|
|
233
|
+
name: {
|
|
234
|
+
default: "";
|
|
235
|
+
};
|
|
236
|
+
url: {
|
|
237
|
+
default: "";
|
|
238
|
+
};
|
|
239
|
+
caption: {
|
|
240
|
+
default: "";
|
|
241
|
+
};
|
|
242
|
+
showPreview: {
|
|
243
|
+
default: true;
|
|
244
|
+
};
|
|
245
|
+
previewWidth: {
|
|
246
|
+
default: number;
|
|
247
|
+
};
|
|
248
|
+
};
|
|
249
|
+
content: "none";
|
|
250
|
+
isFileBlock: true;
|
|
251
|
+
isFileBlockPlaceholder: (block: any) => boolean;
|
|
252
|
+
fileBlockAcceptMimeTypes: string[];
|
|
253
|
+
}, any, import("../../..").InlineContentSchema, import("../../..").StyleSchema>;
|
|
254
|
+
};
|
|
255
|
+
video: {
|
|
256
|
+
config: {
|
|
257
|
+
type: "video";
|
|
258
|
+
propSchema: {
|
|
259
|
+
textAlignment: {
|
|
260
|
+
default: "left";
|
|
261
|
+
values: readonly ["left", "center", "right", "justify"];
|
|
262
|
+
};
|
|
263
|
+
backgroundColor: {
|
|
264
|
+
default: "default";
|
|
265
|
+
};
|
|
266
|
+
name: {
|
|
267
|
+
default: "";
|
|
268
|
+
};
|
|
269
|
+
url: {
|
|
270
|
+
default: "";
|
|
271
|
+
};
|
|
272
|
+
caption: {
|
|
273
|
+
default: "";
|
|
274
|
+
};
|
|
275
|
+
showPreview: {
|
|
276
|
+
default: true;
|
|
277
|
+
};
|
|
278
|
+
previewWidth: {
|
|
279
|
+
default: number;
|
|
280
|
+
};
|
|
281
|
+
};
|
|
282
|
+
content: "none";
|
|
283
|
+
isFileBlock: true;
|
|
284
|
+
isFileBlockPlaceholder: (block: any) => boolean;
|
|
285
|
+
fileBlockAcceptMimeTypes: string[];
|
|
286
|
+
};
|
|
287
|
+
implementation: import("../../..").TiptapBlockImplementation<{
|
|
288
|
+
type: "video";
|
|
289
|
+
propSchema: {
|
|
290
|
+
textAlignment: {
|
|
291
|
+
default: "left";
|
|
292
|
+
values: readonly ["left", "center", "right", "justify"];
|
|
293
|
+
};
|
|
294
|
+
backgroundColor: {
|
|
295
|
+
default: "default";
|
|
296
|
+
};
|
|
297
|
+
name: {
|
|
298
|
+
default: "";
|
|
299
|
+
};
|
|
300
|
+
url: {
|
|
301
|
+
default: "";
|
|
302
|
+
};
|
|
303
|
+
caption: {
|
|
304
|
+
default: "";
|
|
305
|
+
};
|
|
306
|
+
showPreview: {
|
|
307
|
+
default: true;
|
|
308
|
+
};
|
|
309
|
+
previewWidth: {
|
|
310
|
+
default: number;
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
content: "none";
|
|
314
|
+
isFileBlock: true;
|
|
315
|
+
isFileBlockPlaceholder: (block: any) => boolean;
|
|
316
|
+
fileBlockAcceptMimeTypes: string[];
|
|
317
|
+
}, any, import("../../..").InlineContentSchema, import("../../..").StyleSchema>;
|
|
318
|
+
};
|
|
319
|
+
audio: {
|
|
320
|
+
config: {
|
|
321
|
+
type: "audio";
|
|
322
|
+
propSchema: {
|
|
323
|
+
backgroundColor: {
|
|
324
|
+
default: "default";
|
|
325
|
+
};
|
|
326
|
+
name: {
|
|
327
|
+
default: "";
|
|
328
|
+
};
|
|
329
|
+
url: {
|
|
330
|
+
default: "";
|
|
331
|
+
};
|
|
332
|
+
caption: {
|
|
333
|
+
default: "";
|
|
334
|
+
};
|
|
335
|
+
showPreview: {
|
|
336
|
+
default: true;
|
|
337
|
+
};
|
|
338
|
+
};
|
|
339
|
+
content: "none";
|
|
340
|
+
isFileBlock: true;
|
|
341
|
+
isFileBlockPlaceholder: (block: any) => boolean;
|
|
342
|
+
fileBlockAcceptMimeTypes: string[];
|
|
343
|
+
};
|
|
344
|
+
implementation: import("../../..").TiptapBlockImplementation<{
|
|
345
|
+
type: "audio";
|
|
346
|
+
propSchema: {
|
|
347
|
+
backgroundColor: {
|
|
348
|
+
default: "default";
|
|
349
|
+
};
|
|
350
|
+
name: {
|
|
351
|
+
default: "";
|
|
352
|
+
};
|
|
182
353
|
url: {
|
|
183
354
|
default: "";
|
|
184
355
|
};
|
|
185
356
|
caption: {
|
|
186
357
|
default: "";
|
|
187
358
|
};
|
|
188
|
-
|
|
189
|
-
default:
|
|
359
|
+
showPreview: {
|
|
360
|
+
default: true;
|
|
190
361
|
};
|
|
191
362
|
};
|
|
192
363
|
content: "none";
|
|
364
|
+
isFileBlock: true;
|
|
365
|
+
isFileBlockPlaceholder: (block: any) => boolean;
|
|
366
|
+
fileBlockAcceptMimeTypes: string[];
|
|
193
367
|
}, any, import("../../..").InlineContentSchema, import("../../..").StyleSchema>;
|
|
194
368
|
};
|
|
195
369
|
table: {
|
|
@@ -0,0 +1,104 @@
|
|
|
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
|
+
isFileBlockPlaceholder: (block: any) => boolean;
|
|
42
|
+
fileBlockAcceptMimeTypes: string[];
|
|
43
|
+
};
|
|
44
|
+
export declare const audioRender: (block: BlockFromConfig<typeof audioBlockConfig, any, any>, editor: BlockNoteEditor<any, any, any>) => {
|
|
45
|
+
dom: HTMLDivElement;
|
|
46
|
+
destroy: () => void;
|
|
47
|
+
} | {
|
|
48
|
+
dom: HTMLDivElement;
|
|
49
|
+
destroy?: undefined;
|
|
50
|
+
};
|
|
51
|
+
export declare const audioParse: (element: HTMLElement) => Partial<Props<typeof audioBlockConfig.propSchema>> | undefined;
|
|
52
|
+
export declare const audioToExternalHTML: (block: BlockFromConfig<typeof audioBlockConfig, any, any>) => {
|
|
53
|
+
dom: HTMLElement;
|
|
54
|
+
};
|
|
55
|
+
export declare const AudioBlock: {
|
|
56
|
+
config: {
|
|
57
|
+
type: "audio";
|
|
58
|
+
propSchema: {
|
|
59
|
+
backgroundColor: {
|
|
60
|
+
default: "default";
|
|
61
|
+
};
|
|
62
|
+
name: {
|
|
63
|
+
default: "";
|
|
64
|
+
};
|
|
65
|
+
url: {
|
|
66
|
+
default: "";
|
|
67
|
+
};
|
|
68
|
+
caption: {
|
|
69
|
+
default: "";
|
|
70
|
+
};
|
|
71
|
+
showPreview: {
|
|
72
|
+
default: true;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
content: "none";
|
|
76
|
+
isFileBlock: true;
|
|
77
|
+
isFileBlockPlaceholder: (block: any) => boolean;
|
|
78
|
+
fileBlockAcceptMimeTypes: string[];
|
|
79
|
+
};
|
|
80
|
+
implementation: import("../../schema").TiptapBlockImplementation<{
|
|
81
|
+
type: "audio";
|
|
82
|
+
propSchema: {
|
|
83
|
+
backgroundColor: {
|
|
84
|
+
default: "default";
|
|
85
|
+
};
|
|
86
|
+
name: {
|
|
87
|
+
default: "";
|
|
88
|
+
};
|
|
89
|
+
url: {
|
|
90
|
+
default: "";
|
|
91
|
+
};
|
|
92
|
+
caption: {
|
|
93
|
+
default: "";
|
|
94
|
+
};
|
|
95
|
+
showPreview: {
|
|
96
|
+
default: true;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
content: "none";
|
|
100
|
+
isFileBlock: true;
|
|
101
|
+
isFileBlockPlaceholder: (block: any) => boolean;
|
|
102
|
+
fileBlockAcceptMimeTypes: string[];
|
|
103
|
+
}, any, import("../../schema").InlineContentSchema, import("../../schema").StyleSchema>;
|
|
104
|
+
};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type { BlockNoteEditor } from "../../editor/BlockNoteEditor";
|
|
2
|
+
import { BlockFromConfig } from "../../schema";
|
|
3
|
+
export declare const filePropSchema: {
|
|
4
|
+
backgroundColor: {
|
|
5
|
+
default: "default";
|
|
6
|
+
};
|
|
7
|
+
name: {
|
|
8
|
+
default: "";
|
|
9
|
+
};
|
|
10
|
+
url: {
|
|
11
|
+
default: "";
|
|
12
|
+
};
|
|
13
|
+
caption: {
|
|
14
|
+
default: "";
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export declare const fileBlockConfig: {
|
|
18
|
+
type: "file";
|
|
19
|
+
propSchema: {
|
|
20
|
+
backgroundColor: {
|
|
21
|
+
default: "default";
|
|
22
|
+
};
|
|
23
|
+
name: {
|
|
24
|
+
default: "";
|
|
25
|
+
};
|
|
26
|
+
url: {
|
|
27
|
+
default: "";
|
|
28
|
+
};
|
|
29
|
+
caption: {
|
|
30
|
+
default: "";
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
content: "none";
|
|
34
|
+
isFileBlock: true;
|
|
35
|
+
isFileBlockPlaceholder: (block: any) => boolean;
|
|
36
|
+
};
|
|
37
|
+
export declare const fileRender: (block: BlockFromConfig<typeof fileBlockConfig, any, any>, editor: BlockNoteEditor<any, any, any>) => {
|
|
38
|
+
dom: HTMLDivElement;
|
|
39
|
+
destroy: () => void;
|
|
40
|
+
} | {
|
|
41
|
+
dom: HTMLDivElement;
|
|
42
|
+
destroy?: undefined;
|
|
43
|
+
};
|
|
44
|
+
export declare const fileParse: (element: HTMLElement) => {
|
|
45
|
+
url: string | undefined;
|
|
46
|
+
} | {
|
|
47
|
+
caption: string | undefined;
|
|
48
|
+
url: string | undefined;
|
|
49
|
+
} | undefined;
|
|
50
|
+
export declare const fileToExternalHTML: (block: BlockFromConfig<typeof fileBlockConfig, any, any>) => {
|
|
51
|
+
dom: HTMLParagraphElement;
|
|
52
|
+
} | {
|
|
53
|
+
dom: HTMLAnchorElement;
|
|
54
|
+
};
|
|
55
|
+
export declare const FileBlock: {
|
|
56
|
+
config: {
|
|
57
|
+
type: "file";
|
|
58
|
+
propSchema: {
|
|
59
|
+
backgroundColor: {
|
|
60
|
+
default: "default";
|
|
61
|
+
};
|
|
62
|
+
name: {
|
|
63
|
+
default: "";
|
|
64
|
+
};
|
|
65
|
+
url: {
|
|
66
|
+
default: "";
|
|
67
|
+
};
|
|
68
|
+
caption: {
|
|
69
|
+
default: "";
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
content: "none";
|
|
73
|
+
isFileBlock: true;
|
|
74
|
+
isFileBlockPlaceholder: (block: any) => boolean;
|
|
75
|
+
};
|
|
76
|
+
implementation: import("../../schema").TiptapBlockImplementation<{
|
|
77
|
+
type: "file";
|
|
78
|
+
propSchema: {
|
|
79
|
+
backgroundColor: {
|
|
80
|
+
default: "default";
|
|
81
|
+
};
|
|
82
|
+
name: {
|
|
83
|
+
default: "";
|
|
84
|
+
};
|
|
85
|
+
url: {
|
|
86
|
+
default: "";
|
|
87
|
+
};
|
|
88
|
+
caption: {
|
|
89
|
+
default: "";
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
content: "none";
|
|
93
|
+
isFileBlock: true;
|
|
94
|
+
isFileBlockPlaceholder: (block: any) => boolean;
|
|
95
|
+
}, any, import("../../schema").InlineContentSchema, import("../../schema").StyleSchema>;
|
|
96
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { BlockNoteEditor } from "../../editor/BlockNoteEditor";
|
|
2
|
+
import { BlockFromConfig, FileBlockConfig } from "../../schema";
|
|
3
|
+
export declare const createDefaultFilePreview: (block: BlockFromConfig<FileBlockConfig, any, any>) => {
|
|
4
|
+
dom: HTMLElement;
|
|
5
|
+
destroy?: () => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const createFileAndCaptionWrapper: (block: BlockFromConfig<FileBlockConfig, any, any>, file: HTMLElement) => {
|
|
8
|
+
dom: HTMLDivElement;
|
|
9
|
+
};
|
|
10
|
+
export declare const createAddFileButton: (block: BlockFromConfig<FileBlockConfig, any, any>, editor: BlockNoteEditor<any, any, any>, buttonText?: string, buttonIcon?: HTMLElement) => {
|
|
11
|
+
dom: HTMLDivElement;
|
|
12
|
+
destroy: () => void;
|
|
13
|
+
};
|
|
14
|
+
export declare const parseEmbedElement: (embedElement: HTMLEmbedElement) => {
|
|
15
|
+
url: string | undefined;
|
|
16
|
+
};
|
|
17
|
+
export declare const parseFigureElement: (figureElement: HTMLElement, targetTag: string) => {
|
|
18
|
+
targetElement: HTMLElement;
|
|
19
|
+
caption: string | undefined;
|
|
20
|
+
} | undefined;
|
|
21
|
+
export declare const createLinkWithCaption: (element: HTMLElement, caption: string) => {
|
|
22
|
+
dom: HTMLDivElement;
|
|
23
|
+
};
|
|
24
|
+
export declare const createFigureWithCaption: (element: HTMLElement, caption: string) => {
|
|
25
|
+
dom: HTMLElement;
|
|
26
|
+
};
|
|
27
|
+
export declare const createResizeHandlesWrapper: (block: BlockFromConfig<FileBlockConfig, any, any>, editor: BlockNoteEditor<any, any, any>, element: HTMLElement, getWidth: () => number, setWidth: (width: number) => void) => {
|
|
28
|
+
dom: HTMLElement;
|
|
29
|
+
destroy: () => void;
|
|
30
|
+
};
|