@chaibuilder/sdk 1.2.29 → 1.2.31

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 (64) hide show
  1. package/dist/{AddBlocks-YJPdSqcY.cjs → AddBlocks-UxJOFB9M.cjs} +1 -1
  2. package/dist/{AddBlocks-0sW6gkCO.js → AddBlocks-u1FkSHNj.js} +19 -19
  3. package/dist/{BrandingOptions--vgnQvD1.js → BrandingOptions-A3_c_sd7.js} +1 -1
  4. package/dist/{CanvasArea-41QoxuLf.cjs → CanvasArea-AP2VxTme.cjs} +4 -4
  5. package/dist/{CanvasArea-aii0PyU-.js → CanvasArea-AgZG60eK.js} +68 -68
  6. package/dist/{CurrentPage-2W1pdAOG.cjs → CurrentPage-lBwqlXua.cjs} +1 -1
  7. package/dist/{CurrentPage-06Iacwyp.js → CurrentPage-urEDcMfR.js} +4 -4
  8. package/dist/{ListTree-DnA8gj-7.js → ListTree-c9Z0kWbN.js} +1 -1
  9. package/dist/{PagesPanel-_1CDTUdE.js → PagesPanel-C3yfpE0O.js} +5 -5
  10. package/dist/{PagesPanel-PBFzPSNY.cjs → PagesPanel-QAb3JjVO.cjs} +1 -1
  11. package/dist/{ProjectPanel-pUMeIiUW.js → ProjectPanel--8xzmpgT.js} +5 -5
  12. package/dist/{ProjectPanel-755bbzEQ.cjs → ProjectPanel-DJHfHFni.cjs} +1 -1
  13. package/dist/Settings-alHeC0FS.cjs +1 -0
  14. package/dist/{Settings-dnO-s6x0.js → Settings-oMxnykls.js} +560 -532
  15. package/dist/{SidePanels-VxSXXkt_.js → SidePanels-TuKVMKxP.js} +3 -3
  16. package/dist/{SidePanels-Gq2LdVuY.cjs → SidePanels-znlH133C.cjs} +1 -1
  17. package/dist/{Topbar-5zbOSGF6.js → Topbar-VCFW9uNI.js} +1 -1
  18. package/dist/{UnsplashImages-4WAWgA4s.js → UnsplashImages-N9h0avWO.js} +1 -1
  19. package/dist/{UploadImages-PONIHtn6.js → UploadImages-e70AeNGX.js} +1 -1
  20. package/dist/{add-page-modal-jWcp0w-S.cjs → add-page-modal-PhWtC-ZY.cjs} +1 -1
  21. package/dist/{add-page-modal-4VrFvgEm.js → add-page-modal-Q3c1EOw1.js} +5 -5
  22. package/dist/{confirm-alert-j7b88hsW.js → confirm-alert-EDOFRmH8.js} +1 -1
  23. package/dist/core.cjs +1 -1
  24. package/dist/core.js +2 -2
  25. package/dist/defaultTheme-9e2np_iI.cjs +1 -0
  26. package/dist/{defaultTheme-D8B4-wHO.js → defaultTheme-ocvEtKQ3.js} +14 -5
  27. package/dist/{delete-page-modal--xHHdRAq.js → delete-page-modal-9B7603s-.js} +4 -4
  28. package/dist/{delete-page-modal-p6b0upz4.cjs → delete-page-modal-eh0Afqbu.cjs} +1 -1
  29. package/dist/email.cjs +1 -1
  30. package/dist/email.js +2 -2
  31. package/dist/{form-_GJb9YcB.js → form-yw3Uuk6v.js} +1 -1
  32. package/dist/html-to-json-Xhu27KFD.cjs +1 -0
  33. package/dist/{html-to-json-LJyJsnmZ.js → html-to-json-ZV4QjSww.js} +53 -52
  34. package/dist/{index-KArv7pNz.cjs → index-B1EMostm.cjs} +1 -1
  35. package/dist/{index-0QJwevON.js → index-FVtnWx9d.js} +2 -2
  36. package/dist/{index-UHaqEdws.js → index-HiiWSXkE.js} +9 -9
  37. package/dist/{index-Eb5zyh2F.js → index-TXu6kBv9.js} +4 -4
  38. package/dist/{index-mlMvwv2b.cjs → index-tFX6mX_R.cjs} +1 -1
  39. package/dist/lib.cjs +3 -3
  40. package/dist/lib.d.ts +2 -0
  41. package/dist/lib.js +83 -81
  42. package/dist/{page-viewer-00Xx4u8e.js → page-viewer-3UIfb9p1.js} +5 -5
  43. package/dist/{page-viewer-SZNm7b1n.cjs → page-viewer-wVQGkDJd.cjs} +1 -1
  44. package/dist/{project-general-setting-asDxlmhZ.js → project-general-setting-8vqXfr75.js} +5 -5
  45. package/dist/{project-general-setting-C_pHNuZE.cjs → project-general-setting-LrABWutT.cjs} +1 -1
  46. package/dist/{project-seo-setting-DuAaDfDR.js → project-seo-setting-x3peNgla.js} +2 -2
  47. package/dist/render.cjs +1 -1
  48. package/dist/render.d.ts +2 -0
  49. package/dist/render.js +76 -74
  50. package/dist/{single-page-detail-oqj6zsLU.cjs → single-page-detail-76C_iDiS.cjs} +1 -1
  51. package/dist/{single-page-detail-UNxXvhl4.js → single-page-detail-py5_WxGu.js} +12 -12
  52. package/dist/studio.cjs +1 -1
  53. package/dist/studio.js +4 -4
  54. package/dist/tailwind.cjs +1 -1
  55. package/dist/tailwind.d.ts +37 -0
  56. package/dist/tailwind.js +102 -11
  57. package/dist/ui.js +7 -7
  58. package/dist/{useCanvasSettings-R6br4J9i.js → useCanvasSettings-unTQUdlP.js} +1 -1
  59. package/dist/web-blocks.cjs +4 -4
  60. package/dist/web-blocks.js +232 -216
  61. package/package.json +2 -2
  62. package/dist/Settings-G9Xtqr7n.cjs +0 -1
  63. package/dist/defaultTheme-7VqqhOcp.cjs +0 -1
  64. package/dist/html-to-json-vP1ESB_e.cjs +0 -1
@@ -2,10 +2,10 @@ var Le = Object.defineProperty;
2
2
  var Re = (n, o, e) => o in n ? Le(n, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[o] = e;
3
3
  var _ = (n, o, e) => (Re(n, typeof o != "symbol" ? o + "" : o, e), e);
4
4
  import { j as r } from "./jsx-runtime-WbnYoNE9.js";
5
- import A, { createElement as se, useCallback as P, useState as j, useEffect as b, Component as ue, Children as Fe, Suspense as he, useRef as oe, useMemo as Pe } from "react";
5
+ import N, { createElement as se, useCallback as P, useState as j, useEffect as b, Component as ue, Children as Fe, Suspense as he, useRef as oe, useMemo as Pe } from "react";
6
6
  import { map as F, includes as ne, toUpper as Y, round as Oe, noop as T, has as Q, throttle as me, isEmpty as S, first as z, omit as He, pick as ze, get as f, isString as X, memoize as Ue, each as We, find as qe, filter as ge, isNull as Ke } from "lodash-es";
7
7
  import { ResetIcon as re, MobileIcon as ie, LaptopIcon as Ye, DesktopIcon as Je, DotsVerticalIcon as Qe, EraserIcon as Ze, ZoomInIcon as Ge, DragHandleDots2Icon as Xe, ArrowUpIcon as Ve, CopyIcon as et, TrashIcon as tt } from "@radix-ui/react-icons";
8
- import { v as fe, B as U, V as xe, aB as st, aC as ot, aD as nt, aE as rt, aF as it, N as V, ab as at, h as W, aG as lt, aH as ct, aI as dt, aJ as pt, aK as ut, aL as ht, aM as mt, r as C, ac as N, A as gt, a as ft, b as xt, c as $t, d as vt, e as yt, f as bt, g as kt, ai as wt, O as $e, aA as H, L as jt, aN as Ct, Y as E, a5 as Bt, aO as L, aP as St, E as ee, t as ve, q as ye, s as be, z as Dt, aQ as It, aR as ke, aS as _t, aT as At, F as Nt, aU as Et, a1 as Mt, aV as Tt, S as we } from "./index-UHaqEdws.js";
8
+ import { v as fe, B as U, V as xe, aB as st, aC as ot, aD as nt, aE as rt, aF as it, N as V, ab as at, h as W, aG as lt, aH as ct, aI as dt, aJ as pt, aK as ut, aL as ht, aM as mt, r as C, ac as A, A as gt, a as ft, b as xt, c as $t, d as vt, e as yt, f as bt, g as kt, ai as wt, O as $e, aA as H, L as jt, aN as Ct, Y as M, a5 as Bt, aO as L, aP as St, E as ee, t as ve, q as ye, s as be, z as Dt, aQ as It, aR as ke, aS as _t, aT as Nt, F as At, aU as Mt, a1 as Et, aV as Tt, S as we } from "./index-HiiWSXkE.js";
9
9
  import { useTranslation as q } from "react-i18next";
10
10
  import { useAtom as k } from "jotai";
11
11
  import ae from "react-dom";
@@ -15,7 +15,7 @@ import { useFeature as je } from "flagged";
15
15
  import { flip as Rt } from "@floating-ui/dom";
16
16
  import { useFloating as Ft, shift as Pt } from "@floating-ui/react-dom";
17
17
  import { useResizeObserver as Ot } from "@react-hookz/web";
18
- import { tailwindcssPaletteGenerator as Ht } from "@bobthered/tailwindcss-palette-generator";
18
+ import Ht from "tailwindcss-palette-generator";
19
19
  import zt from "@tailwindcss/typography";
20
20
  import Ut from "@tailwindcss/forms";
21
21
  import Wt from "@tailwindcss/aspect-ratio";
@@ -23,8 +23,8 @@ import { Provider as qt } from "react-wrap-balancer";
23
23
  import { twMerge as Kt } from "tailwind-merge";
24
24
  import { S as le, a as Ce } from "./STRINGS--j49GZJP.js";
25
25
  import { getBlockComponent as Yt } from "@chaibuilder/runtime";
26
- import { u as Jt, B as Qt, E as Zt } from "./index-0QJwevON.js";
27
- import { u as Gt } from "./useCanvasSettings-R6br4J9i.js";
26
+ import { u as Jt, B as Qt, E as Zt } from "./index-FVtnWx9d.js";
27
+ import { u as Gt } from "./useCanvasSettings-unTQUdlP.js";
28
28
  import "./_commonjsHelpers-UyOWmZb0.js";
29
29
  import "./Functions-7jnEwJyw.js";
30
30
  import "clsx";
@@ -208,7 +208,7 @@ const ce = ({ landscape: n = !1 }) => /* @__PURE__ */ r.jsxs(
208
208
  ] })
209
209
  ] });
210
210
  }, ss = () => {
211
- const { t: n } = q(), { setNewBlocks: o } = mt(), [, e] = C(), [, t] = N(), s = P(() => {
211
+ const { t: n } = q(), { setNewBlocks: o } = mt(), [, e] = C(), [, t] = A(), s = P(() => {
212
212
  o([]), e([]), t([]);
213
213
  }, [o]);
214
214
  return /* @__PURE__ */ r.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ r.jsxs(gt, { children: [
@@ -330,7 +330,7 @@ const ce = ({ landscape: n = !1 }) => /* @__PURE__ */ r.jsxs(
330
330
  let Be, Se;
331
331
  typeof document < "u" && (Be = document);
332
332
  typeof window < "u" && (Se = window);
333
- const De = A.createContext({ document: Be, window: Se }), K = () => A.useContext(De), { Provider: is, Consumer: Eo } = De;
333
+ const De = N.createContext({ document: Be, window: Se }), K = () => N.useContext(De), { Provider: is, Consumer: Mo } = De;
334
334
  class Ie extends ue {
335
335
  componentDidMount() {
336
336
  this.props.contentDidMount();
@@ -363,7 +363,7 @@ class Z extends ue {
363
363
  _(this, "loadCheck", () => setInterval(() => {
364
364
  this.handleLoad();
365
365
  }, 500));
366
- this._isMounted = !1, this.nodeRef = A.createRef(), this.state = { iframeLoaded: !1 };
366
+ this._isMounted = !1, this.nodeRef = N.createRef(), this.state = { iframeLoaded: !1 };
367
367
  }
368
368
  componentDidMount() {
369
369
  this._isMounted = !0, this.getDoc() && this.nodeRef.current.contentWindow.addEventListener("DOMContentLoaded", this.handleLoad);
@@ -421,7 +421,7 @@ _(Z, "propTypes", {
421
421
  },
422
422
  initialContent: '<!DOCTYPE html><html><head></head><body><div class="frame-root"></div></body></html>'
423
423
  });
424
- const as = A.forwardRef((n, o) => /* @__PURE__ */ r.jsx(Z, { ...n, forwardedRef: o })), ls = () => {
424
+ const as = N.forwardRef((n, o) => /* @__PURE__ */ r.jsx(Z, { ...n, forwardedRef: o })), ls = () => {
425
425
  const { addCoreBlock: n } = jt(), o = W("getExternalPredefinedBlock", T);
426
426
  return P(
427
427
  async (e) => {
@@ -450,7 +450,7 @@ const pe = (n, o, e) => {
450
450
  );
451
451
  _e = O.indexOf(c), o === "vertical" ? (s.style.top = n.offsetTop + c + "px", s.style.left = n.offsetLeft + d + "px") : (s.style.top = n.offsetTop + a + "px", s.style.left = n.offsetLeft + c + "px");
452
452
  }, ds = (n) => {
453
- const o = Ae(n), e = window.getComputedStyle(n), t = o === "horizontal", s = parseInt(e.paddingLeft), d = parseInt(e.paddingTop);
453
+ const o = Ne(n), e = window.getComputedStyle(n), t = o === "horizontal", s = parseInt(e.paddingLeft), d = parseInt(e.paddingTop);
454
454
  let a = t ? s : d;
455
455
  O = [a], Array.from(n.children).forEach((i) => {
456
456
  const l = window.getComputedStyle(i), c = parseInt(
@@ -459,7 +459,7 @@ const pe = (n, o, e) => {
459
459
  O.push(a + p + c), a += p + c;
460
460
  });
461
461
  };
462
- function Ae(n) {
462
+ function Ne(n) {
463
463
  const o = window.getComputedStyle(n).display, e = window.getComputedStyle(n).flexDirection;
464
464
  if (o === "flex")
465
465
  return e === "column" || e === "column-reverse" ? "vertical" : "horizontal";
@@ -473,7 +473,7 @@ function Ae(n) {
473
473
  return o === "block" ? "vertical" : "horizontal";
474
474
  }
475
475
  const ps = me((n) => {
476
- const o = n.target, e = Ae(o);
476
+ const o = n.target, e = Ne(o);
477
477
  if (e === "vertical") {
478
478
  const t = n.clientY - o.offsetTop;
479
479
  pe(o, e, t);
@@ -489,7 +489,7 @@ function J() {
489
489
  n.style.display = "none";
490
490
  }
491
491
  const hs = () => {
492
- const { document: n } = K(), [o, e] = k(Ct), t = ls(), s = je("dnd"), [, d] = E(), [, a] = C();
492
+ const { document: n } = K(), [o, e] = k(Ct), t = ls(), s = je("dnd"), [, d] = M(), [, a] = C();
493
493
  return B = n, {
494
494
  isDragging: o,
495
495
  "data-dnd": "branch",
@@ -526,7 +526,7 @@ function ms(n) {
526
526
  o && o.parentNode.removeChild(o), n = null;
527
527
  }
528
528
  const gs = () => {
529
- const n = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], o = Bt(), [, e] = E(), [t, s] = k(L);
529
+ const n = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], o = Bt(), [, e] = M(), [t, s] = k(L);
530
530
  return (d) => {
531
531
  var m;
532
532
  if (t)
@@ -546,7 +546,7 @@ const gs = () => {
546
546
  l.addEventListener("blur", p, !0), c.focus(), (m = l.querySelector(".ql-clipboard")) == null || m.remove(), s(a.getAttribute("data-block-id"));
547
547
  };
548
548
  }, fs = () => {
549
- const [, n] = N(), [, o] = C(), [, e] = E(), [t] = k(L), [s] = k(St);
549
+ const [, n] = A(), [, o] = C(), [, e] = M(), [t] = k(L), [s] = k(St);
550
550
  return (d) => {
551
551
  if (t)
552
552
  return;
@@ -567,17 +567,17 @@ const gs = () => {
567
567
  const e = te(n.target);
568
568
  e != null && e.getAttribute("data-style-id") && o(e.getAttribute("data-style-id"));
569
569
  }, 100), $s = () => {
570
- const [, n] = E(), [o] = k(L);
570
+ const [, n] = M(), [o] = k(L);
571
571
  return (e) => {
572
572
  o || xs(e, n);
573
573
  };
574
574
  }, vs = ({ children: n }) => {
575
- const { document: o } = K(), [e] = C(), [t, s] = N();
575
+ const { document: o } = K(), [e] = C(), [t, s] = A();
576
576
  b(() => {
577
577
  setTimeout(() => {
578
578
  if (!S(t))
579
579
  return;
580
- const c = Ne(o, z(e));
580
+ const c = Ae(o, z(e));
581
581
  if (c) {
582
582
  const p = c.getAttribute("data-style-prop");
583
583
  if (p) {
@@ -601,11 +601,11 @@ const gs = () => {
601
601
  children: n
602
602
  }
603
603
  );
604
- }, Ne = (n, o) => n.querySelector(`[data-block-id="${o}"]`), ys = () => {
605
- const { window: n } = K(), [o, e] = C(), [t] = ee(), [, s] = N(), { undo: d, redo: a } = fe(), i = ve(), [, l] = ye(), c = be(), { savePage: p } = Dt(), [m] = k(L), [, h] = k(It), v = (g) => {
604
+ }, Ae = (n, o) => n.querySelector(`[data-block-id="${o}"]`), ys = () => {
605
+ const { window: n } = K(), [o, e] = C(), [t] = ee(), [, s] = A(), { undo: d, redo: a } = fe(), i = ve(), [, l] = ye(), c = be(), { savePage: p } = Dt(), [m] = k(L), [, h] = k(It), $ = (g) => {
606
606
  g.key === "Enter" && (g.preventDefault(), o.length === 1 && h(z(o)));
607
607
  }, w = (g) => {
608
- const u = t.find(($) => $._id === g);
608
+ const u = t.find((v) => v._id === g);
609
609
  return u ? u._parent : null;
610
610
  };
611
611
  return b(() => {
@@ -614,11 +614,11 @@ const gs = () => {
614
614
  e([]), s([]);
615
615
  return;
616
616
  }
617
- if (v(u), !m && (u.key === "Delete" || u.key === "Backspace") && (u.preventDefault(), c(o)), u.ctrlKey || u.metaKey) {
617
+ if ($(u), !m && (u.key === "Delete" || u.key === "Backspace") && (u.preventDefault(), c(o)), u.ctrlKey || u.metaKey) {
618
618
  if (u.key === "ArrowUp") {
619
619
  u.preventDefault();
620
- const $ = o.length > 0 ? w(o[0]) : null;
621
- $ && e([$]);
620
+ const v = o.length > 0 ? w(o[0]) : null;
621
+ v && e([v]);
622
622
  }
623
623
  if (["z", "y", "d", "x", "c", "p", "s", "v"].includes(u.key)) {
624
624
  if (m && ["x", "z", "v"].includes(u.key))
@@ -633,7 +633,7 @@ const gs = () => {
633
633
  };
634
634
  }, [o, e, d, c, l, a, i, m, p, n]), null;
635
635
  }, bs = ({ block: n, label: o }) => {
636
- const [, e] = C(), [, t] = E(), [, s] = k(ke), d = je("dnd");
636
+ const [, e] = C(), [, t] = M(), [, s] = k(ke), d = je("dnd");
637
637
  return /* @__PURE__ */ r.jsxs(
638
638
  "div",
639
639
  {
@@ -651,7 +651,7 @@ const gs = () => {
651
651
  }
652
652
  );
653
653
  }, ks = ({ selectedBlockElement: n, block: o }) => {
654
- const e = be(), t = ve(), [, s] = C(), [, d] = N(), [a] = k(L), { floatingStyles: i, refs: l, update: c } = Ft({
654
+ const e = be(), t = ve(), [, s] = C(), [, d] = A(), [a] = k(L), { floatingStyles: i, refs: l, update: c } = Ft({
655
655
  placement: "top-start",
656
656
  middleware: [Pt(), Rt()],
657
657
  elements: {
@@ -685,7 +685,7 @@ const gs = () => {
685
685
  }
686
686
  ),
687
687
  _t(f(o, "_type", "")) ? /* @__PURE__ */ r.jsx(et, { className: "hover:scale-105", onClick: () => t([o == null ? void 0 : o._id]) }) : null,
688
- At(f(o, "_type", "")) ? /* @__PURE__ */ r.jsx(tt, { className: "hover:scale-105", onClick: () => e([o == null ? void 0 : o._id]) }) : null
688
+ Nt(f(o, "_type", "")) ? /* @__PURE__ */ r.jsx(tt, { className: "hover:scale-105", onClick: () => e([o == null ? void 0 : o._id]) }) : null
689
689
  ] })
690
690
  ]
691
691
  }
@@ -944,7 +944,7 @@ const gs = () => {
944
944
  e(({ className: s }) => `.auto .${o(`hs-auto-mode-active${t}${s}`)}`);
945
945
  });
946
946
  }, js = ({ model: n }) => {
947
- const [o] = Nt(), [e] = C(), [t] = xe(), [s] = E(), [d] = N(), [a] = k(ke), { document: i, window: l } = K(), [c] = j(i == null ? void 0 : i.getElementById("highlighted-block")), [p] = j(
947
+ const [o] = At(), [e] = C(), [t] = xe(), [s] = M(), [d] = A(), [a] = k(ke), { document: i, window: l } = K(), [c] = j(i == null ? void 0 : i.getElementById("highlighted-block")), [p] = j(
948
948
  i == null ? void 0 : i.getElementById("selected-block")
949
949
  ), [m] = j(
950
950
  i == null ? void 0 : i.getElementById("selected-styling-block")
@@ -952,31 +952,31 @@ const gs = () => {
952
952
  b(() => {
953
953
  t ? i == null || i.documentElement.classList.add("dark") : i == null || i.documentElement.classList.remove("dark");
954
954
  }, [t, i]);
955
- const v = f(o, "headingFont", "DM Sans"), w = f(o, "bodyFont", "DM Sans");
955
+ const $ = f(o, "headingFont", "DM Sans"), w = f(o, "bodyFont", "DM Sans");
956
956
  return b(() => {
957
- const g = f(o, "primaryColor", "#000"), u = f(o, "secondaryColor", "#FFF"), $ = Ht({
958
- colors: [g, u],
959
- names: ["primary", "secondary"]
960
- });
961
- $.primary.DEFAULT = g, $.secondary.DEFAULT = u;
962
- const M = f(o, "roundedCorners", "0");
963
- !l || !l.tailwind || (l.tailwind.config = {
957
+ if (!l || !l.tailwind)
958
+ return;
959
+ const g = f(o, "primaryColor", "#000"), u = f(o, "secondaryColor", "#FFF"), v = Ht([
960
+ { color: g, name: "primary" },
961
+ { color: u, name: "secondary" }
962
+ ]), E = f(o, "roundedCorners", "0");
963
+ l.tailwind.config = {
964
964
  darkMode: "class",
965
965
  theme: {
966
966
  fontFamily: {
967
- heading: [v],
967
+ heading: [$],
968
968
  body: [w]
969
969
  },
970
970
  extend: {
971
971
  borderRadius: {
972
- global: `${M || "0"}px`
972
+ global: `${E || "0"}px`
973
973
  },
974
- colors: $
974
+ colors: v
975
975
  }
976
976
  },
977
977
  plugins: [zt, Ut, Wt, l.tailwind.plugin.withOptions(() => ws)]
978
- });
979
- }, [o, l, v, w]), b(() => {
978
+ };
979
+ }, [o, l, $, w]), b(() => {
980
980
  p && (p.textContent = `${F(e, (g) => `[data-block-id="${g}"]`).join(",")}{
981
981
  outline: 1px solid ${e.length === 1 ? "#42a1fc" : "orange"} !important; outline-offset: -1px;
982
982
  }`);
@@ -993,23 +993,23 @@ const gs = () => {
993
993
  outline: 1px solid #42a1fc !important; outline-offset: -1px;
994
994
  }`);
995
995
  }, [d, m]), b(() => {
996
- const g = f(o, "bodyTextLightColor", "#64748b"), u = f(o, "bodyTextDarkColor", "#94a3b8"), $ = f(o, "bodyBgLightColor", "#FFFFFF"), M = f(o, "bodyBgDarkColor", "#0f172a");
997
- i.body.className = `font-body antialiased text-[${g}] bg-[${$}] dark:text-[${u}] dark:bg-[${M}]`;
996
+ const g = f(o, "bodyTextLightColor", "#64748b"), u = f(o, "bodyTextDarkColor", "#94a3b8"), v = f(o, "bodyBgLightColor", "#FFFFFF"), E = f(o, "bodyBgDarkColor", "#0f172a");
997
+ i.body.className = `font-body antialiased text-[${g}] bg-[${v}] dark:text-[${u}] dark:bg-[${E}]`;
998
998
  }, [o, i, n]), n === "page" ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
999
- v && /* @__PURE__ */ r.jsx(
999
+ $ && /* @__PURE__ */ r.jsx(
1000
1000
  "link",
1001
1001
  {
1002
1002
  id: "heading-font",
1003
1003
  rel: "stylesheet",
1004
1004
  type: "text/css",
1005
- href: `https://fonts.googleapis.com/css2?family=${v.replace(
1005
+ href: `https://fonts.googleapis.com/css2?family=${$.replace(
1006
1006
  / /g,
1007
1007
  "+"
1008
1008
  )}:wght@300;400;500;600;700;800;900&display=swap`,
1009
1009
  media: "all"
1010
1010
  }
1011
1011
  ),
1012
- w && v !== w && /* @__PURE__ */ r.jsx(
1012
+ w && $ !== w && /* @__PURE__ */ r.jsx(
1013
1013
  "link",
1014
1014
  {
1015
1015
  id: "body-font",
@@ -1022,7 +1022,7 @@ const gs = () => {
1022
1022
  media: "all"
1023
1023
  }
1024
1024
  ),
1025
- v && /* @__PURE__ */ r.jsx("style", { children: `h1,h2,h3,h4,h5,h6{font-family: "${v}",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";}` })
1025
+ $ && /* @__PURE__ */ r.jsx("style", { children: `h1,h2,h3,h4,h5,h6{font-family: "${$}",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";}` })
1026
1026
  ] }) : null;
1027
1027
  }, Cs = (n) => {
1028
1028
  const o = {};
@@ -1065,23 +1065,23 @@ function G({ blocks: n }) {
1065
1065
  }, {}),
1066
1066
  [e, o]
1067
1067
  );
1068
- return /* @__PURE__ */ r.jsx(r.Fragment, { children: A.Children.toArray(
1068
+ return /* @__PURE__ */ r.jsx(r.Fragment, { children: N.Children.toArray(
1069
1069
  n.map((i, l) => {
1070
1070
  if (d === i._id)
1071
1071
  return null;
1072
1072
  const c = Cs(i), p = {};
1073
1073
  S(c) || Object.keys(c).forEach((u) => {
1074
- p[u] = A.Children.toArray(
1075
- c[u].map(($) => /* @__PURE__ */ r.jsx(G, { blocks: [qe(o, { _id: $ })] }))
1074
+ p[u] = N.Children.toArray(
1075
+ c[u].map((v) => /* @__PURE__ */ r.jsx(G, { blocks: [qe(o, { _id: v })] }))
1076
1076
  );
1077
1077
  });
1078
1078
  const m = ge(o, { _parent: i._id });
1079
1079
  p.children = m.length ? /* @__PURE__ */ r.jsx(G, { blocks: m }) : null;
1080
- const h = Yt(i._type), v = f(h, "builderComponent", f(h, "component", null));
1081
- if (Ke(v))
1080
+ const h = Yt(i._type), $ = f(h, "builderComponent", f(h, "component", null));
1081
+ if (Ke($))
1082
1082
  return /* @__PURE__ */ r.jsx("noscript", { children: `<!-- ${i == null ? void 0 : i._type} not registered -->` });
1083
1083
  const w = Q(h, "getBlockStateFrom") ? h == null ? void 0 : h.getBlockStateFrom(i, o) : [], g = a(w);
1084
- return /* @__PURE__ */ r.jsx(he, { children: A.createElement(v, {
1084
+ return /* @__PURE__ */ r.jsx(he, { children: N.createElement($, {
1085
1085
  blockProps: {
1086
1086
  "data-block-id": i._id,
1087
1087
  "data-block-type": i._type,
@@ -1100,32 +1100,32 @@ function G({ blocks: n }) {
1100
1100
  const _s = () => {
1101
1101
  const [n] = ee(), o = S(n) ? null : /* @__PURE__ */ r.jsx(Qt, { children: /* @__PURE__ */ r.jsx(G, { blocks: ge(n, (e) => S(e._parent)) }) });
1102
1102
  return /* @__PURE__ */ r.jsx(qt, { children: o });
1103
- }, As = (n, o) => n.querySelector(`[data-style-id="${o}"]`), Ns = () => {
1104
- const [n] = k(Et), [o] = ye(), [e] = V(), [, t] = C(), s = Mt(), [, d] = E(), a = oe(null), i = oe(null), [l, c] = j({ width: 0, height: 0 }), p = rs(l), [m, h] = j(0), [v, w] = j([]), [, g] = j([]), [, u] = k(Tt), [$, M] = N(), Ee = W("loading", !1);
1103
+ }, Ns = (n, o) => n.querySelector(`[data-style-id="${o}"]`), As = () => {
1104
+ const [n] = k(Mt), [o] = ye(), [e] = V(), [, t] = C(), s = Et(), [, d] = M(), a = oe(null), i = oe(null), [l, c] = j({ width: 0, height: 0 }), p = rs(l), [m, h] = j(0), [$, w] = j([]), [, g] = j([]), [, u] = k(Tt), [v, E] = A(), Me = W("loading", !1);
1105
1105
  b(() => {
1106
1106
  const { clientWidth: x, clientHeight: D } = i.current;
1107
1107
  c({ width: x, height: D }), m === 0 && h(x);
1108
1108
  }, [i, e, m]);
1109
- const Me = (x, D = 0) => {
1109
+ const Ee = (x, D = 0) => {
1110
1110
  const { top: I } = x.getBoundingClientRect();
1111
1111
  return I + D >= 0 && I - D <= window.innerHeight;
1112
1112
  };
1113
1113
  b(() => {
1114
1114
  var x, D;
1115
1115
  if (s && s.type !== "Multiple" && a.current) {
1116
- const I = Ne(a.current.contentDocument, s._id);
1117
- I && (Me(I) || (D = (x = a.current) == null ? void 0 : x.contentWindow) == null || D.scrollTo({ top: I.offsetTop, behavior: "smooth" }), w([I]));
1116
+ const I = Ae(a.current.contentDocument, s._id);
1117
+ I && (Ee(I) || (D = (x = a.current) == null ? void 0 : x.contentWindow) == null || D.scrollTo({ top: I.offsetTop, behavior: "smooth" }), w([I]));
1118
1118
  }
1119
1119
  }, [s]), b(() => {
1120
- if (!S($) && a.current) {
1121
- const x = As(
1120
+ if (!S(v) && a.current) {
1121
+ const x = Ns(
1122
1122
  a.current.contentDocument,
1123
- z($).id
1123
+ z(v).id
1124
1124
  );
1125
1125
  g(x ? [x] : [null]);
1126
1126
  } else
1127
1127
  g([null]);
1128
- }, [$]);
1128
+ }, [v]);
1129
1129
  const Te = Pe(() => {
1130
1130
  let x = ns;
1131
1131
  return n === "offline" && (x = x.replace(
@@ -1137,7 +1137,7 @@ const _s = () => {
1137
1137
  "div",
1138
1138
  {
1139
1139
  onClick: () => {
1140
- t([]), M([]);
1140
+ t([]), E([]);
1141
1141
  },
1142
1142
  onMouseLeave: () => setTimeout(() => d(""), 300),
1143
1143
  className: "relative mx-auto h-full w-full overflow-hidden",
@@ -1158,11 +1158,11 @@ const _s = () => {
1158
1158
  ks,
1159
1159
  {
1160
1160
  block: s,
1161
- selectedBlockElement: z(v)
1161
+ selectedBlockElement: z($)
1162
1162
  }
1163
1163
  ),
1164
1164
  /* @__PURE__ */ r.jsx(js, { model: "page" }),
1165
- /* @__PURE__ */ r.jsx(vs, { children: Ee ? /* @__PURE__ */ r.jsx("div", { className: "h-full p-4", children: /* @__PURE__ */ r.jsx(we, { className: "h-full" }) }) : /* @__PURE__ */ r.jsx(_s, {}) }),
1165
+ /* @__PURE__ */ r.jsx(vs, { children: Me ? /* @__PURE__ */ r.jsx("div", { className: "h-full p-4", children: /* @__PURE__ */ r.jsx(we, { className: "h-full" }) }) : /* @__PURE__ */ r.jsx(_s, {}) }),
1166
1166
  /* @__PURE__ */ r.jsx("br", {}),
1167
1167
  /* @__PURE__ */ r.jsx("div", { id: "placeholder", className: "absolute z-[99999] max-w-full bg-green-500 transition-transform" })
1168
1168
  ]
@@ -1170,10 +1170,10 @@ const _s = () => {
1170
1170
  )
1171
1171
  }
1172
1172
  );
1173
- }, Mo = () => /* @__PURE__ */ r.jsxs("div", { className: "flex h-full w-full flex-col", children: [
1173
+ }, Eo = () => /* @__PURE__ */ r.jsxs("div", { className: "flex h-full w-full flex-col", children: [
1174
1174
  /* @__PURE__ */ r.jsx(os, {}),
1175
- /* @__PURE__ */ r.jsx("div", { className: "relative h-full overflow-hidden bg-slate-800/90 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] px-2", children: /* @__PURE__ */ r.jsx(he, { fallback: /* @__PURE__ */ r.jsx(we, { className: "h-full" }), children: /* @__PURE__ */ r.jsx(Zt, { children: /* @__PURE__ */ r.jsx(Ns, {}) }) }) })
1175
+ /* @__PURE__ */ r.jsx("div", { className: "relative h-full overflow-hidden bg-slate-800/90 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] px-2", children: /* @__PURE__ */ r.jsx(he, { fallback: /* @__PURE__ */ r.jsx(we, { className: "h-full" }), children: /* @__PURE__ */ r.jsx(Zt, { children: /* @__PURE__ */ r.jsx(As, {}) }) }) })
1176
1176
  ] });
1177
1177
  export {
1178
- Mo as default
1178
+ Eo as default
1179
1179
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),s=require("./index-12HbDLon.cjs"),i=require("lodash-es"),j=require("sonner"),l=require("react"),o=require("./index-KArv7pNz.cjs"),p=require("lucide-react"),f=require("react-i18next");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("./Functions-N3yhPYKY.cjs");require("clsx");require("tailwind-merge");require("@chaibuilder/runtime");require("jotai");require("./STRINGS-gPz7CUOk.cjs");require("@react-hookz/web");require("./MODIFIERS-YPHRtwrM.cjs");require("./Class-Zc8hpE7f.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-icons");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-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("./index-mlMvwv2b.cjs");require("i18next");require("@floating-ui/react-dom");require("flagged");require("react-hotkeys-hook");require("./html-to-json-vP1ESB_e.cjs");require("himalaya");require("./index-ecnGWzh9.cjs");const E=()=>{const{data:t}=o.useProject(),{data:u,isLoading:x}=o.usePages(),{saveState:d}=s.useSavePage(),m=o.useChangePage(),{t:q}=f.useTranslation(),[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 g=r=>{if(d!=="SAVED")j.toast.error(q("You have unsaved changes. Please save before changing the page."));else{const h=i.find(c,{uuid:r});m(h)}};return x||i.isEmpty(n)?null:e.jsxRuntimeExports.jsx("nav",{className:"flex rounded-lg border border-gray-200 bg-gray-50 px-3 py-1 pr-0 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(p.BriefcaseIcon,{className:"mr-2 h-4 w-4"}),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:g,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=E;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),s=require("./index-12HbDLon.cjs"),i=require("lodash-es"),j=require("sonner"),l=require("react"),o=require("./index-B1EMostm.cjs"),p=require("lucide-react"),f=require("react-i18next");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("./Functions-N3yhPYKY.cjs");require("clsx");require("tailwind-merge");require("@chaibuilder/runtime");require("jotai");require("./STRINGS-gPz7CUOk.cjs");require("@react-hookz/web");require("./MODIFIERS-YPHRtwrM.cjs");require("./Class-Zc8hpE7f.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-icons");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-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("./index-tFX6mX_R.cjs");require("i18next");require("@floating-ui/react-dom");require("flagged");require("react-hotkeys-hook");require("./html-to-json-Xhu27KFD.cjs");require("himalaya");require("./index-ecnGWzh9.cjs");const E=()=>{const{data:t}=o.useProject(),{data:u,isLoading:x}=o.usePages(),{saveState:d}=s.useSavePage(),m=o.useChangePage(),{t:q}=f.useTranslation(),[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 g=r=>{if(d!=="SAVED")j.toast.error(q("You have unsaved changes. Please save before changing the page."));else{const h=i.find(c,{uuid:r});m(h)}};return x||i.isEmpty(n)?null:e.jsxRuntimeExports.jsx("nav",{className:"flex rounded-lg border border-gray-200 bg-gray-50 px-3 py-1 pr-0 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(p.BriefcaseIcon,{className:"mr-2 h-4 w-4"}),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:g,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=E;
@@ -1,9 +1,9 @@
1
1
  import { j as e } from "./jsx-runtime-WbnYoNE9.js";
2
- import { z as h, aj as f, ak as j, al as y, am as v, an as P } from "./index-UHaqEdws.js";
2
+ import { z as h, aj as f, ak as j, al as y, am as v, an as P } from "./index-HiiWSXkE.js";
3
3
  import { sortBy as b, filter as k, get as w, isEmpty as m, find as n, capitalize as C, map as N } from "lodash-es";
4
4
  import { toast as S } from "sonner";
5
5
  import { useEffect as p } from "react";
6
- import { a as B, u as E, c as T, d as z } from "./index-Eb5zyh2F.js";
6
+ import { a as B, u as E, c as T, d as z } from "./index-TXu6kBv9.js";
7
7
  import { BriefcaseIcon as I } from "lucide-react";
8
8
  import { useTranslation as L } from "react-i18next";
9
9
  import "./_commonjsHelpers-UyOWmZb0.js";
@@ -40,12 +40,12 @@ import "@radix-ui/react-context-menu";
40
40
  import "react-icons-picker";
41
41
  import "react-dom";
42
42
  import "react-quill";
43
- import "./index-0QJwevON.js";
43
+ import "./index-FVtnWx9d.js";
44
44
  import "i18next";
45
45
  import "@floating-ui/react-dom";
46
46
  import "flagged";
47
47
  import "react-hotkeys-hook";
48
- import "./html-to-json-LJyJsnmZ.js";
48
+ import "./html-to-json-ZV4QjSww.js";
49
49
  import "himalaya";
50
50
  import "./index-YpnaudSM.js";
51
51
  const Te = () => {
@@ -3,7 +3,7 @@ import _, { memo as b, useMemo as k, useCallback as z, useEffect as N, useRef as
3
3
  import { useAtom as C } from "jotai";
4
4
  import { useDebouncedCallback as R } from "@react-hookz/web";
5
5
  import { Tree as L } from "react-arborist";
6
- import { E as M, r as y, s as F, a1 as S, bx as P, aT as O, t as V, by as $, aS as U, bz as q, bA as G, h as K, Y as W, bB as v, ap as Y, aq as J, ar as Q, bC as X, a5 as Z, ac as ee, aM as te, aP as se } from "./index-UHaqEdws.js";
6
+ import { E as M, r as y, s as F, a1 as S, bx as P, aT as O, t as V, by as $, aS as U, bz as q, bA as G, h as K, Y as W, bB as v, ap as Y, aq as J, ar as Q, bC as X, a5 as Z, ac as ee, aM as te, aP as se } from "./index-HiiWSXkE.js";
7
7
  import { c as H } from "./Functions-7jnEwJyw.js";
8
8
  import { BoxModelIcon as re, BoxIcon as oe, DragHandleHorizontalIcon as ne, ViewHorizontalIcon as ce, BorderAllIcon as ae, BorderTopIcon as ie, TableIcon as le, DropdownMenuIcon as ue, RadiobuttonIcon as de, InputIcon as pe, ButtonIcon as B, CheckboxIcon as xe, GroupIcon as me, SpaceBetweenVerticallyIcon as he, ColumnsIcon as ge, RowsIcon as T, TextIcon as w, SketchLogoIcon as fe, DividerHorizontalIcon as je, CodeIcon as be, CursorTextIcon as ye, VideoIcon as ve, Link1Icon as Ie, HeadingIcon as ke, ImageIcon as Ce, TrashIcon as Be, CopyIcon as Te, TriangleRightIcon as we } from "@radix-ui/react-icons";
9
9
  import { DatabaseIcon as De } from "lucide-react";
@@ -1,12 +1,12 @@
1
1
  import { j as t } from "./jsx-runtime-WbnYoNE9.js";
2
2
  import i, { Suspense as s } from "react";
3
3
  import { sortBy as a, filter as d, get as n } from "lodash-es";
4
- import { u as l, a as c } from "./index-Eb5zyh2F.js";
4
+ import { u as l, a as c } from "./index-TXu6kBv9.js";
5
5
  import "./_commonjsHelpers-UyOWmZb0.js";
6
- import "./index-0QJwevON.js";
6
+ import "./index-FVtnWx9d.js";
7
7
  import "i18next";
8
8
  import "react-i18next";
9
- import "./index-UHaqEdws.js";
9
+ import "./index-HiiWSXkE.js";
10
10
  import "./Functions-7jnEwJyw.js";
11
11
  import "clsx";
12
12
  import "tailwind-merge";
@@ -44,11 +44,11 @@ import "@floating-ui/react-dom";
44
44
  import "flagged";
45
45
  import "react-hotkeys-hook";
46
46
  import "sonner";
47
- import "./html-to-json-LJyJsnmZ.js";
47
+ import "./html-to-json-ZV4QjSww.js";
48
48
  import "himalaya";
49
49
  import "lucide-react";
50
50
  import "./index-YpnaudSM.js";
51
- const x = i.lazy(() => import("./add-page-modal-4VrFvgEm.js")), u = i.lazy(() => import("./page-viewer-00Xx4u8e.js")), lt = () => {
51
+ const x = i.lazy(() => import("./add-page-modal-Q3c1EOw1.js")), u = i.lazy(() => import("./page-viewer-3UIfb9p1.js")), lt = () => {
52
52
  const { data: o = [], isLoading: m } = l(), { data: r } = c(), p = a(d(o, { type: "STATIC" }), (e) => n(e, "uuid") === (r == null ? void 0 : r.homepage) ? 0 : 1);
53
53
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
54
54
  /* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-between rounded-md bg-background/30 p-1", children: [
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),u=require("react"),i=require("lodash-es"),s=require("./index-KArv7pNz.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("./index-mlMvwv2b.cjs");require("i18next");require("react-i18next");require("./index-12HbDLon.cjs");require("./Functions-N3yhPYKY.cjs");require("clsx");require("tailwind-merge");require("@chaibuilder/runtime");require("jotai");require("./STRINGS-gPz7CUOk.cjs");require("@react-hookz/web");require("./MODIFIERS-YPHRtwrM.cjs");require("./Class-Zc8hpE7f.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-icons");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-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("@floating-ui/react-dom");require("flagged");require("react-hotkeys-hook");require("sonner");require("./html-to-json-vP1ESB_e.cjs");require("himalaya");require("lucide-react");require("./index-ecnGWzh9.cjs");const a=u.lazy(()=>Promise.resolve().then(()=>require("./add-page-modal-jWcp0w-S.cjs"))),x=u.lazy(()=>Promise.resolve().then(()=>require("./page-viewer-SZNm7b1n.cjs"))),d=()=>{const{data:t=[],isLoading:q}=s.usePages(),{data:r}=s.useProject(),n=i.sortBy(i.filter(t,{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:q,pages:n})})]})};exports.default=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),u=require("react"),i=require("lodash-es"),s=require("./index-B1EMostm.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("./index-tFX6mX_R.cjs");require("i18next");require("react-i18next");require("./index-12HbDLon.cjs");require("./Functions-N3yhPYKY.cjs");require("clsx");require("tailwind-merge");require("@chaibuilder/runtime");require("jotai");require("./STRINGS-gPz7CUOk.cjs");require("@react-hookz/web");require("./MODIFIERS-YPHRtwrM.cjs");require("./Class-Zc8hpE7f.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-icons");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-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("@floating-ui/react-dom");require("flagged");require("react-hotkeys-hook");require("sonner");require("./html-to-json-Xhu27KFD.cjs");require("himalaya");require("lucide-react");require("./index-ecnGWzh9.cjs");const a=u.lazy(()=>Promise.resolve().then(()=>require("./add-page-modal-PhWtC-ZY.cjs"))),x=u.lazy(()=>Promise.resolve().then(()=>require("./page-viewer-wVQGkDJd.cjs"))),d=()=>{const{data:t=[],isLoading:q}=s.usePages(),{data:r}=s.useProject(),n=i.sortBy(i.filter(t,{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:q,pages:n})})]})};exports.default=d;
@@ -1,8 +1,8 @@
1
1
  import { j as t } from "./jsx-runtime-WbnYoNE9.js";
2
2
  import m, { useRef as x, useEffect as a, Suspense as p } from "react";
3
3
  import { isEqual as b, isEmpty as j } from "lodash-es";
4
- import { bb as f, bc as n, bd as l, be as c } from "./index-UHaqEdws.js";
5
- import { b as h, a as g } from "./index-Eb5zyh2F.js";
4
+ import { bb as f, bc as n, bd as l, be as c } from "./index-HiiWSXkE.js";
5
+ import { b as h, a as g } from "./index-TXu6kBv9.js";
6
6
  import "./_commonjsHelpers-UyOWmZb0.js";
7
7
  import "./Functions-7jnEwJyw.js";
8
8
  import "clsx";
@@ -38,17 +38,17 @@ import "@radix-ui/react-context-menu";
38
38
  import "react-icons-picker";
39
39
  import "react-dom";
40
40
  import "react-quill";
41
- import "./index-0QJwevON.js";
41
+ import "./index-FVtnWx9d.js";
42
42
  import "i18next";
43
43
  import "@floating-ui/react-dom";
44
44
  import "flagged";
45
45
  import "react-hotkeys-hook";
46
46
  import "sonner";
47
- import "./html-to-json-LJyJsnmZ.js";
47
+ import "./html-to-json-ZV4QjSww.js";
48
48
  import "himalaya";
49
49
  import "lucide-react";
50
50
  import "./index-YpnaudSM.js";
51
- const N = m.lazy(() => import("./project-general-setting-asDxlmhZ.js")), S = m.lazy(() => import("./project-seo-setting-DuAaDfDR.js")), d = /* @__PURE__ */ t.jsx("div", { className: "px-3", children: /* @__PURE__ */ t.jsx("div", { className: "h-52 w-full animate-pulse rounded-md bg-gray-100" }) }), u = (e) => e && j(e.seoData) ? {
51
+ const N = m.lazy(() => import("./project-general-setting-8vqXfr75.js")), S = m.lazy(() => import("./project-seo-setting-x3peNgla.js")), d = /* @__PURE__ */ t.jsx("div", { className: "px-3", children: /* @__PURE__ */ t.jsx("div", { className: "h-52 w-full animate-pulse rounded-md bg-gray-100" }) }), u = (e) => e && j(e.seoData) ? {
52
52
  ...e,
53
53
  seoData: { title: "", description: "", image: "" }
54
54
  } : e;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),r=require("react"),x=require("lodash-es"),s=require("./index-12HbDLon.cjs"),a=require("./index-KArv7pNz.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("./Functions-N3yhPYKY.cjs");require("clsx");require("tailwind-merge");require("@chaibuilder/runtime");require("jotai");require("./STRINGS-gPz7CUOk.cjs");require("@react-hookz/web");require("./MODIFIERS-YPHRtwrM.cjs");require("./Class-Zc8hpE7f.cjs");require("react-i18next");require("@radix-ui/react-toggle");require("class-variance-authority");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-icons");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-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("./index-mlMvwv2b.cjs");require("i18next");require("@floating-ui/react-dom");require("flagged");require("react-hotkeys-hook");require("sonner");require("./html-to-json-vP1ESB_e.cjs");require("himalaya");require("lucide-react");require("./index-ecnGWzh9.cjs");const d=r.lazy(()=>Promise.resolve().then(()=>require("./project-general-setting-C_pHNuZE.cjs"))),m=r.lazy(()=>Promise.resolve().then(()=>require("./project-seo-setting-q2953ybQ.cjs"))),c=e.jsxRuntimeExports.jsx("div",{className:"px-3",children:e.jsxRuntimeExports.jsx("div",{className:"h-52 w-full animate-pulse rounded-md bg-gray-100"})}),l=t=>t&&x.isEmpty(t.seoData)?{...t,seoData:{title:"",description:"",image:""}}:t;function q(){const t=a.useUpdateProject(),{data:n}=a.useProject(),[i,o]=r.useState(l(n||{})),u=r.useRef(i);return r.useEffect(()=>()=>{x.isEqual(n,u.current)||t.mutate(u.current,{onSuccess:()=>o(u.current)})},[u]),r.useEffect(()=>{u.current=i},[i]),e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx("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:"Website Settings"})}),e.jsxRuntimeExports.jsx("hr",{className:"-mx-1"}),e.jsxRuntimeExports.jsx("div",{className:"-mx-1",children:e.jsxRuntimeExports.jsxs(s.Accordion,{type:"single",className:"w-full",defaultValue:"GENERAL",children:[e.jsxRuntimeExports.jsxs(s.AccordionItem,{value:"GENERAL",className:"border-b-2 border-slate-100 dark:border-slate-800",children:[e.jsxRuntimeExports.jsx(s.AccordionTrigger,{className:"bg-slate-200 px-2.5 py-1.5 font-medium hover:bg-slate-100 hover:no-underline dark:bg-slate-900 dark:hover:bg-slate-800",children:"General Settings"}),e.jsxRuntimeExports.jsx(s.AccordionContent,{className:"px-2 pt-4 text-sm",children:e.jsxRuntimeExports.jsx(r.Suspense,{fallback:c,children:e.jsxRuntimeExports.jsx(d,{_projectData:i,seany:o})})})]}),e.jsxRuntimeExports.jsxs(s.AccordionItem,{value:"SEO",className:"border-b-2 border-slate-100 dark:border-slate-800",children:[e.jsxRuntimeExports.jsx(s.AccordionTrigger,{className:"bg-slate-200 px-2.5 py-1.5 font-medium hover:bg-slate-100 hover:no-underline dark:bg-slate-900 dark:hover:bg-slate-800",children:"SEO Settings"}),e.jsxRuntimeExports.jsx(s.AccordionContent,{className:"px-1 pt-4 text-sm",children:e.jsxRuntimeExports.jsx(r.Suspense,{fallback:c,children:e.jsxRuntimeExports.jsx(m,{_projectData:i,seany:o})})})]})]})})]})}exports.default=q;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),r=require("react"),x=require("lodash-es"),s=require("./index-12HbDLon.cjs"),a=require("./index-B1EMostm.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("./Functions-N3yhPYKY.cjs");require("clsx");require("tailwind-merge");require("@chaibuilder/runtime");require("jotai");require("./STRINGS-gPz7CUOk.cjs");require("@react-hookz/web");require("./MODIFIERS-YPHRtwrM.cjs");require("./Class-Zc8hpE7f.cjs");require("react-i18next");require("@radix-ui/react-toggle");require("class-variance-authority");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-icons");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-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("./index-tFX6mX_R.cjs");require("i18next");require("@floating-ui/react-dom");require("flagged");require("react-hotkeys-hook");require("sonner");require("./html-to-json-Xhu27KFD.cjs");require("himalaya");require("lucide-react");require("./index-ecnGWzh9.cjs");const d=r.lazy(()=>Promise.resolve().then(()=>require("./project-general-setting-LrABWutT.cjs"))),m=r.lazy(()=>Promise.resolve().then(()=>require("./project-seo-setting-q2953ybQ.cjs"))),c=e.jsxRuntimeExports.jsx("div",{className:"px-3",children:e.jsxRuntimeExports.jsx("div",{className:"h-52 w-full animate-pulse rounded-md bg-gray-100"})}),l=t=>t&&x.isEmpty(t.seoData)?{...t,seoData:{title:"",description:"",image:""}}:t;function q(){const t=a.useUpdateProject(),{data:n}=a.useProject(),[i,o]=r.useState(l(n||{})),u=r.useRef(i);return r.useEffect(()=>()=>{x.isEqual(n,u.current)||t.mutate(u.current,{onSuccess:()=>o(u.current)})},[u]),r.useEffect(()=>{u.current=i},[i]),e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx("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:"Website Settings"})}),e.jsxRuntimeExports.jsx("hr",{className:"-mx-1"}),e.jsxRuntimeExports.jsx("div",{className:"-mx-1",children:e.jsxRuntimeExports.jsxs(s.Accordion,{type:"single",className:"w-full",defaultValue:"GENERAL",children:[e.jsxRuntimeExports.jsxs(s.AccordionItem,{value:"GENERAL",className:"border-b-2 border-slate-100 dark:border-slate-800",children:[e.jsxRuntimeExports.jsx(s.AccordionTrigger,{className:"bg-slate-200 px-2.5 py-1.5 font-medium hover:bg-slate-100 hover:no-underline dark:bg-slate-900 dark:hover:bg-slate-800",children:"General Settings"}),e.jsxRuntimeExports.jsx(s.AccordionContent,{className:"px-2 pt-4 text-sm",children:e.jsxRuntimeExports.jsx(r.Suspense,{fallback:c,children:e.jsxRuntimeExports.jsx(d,{_projectData:i,seany:o})})})]}),e.jsxRuntimeExports.jsxs(s.AccordionItem,{value:"SEO",className:"border-b-2 border-slate-100 dark:border-slate-800",children:[e.jsxRuntimeExports.jsx(s.AccordionTrigger,{className:"bg-slate-200 px-2.5 py-1.5 font-medium hover:bg-slate-100 hover:no-underline dark:bg-slate-900 dark:hover:bg-slate-800",children:"SEO Settings"}),e.jsxRuntimeExports.jsx(s.AccordionContent,{className:"px-1 pt-4 text-sm",children:e.jsxRuntimeExports.jsx(r.Suspense,{fallback:c,children:e.jsxRuntimeExports.jsx(m,{_projectData:i,seany:o})})})]})]})})]})}exports.default=q;