@blocknote/shadcn 0.23.1 → 0.23.3
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 +2248 -849
- package/dist/blocknote-shadcn.js.map +1 -1
- package/dist/blocknote-shadcn.umd.cjs +32 -1
- package/dist/blocknote-shadcn.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/components/ui/button.tsx +1 -0
|
@@ -1,2 +1,33 @@
|
|
|
1
|
-
(function(m,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("react/jsx-runtime"),require("@blocknote/core"),require("@blocknote/react"),require("react"),require("react-hook-form"),require("class-variance-authority"),require("clsx"),require("tailwind-merge"),require("@radix-ui/react-slot"),require("@radix-ui/react-dropdown-menu"),require("lucide-react"),require("@radix-ui/react-label"),require("@radix-ui/react-popover"),require("@radix-ui/react-select"),require("@radix-ui/react-tabs"),require("@radix-ui/react-toggle"),require("@radix-ui/react-tooltip")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","@blocknote/core","@blocknote/react","react","react-hook-form","class-variance-authority","clsx","tailwind-merge","@radix-ui/react-slot","@radix-ui/react-dropdown-menu","lucide-react","@radix-ui/react-label","@radix-ui/react-popover","@radix-ui/react-select","@radix-ui/react-tabs","@radix-ui/react-toggle","@radix-ui/react-tooltip"],o):(m=typeof globalThis<"u"?globalThis:m||self,o(m["blocknote-shadcn"]={},m.jsxRuntime,m.core,m.react,m.React,m.reactHookForm,m.classVarianceAuthority,m.clsx,m.tailwindMerge,m.reactSlot,m.DropdownMenuPrimitive,m.lucideReact,m.LabelPrimitive,m.PopoverPrimitive,m.SelectPrimitive,m.TabsPrimitive,m.TogglePrimitive,m.TooltipPrimitive))})(this,function(m,o,p,T,c,k,I,be,le,B,ce,N,pe,fe,ue,me,ge,he){"use strict";function C(n){if(n&&typeof n=="object"&&"default"in n)return n;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const e in n)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(t,e,r.get?r:{enumerable:!0,get:()=>n[e]})}}return t.default=n,Object.freeze(t)}const l=C(c),v=C(ce),L=C(pe),P=C(fe),w=C(ue),S=C(me),z=C(ge),M=C(he),ve=le.extendTailwindMerge({prefix:"bn-"});function i(...n){return ve(be.clsx(n))}const we=I.cva("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",{variants:{variant:{default:"bn-border-transparent bn-bg-primary bn-text-primary-foreground hover:bn-bg-primary/80",secondary:"bn-border-transparent bn-bg-secondary bn-text-secondary-foreground hover:bn-bg-secondary/80",destructive:"bn-border-transparent bn-bg-destructive bn-text-destructive-foreground hover:bn-bg-destructive/80",outline:"bn-text-foreground"}},defaultVariants:{variant:"default"}});function xe({className:n,variant:t,...e}){return o.jsx("div",{className:i(we({variant:t}),n),...e})}const ye=I.cva("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",{variants:{variant:{default:"bn-bg-primary bn-text-primary-foreground hover:bn-bg-primary/90",destructive:"bn-bg-destructive bn-text-destructive-foreground hover:bn-bg-destructive/90",outline:"bn-border bn-border-input bn-bg-background hover:bn-bg-accent hover:bn-text-accent-foreground",secondary:"bn-bg-secondary bn-text-secondary-foreground hover:bn-bg-secondary/80",ghost:"hover:bn-bg-accent hover:bn-text-accent-foreground",link:"bn-text-primary bn-underline-offset-4 hover:bn-underline"},size:{default:"bn-h-10 bn-px-4 bn-py-2",sm:"bn-h-9 bn-rounded-md bn-px-3",lg:"bn-h-11 bn-rounded-md bn-px-8",icon:"bn-h-10 bn-w-10"}},defaultVariants:{variant:"default",size:"default"}}),j=l.forwardRef(({className:n,variant:t,size:e,asChild:r=!1,...a},s)=>{const d=r?B.Slot:"button";return o.jsx(d,{className:i(ye({variant:t,size:e,className:n})),ref:s,...a})});j.displayName="Button";const V=l.forwardRef(({className:n,...t},e)=>o.jsx("div",{ref:e,className:i("bn-rounded-lg bn-border bn-bg-card bn-text-card-foreground bn-shadow-sm",n),...t}));V.displayName="Card";const Ne=l.forwardRef(({className:n,...t},e)=>o.jsx("div",{ref:e,className:i("bn-flex bn-flex-col bn-space-y-1.5 bn-p-6",n),...t}));Ne.displayName="CardHeader";const Ce=l.forwardRef(({className:n,...t},e)=>o.jsx("h3",{ref:e,className:i("bn-text-2xl bn-font-semibold bn-leading-none bn-tracking-tight",n),...t}));Ce.displayName="CardTitle";const Se=l.forwardRef(({className:n,...t},e)=>o.jsx("p",{ref:e,className:i("bn-text-sm bn-text-muted-foreground",n),...t}));Se.displayName="CardDescription";const q=l.forwardRef(({className:n,...t},e)=>o.jsx("div",{ref:e,className:i("bn-p-6 bn-pt-0",n),...t}));q.displayName="CardContent";const Te=l.forwardRef(({className:n,...t},e)=>o.jsx("div",{ref:e,className:i("bn-flex bn-items-center bn-p-6 bn-pt-0",n),...t}));Te.displayName="CardFooter";const Me=v.Root,De=v.Trigger,Ie=v.Sub,_=l.forwardRef(({className:n,inset:t,children:e,...r},a)=>o.jsxs(v.SubTrigger,{ref:a,className:i("bn-flex bn-cursor-default bn-select-none bn-items-center bn-rounded-sm bn-px-2 bn-py-1.5 bn-text-sm bn-outline-none focus:bn-bg-accent data-[state=open]:bn-bg-accent",t&&"bn-pl-8",n),...r,children:[e,o.jsx(N.ChevronRight,{className:"bn-ml-auto bn-h-4 bn-w-4"})]}));_.displayName=v.SubTrigger.displayName;const $=l.forwardRef(({className:n,...t},e)=>o.jsx(v.SubContent,{ref:e,className:i("bn-z-50 bn-min-w-[8rem] bn-overflow-hidden bn-rounded-md bn-border bn-bg-popover bn-p-1 bn-text-popover-foreground bn-shadow-lg data-[state=open]:bn-animate-in data-[state=closed]:bn-animate-out data-[state=closed]:bn-fade-out-0 data-[state=open]:bn-fade-in-0 data-[state=closed]:bn-zoom-out-95 data-[state=open]:bn-zoom-in-95 data-[side=bottom]:bn-slide-in-from-top-2 data-[side=left]:bn-slide-in-from-right-2 data-[side=right]:bn-slide-in-from-left-2 data-[side=top]:bn-slide-in-from-bottom-2",n),...t}));$.displayName=v.SubContent.displayName;const O=l.forwardRef(({className:n,sideOffset:t=4,...e},r)=>o.jsx(v.Content,{ref:r,sideOffset:t,className:i("bn-z-50 bn-min-w-[8rem] bn-overflow-hidden bn-rounded-md bn-border bn-bg-popover bn-p-1 bn-text-popover-foreground bn-shadow-md data-[state=open]:bn-animate-in data-[state=closed]:bn-animate-out data-[state=closed]:bn-fade-out-0 data-[state=open]:bn-fade-in-0 data-[state=closed]:bn-zoom-out-95 data-[state=open]:bn-zoom-in-95 data-[side=bottom]:bn-slide-in-from-top-2 data-[side=left]:bn-slide-in-from-right-2 data-[side=right]:bn-slide-in-from-left-2 data-[side=top]:bn-slide-in-from-bottom-2",n),...e}));O.displayName=v.Content.displayName;const G=l.forwardRef(({className:n,inset:t,...e},r)=>o.jsx(v.Item,{ref:r,className:i("bn-relative bn-flex bn-cursor-default bn-select-none bn-items-center bn-rounded-sm bn-px-2 bn-py-1.5 bn-text-sm bn-outline-none bn-transition-colors focus:bn-bg-accent focus:bn-text-accent-foreground data-[disabled]:bn-pointer-events-none data-[disabled]:bn-opacity-50",t&&"bn-pl-8",n),...e}));G.displayName=v.Item.displayName;const U=l.forwardRef(({className:n,children:t,checked:e,...r},a)=>o.jsxs(v.CheckboxItem,{ref:a,className:i("bn-relative bn-flex bn-cursor-default bn-select-none bn-items-center bn-rounded-sm bn-py-1.5 bn-pl-8 bn-pr-2 bn-text-sm bn-outline-none bn-transition-colors focus:bn-bg-accent focus:bn-text-accent-foreground data-[disabled]:bn-pointer-events-none data-[disabled]:bn-opacity-50",n),checked:e,...r,children:[o.jsx("span",{className:"bn-absolute bn-left-2 bn-flex bn-h-3.5 bn-w-3.5 bn-items-center bn-justify-center",children:o.jsx(v.ItemIndicator,{children:o.jsx(N.Check,{className:"bn-h-4 bn-w-4"})})}),t]}));U.displayName=v.CheckboxItem.displayName;const Pe=l.forwardRef(({className:n,children:t,...e},r)=>o.jsxs(v.RadioItem,{ref:r,className:i("bn-relative bn-flex bn-cursor-default bn-select-none bn-items-center bn-rounded-sm bn-py-1.5 bn-pl-8 bn-pr-2 bn-text-sm bn-outline-none bn-transition-colors focus:bn-bg-accent focus:bn-text-accent-foreground data-[disabled]:bn-pointer-events-none data-[disabled]:bn-opacity-50",n),...e,children:[o.jsx("span",{className:"bn-absolute bn-left-2 bn-flex bn-h-3.5 bn-w-3.5 bn-items-center bn-justify-center",children:o.jsx(v.ItemIndicator,{children:o.jsx(N.Circle,{className:"bn-h-2 bn-w-2 bn-fill-current"})})}),t]}));Pe.displayName=v.RadioItem.displayName;const H=l.forwardRef(({className:n,inset:t,...e},r)=>o.jsx(v.Label,{ref:r,className:i("bn-px-2 bn-py-1.5 bn-text-sm bn-font-semibold",t&&"bn-pl-8",n),...e}));H.displayName=v.Label.displayName;const K=l.forwardRef(({className:n,...t},e)=>o.jsx(v.Separator,{ref:e,className:i("bn--mx-1 bn-my-1 bn-h-px bn-bg-muted",n),...t}));K.displayName=v.Separator.displayName;const Ee=I.cva("bn-text-sm bn-font-medium bn-leading-none peer-disabled:bn-cursor-not-allowed peer-disabled:bn-opacity-70"),F=l.forwardRef(({className:n,...t},e)=>o.jsx(L.Root,{ref:e,className:i(Ee(),n),...t}));F.displayName=L.Root.displayName;const ke=k.FormProvider,Fe=l.createContext({}),E=()=>{const n=l.useContext(Fe),t=l.useContext(W),{getFieldState:e,formState:r}=k.useFormContext(),a=e(n.name,r);if(!n)throw new Error("useFormField should be used within <FormField>");const{id:s}=t;return{id:s,name:n.name,formItemId:`${s}-form-item`,formDescriptionId:`${s}-form-item-description`,formMessageId:`${s}-form-item-message`,...a}},W=l.createContext({}),Be=l.forwardRef(({className:n,...t},e)=>{const r=l.useId();return o.jsx(W.Provider,{value:{id:r},children:o.jsx("div",{ref:e,className:i("bn-space-y-2",n),...t})})});Be.displayName="FormItem";const Le=l.forwardRef(({className:n,...t},e)=>{const{error:r,formItemId:a}=E();return o.jsx(F,{ref:e,className:i(r&&"bn-text-destructive",n),htmlFor:a,...t})});Le.displayName="FormLabel";const ze=l.forwardRef(({...n},t)=>{const{error:e,formItemId:r,formDescriptionId:a,formMessageId:s}=E();return o.jsx(B.Slot,{ref:t,id:r,"aria-describedby":e?`${a} ${s}`:`${a}`,"aria-invalid":!!e,...n})});ze.displayName="FormControl";const je=l.forwardRef(({className:n,...t},e)=>{const{formDescriptionId:r}=E();return o.jsx("p",{ref:e,id:r,className:i("bn-text-sm bn-text-muted-foreground",n),...t})});je.displayName="FormDescription";const Ve=l.forwardRef(({className:n,children:t,...e},r)=>{const{error:a,formMessageId:s}=E(),d=a?String(a==null?void 0:a.message):t;return d?o.jsx("p",{ref:r,id:s,className:i("bn-text-sm bn-font-medium bn-text-destructive",n),...e,children:d}):null});Ve.displayName="FormMessage";const J=l.forwardRef(({className:n,type:t,...e},r)=>o.jsx("input",{type:t,className:i("bn-flex bn-h-10 bn-w-full bn-rounded-md bn-border bn-border-input bn-bg-background bn-px-3 bn-py-2 bn-text-sm bn-ring-offset-background file:bn-border-0 file:bn-bg-transparent file:bn-text-sm file:bn-font-medium placeholder: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-cursor-not-allowed disabled:bn-opacity-50",n),ref:r,...e}));J.displayName="Input";const qe=P.Root,_e=P.Trigger,Q=l.forwardRef(({className:n,align:t="center",sideOffset:e=4,...r},a)=>o.jsx(P.Content,{ref:a,align:t,sideOffset:e,className:i("bn-z-50 bn-w-72 bn-rounded-md bn-border bn-bg-popover bn-p-4 bn-text-popover-foreground bn-shadow-md bn-outline-none data-[state=open]:bn-animate-in data-[state=closed]:bn-animate-out data-[state=closed]:bn-fade-out-0 data-[state=open]:bn-fade-in-0 data-[state=closed]:bn-zoom-out-95 data-[state=open]:bn-zoom-in-95 data-[side=bottom]:bn-slide-in-from-top-2 data-[side=left]:bn-slide-in-from-right-2 data-[side=right]:bn-slide-in-from-left-2 data-[side=top]:bn-slide-in-from-bottom-2",n),...r}));Q.displayName=P.Content.displayName;const $e=w.Root,Oe=w.Value,X=l.forwardRef(({className:n,children:t,...e},r)=>o.jsxs(w.Trigger,{ref:r,className:i("bn-flex bn-h-10 bn-w-full bn-items-center bn-justify-between bn-rounded-md bn-border bn-border-input bn-bg-background bn-px-3 bn-py-2 bn-text-sm bn-ring-offset-background placeholder:bn-text-muted-foreground focus:bn-outline-none focus:bn-ring-2 focus:bn-ring-ring focus:bn-ring-offset-2 disabled:bn-cursor-not-allowed disabled:bn-opacity-50 [&>span]:bn-line-clamp-1",n),...e,children:[t,o.jsx(w.Icon,{asChild:!0,children:o.jsx(N.ChevronDown,{className:"bn-h-4 bn-w-4 bn-opacity-50"})})]}));X.displayName=w.Trigger.displayName;const Y=l.forwardRef(({className:n,...t},e)=>o.jsx(w.ScrollUpButton,{ref:e,className:i("bn-flex bn-cursor-default bn-items-center bn-justify-center bn-py-1",n),...t,children:o.jsx(N.ChevronUp,{className:"bn-h-4 bn-w-4"})}));Y.displayName=w.ScrollUpButton.displayName;const Z=l.forwardRef(({className:n,...t},e)=>o.jsx(w.ScrollDownButton,{ref:e,className:i("bn-flex bn-cursor-default bn-items-center bn-justify-center bn-py-1",n),...t,children:o.jsx(N.ChevronDown,{className:"bn-h-4 bn-w-4"})}));Z.displayName=w.ScrollDownButton.displayName;const A=l.forwardRef(({className:n,children:t,position:e="popper",...r},a)=>o.jsxs(w.Content,{ref:a,className:i("bn-relative bn-z-50 bn-max-h-96 bn-min-w-[8rem] bn-overflow-hidden bn-rounded-md bn-border bn-bg-popover bn-text-popover-foreground bn-shadow-md data-[state=open]:bn-animate-in data-[state=closed]:bn-animate-out data-[state=closed]:bn-fade-out-0 data-[state=open]:bn-fade-in-0 data-[state=closed]:bn-zoom-out-95 data-[state=open]:bn-zoom-in-95 data-[side=bottom]:bn-slide-in-from-top-2 data-[side=left]:bn-slide-in-from-right-2 data-[side=right]:bn-slide-in-from-left-2 data-[side=top]:bn-slide-in-from-bottom-2",e==="popper"&&"data-[side=bottom]:bn-translate-y-1 data-[side=left]:bn--translate-x-1 data-[side=right]:bn-translate-x-1 data-[side=top]:bn--translate-y-1",n),position:e,...r,children:[o.jsx(Y,{}),o.jsx(w.Viewport,{className:i("bn-p-1",e==="popper"&&"bn-h-[var(--radix-select-trigger-height)] bn-w-full bn-min-w-[var(--radix-select-trigger-width)]"),children:t}),o.jsx(Z,{})]}));A.displayName=w.Content.displayName;const Ge=l.forwardRef(({className:n,...t},e)=>o.jsx(w.Label,{ref:e,className:i("bn-py-1.5 bn-pl-8 bn-pr-2 bn-text-sm bn-font-semibold",n),...t}));Ge.displayName=w.Label.displayName;const R=l.forwardRef(({className:n,children:t,...e},r)=>o.jsxs(w.Item,{ref:r,className:i("bn-relative bn-flex bn-w-full bn-cursor-default bn-select-none bn-items-center bn-rounded-sm bn-py-1.5 bn-pl-8 bn-pr-2 bn-text-sm bn-outline-none focus:bn-bg-accent focus:bn-text-accent-foreground data-[disabled]:bn-pointer-events-none data-[disabled]:bn-opacity-50",n),...e,children:[o.jsx("span",{className:"bn-absolute bn-left-2 bn-flex bn-h-3.5 bn-w-3.5 bn-items-center bn-justify-center",children:o.jsx(w.ItemIndicator,{children:o.jsx(N.Check,{className:"bn-h-4 bn-w-4"})})}),o.jsx(w.ItemText,{children:t})]}));R.displayName=w.Item.displayName;const Ue=l.forwardRef(({className:n,...t},e)=>o.jsx(w.Separator,{ref:e,className:i("bn--mx-1 bn-my-1 bn-h-px bn-bg-muted",n),...t}));Ue.displayName=w.Separator.displayName;const He=S.Root,ee=l.forwardRef(({className:n,...t},e)=>o.jsx(S.List,{ref:e,className:i("bn-inline-flex bn-h-10 bn-items-center bn-justify-center bn-rounded-md bn-bg-muted bn-p-1 bn-text-muted-foreground",n),...t}));ee.displayName=S.List.displayName;const ne=l.forwardRef(({className:n,...t},e)=>o.jsx(S.Trigger,{ref:e,className:i("bn-inline-flex bn-items-center bn-justify-center bn-whitespace-nowrap bn-rounded-sm bn-px-3 bn-py-1.5 bn-text-sm bn-font-medium bn-ring-offset-background bn-transition-all 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=active]:bn-bg-background data-[state=active]:bn-text-foreground data-[state=active]:bn-shadow-sm",n),...t}));ne.displayName=S.Trigger.displayName;const te=l.forwardRef(({className:n,...t},e)=>o.jsx(S.Content,{ref:e,className:i("bn-mt-2 bn-ring-offset-background focus-visible:bn-outline-none focus-visible:bn-ring-2 focus-visible:bn-ring-ring focus-visible:bn-ring-offset-2",n),...t}));te.displayName=S.Content.displayName;const Ke=I.cva("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",{variants:{variant:{default:"bn-bg-transparent",outline:"bn-border bn-border-input bn-bg-transparent hover:bn-bg-accent hover:bn-text-accent-foreground"},size:{default:"bn-h-10 bn-px-3",sm:"bn-h-9 bn-px-2.5",lg:"bn-h-11 bn-px-5"}},defaultVariants:{variant:"default",size:"default"}}),oe=l.forwardRef(({className:n,variant:t,size:e,...r},a)=>o.jsx(z.Root,{ref:a,className:i(Ke({variant:t,size:e,className:n})),...r}));oe.displayName=z.Root.displayName;const We=M.Provider,Je=M.Root,Qe=M.Trigger,re=l.forwardRef(({className:n,sideOffset:t=4,...e},r)=>o.jsx(M.Content,{ref:r,sideOffset:t,className:i("bn-z-50 bn-overflow-hidden bn-rounded-md bn-border bn-bg-popover bn-px-3 bn-py-1.5 bn-text-sm bn-text-popover-foreground bn-shadow-md bn-animate-in bn-fade-in-0 bn-zoom-in-95 data-[state=closed]:bn-animate-out data-[state=closed]:bn-fade-out-0 data-[state=closed]:bn-zoom-out-95 data-[side=bottom]:bn-slide-in-from-top-2 data-[side=left]:bn-slide-in-from-right-2 data-[side=right]:bn-slide-in-from-left-2 data-[side=top]:bn-slide-in-from-bottom-2",n),...e}));re.displayName=M.Content.displayName;const Xe={Badge:{Badge:xe},Button:{Button:j},Card:{Card:V,CardContent:q},DropdownMenu:{DropdownMenu:Me,DropdownMenuCheckboxItem:U,DropdownMenuContent:O,DropdownMenuItem:G,DropdownMenuLabel:H,DropdownMenuSeparator:K,DropdownMenuSub:Ie,DropdownMenuSubContent:$,DropdownMenuSubTrigger:_,DropdownMenuTrigger:De},Form:{Form:ke},Input:{Input:J},Label:{Label:F},Popover:{Popover:qe,PopoverContent:Q,PopoverTrigger:_e},Select:{Select:$e,SelectContent:A,SelectItem:R,SelectTrigger:X,SelectValue:Oe},Tabs:{Tabs:He,TabsContent:te,TabsList:ee,TabsTrigger:ne},Toggle:{Toggle:oe},Tooltip:{Tooltip:Je,TooltipContent:re,TooltipProvider:We,TooltipTrigger:Qe}},ae=c.createContext(void 0);function h(){return c.useContext(ae)}const Ye=n=>{const{children:t,...e}=n;p.assertEmpty(e);const r=h(),a=k.useForm();return o.jsx(r.Form.Form,{...a,children:t})},Ze=c.forwardRef((n,t)=>{const{className:e,name:r,label:a,icon:s,value:d,autoFocus:u,placeholder:f,onKeyDown:b,onChange:g,onSubmit:x,...y}=n;p.assertEmpty(y);const D=h();return a?o.jsxs("div",{children:[o.jsx(D.Label.Label,{htmlFor:a,children:a}),o.jsx(D.Input.Input,{className:e,id:a,name:r,autoFocus:u,placeholder:f,value:d,onKeyDown:b,onChange:g,onSubmit:x})]}):o.jsx(D.Input.Input,{"aria-label":r,name:r,autoFocus:u,placeholder:f,value:d,onKeyDown:b,onChange:g,onSubmit:x,ref:t})}),Ae=n=>c.forwardRef((t,e)=>o.jsx(n,{onPointerDown:r=>{r.nativeEvent.fakeEvent||(r.ctrlKey=!0)},onPointerUp:r=>{const a=new PointerEvent("pointerdown",r.nativeEvent);a.fakeEvent=!0,r.target.dispatchEvent(a)},...t,ref:e})),Re=n=>{const{children:t,onOpenChange:e,position:r,sub:a,...s}=n;p.assertEmpty(s);const d=h();return a?o.jsx(d.DropdownMenu.DropdownMenuSub,{onOpenChange:e,children:t}):o.jsx(d.DropdownMenu.DropdownMenu,{onOpenChange:e,children:t})},en=n=>{const{children:t,sub:e,...r}=n;p.assertEmpty(r);const a=h(),s=c.useMemo(()=>Ae(a.DropdownMenu.DropdownMenuTrigger),[a.DropdownMenu.DropdownMenuTrigger]);return e?o.jsx(a.DropdownMenu.DropdownMenuSubTrigger,{children:t}):o.jsx(s,{asChild:!0,...r,children:t})},nn=c.forwardRef((n,t)=>{const{className:e,children:r,sub:a,...s}=n;p.assertEmpty(s);const d=h();return a?o.jsx(d.DropdownMenu.DropdownMenuSubContent,{className:e,ref:t,children:r}):o.jsx(d.DropdownMenu.DropdownMenuContent,{className:e,ref:t,children:r})}),tn=c.forwardRef((n,t)=>{const{className:e,children:r,icon:a,checked:s,subTrigger:d,onClick:u,...f}=n;p.assertEmpty(f);const b=h();return d?o.jsxs(o.Fragment,{children:[a,r]}):s!==void 0?o.jsxs(b.DropdownMenu.DropdownMenuCheckboxItem,{className:i(e,"bn-gap-1"),ref:t,checked:s,onClick:u,...f,children:[a,r]}):o.jsxs(b.DropdownMenu.DropdownMenuItem,{className:e,ref:t,onClick:u,...f,children:[a,r,d&&o.jsx(N.ChevronRight,{className:"bn-ml-auto bn-h-4 bn-w-4"})]})}),on=c.forwardRef((n,t)=>{const{className:e,...r}=n;p.assertEmpty(r);const a=h();return o.jsx(a.DropdownMenu.DropdownMenuSeparator,{className:e,ref:t})}),rn=c.forwardRef((n,t)=>{const{className:e,children:r,...a}=n;p.assertEmpty(a);const s=h();return o.jsx(s.DropdownMenu.DropdownMenuLabel,{className:e,ref:t,children:r})}),an=c.forwardRef((n,t)=>{const{className:e,tabs:r,defaultOpenTab:a,openTab:s,setOpenTab:d,loading:u,...f}=n;p.assertEmpty(f);const b=h();return o.jsxs(b.Tabs.Tabs,{className:i(e,"bn-bg-popover bn-p-2 bn-rounded-lg"),ref:t,value:s,defaultValue:a,onValueChange:d,children:[o.jsx(b.Tabs.TabsList,{children:r.map(g=>o.jsx(b.Tabs.TabsTrigger,{value:g.name,children:g.name},g.name))}),r.map(g=>o.jsx(b.Tabs.TabsContent,{value:g.name,children:o.jsx(b.Card.Card,{children:o.jsx(b.Card.CardContent,{className:"bn-p-4",children:g.tabPanel})})},g.name))]})}),sn=c.forwardRef((n,t)=>{const{className:e,children:r,...a}=n;return p.assertEmpty(a),o.jsx("div",{className:i(e,"bn-flex bn-flex-col bn-gap-2 bn-items-start bn-justify-center"),ref:t,children:r})}),dn=c.forwardRef((n,t)=>{const{className:e,value:r,placeholder:a,onKeyDown:s,onChange:d,...u}=n;p.assertEmpty(u);const f=h();return o.jsx(f.Input.Input,{"data-test":"embed-input",className:i(e,"bn-w-80"),ref:t,value:r,placeholder:a,onKeyDown:s,onChange:d})}),bn=n=>{const{children:t,opened:e,position:r,...a}=n;p.assertEmpty(a);const s=h();return o.jsx(s.Popover.Popover,{open:e,children:t})},ln=c.forwardRef((n,t)=>{const{children:e,...r}=n;p.assertEmpty(r);const a=h();return o.jsx(a.Popover.PopoverTrigger,{ref:t,asChild:!0,children:e})}),cn=c.forwardRef((n,t)=>{const{className:e,variant:r,children:a,...s}=n;p.assertEmpty(s);const d=h();return o.jsx(d.Popover.PopoverContent,{sideOffset:8,className:i(e,"bn-flex bn-flex-col bn-gap-2",r==="panel-popover"?"bn-p-0 bn-border-none bn-shadow-none bn-max-w-none bn-w-fit":""),ref:t,children:a})}),pn=c.forwardRef((n,t)=>{const{className:e,children:r,...a}=n;return p.assertEmpty(a,!1),o.jsx("div",{className:e,ref:t,...a,children:r})}),fn=c.forwardRef((n,t)=>{const{className:e,children:r,icon:a,onClick:s,onDragEnd:d,onDragStart:u,draggable:f,label:b,...g}=n;p.assertEmpty(g,!1);const x=h();return o.jsxs(x.Button.Button,{variant:"ghost",className:i(e,"bn-text-gray-400"),ref:t,"aria-label":b,onClick:s,onDragStart:u,onDragEnd:d,draggable:f,...g,children:[a,r]})}),un=c.forwardRef((n,t)=>{const{className:e,children:r,id:a,columns:s,...d}=n;return p.assertEmpty(d),o.jsx("div",{className:e,style:{gridTemplateColumns:`repeat(${s}, 1fr)`},ref:t,id:a,role:"grid",children:r})}),mn=c.forwardRef((n,t)=>{const{className:e,children:r,columns:a,...s}=n;return p.assertEmpty(s),o.jsx("div",{className:e,style:{gridColumn:`1 / ${a+1}`},ref:t,children:r})}),gn=c.forwardRef((n,t)=>{const{className:e,children:r,id:a,...s}=n;return p.assertEmpty(s),o.jsx("div",{id:a,role:"listbox",className:i("bn-z-50 bn-min-w-[8rem] bn-overflow-auto bn-rounded-md bn-border bn-bg-popover bn-p-1 bn-text-popover-foreground bn-shadow-md data-[state=open]:bn-animate-in data-[state=closed]:bn-animate-out data-[state=closed]:bn-fade-out-0 data-[state=open]:bn-fade-in-0 data-[state=closed]:bn-zoom-out-95 data-[state=open]:bn-zoom-in-95 data-[side=bottom]:bn-slide-in-from-top-2 data-[side=left]:bn-slide-in-from-right-2 data-[side=right]:bn-slide-in-from-left-2 data-[side=top]:bn-slide-in-from-bottom-2",e),ref:t,children:r})}),hn=c.forwardRef((n,t)=>{const{className:e,children:r,...a}=n;return p.assertEmpty(a),o.jsx("div",{className:i("bn-relative bn-flex bn-cursor-default bn-select-none bn-items-center bn-rounded-sm bn-px-2 bn-py-1.5 bn-text-sm bn-outline-none bn-transition-colors focus:bn-bg-accent focus:bn-text-accent-foreground data-[disabled]:bn-pointer-events-none data-[disabled]:bn-opacity-50",e),ref:t,children:o.jsx("div",{children:r})})}),vn=c.forwardRef((n,t)=>{const e=h(),{className:r,item:a,isSelected:s,onClick:d,id:u,...f}=n;p.assertEmpty(f);const b=c.useRef(null);return c.useEffect(()=>{if(!b.current||!s)return;const g=T.elementOverflow(b.current,document.querySelector(".bn-suggestion-menu"));g==="top"?b.current.scrollIntoView(!0):g==="bottom"&&b.current.scrollIntoView(!1)},[s]),o.jsxs("div",{className:i("bn-relative bn-flex bn-cursor-pointer bn-select-none bn-items-center bn-rounded-sm bn-px-2 bn-py-1.5 bn-text-sm bn-outline-none bn-transition-colors focus:bn-bg-accent focus:bn-text-accent-foreground data-[disabled]:bn-pointer-events-none data-[disabled]:bn-opacity-50",r),ref:T.mergeRefs([t,b]),id:u,onClick:d,role:"option","aria-selected":s||void 0,children:[a.icon&&o.jsx("div",{className:"bn-p-3","data-position":"left",children:a.icon}),o.jsxs("div",{className:"bn-flex-1",children:[o.jsx("div",{className:"bn-text-base",children:a.title}),o.jsx("div",{className:"bn-text-xs",children:a.subtext})]}),a.badge&&o.jsx("div",{"data-position":"right",className:"bn-text-xs",children:o.jsx(e.Badge.Badge,{variant:"secondary",children:a.badge})})]})}),wn=c.forwardRef((n,t)=>{const{className:e,children:r,...a}=n;return p.assertEmpty(a),o.jsx("div",{className:i("bn-px-2 bn-py-1.5 bn-text-sm bn-font-semibold",e),ref:t,children:r})}),xn=c.forwardRef((n,t)=>{const{className:e,children:r,...a}=n;return p.assertEmpty(a),o.jsx("div",{className:e,ref:t,children:r})}),yn=c.forwardRef((n,t)=>{const{className:e,children:r,onMouseDown:a,onClick:s,...d}=n;p.assertEmpty(d,!1);const u=h();return o.jsx(u.Button.Button,{variant:"ghost",className:i(e,"bn-p-0 bn-h-full bn-w-full bn-text-gray-400",e!=null&&e.includes("bn-extend-button-add-remove-columns")?"bn-ml-1":"bn-mt-1",e!=null&&e.includes("bn-extend-button-editing")?"bn-bg-accent bn-text-accent-foreground":""),ref:t,onClick:s,onMouseDown:a,...d,children:r})}),Nn=c.forwardRef((n,t)=>{const{className:e,children:r,draggable:a,onDragStart:s,onDragEnd:d,style:u,label:f,...b}=n;p.assertEmpty(b,!1);const g=h();return o.jsx(g.Button.Button,{variant:"ghost",className:i(e,"bn-p-0 bn-h-fit bn-w-fit bn-text-gray-400"),ref:t,"aria-label":f,draggable:a,onDragStart:s,onDragEnd:d,style:u,...b,children:r})}),se=c.forwardRef((n,t)=>{const{className:e,children:r,onMouseEnter:a,onMouseLeave:s,...d}=n;p.assertEmpty(d);const u=h();return o.jsx(u.Tooltip.TooltipProvider,{delayDuration:0,children:o.jsx("div",{className:i(e,"bn-flex bn-gap-1 bn-p-1 bn-bg-popover bn-text-popover-foreground bn-border bn-rounded-lg bn-shadow-md"),ref:t,onMouseEnter:a,onMouseLeave:s,children:r})})}),de=c.forwardRef((n,t)=>{const{className:e,children:r,mainTooltip:a,secondaryTooltip:s,icon:d,isSelected:u,isDisabled:f,onClick:b,label:g,...x}=n;p.assertEmpty(x,!1);const y=h(),D=u===void 0?o.jsxs(y.Button.Button,{className:e,variant:"ghost",disabled:f,onClick:b,ref:t,"aria-label":g,...x,children:[d,r]}):o.jsxs(y.Toggle.Toggle,{className:i(e,"data-[state=open]:bg-accent data-[state=closed]:text-accent-foreground"),"aria-label":g,onClick:b,pressed:u,disabled:f,"data-state":u?"on":"off","data-disabled":f,ref:t,...x,children:[d,r]});return o.jsxs(y.Tooltip.Tooltip,{children:[o.jsx(y.Tooltip.TooltipTrigger,{asChild:!0,children:D}),o.jsxs(y.Tooltip.TooltipContent,{className:"bn-flex bn-flex-col bn-items-center",children:[o.jsx("span",{children:a}),s&&o.jsx("span",{children:s})]})]})}),Cn=c.forwardRef((n,t)=>{const{className:e,items:r,isDisabled:a,...s}=n;p.assertEmpty(s);const d=h(),u=b=>o.jsxs("div",{className:"bn-flex bn-gap-1 bn-items-center",children:[b.icon,b.text]}),f=r.filter(b=>b.isSelected)[0];return f?o.jsxs(d.Select.Select,{value:f.text,onValueChange:b=>{var g,x;return(x=(g=r.find(y=>y.text===b)).onClick)==null?void 0:x.call(g)},disabled:a,children:[o.jsx(d.Select.SelectTrigger,{className:"bn-border-none",children:o.jsx(d.Select.SelectValue,{})}),o.jsx(d.Select.SelectContent,{className:e,ref:t,children:r.map(b=>o.jsx(d.Select.SelectItem,{disabled:b.isDisabled,value:b.text,children:o.jsx(u,{...b})},b.text))})]}):null}),Sn=c.forwardRef((n,t)=>{const{className:e,children:r,onClick:a,label:s,...d}=n;p.assertEmpty(d);const u=h();return o.jsx(u.Button.Button,{type:"submit",className:e,"aria-label":s,ref:t,onClick:a,children:r})}),Tn=c.forwardRef((n,t)=>{const{className:e,accept:r,value:a,placeholder:s,onChange:d,...u}=n;p.assertEmpty(u);const f=h();return o.jsx(f.Input.Input,{type:"file",className:e,ref:t,accept:r,value:a?a.name:void 0,onChange:async b=>d==null?void 0:d(b.target.files[0]),placeholder:s})}),Mn=c.forwardRef((n,t)=>{const{className:e,isSelected:r,onClick:a,item:s,id:d,...u}=n;p.assertEmpty(u);const f=c.useRef(null);return c.useEffect(()=>{if(!f.current||!r)return;const b=T.elementOverflow(f.current,document.querySelector(".bn-grid-suggestion-menu"));b==="top"?f.current.scrollIntoView(!0):b==="bottom"&&f.current.scrollIntoView(!1)},[r]),o.jsx("div",{className:e,ref:T.mergeRefs([t,f]),id:d,role:"option",onClick:a,"aria-selected":r||void 0,children:s.icon})}),Dn=c.forwardRef((n,t)=>{const{className:e,children:r,columns:a,...s}=n;return p.assertEmpty(s),o.jsx("div",{className:e,style:{gridColumn:`1 / ${a+1}`},ref:t,children:r})}),ie={FormattingToolbar:{Root:se,Button:de,Select:Cn},FilePanel:{Root:an,Button:Sn,FileInput:Tn,TabPanel:sn,TextInput:dn},LinkToolbar:{Root:se,Button:de},SideMenu:{Root:pn,Button:fn},SuggestionMenu:{Root:gn,Item:vn,EmptyItem:hn,Label:wn,Loader:xn},GridSuggestionMenu:{Root:un,Item:Mn,EmptyItem:mn,Loader:Dn},TableHandle:{Root:Nn,ExtendButton:yn},Generic:{Form:{Root:Ye,TextInput:Ze},Menu:{Root:Re,Trigger:en,Dropdown:nn,Divider:on,Label:rn,Item:tn},Popover:{Root:bn,Trigger:ln,Content:cn}}},In=n=>{const{className:t,shadCNComponents:e,...r}=n,a=c.useMemo(()=>({...Xe,...e}),[e]);return o.jsx(ae.Provider,{value:a,children:o.jsx(T.ComponentsContext.Provider,{value:ie,children:o.jsx(T.BlockNoteViewRaw,{className:p.mergeCSSClasses("bn-shadcn",t||""),...r})})})};m.BlockNoteView=In,m.components=ie,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(E,f){typeof exports=="object"&&typeof module<"u"?f(exports,require("react"),require("@blocknote/core"),require("@blocknote/react"),require("react-hook-form"),require("class-variance-authority"),require("clsx"),require("tailwind-merge"),require("@radix-ui/react-slot"),require("@radix-ui/react-dropdown-menu"),require("lucide-react"),require("@radix-ui/react-label"),require("@radix-ui/react-popover"),require("@radix-ui/react-select"),require("@radix-ui/react-tabs"),require("@radix-ui/react-toggle"),require("@radix-ui/react-tooltip")):typeof define=="function"&&define.amd?define(["exports","react","@blocknote/core","@blocknote/react","react-hook-form","class-variance-authority","clsx","tailwind-merge","@radix-ui/react-slot","@radix-ui/react-dropdown-menu","lucide-react","@radix-ui/react-label","@radix-ui/react-popover","@radix-ui/react-select","@radix-ui/react-tabs","@radix-ui/react-toggle","@radix-ui/react-tooltip"],f):(E=typeof globalThis<"u"?globalThis:E||self,f(E["blocknote-shadcn"]={},E.React,E.core,E.react,E.reactHookForm,E.classVarianceAuthority,E.clsx,E.tailwindMerge,E.reactSlot,E.DropdownMenuPrimitive,E.lucideReact,E.LabelPrimitive,E.PopoverPrimitive,E.SelectPrimitive,E.TabsPrimitive,E.TogglePrimitive,E.TooltipPrimitive))})(this,function(E,f,k,z,ae,X,xn,Dn,ge,yn,_,En,wn,Cn,Sn,Tn,jn){"use strict";function F(r){if(r&&typeof r=="object"&&"default"in r)return r;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const n in r)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>r[n]})}}return t.default=r,Object.freeze(t)}const p=F(f),C=F(yn),ke=F(En),Z=F(wn),T=F(Cn),O=F(Sn),he=F(Tn),G=F(jn);var ie={exports:{}},Q={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-dev-runtime.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var xe;function Bn(){if(xe)return Q;xe=1;var r=Symbol.for("react.fragment");return Q.Fragment=r,Q.jsxDEV=void 0,Q}var ee={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-dev-runtime.development.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var De;function Vn(){return De||(De=1,process.env.NODE_ENV!=="production"&&function(){var r=p.default,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),h=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),L=Symbol.for("react.offscreen"),Je=Symbol.iterator,Ar="@@iterator";function zr(e){if(e===null||typeof e!="object")return null;var i=Je&&e[Je]||e[Ar];return typeof i=="function"?i:null}var q=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function V(e){{for(var i=arguments.length,c=new Array(i>1?i-1:0),b=1;b<i;b++)c[b-1]=arguments[b];qr("error",e,c)}}function qr(e,i,c){{var b=q.ReactDebugCurrentFrame,x=b.getStackAddendum();x!==""&&(i+="%s",c=c.concat([x]));var y=c.map(function(g){return String(g)});y.unshift("Warning: "+i),Function.prototype.apply.call(console[e],console,y)}}var Wr=!1,Yr=!1,Gr=!1,Kr=!1,Hr=!1,Xe;Xe=Symbol.for("react.module.reference");function Jr(e){return!!(typeof e=="string"||typeof e=="function"||e===o||e===l||Hr||e===a||e===m||e===D||Kr||e===L||Wr||Yr||Gr||typeof e=="object"&&e!==null&&(e.$$typeof===U||e.$$typeof===B||e.$$typeof===u||e.$$typeof===h||e.$$typeof===N||e.$$typeof===Xe||e.getModuleId!==void 0))}function Xr(e,i,c){var b=e.displayName;if(b)return b;var x=i.displayName||i.name||"";return x!==""?c+"("+x+")":c}function Ze(e){return e.displayName||"Context"}function I(e){if(e==null)return null;if(typeof e.tag=="number"&&V("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case o:return"Fragment";case n:return"Portal";case l:return"Profiler";case a:return"StrictMode";case m:return"Suspense";case D:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case h:var i=e;return Ze(i)+".Consumer";case u:var c=e;return Ze(c._context)+".Provider";case N:return Xr(e,e.render,"ForwardRef");case B:var b=e.displayName||null;return b!==null?b:I(e.type)||"Memo";case U:{var x=e,y=x._payload,g=x._init;try{return I(g(y))}catch{return null}}}return null}var $=Object.assign,K=0,Qe,en,nn,rn,tn,on,sn;function an(){}an.__reactDisabledLog=!0;function Zr(){{if(K===0){Qe=console.log,en=console.info,nn=console.warn,rn=console.error,tn=console.group,on=console.groupCollapsed,sn=console.groupEnd;var e={configurable:!0,enumerable:!0,value:an,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}K++}}function Qr(){{if(K--,K===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:$({},e,{value:Qe}),info:$({},e,{value:en}),warn:$({},e,{value:nn}),error:$({},e,{value:rn}),group:$({},e,{value:tn}),groupCollapsed:$({},e,{value:on}),groupEnd:$({},e,{value:sn})})}K<0&&V("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var le=q.ReactCurrentDispatcher,ue;function re(e,i,c){{if(ue===void 0)try{throw Error()}catch(x){var b=x.stack.trim().match(/\n( *(at )?)/);ue=b&&b[1]||""}return`
|
|
18
|
+
`+ue+e}}var de=!1,te;{var et=typeof WeakMap=="function"?WeakMap:Map;te=new et}function cn(e,i){if(!e||de)return"";{var c=te.get(e);if(c!==void 0)return c}var b;de=!0;var x=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var y;y=le.current,le.current=null,Zr();try{if(i){var g=function(){throw Error()};if(Object.defineProperty(g.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(g,[])}catch(M){b=M}Reflect.construct(e,[],g)}else{try{g.call()}catch(M){b=M}e.call(g.prototype)}}else{try{throw Error()}catch(M){b=M}e()}}catch(M){if(M&&b&&typeof M.stack=="string"){for(var v=M.stack.split(`
|
|
19
|
+
`),R=b.stack.split(`
|
|
20
|
+
`),S=v.length-1,j=R.length-1;S>=1&&j>=0&&v[S]!==R[j];)j--;for(;S>=1&&j>=0;S--,j--)if(v[S]!==R[j]){if(S!==1||j!==1)do if(S--,j--,j<0||v[S]!==R[j]){var P=`
|
|
21
|
+
`+v[S].replace(" at new "," at ");return e.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",e.displayName)),typeof e=="function"&&te.set(e,P),P}while(S>=1&&j>=0);break}}}finally{de=!1,le.current=y,Qr(),Error.prepareStackTrace=x}var Y=e?e.displayName||e.name:"",A=Y?re(Y):"";return typeof e=="function"&&te.set(e,A),A}function nt(e,i,c){return cn(e,!1)}function rt(e){var i=e.prototype;return!!(i&&i.isReactComponent)}function oe(e,i,c){if(e==null)return"";if(typeof e=="function")return cn(e,rt(e));if(typeof e=="string")return re(e);switch(e){case m:return re("Suspense");case D:return re("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case N:return nt(e.render);case B:return oe(e.type,i,c);case U:{var b=e,x=b._payload,y=b._init;try{return oe(y(x),i,c)}catch{}}}return""}var H=Object.prototype.hasOwnProperty,ln={},un=q.ReactDebugCurrentFrame;function se(e){if(e){var i=e._owner,c=oe(e.type,e._source,i?i.type:null);un.setExtraStackFrame(c)}else un.setExtraStackFrame(null)}function tt(e,i,c,b,x){{var y=Function.call.bind(H);for(var g in e)if(y(e,g)){var v=void 0;try{if(typeof e[g]!="function"){var R=Error((b||"React class")+": "+c+" type `"+g+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[g]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw R.name="Invariant Violation",R}v=e[g](i,g,b,c,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(S){v=S}v&&!(v instanceof Error)&&(se(x),V("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",b||"React class",c,g,typeof v),se(null)),v instanceof Error&&!(v.message in ln)&&(ln[v.message]=!0,se(x),V("Failed %s type: %s",c,v.message),se(null))}}}var ot=Array.isArray;function me(e){return ot(e)}function st(e){{var i=typeof Symbol=="function"&&Symbol.toStringTag,c=i&&e[Symbol.toStringTag]||e.constructor.name||"Object";return c}}function at(e){try{return dn(e),!1}catch{return!0}}function dn(e){return""+e}function mn(e){if(at(e))return V("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",st(e)),dn(e)}var J=q.ReactCurrentOwner,it={key:!0,ref:!0,__self:!0,__source:!0},bn,fn,be;be={};function ct(e){if(H.call(e,"ref")){var i=Object.getOwnPropertyDescriptor(e,"ref").get;if(i&&i.isReactWarning)return!1}return e.ref!==void 0}function lt(e){if(H.call(e,"key")){var i=Object.getOwnPropertyDescriptor(e,"key").get;if(i&&i.isReactWarning)return!1}return e.key!==void 0}function ut(e,i){if(typeof e.ref=="string"&&J.current&&i&&J.current.stateNode!==i){var c=I(J.current.type);be[c]||(V('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',I(J.current.type),e.ref),be[c]=!0)}}function dt(e,i){{var c=function(){bn||(bn=!0,V("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",i))};c.isReactWarning=!0,Object.defineProperty(e,"key",{get:c,configurable:!0})}}function mt(e,i){{var c=function(){fn||(fn=!0,V("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",i))};c.isReactWarning=!0,Object.defineProperty(e,"ref",{get:c,configurable:!0})}}var bt=function(e,i,c,b,x,y,g){var v={$$typeof:t,type:e,key:i,ref:c,props:g,_owner:y};return v._store={},Object.defineProperty(v._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(v,"_self",{configurable:!1,enumerable:!1,writable:!1,value:b}),Object.defineProperty(v,"_source",{configurable:!1,enumerable:!1,writable:!1,value:x}),Object.freeze&&(Object.freeze(v.props),Object.freeze(v)),v};function ft(e,i,c,b,x){{var y,g={},v=null,R=null;c!==void 0&&(mn(c),v=""+c),lt(i)&&(mn(i.key),v=""+i.key),ct(i)&&(R=i.ref,ut(i,x));for(y in i)H.call(i,y)&&!it.hasOwnProperty(y)&&(g[y]=i[y]);if(e&&e.defaultProps){var S=e.defaultProps;for(y in S)g[y]===void 0&&(g[y]=S[y])}if(v||R){var j=typeof e=="function"?e.displayName||e.name||"Unknown":e;v&&dt(g,j),R&&mt(g,j)}return bt(e,v,R,x,b,J.current,g)}}var fe=q.ReactCurrentOwner,pn=q.ReactDebugCurrentFrame;function W(e){if(e){var i=e._owner,c=oe(e.type,e._source,i?i.type:null);pn.setExtraStackFrame(c)}else pn.setExtraStackFrame(null)}var pe;pe=!1;function Ne(e){return typeof e=="object"&&e!==null&&e.$$typeof===t}function Nn(){{if(fe.current){var e=I(fe.current.type);if(e)return`
|
|
22
|
+
|
|
23
|
+
Check the render method of \``+e+"`."}return""}}function pt(e){{if(e!==void 0){var i=e.fileName.replace(/^.*[\\\/]/,""),c=e.lineNumber;return`
|
|
24
|
+
|
|
25
|
+
Check your code at `+i+":"+c+"."}return""}}var vn={};function Nt(e){{var i=Nn();if(!i){var c=typeof e=="string"?e:e.displayName||e.name;c&&(i=`
|
|
26
|
+
|
|
27
|
+
Check the top-level render call using <`+c+">.")}return i}}function gn(e,i){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var c=Nt(i);if(vn[c])return;vn[c]=!0;var b="";e&&e._owner&&e._owner!==fe.current&&(b=" It was passed a child from "+I(e._owner.type)+"."),W(e),V('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',c,b),W(null)}}function kn(e,i){{if(typeof e!="object")return;if(me(e))for(var c=0;c<e.length;c++){var b=e[c];Ne(b)&&gn(b,i)}else if(Ne(e))e._store&&(e._store.validated=!0);else if(e){var x=zr(e);if(typeof x=="function"&&x!==e.entries)for(var y=x.call(e),g;!(g=y.next()).done;)Ne(g.value)&&gn(g.value,i)}}}function vt(e){{var i=e.type;if(i==null||typeof i=="string")return;var c;if(typeof i=="function")c=i.propTypes;else if(typeof i=="object"&&(i.$$typeof===N||i.$$typeof===B))c=i.propTypes;else return;if(c){var b=I(i);tt(c,e.props,"prop",b,e)}else if(i.PropTypes!==void 0&&!pe){pe=!0;var x=I(i);V("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",x||"Unknown")}typeof i.getDefaultProps=="function"&&!i.getDefaultProps.isReactClassApproved&&V("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function gt(e){{for(var i=Object.keys(e.props),c=0;c<i.length;c++){var b=i[c];if(b!=="children"&&b!=="key"){W(e),V("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",b),W(null);break}}e.ref!==null&&(W(e),V("Invalid attribute `ref` supplied to `React.Fragment`."),W(null))}}var hn={};function kt(e,i,c,b,x,y){{var g=Jr(e);if(!g){var v="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(v+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var R=pt(x);R?v+=R:v+=Nn();var S;e===null?S="null":me(e)?S="array":e!==void 0&&e.$$typeof===t?(S="<"+(I(e.type)||"Unknown")+" />",v=" Did you accidentally export a JSX literal instead of a component?"):S=typeof e,V("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",S,v)}var j=ft(e,i,c,x,y);if(j==null)return j;if(g){var P=i.children;if(P!==void 0)if(b)if(me(P)){for(var Y=0;Y<P.length;Y++)kn(P[Y],e);Object.freeze&&Object.freeze(P)}else V("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else kn(P,e)}if(H.call(i,"key")){var A=I(e),M=Object.keys(i).filter(function(Dt){return Dt!=="key"}),ve=M.length>0?"{key: someKey, "+M.join(": ..., ")+": ...}":"{key: someKey}";if(!hn[A+ve]){var xt=M.length>0?"{"+M.join(": ..., ")+": ...}":"{}";V(`A props object containing a "key" prop is being spread into JSX:
|
|
28
|
+
let props = %s;
|
|
29
|
+
<%s {...props} />
|
|
30
|
+
React keys must be passed directly to JSX without using spread:
|
|
31
|
+
let props = %s;
|
|
32
|
+
<%s key={someKey} {...props} />`,ve,A,xt,A),hn[A+ve]=!0}}return e===o?gt(j):vt(j),j}}var ht=kt;ee.Fragment=o,ee.jsxDEV=ht}()),ee}process.env.NODE_ENV==="production"?ie.exports=Bn():ie.exports=Vn();var s=ie.exports;const Rn=Dn.extendTailwindMerge({prefix:"bn-"});function d(...r){return Rn(xn.clsx(r))}const Mn=X.cva("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",{variants:{variant:{default:"bn-border-transparent bn-bg-primary bn-text-primary-foreground hover:bn-bg-primary/80",secondary:"bn-border-transparent bn-bg-secondary bn-text-secondary-foreground hover:bn-bg-secondary/80",destructive:"bn-border-transparent bn-bg-destructive bn-text-destructive-foreground hover:bn-bg-destructive/80",outline:"bn-text-foreground"}},defaultVariants:{variant:"default"}});function Un({className:r,variant:t,...n}){return s.jsxDEV("div",{className:d(Mn({variant:t}),r),...n},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/badge.tsx",lineNumber:32,columnNumber:5},this)}const Pn=X.cva("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",{variants:{variant:{default:"bn-bg-primary bn-text-primary-foreground hover:bn-bg-primary/90",destructive:"bn-bg-destructive bn-text-destructive-foreground hover:bn-bg-destructive/90",outline:"bn-border bn-border-input bn-bg-background hover:bn-bg-accent hover:bn-text-accent-foreground",secondary:"bn-bg-secondary bn-text-secondary-foreground hover:bn-bg-secondary/80",ghost:"hover:bn-bg-accent hover:bn-text-accent-foreground",link:"bn-text-primary bn-underline-offset-4 hover:bn-underline"},size:{default:"bn-h-10 bn-px-4 bn-py-2",sm:"bn-h-9 bn-rounded-md bn-px-3",lg:"bn-h-11 bn-rounded-md bn-px-8",icon:"bn-h-10 bn-w-10"}},defaultVariants:{variant:"default",size:"default"}}),ye=p.forwardRef(({className:r,variant:t,size:n,asChild:o=!1,...a},l)=>{const u=o?ge.Slot:"button";return s.jsxDEV(u,{className:d(Pn({variant:t,size:n,className:r})),ref:l,type:"button",...a},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/button.tsx",lineNumber:47,columnNumber:7},void 0)});ye.displayName="Button";const Ee=p.forwardRef(({className:r,...t},n)=>s.jsxDEV("div",{ref:n,className:d("bn-rounded-lg bn-border bn-bg-card bn-text-card-foreground bn-shadow-sm",r),...t},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/card.tsx",lineNumber:9,columnNumber:3},void 0));Ee.displayName="Card";const In=p.forwardRef(({className:r,...t},n)=>s.jsxDEV("div",{ref:n,className:d("bn-flex bn-flex-col bn-space-y-1.5 bn-p-6",r),...t},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/card.tsx",lineNumber:24,columnNumber:3},void 0));In.displayName="CardHeader";const _n=p.forwardRef(({className:r,...t},n)=>s.jsxDEV("h3",{ref:n,className:d("bn-text-2xl bn-font-semibold bn-leading-none bn-tracking-tight",r),...t},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/card.tsx",lineNumber:36,columnNumber:3},void 0));_n.displayName="CardTitle";const Fn=p.forwardRef(({className:r,...t},n)=>s.jsxDEV("p",{ref:n,className:d("bn-text-sm bn-text-muted-foreground",r),...t},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/card.tsx",lineNumber:51,columnNumber:3},void 0));Fn.displayName="CardDescription";const we=p.forwardRef(({className:r,...t},n)=>s.jsxDEV("div",{ref:n,className:d("bn-p-6 bn-pt-0",r),...t},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/card.tsx",lineNumber:63,columnNumber:3},void 0));we.displayName="CardContent";const On=p.forwardRef(({className:r,...t},n)=>s.jsxDEV("div",{ref:n,className:d("bn-flex bn-items-center bn-p-6 bn-pt-0",r),...t},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/card.tsx",lineNumber:71,columnNumber:3},void 0));On.displayName="CardFooter";const Ln=C.Root,$n=C.Trigger,An=C.Sub,Ce=p.forwardRef(({className:r,inset:t,children:n,...o},a)=>s.jsxDEV(C.SubTrigger,{ref:a,className:d("bn-flex bn-cursor-default bn-select-none bn-items-center bn-rounded-sm bn-px-2 bn-py-1.5 bn-text-sm bn-outline-none focus:bn-bg-accent data-[state=open]:bn-bg-accent",t&&"bn-pl-8",r),...o,children:[n,s.jsxDEV(_.ChevronRight,{className:"bn-ml-auto bn-h-4 bn-w-4"},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/dropdown-menu.tsx",lineNumber:34,columnNumber:5},void 0)]},void 0,!0,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/dropdown-menu.tsx",lineNumber:25,columnNumber:3},void 0));Ce.displayName=C.SubTrigger.displayName;const Se=p.forwardRef(({className:r,...t},n)=>s.jsxDEV(C.SubContent,{ref:n,className:d("bn-z-50 bn-min-w-[8rem] bn-overflow-hidden bn-rounded-md bn-border bn-bg-popover bn-p-1 bn-text-popover-foreground bn-shadow-lg data-[state=open]:bn-animate-in data-[state=closed]:bn-animate-out data-[state=closed]:bn-fade-out-0 data-[state=open]:bn-fade-in-0 data-[state=closed]:bn-zoom-out-95 data-[state=open]:bn-zoom-in-95 data-[side=bottom]:bn-slide-in-from-top-2 data-[side=left]:bn-slide-in-from-right-2 data-[side=right]:bn-slide-in-from-left-2 data-[side=top]:bn-slide-in-from-bottom-2",r),...t},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/dropdown-menu.tsx",lineNumber:44,columnNumber:3},void 0));Se.displayName=C.SubContent.displayName;const Te=p.forwardRef(({className:r,sideOffset:t=4,...n},o)=>s.jsxDEV(C.Content,{ref:o,sideOffset:t,className:d("bn-z-50 bn-min-w-[8rem] bn-overflow-hidden bn-rounded-md bn-border bn-bg-popover bn-p-1 bn-text-popover-foreground bn-shadow-md data-[state=open]:bn-animate-in data-[state=closed]:bn-animate-out data-[state=closed]:bn-fade-out-0 data-[state=open]:bn-fade-in-0 data-[state=closed]:bn-zoom-out-95 data-[state=open]:bn-zoom-in-95 data-[side=bottom]:bn-slide-in-from-top-2 data-[side=left]:bn-slide-in-from-right-2 data-[side=right]:bn-slide-in-from-left-2 data-[side=top]:bn-slide-in-from-bottom-2",r),...n},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/dropdown-menu.tsx",lineNumber:61,columnNumber:3},void 0));Te.displayName=C.Content.displayName;const je=p.forwardRef(({className:r,inset:t,...n},o)=>s.jsxDEV(C.Item,{ref:o,className:d("bn-relative bn-flex bn-cursor-default bn-select-none bn-items-center bn-rounded-sm bn-px-2 bn-py-1.5 bn-text-sm bn-outline-none bn-transition-colors focus:bn-bg-accent focus:bn-text-accent-foreground data-[disabled]:bn-pointer-events-none data-[disabled]:bn-opacity-50",t&&"bn-pl-8",r),...n},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/dropdown-menu.tsx",lineNumber:80,columnNumber:3},void 0));je.displayName=C.Item.displayName;const Be=p.forwardRef(({className:r,children:t,checked:n,...o},a)=>s.jsxDEV(C.CheckboxItem,{ref:a,className:d("bn-relative bn-flex bn-cursor-default bn-select-none bn-items-center bn-rounded-sm bn-py-1.5 bn-pl-8 bn-pr-2 bn-text-sm bn-outline-none bn-transition-colors focus:bn-bg-accent focus:bn-text-accent-foreground data-[disabled]:bn-pointer-events-none data-[disabled]:bn-opacity-50",r),checked:n,...o,children:[s.jsxDEV("span",{className:"bn-absolute bn-left-2 bn-flex bn-h-3.5 bn-w-3.5 bn-items-center bn-justify-center",children:s.jsxDEV(C.ItemIndicator,{children:s.jsxDEV(_.Check,{className:"bn-h-4 bn-w-4"},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/dropdown-menu.tsx",lineNumber:106,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/dropdown-menu.tsx",lineNumber:105,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/dropdown-menu.tsx",lineNumber:104,columnNumber:5},void 0),t]},void 0,!0,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/dropdown-menu.tsx",lineNumber:96,columnNumber:3},void 0));Be.displayName=C.CheckboxItem.displayName;const zn=p.forwardRef(({className:r,children:t,...n},o)=>s.jsxDEV(C.RadioItem,{ref:o,className:d("bn-relative bn-flex bn-cursor-default bn-select-none bn-items-center bn-rounded-sm bn-py-1.5 bn-pl-8 bn-pr-2 bn-text-sm bn-outline-none bn-transition-colors focus:bn-bg-accent focus:bn-text-accent-foreground data-[disabled]:bn-pointer-events-none data-[disabled]:bn-opacity-50",r),...n,children:[s.jsxDEV("span",{className:"bn-absolute bn-left-2 bn-flex bn-h-3.5 bn-w-3.5 bn-items-center bn-justify-center",children:s.jsxDEV(C.ItemIndicator,{children:s.jsxDEV(_.Circle,{className:"bn-h-2 bn-w-2 bn-fill-current"},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/dropdown-menu.tsx",lineNumber:128,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/dropdown-menu.tsx",lineNumber:127,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/dropdown-menu.tsx",lineNumber:126,columnNumber:5},void 0),t]},void 0,!0,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/dropdown-menu.tsx",lineNumber:119,columnNumber:3},void 0));zn.displayName=C.RadioItem.displayName;const Ve=p.forwardRef(({className:r,inset:t,...n},o)=>s.jsxDEV(C.Label,{ref:o,className:d("bn-px-2 bn-py-1.5 bn-text-sm bn-font-semibold",t&&"bn-pl-8",r),...n},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/dropdown-menu.tsx",lineNumber:142,columnNumber:3},void 0));Ve.displayName=C.Label.displayName;const Re=p.forwardRef(({className:r,...t},n)=>s.jsxDEV(C.Separator,{ref:n,className:d("bn--mx-1 bn-my-1 bn-h-px bn-bg-muted",r),...t},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/dropdown-menu.tsx",lineNumber:158,columnNumber:3},void 0));Re.displayName=C.Separator.displayName;const qn=X.cva("bn-text-sm bn-font-medium bn-leading-none peer-disabled:bn-cursor-not-allowed peer-disabled:bn-opacity-70"),ce=p.forwardRef(({className:r,...t},n)=>s.jsxDEV(ke.Root,{ref:n,className:d(qn(),r),...t},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/label.tsx",lineNumber:16,columnNumber:3},void 0));ce.displayName=ke.Root.displayName;const Wn=ae.FormProvider,Yn=p.createContext({}),ne=()=>{const r=p.useContext(Yn),t=p.useContext(Me),{getFieldState:n,formState:o}=ae.useFormContext(),a=n(r.name,o);if(!r)throw new Error("useFormField should be used within <FormField>");const{id:l}=t;return{id:l,name:r.name,formItemId:`${l}-form-item`,formDescriptionId:`${l}-form-item-description`,formMessageId:`${l}-form-item-message`,...a}},Me=p.createContext({}),Gn=p.forwardRef(({className:r,...t},n)=>{const o=p.useId();return s.jsxDEV(Me.Provider,{value:{id:o},children:s.jsxDEV("div",{ref:n,className:d("bn-space-y-2",r),...t},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/form.tsx",lineNumber:81,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/form.tsx",lineNumber:80,columnNumber:5},void 0)});Gn.displayName="FormItem";const Kn=p.forwardRef(({className:r,...t},n)=>{const{error:o,formItemId:a}=ne();return s.jsxDEV(ce,{ref:n,className:d(o&&"bn-text-destructive",r),htmlFor:a,...t},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/form.tsx",lineNumber:94,columnNumber:5},void 0)});Kn.displayName="FormLabel";const Hn=p.forwardRef(({...r},t)=>{const{error:n,formItemId:o,formDescriptionId:a,formMessageId:l}=ne();return s.jsxDEV(ge.Slot,{ref:t,id:o,"aria-describedby":n?`${a} ${l}`:`${a}`,"aria-invalid":!!n,...r},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/form.tsx",lineNumber:112,columnNumber:5},void 0)});Hn.displayName="FormControl";const Jn=p.forwardRef(({className:r,...t},n)=>{const{formDescriptionId:o}=ne();return s.jsxDEV("p",{ref:n,id:o,className:d("bn-text-sm bn-text-muted-foreground",r),...t},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/form.tsx",lineNumber:134,columnNumber:5},void 0)});Jn.displayName="FormDescription";const Xn=p.forwardRef(({className:r,children:t,...n},o)=>{const{error:a,formMessageId:l}=ne(),u=a?String(a==null?void 0:a.message):t;return u?s.jsxDEV("p",{ref:o,id:l,className:d("bn-text-sm bn-font-medium bn-text-destructive",r),...n,children:u},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/form.tsx",lineNumber:156,columnNumber:5},void 0):null});Xn.displayName="FormMessage";const Ue=p.forwardRef(({className:r,type:t,...n},o)=>s.jsxDEV("input",{type:t,className:d("bn-flex bn-h-10 bn-w-full bn-rounded-md bn-border bn-border-input bn-bg-background bn-px-3 bn-py-2 bn-text-sm bn-ring-offset-background file:bn-border-0 file:bn-bg-transparent file:bn-text-sm file:bn-font-medium placeholder: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-cursor-not-allowed disabled:bn-opacity-50",r),ref:o,...n},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/input.tsx",lineNumber:11,columnNumber:7},void 0));Ue.displayName="Input";const Zn=Z.Root,Qn=Z.Trigger,Pe=p.forwardRef(({className:r,align:t="center",sideOffset:n=4,...o},a)=>s.jsxDEV(Z.Content,{ref:a,align:t,sideOffset:n,className:d("bn-z-50 bn-w-72 bn-rounded-md bn-border bn-bg-popover bn-p-4 bn-text-popover-foreground bn-shadow-md bn-outline-none data-[state=open]:bn-animate-in data-[state=closed]:bn-animate-out data-[state=closed]:bn-fade-out-0 data-[state=open]:bn-fade-in-0 data-[state=closed]:bn-zoom-out-95 data-[state=open]:bn-zoom-in-95 data-[side=bottom]:bn-slide-in-from-top-2 data-[side=left]:bn-slide-in-from-right-2 data-[side=right]:bn-slide-in-from-left-2 data-[side=top]:bn-slide-in-from-bottom-2",r),...o},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/popover.tsx",lineNumber:15,columnNumber:3},void 0));Pe.displayName=Z.Content.displayName;const er=T.Root,nr=T.Value,Ie=p.forwardRef(({className:r,children:t,...n},o)=>s.jsxDEV(T.Trigger,{ref:o,className:d("bn-flex bn-h-10 bn-w-full bn-items-center bn-justify-between bn-rounded-md bn-border bn-border-input bn-bg-background bn-px-3 bn-py-2 bn-text-sm bn-ring-offset-background placeholder:bn-text-muted-foreground focus:bn-outline-none focus:bn-ring-2 focus:bn-ring-ring focus:bn-ring-offset-2 disabled:bn-cursor-not-allowed disabled:bn-opacity-50 [&>span]:bn-line-clamp-1",r),...n,children:[t,s.jsxDEV(T.Icon,{asChild:!0,children:s.jsxDEV(_.ChevronDown,{className:"bn-h-4 bn-w-4 bn-opacity-50"},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/select.tsx",lineNumber:26,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/select.tsx",lineNumber:25,columnNumber:5},void 0)]},void 0,!0,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/select.tsx",lineNumber:17,columnNumber:3},void 0));Ie.displayName=T.Trigger.displayName;const _e=p.forwardRef(({className:r,...t},n)=>s.jsxDEV(T.ScrollUpButton,{ref:n,className:d("bn-flex bn-cursor-default bn-items-center bn-justify-center bn-py-1",r),...t,children:s.jsxDEV(_.ChevronUp,{className:"bn-h-4 bn-w-4"},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/select.tsx",lineNumber:43,columnNumber:5},void 0)},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/select.tsx",lineNumber:36,columnNumber:3},void 0));_e.displayName=T.ScrollUpButton.displayName;const Fe=p.forwardRef(({className:r,...t},n)=>s.jsxDEV(T.ScrollDownButton,{ref:n,className:d("bn-flex bn-cursor-default bn-items-center bn-justify-center bn-py-1",r),...t,children:s.jsxDEV(_.ChevronDown,{className:"bn-h-4 bn-w-4"},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/select.tsx",lineNumber:59,columnNumber:5},void 0)},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/select.tsx",lineNumber:52,columnNumber:3},void 0));Fe.displayName=T.ScrollDownButton.displayName;const Oe=p.forwardRef(({className:r,children:t,position:n="popper",...o},a)=>s.jsxDEV(T.Content,{ref:a,className:d("bn-relative bn-z-50 bn-max-h-96 bn-min-w-[8rem] bn-overflow-hidden bn-rounded-md bn-border bn-bg-popover bn-text-popover-foreground bn-shadow-md data-[state=open]:bn-animate-in data-[state=closed]:bn-animate-out data-[state=closed]:bn-fade-out-0 data-[state=open]:bn-fade-in-0 data-[state=closed]:bn-zoom-out-95 data-[state=open]:bn-zoom-in-95 data-[side=bottom]:bn-slide-in-from-top-2 data-[side=left]:bn-slide-in-from-right-2 data-[side=right]:bn-slide-in-from-left-2 data-[side=top]:bn-slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:bn-translate-y-1 data-[side=left]:bn--translate-x-1 data-[side=right]:bn-translate-x-1 data-[side=top]:bn--translate-y-1",r),position:n,...o,children:[s.jsxDEV(_e,{},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/select.tsx",lineNumber:80,columnNumber:5},void 0),s.jsxDEV(T.Viewport,{className:d("bn-p-1",n==="popper"&&"bn-h-[var(--radix-select-trigger-height)] bn-w-full bn-min-w-[var(--radix-select-trigger-width)]"),children:t},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/select.tsx",lineNumber:81,columnNumber:5},void 0),s.jsxDEV(Fe,{},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/select.tsx",lineNumber:89,columnNumber:5},void 0)]},void 0,!0,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/select.tsx",lineNumber:70,columnNumber:3},void 0));Oe.displayName=T.Content.displayName;const rr=p.forwardRef(({className:r,...t},n)=>s.jsxDEV(T.Label,{ref:n,className:d("bn-py-1.5 bn-pl-8 bn-pr-2 bn-text-sm bn-font-semibold",r),...t},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/select.tsx",lineNumber:99,columnNumber:3},void 0));rr.displayName=T.Label.displayName;const Le=p.forwardRef(({className:r,children:t,...n},o)=>s.jsxDEV(T.Item,{ref:o,className:d("bn-relative bn-flex bn-w-full bn-cursor-default bn-select-none bn-items-center bn-rounded-sm bn-py-1.5 bn-pl-8 bn-pr-2 bn-text-sm bn-outline-none focus:bn-bg-accent focus:bn-text-accent-foreground data-[disabled]:bn-pointer-events-none data-[disabled]:bn-opacity-50",r),...n,children:[s.jsxDEV("span",{className:"bn-absolute bn-left-2 bn-flex bn-h-3.5 bn-w-3.5 bn-items-center bn-justify-center",children:s.jsxDEV(T.ItemIndicator,{children:s.jsxDEV(_.Check,{className:"bn-h-4 bn-w-4"},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/select.tsx",lineNumber:123,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/select.tsx",lineNumber:122,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/select.tsx",lineNumber:121,columnNumber:5},void 0),s.jsxDEV(T.ItemText,{children:t},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/select.tsx",lineNumber:127,columnNumber:5},void 0)]},void 0,!0,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/select.tsx",lineNumber:114,columnNumber:3},void 0));Le.displayName=T.Item.displayName;const tr=p.forwardRef(({className:r,...t},n)=>s.jsxDEV(T.Separator,{ref:n,className:d("bn--mx-1 bn-my-1 bn-h-px bn-bg-muted",r),...t},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/select.tsx",lineNumber:136,columnNumber:3},void 0));tr.displayName=T.Separator.displayName;const or=O.Root,$e=p.forwardRef(({className:r,...t},n)=>s.jsxDEV(O.List,{ref:n,className:d("bn-inline-flex bn-h-10 bn-items-center bn-justify-center bn-rounded-md bn-bg-muted bn-p-1 bn-text-muted-foreground",r),...t},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/tabs.tsx",lineNumber:12,columnNumber:3},void 0));$e.displayName=O.List.displayName;const Ae=p.forwardRef(({className:r,...t},n)=>s.jsxDEV(O.Trigger,{ref:n,className:d("bn-inline-flex bn-items-center bn-justify-center bn-whitespace-nowrap bn-rounded-sm bn-px-3 bn-py-1.5 bn-text-sm bn-font-medium bn-ring-offset-background bn-transition-all 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=active]:bn-bg-background data-[state=active]:bn-text-foreground data-[state=active]:bn-shadow-sm",r),...t},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/tabs.tsx",lineNumber:27,columnNumber:3},void 0));Ae.displayName=O.Trigger.displayName;const ze=p.forwardRef(({className:r,...t},n)=>s.jsxDEV(O.Content,{ref:n,className:d("bn-mt-2 bn-ring-offset-background focus-visible:bn-outline-none focus-visible:bn-ring-2 focus-visible:bn-ring-ring focus-visible:bn-ring-offset-2",r),...t},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/tabs.tsx",lineNumber:42,columnNumber:3},void 0));ze.displayName=O.Content.displayName;const sr=X.cva("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",{variants:{variant:{default:"bn-bg-transparent",outline:"bn-border bn-border-input bn-bg-transparent hover:bn-bg-accent hover:bn-text-accent-foreground"},size:{default:"bn-h-10 bn-px-3",sm:"bn-h-9 bn-px-2.5",lg:"bn-h-11 bn-px-5"}},defaultVariants:{variant:"default",size:"default"}}),qe=p.forwardRef(({className:r,variant:t,size:n,...o},a)=>s.jsxDEV(he.Root,{ref:a,className:d(sr({variant:t,size:n,className:r})),...o},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/toggle.tsx",lineNumber:34,columnNumber:3},void 0));qe.displayName=he.Root.displayName;const ar=G.Provider,ir=G.Root,cr=G.Trigger,We=p.forwardRef(({className:r,sideOffset:t=4,...n},o)=>s.jsxDEV(G.Content,{ref:o,sideOffset:t,className:d("bn-z-50 bn-overflow-hidden bn-rounded-md bn-border bn-bg-popover bn-px-3 bn-py-1.5 bn-text-sm bn-text-popover-foreground bn-shadow-md bn-animate-in bn-fade-in-0 bn-zoom-in-95 data-[state=closed]:bn-animate-out data-[state=closed]:bn-fade-out-0 data-[state=closed]:bn-zoom-out-95 data-[side=bottom]:bn-slide-in-from-top-2 data-[side=left]:bn-slide-in-from-right-2 data-[side=right]:bn-slide-in-from-left-2 data-[side=top]:bn-slide-in-from-bottom-2",r),...n},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/components/ui/tooltip.tsx",lineNumber:16,columnNumber:3},void 0));We.displayName=G.Content.displayName;const lr={Badge:{Badge:Un},Button:{Button:ye},Card:{Card:Ee,CardContent:we},DropdownMenu:{DropdownMenu:Ln,DropdownMenuCheckboxItem:Be,DropdownMenuContent:Te,DropdownMenuItem:je,DropdownMenuLabel:Ve,DropdownMenuSeparator:Re,DropdownMenuSub:An,DropdownMenuSubContent:Se,DropdownMenuSubTrigger:Ce,DropdownMenuTrigger:$n},Form:{Form:Wn},Input:{Input:Ue},Label:{Label:ce},Popover:{Popover:Zn,PopoverContent:Pe,PopoverTrigger:Qn},Select:{Select:er,SelectContent:Oe,SelectItem:Le,SelectTrigger:Ie,SelectValue:nr},Tabs:{Tabs:or,TabsContent:ze,TabsList:$e,TabsTrigger:Ae},Toggle:{Toggle:qe},Tooltip:{Tooltip:ir,TooltipContent:We,TooltipProvider:ar,TooltipTrigger:cr}},Ye=f.createContext(void 0);function w(){return f.useContext(Ye)}const ur=r=>{const{children:t,...n}=r;k.assertEmpty(n);const o=w(),a=ae.useForm();return s.jsxDEV(o.Form.Form,{...a,children:t},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/form/Form.tsx",lineNumber:17,columnNumber:5},void 0)},dr=f.forwardRef((r,t)=>{const{className:n,name:o,label:a,icon:l,value:u,autoFocus:h,placeholder:N,onKeyDown:m,onChange:D,onSubmit:B,...U}=r;k.assertEmpty(U);const L=w();return a?s.jsxDEV("div",{children:[s.jsxDEV(L.Label.Label,{htmlFor:a,children:a},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/form/TextInput.tsx",lineNumber:47,columnNumber:7},void 0),s.jsxDEV(L.Input.Input,{className:n,id:a,name:o,autoFocus:h,placeholder:N,value:u,onKeyDown:m,onChange:D,onSubmit:B},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/form/TextInput.tsx",lineNumber:50,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/form/TextInput.tsx",lineNumber:46,columnNumber:5},void 0):s.jsxDEV(L.Input.Input,{"aria-label":o,name:o,autoFocus:h,placeholder:N,value:u,onKeyDown:m,onChange:D,onSubmit:B,ref:t},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/form/TextInput.tsx",lineNumber:31,columnNumber:7},void 0)}),mr=r=>f.forwardRef((t,n)=>s.jsxDEV(r,{onPointerDown:o=>{o.nativeEvent.fakeEvent||(o.ctrlKey=!0)},onPointerUp:o=>{const a=new PointerEvent("pointerdown",o.nativeEvent);a.fakeEvent=!0,o.target.dispatchEvent(a)},...t,ref:n},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/menu/Menu.tsx",lineNumber:16,columnNumber:9},void 0)),br=r=>{const{children:t,onOpenChange:n,position:o,sub:a,...l}=r;k.assertEmpty(l);const u=w();return a?s.jsxDEV(u.DropdownMenu.DropdownMenuSub,{onOpenChange:n,children:t},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/menu/Menu.tsx",lineNumber:52,columnNumber:7},void 0):s.jsxDEV(u.DropdownMenu.DropdownMenu,{onOpenChange:n,children:t},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/menu/Menu.tsx",lineNumber:59,columnNumber:7},void 0)},fr=r=>{const{children:t,sub:n,...o}=r;k.assertEmpty(o);const a=w(),l=f.useMemo(()=>mr(a.DropdownMenu.DropdownMenuTrigger),[a.DropdownMenu.DropdownMenuTrigger]);return n?s.jsxDEV(a.DropdownMenu.DropdownMenuSubTrigger,{children:t},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/menu/Menu.tsx",lineNumber:85,columnNumber:7},void 0):s.jsxDEV(l,{asChild:!0,...o,children:t},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/menu/Menu.tsx",lineNumber:91,columnNumber:7},void 0)},pr=f.forwardRef((r,t)=>{const{className:n,children:o,sub:a,...l}=r;k.assertEmpty(l);const u=w();return a?s.jsxDEV(u.DropdownMenu.DropdownMenuSubContent,{className:n,ref:t,children:o},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/menu/Menu.tsx",lineNumber:110,columnNumber:7},void 0):s.jsxDEV(u.DropdownMenu.DropdownMenuContent,{className:n,ref:t,children:o},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/menu/Menu.tsx",lineNumber:118,columnNumber:7},void 0)}),Nr=f.forwardRef((r,t)=>{const{className:n,children:o,icon:a,checked:l,subTrigger:u,onClick:h,...N}=r;k.assertEmpty(N);const m=w();return u?s.jsxDEV(s.Fragment,{children:[a,o]},void 0,!0,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/menu/Menu.tsx",lineNumber:140,columnNumber:7},void 0):l!==void 0?s.jsxDEV(m.DropdownMenu.DropdownMenuCheckboxItem,{className:d(n,"bn-gap-1"),ref:t,checked:l,onClick:h,...N,children:[a,o]},void 0,!0,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/menu/Menu.tsx",lineNumber:149,columnNumber:7},void 0):s.jsxDEV(m.DropdownMenu.DropdownMenuItem,{className:n,ref:t,onClick:h,...N,children:[a,o,u&&s.jsxDEV(_.ChevronRight,{className:"bn-ml-auto bn-h-4 bn-w-4"},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/menu/Menu.tsx",lineNumber:169,columnNumber:22},void 0)]},void 0,!0,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/menu/Menu.tsx",lineNumber:162,columnNumber:5},void 0)}),vr=f.forwardRef((r,t)=>{const{className:n,...o}=r;k.assertEmpty(o);const a=w();return s.jsxDEV(a.DropdownMenu.DropdownMenuSeparator,{className:n,ref:t},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/menu/Menu.tsx",lineNumber:185,columnNumber:5},void 0)}),gr=f.forwardRef((r,t)=>{const{className:n,children:o,...a}=r;k.assertEmpty(a);const l=w();return s.jsxDEV(l.DropdownMenu.DropdownMenuLabel,{className:n,ref:t,children:o},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/menu/Menu.tsx",lineNumber:203,columnNumber:5},void 0)}),kr=f.forwardRef((r,t)=>{const{className:n,tabs:o,defaultOpenTab:a,openTab:l,setOpenTab:u,loading:h,...N}=r;k.assertEmpty(N);const m=w();return s.jsxDEV(m.Tabs.Tabs,{className:d(n,"bn-bg-popover bn-p-2 bn-rounded-lg"),ref:t,value:l,defaultValue:a,onValueChange:u,children:[s.jsxDEV(m.Tabs.TabsList,{children:o.map(D=>s.jsxDEV(m.Tabs.TabsTrigger,{value:D.name,children:D.name},D.name,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/panel/Panel.tsx",lineNumber:37,columnNumber:11},void 0))},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/panel/Panel.tsx",lineNumber:35,columnNumber:7},void 0),o.map(D=>s.jsxDEV(m.Tabs.TabsContent,{value:D.name,children:s.jsxDEV(m.Card.Card,{children:s.jsxDEV(m.Card.CardContent,{className:"bn-p-4",children:D.tabPanel},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/panel/Panel.tsx",lineNumber:46,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/panel/Panel.tsx",lineNumber:45,columnNumber:11},void 0)},D.name,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/panel/Panel.tsx",lineNumber:44,columnNumber:9},void 0))]},void 0,!0,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/panel/Panel.tsx",lineNumber:27,columnNumber:5},void 0)}),hr=f.forwardRef((r,t)=>{const{className:n,children:o,...a}=r;return k.assertEmpty(a),s.jsxDEV("div",{className:d(n,"bn-flex bn-flex-col bn-gap-2 bn-items-start bn-justify-center"),ref:t,children:o},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/panel/PanelTab.tsx",lineNumber:16,columnNumber:5},void 0)}),xr=f.forwardRef((r,t)=>{const{className:n,value:o,placeholder:a,onKeyDown:l,onChange:u,...h}=r;k.assertEmpty(h);const N=w();return s.jsxDEV(N.Input.Input,{"data-test":"embed-input",className:d(n,"bn-w-80"),ref:t,value:o,placeholder:a,onKeyDown:l,onChange:u},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/panel/PanelTextInput.tsx",lineNumber:19,columnNumber:5},void 0)}),Dr=r=>{const{children:t,opened:n,position:o,...a}=r;k.assertEmpty(a);const l=w();return s.jsxDEV(l.Popover.Popover,{open:n,children:t},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/popover/popover.tsx",lineNumber:23,columnNumber:5},void 0)},yr=f.forwardRef((r,t)=>{const{children:n,...o}=r;k.assertEmpty(o);const a=w();return s.jsxDEV(a.Popover.PopoverTrigger,{ref:t,asChild:!0,children:n},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/popover/popover.tsx",lineNumber:38,columnNumber:7},void 0)}),Er=f.forwardRef((r,t)=>{const{className:n,variant:o,children:a,...l}=r;k.assertEmpty(l);const u=w();return s.jsxDEV(u.Popover.PopoverContent,{sideOffset:8,className:d(n,"bn-flex bn-flex-col bn-gap-2",o==="panel-popover"?"bn-p-0 bn-border-none bn-shadow-none bn-max-w-none bn-w-fit":""),ref:t,children:a},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/popover/popover.tsx",lineNumber:56,columnNumber:5},void 0)}),wr=f.forwardRef((r,t)=>{const{className:n,children:o,...a}=r;return k.assertEmpty(a,!1),s.jsxDEV("div",{className:n,ref:t,...a,children:o},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/sideMenu/SideMenu.tsx",lineNumber:14,columnNumber:5},void 0)}),Cr=f.forwardRef((r,t)=>{const{className:n,children:o,icon:a,onClick:l,onDragEnd:u,onDragStart:h,draggable:N,label:m,...D}=r;k.assertEmpty(D,!1);const B=w();return s.jsxDEV(B.Button.Button,{variant:"ghost",className:d(n,"bn-text-gray-400"),ref:t,"aria-label":m,onClick:l,onDragStart:h,onDragEnd:u,draggable:N,...D,children:[a,o]},void 0,!0,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/sideMenu/SideMenuButton.tsx",lineNumber:31,columnNumber:5},void 0)}),Sr=f.forwardRef((r,t)=>{const{className:n,children:o,id:a,columns:l,...u}=r;return k.assertEmpty(u),s.jsxDEV("div",{className:n,style:{gridTemplateColumns:`repeat(${l}, 1fr)`},ref:t,id:a,role:"grid",children:o},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenu.tsx",lineNumber:14,columnNumber:5},void 0)}),Tr=f.forwardRef((r,t)=>{const{className:n,children:o,columns:a,...l}=r;return k.assertEmpty(l),s.jsxDEV("div",{className:n,style:{gridColumn:`1 / ${a+1}`},ref:t,children:o},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuEmptyItem.tsx",lineNumber:14,columnNumber:5},void 0)}),jr=f.forwardRef((r,t)=>{const{className:n,children:o,id:a,...l}=r;return k.assertEmpty(l),s.jsxDEV("div",{id:a,role:"listbox",className:d("bn-z-50 bn-min-w-[8rem] bn-overflow-auto bn-rounded-md bn-border bn-bg-popover bn-p-1 bn-text-popover-foreground bn-shadow-md data-[state=open]:bn-animate-in data-[state=closed]:bn-animate-out data-[state=closed]:bn-fade-out-0 data-[state=open]:bn-fade-in-0 data-[state=closed]:bn-zoom-out-95 data-[state=open]:bn-zoom-in-95 data-[side=bottom]:bn-slide-in-from-top-2 data-[side=left]:bn-slide-in-from-right-2 data-[side=right]:bn-slide-in-from-left-2 data-[side=top]:bn-slide-in-from-bottom-2",n),ref:t,children:o},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/suggestionMenu/SuggestionMenu.tsx",lineNumber:16,columnNumber:5},void 0)}),Br=f.forwardRef((r,t)=>{const{className:n,children:o,...a}=r;return k.assertEmpty(a),s.jsxDEV("div",{className:d("bn-relative bn-flex bn-cursor-default bn-select-none bn-items-center bn-rounded-sm bn-px-2 bn-py-1.5 bn-text-sm bn-outline-none bn-transition-colors focus:bn-bg-accent focus:bn-text-accent-foreground data-[disabled]:bn-pointer-events-none data-[disabled]:bn-opacity-50",n),ref:t,children:s.jsxDEV("div",{children:o},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/suggestionMenu/SuggestionMenuEmptyItem.tsx",lineNumber:23,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/suggestionMenu/SuggestionMenuEmptyItem.tsx",lineNumber:16,columnNumber:5},void 0)}),Vr=f.forwardRef((r,t)=>{const n=w(),{className:o,item:a,isSelected:l,onClick:u,id:h,...N}=r;k.assertEmpty(N);const m=f.useRef(null);return f.useEffect(()=>{if(!m.current||!l)return;const D=z.elementOverflow(m.current,document.querySelector(".bn-suggestion-menu"));D==="top"?m.current.scrollIntoView(!0):D==="bottom"&&m.current.scrollIntoView(!1)},[l]),s.jsxDEV("div",{className:d("bn-relative bn-flex bn-cursor-pointer bn-select-none bn-items-center bn-rounded-sm bn-px-2 bn-py-1.5 bn-text-sm bn-outline-none bn-transition-colors focus:bn-bg-accent focus:bn-text-accent-foreground data-[disabled]:bn-pointer-events-none data-[disabled]:bn-opacity-50",o),ref:z.mergeRefs([t,m]),id:h,onClick:u,role:"option","aria-selected":l||void 0,children:[a.icon&&s.jsxDEV("div",{className:"bn-p-3","data-position":"left",children:a.icon},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/suggestionMenu/SuggestionMenuItem.tsx",lineNumber:49,columnNumber:9},void 0),s.jsxDEV("div",{className:"bn-flex-1",children:[s.jsxDEV("div",{className:"bn-text-base",children:a.title},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/suggestionMenu/SuggestionMenuItem.tsx",lineNumber:54,columnNumber:9},void 0),s.jsxDEV("div",{className:"bn-text-xs",children:a.subtext},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/suggestionMenu/SuggestionMenuItem.tsx",lineNumber:55,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/suggestionMenu/SuggestionMenuItem.tsx",lineNumber:53,columnNumber:7},void 0),a.badge&&s.jsxDEV("div",{"data-position":"right",className:"bn-text-xs",children:s.jsxDEV(n.Badge.Badge,{variant:"secondary",children:a.badge},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/suggestionMenu/SuggestionMenuItem.tsx",lineNumber:59,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/suggestionMenu/SuggestionMenuItem.tsx",lineNumber:58,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/suggestionMenu/SuggestionMenuItem.tsx",lineNumber:37,columnNumber:5},void 0)}),Rr=f.forwardRef((r,t)=>{const{className:n,children:o,...a}=r;return k.assertEmpty(a),s.jsxDEV("div",{className:d("bn-px-2 bn-py-1.5 bn-text-sm bn-font-semibold",n),ref:t,children:o},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/suggestionMenu/SuggestionMenuLabel.tsx",lineNumber:16,columnNumber:5},void 0)}),Mr=f.forwardRef((r,t)=>{const{className:n,children:o,...a}=r;return k.assertEmpty(a),s.jsxDEV("div",{className:n,ref:t,children:o},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/suggestionMenu/SuggestionMenuLoader.tsx",lineNumber:14,columnNumber:5},void 0)}),Ur=f.forwardRef((r,t)=>{const{className:n,children:o,onMouseDown:a,onClick:l,...u}=r;k.assertEmpty(u,!1);const h=w();return s.jsxDEV(h.Button.Button,{variant:"ghost",className:d(n,"bn-p-0 bn-h-full bn-w-full bn-text-gray-400",n!=null&&n.includes("bn-extend-button-add-remove-columns")?"bn-ml-1":"bn-mt-1",n!=null&&n.includes("bn-extend-button-editing")?"bn-bg-accent bn-text-accent-foreground":""),ref:t,onClick:l,onMouseDown:a,...u,children:o},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/tableHandle/ExtendButton.tsx",lineNumber:21,columnNumber:5},void 0)}),Pr=f.forwardRef((r,t)=>{const{className:n,children:o,draggable:a,onDragStart:l,onDragEnd:u,style:h,label:N,...m}=r;k.assertEmpty(m,!1);const D=w();return s.jsxDEV(D.Button.Button,{variant:"ghost",className:d(n,"bn-p-0 bn-h-fit bn-w-fit bn-text-gray-400"),ref:t,"aria-label":N,draggable:a,onDragStart:l,onDragEnd:u,style:h,...m,children:o},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/tableHandle/TableHandle.tsx",lineNumber:30,columnNumber:5},void 0)}),Ge=f.forwardRef((r,t)=>{const{className:n,children:o,onMouseEnter:a,onMouseLeave:l,...u}=r;k.assertEmpty(u);const h=w();return s.jsxDEV(h.Tooltip.TooltipProvider,{delayDuration:0,children:s.jsxDEV("div",{className:d(n,"bn-flex bn-gap-1 bn-p-1 bn-bg-popover bn-text-popover-foreground bn-border bn-rounded-lg bn-shadow-md"),ref:t,onMouseEnter:a,onMouseLeave:l,children:o},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/toolbar/Toolbar.tsx",lineNumber:21,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/toolbar/Toolbar.tsx",lineNumber:20,columnNumber:7},void 0)}),Ke=f.forwardRef((r,t)=>{const{className:n,children:o,mainTooltip:a,secondaryTooltip:l,icon:u,isSelected:h,isDisabled:N,onClick:m,label:D,...B}=r;k.assertEmpty(B,!1);const U=w(),L=h===void 0?s.jsxDEV(U.Button.Button,{className:n,variant:"ghost",disabled:N,onClick:m,ref:t,"aria-label":D,...B,children:[u,o]},void 0,!0,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/toolbar/Toolbar.tsx",lineNumber:62,columnNumber:9},void 0):s.jsxDEV(U.Toggle.Toggle,{className:d(n,"data-[state=open]:bg-accent data-[state=closed]:text-accent-foreground"),"aria-label":D,onClick:m,pressed:h,disabled:N,"data-state":h?"on":"off","data-disabled":N,ref:t,...B,children:[u,o]},void 0,!0,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/toolbar/Toolbar.tsx",lineNumber:74,columnNumber:9},void 0);return s.jsxDEV(U.Tooltip.Tooltip,{children:[s.jsxDEV(U.Tooltip.TooltipTrigger,{asChild:!0,children:L},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/toolbar/Toolbar.tsx",lineNumber:94,columnNumber:9},void 0),s.jsxDEV(U.Tooltip.TooltipContent,{className:"bn-flex bn-flex-col bn-items-center",children:[s.jsxDEV("span",{children:a},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/toolbar/Toolbar.tsx",lineNumber:99,columnNumber:11},void 0),l&&s.jsxDEV("span",{children:l},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/toolbar/Toolbar.tsx",lineNumber:100,columnNumber:32},void 0)]},void 0,!0,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/toolbar/Toolbar.tsx",lineNumber:97,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/toolbar/Toolbar.tsx",lineNumber:93,columnNumber:7},void 0)}),Ir=f.forwardRef((r,t)=>{const{className:n,items:o,isDisabled:a,...l}=r;k.assertEmpty(l);const u=w(),h=m=>s.jsxDEV("div",{className:"bn-flex bn-gap-1 bn-items-center",children:[m.icon,m.text]},void 0,!0,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/toolbar/Toolbar.tsx",lineNumber:119,columnNumber:5},void 0),N=o.filter(m=>m.isSelected)[0];return N?s.jsxDEV(u.Select.Select,{value:N.text,onValueChange:m=>{var D,B;return(B=(D=o.find(U=>U.text===m)).onClick)==null?void 0:B.call(D)},disabled:a,children:[s.jsxDEV(u.Select.SelectTrigger,{className:"bn-border-none",children:s.jsxDEV(u.Select.SelectValue,{},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/toolbar/Toolbar.tsx",lineNumber:139,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/toolbar/Toolbar.tsx",lineNumber:138,columnNumber:7},void 0),s.jsxDEV(u.Select.SelectContent,{className:n,ref:t,children:o.map(m=>s.jsxDEV(u.Select.SelectItem,{disabled:m.isDisabled,value:m.text,children:s.jsxDEV(h,{...m},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/toolbar/Toolbar.tsx",lineNumber:147,columnNumber:13},void 0)},m.text,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/toolbar/Toolbar.tsx",lineNumber:143,columnNumber:11},void 0))},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/toolbar/Toolbar.tsx",lineNumber:141,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/toolbar/Toolbar.tsx",lineNumber:132,columnNumber:5},void 0):null}),_r=f.forwardRef((r,t)=>{const{className:n,children:o,onClick:a,label:l,...u}=r;k.assertEmpty(u);const h=w();return s.jsxDEV(h.Button.Button,{type:"submit",className:n,"aria-label":l,ref:t,onClick:a,children:o},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/panel/PanelButton.tsx",lineNumber:18,columnNumber:5},void 0)}),Fr=f.forwardRef((r,t)=>{const{className:n,accept:o,value:a,placeholder:l,onChange:u,...h}=r;k.assertEmpty(h);const N=w();return s.jsxDEV(N.Input.Input,{type:"file",className:n,ref:t,accept:o,value:a?a.name:void 0,onChange:async m=>u==null?void 0:u(m.target.files[0]),placeholder:l},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/panel/PanelFileInput.tsx",lineNumber:18,columnNumber:5},void 0)}),Or=f.forwardRef((r,t)=>{const{className:n,isSelected:o,onClick:a,item:l,id:u,...h}=r;k.assertEmpty(h);const N=f.useRef(null);return f.useEffect(()=>{if(!N.current||!o)return;const m=z.elementOverflow(N.current,document.querySelector(".bn-grid-suggestion-menu"));m==="top"?N.current.scrollIntoView(!0):m==="bottom"&&N.current.scrollIntoView(!1)},[o]),s.jsxDEV("div",{className:n,ref:z.mergeRefs([t,N]),id:u,role:"option",onClick:a,"aria-selected":o||void 0,children:l.icon},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuItem.tsx",lineNumber:33,columnNumber:5},void 0)}),Lr=f.forwardRef((r,t)=>{const{className:n,children:o,columns:a,...l}=r;return k.assertEmpty(l),s.jsxDEV("div",{className:n,style:{gridColumn:`1 / ${a+1}`},ref:t,children:o},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuLoader.tsx",lineNumber:19,columnNumber:5},void 0)}),He={FormattingToolbar:{Root:Ge,Button:Ke,Select:Ir},FilePanel:{Root:kr,Button:_r,FileInput:Fr,TabPanel:hr,TextInput:xr},LinkToolbar:{Root:Ge,Button:Ke},SideMenu:{Root:wr,Button:Cr},SuggestionMenu:{Root:jr,Item:Vr,EmptyItem:Br,Label:Rr,Loader:Mr},GridSuggestionMenu:{Root:Sr,Item:Or,EmptyItem:Tr,Loader:Lr},TableHandle:{Root:Pr,ExtendButton:Ur},Generic:{Form:{Root:ur,TextInput:dr},Menu:{Root:br,Trigger:fr,Dropdown:pr,Divider:vr,Label:gr,Item:Nr},Popover:{Root:Dr,Trigger:yr,Content:Er}}},$r=r=>{const{className:t,shadCNComponents:n,...o}=r,a=f.useMemo(()=>({...lr,...n}),[n]);return s.jsxDEV(Ye.Provider,{value:a,children:s.jsxDEV(z.ComponentsContext.Provider,{value:He,children:s.jsxDEV(z.BlockNoteViewRaw,{className:k.mergeCSSClasses("bn-shadcn",t||""),...o},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/index.tsx",lineNumber:136,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/index.tsx",lineNumber:135,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/nickthesick/Developer/BlockNote/packages/shadcn/src/index.tsx",lineNumber:134,columnNumber:5},void 0)};E.BlockNoteView=$r,E.components=He,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})});
|
|
2
33
|
//# sourceMappingURL=blocknote-shadcn.umd.cjs.map
|