@blocknote/mantine 0.51.4 → 0.52.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.cjs +1 -1
- package/dist/blocknote-mantine.cjs.map +1 -1
- package/dist/blocknote-mantine.js +357 -199
- package/dist/blocknote-mantine.js.map +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +9 -17
- package/src/attributionMarks/AttributionTooltip.tsx +23 -0
- package/src/comments/Comment.tsx +3 -3
- package/src/comments/Editor.tsx +9 -2
- package/src/components.tsx +12 -0
- package/src/popover/Popover.tsx +1 -1
- package/src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuLoader.tsx +1 -1
- package/src/versioning/Versioning.tsx +60 -0
- package/src/vite-env.d.ts +1 -0
- package/types/src/BlockNoteView.d.ts +1 -1
- package/types/src/attributionMarks/AttributionTooltip.d.ts +6 -0
- package/types/src/comments/Comment.d.ts +1 -1
- package/types/src/versioning/Versioning.d.ts +12 -0
package/dist/webpack-stats.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"builtAt":
|
|
1
|
+
{"builtAt":1784560153126,"assets":[{"name":"blocknote-mantine.cjs","size":21949},{"name":"blocknote-mantine.cjs.map","size":306940}],"chunks":[{"id":"ec22802","entry":true,"initial":true,"files":["blocknote-mantine.cjs"],"names":["blocknote-mantine"]}],"modules":[{"name":"./rolldown/runtime.js","size":1008,"chunks":["ec22802"]},{"name":"./src/BlockNoteTheme.ts","size":1876,"chunks":["ec22802"]},{"name":"./src/toolbar/ToolbarButton.tsx","size":2388,"chunks":["ec22802"]},{"name":"./src/badge/Badge.tsx","size":1389,"chunks":["ec22802"]},{"name":"./src/comments/Card.tsx","size":1250,"chunks":["ec22802"]},{"name":"./src/comments/Comment.tsx","size":2219,"chunks":["ec22802"]},{"name":"./src/comments/Editor.tsx","size":1095,"chunks":["ec22802"]},{"name":"./src/form/TextInput.tsx","size":834,"chunks":["ec22802"]},{"name":"./src/menu/Menu.tsx","size":3204,"chunks":["ec22802"]},{"name":"./src/menu/Button.tsx","size":680,"chunks":["ec22802"]},{"name":"./src/panel/Panel.tsx","size":1072,"chunks":["ec22802"]},{"name":"./src/panel/PanelButton.tsx","size":387,"chunks":["ec22802"]},{"name":"./src/panel/PanelFileInput.tsx","size":408,"chunks":["ec22802"]},{"name":"./src/panel/PanelTab.tsx","size":291,"chunks":["ec22802"]},{"name":"./src/panel/PanelTextInput.tsx","size":433,"chunks":["ec22802"]},{"name":"./src/popover/Popover.tsx","size":982,"chunks":["ec22802"]},{"name":"./src/sideMenu/SideMenu.tsx","size":355,"chunks":["ec22802"]},{"name":"./src/sideMenu/SideMenuButton.tsx","size":700,"chunks":["ec22802"]},{"name":"./src/attributionMarks/AttributionTooltip.tsx","size":486,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/SuggestionMenu.tsx","size":365,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/SuggestionMenuEmptyItem.tsx","size":478,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/SuggestionMenuItem.tsx","size":1836,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/SuggestionMenuLabel.tsx","size":336,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/SuggestionMenuLoader.tsx","size":417,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenu.tsx","size":435,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuEmptyItem.tsx","size":561,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuItem.tsx","size":818,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuLoader.tsx","size":508,"chunks":["ec22802"]},{"name":"./src/tableHandle/ExtendButton.tsx","size":386,"chunks":["ec22802"]},{"name":"./src/tableHandle/TableHandle.tsx","size":458,"chunks":["ec22802"]},{"name":"./src/toolbar/Toolbar.tsx","size":605,"chunks":["ec22802"]},{"name":"../../node_modules/.pnpm/react-icons@5.6.0_react@19.2.5/node_modules/react-icons/lib/iconContext.mjs","size":339,"chunks":["ec22802"]},{"name":"../../node_modules/.pnpm/react-icons@5.6.0_react@19.2.5/node_modules/react-icons/lib/iconBase.mjs","size":3702,"chunks":["ec22802"]},{"name":"../../node_modules/.pnpm/react-icons@5.6.0_react@19.2.5/node_modules/react-icons/hi/index.mjs","size":544,"chunks":["ec22802"]},{"name":"./src/toolbar/ToolbarSelect.tsx","size":1613,"chunks":["ec22802"]},{"name":"./src/versioning/Versioning.tsx","size":947,"chunks":["ec22802"]},{"name":"./src/components.tsx","size":1538,"chunks":["ec22802"]},{"name":"./src/BlockNoteView.tsx","size":1940,"chunks":["ec22802"]},{"name":"./src/defaultThemes.ts","size":1952,"chunks":["ec22802"]},{"name":"./src/index.tsx","size":0,"chunks":["ec22802"]}]}
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"directory": "packages/mantine"
|
|
12
12
|
},
|
|
13
13
|
"license": "MPL-2.0",
|
|
14
|
-
"version": "0.
|
|
14
|
+
"version": "0.52.1",
|
|
15
15
|
"files": [
|
|
16
16
|
"dist",
|
|
17
17
|
"types",
|
|
@@ -54,23 +54,21 @@
|
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@blocknote/core": "0.
|
|
58
|
-
"@blocknote/react": "0.
|
|
59
|
-
"react-icons": "^5.5.0"
|
|
57
|
+
"@blocknote/core": "^0.52.1",
|
|
58
|
+
"@blocknote/react": "^0.52.1"
|
|
60
59
|
},
|
|
61
60
|
"devDependencies": {
|
|
61
|
+
"react-icons": "^5.5.0",
|
|
62
62
|
"@types/react": "^19.2.3",
|
|
63
63
|
"@types/react-dom": "^19.2.3",
|
|
64
64
|
"@vitejs/plugin-react": "^6.0.1",
|
|
65
|
-
"eslint": "^8.57.1",
|
|
66
65
|
"react": "^19.2.5",
|
|
67
66
|
"react-dom": "^19.2.5",
|
|
68
67
|
"rimraf": "^5.0.10",
|
|
69
68
|
"rollup-plugin-webpack-stats": "^0.2.6",
|
|
70
69
|
"typescript": "^5.9.3",
|
|
71
|
-
"vite": "^
|
|
72
|
-
"vite-
|
|
73
|
-
"vite-plugin-externalize-deps": "^0.10.0"
|
|
70
|
+
"vite-plugin-externalize-deps": "^0.10.0",
|
|
71
|
+
"vite-plus": "^0.1.24"
|
|
74
72
|
},
|
|
75
73
|
"peerDependencies": {
|
|
76
74
|
"@mantine/core": "^8.3.11 || ^9.0.2",
|
|
@@ -78,16 +76,10 @@
|
|
|
78
76
|
"react": "^18.0 || ^19.0 || >= 19.0.0-rc",
|
|
79
77
|
"react-dom": "^18.0 || ^19.0 || >= 19.0.0-rc"
|
|
80
78
|
},
|
|
81
|
-
"eslintConfig": {
|
|
82
|
-
"extends": [
|
|
83
|
-
"../../.eslintrc.json"
|
|
84
|
-
]
|
|
85
|
-
},
|
|
86
79
|
"scripts": {
|
|
87
|
-
"dev": "
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"lint": "eslint src --max-warnings 0",
|
|
80
|
+
"dev": "vp dev",
|
|
81
|
+
"preview": "vp preview",
|
|
82
|
+
"lint": "vp lint src",
|
|
91
83
|
"clean": "rimraf dist && rimraf types"
|
|
92
84
|
}
|
|
93
85
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { assertEmpty, mergeCSSClasses } from "@blocknote/core";
|
|
2
|
+
import { ComponentProps } from "@blocknote/react";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
|
|
5
|
+
export const AttributionTooltip = forwardRef<
|
|
6
|
+
HTMLSpanElement,
|
|
7
|
+
ComponentProps["AttributionTooltip"]["Root"]
|
|
8
|
+
>((props, ref) => {
|
|
9
|
+
const { className, markClassName, backgroundColor, children, ...rest } =
|
|
10
|
+
props;
|
|
11
|
+
|
|
12
|
+
assertEmpty(rest);
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<span
|
|
16
|
+
className={mergeCSSClasses(className || "", markClassName || "")}
|
|
17
|
+
style={markClassName ? undefined : { backgroundColor }}
|
|
18
|
+
ref={ref}
|
|
19
|
+
>
|
|
20
|
+
{children}
|
|
21
|
+
</span>
|
|
22
|
+
);
|
|
23
|
+
});
|
package/src/comments/Comment.tsx
CHANGED
package/src/comments/Editor.tsx
CHANGED
|
@@ -13,8 +13,15 @@ export const Editor = forwardRef<
|
|
|
13
13
|
HTMLDivElement,
|
|
14
14
|
ComponentProps["Comments"]["Editor"]
|
|
15
15
|
>((props, ref) => {
|
|
16
|
-
const {
|
|
17
|
-
|
|
16
|
+
const {
|
|
17
|
+
className,
|
|
18
|
+
autoFocus,
|
|
19
|
+
onFocus,
|
|
20
|
+
onBlur,
|
|
21
|
+
editor: _editor,
|
|
22
|
+
editable,
|
|
23
|
+
...rest
|
|
24
|
+
} = props;
|
|
18
25
|
|
|
19
26
|
assertEmpty(rest, false);
|
|
20
27
|
|
package/src/components.tsx
CHANGED
|
@@ -21,6 +21,7 @@ import { PanelTextInput } from "./panel/PanelTextInput.js";
|
|
|
21
21
|
import { Popover, PopoverContent, PopoverTrigger } from "./popover/Popover.js";
|
|
22
22
|
import { SideMenu } from "./sideMenu/SideMenu.js";
|
|
23
23
|
import { SideMenuButton } from "./sideMenu/SideMenuButton.js";
|
|
24
|
+
import { AttributionTooltip } from "./attributionMarks/AttributionTooltip.js";
|
|
24
25
|
import { SuggestionMenu } from "./suggestionMenu/SuggestionMenu.js";
|
|
25
26
|
import { SuggestionMenuEmptyItem } from "./suggestionMenu/SuggestionMenuEmptyItem.js";
|
|
26
27
|
import { SuggestionMenuItem } from "./suggestionMenu/SuggestionMenuItem.js";
|
|
@@ -35,6 +36,10 @@ import { TableHandle } from "./tableHandle/TableHandle.js";
|
|
|
35
36
|
import { Toolbar } from "./toolbar/Toolbar.js";
|
|
36
37
|
import { ToolbarButton } from "./toolbar/ToolbarButton.js";
|
|
37
38
|
import { ToolbarSelect } from "./toolbar/ToolbarSelect.js";
|
|
39
|
+
import {
|
|
40
|
+
Sidebar as VersioningSidebar,
|
|
41
|
+
Snapshot as VersioningSnapshot,
|
|
42
|
+
} from "./versioning/Versioning.js";
|
|
38
43
|
|
|
39
44
|
export const components: Components = {
|
|
40
45
|
FormattingToolbar: {
|
|
@@ -71,6 +76,9 @@ export const components: Components = {
|
|
|
71
76
|
Label: SuggestionMenuLabel,
|
|
72
77
|
Loader: SuggestionMenuLoader,
|
|
73
78
|
},
|
|
79
|
+
AttributionTooltip: {
|
|
80
|
+
Root: AttributionTooltip,
|
|
81
|
+
},
|
|
74
82
|
TableHandle: {
|
|
75
83
|
Root: TableHandle,
|
|
76
84
|
ExtendButton: ExtendButton,
|
|
@@ -111,4 +119,8 @@ export const components: Components = {
|
|
|
111
119
|
CardSection,
|
|
112
120
|
ExpandSectionsPrompt,
|
|
113
121
|
},
|
|
122
|
+
Versioning: {
|
|
123
|
+
Sidebar: VersioningSidebar,
|
|
124
|
+
Snapshot: VersioningSnapshot,
|
|
125
|
+
},
|
|
114
126
|
};
|
package/src/popover/Popover.tsx
CHANGED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { assertEmpty, mergeCSSClasses } from "@blocknote/core";
|
|
2
|
+
import { ComponentProps } from "@blocknote/react";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
|
|
5
|
+
export const Sidebar = forwardRef<
|
|
6
|
+
HTMLDivElement,
|
|
7
|
+
ComponentProps["Versioning"]["Sidebar"]
|
|
8
|
+
>((props, ref) => {
|
|
9
|
+
const { className, children, ...rest } = props;
|
|
10
|
+
|
|
11
|
+
assertEmpty(rest, false);
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<div className={mergeCSSClasses(className)} ref={ref}>
|
|
15
|
+
{children}
|
|
16
|
+
</div>
|
|
17
|
+
);
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export const Snapshot = forwardRef<
|
|
21
|
+
HTMLDivElement,
|
|
22
|
+
ComponentProps["Versioning"]["Snapshot"]
|
|
23
|
+
>((props, ref) => {
|
|
24
|
+
const {
|
|
25
|
+
className,
|
|
26
|
+
selected,
|
|
27
|
+
comparing,
|
|
28
|
+
onClick,
|
|
29
|
+
actions,
|
|
30
|
+
children,
|
|
31
|
+
...rest
|
|
32
|
+
} = props;
|
|
33
|
+
|
|
34
|
+
assertEmpty(rest, false);
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<div
|
|
38
|
+
className={mergeCSSClasses(
|
|
39
|
+
className,
|
|
40
|
+
selected ? "selected" : "",
|
|
41
|
+
comparing ? "comparing" : "",
|
|
42
|
+
)}
|
|
43
|
+
onClick={onClick}
|
|
44
|
+
ref={ref}
|
|
45
|
+
>
|
|
46
|
+
{children}
|
|
47
|
+
{actions && (
|
|
48
|
+
// Isolate the actions area so clicks on the menu (trigger and items,
|
|
49
|
+
// which render inline rather than in a portal) don't bubble to the
|
|
50
|
+
// row's select handler.
|
|
51
|
+
<div
|
|
52
|
+
className={"bn-snapshot-menu"}
|
|
53
|
+
onClick={(event) => event.stopPropagation()}
|
|
54
|
+
>
|
|
55
|
+
{actions}
|
|
56
|
+
</div>
|
|
57
|
+
)}
|
|
58
|
+
</div>
|
|
59
|
+
);
|
|
60
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="vite-plus/client" />
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const Comment: import("react").ForwardRefExoticComponent<{
|
|
2
2
|
className?: string;
|
|
3
3
|
children?: import("react").ReactNode;
|
|
4
|
-
authorInfo: "loading" | import("@blocknote/core
|
|
4
|
+
authorInfo: "loading" | import("@blocknote/core").User;
|
|
5
5
|
timeString: string;
|
|
6
6
|
edited: boolean;
|
|
7
7
|
actions?: import("react").ReactNode;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const Sidebar: import("react").ForwardRefExoticComponent<{
|
|
2
|
+
className?: string;
|
|
3
|
+
children?: import("react").ReactNode;
|
|
4
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
|
+
export declare const Snapshot: import("react").ForwardRefExoticComponent<{
|
|
6
|
+
className?: string;
|
|
7
|
+
selected?: boolean;
|
|
8
|
+
comparing?: boolean;
|
|
9
|
+
onClick?: () => void;
|
|
10
|
+
actions?: import("react").ReactNode;
|
|
11
|
+
children?: import("react").ReactNode;
|
|
12
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|