@blocknote/shadcn 0.13.1 → 0.13.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 +175 -174
- package/dist/blocknote-shadcn.js.map +1 -1
- package/dist/blocknote-shadcn.umd.cjs +3 -3
- 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/index.tsx +1 -1
- package/src/panel/Panel.tsx +1 -1
- package/src/panel/PanelButton.tsx +1 -1
- package/src/panel/PanelFileInput.tsx +3 -2
- package/src/panel/PanelTab.tsx +1 -1
- package/src/panel/PanelTextInput.tsx +1 -1
- package/types/src/panel/PanelFileInput.d.ts +1 -0
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var we;function Yt(){if(we)return U;we=1;var t=p.default,r=Symbol.for("react.element"),o=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d={key:!0,ref:!0,__self:!0,__source:!0};function
|
|
9
|
+
*/var we;function Yt(){if(we)return U;we=1;var t=p.default,r=Symbol.for("react.element"),o=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d={key:!0,ref:!0,__self:!0,__source:!0};function c(x,m,g){var b,E={},D=null,$=null;g!==void 0&&(D=""+g),m.key!==void 0&&(D=""+m.key),m.ref!==void 0&&($=m.ref);for(b in m)a.call(m,b)&&!d.hasOwnProperty(b)&&(E[b]=m[b]);if(x&&x.defaultProps)for(b in m=x.defaultProps,m)E[b]===void 0&&(E[b]=m[b]);return{$$typeof:r,type:x,key:D,ref:$,props:E,_owner:i.current}}return U.Fragment=o,U.jsx=c,U.jsxs=c,U}var G={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Ce;function Ut(){return Ce||(Ce=1,process.env.NODE_ENV!=="production"&&function(){var t=p.default,r=Symbol.for("react.element"),o=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),
|
|
17
|
+
*/var Ce;function Ut(){return Ce||(Ce=1,process.env.NODE_ENV!=="production"&&function(){var t=p.default,r=Symbol.for("react.element"),o=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),x=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),$=Symbol.for("react.offscreen"),ut=Symbol.iterator,Xr="@@iterator";function Zr(e){if(e===null||typeof e!="object")return null;var s=ut&&e[ut]||e[Xr];return typeof s=="function"?s:null}var A=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function M(e){{for(var s=arguments.length,l=new Array(s>1?s-1:0),f=1;f<s;f++)l[f-1]=arguments[f];Qr("error",e,l)}}function Qr(e,s,l){{var f=A.ReactDebugCurrentFrame,w=f.getStackAddendum();w!==""&&(s+="%s",l=l.concat([w]));var j=l.map(function(h){return String(h)});j.unshift("Warning: "+s),Function.prototype.apply.call(console[e],console,j)}}var eo=!1,to=!1,ro=!1,oo=!1,no=!1,ft;ft=Symbol.for("react.module.reference");function ao(e){return!!(typeof e=="string"||typeof e=="function"||e===a||e===d||no||e===i||e===g||e===b||oo||e===$||eo||to||ro||typeof e=="object"&&e!==null&&(e.$$typeof===D||e.$$typeof===E||e.$$typeof===c||e.$$typeof===x||e.$$typeof===m||e.$$typeof===ft||e.getModuleId!==void 0))}function so(e,s,l){var f=e.displayName;if(f)return f;var w=s.displayName||s.name||"";return w!==""?l+"("+w+")":l}function pt(e){return e.displayName||"Context"}function k(e){if(e==null)return null;if(typeof e.tag=="number"&&M("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 a:return"Fragment";case o:return"Portal";case d:return"Profiler";case i:return"StrictMode";case g:return"Suspense";case b:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case x:var s=e;return pt(s)+".Consumer";case c:var l=e;return pt(l._context)+".Provider";case m:return so(e,e.render,"ForwardRef");case E:var f=e.displayName||null;return f!==null?f:k(e.type)||"Memo";case D:{var w=e,j=w._payload,h=w._init;try{return k(h(j))}catch{return null}}}return null}var V=Object.assign,K=0,mt,gt,vt,bt,xt,ht,yt;function wt(){}wt.__reactDisabledLog=!0;function io(){{if(K===0){mt=console.log,gt=console.info,vt=console.warn,bt=console.error,xt=console.group,ht=console.groupCollapsed,yt=console.groupEnd;var e={configurable:!0,enumerable:!0,value:wt,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}K++}}function lo(){{if(K--,K===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:V({},e,{value:mt}),info:V({},e,{value:gt}),warn:V({},e,{value:vt}),error:V({},e,{value:bt}),group:V({},e,{value:xt}),groupCollapsed:V({},e,{value:ht}),groupEnd:V({},e,{value:yt})})}K<0&&M("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var de=A.ReactCurrentDispatcher,ce;function ee(e,s,l){{if(ce===void 0)try{throw Error()}catch(w){var f=w.stack.trim().match(/\n( *(at )?)/);ce=f&&f[1]||""}return`
|
|
18
18
|
`+ce+e}}var ue=!1,te;{var co=typeof WeakMap=="function"?WeakMap:Map;te=new co}function Ct(e,s){if(!e||ue)return"";{var l=te.get(e);if(l!==void 0)return l}var f;ue=!0;var w=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var j;j=de.current,de.current=null,io();try{if(s){var h=function(){throw Error()};if(Object.defineProperty(h.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(h,[])}catch(F){f=F}Reflect.construct(e,[],h)}else{try{h.call()}catch(F){f=F}e.call(h.prototype)}}else{try{throw Error()}catch(F){f=F}e()}}catch(F){if(F&&f&&typeof F.stack=="string"){for(var v=F.stack.split(`
|
|
19
19
|
`),O=f.stack.split(`
|
|
20
20
|
`),R=v.length-1,P=O.length-1;R>=1&&P>=0&&v[R]!==O[P];)P--;for(;R>=1&&P>=0;R--,P--)if(v[R]!==O[P]){if(R!==1||P!==1)do if(R--,P--,P<0||v[R]!==O[P]){var I=`
|
|
@@ -24,5 +24,5 @@ Check the render method of \``+e+"`."}return""}}function So(e){{if(e!==void 0){v
|
|
|
24
24
|
|
|
25
25
|
Check your code at `+s+":"+l+"."}return""}}var Dt={};function To(e){{var s=Pt();if(!s){var l=typeof e=="string"?e:e.displayName||e.name;l&&(s=`
|
|
26
26
|
|
|
27
|
-
Check the top-level render call using <`+l+">.")}return s}}function Mt(e,s){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var l=To(s);if(Dt[l])return;Dt[l]=!0;var f="";e&&e._owner&&e._owner!==me.current&&(f=" It was passed a child from "+k(e._owner.type)+"."),W(e),M('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',l,f),W(null)}}function Ot(e,s){{if(typeof e!="object")return;if(fe(e))for(var l=0;l<e.length;l++){var f=e[l];ve(f)&&Mt(f,s)}else if(ve(e))e._store&&(e._store.validated=!0);else if(e){var w=Zr(e);if(typeof w=="function"&&w!==e.entries)for(var j=w.call(e),h;!(h=j.next()).done;)ve(h.value)&&Mt(h.value,s)}}}function _o(e){{var s=e.type;if(s==null||typeof s=="string")return;var l;if(typeof s=="function")l=s.propTypes;else if(typeof s=="object"&&(s.$$typeof===m||s.$$typeof===E))l=s.propTypes;else return;if(l){var f=k(s);po(l,e.props,"prop",f,e)}else if(s.PropTypes!==void 0&&!ge){ge=!0;var w=k(s);M("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",w||"Unknown")}typeof s.getDefaultProps=="function"&&!s.getDefaultProps.isReactClassApproved&&M("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ro(e){{for(var s=Object.keys(e.props),l=0;l<s.length;l++){var f=s[l];if(f!=="children"&&f!=="key"){W(e),M("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",f),W(null);break}}e.ref!==null&&(W(e),M("Invalid attribute `ref` supplied to `React.Fragment`."),W(null))}}function It(e,s,l,f,w,j){{var h=ao(e);if(!h){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 O=So(w);O?v+=O:v+=Pt();var R;e===null?R="null":fe(e)?R="array":e!==void 0&&e.$$typeof===r?(R="<"+(k(e.type)||"Unknown")+" />",v=" Did you accidentally export a JSX literal instead of a component?"):R=typeof e,M("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",R,v)}var P=No(e,s,l,w,j);if(P==null)return P;if(h){var I=s.children;if(I!==void 0)if(f)if(fe(I)){for(var q=0;q<I.length;q++)Ot(I[q],e);Object.freeze&&Object.freeze(I)}else M("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 Ot(I,e)}return e===a?Ro(P):_o(P),P}}function Eo(e,s,l){return It(e,s,l,!0)}function Po(e,s,l){return It(e,s,l,!1)}var Do=Po,Mo=Eo;G.Fragment=a,G.jsx=Do,G.jsxs=Mo}()),G}process.env.NODE_ENV==="production"?ae.exports=Yt():ae.exports=Ut();var n=ae.exports;function c(...t){return Lt.twMerge(Ft.clsx(t))}const je=X.cva("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Gt({className:t,variant:r,...o}){return n.jsx("div",{className:c(je({variant:r}),t),...o})}const Jt=Object.freeze(Object.defineProperty({__proto__:null,Badge:Gt,badgeVariants:je},Symbol.toStringTag,{value:"Module"})),Ne=X.cva("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Se=p.forwardRef(({className:t,variant:r,size:o,asChild:a=!1,...i},d)=>{const u=a?xe.Slot:"button";return n.jsx(u,{className:c(Ne({variant:r,size:o,className:t})),ref:d,...i})});Se.displayName="Button";const Kt=Object.freeze(Object.defineProperty({__proto__:null,Button:Se,buttonVariants:Ne},Symbol.toStringTag,{value:"Module"})),Te=p.forwardRef(({className:t,...r},o)=>n.jsx("div",{ref:o,className:c("rounded-lg border bg-card text-card-foreground shadow-sm",t),...r}));Te.displayName="Card";const _e=p.forwardRef(({className:t,...r},o)=>n.jsx("div",{ref:o,className:c("flex flex-col space-y-1.5 p-6",t),...r}));_e.displayName="CardHeader";const Re=p.forwardRef(({className:t,...r},o)=>n.jsx("h3",{ref:o,className:c("text-2xl font-semibold leading-none tracking-tight",t),...r}));Re.displayName="CardTitle";const Ee=p.forwardRef(({className:t,...r},o)=>n.jsx("p",{ref:o,className:c("text-sm text-muted-foreground",t),...r}));Ee.displayName="CardDescription";const Pe=p.forwardRef(({className:t,...r},o)=>n.jsx("div",{ref:o,className:c("p-6 pt-0",t),...r}));Pe.displayName="CardContent";const De=p.forwardRef(({className:t,...r},o)=>n.jsx("div",{ref:o,className:c("flex items-center p-6 pt-0",t),...r}));De.displayName="CardFooter";const Ht=Object.freeze(Object.defineProperty({__proto__:null,Card:Te,CardContent:Pe,CardDescription:Ee,CardFooter:De,CardHeader:_e,CardTitle:Re},Symbol.toStringTag,{value:"Module"})),Xt=N.Root,Zt=N.Trigger,Qt=N.Group,er=N.Portal,tr=N.Sub,rr=N.RadioGroup,Me=p.forwardRef(({className:t,inset:r,children:o,...a},i)=>n.jsxs(N.SubTrigger,{ref:i,className:c("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",r&&"pl-8",t),...a,children:[o,n.jsx(L.ChevronRight,{className:"ml-auto h-4 w-4"})]}));Me.displayName=N.SubTrigger.displayName;const Oe=p.forwardRef(({className:t,...r},o)=>n.jsx(N.SubContent,{ref:o,className:c("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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",t),...r}));Oe.displayName=N.SubContent.displayName;const Ie=p.forwardRef(({className:t,sideOffset:r=4,...o},a)=>n.jsx(N.Content,{ref:a,sideOffset:r,className:c("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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",t),...o}));Ie.displayName=N.Content.displayName;const ke=p.forwardRef(({className:t,inset:r,...o},a)=>n.jsx(N.Item,{ref:a,className:c("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",r&&"pl-8",t),...o}));ke.displayName=N.Item.displayName;const Fe=p.forwardRef(({className:t,children:r,checked:o,...a},i)=>n.jsxs(N.CheckboxItem,{ref:i,className:c("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),checked:o,...a,children:[n.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n.jsx(N.ItemIndicator,{children:n.jsx(L.Check,{className:"h-4 w-4"})})}),r]}));Fe.displayName=N.CheckboxItem.displayName;const Le=p.forwardRef(({className:t,children:r,...o},a)=>n.jsxs(N.RadioItem,{ref:a,className:c("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...o,children:[n.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n.jsx(N.ItemIndicator,{children:n.jsx(L.Circle,{className:"h-2 w-2 fill-current"})})}),r]}));Le.displayName=N.RadioItem.displayName;const Be=p.forwardRef(({className:t,inset:r,...o},a)=>n.jsx(N.Label,{ref:a,className:c("px-2 py-1.5 text-sm font-semibold",r&&"pl-8",t),...o}));Be.displayName=N.Label.displayName;const ze=p.forwardRef(({className:t,...r},o)=>n.jsx(N.Separator,{ref:o,className:c("-mx-1 my-1 h-px bg-muted",t),...r}));ze.displayName=N.Separator.displayName;const Ve=({className:t,...r})=>n.jsx("span",{className:c("ml-auto text-xs tracking-widest opacity-60",t),...r});Ve.displayName="DropdownMenuShortcut";const or=Object.freeze(Object.defineProperty({__proto__:null,DropdownMenu:Xt,DropdownMenuCheckboxItem:Fe,DropdownMenuContent:Ie,DropdownMenuGroup:Qt,DropdownMenuItem:ke,DropdownMenuLabel:Be,DropdownMenuPortal:er,DropdownMenuRadioGroup:rr,DropdownMenuRadioItem:Le,DropdownMenuSeparator:ze,DropdownMenuShortcut:Ve,DropdownMenuSub:tr,DropdownMenuSubContent:Oe,DropdownMenuSubTrigger:Me,DropdownMenuTrigger:Zt},Symbol.toStringTag,{value:"Module"})),nr=X.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),se=p.forwardRef(({className:t,...r},o)=>n.jsx(he.Root,{ref:o,className:c(nr(),t),...r}));se.displayName=he.Root.displayName;const ar=Object.freeze(Object.defineProperty({__proto__:null,Label:se},Symbol.toStringTag,{value:"Module"})),sr=Z.FormProvider,$e=p.createContext({}),ir=({...t})=>n.jsx($e.Provider,{value:{name:t.name},children:n.jsx(Z.Controller,{...t})}),J=()=>{const t=p.useContext($e),r=p.useContext(Ae),{getFieldState:o,formState:a}=Z.useFormContext(),i=o(t.name,a);if(!t)throw new Error("useFormField should be used within <FormField>");const{id:d}=r;return{id:d,name:t.name,formItemId:`${d}-form-item`,formDescriptionId:`${d}-form-item-description`,formMessageId:`${d}-form-item-message`,...i}},Ae=p.createContext({}),We=p.forwardRef(({className:t,...r},o)=>{const a=p.useId();return n.jsx(Ae.Provider,{value:{id:a},children:n.jsx("div",{ref:o,className:c("space-y-2",t),...r})})});We.displayName="FormItem";const qe=p.forwardRef(({className:t,...r},o)=>{const{error:a,formItemId:i}=J();return n.jsx(se,{ref:o,className:c(a&&"text-destructive",t),htmlFor:i,...r})});qe.displayName="FormLabel";const Ye=p.forwardRef(({...t},r)=>{const{error:o,formItemId:a,formDescriptionId:i,formMessageId:d}=J();return n.jsx(xe.Slot,{ref:r,id:a,"aria-describedby":o?`${i} ${d}`:`${i}`,"aria-invalid":!!o,...t})});Ye.displayName="FormControl";const Ue=p.forwardRef(({className:t,...r},o)=>{const{formDescriptionId:a}=J();return n.jsx("p",{ref:o,id:a,className:c("text-sm text-muted-foreground",t),...r})});Ue.displayName="FormDescription";const Ge=p.forwardRef(({className:t,children:r,...o},a)=>{const{error:i,formMessageId:d}=J(),u=i?String(i==null?void 0:i.message):r;return u?n.jsx("p",{ref:a,id:d,className:c("text-sm font-medium text-destructive",t),...o,children:u}):null});Ge.displayName="FormMessage";const lr=Object.freeze(Object.defineProperty({__proto__:null,Form:sr,FormControl:Ye,FormDescription:Ue,FormField:ir,FormItem:We,FormLabel:qe,FormMessage:Ge,useFormField:J},Symbol.toStringTag,{value:"Module"})),Je=p.forwardRef(({className:t,type:r,...o},a)=>n.jsx("input",{type:r,className:c("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),ref:a,...o}));Je.displayName="Input";const dr=Object.freeze(Object.defineProperty({__proto__:null,Input:Je},Symbol.toStringTag,{value:"Module"})),cr=Q.Root,ur=Q.Trigger,Ke=p.forwardRef(({className:t,align:r="center",sideOffset:o=4,...a},i)=>n.jsx(Q.Content,{ref:i,align:r,sideOffset:o,className:c("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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",t),...a}));Ke.displayName=Q.Content.displayName;const fr=Object.freeze(Object.defineProperty({__proto__:null,Popover:cr,PopoverContent:Ke,PopoverTrigger:ur},Symbol.toStringTag,{value:"Module"})),pr=T.Root,mr=T.Group,gr=T.Value,He=p.forwardRef(({className:t,children:r,...o},a)=>n.jsxs(T.Trigger,{ref:a,className:c("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...o,children:[r,n.jsx(T.Icon,{asChild:!0,children:n.jsx(L.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));He.displayName=T.Trigger.displayName;const ie=p.forwardRef(({className:t,...r},o)=>n.jsx(T.ScrollUpButton,{ref:o,className:c("flex cursor-default items-center justify-center py-1",t),...r,children:n.jsx(L.ChevronUp,{className:"h-4 w-4"})}));ie.displayName=T.ScrollUpButton.displayName;const le=p.forwardRef(({className:t,...r},o)=>n.jsx(T.ScrollDownButton,{ref:o,className:c("flex cursor-default items-center justify-center py-1",t),...r,children:n.jsx(L.ChevronDown,{className:"h-4 w-4"})}));le.displayName=T.ScrollDownButton.displayName;const Xe=p.forwardRef(({className:t,children:r,position:o="popper",...a},i)=>n.jsxs(T.Content,{ref:i,className:c("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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",o==="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",t),position:o,...a,children:[n.jsx(ie,{}),n.jsx(T.Viewport,{className:c("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r}),n.jsx(le,{})]}));Xe.displayName=T.Content.displayName;const Ze=p.forwardRef(({className:t,...r},o)=>n.jsx(T.Label,{ref:o,className:c("py-1.5 pl-8 pr-2 text-sm font-semibold",t),...r}));Ze.displayName=T.Label.displayName;const Qe=p.forwardRef(({className:t,children:r,...o},a)=>n.jsxs(T.Item,{ref:a,className:c("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...o,children:[n.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n.jsx(T.ItemIndicator,{children:n.jsx(L.Check,{className:"h-4 w-4"})})}),n.jsx(T.ItemText,{children:r})]}));Qe.displayName=T.Item.displayName;const et=p.forwardRef(({className:t,...r},o)=>n.jsx(T.Separator,{ref:o,className:c("-mx-1 my-1 h-px bg-muted",t),...r}));et.displayName=T.Separator.displayName;const vr=Object.freeze(Object.defineProperty({__proto__:null,Select:pr,SelectContent:Xe,SelectGroup:mr,SelectItem:Qe,SelectLabel:Ze,SelectScrollDownButton:le,SelectScrollUpButton:ie,SelectSeparator:et,SelectTrigger:He,SelectValue:gr},Symbol.toStringTag,{value:"Module"})),br=z.Root,tt=p.forwardRef(({className:t,...r},o)=>n.jsx(z.List,{ref:o,className:c("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",t),...r}));tt.displayName=z.List.displayName;const rt=p.forwardRef(({className:t,...r},o)=>n.jsx(z.Trigger,{ref:o,className:c("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",t),...r}));rt.displayName=z.Trigger.displayName;const ot=p.forwardRef(({className:t,...r},o)=>n.jsx(z.Content,{ref:o,className:c("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t),...r}));ot.displayName=z.Content.displayName;const xr=Object.freeze(Object.defineProperty({__proto__:null,Tabs:br,TabsContent:ot,TabsList:tt,TabsTrigger:rt},Symbol.toStringTag,{value:"Module"})),nt=X.cva("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-3",sm:"h-9 px-2.5",lg:"h-11 px-5"}},defaultVariants:{variant:"default",size:"default"}}),at=p.forwardRef(({className:t,variant:r,size:o,...a},i)=>n.jsx(ye.Root,{ref:i,className:c(nt({variant:r,size:o,className:t})),...a}));at.displayName=ye.Root.displayName;const hr=Object.freeze(Object.defineProperty({__proto__:null,Toggle:at,toggleVariants:nt},Symbol.toStringTag,{value:"Module"})),yr=Y.Provider,wr=Y.Root,Cr=Y.Trigger,st=p.forwardRef(({className:t,sideOffset:r=4,...o},a)=>n.jsx(Y.Content,{ref:a,sideOffset:r,className:c("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md 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",t),...o}));st.displayName=Y.Content.displayName;const jr={Badge:Jt,Button:Kt,Card:Ht,DropdownMenu:or,Form:lr,Input:dr,Label:ar,Popover:fr,Select:vr,Tabs:xr,Toggle:hr,Tooltip:Object.freeze(Object.defineProperty({__proto__:null,Tooltip:wr,TooltipContent:st,TooltipProvider:yr,TooltipTrigger:Cr},Symbol.toStringTag,{value:"Module"}))},it=y.createContext(void 0);function _(){return y.useContext(it)}const Nr=t=>{const{children:r,...o}=t;C.assertEmpty(o);const a=_(),i=Z.useForm();return n.jsx(a.Form.Form,{...i,children:r})},Sr=t=>y.forwardRef((r,o)=>n.jsx(t,{onPointerDown:a=>{a.nativeEvent.fakeEvent||(a.ctrlKey=!0)},onPointerUp:a=>{const i=new PointerEvent("pointerdown",a.nativeEvent);i.fakeEvent=!0,a.target.dispatchEvent(i)},...r,ref:o})),Tr=t=>{const{children:r,onOpenChange:o,position:a,sub:i,...d}=t;C.assertEmpty(d);const u=_();return i?n.jsx(u.DropdownMenu.DropdownMenuSub,{onOpenChange:o,children:r}):n.jsx(u.DropdownMenu.DropdownMenu,{onOpenChange:o,children:r})},_r=t=>{const{children:r,sub:o,...a}=t;C.assertEmpty(a);const i=_(),d=y.useMemo(()=>Sr(i.DropdownMenu.DropdownMenuTrigger),[i.DropdownMenu.DropdownMenuTrigger]);return o?n.jsx(i.DropdownMenu.DropdownMenuSubTrigger,{children:r}):n.jsx(d,{asChild:!0,...a,children:r})},Rr=y.forwardRef((t,r)=>{const{className:o,children:a,sub:i,...d}=t;C.assertEmpty(d);const u=_();return i?n.jsx(u.DropdownMenu.DropdownMenuSubContent,{className:o,ref:r,children:a}):n.jsx(u.DropdownMenu.DropdownMenuContent,{className:o,ref:r,children:a})}),Er=y.forwardRef((t,r)=>{const{className:o,children:a,icon:i,checked:d,subTrigger:u,onClick:x,...m}=t;C.assertEmpty(m);const g=_();return u?n.jsxs(n.Fragment,{children:[i,a]}):d!==void 0?n.jsxs(g.DropdownMenu.DropdownMenuCheckboxItem,{className:c(o,"gap-1"),ref:r,checked:d,onClick:x,...m,children:[i,a]}):n.jsxs(g.DropdownMenu.DropdownMenuItem,{className:o,ref:r,onClick:x,...m,children:[i,a,u&&n.jsx(L.ChevronRight,{className:"ml-auto h-4 w-4"})]})}),Pr=y.forwardRef((t,r)=>{const{className:o,...a}=t;C.assertEmpty(a);const i=_();return n.jsx(i.DropdownMenu.DropdownMenuSeparator,{className:o,ref:r})}),Dr=y.forwardRef((t,r)=>{const{className:o,children:a,...i}=t;C.assertEmpty(i);const d=_();return n.jsx(d.DropdownMenu.DropdownMenuLabel,{className:o,ref:r,children:a})}),Mr=y.forwardRef((t,r)=>{const{className:o,tabs:a,defaultOpenTab:i,openTab:d,setOpenTab:u,loading:x,...m}=t;C.assertEmpty(m);const g=_();return n.jsxs(g.Tabs.Tabs,{className:c(o,"bg-popover p-2 rounded-lg"),ref:r,value:d,defaultValue:i,onValueChange:u,children:[n.jsx(g.Tabs.TabsList,{children:a.map(b=>n.jsx(g.Tabs.TabsTrigger,{value:b.name,children:b.name},b.name))}),a.map(b=>n.jsx(g.Tabs.TabsContent,{value:b.name,children:n.jsx(g.Card.Card,{children:n.jsx(g.Card.CardContent,{className:"p-4",children:b.tabPanel})})},b.name))]})}),Or=y.forwardRef((t,r)=>{const{className:o,children:a,onClick:i,label:d,...u}=t;C.assertEmpty(u);const x=_();return n.jsx(x.Button.Button,{type:"submit",className:o,"aria-label":d,ref:r,onClick:i,children:a})}),Ir=y.forwardRef((t,r)=>{const{className:o,value:a,placeholder:i,onChange:d,...u}=t;C.assertEmpty(u);const x=_();return n.jsx(x.Input.Input,{type:"file",className:o,ref:r,value:a?a.name:void 0,onChange:async m=>d==null?void 0:d(m.target.files[0]),placeholder:i})}),kr=y.forwardRef((t,r)=>{const{className:o,children:a,...i}=t;return C.assertEmpty(i),n.jsx("div",{className:c(o,"flex flex-col gap-2 items-start justify-center"),ref:r,children:a})}),Fr=y.forwardRef((t,r)=>{const{className:o,value:a,placeholder:i,onKeyDown:d,onChange:u,...x}=t;C.assertEmpty(x);const m=_();return n.jsx(m.Input.Input,{"data-test":"embed-input",className:c(o,"w-80"),ref:r,value:a,placeholder:i,onKeyDown:d,onChange:u})}),Lr=t=>{const{children:r,opened:o,position:a,...i}=t;C.assertEmpty(i);const d=_();return n.jsx(d.Popover.Popover,{open:o,children:r})},Br=y.forwardRef((t,r)=>{const{children:o,...a}=t;C.assertEmpty(a);const i=_();return n.jsx(i.Popover.PopoverTrigger,{ref:r,asChild:!0,children:o})}),zr=y.forwardRef((t,r)=>{const{className:o,variant:a,children:i,...d}=t;C.assertEmpty(d);const u=_();return n.jsx(u.Popover.PopoverContent,{sideOffset:8,className:c(o,"flex flex-col gap-2",a==="panel-popover"?"p-0 border-none shadow-none max-w-none w-fit":""),ref:r,children:i})}),Vr=y.forwardRef((t,r)=>{const{className:o,children:a,...i}=t;return C.assertEmpty(i),n.jsx("div",{className:o,ref:r,children:a})}),$r=y.forwardRef((t,r)=>{const{className:o,children:a,icon:i,onClick:d,onDragEnd:u,onDragStart:x,draggable:m,label:g,...b}=t;C.assertEmpty(b,!1);const E=_();return n.jsxs(E.Button.Button,{variant:"ghost",className:c(o,"text-gray-400"),ref:r,"aria-label":g,onClick:d,onDragStart:x,onDragEnd:u,draggable:m,...b,children:[i,a]})}),Ar=y.forwardRef((t,r)=>{const{className:o,children:a,id:i,...d}=t;return C.assertEmpty(d),n.jsx("div",{id:i,role:"listbox",className:c("z-50 min-w-[8rem] overflow-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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",o),ref:r,children:a})}),Wr=y.forwardRef((t,r)=>{const{className:o,children:a,...i}=t;return C.assertEmpty(i),n.jsx("div",{className:c("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",o),ref:r,children:n.jsx("div",{children:a})})}),qr=y.forwardRef((t,r)=>{const o=_(),{className:a,item:i,isSelected:d,onClick:u,id:x,...m}=t;return C.assertEmpty(m),n.jsxs("div",{className:c("relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),ref:r,id:x,onClick:u,role:"option","aria-selected":d||void 0,children:[i.icon&&n.jsx("div",{className:"p-3","data-position":"left",children:i.icon}),n.jsxs("div",{className:"flex-1",children:[n.jsx("div",{className:"text-base",children:i.title}),n.jsx("div",{className:"text-xs",children:i.subtext})]}),i.badge&&n.jsx("div",{"data-position":"right",className:"text-xs",children:n.jsx(o.Badge.Badge,{variant:"secondary",children:i.badge})})]})}),Yr=y.forwardRef((t,r)=>{const{className:o,children:a,...i}=t;return C.assertEmpty(i),n.jsx("div",{className:c("px-2 py-1.5 text-sm font-semibold",o),ref:r,children:a})}),Ur=y.forwardRef((t,r)=>{const{className:o,children:a,...i}=t;return C.assertEmpty(i),n.jsx("div",{className:o,ref:r,children:a})}),Gr=y.forwardRef((t,r)=>{const{className:o,children:a,draggable:i,onDragStart:d,onDragEnd:u,style:x,label:m,...g}=t;C.assertEmpty(g,!1);const b=_();return n.jsx(b.Button.Button,{variant:"ghost",className:c(o,"p-0 h-fit w-fit text-gray-400"),ref:r,"aria-label":m,draggable:i,onDragStart:d,onDragEnd:u,style:x,...g,children:a})}),Jr=y.forwardRef(t=>{const{className:r,name:o,label:a,icon:i,value:d,autoFocus:u,placeholder:x,onKeyDown:m,onChange:g,onSubmit:b,...E}=t;C.assertEmpty(E);const D=_();return a?n.jsxs("div",{children:[n.jsx(D.Label.Label,{htmlFor:a,children:a}),n.jsx(D.Input.Input,{className:r,id:a,name:o,autoFocus:u,placeholder:x,value:d,onKeyDown:m,onChange:g,onSubmit:b})]}):n.jsx(D.Input.Input,{"aria-label":o,name:o,autoFocus:u,placeholder:x,value:d,onKeyDown:m,onChange:g,onSubmit:b})}),lt=y.forwardRef((t,r)=>{const{className:o,children:a,onMouseEnter:i,onMouseLeave:d,...u}=t;C.assertEmpty(u);const x=_();return n.jsx(x.Tooltip.TooltipProvider,{delayDuration:0,children:n.jsx("div",{className:c(o,"flex gap-1 p-1 bg-popover text-popover-foreground border rounded-lg shadow-md"),ref:r,onMouseEnter:i,onMouseLeave:d,children:a})})}),dt=y.forwardRef((t,r)=>{const{className:o,children:a,mainTooltip:i,secondaryTooltip:d,icon:u,isSelected:x,isDisabled:m,onClick:g,label:b,...E}=t;C.assertEmpty(E,!1);const D=_(),$=x===void 0?n.jsxs(D.Button.Button,{className:o,variant:"ghost",disabled:m,onClick:g,ref:r,"aria-label":b,...E,children:[u,a]}):n.jsxs(D.Toggle.Toggle,{className:c(o,"data-[state=open]:bg-accent data-[state=closed]:text-accent-foreground"),"aria-label":b,onClick:g,pressed:x,disabled:m,"data-state":x?"on":"off","data-disabled":m,ref:r,...E,children:[u,a]});return n.jsxs(D.Tooltip.Tooltip,{children:[n.jsx(D.Tooltip.TooltipTrigger,{asChild:!0,children:$}),n.jsxs(D.Tooltip.TooltipContent,{className:"flex flex-col items-center",children:[n.jsx("span",{children:i}),d&&n.jsx("span",{children:d})]})]})}),Kr=y.forwardRef((t,r)=>{const{className:o,items:a,isDisabled:i,...d}=t;C.assertEmpty(d);const u=_(),x=g=>n.jsxs("div",{className:"flex gap-1 items-center",children:[g.icon,g.text]}),m=a.filter(g=>g.isSelected)[0];return m?n.jsxs(u.Select.Select,{value:m.text,onValueChange:g=>{var b,E;return(E=(b=a.find(D=>D.text===g)).onClick)==null?void 0:E.call(b)},disabled:i,children:[n.jsx(u.Select.SelectTrigger,{className:"border-none",children:n.jsx(u.Select.SelectValue,{})}),n.jsx(u.Select.SelectContent,{className:o,ref:r,children:a.map(g=>n.jsx(u.Select.SelectItem,{disabled:g.isDisabled,value:g.text,children:n.jsx(x,{...g})},g.text))})]}):null}),Io="",ct={FormattingToolbar:{Root:lt,Button:dt,Select:Kr},ImagePanel:{Root:Mr,Button:Or,FileInput:Ir,TabPanel:kr,TextInput:Fr},LinkToolbar:{Root:lt,Button:dt},SideMenu:{Root:Vr,Button:$r},SuggestionMenu:{Root:Ar,Item:qr,EmptyItem:Wr,Label:Yr,Loader:Ur},TableHandle:{Root:Gr},Generic:{Form:{Root:Nr,TextInput:Jr},Menu:{Root:Tr,Trigger:_r,Dropdown:Rr,Divider:Pr,Label:Dr,Item:Er},Popover:{Root:Lr,Trigger:Br,Content:zr}}},Hr=t=>{const{shadCNComponents:r,...o}=t,a=y.useMemo(()=>({...r,...jr}),[r]);return n.jsx(it.Provider,{value:a,children:n.jsx(be.ComponentsContext.Provider,{value:ct,children:n.jsx(be.BlockNoteViewRaw,{...o})})})};S.BlockNoteView=Hr,S.components=ct,Object.defineProperty(S,Symbol.toStringTag,{value:"Module"})});
|
|
27
|
+
Check the top-level render call using <`+l+">.")}return s}}function Mt(e,s){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var l=To(s);if(Dt[l])return;Dt[l]=!0;var f="";e&&e._owner&&e._owner!==me.current&&(f=" It was passed a child from "+k(e._owner.type)+"."),W(e),M('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',l,f),W(null)}}function Ot(e,s){{if(typeof e!="object")return;if(fe(e))for(var l=0;l<e.length;l++){var f=e[l];ve(f)&&Mt(f,s)}else if(ve(e))e._store&&(e._store.validated=!0);else if(e){var w=Zr(e);if(typeof w=="function"&&w!==e.entries)for(var j=w.call(e),h;!(h=j.next()).done;)ve(h.value)&&Mt(h.value,s)}}}function _o(e){{var s=e.type;if(s==null||typeof s=="string")return;var l;if(typeof s=="function")l=s.propTypes;else if(typeof s=="object"&&(s.$$typeof===m||s.$$typeof===E))l=s.propTypes;else return;if(l){var f=k(s);po(l,e.props,"prop",f,e)}else if(s.PropTypes!==void 0&&!ge){ge=!0;var w=k(s);M("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",w||"Unknown")}typeof s.getDefaultProps=="function"&&!s.getDefaultProps.isReactClassApproved&&M("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ro(e){{for(var s=Object.keys(e.props),l=0;l<s.length;l++){var f=s[l];if(f!=="children"&&f!=="key"){W(e),M("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",f),W(null);break}}e.ref!==null&&(W(e),M("Invalid attribute `ref` supplied to `React.Fragment`."),W(null))}}function It(e,s,l,f,w,j){{var h=ao(e);if(!h){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 O=So(w);O?v+=O:v+=Pt();var R;e===null?R="null":fe(e)?R="array":e!==void 0&&e.$$typeof===r?(R="<"+(k(e.type)||"Unknown")+" />",v=" Did you accidentally export a JSX literal instead of a component?"):R=typeof e,M("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",R,v)}var P=No(e,s,l,w,j);if(P==null)return P;if(h){var I=s.children;if(I!==void 0)if(f)if(fe(I)){for(var q=0;q<I.length;q++)Ot(I[q],e);Object.freeze&&Object.freeze(I)}else M("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 Ot(I,e)}return e===a?Ro(P):_o(P),P}}function Eo(e,s,l){return It(e,s,l,!0)}function Po(e,s,l){return It(e,s,l,!1)}var Do=Po,Mo=Eo;G.Fragment=a,G.jsx=Do,G.jsxs=Mo}()),G}process.env.NODE_ENV==="production"?ae.exports=Yt():ae.exports=Ut();var n=ae.exports;function u(...t){return Lt.twMerge(Ft.clsx(t))}const je=X.cva("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Gt({className:t,variant:r,...o}){return n.jsx("div",{className:u(je({variant:r}),t),...o})}const Jt=Object.freeze(Object.defineProperty({__proto__:null,Badge:Gt,badgeVariants:je},Symbol.toStringTag,{value:"Module"})),Ne=X.cva("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Se=p.forwardRef(({className:t,variant:r,size:o,asChild:a=!1,...i},d)=>{const c=a?xe.Slot:"button";return n.jsx(c,{className:u(Ne({variant:r,size:o,className:t})),ref:d,...i})});Se.displayName="Button";const Kt=Object.freeze(Object.defineProperty({__proto__:null,Button:Se,buttonVariants:Ne},Symbol.toStringTag,{value:"Module"})),Te=p.forwardRef(({className:t,...r},o)=>n.jsx("div",{ref:o,className:u("rounded-lg border bg-card text-card-foreground shadow-sm",t),...r}));Te.displayName="Card";const _e=p.forwardRef(({className:t,...r},o)=>n.jsx("div",{ref:o,className:u("flex flex-col space-y-1.5 p-6",t),...r}));_e.displayName="CardHeader";const Re=p.forwardRef(({className:t,...r},o)=>n.jsx("h3",{ref:o,className:u("text-2xl font-semibold leading-none tracking-tight",t),...r}));Re.displayName="CardTitle";const Ee=p.forwardRef(({className:t,...r},o)=>n.jsx("p",{ref:o,className:u("text-sm text-muted-foreground",t),...r}));Ee.displayName="CardDescription";const Pe=p.forwardRef(({className:t,...r},o)=>n.jsx("div",{ref:o,className:u("p-6 pt-0",t),...r}));Pe.displayName="CardContent";const De=p.forwardRef(({className:t,...r},o)=>n.jsx("div",{ref:o,className:u("flex items-center p-6 pt-0",t),...r}));De.displayName="CardFooter";const Ht=Object.freeze(Object.defineProperty({__proto__:null,Card:Te,CardContent:Pe,CardDescription:Ee,CardFooter:De,CardHeader:_e,CardTitle:Re},Symbol.toStringTag,{value:"Module"})),Xt=N.Root,Zt=N.Trigger,Qt=N.Group,er=N.Portal,tr=N.Sub,rr=N.RadioGroup,Me=p.forwardRef(({className:t,inset:r,children:o,...a},i)=>n.jsxs(N.SubTrigger,{ref:i,className:u("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",r&&"pl-8",t),...a,children:[o,n.jsx(L.ChevronRight,{className:"ml-auto h-4 w-4"})]}));Me.displayName=N.SubTrigger.displayName;const Oe=p.forwardRef(({className:t,...r},o)=>n.jsx(N.SubContent,{ref:o,className:u("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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",t),...r}));Oe.displayName=N.SubContent.displayName;const Ie=p.forwardRef(({className:t,sideOffset:r=4,...o},a)=>n.jsx(N.Content,{ref:a,sideOffset:r,className:u("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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",t),...o}));Ie.displayName=N.Content.displayName;const ke=p.forwardRef(({className:t,inset:r,...o},a)=>n.jsx(N.Item,{ref:a,className:u("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",r&&"pl-8",t),...o}));ke.displayName=N.Item.displayName;const Fe=p.forwardRef(({className:t,children:r,checked:o,...a},i)=>n.jsxs(N.CheckboxItem,{ref:i,className:u("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),checked:o,...a,children:[n.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n.jsx(N.ItemIndicator,{children:n.jsx(L.Check,{className:"h-4 w-4"})})}),r]}));Fe.displayName=N.CheckboxItem.displayName;const Le=p.forwardRef(({className:t,children:r,...o},a)=>n.jsxs(N.RadioItem,{ref:a,className:u("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...o,children:[n.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n.jsx(N.ItemIndicator,{children:n.jsx(L.Circle,{className:"h-2 w-2 fill-current"})})}),r]}));Le.displayName=N.RadioItem.displayName;const Be=p.forwardRef(({className:t,inset:r,...o},a)=>n.jsx(N.Label,{ref:a,className:u("px-2 py-1.5 text-sm font-semibold",r&&"pl-8",t),...o}));Be.displayName=N.Label.displayName;const ze=p.forwardRef(({className:t,...r},o)=>n.jsx(N.Separator,{ref:o,className:u("-mx-1 my-1 h-px bg-muted",t),...r}));ze.displayName=N.Separator.displayName;const Ve=({className:t,...r})=>n.jsx("span",{className:u("ml-auto text-xs tracking-widest opacity-60",t),...r});Ve.displayName="DropdownMenuShortcut";const or=Object.freeze(Object.defineProperty({__proto__:null,DropdownMenu:Xt,DropdownMenuCheckboxItem:Fe,DropdownMenuContent:Ie,DropdownMenuGroup:Qt,DropdownMenuItem:ke,DropdownMenuLabel:Be,DropdownMenuPortal:er,DropdownMenuRadioGroup:rr,DropdownMenuRadioItem:Le,DropdownMenuSeparator:ze,DropdownMenuShortcut:Ve,DropdownMenuSub:tr,DropdownMenuSubContent:Oe,DropdownMenuSubTrigger:Me,DropdownMenuTrigger:Zt},Symbol.toStringTag,{value:"Module"})),nr=X.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),se=p.forwardRef(({className:t,...r},o)=>n.jsx(he.Root,{ref:o,className:u(nr(),t),...r}));se.displayName=he.Root.displayName;const ar=Object.freeze(Object.defineProperty({__proto__:null,Label:se},Symbol.toStringTag,{value:"Module"})),sr=Z.FormProvider,$e=p.createContext({}),ir=({...t})=>n.jsx($e.Provider,{value:{name:t.name},children:n.jsx(Z.Controller,{...t})}),J=()=>{const t=p.useContext($e),r=p.useContext(Ae),{getFieldState:o,formState:a}=Z.useFormContext(),i=o(t.name,a);if(!t)throw new Error("useFormField should be used within <FormField>");const{id:d}=r;return{id:d,name:t.name,formItemId:`${d}-form-item`,formDescriptionId:`${d}-form-item-description`,formMessageId:`${d}-form-item-message`,...i}},Ae=p.createContext({}),We=p.forwardRef(({className:t,...r},o)=>{const a=p.useId();return n.jsx(Ae.Provider,{value:{id:a},children:n.jsx("div",{ref:o,className:u("space-y-2",t),...r})})});We.displayName="FormItem";const qe=p.forwardRef(({className:t,...r},o)=>{const{error:a,formItemId:i}=J();return n.jsx(se,{ref:o,className:u(a&&"text-destructive",t),htmlFor:i,...r})});qe.displayName="FormLabel";const Ye=p.forwardRef(({...t},r)=>{const{error:o,formItemId:a,formDescriptionId:i,formMessageId:d}=J();return n.jsx(xe.Slot,{ref:r,id:a,"aria-describedby":o?`${i} ${d}`:`${i}`,"aria-invalid":!!o,...t})});Ye.displayName="FormControl";const Ue=p.forwardRef(({className:t,...r},o)=>{const{formDescriptionId:a}=J();return n.jsx("p",{ref:o,id:a,className:u("text-sm text-muted-foreground",t),...r})});Ue.displayName="FormDescription";const Ge=p.forwardRef(({className:t,children:r,...o},a)=>{const{error:i,formMessageId:d}=J(),c=i?String(i==null?void 0:i.message):r;return c?n.jsx("p",{ref:a,id:d,className:u("text-sm font-medium text-destructive",t),...o,children:c}):null});Ge.displayName="FormMessage";const lr=Object.freeze(Object.defineProperty({__proto__:null,Form:sr,FormControl:Ye,FormDescription:Ue,FormField:ir,FormItem:We,FormLabel:qe,FormMessage:Ge,useFormField:J},Symbol.toStringTag,{value:"Module"})),Je=p.forwardRef(({className:t,type:r,...o},a)=>n.jsx("input",{type:r,className:u("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),ref:a,...o}));Je.displayName="Input";const dr=Object.freeze(Object.defineProperty({__proto__:null,Input:Je},Symbol.toStringTag,{value:"Module"})),cr=Q.Root,ur=Q.Trigger,Ke=p.forwardRef(({className:t,align:r="center",sideOffset:o=4,...a},i)=>n.jsx(Q.Content,{ref:i,align:r,sideOffset:o,className:u("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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",t),...a}));Ke.displayName=Q.Content.displayName;const fr=Object.freeze(Object.defineProperty({__proto__:null,Popover:cr,PopoverContent:Ke,PopoverTrigger:ur},Symbol.toStringTag,{value:"Module"})),pr=T.Root,mr=T.Group,gr=T.Value,He=p.forwardRef(({className:t,children:r,...o},a)=>n.jsxs(T.Trigger,{ref:a,className:u("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...o,children:[r,n.jsx(T.Icon,{asChild:!0,children:n.jsx(L.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));He.displayName=T.Trigger.displayName;const ie=p.forwardRef(({className:t,...r},o)=>n.jsx(T.ScrollUpButton,{ref:o,className:u("flex cursor-default items-center justify-center py-1",t),...r,children:n.jsx(L.ChevronUp,{className:"h-4 w-4"})}));ie.displayName=T.ScrollUpButton.displayName;const le=p.forwardRef(({className:t,...r},o)=>n.jsx(T.ScrollDownButton,{ref:o,className:u("flex cursor-default items-center justify-center py-1",t),...r,children:n.jsx(L.ChevronDown,{className:"h-4 w-4"})}));le.displayName=T.ScrollDownButton.displayName;const Xe=p.forwardRef(({className:t,children:r,position:o="popper",...a},i)=>n.jsxs(T.Content,{ref:i,className:u("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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",o==="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",t),position:o,...a,children:[n.jsx(ie,{}),n.jsx(T.Viewport,{className:u("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r}),n.jsx(le,{})]}));Xe.displayName=T.Content.displayName;const Ze=p.forwardRef(({className:t,...r},o)=>n.jsx(T.Label,{ref:o,className:u("py-1.5 pl-8 pr-2 text-sm font-semibold",t),...r}));Ze.displayName=T.Label.displayName;const Qe=p.forwardRef(({className:t,children:r,...o},a)=>n.jsxs(T.Item,{ref:a,className:u("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...o,children:[n.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n.jsx(T.ItemIndicator,{children:n.jsx(L.Check,{className:"h-4 w-4"})})}),n.jsx(T.ItemText,{children:r})]}));Qe.displayName=T.Item.displayName;const et=p.forwardRef(({className:t,...r},o)=>n.jsx(T.Separator,{ref:o,className:u("-mx-1 my-1 h-px bg-muted",t),...r}));et.displayName=T.Separator.displayName;const vr=Object.freeze(Object.defineProperty({__proto__:null,Select:pr,SelectContent:Xe,SelectGroup:mr,SelectItem:Qe,SelectLabel:Ze,SelectScrollDownButton:le,SelectScrollUpButton:ie,SelectSeparator:et,SelectTrigger:He,SelectValue:gr},Symbol.toStringTag,{value:"Module"})),br=z.Root,tt=p.forwardRef(({className:t,...r},o)=>n.jsx(z.List,{ref:o,className:u("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",t),...r}));tt.displayName=z.List.displayName;const rt=p.forwardRef(({className:t,...r},o)=>n.jsx(z.Trigger,{ref:o,className:u("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",t),...r}));rt.displayName=z.Trigger.displayName;const ot=p.forwardRef(({className:t,...r},o)=>n.jsx(z.Content,{ref:o,className:u("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t),...r}));ot.displayName=z.Content.displayName;const xr=Object.freeze(Object.defineProperty({__proto__:null,Tabs:br,TabsContent:ot,TabsList:tt,TabsTrigger:rt},Symbol.toStringTag,{value:"Module"})),nt=X.cva("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-3",sm:"h-9 px-2.5",lg:"h-11 px-5"}},defaultVariants:{variant:"default",size:"default"}}),at=p.forwardRef(({className:t,variant:r,size:o,...a},i)=>n.jsx(ye.Root,{ref:i,className:u(nt({variant:r,size:o,className:t})),...a}));at.displayName=ye.Root.displayName;const hr=Object.freeze(Object.defineProperty({__proto__:null,Toggle:at,toggleVariants:nt},Symbol.toStringTag,{value:"Module"})),yr=Y.Provider,wr=Y.Root,Cr=Y.Trigger,st=p.forwardRef(({className:t,sideOffset:r=4,...o},a)=>n.jsx(Y.Content,{ref:a,sideOffset:r,className:u("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md 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",t),...o}));st.displayName=Y.Content.displayName;const jr={Badge:Jt,Button:Kt,Card:Ht,DropdownMenu:or,Form:lr,Input:dr,Label:ar,Popover:fr,Select:vr,Tabs:xr,Toggle:hr,Tooltip:Object.freeze(Object.defineProperty({__proto__:null,Tooltip:wr,TooltipContent:st,TooltipProvider:yr,TooltipTrigger:Cr},Symbol.toStringTag,{value:"Module"}))},it=y.createContext(void 0);function _(){return y.useContext(it)}const Nr=t=>{const{children:r,...o}=t;C.assertEmpty(o);const a=_(),i=Z.useForm();return n.jsx(a.Form.Form,{...i,children:r})},Sr=t=>y.forwardRef((r,o)=>n.jsx(t,{onPointerDown:a=>{a.nativeEvent.fakeEvent||(a.ctrlKey=!0)},onPointerUp:a=>{const i=new PointerEvent("pointerdown",a.nativeEvent);i.fakeEvent=!0,a.target.dispatchEvent(i)},...r,ref:o})),Tr=t=>{const{children:r,onOpenChange:o,position:a,sub:i,...d}=t;C.assertEmpty(d);const c=_();return i?n.jsx(c.DropdownMenu.DropdownMenuSub,{onOpenChange:o,children:r}):n.jsx(c.DropdownMenu.DropdownMenu,{onOpenChange:o,children:r})},_r=t=>{const{children:r,sub:o,...a}=t;C.assertEmpty(a);const i=_(),d=y.useMemo(()=>Sr(i.DropdownMenu.DropdownMenuTrigger),[i.DropdownMenu.DropdownMenuTrigger]);return o?n.jsx(i.DropdownMenu.DropdownMenuSubTrigger,{children:r}):n.jsx(d,{asChild:!0,...a,children:r})},Rr=y.forwardRef((t,r)=>{const{className:o,children:a,sub:i,...d}=t;C.assertEmpty(d);const c=_();return i?n.jsx(c.DropdownMenu.DropdownMenuSubContent,{className:o,ref:r,children:a}):n.jsx(c.DropdownMenu.DropdownMenuContent,{className:o,ref:r,children:a})}),Er=y.forwardRef((t,r)=>{const{className:o,children:a,icon:i,checked:d,subTrigger:c,onClick:x,...m}=t;C.assertEmpty(m);const g=_();return c?n.jsxs(n.Fragment,{children:[i,a]}):d!==void 0?n.jsxs(g.DropdownMenu.DropdownMenuCheckboxItem,{className:u(o,"gap-1"),ref:r,checked:d,onClick:x,...m,children:[i,a]}):n.jsxs(g.DropdownMenu.DropdownMenuItem,{className:o,ref:r,onClick:x,...m,children:[i,a,c&&n.jsx(L.ChevronRight,{className:"ml-auto h-4 w-4"})]})}),Pr=y.forwardRef((t,r)=>{const{className:o,...a}=t;C.assertEmpty(a);const i=_();return n.jsx(i.DropdownMenu.DropdownMenuSeparator,{className:o,ref:r})}),Dr=y.forwardRef((t,r)=>{const{className:o,children:a,...i}=t;C.assertEmpty(i);const d=_();return n.jsx(d.DropdownMenu.DropdownMenuLabel,{className:o,ref:r,children:a})}),Mr=y.forwardRef((t,r)=>{const{className:o,tabs:a,defaultOpenTab:i,openTab:d,setOpenTab:c,loading:x,...m}=t;C.assertEmpty(m);const g=_();return n.jsxs(g.Tabs.Tabs,{className:u(o,"bg-popover p-2 rounded-lg"),ref:r,value:d,defaultValue:i,onValueChange:c,children:[n.jsx(g.Tabs.TabsList,{children:a.map(b=>n.jsx(g.Tabs.TabsTrigger,{value:b.name,children:b.name},b.name))}),a.map(b=>n.jsx(g.Tabs.TabsContent,{value:b.name,children:n.jsx(g.Card.Card,{children:n.jsx(g.Card.CardContent,{className:"p-4",children:b.tabPanel})})},b.name))]})}),Or=y.forwardRef((t,r)=>{const{className:o,children:a,onClick:i,label:d,...c}=t;C.assertEmpty(c);const x=_();return n.jsx(x.Button.Button,{type:"submit",className:o,"aria-label":d,ref:r,onClick:i,children:a})}),Ir=y.forwardRef((t,r)=>{const{className:o,accept:a,value:i,placeholder:d,onChange:c,...x}=t;C.assertEmpty(x);const m=_();return n.jsx(m.Input.Input,{type:"file",className:o,ref:r,accept:a,value:i?i.name:void 0,onChange:async g=>c==null?void 0:c(g.target.files[0]),placeholder:d})}),kr=y.forwardRef((t,r)=>{const{className:o,children:a,...i}=t;return C.assertEmpty(i),n.jsx("div",{className:u(o,"flex flex-col gap-2 items-start justify-center"),ref:r,children:a})}),Fr=y.forwardRef((t,r)=>{const{className:o,value:a,placeholder:i,onKeyDown:d,onChange:c,...x}=t;C.assertEmpty(x);const m=_();return n.jsx(m.Input.Input,{"data-test":"embed-input",className:u(o,"w-80"),ref:r,value:a,placeholder:i,onKeyDown:d,onChange:c})}),Lr=t=>{const{children:r,opened:o,position:a,...i}=t;C.assertEmpty(i);const d=_();return n.jsx(d.Popover.Popover,{open:o,children:r})},Br=y.forwardRef((t,r)=>{const{children:o,...a}=t;C.assertEmpty(a);const i=_();return n.jsx(i.Popover.PopoverTrigger,{ref:r,asChild:!0,children:o})}),zr=y.forwardRef((t,r)=>{const{className:o,variant:a,children:i,...d}=t;C.assertEmpty(d);const c=_();return n.jsx(c.Popover.PopoverContent,{sideOffset:8,className:u(o,"flex flex-col gap-2",a==="panel-popover"?"p-0 border-none shadow-none max-w-none w-fit":""),ref:r,children:i})}),Vr=y.forwardRef((t,r)=>{const{className:o,children:a,...i}=t;return C.assertEmpty(i),n.jsx("div",{className:o,ref:r,children:a})}),$r=y.forwardRef((t,r)=>{const{className:o,children:a,icon:i,onClick:d,onDragEnd:c,onDragStart:x,draggable:m,label:g,...b}=t;C.assertEmpty(b,!1);const E=_();return n.jsxs(E.Button.Button,{variant:"ghost",className:u(o,"text-gray-400"),ref:r,"aria-label":g,onClick:d,onDragStart:x,onDragEnd:c,draggable:m,...b,children:[i,a]})}),Ar=y.forwardRef((t,r)=>{const{className:o,children:a,id:i,...d}=t;return C.assertEmpty(d),n.jsx("div",{id:i,role:"listbox",className:u("z-50 min-w-[8rem] overflow-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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",o),ref:r,children:a})}),Wr=y.forwardRef((t,r)=>{const{className:o,children:a,...i}=t;return C.assertEmpty(i),n.jsx("div",{className:u("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",o),ref:r,children:n.jsx("div",{children:a})})}),qr=y.forwardRef((t,r)=>{const o=_(),{className:a,item:i,isSelected:d,onClick:c,id:x,...m}=t;return C.assertEmpty(m),n.jsxs("div",{className:u("relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),ref:r,id:x,onClick:c,role:"option","aria-selected":d||void 0,children:[i.icon&&n.jsx("div",{className:"p-3","data-position":"left",children:i.icon}),n.jsxs("div",{className:"flex-1",children:[n.jsx("div",{className:"text-base",children:i.title}),n.jsx("div",{className:"text-xs",children:i.subtext})]}),i.badge&&n.jsx("div",{"data-position":"right",className:"text-xs",children:n.jsx(o.Badge.Badge,{variant:"secondary",children:i.badge})})]})}),Yr=y.forwardRef((t,r)=>{const{className:o,children:a,...i}=t;return C.assertEmpty(i),n.jsx("div",{className:u("px-2 py-1.5 text-sm font-semibold",o),ref:r,children:a})}),Ur=y.forwardRef((t,r)=>{const{className:o,children:a,...i}=t;return C.assertEmpty(i),n.jsx("div",{className:o,ref:r,children:a})}),Gr=y.forwardRef((t,r)=>{const{className:o,children:a,draggable:i,onDragStart:d,onDragEnd:c,style:x,label:m,...g}=t;C.assertEmpty(g,!1);const b=_();return n.jsx(b.Button.Button,{variant:"ghost",className:u(o,"p-0 h-fit w-fit text-gray-400"),ref:r,"aria-label":m,draggable:i,onDragStart:d,onDragEnd:c,style:x,...g,children:a})}),Jr=y.forwardRef(t=>{const{className:r,name:o,label:a,icon:i,value:d,autoFocus:c,placeholder:x,onKeyDown:m,onChange:g,onSubmit:b,...E}=t;C.assertEmpty(E);const D=_();return a?n.jsxs("div",{children:[n.jsx(D.Label.Label,{htmlFor:a,children:a}),n.jsx(D.Input.Input,{className:r,id:a,name:o,autoFocus:c,placeholder:x,value:d,onKeyDown:m,onChange:g,onSubmit:b})]}):n.jsx(D.Input.Input,{"aria-label":o,name:o,autoFocus:c,placeholder:x,value:d,onKeyDown:m,onChange:g,onSubmit:b})}),lt=y.forwardRef((t,r)=>{const{className:o,children:a,onMouseEnter:i,onMouseLeave:d,...c}=t;C.assertEmpty(c);const x=_();return n.jsx(x.Tooltip.TooltipProvider,{delayDuration:0,children:n.jsx("div",{className:u(o,"flex gap-1 p-1 bg-popover text-popover-foreground border rounded-lg shadow-md"),ref:r,onMouseEnter:i,onMouseLeave:d,children:a})})}),dt=y.forwardRef((t,r)=>{const{className:o,children:a,mainTooltip:i,secondaryTooltip:d,icon:c,isSelected:x,isDisabled:m,onClick:g,label:b,...E}=t;C.assertEmpty(E,!1);const D=_(),$=x===void 0?n.jsxs(D.Button.Button,{className:o,variant:"ghost",disabled:m,onClick:g,ref:r,"aria-label":b,...E,children:[c,a]}):n.jsxs(D.Toggle.Toggle,{className:u(o,"data-[state=open]:bg-accent data-[state=closed]:text-accent-foreground"),"aria-label":b,onClick:g,pressed:x,disabled:m,"data-state":x?"on":"off","data-disabled":m,ref:r,...E,children:[c,a]});return n.jsxs(D.Tooltip.Tooltip,{children:[n.jsx(D.Tooltip.TooltipTrigger,{asChild:!0,children:$}),n.jsxs(D.Tooltip.TooltipContent,{className:"flex flex-col items-center",children:[n.jsx("span",{children:i}),d&&n.jsx("span",{children:d})]})]})}),Kr=y.forwardRef((t,r)=>{const{className:o,items:a,isDisabled:i,...d}=t;C.assertEmpty(d);const c=_(),x=g=>n.jsxs("div",{className:"flex gap-1 items-center",children:[g.icon,g.text]}),m=a.filter(g=>g.isSelected)[0];return m?n.jsxs(c.Select.Select,{value:m.text,onValueChange:g=>{var b,E;return(E=(b=a.find(D=>D.text===g)).onClick)==null?void 0:E.call(b)},disabled:i,children:[n.jsx(c.Select.SelectTrigger,{className:"border-none",children:n.jsx(c.Select.SelectValue,{})}),n.jsx(c.Select.SelectContent,{className:o,ref:r,children:a.map(g=>n.jsx(c.Select.SelectItem,{disabled:g.isDisabled,value:g.text,children:n.jsx(x,{...g})},g.text))})]}):null}),Io="",ct={FormattingToolbar:{Root:lt,Button:dt,Select:Kr},FilePanel:{Root:Mr,Button:Or,FileInput:Ir,TabPanel:kr,TextInput:Fr},LinkToolbar:{Root:lt,Button:dt},SideMenu:{Root:Vr,Button:$r},SuggestionMenu:{Root:Ar,Item:qr,EmptyItem:Wr,Label:Yr,Loader:Ur},TableHandle:{Root:Gr},Generic:{Form:{Root:Nr,TextInput:Jr},Menu:{Root:Tr,Trigger:_r,Dropdown:Rr,Divider:Pr,Label:Dr,Item:Er},Popover:{Root:Lr,Trigger:Br,Content:zr}}},Hr=t=>{const{shadCNComponents:r,...o}=t,a=y.useMemo(()=>({...r,...jr}),[r]);return n.jsx(it.Provider,{value:a,children:n.jsx(be.ComponentsContext.Provider,{value:ct,children:n.jsx(be.BlockNoteViewRaw,{...o})})})};S.BlockNoteView=Hr,S.components=ct,Object.defineProperty(S,Symbol.toStringTag,{value:"Module"})});
|
|
28
28
|
//# sourceMappingURL=blocknote-shadcn.umd.cjs.map
|