@blocknote/core 0.36.1 → 0.38.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.
Files changed (76) hide show
  1. package/dist/blocknote.cjs +9 -9
  2. package/dist/blocknote.cjs.map +1 -1
  3. package/dist/blocknote.js +1689 -1715
  4. package/dist/blocknote.js.map +1 -1
  5. package/dist/{en-CvDoFvhc.js → en-Bq3Es3Np.js} +6 -12
  6. package/dist/en-Bq3Es3Np.js.map +1 -0
  7. package/dist/en-D3B48eJ7.cjs +2 -0
  8. package/dist/en-D3B48eJ7.cjs.map +1 -0
  9. package/dist/locales.cjs +1 -1
  10. package/dist/locales.cjs.map +1 -1
  11. package/dist/locales.js +109 -229
  12. package/dist/locales.js.map +1 -1
  13. package/dist/style.css +1 -1
  14. package/dist/tsconfig.tsbuildinfo +1 -1
  15. package/dist/webpack-stats.json +1 -1
  16. package/package.json +7 -7
  17. package/src/api/clipboard/toClipboard/copyExtension.ts +0 -2
  18. package/src/api/exporters/html/externalHTMLExporter.ts +0 -1
  19. package/src/api/exporters/markdown/markdownExporter.ts +13 -22
  20. package/src/api/exporters/markdown/util/addSpacesToCheckboxesRehypePlugin.ts +2 -12
  21. package/src/api/parsers/html/parseHTML.ts +3 -2
  22. package/src/api/parsers/html/util/nestedLists.test.ts +8 -8
  23. package/src/api/parsers/markdown/parseMarkdown.ts +17 -14
  24. package/src/api/positionMapping.test.ts +155 -34
  25. package/src/api/positionMapping.ts +2 -2
  26. package/src/blocks/AudioBlockContent/AudioBlockContent.ts +0 -1
  27. package/src/blocks/FileBlockContent/helpers/render/createAddFileButton.ts +3 -2
  28. package/src/blocks/FileBlockContent/helpers/render/createFileBlockWrapper.ts +1 -7
  29. package/src/blocks/FileBlockContent/helpers/render/createResizableFileBlockWrapper.ts +64 -17
  30. package/src/blocks/ImageBlockContent/ImageBlockContent.ts +0 -1
  31. package/src/blocks/TableBlockContent/TableBlockContent.ts +2 -5
  32. package/src/blocks/VideoBlockContent/VideoBlockContent.ts +0 -1
  33. package/src/editor/BlockNoteEditor.ts +17 -23
  34. package/src/editor/BlockNoteExtensions.ts +3 -0
  35. package/src/editor/editor.css +5 -0
  36. package/src/extensions/Comments/CommentsPlugin.ts +2 -0
  37. package/src/extensions/SideMenu/SideMenuPlugin.ts +0 -2
  38. package/src/i18n/locales/ar.ts +6 -12
  39. package/src/i18n/locales/de.ts +6 -12
  40. package/src/i18n/locales/en.ts +6 -12
  41. package/src/i18n/locales/es.ts +6 -12
  42. package/src/i18n/locales/fr.ts +6 -12
  43. package/src/i18n/locales/he.ts +6 -12
  44. package/src/i18n/locales/hr.ts +6 -12
  45. package/src/i18n/locales/is.ts +6 -12
  46. package/src/i18n/locales/it.ts +6 -12
  47. package/src/i18n/locales/ja.ts +6 -12
  48. package/src/i18n/locales/ko.ts +6 -12
  49. package/src/i18n/locales/nl.ts +6 -12
  50. package/src/i18n/locales/no.ts +6 -12
  51. package/src/i18n/locales/pl.ts +6 -12
  52. package/src/i18n/locales/pt.ts +6 -12
  53. package/src/i18n/locales/ru.ts +6 -12
  54. package/src/i18n/locales/sk.ts +6 -12
  55. package/src/i18n/locales/uk.ts +6 -12
  56. package/src/i18n/locales/vi.ts +6 -12
  57. package/src/i18n/locales/zh-tw.ts +6 -12
  58. package/src/i18n/locales/zh.ts +6 -12
  59. package/src/index.ts +0 -1
  60. package/types/src/api/exporters/markdown/markdownExporter.d.ts +1 -1
  61. package/types/src/api/parsers/html/parseHTML.d.ts +1 -1
  62. package/types/src/api/parsers/markdown/parseMarkdown.d.ts +2 -2
  63. package/types/src/blocks/FileBlockContent/helpers/render/createAddFileButton.d.ts +1 -1
  64. package/types/src/blocks/FileBlockContent/helpers/render/createFileBlockWrapper.d.ts +1 -1
  65. package/types/src/blocks/FileBlockContent/helpers/render/createResizableFileBlockWrapper.d.ts +1 -1
  66. package/types/src/editor/BlockNoteEditor.d.ts +6 -9
  67. package/types/src/editor/BlockNoteExtensions.d.ts +2 -0
  68. package/types/src/extensions/Comments/CommentsPlugin.d.ts +3 -1
  69. package/types/src/i18n/locales/en.d.ts +1 -12
  70. package/types/src/i18n/locales/sk.d.ts +1 -12
  71. package/types/src/index.d.ts +0 -1
  72. package/dist/en-CvDoFvhc.js.map +0 -1
  73. package/dist/en-ub2yVBX0.cjs +0 -2
  74. package/dist/en-ub2yVBX0.cjs.map +0 -1
  75. package/src/util/esmDependencies.ts +0 -51
  76. package/types/src/util/esmDependencies.d.ts +0 -24
@@ -105,22 +105,21 @@ import { dropCursor } from "prosemirror-dropcursor";
105
105
  import { EditorView } from "prosemirror-view";
106
106
  import { redoCommand, undoCommand, ySyncPluginKey } from "y-prosemirror";
107
107
  import { createInternalHTMLSerializer } from "../api/exporters/html/internalHTMLSerializer.js";
108
- import { inlineContentToNodes } from "../api/nodeConversions/blockToNode.js";
109
- import { docToBlocks } from "../api/nodeConversions/nodeToBlock.js";
110
108
  import {
111
109
  BlocksChanged,
112
110
  getBlocksChangedByTransaction,
113
111
  } from "../api/getBlocksChangedByTransaction.js";
114
- import { nestedListsToBlockNoteStructure } from "../api/parsers/html/util/nestedLists.js";
112
+ import { inlineContentToNodes } from "../api/nodeConversions/blockToNode.js";
113
+ import { docToBlocks } from "../api/nodeConversions/nodeToBlock.js";
115
114
  import { CodeBlockOptions } from "../blocks/CodeBlockContent/CodeBlockContent.js";
116
115
  import type { ThreadStore, User } from "../comments/index.js";
116
+ import { BlockChangePlugin } from "../extensions/BlockChange/BlockChangePlugin.js";
117
117
  import type { CursorPlugin } from "../extensions/Collaboration/CursorPlugin.js";
118
118
  import type { ForkYDocPlugin } from "../extensions/Collaboration/ForkYDocPlugin.js";
119
119
  import { EventEmitter } from "../util/EventEmitter.js";
120
120
  import { BlockNoteExtension } from "./BlockNoteExtension.js";
121
121
 
122
122
  import "../style.css";
123
- import { BlockChangePlugin } from "../extensions/BlockChange/BlockChangePlugin.js";
124
123
 
125
124
  /**
126
125
  * A factory function that returns a BlockNoteExtension
@@ -201,6 +200,7 @@ export type BlockNoteEditorOptions<
201
200
  * @remarks `CommentsOptions`
202
201
  */
203
202
  comments?: {
203
+ schema?: BlockNoteSchema<any, any, any>;
204
204
  threadStore: ThreadStore;
205
205
  };
206
206
 
@@ -1574,9 +1574,9 @@ export class BlockNoteEditor<
1574
1574
  * @param blocks An array of blocks that should be serialized into HTML.
1575
1575
  * @returns The blocks, serialized as an HTML string.
1576
1576
  */
1577
- public async blocksToHTMLLossy(
1577
+ public blocksToHTMLLossy(
1578
1578
  blocks: PartialBlock<BSchema, ISchema, SSchema>[] = this.document,
1579
- ): Promise<string> {
1579
+ ): string {
1580
1580
  const exporter = createExternalHTMLExporter(this.pmSchema, this);
1581
1581
  return exporter.exportBlocks(blocks, {});
1582
1582
  }
@@ -1590,9 +1590,9 @@ export class BlockNoteEditor<
1590
1590
  * @param blocks An array of blocks that should be serialized into HTML.
1591
1591
  * @returns The blocks, serialized as an HTML string.
1592
1592
  */
1593
- public async blocksToFullHTML(
1593
+ public blocksToFullHTML(
1594
1594
  blocks: PartialBlock<BSchema, ISchema, SSchema>[],
1595
- ): Promise<string> {
1595
+ ): string {
1596
1596
  const exporter = createInternalHTMLSerializer(this.pmSchema, this);
1597
1597
  return exporter.serializeBlocks(blocks, {});
1598
1598
  }
@@ -1603,9 +1603,9 @@ export class BlockNoteEditor<
1603
1603
  * @param html The HTML string to parse blocks from.
1604
1604
  * @returns The blocks parsed from the HTML string.
1605
1605
  */
1606
- public async tryParseHTMLToBlocks(
1606
+ public tryParseHTMLToBlocks(
1607
1607
  html: string,
1608
- ): Promise<Block<BSchema, ISchema, SSchema>[]> {
1608
+ ): Block<BSchema, ISchema, SSchema>[] {
1609
1609
  return HTMLToBlocks(html, this.pmSchema);
1610
1610
  }
1611
1611
 
@@ -1615,9 +1615,9 @@ export class BlockNoteEditor<
1615
1615
  * @param blocks An array of blocks that should be serialized into Markdown.
1616
1616
  * @returns The blocks, serialized as a Markdown string.
1617
1617
  */
1618
- public async blocksToMarkdownLossy(
1618
+ public blocksToMarkdownLossy(
1619
1619
  blocks: PartialBlock<BSchema, ISchema, SSchema>[] = this.document,
1620
- ): Promise<string> {
1620
+ ): string {
1621
1621
  return blocksToMarkdown(blocks, this.pmSchema, this, {});
1622
1622
  }
1623
1623
 
@@ -1832,14 +1832,6 @@ export class BlockNoteEditor<
1832
1832
  this.showSelectionPlugin.setEnabled(forceSelectionVisible);
1833
1833
  }
1834
1834
 
1835
- /**
1836
- * This will convert HTML into a format that is compatible with BlockNote.
1837
- */
1838
- private convertHtmlToBlockNoteHtml(html: string) {
1839
- const htmlNode = nestedListsToBlockNoteStructure(html.trim());
1840
- return htmlNode.innerHTML;
1841
- }
1842
-
1843
1835
  /**
1844
1836
  * Paste HTML into the editor. Defaults to converting HTML to BlockNote HTML.
1845
1837
  * @param html The HTML to paste.
@@ -1848,7 +1840,8 @@ export class BlockNoteEditor<
1848
1840
  public pasteHTML(html: string, raw = false) {
1849
1841
  let htmlToPaste = html;
1850
1842
  if (!raw) {
1851
- htmlToPaste = this.convertHtmlToBlockNoteHtml(html);
1843
+ const blocks = this.tryParseHTMLToBlocks(html);
1844
+ htmlToPaste = this.blocksToFullHTML(blocks);
1852
1845
  }
1853
1846
  if (!htmlToPaste) {
1854
1847
  return;
@@ -1868,7 +1861,8 @@ export class BlockNoteEditor<
1868
1861
  * Paste markdown into the editor.
1869
1862
  * @param markdown The markdown to paste.
1870
1863
  */
1871
- public async pasteMarkdown(markdown: string) {
1872
- return this.pasteHTML(await markdownToHTML(markdown));
1864
+ public pasteMarkdown(markdown: string) {
1865
+ const html = markdownToHTML(markdown);
1866
+ return this.pasteHTML(html);
1873
1867
  }
1874
1868
  }
@@ -57,6 +57,7 @@ import type {
57
57
  BlockNoteEditorOptions,
58
58
  SupportedExtension,
59
59
  } from "./BlockNoteEditor.js";
60
+ import { BlockNoteSchema } from "./BlockNoteSchema.js";
60
61
  import { ForkYDocPlugin } from "../extensions/Collaboration/ForkYDocPlugin.js";
61
62
 
62
63
  type ExtensionOptions<
@@ -92,6 +93,7 @@ type ExtensionOptions<
92
93
  >;
93
94
  tabBehavior?: "prefer-navigate-ui" | "prefer-indent";
94
95
  comments?: {
96
+ schema?: BlockNoteSchema<any, any, any>;
95
97
  threadStore: ThreadStore;
96
98
  };
97
99
  pasteHandler: BlockNoteEditorOptions<any, any, any>["pasteHandler"];
@@ -156,6 +158,7 @@ export const getBlockNoteExtensions = <
156
158
  opts.editor,
157
159
  opts.comments.threadStore,
158
160
  CommentMark.name,
161
+ opts.comments.schema,
159
162
  );
160
163
  }
161
164
 
@@ -176,6 +176,11 @@ Tippy popups that are appended to document.body directly
176
176
  text-align: left;
177
177
  }
178
178
 
179
+ .bn-editor [data-content-type="table"] th > p,
180
+ .bn-editor [data-content-type="table"] td > p {
181
+ min-height: 1.5rem;
182
+ }
183
+
179
184
  /* tiptap uses colwidth instead of data-colwidth, se we need to adjust this style from prosemirror-tables */
180
185
  .ProseMirror td,
181
186
  .ProseMirror th {
@@ -10,6 +10,7 @@ import type {
10
10
  } from "../../comments/index.js";
11
11
  import { BlockNoteEditor } from "../../editor/BlockNoteEditor.js";
12
12
  import { BlockNoteExtension } from "../../editor/BlockNoteExtension.js";
13
+ import { BlockNoteSchema } from "../../editor/BlockNoteSchema.js";
13
14
  import { UserStore } from "./userstore/UserStore.js";
14
15
 
15
16
  const PLUGIN_KEY = new PluginKey(`blocknote-comments`);
@@ -134,6 +135,7 @@ export class CommentsPlugin extends BlockNoteExtension {
134
135
  private readonly editor: BlockNoteEditor<any, any, any>,
135
136
  public readonly threadStore: ThreadStore,
136
137
  private readonly markType: string,
138
+ public readonly commentEditorSchema?: BlockNoteSchema<any, any, any>,
137
139
  ) {
138
140
  super();
139
141
 
@@ -17,7 +17,6 @@ import {
17
17
  InlineContentSchema,
18
18
  StyleSchema,
19
19
  } from "../../schema/index.js";
20
- import { initializeESMDependencies } from "../../util/esmDependencies.js";
21
20
  import { getDraggableBlockFromElement } from "../getDraggableBlockFromElement.js";
22
21
  import { dragStart, unsetDragImage } from "./dragging.js";
23
22
 
@@ -171,7 +170,6 @@ export class SideMenuView<
171
170
  this.onDragEnd as EventListener,
172
171
  true,
173
172
  );
174
- initializeESMDependencies();
175
173
 
176
174
  // Shows or updates menu position whenever the cursor moves, if the menu isn't frozen.
177
175
  this.pmView.root.addEventListener(
@@ -169,18 +169,12 @@ export const ar: Dictionary = {
169
169
  comment_reply: "أضف تعليقًا...",
170
170
  },
171
171
  file_blocks: {
172
- image: {
173
- add_button_text: "إضافة صورة",
174
- },
175
- video: {
176
- add_button_text: "إضافة فيديو",
177
- },
178
- audio: {
179
- add_button_text: "إضافة صوت",
180
- },
181
- file: {
182
- add_button_text: "إضافة ملف",
183
- },
172
+ add_button_text: {
173
+ image: "إضافة صورة",
174
+ video: "إضافة فيديو",
175
+ audio: "إضافة صوت",
176
+ file: "إضافة ملف",
177
+ } as Record<string, string>,
184
178
  },
185
179
  toggle_blocks: {
186
180
  add_block_button: "تبديل فارغ. انقر لإضافة كتلة.",
@@ -204,18 +204,12 @@ export const de: Dictionary = {
204
204
  comment_reply: "Kommentar hinzufügen …",
205
205
  },
206
206
  file_blocks: {
207
- image: {
208
- add_button_text: "Bild hinzufügen",
209
- },
210
- video: {
211
- add_button_text: "Video hinzufügen",
212
- },
213
- audio: {
214
- add_button_text: "Audio hinzufügen",
215
- },
216
- file: {
217
- add_button_text: "Datei hinzufügen",
218
- },
207
+ add_button_text: {
208
+ image: "Bild hinzufügen",
209
+ video: "Video hinzufügen",
210
+ audio: "Audio hinzufügen",
211
+ file: "Datei hinzufügen",
212
+ } as Record<string, string>,
219
213
  },
220
214
  toggle_blocks: {
221
215
  add_block_button:
@@ -184,18 +184,12 @@ export const en = {
184
184
  comment_reply: "Add comment...",
185
185
  } as Record<string | "default" | "emptyDocument", string | undefined>,
186
186
  file_blocks: {
187
- image: {
188
- add_button_text: "Add image",
189
- },
190
- video: {
191
- add_button_text: "Add video",
192
- },
193
- audio: {
194
- add_button_text: "Add audio",
195
- },
196
- file: {
197
- add_button_text: "Add file",
198
- },
187
+ add_button_text: {
188
+ image: "Add image",
189
+ video: "Add video",
190
+ audio: "Add audio",
191
+ file: "Add file",
192
+ } as Record<string, string>,
199
193
  },
200
194
  toggle_blocks: {
201
195
  add_block_button: "Empty toggle. Click to add a block.",
@@ -184,18 +184,12 @@ export const es: Dictionary = {
184
184
  comment_reply: "Agregar comentario...",
185
185
  },
186
186
  file_blocks: {
187
- image: {
188
- add_button_text: "Agregar imagen",
189
- },
190
- video: {
191
- add_button_text: "Agregar vídeo",
192
- },
193
- audio: {
194
- add_button_text: "Agregar audio",
195
- },
196
- file: {
197
- add_button_text: "Agregar archivo",
198
- },
187
+ add_button_text: {
188
+ image: "Agregar imagen",
189
+ video: "Agregar vídeo",
190
+ audio: "Agregar audio",
191
+ file: "Agregar archivo",
192
+ } as Record<string, string>,
199
193
  },
200
194
  toggle_blocks: {
201
195
  add_block_button: "Toggle vacío. Haz clic para añadir un bloque.",
@@ -230,18 +230,12 @@ export const fr: Dictionary = {
230
230
  comment_reply: "Ajouter un commentaire...",
231
231
  },
232
232
  file_blocks: {
233
- image: {
234
- add_button_text: "Ajouter une image",
235
- },
236
- video: {
237
- add_button_text: "Ajouter une vidéo",
238
- },
239
- audio: {
240
- add_button_text: "Ajouter un audio",
241
- },
242
- file: {
243
- add_button_text: "Ajouter un fichier",
244
- },
233
+ add_button_text: {
234
+ image: "Ajouter une image",
235
+ video: "Ajouter une vidéo",
236
+ audio: "Ajouter un audio",
237
+ file: "Ajouter un fichier",
238
+ } as Record<string, string>,
245
239
  },
246
240
  toggle_blocks: {
247
241
  add_block_button: "Toggle vide. Cliquez pour ajouter un bloc.",
@@ -186,18 +186,12 @@ export const he: Dictionary = {
186
186
  comment_reply: "הוסף תגובה...",
187
187
  } as Record<string | "default" | "emptyDocument", string | undefined>,
188
188
  file_blocks: {
189
- image: {
190
- add_button_text: "הוסף תמונה",
191
- },
192
- video: {
193
- add_button_text: "הוסף וידאו",
194
- },
195
- audio: {
196
- add_button_text: "הוסף אודיו",
197
- },
198
- file: {
199
- add_button_text: "הוסף קובץ",
200
- },
189
+ add_button_text: {
190
+ image: "הוסף תמונה",
191
+ video: "הוסף וידאו",
192
+ audio: "הוסף אודיו",
193
+ file: "הוסף קובץ",
194
+ } as Record<string, string>,
201
195
  },
202
196
  toggle_blocks: {
203
197
  add_block_button: "מתג ריק. לחץ כדי להוסיף בלוק.",
@@ -197,18 +197,12 @@ export const hr: Dictionary = {
197
197
  comment_reply: "Dodaj komentar...",
198
198
  },
199
199
  file_blocks: {
200
- image: {
201
- add_button_text: "Dodaj sliku",
202
- },
203
- video: {
204
- add_button_text: "Dodaj video",
205
- },
206
- audio: {
207
- add_button_text: "Dodaj audio",
208
- },
209
- file: {
210
- add_button_text: "Dodaj datoteku",
211
- },
200
+ add_button_text: {
201
+ image: "Dodaj sliku",
202
+ video: "Dodaj video",
203
+ audio: "Dodaj audio",
204
+ file: "Dodaj datoteku",
205
+ } as Record<string, string>,
212
206
  },
213
207
  toggle_blocks: {
214
208
  add_block_button: "Prazan sklopivi blok. Klikni da dodaš sadržaj.",
@@ -198,18 +198,12 @@ export const is: Dictionary = {
198
198
  comment_reply: "Bæta við athugasemd...",
199
199
  },
200
200
  file_blocks: {
201
- image: {
202
- add_button_text: "Bæta við mynd",
203
- },
204
- video: {
205
- add_button_text: "Bæta við myndbandi",
206
- },
207
- audio: {
208
- add_button_text: "Bæta við hljóði",
209
- },
210
- file: {
211
- add_button_text: "Bæta við skrá",
212
- },
201
+ add_button_text: {
202
+ image: "Bæta við mynd",
203
+ video: "Bæta við myndbandi",
204
+ audio: "Bæta við hljóði",
205
+ file: "Bæta við skrá",
206
+ } as Record<string, string>,
213
207
  },
214
208
  toggle_blocks: {
215
209
  add_block_button: "Tóm fellilína. Smelltu til að bæta við blokk.",
@@ -206,18 +206,12 @@ export const it: Dictionary = {
206
206
  comment_reply: "Aggiungi commento...",
207
207
  },
208
208
  file_blocks: {
209
- image: {
210
- add_button_text: "Aggiungi immagine",
211
- },
212
- video: {
213
- add_button_text: "Aggiungi video",
214
- },
215
- audio: {
216
- add_button_text: "Aggiungi audio",
217
- },
218
- file: {
219
- add_button_text: "Aggiungi file",
220
- },
209
+ add_button_text: {
210
+ image: "Aggiungi immagine",
211
+ video: "Aggiungi video",
212
+ audio: "Aggiungi audio",
213
+ file: "Aggiungi file",
214
+ } as Record<string, string>,
221
215
  },
222
216
  toggle_blocks: {
223
217
  add_block_button: "Toggle vuoto. Clicca per aggiungere un blocco.",
@@ -224,18 +224,12 @@ export const ja: Dictionary = {
224
224
  comment_reply: "コメントを追加...",
225
225
  },
226
226
  file_blocks: {
227
- image: {
228
- add_button_text: "画像を追加",
229
- },
230
- video: {
231
- add_button_text: "ビデオを追加",
232
- },
233
- audio: {
234
- add_button_text: "オーディオを追加",
235
- },
236
- file: {
237
- add_button_text: "ファイルを追加",
238
- },
227
+ add_button_text: {
228
+ image: "画像を追加",
229
+ video: "ビデオを追加",
230
+ audio: "オーディオを追加",
231
+ file: "ファイルを追加",
232
+ } as Record<string, string>,
239
233
  },
240
234
  toggle_blocks: {
241
235
  add_block_button: "空のトグルです。クリックしてブロックを追加。",
@@ -197,18 +197,12 @@ export const ko: Dictionary = {
197
197
  comment_reply: "댓글 추가...",
198
198
  },
199
199
  file_blocks: {
200
- image: {
201
- add_button_text: "이미지 추가",
202
- },
203
- video: {
204
- add_button_text: "비디오 추가",
205
- },
206
- audio: {
207
- add_button_text: "오디오 추가",
208
- },
209
- file: {
210
- add_button_text: "파일 추가",
211
- },
200
+ add_button_text: {
201
+ image: "이미지 추가",
202
+ video: "비디오 추가",
203
+ audio: "오디오 추가",
204
+ file: "파일 추가",
205
+ } as Record<string, string>,
212
206
  },
213
207
  toggle_blocks: {
214
208
  add_block_button: "비어 있는 토글입니다. 클릭하여 블록을 추가하세요.",
@@ -185,18 +185,12 @@ export const nl: Dictionary = {
185
185
  comment_reply: "Reactie toevoegen...",
186
186
  },
187
187
  file_blocks: {
188
- image: {
189
- add_button_text: "Afbeelding toevoegen",
190
- },
191
- video: {
192
- add_button_text: "Video toevoegen",
193
- },
194
- audio: {
195
- add_button_text: "Audio toevoegen",
196
- },
197
- file: {
198
- add_button_text: "Bestand toevoegen",
199
- },
188
+ add_button_text: {
189
+ image: "Afbeelding toevoegen",
190
+ video: "Video toevoegen",
191
+ audio: "Audio toevoegen",
192
+ file: "Bestand toevoegen",
193
+ } as Record<string, string>,
200
194
  },
201
195
  toggle_blocks: {
202
196
  add_block_button: "Lege uitklapper. Klik om een blok toe te voegen.",
@@ -203,18 +203,12 @@ export const no: Dictionary = {
203
203
  comment_reply: "Legg til kommentar...",
204
204
  },
205
205
  file_blocks: {
206
- image: {
207
- add_button_text: "Legg til bilde",
208
- },
209
- video: {
210
- add_button_text: "Legg til video",
211
- },
212
- audio: {
213
- add_button_text: "Legg til lyd",
214
- },
215
- file: {
216
- add_button_text: "Legg til fil",
217
- },
206
+ add_button_text: {
207
+ image: "Legg til bilde",
208
+ video: "Legg til video",
209
+ audio: "Legg til lyd",
210
+ file: "Legg til fil",
211
+ } as Record<string, string>,
218
212
  },
219
213
  toggle_blocks: {
220
214
  add_block_button: "Tomt toggle. Klikk for å legge til en blokk.",
@@ -175,18 +175,12 @@ export const pl: Dictionary = {
175
175
  comment_reply: "Dodaj komentarz...",
176
176
  },
177
177
  file_blocks: {
178
- image: {
179
- add_button_text: "Dodaj zdjęcie",
180
- },
181
- video: {
182
- add_button_text: "Dodaj wideo",
183
- },
184
- audio: {
185
- add_button_text: "Dodaj audio",
186
- },
187
- file: {
188
- add_button_text: "Dodaj plik",
189
- },
178
+ add_button_text: {
179
+ image: "Dodaj zdjęcie",
180
+ video: "Dodaj wideo",
181
+ audio: "Dodaj audio",
182
+ file: "Dodaj plik",
183
+ } as Record<string, string>,
190
184
  },
191
185
  toggle_blocks: {
192
186
  add_block_button:
@@ -176,18 +176,12 @@ export const pt: Dictionary = {
176
176
  comment_reply: "Adicionar comentário...",
177
177
  },
178
178
  file_blocks: {
179
- image: {
180
- add_button_text: "Adicionar imagem",
181
- },
182
- video: {
183
- add_button_text: "Adicionar vídeo",
184
- },
185
- audio: {
186
- add_button_text: "Adicionar áudio",
187
- },
188
- file: {
189
- add_button_text: "Adicionar arquivo",
190
- },
179
+ add_button_text: {
180
+ image: "Adicionar imagem",
181
+ video: "Adicionar vídeo",
182
+ audio: "Adicionar áudio",
183
+ file: "Adicionar arquivo",
184
+ } as Record<string, string>,
191
185
  },
192
186
  toggle_blocks: {
193
187
  add_block_button: "Toggle vazio. Clique para adicionar um bloco.",
@@ -227,18 +227,12 @@ export const ru: Dictionary = {
227
227
  comment_reply: "Добавить комментарий...",
228
228
  },
229
229
  file_blocks: {
230
- image: {
231
- add_button_text: "Добавить изображение",
232
- },
233
- video: {
234
- add_button_text: "Добавить видео",
235
- },
236
- audio: {
237
- add_button_text: "Добавить аудио",
238
- },
239
- file: {
240
- add_button_text: "Добавить файл",
241
- },
230
+ add_button_text: {
231
+ image: "Добавить изображение",
232
+ video: "Добавить видео",
233
+ audio: "Добавить аудио",
234
+ file: "Добавить файл",
235
+ } as Record<string, string>,
242
236
  },
243
237
  toggle_blocks: {
244
238
  add_block_button: "Пустой переключатель. Нажмите, чтобы добавить блок.",
@@ -184,18 +184,12 @@ export const sk = {
184
184
  comment_reply: "Pridať komentár...",
185
185
  } as Record<string | "default" | "emptyDocument", string | undefined>,
186
186
  file_blocks: {
187
- image: {
188
- add_button_text: "Pridať obrázok",
189
- },
190
- video: {
191
- add_button_text: "Pridať video",
192
- },
193
- audio: {
194
- add_button_text: "Pridať audio",
195
- },
196
- file: {
197
- add_button_text: "Pridať súbor",
198
- },
187
+ add_button_text: {
188
+ image: "Pridať obrázok",
189
+ video: "Pridať video",
190
+ audio: "Pridať audio",
191
+ file: "Pridať súbor",
192
+ } as Record<string, string>,
199
193
  },
200
194
  toggle_blocks: {
201
195
  add_block_button: "Prázdne prepínanie. Kliknite pre pridanie bloku.",
@@ -209,18 +209,12 @@ export const uk: Dictionary = {
209
209
  comment_reply: "Додати коментар...",
210
210
  },
211
211
  file_blocks: {
212
- image: {
213
- add_button_text: "Додати зображення",
214
- },
215
- video: {
216
- add_button_text: "Додати відео",
217
- },
218
- audio: {
219
- add_button_text: "Додати аудіо",
220
- },
221
- file: {
222
- add_button_text: "Додати файл",
223
- },
212
+ add_button_text: {
213
+ image: "Додати зображення",
214
+ video: "Додати відео",
215
+ audio: "Додати аудіо",
216
+ file: "Додати файл",
217
+ } as Record<string, string>,
224
218
  },
225
219
  toggle_blocks: {
226
220
  add_block_button: "Порожній перемикач. Натисніть, щоб додати блок.",