@blocknote/mantine 0.41.1 → 0.42.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 +233 -231
- package/dist/blocknote-mantine.js.map +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +16 -16
- package/src/blocknoteStyles.css +3 -5
- package/src/comments/Card.tsx +3 -14
- package/src/comments/Comment.tsx +3 -4
- package/src/popover/Popover.tsx +7 -1
- package/types/src/comments/Comment.d.ts +1 -0
package/dist/webpack-stats.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"builtAt":
|
|
1
|
+
{"builtAt":1763459643155,"assets":[{"name":"blocknote-mantine.cjs","size":19961},{"name":"blocknote-mantine.cjs.map","size":309786}],"chunks":[{"id":"ec22802","entry":true,"initial":true,"files":["blocknote-mantine.cjs"],"names":["blocknote-mantine"]}],"modules":[{"name":"./src/BlockNoteTheme.ts","size":2185,"chunks":["ec22802"]},{"name":"./src/toolbar/ToolbarButton.tsx","size":2674,"chunks":["ec22802"]},{"name":"./src/badge/Badge.tsx","size":1437,"chunks":["ec22802"]},{"name":"./src/comments/Card.tsx","size":1154,"chunks":["ec22802"]},{"name":"./src/comments/Comment.tsx","size":2082,"chunks":["ec22802"]},{"name":"./src/comments/Editor.tsx","size":1075,"chunks":["ec22802"]},{"name":"./src/form/TextInput.tsx","size":805,"chunks":["ec22802"]},{"name":"./src/menu/Menu.tsx","size":3140,"chunks":["ec22802"]},{"name":"./src/menu/Button.tsx","size":765,"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":784,"chunks":["ec22802"]},{"name":"./src/sideMenu/SideMenu.tsx","size":309,"chunks":["ec22802"]},{"name":"./src/sideMenu/SideMenuButton.tsx","size":773,"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":1911,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/SuggestionMenuLabel.tsx","size":227,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/SuggestionMenuLoader.tsx","size":233,"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/tableHandle/ExtendButton.tsx","size":333,"chunks":["ec22802"]},{"name":"./src/tableHandle/TableHandle.tsx","size":452,"chunks":["ec22802"]},{"name":"./src/toolbar/Toolbar.tsx","size":666,"chunks":["ec22802"]},{"name":"../../node_modules/.pnpm/react-icons@5.5.0_react@19.2.0/node_modules/react-icons/lib/iconContext.mjs","size":251,"chunks":["ec22802"]},{"name":"../../node_modules/.pnpm/react-icons@5.5.0_react@19.2.0/node_modules/react-icons/lib/iconBase.mjs","size":4003,"chunks":["ec22802"]},{"name":"../../node_modules/.pnpm/react-icons@5.5.0_react@19.2.0/node_modules/react-icons/hi/index.mjs","size":375,"chunks":["ec22802"]},{"name":"./src/toolbar/ToolbarSelect.tsx","size":1785,"chunks":["ec22802"]},{"name":"./src/components.tsx","size":1540,"chunks":["ec22802"]},{"name":"./src/BlockNoteView.tsx","size":1614,"chunks":["ec22802"]},{"name":"./src/defaultThemes.ts","size":2023,"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.42.1",
|
|
15
15
|
"files": [
|
|
16
16
|
"dist",
|
|
17
17
|
"types",
|
|
@@ -54,27 +54,27 @@
|
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@blocknote/core": "0.
|
|
58
|
-
"@blocknote/react": "0.
|
|
59
|
-
"react-icons": "^5.
|
|
57
|
+
"@blocknote/core": "0.42.1",
|
|
58
|
+
"@blocknote/react": "0.42.1",
|
|
59
|
+
"react-icons": "^5.5.0"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@types/react": "^19.
|
|
63
|
-
"@types/react-dom": "^19.
|
|
64
|
-
"@vitejs/plugin-react": "^4.
|
|
65
|
-
"eslint": "^8.
|
|
66
|
-
"react": "^19.
|
|
67
|
-
"react-dom": "^19.
|
|
68
|
-
"rimraf": "^5.0.
|
|
69
|
-
"rollup-plugin-webpack-stats": "^0.2.
|
|
70
|
-
"typescript": "^5.
|
|
71
|
-
"vite": "^5.
|
|
62
|
+
"@types/react": "^19.2.2",
|
|
63
|
+
"@types/react-dom": "^19.2.2",
|
|
64
|
+
"@vitejs/plugin-react": "^4.7.0",
|
|
65
|
+
"eslint": "^8.57.1",
|
|
66
|
+
"react": "^19.2.0",
|
|
67
|
+
"react-dom": "^19.2.0",
|
|
68
|
+
"rimraf": "^5.0.10",
|
|
69
|
+
"rollup-plugin-webpack-stats": "^0.2.6",
|
|
70
|
+
"typescript": "^5.9.3",
|
|
71
|
+
"vite": "^5.4.20",
|
|
72
72
|
"vite-plugin-eslint": "^1.8.1",
|
|
73
73
|
"vite-plugin-externalize-deps": "^0.8.0"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
|
-
"@mantine/core": "^8.3.
|
|
77
|
-
"@mantine/hooks": "^8.3.
|
|
76
|
+
"@mantine/core": "^8.3.4",
|
|
77
|
+
"@mantine/hooks": "^8.3.4",
|
|
78
78
|
"@mantine/utils": "^6.0.22",
|
|
79
79
|
"react": "^18.0 || ^19.0 || >= 19.0.0-rc",
|
|
80
80
|
"react-dom": "^18.0 || ^19.0 || >= 19.0.0-rc"
|
package/src/blocknoteStyles.css
CHANGED
|
@@ -74,11 +74,13 @@
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
/* Mantine Popover component base styles */
|
|
77
|
-
.bn-mantine .
|
|
77
|
+
.bn-mantine .bn-panel-popover,
|
|
78
|
+
.bn-mantine .bn-emoji-picker-popover {
|
|
78
79
|
background-color: transparent;
|
|
79
80
|
border: none;
|
|
80
81
|
border-radius: 0;
|
|
81
82
|
box-shadow: none;
|
|
83
|
+
display: flex;
|
|
82
84
|
padding: 0;
|
|
83
85
|
}
|
|
84
86
|
|
|
@@ -633,10 +635,6 @@
|
|
|
633
635
|
box-shadow: none;
|
|
634
636
|
}
|
|
635
637
|
|
|
636
|
-
.bn-mantine .bn-thread:not(.selected) {
|
|
637
|
-
cursor: pointer;
|
|
638
|
-
}
|
|
639
|
-
|
|
640
638
|
.bn-mantine .bn-thread-comments,
|
|
641
639
|
.bn-mantine .bn-thread-composer {
|
|
642
640
|
display: flex;
|
package/src/comments/Card.tsx
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { assertEmpty, mergeCSSClasses } from "@blocknote/core";
|
|
2
|
-
import { ComponentProps
|
|
2
|
+
import { ComponentProps } from "@blocknote/react";
|
|
3
3
|
import {
|
|
4
4
|
Card as MantineCard,
|
|
5
5
|
Divider as MantineDivider,
|
|
6
6
|
Text as MantineText,
|
|
7
7
|
} from "@mantine/core";
|
|
8
|
-
import { forwardRef
|
|
8
|
+
import { forwardRef } from "react";
|
|
9
9
|
|
|
10
10
|
export const Card = forwardRef<
|
|
11
11
|
HTMLDivElement,
|
|
@@ -24,24 +24,13 @@ export const Card = forwardRef<
|
|
|
24
24
|
|
|
25
25
|
assertEmpty(rest, false);
|
|
26
26
|
|
|
27
|
-
// Makes the card scroll into view when selected.
|
|
28
|
-
const scrollRef = useRef<HTMLDivElement>(null);
|
|
29
|
-
useEffect(() => {
|
|
30
|
-
if (selected) {
|
|
31
|
-
scrollRef.current?.scrollIntoView({
|
|
32
|
-
behavior: "smooth",
|
|
33
|
-
block: "center",
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
}, [selected]);
|
|
37
|
-
|
|
38
27
|
return (
|
|
39
28
|
<MantineCard
|
|
40
29
|
className={mergeCSSClasses(className, selected ? "selected" : "")}
|
|
41
30
|
onFocus={onFocus}
|
|
42
31
|
onBlur={onBlur}
|
|
43
32
|
tabIndex={tabIndex}
|
|
44
|
-
ref={
|
|
33
|
+
ref={ref}
|
|
45
34
|
>
|
|
46
35
|
{headerText && (
|
|
47
36
|
<MantineText className={"bn-header-text"}>{headerText}</MantineText>
|
package/src/comments/Comment.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { assertEmpty } from "@blocknote/core";
|
|
2
2
|
import { ComponentProps, mergeRefs, useDictionary } from "@blocknote/react";
|
|
3
3
|
import { Avatar, Group, Skeleton, Text } from "@mantine/core";
|
|
4
|
-
import {
|
|
4
|
+
import { useHover } from "@mantine/hooks";
|
|
5
5
|
import { forwardRef } from "react";
|
|
6
6
|
|
|
7
7
|
const AuthorInfo = forwardRef<
|
|
@@ -59,12 +59,12 @@ export const Comment = forwardRef<
|
|
|
59
59
|
timeString,
|
|
60
60
|
edited,
|
|
61
61
|
actions,
|
|
62
|
+
emojiPickerOpen,
|
|
62
63
|
children,
|
|
63
64
|
...rest
|
|
64
65
|
} = props;
|
|
65
66
|
|
|
66
67
|
const { hovered, ref: hoverRef } = useHover();
|
|
67
|
-
const { focused, ref: focusRef } = useFocusWithin();
|
|
68
68
|
const mergedRef = mergeRefs([ref, hoverRef]);
|
|
69
69
|
assertEmpty(rest, false);
|
|
70
70
|
|
|
@@ -73,13 +73,12 @@ export const Comment = forwardRef<
|
|
|
73
73
|
(showActions === true ||
|
|
74
74
|
showActions === undefined ||
|
|
75
75
|
(showActions === "hover" && hovered) ||
|
|
76
|
-
|
|
76
|
+
emojiPickerOpen);
|
|
77
77
|
|
|
78
78
|
return (
|
|
79
79
|
<Group pos="relative" ref={mergedRef} className={className}>
|
|
80
80
|
{doShowActions ? (
|
|
81
81
|
<Group
|
|
82
|
-
ref={focusRef}
|
|
83
82
|
style={{
|
|
84
83
|
position: "absolute",
|
|
85
84
|
right: 0,
|
package/src/popover/Popover.tsx
CHANGED
|
@@ -16,7 +16,13 @@ export const Popover = (
|
|
|
16
16
|
assertEmpty(rest);
|
|
17
17
|
|
|
18
18
|
return (
|
|
19
|
-
<MantinePopover
|
|
19
|
+
<MantinePopover
|
|
20
|
+
middlewares={{ size: { padding: 20 } }}
|
|
21
|
+
withinPortal={false}
|
|
22
|
+
opened={opened}
|
|
23
|
+
position={position}
|
|
24
|
+
zIndex={10000}
|
|
25
|
+
>
|
|
20
26
|
{children}
|
|
21
27
|
</MantinePopover>
|
|
22
28
|
);
|