@blocknote/mantine 0.18.1 → 0.19.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.
@@ -1 +1 @@
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"]}]}
1
+ {"builtAt":1731699606720,"assets":[{"name":"blocknote-mantine.umd.cjs","size":16985},{"name":"blocknote-mantine.umd.cjs.map","size":295309}],"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":4215,"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":2023,"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.18.1",
9
+ "version": "0.19.1",
10
10
  "files": [
11
11
  "dist",
12
12
  "types",
@@ -45,14 +45,13 @@
45
45
  "scripts": {
46
46
  "dev": "vite",
47
47
  "build": "tsc && vite build",
48
- "build-bundled": "tsc && vite build --config vite.config.bundled.ts && git checkout tmp-releases && rm -rf ../../release && mv ../../release-tmp ../../release",
49
48
  "preview": "vite preview",
50
49
  "lint": "eslint src --max-warnings 0",
51
50
  "clean": "rimraf dist && rimraf types"
52
51
  },
53
52
  "dependencies": {
54
- "@blocknote/core": "^0.18.0",
55
- "@blocknote/react": "^0.18.1",
53
+ "@blocknote/core": "^0.19.1",
54
+ "@blocknote/react": "^0.19.1",
56
55
  "@mantine/core": "^7.10.1",
57
56
  "@mantine/hooks": "^7.10.1",
58
57
  "@mantine/utils": "^6.0.21",
@@ -84,5 +83,5 @@
84
83
  "access": "public",
85
84
  "registry": "https://registry.npmjs.org/"
86
85
  },
87
- "gitHead": "c66118d464ef240c531aa6f9d49706ec6aaa49f8"
86
+ "gitHead": "8ba7d2ce11c674a6f5ed4cc5f81ad20f165ef46d"
88
87
  }
@@ -0,0 +1,159 @@
1
+ import { Theme } from "./BlockNoteTheme.js";
2
+
3
+ export const defaultColorScheme = [
4
+ "#FFFFFF",
5
+ "#EFEFEF",
6
+ "#CFCFCF",
7
+ "#AFAFAF",
8
+ "#7F7F7F",
9
+ "#3F3F3F",
10
+ "#1F1F1F",
11
+ "#161616",
12
+ "#0F0F0F",
13
+ "#000000",
14
+ ];
15
+
16
+ export const lightDefaultTheme = {
17
+ colors: {
18
+ editor: {
19
+ text: defaultColorScheme[5],
20
+ background: defaultColorScheme[0],
21
+ },
22
+ menu: {
23
+ text: defaultColorScheme[5],
24
+ background: defaultColorScheme[0],
25
+ },
26
+ tooltip: {
27
+ text: defaultColorScheme[5],
28
+ background: defaultColorScheme[1],
29
+ },
30
+ hovered: {
31
+ text: defaultColorScheme[5],
32
+ background: defaultColorScheme[1],
33
+ },
34
+ selected: {
35
+ text: defaultColorScheme[0],
36
+ background: defaultColorScheme[5],
37
+ },
38
+ disabled: {
39
+ text: defaultColorScheme[3],
40
+ background: defaultColorScheme[1],
41
+ },
42
+ shadow: defaultColorScheme[2],
43
+ border: defaultColorScheme[1],
44
+ sideMenu: defaultColorScheme[2],
45
+ highlights: {
46
+ gray: {
47
+ text: "#9b9a97",
48
+ background: "#ebeced",
49
+ },
50
+ brown: {
51
+ text: "#64473a",
52
+ background: "#e9e5e3",
53
+ },
54
+ red: {
55
+ text: "#e03e3e",
56
+ background: "#fbe4e4",
57
+ },
58
+ orange: {
59
+ text: "#d9730d",
60
+ background: "#f6e9d9",
61
+ },
62
+ yellow: {
63
+ text: "#dfab01",
64
+ background: "#fbf3db",
65
+ },
66
+ green: {
67
+ text: "#4d6461",
68
+ background: "#ddedea",
69
+ },
70
+ blue: {
71
+ text: "#0b6e99",
72
+ background: "#ddebf1",
73
+ },
74
+ purple: {
75
+ text: "#6940a5",
76
+ background: "#eae4f2",
77
+ },
78
+ pink: {
79
+ text: "#ad1a72",
80
+ background: "#f4dfeb",
81
+ },
82
+ },
83
+ },
84
+ borderRadius: 6,
85
+ fontFamily:
86
+ '"Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Open Sans", "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif',
87
+ } satisfies Theme;
88
+
89
+ export const darkDefaultTheme = {
90
+ colors: {
91
+ editor: {
92
+ text: defaultColorScheme[2],
93
+ background: defaultColorScheme[6],
94
+ },
95
+ menu: {
96
+ text: defaultColorScheme[2],
97
+ background: defaultColorScheme[6],
98
+ },
99
+ tooltip: {
100
+ text: defaultColorScheme[2],
101
+ background: defaultColorScheme[7],
102
+ },
103
+ hovered: {
104
+ text: defaultColorScheme[2],
105
+ background: defaultColorScheme[7],
106
+ },
107
+ selected: {
108
+ text: defaultColorScheme[2],
109
+ background: defaultColorScheme[8],
110
+ },
111
+ disabled: {
112
+ text: defaultColorScheme[5],
113
+ background: defaultColorScheme[7],
114
+ },
115
+ shadow: defaultColorScheme[8],
116
+ border: defaultColorScheme[7],
117
+ sideMenu: defaultColorScheme[4],
118
+ highlights: {
119
+ gray: {
120
+ text: "#bebdb8",
121
+ background: "#9b9a97",
122
+ },
123
+ brown: {
124
+ text: "#8e6552",
125
+ background: "#64473a",
126
+ },
127
+ red: {
128
+ text: "#ec4040",
129
+ background: "#be3434",
130
+ },
131
+ orange: {
132
+ text: "#e3790d",
133
+ background: "#b7600a",
134
+ },
135
+ yellow: {
136
+ text: "#dfab01",
137
+ background: "#b58b00",
138
+ },
139
+ green: {
140
+ text: "#6b8b87",
141
+ background: "#4d6461",
142
+ },
143
+ blue: {
144
+ text: "#0e87bc",
145
+ background: "#0b6e99",
146
+ },
147
+ purple: {
148
+ text: "#8552d7",
149
+ background: "#6940a5",
150
+ },
151
+ pink: {
152
+ text: "#da208f",
153
+ background: "#ad1a72",
154
+ },
155
+ },
156
+ },
157
+ borderRadius: lightDefaultTheme.borderRadius,
158
+ fontFamily: lightDefaultTheme.fontFamily,
159
+ } satisfies Theme;
@@ -1,3 +1,4 @@
1
+ import { COLORS_DARK_MODE_DEFAULT, COLORS_DEFAULT } from "@blocknote/core";
1
2
  import { Theme } from "./BlockNoteTheme.js";
2
3
 
3
4
  export const defaultColorScheme = [
@@ -42,44 +43,7 @@ export const lightDefaultTheme = {
42
43
  shadow: defaultColorScheme[2],
43
44
  border: defaultColorScheme[1],
44
45
  sideMenu: defaultColorScheme[2],
45
- highlights: {
46
- gray: {
47
- text: "#9b9a97",
48
- background: "#ebeced",
49
- },
50
- brown: {
51
- text: "#64473a",
52
- background: "#e9e5e3",
53
- },
54
- red: {
55
- text: "#e03e3e",
56
- background: "#fbe4e4",
57
- },
58
- orange: {
59
- text: "#d9730d",
60
- background: "#f6e9d9",
61
- },
62
- yellow: {
63
- text: "#dfab01",
64
- background: "#fbf3db",
65
- },
66
- green: {
67
- text: "#4d6461",
68
- background: "#ddedea",
69
- },
70
- blue: {
71
- text: "#0b6e99",
72
- background: "#ddebf1",
73
- },
74
- purple: {
75
- text: "#6940a5",
76
- background: "#eae4f2",
77
- },
78
- pink: {
79
- text: "#ad1a72",
80
- background: "#f4dfeb",
81
- },
82
- },
46
+ highlights: COLORS_DEFAULT,
83
47
  },
84
48
  borderRadius: 6,
85
49
  fontFamily:
@@ -115,44 +79,7 @@ export const darkDefaultTheme = {
115
79
  shadow: defaultColorScheme[8],
116
80
  border: defaultColorScheme[7],
117
81
  sideMenu: defaultColorScheme[4],
118
- highlights: {
119
- gray: {
120
- text: "#bebdb8",
121
- background: "#9b9a97",
122
- },
123
- brown: {
124
- text: "#8e6552",
125
- background: "#64473a",
126
- },
127
- red: {
128
- text: "#ec4040",
129
- background: "#be3434",
130
- },
131
- orange: {
132
- text: "#e3790d",
133
- background: "#b7600a",
134
- },
135
- yellow: {
136
- text: "#dfab01",
137
- background: "#b58b00",
138
- },
139
- green: {
140
- text: "#6b8b87",
141
- background: "#4d6461",
142
- },
143
- blue: {
144
- text: "#0e87bc",
145
- background: "#0b6e99",
146
- },
147
- purple: {
148
- text: "#8552d7",
149
- background: "#6940a5",
150
- },
151
- pink: {
152
- text: "#da208f",
153
- background: "#ad1a72",
154
- },
155
- },
82
+ highlights: COLORS_DARK_MODE_DEFAULT,
156
83
  },
157
84
  borderRadius: lightDefaultTheme.borderRadius,
158
85
  fontFamily: lightDefaultTheme.fontFamily,
package/src/menu/Menu.tsx CHANGED
@@ -169,7 +169,13 @@ export const MenuItem = forwardRef<
169
169
 
170
170
  if (subTrigger) {
171
171
  return (
172
- <div ref={ref} {...rest}>
172
+ <div
173
+ onClick={(e) => {
174
+ e.preventDefault();
175
+ e.stopPropagation();
176
+ }}
177
+ ref={ref}
178
+ {...rest}>
173
179
  {children}
174
180
  <HiChevronRight size={15} />
175
181
  </div>
@@ -0,0 +1,143 @@
1
+ export declare const defaultColorScheme: string[];
2
+ export declare const lightDefaultTheme: {
3
+ colors: {
4
+ editor: {
5
+ text: string;
6
+ background: string;
7
+ };
8
+ menu: {
9
+ text: string;
10
+ background: string;
11
+ };
12
+ tooltip: {
13
+ text: string;
14
+ background: string;
15
+ };
16
+ hovered: {
17
+ text: string;
18
+ background: string;
19
+ };
20
+ selected: {
21
+ text: string;
22
+ background: string;
23
+ };
24
+ disabled: {
25
+ text: string;
26
+ background: string;
27
+ };
28
+ shadow: string;
29
+ border: string;
30
+ sideMenu: string;
31
+ highlights: {
32
+ gray: {
33
+ text: string;
34
+ background: string;
35
+ };
36
+ brown: {
37
+ text: string;
38
+ background: string;
39
+ };
40
+ red: {
41
+ text: string;
42
+ background: string;
43
+ };
44
+ orange: {
45
+ text: string;
46
+ background: string;
47
+ };
48
+ yellow: {
49
+ text: string;
50
+ background: string;
51
+ };
52
+ green: {
53
+ text: string;
54
+ background: string;
55
+ };
56
+ blue: {
57
+ text: string;
58
+ background: string;
59
+ };
60
+ purple: {
61
+ text: string;
62
+ background: string;
63
+ };
64
+ pink: {
65
+ text: string;
66
+ background: string;
67
+ };
68
+ };
69
+ };
70
+ borderRadius: number;
71
+ fontFamily: string;
72
+ };
73
+ export declare const darkDefaultTheme: {
74
+ colors: {
75
+ editor: {
76
+ text: string;
77
+ background: string;
78
+ };
79
+ menu: {
80
+ text: string;
81
+ background: string;
82
+ };
83
+ tooltip: {
84
+ text: string;
85
+ background: string;
86
+ };
87
+ hovered: {
88
+ text: string;
89
+ background: string;
90
+ };
91
+ selected: {
92
+ text: string;
93
+ background: string;
94
+ };
95
+ disabled: {
96
+ text: string;
97
+ background: string;
98
+ };
99
+ shadow: string;
100
+ border: string;
101
+ sideMenu: string;
102
+ highlights: {
103
+ gray: {
104
+ text: string;
105
+ background: string;
106
+ };
107
+ brown: {
108
+ text: string;
109
+ background: string;
110
+ };
111
+ red: {
112
+ text: string;
113
+ background: string;
114
+ };
115
+ orange: {
116
+ text: string;
117
+ background: string;
118
+ };
119
+ yellow: {
120
+ text: string;
121
+ background: string;
122
+ };
123
+ green: {
124
+ text: string;
125
+ background: string;
126
+ };
127
+ blue: {
128
+ text: string;
129
+ background: string;
130
+ };
131
+ purple: {
132
+ text: string;
133
+ background: string;
134
+ };
135
+ pink: {
136
+ text: string;
137
+ background: string;
138
+ };
139
+ };
140
+ };
141
+ borderRadius: number;
142
+ fontFamily: string;
143
+ };