@blocknote/xl-multi-column 0.19.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 (78) hide show
  1. package/LICENSE +661 -0
  2. package/dist/blocknote-xl-multi-column.js +3038 -0
  3. package/dist/blocknote-xl-multi-column.js.map +1 -0
  4. package/dist/blocknote-xl-multi-column.umd.cjs +69 -0
  5. package/dist/blocknote-xl-multi-column.umd.cjs.map +1 -0
  6. package/dist/webpack-stats.json +1 -0
  7. package/package.json +80 -0
  8. package/src/blocks/Columns/index.ts +15 -0
  9. package/src/blocks/schema.ts +43 -0
  10. package/src/extensions/ColumnResize/ColumnResizeExtension.ts +357 -0
  11. package/src/extensions/DropCursor/MultiColumnDropCursorPlugin.ts +480 -0
  12. package/src/extensions/SuggestionMenu/getMultiColumnSlashMenuItems.tsx +105 -0
  13. package/src/i18n/dictionary.ts +27 -0
  14. package/src/i18n/locales/ar.ts +18 -0
  15. package/src/i18n/locales/de.ts +18 -0
  16. package/src/i18n/locales/en.ts +16 -0
  17. package/src/i18n/locales/es.ts +18 -0
  18. package/src/i18n/locales/fr.ts +18 -0
  19. package/src/i18n/locales/hr.ts +18 -0
  20. package/src/i18n/locales/index.ts +15 -0
  21. package/src/i18n/locales/is.ts +18 -0
  22. package/src/i18n/locales/ja.ts +18 -0
  23. package/src/i18n/locales/ko.ts +18 -0
  24. package/src/i18n/locales/nl.ts +18 -0
  25. package/src/i18n/locales/pl.ts +18 -0
  26. package/src/i18n/locales/pt.ts +18 -0
  27. package/src/i18n/locales/ru.ts +18 -0
  28. package/src/i18n/locales/vi.ts +18 -0
  29. package/src/i18n/locales/zh.ts +18 -0
  30. package/src/index.ts +7 -0
  31. package/src/pm-nodes/Column.ts +87 -0
  32. package/src/pm-nodes/ColumnList.ts +44 -0
  33. package/src/test/commands/__snapshots__/insertBlocks.test.ts.snap +757 -0
  34. package/src/test/commands/__snapshots__/textCursorPosition.test.ts.snap +169 -0
  35. package/src/test/commands/__snapshots__/updateBlock.test.ts.snap +964 -0
  36. package/src/test/commands/insertBlocks.test.ts +206 -0
  37. package/src/test/commands/textCursorPosition.test.ts +19 -0
  38. package/src/test/commands/updateBlock.test.ts +212 -0
  39. package/src/test/conversions/__snapshots__/multi-column/undefined/external.html +1 -0
  40. package/src/test/conversions/__snapshots__/multi-column/undefined/internal.html +1 -0
  41. package/src/test/conversions/__snapshots__/nodeConversion.test.ts.snap +118 -0
  42. package/src/test/conversions/htmlConversion.test.ts +100 -0
  43. package/src/test/conversions/nodeConversion.test.ts +84 -0
  44. package/src/test/conversions/testCases.ts +54 -0
  45. package/src/test/setupTestEnv.ts +99 -0
  46. package/src/vite-env.d.ts +1 -0
  47. package/types/src/blocks/Columns/index.d.ts +32 -0
  48. package/types/src/blocks/schema.d.ts +102 -0
  49. package/types/src/extensions/ColumnResize/ColumnResizeExtension.d.ts +3 -0
  50. package/types/src/extensions/DropCursor/MultiColumnDropCursorPlugin.d.ts +11 -0
  51. package/types/src/extensions/SuggestionMenu/getMultiColumnSlashMenuItems.d.ts +5 -0
  52. package/types/src/i18n/dictionary.d.ts +19 -0
  53. package/types/src/i18n/locales/ar.d.ts +2 -0
  54. package/types/src/i18n/locales/de.d.ts +2 -0
  55. package/types/src/i18n/locales/en.d.ts +16 -0
  56. package/types/src/i18n/locales/es.d.ts +2 -0
  57. package/types/src/i18n/locales/fr.d.ts +2 -0
  58. package/types/src/i18n/locales/hr.d.ts +2 -0
  59. package/types/src/i18n/locales/index.d.ts +15 -0
  60. package/types/src/i18n/locales/is.d.ts +2 -0
  61. package/types/src/i18n/locales/ja.d.ts +2 -0
  62. package/types/src/i18n/locales/ko.d.ts +2 -0
  63. package/types/src/i18n/locales/nl.d.ts +2 -0
  64. package/types/src/i18n/locales/pl.d.ts +2 -0
  65. package/types/src/i18n/locales/pt.d.ts +2 -0
  66. package/types/src/i18n/locales/ru.d.ts +2 -0
  67. package/types/src/i18n/locales/vi.d.ts +2 -0
  68. package/types/src/i18n/locales/zh.d.ts +2 -0
  69. package/types/src/index.d.ts +7 -0
  70. package/types/src/pm-nodes/Column.d.ts +6 -0
  71. package/types/src/pm-nodes/ColumnList.d.ts +6 -0
  72. package/types/src/test/commands/insertBlocks.test.d.ts +1 -0
  73. package/types/src/test/commands/textCursorPosition.test.d.ts +1 -0
  74. package/types/src/test/commands/updateBlock.test.d.ts +1 -0
  75. package/types/src/test/conversions/htmlConversion.test.d.ts +1 -0
  76. package/types/src/test/conversions/nodeConversion.test.d.ts +1 -0
  77. package/types/src/test/conversions/testCases.d.ts +3 -0
  78. package/types/src/test/setupTestEnv.d.ts +1041 -0
@@ -0,0 +1,169 @@
1
+ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
+
3
+ exports[`Test getTextCursorPosition & setTextCursorPosition > Column 1`] = `
4
+ {
5
+ "block": {
6
+ "children": [],
7
+ "content": [
8
+ {
9
+ "styles": {},
10
+ "text": "Column Paragraph 0",
11
+ "type": "text",
12
+ },
13
+ ],
14
+ "id": "column-paragraph-0",
15
+ "props": {
16
+ "backgroundColor": "default",
17
+ "textAlignment": "left",
18
+ "textColor": "default",
19
+ },
20
+ "type": "paragraph",
21
+ },
22
+ "nextBlock": {
23
+ "children": [],
24
+ "content": [
25
+ {
26
+ "styles": {},
27
+ "text": "Column Paragraph 1",
28
+ "type": "text",
29
+ },
30
+ ],
31
+ "id": "column-paragraph-1",
32
+ "props": {
33
+ "backgroundColor": "default",
34
+ "textAlignment": "left",
35
+ "textColor": "default",
36
+ },
37
+ "type": "paragraph",
38
+ },
39
+ "parentBlock": {
40
+ "children": [
41
+ {
42
+ "children": [],
43
+ "content": [
44
+ {
45
+ "styles": {},
46
+ "text": "Column Paragraph 0",
47
+ "type": "text",
48
+ },
49
+ ],
50
+ "id": "column-paragraph-0",
51
+ "props": {
52
+ "backgroundColor": "default",
53
+ "textAlignment": "left",
54
+ "textColor": "default",
55
+ },
56
+ "type": "paragraph",
57
+ },
58
+ {
59
+ "children": [],
60
+ "content": [
61
+ {
62
+ "styles": {},
63
+ "text": "Column Paragraph 1",
64
+ "type": "text",
65
+ },
66
+ ],
67
+ "id": "column-paragraph-1",
68
+ "props": {
69
+ "backgroundColor": "default",
70
+ "textAlignment": "left",
71
+ "textColor": "default",
72
+ },
73
+ "type": "paragraph",
74
+ },
75
+ ],
76
+ "content": undefined,
77
+ "id": "column-0",
78
+ "props": {
79
+ "width": 1,
80
+ },
81
+ "type": "column",
82
+ },
83
+ "prevBlock": undefined,
84
+ }
85
+ `;
86
+
87
+ exports[`Test getTextCursorPosition & setTextCursorPosition > Column list 1`] = `
88
+ {
89
+ "block": {
90
+ "children": [],
91
+ "content": [
92
+ {
93
+ "styles": {},
94
+ "text": "Column Paragraph 0",
95
+ "type": "text",
96
+ },
97
+ ],
98
+ "id": "column-paragraph-0",
99
+ "props": {
100
+ "backgroundColor": "default",
101
+ "textAlignment": "left",
102
+ "textColor": "default",
103
+ },
104
+ "type": "paragraph",
105
+ },
106
+ "nextBlock": {
107
+ "children": [],
108
+ "content": [
109
+ {
110
+ "styles": {},
111
+ "text": "Column Paragraph 1",
112
+ "type": "text",
113
+ },
114
+ ],
115
+ "id": "column-paragraph-1",
116
+ "props": {
117
+ "backgroundColor": "default",
118
+ "textAlignment": "left",
119
+ "textColor": "default",
120
+ },
121
+ "type": "paragraph",
122
+ },
123
+ "parentBlock": {
124
+ "children": [
125
+ {
126
+ "children": [],
127
+ "content": [
128
+ {
129
+ "styles": {},
130
+ "text": "Column Paragraph 0",
131
+ "type": "text",
132
+ },
133
+ ],
134
+ "id": "column-paragraph-0",
135
+ "props": {
136
+ "backgroundColor": "default",
137
+ "textAlignment": "left",
138
+ "textColor": "default",
139
+ },
140
+ "type": "paragraph",
141
+ },
142
+ {
143
+ "children": [],
144
+ "content": [
145
+ {
146
+ "styles": {},
147
+ "text": "Column Paragraph 1",
148
+ "type": "text",
149
+ },
150
+ ],
151
+ "id": "column-paragraph-1",
152
+ "props": {
153
+ "backgroundColor": "default",
154
+ "textAlignment": "left",
155
+ "textColor": "default",
156
+ },
157
+ "type": "paragraph",
158
+ },
159
+ ],
160
+ "content": undefined,
161
+ "id": "column-0",
162
+ "props": {
163
+ "width": 1,
164
+ },
165
+ "type": "column",
166
+ },
167
+ "prevBlock": undefined,
168
+ }
169
+ `;