@chaibuilder/sdk 0.1.13 → 0.1.15
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-598b655e.js → AddBlocks-12b4bcb1.js} +1 -1
- package/dist/{AddBlocks-5df8b221.cjs → AddBlocks-e65160bb.cjs} +1 -1
- package/dist/{BrandingOptions-2795be29.cjs → BrandingOptions-2075324b.cjs} +1 -1
- package/dist/{BrandingOptions-0acb0974.js → BrandingOptions-d2e86bba.js} +1 -1
- package/dist/{CanvasArea-a637ef3a.cjs → CanvasArea-480c053b.cjs} +9 -9
- package/dist/{CanvasArea-73b0ec3b.js → CanvasArea-4a600b0b.js} +156 -150
- package/dist/CurrentPage-1f8e7c5f.cjs +1 -0
- package/dist/{CurrentPage-3a189b02.js → CurrentPage-9de40984.js} +19 -17
- package/dist/{Layers-42ba6c2e.js → Layers-048bdcbc.js} +2 -2
- package/dist/{Layers-7f3a2335.cjs → Layers-ab013224.cjs} +1 -1
- package/dist/{MarkAsGlobalBlock-3e708ff4.js → MarkAsGlobalBlock-0f52dce4.js} +1 -1
- package/dist/{MarkAsGlobalBlock-c18910cc.cjs → MarkAsGlobalBlock-1b607a7a.cjs} +1 -1
- package/dist/{PagesPanel-86323919.js → PagesPanel-caeb74c0.js} +2 -2
- package/dist/{PagesPanel-dfbcc68b.cjs → PagesPanel-f15d3d6d.cjs} +1 -1
- package/dist/{ProjectPanel-9f645945.js → ProjectPanel-774b3de7.js} +2 -2
- package/dist/{ProjectPanel-4be28a35.cjs → ProjectPanel-8b70ff96.cjs} +1 -1
- package/dist/{Settings-57f2a7c2.js → Settings-a12cec46.js} +1 -1
- package/dist/{Settings-99916fc1.cjs → Settings-a3eec331.cjs} +1 -1
- package/dist/{SidePanels-b0347e28.js → SidePanels-c4420954.js} +2 -2
- package/dist/{SidePanels-0e4ab159.cjs → SidePanels-c5482f7f.cjs} +1 -1
- package/dist/{Topbar-44c010e3.cjs → Topbar-13c64cdf.cjs} +1 -1
- package/dist/{Topbar-87c1c5b2.js → Topbar-d4b46465.js} +1 -1
- package/dist/{add-page-modal-b4e12262.cjs → add-page-modal-c169dc4b.cjs} +1 -1
- package/dist/{add-page-modal-71c100f9.js → add-page-modal-f8e5b874.js} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +3 -1
- package/dist/core.js +1 -1
- package/dist/{delete-page-modal-9dbe3038.js → delete-page-modal-52feec39.js} +1 -1
- package/dist/{delete-page-modal-fe71e66d.cjs → delete-page-modal-cce082dc.cjs} +1 -1
- package/dist/{index-0d399aef.js → index-14e86fe3.js} +6 -6
- package/dist/{index-d4a18b5d.cjs → index-659e552b.cjs} +2 -2
- package/dist/{page-viewer-8a0cd017.js → page-viewer-3b6eb2d0.js} +2 -2
- package/dist/{page-viewer-eec3bdfb.cjs → page-viewer-7042768e.cjs} +1 -1
- package/dist/{project-general-setting-12172508.cjs → project-general-setting-4e840310.cjs} +1 -1
- package/dist/{project-general-setting-155bc3fc.js → project-general-setting-d72ae135.js} +1 -1
- package/dist/render.cjs +2 -2
- package/dist/render.js +3 -1
- package/dist/{single-page-detail-1b3195d1.cjs → single-page-detail-6632db9b.cjs} +1 -1
- package/dist/{single-page-detail-fb0fe01b.js → single-page-detail-a151a222.js} +2 -2
- package/package.json +1 -1
- package/dist/CurrentPage-77baf305.cjs +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var V = (e, r, n) => (
|
|
1
|
+
var vt = Object.defineProperty;
|
|
2
|
+
var gt = (e, r, n) => r in e ? vt(e, r, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[r] = n;
|
|
3
|
+
var V = (e, r, n) => (gt(e, typeof r != "symbol" ? r + "" : r, n), n);
|
|
4
4
|
import { j as t } from "./jsx-runtime-944c88e2.js";
|
|
5
|
-
import G, { createElement as
|
|
6
|
-
import { map as ie, includes as Me, toUpper as ye, round as St, isEmpty as ee, first as ce, get as $, memoize as Tt, find as jt, filter as
|
|
5
|
+
import G, { createElement as xt, useCallback as Q, useState as H, useEffect as F, Component as Xe, Children as bt, Suspense as Ze, useRef as Oe, useMemo as wt, lazy as Et } from "react";
|
|
6
|
+
import { map as ie, includes as Me, toUpper as ye, round as St, isEmpty as ee, first as ce, get as $, memoize as Tt, find as jt, filter as Je, isString as Qe } from "lodash";
|
|
7
7
|
import { ResetIcon as De, DotsVerticalIcon as Ct, MobileIcon as Be, LaptopIcon as kt, DesktopIcon as Rt, EraserIcon as At, ZoomInIcon as _t, ArrowUpIcon as Pt, CopyIcon as It, TrashIcon as Ot, DragHandleDots2Icon as Mt } from "@radix-ui/react-icons";
|
|
8
|
-
import { B as le, u as
|
|
9
|
-
import { c as ke, d as
|
|
10
|
-
import { useTranslation as
|
|
8
|
+
import { B as le, u as et, S as tt } from "./useBuilderProp-81a14920.js";
|
|
9
|
+
import { c as ke, d as rt, e as Re, f as Dt, g as Bt, h as X, i as Z, j as $t, k as nt, l as ot, m as Nt, n as Lt, o as Ft, p as st, q as at, u as Wt, r as qt, s as Ut, t as Yt, v as zt, w as Ht, x as Ae, y as it, z as Kt, A as Vt, B as Gt, b as Xt, E as Zt } from "./index-14e86fe3.js";
|
|
10
|
+
import { useTranslation as ct } from "react-i18next";
|
|
11
11
|
import { S as se } from "./separator-a80d065b.js";
|
|
12
12
|
import { S as Jt, D as Qt, c as er, d as tr, h as rr, i as nr, f as or, H as sr, a as ar, b as ir } from "./dropdown-menu-ae3ed09b.js";
|
|
13
13
|
import { L as cr } from "./label-e770a087.js";
|
|
@@ -20,7 +20,7 @@ import { useResizeObserver as Er } from "@react-hookz/web";
|
|
|
20
20
|
import { tailwindcssPaletteGenerator as Sr } from "@bobthered/tailwindcss-palette-generator";
|
|
21
21
|
import { Provider as Tr } from "react-wrap-balancer";
|
|
22
22
|
import { twMerge as jr } from "tailwind-merge";
|
|
23
|
-
import { S as
|
|
23
|
+
import { S as lt, a as $e } from "./MODIFIERS-c2e02614.js";
|
|
24
24
|
import { getBlockComponent as Cr } from "@chaibuilder/blocks";
|
|
25
25
|
import Ne from "react-dom";
|
|
26
26
|
import { g as kr } from "./_commonjsHelpers-d4512b9c.js";
|
|
@@ -54,7 +54,7 @@ const Rr = () => {
|
|
|
54
54
|
] });
|
|
55
55
|
};
|
|
56
56
|
function Ar() {
|
|
57
|
-
const [e, r] =
|
|
57
|
+
const [e, r] = rt(), { t: n } = ct();
|
|
58
58
|
return /* @__PURE__ */ t.jsxs("div", { className: "flex items-center", children: [
|
|
59
59
|
/* @__PURE__ */ t.jsx(cr, { htmlFor: "dark-mode-switch", children: n("dark_mode") }),
|
|
60
60
|
/* @__PURE__ */ t.jsxs(
|
|
@@ -177,7 +177,7 @@ const Le = ({ landscape: e = !1 }) => /* @__PURE__ */ t.jsxs(
|
|
|
177
177
|
return /* @__PURE__ */ t.jsxs("div", { className: "flex items-center rounded-md", children: [
|
|
178
178
|
ie(
|
|
179
179
|
Fe.filter((s) => Me(n, ye(s.breakpoint))),
|
|
180
|
-
(s) => /* @__PURE__ */
|
|
180
|
+
(s) => /* @__PURE__ */ xt(_r, { ...s, onClick: r, key: s.breakpoint, currentBreakpoint: e })
|
|
181
181
|
),
|
|
182
182
|
/* @__PURE__ */ t.jsxs(Qt, { children: [
|
|
183
183
|
/* @__PURE__ */ t.jsx(er, { asChild: !0, children: /* @__PURE__ */ t.jsx("span", { className: "cursor-pointer px-2.5 hover:opacity-80", children: /* @__PURE__ */ t.jsx(Ct, { className: "scale-90 transform" }) }) }),
|
|
@@ -218,7 +218,7 @@ const Le = ({ landscape: e = !1 }) => /* @__PURE__ */ t.jsxs(
|
|
|
218
218
|
] })
|
|
219
219
|
] }) });
|
|
220
220
|
}, Or = () => {
|
|
221
|
-
const e = $t("darkMode", !1), [r] =
|
|
221
|
+
const e = $t("darkMode", !1), [r] = nt();
|
|
222
222
|
return /* @__PURE__ */ t.jsxs("div", { className: "flex h-10 items-center justify-between border-b bg-background/70 px-2", children: [
|
|
223
223
|
/* @__PURE__ */ t.jsxs("div", { className: "flex h-full space-x-2", children: [
|
|
224
224
|
e ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
@@ -284,12 +284,12 @@ const Le = ({ landscape: e = !1 }) => /* @__PURE__ */ t.jsxs(
|
|
|
284
284
|
<div class="frame-root"></div>
|
|
285
285
|
</body>
|
|
286
286
|
</html>`, Dr = (e) => {
|
|
287
|
-
const [r] = Re(), [, n] =
|
|
288
|
-
const { width: a, height:
|
|
287
|
+
const [r] = Re(), [, n] = nt(), [i, d] = H({}), s = Q(() => {
|
|
288
|
+
const { width: a, height: u } = e;
|
|
289
289
|
if (a < r) {
|
|
290
290
|
const y = parseFloat((a / r).toString());
|
|
291
291
|
let p = {};
|
|
292
|
-
|
|
292
|
+
u && (p = { height: u + 2 * u * (1 - y) }), d({
|
|
293
293
|
transform: `scale(${y})`,
|
|
294
294
|
transformOrigin: "top left",
|
|
295
295
|
...p,
|
|
@@ -316,7 +316,7 @@ function Br() {
|
|
|
316
316
|
if (We)
|
|
317
317
|
return _;
|
|
318
318
|
We = 1;
|
|
319
|
-
var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, i = e ? Symbol.for("react.fragment") : 60107, d = e ? Symbol.for("react.strict_mode") : 60108, s = e ? Symbol.for("react.profiler") : 60114, a = e ? Symbol.for("react.provider") : 60109,
|
|
319
|
+
var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, i = e ? Symbol.for("react.fragment") : 60107, d = e ? Symbol.for("react.strict_mode") : 60108, s = e ? Symbol.for("react.profiler") : 60114, a = e ? Symbol.for("react.provider") : 60109, u = e ? Symbol.for("react.context") : 60110, y = e ? Symbol.for("react.async_mode") : 60111, p = e ? Symbol.for("react.concurrent_mode") : 60111, m = e ? Symbol.for("react.forward_ref") : 60112, h = e ? Symbol.for("react.suspense") : 60113, b = e ? Symbol.for("react.suspense_list") : 60120, v = e ? Symbol.for("react.memo") : 60115, O = e ? Symbol.for("react.lazy") : 60116, E = e ? Symbol.for("react.block") : 60121, C = e ? Symbol.for("react.fundamental") : 60117, g = e ? Symbol.for("react.responder") : 60118, U = e ? Symbol.for("react.scope") : 60119;
|
|
320
320
|
function M(l) {
|
|
321
321
|
if (typeof l == "object" && l !== null) {
|
|
322
322
|
var D = l.$$typeof;
|
|
@@ -332,7 +332,7 @@ function Br() {
|
|
|
332
332
|
return l;
|
|
333
333
|
default:
|
|
334
334
|
switch (l = l && l.$$typeof, l) {
|
|
335
|
-
case
|
|
335
|
+
case u:
|
|
336
336
|
case m:
|
|
337
337
|
case O:
|
|
338
338
|
case v:
|
|
@@ -350,10 +350,10 @@ function Br() {
|
|
|
350
350
|
function B(l) {
|
|
351
351
|
return M(l) === p;
|
|
352
352
|
}
|
|
353
|
-
return _.AsyncMode = y, _.ConcurrentMode = p, _.ContextConsumer =
|
|
353
|
+
return _.AsyncMode = y, _.ConcurrentMode = p, _.ContextConsumer = u, _.ContextProvider = a, _.Element = r, _.ForwardRef = m, _.Fragment = i, _.Lazy = O, _.Memo = v, _.Portal = n, _.Profiler = s, _.StrictMode = d, _.Suspense = h, _.isAsyncMode = function(l) {
|
|
354
354
|
return B(l) || M(l) === y;
|
|
355
355
|
}, _.isConcurrentMode = B, _.isContextConsumer = function(l) {
|
|
356
|
-
return M(l) ===
|
|
356
|
+
return M(l) === u;
|
|
357
357
|
}, _.isContextProvider = function(l) {
|
|
358
358
|
return M(l) === a;
|
|
359
359
|
}, _.isElement = function(l) {
|
|
@@ -375,7 +375,7 @@ function Br() {
|
|
|
375
375
|
}, _.isSuspense = function(l) {
|
|
376
376
|
return M(l) === h;
|
|
377
377
|
}, _.isValidElementType = function(l) {
|
|
378
|
-
return typeof l == "string" || typeof l == "function" || l === i || l === p || l === s || l === d || l === h || l === b || typeof l == "object" && l !== null && (l.$$typeof === O || l.$$typeof === v || l.$$typeof === a || l.$$typeof ===
|
|
378
|
+
return typeof l == "string" || typeof l == "function" || l === i || l === p || l === s || l === d || l === h || l === b || typeof l == "object" && l !== null && (l.$$typeof === O || l.$$typeof === v || l.$$typeof === a || l.$$typeof === u || l.$$typeof === m || l.$$typeof === C || l.$$typeof === g || l.$$typeof === U || l.$$typeof === E);
|
|
379
379
|
}, _.typeOf = M, _;
|
|
380
380
|
}
|
|
381
381
|
var P = {};
|
|
@@ -390,10 +390,10 @@ var P = {};
|
|
|
390
390
|
var qe;
|
|
391
391
|
function $r() {
|
|
392
392
|
return qe || (qe = 1, process.env.NODE_ENV !== "production" && function() {
|
|
393
|
-
var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, i = e ? Symbol.for("react.fragment") : 60107, d = e ? Symbol.for("react.strict_mode") : 60108, s = e ? Symbol.for("react.profiler") : 60114, a = e ? Symbol.for("react.provider") : 60109,
|
|
393
|
+
var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, i = e ? Symbol.for("react.fragment") : 60107, d = e ? Symbol.for("react.strict_mode") : 60108, s = e ? Symbol.for("react.profiler") : 60114, a = e ? Symbol.for("react.provider") : 60109, u = e ? Symbol.for("react.context") : 60110, y = e ? Symbol.for("react.async_mode") : 60111, p = e ? Symbol.for("react.concurrent_mode") : 60111, m = e ? Symbol.for("react.forward_ref") : 60112, h = e ? Symbol.for("react.suspense") : 60113, b = e ? Symbol.for("react.suspense_list") : 60120, v = e ? Symbol.for("react.memo") : 60115, O = e ? Symbol.for("react.lazy") : 60116, E = e ? Symbol.for("react.block") : 60121, C = e ? Symbol.for("react.fundamental") : 60117, g = e ? Symbol.for("react.responder") : 60118, U = e ? Symbol.for("react.scope") : 60119;
|
|
394
394
|
function M(c) {
|
|
395
395
|
return typeof c == "string" || typeof c == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
396
|
-
c === i || c === p || c === s || c === d || c === h || c === b || typeof c == "object" && c !== null && (c.$$typeof === O || c.$$typeof === v || c.$$typeof === a || c.$$typeof ===
|
|
396
|
+
c === i || c === p || c === s || c === d || c === h || c === b || typeof c == "object" && c !== null && (c.$$typeof === O || c.$$typeof === v || c.$$typeof === a || c.$$typeof === u || c.$$typeof === m || c.$$typeof === C || c.$$typeof === g || c.$$typeof === U || c.$$typeof === E);
|
|
397
397
|
}
|
|
398
398
|
function B(c) {
|
|
399
399
|
if (typeof c == "object" && c !== null) {
|
|
@@ -412,7 +412,7 @@ function $r() {
|
|
|
412
412
|
default:
|
|
413
413
|
var Ie = oe && oe.$$typeof;
|
|
414
414
|
switch (Ie) {
|
|
415
|
-
case
|
|
415
|
+
case u:
|
|
416
416
|
case m:
|
|
417
417
|
case O:
|
|
418
418
|
case v:
|
|
@@ -427,15 +427,15 @@ function $r() {
|
|
|
427
427
|
}
|
|
428
428
|
}
|
|
429
429
|
}
|
|
430
|
-
var l = y, D = p, W =
|
|
430
|
+
var l = y, D = p, W = u, q = a, de = r, ue = m, re = i, fe = O, pe = v, J = n, he = s, Y = d, K = h, ne = !1;
|
|
431
431
|
function me(c) {
|
|
432
432
|
return ne || (ne = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), o(c) || B(c) === y;
|
|
433
433
|
}
|
|
434
434
|
function o(c) {
|
|
435
435
|
return B(c) === p;
|
|
436
436
|
}
|
|
437
|
-
function
|
|
438
|
-
return B(c) ===
|
|
437
|
+
function f(c) {
|
|
438
|
+
return B(c) === u;
|
|
439
439
|
}
|
|
440
440
|
function j(c) {
|
|
441
441
|
return B(c) === a;
|
|
@@ -467,11 +467,11 @@ function $r() {
|
|
|
467
467
|
function N(c) {
|
|
468
468
|
return B(c) === h;
|
|
469
469
|
}
|
|
470
|
-
P.AsyncMode = l, P.ConcurrentMode = D, P.ContextConsumer = W, P.ContextProvider = q, P.Element = de, P.ForwardRef = ue, P.Fragment = re, P.Lazy = fe, P.Memo = pe, P.Portal = J, P.Profiler = he, P.StrictMode = Y, P.Suspense = K, P.isAsyncMode = me, P.isConcurrentMode = o, P.isContextConsumer =
|
|
470
|
+
P.AsyncMode = l, P.ConcurrentMode = D, P.ContextConsumer = W, P.ContextProvider = q, P.Element = de, P.ForwardRef = ue, P.Fragment = re, P.Lazy = fe, P.Memo = pe, P.Portal = J, P.Profiler = he, P.StrictMode = Y, P.Suspense = K, P.isAsyncMode = me, P.isConcurrentMode = o, P.isContextConsumer = f, P.isContextProvider = j, P.isElement = S, P.isForwardRef = x, P.isFragment = k, P.isLazy = w, P.isMemo = T, P.isPortal = R, P.isProfiler = I, P.isStrictMode = A, P.isSuspense = N, P.isValidElementType = M, P.typeOf = B;
|
|
471
471
|
}()), P;
|
|
472
472
|
}
|
|
473
473
|
var Ue;
|
|
474
|
-
function
|
|
474
|
+
function dt() {
|
|
475
475
|
return Ue || (Ue = 1, process.env.NODE_ENV === "production" ? ae.exports = Br() : ae.exports = $r()), ae.exports;
|
|
476
476
|
}
|
|
477
477
|
/*
|
|
@@ -497,8 +497,8 @@ function Nr() {
|
|
|
497
497
|
var s = new String("abc");
|
|
498
498
|
if (s[5] = "de", Object.getOwnPropertyNames(s)[0] === "5")
|
|
499
499
|
return !1;
|
|
500
|
-
for (var a = {},
|
|
501
|
-
a["_" + String.fromCharCode(
|
|
500
|
+
for (var a = {}, u = 0; u < 10; u++)
|
|
501
|
+
a["_" + String.fromCharCode(u)] = u;
|
|
502
502
|
var y = Object.getOwnPropertyNames(a).map(function(m) {
|
|
503
503
|
return a[m];
|
|
504
504
|
});
|
|
@@ -513,14 +513,14 @@ function Nr() {
|
|
|
513
513
|
}
|
|
514
514
|
}
|
|
515
515
|
return ge = d() ? Object.assign : function(s, a) {
|
|
516
|
-
for (var
|
|
517
|
-
|
|
518
|
-
for (var h in
|
|
519
|
-
r.call(
|
|
516
|
+
for (var u, y = i(s), p, m = 1; m < arguments.length; m++) {
|
|
517
|
+
u = Object(arguments[m]);
|
|
518
|
+
for (var h in u)
|
|
519
|
+
r.call(u, h) && (y[h] = u[h]);
|
|
520
520
|
if (e) {
|
|
521
|
-
p = e(
|
|
521
|
+
p = e(u);
|
|
522
522
|
for (var b = 0; b < p.length; b++)
|
|
523
|
-
n.call(
|
|
523
|
+
n.call(u, p[b]) && (y[p[b]] = u[p[b]]);
|
|
524
524
|
}
|
|
525
525
|
}
|
|
526
526
|
return y;
|
|
@@ -535,7 +535,7 @@ function _e() {
|
|
|
535
535
|
return xe = e, xe;
|
|
536
536
|
}
|
|
537
537
|
var be, He;
|
|
538
|
-
function
|
|
538
|
+
function ut() {
|
|
539
539
|
return He || (He = 1, be = Function.call.bind(Object.prototype.hasOwnProperty)), be;
|
|
540
540
|
}
|
|
541
541
|
var we, Ke;
|
|
@@ -546,7 +546,7 @@ function Lr() {
|
|
|
546
546
|
var e = function() {
|
|
547
547
|
};
|
|
548
548
|
if (process.env.NODE_ENV !== "production") {
|
|
549
|
-
var r = _e(), n = {}, i =
|
|
549
|
+
var r = _e(), n = {}, i = ut();
|
|
550
550
|
e = function(s) {
|
|
551
551
|
var a = "Warning: " + s;
|
|
552
552
|
typeof console < "u" && console.error(a);
|
|
@@ -556,7 +556,7 @@ function Lr() {
|
|
|
556
556
|
}
|
|
557
557
|
};
|
|
558
558
|
}
|
|
559
|
-
function d(s, a,
|
|
559
|
+
function d(s, a, u, y, p) {
|
|
560
560
|
if (process.env.NODE_ENV !== "production") {
|
|
561
561
|
for (var m in s)
|
|
562
562
|
if (i(s, m)) {
|
|
@@ -564,21 +564,21 @@ function Lr() {
|
|
|
564
564
|
try {
|
|
565
565
|
if (typeof s[m] != "function") {
|
|
566
566
|
var b = Error(
|
|
567
|
-
(y || "React class") + ": " +
|
|
567
|
+
(y || "React class") + ": " + u + " type `" + m + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof s[m] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
568
568
|
);
|
|
569
569
|
throw b.name = "Invariant Violation", b;
|
|
570
570
|
}
|
|
571
|
-
h = s[m](a, m, y,
|
|
571
|
+
h = s[m](a, m, y, u, null, r);
|
|
572
572
|
} catch (O) {
|
|
573
573
|
h = O;
|
|
574
574
|
}
|
|
575
575
|
if (h && !(h instanceof Error) && e(
|
|
576
|
-
(y || "React class") + ": type specification of " +
|
|
576
|
+
(y || "React class") + ": type specification of " + u + " `" + m + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof h + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
577
577
|
), h instanceof Error && !(h.message in n)) {
|
|
578
578
|
n[h.message] = !0;
|
|
579
579
|
var v = p ? p() : "";
|
|
580
580
|
e(
|
|
581
|
-
"Failed " +
|
|
581
|
+
"Failed " + u + " type: " + h.message + (v ?? "")
|
|
582
582
|
);
|
|
583
583
|
}
|
|
584
584
|
}
|
|
@@ -593,10 +593,10 @@ function Fr() {
|
|
|
593
593
|
if (Ve)
|
|
594
594
|
return Ee;
|
|
595
595
|
Ve = 1;
|
|
596
|
-
var e =
|
|
596
|
+
var e = dt(), r = Nr(), n = _e(), i = ut(), d = Lr(), s = function() {
|
|
597
597
|
};
|
|
598
|
-
process.env.NODE_ENV !== "production" && (s = function(
|
|
599
|
-
var y = "Warning: " +
|
|
598
|
+
process.env.NODE_ENV !== "production" && (s = function(u) {
|
|
599
|
+
var y = "Warning: " + u;
|
|
600
600
|
typeof console < "u" && console.error(y);
|
|
601
601
|
try {
|
|
602
602
|
throw new Error(y);
|
|
@@ -606,12 +606,12 @@ function Fr() {
|
|
|
606
606
|
function a() {
|
|
607
607
|
return null;
|
|
608
608
|
}
|
|
609
|
-
return Ee = function(
|
|
609
|
+
return Ee = function(u, y) {
|
|
610
610
|
var p = typeof Symbol == "function" && Symbol.iterator, m = "@@iterator";
|
|
611
611
|
function h(o) {
|
|
612
|
-
var
|
|
613
|
-
if (typeof
|
|
614
|
-
return
|
|
612
|
+
var f = o && (p && o[p] || o[m]);
|
|
613
|
+
if (typeof f == "function")
|
|
614
|
+
return f;
|
|
615
615
|
}
|
|
616
616
|
var b = "<<anonymous>>", v = {
|
|
617
617
|
array: g("array"),
|
|
@@ -634,16 +634,16 @@ function Fr() {
|
|
|
634
634
|
shape: fe,
|
|
635
635
|
exact: pe
|
|
636
636
|
};
|
|
637
|
-
function O(o,
|
|
638
|
-
return o ===
|
|
637
|
+
function O(o, f) {
|
|
638
|
+
return o === f ? o !== 0 || 1 / o === 1 / f : o !== o && f !== f;
|
|
639
639
|
}
|
|
640
|
-
function E(o,
|
|
641
|
-
this.message = o, this.data =
|
|
640
|
+
function E(o, f) {
|
|
641
|
+
this.message = o, this.data = f && typeof f == "object" ? f : {}, this.stack = "";
|
|
642
642
|
}
|
|
643
643
|
E.prototype = Error.prototype;
|
|
644
644
|
function C(o) {
|
|
645
645
|
if (process.env.NODE_ENV !== "production")
|
|
646
|
-
var
|
|
646
|
+
var f = {}, j = 0;
|
|
647
647
|
function S(k, w, T, R, I, A, N) {
|
|
648
648
|
if (R = R || b, A = A || T, N !== n) {
|
|
649
649
|
if (y) {
|
|
@@ -653,10 +653,10 @@ function Fr() {
|
|
|
653
653
|
throw c.name = "Invariant Violation", c;
|
|
654
654
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
655
655
|
var z = R + ":" + T;
|
|
656
|
-
!
|
|
656
|
+
!f[z] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
657
657
|
j < 3 && (s(
|
|
658
658
|
"You are manually calling a React.PropTypes validation function for the `" + A + "` prop on `" + R + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
659
|
-
),
|
|
659
|
+
), f[z] = !0, j++);
|
|
660
660
|
}
|
|
661
661
|
}
|
|
662
662
|
return w[T] == null ? k ? w[T] === null ? new E("The " + I + " `" + A + "` is marked as required " + ("in `" + R + "`, but its value is `null`.")) : new E("The " + I + " `" + A + "` is marked as required in " + ("`" + R + "`, but its value is `undefined`.")) : null : o(w, T, R, I, A);
|
|
@@ -665,7 +665,7 @@ function Fr() {
|
|
|
665
665
|
return x.isRequired = S.bind(null, !0), x;
|
|
666
666
|
}
|
|
667
667
|
function g(o) {
|
|
668
|
-
function
|
|
668
|
+
function f(j, S, x, k, w, T) {
|
|
669
669
|
var R = j[S], I = Y(R);
|
|
670
670
|
if (I !== o) {
|
|
671
671
|
var A = K(R);
|
|
@@ -676,13 +676,13 @@ function Fr() {
|
|
|
676
676
|
}
|
|
677
677
|
return null;
|
|
678
678
|
}
|
|
679
|
-
return C(
|
|
679
|
+
return C(f);
|
|
680
680
|
}
|
|
681
681
|
function U() {
|
|
682
682
|
return C(a);
|
|
683
683
|
}
|
|
684
684
|
function M(o) {
|
|
685
|
-
function
|
|
685
|
+
function f(j, S, x, k, w) {
|
|
686
686
|
if (typeof o != "function")
|
|
687
687
|
return new E("Property `" + w + "` of component `" + x + "` has invalid PropType notation inside arrayOf.");
|
|
688
688
|
var T = j[S];
|
|
@@ -697,12 +697,12 @@ function Fr() {
|
|
|
697
697
|
}
|
|
698
698
|
return null;
|
|
699
699
|
}
|
|
700
|
-
return C(
|
|
700
|
+
return C(f);
|
|
701
701
|
}
|
|
702
702
|
function B() {
|
|
703
|
-
function o(
|
|
704
|
-
var w =
|
|
705
|
-
if (!
|
|
703
|
+
function o(f, j, S, x, k) {
|
|
704
|
+
var w = f[j];
|
|
705
|
+
if (!u(w)) {
|
|
706
706
|
var T = Y(w);
|
|
707
707
|
return new E("Invalid " + x + " `" + k + "` of type " + ("`" + T + "` supplied to `" + S + "`, expected a single ReactElement."));
|
|
708
708
|
}
|
|
@@ -711,8 +711,8 @@ function Fr() {
|
|
|
711
711
|
return C(o);
|
|
712
712
|
}
|
|
713
713
|
function l() {
|
|
714
|
-
function o(
|
|
715
|
-
var w =
|
|
714
|
+
function o(f, j, S, x, k) {
|
|
715
|
+
var w = f[j];
|
|
716
716
|
if (!e.isValidElementType(w)) {
|
|
717
717
|
var T = Y(w);
|
|
718
718
|
return new E("Invalid " + x + " `" + k + "` of type " + ("`" + T + "` supplied to `" + S + "`, expected a single ReactElement type."));
|
|
@@ -722,21 +722,21 @@ function Fr() {
|
|
|
722
722
|
return C(o);
|
|
723
723
|
}
|
|
724
724
|
function D(o) {
|
|
725
|
-
function
|
|
725
|
+
function f(j, S, x, k, w) {
|
|
726
726
|
if (!(j[S] instanceof o)) {
|
|
727
727
|
var T = o.name || b, R = me(j[S]);
|
|
728
728
|
return new E("Invalid " + k + " `" + w + "` of type " + ("`" + R + "` supplied to `" + x + "`, expected ") + ("instance of `" + T + "`."));
|
|
729
729
|
}
|
|
730
730
|
return null;
|
|
731
731
|
}
|
|
732
|
-
return C(
|
|
732
|
+
return C(f);
|
|
733
733
|
}
|
|
734
734
|
function W(o) {
|
|
735
735
|
if (!Array.isArray(o))
|
|
736
736
|
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? s(
|
|
737
737
|
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
738
738
|
) : s("Invalid argument supplied to oneOf, expected an array.")), a;
|
|
739
|
-
function
|
|
739
|
+
function f(j, S, x, k, w) {
|
|
740
740
|
for (var T = j[S], R = 0; R < o.length; R++)
|
|
741
741
|
if (O(T, o[R]))
|
|
742
742
|
return null;
|
|
@@ -746,10 +746,10 @@ function Fr() {
|
|
|
746
746
|
});
|
|
747
747
|
return new E("Invalid " + k + " `" + w + "` of value `" + String(T) + "` " + ("supplied to `" + x + "`, expected one of " + I + "."));
|
|
748
748
|
}
|
|
749
|
-
return C(
|
|
749
|
+
return C(f);
|
|
750
750
|
}
|
|
751
751
|
function q(o) {
|
|
752
|
-
function
|
|
752
|
+
function f(j, S, x, k, w) {
|
|
753
753
|
if (typeof o != "function")
|
|
754
754
|
return new E("Property `" + w + "` of component `" + x + "` has invalid PropType notation inside objectOf.");
|
|
755
755
|
var T = j[S], R = Y(T);
|
|
@@ -763,16 +763,16 @@ function Fr() {
|
|
|
763
763
|
}
|
|
764
764
|
return null;
|
|
765
765
|
}
|
|
766
|
-
return C(
|
|
766
|
+
return C(f);
|
|
767
767
|
}
|
|
768
768
|
function de(o) {
|
|
769
769
|
if (!Array.isArray(o))
|
|
770
770
|
return process.env.NODE_ENV !== "production" && s("Invalid argument supplied to oneOfType, expected an instance of array."), a;
|
|
771
|
-
for (var
|
|
772
|
-
var j = o[
|
|
771
|
+
for (var f = 0; f < o.length; f++) {
|
|
772
|
+
var j = o[f];
|
|
773
773
|
if (typeof j != "function")
|
|
774
774
|
return s(
|
|
775
|
-
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ne(j) + " at index " +
|
|
775
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ne(j) + " at index " + f + "."
|
|
776
776
|
), a;
|
|
777
777
|
}
|
|
778
778
|
function S(x, k, w, T, R) {
|
|
@@ -788,18 +788,18 @@ function Fr() {
|
|
|
788
788
|
return C(S);
|
|
789
789
|
}
|
|
790
790
|
function ue() {
|
|
791
|
-
function o(
|
|
792
|
-
return J(
|
|
791
|
+
function o(f, j, S, x, k) {
|
|
792
|
+
return J(f[j]) ? null : new E("Invalid " + x + " `" + k + "` supplied to " + ("`" + S + "`, expected a ReactNode."));
|
|
793
793
|
}
|
|
794
794
|
return C(o);
|
|
795
795
|
}
|
|
796
|
-
function re(o,
|
|
796
|
+
function re(o, f, j, S, x) {
|
|
797
797
|
return new E(
|
|
798
|
-
(o || "React class") + ": " +
|
|
798
|
+
(o || "React class") + ": " + f + " type `" + j + "." + S + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + x + "`."
|
|
799
799
|
);
|
|
800
800
|
}
|
|
801
801
|
function fe(o) {
|
|
802
|
-
function
|
|
802
|
+
function f(j, S, x, k, w) {
|
|
803
803
|
var T = j[S], R = Y(T);
|
|
804
804
|
if (R !== "object")
|
|
805
805
|
return new E("Invalid " + k + " `" + w + "` of type `" + R + "` " + ("supplied to `" + x + "`, expected `object`."));
|
|
@@ -813,10 +813,10 @@ function Fr() {
|
|
|
813
813
|
}
|
|
814
814
|
return null;
|
|
815
815
|
}
|
|
816
|
-
return C(
|
|
816
|
+
return C(f);
|
|
817
817
|
}
|
|
818
818
|
function pe(o) {
|
|
819
|
-
function
|
|
819
|
+
function f(j, S, x, k, w) {
|
|
820
820
|
var T = j[S], R = Y(T);
|
|
821
821
|
if (R !== "object")
|
|
822
822
|
return new E("Invalid " + k + " `" + w + "` of type `" + R + "` " + ("supplied to `" + x + "`, expected `object`."));
|
|
@@ -836,7 +836,7 @@ Valid keys: ` + JSON.stringify(Object.keys(o), null, " ")
|
|
|
836
836
|
}
|
|
837
837
|
return null;
|
|
838
838
|
}
|
|
839
|
-
return C(
|
|
839
|
+
return C(f);
|
|
840
840
|
}
|
|
841
841
|
function J(o) {
|
|
842
842
|
switch (typeof o) {
|
|
@@ -849,12 +849,12 @@ Valid keys: ` + JSON.stringify(Object.keys(o), null, " ")
|
|
|
849
849
|
case "object":
|
|
850
850
|
if (Array.isArray(o))
|
|
851
851
|
return o.every(J);
|
|
852
|
-
if (o === null ||
|
|
852
|
+
if (o === null || u(o))
|
|
853
853
|
return !0;
|
|
854
|
-
var
|
|
855
|
-
if (
|
|
856
|
-
var j =
|
|
857
|
-
if (
|
|
854
|
+
var f = h(o);
|
|
855
|
+
if (f) {
|
|
856
|
+
var j = f.call(o), S;
|
|
857
|
+
if (f !== o.entries) {
|
|
858
858
|
for (; !(S = j.next()).done; )
|
|
859
859
|
if (!J(S.value))
|
|
860
860
|
return !1;
|
|
@@ -871,37 +871,37 @@ Valid keys: ` + JSON.stringify(Object.keys(o), null, " ")
|
|
|
871
871
|
return !1;
|
|
872
872
|
}
|
|
873
873
|
}
|
|
874
|
-
function he(o,
|
|
875
|
-
return o === "symbol" ? !0 :
|
|
874
|
+
function he(o, f) {
|
|
875
|
+
return o === "symbol" ? !0 : f ? f["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && f instanceof Symbol : !1;
|
|
876
876
|
}
|
|
877
877
|
function Y(o) {
|
|
878
|
-
var
|
|
879
|
-
return Array.isArray(o) ? "array" : o instanceof RegExp ? "object" : he(
|
|
878
|
+
var f = typeof o;
|
|
879
|
+
return Array.isArray(o) ? "array" : o instanceof RegExp ? "object" : he(f, o) ? "symbol" : f;
|
|
880
880
|
}
|
|
881
881
|
function K(o) {
|
|
882
882
|
if (typeof o > "u" || o === null)
|
|
883
883
|
return "" + o;
|
|
884
|
-
var
|
|
885
|
-
if (
|
|
884
|
+
var f = Y(o);
|
|
885
|
+
if (f === "object") {
|
|
886
886
|
if (o instanceof Date)
|
|
887
887
|
return "date";
|
|
888
888
|
if (o instanceof RegExp)
|
|
889
889
|
return "regexp";
|
|
890
890
|
}
|
|
891
|
-
return
|
|
891
|
+
return f;
|
|
892
892
|
}
|
|
893
893
|
function ne(o) {
|
|
894
|
-
var
|
|
895
|
-
switch (
|
|
894
|
+
var f = K(o);
|
|
895
|
+
switch (f) {
|
|
896
896
|
case "array":
|
|
897
897
|
case "object":
|
|
898
|
-
return "an " +
|
|
898
|
+
return "an " + f;
|
|
899
899
|
case "boolean":
|
|
900
900
|
case "date":
|
|
901
901
|
case "regexp":
|
|
902
|
-
return "a " +
|
|
902
|
+
return "a " + f;
|
|
903
903
|
default:
|
|
904
|
-
return
|
|
904
|
+
return f;
|
|
905
905
|
}
|
|
906
906
|
}
|
|
907
907
|
function me(o) {
|
|
@@ -921,7 +921,7 @@ function Wr() {
|
|
|
921
921
|
function n() {
|
|
922
922
|
}
|
|
923
923
|
return n.resetWarningCache = r, Se = function() {
|
|
924
|
-
function i(a,
|
|
924
|
+
function i(a, u, y, p, m, h) {
|
|
925
925
|
if (h !== e) {
|
|
926
926
|
var b = new Error(
|
|
927
927
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
@@ -960,17 +960,17 @@ function Wr() {
|
|
|
960
960
|
}, Se;
|
|
961
961
|
}
|
|
962
962
|
if (process.env.NODE_ENV !== "production") {
|
|
963
|
-
var qr =
|
|
963
|
+
var qr = dt(), Ur = !0;
|
|
964
964
|
Te.exports = Fr()(qr.isElement, Ur);
|
|
965
965
|
} else
|
|
966
966
|
Te.exports = Wr()();
|
|
967
967
|
var Yr = Te.exports;
|
|
968
968
|
const L = /* @__PURE__ */ kr(Yr);
|
|
969
|
-
let
|
|
970
|
-
typeof document < "u" && (
|
|
971
|
-
typeof window < "u" && (
|
|
972
|
-
const
|
|
973
|
-
class
|
|
969
|
+
let ft, pt;
|
|
970
|
+
typeof document < "u" && (ft = document);
|
|
971
|
+
typeof window < "u" && (pt = window);
|
|
972
|
+
const ht = G.createContext({ document: ft, window: pt }), Pe = () => G.useContext(ht), { Provider: zr, Consumer: eo } = ht;
|
|
973
|
+
class mt extends Xe {
|
|
974
974
|
componentDidMount() {
|
|
975
975
|
this.props.contentDidMount();
|
|
976
976
|
}
|
|
@@ -978,10 +978,10 @@ class ht extends Xe {
|
|
|
978
978
|
this.props.contentDidUpdate();
|
|
979
979
|
}
|
|
980
980
|
render() {
|
|
981
|
-
return
|
|
981
|
+
return bt.only(this.props.children);
|
|
982
982
|
}
|
|
983
983
|
}
|
|
984
|
-
V(
|
|
984
|
+
V(mt, "propTypes", {
|
|
985
985
|
children: L.element.isRequired,
|
|
986
986
|
contentDidMount: L.func.isRequired,
|
|
987
987
|
contentDidUpdate: L.func.isRequired
|
|
@@ -1023,8 +1023,8 @@ class je extends Xe {
|
|
|
1023
1023
|
const n = this.getDoc();
|
|
1024
1024
|
if (!n)
|
|
1025
1025
|
return null;
|
|
1026
|
-
const i = this.props.contentDidMount, d = this.props.contentDidUpdate, s = n.defaultView || n.parentView, a = /* @__PURE__ */ t.jsx(
|
|
1027
|
-
return [Ne.createPortal(this.props.head, this.getDoc().head), Ne.createPortal(a,
|
|
1026
|
+
const i = this.props.contentDidMount, d = this.props.contentDidUpdate, s = n.defaultView || n.parentView, a = /* @__PURE__ */ t.jsx(mt, { contentDidMount: i, contentDidUpdate: d, children: /* @__PURE__ */ t.jsx(zr, { value: { document: n, window: s }, children: /* @__PURE__ */ t.jsx("div", { className: "frame-content", children: this.props.children }) }) }), u = this.getMountTarget();
|
|
1027
|
+
return [Ne.createPortal(this.props.head, this.getDoc().head), Ne.createPortal(a, u)];
|
|
1028
1028
|
}
|
|
1029
1029
|
render() {
|
|
1030
1030
|
const n = {
|
|
@@ -1066,18 +1066,18 @@ const Hr = G.forwardRef((e, r) => /* @__PURE__ */ t.jsx(je, { ...e, forwardedRef
|
|
|
1066
1066
|
setTimeout(() => {
|
|
1067
1067
|
if (!ee(i))
|
|
1068
1068
|
return;
|
|
1069
|
-
const s =
|
|
1069
|
+
const s = yt(r, ce(n));
|
|
1070
1070
|
if (s) {
|
|
1071
1071
|
const a = s.getAttribute("data-style-prop");
|
|
1072
1072
|
if (a) {
|
|
1073
|
-
const
|
|
1074
|
-
d([{ id:
|
|
1073
|
+
const u = s.getAttribute("data-style-id"), y = s.getAttribute("data-block-parent");
|
|
1074
|
+
d([{ id: u, prop: a, blockId: y }]);
|
|
1075
1075
|
}
|
|
1076
1076
|
}
|
|
1077
1077
|
}, 100);
|
|
1078
1078
|
}, [r, n, d, i]), /* @__PURE__ */ t.jsx("div", { id: "canvas", className: "relative h-screen max-w-full outline-2", children: e });
|
|
1079
|
-
},
|
|
1080
|
-
const { window: e } = Pe(), [r, n] = X(), [, i] = Z(), { undo: d, redo: s } = ke(), a =
|
|
1079
|
+
}, yt = (e, r) => e.querySelector(`[data-block-id="${r}"]`), Vr = () => {
|
|
1080
|
+
const { window: e } = Pe(), [r, n] = X(), [, i] = Z(), { undo: d, redo: s } = ke(), a = ot(), [, u] = Nt(), [, y] = Lt(), { pasteBlocks: p } = Ft(), [, m] = st(), h = at(), { savePage: b } = Wt(), [v] = te(qt), [, O] = te(Ut), E = (C) => {
|
|
1081
1081
|
C.key === "Enter" && (C.preventDefault(), r.length === 1 && O(ce(r)));
|
|
1082
1082
|
};
|
|
1083
1083
|
return F(() => {
|
|
@@ -1092,7 +1092,7 @@ const Hr = G.forwardRef((e, r) => /* @__PURE__ */ t.jsx(je, { ...e, forwardedRef
|
|
|
1092
1092
|
return !0;
|
|
1093
1093
|
g.preventDefault();
|
|
1094
1094
|
}
|
|
1095
|
-
g.key === "s" && (g.stopPropagation(), g.preventDefault(), b()), g.key === "z" && d(), g.key === "y" && s(), g.key === "d" && a(r), g.key === "x" &&
|
|
1095
|
+
g.key === "s" && (g.stopPropagation(), g.preventDefault(), b()), g.key === "z" && d(), g.key === "y" && s(), g.key === "d" && a(r), g.key === "x" && u(r), g.key === "c" && y(r), g.key === "v" && r.length > 0 && p(r[0]);
|
|
1096
1096
|
}
|
|
1097
1097
|
};
|
|
1098
1098
|
return e.removeEventListener("keydown", C), e.addEventListener("keydown", C), () => {
|
|
@@ -1106,7 +1106,7 @@ const Hr = G.forwardRef((e, r) => /* @__PURE__ */ t.jsx(je, { ...e, forwardedRef
|
|
|
1106
1106
|
m,
|
|
1107
1107
|
s,
|
|
1108
1108
|
a,
|
|
1109
|
-
|
|
1109
|
+
u,
|
|
1110
1110
|
y,
|
|
1111
1111
|
p,
|
|
1112
1112
|
v,
|
|
@@ -1136,7 +1136,7 @@ const Hr = G.forwardRef((e, r) => /* @__PURE__ */ t.jsx(je, { ...e, forwardedRef
|
|
|
1136
1136
|
selectedBlockElement: e,
|
|
1137
1137
|
block: r
|
|
1138
1138
|
}) => {
|
|
1139
|
-
const n =
|
|
1139
|
+
const n = at(), i = ot(), [, d] = X(), [, s] = Z(), { floatingStyles: a, refs: u, update: y } = xr({
|
|
1140
1140
|
placement: "top-start",
|
|
1141
1141
|
middleware: [br(), gr()],
|
|
1142
1142
|
elements: {
|
|
@@ -1150,7 +1150,7 @@ const Hr = G.forwardRef((e, r) => /* @__PURE__ */ t.jsx(je, { ...e, forwardedRef
|
|
|
1150
1150
|
{
|
|
1151
1151
|
role: "button",
|
|
1152
1152
|
tabIndex: 0,
|
|
1153
|
-
ref:
|
|
1153
|
+
ref: u.setFloating,
|
|
1154
1154
|
style: a,
|
|
1155
1155
|
onClick: (h) => {
|
|
1156
1156
|
h.stopPropagation(), h.preventDefault();
|
|
@@ -1176,7 +1176,7 @@ const Hr = G.forwardRef((e, r) => /* @__PURE__ */ t.jsx(je, { ...e, forwardedRef
|
|
|
1176
1176
|
}
|
|
1177
1177
|
);
|
|
1178
1178
|
}, Zr = ({ model: e }) => {
|
|
1179
|
-
const [r] = Ht(), [n] = X(), [i] =
|
|
1179
|
+
const [r] = Ht(), [n] = X(), [i] = rt(), [d] = Ae(), [s] = Z(), { document: a, window: u } = Pe(), [y] = H(a == null ? void 0 : a.getElementById("highlighted-block")), [p] = H(
|
|
1180
1180
|
a == null ? void 0 : a.getElementById("selected-block")
|
|
1181
1181
|
), [m] = H(
|
|
1182
1182
|
a == null ? void 0 : a.getElementById("selected-styling-block")
|
|
@@ -1192,7 +1192,7 @@ const Hr = G.forwardRef((e, r) => /* @__PURE__ */ t.jsx(je, { ...e, forwardedRef
|
|
|
1192
1192
|
});
|
|
1193
1193
|
E.primary.DEFAULT = v, E.secondary.DEFAULT = O;
|
|
1194
1194
|
const C = $(r, "roundedCorners", "0");
|
|
1195
|
-
!
|
|
1195
|
+
!u || !u.tailwind || (u.tailwind.config = {
|
|
1196
1196
|
darkMode: "class",
|
|
1197
1197
|
theme: {
|
|
1198
1198
|
fontFamily: {
|
|
@@ -1208,7 +1208,7 @@ const Hr = G.forwardRef((e, r) => /* @__PURE__ */ t.jsx(je, { ...e, forwardedRef
|
|
|
1208
1208
|
},
|
|
1209
1209
|
plugins: [
|
|
1210
1210
|
// @ts-ignore
|
|
1211
|
-
|
|
1211
|
+
u.tailwind.plugin.withOptions(({ prefix: g = "ui" } = {}) => ({ addVariant: U }) => {
|
|
1212
1212
|
for (const M of ["open", "checked", "selected", "active", "disabled"])
|
|
1213
1213
|
U(`${g}-${M}`, [
|
|
1214
1214
|
`&[data-headlessui-state~="${M}"]`,
|
|
@@ -1220,7 +1220,7 @@ const Hr = G.forwardRef((e, r) => /* @__PURE__ */ t.jsx(je, { ...e, forwardedRef
|
|
|
1220
1220
|
})
|
|
1221
1221
|
]
|
|
1222
1222
|
});
|
|
1223
|
-
}, [r,
|
|
1223
|
+
}, [r, u, h, b]), F(() => {
|
|
1224
1224
|
p && (p.textContent = `${ie(n, (v) => `[data-block-id="${v}"]`).join(",")}{
|
|
1225
1225
|
outline: 1px solid ${n.length === 1 ? "#42a1fc" : "orange"} !important; outline-offset: -1px;
|
|
1226
1226
|
}`);
|
|
@@ -1265,15 +1265,15 @@ const Hr = G.forwardRef((e, r) => /* @__PURE__ */ t.jsx(je, { ...e, forwardedRef
|
|
|
1265
1265
|
h && /* @__PURE__ */ t.jsx("style", { children: `h1,h2,h3,h4,h5,h6{font-family: "${h}",ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";}` })
|
|
1266
1266
|
] }) : null;
|
|
1267
1267
|
}, Jr = () => {
|
|
1268
|
-
const { t: e } =
|
|
1268
|
+
const { t: e } = ct();
|
|
1269
1269
|
return /* @__PURE__ */ t.jsx("div", { className: "my-auto py-24 text-center text-gray-600 dark:text-white", children: /* @__PURE__ */ t.jsx("h1", { className: "mb-10 text-4xl ", children: e("canvas_empty") }) });
|
|
1270
1270
|
}, Qr = (e) => {
|
|
1271
1271
|
const r = {};
|
|
1272
1272
|
return Object.keys(e).forEach((n) => {
|
|
1273
|
-
|
|
1273
|
+
Qe(e[n]) && e[n].startsWith($e) && (r[n] = e[n].replace($e, "").split(","));
|
|
1274
1274
|
}), r;
|
|
1275
1275
|
}, en = Tt((e) => {
|
|
1276
|
-
const r = e.replace(
|
|
1276
|
+
const r = e.replace(lt, "").split(",");
|
|
1277
1277
|
return jr(r[0], r[1]);
|
|
1278
1278
|
});
|
|
1279
1279
|
function tn(e, r) {
|
|
@@ -1282,7 +1282,7 @@ function tn(e, r) {
|
|
|
1282
1282
|
function rn(e, r, n, i) {
|
|
1283
1283
|
const d = {};
|
|
1284
1284
|
return Object.keys(e).forEach((s) => {
|
|
1285
|
-
if (
|
|
1285
|
+
if (Qe(e[s]) && e[s].startsWith(lt)) {
|
|
1286
1286
|
const a = en(e[s]);
|
|
1287
1287
|
d[s] = {
|
|
1288
1288
|
className: a,
|
|
@@ -1298,7 +1298,7 @@ function rn(e, r, n, i) {
|
|
|
1298
1298
|
}), d;
|
|
1299
1299
|
}
|
|
1300
1300
|
function Ce({ blocks: e }) {
|
|
1301
|
-
const r =
|
|
1301
|
+
const r = it(), [, n] = Ae(), [, i] = Z(), [, d] = X(), s = Q(
|
|
1302
1302
|
(p) => {
|
|
1303
1303
|
var h;
|
|
1304
1304
|
const m = (h = p.currentTarget) == null ? void 0 : h.getAttribute("data-style-id");
|
|
@@ -1310,7 +1310,7 @@ function Ce({ blocks: e }) {
|
|
|
1310
1310
|
n(""), p.stopPropagation();
|
|
1311
1311
|
},
|
|
1312
1312
|
[n]
|
|
1313
|
-
),
|
|
1313
|
+
), u = Q(
|
|
1314
1314
|
(p) => {
|
|
1315
1315
|
p.stopPropagation();
|
|
1316
1316
|
const m = p.currentTarget;
|
|
@@ -1324,8 +1324,8 @@ function Ce({ blocks: e }) {
|
|
|
1324
1324
|
},
|
|
1325
1325
|
[i, d]
|
|
1326
1326
|
), y = Q(
|
|
1327
|
-
(p) => rn(p, s, a,
|
|
1328
|
-
[s, a]
|
|
1327
|
+
(p) => rn(p, s, a, u),
|
|
1328
|
+
[u, s, a]
|
|
1329
1329
|
);
|
|
1330
1330
|
return /* @__PURE__ */ t.jsx(t.Fragment, { children: G.Children.toArray(
|
|
1331
1331
|
e.map((p, m) => {
|
|
@@ -1335,33 +1335,39 @@ function Ce({ blocks: e }) {
|
|
|
1335
1335
|
h[C].map((g) => /* @__PURE__ */ t.jsx(Ce, { blocks: [jt(r, { _id: g })] }))
|
|
1336
1336
|
);
|
|
1337
1337
|
});
|
|
1338
|
-
const v =
|
|
1338
|
+
const v = Je(r, { _parent: p._id });
|
|
1339
1339
|
b.children = v.length ? /* @__PURE__ */ t.jsx(Ce, { blocks: v }) : null;
|
|
1340
|
-
const O = Cr(p._type), E = (O == null ? void 0 : O.component) || null;
|
|
1341
|
-
return G.createElement(E, {
|
|
1340
|
+
const O = Cr(p._type), E = $(O, "builderComponent", O == null ? void 0 : O.component) || null;
|
|
1341
|
+
return /* @__PURE__ */ t.jsx(Ze, { children: G.createElement(E, {
|
|
1342
1342
|
blockProps: {
|
|
1343
|
-
onClick:
|
|
1343
|
+
onClick: u,
|
|
1344
1344
|
"data-block-id": p._id,
|
|
1345
1345
|
"data-block-type": p._type
|
|
1346
1346
|
},
|
|
1347
|
+
inBuilder: !0,
|
|
1347
1348
|
...p,
|
|
1348
1349
|
index: m,
|
|
1349
1350
|
...y(p),
|
|
1350
1351
|
...b,
|
|
1351
|
-
|
|
1352
|
-
|
|
1352
|
+
isBuilderMode: () => !0,
|
|
1353
|
+
setBlockRoot: () => ({
|
|
1354
|
+
onClick: u,
|
|
1355
|
+
"data-block-id": p._id,
|
|
1356
|
+
"data-block-type": p._type
|
|
1357
|
+
})
|
|
1358
|
+
}) });
|
|
1353
1359
|
})
|
|
1354
1360
|
) });
|
|
1355
1361
|
}
|
|
1356
1362
|
const nn = () => {
|
|
1357
|
-
const e =
|
|
1358
|
-
return /* @__PURE__ */ t.jsx(Tr, { children: e.length ? /* @__PURE__ */ t.jsx(Ce, { blocks:
|
|
1363
|
+
const e = it();
|
|
1364
|
+
return /* @__PURE__ */ t.jsx(Tr, { children: e.length ? /* @__PURE__ */ t.jsx(Ce, { blocks: Je(e, (r) => ee(r._parent)) }) : /* @__PURE__ */ t.jsx(Jr, {}) });
|
|
1359
1365
|
}, on = (e, r) => e.querySelector(`[data-style-id="${r}"]`), sn = () => {
|
|
1360
|
-
const [e] = te(Kt), [r] =
|
|
1366
|
+
const [e] = te(Kt), [r] = st(), [n] = Re(), [, i] = X(), d = Vt(), [, s] = Ae(), a = Oe(null), u = Oe(null), [y, p] = H({ width: 0, height: 0 }), m = Dr(y), [h, b] = H(0), [v, O] = H([]), [, E] = H([]), [, C] = te(Gt), [g, U] = Z(), M = et("loadingCanvas", !1);
|
|
1361
1367
|
F(() => {
|
|
1362
|
-
const { clientWidth: D, clientHeight: W } =
|
|
1368
|
+
const { clientWidth: D, clientHeight: W } = u.current;
|
|
1363
1369
|
p({ width: D, height: W }), h === 0 && b(D);
|
|
1364
|
-
}, [
|
|
1370
|
+
}, [u, n, h]);
|
|
1365
1371
|
const B = (D, W = 0) => {
|
|
1366
1372
|
const { top: q } = D.getBoundingClientRect();
|
|
1367
1373
|
return q + W >= 0 && q - W <= window.innerHeight;
|
|
@@ -1369,7 +1375,7 @@ const nn = () => {
|
|
|
1369
1375
|
F(() => {
|
|
1370
1376
|
var D, W;
|
|
1371
1377
|
if (d && d.type !== "Multiple" && a.current) {
|
|
1372
|
-
const q =
|
|
1378
|
+
const q = yt(a.current.contentDocument, d._id);
|
|
1373
1379
|
q && (B(q) || (W = (D = a.current) == null ? void 0 : D.contentWindow) == null || W.scrollTo({ top: q.offsetTop, behavior: "smooth" }), O([q]));
|
|
1374
1380
|
}
|
|
1375
1381
|
}, [d]), F(() => {
|
|
@@ -1382,7 +1388,7 @@ const nn = () => {
|
|
|
1382
1388
|
} else
|
|
1383
1389
|
E([null]);
|
|
1384
1390
|
}, [g]);
|
|
1385
|
-
const l =
|
|
1391
|
+
const l = wt(() => {
|
|
1386
1392
|
let D = Mr;
|
|
1387
1393
|
return e === "offline" && (D = D.replace(
|
|
1388
1394
|
"https://cdn.tailwindcss.com?plugins=forms,typography,aspect-ratio",
|
|
@@ -1398,7 +1404,7 @@ const nn = () => {
|
|
|
1398
1404
|
onMouseLeave: () => setTimeout(() => s(""), 300),
|
|
1399
1405
|
className: "relative mx-auto h-full w-full bg-black/80",
|
|
1400
1406
|
style: h > 0 && !ee(m) ? { width: r ? "100%" : h } : {},
|
|
1401
|
-
ref:
|
|
1407
|
+
ref: u,
|
|
1402
1408
|
children: /* @__PURE__ */ t.jsxs(
|
|
1403
1409
|
Hr,
|
|
1404
1410
|
{
|
|
@@ -1419,7 +1425,7 @@ const nn = () => {
|
|
|
1419
1425
|
),
|
|
1420
1426
|
/* @__PURE__ */ t.jsx(Zr, { model: "page" }),
|
|
1421
1427
|
/* @__PURE__ */ t.jsxs(Kr, { children: [
|
|
1422
|
-
M ? /* @__PURE__ */ t.jsx("div", { className: "h-full p-4", children: /* @__PURE__ */ t.jsx(
|
|
1428
|
+
M ? /* @__PURE__ */ t.jsx("div", { className: "h-full p-4", children: /* @__PURE__ */ t.jsx(tt, { className: "h-full" }) }) : /* @__PURE__ */ t.jsx(nn, {}),
|
|
1423
1429
|
/* @__PURE__ */ t.jsx("div", { className: "h-60" })
|
|
1424
1430
|
] })
|
|
1425
1431
|
]
|
|
@@ -1427,15 +1433,15 @@ const nn = () => {
|
|
|
1427
1433
|
)
|
|
1428
1434
|
}
|
|
1429
1435
|
);
|
|
1430
|
-
}, an =
|
|
1431
|
-
const e =
|
|
1436
|
+
}, an = Et(() => import("./AddBlocks-12b4bcb1.js")), to = () => {
|
|
1437
|
+
const e = et("mode", ve.STATIC), [r, n] = te(Xt), i = {
|
|
1432
1438
|
[ve.STATIC]: /* @__PURE__ */ t.jsx(sn, {}),
|
|
1433
1439
|
[ve.FRAMEWORK]: null
|
|
1434
1440
|
}[e];
|
|
1435
1441
|
return /* @__PURE__ */ t.jsxs("div", { className: "flex h-full w-full flex-col", children: [
|
|
1436
1442
|
/* @__PURE__ */ t.jsx(Or, {}),
|
|
1437
1443
|
/* @__PURE__ */ t.jsxs("div", { className: "relative flex-1 overflow-hidden bg-slate-800/20 bg-[linear-gradient(to_right,#EEE_0.5px,transparent_0.5px),linear-gradient(to_bottom,#EEE_0.5px,transparent_0.5px)] bg-[size:12px_12px]", children: [
|
|
1438
|
-
/* @__PURE__ */ t.jsx(
|
|
1444
|
+
/* @__PURE__ */ t.jsx(Ze, { fallback: /* @__PURE__ */ t.jsx(tt, { className: "h-full" }), children: /* @__PURE__ */ t.jsx(Zt, { children: i }) }),
|
|
1439
1445
|
r ? /* @__PURE__ */ t.jsx(
|
|
1440
1446
|
"div",
|
|
1441
1447
|
{
|