@blocknote/xl-multi-column 0.41.1 → 0.42.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.
@@ -54,78 +54,668 @@ exports[`Test removeBlocks > Remove all blocks in column 1`] = `
54
54
  },
55
55
  "type": "paragraph",
56
56
  },
57
+ {
58
+ "children": [],
59
+ "content": [
60
+ {
61
+ "styles": {},
62
+ "text": "Column Paragraph 2",
63
+ "type": "text",
64
+ },
65
+ ],
66
+ "id": "column-paragraph-2",
67
+ "props": {
68
+ "backgroundColor": "default",
69
+ "textAlignment": "left",
70
+ "textColor": "default",
71
+ },
72
+ "type": "paragraph",
73
+ },
74
+ {
75
+ "children": [],
76
+ "content": [
77
+ {
78
+ "styles": {},
79
+ "text": "Column Paragraph 3",
80
+ "type": "text",
81
+ },
82
+ ],
83
+ "id": "column-paragraph-3",
84
+ "props": {
85
+ "backgroundColor": "default",
86
+ "textAlignment": "left",
87
+ "textColor": "default",
88
+ },
89
+ "type": "paragraph",
90
+ },
91
+ {
92
+ "children": [],
93
+ "content": [
94
+ {
95
+ "styles": {},
96
+ "text": "Paragraph 2",
97
+ "type": "text",
98
+ },
99
+ ],
100
+ "id": "paragraph-2",
101
+ "props": {
102
+ "backgroundColor": "default",
103
+ "textAlignment": "left",
104
+ "textColor": "default",
105
+ },
106
+ "type": "paragraph",
107
+ },
108
+ {
109
+ "children": [],
110
+ "content": [],
111
+ "id": "trailing-paragraph",
112
+ "props": {
113
+ "backgroundColor": "default",
114
+ "textAlignment": "left",
115
+ "textColor": "default",
116
+ },
117
+ "type": "paragraph",
118
+ },
119
+ ]
120
+ `;
121
+
122
+ exports[`Test removeBlocks > Remove all blocks in column and block after 1`] = `
123
+ [
124
+ {
125
+ "children": [
126
+ {
127
+ "children": [],
128
+ "content": [
129
+ {
130
+ "styles": {},
131
+ "text": "Nested Paragraph 0",
132
+ "type": "text",
133
+ },
134
+ ],
135
+ "id": "nested-paragraph-0",
136
+ "props": {
137
+ "backgroundColor": "default",
138
+ "textAlignment": "left",
139
+ "textColor": "default",
140
+ },
141
+ "type": "paragraph",
142
+ },
143
+ ],
144
+ "content": [
145
+ {
146
+ "styles": {},
147
+ "text": "Paragraph 0",
148
+ "type": "text",
149
+ },
150
+ ],
151
+ "id": "paragraph-0",
152
+ "props": {
153
+ "backgroundColor": "default",
154
+ "textAlignment": "left",
155
+ "textColor": "default",
156
+ },
157
+ "type": "paragraph",
158
+ },
159
+ {
160
+ "children": [],
161
+ "content": [
162
+ {
163
+ "styles": {},
164
+ "text": "Paragraph 1",
165
+ "type": "text",
166
+ },
167
+ ],
168
+ "id": "paragraph-1",
169
+ "props": {
170
+ "backgroundColor": "default",
171
+ "textAlignment": "left",
172
+ "textColor": "default",
173
+ },
174
+ "type": "paragraph",
175
+ },
176
+ {
177
+ "children": [],
178
+ "content": [
179
+ {
180
+ "styles": {},
181
+ "text": "Column Paragraph 2",
182
+ "type": "text",
183
+ },
184
+ ],
185
+ "id": "column-paragraph-2",
186
+ "props": {
187
+ "backgroundColor": "default",
188
+ "textAlignment": "left",
189
+ "textColor": "default",
190
+ },
191
+ "type": "paragraph",
192
+ },
193
+ {
194
+ "children": [],
195
+ "content": [
196
+ {
197
+ "styles": {},
198
+ "text": "Column Paragraph 3",
199
+ "type": "text",
200
+ },
201
+ ],
202
+ "id": "column-paragraph-3",
203
+ "props": {
204
+ "backgroundColor": "default",
205
+ "textAlignment": "left",
206
+ "textColor": "default",
207
+ },
208
+ "type": "paragraph",
209
+ },
210
+ {
211
+ "children": [],
212
+ "content": [],
213
+ "id": "trailing-paragraph",
214
+ "props": {
215
+ "backgroundColor": "default",
216
+ "textAlignment": "left",
217
+ "textColor": "default",
218
+ },
219
+ "type": "paragraph",
220
+ },
221
+ ]
222
+ `;
223
+
224
+ exports[`Test removeBlocks > Remove all blocks in columns 1`] = `
225
+ [
226
+ {
227
+ "children": [
228
+ {
229
+ "children": [],
230
+ "content": [
231
+ {
232
+ "styles": {},
233
+ "text": "Nested Paragraph 0",
234
+ "type": "text",
235
+ },
236
+ ],
237
+ "id": "nested-paragraph-0",
238
+ "props": {
239
+ "backgroundColor": "default",
240
+ "textAlignment": "left",
241
+ "textColor": "default",
242
+ },
243
+ "type": "paragraph",
244
+ },
245
+ ],
246
+ "content": [
247
+ {
248
+ "styles": {},
249
+ "text": "Paragraph 0",
250
+ "type": "text",
251
+ },
252
+ ],
253
+ "id": "paragraph-0",
254
+ "props": {
255
+ "backgroundColor": "default",
256
+ "textAlignment": "left",
257
+ "textColor": "default",
258
+ },
259
+ "type": "paragraph",
260
+ },
261
+ {
262
+ "children": [],
263
+ "content": [
264
+ {
265
+ "styles": {},
266
+ "text": "Paragraph 1",
267
+ "type": "text",
268
+ },
269
+ ],
270
+ "id": "paragraph-1",
271
+ "props": {
272
+ "backgroundColor": "default",
273
+ "textAlignment": "left",
274
+ "textColor": "default",
275
+ },
276
+ "type": "paragraph",
277
+ },
278
+ {
279
+ "children": [],
280
+ "content": [
281
+ {
282
+ "styles": {},
283
+ "text": "Paragraph 2",
284
+ "type": "text",
285
+ },
286
+ ],
287
+ "id": "paragraph-2",
288
+ "props": {
289
+ "backgroundColor": "default",
290
+ "textAlignment": "left",
291
+ "textColor": "default",
292
+ },
293
+ "type": "paragraph",
294
+ },
295
+ {
296
+ "children": [],
297
+ "content": [],
298
+ "id": "trailing-paragraph",
299
+ "props": {
300
+ "backgroundColor": "default",
301
+ "textAlignment": "left",
302
+ "textColor": "default",
303
+ },
304
+ "type": "paragraph",
305
+ },
306
+ ]
307
+ `;
308
+
309
+ exports[`Test removeBlocks > Remove all blocks in columns and block after 1`] = `
310
+ [
311
+ {
312
+ "children": [
313
+ {
314
+ "children": [],
315
+ "content": [
316
+ {
317
+ "styles": {},
318
+ "text": "Nested Paragraph 0",
319
+ "type": "text",
320
+ },
321
+ ],
322
+ "id": "nested-paragraph-0",
323
+ "props": {
324
+ "backgroundColor": "default",
325
+ "textAlignment": "left",
326
+ "textColor": "default",
327
+ },
328
+ "type": "paragraph",
329
+ },
330
+ ],
331
+ "content": [
332
+ {
333
+ "styles": {},
334
+ "text": "Paragraph 0",
335
+ "type": "text",
336
+ },
337
+ ],
338
+ "id": "paragraph-0",
339
+ "props": {
340
+ "backgroundColor": "default",
341
+ "textAlignment": "left",
342
+ "textColor": "default",
343
+ },
344
+ "type": "paragraph",
345
+ },
346
+ {
347
+ "children": [],
348
+ "content": [
349
+ {
350
+ "styles": {},
351
+ "text": "Paragraph 1",
352
+ "type": "text",
353
+ },
354
+ ],
355
+ "id": "paragraph-1",
356
+ "props": {
357
+ "backgroundColor": "default",
358
+ "textAlignment": "left",
359
+ "textColor": "default",
360
+ },
361
+ "type": "paragraph",
362
+ },
363
+ {
364
+ "children": [],
365
+ "content": [],
366
+ "id": "trailing-paragraph",
367
+ "props": {
368
+ "backgroundColor": "default",
369
+ "textAlignment": "left",
370
+ "textColor": "default",
371
+ },
372
+ "type": "paragraph",
373
+ },
374
+ ]
375
+ `;
376
+
377
+ exports[`Test removeBlocks > Remove all blocks in second column 1`] = `
378
+ [
379
+ {
380
+ "children": [
381
+ {
382
+ "children": [],
383
+ "content": [
384
+ {
385
+ "styles": {},
386
+ "text": "Nested Paragraph 0",
387
+ "type": "text",
388
+ },
389
+ ],
390
+ "id": "nested-paragraph-0",
391
+ "props": {
392
+ "backgroundColor": "default",
393
+ "textAlignment": "left",
394
+ "textColor": "default",
395
+ },
396
+ "type": "paragraph",
397
+ },
398
+ ],
399
+ "content": [
400
+ {
401
+ "styles": {},
402
+ "text": "Paragraph 0",
403
+ "type": "text",
404
+ },
405
+ ],
406
+ "id": "paragraph-0",
407
+ "props": {
408
+ "backgroundColor": "default",
409
+ "textAlignment": "left",
410
+ "textColor": "default",
411
+ },
412
+ "type": "paragraph",
413
+ },
414
+ {
415
+ "children": [],
416
+ "content": [
417
+ {
418
+ "styles": {},
419
+ "text": "Paragraph 1",
420
+ "type": "text",
421
+ },
422
+ ],
423
+ "id": "paragraph-1",
424
+ "props": {
425
+ "backgroundColor": "default",
426
+ "textAlignment": "left",
427
+ "textColor": "default",
428
+ },
429
+ "type": "paragraph",
430
+ },
431
+ {
432
+ "children": [],
433
+ "content": [
434
+ {
435
+ "styles": {},
436
+ "text": "Column Paragraph 0",
437
+ "type": "text",
438
+ },
439
+ ],
440
+ "id": "column-paragraph-0",
441
+ "props": {
442
+ "backgroundColor": "default",
443
+ "textAlignment": "left",
444
+ "textColor": "default",
445
+ },
446
+ "type": "paragraph",
447
+ },
448
+ {
449
+ "children": [],
450
+ "content": [
451
+ {
452
+ "styles": {},
453
+ "text": "Column Paragraph 1",
454
+ "type": "text",
455
+ },
456
+ ],
457
+ "id": "column-paragraph-1",
458
+ "props": {
459
+ "backgroundColor": "default",
460
+ "textAlignment": "left",
461
+ "textColor": "default",
462
+ },
463
+ "type": "paragraph",
464
+ },
465
+ {
466
+ "children": [],
467
+ "content": [
468
+ {
469
+ "styles": {},
470
+ "text": "Paragraph 2",
471
+ "type": "text",
472
+ },
473
+ ],
474
+ "id": "paragraph-2",
475
+ "props": {
476
+ "backgroundColor": "default",
477
+ "textAlignment": "left",
478
+ "textColor": "default",
479
+ },
480
+ "type": "paragraph",
481
+ },
482
+ {
483
+ "children": [],
484
+ "content": [],
485
+ "id": "trailing-paragraph",
486
+ "props": {
487
+ "backgroundColor": "default",
488
+ "textAlignment": "left",
489
+ "textColor": "default",
490
+ },
491
+ "type": "paragraph",
492
+ },
493
+ ]
494
+ `;
495
+
496
+ exports[`Test removeBlocks > Remove all columns in columnList 1`] = `
497
+ [
498
+ {
499
+ "children": [
500
+ {
501
+ "children": [],
502
+ "content": [
503
+ {
504
+ "styles": {},
505
+ "text": "Nested Paragraph 0",
506
+ "type": "text",
507
+ },
508
+ ],
509
+ "id": "nested-paragraph-0",
510
+ "props": {
511
+ "backgroundColor": "default",
512
+ "textAlignment": "left",
513
+ "textColor": "default",
514
+ },
515
+ "type": "paragraph",
516
+ },
517
+ ],
518
+ "content": [
519
+ {
520
+ "styles": {},
521
+ "text": "Paragraph 0",
522
+ "type": "text",
523
+ },
524
+ ],
525
+ "id": "paragraph-0",
526
+ "props": {
527
+ "backgroundColor": "default",
528
+ "textAlignment": "left",
529
+ "textColor": "default",
530
+ },
531
+ "type": "paragraph",
532
+ },
533
+ {
534
+ "children": [],
535
+ "content": [
536
+ {
537
+ "styles": {},
538
+ "text": "Paragraph 1",
539
+ "type": "text",
540
+ },
541
+ ],
542
+ "id": "paragraph-1",
543
+ "props": {
544
+ "backgroundColor": "default",
545
+ "textAlignment": "left",
546
+ "textColor": "default",
547
+ },
548
+ "type": "paragraph",
549
+ },
550
+ {
551
+ "children": [],
552
+ "content": [
553
+ {
554
+ "styles": {},
555
+ "text": "Paragraph 2",
556
+ "type": "text",
557
+ },
558
+ ],
559
+ "id": "paragraph-2",
560
+ "props": {
561
+ "backgroundColor": "default",
562
+ "textAlignment": "left",
563
+ "textColor": "default",
564
+ },
565
+ "type": "paragraph",
566
+ },
567
+ {
568
+ "children": [],
569
+ "content": [],
570
+ "id": "trailing-paragraph",
571
+ "props": {
572
+ "backgroundColor": "default",
573
+ "textAlignment": "left",
574
+ "textColor": "default",
575
+ },
576
+ "type": "paragraph",
577
+ },
578
+ ]
579
+ `;
580
+
581
+ exports[`Test removeBlocks > Remove all columns in columnList and block after 1`] = `
582
+ [
57
583
  {
58
584
  "children": [
59
585
  {
60
- "children": [
586
+ "children": [],
587
+ "content": [
61
588
  {
62
- "children": [],
63
- "content": [],
64
- "id": "0",
65
- "props": {
66
- "backgroundColor": "default",
67
- "textAlignment": "left",
68
- "textColor": "default",
69
- },
70
- "type": "paragraph",
589
+ "styles": {},
590
+ "text": "Nested Paragraph 0",
591
+ "type": "text",
71
592
  },
72
593
  ],
73
- "content": undefined,
74
- "id": "column-0",
594
+ "id": "nested-paragraph-0",
75
595
  "props": {
76
- "width": 1,
596
+ "backgroundColor": "default",
597
+ "textAlignment": "left",
598
+ "textColor": "default",
77
599
  },
78
- "type": "column",
600
+ "type": "paragraph",
79
601
  },
602
+ ],
603
+ "content": [
80
604
  {
81
- "children": [
82
- {
83
- "children": [],
84
- "content": [
85
- {
86
- "styles": {},
87
- "text": "Column Paragraph 2",
88
- "type": "text",
89
- },
90
- ],
91
- "id": "column-paragraph-2",
92
- "props": {
93
- "backgroundColor": "default",
94
- "textAlignment": "left",
95
- "textColor": "default",
96
- },
97
- "type": "paragraph",
98
- },
605
+ "styles": {},
606
+ "text": "Paragraph 0",
607
+ "type": "text",
608
+ },
609
+ ],
610
+ "id": "paragraph-0",
611
+ "props": {
612
+ "backgroundColor": "default",
613
+ "textAlignment": "left",
614
+ "textColor": "default",
615
+ },
616
+ "type": "paragraph",
617
+ },
618
+ {
619
+ "children": [],
620
+ "content": [
621
+ {
622
+ "styles": {},
623
+ "text": "Paragraph 1",
624
+ "type": "text",
625
+ },
626
+ ],
627
+ "id": "paragraph-1",
628
+ "props": {
629
+ "backgroundColor": "default",
630
+ "textAlignment": "left",
631
+ "textColor": "default",
632
+ },
633
+ "type": "paragraph",
634
+ },
635
+ {
636
+ "children": [],
637
+ "content": [],
638
+ "id": "trailing-paragraph",
639
+ "props": {
640
+ "backgroundColor": "default",
641
+ "textAlignment": "left",
642
+ "textColor": "default",
643
+ },
644
+ "type": "paragraph",
645
+ },
646
+ ]
647
+ `;
648
+
649
+ exports[`Test removeBlocks > Remove column and and block in column after 1`] = `
650
+ [
651
+ {
652
+ "children": [
653
+ {
654
+ "children": [],
655
+ "content": [
99
656
  {
100
- "children": [],
101
- "content": [
102
- {
103
- "styles": {},
104
- "text": "Column Paragraph 3",
105
- "type": "text",
106
- },
107
- ],
108
- "id": "column-paragraph-3",
109
- "props": {
110
- "backgroundColor": "default",
111
- "textAlignment": "left",
112
- "textColor": "default",
113
- },
114
- "type": "paragraph",
657
+ "styles": {},
658
+ "text": "Nested Paragraph 0",
659
+ "type": "text",
115
660
  },
116
661
  ],
117
- "content": undefined,
118
- "id": "column-1",
662
+ "id": "nested-paragraph-0",
119
663
  "props": {
120
- "width": 1,
664
+ "backgroundColor": "default",
665
+ "textAlignment": "left",
666
+ "textColor": "default",
121
667
  },
122
- "type": "column",
668
+ "type": "paragraph",
669
+ },
670
+ ],
671
+ "content": [
672
+ {
673
+ "styles": {},
674
+ "text": "Paragraph 0",
675
+ "type": "text",
676
+ },
677
+ ],
678
+ "id": "paragraph-0",
679
+ "props": {
680
+ "backgroundColor": "default",
681
+ "textAlignment": "left",
682
+ "textColor": "default",
683
+ },
684
+ "type": "paragraph",
685
+ },
686
+ {
687
+ "children": [],
688
+ "content": [
689
+ {
690
+ "styles": {},
691
+ "text": "Paragraph 1",
692
+ "type": "text",
693
+ },
694
+ ],
695
+ "id": "paragraph-1",
696
+ "props": {
697
+ "backgroundColor": "default",
698
+ "textAlignment": "left",
699
+ "textColor": "default",
700
+ },
701
+ "type": "paragraph",
702
+ },
703
+ {
704
+ "children": [],
705
+ "content": [
706
+ {
707
+ "styles": {},
708
+ "text": "Column Paragraph 3",
709
+ "type": "text",
123
710
  },
124
711
  ],
125
- "content": undefined,
126
- "id": "column-list-0",
127
- "props": {},
128
- "type": "columnList",
712
+ "id": "column-paragraph-3",
713
+ "props": {
714
+ "backgroundColor": "default",
715
+ "textAlignment": "left",
716
+ "textColor": "default",
717
+ },
718
+ "type": "paragraph",
129
719
  },
130
720
  {
131
721
  "children": [],
@@ -158,7 +748,7 @@ exports[`Test removeBlocks > Remove all blocks in column 1`] = `
158
748
  ]
159
749
  `;
160
750
 
161
- exports[`Test removeBlocks > Remove all columns in columnList 1`] = `
751
+ exports[`Test removeBlocks > Remove column in columnList 1`] = `
162
752
  [
163
753
  {
164
754
  "children": [
@@ -212,66 +802,152 @@ exports[`Test removeBlocks > Remove all columns in columnList 1`] = `
212
802
  },
213
803
  "type": "paragraph",
214
804
  },
805
+ {
806
+ "children": [],
807
+ "content": [
808
+ {
809
+ "styles": {},
810
+ "text": "Column Paragraph 2",
811
+ "type": "text",
812
+ },
813
+ ],
814
+ "id": "column-paragraph-2",
815
+ "props": {
816
+ "backgroundColor": "default",
817
+ "textAlignment": "left",
818
+ "textColor": "default",
819
+ },
820
+ "type": "paragraph",
821
+ },
822
+ {
823
+ "children": [],
824
+ "content": [
825
+ {
826
+ "styles": {},
827
+ "text": "Column Paragraph 3",
828
+ "type": "text",
829
+ },
830
+ ],
831
+ "id": "column-paragraph-3",
832
+ "props": {
833
+ "backgroundColor": "default",
834
+ "textAlignment": "left",
835
+ "textColor": "default",
836
+ },
837
+ "type": "paragraph",
838
+ },
839
+ {
840
+ "children": [],
841
+ "content": [
842
+ {
843
+ "styles": {},
844
+ "text": "Paragraph 2",
845
+ "type": "text",
846
+ },
847
+ ],
848
+ "id": "paragraph-2",
849
+ "props": {
850
+ "backgroundColor": "default",
851
+ "textAlignment": "left",
852
+ "textColor": "default",
853
+ },
854
+ "type": "paragraph",
855
+ },
856
+ {
857
+ "children": [],
858
+ "content": [],
859
+ "id": "trailing-paragraph",
860
+ "props": {
861
+ "backgroundColor": "default",
862
+ "textAlignment": "left",
863
+ "textColor": "default",
864
+ },
865
+ "type": "paragraph",
866
+ },
867
+ ]
868
+ `;
869
+
870
+ exports[`Test removeBlocks > Remove column in columnList and block after 1`] = `
871
+ [
215
872
  {
216
873
  "children": [
217
874
  {
218
- "children": [
875
+ "children": [],
876
+ "content": [
219
877
  {
220
- "children": [],
221
- "content": [],
222
- "id": "1",
223
- "props": {
224
- "backgroundColor": "default",
225
- "textAlignment": "left",
226
- "textColor": "default",
227
- },
228
- "type": "paragraph",
878
+ "styles": {},
879
+ "text": "Nested Paragraph 0",
880
+ "type": "text",
229
881
  },
230
882
  ],
231
- "content": undefined,
232
- "id": "0",
883
+ "id": "nested-paragraph-0",
233
884
  "props": {
234
- "width": 1,
885
+ "backgroundColor": "default",
886
+ "textAlignment": "left",
887
+ "textColor": "default",
235
888
  },
236
- "type": "column",
889
+ "type": "paragraph",
237
890
  },
891
+ ],
892
+ "content": [
238
893
  {
239
- "children": [
240
- {
241
- "children": [],
242
- "content": [],
243
- "id": "3",
244
- "props": {
245
- "backgroundColor": "default",
246
- "textAlignment": "left",
247
- "textColor": "default",
248
- },
249
- "type": "paragraph",
250
- },
251
- ],
252
- "content": undefined,
253
- "id": "2",
254
- "props": {
255
- "width": 1,
256
- },
257
- "type": "column",
894
+ "styles": {},
895
+ "text": "Paragraph 0",
896
+ "type": "text",
258
897
  },
259
898
  ],
260
- "content": undefined,
261
- "id": "column-list-0",
262
- "props": {},
263
- "type": "columnList",
899
+ "id": "paragraph-0",
900
+ "props": {
901
+ "backgroundColor": "default",
902
+ "textAlignment": "left",
903
+ "textColor": "default",
904
+ },
905
+ "type": "paragraph",
264
906
  },
265
907
  {
266
908
  "children": [],
267
909
  "content": [
268
910
  {
269
911
  "styles": {},
270
- "text": "Paragraph 2",
912
+ "text": "Paragraph 1",
271
913
  "type": "text",
272
914
  },
273
915
  ],
274
- "id": "paragraph-2",
916
+ "id": "paragraph-1",
917
+ "props": {
918
+ "backgroundColor": "default",
919
+ "textAlignment": "left",
920
+ "textColor": "default",
921
+ },
922
+ "type": "paragraph",
923
+ },
924
+ {
925
+ "children": [],
926
+ "content": [
927
+ {
928
+ "styles": {},
929
+ "text": "Column Paragraph 2",
930
+ "type": "text",
931
+ },
932
+ ],
933
+ "id": "column-paragraph-2",
934
+ "props": {
935
+ "backgroundColor": "default",
936
+ "textAlignment": "left",
937
+ "textColor": "default",
938
+ },
939
+ "type": "paragraph",
940
+ },
941
+ {
942
+ "children": [],
943
+ "content": [
944
+ {
945
+ "styles": {},
946
+ "text": "Column Paragraph 3",
947
+ "type": "text",
948
+ },
949
+ ],
950
+ "id": "column-paragraph-3",
275
951
  "props": {
276
952
  "backgroundColor": "default",
277
953
  "textAlignment": "left",