@chaibuilder/sdk 1.2.49 → 1.2.51

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 (109) hide show
  1. package/dist/{AddBlocks-JCSA6hLF.js → AddBlocks-LyEjf6h0.js} +18 -18
  2. package/dist/AddBlocks-hOFqmmXZ.cjs +1 -0
  3. package/dist/CanvasArea-luy5nUGR.cjs +56 -0
  4. package/dist/{CanvasArea-c3xbVSoY.js → CanvasArea-mhINqS0c.js} +279 -263
  5. package/dist/{ChaiBuilderEditor-lqHQcnh3.cjs → ChaiBuilderEditor-H173PF4T.cjs} +50 -50
  6. package/dist/{ChaiBuilderEditor-F2yUJQdt.js → ChaiBuilderEditor-KEwDa8Bl.js} +8553 -8619
  7. package/dist/CodeEditor-XaHQMfpT.js +97 -0
  8. package/dist/CodeEditor-jh9xwRXT.cjs +1 -0
  9. package/dist/CurrentPage-RUx7wvBt.cjs +1 -0
  10. package/dist/{CurrentPage--lDu6fB9.js → CurrentPage-UzajS1xZ.js} +10 -10
  11. package/dist/{ListTree-7DWSal1i.js → ListTree-BWBPjCzR.js} +6 -6
  12. package/dist/ListTree-S6pMJlmj.cjs +1 -0
  13. package/dist/{MODIFIERS-cBT31iqE.js → MODIFIERS-fd5XOmum.js} +8 -4
  14. package/dist/MODIFIERS-mVmfEGgo.cjs +1 -0
  15. package/dist/PagesPanel-LBW-4mVM.cjs +1 -0
  16. package/dist/{PagesPanel-D1TOGyVE.js → PagesPanel-p-h6o26u.js} +7 -7
  17. package/dist/ProjectPanel-PQv2uVj2.cjs +1 -0
  18. package/dist/{ProjectPanel-PdvQsrbk.js → ProjectPanel-o0OWWnYQ.js} +7 -7
  19. package/dist/Settings-DclX-cDC.cjs +1 -0
  20. package/dist/{Settings-aEcWAB0x.js → Settings-zm-cF9rZ.js} +466 -449
  21. package/dist/SidePanels-0w036NaZ.cjs +1 -0
  22. package/dist/{SidePanels-uym8wfA0.js → SidePanels-TOHaLWC6.js} +40 -40
  23. package/dist/ThemeConfiguration-MBuJmbDn.cjs +1 -0
  24. package/dist/{ThemeConfiguration-7J_Qt53c.js → ThemeConfiguration-wJA_aBly.js} +9 -9
  25. package/dist/{Topbar-DkbE0ccQ.js → Topbar-Rh7dWuJD.js} +8 -8
  26. package/dist/Topbar-u5HAh7Mg.cjs +1 -0
  27. package/dist/{UILibrariesPanel-3cSqwsMi.js → UILibrariesPanel-3-cWabRt.js} +8 -8
  28. package/dist/UILibrariesPanel-xOys8g8A.cjs +1 -0
  29. package/dist/UnsplashImages-Kymq8i6b.cjs +1 -0
  30. package/dist/{UnsplashImages-owPv8UfV.js → UnsplashImages-dhU2-pHY.js} +6 -6
  31. package/dist/UploadImages-WpaiIEbj.cjs +1 -0
  32. package/dist/{UploadImages-zGp0fN1z.js → UploadImages-dr_gpAea.js} +4 -4
  33. package/dist/add-page-modal-vmUMNu7F.cjs +1 -0
  34. package/dist/{add-page-modal-pOnhQNMH.js → add-page-modal-zwq1hL_o.js} +12 -12
  35. package/dist/{confirm-alert-lbkop3bB.js → confirm-alert-73tjkqtD.js} +4 -4
  36. package/dist/confirm-alert-fK62IiTF.cjs +1 -0
  37. package/dist/controls-rRZhz0vu.cjs +1 -0
  38. package/dist/{controls-VTdJhdSz.js → controls-yjgoZzB6.js} +31 -18
  39. package/dist/core.cjs +1 -1
  40. package/dist/core.js +6 -6
  41. package/dist/{delete-page-modal-3OWHRhV4.js → delete-page-modal-DPNxHWfi.js} +6 -6
  42. package/dist/delete-page-modal-G_aMq7K4.cjs +1 -0
  43. package/dist/email-blocks.cjs +1 -1
  44. package/dist/email-blocks.js +1 -1
  45. package/dist/email.cjs +1 -1
  46. package/dist/email.js +4 -4
  47. package/dist/{form-Rqiu0P7V.cjs → form-YMuxx9Ju.cjs} +1 -1
  48. package/dist/{form-CetbKOxf.js → form-_tKI6ugY.js} +5 -5
  49. package/dist/{functions-WB3m-mfN.js → functions-JO0EW8GX.js} +1 -1
  50. package/dist/functions-ZZVUnIjD.cjs +1 -0
  51. package/dist/html-to-json-9uiQ2Dp2.cjs +1 -0
  52. package/dist/html-to-json-ofq1N3tB.js +186 -0
  53. package/dist/index-9gfJqJ6E.cjs +1 -0
  54. package/dist/index-YpnaudSM.js +63 -0
  55. package/dist/index-ecnGWzh9.cjs +1 -0
  56. package/dist/{index-Mzvi8sMV.js → index-vpfLlP7N.js} +15 -14
  57. package/dist/lib.cjs +2 -2
  58. package/dist/lib.js +19 -20
  59. package/dist/{page-viewer-7iyxGntn.js → page-viewer-UZMtWQDj.js} +12 -12
  60. package/dist/page-viewer-WQgFhgp5.cjs +1 -0
  61. package/dist/project-general-setting-Yh4fQsQH.cjs +1 -0
  62. package/dist/{project-general-setting-tHdsXTwH.js → project-general-setting-Zz7qcIW7.js} +12 -12
  63. package/dist/project-seo-setting-_gNPOTsp.cjs +1 -0
  64. package/dist/{project-seo-setting-zEBZ91Xk.js → project-seo-setting-wFOVAoC2.js} +6 -6
  65. package/dist/render.cjs +1 -1
  66. package/dist/render.js +44 -45
  67. package/dist/{single-page-detail-RBfdbTs3.js → single-page-detail-1Vveonuh.js} +21 -21
  68. package/dist/single-page-detail-EMxzuAe1.cjs +1 -0
  69. package/dist/studio.cjs +1 -1
  70. package/dist/studio.js +6 -6
  71. package/dist/ui.cjs +1 -1
  72. package/dist/ui.js +100 -100
  73. package/dist/useCodeEditor-2KOfsFsx.js +7 -0
  74. package/dist/useCodeEditor-gE1NWoNH.cjs +1 -0
  75. package/dist/{utils-K3Zk762G.cjs → utils-D_vtk3zK.cjs} +1 -1
  76. package/dist/{utils-iMv3T4WT.js → utils-VpVqnC9m.js} +1 -1
  77. package/dist/web-blocks.cjs +1 -33
  78. package/dist/web-blocks.js +471 -619
  79. package/package.json +4 -2
  80. package/dist/AddBlocks-JiIeMTE-.cjs +0 -1
  81. package/dist/CanvasArea-K_d6ORTZ.cjs +0 -55
  82. package/dist/CurrentPage-DnQKF1wT.cjs +0 -1
  83. package/dist/ListTree-HVFqaM0-.cjs +0 -1
  84. package/dist/MODIFIERS-YPHRtwrM.cjs +0 -1
  85. package/dist/PagesPanel-pIFhxLGC.cjs +0 -1
  86. package/dist/ProjectPanel-t7s3-URx.cjs +0 -1
  87. package/dist/STRINGS--j49GZJP.js +0 -7
  88. package/dist/STRINGS-gPz7CUOk.cjs +0 -1
  89. package/dist/Settings-WevLeOpk.cjs +0 -1
  90. package/dist/SidePanels-mavyE3q_.cjs +0 -1
  91. package/dist/ThemeConfiguration-F-_ieF8J.cjs +0 -1
  92. package/dist/Topbar-FjX_5927.cjs +0 -1
  93. package/dist/UILibrariesPanel-qsjCsv10.cjs +0 -1
  94. package/dist/UnsplashImages-5skIflMr.cjs +0 -1
  95. package/dist/UploadImages-olCKp-66.cjs +0 -1
  96. package/dist/add-page-modal-JE2NTOKQ.cjs +0 -1
  97. package/dist/confirm-alert-GTawvuT8.cjs +0 -1
  98. package/dist/controls-jWJDao88.cjs +0 -1
  99. package/dist/delete-page-modal-S42VXCGh.cjs +0 -1
  100. package/dist/functions-fujiWLsg.cjs +0 -1
  101. package/dist/html-to-json-VPWiWWGH.cjs +0 -1
  102. package/dist/html-to-json-Z6R2o_fA.js +0 -221
  103. package/dist/index-SZn6KcOd.cjs +0 -1
  104. package/dist/page-viewer-fFmRhZs3.cjs +0 -1
  105. package/dist/project-general-setting-0HJ_qyW3.cjs +0 -1
  106. package/dist/project-seo-setting-Ln9aX7b5.cjs +0 -1
  107. package/dist/single-page-detail-H0heOB33.cjs +0 -1
  108. package/dist/useCanvasSettings-2YhM5XKu.js +0 -6
  109. package/dist/useCanvasSettings-tDzAqXUt.cjs +0 -1
@@ -1,39 +1,39 @@
1
- var He = Object.defineProperty;
2
- var Pe = (n, s, e) => s in n ? He(n, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[s] = e;
3
- var E = (n, s, e) => (Pe(n, typeof s != "symbol" ? s + "" : s, e), e);
1
+ var Pe = Object.defineProperty;
2
+ var He = (n, s, e) => s in n ? Pe(n, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[s] = e;
3
+ var N = (n, s, e) => (He(n, typeof s != "symbol" ? s + "" : s, e), e);
4
4
  import { j as r } from "./jsx-runtime-WbnYoNE9.js";
5
- import M, { createElement as ae, useCallback as O, useState as C, useEffect as w, Component as xe, Children as ze, Suspense as ve, useRef as le, useMemo as Oe } from "react";
6
- import { map as H, includes as ce, toUpper as X, round as Ue, throttle as $e, has as ye, isEmpty as A, first as U, omit as We, pick as qe, get as f, isString as ee, memoize as Ke, each as Ye, find as Ge, filter as be, isNull as Xe } from "lodash-es";
7
- import { ResetIcon as de, SunIcon as Qe, MobileIcon as pe, LaptopIcon as Ze, DesktopIcon as Je, DotsVerticalIcon as Ve, EraserIcon as et, ZoomInIcon as tt, DragHandleDots2Icon as st, ArrowUpIcon as ot, CopyIcon as nt, TrashIcon as rt } from "@radix-ui/react-icons";
8
- import { j as ke, B as W, v as we, aq as je, ar as it, as as at, at as lt, au as ct, o as te, X as dt, h as P, av as pt, aw as ut, ax as ht, ay as mt, az as gt, aA as ft, aB as Ce, L as D, Y as N, A as xt, a as vt, b as $t, c as yt, d as bt, e as kt, f as wt, g as jt, a3 as Ct, aC as Dt, aD as _t, p as De, ap as z, aE as Bt, m as At, z as T, aF as _e, Q as It, aG as L, aH as St, i as se, w as Be, E as Ae, H as Ie, V as Et, aI as Mt, aJ as Nt, aK as Tt, F as Lt, aL as Ft, aM as Rt, aN as Ht, aO as Pt, M as zt, aP as Ot, ah as Se, a2 as Ut } from "./ChaiBuilderEditor-F2yUJQdt.js";
9
- import { useTranslation as oe } from "react-i18next";
10
- import { useAtom as y } from "jotai";
5
+ import A, { createElement as ce, useCallback as O, useState as B, useEffect as j, Component as $e, Children as ze, Suspense as Q, useRef as de, useMemo as Oe } from "react";
6
+ import { map as P, includes as pe, toUpper as X, round as Ue, throttle as ye, has as be, isEmpty as I, first as U, omit as We, pick as qe, get as f, isString as se, memoize as Ke, each as Ye, find as Ge, filter as ke, isNull as Xe } from "lodash-es";
7
+ import { ResetIcon as ue, SunIcon as Ze, MobileIcon as he, LaptopIcon as Je, DesktopIcon as Qe, DotsVerticalIcon as Ve, EraserIcon as et, ZoomInIcon as tt, DragHandleDots2Icon as st, ArrowUpIcon as ot, CopyIcon as nt, TrashIcon as rt } from "@radix-ui/react-icons";
8
+ import { j as we, B as W, v as je, ap as Ce, aq as it, ar as at, as as lt, at as ct, o as oe, W as dt, h as H, au as pt, av as ut, aw as ht, ax as mt, ay as gt, az as ft, aA as _e, K as D, X as M, A as xt, a as vt, b as $t, c as yt, d as bt, e as kt, f as wt, g as jt, a2 as Ct, aB as _t, aC as Bt, p as Be, ao as z, aD as Dt, m as At, z as T, aE as De, P as It, aF as F, aG as St, i as ne, w as Ae, E as Ie, G as Se, U as Et, aH as Nt, aI as Mt, aJ as Tt, F as Lt, aK as Ft, aL as Rt, aM as Pt, aN as Ht, L as zt, aO as Ot, ag as V, a1 as Ut } from "./ChaiBuilderEditor-KEwDa8Bl.js";
9
+ import { useTranslation as re } from "react-i18next";
10
+ import { useAtom as b } from "jotai";
11
11
  import { SparklesIcon as Wt } from "lucide-react";
12
- import ue from "react-dom";
13
- import k from "prop-types";
12
+ import me from "react-dom";
13
+ import w from "prop-types";
14
14
  import { Quill as qt } from "react-quill";
15
- import { d as ne, a as Ee } from "./atoms-ZOWyNoiC.js";
15
+ import { d as ie, a as Ee } from "./atoms-ZOWyNoiC.js";
16
16
  import { flip as Kt } from "@floating-ui/dom";
17
17
  import { useFloating as Yt, shift as Gt } from "@floating-ui/react-dom";
18
18
  import { useResizeObserver as Xt } from "@react-hookz/web";
19
- import { useFeature as Qt } from "flagged";
20
- import Zt from "@tailwindcss/typography";
21
- import Jt from "@tailwindcss/forms";
19
+ import { useFeature as Zt } from "flagged";
20
+ import Jt from "@tailwindcss/typography";
21
+ import Qt from "@tailwindcss/forms";
22
22
  import Vt from "@tailwindcss/aspect-ratio";
23
23
  import es from "tailwindcss-palette-generator";
24
24
  import { twMerge as ts } from "tailwind-merge";
25
- import { S as he, a as Me } from "./STRINGS--j49GZJP.js";
25
+ import { S as ge, a as Ne } from "./MODIFIERS-fd5XOmum.js";
26
26
  import { getBlockComponent as ss } from "@chaibuilder/runtime";
27
- import { u as os } from "./useCanvasSettings-2YhM5XKu.js";
28
- import { Provider as ns } from "react-wrap-balancer";
27
+ import { u as os, a as ns } from "./useCodeEditor-2KOfsFsx.js";
28
+ import { Provider as rs } from "react-wrap-balancer";
29
+ import { Resizable as is } from "re-resizable";
29
30
  import "./_commonjsHelpers-UyOWmZb0.js";
30
31
  import "clsx";
31
32
  import "@radix-ui/react-scroll-area";
32
33
  import "i18next";
33
34
  import "./Functions-7jnEwJyw.js";
34
- import "./MODIFIERS-cBT31iqE.js";
35
35
  import "tree-model";
36
- import "./utils-iMv3T4WT.js";
36
+ import "./utils-VpVqnC9m.js";
37
37
  import "@radix-ui/react-toggle";
38
38
  import "class-variance-authority";
39
39
  import "@radix-ui/react-switch";
@@ -55,19 +55,20 @@ import "cmdk";
55
55
  import "@radix-ui/react-context-menu";
56
56
  import "react-icons-picker";
57
57
  import "react-hotkeys-hook";
58
- const rs = () => {
59
- const { hasUndo: n, hasRedo: s, undo: e, redo: t } = ke();
58
+ import "./index-YpnaudSM.js";
59
+ const as = () => {
60
+ const { hasUndo: n, hasRedo: s, undo: e, redo: t } = we();
60
61
  return /* @__PURE__ */ r.jsxs("div", { className: "flex items-center", children: [
61
- /* @__PURE__ */ r.jsx(W, { disabled: !n(), size: "sm", onClick: e, className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ r.jsx(de, {}) }),
62
- /* @__PURE__ */ r.jsx(W, { disabled: !s(), onClick: t, size: "sm", className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ r.jsx(de, { className: "rotate-180 scale-y-[-1] transform" }) })
62
+ /* @__PURE__ */ r.jsx(W, { disabled: !n(), size: "sm", onClick: e, className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ r.jsx(ue, {}) }),
63
+ /* @__PURE__ */ r.jsx(W, { disabled: !s(), onClick: t, size: "sm", className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ r.jsx(ue, { className: "rotate-180 scale-y-[-1] transform" }) })
63
64
  ] });
64
65
  };
65
- function is() {
66
- const [n, s] = we();
66
+ function ls() {
67
+ const [n, s] = je();
67
68
  return /* @__PURE__ */ r.jsxs("div", { className: "flex items-center", children: [
68
- /* @__PURE__ */ r.jsx(Qe, { className: "size-4 shrink-0" }),
69
+ /* @__PURE__ */ r.jsx(Ze, { className: "size-4 shrink-0" }),
69
70
  /* @__PURE__ */ r.jsx(
70
- je,
71
+ Ce,
71
72
  {
72
73
  id: "dark-mode-switch",
73
74
  checked: n,
@@ -87,7 +88,7 @@ function is() {
87
88
  /* @__PURE__ */ r.jsx(it, { className: "size-4 ml-3 shrink-0" })
88
89
  ] });
89
90
  }
90
- const me = ({ landscape: n = !1 }) => /* @__PURE__ */ r.jsxs(
91
+ const fe = ({ landscape: n = !1 }) => /* @__PURE__ */ r.jsxs(
91
92
  "svg",
92
93
  {
93
94
  className: n ? "rotate-90" : "",
@@ -110,50 +111,50 @@ const me = ({ landscape: n = !1 }) => /* @__PURE__ */ r.jsxs(
110
111
  )
111
112
  ]
112
113
  }
113
- ), as = [
114
+ ), cs = [
114
115
  {
115
116
  title: "mobile_xs_title",
116
117
  content: "mobile_xs_content",
117
118
  breakpoint: "xs",
118
- icon: /* @__PURE__ */ r.jsx(pe, {}),
119
+ icon: /* @__PURE__ */ r.jsx(he, {}),
119
120
  width: 400
120
121
  },
121
122
  {
122
123
  title: "mobile_sm_title",
123
124
  content: "mobile_sm_content",
124
125
  breakpoint: "sm",
125
- icon: /* @__PURE__ */ r.jsx(pe, { className: "rotate-90" }),
126
+ icon: /* @__PURE__ */ r.jsx(he, { className: "rotate-90" }),
126
127
  width: 640
127
128
  },
128
129
  {
129
130
  title: "tablet_md_title",
130
131
  content: "tablet_md_content",
131
132
  breakpoint: "md",
132
- icon: /* @__PURE__ */ r.jsx(me, {}),
133
+ icon: /* @__PURE__ */ r.jsx(fe, {}),
133
134
  width: 800
134
135
  },
135
136
  {
136
137
  title: "tablet_lg_title",
137
138
  content: "tablet_lg_content",
138
139
  breakpoint: "lg",
139
- icon: /* @__PURE__ */ r.jsx(me, { landscape: !0 }),
140
+ icon: /* @__PURE__ */ r.jsx(fe, { landscape: !0 }),
140
141
  width: 1024
141
142
  },
142
143
  {
143
144
  title: "desktop_xl_title",
144
145
  content: "desktop_xl_content",
145
146
  breakpoint: "xl",
146
- icon: /* @__PURE__ */ r.jsx(Ze, {}),
147
+ icon: /* @__PURE__ */ r.jsx(Je, {}),
147
148
  width: 1420
148
149
  },
149
150
  {
150
151
  title: "large_desktop_2xl_title",
151
152
  content: "large_desktop_2xl_content",
152
153
  breakpoint: "2xl",
153
- icon: /* @__PURE__ */ r.jsx(Je, {}),
154
+ icon: /* @__PURE__ */ r.jsx(Qe, {}),
154
155
  width: 1920
155
156
  }
156
- ], ge = ({
157
+ ], xe = ({
157
158
  title: n,
158
159
  content: s,
159
160
  currentBreakpoint: e,
@@ -162,7 +163,7 @@ const me = ({ landscape: n = !1 }) => /* @__PURE__ */ r.jsxs(
162
163
  icon: c,
163
164
  onClick: a
164
165
  }) => {
165
- const { t: i } = oe();
166
+ const { t: i } = re();
166
167
  return /* @__PURE__ */ r.jsxs(at, { children: [
167
168
  /* @__PURE__ */ r.jsx(lt, { asChild: !0, children: /* @__PURE__ */ r.jsx(
168
169
  W,
@@ -178,26 +179,26 @@ const me = ({ landscape: n = !1 }) => /* @__PURE__ */ r.jsxs(
178
179
  /* @__PURE__ */ r.jsx("p", { className: "text-xs", children: i(s) })
179
180
  ] }) }) })
180
181
  ] });
181
- }, ls = () => {
182
- const [, n, s] = te(), [e, t] = dt(), { t: o } = oe(), c = P("breakpoints", as), a = (i) => {
182
+ }, ds = () => {
183
+ const [, n, s] = oe(), [e, t] = dt(), { t: o } = re(), c = H("breakpoints", cs), a = (i) => {
183
184
  e.includes(i) ? e.length > 2 && t(e.filter((d) => d !== i)) : t((d) => [...d, i]);
184
185
  };
185
- return c.length < 4 ? /* @__PURE__ */ r.jsx("div", { className: "flex items-center rounded-md", children: H(c, (i) => /* @__PURE__ */ ae(ge, { ...i, onClick: s, key: i.breakpoint, currentBreakpoint: n })) }) : /* @__PURE__ */ r.jsxs("div", { className: "flex items-center rounded-md", children: [
186
- H(
187
- c.filter((i) => ce(e, X(i.breakpoint))),
188
- (i) => /* @__PURE__ */ ae(ge, { ...i, onClick: s, key: i.breakpoint, currentBreakpoint: n })
186
+ return c.length < 4 ? /* @__PURE__ */ r.jsx("div", { className: "flex items-center rounded-md", children: P(c, (i) => /* @__PURE__ */ ce(xe, { ...i, onClick: s, key: i.breakpoint, currentBreakpoint: n })) }) : /* @__PURE__ */ r.jsxs("div", { className: "flex items-center rounded-md", children: [
187
+ P(
188
+ c.filter((i) => pe(e, X(i.breakpoint))),
189
+ (i) => /* @__PURE__ */ ce(xe, { ...i, onClick: s, key: i.breakpoint, currentBreakpoint: n })
189
190
  ),
190
191
  /* @__PURE__ */ r.jsxs(pt, { children: [
191
192
  /* @__PURE__ */ r.jsx(ut, { asChild: !0, children: /* @__PURE__ */ r.jsx("span", { className: "cursor-pointer px-2.5 hover:opacity-80", children: /* @__PURE__ */ r.jsx(Ve, { className: "scale-90 transform" }) }) }),
192
193
  /* @__PURE__ */ r.jsxs(ht, { className: "w-56 border-border text-xs", children: [
193
194
  /* @__PURE__ */ r.jsx(mt, { children: o("Breakpoints") }),
194
195
  /* @__PURE__ */ r.jsx(gt, {}),
195
- H(c, (i) => /* @__PURE__ */ r.jsx(
196
+ P(c, (i) => /* @__PURE__ */ r.jsx(
196
197
  ft,
197
198
  {
198
199
  disabled: i.breakpoint === "xs",
199
200
  onCheckedChange: () => a(X(i.breakpoint)),
200
- checked: ce(e, X(i.breakpoint)),
201
+ checked: pe(e, X(i.breakpoint)),
201
202
  children: o(i.title)
202
203
  },
203
204
  i.breakpoint
@@ -205,8 +206,8 @@ const me = ({ landscape: n = !1 }) => /* @__PURE__ */ r.jsxs(
205
206
  ] })
206
207
  ] })
207
208
  ] });
208
- }, cs = () => {
209
- const { t: n } = oe(), { setNewBlocks: s } = Ce(), [, e] = D(), [, t] = N(), o = O(() => {
209
+ }, ps = () => {
210
+ const { t: n } = re(), { setNewBlocks: s } = _e(), [, e] = D(), [, t] = M(), o = O(() => {
210
211
  s([]), e([]), t([]);
211
212
  }, [s]);
212
213
  return /* @__PURE__ */ r.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ r.jsxs(xt, { children: [
@@ -226,15 +227,15 @@ const me = ({ landscape: n = !1 }) => /* @__PURE__ */ r.jsxs(
226
227
  ] })
227
228
  ] })
228
229
  ] }) });
229
- }, ds = () => {
230
- const [n, s] = y(Dt);
231
- return P("askAiCallBack", null) ? /* @__PURE__ */ r.jsxs("div", { className: "flex items-center space-x-2", children: [
232
- /* @__PURE__ */ r.jsxs(_t, { htmlFor: "ai-assistant", className: "flex items-center gap-x-1 text-sm text-yellow-600", children: [
230
+ }, us = () => {
231
+ const [n, s] = b(_t);
232
+ return H("askAiCallBack", null) ? /* @__PURE__ */ r.jsxs("div", { className: "flex items-center space-x-2", children: [
233
+ /* @__PURE__ */ r.jsxs(Bt, { htmlFor: "ai-assistant", className: "flex items-center gap-x-1 text-sm text-yellow-600", children: [
233
234
  /* @__PURE__ */ r.jsx(Wt, { className: "w-4" }),
234
235
  "AI Assistant"
235
236
  ] }),
236
237
  /* @__PURE__ */ r.jsx(
237
- je,
238
+ Ce,
238
239
  {
239
240
  className: "scale-90",
240
241
  checked: n,
@@ -245,14 +246,14 @@ const me = ({ landscape: n = !1 }) => /* @__PURE__ */ r.jsxs(
245
246
  }
246
247
  )
247
248
  ] }) : null;
248
- }, ps = () => {
249
- const n = P("darkMode", !0), [s] = De();
249
+ }, hs = () => {
250
+ const n = H("darkMode", !0), [s] = Be();
250
251
  return /* @__PURE__ */ r.jsxs("div", { className: "flex h-10 items-center justify-between border-b bg-background/70 px-2", children: [
251
252
  /* @__PURE__ */ r.jsxs("div", { className: "flex h-full space-x-2", children: [
252
- /* @__PURE__ */ r.jsx(ls, {}),
253
+ /* @__PURE__ */ r.jsx(ds, {}),
253
254
  /* @__PURE__ */ r.jsx(z, { orientation: "vertical" }),
254
255
  n ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
255
- /* @__PURE__ */ r.jsx(is, {}),
256
+ /* @__PURE__ */ r.jsx(ls, {}),
256
257
  /* @__PURE__ */ r.jsx(z, { orientation: "vertical" })
257
258
  ] }) : null,
258
259
  /* @__PURE__ */ r.jsxs("div", { className: "flex w-12 cursor-not-allowed items-center justify-center gap-x-1 space-x-0 font-medium text-gray-400", children: [
@@ -264,15 +265,15 @@ const me = ({ landscape: n = !1 }) => /* @__PURE__ */ r.jsxs(
264
265
  ] })
265
266
  ] }),
266
267
  /* @__PURE__ */ r.jsx(z, { orientation: "vertical" }),
267
- /* @__PURE__ */ r.jsx(rs, {})
268
+ /* @__PURE__ */ r.jsx(as, {})
268
269
  ] }),
269
270
  /* @__PURE__ */ r.jsxs("div", { className: "flex h-full items-center space-x-2", children: [
270
- /* @__PURE__ */ r.jsx(cs, {}),
271
+ /* @__PURE__ */ r.jsx(ps, {}),
271
272
  /* @__PURE__ */ r.jsx(z, { orientation: "vertical" }),
272
- /* @__PURE__ */ r.jsx(ds, {})
273
+ /* @__PURE__ */ r.jsx(us, {})
273
274
  ] })
274
275
  ] });
275
- }, us = `<!doctype html>
276
+ }, ms = `<!doctype html>
276
277
  <html lang="en" dir="__HTML_DIR__" class="scroll-smooth h-full overflow-y-auto">
277
278
  <head>
278
279
  <meta charset="UTF-8">
@@ -309,6 +310,7 @@ const me = ({ landscape: n = !1 }) => /* @__PURE__ */ r.jsxs(
309
310
  }
310
311
  .frame-root .frame-content { height: 100%; }
311
312
  [data-drop="yes"] { outline: 2px dashed orange !important; outline-offset: -2px }
313
+ [data-dnd="yes"] { pointer-events: auto !important}
312
314
  [data-dnd="no"] { pointer-events: none !important; }
313
315
  </style>
314
316
  <style id="hidden-blocks"></style>
@@ -322,8 +324,8 @@ const me = ({ landscape: n = !1 }) => /* @__PURE__ */ r.jsxs(
322
324
  <div class="frame-root h-full"></div>
323
325
  <script src="https://cdn.jsdelivr.net/npm/quill@2.0.0/dist/quill.js"><\/script>
324
326
  </body>
325
- </html>`, hs = (n) => {
326
- const [s] = te(), [, e] = De(), [t, o] = C({}), c = O(() => {
327
+ </html>`, gs = (n) => {
328
+ const [s] = oe(), [, e] = Be(), [t, o] = B({}), c = O(() => {
327
329
  const { width: a, height: i } = n;
328
330
  if (a < s) {
329
331
  const d = parseFloat((a / s).toFixed(2).toString());
@@ -343,15 +345,15 @@ const me = ({ landscape: n = !1 }) => /* @__PURE__ */ r.jsxs(
343
345
  } else
344
346
  o({}), e(100);
345
347
  }, [s, n, e]);
346
- return w(() => {
348
+ return j(() => {
347
349
  c();
348
350
  }, [s, n, e, c]), t;
349
351
  };
350
- let Ne, Te;
351
- typeof document < "u" && (Ne = document);
352
+ let Me, Te;
353
+ typeof document < "u" && (Me = document);
352
354
  typeof window < "u" && (Te = window);
353
- const Le = M.createContext({ document: Ne, window: Te }), q = () => M.useContext(Le), { Provider: ms, Consumer: Oo } = Le;
354
- class Fe extends xe {
355
+ const Le = A.createContext({ document: Me, window: Te }), q = () => A.useContext(Le), { Provider: fs, Consumer: Yo } = Le;
356
+ class Fe extends $e {
355
357
  componentDidMount() {
356
358
  this.props.contentDidMount();
357
359
  }
@@ -362,28 +364,28 @@ class Fe extends xe {
362
364
  return ze.only(this.props.children);
363
365
  }
364
366
  }
365
- E(Fe, "propTypes", {
366
- children: k.element.isRequired,
367
- contentDidMount: k.func.isRequired,
368
- contentDidUpdate: k.func.isRequired
367
+ N(Fe, "propTypes", {
368
+ children: w.element.isRequired,
369
+ contentDidMount: w.func.isRequired,
370
+ contentDidUpdate: w.func.isRequired
369
371
  });
370
- class J extends xe {
372
+ class ee extends $e {
371
373
  constructor(e, t) {
372
374
  super(e, t);
373
- E(this, "setRef", (e) => {
375
+ N(this, "setRef", (e) => {
374
376
  this.nodeRef.current = e;
375
377
  const { forwardedRef: t } = this.props;
376
378
  typeof t == "function" ? t(e) : t && (t.current = e);
377
379
  });
378
- E(this, "handleLoad", () => {
380
+ N(this, "handleLoad", () => {
379
381
  clearInterval(this.loadCheck), this.state.iframeLoaded || this.setState({ iframeLoaded: !0 });
380
382
  });
381
383
  // In certain situations on a cold cache DOMContentLoaded never gets called
382
384
  // fallback to an interval to check if that's the case
383
- E(this, "loadCheck", () => setInterval(() => {
385
+ N(this, "loadCheck", () => setInterval(() => {
384
386
  this.handleLoad();
385
387
  }, 500));
386
- this._isMounted = !1, this.nodeRef = M.createRef(), this.state = { iframeLoaded: !1 };
388
+ this._isMounted = !1, this.nodeRef = A.createRef(), this.state = { iframeLoaded: !1 };
387
389
  }
388
390
  componentDidMount() {
389
391
  this._isMounted = !0, this.getDoc() && this.nodeRef.current.contentWindow.addEventListener("DOMContentLoaded", this.handleLoad);
@@ -404,8 +406,8 @@ class J extends xe {
404
406
  const e = this.getDoc();
405
407
  if (!e)
406
408
  return null;
407
- const t = this.props.contentDidMount, o = this.props.contentDidUpdate, c = e.defaultView || e.parentView, a = /* @__PURE__ */ r.jsx(Fe, { contentDidMount: t, contentDidUpdate: o, children: /* @__PURE__ */ r.jsx(ms, { value: { document: e, window: c }, children: /* @__PURE__ */ r.jsx("div", { className: "frame-content", children: this.props.children }) }) }), i = this.getMountTarget();
408
- return [ue.createPortal(this.props.head, this.getDoc().head), ue.createPortal(a, i)];
409
+ const t = this.props.contentDidMount, o = this.props.contentDidUpdate, c = e.defaultView || e.parentView, a = /* @__PURE__ */ r.jsx(Fe, { contentDidMount: t, contentDidUpdate: o, children: /* @__PURE__ */ r.jsx(fs, { value: { document: e, window: c }, children: /* @__PURE__ */ r.jsx("div", { className: "frame-content", children: this.props.children }) }) }), i = this.getMountTarget();
410
+ return [me.createPortal(this.props.head, this.getDoc().head), me.createPortal(a, i)];
409
411
  }
410
412
  render() {
411
413
  const e = {
@@ -421,16 +423,16 @@ class J extends xe {
421
423
  // also inject into the body and can mess up React. For this reason
422
424
  // initialContent is expected to have a div inside of the body
423
425
  // element that we render react into.
424
- E(J, "propTypes", {
425
- style: k.object,
426
+ N(ee, "propTypes", {
427
+ style: w.object,
426
428
  // eslint-disable-line
427
- head: k.node,
428
- initialContent: k.string,
429
- mountTarget: k.string,
430
- contentDidMount: k.func,
431
- contentDidUpdate: k.func,
432
- children: k.oneOfType([k.element, k.arrayOf(k.element)])
433
- }), E(J, "defaultProps", {
429
+ head: w.node,
430
+ initialContent: w.string,
431
+ mountTarget: w.string,
432
+ contentDidMount: w.func,
433
+ contentDidUpdate: w.func,
434
+ children: w.oneOfType([w.element, w.arrayOf(w.element)])
435
+ }), N(ee, "defaultProps", {
434
436
  style: {},
435
437
  head: null,
436
438
  children: void 0,
@@ -441,10 +443,10 @@ E(J, "propTypes", {
441
443
  },
442
444
  initialContent: '<!DOCTYPE html><html><head></head><body><div class="frame-root"></div></body></html>'
443
445
  });
444
- const gs = M.forwardRef((n, s) => /* @__PURE__ */ r.jsx(J, { ...n, forwardedRef: s }));
445
- function re(n) {
446
+ const xs = A.forwardRef((n, s) => /* @__PURE__ */ r.jsx(ee, { ...n, forwardedRef: s }));
447
+ function ae(n) {
446
448
  const s = window.getComputedStyle(n), e = s.display;
447
- if (e === "flex") {
449
+ if (e === "flex" || e === "inline-flex") {
448
450
  const t = s.flexDirection;
449
451
  return t === "column" || t === "column-reverse" ? "vertical" : "horizontal";
450
452
  } else if (e === "grid") {
@@ -454,105 +456,113 @@ function re(n) {
454
456
  return "vertical";
455
457
  return "horizontal";
456
458
  }
457
- let _ = null, B = [], R = null, Q = null;
458
- const fe = (n, s, e) => {
459
- if (!_ || !n)
459
+ let v = null, _ = [], R = null, Z = null;
460
+ const ve = (n, s, e) => {
461
+ if (!v || !n)
460
462
  return;
461
- const t = _ == null ? void 0 : _.getElementById("placeholder"), c = B.map(([i]) => i).reduce(
462
- (i, d) => Math.abs(d - e) < Math.abs(i - e) ? d : i,
463
+ const t = v == null ? void 0 : v.getElementById("placeholder"), o = _.map(([d]) => d), c = o.reduce(
464
+ (d, l) => Math.abs(l - e) < Math.abs(d - e) ? l : d,
463
465
  0
464
- );
465
- if (!B[c])
466
+ ), a = o.indexOf(c);
467
+ if (!_[a])
466
468
  return;
467
- const a = B[c];
468
- t.style.width = s === "vertical" ? a[2] + "px" : "2px", t.style.height = s === "vertical" ? "2px" : a[2] + "px", t.style.display = "block", s === "vertical" ? (t.style.top = a[0] + "px", t.style.left = a[1] + "px") : (t.style.top = a[1] + "px", t.style.left = a[0] + "px");
469
+ const i = _[a];
470
+ t.style.width = s === "vertical" ? i[2] + "px" : "2px", t.style.height = s === "vertical" ? "2px" : i[2] + "px", t.style.display = "block", s === "vertical" ? (t.style.top = i[0] + "px", t.style.left = i[1] + "px") : (t.style.top = i[1] + "px", t.style.left = i[0] + "px");
469
471
  };
470
- function fs(n, s) {
472
+ function vs(n, s) {
471
473
  let e = 0, t = 1 / 0;
472
474
  return s.forEach((o, c) => {
473
475
  const a = Math.abs(o[0] - n);
474
476
  a < t && (t = a, e = c);
475
477
  }), e;
476
478
  }
477
- const xs = (n) => {
478
- const e = re(n) === "horizontal";
479
- B = [], Array.from(n.children).forEach((t) => {
479
+ const $s = (n) => {
480
+ const e = ae(n) === "horizontal";
481
+ _ = [], Array.from(n.children).forEach((t, o) => {
480
482
  if (t.classList.contains("pointer-events-none"))
481
483
  return;
482
- const o = e ? t.offsetLeft : t.offsetTop, c = e ? [t.offsetTop, t.clientHeight] : [t.offsetLeft, t.clientWidth];
483
- B.push([o, c[0], c[1]]);
484
+ const c = e ? t.offsetLeft : t.offsetTop, a = e ? [t.offsetTop, t.clientHeight] : [t.offsetLeft, t.clientWidth];
485
+ if (_.push([c, a[0], a[1]]), o === n.children.length - 1) {
486
+ const i = e ? t.offsetLeft + t.clientWidth : t.offsetTop + t.clientHeight;
487
+ _.push([i, a[0], a[1]]);
488
+ }
484
489
  });
485
- }, vs = $e((n) => {
486
- const s = n.target, e = re(s);
487
- if (e === "vertical") {
488
- const t = n.clientY - s.offsetTop;
489
- fe(s, e, t);
490
- } else {
491
- const t = n.clientX - s.offsetLeft;
492
- fe(s, e, t);
493
- }
494
- }, 200);
495
- function Z() {
496
- const n = _ == null ? void 0 : _.getElementById("placeholder");
497
- n.style.display = "none", $s("pointer-none");
490
+ }, ys = ye((n) => {
491
+ var o;
492
+ const s = n.target, e = ae(s), t = (o = v == null ? void 0 : v.defaultView) == null ? void 0 : o.scrollY;
493
+ e === "vertical" ? ve(s, e, n.clientY + t) : ve(s, e, n.clientX);
494
+ }, 0);
495
+ function J() {
496
+ const n = v == null ? void 0 : v.getElementById("placeholder");
497
+ n.style.display = "none", bs("pointer-none"), ks();
498
498
  }
499
- function $s(n) {
500
- document.querySelectorAll(`.${n}`).forEach((e) => {
499
+ function bs(n) {
500
+ (v == null ? void 0 : v.querySelectorAll(`.${n}`)).forEach((e) => {
501
501
  e.classList.remove(n);
502
502
  });
503
503
  }
504
- const ys = () => {
505
- const { document: n } = q(), [s, e] = y(Bt), { addCoreBlock: t } = At(), [, o] = T(), [, c] = D(), { moveBlocks: a } = Ce(), [, i] = y(_e), [d, l] = y(ne), [, h] = y(Ee);
506
- return _ = n, {
504
+ function ks() {
505
+ const n = v == null ? void 0 : v.querySelector('[data-drop="yes"]');
506
+ n && n.removeAttribute("data-drop");
507
+ }
508
+ const ws = () => {
509
+ const { document: n } = q(), [s, e] = b(Dt), { addCoreBlock: t } = At(), [, o] = T(), [, c] = D(), { moveBlocks: a } = _e(), [, i] = b(De), [d, l] = b(ie), [, h] = b(Ee);
510
+ return v = n, {
507
511
  isDragging: s,
508
512
  onDragOver: (p) => {
509
- p.preventDefault(), p.stopPropagation(), vs(p);
513
+ p.preventDefault(), p.stopPropagation(), ys(p);
510
514
  },
511
515
  onDrop: (p) => {
516
+ var C;
512
517
  R == null || R.classList.remove("drop-target");
513
- const u = R, $ = re(u) === "vertical" ? p.clientY : p.clientX;
514
- Q = fs($, B);
518
+ const u = R, y = ae(u) === "vertical" ? p.clientY + ((C = v == null ? void 0 : v.defaultView) == null ? void 0 : C.scrollY) : p.clientX;
519
+ Z = vs(y, _);
515
520
  const g = d, m = u.getAttribute("data-block-id");
516
- if (!ye(g, "_id")) {
517
- t(g, m === "canvas" ? null : m, Q), setTimeout(() => {
518
- Z();
519
- }, 300), B = [], e(!1), i(""), l(null), h(null);
521
+ if (!be(g, "_id")) {
522
+ t(g, m === "canvas" ? null : m, Z), setTimeout(() => {
523
+ J();
524
+ }, 300), _ = [], e(!1), i(""), l(null), h(null);
520
525
  return;
521
526
  }
522
- let b = u.getAttribute("data-block-id");
523
- b === null && (b = p.target.parentElement.getAttribute("data-block-id")), a([g._id], b, Q), Z(), e(!1), i(""), setTimeout(() => Z(), 300);
527
+ let k = u.getAttribute("data-block-id");
528
+ k === null && (k = p.target.parentElement.getAttribute("data-block-id")), a([g._id], k, Z), J(), e(!1), i(""), _ = [], setTimeout(() => J(), 300);
524
529
  },
525
530
  onDragEnter: (p) => {
526
- const u = p, v = u.target;
527
- R = v;
528
- const $ = v.getAttribute("data-block-id");
529
- h($), u.stopPropagation(), u.preventDefault(), B = [], xs(v), v.classList.add("drop-target"), e(!0), o(""), c([]);
531
+ const u = p, $ = u.target;
532
+ R = $;
533
+ const y = $.getAttribute("data-block-id");
534
+ h(y), u.stopPropagation(), u.preventDefault(), _ = [], $s($), console.log(_, p.clientY, v.defaultView.scrollY), $.classList.add("drop-target"), e(!0), o(""), c([]);
530
535
  }
531
536
  // onDragLeave: (e: DragEvent) => {
532
537
  // const event = e;
533
- // dropTarget = null;
534
538
  // event.stopPropagation();
535
539
  // event.preventDefault();
536
540
  // const target = event.target as HTMLElement;
537
- // target.classList.remove("drop-target");
541
+ // if (target && target.classList.contains("drop-target")) {
542
+ // target.classList.remove("drop-target");
543
+ // if (dropTarget === target) {
544
+ // dropTarget = null;
545
+ // }
546
+ // }
547
+ // removePlaceholder();
538
548
  // },
539
549
  };
540
550
  };
541
- function ie(n) {
551
+ function le(n) {
542
552
  return n.getAttribute("data-block-id") ? n : n.closest("[data-block-id]");
543
553
  }
544
- function bs(n) {
554
+ function js(n) {
545
555
  n.container.innerHTML = "", n.container.parentNode.removeChild(n.container);
546
556
  var s = document.querySelector(".ql-toolbar");
547
557
  s && s.parentNode.removeChild(s), n = null;
548
558
  }
549
- const ks = () => {
550
- const n = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], s = It(), [, e] = T(), [t, o] = y(L);
559
+ const Cs = () => {
560
+ const n = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], s = It(), [, e] = T(), [t, o] = b(F);
551
561
  return (c) => {
552
562
  var p;
553
563
  if (t)
554
564
  return;
555
- const a = ie(c.target), i = a.getAttribute("data-block-type");
565
+ const a = le(c.target), i = a.getAttribute("data-block-type");
556
566
  if (!i || !n.includes(i))
557
567
  return;
558
568
  const d = a.cloneNode(!0);
@@ -562,45 +572,45 @@ const ks = () => {
562
572
  const l = new qt(d, { placeholder: "Type here..." });
563
573
  function h() {
564
574
  const u = l.getText(0, l.getLength());
565
- s([a.getAttribute("data-block-id")], { content: u }), a.removeAttribute("style"), d.removeEventListener("blur", h, !0), bs(l), o(""), e("");
575
+ s([a.getAttribute("data-block-id")], { content: u }), a.removeAttribute("style"), d.removeEventListener("blur", h, !0), js(l), o(""), e("");
566
576
  }
567
577
  d.addEventListener("blur", h, !0), d.addEventListener("keydown", (u) => {
568
578
  (u.key === "Enter" || u.key === "Escape") && h();
569
579
  }), l.focus(), (p = d.querySelector(".ql-clipboard")) == null || p.remove(), o(a.getAttribute("data-block-id"));
570
580
  };
571
- }, ws = () => {
572
- const [, n] = N(), [s, e] = D(), [, t] = T(), [o] = y(L), [c] = y(St);
581
+ }, _s = () => {
582
+ const [, n] = M(), [s, e] = D(), [, t] = T(), [o] = b(F), [c] = b(St);
573
583
  return (a) => {
574
584
  if (o)
575
585
  return;
576
586
  a.stopPropagation();
577
- const i = ie(a.target);
587
+ const i = le(a.target);
578
588
  if (i != null && i.getAttribute("data-block-id") && (i == null ? void 0 : i.getAttribute("data-block-id")) === "container") {
579
589
  e([]), n([]), t("");
580
590
  return;
581
591
  }
582
592
  if (i != null && i.getAttribute("data-block-parent")) {
583
593
  const d = i.getAttribute("data-style-prop"), l = i.getAttribute("data-style-id"), h = i.getAttribute("data-block-parent");
584
- s.includes(h) || c.closeAll(), n([{ id: l, prop: d, blockId: h }]), e([h]);
594
+ s.includes(h) || c == null || c.closeAll(), n([{ id: l, prop: d, blockId: h }]), e([h]);
585
595
  } else if (i != null && i.getAttribute("data-block-id")) {
586
596
  let d = i.getAttribute("data-block-id");
587
- s.includes(d) || c.closeAll(), e([d]);
597
+ s.includes(d) || c == null || c.closeAll(), e([d]);
588
598
  }
589
599
  t("");
590
600
  };
591
- }, js = $e((n, s) => {
592
- const e = ie(n.target);
601
+ }, Bs = ye((n, s) => {
602
+ const e = le(n.target);
593
603
  e != null && e.getAttribute("data-style-id") && s(e.getAttribute("data-style-id"));
594
- }, 100), Cs = () => {
595
- const [, n] = T(), [s] = y(L);
604
+ }, 100), Ds = () => {
605
+ const [, n] = T(), [s] = b(F);
596
606
  return (e) => {
597
- s || js(e, n);
607
+ s || Bs(e, n);
598
608
  };
599
- }, Ds = ({ children: n }) => {
600
- const { document: s } = q(), [e] = D(), [t, o] = N();
601
- w(() => {
609
+ }, As = ({ children: n }) => {
610
+ const { document: s } = q(), [e] = D(), [t, o] = M();
611
+ j(() => {
602
612
  setTimeout(() => {
603
- if (!A(t))
613
+ if (!I(t))
604
614
  return;
605
615
  const l = Re(s, U(e));
606
616
  if (l) {
@@ -612,7 +622,7 @@ const ks = () => {
612
622
  }
613
623
  }, 100);
614
624
  }, [s, e, o, t]);
615
- const c = ks(), a = ws(), i = Cs(), d = ys();
625
+ const c = Cs(), a = _s(), i = Ds(), d = ws();
616
626
  return /* @__PURE__ */ r.jsx(
617
627
  "div",
618
628
  {
@@ -626,24 +636,24 @@ const ks = () => {
626
636
  children: n
627
637
  }
628
638
  );
629
- }, Re = (n, s) => n.querySelector(`[data-block-id="${s}"]`), _s = () => {
630
- const { window: n } = q(), [s, e] = D(), [t] = se(), [, o] = N(), { undo: c, redo: a } = ke(), i = Be(), [, d] = Ae(), l = Ie(), { savePage: h } = Et(), [p] = y(L), [, u] = y(Mt), v = (g) => {
639
+ }, Re = (n, s) => n.querySelector(`[data-block-id="${s}"]`), Is = () => {
640
+ const { window: n } = q(), [s, e] = D(), [t] = ne(), [, o] = M(), { undo: c, redo: a } = we(), i = Ae(), [, d] = Ie(), l = Se(), { savePage: h } = Et(), [p] = b(F), [, u] = b(Nt), $ = (g) => {
631
641
  g.key === "Enter" && (g.preventDefault(), s.length === 1 && u(U(s)));
632
- }, $ = (g) => {
633
- const m = t.find((b) => b._id === g);
642
+ }, y = (g) => {
643
+ const m = t.find((k) => k._id === g);
634
644
  return m ? m._parent : null;
635
645
  };
636
- return w(() => {
646
+ return j(() => {
637
647
  const g = (m) => {
638
648
  if (m.key === "Escape") {
639
649
  e([]), o([]);
640
650
  return;
641
651
  }
642
- if (v(m), !p && (m.key === "Delete" || m.key === "Backspace") && (m.preventDefault(), l(s)), m.ctrlKey || m.metaKey) {
652
+ if ($(m), !p && (m.key === "Delete" || m.key === "Backspace") && (m.preventDefault(), l(s)), m.ctrlKey || m.metaKey) {
643
653
  if (m.key === "ArrowUp") {
644
654
  m.preventDefault();
645
- const b = s.length > 0 ? $(s[0]) : null;
646
- b && e([b]);
655
+ const k = s.length > 0 ? y(s[0]) : null;
656
+ k && e([k]);
647
657
  }
648
658
  if (["z", "y", "d", "x", "c", "p", "s", "v"].includes(m.key)) {
649
659
  if (p && ["x", "z", "v"].includes(m.key))
@@ -657,8 +667,8 @@ const ks = () => {
657
667
  n.removeEventListener("keydown", g);
658
668
  };
659
669
  }, [s, e, c, l, d, a, i, p, h, n]), null;
660
- }, Bs = ({ block: n, label: s }) => {
661
- const [, e] = D(), [, t] = T(), [, o] = y(ne), c = Qt("dnd");
670
+ }, Ss = ({ block: n, label: s }) => {
671
+ const [, e] = D(), [, t] = T(), [, o] = b(ie), c = Zt("dnd");
662
672
  return /* @__PURE__ */ r.jsxs(
663
673
  "div",
664
674
  {
@@ -675,8 +685,8 @@ const ks = () => {
675
685
  ]
676
686
  }
677
687
  );
678
- }, As = ({ selectedBlockElement: n, block: s }) => {
679
- const e = Ie(), t = Be(), [, o] = D(), [, c] = N(), [a] = y(L), { floatingStyles: i, refs: d, update: l } = Yt({
688
+ }, Es = ({ selectedBlockElement: n, block: s }) => {
689
+ const e = Se(), t = Ae(), [, o] = D(), [, c] = M(), [a] = b(F), { floatingStyles: i, refs: d, update: l } = Yt({
680
690
  placement: "top-start",
681
691
  middleware: [Gt(), Kt()],
682
692
  elements: {
@@ -684,7 +694,7 @@ const ks = () => {
684
694
  }
685
695
  });
686
696
  Xt(n, () => l(), n !== null);
687
- const h = f(s, "_parent", null), p = A(f(s, "_name", "")) ? f(s, "_type", "") : f(s, "_name", "");
697
+ const h = f(s, "_parent", null), p = I(f(s, "_name", "")) ? f(s, "_type", "") : f(s, "_name", "");
688
698
  return !n || !s || a ? null : /* @__PURE__ */ r.jsx(r.Fragment, { children: /* @__PURE__ */ r.jsxs(
689
699
  "div",
690
700
  {
@@ -698,7 +708,7 @@ const ks = () => {
698
708
  onKeyDown: (u) => u.stopPropagation(),
699
709
  className: "z-[99999] flex h-6 items-center bg-blue-500 py-2 text-xs text-white",
700
710
  children: [
701
- /* @__PURE__ */ r.jsx(Bs, { label: p, block: s }),
711
+ /* @__PURE__ */ r.jsx(Ss, { label: p, block: s }),
702
712
  /* @__PURE__ */ r.jsxs("div", { className: "flex gap-2 px-1", children: [
703
713
  h && /* @__PURE__ */ r.jsx(
704
714
  ot,
@@ -709,13 +719,13 @@ const ks = () => {
709
719
  }
710
720
  }
711
721
  ),
712
- Nt(f(s, "_type", "")) ? /* @__PURE__ */ r.jsx(nt, { className: "hover:scale-105", onClick: () => t([s == null ? void 0 : s._id]) }) : null,
722
+ Mt(f(s, "_type", "")) ? /* @__PURE__ */ r.jsx(nt, { className: "hover:scale-105", onClick: () => t([s == null ? void 0 : s._id]) }) : null,
713
723
  Tt(f(s, "_type", "")) ? /* @__PURE__ */ r.jsx(rt, { className: "hover:scale-105", onClick: () => e([s == null ? void 0 : s._id]) }) : null
714
724
  ] })
715
725
  ]
716
726
  }
717
727
  ) });
718
- }, Is = ({ addVariant: n, e: s }) => {
728
+ }, Ns = ({ addVariant: n, e: s }) => {
719
729
  n("hs-dropdown-open", [
720
730
  ({ modifySelectors: e, separator: t }) => {
721
731
  e(({ className: o }) => `.hs-dropdown.open > .${s(`hs-dropdown-open${t}${o}`)}`);
@@ -968,24 +978,24 @@ const ks = () => {
968
978
  }), n("hs-auto-mode-active", ({ modifySelectors: e, separator: t }) => {
969
979
  e(({ className: o }) => `.auto .${s(`hs-auto-mode-active${t}${o}`)}`);
970
980
  });
971
- }, Ss = ({ model: n }) => {
972
- const [s] = Lt(), [e] = D(), [t] = we(), [o] = T(), [c] = N(), [a] = y(_e), { document: i, window: d } = q(), [l] = C(i == null ? void 0 : i.getElementById("highlighted-block")), [h] = C(
981
+ }, Ms = ({ model: n }) => {
982
+ const [s] = Lt(), [e] = D(), [t] = je(), [o] = T(), [c] = M(), [a] = b(De), { document: i, window: d } = q(), [l] = B(i == null ? void 0 : i.getElementById("highlighted-block")), [h] = B(
973
983
  i == null ? void 0 : i.getElementById("selected-block")
974
- ), [p] = C(
984
+ ), [p] = B(
975
985
  i == null ? void 0 : i.getElementById("selected-styling-block")
976
- ), [u] = C(i == null ? void 0 : i.getElementById("dragged-block"));
977
- w(() => {
986
+ ), [u] = B(i == null ? void 0 : i.getElementById("dragged-block"));
987
+ j(() => {
978
988
  t ? i == null || i.documentElement.classList.add("dark") : i == null || i.documentElement.classList.remove("dark");
979
989
  }, [t, i]);
980
- const v = f(s, "headingFont", "DM Sans"), $ = f(s, "bodyFont", "DM Sans");
981
- return w(() => {
982
- const g = f(s, "primaryColor", "#000"), m = f(s, "secondaryColor", "#FFF"), b = f(s, "bodyBgLightColor", "#fff"), j = f(s, "bodyBgDarkColor", "#000"), F = f(s, "bodyTextDarkColor", "#000"), K = f(s, "bodyTextLightColor", "#fff"), Y = es([
990
+ const $ = f(s, "headingFont", "DM Sans"), y = f(s, "bodyFont", "DM Sans");
991
+ return j(() => {
992
+ const g = f(s, "primaryColor", "#000"), m = f(s, "secondaryColor", "#FFF"), k = f(s, "bodyBgLightColor", "#fff"), C = f(s, "bodyBgDarkColor", "#000"), L = f(s, "bodyTextDarkColor", "#000"), K = f(s, "bodyTextLightColor", "#fff"), Y = es([
983
993
  { color: g, name: "primary" },
984
994
  { color: m, name: "secondary" }
985
995
  ]), G = {
986
- "bg-light": b,
987
- "bg-dark": j,
988
- "text-dark": F,
996
+ "bg-light": k,
997
+ "bg-dark": C,
998
+ "text-dark": L,
989
999
  "text-light": K
990
1000
  }, x = f(s, "roundedCorners", "0");
991
1001
  !d || !d.tailwind || (d.tailwind.config = {
@@ -1000,8 +1010,8 @@ const ks = () => {
1000
1010
  }
1001
1011
  },
1002
1012
  fontFamily: {
1003
- heading: [v],
1004
- body: [$]
1013
+ heading: [$],
1014
+ body: [y]
1005
1015
  },
1006
1016
  borderRadius: {
1007
1017
  DEFAULT: `${x || "0"}px`
@@ -1009,114 +1019,114 @@ const ks = () => {
1009
1019
  colors: { ...G, ...Y }
1010
1020
  }
1011
1021
  },
1012
- plugins: [Zt, Jt, Vt, d.tailwind.plugin.withOptions(() => Is)]
1022
+ plugins: [Jt, Qt, Vt, d.tailwind.plugin.withOptions(() => Ns)]
1013
1023
  });
1014
- }, [s, d, v, $]), w(() => {
1015
- h && (h.textContent = `${H(e, (g) => `[data-block-id="${g}"]`).join(",")}{
1024
+ }, [s, d, $, y]), j(() => {
1025
+ h && (h.textContent = `${P(e, (g) => `[data-block-id="${g}"]`).join(",")}{
1016
1026
  outline: 1px solid ${e.length === 1 ? "#42a1fc" : "orange"} !important; outline-offset: -1px;
1017
1027
  }`);
1018
- }, [e, h]), w(() => {
1028
+ }, [e, h]), j(() => {
1019
1029
  if (!a) {
1020
1030
  u.textContent = "";
1021
1031
  return;
1022
1032
  }
1023
1033
  u.textContent = `[data-block-id="${a}"]{ pointer-events: none !important; opacity: 0.2 !important}`;
1024
- }, [a]), w(() => {
1034
+ }, [a]), j(() => {
1025
1035
  l && (l.textContent = o ? `[data-style-id="${o}"]{ outline: 1px solid #42a1fc !important; outline-offset: -1px;}` : "");
1026
- }, [o, e, l]), w(() => {
1027
- p && (p.textContent = `${H(c, ({ id: g }) => `[data-style-id="${g}"]`).join(",")}{
1036
+ }, [o, e, l]), j(() => {
1037
+ p && (p.textContent = `${P(c, ({ id: g }) => `[data-style-id="${g}"]`).join(",")}{
1028
1038
  outline: 1px solid #42a1fc !important; outline-offset: -1px;
1029
1039
  }`);
1030
- }, [c, p]), w(() => {
1031
- const g = f(s, "bodyTextLightColor", "#64748b"), m = f(s, "bodyTextDarkColor", "#94a3b8"), b = f(s, "bodyBgLightColor", "#FFFFFF"), j = f(s, "bodyBgDarkColor", "#0f172a");
1032
- i.body.className = `font-body antialiased text-[${g}] bg-[${b}] dark:text-[${m}] dark:bg-[${j}]`;
1040
+ }, [c, p]), j(() => {
1041
+ const g = f(s, "bodyTextLightColor", "#64748b"), m = f(s, "bodyTextDarkColor", "#94a3b8"), k = f(s, "bodyBgLightColor", "#FFFFFF"), C = f(s, "bodyBgDarkColor", "#0f172a");
1042
+ i.body.className = `font-body antialiased text-[${g}] bg-[${k}] dark:text-[${m}] dark:bg-[${C}]`;
1033
1043
  }, [s, i, n]), n === "page" ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
1034
- v && /* @__PURE__ */ r.jsx(
1044
+ $ && /* @__PURE__ */ r.jsx(
1035
1045
  "link",
1036
1046
  {
1037
1047
  id: "heading-font",
1038
1048
  rel: "stylesheet",
1039
1049
  type: "text/css",
1040
- href: `https://fonts.googleapis.com/css2?family=${v.replace(
1050
+ href: `https://fonts.googleapis.com/css2?family=${$.replace(
1041
1051
  / /g,
1042
1052
  "+"
1043
1053
  )}:wght@300;400;500;600;700;800;900&display=swap`,
1044
1054
  media: "all"
1045
1055
  }
1046
1056
  ),
1047
- $ && v !== $ && /* @__PURE__ */ r.jsx(
1057
+ y && $ !== y && /* @__PURE__ */ r.jsx(
1048
1058
  "link",
1049
1059
  {
1050
1060
  id: "body-font",
1051
1061
  rel: "stylesheet",
1052
1062
  type: "text/css",
1053
- href: `https://fonts.googleapis.com/css2?family=${$.replace(
1063
+ href: `https://fonts.googleapis.com/css2?family=${y.replace(
1054
1064
  / /g,
1055
1065
  "+"
1056
1066
  )}:wght@300;400;500;600;700;800;900&display=swap`,
1057
1067
  media: "all"
1058
1068
  }
1059
1069
  ),
1060
- 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";}` })
1070
+ $ && /* @__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";}` })
1061
1071
  ] }) : null;
1062
- }, Es = (n) => {
1072
+ }, Ts = (n) => {
1063
1073
  const s = {};
1064
1074
  return Object.keys(n).forEach((e) => {
1065
- ee(n[e]) && n[e].startsWith(he) && (s[e] = n[e].replace(he, "").split(","));
1075
+ se(n[e]) && n[e].startsWith(ge) && (s[e] = n[e].replace(ge, "").split(","));
1066
1076
  }), s;
1067
- }, Ms = Ke((n) => {
1068
- const s = n.replace(Me, "").split(",");
1077
+ }, Ls = Ke((n) => {
1078
+ const s = n.replace(Ne, "").split(",");
1069
1079
  return ts(s[0], s[1]);
1070
1080
  });
1071
- function Ns(n, s) {
1081
+ function Fs(n, s) {
1072
1082
  return f(n, `${s}_attrs`, {});
1073
1083
  }
1074
- function Ts(n) {
1084
+ function Rs(n) {
1075
1085
  const s = {};
1076
1086
  return Object.keys(n).forEach((e) => {
1077
- if (ee(n[e]) && n[e].startsWith(Me)) {
1078
- const t = Ms(n[e]);
1087
+ if (se(n[e]) && n[e].startsWith(Ne)) {
1088
+ const t = Ls(n[e]);
1079
1089
  s[e] = {
1080
1090
  className: t,
1081
1091
  "data-style-prop": e,
1082
1092
  "data-block-parent": n._id,
1083
1093
  "data-style-id": `${e}-${n._id}`,
1084
- ...Ns(n, e)
1094
+ ...Fs(n, e)
1085
1095
  };
1086
1096
  }
1087
1097
  }), s;
1088
1098
  }
1089
- function Ls(n, s) {
1099
+ function Ps(n, s) {
1090
1100
  const e = f(n, "_bindings", {});
1091
- return A(e) ? { ...n } : (Ye(e, (t, o) => {
1092
- ee(t) && f(s, t, null) && (n[o] = f(s, t, null));
1101
+ return I(e) ? { ...n } : (Ye(e, (t, o) => {
1102
+ se(t) && f(s, t, null) && (n[o] = f(s, t, null));
1093
1103
  }), n);
1094
1104
  }
1095
- function V({ blocks: n }) {
1096
- const [s] = se(), [e] = y(ne), [t] = y(Ee), [o] = os(), c = O((l) => Ts(l), []), [a] = Ft(), [i] = y(L), d = O(
1105
+ function te({ blocks: n }) {
1106
+ const [s] = ne(), [e] = b(ie), [t] = b(Ee), [o] = os(), c = O((l) => Rs(l), []), [a] = Ft(), [i] = b(F), d = O(
1097
1107
  (l) => l.reduce((h, p) => {
1098
1108
  const u = f(o, p, {});
1099
1109
  return { ...h, ...u };
1100
1110
  }, {}),
1101
1111
  [o, s]
1102
1112
  );
1103
- return /* @__PURE__ */ r.jsx(r.Fragment, { children: M.Children.toArray(
1113
+ return /* @__PURE__ */ r.jsx(r.Fragment, { children: A.Children.toArray(
1104
1114
  n.map((l, h) => {
1105
1115
  if (i === l._id)
1106
1116
  return null;
1107
- const p = Es(l), u = {};
1108
- A(p) || Object.keys(p).forEach((j) => {
1109
- u[j] = M.Children.toArray(
1110
- p[j].map((F) => /* @__PURE__ */ r.jsx(V, { blocks: [Ge(s, { _id: F })] }))
1117
+ const p = Ts(l), u = {};
1118
+ I(p) || Object.keys(p).forEach((C) => {
1119
+ u[C] = A.Children.toArray(
1120
+ p[C].map((L) => /* @__PURE__ */ r.jsx(te, { blocks: [Ge(s, { _id: L })] }))
1111
1121
  );
1112
1122
  });
1113
- const v = be(s, { _parent: l._id });
1114
- u.children = v.length ? /* @__PURE__ */ r.jsx(V, { blocks: v }) : null;
1115
- const $ = ss(l._type), g = f($, "builderComponent", f($, "component", null));
1123
+ const $ = ke(s, { _parent: l._id });
1124
+ u.children = $.length ? /* @__PURE__ */ r.jsx(te, { blocks: $ }) : null;
1125
+ const y = ss(l._type), g = f(y, "builderComponent", f(y, "component", null));
1116
1126
  if (Xe(g))
1117
1127
  return /* @__PURE__ */ r.jsx("noscript", { children: `<!-- ${l == null ? void 0 : l._type} not registered -->` });
1118
- const m = ye($, "getBlockStateFrom") ? $ == null ? void 0 : $.getBlockStateFrom(l, s) : [], b = d(m);
1119
- return /* @__PURE__ */ r.jsx(ve, { children: M.createElement(g, {
1128
+ const m = be(y, "getBlockStateFrom") ? y == null ? void 0 : y.getBlockStateFrom(l, s) : [], k = d(m);
1129
+ return /* @__PURE__ */ r.jsx(Q, { children: A.createElement(g, {
1120
1130
  blockProps: {
1121
1131
  "data-block-id": l._id,
1122
1132
  "data-block-type": l._type,
@@ -1127,46 +1137,46 @@ function V({ blocks: n }) {
1127
1137
  ...t === l._id ? { "data-drop": "yes" } : {}
1128
1138
  },
1129
1139
  index: h,
1130
- ...Ls(l, a),
1140
+ ...Ps(l, a),
1131
1141
  ...c(l),
1132
1142
  ...u,
1133
1143
  inBuilder: !0,
1134
- blockState: b
1144
+ blockState: k
1135
1145
  }) });
1136
1146
  })
1137
1147
  ) });
1138
1148
  }
1139
- const Fs = () => {
1140
- const [n] = se(), s = A(n) ? null : /* @__PURE__ */ r.jsx(Ht, { children: /* @__PURE__ */ r.jsx(V, { blocks: be(n, (e) => A(e._parent)) }) });
1149
+ const Hs = () => {
1150
+ const [n] = ne(), s = I(n) ? null : /* @__PURE__ */ r.jsx(Pt, { children: /* @__PURE__ */ r.jsx(te, { blocks: ke(n, (e) => I(e._parent)) }) });
1141
1151
  return /* @__PURE__ */ r.jsx(r.Fragment, { children: s });
1142
- }, Rs = (n, s) => n.querySelector(`[data-style-id="${s}"]`), Hs = () => {
1143
- const [n] = y(Pt), [s] = Ae(), [e] = te(), [, t] = D(), o = zt(), [, c] = T(), a = le(null), i = le(null), [d, l] = C({ width: 0, height: 0 }), h = hs(d), [p, u] = C(0), [v, $] = C([]), [, g] = C([]), [, m] = y(Ot), [b, j] = N(), F = P("loading", !1), K = P("htmlDir", "ltr");
1144
- w(() => {
1145
- const { clientWidth: x, clientHeight: I } = i.current;
1146
- l({ width: x, height: I }), p === 0 && u(x);
1152
+ }, zs = (n, s) => n.querySelector(`[data-style-id="${s}"]`), Os = () => {
1153
+ const [n] = b(Ht), [s] = Ie(), [e] = oe(), [, t] = D(), o = zt(), [, c] = T(), a = de(null), i = de(null), [d, l] = B({ width: 0, height: 0 }), h = gs(d), [p, u] = B(0), [$, y] = B([]), [, g] = B([]), [, m] = b(Ot), [k, C] = M(), L = H("loading", !1), K = H("htmlDir", "ltr");
1154
+ j(() => {
1155
+ const { clientWidth: x, clientHeight: S } = i.current;
1156
+ l({ width: x, height: S }), p === 0 && u(x);
1147
1157
  }, [i, e, p]);
1148
- const Y = (x, I = 0) => {
1149
- const { top: S } = x.getBoundingClientRect();
1150
- return S + I >= 0 && S - I <= window.innerHeight;
1158
+ const Y = (x, S = 0) => {
1159
+ const { top: E } = x.getBoundingClientRect();
1160
+ return E + S >= 0 && E - S <= window.innerHeight;
1151
1161
  };
1152
- w(() => {
1153
- var x, I;
1162
+ j(() => {
1163
+ var x, S;
1154
1164
  if (o && o.type !== "Multiple" && a.current) {
1155
- const S = Re(a.current.contentDocument, o._id);
1156
- S && (Y(S) || (I = (x = a.current) == null ? void 0 : x.contentWindow) == null || I.scrollTo({ top: S.offsetTop, behavior: "smooth" }), $([S]));
1165
+ const E = Re(a.current.contentDocument, o._id);
1166
+ E && (Y(E) || (S = (x = a.current) == null ? void 0 : x.contentWindow) == null || S.scrollTo({ top: E.offsetTop, behavior: "smooth" }), y([E]));
1157
1167
  }
1158
- }, [o]), w(() => {
1159
- if (!A(b) && a.current) {
1160
- const x = Rs(
1168
+ }, [o]), j(() => {
1169
+ if (!I(k) && a.current) {
1170
+ const x = zs(
1161
1171
  a.current.contentDocument,
1162
- U(b).id
1172
+ U(k).id
1163
1173
  );
1164
1174
  g(x ? [x] : [null]);
1165
1175
  } else
1166
1176
  g([null]);
1167
- }, [b]);
1177
+ }, [k]);
1168
1178
  const G = Oe(() => {
1169
- let x = us;
1179
+ let x = ms;
1170
1180
  return x = x.replace("__HTML_DIR__", K), n === "offline" && (x = x.replace(
1171
1181
  "https://old.chaibuilder.com/offline/tailwind.cdn.js",
1172
1182
  "/offline/tailwind.cdn.js"
@@ -1176,14 +1186,14 @@ const Fs = () => {
1176
1186
  "div",
1177
1187
  {
1178
1188
  onClick: () => {
1179
- t([]), j([]);
1189
+ t([]), C([]);
1180
1190
  },
1181
1191
  onMouseLeave: () => setTimeout(() => c(""), 300),
1182
1192
  className: "relative mx-auto h-full w-full overflow-hidden",
1183
- style: p > 0 && !A(h) ? { width: s ? "100%" : p } : {},
1193
+ style: p > 0 && !I(h) ? { width: s ? "100%" : p } : {},
1184
1194
  ref: i,
1185
1195
  children: /* @__PURE__ */ r.jsxs(
1186
- gs,
1196
+ xs,
1187
1197
  {
1188
1198
  contentDidMount: () => m(a.current),
1189
1199
  ref: a,
@@ -1192,16 +1202,16 @@ const Fs = () => {
1192
1202
  className: "relative mx-auto box-content h-full max-w-full shadow-lg transition-all duration-300 ease-linear",
1193
1203
  initialContent: G,
1194
1204
  children: [
1195
- /* @__PURE__ */ r.jsx(_s, {}),
1205
+ /* @__PURE__ */ r.jsx(Is, {}),
1196
1206
  /* @__PURE__ */ r.jsx(
1197
- As,
1207
+ Es,
1198
1208
  {
1199
1209
  block: o,
1200
- selectedBlockElement: U(v)
1210
+ selectedBlockElement: U($)
1201
1211
  }
1202
1212
  ),
1203
- /* @__PURE__ */ r.jsx(Ss, { model: "page" }),
1204
- /* @__PURE__ */ r.jsx(ns, { children: /* @__PURE__ */ r.jsx(Ds, { children: F ? /* @__PURE__ */ r.jsx("div", { className: "h-full p-4", children: /* @__PURE__ */ r.jsx(Se, { className: "h-full" }) }) : /* @__PURE__ */ r.jsx(Fs, {}) }) }),
1213
+ /* @__PURE__ */ r.jsx(Ms, { model: "page" }),
1214
+ /* @__PURE__ */ r.jsx(rs, { children: /* @__PURE__ */ r.jsx(As, { children: L ? /* @__PURE__ */ r.jsx("div", { className: "h-full p-4", children: /* @__PURE__ */ r.jsx(V, { className: "h-full" }) }) : /* @__PURE__ */ r.jsx(Hs, {}) }) }),
1205
1215
  /* @__PURE__ */ r.jsx("br", {}),
1206
1216
  /* @__PURE__ */ r.jsx(
1207
1217
  "div",
@@ -1215,10 +1225,16 @@ const Fs = () => {
1215
1225
  )
1216
1226
  }
1217
1227
  );
1218
- }, Uo = () => /* @__PURE__ */ r.jsxs("div", { className: "flex h-full w-full flex-col", children: [
1219
- /* @__PURE__ */ r.jsx(ps, {}),
1220
- /* @__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(ve, { fallback: /* @__PURE__ */ r.jsx(Se, { className: "h-full" }), children: /* @__PURE__ */ r.jsx(Ut, { children: /* @__PURE__ */ r.jsx(Hs, {}) }) }) })
1221
- ] });
1228
+ }, Us = A.lazy(() => import("./CodeEditor-XaHQMfpT.js")), Go = () => {
1229
+ const [n] = ns();
1230
+ return /* @__PURE__ */ r.jsxs("div", { className: "flex h-full w-full flex-col", children: [
1231
+ /* @__PURE__ */ r.jsx(hs, {}),
1232
+ /* @__PURE__ */ r.jsxs("div", { className: "relative flex h-full flex-col 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: [
1233
+ /* @__PURE__ */ r.jsx(Q, { fallback: /* @__PURE__ */ r.jsx(V, { className: "h-full" }), children: /* @__PURE__ */ r.jsx(Ut, { children: /* @__PURE__ */ r.jsx(Os, {}) }) }),
1234
+ n ? /* @__PURE__ */ r.jsx(Q, { fallback: /* @__PURE__ */ r.jsx(V, { className: "h-full" }), children: /* @__PURE__ */ r.jsx(is, { enable: { top: !0, bottom: !1 }, className: "max-h-[400px] min-h-[200px]", children: /* @__PURE__ */ r.jsx(Us, {}) }) }) : null
1235
+ ] })
1236
+ ] });
1237
+ };
1222
1238
  export {
1223
- Uo as default
1239
+ Go as default
1224
1240
  };