@chaibuilder/sdk 1.2.8 → 1.2.10
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-tMxKPoen.js → AddBlocks-GiMnBMeQ.js} +28 -29
- package/dist/AddBlocks-SzURo9Bj.cjs +1 -0
- package/dist/{BrandingOptions-QJJ1y5ez.js → BrandingOptions-10jJO8mG.js} +3 -4
- package/dist/BrandingOptions-yK-54R-c.cjs +1 -0
- package/dist/CanvasArea-6O8dMPug.cjs +60 -0
- package/dist/{CanvasArea-EfZgx-gN.js → CanvasArea-jgBDM5Qd.js} +459 -474
- package/dist/CurrentPage-1y62Ne77.cjs +1 -0
- package/dist/{CurrentPage-ulHTz4MD.js → CurrentPage-lakeZviD.js} +4 -5
- package/dist/{Layers-rehZkz78.js → Layers-R7TfREUd.js} +115 -148
- package/dist/Layers-Z4nmm9xK.cjs +1 -0
- package/dist/{PagesPanel-acGVGJf-.js → PagesPanel-4mqxCFHq.js} +4 -5
- package/dist/PagesPanel-ouHdxyOH.cjs +1 -0
- package/dist/{ProjectPanel-aLFJq49M.js → ProjectPanel-Wy2nw-1w.js} +11 -12
- package/dist/ProjectPanel-hHolYZjt.cjs +1 -0
- package/dist/Settings-EYOw02iE.cjs +1 -0
- package/dist/{Settings-v-txwlII.js → Settings-_K28Ontt.js} +536 -565
- package/dist/{SidePanels-Vdc-J5wK.js → SidePanels-6slnxdSj.js} +45 -41
- package/dist/SidePanels-U-_O1QN8.cjs +1 -0
- package/dist/{Topbar-j4t4AgCq.js → Topbar-bwt6HjlL.js} +4 -5
- package/dist/Topbar-dQEoY2P8.cjs +1 -0
- package/dist/{UnsplashImages-41Y3q5_Q.js → UnsplashImages-V29UE-57.js} +16 -17
- package/dist/UnsplashImages-pGgaUPQy.cjs +1 -0
- package/dist/UploadImages-7oLycdSh.cjs +1 -0
- package/dist/{UploadImages-xBg-kbKv.js → UploadImages-E0mi_qn8.js} +3 -4
- package/dist/{add-page-modal-6DlGzdA4.js → add-page-modal-FJEAqfD3.js} +9 -10
- package/dist/add-page-modal-In6XI-vZ.cjs +1 -0
- package/dist/{confirm-alert-i4pM3mOt.js → confirm-alert-5hfE116f.js} +3 -4
- package/dist/{confirm-alert-U7-NcG7G.cjs → confirm-alert-Vwd3OzL9.cjs} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +12 -8
- package/dist/core.js +46 -46
- package/dist/delete-page-modal-tl7FLK9J.cjs +1 -0
- package/dist/{delete-page-modal-T_rlQfNd.js → delete-page-modal-wH0yLiQI.js} +17 -18
- package/dist/{form-VbouZlAW.cjs → form-1j01gADS.cjs} +1 -1
- package/dist/{form-OVmsLOrc.js → form-UVHCD9N3.js} +18 -18
- package/dist/index-7ogwGh39.cjs +1 -0
- package/dist/index-B4sL0YTN.js +3124 -0
- package/dist/{index-EGUphg4R.js → index-c2VLKuhY.js} +4886 -4884
- package/dist/{index-jw8RxsTv.cjs → index-xbQL0wpz.cjs} +25 -25
- package/dist/page-viewer-SfQUe0SI.cjs +1 -0
- package/dist/{page-viewer-EoYYnA56.js → page-viewer-TcK0I240.js} +6 -7
- package/dist/{project-general-setting-DC_nADG-.js → project-general-setting-4ruKl033.js} +5 -6
- package/dist/project-general-setting-t7E2Y_w9.cjs +1 -0
- package/dist/{project-seo-setting-Snn2nZgS.cjs → project-seo-setting-4b_BJZDF.cjs} +1 -1
- package/dist/{project-seo-setting-wxAGEkd_.js → project-seo-setting-d1EZlacB.js} +7 -8
- package/dist/single-page-detail-KuXd9Mur.cjs +1 -0
- package/dist/{single-page-detail-xtNZ9YxX.js → single-page-detail-PihQi-dP.js} +6 -7
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +3 -4
- package/dist/style.css +1 -1
- package/dist/ui.cjs +1 -1
- package/dist/ui.d.ts +1 -1
- package/dist/ui.js +110 -111
- package/dist/{useAddBlockByDrop-inkD7Lck.cjs → useAddBlockByDrop-nLzs79He.cjs} +1 -1
- package/dist/{useAddBlockByDrop-_nwI4W3q.js → useAddBlockByDrop-rcDR-z9_.js} +1 -1
- package/dist/web-blocks.cjs +1 -9
- package/dist/web-blocks.js +460 -455
- package/package.json +1 -1
- package/dist/AddBlocks-x2LkOHSj.cjs +0 -1
- package/dist/BrandingOptions-EzT9UYd6.cjs +0 -1
- package/dist/CanvasArea-rIDwPHl5.cjs +0 -60
- package/dist/CurrentPage-QNFPD078.cjs +0 -1
- package/dist/Layers-v-7k3W2I.cjs +0 -1
- package/dist/MarkAsGlobalBlock-BjP-Rqlf.js +0 -88
- package/dist/MarkAsGlobalBlock-X5dNmZcb.cjs +0 -1
- package/dist/PagesPanel-x5ms_LOD.cjs +0 -1
- package/dist/ProjectPanel-5BHQ5ANP.cjs +0 -1
- package/dist/Settings-iOjfw5NQ.cjs +0 -1
- package/dist/SidePanels-t0g9ZQFT.cjs +0 -1
- package/dist/Topbar-V8xCetWF.cjs +0 -1
- package/dist/UnsplashImages-DbHky6cj.cjs +0 -1
- package/dist/UploadImages-DnQ95_NW.cjs +0 -1
- package/dist/add-page-modal-0YAI9dXr.cjs +0 -1
- package/dist/delete-page-modal-qXpi_2xR.cjs +0 -1
- package/dist/index-H6vIwGfD.cjs +0 -1
- package/dist/index-niHREMmR.js +0 -2938
- package/dist/page-viewer-Ou8vDXGV.cjs +0 -1
- package/dist/project-general-setting-92q4oEYv.cjs +0 -1
- package/dist/single-page-detail-QmmhR_h2.cjs +0 -1
|
@@ -1,28 +1,27 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
1
|
+
var kt = Object.defineProperty;
|
|
2
|
+
var jt = (e, t, n) => t in e ? kt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var Y = (e, t, n) => (jt(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
4
4
|
import { j as r } from "./jsx-runtime-WbnYoNE9.js";
|
|
5
|
-
import
|
|
6
|
-
import { map as re, includes as
|
|
7
|
-
import { ResetIcon as
|
|
8
|
-
import {
|
|
5
|
+
import K, { createElement as De, useCallback as ke, useState as $, useEffect as R, Component as ze, Children as Tt, Suspense as Ye, useRef as _e, useMemo as Ct } from "react";
|
|
6
|
+
import { map as re, includes as Be, toUpper as pe, round as Et, throttle as Ke, noop as te, isEmpty as z, first as ae, omit as It, pick as St, get as D, isString as je, memoize as Dt, each as _t, find as Bt, filter as Je, isNull as Ot, has as At } from "lodash-es";
|
|
7
|
+
import { ResetIcon as Oe, MobileIcon as Ae, LaptopIcon as Rt, DesktopIcon as Pt, DotsVerticalIcon as Mt, EraserIcon as Lt, ZoomInIcon as Nt, DragHandleDots2Icon as Ft, ArrowUpIcon as $t, CopyIcon as Wt, TrashIcon as Ht } from "@radix-ui/react-icons";
|
|
8
|
+
import { m as Ve, B as le, W as Qe, aI as Ut, aJ as qt, aK as zt, aL as Yt, aM as Kt, P as Te, aj as Jt, i as Ze, aN as Vt, aO as Qt, aP as Zt, aQ as Xt, aR as Gt, aS as en, aT as tn, j as W, ak as J, A as nn, z as rn, C as on, D as sn, E as an, F as ln, G as cn, H as dn, ar as un, I as pn, Q as Xe, aH as ie, aU as fn, _ as X, ac as hn, aV as G, s as Ce, l as Ge, h as et, k as tt, ah as gn, aW as mn, aX as nt, aY as yn, aZ as vn, t as xn, a_ as bn, a7 as wn, a$ as kn, S as rt } from "./index-B4sL0YTN.js";
|
|
9
9
|
import { useTranslation as de } from "react-i18next";
|
|
10
|
-
import { useAtom as
|
|
11
|
-
import
|
|
12
|
-
import { g as
|
|
13
|
-
import { r as ot, u as
|
|
14
|
-
import { Quill as
|
|
15
|
-
import { u as
|
|
10
|
+
import { useAtom as M } from "jotai";
|
|
11
|
+
import Re from "react-dom";
|
|
12
|
+
import { g as jn } from "./_commonjsHelpers-UyOWmZb0.js";
|
|
13
|
+
import { r as ot, u as Tn, B as Cn, E as En } from "./index-c2VLKuhY.js";
|
|
14
|
+
import { Quill as In } from "react-quill";
|
|
15
|
+
import { u as Sn } from "./useAddBlockByDrop-rcDR-z9_.js";
|
|
16
16
|
import { useFeature as st } from "flagged";
|
|
17
|
-
import { flip as
|
|
18
|
-
import { useFloating as
|
|
19
|
-
import { useResizeObserver as
|
|
20
|
-
import { tailwindcssPaletteGenerator as
|
|
21
|
-
import { Provider as
|
|
22
|
-
import { twMerge as
|
|
23
|
-
import { S as
|
|
24
|
-
import { getBlockComponent as
|
|
25
|
-
import { has as Fn } from "lodash";
|
|
17
|
+
import { flip as Dn } from "@floating-ui/dom";
|
|
18
|
+
import { useFloating as _n, shift as Bn } from "@floating-ui/react-dom";
|
|
19
|
+
import { useResizeObserver as On } from "@react-hookz/web";
|
|
20
|
+
import { tailwindcssPaletteGenerator as An } from "@bobthered/tailwindcss-palette-generator";
|
|
21
|
+
import { Provider as Rn } from "react-wrap-balancer";
|
|
22
|
+
import { twMerge as Pn } from "tailwind-merge";
|
|
23
|
+
import { S as Pe, a as it } from "./MODIFIERS-RiXS5Mn1.js";
|
|
24
|
+
import { getBlockComponent as Mn } from "@chaibuilder/runtime";
|
|
26
25
|
import "@radix-ui/react-toggle";
|
|
27
26
|
import "class-variance-authority";
|
|
28
27
|
import "./utils-AvyFzbPC.js";
|
|
@@ -60,19 +59,19 @@ import "himalaya";
|
|
|
60
59
|
import "lucide-react";
|
|
61
60
|
import "./web-blocks.js";
|
|
62
61
|
import "./controls-XPXGHKht.js";
|
|
63
|
-
const
|
|
64
|
-
const {
|
|
62
|
+
const Ln = () => {
|
|
63
|
+
const { hasUndo: e, hasRedo: t, undo: n, redo: s } = Ve();
|
|
65
64
|
return /* @__PURE__ */ r.jsxs("div", { className: "flex items-center", children: [
|
|
66
|
-
/* @__PURE__ */ r.jsx(le, { disabled: !e, size: "sm", onClick: n, className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ r.jsx(
|
|
67
|
-
/* @__PURE__ */ r.jsx(le, { disabled: !t, onClick: s, size: "sm", className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ r.jsx(
|
|
65
|
+
/* @__PURE__ */ r.jsx(le, { disabled: !e(), size: "sm", onClick: n, className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ r.jsx(Oe, {}) }),
|
|
66
|
+
/* @__PURE__ */ r.jsx(le, { disabled: !t(), onClick: s, size: "sm", className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ r.jsx(Oe, { className: "rotate-180 scale-y-[-1] transform" }) })
|
|
68
67
|
] });
|
|
69
68
|
};
|
|
70
|
-
function
|
|
71
|
-
const [e, t] =
|
|
69
|
+
function Nn() {
|
|
70
|
+
const [e, t] = Qe(), { t: n } = de();
|
|
72
71
|
return /* @__PURE__ */ r.jsxs("div", { className: "flex items-center", children: [
|
|
73
|
-
/* @__PURE__ */ r.jsx(
|
|
72
|
+
/* @__PURE__ */ r.jsx(Ut, { htmlFor: "dark-mode-switch", children: n("dark_mode") }),
|
|
74
73
|
/* @__PURE__ */ r.jsxs(
|
|
75
|
-
|
|
74
|
+
qt,
|
|
76
75
|
{
|
|
77
76
|
id: "dark-mode-switch",
|
|
78
77
|
checked: e,
|
|
@@ -96,7 +95,7 @@ function Wn() {
|
|
|
96
95
|
)
|
|
97
96
|
] });
|
|
98
97
|
}
|
|
99
|
-
const
|
|
98
|
+
const Me = ({ landscape: e = !1 }) => /* @__PURE__ */ r.jsxs(
|
|
100
99
|
"svg",
|
|
101
100
|
{
|
|
102
101
|
className: e ? "rotate-90" : "",
|
|
@@ -119,50 +118,50 @@ const Ne = ({ landscape: e = !1 }) => /* @__PURE__ */ r.jsxs(
|
|
|
119
118
|
)
|
|
120
119
|
]
|
|
121
120
|
}
|
|
122
|
-
),
|
|
121
|
+
), Fn = [
|
|
123
122
|
{
|
|
124
123
|
title: "mobile_xs_title",
|
|
125
124
|
content: "mobile_xs_content",
|
|
126
125
|
breakpoint: "xs",
|
|
127
|
-
icon: /* @__PURE__ */ r.jsx(
|
|
126
|
+
icon: /* @__PURE__ */ r.jsx(Ae, {}),
|
|
128
127
|
width: 400
|
|
129
128
|
},
|
|
130
129
|
{
|
|
131
130
|
title: "mobile_sm_title",
|
|
132
131
|
content: "mobile_sm_content",
|
|
133
132
|
breakpoint: "sm",
|
|
134
|
-
icon: /* @__PURE__ */ r.jsx(
|
|
133
|
+
icon: /* @__PURE__ */ r.jsx(Ae, { className: "rotate-90" }),
|
|
135
134
|
width: 640
|
|
136
135
|
},
|
|
137
136
|
{
|
|
138
137
|
title: "tablet_md_title",
|
|
139
138
|
content: "tablet_md_content",
|
|
140
139
|
breakpoint: "md",
|
|
141
|
-
icon: /* @__PURE__ */ r.jsx(
|
|
140
|
+
icon: /* @__PURE__ */ r.jsx(Me, {}),
|
|
142
141
|
width: 800
|
|
143
142
|
},
|
|
144
143
|
{
|
|
145
144
|
title: "tablet_lg_title",
|
|
146
145
|
content: "tablet_lg_content",
|
|
147
146
|
breakpoint: "lg",
|
|
148
|
-
icon: /* @__PURE__ */ r.jsx(
|
|
147
|
+
icon: /* @__PURE__ */ r.jsx(Me, { landscape: !0 }),
|
|
149
148
|
width: 1024
|
|
150
149
|
},
|
|
151
150
|
{
|
|
152
151
|
title: "desktop_xl_title",
|
|
153
152
|
content: "desktop_xl_content",
|
|
154
153
|
breakpoint: "xl",
|
|
155
|
-
icon: /* @__PURE__ */ r.jsx(
|
|
154
|
+
icon: /* @__PURE__ */ r.jsx(Rt, {}),
|
|
156
155
|
width: 1420
|
|
157
156
|
},
|
|
158
157
|
{
|
|
159
158
|
title: "large_desktop_2xl_title",
|
|
160
159
|
content: "large_desktop_2xl_content",
|
|
161
160
|
breakpoint: "2xl",
|
|
162
|
-
icon: /* @__PURE__ */ r.jsx(
|
|
161
|
+
icon: /* @__PURE__ */ r.jsx(Pt, {}),
|
|
163
162
|
width: 1920
|
|
164
163
|
}
|
|
165
|
-
],
|
|
164
|
+
], Le = ({
|
|
166
165
|
title: e,
|
|
167
166
|
content: t,
|
|
168
167
|
currentBreakpoint: n,
|
|
@@ -187,26 +186,26 @@ const Ne = ({ landscape: e = !1 }) => /* @__PURE__ */ r.jsxs(
|
|
|
187
186
|
/* @__PURE__ */ r.jsx("p", { className: "text-xs", children: o(t) })
|
|
188
187
|
] }) }) })
|
|
189
188
|
] });
|
|
190
|
-
},
|
|
191
|
-
const [, e, t] =
|
|
189
|
+
}, $n = () => {
|
|
190
|
+
const [, e, t] = Te(), [n, s] = Jt(), { t: i } = de(), l = Ze("breakpoints", Fn), d = (o) => {
|
|
192
191
|
n.includes(o) ? n.length > 2 && s(n.filter((c) => c !== o)) : s((c) => [...c, o]);
|
|
193
192
|
};
|
|
194
|
-
return l.length < 4 ? /* @__PURE__ */ r.jsx("div", { className: "flex items-center rounded-md", children: re(l, (o) => /* @__PURE__ */
|
|
193
|
+
return l.length < 4 ? /* @__PURE__ */ r.jsx("div", { className: "flex items-center rounded-md", children: re(l, (o) => /* @__PURE__ */ De(Le, { ...o, onClick: t, key: o.breakpoint, currentBreakpoint: e })) }) : /* @__PURE__ */ r.jsxs("div", { className: "flex items-center rounded-md", children: [
|
|
195
194
|
re(
|
|
196
|
-
l.filter((o) =>
|
|
197
|
-
(o) => /* @__PURE__ */
|
|
195
|
+
l.filter((o) => Be(n, pe(o.breakpoint))),
|
|
196
|
+
(o) => /* @__PURE__ */ De(Le, { ...o, onClick: t, key: o.breakpoint, currentBreakpoint: e })
|
|
198
197
|
),
|
|
199
198
|
/* @__PURE__ */ r.jsxs(Vt, { children: [
|
|
200
|
-
/* @__PURE__ */ r.jsx(
|
|
199
|
+
/* @__PURE__ */ r.jsx(Qt, { asChild: !0, children: /* @__PURE__ */ r.jsx("span", { className: "cursor-pointer px-2.5 hover:opacity-80", children: /* @__PURE__ */ r.jsx(Mt, { className: "scale-90 transform" }) }) }),
|
|
201
200
|
/* @__PURE__ */ r.jsxs(Zt, { className: "w-56 border-border text-xs", children: [
|
|
202
|
-
/* @__PURE__ */ r.jsx(
|
|
201
|
+
/* @__PURE__ */ r.jsx(Xt, { children: i("Breakpoints") }),
|
|
203
202
|
/* @__PURE__ */ r.jsx(Gt, {}),
|
|
204
203
|
re(l, (o) => /* @__PURE__ */ r.jsx(
|
|
205
204
|
en,
|
|
206
205
|
{
|
|
207
206
|
disabled: o.breakpoint === "xs",
|
|
208
207
|
onCheckedChange: () => d(pe(o.breakpoint)),
|
|
209
|
-
checked:
|
|
208
|
+
checked: Be(n, pe(o.breakpoint)),
|
|
210
209
|
children: i(o.title)
|
|
211
210
|
},
|
|
212
211
|
o.breakpoint
|
|
@@ -214,10 +213,10 @@ const Ne = ({ landscape: e = !1 }) => /* @__PURE__ */ r.jsxs(
|
|
|
214
213
|
] })
|
|
215
214
|
] })
|
|
216
215
|
] });
|
|
217
|
-
},
|
|
218
|
-
const { t: e } = de(),
|
|
219
|
-
t([]),
|
|
220
|
-
}, [t
|
|
216
|
+
}, Wn = () => {
|
|
217
|
+
const { t: e } = de(), { setNewBlocks: t } = tn(), [, n] = W(), [, s] = J(), i = ke(() => {
|
|
218
|
+
t([]), n([]), s([]);
|
|
219
|
+
}, [t]);
|
|
221
220
|
return /* @__PURE__ */ r.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ r.jsxs(nn, { children: [
|
|
222
221
|
/* @__PURE__ */ r.jsx(rn, { asChild: !0, children: /* @__PURE__ */ r.jsxs(le, { size: "sm", variant: "ghost", className: "flex items-center gap-x-1", children: [
|
|
223
222
|
/* @__PURE__ */ r.jsx(Lt, {}),
|
|
@@ -231,19 +230,19 @@ const Ne = ({ landscape: e = !1 }) => /* @__PURE__ */ r.jsxs(
|
|
|
231
230
|
] }),
|
|
232
231
|
/* @__PURE__ */ r.jsxs(cn, { children: [
|
|
233
232
|
/* @__PURE__ */ r.jsx(dn, { children: e("cancel") }),
|
|
234
|
-
/* @__PURE__ */ r.jsx(un, { onClick:
|
|
233
|
+
/* @__PURE__ */ r.jsx(un, { onClick: i, children: e("yes") })
|
|
235
234
|
] })
|
|
236
235
|
] })
|
|
237
236
|
] }) });
|
|
238
|
-
},
|
|
239
|
-
const e = pn("darkMode", !1), [t] =
|
|
237
|
+
}, Hn = () => {
|
|
238
|
+
const e = pn("darkMode", !1), [t] = Xe();
|
|
240
239
|
return /* @__PURE__ */ r.jsxs("div", { className: "flex h-10 items-center justify-between border-b bg-background/70 px-2", children: [
|
|
241
240
|
/* @__PURE__ */ r.jsxs("div", { className: "flex h-full space-x-2", children: [
|
|
242
241
|
e ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
243
|
-
/* @__PURE__ */ r.jsx(
|
|
242
|
+
/* @__PURE__ */ r.jsx(Nn, {}),
|
|
244
243
|
/* @__PURE__ */ r.jsx(ie, { orientation: "vertical" })
|
|
245
244
|
] }) : null,
|
|
246
|
-
/* @__PURE__ */ r.jsx(
|
|
245
|
+
/* @__PURE__ */ r.jsx($n, {}),
|
|
247
246
|
/* @__PURE__ */ r.jsx(ie, { orientation: "vertical" }),
|
|
248
247
|
/* @__PURE__ */ r.jsxs("div", { className: "flex w-12 items-center justify-center gap-x-1 space-x-0 font-medium", children: [
|
|
249
248
|
/* @__PURE__ */ r.jsx(Nt, { className: "h-3.5 w-3.5 flex-shrink-0" }),
|
|
@@ -254,19 +253,19 @@ const Ne = ({ landscape: e = !1 }) => /* @__PURE__ */ r.jsxs(
|
|
|
254
253
|
] })
|
|
255
254
|
] }),
|
|
256
255
|
/* @__PURE__ */ r.jsx(ie, { orientation: "vertical" }),
|
|
257
|
-
/* @__PURE__ */ r.jsx(
|
|
256
|
+
/* @__PURE__ */ r.jsx(Ln, {})
|
|
258
257
|
] }),
|
|
259
258
|
/* @__PURE__ */ r.jsxs("div", { className: "flex h-full items-center space-x-2", children: [
|
|
260
259
|
/* @__PURE__ */ r.jsx(ie, { orientation: "vertical" }),
|
|
261
|
-
/* @__PURE__ */ r.jsx(
|
|
260
|
+
/* @__PURE__ */ r.jsx(Wn, {})
|
|
262
261
|
] })
|
|
263
262
|
] });
|
|
264
|
-
},
|
|
263
|
+
}, Un = `<!doctype html>
|
|
265
264
|
<html class="scroll-smooth h-full overflow-y-auto">
|
|
266
265
|
<head>
|
|
267
266
|
<meta charset="UTF-8">
|
|
268
267
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
269
|
-
<script src="https://
|
|
268
|
+
<script src="https://cdn.tailwindcss.com?plugins=forms,typography,aspect-ratio,line-clamp,container-queries"><\/script>
|
|
270
269
|
<style>
|
|
271
270
|
html { height: 100%; overflow:auto; }
|
|
272
271
|
body { height: 100%; }
|
|
@@ -309,8 +308,8 @@ const Ne = ({ landscape: e = !1 }) => /* @__PURE__ */ r.jsxs(
|
|
|
309
308
|
<div class="frame-root h-full"></div>
|
|
310
309
|
<script src="https://cdn.jsdelivr.net/npm/quill@2.0.0/dist/quill.js"><\/script>
|
|
311
310
|
</body>
|
|
312
|
-
</html>`,
|
|
313
|
-
const [t] =
|
|
311
|
+
</html>`, qn = (e) => {
|
|
312
|
+
const [t] = Te(), [, n] = Xe(), [s, i] = $({}), l = ke(() => {
|
|
314
313
|
const { width: d, height: o } = e;
|
|
315
314
|
if (d < t) {
|
|
316
315
|
const c = parseFloat((d / t).toFixed(2).toString());
|
|
@@ -330,7 +329,7 @@ const Ne = ({ landscape: e = !1 }) => /* @__PURE__ */ r.jsxs(
|
|
|
330
329
|
} else
|
|
331
330
|
i({}), n(100);
|
|
332
331
|
}, [t, e, n]);
|
|
333
|
-
return
|
|
332
|
+
return R(() => {
|
|
334
333
|
l();
|
|
335
334
|
}, [t, e, n, l]), s;
|
|
336
335
|
};
|
|
@@ -340,11 +339,11 @@ object-assign
|
|
|
340
339
|
(c) Sindre Sorhus
|
|
341
340
|
@license MIT
|
|
342
341
|
*/
|
|
343
|
-
var fe,
|
|
344
|
-
function
|
|
345
|
-
if (
|
|
342
|
+
var fe, Ne;
|
|
343
|
+
function zn() {
|
|
344
|
+
if (Ne)
|
|
346
345
|
return fe;
|
|
347
|
-
|
|
346
|
+
Ne = 1;
|
|
348
347
|
var e = Object.getOwnPropertySymbols, t = Object.prototype.hasOwnProperty, n = Object.prototype.propertyIsEnumerable;
|
|
349
348
|
function s(l) {
|
|
350
349
|
if (l == null)
|
|
@@ -380,34 +379,34 @@ function Jn() {
|
|
|
380
379
|
t.call(o, h) && (c[h] = o[h]);
|
|
381
380
|
if (e) {
|
|
382
381
|
p = e(o);
|
|
383
|
-
for (var
|
|
384
|
-
n.call(o, p[
|
|
382
|
+
for (var v = 0; v < p.length; v++)
|
|
383
|
+
n.call(o, p[v]) && (c[p[v]] = o[p[v]]);
|
|
385
384
|
}
|
|
386
385
|
}
|
|
387
386
|
return c;
|
|
388
387
|
}, fe;
|
|
389
388
|
}
|
|
390
|
-
var he,
|
|
391
|
-
function
|
|
392
|
-
if (
|
|
389
|
+
var he, Fe;
|
|
390
|
+
function Ee() {
|
|
391
|
+
if (Fe)
|
|
393
392
|
return he;
|
|
394
|
-
|
|
393
|
+
Fe = 1;
|
|
395
394
|
var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
396
395
|
return he = e, he;
|
|
397
396
|
}
|
|
398
|
-
var ge,
|
|
399
|
-
function
|
|
400
|
-
return
|
|
397
|
+
var ge, $e;
|
|
398
|
+
function at() {
|
|
399
|
+
return $e || ($e = 1, ge = Function.call.bind(Object.prototype.hasOwnProperty)), ge;
|
|
401
400
|
}
|
|
402
|
-
var me,
|
|
403
|
-
function
|
|
404
|
-
if (
|
|
401
|
+
var me, We;
|
|
402
|
+
function Yn() {
|
|
403
|
+
if (We)
|
|
405
404
|
return me;
|
|
406
|
-
|
|
405
|
+
We = 1;
|
|
407
406
|
var e = function() {
|
|
408
407
|
};
|
|
409
408
|
if (process.env.NODE_ENV !== "production") {
|
|
410
|
-
var t =
|
|
409
|
+
var t = Ee(), n = {}, s = at();
|
|
411
410
|
e = function(l) {
|
|
412
411
|
var d = "Warning: " + l;
|
|
413
412
|
typeof console < "u" && console.error(d);
|
|
@@ -424,22 +423,22 @@ function Vn() {
|
|
|
424
423
|
var h;
|
|
425
424
|
try {
|
|
426
425
|
if (typeof l[f] != "function") {
|
|
427
|
-
var
|
|
426
|
+
var v = Error(
|
|
428
427
|
(c || "React class") + ": " + o + " type `" + f + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof l[f] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
429
428
|
);
|
|
430
|
-
throw
|
|
429
|
+
throw v.name = "Invariant Violation", v;
|
|
431
430
|
}
|
|
432
431
|
h = l[f](d, f, c, o, null, t);
|
|
433
|
-
} catch (
|
|
434
|
-
h =
|
|
432
|
+
} catch (O) {
|
|
433
|
+
h = O;
|
|
435
434
|
}
|
|
436
435
|
if (h && !(h instanceof Error) && e(
|
|
437
436
|
(c || "React class") + ": type specification of " + o + " `" + f + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof h + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
438
437
|
), h instanceof Error && !(h.message in n)) {
|
|
439
438
|
n[h.message] = !0;
|
|
440
|
-
var
|
|
439
|
+
var S = p ? p() : "";
|
|
441
440
|
e(
|
|
442
|
-
"Failed " + o + " type: " + h.message + (
|
|
441
|
+
"Failed " + o + " type: " + h.message + (S ?? "")
|
|
443
442
|
);
|
|
444
443
|
}
|
|
445
444
|
}
|
|
@@ -449,12 +448,12 @@ function Vn() {
|
|
|
449
448
|
process.env.NODE_ENV !== "production" && (n = {});
|
|
450
449
|
}, me = i, me;
|
|
451
450
|
}
|
|
452
|
-
var ye,
|
|
453
|
-
function
|
|
454
|
-
if (
|
|
451
|
+
var ye, He;
|
|
452
|
+
function Kn() {
|
|
453
|
+
if (He)
|
|
455
454
|
return ye;
|
|
456
|
-
|
|
457
|
-
var e = ot, t =
|
|
455
|
+
He = 1;
|
|
456
|
+
var e = ot, t = zn(), n = Ee(), s = at(), i = Yn(), l = function() {
|
|
458
457
|
};
|
|
459
458
|
process.env.NODE_ENV !== "production" && (l = function(o) {
|
|
460
459
|
var c = "Warning: " + o;
|
|
@@ -474,230 +473,230 @@ function Xn() {
|
|
|
474
473
|
if (typeof u == "function")
|
|
475
474
|
return u;
|
|
476
475
|
}
|
|
477
|
-
var
|
|
478
|
-
array:
|
|
479
|
-
bigint:
|
|
480
|
-
bool:
|
|
481
|
-
func:
|
|
482
|
-
number:
|
|
483
|
-
object:
|
|
484
|
-
string:
|
|
485
|
-
symbol:
|
|
486
|
-
any:
|
|
487
|
-
arrayOf:
|
|
488
|
-
element:
|
|
489
|
-
elementType:
|
|
476
|
+
var v = "<<anonymous>>", S = {
|
|
477
|
+
array: I("array"),
|
|
478
|
+
bigint: I("bigint"),
|
|
479
|
+
bool: I("boolean"),
|
|
480
|
+
func: I("function"),
|
|
481
|
+
number: I("number"),
|
|
482
|
+
object: I("object"),
|
|
483
|
+
string: I("string"),
|
|
484
|
+
symbol: I("symbol"),
|
|
485
|
+
any: H(),
|
|
486
|
+
arrayOf: V,
|
|
487
|
+
element: Q(),
|
|
488
|
+
elementType: L(),
|
|
490
489
|
instanceOf: _,
|
|
491
|
-
node:
|
|
492
|
-
objectOf:
|
|
493
|
-
oneOf:
|
|
494
|
-
oneOfType:
|
|
495
|
-
shape:
|
|
496
|
-
exact:
|
|
490
|
+
node: mt(),
|
|
491
|
+
objectOf: F,
|
|
492
|
+
oneOf: N,
|
|
493
|
+
oneOfType: gt,
|
|
494
|
+
shape: yt,
|
|
495
|
+
exact: vt
|
|
497
496
|
};
|
|
498
|
-
function
|
|
497
|
+
function O(a, u) {
|
|
499
498
|
return a === u ? a !== 0 || 1 / a === 1 / u : a !== a && u !== u;
|
|
500
499
|
}
|
|
501
|
-
function
|
|
500
|
+
function m(a, u) {
|
|
502
501
|
this.message = a, this.data = u && typeof u == "object" ? u : {}, this.stack = "";
|
|
503
502
|
}
|
|
504
|
-
|
|
505
|
-
function
|
|
503
|
+
m.prototype = Error.prototype;
|
|
504
|
+
function g(a) {
|
|
506
505
|
if (process.env.NODE_ENV !== "production")
|
|
507
506
|
var u = {}, k = 0;
|
|
508
|
-
function
|
|
509
|
-
if (T = T ||
|
|
507
|
+
function b(j, x, w, T, E, C, P) {
|
|
508
|
+
if (T = T || v, C = C || w, P !== n) {
|
|
510
509
|
if (c) {
|
|
511
|
-
var
|
|
510
|
+
var B = new Error(
|
|
512
511
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
|
|
513
512
|
);
|
|
514
|
-
throw
|
|
513
|
+
throw B.name = "Invariant Violation", B;
|
|
515
514
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
516
|
-
var Z = T + ":" +
|
|
515
|
+
var Z = T + ":" + w;
|
|
517
516
|
!u[Z] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
518
517
|
k < 3 && (l(
|
|
519
518
|
"You are manually calling a React.PropTypes validation function for the `" + C + "` prop on `" + T + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
520
519
|
), u[Z] = !0, k++);
|
|
521
520
|
}
|
|
522
521
|
}
|
|
523
|
-
return
|
|
522
|
+
return x[w] == null ? j ? x[w] === null ? new m("The " + E + " `" + C + "` is marked as required " + ("in `" + T + "`, but its value is `null`.")) : new m("The " + E + " `" + C + "` is marked as required in " + ("`" + T + "`, but its value is `undefined`.")) : null : a(x, w, T, E, C);
|
|
524
523
|
}
|
|
525
|
-
var
|
|
526
|
-
return
|
|
524
|
+
var y = b.bind(null, !1);
|
|
525
|
+
return y.isRequired = b.bind(null, !0), y;
|
|
527
526
|
}
|
|
528
|
-
function
|
|
529
|
-
function u(k,
|
|
530
|
-
var T = k[
|
|
531
|
-
if (
|
|
527
|
+
function I(a) {
|
|
528
|
+
function u(k, b, y, j, x, w) {
|
|
529
|
+
var T = k[b], E = U(T);
|
|
530
|
+
if (E !== a) {
|
|
532
531
|
var C = ee(T);
|
|
533
|
-
return new
|
|
534
|
-
"Invalid " + j + " `" +
|
|
532
|
+
return new m(
|
|
533
|
+
"Invalid " + j + " `" + x + "` of type " + ("`" + C + "` supplied to `" + y + "`, expected ") + ("`" + a + "`."),
|
|
535
534
|
{ expectedType: a }
|
|
536
535
|
);
|
|
537
536
|
}
|
|
538
537
|
return null;
|
|
539
538
|
}
|
|
540
|
-
return
|
|
539
|
+
return g(u);
|
|
541
540
|
}
|
|
542
|
-
function
|
|
543
|
-
return
|
|
541
|
+
function H() {
|
|
542
|
+
return g(d);
|
|
544
543
|
}
|
|
545
|
-
function
|
|
546
|
-
function u(k,
|
|
544
|
+
function V(a) {
|
|
545
|
+
function u(k, b, y, j, x) {
|
|
547
546
|
if (typeof a != "function")
|
|
548
|
-
return new
|
|
549
|
-
var
|
|
550
|
-
if (!Array.isArray(
|
|
551
|
-
var T =
|
|
552
|
-
return new
|
|
547
|
+
return new m("Property `" + x + "` of component `" + y + "` has invalid PropType notation inside arrayOf.");
|
|
548
|
+
var w = k[b];
|
|
549
|
+
if (!Array.isArray(w)) {
|
|
550
|
+
var T = U(w);
|
|
551
|
+
return new m("Invalid " + j + " `" + x + "` of type " + ("`" + T + "` supplied to `" + y + "`, expected an array."));
|
|
553
552
|
}
|
|
554
|
-
for (var
|
|
555
|
-
var C = a(
|
|
553
|
+
for (var E = 0; E < w.length; E++) {
|
|
554
|
+
var C = a(w, E, y, j, x + "[" + E + "]", n);
|
|
556
555
|
if (C instanceof Error)
|
|
557
556
|
return C;
|
|
558
557
|
}
|
|
559
558
|
return null;
|
|
560
559
|
}
|
|
561
|
-
return
|
|
560
|
+
return g(u);
|
|
562
561
|
}
|
|
563
|
-
function
|
|
564
|
-
function a(u, k,
|
|
565
|
-
var
|
|
566
|
-
if (!o(
|
|
567
|
-
var
|
|
568
|
-
return new
|
|
562
|
+
function Q() {
|
|
563
|
+
function a(u, k, b, y, j) {
|
|
564
|
+
var x = u[k];
|
|
565
|
+
if (!o(x)) {
|
|
566
|
+
var w = U(x);
|
|
567
|
+
return new m("Invalid " + y + " `" + j + "` of type " + ("`" + w + "` supplied to `" + b + "`, expected a single ReactElement."));
|
|
569
568
|
}
|
|
570
569
|
return null;
|
|
571
570
|
}
|
|
572
|
-
return
|
|
571
|
+
return g(a);
|
|
573
572
|
}
|
|
574
|
-
function
|
|
575
|
-
function a(u, k,
|
|
576
|
-
var
|
|
577
|
-
if (!e.isValidElementType(
|
|
578
|
-
var
|
|
579
|
-
return new
|
|
573
|
+
function L() {
|
|
574
|
+
function a(u, k, b, y, j) {
|
|
575
|
+
var x = u[k];
|
|
576
|
+
if (!e.isValidElementType(x)) {
|
|
577
|
+
var w = U(x);
|
|
578
|
+
return new m("Invalid " + y + " `" + j + "` of type " + ("`" + w + "` supplied to `" + b + "`, expected a single ReactElement type."));
|
|
580
579
|
}
|
|
581
580
|
return null;
|
|
582
581
|
}
|
|
583
|
-
return
|
|
582
|
+
return g(a);
|
|
584
583
|
}
|
|
585
584
|
function _(a) {
|
|
586
|
-
function u(k,
|
|
587
|
-
if (!(k[
|
|
588
|
-
var
|
|
589
|
-
return new
|
|
585
|
+
function u(k, b, y, j, x) {
|
|
586
|
+
if (!(k[b] instanceof a)) {
|
|
587
|
+
var w = a.name || v, T = wt(k[b]);
|
|
588
|
+
return new m("Invalid " + j + " `" + x + "` of type " + ("`" + T + "` supplied to `" + y + "`, expected ") + ("instance of `" + w + "`."));
|
|
590
589
|
}
|
|
591
590
|
return null;
|
|
592
591
|
}
|
|
593
|
-
return
|
|
592
|
+
return g(u);
|
|
594
593
|
}
|
|
595
|
-
function
|
|
594
|
+
function N(a) {
|
|
596
595
|
if (!Array.isArray(a))
|
|
597
596
|
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? l(
|
|
598
597
|
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
599
598
|
) : l("Invalid argument supplied to oneOf, expected an array.")), d;
|
|
600
|
-
function u(k,
|
|
601
|
-
for (var
|
|
602
|
-
if (
|
|
599
|
+
function u(k, b, y, j, x) {
|
|
600
|
+
for (var w = k[b], T = 0; T < a.length; T++)
|
|
601
|
+
if (O(w, a[T]))
|
|
603
602
|
return null;
|
|
604
|
-
var
|
|
605
|
-
var Z = ee(
|
|
606
|
-
return Z === "symbol" ? String(
|
|
603
|
+
var E = JSON.stringify(a, function(P, B) {
|
|
604
|
+
var Z = ee(B);
|
|
605
|
+
return Z === "symbol" ? String(B) : B;
|
|
607
606
|
});
|
|
608
|
-
return new
|
|
607
|
+
return new m("Invalid " + j + " `" + x + "` of value `" + String(w) + "` " + ("supplied to `" + y + "`, expected one of " + E + "."));
|
|
609
608
|
}
|
|
610
|
-
return
|
|
609
|
+
return g(u);
|
|
611
610
|
}
|
|
612
|
-
function
|
|
613
|
-
function u(k,
|
|
611
|
+
function F(a) {
|
|
612
|
+
function u(k, b, y, j, x) {
|
|
614
613
|
if (typeof a != "function")
|
|
615
|
-
return new
|
|
616
|
-
var
|
|
614
|
+
return new m("Property `" + x + "` of component `" + y + "` has invalid PropType notation inside objectOf.");
|
|
615
|
+
var w = k[b], T = U(w);
|
|
617
616
|
if (T !== "object")
|
|
618
|
-
return new
|
|
619
|
-
for (var
|
|
620
|
-
if (s(
|
|
621
|
-
var C = a(
|
|
617
|
+
return new m("Invalid " + j + " `" + x + "` of type " + ("`" + T + "` supplied to `" + y + "`, expected an object."));
|
|
618
|
+
for (var E in w)
|
|
619
|
+
if (s(w, E)) {
|
|
620
|
+
var C = a(w, E, y, j, x + "." + E, n);
|
|
622
621
|
if (C instanceof Error)
|
|
623
622
|
return C;
|
|
624
623
|
}
|
|
625
624
|
return null;
|
|
626
625
|
}
|
|
627
|
-
return
|
|
626
|
+
return g(u);
|
|
628
627
|
}
|
|
629
|
-
function
|
|
628
|
+
function gt(a) {
|
|
630
629
|
if (!Array.isArray(a))
|
|
631
630
|
return process.env.NODE_ENV !== "production" && l("Invalid argument supplied to oneOfType, expected an instance of array."), d;
|
|
632
631
|
for (var u = 0; u < a.length; u++) {
|
|
633
632
|
var k = a[u];
|
|
634
633
|
if (typeof k != "function")
|
|
635
634
|
return l(
|
|
636
|
-
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " +
|
|
635
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + bt(k) + " at index " + u + "."
|
|
637
636
|
), d;
|
|
638
637
|
}
|
|
639
|
-
function
|
|
640
|
-
for (var
|
|
641
|
-
var
|
|
642
|
-
if (
|
|
638
|
+
function b(y, j, x, w, T) {
|
|
639
|
+
for (var E = [], C = 0; C < a.length; C++) {
|
|
640
|
+
var P = a[C], B = P(y, j, x, w, T, n);
|
|
641
|
+
if (B == null)
|
|
643
642
|
return null;
|
|
644
|
-
|
|
643
|
+
B.data && s(B.data, "expectedType") && E.push(B.data.expectedType);
|
|
645
644
|
}
|
|
646
|
-
var Z =
|
|
647
|
-
return new
|
|
645
|
+
var Z = E.length > 0 ? ", expected one of type [" + E.join(", ") + "]" : "";
|
|
646
|
+
return new m("Invalid " + w + " `" + T + "` supplied to " + ("`" + x + "`" + Z + "."));
|
|
648
647
|
}
|
|
649
|
-
return
|
|
648
|
+
return g(b);
|
|
650
649
|
}
|
|
651
|
-
function
|
|
652
|
-
function a(u, k,
|
|
653
|
-
return se(u[k]) ? null : new
|
|
650
|
+
function mt() {
|
|
651
|
+
function a(u, k, b, y, j) {
|
|
652
|
+
return se(u[k]) ? null : new m("Invalid " + y + " `" + j + "` supplied to " + ("`" + b + "`, expected a ReactNode."));
|
|
654
653
|
}
|
|
655
|
-
return
|
|
654
|
+
return g(a);
|
|
656
655
|
}
|
|
657
|
-
function
|
|
658
|
-
return new
|
|
659
|
-
(a || "React class") + ": " + u + " type `" + k + "." +
|
|
656
|
+
function Se(a, u, k, b, y) {
|
|
657
|
+
return new m(
|
|
658
|
+
(a || "React class") + ": " + u + " type `" + k + "." + b + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + y + "`."
|
|
660
659
|
);
|
|
661
660
|
}
|
|
662
|
-
function
|
|
663
|
-
function u(k,
|
|
664
|
-
var
|
|
661
|
+
function yt(a) {
|
|
662
|
+
function u(k, b, y, j, x) {
|
|
663
|
+
var w = k[b], T = U(w);
|
|
665
664
|
if (T !== "object")
|
|
666
|
-
return new
|
|
667
|
-
for (var
|
|
668
|
-
var C = a[
|
|
665
|
+
return new m("Invalid " + j + " `" + x + "` of type `" + T + "` " + ("supplied to `" + y + "`, expected `object`."));
|
|
666
|
+
for (var E in a) {
|
|
667
|
+
var C = a[E];
|
|
669
668
|
if (typeof C != "function")
|
|
670
|
-
return
|
|
671
|
-
var
|
|
672
|
-
if (
|
|
673
|
-
return
|
|
669
|
+
return Se(y, j, x, E, ee(C));
|
|
670
|
+
var P = C(w, E, y, j, x + "." + E, n);
|
|
671
|
+
if (P)
|
|
672
|
+
return P;
|
|
674
673
|
}
|
|
675
674
|
return null;
|
|
676
675
|
}
|
|
677
|
-
return
|
|
676
|
+
return g(u);
|
|
678
677
|
}
|
|
679
|
-
function
|
|
680
|
-
function u(k,
|
|
681
|
-
var
|
|
678
|
+
function vt(a) {
|
|
679
|
+
function u(k, b, y, j, x) {
|
|
680
|
+
var w = k[b], T = U(w);
|
|
682
681
|
if (T !== "object")
|
|
683
|
-
return new
|
|
684
|
-
var
|
|
685
|
-
for (var C in
|
|
686
|
-
var
|
|
687
|
-
if (s(a, C) && typeof
|
|
688
|
-
return
|
|
689
|
-
if (!
|
|
690
|
-
return new
|
|
691
|
-
"Invalid " + j + " `" +
|
|
682
|
+
return new m("Invalid " + j + " `" + x + "` of type `" + T + "` " + ("supplied to `" + y + "`, expected `object`."));
|
|
683
|
+
var E = t({}, k[b], a);
|
|
684
|
+
for (var C in E) {
|
|
685
|
+
var P = a[C];
|
|
686
|
+
if (s(a, C) && typeof P != "function")
|
|
687
|
+
return Se(y, j, x, C, ee(P));
|
|
688
|
+
if (!P)
|
|
689
|
+
return new m(
|
|
690
|
+
"Invalid " + j + " `" + x + "` key `" + C + "` supplied to `" + y + "`.\nBad object: " + JSON.stringify(k[b], null, " ") + `
|
|
692
691
|
Valid keys: ` + JSON.stringify(Object.keys(a), null, " ")
|
|
693
692
|
);
|
|
694
|
-
var
|
|
695
|
-
if (
|
|
696
|
-
return
|
|
693
|
+
var B = P(w, C, y, j, x + "." + C, n);
|
|
694
|
+
if (B)
|
|
695
|
+
return B;
|
|
697
696
|
}
|
|
698
697
|
return null;
|
|
699
698
|
}
|
|
700
|
-
return
|
|
699
|
+
return g(u);
|
|
701
700
|
}
|
|
702
701
|
function se(a) {
|
|
703
702
|
switch (typeof a) {
|
|
@@ -714,15 +713,15 @@ Valid keys: ` + JSON.stringify(Object.keys(a), null, " ")
|
|
|
714
713
|
return !0;
|
|
715
714
|
var u = h(a);
|
|
716
715
|
if (u) {
|
|
717
|
-
var k = u.call(a),
|
|
716
|
+
var k = u.call(a), b;
|
|
718
717
|
if (u !== a.entries) {
|
|
719
|
-
for (; !(
|
|
720
|
-
if (!se(
|
|
718
|
+
for (; !(b = k.next()).done; )
|
|
719
|
+
if (!se(b.value))
|
|
721
720
|
return !1;
|
|
722
721
|
} else
|
|
723
|
-
for (; !(
|
|
724
|
-
var
|
|
725
|
-
if (
|
|
722
|
+
for (; !(b = k.next()).done; ) {
|
|
723
|
+
var y = b.value;
|
|
724
|
+
if (y && !se(y[1]))
|
|
726
725
|
return !1;
|
|
727
726
|
}
|
|
728
727
|
} else
|
|
@@ -732,17 +731,17 @@ Valid keys: ` + JSON.stringify(Object.keys(a), null, " ")
|
|
|
732
731
|
return !1;
|
|
733
732
|
}
|
|
734
733
|
}
|
|
735
|
-
function
|
|
734
|
+
function xt(a, u) {
|
|
736
735
|
return a === "symbol" ? !0 : u ? u["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && u instanceof Symbol : !1;
|
|
737
736
|
}
|
|
738
|
-
function
|
|
737
|
+
function U(a) {
|
|
739
738
|
var u = typeof a;
|
|
740
|
-
return Array.isArray(a) ? "array" : a instanceof RegExp ? "object" :
|
|
739
|
+
return Array.isArray(a) ? "array" : a instanceof RegExp ? "object" : xt(u, a) ? "symbol" : u;
|
|
741
740
|
}
|
|
742
741
|
function ee(a) {
|
|
743
742
|
if (typeof a > "u" || a === null)
|
|
744
743
|
return "" + a;
|
|
745
|
-
var u =
|
|
744
|
+
var u = U(a);
|
|
746
745
|
if (u === "object") {
|
|
747
746
|
if (a instanceof Date)
|
|
748
747
|
return "date";
|
|
@@ -751,7 +750,7 @@ Valid keys: ` + JSON.stringify(Object.keys(a), null, " ")
|
|
|
751
750
|
}
|
|
752
751
|
return u;
|
|
753
752
|
}
|
|
754
|
-
function
|
|
753
|
+
function bt(a) {
|
|
755
754
|
var u = ee(a);
|
|
756
755
|
switch (u) {
|
|
757
756
|
case "array":
|
|
@@ -766,17 +765,17 @@ Valid keys: ` + JSON.stringify(Object.keys(a), null, " ")
|
|
|
766
765
|
}
|
|
767
766
|
}
|
|
768
767
|
function wt(a) {
|
|
769
|
-
return !a.constructor || !a.constructor.name ?
|
|
768
|
+
return !a.constructor || !a.constructor.name ? v : a.constructor.name;
|
|
770
769
|
}
|
|
771
|
-
return
|
|
770
|
+
return S.checkPropTypes = i, S.resetWarningCache = i.resetWarningCache, S.PropTypes = S, S;
|
|
772
771
|
}, ye;
|
|
773
772
|
}
|
|
774
|
-
var ve,
|
|
775
|
-
function
|
|
776
|
-
if (
|
|
773
|
+
var ve, Ue;
|
|
774
|
+
function Jn() {
|
|
775
|
+
if (Ue)
|
|
777
776
|
return ve;
|
|
778
|
-
|
|
779
|
-
var e =
|
|
777
|
+
Ue = 1;
|
|
778
|
+
var e = Ee();
|
|
780
779
|
function t() {
|
|
781
780
|
}
|
|
782
781
|
function n() {
|
|
@@ -784,10 +783,10 @@ function Zn() {
|
|
|
784
783
|
return n.resetWarningCache = t, ve = function() {
|
|
785
784
|
function s(d, o, c, p, f, h) {
|
|
786
785
|
if (h !== e) {
|
|
787
|
-
var
|
|
786
|
+
var v = new Error(
|
|
788
787
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
789
788
|
);
|
|
790
|
-
throw
|
|
789
|
+
throw v.name = "Invariant Violation", v;
|
|
791
790
|
}
|
|
792
791
|
}
|
|
793
792
|
s.isRequired = s;
|
|
@@ -820,19 +819,19 @@ function Zn() {
|
|
|
820
819
|
return l.PropTypes = l, l;
|
|
821
820
|
}, ve;
|
|
822
821
|
}
|
|
823
|
-
var
|
|
822
|
+
var Do = ce.exports;
|
|
824
823
|
if (process.env.NODE_ENV !== "production") {
|
|
825
|
-
var
|
|
826
|
-
ce.exports =
|
|
824
|
+
var Vn = ot, Qn = !0;
|
|
825
|
+
ce.exports = Kn()(Vn.isElement, Qn);
|
|
827
826
|
} else
|
|
828
|
-
ce.exports =
|
|
829
|
-
var
|
|
830
|
-
const
|
|
831
|
-
let
|
|
832
|
-
typeof document < "u" && (
|
|
833
|
-
typeof window < "u" && (
|
|
834
|
-
const
|
|
835
|
-
class
|
|
827
|
+
ce.exports = Jn()();
|
|
828
|
+
var Zn = ce.exports;
|
|
829
|
+
const A = /* @__PURE__ */ jn(Zn);
|
|
830
|
+
let lt, ct;
|
|
831
|
+
typeof document < "u" && (lt = document);
|
|
832
|
+
typeof window < "u" && (ct = window);
|
|
833
|
+
const dt = K.createContext({ document: lt, window: ct }), ue = () => K.useContext(dt), { Provider: Xn, Consumer: _o } = dt;
|
|
834
|
+
class ut extends ze {
|
|
836
835
|
componentDidMount() {
|
|
837
836
|
this.props.contentDidMount();
|
|
838
837
|
}
|
|
@@ -840,31 +839,31 @@ class pt extends Ke {
|
|
|
840
839
|
this.props.contentDidUpdate();
|
|
841
840
|
}
|
|
842
841
|
render() {
|
|
843
|
-
return
|
|
842
|
+
return Tt.only(this.props.children);
|
|
844
843
|
}
|
|
845
844
|
}
|
|
846
|
-
|
|
847
|
-
children:
|
|
848
|
-
contentDidMount:
|
|
849
|
-
contentDidUpdate:
|
|
845
|
+
Y(ut, "propTypes", {
|
|
846
|
+
children: A.element.isRequired,
|
|
847
|
+
contentDidMount: A.func.isRequired,
|
|
848
|
+
contentDidUpdate: A.func.isRequired
|
|
850
849
|
});
|
|
851
|
-
class
|
|
850
|
+
class be extends ze {
|
|
852
851
|
constructor(n, s) {
|
|
853
852
|
super(n, s);
|
|
854
|
-
|
|
853
|
+
Y(this, "setRef", (n) => {
|
|
855
854
|
this.nodeRef.current = n;
|
|
856
855
|
const { forwardedRef: s } = this.props;
|
|
857
856
|
typeof s == "function" ? s(n) : s && (s.current = n);
|
|
858
857
|
});
|
|
859
|
-
|
|
858
|
+
Y(this, "handleLoad", () => {
|
|
860
859
|
clearInterval(this.loadCheck), this.state.iframeLoaded || this.setState({ iframeLoaded: !0 });
|
|
861
860
|
});
|
|
862
861
|
// In certain situations on a cold cache DOMContentLoaded never gets called
|
|
863
862
|
// fallback to an interval to check if that's the case
|
|
864
|
-
|
|
863
|
+
Y(this, "loadCheck", () => setInterval(() => {
|
|
865
864
|
this.handleLoad();
|
|
866
865
|
}, 500));
|
|
867
|
-
this._isMounted = !1, this.nodeRef =
|
|
866
|
+
this._isMounted = !1, this.nodeRef = K.createRef(), this.state = { iframeLoaded: !1 };
|
|
868
867
|
}
|
|
869
868
|
componentDidMount() {
|
|
870
869
|
this._isMounted = !0, this.getDoc() && this.nodeRef.current.contentWindow.addEventListener("DOMContentLoaded", this.handleLoad);
|
|
@@ -885,8 +884,8 @@ class ke extends Ke {
|
|
|
885
884
|
const n = this.getDoc();
|
|
886
885
|
if (!n)
|
|
887
886
|
return null;
|
|
888
|
-
const s = this.props.contentDidMount, i = this.props.contentDidUpdate, l = n.defaultView || n.parentView, d = /* @__PURE__ */ r.jsx(
|
|
889
|
-
return [
|
|
887
|
+
const s = this.props.contentDidMount, i = this.props.contentDidUpdate, l = n.defaultView || n.parentView, d = /* @__PURE__ */ r.jsx(ut, { contentDidMount: s, contentDidUpdate: i, children: /* @__PURE__ */ r.jsx(Xn, { value: { document: n, window: l }, children: /* @__PURE__ */ r.jsx("div", { className: "frame-content", children: this.props.children }) }) }), o = this.getMountTarget();
|
|
888
|
+
return [Re.createPortal(this.props.head, this.getDoc().head), Re.createPortal(d, o)];
|
|
890
889
|
}
|
|
891
890
|
render() {
|
|
892
891
|
const n = {
|
|
@@ -902,16 +901,16 @@ class ke extends Ke {
|
|
|
902
901
|
// also inject into the body and can mess up React. For this reason
|
|
903
902
|
// initialContent is expected to have a div inside of the body
|
|
904
903
|
// element that we render react into.
|
|
905
|
-
|
|
906
|
-
style:
|
|
904
|
+
Y(be, "propTypes", {
|
|
905
|
+
style: A.object,
|
|
907
906
|
// eslint-disable-line
|
|
908
|
-
head:
|
|
909
|
-
initialContent:
|
|
910
|
-
mountTarget:
|
|
911
|
-
contentDidMount:
|
|
912
|
-
contentDidUpdate:
|
|
913
|
-
children:
|
|
914
|
-
}),
|
|
907
|
+
head: A.node,
|
|
908
|
+
initialContent: A.string,
|
|
909
|
+
mountTarget: A.string,
|
|
910
|
+
contentDidMount: A.func,
|
|
911
|
+
contentDidUpdate: A.func,
|
|
912
|
+
children: A.oneOfType([A.element, A.arrayOf(A.element)])
|
|
913
|
+
}), Y(be, "defaultProps", {
|
|
915
914
|
style: {},
|
|
916
915
|
head: null,
|
|
917
916
|
children: void 0,
|
|
@@ -922,23 +921,23 @@ J(ke, "propTypes", {
|
|
|
922
921
|
},
|
|
923
922
|
initialContent: '<!DOCTYPE html><html><head></head><body><div class="frame-root"></div></body></html>'
|
|
924
923
|
});
|
|
925
|
-
const
|
|
926
|
-
let
|
|
927
|
-
function
|
|
924
|
+
const Gn = K.forwardRef((e, t) => /* @__PURE__ */ r.jsx(be, { ...e, forwardedRef: t }));
|
|
925
|
+
let q = null, oe = [], ne = null, pt = null;
|
|
926
|
+
function er(e) {
|
|
928
927
|
const t = window.getComputedStyle(e), n = parseInt(t.paddingLeft, 10), s = parseInt(t.paddingTop, 10), i = parseInt(t.paddingRight, 10), l = parseInt(t.paddingBottom, 10);
|
|
929
928
|
return { paddingLeft: n, paddingTop: s, paddingRight: i, paddingBottom: l };
|
|
930
929
|
}
|
|
931
|
-
const
|
|
932
|
-
if (!
|
|
930
|
+
const qe = (e, t, n) => {
|
|
931
|
+
if (!q)
|
|
933
932
|
return;
|
|
934
|
-
const s = e.getBoundingClientRect(), i =
|
|
933
|
+
const s = e.getBoundingClientRect(), i = q == null ? void 0 : q.getElementById("placeholder"), { paddingLeft: l, paddingTop: d, paddingRight: o, paddingBottom: c } = er(e);
|
|
935
934
|
i.style.width = t === "vertical" ? s.width - l - o + "px" : "2px", i.style.height = t === "vertical" ? "2px" : s.height - d - c + "px", i.style.display = "block";
|
|
936
935
|
const p = oe.reduce(
|
|
937
936
|
(f, h) => Math.abs(h - n) < Math.abs(f - n) ? h : f
|
|
938
937
|
);
|
|
939
|
-
|
|
940
|
-
},
|
|
941
|
-
const t =
|
|
938
|
+
pt = oe.indexOf(p), t === "vertical" ? (i.style.top = e.offsetTop + p + "px", i.style.left = e.offsetLeft + l + "px") : (i.style.top = e.offsetTop + d + "px", i.style.left = e.offsetLeft + p + "px");
|
|
939
|
+
}, tr = (e) => {
|
|
940
|
+
const t = ft(e), n = window.getComputedStyle(e), s = t === "horizontal", i = parseInt(n.paddingLeft), l = parseInt(n.paddingTop);
|
|
942
941
|
let d = s ? i : l;
|
|
943
942
|
oe = [d], Array.from(e.children).forEach((o) => {
|
|
944
943
|
const c = window.getComputedStyle(o), p = parseInt(
|
|
@@ -947,7 +946,7 @@ const Ye = (e, t, n) => {
|
|
|
947
946
|
oe.push(d + f + p), d += f + p;
|
|
948
947
|
});
|
|
949
948
|
};
|
|
950
|
-
function
|
|
949
|
+
function ft(e) {
|
|
951
950
|
const t = window.getComputedStyle(e).display, n = window.getComputedStyle(e).flexDirection;
|
|
952
951
|
if (t === "flex")
|
|
953
952
|
return n === "column" || n === "column-reverse" ? "vertical" : "horizontal";
|
|
@@ -960,33 +959,33 @@ function ht(e) {
|
|
|
960
959
|
}
|
|
961
960
|
return t === "block" ? "vertical" : "horizontal";
|
|
962
961
|
}
|
|
963
|
-
const
|
|
964
|
-
const t = e.target, n =
|
|
962
|
+
const nr = Ke((e) => {
|
|
963
|
+
const t = e.target, n = ft(t);
|
|
965
964
|
if (n === "vertical") {
|
|
966
965
|
const s = e.clientY - t.offsetTop;
|
|
967
|
-
|
|
966
|
+
qe(t, n, s);
|
|
968
967
|
} else {
|
|
969
968
|
const s = e.clientX - t.offsetLeft;
|
|
970
|
-
|
|
969
|
+
qe(t, n, s);
|
|
971
970
|
}
|
|
972
|
-
}, 200),
|
|
973
|
-
e.preventDefault(), e.stopPropagation(),
|
|
971
|
+
}, 200), rr = (e) => {
|
|
972
|
+
e.preventDefault(), e.stopPropagation(), nr(e);
|
|
974
973
|
};
|
|
975
974
|
function xe() {
|
|
976
|
-
const e =
|
|
975
|
+
const e = q == null ? void 0 : q.getElementById("placeholder");
|
|
977
976
|
e.style.display = "none";
|
|
978
977
|
}
|
|
979
|
-
const
|
|
980
|
-
const { document: e } = ue(), [t, n] =
|
|
981
|
-
return
|
|
978
|
+
const or = () => {
|
|
979
|
+
const { document: e } = ue(), [t, n] = M(fn), s = Sn(), i = st("dnd"), [, l] = X(), [, d] = W();
|
|
980
|
+
return q = e, {
|
|
982
981
|
isDragging: t,
|
|
983
982
|
"data-dnd": "branch",
|
|
984
|
-
onDragOver: i ?
|
|
983
|
+
onDragOver: i ? rr : te,
|
|
985
984
|
onDrop: i ? (o) => {
|
|
986
985
|
ne == null || ne.classList.remove("outline", "outline-green-300", "outline-2", "-outline-offset-2");
|
|
987
986
|
const c = JSON.parse(o.dataTransfer.getData("text/plain"));
|
|
988
987
|
let p = o.target.getAttribute("data-block-id");
|
|
989
|
-
p === null && (p = o.target.parentElement.getAttribute("data-block-id")), s({ block: c, dropTargetId: p || null, relativeIndex:
|
|
988
|
+
p === null && (p = o.target.parentElement.getAttribute("data-block-id")), s({ block: c, dropTargetId: p || null, relativeIndex: pt }), n(!1), xe(), setTimeout(() => {
|
|
990
989
|
xe();
|
|
991
990
|
}, 300);
|
|
992
991
|
} : te,
|
|
@@ -994,7 +993,7 @@ const ar = () => {
|
|
|
994
993
|
const c = o;
|
|
995
994
|
ne = c.target, c.stopPropagation(), c.preventDefault(), oe = [];
|
|
996
995
|
const p = c.target;
|
|
997
|
-
|
|
996
|
+
tr(p), p.classList.add("outline", "outline-green-300", "outline-2", "-outline-offset-2"), n(!0), l(""), d([]);
|
|
998
997
|
} : te,
|
|
999
998
|
onDragLeave: i ? (o) => {
|
|
1000
999
|
const c = o;
|
|
@@ -1005,72 +1004,72 @@ const ar = () => {
|
|
|
1005
1004
|
} : te
|
|
1006
1005
|
};
|
|
1007
1006
|
};
|
|
1008
|
-
function
|
|
1007
|
+
function Ie(e) {
|
|
1009
1008
|
return e.getAttribute("data-block-id") ? e : e.closest("[data-block-id]");
|
|
1010
1009
|
}
|
|
1011
|
-
function
|
|
1010
|
+
function sr(e) {
|
|
1012
1011
|
e.container.innerHTML = "", e.container.parentNode.removeChild(e.container);
|
|
1013
1012
|
var t = document.querySelector(".ql-toolbar");
|
|
1014
1013
|
t && t.parentNode.removeChild(t), e = null;
|
|
1015
1014
|
}
|
|
1016
|
-
const
|
|
1017
|
-
const e = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], t = hn(), [, n] =
|
|
1015
|
+
const ir = () => {
|
|
1016
|
+
const e = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], t = hn(), [, n] = X(), [s, i] = M(G);
|
|
1018
1017
|
return (l) => {
|
|
1019
1018
|
var h;
|
|
1020
1019
|
if (s)
|
|
1021
1020
|
return;
|
|
1022
|
-
const d =
|
|
1021
|
+
const d = Ie(l.target), o = d.getAttribute("data-block-type");
|
|
1023
1022
|
if (!o || !e.includes(o))
|
|
1024
1023
|
return;
|
|
1025
1024
|
const c = d.cloneNode(!0);
|
|
1026
|
-
d.style.display = "none", Array.from(c.attributes).forEach((
|
|
1027
|
-
|
|
1025
|
+
d.style.display = "none", Array.from(c.attributes).forEach((v) => {
|
|
1026
|
+
v.name !== "class" && c.removeAttribute(v.name);
|
|
1028
1027
|
}), o === "Text" && (c.style.display = "inline-block"), d.parentNode.insertBefore(c, d.nextSibling);
|
|
1029
|
-
const p = new
|
|
1028
|
+
const p = new In(c, { placeholder: "Type here..." });
|
|
1030
1029
|
function f() {
|
|
1031
|
-
const
|
|
1032
|
-
t([d.getAttribute("data-block-id")], { content:
|
|
1030
|
+
const v = p.getText(0, p.getLength());
|
|
1031
|
+
t([d.getAttribute("data-block-id")], { content: v }), d.removeAttribute("style"), c.removeEventListener("blur", f, !0), sr(p), i(""), n("");
|
|
1033
1032
|
}
|
|
1034
1033
|
c.addEventListener("blur", f, !0), p.focus(), (h = c.querySelector(".ql-clipboard")) == null || h.remove(), i(d.getAttribute("data-block-id"));
|
|
1035
1034
|
};
|
|
1036
|
-
},
|
|
1037
|
-
const [, e] =
|
|
1035
|
+
}, ar = () => {
|
|
1036
|
+
const [, e] = J(), [, t] = W(), [n] = M(G);
|
|
1038
1037
|
return (s) => {
|
|
1039
1038
|
if (n)
|
|
1040
1039
|
return;
|
|
1041
1040
|
s.stopPropagation();
|
|
1042
|
-
const i =
|
|
1041
|
+
const i = Ie(s.target);
|
|
1043
1042
|
if (i != null && i.getAttribute("data-block-parent")) {
|
|
1044
1043
|
const l = i.getAttribute("data-style-prop"), d = i.getAttribute("data-style-id"), o = i.getAttribute("data-block-parent");
|
|
1045
1044
|
e([{ id: d, prop: l, blockId: o }]), t([o]);
|
|
1046
1045
|
} else
|
|
1047
1046
|
i != null && i.getAttribute("data-block-id") && t([i.getAttribute("data-block-id")]);
|
|
1048
1047
|
};
|
|
1049
|
-
},
|
|
1050
|
-
const n =
|
|
1048
|
+
}, lr = Ke((e, t) => {
|
|
1049
|
+
const n = Ie(e.target);
|
|
1051
1050
|
n != null && n.getAttribute("data-style-id") && t(n.getAttribute("data-style-id"));
|
|
1052
|
-
}, 100),
|
|
1053
|
-
const [, e] =
|
|
1051
|
+
}, 100), cr = () => {
|
|
1052
|
+
const [, e] = X(), [t] = M(G);
|
|
1054
1053
|
return (n) => {
|
|
1055
|
-
t ||
|
|
1054
|
+
t || lr(n, e);
|
|
1056
1055
|
};
|
|
1057
|
-
},
|
|
1058
|
-
const { document: t } = ue(), [n] =
|
|
1059
|
-
|
|
1056
|
+
}, dr = ({ children: e }) => {
|
|
1057
|
+
const { document: t } = ue(), [n] = W(), [s, i] = J();
|
|
1058
|
+
R(() => {
|
|
1060
1059
|
setTimeout(() => {
|
|
1061
|
-
if (!
|
|
1060
|
+
if (!z(s))
|
|
1062
1061
|
return;
|
|
1063
|
-
const p =
|
|
1062
|
+
const p = ht(t, ae(n));
|
|
1064
1063
|
if (p) {
|
|
1065
1064
|
const f = p.getAttribute("data-style-prop");
|
|
1066
1065
|
if (f) {
|
|
1067
|
-
const h = p.getAttribute("data-style-id"),
|
|
1068
|
-
i([{ id: h, prop: f, blockId:
|
|
1066
|
+
const h = p.getAttribute("data-style-id"), v = p.getAttribute("data-block-parent");
|
|
1067
|
+
i([{ id: h, prop: f, blockId: v }]);
|
|
1069
1068
|
}
|
|
1070
1069
|
}
|
|
1071
1070
|
}, 100);
|
|
1072
1071
|
}, [t, n, i, s]);
|
|
1073
|
-
const l =
|
|
1072
|
+
const l = ir(), d = ar(), o = cr(), c = or();
|
|
1074
1073
|
return /* @__PURE__ */ r.jsx(
|
|
1075
1074
|
"div",
|
|
1076
1075
|
{
|
|
@@ -1079,65 +1078,51 @@ const cr = () => {
|
|
|
1079
1078
|
onClick: d,
|
|
1080
1079
|
onDoubleClick: l,
|
|
1081
1080
|
onMouseMove: o,
|
|
1082
|
-
...
|
|
1081
|
+
...It(c, "isDragging"),
|
|
1083
1082
|
className: "relative mb-5 h-full max-w-full " + (c.isDragging ? "dragging" : ""),
|
|
1084
1083
|
children: e
|
|
1085
1084
|
}
|
|
1086
1085
|
);
|
|
1087
|
-
},
|
|
1088
|
-
const { window: e } = ue(), [t, n] =
|
|
1089
|
-
|
|
1090
|
-
},
|
|
1091
|
-
const
|
|
1092
|
-
return
|
|
1086
|
+
}, ht = (e, t) => e.querySelector(`[data-block-id="${t}"]`), ur = () => {
|
|
1087
|
+
const { window: e } = ue(), [t, n] = W(), [s] = Ce(), [, i] = J(), { undo: l, redo: d } = Ve(), o = Ge(), [, c] = et(), p = tt(), { savePage: f } = gn(), [h] = M(G), [, v] = M(mn), S = (m) => {
|
|
1088
|
+
m.key === "Enter" && (m.preventDefault(), t.length === 1 && v(ae(t)));
|
|
1089
|
+
}, O = (m) => {
|
|
1090
|
+
const g = s.find((I) => I._id === m);
|
|
1091
|
+
return g ? g._parent : null;
|
|
1093
1092
|
};
|
|
1094
|
-
return
|
|
1095
|
-
const
|
|
1096
|
-
if (
|
|
1093
|
+
return R(() => {
|
|
1094
|
+
const m = (g) => {
|
|
1095
|
+
if (g.key === "Escape") {
|
|
1097
1096
|
n([]), i([]);
|
|
1098
1097
|
return;
|
|
1099
1098
|
}
|
|
1100
|
-
if (S(
|
|
1101
|
-
if (
|
|
1102
|
-
|
|
1103
|
-
const
|
|
1104
|
-
|
|
1099
|
+
if (S(g), !h && (g.key === "Delete" || g.key === "Backspace") && (g.preventDefault(), p(t)), g.ctrlKey || g.metaKey) {
|
|
1100
|
+
if (g.key === "ArrowUp") {
|
|
1101
|
+
g.preventDefault();
|
|
1102
|
+
const I = t.length > 0 ? O(t[0]) : null;
|
|
1103
|
+
I && n([I]);
|
|
1105
1104
|
}
|
|
1106
|
-
if (["z", "y", "d", "x", "c", "p", "s", "v"].includes(
|
|
1107
|
-
if (
|
|
1105
|
+
if (["z", "y", "d", "x", "c", "p", "s", "v"].includes(g.key)) {
|
|
1106
|
+
if (h && ["x", "z", "v"].includes(g.key))
|
|
1108
1107
|
return !0;
|
|
1109
|
-
|
|
1108
|
+
g.preventDefault();
|
|
1110
1109
|
}
|
|
1111
|
-
|
|
1110
|
+
g.key === "s" && (g.stopPropagation(), g.preventDefault(), f()), g.key === "z" && l(), g.key === "y" && d(), g.key === "d" && o(t);
|
|
1112
1111
|
}
|
|
1113
1112
|
};
|
|
1114
|
-
return e.removeEventListener("keydown",
|
|
1115
|
-
e.removeEventListener("keydown",
|
|
1113
|
+
return e.removeEventListener("keydown", m), e.addEventListener("keydown", m), () => {
|
|
1114
|
+
e.removeEventListener("keydown", m);
|
|
1116
1115
|
};
|
|
1117
|
-
}, [
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
l,
|
|
1121
|
-
g,
|
|
1122
|
-
h,
|
|
1123
|
-
d,
|
|
1124
|
-
o,
|
|
1125
|
-
c,
|
|
1126
|
-
p,
|
|
1127
|
-
f,
|
|
1128
|
-
A,
|
|
1129
|
-
E,
|
|
1130
|
-
e
|
|
1131
|
-
]), null;
|
|
1132
|
-
}, gr = ({ block: e, label: t }) => {
|
|
1133
|
-
const [, n] = U(), [, s] = Q(), [, i] = N(nt), l = st("dnd");
|
|
1116
|
+
}, [t, n, l, p, c, d, o, h, f, e]), null;
|
|
1117
|
+
}, pr = ({ block: e, label: t }) => {
|
|
1118
|
+
const [, n] = W(), [, s] = X(), [, i] = M(nt), l = st("dnd");
|
|
1134
1119
|
return /* @__PURE__ */ r.jsxs(
|
|
1135
1120
|
"div",
|
|
1136
1121
|
{
|
|
1137
1122
|
className: "mr-10 flex cursor-grab items-center space-x-1 px-1",
|
|
1138
1123
|
draggable: l ? "true" : "false",
|
|
1139
1124
|
onDragStart: (d) => {
|
|
1140
|
-
d.dataTransfer.setData("text/plain", JSON.stringify(
|
|
1125
|
+
d.dataTransfer.setData("text/plain", JSON.stringify(St(e, ["_id", "_type"]))), i(e._id), setTimeout(() => {
|
|
1141
1126
|
n([]), s(null);
|
|
1142
1127
|
}, 200);
|
|
1143
1128
|
},
|
|
@@ -1147,16 +1132,16 @@ const cr = () => {
|
|
|
1147
1132
|
]
|
|
1148
1133
|
}
|
|
1149
1134
|
);
|
|
1150
|
-
},
|
|
1151
|
-
const n = tt(), s = Ge(), [, i] =
|
|
1135
|
+
}, fr = ({ selectedBlockElement: e, block: t }) => {
|
|
1136
|
+
const n = tt(), s = Ge(), [, i] = W(), [, l] = J(), [d] = M(G), { floatingStyles: o, refs: c, update: p } = _n({
|
|
1152
1137
|
placement: "top-start",
|
|
1153
|
-
middleware: [
|
|
1138
|
+
middleware: [Bn(), Dn()],
|
|
1154
1139
|
elements: {
|
|
1155
1140
|
reference: e
|
|
1156
1141
|
}
|
|
1157
1142
|
});
|
|
1158
|
-
|
|
1159
|
-
const f = D(t, "_parent", null), h =
|
|
1143
|
+
On(e, () => p(), e !== null);
|
|
1144
|
+
const f = D(t, "_parent", null), h = z(D(t, "_name", "")) ? D(t, "_type", "") : D(t, "_name", "");
|
|
1160
1145
|
return !e || !t || d ? null : /* @__PURE__ */ r.jsxs(
|
|
1161
1146
|
"div",
|
|
1162
1147
|
{
|
|
@@ -1164,13 +1149,13 @@ const cr = () => {
|
|
|
1164
1149
|
tabIndex: 0,
|
|
1165
1150
|
ref: c.setFloating,
|
|
1166
1151
|
style: o,
|
|
1167
|
-
onClick: (
|
|
1168
|
-
|
|
1152
|
+
onClick: (v) => {
|
|
1153
|
+
v.stopPropagation(), v.preventDefault();
|
|
1169
1154
|
},
|
|
1170
|
-
onKeyDown: (
|
|
1155
|
+
onKeyDown: (v) => v.stopPropagation(),
|
|
1171
1156
|
className: "z-[99999] flex h-6 items-center bg-blue-500 py-2 text-xs text-white",
|
|
1172
1157
|
children: [
|
|
1173
|
-
/* @__PURE__ */ r.jsx(
|
|
1158
|
+
/* @__PURE__ */ r.jsx(pr, { label: h, block: t }),
|
|
1174
1159
|
/* @__PURE__ */ r.jsxs("div", { className: "flex gap-2 px-1 ", children: [
|
|
1175
1160
|
f && /* @__PURE__ */ r.jsx(
|
|
1176
1161
|
$t,
|
|
@@ -1181,199 +1166,199 @@ const cr = () => {
|
|
|
1181
1166
|
}
|
|
1182
1167
|
}
|
|
1183
1168
|
),
|
|
1184
|
-
|
|
1185
|
-
|
|
1169
|
+
yn(D(t, "_type", "")) ? /* @__PURE__ */ r.jsx(Wt, { className: "hover:scale-105 ", onClick: () => s([t == null ? void 0 : t._id]) }) : null,
|
|
1170
|
+
vn(D(t, "_type", "")) ? /* @__PURE__ */ r.jsx(Ht, { className: "hover:scale-105 ", onClick: () => n([t == null ? void 0 : t._id]) }) : null
|
|
1186
1171
|
] })
|
|
1187
1172
|
]
|
|
1188
1173
|
}
|
|
1189
1174
|
);
|
|
1190
|
-
},
|
|
1191
|
-
const [t] =
|
|
1175
|
+
}, hr = ({ model: e }) => {
|
|
1176
|
+
const [t] = xn(), [n] = W(), [s] = Qe(), [i] = X(), [l] = J(), [d] = M(nt), { document: o, window: c } = ue(), [p] = $(o == null ? void 0 : o.getElementById("highlighted-block")), [f] = $(
|
|
1192
1177
|
o == null ? void 0 : o.getElementById("selected-block")
|
|
1193
|
-
), [h] =
|
|
1178
|
+
), [h] = $(
|
|
1194
1179
|
o == null ? void 0 : o.getElementById("selected-styling-block")
|
|
1195
|
-
), [
|
|
1196
|
-
|
|
1180
|
+
), [v] = $(o == null ? void 0 : o.getElementById("dragged-block"));
|
|
1181
|
+
R(() => {
|
|
1197
1182
|
s ? o == null || o.documentElement.classList.add("dark") : o == null || o.documentElement.classList.remove("dark");
|
|
1198
1183
|
}, [s, o]);
|
|
1199
|
-
const
|
|
1200
|
-
return
|
|
1201
|
-
const
|
|
1202
|
-
colors: [
|
|
1184
|
+
const S = D(t, "headingFont", "DM Sans"), O = D(t, "bodyFont", "DM Sans");
|
|
1185
|
+
return R(() => {
|
|
1186
|
+
const m = D(t, "primaryColor", "#000"), g = D(t, "secondaryColor", "#FFF"), I = An({
|
|
1187
|
+
colors: [m, g],
|
|
1203
1188
|
names: ["primary", "secondary"]
|
|
1204
1189
|
});
|
|
1205
|
-
|
|
1206
|
-
const
|
|
1190
|
+
I.primary.DEFAULT = m, I.secondary.DEFAULT = g;
|
|
1191
|
+
const H = D(t, "roundedCorners", "0");
|
|
1207
1192
|
!c || !c.tailwind || (c.tailwind.config = {
|
|
1208
1193
|
darkMode: "class",
|
|
1209
1194
|
theme: {
|
|
1210
1195
|
fontFamily: {
|
|
1211
|
-
heading: [
|
|
1212
|
-
body: [
|
|
1196
|
+
heading: [S],
|
|
1197
|
+
body: [O]
|
|
1213
1198
|
},
|
|
1214
1199
|
extend: {
|
|
1215
1200
|
borderRadius: {
|
|
1216
|
-
global: `${
|
|
1201
|
+
global: `${H || "0"}px`
|
|
1217
1202
|
},
|
|
1218
|
-
colors:
|
|
1203
|
+
colors: I
|
|
1219
1204
|
}
|
|
1220
1205
|
},
|
|
1221
1206
|
plugins: [
|
|
1222
1207
|
// @ts-ignore
|
|
1223
|
-
c.tailwind.plugin.withOptions(({ prefix:
|
|
1224
|
-
for (const
|
|
1225
|
-
|
|
1226
|
-
`&[data-headlessui-state~="${
|
|
1227
|
-
`:where([data-headlessui-state~="${
|
|
1228
|
-
]),
|
|
1229
|
-
`&[data-headlessui-state]:not([data-headlessui-state~="${
|
|
1230
|
-
`:where([data-headlessui-state]:not([data-headlessui-state~="${
|
|
1208
|
+
c.tailwind.plugin.withOptions(({ prefix: V = "ui" } = {}) => ({ addVariant: Q }) => {
|
|
1209
|
+
for (const L of ["open", "checked", "selected", "active", "disabled"])
|
|
1210
|
+
Q(`${V}-${L}`, [
|
|
1211
|
+
`&[data-headlessui-state~="${L}"]`,
|
|
1212
|
+
`:where([data-headlessui-state~="${L}"]) &`
|
|
1213
|
+
]), Q(`${V}-not-${L}`, [
|
|
1214
|
+
`&[data-headlessui-state]:not([data-headlessui-state~="${L}"])`,
|
|
1215
|
+
`:where([data-headlessui-state]:not([data-headlessui-state~="${L}"])) &:not([data-headlessui-state])`
|
|
1231
1216
|
]);
|
|
1232
1217
|
})
|
|
1233
1218
|
]
|
|
1234
1219
|
});
|
|
1235
|
-
}, [t, c,
|
|
1236
|
-
f && (f.textContent = `${re(n, (
|
|
1220
|
+
}, [t, c, S, O]), R(() => {
|
|
1221
|
+
f && (f.textContent = `${re(n, (m) => `[data-block-id="${m}"]`).join(",")}{
|
|
1237
1222
|
outline: 1px solid ${n.length === 1 ? "#42a1fc" : "orange"} !important; outline-offset: -1px;
|
|
1238
1223
|
}`);
|
|
1239
|
-
}, [n, f]),
|
|
1224
|
+
}, [n, f]), R(() => {
|
|
1240
1225
|
if (!d) {
|
|
1241
|
-
|
|
1226
|
+
v.textContent = "";
|
|
1242
1227
|
return;
|
|
1243
1228
|
}
|
|
1244
|
-
|
|
1245
|
-
}, [d]),
|
|
1229
|
+
v.textContent = `[data-block-id="${d}"]{ pointer-events: none !important; opacity: 0.2 !important}`;
|
|
1230
|
+
}, [d]), R(() => {
|
|
1246
1231
|
p && (p.textContent = i ? `[data-style-id="${i}"]{ outline: 1px solid #42a1fc !important; outline-offset: -1px;}` : "");
|
|
1247
|
-
}, [i, n, p]),
|
|
1248
|
-
h && (h.textContent = `${re(l, ({ id:
|
|
1232
|
+
}, [i, n, p]), R(() => {
|
|
1233
|
+
h && (h.textContent = `${re(l, ({ id: m }) => `[data-style-id="${m}"]`).join(",")}{
|
|
1249
1234
|
outline: 1px solid #42a1fc !important; outline-offset: -1px;
|
|
1250
1235
|
}`);
|
|
1251
|
-
}, [l, h]),
|
|
1252
|
-
const
|
|
1253
|
-
o.body.className = `font-body antialiased text-[${
|
|
1236
|
+
}, [l, h]), R(() => {
|
|
1237
|
+
const m = D(t, "bodyTextLightColor", "#64748b"), g = D(t, "bodyTextDarkColor", "#94a3b8"), I = D(t, "bodyBgLightColor", "#FFFFFF"), H = D(t, "bodyBgDarkColor", "#0f172a");
|
|
1238
|
+
o.body.className = `font-body antialiased text-[${m}] bg-[${I}] dark:text-[${g}] dark:bg-[${H}]`;
|
|
1254
1239
|
}, [t, o, e]), e === "page" ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
1255
|
-
|
|
1240
|
+
S && /* @__PURE__ */ r.jsx(
|
|
1256
1241
|
"link",
|
|
1257
1242
|
{
|
|
1258
1243
|
id: "heading-font",
|
|
1259
1244
|
rel: "stylesheet",
|
|
1260
1245
|
type: "text/css",
|
|
1261
|
-
href: `https://fonts.googleapis.com/css2?family=${
|
|
1246
|
+
href: `https://fonts.googleapis.com/css2?family=${S.replace(
|
|
1262
1247
|
/ /g,
|
|
1263
1248
|
"+"
|
|
1264
1249
|
)}:wght@300;400;500;600;700;800;900&display=swap`,
|
|
1265
1250
|
media: "all"
|
|
1266
1251
|
}
|
|
1267
1252
|
),
|
|
1268
|
-
|
|
1253
|
+
O && S !== O && /* @__PURE__ */ r.jsx(
|
|
1269
1254
|
"link",
|
|
1270
1255
|
{
|
|
1271
1256
|
id: "body-font",
|
|
1272
1257
|
rel: "stylesheet",
|
|
1273
1258
|
type: "text/css",
|
|
1274
|
-
href: `https://fonts.googleapis.com/css2?family=${
|
|
1259
|
+
href: `https://fonts.googleapis.com/css2?family=${O.replace(
|
|
1275
1260
|
/ /g,
|
|
1276
1261
|
"+"
|
|
1277
1262
|
)}:wght@300;400;500;600;700;800;900&display=swap`,
|
|
1278
1263
|
media: "all"
|
|
1279
1264
|
}
|
|
1280
1265
|
),
|
|
1281
|
-
|
|
1266
|
+
S && /* @__PURE__ */ r.jsx("style", { children: `h1,h2,h3,h4,h5,h6{font-family: "${S}",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";}` })
|
|
1282
1267
|
] }) : null;
|
|
1283
|
-
},
|
|
1268
|
+
}, gr = (e) => {
|
|
1284
1269
|
const t = {};
|
|
1285
1270
|
return Object.keys(e).forEach((n) => {
|
|
1286
|
-
|
|
1271
|
+
je(e[n]) && e[n].startsWith(Pe) && (t[n] = e[n].replace(Pe, "").split(","));
|
|
1287
1272
|
}), t;
|
|
1288
|
-
},
|
|
1273
|
+
}, mr = Dt((e) => {
|
|
1289
1274
|
const t = e.replace(it, "").split(",");
|
|
1290
|
-
return
|
|
1275
|
+
return Pn(t[0], t[1]);
|
|
1291
1276
|
});
|
|
1292
|
-
function
|
|
1277
|
+
function yr(e, t) {
|
|
1293
1278
|
return D(e, `${t}_attrs`, {});
|
|
1294
1279
|
}
|
|
1295
|
-
function
|
|
1280
|
+
function vr(e) {
|
|
1296
1281
|
const t = {};
|
|
1297
1282
|
return Object.keys(e).forEach((n) => {
|
|
1298
|
-
if (
|
|
1299
|
-
const s =
|
|
1283
|
+
if (je(e[n]) && e[n].startsWith(it)) {
|
|
1284
|
+
const s = mr(e[n]);
|
|
1300
1285
|
t[n] = {
|
|
1301
1286
|
className: s,
|
|
1302
1287
|
"data-style-prop": n,
|
|
1303
1288
|
"data-block-parent": e._id,
|
|
1304
1289
|
"data-style-id": `${n}-${e._id}`,
|
|
1305
|
-
...
|
|
1290
|
+
...yr(e, n)
|
|
1306
1291
|
};
|
|
1307
1292
|
}
|
|
1308
1293
|
}), t;
|
|
1309
1294
|
}
|
|
1310
|
-
function
|
|
1295
|
+
function xr(e, t) {
|
|
1311
1296
|
const n = D(e, "_bindings", {});
|
|
1312
|
-
return
|
|
1313
|
-
|
|
1297
|
+
return z(n) ? { ...e } : (_t(n, (s, i) => {
|
|
1298
|
+
je(s) && D(t, s, null) && (e[i] = D(t, s, null));
|
|
1314
1299
|
}), e);
|
|
1315
1300
|
}
|
|
1316
1301
|
function we({ blocks: e }) {
|
|
1317
|
-
const t =
|
|
1318
|
-
return /* @__PURE__ */ r.jsx(r.Fragment, { children:
|
|
1302
|
+
const [t] = Ce(), n = ke((l) => vr(l), []), [s] = Tn(), [i] = M(G);
|
|
1303
|
+
return /* @__PURE__ */ r.jsx(r.Fragment, { children: K.Children.toArray(
|
|
1319
1304
|
e.map((l, d) => {
|
|
1320
1305
|
if (i === l._id)
|
|
1321
1306
|
return null;
|
|
1322
|
-
const o =
|
|
1323
|
-
|
|
1324
|
-
c[
|
|
1325
|
-
o[
|
|
1307
|
+
const o = gr(l), c = {};
|
|
1308
|
+
z(o) || Object.keys(o).forEach((v) => {
|
|
1309
|
+
c[v] = K.Children.toArray(
|
|
1310
|
+
o[v].map((S) => /* @__PURE__ */ r.jsx(we, { blocks: [Bt(t, { _id: S })] }))
|
|
1326
1311
|
);
|
|
1327
1312
|
});
|
|
1328
|
-
const p =
|
|
1313
|
+
const p = Je(t, { _parent: l._id });
|
|
1329
1314
|
c.children = p.length ? /* @__PURE__ */ r.jsx(we, { blocks: p }) : null;
|
|
1330
|
-
const f =
|
|
1331
|
-
return
|
|
1315
|
+
const f = Mn(l._type), h = D(f, "builderComponent", D(f, "component", null));
|
|
1316
|
+
return Ot(h) ? /* @__PURE__ */ r.jsx("noscript", { children: `<!-- ${l == null ? void 0 : l._type} not registered -->` }) : /* @__PURE__ */ r.jsx(Ye, { children: K.createElement(h, {
|
|
1332
1317
|
blockProps: {
|
|
1333
1318
|
"data-block-id": l._id,
|
|
1334
1319
|
"data-block-type": l._type,
|
|
1335
|
-
"data-dnd":
|
|
1320
|
+
"data-dnd": At(f, "canAcceptBlock") ? "branch" : "leaf"
|
|
1336
1321
|
},
|
|
1337
1322
|
inBuilder: !0,
|
|
1338
1323
|
index: d,
|
|
1339
|
-
...
|
|
1324
|
+
...xr(l, s),
|
|
1340
1325
|
...n(l),
|
|
1341
1326
|
...c
|
|
1342
1327
|
}) });
|
|
1343
1328
|
})
|
|
1344
1329
|
) });
|
|
1345
1330
|
}
|
|
1346
|
-
const
|
|
1347
|
-
const e =
|
|
1348
|
-
return /* @__PURE__ */ r.jsx(
|
|
1349
|
-
},
|
|
1350
|
-
const [e] =
|
|
1351
|
-
|
|
1352
|
-
const { clientWidth: _, clientHeight:
|
|
1353
|
-
p({ width: _, height:
|
|
1331
|
+
const br = () => {
|
|
1332
|
+
const [e] = Ce(), t = z(e) ? null : /* @__PURE__ */ r.jsx(Cn, { children: /* @__PURE__ */ r.jsx(we, { blocks: Je(e, (n) => z(n._parent)) }) });
|
|
1333
|
+
return /* @__PURE__ */ r.jsx(Rn, { children: t });
|
|
1334
|
+
}, wr = (e, t) => e.querySelector(`[data-style-id="${t}"]`), kr = () => {
|
|
1335
|
+
const [e] = M(bn), [t] = et(), [n] = Te(), [, s] = W(), i = wn(), [, l] = X(), d = _e(null), o = _e(null), [c, p] = $({ width: 0, height: 0 }), f = qn(c), [h, v] = $(0), [S, O] = $([]), [, m] = $([]), [, g] = M(kn), [I, H] = J(), V = Ze("loadingCanvas", !1);
|
|
1336
|
+
R(() => {
|
|
1337
|
+
const { clientWidth: _, clientHeight: N } = o.current;
|
|
1338
|
+
p({ width: _, height: N }), h === 0 && v(_);
|
|
1354
1339
|
}, [o, n, h]);
|
|
1355
|
-
const
|
|
1356
|
-
const { top:
|
|
1357
|
-
return
|
|
1340
|
+
const Q = (_, N = 0) => {
|
|
1341
|
+
const { top: F } = _.getBoundingClientRect();
|
|
1342
|
+
return F + N >= 0 && F - N <= window.innerHeight;
|
|
1358
1343
|
};
|
|
1359
|
-
|
|
1360
|
-
var _,
|
|
1344
|
+
R(() => {
|
|
1345
|
+
var _, N;
|
|
1361
1346
|
if (i && i.type !== "Multiple" && d.current) {
|
|
1362
|
-
const
|
|
1363
|
-
|
|
1347
|
+
const F = ht(d.current.contentDocument, i._id);
|
|
1348
|
+
F && (Q(F) || (N = (_ = d.current) == null ? void 0 : _.contentWindow) == null || N.scrollTo({ top: F.offsetTop, behavior: "smooth" }), O([F]));
|
|
1364
1349
|
}
|
|
1365
|
-
}, [i]),
|
|
1366
|
-
if (!
|
|
1367
|
-
const _ =
|
|
1350
|
+
}, [i]), R(() => {
|
|
1351
|
+
if (!z(I) && d.current) {
|
|
1352
|
+
const _ = wr(
|
|
1368
1353
|
d.current.contentDocument,
|
|
1369
|
-
ae(
|
|
1354
|
+
ae(I).id
|
|
1370
1355
|
);
|
|
1371
|
-
|
|
1356
|
+
m(_ ? [_] : [null]);
|
|
1372
1357
|
} else
|
|
1373
|
-
|
|
1374
|
-
}, [
|
|
1375
|
-
const
|
|
1376
|
-
let _ =
|
|
1358
|
+
m([null]);
|
|
1359
|
+
}, [I]);
|
|
1360
|
+
const L = Ct(() => {
|
|
1361
|
+
let _ = Un;
|
|
1377
1362
|
return e === "offline" && (_ = _.replace(
|
|
1378
1363
|
"https://old.chaibuilder.com/offline/tailwind.cdn.js",
|
|
1379
1364
|
"/offline/tailwind.cdn.js"
|
|
@@ -1383,32 +1368,32 @@ const jr = () => {
|
|
|
1383
1368
|
"div",
|
|
1384
1369
|
{
|
|
1385
1370
|
onClick: () => {
|
|
1386
|
-
s([]),
|
|
1371
|
+
s([]), H([]);
|
|
1387
1372
|
},
|
|
1388
1373
|
onMouseLeave: () => setTimeout(() => l(""), 300),
|
|
1389
1374
|
className: "relative mx-auto overflow-hidden h-full w-full",
|
|
1390
|
-
style: h > 0 && !
|
|
1375
|
+
style: h > 0 && !z(f) ? { width: t ? "100%" : h } : {},
|
|
1391
1376
|
ref: o,
|
|
1392
1377
|
children: /* @__PURE__ */ r.jsxs(
|
|
1393
|
-
|
|
1378
|
+
Gn,
|
|
1394
1379
|
{
|
|
1395
|
-
contentDidMount: () =>
|
|
1380
|
+
contentDidMount: () => g(d.current),
|
|
1396
1381
|
ref: d,
|
|
1397
1382
|
id: "canvas-iframe",
|
|
1398
1383
|
style: { width: `${n}px`, ...f },
|
|
1399
1384
|
className: "relative mx-auto box-content h-full max-w-full shadow-lg transition-all duration-300 ease-linear",
|
|
1400
|
-
initialContent:
|
|
1385
|
+
initialContent: L,
|
|
1401
1386
|
children: [
|
|
1402
|
-
/* @__PURE__ */ r.jsx(
|
|
1387
|
+
/* @__PURE__ */ r.jsx(ur, {}),
|
|
1403
1388
|
/* @__PURE__ */ r.jsx(
|
|
1404
|
-
|
|
1389
|
+
fr,
|
|
1405
1390
|
{
|
|
1406
1391
|
block: i,
|
|
1407
|
-
selectedBlockElement: ae(
|
|
1392
|
+
selectedBlockElement: ae(S)
|
|
1408
1393
|
}
|
|
1409
1394
|
),
|
|
1410
|
-
/* @__PURE__ */ r.jsx(
|
|
1411
|
-
/* @__PURE__ */ r.jsx(
|
|
1395
|
+
/* @__PURE__ */ r.jsx(hr, { model: "page" }),
|
|
1396
|
+
/* @__PURE__ */ r.jsx(dr, { children: V ? /* @__PURE__ */ r.jsx("div", { className: "h-full p-4", children: /* @__PURE__ */ r.jsx(rt, { className: "h-full" }) }) : /* @__PURE__ */ r.jsx(br, {}) }),
|
|
1412
1397
|
/* @__PURE__ */ r.jsx("br", {}),
|
|
1413
1398
|
/* @__PURE__ */ r.jsx("div", { id: "placeholder", className: "absolute bg-green-500 z-[99999] max-w-full transition-transform" })
|
|
1414
1399
|
]
|
|
@@ -1416,10 +1401,10 @@ const jr = () => {
|
|
|
1416
1401
|
)
|
|
1417
1402
|
}
|
|
1418
1403
|
);
|
|
1419
|
-
},
|
|
1420
|
-
/* @__PURE__ */ r.jsx(
|
|
1421
|
-
/* @__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(
|
|
1404
|
+
}, Bo = () => /* @__PURE__ */ r.jsxs("div", { className: "flex h-full w-full flex-col", children: [
|
|
1405
|
+
/* @__PURE__ */ r.jsx(Hn, {}),
|
|
1406
|
+
/* @__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(Ye, { fallback: /* @__PURE__ */ r.jsx(rt, { className: "h-full" }), children: /* @__PURE__ */ r.jsx(En, { children: /* @__PURE__ */ r.jsx(kr, {}) }) }) })
|
|
1422
1407
|
] });
|
|
1423
1408
|
export {
|
|
1424
|
-
|
|
1409
|
+
Bo as default
|
|
1425
1410
|
};
|