@blocknote/xl-multi-column 0.42.3 → 0.44.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.cjs +1 -1
- package/dist/blocknote-xl-multi-column.cjs.map +1 -1
- package/dist/blocknote-xl-multi-column.js +158 -155
- package/dist/blocknote-xl-multi-column.js.map +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +3 -3
- package/src/extensions/ColumnResize/ColumnResizeExtension.ts +7 -3
- package/src/extensions/SuggestionMenu/getMultiColumnSlashMenuItems.tsx +3 -3
package/dist/webpack-stats.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"builtAt":
|
|
1
|
+
{"builtAt":1764672322172,"assets":[{"name":"blocknote-xl-multi-column.cjs","size":20696},{"name":"blocknote-xl-multi-column.cjs.map","size":3792252}],"chunks":[{"id":"a1ee98a","entry":true,"initial":true,"files":["blocknote-xl-multi-column.cjs"],"names":["blocknote-xl-multi-column"]}],"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":8414,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/Column.ts","size":2591,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/ColumnList.ts","size":1144,"chunks":["a1ee98a"]},{"name":"./src/blocks/Columns/index.ts","size":316,"chunks":["a1ee98a"]},{"name":"./src/blocks/schema.ts","size":295,"chunks":["a1ee98a"]},{"name":"./src/extensions/DropCursor/MultiColumnDropCursorPlugin.ts","size":11843,"chunks":["a1ee98a"]},{"name":"../../node_modules/.pnpm/react-icons@5.5.0_react@19.2.0/node_modules/react-icons/lib/iconContext.mjs","size":251,"chunks":["a1ee98a"]},{"name":"../../node_modules/.pnpm/react-icons@5.5.0_react@19.2.0/node_modules/react-icons/lib/iconBase.mjs","size":4003,"chunks":["a1ee98a"]},{"name":"../../node_modules/.pnpm/react-icons@5.5.0_react@19.2.0/node_modules/react-icons/tb/index.mjs","size":708,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/getMultiColumnSlashMenuItems.tsx","size":2105,"chunks":["a1ee98a"]},{"name":"./src/index.ts","size":0,"chunks":["a1ee98a"]}]}
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"directory": "packages/xl-multi-column"
|
|
10
10
|
},
|
|
11
11
|
"license": "GPL-3.0 OR PROPRIETARY",
|
|
12
|
-
"version": "0.
|
|
12
|
+
"version": "0.44.0",
|
|
13
13
|
"files": [
|
|
14
14
|
"dist",
|
|
15
15
|
"types",
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@blocknote/core": "0.
|
|
46
|
-
"@blocknote/react": "0.
|
|
45
|
+
"@blocknote/core": "0.44.0",
|
|
46
|
+
"@blocknote/react": "0.44.0",
|
|
47
47
|
"@tiptap/core": "^3.11.0",
|
|
48
48
|
"prosemirror-model": "^1.25.4",
|
|
49
49
|
"prosemirror-state": "^1.4.4",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BlockNoteEditor, getNodeById } from "@blocknote/core";
|
|
2
|
+
import { SideMenuExtension } from "@blocknote/core/extensions";
|
|
2
3
|
import { Extension } from "@tiptap/core";
|
|
3
4
|
import { Node } from "prosemirror-model";
|
|
4
5
|
import { Plugin, PluginKey, PluginView } from "prosemirror-state";
|
|
@@ -189,7 +190,7 @@ class ColumnResizePluginView implements PluginView {
|
|
|
189
190
|
this.view.state.tr.setMeta(columnResizePluginKey, newState),
|
|
190
191
|
);
|
|
191
192
|
|
|
192
|
-
this.editor.
|
|
193
|
+
this.editor.getExtension(SideMenuExtension)?.freezeMenu();
|
|
193
194
|
};
|
|
194
195
|
|
|
195
196
|
// If the plugin isn't in a resize state, we want to update it to either a
|
|
@@ -222,7 +223,10 @@ class ColumnResizePluginView implements PluginView {
|
|
|
222
223
|
|
|
223
224
|
// Since the resize bar overlaps the side menu, we don't want to show it
|
|
224
225
|
// if the side menu is already open.
|
|
225
|
-
if (
|
|
226
|
+
if (
|
|
227
|
+
newState.type === "hover" &&
|
|
228
|
+
this.editor.getExtension(SideMenuExtension)?.store.state?.show
|
|
229
|
+
) {
|
|
226
230
|
return;
|
|
227
231
|
}
|
|
228
232
|
|
|
@@ -297,7 +301,7 @@ class ColumnResizePluginView implements PluginView {
|
|
|
297
301
|
this.view.state.tr.setMeta(columnResizePluginKey, newState),
|
|
298
302
|
);
|
|
299
303
|
|
|
300
|
-
this.editor.
|
|
304
|
+
this.editor.getExtension(SideMenuExtension)?.unfreezeMenu();
|
|
301
305
|
};
|
|
302
306
|
|
|
303
307
|
destroy() {
|
|
@@ -2,9 +2,9 @@ import {
|
|
|
2
2
|
BlockNoteEditor,
|
|
3
3
|
BlockSchema,
|
|
4
4
|
InlineContentSchema,
|
|
5
|
-
insertOrUpdateBlock,
|
|
6
5
|
StyleSchema,
|
|
7
6
|
} from "@blocknote/core";
|
|
7
|
+
import { insertOrUpdateBlockForSlashMenu } from "@blocknote/core/extensions";
|
|
8
8
|
import { DefaultReactSuggestionItem } from "@blocknote/react";
|
|
9
9
|
import { TbColumns2, TbColumns3 } from "react-icons/tb";
|
|
10
10
|
|
|
@@ -40,7 +40,7 @@ export function getMultiColumnSlashMenuItems<
|
|
|
40
40
|
...getMultiColumnDictionary(editor).slash_menu.two_columns,
|
|
41
41
|
icon: <TbColumns2 size={18} />,
|
|
42
42
|
onItemClick: () => {
|
|
43
|
-
|
|
43
|
+
insertOrUpdateBlockForSlashMenu(editor, {
|
|
44
44
|
type: "columnList",
|
|
45
45
|
children: [
|
|
46
46
|
{
|
|
@@ -67,7 +67,7 @@ export function getMultiColumnSlashMenuItems<
|
|
|
67
67
|
...getMultiColumnDictionary(editor).slash_menu.three_columns,
|
|
68
68
|
icon: <TbColumns3 size={18} />,
|
|
69
69
|
onItemClick: () => {
|
|
70
|
-
|
|
70
|
+
insertOrUpdateBlockForSlashMenu(editor, {
|
|
71
71
|
type: "columnList",
|
|
72
72
|
children: [
|
|
73
73
|
{
|