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