@blocknote/mantine 0.17.1 → 0.18.1
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-mantine.js +552 -1167
- package/dist/blocknote-mantine.js.map +1 -1
- package/dist/blocknote-mantine.umd.cjs +1 -30
- package/dist/blocknote-mantine.umd.cjs.map +1 -1
- package/dist/style.css +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +6 -8
- package/src/index.tsx +2 -0
- package/src/style.css +20 -3
- package/src/tableHandle/ExtendButton.tsx +27 -0
- package/types/src/tableHandle/ExtendButton.d.ts +7 -0
package/dist/webpack-stats.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"builtAt":
|
|
1
|
+
{"builtAt":1730290275063,"assets":[{"name":"blocknote-mantine.umd.cjs","size":17681},{"name":"blocknote-mantine.umd.cjs.map","size":297195}],"chunks":[{"id":"ec22802","entry":true,"initial":true,"files":["blocknote-mantine.umd.cjs"],"names":["index"]}],"modules":[{"name":"./src/BlockNoteTheme.ts","size":2185,"chunks":["ec22802"]},{"name":"./src/form/TextInput.tsx","size":575,"chunks":["ec22802"]},{"name":"../../node_modules/react-icons/lib/iconContext.mjs","size":251,"chunks":["ec22802"]},{"name":"../../node_modules/react-icons/lib/iconBase.mjs","size":4014,"chunks":["ec22802"]},{"name":"../../node_modules/react-icons/hi/index.mjs","size":744,"chunks":["ec22802"]},{"name":"./src/menu/Menu.tsx","size":4057,"chunks":["ec22802"]},{"name":"./src/panel/Panel.tsx","size":1015,"chunks":["ec22802"]},{"name":"./src/panel/PanelButton.tsx","size":345,"chunks":["ec22802"]},{"name":"./src/panel/PanelFileInput.tsx","size":367,"chunks":["ec22802"]},{"name":"./src/panel/PanelTab.tsx","size":209,"chunks":["ec22802"]},{"name":"./src/panel/PanelTextInput.tsx","size":392,"chunks":["ec22802"]},{"name":"./src/popover/Popover.tsx","size":738,"chunks":["ec22802"]},{"name":"./src/sideMenu/SideMenu.tsx","size":309,"chunks":["ec22802"]},{"name":"./src/sideMenu/SideMenuButton.tsx","size":773,"chunks":["ec22802"]},{"name":"./src/style.css","size":0,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenu.tsx","size":361,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuEmptyItem.tsx","size":436,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuItem.tsx","size":855,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuLoader.tsx","size":385,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/SuggestionMenu.tsx","size":307,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/SuggestionMenuEmptyItem.tsx","size":338,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/SuggestionMenuItem.tsx","size":1822,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/SuggestionMenuLabel.tsx","size":227,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/SuggestionMenuLoader.tsx","size":283,"chunks":["ec22802"]},{"name":"./src/tableHandle/TableHandle.tsx","size":452,"chunks":["ec22802"]},{"name":"./src/tableHandle/ExtendButton.tsx","size":333,"chunks":["ec22802"]},{"name":"./src/toolbar/Toolbar.tsx","size":562,"chunks":["ec22802"]},{"name":"./src/toolbar/ToolbarButton.tsx","size":2229,"chunks":["ec22802"]},{"name":"./src/toolbar/ToolbarSelect.tsx","size":1785,"chunks":["ec22802"]},{"name":"./src/defaultThemes.ts","size":3405,"chunks":["ec22802"]},{"name":"./src/index.tsx","size":2700,"chunks":["ec22802"]}]}
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"*.css"
|
|
7
7
|
],
|
|
8
8
|
"license": "MPL-2.0",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.18.1",
|
|
10
10
|
"files": [
|
|
11
11
|
"dist",
|
|
12
12
|
"types",
|
|
@@ -51,13 +51,11 @@
|
|
|
51
51
|
"clean": "rimraf dist && rimraf types"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@blocknote/core": "^0.
|
|
55
|
-
"@blocknote/react": "^0.
|
|
54
|
+
"@blocknote/core": "^0.18.0",
|
|
55
|
+
"@blocknote/react": "^0.18.1",
|
|
56
56
|
"@mantine/core": "^7.10.1",
|
|
57
57
|
"@mantine/hooks": "^7.10.1",
|
|
58
58
|
"@mantine/utils": "^6.0.21",
|
|
59
|
-
"react": "^18",
|
|
60
|
-
"react-dom": "^18",
|
|
61
59
|
"react-icons": "^5.2.1"
|
|
62
60
|
},
|
|
63
61
|
"devDependencies": {
|
|
@@ -74,8 +72,8 @@
|
|
|
74
72
|
"vite-plugin-externalize-deps": "^0.8.0"
|
|
75
73
|
},
|
|
76
74
|
"peerDependencies": {
|
|
77
|
-
"react": "^18",
|
|
78
|
-
"react-dom": "^18"
|
|
75
|
+
"react": "^18.0 || ^19.0 || >= 19.0.0-rc",
|
|
76
|
+
"react-dom": "^18.0 || ^19.0 || >= 19.0.0-rc"
|
|
79
77
|
},
|
|
80
78
|
"eslintConfig": {
|
|
81
79
|
"extends": [
|
|
@@ -86,5 +84,5 @@
|
|
|
86
84
|
"access": "public",
|
|
87
85
|
"registry": "https://registry.npmjs.org/"
|
|
88
86
|
},
|
|
89
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "c66118d464ef240c531aa6f9d49706ec6aaa49f8"
|
|
90
88
|
}
|
package/src/index.tsx
CHANGED
|
@@ -47,6 +47,7 @@ import { SuggestionMenuItem } from "./suggestionMenu/SuggestionMenuItem.js";
|
|
|
47
47
|
import { SuggestionMenuLabel } from "./suggestionMenu/SuggestionMenuLabel.js";
|
|
48
48
|
import { SuggestionMenuLoader } from "./suggestionMenu/SuggestionMenuLoader.js";
|
|
49
49
|
import { TableHandle } from "./tableHandle/TableHandle.js";
|
|
50
|
+
import { ExtendButton } from "./tableHandle/ExtendButton.js";
|
|
50
51
|
import { Toolbar } from "./toolbar/Toolbar.js";
|
|
51
52
|
import { ToolbarButton } from "./toolbar/ToolbarButton.js";
|
|
52
53
|
import { ToolbarSelect } from "./toolbar/ToolbarSelect.js";
|
|
@@ -90,6 +91,7 @@ export const components: Components = {
|
|
|
90
91
|
},
|
|
91
92
|
TableHandle: {
|
|
92
93
|
Root: TableHandle,
|
|
94
|
+
ExtendButton: ExtendButton,
|
|
93
95
|
},
|
|
94
96
|
Generic: {
|
|
95
97
|
Form: {
|
package/src/style.css
CHANGED
|
@@ -396,7 +396,7 @@
|
|
|
396
396
|
}
|
|
397
397
|
|
|
398
398
|
.bn-mantine .bn-grid-suggestion-menu-empty-item,
|
|
399
|
-
.bn-mantine .bn-grid-suggestion-menu-loader{
|
|
399
|
+
.bn-mantine .bn-grid-suggestion-menu-loader {
|
|
400
400
|
align-items: center;
|
|
401
401
|
color: var(--bn-colors-menu-text);
|
|
402
402
|
display: flex;
|
|
@@ -488,7 +488,8 @@
|
|
|
488
488
|
}
|
|
489
489
|
|
|
490
490
|
/* Table Handle styling */
|
|
491
|
-
.bn-mantine .bn-table-handle
|
|
491
|
+
.bn-mantine .bn-table-handle,
|
|
492
|
+
.bn-mantine .bn-extend-button {
|
|
492
493
|
align-items: center;
|
|
493
494
|
background-color: var(--bn-colors-menu-background);
|
|
494
495
|
border: var(--bn-border);
|
|
@@ -508,10 +509,26 @@
|
|
|
508
509
|
}
|
|
509
510
|
|
|
510
511
|
.bn-mantine .bn-table-handle:hover,
|
|
511
|
-
.bn-mantine .bn-table-handle-dragging
|
|
512
|
+
.bn-mantine .bn-table-handle-dragging,
|
|
513
|
+
.bn-mantine .bn-extend-button:hover,
|
|
514
|
+
.bn-mantine .bn-extend-button-editing {
|
|
512
515
|
background-color: var(--bn-colors-hovered-background);
|
|
513
516
|
}
|
|
514
517
|
|
|
518
|
+
.bn-mantine .bn-extend-button-add-remove-columns {
|
|
519
|
+
height: 100%;
|
|
520
|
+
width: 18px;
|
|
521
|
+
margin-left: 4px;
|
|
522
|
+
cursor: col-resize;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
.bn-mantine .bn-extend-button-add-remove-rows {
|
|
526
|
+
height: 18px;
|
|
527
|
+
width: 100%;
|
|
528
|
+
margin-top: 4px;
|
|
529
|
+
cursor: row-resize;
|
|
530
|
+
}
|
|
531
|
+
|
|
515
532
|
/* Drag Handle & Table Handle Menu styling */
|
|
516
533
|
.bn-mantine .bn-drag-handle-menu {
|
|
517
534
|
overflow: visible;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Button as MantineButton } from "@mantine/core";
|
|
2
|
+
|
|
3
|
+
import { assertEmpty } from "@blocknote/core";
|
|
4
|
+
import { ComponentProps } from "@blocknote/react";
|
|
5
|
+
import { forwardRef } from "react";
|
|
6
|
+
|
|
7
|
+
export const ExtendButton = forwardRef<
|
|
8
|
+
HTMLButtonElement,
|
|
9
|
+
ComponentProps["TableHandle"]["ExtendButton"]
|
|
10
|
+
>((props, ref) => {
|
|
11
|
+
const { children, className, onMouseDown, onClick, ...rest } = props;
|
|
12
|
+
|
|
13
|
+
// false, because rest props can be added by mantine when button is used as a trigger
|
|
14
|
+
// assertEmpty in this case is only used at typescript level, not runtime level
|
|
15
|
+
assertEmpty(rest, false);
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<MantineButton
|
|
19
|
+
className={className}
|
|
20
|
+
ref={ref}
|
|
21
|
+
onMouseDown={onMouseDown}
|
|
22
|
+
onClick={onClick}
|
|
23
|
+
{...rest}>
|
|
24
|
+
{children}
|
|
25
|
+
</MantineButton>
|
|
26
|
+
);
|
|
27
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const ExtendButton: import("react").ForwardRefExoticComponent<{
|
|
3
|
+
className?: string | undefined;
|
|
4
|
+
onClick: (e: import("react").MouseEvent<Element, MouseEvent>) => void;
|
|
5
|
+
onMouseDown: (e: import("react").MouseEvent<Element, MouseEvent>) => void;
|
|
6
|
+
children: import("react").ReactNode;
|
|
7
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|