@blocknote/xl-multi-column 0.19.2 → 0.21.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.
@@ -37,6 +37,23 @@ exports[`Test removeBlocks > Remove all blocks in column 1`] = `
37
37
  },
38
38
  "type": "paragraph",
39
39
  },
40
+ {
41
+ "children": [],
42
+ "content": [
43
+ {
44
+ "styles": {},
45
+ "text": "Paragraph 1",
46
+ "type": "text",
47
+ },
48
+ ],
49
+ "id": "paragraph-1",
50
+ "props": {
51
+ "backgroundColor": "default",
52
+ "textAlignment": "left",
53
+ "textColor": "default",
54
+ },
55
+ "type": "paragraph",
56
+ },
40
57
  {
41
58
  "children": [
42
59
  {
@@ -110,6 +127,23 @@ exports[`Test removeBlocks > Remove all blocks in column 1`] = `
110
127
  "props": {},
111
128
  "type": "columnList",
112
129
  },
130
+ {
131
+ "children": [],
132
+ "content": [
133
+ {
134
+ "styles": {},
135
+ "text": "Paragraph 2",
136
+ "type": "text",
137
+ },
138
+ ],
139
+ "id": "paragraph-2",
140
+ "props": {
141
+ "backgroundColor": "default",
142
+ "textAlignment": "left",
143
+ "textColor": "default",
144
+ },
145
+ "type": "paragraph",
146
+ },
113
147
  {
114
148
  "children": [],
115
149
  "content": [],
@@ -161,6 +195,23 @@ exports[`Test removeBlocks > Remove all columns in columnList 1`] = `
161
195
  },
162
196
  "type": "paragraph",
163
197
  },
198
+ {
199
+ "children": [],
200
+ "content": [
201
+ {
202
+ "styles": {},
203
+ "text": "Paragraph 1",
204
+ "type": "text",
205
+ },
206
+ ],
207
+ "id": "paragraph-1",
208
+ "props": {
209
+ "backgroundColor": "default",
210
+ "textAlignment": "left",
211
+ "textColor": "default",
212
+ },
213
+ "type": "paragraph",
214
+ },
164
215
  {
165
216
  "children": [
166
217
  {
@@ -211,6 +262,23 @@ exports[`Test removeBlocks > Remove all columns in columnList 1`] = `
211
262
  "props": {},
212
263
  "type": "columnList",
213
264
  },
265
+ {
266
+ "children": [],
267
+ "content": [
268
+ {
269
+ "styles": {},
270
+ "text": "Paragraph 2",
271
+ "type": "text",
272
+ },
273
+ ],
274
+ "id": "paragraph-2",
275
+ "props": {
276
+ "backgroundColor": "default",
277
+ "textAlignment": "left",
278
+ "textColor": "default",
279
+ },
280
+ "type": "paragraph",
281
+ },
214
282
  {
215
283
  "children": [],
216
284
  "content": [],
@@ -1,7 +1,42 @@
1
1
  // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
2
 
3
- exports[`Test replaceBlocks > Replace paragraph with column list above column list empty column list 1`] = `
3
+ exports[`Test replaceBlocks > Replace paragraph with column list above column list 1`] = `
4
4
  [
5
+ {
6
+ "children": [
7
+ {
8
+ "children": [],
9
+ "content": [
10
+ {
11
+ "styles": {},
12
+ "text": "Nested Paragraph 0",
13
+ "type": "text",
14
+ },
15
+ ],
16
+ "id": "nested-paragraph-0",
17
+ "props": {
18
+ "backgroundColor": "default",
19
+ "textAlignment": "left",
20
+ "textColor": "default",
21
+ },
22
+ "type": "paragraph",
23
+ },
24
+ ],
25
+ "content": [
26
+ {
27
+ "styles": {},
28
+ "text": "Paragraph 0",
29
+ "type": "text",
30
+ },
31
+ ],
32
+ "id": "paragraph-0",
33
+ "props": {
34
+ "backgroundColor": "default",
35
+ "textAlignment": "left",
36
+ "textColor": "default",
37
+ },
38
+ "type": "paragraph",
39
+ },
5
40
  {
6
41
  "children": [
7
42
  {
@@ -160,6 +195,23 @@ exports[`Test replaceBlocks > Replace paragraph with column list above column li
160
195
  "props": {},
161
196
  "type": "columnList",
162
197
  },
198
+ {
199
+ "children": [],
200
+ "content": [
201
+ {
202
+ "styles": {},
203
+ "text": "Paragraph 2",
204
+ "type": "text",
205
+ },
206
+ ],
207
+ "id": "paragraph-2",
208
+ "props": {
209
+ "backgroundColor": "default",
210
+ "textAlignment": "left",
211
+ "textColor": "default",
212
+ },
213
+ "type": "paragraph",
214
+ },
163
215
  {
164
216
  "children": [],
165
217
  "content": [],
@@ -0,0 +1,316 @@
1
+ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
+
3
+ exports[`Test getSelection & setSelection > Ends in column 1`] = `
4
+ {
5
+ "blocks": [
6
+ {
7
+ "children": [],
8
+ "content": [
9
+ {
10
+ "styles": {},
11
+ "text": "Paragraph 1",
12
+ "type": "text",
13
+ },
14
+ ],
15
+ "id": "paragraph-1",
16
+ "props": {
17
+ "backgroundColor": "default",
18
+ "textAlignment": "left",
19
+ "textColor": "default",
20
+ },
21
+ "type": "paragraph",
22
+ },
23
+ {
24
+ "children": [
25
+ {
26
+ "children": [
27
+ {
28
+ "children": [],
29
+ "content": [
30
+ {
31
+ "styles": {},
32
+ "text": "Column Paragraph 0",
33
+ "type": "text",
34
+ },
35
+ ],
36
+ "id": "column-paragraph-0",
37
+ "props": {
38
+ "backgroundColor": "default",
39
+ "textAlignment": "left",
40
+ "textColor": "default",
41
+ },
42
+ "type": "paragraph",
43
+ },
44
+ {
45
+ "children": [],
46
+ "content": [
47
+ {
48
+ "styles": {},
49
+ "text": "Column Paragraph 1",
50
+ "type": "text",
51
+ },
52
+ ],
53
+ "id": "column-paragraph-1",
54
+ "props": {
55
+ "backgroundColor": "default",
56
+ "textAlignment": "left",
57
+ "textColor": "default",
58
+ },
59
+ "type": "paragraph",
60
+ },
61
+ ],
62
+ "content": undefined,
63
+ "id": "column-0",
64
+ "props": {
65
+ "width": 1,
66
+ },
67
+ "type": "column",
68
+ },
69
+ {
70
+ "children": [
71
+ {
72
+ "children": [],
73
+ "content": [
74
+ {
75
+ "styles": {},
76
+ "text": "Column Paragraph 2",
77
+ "type": "text",
78
+ },
79
+ ],
80
+ "id": "column-paragraph-2",
81
+ "props": {
82
+ "backgroundColor": "default",
83
+ "textAlignment": "left",
84
+ "textColor": "default",
85
+ },
86
+ "type": "paragraph",
87
+ },
88
+ {
89
+ "children": [],
90
+ "content": [
91
+ {
92
+ "styles": {},
93
+ "text": "Column Paragraph 3",
94
+ "type": "text",
95
+ },
96
+ ],
97
+ "id": "column-paragraph-3",
98
+ "props": {
99
+ "backgroundColor": "default",
100
+ "textAlignment": "left",
101
+ "textColor": "default",
102
+ },
103
+ "type": "paragraph",
104
+ },
105
+ ],
106
+ "content": undefined,
107
+ "id": "column-1",
108
+ "props": {
109
+ "width": 1,
110
+ },
111
+ "type": "column",
112
+ },
113
+ ],
114
+ "content": undefined,
115
+ "id": "column-list-0",
116
+ "props": {},
117
+ "type": "columnList",
118
+ },
119
+ ],
120
+ }
121
+ `;
122
+
123
+ exports[`Test getSelection & setSelection > Spans column list 1`] = `
124
+ {
125
+ "blocks": [
126
+ {
127
+ "children": [],
128
+ "content": [
129
+ {
130
+ "styles": {},
131
+ "text": "Paragraph 1",
132
+ "type": "text",
133
+ },
134
+ ],
135
+ "id": "paragraph-1",
136
+ "props": {
137
+ "backgroundColor": "default",
138
+ "textAlignment": "left",
139
+ "textColor": "default",
140
+ },
141
+ "type": "paragraph",
142
+ },
143
+ {
144
+ "children": [
145
+ {
146
+ "children": [
147
+ {
148
+ "children": [],
149
+ "content": [
150
+ {
151
+ "styles": {},
152
+ "text": "Column Paragraph 0",
153
+ "type": "text",
154
+ },
155
+ ],
156
+ "id": "column-paragraph-0",
157
+ "props": {
158
+ "backgroundColor": "default",
159
+ "textAlignment": "left",
160
+ "textColor": "default",
161
+ },
162
+ "type": "paragraph",
163
+ },
164
+ {
165
+ "children": [],
166
+ "content": [
167
+ {
168
+ "styles": {},
169
+ "text": "Column Paragraph 1",
170
+ "type": "text",
171
+ },
172
+ ],
173
+ "id": "column-paragraph-1",
174
+ "props": {
175
+ "backgroundColor": "default",
176
+ "textAlignment": "left",
177
+ "textColor": "default",
178
+ },
179
+ "type": "paragraph",
180
+ },
181
+ ],
182
+ "content": undefined,
183
+ "id": "column-0",
184
+ "props": {
185
+ "width": 1,
186
+ },
187
+ "type": "column",
188
+ },
189
+ {
190
+ "children": [
191
+ {
192
+ "children": [],
193
+ "content": [
194
+ {
195
+ "styles": {},
196
+ "text": "Column Paragraph 2",
197
+ "type": "text",
198
+ },
199
+ ],
200
+ "id": "column-paragraph-2",
201
+ "props": {
202
+ "backgroundColor": "default",
203
+ "textAlignment": "left",
204
+ "textColor": "default",
205
+ },
206
+ "type": "paragraph",
207
+ },
208
+ {
209
+ "children": [],
210
+ "content": [
211
+ {
212
+ "styles": {},
213
+ "text": "Column Paragraph 3",
214
+ "type": "text",
215
+ },
216
+ ],
217
+ "id": "column-paragraph-3",
218
+ "props": {
219
+ "backgroundColor": "default",
220
+ "textAlignment": "left",
221
+ "textColor": "default",
222
+ },
223
+ "type": "paragraph",
224
+ },
225
+ ],
226
+ "content": undefined,
227
+ "id": "column-1",
228
+ "props": {
229
+ "width": 1,
230
+ },
231
+ "type": "column",
232
+ },
233
+ ],
234
+ "content": undefined,
235
+ "id": "column-list-0",
236
+ "props": {},
237
+ "type": "columnList",
238
+ },
239
+ {
240
+ "children": [],
241
+ "content": [
242
+ {
243
+ "styles": {},
244
+ "text": "Paragraph 2",
245
+ "type": "text",
246
+ },
247
+ ],
248
+ "id": "paragraph-2",
249
+ "props": {
250
+ "backgroundColor": "default",
251
+ "textAlignment": "left",
252
+ "textColor": "default",
253
+ },
254
+ "type": "paragraph",
255
+ },
256
+ ],
257
+ }
258
+ `;
259
+
260
+ exports[`Test getSelection & setSelection > Starts in column 1`] = `
261
+ {
262
+ "blocks": [
263
+ {
264
+ "children": [],
265
+ "content": [
266
+ {
267
+ "styles": {},
268
+ "text": "Column Paragraph 2",
269
+ "type": "text",
270
+ },
271
+ ],
272
+ "id": "column-paragraph-2",
273
+ "props": {
274
+ "backgroundColor": "default",
275
+ "textAlignment": "left",
276
+ "textColor": "default",
277
+ },
278
+ "type": "paragraph",
279
+ },
280
+ {
281
+ "children": [],
282
+ "content": [
283
+ {
284
+ "styles": {},
285
+ "text": "Column Paragraph 3",
286
+ "type": "text",
287
+ },
288
+ ],
289
+ "id": "column-paragraph-3",
290
+ "props": {
291
+ "backgroundColor": "default",
292
+ "textAlignment": "left",
293
+ "textColor": "default",
294
+ },
295
+ "type": "paragraph",
296
+ },
297
+ {
298
+ "children": [],
299
+ "content": [
300
+ {
301
+ "styles": {},
302
+ "text": "Paragraph 2",
303
+ "type": "text",
304
+ },
305
+ ],
306
+ "id": "paragraph-2",
307
+ "props": {
308
+ "backgroundColor": "default",
309
+ "textAlignment": "left",
310
+ "textColor": "default",
311
+ },
312
+ "type": "paragraph",
313
+ },
314
+ ],
315
+ }
316
+ `;