@blocknote/xl-multi-column 0.19.1 → 0.20.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.
- package/dist/blocknote-xl-multi-column.js +2 -0
- package/dist/blocknote-xl-multi-column.js.map +1 -1
- package/dist/blocknote-xl-multi-column.umd.cjs +1 -1
- package/dist/blocknote-xl-multi-column.umd.cjs.map +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +4 -4
- package/src/extensions/ColumnResize/ColumnResizeExtension.ts +4 -0
- package/src/test/commands/__snapshots__/insertBlocks.test.ts.snap +136 -0
- package/src/test/commands/__snapshots__/moveBlocks.test.ts.snap +1087 -0
- package/src/test/commands/__snapshots__/removeBlocks.test.ts.snap +68 -0
- package/src/test/commands/__snapshots__/replaceBlocks.test.ts.snap +53 -1
- package/src/test/commands/__snapshots__/selection.test.ts.snap +316 -0
- package/src/test/commands/__snapshots__/updateBlock.test.ts.snap +204 -0
- package/src/test/commands/moveBlocks.test.ts +57 -0
- package/src/test/commands/replaceBlocks.test.ts +2 -2
- package/src/test/commands/selection.test.ts +25 -0
- package/src/test/setupTestEnv.ts +10 -0
- package/types/src/test/commands/moveBlocks.test.d.ts +1 -0
- package/types/src/test/commands/selection.test.d.ts +1 -0
package/dist/webpack-stats.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"builtAt":
|
|
1
|
+
{"builtAt":1733238687184,"assets":[{"name":"blocknote-xl-multi-column.umd.cjs","size":69012},{"name":"blocknote-xl-multi-column.umd.cjs.map","size":3631734}],"chunks":[{"id":"a1ee98a","entry":true,"initial":true,"files":["blocknote-xl-multi-column.umd.cjs"],"names":["index"]}],"modules":[{"name":"./src/i18n/locales/ar.ts","size":364,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/de.ts","size":400,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/en.ts","size":378,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/es.ts","size":392,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/fr.ts","size":398,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/hr.ts","size":396,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/is.ts","size":376,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/ja.ts","size":284,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/ko.ts","size":288,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/nl.ts","size":390,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/pl.ts","size":394,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/pt.ts","size":388,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/ru.ts","size":370,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/vi.ts","size":340,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/zh.ts","size":274,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/index.ts","size":0,"chunks":["a1ee98a"]},{"name":"./src/i18n/dictionary.ts","size":189,"chunks":["a1ee98a"]},{"name":"./src/extensions/ColumnResize/ColumnResizeExtension.ts","size":8309,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/Column.ts","size":2567,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/ColumnList.ts","size":1120,"chunks":["a1ee98a"]},{"name":"./src/blocks/Columns/index.ts","size":210,"chunks":["a1ee98a"]},{"name":"./src/blocks/schema.ts","size":425,"chunks":["a1ee98a"]},{"name":"./src/extensions/DropCursor/MultiColumnDropCursorPlugin.ts","size":11957,"chunks":["a1ee98a"]},{"name":"./commonjsHelpers.js","size":140,"chunks":["a1ee98a"]},{"name":"../../node_modules/react/jsx-runtime.js?commonjs-module","size":31,"chunks":["a1ee98a"]},{"name":"../../node_modules/react/cjs/react-jsx-runtime.production.min.js?commonjs-exports","size":40,"chunks":["a1ee98a"]},{"name":"../../node_modules/react/index.js?commonjs-module","size":26,"chunks":["a1ee98a"]},{"name":"../../node_modules/react/cjs/react.production.min.js?commonjs-exports","size":30,"chunks":["a1ee98a"]},{"name":"../../node_modules/react/cjs/react.production.min.js","size":7647,"chunks":["a1ee98a"]},{"name":"../../node_modules/react/cjs/react.development.js?commonjs-module","size":38,"chunks":["a1ee98a"]},{"name":"../../node_modules/react/cjs/react.development.js","size":92443,"chunks":["a1ee98a"]},{"name":"../../node_modules/react/index.js","size":299,"chunks":["a1ee98a"]},{"name":"../../node_modules/react/cjs/react-jsx-runtime.production.min.js","size":1192,"chunks":["a1ee98a"]},{"name":"../../node_modules/react/cjs/react-jsx-runtime.development.js?commonjs-exports","size":37,"chunks":["a1ee98a"]},{"name":"../../node_modules/react/cjs/react-jsx-runtime.development.js","size":43835,"chunks":["a1ee98a"]},{"name":"../../node_modules/react/jsx-runtime.js","size":225,"chunks":["a1ee98a"]},{"name":"../../node_modules/react/index.js?commonjs-es-import","size":100,"chunks":["a1ee98a"]},{"name":"../../node_modules/react-icons/lib/iconContext.mjs","size":217,"chunks":["a1ee98a"]},{"name":"../../node_modules/react-icons/lib/iconBase.mjs","size":3929,"chunks":["a1ee98a"]},{"name":"../../node_modules/react-icons/tb/index.mjs","size":732,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/getMultiColumnSlashMenuItems.tsx","size":2087,"chunks":["a1ee98a"]},{"name":"./src/index.ts","size":0,"chunks":["a1ee98a"]}]}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"homepage": "https://github.com/TypeCellOS/BlockNote",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "AGPL-3.0 OR PROPRIETARY",
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.20.0",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist",
|
|
9
9
|
"types",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"clean": "rimraf dist && rimraf types"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@blocknote/core": "^0.
|
|
49
|
-
"@blocknote/react": "^0.
|
|
48
|
+
"@blocknote/core": "^0.20.0",
|
|
49
|
+
"@blocknote/react": "^0.20.0",
|
|
50
50
|
"@tiptap/core": "^2.7.1",
|
|
51
51
|
"prosemirror-model": "^1.23.0",
|
|
52
52
|
"prosemirror-state": "^1.4.3",
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"access": "public",
|
|
77
77
|
"registry": "https://registry.npmjs.org/"
|
|
78
78
|
},
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "a75acbd3806891991b016dc7acb39730e87a8be4"
|
|
80
80
|
}
|
|
@@ -56,6 +56,10 @@ class ColumnResizePluginView implements PluginView {
|
|
|
56
56
|
getColumnHoverOrDefaultState = (
|
|
57
57
|
event: MouseEvent
|
|
58
58
|
): ColumnDefaultState | ColumnHoverState => {
|
|
59
|
+
if (!this.editor.isEditable) {
|
|
60
|
+
return { type: "default" };
|
|
61
|
+
}
|
|
62
|
+
|
|
59
63
|
const target = event.target as HTMLElement;
|
|
60
64
|
|
|
61
65
|
// Do nothing if the event target is outside the editor.
|
|
@@ -99,6 +99,23 @@ exports[`Test insertBlocks > Insert column list into paragraph 1`] = `
|
|
|
99
99
|
},
|
|
100
100
|
"type": "paragraph",
|
|
101
101
|
},
|
|
102
|
+
{
|
|
103
|
+
"children": [],
|
|
104
|
+
"content": [
|
|
105
|
+
{
|
|
106
|
+
"styles": {},
|
|
107
|
+
"text": "Paragraph 1",
|
|
108
|
+
"type": "text",
|
|
109
|
+
},
|
|
110
|
+
],
|
|
111
|
+
"id": "paragraph-1",
|
|
112
|
+
"props": {
|
|
113
|
+
"backgroundColor": "default",
|
|
114
|
+
"textAlignment": "left",
|
|
115
|
+
"textColor": "default",
|
|
116
|
+
},
|
|
117
|
+
"type": "paragraph",
|
|
118
|
+
},
|
|
102
119
|
{
|
|
103
120
|
"children": [
|
|
104
121
|
{
|
|
@@ -195,6 +212,23 @@ exports[`Test insertBlocks > Insert column list into paragraph 1`] = `
|
|
|
195
212
|
"props": {},
|
|
196
213
|
"type": "columnList",
|
|
197
214
|
},
|
|
215
|
+
{
|
|
216
|
+
"children": [],
|
|
217
|
+
"content": [
|
|
218
|
+
{
|
|
219
|
+
"styles": {},
|
|
220
|
+
"text": "Paragraph 2",
|
|
221
|
+
"type": "text",
|
|
222
|
+
},
|
|
223
|
+
],
|
|
224
|
+
"id": "paragraph-2",
|
|
225
|
+
"props": {
|
|
226
|
+
"backgroundColor": "default",
|
|
227
|
+
"textAlignment": "left",
|
|
228
|
+
"textColor": "default",
|
|
229
|
+
},
|
|
230
|
+
"type": "paragraph",
|
|
231
|
+
},
|
|
198
232
|
{
|
|
199
233
|
"children": [],
|
|
200
234
|
"content": [],
|
|
@@ -246,6 +280,23 @@ exports[`Test insertBlocks > Insert column with paragraph into column list 1`] =
|
|
|
246
280
|
},
|
|
247
281
|
"type": "paragraph",
|
|
248
282
|
},
|
|
283
|
+
{
|
|
284
|
+
"children": [],
|
|
285
|
+
"content": [
|
|
286
|
+
{
|
|
287
|
+
"styles": {},
|
|
288
|
+
"text": "Paragraph 1",
|
|
289
|
+
"type": "text",
|
|
290
|
+
},
|
|
291
|
+
],
|
|
292
|
+
"id": "paragraph-1",
|
|
293
|
+
"props": {
|
|
294
|
+
"backgroundColor": "default",
|
|
295
|
+
"textAlignment": "left",
|
|
296
|
+
"textColor": "default",
|
|
297
|
+
},
|
|
298
|
+
"type": "paragraph",
|
|
299
|
+
},
|
|
249
300
|
{
|
|
250
301
|
"children": [
|
|
251
302
|
{
|
|
@@ -369,6 +420,23 @@ exports[`Test insertBlocks > Insert column with paragraph into column list 1`] =
|
|
|
369
420
|
"props": {},
|
|
370
421
|
"type": "columnList",
|
|
371
422
|
},
|
|
423
|
+
{
|
|
424
|
+
"children": [],
|
|
425
|
+
"content": [
|
|
426
|
+
{
|
|
427
|
+
"styles": {},
|
|
428
|
+
"text": "Paragraph 2",
|
|
429
|
+
"type": "text",
|
|
430
|
+
},
|
|
431
|
+
],
|
|
432
|
+
"id": "paragraph-2",
|
|
433
|
+
"props": {
|
|
434
|
+
"backgroundColor": "default",
|
|
435
|
+
"textAlignment": "left",
|
|
436
|
+
"textColor": "default",
|
|
437
|
+
},
|
|
438
|
+
"type": "paragraph",
|
|
439
|
+
},
|
|
372
440
|
{
|
|
373
441
|
"children": [],
|
|
374
442
|
"content": [],
|
|
@@ -420,6 +488,23 @@ exports[`Test insertBlocks > Insert paragraph into column 1`] = `
|
|
|
420
488
|
},
|
|
421
489
|
"type": "paragraph",
|
|
422
490
|
},
|
|
491
|
+
{
|
|
492
|
+
"children": [],
|
|
493
|
+
"content": [
|
|
494
|
+
{
|
|
495
|
+
"styles": {},
|
|
496
|
+
"text": "Paragraph 1",
|
|
497
|
+
"type": "text",
|
|
498
|
+
},
|
|
499
|
+
],
|
|
500
|
+
"id": "paragraph-1",
|
|
501
|
+
"props": {
|
|
502
|
+
"backgroundColor": "default",
|
|
503
|
+
"textAlignment": "left",
|
|
504
|
+
"textColor": "default",
|
|
505
|
+
},
|
|
506
|
+
"type": "paragraph",
|
|
507
|
+
},
|
|
423
508
|
{
|
|
424
509
|
"children": [
|
|
425
510
|
{
|
|
@@ -533,6 +618,23 @@ exports[`Test insertBlocks > Insert paragraph into column 1`] = `
|
|
|
533
618
|
"props": {},
|
|
534
619
|
"type": "columnList",
|
|
535
620
|
},
|
|
621
|
+
{
|
|
622
|
+
"children": [],
|
|
623
|
+
"content": [
|
|
624
|
+
{
|
|
625
|
+
"styles": {},
|
|
626
|
+
"text": "Paragraph 2",
|
|
627
|
+
"type": "text",
|
|
628
|
+
},
|
|
629
|
+
],
|
|
630
|
+
"id": "paragraph-2",
|
|
631
|
+
"props": {
|
|
632
|
+
"backgroundColor": "default",
|
|
633
|
+
"textAlignment": "left",
|
|
634
|
+
"textColor": "default",
|
|
635
|
+
},
|
|
636
|
+
"type": "paragraph",
|
|
637
|
+
},
|
|
536
638
|
{
|
|
537
639
|
"children": [],
|
|
538
640
|
"content": [],
|
|
@@ -646,6 +748,23 @@ exports[`Test insertBlocks > Insert valid column list with two columns 1`] = `
|
|
|
646
748
|
"props": {},
|
|
647
749
|
"type": "columnList",
|
|
648
750
|
},
|
|
751
|
+
{
|
|
752
|
+
"children": [],
|
|
753
|
+
"content": [
|
|
754
|
+
{
|
|
755
|
+
"styles": {},
|
|
756
|
+
"text": "Paragraph 1",
|
|
757
|
+
"type": "text",
|
|
758
|
+
},
|
|
759
|
+
],
|
|
760
|
+
"id": "paragraph-1",
|
|
761
|
+
"props": {
|
|
762
|
+
"backgroundColor": "default",
|
|
763
|
+
"textAlignment": "left",
|
|
764
|
+
"textColor": "default",
|
|
765
|
+
},
|
|
766
|
+
"type": "paragraph",
|
|
767
|
+
},
|
|
649
768
|
{
|
|
650
769
|
"children": [
|
|
651
770
|
{
|
|
@@ -742,6 +861,23 @@ exports[`Test insertBlocks > Insert valid column list with two columns 1`] = `
|
|
|
742
861
|
"props": {},
|
|
743
862
|
"type": "columnList",
|
|
744
863
|
},
|
|
864
|
+
{
|
|
865
|
+
"children": [],
|
|
866
|
+
"content": [
|
|
867
|
+
{
|
|
868
|
+
"styles": {},
|
|
869
|
+
"text": "Paragraph 2",
|
|
870
|
+
"type": "text",
|
|
871
|
+
},
|
|
872
|
+
],
|
|
873
|
+
"id": "paragraph-2",
|
|
874
|
+
"props": {
|
|
875
|
+
"backgroundColor": "default",
|
|
876
|
+
"textAlignment": "left",
|
|
877
|
+
"textColor": "default",
|
|
878
|
+
},
|
|
879
|
+
"type": "paragraph",
|
|
880
|
+
},
|
|
745
881
|
{
|
|
746
882
|
"children": [],
|
|
747
883
|
"content": [],
|