@chaibuilder/sdk 1.2.32 → 1.2.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AddBlocks-0eVRNr1d.js → AddBlocks-RmEkZXdE.js} +37 -33
- package/dist/AddBlocks-XYCWUol8.cjs +1 -0
- package/dist/{BrandingOptions-yYAznnw2.js → BrandingOptions-TnzCIC7A.js} +37 -31
- package/dist/BrandingOptions-qnaKl27s.cjs +1 -0
- package/dist/CanvasArea-SeSRWHy0.js +1200 -0
- package/dist/CanvasArea-iIwERFUC.cjs +55 -0
- package/dist/ChaiBuilderEditor-YqEKonJ_.cjs +206 -0
- package/dist/{index-AJalHhkO.js → ChaiBuilderEditor-y1NxvXJ7.js} +24114 -20836
- package/dist/{CurrentPage-1v40uk8K.js → CurrentPage-9KDre_9q.js} +19 -19
- package/dist/CurrentPage-TNff16tH.cjs +1 -0
- package/dist/ListTree-GxCAsv2Y.cjs +1 -0
- package/dist/{ListTree-0ZrRreCs.js → ListTree-H2WaKwOs.js} +81 -76
- package/dist/PagesPanel-5DRsqV-G.cjs +1 -0
- package/dist/{PagesPanel-AxQX-BX2.js → PagesPanel-jHMmJEtv.js} +14 -14
- package/dist/ProjectPanel-CDnnGpVo.cjs +1 -0
- package/dist/{ProjectPanel-GYdge5v9.js → ProjectPanel-uxhq_D3j.js} +16 -16
- package/dist/Settings-nGnVavh4.cjs +1 -0
- package/dist/{Settings-9JAzGHau.js → Settings-yqZksAbO.js} +53 -53
- package/dist/{SidePanels-bLwsW29O.js → SidePanels-1gwirESt.js} +70 -70
- package/dist/SidePanels-33KNaSS3.cjs +1 -0
- package/dist/{Topbar-0Ql8pHVc.js → Topbar-NHF8D1di.js} +19 -14
- package/dist/Topbar-Wwdd9Flx.cjs +1 -0
- package/dist/{UnsplashImages-NYwOOgYa.js → UnsplashImages-LLu2wFeN.js} +26 -21
- package/dist/UnsplashImages-lnz6NfSD.cjs +1 -0
- package/dist/UploadImages-3nl_4mDf.cjs +1 -0
- package/dist/{UploadImages-vpZeW-YW.js → UploadImages-FtvaDyk9.js} +33 -27
- package/dist/{add-page-modal-hDyzsEU7.js → add-page-modal-V9DTBMmY.js} +22 -22
- package/dist/add-page-modal-sIZk552b.cjs +1 -0
- package/dist/confirm-alert-Uzq5XNGt.cjs +1 -0
- package/dist/{confirm-alert-FGQKKQJU.js → confirm-alert-sI4pItIN.js} +16 -10
- package/dist/{controls-OfJWSEqC.js → controls-VTdJhdSz.js} +44 -41
- package/dist/controls-jWJDao88.cjs +1 -0
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +9 -0
- package/dist/core.js +46 -45
- package/dist/delete-page-modal-UminFzYh.cjs +1 -0
- package/dist/{delete-page-modal-KxeyBri2.js → delete-page-modal-XrIpujav.js} +15 -15
- package/dist/email-blocks.cjs +1 -1
- package/dist/email-blocks.js +1 -1
- package/dist/email.cjs +1 -1
- package/dist/email.d.ts +9 -0
- package/dist/email.js +18 -16
- package/dist/{form-77dY98bF.js → form-dQQ2tTRZ.js} +7 -7
- package/dist/form-q7lxaK3j.cjs +1 -0
- package/dist/functions-ge87TVcc.js +30 -0
- package/dist/functions-sBiIevFh.cjs +1 -0
- package/dist/{index-5zkCTSAM.js → index-OsS2_gM8.js} +28 -29
- package/dist/index-eYwpNzUl.cjs +1 -0
- package/dist/lib.cjs +2 -2
- package/dist/lib.d.ts +2 -0
- package/dist/lib.js +12 -10
- package/dist/{page-viewer-umQaut1j.js → page-viewer-AoJ5HU6j.js} +21 -21
- package/dist/page-viewer-FzhqSyNO.cjs +1 -0
- package/dist/project-general-setting-WzJ8U1OW.cjs +1 -0
- package/dist/{project-general-setting-uuCemMCU.js → project-general-setting-g3YJYszB.js} +24 -24
- package/dist/{project-seo-setting-asvbPQiI.js → project-seo-setting-1sLmV-wv.js} +26 -20
- package/dist/project-seo-setting-GuObNafp.cjs +1 -0
- package/dist/render.cjs +1 -1
- package/dist/render.d.ts +2 -0
- package/dist/render.js +55 -53
- package/dist/single-page-detail-WGars7Tl.cjs +1 -0
- package/dist/{single-page-detail-F6pKWyq1.js → single-page-detail-sQ3BH6Rc.js} +25 -25
- package/dist/studio.cjs +1 -1
- package/dist/studio.d.ts +9 -0
- package/dist/studio.js +13 -13
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +153 -147
- package/dist/useCanvasSettings-QcsmJd9b.cjs +1 -0
- package/dist/{useCanvasSettings-ikt217kv.js → useCanvasSettings-XwFRrknO.js} +1 -1
- package/dist/web-blocks.cjs +4 -4
- package/dist/web-blocks.js +137 -113
- package/package.json +9 -3
- package/dist/AddBlocks-t0hKDSud.cjs +0 -1
- package/dist/BrandingOptions-NVmCxZfD.cjs +0 -1
- package/dist/CanvasArea-2b4oSjRx.js +0 -1177
- package/dist/CanvasArea-OzyCq6UU.cjs +0 -55
- package/dist/CurrentPage-YBMhEBZG.cjs +0 -1
- package/dist/ListTree-jPwxgI6R.cjs +0 -1
- package/dist/PagesPanel-ivEL9tIQ.cjs +0 -1
- package/dist/ProjectPanel-shgvg_yT.cjs +0 -1
- package/dist/Settings-MMwEBADN.cjs +0 -1
- package/dist/SidePanels-iaaRCUeQ.cjs +0 -1
- package/dist/Topbar-CkUhCnSW.cjs +0 -1
- package/dist/UnsplashImages-juwtWvXe.cjs +0 -1
- package/dist/UploadImages-4_jmnoVi.cjs +0 -1
- package/dist/add-page-modal-2ZPjc54F.cjs +0 -1
- package/dist/confirm-alert-QRxOc76t.cjs +0 -1
- package/dist/controls-KK2oLIa8.cjs +0 -1
- package/dist/delete-page-modal--N1nPPIL.cjs +0 -1
- package/dist/form-hT5dGoJH.cjs +0 -1
- package/dist/functions-I6BoMqqb.js +0 -21
- package/dist/functions-r3ExvGGf.cjs +0 -1
- package/dist/index-FPBudsRF.cjs +0 -1
- package/dist/index-JIcsKKoG.cjs +0 -1
- package/dist/index-YpnaudSM.js +0 -63
- package/dist/index-ecnGWzh9.cjs +0 -1
- package/dist/index-hH5SIZ29.js +0 -3116
- package/dist/index-sJ9Uc9UY.cjs +0 -206
- package/dist/page-viewer-k-g15j8B.cjs +0 -1
- package/dist/project-general-setting-1leAiCJQ.cjs +0 -1
- package/dist/project-seo-setting-kDBSOzgX.cjs +0 -1
- package/dist/single-page-detail-IFtVxwl5.cjs +0 -1
- package/dist/useCanvasSettings-Am2o80hW.cjs +0 -1
|
@@ -1,31 +1,34 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
|
-
import y, { createElement as
|
|
3
|
-
import { has as F, isFunction as W, first as
|
|
2
|
+
import y, { createElement as O, useState as g, useCallback as U, useMemo as V, useEffect as q, Suspense as R } from "react";
|
|
3
|
+
import { has as F, isFunction as W, first as x, omit as J, noop as K, isEmpty as b, filter as k, values as v, groupBy as w, mergeWith as Y, isArray as L, keys as Q, get as X, map as A, uniq as Z, includes as $, find as ee, reject as I } from "lodash-es";
|
|
4
4
|
import { useAtom as N } from "jotai";
|
|
5
5
|
import { useTranslation as H } from "react-i18next";
|
|
6
|
-
import {
|
|
6
|
+
import { m as _, L as S, z as se, ag as P, ac as te, ad as re, ae as oe, h as T, O as z, a6 as le, a7 as ae, a8 as ie, a9 as ce, aa as E, bf as ne, bg as de, bh as me, bi as pe, ap as ue, bj as he, bk as xe, B as fe, bl as ge, bm as je, bn as be, ai as ke, aj as ve, ak as C, b9 as ye, b2 as Be, b3 as Ne, b4 as Ce, b5 as we, ah as Ae } from "./ChaiBuilderEditor-y1NxvXJ7.js";
|
|
7
7
|
import { BoxIcon as Te } from "@radix-ui/react-icons";
|
|
8
|
-
import { syncBlocksWithDefaults as
|
|
8
|
+
import { syncBlocksWithDefaults as G, useChaiBlocks as M } from "@chaibuilder/runtime";
|
|
9
9
|
import { useFeature as _e } from "flagged";
|
|
10
10
|
import { O as B } from "./STRINGS--j49GZJP.js";
|
|
11
11
|
import { Loader as Se } from "lucide-react";
|
|
12
12
|
import { g as Pe } from "./html-to-json-ZV4QjSww.js";
|
|
13
13
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
14
|
-
import "./Functions-7jnEwJyw.js";
|
|
15
14
|
import "clsx";
|
|
15
|
+
import "react-dom";
|
|
16
|
+
import "@radix-ui/react-scroll-area";
|
|
17
|
+
import "@floating-ui/react-dom";
|
|
18
|
+
import "i18next";
|
|
19
|
+
import "./Functions-7jnEwJyw.js";
|
|
16
20
|
import "tailwind-merge";
|
|
17
21
|
import "@react-hookz/web";
|
|
18
22
|
import "./MODIFIERS-cBT31iqE.js";
|
|
19
|
-
import "./Class-6Hz2KzYb.js";
|
|
20
23
|
import "@radix-ui/react-toggle";
|
|
21
24
|
import "class-variance-authority";
|
|
25
|
+
import "./Class-6Hz2KzYb.js";
|
|
22
26
|
import "@radix-ui/react-switch";
|
|
23
27
|
import "@radix-ui/react-slot";
|
|
24
28
|
import "@radix-ui/react-accordion";
|
|
25
29
|
import "@radix-ui/react-alert-dialog";
|
|
26
30
|
import "@radix-ui/react-dialog";
|
|
27
31
|
import "@radix-ui/react-label";
|
|
28
|
-
import "@radix-ui/react-scroll-area";
|
|
29
32
|
import "@radix-ui/react-tabs";
|
|
30
33
|
import "@radix-ui/react-tooltip";
|
|
31
34
|
import "@radix-ui/react-popover";
|
|
@@ -38,16 +41,17 @@ import "@radix-ui/react-toast";
|
|
|
38
41
|
import "cmdk";
|
|
39
42
|
import "@radix-ui/react-context-menu";
|
|
40
43
|
import "react-icons-picker";
|
|
41
|
-
import "react-dom";
|
|
42
44
|
import "react-quill";
|
|
45
|
+
import "react-hotkeys-hook";
|
|
46
|
+
import "lodash";
|
|
43
47
|
import "himalaya";
|
|
44
48
|
const Le = ({ block: s }) => {
|
|
45
49
|
const { type: r, icon: i, label: l } = s, { addCoreBlock: d, addPredefinedBlock: c } = _(), [n, t] = S(), [, p] = se(), [, m] = N(P), o = () => {
|
|
46
50
|
if (F(s, "blocks")) {
|
|
47
51
|
const u = W(s.blocks) ? s.blocks() : s.blocks;
|
|
48
|
-
c(
|
|
52
|
+
c(G(u), x(n));
|
|
49
53
|
} else
|
|
50
|
-
d(s,
|
|
54
|
+
d(s, x(n));
|
|
51
55
|
m(B);
|
|
52
56
|
}, a = _e("dnd");
|
|
53
57
|
return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs(te, { children: [
|
|
@@ -57,14 +61,14 @@ const Le = ({ block: s }) => {
|
|
|
57
61
|
onClick: o,
|
|
58
62
|
type: "button",
|
|
59
63
|
onDragStart: (u) => {
|
|
60
|
-
u.dataTransfer.setData("text/plain", JSON.stringify(
|
|
64
|
+
u.dataTransfer.setData("text/plain", JSON.stringify(J(s, ["component", "icon"]))), setTimeout(() => {
|
|
61
65
|
t([]), p(null), m(B);
|
|
62
66
|
}, 200);
|
|
63
67
|
},
|
|
64
68
|
draggable: a ? "true" : "false",
|
|
65
69
|
className: "space-y-2 rounded-lg border border-border p-3 text-center hover:bg-slate-300/50 " + (a ? "cursor-grab" : "cursor-pointer"),
|
|
66
70
|
children: [
|
|
67
|
-
|
|
71
|
+
O(i || Te, { className: "w-4 h-4 mx-auto" }),
|
|
68
72
|
/* @__PURE__ */ e.jsx("p", { className: "text-xs", children: l || r })
|
|
69
73
|
]
|
|
70
74
|
}
|
|
@@ -72,15 +76,15 @@ const Le = ({ block: s }) => {
|
|
|
72
76
|
/* @__PURE__ */ e.jsx(oe, { children: /* @__PURE__ */ e.jsx("p", { children: l || r }) })
|
|
73
77
|
] }) });
|
|
74
78
|
}, Ie = ({ block: s, closePopover: r }) => {
|
|
75
|
-
const [i, l] = g(!1), d = T("getExternalPredefinedBlock",
|
|
79
|
+
const [i, l] = g(!1), d = T("getExternalPredefinedBlock", K()), { addCoreBlock: c, addPredefinedBlock: n } = _(), [t] = S(), p = U(
|
|
76
80
|
async (m) => {
|
|
77
81
|
if (m.stopPropagation(), F(s, "component")) {
|
|
78
|
-
c(s,
|
|
82
|
+
c(s, x(t)), r();
|
|
79
83
|
return;
|
|
80
84
|
}
|
|
81
85
|
l(!0);
|
|
82
86
|
const o = await d(s);
|
|
83
|
-
b(o) || n(
|
|
87
|
+
b(o) || n(G(o), x(t)), r();
|
|
84
88
|
},
|
|
85
89
|
[s]
|
|
86
90
|
);
|
|
@@ -108,10 +112,10 @@ const Le = ({ block: s }) => {
|
|
|
108
112
|
}
|
|
109
113
|
) });
|
|
110
114
|
}, Ee = () => {
|
|
111
|
-
const { data: s } =
|
|
115
|
+
const { data: s } = z(), r = M(), i = k(v(r), { category: "custom" }), l = w(i, "group"), d = w(s, "group"), c = V(() => Y(l, d, (o, a) => {
|
|
112
116
|
if (L(o) && L(a))
|
|
113
117
|
return [...o, ...a];
|
|
114
|
-
}), [l, d]), [n, t] = g(
|
|
118
|
+
}), [l, d]), [n, t] = g(x(Q(c)) || ""), [, p] = N(P), m = X(c, n, []);
|
|
115
119
|
return /* @__PURE__ */ e.jsxs("div", { className: "relative flex h-full max-h-full flex-col overflow-hidden py-2", children: [
|
|
116
120
|
/* @__PURE__ */ e.jsx("div", { className: "sticky top-0 flex w-full items-center p-3", children: /* @__PURE__ */ e.jsxs(le, { value: n, onValueChange: (o) => t(o), children: [
|
|
117
121
|
/* @__PURE__ */ e.jsx(ae, { className: "w-full", children: /* @__PURE__ */ e.jsx(ie, { placeholder: "Select a provider" }) }),
|
|
@@ -129,14 +133,14 @@ const Le = ({ block: s }) => {
|
|
|
129
133
|
}, Fe = () => {
|
|
130
134
|
const { t: s } = H(), [r, i] = g(""), { addPredefinedBlock: l } = _(), [d] = S(), [, c] = N(P), n = () => {
|
|
131
135
|
const t = Pe(r);
|
|
132
|
-
l([...t],
|
|
136
|
+
l([...t], x(d) || null), i(""), c(B);
|
|
133
137
|
};
|
|
134
138
|
return /* @__PURE__ */ e.jsxs(ne, { className: "border-border/0 p-0 shadow-none", children: [
|
|
135
139
|
/* @__PURE__ */ e.jsx(de, { className: "p-3", children: /* @__PURE__ */ e.jsx(me, { children: s("html_snippet_description") }) }),
|
|
136
140
|
/* @__PURE__ */ e.jsx(pe, { className: "space-y-2 px-3 py-0", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-1", children: [
|
|
137
141
|
/* @__PURE__ */ e.jsx(ue, { htmlFor: "current", className: "text-sm", children: s("tailwind_html_snippet") }),
|
|
138
142
|
/* @__PURE__ */ e.jsx(
|
|
139
|
-
|
|
143
|
+
he,
|
|
140
144
|
{
|
|
141
145
|
autoFocus: !0,
|
|
142
146
|
tabIndex: 1,
|
|
@@ -149,32 +153,32 @@ const Le = ({ block: s }) => {
|
|
|
149
153
|
}
|
|
150
154
|
)
|
|
151
155
|
] }) }),
|
|
152
|
-
/* @__PURE__ */ e.jsxs(
|
|
156
|
+
/* @__PURE__ */ e.jsxs(xe, { className: "flex flex-col justify-end p-3", children: [
|
|
153
157
|
/* @__PURE__ */ e.jsx(fe, { disabled: r.trim() === "", onClick: () => n(), size: "sm", className: "w-full", children: s("import_html") }),
|
|
154
158
|
/* @__PURE__ */ e.jsx(ge, { variant: "default", className: "mt-2 border-none p-1 text-gray-400", children: /* @__PURE__ */ e.jsx(je, { className: "text-xs font-normal leading-4", children: s("note_imported_html") }) })
|
|
155
159
|
] })
|
|
156
160
|
] });
|
|
157
|
-
},
|
|
158
|
-
const { t: s } = H(), [r, i] = g("core"), [l, d] = g("basic"), c =
|
|
159
|
-
|
|
160
|
-
!$(f, l) && !b(f) && !b(l) && d(
|
|
161
|
+
}, _s = () => {
|
|
162
|
+
const { t: s } = H(), [r, i] = g("core"), [l, d] = g("basic"), c = M(), [, n] = N(be), t = T("importHTMLSupport", !0), p = T("filterChaiBlock", () => !0), { data: m, isLoading: o } = z(), a = k(c, p), u = w(a, "category"), f = Z(A(u.core, "group"));
|
|
163
|
+
q(() => {
|
|
164
|
+
!$(f, l) && !b(f) && !b(l) && d(x(f));
|
|
161
165
|
}, [f, l]);
|
|
162
|
-
const j = !o && !b(m) || ee(
|
|
166
|
+
const j = !o && !b(m) || ee(v(a), { category: "custom" }) !== void 0;
|
|
163
167
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex h-full w-72 flex-col overflow-hidden", children: [
|
|
164
168
|
/* @__PURE__ */ e.jsxs("div", { className: "mb-2 flex flex-col justify-between rounded-md bg-background/30 p-1", children: [
|
|
165
169
|
/* @__PURE__ */ e.jsx("h1", { className: "flex flex-col items-baseline px-1 text-xl font-semibold xl:flex-col", children: s("add_block") }),
|
|
166
170
|
/* @__PURE__ */ e.jsx("span", { className: "p-0 text-xs font-light leading-3 opacity-80 xl:pl-1", children: s(r === "html" ? "enter_paste_tailwind_html" : "click_to_add_block") })
|
|
167
171
|
] }),
|
|
168
172
|
/* @__PURE__ */ e.jsx(
|
|
169
|
-
|
|
173
|
+
ke,
|
|
170
174
|
{
|
|
171
|
-
onValueChange: (
|
|
172
|
-
n(""), i(
|
|
175
|
+
onValueChange: (h) => {
|
|
176
|
+
n(""), i(h);
|
|
173
177
|
},
|
|
174
178
|
value: r,
|
|
175
179
|
className: "h-max",
|
|
176
180
|
children: /* @__PURE__ */ e.jsxs(
|
|
177
|
-
|
|
181
|
+
ve,
|
|
178
182
|
{
|
|
179
183
|
className: "grid w-full " + (j && t ? "grid-cols-3" : j && !t || !j && t ? "grid-cols-2" : "grid-cols-1"),
|
|
180
184
|
children: [
|
|
@@ -189,10 +193,10 @@ const Le = ({ block: s }) => {
|
|
|
189
193
|
r === "core" && /* @__PURE__ */ e.jsx(ye, { className: "-mx-1.5 h-full", children: /* @__PURE__ */ e.jsx("div", { className: "mt-2 w-full", children: y.Children.toArray(
|
|
190
194
|
A(
|
|
191
195
|
f,
|
|
192
|
-
(
|
|
193
|
-
/* @__PURE__ */ e.jsx(Ce, { className: "rounded-md bg-gray-100 px-4 py-2 capitalize", children:
|
|
196
|
+
(h) => I(k(v(u.core), { group: h }), { hidden: !0 }).length ? /* @__PURE__ */ e.jsx(Be, { type: "single", value: h, collapsible: !0, className: "w-full", children: /* @__PURE__ */ e.jsxs(Ne, { value: h, children: [
|
|
197
|
+
/* @__PURE__ */ e.jsx(Ce, { className: "rounded-md bg-gray-100 px-4 py-2 capitalize", children: h }),
|
|
194
198
|
/* @__PURE__ */ e.jsx(we, { className: "p-3", children: /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-3 gap-2", children: y.Children.toArray(
|
|
195
|
-
I(v(
|
|
199
|
+
I(k(v(u.core), { group: h }), { hidden: !0 }).map((D) => /* @__PURE__ */ e.jsx(Le, { block: D }))
|
|
196
200
|
) }) })
|
|
197
201
|
] }) }) : null
|
|
198
202
|
)
|
|
@@ -202,5 +206,5 @@ const Le = ({ block: s }) => {
|
|
|
202
206
|
] });
|
|
203
207
|
};
|
|
204
208
|
export {
|
|
205
|
-
|
|
209
|
+
_s as default
|
|
206
210
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),n=require("react"),t=require("lodash-es"),y=require("jotai"),v=require("react-i18next"),s=require("./ChaiBuilderEditor-YqEKonJ_.cjs"),q=require("@radix-ui/react-icons"),b=require("@chaibuilder/runtime"),B=require("flagged"),R=require("./STRINGS-gPz7CUOk.cjs"),N=require("lucide-react"),C=require("./html-to-json-Xhu27KFD.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("clsx");require("react-dom");require("@radix-ui/react-scroll-area");require("@floating-ui/react-dom");require("i18next");require("./Functions-N3yhPYKY.cjs");require("tailwind-merge");require("@react-hookz/web");require("./MODIFIERS-YPHRtwrM.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./Class-Zc8hpE7f.cjs");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");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-context-menu");require("react-icons-picker");require("react-quill");require("react-hotkeys-hook");require("lodash");require("himalaya");const T=({block:r})=>{const{type:i,icon:u,label:c}=r,{addCoreBlock:m,addPredefinedBlock:d}=s.useAddBlock(),[x,o]=s.useSelectedBlockIds(),[,j]=s.useHighlightBlockId(),[,p]=y.useAtom(s.activePanelAtom),l=()=>{if(t.has(r,"blocks")){const h=t.isFunction(r.blocks)?r.blocks():r.blocks;d(b.syncBlocksWithDefaults(h),t.first(x))}else m(r,t.first(x));p(R.OUTLINE_KEY)},a=B.useFeature("dnd");return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsxs(s.Tooltip,{children:[e.jsxRuntimeExports.jsx(s.TooltipTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsxs("button",{onClick:l,type:"button",onDragStart:h=>{h.dataTransfer.setData("text/plain",JSON.stringify(t.omit(r,["component","icon"]))),setTimeout(()=>{o([]),j(null),p(R.OUTLINE_KEY)},200)},draggable:a?"true":"false",className:"space-y-2 rounded-lg border border-border p-3 text-center hover:bg-slate-300/50 "+(a?"cursor-grab":"cursor-pointer"),children:[n.createElement(u||q.BoxIcon,{className:"w-4 h-4 mx-auto"}),e.jsxRuntimeExports.jsx("p",{className:"text-xs",children:c||i})]})}),e.jsxRuntimeExports.jsx(s.TooltipContent,{children:e.jsxRuntimeExports.jsx("p",{children:c||i})})]})})},A=({block:r,closePopover:i})=>{const[u,c]=n.useState(!1),m=s.useBuilderProp("getExternalPredefinedBlock",t.noop()),{addCoreBlock:d,addPredefinedBlock:x}=s.useAddBlock(),[o]=s.useSelectedBlockIds(),j=n.useCallback(async p=>{if(p.stopPropagation(),t.has(r,"component")){d(r,t.first(o)),i();return}c(!0);const l=await m(r);t.isEmpty(l)||x(b.syncBlocksWithDefaults(l),t.first(o)),i()},[r]);return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsxs("div",{onClick:u?()=>{}:j,className:"relative cursor-pointer overflow-hidden rounded-md border border-transparent duration-200 hover:scale-x-105 hover:border-foreground/20 hover:shadow-2xl",children:[u&&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..."})]}),r.preview?e.jsxRuntimeExports.jsx("img",{src:r.preview,className:"min-h-[50px] w-full rounded-md border border-gray-300",alt:r.label}):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:r.label})})]})})},w=()=>{const{data:r}=s.useUILibraryBlocks(),i=b.useChaiBlocks(),u=t.filter(t.values(i),{category:"custom"}),c=t.groupBy(u,"group"),m=t.groupBy(r,"group"),d=n.useMemo(()=>t.mergeWith(c,m,(l,a)=>{if(t.isArray(l)&&t.isArray(a))return[...l,...a]}),[c,m]),[x,o]=n.useState(t.first(t.keys(d))||""),[,j]=y.useAtom(s.activePanelAtom),p=t.get(d,x,[]);return e.jsxRuntimeExports.jsxs("div",{className:"relative flex h-full max-h-full flex-col overflow-hidden py-2",children:[e.jsxRuntimeExports.jsx("div",{className:"sticky top-0 flex w-full items-center p-3",children:e.jsxRuntimeExports.jsxs(s.Select,{value:x,onValueChange:l=>o(l),children:[e.jsxRuntimeExports.jsx(s.SelectTrigger,{className:"w-full",children:e.jsxRuntimeExports.jsx(s.SelectValue,{placeholder:"Select a provider"})}),e.jsxRuntimeExports.jsxs(s.SelectContent,{children:[e.jsxRuntimeExports.jsx(s.SelectItem,{value:"",children:"Choose"}),n.Children.toArray(t.map(d,(l,a)=>e.jsxRuntimeExports.jsx(s.SelectItem,{value:a,children:a},a)))]})]})}),e.jsxRuntimeExports.jsx("div",{className:"h-full w-full space-y-2 overflow-y-auto px-2",children:n.Children.toArray(p.map(l=>e.jsxRuntimeExports.jsx(A,{block:l,closePopover:()=>j(R.OUTLINE_KEY)})))})]})},S=()=>{const{t:r}=v.useTranslation(),[i,u]=n.useState(""),{addPredefinedBlock:c}=s.useAddBlock(),[m]=s.useSelectedBlockIds(),[,d]=y.useAtom(s.activePanelAtom),x=()=>{const o=C.getBlocksFromHTML(i);c([...o],t.first(m)||null),u(""),d(R.OUTLINE_KEY)};return e.jsxRuntimeExports.jsxs(s.Card,{className:"border-border/0 p-0 shadow-none",children:[e.jsxRuntimeExports.jsx(s.CardHeader,{className:"p-3",children:e.jsxRuntimeExports.jsx(s.CardDescription,{children:r("html_snippet_description")})}),e.jsxRuntimeExports.jsx(s.CardContent,{className:"space-y-2 px-3 py-0",children:e.jsxRuntimeExports.jsxs("div",{className:"space-y-1",children:[e.jsxRuntimeExports.jsx(s.Label,{htmlFor:"current",className:"text-sm",children:r("tailwind_html_snippet")}),e.jsxRuntimeExports.jsx(s.Textarea,{autoFocus:!0,tabIndex:1,ref:o=>o&&o.focus(),onChange:o=>u(o.target.value),rows:12,value:i,placeholder:r("enter_code_snippet"),className:"resize-none overflow-x-auto whitespace-pre bg-gray-100 font-mono text-xs font-normal"})]})}),e.jsxRuntimeExports.jsxs(s.CardFooter,{className:"flex flex-col justify-end p-3",children:[e.jsxRuntimeExports.jsx(s.Button,{disabled:i.trim()==="",onClick:()=>x(),size:"sm",className:"w-full",children:r("import_html")}),e.jsxRuntimeExports.jsx(s.Alert,{variant:"default",className:"mt-2 border-none p-1 text-gray-400",children:e.jsxRuntimeExports.jsx(s.AlertTitle,{className:"text-xs font-normal leading-4",children:r("note_imported_html")})})]})]})},_=()=>{const{t:r}=v.useTranslation(),[i,u]=n.useState("core"),[c,m]=n.useState("basic"),d=b.useChaiBlocks(),[,x]=y.useAtom(s.showPredefinedBlockCategoryAtom),o=s.useBuilderProp("importHTMLSupport",!0),j=s.useBuilderProp("filterChaiBlock",()=>!0),{data:p,isLoading:l}=s.useUILibraryBlocks(),a=t.filter(d,j),h=t.groupBy(a,"category"),g=t.uniq(t.map(h.core,"group"));n.useEffect(()=>{!t.includes(g,c)&&!t.isEmpty(g)&&!t.isEmpty(c)&&m(t.first(g))},[g,c]);const E=!l&&!t.isEmpty(p)||t.find(t.values(a),{category:"custom"})!==void 0;return e.jsxRuntimeExports.jsxs("div",{className:"flex h-full w-72 flex-col overflow-hidden",children:[e.jsxRuntimeExports.jsxs("div",{className:"mb-2 flex flex-col justify-between rounded-md bg-background/30 p-1",children:[e.jsxRuntimeExports.jsx("h1",{className:"flex flex-col items-baseline px-1 text-xl font-semibold xl:flex-col",children:r("add_block")}),e.jsxRuntimeExports.jsx("span",{className:"p-0 text-xs font-light leading-3 opacity-80 xl:pl-1",children:r(i==="html"?"enter_paste_tailwind_html":"click_to_add_block")})]}),e.jsxRuntimeExports.jsx(s.Tabs,{onValueChange:f=>{x(""),u(f)},value:i,className:"h-max",children:e.jsxRuntimeExports.jsxs(s.TabsList,{className:"grid w-full "+(E&&o?"grid-cols-3":E&&!o||!E&&o?"grid-cols-2":"grid-cols-1"),children:[e.jsxRuntimeExports.jsx(s.TabsTrigger,{value:"core",children:r("Blocks")}),E?e.jsxRuntimeExports.jsx(s.TabsTrigger,{value:"ui-blocks",children:r("ui_library")}):null,o?e.jsxRuntimeExports.jsx(s.TabsTrigger,{value:"html",children:r("import")}):null]})}),i==="core"&&e.jsxRuntimeExports.jsx(s.ScrollArea,{className:"-mx-1.5 h-full",children:e.jsxRuntimeExports.jsx("div",{className:"mt-2 w-full",children:n.Children.toArray(t.map(g,f=>t.reject(t.filter(t.values(h.core),{group:f}),{hidden:!0}).length?e.jsxRuntimeExports.jsx(s.Accordion,{type:"single",value:f,collapsible:!0,className:"w-full",children:e.jsxRuntimeExports.jsxs(s.AccordionItem,{value:f,children:[e.jsxRuntimeExports.jsx(s.AccordionTrigger,{className:"rounded-md bg-gray-100 px-4 py-2 capitalize",children:f}),e.jsxRuntimeExports.jsx(s.AccordionContent,{className:"p-3",children:e.jsxRuntimeExports.jsx("div",{className:"grid grid-cols-3 gap-2",children:n.Children.toArray(t.reject(t.filter(t.values(h.core),{group:f}),{hidden:!0}).map(k=>e.jsxRuntimeExports.jsx(T,{block:k})))})})]})}):null))})}),i==="ui-blocks"&&e.jsxRuntimeExports.jsx(n.Suspense,{fallback:e.jsxRuntimeExports.jsx(s.Skeleton,{className:"h-32 w-full"}),children:e.jsxRuntimeExports.jsx(w,{})}),i==="html"&&o?e.jsxRuntimeExports.jsx(S,{}):null]})};exports.default=_;
|
|
@@ -2,22 +2,27 @@ import { j as t } from "./jsx-runtime-WbnYoNE9.js";
|
|
|
2
2
|
import * as c from "react";
|
|
3
3
|
import N from "@rjsf/validator-ajv8";
|
|
4
4
|
import j from "@rjsf/core";
|
|
5
|
-
import { h as k, F as
|
|
6
|
-
import {
|
|
5
|
+
import { h as k, F as w, bu as D } from "./ChaiBuilderEditor-y1NxvXJ7.js";
|
|
6
|
+
import { y as f, c as P, f as i } from "./controls-VTdJhdSz.js";
|
|
7
7
|
import { debounce as R, noop as F, isEqual as L } from "lodash-es";
|
|
8
8
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
9
|
-
import "./Functions-7jnEwJyw.js";
|
|
10
9
|
import "clsx";
|
|
11
|
-
import "
|
|
12
|
-
import "@
|
|
10
|
+
import "react-dom";
|
|
11
|
+
import "@radix-ui/react-scroll-area";
|
|
12
|
+
import "@floating-ui/react-dom";
|
|
13
13
|
import "jotai";
|
|
14
|
+
import "i18next";
|
|
15
|
+
import "react-i18next";
|
|
16
|
+
import "flagged";
|
|
14
17
|
import "./STRINGS--j49GZJP.js";
|
|
18
|
+
import "./Functions-7jnEwJyw.js";
|
|
19
|
+
import "tailwind-merge";
|
|
20
|
+
import "@chaibuilder/runtime";
|
|
15
21
|
import "@react-hookz/web";
|
|
16
22
|
import "./MODIFIERS-cBT31iqE.js";
|
|
17
|
-
import "./Class-6Hz2KzYb.js";
|
|
18
|
-
import "react-i18next";
|
|
19
23
|
import "@radix-ui/react-toggle";
|
|
20
24
|
import "class-variance-authority";
|
|
25
|
+
import "./Class-6Hz2KzYb.js";
|
|
21
26
|
import "@radix-ui/react-switch";
|
|
22
27
|
import "@radix-ui/react-slot";
|
|
23
28
|
import "@radix-ui/react-accordion";
|
|
@@ -25,7 +30,6 @@ import "@radix-ui/react-icons";
|
|
|
25
30
|
import "@radix-ui/react-alert-dialog";
|
|
26
31
|
import "@radix-ui/react-dialog";
|
|
27
32
|
import "@radix-ui/react-label";
|
|
28
|
-
import "@radix-ui/react-scroll-area";
|
|
29
33
|
import "@radix-ui/react-tabs";
|
|
30
34
|
import "@radix-ui/react-tooltip";
|
|
31
35
|
import "@radix-ui/react-popover";
|
|
@@ -38,18 +42,20 @@ import "@radix-ui/react-toast";
|
|
|
38
42
|
import "cmdk";
|
|
39
43
|
import "@radix-ui/react-context-menu";
|
|
40
44
|
import "react-icons-picker";
|
|
41
|
-
import "react-dom";
|
|
42
45
|
import "react-quill";
|
|
43
|
-
|
|
44
|
-
|
|
46
|
+
import "react-hotkeys-hook";
|
|
47
|
+
import "lodash";
|
|
48
|
+
import "lucide-react";
|
|
49
|
+
const M = ({ value: u, onChange: e, id: p, onBlur: m }) => {
|
|
50
|
+
const a = R(e, 200), d = (l) => a(l.target.value);
|
|
45
51
|
return /* @__PURE__ */ t.jsx("div", { className: "mt-1.5 flex items-center gap-x-3", children: /* @__PURE__ */ t.jsx("div", { className: "flex w-3/5 flex-col", children: /* @__PURE__ */ t.jsx(
|
|
46
52
|
"input",
|
|
47
53
|
{
|
|
48
54
|
type: "color",
|
|
49
55
|
className: "text-xs p-0",
|
|
50
56
|
value: u,
|
|
51
|
-
onBlur: ({ target: { value: l } }) =>
|
|
52
|
-
onChange:
|
|
57
|
+
onBlur: ({ target: { value: l } }) => m(p, l),
|
|
58
|
+
onChange: d
|
|
53
59
|
}
|
|
54
60
|
) }) });
|
|
55
61
|
}, g = [
|
|
@@ -102,19 +108,19 @@ const M = ({ value: u, onChange: e, id: p, onBlur: d }) => {
|
|
|
102
108
|
{ title: "Lustria", value: "Lustria" },
|
|
103
109
|
{ title: "Ovo", value: "Ovo" },
|
|
104
110
|
{ title: "Suranna", value: "Suranna" }
|
|
105
|
-
],
|
|
106
|
-
const u = k("onSaveBrandingOptions", F), [e, p] =
|
|
111
|
+
], wt = () => {
|
|
112
|
+
const u = k("onSaveBrandingOptions", F), [e, p] = w(), [m] = D(), a = c.useRef(e);
|
|
107
113
|
c.useEffect(() => () => {
|
|
108
|
-
L(e,
|
|
114
|
+
L(e, a.current) || u(a.current);
|
|
109
115
|
}, []);
|
|
110
|
-
const
|
|
111
|
-
s && (p(o),
|
|
116
|
+
const d = ({ formData: o }, s) => {
|
|
117
|
+
s && (p(o), a.current = o);
|
|
112
118
|
}, {
|
|
113
119
|
bodyFont: l,
|
|
114
120
|
headingFont: h,
|
|
115
121
|
primaryColor: x,
|
|
116
|
-
bodyTextDarkColor:
|
|
117
|
-
bodyTextLightColor:
|
|
122
|
+
bodyTextDarkColor: y,
|
|
123
|
+
bodyTextLightColor: b,
|
|
118
124
|
bodyBgDarkColor: C,
|
|
119
125
|
secondaryColor: S,
|
|
120
126
|
bodyBgLightColor: B,
|
|
@@ -135,26 +141,26 @@ const M = ({ value: u, onChange: e, id: p, onBlur: d }) => {
|
|
|
135
141
|
title: "Rounded Corner",
|
|
136
142
|
default: parseInt(O || 5, 10)
|
|
137
143
|
}),
|
|
138
|
-
primaryColor:
|
|
139
|
-
secondaryColor:
|
|
144
|
+
primaryColor: i({ title: "Primary", default: x }),
|
|
145
|
+
secondaryColor: i({ title: "Secondary", default: S })
|
|
140
146
|
};
|
|
141
|
-
|
|
147
|
+
m || (r = {
|
|
142
148
|
...r,
|
|
143
|
-
bodyBgLightColor:
|
|
149
|
+
bodyBgLightColor: i({
|
|
144
150
|
title: "Body Background (Light Mode)",
|
|
145
151
|
default: B
|
|
146
152
|
}),
|
|
147
|
-
bodyTextLightColor:
|
|
153
|
+
bodyTextLightColor: i({
|
|
148
154
|
title: "Body Text (Light Mode)",
|
|
149
|
-
default:
|
|
155
|
+
default: y
|
|
150
156
|
}),
|
|
151
|
-
bodyBgDarkColor:
|
|
157
|
+
bodyBgDarkColor: i({
|
|
152
158
|
title: "Body Background (Dark mode)",
|
|
153
159
|
default: C
|
|
154
160
|
}),
|
|
155
|
-
bodyTextDarkColor:
|
|
161
|
+
bodyTextDarkColor: i({
|
|
156
162
|
title: "Body Text (Dark mode)",
|
|
157
|
-
default:
|
|
163
|
+
default: b
|
|
158
164
|
})
|
|
159
165
|
});
|
|
160
166
|
const n = {
|
|
@@ -179,11 +185,11 @@ const M = ({ value: u, onChange: e, id: p, onBlur: d }) => {
|
|
|
179
185
|
schema: n,
|
|
180
186
|
formData: e,
|
|
181
187
|
validator: N,
|
|
182
|
-
onChange:
|
|
188
|
+
onChange: d
|
|
183
189
|
}
|
|
184
190
|
) })
|
|
185
191
|
] });
|
|
186
192
|
};
|
|
187
193
|
export {
|
|
188
|
-
|
|
194
|
+
wt as default
|
|
189
195
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./jsx-runtime-Z_BpKhVy.cjs"),B=require("react"),R=require("@rjsf/validator-ajv8"),E=require("@rjsf/core"),p=require("./ChaiBuilderEditor-YqEKonJ_.cjs"),r=require("./controls-jWJDao88.cjs"),f=require("lodash-es");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("clsx");require("react-dom");require("@radix-ui/react-scroll-area");require("@floating-ui/react-dom");require("jotai");require("i18next");require("react-i18next");require("flagged");require("./STRINGS-gPz7CUOk.cjs");require("./Functions-N3yhPYKY.cjs");require("tailwind-merge");require("@chaibuilder/runtime");require("@react-hookz/web");require("./MODIFIERS-YPHRtwrM.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./Class-Zc8hpE7f.cjs");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-icons");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");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-context-menu");require("react-icons-picker");require("react-quill");require("react-hotkeys-hook");require("lodash");require("lucide-react");function N(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const i in t)if(i!=="default"){const l=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,l.get?l:{enumerable:!0,get:()=>t[i]})}}return e.default=t,Object.freeze(e)}const q=N(B),k=({value:t,onChange:e,id:i,onBlur:l})=>{const n=f.debounce(e,200),v=u=>n(u.target.value);return a.jsxRuntimeExports.jsx("div",{className:"mt-1.5 flex items-center gap-x-3",children:a.jsxRuntimeExports.jsx("div",{className:"flex w-3/5 flex-col",children:a.jsxRuntimeExports.jsx("input",{type:"color",className:"text-xs p-0",value:t,onBlur:({target:{value:u}})=>l(i,u),onChange:v})})})},x=[{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=p.useBuilderProp("onSaveBrandingOptions",f.noop),[e,i]=p.useBrandingOptions(),[l]=p.useBlocksContainer(),n=q.useRef(e);q.useEffect(()=>()=>{f.isEqual(e,n.current)||t(n.current)},[]);const v=({formData:o},c)=>{c&&(i(o),n.current=o)},{bodyFont:u,headingFont:m,primaryColor:b,bodyTextDarkColor:y,bodyTextLightColor:h,bodyBgDarkColor:S,secondaryColor:C,bodyBgLightColor:O,roundedCorners:j}=e;let s={headingFont:r.y({title:"Heading font",default:m,options:x}),bodyFont:r.y({title:"Body font",default:u,options:x}),roundedCorners:r.c({title:"Rounded Corner",default:parseInt(j||5,10)}),primaryColor:r.f({title:"Primary",default:b}),secondaryColor:r.f({title:"Secondary",default:C})};l||(s={...s,bodyBgLightColor:r.f({title:"Body Background (Light Mode)",default:O}),bodyTextLightColor:r.f({title:"Body Text (Light Mode)",default:y}),bodyBgDarkColor:r.f({title:"Body Background (Dark mode)",default:S}),bodyTextDarkColor:r.f({title:"Body Text (Dark mode)",default:h})});const d={type:"object",properties:{}},g={};return Object.keys(s).forEach(o=>{const c=s[o];return d.properties||(d.properties={}),d.properties[o]=c.schema,g[o]=c.uiSchema,!0}),a.jsxRuntimeExports.jsxs("div",{className:"flex h-full w-60 select-none flex-col",children:[a.jsxRuntimeExports.jsx("div",{className:"rounded-md bg-background/30 p-1",children:a.jsxRuntimeExports.jsx("h1",{className:"px-1 font-semibold",children:"Branding Options"})}),a.jsxRuntimeExports.jsx("div",{className:"-mx-2",children:a.jsxRuntimeExports.jsx(E,{widgets:{color:k},idSeparator:".",autoComplete:"off",omitExtraData:!0,liveOmit:!0,liveValidate:!0,uiSchema:g,schema:d,formData:e,validator:R,onChange:v})})]})};exports.default=P;
|