@chaibuilder/sdk 1.2.48 → 1.2.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AddBlocks-cX8vIt0V.js → AddBlocks-IX7HKzSe.js} +15 -15
- package/dist/AddBlocks-zwZ63DdP.cjs +1 -0
- package/dist/CanvasArea-URgoG1jc.cjs +56 -0
- package/dist/{CanvasArea-HRipTJFS.js → CanvasArea-ehmBje_E.js} +285 -269
- package/dist/{ChaiBuilderEditor-dKHRL-Es.js → ChaiBuilderEditor-3xIN-AP_.js} +7592 -7645
- package/dist/{ChaiBuilderEditor-EtQOC5uy.cjs → ChaiBuilderEditor-ZRHqW7Gd.cjs} +50 -50
- package/dist/CodeEditor-0F7Dz3AB.js +97 -0
- package/dist/CodeEditor-1vu-qNgT.cjs +1 -0
- package/dist/CurrentPage-HOPNdQZ-.cjs +1 -0
- package/dist/{CurrentPage-U8ms8Hs7.js → CurrentPage-qhBjm7th.js} +10 -10
- package/dist/ListTree-DkbFFDXB.cjs +1 -0
- package/dist/{ListTree-OgLdyfQs.js → ListTree-sTwXvXST.js} +123 -114
- package/dist/{MODIFIERS-cBT31iqE.js → MODIFIERS-fd5XOmum.js} +8 -4
- package/dist/MODIFIERS-mVmfEGgo.cjs +1 -0
- package/dist/{PagesPanel-MsUBq9Xx.js → PagesPanel-5iVsbDP1.js} +7 -7
- package/dist/PagesPanel-kdl4A0IN.cjs +1 -0
- package/dist/{ProjectPanel-hsZG_Btj.js → ProjectPanel-c8oTzhQd.js} +7 -7
- package/dist/ProjectPanel-mXPBI-TU.cjs +1 -0
- package/dist/{Settings-WcLqIeQy.js → Settings-0uSGoECC.js} +536 -514
- package/dist/Settings-3kBSStO6.cjs +1 -0
- package/dist/{SidePanels-PmCljlnf.js → SidePanels-YLWdBer9.js} +108 -115
- package/dist/SidePanels-kKram02Q.cjs +1 -0
- package/dist/ThemeConfiguration-8W1CM4tW.cjs +1 -0
- package/dist/{ThemeConfiguration-mkbFdePB.js → ThemeConfiguration-AAGFJieC.js} +5 -5
- package/dist/Topbar-CLNUPx7K.cjs +1 -0
- package/dist/{Topbar-FPywhpub.js → Topbar-nX9Muoem.js} +8 -8
- package/dist/UILibrariesPanel-cp0Mkaq_.cjs +1 -0
- package/dist/UILibrariesPanel-fKn2nlgI.js +196 -0
- package/dist/UnsplashImages-56HoW_ZA.cjs +1 -0
- package/dist/{UnsplashImages-7uAXYHPH.js → UnsplashImages-zTZa3LjG.js} +4 -4
- package/dist/{UploadImages-5M0Q27R-.js → UploadImages-SnfaTrlz.js} +4 -4
- package/dist/UploadImages-okNGjkXb.cjs +1 -0
- package/dist/add-page-modal-Y2RY3x01.cjs +1 -0
- package/dist/{add-page-modal-6o7MAbq-.js → add-page-modal-uDoO0zws.js} +12 -12
- package/dist/{confirm-alert-jL0z_gFv.js → confirm-alert-9XiVxCc0.js} +4 -4
- package/dist/confirm-alert-aD7AMK_6.cjs +1 -0
- package/dist/controls-rRZhz0vu.cjs +1 -0
- package/dist/{controls-VTdJhdSz.js → controls-yjgoZzB6.js} +31 -18
- package/dist/core.cjs +1 -1
- package/dist/core.js +6 -6
- package/dist/{delete-page-modal-U5_JYYp7.js → delete-page-modal-7sfoFf9r.js} +6 -6
- package/dist/delete-page-modal-ieJ367JA.cjs +1 -0
- package/dist/email-blocks.cjs +1 -1
- package/dist/email-blocks.js +1 -1
- package/dist/email.cjs +1 -1
- package/dist/email.js +4 -4
- package/dist/{form-KBtrnNWh.cjs → form-KWYHDVIf.cjs} +1 -1
- package/dist/{form-Sgpl2fXL.js → form-PQSmqcIl.js} +1 -1
- package/dist/{functions-7ybAMUuA.js → functions-JO0EW8GX.js} +6 -7
- package/dist/functions-ZZVUnIjD.cjs +1 -0
- package/dist/{html-to-json-Z6R2o_fA.js → html-to-json-GJ6RioQf.js} +1 -1
- package/dist/html-to-json-O1OpqICe.cjs +1 -0
- package/dist/index-VOrp9ZpX.cjs +1 -0
- package/dist/index-YpnaudSM.js +63 -0
- package/dist/index-ecnGWzh9.cjs +1 -0
- package/dist/{index-po-naEa5.js → index-i2kgLkjC.js} +15 -14
- package/dist/lib.cjs +2 -2
- package/dist/lib.d.ts +1 -1
- package/dist/lib.js +19 -21
- package/dist/page-viewer-aoro5JxT.cjs +1 -0
- package/dist/{page-viewer-nLRRk7DR.js → page-viewer-qkwZJ6e-.js} +7 -7
- package/dist/{project-general-setting-D1UJdZ2D.js → project-general-setting-3gkaXq1F.js} +8 -8
- package/dist/project-general-setting-arXitV5_.cjs +1 -0
- package/dist/{project-seo-setting-VIZWEMRk.js → project-seo-setting-X8pykTmc.js} +6 -6
- package/dist/project-seo-setting-kjtUt-er.cjs +1 -0
- package/dist/render.cjs +1 -1
- package/dist/render.js +89 -90
- package/dist/single-page-detail-UsWG0gfh.cjs +1 -0
- package/dist/{single-page-detail-lQ8fujC5.js → single-page-detail-ZXZX6Xmw.js} +21 -21
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +6 -6
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +93 -93
- package/dist/useCodeEditor-CtjbxWLf.cjs +1 -0
- package/dist/useCodeEditor-yl5V3Hte.js +7 -0
- package/dist/{utils-K3Zk762G.cjs → utils-D_vtk3zK.cjs} +1 -1
- package/dist/{utils-iMv3T4WT.js → utils-VpVqnC9m.js} +1 -1
- package/dist/web-blocks.cjs +1 -33
- package/dist/web-blocks.js +468 -616
- package/package.json +4 -2
- package/dist/AddBlocks-_fhhS7Lm.cjs +0 -1
- package/dist/CanvasArea-N3rYeBJV.cjs +0 -55
- package/dist/CurrentPage-9FijxWbn.cjs +0 -1
- package/dist/ListTree-jOvHpo3_.cjs +0 -1
- package/dist/MODIFIERS-YPHRtwrM.cjs +0 -1
- package/dist/PagesPanel-8Cd6UYsh.cjs +0 -1
- package/dist/ProjectPanel-KmnXPfxx.cjs +0 -1
- package/dist/STRINGS--j49GZJP.js +0 -7
- package/dist/STRINGS-gPz7CUOk.cjs +0 -1
- package/dist/Settings-xVjTnVSf.cjs +0 -1
- package/dist/SidePanels-6zRgfZpi.cjs +0 -1
- package/dist/ThemeConfiguration-pt7TTAty.cjs +0 -1
- package/dist/Topbar--m1E08Jl.cjs +0 -1
- package/dist/UILibrariesPanel-HhHGcexY.cjs +0 -1
- package/dist/UILibrariesPanel-VrA2X4LO.js +0 -145
- package/dist/UnsplashImages-Yu0msAD8.cjs +0 -1
- package/dist/UploadImages-jS51ZcPG.cjs +0 -1
- package/dist/add-page-modal-KAbflupJ.cjs +0 -1
- package/dist/confirm-alert-dow0GlxC.cjs +0 -1
- package/dist/controls-jWJDao88.cjs +0 -1
- package/dist/delete-page-modal-EDQZneVM.cjs +0 -1
- package/dist/functions-yvRwasT2.cjs +0 -1
- package/dist/html-to-json-VPWiWWGH.cjs +0 -1
- package/dist/index-HjN7LtDT.cjs +0 -1
- package/dist/page-viewer-PfZEbcDZ.cjs +0 -1
- package/dist/project-general-setting-HO6zeum2.cjs +0 -1
- package/dist/project-seo-setting-gT9N1tnB.cjs +0 -1
- package/dist/single-page-detail-To8TcpgJ.cjs +0 -1
- package/dist/useCanvasSettings-7BXlDuLG.cjs +0 -1
- package/dist/useCanvasSettings-UzjYHFG5.js +0 -6
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
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
|
|
6
|
-
import { map as
|
|
7
|
-
import { ResetIcon as
|
|
8
|
-
import { j as
|
|
9
|
-
import { useTranslation as
|
|
10
|
-
import { useAtom as
|
|
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-3xIN-AP_.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
|
|
13
|
-
import
|
|
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
|
|
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
|
|
20
|
-
import
|
|
21
|
-
import
|
|
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
|
|
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 "./
|
|
28
|
-
import { Provider as
|
|
27
|
+
import { u as os, a as ns } from "./useCodeEditor-yl5V3Hte.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-
|
|
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
|
-
|
|
59
|
-
|
|
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(
|
|
62
|
-
/* @__PURE__ */ r.jsx(W, { disabled: !s(), onClick: t, size: "sm", className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ r.jsx(
|
|
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
|
|
66
|
-
const [n, s] =
|
|
66
|
+
function ls() {
|
|
67
|
+
const [n, s] = je();
|
|
67
68
|
return /* @__PURE__ */ r.jsxs("div", { className: "flex items-center", children: [
|
|
68
|
-
/* @__PURE__ */ r.jsx(
|
|
69
|
+
/* @__PURE__ */ r.jsx(Ze, { className: "size-4 shrink-0" }),
|
|
69
70
|
/* @__PURE__ */ r.jsx(
|
|
70
|
-
|
|
71
|
+
Ce,
|
|
71
72
|
{
|
|
72
73
|
id: "dark-mode-switch",
|
|
73
74
|
checked: n,
|
|
@@ -84,10 +85,10 @@ function is() {
|
|
|
84
85
|
)
|
|
85
86
|
}
|
|
86
87
|
),
|
|
87
|
-
/* @__PURE__ */ r.jsx(
|
|
88
|
+
/* @__PURE__ */ r.jsx(it, { className: "size-4 ml-3 shrink-0" })
|
|
88
89
|
] });
|
|
89
90
|
}
|
|
90
|
-
const
|
|
91
|
+
const fe = ({ landscape: n = !1 }) => /* @__PURE__ */ r.jsxs(
|
|
91
92
|
"svg",
|
|
92
93
|
{
|
|
93
94
|
className: n ? "rotate-90" : "",
|
|
@@ -110,33 +111,33 @@ const me = ({ landscape: n = !1 }) => /* @__PURE__ */ r.jsxs(
|
|
|
110
111
|
)
|
|
111
112
|
]
|
|
112
113
|
}
|
|
113
|
-
),
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
140
|
+
icon: /* @__PURE__ */ r.jsx(fe, { landscape: !0 }),
|
|
140
141
|
width: 1024
|
|
141
142
|
},
|
|
142
143
|
{
|
|
@@ -150,10 +151,10 @@ const me = ({ landscape: n = !1 }) => /* @__PURE__ */ r.jsxs(
|
|
|
150
151
|
title: "large_desktop_2xl_title",
|
|
151
152
|
content: "large_desktop_2xl_content",
|
|
152
153
|
breakpoint: "2xl",
|
|
153
|
-
icon: /* @__PURE__ */ r.jsx(
|
|
154
|
+
icon: /* @__PURE__ */ r.jsx(Qe, {}),
|
|
154
155
|
width: 1920
|
|
155
156
|
}
|
|
156
|
-
],
|
|
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 } =
|
|
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
|
-
},
|
|
182
|
-
const [, n, s] =
|
|
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:
|
|
186
|
-
|
|
187
|
-
c.filter((i) =>
|
|
188
|
-
(i) => /* @__PURE__ */
|
|
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
|
-
/* @__PURE__ */ r.jsx(ut, { asChild: !0, children: /* @__PURE__ */ r.jsx("span", { className: "cursor-pointer px-2.5 hover:opacity-80", children: /* @__PURE__ */ r.jsx(
|
|
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
|
-
|
|
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:
|
|
201
|
+
checked: pe(e, X(i.breakpoint)),
|
|
201
202
|
children: o(i.title)
|
|
202
203
|
},
|
|
203
204
|
i.breakpoint
|
|
@@ -205,13 +206,13 @@ const me = ({ landscape: n = !1 }) => /* @__PURE__ */ r.jsxs(
|
|
|
205
206
|
] })
|
|
206
207
|
] })
|
|
207
208
|
] });
|
|
208
|
-
},
|
|
209
|
-
const { t: n } =
|
|
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: [
|
|
213
214
|
/* @__PURE__ */ r.jsx(vt, { asChild: !0, children: /* @__PURE__ */ r.jsxs(W, { size: "sm", variant: "ghost", className: "flex items-center gap-x-1", children: [
|
|
214
|
-
/* @__PURE__ */ r.jsx(
|
|
215
|
+
/* @__PURE__ */ r.jsx(et, {}),
|
|
215
216
|
" ",
|
|
216
217
|
n("clear")
|
|
217
218
|
] }) }),
|
|
@@ -226,15 +227,15 @@ const me = ({ landscape: n = !1 }) => /* @__PURE__ */ r.jsxs(
|
|
|
226
227
|
] })
|
|
227
228
|
] })
|
|
228
229
|
] }) });
|
|
229
|
-
},
|
|
230
|
-
const [n, s] =
|
|
231
|
-
return
|
|
232
|
-
/* @__PURE__ */ r.jsxs(
|
|
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
|
-
|
|
238
|
+
Ce,
|
|
238
239
|
{
|
|
239
240
|
className: "scale-90",
|
|
240
241
|
checked: n,
|
|
@@ -245,18 +246,18 @@ const me = ({ landscape: n = !1 }) => /* @__PURE__ */ r.jsxs(
|
|
|
245
246
|
}
|
|
246
247
|
)
|
|
247
248
|
] }) : null;
|
|
248
|
-
},
|
|
249
|
-
const n =
|
|
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(
|
|
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(
|
|
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: [
|
|
259
|
-
/* @__PURE__ */ r.jsx(
|
|
260
|
+
/* @__PURE__ */ r.jsx(tt, { className: "h-3.5 w-3.5 flex-shrink-0" }),
|
|
260
261
|
" ",
|
|
261
262
|
/* @__PURE__ */ r.jsxs("div", { className: "text-xs leading-3", children: [
|
|
262
263
|
Ue(s, 0),
|
|
@@ -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(
|
|
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(
|
|
271
|
+
/* @__PURE__ */ r.jsx(ps, {}),
|
|
271
272
|
/* @__PURE__ */ r.jsx(z, { orientation: "vertical" }),
|
|
272
|
-
/* @__PURE__ */ r.jsx(
|
|
273
|
+
/* @__PURE__ */ r.jsx(us, {})
|
|
273
274
|
] })
|
|
274
275
|
] });
|
|
275
|
-
},
|
|
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>`,
|
|
326
|
-
const [s] =
|
|
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
|
|
348
|
+
return j(() => {
|
|
347
349
|
c();
|
|
348
350
|
}, [s, n, e, c]), t;
|
|
349
351
|
};
|
|
350
|
-
let
|
|
351
|
-
typeof document < "u" && (
|
|
352
|
+
let Me, Te;
|
|
353
|
+
typeof document < "u" && (Me = document);
|
|
352
354
|
typeof window < "u" && (Te = window);
|
|
353
|
-
const Le =
|
|
354
|
-
class Fe extends
|
|
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
|
-
|
|
366
|
-
children:
|
|
367
|
-
contentDidMount:
|
|
368
|
-
contentDidUpdate:
|
|
367
|
+
N(Fe, "propTypes", {
|
|
368
|
+
children: w.element.isRequired,
|
|
369
|
+
contentDidMount: w.func.isRequired,
|
|
370
|
+
contentDidUpdate: w.func.isRequired
|
|
369
371
|
});
|
|
370
|
-
class
|
|
372
|
+
class ee extends $e {
|
|
371
373
|
constructor(e, t) {
|
|
372
374
|
super(e, t);
|
|
373
|
-
|
|
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
|
-
|
|
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
|
-
|
|
385
|
+
N(this, "loadCheck", () => setInterval(() => {
|
|
384
386
|
this.handleLoad();
|
|
385
387
|
}, 500));
|
|
386
|
-
this._isMounted = !1, this.nodeRef =
|
|
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(
|
|
408
|
-
return [
|
|
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
|
-
|
|
425
|
-
style:
|
|
426
|
+
N(ee, "propTypes", {
|
|
427
|
+
style: w.object,
|
|
426
428
|
// eslint-disable-line
|
|
427
|
-
head:
|
|
428
|
-
initialContent:
|
|
429
|
-
mountTarget:
|
|
430
|
-
contentDidMount:
|
|
431
|
-
contentDidUpdate:
|
|
432
|
-
children:
|
|
433
|
-
}),
|
|
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
|
|
445
|
-
function
|
|
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
|
|
458
|
-
const
|
|
459
|
-
if (!
|
|
459
|
+
let v = null, _ = [], R = null, Z = null;
|
|
460
|
+
const ve = (n, s, e) => {
|
|
461
|
+
if (!v || !n)
|
|
460
462
|
return;
|
|
461
|
-
const t =
|
|
462
|
-
(
|
|
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 (!
|
|
466
|
+
), a = o.indexOf(c);
|
|
467
|
+
if (!_[a])
|
|
466
468
|
return;
|
|
467
|
-
const
|
|
468
|
-
t.style.width = s === "vertical" ?
|
|
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
|
|
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
|
|
478
|
-
const e =
|
|
479
|
-
|
|
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
|
|
483
|
-
|
|
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
|
-
},
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
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
|
|
500
|
-
|
|
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
|
-
|
|
505
|
-
const
|
|
506
|
-
|
|
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(),
|
|
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,
|
|
514
|
-
|
|
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 (!
|
|
517
|
-
t(g, m === "canvas" ? null : m,
|
|
518
|
-
|
|
519
|
-
}, 300),
|
|
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
|
|
523
|
-
|
|
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,
|
|
527
|
-
R =
|
|
528
|
-
const
|
|
529
|
-
h(
|
|
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.
|
|
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
|
|
551
|
+
function le(n) {
|
|
542
552
|
return n.getAttribute("data-block-id") ? n : n.closest("[data-block-id]");
|
|
543
553
|
}
|
|
544
|
-
function
|
|
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
|
|
550
|
-
const n = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], s = It(), [, e] = T(), [t, o] =
|
|
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 =
|
|
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),
|
|
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
|
-
},
|
|
572
|
-
const [, n] =
|
|
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 =
|
|
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
|
-
},
|
|
592
|
-
const e =
|
|
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),
|
|
595
|
-
const [, n] = T(), [s] =
|
|
604
|
+
}, 100), Ds = () => {
|
|
605
|
+
const [, n] = T(), [s] = b(F);
|
|
596
606
|
return (e) => {
|
|
597
|
-
s ||
|
|
607
|
+
s || Bs(e, n);
|
|
598
608
|
};
|
|
599
|
-
},
|
|
600
|
-
const { document: s } = q(), [e] = D(), [t, o] =
|
|
601
|
-
|
|
609
|
+
}, As = ({ children: n }) => {
|
|
610
|
+
const { document: s } = q(), [e] = D(), [t, o] = M();
|
|
611
|
+
j(() => {
|
|
602
612
|
setTimeout(() => {
|
|
603
|
-
if (!
|
|
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 =
|
|
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}"]`),
|
|
630
|
-
const { window: n } = q(), [s, e] = D(), [t] =
|
|
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
|
-
},
|
|
633
|
-
const m = t.find((
|
|
642
|
+
}, y = (g) => {
|
|
643
|
+
const m = t.find((k) => k._id === g);
|
|
634
644
|
return m ? m._parent : null;
|
|
635
645
|
};
|
|
636
|
-
return
|
|
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 (
|
|
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
|
|
646
|
-
|
|
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
|
-
},
|
|
661
|
-
const [, e] = D(), [, t] = T(), [, o] =
|
|
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
|
{
|
|
@@ -670,13 +680,13 @@ const ks = () => {
|
|
|
670
680
|
}, 200);
|
|
671
681
|
},
|
|
672
682
|
children: [
|
|
673
|
-
/* @__PURE__ */ r.jsx(
|
|
683
|
+
/* @__PURE__ */ r.jsx(st, {}),
|
|
674
684
|
s
|
|
675
685
|
]
|
|
676
686
|
}
|
|
677
687
|
);
|
|
678
|
-
},
|
|
679
|
-
const e =
|
|
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 =
|
|
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,10 +708,10 @@ 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(
|
|
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,
|
|
705
715
|
{
|
|
706
716
|
className: "hover:scale-105",
|
|
707
717
|
onClick: () => {
|
|
@@ -709,13 +719,13 @@ const ks = () => {
|
|
|
709
719
|
}
|
|
710
720
|
}
|
|
711
721
|
),
|
|
712
|
-
|
|
713
|
-
Tt(f(s, "_type", "")) ? /* @__PURE__ */ r.jsx(
|
|
722
|
+
Mt(f(s, "_type", "")) ? /* @__PURE__ */ r.jsx(nt, { className: "hover:scale-105", onClick: () => t([s == null ? void 0 : s._id]) }) : null,
|
|
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
|
-
},
|
|
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
|
-
},
|
|
972
|
-
const [s] = Lt(), [e] = D(), [t] =
|
|
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] =
|
|
984
|
+
), [p] = B(
|
|
975
985
|
i == null ? void 0 : i.getElementById("selected-styling-block")
|
|
976
|
-
), [u] =
|
|
977
|
-
|
|
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
|
|
981
|
-
return
|
|
982
|
-
const g = f(s, "primaryColor", "#000"), m = f(s, "secondaryColor", "#FFF"),
|
|
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":
|
|
987
|
-
"bg-dark":
|
|
988
|
-
"text-dark":
|
|
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: [
|
|
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: [
|
|
1022
|
+
plugins: [Jt, Qt, Vt, d.tailwind.plugin.withOptions(() => Ns)]
|
|
1013
1023
|
});
|
|
1014
|
-
}, [s, d,
|
|
1015
|
-
h && (h.textContent = `${
|
|
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]),
|
|
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]),
|
|
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]),
|
|
1027
|
-
p && (p.textContent = `${
|
|
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]),
|
|
1031
|
-
const g = f(s, "bodyTextLightColor", "#64748b"), m = f(s, "bodyTextDarkColor", "#94a3b8"),
|
|
1032
|
-
i.body.className = `font-body antialiased text-[${g}] bg-[${
|
|
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
|
-
|
|
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=${
|
|
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
|
-
|
|
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=${
|
|
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
|
-
|
|
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
|
-
},
|
|
1072
|
+
}, Ts = (n) => {
|
|
1063
1073
|
const s = {};
|
|
1064
1074
|
return Object.keys(n).forEach((e) => {
|
|
1065
|
-
|
|
1075
|
+
se(n[e]) && n[e].startsWith(ge) && (s[e] = n[e].replace(ge, "").split(","));
|
|
1066
1076
|
}), s;
|
|
1067
|
-
},
|
|
1068
|
-
const s = n.replace(
|
|
1077
|
+
}, Ls = Ke((n) => {
|
|
1078
|
+
const s = n.replace(Ne, "").split(",");
|
|
1069
1079
|
return ts(s[0], s[1]);
|
|
1070
1080
|
});
|
|
1071
|
-
function
|
|
1081
|
+
function Fs(n, s) {
|
|
1072
1082
|
return f(n, `${s}_attrs`, {});
|
|
1073
1083
|
}
|
|
1074
|
-
function
|
|
1084
|
+
function Rs(n) {
|
|
1075
1085
|
const s = {};
|
|
1076
1086
|
return Object.keys(n).forEach((e) => {
|
|
1077
|
-
if (
|
|
1078
|
-
const t =
|
|
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
|
-
...
|
|
1094
|
+
...Fs(n, e)
|
|
1085
1095
|
};
|
|
1086
1096
|
}
|
|
1087
1097
|
}), s;
|
|
1088
1098
|
}
|
|
1089
|
-
function
|
|
1099
|
+
function Ps(n, s) {
|
|
1090
1100
|
const e = f(n, "_bindings", {});
|
|
1091
|
-
return
|
|
1092
|
-
|
|
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
|
|
1096
|
-
const [s] =
|
|
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:
|
|
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 =
|
|
1108
|
-
|
|
1109
|
-
u[
|
|
1110
|
-
p[
|
|
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
|
|
1114
|
-
u.children =
|
|
1115
|
-
const
|
|
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 =
|
|
1119
|
-
return /* @__PURE__ */ r.jsx(
|
|
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
|
-
...
|
|
1140
|
+
...Ps(l, a),
|
|
1131
1141
|
...c(l),
|
|
1132
1142
|
...u,
|
|
1133
1143
|
inBuilder: !0,
|
|
1134
|
-
blockState:
|
|
1144
|
+
blockState: k
|
|
1135
1145
|
}) });
|
|
1136
1146
|
})
|
|
1137
1147
|
) });
|
|
1138
1148
|
}
|
|
1139
|
-
const
|
|
1140
|
-
const [n] =
|
|
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
|
-
},
|
|
1143
|
-
const [n] =
|
|
1144
|
-
|
|
1145
|
-
const { clientWidth: x, clientHeight:
|
|
1146
|
-
l({ width: x, height:
|
|
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,
|
|
1149
|
-
const { top:
|
|
1150
|
-
return
|
|
1158
|
+
const Y = (x, S = 0) => {
|
|
1159
|
+
const { top: E } = x.getBoundingClientRect();
|
|
1160
|
+
return E + S >= 0 && E - S <= window.innerHeight;
|
|
1151
1161
|
};
|
|
1152
|
-
|
|
1153
|
-
var x,
|
|
1162
|
+
j(() => {
|
|
1163
|
+
var x, S;
|
|
1154
1164
|
if (o && o.type !== "Multiple" && a.current) {
|
|
1155
|
-
const
|
|
1156
|
-
|
|
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]),
|
|
1159
|
-
if (!
|
|
1160
|
-
const x =
|
|
1168
|
+
}, [o]), j(() => {
|
|
1169
|
+
if (!I(k) && a.current) {
|
|
1170
|
+
const x = zs(
|
|
1161
1171
|
a.current.contentDocument,
|
|
1162
|
-
U(
|
|
1172
|
+
U(k).id
|
|
1163
1173
|
);
|
|
1164
1174
|
g(x ? [x] : [null]);
|
|
1165
1175
|
} else
|
|
1166
1176
|
g([null]);
|
|
1167
|
-
}, [
|
|
1177
|
+
}, [k]);
|
|
1168
1178
|
const G = Oe(() => {
|
|
1169
|
-
let x =
|
|
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([]),
|
|
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 && !
|
|
1193
|
+
style: p > 0 && !I(h) ? { width: s ? "100%" : p } : {},
|
|
1184
1194
|
ref: i,
|
|
1185
1195
|
children: /* @__PURE__ */ r.jsxs(
|
|
1186
|
-
|
|
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(
|
|
1205
|
+
/* @__PURE__ */ r.jsx(Is, {}),
|
|
1196
1206
|
/* @__PURE__ */ r.jsx(
|
|
1197
|
-
|
|
1207
|
+
Es,
|
|
1198
1208
|
{
|
|
1199
1209
|
block: o,
|
|
1200
|
-
selectedBlockElement: U(
|
|
1210
|
+
selectedBlockElement: U($)
|
|
1201
1211
|
}
|
|
1202
1212
|
),
|
|
1203
|
-
/* @__PURE__ */ r.jsx(
|
|
1204
|
-
/* @__PURE__ */ r.jsx(
|
|
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
|
-
},
|
|
1219
|
-
|
|
1220
|
-
/* @__PURE__ */ r.
|
|
1221
|
-
|
|
1228
|
+
}, Us = A.lazy(() => import("./CodeEditor-0F7Dz3AB.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
|
-
|
|
1239
|
+
Go as default
|
|
1224
1240
|
};
|