@chaibuilder/sdk 0.1.3 → 0.1.5
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-c195f577.js → AddBlocks-5d928d58.js} +20 -19
- package/dist/AddBlocks-df0ea47a.cjs +3 -0
- package/dist/BrandingOptions-b76762a4.cjs +1 -0
- package/dist/{BrandingOptions-766c19c6.js → BrandingOptions-bf7e6a38.js} +11 -9
- package/dist/{CanvasArea-25800a3e.js → CanvasArea-688987d1.js} +226 -224
- package/dist/{CanvasArea-e855c4a2.cjs → CanvasArea-9287e1bd.cjs} +2 -2
- package/dist/{Class-e34b2337.js → Class-1fb4c0c4.js} +110 -169
- package/dist/Class-6c695ccb.cjs +1 -0
- package/dist/Layers-11b26a20.cjs +1 -0
- package/dist/{Layers-f7e792f6.js → Layers-c053dfb8.js} +12 -10
- package/dist/MODIFIERS-70fef873.cjs +1 -0
- package/dist/MODIFIERS-c2e02614.js +67 -0
- package/dist/{MarkAsGlobalBlock-6bac1842.js → MarkAsGlobalBlock-111d739d.js} +10 -8
- package/dist/MarkAsGlobalBlock-4c85ba27.cjs +1 -0
- package/dist/{PagesPanel-0827c264.js → PagesPanel-48d0f29b.js} +12 -10
- package/dist/PagesPanel-97dbe8c3.cjs +1 -0
- package/dist/ProjectPanel-24543eac.cjs +1 -0
- package/dist/{ProjectPanel-e577029a.js → ProjectPanel-e19b9778.js} +10 -11
- package/dist/Settings-0358ce2f.cjs +1 -0
- package/dist/{Settings-b214f859.js → Settings-f4118350.js} +7 -5
- package/dist/{SidePanels-03fa10e8.js → SidePanels-73e79a7d.js} +8 -6
- package/dist/SidePanels-e48c2ba6.cjs +1 -0
- package/dist/Topbar-26d18e9d.cjs +1 -0
- package/dist/{Topbar-9bc8c9cf.js → Topbar-5574394f.js} +7 -5
- package/dist/add-page-modal-61d5bad7.js +93 -0
- package/dist/add-page-modal-6a60b790.cjs +1 -0
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +13 -11
- package/dist/core.js +63 -61
- package/dist/{delete-page-modal-def9012d.js → delete-page-modal-62641e4c.js} +10 -9
- package/dist/delete-page-modal-ecdd890a.cjs +1 -0
- package/dist/html-to-json-01cc5fe0.cjs +1 -0
- package/dist/{html-to-json-9304dbda.js → html-to-json-d20aafdd.js} +2 -2
- package/dist/index-89fce4e7.cjs +2 -0
- package/dist/index-de0f72ce.js +4911 -0
- package/dist/lib.cjs +1 -1
- package/dist/lib.js +4 -4
- package/dist/{page-viewer-41cbb548.js → page-viewer-14a69dba.js} +21 -18
- package/dist/page-viewer-e8469cfa.cjs +1 -0
- package/dist/{project-general-setting-2c8bed74.cjs → project-general-setting-decde8d1.cjs} +1 -1
- package/dist/{project-general-setting-0262fe62.js → project-general-setting-f7cfce70.js} +7 -5
- package/dist/render.cjs +2 -2
- package/dist/render.d.ts +9 -3
- package/dist/render.js +154 -134
- package/dist/server.cjs +1 -0
- package/dist/server.d.ts +142 -0
- package/dist/server.js +126 -0
- package/dist/{single-page-detail-924d57fc.js → single-page-detail-16682af2.js} +45 -43
- package/dist/single-page-detail-60edc711.cjs +1 -0
- package/dist/style.css +1 -1
- package/dist/useChangePage-5a62d7fc.cjs +1 -0
- package/dist/useChangePage-6b957e49.js +12 -0
- package/dist/usePageActions-32ea32a5.cjs +1 -0
- package/dist/usePageActions-37599b0c.js +38 -0
- package/package.json +7 -1
- package/dist/AddBlocks-0916e841.cjs +0 -3
- package/dist/BrandingOptions-742992b6.cjs +0 -1
- package/dist/CONTROLS-031e1de3.cjs +0 -1
- package/dist/CONTROLS-442caee5.js +0 -6
- package/dist/Class-7d6aadbc.cjs +0 -1
- package/dist/Layers-a2169d0b.cjs +0 -1
- package/dist/MarkAsGlobalBlock-6187e6fd.cjs +0 -1
- package/dist/PagesPanel-5698953d.cjs +0 -1
- package/dist/ProjectPanel-a3cb7396.cjs +0 -1
- package/dist/Settings-bee21026.cjs +0 -1
- package/dist/SidePanels-934159a4.cjs +0 -1
- package/dist/Topbar-c083cc2a.cjs +0 -1
- package/dist/add-page-modal-63858244.js +0 -92
- package/dist/add-page-modal-cb367c9d.cjs +0 -1
- package/dist/delete-page-modal-1e3914e3.cjs +0 -1
- package/dist/html-to-json-9c9961da.cjs +0 -1
- package/dist/index-207f2cbf.cjs +0 -2
- package/dist/index-390f7bef.js +0 -4749
- package/dist/index-824a7bd0.js +0 -188
- package/dist/index-ebd86d7f.cjs +0 -2
- package/dist/page-viewer-83ce2c70.cjs +0 -1
- package/dist/single-page-detail-cfeae896.cjs +0 -1
- package/dist/usePageActions-3bed2330.cjs +0 -1
- package/dist/usePageActions-f86f6f65.js +0 -36
- package/dist/useProjectActions-1de05f63.js +0 -17
- package/dist/useProjectActions-5092ed79.cjs +0 -1
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
var yt = Object.defineProperty;
|
|
2
|
-
var vt = (e,
|
|
3
|
-
var V = (e,
|
|
2
|
+
var vt = (e, r, n) => r in e ? yt(e, r, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[r] = n;
|
|
3
|
+
var V = (e, r, n) => (vt(e, typeof r != "symbol" ? r + "" : r, n), n);
|
|
4
4
|
import { j as t } from "./jsx-runtime-944c88e2.js";
|
|
5
5
|
import G, { createElement as gt, useCallback as Q, useState as H, useEffect as F, Component as Xe, Children as xt, useRef as Oe, useMemo as bt, lazy as wt, Suspense as Et } from "react";
|
|
6
6
|
import { map as ie, includes as Me, toUpper as ye, round as St, isEmpty as ee, first as ce, get as $, memoize as Tt, find as jt, filter as Ze, isString as Je } from "lodash";
|
|
7
7
|
import { ResetIcon as De, DotsVerticalIcon as Ct, MobileIcon as Be, LaptopIcon as kt, DesktopIcon as _t, EraserIcon as Rt, ZoomInIcon as At, ArrowUpIcon as Pt, CopyIcon as It, TrashIcon as Ot, DragHandleDots2Icon as Mt } from "@radix-ui/react-icons";
|
|
8
8
|
import { B as le, u as Qe, S as et } from "./useBuilderProp-81a14920.js";
|
|
9
|
-
import { c as ke, d as tt, e as _e, f as Dt, g as Bt, h as X, i as Z, j as $t, k as
|
|
9
|
+
import { c as ke, d as tt, e as _e, f as Dt, g as Bt, h as X, i as Z, j as $t, k as rt, l as nt, m as Nt, n as Lt, o as Ft, p as ot, q as st, u as Wt, r as qt, s as Ut, t as Yt, v as zt, w as Ht, x as Re, y as at, z as Kt, A as Vt, B as Gt, b as Xt, E as Zt } from "./index-de0f72ce.js";
|
|
10
10
|
import { useTranslation as it } from "react-i18next";
|
|
11
11
|
import { S as se } from "./separator-a80d065b.js";
|
|
12
|
-
import { S as Jt, D as Qt, c as
|
|
13
|
-
import { L as
|
|
14
|
-
import { A as
|
|
12
|
+
import { S as Jt, D as Qt, c as er, d as tr, h as rr, i as nr, f as or, H as sr, a as ar, b as ir } from "./dropdown-menu-ae3ed09b.js";
|
|
13
|
+
import { L as cr } from "./label-e770a087.js";
|
|
14
|
+
import { A as lr, a as dr, b as ur, c as fr, e as pr, f as hr, d as mr, h as yr, g as vr } from "./alert-dialog-ee98f47e.js";
|
|
15
15
|
import { useAtom as te } from "jotai";
|
|
16
|
-
import { flip as
|
|
17
|
-
import { useFloating as
|
|
18
|
-
import { useDrag as
|
|
19
|
-
import { useResizeObserver as
|
|
20
|
-
import { tailwindcssPaletteGenerator as
|
|
21
|
-
import { Provider as
|
|
22
|
-
import { twMerge as
|
|
23
|
-
import { S as ct, a as $e } from "./
|
|
24
|
-
import { getBlockComponent as
|
|
16
|
+
import { flip as gr } from "@floating-ui/dom";
|
|
17
|
+
import { useFloating as xr, shift as br } from "@floating-ui/react-dom";
|
|
18
|
+
import { useDrag as wr } from "react-dnd";
|
|
19
|
+
import { useResizeObserver as Er } from "@react-hookz/web";
|
|
20
|
+
import { tailwindcssPaletteGenerator as Sr } from "@bobthered/tailwindcss-palette-generator";
|
|
21
|
+
import { Provider as Tr } from "react-wrap-balancer";
|
|
22
|
+
import { twMerge as jr } from "tailwind-merge";
|
|
23
|
+
import { S as ct, a as $e } from "./MODIFIERS-c2e02614.js";
|
|
24
|
+
import { getBlockComponent as Cr } from "@chaibuilder/blocks";
|
|
25
25
|
import Ne from "react-dom";
|
|
26
|
-
import { g as
|
|
26
|
+
import { g as kr } from "./_commonjsHelpers-d4512b9c.js";
|
|
27
27
|
import "@radix-ui/react-slot";
|
|
28
28
|
import "class-variance-authority";
|
|
29
29
|
import "./utils-ac68b2c8.js";
|
|
@@ -35,32 +35,34 @@ import "flagged";
|
|
|
35
35
|
import "@minoru/react-dnd-treeview";
|
|
36
36
|
import "react-hotkeys-hook";
|
|
37
37
|
import "flat-to-nested";
|
|
38
|
-
import "./Class-
|
|
38
|
+
import "./Class-1fb4c0c4.js";
|
|
39
39
|
import "redux-undo";
|
|
40
|
+
import "lucide-react";
|
|
41
|
+
import "sonner";
|
|
40
42
|
import "@radix-ui/react-separator";
|
|
41
43
|
import "@radix-ui/react-switch";
|
|
42
44
|
import "@radix-ui/react-hover-card";
|
|
43
45
|
import "@radix-ui/react-dropdown-menu";
|
|
44
46
|
import "@radix-ui/react-label";
|
|
45
47
|
import "@radix-ui/react-alert-dialog";
|
|
46
|
-
const
|
|
47
|
-
const { undoCount: e, redoCount:
|
|
48
|
+
const _r = () => {
|
|
49
|
+
const { undoCount: e, redoCount: r, undo: n, redo: i } = ke();
|
|
48
50
|
return /* @__PURE__ */ t.jsxs("div", { className: "flex items-center", children: [
|
|
49
|
-
/* @__PURE__ */ t.jsx(le, { disabled: !e, size: "sm", onClick:
|
|
50
|
-
/* @__PURE__ */ t.jsx(le, { disabled: !
|
|
51
|
+
/* @__PURE__ */ t.jsx(le, { disabled: !e, size: "sm", onClick: n, className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ t.jsx(De, {}) }),
|
|
52
|
+
/* @__PURE__ */ t.jsx(le, { disabled: !r, onClick: i, size: "sm", className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ t.jsx(De, { className: "rotate-180 scale-y-[-1] transform" }) })
|
|
51
53
|
] });
|
|
52
54
|
};
|
|
53
|
-
function
|
|
54
|
-
const [e,
|
|
55
|
+
function Rr() {
|
|
56
|
+
const [e, r] = tt(), { t: n } = it();
|
|
55
57
|
return /* @__PURE__ */ t.jsxs("div", { className: "flex items-center", children: [
|
|
56
|
-
/* @__PURE__ */ t.jsx(
|
|
58
|
+
/* @__PURE__ */ t.jsx(cr, { htmlFor: "dark-mode-switch", children: n("dark_mode") }),
|
|
57
59
|
/* @__PURE__ */ t.jsxs(
|
|
58
60
|
Jt,
|
|
59
61
|
{
|
|
60
62
|
id: "dark-mode-switch",
|
|
61
63
|
checked: e,
|
|
62
64
|
onCheckedChange: () => {
|
|
63
|
-
|
|
65
|
+
r(!e);
|
|
64
66
|
},
|
|
65
67
|
className: `${e ? "bg-violet-600" : "bg-violet-300"}
|
|
66
68
|
relative ml-2 inline-flex h-[20px] w-[40px] shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75`,
|
|
@@ -145,48 +147,48 @@ const Le = ({ landscape: e = !1 }) => /* @__PURE__ */ t.jsxs(
|
|
|
145
147
|
icon: /* @__PURE__ */ t.jsx(_t, {}),
|
|
146
148
|
width: 1920
|
|
147
149
|
}
|
|
148
|
-
],
|
|
150
|
+
], Ar = ({
|
|
149
151
|
title: e,
|
|
150
|
-
content:
|
|
151
|
-
currentBreakpoint:
|
|
152
|
+
content: r,
|
|
153
|
+
currentBreakpoint: n,
|
|
152
154
|
breakpoint: i,
|
|
153
155
|
width: d,
|
|
154
156
|
icon: s,
|
|
155
157
|
onClick: a
|
|
156
|
-
}) => /* @__PURE__ */ t.jsxs(
|
|
157
|
-
/* @__PURE__ */ t.jsx(
|
|
158
|
+
}) => /* @__PURE__ */ t.jsxs(sr, { children: [
|
|
159
|
+
/* @__PURE__ */ t.jsx(ar, { asChild: !0, children: /* @__PURE__ */ t.jsx(
|
|
158
160
|
le,
|
|
159
161
|
{
|
|
160
162
|
onClick: () => a(d),
|
|
161
163
|
size: "sm",
|
|
162
|
-
variant: i ===
|
|
164
|
+
variant: i === n ? "secondary" : "ghost",
|
|
163
165
|
children: s
|
|
164
166
|
}
|
|
165
167
|
) }),
|
|
166
|
-
/* @__PURE__ */ t.jsx(
|
|
168
|
+
/* @__PURE__ */ t.jsx(ir, { className: "w-52 border-border", children: /* @__PURE__ */ t.jsx("div", { className: "flex justify-between space-x-4", children: /* @__PURE__ */ t.jsxs("div", { className: "space-y-1", children: [
|
|
167
169
|
/* @__PURE__ */ t.jsx("h4", { className: "text-sm font-semibold", children: e }),
|
|
168
|
-
/* @__PURE__ */ t.jsx("p", { className: "text-xs", children:
|
|
170
|
+
/* @__PURE__ */ t.jsx("p", { className: "text-xs", children: r })
|
|
169
171
|
] }) }) })
|
|
170
|
-
] }),
|
|
171
|
-
const [, e,
|
|
172
|
-
|
|
172
|
+
] }), Pr = () => {
|
|
173
|
+
const [, e, r] = _e(), [n, i] = Dt(), d = (s) => {
|
|
174
|
+
n.includes(s) ? n.length > 2 && i(n.filter((a) => a !== s)) : i((a) => [...a, s]);
|
|
173
175
|
};
|
|
174
176
|
return /* @__PURE__ */ t.jsxs("div", { className: "flex items-center rounded-md", children: [
|
|
175
177
|
ie(
|
|
176
|
-
Fe.filter((s) => Me(
|
|
177
|
-
(s) => /* @__PURE__ */ gt(
|
|
178
|
+
Fe.filter((s) => Me(n, ye(s.breakpoint))),
|
|
179
|
+
(s) => /* @__PURE__ */ gt(Ar, { ...s, onClick: r, key: s.breakpoint, currentBreakpoint: e })
|
|
178
180
|
),
|
|
179
181
|
/* @__PURE__ */ t.jsxs(Qt, { children: [
|
|
180
|
-
/* @__PURE__ */ t.jsx(
|
|
181
|
-
/* @__PURE__ */ t.jsxs(
|
|
182
|
-
/* @__PURE__ */ t.jsx(
|
|
183
|
-
/* @__PURE__ */ t.jsx(
|
|
182
|
+
/* @__PURE__ */ t.jsx(er, { asChild: !0, children: /* @__PURE__ */ t.jsx("span", { className: "cursor-pointer px-2.5 hover:opacity-80", children: /* @__PURE__ */ t.jsx(Ct, { className: "scale-90 transform" }) }) }),
|
|
183
|
+
/* @__PURE__ */ t.jsxs(tr, { className: "w-56 border-border text-xs", children: [
|
|
184
|
+
/* @__PURE__ */ t.jsx(rr, { children: "Breakpoints" }),
|
|
185
|
+
/* @__PURE__ */ t.jsx(nr, {}),
|
|
184
186
|
ie(Fe, (s) => /* @__PURE__ */ t.jsx(
|
|
185
|
-
|
|
187
|
+
or,
|
|
186
188
|
{
|
|
187
189
|
disabled: s.breakpoint === "xs",
|
|
188
190
|
onCheckedChange: () => d(ye(s.breakpoint)),
|
|
189
|
-
checked: Me(
|
|
191
|
+
checked: Me(n, ye(s.breakpoint)),
|
|
190
192
|
children: s.title
|
|
191
193
|
},
|
|
192
194
|
s.breakpoint
|
|
@@ -194,50 +196,50 @@ const Le = ({ landscape: e = !1 }) => /* @__PURE__ */ t.jsxs(
|
|
|
194
196
|
] })
|
|
195
197
|
] })
|
|
196
198
|
] });
|
|
197
|
-
},
|
|
198
|
-
const [e] = Bt(), { createSnapshot:
|
|
199
|
-
e([]),
|
|
200
|
-
}, [e,
|
|
201
|
-
return /* @__PURE__ */ t.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ t.jsxs(
|
|
202
|
-
/* @__PURE__ */ t.jsx(
|
|
199
|
+
}, Ir = () => {
|
|
200
|
+
const [e] = Bt(), { createSnapshot: r } = ke(), [, n] = X(), [, i] = Z(), d = Q(() => {
|
|
201
|
+
e([]), n([]), i([]), r();
|
|
202
|
+
}, [e, r]);
|
|
203
|
+
return /* @__PURE__ */ t.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ t.jsxs(lr, { children: [
|
|
204
|
+
/* @__PURE__ */ t.jsx(dr, { asChild: !0, children: /* @__PURE__ */ t.jsxs(le, { size: "sm", variant: "ghost", className: "flex items-center gap-x-1", children: [
|
|
203
205
|
/* @__PURE__ */ t.jsx(Rt, {}),
|
|
204
206
|
" Clear"
|
|
205
207
|
] }) }),
|
|
206
|
-
/* @__PURE__ */ t.jsxs(
|
|
207
|
-
/* @__PURE__ */ t.jsxs(
|
|
208
|
-
/* @__PURE__ */ t.jsx(
|
|
209
|
-
/* @__PURE__ */ t.jsx(
|
|
208
|
+
/* @__PURE__ */ t.jsxs(ur, { className: "border-border", children: [
|
|
209
|
+
/* @__PURE__ */ t.jsxs(fr, { children: [
|
|
210
|
+
/* @__PURE__ */ t.jsx(pr, { children: "Clear whole canvas?" }),
|
|
211
|
+
/* @__PURE__ */ t.jsx(hr, { children: "Are you sure you want to clear the whole canvas?" })
|
|
210
212
|
] }),
|
|
211
|
-
/* @__PURE__ */ t.jsxs(
|
|
212
|
-
/* @__PURE__ */ t.jsx(
|
|
213
|
-
/* @__PURE__ */ t.jsx(
|
|
213
|
+
/* @__PURE__ */ t.jsxs(mr, { children: [
|
|
214
|
+
/* @__PURE__ */ t.jsx(yr, { children: "Cancel" }),
|
|
215
|
+
/* @__PURE__ */ t.jsx(vr, { onClick: d, children: "Yes" })
|
|
214
216
|
] })
|
|
215
217
|
] })
|
|
216
218
|
] }) });
|
|
217
|
-
},
|
|
218
|
-
const e = $t("darkMode", !1), [
|
|
219
|
+
}, Or = () => {
|
|
220
|
+
const e = $t("darkMode", !1), [r] = rt();
|
|
219
221
|
return /* @__PURE__ */ t.jsxs("div", { className: "flex h-10 items-center justify-between border-b bg-background/70 px-2", children: [
|
|
220
222
|
/* @__PURE__ */ t.jsxs("div", { className: "flex h-full space-x-2", children: [
|
|
221
223
|
e ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
222
|
-
/* @__PURE__ */ t.jsx(
|
|
224
|
+
/* @__PURE__ */ t.jsx(Rr, {}),
|
|
223
225
|
/* @__PURE__ */ t.jsx(se, { orientation: "vertical" })
|
|
224
226
|
] }) : null,
|
|
225
|
-
/* @__PURE__ */ t.jsx(
|
|
227
|
+
/* @__PURE__ */ t.jsx(Pr, {}),
|
|
226
228
|
/* @__PURE__ */ t.jsx(se, { orientation: "vertical" }),
|
|
227
229
|
/* @__PURE__ */ t.jsxs("div", { className: "flex w-12 items-center justify-center gap-x-1 space-x-0 font-medium", children: [
|
|
228
230
|
/* @__PURE__ */ t.jsx(At, { className: "h-3.5 w-3.5 flex-shrink-0" }),
|
|
229
231
|
" ",
|
|
230
232
|
/* @__PURE__ */ t.jsxs("div", { className: "text-xs leading-3", children: [
|
|
231
|
-
St(
|
|
233
|
+
St(r, 0),
|
|
232
234
|
"%"
|
|
233
235
|
] })
|
|
234
236
|
] }),
|
|
235
237
|
/* @__PURE__ */ t.jsx(se, { orientation: "vertical" }),
|
|
236
|
-
/* @__PURE__ */ t.jsx(
|
|
238
|
+
/* @__PURE__ */ t.jsx(_r, {})
|
|
237
239
|
] }),
|
|
238
240
|
/* @__PURE__ */ t.jsxs("div", { className: "flex h-full items-center space-x-2", children: [
|
|
239
241
|
/* @__PURE__ */ t.jsx(se, { orientation: "vertical" }),
|
|
240
|
-
/* @__PURE__ */ t.jsx(
|
|
242
|
+
/* @__PURE__ */ t.jsx(Ir, {})
|
|
241
243
|
] })
|
|
242
244
|
] });
|
|
243
245
|
}, ve = {
|
|
@@ -246,7 +248,7 @@ const Le = ({ landscape: e = !1 }) => /* @__PURE__ */ t.jsxs(
|
|
|
246
248
|
EMAIL: "EMAIL",
|
|
247
249
|
PRESENTATION: "PRESENTATION",
|
|
248
250
|
GRAPHIC: "GRAPHIC"
|
|
249
|
-
},
|
|
251
|
+
}, Mr = `<!doctype html>
|
|
250
252
|
<html class="scroll-smooth h-full overflow-y-auto">
|
|
251
253
|
<head>
|
|
252
254
|
<meta charset="UTF-8">
|
|
@@ -280,24 +282,24 @@ const Le = ({ landscape: e = !1 }) => /* @__PURE__ */ t.jsxs(
|
|
|
280
282
|
<body class="font-body antialiased h-full">
|
|
281
283
|
<div class="frame-root"></div>
|
|
282
284
|
</body>
|
|
283
|
-
</html>`,
|
|
284
|
-
const [
|
|
285
|
+
</html>`, Dr = (e) => {
|
|
286
|
+
const [r] = _e(), [, n] = rt(), [i, d] = H({}), s = Q(() => {
|
|
285
287
|
const { width: a, height: f } = e;
|
|
286
|
-
if (a <
|
|
287
|
-
const y = parseFloat((a /
|
|
288
|
+
if (a < r) {
|
|
289
|
+
const y = parseFloat((a / r).toString());
|
|
288
290
|
let p = {};
|
|
289
291
|
f && (p = { height: f + 2 * f * (1 - y) }), d({
|
|
290
292
|
transform: `scale(${y})`,
|
|
291
293
|
transformOrigin: "top left",
|
|
292
294
|
...p,
|
|
293
295
|
maxWidth: "none"
|
|
294
|
-
}),
|
|
296
|
+
}), n(y * 100);
|
|
295
297
|
} else
|
|
296
|
-
d({}),
|
|
297
|
-
}, [
|
|
298
|
+
d({}), n(100);
|
|
299
|
+
}, [r, e, n]);
|
|
298
300
|
return F(() => {
|
|
299
301
|
s();
|
|
300
|
-
}, [
|
|
302
|
+
}, [r, e, n, s]), i;
|
|
301
303
|
};
|
|
302
304
|
var Te = { exports: {} }, ae = { exports: {} }, A = {};
|
|
303
305
|
/** @license React v16.13.1
|
|
@@ -309,16 +311,16 @@ var Te = { exports: {} }, ae = { exports: {} }, A = {};
|
|
|
309
311
|
* LICENSE file in the root directory of this source tree.
|
|
310
312
|
*/
|
|
311
313
|
var We;
|
|
312
|
-
function
|
|
314
|
+
function Br() {
|
|
313
315
|
if (We)
|
|
314
316
|
return A;
|
|
315
317
|
We = 1;
|
|
316
|
-
var e = typeof Symbol == "function" && Symbol.for,
|
|
318
|
+
var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, i = e ? Symbol.for("react.fragment") : 60107, d = e ? Symbol.for("react.strict_mode") : 60108, s = e ? Symbol.for("react.profiler") : 60114, a = e ? Symbol.for("react.provider") : 60109, f = e ? Symbol.for("react.context") : 60110, y = e ? Symbol.for("react.async_mode") : 60111, p = e ? Symbol.for("react.concurrent_mode") : 60111, m = e ? Symbol.for("react.forward_ref") : 60112, h = e ? Symbol.for("react.suspense") : 60113, b = e ? Symbol.for("react.suspense_list") : 60120, v = e ? Symbol.for("react.memo") : 60115, O = e ? Symbol.for("react.lazy") : 60116, E = e ? Symbol.for("react.block") : 60121, C = e ? Symbol.for("react.fundamental") : 60117, g = e ? Symbol.for("react.responder") : 60118, U = e ? Symbol.for("react.scope") : 60119;
|
|
317
319
|
function M(l) {
|
|
318
320
|
if (typeof l == "object" && l !== null) {
|
|
319
321
|
var D = l.$$typeof;
|
|
320
322
|
switch (D) {
|
|
321
|
-
case
|
|
323
|
+
case r:
|
|
322
324
|
switch (l = l.type, l) {
|
|
323
325
|
case y:
|
|
324
326
|
case p:
|
|
@@ -339,7 +341,7 @@ function $n() {
|
|
|
339
341
|
return D;
|
|
340
342
|
}
|
|
341
343
|
}
|
|
342
|
-
case
|
|
344
|
+
case n:
|
|
343
345
|
return D;
|
|
344
346
|
}
|
|
345
347
|
}
|
|
@@ -347,14 +349,14 @@ function $n() {
|
|
|
347
349
|
function B(l) {
|
|
348
350
|
return M(l) === p;
|
|
349
351
|
}
|
|
350
|
-
return A.AsyncMode = y, A.ConcurrentMode = p, A.ContextConsumer = f, A.ContextProvider = a, A.Element =
|
|
352
|
+
return A.AsyncMode = y, A.ConcurrentMode = p, A.ContextConsumer = f, A.ContextProvider = a, A.Element = r, A.ForwardRef = m, A.Fragment = i, A.Lazy = O, A.Memo = v, A.Portal = n, A.Profiler = s, A.StrictMode = d, A.Suspense = h, A.isAsyncMode = function(l) {
|
|
351
353
|
return B(l) || M(l) === y;
|
|
352
354
|
}, A.isConcurrentMode = B, A.isContextConsumer = function(l) {
|
|
353
355
|
return M(l) === f;
|
|
354
356
|
}, A.isContextProvider = function(l) {
|
|
355
357
|
return M(l) === a;
|
|
356
358
|
}, A.isElement = function(l) {
|
|
357
|
-
return typeof l == "object" && l !== null && l.$$typeof ===
|
|
359
|
+
return typeof l == "object" && l !== null && l.$$typeof === r;
|
|
358
360
|
}, A.isForwardRef = function(l) {
|
|
359
361
|
return M(l) === m;
|
|
360
362
|
}, A.isFragment = function(l) {
|
|
@@ -364,7 +366,7 @@ function $n() {
|
|
|
364
366
|
}, A.isMemo = function(l) {
|
|
365
367
|
return M(l) === v;
|
|
366
368
|
}, A.isPortal = function(l) {
|
|
367
|
-
return M(l) ===
|
|
369
|
+
return M(l) === n;
|
|
368
370
|
}, A.isProfiler = function(l) {
|
|
369
371
|
return M(l) === s;
|
|
370
372
|
}, A.isStrictMode = function(l) {
|
|
@@ -385,9 +387,9 @@ var P = {};
|
|
|
385
387
|
* LICENSE file in the root directory of this source tree.
|
|
386
388
|
*/
|
|
387
389
|
var qe;
|
|
388
|
-
function
|
|
390
|
+
function $r() {
|
|
389
391
|
return qe || (qe = 1, process.env.NODE_ENV !== "production" && function() {
|
|
390
|
-
var e = typeof Symbol == "function" && Symbol.for,
|
|
392
|
+
var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, i = e ? Symbol.for("react.fragment") : 60107, d = e ? Symbol.for("react.strict_mode") : 60108, s = e ? Symbol.for("react.profiler") : 60114, a = e ? Symbol.for("react.provider") : 60109, f = e ? Symbol.for("react.context") : 60110, y = e ? Symbol.for("react.async_mode") : 60111, p = e ? Symbol.for("react.concurrent_mode") : 60111, m = e ? Symbol.for("react.forward_ref") : 60112, h = e ? Symbol.for("react.suspense") : 60113, b = e ? Symbol.for("react.suspense_list") : 60120, v = e ? Symbol.for("react.memo") : 60115, O = e ? Symbol.for("react.lazy") : 60116, E = e ? Symbol.for("react.block") : 60121, C = e ? Symbol.for("react.fundamental") : 60117, g = e ? Symbol.for("react.responder") : 60118, U = e ? Symbol.for("react.scope") : 60119;
|
|
391
393
|
function M(c) {
|
|
392
394
|
return typeof c == "string" || typeof c == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
393
395
|
c === i || c === p || c === s || c === d || c === h || c === b || typeof c == "object" && c !== null && (c.$$typeof === O || c.$$typeof === v || c.$$typeof === a || c.$$typeof === f || c.$$typeof === m || c.$$typeof === C || c.$$typeof === g || c.$$typeof === U || c.$$typeof === E);
|
|
@@ -396,7 +398,7 @@ function Nn() {
|
|
|
396
398
|
if (typeof c == "object" && c !== null) {
|
|
397
399
|
var z = c.$$typeof;
|
|
398
400
|
switch (z) {
|
|
399
|
-
case
|
|
401
|
+
case r:
|
|
400
402
|
var oe = c.type;
|
|
401
403
|
switch (oe) {
|
|
402
404
|
case y:
|
|
@@ -419,14 +421,14 @@ function Nn() {
|
|
|
419
421
|
return z;
|
|
420
422
|
}
|
|
421
423
|
}
|
|
422
|
-
case
|
|
424
|
+
case n:
|
|
423
425
|
return z;
|
|
424
426
|
}
|
|
425
427
|
}
|
|
426
428
|
}
|
|
427
|
-
var l = y, D = p, W = f, q = a, de =
|
|
429
|
+
var l = y, D = p, W = f, q = a, de = r, ue = m, re = i, fe = O, pe = v, J = n, he = s, Y = d, K = h, ne = !1;
|
|
428
430
|
function me(c) {
|
|
429
|
-
return
|
|
431
|
+
return ne || (ne = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), o(c) || B(c) === y;
|
|
430
432
|
}
|
|
431
433
|
function o(c) {
|
|
432
434
|
return B(c) === p;
|
|
@@ -438,7 +440,7 @@ function Nn() {
|
|
|
438
440
|
return B(c) === a;
|
|
439
441
|
}
|
|
440
442
|
function S(c) {
|
|
441
|
-
return typeof c == "object" && c !== null && c.$$typeof ===
|
|
443
|
+
return typeof c == "object" && c !== null && c.$$typeof === r;
|
|
442
444
|
}
|
|
443
445
|
function x(c) {
|
|
444
446
|
return B(c) === m;
|
|
@@ -453,7 +455,7 @@ function Nn() {
|
|
|
453
455
|
return B(c) === v;
|
|
454
456
|
}
|
|
455
457
|
function _(c) {
|
|
456
|
-
return B(c) ===
|
|
458
|
+
return B(c) === n;
|
|
457
459
|
}
|
|
458
460
|
function I(c) {
|
|
459
461
|
return B(c) === s;
|
|
@@ -464,12 +466,12 @@ function Nn() {
|
|
|
464
466
|
function N(c) {
|
|
465
467
|
return B(c) === h;
|
|
466
468
|
}
|
|
467
|
-
P.AsyncMode = l, P.ConcurrentMode = D, P.ContextConsumer = W, P.ContextProvider = q, P.Element = de, P.ForwardRef = ue, P.Fragment =
|
|
469
|
+
P.AsyncMode = l, P.ConcurrentMode = D, P.ContextConsumer = W, P.ContextProvider = q, P.Element = de, P.ForwardRef = ue, P.Fragment = re, P.Lazy = fe, P.Memo = pe, P.Portal = J, P.Profiler = he, P.StrictMode = Y, P.Suspense = K, P.isAsyncMode = me, P.isConcurrentMode = o, P.isContextConsumer = u, P.isContextProvider = j, P.isElement = S, P.isForwardRef = x, P.isFragment = k, P.isLazy = w, P.isMemo = T, P.isPortal = _, P.isProfiler = I, P.isStrictMode = R, P.isSuspense = N, P.isValidElementType = M, P.typeOf = B;
|
|
468
470
|
}()), P;
|
|
469
471
|
}
|
|
470
472
|
var Ue;
|
|
471
473
|
function lt() {
|
|
472
|
-
return Ue || (Ue = 1, process.env.NODE_ENV === "production" ? ae.exports =
|
|
474
|
+
return Ue || (Ue = 1, process.env.NODE_ENV === "production" ? ae.exports = Br() : ae.exports = $r()), ae.exports;
|
|
473
475
|
}
|
|
474
476
|
/*
|
|
475
477
|
object-assign
|
|
@@ -477,11 +479,11 @@ object-assign
|
|
|
477
479
|
@license MIT
|
|
478
480
|
*/
|
|
479
481
|
var ge, Ye;
|
|
480
|
-
function
|
|
482
|
+
function Nr() {
|
|
481
483
|
if (Ye)
|
|
482
484
|
return ge;
|
|
483
485
|
Ye = 1;
|
|
484
|
-
var e = Object.getOwnPropertySymbols,
|
|
486
|
+
var e = Object.getOwnPropertySymbols, r = Object.prototype.hasOwnProperty, n = Object.prototype.propertyIsEnumerable;
|
|
485
487
|
function i(s) {
|
|
486
488
|
if (s == null)
|
|
487
489
|
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
@@ -513,11 +515,11 @@ function Ln() {
|
|
|
513
515
|
for (var f, y = i(s), p, m = 1; m < arguments.length; m++) {
|
|
514
516
|
f = Object(arguments[m]);
|
|
515
517
|
for (var h in f)
|
|
516
|
-
|
|
518
|
+
r.call(f, h) && (y[h] = f[h]);
|
|
517
519
|
if (e) {
|
|
518
520
|
p = e(f);
|
|
519
521
|
for (var b = 0; b < p.length; b++)
|
|
520
|
-
|
|
522
|
+
n.call(f, p[b]) && (y[p[b]] = f[p[b]]);
|
|
521
523
|
}
|
|
522
524
|
}
|
|
523
525
|
return y;
|
|
@@ -536,14 +538,14 @@ function dt() {
|
|
|
536
538
|
return He || (He = 1, be = Function.call.bind(Object.prototype.hasOwnProperty)), be;
|
|
537
539
|
}
|
|
538
540
|
var we, Ke;
|
|
539
|
-
function
|
|
541
|
+
function Lr() {
|
|
540
542
|
if (Ke)
|
|
541
543
|
return we;
|
|
542
544
|
Ke = 1;
|
|
543
545
|
var e = function() {
|
|
544
546
|
};
|
|
545
547
|
if (process.env.NODE_ENV !== "production") {
|
|
546
|
-
var
|
|
548
|
+
var r = Ae(), n = {}, i = dt();
|
|
547
549
|
e = function(s) {
|
|
548
550
|
var a = "Warning: " + s;
|
|
549
551
|
typeof console < "u" && console.error(a);
|
|
@@ -565,14 +567,14 @@ function Fn() {
|
|
|
565
567
|
);
|
|
566
568
|
throw b.name = "Invariant Violation", b;
|
|
567
569
|
}
|
|
568
|
-
h = s[m](a, m, y, f, null,
|
|
570
|
+
h = s[m](a, m, y, f, null, r);
|
|
569
571
|
} catch (O) {
|
|
570
572
|
h = O;
|
|
571
573
|
}
|
|
572
574
|
if (h && !(h instanceof Error) && e(
|
|
573
575
|
(y || "React class") + ": type specification of " + f + " `" + m + "` 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)."
|
|
574
|
-
), h instanceof Error && !(h.message in
|
|
575
|
-
|
|
576
|
+
), h instanceof Error && !(h.message in n)) {
|
|
577
|
+
n[h.message] = !0;
|
|
576
578
|
var v = p ? p() : "";
|
|
577
579
|
e(
|
|
578
580
|
"Failed " + f + " type: " + h.message + (v ?? "")
|
|
@@ -582,15 +584,15 @@ function Fn() {
|
|
|
582
584
|
}
|
|
583
585
|
}
|
|
584
586
|
return d.resetWarningCache = function() {
|
|
585
|
-
process.env.NODE_ENV !== "production" && (
|
|
587
|
+
process.env.NODE_ENV !== "production" && (n = {});
|
|
586
588
|
}, we = d, we;
|
|
587
589
|
}
|
|
588
590
|
var Ee, Ve;
|
|
589
|
-
function
|
|
591
|
+
function Fr() {
|
|
590
592
|
if (Ve)
|
|
591
593
|
return Ee;
|
|
592
594
|
Ve = 1;
|
|
593
|
-
var e = lt(),
|
|
595
|
+
var e = lt(), r = Nr(), n = Ae(), i = dt(), d = Lr(), s = function() {
|
|
594
596
|
};
|
|
595
597
|
process.env.NODE_ENV !== "production" && (s = function(f) {
|
|
596
598
|
var y = "Warning: " + f;
|
|
@@ -642,7 +644,7 @@ function Wn() {
|
|
|
642
644
|
if (process.env.NODE_ENV !== "production")
|
|
643
645
|
var u = {}, j = 0;
|
|
644
646
|
function S(k, w, T, _, I, R, N) {
|
|
645
|
-
if (_ = _ || b, R = R || T, N !==
|
|
647
|
+
if (_ = _ || b, R = R || T, N !== n) {
|
|
646
648
|
if (y) {
|
|
647
649
|
var c = new Error(
|
|
648
650
|
"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"
|
|
@@ -688,7 +690,7 @@ function Wn() {
|
|
|
688
690
|
return new E("Invalid " + k + " `" + w + "` of type " + ("`" + _ + "` supplied to `" + x + "`, expected an array."));
|
|
689
691
|
}
|
|
690
692
|
for (var I = 0; I < T.length; I++) {
|
|
691
|
-
var R = o(T, I, x, k, w + "[" + I + "]",
|
|
693
|
+
var R = o(T, I, x, k, w + "[" + I + "]", n);
|
|
692
694
|
if (R instanceof Error)
|
|
693
695
|
return R;
|
|
694
696
|
}
|
|
@@ -754,7 +756,7 @@ function Wn() {
|
|
|
754
756
|
return new E("Invalid " + k + " `" + w + "` of type " + ("`" + _ + "` supplied to `" + x + "`, expected an object."));
|
|
755
757
|
for (var I in T)
|
|
756
758
|
if (i(T, I)) {
|
|
757
|
-
var R = o(T, I, x, k, w + "." + I,
|
|
759
|
+
var R = o(T, I, x, k, w + "." + I, n);
|
|
758
760
|
if (R instanceof Error)
|
|
759
761
|
return R;
|
|
760
762
|
}
|
|
@@ -769,12 +771,12 @@ function Wn() {
|
|
|
769
771
|
var j = o[u];
|
|
770
772
|
if (typeof j != "function")
|
|
771
773
|
return s(
|
|
772
|
-
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " +
|
|
774
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ne(j) + " at index " + u + "."
|
|
773
775
|
), a;
|
|
774
776
|
}
|
|
775
777
|
function S(x, k, w, T, _) {
|
|
776
778
|
for (var I = [], R = 0; R < o.length; R++) {
|
|
777
|
-
var N = o[R], c = N(x, k, w, T, _,
|
|
779
|
+
var N = o[R], c = N(x, k, w, T, _, n);
|
|
778
780
|
if (c == null)
|
|
779
781
|
return null;
|
|
780
782
|
c.data && i(c.data, "expectedType") && I.push(c.data.expectedType);
|
|
@@ -790,7 +792,7 @@ function Wn() {
|
|
|
790
792
|
}
|
|
791
793
|
return C(o);
|
|
792
794
|
}
|
|
793
|
-
function
|
|
795
|
+
function re(o, u, j, S, x) {
|
|
794
796
|
return new E(
|
|
795
797
|
(o || "React class") + ": " + u + " type `" + j + "." + S + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + x + "`."
|
|
796
798
|
);
|
|
@@ -803,8 +805,8 @@ function Wn() {
|
|
|
803
805
|
for (var I in o) {
|
|
804
806
|
var R = o[I];
|
|
805
807
|
if (typeof R != "function")
|
|
806
|
-
return
|
|
807
|
-
var N = R(T, I, x, k, w + "." + I,
|
|
808
|
+
return re(x, k, w, I, K(R));
|
|
809
|
+
var N = R(T, I, x, k, w + "." + I, n);
|
|
808
810
|
if (N)
|
|
809
811
|
return N;
|
|
810
812
|
}
|
|
@@ -817,17 +819,17 @@ function Wn() {
|
|
|
817
819
|
var T = j[S], _ = Y(T);
|
|
818
820
|
if (_ !== "object")
|
|
819
821
|
return new E("Invalid " + k + " `" + w + "` of type `" + _ + "` " + ("supplied to `" + x + "`, expected `object`."));
|
|
820
|
-
var I =
|
|
822
|
+
var I = r({}, j[S], o);
|
|
821
823
|
for (var R in I) {
|
|
822
824
|
var N = o[R];
|
|
823
825
|
if (i(o, R) && typeof N != "function")
|
|
824
|
-
return
|
|
826
|
+
return re(x, k, w, R, K(N));
|
|
825
827
|
if (!N)
|
|
826
828
|
return new E(
|
|
827
829
|
"Invalid " + k + " `" + w + "` key `" + R + "` supplied to `" + x + "`.\nBad object: " + JSON.stringify(j[S], null, " ") + `
|
|
828
830
|
Valid keys: ` + JSON.stringify(Object.keys(o), null, " ")
|
|
829
831
|
);
|
|
830
|
-
var c = N(T, R, x, k, w + "." + R,
|
|
832
|
+
var c = N(T, R, x, k, w + "." + R, n);
|
|
831
833
|
if (c)
|
|
832
834
|
return c;
|
|
833
835
|
}
|
|
@@ -887,7 +889,7 @@ Valid keys: ` + JSON.stringify(Object.keys(o), null, " ")
|
|
|
887
889
|
}
|
|
888
890
|
return u;
|
|
889
891
|
}
|
|
890
|
-
function
|
|
892
|
+
function ne(o) {
|
|
891
893
|
var u = K(o);
|
|
892
894
|
switch (u) {
|
|
893
895
|
case "array":
|
|
@@ -908,16 +910,16 @@ Valid keys: ` + JSON.stringify(Object.keys(o), null, " ")
|
|
|
908
910
|
}, Ee;
|
|
909
911
|
}
|
|
910
912
|
var Se, Ge;
|
|
911
|
-
function
|
|
913
|
+
function Wr() {
|
|
912
914
|
if (Ge)
|
|
913
915
|
return Se;
|
|
914
916
|
Ge = 1;
|
|
915
917
|
var e = Ae();
|
|
916
|
-
function n() {
|
|
917
|
-
}
|
|
918
918
|
function r() {
|
|
919
919
|
}
|
|
920
|
-
|
|
920
|
+
function n() {
|
|
921
|
+
}
|
|
922
|
+
return n.resetWarningCache = r, Se = function() {
|
|
921
923
|
function i(a, f, y, p, m, h) {
|
|
922
924
|
if (h !== e) {
|
|
923
925
|
var b = new Error(
|
|
@@ -950,23 +952,23 @@ function qn() {
|
|
|
950
952
|
oneOfType: d,
|
|
951
953
|
shape: d,
|
|
952
954
|
exact: d,
|
|
953
|
-
checkPropTypes:
|
|
954
|
-
resetWarningCache:
|
|
955
|
+
checkPropTypes: n,
|
|
956
|
+
resetWarningCache: r
|
|
955
957
|
};
|
|
956
958
|
return s.PropTypes = s, s;
|
|
957
959
|
}, Se;
|
|
958
960
|
}
|
|
959
961
|
if (process.env.NODE_ENV !== "production") {
|
|
960
|
-
var
|
|
961
|
-
Te.exports =
|
|
962
|
+
var qr = lt(), Ur = !0;
|
|
963
|
+
Te.exports = Fr()(qr.isElement, Ur);
|
|
962
964
|
} else
|
|
963
|
-
Te.exports =
|
|
964
|
-
var
|
|
965
|
-
const L = /* @__PURE__ */
|
|
965
|
+
Te.exports = Wr()();
|
|
966
|
+
var Yr = Te.exports;
|
|
967
|
+
const L = /* @__PURE__ */ kr(Yr);
|
|
966
968
|
let ut, ft;
|
|
967
969
|
typeof document < "u" && (ut = document);
|
|
968
970
|
typeof window < "u" && (ft = window);
|
|
969
|
-
const pt = G.createContext({ document: ut, window: ft }), Pe = () => G.useContext(pt), { Provider:
|
|
971
|
+
const pt = G.createContext({ document: ut, window: ft }), Pe = () => G.useContext(pt), { Provider: zr, Consumer: Qn } = pt;
|
|
970
972
|
class ht extends Xe {
|
|
971
973
|
componentDidMount() {
|
|
972
974
|
this.props.contentDidMount();
|
|
@@ -984,12 +986,12 @@ V(ht, "propTypes", {
|
|
|
984
986
|
contentDidUpdate: L.func.isRequired
|
|
985
987
|
});
|
|
986
988
|
class je extends Xe {
|
|
987
|
-
constructor(
|
|
988
|
-
super(
|
|
989
|
-
V(this, "setRef", (
|
|
990
|
-
this.nodeRef.current =
|
|
989
|
+
constructor(n, i) {
|
|
990
|
+
super(n, i);
|
|
991
|
+
V(this, "setRef", (n) => {
|
|
992
|
+
this.nodeRef.current = n;
|
|
991
993
|
const { forwardedRef: i } = this.props;
|
|
992
|
-
typeof i == "function" ? i(
|
|
994
|
+
typeof i == "function" ? i(n) : i && (i.current = n);
|
|
993
995
|
});
|
|
994
996
|
V(this, "handleLoad", () => {
|
|
995
997
|
clearInterval(this.loadCheck), this.state.iframeLoaded || this.setState({ iframeLoaded: !0 });
|
|
@@ -1011,26 +1013,26 @@ class je extends Xe {
|
|
|
1011
1013
|
return this.nodeRef.current ? this.nodeRef.current.contentDocument : null;
|
|
1012
1014
|
}
|
|
1013
1015
|
getMountTarget() {
|
|
1014
|
-
const
|
|
1015
|
-
return this.props.mountTarget ?
|
|
1016
|
+
const n = this.getDoc();
|
|
1017
|
+
return this.props.mountTarget ? n.querySelector(this.props.mountTarget) : n.body.children[0];
|
|
1016
1018
|
}
|
|
1017
1019
|
renderFrameContents() {
|
|
1018
1020
|
if (!this._isMounted)
|
|
1019
1021
|
return null;
|
|
1020
|
-
const
|
|
1021
|
-
if (!
|
|
1022
|
+
const n = this.getDoc();
|
|
1023
|
+
if (!n)
|
|
1022
1024
|
return null;
|
|
1023
|
-
const i = this.props.contentDidMount, d = this.props.contentDidUpdate, s =
|
|
1025
|
+
const i = this.props.contentDidMount, d = this.props.contentDidUpdate, s = n.defaultView || n.parentView, a = /* @__PURE__ */ t.jsx(ht, { contentDidMount: i, contentDidUpdate: d, children: /* @__PURE__ */ t.jsx(zr, { value: { document: n, window: s }, children: /* @__PURE__ */ t.jsx("div", { className: "frame-content", children: this.props.children }) }) }), f = this.getMountTarget();
|
|
1024
1026
|
return [Ne.createPortal(this.props.head, this.getDoc().head), Ne.createPortal(a, f)];
|
|
1025
1027
|
}
|
|
1026
1028
|
render() {
|
|
1027
|
-
const
|
|
1029
|
+
const n = {
|
|
1028
1030
|
...this.props,
|
|
1029
1031
|
srcDoc: this.props.initialContent,
|
|
1030
1032
|
children: void 0
|
|
1031
1033
|
// The iframe isn't ready so we drop children from props here. #12, #17
|
|
1032
1034
|
};
|
|
1033
|
-
return delete
|
|
1035
|
+
return delete n.head, delete n.initialContent, delete n.mountTarget, delete n.contentDidMount, delete n.contentDidUpdate, delete n.forwardedRef, /* @__PURE__ */ t.jsx("iframe", { ...n, ref: this.setRef, onLoad: this.handleLoad, children: this.state.iframeLoaded && this.renderFrameContents() });
|
|
1034
1036
|
}
|
|
1035
1037
|
}
|
|
1036
1038
|
// React warns when you render directly into the body since browser extensions
|
|
@@ -1057,13 +1059,13 @@ V(je, "propTypes", {
|
|
|
1057
1059
|
},
|
|
1058
1060
|
initialContent: '<!DOCTYPE html><html><head></head><body><div class="frame-root"></div></body></html>'
|
|
1059
1061
|
});
|
|
1060
|
-
const
|
|
1061
|
-
const { document:
|
|
1062
|
+
const Hr = G.forwardRef((e, r) => /* @__PURE__ */ t.jsx(je, { ...e, forwardedRef: r })), Kr = ({ children: e }) => {
|
|
1063
|
+
const { document: r } = Pe(), [n] = X(), [i, d] = Z();
|
|
1062
1064
|
return F(() => {
|
|
1063
1065
|
setTimeout(() => {
|
|
1064
1066
|
if (!ee(i))
|
|
1065
1067
|
return;
|
|
1066
|
-
const s = mt(
|
|
1068
|
+
const s = mt(r, ce(n));
|
|
1067
1069
|
if (s) {
|
|
1068
1070
|
const a = s.getAttribute("data-style-prop");
|
|
1069
1071
|
if (a) {
|
|
@@ -1072,32 +1074,32 @@ const Kn = G.forwardRef((e, n) => /* @__PURE__ */ t.jsx(je, { ...e, forwardedRef
|
|
|
1072
1074
|
}
|
|
1073
1075
|
}
|
|
1074
1076
|
}, 100);
|
|
1075
|
-
}, [
|
|
1076
|
-
}, mt = (e,
|
|
1077
|
-
const { window: e } = Pe(), [
|
|
1078
|
-
C.key === "Enter" && (C.preventDefault(),
|
|
1077
|
+
}, [r, n, d, i]), /* @__PURE__ */ t.jsx("div", { id: "canvas", className: "relative h-screen max-w-full outline-2", children: e });
|
|
1078
|
+
}, mt = (e, r) => e.querySelector(`[data-block-id="${r}"]`), Vr = () => {
|
|
1079
|
+
const { window: e } = Pe(), [r, n] = X(), [, i] = Z(), { undo: d, redo: s } = ke(), a = nt(), [, f] = Nt(), [, y] = Lt(), { pasteBlocks: p } = Ft(), [, m] = ot(), h = st(), { savePage: b } = Wt(), [v] = te(qt), [, O] = te(Ut), E = (C) => {
|
|
1080
|
+
C.key === "Enter" && (C.preventDefault(), r.length === 1 && O(ce(r)));
|
|
1079
1081
|
};
|
|
1080
1082
|
return F(() => {
|
|
1081
1083
|
const C = (g) => {
|
|
1082
1084
|
if (g.key === "Escape") {
|
|
1083
|
-
|
|
1085
|
+
n([]), i([]);
|
|
1084
1086
|
return;
|
|
1085
1087
|
}
|
|
1086
|
-
if (E(g), !v && (g.key === "Delete" || g.key === "Backspace") && (g.preventDefault(), h(
|
|
1088
|
+
if (E(g), !v && (g.key === "Delete" || g.key === "Backspace") && (g.preventDefault(), h(r)), g.ctrlKey || g.metaKey) {
|
|
1087
1089
|
if (["z", "y", "d", "x", "c", "p", "s", "v"].includes(g.key)) {
|
|
1088
1090
|
if (v && ["x", "z", "v"].includes(g.key))
|
|
1089
1091
|
return !0;
|
|
1090
1092
|
g.preventDefault();
|
|
1091
1093
|
}
|
|
1092
|
-
g.key === "s" && (g.stopPropagation(), g.preventDefault(), b()), g.key === "z" && d(), g.key === "y" && s(), g.key === "d" && a(
|
|
1094
|
+
g.key === "s" && (g.stopPropagation(), g.preventDefault(), b()), g.key === "z" && d(), g.key === "y" && s(), g.key === "d" && a(r), g.key === "x" && f(r), g.key === "c" && y(r), g.key === "v" && r.length > 0 && p(r[0]);
|
|
1093
1095
|
}
|
|
1094
1096
|
};
|
|
1095
1097
|
return e.removeEventListener("keydown", C), e.addEventListener("keydown", C), () => {
|
|
1096
1098
|
e.removeEventListener("keydown", C);
|
|
1097
1099
|
};
|
|
1098
1100
|
}, [
|
|
1099
|
-
n,
|
|
1100
1101
|
r,
|
|
1102
|
+
n,
|
|
1101
1103
|
d,
|
|
1102
1104
|
h,
|
|
1103
1105
|
m,
|
|
@@ -1110,8 +1112,8 @@ const Kn = G.forwardRef((e, n) => /* @__PURE__ */ t.jsx(je, { ...e, forwardedRef
|
|
|
1110
1112
|
b,
|
|
1111
1113
|
e
|
|
1112
1114
|
]), null;
|
|
1113
|
-
},
|
|
1114
|
-
const [,
|
|
1115
|
+
}, Gr = ({ block: e, label: r }) => {
|
|
1116
|
+
const [, n] = wr(() => ({
|
|
1115
1117
|
type: "CANVAS_BLOCK",
|
|
1116
1118
|
item: e
|
|
1117
1119
|
}));
|
|
@@ -1119,30 +1121,30 @@ const Kn = G.forwardRef((e, n) => /* @__PURE__ */ t.jsx(je, { ...e, forwardedRef
|
|
|
1119
1121
|
"div",
|
|
1120
1122
|
{
|
|
1121
1123
|
className: "mr-10 flex cursor-grab items-center space-x-1 px-1",
|
|
1122
|
-
ref:
|
|
1124
|
+
ref: n,
|
|
1123
1125
|
onDragStart: () => {
|
|
1124
1126
|
console.log("drag start");
|
|
1125
1127
|
},
|
|
1126
1128
|
children: [
|
|
1127
1129
|
/* @__PURE__ */ t.jsx(Mt, {}),
|
|
1128
|
-
|
|
1130
|
+
r
|
|
1129
1131
|
]
|
|
1130
1132
|
}
|
|
1131
1133
|
);
|
|
1132
|
-
},
|
|
1134
|
+
}, Xr = ({
|
|
1133
1135
|
selectedBlockElement: e,
|
|
1134
|
-
block:
|
|
1136
|
+
block: r
|
|
1135
1137
|
}) => {
|
|
1136
|
-
const
|
|
1138
|
+
const n = st(), i = nt(), [, d] = X(), [, s] = Z(), { floatingStyles: a, refs: f, update: y } = xr({
|
|
1137
1139
|
placement: "top-start",
|
|
1138
|
-
middleware: [
|
|
1140
|
+
middleware: [br(), gr()],
|
|
1139
1141
|
elements: {
|
|
1140
1142
|
reference: e
|
|
1141
1143
|
}
|
|
1142
1144
|
});
|
|
1143
|
-
|
|
1144
|
-
const p = $(
|
|
1145
|
-
return !e || !
|
|
1145
|
+
Er(e, () => y(), e !== null);
|
|
1146
|
+
const p = $(r, "_parent", null), m = ee($(r, "_name", "")) ? $(r, "_type", "") : $(r, "_name", "");
|
|
1147
|
+
return !e || !r ? null : /* @__PURE__ */ t.jsxs(
|
|
1146
1148
|
"div",
|
|
1147
1149
|
{
|
|
1148
1150
|
role: "button",
|
|
@@ -1155,7 +1157,7 @@ const Kn = G.forwardRef((e, n) => /* @__PURE__ */ t.jsx(je, { ...e, forwardedRef
|
|
|
1155
1157
|
onKeyDown: (h) => h.stopPropagation(),
|
|
1156
1158
|
className: "z-50 flex h-6 items-center bg-blue-500 py-2 text-xs text-white",
|
|
1157
1159
|
children: [
|
|
1158
|
-
/* @__PURE__ */ t.jsx(
|
|
1160
|
+
/* @__PURE__ */ t.jsx(Gr, { label: m, block: r }),
|
|
1159
1161
|
/* @__PURE__ */ t.jsxs("div", { className: "flex gap-2 px-1 ", children: [
|
|
1160
1162
|
p && /* @__PURE__ */ t.jsx(
|
|
1161
1163
|
Pt,
|
|
@@ -1166,14 +1168,14 @@ const Kn = G.forwardRef((e, n) => /* @__PURE__ */ t.jsx(je, { ...e, forwardedRef
|
|
|
1166
1168
|
}
|
|
1167
1169
|
}
|
|
1168
1170
|
),
|
|
1169
|
-
Yt($(
|
|
1170
|
-
zt($(
|
|
1171
|
+
Yt($(r, "_type", "")) ? /* @__PURE__ */ t.jsx(It, { className: "hover:scale-105 ", onClick: () => i([r == null ? void 0 : r._id]) }) : null,
|
|
1172
|
+
zt($(r, "_type", "")) ? /* @__PURE__ */ t.jsx(Ot, { className: "hover:scale-105 ", onClick: () => n([r == null ? void 0 : r._id]) }) : null
|
|
1171
1173
|
] })
|
|
1172
1174
|
]
|
|
1173
1175
|
}
|
|
1174
1176
|
);
|
|
1175
|
-
},
|
|
1176
|
-
const [
|
|
1177
|
+
}, Zr = ({ model: e }) => {
|
|
1178
|
+
const [r] = Ht(), [n] = X(), [i] = tt(), [d] = Re(), [s] = Z(), { document: a, window: f } = Pe(), [y] = H(a == null ? void 0 : a.getElementById("highlighted-block")), [p] = H(
|
|
1177
1179
|
a == null ? void 0 : a.getElementById("selected-block")
|
|
1178
1180
|
), [m] = H(
|
|
1179
1181
|
a == null ? void 0 : a.getElementById("selected-styling-block")
|
|
@@ -1181,14 +1183,14 @@ const Kn = G.forwardRef((e, n) => /* @__PURE__ */ t.jsx(je, { ...e, forwardedRef
|
|
|
1181
1183
|
F(() => {
|
|
1182
1184
|
i ? a == null || a.documentElement.classList.add("dark") : a == null || a.documentElement.classList.remove("dark");
|
|
1183
1185
|
}, [i, a]);
|
|
1184
|
-
const h = $(
|
|
1186
|
+
const h = $(r, "_headingFont", "DM Sans"), b = $(r, "_bodyFont", "DM Sans");
|
|
1185
1187
|
return F(() => {
|
|
1186
|
-
const v = $(
|
|
1188
|
+
const v = $(r, "_primaryColor", "#000"), O = $(r, "_secondaryColor", "#FFF"), E = Sr({
|
|
1187
1189
|
colors: [v, O],
|
|
1188
1190
|
names: ["primary", "secondary"]
|
|
1189
1191
|
});
|
|
1190
1192
|
E.primary.DEFAULT = v, E.secondary.DEFAULT = O;
|
|
1191
|
-
const C = $(
|
|
1193
|
+
const C = $(r, "_roundedCorners", "0");
|
|
1192
1194
|
!f || !f.tailwind || (f.tailwind.config = {
|
|
1193
1195
|
darkMode: "class",
|
|
1194
1196
|
theme: {
|
|
@@ -1217,22 +1219,22 @@ const Kn = G.forwardRef((e, n) => /* @__PURE__ */ t.jsx(je, { ...e, forwardedRef
|
|
|
1217
1219
|
})
|
|
1218
1220
|
]
|
|
1219
1221
|
});
|
|
1220
|
-
}, [
|
|
1221
|
-
p && (p.textContent = `${ie(
|
|
1222
|
-
outline: 1px solid ${
|
|
1222
|
+
}, [r, f, h, b]), F(() => {
|
|
1223
|
+
p && (p.textContent = `${ie(n, (v) => `[data-block-id="${v}"]`).join(",")}{
|
|
1224
|
+
outline: 1px solid ${n.length === 1 ? "#42a1fc" : "orange"} !important; outline-offset: -1px;
|
|
1223
1225
|
}`);
|
|
1224
|
-
}, [
|
|
1226
|
+
}, [n, p]), F(() => {
|
|
1225
1227
|
y && (y.textContent = d ? `[data-style-id="${d}"]{ outline: 1px solid orange !important; outline-offset: -1px;}` : "");
|
|
1226
|
-
}, [d,
|
|
1228
|
+
}, [d, n, y]), F(() => {
|
|
1227
1229
|
m && (m.textContent = `${ie(s, ({ id: v }) => `[data-style-id="${v}"]`).join(",")}{
|
|
1228
1230
|
outline: 1px solid orange !important; outline-offset: -1px;
|
|
1229
1231
|
}`);
|
|
1230
1232
|
}, [s, m]), F(() => {
|
|
1231
1233
|
if (e === "section")
|
|
1232
1234
|
return;
|
|
1233
|
-
const v = $(
|
|
1235
|
+
const v = $(r, "_bodyTextLightColor", "#64748b"), O = $(r, "_bodyTextDarkColor", "#94a3b8"), E = $(r, "_bodyBgLightColor", "#FFFFFF"), C = $(r, "_bodyBgDarkColor", "#0f172a");
|
|
1234
1236
|
a.body.className = `font-body antialiased text-[${v}] bg-[${E}] dark:text-[${O}] dark:bg-[${C}]`;
|
|
1235
|
-
}, [
|
|
1237
|
+
}, [r, a, e]), e === "page" ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1236
1238
|
h && /* @__PURE__ */ t.jsx(
|
|
1237
1239
|
"link",
|
|
1238
1240
|
{
|
|
@@ -1261,52 +1263,52 @@ const Kn = G.forwardRef((e, n) => /* @__PURE__ */ t.jsx(je, { ...e, forwardedRef
|
|
|
1261
1263
|
),
|
|
1262
1264
|
h && /* @__PURE__ */ t.jsx("style", { children: `h1,h2,h3,h4,h5,h6{font-family: "${h}",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";}` })
|
|
1263
1265
|
] }) : null;
|
|
1264
|
-
},
|
|
1266
|
+
}, Jr = () => {
|
|
1265
1267
|
const { t: e } = it();
|
|
1266
1268
|
return /* @__PURE__ */ t.jsx("div", { className: "my-auto py-24 text-center text-gray-600 dark:text-white", children: /* @__PURE__ */ t.jsx("h1", { className: "mb-10 text-4xl ", children: e("canvas_empty") }) });
|
|
1267
|
-
},
|
|
1268
|
-
const
|
|
1269
|
-
return Object.keys(e).forEach((
|
|
1270
|
-
Je(e[
|
|
1271
|
-
}),
|
|
1272
|
-
},
|
|
1273
|
-
const
|
|
1274
|
-
return
|
|
1269
|
+
}, Qr = (e) => {
|
|
1270
|
+
const r = {};
|
|
1271
|
+
return Object.keys(e).forEach((n) => {
|
|
1272
|
+
Je(e[n]) && e[n].startsWith($e) && (r[n] = e[n].replace($e, "").split(","));
|
|
1273
|
+
}), r;
|
|
1274
|
+
}, en = Tt((e) => {
|
|
1275
|
+
const r = e.replace(ct, "").split(",");
|
|
1276
|
+
return jr(r[0], r[1]);
|
|
1275
1277
|
});
|
|
1276
|
-
function
|
|
1277
|
-
return $(e, `${
|
|
1278
|
+
function tn(e, r) {
|
|
1279
|
+
return $(e, `${r}_attrs`, {});
|
|
1278
1280
|
}
|
|
1279
|
-
function
|
|
1281
|
+
function rn(e, r, n, i) {
|
|
1280
1282
|
const d = {};
|
|
1281
1283
|
return Object.keys(e).forEach((s) => {
|
|
1282
1284
|
if (Je(e[s]) && e[s].startsWith(ct)) {
|
|
1283
|
-
const a =
|
|
1285
|
+
const a = en(e[s]);
|
|
1284
1286
|
d[s] = {
|
|
1285
1287
|
className: a,
|
|
1286
1288
|
"data-style-prop": s,
|
|
1287
1289
|
"data-block-parent": e._id,
|
|
1288
1290
|
"data-style-id": `${s}-${e._id}`,
|
|
1289
|
-
onMouseEnter:
|
|
1290
|
-
onMouseLeave:
|
|
1291
|
+
onMouseEnter: r,
|
|
1292
|
+
onMouseLeave: n,
|
|
1291
1293
|
onClick: i,
|
|
1292
|
-
...
|
|
1294
|
+
...tn(e, s)
|
|
1293
1295
|
};
|
|
1294
1296
|
}
|
|
1295
1297
|
}), d;
|
|
1296
1298
|
}
|
|
1297
1299
|
function Ce({ blocks: e }) {
|
|
1298
|
-
const
|
|
1300
|
+
const r = at(), [, n] = Re(), [, i] = Z(), [, d] = X(), s = Q(
|
|
1299
1301
|
(p) => {
|
|
1300
1302
|
var h;
|
|
1301
1303
|
const m = (h = p.currentTarget) == null ? void 0 : h.getAttribute("data-style-id");
|
|
1302
|
-
|
|
1304
|
+
n(m || ""), p.stopPropagation();
|
|
1303
1305
|
},
|
|
1304
|
-
[
|
|
1306
|
+
[n]
|
|
1305
1307
|
), a = Q(
|
|
1306
1308
|
(p) => {
|
|
1307
|
-
|
|
1309
|
+
n(""), p.stopPropagation();
|
|
1308
1310
|
},
|
|
1309
|
-
[
|
|
1311
|
+
[n]
|
|
1310
1312
|
), f = Q(
|
|
1311
1313
|
(p) => {
|
|
1312
1314
|
p.stopPropagation();
|
|
@@ -1321,20 +1323,20 @@ function Ce({ blocks: e }) {
|
|
|
1321
1323
|
},
|
|
1322
1324
|
[i, d]
|
|
1323
1325
|
), y = Q(
|
|
1324
|
-
(p) =>
|
|
1326
|
+
(p) => rn(p, s, a, f),
|
|
1325
1327
|
[s, a]
|
|
1326
1328
|
);
|
|
1327
1329
|
return /* @__PURE__ */ t.jsx(t.Fragment, { children: G.Children.toArray(
|
|
1328
1330
|
e.map((p, m) => {
|
|
1329
|
-
const h =
|
|
1331
|
+
const h = Qr(p), b = {};
|
|
1330
1332
|
ee(h) || Object.keys(h).forEach((C) => {
|
|
1331
1333
|
b[C] = G.Children.toArray(
|
|
1332
|
-
h[C].map((g) => /* @__PURE__ */ t.jsx(Ce, { blocks: [jt(
|
|
1334
|
+
h[C].map((g) => /* @__PURE__ */ t.jsx(Ce, { blocks: [jt(r, { _id: g })] }))
|
|
1333
1335
|
);
|
|
1334
1336
|
});
|
|
1335
|
-
const v = Ze(
|
|
1337
|
+
const v = Ze(r, { _parent: p._id });
|
|
1336
1338
|
b.children = v.length ? /* @__PURE__ */ t.jsx(Ce, { blocks: v }) : null;
|
|
1337
|
-
const O =
|
|
1339
|
+
const O = Cr(p._type), E = (O == null ? void 0 : O.component) || null;
|
|
1338
1340
|
return G.createElement(E, {
|
|
1339
1341
|
blockProps: {
|
|
1340
1342
|
onClick: f,
|
|
@@ -1350,15 +1352,15 @@ function Ce({ blocks: e }) {
|
|
|
1350
1352
|
})
|
|
1351
1353
|
) });
|
|
1352
1354
|
}
|
|
1353
|
-
const
|
|
1355
|
+
const nn = () => {
|
|
1354
1356
|
const e = at();
|
|
1355
|
-
return /* @__PURE__ */ t.jsx(
|
|
1356
|
-
},
|
|
1357
|
-
const [e] = te(Kt), [
|
|
1357
|
+
return /* @__PURE__ */ t.jsx(Tr, { children: e.length ? /* @__PURE__ */ t.jsx(Ce, { blocks: Ze(e, (r) => ee(r._parent)) }) : /* @__PURE__ */ t.jsx(Jr, {}) });
|
|
1358
|
+
}, on = (e, r) => e.querySelector(`[data-style-id="${r}"]`), sn = () => {
|
|
1359
|
+
const [e] = te(Kt), [r] = ot(), [n] = _e(), [, i] = X(), d = Vt(), [, s] = Re(), a = Oe(null), f = Oe(null), [y, p] = H({ width: 0, height: 0 }), m = Dr(y), [h, b] = H(0), [v, O] = H([]), [, E] = H([]), [, C] = te(Gt), [g, U] = Z(), M = Qe("loadingCanvas", !1);
|
|
1358
1360
|
F(() => {
|
|
1359
1361
|
const { clientWidth: D, clientHeight: W } = f.current;
|
|
1360
1362
|
p({ width: D, height: W }), h === 0 && b(D);
|
|
1361
|
-
}, [f,
|
|
1363
|
+
}, [f, n, h]);
|
|
1362
1364
|
const B = (D, W = 0) => {
|
|
1363
1365
|
const { top: q } = D.getBoundingClientRect();
|
|
1364
1366
|
return q + W >= 0 && q - W <= window.innerHeight;
|
|
@@ -1371,7 +1373,7 @@ const or = () => {
|
|
|
1371
1373
|
}
|
|
1372
1374
|
}, [d]), F(() => {
|
|
1373
1375
|
if (!ee(g) && a.current) {
|
|
1374
|
-
const D =
|
|
1376
|
+
const D = on(
|
|
1375
1377
|
a.current.contentDocument,
|
|
1376
1378
|
ce(g).id
|
|
1377
1379
|
);
|
|
@@ -1380,7 +1382,7 @@ const or = () => {
|
|
|
1380
1382
|
E([null]);
|
|
1381
1383
|
}, [g]);
|
|
1382
1384
|
const l = bt(() => {
|
|
1383
|
-
let D =
|
|
1385
|
+
let D = Mr;
|
|
1384
1386
|
return e === "offline" && (D = D.replace(
|
|
1385
1387
|
"https://cdn.tailwindcss.com?plugins=forms,typography,aspect-ratio",
|
|
1386
1388
|
"/offline/tailwind.cdn.js"
|
|
@@ -1394,29 +1396,29 @@ const or = () => {
|
|
|
1394
1396
|
},
|
|
1395
1397
|
onMouseLeave: () => setTimeout(() => s(""), 300),
|
|
1396
1398
|
className: "relative mx-auto h-full w-full bg-black/80",
|
|
1397
|
-
style: h > 0 && !ee(m) ? { width:
|
|
1399
|
+
style: h > 0 && !ee(m) ? { width: r ? "100%" : h } : {},
|
|
1398
1400
|
ref: f,
|
|
1399
1401
|
children: /* @__PURE__ */ t.jsxs(
|
|
1400
|
-
|
|
1402
|
+
Hr,
|
|
1401
1403
|
{
|
|
1402
1404
|
contentDidMount: () => C(a.current),
|
|
1403
1405
|
ref: a,
|
|
1404
1406
|
id: "canvas-iframe",
|
|
1405
|
-
style: { width: `${
|
|
1407
|
+
style: { width: `${n}px`, ...m },
|
|
1406
1408
|
className: "relative mx-auto box-content h-full max-w-full shadow-md transition-all duration-300 ease-linear",
|
|
1407
1409
|
initialContent: l,
|
|
1408
1410
|
children: [
|
|
1409
|
-
/* @__PURE__ */ t.jsx(
|
|
1411
|
+
/* @__PURE__ */ t.jsx(Vr, {}),
|
|
1410
1412
|
/* @__PURE__ */ t.jsx(
|
|
1411
|
-
|
|
1413
|
+
Xr,
|
|
1412
1414
|
{
|
|
1413
1415
|
block: d,
|
|
1414
1416
|
selectedBlockElement: ce(v)
|
|
1415
1417
|
}
|
|
1416
1418
|
),
|
|
1417
|
-
/* @__PURE__ */ t.jsx(
|
|
1418
|
-
/* @__PURE__ */ t.jsxs(
|
|
1419
|
-
M ? /* @__PURE__ */ t.jsx("div", { className: "h-full p-4", children: /* @__PURE__ */ t.jsx(et, { className: "h-full" }) }) : /* @__PURE__ */ t.jsx(
|
|
1419
|
+
/* @__PURE__ */ t.jsx(Zr, { model: "page" }),
|
|
1420
|
+
/* @__PURE__ */ t.jsxs(Kr, { children: [
|
|
1421
|
+
M ? /* @__PURE__ */ t.jsx("div", { className: "h-full p-4", children: /* @__PURE__ */ t.jsx(et, { className: "h-full" }) }) : /* @__PURE__ */ t.jsx(nn, {}),
|
|
1420
1422
|
/* @__PURE__ */ t.jsx("div", { className: "h-60" })
|
|
1421
1423
|
] })
|
|
1422
1424
|
]
|
|
@@ -1424,26 +1426,26 @@ const or = () => {
|
|
|
1424
1426
|
)
|
|
1425
1427
|
}
|
|
1426
1428
|
);
|
|
1427
|
-
},
|
|
1428
|
-
const e = Qe("mode", ve.STATIC), [
|
|
1429
|
-
[ve.STATIC]: /* @__PURE__ */ t.jsx(
|
|
1429
|
+
}, an = wt(() => import("./AddBlocks-5d928d58.js")), eo = () => {
|
|
1430
|
+
const e = Qe("mode", ve.STATIC), [r, n] = te(Xt), i = {
|
|
1431
|
+
[ve.STATIC]: /* @__PURE__ */ t.jsx(sn, {}),
|
|
1430
1432
|
[ve.FRAMEWORK]: null
|
|
1431
1433
|
}[e];
|
|
1432
1434
|
return /* @__PURE__ */ t.jsxs("div", { className: "flex h-full w-full flex-col", children: [
|
|
1433
|
-
/* @__PURE__ */ t.jsx(
|
|
1435
|
+
/* @__PURE__ */ t.jsx(Or, {}),
|
|
1434
1436
|
/* @__PURE__ */ t.jsxs("div", { className: "relative flex-1 overflow-hidden bg-slate-800/20 bg-[linear-gradient(to_right,#EEE_0.5px,transparent_0.5px),linear-gradient(to_bottom,#EEE_0.5px,transparent_0.5px)] bg-[size:12px_12px]", children: [
|
|
1435
1437
|
/* @__PURE__ */ t.jsx(Et, { fallback: /* @__PURE__ */ t.jsx(et, { className: "h-full" }), children: /* @__PURE__ */ t.jsx(Zt, { children: i }) }),
|
|
1436
|
-
|
|
1438
|
+
r ? /* @__PURE__ */ t.jsx(
|
|
1437
1439
|
"div",
|
|
1438
1440
|
{
|
|
1439
|
-
onClick: () =>
|
|
1441
|
+
onClick: () => n(!1),
|
|
1440
1442
|
className: "absolute inset-0 z-50 flex items-center bg-black/30 backdrop-blur-sm",
|
|
1441
1443
|
children: /* @__PURE__ */ t.jsx(
|
|
1442
1444
|
"div",
|
|
1443
1445
|
{
|
|
1444
1446
|
onClick: (d) => d.stopPropagation(),
|
|
1445
1447
|
className: "mx-auto h-[90%] w-[90%] max-w-3xl rounded-md bg-white p-4 shadow-lg shadow-black/10 xl:w-[65%]",
|
|
1446
|
-
children: /* @__PURE__ */ t.jsx(
|
|
1448
|
+
children: /* @__PURE__ */ t.jsx(an, {})
|
|
1447
1449
|
}
|
|
1448
1450
|
)
|
|
1449
1451
|
}
|
|
@@ -1452,5 +1454,5 @@ const or = () => {
|
|
|
1452
1454
|
] });
|
|
1453
1455
|
};
|
|
1454
1456
|
export {
|
|
1455
|
-
|
|
1457
|
+
eo as default
|
|
1456
1458
|
};
|