@chaibuilder/sdk 1.2.5 → 1.2.7
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-MKhgtI8x.cjs +1 -0
- package/dist/{AddBlocks-gbfzju1d.js → AddBlocks-pjLrzkvz.js} +52 -53
- package/dist/{BrandingOptions-mZXO7thQ.js → BrandingOptions-PXCI0z-H.js} +57 -53
- package/dist/BrandingOptions-tZaUILYP.cjs +1 -0
- package/dist/CanvasArea-C2ak1ui1.cjs +60 -0
- package/dist/{CanvasArea-WS9dnLyS.js → CanvasArea-Fhg-6_nZ.js} +407 -407
- package/dist/CurrentPage-4O-iqW3w.cjs +1 -0
- package/dist/{CurrentPage-iaGHiR2B.js → CurrentPage-Zz9LEdez.js} +15 -17
- package/dist/{Layers-V15IDskJ.js → Layers-cgmxKAP9.js} +173 -152
- package/dist/Layers-uo4KpGCs.cjs +1 -0
- package/dist/MarkAsGlobalBlock-1kOwPbPm.cjs +1 -0
- package/dist/{MarkAsGlobalBlock-SPWd6Flk.js → MarkAsGlobalBlock-htrpRVJM.js} +6 -6
- package/dist/{PagesPanel-wfyKhLJ5.js → PagesPanel-TYBKN2Am.js} +8 -10
- package/dist/PagesPanel-z5qHpU24.cjs +1 -0
- package/dist/{ProjectPanel-aiKhpNvr.js → ProjectPanel-PJ1iPaLY.js} +15 -17
- package/dist/ProjectPanel-mEVh8sLb.cjs +1 -0
- package/dist/{Settings-JjYbPJrt.js → Settings-Na0NVS-E.js} +334 -334
- package/dist/Settings-YNxmjfAl.cjs +1 -0
- package/dist/{SidePanels-XABN8kD3.js → SidePanels-bHll6xCt.js} +99 -98
- package/dist/SidePanels-jsHvSEtM.cjs +1 -0
- package/dist/{Topbar-ks1ckGLz.js → Topbar-JKdXHH8P.js} +4 -4
- package/dist/Topbar-jWRuTvxv.cjs +1 -0
- package/dist/UnsplashImages-dBdqJNux.cjs +1 -0
- package/dist/{UnsplashImages-8vJPuqrF.js → UnsplashImages-jiOES16m.js} +7 -7
- package/dist/UploadImages-OD3RPS7j.cjs +1 -0
- package/dist/{UploadImages-6N6UrjLo.js → UploadImages-imersU7l.js} +4 -4
- package/dist/{add-page-modal-Gwhl6J1F.js → add-page-modal-EQWWxbry.js} +10 -11
- package/dist/add-page-modal-nFQ8TUBM.cjs +1 -0
- package/dist/{confirm-alert-biqvaLT-.js → confirm-alert-HOs52FKE.js} +4 -4
- package/dist/confirm-alert-j6hcFSlG.cjs +1 -0
- package/dist/{controls-XPXGHKht.js → controls-QGClapUl.js} +9 -45
- package/dist/{controls-Dy1qa8Dc.cjs → controls-hpe3HxsR.cjs} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.js +56 -58
- package/dist/{delete-page-modal-xGWX8RHn.js → delete-page-modal-DU388lPm.js} +21 -23
- package/dist/delete-page-modal-bkSWhTxz.cjs +1 -0
- package/dist/email-blocks.cjs +1 -1
- package/dist/email-blocks.js +263 -24
- package/dist/{form-Moz_psOw.js → form-7E1GY3U7.js} +1 -1
- package/dist/{form-lJhy9DEC.cjs → form-lF5eSfMe.cjs} +1 -1
- package/dist/html-to-json-JS8zQjYB.cjs +1 -0
- package/dist/{html-to-json-yjzEN9OX.js → html-to-json-lNLC8Y7D.js} +26 -27
- package/dist/{index-7mV_OcXd.js → index-7vwIQQ-T.js} +5402 -5366
- package/dist/index-98CxilGX.cjs +1 -0
- package/dist/{index-mUPP605-.cjs → index-Hf23Fq9m.cjs} +33 -33
- package/dist/{index-_OgCuSUz.js → index-WKIG_VPl.js} +1043 -1036
- package/dist/index-e0c8PmRQ.js +205 -0
- package/dist/index-gi1LIOCw.cjs +1 -0
- package/dist/lib.cjs +2 -2
- package/dist/lib.js +20 -22
- package/dist/mockServiceWorker.js +1 -1
- package/dist/page-viewer-6a4GFMUg.cjs +1 -0
- package/dist/{page-viewer-Xl1i1V3J.js → page-viewer-fohh_Dwv.js} +9 -11
- package/dist/{project-general-setting-8H1Rka2z.js → project-general-setting-Ryf5OhPd.js} +10 -11
- package/dist/project-general-setting-j4lKlLUE.cjs +1 -0
- package/dist/project-seo-setting-CATo4bEL.cjs +1 -0
- package/dist/{project-seo-setting-dXclexQW.js → project-seo-setting-KKOCl416.js} +6 -6
- package/dist/{single-page-detail-1hsqXV8c.js → single-page-detail-mJBo7VRe.js} +11 -12
- package/dist/single-page-detail-zms-5Fa_.cjs +1 -0
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +7 -9
- package/dist/style.css +1 -1
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +18 -18
- package/dist/{useAddBlockByDrop-uPXvrg4G.js → useAddBlockByDrop-CmSt8dRr.js} +1 -1
- package/dist/{useAddBlockByDrop-_nd8yZBa.cjs → useAddBlockByDrop-pVcDjcgp.cjs} +1 -1
- package/dist/{utils-AvyFzbPC.js → utils-Jw11nj1S.js} +35 -26
- package/dist/utils-j7Kg63NR.cjs +1 -0
- package/dist/web-blocks.cjs +1 -9
- package/dist/web-blocks.js +3 -1049
- package/package.json +5 -5
- package/dist/AddBlocks-wuKI1ieB.cjs +0 -1
- package/dist/BrandingOptions-arKT1zCy.cjs +0 -1
- package/dist/CanvasArea-wpskKN1H.cjs +0 -59
- package/dist/CurrentPage-X9fCVXgY.cjs +0 -1
- package/dist/Functions-7jnEwJyw.js +0 -15
- package/dist/Functions-N3yhPYKY.cjs +0 -1
- package/dist/Layers-EGhZWmvD.cjs +0 -1
- package/dist/MarkAsGlobalBlock-S2BhHTsK.cjs +0 -1
- package/dist/PagesPanel-Vla7HZkm.cjs +0 -1
- package/dist/ProjectPanel-YLS4oOuU.cjs +0 -1
- package/dist/Settings-rnHnjhZ4.cjs +0 -1
- package/dist/SidePanels-vcWHxatg.cjs +0 -1
- package/dist/Topbar-u5XKdWgQ.cjs +0 -1
- package/dist/UnsplashImages-V8oKEHfi.cjs +0 -1
- package/dist/UploadImages-eHYxwWAp.cjs +0 -1
- package/dist/add-page-modal-o5dy8nwt.cjs +0 -1
- package/dist/confirm-alert-f3DYO5Hj.cjs +0 -1
- package/dist/delete-page-modal-IO_9ZCm4.cjs +0 -1
- package/dist/html-to-json-5UoswV2Q.cjs +0 -1
- package/dist/index-IIJ_o44s.cjs +0 -1
- package/dist/page-viewer-pJFW_LaN.cjs +0 -1
- package/dist/project-general-setting-lNEoQK1n.cjs +0 -1
- package/dist/project-seo-setting-9JGBPzcA.cjs +0 -1
- package/dist/single-page-detail-VKqGt-s1.cjs +0 -1
- package/dist/utils-PTxFk6qT.cjs +0 -1
|
@@ -1,30 +1,31 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var J = (e, t, n) => (
|
|
1
|
+
var jt = Object.defineProperty;
|
|
2
|
+
var Tt = (e, t, n) => t in e ? jt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var J = (e, t, n) => (Tt(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
4
4
|
import { j as r } from "./jsx-runtime-WbnYoNE9.js";
|
|
5
|
-
import V, { createElement as
|
|
6
|
-
import { map as re, includes as
|
|
7
|
-
import { ResetIcon as
|
|
8
|
-
import { p as
|
|
5
|
+
import V, { createElement as be, useCallback as je, useState as q, useEffect as M, Component as Ke, Children as Ct, Suspense as Je, useRef as Oe, useMemo as It } from "react";
|
|
6
|
+
import { map as re, includes as Ae, toUpper as pe, round as Et, throttle as Ve, noop as te, isEmpty as K, first as ae, omit as St, pick as Dt, get as D, isString as Te, memoize as Bt, each as _t, find as Ot, filter as Xe, isNull as At } from "lodash-es";
|
|
7
|
+
import { ResetIcon as Pe, MobileIcon as Re, LaptopIcon as Pt, DesktopIcon as Rt, 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 { p as Ce, B as le, X as Ze, aI as qt, aJ as Ut, aK as zt, aL as Yt, aM as Kt, U as Ie, aj as Jt, i as Ee, aN as Vt, aO as Xt, aP as Zt, aQ as Qt, aR as Gt, aS as en, w as tn, j as U, ak as X, E as nn, F as rn, G as on, H as sn, I as an, J as ln, K as cn, L as dn, aq as un, M as pn, V as Qe, aH as ie, aT as fn, $ as Q, ac as hn, aU as G, af as Se, m as Ge, n as gn, k as mn, o as yn, h as et, l as tt, ah as vn, aV as xn, aW as nt, aX as bn, aY as kn, x as wn, aZ as jn, a7 as Tn, a_ as Cn, S as rt } from "./index-WKIG_VPl.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
|
|
10
|
+
import { useAtom as N } from "jotai";
|
|
11
|
+
import Me from "react-dom";
|
|
12
|
+
import { g as In } from "./_commonjsHelpers-UyOWmZb0.js";
|
|
13
|
+
import { r as ot, u as En, B as Sn, E as Dn } from "./index-7vwIQQ-T.js";
|
|
14
14
|
import { Quill as Bn } from "react-quill";
|
|
15
|
-
import { u as
|
|
15
|
+
import { u as _n } from "./useAddBlockByDrop-CmSt8dRr.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
|
|
17
|
+
import { flip as On } from "@floating-ui/dom";
|
|
18
|
+
import { useFloating as An, shift as Pn } from "@floating-ui/react-dom";
|
|
19
|
+
import { useResizeObserver as Rn } from "@react-hookz/web";
|
|
20
|
+
import { tailwindcssPaletteGenerator as Mn } from "@bobthered/tailwindcss-palette-generator";
|
|
21
|
+
import { Provider as Ln } from "react-wrap-balancer";
|
|
22
|
+
import { twMerge as Nn } from "tailwind-merge";
|
|
23
|
+
import { S as Le, a as it } from "./MODIFIERS-RiXS5Mn1.js";
|
|
24
|
+
import { getBlockComponent as at } from "@chaibuilder/runtime";
|
|
25
|
+
import { has as Fn } from "lodash";
|
|
25
26
|
import "@radix-ui/react-toggle";
|
|
26
27
|
import "class-variance-authority";
|
|
27
|
-
import "./utils-
|
|
28
|
+
import "./utils-Jw11nj1S.js";
|
|
28
29
|
import "clsx";
|
|
29
30
|
import "@radix-ui/react-switch";
|
|
30
31
|
import "@radix-ui/react-slot";
|
|
@@ -46,7 +47,6 @@ import "cmdk";
|
|
|
46
47
|
import "@radix-ui/react-context-menu";
|
|
47
48
|
import "react-icons-picker";
|
|
48
49
|
import "flat-to-nested";
|
|
49
|
-
import "./Functions-7jnEwJyw.js";
|
|
50
50
|
import "redux-undo";
|
|
51
51
|
import "i18next";
|
|
52
52
|
import "react-textarea-autosize";
|
|
@@ -54,25 +54,23 @@ import "react-dnd";
|
|
|
54
54
|
import "@minoru/react-dnd-treeview";
|
|
55
55
|
import "react-hotkeys-hook";
|
|
56
56
|
import "sonner";
|
|
57
|
-
import "./html-to-json-
|
|
57
|
+
import "./html-to-json-lNLC8Y7D.js";
|
|
58
58
|
import "himalaya";
|
|
59
|
-
import "lodash";
|
|
60
59
|
import "lucide-react";
|
|
61
60
|
import "./web-blocks.js";
|
|
62
|
-
import "./controls-XPXGHKht.js";
|
|
63
61
|
const $n = () => {
|
|
64
|
-
const { undoCount: e, redoCount: t, undo: n, redo: s } =
|
|
62
|
+
const { undoCount: e, redoCount: t, undo: n, redo: s } = Ce();
|
|
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(Pe, {}) }),
|
|
65
|
+
/* @__PURE__ */ r.jsx(le, { disabled: !t, onClick: s, size: "sm", className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ r.jsx(Pe, { className: "rotate-180 scale-y-[-1] transform" }) })
|
|
68
66
|
] });
|
|
69
67
|
};
|
|
70
|
-
function
|
|
68
|
+
function Wn() {
|
|
71
69
|
const [e, t] = Ze(), { t: n } = de();
|
|
72
70
|
return /* @__PURE__ */ r.jsxs("div", { className: "flex items-center", children: [
|
|
73
|
-
/* @__PURE__ */ r.jsx(
|
|
71
|
+
/* @__PURE__ */ r.jsx(qt, { htmlFor: "dark-mode-switch", children: n("dark_mode") }),
|
|
74
72
|
/* @__PURE__ */ r.jsxs(
|
|
75
|
-
|
|
73
|
+
Ut,
|
|
76
74
|
{
|
|
77
75
|
id: "dark-mode-switch",
|
|
78
76
|
checked: e,
|
|
@@ -96,7 +94,7 @@ function Hn() {
|
|
|
96
94
|
)
|
|
97
95
|
] });
|
|
98
96
|
}
|
|
99
|
-
const
|
|
97
|
+
const Ne = ({ landscape: e = !1 }) => /* @__PURE__ */ r.jsxs(
|
|
100
98
|
"svg",
|
|
101
99
|
{
|
|
102
100
|
className: e ? "rotate-90" : "",
|
|
@@ -119,7 +117,7 @@ const Le = ({ landscape: e = !1 }) => /* @__PURE__ */ r.jsxs(
|
|
|
119
117
|
)
|
|
120
118
|
]
|
|
121
119
|
}
|
|
122
|
-
),
|
|
120
|
+
), Hn = [
|
|
123
121
|
{
|
|
124
122
|
title: "mobile_xs_title",
|
|
125
123
|
content: "mobile_xs_content",
|
|
@@ -138,21 +136,21 @@ const Le = ({ 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(Ne, {}),
|
|
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(Ne, { 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(Pt, {}),
|
|
156
154
|
width: 1420
|
|
157
155
|
},
|
|
158
156
|
{
|
|
@@ -162,51 +160,51 @@ const Le = ({ landscape: e = !1 }) => /* @__PURE__ */ r.jsxs(
|
|
|
162
160
|
icon: /* @__PURE__ */ r.jsx(Rt, {}),
|
|
163
161
|
width: 1920
|
|
164
162
|
}
|
|
165
|
-
],
|
|
163
|
+
], Fe = ({
|
|
166
164
|
title: e,
|
|
167
165
|
content: t,
|
|
168
166
|
currentBreakpoint: n,
|
|
169
167
|
breakpoint: s,
|
|
170
168
|
width: i,
|
|
171
|
-
icon:
|
|
169
|
+
icon: l,
|
|
172
170
|
onClick: d
|
|
173
171
|
}) => {
|
|
174
172
|
const { t: o } = de();
|
|
175
|
-
return /* @__PURE__ */ r.jsxs(
|
|
176
|
-
/* @__PURE__ */ r.jsx(
|
|
173
|
+
return /* @__PURE__ */ r.jsxs(zt, { children: [
|
|
174
|
+
/* @__PURE__ */ r.jsx(Yt, { asChild: !0, children: /* @__PURE__ */ r.jsx(
|
|
177
175
|
le,
|
|
178
176
|
{
|
|
179
177
|
onClick: () => d(i),
|
|
180
178
|
size: "sm",
|
|
181
179
|
variant: s === n ? "secondary" : "ghost",
|
|
182
|
-
children:
|
|
180
|
+
children: l
|
|
183
181
|
}
|
|
184
182
|
) }),
|
|
185
|
-
/* @__PURE__ */ r.jsx(
|
|
183
|
+
/* @__PURE__ */ r.jsx(Kt, { className: "w-52 border-border", children: /* @__PURE__ */ r.jsx("div", { className: "flex justify-between space-x-4", children: /* @__PURE__ */ r.jsxs("div", { className: "space-y-1", children: [
|
|
186
184
|
/* @__PURE__ */ r.jsx("h4", { className: "text-sm font-semibold", children: o(e) }),
|
|
187
185
|
/* @__PURE__ */ r.jsx("p", { className: "text-xs", children: o(t) })
|
|
188
186
|
] }) }) })
|
|
189
187
|
] });
|
|
190
|
-
},
|
|
191
|
-
const [, e, t] =
|
|
188
|
+
}, qn = () => {
|
|
189
|
+
const [, e, t] = Ie(), [n, s] = Jt(), { t: i } = de(), l = Ee("breakpoints", Hn), d = (o) => {
|
|
192
190
|
n.includes(o) ? n.length > 2 && s(n.filter((c) => c !== o)) : s((c) => [...c, o]);
|
|
193
191
|
};
|
|
194
|
-
return
|
|
192
|
+
return l.length < 4 ? /* @__PURE__ */ r.jsx("div", { className: "flex items-center rounded-md", children: re(l, (o) => /* @__PURE__ */ be(Fe, { ...o, onClick: t, key: o.breakpoint, currentBreakpoint: e })) }) : /* @__PURE__ */ r.jsxs("div", { className: "flex items-center rounded-md", children: [
|
|
195
193
|
re(
|
|
196
|
-
|
|
197
|
-
(o) => /* @__PURE__ */
|
|
194
|
+
l.filter((o) => Ae(n, pe(o.breakpoint))),
|
|
195
|
+
(o) => /* @__PURE__ */ be(Fe, { ...o, onClick: t, key: o.breakpoint, currentBreakpoint: e })
|
|
198
196
|
),
|
|
199
|
-
/* @__PURE__ */ r.jsxs(
|
|
200
|
-
/* @__PURE__ */ r.jsx(
|
|
197
|
+
/* @__PURE__ */ r.jsxs(Vt, { children: [
|
|
198
|
+
/* @__PURE__ */ r.jsx(Xt, { 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
199
|
/* @__PURE__ */ r.jsxs(Zt, { className: "w-56 border-border text-xs", children: [
|
|
202
|
-
/* @__PURE__ */ r.jsx(
|
|
203
|
-
/* @__PURE__ */ r.jsx(
|
|
204
|
-
re(
|
|
205
|
-
|
|
200
|
+
/* @__PURE__ */ r.jsx(Qt, { children: i("Breakpoints") }),
|
|
201
|
+
/* @__PURE__ */ r.jsx(Gt, {}),
|
|
202
|
+
re(l, (o) => /* @__PURE__ */ r.jsx(
|
|
203
|
+
en,
|
|
206
204
|
{
|
|
207
205
|
disabled: o.breakpoint === "xs",
|
|
208
206
|
onCheckedChange: () => d(pe(o.breakpoint)),
|
|
209
|
-
checked:
|
|
207
|
+
checked: Ae(n, pe(o.breakpoint)),
|
|
210
208
|
children: i(o.title)
|
|
211
209
|
},
|
|
212
210
|
o.breakpoint
|
|
@@ -214,42 +212,42 @@ const Le = ({ landscape: e = !1 }) => /* @__PURE__ */ r.jsxs(
|
|
|
214
212
|
] })
|
|
215
213
|
] })
|
|
216
214
|
] });
|
|
217
|
-
},
|
|
218
|
-
const { t: e } = de(), [t] =
|
|
215
|
+
}, Un = () => {
|
|
216
|
+
const { t: e } = de(), [t] = tn(), { createSnapshot: n } = Ce(), [, s] = U(), [, i] = X(), l = je(() => {
|
|
219
217
|
t([]), s([]), i([]), n();
|
|
220
218
|
}, [t, n]);
|
|
221
|
-
return /* @__PURE__ */ r.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ r.jsxs(
|
|
222
|
-
/* @__PURE__ */ r.jsx(
|
|
223
|
-
/* @__PURE__ */ r.jsx(
|
|
219
|
+
return /* @__PURE__ */ r.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ r.jsxs(nn, { children: [
|
|
220
|
+
/* @__PURE__ */ r.jsx(rn, { asChild: !0, children: /* @__PURE__ */ r.jsxs(le, { size: "sm", variant: "ghost", className: "flex items-center gap-x-1", children: [
|
|
221
|
+
/* @__PURE__ */ r.jsx(Lt, {}),
|
|
224
222
|
" ",
|
|
225
223
|
e("clear")
|
|
226
224
|
] }) }),
|
|
227
|
-
/* @__PURE__ */ r.jsxs(
|
|
228
|
-
/* @__PURE__ */ r.jsxs(
|
|
229
|
-
/* @__PURE__ */ r.jsx(
|
|
230
|
-
/* @__PURE__ */ r.jsx(
|
|
225
|
+
/* @__PURE__ */ r.jsxs(on, { className: "border-border", children: [
|
|
226
|
+
/* @__PURE__ */ r.jsxs(sn, { children: [
|
|
227
|
+
/* @__PURE__ */ r.jsx(an, { children: e("clear_canvas_title") }),
|
|
228
|
+
/* @__PURE__ */ r.jsx(ln, { children: e("clear_canvas_description") })
|
|
231
229
|
] }),
|
|
232
|
-
/* @__PURE__ */ r.jsxs(
|
|
233
|
-
/* @__PURE__ */ r.jsx(
|
|
234
|
-
/* @__PURE__ */ r.jsx(
|
|
230
|
+
/* @__PURE__ */ r.jsxs(cn, { children: [
|
|
231
|
+
/* @__PURE__ */ r.jsx(dn, { children: e("cancel") }),
|
|
232
|
+
/* @__PURE__ */ r.jsx(un, { onClick: l, children: e("yes") })
|
|
235
233
|
] })
|
|
236
234
|
] })
|
|
237
235
|
] }) });
|
|
238
|
-
},
|
|
239
|
-
const e =
|
|
236
|
+
}, zn = () => {
|
|
237
|
+
const e = pn("darkMode", !1), [t] = Qe();
|
|
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(Wn, {}),
|
|
244
242
|
/* @__PURE__ */ r.jsx(ie, { orientation: "vertical" })
|
|
245
243
|
] }) : null,
|
|
246
|
-
/* @__PURE__ */ r.jsx(
|
|
244
|
+
/* @__PURE__ */ r.jsx(qn, {}),
|
|
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
|
-
/* @__PURE__ */ r.jsx(
|
|
247
|
+
/* @__PURE__ */ r.jsx(Nt, { className: "h-3.5 w-3.5 flex-shrink-0" }),
|
|
250
248
|
" ",
|
|
251
249
|
/* @__PURE__ */ r.jsxs("div", { className: "text-xs leading-3", children: [
|
|
252
|
-
|
|
250
|
+
Et(t, 0),
|
|
253
251
|
"%"
|
|
254
252
|
] })
|
|
255
253
|
] }),
|
|
@@ -258,10 +256,10 @@ const Le = ({ landscape: e = !1 }) => /* @__PURE__ */ r.jsxs(
|
|
|
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(Un, {})
|
|
262
260
|
] })
|
|
263
261
|
] });
|
|
264
|
-
},
|
|
262
|
+
}, Yn = `<!doctype html>
|
|
265
263
|
<html class="scroll-smooth h-full overflow-y-auto">
|
|
266
264
|
<head>
|
|
267
265
|
<meta charset="UTF-8">
|
|
@@ -296,6 +294,7 @@ const Le = ({ landscape: e = !1 }) => /* @__PURE__ */ r.jsxs(
|
|
|
296
294
|
-moz-user-select: text;
|
|
297
295
|
user-select: text;
|
|
298
296
|
}
|
|
297
|
+
.frame-root .frame-content { height: 100%; }
|
|
299
298
|
</style>
|
|
300
299
|
<style id="hidden-blocks"></style>
|
|
301
300
|
<style id="selected-block"></style>
|
|
@@ -305,11 +304,11 @@ const Le = ({ landscape: e = !1 }) => /* @__PURE__ */ r.jsxs(
|
|
|
305
304
|
|
|
306
305
|
</head>
|
|
307
306
|
<body class="font-body antialiased h-full">
|
|
308
|
-
<div class="frame-root"></div>
|
|
307
|
+
<div class="frame-root h-full"></div>
|
|
309
308
|
<script src="https://cdn.jsdelivr.net/npm/quill@2.0.0/dist/quill.js"><\/script>
|
|
310
309
|
</body>
|
|
311
|
-
</html>`,
|
|
312
|
-
const [t] =
|
|
310
|
+
</html>`, Kn = (e) => {
|
|
311
|
+
const [t] = Ie(), [, n] = Qe(), [s, i] = q({}), l = je(() => {
|
|
313
312
|
const { width: d, height: o } = e;
|
|
314
313
|
if (d < t) {
|
|
315
314
|
const c = parseFloat((d / t).toFixed(2).toString());
|
|
@@ -330,8 +329,8 @@ const Le = ({ landscape: e = !1 }) => /* @__PURE__ */ r.jsxs(
|
|
|
330
329
|
i({}), n(100);
|
|
331
330
|
}, [t, e, n]);
|
|
332
331
|
return M(() => {
|
|
333
|
-
|
|
334
|
-
}, [t, e, n,
|
|
332
|
+
l();
|
|
333
|
+
}, [t, e, n, l]), s;
|
|
335
334
|
};
|
|
336
335
|
var ce = { exports: {} };
|
|
337
336
|
/*
|
|
@@ -339,23 +338,23 @@ object-assign
|
|
|
339
338
|
(c) Sindre Sorhus
|
|
340
339
|
@license MIT
|
|
341
340
|
*/
|
|
342
|
-
var fe,
|
|
343
|
-
function
|
|
344
|
-
if (
|
|
341
|
+
var fe, $e;
|
|
342
|
+
function Jn() {
|
|
343
|
+
if ($e)
|
|
345
344
|
return fe;
|
|
346
|
-
|
|
345
|
+
$e = 1;
|
|
347
346
|
var e = Object.getOwnPropertySymbols, t = Object.prototype.hasOwnProperty, n = Object.prototype.propertyIsEnumerable;
|
|
348
|
-
function s(
|
|
349
|
-
if (
|
|
347
|
+
function s(l) {
|
|
348
|
+
if (l == null)
|
|
350
349
|
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
351
|
-
return Object(
|
|
350
|
+
return Object(l);
|
|
352
351
|
}
|
|
353
352
|
function i() {
|
|
354
353
|
try {
|
|
355
354
|
if (!Object.assign)
|
|
356
355
|
return !1;
|
|
357
|
-
var
|
|
358
|
-
if (
|
|
356
|
+
var l = new String("abc");
|
|
357
|
+
if (l[5] = "de", Object.getOwnPropertyNames(l)[0] === "5")
|
|
359
358
|
return !1;
|
|
360
359
|
for (var d = {}, o = 0; o < 10; o++)
|
|
361
360
|
d["_" + String.fromCharCode(o)] = o;
|
|
@@ -372,8 +371,8 @@ function Vn() {
|
|
|
372
371
|
return !1;
|
|
373
372
|
}
|
|
374
373
|
}
|
|
375
|
-
return fe = i() ? Object.assign : function(
|
|
376
|
-
for (var o, c = s(
|
|
374
|
+
return fe = i() ? Object.assign : function(l, d) {
|
|
375
|
+
for (var o, c = s(l), p, f = 1; f < arguments.length; f++) {
|
|
377
376
|
o = Object(arguments[f]);
|
|
378
377
|
for (var h in o)
|
|
379
378
|
t.call(o, h) && (c[h] = o[h]);
|
|
@@ -387,28 +386,28 @@ function Vn() {
|
|
|
387
386
|
}, fe;
|
|
388
387
|
}
|
|
389
388
|
var he, We;
|
|
390
|
-
function
|
|
389
|
+
function De() {
|
|
391
390
|
if (We)
|
|
392
391
|
return he;
|
|
393
392
|
We = 1;
|
|
394
393
|
var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
395
394
|
return he = e, he;
|
|
396
395
|
}
|
|
397
|
-
var ge,
|
|
398
|
-
function
|
|
399
|
-
return
|
|
396
|
+
var ge, He;
|
|
397
|
+
function lt() {
|
|
398
|
+
return He || (He = 1, ge = Function.call.bind(Object.prototype.hasOwnProperty)), ge;
|
|
400
399
|
}
|
|
401
|
-
var me,
|
|
402
|
-
function
|
|
403
|
-
if (
|
|
400
|
+
var me, qe;
|
|
401
|
+
function Vn() {
|
|
402
|
+
if (qe)
|
|
404
403
|
return me;
|
|
405
|
-
|
|
404
|
+
qe = 1;
|
|
406
405
|
var e = function() {
|
|
407
406
|
};
|
|
408
407
|
if (process.env.NODE_ENV !== "production") {
|
|
409
|
-
var t =
|
|
410
|
-
e = function(
|
|
411
|
-
var d = "Warning: " +
|
|
408
|
+
var t = De(), n = {}, s = lt();
|
|
409
|
+
e = function(l) {
|
|
410
|
+
var d = "Warning: " + l;
|
|
412
411
|
typeof console < "u" && console.error(d);
|
|
413
412
|
try {
|
|
414
413
|
throw new Error(d);
|
|
@@ -416,19 +415,19 @@ function Zn() {
|
|
|
416
415
|
}
|
|
417
416
|
};
|
|
418
417
|
}
|
|
419
|
-
function i(
|
|
418
|
+
function i(l, d, o, c, p) {
|
|
420
419
|
if (process.env.NODE_ENV !== "production") {
|
|
421
|
-
for (var f in
|
|
422
|
-
if (s(
|
|
420
|
+
for (var f in l)
|
|
421
|
+
if (s(l, f)) {
|
|
423
422
|
var h;
|
|
424
423
|
try {
|
|
425
|
-
if (typeof
|
|
424
|
+
if (typeof l[f] != "function") {
|
|
426
425
|
var g = Error(
|
|
427
|
-
(c || "React class") + ": " + o + " type `" + f + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof
|
|
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`."
|
|
428
427
|
);
|
|
429
428
|
throw g.name = "Invariant Violation", g;
|
|
430
429
|
}
|
|
431
|
-
h =
|
|
430
|
+
h = l[f](d, f, c, o, null, t);
|
|
432
431
|
} catch (A) {
|
|
433
432
|
h = A;
|
|
434
433
|
}
|
|
@@ -448,14 +447,14 @@ function Zn() {
|
|
|
448
447
|
process.env.NODE_ENV !== "production" && (n = {});
|
|
449
448
|
}, me = i, me;
|
|
450
449
|
}
|
|
451
|
-
var ye,
|
|
452
|
-
function
|
|
453
|
-
if (
|
|
450
|
+
var ye, Ue;
|
|
451
|
+
function Xn() {
|
|
452
|
+
if (Ue)
|
|
454
453
|
return ye;
|
|
455
|
-
|
|
456
|
-
var e = ot, t =
|
|
454
|
+
Ue = 1;
|
|
455
|
+
var e = ot, t = Jn(), n = De(), s = lt(), i = Vn(), l = function() {
|
|
457
456
|
};
|
|
458
|
-
process.env.NODE_ENV !== "production" && (
|
|
457
|
+
process.env.NODE_ENV !== "production" && (l = function(o) {
|
|
459
458
|
var c = "Warning: " + o;
|
|
460
459
|
typeof console < "u" && console.error(c);
|
|
461
460
|
try {
|
|
@@ -468,70 +467,70 @@ function Gn() {
|
|
|
468
467
|
}
|
|
469
468
|
return ye = function(o, c) {
|
|
470
469
|
var p = typeof Symbol == "function" && Symbol.iterator, f = "@@iterator";
|
|
471
|
-
function h(
|
|
472
|
-
var u =
|
|
470
|
+
function h(a) {
|
|
471
|
+
var u = a && (p && a[p] || a[f]);
|
|
473
472
|
if (typeof u == "function")
|
|
474
473
|
return u;
|
|
475
474
|
}
|
|
476
475
|
var g = "<<anonymous>>", E = {
|
|
477
|
-
array:
|
|
478
|
-
bigint:
|
|
479
|
-
bool:
|
|
480
|
-
func:
|
|
481
|
-
number:
|
|
482
|
-
object:
|
|
483
|
-
string:
|
|
484
|
-
symbol:
|
|
476
|
+
array: B("array"),
|
|
477
|
+
bigint: B("bigint"),
|
|
478
|
+
bool: B("boolean"),
|
|
479
|
+
func: B("function"),
|
|
480
|
+
number: B("number"),
|
|
481
|
+
object: B("object"),
|
|
482
|
+
string: B("string"),
|
|
483
|
+
symbol: B("symbol"),
|
|
485
484
|
any: O(),
|
|
486
485
|
arrayOf: w,
|
|
487
|
-
element:
|
|
488
|
-
elementType:
|
|
486
|
+
element: F(),
|
|
487
|
+
elementType: $(),
|
|
489
488
|
instanceOf: _,
|
|
490
|
-
node:
|
|
489
|
+
node: yt(),
|
|
491
490
|
objectOf: H,
|
|
492
|
-
oneOf:
|
|
493
|
-
oneOfType:
|
|
494
|
-
shape:
|
|
495
|
-
exact:
|
|
491
|
+
oneOf: W,
|
|
492
|
+
oneOfType: mt,
|
|
493
|
+
shape: vt,
|
|
494
|
+
exact: xt
|
|
496
495
|
};
|
|
497
|
-
function A(
|
|
498
|
-
return
|
|
496
|
+
function A(a, u) {
|
|
497
|
+
return a === u ? a !== 0 || 1 / a === 1 / u : a !== a && u !== u;
|
|
499
498
|
}
|
|
500
|
-
function b(
|
|
501
|
-
this.message =
|
|
499
|
+
function b(a, u) {
|
|
500
|
+
this.message = a, this.data = u && typeof u == "object" ? u : {}, this.stack = "";
|
|
502
501
|
}
|
|
503
502
|
b.prototype = Error.prototype;
|
|
504
|
-
function S(
|
|
503
|
+
function S(a) {
|
|
505
504
|
if (process.env.NODE_ENV !== "production")
|
|
506
505
|
var u = {}, k = 0;
|
|
507
506
|
function v(j, y, x, T, I, C, L) {
|
|
508
507
|
if (T = T || g, C = C || x, L !== n) {
|
|
509
508
|
if (c) {
|
|
510
|
-
var
|
|
509
|
+
var P = new Error(
|
|
511
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"
|
|
512
511
|
);
|
|
513
|
-
throw
|
|
512
|
+
throw P.name = "Invariant Violation", P;
|
|
514
513
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
515
|
-
var
|
|
516
|
-
!u[
|
|
517
|
-
k < 3 && (
|
|
514
|
+
var Z = T + ":" + x;
|
|
515
|
+
!u[Z] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
516
|
+
k < 3 && (l(
|
|
518
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."
|
|
519
|
-
), u[
|
|
518
|
+
), u[Z] = !0, k++);
|
|
520
519
|
}
|
|
521
520
|
}
|
|
522
|
-
return y[x] == null ? j ? y[x] === null ? new b("The " + I + " `" + C + "` is marked as required " + ("in `" + T + "`, but its value is `null`.")) : new b("The " + I + " `" + C + "` is marked as required in " + ("`" + T + "`, but its value is `undefined`.")) : null :
|
|
521
|
+
return y[x] == null ? j ? y[x] === null ? new b("The " + I + " `" + C + "` is marked as required " + ("in `" + T + "`, but its value is `null`.")) : new b("The " + I + " `" + C + "` is marked as required in " + ("`" + T + "`, but its value is `undefined`.")) : null : a(y, x, T, I, C);
|
|
523
522
|
}
|
|
524
523
|
var m = v.bind(null, !1);
|
|
525
524
|
return m.isRequired = v.bind(null, !0), m;
|
|
526
525
|
}
|
|
527
|
-
function
|
|
526
|
+
function B(a) {
|
|
528
527
|
function u(k, v, m, j, y, x) {
|
|
529
528
|
var T = k[v], I = z(T);
|
|
530
|
-
if (I !==
|
|
529
|
+
if (I !== a) {
|
|
531
530
|
var C = ee(T);
|
|
532
531
|
return new b(
|
|
533
|
-
"Invalid " + j + " `" + y + "` of type " + ("`" + C + "` supplied to `" + m + "`, expected ") + ("`" +
|
|
534
|
-
{ expectedType:
|
|
532
|
+
"Invalid " + j + " `" + y + "` of type " + ("`" + C + "` supplied to `" + m + "`, expected ") + ("`" + a + "`."),
|
|
533
|
+
{ expectedType: a }
|
|
535
534
|
);
|
|
536
535
|
}
|
|
537
536
|
return null;
|
|
@@ -541,9 +540,9 @@ function Gn() {
|
|
|
541
540
|
function O() {
|
|
542
541
|
return S(d);
|
|
543
542
|
}
|
|
544
|
-
function w(
|
|
543
|
+
function w(a) {
|
|
545
544
|
function u(k, v, m, j, y) {
|
|
546
|
-
if (typeof
|
|
545
|
+
if (typeof a != "function")
|
|
547
546
|
return new b("Property `" + y + "` of component `" + m + "` has invalid PropType notation inside arrayOf.");
|
|
548
547
|
var x = k[v];
|
|
549
548
|
if (!Array.isArray(x)) {
|
|
@@ -551,7 +550,7 @@ function Gn() {
|
|
|
551
550
|
return new b("Invalid " + j + " `" + y + "` of type " + ("`" + T + "` supplied to `" + m + "`, expected an array."));
|
|
552
551
|
}
|
|
553
552
|
for (var I = 0; I < x.length; I++) {
|
|
554
|
-
var C =
|
|
553
|
+
var C = a(x, I, m, j, y + "[" + I + "]", n);
|
|
555
554
|
if (C instanceof Error)
|
|
556
555
|
return C;
|
|
557
556
|
}
|
|
@@ -559,8 +558,8 @@ function Gn() {
|
|
|
559
558
|
}
|
|
560
559
|
return S(u);
|
|
561
560
|
}
|
|
562
|
-
function
|
|
563
|
-
function
|
|
561
|
+
function F() {
|
|
562
|
+
function a(u, k, v, m, j) {
|
|
564
563
|
var y = u[k];
|
|
565
564
|
if (!o(y)) {
|
|
566
565
|
var x = z(y);
|
|
@@ -568,10 +567,10 @@ function Gn() {
|
|
|
568
567
|
}
|
|
569
568
|
return null;
|
|
570
569
|
}
|
|
571
|
-
return S(
|
|
570
|
+
return S(a);
|
|
572
571
|
}
|
|
573
|
-
function
|
|
574
|
-
function
|
|
572
|
+
function $() {
|
|
573
|
+
function a(u, k, v, m, j) {
|
|
575
574
|
var y = u[k];
|
|
576
575
|
if (!e.isValidElementType(y)) {
|
|
577
576
|
var x = z(y);
|
|
@@ -579,45 +578,45 @@ function Gn() {
|
|
|
579
578
|
}
|
|
580
579
|
return null;
|
|
581
580
|
}
|
|
582
|
-
return S(
|
|
581
|
+
return S(a);
|
|
583
582
|
}
|
|
584
|
-
function _(
|
|
583
|
+
function _(a) {
|
|
585
584
|
function u(k, v, m, j, y) {
|
|
586
|
-
if (!(k[v] instanceof
|
|
587
|
-
var x =
|
|
585
|
+
if (!(k[v] instanceof a)) {
|
|
586
|
+
var x = a.name || g, T = wt(k[v]);
|
|
588
587
|
return new b("Invalid " + j + " `" + y + "` of type " + ("`" + T + "` supplied to `" + m + "`, expected ") + ("instance of `" + x + "`."));
|
|
589
588
|
}
|
|
590
589
|
return null;
|
|
591
590
|
}
|
|
592
591
|
return S(u);
|
|
593
592
|
}
|
|
594
|
-
function
|
|
595
|
-
if (!Array.isArray(
|
|
596
|
-
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ?
|
|
593
|
+
function W(a) {
|
|
594
|
+
if (!Array.isArray(a))
|
|
595
|
+
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? l(
|
|
597
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])."
|
|
598
|
-
) :
|
|
597
|
+
) : l("Invalid argument supplied to oneOf, expected an array.")), d;
|
|
599
598
|
function u(k, v, m, j, y) {
|
|
600
|
-
for (var x = k[v], T = 0; T <
|
|
601
|
-
if (A(x,
|
|
599
|
+
for (var x = k[v], T = 0; T < a.length; T++)
|
|
600
|
+
if (A(x, a[T]))
|
|
602
601
|
return null;
|
|
603
|
-
var I = JSON.stringify(
|
|
604
|
-
var
|
|
605
|
-
return
|
|
602
|
+
var I = JSON.stringify(a, function(L, P) {
|
|
603
|
+
var Z = ee(P);
|
|
604
|
+
return Z === "symbol" ? String(P) : P;
|
|
606
605
|
});
|
|
607
606
|
return new b("Invalid " + j + " `" + y + "` of value `" + String(x) + "` " + ("supplied to `" + m + "`, expected one of " + I + "."));
|
|
608
607
|
}
|
|
609
608
|
return S(u);
|
|
610
609
|
}
|
|
611
|
-
function H(
|
|
610
|
+
function H(a) {
|
|
612
611
|
function u(k, v, m, j, y) {
|
|
613
|
-
if (typeof
|
|
612
|
+
if (typeof a != "function")
|
|
614
613
|
return new b("Property `" + y + "` of component `" + m + "` has invalid PropType notation inside objectOf.");
|
|
615
614
|
var x = k[v], T = z(x);
|
|
616
615
|
if (T !== "object")
|
|
617
616
|
return new b("Invalid " + j + " `" + y + "` of type " + ("`" + T + "` supplied to `" + m + "`, expected an object."));
|
|
618
617
|
for (var I in x)
|
|
619
618
|
if (s(x, I)) {
|
|
620
|
-
var C =
|
|
619
|
+
var C = a(x, I, m, j, y + "." + I, n);
|
|
621
620
|
if (C instanceof Error)
|
|
622
621
|
return C;
|
|
623
622
|
}
|
|
@@ -625,48 +624,48 @@ function Gn() {
|
|
|
625
624
|
}
|
|
626
625
|
return S(u);
|
|
627
626
|
}
|
|
628
|
-
function
|
|
629
|
-
if (!Array.isArray(
|
|
630
|
-
return process.env.NODE_ENV !== "production" &&
|
|
631
|
-
for (var u = 0; u <
|
|
632
|
-
var k =
|
|
627
|
+
function mt(a) {
|
|
628
|
+
if (!Array.isArray(a))
|
|
629
|
+
return process.env.NODE_ENV !== "production" && l("Invalid argument supplied to oneOfType, expected an instance of array."), d;
|
|
630
|
+
for (var u = 0; u < a.length; u++) {
|
|
631
|
+
var k = a[u];
|
|
633
632
|
if (typeof k != "function")
|
|
634
|
-
return
|
|
635
|
-
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " +
|
|
633
|
+
return l(
|
|
634
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + kt(k) + " at index " + u + "."
|
|
636
635
|
), d;
|
|
637
636
|
}
|
|
638
637
|
function v(m, j, y, x, T) {
|
|
639
|
-
for (var I = [], C = 0; C <
|
|
640
|
-
var L =
|
|
641
|
-
if (
|
|
638
|
+
for (var I = [], C = 0; C < a.length; C++) {
|
|
639
|
+
var L = a[C], P = L(m, j, y, x, T, n);
|
|
640
|
+
if (P == null)
|
|
642
641
|
return null;
|
|
643
|
-
|
|
642
|
+
P.data && s(P.data, "expectedType") && I.push(P.data.expectedType);
|
|
644
643
|
}
|
|
645
|
-
var
|
|
646
|
-
return new b("Invalid " + x + " `" + T + "` supplied to " + ("`" + y + "`" +
|
|
644
|
+
var Z = I.length > 0 ? ", expected one of type [" + I.join(", ") + "]" : "";
|
|
645
|
+
return new b("Invalid " + x + " `" + T + "` supplied to " + ("`" + y + "`" + Z + "."));
|
|
647
646
|
}
|
|
648
647
|
return S(v);
|
|
649
648
|
}
|
|
650
|
-
function
|
|
651
|
-
function
|
|
649
|
+
function yt() {
|
|
650
|
+
function a(u, k, v, m, j) {
|
|
652
651
|
return se(u[k]) ? null : new b("Invalid " + m + " `" + j + "` supplied to " + ("`" + v + "`, expected a ReactNode."));
|
|
653
652
|
}
|
|
654
|
-
return S(
|
|
653
|
+
return S(a);
|
|
655
654
|
}
|
|
656
|
-
function
|
|
655
|
+
function _e(a, u, k, v, m) {
|
|
657
656
|
return new b(
|
|
658
|
-
(
|
|
657
|
+
(a || "React class") + ": " + u + " type `" + k + "." + v + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + m + "`."
|
|
659
658
|
);
|
|
660
659
|
}
|
|
661
|
-
function
|
|
660
|
+
function vt(a) {
|
|
662
661
|
function u(k, v, m, j, y) {
|
|
663
662
|
var x = k[v], T = z(x);
|
|
664
663
|
if (T !== "object")
|
|
665
664
|
return new b("Invalid " + j + " `" + y + "` of type `" + T + "` " + ("supplied to `" + m + "`, expected `object`."));
|
|
666
|
-
for (var I in
|
|
667
|
-
var C =
|
|
665
|
+
for (var I in a) {
|
|
666
|
+
var C = a[I];
|
|
668
667
|
if (typeof C != "function")
|
|
669
|
-
return
|
|
668
|
+
return _e(m, j, y, I, ee(C));
|
|
670
669
|
var L = C(x, I, m, j, y + "." + I, n);
|
|
671
670
|
if (L)
|
|
672
671
|
return L;
|
|
@@ -675,46 +674,46 @@ function Gn() {
|
|
|
675
674
|
}
|
|
676
675
|
return S(u);
|
|
677
676
|
}
|
|
678
|
-
function
|
|
677
|
+
function xt(a) {
|
|
679
678
|
function u(k, v, m, j, y) {
|
|
680
679
|
var x = k[v], T = z(x);
|
|
681
680
|
if (T !== "object")
|
|
682
681
|
return new b("Invalid " + j + " `" + y + "` of type `" + T + "` " + ("supplied to `" + m + "`, expected `object`."));
|
|
683
|
-
var I = t({}, k[v],
|
|
682
|
+
var I = t({}, k[v], a);
|
|
684
683
|
for (var C in I) {
|
|
685
|
-
var L =
|
|
686
|
-
if (s(
|
|
687
|
-
return
|
|
684
|
+
var L = a[C];
|
|
685
|
+
if (s(a, C) && typeof L != "function")
|
|
686
|
+
return _e(m, j, y, C, ee(L));
|
|
688
687
|
if (!L)
|
|
689
688
|
return new b(
|
|
690
689
|
"Invalid " + j + " `" + y + "` key `" + C + "` supplied to `" + m + "`.\nBad object: " + JSON.stringify(k[v], null, " ") + `
|
|
691
|
-
Valid keys: ` + JSON.stringify(Object.keys(
|
|
690
|
+
Valid keys: ` + JSON.stringify(Object.keys(a), null, " ")
|
|
692
691
|
);
|
|
693
|
-
var
|
|
694
|
-
if (
|
|
695
|
-
return
|
|
692
|
+
var P = L(x, C, m, j, y + "." + C, n);
|
|
693
|
+
if (P)
|
|
694
|
+
return P;
|
|
696
695
|
}
|
|
697
696
|
return null;
|
|
698
697
|
}
|
|
699
698
|
return S(u);
|
|
700
699
|
}
|
|
701
|
-
function se(
|
|
702
|
-
switch (typeof
|
|
700
|
+
function se(a) {
|
|
701
|
+
switch (typeof a) {
|
|
703
702
|
case "number":
|
|
704
703
|
case "string":
|
|
705
704
|
case "undefined":
|
|
706
705
|
return !0;
|
|
707
706
|
case "boolean":
|
|
708
|
-
return !
|
|
707
|
+
return !a;
|
|
709
708
|
case "object":
|
|
710
|
-
if (Array.isArray(
|
|
711
|
-
return
|
|
712
|
-
if (
|
|
709
|
+
if (Array.isArray(a))
|
|
710
|
+
return a.every(se);
|
|
711
|
+
if (a === null || o(a))
|
|
713
712
|
return !0;
|
|
714
|
-
var u = h(
|
|
713
|
+
var u = h(a);
|
|
715
714
|
if (u) {
|
|
716
|
-
var k = u.call(
|
|
717
|
-
if (u !==
|
|
715
|
+
var k = u.call(a), v;
|
|
716
|
+
if (u !== a.entries) {
|
|
718
717
|
for (; !(v = k.next()).done; )
|
|
719
718
|
if (!se(v.value))
|
|
720
719
|
return !1;
|
|
@@ -731,27 +730,27 @@ Valid keys: ` + JSON.stringify(Object.keys(l), null, " ")
|
|
|
731
730
|
return !1;
|
|
732
731
|
}
|
|
733
732
|
}
|
|
734
|
-
function
|
|
735
|
-
return
|
|
733
|
+
function bt(a, u) {
|
|
734
|
+
return a === "symbol" ? !0 : u ? u["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && u instanceof Symbol : !1;
|
|
736
735
|
}
|
|
737
|
-
function z(
|
|
738
|
-
var u = typeof
|
|
739
|
-
return Array.isArray(
|
|
736
|
+
function z(a) {
|
|
737
|
+
var u = typeof a;
|
|
738
|
+
return Array.isArray(a) ? "array" : a instanceof RegExp ? "object" : bt(u, a) ? "symbol" : u;
|
|
740
739
|
}
|
|
741
|
-
function ee(
|
|
742
|
-
if (typeof
|
|
743
|
-
return "" +
|
|
744
|
-
var u = z(
|
|
740
|
+
function ee(a) {
|
|
741
|
+
if (typeof a > "u" || a === null)
|
|
742
|
+
return "" + a;
|
|
743
|
+
var u = z(a);
|
|
745
744
|
if (u === "object") {
|
|
746
|
-
if (
|
|
745
|
+
if (a instanceof Date)
|
|
747
746
|
return "date";
|
|
748
|
-
if (
|
|
747
|
+
if (a instanceof RegExp)
|
|
749
748
|
return "regexp";
|
|
750
749
|
}
|
|
751
750
|
return u;
|
|
752
751
|
}
|
|
753
|
-
function
|
|
754
|
-
var u = ee(
|
|
752
|
+
function kt(a) {
|
|
753
|
+
var u = ee(a);
|
|
755
754
|
switch (u) {
|
|
756
755
|
case "array":
|
|
757
756
|
case "object":
|
|
@@ -764,18 +763,18 @@ Valid keys: ` + JSON.stringify(Object.keys(l), null, " ")
|
|
|
764
763
|
return u;
|
|
765
764
|
}
|
|
766
765
|
}
|
|
767
|
-
function
|
|
768
|
-
return !
|
|
766
|
+
function wt(a) {
|
|
767
|
+
return !a.constructor || !a.constructor.name ? g : a.constructor.name;
|
|
769
768
|
}
|
|
770
769
|
return E.checkPropTypes = i, E.resetWarningCache = i.resetWarningCache, E.PropTypes = E, E;
|
|
771
770
|
}, ye;
|
|
772
771
|
}
|
|
773
|
-
var ve,
|
|
774
|
-
function
|
|
775
|
-
if (
|
|
772
|
+
var ve, ze;
|
|
773
|
+
function Zn() {
|
|
774
|
+
if (ze)
|
|
776
775
|
return ve;
|
|
777
|
-
|
|
778
|
-
var e =
|
|
776
|
+
ze = 1;
|
|
777
|
+
var e = De();
|
|
779
778
|
function t() {
|
|
780
779
|
}
|
|
781
780
|
function n() {
|
|
@@ -793,7 +792,7 @@ function Qn() {
|
|
|
793
792
|
function i() {
|
|
794
793
|
return s;
|
|
795
794
|
}
|
|
796
|
-
var
|
|
795
|
+
var l = {
|
|
797
796
|
array: s,
|
|
798
797
|
bigint: s,
|
|
799
798
|
bool: s,
|
|
@@ -816,22 +815,22 @@ function Qn() {
|
|
|
816
815
|
checkPropTypes: n,
|
|
817
816
|
resetWarningCache: t
|
|
818
817
|
};
|
|
819
|
-
return
|
|
818
|
+
return l.PropTypes = l, l;
|
|
820
819
|
}, ve;
|
|
821
820
|
}
|
|
822
|
-
var
|
|
821
|
+
var _o = ce.exports;
|
|
823
822
|
if (process.env.NODE_ENV !== "production") {
|
|
824
|
-
var
|
|
825
|
-
ce.exports =
|
|
823
|
+
var Qn = ot, Gn = !0;
|
|
824
|
+
ce.exports = Xn()(Qn.isElement, Gn);
|
|
826
825
|
} else
|
|
827
|
-
ce.exports =
|
|
828
|
-
var
|
|
829
|
-
const
|
|
830
|
-
let
|
|
831
|
-
typeof document < "u" && (
|
|
832
|
-
typeof window < "u" && (
|
|
833
|
-
const
|
|
834
|
-
class
|
|
826
|
+
ce.exports = Zn()();
|
|
827
|
+
var er = ce.exports;
|
|
828
|
+
const R = /* @__PURE__ */ In(er);
|
|
829
|
+
let ct, dt;
|
|
830
|
+
typeof document < "u" && (ct = document);
|
|
831
|
+
typeof window < "u" && (dt = window);
|
|
832
|
+
const ut = V.createContext({ document: ct, window: dt }), ue = () => V.useContext(ut), { Provider: tr, Consumer: Oo } = ut;
|
|
833
|
+
class pt extends Ke {
|
|
835
834
|
componentDidMount() {
|
|
836
835
|
this.props.contentDidMount();
|
|
837
836
|
}
|
|
@@ -839,15 +838,15 @@ class ut extends Ye {
|
|
|
839
838
|
this.props.contentDidUpdate();
|
|
840
839
|
}
|
|
841
840
|
render() {
|
|
842
|
-
return
|
|
841
|
+
return Ct.only(this.props.children);
|
|
843
842
|
}
|
|
844
843
|
}
|
|
845
|
-
J(
|
|
846
|
-
children:
|
|
847
|
-
contentDidMount:
|
|
848
|
-
contentDidUpdate:
|
|
844
|
+
J(pt, "propTypes", {
|
|
845
|
+
children: R.element.isRequired,
|
|
846
|
+
contentDidMount: R.func.isRequired,
|
|
847
|
+
contentDidUpdate: R.func.isRequired
|
|
849
848
|
});
|
|
850
|
-
class
|
|
849
|
+
class ke extends Ke {
|
|
851
850
|
constructor(n, s) {
|
|
852
851
|
super(n, s);
|
|
853
852
|
J(this, "setRef", (n) => {
|
|
@@ -884,8 +883,8 @@ class be extends Ye {
|
|
|
884
883
|
const n = this.getDoc();
|
|
885
884
|
if (!n)
|
|
886
885
|
return null;
|
|
887
|
-
const s = this.props.contentDidMount, i = this.props.contentDidUpdate,
|
|
888
|
-
return [
|
|
886
|
+
const s = this.props.contentDidMount, i = this.props.contentDidUpdate, l = n.defaultView || n.parentView, d = /* @__PURE__ */ r.jsx(pt, { contentDidMount: s, contentDidUpdate: i, children: /* @__PURE__ */ r.jsx(tr, { value: { document: n, window: l }, children: /* @__PURE__ */ r.jsx("div", { className: "frame-content", children: this.props.children }) }) }), o = this.getMountTarget();
|
|
887
|
+
return [Me.createPortal(this.props.head, this.getDoc().head), Me.createPortal(d, o)];
|
|
889
888
|
}
|
|
890
889
|
render() {
|
|
891
890
|
const n = {
|
|
@@ -901,16 +900,16 @@ class be extends Ye {
|
|
|
901
900
|
// also inject into the body and can mess up React. For this reason
|
|
902
901
|
// initialContent is expected to have a div inside of the body
|
|
903
902
|
// element that we render react into.
|
|
904
|
-
J(
|
|
905
|
-
style:
|
|
903
|
+
J(ke, "propTypes", {
|
|
904
|
+
style: R.object,
|
|
906
905
|
// eslint-disable-line
|
|
907
|
-
head:
|
|
908
|
-
initialContent:
|
|
909
|
-
mountTarget:
|
|
910
|
-
contentDidMount:
|
|
911
|
-
contentDidUpdate:
|
|
912
|
-
children:
|
|
913
|
-
}), J(
|
|
906
|
+
head: R.node,
|
|
907
|
+
initialContent: R.string,
|
|
908
|
+
mountTarget: R.string,
|
|
909
|
+
contentDidMount: R.func,
|
|
910
|
+
contentDidUpdate: R.func,
|
|
911
|
+
children: R.oneOfType([R.element, R.arrayOf(R.element)])
|
|
912
|
+
}), J(ke, "defaultProps", {
|
|
914
913
|
style: {},
|
|
915
914
|
head: null,
|
|
916
915
|
children: void 0,
|
|
@@ -921,24 +920,24 @@ J(be, "propTypes", {
|
|
|
921
920
|
},
|
|
922
921
|
initialContent: '<!DOCTYPE html><html><head></head><body><div class="frame-root"></div></body></html>'
|
|
923
922
|
});
|
|
924
|
-
const
|
|
925
|
-
let Y = null, oe = [], ne = null,
|
|
926
|
-
function
|
|
927
|
-
const t = window.getComputedStyle(e), n = parseInt(t.paddingLeft, 10), s = parseInt(t.paddingTop, 10), i = parseInt(t.paddingRight, 10),
|
|
928
|
-
return { paddingLeft: n, paddingTop: s, paddingRight: i, paddingBottom:
|
|
923
|
+
const nr = V.forwardRef((e, t) => /* @__PURE__ */ r.jsx(ke, { ...e, forwardedRef: t }));
|
|
924
|
+
let Y = null, oe = [], ne = null, ft = null;
|
|
925
|
+
function rr(e) {
|
|
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);
|
|
927
|
+
return { paddingLeft: n, paddingTop: s, paddingRight: i, paddingBottom: l };
|
|
929
928
|
}
|
|
930
|
-
const
|
|
929
|
+
const Ye = (e, t, n) => {
|
|
931
930
|
if (!Y)
|
|
932
931
|
return;
|
|
933
|
-
const s = e.getBoundingClientRect(), i = Y == null ? void 0 : Y.getElementById("placeholder"), { paddingLeft:
|
|
934
|
-
i.style.width = t === "vertical" ? s.width -
|
|
932
|
+
const s = e.getBoundingClientRect(), i = Y == null ? void 0 : Y.getElementById("placeholder"), { paddingLeft: l, paddingTop: d, paddingRight: o, paddingBottom: c } = rr(e);
|
|
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";
|
|
935
934
|
const p = oe.reduce(
|
|
936
935
|
(f, h) => Math.abs(h - n) < Math.abs(f - n) ? h : f
|
|
937
936
|
);
|
|
938
|
-
|
|
939
|
-
},
|
|
940
|
-
const t =
|
|
941
|
-
let d = s ? i :
|
|
937
|
+
ft = 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
|
+
}, or = (e) => {
|
|
939
|
+
const t = ht(e), n = window.getComputedStyle(e), s = t === "horizontal", i = parseInt(n.paddingLeft), l = parseInt(n.paddingTop);
|
|
940
|
+
let d = s ? i : l;
|
|
942
941
|
oe = [d], Array.from(e.children).forEach((o) => {
|
|
943
942
|
const c = window.getComputedStyle(o), p = parseInt(
|
|
944
943
|
s ? c.marginLeft + c.marginRight : c.marginTop + c.marginBottom
|
|
@@ -946,7 +945,7 @@ const ze = (e, t, n) => {
|
|
|
946
945
|
oe.push(d + f + p), d += f + p;
|
|
947
946
|
});
|
|
948
947
|
};
|
|
949
|
-
function
|
|
948
|
+
function ht(e) {
|
|
950
949
|
const t = window.getComputedStyle(e).display, n = window.getComputedStyle(e).flexDirection;
|
|
951
950
|
if (t === "flex")
|
|
952
951
|
return n === "column" || n === "column-reverse" ? "vertical" : "horizontal";
|
|
@@ -959,33 +958,33 @@ function ft(e) {
|
|
|
959
958
|
}
|
|
960
959
|
return t === "block" ? "vertical" : "horizontal";
|
|
961
960
|
}
|
|
962
|
-
const
|
|
963
|
-
const t = e.target, n =
|
|
961
|
+
const sr = Ve((e) => {
|
|
962
|
+
const t = e.target, n = ht(t);
|
|
964
963
|
if (n === "vertical") {
|
|
965
964
|
const s = e.clientY - t.offsetTop;
|
|
966
|
-
|
|
965
|
+
Ye(t, n, s);
|
|
967
966
|
} else {
|
|
968
967
|
const s = e.clientX - t.offsetLeft;
|
|
969
|
-
|
|
968
|
+
Ye(t, n, s);
|
|
970
969
|
}
|
|
971
|
-
}, 200),
|
|
972
|
-
e.preventDefault(), e.stopPropagation(),
|
|
970
|
+
}, 200), ir = (e) => {
|
|
971
|
+
e.preventDefault(), e.stopPropagation(), sr(e);
|
|
973
972
|
};
|
|
974
973
|
function xe() {
|
|
975
974
|
const e = Y == null ? void 0 : Y.getElementById("placeholder");
|
|
976
975
|
e.style.display = "none";
|
|
977
976
|
}
|
|
978
|
-
const
|
|
979
|
-
const { document: e } = ue(), [t, n] =
|
|
977
|
+
const ar = () => {
|
|
978
|
+
const { document: e } = ue(), [t, n] = N(fn), s = _n(), i = st("dnd"), [, l] = Q(), [, d] = U();
|
|
980
979
|
return Y = e, {
|
|
981
980
|
isDragging: t,
|
|
982
981
|
"data-dnd": "branch",
|
|
983
|
-
onDragOver: i ?
|
|
982
|
+
onDragOver: i ? ir : te,
|
|
984
983
|
onDrop: i ? (o) => {
|
|
985
984
|
ne == null || ne.classList.remove("outline", "outline-green-300", "outline-2", "-outline-offset-2");
|
|
986
985
|
const c = JSON.parse(o.dataTransfer.getData("text/plain"));
|
|
987
986
|
let p = o.target.getAttribute("data-block-id");
|
|
988
|
-
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: ft }), n(!1), xe(), setTimeout(() => {
|
|
989
988
|
xe();
|
|
990
989
|
}, 300);
|
|
991
990
|
} : te,
|
|
@@ -993,7 +992,7 @@ const lr = () => {
|
|
|
993
992
|
const c = o;
|
|
994
993
|
ne = c.target, c.stopPropagation(), c.preventDefault(), oe = [];
|
|
995
994
|
const p = c.target;
|
|
996
|
-
|
|
995
|
+
or(p), p.classList.add("outline", "outline-green-300", "outline-2", "-outline-offset-2"), n(!0), l(""), d([]);
|
|
997
996
|
} : te,
|
|
998
997
|
onDragLeave: i ? (o) => {
|
|
999
998
|
const c = o;
|
|
@@ -1004,21 +1003,21 @@ const lr = () => {
|
|
|
1004
1003
|
} : te
|
|
1005
1004
|
};
|
|
1006
1005
|
};
|
|
1007
|
-
function
|
|
1006
|
+
function Be(e) {
|
|
1008
1007
|
return e.getAttribute("data-block-id") ? e : e.closest("[data-block-id]");
|
|
1009
1008
|
}
|
|
1010
|
-
function
|
|
1009
|
+
function lr(e) {
|
|
1011
1010
|
e.container.innerHTML = "", e.container.parentNode.removeChild(e.container);
|
|
1012
1011
|
var t = document.querySelector(".ql-toolbar");
|
|
1013
1012
|
t && t.parentNode.removeChild(t), e = null;
|
|
1014
1013
|
}
|
|
1015
|
-
const
|
|
1016
|
-
const e = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], t =
|
|
1017
|
-
return (
|
|
1014
|
+
const cr = () => {
|
|
1015
|
+
const e = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], t = hn(), [, n] = Q(), [s, i] = N(G);
|
|
1016
|
+
return (l) => {
|
|
1018
1017
|
var h;
|
|
1019
1018
|
if (s)
|
|
1020
1019
|
return;
|
|
1021
|
-
const d =
|
|
1020
|
+
const d = Be(l.target), o = d.getAttribute("data-block-type");
|
|
1022
1021
|
if (!o || !e.includes(o))
|
|
1023
1022
|
return;
|
|
1024
1023
|
const c = d.cloneNode(!0);
|
|
@@ -1028,38 +1027,38 @@ const dr = () => {
|
|
|
1028
1027
|
const p = new Bn(c, { placeholder: "Type here..." });
|
|
1029
1028
|
function f() {
|
|
1030
1029
|
const g = p.getText(0, p.getLength());
|
|
1031
|
-
t([d.getAttribute("data-block-id")], { content: g }), d.removeAttribute("style"), c.removeEventListener("blur", f, !0),
|
|
1030
|
+
t([d.getAttribute("data-block-id")], { content: g }), d.removeAttribute("style"), c.removeEventListener("blur", f, !0), lr(p), i(""), n("");
|
|
1032
1031
|
}
|
|
1033
1032
|
c.addEventListener("blur", f, !0), p.focus(), (h = c.querySelector(".ql-clipboard")) == null || h.remove(), i(d.getAttribute("data-block-id"));
|
|
1034
1033
|
};
|
|
1035
|
-
},
|
|
1036
|
-
const [, e] =
|
|
1034
|
+
}, dr = () => {
|
|
1035
|
+
const [, e] = X(), [, t] = U(), [n] = N(G);
|
|
1037
1036
|
return (s) => {
|
|
1038
1037
|
if (n)
|
|
1039
1038
|
return;
|
|
1040
1039
|
s.stopPropagation();
|
|
1041
|
-
const i =
|
|
1040
|
+
const i = Be(s.target);
|
|
1042
1041
|
if (i != null && i.getAttribute("data-block-parent")) {
|
|
1043
|
-
const
|
|
1044
|
-
e([{ id: d, prop:
|
|
1042
|
+
const l = i.getAttribute("data-style-prop"), d = i.getAttribute("data-style-id"), o = i.getAttribute("data-block-parent");
|
|
1043
|
+
e([{ id: d, prop: l, blockId: o }]), t([o]);
|
|
1045
1044
|
} else
|
|
1046
1045
|
i != null && i.getAttribute("data-block-id") && t([i.getAttribute("data-block-id")]);
|
|
1047
1046
|
};
|
|
1048
|
-
},
|
|
1049
|
-
const n =
|
|
1047
|
+
}, ur = Ve((e, t) => {
|
|
1048
|
+
const n = Be(e.target);
|
|
1050
1049
|
n != null && n.getAttribute("data-style-id") && t(n.getAttribute("data-style-id"));
|
|
1051
|
-
}, 100),
|
|
1052
|
-
const [, e] = Q(), [t] =
|
|
1050
|
+
}, 100), pr = () => {
|
|
1051
|
+
const [, e] = Q(), [t] = N(G);
|
|
1053
1052
|
return (n) => {
|
|
1054
|
-
t ||
|
|
1053
|
+
t || ur(n, e);
|
|
1055
1054
|
};
|
|
1056
|
-
},
|
|
1057
|
-
const { document: t } = ue(), [n] = U(), [s, i] =
|
|
1055
|
+
}, fr = ({ children: e }) => {
|
|
1056
|
+
const { document: t } = ue(), [n] = U(), [s, i] = X();
|
|
1058
1057
|
M(() => {
|
|
1059
1058
|
setTimeout(() => {
|
|
1060
1059
|
if (!K(s))
|
|
1061
1060
|
return;
|
|
1062
|
-
const p =
|
|
1061
|
+
const p = gt(t, ae(n));
|
|
1063
1062
|
if (p) {
|
|
1064
1063
|
const f = p.getAttribute("data-style-prop");
|
|
1065
1064
|
if (f) {
|
|
@@ -1069,24 +1068,25 @@ const dr = () => {
|
|
|
1069
1068
|
}
|
|
1070
1069
|
}, 100);
|
|
1071
1070
|
}, [t, n, i, s]);
|
|
1072
|
-
const
|
|
1071
|
+
const l = cr(), d = dr(), o = pr(), c = ar();
|
|
1073
1072
|
return /* @__PURE__ */ r.jsx(
|
|
1074
1073
|
"div",
|
|
1075
1074
|
{
|
|
1075
|
+
"data-block-id": "container",
|
|
1076
1076
|
id: "canvas",
|
|
1077
1077
|
onClick: d,
|
|
1078
|
-
onDoubleClick:
|
|
1078
|
+
onDoubleClick: l,
|
|
1079
1079
|
onMouseMove: o,
|
|
1080
|
-
...
|
|
1081
|
-
className: "relative mb-5 max-w-full " + (c.isDragging ? "dragging" : ""),
|
|
1080
|
+
...St(c, "isDragging"),
|
|
1081
|
+
className: "relative mb-5 h-full max-w-full " + (c.isDragging ? "dragging" : ""),
|
|
1082
1082
|
children: e
|
|
1083
1083
|
}
|
|
1084
1084
|
);
|
|
1085
|
-
},
|
|
1086
|
-
const { window: e } = ue(), [t, n] = U(), s =
|
|
1085
|
+
}, gt = (e, t) => e.querySelector(`[data-block-id="${t}"]`), hr = () => {
|
|
1086
|
+
const { window: e } = ue(), [t, n] = U(), s = Se(), [, i] = X(), { undo: l, redo: d } = Ce(), o = Ge(), [, c] = gn(), [, p] = mn(), { pasteBlocks: f } = yn(), [, h] = et(), g = tt(), { savePage: E } = vn(), [A] = N(G), [, b] = N(xn), S = (O) => {
|
|
1087
1087
|
O.key === "Enter" && (O.preventDefault(), t.length === 1 && b(ae(t)));
|
|
1088
|
-
},
|
|
1089
|
-
const w = s.find((
|
|
1088
|
+
}, B = (O) => {
|
|
1089
|
+
const w = s.find((F) => F._id === O);
|
|
1090
1090
|
return w ? w._parent : null;
|
|
1091
1091
|
};
|
|
1092
1092
|
return M(() => {
|
|
@@ -1098,15 +1098,15 @@ const dr = () => {
|
|
|
1098
1098
|
if (S(w), !A && (w.key === "Delete" || w.key === "Backspace") && (w.preventDefault(), g(t)), w.ctrlKey || w.metaKey) {
|
|
1099
1099
|
if (w.key === "ArrowUp") {
|
|
1100
1100
|
w.preventDefault();
|
|
1101
|
-
const
|
|
1102
|
-
|
|
1101
|
+
const F = t.length > 0 ? B(t[0]) : null;
|
|
1102
|
+
F && n([F]);
|
|
1103
1103
|
}
|
|
1104
1104
|
if (["z", "y", "d", "x", "c", "p", "s", "v"].includes(w.key)) {
|
|
1105
1105
|
if (A && ["x", "z", "v"].includes(w.key))
|
|
1106
1106
|
return !0;
|
|
1107
1107
|
w.preventDefault();
|
|
1108
1108
|
}
|
|
1109
|
-
w.key === "s" && (w.stopPropagation(), w.preventDefault(), E()), w.key === "z" &&
|
|
1109
|
+
w.key === "s" && (w.stopPropagation(), w.preventDefault(), E()), w.key === "z" && l(), w.key === "y" && d(), w.key === "d" && o(t), w.key === "x" && c(t), w.key === "c" && p(t), w.key === "v" && t.length > 0 && f(t[0]);
|
|
1110
1110
|
}
|
|
1111
1111
|
};
|
|
1112
1112
|
return e.removeEventListener("keydown", O), e.addEventListener("keydown", O), () => {
|
|
@@ -1115,7 +1115,7 @@ const dr = () => {
|
|
|
1115
1115
|
}, [
|
|
1116
1116
|
t,
|
|
1117
1117
|
n,
|
|
1118
|
-
|
|
1118
|
+
l,
|
|
1119
1119
|
g,
|
|
1120
1120
|
h,
|
|
1121
1121
|
d,
|
|
@@ -1127,34 +1127,34 @@ const dr = () => {
|
|
|
1127
1127
|
E,
|
|
1128
1128
|
e
|
|
1129
1129
|
]), null;
|
|
1130
|
-
},
|
|
1131
|
-
const [, n] = U(), [, s] = Q(), [, i] =
|
|
1130
|
+
}, gr = ({ block: e, label: t }) => {
|
|
1131
|
+
const [, n] = U(), [, s] = Q(), [, i] = N(nt), l = st("dnd");
|
|
1132
1132
|
return /* @__PURE__ */ r.jsxs(
|
|
1133
1133
|
"div",
|
|
1134
1134
|
{
|
|
1135
1135
|
className: "mr-10 flex cursor-grab items-center space-x-1 px-1",
|
|
1136
|
-
draggable:
|
|
1136
|
+
draggable: l ? "true" : "false",
|
|
1137
1137
|
onDragStart: (d) => {
|
|
1138
|
-
d.dataTransfer.setData("text/plain", JSON.stringify(
|
|
1138
|
+
d.dataTransfer.setData("text/plain", JSON.stringify(Dt(e, ["_id", "_type"]))), i(e._id), setTimeout(() => {
|
|
1139
1139
|
n([]), s(null);
|
|
1140
1140
|
}, 200);
|
|
1141
1141
|
},
|
|
1142
1142
|
children: [
|
|
1143
|
-
/* @__PURE__ */ r.jsx(
|
|
1143
|
+
/* @__PURE__ */ r.jsx(Ft, {}),
|
|
1144
1144
|
t
|
|
1145
1145
|
]
|
|
1146
1146
|
}
|
|
1147
1147
|
);
|
|
1148
|
-
},
|
|
1149
|
-
const n = tt(), s =
|
|
1148
|
+
}, mr = ({ selectedBlockElement: e, block: t }) => {
|
|
1149
|
+
const n = tt(), s = Ge(), [, i] = U(), [, l] = X(), [d] = N(G), { floatingStyles: o, refs: c, update: p } = An({
|
|
1150
1150
|
placement: "top-start",
|
|
1151
|
-
middleware: [Pn(),
|
|
1151
|
+
middleware: [Pn(), On()],
|
|
1152
1152
|
elements: {
|
|
1153
1153
|
reference: e
|
|
1154
1154
|
}
|
|
1155
1155
|
});
|
|
1156
|
-
|
|
1157
|
-
const f =
|
|
1156
|
+
Rn(e, () => p(), e !== null);
|
|
1157
|
+
const f = D(t, "_parent", null), h = K(D(t, "_name", "")) ? D(t, "_type", "") : D(t, "_name", "");
|
|
1158
1158
|
return !e || !t || d ? null : /* @__PURE__ */ r.jsxs(
|
|
1159
1159
|
"div",
|
|
1160
1160
|
{
|
|
@@ -1168,25 +1168,25 @@ const dr = () => {
|
|
|
1168
1168
|
onKeyDown: (g) => g.stopPropagation(),
|
|
1169
1169
|
className: "z-[99999] flex h-6 items-center bg-blue-500 py-2 text-xs text-white",
|
|
1170
1170
|
children: [
|
|
1171
|
-
/* @__PURE__ */ r.jsx(
|
|
1171
|
+
/* @__PURE__ */ r.jsx(gr, { label: h, block: t }),
|
|
1172
1172
|
/* @__PURE__ */ r.jsxs("div", { className: "flex gap-2 px-1 ", children: [
|
|
1173
1173
|
f && /* @__PURE__ */ r.jsx(
|
|
1174
|
-
|
|
1174
|
+
$t,
|
|
1175
1175
|
{
|
|
1176
1176
|
className: "hover:scale-105 ",
|
|
1177
1177
|
onClick: () => {
|
|
1178
|
-
|
|
1178
|
+
l([]), i([f]);
|
|
1179
1179
|
}
|
|
1180
1180
|
}
|
|
1181
1181
|
),
|
|
1182
|
-
|
|
1183
|
-
|
|
1182
|
+
bn(D(t, "_type", "")) ? /* @__PURE__ */ r.jsx(Wt, { className: "hover:scale-105 ", onClick: () => s([t == null ? void 0 : t._id]) }) : null,
|
|
1183
|
+
kn(D(t, "_type", "")) ? /* @__PURE__ */ r.jsx(Ht, { className: "hover:scale-105 ", onClick: () => n([t == null ? void 0 : t._id]) }) : null
|
|
1184
1184
|
] })
|
|
1185
1185
|
]
|
|
1186
1186
|
}
|
|
1187
1187
|
);
|
|
1188
|
-
},
|
|
1189
|
-
const [t] =
|
|
1188
|
+
}, yr = ({ model: e }) => {
|
|
1189
|
+
const [t] = wn(), [n] = U(), [s] = Ze(), [i] = Q(), [l] = X(), [d] = N(nt), { document: o, window: c } = ue(), [p] = q(o == null ? void 0 : o.getElementById("highlighted-block")), [f] = q(
|
|
1190
1190
|
o == null ? void 0 : o.getElementById("selected-block")
|
|
1191
1191
|
), [h] = q(
|
|
1192
1192
|
o == null ? void 0 : o.getElementById("selected-styling-block")
|
|
@@ -1194,14 +1194,14 @@ const dr = () => {
|
|
|
1194
1194
|
M(() => {
|
|
1195
1195
|
s ? o == null || o.documentElement.classList.add("dark") : o == null || o.documentElement.classList.remove("dark");
|
|
1196
1196
|
}, [s, o]);
|
|
1197
|
-
const E =
|
|
1197
|
+
const E = D(t, "headingFont", "DM Sans"), A = D(t, "bodyFont", "DM Sans");
|
|
1198
1198
|
return M(() => {
|
|
1199
|
-
const b =
|
|
1199
|
+
const b = D(t, "primaryColor", "#000"), S = D(t, "secondaryColor", "#FFF"), B = Mn({
|
|
1200
1200
|
colors: [b, S],
|
|
1201
1201
|
names: ["primary", "secondary"]
|
|
1202
1202
|
});
|
|
1203
|
-
|
|
1204
|
-
const O =
|
|
1203
|
+
B.primary.DEFAULT = b, B.secondary.DEFAULT = S;
|
|
1204
|
+
const O = D(t, "roundedCorners", "0");
|
|
1205
1205
|
!c || !c.tailwind || (c.tailwind.config = {
|
|
1206
1206
|
darkMode: "class",
|
|
1207
1207
|
theme: {
|
|
@@ -1213,19 +1213,19 @@ const dr = () => {
|
|
|
1213
1213
|
borderRadius: {
|
|
1214
1214
|
global: `${O || "0"}px`
|
|
1215
1215
|
},
|
|
1216
|
-
colors:
|
|
1216
|
+
colors: B
|
|
1217
1217
|
}
|
|
1218
1218
|
},
|
|
1219
1219
|
plugins: [
|
|
1220
1220
|
// @ts-ignore
|
|
1221
|
-
c.tailwind.plugin.withOptions(({ prefix: w = "ui" } = {}) => ({ addVariant:
|
|
1222
|
-
for (const
|
|
1223
|
-
|
|
1224
|
-
`&[data-headlessui-state~="${
|
|
1225
|
-
`:where([data-headlessui-state~="${
|
|
1226
|
-
]),
|
|
1227
|
-
`&[data-headlessui-state]:not([data-headlessui-state~="${
|
|
1228
|
-
`:where([data-headlessui-state]:not([data-headlessui-state~="${
|
|
1221
|
+
c.tailwind.plugin.withOptions(({ prefix: w = "ui" } = {}) => ({ addVariant: F }) => {
|
|
1222
|
+
for (const $ of ["open", "checked", "selected", "active", "disabled"])
|
|
1223
|
+
F(`${w}-${$}`, [
|
|
1224
|
+
`&[data-headlessui-state~="${$}"]`,
|
|
1225
|
+
`:where([data-headlessui-state~="${$}"]) &`
|
|
1226
|
+
]), F(`${w}-not-${$}`, [
|
|
1227
|
+
`&[data-headlessui-state]:not([data-headlessui-state~="${$}"])`,
|
|
1228
|
+
`:where([data-headlessui-state]:not([data-headlessui-state~="${$}"])) &:not([data-headlessui-state])`
|
|
1229
1229
|
]);
|
|
1230
1230
|
})
|
|
1231
1231
|
]
|
|
@@ -1243,12 +1243,12 @@ const dr = () => {
|
|
|
1243
1243
|
}, [d]), M(() => {
|
|
1244
1244
|
p && (p.textContent = i ? `[data-style-id="${i}"]{ outline: 1px solid #42a1fc !important; outline-offset: -1px;}` : "");
|
|
1245
1245
|
}, [i, n, p]), M(() => {
|
|
1246
|
-
h && (h.textContent = `${re(
|
|
1246
|
+
h && (h.textContent = `${re(l, ({ id: b }) => `[data-style-id="${b}"]`).join(",")}{
|
|
1247
1247
|
outline: 1px solid #42a1fc !important; outline-offset: -1px;
|
|
1248
1248
|
}`);
|
|
1249
|
-
}, [
|
|
1250
|
-
const b =
|
|
1251
|
-
o.body.className = `font-body antialiased text-[${b}] bg-[${
|
|
1249
|
+
}, [l, h]), M(() => {
|
|
1250
|
+
const b = D(t, "bodyTextLightColor", "#64748b"), S = D(t, "bodyTextDarkColor", "#94a3b8"), B = D(t, "bodyBgLightColor", "#FFFFFF"), O = D(t, "bodyBgDarkColor", "#0f172a");
|
|
1251
|
+
o.body.className = `font-body antialiased text-[${b}] bg-[${B}] dark:text-[${S}] dark:bg-[${O}]`;
|
|
1252
1252
|
}, [t, o, e]), e === "page" ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
1253
1253
|
E && /* @__PURE__ */ r.jsx(
|
|
1254
1254
|
"link",
|
|
@@ -1278,100 +1278,100 @@ const dr = () => {
|
|
|
1278
1278
|
),
|
|
1279
1279
|
E && /* @__PURE__ */ r.jsx("style", { children: `h1,h2,h3,h4,h5,h6{font-family: "${E}",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";}` })
|
|
1280
1280
|
] }) : null;
|
|
1281
|
-
},
|
|
1281
|
+
}, vr = (e) => {
|
|
1282
1282
|
const t = {};
|
|
1283
1283
|
return Object.keys(e).forEach((n) => {
|
|
1284
|
-
|
|
1284
|
+
Te(e[n]) && e[n].startsWith(Le) && (t[n] = e[n].replace(Le, "").split(","));
|
|
1285
1285
|
}), t;
|
|
1286
|
-
},
|
|
1286
|
+
}, xr = Bt((e) => {
|
|
1287
1287
|
const t = e.replace(it, "").split(",");
|
|
1288
|
-
return
|
|
1288
|
+
return Nn(t[0], t[1]);
|
|
1289
1289
|
});
|
|
1290
|
-
function
|
|
1291
|
-
return
|
|
1290
|
+
function br(e, t) {
|
|
1291
|
+
return D(e, `${t}_attrs`, {});
|
|
1292
1292
|
}
|
|
1293
|
-
function
|
|
1293
|
+
function kr(e) {
|
|
1294
1294
|
const t = {};
|
|
1295
1295
|
return Object.keys(e).forEach((n) => {
|
|
1296
|
-
if (
|
|
1297
|
-
const s =
|
|
1296
|
+
if (Te(e[n]) && e[n].startsWith(it)) {
|
|
1297
|
+
const s = xr(e[n]);
|
|
1298
1298
|
t[n] = {
|
|
1299
1299
|
className: s,
|
|
1300
1300
|
"data-style-prop": n,
|
|
1301
1301
|
"data-block-parent": e._id,
|
|
1302
1302
|
"data-style-id": `${n}-${e._id}`,
|
|
1303
|
-
...
|
|
1303
|
+
...br(e, n)
|
|
1304
1304
|
};
|
|
1305
1305
|
}
|
|
1306
1306
|
}), t;
|
|
1307
1307
|
}
|
|
1308
|
-
function
|
|
1309
|
-
const n =
|
|
1308
|
+
function wr(e, t) {
|
|
1309
|
+
const n = D(e, "_bindings", {});
|
|
1310
1310
|
return K(n) ? { ...e } : (_t(n, (s, i) => {
|
|
1311
|
-
|
|
1311
|
+
Te(s) && D(t, s, null) && (e[i] = D(t, s, null));
|
|
1312
1312
|
}), e);
|
|
1313
1313
|
}
|
|
1314
|
-
function
|
|
1315
|
-
const t =
|
|
1314
|
+
function we({ blocks: e }) {
|
|
1315
|
+
const t = Se(), n = je((l) => kr(l), []), [s] = En(), [i] = N(G);
|
|
1316
1316
|
return /* @__PURE__ */ r.jsx(r.Fragment, { children: V.Children.toArray(
|
|
1317
|
-
e.map((
|
|
1318
|
-
if (i ===
|
|
1317
|
+
e.map((l, d) => {
|
|
1318
|
+
if (i === l._id)
|
|
1319
1319
|
return null;
|
|
1320
|
-
const o =
|
|
1320
|
+
const o = vr(l), c = {};
|
|
1321
1321
|
K(o) || Object.keys(o).forEach((g) => {
|
|
1322
1322
|
c[g] = V.Children.toArray(
|
|
1323
|
-
o[g].map((E) => /* @__PURE__ */ r.jsx(
|
|
1323
|
+
o[g].map((E) => /* @__PURE__ */ r.jsx(we, { blocks: [Ot(t, { _id: E })] }))
|
|
1324
1324
|
);
|
|
1325
1325
|
});
|
|
1326
|
-
const p =
|
|
1327
|
-
c.children = p.length ? /* @__PURE__ */ r.jsx(
|
|
1328
|
-
const f =
|
|
1329
|
-
return
|
|
1326
|
+
const p = Xe(t, { _parent: l._id });
|
|
1327
|
+
c.children = p.length ? /* @__PURE__ */ r.jsx(we, { blocks: p }) : null;
|
|
1328
|
+
const f = at(l._type), h = D(f, "builderComponent", D(f, "component", null));
|
|
1329
|
+
return At(h) ? /* @__PURE__ */ r.jsx("noscript", { children: `<!-- ${l == null ? void 0 : l._type} not registered -->` }) : /* @__PURE__ */ r.jsx(Je, { children: V.createElement(h, {
|
|
1330
1330
|
blockProps: {
|
|
1331
|
-
"data-block-id":
|
|
1332
|
-
"data-block-type":
|
|
1333
|
-
"data-dnd":
|
|
1331
|
+
"data-block-id": l._id,
|
|
1332
|
+
"data-block-type": l._type,
|
|
1333
|
+
"data-dnd": Fn(f, "canAcceptBlock") ? "branch" : "leaf"
|
|
1334
1334
|
},
|
|
1335
1335
|
inBuilder: !0,
|
|
1336
1336
|
index: d,
|
|
1337
|
-
...
|
|
1338
|
-
...n(
|
|
1337
|
+
...wr(l, s),
|
|
1338
|
+
...n(l),
|
|
1339
1339
|
...c
|
|
1340
1340
|
}) });
|
|
1341
1341
|
})
|
|
1342
1342
|
) });
|
|
1343
1343
|
}
|
|
1344
|
-
const
|
|
1345
|
-
const e =
|
|
1346
|
-
return /* @__PURE__ */ r.jsx(
|
|
1347
|
-
},
|
|
1348
|
-
const [e] =
|
|
1344
|
+
const jr = () => {
|
|
1345
|
+
const e = Se(), t = Ee("container", null), n = K(e) ? null : /* @__PURE__ */ r.jsx(Sn, { children: /* @__PURE__ */ r.jsx(we, { blocks: Xe(e, (i) => K(i._parent)) }) }), s = t ? be(at(t).component, {}, n) : n;
|
|
1346
|
+
return /* @__PURE__ */ r.jsx(Ln, { children: s });
|
|
1347
|
+
}, Tr = (e, t) => e.querySelector(`[data-style-id="${t}"]`), Cr = () => {
|
|
1348
|
+
const [e] = N(jn), [t] = et(), [n] = Ie(), [, s] = U(), i = Tn(), [, l] = Q(), d = Oe(null), o = Oe(null), [c, p] = q({ width: 0, height: 0 }), f = Kn(c), [h, g] = q(0), [E, A] = q([]), [, b] = q([]), [, S] = N(Cn), [B, O] = X(), w = Ee("loadingCanvas", !1);
|
|
1349
1349
|
M(() => {
|
|
1350
|
-
const { clientWidth: _, clientHeight:
|
|
1351
|
-
p({ width: _, height:
|
|
1350
|
+
const { clientWidth: _, clientHeight: W } = o.current;
|
|
1351
|
+
p({ width: _, height: W }), h === 0 && g(_);
|
|
1352
1352
|
}, [o, n, h]);
|
|
1353
|
-
const
|
|
1353
|
+
const F = (_, W = 0) => {
|
|
1354
1354
|
const { top: H } = _.getBoundingClientRect();
|
|
1355
|
-
return H +
|
|
1355
|
+
return H + W >= 0 && H - W <= window.innerHeight;
|
|
1356
1356
|
};
|
|
1357
1357
|
M(() => {
|
|
1358
|
-
var _,
|
|
1358
|
+
var _, W;
|
|
1359
1359
|
if (i && i.type !== "Multiple" && d.current) {
|
|
1360
|
-
const H =
|
|
1361
|
-
H && (
|
|
1360
|
+
const H = gt(d.current.contentDocument, i._id);
|
|
1361
|
+
H && (F(H) || (W = (_ = d.current) == null ? void 0 : _.contentWindow) == null || W.scrollTo({ top: H.offsetTop, behavior: "smooth" }), A([H]));
|
|
1362
1362
|
}
|
|
1363
1363
|
}, [i]), M(() => {
|
|
1364
|
-
if (!K(
|
|
1365
|
-
const _ =
|
|
1364
|
+
if (!K(B) && d.current) {
|
|
1365
|
+
const _ = Tr(
|
|
1366
1366
|
d.current.contentDocument,
|
|
1367
|
-
ae(
|
|
1367
|
+
ae(B).id
|
|
1368
1368
|
);
|
|
1369
1369
|
b(_ ? [_] : [null]);
|
|
1370
1370
|
} else
|
|
1371
1371
|
b([null]);
|
|
1372
|
-
}, [
|
|
1373
|
-
const
|
|
1374
|
-
let _ =
|
|
1372
|
+
}, [B]);
|
|
1373
|
+
const $ = It(() => {
|
|
1374
|
+
let _ = Yn;
|
|
1375
1375
|
return e === "offline" && (_ = _.replace(
|
|
1376
1376
|
"https://old.chaibuilder.com/offline/tailwind.cdn.js",
|
|
1377
1377
|
"/offline/tailwind.cdn.js"
|
|
@@ -1383,30 +1383,30 @@ const Tr = () => {
|
|
|
1383
1383
|
onClick: () => {
|
|
1384
1384
|
s([]), O([]);
|
|
1385
1385
|
},
|
|
1386
|
-
onMouseLeave: () => setTimeout(() =>
|
|
1386
|
+
onMouseLeave: () => setTimeout(() => l(""), 300),
|
|
1387
1387
|
className: "relative mx-auto overflow-hidden h-full w-full",
|
|
1388
1388
|
style: h > 0 && !K(f) ? { width: t ? "100%" : h } : {},
|
|
1389
1389
|
ref: o,
|
|
1390
1390
|
children: /* @__PURE__ */ r.jsxs(
|
|
1391
|
-
|
|
1391
|
+
nr,
|
|
1392
1392
|
{
|
|
1393
1393
|
contentDidMount: () => S(d.current),
|
|
1394
1394
|
ref: d,
|
|
1395
1395
|
id: "canvas-iframe",
|
|
1396
1396
|
style: { width: `${n}px`, ...f },
|
|
1397
1397
|
className: "relative mx-auto box-content h-full max-w-full shadow-lg transition-all duration-300 ease-linear",
|
|
1398
|
-
initialContent:
|
|
1398
|
+
initialContent: $,
|
|
1399
1399
|
children: [
|
|
1400
|
-
/* @__PURE__ */ r.jsx(
|
|
1400
|
+
/* @__PURE__ */ r.jsx(hr, {}),
|
|
1401
1401
|
/* @__PURE__ */ r.jsx(
|
|
1402
|
-
|
|
1402
|
+
mr,
|
|
1403
1403
|
{
|
|
1404
1404
|
block: i,
|
|
1405
1405
|
selectedBlockElement: ae(E)
|
|
1406
1406
|
}
|
|
1407
1407
|
),
|
|
1408
|
-
/* @__PURE__ */ r.jsx(
|
|
1409
|
-
/* @__PURE__ */ r.jsx(
|
|
1408
|
+
/* @__PURE__ */ r.jsx(yr, { model: "page" }),
|
|
1409
|
+
/* @__PURE__ */ r.jsx(fr, { children: w ? /* @__PURE__ */ r.jsx("div", { className: "h-full p-4", children: /* @__PURE__ */ r.jsx(rt, { className: "h-full" }) }) : /* @__PURE__ */ r.jsx(jr, {}) }),
|
|
1410
1410
|
/* @__PURE__ */ r.jsx("br", {}),
|
|
1411
1411
|
/* @__PURE__ */ r.jsx("div", { id: "placeholder", className: "absolute bg-green-500 z-[99999] max-w-full transition-transform" })
|
|
1412
1412
|
]
|
|
@@ -1414,10 +1414,10 @@ const Tr = () => {
|
|
|
1414
1414
|
)
|
|
1415
1415
|
}
|
|
1416
1416
|
);
|
|
1417
|
-
},
|
|
1418
|
-
/* @__PURE__ */ r.jsx(
|
|
1419
|
-
/* @__PURE__ */ r.jsx("div", { className: "relative h-full overflow-hidden bg-slate-800/90
|
|
1417
|
+
}, Ao = () => /* @__PURE__ */ r.jsxs("div", { className: "flex h-full w-full flex-col", children: [
|
|
1418
|
+
/* @__PURE__ */ r.jsx(zn, {}),
|
|
1419
|
+
/* @__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(Je, { fallback: /* @__PURE__ */ r.jsx(rt, { className: "h-full" }), children: /* @__PURE__ */ r.jsx(Dn, { children: /* @__PURE__ */ r.jsx(Cr, {}) }) }) })
|
|
1420
1420
|
] });
|
|
1421
1421
|
export {
|
|
1422
|
-
|
|
1422
|
+
Ao as default
|
|
1423
1423
|
};
|