@chaibuilder/sdk 1.2.6 → 1.2.8
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-gbfzju1d.js → AddBlocks-tMxKPoen.js} +50 -50
- package/dist/{AddBlocks-wuKI1ieB.cjs → AddBlocks-x2LkOHSj.cjs} +1 -1
- package/dist/BrandingOptions-EzT9UYd6.cjs +1 -0
- package/dist/{BrandingOptions-mZXO7thQ.js → BrandingOptions-QJJ1y5ez.js} +55 -50
- package/dist/{CanvasArea-7GpvsKP6.js → CanvasArea-EfZgx-gN.js} +406 -404
- package/dist/CanvasArea-rIDwPHl5.cjs +60 -0
- package/dist/{CurrentPage-tHBommaV.cjs → CurrentPage-QNFPD078.cjs} +1 -1
- package/dist/{CurrentPage-C52wu_r7.js → CurrentPage-ulHTz4MD.js} +7 -7
- package/dist/{Layers-NDtp2-im.js → Layers-rehZkz78.js} +171 -148
- package/dist/Layers-v-7k3W2I.cjs +1 -0
- package/dist/{MarkAsGlobalBlock-SPWd6Flk.js → MarkAsGlobalBlock-BjP-Rqlf.js} +6 -5
- package/dist/MarkAsGlobalBlock-X5dNmZcb.cjs +1 -0
- package/dist/{PagesPanel-qV7yGT-K.js → PagesPanel-acGVGJf-.js} +5 -5
- package/dist/{PagesPanel-qZ_-tybb.cjs → PagesPanel-x5ms_LOD.cjs} +1 -1
- package/dist/{ProjectPanel-vzyFbBNU.cjs → ProjectPanel-5BHQ5ANP.cjs} +1 -1
- package/dist/{ProjectPanel-RJqNz-uq.js → ProjectPanel-aLFJq49M.js} +5 -5
- package/dist/Settings-iOjfw5NQ.cjs +1 -0
- package/dist/{Settings-t0I7LKxe.js → Settings-v-txwlII.js} +172 -171
- package/dist/{SidePanels-rXx-fGjB.js → SidePanels-Vdc-J5wK.js} +96 -93
- package/dist/SidePanels-t0g9ZQFT.cjs +1 -0
- package/dist/Topbar-V8xCetWF.cjs +1 -0
- package/dist/{Topbar-ks1ckGLz.js → Topbar-j4t4AgCq.js} +4 -3
- package/dist/{UnsplashImages-8vJPuqrF.js → UnsplashImages-41Y3q5_Q.js} +7 -6
- package/dist/UnsplashImages-DbHky6cj.cjs +1 -0
- package/dist/UploadImages-DnQ95_NW.cjs +1 -0
- package/dist/{UploadImages-6N6UrjLo.js → UploadImages-xBg-kbKv.js} +13 -12
- package/dist/{add-page-modal-a8r8poMY.cjs → add-page-modal-0YAI9dXr.cjs} +1 -1
- package/dist/{add-page-modal-2VlONTs5.js → add-page-modal-6DlGzdA4.js} +5 -5
- package/dist/{confirm-alert-f3DYO5Hj.cjs → confirm-alert-U7-NcG7G.cjs} +1 -1
- package/dist/{confirm-alert-biqvaLT-.js → confirm-alert-i4pM3mOt.js} +4 -3
- package/dist/core.cjs +1 -1
- package/dist/core.js +19 -19
- package/dist/{delete-page-modal-_8O4RCkG.js → delete-page-modal-T_rlQfNd.js} +4 -4
- package/dist/{delete-page-modal-NmwHGjZP.cjs → delete-page-modal-qXpi_2xR.cjs} +1 -1
- package/dist/email-blocks.cjs +1 -1
- package/dist/email-blocks.js +263 -24
- package/dist/{form-Moz_psOw.js → form-OVmsLOrc.js} +1 -1
- package/dist/{form-lJhy9DEC.cjs → form-VbouZlAW.cjs} +1 -1
- package/dist/html-to-json-2PeOCVey.cjs +1 -0
- package/dist/{html-to-json-yjzEN9OX.js → html-to-json-57841sEK.js} +25 -26
- package/dist/{index-482XFRhB.js → index-EGUphg4R.js} +5402 -5366
- package/dist/index-H6vIwGfD.cjs +1 -0
- package/dist/index-e0c8PmRQ.js +205 -0
- package/dist/index-gi1LIOCw.cjs +1 -0
- package/dist/{index-3OU9zl6c.cjs → index-jw8RxsTv.cjs} +33 -33
- package/dist/{index-_OgCuSUz.js → index-niHREMmR.js} +1051 -1043
- package/dist/lib.cjs +1 -1
- package/dist/lib.js +20 -21
- package/dist/mockServiceWorker.js +1 -1
- package/dist/{page-viewer-ajtG_WZC.js → page-viewer-EoYYnA56.js} +5 -5
- package/dist/{page-viewer-k2VlWE3T.cjs → page-viewer-Ou8vDXGV.cjs} +1 -1
- package/dist/{project-general-setting-tAgCjUtR.cjs → project-general-setting-92q4oEYv.cjs} +1 -1
- package/dist/{project-general-setting-TIHLI4Qg.js → project-general-setting-DC_nADG-.js} +5 -5
- package/dist/{project-seo-setting-9JGBPzcA.cjs → project-seo-setting-Snn2nZgS.cjs} +1 -1
- package/dist/{project-seo-setting-dXclexQW.js → project-seo-setting-wxAGEkd_.js} +8 -7
- package/dist/{single-page-detail-6btKDNjs.cjs → single-page-detail-QmmhR_h2.cjs} +1 -1
- package/dist/{single-page-detail-lST7hWvC.js → single-page-detail-xtNZ9YxX.js} +6 -6
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +4 -4
- package/dist/style.css +1 -1
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +134 -133
- package/dist/{useAddBlockByDrop-uPXvrg4G.js → useAddBlockByDrop-_nwI4W3q.js} +1 -1
- package/dist/{useAddBlockByDrop-_nd8yZBa.cjs → useAddBlockByDrop-inkD7Lck.cjs} +1 -1
- package/dist/web-blocks.cjs +2 -2
- package/dist/web-blocks.js +138 -139
- package/package.json +5 -5
- package/dist/BrandingOptions-arKT1zCy.cjs +0 -1
- package/dist/CanvasArea-jvwkPvtQ.cjs +0 -59
- package/dist/Layers-4G-0aNk9.cjs +0 -1
- package/dist/MarkAsGlobalBlock-S2BhHTsK.cjs +0 -1
- package/dist/Settings-SV08lVcH.cjs +0 -1
- package/dist/SidePanels-TOJotvzn.cjs +0 -1
- package/dist/Topbar-u5XKdWgQ.cjs +0 -1
- package/dist/UnsplashImages-V8oKEHfi.cjs +0 -1
- package/dist/UploadImages-eHYxwWAp.cjs +0 -1
- package/dist/html-to-json-5UoswV2Q.cjs +0 -1
- package/dist/index-IIJ_o44s.cjs +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
|
-
import B, { createElement as U, useState as b, useCallback as W, useMemo as J, useEffect as K, Suspense as
|
|
3
|
-
import { has as
|
|
2
|
+
import B, { createElement as U, useState as b, useCallback as W, useMemo as J, useEffect as K, Suspense as $ } from "react";
|
|
3
|
+
import { has as D, first as u, omit as Q, isEmpty as j, filter as v, values as y, groupBy as N, mergeWith as X, isArray as L, keys as Y, get as Z, map as A, includes as _, find as H, uniq as ee, reject as F } from "lodash-es";
|
|
4
4
|
import { useAtom as k } from "jotai";
|
|
5
5
|
import { useTranslation as G } from "react-i18next";
|
|
6
|
-
import {
|
|
6
|
+
import { P, j as w, $ as se, aw as S, aD as re, aE as te, aG as oe, i as z, a9 as M, ar as le, as as ae, at as ie, au as ne, av as E, bo as ce, bp as de, bq as me, br as pe, aI as ue, bs as xe, bt as he, B as fe, bu as ge, bv as be, bw as je, af as ve, ax as ye, ay as Be, az as C, bn as ke, bg as we, bh as Te, bi as Ce, bj as Ne, S as Ae } from "./index-niHREMmR.js";
|
|
7
7
|
import { BoxIcon as _e } from "@radix-ui/react-icons";
|
|
8
|
-
import { syncBlocksWithDefaults as
|
|
8
|
+
import { syncBlocksWithDefaults as q, useChaiBlocks as V } from "@chaibuilder/runtime";
|
|
9
9
|
import { useFeature as Pe } from "flagged";
|
|
10
10
|
import { Loader as Se } from "lucide-react";
|
|
11
|
-
import { useDrag as
|
|
12
|
-
import { g as He } from "./html-to-json-
|
|
11
|
+
import { useDrag as Ie, DragPreviewImage as Le } from "react-dnd";
|
|
12
|
+
import { g as He } from "./html-to-json-57841sEK.js";
|
|
13
13
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
14
14
|
import "@radix-ui/react-toggle";
|
|
15
15
|
import "class-variance-authority";
|
|
@@ -41,12 +41,12 @@ import "react-quill";
|
|
|
41
41
|
import "flat-to-nested";
|
|
42
42
|
import "./Functions-7jnEwJyw.js";
|
|
43
43
|
import "redux-undo";
|
|
44
|
+
import "lodash";
|
|
44
45
|
import "@react-hookz/web";
|
|
45
46
|
import "himalaya";
|
|
46
|
-
import "lodash";
|
|
47
47
|
const Fe = ({ block: s }) => {
|
|
48
|
-
const { type: r, icon: t, label: l } = s, { addCoreBlock: d, addPredefinedBlock:
|
|
49
|
-
|
|
48
|
+
const { type: r, icon: t, label: l } = s, { addCoreBlock: d, addPredefinedBlock: n } = P(), [m, o] = w(), [, x] = se(), [, p] = k(S), i = () => {
|
|
49
|
+
D(s, "blocks") ? n(q(s.blocks), u(m)) : d(s, u(m)), p("layers");
|
|
50
50
|
}, a = Pe("dnd");
|
|
51
51
|
return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs(re, { children: [
|
|
52
52
|
/* @__PURE__ */ e.jsx(te, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
@@ -55,7 +55,7 @@ const Fe = ({ block: s }) => {
|
|
|
55
55
|
onClick: i,
|
|
56
56
|
type: "button",
|
|
57
57
|
onDragStart: (f) => {
|
|
58
|
-
f.dataTransfer.setData("text/plain", JSON.stringify(
|
|
58
|
+
f.dataTransfer.setData("text/plain", JSON.stringify(Q(s, ["component", "icon"]))), setTimeout(() => {
|
|
59
59
|
o([]), x(null), p("layers");
|
|
60
60
|
}, 200);
|
|
61
61
|
},
|
|
@@ -69,9 +69,9 @@ const Fe = ({ block: s }) => {
|
|
|
69
69
|
) }),
|
|
70
70
|
/* @__PURE__ */ e.jsx(oe, { children: /* @__PURE__ */ e.jsx("p", { children: l || r }) })
|
|
71
71
|
] }) });
|
|
72
|
-
},
|
|
72
|
+
}, Ee = ({ block: s, closePopover: r }) => {
|
|
73
73
|
var a;
|
|
74
|
-
const [t, l] = b(!1), d =
|
|
74
|
+
const [t, l] = b(!1), d = z("getExternalPredefinedBlock"), { addCoreBlock: n, addPredefinedBlock: m } = P(), [o] = w(), [, x, p] = Ie(
|
|
75
75
|
() => ({
|
|
76
76
|
type: "CHAI_BLOCK",
|
|
77
77
|
item: s
|
|
@@ -79,19 +79,19 @@ const Fe = ({ block: s }) => {
|
|
|
79
79
|
[s]
|
|
80
80
|
), i = W(
|
|
81
81
|
async (f) => {
|
|
82
|
-
if (f.stopPropagation(),
|
|
83
|
-
|
|
82
|
+
if (f.stopPropagation(), D(s, "component")) {
|
|
83
|
+
n(s, u(o)), r();
|
|
84
84
|
return;
|
|
85
85
|
}
|
|
86
86
|
l(!0);
|
|
87
87
|
const h = await d(s);
|
|
88
|
-
j(h) || m(
|
|
88
|
+
j(h) || m(q(h), u(o)), r();
|
|
89
89
|
},
|
|
90
90
|
[s]
|
|
91
91
|
);
|
|
92
92
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
93
93
|
/* @__PURE__ */ e.jsx(
|
|
94
|
-
|
|
94
|
+
Le,
|
|
95
95
|
{
|
|
96
96
|
connect: p,
|
|
97
97
|
src: "https://placehold.co/100x30/000000/FFF?text=" + ((a = s.name || s.label) == null ? void 0 : a.replace(" ", "+"))
|
|
@@ -122,31 +122,31 @@ const Fe = ({ block: s }) => {
|
|
|
122
122
|
}
|
|
123
123
|
)
|
|
124
124
|
] });
|
|
125
|
-
},
|
|
126
|
-
const { data: s } =
|
|
127
|
-
if (
|
|
125
|
+
}, Re = () => {
|
|
126
|
+
const { data: s } = M(), r = V(), t = v(y(r), { category: "custom" }), l = N(t, "group"), d = N(s, "group"), n = J(() => X(l, d, (i, a) => {
|
|
127
|
+
if (L(i) && L(a))
|
|
128
128
|
return [...i, ...a];
|
|
129
|
-
}), [l, d]), [m, o] = b(u(
|
|
129
|
+
}), [l, d]), [m, o] = b(u(Y(n)) || ""), [, x] = k(S), p = Z(n, m, []);
|
|
130
130
|
return /* @__PURE__ */ e.jsxs("div", { className: "relative flex flex-col h-full max-h-full overflow-hidden py-2", children: [
|
|
131
131
|
/* @__PURE__ */ e.jsx("div", { className: "p-3 sticky top-0 flex w-full items-center", children: /* @__PURE__ */ e.jsxs(le, { value: m, onValueChange: (i) => o(i), children: [
|
|
132
132
|
/* @__PURE__ */ e.jsx(ae, { className: "w-full", children: /* @__PURE__ */ e.jsx(ie, { placeholder: "Select a provider" }) }),
|
|
133
|
-
/* @__PURE__ */ e.jsxs(
|
|
134
|
-
/* @__PURE__ */ e.jsx(
|
|
133
|
+
/* @__PURE__ */ e.jsxs(ne, { children: [
|
|
134
|
+
/* @__PURE__ */ e.jsx(E, { value: "", children: "Choose" }),
|
|
135
135
|
B.Children.toArray(
|
|
136
|
-
A(
|
|
136
|
+
A(n, (i, a) => /* @__PURE__ */ e.jsx(E, { value: a, children: a }, a))
|
|
137
137
|
)
|
|
138
138
|
] })
|
|
139
139
|
] }) }),
|
|
140
140
|
/* @__PURE__ */ e.jsx("div", { className: "h-full w-full space-y-2 overflow-y-auto px-2", children: B.Children.toArray(
|
|
141
|
-
p.map((i) => /* @__PURE__ */ e.jsx(
|
|
141
|
+
p.map((i) => /* @__PURE__ */ e.jsx(Ee, { block: i, closePopover: () => x("layers") }))
|
|
142
142
|
) })
|
|
143
143
|
] });
|
|
144
|
-
},
|
|
145
|
-
const { t: s } = G(), [r, t] = b(""), { addPredefinedBlock: l } = P(), [d] = w(), [,
|
|
144
|
+
}, De = () => {
|
|
145
|
+
const { t: s } = G(), [r, t] = b(""), { addPredefinedBlock: l } = P(), [d] = w(), [, n] = k(S), m = () => {
|
|
146
146
|
const o = He(r);
|
|
147
|
-
l([...o], u(d) || null), t(""),
|
|
147
|
+
l([...o], u(d) || null), t(""), n("layers");
|
|
148
148
|
};
|
|
149
|
-
return /* @__PURE__ */ e.jsxs(
|
|
149
|
+
return /* @__PURE__ */ e.jsxs(ce, { className: "border-border/0 p-0 shadow-none", children: [
|
|
150
150
|
/* @__PURE__ */ e.jsx(de, { className: "p-3", children: /* @__PURE__ */ e.jsx(me, { children: s("html_snippet_description") }) }),
|
|
151
151
|
/* @__PURE__ */ e.jsx(pe, { className: "space-y-2 px-3 py-0", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-1", children: [
|
|
152
152
|
/* @__PURE__ */ e.jsx(ue, { htmlFor: "current", className: "text-sm", children: s("tailwind_html_snippet") }),
|
|
@@ -169,57 +169,57 @@ const Fe = ({ block: s }) => {
|
|
|
169
169
|
/* @__PURE__ */ e.jsx(ge, { variant: "default", className: "mt-2 p-1 border-none text-gray-400", children: /* @__PURE__ */ e.jsx(be, { className: "text-xs font-normal leading-4", children: s("note_imported_html") }) })
|
|
170
170
|
] })
|
|
171
171
|
] });
|
|
172
|
-
},
|
|
172
|
+
}, R = ["ListItem", "TableHead", "TableBody", "TableRow", "TableCell", "Column"], Ge = (s, r) => {
|
|
173
173
|
if (!s)
|
|
174
|
-
return !_(
|
|
174
|
+
return !_(R, r);
|
|
175
175
|
const t = s._type;
|
|
176
|
-
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" : !_(
|
|
177
|
-
},
|
|
178
|
-
const { t: s } = G(), [r, t] = b("core"), [l, d] = b("basic"),
|
|
179
|
-
|
|
176
|
+
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" : t === "Heading" || t === "Text" ? r === "RawText" : !_(R, r);
|
|
177
|
+
}, Is = () => {
|
|
178
|
+
const { t: s } = G(), [r, t] = b("core"), [l, d] = b("basic"), n = V(), [, m] = k(je), o = z("importHTMLSupport", !0), [x] = w(), p = ve(), i = H(p, { _id: u(x) }), { data: a, isLoading: f } = M(), h = N(
|
|
179
|
+
v(n, (c) => Ge(i, c.type)),
|
|
180
180
|
"category"
|
|
181
181
|
), g = ee(A(h.core, "group"));
|
|
182
182
|
K(() => {
|
|
183
183
|
!_(g, l) && !j(g) && !j(l) && d(u(g));
|
|
184
184
|
}, [g, l]);
|
|
185
|
-
const
|
|
185
|
+
const O = (c) => d((T) => T === c ? "" : c), I = !f && !j(a) || H(y(n), { category: "custom" }) !== void 0;
|
|
186
186
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex h-full flex-col overflow-hidden", children: [
|
|
187
187
|
/* @__PURE__ */ e.jsxs("div", { className: "mb-2 flex flex-col justify-between rounded-md bg-background/30 p-1", children: [
|
|
188
188
|
/* @__PURE__ */ e.jsx("h1", { className: "flex flex-col items-baseline px-1 text-xl font-semibold xl:flex-col", children: s("add_block") }),
|
|
189
189
|
/* @__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") })
|
|
190
190
|
] }),
|
|
191
191
|
/* @__PURE__ */ e.jsx(
|
|
192
|
-
|
|
192
|
+
ye,
|
|
193
193
|
{
|
|
194
|
-
onValueChange: (
|
|
195
|
-
m(""), t(
|
|
194
|
+
onValueChange: (c) => {
|
|
195
|
+
m(""), t(c);
|
|
196
196
|
},
|
|
197
197
|
value: r,
|
|
198
198
|
className: "h-max",
|
|
199
|
-
children: /* @__PURE__ */ e.jsxs(Be, { className: "grid w-full " + (
|
|
200
|
-
/* @__PURE__ */ e.jsx(
|
|
201
|
-
|
|
202
|
-
o ? /* @__PURE__ */ e.jsx(
|
|
199
|
+
children: /* @__PURE__ */ e.jsxs(Be, { className: "grid w-full " + (I && o ? "grid-cols-3" : "grid-cols-2"), children: [
|
|
200
|
+
/* @__PURE__ */ e.jsx(C, { value: "core", children: s("core") }),
|
|
201
|
+
I ? /* @__PURE__ */ e.jsx(C, { value: "ui-blocks", children: s("custom_blocks") }) : null,
|
|
202
|
+
o ? /* @__PURE__ */ e.jsx(C, { value: "html", children: s("import") }) : null
|
|
203
203
|
] })
|
|
204
204
|
}
|
|
205
205
|
),
|
|
206
206
|
r === "core" && /* @__PURE__ */ e.jsx(ke, { className: "-mx-1.5 h-full", children: /* @__PURE__ */ e.jsx(we, { type: "single", value: l, className: "w-full px-3", children: B.Children.toArray(
|
|
207
207
|
A(
|
|
208
208
|
g,
|
|
209
|
-
(
|
|
209
|
+
(c) => F(v(y(h.core), { group: c }), {
|
|
210
210
|
hidden: !0
|
|
211
|
-
}).length ? /* @__PURE__ */ e.jsxs(
|
|
212
|
-
/* @__PURE__ */ e.jsx(
|
|
213
|
-
/* @__PURE__ */ e.jsx(
|
|
214
|
-
F(y(
|
|
211
|
+
}).length ? /* @__PURE__ */ e.jsxs(Te, { value: c, className: "border-border", children: [
|
|
212
|
+
/* @__PURE__ */ e.jsx(Ce, { onClick: () => O(c), className: "py-2 capitalize", children: c }),
|
|
213
|
+
/* @__PURE__ */ e.jsx(Ne, { children: /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-3 gap-2", children: B.Children.toArray(
|
|
214
|
+
F(v(y(h.core), { group: c }), { hidden: !0 }).map((T) => /* @__PURE__ */ e.jsx(Fe, { block: T }))
|
|
215
215
|
) }) })
|
|
216
216
|
] }) : null
|
|
217
217
|
)
|
|
218
218
|
) }) }),
|
|
219
|
-
r === "ui-blocks" && /* @__PURE__ */ e.jsx(
|
|
220
|
-
r === "html" && o ? /* @__PURE__ */ e.jsx(
|
|
219
|
+
r === "ui-blocks" && /* @__PURE__ */ e.jsx($, { fallback: /* @__PURE__ */ e.jsx(Ae, { className: "h-32 w-full" }), children: /* @__PURE__ */ e.jsx(Re, {}) }),
|
|
220
|
+
r === "html" && o ? /* @__PURE__ */ e.jsx(De, {}) : null
|
|
221
221
|
] });
|
|
222
222
|
};
|
|
223
223
|
export {
|
|
224
|
-
|
|
224
|
+
Is as default
|
|
225
225
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),a=require("react"),t=require("lodash-es"),R=require("jotai"),q=require("react-i18next"),s=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),a=require("react"),t=require("lodash-es"),R=require("jotai"),q=require("react-i18next"),s=require("./index-H6vIwGfD.cjs"),C=require("@radix-ui/react-icons"),b=require("@chaibuilder/runtime"),w=require("flagged"),N=require("lucide-react"),B=require("react-dnd"),A=require("./html-to-json-2PeOCVey.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-PTxFk6qT.cjs");require("./MODIFIERS-2FeVfZQ9.cjs");require("clsx");require("tailwind-merge");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-scroll-area");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-dom");require("react-quill");require("flat-to-nested");require("./Functions-N3yhPYKY.cjs");require("redux-undo");require("lodash");require("@react-hookz/web");require("himalaya");const S=({block:r})=>{const{type:o,icon:i,label:n}=r,{addCoreBlock:m,addPredefinedBlock:d}=s.useAddBlock(),[p,l]=s.useSelectedBlockIds(),[,h]=s.useHighlightBlockId(),[,j]=R.useAtom(s.activePanelAtom),u=()=>{t.has(r,"blocks")?d(b.syncBlocksWithDefaults(r.blocks),t.first(p)):m(r,t.first(p)),j("layers")},c=w.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:u,type:"button",onDragStart:g=>{g.dataTransfer.setData("text/plain",JSON.stringify(t.omit(r,["component","icon"]))),setTimeout(()=>{l([]),h(null),j("layers")},200)},draggable:c?"true":"false",className:"space-y-2 rounded-lg border border-border p-3 text-center hover:bg-slate-300/50 "+(c?"cursor-grab":"cursor-pointer"),children:[a.createElement(i||C.BoxIcon,{className:"w-4 h-4 mx-auto"}),e.jsxRuntimeExports.jsx("p",{className:"truncate text-xs",children:n||o})]})}),e.jsxRuntimeExports.jsx(s.TooltipContent,{children:e.jsxRuntimeExports.jsx("p",{children:n||o})})]})})},I=({block:r,closePopover:o})=>{var c;const[i,n]=a.useState(!1),m=s.useBuilderProp("getExternalPredefinedBlock"),{addCoreBlock:d,addPredefinedBlock:p}=s.useAddBlock(),[l]=s.useSelectedBlockIds(),[,h,j]=B.useDrag(()=>({type:"CHAI_BLOCK",item:r}),[r]),u=a.useCallback(async g=>{if(g.stopPropagation(),t.has(r,"component")){d(r,t.first(l)),o();return}n(!0);const f=await m(r);t.isEmpty(f)||p(b.syncBlocksWithDefaults(f),t.first(l)),o()},[r]);return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(B.DragPreviewImage,{connect:j,src:"https://placehold.co/100x30/000000/FFF?text="+((c=r.name||r.label)==null?void 0:c.replace(" ","+"))}),e.jsxRuntimeExports.jsxs("div",{ref:h,onClick:i?()=>{}:u,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:[i&&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})})]})]})},P=()=>{const{data:r}=s.useUILibraryBlocks(),o=b.useChaiBlocks(),i=t.filter(t.values(o),{category:"custom"}),n=t.groupBy(i,"group"),m=t.groupBy(r,"group"),d=a.useMemo(()=>t.mergeWith(n,m,(u,c)=>{if(t.isArray(u)&&t.isArray(c))return[...u,...c]}),[n,m]),[p,l]=a.useState(t.first(t.keys(d))||""),[,h]=R.useAtom(s.activePanelAtom),j=t.get(d,p,[]);return e.jsxRuntimeExports.jsxs("div",{className:"relative flex flex-col h-full max-h-full overflow-hidden py-2",children:[e.jsxRuntimeExports.jsx("div",{className:"p-3 sticky top-0 flex w-full items-center",children:e.jsxRuntimeExports.jsxs(s.Select,{value:p,onValueChange:u=>l(u),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"}),a.Children.toArray(t.map(d,(u,c)=>e.jsxRuntimeExports.jsx(s.SelectItem,{value:c,children:c},c)))]})]})}),e.jsxRuntimeExports.jsx("div",{className:"h-full w-full space-y-2 overflow-y-auto px-2",children:a.Children.toArray(j.map(u=>e.jsxRuntimeExports.jsx(I,{block:u,closePopover:()=>h("layers")})))})]})},_=()=>{const{t:r}=q.useTranslation(),[o,i]=a.useState(""),{addPredefinedBlock:n}=s.useAddBlock(),[m]=s.useSelectedBlockIds(),[,d]=R.useAtom(s.activePanelAtom),p=()=>{const l=A.getBlocksFromHTML(o);n([...l],t.first(m)||null),i(""),d("layers")};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:l=>l&&l.focus(),onChange:l=>i(l.target.value),rows:12,value:o,placeholder:r("enter_code_snippet"),className:"resize-none bg-gray-100 overflow-x-auto whitespace-pre text-xs font-mono font-normal"})]})}),e.jsxRuntimeExports.jsxs(s.CardFooter,{className:"flex flex-col justify-end p-3",children:[e.jsxRuntimeExports.jsx(s.Button,{disabled:o.trim()==="",onClick:()=>p(),size:"sm",className:"w-full",children:r("import_html")}),e.jsxRuntimeExports.jsx(s.Alert,{variant:"default",className:"mt-2 p-1 border-none text-gray-400",children:e.jsxRuntimeExports.jsx(s.AlertTitle,{className:"text-xs font-normal leading-4",children:r("note_imported_html")})})]})]})},k=["ListItem","TableHead","TableBody","TableRow","TableCell","Column"],L=(r,o)=>{if(!r)return!t.includes(k,o);const i=r._type;return i==="List"?o==="ListItem":i==="Table"?o==="TableHead"||o==="TableBody":i==="TableHead"||i==="TableBody"?o==="TableRow":i==="TableRow"?o==="TableCell":i==="Row"?o==="Column":i==="Heading"||i==="Text"?o==="RawText":!t.includes(k,o)},H=()=>{const{t:r}=q.useTranslation(),[o,i]=a.useState("core"),[n,m]=a.useState("basic"),d=b.useChaiBlocks(),[,p]=R.useAtom(s.showPredefinedBlockCategoryAtom),l=s.useBuilderProp("importHTMLSupport",!0),[h]=s.useSelectedBlockIds(),j=s.useAllBlocks(),u=t.find(j,{_id:t.first(h)}),{data:c,isLoading:g}=s.useUILibraryBlocks(),f=t.groupBy(t.filter(d,x=>L(u,x.type)),"category"),E=t.uniq(t.map(f.core,"group"));a.useEffect(()=>{!t.includes(E,n)&&!t.isEmpty(E)&&!t.isEmpty(n)&&m(t.first(E))},[E,n]);const T=x=>m(y=>y===x?"":x),v=!g&&!t.isEmpty(c)||t.find(t.values(d),{category:"custom"})!==void 0;return e.jsxRuntimeExports.jsxs("div",{className:"flex h-full 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(o==="html"?"enter_paste_tailwind_html":"click_to_add_block")})]}),e.jsxRuntimeExports.jsx(s.Tabs,{onValueChange:x=>{p(""),i(x)},value:o,className:"h-max",children:e.jsxRuntimeExports.jsxs(s.TabsList,{className:"grid w-full "+(v&&l?"grid-cols-3":"grid-cols-2"),children:[e.jsxRuntimeExports.jsx(s.TabsTrigger,{value:"core",children:r("core")}),v?e.jsxRuntimeExports.jsx(s.TabsTrigger,{value:"ui-blocks",children:r("custom_blocks")}):null,l?e.jsxRuntimeExports.jsx(s.TabsTrigger,{value:"html",children:r("import")}):null]})}),o==="core"&&e.jsxRuntimeExports.jsx(s.ScrollArea,{className:"-mx-1.5 h-full",children:e.jsxRuntimeExports.jsx(s.Accordion,{type:"single",value:n,className:"w-full px-3",children:a.Children.toArray(t.map(E,x=>t.reject(t.filter(t.values(f.core),{group:x}),{hidden:!0}).length?e.jsxRuntimeExports.jsxs(s.AccordionItem,{value:x,className:"border-border",children:[e.jsxRuntimeExports.jsx(s.AccordionTrigger,{onClick:()=>T(x),className:"py-2 capitalize",children:x}),e.jsxRuntimeExports.jsx(s.AccordionContent,{children:e.jsxRuntimeExports.jsx("div",{className:"grid grid-cols-3 gap-2",children:a.Children.toArray(t.reject(t.filter(t.values(f.core),{group:x}),{hidden:!0}).map(y=>e.jsxRuntimeExports.jsx(S,{block:y})))})})]}):null))})}),o==="ui-blocks"&&e.jsxRuntimeExports.jsx(a.Suspense,{fallback:e.jsxRuntimeExports.jsx(s.Skeleton,{className:"h-32 w-full"}),children:e.jsxRuntimeExports.jsx(P,{})}),o==="html"&&l?e.jsxRuntimeExports.jsx(_,{}):null]})};exports.default=H;
|
|
@@ -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("./index-H6vIwGfD.cjs"),r=require("./controls-Dy1qa8Dc.cjs"),m=require("lodash-es");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-PTxFk6qT.cjs");require("./MODIFIERS-2FeVfZQ9.cjs");require("clsx");require("tailwind-merge");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-scroll-area");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-dom");require("react-quill");require("jotai");require("flat-to-nested");require("./Functions-N3yhPYKY.cjs");require("redux-undo");require("@chaibuilder/runtime");require("lodash");require("@react-hookz/web");require("react-i18next");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 x=N(B),k=({value:t,onChange:e,id:i,onBlur:l})=>{const n=m.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})})})},f=[{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",async()=>{}),[e,i]=p.useBrandingOptions(),[l]=p.useBlocksContainer(),n=x.useRef(e);x.useEffect(()=>()=>{m.isEqual(e,n.current)||t(n.current)},[]);const v=({formData:o},d)=>{d&&(i(o),n.current=o)},{bodyFont:u,headingFont:q,primaryColor:y,bodyTextDarkColor:b,bodyTextLightColor:h,bodyBgDarkColor:S,secondaryColor:C,bodyBgLightColor:O,roundedCorners:j}=e;let s={headingFont:r.f({title:"Heading font",default:q,options:f}),bodyFont:r.f({title:"Body font",default:u,options:f}),roundedCorners:r.c({title:"Rounded Corner",default:parseInt(j||5,10)}),primaryColor:r.y({title:"Primary",default:y}),secondaryColor:r.y({title:"Secondary",default:C})};l||(s={...s,bodyBgLightColor:r.y({title:"Body Background (Light)",default:O}),bodyBgDarkColor:r.y({title:"Body Background (Dark)",default:S}),bodyTextLightColor:r.y({title:"Body Text (Light)",default:b}),bodyTextDarkColor:r.y({title:"Body Text (Dark)",default:h})});const c={type:"object",properties:{}},g={};return Object.keys(s).forEach(o=>{const d=s[o];return c.properties||(c.properties={}),c.properties[o]=d.schema,g[o]=d.uiSchema,!0}),a.jsxRuntimeExports.jsxs("div",{className:"flex h-full 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:c,formData:e,validator:R,onChange:v})})]})};exports.default=P;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { j as t } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
2
|
import * as c from "react";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { i as
|
|
6
|
-
import { f
|
|
7
|
-
import { debounce as
|
|
3
|
+
import N from "@rjsf/validator-ajv8";
|
|
4
|
+
import j from "@rjsf/core";
|
|
5
|
+
import { i as k, x as D, y as P } from "./index-niHREMmR.js";
|
|
6
|
+
import { f, c as R, y as a } from "./controls-XPXGHKht.js";
|
|
7
|
+
import { debounce as w, isEqual as L } from "lodash-es";
|
|
8
8
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
9
9
|
import "@radix-ui/react-toggle";
|
|
10
10
|
import "class-variance-authority";
|
|
@@ -39,21 +39,22 @@ import "flat-to-nested";
|
|
|
39
39
|
import "./Functions-7jnEwJyw.js";
|
|
40
40
|
import "redux-undo";
|
|
41
41
|
import "@chaibuilder/runtime";
|
|
42
|
+
import "lodash";
|
|
42
43
|
import "@react-hookz/web";
|
|
43
44
|
import "react-i18next";
|
|
44
|
-
const
|
|
45
|
-
const
|
|
45
|
+
const F = ({ value: u, onChange: e, id: p, onBlur: d }) => {
|
|
46
|
+
const i = w(e, 200), m = (l) => i(l.target.value);
|
|
46
47
|
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(
|
|
47
48
|
"input",
|
|
48
49
|
{
|
|
49
50
|
type: "color",
|
|
50
51
|
className: "text-xs p-0",
|
|
51
|
-
value:
|
|
52
|
-
onBlur: ({ target: { value: l } }) =>
|
|
53
|
-
onChange:
|
|
52
|
+
value: u,
|
|
53
|
+
onBlur: ({ target: { value: l } }) => d(p, l),
|
|
54
|
+
onChange: m
|
|
54
55
|
}
|
|
55
56
|
) }) });
|
|
56
|
-
},
|
|
57
|
+
}, g = [
|
|
57
58
|
{ title: "Roboto", value: "Roboto" },
|
|
58
59
|
{ title: "Open Sans", value: "Open Sans" },
|
|
59
60
|
{ title: "Montserrat", value: "Montserrat" },
|
|
@@ -103,48 +104,52 @@ const w = ({ value: s, onChange: e, id: u, onBlur: i }) => {
|
|
|
103
104
|
{ title: "Lustria", value: "Lustria" },
|
|
104
105
|
{ title: "Ovo", value: "Ovo" },
|
|
105
106
|
{ title: "Suranna", value: "Suranna" }
|
|
106
|
-
],
|
|
107
|
-
const
|
|
108
|
-
}), [e,
|
|
107
|
+
], Bt = () => {
|
|
108
|
+
const u = k("onSaveBrandingOptions", async () => {
|
|
109
|
+
}), [e, p] = D(), [d] = P(), i = c.useRef(e);
|
|
109
110
|
c.useEffect(() => () => {
|
|
110
|
-
|
|
111
|
+
L(e, i.current) || u(i.current);
|
|
111
112
|
}, []);
|
|
112
|
-
const
|
|
113
|
-
|
|
113
|
+
const m = ({ formData: o }, s) => {
|
|
114
|
+
s && (p(o), i.current = o);
|
|
114
115
|
}, {
|
|
115
|
-
bodyFont:
|
|
116
|
-
headingFont:
|
|
117
|
-
primaryColor:
|
|
116
|
+
bodyFont: l,
|
|
117
|
+
headingFont: h,
|
|
118
|
+
primaryColor: y,
|
|
118
119
|
bodyTextDarkColor: x,
|
|
119
|
-
bodyTextLightColor:
|
|
120
|
-
bodyBgDarkColor:
|
|
121
|
-
secondaryColor:
|
|
122
|
-
bodyBgLightColor:
|
|
123
|
-
roundedCorners:
|
|
124
|
-
} = e
|
|
125
|
-
|
|
120
|
+
bodyTextLightColor: b,
|
|
121
|
+
bodyBgDarkColor: C,
|
|
122
|
+
secondaryColor: S,
|
|
123
|
+
bodyBgLightColor: B,
|
|
124
|
+
roundedCorners: O
|
|
125
|
+
} = e;
|
|
126
|
+
let r = {
|
|
127
|
+
headingFont: f({
|
|
126
128
|
title: "Heading font",
|
|
127
|
-
default:
|
|
128
|
-
options:
|
|
129
|
+
default: h,
|
|
130
|
+
options: g
|
|
129
131
|
}),
|
|
130
|
-
bodyFont:
|
|
132
|
+
bodyFont: f({
|
|
131
133
|
title: "Body font",
|
|
132
|
-
default:
|
|
133
|
-
options:
|
|
134
|
+
default: l,
|
|
135
|
+
options: g
|
|
134
136
|
}),
|
|
135
|
-
roundedCorners:
|
|
137
|
+
roundedCorners: R({
|
|
136
138
|
title: "Rounded Corner",
|
|
137
|
-
default: parseInt(
|
|
139
|
+
default: parseInt(O || 5, 10)
|
|
138
140
|
}),
|
|
139
|
-
primaryColor: a({ title: "Primary", default:
|
|
140
|
-
secondaryColor: a({ title: "Secondary", default:
|
|
141
|
+
primaryColor: a({ title: "Primary", default: y }),
|
|
142
|
+
secondaryColor: a({ title: "Secondary", default: S })
|
|
143
|
+
};
|
|
144
|
+
d || (r = {
|
|
145
|
+
...r,
|
|
141
146
|
bodyBgLightColor: a({
|
|
142
147
|
title: "Body Background (Light)",
|
|
143
|
-
default:
|
|
148
|
+
default: B
|
|
144
149
|
}),
|
|
145
150
|
bodyBgDarkColor: a({
|
|
146
151
|
title: "Body Background (Dark)",
|
|
147
|
-
default:
|
|
152
|
+
default: C
|
|
148
153
|
}),
|
|
149
154
|
bodyTextLightColor: a({
|
|
150
155
|
title: "Body Text (Light)",
|
|
@@ -152,23 +157,23 @@ const w = ({ value: s, onChange: e, id: u, onBlur: i }) => {
|
|
|
152
157
|
}),
|
|
153
158
|
bodyTextDarkColor: a({
|
|
154
159
|
title: "Body Text (Dark)",
|
|
155
|
-
default:
|
|
160
|
+
default: b
|
|
156
161
|
})
|
|
157
|
-
|
|
158
|
-
|
|
162
|
+
});
|
|
163
|
+
const n = {
|
|
159
164
|
type: "object",
|
|
160
165
|
properties: {}
|
|
161
166
|
}, v = {};
|
|
162
|
-
return Object.keys(
|
|
163
|
-
const
|
|
164
|
-
return
|
|
167
|
+
return Object.keys(r).forEach((o) => {
|
|
168
|
+
const s = r[o];
|
|
169
|
+
return n.properties || (n.properties = {}), n.properties[o] = s.schema, v[o] = s.uiSchema, !0;
|
|
165
170
|
}), /* @__PURE__ */ t.jsxs("div", { className: "flex h-full select-none flex-col", children: [
|
|
166
171
|
/* @__PURE__ */ t.jsx("div", { className: "rounded-md bg-background/30 p-1", children: /* @__PURE__ */ t.jsx("h1", { className: "px-1 font-semibold", children: "Branding Options" }) }),
|
|
167
172
|
/* @__PURE__ */ t.jsx("div", { className: "-mx-2", children: /* @__PURE__ */ t.jsx(
|
|
168
|
-
|
|
173
|
+
j,
|
|
169
174
|
{
|
|
170
175
|
widgets: {
|
|
171
|
-
color:
|
|
176
|
+
color: F
|
|
172
177
|
},
|
|
173
178
|
idSeparator: ".",
|
|
174
179
|
autoComplete: "off",
|
|
@@ -176,14 +181,14 @@ const w = ({ value: s, onChange: e, id: u, onBlur: i }) => {
|
|
|
176
181
|
liveOmit: !0,
|
|
177
182
|
liveValidate: !0,
|
|
178
183
|
uiSchema: v,
|
|
179
|
-
schema:
|
|
184
|
+
schema: n,
|
|
180
185
|
formData: e,
|
|
181
|
-
validator:
|
|
182
|
-
onChange:
|
|
186
|
+
validator: N,
|
|
187
|
+
onChange: m
|
|
183
188
|
}
|
|
184
189
|
) })
|
|
185
190
|
] });
|
|
186
191
|
};
|
|
187
192
|
export {
|
|
188
|
-
|
|
193
|
+
Bt as default
|
|
189
194
|
};
|