@blocknote/shadcn 0.36.0 → 0.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/blocknote-shadcn.cjs +1 -1
- package/dist/blocknote-shadcn.cjs.map +1 -1
- package/dist/blocknote-shadcn.js +1237 -1187
- package/dist/blocknote-shadcn.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +17 -19
- package/src/BlockNoteView.tsx +2 -0
- package/src/badge/Badge.tsx +3 -6
- package/src/comments/Card.tsx +7 -9
- package/src/comments/Comment.tsx +10 -27
- package/src/components/ui/avatar.tsx +44 -39
- package/src/components/ui/badge.tsx +22 -12
- package/src/components/ui/button.tsx +33 -32
- package/src/components/ui/card.tsx +78 -72
- package/src/components/ui/dropdown-menu.tsx +230 -176
- package/src/components/ui/form.tsx +40 -51
- package/src/components/ui/input.tsx +16 -20
- package/src/components/ui/label.tsx +19 -19
- package/src/components/ui/popover.tsx +40 -23
- package/src/components/ui/select.tsx +153 -133
- package/src/components/ui/skeleton.tsx +3 -5
- package/src/components/ui/tabs.tsx +59 -46
- package/src/components/ui/toggle.tsx +23 -21
- package/src/components/ui/tooltip.tsx +50 -21
- package/src/components.ts +0 -1
- package/src/form/TextInput.tsx +4 -4
- package/src/index.tsx +1 -2
- package/src/lib/utils.ts +2 -8
- package/src/menu/Button.tsx +1 -1
- package/src/menu/Menu.tsx +2 -2
- package/src/panel/Panel.tsx +2 -2
- package/src/panel/PanelTab.tsx +1 -1
- package/src/panel/PanelTextInput.tsx +1 -1
- package/src/popover/popover.tsx +2 -2
- package/src/sideMenu/SideMenuButton.tsx +1 -1
- package/src/style.css +6 -127
- package/src/suggestionMenu/SuggestionMenu.tsx +1 -1
- package/src/suggestionMenu/SuggestionMenuEmptyItem.tsx +3 -1
- package/src/suggestionMenu/SuggestionMenuItem.tsx +13 -10
- package/src/suggestionMenu/SuggestionMenuLabel.tsx +4 -1
- package/src/suggestionMenu/SuggestionMenuLoader.tsx +3 -2
- package/src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenu.tsx +8 -1
- package/src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuItem.tsx +10 -1
- package/src/tableHandle/ExtendButton.tsx +6 -6
- package/src/tableHandle/TableHandle.tsx +1 -1
- package/src/toolbar/Toolbar.tsx +7 -9
- package/types/src/BlockNoteView.d.ts +1 -0
- package/types/src/ShadCNComponentsContext.d.ts +116 -132
- package/types/src/components/ui/avatar.d.ts +3 -3
- package/types/src/components/ui/badge.d.ts +5 -5
- package/types/src/components/ui/button.d.ts +4 -5
- package/types/src/components/ui/card.d.ts +8 -7
- package/types/src/components/ui/dropdown-menu.d.ts +21 -23
- package/types/src/components/ui/form.d.ts +10 -9
- package/types/src/components/ui/input.d.ts +1 -3
- package/types/src/components/ui/label.d.ts +2 -3
- package/types/src/components/ui/popover.d.ts +6 -5
- package/types/src/components/ui/select.d.ts +13 -11
- package/types/src/components/ui/skeleton.d.ts +1 -1
- package/types/src/components/ui/tabs.d.ts +6 -6
- package/types/src/components/ui/toggle.d.ts +3 -6
- package/types/src/components/ui/tooltip.d.ts +6 -6
- package/types/src/components.d.ts +0 -1
- package/types/src/index.d.ts +1 -1
- package/src/tailwindStyles.css +0 -421
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),p=require("@blocknote/core"),N=require("@blocknote/react"),b=require("react"),F=require("react-hook-form"),he=require("@radix-ui/react-avatar"),ve=require("clsx"),we=require("tailwind-merge"),I=require("class-variance-authority"),z=require("@radix-ui/react-slot"),Ne=require("@radix-ui/react-dropdown-menu"),j=require("lucide-react"),ye=require("@radix-ui/react-label"),Ce=require("@radix-ui/react-popover"),je=require("@radix-ui/react-select"),Se=require("@radix-ui/react-tabs"),Te=require("@radix-ui/react-toggle"),Re=require("@radix-ui/react-tooltip");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 s=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(t,e,s.get?s:{enumerable:!0,get:()=>n[e]})}}return t.default=n,Object.freeze(t)}const m=C(b),T=C(he),h=C(Ne),V=C(ye),D=C(Ce),v=C(je),S=C(Se),_=C(Te),R=C(Re),Me=we.extendTailwindMerge({prefix:"bn-"});function i(...n){return Me(ve.clsx(n))}const A=m.forwardRef(({className:n,...t},e)=>o.jsx(T.Root,{ref:e,className:i("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",n),...t}));A.displayName=T.Root.displayName;const $=m.forwardRef(({className:n,...t},e)=>o.jsx(T.Image,{ref:e,className:i("aspect-square h-full w-full",n),...t}));$.displayName=T.Image.displayName;const O=m.forwardRef(({className:n,...t},e)=>o.jsx(T.Fallback,{ref:e,className:i("bg-muted flex h-full w-full items-center justify-center rounded-full",n),...t}));O.displayName=T.Fallback.displayName;const Ie=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 De({className:n,variant:t,...e}){return o.jsx("div",{className:i(Ie({variant:t}),n),...e})}const Ee=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"}}),G=m.forwardRef(({className:n,variant:t,size:e,asChild:s=!1,...r},a)=>{const d=s?z.Slot:"button";return o.jsx(d,{className:i(Ee({variant:t,size:e,className:n})),ref:a,type:"button",...r})});G.displayName="Button";const H=m.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}));H.displayName="Card";const Pe=m.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}));Pe.displayName="CardHeader";const ke=m.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}));ke.displayName="CardTitle";const Be=m.forwardRef(({className:n,...t},e)=>o.jsx("p",{ref:e,className:i("bn-text-sm bn-text-muted-foreground",n),...t}));Be.displayName="CardDescription";const U=m.forwardRef(({className:n,...t},e)=>o.jsx("div",{ref:e,className:i("bn-p-6 bn-pt-0",n),...t}));U.displayName="CardContent";const Fe=m.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}));Fe.displayName="CardFooter";const Le=h.Root,qe=h.Trigger,ze=h.Sub,K=m.forwardRef(({className:n,inset:t,children:e,...s},r)=>o.jsxs(h.SubTrigger,{ref:r,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),...s,children:[e,o.jsx(j.ChevronRight,{className:"bn-ml-auto bn-h-4 bn-w-4"})]}));K.displayName=h.SubTrigger.displayName;const Q=m.forwardRef(({className:n,...t},e)=>o.jsx(h.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}));Q.displayName=h.SubContent.displayName;const W=m.forwardRef(({className:n,sideOffset:t=4,...e},s)=>o.jsx(h.Content,{ref:s,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}));W.displayName=h.Content.displayName;const Z=m.forwardRef(({className:n,inset:t,...e},s)=>o.jsx(h.Item,{ref:s,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}));Z.displayName=h.Item.displayName;const J=m.forwardRef(({className:n,children:t,checked:e,...s},r)=>o.jsxs(h.CheckboxItem,{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),checked:e,...s,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(h.ItemIndicator,{children:o.jsx(j.Check,{className:"bn-h-4 bn-w-4"})})}),t]}));J.displayName=h.CheckboxItem.displayName;const Ve=m.forwardRef(({className:n,children:t,...e},s)=>o.jsxs(h.RadioItem,{ref:s,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(h.ItemIndicator,{children:o.jsx(j.Circle,{className:"bn-h-2 bn-w-2 bn-fill-current"})})}),t]}));Ve.displayName=h.RadioItem.displayName;const X=m.forwardRef(({className:n,inset:t,...e},s)=>o.jsx(h.Label,{ref:s,className:i("bn-px-2 bn-py-1.5 bn-text-sm bn-font-semibold",t&&"bn-pl-8",n),...e}));X.displayName=h.Label.displayName;const Y=m.forwardRef(({className:n,...t},e)=>o.jsx(h.Separator,{ref:e,className:i("bn--mx-1 bn-my-1 bn-h-px bn-bg-muted",n),...t}));Y.displayName=h.Separator.displayName;const _e=I.cva("bn-text-sm bn-font-medium bn-leading-none peer-disabled:bn-cursor-not-allowed peer-disabled:bn-opacity-70"),L=m.forwardRef(({className:n,...t},e)=>o.jsx(V.Root,{ref:e,className:i(_e(),n),...t}));L.displayName=V.Root.displayName;const Ae=F.FormProvider,$e=m.createContext({}),E=()=>{const n=m.useContext($e),t=m.useContext(ee),{getFieldState:e,formState:s}=F.useFormContext(),r=e(n.name,s);if(!n)throw new Error("useFormField should be used within <FormField>");const{id:a}=t;return{id:a,name:n.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...r}},ee=m.createContext({}),Oe=m.forwardRef(({className:n,...t},e)=>{const s=m.useId();return o.jsx(ee.Provider,{value:{id:s},children:o.jsx("div",{ref:e,className:i("bn-space-y-2",n),...t})})});Oe.displayName="FormItem";const Ge=m.forwardRef(({className:n,...t},e)=>{const{error:s,formItemId:r}=E();return o.jsx(L,{ref:e,className:i(s&&"bn-text-destructive",n),htmlFor:r,...t})});Ge.displayName="FormLabel";const He=m.forwardRef(({...n},t)=>{const{error:e,formItemId:s,formDescriptionId:r,formMessageId:a}=E();return o.jsx(z.Slot,{ref:t,id:s,"aria-describedby":e?`${r} ${a}`:`${r}`,"aria-invalid":!!e,...n})});He.displayName="FormControl";const Ue=m.forwardRef(({className:n,...t},e)=>{const{formDescriptionId:s}=E();return o.jsx("p",{ref:e,id:s,className:i("bn-text-sm bn-text-muted-foreground",n),...t})});Ue.displayName="FormDescription";const Ke=m.forwardRef(({className:n,children:t,...e},s)=>{const{error:r,formMessageId:a}=E(),d=r?String(r==null?void 0:r.message):t;return d?o.jsx("p",{ref:s,id:a,className:i("bn-text-sm bn-font-medium bn-text-destructive",n),...e,children:d}):null});Ke.displayName="FormMessage";const ne=m.forwardRef(({className:n,type:t,...e},s)=>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:s,...e}));ne.displayName="Input";const Qe=D.Root,We=D.Trigger,te=m.forwardRef(({className:n,align:t="center",sideOffset:e=4,...s},r)=>o.jsx(D.Content,{ref:r,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),...s}));te.displayName=D.Content.displayName;const Ze=v.Root,Je=v.Value,oe=m.forwardRef(({className:n,children:t,...e},s)=>o.jsxs(v.Trigger,{ref:s,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(v.Icon,{asChild:!0,children:o.jsx(j.ChevronDown,{className:"bn-h-4 bn-w-4 bn-opacity-50"})})]}));oe.displayName=v.Trigger.displayName;const se=m.forwardRef(({className:n,...t},e)=>o.jsx(v.ScrollUpButton,{ref:e,className:i("bn-flex bn-cursor-default bn-items-center bn-justify-center bn-py-1",n),...t,children:o.jsx(j.ChevronUp,{className:"bn-h-4 bn-w-4"})}));se.displayName=v.ScrollUpButton.displayName;const re=m.forwardRef(({className:n,...t},e)=>o.jsx(v.ScrollDownButton,{ref:e,className:i("bn-flex bn-cursor-default bn-items-center bn-justify-center bn-py-1",n),...t,children:o.jsx(j.ChevronDown,{className:"bn-h-4 bn-w-4"})}));re.displayName=v.ScrollDownButton.displayName;const ae=m.forwardRef(({className:n,children:t,position:e="popper",...s},r)=>o.jsxs(v.Content,{ref:r,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,...s,children:[o.jsx(se,{}),o.jsx(v.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(re,{})]}));ae.displayName=v.Content.displayName;const Xe=m.forwardRef(({className:n,...t},e)=>o.jsx(v.Label,{ref:e,className:i("bn-py-1.5 bn-pl-8 bn-pr-2 bn-text-sm bn-font-semibold",n),...t}));Xe.displayName=v.Label.displayName;const ie=m.forwardRef(({className:n,children:t,...e},s)=>o.jsxs(v.Item,{ref:s,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(v.ItemIndicator,{children:o.jsx(j.Check,{className:"bn-h-4 bn-w-4"})})}),o.jsx(v.ItemText,{children:t})]}));ie.displayName=v.Item.displayName;const Ye=m.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}));Ye.displayName=v.Separator.displayName;function en({className:n,...t}){return o.jsx("div",{className:i("bg-primary/10 animate-pulse rounded-md",n),...t})}const nn=S.Root,de=m.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}));de.displayName=S.List.displayName;const le=m.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}));le.displayName=S.Trigger.displayName;const be=m.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}));be.displayName=S.Content.displayName;const tn=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"}}),ce=m.forwardRef(({className:n,variant:t,size:e,...s},r)=>o.jsx(_.Root,{ref:r,className:i(tn({variant:t,size:e,className:n})),...s}));ce.displayName=_.Root.displayName;const on=R.Provider,sn=R.Root,rn=R.Trigger,me=m.forwardRef(({className:n,sideOffset:t=4,...e},s)=>o.jsx(R.Content,{ref:s,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}));me.displayName=R.Content.displayName;const an={Avatar:{Avatar:A,AvatarFallback:O,AvatarImage:$},Badge:{Badge:De},Button:{Button:G},Card:{Card:H,CardContent:U},DropdownMenu:{DropdownMenu:Le,DropdownMenuCheckboxItem:J,DropdownMenuContent:W,DropdownMenuItem:Z,DropdownMenuLabel:X,DropdownMenuSeparator:Y,DropdownMenuSub:ze,DropdownMenuSubContent:Q,DropdownMenuSubTrigger:K,DropdownMenuTrigger:qe},Form:{Form:Ae},Input:{Input:ne},Label:{Label:L},Popover:{Popover:Qe,PopoverContent:te,PopoverTrigger:We},Select:{Select:Ze,SelectContent:ae,SelectItem:ie,SelectTrigger:oe,SelectValue:Je},Skeleton:{Skeleton:en},Tabs:{Tabs:nn,TabsContent:be,TabsList:de,TabsTrigger:le},Toggle:{Toggle:ce},Tooltip:{Tooltip:sn,TooltipContent:me,TooltipProvider:on,TooltipTrigger:rn}},ue=b.createContext(void 0);function g(){return b.useContext(ue)}const dn=n=>{const{children:t,...e}=n;p.assertEmpty(e);const s=g(),r=F.useForm();return o.jsx(s.Form.Form,{...r,children:t})},ln=b.forwardRef((n,t)=>{const{className:e,name:s,label:r,variant:a,icon:d,value:c,autoFocus:u,placeholder:l,disabled:f,onKeyDown:x,onChange:w,onSubmit:y,autoComplete:M,rightSection:ge,...xe}=n;p.assertEmpty(xe);const q=g();return o.jsxs("div",{className:i(e,"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","bn-items-center bn-gap-2 bn-text-foreground"),children:[d,o.jsxs("div",{className:"bn-flex-1",children:[r&&o.jsx(q.Label.Label,{htmlFor:r,children:r}),o.jsx(q.Input.Input,{className:i(e,"bn-border-none bn-p-0 bn-h-auto"),id:r,name:s,autoFocus:u,placeholder:l,disabled:f,value:c,onKeyDown:x,onChange:w,onSubmit:y,ref:t})]}),ge]})}),bn=n=>b.forwardRef((t,e)=>o.jsx(n,{onPointerDown:s=>{s.nativeEvent.fakeEvent||(s.ctrlKey=!0)},onPointerUp:s=>{const r=new PointerEvent("pointerdown",s.nativeEvent);r.fakeEvent=!0,s.target.dispatchEvent(r)},...t,ref:e})),cn=n=>{const{children:t,onOpenChange:e,position:s,sub:r,...a}=n;p.assertEmpty(a);const d=g();return r?o.jsx(d.DropdownMenu.DropdownMenuSub,{onOpenChange:e,children:t}):o.jsx(d.DropdownMenu.DropdownMenu,{modal:!1,onOpenChange:e,children:t})},mn=n=>{const{children:t,sub:e,...s}=n;p.assertEmpty(s);const r=g(),a=b.useMemo(()=>bn(r.DropdownMenu.DropdownMenuTrigger),[r.DropdownMenu.DropdownMenuTrigger]);return e?o.jsx(r.DropdownMenu.DropdownMenuSubTrigger,{children:t}):o.jsx(a,{asChild:!0,...s,children:t})},un=b.forwardRef((n,t)=>{const{className:e,children:s,sub:r,...a}=n;p.assertEmpty(a);const d=g();return r?o.jsx(d.DropdownMenu.DropdownMenuSubContent,{className:e,ref:t,children:s}):o.jsx(d.DropdownMenu.DropdownMenuContent,{className:e,ref:t,children:s})}),pn=b.forwardRef((n,t)=>{const{className:e,children:s,icon:r,checked:a,subTrigger:d,onClick:c,...u}=n;p.assertEmpty(u);const l=g();return d?o.jsxs(o.Fragment,{children:[r,s]}):a!==void 0?o.jsxs(l.DropdownMenu.DropdownMenuCheckboxItem,{className:i(e,"bn-gap-1",a?"":"bn-px-2"),ref:t,checked:a,onClick:c,...u,children:[r,s]}):o.jsxs(l.DropdownMenu.DropdownMenuItem,{className:e,ref:t,onClick:c,...u,children:[r,s,d&&o.jsx(j.ChevronRight,{className:"bn-ml-auto bn-h-4 bn-w-4"})]})}),fn=b.forwardRef((n,t)=>{const{className:e,...s}=n;p.assertEmpty(s);const r=g();return o.jsx(r.DropdownMenu.DropdownMenuSeparator,{className:e,ref:t})}),gn=b.forwardRef((n,t)=>{const{className:e,children:s,...r}=n;p.assertEmpty(r);const a=g();return o.jsx(a.DropdownMenu.DropdownMenuLabel,{className:e,ref:t,children:s})}),xn=b.forwardRef((n,t)=>{const{className:e,children:s,icon:r,onClick:a,onDragEnd:d,onDragStart:c,draggable:u,label:l,...f}=n;p.assertEmpty(f,!1);const x=g();return o.jsxs(x.Button.Button,{variant:"ghost",className:i(e,"bn-text-gray-400"),ref:t,"aria-label":l,onClick:a,onDragStart:c,onDragEnd:d,draggable:u,...f,children:[r,s]})}),hn=b.forwardRef((n,t)=>{const{className:e,tabs:s,defaultOpenTab:r,openTab:a,setOpenTab:d,loading:c,...u}=n;p.assertEmpty(u);const l=g();return o.jsxs(l.Tabs.Tabs,{className:i(e,"bn-bg-popover bn-p-2 bn-rounded-lg"),ref:t,value:a,defaultValue:r,onValueChange:d,children:[o.jsx(l.Tabs.TabsList,{children:s.map(f=>o.jsx(l.Tabs.TabsTrigger,{value:f.name,children:f.name},f.name))}),s.map(f=>o.jsx(l.Tabs.TabsContent,{value:f.name,children:o.jsx(l.Card.Card,{children:o.jsx(l.Card.CardContent,{className:"bn-p-4",children:f.tabPanel})})},f.name))]})}),vn=b.forwardRef((n,t)=>{const{className:e,children:s,...r}=n;return p.assertEmpty(r),o.jsx("div",{className:i(e,"bn-flex bn-flex-col bn-gap-2 bn-items-start bn-justify-center"),ref:t,children:s})}),wn=b.forwardRef((n,t)=>{const{className:e,value:s,placeholder:r,onKeyDown:a,onChange:d,...c}=n;p.assertEmpty(c);const u=g();return o.jsx(u.Input.Input,{"data-test":"embed-input",className:i(e,"bn-w-80"),ref:t,value:s,placeholder:r,onKeyDown:a,onChange:d})}),Nn=n=>{const{children:t,opened:e,position:s,...r}=n;p.assertEmpty(r);const a=g();return o.jsx(a.Popover.Popover,{open:e,children:t})},yn=b.forwardRef((n,t)=>{const{children:e,...s}=n;p.assertEmpty(s);const r=g();return o.jsx(r.Popover.PopoverTrigger,{ref:t,asChild:!0,children:e})}),Cn=b.forwardRef((n,t)=>{const{className:e,variant:s,children:r,...a}=n;p.assertEmpty(a);const d=g();return o.jsx(d.Popover.PopoverContent,{sideOffset:8,className:i(e,"bn-flex bn-flex-col bn-gap-2",s==="panel-popover"?"bn-p-0 bn-border-none bn-shadow-none bn-max-w-none bn-w-fit":""),ref:t,children:r})}),jn=b.forwardRef((n,t)=>{const{className:e,children:s,...r}=n;return p.assertEmpty(r,!1),o.jsx("div",{className:e,ref:t,...r,children:s})}),Sn=b.forwardRef((n,t)=>{const{className:e,children:s,icon:r,onClick:a,onDragEnd:d,onDragStart:c,draggable:u,label:l,...f}=n;p.assertEmpty(f,!1);const x=g();return o.jsxs(x.Button.Button,{variant:"ghost",className:i(e,"bn-text-gray-400"),ref:t,"aria-label":l,onClick:a,onDragStart:c,onDragEnd:d,draggable:u,...f,children:[r,s]})}),Tn=b.forwardRef((n,t)=>{const{className:e,children:s,id:r,columns:a,...d}=n;return p.assertEmpty(d),o.jsx("div",{className:e,style:{gridTemplateColumns:`repeat(${a}, 1fr)`},ref:t,id:r,role:"grid",children:s})}),Rn=b.forwardRef((n,t)=>{const{className:e,children:s,columns:r,...a}=n;return p.assertEmpty(a),o.jsx("div",{className:e,style:{gridColumn:`1 / ${r+1}`},ref:t,children:s})}),Mn=b.forwardRef((n,t)=>{const{className:e,children:s,id:r,...a}=n;return p.assertEmpty(a),o.jsx("div",{id:r,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:s})}),In=b.forwardRef((n,t)=>{const{className:e,children:s,...r}=n;return p.assertEmpty(r),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:s})})}),Dn=b.forwardRef((n,t)=>{const e=g(),{className:s,item:r,isSelected:a,onClick:d,id:c,...u}=n;p.assertEmpty(u);const l=b.useRef(null);return b.useEffect(()=>{if(!l.current||!a)return;const f=N.elementOverflow(l.current,document.querySelector(".bn-suggestion-menu, #ai-suggestion-menu"));f==="top"?l.current.scrollIntoView(!0):f==="bottom"&&l.current.scrollIntoView(!1)},[a]),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",n.item.size==="small"?"bn-gap-3 bn-py-1":"",s),ref:N.mergeRefs([t,l]),id:c,onMouseDown:f=>f.preventDefault(),onClick:d,role:"option","aria-selected":a||void 0,children:[r.icon&&o.jsx("div",{className:i("bn-p-3",n.item.size==="small"?"bn-p-0":"",s),"data-position":"left",children:r.icon}),o.jsxs("div",{className:"bn-flex-1",children:[o.jsx("div",{className:i("bn-text-base",n.item.size==="small"?"bn-text-sm":"",s),children:r.title}),o.jsx("div",{className:i("bn-text-xs",n.item.size==="small"?"bn-hidden":"",s),children:r.subtext})]}),r.badge&&o.jsx("div",{"data-position":"right",className:"bn-text-xs",children:o.jsx(e.Badge.Badge,{variant:"secondary",children:r.badge})})]})}),En=b.forwardRef((n,t)=>{const{className:e,children:s,...r}=n;return p.assertEmpty(r),o.jsx("div",{className:i("bn-px-2 bn-py-1.5 bn-text-sm bn-font-semibold",e),ref:t,children:s})}),Pn=b.forwardRef((n,t)=>{const{className:e,...s}=n;return p.assertEmpty(s),o.jsx("div",{className:i(e,"bn-animate-spin"),ref:t,children:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",fill:"#e8eaed",children:o.jsx("path",{d:"M480-80q-82 0-155-31.5t-127.5-86Q143-252 111.5-325T80-480q0-83 31.5-155.5t86-127Q252-817 325-848.5T480-880q17 0 28.5 11.5T520-840q0 17-11.5 28.5T480-800q-133 0-226.5 93.5T160-480q0 133 93.5 226.5T480-160q133 0 226.5-93.5T800-480q0-17 11.5-28.5T840-520q17 0 28.5 11.5T880-480q0 82-31.5 155t-86 127.5q-54.5 54.5-127 86T480-80Z"})})})}),kn=b.forwardRef((n,t)=>{const{className:e,children:s,onMouseDown:r,onClick:a,...d}=n;p.assertEmpty(d,!1);const c=g();return o.jsx(c.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:a,onMouseDown:r,...d,children:s})}),Bn=b.forwardRef((n,t)=>{const{className:e,children:s,draggable:r,onDragStart:a,onDragEnd:d,style:c,label:u,...l}=n;p.assertEmpty(l,!1);const f=g();return o.jsx(f.Button.Button,{variant:"ghost",className:i(e,"bn-p-0 bn-h-fit bn-w-fit bn-text-gray-400"),ref:t,"aria-label":u,draggable:r,onDragStart:a,onDragEnd:d,style:c,...l,children:s})}),P=b.forwardRef((n,t)=>{const{className:e,children:s,onMouseEnter:r,onMouseLeave:a,variant:d,...c}=n;p.assertEmpty(c);const u=g();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 bn-h-fit",d==="action-toolbar"?"bn-w-fit":""),ref:t,onMouseEnter:r,onMouseLeave:a,children:s})})}),k=b.forwardRef((n,t)=>{const{className:e,children:s,mainTooltip:r,secondaryTooltip:a,icon:d,isSelected:c,isDisabled:u,onClick:l,label:f,variant:x,...w}=n;p.assertEmpty(w,!1);const y=g(),M=c===void 0?o.jsxs(y.Button.Button,{className:i(e,x==="compact"?"bn-h-6 bn-min-w-6 bn-p-0":""),variant:"ghost",size:x==="compact"?"sm":"default",disabled:u,onClick:l,ref:t,"aria-label":f,...w,children:[d,s]}):o.jsxs(y.Toggle.Toggle,{className:i(e,"data-[state=open]:bg-accent data-[state=closed]:text-accent-foreground",x==="compact"?"bn-h-6 bn-min-w-6 bn-p-0":""),size:x==="compact"?"sm":"default","aria-label":f,onClick:l,pressed:c,disabled:u,"data-state":c?"on":"off","data-disabled":u,ref:t,...w,children:[d,s]});return o.jsxs(y.Tooltip.Tooltip,{children:[o.jsx(y.Tooltip.TooltipTrigger,{asChild:!0,children:M}),o.jsxs(y.Tooltip.TooltipContent,{className:"bn-flex bn-flex-col bn-items-center bn-whitespace-pre-wrap",children:[o.jsx("span",{children:r}),a&&o.jsx("span",{children:a})]})]})}),B=b.forwardRef((n,t)=>{const{className:e,items:s,isDisabled:r,...a}=n;p.assertEmpty(a);const d=g(),c=l=>o.jsxs("div",{className:"bn-flex bn-gap-1 bn-items-center",children:[l.icon,l.text]}),u=s.filter(l=>l.isSelected)[0];return u?o.jsxs(d.Select.Select,{value:u.text,onValueChange:l=>{var f,x;return(x=(f=s.find(w=>w.text===l)).onClick)==null?void 0:x.call(f)},disabled:r,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:s.map(l=>o.jsx(d.Select.SelectItem,{disabled:l.isDisabled,value:l.text,children:o.jsx(c,{...l})},l.text))})]}):null}),Fn=b.forwardRef((n,t)=>{const{className:e,children:s,selected:r,headerText:a,onFocus:d,onBlur:c,tabIndex:u,...l}=n;p.assertEmpty(l);const f=g();return o.jsxs(f.Card.Card,{className:i(e,"bn-w-[300px]",r?"bn-bg-accent bn-text-accent-foreground":""),onFocus:d,onBlur:c,tabIndex:u,ref:t,children:[a&&o.jsx("div",{className:"bn-px-4 bn-pt-4 bn-italic bn-text-sm",children:a}),s]})}),Ln=b.forwardRef((n,t)=>{const{className:e,children:s,...r}=n;return p.assertEmpty(r),o.jsx("div",{className:i(e,"bn-p-4",e!=null&&e.includes("bn-thread-comments")?"bn-flex bn-flex-col bn-gap-6 bn-border-b":""),ref:t,children:s})}),qn=b.forwardRef((n,t)=>{const{className:e,children:s,...r}=n;p.assertEmpty(r,!1);const a=g();return o.jsx(a.Button.Button,{className:i(e,"bn-p-0 bn-w-fit bn-text-foreground bn-bg-transparent hover:bn-bg-transparent"),ref:t,children:s})}),zn=b.forwardRef((n,t)=>{const{authorInfo:e,timeString:s,edited:r,...a}=n,d=N.useDictionary();p.assertEmpty(a,!1);const c=g();return e==="loading"?o.jsxs("div",{className:"bn-flex bn-flex-row bn-flex-nowrap bn-items-center bn-gap-4",children:[o.jsx(c.Skeleton.Skeleton,{className:"bn-size-7 bn-rounded-full bn-bg-neutral-400 bn-animate-pulse"}),o.jsx(c.Skeleton.Skeleton,{className:"bn-h-3 bn-w-32 bn-rounded-full bn-bg-neutral-400 bn-animate-pulse"})]}):o.jsxs("div",{className:"bn-flex bn-flex-row bn-flex-nowrap bn-items-center bn-gap-4",children:[o.jsxs(c.Avatar.Avatar,{children:[o.jsx(c.Avatar.AvatarImage,{src:e.avatarUrl,alt:e.username,className:"bn-h-7 bn-rounded-full"}),o.jsx(c.Avatar.AvatarFallback,{children:e.username[0]})]}),o.jsxs("div",{className:"bn-flex bn-flex-row bn-flex-nowrap bn-items-center bn-gap-2",children:[o.jsx("span",{className:"bn-text-sm bn-font-bold",children:e.username}),o.jsxs("span",{className:"bn-text-xs",children:[s," ",r&&`(${d.comments.edited})`]})]})]})}),Vn=b.forwardRef((n,t)=>{const{className:e,showActions:s,authorInfo:r,timeString:a,actions:d,edited:c,children:u,...l}=n;p.assertEmpty(l);const[f,x]=b.useState(!1),{focused:w,ref:y}=N.useFocusWithin(),M=d&&(s===!0||s===void 0||s==="hover"&&f||w);return o.jsxs("div",{ref:t,className:i(e,"bn-relative bn-flex bn-flex-col bn-gap-2"),onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),children:[M?o.jsx("div",{className:"bn-absolute bn-right-0 bn-top-0 bn-z-10",ref:y,children:d}):null,o.jsx(zn,{...n}),u]})}),_n=b.forwardRef((n,t)=>{const{className:e,onFocus:s,onBlur:r,autoFocus:a,editor:d,editable:c,...u}=n;p.assertEmpty(u);const l=N.useBlockNoteContext();return o.jsx(fe,{autoFocus:a,className:i(e,""),theme:l==null?void 0:l.colorSchemePreference,editor:n.editor,sideMenu:!1,slashMenu:!1,tableHandles:!1,filePanel:!1,formattingToolbar:!1,editable:c,ref:t,onFocus:s,onBlur:r,children:o.jsx(N.FormattingToolbarController,{formattingToolbar:An})})}),An=()=>{const n=N.getFormattingToolbarItems([]).filter(t=>t.key!=="nestBlockButton"&&t.key!=="unnestBlockButton");return o.jsx(N.FormattingToolbar,{blockTypeSelectItems:[],children:n})},$n=b.forwardRef((n,t)=>{const{className:e,text:s,icon:r,isSelected:a,mainTooltip:d,secondaryTooltip:c,onClick:u,onMouseEnter:l,...f}=n;p.assertEmpty(f,!1);const x=g(),w=o.jsxs(x.Button.Button,{variant:a?"secondary":"outline",className:i(e,"bn-flex bn-items-center bn-gap-1 bn-rounded-full bn-h-7 bn-px-2.5"),onClick:u,onMouseEnter:l,ref:t,children:[o.jsx("span",{children:r}),o.jsx("span",{children:s})]});return d?o.jsxs(x.Tooltip.Tooltip,{children:[o.jsx(x.Tooltip.TooltipTrigger,{asChild:!0,children:w}),o.jsxs(x.Tooltip.TooltipContent,{className:"bn-flex bn-flex-col bn-items-center bn-whitespace-pre-wrap",children:[o.jsx("span",{children:d}),c&&o.jsx("span",{children:c})]})]}):w}),On=b.forwardRef((n,t)=>{const{className:e,children:s,...r}=n;p.assertEmpty(r);const a=g();return o.jsx(a.Tooltip.TooltipProvider,{delayDuration:0,children:o.jsx("div",{className:i(e,"bn-flex bn-flex-row bn-flex-wrap bn-gap-1 bn-w-full"),ref:t,children:s})})}),Gn=b.forwardRef((n,t)=>{const{className:e,children:s,onClick:r,label:a,...d}=n;p.assertEmpty(d);const c=g();return o.jsx(c.Button.Button,{type:"submit",className:e,"aria-label":a,ref:t,onClick:r,children:s})}),Hn=b.forwardRef((n,t)=>{const{className:e,accept:s,value:r,placeholder:a,onChange:d,...c}=n;p.assertEmpty(c);const u=g();return o.jsx(u.Input.Input,{type:"file",className:e,ref:t,accept:s,value:r?r.name:void 0,onChange:async l=>d==null?void 0:d(l.target.files[0]),placeholder:a})}),Un=b.forwardRef((n,t)=>{const{className:e,isSelected:s,onClick:r,item:a,id:d,...c}=n;p.assertEmpty(c);const u=b.useRef(null);return b.useEffect(()=>{if(!u.current||!s)return;const l=N.elementOverflow(u.current,document.querySelector(".bn-grid-suggestion-menu"));l==="top"?u.current.scrollIntoView(!0):l==="bottom"&&u.current.scrollIntoView(!1)},[s]),o.jsx("div",{className:e,ref:N.mergeRefs([t,u]),id:d,role:"option",onClick:r,"aria-selected":s||void 0,children:a.icon})}),Kn=b.forwardRef((n,t)=>{const{className:e,children:s,columns:r,...a}=n;return p.assertEmpty(a),o.jsx("div",{className:e,style:{gridColumn:`1 / ${r+1}`},ref:t,children:s})}),pe={FormattingToolbar:{Root:P,Button:k,Select:B},FilePanel:{Root:hn,Button:Gn,FileInput:Hn,TabPanel:vn,TextInput:wn},LinkToolbar:{Root:P,Button:k,Select:B},SideMenu:{Root:jn,Button:Sn},SuggestionMenu:{Root:Mn,Item:Dn,EmptyItem:In,Label:En,Loader:Pn},GridSuggestionMenu:{Root:Tn,Item:Un,EmptyItem:Rn,Loader:Kn},TableHandle:{Root:Bn,ExtendButton:kn},Comments:{Comment:Vn,Editor:_n,Card:Fn,CardSection:Ln,ExpandSectionsPrompt:qn},Generic:{Badge:{Root:$n,Group:On},Toolbar:{Root:P,Button:k,Select:B},Form:{Root:dn,TextInput:ln},Menu:{Root:cn,Trigger:mn,Dropdown:un,Divider:fn,Label:gn,Item:pn,Button:xn},Popover:{Root:Nn,Trigger:yn,Content:Cn}}},fe=n=>{const{className:t,shadCNComponents:e,...s}=n,r=b.useMemo(()=>({...an,...e}),[e]);return o.jsx(ue.Provider,{value:r,children:o.jsx(N.ComponentsContext.Provider,{value:pe,children:o.jsx(N.BlockNoteViewRaw,{className:p.mergeCSSClasses("bn-shadcn",t||""),...s})})})};exports.BlockNoteView=fe;exports.components=pe;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),p=require("@blocknote/core"),b=require("@blocknote/react"),l=require("react"),_=require("react-hook-form"),G=require("@radix-ui/react-avatar"),U=require("clsx"),H=require("tailwind-merge"),B=require("@radix-ui/react-slot"),z=require("class-variance-authority"),K=require("@radix-ui/react-dropdown-menu"),N=require("lucide-react"),Q=require("@radix-ui/react-label"),W=require("@radix-ui/react-popover"),Z=require("@radix-ui/react-select"),J=require("@radix-ui/react-tabs"),X=require("@radix-ui/react-toggle"),Y=require("@radix-ui/react-tooltip");function C(e){if(e&&typeof e=="object"&&"default"in e)return e;const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(a,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return a.default=e,Object.freeze(a)}const q=C(l),R=C(G),w=C(K),ee=C(Q),I=C(W),h=C(Z),T=C(J),te=C(X),y=C(Y);function i(...e){return H.twMerge(U.clsx(e))}function ae({className:e,...a}){return t.jsx(R.Root,{"data-slot":"avatar",className:i("relative flex size-8 shrink-0 overflow-hidden rounded-full",e),...a})}function ne({className:e,...a}){return t.jsx(R.Image,{"data-slot":"avatar-image",className:i("aspect-square size-full",e),...a})}function oe({className:e,...a}){return t.jsx(R.Fallback,{"data-slot":"avatar-fallback",className:i("bg-muted flex size-full items-center justify-center rounded-full",e),...a})}const re=z.cva("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function se({className:e,variant:a,asChild:n=!1,...o}){const r=n?B.Slot:"span";return t.jsx(r,{"data-slot":"badge",className:i(re({variant:a}),e),...o})}const ie=z.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*=size-])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function de({className:e,variant:a,size:n,asChild:o=!1,...r}){const s=o?B.Slot:"button";return t.jsx(s,{"data-slot":"button",className:i(ie({variant:a,size:n,className:e})),...r})}function ce({className:e,...a}){return t.jsx("div",{"data-slot":"card",className:i("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...a})}function le({className:e,...a}){return t.jsx("div",{"data-slot":"card-content",className:i("px-6",e),...a})}function ue({...e}){return t.jsx(w.Root,{"data-slot":"dropdown-menu",...e})}function me({...e}){return t.jsx(w.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}function pe({className:e,sideOffset:a=4,...n}){return t.jsx(w.Content,{"data-slot":"dropdown-menu-content",sideOffset:a,className:i("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 max-h-(--radix-dropdown-menu-content-available-height) origin-(--radix-dropdown-menu-content-transform-origin) z-50 min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border p-1 shadow-md",e),...n})}function fe({className:e,inset:a,variant:n="default",...o}){return t.jsx(w.Item,{"data-slot":"dropdown-menu-item","data-inset":a,"data-variant":n,className:i("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*=text-])]:text-muted-foreground outline-hidden relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm data-[disabled]:pointer-events-none data-[inset]:pl-8 data-[disabled]:opacity-50 [&_svg:not([class*=size-])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...o})}function ge({className:e,children:a,checked:n,...o}){return t.jsxs(w.CheckboxItem,{"data-slot":"dropdown-menu-checkbox-item",className:i("focus:bg-accent focus:text-accent-foreground outline-hidden relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pl-8 pr-2 text-sm data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*=size-])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),checked:n,...o,children:[t.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:t.jsx(w.ItemIndicator,{children:t.jsx(N.CheckIcon,{className:"size-4"})})}),a]})}function ve({className:e,inset:a,...n}){return t.jsx(w.Label,{"data-slot":"dropdown-menu-label","data-inset":a,className:i("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...n})}function xe({className:e,...a}){return t.jsx(w.Separator,{"data-slot":"dropdown-menu-separator",className:i("bg-border -mx-1 my-1 h-px",e),...a})}function be({...e}){return t.jsx(w.Sub,{"data-slot":"dropdown-menu-sub",...e})}function he({className:e,inset:a,children:n,...o}){return t.jsxs(w.SubTrigger,{"data-slot":"dropdown-menu-sub-trigger","data-inset":a,className:i("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground outline-hidden flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm data-[inset]:pl-8",e),...o,children:[n,t.jsx(N.ChevronRightIcon,{className:"ml-auto size-4"})]})}function we({className:e,...a}){return t.jsx(w.SubContent,{"data-slot":"dropdown-menu-sub-content",className:i("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-dropdown-menu-content-transform-origin) z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-lg",e),...a})}function je({className:e,...a}){return t.jsx(ee.Root,{"data-slot":"label",className:i("flex select-none items-center gap-2 text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-50 group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50",e),...a})}const Ce=_.FormProvider;q.createContext({});q.createContext({});function Ne({className:e,type:a,...n}){return t.jsx("input",{type:a,"data-slot":"input",className:i("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input shadow-xs flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base outline-none transition-[color,box-shadow] file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n})}function ye({...e}){return t.jsx(I.Root,{"data-slot":"popover",...e})}function Se({...e}){return t.jsx(I.Trigger,{"data-slot":"popover-trigger",...e})}function Te({className:e,align:a="center",sideOffset:n=4,...o}){return t.jsx(I.Content,{"data-slot":"popover-content",align:a,sideOffset:n,className:i("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-popover-content-transform-origin) outline-hidden z-50 w-72 rounded-md border p-4 shadow-md",e),...o})}function ke({...e}){return t.jsx(h.Root,{"data-slot":"select",...e})}function Me({...e}){return t.jsx(h.Value,{"data-slot":"select-value",...e})}function De({className:e,size:a="default",children:n,...o}){return t.jsxs(h.Trigger,{"data-slot":"select-trigger","data-size":a,className:i("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*=text-])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 shadow-xs flex w-fit items-center justify-between gap-2 whitespace-nowrap rounded-md border bg-transparent px-3 py-2 text-sm outline-none transition-[color,box-shadow] focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg:not([class*=size-])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...o,children:[n,t.jsx(h.Icon,{asChild:!0,children:t.jsx(N.ChevronDownIcon,{className:"size-4 opacity-50"})})]})}function ze({className:e,children:a,position:n="popper",...o}){return t.jsxs(h.Content,{"data-slot":"select-content",className:i("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 max-h-(--radix-select-content-available-height) origin-(--radix-select-content-transform-origin) relative z-50 min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border shadow-md",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...o,children:[t.jsx(Ie,{}),t.jsx(h.Viewport,{className:i("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:a}),t.jsx(Ee,{})]})}function Re({className:e,children:a,...n}){return t.jsxs(h.Item,{"data-slot":"select-item",className:i("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*=text-])]:text-muted-foreground outline-hidden *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 relative flex w-full cursor-default select-none items-center gap-2 rounded-sm py-1.5 pl-2 pr-8 text-sm data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*=size-])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...n,children:[t.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:t.jsx(h.ItemIndicator,{children:t.jsx(N.CheckIcon,{className:"size-4"})})}),t.jsx(h.ItemText,{children:a})]})}function Ie({className:e,...a}){return t.jsx(h.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:i("flex cursor-default items-center justify-center py-1",e),...a,children:t.jsx(N.ChevronUpIcon,{className:"size-4"})})}function Ee({className:e,...a}){return t.jsx(h.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:i("flex cursor-default items-center justify-center py-1",e),...a,children:t.jsx(N.ChevronDownIcon,{className:"size-4"})})}function Pe({className:e,...a}){return t.jsx("div",{"data-slot":"skeleton",className:i("bg-accent animate-pulse rounded-md",e),...a})}function _e({className:e,...a}){return t.jsx(T.Root,{"data-slot":"tabs",className:i("flex flex-col gap-2",e),...a})}function Be({className:e,...a}){return t.jsx(T.List,{"data-slot":"tabs-list",className:i("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...a})}function qe({className:e,...a}){return t.jsx(T.Trigger,{"data-slot":"tabs-trigger",className:i("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 whitespace-nowrap rounded-md border border-transparent px-2 py-1 text-sm font-medium transition-[color,box-shadow] focus-visible:outline-1 focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg:not([class*=size-])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...a})}function Fe({className:e,...a}){return t.jsx(T.Content,{"data-slot":"tabs-content",className:i("flex-1 outline-none",e),...a})}const Le=z.cva("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*=size-])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}});function Ve({className:e,variant:a,size:n,...o}){return t.jsx(te.Root,{"data-slot":"toggle",className:i(Le({variant:a,size:n,className:e})),...o})}function F({delayDuration:e=0,...a}){return t.jsx(y.Provider,{"data-slot":"tooltip-provider",delayDuration:e,...a})}function Ae({...e}){return t.jsx(F,{children:t.jsx(y.Root,{"data-slot":"tooltip",...e})})}function Oe({...e}){return t.jsx(y.Trigger,{"data-slot":"tooltip-trigger",...e})}function $e({className:e,sideOffset:a=0,children:n,...o}){return t.jsxs(y.Content,{"data-slot":"tooltip-content",sideOffset:a,className:i("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-tooltip-content-transform-origin) z-50 w-fit text-balance rounded-md px-3 py-1.5 text-xs",e),...o,children:[n,t.jsx(y.Arrow,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})}const L={Avatar:{Avatar:ae,AvatarFallback:oe,AvatarImage:ne},Badge:{Badge:se},Button:{Button:de},Card:{Card:ce,CardContent:le},DropdownMenu:{DropdownMenu:ue,DropdownMenuCheckboxItem:ge,DropdownMenuContent:pe,DropdownMenuItem:fe,DropdownMenuLabel:ve,DropdownMenuSeparator:xe,DropdownMenuSub:be,DropdownMenuSubContent:we,DropdownMenuSubTrigger:he,DropdownMenuTrigger:me},Form:{Form:Ce},Input:{Input:Ne},Label:{Label:je},Popover:{Popover:ye,PopoverContent:Te,PopoverTrigger:Se},Select:{Select:ke,SelectContent:ze,SelectItem:Re,SelectTrigger:De,SelectValue:Me},Skeleton:{Skeleton:Pe},Tabs:{Tabs:_e,TabsContent:Fe,TabsList:Be,TabsTrigger:qe},Toggle:{Toggle:Ve},Tooltip:{Tooltip:Ae,TooltipContent:$e,TooltipProvider:F,TooltipTrigger:Oe}},E=l.createContext(void 0);function g(){return l.useContext(E)}const Ge=e=>{const{children:a,...n}=e;p.assertEmpty(n);const o=g(),r=_.useForm();return t.jsx(o.Form.Form,{...r,children:a})},Ue=l.forwardRef((e,a)=>{const{className:n,name:o,label:r,variant:s,icon:d,value:u,autoFocus:m,placeholder:c,disabled:f,onKeyDown:v,onChange:x,onSubmit:j,autoComplete:S,rightSection:O,...$}=e;p.assertEmpty($);const P=g();return t.jsxs("div",{className:i(n,"border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring flex h-10 w-full rounded-md border px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50","text-foreground items-center gap-2"),children:[d,t.jsxs("div",{className:"flex-1",children:[r&&t.jsx(P.Label.Label,{htmlFor:r,children:r}),t.jsx(P.Input.Input,{className:i(n,"h-auto border-none p-0"),id:r,name:o,autoFocus:m,placeholder:c,disabled:f,value:u,onKeyDown:v,onChange:x,onSubmit:j,ref:a})]}),O]})}),He=e=>l.forwardRef((a,n)=>t.jsx(e,{onPointerDown:o=>{o.nativeEvent.fakeEvent||(o.ctrlKey=!0)},onPointerUp:o=>{const r=new PointerEvent("pointerdown",o.nativeEvent);r.fakeEvent=!0,o.target.dispatchEvent(r)},...a,ref:n})),Ke=e=>{const{children:a,onOpenChange:n,position:o,sub:r,...s}=e;p.assertEmpty(s);const d=g();return r?t.jsx(d.DropdownMenu.DropdownMenuSub,{onOpenChange:n,children:a}):t.jsx(d.DropdownMenu.DropdownMenu,{modal:!1,onOpenChange:n,children:a})},Qe=e=>{const{children:a,sub:n,...o}=e;p.assertEmpty(o);const r=g(),s=l.useMemo(()=>He(r.DropdownMenu.DropdownMenuTrigger),[r.DropdownMenu.DropdownMenuTrigger]);return n?t.jsx(r.DropdownMenu.DropdownMenuSubTrigger,{children:a}):t.jsx(s,{asChild:!0,...o,children:a})},We=l.forwardRef((e,a)=>{const{className:n,children:o,sub:r,...s}=e;p.assertEmpty(s);const d=g();return r?t.jsx(d.DropdownMenu.DropdownMenuSubContent,{className:n,ref:a,children:o}):t.jsx(d.DropdownMenu.DropdownMenuContent,{className:n,ref:a,children:o})}),Ze=l.forwardRef((e,a)=>{const{className:n,children:o,icon:r,checked:s,subTrigger:d,onClick:u,...m}=e;p.assertEmpty(m);const c=g();return d?t.jsxs(t.Fragment,{children:[r,o]}):s!==void 0?t.jsxs(c.DropdownMenu.DropdownMenuCheckboxItem,{className:i(n,"gap-1",s?"":"px-2"),ref:a,checked:s,onClick:u,...m,children:[r,o]}):t.jsxs(c.DropdownMenu.DropdownMenuItem,{className:n,ref:a,onClick:u,...m,children:[r,o,d&&t.jsx(N.ChevronRight,{className:"ml-auto h-4 w-4"})]})}),Je=l.forwardRef((e,a)=>{const{className:n,...o}=e;p.assertEmpty(o);const r=g();return t.jsx(r.DropdownMenu.DropdownMenuSeparator,{className:n,ref:a})}),Xe=l.forwardRef((e,a)=>{const{className:n,children:o,...r}=e;p.assertEmpty(r);const s=g();return t.jsx(s.DropdownMenu.DropdownMenuLabel,{className:n,ref:a,children:o})}),Ye=l.forwardRef((e,a)=>{const{className:n,children:o,icon:r,onClick:s,onDragEnd:d,onDragStart:u,draggable:m,label:c,...f}=e;p.assertEmpty(f,!1);const v=g();return t.jsxs(v.Button.Button,{variant:"ghost",className:i(n,"text-gray-400"),ref:a,"aria-label":c,onClick:s,onDragStart:u,onDragEnd:d,draggable:m,...f,children:[r,o]})}),et=l.forwardRef((e,a)=>{const{className:n,tabs:o,defaultOpenTab:r,openTab:s,setOpenTab:d,loading:u,...m}=e;p.assertEmpty(m);const c=g();return t.jsxs(c.Tabs.Tabs,{className:i(n,"bg-popover rounded-lg p-2"),ref:a,value:s,defaultValue:r,onValueChange:d,children:[t.jsx(c.Tabs.TabsList,{children:o.map(f=>t.jsx(c.Tabs.TabsTrigger,{value:f.name,children:f.name},f.name))}),o.map(f=>t.jsx(c.Tabs.TabsContent,{value:f.name,children:t.jsx(c.Card.Card,{children:t.jsx(c.Card.CardContent,{className:"p-4",children:f.tabPanel})})},f.name))]})}),tt=l.forwardRef((e,a)=>{const{className:n,children:o,...r}=e;return p.assertEmpty(r),t.jsx("div",{className:i(n,"flex flex-col items-start justify-center gap-2"),ref:a,children:o})}),at=l.forwardRef((e,a)=>{const{className:n,value:o,placeholder:r,onKeyDown:s,onChange:d,...u}=e;p.assertEmpty(u);const m=g();return t.jsx(m.Input.Input,{"data-test":"embed-input",className:i(n,"w-80"),ref:a,value:o,placeholder:r,onKeyDown:s,onChange:d})}),nt=e=>{const{children:a,opened:n,position:o,...r}=e;p.assertEmpty(r);const s=g();return t.jsx(s.Popover.Popover,{open:n,children:a})},ot=l.forwardRef((e,a)=>{const{children:n,...o}=e;p.assertEmpty(o);const r=g();return t.jsx(r.Popover.PopoverTrigger,{ref:a,asChild:!0,children:n})}),rt=l.forwardRef((e,a)=>{const{className:n,variant:o,children:r,...s}=e;p.assertEmpty(s);const d=g();return t.jsx(d.Popover.PopoverContent,{sideOffset:8,className:i(n,"flex flex-col gap-2",o==="panel-popover"?"w-fit max-w-none border-none p-0 shadow-none":""),ref:a,children:r})}),st=l.forwardRef((e,a)=>{const{className:n,children:o,...r}=e;return p.assertEmpty(r,!1),t.jsx("div",{className:n,ref:a,...r,children:o})}),it=l.forwardRef((e,a)=>{const{className:n,children:o,icon:r,onClick:s,onDragEnd:d,onDragStart:u,draggable:m,label:c,...f}=e;p.assertEmpty(f,!1);const v=g();return t.jsxs(v.Button.Button,{variant:"ghost",className:i(n,"text-gray-400"),ref:a,"aria-label":c,onClick:s,onDragStart:u,onDragEnd:d,draggable:m,...f,children:[r,o]})}),dt=l.forwardRef((e,a)=>{const{className:n,children:o,id:r,columns:s,...d}=e;return p.assertEmpty(d),t.jsx("div",{className:i("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 max-h-(--radix-dropdown-menu-content-available-height) origin-(--radix-dropdown-menu-content-transform-origin) z-50 min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border p-1 shadow-md","grid",n),style:{gridTemplateColumns:`repeat(${s}, 1fr)`},ref:a,id:r,role:"grid",children:o})}),ct=l.forwardRef((e,a)=>{const{className:n,children:o,columns:r,...s}=e;return p.assertEmpty(s),t.jsx("div",{className:n,style:{gridColumn:`1 / ${r+1}`},ref:a,children:o})}),lt=l.forwardRef((e,a)=>{const{className:n,children:o,id:r,...s}=e;return p.assertEmpty(s),t.jsx("div",{id:r,role:"listbox",className:i("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 max-h-(--radix-dropdown-menu-content-available-height) origin-(--radix-dropdown-menu-content-transform-origin) z-50 min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border p-1 shadow-md",n),ref:a,children:o})}),ut=l.forwardRef((e,a)=>{const{className:n,children:o,...r}=e;return p.assertEmpty(r),t.jsx("div",{className:i("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*=text-])]:text-muted-foreground outline-hidden relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm data-[disabled]:pointer-events-none data-[inset]:pl-8 data-[disabled]:opacity-50 [&_svg:not([class*=size-])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0","hover:bg-accent hover:text-accent-foreground data-[variant=destructive]:hover:bg-destructive/10 dark:data-[variant=destructive]:hover:bg-destructive/20 data-[variant=destructive]:hover:text-destructive","aria-selected:bg-accent aria-selected:text-accent-foreground data-[variant=destructive]:aria-selected:bg-destructive/10 dark:data-[variant=destructive]:aria-selected:bg-destructive/20 data-[variant=destructive]:aria-selected:text-destructive",n),ref:a,children:t.jsx("div",{children:o})})}),mt=l.forwardRef((e,a)=>{const n=g(),{className:o,item:r,isSelected:s,onClick:d,id:u,...m}=e;p.assertEmpty(m);const c=l.useRef(null);return l.useEffect(()=>{if(!c.current||!s)return;const f=b.elementOverflow(c.current,document.querySelector(".bn-suggestion-menu, #ai-suggestion-menu"));f==="top"?c.current.scrollIntoView(!0):f==="bottom"&&c.current.scrollIntoView(!1)},[s]),t.jsxs("div",{className:i("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*=text-])]:text-muted-foreground outline-hidden relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm data-[disabled]:pointer-events-none data-[inset]:pl-8 data-[disabled]:opacity-50 [&_svg:not([class*=size-])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0","hover:bg-accent hover:text-accent-foreground data-[variant=destructive]:hover:bg-destructive/10 dark:data-[variant=destructive]:hover:bg-destructive/20 data-[variant=destructive]:hover:text-destructive","aria-selected:bg-accent aria-selected:text-accent-foreground data-[variant=destructive]:aria-selected:bg-destructive/10 dark:data-[variant=destructive]:aria-selected:bg-destructive/20 data-[variant=destructive]:aria-selected:text-destructive",e.item.size==="small"?"gap-3 py-1":"",o),"data-highlighted":!0,ref:b.mergeRefs([a,c]),id:u,onMouseDown:f=>f.preventDefault(),onClick:d,role:"option","aria-selected":s||void 0,children:[r.icon&&t.jsx("div",{className:i("p-3",e.item.size==="small"?"p-0":"",o),"data-position":"left",children:r.icon}),t.jsxs("div",{className:"flex-1",children:[t.jsx("div",{className:i("text-base",e.item.size==="small"?"text-sm":"",o),children:r.title}),t.jsx("div",{className:i("text-xs",e.item.size==="small"?"hidden":"",o),children:r.subtext})]}),r.badge&&t.jsx("div",{"data-position":"right",className:"text-xs",children:t.jsx(n.Badge.Badge,{variant:"secondary",children:r.badge})})]})}),pt=l.forwardRef((e,a)=>{const{className:n,children:o,...r}=e;return p.assertEmpty(r),t.jsx("div",{className:i("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",n),ref:a,children:o})}),ft=l.forwardRef((e,a)=>{const{className:n,...o}=e;return p.assertEmpty(o),t.jsx("div",{className:i(n,"animate-spin"),ref:a,children:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",fill:"#e8eaed",children:t.jsx("path",{d:"M480-80q-82 0-155-31.5t-127.5-86Q143-252 111.5-325T80-480q0-83 31.5-155.5t86-127Q252-817 325-848.5T480-880q17 0 28.5 11.5T520-840q0 17-11.5 28.5T480-800q-133 0-226.5 93.5T160-480q0 133 93.5 226.5T480-160q133 0 226.5-93.5T800-480q0-17 11.5-28.5T840-520q17 0 28.5 11.5T880-480q0 82-31.5 155t-86 127.5q-54.5 54.5-127 86T480-80Z"})})})}),gt=l.forwardRef((e,a)=>{const{className:n,children:o,onMouseDown:r,onClick:s,...d}=e;p.assertEmpty(d,!1);const u=g();return t.jsx(u.Button.Button,{variant:"ghost",className:i(n,"h-full w-full p-0 text-gray-400",n!=null&&n.includes("extend-button-add-remove-columns")?"ml-1":"mt-1",n!=null&&n.includes("extend-button-editing")?"bg-accent text-accent-foreground":""),ref:a,onClick:s,onMouseDown:r,...d,children:o})}),vt=l.forwardRef((e,a)=>{const{className:n,children:o,draggable:r,onDragStart:s,onDragEnd:d,style:u,label:m,...c}=e;p.assertEmpty(c,!1);const f=g();return t.jsx(f.Button.Button,{variant:"ghost",className:i(n,"h-fit w-fit p-0 text-gray-400"),ref:a,"aria-label":m,draggable:r,onDragStart:s,onDragEnd:d,style:u,...c,children:o})}),k=l.forwardRef((e,a)=>{const{className:n,children:o,onMouseEnter:r,onMouseLeave:s,variant:d,...u}=e;p.assertEmpty(u);const m=g();return t.jsx(m.Tooltip.TooltipProvider,{delayDuration:0,children:t.jsx("div",{className:i(n,"bg-popover text-popover-foreground flex h-fit gap-1 rounded-lg border p-1 shadow-md",d==="action-toolbar"?"w-fit":""),ref:a,onMouseEnter:r,onMouseLeave:s,children:o})})}),M=l.forwardRef((e,a)=>{const{className:n,children:o,mainTooltip:r,secondaryTooltip:s,icon:d,isSelected:u,isDisabled:m,onClick:c,label:f,variant:v,...x}=e;p.assertEmpty(x,!1);const j=g(),S=u===void 0?t.jsxs(j.Button.Button,{className:i(n,v==="compact"?"h-6 min-w-6 p-0":""),variant:"ghost",size:v==="compact"?"sm":"default",disabled:m,onClick:c,ref:a,"aria-label":f,...x,children:[d,o]}):t.jsxs(j.Toggle.Toggle,{className:i(n,"data-[state=open]:bg-accent data-[state=closed]:text-accent-foreground",v==="compact"?"h-6 min-w-6 p-0":""),size:v==="compact"?"sm":"default","aria-label":f,onClick:c,pressed:u,disabled:m,"data-state":u?"on":"off","data-disabled":m,ref:a,...x,children:[d,o]});return t.jsxs(j.Tooltip.Tooltip,{children:[t.jsx(j.Tooltip.TooltipTrigger,{asChild:!0,children:S}),t.jsxs(j.Tooltip.TooltipContent,{className:"flex flex-col items-center whitespace-pre-wrap",children:[t.jsx("span",{children:r}),s&&t.jsx("span",{children:s})]})]})}),D=l.forwardRef((e,a)=>{const{className:n,items:o,isDisabled:r,...s}=e;p.assertEmpty(s);const d=g(),u=c=>t.jsxs("div",{className:"flex items-center gap-1",children:[c.icon,c.text]}),m=o.filter(c=>c.isSelected)[0];return m?t.jsxs(d.Select.Select,{value:m.text,onValueChange:c=>{var f,v;return(v=(f=o.find(x=>x.text===c)).onClick)==null?void 0:v.call(f)},disabled:r,children:[t.jsx(d.Select.SelectTrigger,{className:"border-none",children:t.jsx(d.Select.SelectValue,{})}),t.jsx(d.Select.SelectContent,{className:n,ref:a,children:o.map(c=>t.jsx(d.Select.SelectItem,{disabled:c.isDisabled,value:c.text,children:t.jsx(u,{...c})},c.text))})]}):null}),xt=l.forwardRef((e,a)=>{const{className:n,children:o,selected:r,headerText:s,onFocus:d,onBlur:u,tabIndex:m,...c}=e;p.assertEmpty(c);const f=g();return t.jsxs(f.Card.Card,{className:i(n,"w-[300px]",r?"bg-accent text-accent-foreground":""),onFocus:d,onBlur:u,tabIndex:m,ref:a,children:[s&&t.jsx("div",{className:"px-4 pt-4 text-sm italic",children:s}),o]})}),bt=l.forwardRef((e,a)=>{const{className:n,children:o,...r}=e;return p.assertEmpty(r),t.jsx("div",{className:i(n,"p-4",n!=null&&n.includes("thread-comments")?"flex flex-col gap-6 border-b":""),ref:a,children:o})}),ht=l.forwardRef((e,a)=>{const{className:n,children:o,...r}=e;p.assertEmpty(r,!1);const s=g();return t.jsx(s.Button.Button,{className:i(n,"text-foreground w-fit bg-transparent p-0 hover:bg-transparent"),ref:a,children:o})}),wt=l.forwardRef((e,a)=>{const{authorInfo:n,timeString:o,edited:r,...s}=e,d=b.useDictionary();p.assertEmpty(s,!1);const u=g();return n==="loading"?t.jsxs("div",{className:"flex flex-row flex-nowrap items-center gap-4",children:[t.jsx(u.Skeleton.Skeleton,{className:"size-7 animate-pulse rounded-full bg-neutral-400"}),t.jsx(u.Skeleton.Skeleton,{className:"h-3 w-32 animate-pulse rounded-full bg-neutral-400"})]}):t.jsxs("div",{className:"flex flex-row flex-nowrap items-center gap-4",children:[t.jsxs(u.Avatar.Avatar,{children:[t.jsx(u.Avatar.AvatarImage,{src:n.avatarUrl,alt:n.username,className:"h-7 rounded-full"}),t.jsx(u.Avatar.AvatarFallback,{children:n.username[0]})]}),t.jsxs("div",{className:"flex flex-row flex-nowrap items-center gap-2",children:[t.jsx("span",{className:"text-sm font-bold",children:n.username}),t.jsxs("span",{className:"text-xs",children:[o," ",r&&`(${d.comments.edited})`]})]})]})}),jt=l.forwardRef((e,a)=>{const{className:n,showActions:o,authorInfo:r,timeString:s,actions:d,edited:u,children:m,...c}=e;p.assertEmpty(c);const[f,v]=l.useState(!1),{focused:x,ref:j}=b.useFocusWithin(),S=d&&(o===!0||o===void 0||o==="hover"&&f||x);return t.jsxs("div",{ref:a,className:i(n,"relative flex flex-col gap-2"),onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),children:[S?t.jsx("div",{className:"absolute right-0 top-0 z-10",ref:j,children:d}):null,t.jsx(wt,{...e}),m]})}),Ct=l.forwardRef((e,a)=>{const{className:n,onFocus:o,onBlur:r,autoFocus:s,editor:d,editable:u,...m}=e;p.assertEmpty(m);const c=b.useBlockNoteContext();return t.jsx(A,{autoFocus:s,className:i(n,""),theme:c==null?void 0:c.colorSchemePreference,editor:e.editor,sideMenu:!1,slashMenu:!1,tableHandles:!1,filePanel:!1,formattingToolbar:!1,editable:u,ref:a,onFocus:o,onBlur:r,children:t.jsx(b.FormattingToolbarController,{formattingToolbar:Nt})})}),Nt=()=>{const e=b.getFormattingToolbarItems([]).filter(a=>a.key!=="nestBlockButton"&&a.key!=="unnestBlockButton");return t.jsx(b.FormattingToolbar,{blockTypeSelectItems:[],children:e})},yt=l.forwardRef((e,a)=>{const{className:n,text:o,icon:r,isSelected:s,mainTooltip:d,secondaryTooltip:u,onClick:m,onMouseEnter:c,...f}=e;p.assertEmpty(f,!1);const v=g(),x=t.jsxs(v.Button.Button,{variant:s?"secondary":"outline",className:i(n,"flex h-7 items-center gap-1 rounded-full px-2.5"),onClick:m,onMouseEnter:c,ref:a,children:[t.jsx("span",{children:r}),t.jsx("span",{children:o})]});return d?t.jsxs(v.Tooltip.Tooltip,{children:[t.jsx(v.Tooltip.TooltipTrigger,{asChild:!0,children:x}),t.jsxs(v.Tooltip.TooltipContent,{className:"flex flex-col items-center whitespace-pre-wrap",children:[t.jsx("span",{children:d}),u&&t.jsx("span",{children:u})]})]}):x}),St=l.forwardRef((e,a)=>{const{className:n,children:o,...r}=e;p.assertEmpty(r);const s=g();return t.jsx(s.Tooltip.TooltipProvider,{delayDuration:0,children:t.jsx("div",{className:i(n,"flex w-full flex-row flex-wrap gap-1"),ref:a,children:o})})}),Tt=l.forwardRef((e,a)=>{const{className:n,children:o,onClick:r,label:s,...d}=e;p.assertEmpty(d);const u=g();return t.jsx(u.Button.Button,{type:"submit",className:n,"aria-label":s,ref:a,onClick:r,children:o})}),kt=l.forwardRef((e,a)=>{const{className:n,accept:o,value:r,placeholder:s,onChange:d,...u}=e;p.assertEmpty(u);const m=g();return t.jsx(m.Input.Input,{type:"file",className:n,ref:a,accept:o,value:r?r.name:void 0,onChange:async c=>d==null?void 0:d(c.target.files[0]),placeholder:s})}),Mt=l.forwardRef((e,a)=>{const{className:n,isSelected:o,onClick:r,item:s,id:d,...u}=e;p.assertEmpty(u);const m=l.useRef(null);return l.useEffect(()=>{if(!m.current||!o)return;const c=b.elementOverflow(m.current,document.querySelector(".bn-grid-suggestion-menu"));c==="top"?m.current.scrollIntoView(!0):c==="bottom"&&m.current.scrollIntoView(!1)},[o]),t.jsx("div",{className:i("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*=text-])]:text-muted-foreground outline-hidden relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm data-[disabled]:pointer-events-none data-[inset]:pl-8 data-[disabled]:opacity-50 [&_svg:not([class*=size-])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0","hover:bg-accent hover:text-accent-foreground data-[variant=destructive]:hover:bg-destructive/10 dark:data-[variant=destructive]:hover:bg-destructive/20 data-[variant=destructive]:hover:text-destructive","aria-selected:bg-accent aria-selected:text-accent-foreground data-[variant=destructive]:aria-selected:bg-destructive/10 dark:data-[variant=destructive]:aria-selected:bg-destructive/20 data-[variant=destructive]:aria-selected:text-destructive","text-lg!",n),ref:b.mergeRefs([a,m]),id:d,role:"option",onClick:r,"aria-selected":o||void 0,children:s.icon})}),Dt=l.forwardRef((e,a)=>{const{className:n,children:o,columns:r,...s}=e;return p.assertEmpty(s),t.jsx("div",{className:n,style:{gridColumn:`1 / ${r+1}`},ref:a,children:o})}),V={FormattingToolbar:{Root:k,Button:M,Select:D},FilePanel:{Root:et,Button:Tt,FileInput:kt,TabPanel:tt,TextInput:at},LinkToolbar:{Root:k,Button:M,Select:D},SideMenu:{Root:st,Button:it},SuggestionMenu:{Root:lt,Item:mt,EmptyItem:ut,Label:pt,Loader:ft},GridSuggestionMenu:{Root:dt,Item:Mt,EmptyItem:ct,Loader:Dt},TableHandle:{Root:vt,ExtendButton:gt},Comments:{Comment:jt,Editor:Ct,Card:xt,CardSection:bt,ExpandSectionsPrompt:ht},Generic:{Badge:{Root:yt,Group:St},Toolbar:{Root:k,Button:M,Select:D},Form:{Root:Ge,TextInput:Ue},Menu:{Root:Ke,Trigger:Qe,Dropdown:We,Divider:Je,Label:Xe,Item:Ze,Button:Ye},Popover:{Root:nt,Trigger:ot,Content:rt}}},A=e=>{const{className:a,shadCNComponents:n,...o}=e,r=l.useMemo(()=>({...L,...n}),[n]);return t.jsx(E.Provider,{value:r,children:t.jsx(b.ComponentsContext.Provider,{value:V,children:t.jsx(b.BlockNoteViewRaw,{className:p.mergeCSSClasses("bn-shadcn",a||""),...o})})})};exports.BlockNoteView=A;exports.ShadCNComponentsContext=E;exports.ShadCNDefaultComponents=L;exports.components=V;exports.useShadCNComponentsContext=g;
|
|
2
2
|
//# sourceMappingURL=blocknote-shadcn.cjs.map
|