@chaibuilder/sdk 1.0.21 → 1.0.22

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.
Files changed (76) hide show
  1. package/README.md +30 -103
  2. package/dist/{AddBlocks-0-e393Fn.js → AddBlocks--G1jvF_h.js} +5 -4
  3. package/dist/AddBlocks-kQZRgF1n.cjs +3 -0
  4. package/dist/{BrandingOptions-HtNCJO9_.cjs → BrandingOptions-3zuS6-D8.cjs} +1 -1
  5. package/dist/{BrandingOptions-QqqJ-YRb.js → BrandingOptions-dwNB6XlX.js} +1 -1
  6. package/dist/{CanvasArea-pZz5czrV.cjs → CanvasArea-SzwU-7i5.cjs} +2 -2
  7. package/dist/{CanvasArea-0hMAhzxn.js → CanvasArea-YM7NWbx0.js} +72 -71
  8. package/dist/CurrentPage-Fw-gGZIK.cjs +1 -0
  9. package/dist/{CurrentPage-UOkxZISs.js → CurrentPage-iC1tGuWi.js} +6 -5
  10. package/dist/Layers-bvtrSZ0e.cjs +1 -0
  11. package/dist/{Layers-TB-Lriju.js → Layers-tvGxr-fn.js} +7 -6
  12. package/dist/{MarkAsGlobalBlock-Pa8po8qP.js → MarkAsGlobalBlock-hUoxbVet.js} +1 -1
  13. package/dist/{MarkAsGlobalBlock-5h3wP4zj.cjs → MarkAsGlobalBlock-wqHaABl_.cjs} +1 -1
  14. package/dist/{PagesPanel-ffrNyFyp.cjs → PagesPanel-IHkdL59C.cjs} +1 -1
  15. package/dist/{PagesPanel-mAMSbYPt.js → PagesPanel-w32nyAEE.js} +6 -5
  16. package/dist/{ProjectPanel-XvsYajju.js → ProjectPanel-1yH8uzoo.js} +7 -6
  17. package/dist/ProjectPanel-Rt_C00rp.cjs +1 -0
  18. package/dist/{Settings-8AbHXcDP.js → Settings-MbtN9j5p.js} +6 -5
  19. package/dist/Settings-zqxhKtAP.cjs +1 -0
  20. package/dist/SidePanels-PcCVJHFu.cjs +1 -0
  21. package/dist/{SidePanels-LQg3mdC4.js → SidePanels-WDSKmDRO.js} +7 -6
  22. package/dist/{Topbar-wA6jhMj9.js → Topbar-QBbGJftd.js} +1 -1
  23. package/dist/{Topbar-A3WZDrK4.cjs → Topbar-p07CgA1J.cjs} +1 -1
  24. package/dist/{UnsplashImages-mzIO1QeT.js → UnsplashImages-NOdXhrYp.js} +1 -1
  25. package/dist/{UnsplashImages-E8zPMgJf.cjs → UnsplashImages-RobUmAqJ.cjs} +1 -1
  26. package/dist/{UploadImages-qMeaY4sk.js → UploadImages-_yFxI_3x.js} +1 -1
  27. package/dist/{UploadImages-qEuDUEMn.cjs → UploadImages-oRvUykXU.cjs} +1 -1
  28. package/dist/{add-page-modal-oER3yE4F.js → add-page-modal-1C4AYlR3.js} +7 -6
  29. package/dist/add-page-modal-c20toln3.cjs +1 -0
  30. package/dist/{confirm-alert-rDSai_jQ.js → confirm-alert-LM4La_do.js} +1 -1
  31. package/dist/{confirm-alert-tH8UCCSF.cjs → confirm-alert-exrulqxB.cjs} +1 -1
  32. package/dist/core.cjs +1 -1
  33. package/dist/core.js +56 -55
  34. package/dist/{delete-page-modal-QzQdrLYI.js → delete-page-modal-ZkdZdhkf.js} +6 -5
  35. package/dist/{delete-page-modal-ShTRkqkB.cjs → delete-page-modal-sMfhH69k.cjs} +1 -1
  36. package/dist/{form-MlgUSEy_.cjs → form-0TlI-dUt.cjs} +1 -1
  37. package/dist/{form-vWeEsG9Y.js → form-rvWlnmcr.js} +1 -1
  38. package/dist/{functions-hmbWDcnW.js → functions-JFP-oMsY.js} +28 -27
  39. package/dist/{functions-eu6BbvqO.cjs → functions-KMQYiBHf.cjs} +2 -2
  40. package/dist/{index-pCHSFoQO.cjs → index-8dYzEcE3.cjs} +2 -2
  41. package/dist/{index-mLIwGF5W.js → index-UPQtDmUs.js} +3 -3
  42. package/dist/{index-T5MFAHA0.cjs → index-lH7BBNlu.cjs} +1 -1
  43. package/dist/{index-G55KtqnU.js → index-pgz9p5Yh.js} +2 -2
  44. package/dist/lib.cjs +1 -1
  45. package/dist/lib.d.ts +3 -9
  46. package/dist/lib.js +93 -152
  47. package/dist/page-viewer-1EuLsHyz.cjs +1 -0
  48. package/dist/{page-viewer-X3IEOrUC.js → page-viewer-3860AKDT.js} +29 -28
  49. package/dist/{project-general-setting-HZeYf9A1.cjs → project-general-setting-Bg7qIWUd.cjs} +1 -1
  50. package/dist/{project-general-setting-oujmeWOG.js → project-general-setting-mg_zEkzX.js} +7 -6
  51. package/dist/{project-seo-setting-_X6ckVa4.js → project-seo-setting-6Q0gFmHY.js} +2 -2
  52. package/dist/{project-seo-setting-3FZQXaTn.cjs → project-seo-setting-8B9pZPZN.cjs} +1 -1
  53. package/dist/render.cjs +1 -1
  54. package/dist/render.js +1 -1
  55. package/dist/single-page-detail-52Xz-XJ7.cjs +1 -0
  56. package/dist/{single-page-detail-SxboE7TI.js → single-page-detail-Asn7bb7f.js} +8 -7
  57. package/dist/studio.cjs +1 -1
  58. package/dist/studio.js +5 -4
  59. package/dist/tailwind-config-OxLD7oFU.cjs +1 -0
  60. package/dist/tailwind-config-d1VL1lzE.js +62 -0
  61. package/dist/tailwind.cjs +1 -0
  62. package/dist/tailwind.d.ts +80 -0
  63. package/dist/tailwind.js +24 -0
  64. package/dist/ui.cjs +1 -1
  65. package/dist/ui.d.ts +1 -1
  66. package/dist/ui.js +1 -1
  67. package/package.json +8 -3
  68. package/dist/AddBlocks-p68Cz79o.cjs +0 -3
  69. package/dist/CurrentPage-phMDH1Ub.cjs +0 -1
  70. package/dist/Layers-NKZXi2LV.cjs +0 -1
  71. package/dist/ProjectPanel-1ywILLme.cjs +0 -1
  72. package/dist/Settings-hdmnT_mI.cjs +0 -1
  73. package/dist/SidePanels-xaNrI3oK.cjs +0 -1
  74. package/dist/add-page-modal-9deiA1W9.cjs +0 -1
  75. package/dist/page-viewer-GPNN1H92.cjs +0 -1
  76. 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 Et } from "@radix-ui/react-icons";
8
- import { p as me, B as te, W as Le, aM as St, 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-G55KtqnU.js";
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-pgz9p5Yh.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 Ee, a as Ye } from "./MODIFIERS-MLfpKQY1.js";
13
- import { r as Ke, u as pn, B as fn, E as hn } from "./index-mLIwGF5W.js";
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-UPQtDmUs.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-hmbWDcnW.js";
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(St, { htmlFor: "dark-mode-switch", children: r("dark_mode") }),
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 Se = ({ landscape: n = !1 }) => /* @__PURE__ */ e.jsxs(
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(Se, {}),
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(Se, { landscape: !0 }),
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
- ], En = ({
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
- ] }), Sn = () => {
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(En, { ...o, onClick: t, key: o.breakpoint, currentBreakpoint: n })
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(Sn, {}),
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 S(s) {
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, E, R) {
485
- if (T = T || m, E = E || x, R !== r) {
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 `" + E + "` 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
+ "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 + " `" + E + "` is marked as required " + ("in `" + T + "`, but its value is `null`.")) : new w("The " + O + " `" + E + "` is marked as required in " + ("`" + T + "`, but its value is `undefined`.")) : null : s(y, x, T, O, E);
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 E = X(T);
509
+ var S = X(T);
509
510
  return new w(
510
- "Invalid " + C + " `" + y + "` of type " + ("`" + E + "` supplied to `" + h + "`, expected ") + ("`" + s + "`."),
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 S(l);
517
+ return E(l);
517
518
  }
518
519
  function W() {
519
- return S(i);
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 E = s(x, O, h, C, y + "[" + O + "]", r);
532
- if (E instanceof Error)
533
- return E;
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 S(l);
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 S(s);
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 S(s);
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 S(l);
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 S(l);
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 E = s(x, O, h, C, y + "." + O, r);
598
- if (E instanceof Error)
599
- return E;
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 S(l);
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 = [], E = 0; E < s.length; E++) {
617
- var R = s[E], B = R(h, C, y, x, T, r);
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 S(v);
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 S(s);
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 E = s[O];
645
- if (typeof E != "function")
646
- return be(h, C, y, O, X(E));
647
- var R = E(x, O, h, C, y + "." + O, 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 S(l);
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 E in O) {
662
- var R = s[E];
663
- if (a(s, E) && typeof R != "function")
664
- return be(h, C, y, E, X(R));
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 `" + E + "` supplied to `" + h + "`.\nBad object: " + JSON.stringify(j[v], null, " ") + `
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, E, h, C, y + "." + E, r);
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 S(l);
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 ls = ne.exports;
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: cs } = Ze;
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 = (S) => {
919
- S.key === "Enter" && (S.preventDefault(), t.length === 1 && D(ee(t)));
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 S = (f) => {
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", S), n.addEventListener("keydown", S), () => {
937
- n.removeEventListener("keydown", S);
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(Et, { className: "hover:scale-105 ", onClick: () => r([t == null ? void 0 : t._id]) }) : null
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 S = A(t, "roundedCorners", "0");
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: `${S || "0"}px`
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"), S = A(t, "bodyBgDarkColor", "#0f172a");
1072
- i.body.className = `font-body antialiased text-[${k}] bg-[${w}] dark:text-[${D}] dark:bg-[${S}]`;
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(Ee) && (t[r] = n[r].replace(Ee, "").split(","));
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), S = A(w, "component", null);
1182
- return gt(S) ? /* @__PURE__ */ e.jsx("noscript", { children: `<!-- ${u == null ? void 0 : u._type} not registered -->` }) : /* @__PURE__ */ e.jsx(Me, { children: z.createElement(S, {
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([]), [, S] = J(ln), [f, W] = Y(), M = cn("loadingCanvas", !1);
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: () => S(i.current),
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-md transition-all duration-300 ease-linear",
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-0-e393Fn.js")), ds = () => {
1272
+ }, tr = pt(() => import("./AddBlocks--G1jvF_h.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/80 px-2 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: [
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
- ds as default
1297
+ us as default
1297
1298
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-WUGKV8jN.cjs"),s=require("./index-lH7BBNlu.cjs"),i=require("lodash"),h=require("sonner"),l=require("react"),o=require("./index-8dYzEcE3.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;
@@ -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-G55KtqnU.js";
2
+ import { ag as x, au as h, av as f, aw as j, ax as y, ay as v } from "./index-pgz9p5Yh.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-mLIwGF5W.js";
6
+ import { b as k, a as B, d as E, e as I } from "./index-UPQtDmUs.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-hmbWDcnW.js";
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 Ae = () => {
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
- Ae as default
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"),u=require("lodash"),s=require("@radix-ui/react-icons"),f=require("react-dnd"),B=require("@minoru/react-dnd-treeview"),N=require("react-i18next"),r=require("./index-lH7BBNlu.cjs"),O=require("lucide-react");require("./lib.cjs");const p=require("react"),A=require("./MODIFIERS-WFzDQfiT.cjs"),q=require("./utils-It2K33fU.cjs"),_=require("./index-8dYzEcE3.cjs"),P=require("jotai");require("@radix-ui/react-toggle");require("class-variance-authority");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("react-icons-picker");require("react-dom");require("react-quill");require("flat-to-nested");require("redux-undo");require("@chaibuilder/runtime");require("@react-hookz/web");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("clsx");require("tailwind-merge");require("i18next");require("@floating-ui/react-dom");require("react-textarea-autosize");require("flagged");require("react-hotkeys-hook");require("sonner");const C=t=>{switch(t.type){case"Image":return e.jsxRuntimeExports.jsx(s.ImageIcon,{});case"Heading":return e.jsxRuntimeExports.jsx(s.HeadingIcon,{});case"Text":return e.jsxRuntimeExports.jsx(s.TextIcon,{});case"Link":return e.jsxRuntimeExports.jsx(s.Link1Icon,{});case"Video":return e.jsxRuntimeExports.jsx(s.VideoIcon,{});case"RichText":return e.jsxRuntimeExports.jsx(s.CursorTextIcon,{});case"Button":return e.jsxRuntimeExports.jsx(s.ButtonIcon,{});case"CustomHTML":return e.jsxRuntimeExports.jsx(s.CodeIcon,{});case"Divider":return e.jsxRuntimeExports.jsx(s.DividerHorizontalIcon,{});case"Icon":return e.jsxRuntimeExports.jsx(s.SketchLogoIcon,{});case"List":return e.jsxRuntimeExports.jsx(s.RowsIcon,{});case"Paragraph":return e.jsxRuntimeExports.jsx(s.TextIcon,{});case"Row":return e.jsxRuntimeExports.jsx(s.RowsIcon,{});case"ListItem":return e.jsxRuntimeExports.jsx(s.ColumnsIcon,{});case"LineBreak":return e.jsxRuntimeExports.jsx(s.SpaceBetweenVerticallyIcon,{});case"Form":return e.jsxRuntimeExports.jsx(s.GroupIcon,{});case"Checkbox":return e.jsxRuntimeExports.jsx(s.CheckboxIcon,{});case"FormButton":return e.jsxRuntimeExports.jsx(s.ButtonIcon,{});case"Input":case"TextArea":return e.jsxRuntimeExports.jsx(s.InputIcon,{});case"Radio":return e.jsxRuntimeExports.jsx(s.RadiobuttonIcon,{});case"Select":return e.jsxRuntimeExports.jsx(s.DropdownMenuIcon,{});case"Table":return e.jsxRuntimeExports.jsx(s.TableIcon,{});case"TableHead":return e.jsxRuntimeExports.jsx(s.BorderTopIcon,{});case"TableBody":return e.jsxRuntimeExports.jsx(s.BorderAllIcon,{});case"TableRow":return e.jsxRuntimeExports.jsx(s.ViewHorizontalIcon,{});case"TableCell":return e.jsxRuntimeExports.jsx(s.DragHandleHorizontalIcon,{});case"DataProvider":return e.jsxRuntimeExports.jsx(O.DatabaseIcon,{size:16});case"Box":return e.jsxRuntimeExports.jsx(s.BoxIcon,{});default:return e.jsxRuntimeExports.jsx(s.BoxModelIcon,{})}};function H(t=""){const n={xs:"390px",sm:"640px",md:"768px",lg:"1024px",xl:"1366px","2xl":"1536px"};if(new RegExp(/\bsr-only\b/).test(t))return"Sr Only";if(new RegExp(/\b(sm|md|lg|xl|2xl):hidden\b/).test(t))return"Visible on mobile";if(t.match(/(^| )hidden( |$)/g)){const c=new RegExp(/\b(sm|md|lg|xl|2xl):(block|grid|flex|inline|inline-grid|inline-flex|inline-block)\b/),l=t.match(c);if(u.nth(l,1))return`Visible >=${n[u.nth(l,1)]}`}return""}const L=t=>{let n="";return Object.keys(t).forEach(o=>{u.startsWith(t[o],A.STYLES_KEY)&&(n=t[o])}),n},F=t=>{var g;const[,n]=r.useHighlightBlockId(),[o]=r.useHiddenBlockIds(),{isSelected:x}=t,{id:c,data:l}=t.node,a=t.depth*10,m=d=>{d.stopPropagation(),t.onToggle(t.node.id)},E=B.useDragOver(c,t.isOpen,t.onToggle),j=p.useMemo(()=>{const d=L(t.node.data);return H(d)},[t.node.data]);return e.jsxRuntimeExports.jsx("div",{onMouseEnter:()=>n(c),className:q.cn("group flex w-full items-center justify-between space-x-px py-px ",x?"bg-blue-500 text-white":"hover:bg-gray-200 dark:hover:bg-gray-800"),onClick:d=>{d.stopPropagation(),!o.includes(c)&&t.onSelect(c)},onContextMenu:()=>t.onSelect(c),style:{paddingInlineStart:a},...E,children:e.jsxRuntimeExports.jsxs("div",{className:"flex items-center",children:[e.jsxRuntimeExports.jsx("div",{className:`flex h-4 w-4 rotate-0 transform cursor-pointer items-center justify-center text-xs transition-transform duration-100 ${t.isOpen?"rotate-90":""}`,children:t.node.droppable&&e.jsxRuntimeExports.jsx("button",{onClick:m,type:"button",children:e.jsxRuntimeExports.jsx(s.TriangleRightIcon,{})})}),e.jsxRuntimeExports.jsxs("button",{type:"button",className:"flex items-center",children:[e.jsxRuntimeExports.jsx("div",{className:"-mt-1 h-3 w-3",children:e.jsxRuntimeExports.jsx(C,{type:l==null?void 0:l._type})}),e.jsxRuntimeExports.jsx("div",{className:"ml-2 truncate text-[11px]",children:((g=t.node.data)==null?void 0:g._name)||t.node.text}),j?e.jsxRuntimeExports.jsxs("span",{className:"ml-2 flex items-center text-[10px] italic "+(x?"text-gray-200":"text-gray-500"),children:["(",j,")"]}):null]})]})})},V=t=>{var o;const{item:n}=t.monitorProps;return e.jsxRuntimeExports.jsxs("div",{className:"flex w-max items-center bg-blue-200 bg-opacity-30 p-1 font-semibold text-blue-700",children:[e.jsxRuntimeExports.jsx("div",{className:"",children:e.jsxRuntimeExports.jsx(C,{type:(o=n==null?void 0:n.data)==null?void 0:o._type})}),e.jsxRuntimeExports.jsx("div",{className:"ml-2 truncate text-[11px]",children:n.text})]})},z=t=>{const n=t.depth*10+16;return e.jsxRuntimeExports.jsx("div",{className:"absolute right-0 top-0 h-0.5 -translate-y-1/2 transform bg-green-500",style:{left:n}})},G=p.lazy(()=>Promise.resolve().then(()=>require("./MarkAsGlobalBlock-wqHaABl_.cjs"))),$=()=>{const[t]=r.useSelectedBlockIds(),[,n]=r.useCutBlockIds();return e.jsxRuntimeExports.jsxs(r.ContextMenuItem,{className:"flex items-center gap-x-4 text-xs",onClick:()=>n(t),children:[e.jsxRuntimeExports.jsx(s.ScissorsIcon,{})," Cut"]})},K=()=>{const[t]=r.useSelectedBlockIds(),[,n]=r.useCopyBlockIds();return e.jsxRuntimeExports.jsxs(r.ContextMenuItem,{className:"flex items-center gap-x-4 text-xs",onClick:()=>n(t),children:[e.jsxRuntimeExports.jsx(s.ClipboardIcon,{})," Copy"]})},Q=()=>{const[t]=r.useSelectedBlockIds(),n=r.useRemoveBlocks(),o=r.useSelectedBlock();return e.jsxRuntimeExports.jsxs(r.ContextMenuItem,{disabled:(o==null?void 0:o._type)==="Slot",className:"flex items-center gap-x-4 text-xs",onClick:()=>n(t),children:[e.jsxRuntimeExports.jsx(s.TrashIcon,{})," Remove"]})},U=({id:t=null,openMarkAsGlobalModal:n})=>{const[o]=r.useSelectedBlockIds(),x=r.useDuplicateBlocks(),{pasteBlocks:c,canPaste:l}=r.usePasteBlocks(),a=r.useBuilderProp("globalBlocksSupport",!1),m=p.useCallback(()=>{x(o)},[o,x]);return e.jsxRuntimeExports.jsxs(r.ContextMenuContent,{className:"text-xs",children:[a&&e.jsxRuntimeExports.jsx(r.ContextMenuItem,{className:"flex items-center gap-x-4 border-b text-xs",onClick:n,children:e.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-x-4",children:[e.jsxRuntimeExports.jsx(s.GlobeIcon,{})," Mark as global"]})}),e.jsxRuntimeExports.jsxs(r.ContextMenuItem,{className:"flex items-center gap-x-4 text-xs",onClick:m,children:[e.jsxRuntimeExports.jsx(s.CopyIcon,{})," Duplicate"]}),e.jsxRuntimeExports.jsx($,{}),e.jsxRuntimeExports.jsx(K,{}),e.jsxRuntimeExports.jsxs(r.ContextMenuItem,{className:"flex items-center gap-x-4 text-xs",onClick:()=>c(t),disabled:!l,children:[e.jsxRuntimeExports.jsx(s.ClipboardCopyIcon,{})," Paste"]}),e.jsxRuntimeExports.jsx(Q,{})]})},Y=({children:t,id:n=null})=>{const[o,x]=p.useState(!1);return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(r.Dialog,{open:o,onOpenChange:x,children:o&&e.jsxRuntimeExports.jsx(r.DialogContent,{children:e.jsxRuntimeExports.jsx(p.Suspense,{fallback:e.jsxRuntimeExports.jsx("div",{className:"h-96 w-full animate-pulse bg-gray-200"}),children:e.jsxRuntimeExports.jsx(G,{closeModal:()=>x(!1),id:n})})})}),e.jsxRuntimeExports.jsxs(r.ContextMenu,{children:[e.jsxRuntimeExports.jsx(r.ContextMenuTrigger,{children:t}),e.jsxRuntimeExports.jsx(U,{id:n,openMarkAsGlobalModal:()=>x(!0)})]})]})},W=()=>{const{addCoreBlock:t}=r.useAddBlock(),n=r.useBuilderProp("getExternalPredefinedBlock");return p.useCallback(async o=>{const{block:x,dropTargetId:c,relativeIndex:l}=o;if(u.has(x,"format")){const a=await n(x);return t({blocks:a},c===0?null:c,l)}return t(x,c===0?null:c,l)},[t])};function J(t){return u.map(t,n=>{const{data:o}=n;return{...o,_parent:n.parent===0?null:n.parent}})}const X=()=>{const t=r.useAllBlocks(),[n]=r.useSetAllBlocks(),[o,x,c]=r.useSelectedBlockIds(),[,l]=r.useSelectedStylingBlocks(),{t:a}=N.useTranslation(),{createSnapshot:m}=r.useCanvasHistory(),E=_.useExpandedIds(),j=W(),[,g]=P.useAtom(r.addBlocksModalAtom),d=async(i,R)=>{const{dragSource:h,destinationIndex:b,relativeIndex:k,dropTargetId:T,monitor:D}=R,M=J(i);n(M),h?m():(await j({block:D.getItem(),dropTargetId:T,destinationIndex:b,relativeIndex:k}),g(!1))},y=u.map(t,i=>({id:i._id,text:i._type,parent:i._parent||0,droppable:!u.isUndefined(u.find(t,{_parent:i._id})),data:i})),v=()=>{x([]),l([])},[{isOver:I},S]=f.useDrop(()=>({accept:["CHAI_BLOCK"],collect:i=>({canDrop:i.canDrop(),isOver:i.isOver()}),drop:i=>{(async()=>(await j({block:i,dropTargetId:"",destinationIndex:0,relativeIndex:0}),g(!1)))()}})),{isDragging:w}=f.useDragLayer(i=>({isDragging:i.isDragging()}));return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsx("div",{onClick:()=>v(),className:q.cn("-mx-1 -mt-1 flex h-full select-none flex-col space-y-1",w?"bg-green-50/80":"bg-background"),children:u.isEmpty(t)?e.jsxRuntimeExports.jsxs("div",{ref:S,className:`mx-1 mt-4 max-w-full h-full p-6 text-center text-sm text-gray-400 ${I?"bg-blue-200":""}`,children:[I?e.jsxRuntimeExports.jsx(s.DoubleArrowDownIcon,{className:"mx-auto h-12 w-12 animate-bounce"}):e.jsxRuntimeExports.jsx(s.StackIcon,{className:"mx-auto h-10 w-10"}),e.jsxRuntimeExports.jsx("p",{className:"mt-2",children:a(I?"drop_here_message":"tree_view_no_blocks")})]}):e.jsxRuntimeExports.jsx(r.ScrollArea,{id:"layers-view",className:"no-scrollbar h-full overflow-y-auto p-1",children:e.jsxRuntimeExports.jsx(B.Tree,{initialOpen:E,extraAcceptTypes:["CHAI_BLOCK"],tree:y,rootId:0,render:(i,{depth:R,isOpen:h,onToggle:b})=>e.jsxRuntimeExports.jsx(Y,{id:i.id,children:e.jsxRuntimeExports.jsx(F,{onSelect:k=>{l([]),x([k])},isSelected:u.includes(o,i.id),node:i,depth:R,isOpen:h,onToggle:b,toggleIds:c})}),dragPreviewRender:i=>e.jsxRuntimeExports.jsx(V,{monitorProps:i}),onDrop:d,classes:{root:"h-full pt-2",draggingSource:"opacity-30",dropTarget:"bg-green-100",placeholder:"relative"},sort:!1,insertDroppableFirst:!1,canDrop:r.canDropBlock,dropTargetOffset:2,enableAnimateExpand:!0,placeholderRender:(i,{depth:R})=>e.jsxRuntimeExports.jsx(z,{node:i,depth:R})})})})})};exports.default=X;
@@ -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-G55KtqnU.js";
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-pgz9p5Yh.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-mLIwGF5W.js";
13
+ import { f as Je } from "./index-UPQtDmUs.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-hmbWDcnW.js";
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-Pa8po8qP.js")), at = () => {
211
+ }, rt = Ue(() => import("./MarkAsGlobalBlock-hUoxbVet.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 js = () => {
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
- js as default
394
+ hs as default
394
395
  };
@@ -1,7 +1,7 @@
1
1
  import { j as t } from "./jsx-runtime-NV737rRe.js";
2
2
  import { GlobeIcon as m } from "@radix-ui/react-icons";
3
3
  import { useState as n } from "react";
4
- import { $ as p, B as o } from "./index-G55KtqnU.js";
4
+ import { $ as p, B as o } from "./index-pgz9p5Yh.js";
5
5
  import { capitalize as c } from "lodash";
6
6
  import "./MODIFIERS-MLfpKQY1.js";
7
7
  import "@radix-ui/react-toggle";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-WUGKV8jN.cjs"),n=require("@radix-ui/react-icons"),o=require("react"),s=require("./index-T5MFAHA0.cjs"),c=require("lodash");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-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");const x=({id:t=null,closeModal:i})=>{const l=s.useMarkAsGlobalBlock(),[r,u]=o.useState("");return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx("h1",{className:"text-lg font-bold",children:"Mark as Global"}),e.jsxRuntimeExports.jsxs("div",{className:"py-2 text-sm",children:["Note: Global blocks are single instances. Editing global blocks will be reflected on all pages using these blocks. ",e.jsxRuntimeExports.jsx("br",{}),e.jsxRuntimeExports.jsxs("ul",{className:"mt-4 list-inside list-disc space-y-1",children:[e.jsxRuntimeExports.jsxs("li",{children:["Global blocks are indicated with ",e.jsxRuntimeExports.jsx(n.GlobeIcon,{className:"inline"})," icon in left sidebar"]}),e.jsxRuntimeExports.jsx("li",{children:'Global blocks are available under "Global" category'})]})]}),e.jsxRuntimeExports.jsxs("div",{className:"my-4",children:[e.jsxRuntimeExports.jsx("label",{className:"block text-sm font-medium text-gray-400",children:"Enter global block name"}),e.jsxRuntimeExports.jsx("input",{placeholder:"Eg: Header, Footer ",className:"mt-2 w-full",value:r,onChange:a=>u(a.target.value)})]}),e.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-end gap-x-4",children:[e.jsxRuntimeExports.jsx(s.Button,{onClick:()=>{l(t,c.capitalize(r)),i()},disabled:r.length<=2,variant:"default",children:"Mark as Global"}),e.jsxRuntimeExports.jsx(s.Button,{variant:"outline",onClick:i,children:"Cancel"})]})]})};exports.default=x;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-WUGKV8jN.cjs"),n=require("@radix-ui/react-icons"),o=require("react"),s=require("./index-lH7BBNlu.cjs"),c=require("lodash");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-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");const x=({id:t=null,closeModal:i})=>{const l=s.useMarkAsGlobalBlock(),[r,u]=o.useState("");return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx("h1",{className:"text-lg font-bold",children:"Mark as Global"}),e.jsxRuntimeExports.jsxs("div",{className:"py-2 text-sm",children:["Note: Global blocks are single instances. Editing global blocks will be reflected on all pages using these blocks. ",e.jsxRuntimeExports.jsx("br",{}),e.jsxRuntimeExports.jsxs("ul",{className:"mt-4 list-inside list-disc space-y-1",children:[e.jsxRuntimeExports.jsxs("li",{children:["Global blocks are indicated with ",e.jsxRuntimeExports.jsx(n.GlobeIcon,{className:"inline"})," icon in left sidebar"]}),e.jsxRuntimeExports.jsx("li",{children:'Global blocks are available under "Global" category'})]})]}),e.jsxRuntimeExports.jsxs("div",{className:"my-4",children:[e.jsxRuntimeExports.jsx("label",{className:"block text-sm font-medium text-gray-400",children:"Enter global block name"}),e.jsxRuntimeExports.jsx("input",{placeholder:"Eg: Header, Footer ",className:"mt-2 w-full",value:r,onChange:a=>u(a.target.value)})]}),e.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-end gap-x-4",children:[e.jsxRuntimeExports.jsx(s.Button,{onClick:()=>{l(t,c.capitalize(r)),i()},disabled:r.length<=2,variant:"default",children:"Mark as Global"}),e.jsxRuntimeExports.jsx(s.Button,{variant:"outline",onClick:i,children:"Cancel"})]})]})};exports.default=x;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-WUGKV8jN.cjs"),u=require("react"),i=require("lodash"),s=require("./index-pCHSFoQO.cjs");require("./MODIFIERS-WFzDQfiT.cjs");require("i18next");require("react-i18next");require("./index-T5MFAHA0.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("@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-eu6BbvqO.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("react-hotkeys-hook");require("sonner");require("lucide-react");const a=u.lazy(()=>Promise.resolve().then(()=>require("./add-page-modal-9deiA1W9.cjs"))),x=u.lazy(()=>Promise.resolve().then(()=>require("./page-viewer-GPNN1H92.cjs"))),d=()=>{const{data:q=[],isLoading:t}=s.usePages(),{data:r}=s.useProject(),n=i.sortBy(i.filter(q,{type:"STATIC"}),o=>i.get(o,"uuid")===(r==null?void 0:r.homepage)?0:1);return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between rounded-md bg-background/30 p-1",children:[e.jsxRuntimeExports.jsx("h1",{className:"px-1 font-semibold",children:"Pages"}),e.jsxRuntimeExports.jsx(u.Suspense,{fallback:e.jsxRuntimeExports.jsx("div",{className:"text-sm text-blue-500 underline",children:"+ New Page"}),children:e.jsxRuntimeExports.jsx(a,{})})]}),e.jsxRuntimeExports.jsx("hr",{className:"-mx-1"}),e.jsxRuntimeExports.jsx("div",{className:"-mx-1 divide-y-2",children:e.jsxRuntimeExports.jsx(x,{isLoading:t,pages:n})})]})};exports.default=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-WUGKV8jN.cjs"),u=require("react"),i=require("lodash"),s=require("./index-8dYzEcE3.cjs");require("./MODIFIERS-WFzDQfiT.cjs");require("i18next");require("react-i18next");require("./index-lH7BBNlu.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("@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");require("sonner");require("lucide-react");const a=u.lazy(()=>Promise.resolve().then(()=>require("./add-page-modal-c20toln3.cjs"))),x=u.lazy(()=>Promise.resolve().then(()=>require("./page-viewer-1EuLsHyz.cjs"))),d=()=>{const{data:q=[],isLoading:t}=s.usePages(),{data:r}=s.useProject(),n=i.sortBy(i.filter(q,{type:"STATIC"}),o=>i.get(o,"uuid")===(r==null?void 0:r.homepage)?0:1);return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between rounded-md bg-background/30 p-1",children:[e.jsxRuntimeExports.jsx("h1",{className:"px-1 font-semibold",children:"Pages"}),e.jsxRuntimeExports.jsx(u.Suspense,{fallback:e.jsxRuntimeExports.jsx("div",{className:"text-sm text-blue-500 underline",children:"+ New Page"}),children:e.jsxRuntimeExports.jsx(a,{})})]}),e.jsxRuntimeExports.jsx("hr",{className:"-mx-1"}),e.jsxRuntimeExports.jsx("div",{className:"-mx-1 divide-y-2",children:e.jsxRuntimeExports.jsx(x,{isLoading:t,pages:n})})]})};exports.default=d;