@chaibuilder/sdk 1.0.21 → 1.0.23
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 +30 -103
- package/dist/{AddBlocks-0-e393Fn.js → AddBlocks-Izn_rxXD.js} +5 -4
- package/dist/AddBlocks-RHuwwfe5.cjs +3 -0
- package/dist/{BrandingOptions-HtNCJO9_.cjs → BrandingOptions-Fyo8qs4o.cjs} +1 -1
- package/dist/{BrandingOptions-QqqJ-YRb.js → BrandingOptions-orZyDGiL.js} +1 -1
- package/dist/{CanvasArea-0hMAhzxn.js → CanvasArea-C30uJLef.js} +72 -71
- package/dist/{CanvasArea-pZz5czrV.cjs → CanvasArea-IM2K8bud.cjs} +2 -2
- package/dist/{CurrentPage-UOkxZISs.js → CurrentPage-70sBzc2_.js} +6 -5
- package/dist/CurrentPage-lIithDJy.cjs +1 -0
- package/dist/{Layers-TB-Lriju.js → Layers-W0N2zfnf.js} +7 -6
- package/dist/Layers-YMtavzUG.cjs +1 -0
- package/dist/{MarkAsGlobalBlock-5h3wP4zj.cjs → MarkAsGlobalBlock-EOsABFjY.cjs} +1 -1
- package/dist/{MarkAsGlobalBlock-Pa8po8qP.js → MarkAsGlobalBlock-FPCQmRIh.js} +1 -1
- package/dist/{PagesPanel-mAMSbYPt.js → PagesPanel-RbHN6lvQ.js} +6 -5
- package/dist/{PagesPanel-ffrNyFyp.cjs → PagesPanel-i-MQEmm_.cjs} +1 -1
- package/dist/ProjectPanel-0BGx-hP-.cjs +1 -0
- package/dist/{ProjectPanel-XvsYajju.js → ProjectPanel-CzwuyR0N.js} +7 -6
- package/dist/{Settings-8AbHXcDP.js → Settings-lxTrbI-C.js} +330 -320
- package/dist/Settings-mTWkKG82.cjs +1 -0
- package/dist/{SidePanels-LQg3mdC4.js → SidePanels-g4M6oTs-.js} +7 -6
- package/dist/SidePanels-pUOJTYfr.cjs +1 -0
- package/dist/{Topbar-wA6jhMj9.js → Topbar-KqZt4TEY.js} +1 -1
- package/dist/{Topbar-A3WZDrK4.cjs → Topbar-kHffytzr.cjs} +1 -1
- package/dist/{UnsplashImages-mzIO1QeT.js → UnsplashImages-Ua7ksJ8c.js} +1 -1
- package/dist/{UnsplashImages-E8zPMgJf.cjs → UnsplashImages-y7I_7_W7.cjs} +1 -1
- package/dist/{UploadImages-qEuDUEMn.cjs → UploadImages-RzEm0Stb.cjs} +1 -1
- package/dist/{UploadImages-qMeaY4sk.js → UploadImages-YP_J6erG.js} +1 -1
- package/dist/{add-page-modal-oER3yE4F.js → add-page-modal-btGWaXyq.js} +18 -18
- package/dist/add-page-modal-ekFis5D8.cjs +1 -0
- package/dist/{confirm-alert-rDSai_jQ.js → confirm-alert-Py2WqZhJ.js} +1 -1
- package/dist/{confirm-alert-tH8UCCSF.cjs → confirm-alert-mAhT8vln.cjs} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.js +56 -55
- package/dist/{delete-page-modal-ShTRkqkB.cjs → delete-page-modal-QzleoJG2.cjs} +1 -1
- package/dist/{delete-page-modal-QzQdrLYI.js → delete-page-modal-Rq4ThQpu.js} +6 -5
- package/dist/{form-vWeEsG9Y.js → form-Lm3bupAq.js} +1 -1
- package/dist/{form-MlgUSEy_.cjs → form-kAjrBaV-.cjs} +1 -1
- package/dist/{functions-hmbWDcnW.js → functions-JFP-oMsY.js} +28 -27
- package/dist/{functions-eu6BbvqO.cjs → functions-KMQYiBHf.cjs} +2 -2
- package/dist/{index-G55KtqnU.js → index-Vx4ctSV6.js} +10 -20
- package/dist/{index-T5MFAHA0.cjs → index-W5drgyWI.cjs} +1 -1
- package/dist/{index-mLIwGF5W.js → index-WPlT_Q87.js} +3 -3
- package/dist/{index-pCHSFoQO.cjs → index-fvoD_laH.cjs} +2 -2
- package/dist/lib.cjs +1 -1
- package/dist/lib.d.ts +3 -9
- package/dist/lib.js +93 -152
- package/dist/page-viewer-AlOCzh1b.cjs +1 -0
- package/dist/{page-viewer-X3IEOrUC.js → page-viewer-_wGsV2_o.js} +29 -28
- package/dist/{project-general-setting-oujmeWOG.js → project-general-setting-B8uuHccU.js} +7 -6
- package/dist/{project-general-setting-HZeYf9A1.cjs → project-general-setting-XnNyOpXO.cjs} +1 -1
- package/dist/{project-seo-setting-3FZQXaTn.cjs → project-seo-setting-QJBATF59.cjs} +1 -1
- package/dist/{project-seo-setting-_X6ckVa4.js → project-seo-setting-Zg2Z-Frr.js} +2 -2
- package/dist/render.cjs +1 -1
- package/dist/render.js +1 -1
- package/dist/{single-page-detail-SxboE7TI.js → single-page-detail-HXpxgQnU.js} +8 -7
- package/dist/single-page-detail-MWh30E_-.cjs +1 -0
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +5 -4
- package/dist/tailwind-config-OxLD7oFU.cjs +1 -0
- package/dist/tailwind-config-d1VL1lzE.js +62 -0
- package/dist/tailwind.cjs +1 -0
- package/dist/tailwind.d.ts +80 -0
- package/dist/tailwind.js +24 -0
- package/dist/ui.cjs +1 -1
- package/dist/ui.d.ts +1 -1
- package/dist/ui.js +1 -1
- package/package.json +9 -4
- package/dist/AddBlocks-p68Cz79o.cjs +0 -3
- package/dist/CurrentPage-phMDH1Ub.cjs +0 -1
- package/dist/Layers-NKZXi2LV.cjs +0 -1
- package/dist/ProjectPanel-1ywILLme.cjs +0 -1
- package/dist/Settings-hdmnT_mI.cjs +0 -1
- package/dist/SidePanels-xaNrI3oK.cjs +0 -1
- package/dist/add-page-modal-9deiA1W9.cjs +0 -1
- package/dist/page-viewer-GPNN1H92.cjs +0 -1
- package/dist/single-page-detail-ILshOKys.cjs +0 -1
|
@@ -4,13 +4,13 @@ var q = (n, t, r) => (lt(n, typeof t != "symbol" ? t + "" : t, r), r);
|
|
|
4
4
|
import { j as e } from "./jsx-runtime-NV737rRe.js";
|
|
5
5
|
import z, { createElement as ct, useCallback as V, useState as F, useEffect as _, Component as _e, Children as dt, Suspense as Me, useRef as je, useMemo as ut, lazy as pt } from "react";
|
|
6
6
|
import { map as Q, includes as we, toUpper as oe, round as ft, isEmpty as U, first as ee, get as A, isString as he, memoize as ht, each as mt, find as yt, filter as Ne, isNull as gt } from "lodash";
|
|
7
|
-
import { ResetIcon as ke, MobileIcon as Ce, LaptopIcon as vt, DesktopIcon as xt, DotsVerticalIcon as bt, EraserIcon as jt, ZoomInIcon as wt, DragHandleDots2Icon as kt, ArrowUpIcon as Ct, CopyIcon as Tt, TrashIcon as
|
|
8
|
-
import { p as me, B as te, W as Le, aM as
|
|
7
|
+
import { ResetIcon as ke, MobileIcon as Ce, LaptopIcon as vt, DesktopIcon as xt, DotsVerticalIcon as bt, EraserIcon as jt, ZoomInIcon as wt, DragHandleDots2Icon as kt, ArrowUpIcon as Ct, CopyIcon as Tt, TrashIcon as St } from "@radix-ui/react-icons";
|
|
8
|
+
import { p as me, B as te, W as Le, aM as Et, aN as Ot, aO as Dt, aP as It, aQ as At, R as ye, ai as Bt, aR as Pt, aS as Rt, aT as _t, aU as Mt, aV as Nt, aW as Lt, w as Wt, j as H, aj as Y, D as $t, E as Ft, F as Ut, G as qt, H as zt, I as Ht, J as Yt, K as Kt, at as Vt, L as Xt, U as We, aL as G, m as $e, n as Jt, k as Zt, o as Gt, h as Fe, l as Ue, ag as Qt, aX as en, aY as tn, aZ as nn, a_ as rn, x as sn, _ as ge, ae as qe, a$ as on, a6 as an, b0 as ln, i as cn, S as ze, aA as dn } from "./index-Vx4ctSV6.js";
|
|
9
9
|
import { useTranslation as He } from "react-i18next";
|
|
10
10
|
import { useAtom as J } from "jotai";
|
|
11
11
|
import Te from "react-dom";
|
|
12
|
-
import { g as un, S as
|
|
13
|
-
import { r as Ke, u as pn, B as fn, E as hn } from "./index-
|
|
12
|
+
import { g as un, S as Se, a as Ye } from "./MODIFIERS-MLfpKQY1.js";
|
|
13
|
+
import { r as Ke, u as pn, B as fn, E as hn } from "./index-WPlT_Q87.js";
|
|
14
14
|
import { flip as mn } from "@floating-ui/dom";
|
|
15
15
|
import { useFloating as yn, shift as gn } from "@floating-ui/react-dom";
|
|
16
16
|
import { useDrag as vn } from "react-dnd";
|
|
@@ -51,12 +51,13 @@ import "flagged";
|
|
|
51
51
|
import "@minoru/react-dnd-treeview";
|
|
52
52
|
import "./lib.js";
|
|
53
53
|
import "himalaya";
|
|
54
|
-
import "./functions-
|
|
54
|
+
import "./functions-JFP-oMsY.js";
|
|
55
55
|
import "@mhsdesign/jit-browser-tailwindcss";
|
|
56
56
|
import "@tailwindcss/forms";
|
|
57
57
|
import "@tailwindcss/typography";
|
|
58
58
|
import "@tailwindcss/aspect-ratio";
|
|
59
59
|
import "@tailwindcss/line-clamp";
|
|
60
|
+
import "./tailwind-config-d1VL1lzE.js";
|
|
60
61
|
import "react-hotkeys-hook";
|
|
61
62
|
import "sonner";
|
|
62
63
|
import "lucide-react";
|
|
@@ -70,7 +71,7 @@ const Cn = () => {
|
|
|
70
71
|
function Tn() {
|
|
71
72
|
const [n, t] = Le(), { t: r } = He();
|
|
72
73
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
|
|
73
|
-
/* @__PURE__ */ e.jsx(
|
|
74
|
+
/* @__PURE__ */ e.jsx(Et, { htmlFor: "dark-mode-switch", children: r("dark_mode") }),
|
|
74
75
|
/* @__PURE__ */ e.jsxs(
|
|
75
76
|
Ot,
|
|
76
77
|
{
|
|
@@ -96,7 +97,7 @@ function Tn() {
|
|
|
96
97
|
)
|
|
97
98
|
] });
|
|
98
99
|
}
|
|
99
|
-
const
|
|
100
|
+
const Ee = ({ landscape: n = !1 }) => /* @__PURE__ */ e.jsxs(
|
|
100
101
|
"svg",
|
|
101
102
|
{
|
|
102
103
|
className: n ? "rotate-90" : "",
|
|
@@ -138,14 +139,14 @@ const Se = ({ landscape: n = !1 }) => /* @__PURE__ */ e.jsxs(
|
|
|
138
139
|
title: "Tablet (MD)",
|
|
139
140
|
content: "Styles set here are applied at 768px and up",
|
|
140
141
|
breakpoint: "md",
|
|
141
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
142
|
+
icon: /* @__PURE__ */ e.jsx(Ee, {}),
|
|
142
143
|
width: 800
|
|
143
144
|
},
|
|
144
145
|
{
|
|
145
146
|
title: "Tablet Landscape (LG)",
|
|
146
147
|
content: "Styles set here are applied at 1024px and up unless edited at higher breakpoint",
|
|
147
148
|
breakpoint: "lg",
|
|
148
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
149
|
+
icon: /* @__PURE__ */ e.jsx(Ee, { landscape: !0 }),
|
|
149
150
|
width: 1024
|
|
150
151
|
},
|
|
151
152
|
{
|
|
@@ -162,7 +163,7 @@ const Se = ({ landscape: n = !1 }) => /* @__PURE__ */ e.jsxs(
|
|
|
162
163
|
icon: /* @__PURE__ */ e.jsx(xt, {}),
|
|
163
164
|
width: 1920
|
|
164
165
|
}
|
|
165
|
-
],
|
|
166
|
+
], Sn = ({
|
|
166
167
|
title: n,
|
|
167
168
|
content: t,
|
|
168
169
|
currentBreakpoint: r,
|
|
@@ -184,14 +185,14 @@ const Se = ({ landscape: n = !1 }) => /* @__PURE__ */ e.jsxs(
|
|
|
184
185
|
/* @__PURE__ */ e.jsx("h4", { className: "text-sm font-semibold", children: n }),
|
|
185
186
|
/* @__PURE__ */ e.jsx("p", { className: "text-xs", children: t })
|
|
186
187
|
] }) }) })
|
|
187
|
-
] }),
|
|
188
|
+
] }), En = () => {
|
|
188
189
|
const [, n, t] = ye(), [r, a] = Bt(), c = (o) => {
|
|
189
190
|
r.includes(o) ? r.length > 2 && a(r.filter((i) => i !== o)) : a((i) => [...i, o]);
|
|
190
191
|
};
|
|
191
192
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center rounded-md", children: [
|
|
192
193
|
Q(
|
|
193
194
|
Oe.filter((o) => we(r, oe(o.breakpoint))),
|
|
194
|
-
(o) => /* @__PURE__ */ ct(
|
|
195
|
+
(o) => /* @__PURE__ */ ct(Sn, { ...o, onClick: t, key: o.breakpoint, currentBreakpoint: n })
|
|
195
196
|
),
|
|
196
197
|
/* @__PURE__ */ e.jsxs(Pt, { children: [
|
|
197
198
|
/* @__PURE__ */ e.jsx(Rt, { asChild: !0, children: /* @__PURE__ */ e.jsx("span", { className: "cursor-pointer px-2.5 hover:opacity-80", children: /* @__PURE__ */ e.jsx(bt, { className: "scale-90 transform" }) }) }),
|
|
@@ -239,7 +240,7 @@ const Se = ({ landscape: n = !1 }) => /* @__PURE__ */ e.jsxs(
|
|
|
239
240
|
/* @__PURE__ */ e.jsx(Tn, {}),
|
|
240
241
|
/* @__PURE__ */ e.jsx(G, { orientation: "vertical" })
|
|
241
242
|
] }) : null,
|
|
242
|
-
/* @__PURE__ */ e.jsx(
|
|
243
|
+
/* @__PURE__ */ e.jsx(En, {}),
|
|
243
244
|
/* @__PURE__ */ e.jsx(G, { orientation: "vertical" }),
|
|
244
245
|
/* @__PURE__ */ e.jsxs("div", { className: "flex w-12 items-center justify-center gap-x-1 space-x-0 font-medium", children: [
|
|
245
246
|
/* @__PURE__ */ e.jsx(wt, { className: "h-3.5 w-3.5 flex-shrink-0" }),
|
|
@@ -478,11 +479,11 @@ function Rn() {
|
|
|
478
479
|
this.message = s, this.data = l && typeof l == "object" ? l : {}, this.stack = "";
|
|
479
480
|
}
|
|
480
481
|
w.prototype = Error.prototype;
|
|
481
|
-
function
|
|
482
|
+
function E(s) {
|
|
482
483
|
if (process.env.NODE_ENV !== "production")
|
|
483
484
|
var l = {}, j = 0;
|
|
484
|
-
function v(C, y, x, T, O,
|
|
485
|
-
if (T = T || m,
|
|
485
|
+
function v(C, y, x, T, O, S, R) {
|
|
486
|
+
if (T = T || m, S = S || x, R !== r) {
|
|
486
487
|
if (g) {
|
|
487
488
|
var B = new Error(
|
|
488
489
|
"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"
|
|
@@ -492,11 +493,11 @@ function Rn() {
|
|
|
492
493
|
var K = T + ":" + x;
|
|
493
494
|
!l[K] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
494
495
|
j < 3 && (o(
|
|
495
|
-
"You are manually calling a React.PropTypes validation function for the `" +
|
|
496
|
+
"You are manually calling a React.PropTypes validation function for the `" + S + "` prop on `" + T + "`. 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."
|
|
496
497
|
), l[K] = !0, j++);
|
|
497
498
|
}
|
|
498
499
|
}
|
|
499
|
-
return y[x] == null ? C ? y[x] === null ? new w("The " + O + " `" +
|
|
500
|
+
return y[x] == null ? C ? y[x] === null ? new w("The " + O + " `" + S + "` is marked as required " + ("in `" + T + "`, but its value is `null`.")) : new w("The " + O + " `" + S + "` is marked as required in " + ("`" + T + "`, but its value is `undefined`.")) : null : s(y, x, T, O, S);
|
|
500
501
|
}
|
|
501
502
|
var h = v.bind(null, !1);
|
|
502
503
|
return h.isRequired = v.bind(null, !0), h;
|
|
@@ -505,18 +506,18 @@ function Rn() {
|
|
|
505
506
|
function l(j, v, h, C, y, x) {
|
|
506
507
|
var T = j[v], O = $(T);
|
|
507
508
|
if (O !== s) {
|
|
508
|
-
var
|
|
509
|
+
var S = X(T);
|
|
509
510
|
return new w(
|
|
510
|
-
"Invalid " + C + " `" + y + "` of type " + ("`" +
|
|
511
|
+
"Invalid " + C + " `" + y + "` of type " + ("`" + S + "` supplied to `" + h + "`, expected ") + ("`" + s + "`."),
|
|
511
512
|
{ expectedType: s }
|
|
512
513
|
);
|
|
513
514
|
}
|
|
514
515
|
return null;
|
|
515
516
|
}
|
|
516
|
-
return
|
|
517
|
+
return E(l);
|
|
517
518
|
}
|
|
518
519
|
function W() {
|
|
519
|
-
return
|
|
520
|
+
return E(i);
|
|
520
521
|
}
|
|
521
522
|
function M(s) {
|
|
522
523
|
function l(j, v, h, C, y) {
|
|
@@ -528,13 +529,13 @@ function Rn() {
|
|
|
528
529
|
return new w("Invalid " + C + " `" + y + "` of type " + ("`" + T + "` supplied to `" + h + "`, expected an array."));
|
|
529
530
|
}
|
|
530
531
|
for (var O = 0; O < x.length; O++) {
|
|
531
|
-
var
|
|
532
|
-
if (
|
|
533
|
-
return
|
|
532
|
+
var S = s(x, O, h, C, y + "[" + O + "]", r);
|
|
533
|
+
if (S instanceof Error)
|
|
534
|
+
return S;
|
|
534
535
|
}
|
|
535
536
|
return null;
|
|
536
537
|
}
|
|
537
|
-
return
|
|
538
|
+
return E(l);
|
|
538
539
|
}
|
|
539
540
|
function re() {
|
|
540
541
|
function s(l, j, v, h, C) {
|
|
@@ -545,7 +546,7 @@ function Rn() {
|
|
|
545
546
|
}
|
|
546
547
|
return null;
|
|
547
548
|
}
|
|
548
|
-
return
|
|
549
|
+
return E(s);
|
|
549
550
|
}
|
|
550
551
|
function se() {
|
|
551
552
|
function s(l, j, v, h, C) {
|
|
@@ -556,7 +557,7 @@ function Rn() {
|
|
|
556
557
|
}
|
|
557
558
|
return null;
|
|
558
559
|
}
|
|
559
|
-
return
|
|
560
|
+
return E(s);
|
|
560
561
|
}
|
|
561
562
|
function I(s) {
|
|
562
563
|
function l(j, v, h, C, y) {
|
|
@@ -566,7 +567,7 @@ function Rn() {
|
|
|
566
567
|
}
|
|
567
568
|
return null;
|
|
568
569
|
}
|
|
569
|
-
return
|
|
570
|
+
return E(l);
|
|
570
571
|
}
|
|
571
572
|
function N(s) {
|
|
572
573
|
if (!Array.isArray(s))
|
|
@@ -583,7 +584,7 @@ function Rn() {
|
|
|
583
584
|
});
|
|
584
585
|
return new w("Invalid " + C + " `" + y + "` of value `" + String(x) + "` " + ("supplied to `" + h + "`, expected one of " + O + "."));
|
|
585
586
|
}
|
|
586
|
-
return
|
|
587
|
+
return E(l);
|
|
587
588
|
}
|
|
588
589
|
function L(s) {
|
|
589
590
|
function l(j, v, h, C, y) {
|
|
@@ -594,13 +595,13 @@ function Rn() {
|
|
|
594
595
|
return new w("Invalid " + C + " `" + y + "` of type " + ("`" + T + "` supplied to `" + h + "`, expected an object."));
|
|
595
596
|
for (var O in x)
|
|
596
597
|
if (a(x, O)) {
|
|
597
|
-
var
|
|
598
|
-
if (
|
|
599
|
-
return
|
|
598
|
+
var S = s(x, O, h, C, y + "." + O, r);
|
|
599
|
+
if (S instanceof Error)
|
|
600
|
+
return S;
|
|
600
601
|
}
|
|
601
602
|
return null;
|
|
602
603
|
}
|
|
603
|
-
return
|
|
604
|
+
return E(l);
|
|
604
605
|
}
|
|
605
606
|
function et(s) {
|
|
606
607
|
if (!Array.isArray(s))
|
|
@@ -613,8 +614,8 @@ function Rn() {
|
|
|
613
614
|
), i;
|
|
614
615
|
}
|
|
615
616
|
function v(h, C, y, x, T) {
|
|
616
|
-
for (var O = [],
|
|
617
|
-
var R = s[
|
|
617
|
+
for (var O = [], S = 0; S < s.length; S++) {
|
|
618
|
+
var R = s[S], B = R(h, C, y, x, T, r);
|
|
618
619
|
if (B == null)
|
|
619
620
|
return null;
|
|
620
621
|
B.data && a(B.data, "expectedType") && O.push(B.data.expectedType);
|
|
@@ -622,13 +623,13 @@ function Rn() {
|
|
|
622
623
|
var K = O.length > 0 ? ", expected one of type [" + O.join(", ") + "]" : "";
|
|
623
624
|
return new w("Invalid " + x + " `" + T + "` supplied to " + ("`" + y + "`" + K + "."));
|
|
624
625
|
}
|
|
625
|
-
return
|
|
626
|
+
return E(v);
|
|
626
627
|
}
|
|
627
628
|
function tt() {
|
|
628
629
|
function s(l, j, v, h, C) {
|
|
629
630
|
return Z(l[j]) ? null : new w("Invalid " + h + " `" + C + "` supplied to " + ("`" + v + "`, expected a ReactNode."));
|
|
630
631
|
}
|
|
631
|
-
return
|
|
632
|
+
return E(s);
|
|
632
633
|
}
|
|
633
634
|
function be(s, l, j, v, h) {
|
|
634
635
|
return new w(
|
|
@@ -641,16 +642,16 @@ function Rn() {
|
|
|
641
642
|
if (T !== "object")
|
|
642
643
|
return new w("Invalid " + C + " `" + y + "` of type `" + T + "` " + ("supplied to `" + h + "`, expected `object`."));
|
|
643
644
|
for (var O in s) {
|
|
644
|
-
var
|
|
645
|
-
if (typeof
|
|
646
|
-
return be(h, C, y, O, X(
|
|
647
|
-
var R =
|
|
645
|
+
var S = s[O];
|
|
646
|
+
if (typeof S != "function")
|
|
647
|
+
return be(h, C, y, O, X(S));
|
|
648
|
+
var R = S(x, O, h, C, y + "." + O, r);
|
|
648
649
|
if (R)
|
|
649
650
|
return R;
|
|
650
651
|
}
|
|
651
652
|
return null;
|
|
652
653
|
}
|
|
653
|
-
return
|
|
654
|
+
return E(l);
|
|
654
655
|
}
|
|
655
656
|
function rt(s) {
|
|
656
657
|
function l(j, v, h, C, y) {
|
|
@@ -658,22 +659,22 @@ function Rn() {
|
|
|
658
659
|
if (T !== "object")
|
|
659
660
|
return new w("Invalid " + C + " `" + y + "` of type `" + T + "` " + ("supplied to `" + h + "`, expected `object`."));
|
|
660
661
|
var O = t({}, j[v], s);
|
|
661
|
-
for (var
|
|
662
|
-
var R = s[
|
|
663
|
-
if (a(s,
|
|
664
|
-
return be(h, C, y,
|
|
662
|
+
for (var S in O) {
|
|
663
|
+
var R = s[S];
|
|
664
|
+
if (a(s, S) && typeof R != "function")
|
|
665
|
+
return be(h, C, y, S, X(R));
|
|
665
666
|
if (!R)
|
|
666
667
|
return new w(
|
|
667
|
-
"Invalid " + C + " `" + y + "` key `" +
|
|
668
|
+
"Invalid " + C + " `" + y + "` key `" + S + "` supplied to `" + h + "`.\nBad object: " + JSON.stringify(j[v], null, " ") + `
|
|
668
669
|
Valid keys: ` + JSON.stringify(Object.keys(s), null, " ")
|
|
669
670
|
);
|
|
670
|
-
var B = R(x,
|
|
671
|
+
var B = R(x, S, h, C, y + "." + S, r);
|
|
671
672
|
if (B)
|
|
672
673
|
return B;
|
|
673
674
|
}
|
|
674
675
|
return null;
|
|
675
676
|
}
|
|
676
|
-
return
|
|
677
|
+
return E(l);
|
|
677
678
|
}
|
|
678
679
|
function Z(s) {
|
|
679
680
|
switch (typeof s) {
|
|
@@ -796,7 +797,7 @@ function _n() {
|
|
|
796
797
|
return o.PropTypes = o, o;
|
|
797
798
|
}, ue;
|
|
798
799
|
}
|
|
799
|
-
var
|
|
800
|
+
var cs = ne.exports;
|
|
800
801
|
if (process.env.NODE_ENV !== "production") {
|
|
801
802
|
var Mn = Ke, Nn = !0;
|
|
802
803
|
ne.exports = Rn()(Mn.isElement, Nn);
|
|
@@ -807,7 +808,7 @@ const P = /* @__PURE__ */ un(Ln);
|
|
|
807
808
|
let Xe, Je;
|
|
808
809
|
typeof document < "u" && (Xe = document);
|
|
809
810
|
typeof window < "u" && (Je = window);
|
|
810
|
-
const Ze = z.createContext({ document: Xe, window: Je }), xe = () => z.useContext(Ze), { Provider: Wn, Consumer:
|
|
811
|
+
const Ze = z.createContext({ document: Xe, window: Je }), xe = () => z.useContext(Ze), { Provider: Wn, Consumer: ds } = Ze;
|
|
811
812
|
class Ge extends _e {
|
|
812
813
|
componentDidMount() {
|
|
813
814
|
this.props.contentDidMount();
|
|
@@ -915,11 +916,11 @@ const $n = z.forwardRef((n, t) => /* @__PURE__ */ e.jsx(pe, { ...n, forwardedRef
|
|
|
915
916
|
}, 100);
|
|
916
917
|
}, [t, r, c, a]), /* @__PURE__ */ e.jsx("div", { id: "canvas", className: "relative h-screen max-w-full outline-2", children: n });
|
|
917
918
|
}, Qe = (n, t) => n.querySelector(`[data-block-id="${t}"]`), Un = () => {
|
|
918
|
-
const { window: n } = xe(), [t, r] = H(), [, a] = Y(), { undo: c, redo: o } = me(), i = $e(), [, p] = Jt(), [, g] = Zt(), { pasteBlocks: b } = Gt(), [, u] = Fe(), d = Ue(), { savePage: m } = Qt(), [k] = J(en), [, D] = J(tn), w = (
|
|
919
|
-
|
|
919
|
+
const { window: n } = xe(), [t, r] = H(), [, a] = Y(), { undo: c, redo: o } = me(), i = $e(), [, p] = Jt(), [, g] = Zt(), { pasteBlocks: b } = Gt(), [, u] = Fe(), d = Ue(), { savePage: m } = Qt(), [k] = J(en), [, D] = J(tn), w = (E) => {
|
|
920
|
+
E.key === "Enter" && (E.preventDefault(), t.length === 1 && D(ee(t)));
|
|
920
921
|
};
|
|
921
922
|
return _(() => {
|
|
922
|
-
const
|
|
923
|
+
const E = (f) => {
|
|
923
924
|
if (f.key === "Escape") {
|
|
924
925
|
r([]), a([]);
|
|
925
926
|
return;
|
|
@@ -933,8 +934,8 @@ const $n = z.forwardRef((n, t) => /* @__PURE__ */ e.jsx(pe, { ...n, forwardedRef
|
|
|
933
934
|
f.key === "s" && (f.stopPropagation(), f.preventDefault(), m()), f.key === "z" && c(), f.key === "y" && o(), f.key === "d" && i(t), f.key === "x" && p(t), f.key === "c" && g(t), f.key === "v" && t.length > 0 && b(t[0]);
|
|
934
935
|
}
|
|
935
936
|
};
|
|
936
|
-
return n.removeEventListener("keydown",
|
|
937
|
-
n.removeEventListener("keydown",
|
|
937
|
+
return n.removeEventListener("keydown", E), n.addEventListener("keydown", E), () => {
|
|
938
|
+
n.removeEventListener("keydown", E);
|
|
938
939
|
};
|
|
939
940
|
}, [
|
|
940
941
|
t,
|
|
@@ -1005,7 +1006,7 @@ const $n = z.forwardRef((n, t) => /* @__PURE__ */ e.jsx(pe, { ...n, forwardedRef
|
|
|
1005
1006
|
}
|
|
1006
1007
|
),
|
|
1007
1008
|
nn(A(t, "_type", "")) ? /* @__PURE__ */ e.jsx(Tt, { className: "hover:scale-105 ", onClick: () => a([t == null ? void 0 : t._id]) }) : null,
|
|
1008
|
-
rn(A(t, "_type", "")) ? /* @__PURE__ */ e.jsx(
|
|
1009
|
+
rn(A(t, "_type", "")) ? /* @__PURE__ */ e.jsx(St, { className: "hover:scale-105 ", onClick: () => r([t == null ? void 0 : t._id]) }) : null
|
|
1009
1010
|
] })
|
|
1010
1011
|
]
|
|
1011
1012
|
}
|
|
@@ -1026,7 +1027,7 @@ const $n = z.forwardRef((n, t) => /* @__PURE__ */ e.jsx(pe, { ...n, forwardedRef
|
|
|
1026
1027
|
names: ["primary", "secondary"]
|
|
1027
1028
|
});
|
|
1028
1029
|
w.primary.DEFAULT = k, w.secondary.DEFAULT = D;
|
|
1029
|
-
const
|
|
1030
|
+
const E = A(t, "roundedCorners", "0");
|
|
1030
1031
|
!p || !p.tailwind || (p.tailwind.config = {
|
|
1031
1032
|
darkMode: "class",
|
|
1032
1033
|
theme: {
|
|
@@ -1036,7 +1037,7 @@ const $n = z.forwardRef((n, t) => /* @__PURE__ */ e.jsx(pe, { ...n, forwardedRef
|
|
|
1036
1037
|
},
|
|
1037
1038
|
extend: {
|
|
1038
1039
|
borderRadius: {
|
|
1039
|
-
global: `${
|
|
1040
|
+
global: `${E || "0"}px`
|
|
1040
1041
|
},
|
|
1041
1042
|
colors: w
|
|
1042
1043
|
}
|
|
@@ -1068,8 +1069,8 @@ const $n = z.forwardRef((n, t) => /* @__PURE__ */ e.jsx(pe, { ...n, forwardedRef
|
|
|
1068
1069
|
}, [o, u]), _(() => {
|
|
1069
1070
|
if (n === "section")
|
|
1070
1071
|
return;
|
|
1071
|
-
const k = A(t, "bodyTextLightColor", "#64748b"), D = A(t, "bodyTextDarkColor", "#94a3b8"), w = A(t, "bodyBgLightColor", "#FFFFFF"),
|
|
1072
|
-
i.body.className = `font-body antialiased text-[${k}] bg-[${w}] dark:text-[${D}] dark:bg-[${
|
|
1072
|
+
const k = A(t, "bodyTextLightColor", "#64748b"), D = A(t, "bodyTextDarkColor", "#94a3b8"), w = A(t, "bodyBgLightColor", "#FFFFFF"), E = A(t, "bodyBgDarkColor", "#0f172a");
|
|
1073
|
+
i.body.className = `font-body antialiased text-[${k}] bg-[${w}] dark:text-[${D}] dark:bg-[${E}]`;
|
|
1073
1074
|
}, [t, i, n]), n === "page" ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1074
1075
|
d && /* @__PURE__ */ e.jsx(
|
|
1075
1076
|
"link",
|
|
@@ -1105,7 +1106,7 @@ const $n = z.forwardRef((n, t) => /* @__PURE__ */ e.jsx(pe, { ...n, forwardedRef
|
|
|
1105
1106
|
}, Kn = (n) => {
|
|
1106
1107
|
const t = {};
|
|
1107
1108
|
return Object.keys(n).forEach((r) => {
|
|
1108
|
-
he(n[r]) && n[r].startsWith(
|
|
1109
|
+
he(n[r]) && n[r].startsWith(Se) && (t[r] = n[r].replace(Se, "").split(","));
|
|
1109
1110
|
}), t;
|
|
1110
1111
|
}, Vn = ht((n) => {
|
|
1111
1112
|
const t = n.replace(Ye, "").split(",");
|
|
@@ -1178,8 +1179,8 @@ function fe({ blocks: n }) {
|
|
|
1178
1179
|
});
|
|
1179
1180
|
const D = Ne(t, { _parent: u._id });
|
|
1180
1181
|
k.children = D.length ? /* @__PURE__ */ e.jsx(fe, { blocks: D }) : null;
|
|
1181
|
-
const w = kn(u._type),
|
|
1182
|
-
return gt(
|
|
1182
|
+
const w = kn(u._type), E = A(w, "component", null);
|
|
1183
|
+
return gt(E) ? /* @__PURE__ */ e.jsx("noscript", { children: `<!-- ${u == null ? void 0 : u._type} not registered -->` }) : /* @__PURE__ */ e.jsx(Me, { children: z.createElement(E, {
|
|
1183
1184
|
blockProps: {
|
|
1184
1185
|
onClick: p,
|
|
1185
1186
|
"data-block-id": u._id,
|
|
@@ -1198,7 +1199,7 @@ const Gn = () => {
|
|
|
1198
1199
|
const n = qe();
|
|
1199
1200
|
return /* @__PURE__ */ e.jsx(jn, { children: U(n) ? /* @__PURE__ */ e.jsx(Yn, {}) : /* @__PURE__ */ e.jsx(fn, { children: /* @__PURE__ */ e.jsx(fe, { blocks: Ne(n, (t) => U(t._parent)) }) }) });
|
|
1200
1201
|
}, Qn = (n, t) => n.querySelector(`[data-style-id="${t}"]`), er = () => {
|
|
1201
|
-
const [n] = J(on), [t] = Fe(), [r] = ye(), [, a] = H(), c = an(), [, o] = ge(), i = je(null), p = je(null), [g, b] = F({ width: 0, height: 0 }), u = An(g), [d, m] = F(0), [k, D] = F([]), [, w] = F([]), [,
|
|
1202
|
+
const [n] = J(on), [t] = Fe(), [r] = ye(), [, a] = H(), c = an(), [, o] = ge(), i = je(null), p = je(null), [g, b] = F({ width: 0, height: 0 }), u = An(g), [d, m] = F(0), [k, D] = F([]), [, w] = F([]), [, E] = J(ln), [f, W] = Y(), M = cn("loadingCanvas", !1);
|
|
1202
1203
|
_(() => {
|
|
1203
1204
|
const { clientWidth: I, clientHeight: N } = p.current;
|
|
1204
1205
|
b({ width: I, height: N }), d === 0 && m(I);
|
|
@@ -1243,11 +1244,11 @@ const Gn = () => {
|
|
|
1243
1244
|
children: /* @__PURE__ */ e.jsxs(
|
|
1244
1245
|
$n,
|
|
1245
1246
|
{
|
|
1246
|
-
contentDidMount: () =>
|
|
1247
|
+
contentDidMount: () => E(i.current),
|
|
1247
1248
|
ref: i,
|
|
1248
1249
|
id: "canvas-iframe",
|
|
1249
1250
|
style: { width: `${r}px`, ...u },
|
|
1250
|
-
className: "relative mx-auto box-content h-full max-w-full shadow-
|
|
1251
|
+
className: "relative mx-auto box-content h-full max-w-full shadow-lg transition-all duration-300 ease-linear",
|
|
1251
1252
|
initialContent: se,
|
|
1252
1253
|
children: [
|
|
1253
1254
|
/* @__PURE__ */ e.jsx(Un, {}),
|
|
@@ -1268,11 +1269,11 @@ const Gn = () => {
|
|
|
1268
1269
|
)
|
|
1269
1270
|
}
|
|
1270
1271
|
);
|
|
1271
|
-
}, tr = pt(() => import("./AddBlocks-
|
|
1272
|
+
}, tr = pt(() => import("./AddBlocks-Izn_rxXD.js")), us = () => {
|
|
1272
1273
|
const [n, t] = J(dn);
|
|
1273
1274
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex h-full w-full flex-col", children: [
|
|
1274
1275
|
/* @__PURE__ */ e.jsx(Dn, {}),
|
|
1275
|
-
/* @__PURE__ */ e.jsxs("div", { className: "relative flex-1 overflow-hidden bg-slate-800/
|
|
1276
|
+
/* @__PURE__ */ e.jsxs("div", { className: "relative flex-1 overflow-hidden bg-slate-800/90 px-2 bg-[linear-gradient(to_right,#222_0.5px,transparent_0.5px),linear-gradient(to_bottom,#222_0.5px,transparent_0.5px)] bg-[size:12px_12px]", children: [
|
|
1276
1277
|
/* @__PURE__ */ e.jsx(Me, { fallback: /* @__PURE__ */ e.jsx(ze, { className: "h-full" }), children: /* @__PURE__ */ e.jsx(hn, { children: /* @__PURE__ */ e.jsx(er, {}) }) }),
|
|
1277
1278
|
n ? /* @__PURE__ */ e.jsx(
|
|
1278
1279
|
"div",
|
|
@@ -1293,5 +1294,5 @@ const Gn = () => {
|
|
|
1293
1294
|
] });
|
|
1294
1295
|
};
|
|
1295
1296
|
export {
|
|
1296
|
-
|
|
1297
|
+
us as default
|
|
1297
1298
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var Ae=Object.defineProperty;var Pe=(n,t,s)=>t in n?Ae(n,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[t]=s;var U=(n,t,s)=>(Pe(n,typeof t!="symbol"?t+"":t,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-WUGKV8jN.cjs"),h=require("react"),x=require("lodash"),M=require("@radix-ui/react-icons"),i=require("./index-
|
|
1
|
+
"use strict";var Ae=Object.defineProperty;var Pe=(n,t,s)=>t in n?Ae(n,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[t]=s;var U=(n,t,s)=>(Pe(n,typeof t!="symbol"?t+"":t,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-WUGKV8jN.cjs"),h=require("react"),x=require("lodash"),M=require("@radix-ui/react-icons"),i=require("./index-W5drgyWI.cjs"),je=require("react-i18next"),Y=require("jotai"),ue=require("react-dom"),K=require("./MODIFIERS-WFzDQfiT.cjs"),V=require("./index-fvoD_laH.cjs"),Me=require("@floating-ui/dom"),de=require("@floating-ui/react-dom"),_e=require("react-dnd"),Ne=require("@react-hookz/web"),Le=require("@bobthered/tailwindcss-palette-generator"),We=require("react-wrap-balancer"),Fe=require("tailwind-merge"),$e=require("@chaibuilder/runtime");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-It2K33fU.cjs");require("clsx");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("react-icons-picker");require("react-quill");require("flat-to-nested");require("redux-undo");require("i18next");require("react-textarea-autosize");require("flagged");require("@minoru/react-dnd-treeview");require("./lib.cjs");require("himalaya");require("./functions-KMQYiBHf.cjs");require("@mhsdesign/jit-browser-tailwindcss");require("@tailwindcss/forms");require("@tailwindcss/typography");require("@tailwindcss/aspect-ratio");require("@tailwindcss/line-clamp");require("./tailwind-config-OxLD7oFU.cjs");require("react-hotkeys-hook");require("sonner");require("lucide-react");const Ue=()=>{const{undoCount:n,redoCount:t,undo:s,redo:c}=i.useCanvasHistory();return e.jsxRuntimeExports.jsxs("div",{className:"flex items-center",children:[e.jsxRuntimeExports.jsx(i.Button,{disabled:!n,size:"sm",onClick:s,className:"rounded-full",variant:"ghost",children:e.jsxRuntimeExports.jsx(M.ResetIcon,{})}),e.jsxRuntimeExports.jsx(i.Button,{disabled:!t,onClick:c,size:"sm",className:"rounded-full",variant:"ghost",children:e.jsxRuntimeExports.jsx(M.ResetIcon,{className:"rotate-180 scale-y-[-1] transform"})})]})};function He(){const[n,t]=i.useDarkMode(),{t:s}=je.useTranslation();return e.jsxRuntimeExports.jsxs("div",{className:"flex items-center",children:[e.jsxRuntimeExports.jsx(i.Label,{htmlFor:"dark-mode-switch",children:s("dark_mode")}),e.jsxRuntimeExports.jsxs(i.Switch,{id:"dark-mode-switch",checked:n,onCheckedChange:()=>{t(!n)},className:`${n?"bg-violet-600":"bg-violet-300"}
|
|
2
2
|
relative ml-2 inline-flex h-[20px] w-[40px] shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75`,children:[e.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Use setting"}),e.jsxRuntimeExports.jsx("span",{"aria-hidden":"true",className:`${n?"translate-x-5":"translate-x-0"}
|
|
3
3
|
pointer-events-none -mt-px inline-block h-[18px] w-[20px] transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out`})]})]})}const pe=({landscape:n=!1})=>e.jsxRuntimeExports.jsxs("svg",{className:n?"rotate-90":"",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 13 13",xmlSpace:"preserve",width:13,height:13,children:[e.jsxRuntimeExports.jsx("g",{strokeWidth:0}),e.jsxRuntimeExports.jsx("g",{strokeLinecap:"round",strokeLinejoin:"round"}),e.jsxRuntimeExports.jsx("path",{d:"M10.65 0H2.349a.851.851 0 0 0-.851.852v11.299c0 .47.382.852.851.852h8.3a.851.851 0 0 0 .851-.852V.852A.851.851 0 0 0 10.65 0zM6.599 12.466a.367.367 0 1 1 0-.735.367.367 0 0 1 0 .735zm3.9-1.267H2.5V1h8.001v10.199z",style:{fill:"#000"}})]}),fe=[{title:"Mobile (XS)",content:"Styles set here are applied to all screen unless edited at higher breakpoint",breakpoint:"xs",icon:e.jsxRuntimeExports.jsx(M.MobileIcon,{}),width:400},{title:"Mobile landscape (SM)",content:"Styles set here are applied at 640px and up unless edited at higher breakpoint",breakpoint:"sm",icon:e.jsxRuntimeExports.jsx(M.MobileIcon,{className:"rotate-90"}),width:640},{title:"Tablet (MD)",content:"Styles set here are applied at 768px and up",breakpoint:"md",icon:e.jsxRuntimeExports.jsx(pe,{}),width:800},{title:"Tablet Landscape (LG)",content:"Styles set here are applied at 1024px and up unless edited at higher breakpoint",breakpoint:"lg",icon:e.jsxRuntimeExports.jsx(pe,{landscape:!0}),width:1024},{title:"Desktop (XL)",content:"Styles set here are applied at 1280px and up unless edited at higher breakpoint",breakpoint:"xl",icon:e.jsxRuntimeExports.jsx(M.LaptopIcon,{}),width:1420},{title:"Large Desktop (2XL)",content:"Styles set here are applied at 1536px and up",breakpoint:"2xl",icon:e.jsxRuntimeExports.jsx(M.DesktopIcon,{}),width:1920}],ze=({title:n,content:t,currentBreakpoint:s,breakpoint:c,width:u,icon:o,onClick:a})=>e.jsxRuntimeExports.jsxs(i.HoverCard,{children:[e.jsxRuntimeExports.jsx(i.HoverCardTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsx(i.Button,{onClick:()=>a(u),size:"sm",variant:c===s?"secondary":"ghost",children:o})}),e.jsxRuntimeExports.jsx(i.HoverCardContent,{className:"w-52 border-border",children:e.jsxRuntimeExports.jsx("div",{className:"flex justify-between space-x-4",children:e.jsxRuntimeExports.jsxs("div",{className:"space-y-1",children:[e.jsxRuntimeExports.jsx("h4",{className:"text-sm font-semibold",children:n}),e.jsxRuntimeExports.jsx("p",{className:"text-xs",children:t})]})})})]}),Ye=()=>{const[,n,t]=i.useCanvasWidth(),[s,c]=i.useSelectedBreakpoints(),u=o=>{s.includes(o)?s.length>2&&c(s.filter(a=>a!==o)):c(a=>[...a,o])};return e.jsxRuntimeExports.jsxs("div",{className:"flex items-center rounded-md",children:[x.map(fe.filter(o=>x.includes(s,x.toUpper(o.breakpoint))),o=>h.createElement(ze,{...o,onClick:t,key:o.breakpoint,currentBreakpoint:n})),e.jsxRuntimeExports.jsxs(i.DropdownMenu,{children:[e.jsxRuntimeExports.jsx(i.DropdownMenuTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsx("span",{className:"cursor-pointer px-2.5 hover:opacity-80",children:e.jsxRuntimeExports.jsx(M.DotsVerticalIcon,{className:"scale-90 transform"})})}),e.jsxRuntimeExports.jsxs(i.DropdownMenuContent,{className:"w-56 border-border text-xs",children:[e.jsxRuntimeExports.jsx(i.DropdownMenuLabel,{children:"Breakpoints"}),e.jsxRuntimeExports.jsx(i.DropdownMenuSeparator,{}),x.map(fe,o=>e.jsxRuntimeExports.jsx(i.DropdownMenuCheckboxItem,{disabled:o.breakpoint==="xs",onCheckedChange:()=>u(x.toUpper(o.breakpoint)),checked:x.includes(s,x.toUpper(o.breakpoint)),children:o.title},o.breakpoint))]})]})]})},Ke=()=>{const[n]=i.useSetAllBlocks(),{createSnapshot:t}=i.useCanvasHistory(),[,s]=i.useSelectedBlockIds(),[,c]=i.useSelectedStylingBlocks(),u=h.useCallback(()=>{n([]),s([]),c([]),t()},[n,t]);return e.jsxRuntimeExports.jsx("div",{className:"flex items-center",children:e.jsxRuntimeExports.jsxs(i.AlertDialog,{children:[e.jsxRuntimeExports.jsx(i.AlertDialogTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsxs(i.Button,{size:"sm",variant:"ghost",className:"flex items-center gap-x-1",children:[e.jsxRuntimeExports.jsx(M.EraserIcon,{})," Clear"]})}),e.jsxRuntimeExports.jsxs(i.AlertDialogContent,{className:"border-border",children:[e.jsxRuntimeExports.jsxs(i.AlertDialogHeader,{children:[e.jsxRuntimeExports.jsx(i.AlertDialogTitle,{children:"Clear whole canvas?"}),e.jsxRuntimeExports.jsx(i.AlertDialogDescription,{children:"Are you sure you want to clear the whole canvas?"})]}),e.jsxRuntimeExports.jsxs(i.AlertDialogFooter,{children:[e.jsxRuntimeExports.jsx(i.AlertDialogCancel,{children:"Cancel"}),e.jsxRuntimeExports.jsx(i.AlertDialogAction,{onClick:u,children:"Yes"})]})]})]})})},Ve=()=>{const n=i.useFeatureSupport("darkMode",!1),[t]=i.useCanvasZoom();return e.jsxRuntimeExports.jsxs("div",{className:"flex h-10 items-center justify-between border-b bg-background/70 px-2",children:[e.jsxRuntimeExports.jsxs("div",{className:"flex h-full space-x-2",children:[n?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(He,{}),e.jsxRuntimeExports.jsx(i.Separator,{orientation:"vertical"})]}):null,e.jsxRuntimeExports.jsx(Ye,{}),e.jsxRuntimeExports.jsx(i.Separator,{orientation:"vertical"}),e.jsxRuntimeExports.jsxs("div",{className:"flex w-12 items-center justify-center gap-x-1 space-x-0 font-medium",children:[e.jsxRuntimeExports.jsx(M.ZoomInIcon,{className:"h-3.5 w-3.5 flex-shrink-0"})," ",e.jsxRuntimeExports.jsxs("div",{className:"text-xs leading-3",children:[x.round(t,0),"%"]})]}),e.jsxRuntimeExports.jsx(i.Separator,{orientation:"vertical"}),e.jsxRuntimeExports.jsx(Ue,{})]}),e.jsxRuntimeExports.jsxs("div",{className:"flex h-full items-center space-x-2",children:[e.jsxRuntimeExports.jsx(i.Separator,{orientation:"vertical"}),e.jsxRuntimeExports.jsx(Ke,{})]})]})},Xe=`<!doctype html>
|
|
4
4
|
<html class="scroll-smooth h-full overflow-y-auto">
|
|
@@ -43,4 +43,4 @@ Valid keys: `+JSON.stringify(Object.keys(r),null," "));var A=_(b,I,y,C,v+"."+I,
|
|
|
43
43
|
outline: 1px solid ${s.length===1?"#42a1fc":"orange"} !important; outline-offset: -1px;
|
|
44
44
|
}`)},[s,R]),h.useEffect(()=>{j&&(j.textContent=u?`[data-style-id="${u}"]{ outline: 1px solid orange !important; outline-offset: -1px;}`:"")},[u,s,j]),h.useEffect(()=>{p&&(p.textContent=`${x.map(o,({id:S})=>`[data-style-id="${S}"]`).join(",")}{
|
|
45
45
|
outline: 1px solid orange !important; outline-offset: -1px;
|
|
46
|
-
}`)},[o,p]),h.useEffect(()=>{if(n==="section")return;const S=x.get(t,"bodyTextLightColor","#64748b"),O=x.get(t,"bodyTextDarkColor","#94a3b8"),w=x.get(t,"bodyBgLightColor","#FFFFFF"),B=x.get(t,"bodyBgDarkColor","#0f172a");a.body.className=`font-body antialiased text-[${S}] bg-[${w}] dark:text-[${O}] dark:bg-[${B}]`},[t,a,n]),n==="page"?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[d&&e.jsxRuntimeExports.jsx("link",{id:"heading-font",rel:"stylesheet",type:"text/css",href:`https://fonts.googleapis.com/css2?family=${d.replace(/ /g,"+")}:wght@300;400;500;600;700;800;900&display=swap`,media:"all"}),g&&d!==g&&e.jsxRuntimeExports.jsx("link",{id:"body-font",rel:"stylesheet",type:"text/css",href:`https://fonts.googleapis.com/css2?family=${g.replace(/ /g,"+")}:wght@300;400;500;600;700;800;900&display=swap`,media:"all"}),d&&e.jsxRuntimeExports.jsx("style",{children:`h1,h2,h3,h4,h5,h6{font-family: "${d}",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";}`})]}):null},dt=()=>{const{t:n}=je.useTranslation();return e.jsxRuntimeExports.jsx("div",{className:"my-auto py-24 text-center text-gray-600 dark:text-white",children:e.jsxRuntimeExports.jsx("h1",{className:"mb-10 text-4xl ",children:n("canvas_empty")})})},pt=n=>{const t={};return Object.keys(n).forEach(s=>{x.isString(n[s])&&n[s].startsWith(K.SLOT_KEY)&&(t[s]=n[s].replace(K.SLOT_KEY,"").split(","))}),t},ft=x.memoize(n=>{const t=n.replace(K.STYLES_KEY,"").split(",");return Fe.twMerge(t[0],t[1])});function xt(n,t){return x.get(n,`${t}_attrs`,{})}function ht(n,t,s,c){const u={};return Object.keys(n).forEach(o=>{if(x.isString(n[o])&&n[o].startsWith(K.STYLES_KEY)){const a=ft(n[o]);u[o]={className:a,"data-style-prop":o,"data-block-parent":n._id,"data-style-id":`${o}-${n._id}`,onMouseEnter:t,onMouseLeave:s,onClick:c,...xt(n,o)}}}),u}function mt(n,t){const s=x.get(n,"_bindings",{});return x.isEmpty(s)?{...n}:(x.each(s,(c,u)=>{x.isString(c)&&x.get(t,c,null)&&(n[u]=x.get(t,c,null))}),n)}function oe({blocks:n}){const t=i.useAllBlocks(),[,s]=i.useHighlightBlockId(),[,c]=i.useSelectedStylingBlocks(),[,u]=i.useSelectedBlockIds(),o=h.useCallback(p=>{var g;const d=(g=p.currentTarget)==null?void 0:g.getAttribute("data-style-id");s(d||""),p.stopPropagation()},[s]),a=h.useCallback(p=>{s(""),p.stopPropagation()},[s]),f=h.useCallback(p=>{p.stopPropagation();const d=p.currentTarget;if(d.getAttribute("data-block-parent")){const g=d.getAttribute("data-style-prop"),S=d.getAttribute("data-style-id"),O=d.getAttribute("data-block-parent");c([{id:S,prop:g,blockId:O}]),u([O])}else if(d.getAttribute("data-block-id")&&(u([d.getAttribute("data-block-id")]),d.getAttribute("data-block-parent"))){const g=d.getAttribute("data-style-prop"),S=d.getAttribute("data-style-id"),O=d.getAttribute("data-block-parent");c([{id:S,prop:g,blockId:O}])}},[c,u]),j=h.useCallback(p=>ht(p,o,a,f),[f,o,a]),[R]=V.useChaiExternalData();return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:h.Children.toArray(n.map((p,d)=>{const g=pt(p),S={};x.isEmpty(g)||Object.keys(g).forEach(m=>{S[m]=h.Children.toArray(g[m].map(F=>e.jsxRuntimeExports.jsx(oe,{blocks:[x.find(t,{_id:F})]})))});const O=x.filter(t,{_parent:p._id});S.children=O.length?e.jsxRuntimeExports.jsx(oe,{blocks:O}):null;const w=$e.getBlockComponent(p._type),B=x.get(w,"component",null);return x.isNull(B)?e.jsxRuntimeExports.jsx("noscript",{children:`<!-- ${p==null?void 0:p._type} not registered -->`}):e.jsxRuntimeExports.jsx(h.Suspense,{children:h.createElement(B,{blockProps:{onClick:f,"data-block-id":p._id,"data-block-type":p._type},inBuilder:!0,index:d,...mt(p,R),...j(p),...S})})}))})}const yt=()=>{const n=i.useAllBlocks();return e.jsxRuntimeExports.jsx(We.Provider,{children:x.isEmpty(n)?e.jsxRuntimeExports.jsx(dt,{}):e.jsxRuntimeExports.jsx(V.BlocksExternalDataProvider,{children:e.jsxRuntimeExports.jsx(oe,{blocks:x.filter(n,t=>x.isEmpty(t._parent))})})})},gt=(n,t)=>n.querySelector(`[data-style-id="${t}"]`),vt=()=>{const[n]=Y.useAtom(i.networkModeAtom),[t]=i.usePreviewMode(),[s]=i.useCanvasWidth(),[,c]=i.useSelectedBlockIds(),u=i.useSelectedBlock(),[,o]=i.useHighlightBlockId(),a=h.useRef(null),f=h.useRef(null),[j,R]=h.useState({width:0,height:0}),p=Ze(j),[d,g]=h.useState(0),[S,O]=h.useState([]),[,w]=h.useState([]),[,B]=Y.useAtom(i.canvasIframeAtom),[m,F]=i.useSelectedStylingBlocks(),N=i.useBuilderProp("loadingCanvas",!1);h.useEffect(()=>{const{clientWidth:q,clientHeight:L}=f.current;R({width:q,height:L}),d===0&&g(q)},[f,s,d]);const G=(q,L=0)=>{const{top:W}=q.getBoundingClientRect();return W+L>=0&&W-L<=window.innerHeight};h.useEffect(()=>{var q,L;if(u&&u.type!=="Multiple"&&a.current){const W=Se(a.current.contentDocument,u._id);W&&(G(W)||(L=(q=a.current)==null?void 0:q.contentWindow)==null||L.scrollTo({top:W.offsetTop,behavior:"smooth"}),O([W]))}},[u]),h.useEffect(()=>{if(!x.isEmpty(m)&&a.current){const q=gt(a.current.contentDocument,x.first(m).id);w(q?[q]:[null])}else w([null])},[m]);const J=h.useMemo(()=>{let q=Xe;return n==="offline"&&(q=q.replace("https://old.chaibuilder.com/offline/tailwind.cdn.js","/offline/tailwind.cdn.js"),q=q.replace("https://unpkg.com/aos@next/dist/aos.css","/offline/aos.css"),q=q.replace("https://unpkg.com/aos@next/dist/aos.js","/offline/aos.js")),q},[n]);return e.jsxRuntimeExports.jsx("div",{onClick:()=>{c([]),F([])},onMouseLeave:()=>setTimeout(()=>o(""),300),className:"relative mx-auto h-full w-full",style:d>0&&!x.isEmpty(p)?{width:t?"100%":d}:{},ref:f,children:e.jsxRuntimeExports.jsxs(it,{contentDidMount:()=>B(a.current),ref:a,id:"canvas-iframe",style:{width:`${s}px`,...p},className:"relative mx-auto box-content h-full max-w-full shadow-
|
|
46
|
+
}`)},[o,p]),h.useEffect(()=>{if(n==="section")return;const S=x.get(t,"bodyTextLightColor","#64748b"),O=x.get(t,"bodyTextDarkColor","#94a3b8"),w=x.get(t,"bodyBgLightColor","#FFFFFF"),B=x.get(t,"bodyBgDarkColor","#0f172a");a.body.className=`font-body antialiased text-[${S}] bg-[${w}] dark:text-[${O}] dark:bg-[${B}]`},[t,a,n]),n==="page"?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[d&&e.jsxRuntimeExports.jsx("link",{id:"heading-font",rel:"stylesheet",type:"text/css",href:`https://fonts.googleapis.com/css2?family=${d.replace(/ /g,"+")}:wght@300;400;500;600;700;800;900&display=swap`,media:"all"}),g&&d!==g&&e.jsxRuntimeExports.jsx("link",{id:"body-font",rel:"stylesheet",type:"text/css",href:`https://fonts.googleapis.com/css2?family=${g.replace(/ /g,"+")}:wght@300;400;500;600;700;800;900&display=swap`,media:"all"}),d&&e.jsxRuntimeExports.jsx("style",{children:`h1,h2,h3,h4,h5,h6{font-family: "${d}",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";}`})]}):null},dt=()=>{const{t:n}=je.useTranslation();return e.jsxRuntimeExports.jsx("div",{className:"my-auto py-24 text-center text-gray-600 dark:text-white",children:e.jsxRuntimeExports.jsx("h1",{className:"mb-10 text-4xl ",children:n("canvas_empty")})})},pt=n=>{const t={};return Object.keys(n).forEach(s=>{x.isString(n[s])&&n[s].startsWith(K.SLOT_KEY)&&(t[s]=n[s].replace(K.SLOT_KEY,"").split(","))}),t},ft=x.memoize(n=>{const t=n.replace(K.STYLES_KEY,"").split(",");return Fe.twMerge(t[0],t[1])});function xt(n,t){return x.get(n,`${t}_attrs`,{})}function ht(n,t,s,c){const u={};return Object.keys(n).forEach(o=>{if(x.isString(n[o])&&n[o].startsWith(K.STYLES_KEY)){const a=ft(n[o]);u[o]={className:a,"data-style-prop":o,"data-block-parent":n._id,"data-style-id":`${o}-${n._id}`,onMouseEnter:t,onMouseLeave:s,onClick:c,...xt(n,o)}}}),u}function mt(n,t){const s=x.get(n,"_bindings",{});return x.isEmpty(s)?{...n}:(x.each(s,(c,u)=>{x.isString(c)&&x.get(t,c,null)&&(n[u]=x.get(t,c,null))}),n)}function oe({blocks:n}){const t=i.useAllBlocks(),[,s]=i.useHighlightBlockId(),[,c]=i.useSelectedStylingBlocks(),[,u]=i.useSelectedBlockIds(),o=h.useCallback(p=>{var g;const d=(g=p.currentTarget)==null?void 0:g.getAttribute("data-style-id");s(d||""),p.stopPropagation()},[s]),a=h.useCallback(p=>{s(""),p.stopPropagation()},[s]),f=h.useCallback(p=>{p.stopPropagation();const d=p.currentTarget;if(d.getAttribute("data-block-parent")){const g=d.getAttribute("data-style-prop"),S=d.getAttribute("data-style-id"),O=d.getAttribute("data-block-parent");c([{id:S,prop:g,blockId:O}]),u([O])}else if(d.getAttribute("data-block-id")&&(u([d.getAttribute("data-block-id")]),d.getAttribute("data-block-parent"))){const g=d.getAttribute("data-style-prop"),S=d.getAttribute("data-style-id"),O=d.getAttribute("data-block-parent");c([{id:S,prop:g,blockId:O}])}},[c,u]),j=h.useCallback(p=>ht(p,o,a,f),[f,o,a]),[R]=V.useChaiExternalData();return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:h.Children.toArray(n.map((p,d)=>{const g=pt(p),S={};x.isEmpty(g)||Object.keys(g).forEach(m=>{S[m]=h.Children.toArray(g[m].map(F=>e.jsxRuntimeExports.jsx(oe,{blocks:[x.find(t,{_id:F})]})))});const O=x.filter(t,{_parent:p._id});S.children=O.length?e.jsxRuntimeExports.jsx(oe,{blocks:O}):null;const w=$e.getBlockComponent(p._type),B=x.get(w,"component",null);return x.isNull(B)?e.jsxRuntimeExports.jsx("noscript",{children:`<!-- ${p==null?void 0:p._type} not registered -->`}):e.jsxRuntimeExports.jsx(h.Suspense,{children:h.createElement(B,{blockProps:{onClick:f,"data-block-id":p._id,"data-block-type":p._type},inBuilder:!0,index:d,...mt(p,R),...j(p),...S})})}))})}const yt=()=>{const n=i.useAllBlocks();return e.jsxRuntimeExports.jsx(We.Provider,{children:x.isEmpty(n)?e.jsxRuntimeExports.jsx(dt,{}):e.jsxRuntimeExports.jsx(V.BlocksExternalDataProvider,{children:e.jsxRuntimeExports.jsx(oe,{blocks:x.filter(n,t=>x.isEmpty(t._parent))})})})},gt=(n,t)=>n.querySelector(`[data-style-id="${t}"]`),vt=()=>{const[n]=Y.useAtom(i.networkModeAtom),[t]=i.usePreviewMode(),[s]=i.useCanvasWidth(),[,c]=i.useSelectedBlockIds(),u=i.useSelectedBlock(),[,o]=i.useHighlightBlockId(),a=h.useRef(null),f=h.useRef(null),[j,R]=h.useState({width:0,height:0}),p=Ze(j),[d,g]=h.useState(0),[S,O]=h.useState([]),[,w]=h.useState([]),[,B]=Y.useAtom(i.canvasIframeAtom),[m,F]=i.useSelectedStylingBlocks(),N=i.useBuilderProp("loadingCanvas",!1);h.useEffect(()=>{const{clientWidth:q,clientHeight:L}=f.current;R({width:q,height:L}),d===0&&g(q)},[f,s,d]);const G=(q,L=0)=>{const{top:W}=q.getBoundingClientRect();return W+L>=0&&W-L<=window.innerHeight};h.useEffect(()=>{var q,L;if(u&&u.type!=="Multiple"&&a.current){const W=Se(a.current.contentDocument,u._id);W&&(G(W)||(L=(q=a.current)==null?void 0:q.contentWindow)==null||L.scrollTo({top:W.offsetTop,behavior:"smooth"}),O([W]))}},[u]),h.useEffect(()=>{if(!x.isEmpty(m)&&a.current){const q=gt(a.current.contentDocument,x.first(m).id);w(q?[q]:[null])}else w([null])},[m]);const J=h.useMemo(()=>{let q=Xe;return n==="offline"&&(q=q.replace("https://old.chaibuilder.com/offline/tailwind.cdn.js","/offline/tailwind.cdn.js"),q=q.replace("https://unpkg.com/aos@next/dist/aos.css","/offline/aos.css"),q=q.replace("https://unpkg.com/aos@next/dist/aos.js","/offline/aos.js")),q},[n]);return e.jsxRuntimeExports.jsx("div",{onClick:()=>{c([]),F([])},onMouseLeave:()=>setTimeout(()=>o(""),300),className:"relative mx-auto h-full w-full",style:d>0&&!x.isEmpty(p)?{width:t?"100%":d}:{},ref:f,children:e.jsxRuntimeExports.jsxs(it,{contentDidMount:()=>B(a.current),ref:a,id:"canvas-iframe",style:{width:`${s}px`,...p},className:"relative mx-auto box-content h-full max-w-full shadow-lg transition-all duration-300 ease-linear",initialContent:J,children:[e.jsxRuntimeExports.jsx(at,{}),e.jsxRuntimeExports.jsx(lt,{block:u,selectedBlockElement:x.first(S)}),e.jsxRuntimeExports.jsx(ut,{model:"page"}),e.jsxRuntimeExports.jsxs(ot,{children:[N?e.jsxRuntimeExports.jsx("div",{className:"h-full p-4",children:e.jsxRuntimeExports.jsx(i.Skeleton,{className:"h-full"})}):e.jsxRuntimeExports.jsx(yt,{}),e.jsxRuntimeExports.jsx("div",{className:"h-60"})]})]})})},jt=h.lazy(()=>Promise.resolve().then(()=>require("./AddBlocks-RHuwwfe5.cjs"))),Et=()=>{const[n,t]=Y.useAtom(i.addBlocksModalAtom);return e.jsxRuntimeExports.jsxs("div",{className:"flex h-full w-full flex-col",children:[e.jsxRuntimeExports.jsx(Ve,{}),e.jsxRuntimeExports.jsxs("div",{className:"relative flex-1 overflow-hidden bg-slate-800/90 px-2 bg-[linear-gradient(to_right,#222_0.5px,transparent_0.5px),linear-gradient(to_bottom,#222_0.5px,transparent_0.5px)] bg-[size:12px_12px]",children:[e.jsxRuntimeExports.jsx(h.Suspense,{fallback:e.jsxRuntimeExports.jsx(i.Skeleton,{className:"h-full"}),children:e.jsxRuntimeExports.jsx(V.ErrorBoundary,{children:e.jsxRuntimeExports.jsx(vt,{})})}),n?e.jsxRuntimeExports.jsx("div",{onClick:()=>t(!1),className:"absolute inset-0 z-50 flex items-center bg-black/30 backdrop-blur-sm",children:e.jsxRuntimeExports.jsx("div",{onClick:s=>s.stopPropagation(),className:"mx-auto h-[90%] w-[90%] max-w-3xl rounded-md bg-white p-4 shadow-lg shadow-black/10 xl:w-[65%]",children:e.jsxRuntimeExports.jsx(jt,{})})}):null]})]})};exports.default=Et;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-NV737rRe.js";
|
|
2
|
-
import { ag as x, au as h, av as f, aw as j, ax as y, ay as v } from "./index-
|
|
2
|
+
import { ag as x, au as h, av as f, aw as j, ax as y, ay as v } from "./index-Vx4ctSV6.js";
|
|
3
3
|
import { sortBy as P, filter as b, get as w, isEmpty as s, find as n, capitalize as C, map as N } from "lodash";
|
|
4
4
|
import { toast as S } from "sonner";
|
|
5
5
|
import { useEffect as p } from "react";
|
|
6
|
-
import { b as k, a as B, d as E, e as I } from "./index-
|
|
6
|
+
import { b as k, a as B, d as E, e as I } from "./index-WPlT_Q87.js";
|
|
7
7
|
import { BriefcaseIcon as L } from "lucide-react";
|
|
8
8
|
import "./MODIFIERS-MLfpKQY1.js";
|
|
9
9
|
import "@radix-ui/react-toggle";
|
|
@@ -47,15 +47,16 @@ import "react-dnd";
|
|
|
47
47
|
import "@minoru/react-dnd-treeview";
|
|
48
48
|
import "./lib.js";
|
|
49
49
|
import "himalaya";
|
|
50
|
-
import "./functions-
|
|
50
|
+
import "./functions-JFP-oMsY.js";
|
|
51
51
|
import "@mhsdesign/jit-browser-tailwindcss";
|
|
52
52
|
import "@bobthered/tailwindcss-palette-generator";
|
|
53
53
|
import "@tailwindcss/forms";
|
|
54
54
|
import "@tailwindcss/typography";
|
|
55
55
|
import "@tailwindcss/aspect-ratio";
|
|
56
56
|
import "@tailwindcss/line-clamp";
|
|
57
|
+
import "./tailwind-config-d1VL1lzE.js";
|
|
57
58
|
import "react-hotkeys-hook";
|
|
58
|
-
const
|
|
59
|
+
const De = () => {
|
|
59
60
|
const { data: t } = k(), { data: i, isLoading: l } = B(), { syncState: c } = x(), d = E(), [o, a] = I(), m = P(b(i, { type: "STATIC" }), (r) => w(r, "uuid") === (t == null ? void 0 : t.homepage) ? 0 : 1);
|
|
60
61
|
p(() => {
|
|
61
62
|
!s(i) && t.homepage && !n(i, { uuid: o }) && a(t.homepage);
|
|
@@ -109,5 +110,5 @@ const Ae = () => {
|
|
|
109
110
|
);
|
|
110
111
|
};
|
|
111
112
|
export {
|
|
112
|
-
|
|
113
|
+
De as default
|
|
113
114
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-WUGKV8jN.cjs"),s=require("./index-W5drgyWI.cjs"),i=require("lodash"),h=require("sonner"),l=require("react"),o=require("./index-fvoD_laH.cjs"),j=require("lucide-react");require("./MODIFIERS-WFzDQfiT.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-It2K33fU.cjs");require("clsx");require("tailwind-merge");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-icons");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("react-icons-picker");require("react-dom");require("react-quill");require("jotai");require("flat-to-nested");require("redux-undo");require("@chaibuilder/runtime");require("@react-hookz/web");require("react-i18next");require("i18next");require("@floating-ui/react-dom");require("react-textarea-autosize");require("flagged");require("react-dnd");require("@minoru/react-dnd-treeview");require("./lib.cjs");require("himalaya");require("./functions-KMQYiBHf.cjs");require("@mhsdesign/jit-browser-tailwindcss");require("@bobthered/tailwindcss-palette-generator");require("@tailwindcss/forms");require("@tailwindcss/typography");require("@tailwindcss/aspect-ratio");require("@tailwindcss/line-clamp");require("./tailwind-config-OxLD7oFU.cjs");require("react-hotkeys-hook");const p=()=>{const{data:t}=o.useProject(),{data:u,isLoading:x}=o.usePages(),{syncState:q}=s.useSavePage(),d=o.useChangePage(),[n,a]=o.useCurrentPage(),c=i.sortBy(i.filter(u,{type:"STATIC"}),r=>i.get(r,"uuid")===(t==null?void 0:t.homepage)?0:1);l.useEffect(()=>{!i.isEmpty(u)&&t.homepage&&!i.find(u,{uuid:n})&&a(t.homepage)},[n,u,t,a]),l.useEffect(()=>()=>a(null),[a]);const m=r=>{if(q!=="SAVED")h.toast.error("You have unsaved changes. Please save before changing the page.");else{const g=i.find(c,{uuid:r});d(g)}};return x||i.isEmpty(n)?null:e.jsxRuntimeExports.jsx("nav",{className:"flex rounded-lg border border-gray-200 bg-gray-50 px-3 pr-0 py-1 text-gray-700 dark:border-gray-700 dark:bg-gray-800","aria-label":"Breadcrumb",children:e.jsxRuntimeExports.jsxs("ol",{className:"inline-flex items-center space-x-1 md:space-x-3",children:[e.jsxRuntimeExports.jsx("li",{className:"inline-flex items-center",children:e.jsxRuntimeExports.jsxs("div",{className:"inline-flex items-center text-sm font-medium text-gray-500 dark:text-gray-400",children:[e.jsxRuntimeExports.jsx(j.BriefcaseIcon,{className:"w-4 h-4 mr-2"}),i.capitalize(t.name)]})}),e.jsxRuntimeExports.jsx("li",{"aria-current":"page",children:e.jsxRuntimeExports.jsxs("div",{className:"flex items-center",children:[e.jsxRuntimeExports.jsx("svg",{className:"mx-1 h-3 w-3 text-gray-400","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 6 10",children:e.jsxRuntimeExports.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"m1 9 4-4-4-4"})}),e.jsxRuntimeExports.jsxs(s.Select,{value:n||"",onValueChange:m,children:[e.jsxRuntimeExports.jsx(s.SelectTrigger,{className:"h-max border-0 py-0 text-sm font-medium text-gray-600 shadow-none outline-none ring-0 focus:ring-0 dark:text-gray-400",children:e.jsxRuntimeExports.jsx(s.SelectValue,{placeholder:"Page"})}),e.jsxRuntimeExports.jsx(s.SelectContent,{className:"z-[999]",children:i.map(c,r=>e.jsxRuntimeExports.jsx(s.SelectItem,{value:r.uuid,children:r==null?void 0:r.name},r.uuid))})]})]})})]})})};exports.default=p;
|
|
@@ -4,13 +4,13 @@ import { BoxModelIcon as G, BoxIcon as $, DragHandleHorizontalIcon as K, ViewHor
|
|
|
4
4
|
import { useDrop as Ie, useDragLayer as ke } from "react-dnd";
|
|
5
5
|
import { useDragOver as Be, Tree as ye } from "@minoru/react-dnd-treeview";
|
|
6
6
|
import { useTranslation as Ce } from "react-i18next";
|
|
7
|
-
import { _ as ve, Z as we, j as g, n as Se, bq as d, k as Te, l as De, a6 as Ne, m as Me, o as Oe, i as w, br as Re, ao as Ee, ap as Ae, bs as _e, bt as Pe, O as He, ae as Le, w as Ve, aj as ze, p as Fe, aA as Ge, bp as $e, bu as Ke } from "./index-
|
|
7
|
+
import { _ as ve, Z as we, j as g, n as Se, bq as d, k as Te, l as De, a6 as Ne, m as Me, o as Oe, i as w, br as Re, ao as Ee, ap as Ae, bs as _e, bt as Pe, O as He, ae as Le, w as Ve, aj as ze, p as Fe, aA as Ge, bp as $e, bu as Ke } from "./index-Vx4ctSV6.js";
|
|
8
8
|
import { DatabaseIcon as qe } from "lucide-react";
|
|
9
9
|
import "./lib.js";
|
|
10
10
|
import { useMemo as Qe, lazy as Ue, useCallback as S, useState as Ye, Suspense as We } from "react";
|
|
11
11
|
import { a as Ze } from "./MODIFIERS-MLfpKQY1.js";
|
|
12
12
|
import { c as T } from "./utils-PPBbw5bk.js";
|
|
13
|
-
import { f as Je } from "./index-
|
|
13
|
+
import { f as Je } from "./index-WPlT_Q87.js";
|
|
14
14
|
import { useAtom as Xe } from "jotai";
|
|
15
15
|
import "@radix-ui/react-toggle";
|
|
16
16
|
import "class-variance-authority";
|
|
@@ -40,13 +40,14 @@ import "redux-undo";
|
|
|
40
40
|
import "@chaibuilder/runtime";
|
|
41
41
|
import "@react-hookz/web";
|
|
42
42
|
import "himalaya";
|
|
43
|
-
import "./functions-
|
|
43
|
+
import "./functions-JFP-oMsY.js";
|
|
44
44
|
import "@mhsdesign/jit-browser-tailwindcss";
|
|
45
45
|
import "@bobthered/tailwindcss-palette-generator";
|
|
46
46
|
import "@tailwindcss/forms";
|
|
47
47
|
import "@tailwindcss/typography";
|
|
48
48
|
import "@tailwindcss/aspect-ratio";
|
|
49
49
|
import "@tailwindcss/line-clamp";
|
|
50
|
+
import "./tailwind-config-d1VL1lzE.js";
|
|
50
51
|
import "clsx";
|
|
51
52
|
import "tailwind-merge";
|
|
52
53
|
import "i18next";
|
|
@@ -207,7 +208,7 @@ const tt = (t) => {
|
|
|
207
208
|
}, nt = (t) => {
|
|
208
209
|
const s = t.depth * 10 + 16;
|
|
209
210
|
return /* @__PURE__ */ e.jsx("div", { className: "absolute right-0 top-0 h-0.5 -translate-y-1/2 transform bg-green-500", style: { left: s } });
|
|
210
|
-
}, rt = Ue(() => import("./MarkAsGlobalBlock-
|
|
211
|
+
}, rt = Ue(() => import("./MarkAsGlobalBlock-FPCQmRIh.js")), at = () => {
|
|
211
212
|
const [t] = g(), [, s] = Se();
|
|
212
213
|
return /* @__PURE__ */ e.jsxs(d, { className: "flex items-center gap-x-4 text-xs", onClick: () => s(t), children: [
|
|
213
214
|
/* @__PURE__ */ e.jsx(me, {}),
|
|
@@ -297,7 +298,7 @@ function mt(t) {
|
|
|
297
298
|
};
|
|
298
299
|
});
|
|
299
300
|
}
|
|
300
|
-
const
|
|
301
|
+
const hs = () => {
|
|
301
302
|
const t = Le(), [s] = Ve(), [o, r, a] = g(), [, c] = ze(), { t: l } = Ce(), { createSnapshot: x } = Fe(), j = Je(), m = xt(), [, p] = Xe(Ge), i = async (n, u) => {
|
|
302
303
|
const { dragSource: f, destinationIndex: b, relativeIndex: I, dropTargetId: E, monitor: A } = u, _ = mt(n);
|
|
303
304
|
s(_), f ? x() : (await m({
|
|
@@ -390,5 +391,5 @@ const js = () => {
|
|
|
390
391
|
) });
|
|
391
392
|
};
|
|
392
393
|
export {
|
|
393
|
-
|
|
394
|
+
hs as default
|
|
394
395
|
};
|