@chaibuilder/sdk 1.2.89 → 1.2.91
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/README.md +4 -2
- package/dist/CodeEditor-Imjgt7mh.cjs +1 -0
- package/dist/{CodeEditor-tlLB_emd.js → CodeEditor-_Pim7pDO.js} +5 -4
- package/dist/Topbar-4ejjKoRn.js +124 -0
- package/dist/Topbar-irIirqy7.cjs +1 -0
- package/dist/UnsplashImages-NfwOtGHo.cjs +1 -0
- package/dist/{UnsplashImages-7f-L_-9x.js → UnsplashImages-fpbR9Jbs.js} +5 -4
- package/dist/{UploadImages-hXRywPyk.js → UploadImages-9hzL5Hu1.js} +11 -10
- package/dist/UploadImages-OVHnYeiL.cjs +1 -0
- package/dist/{context-menu-DeUUflYX.js → context-menu-9cWJcKdh.js} +442 -373
- package/dist/context-menu-sQn7ryJ6.cjs +1 -0
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +11 -28
- package/dist/core.js +66 -70
- package/dist/{index-dsyGOJ1S.cjs → index-VBJLJ6fO.cjs} +27 -27
- package/dist/{index-dee0FZm6.js → index-ry3B_D93.js} +237 -105
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +50 -51
- package/package.json +3 -2
- package/dist/CodeEditor-nUyO-Y3p.cjs +0 -1
- package/dist/Topbar-4sclJZrd.js +0 -144
- package/dist/Topbar-z2HUDRQZ.cjs +0 -1
- package/dist/UnsplashImages-y5dtRWZL.cjs +0 -1
- package/dist/UploadImages--AV-U7uF.cjs +0 -1
- package/dist/context-menu--DZnHfxj.cjs +0 -1
- package/dist/select-Siy0CQZ0.cjs +0 -1
- package/dist/select-nNzJ_AuC.js +0 -75
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const a=require("./jsx-runtime-JYMCiFoE.cjs"),dt=require("@radix-ui/react-switch"),lt=require("react"),mt=require("@radix-ui/react-accordion"),g=require("@radix-ui/react-icons"),C=require("class-variance-authority"),ct=require("@radix-ui/react-alert-dialog"),pt=require("@radix-ui/react-slot"),ut=require("@radix-ui/react-label"),xt=require("@radix-ui/react-scroll-area"),ft=require("@radix-ui/react-tabs"),gt=require("@radix-ui/react-tooltip"),bt=require("@radix-ui/react-popover"),jt=require("@radix-ui/react-hover-card"),yt=require("@radix-ui/react-select"),ht=require("@radix-ui/react-dropdown-menu"),Nt=require("@radix-ui/react-separator"),Rt=require("@radix-ui/react-toast"),u=require("cmdk"),vt=require("@radix-ui/react-dialog"),wt=require("@radix-ui/react-context-menu"),Ct=require("clsx"),Et=require("tailwind-merge");function c(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const I=c(dt),r=c(lt),j=c(mt),p=c(ct),z=c(ut),b=c(xt),y=c(ft),h=c(gt),R=c(bt),E=c(jt),m=c(yt),i=c(ht),L=c(Nt),f=c(Rt),x=c(vt),d=c(wt),s=(...e)=>Et.twMerge(Ct.clsx(e)),O=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(I.Root,{className:s("peer inline-flex h-[24px] w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-slate-900 data-[state=unchecked]:bg-slate-200 dark:focus-visible:ring-slate-800 dark:focus-visible:ring-offset-slate-950 dark:data-[state=checked]:bg-slate-50 dark:data-[state=unchecked]:bg-slate-800",e),...t,ref:o,children:a.jsxRuntimeExports.jsx(I.Thumb,{className:s("pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0 dark:bg-slate-950")})}));O.displayName=I.Root.displayName;const T=C.cva("inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),q=r.forwardRef(({className:e,variant:t,size:o,asChild:n=!1,...l},S)=>{const it=n?pt.Slot:"button";return a.jsxRuntimeExports.jsx(it,{className:s(T({variant:t,size:o,className:e})),ref:S,...l})});q.displayName="Button";const Tt=j.Root,V=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(j.Item,{ref:o,className:s("border-b",e),...t}));V.displayName="AccordionItem";const G=r.forwardRef(({className:e,children:t,...o},n)=>a.jsxRuntimeExports.jsx(j.Header,{className:"flex",children:a.jsxRuntimeExports.jsxs(j.Trigger,{ref:n,className:s("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...o,children:[t,o.hideArrow?null:a.jsxRuntimeExports.jsx(g.ChevronDownIcon,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"})]})}));G.displayName=j.Trigger.displayName;const H=r.forwardRef(({className:e,children:t,...o},n)=>a.jsxRuntimeExports.jsx(j.Content,{ref:n,className:s("text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",e),...o,children:a.jsxRuntimeExports.jsx("div",{className:"pb-4 pt-0",children:t})}));H.displayName=j.Content.displayName;const F=C.cva("inline-flex items-center rounded-md 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 shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}}),St=({className:e,variant:t,...o})=>a.jsxRuntimeExports.jsx("div",{className:s(F({variant:t}),e),...o}),Dt=p.Root,Mt=p.Trigger,B=({className:e,...t})=>a.jsxRuntimeExports.jsx(p.Portal,{className:s(e),...t});B.displayName=p.Portal.displayName;const U=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(p.Overlay,{className:s("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:o}));U.displayName=p.Overlay.displayName;const Q=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsxs(B,{children:[a.jsxRuntimeExports.jsx(U,{}),a.jsxRuntimeExports.jsx(p.Content,{ref:o,className:s("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",e),...t})]}));Q.displayName=p.Content.displayName;const X=({className:e,...t})=>a.jsxRuntimeExports.jsx("div",{className:s("flex flex-col space-y-2 text-center sm:text-left",e),...t});X.displayName="AlertDialogHeader";const Y=({className:e,...t})=>a.jsxRuntimeExports.jsx("div",{className:s("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Y.displayName="AlertDialogFooter";const J=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(p.Title,{ref:o,className:s("text-lg font-semibold",e),...t}));J.displayName=p.Title.displayName;const K=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(p.Description,{ref:o,className:s("text-sm text-muted-foreground",e),...t}));K.displayName=p.Description.displayName;const W=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(p.Action,{ref:o,className:s(T(),e),...t}));W.displayName=p.Action.displayName;const Z=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(p.Cancel,{ref:o,className:s(T({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Z.displayName=p.Cancel.displayName;const $=x.Root,It=x.Trigger,ee=({className:e,...t})=>a.jsxRuntimeExports.jsx(x.Portal,{className:s(e),...t});ee.displayName=x.Portal.displayName;const te=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(x.Overlay,{ref:o,className:s("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));te.displayName=x.Overlay.displayName;const k=r.forwardRef(({className:e,children:t,...o},n)=>a.jsxRuntimeExports.jsxs(ee,{children:[a.jsxRuntimeExports.jsx(te,{}),a.jsxRuntimeExports.jsxs(x.Content,{ref:n,className:s("fixed left-[50%] top-[50%] z-[999] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",e),...o,children:[t,a.jsxRuntimeExports.jsxs(x.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[a.jsxRuntimeExports.jsx(g.Cross2Icon,{className:"h-4 w-4"}),a.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));k.displayName=x.Content.displayName;const oe=({className:e,...t})=>a.jsxRuntimeExports.jsx("div",{className:s("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});oe.displayName="DialogHeader";const ae=({className:e,...t})=>a.jsxRuntimeExports.jsx("div",{className:s("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ae.displayName="DialogFooter";const se=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(x.Title,{ref:o,className:s("text-lg font-semibold leading-none tracking-tight",e),...t}));se.displayName=x.Title.displayName;const re=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(x.Description,{ref:o,className:s("text-sm text-muted-foreground",e),...t}));re.displayName=x.Description.displayName;const ne=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx("div",{ref:o,className:s("rounded-xl border bg-card text-card-foreground shadow",e),...t}));ne.displayName="Card";const ie=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx("div",{ref:o,className:s("flex flex-col space-y-1.5 p-6",e),...t}));ie.displayName="CardHeader";const de=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx("h3",{ref:o,className:s("font-semibold leading-none tracking-tight",e),...t}));de.displayName="CardTitle";const le=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx("p",{ref:o,className:s("text-sm text-muted-foreground",e),...t}));le.displayName="CardDescription";const me=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx("div",{ref:o,className:s("p-6 pt-0",e),...t}));me.displayName="CardContent";const ce=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx("div",{ref:o,className:s(" flex items-center p-6 pt-0",e),...t}));ce.displayName="CardFooter";const pe=r.forwardRef(({className:e,type:t,...o},n)=>a.jsxRuntimeExports.jsx("input",{type:t,className:s("flex h-9 w-full rounded-md border border-border bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...o,autoCapitalize:"off",autoCorrect:"off",spellCheck:"false"}));pe.displayName="Input";const kt=C.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),ue=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(z.Root,{ref:o,className:s(kt(),e),...t}));ue.displayName=z.Root.displayName;const xe=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx("textarea",{className:s("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...t,autoCapitalize:"off",autoCorrect:"off",spellCheck:"false"}));xe.displayName="Textarea";const fe=r.forwardRef(({className:e,children:t,...o},n)=>a.jsxRuntimeExports.jsxs(b.Root,{ref:n,className:s("relative overflow-hidden",e),...o,children:[a.jsxRuntimeExports.jsx(b.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),a.jsxRuntimeExports.jsx(A,{}),a.jsxRuntimeExports.jsx(b.Corner,{})]}));fe.displayName=b.Root.displayName;const A=r.forwardRef(({className:e,orientation:t="vertical",...o},n)=>a.jsxRuntimeExports.jsx(b.ScrollAreaScrollbar,{ref:n,orientation:t,className:s("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 border-t border-t-transparent p-[1px]",e),...o,children:a.jsxRuntimeExports.jsx(b.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));A.displayName=b.ScrollAreaScrollbar.displayName;const At=y.Root,ge=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(y.List,{ref:o,className:s("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));ge.displayName=y.List.displayName;const be=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(y.Trigger,{ref:o,className:s("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 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",e),...t}));be.displayName=y.Trigger.displayName;const je=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(y.Content,{ref:o,className:s("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));je.displayName=y.Content.displayName;const _t=h.Portal,Pt=h.Provider,zt=h.Root,Lt=h.Trigger,ye=r.forwardRef(({className:e,sideOffset:t=4,...o},n)=>a.jsxRuntimeExports.jsx(h.Content,{ref:n,sideOffset:t,className:s("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs 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",e),...o}));ye.displayName=h.Content.displayName;const Ot=R.Root,qt=R.Trigger,he=r.forwardRef(({className:e,align:t="center",sideOffset:o=4,...n},l)=>a.jsxRuntimeExports.jsx(R.Portal,{children:a.jsxRuntimeExports.jsx(R.Content,{ref:l,align:t,sideOffset:o,className:s("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",e),...n})}));he.displayName=R.Content.displayName;const Vt=E.Root,Gt=E.Trigger,Ne=r.forwardRef(({className:e,align:t="center",sideOffset:o=4,...n},l)=>a.jsxRuntimeExports.jsx(E.Content,{ref:l,align:t,sideOffset:o,className:s("z-50 w-64 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",e),...n}));Ne.displayName=E.Content.displayName;const Ht=m.Root,Ft=m.Group,Bt=m.Value,Re=r.forwardRef(({className:e,children:t,...o},n)=>a.jsxRuntimeExports.jsxs(m.Trigger,{ref:n,className:s("flex h-9 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),...o,children:[t,a.jsxRuntimeExports.jsx(m.Icon,{asChild:!0,children:a.jsxRuntimeExports.jsx(g.CaretSortIcon,{className:"h-4 w-4 opacity-50"})})]}));Re.displayName=m.Trigger.displayName;const ve=r.forwardRef(({className:e,children:t,position:o="popper",...n},l)=>a.jsxRuntimeExports.jsx(m.Portal,{children:a.jsxRuntimeExports.jsx(m.Content,{ref:l,className:s("relative z-50 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",e),position:o,...n,children:a.jsxRuntimeExports.jsx(m.Viewport,{className:s("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})}));ve.displayName=m.Content.displayName;const we=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(m.Label,{ref:o,className:s("px-2 py-1.5 text-sm font-semibold",e),...t}));we.displayName=m.Label.displayName;const Ce=r.forwardRef(({className:e,children:t,...o},n)=>a.jsxRuntimeExports.jsxs(m.Item,{ref:n,className:s("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[a.jsxRuntimeExports.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsxRuntimeExports.jsx(m.ItemIndicator,{children:a.jsxRuntimeExports.jsx(g.CheckIcon,{className:"h-4 w-4"})})}),a.jsxRuntimeExports.jsx(m.ItemText,{children:t})]}));Ce.displayName=m.Item.displayName;const Ee=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(m.Separator,{ref:o,className:s("-mx-1 my-1 h-px bg-muted",e),...t}));Ee.displayName=m.Separator.displayName;const Ut=i.Root,Qt=i.Trigger,Xt=i.Group,Yt=i.Portal,Jt=i.Sub,Kt=i.RadioGroup,Te=r.forwardRef(({className:e,inset:t,children:o,...n},l)=>a.jsxRuntimeExports.jsxs(i.SubTrigger,{ref:l,className:s("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",t&&"pl-8",e),...n,children:[o,a.jsxRuntimeExports.jsx(g.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]}));Te.displayName=i.SubTrigger.displayName;const Se=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(i.SubContent,{ref:o,className:s("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",e),...t}));Se.displayName=i.SubContent.displayName;const De=r.forwardRef(({className:e,sideOffset:t=4,...o},n)=>a.jsxRuntimeExports.jsx(i.Portal,{children:a.jsxRuntimeExports.jsx(i.Content,{ref:n,sideOffset:t,className:s("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",e),...o})}));De.displayName=i.Content.displayName;const Me=r.forwardRef(({className:e,inset:t,...o},n)=>a.jsxRuntimeExports.jsx(i.Item,{ref:n,className:s("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",t&&"pl-8",e),...o}));Me.displayName=i.Item.displayName;const Ie=r.forwardRef(({className:e,children:t,checked:o,...n},l)=>a.jsxRuntimeExports.jsxs(i.CheckboxItem,{ref:l,className:s("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",e),checked:o,...n,children:[a.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsxRuntimeExports.jsx(i.ItemIndicator,{children:a.jsxRuntimeExports.jsx(g.CheckIcon,{className:"h-4 w-4"})})}),t]}));Ie.displayName=i.CheckboxItem.displayName;const ke=r.forwardRef(({className:e,children:t,...o},n)=>a.jsxRuntimeExports.jsxs(i.RadioItem,{ref:n,className:s("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",e),...o,children:[a.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsxRuntimeExports.jsx(i.ItemIndicator,{children:a.jsxRuntimeExports.jsx(g.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));ke.displayName=i.RadioItem.displayName;const Ae=r.forwardRef(({className:e,inset:t,...o},n)=>a.jsxRuntimeExports.jsx(i.Label,{ref:n,className:s("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));Ae.displayName=i.Label.displayName;const _e=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(i.Separator,{ref:o,className:s("-mx-1 my-1 h-px bg-muted",e),...t}));_e.displayName=i.Separator.displayName;const Pe=({className:e,...t})=>a.jsxRuntimeExports.jsx("span",{className:s("ml-auto text-xs tracking-widest opacity-60",e),...t});Pe.displayName="DropdownMenuShortcut";const ze=r.forwardRef(({className:e,orientation:t="horizontal",decorative:o=!0,...n},l)=>a.jsxRuntimeExports.jsx(L.Root,{ref:l,decorative:o,orientation:t,className:s("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));ze.displayName=L.Root.displayName;const Wt=1,Zt=1e6;let D=0;function $t(){return D=(D+1)%Number.MAX_VALUE,D.toString()}const M=new Map,P=e=>{if(M.has(e))return;const t=setTimeout(()=>{M.delete(e),N({type:"REMOVE_TOAST",toastId:e})},Zt);M.set(e,t)},Le=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Wt)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(o=>o.id===t.toast.id?{...o,...t.toast}:o)};case"DISMISS_TOAST":{const{toastId:o}=t;return o?P(o):e.toasts.forEach(n=>{P(n.id)}),{...e,toasts:e.toasts.map(n=>n.id===o||o===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(o=>o.id!==t.toastId)}}},v=[];let w={toasts:[]};function N(e){w=Le(w,e),v.forEach(t=>{t(w)})}function Oe({...e}){const t=$t(),o=l=>N({type:"UPDATE_TOAST",toast:{...l,id:t}}),n=()=>N({type:"DISMISS_TOAST",toastId:t});return N({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:l=>{l||n()}}}),{id:t,dismiss:n,update:o}}function qe(){const[e,t]=r.useState(w);return r.useEffect(()=>(v.push(t),()=>{const o=v.indexOf(t);o>-1&&v.splice(o,1)}),[e]),{...e,toast:Oe,dismiss:o=>N({type:"DISMISS_TOAST",toastId:o})}}const eo=f.Provider,Ve=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(f.Viewport,{ref:o,className:s("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));Ve.displayName=f.Viewport.displayName;const to=C.cva("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Ge=r.forwardRef(({className:e,variant:t,...o},n)=>a.jsxRuntimeExports.jsx(f.Root,{ref:n,className:s(to({variant:t}),e),...o}));Ge.displayName=f.Root.displayName;const oo=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(f.Action,{ref:o,className:s("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));oo.displayName=f.Action.displayName;const He=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(f.Close,{ref:o,className:s("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:a.jsxRuntimeExports.jsx(g.Cross2Icon,{className:"h-4 w-4"})}));He.displayName=f.Close.displayName;const Fe=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(f.Title,{ref:o,className:s("text-sm font-semibold [&+div]:text-xs",e),...t}));Fe.displayName=f.Title.displayName;const Be=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(f.Description,{ref:o,className:s("text-sm opacity-90",e),...t}));Be.displayName=f.Description.displayName;function ao(){const{toasts:e}=qe();return a.jsxRuntimeExports.jsxs(eo,{children:[e.map(({id:t,title:o,description:n,action:l,...S})=>a.jsxRuntimeExports.jsxs(Ge,{...S,children:[a.jsxRuntimeExports.jsxs("div",{className:"grid gap-1",children:[o&&a.jsxRuntimeExports.jsx(Fe,{children:o}),n&&a.jsxRuntimeExports.jsx(Be,{children:n})]}),l,a.jsxRuntimeExports.jsx(He,{})]},t)),a.jsxRuntimeExports.jsx(Ve,{})]})}const so=({className:e,...t})=>a.jsxRuntimeExports.jsx("div",{className:s("animate-pulse rounded-md bg-primary/10",e),...t}),_=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(u.Command,{ref:o,className:s("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));_.displayName=u.Command.displayName;const ro=({children:e,...t})=>a.jsxRuntimeExports.jsx($,{...t,children:a.jsxRuntimeExports.jsx(k,{className:"overflow-hidden p-0",children:a.jsxRuntimeExports.jsx(_,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),Ue=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[a.jsxRuntimeExports.jsx(g.MagnifyingGlassIcon,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),a.jsxRuntimeExports.jsx(u.Command.Input,{ref:o,className:s("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));Ue.displayName=u.Command.Input.displayName;const Qe=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(u.Command.List,{ref:o,className:s("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));Qe.displayName=u.Command.List.displayName;const Xe=r.forwardRef((e,t)=>a.jsxRuntimeExports.jsx(u.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Xe.displayName=u.Command.Empty.displayName;const Ye=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(u.Command.Group,{ref:o,className:s("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));Ye.displayName=u.Command.Group.displayName;const Je=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(u.Command.Separator,{ref:o,className:s("-mx-1 h-px bg-border",e),...t}));Je.displayName=u.Command.Separator.displayName;const Ke=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(u.Command.Item,{ref:o,className:s("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t}));Ke.displayName=u.Command.Item.displayName;const We=({className:e,...t})=>a.jsxRuntimeExports.jsx("span",{className:s("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});We.displayName="CommandShortcut";const no=d.Root,io=d.Trigger,lo=d.Group,mo=d.Portal,co=d.Sub,po=d.RadioGroup,Ze=r.forwardRef(({className:e,inset:t,children:o,...n},l)=>a.jsxRuntimeExports.jsxs(d.SubTrigger,{ref:l,className:s("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t&&"pl-8",e),...n,children:[o,a.jsxRuntimeExports.jsx(g.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]}));Ze.displayName=d.SubTrigger.displayName;const $e=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(d.SubContent,{ref:o,className:s("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",e),...t}));$e.displayName=d.SubContent.displayName;const et=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(d.Portal,{children:a.jsxRuntimeExports.jsx(d.Content,{ref:o,className:s("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",e),...t})}));et.displayName=d.Content.displayName;const tt=r.forwardRef(({className:e,inset:t,...o},n)=>a.jsxRuntimeExports.jsx(d.Item,{ref:n,className:s("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...o}));tt.displayName=d.Item.displayName;const ot=r.forwardRef(({className:e,children:t,checked:o,...n},l)=>a.jsxRuntimeExports.jsxs(d.CheckboxItem,{ref:l,className:s("relative flex 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",e),checked:o,...n,children:[a.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsxRuntimeExports.jsx(d.ItemIndicator,{children:a.jsxRuntimeExports.jsx(g.CheckIcon,{className:"h-4 w-4"})})}),t]}));ot.displayName=d.CheckboxItem.displayName;const at=r.forwardRef(({className:e,children:t,...o},n)=>a.jsxRuntimeExports.jsxs(d.RadioItem,{ref:n,className:s("relative flex 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",e),...o,children:[a.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsxRuntimeExports.jsx(d.ItemIndicator,{children:a.jsxRuntimeExports.jsx(g.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));at.displayName=d.RadioItem.displayName;const st=r.forwardRef(({className:e,inset:t,...o},n)=>a.jsxRuntimeExports.jsx(d.Label,{ref:n,className:s("px-2 py-1.5 text-sm font-semibold text-foreground",t&&"pl-8",e),...o}));st.displayName=d.Label.displayName;const rt=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(d.Separator,{ref:o,className:s("-mx-1 my-1 h-px bg-border",e),...t}));rt.displayName=d.Separator.displayName;const nt=({className:e,...t})=>a.jsxRuntimeExports.jsx("span",{className:s("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});nt.displayName="ContextMenuShortcut";exports.Accordion=Tt;exports.AccordionContent=H;exports.AccordionItem=V;exports.AccordionTrigger=G;exports.AlertDialog=Dt;exports.AlertDialogAction=W;exports.AlertDialogCancel=Z;exports.AlertDialogContent=Q;exports.AlertDialogDescription=K;exports.AlertDialogFooter=Y;exports.AlertDialogHeader=X;exports.AlertDialogTitle=J;exports.AlertDialogTrigger=Mt;exports.Badge=St;exports.Button=q;exports.Card=ne;exports.CardContent=me;exports.CardDescription=le;exports.CardFooter=ce;exports.CardHeader=ie;exports.CardTitle=de;exports.Command=_;exports.CommandDialog=ro;exports.CommandEmpty=Xe;exports.CommandGroup=Ye;exports.CommandInput=Ue;exports.CommandItem=Ke;exports.CommandList=Qe;exports.CommandSeparator=Je;exports.CommandShortcut=We;exports.ContextMenu=no;exports.ContextMenuCheckboxItem=ot;exports.ContextMenuContent=et;exports.ContextMenuGroup=lo;exports.ContextMenuItem=tt;exports.ContextMenuLabel=st;exports.ContextMenuPortal=mo;exports.ContextMenuRadioGroup=po;exports.ContextMenuRadioItem=at;exports.ContextMenuSeparator=rt;exports.ContextMenuShortcut=nt;exports.ContextMenuSub=co;exports.ContextMenuSubContent=$e;exports.ContextMenuSubTrigger=Ze;exports.ContextMenuTrigger=io;exports.Dialog=$;exports.DialogContent=k;exports.DialogDescription=re;exports.DialogFooter=ae;exports.DialogHeader=oe;exports.DialogTitle=se;exports.DialogTrigger=It;exports.DropdownMenu=Ut;exports.DropdownMenuCheckboxItem=Ie;exports.DropdownMenuContent=De;exports.DropdownMenuGroup=Xt;exports.DropdownMenuItem=Me;exports.DropdownMenuLabel=Ae;exports.DropdownMenuPortal=Yt;exports.DropdownMenuRadioGroup=Kt;exports.DropdownMenuRadioItem=ke;exports.DropdownMenuSeparator=_e;exports.DropdownMenuShortcut=Pe;exports.DropdownMenuSub=Jt;exports.DropdownMenuSubContent=Se;exports.DropdownMenuSubTrigger=Te;exports.DropdownMenuTrigger=Qt;exports.HoverCard=Vt;exports.HoverCardContent=Ne;exports.HoverCardTrigger=Gt;exports.Input=pe;exports.Label=ue;exports.Popover=Ot;exports.PopoverContent=he;exports.PopoverTrigger=qt;exports.ScrollArea=fe;exports.ScrollBar=A;exports.Select=Ht;exports.SelectContent=ve;exports.SelectGroup=Ft;exports.SelectItem=Ce;exports.SelectLabel=we;exports.SelectSeparator=Ee;exports.SelectTrigger=Re;exports.SelectValue=Bt;exports.Separator=ze;exports.Skeleton=so;exports.Switch=O;exports.Tabs=At;exports.TabsContent=je;exports.TabsList=ge;exports.TabsTrigger=be;exports.Textarea=xe;exports.Toaster=ao;exports.Tooltip=zt;exports.TooltipContent=ye;exports.TooltipPortal=_t;exports.TooltipProvider=Pt;exports.TooltipTrigger=Lt;exports.badgeVariants=F;exports.buttonVariants=T;exports.cn=s;exports.reducer=Le;exports.toast=Oe;exports.useToast=qe;
|
package/dist/core.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-VBJLJ6fO.cjs"),r=require("./iconBase-vJD0OXxU.cjs"),s=require("react-i18next"),u=require("i18next");require("./jsx-runtime-JYMCiFoE.cjs");require("react");require("./context-menu-sQn7ryJ6.cjs");require("@radix-ui/react-switch");require("@radix-ui/react-accordion");require("@radix-ui/react-icons");require("class-variance-authority");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-slot");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-dialog");require("@radix-ui/react-context-menu");require("clsx");require("tailwind-merge");require("lodash-es");require("jotai");require("@chaibuilder/runtime");require("./plugin-_F-KZp1i.cjs");require("@react-hookz/web");require("tree-model");require("react-quill");require("./STRINGS-Yl7cSWDc.cjs");require("flagged");require("react-hotkeys-hook");require("@floating-ui/dom");require("@floating-ui/react-dom");require("react-event-hook");require("@tailwindcss/typography");require("@tailwindcss/forms");require("@tailwindcss/aspect-ratio");require("tailwindcss-palette-generator");require("react-wrap-balancer");require("react-dom");require("prop-types");require("react-error-boundary");require("re-resizable");require("lucide-react");require("@rjsf/validator-ajv8");require("@rjsf/core");require("react-arborist");require("himalaya");require("react-icons-picker");require("react-autosuggest");require("fuse.js");require("framer-motion");exports.AISetContext=e.AISetContext;exports.AIUserPrompt=e.AIUserPrompt;exports.AddBlocksDialog=e.AddBlocksDialog;exports.AddBlocksPanel=e.AddBlocksPanel;exports.BlockAttributesEditor=e.BlockAttributesEditor;exports.BlockPropsEditor=e.BlockSettings;exports.BlockStyleEditor=e.BlockStyling;exports.CHAI_BUILDER_EVENTS=e.CHAI_BUILDER_EVENTS;exports.ChaiBuilderCanvas=e.CanvasArea;exports.ChaiBuilderEditor=e.ChaiBuilderEditor;exports.DarkModeSwitcher=e.DarkMode;exports.DefaultChaiBlocks=e.DefaultChaiBlocks;exports.ImportHTML=e.ImportHTML;exports.Outline=e.Outline;exports.ScreenSizes=e.Breakpoints;exports.ThemeOptions=e.ThemeOptions;exports.UILibraries=e.UILibraries;exports.UndoRedo=e.UndoRedo;exports.emitChaiBuilderMsg=e.emitChaiBuilderMsg;exports.getBlocksFromHTML=e.getBlocksFromHTML;exports.getClassValueAndUnit=e.getClassValueAndUnit;exports.useAddBlock=e.useAddBlock;exports.useAddClassesToBlocks=e.useAddClassesToBlocks;exports.useBlocksStore=e.useBlocksStore;exports.useBlocksStoreUndoableActions=e.useBlocksStoreUndoableActions;exports.useBrandingOptions=e.useBrandingOptions;exports.useBuilderProp=e.useBuilderProp;exports.useBuilderReset=e.useBuilderReset;exports.useCanvasWidth=e.useCanvasWidth;exports.useCanvasZoom=e.useCanvasZoom;exports.useChaiBuilderMsgListener=e.useChaiBuilderMsgListener;exports.useCodeEditor=e.useCodeEditor;exports.useCopyBlockIds=e.useCopyBlockIds;exports.useCopyToClipboard=e.useCopyToClipboard;exports.useCurrentPage=e.useCurrentPage;exports.useCutBlockIds=e.useCutBlockIds;exports.useDarkMode=e.useDarkMode;exports.useDuplicateBlocks=e.useDuplicateBlocks;exports.useHiddenBlockIds=e.useHiddenBlockIds;exports.useHighlightBlockId=e.useHighlightBlockId;exports.useLayoutVariant=e.useLayoutVariant;exports.usePasteBlocks=e.usePasteBlocks;exports.usePreviewMode=e.usePreviewMode;exports.useRemoveBlocks=e.useRemoveBlocks;exports.useRemoveClassesFromBlocks=e.useRemoveClassesFromBlocks;exports.useSavePage=e.useSavePage;exports.useSelectedBlock=e.useSelectedBlock;exports.useSelectedBlockAllClasses=e.useSelectedBlockAllClasses;exports.useSelectedBlockCurrentClasses=e.useSelectedBlockCurrentClasses;exports.useSelectedBlockIds=e.useSelectedBlockIds;exports.useSelectedBlocksDisplayChild=e.useSelectedBlocksDisplayChild;exports.useSelectedBreakpoints=e.useSelectedBreakpoints;exports.useSelectedStylingBlocks=e.useSelectedStylingBlocks;exports.useStylingBreakpoint=e.useStylingBreakpoint;exports.useStylingState=e.useStylingState;exports.useUILibraryBlocks=e.useUILibraryBlocks;exports.useUndoManager=e.useUndoManager;exports.useUpdateBlocksProps=e.useUpdateBlocksProps;exports.useUpdateBlocksPropsRealtime=e.useUpdateBlocksPropsRealtime;exports.generateBlockId=r.generateUUID;exports.mergeClasses=r.cn;Object.defineProperty(exports,"useTranslation",{enumerable:!0,get:()=>s.useTranslation});exports.i18n=u;
|
package/dist/core.d.ts
CHANGED
|
@@ -271,15 +271,22 @@ export declare function generateBlockId(length?: number, chars?: string): string
|
|
|
271
271
|
*/
|
|
272
272
|
export declare const getBlocksFromHTML: (html: string) => ChaiBlock[];
|
|
273
273
|
|
|
274
|
+
/**
|
|
275
|
+
* Get the value and unit for a tw class
|
|
276
|
+
* @param className
|
|
277
|
+
*/
|
|
278
|
+
export declare const getClassValueAndUnit: (className: string) => {
|
|
279
|
+
unit: string;
|
|
280
|
+
value: string;
|
|
281
|
+
};
|
|
282
|
+
|
|
274
283
|
export { i18n }
|
|
275
284
|
|
|
276
285
|
export declare const ImportHTML: ({ parentId }: {
|
|
277
286
|
parentId?: string;
|
|
278
287
|
}) => JSX_2.Element;
|
|
279
288
|
|
|
280
|
-
declare
|
|
281
|
-
|
|
282
|
-
declare type LayoutVariant = keyof typeof LAYOUT_MODE;
|
|
289
|
+
declare type LayoutVariant = "SINGLE_SIDE_PANEL" | "DUAL_SIDE_PANEL" | "DUAL_SIDE_PANEL_ADVANCED";
|
|
283
290
|
|
|
284
291
|
export declare const mergeClasses: (...inputs: ClassValue[]) => string;
|
|
285
292
|
|
|
@@ -345,27 +352,10 @@ declare type UiLibraryBlock = {
|
|
|
345
352
|
|
|
346
353
|
export declare const UndoRedo: () => JSX_2.Element;
|
|
347
354
|
|
|
348
|
-
export declare const useActiveModal: () => any;
|
|
349
|
-
|
|
350
|
-
/**
|
|
351
|
-
*
|
|
352
|
-
*/
|
|
353
|
-
export declare const useActivePanel: () => [string, (args_0: string | ((prev: string) => string)) => void];
|
|
354
|
-
|
|
355
355
|
export declare const useAddBlock: () => AddBlocks;
|
|
356
356
|
|
|
357
|
-
/**
|
|
358
|
-
*
|
|
359
|
-
*/
|
|
360
|
-
export declare const useAddBlockParent: () => [string, never];
|
|
361
|
-
|
|
362
357
|
export declare const useAddClassesToBlocks: () => Function;
|
|
363
358
|
|
|
364
|
-
/**
|
|
365
|
-
* useTreeData hook
|
|
366
|
-
*/
|
|
367
|
-
export declare const useAllBlocks: () => ChaiBlock[];
|
|
368
|
-
|
|
369
359
|
export declare const useBlocksStore: () => [ChaiBlock[], Function];
|
|
370
360
|
|
|
371
361
|
export declare const useBlocksStoreUndoableActions: () => {
|
|
@@ -431,11 +421,6 @@ export declare const useDarkMode: () => [boolean, Function];
|
|
|
431
421
|
*/
|
|
432
422
|
export declare const useDuplicateBlocks: () => Function;
|
|
433
423
|
|
|
434
|
-
export declare const useGetPageData: () => () => {
|
|
435
|
-
currentPage: unknown;
|
|
436
|
-
blocks: any;
|
|
437
|
-
};
|
|
438
|
-
|
|
439
424
|
export declare const useHiddenBlockIds: () => readonly [string[], (args_0: string[] | ((prev: string[]) => string[])) => void, (blockId: string) => void];
|
|
440
425
|
|
|
441
426
|
/**
|
|
@@ -443,7 +428,7 @@ export declare const useHiddenBlockIds: () => readonly [string[], (args_0: strin
|
|
|
443
428
|
*/
|
|
444
429
|
export declare const useHighlightBlockId: () => [string, Function];
|
|
445
430
|
|
|
446
|
-
export declare const useLayoutVariant: () => readonly [
|
|
431
|
+
export declare const useLayoutVariant: () => readonly [LayoutVariant, (args_0: LayoutVariant | typeof RESET | ((prev: LayoutVariant) => LayoutVariant | typeof RESET)) => void];
|
|
447
432
|
|
|
448
433
|
export declare const usePasteBlocks: () => {
|
|
449
434
|
canPaste: (newParentId: string) => boolean;
|
|
@@ -455,8 +440,6 @@ export declare const usePasteBlocks: () => {
|
|
|
455
440
|
*/
|
|
456
441
|
export declare const usePreviewMode: () => [boolean, Function];
|
|
457
442
|
|
|
458
|
-
export declare const useReadOnlyMode: () => unknown;
|
|
459
|
-
|
|
460
443
|
export declare const useRemoveBlocks: () => (blockIds: Array<string>) => void;
|
|
461
444
|
|
|
462
445
|
export declare const useRemoveClassesFromBlocks: () => Function;
|
package/dist/core.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { m as
|
|
2
|
-
import { g as
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import { default as
|
|
1
|
+
import { m as as, n as ts, i as rs, A as is, o as ps, B as ms, h as ls, l as us, g as ds, p as cs, q as Bs, D as ks, I as ns, O as Cs, r as Ss, T as gs, U as Is, s as hs, j as As, v as Ps, t as Us, z as ys, E as Es, w as Ms, a6 as vs, V as Ds, e as Ls, y as Ts, G as fs, H as Rs, k as bs, u as xs, J as Hs, K as Os, L as Vs, M as ws, N as _s, P as zs, Q as Fs, R as Ns, a5 as Ws, S as Zs, f as js, W as qs, X as Gs, d as Js, _ as Ks, Z as Qs, Y as Xs, a as Ys, a2 as $s, a3 as se, a4 as ee, $ as oe, a1 as ae, a0 as te, x as re, b as ie, c as pe } from "./index-ry3B_D93.js";
|
|
2
|
+
import { g as le, c as ue } from "./iconBase-zweRWSz0.js";
|
|
3
|
+
import { useTranslation as ce } from "react-i18next";
|
|
4
|
+
import { default as ke } from "i18next";
|
|
5
5
|
import "./jsx-runtime-Sp0orL4X.js";
|
|
6
6
|
import "react";
|
|
7
|
-
import "./context-menu-
|
|
7
|
+
import "./context-menu-9cWJcKdh.js";
|
|
8
8
|
import "@radix-ui/react-switch";
|
|
9
9
|
import "@radix-ui/react-accordion";
|
|
10
10
|
import "@radix-ui/react-icons";
|
|
@@ -17,6 +17,7 @@ import "@radix-ui/react-tabs";
|
|
|
17
17
|
import "@radix-ui/react-tooltip";
|
|
18
18
|
import "@radix-ui/react-popover";
|
|
19
19
|
import "@radix-ui/react-hover-card";
|
|
20
|
+
import "@radix-ui/react-select";
|
|
20
21
|
import "@radix-ui/react-dropdown-menu";
|
|
21
22
|
import "@radix-ui/react-separator";
|
|
22
23
|
import "@radix-ui/react-toast";
|
|
@@ -57,72 +58,67 @@ import "react-autosuggest";
|
|
|
57
58
|
import "fuse.js";
|
|
58
59
|
import "framer-motion";
|
|
59
60
|
export {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
as as AISetContext,
|
|
62
|
+
ts as AIUserPrompt,
|
|
63
|
+
rs as AddBlocksDialog,
|
|
64
|
+
is as AddBlocksPanel,
|
|
65
|
+
ps as BlockAttributesEditor,
|
|
66
|
+
ms as BlockPropsEditor,
|
|
66
67
|
ls as BlockStyleEditor,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
68
|
+
us as CHAI_BUILDER_EVENTS,
|
|
69
|
+
ds as ChaiBuilderCanvas,
|
|
70
|
+
cs as ChaiBuilderEditor,
|
|
71
|
+
Bs as DarkModeSwitcher,
|
|
72
|
+
ks as DefaultChaiBlocks,
|
|
73
|
+
ns as ImportHTML,
|
|
74
|
+
Cs as Outline,
|
|
75
|
+
Ss as ScreenSizes,
|
|
76
|
+
gs as ThemeOptions,
|
|
77
|
+
Is as UILibraries,
|
|
78
|
+
hs as UndoRedo,
|
|
79
|
+
As as emitChaiBuilderMsg,
|
|
80
|
+
le as generateBlockId,
|
|
80
81
|
Ps as getBlocksFromHTML,
|
|
81
|
-
|
|
82
|
-
ke as
|
|
83
|
-
|
|
84
|
-
ys as
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
Ds as
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
Rs as useBrandingOptions,
|
|
92
|
-
Ts as useBuilderProp,
|
|
93
|
-
bs as useBuilderReset,
|
|
82
|
+
Us as getClassValueAndUnit,
|
|
83
|
+
ke as i18n,
|
|
84
|
+
ue as mergeClasses,
|
|
85
|
+
ys as useAddBlock,
|
|
86
|
+
Es as useAddClassesToBlocks,
|
|
87
|
+
Ms as useBlocksStore,
|
|
88
|
+
vs as useBlocksStoreUndoableActions,
|
|
89
|
+
Ds as useBrandingOptions,
|
|
90
|
+
Ls as useBuilderProp,
|
|
91
|
+
Ts as useBuilderReset,
|
|
94
92
|
fs as useCanvasWidth,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
ue as useUpdateBlocksProps,
|
|
127
|
-
de as useUpdateBlocksPropsRealtime
|
|
93
|
+
Rs as useCanvasZoom,
|
|
94
|
+
bs as useChaiBuilderMsgListener,
|
|
95
|
+
xs as useCodeEditor,
|
|
96
|
+
Hs as useCopyBlockIds,
|
|
97
|
+
Os as useCopyToClipboard,
|
|
98
|
+
Vs as useCurrentPage,
|
|
99
|
+
ws as useCutBlockIds,
|
|
100
|
+
_s as useDarkMode,
|
|
101
|
+
zs as useDuplicateBlocks,
|
|
102
|
+
Fs as useHiddenBlockIds,
|
|
103
|
+
Ns as useHighlightBlockId,
|
|
104
|
+
Ws as useLayoutVariant,
|
|
105
|
+
Zs as usePasteBlocks,
|
|
106
|
+
js as usePreviewMode,
|
|
107
|
+
qs as useRemoveBlocks,
|
|
108
|
+
Gs as useRemoveClassesFromBlocks,
|
|
109
|
+
Js as useSavePage,
|
|
110
|
+
Ks as useSelectedBlock,
|
|
111
|
+
Qs as useSelectedBlockAllClasses,
|
|
112
|
+
Xs as useSelectedBlockCurrentClasses,
|
|
113
|
+
Ys as useSelectedBlockIds,
|
|
114
|
+
$s as useSelectedBlocksDisplayChild,
|
|
115
|
+
se as useSelectedBreakpoints,
|
|
116
|
+
ee as useSelectedStylingBlocks,
|
|
117
|
+
oe as useStylingBreakpoint,
|
|
118
|
+
ae as useStylingState,
|
|
119
|
+
ce as useTranslation,
|
|
120
|
+
te as useUILibraryBlocks,
|
|
121
|
+
re as useUndoManager,
|
|
122
|
+
ie as useUpdateBlocksProps,
|
|
123
|
+
pe as useUpdateBlocksPropsRealtime
|
|
128
124
|
};
|