@blocknote/core 0.32.0-hackdays.0 → 0.33.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 (87) hide show
  1. package/dist/blocknote.cjs +9 -9
  2. package/dist/blocknote.cjs.map +1 -1
  3. package/dist/blocknote.js +2193 -1961
  4. package/dist/blocknote.js.map +1 -1
  5. package/dist/en-CsgPjHa4.cjs +2 -0
  6. package/dist/en-CsgPjHa4.cjs.map +1 -0
  7. package/dist/{en-qGo6sk9V.js → en-Dx9fwHD4.js} +47 -1
  8. package/dist/en-Dx9fwHD4.js.map +1 -0
  9. package/dist/locales.cjs +1 -1
  10. package/dist/locales.cjs.map +1 -1
  11. package/dist/locales.js +1453 -30
  12. package/dist/locales.js.map +1 -1
  13. package/dist/style.css +1 -1
  14. package/dist/tsconfig.tsbuildinfo +1 -0
  15. package/dist/webpack-stats.json +1 -1
  16. package/package.json +1 -1
  17. package/src/api/blockManipulation/commands/insertBlocks/__snapshots__/insertBlocks.test.ts.snap +18 -0
  18. package/src/api/blockManipulation/commands/mergeBlocks/__snapshots__/mergeBlocks.test.ts.snap +10 -0
  19. package/src/api/blockManipulation/commands/moveBlocks/__snapshots__/moveBlocks.test.ts.snap +40 -0
  20. package/src/api/blockManipulation/commands/replaceBlocks/__snapshots__/replaceBlocks.test.ts.snap +23 -0
  21. package/src/api/blockManipulation/commands/splitBlock/__snapshots__/splitBlock.test.ts.snap +13 -0
  22. package/src/api/blockManipulation/commands/updateBlock/__snapshots__/updateBlock.test.ts.snap +50 -0
  23. package/src/blocks/HeadingBlockContent/HeadingBlockContent.ts +72 -74
  24. package/src/blocks/ListItemBlockContent/ListItemKeyboardShortcuts.ts +1 -0
  25. package/src/blocks/ListItemBlockContent/ToggleListItemBlockContent/ToggleListItemBlockContent.ts +104 -0
  26. package/src/blocks/ToggleWrapper/createToggleWrapper.ts +182 -0
  27. package/src/blocks/defaultBlockTypeGuards.ts +6 -2
  28. package/src/blocks/defaultBlocks.ts +2 -0
  29. package/src/editor/Block.css +112 -25
  30. package/src/editor/BlockNoteEditor.test.ts +1 -0
  31. package/src/editor/BlockNoteEditor.ts +18 -0
  32. package/src/editor/BlockNoteExtensions.ts +1 -1
  33. package/src/editor/BlockNoteTipTapEditor.ts +1 -0
  34. package/src/editor/editor.css +3 -0
  35. package/src/extensions/Collaboration/CursorPlugin.ts +33 -2
  36. package/src/extensions/Collaboration/ForkYDocPlugin.ts +26 -8
  37. package/src/extensions/Collaboration/UndoPlugin.ts +3 -2
  38. package/src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts +4 -1
  39. package/src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts +16 -4
  40. package/src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts +64 -0
  41. package/src/i18n/locales/ar.ts +46 -0
  42. package/src/i18n/locales/de.ts +65 -0
  43. package/src/i18n/locales/en.ts +46 -0
  44. package/src/i18n/locales/es.ts +46 -0
  45. package/src/i18n/locales/fr.ts +68 -0
  46. package/src/i18n/locales/he.ts +402 -0
  47. package/src/i18n/locales/hr.ts +46 -0
  48. package/src/i18n/locales/index.ts +1 -0
  49. package/src/i18n/locales/is.ts +67 -0
  50. package/src/i18n/locales/it.ts +67 -0
  51. package/src/i18n/locales/ja.ts +66 -0
  52. package/src/i18n/locales/ko.ts +46 -0
  53. package/src/i18n/locales/nl.ts +47 -0
  54. package/src/i18n/locales/no.ts +64 -0
  55. package/src/i18n/locales/pl.ts +52 -0
  56. package/src/i18n/locales/pt.ts +46 -0
  57. package/src/i18n/locales/ru.ts +62 -0
  58. package/src/i18n/locales/sk.ts +46 -0
  59. package/src/i18n/locales/uk.ts +46 -0
  60. package/src/i18n/locales/vi.ts +46 -0
  61. package/src/i18n/locales/zh-tw.ts +54 -0
  62. package/src/i18n/locales/zh.ts +54 -0
  63. package/src/index.ts +1 -0
  64. package/src/schema/blocks/createSpec.ts +3 -1
  65. package/src/util/browser.ts +11 -1
  66. package/types/src/api/blockManipulation/setupTestEnv.d.ts +42 -2
  67. package/types/src/blocks/HeadingBlockContent/HeadingBlockContent.d.ts +12 -3
  68. package/types/src/blocks/ListItemBlockContent/ToggleListItemBlockContent/ToggleListItemBlockContent.d.ts +46 -0
  69. package/types/src/blocks/ToggleWrapper/createToggleWrapper.d.ts +15 -0
  70. package/types/src/blocks/defaultBlockTypeGuards.d.ts +2 -2
  71. package/types/src/blocks/defaultBlocks.d.ts +84 -4
  72. package/types/src/editor/BlockNoteEditor.d.ts +14 -0
  73. package/types/src/extensions/Collaboration/CursorPlugin.d.ts +6 -0
  74. package/types/src/extensions/Collaboration/UndoPlugin.d.ts +4 -1
  75. package/types/src/i18n/locales/en.d.ts +45 -0
  76. package/types/src/i18n/locales/he.d.ts +2 -0
  77. package/types/src/i18n/locales/index.d.ts +1 -0
  78. package/types/src/i18n/locales/sk.d.ts +45 -0
  79. package/types/src/index.d.ts +1 -0
  80. package/types/src/schema/blocks/createSpec.d.ts +2 -1
  81. package/dist/en-BXVKCwYt.cjs +0 -2
  82. package/dist/en-BXVKCwYt.cjs.map +0 -1
  83. package/dist/en-qGo6sk9V.js.map +0 -1
  84. package/types/src/api/blockManipulation/selections/selection.test.d.ts +0 -1
  85. package/types/src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.d.ts +0 -5
  86. package/types/src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.test.d.ts +0 -1
  87. package/types/src/extensions/Collaboration/createCollaborationExtensions.d.ts +0 -17
@@ -20,6 +20,54 @@ export const de: Dictionary = {
20
20
  aliases: ["h3", "überschrift3", "unterüberschrift"],
21
21
  group: "Überschriften",
22
22
  },
23
+ heading_4: {
24
+ title: "Überschrift 4",
25
+ subtext: "Überschrift für kleinere Unterabschnitte",
26
+ aliases: ["h4", "überschrift4", "unterüberschrift4"],
27
+ group: "Unterüberschriften",
28
+ },
29
+ heading_5: {
30
+ title: "Überschrift 5",
31
+ subtext: "Überschrift für tiefere Unterabschnitte",
32
+ aliases: ["h5", "überschrift5", "unterüberschrift5"],
33
+ group: "Unterüberschriften",
34
+ },
35
+ heading_6: {
36
+ title: "Überschrift 6",
37
+ subtext: "Überschrift auf der untersten Ebene",
38
+ aliases: ["h6", "überschrift6", "unterüberschrift6"],
39
+ group: "Unterüberschriften",
40
+ },
41
+ toggle_heading: {
42
+ title: "Aufklappbare Überschrift 1",
43
+ subtext: "Aufklappbare Hauptebene Überschrift",
44
+ aliases: ["h", "überschrift1", "h1", "aufklappbar", "einklappbar"],
45
+ group: "Unterüberschrift",
46
+ },
47
+ toggle_heading_2: {
48
+ title: "Aufklappbare Überschrift 2",
49
+ subtext: "Aufklappbare wichtige Abschnittsüberschrift",
50
+ aliases: [
51
+ "h2",
52
+ "überschrift2",
53
+ "unterüberschrift",
54
+ "aufklappbar",
55
+ "einklappbar",
56
+ ],
57
+ group: "Unterüberschriften",
58
+ },
59
+ toggle_heading_3: {
60
+ title: "Aufklappbare Überschrift 3",
61
+ subtext: "Aufklappbare Unterabschnitts- und Gruppenüberschrift",
62
+ aliases: [
63
+ "h3",
64
+ "überschrift3",
65
+ "unterüberschrift",
66
+ "aufklappbar",
67
+ "einklappbar",
68
+ ],
69
+ group: "Unterüberschriften",
70
+ },
23
71
  quote: {
24
72
  title: "Zitat",
25
73
  subtext: "Zitat oder Auszug",
@@ -52,6 +100,19 @@ export const de: Dictionary = {
52
100
  ],
53
101
  group: "Grundlegende Blöcke",
54
102
  },
103
+ toggle_list: {
104
+ title: "Aufklappbare Liste",
105
+ subtext: "Liste mit ausblendbare Unterpunkten",
106
+ aliases: [
107
+ "li",
108
+ "liste",
109
+ "aufklappbare liste",
110
+ "einklappbare liste",
111
+ "aufklappbareListe",
112
+ "aufklappbare liste",
113
+ ],
114
+ group: "Grundlegende Blöcke",
115
+ },
55
116
  paragraph: {
56
117
  title: "Absatz",
57
118
  subtext: "Der Hauptteil Ihres Dokuments",
@@ -134,6 +195,7 @@ export const de: Dictionary = {
134
195
  placeholders: {
135
196
  default: "Text eingeben oder '/' für Befehle tippen",
136
197
  heading: "Überschrift",
198
+ toggleListItem: "Umschalten",
137
199
  bulletListItem: "Liste",
138
200
  numberedListItem: "Liste",
139
201
  checkListItem: "Liste",
@@ -334,6 +396,9 @@ export const de: Dictionary = {
334
396
  },
335
397
  },
336
398
  comments: {
399
+ edited: "bearbeitet",
400
+ save_button_text: "Speichern",
401
+ cancel_button_text: "Abbrechen",
337
402
  actions: {
338
403
  add_reaction: "Reaktion hinzufügen",
339
404
  resolve: "Lösen",
@@ -18,12 +18,54 @@ export const en = {
18
18
  aliases: ["h3", "heading3", "subheading"],
19
19
  group: "Headings",
20
20
  },
21
+ heading_4: {
22
+ title: "Heading 4",
23
+ subtext: "Minor subsection heading",
24
+ aliases: ["h4", "heading4", "subheading4"],
25
+ group: "Subheadings",
26
+ },
27
+ heading_5: {
28
+ title: "Heading 5",
29
+ subtext: "Small subsection heading",
30
+ aliases: ["h5", "heading5", "subheading5"],
31
+ group: "Subheadings",
32
+ },
33
+ heading_6: {
34
+ title: "Heading 6",
35
+ subtext: "Lowest-level heading",
36
+ aliases: ["h6", "heading6", "subheading6"],
37
+ group: "Subheadings",
38
+ },
39
+ toggle_heading: {
40
+ title: "Toggle Heading 1",
41
+ subtext: "Toggleable top-level heading",
42
+ aliases: ["h", "heading1", "h1", "collapsable"],
43
+ group: "Subheadings",
44
+ },
45
+ toggle_heading_2: {
46
+ title: "Toggle Heading 2",
47
+ subtext: "Toggleable key section heading",
48
+ aliases: ["h2", "heading2", "subheading", "collapsable"],
49
+ group: "Subheadings",
50
+ },
51
+ toggle_heading_3: {
52
+ title: "Toggle Heading 3",
53
+ subtext: "Toggleable subsection and group heading",
54
+ aliases: ["h3", "heading3", "subheading", "collapsable"],
55
+ group: "Subheadings",
56
+ },
21
57
  quote: {
22
58
  title: "Quote",
23
59
  subtext: "Quote or excerpt",
24
60
  aliases: ["quotation", "blockquote", "bq"],
25
61
  group: "Basic blocks",
26
62
  },
63
+ toggle_list: {
64
+ title: "Toggle List",
65
+ subtext: "List with hideable sub-items",
66
+ aliases: ["li", "list", "toggleList", "toggle list", "collapsable list"],
67
+ group: "Basic blocks",
68
+ },
27
69
  numbered_list: {
28
70
  title: "Numbered List",
29
71
  subtext: "List with ordered items",
@@ -132,6 +174,7 @@ export const en = {
132
174
  placeholders: {
133
175
  default: "Enter text or type '/' for commands",
134
176
  heading: "Heading",
177
+ toggleListItem: "Toggle",
135
178
  bulletListItem: "List",
136
179
  numberedListItem: "List",
137
180
  checkListItem: "List",
@@ -335,6 +378,9 @@ export const en = {
335
378
  },
336
379
  },
337
380
  comments: {
381
+ edited: "edited",
382
+ save_button_text: "Save",
383
+ cancel_button_text: "Cancel",
338
384
  actions: {
339
385
  add_reaction: "Add reaction",
340
386
  resolve: "Resolve",
@@ -20,6 +20,42 @@ export const es: Dictionary = {
20
20
  aliases: ["h3", "encabezado3", "subencabezado"],
21
21
  group: "Encabezados",
22
22
  },
23
+ heading_4: {
24
+ title: "Encabezado 4",
25
+ subtext: "Encabezado de subsección menor",
26
+ aliases: ["h4", "encabezado4", "subencabezado4"],
27
+ group: "Subencabezados",
28
+ },
29
+ heading_5: {
30
+ title: "Encabezado 5",
31
+ subtext: "Encabezado de subsección pequeña",
32
+ aliases: ["h5", "encabezado5", "subencabezado5"],
33
+ group: "Subencabezados",
34
+ },
35
+ heading_6: {
36
+ title: "Encabezado 6",
37
+ subtext: "Encabezado de nivel más bajo",
38
+ aliases: ["h6", "encabezado6", "subencabezado6"],
39
+ group: "Subencabezados",
40
+ },
41
+ toggle_heading: {
42
+ title: "Encabezado Plegable 1",
43
+ subtext: "Encabezado de primer nivel que se puede plegar",
44
+ aliases: ["h", "encabezado1", "h1", "plegable", "contraible"],
45
+ group: "Subencabezados",
46
+ },
47
+ toggle_heading_2: {
48
+ title: "Encabezado Plegable 2",
49
+ subtext: "Encabezado de sección principal que se puede plegar",
50
+ aliases: ["h2", "encabezado2", "subencabezado", "plegable", "contraible"],
51
+ group: "Subencabezados",
52
+ },
53
+ toggle_heading_3: {
54
+ title: "Encabezado Plegable 3",
55
+ subtext: "Encabezado de subsección y grupo que se puede plegar",
56
+ aliases: ["h3", "encabezado3", "subencabezado", "plegable", "contraible"],
57
+ group: "Subencabezados",
58
+ },
23
59
  quote: {
24
60
  title: "Cita",
25
61
  subtext: "Cita o extracto",
@@ -51,6 +87,12 @@ export const es: Dictionary = {
51
87
  ],
52
88
  group: "Bloques básicos",
53
89
  },
90
+ toggle_list: {
91
+ title: "Lista Plegable",
92
+ subtext: "Lista con subelementos ocultables",
93
+ aliases: ["li", "lista", "lista plegable", "lista colapsable"],
94
+ group: "Bloques básicos",
95
+ },
54
96
  paragraph: {
55
97
  title: "Párrafo",
56
98
  subtext: "El cuerpo de tu documento",
@@ -133,6 +175,7 @@ export const es: Dictionary = {
133
175
  placeholders: {
134
176
  default: "Escribe o teclea '/' para comandos",
135
177
  heading: "Encabezado",
178
+ toggleListItem: "Plegable",
136
179
  bulletListItem: "Lista",
137
180
  numberedListItem: "Lista",
138
181
  checkListItem: "Lista",
@@ -333,6 +376,9 @@ export const es: Dictionary = {
333
376
  },
334
377
  },
335
378
  comments: {
379
+ edited: "editado",
380
+ save_button_text: "Guardar",
381
+ cancel_button_text: "Cancelar",
336
382
  actions: {
337
383
  add_reaction: "Agregar reacción",
338
384
  resolve: "Resolver",
@@ -21,6 +21,58 @@ export const fr: Dictionary = {
21
21
  aliases: ["h3", "titre3", "sous-titre"],
22
22
  group: "Titres",
23
23
  },
24
+ heading_4: {
25
+ title: "Titre 4",
26
+ subtext: "Titre de sous‑section mineure",
27
+ aliases: ["h4", "titre4", "sous‑titre4"],
28
+ group: "Sous-titres",
29
+ },
30
+ heading_5: {
31
+ title: "Titre 5",
32
+ subtext: "Titre de sous-section mineure",
33
+ aliases: ["h5", "titre5", "sous-titre5"],
34
+ group: "Sous-titres",
35
+ },
36
+ heading_6: {
37
+ title: "Titre 6",
38
+ subtext: "Titre de niveau le plus bas",
39
+ aliases: ["h6", "titre6", "sous-titre6"],
40
+ group: "Sous-titres",
41
+ },
42
+ toggle_heading: {
43
+ title: "Titre Repliable 1",
44
+ subtext:
45
+ "Titre de premier niveau qui peut être replié pour masquer son contenu",
46
+ aliases: ["h", "titre1", "h1", "repliable", "masquable", "déroulant"],
47
+ group: "Sous-titres",
48
+ },
49
+ toggle_heading_2: {
50
+ title: "Titre Repliable 2",
51
+ subtext: "Titre de section qui peut être replié pour masquer son contenu",
52
+ aliases: [
53
+ "h2",
54
+ "titre2",
55
+ "sous-titre",
56
+ "repliable",
57
+ "masquable",
58
+ "déroulant",
59
+ ],
60
+ group: "Sous-titres",
61
+ },
62
+ toggle_heading_3: {
63
+ title: "Titre Repliable 3",
64
+ subtext:
65
+ "Titre de sous-section qui peut être replié pour masquer son contenu",
66
+ aliases: [
67
+ "h3",
68
+ "titre3",
69
+ "sous-titre",
70
+ "repliable",
71
+ "masquable",
72
+ "déroulant",
73
+ ],
74
+ group: "Sous-titres",
75
+ },
24
76
  quote: {
25
77
  title: "Citation",
26
78
  subtext: "Citation ou extrait",
@@ -65,6 +117,18 @@ export const fr: Dictionary = {
65
117
  ],
66
118
  group: "Blocs de base",
67
119
  },
120
+ toggle_list: {
121
+ title: "Liste repliable",
122
+ subtext: "Liste avec des sous-éléments masquables",
123
+ aliases: [
124
+ "li",
125
+ "liste",
126
+ "liste pliable",
127
+ "liste escamotable",
128
+ "liste repliable",
129
+ ],
130
+ group: "Blocs de base",
131
+ },
68
132
  paragraph: {
69
133
  title: "Paragraphe",
70
134
  subtext: "Utilisé pour le corps de votre document",
@@ -157,6 +221,7 @@ export const fr: Dictionary = {
157
221
  default:
158
222
  "Entrez du texte ou tapez '/' pour faire apparaître les options de mise en page",
159
223
  heading: "Titre",
224
+ toggleListItem: "Basculer",
160
225
  bulletListItem: "Liste",
161
226
  numberedListItem: "Liste",
162
227
  checkListItem: "Liste",
@@ -359,6 +424,9 @@ export const fr: Dictionary = {
359
424
  },
360
425
  },
361
426
  comments: {
427
+ edited: "modifié",
428
+ save_button_text: "Enregistrer",
429
+ cancel_button_text: "Annuler",
362
430
  actions: {
363
431
  add_reaction: "Ajouter une réaction",
364
432
  resolve: "Résoudre",