@blocknote/shadcn 0.15.11 → 0.17.0
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-shadcn.js +203 -203
- package/dist/blocknote-shadcn.js.map +1 -1
- package/dist/blocknote-shadcn.umd.cjs +2 -2
- package/dist/blocknote-shadcn.umd.cjs.map +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +7 -5
- package/src/ShadCNComponentsContext.tsx +12 -12
- package/src/components/ui/badge.tsx +2 -2
- package/src/components/ui/button.tsx +2 -2
- package/src/components/ui/card.tsx +4 -4
- package/src/components/ui/dropdown-menu.tsx +8 -8
- package/src/components/ui/form.tsx +7 -7
- package/src/components/ui/input.tsx +1 -1
- package/src/components/ui/label.tsx +2 -2
- package/src/components/ui/popover.tsx +3 -3
- package/src/components/ui/select.tsx +8 -8
- package/src/components/ui/tabs.tsx +3 -3
- package/src/components/ui/toggle.tsx +2 -2
- package/src/components/ui/tooltip.tsx +3 -3
- package/src/form/Form.tsx +1 -1
- package/src/form/TextInput.tsx +1 -1
- package/src/index.tsx +27 -27
- package/src/menu/Menu.tsx +3 -3
- package/src/panel/Panel.tsx +2 -2
- package/src/panel/PanelButton.tsx +1 -1
- package/src/panel/PanelFileInput.tsx +1 -1
- package/src/panel/PanelTab.tsx +1 -1
- package/src/panel/PanelTextInput.tsx +2 -2
- package/src/popover/popover.tsx +2 -2
- package/src/sideMenu/SideMenuButton.tsx +2 -2
- package/src/suggestionMenu/SuggestionMenu.tsx +1 -1
- package/src/suggestionMenu/SuggestionMenuEmptyItem.tsx +1 -1
- package/src/suggestionMenu/SuggestionMenuItem.tsx +2 -2
- package/src/suggestionMenu/SuggestionMenuLabel.tsx +1 -1
- package/src/tableHandle/TableHandle.tsx +2 -2
- package/src/toolbar/Toolbar.tsx +2 -2
- package/types/src/ShadCNComponentsContext.d.ts +13 -13
- package/types/src/components/ui/badge.d.ts +2 -2
- package/types/src/components/ui/button.d.ts +2 -2
- package/types/src/components/ui/card.d.ts +1 -1
- package/types/src/components/ui/dropdown-menu.d.ts +2 -2
- package/types/src/components/ui/form.d.ts +2 -2
- package/types/src/components/ui/label.d.ts +2 -2
- package/types/src/components/ui/popover.d.ts +2 -2
- package/types/src/components/ui/select.d.ts +2 -2
- package/types/src/components/ui/tabs.d.ts +2 -2
- package/types/src/components/ui/toggle.d.ts +3 -3
- package/types/src/components/ui/tooltip.d.ts +2 -2
- package/types/src/index.d.ts +1 -1
package/dist/webpack-stats.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"builtAt":
|
|
1
|
+
{"builtAt":1729169472865,"assets":[{"name":"blocknote-shadcn.umd.cjs","size":43620},{"name":"blocknote-shadcn.umd.cjs.map","size":163694}],"chunks":[{"id":"ec22802","entry":true,"initial":true,"files":["blocknote-shadcn.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":1202,"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":43845,"chunks":["ec22802"]},{"name":"../../node_modules/react/jsx-runtime.js","size":225,"chunks":["ec22802"]},{"name":"./src/lib/utils.ts","size":135,"chunks":["ec22802"]},{"name":"./src/components/ui/badge.tsx","size":929,"chunks":["ec22802"]},{"name":"./src/components/ui/button.tsx","size":1625,"chunks":["ec22802"]},{"name":"./src/components/ui/card.tsx","size":1686,"chunks":["ec22802"]},{"name":"./src/components/ui/dropdown-menu.tsx","size":6246,"chunks":["ec22802"]},{"name":"./src/components/ui/label.tsx","size":456,"chunks":["ec22802"]},{"name":"./src/components/ui/form.tsx","size":2911,"chunks":["ec22802"]},{"name":"./src/components/ui/input.tsx","size":736,"chunks":["ec22802"]},{"name":"./src/components/ui/popover.tsx","size":1049,"chunks":["ec22802"]},{"name":"./src/components/ui/select.tsx","size":5530,"chunks":["ec22802"]},{"name":"./src/components/ui/tabs.tsx","size":1682,"chunks":["ec22802"]},{"name":"./src/components/ui/toggle.tsx","size":1218,"chunks":["ec22802"]},{"name":"./src/components/ui/tooltip.tsx","size":976,"chunks":["ec22802"]},{"name":"./src/ShadCNComponentsContext.tsx","size":1471,"chunks":["ec22802"]},{"name":"./src/form/Form.tsx","size":289,"chunks":["ec22802"]},{"name":"./src/form/TextInput.tsx","size":1071,"chunks":["ec22802"]},{"name":"./src/menu/Menu.tsx","size":4024,"chunks":["ec22802"]},{"name":"./src/panel/Panel.tsx","size":1165,"chunks":["ec22802"]},{"name":"./src/panel/PanelTab.tsx","size":354,"chunks":["ec22802"]},{"name":"./src/panel/PanelTextInput.tsx","size":476,"chunks":["ec22802"]},{"name":"./src/popover/popover.tsx","size":1189,"chunks":["ec22802"]},{"name":"./src/sideMenu/SideMenu.tsx","size":232,"chunks":["ec22802"]},{"name":"./src/sideMenu/SideMenuButton.tsx","size":652,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenu.tsx","size":368,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuEmptyItem.tsx","size":329,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/SuggestionMenu.tsx","size":828,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/SuggestionMenuEmptyItem.tsx","size":636,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/SuggestionMenuItem.tsx","size":1934,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/SuggestionMenuLabel.tsx","size":325,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/SuggestionMenuLoader.tsx","size":228,"chunks":["ec22802"]},{"name":"./src/tableHandle/TableHandle.tsx","size":617,"chunks":["ec22802"]},{"name":"./src/toolbar/Toolbar.tsx","size":3973,"chunks":["ec22802"]},{"name":"./src/panel/PanelButton.tsx","size":415,"chunks":["ec22802"]},{"name":"./src/panel/PanelFileInput.tsx","size":503,"chunks":["ec22802"]},{"name":"./src/style.css","size":0,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuItem.tsx","size":864,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuLoader.tsx","size":380,"chunks":["ec22802"]},{"name":"./src/index.tsx","size":1791,"chunks":["ec22802"]}]}
|
package/package.json
CHANGED
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
"name": "@blocknote/shadcn",
|
|
3
3
|
"homepage": "https://github.com/TypeCellOS/BlockNote",
|
|
4
4
|
"private": false,
|
|
5
|
-
"sideEffects":
|
|
5
|
+
"sideEffects": [
|
|
6
|
+
"*.css"
|
|
7
|
+
],
|
|
6
8
|
"license": "MPL-2.0",
|
|
7
|
-
"version": "0.
|
|
9
|
+
"version": "0.17.0",
|
|
8
10
|
"files": [
|
|
9
11
|
"dist",
|
|
10
12
|
"types",
|
|
@@ -49,8 +51,8 @@
|
|
|
49
51
|
"clean": "rimraf dist && rimraf types"
|
|
50
52
|
},
|
|
51
53
|
"dependencies": {
|
|
52
|
-
"@blocknote/core": "^0.
|
|
53
|
-
"@blocknote/react": "^0.
|
|
54
|
+
"@blocknote/core": "^0.17.0",
|
|
55
|
+
"@blocknote/react": "^0.17.0",
|
|
54
56
|
"@hookform/resolvers": "^3.6.0",
|
|
55
57
|
"@radix-ui/react-dropdown-menu": "^2.0.6",
|
|
56
58
|
"@radix-ui/react-label": "^2.0.2",
|
|
@@ -101,5 +103,5 @@
|
|
|
101
103
|
"access": "public",
|
|
102
104
|
"registry": "https://registry.npmjs.org/"
|
|
103
105
|
},
|
|
104
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "2921a6ad0e06ee1292d70b569558da651073b98e"
|
|
105
107
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Badge as ShadCNBadge } from "./components/ui/badge";
|
|
2
|
-
import { Button as ShadCNButton } from "./components/ui/button";
|
|
1
|
+
import { Badge as ShadCNBadge } from "./components/ui/badge.js";
|
|
2
|
+
import { Button as ShadCNButton } from "./components/ui/button.js";
|
|
3
3
|
import {
|
|
4
4
|
Card as ShadCNCard,
|
|
5
5
|
CardContent as ShadCNCardContent,
|
|
6
|
-
} from "./components/ui/card";
|
|
6
|
+
} from "./components/ui/card.js";
|
|
7
7
|
import {
|
|
8
8
|
DropdownMenu as ShadCNDropdownMenu,
|
|
9
9
|
DropdownMenuCheckboxItem as ShadCNDropdownMenuCheckboxItem,
|
|
@@ -15,35 +15,35 @@ import {
|
|
|
15
15
|
DropdownMenuSubContent as ShadCNDropdownMenuSubContent,
|
|
16
16
|
DropdownMenuSubTrigger as ShadCNDropdownMenuSubTrigger,
|
|
17
17
|
DropdownMenuTrigger as ShadCNDropdownMenuTrigger,
|
|
18
|
-
} from "./components/ui/dropdown-menu";
|
|
19
|
-
import { Form as ShadCNForm } from "./components/ui/form";
|
|
20
|
-
import { Input as ShadCNInput } from "./components/ui/input";
|
|
21
|
-
import { Label as ShadCNLabel } from "./components/ui/label";
|
|
18
|
+
} from "./components/ui/dropdown-menu.js";
|
|
19
|
+
import { Form as ShadCNForm } from "./components/ui/form.js";
|
|
20
|
+
import { Input as ShadCNInput } from "./components/ui/input.js";
|
|
21
|
+
import { Label as ShadCNLabel } from "./components/ui/label.js";
|
|
22
22
|
import {
|
|
23
23
|
Popover as ShadCNPopover,
|
|
24
24
|
PopoverContent as ShadCNPopoverContent,
|
|
25
25
|
PopoverTrigger as ShadCNPopoverTrigger,
|
|
26
|
-
} from "./components/ui/popover";
|
|
26
|
+
} from "./components/ui/popover.js";
|
|
27
27
|
import {
|
|
28
28
|
Select as ShadCNSelect,
|
|
29
29
|
SelectContent as ShadCNSelectContent,
|
|
30
30
|
SelectItem as ShadCNSelectItem,
|
|
31
31
|
SelectTrigger as ShadCNSelectTrigger,
|
|
32
32
|
SelectValue as ShadCNSelectValue,
|
|
33
|
-
} from "./components/ui/select";
|
|
33
|
+
} from "./components/ui/select.js";
|
|
34
34
|
import {
|
|
35
35
|
Tabs as ShadCNTabs,
|
|
36
36
|
TabsContent as ShadCNTabsContent,
|
|
37
37
|
TabsList as ShadCNTabsList,
|
|
38
38
|
TabsTrigger as ShadCNTabsTrigger,
|
|
39
|
-
} from "./components/ui/tabs";
|
|
40
|
-
import { Toggle as ShadCNToggle } from "./components/ui/toggle";
|
|
39
|
+
} from "./components/ui/tabs.js";
|
|
40
|
+
import { Toggle as ShadCNToggle } from "./components/ui/toggle.js";
|
|
41
41
|
import {
|
|
42
42
|
Tooltip as ShadCNTooltip,
|
|
43
43
|
TooltipContent as ShadCNTooltipContent,
|
|
44
44
|
TooltipProvider as ShadCNTooltipProvider,
|
|
45
45
|
TooltipTrigger as ShadCNTooltipTrigger,
|
|
46
|
-
} from "./components/ui/tooltip";
|
|
46
|
+
} from "./components/ui/tooltip.js";
|
|
47
47
|
|
|
48
48
|
import { createContext, useContext } from "react";
|
|
49
49
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
import { cva, type VariantProps } from "class-variance-authority";
|
|
2
|
+
import * as React from "react";
|
|
3
3
|
|
|
4
|
-
import { cn } from "../../lib/utils";
|
|
4
|
+
import { cn } from "../../lib/utils.js";
|
|
5
5
|
|
|
6
6
|
const badgeVariants = cva(
|
|
7
7
|
"bn-inline-flex bn-items-center bn-rounded-full bn-border bn-px-2.5 bn-py-0.5 bn-text-xs bn-font-semibold bn-transition-colors focus:bn-outline-none focus:bn-ring-2 focus:bn-ring-ring focus:bn-ring-offset-2",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
import { Slot } from "@radix-ui/react-slot";
|
|
3
2
|
import { cva, type VariantProps } from "class-variance-authority";
|
|
3
|
+
import * as React from "react";
|
|
4
4
|
|
|
5
|
-
import { cn } from "../../lib/utils";
|
|
5
|
+
import { cn } from "../../lib/utils.js";
|
|
6
6
|
|
|
7
7
|
const buttonVariants = cva(
|
|
8
8
|
"bn-inline-flex bn-items-center bn-justify-center bn-whitespace-nowrap bn-rounded-md bn-text-sm bn-font-medium bn-ring-offset-background bn-transition-colors focus-visible:bn-outline-none focus-visible:bn-ring-2 focus-visible:bn-ring-ring focus-visible:bn-ring-offset-2 disabled:bn-pointer-events-none disabled:bn-opacity-50",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
|
|
3
|
-
import { cn } from "../../lib/utils";
|
|
3
|
+
import { cn } from "../../lib/utils.js";
|
|
4
4
|
|
|
5
5
|
const Card = React.forwardRef<
|
|
6
6
|
HTMLDivElement,
|
|
@@ -78,9 +78,9 @@ CardFooter.displayName = "CardFooter";
|
|
|
78
78
|
|
|
79
79
|
export {
|
|
80
80
|
Card,
|
|
81
|
-
|
|
81
|
+
CardContent,
|
|
82
|
+
CardDescription,
|
|
82
83
|
CardFooter,
|
|
84
|
+
CardHeader,
|
|
83
85
|
CardTitle,
|
|
84
|
-
CardDescription,
|
|
85
|
-
CardContent,
|
|
86
86
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
3
2
|
import { Check, ChevronRight, Circle } from "lucide-react";
|
|
3
|
+
import * as React from "react";
|
|
4
4
|
|
|
5
|
-
import { cn } from "../../lib/utils";
|
|
5
|
+
import { cn } from "../../lib/utils.js";
|
|
6
6
|
|
|
7
7
|
const DropdownMenu = DropdownMenuPrimitive.Root;
|
|
8
8
|
|
|
@@ -181,18 +181,18 @@ DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
|
181
181
|
|
|
182
182
|
export {
|
|
183
183
|
DropdownMenu,
|
|
184
|
-
|
|
184
|
+
DropdownMenuCheckboxItem,
|
|
185
185
|
DropdownMenuContent,
|
|
186
|
+
DropdownMenuGroup,
|
|
186
187
|
DropdownMenuItem,
|
|
187
|
-
DropdownMenuCheckboxItem,
|
|
188
|
-
DropdownMenuRadioItem,
|
|
189
188
|
DropdownMenuLabel,
|
|
189
|
+
DropdownMenuPortal,
|
|
190
|
+
DropdownMenuRadioGroup,
|
|
191
|
+
DropdownMenuRadioItem,
|
|
190
192
|
DropdownMenuSeparator,
|
|
191
193
|
DropdownMenuShortcut,
|
|
192
|
-
DropdownMenuGroup,
|
|
193
|
-
DropdownMenuPortal,
|
|
194
194
|
DropdownMenuSub,
|
|
195
195
|
DropdownMenuSubContent,
|
|
196
196
|
DropdownMenuSubTrigger,
|
|
197
|
-
|
|
197
|
+
DropdownMenuTrigger,
|
|
198
198
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
3
2
|
import { Slot } from "@radix-ui/react-slot";
|
|
3
|
+
import * as React from "react";
|
|
4
4
|
import {
|
|
5
5
|
Controller,
|
|
6
6
|
ControllerProps,
|
|
@@ -10,8 +10,8 @@ import {
|
|
|
10
10
|
useFormContext,
|
|
11
11
|
} from "react-hook-form";
|
|
12
12
|
|
|
13
|
-
import { cn } from "../../lib/utils";
|
|
14
|
-
import { Label } from "./label";
|
|
13
|
+
import { cn } from "../../lib/utils.js";
|
|
14
|
+
import { Label } from "./label.js";
|
|
15
15
|
|
|
16
16
|
const Form = FormProvider;
|
|
17
17
|
|
|
@@ -165,12 +165,12 @@ const FormMessage = React.forwardRef<
|
|
|
165
165
|
FormMessage.displayName = "FormMessage";
|
|
166
166
|
|
|
167
167
|
export {
|
|
168
|
-
useFormField,
|
|
169
168
|
Form,
|
|
170
|
-
FormItem,
|
|
171
|
-
FormLabel,
|
|
172
169
|
FormControl,
|
|
173
170
|
FormDescription,
|
|
174
|
-
FormMessage,
|
|
175
171
|
FormField,
|
|
172
|
+
FormItem,
|
|
173
|
+
FormLabel,
|
|
174
|
+
FormMessage,
|
|
175
|
+
useFormField,
|
|
176
176
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
3
2
|
import { cva, type VariantProps } from "class-variance-authority";
|
|
3
|
+
import * as React from "react";
|
|
4
4
|
|
|
5
|
-
import { cn } from "../../lib/utils";
|
|
5
|
+
import { cn } from "../../lib/utils.js";
|
|
6
6
|
|
|
7
7
|
const labelVariants = cva(
|
|
8
8
|
"bn-text-sm bn-font-medium bn-leading-none peer-disabled:bn-cursor-not-allowed peer-disabled:bn-opacity-70"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
2
|
+
import * as React from "react";
|
|
3
3
|
|
|
4
|
-
import { cn } from "../../lib/utils";
|
|
4
|
+
import { cn } from "../../lib/utils.js";
|
|
5
5
|
|
|
6
6
|
const Popover = PopoverPrimitive.Root;
|
|
7
7
|
|
|
@@ -26,4 +26,4 @@ const PopoverContent = React.forwardRef<
|
|
|
26
26
|
));
|
|
27
27
|
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
28
28
|
|
|
29
|
-
export { Popover,
|
|
29
|
+
export { Popover, PopoverContent, PopoverTrigger };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
3
2
|
import { Check, ChevronDown, ChevronUp } from "lucide-react";
|
|
3
|
+
import * as React from "react";
|
|
4
4
|
|
|
5
|
-
import { cn } from "../../lib/utils";
|
|
5
|
+
import { cn } from "../../lib/utils.js";
|
|
6
6
|
|
|
7
7
|
const Select = SelectPrimitive.Root;
|
|
8
8
|
|
|
@@ -143,13 +143,13 @@ SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
|
143
143
|
|
|
144
144
|
export {
|
|
145
145
|
Select,
|
|
146
|
-
SelectGroup,
|
|
147
|
-
SelectValue,
|
|
148
|
-
SelectTrigger,
|
|
149
146
|
SelectContent,
|
|
150
|
-
|
|
147
|
+
SelectGroup,
|
|
151
148
|
SelectItem,
|
|
152
|
-
|
|
153
|
-
SelectScrollUpButton,
|
|
149
|
+
SelectLabel,
|
|
154
150
|
SelectScrollDownButton,
|
|
151
|
+
SelectScrollUpButton,
|
|
152
|
+
SelectSeparator,
|
|
153
|
+
SelectTrigger,
|
|
154
|
+
SelectValue,
|
|
155
155
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
2
|
+
import * as React from "react";
|
|
3
3
|
|
|
4
|
-
import { cn } from "../../lib/utils";
|
|
4
|
+
import { cn } from "../../lib/utils.js";
|
|
5
5
|
|
|
6
6
|
const Tabs = TabsPrimitive.Root;
|
|
7
7
|
|
|
@@ -50,4 +50,4 @@ const TabsContent = React.forwardRef<
|
|
|
50
50
|
));
|
|
51
51
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
52
52
|
|
|
53
|
-
export { Tabs, TabsList, TabsTrigger
|
|
53
|
+
export { Tabs, TabsContent, TabsList, TabsTrigger };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
3
2
|
import { cva, type VariantProps } from "class-variance-authority";
|
|
3
|
+
import * as React from "react";
|
|
4
4
|
|
|
5
|
-
import { cn } from "../../lib/utils";
|
|
5
|
+
import { cn } from "../../lib/utils.js";
|
|
6
6
|
|
|
7
7
|
const toggleVariants = cva(
|
|
8
8
|
"bn-inline-flex bn-items-center bn-justify-center bn-rounded-md bn-text-sm bn-font-medium bn-ring-offset-background bn-transition-colors hover:bn-bg-muted hover:bn-text-muted-foreground focus-visible:bn-outline-none focus-visible:bn-ring-2 focus-visible:bn-ring-ring focus-visible:bn-ring-offset-2 disabled:bn-pointer-events-none disabled:bn-opacity-50 data-[state=on]:bn-bg-accent data-[state=on]:bn-text-accent-foreground",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
2
|
+
import * as React from "react";
|
|
3
3
|
|
|
4
|
-
import { cn } from "../../lib/utils";
|
|
4
|
+
import { cn } from "../../lib/utils.js";
|
|
5
5
|
|
|
6
6
|
const TooltipProvider = TooltipPrimitive.Provider;
|
|
7
7
|
|
|
@@ -25,4 +25,4 @@ const TooltipContent = React.forwardRef<
|
|
|
25
25
|
));
|
|
26
26
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
27
27
|
|
|
28
|
-
export { Tooltip,
|
|
28
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
package/src/form/Form.tsx
CHANGED
|
@@ -2,7 +2,7 @@ import { assertEmpty } from "@blocknote/core";
|
|
|
2
2
|
import { ComponentProps } from "@blocknote/react";
|
|
3
3
|
import { useForm } from "react-hook-form";
|
|
4
4
|
|
|
5
|
-
import { useShadCNComponentsContext } from "../ShadCNComponentsContext";
|
|
5
|
+
import { useShadCNComponentsContext } from "../ShadCNComponentsContext.js";
|
|
6
6
|
|
|
7
7
|
export const Form = (props: ComponentProps["Generic"]["Form"]["Root"]) => {
|
|
8
8
|
const { children, ...rest } = props;
|
package/src/form/TextInput.tsx
CHANGED
|
@@ -2,7 +2,7 @@ import { assertEmpty } from "@blocknote/core";
|
|
|
2
2
|
import { ComponentProps } from "@blocknote/react";
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
4
|
|
|
5
|
-
import { useShadCNComponentsContext } from "../ShadCNComponentsContext";
|
|
5
|
+
import { useShadCNComponentsContext } from "../ShadCNComponentsContext.js";
|
|
6
6
|
|
|
7
7
|
export const TextInput = forwardRef<
|
|
8
8
|
HTMLInputElement,
|
package/src/index.tsx
CHANGED
|
@@ -11,16 +11,8 @@ import {
|
|
|
11
11
|
} from "@blocknote/react";
|
|
12
12
|
import { ComponentProps, useMemo } from "react";
|
|
13
13
|
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
ShadCNComponentsContext,
|
|
17
|
-
ShadCNDefaultComponents,
|
|
18
|
-
} from "./ShadCNComponentsContext";
|
|
19
|
-
import { Form } from "./form/Form";
|
|
20
|
-
import { GridSuggestionMenu } from "./suggestionMenu/gridSuggestionMenu/GridSuggestionMenu";
|
|
21
|
-
import { GridSuggestionMenuEmptyItem } from "./suggestionMenu/gridSuggestionMenu/GridSuggestionMenuEmptyItem";
|
|
22
|
-
import { GridSuggestionMenuItem } from "./suggestionMenu/gridSuggestionMenu/GridSuggestionMenuItem";
|
|
23
|
-
import { GridSuggestionMenuLoader } from "./suggestionMenu/gridSuggestionMenu/GridSuggestionMenuLoader";
|
|
14
|
+
import { Form } from "./form/Form.js";
|
|
15
|
+
import { TextInput } from "./form/TextInput.js";
|
|
24
16
|
import {
|
|
25
17
|
Menu,
|
|
26
18
|
MenuDivider,
|
|
@@ -28,25 +20,33 @@ import {
|
|
|
28
20
|
MenuItem,
|
|
29
21
|
MenuLabel,
|
|
30
22
|
MenuTrigger,
|
|
31
|
-
} from "./menu/Menu";
|
|
32
|
-
import { Panel } from "./panel/Panel";
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
23
|
+
} from "./menu/Menu.js";
|
|
24
|
+
import { Panel } from "./panel/Panel.js";
|
|
25
|
+
import { PanelTab } from "./panel/PanelTab.js";
|
|
26
|
+
import { PanelTextInput } from "./panel/PanelTextInput.js";
|
|
27
|
+
import { Popover, PopoverContent, PopoverTrigger } from "./popover/popover.js";
|
|
28
|
+
import {
|
|
29
|
+
ShadCNComponents,
|
|
30
|
+
ShadCNComponentsContext,
|
|
31
|
+
ShadCNDefaultComponents,
|
|
32
|
+
} from "./ShadCNComponentsContext.js";
|
|
33
|
+
import { SideMenu } from "./sideMenu/SideMenu.js";
|
|
34
|
+
import { SideMenuButton } from "./sideMenu/SideMenuButton.js";
|
|
35
|
+
import { GridSuggestionMenu } from "./suggestionMenu/gridSuggestionMenu/GridSuggestionMenu.js";
|
|
36
|
+
import { GridSuggestionMenuEmptyItem } from "./suggestionMenu/gridSuggestionMenu/GridSuggestionMenuEmptyItem.js";
|
|
37
|
+
import { SuggestionMenu } from "./suggestionMenu/SuggestionMenu.js";
|
|
38
|
+
import { SuggestionMenuEmptyItem } from "./suggestionMenu/SuggestionMenuEmptyItem.js";
|
|
39
|
+
import { SuggestionMenuItem } from "./suggestionMenu/SuggestionMenuItem.js";
|
|
40
|
+
import { SuggestionMenuLabel } from "./suggestionMenu/SuggestionMenuLabel.js";
|
|
41
|
+
import { SuggestionMenuLoader } from "./suggestionMenu/SuggestionMenuLoader.js";
|
|
42
|
+
import { TableHandle } from "./tableHandle/TableHandle.js";
|
|
43
|
+
import { Toolbar, ToolbarButton, ToolbarSelect } from "./toolbar/Toolbar.js";
|
|
48
44
|
|
|
45
|
+
import { PanelButton } from "./panel/PanelButton.js";
|
|
46
|
+
import { PanelFileInput } from "./panel/PanelFileInput.js";
|
|
49
47
|
import "./style.css";
|
|
48
|
+
import { GridSuggestionMenuItem } from "./suggestionMenu/gridSuggestionMenu/GridSuggestionMenuItem.js";
|
|
49
|
+
import { GridSuggestionMenuLoader } from "./suggestionMenu/gridSuggestionMenu/GridSuggestionMenuLoader.js";
|
|
50
50
|
|
|
51
51
|
export const components: Components = {
|
|
52
52
|
FormattingToolbar: {
|
package/src/menu/Menu.tsx
CHANGED
|
@@ -3,9 +3,9 @@ import { ComponentProps } from "@blocknote/react";
|
|
|
3
3
|
import { ChevronRight } from "lucide-react";
|
|
4
4
|
import { forwardRef, useMemo } from "react";
|
|
5
5
|
|
|
6
|
-
import type { DropdownMenuTrigger as ShadCNDropdownMenuTrigger } from "../components/ui/dropdown-menu";
|
|
7
|
-
import { cn } from "../lib/utils";
|
|
8
|
-
import { useShadCNComponentsContext } from "../ShadCNComponentsContext";
|
|
6
|
+
import type { DropdownMenuTrigger as ShadCNDropdownMenuTrigger } from "../components/ui/dropdown-menu.js";
|
|
7
|
+
import { cn } from "../lib/utils.js";
|
|
8
|
+
import { useShadCNComponentsContext } from "../ShadCNComponentsContext.js";
|
|
9
9
|
|
|
10
10
|
// hacky HoC to change DropdownMenuTrigger to open a menu on PointerUp instead of PointerDown
|
|
11
11
|
// Needed to fix this issue: https://github.com/radix-ui/primitives/issues/2867
|
package/src/panel/Panel.tsx
CHANGED
|
@@ -2,8 +2,8 @@ import { assertEmpty } from "@blocknote/core";
|
|
|
2
2
|
import { ComponentProps } from "@blocknote/react";
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
4
|
|
|
5
|
-
import { cn } from "../lib/utils";
|
|
6
|
-
import { useShadCNComponentsContext } from "../ShadCNComponentsContext";
|
|
5
|
+
import { cn } from "../lib/utils.js";
|
|
6
|
+
import { useShadCNComponentsContext } from "../ShadCNComponentsContext.js";
|
|
7
7
|
|
|
8
8
|
export const Panel = forwardRef<
|
|
9
9
|
HTMLDivElement,
|
|
@@ -2,7 +2,7 @@ import { assertEmpty } from "@blocknote/core";
|
|
|
2
2
|
import { ComponentProps } from "@blocknote/react";
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
4
|
|
|
5
|
-
import { useShadCNComponentsContext } from "../ShadCNComponentsContext";
|
|
5
|
+
import { useShadCNComponentsContext } from "../ShadCNComponentsContext.js";
|
|
6
6
|
|
|
7
7
|
export const PanelButton = forwardRef<
|
|
8
8
|
HTMLButtonElement,
|
|
@@ -2,7 +2,7 @@ import { assertEmpty } from "@blocknote/core";
|
|
|
2
2
|
import { ComponentProps } from "@blocknote/react";
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
4
|
|
|
5
|
-
import { useShadCNComponentsContext } from "../ShadCNComponentsContext";
|
|
5
|
+
import { useShadCNComponentsContext } from "../ShadCNComponentsContext.js";
|
|
6
6
|
|
|
7
7
|
export const PanelFileInput = forwardRef<
|
|
8
8
|
HTMLInputElement,
|
package/src/panel/PanelTab.tsx
CHANGED
|
@@ -2,7 +2,7 @@ import { assertEmpty } from "@blocknote/core";
|
|
|
2
2
|
import { ComponentProps } from "@blocknote/react";
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
4
|
|
|
5
|
-
import { cn } from "../lib/utils";
|
|
5
|
+
import { cn } from "../lib/utils.js";
|
|
6
6
|
|
|
7
7
|
export const PanelTab = forwardRef<
|
|
8
8
|
HTMLDivElement,
|
|
@@ -2,8 +2,8 @@ import { assertEmpty } from "@blocknote/core";
|
|
|
2
2
|
import { ComponentProps } from "@blocknote/react";
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
4
|
|
|
5
|
-
import { cn } from "../lib/utils";
|
|
6
|
-
import { useShadCNComponentsContext } from "../ShadCNComponentsContext";
|
|
5
|
+
import { cn } from "../lib/utils.js";
|
|
6
|
+
import { useShadCNComponentsContext } from "../ShadCNComponentsContext.js";
|
|
7
7
|
|
|
8
8
|
export const PanelTextInput = forwardRef<
|
|
9
9
|
HTMLInputElement,
|
package/src/popover/popover.tsx
CHANGED
|
@@ -2,8 +2,8 @@ import { assertEmpty } from "@blocknote/core";
|
|
|
2
2
|
import { ComponentProps } from "@blocknote/react";
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
4
|
|
|
5
|
-
import { cn } from "../lib/utils";
|
|
6
|
-
import { useShadCNComponentsContext } from "../ShadCNComponentsContext";
|
|
5
|
+
import { cn } from "../lib/utils.js";
|
|
6
|
+
import { useShadCNComponentsContext } from "../ShadCNComponentsContext.js";
|
|
7
7
|
|
|
8
8
|
export const Popover = (
|
|
9
9
|
props: ComponentProps["Generic"]["Popover"]["Root"]
|
|
@@ -2,8 +2,8 @@ import { assertEmpty } from "@blocknote/core";
|
|
|
2
2
|
import { ComponentProps } from "@blocknote/react";
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
4
|
|
|
5
|
-
import { cn } from "../lib/utils";
|
|
6
|
-
import { useShadCNComponentsContext } from "../ShadCNComponentsContext";
|
|
5
|
+
import { cn } from "../lib/utils.js";
|
|
6
|
+
import { useShadCNComponentsContext } from "../ShadCNComponentsContext.js";
|
|
7
7
|
|
|
8
8
|
export const SideMenuButton = forwardRef<
|
|
9
9
|
HTMLButtonElement,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ComponentProps } from "@blocknote/react";
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
3
|
|
|
4
|
-
import { cn } from "../lib/utils";
|
|
5
4
|
import { assertEmpty } from "@blocknote/core";
|
|
5
|
+
import { cn } from "../lib/utils.js";
|
|
6
6
|
|
|
7
7
|
export const SuggestionMenu = forwardRef<
|
|
8
8
|
HTMLDivElement,
|
|
@@ -2,7 +2,7 @@ import { assertEmpty } from "@blocknote/core";
|
|
|
2
2
|
import { ComponentProps } from "@blocknote/react";
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
4
|
|
|
5
|
-
import { cn } from "../lib/utils";
|
|
5
|
+
import { cn } from "../lib/utils.js";
|
|
6
6
|
|
|
7
7
|
export const SuggestionMenuEmptyItem = forwardRef<
|
|
8
8
|
HTMLDivElement,
|
|
@@ -2,8 +2,8 @@ import { assertEmpty } from "@blocknote/core";
|
|
|
2
2
|
import { ComponentProps, elementOverflow, mergeRefs } from "@blocknote/react";
|
|
3
3
|
import { forwardRef, useEffect, useRef } from "react";
|
|
4
4
|
|
|
5
|
-
import { cn } from "../lib/utils";
|
|
6
|
-
import { useShadCNComponentsContext } from "../ShadCNComponentsContext";
|
|
5
|
+
import { cn } from "../lib/utils.js";
|
|
6
|
+
import { useShadCNComponentsContext } from "../ShadCNComponentsContext.js";
|
|
7
7
|
|
|
8
8
|
export const SuggestionMenuItem = forwardRef<
|
|
9
9
|
HTMLDivElement,
|
|
@@ -2,7 +2,7 @@ import { assertEmpty } from "@blocknote/core";
|
|
|
2
2
|
import { ComponentProps } from "@blocknote/react";
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
4
|
|
|
5
|
-
import { cn } from "../lib/utils";
|
|
5
|
+
import { cn } from "../lib/utils.js";
|
|
6
6
|
|
|
7
7
|
export const SuggestionMenuLabel = forwardRef<
|
|
8
8
|
HTMLDivElement,
|
|
@@ -2,8 +2,8 @@ import { assertEmpty } from "@blocknote/core";
|
|
|
2
2
|
import { ComponentProps } from "@blocknote/react";
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
4
|
|
|
5
|
-
import { cn } from "../lib/utils";
|
|
6
|
-
import { useShadCNComponentsContext } from "../ShadCNComponentsContext";
|
|
5
|
+
import { cn } from "../lib/utils.js";
|
|
6
|
+
import { useShadCNComponentsContext } from "../ShadCNComponentsContext.js";
|
|
7
7
|
|
|
8
8
|
export const TableHandle = forwardRef<
|
|
9
9
|
HTMLButtonElement,
|
package/src/toolbar/Toolbar.tsx
CHANGED
|
@@ -2,8 +2,8 @@ import { assertEmpty } from "@blocknote/core";
|
|
|
2
2
|
import { ComponentProps } from "@blocknote/react";
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
4
|
|
|
5
|
-
import { cn } from "../lib/utils";
|
|
6
|
-
import { useShadCNComponentsContext } from "../ShadCNComponentsContext";
|
|
5
|
+
import { cn } from "../lib/utils.js";
|
|
6
|
+
import { useShadCNComponentsContext } from "../ShadCNComponentsContext.js";
|
|
7
7
|
|
|
8
8
|
type ToolbarProps = ComponentProps["FormattingToolbar"]["Root"] &
|
|
9
9
|
ComponentProps["LinkToolbar"]["Root"];
|