@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/README.md ADDED
@@ -0,0 +1,41 @@
1
+ # Chai Builder - Multipurpose Tailwind CSS Builder
2
+
3
+ Chai Builder is a simple multipurpose Tailwind CSS builder designed to streamline and enhance your web development workflow. This tool simplifies the process of customizing and generating Tailwind CSS styles, providing an intuitive interface for creating, editing, and exporting Tailwind configurations.
4
+
5
+ ## Features
6
+
7
+ - **Visual Editor**: Easily tweak and fine-tune Tailwind CSS settings visually.
8
+ - **Live Preview**: See real-time changes in a live preview, enabling quick design decisions.
9
+ - **Customization**: Modify colors, spacing, typography, and more to match your design requirements.
10
+ - **Responsive Design**: Test and preview designs across various screen sizes to ensure responsiveness.
11
+
12
+
13
+ ## Usage
14
+
15
+ 2. **Install dependencies**:
16
+
17
+ ```bash
18
+ npx create-chai-app
19
+ ```
20
+
21
+ 3. **Start the development server**:
22
+
23
+ ```bash
24
+ npm run start
25
+ ```
26
+
27
+ 4. **Access the application**:
28
+
29
+ Visit `http://localhost:3000` in your browser to start using Chai Builder.
30
+
31
+ ## Fair Usage Policy
32
+ Chai Builder operates under a Fair Usage Policy. While this tool is available for free and open use, we kindly request users to employ it responsibly and ethically. The Fair Usage Policy for Chai Builder encompasses:
33
+
34
+
35
+ ## Acknowledgments
36
+
37
+ Chai Builder stands on the shoulders of many open-source libraries and tools. We extend our gratitude to the developers and maintainers of these projects for their contributions.
38
+
39
+ ---
40
+
41
+ Feel free to adjust this to fit the specifics of your project, and add any additional sections or details as needed.
@@ -0,0 +1,258 @@
1
+ import { j as e } from "./jsx-runtime-944c88e2.js";
2
+ import y, { createElement as z, useState as g, useMemo as D, useCallback as G, useEffect as U, Suspense as K } from "react";
3
+ import { has as H, first as f, filter as j, values as C, groupBy as v, mergeWith as q, isArray as L, get as V, map as B, isEmpty as N, find as W, uniq as $, includes as A, reject as P } from "lodash";
4
+ import { useAtom as x } from "jotai";
5
+ import { A as J, a as Q, b as X, c as Y } from "./accordion-c0176dc5.js";
6
+ import { S as Z } from "./scroll-area-9f64a082.js";
7
+ import { T as ee, a as se, b as T } from "./tabs-85caa1e8.js";
8
+ import { d as re, e as oe, f as te, u as le, B as ae, S as ce } from "./useBuilderProp-81a14920.js";
9
+ import { useDrag as M, DragPreviewImage as E } from "react-dnd";
10
+ import { BoxIcon as ne, ExclamationTriangleIcon as ie, Cross1Icon as de } from "@radix-ui/react-icons";
11
+ import { O as I, h as w, a as S, b as k, R as me, S as ue, T as pe, y as xe } from "./index-cdd49c4c.js";
12
+ import "react-i18next";
13
+ import { syncBlocksWithDefaults as R, useChaiBlocks as O } from "chaibuilder-blocks";
14
+ import { Loader as he } from "lucide-react";
15
+ import { c as fe } from "./utils-ac68b2c8.js";
16
+ import { C as ge, c as be, e as je, f as ye, g as we, T as ke, d as Te, A as Ce, a as ve } from "./textarea-0750bcd2.js";
17
+ import { L as Be } from "./label-e770a087.js";
18
+ import { g as Ne } from "./html-to-json-fecbbe16.js";
19
+ import "@radix-ui/react-accordion";
20
+ import "@radix-ui/react-scroll-area";
21
+ import "@radix-ui/react-tabs";
22
+ import "@radix-ui/react-slot";
23
+ import "class-variance-authority";
24
+ import "@radix-ui/react-tooltip";
25
+ import "@radix-ui/react-toast";
26
+ import "i18next";
27
+ import "flagged";
28
+ import "@minoru/react-dnd-treeview";
29
+ import "react-hotkeys-hook";
30
+ import "flat-to-nested";
31
+ import "./Class-e6b07b79.js";
32
+ import "redux-undo";
33
+ import "@react-hookz/web";
34
+ import "./CONTROLS-442caee5.js";
35
+ import "clsx";
36
+ import "tailwind-merge";
37
+ import "@radix-ui/react-label";
38
+ import "himalaya";
39
+ const Ae = ({ block: s }) => {
40
+ const { type: r, icon: t, label: c } = s, { addCoreBlock: d, addPredefinedBlock: m } = I(), [u] = w(), [, n] = x(S), [, l] = x(k), h = () => {
41
+ H(s, "blocks") ? m(R(s.blocks), f(u)) : d(s, f(u)), l(!1), n("layers");
42
+ }, [, p, a] = M(() => ({
43
+ type: "CHAI_BLOCK",
44
+ item: s
45
+ }));
46
+ return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
47
+ /* @__PURE__ */ e.jsx(
48
+ E,
49
+ {
50
+ connect: a,
51
+ src: "https://placehold.co/100x30/000000/FFF?text=" + (c || r).replace(/ /g, "+")
52
+ }
53
+ ),
54
+ /* @__PURE__ */ e.jsxs(re, { children: [
55
+ /* @__PURE__ */ e.jsx(oe, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
56
+ "button",
57
+ {
58
+ onClick: h,
59
+ type: "button",
60
+ ref: p,
61
+ className: "cursor-grab space-y-2 rounded-lg border border-border p-3 text-center hover:bg-slate-300/50",
62
+ children: [
63
+ z(t || ne, { className: "w-4 h-4 mx-auto" }),
64
+ /* @__PURE__ */ e.jsx("p", { className: "truncate text-xs", children: c || r })
65
+ ]
66
+ }
67
+ ) }),
68
+ /* @__PURE__ */ e.jsx(te, { children: /* @__PURE__ */ e.jsx("p", { children: c || r }) })
69
+ ] })
70
+ ] });
71
+ }, Ie = ({ block: s, closePopover: r }) => {
72
+ var a;
73
+ const [t, c] = g(!1), d = le("getExternalPredefinedBlock"), { addCoreBlock: m, addPredefinedBlock: u } = I(), [n] = w(), [, l, h] = M(
74
+ () => ({
75
+ type: "CHAI_BLOCK",
76
+ item: s
77
+ }),
78
+ [s]
79
+ ), p = G(
80
+ async (b) => {
81
+ if (b.stopPropagation(), H(s, "component")) {
82
+ m(s, f(n)), r();
83
+ return;
84
+ }
85
+ c(!0);
86
+ const o = await d(s);
87
+ N(o) || u(R(o), f(n)), r();
88
+ },
89
+ [s]
90
+ );
91
+ return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
92
+ /* @__PURE__ */ e.jsx(
93
+ E,
94
+ {
95
+ connect: h,
96
+ src: "https://placehold.co/100x30/000000/FFF?text=" + ((a = s.name || s.label) == null ? void 0 : a.replace(" ", "+"))
97
+ }
98
+ ),
99
+ /* @__PURE__ */ e.jsxs(
100
+ "div",
101
+ {
102
+ ref: l,
103
+ onClick: t ? () => {
104
+ } : p,
105
+ className: "relative cursor-grab overflow-hidden rounded-md border border-transparent duration-200 hover:scale-x-105 hover:border-foreground/20 hover:shadow-2xl",
106
+ children: [
107
+ t && /* @__PURE__ */ e.jsxs("div", { className: "absolute flex h-full w-full items-center justify-center bg-black bg-opacity-70", children: [
108
+ /* @__PURE__ */ e.jsx(he, { className: "animate-spin", size: 15, color: "white" }),
109
+ " ",
110
+ /* @__PURE__ */ e.jsx("span", { className: "pl-2 text-sm text-white", children: "Adding..." })
111
+ ] }),
112
+ s.preview ? /* @__PURE__ */ e.jsx("img", { src: s.preview, className: "min-h-[50px] w-full rounded-md border border-gray-300", alt: s.name }) : /* @__PURE__ */ e.jsx("div", { className: "flex h-20 items-center justify-center rounded-md border border-border border-gray-300 bg-gray-200", children: /* @__PURE__ */ e.jsx("p", { className: "max-w-xs text-center text-sm text-gray-700", children: s.name }) })
113
+ ]
114
+ }
115
+ )
116
+ ] });
117
+ }, Le = () => {
118
+ const { data: s, isLoading: r } = me(), t = O(), c = j(C(t), { category: "custom" }), d = v(c, "group"), m = v(s, "group"), [u, n] = g(null), l = D(() => q(d, m, (o, i) => {
119
+ if (L(o) && L(i))
120
+ return [...o, ...i];
121
+ }), [d, m]), [, h] = x(k), [p, a] = g("Navbar"), b = V(l, p, []);
122
+ return /* @__PURE__ */ e.jsxs("div", { className: "relative flex h-full max-h-full overflow-hidden py-2", children: [
123
+ /* @__PURE__ */ e.jsx("ul", { className: "sticky top-0 h-full w-48 space-y-1 overflow-y-auto border-r px-2", children: r ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
124
+ /* @__PURE__ */ e.jsx("li", { className: "h-8 w-full animate-pulse bg-gray-200" }),
125
+ /* @__PURE__ */ e.jsx("li", { className: "mt-2 h-8 w-full animate-pulse bg-gray-200" }),
126
+ /* @__PURE__ */ e.jsx("li", { className: "mt-2 h-8 w-full animate-pulse bg-gray-200" }),
127
+ /* @__PURE__ */ e.jsx("li", { className: "mt-2 h-8 w-full animate-pulse bg-gray-200" }),
128
+ /* @__PURE__ */ e.jsx("li", { className: "mt-2 h-8 w-full animate-pulse bg-gray-200" }),
129
+ /* @__PURE__ */ e.jsx("li", { className: "mt-2 h-8 w-full animate-pulse bg-gray-200" })
130
+ ] }) : y.Children.toArray(
131
+ B(l, (o, i) => /* @__PURE__ */ e.jsx(
132
+ "li",
133
+ {
134
+ onMouseOut: () => {
135
+ clearTimeout(u), n(null);
136
+ },
137
+ onMouseEnter: () => {
138
+ const _ = setTimeout(() => {
139
+ a(i);
140
+ }, 300);
141
+ n(_);
142
+ },
143
+ onClick: () => a(i),
144
+ className: fe(
145
+ "-mx-2 cursor-default rounded-md rounded-r-none px-2 py-1 text-sm font-medium capitalize",
146
+ p === i ? "bg-blue-500 text-white" : " text-gray-700 hover:bg-foreground/10"
147
+ ),
148
+ children: i
149
+ }
150
+ ))
151
+ ) }),
152
+ /* @__PURE__ */ e.jsx("div", { className: "h-full w-full space-y-2 overflow-y-auto px-8", children: y.Children.toArray(
153
+ b.map((o) => /* @__PURE__ */ e.jsx(Ie, { block: o, closePopover: () => h(!1) }))
154
+ ) })
155
+ ] });
156
+ }, Pe = () => {
157
+ const [s, r] = g(""), { addPredefinedBlock: t } = I(), [c] = w(), [, d] = x(ue), [, m] = x(S), [, u] = x(k), n = () => {
158
+ const l = Ne(s);
159
+ t([...l], f(c) || null), r(""), d(!1), m("layers"), u(!1);
160
+ };
161
+ return /* @__PURE__ */ e.jsxs(ge, { className: "border-border/0 p-0 shadow-none", children: [
162
+ /* @__PURE__ */ e.jsxs(be, { className: "p-3", children: [
163
+ /* @__PURE__ */ e.jsx(je, { children: "Import HTML" }),
164
+ /* @__PURE__ */ e.jsx(ye, { children: "Use HTML snippets from component libraries like Tailwind UI, Flowbite, Preline, Kitwind, Tailblocks etc. or just copy paste your own HTML code. Only Tailwind CSS markup is supported." })
165
+ ] }),
166
+ /* @__PURE__ */ e.jsx(we, { className: "space-y-2 px-3 py-0", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-1", children: [
167
+ /* @__PURE__ */ e.jsx(Be, { htmlFor: "current", className: "text-sm", children: "Enter HTML Code:" }),
168
+ /* @__PURE__ */ e.jsx(
169
+ ke,
170
+ {
171
+ autoFocus: !0,
172
+ tabIndex: 1,
173
+ ref: (l) => l && l.focus(),
174
+ defaultValue: s,
175
+ onChange: (l) => r(l.target.value),
176
+ rows: 12,
177
+ placeholder: `<div>
178
+ <h1>Enter code here</h1>
179
+ </div>`,
180
+ className: "resize-none overflow-x-auto whitespace-pre font-mono font-normal"
181
+ }
182
+ )
183
+ ] }) }),
184
+ /* @__PURE__ */ e.jsxs(Te, { className: "flex flex-col justify-end p-3", children: [
185
+ /* @__PURE__ */ e.jsx(ae, { disabled: s.trim() === "", onClick: () => n(), size: "sm", className: "w-full", children: "Import" }),
186
+ /* @__PURE__ */ e.jsxs(Ce, { variant: "default", className: "mt-2 p-1 text-blue-400", children: [
187
+ /* @__PURE__ */ e.jsx(ie, { className: "h-4 w-4" }),
188
+ /* @__PURE__ */ e.jsx(ve, { className: "text-sm leading-4", children: "Imported html will be added to the currently selected block. If no block is selected, the html will be added to the page." })
189
+ ] })
190
+ ] })
191
+ ] });
192
+ }, Fe = Pe, F = ["ListItem", "TableHead", "TableBody", "TableRow", "TableCell", "Column"], He = (s, r) => {
193
+ if (!s)
194
+ return !A(F, r);
195
+ const t = s._type;
196
+ return t === "List" ? r === "ListItem" : t === "Table" ? r === "TableHead" || r === "TableBody" : t === "TableHead" || t === "TableBody" ? r === "TableRow" : t === "TableRow" ? r === "TableCell" : t === "Row" ? r === "Column" : !A(F, r);
197
+ }, bs = () => {
198
+ const [s, r] = g("core"), [t, c] = g("basic"), d = O(), [, m] = x(pe), [, u] = x(k), [n] = w(), l = xe(), h = W(l, { _id: f(n) }), p = v(
199
+ j(d, (o) => He(h, o.type)),
200
+ "category"
201
+ ), a = $(B(p.core, "group"));
202
+ U(() => {
203
+ !A(a, t) && !N(a) && !N(t) && c(f(a));
204
+ }, [a, t]);
205
+ const b = (o) => c((i) => i === o ? "" : o);
206
+ return /* @__PURE__ */ e.jsxs("div", { className: "flex h-full flex-col overflow-hidden", children: [
207
+ /* @__PURE__ */ e.jsxs("div", { className: "mb-2 flex justify-between rounded-md bg-background/30 p-1", children: [
208
+ /* @__PURE__ */ e.jsxs("h1", { className: "flex flex-col items-baseline px-1 text-2xl font-semibold xl:flex-row", children: [
209
+ "Add block",
210
+ /* @__PURE__ */ e.jsx("span", { className: "p-0 text-xs font-light leading-3 opacity-80 xl:pl-1", children: s === "html" ? "(Enter or paste your own HTML code)" : "(Drag & drop into tree view or click to add)" })
211
+ ] }),
212
+ /* @__PURE__ */ e.jsxs(
213
+ "button",
214
+ {
215
+ onClick: () => u(!1),
216
+ className: "flex h-max items-center gap-x-1 rounded-full border p-px text-xs text-gray-800 hover:bg-gray-100 md:p-2",
217
+ children: [
218
+ /* @__PURE__ */ e.jsx(de, { width: 12 }),
219
+ " Close"
220
+ ]
221
+ }
222
+ )
223
+ ] }),
224
+ /* @__PURE__ */ e.jsx(
225
+ ee,
226
+ {
227
+ onValueChange: (o) => {
228
+ m(""), r(o);
229
+ },
230
+ value: s,
231
+ className: "h-max",
232
+ children: /* @__PURE__ */ e.jsxs(se, { className: "grid w-full grid-cols-3", children: [
233
+ /* @__PURE__ */ e.jsx(T, { value: "core", children: "Core" }),
234
+ /* @__PURE__ */ e.jsx(T, { value: "ui-blocks", children: "UI Blocks" }),
235
+ /* @__PURE__ */ e.jsx(T, { value: "html", children: "Import" })
236
+ ] })
237
+ }
238
+ ),
239
+ s === "core" && /* @__PURE__ */ e.jsx(Z, { className: "-mx-1.5 h-full", children: /* @__PURE__ */ e.jsx(J, { type: "single", value: t, className: "w-full px-3", children: y.Children.toArray(
240
+ B(
241
+ a,
242
+ (o) => P(j(C(p.core), { group: o }), {
243
+ hidden: !0
244
+ }).length ? /* @__PURE__ */ e.jsxs(Q, { value: o, className: "border-border", children: [
245
+ /* @__PURE__ */ e.jsx(X, { onClick: () => b(o), className: "py-2 capitalize", children: o }),
246
+ /* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-4 gap-2", children: y.Children.toArray(
247
+ P(j(C(p.core), { group: o }), { hidden: !0 }).map((i) => /* @__PURE__ */ e.jsx(Ae, { block: i }))
248
+ ) }) })
249
+ ] }) : null
250
+ )
251
+ ) }) }),
252
+ s === "ui-blocks" && /* @__PURE__ */ e.jsx(K, { fallback: /* @__PURE__ */ e.jsx(ce, { className: "h-32 w-full" }), children: /* @__PURE__ */ e.jsx(Le, {}) }),
253
+ s === "html" && /* @__PURE__ */ e.jsx(Fe, {})
254
+ ] });
255
+ };
256
+ export {
257
+ bs as default
258
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-5c3ac4f7.cjs"),a=require("react"),s=require("lodash"),g=require("jotai"),k=require("./accordion-0afd8143.cjs"),C=require("./scroll-area-088530b9.cjs"),y=require("./tabs-860e37aa.cjs"),E=require("./useBuilderProp-5e57d0c8.cjs"),B=require("react-dnd"),v=require("@radix-ui/react-icons"),i=require("./index-aea5c557.cjs");require("react-i18next");const w=require("chaibuilder-blocks"),N=require("lucide-react"),q=require("./utils-3c452dd0.cjs"),f=require("./textarea-a338ede6.cjs"),I=require("./label-167415e5.cjs"),P=require("./html-to-json-d8ac554d.cjs");require("@radix-ui/react-accordion");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-slot");require("class-variance-authority");require("@radix-ui/react-tooltip");require("@radix-ui/react-toast");require("i18next");require("flagged");require("@minoru/react-dnd-treeview");require("react-hotkeys-hook");require("flat-to-nested");require("./Class-0801d193.cjs");require("redux-undo");require("@react-hookz/web");require("./CONTROLS-031e1de3.cjs");require("clsx");require("tailwind-merge");require("@radix-ui/react-label");require("himalaya");const L=({block:t})=>{const{type:r,icon:l,label:d}=t,{addCoreBlock:m,addPredefinedBlock:p}=i.useAddBlock(),[j]=i.useSelectedBlockIds(),[,u]=g.useAtom(i.activePanelAtom),[,n]=g.useAtom(i.addBlocksModalAtom),b=()=>{s.has(t,"blocks")?p(w.syncBlocksWithDefaults(t.blocks),s.first(j)):m(t,s.first(j)),n(!1),u("layers")},[,h,c]=B.useDrag(()=>({type:"CHAI_BLOCK",item:t}));return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(B.DragPreviewImage,{connect:c,src:"https://placehold.co/100x30/000000/FFF?text="+(d||r).replace(/ /g,"+")}),e.jsxRuntimeExports.jsxs(E.Tooltip,{children:[e.jsxRuntimeExports.jsx(E.TooltipTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsxs("button",{onClick:b,type:"button",ref:h,className:"cursor-grab space-y-2 rounded-lg border border-border p-3 text-center hover:bg-slate-300/50",children:[a.createElement(l||v.BoxIcon,{className:"w-4 h-4 mx-auto"}),e.jsxRuntimeExports.jsx("p",{className:"truncate text-xs",children:d||r})]})}),e.jsxRuntimeExports.jsx(E.TooltipContent,{children:e.jsxRuntimeExports.jsx("p",{children:d||r})})]})]})},S=({block:t,closePopover:r})=>{var c;const[l,d]=a.useState(!1),m=E.useBuilderProp("getExternalPredefinedBlock"),{addCoreBlock:p,addPredefinedBlock:j}=i.useAddBlock(),[u]=i.useSelectedBlockIds(),[,n,b]=B.useDrag(()=>({type:"CHAI_BLOCK",item:t}),[t]),h=a.useCallback(async R=>{if(R.stopPropagation(),s.has(t,"component")){p(t,s.first(u)),r();return}d(!0);const o=await m(t);s.isEmpty(o)||j(w.syncBlocksWithDefaults(o),s.first(u)),r()},[t]);return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(B.DragPreviewImage,{connect:b,src:"https://placehold.co/100x30/000000/FFF?text="+((c=t.name||t.label)==null?void 0:c.replace(" ","+"))}),e.jsxRuntimeExports.jsxs("div",{ref:n,onClick:l?()=>{}:h,className:"relative cursor-grab overflow-hidden rounded-md border border-transparent duration-200 hover:scale-x-105 hover:border-foreground/20 hover:shadow-2xl",children:[l&&e.jsxRuntimeExports.jsxs("div",{className:"absolute flex h-full w-full items-center justify-center bg-black bg-opacity-70",children:[e.jsxRuntimeExports.jsx(N.Loader,{className:"animate-spin",size:15,color:"white"})," ",e.jsxRuntimeExports.jsx("span",{className:"pl-2 text-sm text-white",children:"Adding..."})]}),t.preview?e.jsxRuntimeExports.jsx("img",{src:t.preview,className:"min-h-[50px] w-full rounded-md border border-gray-300",alt:t.name}):e.jsxRuntimeExports.jsx("div",{className:"flex h-20 items-center justify-center rounded-md border border-border border-gray-300 bg-gray-200",children:e.jsxRuntimeExports.jsx("p",{className:"max-w-xs text-center text-sm text-gray-700",children:t.name})})]})]})},M=()=>{const{data:t,isLoading:r}=i.useUILibraryBlocks(),l=w.useChaiBlocks(),d=s.filter(s.values(l),{category:"custom"}),m=s.groupBy(d,"group"),p=s.groupBy(t,"group"),[j,u]=a.useState(null),n=a.useMemo(()=>s.mergeWith(m,p,(o,x)=>{if(s.isArray(o)&&s.isArray(x))return[...o,...x]}),[m,p]),[,b]=g.useAtom(i.addBlocksModalAtom),[h,c]=a.useState("Navbar"),R=s.get(n,h,[]);return e.jsxRuntimeExports.jsxs("div",{className:"relative flex h-full max-h-full overflow-hidden py-2",children:[e.jsxRuntimeExports.jsx("ul",{className:"sticky top-0 h-full w-48 space-y-1 overflow-y-auto border-r px-2",children:r?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx("li",{className:"h-8 w-full animate-pulse bg-gray-200"}),e.jsxRuntimeExports.jsx("li",{className:"mt-2 h-8 w-full animate-pulse bg-gray-200"}),e.jsxRuntimeExports.jsx("li",{className:"mt-2 h-8 w-full animate-pulse bg-gray-200"}),e.jsxRuntimeExports.jsx("li",{className:"mt-2 h-8 w-full animate-pulse bg-gray-200"}),e.jsxRuntimeExports.jsx("li",{className:"mt-2 h-8 w-full animate-pulse bg-gray-200"}),e.jsxRuntimeExports.jsx("li",{className:"mt-2 h-8 w-full animate-pulse bg-gray-200"})]}):a.Children.toArray(s.map(n,(o,x)=>e.jsxRuntimeExports.jsx("li",{onMouseOut:()=>{clearTimeout(j),u(null)},onMouseEnter:()=>{const A=setTimeout(()=>{c(x)},300);u(A)},onClick:()=>c(x),className:q.cn("-mx-2 cursor-default rounded-md rounded-r-none px-2 py-1 text-sm font-medium capitalize",h===x?"bg-blue-500 text-white":" text-gray-700 hover:bg-foreground/10"),children:x})))}),e.jsxRuntimeExports.jsx("div",{className:"h-full w-full space-y-2 overflow-y-auto px-8",children:a.Children.toArray(R.map(o=>e.jsxRuntimeExports.jsx(S,{block:o,closePopover:()=>b(!1)})))})]})},F=()=>{const[t,r]=a.useState(""),{addPredefinedBlock:l}=i.useAddBlock(),[d]=i.useSelectedBlockIds(),[,m]=g.useAtom(i.addBlockOffCanvasAtom),[,p]=g.useAtom(i.activePanelAtom),[,j]=g.useAtom(i.addBlocksModalAtom),u=()=>{const n=P.getBlocksFromHTML(t);l([...n],s.first(d)||null),r(""),m(!1),p("layers"),j(!1)};return e.jsxRuntimeExports.jsxs(f.Card,{className:"border-border/0 p-0 shadow-none",children:[e.jsxRuntimeExports.jsxs(f.CardHeader,{className:"p-3",children:[e.jsxRuntimeExports.jsx(f.CardTitle,{children:"Import HTML"}),e.jsxRuntimeExports.jsx(f.CardDescription,{children:"Use HTML snippets from component libraries like Tailwind UI, Flowbite, Preline, Kitwind, Tailblocks etc. or just copy paste your own HTML code. Only Tailwind CSS markup is supported."})]}),e.jsxRuntimeExports.jsx(f.CardContent,{className:"space-y-2 px-3 py-0",children:e.jsxRuntimeExports.jsxs("div",{className:"space-y-1",children:[e.jsxRuntimeExports.jsx(I.Label,{htmlFor:"current",className:"text-sm",children:"Enter HTML Code:"}),e.jsxRuntimeExports.jsx(f.Textarea,{autoFocus:!0,tabIndex:1,ref:n=>n&&n.focus(),defaultValue:t,onChange:n=>r(n.target.value),rows:12,placeholder:`<div>
2
+ <h1>Enter code here</h1>
3
+ </div>`,className:"resize-none overflow-x-auto whitespace-pre font-mono font-normal"})]})}),e.jsxRuntimeExports.jsxs(f.CardFooter,{className:"flex flex-col justify-end p-3",children:[e.jsxRuntimeExports.jsx(E.Button,{disabled:t.trim()==="",onClick:()=>u(),size:"sm",className:"w-full",children:"Import"}),e.jsxRuntimeExports.jsxs(f.Alert,{variant:"default",className:"mt-2 p-1 text-blue-400",children:[e.jsxRuntimeExports.jsx(v.ExclamationTriangleIcon,{className:"h-4 w-4"}),e.jsxRuntimeExports.jsx(f.AlertTitle,{className:"text-sm leading-4",children:"Imported html will be added to the currently selected block. If no block is selected, the html will be added to the page."})]})]})]})},H=F,T=["ListItem","TableHead","TableBody","TableRow","TableCell","Column"],D=(t,r)=>{if(!t)return!s.includes(T,r);const l=t._type;return l==="List"?r==="ListItem":l==="Table"?r==="TableHead"||r==="TableBody":l==="TableHead"||l==="TableBody"?r==="TableRow":l==="TableRow"?r==="TableCell":l==="Row"?r==="Column":!s.includes(T,r)},O=()=>{const[t,r]=a.useState("core"),[l,d]=a.useState("basic"),m=w.useChaiBlocks(),[,p]=g.useAtom(i.showPredefinedBlockCategoryAtom),[,j]=g.useAtom(i.addBlocksModalAtom),[u]=i.useSelectedBlockIds(),n=i.useAllBlocks(),b=s.find(n,{_id:s.first(u)}),h=s.groupBy(s.filter(m,o=>D(b,o.type)),"category"),c=s.uniq(s.map(h.core,"group"));a.useEffect(()=>{!s.includes(c,l)&&!s.isEmpty(c)&&!s.isEmpty(l)&&d(s.first(c))},[c,l]);const R=o=>d(x=>x===o?"":o);return e.jsxRuntimeExports.jsxs("div",{className:"flex h-full flex-col overflow-hidden",children:[e.jsxRuntimeExports.jsxs("div",{className:"mb-2 flex justify-between rounded-md bg-background/30 p-1",children:[e.jsxRuntimeExports.jsxs("h1",{className:"flex flex-col items-baseline px-1 text-2xl font-semibold xl:flex-row",children:["Add block",e.jsxRuntimeExports.jsx("span",{className:"p-0 text-xs font-light leading-3 opacity-80 xl:pl-1",children:t==="html"?"(Enter or paste your own HTML code)":"(Drag & drop into tree view or click to add)"})]}),e.jsxRuntimeExports.jsxs("button",{onClick:()=>j(!1),className:"flex h-max items-center gap-x-1 rounded-full border p-px text-xs text-gray-800 hover:bg-gray-100 md:p-2",children:[e.jsxRuntimeExports.jsx(v.Cross1Icon,{width:12})," Close"]})]}),e.jsxRuntimeExports.jsx(y.Tabs,{onValueChange:o=>{p(""),r(o)},value:t,className:"h-max",children:e.jsxRuntimeExports.jsxs(y.TabsList,{className:"grid w-full grid-cols-3",children:[e.jsxRuntimeExports.jsx(y.TabsTrigger,{value:"core",children:"Core"}),e.jsxRuntimeExports.jsx(y.TabsTrigger,{value:"ui-blocks",children:"UI Blocks"}),e.jsxRuntimeExports.jsx(y.TabsTrigger,{value:"html",children:"Import"})]})}),t==="core"&&e.jsxRuntimeExports.jsx(C.ScrollArea,{className:"-mx-1.5 h-full",children:e.jsxRuntimeExports.jsx(k.Accordion,{type:"single",value:l,className:"w-full px-3",children:a.Children.toArray(s.map(c,o=>s.reject(s.filter(s.values(h.core),{group:o}),{hidden:!0}).length?e.jsxRuntimeExports.jsxs(k.AccordionItem,{value:o,className:"border-border",children:[e.jsxRuntimeExports.jsx(k.AccordionTrigger,{onClick:()=>R(o),className:"py-2 capitalize",children:o}),e.jsxRuntimeExports.jsx(k.AccordionContent,{children:e.jsxRuntimeExports.jsx("div",{className:"grid grid-cols-4 gap-2",children:a.Children.toArray(s.reject(s.filter(s.values(h.core),{group:o}),{hidden:!0}).map(x=>e.jsxRuntimeExports.jsx(L,{block:x})))})})]}):null))})}),t==="ui-blocks"&&e.jsxRuntimeExports.jsx(a.Suspense,{fallback:e.jsxRuntimeExports.jsx(E.Skeleton,{className:"h-32 w-full"}),children:e.jsxRuntimeExports.jsx(M,{})}),t==="html"&&e.jsxRuntimeExports.jsx(H,{})]})};exports.default=O;
@@ -0,0 +1,157 @@
1
+ import { j as a } from "./jsx-runtime-944c88e2.js";
2
+ import * as s from "react";
3
+ import B from "@rjsf/validator-ajv8";
4
+ import _ from "@rjsf/core";
5
+ import { w as k } from "./index-cdd49c4c.js";
6
+ import "react-i18next";
7
+ import { u as N } from "./useBuilderProp-81a14920.js";
8
+ import { SelectOption as p, Numeric as D, Color as e } from "chaibuilder-blocks";
9
+ import "i18next";
10
+ import "flagged";
11
+ import "react-dnd";
12
+ import "lodash";
13
+ import "@minoru/react-dnd-treeview";
14
+ import "jotai";
15
+ import "./utils-ac68b2c8.js";
16
+ import "clsx";
17
+ import "tailwind-merge";
18
+ import "react-hotkeys-hook";
19
+ import "flat-to-nested";
20
+ import "./Class-e6b07b79.js";
21
+ import "redux-undo";
22
+ import "@react-hookz/web";
23
+ import "./CONTROLS-442caee5.js";
24
+ import "@radix-ui/react-slot";
25
+ import "class-variance-authority";
26
+ import "@radix-ui/react-tooltip";
27
+ import "@radix-ui/react-icons";
28
+ import "@radix-ui/react-toast";
29
+ const d = [
30
+ { title: "Roboto", value: "Roboto" },
31
+ { title: "Open Sans", value: "Open Sans" },
32
+ { title: "Montserrat", value: "Montserrat" },
33
+ { title: "Lato", value: "Lato" },
34
+ { title: "Poppins", value: "Poppins" },
35
+ { title: "Oswald", value: "Oswald" },
36
+ { title: "Raleway", value: "Raleway" },
37
+ { title: "Ubuntu", value: "Ubuntu" },
38
+ { title: "Nunito", value: "Nunito" },
39
+ { title: "Merriweather", value: "Merriweather" },
40
+ { title: "Nunito Sans", value: "Nunito Sans" },
41
+ { title: "Playfair Display", value: "Playfair Display" },
42
+ { title: "Rubik", value: "Rubik" },
43
+ { title: "Inter", value: "Inter" },
44
+ { title: "Lora", value: "Lora" },
45
+ { title: "Kanit", value: "Kanit" },
46
+ { title: "Fira Sans", value: "Fira Sans" },
47
+ { title: "Hind", value: "Hind" },
48
+ { title: "Quicksand", value: "Quicksand" },
49
+ { title: "Mulish", value: "Mulish" },
50
+ { title: "Barlow", value: "Barlow" },
51
+ { title: "Inconsolata", value: "Inconsolata" },
52
+ { title: "Titillium Web", value: "Titillium Web" },
53
+ { title: "Heebo", value: "Heebo" },
54
+ { title: "IBM Plex Sans", value: "IBM Plex Sans" },
55
+ { title: "DM Sans", value: "DM Sans" },
56
+ { title: "Nanum Gothic", value: "Nanum Gothic" },
57
+ { title: "Karla", value: "Karla" },
58
+ { title: "Arimo", value: "Arimo" },
59
+ { title: "Cabin", value: "Cabin" },
60
+ { title: "Oxygen", value: "Oxygen" },
61
+ { title: "Overpass", value: "Overpass" },
62
+ { title: "Assistant", value: "Assistant" },
63
+ { title: "Tajawal", value: "Tajawal" },
64
+ { title: "Play", value: "Play" },
65
+ { title: "Exo", value: "Exo" },
66
+ { title: "Cinzel", value: "Cinzel" },
67
+ { title: "Faustina", value: "Faustina" },
68
+ { title: "Philosopher", value: "Philosopher" },
69
+ { title: "Gelasio", value: "Gelasio" },
70
+ { title: "Sofia Sans Condensed", value: "Sofia Sans Condensed" },
71
+ { title: "Noto Sans Devanagari", value: "Noto Sans Devanagari" },
72
+ { title: "Actor", value: "Actor" },
73
+ { title: "Epilogue", value: "Epilogue" },
74
+ { title: "Glegoo", value: "Glegoo" },
75
+ { title: "Overlock", value: "Overlock" },
76
+ { title: "Lustria", value: "Lustria" },
77
+ { title: "Ovo", value: "Ovo" },
78
+ { title: "Suranna", value: "Suranna" }
79
+ ], at = () => {
80
+ const v = N("onSaveBrandingOptions", async () => {
81
+ }), [l, m] = k(), r = s.useRef(l);
82
+ s.useEffect(() => () => v(r.current), [r]);
83
+ const c = ({ formData: t }, i) => {
84
+ i && (m(t), r.current = t);
85
+ }, {
86
+ _bodyFont: f,
87
+ _headingFont: g,
88
+ _primaryColor: y,
89
+ _bodyTextDarkColor: h,
90
+ _bodyTextLightColor: b,
91
+ _bodyBgDarkColor: S,
92
+ _secondaryColor: x,
93
+ _bodyBgLightColor: C,
94
+ _roundedCorners: O
95
+ } = l, n = {
96
+ _headingFont: p({
97
+ title: "Heading font",
98
+ default: g,
99
+ options: d
100
+ }),
101
+ _bodyFont: p({
102
+ title: "Body font",
103
+ default: f,
104
+ options: d
105
+ }),
106
+ _roundedCorners: D({
107
+ title: "Rounded Corner",
108
+ default: parseInt(O || 5, 10)
109
+ }),
110
+ _primaryColor: e({ title: "Primary", default: y }),
111
+ _secondaryColor: e({ title: "Secondary", default: x }),
112
+ _bodyBgLightColor: e({
113
+ title: "Body Background (Light)",
114
+ default: C
115
+ }),
116
+ _bodyBgDarkColor: e({
117
+ title: "Body Background (Dark)",
118
+ default: S
119
+ }),
120
+ _bodyTextLightColor: e({
121
+ title: "Body Text (Light)",
122
+ default: h
123
+ }),
124
+ _bodyTextDarkColor: e({
125
+ title: "Body Text (Dark)",
126
+ default: b
127
+ })
128
+ // TODO: exteend more options from user
129
+ }, o = {
130
+ type: "object",
131
+ properties: {}
132
+ }, u = {};
133
+ return Object.keys(n).forEach((t) => {
134
+ const i = n[t];
135
+ return o.properties || (o.properties = {}), o.properties[t] = i.schema, u[t] = i.uiSchema, !0;
136
+ }), /* @__PURE__ */ a.jsxs("div", { className: "flex h-full select-none flex-col", children: [
137
+ /* @__PURE__ */ a.jsx("div", { className: "rounded-md bg-background/30 p-1", children: /* @__PURE__ */ a.jsx("h1", { className: "px-1 font-semibold", children: "Branding Options" }) }),
138
+ /* @__PURE__ */ a.jsx("div", { className: "-mx-2", children: /* @__PURE__ */ a.jsx(
139
+ _,
140
+ {
141
+ idSeparator: ".",
142
+ autoComplete: "off",
143
+ omitExtraData: !0,
144
+ liveOmit: !0,
145
+ liveValidate: !0,
146
+ uiSchema: u,
147
+ schema: o,
148
+ formData: l,
149
+ validator: B,
150
+ onChange: c
151
+ }
152
+ ) })
153
+ ] });
154
+ };
155
+ export {
156
+ at as default
157
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./jsx-runtime-5c3ac4f7.cjs"),C=require("react"),q=require("@rjsf/validator-ajv8"),B=require("@rjsf/core"),_=require("./index-aea5c557.cjs");require("react-i18next");const j=require("./useBuilderProp-5e57d0c8.cjs"),e=require("chaibuilder-blocks");require("i18next");require("flagged");require("react-dnd");require("lodash");require("@minoru/react-dnd-treeview");require("jotai");require("./utils-3c452dd0.cjs");require("clsx");require("tailwind-merge");require("react-hotkeys-hook");require("flat-to-nested");require("./Class-0801d193.cjs");require("redux-undo");require("@react-hookz/web");require("./CONTROLS-031e1de3.cjs");require("@radix-ui/react-slot");require("class-variance-authority");require("@radix-ui/react-tooltip");require("@radix-ui/react-icons");require("@radix-ui/react-toast");function R(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const i in t)if(i!=="default"){const r=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(a,i,r.get?r:{enumerable:!0,get:()=>t[i]})}}return a.default=t,Object.freeze(a)}const c=R(C),v=[{title:"Roboto",value:"Roboto"},{title:"Open Sans",value:"Open Sans"},{title:"Montserrat",value:"Montserrat"},{title:"Lato",value:"Lato"},{title:"Poppins",value:"Poppins"},{title:"Oswald",value:"Oswald"},{title:"Raleway",value:"Raleway"},{title:"Ubuntu",value:"Ubuntu"},{title:"Nunito",value:"Nunito"},{title:"Merriweather",value:"Merriweather"},{title:"Nunito Sans",value:"Nunito Sans"},{title:"Playfair Display",value:"Playfair Display"},{title:"Rubik",value:"Rubik"},{title:"Inter",value:"Inter"},{title:"Lora",value:"Lora"},{title:"Kanit",value:"Kanit"},{title:"Fira Sans",value:"Fira Sans"},{title:"Hind",value:"Hind"},{title:"Quicksand",value:"Quicksand"},{title:"Mulish",value:"Mulish"},{title:"Barlow",value:"Barlow"},{title:"Inconsolata",value:"Inconsolata"},{title:"Titillium Web",value:"Titillium Web"},{title:"Heebo",value:"Heebo"},{title:"IBM Plex Sans",value:"IBM Plex Sans"},{title:"DM Sans",value:"DM Sans"},{title:"Nanum Gothic",value:"Nanum Gothic"},{title:"Karla",value:"Karla"},{title:"Arimo",value:"Arimo"},{title:"Cabin",value:"Cabin"},{title:"Oxygen",value:"Oxygen"},{title:"Overpass",value:"Overpass"},{title:"Assistant",value:"Assistant"},{title:"Tajawal",value:"Tajawal"},{title:"Play",value:"Play"},{title:"Exo",value:"Exo"},{title:"Cinzel",value:"Cinzel"},{title:"Faustina",value:"Faustina"},{title:"Philosopher",value:"Philosopher"},{title:"Gelasio",value:"Gelasio"},{title:"Sofia Sans Condensed",value:"Sofia Sans Condensed"},{title:"Noto Sans Devanagari",value:"Noto Sans Devanagari"},{title:"Actor",value:"Actor"},{title:"Epilogue",value:"Epilogue"},{title:"Glegoo",value:"Glegoo"},{title:"Overlock",value:"Overlock"},{title:"Lustria",value:"Lustria"},{title:"Ovo",value:"Ovo"},{title:"Suranna",value:"Suranna"}],P=()=>{const t=j.useBuilderProp("onSaveBrandingOptions",async()=>{}),[a,i]=_.useBrandingOptions(),r=c.useRef(a);c.useEffect(()=>()=>t(r.current),[r]);const p=({formData:l},u)=>{u&&(i(l),r.current=l)},{_bodyFont:g,_headingFont:b,_primaryColor:f,_bodyTextDarkColor:m,_bodyTextLightColor:y,_bodyBgDarkColor:x,_secondaryColor:h,_bodyBgLightColor:S,_roundedCorners:O}=a,s={_headingFont:e.SelectOption({title:"Heading font",default:b,options:v}),_bodyFont:e.SelectOption({title:"Body font",default:g,options:v}),_roundedCorners:e.Numeric({title:"Rounded Corner",default:parseInt(O||5,10)}),_primaryColor:e.Color({title:"Primary",default:f}),_secondaryColor:e.Color({title:"Secondary",default:h}),_bodyBgLightColor:e.Color({title:"Body Background (Light)",default:S}),_bodyBgDarkColor:e.Color({title:"Body Background (Dark)",default:x}),_bodyTextLightColor:e.Color({title:"Body Text (Light)",default:m}),_bodyTextDarkColor:e.Color({title:"Body Text (Dark)",default:y})},n={type:"object",properties:{}},d={};return Object.keys(s).forEach(l=>{const u=s[l];return n.properties||(n.properties={}),n.properties[l]=u.schema,d[l]=u.uiSchema,!0}),o.jsxRuntimeExports.jsxs("div",{className:"flex h-full select-none flex-col",children:[o.jsxRuntimeExports.jsx("div",{className:"rounded-md bg-background/30 p-1",children:o.jsxRuntimeExports.jsx("h1",{className:"px-1 font-semibold",children:"Branding Options"})}),o.jsxRuntimeExports.jsx("div",{className:"-mx-2",children:o.jsxRuntimeExports.jsx(B,{idSeparator:".",autoComplete:"off",omitExtraData:!0,liveOmit:!0,liveValidate:!0,uiSchema:d,schema:n,formData:a,validator:q,onChange:p})})]})};exports.default=P;
@@ -0,0 +1 @@
1
+ "use strict";const s="#styles:",E="#slots:",Y="#i18n";exports.I18N_KEY=Y;exports.SLOT_KEY=E;exports.STYLES_KEY=s;
@@ -0,0 +1,6 @@
1
+ const s = "#styles:", t = "#slots:", o = "#i18n";
2
+ export {
3
+ o as I,
4
+ s as S,
5
+ t as a
6
+ };