@chaibuilder/sdk 1.2.25 → 1.2.27
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-S-4jzdWv.cjs +1 -0
- package/dist/AddBlocks-ksZjjn0k.js +205 -0
- package/dist/BrandingOptions-EMCT0Wa3.cjs +1 -0
- package/dist/{BrandingOptions-iTyWpwTs.js → BrandingOptions-T_kbQFQv.js} +53 -40
- package/dist/CanvasArea-SDzbubar.cjs +55 -0
- package/dist/{CanvasArea-dZjng782.js → CanvasArea-rhOeubmu.js} +323 -340
- package/dist/{Class-ahc3NIbq.js → Class-3k8xjeiM.js} +29 -26
- package/dist/Class-MmCxz2Ay.cjs +1 -0
- package/dist/{CurrentPage-Kmfp-kFk.js → CurrentPage-0eeU1V_c.js} +53 -40
- package/dist/CurrentPage-aTjWjc3o.cjs +1 -0
- package/dist/Functions-7jnEwJyw.js +15 -0
- package/dist/Functions-N3yhPYKY.cjs +1 -0
- package/dist/{ListTree-N3jeD790.js → ListTree-Muu4rAtp.js} +96 -87
- package/dist/ListTree-SWsqdfcG.cjs +1 -0
- package/dist/MODIFIERS-9EwxLM8V.cjs +1 -0
- package/dist/{MODIFIERS-CNqNUapY.js → MODIFIERS-WQdaNvb8.js} +8 -10
- package/dist/PagesPanel-n3x-0ozR.cjs +1 -0
- package/dist/{PagesPanel-u1IB-nRr.js → PagesPanel-rYN28QpN.js} +44 -29
- package/dist/ProjectPanel-ivFOhdcz.js +84 -0
- package/dist/ProjectPanel-pBePMOta.cjs +1 -0
- package/dist/Settings-JRyJayf5.cjs +1 -0
- package/dist/{Settings-jCcd-VE6.js → Settings-XWmKzRl9.js} +400 -407
- package/dist/SidePanels-BtUeo6M9.cjs +1 -0
- package/dist/{SidePanels-pHMYprpW.js → SidePanels-ODktnGbC.js} +117 -108
- package/dist/Topbar-QMeD3hvq.cjs +1 -0
- package/dist/Topbar-Yunooh00.js +131 -0
- package/dist/UnsplashImages-05JR8oIu.cjs +1 -0
- package/dist/{UnsplashImages-L7x_3RQf.js → UnsplashImages-QMl0bxix.js} +59 -47
- package/dist/UploadImages-OgSN1HVt.cjs +1 -0
- package/dist/{UploadImages-zdEJRLD8.js → UploadImages-Si-A26bc.js} +58 -36
- package/dist/_commonjsHelpers-UyOWmZb0.js +8 -0
- package/dist/_commonjsHelpers-wDK0ZLPo.cjs +1 -0
- package/dist/add-page-modal-9pTKItY-.cjs +1 -0
- package/dist/add-page-modal-U7AUUrI1.js +103 -0
- package/dist/confirm-alert-DhRc-Zcd.cjs +1 -0
- package/dist/confirm-alert-kV5-c70T.js +59 -0
- package/dist/controls-KK2oLIa8.cjs +1 -0
- package/dist/{controls-IS5qnRce.js → controls-OfJWSEqC.js} +85 -20
- package/dist/core.cjs +1 -1
- package/dist/core.js +74 -150
- package/dist/defaultTheme-7Lk2zq60.cjs +1 -0
- package/dist/{defaultTheme-4kA60XdB.js → defaultTheme-gunU_Fe5.js} +8 -6
- package/dist/delete-page-modal-4s-6AIy4.cjs +1 -0
- package/dist/delete-page-modal-UCBpdjLe.js +82 -0
- package/dist/email-blocks.cjs +1 -1
- package/dist/email-blocks.js +292 -3
- package/dist/email.cjs +1 -1
- package/dist/email.js +36 -18
- package/dist/empty-slot-ZBlsQi6m.js +15 -0
- package/dist/empty-slot-nzYOgZuS.cjs +1 -0
- package/dist/form-Ap63cNec.cjs +1 -0
- package/dist/{form-0_RLz2TB.js → form-zmlTjM9j.js} +12 -12
- package/dist/html-to-json-C_Eobs_d.cjs +1 -0
- package/dist/{html-to-json-2xtb7520.js → html-to-json-p__Fgqdg.js} +65 -40
- package/dist/index-CFUoB97-.js +3079 -0
- package/dist/index-F4AQQ6qq.cjs +1 -0
- package/dist/index-Qk028f-N.cjs +1 -0
- package/dist/index-YpnaudSM.js +63 -0
- package/dist/index-e0c8PmRQ.js +205 -0
- package/dist/index-ecnGWzh9.cjs +1 -0
- package/dist/index-f0AbmoYY.js +2201 -0
- package/dist/index-gi1LIOCw.cjs +1 -0
- package/dist/index-l19JVVXI.cjs +206 -0
- package/dist/index-lOJfSheQ.js +39503 -0
- package/dist/{jsx-runtime-Sp0orL4X.js → jsx-runtime-WbnYoNE9.js} +109 -106
- package/dist/jsx-runtime-Z_BpKhVy.cjs +27 -0
- package/dist/lib.cjs +3 -3
- package/dist/lib.js +59 -56
- package/dist/page-viewer-YFrIG3L7.cjs +1 -0
- package/dist/{page-viewer-NnOwmAmu.js → page-viewer-jOwy--9A.js} +56 -43
- package/dist/{project-general-setting-9ju3TDju.js → project-general-setting-3N8HZ2fe.js} +42 -35
- package/dist/project-general-setting-hK7I7FuN.cjs +1 -0
- package/dist/{project-seo-setting-36CdUszM.js → project-seo-setting-bSiNgO_1.js} +39 -23
- package/dist/project-seo-setting-x-FK0pez.cjs +1 -0
- package/dist/render.cjs +1 -1
- package/dist/render.js +16 -16
- package/dist/{single-page-detail-hD1jKZ8k.js → single-page-detail--AZlZ-pC.js} +73 -66
- package/dist/single-page-detail-9abF2g2R.cjs +1 -0
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +39 -24
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +158 -364
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.js +1052 -3
- package/package.json +1 -1
- package/dist/AddBlocks-Ol3iIVKa.js +0 -207
- package/dist/AddBlocks-a1c-7Ewz.cjs +0 -1
- package/dist/BrandingOptions-6rnt0UaA.cjs +0 -1
- package/dist/CanvasArea-R4ogF9AT.cjs +0 -55
- package/dist/ChaiBuilderEditor-m30yoOgJ.cjs +0 -163
- package/dist/ChaiBuilderEditor-vP4at00I.js +0 -27974
- package/dist/Class-eieto7e-.cjs +0 -1
- package/dist/Controls-3Cc1XYXg.js +0 -105
- package/dist/Controls-ky25Ebo3.cjs +0 -1
- package/dist/CurrentPage-3gQTH0Zt.cjs +0 -1
- package/dist/Functions-Hvon6AMZ.cjs +0 -1
- package/dist/Functions-NzT2Six_.js +0 -15
- package/dist/ImagesPanel-J1RlG7xG.cjs +0 -1
- package/dist/ImagesPanel-Wb0GF_NA.js +0 -29
- package/dist/ListTree-CZ-mtjZ9.cjs +0 -1
- package/dist/MODIFIERS-o1p3VnpS.cjs +0 -1
- package/dist/PagesPanel-Gi0z6gaf.cjs +0 -1
- package/dist/ProjectPanel-EydGZmMW.js +0 -71
- package/dist/ProjectPanel-kiiljG4H.cjs +0 -1
- package/dist/STRINGS-b432aBJJ.js +0 -7
- package/dist/STRINGS-gPz7CUOk.cjs +0 -1
- package/dist/Settings-8ilCSH8b.cjs +0 -1
- package/dist/SidePanels-T36C6Lhc.cjs +0 -1
- package/dist/Topbar-CvWQuspR.cjs +0 -1
- package/dist/Topbar-pbIDUE_B.js +0 -122
- package/dist/UnsplashImages-KBZPd9dv.cjs +0 -1
- package/dist/UploadImages-GkkJVAgG.cjs +0 -1
- package/dist/accordion-oPUeqPCZ.js +0 -42
- package/dist/accordion-ynvFtV_p.cjs +0 -1
- package/dist/add-page-modal-9SGv2hgc.cjs +0 -1
- package/dist/add-page-modal-JCDXZIPW.js +0 -95
- package/dist/alert-dialog-P9xMMB6C.cjs +0 -1
- package/dist/alert-dialog-rypfO5ly.js +0 -64
- package/dist/badge-E-S7CqUt.cjs +0 -1
- package/dist/badge-tEwO7C51.js +0 -23
- package/dist/block-helpers-OKHmRRol.cjs +0 -1
- package/dist/block-helpers-oSFpSsGz.js +0 -23
- package/dist/command-BxR6jaCI.cjs +0 -1
- package/dist/command-Pn3HKDuV.js +0 -97
- package/dist/confirm-alert-uNm0lZ0y.cjs +0 -1
- package/dist/confirm-alert-wR5_VJ1l.js +0 -36
- package/dist/context-menu-8dC9uGXj.js +0 -122
- package/dist/context-menu-IgLbIuth.cjs +0 -1
- package/dist/controls-L7DPvB0m.cjs +0 -1
- package/dist/defaultTheme-mrkeGFGI.cjs +0 -1
- package/dist/delete-page-modal-7KmP1elv.js +0 -67
- package/dist/delete-page-modal-SgfwvfNu.cjs +0 -1
- package/dist/dropdown-menu-El86_9Uo.js +0 -124
- package/dist/dropdown-menu-SiHzqWwZ.cjs +0 -1
- package/dist/form-W58AVUdf.cjs +0 -1
- package/dist/hover-card-KUwpDkW8.cjs +0 -1
- package/dist/hover-card-q138xxXR.js +0 -45
- package/dist/html-to-json-uSnxl72F.cjs +0 -1
- package/dist/iconBase-gbUAAO2L.cjs +0 -1
- package/dist/iconBase-h4DuR_XT.js +0 -63
- package/dist/index-9MmykVSc.cjs +0 -1
- package/dist/index-hElOGcFr.js +0 -2200
- package/dist/index-lDTsQp7h.js +0 -188
- package/dist/index-rq5Y9ZDy.cjs +0 -1
- package/dist/jsx-runtime-JYMCiFoE.cjs +0 -27
- package/dist/label-KaP7MRrs.js +0 -10
- package/dist/label-tFm8HZdb.cjs +0 -1
- package/dist/link-WbcKdQ9k.cjs +0 -1
- package/dist/link-xuhP-4dN.js +0 -196
- package/dist/page-viewer-Hx5hxHKm.cjs +0 -1
- package/dist/popover-a84pbVhQ.js +0 -23
- package/dist/popover-fKjgcRUx.cjs +0 -1
- package/dist/project-general-setting-FxkwjvJz.cjs +0 -1
- package/dist/project-seo-setting-RU7qiXxb.cjs +0 -1
- package/dist/scroll-area-FiHvy-TZ.cjs +0 -1
- package/dist/scroll-area-ewXbxc3n.js +0 -30
- package/dist/select-7bjg-rr9.cjs +0 -1
- package/dist/select-POGdEDHT.js +0 -75
- package/dist/separator-3Civ-6hb.cjs +0 -1
- package/dist/separator-SctTn0Qi.js +0 -18
- package/dist/single-page-detail-beY0MT1b.cjs +0 -1
- package/dist/skeleton-STeL9VrJ.cjs +0 -1
- package/dist/skeleton-lu8e7q2y.js +0 -239
- package/dist/tabs-_4WbA1cc.cjs +0 -1
- package/dist/tabs-yQ3oGziM.js +0 -106
- package/dist/textarea-1kZEh7ki.cjs +0 -1
- package/dist/textarea-b2QvVhrK.js +0 -73
- package/dist/useAddBlock-8pxOEYIl.cjs +0 -1
- package/dist/useAddBlock-FEKFJNwQ.js +0 -69
- package/dist/useChaiExternalData-fkFgoS80.js +0 -6
- package/dist/useChaiExternalData-rwoAZ6uU.cjs +0 -1
- package/dist/useDarkMode-7i57segK.cjs +0 -1
- package/dist/useDarkMode-8VHJlYyE.js +0 -23
- package/dist/useSelectedBreakpoints-6NK5qd7T.js +0 -10
- package/dist/useSelectedBreakpoints-7ONXb-vN.cjs +0 -1
- package/dist/useStylingState-Iuj84yvc.js +0 -186
- package/dist/useStylingState-OIvJMV6p.cjs +0 -1
- package/dist/useUiLibraries-nCdauJ4N.cjs +0 -1
- package/dist/useUiLibraries-psyWFbNc.js +0 -12
- package/dist/useUpdateBlocksProps-Unn8lUyj.cjs +0 -1
- package/dist/useUpdateBlocksProps-vWcDp-P9.js +0 -23
- package/dist/utils-dze1SGvB.js +0 -6
- package/dist/utils-qK_SjzzV.cjs +0 -1
|
@@ -1,86 +1,69 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var E = (e, t, n) => (
|
|
4
|
-
import { j as o } from "./jsx-runtime-
|
|
5
|
-
import M, {
|
|
6
|
-
import {
|
|
7
|
-
import { ResetIcon as
|
|
8
|
-
import { B as
|
|
9
|
-
import { o as ot, b as je, t as st, j as S, n as T, v as it, f as L, w as F, a as ne, u as Ce, g as Be, i as De, m as rt, x as at, y as Ie, h as lt, z as ct, k as dt, A as pt, E as ut } from "./ChaiBuilderEditor-vP4at00I.js";
|
|
10
|
-
import { S as U } from "./separator-SctTn0Qi.js";
|
|
1
|
+
var Re = Object.defineProperty;
|
|
2
|
+
var $e = (e, t, n) => t in e ? Re(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var E = (e, t, n) => ($e(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
4
|
+
import { j as o } from "./jsx-runtime-WbnYoNE9.js";
|
|
5
|
+
import M, { createElement as se, useCallback as K, useState as I, useEffect as j, Component as me, Children as Fe, Suspense as ge, useRef as ie, useMemo as Pe } from "react";
|
|
6
|
+
import { map as O, includes as re, toUpper as Q, round as Oe, noop as $, has as fe, throttle as xe, isEmpty as N, first as W, omit as He, pick as ze, get as y, isString as ee, memoize as Ue, each as We, find as qe, filter as ye, isNull as Ke } from "lodash-es";
|
|
7
|
+
import { ResetIcon as ae, MobileIcon as le, LaptopIcon as Ve, DesktopIcon as Ye, DotsVerticalIcon as Je, EraserIcon as Qe, ZoomInIcon as Ze, DragHandleDots2Icon as Ge, ArrowUpIcon as Xe, CopyIcon as et, TrashIcon as tt } from "@radix-ui/react-icons";
|
|
8
|
+
import { v as ve, B as q, V as be, aB as nt, aC as ot, aD as st, aE as it, aF as rt, N as te, ab as at, h as V, aG as lt, aH as ct, aI as dt, aJ as pt, aK as ut, aL as ht, aM as mt, r as S, ac as T, A as gt, a as ft, b as xt, c as yt, d as vt, e as bt, f as kt, g as wt, ai as jt, O as ke, aA as U, L as Ct, aN as Bt, Y as L, a5 as Dt, aO as F, E as ne, t as we, q as je, s as Ce, z as It, aP as St, aQ as Be, aR as _t, aS as Nt, F as At, aT as Et, a1 as Mt, aU as Tt, S as De } from "./index-CFUoB97-.js";
|
|
11
9
|
import { useTranslation as Y } from "react-i18next";
|
|
12
|
-
import { a as Se, u as oe } from "./useDarkMode-8VHJlYyE.js";
|
|
13
|
-
import { S as ht, H as mt, a as gt, b as ft } from "./hover-card-q138xxXR.js";
|
|
14
|
-
import { L as xt } from "./label-KaP7MRrs.js";
|
|
15
|
-
import { D as yt, a as vt, b as bt, f as kt, g as wt, d as jt } from "./dropdown-menu-El86_9Uo.js";
|
|
16
|
-
import { a as Ct, u as _e } from "./useSelectedBreakpoints-6NK5qd7T.js";
|
|
17
|
-
import { A as Bt, a as Dt, b as It, c as St, e as _t, f as At, d as Nt, h as Et, g as Mt } from "./alert-dialog-rypfO5ly.js";
|
|
18
10
|
import { useAtom as C } from "jotai";
|
|
19
|
-
import
|
|
11
|
+
import ce from "react-dom";
|
|
12
|
+
import w from "prop-types";
|
|
20
13
|
import { Quill as Lt } from "react-quill";
|
|
21
|
-
import {
|
|
22
|
-
import { useFeature as Ae } from "flagged";
|
|
14
|
+
import { useFeature as Ie } from "flagged";
|
|
23
15
|
import { flip as Rt } from "@floating-ui/dom";
|
|
24
|
-
import { useFloating as
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import j from "prop-types";
|
|
38
|
-
import "@radix-ui/react-slot";
|
|
39
|
-
import "class-variance-authority";
|
|
40
|
-
import "./utils-dze1SGvB.js";
|
|
16
|
+
import { useFloating as $t, shift as Ft } from "@floating-ui/react-dom";
|
|
17
|
+
import { useResizeObserver as Pt } from "@react-hookz/web";
|
|
18
|
+
import { tailwindcssPaletteGenerator as Ot } from "@bobthered/tailwindcss-palette-generator";
|
|
19
|
+
import Ht from "@tailwindcss/typography";
|
|
20
|
+
import zt from "@tailwindcss/forms";
|
|
21
|
+
import Ut from "@tailwindcss/aspect-ratio";
|
|
22
|
+
import { Provider as Wt } from "react-wrap-balancer";
|
|
23
|
+
import { twMerge as qt } from "tailwind-merge";
|
|
24
|
+
import { S as de, a as Se } from "./MODIFIERS-WQdaNvb8.js";
|
|
25
|
+
import { getBlockComponent as Kt } from "@chaibuilder/runtime";
|
|
26
|
+
import { u as Vt, B as Yt, E as Jt } from "./index-lOJfSheQ.js";
|
|
27
|
+
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
28
|
+
import "./Functions-7jnEwJyw.js";
|
|
41
29
|
import "clsx";
|
|
30
|
+
import "./Class-3k8xjeiM.js";
|
|
31
|
+
import "@radix-ui/react-toggle";
|
|
32
|
+
import "class-variance-authority";
|
|
33
|
+
import "@radix-ui/react-switch";
|
|
34
|
+
import "@radix-ui/react-slot";
|
|
35
|
+
import "@radix-ui/react-accordion";
|
|
36
|
+
import "@radix-ui/react-alert-dialog";
|
|
37
|
+
import "@radix-ui/react-dialog";
|
|
38
|
+
import "@radix-ui/react-label";
|
|
39
|
+
import "@radix-ui/react-scroll-area";
|
|
40
|
+
import "@radix-ui/react-tabs";
|
|
42
41
|
import "@radix-ui/react-tooltip";
|
|
42
|
+
import "@radix-ui/react-popover";
|
|
43
|
+
import "@radix-ui/react-menubar";
|
|
44
|
+
import "@radix-ui/react-hover-card";
|
|
45
|
+
import "@radix-ui/react-select";
|
|
46
|
+
import "@radix-ui/react-dropdown-menu";
|
|
47
|
+
import "@radix-ui/react-separator";
|
|
43
48
|
import "@radix-ui/react-toast";
|
|
44
|
-
import "
|
|
45
|
-
import "@radix-ui/react-
|
|
49
|
+
import "cmdk";
|
|
50
|
+
import "@radix-ui/react-context-menu";
|
|
51
|
+
import "react-icons-picker";
|
|
46
52
|
import "i18next";
|
|
47
|
-
import "./Functions-NzT2Six_.js";
|
|
48
53
|
import "react-hotkeys-hook";
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
import "@radix-ui/react-hover-card";
|
|
52
|
-
import "@radix-ui/react-label";
|
|
53
|
-
import "@radix-ui/react-dropdown-menu";
|
|
54
|
-
import "@radix-ui/react-alert-dialog";
|
|
55
|
-
import "./Controls-3Cc1XYXg.js";
|
|
56
|
-
const Qt = () => ge(() => Zt(), []), Gt = ({ children: e }) => {
|
|
57
|
-
const [, t] = Ee(), [n] = ot(), a = Qt();
|
|
58
|
-
return k(() => (t({}), G(n, (r) => {
|
|
59
|
-
const i = ye(a, { providerKey: r.providerKey });
|
|
60
|
-
if (i) {
|
|
61
|
-
const c = (i == null ? void 0 : i.mockFn) || (i == null ? void 0 : i.dataFn);
|
|
62
|
-
c && c(r.args).then(
|
|
63
|
-
(s) => t((l) => ({ ...l, [r.providerKey]: s }))
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
|
-
}), () => {
|
|
67
|
-
G(n, (r) => {
|
|
68
|
-
t((i) => (delete i[r.providerKey], i));
|
|
69
|
-
});
|
|
70
|
-
}), [a, n, t]), /* @__PURE__ */ o.jsx(o.Fragment, { children: e });
|
|
71
|
-
}, Xt = () => {
|
|
72
|
-
const { hasUndo: e, hasRedo: t, undo: n, redo: a } = je();
|
|
54
|
+
const Qt = () => {
|
|
55
|
+
const { hasUndo: e, hasRedo: t, undo: n, redo: r } = ve();
|
|
73
56
|
return /* @__PURE__ */ o.jsxs("div", { className: "flex items-center", children: [
|
|
74
|
-
/* @__PURE__ */ o.jsx(
|
|
75
|
-
/* @__PURE__ */ o.jsx(
|
|
57
|
+
/* @__PURE__ */ o.jsx(q, { disabled: !e(), size: "sm", onClick: n, className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ o.jsx(ae, {}) }),
|
|
58
|
+
/* @__PURE__ */ o.jsx(q, { disabled: !t(), onClick: r, size: "sm", className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ o.jsx(ae, { className: "rotate-180 scale-y-[-1] transform" }) })
|
|
76
59
|
] });
|
|
77
60
|
};
|
|
78
|
-
function
|
|
79
|
-
const [e, t] =
|
|
61
|
+
function Zt() {
|
|
62
|
+
const [e, t] = be(), { t: n } = Y();
|
|
80
63
|
return /* @__PURE__ */ o.jsxs("div", { className: "flex items-center", children: [
|
|
81
|
-
/* @__PURE__ */ o.jsx(
|
|
64
|
+
/* @__PURE__ */ o.jsx(nt, { htmlFor: "dark-mode-switch", children: n("dark_mode") }),
|
|
82
65
|
/* @__PURE__ */ o.jsxs(
|
|
83
|
-
|
|
66
|
+
ot,
|
|
84
67
|
{
|
|
85
68
|
id: "dark-mode-switch",
|
|
86
69
|
checked: e,
|
|
@@ -104,7 +87,7 @@ function en() {
|
|
|
104
87
|
)
|
|
105
88
|
] });
|
|
106
89
|
}
|
|
107
|
-
const
|
|
90
|
+
const pe = ({ landscape: e = !1 }) => /* @__PURE__ */ o.jsxs(
|
|
108
91
|
"svg",
|
|
109
92
|
{
|
|
110
93
|
className: e ? "rotate-90" : "",
|
|
@@ -127,149 +110,149 @@ const ue = ({ landscape: e = !1 }) => /* @__PURE__ */ o.jsxs(
|
|
|
127
110
|
)
|
|
128
111
|
]
|
|
129
112
|
}
|
|
130
|
-
),
|
|
113
|
+
), Gt = [
|
|
131
114
|
{
|
|
132
115
|
title: "mobile_xs_title",
|
|
133
116
|
content: "mobile_xs_content",
|
|
134
117
|
breakpoint: "xs",
|
|
135
|
-
icon: /* @__PURE__ */ o.jsx(
|
|
118
|
+
icon: /* @__PURE__ */ o.jsx(le, {}),
|
|
136
119
|
width: 400
|
|
137
120
|
},
|
|
138
121
|
{
|
|
139
122
|
title: "mobile_sm_title",
|
|
140
123
|
content: "mobile_sm_content",
|
|
141
124
|
breakpoint: "sm",
|
|
142
|
-
icon: /* @__PURE__ */ o.jsx(
|
|
125
|
+
icon: /* @__PURE__ */ o.jsx(le, { className: "rotate-90" }),
|
|
143
126
|
width: 640
|
|
144
127
|
},
|
|
145
128
|
{
|
|
146
129
|
title: "tablet_md_title",
|
|
147
130
|
content: "tablet_md_content",
|
|
148
131
|
breakpoint: "md",
|
|
149
|
-
icon: /* @__PURE__ */ o.jsx(
|
|
132
|
+
icon: /* @__PURE__ */ o.jsx(pe, {}),
|
|
150
133
|
width: 800
|
|
151
134
|
},
|
|
152
135
|
{
|
|
153
136
|
title: "tablet_lg_title",
|
|
154
137
|
content: "tablet_lg_content",
|
|
155
138
|
breakpoint: "lg",
|
|
156
|
-
icon: /* @__PURE__ */ o.jsx(
|
|
139
|
+
icon: /* @__PURE__ */ o.jsx(pe, { landscape: !0 }),
|
|
157
140
|
width: 1024
|
|
158
141
|
},
|
|
159
142
|
{
|
|
160
143
|
title: "desktop_xl_title",
|
|
161
144
|
content: "desktop_xl_content",
|
|
162
145
|
breakpoint: "xl",
|
|
163
|
-
icon: /* @__PURE__ */ o.jsx(
|
|
146
|
+
icon: /* @__PURE__ */ o.jsx(Ve, {}),
|
|
164
147
|
width: 1420
|
|
165
148
|
},
|
|
166
149
|
{
|
|
167
150
|
title: "large_desktop_2xl_title",
|
|
168
151
|
content: "large_desktop_2xl_content",
|
|
169
152
|
breakpoint: "2xl",
|
|
170
|
-
icon: /* @__PURE__ */ o.jsx(
|
|
153
|
+
icon: /* @__PURE__ */ o.jsx(Ye, {}),
|
|
171
154
|
width: 1920
|
|
172
155
|
}
|
|
173
|
-
],
|
|
156
|
+
], ue = ({
|
|
174
157
|
title: e,
|
|
175
158
|
content: t,
|
|
176
159
|
currentBreakpoint: n,
|
|
177
|
-
breakpoint:
|
|
178
|
-
width:
|
|
160
|
+
breakpoint: r,
|
|
161
|
+
width: a,
|
|
179
162
|
icon: i,
|
|
180
163
|
onClick: c
|
|
181
164
|
}) => {
|
|
182
165
|
const { t: s } = Y();
|
|
183
|
-
return /* @__PURE__ */ o.jsxs(
|
|
184
|
-
/* @__PURE__ */ o.jsx(
|
|
185
|
-
|
|
166
|
+
return /* @__PURE__ */ o.jsxs(st, { children: [
|
|
167
|
+
/* @__PURE__ */ o.jsx(it, { asChild: !0, children: /* @__PURE__ */ o.jsx(
|
|
168
|
+
q,
|
|
186
169
|
{
|
|
187
|
-
onClick: () => c(
|
|
170
|
+
onClick: () => c(a),
|
|
188
171
|
size: "sm",
|
|
189
|
-
variant:
|
|
172
|
+
variant: r === n ? "secondary" : "ghost",
|
|
190
173
|
children: i
|
|
191
174
|
}
|
|
192
175
|
) }),
|
|
193
|
-
/* @__PURE__ */ o.jsx(
|
|
176
|
+
/* @__PURE__ */ o.jsx(rt, { className: "w-52 border-border", children: /* @__PURE__ */ o.jsx("div", { className: "flex justify-between space-x-4", children: /* @__PURE__ */ o.jsxs("div", { className: "space-y-1", children: [
|
|
194
177
|
/* @__PURE__ */ o.jsx("h4", { className: "text-sm font-semibold", children: s(e) }),
|
|
195
178
|
/* @__PURE__ */ o.jsx("p", { className: "text-xs", children: s(t) })
|
|
196
179
|
] }) }) })
|
|
197
180
|
] });
|
|
198
|
-
},
|
|
199
|
-
const [, e, t] =
|
|
200
|
-
n.includes(s) ? n.length > 2 &&
|
|
181
|
+
}, Xt = () => {
|
|
182
|
+
const [, e, t] = te(), [n, r] = at(), { t: a } = Y(), i = V("breakpoints", Gt), c = (s) => {
|
|
183
|
+
n.includes(s) ? n.length > 2 && r(n.filter((l) => l !== s)) : r((l) => [...l, s]);
|
|
201
184
|
};
|
|
202
|
-
return i.length < 4 ? /* @__PURE__ */ o.jsx("div", { className: "flex items-center rounded-md", children:
|
|
203
|
-
|
|
204
|
-
i.filter((s) =>
|
|
205
|
-
(s) => /* @__PURE__ */
|
|
185
|
+
return i.length < 4 ? /* @__PURE__ */ o.jsx("div", { className: "flex items-center rounded-md", children: O(i, (s) => /* @__PURE__ */ se(ue, { ...s, onClick: t, key: s.breakpoint, currentBreakpoint: e })) }) : /* @__PURE__ */ o.jsxs("div", { className: "flex items-center rounded-md", children: [
|
|
186
|
+
O(
|
|
187
|
+
i.filter((s) => re(n, Q(s.breakpoint))),
|
|
188
|
+
(s) => /* @__PURE__ */ se(ue, { ...s, onClick: t, key: s.breakpoint, currentBreakpoint: e })
|
|
206
189
|
),
|
|
207
|
-
/* @__PURE__ */ o.jsxs(
|
|
208
|
-
/* @__PURE__ */ o.jsx(
|
|
209
|
-
/* @__PURE__ */ o.jsxs(
|
|
210
|
-
/* @__PURE__ */ o.jsx(
|
|
211
|
-
/* @__PURE__ */ o.jsx(
|
|
212
|
-
|
|
213
|
-
|
|
190
|
+
/* @__PURE__ */ o.jsxs(lt, { children: [
|
|
191
|
+
/* @__PURE__ */ o.jsx(ct, { asChild: !0, children: /* @__PURE__ */ o.jsx("span", { className: "cursor-pointer px-2.5 hover:opacity-80", children: /* @__PURE__ */ o.jsx(Je, { className: "scale-90 transform" }) }) }),
|
|
192
|
+
/* @__PURE__ */ o.jsxs(dt, { className: "w-56 border-border text-xs", children: [
|
|
193
|
+
/* @__PURE__ */ o.jsx(pt, { children: a("Breakpoints") }),
|
|
194
|
+
/* @__PURE__ */ o.jsx(ut, {}),
|
|
195
|
+
O(i, (s) => /* @__PURE__ */ o.jsx(
|
|
196
|
+
ht,
|
|
214
197
|
{
|
|
215
198
|
disabled: s.breakpoint === "xs",
|
|
216
|
-
onCheckedChange: () => c(
|
|
217
|
-
checked:
|
|
218
|
-
children:
|
|
199
|
+
onCheckedChange: () => c(Q(s.breakpoint)),
|
|
200
|
+
checked: re(n, Q(s.breakpoint)),
|
|
201
|
+
children: a(s.title)
|
|
219
202
|
},
|
|
220
203
|
s.breakpoint
|
|
221
204
|
))
|
|
222
205
|
] })
|
|
223
206
|
] })
|
|
224
207
|
] });
|
|
225
|
-
},
|
|
226
|
-
const { t: e } = Y(), { setNewBlocks: t } =
|
|
227
|
-
t([]), n([]),
|
|
208
|
+
}, en = () => {
|
|
209
|
+
const { t: e } = Y(), { setNewBlocks: t } = mt(), [, n] = S(), [, r] = T(), a = K(() => {
|
|
210
|
+
t([]), n([]), r([]);
|
|
228
211
|
}, [t]);
|
|
229
|
-
return /* @__PURE__ */ o.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ o.jsxs(
|
|
230
|
-
/* @__PURE__ */ o.jsx(
|
|
212
|
+
return /* @__PURE__ */ o.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ o.jsxs(gt, { children: [
|
|
213
|
+
/* @__PURE__ */ o.jsx(ft, { asChild: !0, children: /* @__PURE__ */ o.jsxs(q, { size: "sm", variant: "ghost", className: "flex items-center gap-x-1", children: [
|
|
231
214
|
/* @__PURE__ */ o.jsx(Qe, {}),
|
|
232
215
|
" ",
|
|
233
216
|
e("clear")
|
|
234
217
|
] }) }),
|
|
235
|
-
/* @__PURE__ */ o.jsxs(
|
|
236
|
-
/* @__PURE__ */ o.jsxs(
|
|
237
|
-
/* @__PURE__ */ o.jsx(
|
|
238
|
-
/* @__PURE__ */ o.jsx(
|
|
218
|
+
/* @__PURE__ */ o.jsxs(xt, { className: "border-border", children: [
|
|
219
|
+
/* @__PURE__ */ o.jsxs(yt, { children: [
|
|
220
|
+
/* @__PURE__ */ o.jsx(vt, { children: e("clear_canvas_title") }),
|
|
221
|
+
/* @__PURE__ */ o.jsx(bt, { children: e("clear_canvas_description") })
|
|
239
222
|
] }),
|
|
240
|
-
/* @__PURE__ */ o.jsxs(
|
|
241
|
-
/* @__PURE__ */ o.jsx(
|
|
242
|
-
/* @__PURE__ */ o.jsx(
|
|
223
|
+
/* @__PURE__ */ o.jsxs(kt, { children: [
|
|
224
|
+
/* @__PURE__ */ o.jsx(wt, { children: e("cancel") }),
|
|
225
|
+
/* @__PURE__ */ o.jsx(jt, { onClick: a, children: e("yes") })
|
|
243
226
|
] })
|
|
244
227
|
] })
|
|
245
228
|
] }) });
|
|
246
|
-
},
|
|
247
|
-
const e = V("darkMode", !1), [t] =
|
|
229
|
+
}, tn = () => {
|
|
230
|
+
const e = V("darkMode", !1), [t] = ke();
|
|
248
231
|
return /* @__PURE__ */ o.jsxs("div", { className: "flex h-10 items-center justify-between border-b bg-background/70 px-2", children: [
|
|
249
232
|
/* @__PURE__ */ o.jsxs("div", { className: "flex h-full space-x-2", children: [
|
|
250
233
|
e ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
251
|
-
/* @__PURE__ */ o.jsx(
|
|
234
|
+
/* @__PURE__ */ o.jsx(Zt, {}),
|
|
252
235
|
/* @__PURE__ */ o.jsx(U, { orientation: "vertical" })
|
|
253
236
|
] }) : null,
|
|
254
|
-
/* @__PURE__ */ o.jsx(
|
|
237
|
+
/* @__PURE__ */ o.jsx(Xt, {}),
|
|
255
238
|
/* @__PURE__ */ o.jsx(U, { orientation: "vertical" }),
|
|
256
239
|
/* @__PURE__ */ o.jsxs("div", { className: "flex w-12 items-center justify-center gap-x-1 space-x-0 font-medium", children: [
|
|
257
|
-
/* @__PURE__ */ o.jsx(
|
|
240
|
+
/* @__PURE__ */ o.jsx(Ze, { className: "h-3.5 w-3.5 flex-shrink-0" }),
|
|
258
241
|
" ",
|
|
259
242
|
/* @__PURE__ */ o.jsxs("div", { className: "text-xs leading-3", children: [
|
|
260
|
-
|
|
243
|
+
Oe(t, 0),
|
|
261
244
|
"%"
|
|
262
245
|
] })
|
|
263
246
|
] }),
|
|
264
247
|
/* @__PURE__ */ o.jsx(U, { orientation: "vertical" }),
|
|
265
|
-
/* @__PURE__ */ o.jsx(
|
|
248
|
+
/* @__PURE__ */ o.jsx(Qt, {})
|
|
266
249
|
] }),
|
|
267
250
|
/* @__PURE__ */ o.jsxs("div", { className: "flex h-full items-center space-x-2", children: [
|
|
268
251
|
/* @__PURE__ */ o.jsx(U, { orientation: "vertical" }),
|
|
269
|
-
/* @__PURE__ */ o.jsx(
|
|
252
|
+
/* @__PURE__ */ o.jsx(en, {})
|
|
270
253
|
] })
|
|
271
254
|
] });
|
|
272
|
-
},
|
|
255
|
+
}, nn = `<!doctype html>
|
|
273
256
|
<html class="scroll-smooth h-full overflow-y-auto">
|
|
274
257
|
<head>
|
|
275
258
|
<meta charset="UTF-8">
|
|
@@ -317,8 +300,8 @@ const ue = ({ landscape: e = !1 }) => /* @__PURE__ */ o.jsxs(
|
|
|
317
300
|
<div class="frame-root h-full"></div>
|
|
318
301
|
<script src="https://cdn.jsdelivr.net/npm/quill@2.0.0/dist/quill.js"><\/script>
|
|
319
302
|
</body>
|
|
320
|
-
</html>`,
|
|
321
|
-
const [t] =
|
|
303
|
+
</html>`, on = (e) => {
|
|
304
|
+
const [t] = te(), [, n] = ke(), [r, a] = I({}), i = K(() => {
|
|
322
305
|
const { width: c, height: s } = e;
|
|
323
306
|
if (c < t) {
|
|
324
307
|
const l = parseFloat((c / t).toFixed(2).toString());
|
|
@@ -327,7 +310,7 @@ const ue = ({ landscape: e = !1 }) => /* @__PURE__ */ o.jsxs(
|
|
|
327
310
|
s && (d = {
|
|
328
311
|
// Eureka! This is the formula to calculate the height of the scaled element. Thank you ChatGPT 4
|
|
329
312
|
height: 100 + (s - p) / p * 100 + "%"
|
|
330
|
-
}),
|
|
313
|
+
}), a({
|
|
331
314
|
position: "relative",
|
|
332
315
|
top: 0,
|
|
333
316
|
transform: `scale(${l})`,
|
|
@@ -336,17 +319,17 @@ const ue = ({ landscape: e = !1 }) => /* @__PURE__ */ o.jsxs(
|
|
|
336
319
|
maxWidth: "none"
|
|
337
320
|
}), n(l * 100);
|
|
338
321
|
} else
|
|
339
|
-
|
|
322
|
+
a({}), n(100);
|
|
340
323
|
}, [t, e, n]);
|
|
341
|
-
return
|
|
324
|
+
return j(() => {
|
|
342
325
|
i();
|
|
343
|
-
}, [t, e, n, i]),
|
|
326
|
+
}, [t, e, n, i]), r;
|
|
344
327
|
};
|
|
345
|
-
let
|
|
346
|
-
typeof document < "u" && (
|
|
347
|
-
typeof window < "u" && (
|
|
348
|
-
const
|
|
349
|
-
class
|
|
328
|
+
let _e, Ne;
|
|
329
|
+
typeof document < "u" && (_e = document);
|
|
330
|
+
typeof window < "u" && (Ne = window);
|
|
331
|
+
const Ae = M.createContext({ document: _e, window: Ne }), J = () => M.useContext(Ae), { Provider: sn, Consumer: _o } = Ae;
|
|
332
|
+
class Ee extends me {
|
|
350
333
|
componentDidMount() {
|
|
351
334
|
this.props.contentDidMount();
|
|
352
335
|
}
|
|
@@ -354,21 +337,21 @@ class $e extends fe {
|
|
|
354
337
|
this.props.contentDidUpdate();
|
|
355
338
|
}
|
|
356
339
|
render() {
|
|
357
|
-
return
|
|
340
|
+
return Fe.only(this.props.children);
|
|
358
341
|
}
|
|
359
342
|
}
|
|
360
|
-
E(
|
|
361
|
-
children:
|
|
362
|
-
contentDidMount:
|
|
363
|
-
contentDidUpdate:
|
|
343
|
+
E(Ee, "propTypes", {
|
|
344
|
+
children: w.element.isRequired,
|
|
345
|
+
contentDidMount: w.func.isRequired,
|
|
346
|
+
contentDidUpdate: w.func.isRequired
|
|
364
347
|
});
|
|
365
|
-
class
|
|
366
|
-
constructor(n,
|
|
367
|
-
super(n,
|
|
348
|
+
class G extends me {
|
|
349
|
+
constructor(n, r) {
|
|
350
|
+
super(n, r);
|
|
368
351
|
E(this, "setRef", (n) => {
|
|
369
352
|
this.nodeRef.current = n;
|
|
370
|
-
const { forwardedRef:
|
|
371
|
-
typeof
|
|
353
|
+
const { forwardedRef: r } = this.props;
|
|
354
|
+
typeof r == "function" ? r(n) : r && (r.current = n);
|
|
372
355
|
});
|
|
373
356
|
E(this, "handleLoad", () => {
|
|
374
357
|
clearInterval(this.loadCheck), this.state.iframeLoaded || this.setState({ iframeLoaded: !0 });
|
|
@@ -399,8 +382,8 @@ class X extends fe {
|
|
|
399
382
|
const n = this.getDoc();
|
|
400
383
|
if (!n)
|
|
401
384
|
return null;
|
|
402
|
-
const
|
|
403
|
-
return [
|
|
385
|
+
const r = this.props.contentDidMount, a = this.props.contentDidUpdate, i = n.defaultView || n.parentView, c = /* @__PURE__ */ o.jsx(Ee, { contentDidMount: r, contentDidUpdate: a, children: /* @__PURE__ */ o.jsx(sn, { value: { document: n, window: i }, children: /* @__PURE__ */ o.jsx("div", { className: "frame-content", children: this.props.children }) }) }), s = this.getMountTarget();
|
|
386
|
+
return [ce.createPortal(this.props.head, this.getDoc().head), ce.createPortal(c, s)];
|
|
404
387
|
}
|
|
405
388
|
render() {
|
|
406
389
|
const n = {
|
|
@@ -416,16 +399,16 @@ class X extends fe {
|
|
|
416
399
|
// also inject into the body and can mess up React. For this reason
|
|
417
400
|
// initialContent is expected to have a div inside of the body
|
|
418
401
|
// element that we render react into.
|
|
419
|
-
E(
|
|
420
|
-
style:
|
|
402
|
+
E(G, "propTypes", {
|
|
403
|
+
style: w.object,
|
|
421
404
|
// eslint-disable-line
|
|
422
|
-
head:
|
|
423
|
-
initialContent:
|
|
424
|
-
mountTarget:
|
|
425
|
-
contentDidMount:
|
|
426
|
-
contentDidUpdate:
|
|
427
|
-
children:
|
|
428
|
-
}), E(
|
|
405
|
+
head: w.node,
|
|
406
|
+
initialContent: w.string,
|
|
407
|
+
mountTarget: w.string,
|
|
408
|
+
contentDidMount: w.func,
|
|
409
|
+
contentDidUpdate: w.func,
|
|
410
|
+
children: w.oneOfType([w.element, w.arrayOf(w.element)])
|
|
411
|
+
}), E(G, "defaultProps", {
|
|
429
412
|
style: {},
|
|
430
413
|
head: null,
|
|
431
414
|
children: void 0,
|
|
@@ -436,117 +419,117 @@ E(X, "propTypes", {
|
|
|
436
419
|
},
|
|
437
420
|
initialContent: '<!DOCTYPE html><html><head></head><body><div class="frame-root"></div></body></html>'
|
|
438
421
|
});
|
|
439
|
-
const
|
|
440
|
-
const { addCoreBlock: e } =
|
|
441
|
-
return
|
|
422
|
+
const rn = M.forwardRef((e, t) => /* @__PURE__ */ o.jsx(G, { ...e, forwardedRef: t })), an = () => {
|
|
423
|
+
const { addCoreBlock: e } = Ct(), t = V("getExternalPredefinedBlock", $);
|
|
424
|
+
return K(
|
|
442
425
|
async (n) => {
|
|
443
|
-
const { block:
|
|
444
|
-
if (
|
|
445
|
-
const c = await t(
|
|
446
|
-
return e({ blocks: c },
|
|
426
|
+
const { block: r, dropTargetId: a, relativeIndex: i } = n;
|
|
427
|
+
if (fe(r, "format")) {
|
|
428
|
+
const c = await t(r);
|
|
429
|
+
return e({ blocks: c }, a === 0 ? null : a, i);
|
|
447
430
|
}
|
|
448
|
-
return e(
|
|
431
|
+
return e(r, a === 0 ? null : a, i);
|
|
449
432
|
},
|
|
450
433
|
[e]
|
|
451
434
|
);
|
|
452
435
|
};
|
|
453
|
-
let _ = null,
|
|
454
|
-
function
|
|
455
|
-
const t = window.getComputedStyle(e), n = parseInt(t.paddingLeft, 10),
|
|
456
|
-
return { paddingLeft: n, paddingTop:
|
|
436
|
+
let _ = null, H = [], P = null, Me = null;
|
|
437
|
+
function ln(e) {
|
|
438
|
+
const t = window.getComputedStyle(e), n = parseInt(t.paddingLeft, 10), r = parseInt(t.paddingTop, 10), a = parseInt(t.paddingRight, 10), i = parseInt(t.paddingBottom, 10);
|
|
439
|
+
return { paddingLeft: n, paddingTop: r, paddingRight: a, paddingBottom: i };
|
|
457
440
|
}
|
|
458
|
-
const
|
|
441
|
+
const he = (e, t, n) => {
|
|
459
442
|
if (!_)
|
|
460
443
|
return;
|
|
461
|
-
const
|
|
462
|
-
|
|
463
|
-
const d =
|
|
444
|
+
const r = e.getBoundingClientRect(), a = _ == null ? void 0 : _.getElementById("placeholder"), { paddingLeft: i, paddingTop: c, paddingRight: s, paddingBottom: l } = ln(e);
|
|
445
|
+
a.style.width = t === "vertical" ? r.width - i - s + "px" : "2px", a.style.height = t === "vertical" ? "2px" : r.height - c - l + "px", a.style.display = "block";
|
|
446
|
+
const d = H.reduce(
|
|
464
447
|
(p, m) => Math.abs(m - n) < Math.abs(p - n) ? m : p
|
|
465
448
|
);
|
|
466
|
-
|
|
467
|
-
},
|
|
468
|
-
const t =
|
|
469
|
-
let c =
|
|
470
|
-
|
|
449
|
+
Me = H.indexOf(d), t === "vertical" ? (a.style.top = e.offsetTop + d + "px", a.style.left = e.offsetLeft + i + "px") : (a.style.top = e.offsetTop + c + "px", a.style.left = e.offsetLeft + d + "px");
|
|
450
|
+
}, cn = (e) => {
|
|
451
|
+
const t = Te(e), n = window.getComputedStyle(e), r = t === "horizontal", a = parseInt(n.paddingLeft), i = parseInt(n.paddingTop);
|
|
452
|
+
let c = r ? a : i;
|
|
453
|
+
H = [c], Array.from(e.children).forEach((s) => {
|
|
471
454
|
const l = window.getComputedStyle(s), d = parseInt(
|
|
472
|
-
|
|
473
|
-
), p =
|
|
474
|
-
|
|
455
|
+
r ? l.marginLeft + l.marginRight : l.marginTop + l.marginBottom
|
|
456
|
+
), p = r ? s.offsetWidth : s.offsetHeight;
|
|
457
|
+
H.push(c + p + d), c += p + d;
|
|
475
458
|
});
|
|
476
459
|
};
|
|
477
|
-
function
|
|
460
|
+
function Te(e) {
|
|
478
461
|
const t = window.getComputedStyle(e).display, n = window.getComputedStyle(e).flexDirection;
|
|
479
462
|
if (t === "flex")
|
|
480
463
|
return n === "column" || n === "column-reverse" ? "vertical" : "horizontal";
|
|
481
464
|
if (t === "grid") {
|
|
482
|
-
const
|
|
483
|
-
if (a.includes("auto"))
|
|
484
|
-
return "vertical";
|
|
465
|
+
const r = window.getComputedStyle(e).gridTemplateRows, a = window.getComputedStyle(e).gridTemplateColumns;
|
|
485
466
|
if (r.includes("auto"))
|
|
467
|
+
return "vertical";
|
|
468
|
+
if (a.includes("auto"))
|
|
486
469
|
return "horizontal";
|
|
487
470
|
}
|
|
488
471
|
return t === "block" ? "vertical" : "horizontal";
|
|
489
472
|
}
|
|
490
|
-
const
|
|
491
|
-
const t = e.target, n =
|
|
473
|
+
const dn = xe((e) => {
|
|
474
|
+
const t = e.target, n = Te(t);
|
|
492
475
|
if (n === "vertical") {
|
|
493
|
-
const
|
|
494
|
-
|
|
476
|
+
const r = e.clientY - t.offsetTop;
|
|
477
|
+
he(t, n, r);
|
|
495
478
|
} else {
|
|
496
|
-
const
|
|
497
|
-
|
|
479
|
+
const r = e.clientX - t.offsetLeft;
|
|
480
|
+
he(t, n, r);
|
|
498
481
|
}
|
|
499
|
-
}, 200),
|
|
500
|
-
e.preventDefault(), e.stopPropagation(),
|
|
482
|
+
}, 200), pn = (e) => {
|
|
483
|
+
e.preventDefault(), e.stopPropagation(), dn(e);
|
|
501
484
|
};
|
|
502
|
-
function
|
|
485
|
+
function Z() {
|
|
503
486
|
const e = _ == null ? void 0 : _.getElementById("placeholder");
|
|
504
487
|
e.style.display = "none";
|
|
505
488
|
}
|
|
506
|
-
const
|
|
507
|
-
const { document: e } =
|
|
489
|
+
const un = () => {
|
|
490
|
+
const { document: e } = J(), [t, n] = C(Bt), r = an(), a = Ie("dnd"), [, i] = L(), [, c] = S();
|
|
508
491
|
return _ = e, {
|
|
509
492
|
isDragging: t,
|
|
510
493
|
"data-dnd": "branch",
|
|
511
|
-
onDragOver:
|
|
512
|
-
onDrop:
|
|
494
|
+
onDragOver: a ? pn : $,
|
|
495
|
+
onDrop: a ? (s) => {
|
|
513
496
|
P == null || P.classList.remove("outline", "outline-green-300", "outline-2", "-outline-offset-2");
|
|
514
497
|
const l = JSON.parse(s.dataTransfer.getData("text/plain"));
|
|
515
498
|
let d = s.target.getAttribute("data-block-id");
|
|
516
|
-
d === null && (d = s.target.parentElement.getAttribute("data-block-id")),
|
|
517
|
-
|
|
499
|
+
d === null && (d = s.target.parentElement.getAttribute("data-block-id")), r({ block: l, dropTargetId: d || null, relativeIndex: Me }), n(!1), Z(), setTimeout(() => {
|
|
500
|
+
Z();
|
|
518
501
|
}, 300);
|
|
519
|
-
} :
|
|
520
|
-
onDragEnter:
|
|
502
|
+
} : $,
|
|
503
|
+
onDragEnter: a ? (s) => {
|
|
521
504
|
const l = s;
|
|
522
|
-
P = l.target, l.stopPropagation(), l.preventDefault(),
|
|
505
|
+
P = l.target, l.stopPropagation(), l.preventDefault(), H = [];
|
|
523
506
|
const d = l.target;
|
|
524
|
-
|
|
525
|
-
} :
|
|
526
|
-
onDragLeave:
|
|
507
|
+
cn(d), d.classList.add("outline", "outline-green-300", "outline-2", "-outline-offset-2"), n(!0), i(""), c([]);
|
|
508
|
+
} : $,
|
|
509
|
+
onDragLeave: a ? (s) => {
|
|
527
510
|
const l = s;
|
|
528
511
|
P = null, l.stopPropagation(), l.preventDefault(), l.target.classList.remove("outline", "outline-green-300", "outline-2", "-outline-offset-2");
|
|
529
|
-
} :
|
|
530
|
-
onMouseOut:
|
|
531
|
-
n(!1),
|
|
532
|
-
} :
|
|
512
|
+
} : $,
|
|
513
|
+
onMouseOut: a ? () => {
|
|
514
|
+
n(!1), Z();
|
|
515
|
+
} : $
|
|
533
516
|
};
|
|
534
517
|
};
|
|
535
|
-
function
|
|
518
|
+
function oe(e) {
|
|
536
519
|
return e.getAttribute("data-block-id") ? e : e.closest("[data-block-id]");
|
|
537
520
|
}
|
|
538
|
-
function
|
|
521
|
+
function hn(e) {
|
|
539
522
|
e.container.innerHTML = "", e.container.parentNode.removeChild(e.container);
|
|
540
523
|
var t = document.querySelector(".ql-toolbar");
|
|
541
524
|
t && t.parentNode.removeChild(t), e = null;
|
|
542
525
|
}
|
|
543
|
-
const
|
|
544
|
-
const e = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], t =
|
|
526
|
+
const mn = () => {
|
|
527
|
+
const e = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], t = Dt(), [, n] = L(), [r, a] = C(F);
|
|
545
528
|
return (i) => {
|
|
546
529
|
var m;
|
|
547
|
-
if (
|
|
530
|
+
if (r)
|
|
548
531
|
return;
|
|
549
|
-
const c =
|
|
532
|
+
const c = oe(i.target), s = c.getAttribute("data-block-type");
|
|
550
533
|
if (!s || !e.includes(s))
|
|
551
534
|
return;
|
|
552
535
|
const l = c.cloneNode(!0);
|
|
@@ -556,17 +539,17 @@ const xn = () => {
|
|
|
556
539
|
const d = new Lt(l, { placeholder: "Type here..." });
|
|
557
540
|
function p() {
|
|
558
541
|
const g = d.getText(0, d.getLength());
|
|
559
|
-
t([c.getAttribute("data-block-id")], { content: g }), c.removeAttribute("style"), l.removeEventListener("blur", p, !0),
|
|
542
|
+
t([c.getAttribute("data-block-id")], { content: g }), c.removeAttribute("style"), l.removeEventListener("blur", p, !0), hn(d), a(""), n("");
|
|
560
543
|
}
|
|
561
|
-
l.addEventListener("blur", p, !0), d.focus(), (m = l.querySelector(".ql-clipboard")) == null || m.remove(),
|
|
544
|
+
l.addEventListener("blur", p, !0), d.focus(), (m = l.querySelector(".ql-clipboard")) == null || m.remove(), a(c.getAttribute("data-block-id"));
|
|
562
545
|
};
|
|
563
|
-
},
|
|
564
|
-
const [, e] = T(), [, t] = S(), [, n] = L(), [
|
|
565
|
-
return (
|
|
566
|
-
if (
|
|
546
|
+
}, gn = () => {
|
|
547
|
+
const [, e] = T(), [, t] = S(), [, n] = L(), [r] = C(F);
|
|
548
|
+
return (a) => {
|
|
549
|
+
if (r)
|
|
567
550
|
return;
|
|
568
|
-
|
|
569
|
-
const i =
|
|
551
|
+
a.stopPropagation();
|
|
552
|
+
const i = oe(a.target);
|
|
570
553
|
if (i != null && i.getAttribute("data-block-id") && (i == null ? void 0 : i.getAttribute("data-block-id")) === "container") {
|
|
571
554
|
t([]), e([]), n("");
|
|
572
555
|
return;
|
|
@@ -578,31 +561,31 @@ const xn = () => {
|
|
|
578
561
|
i != null && i.getAttribute("data-block-id") && t([i.getAttribute("data-block-id")]);
|
|
579
562
|
n("");
|
|
580
563
|
};
|
|
581
|
-
},
|
|
582
|
-
const n =
|
|
564
|
+
}, fn = xe((e, t) => {
|
|
565
|
+
const n = oe(e.target);
|
|
583
566
|
n != null && n.getAttribute("data-style-id") && t(n.getAttribute("data-style-id"));
|
|
584
|
-
}, 100),
|
|
567
|
+
}, 100), xn = () => {
|
|
585
568
|
const [, e] = L(), [t] = C(F);
|
|
586
569
|
return (n) => {
|
|
587
|
-
t ||
|
|
570
|
+
t || fn(n, e);
|
|
588
571
|
};
|
|
589
|
-
},
|
|
590
|
-
const { document: t } =
|
|
591
|
-
|
|
572
|
+
}, yn = ({ children: e }) => {
|
|
573
|
+
const { document: t } = J(), [n] = S(), [r, a] = T();
|
|
574
|
+
j(() => {
|
|
592
575
|
setTimeout(() => {
|
|
593
|
-
if (!
|
|
576
|
+
if (!N(r))
|
|
594
577
|
return;
|
|
595
|
-
const d =
|
|
578
|
+
const d = Le(t, W(n));
|
|
596
579
|
if (d) {
|
|
597
580
|
const p = d.getAttribute("data-style-prop");
|
|
598
581
|
if (p) {
|
|
599
582
|
const m = d.getAttribute("data-style-id"), g = d.getAttribute("data-block-parent");
|
|
600
|
-
|
|
583
|
+
a([{ id: m, prop: p, blockId: g }]);
|
|
601
584
|
}
|
|
602
585
|
}
|
|
603
586
|
}, 100);
|
|
604
|
-
}, [t, n,
|
|
605
|
-
const i =
|
|
587
|
+
}, [t, n, a, r]);
|
|
588
|
+
const i = mn(), c = gn(), s = xn(), l = un();
|
|
606
589
|
return /* @__PURE__ */ o.jsx(
|
|
607
590
|
"div",
|
|
608
591
|
{
|
|
@@ -611,25 +594,25 @@ const xn = () => {
|
|
|
611
594
|
onClick: c,
|
|
612
595
|
onDoubleClick: i,
|
|
613
596
|
onMouseMove: s,
|
|
614
|
-
...
|
|
597
|
+
...He(l, "isDragging"),
|
|
615
598
|
className: "relative mb-5 h-full max-w-full " + (l.isDragging ? "dragging" : ""),
|
|
616
599
|
children: e
|
|
617
600
|
}
|
|
618
601
|
);
|
|
619
|
-
},
|
|
620
|
-
const { window: e } =
|
|
602
|
+
}, Le = (e, t) => e.querySelector(`[data-block-id="${t}"]`), vn = () => {
|
|
603
|
+
const { window: e } = J(), [t, n] = S(), [r] = ne(), [, a] = T(), { undo: i, redo: c } = ve(), s = we(), [, l] = je(), d = Ce(), { savePage: p } = It(), [m] = C(F), [, g] = C(St), k = (f) => {
|
|
621
604
|
f.key === "Enter" && (f.preventDefault(), t.length === 1 && g(W(t)));
|
|
622
605
|
}, B = (f) => {
|
|
623
|
-
const h =
|
|
606
|
+
const h = r.find((b) => b._id === f);
|
|
624
607
|
return h ? h._parent : null;
|
|
625
608
|
};
|
|
626
|
-
return
|
|
609
|
+
return j(() => {
|
|
627
610
|
const f = (h) => {
|
|
628
611
|
if (h.key === "Escape") {
|
|
629
|
-
n([]),
|
|
612
|
+
n([]), a([]);
|
|
630
613
|
return;
|
|
631
614
|
}
|
|
632
|
-
if (
|
|
615
|
+
if (k(h), !m && (h.key === "Delete" || h.key === "Backspace") && (h.preventDefault(), d(t)), h.ctrlKey || h.metaKey) {
|
|
633
616
|
if (h.key === "ArrowUp") {
|
|
634
617
|
h.preventDefault();
|
|
635
618
|
const b = t.length > 0 ? B(t[0]) : null;
|
|
@@ -647,34 +630,34 @@ const xn = () => {
|
|
|
647
630
|
e.removeEventListener("keydown", f);
|
|
648
631
|
};
|
|
649
632
|
}, [t, n, i, d, l, c, s, m, p, e]), null;
|
|
650
|
-
},
|
|
651
|
-
const [, n] = S(), [,
|
|
633
|
+
}, bn = ({ block: e, label: t }) => {
|
|
634
|
+
const [, n] = S(), [, r] = L(), [, a] = C(Be), i = Ie("dnd");
|
|
652
635
|
return /* @__PURE__ */ o.jsxs(
|
|
653
636
|
"div",
|
|
654
637
|
{
|
|
655
638
|
className: "mr-10 flex cursor-grab items-center space-x-1 px-1",
|
|
656
639
|
draggable: i ? "true" : "false",
|
|
657
640
|
onDragStart: (c) => {
|
|
658
|
-
c.dataTransfer.setData("text/plain", JSON.stringify(
|
|
659
|
-
n([]),
|
|
641
|
+
c.dataTransfer.setData("text/plain", JSON.stringify(ze(e, ["_id", "_type"]))), a(e._id), setTimeout(() => {
|
|
642
|
+
n([]), r(null);
|
|
660
643
|
}, 200);
|
|
661
644
|
},
|
|
662
645
|
children: [
|
|
663
|
-
/* @__PURE__ */ o.jsx(
|
|
646
|
+
/* @__PURE__ */ o.jsx(Ge, {}),
|
|
664
647
|
t
|
|
665
648
|
]
|
|
666
649
|
}
|
|
667
650
|
);
|
|
668
|
-
},
|
|
669
|
-
const n =
|
|
651
|
+
}, kn = ({ selectedBlockElement: e, block: t }) => {
|
|
652
|
+
const n = Ce(), r = we(), [, a] = S(), [, i] = T(), [c] = C(F), { floatingStyles: s, refs: l, update: d } = $t({
|
|
670
653
|
placement: "top-start",
|
|
671
|
-
middleware: [
|
|
654
|
+
middleware: [Ft(), Rt()],
|
|
672
655
|
elements: {
|
|
673
656
|
reference: e
|
|
674
657
|
}
|
|
675
658
|
});
|
|
676
|
-
|
|
677
|
-
const p = y(t, "_parent", null), m =
|
|
659
|
+
Pt(e, () => d(), e !== null);
|
|
660
|
+
const p = y(t, "_parent", null), m = N(y(t, "_name", "")) ? y(t, "_type", "") : y(t, "_name", "");
|
|
678
661
|
return !e || !t || c ? null : /* @__PURE__ */ o.jsxs(
|
|
679
662
|
"div",
|
|
680
663
|
{
|
|
@@ -688,58 +671,58 @@ const xn = () => {
|
|
|
688
671
|
onKeyDown: (g) => g.stopPropagation(),
|
|
689
672
|
className: "z-[99999] flex h-6 items-center bg-blue-500 py-2 text-xs text-white",
|
|
690
673
|
children: [
|
|
691
|
-
/* @__PURE__ */ o.jsx(
|
|
674
|
+
/* @__PURE__ */ o.jsx(bn, { label: m, block: t }),
|
|
692
675
|
/* @__PURE__ */ o.jsxs("div", { className: "flex gap-2 px-1", children: [
|
|
693
676
|
p && /* @__PURE__ */ o.jsx(
|
|
694
677
|
Xe,
|
|
695
678
|
{
|
|
696
679
|
className: "hover:scale-105",
|
|
697
680
|
onClick: () => {
|
|
698
|
-
i([]),
|
|
681
|
+
i([]), a([p]);
|
|
699
682
|
}
|
|
700
683
|
}
|
|
701
684
|
),
|
|
702
|
-
|
|
703
|
-
|
|
685
|
+
_t(y(t, "_type", "")) ? /* @__PURE__ */ o.jsx(et, { className: "hover:scale-105", onClick: () => r([t == null ? void 0 : t._id]) }) : null,
|
|
686
|
+
Nt(y(t, "_type", "")) ? /* @__PURE__ */ o.jsx(tt, { className: "hover:scale-105", onClick: () => n([t == null ? void 0 : t._id]) }) : null
|
|
704
687
|
] })
|
|
705
688
|
]
|
|
706
689
|
}
|
|
707
690
|
);
|
|
708
|
-
},
|
|
709
|
-
const [t] =
|
|
691
|
+
}, wn = ({ model: e }) => {
|
|
692
|
+
const [t] = At(), [n] = S(), [r] = be(), [a] = L(), [i] = T(), [c] = C(Be), { document: s, window: l } = J(), [d] = I(s == null ? void 0 : s.getElementById("highlighted-block")), [p] = I(
|
|
710
693
|
s == null ? void 0 : s.getElementById("selected-block")
|
|
711
694
|
), [m] = I(
|
|
712
695
|
s == null ? void 0 : s.getElementById("selected-styling-block")
|
|
713
696
|
), [g] = I(s == null ? void 0 : s.getElementById("dragged-block"));
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
}, [
|
|
717
|
-
const
|
|
718
|
-
return
|
|
719
|
-
const f = y(t, "primaryColor", "#000"), h = y(t, "secondaryColor", "#FFF"), b =
|
|
697
|
+
j(() => {
|
|
698
|
+
r ? s == null || s.documentElement.classList.add("dark") : s == null || s.documentElement.classList.remove("dark");
|
|
699
|
+
}, [r, s]);
|
|
700
|
+
const k = y(t, "headingFont", "DM Sans"), B = y(t, "bodyFont", "DM Sans");
|
|
701
|
+
return j(() => {
|
|
702
|
+
const f = y(t, "primaryColor", "#000"), h = y(t, "secondaryColor", "#FFF"), b = Ot({
|
|
720
703
|
colors: [f, h],
|
|
721
704
|
names: ["primary", "secondary"]
|
|
722
705
|
});
|
|
723
706
|
b.primary.DEFAULT = f, b.secondary.DEFAULT = h;
|
|
724
|
-
const
|
|
707
|
+
const R = y(t, "roundedCorners", "0");
|
|
725
708
|
!l || !l.tailwind || (l.tailwind.config = {
|
|
726
709
|
darkMode: "class",
|
|
727
710
|
theme: {
|
|
728
711
|
fontFamily: {
|
|
729
|
-
heading: [
|
|
712
|
+
heading: [k],
|
|
730
713
|
body: [B]
|
|
731
714
|
},
|
|
732
715
|
extend: {
|
|
733
716
|
borderRadius: {
|
|
734
|
-
global: `${
|
|
717
|
+
global: `${R || "0"}px`
|
|
735
718
|
},
|
|
736
719
|
colors: b
|
|
737
720
|
}
|
|
738
721
|
},
|
|
739
722
|
plugins: [
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
723
|
+
Ht,
|
|
724
|
+
zt,
|
|
725
|
+
Ut,
|
|
743
726
|
l.tailwind.plugin.withOptions(() => ({ addVariant: z, e: D }) => {
|
|
744
727
|
z("hs-accordion-active", [
|
|
745
728
|
({ modifySelectors: v, separator: u }) => {
|
|
@@ -774,40 +757,40 @@ const xn = () => {
|
|
|
774
757
|
})
|
|
775
758
|
]
|
|
776
759
|
});
|
|
777
|
-
}, [t, l,
|
|
778
|
-
p && (p.textContent = `${
|
|
760
|
+
}, [t, l, k, B]), j(() => {
|
|
761
|
+
p && (p.textContent = `${O(n, (f) => `[data-block-id="${f}"]`).join(",")}{
|
|
779
762
|
outline: 1px solid ${n.length === 1 ? "#42a1fc" : "orange"} !important; outline-offset: -1px;
|
|
780
763
|
}`);
|
|
781
|
-
}, [n, p]),
|
|
764
|
+
}, [n, p]), j(() => {
|
|
782
765
|
if (!c) {
|
|
783
766
|
g.textContent = "";
|
|
784
767
|
return;
|
|
785
768
|
}
|
|
786
769
|
g.textContent = `[data-block-id="${c}"]{ pointer-events: none !important; opacity: 0.2 !important}`;
|
|
787
|
-
}, [c]),
|
|
788
|
-
d && (d.textContent =
|
|
789
|
-
}, [
|
|
790
|
-
m && (m.textContent = `${
|
|
770
|
+
}, [c]), j(() => {
|
|
771
|
+
d && (d.textContent = a ? `[data-style-id="${a}"]{ outline: 1px solid #42a1fc !important; outline-offset: -1px;}` : "");
|
|
772
|
+
}, [a, n, d]), j(() => {
|
|
773
|
+
m && (m.textContent = `${O(i, ({ id: f }) => `[data-style-id="${f}"]`).join(",")}{
|
|
791
774
|
outline: 1px solid #42a1fc !important; outline-offset: -1px;
|
|
792
775
|
}`);
|
|
793
|
-
}, [i, m]),
|
|
794
|
-
const f = y(t, "bodyTextLightColor", "#64748b"), h = y(t, "bodyTextDarkColor", "#94a3b8"), b = y(t, "bodyBgLightColor", "#FFFFFF"),
|
|
795
|
-
s.body.className = `font-body antialiased text-[${f}] bg-[${b}] dark:text-[${h}] dark:bg-[${
|
|
776
|
+
}, [i, m]), j(() => {
|
|
777
|
+
const f = y(t, "bodyTextLightColor", "#64748b"), h = y(t, "bodyTextDarkColor", "#94a3b8"), b = y(t, "bodyBgLightColor", "#FFFFFF"), R = y(t, "bodyBgDarkColor", "#0f172a");
|
|
778
|
+
s.body.className = `font-body antialiased text-[${f}] bg-[${b}] dark:text-[${h}] dark:bg-[${R}]`;
|
|
796
779
|
}, [t, s, e]), e === "page" ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
797
|
-
|
|
780
|
+
k && /* @__PURE__ */ o.jsx(
|
|
798
781
|
"link",
|
|
799
782
|
{
|
|
800
783
|
id: "heading-font",
|
|
801
784
|
rel: "stylesheet",
|
|
802
785
|
type: "text/css",
|
|
803
|
-
href: `https://fonts.googleapis.com/css2?family=${
|
|
786
|
+
href: `https://fonts.googleapis.com/css2?family=${k.replace(
|
|
804
787
|
/ /g,
|
|
805
788
|
"+"
|
|
806
789
|
)}:wght@300;400;500;600;700;800;900&display=swap`,
|
|
807
790
|
media: "all"
|
|
808
791
|
}
|
|
809
792
|
),
|
|
810
|
-
B &&
|
|
793
|
+
B && k !== B && /* @__PURE__ */ o.jsx(
|
|
811
794
|
"link",
|
|
812
795
|
{
|
|
813
796
|
id: "body-font",
|
|
@@ -820,93 +803,93 @@ const xn = () => {
|
|
|
820
803
|
media: "all"
|
|
821
804
|
}
|
|
822
805
|
),
|
|
823
|
-
|
|
806
|
+
k && /* @__PURE__ */ o.jsx("style", { children: `h1,h2,h3,h4,h5,h6{font-family: "${k}",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";}` })
|
|
824
807
|
] }) : null;
|
|
825
|
-
},
|
|
808
|
+
}, jn = (e) => {
|
|
826
809
|
const t = {};
|
|
827
810
|
return Object.keys(e).forEach((n) => {
|
|
828
|
-
|
|
811
|
+
ee(e[n]) && e[n].startsWith(de) && (t[n] = e[n].replace(de, "").split(","));
|
|
829
812
|
}), t;
|
|
830
|
-
},
|
|
831
|
-
const t = e.replace(
|
|
832
|
-
return
|
|
813
|
+
}, Cn = Ue((e) => {
|
|
814
|
+
const t = e.replace(Se, "").split(",");
|
|
815
|
+
return qt(t[0], t[1]);
|
|
833
816
|
});
|
|
834
|
-
function
|
|
817
|
+
function Bn(e, t) {
|
|
835
818
|
return y(e, `${t}_attrs`, {});
|
|
836
819
|
}
|
|
837
|
-
function
|
|
820
|
+
function Dn(e) {
|
|
838
821
|
const t = {};
|
|
839
822
|
return Object.keys(e).forEach((n) => {
|
|
840
|
-
if (
|
|
841
|
-
const
|
|
823
|
+
if (ee(e[n]) && e[n].startsWith(Se)) {
|
|
824
|
+
const r = Cn(e[n]);
|
|
842
825
|
t[n] = {
|
|
843
|
-
className:
|
|
826
|
+
className: r,
|
|
844
827
|
"data-style-prop": n,
|
|
845
828
|
"data-block-parent": e._id,
|
|
846
829
|
"data-style-id": `${n}-${e._id}`,
|
|
847
|
-
...
|
|
830
|
+
...Bn(e, n)
|
|
848
831
|
};
|
|
849
832
|
}
|
|
850
833
|
}), t;
|
|
851
834
|
}
|
|
852
|
-
function
|
|
835
|
+
function In(e, t) {
|
|
853
836
|
const n = y(e, "_bindings", {});
|
|
854
|
-
return
|
|
855
|
-
|
|
837
|
+
return N(n) ? { ...e } : (We(n, (r, a) => {
|
|
838
|
+
ee(r) && y(t, r, null) && (e[a] = y(t, r, null));
|
|
856
839
|
}), e);
|
|
857
840
|
}
|
|
858
|
-
function
|
|
859
|
-
const [t] = ne(), n =
|
|
841
|
+
function X({ blocks: e }) {
|
|
842
|
+
const [t] = ne(), n = K((i) => Dn(i), []), [r] = Vt(), [a] = C(F);
|
|
860
843
|
return /* @__PURE__ */ o.jsx(o.Fragment, { children: M.Children.toArray(
|
|
861
844
|
e.map((i, c) => {
|
|
862
|
-
if (
|
|
845
|
+
if (a === i._id)
|
|
863
846
|
return null;
|
|
864
|
-
const s =
|
|
865
|
-
|
|
847
|
+
const s = jn(i), l = {};
|
|
848
|
+
N(s) || Object.keys(s).forEach((g) => {
|
|
866
849
|
l[g] = M.Children.toArray(
|
|
867
|
-
s[g].map((
|
|
850
|
+
s[g].map((k) => /* @__PURE__ */ o.jsx(X, { blocks: [qe(t, { _id: k })] }))
|
|
868
851
|
);
|
|
869
852
|
});
|
|
870
|
-
const d =
|
|
871
|
-
l.children = d.length ? /* @__PURE__ */ o.jsx(
|
|
872
|
-
const p =
|
|
873
|
-
return
|
|
853
|
+
const d = ye(t, { _parent: i._id });
|
|
854
|
+
l.children = d.length ? /* @__PURE__ */ o.jsx(X, { blocks: d }) : null;
|
|
855
|
+
const p = Kt(i._type), m = y(p, "builderComponent", y(p, "component", null));
|
|
856
|
+
return Ke(m) ? /* @__PURE__ */ o.jsx("noscript", { children: `<!-- ${i == null ? void 0 : i._type} not registered -->` }) : /* @__PURE__ */ o.jsx(ge, { children: M.createElement(m, {
|
|
874
857
|
blockProps: {
|
|
875
858
|
"data-block-id": i._id,
|
|
876
859
|
"data-block-type": i._type,
|
|
877
|
-
"data-dnd":
|
|
860
|
+
"data-dnd": fe(p, "canAcceptBlock") ? "branch" : "leaf"
|
|
878
861
|
},
|
|
879
862
|
inBuilder: !0,
|
|
880
863
|
index: c,
|
|
881
|
-
...
|
|
864
|
+
...In(i, r),
|
|
882
865
|
...n(i),
|
|
883
866
|
...l
|
|
884
867
|
}) });
|
|
885
868
|
})
|
|
886
869
|
) });
|
|
887
870
|
}
|
|
888
|
-
const
|
|
889
|
-
const [e] = ne(), t =
|
|
890
|
-
return /* @__PURE__ */ o.jsx(
|
|
891
|
-
},
|
|
892
|
-
const [e] = C(
|
|
893
|
-
|
|
871
|
+
const Sn = () => {
|
|
872
|
+
const [e] = ne(), t = N(e) ? null : /* @__PURE__ */ o.jsx(Yt, { children: /* @__PURE__ */ o.jsx(X, { blocks: ye(e, (n) => N(n._parent)) }) });
|
|
873
|
+
return /* @__PURE__ */ o.jsx(Wt, { children: t });
|
|
874
|
+
}, _n = (e, t) => e.querySelector(`[data-style-id="${t}"]`), Nn = () => {
|
|
875
|
+
const [e] = C(Et), [t] = je(), [n] = te(), [, r] = S(), a = Mt(), [, i] = L(), c = ie(null), s = ie(null), [l, d] = I({ width: 0, height: 0 }), p = on(l), [m, g] = I(0), [k, B] = I([]), [, f] = I([]), [, h] = C(Tt), [b, R] = T(), z = V("loading", !1);
|
|
876
|
+
j(() => {
|
|
894
877
|
const { clientWidth: u, clientHeight: x } = s.current;
|
|
895
878
|
d({ width: u, height: x }), m === 0 && g(u);
|
|
896
879
|
}, [s, n, m]);
|
|
897
880
|
const D = (u, x = 0) => {
|
|
898
|
-
const { top:
|
|
899
|
-
return
|
|
881
|
+
const { top: A } = u.getBoundingClientRect();
|
|
882
|
+
return A + x >= 0 && A - x <= window.innerHeight;
|
|
900
883
|
};
|
|
901
|
-
|
|
884
|
+
j(() => {
|
|
902
885
|
var u, x;
|
|
903
|
-
if (
|
|
904
|
-
const
|
|
905
|
-
|
|
886
|
+
if (a && a.type !== "Multiple" && c.current) {
|
|
887
|
+
const A = Le(c.current.contentDocument, a._id);
|
|
888
|
+
A && (D(A) || (x = (u = c.current) == null ? void 0 : u.contentWindow) == null || x.scrollTo({ top: A.offsetTop, behavior: "smooth" }), B([A]));
|
|
906
889
|
}
|
|
907
|
-
}, [
|
|
908
|
-
if (!
|
|
909
|
-
const u =
|
|
890
|
+
}, [a]), j(() => {
|
|
891
|
+
if (!N(b) && c.current) {
|
|
892
|
+
const u = _n(
|
|
910
893
|
c.current.contentDocument,
|
|
911
894
|
W(b).id
|
|
912
895
|
);
|
|
@@ -914,8 +897,8 @@ const Nn = () => {
|
|
|
914
897
|
} else
|
|
915
898
|
f([null]);
|
|
916
899
|
}, [b]);
|
|
917
|
-
const v =
|
|
918
|
-
let u =
|
|
900
|
+
const v = Pe(() => {
|
|
901
|
+
let u = nn;
|
|
919
902
|
return e === "offline" && (u = u.replace(
|
|
920
903
|
"https://old.chaibuilder.com/offline/tailwind.cdn.js",
|
|
921
904
|
"/offline/tailwind.cdn.js"
|
|
@@ -925,14 +908,14 @@ const Nn = () => {
|
|
|
925
908
|
"div",
|
|
926
909
|
{
|
|
927
910
|
onClick: () => {
|
|
928
|
-
|
|
911
|
+
r([]), R([]);
|
|
929
912
|
},
|
|
930
913
|
onMouseLeave: () => setTimeout(() => i(""), 300),
|
|
931
914
|
className: "relative mx-auto h-full w-full overflow-hidden",
|
|
932
|
-
style: m > 0 && !
|
|
915
|
+
style: m > 0 && !N(p) ? { width: t ? "100%" : m } : {},
|
|
933
916
|
ref: s,
|
|
934
917
|
children: /* @__PURE__ */ o.jsxs(
|
|
935
|
-
|
|
918
|
+
rn,
|
|
936
919
|
{
|
|
937
920
|
contentDidMount: () => h(c.current),
|
|
938
921
|
ref: c,
|
|
@@ -941,16 +924,16 @@ const Nn = () => {
|
|
|
941
924
|
className: "relative mx-auto box-content h-full max-w-full shadow-lg transition-all duration-300 ease-linear",
|
|
942
925
|
initialContent: v,
|
|
943
926
|
children: [
|
|
944
|
-
/* @__PURE__ */ o.jsx(
|
|
927
|
+
/* @__PURE__ */ o.jsx(vn, {}),
|
|
945
928
|
/* @__PURE__ */ o.jsx(
|
|
946
|
-
|
|
929
|
+
kn,
|
|
947
930
|
{
|
|
948
|
-
block:
|
|
949
|
-
selectedBlockElement: W(
|
|
931
|
+
block: a,
|
|
932
|
+
selectedBlockElement: W(k)
|
|
950
933
|
}
|
|
951
934
|
),
|
|
952
|
-
/* @__PURE__ */ o.jsx(
|
|
953
|
-
/* @__PURE__ */ o.jsx(
|
|
935
|
+
/* @__PURE__ */ o.jsx(wn, { model: "page" }),
|
|
936
|
+
/* @__PURE__ */ o.jsx(yn, { children: z ? /* @__PURE__ */ o.jsx("div", { className: "h-full p-4", children: /* @__PURE__ */ o.jsx(De, { className: "h-full" }) }) : /* @__PURE__ */ o.jsx(Sn, {}) }),
|
|
954
937
|
/* @__PURE__ */ o.jsx("br", {}),
|
|
955
938
|
/* @__PURE__ */ o.jsx("div", { id: "placeholder", className: "absolute z-[99999] max-w-full bg-green-500 transition-transform" })
|
|
956
939
|
]
|
|
@@ -958,10 +941,10 @@ const Nn = () => {
|
|
|
958
941
|
)
|
|
959
942
|
}
|
|
960
943
|
);
|
|
961
|
-
},
|
|
962
|
-
/* @__PURE__ */ o.jsx(
|
|
963
|
-
/* @__PURE__ */ o.jsx("div", { className: "relative h-full overflow-hidden bg-slate-800/90 bg-[linear-gradient(to_right,#222_0.5px,transparent_0.5px),linear-gradient(to_bottom,#222_0.5px,transparent_0.5px)] bg-[size:12px_12px] px-2", children: /* @__PURE__ */ o.jsx(
|
|
944
|
+
}, No = () => /* @__PURE__ */ o.jsxs("div", { className: "flex h-full w-full flex-col", children: [
|
|
945
|
+
/* @__PURE__ */ o.jsx(tn, {}),
|
|
946
|
+
/* @__PURE__ */ o.jsx("div", { className: "relative h-full overflow-hidden bg-slate-800/90 bg-[linear-gradient(to_right,#222_0.5px,transparent_0.5px),linear-gradient(to_bottom,#222_0.5px,transparent_0.5px)] bg-[size:12px_12px] px-2", children: /* @__PURE__ */ o.jsx(ge, { fallback: /* @__PURE__ */ o.jsx(De, { className: "h-full" }), children: /* @__PURE__ */ o.jsx(Jt, { children: /* @__PURE__ */ o.jsx(Nn, {}) }) }) })
|
|
964
947
|
] });
|
|
965
948
|
export {
|
|
966
|
-
|
|
949
|
+
No as default
|
|
967
950
|
};
|