@chaibuilder/sdk 1.2.46 → 1.2.48
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/README.md +1 -1
- package/dist/{AddBlocks-Jse1nYBd.cjs → AddBlocks-_fhhS7Lm.cjs} +1 -1
- package/dist/{AddBlocks-wY7YpsXy.js → AddBlocks-cX8vIt0V.js} +7 -7
- package/dist/{CanvasArea-2widR9Ry.js → CanvasArea-HRipTJFS.js} +271 -263
- package/dist/CanvasArea-N3rYeBJV.cjs +55 -0
- package/dist/{ChaiBuilderEditor-74s7jELl.cjs → ChaiBuilderEditor-EtQOC5uy.cjs} +1 -1
- package/dist/{ChaiBuilderEditor-wriVkIG1.js → ChaiBuilderEditor-dKHRL-Es.js} +20 -20
- package/dist/{CurrentPage-UozVUoj8.cjs → CurrentPage-9FijxWbn.cjs} +1 -1
- package/dist/{CurrentPage--JhcSlGs.js → CurrentPage-U8ms8Hs7.js} +2 -2
- package/dist/{ListTree-qTfVR-jh.js → ListTree-OgLdyfQs.js} +1 -1
- package/dist/{ListTree-aFX8fD7v.cjs → ListTree-jOvHpo3_.cjs} +1 -1
- package/dist/{PagesPanel-1ZzPulaC.cjs → PagesPanel-8Cd6UYsh.cjs} +1 -1
- package/dist/{PagesPanel-qatBt4Nf.js → PagesPanel-MsUBq9Xx.js} +3 -3
- package/dist/{ProjectPanel-QUIcKWwM.cjs → ProjectPanel-KmnXPfxx.cjs} +1 -1
- package/dist/{ProjectPanel-Vp-EZS_Y.js → ProjectPanel-hsZG_Btj.js} +3 -3
- package/dist/{Settings-E_xif3_e.js → Settings-WcLqIeQy.js} +7 -7
- package/dist/{Settings-jKpJi5Wy.cjs → Settings-xVjTnVSf.cjs} +1 -1
- package/dist/{SidePanels-s_Yl7HhG.cjs → SidePanels-6zRgfZpi.cjs} +1 -1
- package/dist/{SidePanels-UEa90HOL.js → SidePanels-PmCljlnf.js} +2 -2
- package/dist/{ThemeConfiguration-IUuxGaDf.js → ThemeConfiguration-mkbFdePB.js} +17 -17
- package/dist/{ThemeConfiguration-YkPc6RGq.cjs → ThemeConfiguration-pt7TTAty.cjs} +1 -1
- package/dist/{Topbar-YzdQKElx.cjs → Topbar--m1E08Jl.cjs} +1 -1
- package/dist/{Topbar-C7Qfcatg.js → Topbar-FPywhpub.js} +1 -1
- package/dist/{UILibrariesPanel-qv8AiOn1.cjs → UILibrariesPanel-HhHGcexY.cjs} +1 -1
- package/dist/{UILibrariesPanel-didKK7tC.js → UILibrariesPanel-VrA2X4LO.js} +1 -1
- package/dist/{UnsplashImages-VkZ_KszK.js → UnsplashImages-7uAXYHPH.js} +1 -1
- package/dist/{UnsplashImages-QeZ65lKC.cjs → UnsplashImages-Yu0msAD8.cjs} +1 -1
- package/dist/{UploadImages-6drauLA-.js → UploadImages-5M0Q27R-.js} +1 -1
- package/dist/{UploadImages-igQroUtu.cjs → UploadImages-jS51ZcPG.cjs} +1 -1
- package/dist/{add-page-modal-rJ7OwdoX.js → add-page-modal-6o7MAbq-.js} +3 -3
- package/dist/{add-page-modal-esHlLYay.cjs → add-page-modal-KAbflupJ.cjs} +1 -1
- package/dist/{confirm-alert-08q_BmL6.cjs → confirm-alert-dow0GlxC.cjs} +1 -1
- package/dist/{confirm-alert-HfChUtfw.js → confirm-alert-jL0z_gFv.js} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/{delete-page-modal-SOCB_9UB.cjs → delete-page-modal-EDQZneVM.cjs} +1 -1
- package/dist/{delete-page-modal-E3tO5Q1p.js → delete-page-modal-U5_JYYp7.js} +2 -2
- package/dist/email.cjs +1 -1
- package/dist/email.js +1 -1
- package/dist/{form-gRWwpKzq.cjs → form-KBtrnNWh.cjs} +1 -1
- package/dist/{form-hi_RCepy.js → form-Sgpl2fXL.js} +1 -1
- package/dist/functions-7ybAMUuA.js +31 -0
- package/dist/functions-yvRwasT2.cjs +1 -0
- package/dist/{index-3j3SZ9Pb.cjs → index-HjN7LtDT.cjs} +1 -1
- package/dist/{index-OnzJQ25d.js → index-po-naEa5.js} +2 -2
- package/dist/lib.cjs +2 -3
- package/dist/lib.d.ts +11 -11
- package/dist/lib.js +175 -100
- package/dist/{page-viewer-S3xZLu53.cjs → page-viewer-PfZEbcDZ.cjs} +1 -1
- package/dist/{page-viewer-K_8dfU3A.js → page-viewer-nLRRk7DR.js} +3 -3
- package/dist/{project-general-setting-vSkiqVk-.js → project-general-setting-D1UJdZ2D.js} +3 -3
- package/dist/{project-general-setting-IRQ9TNAd.cjs → project-general-setting-HO6zeum2.cjs} +1 -1
- package/dist/{project-seo-setting-b9jZC0dr.js → project-seo-setting-VIZWEMRk.js} +2 -2
- package/dist/{project-seo-setting-XHFqgtW9.cjs → project-seo-setting-gT9N1tnB.cjs} +1 -1
- package/dist/render.cjs +1 -1
- package/dist/render.d.ts +2 -1
- package/dist/render.js +82 -80
- package/dist/{single-page-detail-RG82dk4d.cjs → single-page-detail-To8TcpgJ.cjs} +1 -1
- package/dist/{single-page-detail-zHbO3vOI.js → single-page-detail-lQ8fujC5.js} +4 -4
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +2 -2
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +1 -1
- package/dist/{useCanvasSettings-2Wzyf2PK.cjs → useCanvasSettings-7BXlDuLG.cjs} +1 -1
- package/dist/{useCanvasSettings-L2pW5boY.js → useCanvasSettings-UzjYHFG5.js} +1 -1
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.js +1 -1
- package/package.json +1 -1
- package/dist/CanvasArea-pQP-jR11.cjs +0 -57
- package/dist/functions-ge87TVcc.js +0 -30
- package/dist/functions-sBiIevFh.cjs +0 -1
package/dist/lib.js
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
import { a as
|
|
3
|
-
import { g as
|
|
4
|
-
import { g as
|
|
5
|
-
import { first as
|
|
6
|
-
import { a as
|
|
7
|
-
import { c as
|
|
8
|
-
import { createTailwindcss as
|
|
9
|
-
import { g as
|
|
10
|
-
import
|
|
1
|
+
import { c as A } from "./utils-iMv3T4WT.js";
|
|
2
|
+
import { a as _e } from "./utils-iMv3T4WT.js";
|
|
3
|
+
import { g as ke, a as Ce } from "./Functions-7jnEwJyw.js";
|
|
4
|
+
import { g as Fe } from "./html-to-json-Z6R2o_fA.js";
|
|
5
|
+
import { first as L, includes as m, keys as d, map as _, parseInt as P, get as l, startsWith as U, replace as R } from "lodash-es";
|
|
6
|
+
import { a as H } from "./functions-7ybAMUuA.js";
|
|
7
|
+
import { c as Se, g as ve } from "./functions-7ybAMUuA.js";
|
|
8
|
+
import { createTailwindcss as M } from "@mhsdesign/jit-browser-tailwindcss";
|
|
9
|
+
import { g as C } from "./_commonjsHelpers-UyOWmZb0.js";
|
|
10
|
+
import I from "@tailwindcss/forms";
|
|
11
11
|
import $ from "@tailwindcss/typography";
|
|
12
|
-
import
|
|
13
|
-
import { a as
|
|
14
|
-
import
|
|
12
|
+
import W from "@tailwindcss/aspect-ratio";
|
|
13
|
+
import { a as B } from "./STRINGS--j49GZJP.js";
|
|
14
|
+
import V from "tailwindcss-palette-generator";
|
|
15
15
|
import "./MODIFIERS-cBT31iqE.js";
|
|
16
16
|
import "clsx";
|
|
17
17
|
import "tailwind-merge";
|
|
18
18
|
import "himalaya";
|
|
19
|
+
import "lodash";
|
|
19
20
|
const T = {
|
|
20
21
|
25: "1/4",
|
|
21
22
|
"33.33": "1/3",
|
|
@@ -33,7 +34,7 @@ const T = {
|
|
|
33
34
|
"58.33": "7/12",
|
|
34
35
|
"91.67": "11/12",
|
|
35
36
|
100: "full"
|
|
36
|
-
},
|
|
37
|
+
}, j = {
|
|
37
38
|
0: "0",
|
|
38
39
|
1: "px",
|
|
39
40
|
2: "0.5",
|
|
@@ -70,23 +71,23 @@ const T = {
|
|
|
70
71
|
320: "80",
|
|
71
72
|
384: "96"
|
|
72
73
|
};
|
|
73
|
-
const
|
|
74
|
-
function
|
|
75
|
-
return e.indexOf("rem") !== -1 && (e = `${parseFloat(e.replace("rem", "")) *
|
|
74
|
+
const X = 16, Y = 4;
|
|
75
|
+
function G(e) {
|
|
76
|
+
return e.indexOf("rem") !== -1 && (e = `${parseFloat(e.replace("rem", "")) * X}px`), e;
|
|
76
77
|
}
|
|
77
|
-
const
|
|
78
|
-
const
|
|
79
|
-
if (
|
|
78
|
+
const fe = (e) => {
|
|
79
|
+
const o = e.match(/\[.*\]/);
|
|
80
|
+
if (o === null)
|
|
80
81
|
return e;
|
|
81
|
-
const r =
|
|
82
|
+
const r = A(e);
|
|
82
83
|
if (r === null)
|
|
83
84
|
return e;
|
|
84
|
-
const { property:
|
|
85
|
-
let t =
|
|
85
|
+
const { property: n } = r;
|
|
86
|
+
let t = L(o).replace(/\]/i, "").replace(/\[/i, "");
|
|
86
87
|
const i = e.replace(/\[.*\]/i, "");
|
|
87
|
-
t =
|
|
88
|
+
t = G(t);
|
|
88
89
|
let a = e;
|
|
89
|
-
switch (
|
|
90
|
+
switch (n) {
|
|
90
91
|
case "top":
|
|
91
92
|
case "right":
|
|
92
93
|
case "left":
|
|
@@ -119,17 +120,17 @@ const se = (e) => {
|
|
|
119
120
|
case "spaceX":
|
|
120
121
|
case "spaceY":
|
|
121
122
|
if (t.indexOf("px") !== -1) {
|
|
122
|
-
const
|
|
123
|
-
if (p
|
|
124
|
-
const s =
|
|
125
|
-
s === 1 ? a = `${i}px` : a = i + s /
|
|
123
|
+
const p = _(d(j), (s) => `${s}px`);
|
|
124
|
+
if (m(p, t)) {
|
|
125
|
+
const s = P(t.replace("px", ""), 10);
|
|
126
|
+
s === 1 ? a = `${i}px` : a = i + s / Y;
|
|
126
127
|
}
|
|
127
128
|
}
|
|
128
129
|
if (t.indexOf("%") !== -1) {
|
|
129
|
-
const
|
|
130
|
-
if (p
|
|
130
|
+
const p = _(d(T), (s) => `${s}%`);
|
|
131
|
+
if (m(p, t)) {
|
|
131
132
|
const s = parseFloat(t.replace("%", ""));
|
|
132
|
-
a = i +
|
|
133
|
+
a = i + l(T, s);
|
|
133
134
|
}
|
|
134
135
|
}
|
|
135
136
|
t.indexOf("vw") !== -1 && parseFloat(t.replace("vw", "")) === 100 && (a = `${i}screen`), t.indexOf("vh") !== -1 && parseFloat(t.replace("vh", "")) === 100 && (a = `${i}screen`);
|
|
@@ -139,7 +140,7 @@ const se = (e) => {
|
|
|
139
140
|
break;
|
|
140
141
|
case "maxWidth":
|
|
141
142
|
t === "0px" && (a = "max-w-0");
|
|
142
|
-
const
|
|
143
|
+
const g = {
|
|
143
144
|
"320px": "xs",
|
|
144
145
|
"384px": "sm",
|
|
145
146
|
"448px": "md",
|
|
@@ -156,13 +157,13 @@ const se = (e) => {
|
|
|
156
157
|
"640px": "screen-sm",
|
|
157
158
|
"1536px": "screen-2xl"
|
|
158
159
|
};
|
|
159
|
-
|
|
160
|
+
m(d(g), t) && (a = `max-w-${g[t]}`);
|
|
160
161
|
break;
|
|
161
162
|
case "minHeight":
|
|
162
163
|
t.indexOf("%") !== -1 && parseFloat(t.replace("%", "")) === 100 && (a = `${i}full`), t === "0px" && (a = "min-h-0"), t === "100vh" && (a = "min-h-screen");
|
|
163
164
|
break;
|
|
164
165
|
case "fontSize":
|
|
165
|
-
const
|
|
166
|
+
const u = {
|
|
166
167
|
"12px": "xs",
|
|
167
168
|
"14px": "sm",
|
|
168
169
|
"16px": "base",
|
|
@@ -177,7 +178,7 @@ const se = (e) => {
|
|
|
177
178
|
"96px": "8xl",
|
|
178
179
|
"128px": "9xl"
|
|
179
180
|
};
|
|
180
|
-
|
|
181
|
+
m(d(u), t) && (a = i + u[t]);
|
|
181
182
|
break;
|
|
182
183
|
case "lineHeight":
|
|
183
184
|
const x = {
|
|
@@ -196,13 +197,13 @@ const se = (e) => {
|
|
|
196
197
|
"1.625": "relaxed",
|
|
197
198
|
2: "loose"
|
|
198
199
|
};
|
|
199
|
-
|
|
200
|
+
m(d(x), t) && (a = i + x[t]);
|
|
200
201
|
break;
|
|
201
202
|
case "zIndex":
|
|
202
203
|
a = ["0", "10", "20", "30", "40", "50"].indexOf(t) !== -1 ? `${i}${t}` : e;
|
|
203
204
|
break;
|
|
204
205
|
case "opacity":
|
|
205
|
-
const
|
|
206
|
+
const b = [
|
|
206
207
|
"0",
|
|
207
208
|
"5",
|
|
208
209
|
"10",
|
|
@@ -218,15 +219,15 @@ const se = (e) => {
|
|
|
218
219
|
"90",
|
|
219
220
|
"95",
|
|
220
221
|
"100"
|
|
221
|
-
],
|
|
222
|
-
|
|
222
|
+
], f = parseFloat(t) * 100;
|
|
223
|
+
m(b, f.toString()) && (a = `opacity-${f}`);
|
|
223
224
|
break;
|
|
224
225
|
default:
|
|
225
226
|
break;
|
|
226
227
|
}
|
|
227
228
|
return a;
|
|
228
229
|
};
|
|
229
|
-
var
|
|
230
|
+
var z = {}, F = {};
|
|
230
231
|
(function(e) {
|
|
231
232
|
"use strict";
|
|
232
233
|
Object.defineProperty(e, "__esModule", {
|
|
@@ -234,17 +235,17 @@ var k = {}, z = {};
|
|
|
234
235
|
}), Object.defineProperty(e, "cloneDeep", {
|
|
235
236
|
enumerable: !0,
|
|
236
237
|
get: function() {
|
|
237
|
-
return
|
|
238
|
+
return o;
|
|
238
239
|
}
|
|
239
240
|
});
|
|
240
|
-
function
|
|
241
|
-
return Array.isArray(r) ? r.map((
|
|
242
|
-
|
|
243
|
-
|
|
241
|
+
function o(r) {
|
|
242
|
+
return Array.isArray(r) ? r.map((n) => o(n)) : typeof r == "object" && r !== null ? Object.fromEntries(Object.entries(r).map(([n, t]) => [
|
|
243
|
+
n,
|
|
244
|
+
o(t)
|
|
244
245
|
])) : r;
|
|
245
246
|
}
|
|
246
|
-
})(
|
|
247
|
-
var
|
|
247
|
+
})(F);
|
|
248
|
+
var q = {
|
|
248
249
|
content: [],
|
|
249
250
|
presets: [],
|
|
250
251
|
darkMode: "media",
|
|
@@ -872,7 +873,7 @@ var V = {
|
|
|
872
873
|
max: "max-content",
|
|
873
874
|
fit: "fit-content"
|
|
874
875
|
}),
|
|
875
|
-
maxWidth: ({ theme: e, breakpoints:
|
|
876
|
+
maxWidth: ({ theme: e, breakpoints: o }) => ({
|
|
876
877
|
none: "none",
|
|
877
878
|
0: "0rem",
|
|
878
879
|
xs: "20rem",
|
|
@@ -891,7 +892,7 @@ var V = {
|
|
|
891
892
|
max: "max-content",
|
|
892
893
|
fit: "fit-content",
|
|
893
894
|
prose: "65ch",
|
|
894
|
-
...
|
|
895
|
+
...o(e("screens"))
|
|
895
896
|
}),
|
|
896
897
|
minHeight: {
|
|
897
898
|
0: "0px",
|
|
@@ -1245,81 +1246,155 @@ var V = {
|
|
|
1245
1246
|
return t;
|
|
1246
1247
|
}
|
|
1247
1248
|
});
|
|
1248
|
-
const
|
|
1249
|
-
function
|
|
1249
|
+
const o = F, r = /* @__PURE__ */ n(q);
|
|
1250
|
+
function n(i) {
|
|
1250
1251
|
return i && i.__esModule ? i : {
|
|
1251
1252
|
default: i
|
|
1252
1253
|
};
|
|
1253
1254
|
}
|
|
1254
|
-
const t = (0,
|
|
1255
|
-
})(
|
|
1256
|
-
let
|
|
1257
|
-
var
|
|
1258
|
-
const
|
|
1259
|
-
|
|
1260
|
-
|
|
1255
|
+
const t = (0, o.cloneDeep)(r.default.theme);
|
|
1256
|
+
})(z);
|
|
1257
|
+
let h = z;
|
|
1258
|
+
var K = (h.__esModule ? h : { default: h }).default;
|
|
1259
|
+
const k = /* @__PURE__ */ C(K);
|
|
1260
|
+
var O = {}, S = {};
|
|
1261
|
+
(function(e) {
|
|
1262
|
+
"use strict";
|
|
1263
|
+
Object.defineProperty(e, "__esModule", {
|
|
1264
|
+
value: !0
|
|
1265
|
+
}), Object.defineProperty(e, "default", {
|
|
1266
|
+
enumerable: !0,
|
|
1267
|
+
get: function() {
|
|
1268
|
+
return r;
|
|
1269
|
+
}
|
|
1270
|
+
});
|
|
1271
|
+
function o(n, t) {
|
|
1272
|
+
return {
|
|
1273
|
+
handler: n,
|
|
1274
|
+
config: t
|
|
1275
|
+
};
|
|
1276
|
+
}
|
|
1277
|
+
o.withOptions = function(n, t = () => ({})) {
|
|
1278
|
+
const i = function(a) {
|
|
1279
|
+
return {
|
|
1280
|
+
__options: a,
|
|
1281
|
+
handler: n(a),
|
|
1282
|
+
config: t(a)
|
|
1283
|
+
};
|
|
1284
|
+
};
|
|
1285
|
+
return i.__isOptionsFunction = !0, i.__pluginFunction = n, i.__configFunction = t, i;
|
|
1286
|
+
};
|
|
1287
|
+
const r = o;
|
|
1288
|
+
})(S);
|
|
1289
|
+
(function(e) {
|
|
1290
|
+
"use strict";
|
|
1291
|
+
Object.defineProperty(e, "__esModule", {
|
|
1292
|
+
value: !0
|
|
1293
|
+
}), Object.defineProperty(e, "default", {
|
|
1294
|
+
enumerable: !0,
|
|
1295
|
+
get: function() {
|
|
1296
|
+
return n;
|
|
1297
|
+
}
|
|
1298
|
+
});
|
|
1299
|
+
const o = /* @__PURE__ */ r(S);
|
|
1300
|
+
function r(t) {
|
|
1301
|
+
return t && t.__esModule ? t : {
|
|
1302
|
+
default: t
|
|
1303
|
+
};
|
|
1304
|
+
}
|
|
1305
|
+
const n = o.default;
|
|
1306
|
+
})(O);
|
|
1307
|
+
let y = O;
|
|
1308
|
+
var N = (y.__esModule ? y : { default: y }).default;
|
|
1309
|
+
const J = /* @__PURE__ */ C(N);
|
|
1310
|
+
async function Q(e, o, r = [], n = "c-", t = !1) {
|
|
1311
|
+
const i = l(e, "primaryColor", "#000"), a = l(e, "secondaryColor", "#ccc"), g = l(e, "headingFont", "Inter"), u = l(e, "bodyFont", "Inter"), x = l(e, "roundedCorners", "0"), w = l(e, "bodyBgLightColor", "#fff"), b = l(e, "bodyBgDarkColor", "#000"), f = l(e, "bodyTextDarkColor", "#000"), p = l(e, "bodyTextLightColor", "#fff"), s = {
|
|
1312
|
+
"bg-light": w,
|
|
1313
|
+
"bg-dark": b,
|
|
1314
|
+
"text-dark": f,
|
|
1315
|
+
"text-light": p
|
|
1316
|
+
}, D = V([
|
|
1261
1317
|
{ color: i, name: "primary" },
|
|
1262
1318
|
{ color: a, name: "secondary" }
|
|
1263
1319
|
]);
|
|
1264
|
-
return
|
|
1320
|
+
return await M({
|
|
1265
1321
|
tailwindConfig: {
|
|
1266
1322
|
darkMode: "class",
|
|
1267
1323
|
safelist: r,
|
|
1268
1324
|
theme: {
|
|
1325
|
+
container: {
|
|
1326
|
+
center: !0,
|
|
1327
|
+
padding: "1rem",
|
|
1328
|
+
screens: { "2xl": "1400px" }
|
|
1329
|
+
},
|
|
1269
1330
|
fontFamily: {
|
|
1270
|
-
heading: [
|
|
1271
|
-
body: [
|
|
1331
|
+
heading: [g, ...k.fontFamily.sans],
|
|
1332
|
+
body: [u, ...k.fontFamily.sans]
|
|
1272
1333
|
},
|
|
1273
1334
|
extend: {
|
|
1274
1335
|
borderRadius: {
|
|
1275
|
-
|
|
1336
|
+
DEFAULT: `${x || "0px"}px`
|
|
1276
1337
|
},
|
|
1277
|
-
colors:
|
|
1338
|
+
colors: { ...s, ...D }
|
|
1278
1339
|
}
|
|
1279
1340
|
},
|
|
1280
|
-
plugins: [
|
|
1341
|
+
plugins: [
|
|
1342
|
+
I,
|
|
1343
|
+
$,
|
|
1344
|
+
W,
|
|
1345
|
+
J(function({ addBase: E, theme: c }) {
|
|
1346
|
+
E({
|
|
1347
|
+
"h1,h2,h3,h4,h5,h6": {
|
|
1348
|
+
fontFamily: c("fontFamily.heading")
|
|
1349
|
+
},
|
|
1350
|
+
body: {
|
|
1351
|
+
fontFamily: c("fontFamily.body"),
|
|
1352
|
+
color: c("colors.text-light"),
|
|
1353
|
+
backgroundColor: c("colors.bg-light")
|
|
1354
|
+
},
|
|
1355
|
+
".dark body": {
|
|
1356
|
+
color: c("colors.text-dark"),
|
|
1357
|
+
backgroundColor: c("colors.bg-dark")
|
|
1358
|
+
}
|
|
1359
|
+
});
|
|
1360
|
+
})
|
|
1361
|
+
],
|
|
1281
1362
|
corePlugins: { preflight: t },
|
|
1282
|
-
...
|
|
1363
|
+
...n ? { prefix: `${n}` } : {}
|
|
1283
1364
|
}
|
|
1284
1365
|
}).generateStylesFromContent(
|
|
1285
1366
|
` ${t ? "@tailwind base;" : ""}
|
|
1286
1367
|
@tailwind components;
|
|
1287
1368
|
@tailwind utilities;`,
|
|
1288
|
-
n
|
|
1289
|
-
)}
|
|
1290
|
-
.${o}bg-clip-text{background-clip: text;-webkit-background-clip: text;} h1,h2,h3,h4,h5,h6{font-family: "${c}",${b.fontFamily.sans.join(
|
|
1291
|
-
", "
|
|
1292
|
-
)};}`;
|
|
1293
|
-
}
|
|
1294
|
-
const Y = (e, n) => e.map((r) => {
|
|
1295
|
-
const o = {};
|
|
1296
|
-
return Object.keys(r).forEach((t) => {
|
|
1297
|
-
v(r[t], H) && (o[t] = E(r[t], n));
|
|
1298
|
-
}), o;
|
|
1299
|
-
}), S = (e, n, r = "c-", o = !1) => {
|
|
1300
|
-
const t = A(n, r);
|
|
1301
|
-
return X(
|
|
1302
|
-
n,
|
|
1303
|
-
[O(JSON.stringify(Y(e, r)), /#styles:/g, "")],
|
|
1304
|
-
t.split(" ").concat(`${r}inline-block`, `${r}w-full`, `${r}h-full`),
|
|
1305
|
-
r,
|
|
1306
1369
|
o
|
|
1307
1370
|
);
|
|
1308
|
-
}
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1371
|
+
}
|
|
1372
|
+
const Z = (e, o) => e.map((r) => {
|
|
1373
|
+
const n = {};
|
|
1374
|
+
return Object.keys(r).forEach((t) => {
|
|
1375
|
+
U(r[t], B) && (n[t] = H(r[t], o));
|
|
1376
|
+
}), n;
|
|
1377
|
+
}), v = (e, o, r = "", n = !1) => Q(
|
|
1378
|
+
o,
|
|
1379
|
+
[R(JSON.stringify(Z(e, r)), /#styles:/g, "")],
|
|
1380
|
+
[],
|
|
1381
|
+
r,
|
|
1382
|
+
n
|
|
1383
|
+
), be = async (e, o = "", r = !1) => {
|
|
1384
|
+
const n = e.page.blocks;
|
|
1385
|
+
return await v(n, e.project.brandingOptions, o, r);
|
|
1386
|
+
}, he = async (e, o, r = "", n = !0) => await v(e, o, r, n);
|
|
1312
1387
|
export {
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1388
|
+
H as addPrefixToClasses,
|
|
1389
|
+
_e as cn,
|
|
1390
|
+
fe as convertArbitraryToTailwindClass,
|
|
1391
|
+
Se as convertToBlocks,
|
|
1392
|
+
ke as generateUUID,
|
|
1393
|
+
Fe as getBlocksFromHTML,
|
|
1394
|
+
v as getBlocksTailwindCSS,
|
|
1395
|
+
ve as getBrandingClasses,
|
|
1396
|
+
Ce as getBreakpointValue,
|
|
1397
|
+
he as getStylesForBlocks,
|
|
1398
|
+
be as getStylesForPageData,
|
|
1399
|
+
Q as getTailwindCSS
|
|
1325
1400
|
};
|
|
@@ -1 +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("./ChaiBuilderEditor-
|
|
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("./ChaiBuilderEditor-EtQOC5uy.cjs"),x=require("./index-HjN7LtDT.cjs");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("lodash-es");require("./STRINGS-gPz7CUOk.cjs");require("./Functions-N3yhPYKY.cjs");require("tailwind-merge");require("@chaibuilder/runtime");require("@react-hookz/web");require("./MODIFIERS-YPHRtwrM.cjs");require("tree-model");require("./utils-K3Zk762G.cjs");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-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("lucide-react");require("./core.cjs");require("sonner");require("./html-to-json-VPWiWWGH.cjs");require("himalaya");const m=u.lazy(()=>Promise.resolve().then(()=>require("./single-page-detail-To8TcpgJ.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,8 +1,8 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
2
|
import s, { useState as p, Suspense as l } from "react";
|
|
3
3
|
import { ChevronRightIcon as c, GearIcon as u, HomeIcon as d, FileTextIcon as x } from "@radix-ui/react-icons";
|
|
4
|
-
import { aP as g, aQ as h, aR as f } from "./ChaiBuilderEditor-
|
|
5
|
-
import { d as j, a as N, c as P } from "./index-
|
|
4
|
+
import { aP as g, aQ as h, aR as f } from "./ChaiBuilderEditor-dKHRL-Es.js";
|
|
5
|
+
import { d as j, a as N, c as P } from "./index-po-naEa5.js";
|
|
6
6
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
7
7
|
import "clsx";
|
|
8
8
|
import "react-dom";
|
|
@@ -48,7 +48,7 @@ import "./core.js";
|
|
|
48
48
|
import "sonner";
|
|
49
49
|
import "./html-to-json-Z6R2o_fA.js";
|
|
50
50
|
import "himalaya";
|
|
51
|
-
const b = s.lazy(() => import("./single-page-detail-
|
|
51
|
+
const b = s.lazy(() => import("./single-page-detail-lQ8fujC5.js")), v = ({ pageData: r }) => {
|
|
52
52
|
const [t, i] = p("CLOSE");
|
|
53
53
|
return /* @__PURE__ */ e.jsxs(
|
|
54
54
|
g,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { j as i } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
2
|
import * as l from "react";
|
|
3
|
-
import { bf as n } from "./ChaiBuilderEditor-
|
|
3
|
+
import { bf as n } from "./ChaiBuilderEditor-dKHRL-Es.js";
|
|
4
4
|
import { l as c, q as d } from "./controls-VTdJhdSz.js";
|
|
5
|
-
import { F as u } from "./form-
|
|
6
|
-
import { a as x } from "./index-
|
|
5
|
+
import { F as u } from "./form-Sgpl2fXL.js";
|
|
6
|
+
import { a as x } from "./index-po-naEa5.js";
|
|
7
7
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
8
8
|
import "clsx";
|
|
9
9
|
import "react-dom";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("./jsx-runtime-Z_BpKhVy.cjs"),a=require("react"),f=require("./ChaiBuilderEditor-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("./jsx-runtime-Z_BpKhVy.cjs"),a=require("react"),f=require("./ChaiBuilderEditor-EtQOC5uy.cjs"),o=require("./controls-jWJDao88.cjs"),d=require("./form-KBtrnNWh.cjs"),m=require("./index-HjN7LtDT.cjs");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("lodash-es");require("./STRINGS-gPz7CUOk.cjs");require("./Functions-N3yhPYKY.cjs");require("tailwind-merge");require("@chaibuilder/runtime");require("@react-hookz/web");require("./MODIFIERS-YPHRtwrM.cjs");require("tree-model");require("./utils-K3Zk762G.cjs");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-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("lucide-react");require("@rjsf/core");require("@rjsf/validator-ajv8");require("./core.cjs");require("sonner");require("./html-to-json-VPWiWWGH.cjs");require("himalaya");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.l({title:"Project Name",default:e==null?void 0:e.name}),favicon:o.q({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,12 +1,12 @@
|
|
|
1
1
|
import { j as s } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
2
|
import { b as c, l as u, g, q as x } from "./controls-VTdJhdSz.js";
|
|
3
|
-
import { F as v } from "./form-
|
|
3
|
+
import { F as v } from "./form-Sgpl2fXL.js";
|
|
4
4
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import "lodash-es";
|
|
7
7
|
import "@rjsf/core";
|
|
8
8
|
import "@rjsf/validator-ajv8";
|
|
9
|
-
import "./ChaiBuilderEditor-
|
|
9
|
+
import "./ChaiBuilderEditor-dKHRL-Es.js";
|
|
10
10
|
import "clsx";
|
|
11
11
|
import "react-dom";
|
|
12
12
|
import "@radix-ui/react-scroll-area";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./jsx-runtime-Z_BpKhVy.cjs"),i=require("./controls-jWJDao88.cjs"),g=require("./form-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./jsx-runtime-Z_BpKhVy.cjs"),i=require("./controls-jWJDao88.cjs"),g=require("./form-KBtrnNWh.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("react");require("lodash-es");require("@rjsf/core");require("@rjsf/validator-ajv8");require("./ChaiBuilderEditor-EtQOC5uy.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("tree-model");require("./utils-K3Zk762G.cjs");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-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("lucide-react");const D=({_projectData:e,seany:n})=>{var t,u,q,o,s,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:((q=e.seoData)==null?void 0:q.image)||""},properties:{title:i.l({title:"Default Title",default:((o=e.seoData)==null?void 0:o.title)||""}),description:i.g({title:"Default Description",default:((s=e.seoData)==null?void 0:s.description)||""}),image:i.q({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
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./jsx-runtime-Z_BpKhVy.cjs"),d=require("react"),r=require("lodash-es"),T=require("tailwind-merge"),a=require("./STRINGS-gPz7CUOk.cjs"),_=require("./functions-yvRwasT2.cjs"),Y=require("@chaibuilder/runtime"),C=require("react-wrap-balancer"),B=require("./MODIFIERS-YPHRtwrM.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("lodash");const O=t=>{const n={};return Object.keys(t).forEach(e=>{r.isString(t[e])&&t[e].startsWith(a.SLOT_KEY)&&(n[e]=t[e].replace(a.SLOT_KEY,"").split(","))}),n},L=r.memoize((t,n)=>{const e=t.replace(a.STYLES_KEY,"").split(","),s=T.twMerge(e[0],e[1]);return n?_.addPrefixToClasses(s,n).replace(a.STYLES_KEY,"").trim():s.replace(a.STYLES_KEY,"").trim()});function A(t,n){return r.get(t,`${n}_attrs`,{})}function K(t,n){const e={};return Object.keys(t).forEach(s=>{if(r.isString(t[s])&&t[s].startsWith(a.STYLES_KEY)){const i=L(t[s],n);e[s]={className:i,...A(t,s)}}}),e}function q(t,n){const e=r.get(t,"_bindings",{});return r.isEmpty(e)?{...t}:(r.each(e,(s,i)=>{r.isString(s)&&r.get(n,s,null)&&(t[i]=r.get(n,s,null))}),t)}function y(t){const{components:n,blocks:e,parent:s,classPrefix:i="",externalData:u={}}=t,g=e,h=l=>K(l,i),c=s?r.filter(e,{_parent:s}):r.filter(e,l=>r.isEmpty(l._parent));return o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:d.Children.toArray(c.map((l,f)=>{const E=O(l),x={};r.isEmpty(E)||Object.keys(E).forEach(m=>{x[m]=d.Children.toArray(E[m].map(R=>o.jsxRuntimeExports.jsx(y,{externalData:u,classPrefix:i,blocks:g,parent:R,components:n})))});const S=r.filter(g,{_parent:l._id});x.children=S.length>0?o.jsxRuntimeExports.jsx(y,{externalData:u,classPrefix:i,parent:l._id,blocks:g,components:n}):null;const p=r.get(n,l._type,null);if(p!==null){let m=l;const R=p;return d.createElement(R,r.omit({...m,index:f,...q(l,u),...h(m),...x},["_parent"]))}return o.jsxRuntimeExports.jsxs("noscript",{children:[l._type," not found"]})}))})}const N=t=>{const n={};return Object.keys(t).forEach(e=>{r.isString(t[e])&&t[e].startsWith(a.SLOT_KEY)&&(n[e]=t[e].replace(a.SLOT_KEY,"").split(","))}),n},$=r.memoize((t,n)=>{const e=t.replace(a.STYLES_KEY,"").split(","),s=T.twMerge(e[0],e[1]);return n===""?s.replace(a.STYLES_KEY,"").trim():_.addPrefixToClasses(s,n).replace(a.STYLES_KEY,"").trim()});function F(t,n){return r.get(t,`${n}_attrs`,{})}function I(t,n){const e={};return Object.keys(t).forEach(s=>{if(r.isString(t[s])&&t[s].startsWith(a.STYLES_KEY)){const i=$(t[s],n);e[s]={className:i,...F(t,s)}}}),e}function W(t,n){const e=r.get(t,"_bindings",{});return r.isEmpty(e)?{...t}:(r.each(e,(s,i)=>{r.isString(s)&&r.get(n,s,null)&&(t[i]=r.get(n,s,null))}),t)}function j({blocks:t,parent:n,classPrefix:e="",externalData:s={},blockModifierCallback:i}){const u=t,g=c=>I(c,e),h=n?r.filter(t,{_parent:n}):r.filter(t,c=>r.isEmpty(c._parent));return o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:d.Children.toArray(h.map((c,l)=>{const f=N(c),E={};r.isEmpty(f)||Object.keys(f).forEach(p=>{E[p]=d.Children.toArray(f[p].map(m=>o.jsxRuntimeExports.jsx(j,{externalData:s,classPrefix:e,blocks:u,parent:m})))});const x=r.filter(u,{_parent:c._id});E.children=x.length>0?o.jsxRuntimeExports.jsx(j,{externalData:s,classPrefix:e,parent:c._id,blocks:u}):null;const S=Y.getBlockComponent(c._type);if(S!==null){let p=c;const m=S.component;return p={...S.defaults,...c},i&&(p=i(p)),d.createElement(m,r.omit({blockProps:{},inBuilder:!1,...p,index:l,...W(c,s),...g(p),...E},["_parent"]))}return o.jsxRuntimeExports.jsxs("noscript",{children:[c._type," not found"]})}))})}const M=({pageData:t,externalData:n={},before:e=null,after:s=null,classPrefix:i="c-"})=>{const u=r.get(t.project,"brandingOptions",B.BRANDING_OPTIONS_DEFAULTS);return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[e,o.jsxRuntimeExports.jsx("div",{className:i.replace("-","")+" "+_.getBrandingClasses(u,i)+" min-h-screen",children:o.jsxRuntimeExports.jsx(C.Provider,{children:o.jsxRuntimeExports.jsx(j,{externalData:n,blocks:t.page.blocks||[],classPrefix:i})})}),s]})};exports.convertToBlocks=_.convertToBlocks;exports.RenderChaiBlocks=j;exports.RenderChaiPage=M;exports.RenderUnregisteredComponents=y;
|
package/dist/render.d.ts
CHANGED
|
@@ -49,11 +49,12 @@ declare type ChaiPageProps = {
|
|
|
49
49
|
|
|
50
50
|
export declare const convertToBlocks: (jsonString: string) => ChaiBlock[];
|
|
51
51
|
|
|
52
|
-
export declare function RenderChaiBlocks({ blocks, parent, classPrefix, externalData, }: {
|
|
52
|
+
export declare function RenderChaiBlocks({ blocks, parent, classPrefix, externalData, blockModifierCallback, }: {
|
|
53
53
|
blocks: ChaiBlock[];
|
|
54
54
|
parent?: string;
|
|
55
55
|
classPrefix?: string;
|
|
56
56
|
externalData?: Record<string, any>;
|
|
57
|
+
blockModifierCallback?: (block: ChaiBlock) => ChaiBlock;
|
|
57
58
|
}): JSX_2.Element;
|
|
58
59
|
|
|
59
60
|
export declare const RenderChaiPage: ({ pageData, externalData, before, after, classPrefix, }: ChaiPageProps) => JSX_2.Element;
|