@blocknote/mantine 0.15.2 → 0.15.4
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 +37 -31
- package/dist/blocknote-mantine.js.map +1 -1
- package/dist/blocknote-mantine.umd.cjs +4 -4
- 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 +4 -4
- package/src/style.css +2 -1
- package/src/suggestionMenu/SuggestionMenuItem.tsx +4 -1
- package/src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuItem.tsx +4 -1
- package/types/src/form/TextInput.d.ts +5 -4
- package/types/src/index.d.ts +2 -2
- package/types/src/menu/Menu.d.ts +9 -8
- package/types/src/panel/Panel.d.ts +2 -1
- package/types/src/panel/PanelButton.d.ts +3 -2
- package/types/src/panel/PanelFileInput.d.ts +2 -1
- package/types/src/panel/PanelTab.d.ts +2 -1
- package/types/src/panel/PanelTextInput.d.ts +3 -2
- package/types/src/popover/Popover.d.ts +2 -1
- package/types/src/sideMenu/SideMenu.d.ts +2 -1
- package/types/src/sideMenu/SideMenuButton.d.ts +7 -6
- package/types/src/suggestionMenu/SuggestionMenu.d.ts +2 -1
- package/types/src/suggestionMenu/SuggestionMenuEmptyItem.d.ts +2 -1
- package/types/src/suggestionMenu/SuggestionMenuItem.d.ts +2 -1
- package/types/src/suggestionMenu/SuggestionMenuLabel.d.ts +2 -1
- package/types/src/suggestionMenu/SuggestionMenuLoader.d.ts +2 -1
- package/types/src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenu.d.ts +2 -1
- package/types/src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuEmptyItem.d.ts +2 -1
- package/types/src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuItem.d.ts +2 -1
- package/types/src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuLoader.d.ts +2 -1
- package/types/src/tableHandle/TableHandle.d.ts +5 -4
- package/types/src/toolbar/Toolbar.d.ts +5 -4
- package/types/src/toolbar/ToolbarButton.d.ts +1 -0
- package/types/src/toolbar/ToolbarSelect.d.ts +4 -3
package/dist/webpack-stats.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"builtAt":
|
|
1
|
+
{"builtAt":1723137042847,"assets":[{"name":"blocknote-mantine.umd.cjs","size":31424},{"name":"blocknote-mantine.umd.cjs.map","size":359791}],"chunks":[{"id":"ec22802","entry":true,"initial":true,"files":["blocknote-mantine.umd.cjs"],"names":["index"]}],"modules":[{"name":"../../node_modules/react/jsx-runtime.js?commonjs-module","size":31,"chunks":["ec22802"]},{"name":"../../node_modules/react/cjs/react-jsx-runtime.production.min.js?commonjs-exports","size":40,"chunks":["ec22802"]},{"name":"../../node_modules/react/cjs/react-jsx-runtime.production.min.js","size":1200,"chunks":["ec22802"]},{"name":"../../node_modules/react/cjs/react-jsx-runtime.development.js?commonjs-exports","size":37,"chunks":["ec22802"]},{"name":"../../node_modules/react/cjs/react-jsx-runtime.development.js","size":43843,"chunks":["ec22802"]},{"name":"../../node_modules/react/jsx-runtime.js","size":225,"chunks":["ec22802"]},{"name":"./src/BlockNoteTheme.ts","size":2185,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenu.tsx","size":368,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuEmptyItem.tsx","size":450,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuItem.tsx","size":862,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuLoader.tsx","size":392,"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":4155,"chunks":["ec22802"]},{"name":"./src/panel/Panel.tsx","size":1057,"chunks":["ec22802"]},{"name":"./src/panel/PanelButton.tsx","size":352,"chunks":["ec22802"]},{"name":"./src/panel/PanelFileInput.tsx","size":374,"chunks":["ec22802"]},{"name":"./src/panel/PanelTab.tsx","size":216,"chunks":["ec22802"]},{"name":"./src/panel/PanelTextInput.tsx","size":399,"chunks":["ec22802"]},{"name":"./src/popover/Popover.tsx","size":759,"chunks":["ec22802"]},{"name":"./src/sideMenu/SideMenu.tsx","size":316,"chunks":["ec22802"]},{"name":"./src/sideMenu/SideMenuButton.tsx","size":787,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/SuggestionMenu.tsx","size":314,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/SuggestionMenuEmptyItem.tsx","size":352,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/SuggestionMenuItem.tsx","size":1871,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/SuggestionMenuLabel.tsx","size":234,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/SuggestionMenuLoader.tsx","size":290,"chunks":["ec22802"]},{"name":"./src/tableHandle/TableHandle.tsx","size":459,"chunks":["ec22802"]},{"name":"./src/form/TextInput.tsx","size":582,"chunks":["ec22802"]},{"name":"./src/toolbar/Toolbar.tsx","size":569,"chunks":["ec22802"]},{"name":"./src/toolbar/ToolbarButton.tsx","size":2278,"chunks":["ec22802"]},{"name":"./src/toolbar/ToolbarSelect.tsx","size":1841,"chunks":["ec22802"]},{"name":"./src/style.css","size":0,"chunks":["ec22802"]},{"name":"./src/defaultThemes.ts","size":3405,"chunks":["ec22802"]},{"name":"./src/index.tsx","size":2710,"chunks":["ec22802"]}]}
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"*.css"
|
|
7
7
|
],
|
|
8
8
|
"license": "MPL-2.0",
|
|
9
|
-
"version": "0.15.
|
|
9
|
+
"version": "0.15.4",
|
|
10
10
|
"files": [
|
|
11
11
|
"dist",
|
|
12
12
|
"types",
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"clean": "rimraf dist && rimraf types"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@blocknote/core": "^0.15.
|
|
55
|
-
"@blocknote/react": "^0.15.
|
|
54
|
+
"@blocknote/core": "^0.15.4",
|
|
55
|
+
"@blocknote/react": "^0.15.4",
|
|
56
56
|
"@mantine/core": "^7.10.1",
|
|
57
57
|
"@mantine/hooks": "^7.10.1",
|
|
58
58
|
"@mantine/utils": "^6.0.21",
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"access": "public",
|
|
87
87
|
"registry": "https://registry.npmjs.org/"
|
|
88
88
|
},
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "74f4ec4061d3441930d146844785d77c03b05d08"
|
|
90
90
|
}
|
package/src/style.css
CHANGED
|
@@ -300,6 +300,7 @@
|
|
|
300
300
|
box-sizing: border-box;
|
|
301
301
|
color: var(--bn-colors-menu-text);
|
|
302
302
|
height: fit-content;
|
|
303
|
+
max-height: inherit;
|
|
303
304
|
overflow-y: auto;
|
|
304
305
|
padding: 2px;
|
|
305
306
|
}
|
|
@@ -371,7 +372,7 @@
|
|
|
371
372
|
gap: 7px;
|
|
372
373
|
height: fit-content;
|
|
373
374
|
justify-items: center;
|
|
374
|
-
max-height:
|
|
375
|
+
max-height: inherit;
|
|
375
376
|
overflow-y: auto;
|
|
376
377
|
padding: 20px;
|
|
377
378
|
}
|
|
@@ -25,7 +25,10 @@ export const SuggestionMenuItem = forwardRef<
|
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
const overflow = elementOverflow(
|
|
28
|
+
const overflow = elementOverflow(
|
|
29
|
+
itemRef.current,
|
|
30
|
+
document.querySelector(".bn-suggestion-menu")!
|
|
31
|
+
);
|
|
29
32
|
|
|
30
33
|
if (overflow === "top") {
|
|
31
34
|
itemRef.current.scrollIntoView(true);
|
|
@@ -19,7 +19,10 @@ export const GridSuggestionMenuItem = forwardRef<
|
|
|
19
19
|
return;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
const overflow = elementOverflow(
|
|
22
|
+
const overflow = elementOverflow(
|
|
23
|
+
itemRef.current,
|
|
24
|
+
document.querySelector(".bn-grid-suggestion-menu")!
|
|
25
|
+
);
|
|
23
26
|
|
|
24
27
|
if (overflow === "top") {
|
|
25
28
|
itemRef.current.scrollIntoView(true);
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export declare const TextInput: import("react").ForwardRefExoticComponent<{
|
|
2
|
-
className?: string;
|
|
3
|
+
className?: string | undefined;
|
|
3
4
|
name: string;
|
|
4
|
-
label?: string;
|
|
5
|
+
label?: string | undefined;
|
|
5
6
|
icon: import("react").ReactNode;
|
|
6
|
-
autoFocus?: boolean;
|
|
7
|
+
autoFocus?: boolean | undefined;
|
|
7
8
|
placeholder: string;
|
|
8
9
|
value: string;
|
|
9
10
|
onKeyDown: (event: import("react").KeyboardEvent<HTMLInputElement>) => void;
|
|
10
11
|
onChange: (event: import("react").ChangeEvent<HTMLInputElement>) => void;
|
|
11
|
-
onSubmit?: () => void;
|
|
12
|
+
onSubmit?: (() => void) | undefined;
|
|
12
13
|
} & import("react").RefAttributes<HTMLInputElement>>;
|
package/types/src/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { InlineContentSchema, StyleSchema } from "@blocknote/core";
|
|
2
2
|
import { BlockNoteViewRaw, Components } from "@blocknote/react";
|
|
3
3
|
import { ComponentProps } from "react";
|
|
4
4
|
import { Theme } from "./BlockNoteTheme";
|
|
@@ -6,7 +6,7 @@ import "./style.css";
|
|
|
6
6
|
export * from "./BlockNoteTheme";
|
|
7
7
|
export * from "./defaultThemes";
|
|
8
8
|
export declare const components: Components;
|
|
9
|
-
export declare const BlockNoteView: <BSchema extends
|
|
9
|
+
export declare const BlockNoteView: <BSchema extends Record<string, import("@blocknote/core").BlockConfig>, ISchema extends InlineContentSchema, SSchema extends StyleSchema>(props: Omit<ComponentProps<typeof BlockNoteViewRaw<BSchema, ISchema, SSchema>>, "theme"> & {
|
|
10
10
|
theme?: "light" | "dark" | Theme | {
|
|
11
11
|
light: Theme;
|
|
12
12
|
dark: Theme;
|
package/types/src/menu/Menu.d.ts
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { ComponentProps } from "@blocknote/react";
|
|
2
3
|
export declare const Menu: (props: ComponentProps["Generic"]["Menu"]["Root"]) => import("react/jsx-runtime").JSX.Element;
|
|
3
4
|
export declare const MenuItem: import("react").ForwardRefExoticComponent<{
|
|
4
|
-
className?: string;
|
|
5
|
+
className?: string | undefined;
|
|
5
6
|
children?: import("react").ReactNode;
|
|
6
|
-
subTrigger?: boolean;
|
|
7
|
+
subTrigger?: boolean | undefined;
|
|
7
8
|
icon?: import("react").ReactNode;
|
|
8
|
-
checked?: boolean;
|
|
9
|
-
onClick?: () => void;
|
|
9
|
+
checked?: boolean | undefined;
|
|
10
|
+
onClick?: (() => void) | undefined;
|
|
10
11
|
} & import("react").RefAttributes<HTMLButtonElement & HTMLDivElement>>;
|
|
11
12
|
export declare const MenuTrigger: (props: ComponentProps["Generic"]["Menu"]["Trigger"]) => import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
export declare const MenuDropdown: import("react").ForwardRefExoticComponent<{
|
|
13
|
-
className?: string;
|
|
14
|
+
className?: string | undefined;
|
|
14
15
|
children?: import("react").ReactNode;
|
|
15
|
-
sub?: boolean;
|
|
16
|
+
sub?: boolean | undefined;
|
|
16
17
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
17
18
|
export declare const MenuDivider: import("react").ForwardRefExoticComponent<{
|
|
18
|
-
className?: string;
|
|
19
|
+
className?: string | undefined;
|
|
19
20
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
20
21
|
export declare const MenuLabel: import("react").ForwardRefExoticComponent<{
|
|
21
|
-
className?: string;
|
|
22
|
+
className?: string | undefined;
|
|
22
23
|
children?: import("react").ReactNode;
|
|
23
24
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export declare const PanelButton: import("react").ForwardRefExoticComponent<({
|
|
2
|
-
className?: string;
|
|
3
|
+
className?: string | undefined;
|
|
3
4
|
onClick: () => void;
|
|
4
5
|
} & ({
|
|
5
6
|
children: import("react").ReactNode;
|
|
6
|
-
label?: string;
|
|
7
|
+
label?: string | undefined;
|
|
7
8
|
} | {
|
|
8
9
|
children?: undefined;
|
|
9
10
|
label: string;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export declare const PanelTextInput: import("react").ForwardRefExoticComponent<{
|
|
2
|
-
className?: string;
|
|
3
|
+
className?: string | undefined;
|
|
3
4
|
value: string;
|
|
4
5
|
placeholder: string;
|
|
5
6
|
onChange: (event: import("react").ChangeEvent<HTMLInputElement>) => void;
|
|
6
|
-
onKeyDown: (event: import("react").KeyboardEvent) => void;
|
|
7
|
+
onKeyDown: (event: import("react").KeyboardEvent<Element>) => void;
|
|
7
8
|
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { ComponentProps } from "@blocknote/react";
|
|
2
3
|
export declare const Popover: (props: ComponentProps["Generic"]["Popover"]["Root"]) => import("react/jsx-runtime").JSX.Element;
|
|
3
4
|
export declare const PopoverTrigger: (props: ComponentProps["Generic"]["Popover"]["Trigger"]) => import("react/jsx-runtime").JSX.Element;
|
|
4
5
|
export declare const PopoverContent: import("react").ForwardRefExoticComponent<{
|
|
5
|
-
className?: string;
|
|
6
|
+
className?: string | undefined;
|
|
6
7
|
variant: "form-popover" | "panel-popover";
|
|
7
8
|
children?: import("react").ReactNode;
|
|
8
9
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export declare const SideMenuButton: import("react").ForwardRefExoticComponent<({
|
|
2
|
-
className?: string;
|
|
3
|
-
onClick?: (e: import("react").MouseEvent) => void;
|
|
3
|
+
className?: string | undefined;
|
|
4
|
+
onClick?: ((e: import("react").MouseEvent<Element, MouseEvent>) => void) | undefined;
|
|
4
5
|
icon?: import("react").ReactNode;
|
|
5
|
-
onDragStart?: (e:
|
|
6
|
-
onDragEnd?: (e:
|
|
7
|
-
draggable?: boolean;
|
|
6
|
+
onDragStart?: ((e: import("react").DragEvent<Element>) => void) | undefined;
|
|
7
|
+
onDragEnd?: ((e: import("react").DragEvent<Element>) => void) | undefined;
|
|
8
|
+
draggable?: boolean | undefined;
|
|
8
9
|
} & ({
|
|
9
10
|
children: import("react").ReactNode;
|
|
10
|
-
label?: string;
|
|
11
|
+
label?: string | undefined;
|
|
11
12
|
} | {
|
|
12
13
|
children?: undefined;
|
|
13
14
|
label: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export declare const SuggestionMenu: import("react").ForwardRefExoticComponent<{
|
|
2
3
|
id: string;
|
|
3
|
-
className?: string;
|
|
4
|
+
className?: string | undefined;
|
|
4
5
|
children?: import("react").ReactNode;
|
|
5
6
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export declare const SuggestionMenuEmptyItem: import("react").ForwardRefExoticComponent<{
|
|
2
|
-
className?: string;
|
|
3
|
+
className?: string | undefined;
|
|
3
4
|
children?: import("react").ReactNode;
|
|
4
5
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export declare const SuggestionMenuLoader: import("react").ForwardRefExoticComponent<{
|
|
2
|
-
className?: string;
|
|
3
|
+
className?: string | undefined;
|
|
3
4
|
children?: import("react").ReactNode;
|
|
4
5
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export declare const GridSuggestionMenu: import("react").ForwardRefExoticComponent<{
|
|
2
3
|
id: string;
|
|
3
4
|
columns: number;
|
|
4
|
-
className?: string;
|
|
5
|
+
className?: string | undefined;
|
|
5
6
|
children?: import("react").ReactNode;
|
|
6
7
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export declare const GridSuggestionMenuEmptyItem: import("react").ForwardRefExoticComponent<{
|
|
2
3
|
columns: number;
|
|
3
|
-
className?: string;
|
|
4
|
+
className?: string | undefined;
|
|
4
5
|
children?: import("react").ReactNode;
|
|
5
6
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export declare const GridSuggestionMenuLoader: import("react").ForwardRefExoticComponent<{
|
|
2
3
|
columns: number;
|
|
3
|
-
className?: string;
|
|
4
|
+
className?: string | undefined;
|
|
4
5
|
children?: import("react").ReactNode;
|
|
5
6
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export declare const TableHandle: import("react").ForwardRefExoticComponent<({
|
|
2
|
-
className?: string;
|
|
3
|
+
className?: string | undefined;
|
|
3
4
|
draggable: boolean;
|
|
4
|
-
onDragStart: (e:
|
|
5
|
+
onDragStart: (e: import("react").DragEvent<Element>) => void;
|
|
5
6
|
onDragEnd: () => void;
|
|
6
|
-
style?: import("react").CSSProperties;
|
|
7
|
+
style?: import("react").CSSProperties | undefined;
|
|
7
8
|
} & ({
|
|
8
9
|
children: import("react").ReactNode;
|
|
9
|
-
label?: string;
|
|
10
|
+
label?: string | undefined;
|
|
10
11
|
} | {
|
|
11
12
|
children?: undefined;
|
|
12
13
|
label: string;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export declare const Toolbar: import("react").ForwardRefExoticComponent<{
|
|
2
|
-
className?: string;
|
|
3
|
+
className?: string | undefined;
|
|
3
4
|
children?: import("react").ReactNode;
|
|
4
5
|
} & {
|
|
5
|
-
className?: string;
|
|
6
|
+
className?: string | undefined;
|
|
6
7
|
children?: import("react").ReactNode;
|
|
7
|
-
onMouseEnter?: () => void;
|
|
8
|
-
onMouseLeave?: () => void;
|
|
8
|
+
onMouseEnter?: (() => void) | undefined;
|
|
9
|
+
onMouseLeave?: (() => void) | undefined;
|
|
9
10
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export declare const ToolbarSelect: import("react").ForwardRefExoticComponent<{
|
|
2
|
-
className?: string;
|
|
3
|
+
className?: string | undefined;
|
|
3
4
|
items: {
|
|
4
5
|
text: string;
|
|
5
6
|
icon: import("react").ReactNode;
|
|
6
7
|
onClick: () => void;
|
|
7
8
|
isSelected: boolean;
|
|
8
|
-
isDisabled?: boolean;
|
|
9
|
+
isDisabled?: boolean | undefined;
|
|
9
10
|
}[];
|
|
10
|
-
isDisabled?: boolean;
|
|
11
|
+
isDisabled?: boolean | undefined;
|
|
11
12
|
} & import("react").RefAttributes<HTMLDivElement>>;
|