@blocknote/core 0.25.2 → 0.27.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 (153) hide show
  1. package/dist/blocknote.cjs +11 -10
  2. package/dist/blocknote.cjs.map +1 -1
  3. package/dist/blocknote.js +3722 -9856
  4. package/dist/blocknote.js.map +1 -1
  5. package/dist/comments.cjs +1 -1
  6. package/dist/comments.cjs.map +1 -1
  7. package/dist/comments.js +45 -44
  8. package/dist/comments.js.map +1 -1
  9. package/dist/en-B7ycW7c8.js +360 -0
  10. package/dist/en-B7ycW7c8.js.map +1 -0
  11. package/dist/en-D4taoCs4.cjs +2 -0
  12. package/dist/en-D4taoCs4.cjs.map +1 -0
  13. package/dist/locales.cjs +2 -0
  14. package/dist/locales.cjs.map +1 -0
  15. package/dist/locales.js +6129 -0
  16. package/dist/locales.js.map +1 -0
  17. package/dist/style.css +1 -1
  18. package/dist/tsconfig.tsbuildinfo +1 -1
  19. package/dist/webpack-stats.json +1 -1
  20. package/package.json +36 -27
  21. package/src/api/clipboard/__snapshots__/internal/basicBlocks.html +1 -1
  22. package/src/api/clipboard/__snapshots__/internal/basicBlocksWithProps.html +1 -1
  23. package/src/api/clipboard/clipboardExternal.test.ts +1 -1
  24. package/src/api/clipboard/clipboardInternal.test.ts +1 -1
  25. package/src/api/clipboard/fromClipboard/acceptedMIMETypes.ts +1 -0
  26. package/src/api/clipboard/fromClipboard/pasteExtension.ts +96 -42
  27. package/src/api/exporters/html/__snapshots__/codeBlock/contains-newlines/external.html +1 -1
  28. package/src/api/exporters/html/__snapshots__/codeBlock/contains-newlines/internal.html +1 -1
  29. package/src/api/exporters/html/__snapshots__/codeBlock/defaultLanguage/external.html +1 -1
  30. package/src/api/exporters/html/__snapshots__/codeBlock/defaultLanguage/internal.html +1 -1
  31. package/src/api/exporters/html/__snapshots__/codeBlock/empty/external.html +1 -1
  32. package/src/api/exporters/html/__snapshots__/codeBlock/empty/internal.html +1 -1
  33. package/src/api/exporters/html/__snapshots__/codeBlock/python/external.html +1 -1
  34. package/src/api/exporters/html/__snapshots__/codeBlock/python/internal.html +1 -1
  35. package/src/api/exporters/html/htmlConversion.test.ts +2 -2
  36. package/src/api/exporters/html/util/serializeBlocksExternalHTML.ts +4 -4
  37. package/src/api/exporters/markdown/__snapshots__/codeBlock/defaultLanguage/markdown.md +1 -1
  38. package/src/api/exporters/markdown/__snapshots__/codeBlock/empty/markdown.md +1 -1
  39. package/src/api/exporters/markdown/__snapshots__/complex/misc/markdown.md +1 -1
  40. package/src/api/exporters/markdown/__snapshots__/lists/basic/markdown.md +8 -6
  41. package/src/api/exporters/markdown/__snapshots__/lists/nested/markdown.md +6 -6
  42. package/src/api/exporters/markdown/markdownExporter.test.ts +2 -2
  43. package/src/api/nodeConversions/__snapshots__/nodeConversions.test.ts.snap +2 -2
  44. package/src/api/nodeConversions/nodeToBlock.ts +1 -0
  45. package/src/api/parsers/html/__snapshots__/parse-2-tables.json +129 -0
  46. package/src/api/parsers/html/__snapshots__/parse-codeblocks.json +1 -1
  47. package/src/api/parsers/html/parseHTML.test.ts +36 -1
  48. package/src/api/parsers/markdown/__snapshots__/pasted/whitespace bold.json +42 -0
  49. package/src/api/parsers/markdown/__snapshots__/whitespace bold.json +19 -0
  50. package/src/api/parsers/markdown/detectMarkdown.ts +60 -0
  51. package/src/api/parsers/markdown/parseMarkdown.test.ts +7 -2
  52. package/src/api/parsers/markdown/parseMarkdown.ts +19 -18
  53. package/src/api/testUtil/cases/defaultSchema.ts +13 -0
  54. package/src/blocks/CodeBlockContent/CodeBlockContent.ts +100 -69
  55. package/src/blocks/QuoteBlockContent/QuoteBlockContent.ts +98 -0
  56. package/src/blocks/TableBlockContent/TableExtension.ts +1 -1
  57. package/src/blocks/defaultBlocks.ts +2 -2
  58. package/src/comments/threadstore/yjs/YjsThreadStore.ts +1 -0
  59. package/src/comments/threadstore/yjs/yjsHelpers.ts +3 -1
  60. package/src/comments/types.ts +4 -0
  61. package/src/editor/Block.css +14 -1
  62. package/src/editor/BlockNoteEditor.ts +103 -11
  63. package/src/editor/BlockNoteExtensions.ts +18 -4
  64. package/src/editor/BlockNoteTipTapEditor.ts +18 -7
  65. package/src/extensions/Comments/CommentsPlugin.ts +77 -30
  66. package/src/extensions/HardBreak/HardBreak.ts +35 -0
  67. package/src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts +100 -3
  68. package/src/extensions/SideMenu/dragging.ts +13 -0
  69. package/src/extensions/SuggestionMenu/SuggestionPlugin.ts +3 -1
  70. package/src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts +18 -2
  71. package/src/extensions/TableHandles/TableHandlesPlugin.ts +24 -23
  72. package/src/i18n/index.ts +2 -0
  73. package/src/i18n/locales/ar.ts +10 -0
  74. package/src/i18n/locales/de.ts +21 -1
  75. package/src/i18n/locales/en.ts +10 -0
  76. package/src/i18n/locales/es.ts +21 -1
  77. package/src/i18n/locales/fr.ts +10 -0
  78. package/src/i18n/locales/hr.ts +27 -4
  79. package/src/i18n/locales/is.ts +10 -0
  80. package/src/i18n/locales/it.ts +21 -1
  81. package/src/i18n/locales/ja.ts +10 -0
  82. package/src/i18n/locales/ko.ts +10 -0
  83. package/src/i18n/locales/nl.ts +10 -0
  84. package/src/i18n/locales/no.ts +10 -0
  85. package/src/i18n/locales/pl.ts +10 -0
  86. package/src/i18n/locales/pt.ts +10 -0
  87. package/src/i18n/locales/ru.ts +10 -0
  88. package/src/i18n/locales/uk.ts +10 -0
  89. package/src/i18n/locales/vi.ts +10 -0
  90. package/src/i18n/locales/zh.ts +10 -0
  91. package/src/index.ts +2 -3
  92. package/src/locales.ts +1 -0
  93. package/src/schema/blocks/types.ts +1 -0
  94. package/types/src/api/blockManipulation/commands/updateBlock/updateBlock.d.ts +1 -1
  95. package/types/src/api/blockManipulation/setupTestEnv.d.ts +34 -2
  96. package/types/src/api/clipboard/fromClipboard/acceptedMIMETypes.d.ts +1 -1
  97. package/types/src/api/clipboard/fromClipboard/fileDropExtension.d.ts +2 -2
  98. package/types/src/api/clipboard/fromClipboard/pasteExtension.d.ts +3 -3
  99. package/types/src/api/clipboard/testUtil.d.ts +66 -34
  100. package/types/src/api/clipboard/toClipboard/copyExtension.d.ts +1 -1
  101. package/types/src/api/exporters/html/externalHTMLExporter.d.ts +2 -2
  102. package/types/src/api/exporters/html/internalHTMLSerializer.d.ts +2 -2
  103. package/types/src/api/exporters/html/util/serializeBlocksExternalHTML.d.ts +1 -1
  104. package/types/src/api/exporters/html/util/serializeBlocksInternalHTML.d.ts +1 -1
  105. package/types/src/api/parsers/markdown/detectMarkdown.d.ts +6 -0
  106. package/types/src/api/parsers/markdown/parseMarkdown.d.ts +1 -0
  107. package/types/src/api/testUtil/cases/customBlocks.d.ts +72 -40
  108. package/types/src/api/testUtil/cases/customInlineContent.d.ts +34 -2
  109. package/types/src/api/testUtil/cases/customStyles.d.ts +34 -2
  110. package/types/src/blocks/AudioBlockContent/AudioBlockContent.d.ts +3 -3
  111. package/types/src/blocks/CodeBlockContent/CodeBlockContent.d.ts +46 -34
  112. package/types/src/blocks/FileBlockContent/FileBlockContent.d.ts +3 -3
  113. package/types/src/blocks/FileBlockContent/helpers/render/createFileBlockWrapper.d.ts +1 -1
  114. package/types/src/blocks/HeadingBlockContent/HeadingBlockContent.d.ts +2 -2
  115. package/types/src/blocks/ImageBlockContent/ImageBlockContent.d.ts +2 -2
  116. package/types/src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.d.ts +2 -2
  117. package/types/src/blocks/ListItemBlockContent/CheckListItemBlockContent/CheckListItemBlockContent.d.ts +2 -2
  118. package/types/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.d.ts +2 -2
  119. package/types/src/blocks/PageBreakBlockContent/PageBreakBlockContent.d.ts +2 -2
  120. package/types/src/blocks/PageBreakBlockContent/schema.d.ts +13 -13
  121. package/types/src/blocks/ParagraphBlockContent/ParagraphBlockContent.d.ts +2 -2
  122. package/types/src/blocks/QuoteBlockContent/QuoteBlockContent.d.ts +52 -0
  123. package/types/src/blocks/TableBlockContent/TableBlockContent.d.ts +2 -2
  124. package/types/src/blocks/VideoBlockContent/VideoBlockContent.d.ts +2 -2
  125. package/types/src/blocks/defaultBlockHelpers.d.ts +2 -2
  126. package/types/src/blocks/defaultBlocks.d.ts +107 -44
  127. package/types/src/comments/threadstore/yjs/YjsThreadStore.d.ts +3 -3
  128. package/types/src/comments/types.d.ts +4 -0
  129. package/types/src/editor/BlockNoteEditor.d.ts +58 -0
  130. package/types/src/editor/BlockNoteExtensions.d.ts +3 -2
  131. package/types/src/editor/BlockNoteTipTapEditor.d.ts +2 -1
  132. package/types/src/exporter/mapping.d.ts +2 -2
  133. package/types/src/extensions/BackgroundColor/BackgroundColorMark.d.ts +1 -1
  134. package/types/src/extensions/Collaboration/createCollaborationExtensions.d.ts +1 -1
  135. package/types/src/extensions/Comments/CommentsPlugin.d.ts +16 -1
  136. package/types/src/extensions/HardBreak/HardBreak.d.ts +2 -0
  137. package/types/src/extensions/TableHandles/TableHandlesPlugin.d.ts +4 -4
  138. package/types/src/extensions/TextColor/TextColorMark.d.ts +1 -1
  139. package/types/src/i18n/index.d.ts +2 -0
  140. package/types/src/i18n/locales/de.d.ts +2 -304
  141. package/types/src/i18n/locales/en.d.ts +11 -1
  142. package/types/src/i18n/locales/es.d.ts +2 -269
  143. package/types/src/i18n/locales/hr.d.ts +2 -266
  144. package/types/src/i18n/locales/it.d.ts +2 -269
  145. package/types/src/index.d.ts +1 -2
  146. package/types/src/locales.d.ts +1 -0
  147. package/types/src/pm-nodes/BlockContainer.d.ts +2 -7
  148. package/types/src/pm-nodes/BlockGroup.d.ts +2 -7
  149. package/types/src/schema/blocks/types.d.ts +1 -0
  150. package/types/src/schema/inlineContent/internal.d.ts +1 -1
  151. package/README.md +0 -125
  152. package/src/blocks/CodeBlockContent/defaultSupportedLanguages.ts +0 -116
  153. package/types/src/blocks/CodeBlockContent/shiki.bundle.d.ts +0 -82
@@ -20,6 +20,12 @@ export const ar: Dictionary = {
20
20
  aliases: ["ع3", "عنوان3", "عنوان فرعي"],
21
21
  group: "العناوين",
22
22
  },
23
+ quote: {
24
+ title: "اقتباس",
25
+ subtext: "اقتباس أو مقتطف",
26
+ aliases: ["quotation", "blockquote", "bq"],
27
+ group: "الكتل الأساسية",
28
+ },
23
29
  numbered_list: {
24
30
  title: "قائمة مرقمة",
25
31
  subtext: "تستخدم لعرض قائمة مرقمة",
@@ -325,6 +331,10 @@ export const ar: Dictionary = {
325
331
  reactions: {
326
332
  reacted_by: "تفاعل بواسطة",
327
333
  },
334
+ sidebar: {
335
+ marked_as_resolved: "تم وضع علامة كتم الحل",
336
+ more_replies: (count) => `${count} ردود أخرى`,
337
+ },
328
338
  },
329
339
  generic: {
330
340
  ctrl_shortcut: "Ctrl",
@@ -1,4 +1,6 @@
1
- export const de = {
1
+ import { Dictionary } from "../dictionary.js";
2
+
3
+ export const de: Dictionary = {
2
4
  slash_menu: {
3
5
  heading: {
4
6
  title: "Überschrift 1",
@@ -18,6 +20,12 @@ export const de = {
18
20
  aliases: ["h3", "überschrift3", "unterüberschrift"],
19
21
  group: "Überschriften",
20
22
  },
23
+ quote: {
24
+ title: "Zitat",
25
+ subtext: "Zitat oder Auszug",
26
+ aliases: ["quotation", "blockquote", "bq"],
27
+ group: "Grundlegende blöcke",
28
+ },
21
29
  numbered_list: {
22
30
  title: "Nummerierte Liste",
23
31
  subtext: "Liste mit nummerierten Elementen",
@@ -154,6 +162,8 @@ export const de = {
154
162
  drag_handle: {
155
163
  delete_menuitem: "Löschen",
156
164
  colors_menuitem: "Farben",
165
+ header_row_menuitem: "Kopfzeile",
166
+ header_column_menuitem: "Kopfspalte",
157
167
  },
158
168
  table_handle: {
159
169
  delete_column_menuitem: "Spalte löschen",
@@ -162,6 +172,9 @@ export const de = {
162
172
  add_right_menuitem: "Spalte rechts hinzufügen",
163
173
  add_above_menuitem: "Zeile oberhalb hinzufügen",
164
174
  add_below_menuitem: "Zeile unterhalb hinzufügen",
175
+ split_cell_menuitem: "Zelle teilen",
176
+ merge_cells_menuitem: "Zellen zusammenführen",
177
+ background_color_menuitem: "Hintergrundfarbe",
165
178
  },
166
179
  suggestion_menu: {
167
180
  no_items_title: "Keine Elemente gefunden",
@@ -276,6 +289,9 @@ export const de = {
276
289
  align_justify: {
277
290
  tooltip: "Text Blocksatz",
278
291
  },
292
+ table_cell_merge: {
293
+ tooltip: "Zellen zusammenführen",
294
+ },
279
295
  comment: {
280
296
  tooltip: "Kommentar hinzufügen",
281
297
  },
@@ -329,6 +345,10 @@ export const de = {
329
345
  reactions: {
330
346
  reacted_by: "Reagiert von",
331
347
  },
348
+ sidebar: {
349
+ marked_as_resolved: "Als gelöst markiert",
350
+ more_replies: (count) => `${count} weitere Antworten`,
351
+ },
332
352
  },
333
353
  generic: {
334
354
  ctrl_shortcut: "Strg",
@@ -18,6 +18,12 @@ export const en = {
18
18
  aliases: ["h3", "heading3", "subheading"],
19
19
  group: "Headings",
20
20
  },
21
+ quote: {
22
+ title: "Quote",
23
+ subtext: "Quote or excerpt",
24
+ aliases: ["quotation", "blockquote", "bq"],
25
+ group: "Basic blocks",
26
+ },
21
27
  numbered_list: {
22
28
  title: "Numbered List",
23
29
  subtext: "List with ordered items",
@@ -340,6 +346,10 @@ export const en = {
340
346
  reactions: {
341
347
  reacted_by: "Reacted by",
342
348
  },
349
+ sidebar: {
350
+ marked_as_resolved: "Marked as resolved",
351
+ more_replies: (count: number) => `${count} more replies`,
352
+ },
343
353
  },
344
354
  generic: {
345
355
  ctrl_shortcut: "Ctrl",
@@ -1,4 +1,6 @@
1
- export const es = {
1
+ import { Dictionary } from "../dictionary.js";
2
+
3
+ export const es: Dictionary = {
2
4
  slash_menu: {
3
5
  heading: {
4
6
  title: "Encabezado 1",
@@ -18,6 +20,12 @@ export const es = {
18
20
  aliases: ["h3", "encabezado3", "subencabezado"],
19
21
  group: "Encabezados",
20
22
  },
23
+ quote: {
24
+ title: "Cita",
25
+ subtext: "Cita o extracto",
26
+ aliases: ["quotation", "blockquote", "bq"],
27
+ group: "Bloques básicos",
28
+ },
21
29
  numbered_list: {
22
30
  title: "Lista Numerada",
23
31
  subtext: "Lista con elementos ordenados",
@@ -153,6 +161,8 @@ export const es = {
153
161
  drag_handle: {
154
162
  delete_menuitem: "Eliminar",
155
163
  colors_menuitem: "Colores",
164
+ header_row_menuitem: "Fila de encabezado",
165
+ header_column_menuitem: "Columna de encabezado",
156
166
  },
157
167
  table_handle: {
158
168
  delete_column_menuitem: "Eliminar columna",
@@ -161,6 +171,9 @@ export const es = {
161
171
  add_right_menuitem: "Agregar columna a la derecha",
162
172
  add_above_menuitem: "Agregar fila arriba",
163
173
  add_below_menuitem: "Agregar fila abajo",
174
+ split_cell_menuitem: "Dividir celda",
175
+ merge_cells_menuitem: "Combinar celdas",
176
+ background_color_menuitem: "Color de fondo",
164
177
  },
165
178
  suggestion_menu: {
166
179
  no_items_title: "No se encontraron elementos",
@@ -275,6 +288,9 @@ export const es = {
275
288
  align_justify: {
276
289
  tooltip: "Justificar texto",
277
290
  },
291
+ table_cell_merge: {
292
+ tooltip: "Combinar celdas",
293
+ },
278
294
  comment: {
279
295
  tooltip: "Añadir comentario",
280
296
  },
@@ -328,6 +344,10 @@ export const es = {
328
344
  reactions: {
329
345
  reacted_by: "Reaccionado por",
330
346
  },
347
+ sidebar: {
348
+ marked_as_resolved: "Marcado como resuelto",
349
+ more_replies: (count) => `${count} respuestas más`,
350
+ },
331
351
  },
332
352
  generic: {
333
353
  ctrl_shortcut: "Ctrl",
@@ -21,6 +21,12 @@ export const fr: Dictionary = {
21
21
  aliases: ["h3", "titre3", "sous-titre"],
22
22
  group: "Titres",
23
23
  },
24
+ quote: {
25
+ title: "Citation",
26
+ subtext: "Citation ou extrait",
27
+ aliases: ["quotation", "blockquote", "bq"],
28
+ group: "Blocs de base",
29
+ },
24
30
  numbered_list: {
25
31
  title: "Liste Numérotée",
26
32
  subtext: "Utilisé pour afficher une liste numérotée",
@@ -364,6 +370,10 @@ export const fr: Dictionary = {
364
370
  reactions: {
365
371
  reacted_by: "Réagi par",
366
372
  },
373
+ sidebar: {
374
+ marked_as_resolved: "Marqué comme résolu",
375
+ more_replies: (count) => `${count} réponses de plus`,
376
+ },
367
377
  },
368
378
  generic: {
369
379
  ctrl_shortcut: "Ctrl",
@@ -1,4 +1,6 @@
1
- export const hr = {
1
+ import { Dictionary } from "../dictionary.js";
2
+
3
+ export const hr: Dictionary = {
2
4
  slash_menu: {
3
5
  heading: {
4
6
  title: "Naslov 1",
@@ -18,6 +20,12 @@ export const hr = {
18
20
  aliases: ["h3", "naslov3", "podnaslov"],
19
21
  group: "Naslovi",
20
22
  },
23
+ quote: {
24
+ title: "Citat",
25
+ subtext: "Citat ili izvadak",
26
+ aliases: ["quotation", "blockquote", "bq"],
27
+ group: "Osnovni blokovi",
28
+ },
21
29
  numbered_list: {
22
30
  title: "Numerirani popis",
23
31
  subtext: "Popis s numeriranim stavkama",
@@ -68,6 +76,12 @@ export const hr = {
68
76
  aliases: ["tablica"],
69
77
  group: "Napredno",
70
78
  },
79
+ code_block: {
80
+ title: "Blok koda",
81
+ subtext: "Blok koda sa sintaksnim isticanjem",
82
+ aliases: ["code", "pre"],
83
+ group: "Osnovni blokovi",
84
+ },
71
85
  page_break: {
72
86
  title: "Prijelom stranice",
73
87
  subtext: "Razdjelnik stranice",
@@ -128,9 +142,6 @@ export const hr = {
128
142
  aliases: ["emoji", "emotikon", "emocija", "lice"],
129
143
  group: "Ostalo",
130
144
  },
131
- comment: {
132
- tooltip: "Dodaj komentar",
133
- },
134
145
  },
135
146
  placeholders: {
136
147
  default: "Unesi tekst ili upiši ‘/’ za naredbe",
@@ -164,6 +175,8 @@ export const hr = {
164
175
  drag_handle: {
165
176
  delete_menuitem: "Ukloni",
166
177
  colors_menuitem: "Boje",
178
+ header_row_menuitem: "Zaglavni redak",
179
+ header_column_menuitem: "Zaglavni stupac",
167
180
  },
168
181
  table_handle: {
169
182
  delete_column_menuitem: "Ukloni stupac",
@@ -172,6 +185,9 @@ export const hr = {
172
185
  add_right_menuitem: "Dodaj stupac desno",
173
186
  add_above_menuitem: "Dodaj redak iznad",
174
187
  add_below_menuitem: "Dodaj redak ispod",
188
+ split_cell_menuitem: "Podijeli ćeliju",
189
+ merge_cells_menuitem: "Spoji ćelije",
190
+ background_color_menuitem: "Boja pozadine",
175
191
  },
176
192
  suggestion_menu: {
177
193
  no_items_title: "Stavke nisu pronađene",
@@ -287,6 +303,9 @@ export const hr = {
287
303
  align_justify: {
288
304
  tooltip: "Poravnaj tekst obostrano",
289
305
  },
306
+ table_cell_merge: {
307
+ tooltip: "Spoji ćelije",
308
+ },
290
309
  comment: {
291
310
  tooltip: "Dodaj komentar",
292
311
  },
@@ -340,6 +359,10 @@ export const hr = {
340
359
  reactions: {
341
360
  reacted_by: "Reagirao/la",
342
361
  },
362
+ sidebar: {
363
+ marked_as_resolved: "Označeno kao riješeno",
364
+ more_replies: (count) => `${count} dodatnih odgovora`,
365
+ },
343
366
  },
344
367
  generic: {
345
368
  ctrl_shortcut: "Ctrl",
@@ -20,6 +20,12 @@ export const is: Dictionary = {
20
20
  aliases: ["h3", "fyrirsogn3", "undirfyrirsogn"],
21
21
  group: "Fyrirsagnir",
22
22
  },
23
+ quote: {
24
+ title: "Tilvitnun",
25
+ subtext: "Tilvitnun eða útdráttur",
26
+ aliases: ["quotation", "blockquote", "bq"],
27
+ group: "Grunnblokkar",
28
+ },
23
29
  numbered_list: {
24
30
  title: "Númeruð listi",
25
31
  subtext: "Notað til að birta númeraðan lista",
@@ -332,6 +338,10 @@ export const is: Dictionary = {
332
338
  reactions: {
333
339
  reacted_by: "Brást við af",
334
340
  },
341
+ sidebar: {
342
+ marked_as_resolved: "Merkt sem leyst",
343
+ more_replies: (count) => `${count} fleiri svör`,
344
+ },
335
345
  },
336
346
  generic: {
337
347
  ctrl_shortcut: "Ctrl",
@@ -1,4 +1,6 @@
1
- export const it = {
1
+ import { Dictionary } from "../dictionary.js";
2
+
3
+ export const it: Dictionary = {
2
4
  slash_menu: {
3
5
  heading: {
4
6
  title: "Intestazione 1",
@@ -18,6 +20,12 @@ export const it = {
18
20
  aliases: ["h3", "intestazione3", "sottotitolo"],
19
21
  group: "Intestazioni",
20
22
  },
23
+ quote: {
24
+ title: "Citazione",
25
+ subtext: "Citazione o estratto",
26
+ aliases: ["quotation", "blockquote", "bq"],
27
+ group: "Blocchi Base",
28
+ },
21
29
  numbered_list: {
22
30
  title: "Elenco Numerato",
23
31
  subtext: "Elenco con elementi ordinati",
@@ -155,6 +163,8 @@ export const it = {
155
163
  drag_handle: {
156
164
  delete_menuitem: "Elimina",
157
165
  colors_menuitem: "Colori",
166
+ header_row_menuitem: "Riga intestazione",
167
+ header_column_menuitem: "Colonna intestazione",
158
168
  },
159
169
  table_handle: {
160
170
  delete_column_menuitem: "Elimina colonna",
@@ -163,6 +173,9 @@ export const it = {
163
173
  add_right_menuitem: "Aggiungi colonna a destra",
164
174
  add_above_menuitem: "Aggiungi riga sopra",
165
175
  add_below_menuitem: "Aggiungi riga sotto",
176
+ split_cell_menuitem: "Dividi cella",
177
+ merge_cells_menuitem: "Unisci celle",
178
+ background_color_menuitem: "Colore di sfondo",
166
179
  },
167
180
  suggestion_menu: {
168
181
  no_items_title: "Nessun elemento trovato",
@@ -278,6 +291,9 @@ export const it = {
278
291
  align_justify: {
279
292
  tooltip: "Giustifica testo",
280
293
  },
294
+ table_cell_merge: {
295
+ tooltip: "Unisci celle",
296
+ },
281
297
  comment: {
282
298
  tooltip: "Aggiungi commento",
283
299
  },
@@ -331,6 +347,10 @@ export const it = {
331
347
  reactions: {
332
348
  reacted_by: "Reagito da",
333
349
  },
350
+ sidebar: {
351
+ marked_as_resolved: "Contrassegnato come risolto",
352
+ more_replies: (count) => `${count} altre risposte`,
353
+ },
334
354
  },
335
355
  generic: {
336
356
  ctrl_shortcut: "Ctrl",
@@ -20,6 +20,12 @@ export const ja: Dictionary = {
20
20
  aliases: ["h3", "見出し3", "subheading", "小見出し"],
21
21
  group: "見出し",
22
22
  },
23
+ quote: {
24
+ title: "引用",
25
+ subtext: "引用または抜粋",
26
+ aliases: ["quotation", "blockquote", "bq"],
27
+ group: "基本ブロック",
28
+ },
23
29
  numbered_list: {
24
30
  title: "番号付リスト",
25
31
  subtext: "番号付リストを表示するために使用",
@@ -360,6 +366,10 @@ export const ja: Dictionary = {
360
366
  reactions: {
361
367
  reacted_by: "リアクションした人",
362
368
  },
369
+ sidebar: {
370
+ marked_as_resolved: "解決済みとしてマーク",
371
+ more_replies: (count) => `${count} 件の追加返信`,
372
+ },
363
373
  },
364
374
  generic: {
365
375
  ctrl_shortcut: "Ctrl",
@@ -20,6 +20,12 @@ export const ko: Dictionary = {
20
20
  aliases: ["h3", "제목3", "subheading"],
21
21
  group: "제목",
22
22
  },
23
+ quote: {
24
+ title: "인용",
25
+ subtext: "인용문 또는 발췌",
26
+ aliases: ["quotation", "blockquote", "bq"],
27
+ group: "기본 블록",
28
+ },
23
29
  numbered_list: {
24
30
  title: "번호 매기기 목록",
25
31
  subtext: "번호가 매겨진 목록을 추가합니다.",
@@ -353,6 +359,10 @@ export const ko: Dictionary = {
353
359
  reactions: {
354
360
  reacted_by: "반응한 사람",
355
361
  },
362
+ sidebar: {
363
+ marked_as_resolved: "해결됨으로 표시됨",
364
+ more_replies: (count) => `${count}개의 추가 답글`,
365
+ },
356
366
  },
357
367
  generic: {
358
368
  ctrl_shortcut: "Ctrl",
@@ -20,6 +20,12 @@ export const nl: Dictionary = {
20
20
  aliases: ["h3", "kop3", "subkop"],
21
21
  group: "Koppen",
22
22
  },
23
+ quote: {
24
+ title: "Citaat",
25
+ subtext: "Citaat of uittreksel",
26
+ aliases: ["quotation", "blockquote", "bq"],
27
+ group: "Basisblokken",
28
+ },
23
29
  numbered_list: {
24
30
  title: "Genummerde Lijst",
25
31
  subtext: "Gebruikt om een genummerde lijst weer te geven",
@@ -339,6 +345,10 @@ export const nl: Dictionary = {
339
345
  reactions: {
340
346
  reacted_by: "Gereageerd door",
341
347
  },
348
+ sidebar: {
349
+ marked_as_resolved: "Gemarkeerd als opgelost",
350
+ more_replies: (count) => `${count} extra reacties`,
351
+ },
342
352
  },
343
353
  generic: {
344
354
  ctrl_shortcut: "Ctrl",
@@ -20,6 +20,12 @@ export const no: Dictionary = {
20
20
  aliases: ["h3", "overskrift3", "underoverskrift"],
21
21
  group: "Overskrifter",
22
22
  },
23
+ quote: {
24
+ title: "Sitat",
25
+ subtext: "Sitat eller utdrag",
26
+ aliases: ["quotation", "blockquote", "bq"],
27
+ group: "Grunnleggende blokker",
28
+ },
23
29
  numbered_list: {
24
30
  title: "Nummerert liste",
25
31
  subtext: "Liste med ordnede elementer",
@@ -339,6 +345,10 @@ export const no: Dictionary = {
339
345
  reactions: {
340
346
  reacted_by: "Reagert av",
341
347
  },
348
+ sidebar: {
349
+ marked_as_resolved: "Merket som løst",
350
+ more_replies: (count) => `${count} flere svar`,
351
+ },
342
352
  },
343
353
  generic: {
344
354
  ctrl_shortcut: "Ctrl",
@@ -20,6 +20,12 @@ export const pl: Dictionary = {
20
20
  aliases: ["h3", "naglowek3", "podnaglowek"],
21
21
  group: "Nagłówki",
22
22
  },
23
+ quote: {
24
+ title: "Cytat",
25
+ subtext: "Cytat lub fragment",
26
+ aliases: ["quotation", "blockquote", "bq"],
27
+ group: "Podstawowe bloki",
28
+ },
23
29
  numbered_list: {
24
30
  title: "Lista numerowana",
25
31
  subtext: "Używana do wyświetlania listy numerowanej",
@@ -324,6 +330,10 @@ export const pl: Dictionary = {
324
330
  reactions: {
325
331
  reacted_by: "Zareagowali",
326
332
  },
333
+ sidebar: {
334
+ marked_as_resolved: "Oznaczone jako rozwiązane",
335
+ more_replies: (count) => `${count} więcej odpowiedzi`,
336
+ },
327
337
  },
328
338
  generic: {
329
339
  ctrl_shortcut: "Ctrl",
@@ -20,6 +20,12 @@ export const pt: Dictionary = {
20
20
  aliases: ["h3", "titulo3", "subtitulo"],
21
21
  group: "Títulos",
22
22
  },
23
+ quote: {
24
+ title: "Citação",
25
+ subtext: "Citação ou trecho",
26
+ aliases: ["quotation", "blockquote", "bq"],
27
+ group: "Blocos básicos",
28
+ },
23
29
  numbered_list: {
24
30
  title: "Lista Numerada",
25
31
  subtext: "Usado para exibir uma lista numerada",
@@ -332,6 +338,10 @@ export const pt: Dictionary = {
332
338
  reactions: {
333
339
  reacted_by: "Reagido por",
334
340
  },
341
+ sidebar: {
342
+ marked_as_resolved: "Marcado como resolvido",
343
+ more_replies: (count) => `${count} respostas a mais`,
344
+ },
335
345
  },
336
346
  generic: {
337
347
  ctrl_shortcut: "Ctrl",
@@ -20,6 +20,12 @@ export const ru: Dictionary = {
20
20
  aliases: ["h3", "heading3", "subheading", "заголовок3", "подзаголовок"],
21
21
  group: "Заголовки",
22
22
  },
23
+ quote: {
24
+ title: "Цитата",
25
+ subtext: "Цитата или отрывок",
26
+ aliases: ["quotation", "blockquote", "bq"],
27
+ group: "Базовые блоки",
28
+ },
23
29
  numbered_list: {
24
30
  title: "Нумерованный список",
25
31
  subtext: "Используется для отображения нумерованного списка",
@@ -367,6 +373,10 @@ export const ru: Dictionary = {
367
373
  reactions: {
368
374
  reacted_by: "Отреагировал(а)",
369
375
  },
376
+ sidebar: {
377
+ marked_as_resolved: "Отмечено как решенное",
378
+ more_replies: (count) => `${count} дополнительных ответов`,
379
+ },
370
380
  },
371
381
  generic: {
372
382
  ctrl_shortcut: "Ctrl",
@@ -20,6 +20,12 @@ export const uk: Dictionary = {
20
20
  aliases: ["h3", "heading3", "subheading", "заголовок3"],
21
21
  group: "Заголовки",
22
22
  },
23
+ quote: {
24
+ title: "Цитата",
25
+ subtext: "Цитата або уривок",
26
+ aliases: ["quotation", "blockquote", "bq"],
27
+ group: "Базові блоки",
28
+ },
23
29
  numbered_list: {
24
30
  title: "Нумерований список",
25
31
  subtext: "Список із впорядкованими елементами",
@@ -364,6 +370,10 @@ export const uk: Dictionary = {
364
370
  reactions: {
365
371
  reacted_by: "Відреагував(ла)",
366
372
  },
373
+ sidebar: {
374
+ marked_as_resolved: "Позначено як вирішене",
375
+ more_replies: (count) => `${count} додаткових відповідей`,
376
+ },
367
377
  },
368
378
  generic: {
369
379
  ctrl_shortcut: "Ctrl",
@@ -20,6 +20,12 @@ export const vi: Dictionary = {
20
20
  aliases: ["h3", "tieude3", "tieudephu"],
21
21
  group: "Tiêu đề",
22
22
  },
23
+ quote: {
24
+ title: "Trích dẫn",
25
+ subtext: "Trích dẫn hoặc đoạn trích",
26
+ aliases: ["quotation", "blockquote", "bq"],
27
+ group: "Khối cơ bản",
28
+ },
23
29
  numbered_list: {
24
30
  title: "Danh sách đánh số",
25
31
  subtext: "Sử dụng để hiển thị danh sách có đánh số",
@@ -339,6 +345,10 @@ export const vi: Dictionary = {
339
345
  reactions: {
340
346
  reacted_by: "Phản ứng bởi",
341
347
  },
348
+ sidebar: {
349
+ marked_as_resolved: "Đã đánh dấu là đã giải quyết",
350
+ more_replies: (count) => `${count} câu trả lời nữa`,
351
+ },
342
352
  },
343
353
  generic: {
344
354
  ctrl_shortcut: "Ctrl",
@@ -20,6 +20,12 @@ export const zh: Dictionary = {
20
20
  aliases: ["h3", "heading3", "subheading", "标题", "三级标题"],
21
21
  group: "标题",
22
22
  },
23
+ quote: {
24
+ title: "引用",
25
+ subtext: "引用或摘录",
26
+ aliases: ["quotation", "blockquote", "bq"],
27
+ group: "基本块",
28
+ },
23
29
  numbered_list: {
24
30
  title: "有序列表",
25
31
  subtext: "用于显示有序列表",
@@ -373,6 +379,10 @@ export const zh: Dictionary = {
373
379
  reactions: {
374
380
  reacted_by: "已回应",
375
381
  },
382
+ sidebar: {
383
+ marked_as_resolved: "标记为已解决",
384
+ more_replies: (count) => `还有 ${count} 条回复`,
385
+ },
376
386
  },
377
387
  generic: {
378
388
  ctrl_shortcut: "Ctrl",
package/src/index.ts CHANGED
@@ -1,4 +1,3 @@
1
- import * as locales from "./i18n/locales/index.js";
2
1
  export * from "./api/blockManipulation/commands/updateBlock/updateBlock.js";
3
2
  export * from "./api/exporters/html/externalHTMLExporter.js";
4
3
  export * from "./api/exporters/html/internalHTMLSerializer.js";
@@ -56,8 +55,9 @@ export * from "./util/esmDependencies.js";
56
55
  export * from "./util/table.js";
57
56
  export * from "./util/string.js";
58
57
  export * from "./util/typescript.js";
58
+
59
+ export type { CodeBlockOptions } from "./blocks/CodeBlockContent/CodeBlockContent.js";
59
60
  export { UnreachableCaseError, assertEmpty } from "./util/typescript.js";
60
- export { locales };
61
61
 
62
62
  // for testing from react (TODO: move):
63
63
  export * from "./api/nodeConversions/blockToNode.js";
@@ -69,4 +69,3 @@ export * from "./extensions/UniqueID/UniqueID.js";
69
69
  export * from "./api/exporters/markdown/markdownExporter.js";
70
70
  export * from "./api/parsers/html/parseHTML.js";
71
71
  export * from "./api/parsers/markdown/parseMarkdown.js";
72
-
package/src/locales.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "./i18n/index.js";
@@ -63,6 +63,7 @@ export type BlockConfig =
63
63
  content: "inline" | "none" | "table";
64
64
  isSelectable?: boolean;
65
65
  isFileBlock?: false;
66
+ hardBreakShortcut?: "shift+enter" | "enter" | "none";
66
67
  }
67
68
  | FileBlockConfig;
68
69
 
@@ -4,7 +4,7 @@ import { BlockNoteEditor } from "../../../../editor/BlockNoteEditor.js";
4
4
  import { BlockIdentifier, BlockSchema } from "../../../../schema/blocks/types.js";
5
5
  import { InlineContentSchema } from "../../../../schema/inlineContent/types.js";
6
6
  import { StyleSchema } from "../../../../schema/styles/types.js";
7
- export declare const updateBlockCommand: <BSchema extends Record<string, import("../../../../schema/blocks/types.js").BlockConfig>, I extends InlineContentSchema, S extends StyleSchema>(editor: BlockNoteEditor<BSchema, I, S>, posBeforeBlock: number, block: PartialBlock<BSchema, I, S>) => ({ state, dispatch, }: {
7
+ export declare const updateBlockCommand: <BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema>(editor: BlockNoteEditor<BSchema, I, S>, posBeforeBlock: number, block: PartialBlock<BSchema, I, S>) => ({ state, dispatch, }: {
8
8
  state: EditorState;
9
9
  dispatch: ((args?: any) => any) | undefined;
10
10
  }) => boolean;