@chaibuilder/sdk 1.2.11 → 1.2.13
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-k2p8Hy1n.cjs → AddBlocks-tomDo_Is.cjs} +1 -1
- package/dist/{AddBlocks-TSt8uJY4.js → AddBlocks-zN5--UP6.js} +11 -11
- package/dist/{BrandingOptions-WyVWfFVz.cjs → BrandingOptions-BUmE4f72.cjs} +1 -1
- package/dist/{BrandingOptions-uFTyYJZj.js → BrandingOptions-LbizrmRI.js} +2 -2
- package/dist/{CanvasArea-iRQqpOak.js → CanvasArea-OSH8wqt1.js} +22 -22
- package/dist/{CanvasArea-5erOZYLy.cjs → CanvasArea-nT6ZJh_V.cjs} +1 -1
- package/dist/{CurrentPage-RCxTz9Mc.js → CurrentPage-FzqNBLy4.js} +3 -3
- package/dist/{CurrentPage-NzmJloN7.cjs → CurrentPage-SWR9WU4k.cjs} +1 -1
- package/dist/{Layers-xDG7oltg.cjs → Layers-FRHRlPIH.cjs} +1 -1
- package/dist/{Layers-tXB5Pwid.js → Layers-g5_pwwgO.js} +57 -57
- package/dist/{PagesPanel-72nzYB1k.cjs → PagesPanel-3jcf5-iH.cjs} +1 -1
- package/dist/{PagesPanel-Jaz9jvye.js → PagesPanel-PSg6aqlK.js} +4 -4
- package/dist/{ProjectPanel-RU0QvH6e.cjs → ProjectPanel-EyEcNyh8.cjs} +1 -1
- package/dist/{ProjectPanel--S014Xx3.js → ProjectPanel-XW_Bx880.js} +4 -4
- package/dist/{Settings-gjvl5V1k.js → Settings--7qJ7ciF.js} +60 -60
- package/dist/{Settings-5EuwaVb3.cjs → Settings-h1c8ukpI.cjs} +1 -1
- package/dist/{SidePanels-Fq3kRwR0.js → SidePanels-Lmj0Qkd1.js} +8 -8
- package/dist/{SidePanels-uNCxnGte.cjs → SidePanels-NbM1mfsY.cjs} +1 -1
- package/dist/{Topbar-JqW89xI5.cjs → Topbar-2sOsQD2d.cjs} +1 -1
- package/dist/{Topbar-m5dbbI1f.js → Topbar-xvrno03z.js} +4 -4
- package/dist/{UnsplashImages-vACw5hbK.cjs → UnsplashImages-EiYSWkBa.cjs} +1 -1
- package/dist/{UnsplashImages-GhBD6owT.js → UnsplashImages-hhPOf7kt.js} +7 -7
- package/dist/{UploadImages-PzHdEKHT.cjs → UploadImages-GGCExfQd.cjs} +1 -1
- package/dist/{UploadImages-S1HgxeGb.js → UploadImages-JKjE44i7.js} +1 -1
- package/dist/{add-page-modal-GAizM2Jw.cjs → add-page-modal-65wltt_4.cjs} +1 -1
- package/dist/{add-page-modal-2P5hGXOQ.js → add-page-modal-Bl6y65im.js} +13 -13
- package/dist/{confirm-alert-57Xq5foA.js → confirm-alert-Nw1JCtuu.js} +1 -1
- package/dist/{confirm-alert-Uf84DpdR.cjs → confirm-alert-_DCO6hCV.cjs} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +8 -0
- package/dist/core.js +39 -37
- package/dist/{delete-page-modal-MG42FdnU.cjs → delete-page-modal-Q3Si4nyd.cjs} +1 -1
- package/dist/{delete-page-modal-ix5IjaFW.js → delete-page-modal-tiJ2UA5f.js} +3 -3
- package/dist/email-blocks.cjs +1 -1
- package/dist/email-blocks.js +27 -27
- package/dist/email.cjs +1 -1
- package/dist/email.js +4 -4
- package/dist/{empty-slot-TF2kd-0X.cjs → empty-slot-2LSrWJaY.cjs} +1 -1
- package/dist/{empty-slot-MWycClTb.js → empty-slot-5FRrRq1E.js} +33 -33
- package/dist/{form-SYcFyACJ.js → form-lbFCPUoE.js} +1 -1
- package/dist/{form-KBb3kA8g.cjs → form-vNgf0kO2.cjs} +1 -1
- package/dist/{index-aiHDvS5v.cjs → index-bfKqnRvZ.cjs} +1 -1
- package/dist/{index-cM3eKmlx.cjs → index-hS9T9Nub.cjs} +33 -33
- package/dist/{index-pNYv0oAF.js → index-m9VziIOy.js} +307 -295
- package/dist/{index-Fj3ead-J.js → index-wwk4px_E.js} +2069 -2059
- package/dist/{page-viewer-VxqOevr4.js → page-viewer-rLCyM4QC.js} +4 -4
- package/dist/{page-viewer-Sh99FGYk.cjs → page-viewer-w-ahza8q.cjs} +1 -1
- package/dist/{project-general-setting-VTLHa-Ik.cjs → project-general-setting-RTcIwUWc.cjs} +1 -1
- package/dist/{project-general-setting-nWOjPiin.js → project-general-setting-pY-Mkc8G.js} +4 -4
- package/dist/{project-seo-setting-70bWTwsB.js → project-seo-setting-9V67NFil.js} +3 -3
- package/dist/{project-seo-setting-ENAKc2Dl.cjs → project-seo-setting-aRDdqu88.cjs} +1 -1
- package/dist/{single-page-detail-3z7TF-Yy.js → single-page-detail-HYX4R3U0.js} +5 -5
- package/dist/{single-page-detail-6L38HJC4.cjs → single-page-detail-wHDpn40R.cjs} +1 -1
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +3 -3
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +25 -25
- package/dist/{useAddBlockByDrop-7mUMwNSG.cjs → useAddBlockByDrop-1WvPoBXa.cjs} +1 -1
- package/dist/{useAddBlockByDrop-tjQ5DgiO.js → useAddBlockByDrop-bs_SH7Tw.js} +1 -1
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.js +129 -129
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as m from "react";
|
|
2
|
-
import et, { createContext as Ms, useContext as Ds, useRef as vr, createElement as yr, useReducer as Es, useEffect as Ce, useDebugValue as Os, useCallback as
|
|
2
|
+
import et, { createContext as Ms, useContext as Ds, useRef as vr, createElement as yr, useReducer as Es, useEffect as Ce, useDebugValue as Os, useCallback as L, useMemo as Ls, useState as Be, Suspense as ht } from "react";
|
|
3
3
|
import { has as pe, get as F, flatten as ne, filter as M, omit as Oe, isEmpty as ve, isString as Et, find as te, map as R, each as ue, set as Se, includes as q, isUndefined as Nr, without as Ot, forIn as Lt, isObject as zs, first as Q, noop as Vs, keys as $s, startsWith as zt, isNull as qe, pick as vt, sortBy as yt } from "lodash-es";
|
|
4
4
|
import { g as ce, a as Fs } from "./Functions-7jnEwJyw.js";
|
|
5
5
|
import { getBlockComponent as Le } from "@chaibuilder/runtime";
|
|
6
|
-
import { atom as w, useAtomValue as X, useAtom as D, useSetAtom as
|
|
6
|
+
import { atom as w, useAtomValue as X, useAtom as D, useSetAtom as _e } from "jotai";
|
|
7
7
|
import Vt from "flat-to-nested";
|
|
8
8
|
import { a as me, I as $t, S as Ke, B as Je } from "./MODIFIERS-RiXS5Mn1.js";
|
|
9
9
|
import { g as Us } from "./_commonjsHelpers-UyOWmZb0.js";
|
|
@@ -11,7 +11,7 @@ import { useThrottledCallback as Ws } from "@react-hookz/web";
|
|
|
11
11
|
import { j as a } from "./jsx-runtime-WbnYoNE9.js";
|
|
12
12
|
import * as Ft from "@radix-ui/react-toggle";
|
|
13
13
|
import { cva as ge } from "class-variance-authority";
|
|
14
|
-
import { a as d, c as
|
|
14
|
+
import { a as d, c as Ie } from "./Class-17XFhL48.js";
|
|
15
15
|
import * as Ye from "@radix-ui/react-switch";
|
|
16
16
|
import { Slot as Gs } from "@radix-ui/react-slot";
|
|
17
17
|
import * as fe from "@radix-ui/react-accordion";
|
|
@@ -25,7 +25,7 @@ import * as ye from "@radix-ui/react-tooltip";
|
|
|
25
25
|
import * as Ae from "@radix-ui/react-popover";
|
|
26
26
|
import * as C from "@radix-ui/react-menubar";
|
|
27
27
|
import * as Ve from "@radix-ui/react-hover-card";
|
|
28
|
-
import * as
|
|
28
|
+
import * as z from "@radix-ui/react-select";
|
|
29
29
|
import * as T from "@radix-ui/react-dropdown-menu";
|
|
30
30
|
import * as Wt from "@radix-ui/react-separator";
|
|
31
31
|
import * as Y from "@radix-ui/react-toast";
|
|
@@ -46,17 +46,17 @@ function oe(e, t) {
|
|
|
46
46
|
typeof r == "function" ? r(n(o)) : r
|
|
47
47
|
)), t && (o.write = t), o;
|
|
48
48
|
}
|
|
49
|
-
const Fe = (e) => "init" in e, Ue = (e) => !!e.write,
|
|
50
|
-
|
|
51
|
-
}).finally(() =>
|
|
49
|
+
const Fe = (e) => "init" in e, Ue = (e) => !!e.write, Ee = /* @__PURE__ */ new WeakMap(), eo = (e, t) => {
|
|
50
|
+
Ee.set(e, t), e.catch(() => {
|
|
51
|
+
}).finally(() => Ee.delete(e));
|
|
52
52
|
}, wt = (e, t) => {
|
|
53
|
-
const s =
|
|
54
|
-
s && (
|
|
53
|
+
const s = Ee.get(e);
|
|
54
|
+
s && (Ee.delete(e), s(t));
|
|
55
55
|
}, Nt = (e, t) => {
|
|
56
56
|
e.status = "fulfilled", e.value = t;
|
|
57
57
|
}, kt = (e, t) => {
|
|
58
58
|
e.status = "rejected", e.reason = t;
|
|
59
|
-
}, to = (e) => typeof (e == null ? void 0 : e.then) == "function", Ne = (e, t) => "v" in e && "v" in t && Object.is(e.v, t.v), jt = (e, t) => "e" in e && "e" in t && Object.is(e.e, t.e), he = (e) => "v" in e && e.v instanceof Promise, so = (e, t) => "v" in e && "v" in t && e.v.orig && e.v.orig === t.v.orig,
|
|
59
|
+
}, to = (e) => typeof (e == null ? void 0 : e.then) == "function", Ne = (e, t) => "v" in e && "v" in t && Object.is(e.v, t.v), jt = (e, t) => "e" in e && "e" in t && Object.is(e.e, t.e), he = (e) => "v" in e && e.v instanceof Promise, so = (e, t) => "v" in e && "v" in t && e.v.orig && e.v.orig === t.v.orig, Pe = (e) => {
|
|
60
60
|
if ("e" in e)
|
|
61
61
|
throw e.e;
|
|
62
62
|
return e.v;
|
|
@@ -74,8 +74,8 @@ const Fe = (e) => "init" in e, Ue = (e) => !!e.write, De = /* @__PURE__ */ new W
|
|
|
74
74
|
}, p = (u, g, v) => {
|
|
75
75
|
const b = /* @__PURE__ */ new Map();
|
|
76
76
|
let y = !1;
|
|
77
|
-
v.forEach((h,
|
|
78
|
-
!h &&
|
|
77
|
+
v.forEach((h, j) => {
|
|
78
|
+
!h && j === u && (h = g), h ? (b.set(j, h), g.d.get(j) !== h && (y = !0)) : (V ? "production" : void 0) !== "production" && console.warn("[Bug] atom state not found");
|
|
79
79
|
}), (y || g.d.size !== b.size) && (g.d = b);
|
|
80
80
|
}, l = (u, g, v) => {
|
|
81
81
|
const b = r(u), y = {
|
|
@@ -93,7 +93,7 @@ const Fe = (e) => "init" in e, Ue = (e) => !!e.write, De = /* @__PURE__ */ new W
|
|
|
93
93
|
}, f = (u, g, v, b) => {
|
|
94
94
|
if (to(g)) {
|
|
95
95
|
let y;
|
|
96
|
-
const h = new Promise((
|
|
96
|
+
const h = new Promise((j, E) => {
|
|
97
97
|
let S = !1;
|
|
98
98
|
g.then(
|
|
99
99
|
(B) => {
|
|
@@ -104,7 +104,7 @@ const Fe = (e) => "init" in e, Ue = (e) => !!e.write, De = /* @__PURE__ */ new W
|
|
|
104
104
|
h,
|
|
105
105
|
v
|
|
106
106
|
);
|
|
107
|
-
Nt(h, B),
|
|
107
|
+
Nt(h, B), j(B), (A == null ? void 0 : A.d) !== ee.d && J(u, ee, A == null ? void 0 : A.d);
|
|
108
108
|
}
|
|
109
109
|
},
|
|
110
110
|
(B) => {
|
|
@@ -122,11 +122,11 @@ const Fe = (e) => "init" in e, Ue = (e) => !!e.write, De = /* @__PURE__ */ new W
|
|
|
122
122
|
S || (S = !0, B.then(
|
|
123
123
|
(A) => Nt(h, A),
|
|
124
124
|
(A) => kt(h, A)
|
|
125
|
-
),
|
|
125
|
+
), j(B));
|
|
126
126
|
};
|
|
127
127
|
});
|
|
128
|
-
return h.orig = g, h.status = "pending", eo(h, (
|
|
129
|
-
|
|
128
|
+
return h.orig = g, h.status = "pending", eo(h, (j) => {
|
|
129
|
+
j && y(j), b == null || b();
|
|
130
130
|
}), l(u, h, v);
|
|
131
131
|
}
|
|
132
132
|
return l(u, g, v);
|
|
@@ -152,24 +152,24 @@ const Fe = (e) => "init" in e, Ue = (e) => !!e.write, De = /* @__PURE__ */ new W
|
|
|
152
152
|
if (S === u) {
|
|
153
153
|
const A = r(S);
|
|
154
154
|
if (A)
|
|
155
|
-
return v.set(S, A),
|
|
155
|
+
return v.set(S, A), Pe(A);
|
|
156
156
|
if (Fe(S))
|
|
157
157
|
return v.set(S, void 0), S.init;
|
|
158
158
|
throw new Error("no atom init");
|
|
159
159
|
}
|
|
160
160
|
const B = N(S);
|
|
161
|
-
return v.set(S, B),
|
|
161
|
+
return v.set(S, B), Pe(B);
|
|
162
162
|
};
|
|
163
|
-
let h,
|
|
163
|
+
let h, j;
|
|
164
164
|
const E = {
|
|
165
165
|
get signal() {
|
|
166
166
|
return h || (h = new AbortController()), h.signal;
|
|
167
167
|
},
|
|
168
168
|
get setSelf() {
|
|
169
|
-
return (V ? "production" : void 0) !== "production" && !Ue(u) && console.warn("setSelf function cannot be used with read-only atom"), !
|
|
169
|
+
return (V ? "production" : void 0) !== "production" && !Ue(u) && console.warn("setSelf function cannot be used with read-only atom"), !j && Ue(u) && (j = (...S) => {
|
|
170
170
|
if ((V ? "production" : void 0) !== "production" && b && console.warn("setSelf function cannot be called in sync"), !b)
|
|
171
171
|
return $(u, ...S);
|
|
172
|
-
}),
|
|
172
|
+
}), j;
|
|
173
173
|
}
|
|
174
174
|
};
|
|
175
175
|
try {
|
|
@@ -185,7 +185,7 @@ const Fe = (e) => "init" in e, Ue = (e) => !!e.write, De = /* @__PURE__ */ new W
|
|
|
185
185
|
} finally {
|
|
186
186
|
b = !1;
|
|
187
187
|
}
|
|
188
|
-
},
|
|
188
|
+
}, k = (u) => Pe(N(u)), I = (u) => {
|
|
189
189
|
let g = t.get(u);
|
|
190
190
|
return g || (g = Z(u)), g;
|
|
191
191
|
}, O = (u, g) => !g.l.size && (!g.t.size || g.t.size === 1 && g.t.has(u)), W = (u) => {
|
|
@@ -193,8 +193,8 @@ const Fe = (e) => "init" in e, Ue = (e) => !!e.write, De = /* @__PURE__ */ new W
|
|
|
193
193
|
g && O(u, g) && le(u);
|
|
194
194
|
}, G = (u) => {
|
|
195
195
|
const g = /* @__PURE__ */ new Map(), v = /* @__PURE__ */ new WeakMap(), b = (h) => {
|
|
196
|
-
const
|
|
197
|
-
|
|
196
|
+
const j = t.get(h);
|
|
197
|
+
j == null || j.t.forEach((E) => {
|
|
198
198
|
E !== h && (g.set(
|
|
199
199
|
E,
|
|
200
200
|
(g.get(E) || /* @__PURE__ */ new Set()).add(h)
|
|
@@ -203,8 +203,8 @@ const Fe = (e) => "init" in e, Ue = (e) => !!e.write, De = /* @__PURE__ */ new W
|
|
|
203
203
|
};
|
|
204
204
|
b(u);
|
|
205
205
|
const y = (h) => {
|
|
206
|
-
const
|
|
207
|
-
|
|
206
|
+
const j = t.get(h);
|
|
207
|
+
j == null || j.t.forEach((E) => {
|
|
208
208
|
var S;
|
|
209
209
|
if (E !== h) {
|
|
210
210
|
let B = v.get(E);
|
|
@@ -223,15 +223,15 @@ const Fe = (e) => "init" in e, Ue = (e) => !!e.write, De = /* @__PURE__ */ new W
|
|
|
223
223
|
y(u);
|
|
224
224
|
}, H = (u, ...g) => {
|
|
225
225
|
let v = !0;
|
|
226
|
-
const b = (
|
|
226
|
+
const b = (j) => Pe(N(j)), y = (j, ...E) => {
|
|
227
227
|
let S;
|
|
228
|
-
if (
|
|
229
|
-
if (!Fe(
|
|
228
|
+
if (j === u) {
|
|
229
|
+
if (!Fe(j))
|
|
230
230
|
throw new Error("atom not writable");
|
|
231
|
-
const B = r(
|
|
232
|
-
(!B || !Ne(B, A)) && G(
|
|
231
|
+
const B = r(j), A = f(j, E[0]);
|
|
232
|
+
(!B || !Ne(B, A)) && G(j);
|
|
233
233
|
} else
|
|
234
|
-
S = H(
|
|
234
|
+
S = H(j, ...E);
|
|
235
235
|
if (!v) {
|
|
236
236
|
const B = ae();
|
|
237
237
|
(V ? "production" : void 0) !== "production" && n.forEach(
|
|
@@ -266,8 +266,8 @@ const Fe = (e) => "init" in e, Ue = (e) => !!e.write, De = /* @__PURE__ */ new W
|
|
|
266
266
|
const b = r(u);
|
|
267
267
|
b ? (he(b) && wt(b.v), b.d.forEach((y, h) => {
|
|
268
268
|
if (h !== u) {
|
|
269
|
-
const
|
|
270
|
-
|
|
269
|
+
const j = t.get(h);
|
|
270
|
+
j && (j.t.delete(u), O(h, j) && le(h));
|
|
271
271
|
}
|
|
272
272
|
})) : (V ? "production" : void 0) !== "production" && console.warn("[Bug] could not find atom state to unmount", u);
|
|
273
273
|
}, J = (u, g, v) => {
|
|
@@ -277,8 +277,8 @@ const Fe = (e) => "init" in e, Ue = (e) => !!e.write, De = /* @__PURE__ */ new W
|
|
|
277
277
|
b.delete(h);
|
|
278
278
|
return;
|
|
279
279
|
}
|
|
280
|
-
const
|
|
281
|
-
|
|
280
|
+
const j = t.get(h);
|
|
281
|
+
j && (j.t.delete(u), O(h, j) && le(h));
|
|
282
282
|
}), b.forEach((y) => {
|
|
283
283
|
const h = t.get(y);
|
|
284
284
|
h ? h.t.add(u) : t.has(u) && Z(y, u);
|
|
@@ -294,7 +294,7 @@ const Fe = (e) => "init" in e, Ue = (e) => !!e.write, De = /* @__PURE__ */ new W
|
|
|
294
294
|
const h = t.get(v);
|
|
295
295
|
h && !// TODO This seems pretty hacky. Hope to fix it.
|
|
296
296
|
// Maybe we could `mountDependencies` in `setAtomState`?
|
|
297
|
-
(b && !he(b) && (Ne(b, y) || jt(b, y))) && (h.l.forEach((
|
|
297
|
+
(b && !he(b) && (Ne(b, y) || jt(b, y))) && (h.l.forEach((j) => j()), (V ? "production" : void 0) !== "production" && u.add(v));
|
|
298
298
|
} else
|
|
299
299
|
(V ? "production" : void 0) !== "production" && console.warn("[Bug] no atom state to flush");
|
|
300
300
|
});
|
|
@@ -310,7 +310,7 @@ const Fe = (e) => "init" in e, Ue = (e) => !!e.write, De = /* @__PURE__ */ new W
|
|
|
310
310
|
};
|
|
311
311
|
};
|
|
312
312
|
return (V ? "production" : void 0) !== "production" ? {
|
|
313
|
-
get:
|
|
313
|
+
get: k,
|
|
314
314
|
set: $,
|
|
315
315
|
sub: re,
|
|
316
316
|
// store dev methods (these are tentative and subject to change without notice)
|
|
@@ -333,7 +333,7 @@ const Fe = (e) => "init" in e, Ue = (e) => !!e.write, De = /* @__PURE__ */ new W
|
|
|
333
333
|
);
|
|
334
334
|
}
|
|
335
335
|
} : {
|
|
336
|
-
get:
|
|
336
|
+
get: k,
|
|
337
337
|
set: $,
|
|
338
338
|
sub: re
|
|
339
339
|
};
|
|
@@ -384,7 +384,7 @@ function co(e, t) {
|
|
|
384
384
|
}
|
|
385
385
|
function uo(e, t) {
|
|
386
386
|
const s = Gt(t);
|
|
387
|
-
return
|
|
387
|
+
return L(
|
|
388
388
|
(...n) => {
|
|
389
389
|
if ((ao ? "production" : void 0) !== "production" && !("write" in e))
|
|
390
390
|
throw new Error("not writable atom");
|
|
@@ -414,12 +414,12 @@ function bo(e, t) {
|
|
|
414
414
|
if (p)
|
|
415
415
|
return p;
|
|
416
416
|
const l = c && s.get(c), f = [], x = [];
|
|
417
|
-
return r.forEach((N,
|
|
418
|
-
const I = t ? t(N) :
|
|
419
|
-
x[
|
|
417
|
+
return r.forEach((N, k) => {
|
|
418
|
+
const I = t ? t(N) : k;
|
|
419
|
+
x[k] = I;
|
|
420
420
|
const O = l && l.atomList[l.keyList.indexOf(I)];
|
|
421
421
|
if (O) {
|
|
422
|
-
f[
|
|
422
|
+
f[k] = O;
|
|
423
423
|
return;
|
|
424
424
|
}
|
|
425
425
|
const W = (H) => {
|
|
@@ -442,8 +442,8 @@ function bo(e, t) {
|
|
|
442
442
|
...J.slice(re + 1)
|
|
443
443
|
]);
|
|
444
444
|
};
|
|
445
|
-
f[
|
|
446
|
-
}), l && l.keyList.length === x.length && l.keyList.every((N,
|
|
445
|
+
f[k] = At(e) ? oe(W, G) : oe(W);
|
|
446
|
+
}), l && l.keyList.length === x.length && l.keyList.every((N, k) => N === x[k]) ? p = l : p = { arr: r, atomList: f, keyList: x }, s.set(r, p), p;
|
|
447
447
|
}, n = oe((r) => {
|
|
448
448
|
const c = r(n), p = r(e);
|
|
449
449
|
return o(p, c == null ? void 0 : c.arr);
|
|
@@ -574,7 +574,7 @@ function ho(e) {
|
|
|
574
574
|
const vo = ho(
|
|
575
575
|
() => typeof window < "u" ? window.localStorage : void 0
|
|
576
576
|
);
|
|
577
|
-
function
|
|
577
|
+
function Re(e, t, s = vo, o) {
|
|
578
578
|
const n = o == null ? void 0 : o.unstable_getOnInit, i = oe(
|
|
579
579
|
n ? s.getItem(e, t) : t
|
|
580
580
|
);
|
|
@@ -704,14 +704,14 @@ const Zt = w(() => !1);
|
|
|
704
704
|
Zt.debugLabel = "selectedBlockGridChildAtom";
|
|
705
705
|
const ct = w("");
|
|
706
706
|
ct.debugLabel = "styleStateAtom";
|
|
707
|
-
const es =
|
|
707
|
+
const es = Re("styleBreakpoint", "xs");
|
|
708
708
|
es.debugLabel = "styleBreakpointAtom";
|
|
709
709
|
const Hr = () => ({
|
|
710
710
|
flexChild: X(Xt),
|
|
711
711
|
gridChild: X(Zt)
|
|
712
712
|
}), qr = () => X(lt);
|
|
713
713
|
const $e = () => {
|
|
714
|
-
const [e, t] = D(rt), s =
|
|
714
|
+
const [e, t] = D(rt), s = L(
|
|
715
715
|
(o) => {
|
|
716
716
|
t((n) => q(n, o) ? Ot(n, o) : [...n, o]);
|
|
717
717
|
},
|
|
@@ -985,7 +985,7 @@ function Fo(e) {
|
|
|
985
985
|
}
|
|
986
986
|
const Uo = () => {
|
|
987
987
|
const [e] = Oo(), { currentPage: t } = zo(), [s] = we();
|
|
988
|
-
return
|
|
988
|
+
return L(() => {
|
|
989
989
|
const o = R(
|
|
990
990
|
s,
|
|
991
991
|
(r) => Oe(r, ["expanded", "order", "title", "siblings", "tempClasses"])
|
|
@@ -1039,7 +1039,7 @@ const is = () => {
|
|
|
1039
1039
|
return ve(s) ? o : pt(o, s);
|
|
1040
1040
|
}, Qr = () => {
|
|
1041
1041
|
const [e] = we(), [t, s] = $e(), { setNewBlocks: o } = xe();
|
|
1042
|
-
return
|
|
1042
|
+
return L(
|
|
1043
1043
|
(n) => {
|
|
1044
1044
|
var r;
|
|
1045
1045
|
const i = ((r = te(e, { _id: n[0] })) == null ? void 0 : r._parent) || null;
|
|
@@ -1096,10 +1096,10 @@ const Ho = () => {
|
|
|
1096
1096
|
updateBlocksProps: i
|
|
1097
1097
|
} = Ho();
|
|
1098
1098
|
return {
|
|
1099
|
-
addBlocks: (x, N,
|
|
1100
|
-
o(x, N,
|
|
1099
|
+
addBlocks: (x, N, k) => {
|
|
1100
|
+
o(x, N, k), e({
|
|
1101
1101
|
undo: () => n(R(x, "_id")),
|
|
1102
|
-
redo: () => o(x, N,
|
|
1102
|
+
redo: () => o(x, N, k)
|
|
1103
1103
|
});
|
|
1104
1104
|
},
|
|
1105
1105
|
removeBlocks: (x) => {
|
|
@@ -1110,10 +1110,10 @@ const Ho = () => {
|
|
|
1110
1110
|
redo: () => n(R(x, "_id"))
|
|
1111
1111
|
});
|
|
1112
1112
|
},
|
|
1113
|
-
updateBlocks: (x, N,
|
|
1113
|
+
updateBlocks: (x, N, k) => {
|
|
1114
1114
|
let I = [];
|
|
1115
|
-
if (
|
|
1116
|
-
I = R(x, (O) => ({ _id: O, ...
|
|
1115
|
+
if (k)
|
|
1116
|
+
I = R(x, (O) => ({ _id: O, ...k }));
|
|
1117
1117
|
else {
|
|
1118
1118
|
const O = $s(N);
|
|
1119
1119
|
I = R(x, (W) => {
|
|
@@ -1127,7 +1127,7 @@ const Ho = () => {
|
|
|
1127
1127
|
});
|
|
1128
1128
|
},
|
|
1129
1129
|
updateBlocksRuntime: (x, N) => {
|
|
1130
|
-
i(R(x, (
|
|
1130
|
+
i(R(x, (k) => ({ _id: k, ...N })));
|
|
1131
1131
|
},
|
|
1132
1132
|
setNewBlocks: (x) => {
|
|
1133
1133
|
s(x), e({
|
|
@@ -1648,8 +1648,8 @@ const fi = Ve.Root, pi = Ve.Trigger, Un = m.forwardRef(({ className: e, align: t
|
|
|
1648
1648
|
}
|
|
1649
1649
|
));
|
|
1650
1650
|
Un.displayName = Ve.Content.displayName;
|
|
1651
|
-
const gi =
|
|
1652
|
-
|
|
1651
|
+
const gi = z.Root, bi = z.Group, xi = z.Value, Wn = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(
|
|
1652
|
+
z.Trigger,
|
|
1653
1653
|
{
|
|
1654
1654
|
ref: o,
|
|
1655
1655
|
className: d(
|
|
@@ -1659,13 +1659,13 @@ const gi = L.Root, bi = L.Group, xi = L.Value, Wn = m.forwardRef(({ className: e
|
|
|
1659
1659
|
...s,
|
|
1660
1660
|
children: [
|
|
1661
1661
|
t,
|
|
1662
|
-
/* @__PURE__ */ a.jsx(
|
|
1662
|
+
/* @__PURE__ */ a.jsx(z.Icon, { asChild: !0, children: /* @__PURE__ */ a.jsx(qs, { className: "h-4 w-4 opacity-50" }) })
|
|
1663
1663
|
]
|
|
1664
1664
|
}
|
|
1665
1665
|
));
|
|
1666
|
-
Wn.displayName =
|
|
1667
|
-
const Gn = m.forwardRef(({ className: e, children: t, position: s = "popper", ...o }, n) => /* @__PURE__ */ a.jsx(
|
|
1668
|
-
|
|
1666
|
+
Wn.displayName = z.Trigger.displayName;
|
|
1667
|
+
const Gn = m.forwardRef(({ className: e, children: t, position: s = "popper", ...o }, n) => /* @__PURE__ */ a.jsx(z.Portal, { children: /* @__PURE__ */ a.jsx(
|
|
1668
|
+
z.Content,
|
|
1669
1669
|
{
|
|
1670
1670
|
ref: n,
|
|
1671
1671
|
className: d(
|
|
@@ -1676,7 +1676,7 @@ const Gn = m.forwardRef(({ className: e, children: t, position: s = "popper", ..
|
|
|
1676
1676
|
position: s,
|
|
1677
1677
|
...o,
|
|
1678
1678
|
children: /* @__PURE__ */ a.jsx(
|
|
1679
|
-
|
|
1679
|
+
z.Viewport,
|
|
1680
1680
|
{
|
|
1681
1681
|
className: d(
|
|
1682
1682
|
"p-1",
|
|
@@ -1687,11 +1687,11 @@ const Gn = m.forwardRef(({ className: e, children: t, position: s = "popper", ..
|
|
|
1687
1687
|
)
|
|
1688
1688
|
}
|
|
1689
1689
|
) }));
|
|
1690
|
-
Gn.displayName =
|
|
1691
|
-
const Hn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1692
|
-
Hn.displayName =
|
|
1690
|
+
Gn.displayName = z.Content.displayName;
|
|
1691
|
+
const Hn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(z.Label, { ref: s, className: d("px-2 py-1.5 text-sm font-semibold", e), ...t }));
|
|
1692
|
+
Hn.displayName = z.Label.displayName;
|
|
1693
1693
|
const qn = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(
|
|
1694
|
-
|
|
1694
|
+
z.Item,
|
|
1695
1695
|
{
|
|
1696
1696
|
ref: o,
|
|
1697
1697
|
className: d(
|
|
@@ -1700,14 +1700,14 @@ const qn = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__
|
|
|
1700
1700
|
),
|
|
1701
1701
|
...s,
|
|
1702
1702
|
children: [
|
|
1703
|
-
/* @__PURE__ */ a.jsx("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(
|
|
1704
|
-
/* @__PURE__ */ a.jsx(
|
|
1703
|
+
/* @__PURE__ */ a.jsx("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(z.ItemIndicator, { children: /* @__PURE__ */ a.jsx(ze, { className: "h-4 w-4" }) }) }),
|
|
1704
|
+
/* @__PURE__ */ a.jsx(z.ItemText, { children: t })
|
|
1705
1705
|
]
|
|
1706
1706
|
}
|
|
1707
1707
|
));
|
|
1708
|
-
qn.displayName =
|
|
1709
|
-
const Kn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1710
|
-
Kn.displayName =
|
|
1708
|
+
qn.displayName = z.Item.displayName;
|
|
1709
|
+
const Kn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(z.Separator, { ref: s, className: d("-mx-1 my-1 h-px bg-muted", e), ...t }));
|
|
1710
|
+
Kn.displayName = z.Separator.displayName;
|
|
1711
1711
|
const hi = _.Root, vi = _.Trigger, yi = _.Close, gs = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx(_.Portal, { className: d(e), ...t });
|
|
1712
1712
|
gs.displayName = _.Portal.displayName;
|
|
1713
1713
|
const bs = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
@@ -1921,11 +1921,11 @@ const He = /* @__PURE__ */ new Map(), Rt = (e) => {
|
|
|
1921
1921
|
toasts: e.toasts.filter((s) => s.id !== t.toastId)
|
|
1922
1922
|
};
|
|
1923
1923
|
}
|
|
1924
|
-
},
|
|
1925
|
-
let
|
|
1924
|
+
}, Me = [];
|
|
1925
|
+
let De = { toasts: [] };
|
|
1926
1926
|
function je(e) {
|
|
1927
|
-
|
|
1928
|
-
t(
|
|
1927
|
+
De = pa(De, e), Me.forEach((t) => {
|
|
1928
|
+
t(De);
|
|
1929
1929
|
});
|
|
1930
1930
|
}
|
|
1931
1931
|
function ga({ ...e }) {
|
|
@@ -1950,10 +1950,10 @@ function ga({ ...e }) {
|
|
|
1950
1950
|
};
|
|
1951
1951
|
}
|
|
1952
1952
|
function xs() {
|
|
1953
|
-
const [e, t] = m.useState(
|
|
1954
|
-
return m.useEffect(() => (
|
|
1955
|
-
const s =
|
|
1956
|
-
s > -1 &&
|
|
1953
|
+
const [e, t] = m.useState(De);
|
|
1954
|
+
return m.useEffect(() => (Me.push(t), () => {
|
|
1955
|
+
const s = Me.indexOf(t);
|
|
1956
|
+
s > -1 && Me.splice(s, 1);
|
|
1957
1957
|
}), [e]), {
|
|
1958
1958
|
...e,
|
|
1959
1959
|
toast: ga,
|
|
@@ -2262,12 +2262,12 @@ const Da = (e) => {
|
|
|
2262
2262
|
}
|
|
2263
2263
|
)
|
|
2264
2264
|
] });
|
|
2265
|
-
}, Ea = et.lazy(() => import("./UnsplashImages-
|
|
2265
|
+
}, Ea = et.lazy(() => import("./UnsplashImages-hhPOf7kt.js")), Oa = et.lazy(() => import("./UploadImages-JKjE44i7.js")), js = ({
|
|
2266
2266
|
isModalView: e = !1,
|
|
2267
2267
|
onSelect: t = () => {
|
|
2268
2268
|
}
|
|
2269
2269
|
}) => {
|
|
2270
|
-
const [s, o] =
|
|
2270
|
+
const [s, o] = Be("upload");
|
|
2271
2271
|
return /* @__PURE__ */ a.jsxs("div", { className: "flex h-full flex-col", children: [
|
|
2272
2272
|
/* @__PURE__ */ a.jsx("div", { className: "flex items-center justify-between rounded-md bg-background/30 p-1", children: /* @__PURE__ */ a.jsx("h1", { className: "px-1 font-semibold", children: e ? "Select or upload images" : "Images" }) }),
|
|
2273
2273
|
/* @__PURE__ */ a.jsxs(_n, { value: s, onValueChange: (n) => o(n), className: "flex h-full w-full flex-col py-2", children: [
|
|
@@ -2282,7 +2282,7 @@ const Da = (e) => {
|
|
|
2282
2282
|
__proto__: null,
|
|
2283
2283
|
default: js
|
|
2284
2284
|
}, Symbol.toStringTag, { value: "Module" })), Tt = ({ children: e, onSelect: t }) => {
|
|
2285
|
-
const [s, o] =
|
|
2285
|
+
const [s, o] = Be(!1), n = (...i) => {
|
|
2286
2286
|
t.call(void 0, ...i), o(!1);
|
|
2287
2287
|
};
|
|
2288
2288
|
return /* @__PURE__ */ a.jsxs(ds, { open: s, onOpenChange: (i) => o(i), children: [
|
|
@@ -2343,7 +2343,7 @@ const Da = (e) => {
|
|
|
2343
2343
|
}
|
|
2344
2344
|
);
|
|
2345
2345
|
}, Vi = ({ schema: e, formData: t, onChange: s }) => {
|
|
2346
|
-
const [o, n] =
|
|
2346
|
+
const [o, n] = Be([]), i = ke("getPages", () => []), { type: r = "page", href: c = "", target: p = "self" } = t;
|
|
2347
2347
|
return Ce(() => {
|
|
2348
2348
|
(async () => {
|
|
2349
2349
|
const l = await i();
|
|
@@ -2396,9 +2396,9 @@ const Da = (e) => {
|
|
|
2396
2396
|
] })
|
|
2397
2397
|
] });
|
|
2398
2398
|
}, $i = () => {
|
|
2399
|
-
const [e] = we(), [, t] = $e(), { addBlocks: s } = xe(), { toast: o } = xs(), n =
|
|
2399
|
+
const [e] = we(), [, t] = $e(), { addBlocks: s } = xe(), { toast: o } = xs(), n = L(
|
|
2400
2400
|
(r, c, p) => {
|
|
2401
|
-
var
|
|
2401
|
+
var k;
|
|
2402
2402
|
for (let I = 0; I < r.length; I++) {
|
|
2403
2403
|
const { _id: O } = r[I];
|
|
2404
2404
|
r[I]._id = ce();
|
|
@@ -2408,11 +2408,11 @@ const Da = (e) => {
|
|
|
2408
2408
|
}
|
|
2409
2409
|
const l = Q(r);
|
|
2410
2410
|
let f, x;
|
|
2411
|
-
return c && (f = te(e, { _id: c }), r[0]._parent = c, x = c), !(f ? Ct(f._type, l._type) : !0) && f && (r[0]._parent = f._parent, x = f._parent), s(r, x, p), t([(
|
|
2411
|
+
return c && (f = te(e, { _id: c }), r[0]._parent = c, x = c), !(f ? Ct(f._type, l._type) : !0) && f && (r[0]._parent = f._parent, x = f._parent), s(r, x, p), t([(k = Q(r)) == null ? void 0 : k._id]), Q(r);
|
|
2412
2412
|
},
|
|
2413
2413
|
[e, t]
|
|
2414
2414
|
);
|
|
2415
|
-
return { addCoreBlock:
|
|
2415
|
+
return { addCoreBlock: L(
|
|
2416
2416
|
(r, c, p) => {
|
|
2417
2417
|
if (pe(r, "blocks")) {
|
|
2418
2418
|
const G = r.blocks;
|
|
@@ -2437,16 +2437,16 @@ const Da = (e) => {
|
|
|
2437
2437
|
_id: l,
|
|
2438
2438
|
...f
|
|
2439
2439
|
};
|
|
2440
|
-
let
|
|
2441
|
-
if (c && (
|
|
2440
|
+
let k, I;
|
|
2441
|
+
if (c && (k = te(e, { _id: c }), N._parent = c, I = c), !Kt(k == null ? void 0 : k._type, r.type)) {
|
|
2442
2442
|
o({
|
|
2443
2443
|
variant: "destructive",
|
|
2444
2444
|
title: "Error",
|
|
2445
|
-
description: `"${r.type}" cannot be added under "${
|
|
2446
|
-
});
|
|
2445
|
+
description: `"${r.type}" cannot be added under "${k ? k == null ? void 0 : k._type : "root"}"`
|
|
2446
|
+
}), t([]);
|
|
2447
2447
|
return;
|
|
2448
2448
|
}
|
|
2449
|
-
!(
|
|
2449
|
+
!(k ? Ct(k._type, r.type) : !0) && k && (N._parent = k._parent, I = k._parent);
|
|
2450
2450
|
const W = [N, ...x];
|
|
2451
2451
|
return s(W, I, p), t([N._id]), N;
|
|
2452
2452
|
},
|
|
@@ -2484,16 +2484,16 @@ const Mt = [];
|
|
|
2484
2484
|
function za(e = "", t = "", s = []) {
|
|
2485
2485
|
e = e.trim().replace(/ +/g, "");
|
|
2486
2486
|
let o = M(
|
|
2487
|
-
R(e.split(" "),
|
|
2487
|
+
R(e.split(" "), Ie),
|
|
2488
2488
|
(l) => !qe(l)
|
|
2489
|
-
), n = M(R(t.split(" "),
|
|
2489
|
+
), n = M(R(t.split(" "), Ie), (l) => !qe(l));
|
|
2490
2490
|
n = M(
|
|
2491
2491
|
n,
|
|
2492
2492
|
(l) => !q(Mt, l.property)
|
|
2493
2493
|
);
|
|
2494
2494
|
const i = [], r = [];
|
|
2495
2495
|
ue(s, (l) => {
|
|
2496
|
-
const f =
|
|
2496
|
+
const f = Ie(l), x = te(o, vt(f, ["dark", "mq", "mod", "property"]));
|
|
2497
2497
|
if (x && (o = M(
|
|
2498
2498
|
o,
|
|
2499
2499
|
(N) => N.fullCls !== (x == null ? void 0 : x.fullCls)
|
|
@@ -2501,7 +2501,7 @@ function za(e = "", t = "", s = []) {
|
|
|
2501
2501
|
const N = te(n, vt(f, ["property"]));
|
|
2502
2502
|
x && (n = M(
|
|
2503
2503
|
n,
|
|
2504
|
-
(
|
|
2504
|
+
(k) => k.fullCls !== (N == null ? void 0 : N.fullCls)
|
|
2505
2505
|
)), r.push({
|
|
2506
2506
|
...f,
|
|
2507
2507
|
fullCls: f.cls,
|
|
@@ -2518,9 +2518,9 @@ function za(e = "", t = "", s = []) {
|
|
|
2518
2518
|
"fullCls"
|
|
2519
2519
|
).join(" ").trim()},${c.trim()}`.trim().replace(/ +/g, "");
|
|
2520
2520
|
}
|
|
2521
|
-
const
|
|
2522
|
-
|
|
2523
|
-
const Va = () => D(
|
|
2521
|
+
const Te = w([]);
|
|
2522
|
+
Te.debugLabel = "selectedStylingBlocksAtom";
|
|
2523
|
+
const Va = () => D(Te), $a = (e) => {
|
|
2524
2524
|
const t = e.replace(me, "").split(",");
|
|
2525
2525
|
return { baseClasses: t[0], classes: t[1] };
|
|
2526
2526
|
}, Fa = w(null, (e, t, { blockIds: s, newClasses: o }) => {
|
|
@@ -2530,7 +2530,7 @@ const Va = () => D(Re), $a = (e) => {
|
|
|
2530
2530
|
// @ts-ignore
|
|
2531
2531
|
s.includes(e(r)._id)
|
|
2532
2532
|
)
|
|
2533
|
-
), i = Q(e(
|
|
2533
|
+
), i = Q(e(Te));
|
|
2534
2534
|
return R(n, (r) => {
|
|
2535
2535
|
const c = e(r), p = F(c, i.prop, `${me},`), { baseClasses: l, classes: f } = $a(p);
|
|
2536
2536
|
return {
|
|
@@ -2539,8 +2539,8 @@ const Va = () => D(Re), $a = (e) => {
|
|
|
2539
2539
|
};
|
|
2540
2540
|
});
|
|
2541
2541
|
}), Fi = () => {
|
|
2542
|
-
const e =
|
|
2543
|
-
return
|
|
2542
|
+
const e = _e(Fa), { updateBlocks: t, updateBlocksRuntime: s } = xe();
|
|
2543
|
+
return L(
|
|
2544
2544
|
(o, n, i = !1) => {
|
|
2545
2545
|
const r = e({ blockIds: o, newClasses: n });
|
|
2546
2546
|
if (!i) {
|
|
@@ -2551,7 +2551,7 @@ const Va = () => D(Re), $a = (e) => {
|
|
|
2551
2551
|
},
|
|
2552
2552
|
[e]
|
|
2553
2553
|
);
|
|
2554
|
-
}, Ua = () => D(es), Ss =
|
|
2554
|
+
}, Ua = () => D(es), Ss = Re("canvasWidth", 800), As = w((e) => {
|
|
2555
2555
|
const t = e(Ss);
|
|
2556
2556
|
return Fs(t).toLowerCase();
|
|
2557
2557
|
}), Ui = () => {
|
|
@@ -2559,8 +2559,8 @@ const Va = () => D(Re), $a = (e) => {
|
|
|
2559
2559
|
return Ce(() => {
|
|
2560
2560
|
o !== "xs" && n(s);
|
|
2561
2561
|
}, [s, o, n]), [e, s, t];
|
|
2562
|
-
}, Wa =
|
|
2563
|
-
const [e, t] = D(Cs), s =
|
|
2562
|
+
}, Wa = Re("canvasZoom", 100), Wi = () => D(Wa), Cs = w([]), Ga = () => {
|
|
2563
|
+
const [e, t] = D(Cs), s = _e(xt), o = L(
|
|
2564
2564
|
(n) => {
|
|
2565
2565
|
t(n), s([]);
|
|
2566
2566
|
},
|
|
@@ -2568,19 +2568,19 @@ const Va = () => D(Re), $a = (e) => {
|
|
|
2568
2568
|
);
|
|
2569
2569
|
return [e, o];
|
|
2570
2570
|
}, xt = w([]), Gi = () => {
|
|
2571
|
-
const [e, t] = D(xt), s =
|
|
2571
|
+
const [e, t] = D(xt), s = _e(Cs), o = L(
|
|
2572
2572
|
(n) => {
|
|
2573
2573
|
t(n), s([]);
|
|
2574
2574
|
},
|
|
2575
2575
|
[t, s]
|
|
2576
2576
|
);
|
|
2577
2577
|
return [e, o];
|
|
2578
|
-
}, Bs =
|
|
2578
|
+
}, Bs = Re("darkMode", !1), Hi = () => {
|
|
2579
2579
|
const [e, t] = D(Bs);
|
|
2580
2580
|
return [e, t];
|
|
2581
2581
|
}, Ha = () => {
|
|
2582
2582
|
const [e] = we(), [, t] = $e(), { addBlocks: s } = xe();
|
|
2583
|
-
return
|
|
2583
|
+
return L(
|
|
2584
2584
|
(o, n = null) => {
|
|
2585
2585
|
const i = [];
|
|
2586
2586
|
ue(o, (r) => {
|
|
@@ -2596,7 +2596,7 @@ const Va = () => D(Re), $a = (e) => {
|
|
|
2596
2596
|
[e, t]
|
|
2597
2597
|
);
|
|
2598
2598
|
}, qa = w([]), qi = () => {
|
|
2599
|
-
const [e, t] = D(qa), s =
|
|
2599
|
+
const [e, t] = D(qa), s = L(
|
|
2600
2600
|
(o) => {
|
|
2601
2601
|
t((n) => q(n, o) ? Ot(n, o) : [...n, o]);
|
|
2602
2602
|
},
|
|
@@ -2605,7 +2605,7 @@ const Va = () => D(Re), $a = (e) => {
|
|
|
2605
2605
|
return [e, t, s];
|
|
2606
2606
|
}, Ka = w(""), Ja = () => D(Ka), Ya = () => {
|
|
2607
2607
|
const e = X(ie);
|
|
2608
|
-
return
|
|
2608
|
+
return L(
|
|
2609
2609
|
(t, s) => {
|
|
2610
2610
|
const o = R(e, (n) => (q(t, F(n, "_id")) && Se(n, "_parent", s), n));
|
|
2611
2611
|
console.log("newBlocks", o);
|
|
@@ -2620,7 +2620,7 @@ const Va = () => D(Re), $a = (e) => {
|
|
|
2620
2620
|
() => t.length > 0 || e.length > 0,
|
|
2621
2621
|
[e, t]
|
|
2622
2622
|
),
|
|
2623
|
-
pasteBlocks:
|
|
2623
|
+
pasteBlocks: L(
|
|
2624
2624
|
(r) => {
|
|
2625
2625
|
ve(e) ? n(t, r) : o(e, r), s(() => []);
|
|
2626
2626
|
},
|
|
@@ -2631,7 +2631,7 @@ const Va = () => D(Re), $a = (e) => {
|
|
|
2631
2631
|
const [e, t] = D(Qa);
|
|
2632
2632
|
return [e, t];
|
|
2633
2633
|
}, Xa = w(null, (e, t, { blockIds: s, fullClasses: o }) => {
|
|
2634
|
-
const n = Q(e(
|
|
2634
|
+
const n = Q(e(Te)), i = M(
|
|
2635
2635
|
e(at),
|
|
2636
2636
|
(r) => (
|
|
2637
2637
|
// @ts-ignore
|
|
@@ -2644,8 +2644,8 @@ const Va = () => D(Re), $a = (e) => {
|
|
|
2644
2644
|
return ue(p, (x) => {
|
|
2645
2645
|
const N = new RegExp(`(^| )${x.replace("[", "\\[").replace("]", "\\]")}($| )`, "g");
|
|
2646
2646
|
l = l.replace(N, " ").replace(/ +/g, " ").trim();
|
|
2647
|
-
const
|
|
2648
|
-
q(["2xl", "xl", "lg", "md", "sm"],
|
|
2647
|
+
const k = Q(x.split(":"));
|
|
2648
|
+
q(["2xl", "xl", "lg", "md", "sm"], k) && p.push(x.split(":").pop().trim());
|
|
2649
2649
|
}), ue(p, (x) => {
|
|
2650
2650
|
const N = new RegExp(`(^| )${x.replace("[", "\\[").replace("]", "\\]")}($| )`, "g");
|
|
2651
2651
|
f = f.replace(N, " ").replace(/ +/g, " ").trim();
|
|
@@ -2657,8 +2657,8 @@ const Va = () => D(Re), $a = (e) => {
|
|
|
2657
2657
|
};
|
|
2658
2658
|
});
|
|
2659
2659
|
}), Yi = () => {
|
|
2660
|
-
const { updateBlocks: e } = xe(), t =
|
|
2661
|
-
return
|
|
2660
|
+
const { updateBlocks: e } = xe(), t = _e(Xa);
|
|
2661
|
+
return L(
|
|
2662
2662
|
(s, o) => {
|
|
2663
2663
|
const n = t({ blockIds: s, fullClasses: o });
|
|
2664
2664
|
e(s, n[0].props);
|
|
@@ -2666,11 +2666,11 @@ const Va = () => D(Re), $a = (e) => {
|
|
|
2666
2666
|
[t]
|
|
2667
2667
|
);
|
|
2668
2668
|
}, _s = w((e) => {
|
|
2669
|
-
const t = Q(e(
|
|
2669
|
+
const t = Q(e(Te)), s = e(lt);
|
|
2670
2670
|
if (!t || t.blockId !== F(s, "_id", null))
|
|
2671
2671
|
return [];
|
|
2672
2672
|
const n = F(s, t.prop, `${me},`).replace(me, "").split(",").join(" ");
|
|
2673
|
-
return M(R(n.trim().split(" "),
|
|
2673
|
+
return M(R(n.trim().split(" "), Ie), (i) => !qe(i));
|
|
2674
2674
|
}), Qi = () => X(_s), Dt = { xs: 0, sm: 1, md: 2, lg: 3, xl: 4, "2xl": 5 }, Za = w((e) => {
|
|
2675
2675
|
const t = e(As), s = e(ct), o = e(Bs), n = er(t);
|
|
2676
2676
|
let i = M(e(_s), { mod: s });
|
|
@@ -2703,7 +2703,7 @@ const Va = () => D(Re), $a = (e) => {
|
|
|
2703
2703
|
return t;
|
|
2704
2704
|
}, Xi = () => X(Za), Zi = () => D(ct), el = () => {
|
|
2705
2705
|
const { updateBlocks: e } = xe();
|
|
2706
|
-
return
|
|
2706
|
+
return L(
|
|
2707
2707
|
(t, s, o) => {
|
|
2708
2708
|
e(t, s, o);
|
|
2709
2709
|
},
|
|
@@ -2711,7 +2711,7 @@ const Va = () => D(Re), $a = (e) => {
|
|
|
2711
2711
|
);
|
|
2712
2712
|
}, tl = () => {
|
|
2713
2713
|
const { updateBlocksRuntime: e } = xe();
|
|
2714
|
-
return
|
|
2714
|
+
return L(
|
|
2715
2715
|
(t, s) => {
|
|
2716
2716
|
e(t, s);
|
|
2717
2717
|
},
|
|
@@ -2723,12 +2723,12 @@ const Va = () => D(Re), $a = (e) => {
|
|
|
2723
2723
|
modalProps: {},
|
|
2724
2724
|
backdropClose: !0
|
|
2725
2725
|
}, tr = w(Rs), sl = () => {
|
|
2726
|
-
const [e, t] = D(tr), s =
|
|
2726
|
+
const [e, t] = D(tr), s = L(
|
|
2727
2727
|
(n, i = {}, r = {}) => {
|
|
2728
2728
|
t({ name: n, props: i, modalProps: r });
|
|
2729
2729
|
},
|
|
2730
2730
|
[t]
|
|
2731
|
-
), o =
|
|
2731
|
+
), o = L(
|
|
2732
2732
|
(...n) => {
|
|
2733
2733
|
F(e, "props.onClose", () => {
|
|
2734
2734
|
})(...n), t(Rs);
|
|
@@ -2768,22 +2768,33 @@ const mr = w(!1);
|
|
|
2768
2768
|
mr.debugLabel = "draggingFlagAtom";
|
|
2769
2769
|
const fr = w("");
|
|
2770
2770
|
fr.debugLabel = "draggedBlockIdAtom";
|
|
2771
|
-
const nl = () => X(Ts), pr = w(""), gr = w(null), al = () => D(pr), rl = () => D(gr), br =
|
|
2771
|
+
const nl = () => X(Ts), pr = w(""), gr = w(null), al = () => D(pr), rl = () => D(gr), br = Re("selectedBreakpoints", ["XS", "MD", "XL"]), il = () => {
|
|
2772
2772
|
const [e, t] = D(br);
|
|
2773
2773
|
return [e, t];
|
|
2774
2774
|
}, ll = () => {
|
|
2775
|
-
const e =
|
|
2775
|
+
const e = _e(Ps), { clear: t } = is(), [, s] = $e(), [, o] = Ja(), [, n] = Va();
|
|
2776
2776
|
return () => {
|
|
2777
2777
|
s([]), n([]), o(""), t(), e({ undoCount: 0, redoCount: 0 });
|
|
2778
2778
|
};
|
|
2779
2779
|
}, xr = w([]), cl = () => {
|
|
2780
|
-
const [e, t] =
|
|
2780
|
+
const [e, t] = Be(!1), [s, o] = D(xr), n = ke("getUILibraryBlocks", () => []);
|
|
2781
2781
|
return Ce(() => {
|
|
2782
2782
|
(async () => s.length > 0 || (t(!0), o(await n()), t(!1)))();
|
|
2783
2783
|
}, []), { data: s, isLoading: e };
|
|
2784
|
+
}, dl = () => {
|
|
2785
|
+
const [e, t] = Be(null), s = L(async (o) => {
|
|
2786
|
+
if (!(navigator != null && navigator.clipboard))
|
|
2787
|
+
return console.warn("Clipboard not supported"), !1;
|
|
2788
|
+
try {
|
|
2789
|
+
return await navigator.clipboard.writeText(o), t(o), !0;
|
|
2790
|
+
} catch (n) {
|
|
2791
|
+
return console.warn("Copy failed", n), t(null), !1;
|
|
2792
|
+
}
|
|
2793
|
+
}, []);
|
|
2794
|
+
return [e, s];
|
|
2784
2795
|
};
|
|
2785
2796
|
export {
|
|
2786
|
-
|
|
2797
|
+
Qi as $,
|
|
2787
2798
|
ei as A,
|
|
2788
2799
|
Yo as B,
|
|
2789
2800
|
an as C,
|
|
@@ -2799,178 +2810,179 @@ export {
|
|
|
2799
2810
|
Ui as M,
|
|
2800
2811
|
Wi as N,
|
|
2801
2812
|
Gi as O,
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2813
|
+
dl as P,
|
|
2814
|
+
zo as Q,
|
|
2815
|
+
Ga as R,
|
|
2805
2816
|
Bi as S,
|
|
2806
2817
|
oi as T,
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2818
|
+
Hi as U,
|
|
2819
|
+
Uo as V,
|
|
2820
|
+
qi as W,
|
|
2821
|
+
Ja as X,
|
|
2822
|
+
Ki as Y,
|
|
2823
|
+
Yi as Z,
|
|
2824
|
+
Xi as _,
|
|
2814
2825
|
Vr as a,
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2826
|
+
ja as a$,
|
|
2827
|
+
qr as a0,
|
|
2828
|
+
Ua as a1,
|
|
2829
|
+
cl as a2,
|
|
2830
|
+
Zi as a3,
|
|
2831
|
+
el as a4,
|
|
2832
|
+
tl as a5,
|
|
2833
|
+
Hr as a6,
|
|
2834
|
+
ol as a7,
|
|
2835
|
+
al as a8,
|
|
2836
|
+
Yr as a9,
|
|
2837
|
+
Jo as aA,
|
|
2838
|
+
fi as aB,
|
|
2839
|
+
pi as aC,
|
|
2840
|
+
Un as aD,
|
|
2841
|
+
wi as aE,
|
|
2842
|
+
Ni as aF,
|
|
2843
|
+
oa as aG,
|
|
2844
|
+
ia as aH,
|
|
2845
|
+
la as aI,
|
|
2846
|
+
aa as aJ,
|
|
2847
|
+
xe as aK,
|
|
2848
|
+
mr as aL,
|
|
2849
|
+
ur as aM,
|
|
2850
|
+
ar as aN,
|
|
2851
|
+
fr as aO,
|
|
2852
|
+
Ur as aP,
|
|
2853
|
+
Wr as aQ,
|
|
2854
|
+
or as aR,
|
|
2855
|
+
lr as aS,
|
|
2856
|
+
ri as aT,
|
|
2857
|
+
ii as aU,
|
|
2858
|
+
Tn as aV,
|
|
2859
|
+
ks as aW,
|
|
2860
|
+
va as aX,
|
|
2861
|
+
ya as aY,
|
|
2862
|
+
wa as aZ,
|
|
2863
|
+
Na as a_,
|
|
2864
|
+
rl as aa,
|
|
2865
|
+
il as ab,
|
|
2866
|
+
Va as ac,
|
|
2867
|
+
ds as ad,
|
|
2868
|
+
bt as ae,
|
|
2869
|
+
pn as af,
|
|
2870
|
+
bn as ag,
|
|
2871
|
+
xn as ah,
|
|
2872
|
+
un as ai,
|
|
2873
|
+
gi as aj,
|
|
2874
|
+
Wn as ak,
|
|
2875
|
+
xi as al,
|
|
2876
|
+
Gn as am,
|
|
2877
|
+
qn as an,
|
|
2878
|
+
cr as ao,
|
|
2879
|
+
_n as ap,
|
|
2880
|
+
ps as aq,
|
|
2881
|
+
Xe as ar,
|
|
2882
|
+
Ze as as,
|
|
2883
|
+
bi as at,
|
|
2884
|
+
Hn as au,
|
|
2885
|
+
ni as av,
|
|
2886
|
+
ai as aw,
|
|
2887
|
+
Rn as ax,
|
|
2888
|
+
da as ay,
|
|
2889
|
+
An as az,
|
|
2879
2890
|
oe as b,
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2891
|
+
ea as b$,
|
|
2892
|
+
gn as b0,
|
|
2893
|
+
fn as b1,
|
|
2894
|
+
_t as b2,
|
|
2895
|
+
Bt as b3,
|
|
2896
|
+
zi as b4,
|
|
2897
|
+
Ei as b5,
|
|
2898
|
+
Li as b6,
|
|
2899
|
+
Vi as b7,
|
|
2900
|
+
Xr as b8,
|
|
2901
|
+
Qo as b9,
|
|
2902
|
+
nn as bA,
|
|
2903
|
+
yn as bB,
|
|
2904
|
+
fs as bC,
|
|
2905
|
+
Pn as bD,
|
|
2906
|
+
li as bE,
|
|
2907
|
+
In as bF,
|
|
2908
|
+
En as bG,
|
|
2909
|
+
On as bH,
|
|
2910
|
+
$n as bI,
|
|
2911
|
+
Vn as bJ,
|
|
2912
|
+
Ln as bK,
|
|
2913
|
+
mi as bL,
|
|
2914
|
+
zn as bM,
|
|
2915
|
+
di as bN,
|
|
2916
|
+
Dn as bO,
|
|
2917
|
+
Mn as bP,
|
|
2918
|
+
ci as bQ,
|
|
2919
|
+
ui as bR,
|
|
2920
|
+
Fn as bS,
|
|
2921
|
+
Kn as bT,
|
|
2922
|
+
hi as bU,
|
|
2923
|
+
vi as bV,
|
|
2924
|
+
yi as bW,
|
|
2925
|
+
Yn as bX,
|
|
2926
|
+
Qn as bY,
|
|
2927
|
+
Xn as bZ,
|
|
2928
|
+
Zn as b_,
|
|
2929
|
+
Xo as ba,
|
|
2930
|
+
Zo as bb,
|
|
2931
|
+
jn as bc,
|
|
2932
|
+
si as bd,
|
|
2933
|
+
sr as be,
|
|
2934
|
+
Bn as bf,
|
|
2935
|
+
hn as bg,
|
|
2936
|
+
vn as bh,
|
|
2937
|
+
wn as bi,
|
|
2938
|
+
Nn as bj,
|
|
2939
|
+
Cn as bk,
|
|
2940
|
+
kn as bl,
|
|
2941
|
+
tn as bm,
|
|
2942
|
+
sn as bn,
|
|
2943
|
+
dr as bo,
|
|
2944
|
+
_a as bp,
|
|
2945
|
+
Ba as bq,
|
|
2946
|
+
Ri as br,
|
|
2947
|
+
Ti as bs,
|
|
2948
|
+
Jr as bt,
|
|
2949
|
+
Gr as bu,
|
|
2950
|
+
Ko as bv,
|
|
2951
|
+
qo as bw,
|
|
2952
|
+
gt as bx,
|
|
2953
|
+
on as by,
|
|
2954
|
+
Zr as bz,
|
|
2944
2955
|
oo as c,
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2956
|
+
na as c0,
|
|
2957
|
+
ra as c1,
|
|
2958
|
+
ca as c2,
|
|
2959
|
+
ki as c3,
|
|
2960
|
+
ji as c4,
|
|
2961
|
+
Si as c5,
|
|
2962
|
+
sa as c6,
|
|
2963
|
+
ta as c7,
|
|
2964
|
+
Ai as c8,
|
|
2965
|
+
pa as c9,
|
|
2966
|
+
xs as ca,
|
|
2967
|
+
ga as cb,
|
|
2968
|
+
_i as cc,
|
|
2969
|
+
Sa as cd,
|
|
2970
|
+
ka as ce,
|
|
2971
|
+
Ra as cf,
|
|
2972
|
+
Ta as cg,
|
|
2973
|
+
Pa as ch,
|
|
2974
|
+
Ia as ci,
|
|
2975
|
+
Ma as cj,
|
|
2976
|
+
Pi as ck,
|
|
2977
|
+
Ii as cl,
|
|
2978
|
+
Mi as cm,
|
|
2979
|
+
Ca as cn,
|
|
2980
|
+
Aa as co,
|
|
2981
|
+
Di as cp,
|
|
2982
|
+
Oi as cq,
|
|
2971
2983
|
uo as d,
|
|
2972
2984
|
co as e,
|
|
2973
|
-
|
|
2985
|
+
Re as f,
|
|
2974
2986
|
$r as g,
|
|
2975
2987
|
Ji as h,
|
|
2976
2988
|
ke as i,
|