@chaibuilder/sdk 1.0.8 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +28 -0
- package/README.md +123 -21
- package/dist/AddBlocks-tdvDe7xL.cjs +3 -0
- package/dist/{AddBlocks-9128ba6f.js → AddBlocks-xR2s2BVa.js} +47 -44
- package/dist/BrandingOptions-DpJ-oNnf.cjs +1 -0
- package/dist/{BrandingOptions-ea5c3818.js → BrandingOptions-cHK2bVZy.js} +14 -18
- package/dist/{CanvasArea-61ab734b.js → CanvasArea-2zqT1lSE.js} +492 -503
- package/dist/CanvasArea-Br8bBSeT.cjs +46 -0
- package/dist/ChaiBuilderEditor-SacH75l4.cjs +163 -0
- package/dist/{index-56a8abbc.js → ChaiBuilderEditor-h9bXC4l-.js} +11215 -15368
- package/dist/Class-_uCzl5v1.cjs +1 -0
- package/dist/{html-to-json-45e0e3b5.js → Class-l7qYbuoN.js} +185 -366
- package/dist/{CurrentPage-0b3bbd2f.js → CurrentPage-4lTETR2f.js} +27 -24
- package/dist/CurrentPage-nlUWJiUA.cjs +1 -0
- package/dist/{ImagesPanel-8b7a989d.cjs → ImagesPanel-6us7hiLN.cjs} +1 -1
- package/dist/{ImagesPanel-47ac13c3.js → ImagesPanel-oaHOD-Ex.js} +4 -4
- package/dist/Layers-Vw4XE6YB.cjs +1 -0
- package/dist/{Layers-f3e1f9dc.js → Layers-wOfijZnb.js} +42 -41
- package/dist/MarkAsGlobalBlock-1J_YyL1L.cjs +1 -0
- package/dist/{MarkAsGlobalBlock-a3314fee.js → MarkAsGlobalBlock-xRyn29gC.js} +17 -20
- package/dist/{PagesPanel-13c05436.js → PagesPanel-82gCVzHS.js} +16 -13
- package/dist/PagesPanel-ZKRdK-mI.cjs +1 -0
- package/dist/ProjectPanel-kYg4KkJu.cjs +1 -0
- package/dist/{ProjectPanel-dbec2f4b.js → ProjectPanel-vz5WOyqZ.js} +22 -19
- package/dist/Settings-1E3Y_5r6.cjs +1 -0
- package/dist/{Settings-dd4fa69c.js → Settings-IuAF359L.js} +297 -296
- package/dist/SidePanels-WL1UioF2.cjs +1 -0
- package/dist/{SidePanels-857bc7bc.js → SidePanels-xssTWt4M.js} +34 -42
- package/dist/Topbar-3ozdWfSy.cjs +1 -0
- package/dist/{Topbar-3166b6aa.js → Topbar-H0f0EL6-.js} +33 -35
- package/dist/UnsplashImages-BoBBSi1a.cjs +1 -0
- package/dist/{UnsplashImages-4edb97e7.js → UnsplashImages-gPcBLjgB.js} +13 -14
- package/dist/UploadImages-T6kW0s3G.cjs +1 -0
- package/dist/{UploadImages-52181c3e.js → UploadImages-_ZyUU66E.js} +11 -12
- package/dist/{accordion-c0176dc5.js → accordion-oPUeqPCZ.js} +2 -2
- package/dist/{accordion-0afd8143.cjs → accordion-ynvFtV_p.cjs} +1 -1
- package/dist/{add-page-modal-74269b8b.js → add-page-modal-J1E7rh1U.js} +25 -22
- package/dist/add-page-modal-eiiUZCJX.cjs +1 -0
- package/dist/alert-dialog-GNfnpqFB.js +64 -0
- package/dist/alert-dialog-Mv0-wAvS.cjs +1 -0
- package/dist/{command-b1103666.cjs → command-ThdTuUxt.cjs} +1 -1
- package/dist/{command-6f260f61.js → command-VHca6CcN.js} +3 -3
- package/dist/confirm-alert-8EHe0OOd.cjs +1 -0
- package/dist/confirm-alert-b0e_BLhF.js +36 -0
- package/dist/{context-menu-e1c240ce.js → context-menu-8dC9uGXj.js} +2 -2
- package/dist/{context-menu-fec580f2.cjs → context-menu-IgLbIuth.cjs} +1 -1
- package/dist/controls-Ni5kEzLz.js +103 -0
- package/dist/controls-xUKa23ic.cjs +1 -0
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +1 -10
- package/dist/core.js +116 -69
- package/dist/delete-page-modal-TGTmRjyn.cjs +1 -0
- package/dist/{delete-page-modal-e4aa62c3.js → delete-page-modal-ysj4O0bM.js} +25 -22
- package/dist/{dialog-170eaad9.cjs → dialog-S_QbL1iq.cjs} +1 -1
- package/dist/{dialog-18207bef.js → dialog-jrw9DF1f.js} +2 -2
- package/dist/{dropdown-menu-ae3ed09b.js → dropdown-menu-S03K_fNs.js} +2 -2
- package/dist/{dropdown-menu-84b2439e.cjs → dropdown-menu-sMXR59cB.cjs} +1 -1
- package/dist/{form-25e1af37.js → form-dVpOAyRl.js} +2 -2
- package/dist/{form-ea21db6c.cjs → form-nRAvKPQj.cjs} +1 -1
- package/dist/{functions-83b1de8d.js → functions-nNTuSTsR.js} +1 -1
- package/dist/functions-pcUZhFJM.js +12 -0
- package/dist/{functions-f84d5e2a.cjs → functions-sCuB7nvZ.cjs} +1 -1
- package/dist/functions-uw7QP2kT.cjs +1 -0
- package/dist/html-to-json-P6GpbcQX.cjs +1 -0
- package/dist/html-to-json-pdHQfRkN.js +178 -0
- package/dist/index-8L3zCc6V.cjs +1 -0
- package/dist/index-cZ4uo6aT.js +2256 -0
- package/dist/{label-e770a087.js → label-KaP7MRrs.js} +2 -2
- package/dist/{label-167415e5.cjs → label-tFm8HZdb.cjs} +1 -1
- package/dist/lib.cjs +1 -1
- package/dist/lib.d.ts +20 -13
- package/dist/lib.js +24 -23
- package/dist/{link-57de608a.js → link-6o6n2Tnd.js} +4 -4
- package/dist/link-ece8dZGH.cjs +1 -0
- package/dist/{page-viewer-40cfdbfc.js → page-viewer-84Giu0Rs.js} +29 -26
- package/dist/page-viewer-OdVEG83P.cjs +1 -0
- package/dist/{popover-f7addcf4.js → popover-a84pbVhQ.js} +2 -2
- package/dist/{popover-7cb9079b.cjs → popover-fKjgcRUx.cjs} +1 -1
- package/dist/{project-general-setting-d6f00a25.js → project-general-setting-8OEVVxzn.js} +20 -17
- package/dist/project-general-setting-laHNQPW5.cjs +1 -0
- package/dist/{project-seo-setting-d81fc1e3.js → project-seo-setting-9kD_stdI.js} +11 -12
- package/dist/project-seo-setting-F3Opt9Uj.cjs +1 -0
- package/dist/render.cjs +1 -1
- package/dist/render.d.ts +7 -7
- package/dist/render.js +3 -3
- package/dist/{scroll-area-bb343b86.cjs → scroll-area-FiHvy-TZ.cjs} +1 -1
- package/dist/{scroll-area-83bd9e8f.js → scroll-area-ewXbxc3n.js} +2 -2
- package/dist/{select-0e32300c.cjs → select-7bjg-rr9.cjs} +1 -1
- package/dist/{select-7fddd7c3.js → select-POGdEDHT.js} +2 -2
- package/dist/{separator-a597dba7.cjs → separator-3Civ-6hb.cjs} +1 -1
- package/dist/{separator-a80d065b.js → separator-SctTn0Qi.js} +2 -2
- package/dist/server.d.ts +7 -10
- package/dist/server.js +0 -3
- package/dist/single-page-detail-X0TGlsT4.cjs +1 -0
- package/dist/{single-page-detail-fddaf0ec.js → single-page-detail-iXpavDy8.js} +32 -29
- package/dist/skeleton-CU_FIbg3.js +239 -0
- package/dist/skeleton-JHP9zwL2.cjs +1 -0
- package/dist/studio.cjs +1 -0
- package/dist/studio.d.ts +13 -0
- package/dist/studio.js +39 -0
- package/dist/{tabs-85caa1e8.js → tabs-Gb9v5dVb.js} +2 -2
- package/dist/{tabs-860e37aa.cjs → tabs-iWeaaVrg.cjs} +1 -1
- package/dist/{textarea-a338ede6.cjs → textarea-1kZEh7ki.cjs} +1 -1
- package/dist/{textarea-0750bcd2.js → textarea-b2QvVhrK.js} +2 -2
- package/dist/{toggle-00c9d11e.js → toggle-ASJRAaGP.js} +2 -2
- package/dist/{toggle-b90fed97.cjs → toggle-ehNIPmme.cjs} +1 -1
- package/dist/ui.cjs +1 -1
- package/dist/ui.d.ts +69 -4
- package/dist/ui.js +272 -212
- package/dist/useAddBlock-1cMXaOVk.cjs +1 -0
- package/dist/useAddBlock-BOjrGBEO.js +86 -0
- package/dist/useAllBlocks-RU_Xw8j9.cjs +1 -0
- package/dist/useAllBlocks-lX6uVO39.js +20 -0
- package/dist/useChaiExternalData-4K9WxANa.js +6 -0
- package/dist/useChaiExternalData-DkyBJ81C.cjs +1 -0
- package/dist/useDarkMode-JWkrNFpH.js +23 -0
- package/dist/useDarkMode-zeTW_UUR.cjs +1 -0
- package/dist/useFeatureSupport-jWSuY7wk.js +16 -0
- package/dist/useFeatureSupport-tZ0QfBxp.cjs +1 -0
- package/dist/useHiddenBlocks-3MsGOJ1s.js +15 -0
- package/dist/useHiddenBlocks-oJuQDmTy.cjs +1 -0
- package/dist/useLanguage-O1uu2Bzu.js +216 -0
- package/dist/useLanguage-Y3qgAbgG.cjs +1 -0
- package/dist/useMarkAsGlobalBlock-DB5B1UP6.js +25 -0
- package/dist/useMarkAsGlobalBlock-toxRSLc_.cjs +1 -0
- package/dist/useUiLibraries-4hPOi8DI.js +12 -0
- package/dist/useUiLibraries-9FhQCpKo.cjs +1 -0
- package/package.json +19 -5
- package/dist/AddBlocks-d240ce44.cjs +0 -3
- package/dist/BrandingOptions-3bb00e4c.cjs +0 -1
- package/dist/CanvasArea-723e90e7.cjs +0 -46
- package/dist/CurrentPage-552ca7d3.cjs +0 -1
- package/dist/Layers-20a6cb66.cjs +0 -1
- package/dist/MarkAsGlobalBlock-75c82d33.cjs +0 -1
- package/dist/PagesPanel-01ce4305.cjs +0 -1
- package/dist/ProjectPanel-658f62f5.cjs +0 -1
- package/dist/Settings-f0a220d8.cjs +0 -1
- package/dist/SidePanels-fb3bc195.cjs +0 -1
- package/dist/Topbar-4f94475f.cjs +0 -1
- package/dist/UnsplashImages-98c085c2.cjs +0 -1
- package/dist/UploadImages-61ef83ad.cjs +0 -1
- package/dist/add-page-modal-25c623bf.cjs +0 -1
- package/dist/confirm-alert-c1fdf1e4.js +0 -35
- package/dist/confirm-alert-e1ea5110.cjs +0 -1
- package/dist/delete-page-modal-2cdd4b0c.cjs +0 -1
- package/dist/html-to-json-aadcbf66.cjs +0 -1
- package/dist/index-76f43d04.cjs +0 -164
- package/dist/link-24679521.cjs +0 -1
- package/dist/page-viewer-d73b7828.cjs +0 -1
- package/dist/project-general-setting-5714e3e8.cjs +0 -1
- package/dist/project-seo-setting-6eef8387.cjs +0 -1
- package/dist/single-page-detail-a3115735.cjs +0 -1
- package/dist/useBuilderProp-21feb2da.js +0 -296
- package/dist/useBuilderProp-adacf42f.cjs +0 -1
- package/dist/useChaiExternalData-192c7896.js +0 -5
- package/dist/useChaiExternalData-a90e8aac.cjs +0 -1
- /package/dist/{MODIFIERS-2f19c314.js → MODIFIERS-DsEzQ3aH.js} +0 -0
- /package/dist/{MODIFIERS-4716c669.cjs → MODIFIERS-Fx6WAZcw.cjs} +0 -0
- /package/dist/{jsx-runtime-5c3ac4f7.cjs → jsx-runtime-JYMCiFoE.cjs} +0 -0
- /package/dist/{jsx-runtime-944c88e2.js → jsx-runtime-Sp0orL4X.js} +0 -0
- /package/dist/{utils-ac68b2c8.js → utils-dze1SGvB.js} +0 -0
- /package/dist/{utils-3c452dd0.cjs → utils-qK_SjzzV.cjs} +0 -0
|
@@ -1,33 +1,36 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var U = (n, t, r) => (
|
|
4
|
-
import { j as e } from "./jsx-runtime-
|
|
5
|
-
import
|
|
6
|
-
import { each as
|
|
7
|
-
import { ResetIcon as Ce, DotsVerticalIcon as
|
|
8
|
-
import { B as te,
|
|
9
|
-
import {
|
|
10
|
-
import { useTranslation as
|
|
11
|
-
import { S as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import
|
|
26
|
-
import "
|
|
27
|
-
import "
|
|
28
|
-
import "
|
|
1
|
+
var ut = Object.defineProperty;
|
|
2
|
+
var pt = (n, t, r) => t in n ? ut(n, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : n[t] = r;
|
|
3
|
+
var U = (n, t, r) => (pt(n, typeof t != "symbol" ? t + "" : t, r), r);
|
|
4
|
+
import { j as e } from "./jsx-runtime-Sp0orL4X.js";
|
|
5
|
+
import z, { useMemo as Me, useEffect as R, createElement as ft, useCallback as V, useState as $, Component as Ne, Children as ht, Suspense as Le, useRef as we, lazy as mt } from "react";
|
|
6
|
+
import { each as ue, find as Fe, map as Q, includes as ke, toUpper as se, round as yt, isEmpty as q, first as ee, get as A, memoize as gt, filter as We, isNull as vt, isString as me } from "lodash";
|
|
7
|
+
import { ResetIcon as Ce, DotsVerticalIcon as xt, MobileIcon as Te, LaptopIcon as bt, DesktopIcon as jt, EraserIcon as wt, ZoomInIcon as kt, ArrowUpIcon as Ct, CopyIcon as Tt, TrashIcon as Et, DragHandleDots2Icon as St } from "@radix-ui/react-icons";
|
|
8
|
+
import { B as te, u as Dt, S as $e } from "./skeleton-CU_FIbg3.js";
|
|
9
|
+
import { t as Ot, a as ye, s as It, l as H, q as K, y as qe, e as Ue, d as At, b as Bt, h as Pt, i as ze, k as He, p as Rt, z as _t, A as Mt, j as Nt, g as ge, B as Lt, m as Ft, D as Wt, x as $t, E as qt } from "./ChaiBuilderEditor-h9bXC4l-.js";
|
|
10
|
+
import { useTranslation as Ke } from "react-i18next";
|
|
11
|
+
import { S as G } from "./separator-SctTn0Qi.js";
|
|
12
|
+
import { a as Ye, u as ve } from "./useDarkMode-JWkrNFpH.js";
|
|
13
|
+
import { S as Ut, D as zt, c as Ht, d as Kt, h as Yt, i as Vt, f as Xt, H as Jt, a as Zt, b as Gt } from "./dropdown-menu-S03K_fNs.js";
|
|
14
|
+
import { L as Qt } from "./label-KaP7MRrs.js";
|
|
15
|
+
import { b as en, u as tn, a as Ve } from "./useFeatureSupport-jWSuY7wk.js";
|
|
16
|
+
import { A as nn, a as rn, b as sn, c as on, e as an, f as ln, d as cn, h as dn, g as un } from "./alert-dialog-GNfnpqFB.js";
|
|
17
|
+
import { useAtom as J } from "jotai";
|
|
18
|
+
import { flip as pn } from "@floating-ui/dom";
|
|
19
|
+
import { useFloating as fn, shift as hn } from "@floating-ui/react-dom";
|
|
20
|
+
import { useDrag as mn } from "react-dnd";
|
|
21
|
+
import { c as yn, a as gn, u as Xe } from "./useAllBlocks-lX6uVO39.js";
|
|
22
|
+
import { useResizeObserver as vn } from "@react-hookz/web";
|
|
23
|
+
import { tailwindcssPaletteGenerator as xn } from "@bobthered/tailwindcss-palette-generator";
|
|
24
|
+
import { Provider as bn } from "react-wrap-balancer";
|
|
25
|
+
import { twMerge as jn } from "tailwind-merge";
|
|
26
|
+
import { g as wn, S as Je, a as Ee } from "./MODIFIERS-DsEzQ3aH.js";
|
|
27
|
+
import { getChaiDataProviders as kn, getBlockComponent as Cn } from "@chaibuilder/blocks";
|
|
28
|
+
import { u as Ze } from "./useChaiExternalData-4K9WxANa.js";
|
|
29
|
+
import Se from "react-dom";
|
|
29
30
|
import "@radix-ui/react-slot";
|
|
30
31
|
import "class-variance-authority";
|
|
32
|
+
import "./utils-dze1SGvB.js";
|
|
33
|
+
import "clsx";
|
|
31
34
|
import "@radix-ui/react-tooltip";
|
|
32
35
|
import "@radix-ui/react-toast";
|
|
33
36
|
import "@radix-ui/react-scroll-area";
|
|
@@ -36,44 +39,42 @@ import "flagged";
|
|
|
36
39
|
import "@minoru/react-dnd-treeview";
|
|
37
40
|
import "react-hotkeys-hook";
|
|
38
41
|
import "flat-to-nested";
|
|
39
|
-
import "./
|
|
40
|
-
import "himalaya";
|
|
42
|
+
import "./functions-pcUZhFJM.js";
|
|
41
43
|
import "redux-undo";
|
|
42
|
-
import "sonner";
|
|
43
|
-
import "lucide-react";
|
|
44
44
|
import "@radix-ui/react-separator";
|
|
45
45
|
import "@radix-ui/react-switch";
|
|
46
46
|
import "@radix-ui/react-hover-card";
|
|
47
47
|
import "@radix-ui/react-dropdown-menu";
|
|
48
48
|
import "@radix-ui/react-label";
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
import "@radix-ui/react-alert-dialog";
|
|
50
|
+
const Tn = () => Me(() => kn(), []), En = ({ children: n }) => {
|
|
51
|
+
const [, t] = Ze(), [r] = Ot(), a = Tn();
|
|
52
|
+
return R(() => (t({}), ue(r, (c) => {
|
|
53
|
+
const s = Fe(a, { providerKey: c.providerKey });
|
|
53
54
|
if (s) {
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
(d) => t((y) => ({ ...y, [
|
|
55
|
+
const i = (s == null ? void 0 : s.mockFn) || (s == null ? void 0 : s.dataFn);
|
|
56
|
+
i && i(c.args).then(
|
|
57
|
+
(d) => t((y) => ({ ...y, [c.providerKey]: d }))
|
|
57
58
|
);
|
|
58
59
|
}
|
|
59
60
|
}), () => {
|
|
60
|
-
|
|
61
|
-
t((s) => (delete s[
|
|
61
|
+
ue(r, (c) => {
|
|
62
|
+
t((s) => (delete s[c.providerKey], s));
|
|
62
63
|
});
|
|
63
|
-
}), [
|
|
64
|
-
},
|
|
65
|
-
const { undoCount: n, redoCount: t, undo: r, redo:
|
|
64
|
+
}), [a, r, t]), /* @__PURE__ */ e.jsx(e.Fragment, { children: n });
|
|
65
|
+
}, Sn = () => {
|
|
66
|
+
const { undoCount: n, redoCount: t, undo: r, redo: a } = ye();
|
|
66
67
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
|
|
67
68
|
/* @__PURE__ */ e.jsx(te, { disabled: !n, size: "sm", onClick: r, className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ e.jsx(Ce, {}) }),
|
|
68
|
-
/* @__PURE__ */ e.jsx(te, { disabled: !t, onClick:
|
|
69
|
+
/* @__PURE__ */ e.jsx(te, { disabled: !t, onClick: a, size: "sm", className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ e.jsx(Ce, { className: "rotate-180 scale-y-[-1] transform" }) })
|
|
69
70
|
] });
|
|
70
71
|
};
|
|
71
|
-
function
|
|
72
|
-
const [n, t] =
|
|
72
|
+
function Dn() {
|
|
73
|
+
const [n, t] = Ye(), { t: r } = Ke();
|
|
73
74
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
|
|
74
|
-
/* @__PURE__ */ e.jsx(
|
|
75
|
+
/* @__PURE__ */ e.jsx(Qt, { htmlFor: "dark-mode-switch", children: r("dark_mode") }),
|
|
75
76
|
/* @__PURE__ */ e.jsxs(
|
|
76
|
-
|
|
77
|
+
Ut,
|
|
77
78
|
{
|
|
78
79
|
id: "dark-mode-switch",
|
|
79
80
|
checked: n,
|
|
@@ -97,7 +98,7 @@ function An() {
|
|
|
97
98
|
)
|
|
98
99
|
] });
|
|
99
100
|
}
|
|
100
|
-
const
|
|
101
|
+
const De = ({ landscape: n = !1 }) => /* @__PURE__ */ e.jsxs(
|
|
101
102
|
"svg",
|
|
102
103
|
{
|
|
103
104
|
className: n ? "rotate-90" : "",
|
|
@@ -120,91 +121,91 @@ const Ae = ({ landscape: n = !1 }) => /* @__PURE__ */ e.jsxs(
|
|
|
120
121
|
)
|
|
121
122
|
]
|
|
122
123
|
}
|
|
123
|
-
),
|
|
124
|
+
), Oe = [
|
|
124
125
|
{
|
|
125
126
|
title: "Mobile (XS)",
|
|
126
127
|
content: "Styles set here are applied to all screen unless edited at higher breakpoint",
|
|
127
128
|
breakpoint: "xs",
|
|
128
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
129
|
+
icon: /* @__PURE__ */ e.jsx(Te, {}),
|
|
129
130
|
width: 400
|
|
130
131
|
},
|
|
131
132
|
{
|
|
132
133
|
title: "Mobile landscape (SM)",
|
|
133
134
|
content: "Styles set here are applied at 640px and up unless edited at higher breakpoint",
|
|
134
135
|
breakpoint: "sm",
|
|
135
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
136
|
+
icon: /* @__PURE__ */ e.jsx(Te, { className: "rotate-90" }),
|
|
136
137
|
width: 640
|
|
137
138
|
},
|
|
138
139
|
{
|
|
139
140
|
title: "Tablet (MD)",
|
|
140
141
|
content: "Styles set here are applied at 768px and up",
|
|
141
142
|
breakpoint: "md",
|
|
142
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
143
|
+
icon: /* @__PURE__ */ e.jsx(De, {}),
|
|
143
144
|
width: 800
|
|
144
145
|
},
|
|
145
146
|
{
|
|
146
147
|
title: "Tablet Landscape (LG)",
|
|
147
148
|
content: "Styles set here are applied at 1024px and up unless edited at higher breakpoint",
|
|
148
149
|
breakpoint: "lg",
|
|
149
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
150
|
+
icon: /* @__PURE__ */ e.jsx(De, { landscape: !0 }),
|
|
150
151
|
width: 1024
|
|
151
152
|
},
|
|
152
153
|
{
|
|
153
154
|
title: "Desktop (XL)",
|
|
154
155
|
content: "Styles set here are applied at 1280px and up unless edited at higher breakpoint",
|
|
155
156
|
breakpoint: "xl",
|
|
156
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
157
|
+
icon: /* @__PURE__ */ e.jsx(bt, {}),
|
|
157
158
|
width: 1420
|
|
158
159
|
},
|
|
159
160
|
{
|
|
160
161
|
title: "Large Desktop (2XL)",
|
|
161
162
|
content: "Styles set here are applied at 1536px and up",
|
|
162
163
|
breakpoint: "2xl",
|
|
163
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
164
|
+
icon: /* @__PURE__ */ e.jsx(jt, {}),
|
|
164
165
|
width: 1920
|
|
165
166
|
}
|
|
166
|
-
],
|
|
167
|
+
], On = ({
|
|
167
168
|
title: n,
|
|
168
169
|
content: t,
|
|
169
170
|
currentBreakpoint: r,
|
|
170
|
-
breakpoint:
|
|
171
|
-
width:
|
|
171
|
+
breakpoint: a,
|
|
172
|
+
width: c,
|
|
172
173
|
icon: s,
|
|
173
|
-
onClick:
|
|
174
|
-
}) => /* @__PURE__ */ e.jsxs(
|
|
175
|
-
/* @__PURE__ */ e.jsx(
|
|
174
|
+
onClick: i
|
|
175
|
+
}) => /* @__PURE__ */ e.jsxs(Jt, { children: [
|
|
176
|
+
/* @__PURE__ */ e.jsx(Zt, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
176
177
|
te,
|
|
177
178
|
{
|
|
178
|
-
onClick: () =>
|
|
179
|
+
onClick: () => i(c),
|
|
179
180
|
size: "sm",
|
|
180
|
-
variant:
|
|
181
|
+
variant: a === r ? "secondary" : "ghost",
|
|
181
182
|
children: s
|
|
182
183
|
}
|
|
183
184
|
) }),
|
|
184
|
-
/* @__PURE__ */ e.jsx(
|
|
185
|
+
/* @__PURE__ */ e.jsx(Gt, { className: "w-52 border-border", children: /* @__PURE__ */ e.jsx("div", { className: "flex justify-between space-x-4", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-1", children: [
|
|
185
186
|
/* @__PURE__ */ e.jsx("h4", { className: "text-sm font-semibold", children: n }),
|
|
186
187
|
/* @__PURE__ */ e.jsx("p", { className: "text-xs", children: t })
|
|
187
188
|
] }) }) })
|
|
188
|
-
] }),
|
|
189
|
-
const [, n, t] = ve(), [r,
|
|
190
|
-
r.includes(s) ? r.length > 2 &&
|
|
189
|
+
] }), In = () => {
|
|
190
|
+
const [, n, t] = ve(), [r, a] = en(), c = (s) => {
|
|
191
|
+
r.includes(s) ? r.length > 2 && a(r.filter((i) => i !== s)) : a((i) => [...i, s]);
|
|
191
192
|
};
|
|
192
193
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center rounded-md", children: [
|
|
193
194
|
Q(
|
|
194
|
-
|
|
195
|
-
(s) => /* @__PURE__ */
|
|
195
|
+
Oe.filter((s) => ke(r, se(s.breakpoint))),
|
|
196
|
+
(s) => /* @__PURE__ */ ft(On, { ...s, onClick: t, key: s.breakpoint, currentBreakpoint: n })
|
|
196
197
|
),
|
|
197
|
-
/* @__PURE__ */ e.jsxs(
|
|
198
|
-
/* @__PURE__ */ e.jsx(
|
|
199
|
-
/* @__PURE__ */ e.jsxs(
|
|
200
|
-
/* @__PURE__ */ e.jsx(
|
|
201
|
-
/* @__PURE__ */ e.jsx(
|
|
202
|
-
Q(
|
|
203
|
-
|
|
198
|
+
/* @__PURE__ */ e.jsxs(zt, { children: [
|
|
199
|
+
/* @__PURE__ */ e.jsx(Ht, { asChild: !0, children: /* @__PURE__ */ e.jsx("span", { className: "cursor-pointer px-2.5 hover:opacity-80", children: /* @__PURE__ */ e.jsx(xt, { className: "scale-90 transform" }) }) }),
|
|
200
|
+
/* @__PURE__ */ e.jsxs(Kt, { className: "w-56 border-border text-xs", children: [
|
|
201
|
+
/* @__PURE__ */ e.jsx(Yt, { children: "Breakpoints" }),
|
|
202
|
+
/* @__PURE__ */ e.jsx(Vt, {}),
|
|
203
|
+
Q(Oe, (s) => /* @__PURE__ */ e.jsx(
|
|
204
|
+
Xt,
|
|
204
205
|
{
|
|
205
206
|
disabled: s.breakpoint === "xs",
|
|
206
|
-
onCheckedChange: () =>
|
|
207
|
-
checked:
|
|
207
|
+
onCheckedChange: () => c(se(s.breakpoint)),
|
|
208
|
+
checked: ke(r, se(s.breakpoint)),
|
|
208
209
|
children: s.title
|
|
209
210
|
},
|
|
210
211
|
s.breakpoint
|
|
@@ -212,59 +213,53 @@ const Ae = ({ landscape: n = !1 }) => /* @__PURE__ */ e.jsxs(
|
|
|
212
213
|
] })
|
|
213
214
|
] })
|
|
214
215
|
] });
|
|
215
|
-
},
|
|
216
|
-
const [n] =
|
|
217
|
-
n([]), r([]),
|
|
216
|
+
}, An = () => {
|
|
217
|
+
const [n] = It(), { createSnapshot: t } = ye(), [, r] = H(), [, a] = K(), c = V(() => {
|
|
218
|
+
n([]), r([]), a([]), t();
|
|
218
219
|
}, [n, t]);
|
|
219
|
-
return /* @__PURE__ */ e.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ e.jsxs(
|
|
220
|
-
/* @__PURE__ */ e.jsx(
|
|
221
|
-
/* @__PURE__ */ e.jsx(
|
|
220
|
+
return /* @__PURE__ */ e.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ e.jsxs(nn, { children: [
|
|
221
|
+
/* @__PURE__ */ e.jsx(rn, { asChild: !0, children: /* @__PURE__ */ e.jsxs(te, { size: "sm", variant: "ghost", className: "flex items-center gap-x-1", children: [
|
|
222
|
+
/* @__PURE__ */ e.jsx(wt, {}),
|
|
222
223
|
" Clear"
|
|
223
224
|
] }) }),
|
|
224
|
-
/* @__PURE__ */ e.jsxs(
|
|
225
|
-
/* @__PURE__ */ e.jsxs(
|
|
226
|
-
/* @__PURE__ */ e.jsx(
|
|
227
|
-
/* @__PURE__ */ e.jsx(
|
|
225
|
+
/* @__PURE__ */ e.jsxs(sn, { className: "border-border", children: [
|
|
226
|
+
/* @__PURE__ */ e.jsxs(on, { children: [
|
|
227
|
+
/* @__PURE__ */ e.jsx(an, { children: "Clear whole canvas?" }),
|
|
228
|
+
/* @__PURE__ */ e.jsx(ln, { children: "Are you sure you want to clear the whole canvas?" })
|
|
228
229
|
] }),
|
|
229
|
-
/* @__PURE__ */ e.jsxs(
|
|
230
|
-
/* @__PURE__ */ e.jsx(
|
|
231
|
-
/* @__PURE__ */ e.jsx(
|
|
230
|
+
/* @__PURE__ */ e.jsxs(cn, { children: [
|
|
231
|
+
/* @__PURE__ */ e.jsx(dn, { children: "Cancel" }),
|
|
232
|
+
/* @__PURE__ */ e.jsx(un, { onClick: c, children: "Yes" })
|
|
232
233
|
] })
|
|
233
234
|
] })
|
|
234
235
|
] }) });
|
|
235
|
-
},
|
|
236
|
-
const n =
|
|
236
|
+
}, Bn = () => {
|
|
237
|
+
const n = tn("darkMode", !1), [t] = Ve();
|
|
237
238
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex h-10 items-center justify-between border-b bg-background/70 px-2", children: [
|
|
238
239
|
/* @__PURE__ */ e.jsxs("div", { className: "flex h-full space-x-2", children: [
|
|
239
240
|
n ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
240
|
-
/* @__PURE__ */ e.jsx(
|
|
241
|
-
/* @__PURE__ */ e.jsx(
|
|
241
|
+
/* @__PURE__ */ e.jsx(Dn, {}),
|
|
242
|
+
/* @__PURE__ */ e.jsx(G, { orientation: "vertical" })
|
|
242
243
|
] }) : null,
|
|
243
|
-
/* @__PURE__ */ e.jsx(
|
|
244
|
-
/* @__PURE__ */ e.jsx(
|
|
244
|
+
/* @__PURE__ */ e.jsx(In, {}),
|
|
245
|
+
/* @__PURE__ */ e.jsx(G, { orientation: "vertical" }),
|
|
245
246
|
/* @__PURE__ */ e.jsxs("div", { className: "flex w-12 items-center justify-center gap-x-1 space-x-0 font-medium", children: [
|
|
246
|
-
/* @__PURE__ */ e.jsx(
|
|
247
|
+
/* @__PURE__ */ e.jsx(kt, { className: "h-3.5 w-3.5 flex-shrink-0" }),
|
|
247
248
|
" ",
|
|
248
249
|
/* @__PURE__ */ e.jsxs("div", { className: "text-xs leading-3", children: [
|
|
249
|
-
|
|
250
|
+
yt(t, 0),
|
|
250
251
|
"%"
|
|
251
252
|
] })
|
|
252
253
|
] }),
|
|
253
|
-
/* @__PURE__ */ e.jsx(
|
|
254
|
-
/* @__PURE__ */ e.jsx(
|
|
254
|
+
/* @__PURE__ */ e.jsx(G, { orientation: "vertical" }),
|
|
255
|
+
/* @__PURE__ */ e.jsx(Sn, {})
|
|
255
256
|
] }),
|
|
256
257
|
/* @__PURE__ */ e.jsxs("div", { className: "flex h-full items-center space-x-2", children: [
|
|
257
|
-
/* @__PURE__ */ e.jsx(
|
|
258
|
-
/* @__PURE__ */ e.jsx(
|
|
258
|
+
/* @__PURE__ */ e.jsx(G, { orientation: "vertical" }),
|
|
259
|
+
/* @__PURE__ */ e.jsx(An, {})
|
|
259
260
|
] })
|
|
260
261
|
] });
|
|
261
|
-
},
|
|
262
|
-
FRAMEWORK: "FRAMEWORK",
|
|
263
|
-
STATIC: "STATIC",
|
|
264
|
-
EMAIL: "EMAIL",
|
|
265
|
-
PRESENTATION: "PRESENTATION",
|
|
266
|
-
GRAPHIC: "GRAPHIC"
|
|
267
|
-
}, Bn = `<!doctype html>
|
|
262
|
+
}, Pn = `<!doctype html>
|
|
268
263
|
<html class="scroll-smooth h-full overflow-y-auto">
|
|
269
264
|
<head>
|
|
270
265
|
<meta charset="UTF-8">
|
|
@@ -298,53 +293,53 @@ const Ae = ({ landscape: n = !1 }) => /* @__PURE__ */ e.jsxs(
|
|
|
298
293
|
<body class="font-body antialiased h-full">
|
|
299
294
|
<div class="frame-root"></div>
|
|
300
295
|
</body>
|
|
301
|
-
</html>`,
|
|
302
|
-
const [t] = ve(), [, r] =
|
|
303
|
-
const { width:
|
|
304
|
-
if (
|
|
305
|
-
const y = parseFloat((
|
|
296
|
+
</html>`, Rn = (n) => {
|
|
297
|
+
const [t] = ve(), [, r] = Ve(), [a, c] = $({}), s = V(() => {
|
|
298
|
+
const { width: i, height: d } = n;
|
|
299
|
+
if (i < t) {
|
|
300
|
+
const y = parseFloat((i / t).toString());
|
|
306
301
|
let b = {};
|
|
307
|
-
d && (b = { height: d + 2 * d * (1 - y) }),
|
|
302
|
+
d && (b = { height: d + 2 * d * (1 - y) }), c({
|
|
308
303
|
transform: `scale(${y})`,
|
|
309
304
|
transformOrigin: "top left",
|
|
310
305
|
...b,
|
|
311
306
|
maxWidth: "none"
|
|
312
307
|
}), r(y * 100);
|
|
313
308
|
} else
|
|
314
|
-
|
|
309
|
+
c({}), r(100);
|
|
315
310
|
}, [t, n, r]);
|
|
316
|
-
return
|
|
311
|
+
return R(() => {
|
|
317
312
|
s();
|
|
318
|
-
}, [t, n, r, s]),
|
|
313
|
+
}, [t, n, r, s]), a;
|
|
319
314
|
};
|
|
320
|
-
var
|
|
315
|
+
var pe = { exports: {} };
|
|
321
316
|
/*
|
|
322
317
|
object-assign
|
|
323
318
|
(c) Sindre Sorhus
|
|
324
319
|
@license MIT
|
|
325
320
|
*/
|
|
326
|
-
var
|
|
321
|
+
var oe, Ie;
|
|
327
322
|
function _n() {
|
|
328
|
-
if (
|
|
329
|
-
return
|
|
330
|
-
|
|
323
|
+
if (Ie)
|
|
324
|
+
return oe;
|
|
325
|
+
Ie = 1;
|
|
331
326
|
var n = Object.getOwnPropertySymbols, t = Object.prototype.hasOwnProperty, r = Object.prototype.propertyIsEnumerable;
|
|
332
|
-
function
|
|
327
|
+
function a(s) {
|
|
333
328
|
if (s == null)
|
|
334
329
|
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
335
330
|
return Object(s);
|
|
336
331
|
}
|
|
337
|
-
function
|
|
332
|
+
function c() {
|
|
338
333
|
try {
|
|
339
334
|
if (!Object.assign)
|
|
340
335
|
return !1;
|
|
341
336
|
var s = new String("abc");
|
|
342
337
|
if (s[5] = "de", Object.getOwnPropertyNames(s)[0] === "5")
|
|
343
338
|
return !1;
|
|
344
|
-
for (var
|
|
345
|
-
|
|
346
|
-
var y = Object.getOwnPropertyNames(
|
|
347
|
-
return
|
|
339
|
+
for (var i = {}, d = 0; d < 10; d++)
|
|
340
|
+
i["_" + String.fromCharCode(d)] = d;
|
|
341
|
+
var y = Object.getOwnPropertyNames(i).map(function(p) {
|
|
342
|
+
return i[p];
|
|
348
343
|
});
|
|
349
344
|
if (y.join("") !== "0123456789")
|
|
350
345
|
return !1;
|
|
@@ -356,8 +351,8 @@ function _n() {
|
|
|
356
351
|
return !1;
|
|
357
352
|
}
|
|
358
353
|
}
|
|
359
|
-
return
|
|
360
|
-
for (var d, y =
|
|
354
|
+
return oe = c() ? Object.assign : function(s, i) {
|
|
355
|
+
for (var d, y = a(s), b, p = 1; p < arguments.length; p++) {
|
|
361
356
|
d = Object(arguments[p]);
|
|
362
357
|
for (var u in d)
|
|
363
358
|
t.call(d, u) && (y[u] = d[u]);
|
|
@@ -368,42 +363,42 @@ function _n() {
|
|
|
368
363
|
}
|
|
369
364
|
}
|
|
370
365
|
return y;
|
|
371
|
-
},
|
|
366
|
+
}, oe;
|
|
372
367
|
}
|
|
373
|
-
var
|
|
374
|
-
function
|
|
375
|
-
if (
|
|
376
|
-
return
|
|
377
|
-
|
|
368
|
+
var ie, Ae;
|
|
369
|
+
function xe() {
|
|
370
|
+
if (Ae)
|
|
371
|
+
return ie;
|
|
372
|
+
Ae = 1;
|
|
378
373
|
var n = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
379
|
-
return
|
|
374
|
+
return ie = n, ie;
|
|
380
375
|
}
|
|
381
|
-
var
|
|
382
|
-
function
|
|
383
|
-
return
|
|
376
|
+
var ae, Be;
|
|
377
|
+
function Ge() {
|
|
378
|
+
return Be || (Be = 1, ae = Function.call.bind(Object.prototype.hasOwnProperty)), ae;
|
|
384
379
|
}
|
|
385
|
-
var
|
|
386
|
-
function
|
|
387
|
-
if (
|
|
388
|
-
return
|
|
389
|
-
|
|
380
|
+
var le, Pe;
|
|
381
|
+
function Mn() {
|
|
382
|
+
if (Pe)
|
|
383
|
+
return le;
|
|
384
|
+
Pe = 1;
|
|
390
385
|
var n = function() {
|
|
391
386
|
};
|
|
392
387
|
if (process.env.NODE_ENV !== "production") {
|
|
393
|
-
var t =
|
|
388
|
+
var t = xe(), r = {}, a = Ge();
|
|
394
389
|
n = function(s) {
|
|
395
|
-
var
|
|
396
|
-
typeof console < "u" && console.error(
|
|
390
|
+
var i = "Warning: " + s;
|
|
391
|
+
typeof console < "u" && console.error(i);
|
|
397
392
|
try {
|
|
398
|
-
throw new Error(
|
|
393
|
+
throw new Error(i);
|
|
399
394
|
} catch {
|
|
400
395
|
}
|
|
401
396
|
};
|
|
402
397
|
}
|
|
403
|
-
function
|
|
398
|
+
function c(s, i, d, y, b) {
|
|
404
399
|
if (process.env.NODE_ENV !== "production") {
|
|
405
400
|
for (var p in s)
|
|
406
|
-
if (
|
|
401
|
+
if (a(s, p)) {
|
|
407
402
|
var u;
|
|
408
403
|
try {
|
|
409
404
|
if (typeof s[p] != "function") {
|
|
@@ -412,9 +407,9 @@ function Nn() {
|
|
|
412
407
|
);
|
|
413
408
|
throw m.name = "Invariant Violation", m;
|
|
414
409
|
}
|
|
415
|
-
u = s[p](
|
|
416
|
-
} catch (
|
|
417
|
-
u =
|
|
410
|
+
u = s[p](i, p, y, d, null, t);
|
|
411
|
+
} catch (O) {
|
|
412
|
+
u = O;
|
|
418
413
|
}
|
|
419
414
|
if (u && !(u instanceof Error) && n(
|
|
420
415
|
(y || "React class") + ": type specification of " + d + " `" + p + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof u + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
@@ -428,16 +423,16 @@ function Nn() {
|
|
|
428
423
|
}
|
|
429
424
|
}
|
|
430
425
|
}
|
|
431
|
-
return
|
|
426
|
+
return c.resetWarningCache = function() {
|
|
432
427
|
process.env.NODE_ENV !== "production" && (r = {});
|
|
433
|
-
},
|
|
428
|
+
}, le = c, le;
|
|
434
429
|
}
|
|
435
|
-
var
|
|
436
|
-
function
|
|
437
|
-
if (
|
|
438
|
-
return
|
|
439
|
-
|
|
440
|
-
var n =
|
|
430
|
+
var ce, Re;
|
|
431
|
+
function Nn() {
|
|
432
|
+
if (Re)
|
|
433
|
+
return ce;
|
|
434
|
+
Re = 1;
|
|
435
|
+
var n = qe, t = _n(), r = xe(), a = Ge(), c = Mn(), s = function() {
|
|
441
436
|
};
|
|
442
437
|
process.env.NODE_ENV !== "production" && (s = function(d) {
|
|
443
438
|
var y = "Warning: " + d;
|
|
@@ -447,15 +442,15 @@ function Ln() {
|
|
|
447
442
|
} catch {
|
|
448
443
|
}
|
|
449
444
|
});
|
|
450
|
-
function
|
|
445
|
+
function i() {
|
|
451
446
|
return null;
|
|
452
447
|
}
|
|
453
|
-
return
|
|
448
|
+
return ce = function(d, y) {
|
|
454
449
|
var b = typeof Symbol == "function" && Symbol.iterator, p = "@@iterator";
|
|
455
450
|
function u(o) {
|
|
456
|
-
var
|
|
457
|
-
if (typeof
|
|
458
|
-
return
|
|
451
|
+
var l = o && (b && o[b] || o[p]);
|
|
452
|
+
if (typeof l == "function")
|
|
453
|
+
return l;
|
|
459
454
|
}
|
|
460
455
|
var m = "<<anonymous>>", k = {
|
|
461
456
|
array: f("array"),
|
|
@@ -467,222 +462,222 @@ function Ln() {
|
|
|
467
462
|
string: f("string"),
|
|
468
463
|
symbol: f("symbol"),
|
|
469
464
|
any: F(),
|
|
470
|
-
arrayOf:
|
|
465
|
+
arrayOf: M,
|
|
471
466
|
element: ne(),
|
|
472
467
|
elementType: re(),
|
|
473
|
-
instanceOf:
|
|
474
|
-
node:
|
|
468
|
+
instanceOf: I,
|
|
469
|
+
node: ot(),
|
|
475
470
|
objectOf: L,
|
|
476
471
|
oneOf: N,
|
|
477
|
-
oneOfType:
|
|
478
|
-
shape:
|
|
479
|
-
exact:
|
|
472
|
+
oneOfType: st,
|
|
473
|
+
shape: it,
|
|
474
|
+
exact: at
|
|
480
475
|
};
|
|
481
|
-
function
|
|
482
|
-
return o ===
|
|
476
|
+
function O(o, l) {
|
|
477
|
+
return o === l ? o !== 0 || 1 / o === 1 / l : o !== o && l !== l;
|
|
483
478
|
}
|
|
484
|
-
function w(o,
|
|
485
|
-
this.message = o, this.data =
|
|
479
|
+
function w(o, l) {
|
|
480
|
+
this.message = o, this.data = l && typeof l == "object" ? l : {}, this.stack = "";
|
|
486
481
|
}
|
|
487
482
|
w.prototype = Error.prototype;
|
|
488
483
|
function S(o) {
|
|
489
484
|
if (process.env.NODE_ENV !== "production")
|
|
490
|
-
var
|
|
491
|
-
function v(
|
|
492
|
-
if (
|
|
485
|
+
var l = {}, j = 0;
|
|
486
|
+
function v(C, g, x, T, D, E, _) {
|
|
487
|
+
if (T = T || m, E = E || x, _ !== r) {
|
|
493
488
|
if (y) {
|
|
494
|
-
var
|
|
489
|
+
var B = new Error(
|
|
495
490
|
"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"
|
|
496
491
|
);
|
|
497
|
-
throw
|
|
492
|
+
throw B.name = "Invariant Violation", B;
|
|
498
493
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
499
|
-
var Y =
|
|
500
|
-
!
|
|
494
|
+
var Y = T + ":" + x;
|
|
495
|
+
!l[Y] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
501
496
|
j < 3 && (s(
|
|
502
|
-
"You are manually calling a React.PropTypes validation function for the `" + E + "` prop on `" +
|
|
503
|
-
),
|
|
497
|
+
"You are manually calling a React.PropTypes validation function for the `" + E + "` 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."
|
|
498
|
+
), l[Y] = !0, j++);
|
|
504
499
|
}
|
|
505
500
|
}
|
|
506
|
-
return g[x] == null ?
|
|
501
|
+
return g[x] == null ? C ? g[x] === null ? new w("The " + D + " `" + E + "` is marked as required " + ("in `" + T + "`, but its value is `null`.")) : new w("The " + D + " `" + E + "` is marked as required in " + ("`" + T + "`, but its value is `undefined`.")) : null : o(g, x, T, D, E);
|
|
507
502
|
}
|
|
508
503
|
var h = v.bind(null, !1);
|
|
509
504
|
return h.isRequired = v.bind(null, !0), h;
|
|
510
505
|
}
|
|
511
506
|
function f(o) {
|
|
512
|
-
function
|
|
513
|
-
var
|
|
514
|
-
if (
|
|
515
|
-
var E =
|
|
507
|
+
function l(j, v, h, C, g, x) {
|
|
508
|
+
var T = j[v], D = W(T);
|
|
509
|
+
if (D !== o) {
|
|
510
|
+
var E = X(T);
|
|
516
511
|
return new w(
|
|
517
|
-
"Invalid " +
|
|
512
|
+
"Invalid " + C + " `" + g + "` of type " + ("`" + E + "` supplied to `" + h + "`, expected ") + ("`" + o + "`."),
|
|
518
513
|
{ expectedType: o }
|
|
519
514
|
);
|
|
520
515
|
}
|
|
521
516
|
return null;
|
|
522
517
|
}
|
|
523
|
-
return S(
|
|
518
|
+
return S(l);
|
|
524
519
|
}
|
|
525
520
|
function F() {
|
|
526
|
-
return S(
|
|
521
|
+
return S(i);
|
|
527
522
|
}
|
|
528
|
-
function
|
|
529
|
-
function
|
|
523
|
+
function M(o) {
|
|
524
|
+
function l(j, v, h, C, g) {
|
|
530
525
|
if (typeof o != "function")
|
|
531
526
|
return new w("Property `" + g + "` of component `" + h + "` has invalid PropType notation inside arrayOf.");
|
|
532
527
|
var x = j[v];
|
|
533
528
|
if (!Array.isArray(x)) {
|
|
534
|
-
var
|
|
535
|
-
return new w("Invalid " +
|
|
529
|
+
var T = W(x);
|
|
530
|
+
return new w("Invalid " + C + " `" + g + "` of type " + ("`" + T + "` supplied to `" + h + "`, expected an array."));
|
|
536
531
|
}
|
|
537
|
-
for (var
|
|
538
|
-
var E = o(x,
|
|
532
|
+
for (var D = 0; D < x.length; D++) {
|
|
533
|
+
var E = o(x, D, h, C, g + "[" + D + "]", r);
|
|
539
534
|
if (E instanceof Error)
|
|
540
535
|
return E;
|
|
541
536
|
}
|
|
542
537
|
return null;
|
|
543
538
|
}
|
|
544
|
-
return S(
|
|
539
|
+
return S(l);
|
|
545
540
|
}
|
|
546
541
|
function ne() {
|
|
547
|
-
function o(
|
|
548
|
-
var g =
|
|
542
|
+
function o(l, j, v, h, C) {
|
|
543
|
+
var g = l[j];
|
|
549
544
|
if (!d(g)) {
|
|
550
545
|
var x = W(g);
|
|
551
|
-
return new w("Invalid " + h + " `" +
|
|
546
|
+
return new w("Invalid " + h + " `" + C + "` of type " + ("`" + x + "` supplied to `" + v + "`, expected a single ReactElement."));
|
|
552
547
|
}
|
|
553
548
|
return null;
|
|
554
549
|
}
|
|
555
550
|
return S(o);
|
|
556
551
|
}
|
|
557
552
|
function re() {
|
|
558
|
-
function o(
|
|
559
|
-
var g =
|
|
553
|
+
function o(l, j, v, h, C) {
|
|
554
|
+
var g = l[j];
|
|
560
555
|
if (!n.isValidElementType(g)) {
|
|
561
556
|
var x = W(g);
|
|
562
|
-
return new w("Invalid " + h + " `" +
|
|
557
|
+
return new w("Invalid " + h + " `" + C + "` of type " + ("`" + x + "` supplied to `" + v + "`, expected a single ReactElement type."));
|
|
563
558
|
}
|
|
564
559
|
return null;
|
|
565
560
|
}
|
|
566
561
|
return S(o);
|
|
567
562
|
}
|
|
568
|
-
function
|
|
569
|
-
function
|
|
563
|
+
function I(o) {
|
|
564
|
+
function l(j, v, h, C, g) {
|
|
570
565
|
if (!(j[v] instanceof o)) {
|
|
571
|
-
var x = o.name || m,
|
|
572
|
-
return new w("Invalid " +
|
|
566
|
+
var x = o.name || m, T = dt(j[v]);
|
|
567
|
+
return new w("Invalid " + C + " `" + g + "` of type " + ("`" + T + "` supplied to `" + h + "`, expected ") + ("instance of `" + x + "`."));
|
|
573
568
|
}
|
|
574
569
|
return null;
|
|
575
570
|
}
|
|
576
|
-
return S(
|
|
571
|
+
return S(l);
|
|
577
572
|
}
|
|
578
573
|
function N(o) {
|
|
579
574
|
if (!Array.isArray(o))
|
|
580
575
|
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? s(
|
|
581
576
|
"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])."
|
|
582
|
-
) : s("Invalid argument supplied to oneOf, expected an array.")),
|
|
583
|
-
function
|
|
584
|
-
for (var x = j[v],
|
|
585
|
-
if (
|
|
577
|
+
) : s("Invalid argument supplied to oneOf, expected an array.")), i;
|
|
578
|
+
function l(j, v, h, C, g) {
|
|
579
|
+
for (var x = j[v], T = 0; T < o.length; T++)
|
|
580
|
+
if (O(x, o[T]))
|
|
586
581
|
return null;
|
|
587
|
-
var
|
|
588
|
-
var Y =
|
|
589
|
-
return Y === "symbol" ? String(
|
|
582
|
+
var D = JSON.stringify(o, function(_, B) {
|
|
583
|
+
var Y = X(B);
|
|
584
|
+
return Y === "symbol" ? String(B) : B;
|
|
590
585
|
});
|
|
591
|
-
return new w("Invalid " +
|
|
586
|
+
return new w("Invalid " + C + " `" + g + "` of value `" + String(x) + "` " + ("supplied to `" + h + "`, expected one of " + D + "."));
|
|
592
587
|
}
|
|
593
|
-
return S(
|
|
588
|
+
return S(l);
|
|
594
589
|
}
|
|
595
590
|
function L(o) {
|
|
596
|
-
function
|
|
591
|
+
function l(j, v, h, C, g) {
|
|
597
592
|
if (typeof o != "function")
|
|
598
593
|
return new w("Property `" + g + "` of component `" + h + "` has invalid PropType notation inside objectOf.");
|
|
599
|
-
var x = j[v],
|
|
600
|
-
if (
|
|
601
|
-
return new w("Invalid " +
|
|
602
|
-
for (var
|
|
603
|
-
if (
|
|
604
|
-
var E = o(x,
|
|
594
|
+
var x = j[v], T = W(x);
|
|
595
|
+
if (T !== "object")
|
|
596
|
+
return new w("Invalid " + C + " `" + g + "` of type " + ("`" + T + "` supplied to `" + h + "`, expected an object."));
|
|
597
|
+
for (var D in x)
|
|
598
|
+
if (a(x, D)) {
|
|
599
|
+
var E = o(x, D, h, C, g + "." + D, r);
|
|
605
600
|
if (E instanceof Error)
|
|
606
601
|
return E;
|
|
607
602
|
}
|
|
608
603
|
return null;
|
|
609
604
|
}
|
|
610
|
-
return S(
|
|
605
|
+
return S(l);
|
|
611
606
|
}
|
|
612
|
-
function
|
|
607
|
+
function st(o) {
|
|
613
608
|
if (!Array.isArray(o))
|
|
614
|
-
return process.env.NODE_ENV !== "production" && s("Invalid argument supplied to oneOfType, expected an instance of array."),
|
|
615
|
-
for (var
|
|
616
|
-
var j = o[
|
|
609
|
+
return process.env.NODE_ENV !== "production" && s("Invalid argument supplied to oneOfType, expected an instance of array."), i;
|
|
610
|
+
for (var l = 0; l < o.length; l++) {
|
|
611
|
+
var j = o[l];
|
|
617
612
|
if (typeof j != "function")
|
|
618
613
|
return s(
|
|
619
|
-
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " +
|
|
620
|
-
),
|
|
614
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ct(j) + " at index " + l + "."
|
|
615
|
+
), i;
|
|
621
616
|
}
|
|
622
|
-
function v(h,
|
|
623
|
-
for (var
|
|
624
|
-
var
|
|
625
|
-
if (
|
|
617
|
+
function v(h, C, g, x, T) {
|
|
618
|
+
for (var D = [], E = 0; E < o.length; E++) {
|
|
619
|
+
var _ = o[E], B = _(h, C, g, x, T, r);
|
|
620
|
+
if (B == null)
|
|
626
621
|
return null;
|
|
627
|
-
|
|
622
|
+
B.data && a(B.data, "expectedType") && D.push(B.data.expectedType);
|
|
628
623
|
}
|
|
629
|
-
var Y =
|
|
630
|
-
return new w("Invalid " + x + " `" +
|
|
624
|
+
var Y = D.length > 0 ? ", expected one of type [" + D.join(", ") + "]" : "";
|
|
625
|
+
return new w("Invalid " + x + " `" + T + "` supplied to " + ("`" + g + "`" + Y + "."));
|
|
631
626
|
}
|
|
632
627
|
return S(v);
|
|
633
628
|
}
|
|
634
|
-
function
|
|
635
|
-
function o(
|
|
636
|
-
return
|
|
629
|
+
function ot() {
|
|
630
|
+
function o(l, j, v, h, C) {
|
|
631
|
+
return Z(l[j]) ? null : new w("Invalid " + h + " `" + C + "` supplied to " + ("`" + v + "`, expected a ReactNode."));
|
|
637
632
|
}
|
|
638
633
|
return S(o);
|
|
639
634
|
}
|
|
640
|
-
function
|
|
635
|
+
function je(o, l, j, v, h) {
|
|
641
636
|
return new w(
|
|
642
|
-
(o || "React class") + ": " +
|
|
637
|
+
(o || "React class") + ": " + l + " type `" + j + "." + v + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + h + "`."
|
|
643
638
|
);
|
|
644
639
|
}
|
|
645
|
-
function
|
|
646
|
-
function
|
|
647
|
-
var x = j[v],
|
|
648
|
-
if (
|
|
649
|
-
return new w("Invalid " +
|
|
650
|
-
for (var
|
|
651
|
-
var E = o[
|
|
640
|
+
function it(o) {
|
|
641
|
+
function l(j, v, h, C, g) {
|
|
642
|
+
var x = j[v], T = W(x);
|
|
643
|
+
if (T !== "object")
|
|
644
|
+
return new w("Invalid " + C + " `" + g + "` of type `" + T + "` " + ("supplied to `" + h + "`, expected `object`."));
|
|
645
|
+
for (var D in o) {
|
|
646
|
+
var E = o[D];
|
|
652
647
|
if (typeof E != "function")
|
|
653
|
-
return
|
|
654
|
-
var
|
|
655
|
-
if (
|
|
656
|
-
return
|
|
648
|
+
return je(h, C, g, D, X(E));
|
|
649
|
+
var _ = E(x, D, h, C, g + "." + D, r);
|
|
650
|
+
if (_)
|
|
651
|
+
return _;
|
|
657
652
|
}
|
|
658
653
|
return null;
|
|
659
654
|
}
|
|
660
|
-
return S(
|
|
655
|
+
return S(l);
|
|
661
656
|
}
|
|
662
|
-
function
|
|
663
|
-
function
|
|
664
|
-
var x = j[v],
|
|
665
|
-
if (
|
|
666
|
-
return new w("Invalid " +
|
|
667
|
-
var
|
|
668
|
-
for (var E in
|
|
669
|
-
var
|
|
670
|
-
if (
|
|
671
|
-
return
|
|
672
|
-
if (!
|
|
657
|
+
function at(o) {
|
|
658
|
+
function l(j, v, h, C, g) {
|
|
659
|
+
var x = j[v], T = W(x);
|
|
660
|
+
if (T !== "object")
|
|
661
|
+
return new w("Invalid " + C + " `" + g + "` of type `" + T + "` " + ("supplied to `" + h + "`, expected `object`."));
|
|
662
|
+
var D = t({}, j[v], o);
|
|
663
|
+
for (var E in D) {
|
|
664
|
+
var _ = o[E];
|
|
665
|
+
if (a(o, E) && typeof _ != "function")
|
|
666
|
+
return je(h, C, g, E, X(_));
|
|
667
|
+
if (!_)
|
|
673
668
|
return new w(
|
|
674
|
-
"Invalid " +
|
|
669
|
+
"Invalid " + C + " `" + g + "` key `" + E + "` supplied to `" + h + "`.\nBad object: " + JSON.stringify(j[v], null, " ") + `
|
|
675
670
|
Valid keys: ` + JSON.stringify(Object.keys(o), null, " ")
|
|
676
671
|
);
|
|
677
|
-
var
|
|
678
|
-
if (
|
|
679
|
-
return
|
|
672
|
+
var B = _(x, E, h, C, g + "." + E, r);
|
|
673
|
+
if (B)
|
|
674
|
+
return B;
|
|
680
675
|
}
|
|
681
676
|
return null;
|
|
682
677
|
}
|
|
683
|
-
return S(
|
|
678
|
+
return S(l);
|
|
684
679
|
}
|
|
685
|
-
function
|
|
680
|
+
function Z(o) {
|
|
686
681
|
switch (typeof o) {
|
|
687
682
|
case "number":
|
|
688
683
|
case "string":
|
|
@@ -692,20 +687,20 @@ Valid keys: ` + JSON.stringify(Object.keys(o), null, " ")
|
|
|
692
687
|
return !o;
|
|
693
688
|
case "object":
|
|
694
689
|
if (Array.isArray(o))
|
|
695
|
-
return o.every(
|
|
690
|
+
return o.every(Z);
|
|
696
691
|
if (o === null || d(o))
|
|
697
692
|
return !0;
|
|
698
|
-
var
|
|
699
|
-
if (
|
|
700
|
-
var j =
|
|
701
|
-
if (
|
|
693
|
+
var l = u(o);
|
|
694
|
+
if (l) {
|
|
695
|
+
var j = l.call(o), v;
|
|
696
|
+
if (l !== o.entries) {
|
|
702
697
|
for (; !(v = j.next()).done; )
|
|
703
|
-
if (!
|
|
698
|
+
if (!Z(v.value))
|
|
704
699
|
return !1;
|
|
705
700
|
} else
|
|
706
701
|
for (; !(v = j.next()).done; ) {
|
|
707
702
|
var h = v.value;
|
|
708
|
-
if (h && !
|
|
703
|
+
if (h && !Z(h[1]))
|
|
709
704
|
return !1;
|
|
710
705
|
}
|
|
711
706
|
} else
|
|
@@ -715,57 +710,57 @@ Valid keys: ` + JSON.stringify(Object.keys(o), null, " ")
|
|
|
715
710
|
return !1;
|
|
716
711
|
}
|
|
717
712
|
}
|
|
718
|
-
function
|
|
719
|
-
return o === "symbol" ? !0 :
|
|
713
|
+
function lt(o, l) {
|
|
714
|
+
return o === "symbol" ? !0 : l ? l["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && l instanceof Symbol : !1;
|
|
720
715
|
}
|
|
721
716
|
function W(o) {
|
|
722
|
-
var
|
|
723
|
-
return Array.isArray(o) ? "array" : o instanceof RegExp ? "object" :
|
|
717
|
+
var l = typeof o;
|
|
718
|
+
return Array.isArray(o) ? "array" : o instanceof RegExp ? "object" : lt(l, o) ? "symbol" : l;
|
|
724
719
|
}
|
|
725
|
-
function
|
|
720
|
+
function X(o) {
|
|
726
721
|
if (typeof o > "u" || o === null)
|
|
727
722
|
return "" + o;
|
|
728
|
-
var
|
|
729
|
-
if (
|
|
723
|
+
var l = W(o);
|
|
724
|
+
if (l === "object") {
|
|
730
725
|
if (o instanceof Date)
|
|
731
726
|
return "date";
|
|
732
727
|
if (o instanceof RegExp)
|
|
733
728
|
return "regexp";
|
|
734
729
|
}
|
|
735
|
-
return
|
|
730
|
+
return l;
|
|
736
731
|
}
|
|
737
|
-
function
|
|
738
|
-
var
|
|
739
|
-
switch (
|
|
732
|
+
function ct(o) {
|
|
733
|
+
var l = X(o);
|
|
734
|
+
switch (l) {
|
|
740
735
|
case "array":
|
|
741
736
|
case "object":
|
|
742
|
-
return "an " +
|
|
737
|
+
return "an " + l;
|
|
743
738
|
case "boolean":
|
|
744
739
|
case "date":
|
|
745
740
|
case "regexp":
|
|
746
|
-
return "a " +
|
|
741
|
+
return "a " + l;
|
|
747
742
|
default:
|
|
748
|
-
return
|
|
743
|
+
return l;
|
|
749
744
|
}
|
|
750
745
|
}
|
|
751
|
-
function
|
|
746
|
+
function dt(o) {
|
|
752
747
|
return !o.constructor || !o.constructor.name ? m : o.constructor.name;
|
|
753
748
|
}
|
|
754
|
-
return k.checkPropTypes =
|
|
755
|
-
},
|
|
749
|
+
return k.checkPropTypes = c, k.resetWarningCache = c.resetWarningCache, k.PropTypes = k, k;
|
|
750
|
+
}, ce;
|
|
756
751
|
}
|
|
757
|
-
var
|
|
758
|
-
function
|
|
752
|
+
var de, _e;
|
|
753
|
+
function Ln() {
|
|
759
754
|
if (_e)
|
|
760
|
-
return
|
|
755
|
+
return de;
|
|
761
756
|
_e = 1;
|
|
762
|
-
var n =
|
|
757
|
+
var n = xe();
|
|
763
758
|
function t() {
|
|
764
759
|
}
|
|
765
760
|
function r() {
|
|
766
761
|
}
|
|
767
|
-
return r.resetWarningCache = t,
|
|
768
|
-
function i
|
|
762
|
+
return r.resetWarningCache = t, de = function() {
|
|
763
|
+
function a(i, d, y, b, p, u) {
|
|
769
764
|
if (u !== n) {
|
|
770
765
|
var m = new Error(
|
|
771
766
|
"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"
|
|
@@ -773,48 +768,48 @@ function Fn() {
|
|
|
773
768
|
throw m.name = "Invariant Violation", m;
|
|
774
769
|
}
|
|
775
770
|
}
|
|
776
|
-
|
|
777
|
-
function
|
|
778
|
-
return
|
|
771
|
+
a.isRequired = a;
|
|
772
|
+
function c() {
|
|
773
|
+
return a;
|
|
779
774
|
}
|
|
780
775
|
var s = {
|
|
781
|
-
array:
|
|
782
|
-
bigint:
|
|
783
|
-
bool:
|
|
784
|
-
func:
|
|
785
|
-
number:
|
|
786
|
-
object:
|
|
787
|
-
string:
|
|
788
|
-
symbol:
|
|
789
|
-
any:
|
|
790
|
-
arrayOf:
|
|
791
|
-
element:
|
|
792
|
-
elementType:
|
|
793
|
-
instanceOf:
|
|
794
|
-
node:
|
|
795
|
-
objectOf:
|
|
796
|
-
oneOf:
|
|
797
|
-
oneOfType:
|
|
798
|
-
shape:
|
|
799
|
-
exact:
|
|
776
|
+
array: a,
|
|
777
|
+
bigint: a,
|
|
778
|
+
bool: a,
|
|
779
|
+
func: a,
|
|
780
|
+
number: a,
|
|
781
|
+
object: a,
|
|
782
|
+
string: a,
|
|
783
|
+
symbol: a,
|
|
784
|
+
any: a,
|
|
785
|
+
arrayOf: c,
|
|
786
|
+
element: a,
|
|
787
|
+
elementType: a,
|
|
788
|
+
instanceOf: c,
|
|
789
|
+
node: a,
|
|
790
|
+
objectOf: c,
|
|
791
|
+
oneOf: c,
|
|
792
|
+
oneOfType: c,
|
|
793
|
+
shape: c,
|
|
794
|
+
exact: c,
|
|
800
795
|
checkPropTypes: r,
|
|
801
796
|
resetWarningCache: t
|
|
802
797
|
};
|
|
803
798
|
return s.PropTypes = s, s;
|
|
804
|
-
},
|
|
799
|
+
}, de;
|
|
805
800
|
}
|
|
806
801
|
if (process.env.NODE_ENV !== "production") {
|
|
807
|
-
var
|
|
808
|
-
|
|
802
|
+
var Fn = qe, Wn = !0;
|
|
803
|
+
pe.exports = Nn()(Fn.isElement, Wn);
|
|
809
804
|
} else
|
|
810
|
-
|
|
811
|
-
var
|
|
812
|
-
const P = /* @__PURE__ */
|
|
813
|
-
let
|
|
814
|
-
typeof document < "u" && (
|
|
815
|
-
typeof window < "u" && (
|
|
816
|
-
const
|
|
817
|
-
class
|
|
805
|
+
pe.exports = Ln()();
|
|
806
|
+
var $n = pe.exports;
|
|
807
|
+
const P = /* @__PURE__ */ wn($n);
|
|
808
|
+
let Qe, et;
|
|
809
|
+
typeof document < "u" && (Qe = document);
|
|
810
|
+
typeof window < "u" && (et = window);
|
|
811
|
+
const tt = z.createContext({ document: Qe, window: et }), be = () => z.useContext(tt), { Provider: qn, Consumer: Gr } = tt;
|
|
812
|
+
class nt extends Ne {
|
|
818
813
|
componentDidMount() {
|
|
819
814
|
this.props.contentDidMount();
|
|
820
815
|
}
|
|
@@ -822,21 +817,21 @@ class st extends Le {
|
|
|
822
817
|
this.props.contentDidUpdate();
|
|
823
818
|
}
|
|
824
819
|
render() {
|
|
825
|
-
return
|
|
820
|
+
return ht.only(this.props.children);
|
|
826
821
|
}
|
|
827
822
|
}
|
|
828
|
-
U(
|
|
823
|
+
U(nt, "propTypes", {
|
|
829
824
|
children: P.element.isRequired,
|
|
830
825
|
contentDidMount: P.func.isRequired,
|
|
831
826
|
contentDidUpdate: P.func.isRequired
|
|
832
827
|
});
|
|
833
|
-
class
|
|
834
|
-
constructor(r,
|
|
835
|
-
super(r,
|
|
828
|
+
class fe extends Ne {
|
|
829
|
+
constructor(r, a) {
|
|
830
|
+
super(r, a);
|
|
836
831
|
U(this, "setRef", (r) => {
|
|
837
832
|
this.nodeRef.current = r;
|
|
838
|
-
const { forwardedRef:
|
|
839
|
-
typeof
|
|
833
|
+
const { forwardedRef: a } = this.props;
|
|
834
|
+
typeof a == "function" ? a(r) : a && (a.current = r);
|
|
840
835
|
});
|
|
841
836
|
U(this, "handleLoad", () => {
|
|
842
837
|
clearInterval(this.loadCheck), this.state.iframeLoaded || this.setState({ iframeLoaded: !0 });
|
|
@@ -846,7 +841,7 @@ class he extends Le {
|
|
|
846
841
|
U(this, "loadCheck", () => setInterval(() => {
|
|
847
842
|
this.handleLoad();
|
|
848
843
|
}, 500));
|
|
849
|
-
this._isMounted = !1, this.nodeRef =
|
|
844
|
+
this._isMounted = !1, this.nodeRef = z.createRef(), this.state = { iframeLoaded: !1 };
|
|
850
845
|
}
|
|
851
846
|
componentDidMount() {
|
|
852
847
|
this._isMounted = !0, this.getDoc() && this.nodeRef.current.contentWindow.addEventListener("DOMContentLoaded", this.handleLoad);
|
|
@@ -867,8 +862,8 @@ class he extends Le {
|
|
|
867
862
|
const r = this.getDoc();
|
|
868
863
|
if (!r)
|
|
869
864
|
return null;
|
|
870
|
-
const
|
|
871
|
-
return [
|
|
865
|
+
const a = this.props.contentDidMount, c = this.props.contentDidUpdate, s = r.defaultView || r.parentView, i = /* @__PURE__ */ e.jsx(nt, { contentDidMount: a, contentDidUpdate: c, children: /* @__PURE__ */ e.jsx(qn, { value: { document: r, window: s }, children: /* @__PURE__ */ e.jsx("div", { className: "frame-content", children: this.props.children }) }) }), d = this.getMountTarget();
|
|
866
|
+
return [Se.createPortal(this.props.head, this.getDoc().head), Se.createPortal(i, d)];
|
|
872
867
|
}
|
|
873
868
|
render() {
|
|
874
869
|
const r = {
|
|
@@ -884,7 +879,7 @@ class he extends Le {
|
|
|
884
879
|
// also inject into the body and can mess up React. For this reason
|
|
885
880
|
// initialContent is expected to have a div inside of the body
|
|
886
881
|
// element that we render react into.
|
|
887
|
-
U(
|
|
882
|
+
U(fe, "propTypes", {
|
|
888
883
|
style: P.object,
|
|
889
884
|
// eslint-disable-line
|
|
890
885
|
head: P.node,
|
|
@@ -893,7 +888,7 @@ U(he, "propTypes", {
|
|
|
893
888
|
contentDidMount: P.func,
|
|
894
889
|
contentDidUpdate: P.func,
|
|
895
890
|
children: P.oneOfType([P.element, P.arrayOf(P.element)])
|
|
896
|
-
}), U(
|
|
891
|
+
}), U(fe, "defaultProps", {
|
|
897
892
|
style: {},
|
|
898
893
|
head: null,
|
|
899
894
|
children: void 0,
|
|
@@ -904,30 +899,30 @@ U(he, "propTypes", {
|
|
|
904
899
|
},
|
|
905
900
|
initialContent: '<!DOCTYPE html><html><head></head><body><div class="frame-root"></div></body></html>'
|
|
906
901
|
});
|
|
907
|
-
const
|
|
908
|
-
const { document: t } =
|
|
909
|
-
return
|
|
902
|
+
const Un = z.forwardRef((n, t) => /* @__PURE__ */ e.jsx(fe, { ...n, forwardedRef: t })), zn = ({ children: n }) => {
|
|
903
|
+
const { document: t } = be(), [r] = H(), [a, c] = K();
|
|
904
|
+
return R(() => {
|
|
910
905
|
setTimeout(() => {
|
|
911
|
-
if (!q(
|
|
906
|
+
if (!q(a))
|
|
912
907
|
return;
|
|
913
|
-
const s =
|
|
908
|
+
const s = rt(t, ee(r));
|
|
914
909
|
if (s) {
|
|
915
|
-
const
|
|
916
|
-
if (
|
|
910
|
+
const i = s.getAttribute("data-style-prop");
|
|
911
|
+
if (i) {
|
|
917
912
|
const d = s.getAttribute("data-style-id"), y = s.getAttribute("data-block-parent");
|
|
918
|
-
|
|
913
|
+
c([{ id: d, prop: i, blockId: y }]);
|
|
919
914
|
}
|
|
920
915
|
}
|
|
921
916
|
}, 100);
|
|
922
|
-
}, [t, r,
|
|
923
|
-
},
|
|
924
|
-
const { window: n } =
|
|
925
|
-
S.key === "Enter" && (S.preventDefault(), t.length === 1 &&
|
|
917
|
+
}, [t, r, c, a]), /* @__PURE__ */ e.jsx("div", { id: "canvas", className: "relative h-screen max-w-full outline-2", children: n });
|
|
918
|
+
}, rt = (n, t) => n.querySelector(`[data-block-id="${t}"]`), Hn = () => {
|
|
919
|
+
const { window: n } = be(), [t, r] = H(), [, a] = K(), { undo: c, redo: s } = ye(), i = Ue(), [, d] = At(), [, y] = Bt(), { pasteBlocks: b } = Pt(), [, p] = ze(), u = He(), { savePage: m } = Rt(), [k] = J(_t), [, O] = J(Mt), w = (S) => {
|
|
920
|
+
S.key === "Enter" && (S.preventDefault(), t.length === 1 && O(ee(t)));
|
|
926
921
|
};
|
|
927
|
-
return
|
|
922
|
+
return R(() => {
|
|
928
923
|
const S = (f) => {
|
|
929
924
|
if (f.key === "Escape") {
|
|
930
|
-
r([]),
|
|
925
|
+
r([]), a([]);
|
|
931
926
|
return;
|
|
932
927
|
}
|
|
933
928
|
if (w(f), !k && (f.key === "Delete" || f.key === "Backspace") && (f.preventDefault(), u(t)), f.ctrlKey || f.metaKey) {
|
|
@@ -936,7 +931,7 @@ const Hn = H.forwardRef((n, t) => /* @__PURE__ */ e.jsx(he, { ...n, forwardedRef
|
|
|
936
931
|
return !0;
|
|
937
932
|
f.preventDefault();
|
|
938
933
|
}
|
|
939
|
-
f.key === "s" && (f.stopPropagation(), f.preventDefault(), m()), f.key === "z" &&
|
|
934
|
+
f.key === "s" && (f.stopPropagation(), f.preventDefault(), m()), f.key === "z" && c(), f.key === "y" && s(), f.key === "d" && i(t), f.key === "x" && d(t), f.key === "c" && y(t), f.key === "v" && t.length > 0 && b(t[0]);
|
|
940
935
|
}
|
|
941
936
|
};
|
|
942
937
|
return n.removeEventListener("keydown", S), n.addEventListener("keydown", S), () => {
|
|
@@ -945,11 +940,11 @@ const Hn = H.forwardRef((n, t) => /* @__PURE__ */ e.jsx(he, { ...n, forwardedRef
|
|
|
945
940
|
}, [
|
|
946
941
|
t,
|
|
947
942
|
r,
|
|
948
|
-
|
|
943
|
+
c,
|
|
949
944
|
u,
|
|
950
945
|
p,
|
|
951
946
|
s,
|
|
952
|
-
|
|
947
|
+
i,
|
|
953
948
|
d,
|
|
954
949
|
y,
|
|
955
950
|
b,
|
|
@@ -957,8 +952,8 @@ const Hn = H.forwardRef((n, t) => /* @__PURE__ */ e.jsx(he, { ...n, forwardedRef
|
|
|
957
952
|
m,
|
|
958
953
|
n
|
|
959
954
|
]), null;
|
|
960
|
-
},
|
|
961
|
-
const [, r] =
|
|
955
|
+
}, Kn = ({ block: n, label: t }) => {
|
|
956
|
+
const [, r] = mn(() => ({
|
|
962
957
|
type: "CANVAS_BLOCK",
|
|
963
958
|
item: n
|
|
964
959
|
}));
|
|
@@ -971,71 +966,68 @@ const Hn = H.forwardRef((n, t) => /* @__PURE__ */ e.jsx(he, { ...n, forwardedRef
|
|
|
971
966
|
console.log("drag start");
|
|
972
967
|
},
|
|
973
968
|
children: [
|
|
974
|
-
/* @__PURE__ */ e.jsx(
|
|
969
|
+
/* @__PURE__ */ e.jsx(St, {}),
|
|
975
970
|
t
|
|
976
971
|
]
|
|
977
972
|
}
|
|
978
973
|
);
|
|
979
|
-
},
|
|
980
|
-
|
|
981
|
-
block: t
|
|
982
|
-
}) => {
|
|
983
|
-
const r = Ge(), i = Ye(), [, l] = z(), [, s] = K(), { floatingStyles: a, refs: d, update: y } = yn({
|
|
974
|
+
}, Yn = ({ selectedBlockElement: n, block: t }) => {
|
|
975
|
+
const r = He(), a = Ue(), [, c] = H(), [, s] = K(), { floatingStyles: i, refs: d, update: y } = fn({
|
|
984
976
|
placement: "top-start",
|
|
985
|
-
middleware: [
|
|
977
|
+
middleware: [hn(), pn()],
|
|
986
978
|
elements: {
|
|
987
979
|
reference: n
|
|
988
980
|
}
|
|
989
981
|
});
|
|
990
|
-
|
|
991
|
-
const b =
|
|
982
|
+
vn(n, () => y(), n !== null);
|
|
983
|
+
const b = A(t, "_parent", null), p = q(A(t, "_name", "")) ? A(t, "_type", "") : A(t, "_name", "");
|
|
992
984
|
return !n || !t ? null : /* @__PURE__ */ e.jsxs(
|
|
993
985
|
"div",
|
|
994
986
|
{
|
|
995
987
|
role: "button",
|
|
996
988
|
tabIndex: 0,
|
|
997
989
|
ref: d.setFloating,
|
|
998
|
-
style:
|
|
990
|
+
style: i,
|
|
999
991
|
onClick: (u) => {
|
|
1000
992
|
u.stopPropagation(), u.preventDefault();
|
|
1001
993
|
},
|
|
1002
994
|
onKeyDown: (u) => u.stopPropagation(),
|
|
1003
995
|
className: "z-50 flex h-6 items-center bg-blue-500 py-2 text-xs text-white",
|
|
1004
996
|
children: [
|
|
1005
|
-
/* @__PURE__ */ e.jsx(
|
|
997
|
+
/* @__PURE__ */ e.jsx(Kn, { label: p, block: t }),
|
|
1006
998
|
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 px-1 ", children: [
|
|
1007
999
|
b && /* @__PURE__ */ e.jsx(
|
|
1008
|
-
|
|
1000
|
+
Ct,
|
|
1009
1001
|
{
|
|
1010
1002
|
className: "hover:scale-105 ",
|
|
1011
1003
|
onClick: () => {
|
|
1012
|
-
s([]),
|
|
1004
|
+
s([]), c([b]);
|
|
1013
1005
|
}
|
|
1014
1006
|
}
|
|
1015
1007
|
),
|
|
1016
|
-
|
|
1017
|
-
|
|
1008
|
+
yn(A(t, "_type", "")) ? /* @__PURE__ */ e.jsx(Tt, { className: "hover:scale-105 ", onClick: () => a([t == null ? void 0 : t._id]) }) : null,
|
|
1009
|
+
gn(A(t, "_type", "")) ? /* @__PURE__ */ e.jsx(Et, { className: "hover:scale-105 ", onClick: () => r([t == null ? void 0 : t._id]) }) : null
|
|
1018
1010
|
] })
|
|
1019
1011
|
]
|
|
1020
1012
|
}
|
|
1021
1013
|
);
|
|
1022
|
-
},
|
|
1023
|
-
const [t] =
|
|
1024
|
-
|
|
1014
|
+
}, Vn = ({ model: n }) => {
|
|
1015
|
+
const [t] = Nt(), [r] = H(), [a] = Ye(), [c] = ge(), [s] = K(), { document: i, window: d } = be(), [y] = $(i == null ? void 0 : i.getElementById("highlighted-block")), [b] = $(
|
|
1016
|
+
i == null ? void 0 : i.getElementById("selected-block")
|
|
1025
1017
|
), [p] = $(
|
|
1026
|
-
|
|
1018
|
+
i == null ? void 0 : i.getElementById("selected-styling-block")
|
|
1027
1019
|
);
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
}, [
|
|
1031
|
-
const u =
|
|
1032
|
-
return
|
|
1033
|
-
const k =
|
|
1034
|
-
colors: [k,
|
|
1020
|
+
R(() => {
|
|
1021
|
+
a ? i == null || i.documentElement.classList.add("dark") : i == null || i.documentElement.classList.remove("dark");
|
|
1022
|
+
}, [a, i]);
|
|
1023
|
+
const u = A(t, "headingFont", "DM Sans"), m = A(t, "bodyFont", "DM Sans");
|
|
1024
|
+
return R(() => {
|
|
1025
|
+
const k = A(t, "primaryColor", "#000"), O = A(t, "secondaryColor", "#FFF"), w = xn({
|
|
1026
|
+
colors: [k, O],
|
|
1035
1027
|
names: ["primary", "secondary"]
|
|
1036
1028
|
});
|
|
1037
|
-
w.primary.DEFAULT = k, w.secondary.DEFAULT =
|
|
1038
|
-
const S =
|
|
1029
|
+
w.primary.DEFAULT = k, w.secondary.DEFAULT = O;
|
|
1030
|
+
const S = A(t, "roundedCorners", "0");
|
|
1039
1031
|
!d || !d.tailwind || (d.tailwind.config = {
|
|
1040
1032
|
darkMode: "class",
|
|
1041
1033
|
theme: {
|
|
@@ -1053,33 +1045,33 @@ const Hn = H.forwardRef((n, t) => /* @__PURE__ */ e.jsx(he, { ...n, forwardedRef
|
|
|
1053
1045
|
plugins: [
|
|
1054
1046
|
// @ts-ignore
|
|
1055
1047
|
d.tailwind.plugin.withOptions(({ prefix: f = "ui" } = {}) => ({ addVariant: F }) => {
|
|
1056
|
-
for (const
|
|
1057
|
-
F(`${f}-${
|
|
1058
|
-
`&[data-headlessui-state~="${
|
|
1059
|
-
`:where([data-headlessui-state~="${
|
|
1060
|
-
]), F(`${f}-not-${
|
|
1061
|
-
`&[data-headlessui-state]:not([data-headlessui-state~="${
|
|
1062
|
-
`:where([data-headlessui-state]:not([data-headlessui-state~="${
|
|
1048
|
+
for (const M of ["open", "checked", "selected", "active", "disabled"])
|
|
1049
|
+
F(`${f}-${M}`, [
|
|
1050
|
+
`&[data-headlessui-state~="${M}"]`,
|
|
1051
|
+
`:where([data-headlessui-state~="${M}"]) &`
|
|
1052
|
+
]), F(`${f}-not-${M}`, [
|
|
1053
|
+
`&[data-headlessui-state]:not([data-headlessui-state~="${M}"])`,
|
|
1054
|
+
`:where([data-headlessui-state]:not([data-headlessui-state~="${M}"])) &:not([data-headlessui-state])`
|
|
1063
1055
|
]);
|
|
1064
1056
|
})
|
|
1065
1057
|
]
|
|
1066
1058
|
});
|
|
1067
|
-
}, [t, d, u, m]),
|
|
1059
|
+
}, [t, d, u, m]), R(() => {
|
|
1068
1060
|
b && (b.textContent = `${Q(r, (k) => `[data-block-id="${k}"]`).join(",")}{
|
|
1069
1061
|
outline: 1px solid ${r.length === 1 ? "#42a1fc" : "orange"} !important; outline-offset: -1px;
|
|
1070
1062
|
}`);
|
|
1071
|
-
}, [r, b]),
|
|
1072
|
-
y && (y.textContent =
|
|
1073
|
-
}, [
|
|
1063
|
+
}, [r, b]), R(() => {
|
|
1064
|
+
y && (y.textContent = c ? `[data-style-id="${c}"]{ outline: 1px solid orange !important; outline-offset: -1px;}` : "");
|
|
1065
|
+
}, [c, r, y]), R(() => {
|
|
1074
1066
|
p && (p.textContent = `${Q(s, ({ id: k }) => `[data-style-id="${k}"]`).join(",")}{
|
|
1075
1067
|
outline: 1px solid orange !important; outline-offset: -1px;
|
|
1076
1068
|
}`);
|
|
1077
|
-
}, [s, p]),
|
|
1069
|
+
}, [s, p]), R(() => {
|
|
1078
1070
|
if (n === "section")
|
|
1079
1071
|
return;
|
|
1080
|
-
const k =
|
|
1081
|
-
|
|
1082
|
-
}, [t,
|
|
1072
|
+
const k = A(t, "bodyTextLightColor", "#64748b"), O = A(t, "bodyTextDarkColor", "#94a3b8"), w = A(t, "bodyBgLightColor", "#FFFFFF"), S = A(t, "bodyBgDarkColor", "#0f172a");
|
|
1073
|
+
i.body.className = `font-body antialiased text-[${k}] bg-[${w}] dark:text-[${O}] dark:bg-[${S}]`;
|
|
1074
|
+
}, [t, i, n]), n === "page" ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1083
1075
|
u && /* @__PURE__ */ e.jsx(
|
|
1084
1076
|
"link",
|
|
1085
1077
|
{
|
|
@@ -1109,53 +1101,53 @@ const Hn = H.forwardRef((n, t) => /* @__PURE__ */ e.jsx(he, { ...n, forwardedRef
|
|
|
1109
1101
|
u && /* @__PURE__ */ e.jsx("style", { children: `h1,h2,h3,h4,h5,h6{font-family: "${u}",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";}` })
|
|
1110
1102
|
] }) : null;
|
|
1111
1103
|
}, Xn = () => {
|
|
1112
|
-
const { t: n } =
|
|
1104
|
+
const { t: n } = Ke();
|
|
1113
1105
|
return /* @__PURE__ */ e.jsx("div", { className: "my-auto py-24 text-center text-gray-600 dark:text-white", children: /* @__PURE__ */ e.jsx("h1", { className: "mb-10 text-4xl ", children: n("canvas_empty") }) });
|
|
1114
1106
|
}, Jn = (n) => {
|
|
1115
1107
|
const t = {};
|
|
1116
1108
|
return Object.keys(n).forEach((r) => {
|
|
1117
|
-
|
|
1109
|
+
me(n[r]) && n[r].startsWith(Ee) && (t[r] = n[r].replace(Ee, "").split(","));
|
|
1118
1110
|
}), t;
|
|
1119
|
-
}, Zn =
|
|
1120
|
-
const t = n.replace(
|
|
1121
|
-
return
|
|
1111
|
+
}, Zn = gt((n) => {
|
|
1112
|
+
const t = n.replace(Je, "").split(",");
|
|
1113
|
+
return jn(t[0], t[1]);
|
|
1122
1114
|
});
|
|
1123
|
-
function
|
|
1124
|
-
return
|
|
1115
|
+
function Gn(n, t) {
|
|
1116
|
+
return A(n, `${t}_attrs`, {});
|
|
1125
1117
|
}
|
|
1126
|
-
function
|
|
1127
|
-
const
|
|
1118
|
+
function Qn(n, t, r, a) {
|
|
1119
|
+
const c = {};
|
|
1128
1120
|
return Object.keys(n).forEach((s) => {
|
|
1129
|
-
if (
|
|
1130
|
-
const
|
|
1131
|
-
|
|
1132
|
-
className:
|
|
1121
|
+
if (me(n[s]) && n[s].startsWith(Je)) {
|
|
1122
|
+
const i = Zn(n[s]);
|
|
1123
|
+
c[s] = {
|
|
1124
|
+
className: i,
|
|
1133
1125
|
"data-style-prop": s,
|
|
1134
1126
|
"data-block-parent": n._id,
|
|
1135
1127
|
"data-style-id": `${s}-${n._id}`,
|
|
1136
1128
|
onMouseEnter: t,
|
|
1137
1129
|
onMouseLeave: r,
|
|
1138
|
-
onClick:
|
|
1139
|
-
...
|
|
1130
|
+
onClick: a,
|
|
1131
|
+
...Gn(n, s)
|
|
1140
1132
|
};
|
|
1141
1133
|
}
|
|
1142
|
-
}),
|
|
1134
|
+
}), c;
|
|
1143
1135
|
}
|
|
1144
|
-
function
|
|
1145
|
-
const r =
|
|
1146
|
-
return q(r) ? { ...n } : (
|
|
1147
|
-
|
|
1136
|
+
function er(n, t) {
|
|
1137
|
+
const r = A(n, "_bindings", {});
|
|
1138
|
+
return q(r) ? { ...n } : (ue(r, (a, c) => {
|
|
1139
|
+
me(a) && A(t, a, null) && (n[c] = A(t, a, null));
|
|
1148
1140
|
}), n);
|
|
1149
1141
|
}
|
|
1150
|
-
function
|
|
1151
|
-
const t = Xe(), [, r] =
|
|
1142
|
+
function he({ blocks: n }) {
|
|
1143
|
+
const t = Xe(), [, r] = ge(), [, a] = K(), [, c] = H(), s = V(
|
|
1152
1144
|
(p) => {
|
|
1153
1145
|
var m;
|
|
1154
1146
|
const u = (m = p.currentTarget) == null ? void 0 : m.getAttribute("data-style-id");
|
|
1155
1147
|
r(u || ""), p.stopPropagation();
|
|
1156
1148
|
},
|
|
1157
1149
|
[r]
|
|
1158
|
-
),
|
|
1150
|
+
), i = V(
|
|
1159
1151
|
(p) => {
|
|
1160
1152
|
r(""), p.stopPropagation();
|
|
1161
1153
|
},
|
|
@@ -1165,30 +1157,30 @@ function me({ blocks: n }) {
|
|
|
1165
1157
|
p.stopPropagation();
|
|
1166
1158
|
const u = p.currentTarget;
|
|
1167
1159
|
if (u.getAttribute("data-block-parent")) {
|
|
1168
|
-
const m = u.getAttribute("data-style-prop"), k = u.getAttribute("data-style-id"),
|
|
1169
|
-
|
|
1170
|
-
} else if (u.getAttribute("data-block-id") && (
|
|
1171
|
-
const m = u.getAttribute("data-style-prop"), k = u.getAttribute("data-style-id"),
|
|
1172
|
-
|
|
1160
|
+
const m = u.getAttribute("data-style-prop"), k = u.getAttribute("data-style-id"), O = u.getAttribute("data-block-parent");
|
|
1161
|
+
a([{ id: k, prop: m, blockId: O }]), c([O]);
|
|
1162
|
+
} else if (u.getAttribute("data-block-id") && (c([u.getAttribute("data-block-id")]), u.getAttribute("data-block-parent"))) {
|
|
1163
|
+
const m = u.getAttribute("data-style-prop"), k = u.getAttribute("data-style-id"), O = u.getAttribute("data-block-parent");
|
|
1164
|
+
a([{ id: k, prop: m, blockId: O }]);
|
|
1173
1165
|
}
|
|
1174
1166
|
},
|
|
1175
|
-
[
|
|
1167
|
+
[a, c]
|
|
1176
1168
|
), y = V(
|
|
1177
|
-
(p) =>
|
|
1178
|
-
[d, s,
|
|
1179
|
-
), [b] =
|
|
1180
|
-
return /* @__PURE__ */ e.jsx(e.Fragment, { children:
|
|
1169
|
+
(p) => Qn(p, s, i, d),
|
|
1170
|
+
[d, s, i]
|
|
1171
|
+
), [b] = Ze();
|
|
1172
|
+
return /* @__PURE__ */ e.jsx(e.Fragment, { children: z.Children.toArray(
|
|
1181
1173
|
n.map((p, u) => {
|
|
1182
1174
|
const m = Jn(p), k = {};
|
|
1183
1175
|
q(m) || Object.keys(m).forEach((f) => {
|
|
1184
|
-
k[f] =
|
|
1185
|
-
m[f].map((F) => /* @__PURE__ */ e.jsx(
|
|
1176
|
+
k[f] = z.Children.toArray(
|
|
1177
|
+
m[f].map((F) => /* @__PURE__ */ e.jsx(he, { blocks: [Fe(t, { _id: F })] }))
|
|
1186
1178
|
);
|
|
1187
1179
|
});
|
|
1188
|
-
const
|
|
1189
|
-
k.children =
|
|
1190
|
-
const w = Cn(p._type), S =
|
|
1191
|
-
return
|
|
1180
|
+
const O = We(t, { _parent: p._id });
|
|
1181
|
+
k.children = O.length ? /* @__PURE__ */ e.jsx(he, { blocks: O }) : null;
|
|
1182
|
+
const w = Cn(p._type), S = A(w, "component", null);
|
|
1183
|
+
return vt(S) ? /* @__PURE__ */ e.jsx("noscript", { children: `<!-- ${p == null ? void 0 : p._type} not registered -->` }) : /* @__PURE__ */ e.jsx(Le, { children: z.createElement(S, {
|
|
1192
1184
|
blockProps: {
|
|
1193
1185
|
onClick: d,
|
|
1194
1186
|
"data-block-id": p._id,
|
|
@@ -1196,80 +1188,80 @@ function me({ blocks: n }) {
|
|
|
1196
1188
|
},
|
|
1197
1189
|
inBuilder: !0,
|
|
1198
1190
|
index: u,
|
|
1199
|
-
...
|
|
1191
|
+
...er(p, b),
|
|
1200
1192
|
...y(p),
|
|
1201
1193
|
...k
|
|
1202
1194
|
}) });
|
|
1203
1195
|
})
|
|
1204
1196
|
) });
|
|
1205
1197
|
}
|
|
1206
|
-
const
|
|
1198
|
+
const tr = () => {
|
|
1207
1199
|
const n = Xe();
|
|
1208
|
-
return /* @__PURE__ */ e.jsx(
|
|
1209
|
-
},
|
|
1210
|
-
const [n] =
|
|
1211
|
-
|
|
1212
|
-
const { clientWidth:
|
|
1213
|
-
b({ width:
|
|
1200
|
+
return /* @__PURE__ */ e.jsx(bn, { children: q(n) ? /* @__PURE__ */ e.jsx(Xn, {}) : /* @__PURE__ */ e.jsx(En, { children: /* @__PURE__ */ e.jsx(he, { blocks: We(n, (t) => q(t._parent)) }) }) });
|
|
1201
|
+
}, nr = (n, t) => n.querySelector(`[data-style-id="${t}"]`), rr = () => {
|
|
1202
|
+
const [n] = J(Lt), [t] = ze(), [r] = ve(), [, a] = H(), c = Ft(), [, s] = ge(), i = we(null), d = we(null), [y, b] = $({ width: 0, height: 0 }), p = Rn(y), [u, m] = $(0), [k, O] = $([]), [, w] = $([]), [, S] = J(Wt), [f, F] = K(), M = Dt("loadingCanvas", !1);
|
|
1203
|
+
R(() => {
|
|
1204
|
+
const { clientWidth: I, clientHeight: N } = d.current;
|
|
1205
|
+
b({ width: I, height: N }), u === 0 && m(I);
|
|
1214
1206
|
}, [d, r, u]);
|
|
1215
|
-
const ne = (
|
|
1216
|
-
const { top: L } =
|
|
1207
|
+
const ne = (I, N = 0) => {
|
|
1208
|
+
const { top: L } = I.getBoundingClientRect();
|
|
1217
1209
|
return L + N >= 0 && L - N <= window.innerHeight;
|
|
1218
1210
|
};
|
|
1219
|
-
|
|
1220
|
-
var
|
|
1221
|
-
if (
|
|
1222
|
-
const L =
|
|
1223
|
-
L && (ne(L) || (N = (
|
|
1211
|
+
R(() => {
|
|
1212
|
+
var I, N;
|
|
1213
|
+
if (c && c.type !== "Multiple" && i.current) {
|
|
1214
|
+
const L = rt(i.current.contentDocument, c._id);
|
|
1215
|
+
L && (ne(L) || (N = (I = i.current) == null ? void 0 : I.contentWindow) == null || N.scrollTo({ top: L.offsetTop, behavior: "smooth" }), O([L]));
|
|
1224
1216
|
}
|
|
1225
|
-
}, [
|
|
1226
|
-
if (!q(f) &&
|
|
1227
|
-
const
|
|
1228
|
-
|
|
1217
|
+
}, [c]), R(() => {
|
|
1218
|
+
if (!q(f) && i.current) {
|
|
1219
|
+
const I = nr(
|
|
1220
|
+
i.current.contentDocument,
|
|
1229
1221
|
ee(f).id
|
|
1230
1222
|
);
|
|
1231
|
-
w(
|
|
1223
|
+
w(I ? [I] : [null]);
|
|
1232
1224
|
} else
|
|
1233
1225
|
w([null]);
|
|
1234
1226
|
}, [f]);
|
|
1235
|
-
const re =
|
|
1236
|
-
let
|
|
1237
|
-
return n === "offline" && (
|
|
1238
|
-
"https://
|
|
1227
|
+
const re = Me(() => {
|
|
1228
|
+
let I = Pn;
|
|
1229
|
+
return n === "offline" && (I = I.replace(
|
|
1230
|
+
"https://old.chaibuilder.com/offline/tailwind.cdn.js",
|
|
1239
1231
|
"/offline/tailwind.cdn.js"
|
|
1240
|
-
),
|
|
1232
|
+
), I = I.replace("https://unpkg.com/aos@next/dist/aos.css", "/offline/aos.css"), I = I.replace("https://unpkg.com/aos@next/dist/aos.js", "/offline/aos.js")), I;
|
|
1241
1233
|
}, [n]);
|
|
1242
1234
|
return /* @__PURE__ */ e.jsx(
|
|
1243
1235
|
"div",
|
|
1244
1236
|
{
|
|
1245
1237
|
onClick: () => {
|
|
1246
|
-
|
|
1238
|
+
a([]), F([]);
|
|
1247
1239
|
},
|
|
1248
1240
|
onMouseLeave: () => setTimeout(() => s(""), 300),
|
|
1249
|
-
className: "relative mx-auto h-full w-full
|
|
1241
|
+
className: "relative mx-auto h-full w-full",
|
|
1250
1242
|
style: u > 0 && !q(p) ? { width: t ? "100%" : u } : {},
|
|
1251
1243
|
ref: d,
|
|
1252
1244
|
children: /* @__PURE__ */ e.jsxs(
|
|
1253
|
-
|
|
1245
|
+
Un,
|
|
1254
1246
|
{
|
|
1255
|
-
contentDidMount: () => S(
|
|
1256
|
-
ref:
|
|
1247
|
+
contentDidMount: () => S(i.current),
|
|
1248
|
+
ref: i,
|
|
1257
1249
|
id: "canvas-iframe",
|
|
1258
1250
|
style: { width: `${r}px`, ...p },
|
|
1259
1251
|
className: "relative mx-auto box-content h-full max-w-full shadow-md transition-all duration-300 ease-linear",
|
|
1260
1252
|
initialContent: re,
|
|
1261
1253
|
children: [
|
|
1262
|
-
/* @__PURE__ */ e.jsx(
|
|
1254
|
+
/* @__PURE__ */ e.jsx(Hn, {}),
|
|
1263
1255
|
/* @__PURE__ */ e.jsx(
|
|
1264
|
-
|
|
1256
|
+
Yn,
|
|
1265
1257
|
{
|
|
1266
|
-
block:
|
|
1258
|
+
block: c,
|
|
1267
1259
|
selectedBlockElement: ee(k)
|
|
1268
1260
|
}
|
|
1269
1261
|
),
|
|
1270
|
-
/* @__PURE__ */ e.jsx(
|
|
1262
|
+
/* @__PURE__ */ e.jsx(Vn, { model: "page" }),
|
|
1271
1263
|
/* @__PURE__ */ e.jsxs(zn, { children: [
|
|
1272
|
-
|
|
1264
|
+
M ? /* @__PURE__ */ e.jsx("div", { className: "h-full p-4", children: /* @__PURE__ */ e.jsx($e, { className: "h-full" }) }) : /* @__PURE__ */ e.jsx(tr, {}),
|
|
1273
1265
|
/* @__PURE__ */ e.jsx("div", { className: "h-60" })
|
|
1274
1266
|
] })
|
|
1275
1267
|
]
|
|
@@ -1277,26 +1269,23 @@ const nr = () => {
|
|
|
1277
1269
|
)
|
|
1278
1270
|
}
|
|
1279
1271
|
);
|
|
1280
|
-
},
|
|
1281
|
-
const n
|
|
1282
|
-
[oe.STATIC]: /* @__PURE__ */ e.jsx(sr, {}),
|
|
1283
|
-
[oe.FRAMEWORK]: null
|
|
1284
|
-
}[n];
|
|
1272
|
+
}, sr = mt(() => import("./AddBlocks-xR2s2BVa.js")), Qr = () => {
|
|
1273
|
+
const [n, t] = J($t);
|
|
1285
1274
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex h-full w-full flex-col", children: [
|
|
1286
|
-
/* @__PURE__ */ e.jsx(
|
|
1287
|
-
/* @__PURE__ */ e.jsxs("div", { className: "relative flex-1 overflow-hidden bg-slate-800/
|
|
1288
|
-
/* @__PURE__ */ e.jsx(
|
|
1289
|
-
|
|
1275
|
+
/* @__PURE__ */ e.jsx(Bn, {}),
|
|
1276
|
+
/* @__PURE__ */ e.jsxs("div", { className: "relative flex-1 overflow-hidden bg-slate-800/80 px-2 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: [
|
|
1277
|
+
/* @__PURE__ */ e.jsx(Le, { fallback: /* @__PURE__ */ e.jsx($e, { className: "h-full" }), children: /* @__PURE__ */ e.jsx(qt, { children: /* @__PURE__ */ e.jsx(rr, {}) }) }),
|
|
1278
|
+
n ? /* @__PURE__ */ e.jsx(
|
|
1290
1279
|
"div",
|
|
1291
1280
|
{
|
|
1292
|
-
onClick: () =>
|
|
1281
|
+
onClick: () => t(!1),
|
|
1293
1282
|
className: "absolute inset-0 z-50 flex items-center bg-black/30 backdrop-blur-sm",
|
|
1294
1283
|
children: /* @__PURE__ */ e.jsx(
|
|
1295
1284
|
"div",
|
|
1296
1285
|
{
|
|
1297
|
-
onClick: (
|
|
1286
|
+
onClick: (r) => r.stopPropagation(),
|
|
1298
1287
|
className: "mx-auto h-[90%] w-[90%] max-w-3xl rounded-md bg-white p-4 shadow-lg shadow-black/10 xl:w-[65%]",
|
|
1299
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1288
|
+
children: /* @__PURE__ */ e.jsx(sr, {})
|
|
1300
1289
|
}
|
|
1301
1290
|
)
|
|
1302
1291
|
}
|