@chaibuilder/sdk 1.2.25 → 1.2.27
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-S-4jzdWv.cjs +1 -0
- package/dist/AddBlocks-ksZjjn0k.js +205 -0
- package/dist/BrandingOptions-EMCT0Wa3.cjs +1 -0
- package/dist/{BrandingOptions-iTyWpwTs.js → BrandingOptions-T_kbQFQv.js} +53 -40
- package/dist/CanvasArea-SDzbubar.cjs +55 -0
- package/dist/{CanvasArea-dZjng782.js → CanvasArea-rhOeubmu.js} +323 -340
- package/dist/{Class-ahc3NIbq.js → Class-3k8xjeiM.js} +29 -26
- package/dist/Class-MmCxz2Ay.cjs +1 -0
- package/dist/{CurrentPage-Kmfp-kFk.js → CurrentPage-0eeU1V_c.js} +53 -40
- package/dist/CurrentPage-aTjWjc3o.cjs +1 -0
- package/dist/Functions-7jnEwJyw.js +15 -0
- package/dist/Functions-N3yhPYKY.cjs +1 -0
- package/dist/{ListTree-N3jeD790.js → ListTree-Muu4rAtp.js} +96 -87
- package/dist/ListTree-SWsqdfcG.cjs +1 -0
- package/dist/MODIFIERS-9EwxLM8V.cjs +1 -0
- package/dist/{MODIFIERS-CNqNUapY.js → MODIFIERS-WQdaNvb8.js} +8 -10
- package/dist/PagesPanel-n3x-0ozR.cjs +1 -0
- package/dist/{PagesPanel-u1IB-nRr.js → PagesPanel-rYN28QpN.js} +44 -29
- package/dist/ProjectPanel-ivFOhdcz.js +84 -0
- package/dist/ProjectPanel-pBePMOta.cjs +1 -0
- package/dist/Settings-JRyJayf5.cjs +1 -0
- package/dist/{Settings-jCcd-VE6.js → Settings-XWmKzRl9.js} +400 -407
- package/dist/SidePanels-BtUeo6M9.cjs +1 -0
- package/dist/{SidePanels-pHMYprpW.js → SidePanels-ODktnGbC.js} +117 -108
- package/dist/Topbar-QMeD3hvq.cjs +1 -0
- package/dist/Topbar-Yunooh00.js +131 -0
- package/dist/UnsplashImages-05JR8oIu.cjs +1 -0
- package/dist/{UnsplashImages-L7x_3RQf.js → UnsplashImages-QMl0bxix.js} +59 -47
- package/dist/UploadImages-OgSN1HVt.cjs +1 -0
- package/dist/{UploadImages-zdEJRLD8.js → UploadImages-Si-A26bc.js} +58 -36
- package/dist/_commonjsHelpers-UyOWmZb0.js +8 -0
- package/dist/_commonjsHelpers-wDK0ZLPo.cjs +1 -0
- package/dist/add-page-modal-9pTKItY-.cjs +1 -0
- package/dist/add-page-modal-U7AUUrI1.js +103 -0
- package/dist/confirm-alert-DhRc-Zcd.cjs +1 -0
- package/dist/confirm-alert-kV5-c70T.js +59 -0
- package/dist/controls-KK2oLIa8.cjs +1 -0
- package/dist/{controls-IS5qnRce.js → controls-OfJWSEqC.js} +85 -20
- package/dist/core.cjs +1 -1
- package/dist/core.js +74 -150
- package/dist/defaultTheme-7Lk2zq60.cjs +1 -0
- package/dist/{defaultTheme-4kA60XdB.js → defaultTheme-gunU_Fe5.js} +8 -6
- package/dist/delete-page-modal-4s-6AIy4.cjs +1 -0
- package/dist/delete-page-modal-UCBpdjLe.js +82 -0
- package/dist/email-blocks.cjs +1 -1
- package/dist/email-blocks.js +292 -3
- package/dist/email.cjs +1 -1
- package/dist/email.js +36 -18
- package/dist/empty-slot-ZBlsQi6m.js +15 -0
- package/dist/empty-slot-nzYOgZuS.cjs +1 -0
- package/dist/form-Ap63cNec.cjs +1 -0
- package/dist/{form-0_RLz2TB.js → form-zmlTjM9j.js} +12 -12
- package/dist/html-to-json-C_Eobs_d.cjs +1 -0
- package/dist/{html-to-json-2xtb7520.js → html-to-json-p__Fgqdg.js} +65 -40
- package/dist/index-CFUoB97-.js +3079 -0
- package/dist/index-F4AQQ6qq.cjs +1 -0
- package/dist/index-Qk028f-N.cjs +1 -0
- package/dist/index-YpnaudSM.js +63 -0
- package/dist/index-e0c8PmRQ.js +205 -0
- package/dist/index-ecnGWzh9.cjs +1 -0
- package/dist/index-f0AbmoYY.js +2201 -0
- package/dist/index-gi1LIOCw.cjs +1 -0
- package/dist/index-l19JVVXI.cjs +206 -0
- package/dist/index-lOJfSheQ.js +39503 -0
- package/dist/{jsx-runtime-Sp0orL4X.js → jsx-runtime-WbnYoNE9.js} +109 -106
- package/dist/jsx-runtime-Z_BpKhVy.cjs +27 -0
- package/dist/lib.cjs +3 -3
- package/dist/lib.js +59 -56
- package/dist/page-viewer-YFrIG3L7.cjs +1 -0
- package/dist/{page-viewer-NnOwmAmu.js → page-viewer-jOwy--9A.js} +56 -43
- package/dist/{project-general-setting-9ju3TDju.js → project-general-setting-3N8HZ2fe.js} +42 -35
- package/dist/project-general-setting-hK7I7FuN.cjs +1 -0
- package/dist/{project-seo-setting-36CdUszM.js → project-seo-setting-bSiNgO_1.js} +39 -23
- package/dist/project-seo-setting-x-FK0pez.cjs +1 -0
- package/dist/render.cjs +1 -1
- package/dist/render.js +16 -16
- package/dist/{single-page-detail-hD1jKZ8k.js → single-page-detail--AZlZ-pC.js} +73 -66
- package/dist/single-page-detail-9abF2g2R.cjs +1 -0
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +39 -24
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +158 -364
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.js +1052 -3
- package/package.json +1 -1
- package/dist/AddBlocks-Ol3iIVKa.js +0 -207
- package/dist/AddBlocks-a1c-7Ewz.cjs +0 -1
- package/dist/BrandingOptions-6rnt0UaA.cjs +0 -1
- package/dist/CanvasArea-R4ogF9AT.cjs +0 -55
- package/dist/ChaiBuilderEditor-m30yoOgJ.cjs +0 -163
- package/dist/ChaiBuilderEditor-vP4at00I.js +0 -27974
- package/dist/Class-eieto7e-.cjs +0 -1
- package/dist/Controls-3Cc1XYXg.js +0 -105
- package/dist/Controls-ky25Ebo3.cjs +0 -1
- package/dist/CurrentPage-3gQTH0Zt.cjs +0 -1
- package/dist/Functions-Hvon6AMZ.cjs +0 -1
- package/dist/Functions-NzT2Six_.js +0 -15
- package/dist/ImagesPanel-J1RlG7xG.cjs +0 -1
- package/dist/ImagesPanel-Wb0GF_NA.js +0 -29
- package/dist/ListTree-CZ-mtjZ9.cjs +0 -1
- package/dist/MODIFIERS-o1p3VnpS.cjs +0 -1
- package/dist/PagesPanel-Gi0z6gaf.cjs +0 -1
- package/dist/ProjectPanel-EydGZmMW.js +0 -71
- package/dist/ProjectPanel-kiiljG4H.cjs +0 -1
- package/dist/STRINGS-b432aBJJ.js +0 -7
- package/dist/STRINGS-gPz7CUOk.cjs +0 -1
- package/dist/Settings-8ilCSH8b.cjs +0 -1
- package/dist/SidePanels-T36C6Lhc.cjs +0 -1
- package/dist/Topbar-CvWQuspR.cjs +0 -1
- package/dist/Topbar-pbIDUE_B.js +0 -122
- package/dist/UnsplashImages-KBZPd9dv.cjs +0 -1
- package/dist/UploadImages-GkkJVAgG.cjs +0 -1
- package/dist/accordion-oPUeqPCZ.js +0 -42
- package/dist/accordion-ynvFtV_p.cjs +0 -1
- package/dist/add-page-modal-9SGv2hgc.cjs +0 -1
- package/dist/add-page-modal-JCDXZIPW.js +0 -95
- package/dist/alert-dialog-P9xMMB6C.cjs +0 -1
- package/dist/alert-dialog-rypfO5ly.js +0 -64
- package/dist/badge-E-S7CqUt.cjs +0 -1
- package/dist/badge-tEwO7C51.js +0 -23
- package/dist/block-helpers-OKHmRRol.cjs +0 -1
- package/dist/block-helpers-oSFpSsGz.js +0 -23
- package/dist/command-BxR6jaCI.cjs +0 -1
- package/dist/command-Pn3HKDuV.js +0 -97
- package/dist/confirm-alert-uNm0lZ0y.cjs +0 -1
- package/dist/confirm-alert-wR5_VJ1l.js +0 -36
- package/dist/context-menu-8dC9uGXj.js +0 -122
- package/dist/context-menu-IgLbIuth.cjs +0 -1
- package/dist/controls-L7DPvB0m.cjs +0 -1
- package/dist/defaultTheme-mrkeGFGI.cjs +0 -1
- package/dist/delete-page-modal-7KmP1elv.js +0 -67
- package/dist/delete-page-modal-SgfwvfNu.cjs +0 -1
- package/dist/dropdown-menu-El86_9Uo.js +0 -124
- package/dist/dropdown-menu-SiHzqWwZ.cjs +0 -1
- package/dist/form-W58AVUdf.cjs +0 -1
- package/dist/hover-card-KUwpDkW8.cjs +0 -1
- package/dist/hover-card-q138xxXR.js +0 -45
- package/dist/html-to-json-uSnxl72F.cjs +0 -1
- package/dist/iconBase-gbUAAO2L.cjs +0 -1
- package/dist/iconBase-h4DuR_XT.js +0 -63
- package/dist/index-9MmykVSc.cjs +0 -1
- package/dist/index-hElOGcFr.js +0 -2200
- package/dist/index-lDTsQp7h.js +0 -188
- package/dist/index-rq5Y9ZDy.cjs +0 -1
- package/dist/jsx-runtime-JYMCiFoE.cjs +0 -27
- package/dist/label-KaP7MRrs.js +0 -10
- package/dist/label-tFm8HZdb.cjs +0 -1
- package/dist/link-WbcKdQ9k.cjs +0 -1
- package/dist/link-xuhP-4dN.js +0 -196
- package/dist/page-viewer-Hx5hxHKm.cjs +0 -1
- package/dist/popover-a84pbVhQ.js +0 -23
- package/dist/popover-fKjgcRUx.cjs +0 -1
- package/dist/project-general-setting-FxkwjvJz.cjs +0 -1
- package/dist/project-seo-setting-RU7qiXxb.cjs +0 -1
- package/dist/scroll-area-FiHvy-TZ.cjs +0 -1
- package/dist/scroll-area-ewXbxc3n.js +0 -30
- package/dist/select-7bjg-rr9.cjs +0 -1
- package/dist/select-POGdEDHT.js +0 -75
- package/dist/separator-3Civ-6hb.cjs +0 -1
- package/dist/separator-SctTn0Qi.js +0 -18
- package/dist/single-page-detail-beY0MT1b.cjs +0 -1
- package/dist/skeleton-STeL9VrJ.cjs +0 -1
- package/dist/skeleton-lu8e7q2y.js +0 -239
- package/dist/tabs-_4WbA1cc.cjs +0 -1
- package/dist/tabs-yQ3oGziM.js +0 -106
- package/dist/textarea-1kZEh7ki.cjs +0 -1
- package/dist/textarea-b2QvVhrK.js +0 -73
- package/dist/useAddBlock-8pxOEYIl.cjs +0 -1
- package/dist/useAddBlock-FEKFJNwQ.js +0 -69
- package/dist/useChaiExternalData-fkFgoS80.js +0 -6
- package/dist/useChaiExternalData-rwoAZ6uU.cjs +0 -1
- package/dist/useDarkMode-7i57segK.cjs +0 -1
- package/dist/useDarkMode-8VHJlYyE.js +0 -23
- package/dist/useSelectedBreakpoints-6NK5qd7T.js +0 -10
- package/dist/useSelectedBreakpoints-7ONXb-vN.cjs +0 -1
- package/dist/useStylingState-Iuj84yvc.js +0 -186
- package/dist/useStylingState-OIvJMV6p.cjs +0 -1
- package/dist/useUiLibraries-nCdauJ4N.cjs +0 -1
- package/dist/useUiLibraries-psyWFbNc.js +0 -12
- package/dist/useUpdateBlocksProps-Unn8lUyj.cjs +0 -1
- package/dist/useUpdateBlocksProps-vWcDp-P9.js +0 -23
- package/dist/utils-dze1SGvB.js +0 -6
- package/dist/utils-qK_SjzzV.cjs +0 -1
package/dist/lib.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
import {
|
|
3
|
-
import { g as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { d as h,
|
|
7
|
-
import { tailwindcssPaletteGenerator as
|
|
8
|
-
import { createTailwindcss as
|
|
9
|
-
import
|
|
1
|
+
import { c as _ } from "./Class-3k8xjeiM.js";
|
|
2
|
+
import { a as ce } from "./Class-3k8xjeiM.js";
|
|
3
|
+
import { g as oe, a as le } from "./Functions-7jnEwJyw.js";
|
|
4
|
+
import { g as xe } from "./html-to-json-p__Fgqdg.js";
|
|
5
|
+
import { first as F, includes as l, keys as d, map as T, parseInt as $, get as p, set as b, startsWith as k, replace as O } from "lodash-es";
|
|
6
|
+
import { d as h, a as C, g as I } from "./defaultTheme-gunU_Fe5.js";
|
|
7
|
+
import { tailwindcssPaletteGenerator as E } from "@bobthered/tailwindcss-palette-generator";
|
|
8
|
+
import { createTailwindcss as V } from "@mhsdesign/jit-browser-tailwindcss";
|
|
9
|
+
import A from "@tailwindcss/forms";
|
|
10
10
|
import L from "@tailwindcss/typography";
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
11
|
+
import P from "@tailwindcss/aspect-ratio";
|
|
12
|
+
import { a as R } from "./MODIFIERS-WQdaNvb8.js";
|
|
13
13
|
import "clsx";
|
|
14
14
|
import "tailwind-merge";
|
|
15
15
|
import "himalaya";
|
|
16
|
-
import "./
|
|
17
|
-
const
|
|
16
|
+
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
17
|
+
const w = {
|
|
18
18
|
25: "1/4",
|
|
19
19
|
"33.33": "1/3",
|
|
20
20
|
50: "1/2",
|
|
@@ -31,7 +31,7 @@ const T = {
|
|
|
31
31
|
"58.33": "7/12",
|
|
32
32
|
"91.67": "11/12",
|
|
33
33
|
100: "full"
|
|
34
|
-
},
|
|
34
|
+
}, W = {
|
|
35
35
|
0: "0",
|
|
36
36
|
1: "px",
|
|
37
37
|
2: "0.5",
|
|
@@ -67,21 +67,22 @@ const T = {
|
|
|
67
67
|
288: "72",
|
|
68
68
|
320: "80",
|
|
69
69
|
384: "96"
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
};
|
|
71
|
+
const B = 16, X = 4;
|
|
72
|
+
function v(a) {
|
|
73
|
+
return a.indexOf("rem") !== -1 && (a = `${parseFloat(a.replace("rem", "")) * B}px`), a;
|
|
73
74
|
}
|
|
74
75
|
const ae = (a) => {
|
|
75
|
-
const
|
|
76
|
-
if (
|
|
76
|
+
const r = a.match(/\[.*\]/);
|
|
77
|
+
if (r === null)
|
|
77
78
|
return a;
|
|
78
|
-
const s =
|
|
79
|
+
const s = _(a);
|
|
79
80
|
if (s === null)
|
|
80
81
|
return a;
|
|
81
82
|
const { property: n } = s;
|
|
82
|
-
let e =
|
|
83
|
-
const
|
|
84
|
-
e =
|
|
83
|
+
let e = F(r).replace(/\]/i, "").replace(/\[/i, "");
|
|
84
|
+
const c = a.replace(/\[.*\]/i, "");
|
|
85
|
+
e = v(e);
|
|
85
86
|
let t = a;
|
|
86
87
|
switch (n) {
|
|
87
88
|
case "top":
|
|
@@ -116,23 +117,23 @@ const ae = (a) => {
|
|
|
116
117
|
case "spaceX":
|
|
117
118
|
case "spaceY":
|
|
118
119
|
if (e.indexOf("px") !== -1) {
|
|
119
|
-
const o =
|
|
120
|
+
const o = T(d(W), (i) => `${i}px`);
|
|
120
121
|
if (l(o, e)) {
|
|
121
|
-
const
|
|
122
|
-
|
|
122
|
+
const i = $(e.replace("px", ""), 10);
|
|
123
|
+
i === 1 ? t = `${c}px` : t = c + i / X;
|
|
123
124
|
}
|
|
124
125
|
}
|
|
125
126
|
if (e.indexOf("%") !== -1) {
|
|
126
|
-
const o =
|
|
127
|
+
const o = T(d(w), (i) => `${i}%`);
|
|
127
128
|
if (l(o, e)) {
|
|
128
|
-
const
|
|
129
|
-
t =
|
|
129
|
+
const i = parseFloat(e.replace("%", ""));
|
|
130
|
+
t = c + p(w, i);
|
|
130
131
|
}
|
|
131
132
|
}
|
|
132
|
-
e.indexOf("vw") !== -1 && parseFloat(e.replace("vw", "")) === 100 && (t = `${
|
|
133
|
+
e.indexOf("vw") !== -1 && parseFloat(e.replace("vw", "")) === 100 && (t = `${c}screen`), e.indexOf("vh") !== -1 && parseFloat(e.replace("vh", "")) === 100 && (t = `${c}screen`);
|
|
133
134
|
break;
|
|
134
135
|
case "minWidth":
|
|
135
|
-
e.indexOf("%") !== -1 && parseFloat(e.replace("%", "")) === 100 && (t = `${
|
|
136
|
+
e.indexOf("%") !== -1 && parseFloat(e.replace("%", "")) === 100 && (t = `${c}full`), e === "0px" && (t = "min-w-0");
|
|
136
137
|
break;
|
|
137
138
|
case "maxWidth":
|
|
138
139
|
e === "0px" && (t = "max-w-0");
|
|
@@ -156,7 +157,7 @@ const ae = (a) => {
|
|
|
156
157
|
l(d(x), e) && (t = `max-w-${x[e]}`);
|
|
157
158
|
break;
|
|
158
159
|
case "minHeight":
|
|
159
|
-
e.indexOf("%") !== -1 && parseFloat(e.replace("%", "")) === 100 && (t = `${
|
|
160
|
+
e.indexOf("%") !== -1 && parseFloat(e.replace("%", "")) === 100 && (t = `${c}full`), e === "0px" && (t = "min-h-0"), e === "100vh" && (t = "min-h-screen");
|
|
160
161
|
break;
|
|
161
162
|
case "fontSize":
|
|
162
163
|
const f = {
|
|
@@ -174,7 +175,7 @@ const ae = (a) => {
|
|
|
174
175
|
"96px": "8xl",
|
|
175
176
|
"128px": "9xl"
|
|
176
177
|
};
|
|
177
|
-
l(d(f), e) && (t =
|
|
178
|
+
l(d(f), e) && (t = c + f[e]);
|
|
178
179
|
break;
|
|
179
180
|
case "lineHeight":
|
|
180
181
|
const m = {
|
|
@@ -193,10 +194,10 @@ const ae = (a) => {
|
|
|
193
194
|
"1.625": "relaxed",
|
|
194
195
|
2: "loose"
|
|
195
196
|
};
|
|
196
|
-
l(d(m), e) && (t =
|
|
197
|
+
l(d(m), e) && (t = c + m[e]);
|
|
197
198
|
break;
|
|
198
199
|
case "zIndex":
|
|
199
|
-
t = ["0", "10", "20", "30", "40", "50"].indexOf(e) !== -1 ? `${
|
|
200
|
+
t = ["0", "10", "20", "30", "40", "50"].indexOf(e) !== -1 ? `${c}${e}` : a;
|
|
200
201
|
break;
|
|
201
202
|
case "opacity":
|
|
202
203
|
const y = [
|
|
@@ -218,15 +219,17 @@ const ae = (a) => {
|
|
|
218
219
|
], u = parseFloat(e) * 100;
|
|
219
220
|
l(y, u.toString()) && (t = `opacity-${u}`);
|
|
220
221
|
break;
|
|
222
|
+
default:
|
|
223
|
+
break;
|
|
221
224
|
}
|
|
222
225
|
return t;
|
|
223
226
|
};
|
|
224
|
-
async function
|
|
225
|
-
const
|
|
226
|
-
colors: [
|
|
227
|
+
async function D(a, r, s = [], n = "c-", e = !1) {
|
|
228
|
+
const c = p(a, "primaryColor", "#000"), t = p(a, "secondaryColor", "#ccc"), x = p(a, "headingFont", "Inter"), f = p(a, "bodyFont", "Inter"), m = p(a, "roundedCorners", "0"), g = E({
|
|
229
|
+
colors: [c, t],
|
|
227
230
|
names: ["primary", "secondary"]
|
|
228
231
|
});
|
|
229
|
-
return b(g, "primary.DEFAULT",
|
|
232
|
+
return b(g, "primary.DEFAULT", c), b(g, "secondary.DEFAULT", t), `${await V({
|
|
230
233
|
tailwindConfig: {
|
|
231
234
|
darkMode: "class",
|
|
232
235
|
safelist: s,
|
|
@@ -242,7 +245,7 @@ async function M(a, c, s = [], n = "c-", e = !1) {
|
|
|
242
245
|
colors: g
|
|
243
246
|
}
|
|
244
247
|
},
|
|
245
|
-
plugins: [
|
|
248
|
+
plugins: [A, L, P],
|
|
246
249
|
corePlugins: { preflight: e },
|
|
247
250
|
...n ? { prefix: `${n}` } : {}
|
|
248
251
|
}
|
|
@@ -250,40 +253,40 @@ async function M(a, c, s = [], n = "c-", e = !1) {
|
|
|
250
253
|
` ${e ? "@tailwind base;" : ""}
|
|
251
254
|
@tailwind components;
|
|
252
255
|
@tailwind utilities;`,
|
|
253
|
-
|
|
256
|
+
r
|
|
254
257
|
)}
|
|
255
258
|
.${n}bg-clip-text{background-clip: text;-webkit-background-clip: text;} h1,h2,h3,h4,h5,h6{font-family: "${x}",${h.fontFamily.sans.join(
|
|
256
259
|
", "
|
|
257
260
|
)};}`;
|
|
258
261
|
}
|
|
259
|
-
const U = (a,
|
|
262
|
+
const U = (a, r) => a.map((s) => {
|
|
260
263
|
const n = {};
|
|
261
264
|
return Object.keys(s).forEach((e) => {
|
|
262
|
-
|
|
265
|
+
k(s[e], R) && (n[e] = C(s[e], r));
|
|
263
266
|
}), n;
|
|
264
|
-
}),
|
|
265
|
-
const e =
|
|
266
|
-
return
|
|
267
|
-
|
|
268
|
-
[
|
|
267
|
+
}), S = (a, r, s = "c-", n = !1) => {
|
|
268
|
+
const e = I(r, s);
|
|
269
|
+
return D(
|
|
270
|
+
r,
|
|
271
|
+
[O(JSON.stringify(U(a, s)), /#styles:/g, "")],
|
|
269
272
|
e.split(" ").concat(`${s}inline-block`, `${s}w-full`, `${s}h-full`),
|
|
270
273
|
s,
|
|
271
274
|
n
|
|
272
275
|
);
|
|
273
|
-
}, te = async (a,
|
|
276
|
+
}, te = async (a, r = "c-", s = !1) => {
|
|
274
277
|
const n = a.page.blocks;
|
|
275
|
-
return await
|
|
276
|
-
}, se = async (a,
|
|
278
|
+
return await S(n, a.project.brandingOptions, r, s);
|
|
279
|
+
}, se = async (a, r, s = "c-", n = !1) => await S(a, r, s, n);
|
|
277
280
|
export {
|
|
278
|
-
|
|
279
|
-
|
|
281
|
+
C as addPrefixToClasses,
|
|
282
|
+
ce as cn,
|
|
280
283
|
ae as convertArbitraryToTailwindClass,
|
|
281
284
|
oe as generateUUID,
|
|
282
285
|
xe as getBlocksFromHTML,
|
|
283
|
-
|
|
284
|
-
|
|
286
|
+
S as getBlocksTailwindCSS,
|
|
287
|
+
I as getBrandingClasses,
|
|
285
288
|
le as getBreakpointValue,
|
|
286
289
|
se as getStylesForBlocks,
|
|
287
290
|
te as getStylesForPageData,
|
|
288
|
-
|
|
291
|
+
D as getTailwindCSS
|
|
289
292
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),u=require("react"),n=require("@radix-ui/react-icons"),o=require("./index-F4AQQ6qq.cjs"),x=require("./index-Qk028f-N.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("lodash-es");require("./Functions-N3yhPYKY.cjs");require("clsx");require("tailwind-merge");require("@chaibuilder/runtime");require("jotai");require("./MODIFIERS-9EwxLM8V.cjs");require("@react-hookz/web");require("./Class-MmCxz2Ay.cjs");require("react-i18next");require("@radix-ui/react-toggle");require("class-variance-authority");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("./index-l19JVVXI.cjs");require("i18next");require("@floating-ui/react-dom");require("flagged");require("react-hotkeys-hook");require("sonner");require("./html-to-json-C_Eobs_d.cjs");require("himalaya");require("lucide-react");require("./index-ecnGWzh9.cjs");const m=u.lazy(()=>Promise.resolve().then(()=>require("./single-page-detail-9abF2g2R.cjs"))),j=({pageData:s})=>{const[r,i]=u.useState("CLOSE");return e.jsxRuntimeExports.jsxs(o.Popover,{open:r==="OPEN"||r==="ALERT"||r==="PENDING",onOpenChange:t=>{i(r==="PENDING"?"ALERT":t?"OPEN":"CLOSE")},children:[e.jsxRuntimeExports.jsx(o.PopoverTrigger,{asChild:!0,onClick:t=>{t.stopPropagation(),i("OPEN")},children:e.jsxRuntimeExports.jsx("div",{className:"flex items-center justify-between",children:r==="OPEN"||r==="ALERT"||r==="PENDING"?e.jsxRuntimeExports.jsx(n.ChevronRightIcon,{}):e.jsxRuntimeExports.jsx("div",{className:"hidden hover:text-blue-600 group-hover:flex",children:e.jsxRuntimeExports.jsx(n.GearIcon,{})})})}),e.jsxRuntimeExports.jsx(o.PopoverContent,{side:"right",align:"start",alignOffset:-35,className:"h-screen w-96",children:e.jsxRuntimeExports.jsx(u.Suspense,{fallback:e.jsxRuntimeExports.jsxs("div",{className:"flex w-full animate-pulse flex-col gap-y-3",children:[e.jsxRuntimeExports.jsx("div",{className:"bg-background-300 h-6 w-1/2"}),e.jsxRuntimeExports.jsx("div",{className:"bg-background-300 h-20 w-full"}),e.jsxRuntimeExports.jsx("div",{className:"bg-background-300 h-20 w-full"})]}),children:e.jsxRuntimeExports.jsx(m,{pageData:s,open:r,setOpen:i})})})]})},p=s=>{const[r]=x.useCurrentPage(),{data:i}=x.useProject(),t=x.useChangePage(),l=(i==null?void 0:i.homepage)===s.uuid,a=r===s.uuid,c=()=>t(s);return i?e.jsxRuntimeExports.jsxs("button",{className:`group relative flex w-full cursor-pointer items-center justify-between px-2.5 py-2 ${a?"bg-blue-200 ":""}`,onClick:c,type:"button",children:[e.jsxRuntimeExports.jsxs("div",{className:"flex text-sm items-center gap-x-1.5",children:[l?e.jsxRuntimeExports.jsx(n.HomeIcon,{}):e.jsxRuntimeExports.jsx(n.FileTextIcon,{})," ",s.name]}),e.jsxRuntimeExports.jsx(j,{pageData:s})]}):null},q=({pages:s,isLoading:r})=>r?e.jsxRuntimeExports.jsxs("div",{className:"flex animate-pulse flex-col gap-y-1 px-2.5 pt-2",children:[e.jsxRuntimeExports.jsx("div",{className:"bg-background-200 h-7 w-full"}),e.jsxRuntimeExports.jsx("div",{className:"bg-background-200 h-7 w-full"}),e.jsxRuntimeExports.jsx("div",{className:"bg-background-200 h-7 w-full"})]}):s.length===0?e.jsxRuntimeExports.jsx("div",{className:"px-2.5 pb-2 pt-4",children:"No pages"}):e.jsxRuntimeExports.jsx("div",{className:"-mb-2",children:u.Children.toArray(s.map(i=>e.jsxRuntimeExports.jsx(p,{...i})))});exports.default=q;
|
|
@@ -1,96 +1,109 @@
|
|
|
1
|
-
import { j as e } from "./jsx-runtime-
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { d as j, a as N, c as b } from "./index-
|
|
6
|
-
import "
|
|
7
|
-
import "
|
|
1
|
+
import { j as e } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
|
+
import s, { useState as p, Suspense as l } from "react";
|
|
3
|
+
import { ChevronRightIcon as c, GearIcon as u, HomeIcon as d, FileTextIcon as x } from "@radix-ui/react-icons";
|
|
4
|
+
import { aV as g, aW as h, aX as f } from "./index-CFUoB97-.js";
|
|
5
|
+
import { d as j, a as N, c as b } from "./index-f0AbmoYY.js";
|
|
6
|
+
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
7
|
+
import "lodash-es";
|
|
8
|
+
import "./Functions-7jnEwJyw.js";
|
|
8
9
|
import "clsx";
|
|
9
10
|
import "tailwind-merge";
|
|
10
|
-
import "
|
|
11
|
-
import "./MODIFIERS-CNqNUapY.js";
|
|
12
|
-
import "@radix-ui/react-scroll-area";
|
|
13
|
-
import "react-dom";
|
|
14
|
-
import "@floating-ui/react-dom";
|
|
11
|
+
import "@chaibuilder/runtime";
|
|
15
12
|
import "jotai";
|
|
16
|
-
import "
|
|
13
|
+
import "./MODIFIERS-WQdaNvb8.js";
|
|
14
|
+
import "@react-hookz/web";
|
|
15
|
+
import "./Class-3k8xjeiM.js";
|
|
17
16
|
import "react-i18next";
|
|
18
|
-
import "
|
|
19
|
-
import "lodash-es";
|
|
20
|
-
import "./skeleton-lu8e7q2y.js";
|
|
21
|
-
import "@radix-ui/react-slot";
|
|
17
|
+
import "@radix-ui/react-toggle";
|
|
22
18
|
import "class-variance-authority";
|
|
19
|
+
import "@radix-ui/react-switch";
|
|
20
|
+
import "@radix-ui/react-slot";
|
|
21
|
+
import "@radix-ui/react-accordion";
|
|
22
|
+
import "@radix-ui/react-alert-dialog";
|
|
23
|
+
import "@radix-ui/react-dialog";
|
|
24
|
+
import "@radix-ui/react-label";
|
|
25
|
+
import "@radix-ui/react-scroll-area";
|
|
26
|
+
import "@radix-ui/react-tabs";
|
|
23
27
|
import "@radix-ui/react-tooltip";
|
|
28
|
+
import "@radix-ui/react-popover";
|
|
29
|
+
import "@radix-ui/react-menubar";
|
|
30
|
+
import "@radix-ui/react-hover-card";
|
|
31
|
+
import "@radix-ui/react-select";
|
|
32
|
+
import "@radix-ui/react-dropdown-menu";
|
|
33
|
+
import "@radix-ui/react-separator";
|
|
24
34
|
import "@radix-ui/react-toast";
|
|
25
|
-
import "
|
|
35
|
+
import "cmdk";
|
|
36
|
+
import "@radix-ui/react-context-menu";
|
|
37
|
+
import "react-icons-picker";
|
|
38
|
+
import "react-dom";
|
|
39
|
+
import "react-quill";
|
|
40
|
+
import "./index-lOJfSheQ.js";
|
|
41
|
+
import "i18next";
|
|
42
|
+
import "@floating-ui/react-dom";
|
|
43
|
+
import "flagged";
|
|
26
44
|
import "react-hotkeys-hook";
|
|
27
|
-
import "@react-hookz/web";
|
|
28
|
-
import "@chaibuilder/runtime";
|
|
29
45
|
import "sonner";
|
|
30
|
-
import "./html-to-json-
|
|
46
|
+
import "./html-to-json-p__Fgqdg.js";
|
|
31
47
|
import "himalaya";
|
|
32
|
-
import "./STRINGS-b432aBJJ.js";
|
|
33
48
|
import "lucide-react";
|
|
34
|
-
import "./
|
|
35
|
-
import
|
|
36
|
-
|
|
37
|
-
const P = o.lazy(() => import("./single-page-detail-hD1jKZ8k.js")), v = ({ pageData: r }) => {
|
|
38
|
-
const [t, s] = m("CLOSE");
|
|
49
|
+
import "./index-YpnaudSM.js";
|
|
50
|
+
const v = s.lazy(() => import("./single-page-detail--AZlZ-pC.js")), P = ({ pageData: r }) => {
|
|
51
|
+
const [t, i] = p("CLOSE");
|
|
39
52
|
return /* @__PURE__ */ e.jsxs(
|
|
40
53
|
g,
|
|
41
54
|
{
|
|
42
55
|
open: t === "OPEN" || t === "ALERT" || t === "PENDING",
|
|
43
|
-
onOpenChange: (
|
|
44
|
-
|
|
56
|
+
onOpenChange: (o) => {
|
|
57
|
+
i(t === "PENDING" ? "ALERT" : o ? "OPEN" : "CLOSE");
|
|
45
58
|
},
|
|
46
59
|
children: [
|
|
47
60
|
/* @__PURE__ */ e.jsx(
|
|
48
61
|
h,
|
|
49
62
|
{
|
|
50
63
|
asChild: !0,
|
|
51
|
-
onClick: (
|
|
52
|
-
|
|
64
|
+
onClick: (o) => {
|
|
65
|
+
o.stopPropagation(), i("OPEN");
|
|
53
66
|
},
|
|
54
|
-
children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-between", children: t === "OPEN" || t === "ALERT" || t === "PENDING" ? /* @__PURE__ */ e.jsx(
|
|
67
|
+
children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-between", children: t === "OPEN" || t === "ALERT" || t === "PENDING" ? /* @__PURE__ */ e.jsx(c, {}) : /* @__PURE__ */ e.jsx("div", { className: "hidden hover:text-blue-600 group-hover:flex", children: /* @__PURE__ */ e.jsx(u, {}) }) })
|
|
55
68
|
}
|
|
56
69
|
),
|
|
57
70
|
/* @__PURE__ */ e.jsx(f, { side: "right", align: "start", alignOffset: -35, className: "h-screen w-96", children: /* @__PURE__ */ e.jsx(
|
|
58
|
-
|
|
71
|
+
l,
|
|
59
72
|
{
|
|
60
73
|
fallback: /* @__PURE__ */ e.jsxs("div", { className: "flex w-full animate-pulse flex-col gap-y-3", children: [
|
|
61
74
|
/* @__PURE__ */ e.jsx("div", { className: "bg-background-300 h-6 w-1/2" }),
|
|
62
75
|
/* @__PURE__ */ e.jsx("div", { className: "bg-background-300 h-20 w-full" }),
|
|
63
76
|
/* @__PURE__ */ e.jsx("div", { className: "bg-background-300 h-20 w-full" })
|
|
64
77
|
] }),
|
|
65
|
-
children: /* @__PURE__ */ e.jsx(
|
|
78
|
+
children: /* @__PURE__ */ e.jsx(v, { pageData: r, open: t, setOpen: i })
|
|
66
79
|
}
|
|
67
80
|
) })
|
|
68
81
|
]
|
|
69
82
|
}
|
|
70
83
|
);
|
|
71
84
|
}, E = (r) => {
|
|
72
|
-
const [t] = j(), { data:
|
|
73
|
-
return
|
|
85
|
+
const [t] = j(), { data: i } = N(), o = b(), a = (i == null ? void 0 : i.homepage) === r.uuid, m = t === r.uuid, n = () => o(r);
|
|
86
|
+
return i ? /* @__PURE__ */ e.jsxs(
|
|
74
87
|
"button",
|
|
75
88
|
{
|
|
76
|
-
className: `group relative flex w-full cursor-pointer items-center justify-between px-2.5 py-2 ${
|
|
77
|
-
onClick:
|
|
89
|
+
className: `group relative flex w-full cursor-pointer items-center justify-between px-2.5 py-2 ${m ? "bg-blue-200 " : ""}`,
|
|
90
|
+
onClick: n,
|
|
78
91
|
type: "button",
|
|
79
92
|
children: [
|
|
80
93
|
/* @__PURE__ */ e.jsxs("div", { className: "flex text-sm items-center gap-x-1.5", children: [
|
|
81
|
-
a ? /* @__PURE__ */ e.jsx(
|
|
94
|
+
a ? /* @__PURE__ */ e.jsx(d, {}) : /* @__PURE__ */ e.jsx(x, {}),
|
|
82
95
|
" ",
|
|
83
96
|
r.name
|
|
84
97
|
] }),
|
|
85
|
-
/* @__PURE__ */ e.jsx(
|
|
98
|
+
/* @__PURE__ */ e.jsx(P, { pageData: r })
|
|
86
99
|
]
|
|
87
100
|
}
|
|
88
101
|
) : null;
|
|
89
|
-
},
|
|
102
|
+
}, Ne = ({ pages: r, isLoading: t }) => t ? /* @__PURE__ */ e.jsxs("div", { className: "flex animate-pulse flex-col gap-y-1 px-2.5 pt-2", children: [
|
|
90
103
|
/* @__PURE__ */ e.jsx("div", { className: "bg-background-200 h-7 w-full" }),
|
|
91
104
|
/* @__PURE__ */ e.jsx("div", { className: "bg-background-200 h-7 w-full" }),
|
|
92
105
|
/* @__PURE__ */ e.jsx("div", { className: "bg-background-200 h-7 w-full" })
|
|
93
|
-
] }) : r.length === 0 ? /* @__PURE__ */ e.jsx("div", { className: "px-2.5 pb-2 pt-4", children: "No pages" }) : /* @__PURE__ */ e.jsx("div", { className: "-mb-2", children:
|
|
106
|
+
] }) : r.length === 0 ? /* @__PURE__ */ e.jsx("div", { className: "px-2.5 pb-2 pt-4", children: "No pages" }) : /* @__PURE__ */ e.jsx("div", { className: "-mb-2", children: s.Children.toArray(r.map((i) => /* @__PURE__ */ e.jsx(E, { ...i }))) });
|
|
94
107
|
export {
|
|
95
|
-
|
|
108
|
+
Ne as default
|
|
96
109
|
};
|
|
@@ -1,50 +1,57 @@
|
|
|
1
|
-
import { j as i } from "./jsx-runtime-
|
|
1
|
+
import { j as i } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
2
|
import * as l from "react";
|
|
3
|
-
import {
|
|
4
|
-
import { u as c, o as u } from "./controls-
|
|
5
|
-
import { F as d } from "./form-
|
|
6
|
-
import { a as x } from "./index-
|
|
7
|
-
import "
|
|
8
|
-
import "
|
|
3
|
+
import { bf as n } from "./index-CFUoB97-.js";
|
|
4
|
+
import { u as c, o as u } from "./controls-OfJWSEqC.js";
|
|
5
|
+
import { F as d } from "./form-zmlTjM9j.js";
|
|
6
|
+
import { a as x } from "./index-f0AbmoYY.js";
|
|
7
|
+
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
8
|
+
import "lodash-es";
|
|
9
|
+
import "./Functions-7jnEwJyw.js";
|
|
9
10
|
import "clsx";
|
|
10
11
|
import "tailwind-merge";
|
|
11
|
-
import "
|
|
12
|
-
import "@rjsf/core";
|
|
13
|
-
import "@rjsf/validator-ajv8";
|
|
14
|
-
import "./link-xuhP-4dN.js";
|
|
15
|
-
import "react-icons-picker";
|
|
16
|
-
import "react-dom";
|
|
17
|
-
import "./tabs-yQ3oGziM.js";
|
|
18
|
-
import "@radix-ui/react-dialog";
|
|
19
|
-
import "@radix-ui/react-icons";
|
|
20
|
-
import "@radix-ui/react-tabs";
|
|
21
|
-
import "./ImagesPanel-Wb0GF_NA.js";
|
|
22
|
-
import "react-quill";
|
|
23
|
-
import "react-i18next";
|
|
24
|
-
import "./skeleton-lu8e7q2y.js";
|
|
12
|
+
import "@chaibuilder/runtime";
|
|
25
13
|
import "jotai";
|
|
26
|
-
import "
|
|
14
|
+
import "./MODIFIERS-WQdaNvb8.js";
|
|
15
|
+
import "@react-hookz/web";
|
|
16
|
+
import "./Class-3k8xjeiM.js";
|
|
17
|
+
import "react-i18next";
|
|
18
|
+
import "@radix-ui/react-toggle";
|
|
27
19
|
import "class-variance-authority";
|
|
20
|
+
import "@radix-ui/react-switch";
|
|
21
|
+
import "@radix-ui/react-slot";
|
|
22
|
+
import "@radix-ui/react-accordion";
|
|
23
|
+
import "@radix-ui/react-icons";
|
|
24
|
+
import "@radix-ui/react-alert-dialog";
|
|
25
|
+
import "@radix-ui/react-dialog";
|
|
26
|
+
import "@radix-ui/react-label";
|
|
27
|
+
import "@radix-ui/react-scroll-area";
|
|
28
|
+
import "@radix-ui/react-tabs";
|
|
28
29
|
import "@radix-ui/react-tooltip";
|
|
30
|
+
import "@radix-ui/react-popover";
|
|
31
|
+
import "@radix-ui/react-menubar";
|
|
32
|
+
import "@radix-ui/react-hover-card";
|
|
33
|
+
import "@radix-ui/react-select";
|
|
34
|
+
import "@radix-ui/react-dropdown-menu";
|
|
35
|
+
import "@radix-ui/react-separator";
|
|
29
36
|
import "@radix-ui/react-toast";
|
|
30
|
-
import "
|
|
31
|
-
import "
|
|
32
|
-
import "
|
|
37
|
+
import "cmdk";
|
|
38
|
+
import "@radix-ui/react-context-menu";
|
|
39
|
+
import "react-icons-picker";
|
|
40
|
+
import "react-dom";
|
|
41
|
+
import "react-quill";
|
|
42
|
+
import "@rjsf/core";
|
|
43
|
+
import "@rjsf/validator-ajv8";
|
|
44
|
+
import "./index-lOJfSheQ.js";
|
|
33
45
|
import "i18next";
|
|
46
|
+
import "@floating-ui/react-dom";
|
|
34
47
|
import "flagged";
|
|
35
|
-
import "./Functions-NzT2Six_.js";
|
|
36
48
|
import "react-hotkeys-hook";
|
|
37
|
-
import "@react-hookz/web";
|
|
38
|
-
import "@chaibuilder/runtime";
|
|
39
49
|
import "sonner";
|
|
40
|
-
import "./html-to-json-
|
|
50
|
+
import "./html-to-json-p__Fgqdg.js";
|
|
41
51
|
import "himalaya";
|
|
42
|
-
import "./STRINGS-b432aBJJ.js";
|
|
43
52
|
import "lucide-react";
|
|
44
|
-
import "./
|
|
45
|
-
|
|
46
|
-
import "@radix-ui/react-alert-dialog";
|
|
47
|
-
const ao = ({
|
|
53
|
+
import "./index-YpnaudSM.js";
|
|
54
|
+
const xo = ({
|
|
48
55
|
_projectData: m,
|
|
49
56
|
seany: t
|
|
50
57
|
}) => {
|
|
@@ -67,5 +74,5 @@ const ao = ({
|
|
|
67
74
|
return /* @__PURE__ */ i.jsx(n, { className: "flex h-full select-none flex-col", children: /* @__PURE__ */ i.jsx(d, { properties: a, disabled: p, formData: m, onChange: e }) });
|
|
68
75
|
};
|
|
69
76
|
export {
|
|
70
|
-
|
|
77
|
+
xo as default
|
|
71
78
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("./jsx-runtime-Z_BpKhVy.cjs"),a=require("react"),f=require("./index-F4AQQ6qq.cjs"),o=require("./controls-KK2oLIa8.cjs"),d=require("./form-Ap63cNec.cjs"),m=require("./index-Qk028f-N.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("lodash-es");require("./Functions-N3yhPYKY.cjs");require("clsx");require("tailwind-merge");require("@chaibuilder/runtime");require("jotai");require("./MODIFIERS-9EwxLM8V.cjs");require("@react-hookz/web");require("./Class-MmCxz2Ay.cjs");require("react-i18next");require("@radix-ui/react-toggle");require("class-variance-authority");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("@rjsf/core");require("@rjsf/validator-ajv8");require("./index-l19JVVXI.cjs");require("i18next");require("@floating-ui/react-dom");require("flagged");require("react-hotkeys-hook");require("sonner");require("./html-to-json-C_Eobs_d.cjs");require("himalaya");require("lucide-react");require("./index-ecnGWzh9.cjs");function j(r){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const e in r)if(e!=="default"){const u=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(i,e,u.get?u:{enumerable:!0,get:()=>r[e]})}}return i.default=r,Object.freeze(i)}const g=j(a),b=({_projectData:r,seany:i})=>{const{data:e,isLoading:u}=m.useProject();g.useEffect(()=>{e&&i(e)},[e,i]);const n=({formData:s},t)=>{i(l=>({...l,[t]:s[t]}))},c={name:o.u({title:"Project Name",default:e==null?void 0:e.name}),favicon:o.o({title:"Favicon",default:e==null?void 0:e.favicon})};return q.jsxRuntimeExports.jsx(f.ScrollArea,{className:"flex h-full select-none flex-col",children:q.jsxRuntimeExports.jsx(d.Form,{properties:c,disabled:u,formData:r,onChange:n})})};exports.default=b;
|
|
@@ -1,34 +1,50 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { b as D, u as c, g, o as x } from "./controls-
|
|
3
|
-
import { F as v } from "./form-
|
|
1
|
+
import { j as s } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
|
+
import { b as D, u as c, g, o as x } from "./controls-OfJWSEqC.js";
|
|
3
|
+
import { F as v } from "./form-zmlTjM9j.js";
|
|
4
|
+
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
4
5
|
import "react";
|
|
5
6
|
import "lodash-es";
|
|
6
7
|
import "@rjsf/core";
|
|
7
8
|
import "@rjsf/validator-ajv8";
|
|
8
|
-
import "./
|
|
9
|
-
import "
|
|
10
|
-
import "react-dom";
|
|
11
|
-
import "./tabs-yQ3oGziM.js";
|
|
12
|
-
import "@radix-ui/react-dialog";
|
|
13
|
-
import "@radix-ui/react-icons";
|
|
14
|
-
import "./utils-dze1SGvB.js";
|
|
9
|
+
import "./index-CFUoB97-.js";
|
|
10
|
+
import "./Functions-7jnEwJyw.js";
|
|
15
11
|
import "clsx";
|
|
16
12
|
import "tailwind-merge";
|
|
17
|
-
import "@
|
|
18
|
-
import "./ImagesPanel-Wb0GF_NA.js";
|
|
19
|
-
import "react-quill";
|
|
20
|
-
import "react-i18next";
|
|
21
|
-
import "./skeleton-lu8e7q2y.js";
|
|
13
|
+
import "@chaibuilder/runtime";
|
|
22
14
|
import "jotai";
|
|
23
|
-
import "
|
|
15
|
+
import "./MODIFIERS-WQdaNvb8.js";
|
|
16
|
+
import "@react-hookz/web";
|
|
17
|
+
import "./Class-3k8xjeiM.js";
|
|
18
|
+
import "react-i18next";
|
|
19
|
+
import "@radix-ui/react-toggle";
|
|
24
20
|
import "class-variance-authority";
|
|
21
|
+
import "@radix-ui/react-switch";
|
|
22
|
+
import "@radix-ui/react-slot";
|
|
23
|
+
import "@radix-ui/react-accordion";
|
|
24
|
+
import "@radix-ui/react-icons";
|
|
25
|
+
import "@radix-ui/react-alert-dialog";
|
|
26
|
+
import "@radix-ui/react-dialog";
|
|
27
|
+
import "@radix-ui/react-label";
|
|
28
|
+
import "@radix-ui/react-scroll-area";
|
|
29
|
+
import "@radix-ui/react-tabs";
|
|
25
30
|
import "@radix-ui/react-tooltip";
|
|
31
|
+
import "@radix-ui/react-popover";
|
|
32
|
+
import "@radix-ui/react-menubar";
|
|
33
|
+
import "@radix-ui/react-hover-card";
|
|
34
|
+
import "@radix-ui/react-select";
|
|
35
|
+
import "@radix-ui/react-dropdown-menu";
|
|
36
|
+
import "@radix-ui/react-separator";
|
|
26
37
|
import "@radix-ui/react-toast";
|
|
27
|
-
|
|
38
|
+
import "cmdk";
|
|
39
|
+
import "@radix-ui/react-context-menu";
|
|
40
|
+
import "react-icons-picker";
|
|
41
|
+
import "react-dom";
|
|
42
|
+
import "react-quill";
|
|
43
|
+
const at = ({
|
|
28
44
|
_projectData: t,
|
|
29
45
|
seany: l
|
|
30
46
|
}) => {
|
|
31
|
-
var o, e, r,
|
|
47
|
+
var o, e, r, m, p, a;
|
|
32
48
|
const n = ({ formData: f }) => {
|
|
33
49
|
const i = { ...f };
|
|
34
50
|
i.seoData.title === void 0 && (i.seoData.title = ""), i.seoData.description === void 0 && (i.seoData.description = ""), i.seoData.image === void 0 && (i.seoData.image = ""), l((u) => ({
|
|
@@ -46,21 +62,21 @@ const U = ({
|
|
|
46
62
|
properties: {
|
|
47
63
|
title: c({
|
|
48
64
|
title: "Default Title",
|
|
49
|
-
default: ((
|
|
65
|
+
default: ((m = t.seoData) == null ? void 0 : m.title) || ""
|
|
50
66
|
}),
|
|
51
67
|
description: g({
|
|
52
68
|
title: "Default Description",
|
|
53
|
-
default: ((
|
|
69
|
+
default: ((p = t.seoData) == null ? void 0 : p.description) || ""
|
|
54
70
|
}),
|
|
55
71
|
image: x({
|
|
56
72
|
title: "Social Media Image",
|
|
57
|
-
default: ((
|
|
73
|
+
default: ((a = t.seoData) == null ? void 0 : a.image) || ""
|
|
58
74
|
})
|
|
59
75
|
}
|
|
60
76
|
})
|
|
61
77
|
};
|
|
62
|
-
return /* @__PURE__ */
|
|
78
|
+
return /* @__PURE__ */ s.jsx("div", { className: "flex h-full select-none flex-col", children: /* @__PURE__ */ s.jsx(v, { properties: d, formData: t, onChange: n }) });
|
|
63
79
|
};
|
|
64
80
|
export {
|
|
65
|
-
|
|
81
|
+
at as default
|
|
66
82
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./jsx-runtime-Z_BpKhVy.cjs"),i=require("./controls-KK2oLIa8.cjs"),g=require("./form-Ap63cNec.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("react");require("lodash-es");require("@rjsf/core");require("@rjsf/validator-ajv8");require("./index-F4AQQ6qq.cjs");require("./Functions-N3yhPYKY.cjs");require("clsx");require("tailwind-merge");require("@chaibuilder/runtime");require("jotai");require("./MODIFIERS-9EwxLM8V.cjs");require("@react-hookz/web");require("./Class-MmCxz2Ay.cjs");require("react-i18next");require("@radix-ui/react-toggle");require("class-variance-authority");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");const D=({_projectData:e,seany:n})=>{var t,u,o,s,q,a;const d=({formData:f})=>{const r={...f};r.seoData.title===void 0&&(r.seoData.title=""),r.seoData.description===void 0&&(r.seoData.description=""),r.seoData.image===void 0&&(r.seoData.image=""),n(m=>({...m,...r}))},c={seoData:i.b({title:"",default:{title:((t=e.seoData)==null?void 0:t.title)||"",description:((u=e.seoData)==null?void 0:u.description)||"",image:((o=e.seoData)==null?void 0:o.image)||""},properties:{title:i.u({title:"Default Title",default:((s=e.seoData)==null?void 0:s.title)||""}),description:i.g({title:"Default Description",default:((q=e.seoData)==null?void 0:q.description)||""}),image:i.o({title:"Social Media Image",default:((a=e.seoData)==null?void 0:a.image)||""})}})};return l.jsxRuntimeExports.jsx("div",{className:"flex h-full select-none flex-col",children:l.jsxRuntimeExports.jsx(g.Form,{properties:c,formData:e,onChange:d})})};exports.default=D;
|
package/dist/render.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./jsx-runtime-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./jsx-runtime-Z_BpKhVy.cjs"),E=require("react"),n=require("lodash-es"),C=require("tailwind-merge"),c=require("./MODIFIERS-9EwxLM8V.cjs"),S=require("./defaultTheme-7Lk2zq60.cjs"),Y=require("@chaibuilder/runtime"),F=require("react-wrap-balancer"),B=require("@react-email/render"),y=require("@react-email/components"),L=require("@bobthered/tailwindcss-palette-generator");require("./_commonjsHelpers-wDK0ZLPo.cjs");const O=t=>{const s={};return Object.keys(t).forEach(e=>{n.isString(t[e])&&t[e].startsWith(c.SLOT_KEY)&&(s[e]=t[e].replace(c.SLOT_KEY,"").split(","))}),s},A=n.memoize((t,s)=>{const e=t.replace(c.STYLES_KEY,"").split(","),r=C.twMerge(e[0],e[1]);return s?S.addPrefixToClasses(r,s).replace(c.STYLES_KEY,"").trim():r.replace(c.STYLES_KEY,"").trim()});function q(t,s){return n.get(t,`${s}_attrs`,{})}function K(t,s){const e={};return Object.keys(t).forEach(r=>{if(n.isString(t[r])&&t[r].startsWith(c.STYLES_KEY)){const i=A(t[r],s);e[r]={className:i,...q(t,r)}}}),e}function w(t,s){const e=n.get(t,"_bindings",{});return n.isEmpty(e)?{...t}:(n.each(e,(r,i)=>{n.isString(r)&&n.get(s,r,null)&&(t[i]=n.get(s,r,null))}),t)}function T(t){const{components:s,blocks:e,parent:r,classPrefix:i="",externalData:m={}}=t,p=e,l=a=>K(a,i),_=r?n.filter(e,{_parent:r}):n.filter(e,a=>n.isEmpty(a._parent));return o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:E.Children.toArray(_.map((a,x)=>{const f=O(a),d={};n.isEmpty(f)||Object.keys(f).forEach(j=>{d[j]=E.Children.toArray(f[j].map(R=>o.jsxRuntimeExports.jsx(T,{externalData:m,classPrefix:i,blocks:p,parent:R,components:s})))});const u=n.filter(p,{_parent:a._id});d.children=u.length>0?o.jsxRuntimeExports.jsx(T,{externalData:m,classPrefix:i,parent:a._id,blocks:p,components:s}):null;const g=n.get(s,a._type,null);if(g!==null){let j=a;const R=g;return E.createElement(R,n.omit({...j,index:x,...w(a,m),...l(j),...d},["_parent"]))}return o.jsxRuntimeExports.jsxs("noscript",{children:[a._type," not found"]})}))})}const $=t=>{const s={};return Object.keys(t).forEach(e=>{n.isString(t[e])&&t[e].startsWith(c.SLOT_KEY)&&(s[e]=t[e].replace(c.SLOT_KEY,"").split(","))}),s},N=n.memoize((t,s)=>{const e=t.replace(c.STYLES_KEY,"").split(","),r=C.twMerge(e[0],e[1]);return s===""?r.replace(c.STYLES_KEY,"").trim():S.addPrefixToClasses(r,s).replace(c.STYLES_KEY,"").trim()});function W(t,s){return n.get(t,`${s}_attrs`,{})}function I(t,s){const e={};return Object.keys(t).forEach(r=>{if(n.isString(t[r])&&t[r].startsWith(c.STYLES_KEY)){const i=N(t[r],s);e[r]={className:i,...W(t,r)}}}),e}function M(t,s){const e=n.get(t,"_bindings",{});return n.isEmpty(e)?{...t}:(n.each(e,(r,i)=>{n.isString(r)&&n.get(s,r,null)&&(t[i]=n.get(s,r,null))}),t)}function h({blocks:t,parent:s,classPrefix:e="",externalData:r={}}){const i=t,m=l=>I(l,e),p=s?n.filter(t,{_parent:s}):n.filter(t,l=>n.isEmpty(l._parent));return o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:E.Children.toArray(p.map((l,_)=>{const a=$(l),x={};n.isEmpty(a)||Object.keys(a).forEach(u=>{x[u]=E.Children.toArray(a[u].map(g=>o.jsxRuntimeExports.jsx(h,{externalData:r,classPrefix:e,blocks:i,parent:g})))});const f=n.filter(i,{_parent:l._id});x.children=f.length>0?o.jsxRuntimeExports.jsx(h,{externalData:r,classPrefix:e,parent:l._id,blocks:i}):null;const d=Y.getBlockComponent(l._type);if(d!==null){let u=l;const g=d.component;return u={...d.defaults,...l},E.createElement(g,n.omit({blockProps:{},inBuilder:!1,...u,index:_,...M(l,r),...m(u),...x},["_parent"]))}return o.jsxRuntimeExports.jsxs("noscript",{children:[l._type," not found"]})}))})}const P=({pageData:t,externalData:s={},before:e=null,after:r=null,classPrefix:i="c-"})=>{const m=n.get(t.project,"brandingOptions",c.BRANDING_OPTIONS_DEFAULTS);return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[e,o.jsxRuntimeExports.jsx("div",{className:i.replace("-","")+" "+S.getBrandingClasses(m,i)+" min-h-screen",children:o.jsxRuntimeExports.jsx(F.Provider,{children:o.jsxRuntimeExports.jsx(h,{externalData:s,blocks:t.page.blocks||[],classPrefix:i})})}),r]})},U=(t,s="c-")=>{const e=n.get(t,"primaryColor","#000"),r=n.get(t,"secondaryColor","#ccc"),i=n.get(t,"bodyFont","Inter"),m=n.get(t,"roundedCorners","0"),p=L.tailwindcssPaletteGenerator({colors:[e,r],names:["primary","secondary"]});return n.set(p,"primary.DEFAULT",e),n.set(p,"secondary.DEFAULT",r),{theme:{fontFamily:{body:[i,...S.defaultTheme.fontFamily.sans]},extend:{borderRadius:{global:`${m||"0"}px`},colors:p}},...s?{prefix:s}:{}}},G=t=>({fontFamily:t,fallbackFontFamily:"Verdana",webFont:{url:`https://fonts.googleapis.com/css2?family=${t}&display=swap`,format:"woff"},fontWeight:400,fontStyle:"normal"}),z=(t,s,e="html")=>{const r=U(s);return B.render(o.jsxRuntimeExports.jsx(y.Tailwind,{config:r,children:o.jsxRuntimeExports.jsxs(y.Html,{lang:"en",dir:"ltr",children:[o.jsxRuntimeExports.jsx(y.Head,{children:o.jsxRuntimeExports.jsx(y.Font,{...G(n.get(s,"bodyFont","Verdana"))})}),o.jsxRuntimeExports.jsx("body",{children:o.jsxRuntimeExports.jsx(h,{blocks:t})})]})}),e==="html"?{pretty:!0}:{plainText:!0})};exports.RenderChaiBlocks=h;exports.RenderChaiPage=P;exports.RenderUnregisteredComponents=T;exports.generateEmailTemplate=z;
|