@blocknote/core 0.47.3 → 0.48.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 (121) hide show
  1. package/dist/BlockNoteExtension-B6RhuQ3V.js +27 -0
  2. package/dist/BlockNoteExtension-B6RhuQ3V.js.map +1 -0
  3. package/dist/BlockNoteExtension-ab0REuob.cjs +2 -0
  4. package/dist/BlockNoteExtension-ab0REuob.cjs.map +1 -0
  5. package/dist/EventEmitter-CuPnGDYt.js +22 -0
  6. package/dist/EventEmitter-CuPnGDYt.js.map +1 -0
  7. package/dist/EventEmitter-DHdSnYCD.cjs +2 -0
  8. package/dist/EventEmitter-DHdSnYCD.cjs.map +1 -0
  9. package/dist/ShowSelection-BsHFfdMi.js +29 -0
  10. package/dist/ShowSelection-BsHFfdMi.js.map +1 -0
  11. package/dist/ShowSelection-DhXglbt8.cjs +2 -0
  12. package/dist/ShowSelection-DhXglbt8.cjs.map +1 -0
  13. package/dist/blocknote.cjs +1 -5
  14. package/dist/blocknote.js +7 -4256
  15. package/dist/blocks-BEvIOzln.cjs +11 -0
  16. package/dist/blocks-BEvIOzln.cjs.map +1 -0
  17. package/dist/blocks-DYl7UTS4.js +3313 -0
  18. package/dist/blocks-DYl7UTS4.js.map +1 -0
  19. package/dist/blocks.cjs +1 -2
  20. package/dist/blocks.js +2 -74
  21. package/dist/comments.cjs +2 -2
  22. package/dist/comments.cjs.map +1 -1
  23. package/dist/comments.js +604 -900
  24. package/dist/comments.js.map +1 -1
  25. package/dist/en-C4ykW581.cjs +2 -0
  26. package/dist/en-C4ykW581.cjs.map +1 -0
  27. package/dist/en-QsSI16s5.js +453 -0
  28. package/dist/en-QsSI16s5.js.map +1 -0
  29. package/dist/extensions-3nf9PPhA.js +1495 -0
  30. package/dist/extensions-3nf9PPhA.js.map +1 -0
  31. package/dist/extensions-D9y6evn6.cjs +2 -0
  32. package/dist/extensions-D9y6evn6.cjs.map +1 -0
  33. package/dist/extensions.cjs +1 -2
  34. package/dist/extensions.js +4 -36
  35. package/dist/locales.cjs +2 -2
  36. package/dist/locales.cjs.map +1 -1
  37. package/dist/locales.js +10049 -9111
  38. package/dist/locales.js.map +1 -1
  39. package/dist/src-BKJH7Jla.cjs +5 -0
  40. package/dist/src-BKJH7Jla.cjs.map +1 -0
  41. package/dist/src-Hjv1f5lc.js +2386 -0
  42. package/dist/src-Hjv1f5lc.js.map +1 -0
  43. package/dist/style.css +2 -1
  44. package/dist/webpack-stats.json +1 -1
  45. package/dist/yjs.cjs +2 -2
  46. package/dist/yjs.cjs.map +1 -1
  47. package/dist/yjs.js +20 -38
  48. package/dist/yjs.js.map +1 -1
  49. package/package.json +8 -8
  50. package/src/api/blockManipulation/commands/mergeBlocks/mergeBlocks.test.ts +15 -1
  51. package/src/api/blockManipulation/commands/mergeBlocks/mergeBlocks.ts +5 -0
  52. package/src/api/blockManipulation/commands/nestBlock/__snapshots__/nestBlock.test.ts.snap +1095 -0
  53. package/src/api/blockManipulation/commands/nestBlock/nestBlock.test.ts +661 -0
  54. package/src/api/blockManipulation/commands/nestBlock/nestBlock.ts +128 -11
  55. package/src/blocks/File/helpers/render/createResizableFileBlockWrapper.ts +17 -23
  56. package/src/blocks/ListItem/NumberedListItem/IndexingPlugin.test.ts +346 -0
  57. package/src/blocks/ListItem/NumberedListItem/IndexingPlugin.ts +143 -71
  58. package/src/editor/Block.css +5 -8
  59. package/src/editor/BlockNoteEditor.ts +38 -1
  60. package/src/editor/editor.css +0 -20
  61. package/src/editor/managers/ExtensionManager/extensions.ts +12 -1
  62. package/src/editor/performance.test.ts +134 -0
  63. package/src/extensions/Collaboration/ForkYDoc.test.ts +115 -103
  64. package/src/extensions/Placeholder/Placeholder.ts +1 -1
  65. package/src/extensions/PreviousBlockType/PreviousBlockType.test.ts +86 -0
  66. package/src/extensions/PreviousBlockType/PreviousBlockType.ts +33 -49
  67. package/src/extensions/SideMenu/SideMenu.ts +14 -8
  68. package/src/extensions/TableHandles/TableHandles.ts +14 -0
  69. package/src/extensions/tiptap-extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts +57 -17
  70. package/src/extensions/tiptap-extensions/UniqueID/UniqueID.ts +9 -8
  71. package/src/index.ts +1 -1
  72. package/src/schema/blocks/createSpec.ts +6 -2
  73. package/src/schema/inlineContent/types.ts +0 -1
  74. package/src/vite-env.d.ts +6 -0
  75. package/types/src/api/blockManipulation/commands/nestBlock/nestBlock.d.ts +14 -1
  76. package/types/src/api/blockManipulation/commands/nestBlock/nestBlock.test.d.ts +1 -0
  77. package/types/src/blocks/ListItem/NumberedListItem/IndexingPlugin.test.d.ts +1 -0
  78. package/types/src/editor/BlockNoteEditor.d.ts +13 -0
  79. package/types/src/editor/performance.test.d.ts +1 -0
  80. package/types/src/extensions/PreviousBlockType/PreviousBlockType.test.d.ts +1 -0
  81. package/types/src/extensions/SideMenu/SideMenu.d.ts +6 -0
  82. package/types/src/extensions/TableHandles/TableHandles.d.ts +6 -0
  83. package/dist/BlockNoteExtension-BWw0r8Gy.cjs +0 -2
  84. package/dist/BlockNoteExtension-BWw0r8Gy.cjs.map +0 -1
  85. package/dist/BlockNoteExtension-C2X7LW-V.js +0 -25
  86. package/dist/BlockNoteExtension-C2X7LW-V.js.map +0 -1
  87. package/dist/BlockNoteSchema-CCs_V3lo.cjs +0 -2
  88. package/dist/BlockNoteSchema-CCs_V3lo.cjs.map +0 -1
  89. package/dist/BlockNoteSchema-ooiKsd5B.js +0 -270
  90. package/dist/BlockNoteSchema-ooiKsd5B.js.map +0 -1
  91. package/dist/EventEmitter-CLwfmbqG.cjs +0 -2
  92. package/dist/EventEmitter-CLwfmbqG.cjs.map +0 -1
  93. package/dist/EventEmitter-CjSwpTbz.js +0 -27
  94. package/dist/EventEmitter-CjSwpTbz.js.map +0 -1
  95. package/dist/ShowSelection-B0ch3unP.js +0 -51
  96. package/dist/ShowSelection-B0ch3unP.js.map +0 -1
  97. package/dist/ShowSelection-BxnbRvy4.cjs +0 -2
  98. package/dist/ShowSelection-BxnbRvy4.cjs.map +0 -1
  99. package/dist/TrailingNode-GzE59m_7.js +0 -2288
  100. package/dist/TrailingNode-GzE59m_7.js.map +0 -1
  101. package/dist/TrailingNode-n0WdMPUl.cjs +0 -2
  102. package/dist/TrailingNode-n0WdMPUl.cjs.map +0 -1
  103. package/dist/blockToNode-BNoNIXU7.js +0 -1140
  104. package/dist/blockToNode-BNoNIXU7.js.map +0 -1
  105. package/dist/blockToNode-CumVjgem.cjs +0 -7
  106. package/dist/blockToNode-CumVjgem.cjs.map +0 -1
  107. package/dist/blocknote.cjs.map +0 -1
  108. package/dist/blocknote.js.map +0 -1
  109. package/dist/blocks.cjs.map +0 -1
  110. package/dist/blocks.js.map +0 -1
  111. package/dist/defaultBlocks-Dg9kQWXm.cjs +0 -6
  112. package/dist/defaultBlocks-Dg9kQWXm.cjs.map +0 -1
  113. package/dist/defaultBlocks-ZzGbYgQn.js +0 -3284
  114. package/dist/defaultBlocks-ZzGbYgQn.js.map +0 -1
  115. package/dist/en-Cl87Uuyf.cjs +0 -2
  116. package/dist/en-Cl87Uuyf.cjs.map +0 -1
  117. package/dist/en-njEqD7AG.js +0 -408
  118. package/dist/en-njEqD7AG.js.map +0 -1
  119. package/dist/extensions.cjs.map +0 -1
  120. package/dist/extensions.js.map +0 -1
  121. package/dist/tsconfig.tsbuildinfo +0 -1
@@ -0,0 +1,1095 @@
1
+ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
+
3
+ exports[`unnestBlock / liftListItem > BLO-835: unnest block with siblings after and nested children > should handle unnesting the first of many siblings 1`] = `
4
+ [
5
+ {
6
+ "children": [],
7
+ "content": [
8
+ {
9
+ "styles": {},
10
+ "text": "Block 1",
11
+ "type": "text",
12
+ },
13
+ ],
14
+ "id": "block1",
15
+ "props": {
16
+ "backgroundColor": "default",
17
+ "textAlignment": "left",
18
+ "textColor": "default",
19
+ },
20
+ "type": "paragraph",
21
+ },
22
+ {
23
+ "children": [
24
+ {
25
+ "children": [],
26
+ "content": [
27
+ {
28
+ "styles": {},
29
+ "text": "Block 3",
30
+ "type": "text",
31
+ },
32
+ ],
33
+ "id": "block3",
34
+ "props": {
35
+ "backgroundColor": "default",
36
+ "textAlignment": "left",
37
+ "textColor": "default",
38
+ },
39
+ "type": "paragraph",
40
+ },
41
+ {
42
+ "children": [],
43
+ "content": [
44
+ {
45
+ "styles": {},
46
+ "text": "Block 4",
47
+ "type": "text",
48
+ },
49
+ ],
50
+ "id": "block4",
51
+ "props": {
52
+ "backgroundColor": "default",
53
+ "textAlignment": "left",
54
+ "textColor": "default",
55
+ },
56
+ "type": "paragraph",
57
+ },
58
+ ],
59
+ "content": [
60
+ {
61
+ "styles": {},
62
+ "text": "Block 2",
63
+ "type": "text",
64
+ },
65
+ ],
66
+ "id": "block2",
67
+ "props": {
68
+ "backgroundColor": "default",
69
+ "textAlignment": "left",
70
+ "textColor": "default",
71
+ },
72
+ "type": "paragraph",
73
+ },
74
+ {
75
+ "children": [],
76
+ "content": [],
77
+ "id": "0",
78
+ "props": {
79
+ "backgroundColor": "default",
80
+ "textAlignment": "left",
81
+ "textColor": "default",
82
+ },
83
+ "type": "paragraph",
84
+ },
85
+ ]
86
+ `;
87
+
88
+ exports[`unnestBlock / liftListItem > BLO-835: unnest block with siblings after and nested children > should move siblings after into lifted block's children 1`] = `
89
+ [
90
+ {
91
+ "children": [],
92
+ "content": [
93
+ {
94
+ "styles": {},
95
+ "text": "Block 1",
96
+ "type": "text",
97
+ },
98
+ ],
99
+ "id": "block1",
100
+ "props": {
101
+ "backgroundColor": "default",
102
+ "textAlignment": "left",
103
+ "textColor": "default",
104
+ },
105
+ "type": "paragraph",
106
+ },
107
+ {
108
+ "children": [
109
+ {
110
+ "children": [],
111
+ "content": [
112
+ {
113
+ "styles": {},
114
+ "text": "Block 5",
115
+ "type": "text",
116
+ },
117
+ ],
118
+ "id": "block5",
119
+ "props": {
120
+ "backgroundColor": "default",
121
+ "textAlignment": "left",
122
+ "textColor": "default",
123
+ },
124
+ "type": "paragraph",
125
+ },
126
+ ],
127
+ "content": [
128
+ {
129
+ "styles": {},
130
+ "text": "Block 2",
131
+ "type": "text",
132
+ },
133
+ ],
134
+ "id": "block2",
135
+ "props": {
136
+ "backgroundColor": "default",
137
+ "textAlignment": "left",
138
+ "textColor": "default",
139
+ },
140
+ "type": "paragraph",
141
+ },
142
+ {
143
+ "children": [],
144
+ "content": [],
145
+ "id": "0",
146
+ "props": {
147
+ "backgroundColor": "default",
148
+ "textAlignment": "left",
149
+ "textColor": "default",
150
+ },
151
+ "type": "paragraph",
152
+ },
153
+ ]
154
+ `;
155
+
156
+ exports[`unnestBlock / liftListItem > BLO-835: unnest block with siblings after and nested children > should not throw when unnesting a block that has siblings after it 1`] = `
157
+ [
158
+ {
159
+ "children": [],
160
+ "content": [
161
+ {
162
+ "styles": {},
163
+ "text": "Block 1",
164
+ "type": "text",
165
+ },
166
+ ],
167
+ "id": "block1",
168
+ "props": {
169
+ "backgroundColor": "default",
170
+ "textAlignment": "left",
171
+ "textColor": "default",
172
+ },
173
+ "type": "paragraph",
174
+ },
175
+ {
176
+ "children": [
177
+ {
178
+ "children": [],
179
+ "content": [
180
+ {
181
+ "styles": {},
182
+ "text": "Block 3",
183
+ "type": "text",
184
+ },
185
+ ],
186
+ "id": "block3",
187
+ "props": {
188
+ "backgroundColor": "default",
189
+ "textAlignment": "left",
190
+ "textColor": "default",
191
+ },
192
+ "type": "paragraph",
193
+ },
194
+ {
195
+ "children": [],
196
+ "content": [
197
+ {
198
+ "styles": {},
199
+ "text": "Block 4",
200
+ "type": "text",
201
+ },
202
+ ],
203
+ "id": "block4",
204
+ "props": {
205
+ "backgroundColor": "default",
206
+ "textAlignment": "left",
207
+ "textColor": "default",
208
+ },
209
+ "type": "paragraph",
210
+ },
211
+ {
212
+ "children": [],
213
+ "content": [
214
+ {
215
+ "styles": {},
216
+ "text": "Block 5",
217
+ "type": "text",
218
+ },
219
+ ],
220
+ "id": "block5",
221
+ "props": {
222
+ "backgroundColor": "default",
223
+ "textAlignment": "left",
224
+ "textColor": "default",
225
+ },
226
+ "type": "paragraph",
227
+ },
228
+ ],
229
+ "content": [
230
+ {
231
+ "styles": {},
232
+ "text": "Block 2",
233
+ "type": "text",
234
+ },
235
+ ],
236
+ "id": "block2",
237
+ "props": {
238
+ "backgroundColor": "default",
239
+ "textAlignment": "left",
240
+ "textColor": "default",
241
+ },
242
+ "type": "paragraph",
243
+ },
244
+ {
245
+ "children": [],
246
+ "content": [],
247
+ "id": "0",
248
+ "props": {
249
+ "backgroundColor": "default",
250
+ "textAlignment": "left",
251
+ "textColor": "default",
252
+ },
253
+ "type": "paragraph",
254
+ },
255
+ ]
256
+ `;
257
+
258
+ exports[`unnestBlock / liftListItem > BLO-844/847: unnest with complex nesting after parent operations > should handle sequential unnest operations 1`] = `
259
+ [
260
+ {
261
+ "children": [],
262
+ "content": [
263
+ {
264
+ "styles": {},
265
+ "text": "Block 1",
266
+ "type": "text",
267
+ },
268
+ ],
269
+ "id": "block1",
270
+ "props": {
271
+ "backgroundColor": "default",
272
+ "textAlignment": "left",
273
+ "textColor": "default",
274
+ },
275
+ "type": "paragraph",
276
+ },
277
+ {
278
+ "children": [],
279
+ "content": [
280
+ {
281
+ "styles": {},
282
+ "text": "Block 2",
283
+ "type": "text",
284
+ },
285
+ ],
286
+ "id": "block2",
287
+ "props": {
288
+ "backgroundColor": "default",
289
+ "textAlignment": "left",
290
+ "textColor": "default",
291
+ },
292
+ "type": "paragraph",
293
+ },
294
+ {
295
+ "children": [
296
+ {
297
+ "children": [],
298
+ "content": [
299
+ {
300
+ "styles": {},
301
+ "text": "Block 4",
302
+ "type": "text",
303
+ },
304
+ ],
305
+ "id": "block4",
306
+ "props": {
307
+ "backgroundColor": "default",
308
+ "textAlignment": "left",
309
+ "textColor": "default",
310
+ },
311
+ "type": "paragraph",
312
+ },
313
+ ],
314
+ "content": [
315
+ {
316
+ "styles": {},
317
+ "text": "Block 3",
318
+ "type": "text",
319
+ },
320
+ ],
321
+ "id": "block3",
322
+ "props": {
323
+ "backgroundColor": "default",
324
+ "textAlignment": "left",
325
+ "textColor": "default",
326
+ },
327
+ "type": "paragraph",
328
+ },
329
+ {
330
+ "children": [],
331
+ "content": [],
332
+ "id": "0",
333
+ "props": {
334
+ "backgroundColor": "default",
335
+ "textAlignment": "left",
336
+ "textColor": "default",
337
+ },
338
+ "type": "paragraph",
339
+ },
340
+ ]
341
+ `;
342
+
343
+ exports[`unnestBlock / liftListItem > BLO-844/847: unnest with complex nesting after parent operations > should handle unnesting when block is only child 1`] = `
344
+ [
345
+ {
346
+ "children": [],
347
+ "content": [
348
+ {
349
+ "styles": {},
350
+ "text": "Parent",
351
+ "type": "text",
352
+ },
353
+ ],
354
+ "id": "parent",
355
+ "props": {
356
+ "backgroundColor": "default",
357
+ "textAlignment": "left",
358
+ "textColor": "default",
359
+ },
360
+ "type": "paragraph",
361
+ },
362
+ {
363
+ "children": [],
364
+ "content": [
365
+ {
366
+ "styles": {},
367
+ "text": "Child",
368
+ "type": "text",
369
+ },
370
+ ],
371
+ "id": "child",
372
+ "props": {
373
+ "backgroundColor": "default",
374
+ "textAlignment": "left",
375
+ "textColor": "default",
376
+ },
377
+ "type": "paragraph",
378
+ },
379
+ {
380
+ "children": [],
381
+ "content": [],
382
+ "id": "0",
383
+ "props": {
384
+ "backgroundColor": "default",
385
+ "textAlignment": "left",
386
+ "textColor": "default",
387
+ },
388
+ "type": "paragraph",
389
+ },
390
+ ]
391
+ `;
392
+
393
+ exports[`unnestBlock / liftListItem > BLO-899: Shift-Tab on second-level nested block > should not throw when unnesting a deeply nested block with siblings 1`] = `
394
+ [
395
+ {
396
+ "children": [
397
+ {
398
+ "children": [],
399
+ "content": [
400
+ {
401
+ "styles": {},
402
+ "text": "Child 1",
403
+ "type": "text",
404
+ },
405
+ ],
406
+ "id": "child1",
407
+ "props": {
408
+ "backgroundColor": "default",
409
+ "textAlignment": "left",
410
+ "textColor": "default",
411
+ },
412
+ "type": "paragraph",
413
+ },
414
+ {
415
+ "children": [
416
+ {
417
+ "children": [],
418
+ "content": [
419
+ {
420
+ "styles": {},
421
+ "text": "Grandchild 2",
422
+ "type": "text",
423
+ },
424
+ ],
425
+ "id": "grandchild2",
426
+ "props": {
427
+ "backgroundColor": "default",
428
+ "textAlignment": "left",
429
+ "textColor": "default",
430
+ },
431
+ "type": "paragraph",
432
+ },
433
+ ],
434
+ "content": [
435
+ {
436
+ "styles": {},
437
+ "text": "Grandchild 1",
438
+ "type": "text",
439
+ },
440
+ ],
441
+ "id": "grandchild1",
442
+ "props": {
443
+ "backgroundColor": "default",
444
+ "textAlignment": "left",
445
+ "textColor": "default",
446
+ },
447
+ "type": "paragraph",
448
+ },
449
+ {
450
+ "children": [
451
+ {
452
+ "children": [],
453
+ "content": [
454
+ {
455
+ "styles": {},
456
+ "text": "Grandchild 3",
457
+ "type": "text",
458
+ },
459
+ ],
460
+ "id": "grandchild3",
461
+ "props": {
462
+ "backgroundColor": "default",
463
+ "textAlignment": "left",
464
+ "textColor": "default",
465
+ },
466
+ "type": "paragraph",
467
+ },
468
+ {
469
+ "children": [],
470
+ "content": [
471
+ {
472
+ "styles": {},
473
+ "text": "Grandchild 4",
474
+ "type": "text",
475
+ },
476
+ ],
477
+ "id": "grandchild4",
478
+ "props": {
479
+ "backgroundColor": "default",
480
+ "textAlignment": "left",
481
+ "textColor": "default",
482
+ },
483
+ "type": "paragraph",
484
+ },
485
+ ],
486
+ "content": [
487
+ {
488
+ "styles": {},
489
+ "text": "Child 2",
490
+ "type": "text",
491
+ },
492
+ ],
493
+ "id": "child2",
494
+ "props": {
495
+ "backgroundColor": "default",
496
+ "textAlignment": "left",
497
+ "textColor": "default",
498
+ },
499
+ "type": "paragraph",
500
+ },
501
+ ],
502
+ "content": [
503
+ {
504
+ "styles": {},
505
+ "text": "Parent",
506
+ "type": "text",
507
+ },
508
+ ],
509
+ "id": "parent",
510
+ "props": {
511
+ "backgroundColor": "default",
512
+ "textAlignment": "left",
513
+ "textColor": "default",
514
+ },
515
+ "type": "paragraph",
516
+ },
517
+ {
518
+ "children": [],
519
+ "content": [],
520
+ "id": "0",
521
+ "props": {
522
+ "backgroundColor": "default",
523
+ "textAlignment": "left",
524
+ "textColor": "default",
525
+ },
526
+ "type": "paragraph",
527
+ },
528
+ ]
529
+ `;
530
+
531
+ exports[`unnestBlock / liftListItem > BLO-899: Shift-Tab on second-level nested block > should not throw when unnesting the last deeply nested block 1`] = `
532
+ [
533
+ {
534
+ "children": [
535
+ {
536
+ "children": [
537
+ {
538
+ "children": [],
539
+ "content": [
540
+ {
541
+ "styles": {},
542
+ "text": "Grandchild 1",
543
+ "type": "text",
544
+ },
545
+ ],
546
+ "id": "grandchild1",
547
+ "props": {
548
+ "backgroundColor": "default",
549
+ "textAlignment": "left",
550
+ "textColor": "default",
551
+ },
552
+ "type": "paragraph",
553
+ },
554
+ ],
555
+ "content": [
556
+ {
557
+ "styles": {},
558
+ "text": "Child 1",
559
+ "type": "text",
560
+ },
561
+ ],
562
+ "id": "child1",
563
+ "props": {
564
+ "backgroundColor": "default",
565
+ "textAlignment": "left",
566
+ "textColor": "default",
567
+ },
568
+ "type": "paragraph",
569
+ },
570
+ {
571
+ "children": [],
572
+ "content": [
573
+ {
574
+ "styles": {},
575
+ "text": "Grandchild 2",
576
+ "type": "text",
577
+ },
578
+ ],
579
+ "id": "grandchild2",
580
+ "props": {
581
+ "backgroundColor": "default",
582
+ "textAlignment": "left",
583
+ "textColor": "default",
584
+ },
585
+ "type": "paragraph",
586
+ },
587
+ ],
588
+ "content": [
589
+ {
590
+ "styles": {},
591
+ "text": "Parent",
592
+ "type": "text",
593
+ },
594
+ ],
595
+ "id": "parent",
596
+ "props": {
597
+ "backgroundColor": "default",
598
+ "textAlignment": "left",
599
+ "textColor": "default",
600
+ },
601
+ "type": "paragraph",
602
+ },
603
+ {
604
+ "children": [],
605
+ "content": [],
606
+ "id": "0",
607
+ "props": {
608
+ "backgroundColor": "default",
609
+ "textAlignment": "left",
610
+ "textColor": "default",
611
+ },
612
+ "type": "paragraph",
613
+ },
614
+ ]
615
+ `;
616
+
617
+ exports[`unnestBlock / liftListItem > BLO-953: unnest block with multi-level nested children > should preserve all deeply nested content when unnesting 1`] = `
618
+ [
619
+ {
620
+ "children": [],
621
+ "content": [
622
+ {
623
+ "styles": {},
624
+ "text": "Block 1",
625
+ "type": "text",
626
+ },
627
+ ],
628
+ "id": "block1",
629
+ "props": {
630
+ "backgroundColor": "default",
631
+ "textAlignment": "left",
632
+ "textColor": "default",
633
+ },
634
+ "type": "paragraph",
635
+ },
636
+ {
637
+ "children": [
638
+ {
639
+ "children": [
640
+ {
641
+ "children": [],
642
+ "content": [
643
+ {
644
+ "styles": {},
645
+ "text": "Block 4",
646
+ "type": "text",
647
+ },
648
+ ],
649
+ "id": "block4",
650
+ "props": {
651
+ "backgroundColor": "default",
652
+ "textAlignment": "left",
653
+ "textColor": "default",
654
+ },
655
+ "type": "paragraph",
656
+ },
657
+ ],
658
+ "content": [
659
+ {
660
+ "styles": {},
661
+ "text": "Block 3",
662
+ "type": "text",
663
+ },
664
+ ],
665
+ "id": "block3",
666
+ "props": {
667
+ "backgroundColor": "default",
668
+ "textAlignment": "left",
669
+ "textColor": "default",
670
+ },
671
+ "type": "paragraph",
672
+ },
673
+ {
674
+ "children": [],
675
+ "content": [
676
+ {
677
+ "styles": {},
678
+ "text": "Block 5",
679
+ "type": "text",
680
+ },
681
+ ],
682
+ "id": "block5",
683
+ "props": {
684
+ "backgroundColor": "default",
685
+ "textAlignment": "left",
686
+ "textColor": "default",
687
+ },
688
+ "type": "paragraph",
689
+ },
690
+ ],
691
+ "content": [
692
+ {
693
+ "styles": {},
694
+ "text": "Block A",
695
+ "type": "text",
696
+ },
697
+ ],
698
+ "id": "blockA",
699
+ "props": {
700
+ "backgroundColor": "default",
701
+ "textAlignment": "left",
702
+ "textColor": "default",
703
+ },
704
+ "type": "paragraph",
705
+ },
706
+ {
707
+ "children": [],
708
+ "content": [],
709
+ "id": "0",
710
+ "props": {
711
+ "backgroundColor": "default",
712
+ "textAlignment": "left",
713
+ "textColor": "default",
714
+ },
715
+ "type": "paragraph",
716
+ },
717
+ ]
718
+ `;
719
+
720
+ exports[`unnestBlock / liftListItem > BLO-953: unnest block with multi-level nested children > should preserve content when unnesting only child 1`] = `
721
+ [
722
+ {
723
+ "children": [],
724
+ "content": [
725
+ {
726
+ "styles": {},
727
+ "text": "Block 1",
728
+ "type": "text",
729
+ },
730
+ ],
731
+ "id": "block1",
732
+ "props": {
733
+ "backgroundColor": "default",
734
+ "textAlignment": "left",
735
+ "textColor": "default",
736
+ },
737
+ "type": "paragraph",
738
+ },
739
+ {
740
+ "children": [
741
+ {
742
+ "children": [
743
+ {
744
+ "children": [],
745
+ "content": [
746
+ {
747
+ "styles": {},
748
+ "text": "Block 4",
749
+ "type": "text",
750
+ },
751
+ ],
752
+ "id": "block4",
753
+ "props": {
754
+ "backgroundColor": "default",
755
+ "textAlignment": "left",
756
+ "textColor": "default",
757
+ },
758
+ "type": "paragraph",
759
+ },
760
+ ],
761
+ "content": [
762
+ {
763
+ "styles": {},
764
+ "text": "Block 3",
765
+ "type": "text",
766
+ },
767
+ ],
768
+ "id": "block3",
769
+ "props": {
770
+ "backgroundColor": "default",
771
+ "textAlignment": "left",
772
+ "textColor": "default",
773
+ },
774
+ "type": "paragraph",
775
+ },
776
+ ],
777
+ "content": [
778
+ {
779
+ "styles": {},
780
+ "text": "Block A",
781
+ "type": "text",
782
+ },
783
+ ],
784
+ "id": "blockA",
785
+ "props": {
786
+ "backgroundColor": "default",
787
+ "textAlignment": "left",
788
+ "textColor": "default",
789
+ },
790
+ "type": "paragraph",
791
+ },
792
+ {
793
+ "children": [],
794
+ "content": [],
795
+ "id": "0",
796
+ "props": {
797
+ "backgroundColor": "default",
798
+ "textAlignment": "left",
799
+ "textColor": "default",
800
+ },
801
+ "type": "paragraph",
802
+ },
803
+ ]
804
+ `;
805
+
806
+ exports[`unnestBlock / liftListItem > Edge cases > should handle unnesting block with both existing children and siblings after 1`] = `
807
+ [
808
+ {
809
+ "children": [],
810
+ "content": [
811
+ {
812
+ "styles": {},
813
+ "text": "Parent",
814
+ "type": "text",
815
+ },
816
+ ],
817
+ "id": "parent",
818
+ "props": {
819
+ "backgroundColor": "default",
820
+ "textAlignment": "left",
821
+ "textColor": "default",
822
+ },
823
+ "type": "paragraph",
824
+ },
825
+ {
826
+ "children": [
827
+ {
828
+ "children": [],
829
+ "content": [
830
+ {
831
+ "styles": {},
832
+ "text": "Existing Grandchild",
833
+ "type": "text",
834
+ },
835
+ ],
836
+ "id": "existing-grandchild",
837
+ "props": {
838
+ "backgroundColor": "default",
839
+ "textAlignment": "left",
840
+ "textColor": "default",
841
+ },
842
+ "type": "paragraph",
843
+ },
844
+ {
845
+ "children": [],
846
+ "content": [
847
+ {
848
+ "styles": {},
849
+ "text": "Child 2",
850
+ "type": "text",
851
+ },
852
+ ],
853
+ "id": "child2",
854
+ "props": {
855
+ "backgroundColor": "default",
856
+ "textAlignment": "left",
857
+ "textColor": "default",
858
+ },
859
+ "type": "paragraph",
860
+ },
861
+ {
862
+ "children": [],
863
+ "content": [
864
+ {
865
+ "styles": {},
866
+ "text": "Child 3",
867
+ "type": "text",
868
+ },
869
+ ],
870
+ "id": "child3",
871
+ "props": {
872
+ "backgroundColor": "default",
873
+ "textAlignment": "left",
874
+ "textColor": "default",
875
+ },
876
+ "type": "paragraph",
877
+ },
878
+ ],
879
+ "content": [
880
+ {
881
+ "styles": {},
882
+ "text": "Child 1",
883
+ "type": "text",
884
+ },
885
+ ],
886
+ "id": "child1",
887
+ "props": {
888
+ "backgroundColor": "default",
889
+ "textAlignment": "left",
890
+ "textColor": "default",
891
+ },
892
+ "type": "paragraph",
893
+ },
894
+ {
895
+ "children": [],
896
+ "content": [],
897
+ "id": "0",
898
+ "props": {
899
+ "backgroundColor": "default",
900
+ "textAlignment": "left",
901
+ "textColor": "default",
902
+ },
903
+ "type": "paragraph",
904
+ },
905
+ ]
906
+ `;
907
+
908
+ exports[`unnestBlock / liftListItem > Edge cases > should handle unnesting with different block types 1`] = `
909
+ [
910
+ {
911
+ "children": [],
912
+ "content": [
913
+ {
914
+ "styles": {},
915
+ "text": "Parent",
916
+ "type": "text",
917
+ },
918
+ ],
919
+ "id": "parent",
920
+ "props": {
921
+ "backgroundColor": "default",
922
+ "textAlignment": "left",
923
+ "textColor": "default",
924
+ },
925
+ "type": "paragraph",
926
+ },
927
+ {
928
+ "children": [
929
+ {
930
+ "children": [],
931
+ "content": [
932
+ {
933
+ "styles": {},
934
+ "text": "Paragraph Sibling",
935
+ "type": "text",
936
+ },
937
+ ],
938
+ "id": "para-sibling",
939
+ "props": {
940
+ "backgroundColor": "default",
941
+ "textAlignment": "left",
942
+ "textColor": "default",
943
+ },
944
+ "type": "paragraph",
945
+ },
946
+ ],
947
+ "content": [
948
+ {
949
+ "styles": {},
950
+ "text": "Heading Child",
951
+ "type": "text",
952
+ },
953
+ ],
954
+ "id": "heading-child",
955
+ "props": {
956
+ "backgroundColor": "default",
957
+ "isToggleable": false,
958
+ "level": 1,
959
+ "textAlignment": "left",
960
+ "textColor": "default",
961
+ },
962
+ "type": "heading",
963
+ },
964
+ {
965
+ "children": [],
966
+ "content": [],
967
+ "id": "0",
968
+ "props": {
969
+ "backgroundColor": "default",
970
+ "textAlignment": "left",
971
+ "textColor": "default",
972
+ },
973
+ "type": "paragraph",
974
+ },
975
+ ]
976
+ `;
977
+
978
+ exports[`unnestBlock / liftListItem > nestBlock > should nest a block under its previous sibling 1`] = `
979
+ [
980
+ {
981
+ "children": [
982
+ {
983
+ "children": [],
984
+ "content": [
985
+ {
986
+ "styles": {},
987
+ "text": "Block 2",
988
+ "type": "text",
989
+ },
990
+ ],
991
+ "id": "block2",
992
+ "props": {
993
+ "backgroundColor": "default",
994
+ "textAlignment": "left",
995
+ "textColor": "default",
996
+ },
997
+ "type": "paragraph",
998
+ },
999
+ ],
1000
+ "content": [
1001
+ {
1002
+ "styles": {},
1003
+ "text": "Block 1",
1004
+ "type": "text",
1005
+ },
1006
+ ],
1007
+ "id": "block1",
1008
+ "props": {
1009
+ "backgroundColor": "default",
1010
+ "textAlignment": "left",
1011
+ "textColor": "default",
1012
+ },
1013
+ "type": "paragraph",
1014
+ },
1015
+ {
1016
+ "children": [],
1017
+ "content": [],
1018
+ "id": "0",
1019
+ "props": {
1020
+ "backgroundColor": "default",
1021
+ "textAlignment": "left",
1022
+ "textColor": "default",
1023
+ },
1024
+ "type": "paragraph",
1025
+ },
1026
+ ]
1027
+ `;
1028
+
1029
+ exports[`unnestBlock / liftListItem > nestBlock > should nest into a sibling that already has children (nestedBefore) 1`] = `
1030
+ [
1031
+ {
1032
+ "children": [
1033
+ {
1034
+ "children": [],
1035
+ "content": [
1036
+ {
1037
+ "styles": {},
1038
+ "text": "Child 1",
1039
+ "type": "text",
1040
+ },
1041
+ ],
1042
+ "id": "child1",
1043
+ "props": {
1044
+ "backgroundColor": "default",
1045
+ "textAlignment": "left",
1046
+ "textColor": "default",
1047
+ },
1048
+ "type": "paragraph",
1049
+ },
1050
+ {
1051
+ "children": [],
1052
+ "content": [
1053
+ {
1054
+ "styles": {},
1055
+ "text": "Block 2",
1056
+ "type": "text",
1057
+ },
1058
+ ],
1059
+ "id": "block2",
1060
+ "props": {
1061
+ "backgroundColor": "default",
1062
+ "textAlignment": "left",
1063
+ "textColor": "default",
1064
+ },
1065
+ "type": "paragraph",
1066
+ },
1067
+ ],
1068
+ "content": [
1069
+ {
1070
+ "styles": {},
1071
+ "text": "Block 1",
1072
+ "type": "text",
1073
+ },
1074
+ ],
1075
+ "id": "block1",
1076
+ "props": {
1077
+ "backgroundColor": "default",
1078
+ "textAlignment": "left",
1079
+ "textColor": "default",
1080
+ },
1081
+ "type": "paragraph",
1082
+ },
1083
+ {
1084
+ "children": [],
1085
+ "content": [],
1086
+ "id": "0",
1087
+ "props": {
1088
+ "backgroundColor": "default",
1089
+ "textAlignment": "left",
1090
+ "textColor": "default",
1091
+ },
1092
+ "type": "paragraph",
1093
+ },
1094
+ ]
1095
+ `;