@blocknote/core 0.15.5 → 0.15.7

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.
Files changed (38) hide show
  1. package/dist/blocknote.js +2037 -1944
  2. package/dist/blocknote.js.map +1 -1
  3. package/dist/blocknote.umd.cjs +6 -6
  4. package/dist/blocknote.umd.cjs.map +1 -1
  5. package/dist/webpack-stats.json +1 -1
  6. package/package.json +2 -2
  7. package/src/api/exporters/copyExtension.ts +25 -21
  8. package/src/api/exporters/html/externalHTMLExporter.ts +15 -6
  9. package/src/api/exporters/html/htmlConversion.test.ts +8 -3
  10. package/src/api/exporters/html/util/simplifyBlocksRehypePlugin.ts +11 -3
  11. package/src/api/exporters/markdown/markdownExporter.ts +25 -12
  12. package/src/api/exporters/markdown/util/addSpacesToCheckboxesRehypePlugin.ts +12 -2
  13. package/src/api/parsers/handleFileInsertion.ts +65 -14
  14. package/src/api/parsers/html/util/nestedLists.test.ts +8 -8
  15. package/src/api/parsers/markdown/parseMarkdown.ts +11 -12
  16. package/src/blocks/AudioBlockContent/AudioBlockContent.ts +1 -1
  17. package/src/blocks/ImageBlockContent/ImageBlockContent.ts +1 -1
  18. package/src/blocks/VideoBlockContent/VideoBlockContent.ts +1 -1
  19. package/src/editor/BlockNoteEditor.ts +34 -10
  20. package/src/extensions/SideMenu/SideMenuPlugin.ts +3 -1
  21. package/src/extensions/SuggestionMenu/SuggestionPlugin.ts +16 -7
  22. package/src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts +6 -1
  23. package/src/index.ts +7 -6
  24. package/src/schema/blocks/types.ts +1 -1
  25. package/src/util/esmDependencies.ts +51 -0
  26. package/types/src/api/exporters/markdown/markdownExporter.d.ts +1 -1
  27. package/types/src/api/testUtil/cases/customBlocks.d.ts +6 -6
  28. package/types/src/api/testUtil/cases/customInlineContent.d.ts +6 -6
  29. package/types/src/api/testUtil/cases/customStyles.d.ts +6 -6
  30. package/types/src/blocks/AudioBlockContent/AudioBlockContent.d.ts +3 -3
  31. package/types/src/blocks/ImageBlockContent/ImageBlockContent.d.ts +3 -3
  32. package/types/src/blocks/VideoBlockContent/VideoBlockContent.d.ts +3 -3
  33. package/types/src/blocks/defaultBlocks.d.ts +12 -12
  34. package/types/src/editor/BlockNoteEditor.d.ts +5 -2
  35. package/types/src/extensions/SuggestionMenu/SuggestionPlugin.d.ts +1 -0
  36. package/types/src/index.d.ts +7 -6
  37. package/types/src/schema/blocks/types.d.ts +1 -1
  38. package/types/src/util/esmDependencies.d.ts +24 -0
@@ -68,6 +68,7 @@ import { en } from "../i18n/locales";
68
68
  import { Transaction } from "@tiptap/pm/state";
69
69
  import { createInternalHTMLSerializer } from "../api/exporters/html/internalHTMLSerializer";
70
70
  import "../style.css";
71
+ import { initializeESMDependencies } from "../util/esmDependencies";
71
72
 
72
73
  export type BlockNoteEditorOptions<
73
74
  BSchema extends BlockSchema,
@@ -271,7 +272,7 @@ export class BlockNoteEditor<
271
272
  return new BlockNoteEditor<BSchema, ISchema, SSchema>(options);
272
273
  }
273
274
 
274
- private constructor(
275
+ protected constructor(
275
276
  private readonly options: Partial<BlockNoteEditorOptions<any, any, any>>
276
277
  ) {
277
278
  const anyOpts = options as any;
@@ -402,6 +403,10 @@ export class BlockNoteEditor<
402
403
  editorProps: {
403
404
  ...newOptions._tiptapOptions?.editorProps,
404
405
  attributes: {
406
+ // As of TipTap v2.5.0 the tabIndex is removed when the editor is not
407
+ // editable, so you can't focus it. We want to revert this as we have
408
+ // UI behaviour that relies on it.
409
+ tabIndex: "0",
405
410
  ...newOptions._tiptapOptions?.editorProps?.attributes,
406
411
  ...newOptions.domAttributes?.editor,
407
412
  class: mergeCSSClasses(
@@ -719,9 +724,16 @@ export class BlockNoteEditor<
719
724
  return true;
720
725
  }
721
726
 
727
+ // Fixed the block pos and size
728
+ // all block is wrapped with a blockContent wrapper
729
+ // and blockContent wrapper pos = inner block pos - 1
730
+ // blockContent wrapper end = inner block pos + nodeSize + 1
731
+ // need to add 1 to start and -1 to end
732
+ const end = pos + node.nodeSize - 1;
733
+ const start = pos + 1;
722
734
  if (
723
- pos + node.nodeSize < this._tiptapEditor.state.selection.from ||
724
- pos > this._tiptapEditor.state.selection.to
735
+ end <= this._tiptapEditor.state.selection.from ||
736
+ start >= this._tiptapEditor.state.selection.to
725
737
  ) {
726
738
  return true;
727
739
  }
@@ -1016,6 +1028,7 @@ export class BlockNoteEditor<
1016
1028
  public async blocksToHTMLLossy(
1017
1029
  blocks: PartialBlock<BSchema, ISchema, SSchema>[] = this.document
1018
1030
  ): Promise<string> {
1031
+ await initializeESMDependencies();
1019
1032
  const exporter = createExternalHTMLExporter(this.pmSchema, this);
1020
1033
  return exporter.exportBlocks(blocks, {});
1021
1034
  }
@@ -1146,15 +1159,26 @@ export class BlockNoteEditor<
1146
1159
  };
1147
1160
  }
1148
1161
 
1149
- public openSelectionMenu(triggerCharacter: string) {
1162
+ public openSuggestionMenu(
1163
+ triggerCharacter: string,
1164
+ pluginState?: {
1165
+ deleteTriggerCharacter?: boolean;
1166
+ ignoreQueryLength?: boolean;
1167
+ }
1168
+ ) {
1169
+ const tr = this.prosemirrorView.state.tr;
1170
+ const transaction =
1171
+ pluginState && pluginState.deleteTriggerCharacter
1172
+ ? tr.insertText(triggerCharacter)
1173
+ : tr;
1174
+
1150
1175
  this.prosemirrorView.focus();
1151
1176
  this.prosemirrorView.dispatch(
1152
- this.prosemirrorView.state.tr
1153
- .scrollIntoView()
1154
- .setMeta(this.suggestionMenus.plugin, {
1155
- triggerCharacter: triggerCharacter,
1156
- fromUserInput: false,
1157
- })
1177
+ transaction.scrollIntoView().setMeta(this.suggestionMenus.plugin, {
1178
+ triggerCharacter: triggerCharacter,
1179
+ deleteTriggerCharacter: pluginState?.deleteTriggerCharacter || false,
1180
+ ignoreQueryLength: pluginState?.ignoreQueryLength || false,
1181
+ })
1158
1182
  );
1159
1183
  }
1160
1184
  }
@@ -12,6 +12,7 @@ import type { BlockNoteEditor } from "../../editor/BlockNoteEditor";
12
12
  import { UiElementPosition } from "../../extensions-shared/UiElementPosition";
13
13
  import { BlockSchema, InlineContentSchema, StyleSchema } from "../../schema";
14
14
  import { EventEmitter } from "../../util/EventEmitter";
15
+ import { initializeESMDependencies } from "../../util/esmDependencies";
15
16
  import { MultipleNodeSelection } from "./MultipleNodeSelection";
16
17
 
17
18
  let dragImageElement: Element | undefined;
@@ -302,6 +303,7 @@ export class SideMenuView<
302
303
  "dragover",
303
304
  this.onDragOver as EventListener
304
305
  );
306
+ initializeESMDependencies();
305
307
  this.pmView.dom.addEventListener("dragstart", this.onDragStart);
306
308
 
307
309
  // Shows or updates menu position whenever the cursor moves, if the menu isn't frozen.
@@ -662,7 +664,7 @@ export class SideMenuView<
662
664
  }
663
665
 
664
666
  // Focuses and activates the slash menu.
665
- this.editor.openSelectionMenu("/");
667
+ this.editor.openSuggestionMenu("/");
666
668
  }
667
669
  }
668
670
 
@@ -11,6 +11,7 @@ const findBlock = findParentNode((node) => node.type.name === "blockContainer");
11
11
 
12
12
  export type SuggestionMenuState = UiElementPosition & {
13
13
  query: string;
14
+ ignoreQueryLength?: boolean;
14
15
  };
15
16
 
16
17
  class SuggestionMenuView<
@@ -34,7 +35,10 @@ class SuggestionMenuView<
34
35
  throw new Error("Attempting to update uninitialized suggestions menu");
35
36
  }
36
37
 
37
- emitUpdate(menuName, this.state);
38
+ emitUpdate(menuName, {
39
+ ...this.state,
40
+ ignoreQueryLength: this.pluginState?.ignoreQueryLength,
41
+ });
38
42
  };
39
43
 
40
44
  this.rootEl = this.editor._tiptapEditor.view.root;
@@ -120,7 +124,7 @@ class SuggestionMenuView<
120
124
  .deleteRange({
121
125
  from:
122
126
  this.pluginState.queryStartPos! -
123
- (this.pluginState.fromUserInput
127
+ (this.pluginState.deleteTriggerCharacter
124
128
  ? this.pluginState.triggerCharacter!.length
125
129
  : 0),
126
130
  to: this.editor._tiptapEditor.state.selection.from,
@@ -132,10 +136,11 @@ class SuggestionMenuView<
132
136
  type SuggestionPluginState =
133
137
  | {
134
138
  triggerCharacter: string;
135
- fromUserInput: boolean;
139
+ deleteTriggerCharacter: boolean;
136
140
  queryStartPos: number;
137
141
  query: string;
138
142
  decorationId: string;
143
+ ignoreQueryLength?: boolean;
139
144
  }
140
145
  | undefined;
141
146
 
@@ -194,7 +199,8 @@ export class SuggestionMenuProseMirrorPlugin<
194
199
  // or null if it should be hidden.
195
200
  const suggestionPluginTransactionMeta: {
196
201
  triggerCharacter: string;
197
- fromUserInput?: boolean;
202
+ deleteTriggerCharacter?: boolean;
203
+ ignoreQueryLength?: boolean;
198
204
  } | null = transaction.getMeta(suggestionMenuPluginKey);
199
205
 
200
206
  // Only opens a menu of no menu is already open
@@ -206,11 +212,14 @@ export class SuggestionMenuProseMirrorPlugin<
206
212
  return {
207
213
  triggerCharacter:
208
214
  suggestionPluginTransactionMeta.triggerCharacter,
209
- fromUserInput:
210
- suggestionPluginTransactionMeta.fromUserInput !== false,
215
+ deleteTriggerCharacter:
216
+ suggestionPluginTransactionMeta.deleteTriggerCharacter !==
217
+ false,
211
218
  queryStartPos: newState.selection.from,
212
219
  query: "",
213
220
  decorationId: `id_${Math.floor(Math.random() * 0xffffffff)}`,
221
+ ignoreQueryLength:
222
+ suggestionPluginTransactionMeta?.ignoreQueryLength,
214
223
  };
215
224
  }
216
225
 
@@ -285,7 +294,7 @@ export class SuggestionMenuProseMirrorPlugin<
285
294
 
286
295
  // If the menu was opened programmatically by another extension, it may not use a trigger character. In this
287
296
  // case, the decoration is set on the whole block instead, as the decoration range would otherwise be empty.
288
- if (!suggestionPluginState.fromUserInput) {
297
+ if (!suggestionPluginState.deleteTriggerCharacter) {
289
298
  const blockNode = findBlock(state.selection);
290
299
  if (blockNode) {
291
300
  return DecorationSet.create(state.doc, [
@@ -272,7 +272,12 @@ export function getDefaultSlashMenuItems<
272
272
  }
273
273
 
274
274
  items.push({
275
- onItemClick: () => editor.openSelectionMenu(":"),
275
+ onItemClick: () => {
276
+ editor.openSuggestionMenu(":", {
277
+ deleteTriggerCharacter: true,
278
+ ignoreQueryLength: true,
279
+ });
280
+ },
276
281
  key: "emoji",
277
282
  ...editor.dictionary.slash_menu.emoji,
278
283
  });
package/src/index.ts CHANGED
@@ -1,16 +1,16 @@
1
1
  import * as locales from "./i18n/locales";
2
2
  export * from "./api/exporters/html/externalHTMLExporter";
3
3
  export * from "./api/exporters/html/internalHTMLSerializer";
4
- export * from "./api/testUtil";
5
4
  export * from "./api/getCurrentBlockContentType";
6
- export * from "./blocks/defaultBlockHelpers";
5
+ export * from "./api/testUtil";
7
6
  export * from "./blocks/AudioBlockContent/AudioBlockContent";
8
7
  export * from "./blocks/FileBlockContent/FileBlockContent";
9
- export * from "./blocks/ImageBlockContent/ImageBlockContent";
10
- export * from "./blocks/VideoBlockContent/VideoBlockContent";
11
8
  export * from "./blocks/FileBlockContent/fileBlockHelpers";
12
9
  export * from "./blocks/FileBlockContent/uploadToTmpFilesDotOrg_DEV_ONLY";
10
+ export * from "./blocks/ImageBlockContent/ImageBlockContent";
13
11
  export { parseImageElement } from "./blocks/ImageBlockContent/imageBlockHelpers";
12
+ export * from "./blocks/VideoBlockContent/VideoBlockContent";
13
+ export * from "./blocks/defaultBlockHelpers";
14
14
  export * from "./blocks/defaultBlockTypeGuards";
15
15
  export * from "./blocks/defaultBlocks";
16
16
  export * from "./blocks/defaultProps";
@@ -23,15 +23,16 @@ export * from "./extensions/FilePanel/FilePanelPlugin";
23
23
  export * from "./extensions/FormattingToolbar/FormattingToolbarPlugin";
24
24
  export * from "./extensions/LinkToolbar/LinkToolbarPlugin";
25
25
  export * from "./extensions/SideMenu/SideMenuPlugin";
26
- export * from "./extensions/SuggestionMenu/DefaultSuggestionItem";
27
26
  export * from "./extensions/SuggestionMenu/DefaultGridSuggestionItem";
27
+ export * from "./extensions/SuggestionMenu/DefaultSuggestionItem";
28
28
  export * from "./extensions/SuggestionMenu/SuggestionPlugin";
29
- export * from "./extensions/SuggestionMenu/getDefaultSlashMenuItems";
30
29
  export * from "./extensions/SuggestionMenu/getDefaultEmojiPickerItems";
30
+ export * from "./extensions/SuggestionMenu/getDefaultSlashMenuItems";
31
31
  export * from "./extensions/TableHandles/TableHandlesPlugin";
32
32
  export * from "./i18n/dictionary";
33
33
  export * from "./schema";
34
34
  export * from "./util/browser";
35
+ export * from "./util/esmDependencies";
35
36
  export * from "./util/string";
36
37
  export * from "./util/typescript";
37
38
  export { UnreachableCaseError, assertEmpty } from "./util/typescript";
@@ -50,7 +50,7 @@ export type FileBlockConfig = {
50
50
  };
51
51
  content: "none";
52
52
  isFileBlock: true;
53
- fileBlockAcceptMimeTypes?: string[];
53
+ fileBlockAccept?: string[];
54
54
  };
55
55
 
56
56
  // BlockConfig contains the "schema" info about a Block type
@@ -0,0 +1,51 @@
1
+ // some dependencies only export as ESM modules. This makes them incompatible with Node CJS.
2
+ // To work around this, we load these dependencies as dynamic imports in a function that initializes them.
3
+
4
+ // (to reproduce this issue, run ts-node on a file that users server-util)
5
+ export let esmDependencies:
6
+ | undefined
7
+ | {
8
+ rehypeParse: typeof import("rehype-parse");
9
+ rehypeStringify: typeof import("rehype-stringify");
10
+ unified: typeof import("unified");
11
+ hastUtilFromDom: typeof import("hast-util-from-dom");
12
+ rehypeRemark: typeof import("rehype-remark");
13
+ remarkGfm: typeof import("remark-gfm");
14
+ remarkStringify: typeof import("remark-stringify");
15
+ remarkParse: typeof import("remark-parse");
16
+ remarkRehype: typeof import("remark-rehype");
17
+ rehypeFormat: typeof import("rehype-format");
18
+ };
19
+
20
+ export async function initializeESMDependencies() {
21
+ if (esmDependencies) {
22
+ return esmDependencies;
23
+ }
24
+ const vals = await Promise.all([
25
+ import("rehype-parse"),
26
+ import("rehype-stringify"),
27
+ import("unified"),
28
+ import("hast-util-from-dom"),
29
+ import("rehype-remark"),
30
+ import("remark-gfm"),
31
+ import("remark-stringify"),
32
+ import("remark-parse"),
33
+ import("remark-rehype"),
34
+ import("rehype-format"),
35
+ ]);
36
+
37
+ esmDependencies = {
38
+ rehypeParse: vals[0],
39
+ rehypeStringify: vals[1],
40
+ unified: vals[2],
41
+ hastUtilFromDom: vals[3],
42
+ rehypeRemark: vals[4],
43
+ remarkGfm: vals[5],
44
+ remarkStringify: vals[6],
45
+ remarkParse: vals[7],
46
+ remarkRehype: vals[8],
47
+ rehypeFormat: vals[9],
48
+ };
49
+
50
+ return esmDependencies;
51
+ }
@@ -5,4 +5,4 @@ import { BlockSchema, InlineContentSchema, StyleSchema } from "../../../schema";
5
5
  export declare function cleanHTMLToMarkdown(cleanHTMLString: string): string;
6
6
  export declare function blocksToMarkdown<BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema>(blocks: PartialBlock<BSchema, I, S>[], schema: Schema, editor: BlockNoteEditor<BSchema, I, S>, options: {
7
7
  document?: Document;
8
- }): string;
8
+ }): Promise<string>;
@@ -415,7 +415,7 @@ declare const schema: BlockNoteSchema<import("../../../schema").BlockSchemaFromS
415
415
  };
416
416
  content: "none";
417
417
  isFileBlock: true;
418
- fileBlockAcceptMimeTypes: string[];
418
+ fileBlockAccept: string[];
419
419
  };
420
420
  implementation: import("../../../schema").TiptapBlockImplementation<{
421
421
  type: "image";
@@ -445,7 +445,7 @@ declare const schema: BlockNoteSchema<import("../../../schema").BlockSchemaFromS
445
445
  };
446
446
  content: "none";
447
447
  isFileBlock: true;
448
- fileBlockAcceptMimeTypes: string[];
448
+ fileBlockAccept: string[];
449
449
  }, any, import("../../../schema").InlineContentSchema, import("../../../schema").StyleSchema>;
450
450
  };
451
451
  video: {
@@ -477,7 +477,7 @@ declare const schema: BlockNoteSchema<import("../../../schema").BlockSchemaFromS
477
477
  };
478
478
  content: "none";
479
479
  isFileBlock: true;
480
- fileBlockAcceptMimeTypes: string[];
480
+ fileBlockAccept: string[];
481
481
  };
482
482
  implementation: import("../../../schema").TiptapBlockImplementation<{
483
483
  type: "video";
@@ -507,7 +507,7 @@ declare const schema: BlockNoteSchema<import("../../../schema").BlockSchemaFromS
507
507
  };
508
508
  content: "none";
509
509
  isFileBlock: true;
510
- fileBlockAcceptMimeTypes: string[];
510
+ fileBlockAccept: string[];
511
511
  }, any, import("../../../schema").InlineContentSchema, import("../../../schema").StyleSchema>;
512
512
  };
513
513
  audio: {
@@ -532,7 +532,7 @@ declare const schema: BlockNoteSchema<import("../../../schema").BlockSchemaFromS
532
532
  };
533
533
  content: "none";
534
534
  isFileBlock: true;
535
- fileBlockAcceptMimeTypes: string[];
535
+ fileBlockAccept: string[];
536
536
  };
537
537
  implementation: import("../../../schema").TiptapBlockImplementation<{
538
538
  type: "audio";
@@ -555,7 +555,7 @@ declare const schema: BlockNoteSchema<import("../../../schema").BlockSchemaFromS
555
555
  };
556
556
  content: "none";
557
557
  isFileBlock: true;
558
- fileBlockAcceptMimeTypes: string[];
558
+ fileBlockAccept: string[];
559
559
  }, any, import("../../../schema").InlineContentSchema, import("../../../schema").StyleSchema>;
560
560
  };
561
561
  }>, import("../../../schema").InlineContentSchemaFromSpecs<{
@@ -289,7 +289,7 @@ declare const schema: BlockNoteSchema<import("../../..").BlockSchemaFromSpecs<{
289
289
  };
290
290
  content: "none";
291
291
  isFileBlock: true;
292
- fileBlockAcceptMimeTypes: string[];
292
+ fileBlockAccept: string[];
293
293
  };
294
294
  implementation: import("../../..").TiptapBlockImplementation<{
295
295
  type: "image";
@@ -319,7 +319,7 @@ declare const schema: BlockNoteSchema<import("../../..").BlockSchemaFromSpecs<{
319
319
  };
320
320
  content: "none";
321
321
  isFileBlock: true;
322
- fileBlockAcceptMimeTypes: string[];
322
+ fileBlockAccept: string[];
323
323
  }, any, import("../../..").InlineContentSchema, import("../../..").StyleSchema>;
324
324
  };
325
325
  video: {
@@ -351,7 +351,7 @@ declare const schema: BlockNoteSchema<import("../../..").BlockSchemaFromSpecs<{
351
351
  };
352
352
  content: "none";
353
353
  isFileBlock: true;
354
- fileBlockAcceptMimeTypes: string[];
354
+ fileBlockAccept: string[];
355
355
  };
356
356
  implementation: import("../../..").TiptapBlockImplementation<{
357
357
  type: "video";
@@ -381,7 +381,7 @@ declare const schema: BlockNoteSchema<import("../../..").BlockSchemaFromSpecs<{
381
381
  };
382
382
  content: "none";
383
383
  isFileBlock: true;
384
- fileBlockAcceptMimeTypes: string[];
384
+ fileBlockAccept: string[];
385
385
  }, any, import("../../..").InlineContentSchema, import("../../..").StyleSchema>;
386
386
  };
387
387
  audio: {
@@ -406,7 +406,7 @@ declare const schema: BlockNoteSchema<import("../../..").BlockSchemaFromSpecs<{
406
406
  };
407
407
  content: "none";
408
408
  isFileBlock: true;
409
- fileBlockAcceptMimeTypes: string[];
409
+ fileBlockAccept: string[];
410
410
  };
411
411
  implementation: import("../../..").TiptapBlockImplementation<{
412
412
  type: "audio";
@@ -429,7 +429,7 @@ declare const schema: BlockNoteSchema<import("../../..").BlockSchemaFromSpecs<{
429
429
  };
430
430
  content: "none";
431
431
  isFileBlock: true;
432
- fileBlockAcceptMimeTypes: string[];
432
+ fileBlockAccept: string[];
433
433
  }, any, import("../../..").InlineContentSchema, import("../../..").StyleSchema>;
434
434
  };
435
435
  }>, import("../../..").InlineContentSchemaFromSpecs<{
@@ -289,7 +289,7 @@ declare const schema: BlockNoteSchema<import("../../..").BlockSchemaFromSpecs<{
289
289
  };
290
290
  content: "none";
291
291
  isFileBlock: true;
292
- fileBlockAcceptMimeTypes: string[];
292
+ fileBlockAccept: string[];
293
293
  };
294
294
  implementation: import("../../..").TiptapBlockImplementation<{
295
295
  type: "image";
@@ -319,7 +319,7 @@ declare const schema: BlockNoteSchema<import("../../..").BlockSchemaFromSpecs<{
319
319
  };
320
320
  content: "none";
321
321
  isFileBlock: true;
322
- fileBlockAcceptMimeTypes: string[];
322
+ fileBlockAccept: string[];
323
323
  }, any, import("../../..").InlineContentSchema, import("../../..").StyleSchema>;
324
324
  };
325
325
  video: {
@@ -351,7 +351,7 @@ declare const schema: BlockNoteSchema<import("../../..").BlockSchemaFromSpecs<{
351
351
  };
352
352
  content: "none";
353
353
  isFileBlock: true;
354
- fileBlockAcceptMimeTypes: string[];
354
+ fileBlockAccept: string[];
355
355
  };
356
356
  implementation: import("../../..").TiptapBlockImplementation<{
357
357
  type: "video";
@@ -381,7 +381,7 @@ declare const schema: BlockNoteSchema<import("../../..").BlockSchemaFromSpecs<{
381
381
  };
382
382
  content: "none";
383
383
  isFileBlock: true;
384
- fileBlockAcceptMimeTypes: string[];
384
+ fileBlockAccept: string[];
385
385
  }, any, import("../../..").InlineContentSchema, import("../../..").StyleSchema>;
386
386
  };
387
387
  audio: {
@@ -406,7 +406,7 @@ declare const schema: BlockNoteSchema<import("../../..").BlockSchemaFromSpecs<{
406
406
  };
407
407
  content: "none";
408
408
  isFileBlock: true;
409
- fileBlockAcceptMimeTypes: string[];
409
+ fileBlockAccept: string[];
410
410
  };
411
411
  implementation: import("../../..").TiptapBlockImplementation<{
412
412
  type: "audio";
@@ -429,7 +429,7 @@ declare const schema: BlockNoteSchema<import("../../..").BlockSchemaFromSpecs<{
429
429
  };
430
430
  content: "none";
431
431
  isFileBlock: true;
432
- fileBlockAcceptMimeTypes: string[];
432
+ fileBlockAccept: string[];
433
433
  }, any, import("../../..").InlineContentSchema, import("../../..").StyleSchema>;
434
434
  };
435
435
  }>, import("../../..").InlineContentSchemaFromSpecs<{
@@ -38,7 +38,7 @@ export declare const audioBlockConfig: {
38
38
  };
39
39
  content: "none";
40
40
  isFileBlock: true;
41
- fileBlockAcceptMimeTypes: string[];
41
+ fileBlockAccept: string[];
42
42
  };
43
43
  export declare const audioRender: (block: BlockFromConfig<typeof audioBlockConfig, any, any>, editor: BlockNoteEditor<any, any, any>) => {
44
44
  dom: HTMLDivElement;
@@ -73,7 +73,7 @@ export declare const AudioBlock: {
73
73
  };
74
74
  content: "none";
75
75
  isFileBlock: true;
76
- fileBlockAcceptMimeTypes: string[];
76
+ fileBlockAccept: string[];
77
77
  };
78
78
  implementation: import("../../schema").TiptapBlockImplementation<{
79
79
  type: "audio";
@@ -96,6 +96,6 @@ export declare const AudioBlock: {
96
96
  };
97
97
  content: "none";
98
98
  isFileBlock: true;
99
- fileBlockAcceptMimeTypes: string[];
99
+ fileBlockAccept: string[];
100
100
  }, any, import("../../schema").InlineContentSchema, import("../../schema").StyleSchema>;
101
101
  };
@@ -52,7 +52,7 @@ export declare const imageBlockConfig: {
52
52
  };
53
53
  content: "none";
54
54
  isFileBlock: true;
55
- fileBlockAcceptMimeTypes: string[];
55
+ fileBlockAccept: string[];
56
56
  };
57
57
  export declare const imageRender: (block: BlockFromConfig<typeof imageBlockConfig, any, any>, editor: BlockNoteEditor<any, any, any>) => {
58
58
  dom: HTMLDivElement;
@@ -94,7 +94,7 @@ export declare const ImageBlock: {
94
94
  };
95
95
  content: "none";
96
96
  isFileBlock: true;
97
- fileBlockAcceptMimeTypes: string[];
97
+ fileBlockAccept: string[];
98
98
  };
99
99
  implementation: import("../../schema").TiptapBlockImplementation<{
100
100
  type: "image";
@@ -124,6 +124,6 @@ export declare const ImageBlock: {
124
124
  };
125
125
  content: "none";
126
126
  isFileBlock: true;
127
- fileBlockAcceptMimeTypes: string[];
127
+ fileBlockAccept: string[];
128
128
  }, any, import("../../schema").InlineContentSchema, import("../../schema").StyleSchema>;
129
129
  };
@@ -52,7 +52,7 @@ export declare const videoBlockConfig: {
52
52
  };
53
53
  content: "none";
54
54
  isFileBlock: true;
55
- fileBlockAcceptMimeTypes: string[];
55
+ fileBlockAccept: string[];
56
56
  };
57
57
  export declare const videoRender: (block: BlockFromConfig<typeof videoBlockConfig, any, any>, editor: BlockNoteEditor<any, any, any>) => {
58
58
  dom: HTMLDivElement;
@@ -94,7 +94,7 @@ export declare const VideoBlock: {
94
94
  };
95
95
  content: "none";
96
96
  isFileBlock: true;
97
- fileBlockAcceptMimeTypes: string[];
97
+ fileBlockAccept: string[];
98
98
  };
99
99
  implementation: import("../../schema").TiptapBlockImplementation<{
100
100
  type: "video";
@@ -124,6 +124,6 @@ export declare const VideoBlock: {
124
124
  };
125
125
  content: "none";
126
126
  isFileBlock: true;
127
- fileBlockAcceptMimeTypes: string[];
127
+ fileBlockAccept: string[];
128
128
  }, any, import("../../schema").InlineContentSchema, import("../../schema").StyleSchema>;
129
129
  };
@@ -287,7 +287,7 @@ export declare const defaultBlockSpecs: {
287
287
  };
288
288
  content: "none";
289
289
  isFileBlock: true;
290
- fileBlockAcceptMimeTypes: string[];
290
+ fileBlockAccept: string[];
291
291
  };
292
292
  implementation: import("../schema").TiptapBlockImplementation<{
293
293
  type: "image";
@@ -317,7 +317,7 @@ export declare const defaultBlockSpecs: {
317
317
  };
318
318
  content: "none";
319
319
  isFileBlock: true;
320
- fileBlockAcceptMimeTypes: string[];
320
+ fileBlockAccept: string[];
321
321
  }, any, InlineContentSchema, StyleSchema>;
322
322
  };
323
323
  video: {
@@ -349,7 +349,7 @@ export declare const defaultBlockSpecs: {
349
349
  };
350
350
  content: "none";
351
351
  isFileBlock: true;
352
- fileBlockAcceptMimeTypes: string[];
352
+ fileBlockAccept: string[];
353
353
  };
354
354
  implementation: import("../schema").TiptapBlockImplementation<{
355
355
  type: "video";
@@ -379,7 +379,7 @@ export declare const defaultBlockSpecs: {
379
379
  };
380
380
  content: "none";
381
381
  isFileBlock: true;
382
- fileBlockAcceptMimeTypes: string[];
382
+ fileBlockAccept: string[];
383
383
  }, any, InlineContentSchema, StyleSchema>;
384
384
  };
385
385
  audio: {
@@ -404,7 +404,7 @@ export declare const defaultBlockSpecs: {
404
404
  };
405
405
  content: "none";
406
406
  isFileBlock: true;
407
- fileBlockAcceptMimeTypes: string[];
407
+ fileBlockAccept: string[];
408
408
  };
409
409
  implementation: import("../schema").TiptapBlockImplementation<{
410
410
  type: "audio";
@@ -427,7 +427,7 @@ export declare const defaultBlockSpecs: {
427
427
  };
428
428
  content: "none";
429
429
  isFileBlock: true;
430
- fileBlockAcceptMimeTypes: string[];
430
+ fileBlockAccept: string[];
431
431
  }, any, InlineContentSchema, StyleSchema>;
432
432
  };
433
433
  };
@@ -719,7 +719,7 @@ export declare const defaultBlockSchema: import("../schema").BlockSchemaFromSpec
719
719
  };
720
720
  content: "none";
721
721
  isFileBlock: true;
722
- fileBlockAcceptMimeTypes: string[];
722
+ fileBlockAccept: string[];
723
723
  };
724
724
  implementation: import("../schema").TiptapBlockImplementation<{
725
725
  type: "image";
@@ -749,7 +749,7 @@ export declare const defaultBlockSchema: import("../schema").BlockSchemaFromSpec
749
749
  };
750
750
  content: "none";
751
751
  isFileBlock: true;
752
- fileBlockAcceptMimeTypes: string[];
752
+ fileBlockAccept: string[];
753
753
  }, any, InlineContentSchema, StyleSchema>;
754
754
  };
755
755
  video: {
@@ -781,7 +781,7 @@ export declare const defaultBlockSchema: import("../schema").BlockSchemaFromSpec
781
781
  };
782
782
  content: "none";
783
783
  isFileBlock: true;
784
- fileBlockAcceptMimeTypes: string[];
784
+ fileBlockAccept: string[];
785
785
  };
786
786
  implementation: import("../schema").TiptapBlockImplementation<{
787
787
  type: "video";
@@ -811,7 +811,7 @@ export declare const defaultBlockSchema: import("../schema").BlockSchemaFromSpec
811
811
  };
812
812
  content: "none";
813
813
  isFileBlock: true;
814
- fileBlockAcceptMimeTypes: string[];
814
+ fileBlockAccept: string[];
815
815
  }, any, InlineContentSchema, StyleSchema>;
816
816
  };
817
817
  audio: {
@@ -836,7 +836,7 @@ export declare const defaultBlockSchema: import("../schema").BlockSchemaFromSpec
836
836
  };
837
837
  content: "none";
838
838
  isFileBlock: true;
839
- fileBlockAcceptMimeTypes: string[];
839
+ fileBlockAccept: string[];
840
840
  };
841
841
  implementation: import("../schema").TiptapBlockImplementation<{
842
842
  type: "audio";
@@ -859,7 +859,7 @@ export declare const defaultBlockSchema: import("../schema").BlockSchemaFromSpec
859
859
  };
860
860
  content: "none";
861
861
  isFileBlock: true;
862
- fileBlockAcceptMimeTypes: string[];
862
+ fileBlockAccept: string[];
863
863
  }, any, InlineContentSchema, StyleSchema>;
864
864
  };
865
865
  }>;