@chaibuilder/sdk 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/README.md +41 -0
  2. package/dist/AddBlocks-04c49399.js +258 -0
  3. package/dist/AddBlocks-c27c81fa.cjs +3 -0
  4. package/dist/BrandingOptions-055cf22a.js +157 -0
  5. package/dist/BrandingOptions-c25f6370.cjs +1 -0
  6. package/dist/CONTROLS-031e1de3.cjs +1 -0
  7. package/dist/CONTROLS-442caee5.js +6 -0
  8. package/dist/CanvasArea-97dfbb52.cjs +60 -0
  9. package/dist/CanvasArea-a7901131.js +1455 -0
  10. package/dist/Class-0801d193.cjs +1 -0
  11. package/dist/Class-e6b07b79.js +1138 -0
  12. package/dist/ImagesPanel-160aa664.cjs +1 -0
  13. package/dist/ImagesPanel-815d5e6f.js +27 -0
  14. package/dist/Layers-3aa6aae7.cjs +1 -0
  15. package/dist/Layers-6f1c162e.js +370 -0
  16. package/dist/MarkAsGlobalBlock-209ddfd5.js +73 -0
  17. package/dist/MarkAsGlobalBlock-536770e7.cjs +1 -0
  18. package/dist/Settings-2b1ff1a3.cjs +1 -0
  19. package/dist/Settings-b1afcefe.js +1845 -0
  20. package/dist/SidePanels-f48777bb.js +144 -0
  21. package/dist/SidePanels-f79dbace.cjs +1 -0
  22. package/dist/Topbar-64729901.js +105 -0
  23. package/dist/Topbar-bff765dc.cjs +1 -0
  24. package/dist/UnsplashImages-04fffeed.cjs +1 -0
  25. package/dist/UnsplashImages-315ce7a8.js +160 -0
  26. package/dist/UploadImages-43c16a2d.cjs +1 -0
  27. package/dist/UploadImages-f317eef0.js +107 -0
  28. package/dist/_commonjsHelpers-5a53b418.cjs +1 -0
  29. package/dist/_commonjsHelpers-d4512b9c.js +6 -0
  30. package/dist/accordion-0afd8143.cjs +1 -0
  31. package/dist/accordion-c0176dc5.js +42 -0
  32. package/dist/context-menu-e1c240ce.js +122 -0
  33. package/dist/context-menu-fec580f2.cjs +1 -0
  34. package/dist/core.cjs +1 -0
  35. package/dist/core.d.ts +353 -0
  36. package/dist/core.js +83 -0
  37. package/dist/dialog-170eaad9.cjs +1 -0
  38. package/dist/dialog-3d4e82ed.js +65 -0
  39. package/dist/dropdown-menu-a9b096f9.cjs +1 -0
  40. package/dist/dropdown-menu-d912a52e.js +223 -0
  41. package/dist/html-to-json-d8ac554d.cjs +1 -0
  42. package/dist/html-to-json-fecbbe16.js +178 -0
  43. package/dist/index-aea5c557.cjs +2 -0
  44. package/dist/index-cdd49c4c.js +2651 -0
  45. package/dist/jsx-runtime-5c3ac4f7.cjs +27 -0
  46. package/dist/jsx-runtime-944c88e2.js +631 -0
  47. package/dist/label-167415e5.cjs +1 -0
  48. package/dist/label-e770a087.js +10 -0
  49. package/dist/lib.cjs +1 -0
  50. package/dist/lib.d.ts +29 -0
  51. package/dist/lib.js +223 -0
  52. package/dist/link-43d13383.cjs +1 -0
  53. package/dist/link-8594fd8f.js +211 -0
  54. package/dist/popover-7cb9079b.cjs +1 -0
  55. package/dist/popover-f7addcf4.js +23 -0
  56. package/dist/render.cjs +2 -0
  57. package/dist/render.d.ts +49 -0
  58. package/dist/render.js +1171 -0
  59. package/dist/scroll-area-088530b9.cjs +1 -0
  60. package/dist/scroll-area-9f64a082.js +30 -0
  61. package/dist/select-0e32300c.cjs +1 -0
  62. package/dist/select-7fddd7c3.js +75 -0
  63. package/dist/separator-a597dba7.cjs +1 -0
  64. package/dist/separator-a80d065b.js +18 -0
  65. package/dist/style.css +6 -0
  66. package/dist/tabs-85caa1e8.js +46 -0
  67. package/dist/tabs-860e37aa.cjs +1 -0
  68. package/dist/textarea-0750bcd2.js +73 -0
  69. package/dist/textarea-a338ede6.cjs +1 -0
  70. package/dist/toggle-00c9d11e.js +30 -0
  71. package/dist/toggle-b90fed97.cjs +1 -0
  72. package/dist/ui.cjs +1 -0
  73. package/dist/ui.d.ts +471 -0
  74. package/dist/ui.js +442 -0
  75. package/dist/useBuilderProp-5e57d0c8.cjs +1 -0
  76. package/dist/useBuilderProp-81a14920.js +238 -0
  77. package/dist/utils-3c452dd0.cjs +1 -0
  78. package/dist/utils-ac68b2c8.js +6 -0
  79. package/dist/vite.svg +1 -0
  80. package/package.json +156 -0
package/dist/ui.js ADDED
@@ -0,0 +1,442 @@
1
+ import { T as Fe, t as He } from "./toggle-00c9d11e.js";
2
+ import { A as Ve, g as Ee, h as Be, b as Oe, f as qe, d as $e, c as Je, e as Ke, a as Qe, D as Ue, n as We, l as Xe, s as Ye, m as Ze, p as et, t as tt, x as at, o as ot, q as st, r as rt, u as nt, v as dt, w as it, k as lt, H as mt, j as ct, i as pt, S as ut } from "./dropdown-menu-d912a52e.js";
3
+ import { B as xt, S as gt, a as bt, d as ht, f as yt, g as Nt, T as wt, e as Ct, b as St, r as vt, t as jt, h as Mt } from "./useBuilderProp-81a14920.js";
4
+ import { A as Dt, c as kt, a as Rt, b as It } from "./accordion-c0176dc5.js";
5
+ import { A as At, b as Pt, a as Lt, C as Gt, g as Ft, f as Ht, d as zt, c as Vt, e as Et, T as Bt } from "./textarea-0750bcd2.js";
6
+ import { j as a } from "./jsx-runtime-944c88e2.js";
7
+ import { cva as c } from "class-variance-authority";
8
+ import { c as r } from "./utils-ac68b2c8.js";
9
+ import { D as g, a as b } from "./dialog-3d4e82ed.js";
10
+ import { f as qt, d as $t, c as Jt, e as Kt, b as Qt } from "./dialog-3d4e82ed.js";
11
+ import { a as Wt, b as Xt, I as Yt, L as Zt, R as ea } from "./link-8594fd8f.js";
12
+ import { L as aa } from "./label-e770a087.js";
13
+ import { S as sa, a as ra } from "./scroll-area-9f64a082.js";
14
+ import { T as da, c as ia, a as la, b as ma } from "./tabs-85caa1e8.js";
15
+ import { P as pa, b as ua, a as fa } from "./popover-f7addcf4.js";
16
+ import * as n from "react";
17
+ import { ChevronRightIcon as h, CheckIcon as y, DotFilledIcon as N, Cross2Icon as w, MagnifyingGlassIcon as C } from "@radix-ui/react-icons";
18
+ import * as s from "@radix-ui/react-menubar";
19
+ import { S as ga, d as ba, a as ha, f as ya, e as Na, g as wa, c as Ca, b as Sa } from "./select-7fddd7c3.js";
20
+ import * as d from "@radix-ui/react-dialog";
21
+ import { S as ja } from "./separator-a80d065b.js";
22
+ import { Command as i } from "cmdk";
23
+ import { C as Ta, d as Da, b as ka, i as Ra, c as Ia, f as _a, j as Aa, n as Pa, e as La, g as Ga, h as Fa, k as Ha, l as za, m as Va, a as Ea } from "./context-menu-e1c240ce.js";
24
+ import "@radix-ui/react-toggle";
25
+ import "@radix-ui/react-switch";
26
+ import "@radix-ui/react-alert-dialog";
27
+ import "@radix-ui/react-hover-card";
28
+ import "@radix-ui/react-dropdown-menu";
29
+ import "@radix-ui/react-slot";
30
+ import "@radix-ui/react-tooltip";
31
+ import "@radix-ui/react-toast";
32
+ import "jotai";
33
+ import "lodash";
34
+ import "@radix-ui/react-accordion";
35
+ import "clsx";
36
+ import "tailwind-merge";
37
+ import "react-icons-picker";
38
+ import "react-dom";
39
+ import "./ImagesPanel-815d5e6f.js";
40
+ import "react-quill";
41
+ import "react-i18next";
42
+ import "@radix-ui/react-label";
43
+ import "@radix-ui/react-scroll-area";
44
+ import "@radix-ui/react-tabs";
45
+ import "@radix-ui/react-popover";
46
+ import "@radix-ui/react-select";
47
+ import "@radix-ui/react-separator";
48
+ import "@radix-ui/react-context-menu";
49
+ const S = c(
50
+ "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",
51
+ {
52
+ variants: {
53
+ variant: {
54
+ default: "border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",
55
+ secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
56
+ destructive: "border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",
57
+ outline: "text-foreground"
58
+ }
59
+ },
60
+ defaultVariants: {
61
+ variant: "default"
62
+ }
63
+ }
64
+ ), je = ({ className: e, variant: t, ...o }) => /* @__PURE__ */ a.jsx("div", { className: r(S({ variant: t }), e), ...o }), Me = s.Menu, Te = s.Group, De = s.Portal, ke = s.Sub, Re = s.RadioGroup, v = n.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a.jsx(
65
+ s.Root,
66
+ {
67
+ ref: o,
68
+ className: r("flex h-9 items-center space-x-1 rounded-md border bg-background p-1 shadow-sm", e),
69
+ ...t
70
+ }
71
+ ));
72
+ v.displayName = s.Root.displayName;
73
+ const j = n.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a.jsx(
74
+ s.Trigger,
75
+ {
76
+ ref: o,
77
+ className: r(
78
+ "flex cursor-default select-none items-center rounded-sm px-3 py-1 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
79
+ e
80
+ ),
81
+ ...t
82
+ }
83
+ ));
84
+ j.displayName = s.Trigger.displayName;
85
+ const M = n.forwardRef(({ className: e, inset: t, children: o, ...l }, m) => /* @__PURE__ */ a.jsxs(
86
+ s.SubTrigger,
87
+ {
88
+ ref: m,
89
+ className: r(
90
+ "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",
91
+ t && "pl-8",
92
+ e
93
+ ),
94
+ ...l,
95
+ children: [
96
+ o,
97
+ /* @__PURE__ */ a.jsx(h, { className: "ml-auto h-4 w-4" })
98
+ ]
99
+ }
100
+ ));
101
+ M.displayName = s.SubTrigger.displayName;
102
+ const T = n.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a.jsx(
103
+ s.SubContent,
104
+ {
105
+ ref: o,
106
+ className: r(
107
+ "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",
108
+ e
109
+ ),
110
+ ...t
111
+ }
112
+ ));
113
+ T.displayName = s.SubContent.displayName;
114
+ const D = n.forwardRef(({ className: e, align: t = "start", alignOffset: o = -4, sideOffset: l = 8, ...m }, x) => /* @__PURE__ */ a.jsx(s.Portal, { children: /* @__PURE__ */ a.jsx(
115
+ s.Content,
116
+ {
117
+ ref: x,
118
+ align: t,
119
+ alignOffset: o,
120
+ sideOffset: l,
121
+ className: r(
122
+ "z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in 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",
123
+ e
124
+ ),
125
+ ...m
126
+ }
127
+ ) }));
128
+ D.displayName = s.Content.displayName;
129
+ const k = n.forwardRef(({ className: e, inset: t, ...o }, l) => /* @__PURE__ */ a.jsx(
130
+ s.Item,
131
+ {
132
+ ref: l,
133
+ className: r(
134
+ "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",
135
+ t && "pl-8",
136
+ e
137
+ ),
138
+ ...o
139
+ }
140
+ ));
141
+ k.displayName = s.Item.displayName;
142
+ const R = n.forwardRef(({ className: e, children: t, checked: o, ...l }, m) => /* @__PURE__ */ a.jsxs(
143
+ s.CheckboxItem,
144
+ {
145
+ ref: m,
146
+ className: r(
147
+ "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",
148
+ e
149
+ ),
150
+ checked: o,
151
+ ...l,
152
+ children: [
153
+ /* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(s.ItemIndicator, { children: /* @__PURE__ */ a.jsx(y, { className: "h-4 w-4" }) }) }),
154
+ t
155
+ ]
156
+ }
157
+ ));
158
+ R.displayName = s.CheckboxItem.displayName;
159
+ const I = n.forwardRef(({ className: e, children: t, ...o }, l) => /* @__PURE__ */ a.jsxs(
160
+ s.RadioItem,
161
+ {
162
+ ref: l,
163
+ className: r(
164
+ "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",
165
+ e
166
+ ),
167
+ ...o,
168
+ children: [
169
+ /* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(s.ItemIndicator, { children: /* @__PURE__ */ a.jsx(N, { className: "h-4 w-4 fill-current" }) }) }),
170
+ t
171
+ ]
172
+ }
173
+ ));
174
+ I.displayName = s.RadioItem.displayName;
175
+ const _ = n.forwardRef(({ className: e, inset: t, ...o }, l) => /* @__PURE__ */ a.jsx(
176
+ s.Label,
177
+ {
178
+ ref: l,
179
+ className: r("px-2 py-1.5 text-sm font-semibold", t && "pl-8", e),
180
+ ...o
181
+ }
182
+ ));
183
+ _.displayName = s.Label.displayName;
184
+ const A = n.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a.jsx(s.Separator, { ref: o, className: r("-mx-1 my-1 h-px bg-muted", e), ...t }));
185
+ A.displayName = s.Separator.displayName;
186
+ const P = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("span", { className: r("ml-auto text-xs tracking-widest text-muted-foreground", e), ...t });
187
+ P.displayname = "MenubarShortcut";
188
+ const Ie = d.Root, _e = d.Trigger, Ae = d.Close, p = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx(d.Portal, { className: r(e), ...t });
189
+ p.displayName = d.Portal.displayName;
190
+ const u = n.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a.jsx(
191
+ d.Overlay,
192
+ {
193
+ className: r(
194
+ "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",
195
+ e
196
+ ),
197
+ ...t,
198
+ ref: o
199
+ }
200
+ ));
201
+ u.displayName = d.Overlay.displayName;
202
+ const L = c(
203
+ "fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
204
+ {
205
+ variants: {
206
+ side: {
207
+ top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
208
+ bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
209
+ left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
210
+ right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"
211
+ }
212
+ },
213
+ defaultVariants: {
214
+ side: "right"
215
+ }
216
+ }
217
+ ), G = n.forwardRef(
218
+ ({ side: e = "right", className: t, children: o, ...l }, m) => /* @__PURE__ */ a.jsxs(p, { children: [
219
+ /* @__PURE__ */ a.jsx(u, {}),
220
+ /* @__PURE__ */ a.jsxs(d.Content, { ref: m, className: r(L({ side: e }), t), ...l, children: [
221
+ o,
222
+ /* @__PURE__ */ a.jsxs(d.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-secondary", children: [
223
+ /* @__PURE__ */ a.jsx(w, { className: "h-4 w-4" }),
224
+ /* @__PURE__ */ a.jsx("span", { className: "sr-only", children: "Close" })
225
+ ] })
226
+ ] })
227
+ ] })
228
+ );
229
+ G.displayName = d.Content.displayName;
230
+ const F = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: r("flex flex-col space-y-2 text-center sm:text-left", e), ...t });
231
+ F.displayName = "SheetHeader";
232
+ const H = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: r("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e), ...t });
233
+ H.displayName = "SheetFooter";
234
+ const z = n.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a.jsx(d.Title, { ref: o, className: r("text-lg font-semibold text-foreground", e), ...t }));
235
+ z.displayName = d.Title.displayName;
236
+ const V = n.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a.jsx(d.Description, { ref: o, className: r("text-sm text-muted-foreground", e), ...t }));
237
+ V.displayName = d.Description.displayName;
238
+ const f = n.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a.jsx(
239
+ i,
240
+ {
241
+ ref: o,
242
+ className: r(
243
+ "flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
244
+ e
245
+ ),
246
+ ...t
247
+ }
248
+ ));
249
+ f.displayName = i.displayName;
250
+ const Pe = ({ children: e, ...t }) => /* @__PURE__ */ a.jsx(g, { ...t, children: /* @__PURE__ */ a.jsx(b, { className: "overflow-hidden p-0", children: /* @__PURE__ */ a.jsx(f, { 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 }) }) }), E = n.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a.jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
251
+ /* @__PURE__ */ a.jsx(C, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
252
+ /* @__PURE__ */ a.jsx(
253
+ i.Input,
254
+ {
255
+ ref: o,
256
+ className: r(
257
+ "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",
258
+ e
259
+ ),
260
+ ...t
261
+ }
262
+ )
263
+ ] }));
264
+ E.displayName = i.Input.displayName;
265
+ const B = n.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a.jsx(
266
+ i.List,
267
+ {
268
+ ref: o,
269
+ className: r("max-h-[300px] overflow-y-auto overflow-x-hidden", e),
270
+ ...t
271
+ }
272
+ ));
273
+ B.displayName = i.List.displayName;
274
+ const O = n.forwardRef((e, t) => /* @__PURE__ */ a.jsx(i.Empty, { ref: t, className: "py-6 text-center text-sm", ...e }));
275
+ O.displayName = i.Empty.displayName;
276
+ const q = n.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a.jsx(
277
+ i.Group,
278
+ {
279
+ ref: o,
280
+ className: r(
281
+ "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",
282
+ e
283
+ ),
284
+ ...t
285
+ }
286
+ ));
287
+ q.displayName = i.Group.displayName;
288
+ const $ = n.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a.jsx(i.Separator, { ref: o, className: r("-mx-1 h-px bg-border", e), ...t }));
289
+ $.displayName = i.Separator.displayName;
290
+ const J = n.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a.jsx(
291
+ i.Item,
292
+ {
293
+ ref: o,
294
+ className: r(
295
+ "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",
296
+ e
297
+ ),
298
+ ...t
299
+ }
300
+ ));
301
+ J.displayName = i.Item.displayName;
302
+ const K = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("span", { className: r("ml-auto text-xs tracking-widest text-muted-foreground", e), ...t });
303
+ K.displayName = "CommandShortcut";
304
+ export {
305
+ Dt as Accordion,
306
+ kt as AccordionContent,
307
+ Rt as AccordionItem,
308
+ It as AccordionTrigger,
309
+ At as Alert,
310
+ Pt as AlertDescription,
311
+ Ve as AlertDialog,
312
+ Ee as AlertDialogAction,
313
+ Be as AlertDialogCancel,
314
+ Oe as AlertDialogContent,
315
+ qe as AlertDialogDescription,
316
+ $e as AlertDialogFooter,
317
+ Je as AlertDialogHeader,
318
+ Ke as AlertDialogTitle,
319
+ Qe as AlertDialogTrigger,
320
+ Lt as AlertTitle,
321
+ je as Badge,
322
+ xt as Button,
323
+ Gt as Card,
324
+ Ft as CardContent,
325
+ Ht as CardDescription,
326
+ zt as CardFooter,
327
+ Vt as CardHeader,
328
+ Et as CardTitle,
329
+ f as Command,
330
+ Pe as CommandDialog,
331
+ O as CommandEmpty,
332
+ q as CommandGroup,
333
+ E as CommandInput,
334
+ J as CommandItem,
335
+ B as CommandList,
336
+ $ as CommandSeparator,
337
+ K as CommandShortcut,
338
+ Ta as ContextMenu,
339
+ Da as ContextMenuCheckboxItem,
340
+ ka as ContextMenuContent,
341
+ Ra as ContextMenuGroup,
342
+ Ia as ContextMenuItem,
343
+ _a as ContextMenuLabel,
344
+ Aa as ContextMenuPortal,
345
+ Pa as ContextMenuRadioGroup,
346
+ La as ContextMenuRadioItem,
347
+ Ga as ContextMenuSeparator,
348
+ Fa as ContextMenuShortcut,
349
+ Ha as ContextMenuSub,
350
+ za as ContextMenuSubContent,
351
+ Va as ContextMenuSubTrigger,
352
+ Ea as ContextMenuTrigger,
353
+ g as Dialog,
354
+ b as DialogContent,
355
+ qt as DialogDescription,
356
+ $t as DialogFooter,
357
+ Jt as DialogHeader,
358
+ Kt as DialogTitle,
359
+ Qt as DialogTrigger,
360
+ Ue as DropdownMenu,
361
+ We as DropdownMenuCheckboxItem,
362
+ Xe as DropdownMenuContent,
363
+ Ye as DropdownMenuGroup,
364
+ Ze as DropdownMenuItem,
365
+ et as DropdownMenuLabel,
366
+ tt as DropdownMenuPortal,
367
+ at as DropdownMenuRadioGroup,
368
+ ot as DropdownMenuRadioItem,
369
+ st as DropdownMenuSeparator,
370
+ rt as DropdownMenuShortcut,
371
+ nt as DropdownMenuSub,
372
+ dt as DropdownMenuSubContent,
373
+ it as DropdownMenuSubTrigger,
374
+ lt as DropdownMenuTrigger,
375
+ mt as HoverCard,
376
+ ct as HoverCardContent,
377
+ pt as HoverCardTrigger,
378
+ Wt as IconPickerField,
379
+ Xt as ImagePickerField,
380
+ Yt as Input,
381
+ aa as Label,
382
+ Zt as LinkField,
383
+ v as Menubar,
384
+ R as MenubarCheckboxItem,
385
+ D as MenubarContent,
386
+ Te as MenubarGroup,
387
+ k as MenubarItem,
388
+ _ as MenubarLabel,
389
+ Me as MenubarMenu,
390
+ De as MenubarPortal,
391
+ Re as MenubarRadioGroup,
392
+ I as MenubarRadioItem,
393
+ A as MenubarSeparator,
394
+ P as MenubarShortcut,
395
+ ke as MenubarSub,
396
+ T as MenubarSubContent,
397
+ M as MenubarSubTrigger,
398
+ j as MenubarTrigger,
399
+ pa as Popover,
400
+ ua as PopoverContent,
401
+ fa as PopoverTrigger,
402
+ ea as RTEField,
403
+ sa as ScrollArea,
404
+ ra as ScrollBar,
405
+ ga as Select,
406
+ ba as SelectContent,
407
+ ha as SelectGroup,
408
+ ya as SelectItem,
409
+ Na as SelectLabel,
410
+ wa as SelectSeparator,
411
+ Ca as SelectTrigger,
412
+ Sa as SelectValue,
413
+ ja as Separator,
414
+ Ie as Sheet,
415
+ Ae as SheetClose,
416
+ G as SheetContent,
417
+ V as SheetDescription,
418
+ H as SheetFooter,
419
+ F as SheetHeader,
420
+ z as SheetTitle,
421
+ _e as SheetTrigger,
422
+ gt as Skeleton,
423
+ ut as Switch,
424
+ da as Tabs,
425
+ ia as TabsContent,
426
+ la as TabsList,
427
+ ma as TabsTrigger,
428
+ Bt as Textarea,
429
+ bt as Toaster,
430
+ Fe as Toggle,
431
+ ht as Tooltip,
432
+ yt as TooltipContent,
433
+ Nt as TooltipPortal,
434
+ wt as TooltipProvider,
435
+ Ct as TooltipTrigger,
436
+ S as badgeVariants,
437
+ St as buttonVariants,
438
+ vt as reducer,
439
+ jt as toast,
440
+ He as toggleVariants,
441
+ Mt as useToast
442
+ };
@@ -0,0 +1 @@
1
+ "use strict";const r=require("./jsx-runtime-5c3ac4f7.cjs"),V=require("@radix-ui/react-slot"),h=require("class-variance-authority"),I=require("react"),n=require("./utils-3c452dd0.cjs"),q=require("@radix-ui/react-tooltip"),C=require("@radix-ui/react-icons"),M=require("@radix-ui/react-toast"),g=require("jotai"),B=require("lodash");function v(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const s=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(e,o,s.get?s:{enumerable:!0,get:()=>t[o]})}}return e.default=t,Object.freeze(e)}const a=v(I),u=v(q),i=v(M),T=g.atom(null);T.debugLabel="chaiBuilderPropsAtom";const k=g.atom(null);k.debugLabel="apiKeyAtom";const y=h.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"}}),j=a.forwardRef(({className:t,variant:e,size:o,asChild:s=!1,...d},m)=>{const D=s?V.Slot:"button";return r.jsxRuntimeExports.jsx(D,{className:n.cn(y({variant:e,size:o,className:t})),ref:m,...d})});j.displayName="Button";const z=u.Portal,L=u.Provider,U=u.Root,K=u.Trigger,R=a.forwardRef(({className:t,sideOffset:e=4,...o},s)=>r.jsxRuntimeExports.jsx(u.Content,{ref:s,sideOffset:e,className:n.cn("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",t),...o}));R.displayName=u.Content.displayName;const Q=1,X=1e6;let f=0;function Y(){return f=(f+1)%Number.MAX_VALUE,f.toString()}const x=new Map,b=t=>{if(x.has(t))return;const e=setTimeout(()=>{x.delete(t),c({type:"REMOVE_TOAST",toastId:t})},X);x.set(t,e)},w=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,Q)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(o=>o.id===e.toast.id?{...o,...e.toast}:o)};case"DISMISS_TOAST":{const{toastId:o}=e;return o?b(o):t.toasts.forEach(s=>{b(s.id)}),{...t,toasts:t.toasts.map(s=>s.id===o||o===void 0?{...s,open:!1}:s)}}case"REMOVE_TOAST":return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(o=>o.id!==e.toastId)}}},l=[];let p={toasts:[]};function c(t){p=w(p,t),l.forEach(e=>{e(p)})}function E({...t}){const e=Y(),o=d=>c({type:"UPDATE_TOAST",toast:{...d,id:e}}),s=()=>c({type:"DISMISS_TOAST",toastId:e});return c({type:"ADD_TOAST",toast:{...t,id:e,open:!0,onOpenChange:d=>{d||s()}}}),{id:e,dismiss:s,update:o}}function S(){const[t,e]=a.useState(p);return a.useEffect(()=>(l.push(e),()=>{const o=l.indexOf(e);o>-1&&l.splice(o,1)}),[t]),{...t,toast:E,dismiss:o=>c({type:"DISMISS_TOAST",toastId:o})}}const F=i.Provider,A=a.forwardRef(({className:t,...e},o)=>r.jsxRuntimeExports.jsx(i.Viewport,{ref:o,className:n.cn("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]",t),...e}));A.displayName=i.Viewport.displayName;const G=h.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"}}),N=a.forwardRef(({className:t,variant:e,...o},s)=>r.jsxRuntimeExports.jsx(i.Root,{ref:s,className:n.cn(G({variant:e}),t),...o}));N.displayName=i.Root.displayName;const H=a.forwardRef(({className:t,...e},o)=>r.jsxRuntimeExports.jsx(i.Action,{ref:o,className:n.cn("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",t),...e}));H.displayName=i.Action.displayName;const P=a.forwardRef(({className:t,...e},o)=>r.jsxRuntimeExports.jsx(i.Close,{ref:o,className:n.cn("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",t),"toast-close":"",...e,children:r.jsxRuntimeExports.jsx(C.Cross2Icon,{className:"h-4 w-4"})}));P.displayName=i.Close.displayName;const O=a.forwardRef(({className:t,...e},o)=>r.jsxRuntimeExports.jsx(i.Title,{ref:o,className:n.cn("text-sm font-semibold [&+div]:text-xs",t),...e}));O.displayName=i.Title.displayName;const _=a.forwardRef(({className:t,...e},o)=>r.jsxRuntimeExports.jsx(i.Description,{ref:o,className:n.cn("text-sm opacity-90",t),...e}));_.displayName=i.Description.displayName;function J(){const{toasts:t}=S();return r.jsxRuntimeExports.jsxs(F,{children:[t.map(({id:e,title:o,description:s,action:d,...m})=>r.jsxRuntimeExports.jsxs(N,{...m,children:[r.jsxRuntimeExports.jsxs("div",{className:"grid gap-1",children:[o&&r.jsxRuntimeExports.jsx(O,{children:o}),s&&r.jsxRuntimeExports.jsx(_,{children:s})]}),d,r.jsxRuntimeExports.jsx(P,{})]},e)),r.jsxRuntimeExports.jsx(A,{})]})}const W=({className:t,...e})=>r.jsxRuntimeExports.jsx("div",{className:n.cn("animate-pulse rounded-md bg-primary/10",t),...e}),Z=(t,e=void 0)=>{const o=g.useAtomValue(T);return B.get(o,t,e)};exports.Button=j;exports.Skeleton=W;exports.Toaster=J;exports.Tooltip=U;exports.TooltipContent=R;exports.TooltipPortal=z;exports.TooltipProvider=L;exports.TooltipTrigger=K;exports.buttonVariants=y;exports.chaiBuilderPropsAtom=T;exports.reducer=w;exports.toast=E;exports.useBuilderProp=Z;exports.useToast=S;