@blocknote/core 0.46.1 → 0.47.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 (56) hide show
  1. package/dist/{BlockNoteSchema-DsMVJZv4.js → BlockNoteSchema-1r-ln0Q0.js} +2 -2
  2. package/dist/{BlockNoteSchema-DsMVJZv4.js.map → BlockNoteSchema-1r-ln0Q0.js.map} +1 -1
  3. package/dist/{BlockNoteSchema-qt4Czo0-.cjs → BlockNoteSchema-DT4bdXj5.cjs} +2 -2
  4. package/dist/{BlockNoteSchema-qt4Czo0-.cjs.map → BlockNoteSchema-DT4bdXj5.cjs.map} +1 -1
  5. package/dist/{TrailingNode-C-Kyrtf1.js → TrailingNode-DZag-Nvu.js} +476 -464
  6. package/dist/TrailingNode-DZag-Nvu.js.map +1 -0
  7. package/dist/TrailingNode-tesI8f7N.cjs +2 -0
  8. package/dist/TrailingNode-tesI8f7N.cjs.map +1 -0
  9. package/dist/blocknote.cjs +4 -4
  10. package/dist/blocknote.cjs.map +1 -1
  11. package/dist/blocknote.js +1264 -1165
  12. package/dist/blocknote.js.map +1 -1
  13. package/dist/blocks.cjs +1 -1
  14. package/dist/blocks.js +2 -2
  15. package/dist/{defaultBlocks-CXOCngjC.js → defaultBlocks-BSOEW3GR.js} +33 -29
  16. package/dist/defaultBlocks-BSOEW3GR.js.map +1 -0
  17. package/dist/defaultBlocks-D049Pbme.cjs +6 -0
  18. package/dist/defaultBlocks-D049Pbme.cjs.map +1 -0
  19. package/dist/extensions.cjs +1 -1
  20. package/dist/extensions.js +3 -3
  21. package/dist/locales.cjs +1 -1
  22. package/dist/locales.cjs.map +1 -1
  23. package/dist/locales.js +813 -28
  24. package/dist/locales.js.map +1 -1
  25. package/dist/style.css +1 -1
  26. package/dist/tsconfig.tsbuildinfo +1 -1
  27. package/dist/webpack-stats.json +1 -1
  28. package/package.json +1 -1
  29. package/src/api/exporters/html/internalHTMLSerializer.ts +146 -2
  30. package/src/api/exporters/html/util/serializeBlocksExternalHTML.ts +3 -0
  31. package/src/blocks/Code/block.ts +12 -8
  32. package/src/blocks/ListItem/CheckListItem/block.test.ts +61 -0
  33. package/src/blocks/ListItem/CheckListItem/block.ts +4 -0
  34. package/src/editor/Block.css +7 -3
  35. package/src/editor/editor.css +1 -0
  36. package/src/editor/transformPasted.ts +69 -0
  37. package/src/extensions/NodeSelectionKeyboard/NodeSelectionKeyboard.ts +1 -0
  38. package/src/extensions/SideMenu/SideMenu.ts +44 -0
  39. package/src/extensions/TableHandles/TableHandles.ts +6 -2
  40. package/src/extensions/tiptap-extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts +37 -11
  41. package/src/i18n/locales/fa.ts +390 -0
  42. package/src/i18n/locales/index.ts +2 -0
  43. package/src/i18n/locales/uz.ts +421 -0
  44. package/src/schema/blocks/createSpec.ts +4 -2
  45. package/src/schema/blocks/types.ts +9 -0
  46. package/types/src/blocks/ListItem/CheckListItem/block.test.d.ts +1 -0
  47. package/types/src/i18n/locales/fa.d.ts +320 -0
  48. package/types/src/i18n/locales/index.d.ts +2 -0
  49. package/types/src/i18n/locales/uz.d.ts +2 -0
  50. package/types/src/schema/blocks/types.d.ts +9 -3
  51. package/dist/TrailingNode-C-Kyrtf1.js.map +0 -1
  52. package/dist/TrailingNode-W7GJVng5.cjs +0 -2
  53. package/dist/TrailingNode-W7GJVng5.cjs.map +0 -1
  54. package/dist/defaultBlocks-CXOCngjC.js.map +0 -1
  55. package/dist/defaultBlocks-IsUGVZIq.cjs +0 -6
  56. package/dist/defaultBlocks-IsUGVZIq.cjs.map +0 -1
@@ -0,0 +1,320 @@
1
+ export declare const fa: {
2
+ slash_menu: {
3
+ heading: {
4
+ title: string;
5
+ subtext: string;
6
+ aliases: string[];
7
+ group: string;
8
+ };
9
+ heading_2: {
10
+ title: string;
11
+ subtext: string;
12
+ aliases: string[];
13
+ group: string;
14
+ };
15
+ heading_3: {
16
+ title: string;
17
+ subtext: string;
18
+ aliases: string[];
19
+ group: string;
20
+ };
21
+ heading_4: {
22
+ title: string;
23
+ subtext: string;
24
+ aliases: string[];
25
+ group: string;
26
+ };
27
+ heading_5: {
28
+ title: string;
29
+ subtext: string;
30
+ aliases: string[];
31
+ group: string;
32
+ };
33
+ heading_6: {
34
+ title: string;
35
+ subtext: string;
36
+ aliases: string[];
37
+ group: string;
38
+ };
39
+ toggle_heading: {
40
+ title: string;
41
+ subtext: string;
42
+ aliases: string[];
43
+ group: string;
44
+ };
45
+ toggle_heading_2: {
46
+ title: string;
47
+ subtext: string;
48
+ aliases: string[];
49
+ group: string;
50
+ };
51
+ toggle_heading_3: {
52
+ title: string;
53
+ subtext: string;
54
+ aliases: string[];
55
+ group: string;
56
+ };
57
+ quote: {
58
+ title: string;
59
+ subtext: string;
60
+ aliases: string[];
61
+ group: string;
62
+ };
63
+ toggle_list: {
64
+ title: string;
65
+ subtext: string;
66
+ aliases: string[];
67
+ group: string;
68
+ };
69
+ numbered_list: {
70
+ title: string;
71
+ subtext: string;
72
+ aliases: string[];
73
+ group: string;
74
+ };
75
+ bullet_list: {
76
+ title: string;
77
+ subtext: string;
78
+ aliases: string[];
79
+ group: string;
80
+ };
81
+ check_list: {
82
+ title: string;
83
+ subtext: string;
84
+ aliases: string[];
85
+ group: string;
86
+ };
87
+ paragraph: {
88
+ title: string;
89
+ subtext: string;
90
+ aliases: string[];
91
+ group: string;
92
+ };
93
+ code_block: {
94
+ title: string;
95
+ subtext: string;
96
+ aliases: string[];
97
+ group: string;
98
+ };
99
+ page_break: {
100
+ title: string;
101
+ subtext: string;
102
+ aliases: string[];
103
+ group: string;
104
+ };
105
+ table: {
106
+ title: string;
107
+ subtext: string;
108
+ aliases: string[];
109
+ group: string;
110
+ };
111
+ image: {
112
+ title: string;
113
+ subtext: string;
114
+ aliases: string[];
115
+ group: string;
116
+ };
117
+ video: {
118
+ title: string;
119
+ subtext: string;
120
+ aliases: string[];
121
+ group: string;
122
+ };
123
+ audio: {
124
+ title: string;
125
+ subtext: string;
126
+ aliases: string[];
127
+ group: string;
128
+ };
129
+ file: {
130
+ title: string;
131
+ subtext: string;
132
+ aliases: string[];
133
+ group: string;
134
+ };
135
+ emoji: {
136
+ title: string;
137
+ subtext: string;
138
+ aliases: string[];
139
+ group: string;
140
+ };
141
+ divider: {
142
+ title: string;
143
+ subtext: string;
144
+ aliases: string[];
145
+ group: string;
146
+ };
147
+ };
148
+ placeholders: Record<string | "default" | "emptyDocument", string | undefined>;
149
+ file_blocks: {
150
+ add_button_text: Record<string, string>;
151
+ };
152
+ toggle_blocks: {
153
+ add_block_button: string;
154
+ };
155
+ side_menu: {
156
+ add_block_label: string;
157
+ drag_handle_label: string;
158
+ };
159
+ drag_handle: {
160
+ delete_menuitem: string;
161
+ colors_menuitem: string;
162
+ header_row_menuitem: string;
163
+ header_column_menuitem: string;
164
+ };
165
+ table_handle: {
166
+ delete_column_menuitem: string;
167
+ delete_row_menuitem: string;
168
+ add_left_menuitem: string;
169
+ add_right_menuitem: string;
170
+ add_above_menuitem: string;
171
+ add_below_menuitem: string;
172
+ split_cell_menuitem: string;
173
+ merge_cells_menuitem: string;
174
+ background_color_menuitem: string;
175
+ };
176
+ suggestion_menu: {
177
+ no_items_title: string;
178
+ };
179
+ color_picker: {
180
+ text_title: string;
181
+ background_title: string;
182
+ colors: {
183
+ default: string;
184
+ gray: string;
185
+ brown: string;
186
+ red: string;
187
+ orange: string;
188
+ yellow: string;
189
+ green: string;
190
+ blue: string;
191
+ purple: string;
192
+ pink: string;
193
+ };
194
+ };
195
+ formatting_toolbar: {
196
+ bold: {
197
+ tooltip: string;
198
+ secondary_tooltip: string;
199
+ };
200
+ italic: {
201
+ tooltip: string;
202
+ secondary_tooltip: string;
203
+ };
204
+ underline: {
205
+ tooltip: string;
206
+ secondary_tooltip: string;
207
+ };
208
+ strike: {
209
+ tooltip: string;
210
+ secondary_tooltip: string;
211
+ };
212
+ code: {
213
+ tooltip: string;
214
+ secondary_tooltip: string;
215
+ };
216
+ colors: {
217
+ tooltip: string;
218
+ };
219
+ link: {
220
+ tooltip: string;
221
+ secondary_tooltip: string;
222
+ };
223
+ file_caption: {
224
+ tooltip: string;
225
+ input_placeholder: string;
226
+ };
227
+ file_replace: {
228
+ tooltip: Record<string, string>;
229
+ };
230
+ file_rename: {
231
+ tooltip: Record<string, string>;
232
+ input_placeholder: Record<string, string>;
233
+ };
234
+ file_download: {
235
+ tooltip: Record<string, string>;
236
+ };
237
+ file_delete: {
238
+ tooltip: Record<string, string>;
239
+ };
240
+ file_preview_toggle: {
241
+ tooltip: string;
242
+ };
243
+ nest: {
244
+ tooltip: string;
245
+ secondary_tooltip: string;
246
+ };
247
+ unnest: {
248
+ tooltip: string;
249
+ secondary_tooltip: string;
250
+ };
251
+ align_left: {
252
+ tooltip: string;
253
+ };
254
+ align_center: {
255
+ tooltip: string;
256
+ };
257
+ align_right: {
258
+ tooltip: string;
259
+ };
260
+ align_justify: {
261
+ tooltip: string;
262
+ };
263
+ table_cell_merge: {
264
+ tooltip: string;
265
+ };
266
+ comment: {
267
+ tooltip: string;
268
+ };
269
+ };
270
+ file_panel: {
271
+ upload: {
272
+ title: string;
273
+ file_placeholder: Record<string, string>;
274
+ upload_error: string;
275
+ };
276
+ embed: {
277
+ title: string;
278
+ embed_button: Record<string, string>;
279
+ url_placeholder: string;
280
+ };
281
+ };
282
+ link_toolbar: {
283
+ delete: {
284
+ tooltip: string;
285
+ };
286
+ edit: {
287
+ text: string;
288
+ tooltip: string;
289
+ };
290
+ open: {
291
+ tooltip: string;
292
+ };
293
+ form: {
294
+ title_placeholder: string;
295
+ url_placeholder: string;
296
+ };
297
+ };
298
+ comments: {
299
+ edited: string;
300
+ save_button_text: string;
301
+ cancel_button_text: string;
302
+ actions: {
303
+ add_reaction: string;
304
+ resolve: string;
305
+ edit_comment: string;
306
+ delete_comment: string;
307
+ more_actions: string;
308
+ };
309
+ reactions: {
310
+ reacted_by: string;
311
+ };
312
+ sidebar: {
313
+ marked_as_resolved: string;
314
+ more_replies: (count: number) => string;
315
+ };
316
+ };
317
+ generic: {
318
+ ctrl_shortcut: string;
319
+ };
320
+ };
@@ -2,6 +2,7 @@ export * from "./ar.js";
2
2
  export * from "./de.js";
3
3
  export * from "./en.js";
4
4
  export * from "./es.js";
5
+ export * from "./fa.js";
5
6
  export * from "./fr.js";
6
7
  export * from "./he.js";
7
8
  export * from "./hr.js";
@@ -19,3 +20,4 @@ export * from "./uk.js";
19
20
  export * from "./vi.js";
20
21
  export * from "./zh.js";
21
22
  export * from "./zh-tw.js";
23
+ export * from "./uz.js";
@@ -0,0 +1,2 @@
1
+ import { Dictionary } from "../dictionary.js";
2
+ export declare const uz: Dictionary;
@@ -86,7 +86,9 @@ export type LooseBlockSpec<T extends string = string, PS extends PropSchema = Pr
86
86
  ignoreMutation?: (mutation: ViewMutationRecord) => boolean;
87
87
  destroy?: () => void;
88
88
  };
89
- toExternalHTML?: (block: any, editor: BlockNoteEditor<any>) => {
89
+ toExternalHTML?: (block: any, editor: BlockNoteEditor<any>, context: {
90
+ nestingLevel: number;
91
+ }) => {
90
92
  dom: HTMLElement | DocumentFragment;
91
93
  contentDOM?: HTMLElement;
92
94
  } | undefined;
@@ -118,7 +120,9 @@ export type BlockSpecs = {
118
120
  ignoreMutation?: (mutation: ViewMutationRecord) => boolean;
119
121
  destroy?: () => void;
120
122
  };
121
- toExternalHTML?: (block: any, editor: BlockNoteEditor<any>) => {
123
+ toExternalHTML?: (block: any, editor: BlockNoteEditor<any>, context: {
124
+ nestingLevel: number;
125
+ }) => {
122
126
  dom: HTMLElement | DocumentFragment;
123
127
  contentDOM?: HTMLElement;
124
128
  } | undefined;
@@ -256,7 +260,9 @@ export type BlockImplementation<TName extends string = string, TProps extends Pr
256
260
  */
257
261
  toExternalHTML?: (this: Partial<{
258
262
  blockContentDOMAttributes: Record<string, string>;
259
- }>, block: BlockFromConfig<BlockConfig<TName, TProps, TContent>, any, any>, editor: BlockNoteEditor<Record<TName, BlockConfig<TName, TProps, TContent>>>) => {
263
+ }>, block: BlockFromConfig<BlockConfig<TName, TProps, TContent>, any, any>, editor: BlockNoteEditor<Record<TName, BlockConfig<TName, TProps, TContent>>>, context: {
264
+ nestingLevel: number;
265
+ }) => {
260
266
  dom: HTMLElement | DocumentFragment;
261
267
  contentDOM?: HTMLElement;
262
268
  } | undefined;