@chaibuilder/sdk 1.2.63 → 1.2.64

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 (54) hide show
  1. package/dist/AddBlocks-6dJmFSgk.js +142 -0
  2. package/dist/AddBlocks-doCNVVbk.cjs +1 -0
  3. package/dist/{CanvasArea-DvfLxy0w.js → CanvasArea-kB6ky_uL.js} +4 -4
  4. package/dist/{CanvasArea-hGLbDJlM.cjs → CanvasArea-kdnkFfKR.cjs} +1 -1
  5. package/dist/{CodeEditor-QPwyZNgA.js → CodeEditor-37od44Ou.js} +1 -1
  6. package/dist/{CurrentPage-fMCaBGwl.cjs → CurrentPage-Ekl5Cwbv.cjs} +1 -1
  7. package/dist/{CurrentPage-rOUX01kk.js → CurrentPage-bHq9Uusr.js} +3 -3
  8. package/dist/{PagesPanel-ZCZjs7Bi.cjs → PagesPanel-SMHrEmCb.cjs} +1 -1
  9. package/dist/{PagesPanel-6P4VkMP-.js → PagesPanel-wIPAyjJK.js} +4 -4
  10. package/dist/{ProjectPanel-Cn3teDRW.js → ProjectPanel-L-SlDizV.js} +4 -4
  11. package/dist/{ProjectPanel-XSVWRr6v.cjs → ProjectPanel-YruLal65.cjs} +1 -1
  12. package/dist/{Settings-dbB2VPAj.js → Settings-WXkCyhAv.js} +16 -14
  13. package/dist/{Settings-Amh8Mtm7.cjs → Settings-_5VHcgFC.cjs} +1 -1
  14. package/dist/{SidePanels-_Im6sF4f.js → SidePanels-UQj0XTnb.js} +72 -72
  15. package/dist/{SidePanels-5adH7U3T.cjs → SidePanels-UeIZB3e1.cjs} +1 -1
  16. package/dist/{StaticCanvas-goU42OMU.js → StaticCanvas-7C52tXAv.js} +42 -42
  17. package/dist/{StaticCanvas-fDhBK35X.cjs → StaticCanvas-ll9VTXI5.cjs} +1 -1
  18. package/dist/ThemeConfigPanel-_86vVxLz.cjs +1 -0
  19. package/dist/{ThemeConfigPanel-aEN4tTYi.js → ThemeConfigPanel-gw8B2zvx.js} +59 -56
  20. package/dist/{Topbar-SuY-S0im.js → Topbar-1O05wogM.js} +2 -2
  21. package/dist/{Topbar-ag6qdgbe.cjs → Topbar-gb17oHdJ.cjs} +1 -1
  22. package/dist/{UILibrariesPanel-RI9mo293.js → UILibrariesPanel-vshiYI6G.js} +18 -18
  23. package/dist/{UnsplashImages-dasLGrBn.js → UnsplashImages-Eq7hprBO.js} +5 -5
  24. package/dist/{UploadImages-Gh2AQpk1.js → UploadImages-lco2Tea3.js} +7 -7
  25. package/dist/{add-page-modal-zCiyvKEa.js → add-page-modal-qr7rvJzN.js} +6 -6
  26. package/dist/{add-page-modal-80cVOM7i.cjs → add-page-modal-rOKavDFX.cjs} +1 -1
  27. package/dist/{confirm-alert-9XYi0a4k.js → confirm-alert-P6TAevaP.js} +1 -1
  28. package/dist/core.cjs +1 -1
  29. package/dist/core.d.ts +6 -2
  30. package/dist/core.js +15 -15
  31. package/dist/{delete-page-modal-pzagU_6y.js → delete-page-modal-55oioI9i.js} +3 -3
  32. package/dist/{delete-page-modal-foPRP--l.cjs → delete-page-modal-wdAiMVnL.cjs} +1 -1
  33. package/dist/email.cjs +1 -1
  34. package/dist/email.js +2 -2
  35. package/dist/{form-EjiQiiEY.js → form-5ke_lZv8.js} +1 -1
  36. package/dist/{index-DzAuS11k.cjs → index-6w-6HYBd.cjs} +1 -1
  37. package/dist/{index-BbW1Uw_k.cjs → index-audsIPBC.cjs} +1 -1
  38. package/dist/{index-bscJUvUx.js → index-b33n_-zO.js} +60 -60
  39. package/dist/{index-qSbpzIA4.js → index-fnkMn4Pk.js} +3 -3
  40. package/dist/{index-EEcKvBh3.js → index-wRAIA8zZ.js} +5 -5
  41. package/dist/{page-viewer-Z1wXyzzc.js → page-viewer-t44DP65U.js} +9 -9
  42. package/dist/{page-viewer-XFTCHu_2.cjs → page-viewer-wU7T0f48.cjs} +1 -1
  43. package/dist/{project-general-setting-HV3X_wHI.cjs → project-general-setting-87cX9vvO.cjs} +1 -1
  44. package/dist/{project-general-setting-5B7s5swF.js → project-general-setting-NEkNjf7V.js} +4 -4
  45. package/dist/{project-seo-setting-aAGnwBrw.js → project-seo-setting-YmspOYsF.js} +2 -2
  46. package/dist/{single-page-detail-6C1WP3s5.cjs → single-page-detail-27UjWK8L.cjs} +1 -1
  47. package/dist/{single-page-detail-Yr0EbBJJ.js → single-page-detail-jHzoDP7B.js} +10 -10
  48. package/dist/studio.cjs +1 -1
  49. package/dist/studio.js +3 -3
  50. package/dist/ui.js +10 -10
  51. package/package.json +1 -1
  52. package/dist/AddBlocks-4wpxOF2K.cjs +0 -1
  53. package/dist/AddBlocks-ChNxwRrx.js +0 -142
  54. package/dist/ThemeConfigPanel-N6l317II.cjs +0 -1
@@ -1,16 +1,16 @@
1
1
  var kt = Object.defineProperty;
2
2
  var wt = (n, e, t) => e in n ? kt(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
- var j = (n, e, t) => (wt(n, typeof e != "symbol" ? e + "" : e, t), t);
3
+ var M = (n, e, t) => (wt(n, typeof e != "symbol" ? e + "" : e, t), t);
4
4
  import { j as d } from "./jsx-runtime-WbnYoNE9.js";
5
5
  import L, { useState as A, useCallback as Y, useEffect as S, Component as ct, Children as Ct, Suspense as St, useRef as et, useMemo as It } from "react";
6
6
  import { throttle as dt, has as N, isEmpty as T, first as V, omit as pt, pick as Bt, get as f, map as nt, isString as J, memoize as _t, each as At, find as Dt, filter as ut, isNull as Tt } from "lodash-es";
7
7
  import { useAtom as v } from "jotai";
8
- import { J as Q, ar as Et, bC as Mt, ap as jt, az as E, j as F, D as Lt, y as Ft, bD as O, z as $, E as Rt, k as Ht, n as Pt, p as Ot, m as $t, ai as Nt, aw as Wt, bE as qt, i as gt, b6 as zt, t as Ut, bF as Kt, _ as Yt, l as Vt, s as Gt, h as ot, $ as Xt } from "./index-bscJUvUx.js";
8
+ import { J as Q, as as Et, bC as jt, aq as Mt, aA as E, j as F, D as Lt, y as Ft, bD as O, z as $, E as Rt, k as Ht, n as Pt, p as Ot, m as $t, aj as Nt, ax as qt, bE as Wt, i as gt, b7 as Ut, t as zt, bF as Kt, _ as Yt, l as Vt, s as Gt, h as ot, $ as Xt } from "./index-b33n_-zO.js";
9
9
  import st from "react-dom";
10
10
  import k from "prop-types";
11
11
  import { Quill as Jt } from "react-quill";
12
- import { d as W, a as mt } from "./atoms-Oomqut88.js";
13
- import { d as Qt, u as Zt, e as te } from "./index-EEcKvBh3.js";
12
+ import { d as q, a as mt } from "./atoms-Oomqut88.js";
13
+ import { d as Qt, u as Zt, e as te } from "./index-wRAIA8zZ.js";
14
14
  import { flip as ee } from "@floating-ui/dom";
15
15
  import { useFloating as ne, shift as oe } from "@floating-ui/react-dom";
16
16
  import { DragHandleDots2Icon as se, ArrowUpIcon as ie, CopyIcon as re, TrashIcon as le } from "@radix-ui/react-icons";
@@ -141,7 +141,7 @@ const xe = `<!doctype html>
141
141
  let ht, yt;
142
142
  typeof document < "u" && (ht = document);
143
143
  typeof window < "u" && (yt = window);
144
- const xt = L.createContext({ document: ht, window: yt }), q = () => L.useContext(xt), { Provider: ve, Consumer: Qn } = xt;
144
+ const xt = L.createContext({ document: ht, window: yt }), W = () => L.useContext(xt), { Provider: ve, Consumer: Qn } = xt;
145
145
  class bt extends ct {
146
146
  componentDidMount() {
147
147
  this.props.contentDidMount();
@@ -153,7 +153,7 @@ class bt extends ct {
153
153
  return Ct.only(this.props.children);
154
154
  }
155
155
  }
156
- j(bt, "propTypes", {
156
+ M(bt, "propTypes", {
157
157
  children: k.element.isRequired,
158
158
  contentDidMount: k.func.isRequired,
159
159
  contentDidUpdate: k.func.isRequired
@@ -161,17 +161,17 @@ j(bt, "propTypes", {
161
161
  class G extends ct {
162
162
  constructor(t, o) {
163
163
  super(t, o);
164
- j(this, "setRef", (t) => {
164
+ M(this, "setRef", (t) => {
165
165
  this.nodeRef.current = t;
166
166
  const { forwardedRef: o } = this.props;
167
167
  typeof o == "function" ? o(t) : o && (o.current = t);
168
168
  });
169
- j(this, "handleLoad", () => {
169
+ M(this, "handleLoad", () => {
170
170
  clearInterval(this.loadCheck), this.state.iframeLoaded || this.setState({ iframeLoaded: !0 });
171
171
  });
172
172
  // In certain situations on a cold cache DOMContentLoaded never gets called
173
173
  // fallback to an interval to check if that's the case
174
- j(this, "loadCheck", () => setInterval(() => {
174
+ M(this, "loadCheck", () => setInterval(() => {
175
175
  this.handleLoad();
176
176
  }, 500));
177
177
  this._isMounted = !1, this.nodeRef = L.createRef(), this.state = { iframeLoaded: !1 };
@@ -212,7 +212,7 @@ class G extends ct {
212
212
  // also inject into the body and can mess up React. For this reason
213
213
  // initialContent is expected to have a div inside of the body
214
214
  // element that we render react into.
215
- j(G, "propTypes", {
215
+ M(G, "propTypes", {
216
216
  style: k.object,
217
217
  // eslint-disable-line
218
218
  head: k.node,
@@ -222,7 +222,7 @@ j(G, "propTypes", {
222
222
  contentDidMount: k.func,
223
223
  contentDidUpdate: k.func,
224
224
  children: k.oneOfType([k.element, k.arrayOf(k.element)])
225
- }), j(G, "defaultProps", {
225
+ }), M(G, "defaultProps", {
226
226
  style: {},
227
227
  head: null,
228
228
  children: void 0,
@@ -246,7 +246,7 @@ function Z(n) {
246
246
  return "vertical";
247
247
  return "horizontal";
248
248
  }
249
- let x = null, B = [], lt = null, U = null;
249
+ let x = null, B = [], lt = null, z = null;
250
250
  const at = (n, e, t) => {
251
251
  if (!x || !n)
252
252
  return;
@@ -296,7 +296,7 @@ function Be() {
296
296
  n && n.removeAttribute("data-drop");
297
297
  }
298
298
  const _e = () => {
299
- const { document: n } = q(), [e, t] = v(Mt), { addCoreBlock: o } = jt(), [, l] = E(), [, c] = F(), { moveBlocks: r } = Lt(), [i, s] = v(W), [, u] = v(mt), a = () => {
299
+ const { document: n } = W(), [e, t] = v(jt), { addCoreBlock: o } = Mt(), [, l] = E(), [, c] = F(), { moveBlocks: r } = Lt(), [i, s] = v(q), [, u] = v(mt), a = () => {
300
300
  K(), t(!1), c([i._id]), s(null), u(null), B = [];
301
301
  };
302
302
  return x = n, {
@@ -307,14 +307,14 @@ const _e = () => {
307
307
  onDrop: (g) => {
308
308
  var D;
309
309
  const p = lt, b = Z(p) === "vertical" ? g.clientY + ((D = x == null ? void 0 : x.defaultView) == null ? void 0 : D.scrollY) : g.clientX;
310
- U = we(b, B);
310
+ z = we(b, B);
311
311
  const m = i, w = p.getAttribute("data-block-id");
312
312
  if (!N(m, "_id")) {
313
- o(m, w === "canvas" ? null : w, U), setTimeout(a, 300);
313
+ o(m, w === "canvas" ? null : w, z), setTimeout(a, 300);
314
314
  return;
315
315
  }
316
316
  let C = p.getAttribute("data-block-id");
317
- C === null && (C = g.target.parentElement.getAttribute("data-block-id")), r([m._id], C === "canvas" ? null : C, U), a(), setTimeout(K, 300);
317
+ C === null && (C = g.target.parentElement.getAttribute("data-block-id")), r([m._id], C === "canvas" ? null : C, z), a(), setTimeout(K, 300);
318
318
  },
319
319
  onDragEnter: (g) => {
320
320
  const p = g, h = p.target;
@@ -380,13 +380,13 @@ const De = () => {
380
380
  }, Ee = dt((n, e) => {
381
381
  const t = tt(n.target);
382
382
  t != null && t.getAttribute("data-style-id") && e(t.getAttribute("data-style-id"));
383
- }, 100), Me = () => {
383
+ }, 100), je = () => {
384
384
  const [, n] = E(), [e] = v(O);
385
385
  return (t) => {
386
386
  e || Ee(t, n);
387
387
  };
388
- }, je = ({ children: n }) => {
389
- const { document: e } = q(), [t] = F(), [o, l] = $();
388
+ }, Me = ({ children: n }) => {
389
+ const { document: e } = W(), [t] = F(), [o, l] = $();
390
390
  S(() => {
391
391
  setTimeout(() => {
392
392
  if (!T(o))
@@ -401,7 +401,7 @@ const De = () => {
401
401
  }
402
402
  }, 100);
403
403
  }, [e, t, l, o]);
404
- const c = De(), r = Te(), i = Me(), s = _e();
404
+ const c = De(), r = Te(), i = je(), s = _e();
405
405
  return /* @__PURE__ */ d.jsx(
406
406
  "div",
407
407
  {
@@ -416,10 +416,10 @@ const De = () => {
416
416
  }
417
417
  );
418
418
  }, vt = (n, e) => n.querySelector(`[data-block-id="${e}"]`), Le = () => {
419
- const { document: n } = q();
419
+ const { document: n } = W();
420
420
  return Qt(n), null;
421
421
  }, Fe = ({ block: n, label: e }) => {
422
- const [, t] = F(), [, o] = E(), [, l] = v(W), c = ce("dnd");
422
+ const [, t] = F(), [, o] = E(), [, l] = v(q), c = ce("dnd");
423
423
  return /* @__PURE__ */ d.jsxs(
424
424
  "div",
425
425
  {
@@ -480,7 +480,7 @@ const De = () => {
480
480
  }
481
481
  ) });
482
482
  }, He = ({ model: n }) => {
483
- const [e] = Nt(), [t] = F(), [o] = Wt(), [l] = E(), [c] = $(), [r] = v(W), [i] = v(mt), { document: s, window: u } = q(), [a] = A(s == null ? void 0 : s.getElementById("highlighted-block")), [g] = A(
483
+ const [e] = Nt(), [t] = F(), [o] = qt(), [l] = E(), [c] = $(), [r] = v(q), [i] = v(mt), { document: s, window: u } = W(), [a] = A(s == null ? void 0 : s.getElementById("highlighted-block")), [g] = A(
484
484
  s == null ? void 0 : s.getElementById("selected-block")
485
485
  ), [p] = A(
486
486
  s == null ? void 0 : s.getElementById("selected-styling-block")
@@ -492,12 +492,12 @@ const De = () => {
492
492
  }, [o, s]);
493
493
  const b = f(e, "headingFont", "DM Sans"), m = f(e, "bodyFont", "DM Sans");
494
494
  return S(() => {
495
- const w = f(e, "primaryColor", "#000"), C = f(e, "secondaryColor", "#FFF"), D = f(e, "bodyBgLightColor", "#fff"), M = f(e, "bodyBgDarkColor", "#000"), R = f(e, "bodyTextDarkColor", "#000"), P = f(e, "bodyTextLightColor", "#fff"), z = ge([
495
+ const w = f(e, "primaryColor", "#000"), C = f(e, "secondaryColor", "#FFF"), D = f(e, "bodyBgLightColor", "#fff"), j = f(e, "bodyBgDarkColor", "#000"), R = f(e, "bodyTextDarkColor", "#000"), P = f(e, "bodyTextLightColor", "#fff"), U = ge([
496
496
  { color: w, name: "primary" },
497
497
  { color: C, name: "secondary" }
498
498
  ]), y = {
499
499
  "bg-light": D,
500
- "bg-dark": M,
500
+ "bg-dark": j,
501
501
  "text-dark": R,
502
502
  "text-light": P
503
503
  }, I = f(e, "roundedCorners", "0");
@@ -519,7 +519,7 @@ const De = () => {
519
519
  borderRadius: {
520
520
  DEFAULT: `${I || "0"}px`
521
521
  },
522
- colors: { ...y, ...z }
522
+ colors: { ...y, ...U }
523
523
  }
524
524
  },
525
525
  plugins: [
@@ -565,7 +565,7 @@ const De = () => {
565
565
  href: `https://fonts.googleapis.com/css2?family=${b ? `${b.replace(/ /g, "+")}:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,300;1,400;1,500;1,600;1,700;1,800;1,900` : ""}${b && m && b !== m ? "&" : ""}${m && m !== b ? `family=${m.replace(/ /g, "+")}:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,300;1,400;1,500;1,600;1,700;1,800;1,900` : ""}&display=swap`
566
566
  }
567
567
  ) });
568
- }, Pe = () => v(qt), Oe = (n, e) => {
568
+ }, Pe = () => v(Wt), Oe = (n, e) => {
569
569
  const t = ["xs", "sm", "md", "lg", "xl", "2xl"], o = t.indexOf(e), l = n.split(" ");
570
570
  let c = new Array(t.length).fill(!1);
571
571
  for (const r of l) {
@@ -592,14 +592,14 @@ const De = () => {
592
592
  const e = n.replace(ft, "").split(",");
593
593
  return fe(e[0], e[1]);
594
594
  });
595
- function We(n, e) {
595
+ function qe(n, e) {
596
596
  return f(n, `${e}_attrs`, {});
597
597
  }
598
- function qe(n, e) {
598
+ function We(n, e) {
599
599
  const t = {};
600
600
  return Object.keys(n).forEach((o) => {
601
601
  if (J(n[o]) && n[o].startsWith(ft)) {
602
- const l = Ne(n[o]), c = We(n, o);
602
+ const l = Ne(n[o]), c = qe(n, o);
603
603
  t[o] = {
604
604
  className: l,
605
605
  "data-style-prop": o,
@@ -612,14 +612,14 @@ function qe(n, e) {
612
612
  }
613
613
  }), t;
614
614
  }
615
- function ze(n, e) {
615
+ function Ue(n, e) {
616
616
  const t = f(n, "_bindings", {});
617
617
  return T(t) ? { ...n } : (At(t, (o, l) => {
618
618
  J(o) && f(e, o, null) && (n[l] = f(e, o, null));
619
619
  }), n);
620
620
  }
621
621
  function X({ blocks: n }) {
622
- const [e] = gt(), [t] = v(zt), [o] = v(W), [, l] = Q(), [c] = Pe(), r = Y((a) => qe(a, l), [l]), [i] = Zt(), [s] = v(O), u = Y(
622
+ const [e] = gt(), [t] = v(Ut), [o] = v(q), [, l] = Q(), [c] = Pe(), r = Y((a) => We(a, l), [l]), [i] = Zt(), [s] = v(O), u = Y(
623
623
  (a) => a.reduce((g, p) => {
624
624
  const h = f(c, p, {});
625
625
  return { ...g, ...h };
@@ -641,8 +641,8 @@ function X({ blocks: n }) {
641
641
  const m = he(a._type), w = f(m, "builderComponent", f(m, "component", null));
642
642
  if (Tt(w))
643
643
  return /* @__PURE__ */ d.jsx("noscript", { children: `<!-- ${a == null ? void 0 : a._type} not registered -->` });
644
- const C = N(m, "getBlockStateFrom") ? m == null ? void 0 : m.getBlockStateFrom(a, e) : [], D = u(C), M = r(a);
645
- return f(M, "__isHidden", !1) && !rt(t, a._id) ? null : /* @__PURE__ */ d.jsx(St, { children: L.createElement(w, {
644
+ const C = N(m, "getBlockStateFrom") ? m == null ? void 0 : m.getBlockStateFrom(a, e) : [], D = u(C), j = r(a);
645
+ return f(j, "__isHidden", !1) && !rt(t, a._id) ? null : /* @__PURE__ */ d.jsx(St, { children: L.createElement(w, {
646
646
  blockProps: {
647
647
  ...rt(t, a._id) ? { "force-show": "" } : {},
648
648
  "data-block-id": a._id,
@@ -650,13 +650,13 @@ function X({ blocks: n }) {
650
650
  ...o ? (
651
651
  // @ts-ignore
652
652
  {
653
- "data-dnd": Ut(a._type, o == null ? void 0 : o._type) ? "yes" : "no"
653
+ "data-dnd": zt(a._type, o == null ? void 0 : o._type) ? "yes" : "no"
654
654
  }
655
655
  ) : {}
656
656
  },
657
657
  index: g,
658
- ...ze(a, i),
659
- ...pt(M, ["__isHidden"]),
658
+ ...Ue(a, i),
659
+ ...pt(j, ["__isHidden"]),
660
660
  ...h,
661
661
  inBuilder: !0,
662
662
  blockState: D
@@ -664,11 +664,11 @@ function X({ blocks: n }) {
664
664
  })
665
665
  ) });
666
666
  }
667
- const Ue = () => {
667
+ const ze = () => {
668
668
  const [n] = gt(), e = T(n) ? null : /* @__PURE__ */ d.jsx(te, { children: /* @__PURE__ */ d.jsx(X, { blocks: ut(n, (t) => T(t._parent)) }) });
669
669
  return /* @__PURE__ */ d.jsx(d.Fragment, { children: e });
670
670
  }, Ke = (n, e) => n.querySelector(`[data-style-id="${e}"]`), Zn = () => {
671
- const [n] = v(Kt), [e] = Yt(), [t] = Q(), [, o] = F(), l = Vt(), [, c] = E(), r = et(null), i = et(null), [s, u] = A({ width: 0, height: 0 }), a = be(s), [g, p] = A(0), [h, b] = A([]), [, m] = A([]), [, w] = v(Gt), [C, D] = $(), M = ot("loading", !1), R = ot("htmlDir", "ltr");
671
+ const [n] = v(Kt), [e] = Yt(), [t] = Q(), [, o] = F(), l = Vt(), [, c] = E(), r = et(null), i = et(null), [s, u] = A({ width: 0, height: 0 }), a = be(s), [g, p] = A(0), [h, b] = A([]), [, m] = A([]), [, w] = v(Gt), [C, D] = $(), j = ot("loading", !1), R = ot("htmlDir", "ltr");
672
672
  S(() => {
673
673
  const { clientWidth: y, clientHeight: I } = i.current;
674
674
  u({ width: y, height: I }), g === 0 && p(y);
@@ -693,7 +693,7 @@ const Ue = () => {
693
693
  } else
694
694
  m([null]);
695
695
  }, [C]);
696
- const z = It(() => {
696
+ const U = It(() => {
697
697
  let y = xe;
698
698
  return y = y.replace("__HTML_DIR__", R), n === "offline" && (y = y.replace(
699
699
  "https://old.chaibuilder.com/offline/tailwind.cdn.js",
@@ -718,7 +718,7 @@ const Ue = () => {
718
718
  id: "canvas-iframe",
719
719
  style: { width: `${t}px`, ...a },
720
720
  className: "relative mx-auto box-content h-full max-w-full shadow-lg transition-all duration-300 ease-linear",
721
- initialContent: z,
721
+ initialContent: U,
722
722
  children: [
723
723
  /* @__PURE__ */ d.jsx(Le, {}),
724
724
  /* @__PURE__ */ d.jsx(
@@ -729,7 +729,7 @@ const Ue = () => {
729
729
  }
730
730
  ),
731
731
  /* @__PURE__ */ d.jsx(He, { model: "page" }),
732
- /* @__PURE__ */ d.jsx(ye, { children: /* @__PURE__ */ d.jsx(je, { children: M ? /* @__PURE__ */ d.jsx("div", { className: "h-full p-4", children: /* @__PURE__ */ d.jsx(Xt, { className: "h-full" }) }) : /* @__PURE__ */ d.jsx(Ue, {}) }) }),
732
+ /* @__PURE__ */ d.jsx(ye, { children: /* @__PURE__ */ d.jsx(Me, { children: j ? /* @__PURE__ */ d.jsx("div", { className: "h-full p-4", children: /* @__PURE__ */ d.jsx(Xt, { className: "h-full" }) }) : /* @__PURE__ */ d.jsx(ze, {}) }) }),
733
733
  /* @__PURE__ */ d.jsx("br", {}),
734
734
  /* @__PURE__ */ d.jsx(
735
735
  "div",
@@ -1,4 +1,4 @@
1
- "use strict";var st=Object.defineProperty;var ot=(n,e,t)=>e in n?st(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var q=(n,e,t)=>(ot(n,typeof e!="symbol"?e+"":e,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./jsx-runtime-Z_BpKhVy.cjs"),f=require("react"),l=require("lodash-es"),E=require("jotai"),a=require("./index-aeDphKpP.cjs"),K=require("react-dom"),S=require("prop-types"),it=require("react-quill"),D=require("./atoms-KQpaDRnF.cjs"),U=require("./index-BbW1Uw_k.cjs"),rt=require("@floating-ui/dom"),V=require("@floating-ui/react-dom"),L=require("@radix-ui/react-icons"),lt=require("@react-hookz/web"),at=require("flagged"),ct=require("@tailwindcss/typography"),dt=require("@tailwindcss/forms"),ut=require("@tailwindcss/aspect-ratio"),pt=require("tailwindcss-palette-generator"),gt=require("./plugin-2hf9pCRy.cjs"),ft=require("tailwind-merge"),F=require("./MODIFIERS-mVmfEGgo.cjs"),mt=require("@chaibuilder/runtime"),G=require("lodash"),ht=require("react-wrap-balancer");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-D_vtk3zK.cjs");require("clsx");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("react-icons-picker");require("./Functions-N3yhPYKY.cjs");require("tree-model");require("react-i18next");require("i18next");require("react-arborist");require("lucide-react");require("./index--mLLy7QQ.cjs");require("react-hotkeys-hook");const xt=`<!doctype html>
1
+ "use strict";var st=Object.defineProperty;var ot=(n,e,t)=>e in n?st(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var q=(n,e,t)=>(ot(n,typeof e!="symbol"?e+"":e,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./jsx-runtime-Z_BpKhVy.cjs"),f=require("react"),l=require("lodash-es"),E=require("jotai"),a=require("./index-aeDphKpP.cjs"),K=require("react-dom"),S=require("prop-types"),it=require("react-quill"),D=require("./atoms-KQpaDRnF.cjs"),U=require("./index-audsIPBC.cjs"),rt=require("@floating-ui/dom"),V=require("@floating-ui/react-dom"),L=require("@radix-ui/react-icons"),lt=require("@react-hookz/web"),at=require("flagged"),ct=require("@tailwindcss/typography"),dt=require("@tailwindcss/forms"),ut=require("@tailwindcss/aspect-ratio"),pt=require("tailwindcss-palette-generator"),gt=require("./plugin-2hf9pCRy.cjs"),ft=require("tailwind-merge"),F=require("./MODIFIERS-mVmfEGgo.cjs"),mt=require("@chaibuilder/runtime"),G=require("lodash"),ht=require("react-wrap-balancer");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-D_vtk3zK.cjs");require("clsx");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("react-icons-picker");require("./Functions-N3yhPYKY.cjs");require("tree-model");require("react-i18next");require("i18next");require("react-arborist");require("lucide-react");require("./index--mLLy7QQ.cjs");require("react-hotkeys-hook");const xt=`<!doctype html>
2
2
  <html lang="en" dir="__HTML_DIR__" class="scroll-smooth h-full overflow-y-auto">
3
3
  <head>
4
4
  <meta charset="UTF-8">
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./jsx-runtime-Z_BpKhVy.cjs"),E=require("react"),P=require("@rjsf/validator-ajv8"),k=require("@rjsf/core"),p=require("./index-aeDphKpP.cjs"),r=require("./controls-rRZhz0vu.cjs"),m=require("lodash-es"),T=require("react-i18next"),D=require("./Functions-N3yhPYKY.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-D_vtk3zK.cjs");require("./MODIFIERS-mVmfEGgo.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("@chaibuilder/runtime");require("jotai");require("@react-hookz/web");require("tree-model");function w(e){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const t=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(l,i,t.get?t:{enumerable:!0,get:()=>e[i]})}}return l.default=e,Object.freeze(l)}const f=w(E),M=({value:e,onChange:l,id:i,onBlur:t})=>{const d=m.debounce(l,200),v=o=>d(o.target.value);return a.jsxRuntimeExports.jsx("div",{className:"mt-1.5 flex items-center gap-x-3",children:a.jsxRuntimeExports.jsx("div",{className:"flex w-3/5 flex-col",children:a.jsxRuntimeExports.jsx("input",{type:"color",className:"text-xs p-0",value:e,onBlur:({target:{value:o}})=>t(i,o),onChange:v})})})},g=[{title:"Roboto",value:"Roboto"},{title:"Open Sans",value:"Open Sans"},{title:"Montserrat",value:"Montserrat"},{title:"Lato",value:"Lato"},{title:"Poppins",value:"Poppins"},{title:"Oswald",value:"Oswald"},{title:"Raleway",value:"Raleway"},{title:"Ubuntu",value:"Ubuntu"},{title:"Nunito",value:"Nunito"},{title:"Merriweather",value:"Merriweather"},{title:"Nunito Sans",value:"Nunito Sans"},{title:"Playfair Display",value:"Playfair Display"},{title:"Rubik",value:"Rubik"},{title:"Inter",value:"Inter"},{title:"Lora",value:"Lora"},{title:"Kanit",value:"Kanit"},{title:"Fira Sans",value:"Fira Sans"},{title:"Hind",value:"Hind"},{title:"Quicksand",value:"Quicksand"},{title:"Mulish",value:"Mulish"},{title:"Barlow",value:"Barlow"},{title:"Inconsolata",value:"Inconsolata"},{title:"Titillium Web",value:"Titillium Web"},{title:"Heebo",value:"Heebo"},{title:"IBM Plex Sans",value:"IBM Plex Sans"},{title:"DM Sans",value:"DM Sans"},{title:"Nanum Gothic",value:"Nanum Gothic"},{title:"Karla",value:"Karla"},{title:"Arimo",value:"Arimo"},{title:"Cabin",value:"Cabin"},{title:"Oxygen",value:"Oxygen"},{title:"Overpass",value:"Overpass"},{title:"Assistant",value:"Assistant"},{title:"Tajawal",value:"Tajawal"},{title:"Play",value:"Play"},{title:"Exo",value:"Exo"},{title:"Cinzel",value:"Cinzel"},{title:"Faustina",value:"Faustina"},{title:"Philosopher",value:"Philosopher"},{title:"Gelasio",value:"Gelasio"},{title:"Sofia Sans Condensed",value:"Sofia Sans Condensed"},{title:"Noto Sans Devanagari",value:"Noto Sans Devanagari"},{title:"Actor",value:"Actor"},{title:"Epilogue",value:"Epilogue"},{title:"Glegoo",value:"Glegoo"},{title:"Overlock",value:"Overlock"},{title:"Lustria",value:"Lustria"},{title:"Ovo",value:"Ovo"},{title:"Suranna",value:"Suranna"},{title:"Bebas Neue",value:"Bebas Neue"},{title:"Manrope",value:"Manrope"}],F=({showHeading:e=!0,className:l=""})=>{const i=p.useBuilderProp("onSaveBrandingOptions",m.noop),[t,d]=p.useBrandingOptions(),[v]=p.useBlocksContainer(),o=f.useRef(t),{t:q}=T.useTranslation();f.useEffect(()=>()=>{m.isEqual(t,o.current)||i(o.current)},[]);const b=({formData:n},c)=>{c&&(d(n),o.current=n)},{bodyFont:h,headingFont:y,primaryColor:C,bodyTextDarkColor:S,bodyTextLightColor:j,bodyBgDarkColor:O,secondaryColor:R,bodyBgLightColor:B,roundedCorners:N}=t;let u={headingFont:r.f({title:"Heading font",default:y,options:g}),bodyFont:r.f({title:"Body font",default:h,options:g}),roundedCorners:r.y({title:"Rounded Corner",default:parseInt(N||5,10)}),primaryColor:r.s({title:"Primary",default:C}),secondaryColor:r.s({title:"Secondary",default:R})};v||(u={...u,bodyBgLightColor:r.s({title:"Background",default:B}),bodyTextLightColor:r.s({title:"Text color",default:S}),bodyBgDarkColor:r.s({title:"Background (Dark mode)",default:O}),bodyTextDarkColor:r.s({title:"Text color(Dark mode)",default:j})});const s={type:"object",properties:{}},x={};return Object.keys(u).forEach(n=>{const c=u[n];return s.properties||(s.properties={}),s.properties[n]=c.schema,x[n]=c.uiSchema,!0}),a.jsxRuntimeExports.jsxs("div",{className:D.cn("flex h-full w-60 select-none flex-col",l),children:[e?a.jsxRuntimeExports.jsx("div",{className:"rounded-md bg-background/30 p-1",children:a.jsxRuntimeExports.jsx("h1",{className:"px-1 font-semibold",children:q("Theme Configuration")})}):null,a.jsxRuntimeExports.jsx("div",{className:"-mx-2",children:a.jsxRuntimeExports.jsx(k,{widgets:{color:M},idSeparator:".",autoComplete:"off",omitExtraData:!0,liveOmit:!0,liveValidate:!0,uiSchema:x,schema:s,formData:t,validator:P,onChange:b})})]})};exports.default=F;
@@ -1,11 +1,12 @@
1
1
  import { j as t } from "./jsx-runtime-WbnYoNE9.js";
2
2
  import * as c from "react";
3
- import j from "@rjsf/validator-ajv8";
4
- import k from "@rjsf/core";
5
- import { h as P, ai as T, br as w } from "./index-bscJUvUx.js";
6
- import { f, y as D, s as a } from "./controls-yjgoZzB6.js";
7
- import { debounce as R, noop as M, isEqual as F } from "lodash-es";
8
- import { useTranslation as L } from "react-i18next";
3
+ import P from "@rjsf/validator-ajv8";
4
+ import T from "@rjsf/core";
5
+ import { h as w, aj as D, br as R } from "./index-b33n_-zO.js";
6
+ import { f, y as M, s as i } from "./controls-yjgoZzB6.js";
7
+ import { debounce as F, noop as L, isEqual as E } from "lodash-es";
8
+ import { useTranslation as I } from "react-i18next";
9
+ import { c as A } from "./Functions-7jnEwJyw.js";
9
10
  import "./_commonjsHelpers-UyOWmZb0.js";
10
11
  import "@radix-ui/react-toggle";
11
12
  import "class-variance-authority";
@@ -35,20 +36,19 @@ import "@radix-ui/react-context-menu";
35
36
  import "react-icons-picker";
36
37
  import "react-dom";
37
38
  import "react-quill";
38
- import "./Functions-7jnEwJyw.js";
39
39
  import "@chaibuilder/runtime";
40
40
  import "jotai";
41
41
  import "@react-hookz/web";
42
42
  import "tree-model";
43
- const E = ({ value: u, onChange: e, id: p, onBlur: m }) => {
44
- const i = R(e, 200), d = (l) => i(l.target.value);
43
+ const G = ({ value: s, onChange: u, id: p, onBlur: o }) => {
44
+ const m = F(u, 200), d = (e) => m(e.target.value);
45
45
  return /* @__PURE__ */ t.jsx("div", { className: "mt-1.5 flex items-center gap-x-3", children: /* @__PURE__ */ t.jsx("div", { className: "flex w-3/5 flex-col", children: /* @__PURE__ */ t.jsx(
46
46
  "input",
47
47
  {
48
48
  type: "color",
49
49
  className: "text-xs p-0",
50
- value: u,
51
- onBlur: ({ target: { value: l } }) => m(p, l),
50
+ value: s,
51
+ onBlur: ({ target: { value: e } }) => o(p, e),
52
52
  onChange: d
53
53
  }
54
54
  ) }) });
@@ -104,88 +104,91 @@ const E = ({ value: u, onChange: e, id: p, onBlur: m }) => {
104
104
  { title: "Suranna", value: "Suranna" },
105
105
  { title: "Bebas Neue", value: "Bebas Neue" },
106
106
  { title: "Manrope", value: "Manrope" }
107
- ], Ot = () => {
108
- const u = P("onSaveBrandingOptions", M), [e, p] = T(), [m] = w(), i = c.useRef(e), { t: d } = L();
107
+ ], kt = ({
108
+ showHeading: s = !0,
109
+ className: u = ""
110
+ }) => {
111
+ const p = w("onSaveBrandingOptions", L), [o, m] = D(), [d] = R(), e = c.useRef(o), { t: h } = I();
109
112
  c.useEffect(() => () => {
110
- F(e, i.current) || u(i.current);
113
+ E(o, e.current) || p(e.current);
111
114
  }, []);
112
- const l = ({ formData: o }, s) => {
113
- s && (p(o), i.current = o);
115
+ const b = ({ formData: a }, n) => {
116
+ n && (m(a), e.current = a);
114
117
  }, {
115
- bodyFont: h,
116
- headingFont: b,
117
- primaryColor: x,
118
- bodyTextDarkColor: C,
119
- bodyTextLightColor: y,
120
- bodyBgDarkColor: S,
121
- secondaryColor: B,
122
- bodyBgLightColor: O,
123
- roundedCorners: N
124
- } = e;
125
- let r = {
118
+ bodyFont: x,
119
+ headingFont: C,
120
+ primaryColor: y,
121
+ bodyTextDarkColor: S,
122
+ bodyTextLightColor: B,
123
+ bodyBgDarkColor: O,
124
+ secondaryColor: N,
125
+ bodyBgLightColor: j,
126
+ roundedCorners: k
127
+ } = o;
128
+ let l = {
126
129
  headingFont: f({
127
130
  title: "Heading font",
128
- default: b,
131
+ default: C,
129
132
  options: g
130
133
  }),
131
134
  bodyFont: f({
132
135
  title: "Body font",
133
- default: h,
136
+ default: x,
134
137
  options: g
135
138
  }),
136
- roundedCorners: D({
139
+ roundedCorners: M({
137
140
  title: "Rounded Corner",
138
- default: parseInt(N || 5, 10)
141
+ default: parseInt(k || 5, 10)
139
142
  }),
140
- primaryColor: a({ title: "Primary", default: x }),
141
- secondaryColor: a({ title: "Secondary", default: B })
143
+ primaryColor: i({ title: "Primary", default: y }),
144
+ secondaryColor: i({ title: "Secondary", default: N })
142
145
  };
143
- m || (r = {
144
- ...r,
145
- bodyBgLightColor: a({
146
+ d || (l = {
147
+ ...l,
148
+ bodyBgLightColor: i({
146
149
  title: "Background",
147
- default: O
150
+ default: j
148
151
  }),
149
- bodyTextLightColor: a({
152
+ bodyTextLightColor: i({
150
153
  title: "Text color",
151
- default: C
154
+ default: S
152
155
  }),
153
- bodyBgDarkColor: a({
156
+ bodyBgDarkColor: i({
154
157
  title: "Background (Dark mode)",
155
- default: S
158
+ default: O
156
159
  }),
157
- bodyTextDarkColor: a({
160
+ bodyTextDarkColor: i({
158
161
  title: "Text color(Dark mode)",
159
- default: y
162
+ default: B
160
163
  })
161
164
  });
162
- const n = {
165
+ const r = {
163
166
  type: "object",
164
167
  properties: {}
165
168
  }, v = {};
166
- return Object.keys(r).forEach((o) => {
167
- const s = r[o];
168
- return n.properties || (n.properties = {}), n.properties[o] = s.schema, v[o] = s.uiSchema, !0;
169
- }), /* @__PURE__ */ t.jsxs("div", { className: "flex h-full w-60 select-none flex-col", children: [
170
- /* @__PURE__ */ t.jsx("div", { className: "rounded-md bg-background/30 p-1", children: /* @__PURE__ */ t.jsx("h1", { className: "px-1 font-semibold", children: d("Theme Configuration") }) }),
169
+ return Object.keys(l).forEach((a) => {
170
+ const n = l[a];
171
+ return r.properties || (r.properties = {}), r.properties[a] = n.schema, v[a] = n.uiSchema, !0;
172
+ }), /* @__PURE__ */ t.jsxs("div", { className: A("flex h-full w-60 select-none flex-col", u), children: [
173
+ s ? /* @__PURE__ */ t.jsx("div", { className: "rounded-md bg-background/30 p-1", children: /* @__PURE__ */ t.jsx("h1", { className: "px-1 font-semibold", children: h("Theme Configuration") }) }) : null,
171
174
  /* @__PURE__ */ t.jsx("div", { className: "-mx-2", children: /* @__PURE__ */ t.jsx(
172
- k,
175
+ T,
173
176
  {
174
- widgets: { color: E },
177
+ widgets: { color: G },
175
178
  idSeparator: ".",
176
179
  autoComplete: "off",
177
180
  omitExtraData: !0,
178
181
  liveOmit: !0,
179
182
  liveValidate: !0,
180
183
  uiSchema: v,
181
- schema: n,
182
- formData: e,
183
- validator: j,
184
- onChange: l
184
+ schema: r,
185
+ formData: o,
186
+ validator: P,
187
+ onChange: b
185
188
  }
186
189
  ) })
187
190
  ] });
188
191
  };
189
192
  export {
190
- Ot as default
193
+ kt as default
191
194
  };
@@ -1,8 +1,8 @@
1
1
  import { j as e } from "./jsx-runtime-WbnYoNE9.js";
2
2
  import l, { useMemo as h, Suspense as c } from "react";
3
3
  import { FontFamilyIcon as j, EyeOpenIcon as f } from "@radix-ui/react-icons";
4
- import { h as r, bs as g, bt as v, bu as b, bv as N, bz as S, bA as w, bw as o, ad as y, B as p, _ as C, $ as m, bB as B } from "./index-bscJUvUx.js";
5
- import { b as A } from "./index-EEcKvBh3.js";
4
+ import { h as r, bs as g, bt as v, bu as b, bv as N, bz as S, bA as w, bw as o, ad as y, B as p, _ as C, $ as m, bB as B } from "./index-b33n_-zO.js";
5
+ import { b as A } from "./index-wRAIA8zZ.js";
6
6
  import { useTranslation as x } from "react-i18next";
7
7
  import "./_commonjsHelpers-UyOWmZb0.js";
8
8
  import "@radix-ui/react-toggle";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),n=require("react"),a=require("@radix-ui/react-icons"),r=require("./index-aeDphKpP.cjs"),p=require("./index-BbW1Uw_k.cjs"),l=require("react-i18next");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-D_vtk3zK.cjs");require("lodash-es");require("./MODIFIERS-mVmfEGgo.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("./Functions-N3yhPYKY.cjs");require("@chaibuilder/runtime");require("jotai");require("@react-hookz/web");require("tree-model");require("i18next");require("react-arborist");require("lucide-react");require("./index--mLLy7QQ.cjs");require("@floating-ui/react-dom");require("flagged");require("react-hotkeys-hook");const m=()=>r.useBuilderProp("languages",["en"]),j=()=>m().length===1?null:e.jsxRuntimeExports.jsx("div",{className:"flex items-center",children:e.jsxRuntimeExports.jsxs(r.Select,{children:[e.jsxRuntimeExports.jsx(r.SelectTrigger,{className:"w-[150px] border-0",children:e.jsxRuntimeExports.jsx(r.SelectValue,{placeholder:e.jsxRuntimeExports.jsxs("span",{className:"flex items-center",children:[e.jsxRuntimeExports.jsx(a.FontFamilyIcon,{className:"h-4 w-4"})," English(US)"]})})}),e.jsxRuntimeExports.jsx(r.SelectContent,{children:e.jsxRuntimeExports.jsxs(r.SelectGroup,{children:[e.jsxRuntimeExports.jsx(r.SelectLabel,{children:"Fruits"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"apple",children:"Apple"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"banana",children:"Banana"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"blueberry",children:"Blueberry"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"grapes",children:"Grapes"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"pineapple",children:"Pineapple"})]})})]})}),d=()=>{const{savePage:u,saveState:s}=r.useSavePage(),{t:i}=l.useTranslation(),x=r.useBuilderProp("hideSaveButton",!1),t=n.useMemo(()=>{switch(s){case"SAVING":return"animate-pulse bg-gray-300 text-gray-900";case"SAVED":return"bg-green-500 text-white hover:bg-green-600 hover:text-white";default:return"bg-gray-200 text-gray-500 hover:bg-gray-100"}},[s]);if(x)return null;const o=e.jsxRuntimeExports.jsxs(r.Button,{disabled:s==="SAVING",onClick:c=>{c.preventDefault(),u()},className:`flex h-auto w-fit items-center gap-x-2 rounded-full p-1.5 px-3 ${t}`,size:"sm",variant:"outline",children:[e.jsxRuntimeExports.jsx(p.FaCircleCheck,{className:"text-lg"}),e.jsxRuntimeExports.jsx("span",{className:"text-sm",children:s==="SAVING"?"Saving...":i(s==="SAVED"?"Saved":"Unsaved")})]});return e.jsxRuntimeExports.jsx("div",{className:"flex items-center",children:o})},h=function(){const s=r.useBuilderProp("previewComponent"),[,i]=r.usePreviewMode(),{t:x}=l.useTranslation();return s?e.jsxRuntimeExports.jsxs(r.Button,{onClick:t=>{t.preventDefault(),i(!0)},className:"flex h-auto w-fit items-center gap-x-2 rounded-full bg-gray-200 px-3 py-1",size:"sm",variant:"outline",children:[e.jsxRuntimeExports.jsx(a.EyeOpenIcon,{className:"text-xs"}),e.jsxRuntimeExports.jsx("span",{className:"text-sm",children:x("Preview")})]}):null},q=()=>{const u=r.useBuilderProp("topBarComponents.left",[]),s=r.useBuilderProp("topBarComponents.center",[]),i=r.useBuilderProp("topBarComponents.right",[]),x=r.useBuilderProp("editable",!0);return e.jsxRuntimeExports.jsxs("div",{className:"flex h-14 items-center justify-between px-2",children:[e.jsxRuntimeExports.jsx("div",{className:"flex items-center space-x-2",children:e.jsxRuntimeExports.jsx("div",{className:"flex items-center space-x-2 font-bold",children:n.Children.toArray(u.map(t=>e.jsxRuntimeExports.jsx(n.Suspense,{fallback:e.jsxRuntimeExports.jsx(r.Skeleton,{className:"h-10"}),children:e.jsxRuntimeExports.jsx(t,{})})))})}),e.jsxRuntimeExports.jsx("div",{className:"flex items-center space-x-2",children:n.Children.toArray(s.map(t=>e.jsxRuntimeExports.jsx(n.Suspense,{fallback:e.jsxRuntimeExports.jsx(r.Skeleton,{className:"h-10"}),children:e.jsxRuntimeExports.jsx(t,{})})))}),e.jsxRuntimeExports.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsxRuntimeExports.jsx(j,{}),e.jsxRuntimeExports.jsx(h,{}),e.jsxRuntimeExports.jsx(r.Separator,{orientation:"vertical"}),x?e.jsxRuntimeExports.jsx(d,{}):null,n.Children.toArray(i.map(t=>e.jsxRuntimeExports.jsx(n.Suspense,{fallback:e.jsxRuntimeExports.jsx(r.Skeleton,{className:"h-10"}),children:e.jsxRuntimeExports.jsx(t,{})})))]})]})};exports.default=q;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),n=require("react"),a=require("@radix-ui/react-icons"),r=require("./index-aeDphKpP.cjs"),p=require("./index-audsIPBC.cjs"),l=require("react-i18next");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-D_vtk3zK.cjs");require("lodash-es");require("./MODIFIERS-mVmfEGgo.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("./Functions-N3yhPYKY.cjs");require("@chaibuilder/runtime");require("jotai");require("@react-hookz/web");require("tree-model");require("i18next");require("react-arborist");require("lucide-react");require("./index--mLLy7QQ.cjs");require("@floating-ui/react-dom");require("flagged");require("react-hotkeys-hook");const m=()=>r.useBuilderProp("languages",["en"]),j=()=>m().length===1?null:e.jsxRuntimeExports.jsx("div",{className:"flex items-center",children:e.jsxRuntimeExports.jsxs(r.Select,{children:[e.jsxRuntimeExports.jsx(r.SelectTrigger,{className:"w-[150px] border-0",children:e.jsxRuntimeExports.jsx(r.SelectValue,{placeholder:e.jsxRuntimeExports.jsxs("span",{className:"flex items-center",children:[e.jsxRuntimeExports.jsx(a.FontFamilyIcon,{className:"h-4 w-4"})," English(US)"]})})}),e.jsxRuntimeExports.jsx(r.SelectContent,{children:e.jsxRuntimeExports.jsxs(r.SelectGroup,{children:[e.jsxRuntimeExports.jsx(r.SelectLabel,{children:"Fruits"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"apple",children:"Apple"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"banana",children:"Banana"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"blueberry",children:"Blueberry"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"grapes",children:"Grapes"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"pineapple",children:"Pineapple"})]})})]})}),d=()=>{const{savePage:u,saveState:s}=r.useSavePage(),{t:i}=l.useTranslation(),x=r.useBuilderProp("hideSaveButton",!1),t=n.useMemo(()=>{switch(s){case"SAVING":return"animate-pulse bg-gray-300 text-gray-900";case"SAVED":return"bg-green-500 text-white hover:bg-green-600 hover:text-white";default:return"bg-gray-200 text-gray-500 hover:bg-gray-100"}},[s]);if(x)return null;const o=e.jsxRuntimeExports.jsxs(r.Button,{disabled:s==="SAVING",onClick:c=>{c.preventDefault(),u()},className:`flex h-auto w-fit items-center gap-x-2 rounded-full p-1.5 px-3 ${t}`,size:"sm",variant:"outline",children:[e.jsxRuntimeExports.jsx(p.FaCircleCheck,{className:"text-lg"}),e.jsxRuntimeExports.jsx("span",{className:"text-sm",children:s==="SAVING"?"Saving...":i(s==="SAVED"?"Saved":"Unsaved")})]});return e.jsxRuntimeExports.jsx("div",{className:"flex items-center",children:o})},h=function(){const s=r.useBuilderProp("previewComponent"),[,i]=r.usePreviewMode(),{t:x}=l.useTranslation();return s?e.jsxRuntimeExports.jsxs(r.Button,{onClick:t=>{t.preventDefault(),i(!0)},className:"flex h-auto w-fit items-center gap-x-2 rounded-full bg-gray-200 px-3 py-1",size:"sm",variant:"outline",children:[e.jsxRuntimeExports.jsx(a.EyeOpenIcon,{className:"text-xs"}),e.jsxRuntimeExports.jsx("span",{className:"text-sm",children:x("Preview")})]}):null},q=()=>{const u=r.useBuilderProp("topBarComponents.left",[]),s=r.useBuilderProp("topBarComponents.center",[]),i=r.useBuilderProp("topBarComponents.right",[]),x=r.useBuilderProp("editable",!0);return e.jsxRuntimeExports.jsxs("div",{className:"flex h-14 items-center justify-between px-2",children:[e.jsxRuntimeExports.jsx("div",{className:"flex items-center space-x-2",children:e.jsxRuntimeExports.jsx("div",{className:"flex items-center space-x-2 font-bold",children:n.Children.toArray(u.map(t=>e.jsxRuntimeExports.jsx(n.Suspense,{fallback:e.jsxRuntimeExports.jsx(r.Skeleton,{className:"h-10"}),children:e.jsxRuntimeExports.jsx(t,{})})))})}),e.jsxRuntimeExports.jsx("div",{className:"flex items-center space-x-2",children:n.Children.toArray(s.map(t=>e.jsxRuntimeExports.jsx(n.Suspense,{fallback:e.jsxRuntimeExports.jsx(r.Skeleton,{className:"h-10"}),children:e.jsxRuntimeExports.jsx(t,{})})))}),e.jsxRuntimeExports.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsxRuntimeExports.jsx(j,{}),e.jsxRuntimeExports.jsx(h,{}),e.jsxRuntimeExports.jsx(r.Separator,{orientation:"vertical"}),x?e.jsxRuntimeExports.jsx(d,{}):null,n.Children.toArray(i.map(t=>e.jsxRuntimeExports.jsx(n.Suspense,{fallback:e.jsxRuntimeExports.jsx(r.Skeleton,{className:"h-10"}),children:e.jsxRuntimeExports.jsx(t,{})})))]})]})};exports.default=q;