@chaibuilder/sdk 1.2.56 → 1.2.58
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-HeYXoex4.js → AddBlocks-05ZH2Suu.js} +46 -50
- package/dist/AddBlocks-MH_fqSRf.cjs +1 -0
- package/dist/CanvasArea-7nhpzTI-.cjs +59 -0
- package/dist/{CanvasArea-CqILE5PR.js → CanvasArea-kMGTLtCw.js} +409 -394
- package/dist/CodeEditor-vECReGwz.cjs +1 -0
- package/dist/{CodeEditor-kxV5RCpd.js → CodeEditor-zYBqhBv3.js} +33 -39
- package/dist/{CurrentPage-IrFGAb7n.js → CurrentPage-VksVpchp.js} +26 -25
- package/dist/CurrentPage-caSpOhR9.cjs +1 -0
- package/dist/{ListTree-0n_G8NJx.js → ListTree-0iy8aBgI.js} +82 -65
- package/dist/ListTree-Njsk1AzL.cjs +1 -0
- package/dist/{PagesPanel-RYBf0Yct.js → PagesPanel-2AEsdqhe.js} +20 -19
- package/dist/PagesPanel-tb0qtxz4.cjs +1 -0
- package/dist/{ProjectPanel-Zagx6l3Q.js → ProjectPanel-IHFBvE5H.js} +25 -24
- package/dist/ProjectPanel-gmBUq2NI.cjs +1 -0
- package/dist/{Settings-RLDTFFf8.js → Settings-r9IvIq0G.js} +405 -396
- package/dist/Settings-uVLt1oiz.cjs +1 -0
- package/dist/{SidePanels-ao969pMV.js → SidePanels-2fD5UfH5.js} +89 -88
- package/dist/SidePanels-rhTLiLy6.cjs +1 -0
- package/dist/ThemeConfiguration-PvMN3j6h.cjs +1 -0
- package/dist/{ThemeConfiguration-S7yArRMp.js → ThemeConfiguration-ab7lbA2y.js} +18 -24
- package/dist/Topbar-1JTIu0uN.cjs +1 -0
- package/dist/{Topbar-B8u0whpc.js → Topbar-x4gslZ4T.js} +39 -38
- package/dist/UILibrariesPanel-CaGLzB9c.cjs +1 -0
- package/dist/UILibrariesPanel-raxCToMd.js +216 -0
- package/dist/{UnsplashImages-wWRifkCp.js → UnsplashImages-alt_doTy.js} +42 -47
- package/dist/UnsplashImages-cah1BRL_.cjs +1 -0
- package/dist/UploadImages-5dRETWCo.cjs +1 -0
- package/dist/{UploadImages-lUvZhW_j.js → UploadImages-JqVL_aQd.js} +32 -38
- package/dist/add-page-modal-9e6JkoxV.cjs +1 -0
- package/dist/{add-page-modal-04b4l2zu.js → add-page-modal-DbmbwG7V.js} +29 -28
- package/dist/{confirm-alert-FX5030eR.js → confirm-alert-m85JJlQi.js} +15 -21
- package/dist/confirm-alert-rYsxlfR4.cjs +1 -0
- package/dist/core.cjs +1 -1
- package/dist/core.js +44 -43
- package/dist/delete-page-modal-YtRcj7eK.cjs +1 -0
- package/dist/{delete-page-modal-1u9CyAIP.js → delete-page-modal-nIBA3zCg.js} +22 -21
- package/dist/email.cjs +1 -1
- package/dist/email.js +19 -19
- package/dist/form-G3PqS2Gc.cjs +1 -0
- package/dist/{form-HRdEJjVq.js → form-MSL4CDff.js} +3 -3
- package/dist/{html-to-json-OnIZDDXw.js → html-to-json-_01DXd-a.js} +37 -36
- package/dist/html-to-json-ndxaXRT8.cjs +1 -0
- package/dist/index-0FIxW0gR.cjs +1 -0
- package/dist/index-5IJnVFyU.cjs +206 -0
- package/dist/index-7zSzDmAA.cjs +1 -0
- package/dist/{index-vfmO3y2d.js → index-b4Wjumon.js} +19 -19
- package/dist/{ChaiBuilderEditor-tkzS851D.js → index-grcmKbfu.js} +14660 -17763
- package/dist/index-uLn8W3eR.js +3145 -0
- package/dist/lib.cjs +2 -2
- package/dist/lib.js +17 -16
- package/dist/mockServiceWorker.js +18 -10
- package/dist/page-viewer-JySaivSD.cjs +1 -0
- package/dist/{page-viewer-dcb3u4OV.js → page-viewer-QxHe6m6V.js} +27 -26
- package/dist/project-general-setting-FqXwffxC.cjs +1 -0
- package/dist/{project-general-setting--sS34seu.js → project-general-setting-nSzmnyIU.js} +23 -22
- package/dist/{project-seo-setting-8tc3I-0M.js → project-seo-setting-3kFJ77jY.js} +20 -26
- package/dist/project-seo-setting-C3ilIIeM.cjs +1 -0
- package/dist/render.cjs +1 -1
- package/dist/render.js +104 -102
- package/dist/single-page-detail-F5J53NCW.cjs +1 -0
- package/dist/{single-page-detail-tP2pfgBp.js → single-page-detail-uSK1ExCH.js} +26 -25
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +19 -18
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +144 -150
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.js +164 -107
- package/package.json +1 -1
- package/dist/AddBlocks-VHoZezjj.cjs +0 -1
- package/dist/CanvasArea-137WY3Wx.cjs +0 -56
- package/dist/ChaiBuilderEditor-aY8flOgX.cjs +0 -206
- package/dist/CodeEditor-R2jKe97T.cjs +0 -1
- package/dist/CurrentPage-PjrVzHXR.cjs +0 -1
- package/dist/ListTree-C6oCXZDV.cjs +0 -1
- package/dist/PagesPanel-lIC3kYmS.cjs +0 -1
- package/dist/ProjectPanel-0Siyi5YS.cjs +0 -1
- package/dist/Settings-6QRVcl16.cjs +0 -1
- package/dist/SidePanels-j1EFsBlK.cjs +0 -1
- package/dist/ThemeConfiguration-q1471P7b.cjs +0 -1
- package/dist/Topbar-ogFKKDbx.cjs +0 -1
- package/dist/UILibrariesPanel-cm9CFWxc.cjs +0 -1
- package/dist/UILibrariesPanel-tcfz2ELp.js +0 -196
- package/dist/UnsplashImages-E2L3YDJI.cjs +0 -1
- package/dist/UploadImages-s-eeaGiS.cjs +0 -1
- package/dist/add-page-modal-eroF20lO.cjs +0 -1
- package/dist/confirm-alert-XuxEzG-V.cjs +0 -1
- package/dist/delete-page-modal-pgh7sdfg.cjs +0 -1
- package/dist/form-Z4IRWj0o.cjs +0 -1
- package/dist/html-to-json-rauxDBi6.cjs +0 -1
- package/dist/index-bt7EhwLh.cjs +0 -1
- package/dist/page-viewer-O960kM2x.cjs +0 -1
- package/dist/project-general-setting-lIvNs-Vq.cjs +0 -1
- package/dist/project-seo-setting-MIlAuqcc.cjs +0 -1
- package/dist/single-page-detail-0Z_hvd_j.cjs +0 -1
- package/dist/useCanvasSettings-R0h03UfD.cjs +0 -1
- package/dist/useCanvasSettings-rEZHbw3s.js +0 -6
package/dist/core.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
import {
|
|
1
|
+
import { C as Z } from "./index-grcmKbfu.js";
|
|
2
|
+
import { a1 as z, aq as J, a2 as K, ar as N, a3 as V, ap as Y, D as _, X as ss, h as es, u as as, a4 as os, a5 as ts, $ as rs, a6 as is, a7 as ps, a8 as ls, a9 as ms, aa as us, t as ds, ab as cs, ac as Bs, ad as ks, ae as ns, q as Cs, a0 as Ss, s as gs, af as Ps, Q as vs, ai as ys, ah as hs, ag as As, r as Is, ao as Ds, as as Ms, at as Rs, aj as fs, al as Us, ak as bs, v as xs, am as Ts, an as qs } from "./index-uLn8W3eR.js";
|
|
3
|
+
import { useTranslation as Hs } from "react-i18next";
|
|
4
|
+
import "i18next";
|
|
3
5
|
import "./jsx-runtime-WbnYoNE9.js";
|
|
4
6
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
5
7
|
import "react";
|
|
@@ -8,22 +10,23 @@ import "react-dom";
|
|
|
8
10
|
import "@radix-ui/react-scroll-area";
|
|
9
11
|
import "@floating-ui/react-dom";
|
|
10
12
|
import "jotai";
|
|
11
|
-
import "i18next";
|
|
12
13
|
import "flagged";
|
|
13
14
|
import "lodash-es";
|
|
14
|
-
import "./MODIFIERS-fd5XOmum.js";
|
|
15
15
|
import "./Functions-7jnEwJyw.js";
|
|
16
16
|
import "tailwind-merge";
|
|
17
|
+
import "@radix-ui/react-icons";
|
|
18
|
+
import "react-hotkeys-hook";
|
|
17
19
|
import "@chaibuilder/runtime";
|
|
18
20
|
import "@react-hookz/web";
|
|
19
|
-
import "
|
|
20
|
-
import "./
|
|
21
|
+
import "lucide-react";
|
|
22
|
+
import "./index-VBXQixVm.js";
|
|
21
23
|
import "@radix-ui/react-toggle";
|
|
22
24
|
import "class-variance-authority";
|
|
25
|
+
import "./utils-VpVqnC9m.js";
|
|
26
|
+
import "./MODIFIERS-fd5XOmum.js";
|
|
23
27
|
import "@radix-ui/react-switch";
|
|
24
28
|
import "@radix-ui/react-slot";
|
|
25
29
|
import "@radix-ui/react-accordion";
|
|
26
|
-
import "@radix-ui/react-icons";
|
|
27
30
|
import "@radix-ui/react-alert-dialog";
|
|
28
31
|
import "@radix-ui/react-dialog";
|
|
29
32
|
import "@radix-ui/react-label";
|
|
@@ -40,51 +43,49 @@ import "cmdk";
|
|
|
40
43
|
import "@radix-ui/react-context-menu";
|
|
41
44
|
import "react-icons-picker";
|
|
42
45
|
import "react-quill";
|
|
43
|
-
import "
|
|
44
|
-
import "lucide-react";
|
|
45
|
-
import "./index-VBXQixVm.js";
|
|
46
|
+
import "tree-model";
|
|
46
47
|
export {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
48
|
+
Z as ChaiBuilderEditor,
|
|
49
|
+
z as useActiveModal,
|
|
50
|
+
J as useActivePanel,
|
|
51
|
+
K as useAddBlock,
|
|
52
|
+
N as useAddBlockParent,
|
|
53
|
+
V as useAddClassesToBlocks,
|
|
54
|
+
Y as useAllBlocks,
|
|
54
55
|
_ as useBlocksStore,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
ss as useBrandingOptions,
|
|
57
|
+
es as useBuilderProp,
|
|
58
|
+
as as useBuilderReset,
|
|
58
59
|
os as useCanvasWidth,
|
|
59
60
|
ts as useCanvasZoom,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
61
|
+
rs as useCodeEditor,
|
|
62
|
+
is as useCopyBlockIds,
|
|
63
|
+
ps as useCopyToClipboard,
|
|
64
|
+
ls as useCurrentPage,
|
|
65
|
+
ms as useCutBlockIds,
|
|
66
|
+
us as useDarkMode,
|
|
67
|
+
ds as useDuplicateBlocks,
|
|
68
|
+
cs as useGetPageData,
|
|
69
|
+
Bs as useHiddenBlockIds,
|
|
70
|
+
ks as useHighlightBlockId,
|
|
71
|
+
ns as usePasteBlocks,
|
|
72
|
+
Cs as usePreviewMode,
|
|
73
|
+
Ss as useReadOnlyMode,
|
|
74
|
+
gs as useRemoveBlocks,
|
|
74
75
|
Ps as useRemoveClassesFromBlocks,
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
vs as useSavePage,
|
|
77
|
+
ys as useSelectedBlock,
|
|
78
|
+
hs as useSelectedBlockAllClasses,
|
|
78
79
|
As as useSelectedBlockCurrentClasses,
|
|
79
80
|
Is as useSelectedBlockIds,
|
|
80
|
-
|
|
81
|
+
Ds as useSelectedBlocksDisplayChild,
|
|
81
82
|
Ms as useSelectedBreakpoints,
|
|
82
83
|
Rs as useSelectedStylingBlocks,
|
|
83
|
-
|
|
84
|
+
fs as useStylingBreakpoint,
|
|
84
85
|
Us as useStylingState,
|
|
85
|
-
|
|
86
|
-
|
|
86
|
+
Hs as useTranslation,
|
|
87
|
+
bs as useUILibraryBlocks,
|
|
87
88
|
xs as useUndoManager,
|
|
88
|
-
|
|
89
|
-
|
|
89
|
+
Ts as useUpdateBlocksProps,
|
|
90
|
+
qs as useUpdateBlocksPropsRealtime
|
|
90
91
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),r=require("./index-0FIxW0gR.cjs"),l=require("./index-7zSzDmAA.cjs"),q=require("@radix-ui/react-icons");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("react");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-D_vtk3zK.cjs");require("lodash-es");require("./MODIFIERS-mVmfEGgo.cjs");require("clsx");require("tailwind-merge");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("react-icons-picker");require("react-dom");require("react-quill");require("./Functions-N3yhPYKY.cjs");require("@chaibuilder/runtime");require("jotai");require("@react-hookz/web");require("tree-model");require("react-i18next");require("./index-5IJnVFyU.cjs");require("i18next");require("@floating-ui/react-dom");require("flagged");require("react-hotkeys-hook");require("lucide-react");require("./index--mLLy7QQ.cjs");require("sonner");require("./html-to-json-ndxaXRT8.cjs");require("himalaya");require("lodash");const d=({pageData:i,projectData:t})=>{const n={},u=l.useDeletePage(),s=i.uuid===t.homepage,o=()=>{u.mutate(i,{onSuccess:()=>{n({uuid:t.homepage,slug:"/home"})}})};return e.jsxRuntimeExports.jsxs(r.AlertDialog,{children:[e.jsxRuntimeExports.jsx(r.AlertDialogTrigger,{disabled:s,children:e.jsxRuntimeExports.jsx("div",{className:`flex h-full items-center justify-center rounded-md border px-2 py-2 font-medium hover:bg-red-400 hover:text-white ${s?"cursor-not-allowed border-red-200 text-red-200":"cursor-pointer border-red-400 text-red-400"}`,children:e.jsxRuntimeExports.jsx(q.TrashIcon,{})})}),e.jsxRuntimeExports.jsxs(r.AlertDialogContent,{children:[e.jsxRuntimeExports.jsxs(r.AlertDialogTitle,{children:["Are you sure you want to delete ",e.jsxRuntimeExports.jsx("i",{className:"text-red-500",children:i.name})," page?"]}),e.jsxRuntimeExports.jsx(r.AlertDialogDescription,{children:"This action cannot be undone. This will permanently delete your page."}),e.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-end gap-x-3",children:[e.jsxRuntimeExports.jsx(r.AlertDialogCancel,{disabled:u.isPending,children:"Cancel"}),e.jsxRuntimeExports.jsx(r.Button,{variant:"destructive",onClick:o,disabled:u.isPending,children:"Yes, Delete"})]})]})]})};exports.default=d;
|
|
@@ -1,33 +1,23 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
|
-
import { A as p, a as l, b as n, d, e as a, g as c, B as u } from "./
|
|
3
|
-
import { h } from "./index-
|
|
2
|
+
import { A as p, a as l, b as n, d, e as a, g as c, B as u } from "./index-uLn8W3eR.js";
|
|
3
|
+
import { h } from "./index-b4Wjumon.js";
|
|
4
4
|
import { TrashIcon as x } from "@radix-ui/react-icons";
|
|
5
5
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
6
6
|
import "react";
|
|
7
|
-
import "
|
|
8
|
-
import "
|
|
9
|
-
import "
|
|
10
|
-
import "@floating-ui/react-dom";
|
|
11
|
-
import "jotai";
|
|
12
|
-
import "i18next";
|
|
13
|
-
import "react-i18next";
|
|
14
|
-
import "flagged";
|
|
7
|
+
import "@radix-ui/react-toggle";
|
|
8
|
+
import "class-variance-authority";
|
|
9
|
+
import "./utils-VpVqnC9m.js";
|
|
15
10
|
import "lodash-es";
|
|
16
11
|
import "./MODIFIERS-fd5XOmum.js";
|
|
17
|
-
import "
|
|
12
|
+
import "clsx";
|
|
18
13
|
import "tailwind-merge";
|
|
19
|
-
import "@chaibuilder/runtime";
|
|
20
|
-
import "@react-hookz/web";
|
|
21
|
-
import "tree-model";
|
|
22
|
-
import "./utils-VpVqnC9m.js";
|
|
23
|
-
import "@radix-ui/react-toggle";
|
|
24
|
-
import "class-variance-authority";
|
|
25
14
|
import "@radix-ui/react-switch";
|
|
26
15
|
import "@radix-ui/react-slot";
|
|
27
16
|
import "@radix-ui/react-accordion";
|
|
28
17
|
import "@radix-ui/react-alert-dialog";
|
|
29
18
|
import "@radix-ui/react-dialog";
|
|
30
19
|
import "@radix-ui/react-label";
|
|
20
|
+
import "@radix-ui/react-scroll-area";
|
|
31
21
|
import "@radix-ui/react-tabs";
|
|
32
22
|
import "@radix-ui/react-tooltip";
|
|
33
23
|
import "@radix-ui/react-popover";
|
|
@@ -40,15 +30,26 @@ import "@radix-ui/react-toast";
|
|
|
40
30
|
import "cmdk";
|
|
41
31
|
import "@radix-ui/react-context-menu";
|
|
42
32
|
import "react-icons-picker";
|
|
33
|
+
import "react-dom";
|
|
43
34
|
import "react-quill";
|
|
35
|
+
import "./Functions-7jnEwJyw.js";
|
|
36
|
+
import "@chaibuilder/runtime";
|
|
37
|
+
import "jotai";
|
|
38
|
+
import "@react-hookz/web";
|
|
39
|
+
import "tree-model";
|
|
40
|
+
import "react-i18next";
|
|
41
|
+
import "./index-grcmKbfu.js";
|
|
42
|
+
import "i18next";
|
|
43
|
+
import "@floating-ui/react-dom";
|
|
44
|
+
import "flagged";
|
|
44
45
|
import "react-hotkeys-hook";
|
|
45
46
|
import "lucide-react";
|
|
46
47
|
import "./index-VBXQixVm.js";
|
|
47
|
-
import "./core.js";
|
|
48
48
|
import "sonner";
|
|
49
|
-
import "./html-to-json-
|
|
49
|
+
import "./html-to-json-_01DXd-a.js";
|
|
50
50
|
import "himalaya";
|
|
51
|
-
|
|
51
|
+
import "lodash";
|
|
52
|
+
const ue = ({ pageData: r, projectData: i }) => {
|
|
52
53
|
const m = {}, t = h(), o = r.uuid === i.homepage, s = () => {
|
|
53
54
|
t.mutate(r, {
|
|
54
55
|
onSuccess: () => {
|
|
@@ -79,5 +80,5 @@ const ce = ({ pageData: r, projectData: i }) => {
|
|
|
79
80
|
] });
|
|
80
81
|
};
|
|
81
82
|
export {
|
|
82
|
-
|
|
83
|
+
ue as default
|
|
83
84
|
};
|
package/dist/email.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs")
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),q=require("./index-5IJnVFyU.cjs"),r=require("@radix-ui/react-icons"),o=require("lodash-es");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("react");require("i18next");require("react-i18next");require("./index-0FIxW0gR.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-D_vtk3zK.cjs");require("./MODIFIERS-mVmfEGgo.cjs");require("clsx");require("tailwind-merge");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("react-icons-picker");require("react-dom");require("react-quill");require("./Functions-N3yhPYKY.cjs");require("@chaibuilder/runtime");require("jotai");require("@react-hookz/web");require("tree-model");require("@floating-ui/react-dom");require("flagged");require("react-hotkeys-hook");require("lucide-react");require("./index--mLLy7QQ.cjs");const n=[{title:"Mobile",content:"Mobile email client",breakpoint:"xs",icon:e.jsxRuntimeExports.jsx(r.MobileIcon,{}),width:400},{title:"Email Client",content:"Content as seen inside an email client",breakpoint:"sm",icon:e.jsxRuntimeExports.jsx(r.MobileIcon,{className:"rotate-90"}),width:700}],s=i=>{const u={...i,filterChaiBlock:t=>o.includes(t.type,"Email/"),importHTMLSupport:!1,dataBindingSupport:!1,breakpoints:n};return e.jsxRuntimeExports.jsx(q.ChaiBuilderEditor,{...u})};exports.ChaiBuilderEmail=s;
|
package/dist/email.js
CHANGED
|
@@ -1,33 +1,25 @@
|
|
|
1
1
|
import { j as i } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
|
-
import "./
|
|
2
|
+
import { C as p } from "./index-grcmKbfu.js";
|
|
3
3
|
import { MobileIcon as t } from "@radix-ui/react-icons";
|
|
4
|
-
import { includes as
|
|
5
|
-
import { C as e } from "./ChaiBuilderEditor-tkzS851D.js";
|
|
4
|
+
import { includes as e } from "lodash-es";
|
|
6
5
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
7
6
|
import "react";
|
|
8
|
-
import "react-i18next";
|
|
9
|
-
import "clsx";
|
|
10
|
-
import "react-dom";
|
|
11
|
-
import "@radix-ui/react-scroll-area";
|
|
12
|
-
import "@floating-ui/react-dom";
|
|
13
|
-
import "jotai";
|
|
14
7
|
import "i18next";
|
|
15
|
-
import "
|
|
16
|
-
import "./
|
|
17
|
-
import "./Functions-7jnEwJyw.js";
|
|
18
|
-
import "tailwind-merge";
|
|
19
|
-
import "@chaibuilder/runtime";
|
|
20
|
-
import "@react-hookz/web";
|
|
21
|
-
import "tree-model";
|
|
22
|
-
import "./utils-VpVqnC9m.js";
|
|
8
|
+
import "react-i18next";
|
|
9
|
+
import "./index-uLn8W3eR.js";
|
|
23
10
|
import "@radix-ui/react-toggle";
|
|
24
11
|
import "class-variance-authority";
|
|
12
|
+
import "./utils-VpVqnC9m.js";
|
|
13
|
+
import "./MODIFIERS-fd5XOmum.js";
|
|
14
|
+
import "clsx";
|
|
15
|
+
import "tailwind-merge";
|
|
25
16
|
import "@radix-ui/react-switch";
|
|
26
17
|
import "@radix-ui/react-slot";
|
|
27
18
|
import "@radix-ui/react-accordion";
|
|
28
19
|
import "@radix-ui/react-alert-dialog";
|
|
29
20
|
import "@radix-ui/react-dialog";
|
|
30
21
|
import "@radix-ui/react-label";
|
|
22
|
+
import "@radix-ui/react-scroll-area";
|
|
31
23
|
import "@radix-ui/react-tabs";
|
|
32
24
|
import "@radix-ui/react-tooltip";
|
|
33
25
|
import "@radix-ui/react-popover";
|
|
@@ -40,7 +32,15 @@ import "@radix-ui/react-toast";
|
|
|
40
32
|
import "cmdk";
|
|
41
33
|
import "@radix-ui/react-context-menu";
|
|
42
34
|
import "react-icons-picker";
|
|
35
|
+
import "react-dom";
|
|
43
36
|
import "react-quill";
|
|
37
|
+
import "./Functions-7jnEwJyw.js";
|
|
38
|
+
import "@chaibuilder/runtime";
|
|
39
|
+
import "jotai";
|
|
40
|
+
import "@react-hookz/web";
|
|
41
|
+
import "tree-model";
|
|
42
|
+
import "@floating-ui/react-dom";
|
|
43
|
+
import "flagged";
|
|
44
44
|
import "react-hotkeys-hook";
|
|
45
45
|
import "lucide-react";
|
|
46
46
|
import "./index-VBXQixVm.js";
|
|
@@ -62,12 +62,12 @@ const n = [
|
|
|
62
62
|
], ii = (o) => {
|
|
63
63
|
const r = {
|
|
64
64
|
...o,
|
|
65
|
-
filterChaiBlock: (m) =>
|
|
65
|
+
filterChaiBlock: (m) => e(m.type, "Email/"),
|
|
66
66
|
importHTMLSupport: !1,
|
|
67
67
|
dataBindingSupport: !1,
|
|
68
68
|
breakpoints: n
|
|
69
69
|
};
|
|
70
|
-
return /* @__PURE__ */ i.jsx(
|
|
70
|
+
return /* @__PURE__ */ i.jsx(p, { ...r });
|
|
71
71
|
};
|
|
72
72
|
export {
|
|
73
73
|
ii as ChaiBuilderEmail
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const f=require("./jsx-runtime-Z_BpKhVy.cjs"),y=require("@rjsf/core"),E=require("@rjsf/validator-ajv8"),i=require("lodash-es"),d=require("./index-0FIxW0gR.cjs"),h=(c,n="")=>{switch(c.type){case"singular":return c.uiSchema;case"model":const{properties:p}=c,u={};return Object.keys(p).forEach(r=>{const e=p[r];if(i.includes(["slot","styles"],e.type))return;const o=i.get(e,"i18n",!1)?`${r}-${n}`:r;u[o]=h(e,n)}),u;case"list":const{itemProperties:m}=c,l={items:{}};return Object.keys(m).forEach(r=>{const e=m[r];if(i.includes(["slot","styles"],e.type))return;const o=i.get(e,"i18n",!1)?`${r}-${n}`:r;l.items[o]=h(e,n)}),l;default:return{}}},x=(c,n="")=>{switch(c.type){case"singular":return c.schema;case"model":const{properties:p,title:u}=c,m={title:u,type:"object",properties:{}};return Object.keys(p).forEach(o=>{const t=p[o];if(i.includes(["slot","styles"],t.type))return;const s=i.get(t,"i18n",!1)?`${o}-${n}`:o;m.properties[s]=x(t,n)}),m;case"list":const{itemProperties:l,title:r}=c,e={title:r,type:"array",items:{type:"object",properties:{}}};return Object.keys(l).forEach(o=>{const t=l[o];if(i.includes(["slot","styles"],t.type))return;const s=i.get(t,"i18n",!1)?`${o}-${n}`:o;e.items.properties[s]=x(t,n),i.set(e.items,"title",i.get(t,"itemTitle",`${r} item`))}),e;default:return{}}},$=({title:c,properties:n={},formData:p,onChange:u,disabled:m=!1,activeLang:l=""})=>{const r={type:"object",properties:{}},e={};Object.keys(n).forEach(t=>{const s=n[t];if(i.includes(["slot","styles"],s.type))return;const a=i.get(s,"i18n",!1)?`${t}-${l}`:t;r.properties[a]=x(s,l),e[a]=h(s,l)});const o=({...t},s)=>{const a=s==null?void 0:s.replace("root.","").split("/").pop();if(!s||!a)return;const j=i.first(a.split("."));s&&j&&u({...t},j)};return f.jsxRuntimeExports.jsxs(f.jsxRuntimeExports.Fragment,{children:[c&&f.jsxRuntimeExports.jsx("h1",{className:"px-1 text-sm font-semibold underline",children:c}),f.jsxRuntimeExports.jsx("div",{className:"-mx-3",children:f.jsxRuntimeExports.jsx(y,{widgets:{richtext:d.RichTextEditorField,icon:d.IconPickerField,image:d.ImagePickerField},fields:{link:d.LinkField},idSeparator:".",autoComplete:"off",omitExtraData:!0,liveOmit:!0,liveValidate:!0,uiSchema:e,schema:r,formData:p,validator:E,onChange:o,disabled:m})})]})};exports.Form=$;
|
|
@@ -2,7 +2,7 @@ import { j as u } from "./jsx-runtime-WbnYoNE9.js";
|
|
|
2
2
|
import b from "@rjsf/core";
|
|
3
3
|
import x from "@rjsf/validator-ajv8";
|
|
4
4
|
import { includes as h, get as a, set as $, first as F } from "lodash-es";
|
|
5
|
-
import {
|
|
5
|
+
import { bk as P, bl as E, bm as O, bn as S } from "./index-uLn8W3eR.js";
|
|
6
6
|
const d = (i, l = "") => {
|
|
7
7
|
switch (i.type) {
|
|
8
8
|
case "singular":
|
|
@@ -66,7 +66,7 @@ const d = (i, l = "") => {
|
|
|
66
66
|
default:
|
|
67
67
|
return {};
|
|
68
68
|
}
|
|
69
|
-
},
|
|
69
|
+
}, w = ({
|
|
70
70
|
title: i,
|
|
71
71
|
properties: l = {},
|
|
72
72
|
formData: c,
|
|
@@ -121,5 +121,5 @@ const d = (i, l = "") => {
|
|
|
121
121
|
] });
|
|
122
122
|
};
|
|
123
123
|
export {
|
|
124
|
-
|
|
124
|
+
w as F
|
|
125
125
|
};
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { stringify as
|
|
2
|
-
import { g as
|
|
3
|
-
import { isEmpty as
|
|
1
|
+
import { stringify as y, parse as N } from "himalaya";
|
|
2
|
+
import { g as L, c as k } from "./Functions-7jnEwJyw.js";
|
|
3
|
+
import { isEmpty as m, includes as g, get as n, forEach as S, find as u, set as o, capitalize as $, flatMapDeep as A, filter as B, flatten as C } from "lodash-es";
|
|
4
4
|
import { a as p } from "./MODIFIERS-fd5XOmum.js";
|
|
5
|
-
|
|
5
|
+
import { has as R, startsWith as E } from "lodash";
|
|
6
|
+
const M = (t) => {
|
|
6
7
|
const e = /(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[?&]v=)|youtu\.be\/)([a-zA-Z0-9_-]{11})/, a = /(?:https?:\/\/)?(?:www\.)?(player)?.vimeo\.com/;
|
|
7
8
|
return e.test(t) || a.test(t);
|
|
8
|
-
},
|
|
9
|
-
if (
|
|
9
|
+
}, H = (t) => {
|
|
10
|
+
if (m(t))
|
|
10
11
|
return t;
|
|
11
|
-
const e = /<video[^>]+src=['"]([^'">]+)['"]/, a = /<iframe[^>]+src=['"]([^'">]+)['"]/, r = t.match(e),
|
|
12
|
-
return
|
|
13
|
-
}, b = "$name",
|
|
12
|
+
const e = /<video[^>]+src=['"]([^'">]+)['"]/, a = /<iframe[^>]+src=['"]([^'">]+)['"]/, r = t.match(e), c = t.match(a), i = r ? r[1] : c ? c[1] : null, s = /(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[?&]v=)|youtu\.be\/)([a-zA-Z0-9_-]{11})/, l = /(?:https?:\/\/)?(?:www\.)?player.vimeo\.com/;
|
|
13
|
+
return i && (s.test(i) || l.test(i)) ? i : t;
|
|
14
|
+
}, b = "$name", I = {
|
|
14
15
|
img: { alt: "alt", width: "width", height: "height", src: "image" },
|
|
15
16
|
video: {
|
|
16
17
|
src: "url",
|
|
@@ -43,22 +44,22 @@ const R = (t) => {
|
|
|
43
44
|
multiple: "multiple",
|
|
44
45
|
name: "fieldName"
|
|
45
46
|
}
|
|
46
|
-
},
|
|
47
|
+
}, q = (t, e) => t.children.length === 1 && g(["Heading", "Paragraph", "Span", "ListItem", "Button", "Label", "TableCell", "Link"], e._type), _ = (t) => t.map((e) => e.type === "text" ? n(e, "content", "") : m(e.children) ? "" : _(e.children)).join(""), h = (t) => t === null ? "" : t, f = (t) => {
|
|
47
48
|
if (t.tagName === "svg")
|
|
48
49
|
return {};
|
|
49
|
-
const e = {}, a =
|
|
50
|
-
return S(r, ({ key:
|
|
51
|
-
if (
|
|
52
|
-
if (a[
|
|
53
|
-
if (t.tagName === "img" &&
|
|
50
|
+
const e = {}, a = I[t.tagName] || {}, r = t.attributes;
|
|
51
|
+
return S(r, ({ key: c, value: i }) => {
|
|
52
|
+
if (c !== b)
|
|
53
|
+
if (a[c]) {
|
|
54
|
+
if (t.tagName === "img" && c === "src" && !i.startsWith("http")) {
|
|
54
55
|
const s = u(t.attributes, { key: "width" }), l = u(t.attributes, { key: "height" });
|
|
55
|
-
s && l ?
|
|
56
|
+
s && l ? i = `https://via.placeholder.com/${s == null ? void 0 : s.value}x${l == null ? void 0 : l.value}` : i = "https://via.placeholder.com/150x150";
|
|
56
57
|
}
|
|
57
|
-
o(e, a[
|
|
58
|
+
o(e, a[c], h(i));
|
|
58
59
|
} else
|
|
59
|
-
|
|
60
|
+
g(["style", "class", "srcset"], c) || (R(e, "styles_attrs") || (e.styles_attrs = {}), E(c, "@") && (c = c.replace("@", "x-on:")), e.styles_attrs[`${c}`] = h(i));
|
|
60
61
|
}), delete e.class, e;
|
|
61
|
-
},
|
|
62
|
+
}, P = (t, e = "styles") => {
|
|
62
63
|
if (!t.attributes)
|
|
63
64
|
return { [e]: `${p},` };
|
|
64
65
|
const a = u(t.attributes, { key: "class" });
|
|
@@ -67,7 +68,7 @@ const R = (t) => {
|
|
|
67
68
|
return { [e]: `${p},${r}` };
|
|
68
69
|
}
|
|
69
70
|
return { [e]: `${p},` };
|
|
70
|
-
},
|
|
71
|
+
}, U = (t) => {
|
|
71
72
|
switch (t.tagName) {
|
|
72
73
|
case "img":
|
|
73
74
|
return { _type: "Image" };
|
|
@@ -148,17 +149,17 @@ const R = (t) => {
|
|
|
148
149
|
};
|
|
149
150
|
}
|
|
150
151
|
}, d = (t, e = null) => A(t, (a) => {
|
|
151
|
-
var
|
|
152
|
+
var i;
|
|
152
153
|
if (a.type === "comment")
|
|
153
154
|
return [];
|
|
154
|
-
let r = { _id:
|
|
155
|
+
let r = { _id: L() };
|
|
155
156
|
if (e && (r._parent = e.block._id), a.type === "text")
|
|
156
|
-
return
|
|
157
|
+
return m(n(a, "content", "")) ? [] : e && q(e.node, e.block) ? (o(e, "block.content", n(a, "content", "")), []) : { ...r, _type: "Text", content: n(a, "content", "") };
|
|
157
158
|
if (r = {
|
|
158
159
|
...r,
|
|
159
|
-
...
|
|
160
|
+
...U(a),
|
|
160
161
|
...f(a),
|
|
161
|
-
...
|
|
162
|
+
...P(a)
|
|
162
163
|
}, a.attributes) {
|
|
163
164
|
const s = a.attributes.find((l) => l.key === b);
|
|
164
165
|
s && (r._name = s.value);
|
|
@@ -167,25 +168,25 @@ const R = (t) => {
|
|
|
167
168
|
const s = r.inputType || "text";
|
|
168
169
|
s === "checkbox" ? o(r, "_type", "Checkbox") : s === "radio" && o(r, "_type", "Radio");
|
|
169
170
|
} else if (a.tagName === "video" || a.tagName === "iframe") {
|
|
170
|
-
const s =
|
|
171
|
-
return
|
|
171
|
+
const s = y([a]);
|
|
172
|
+
return M(s) && (o(r, "_type", "Video"), o(r, "url", H(s)), o(r, "styles", `${p},absolute top-0 left-0 w-full h-full`), o(r, "controls", { autoPlay: !1, muted: !0, loop: !1, controls: !1 })), r.content = s, [r];
|
|
172
173
|
} else if (a.tagName === "svg") {
|
|
173
174
|
const s = u(a.attributes, { key: "height" }), l = u(a.attributes, { key: "width" }), v = n(s, "value") ? `[${n(s, "value")}px]` : "24px", T = n(l, "value") ? `[${n(l, "value")}px]` : "24px", x = n(u(a.attributes, { key: "class" }), "value", "w-full h-full");
|
|
174
|
-
return r.styles = `${p}, ${
|
|
175
|
-
} else if (a.tagName == "option" && e && ((
|
|
175
|
+
return r.styles = `${p}, ${k(`w-${T} h-${v}`, x)}`.trim(), a.attributes = B(a.attributes, (w) => !g(["style", "width", "height", "class"], w.key)), r.icon = y([a]), [r];
|
|
176
|
+
} else if (a.tagName == "option" && e && ((i = e.block) == null ? void 0 : i._type) === "Select")
|
|
176
177
|
return e.block.options.push({
|
|
177
178
|
label: _(a.children),
|
|
178
179
|
...f(a)
|
|
179
180
|
}), [];
|
|
180
|
-
const
|
|
181
|
-
return [r, ...
|
|
182
|
-
}),
|
|
181
|
+
const c = d(a.children, { block: r, node: a });
|
|
182
|
+
return [r, ...c];
|
|
183
|
+
}), z = (t) => {
|
|
183
184
|
const e = t.match(/<body[^>]*>[\s\S]*?<\/body>/);
|
|
184
185
|
return (e && e.length > 0 ? e[0].replace(/<body/, "<div").replace(/<\/body>/, "</div>") : t).replace(/\s+/g, " ").replaceAll("> <", "><").replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, "").trim();
|
|
185
|
-
},
|
|
186
|
-
const e = N(
|
|
187
|
-
return
|
|
186
|
+
}, Z = (t) => {
|
|
187
|
+
const e = N(z(t));
|
|
188
|
+
return m(t) ? [] : C(d(e));
|
|
188
189
|
};
|
|
189
190
|
export {
|
|
190
|
-
|
|
191
|
+
Z as g
|
|
191
192
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const u=require("himalaya"),p=require("./Functions-N3yhPYKY.cjs"),r=require("lodash-es"),o=require("./MODIFIERS-mVmfEGgo.cjs"),g=require("lodash"),x=t=>{const e=/(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[?&]v=)|youtu\.be\/)([a-zA-Z0-9_-]{11})/,s=/(?:https?:\/\/)?(?:www\.)?(player)?.vimeo\.com/;return e.test(t)||s.test(t)},w=t=>{if(r.isEmpty(t))return t;const e=/<video[^>]+src=['"]([^'">]+)['"]/,s=/<iframe[^>]+src=['"]([^'">]+)['"]/,a=t.match(e),c=t.match(s),l=a?a[1]:c?c[1]:null,i=/(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[?&]v=)|youtu\.be\/)([a-zA-Z0-9_-]{11})/,n=/(?:https?:\/\/)?(?:www\.)?player.vimeo\.com/;return l&&(i.test(l)||n.test(l))?l:t},h="$name",S={img:{alt:"alt",width:"width",height:"height",src:"image"},video:{src:"url",autoplay:"controls.autoPlay",muted:"controls.muted",loop:"controls.loop",controls:"controls.widgets"},a:{href:"link.href",target:"link.target",type:""},input:{placeholder:"placeholder",required:"required",type:"inputType",name:"fieldName"},textarea:{placeholder:"placeholder",required:"required",type:"inputType",name:"fieldName"},select:{placeholder:"placeholder",required:"required",multiple:"multiple",name:"fieldName"}},E=(t,e)=>t.children.length===1&&r.includes(["Heading","Paragraph","Span","ListItem","Button","Label","TableCell","Link"],e._type),f=t=>t.map(e=>e.type==="text"?r.get(e,"content",""):r.isEmpty(e.children)?"":f(e.children)).join(""),y=t=>t===null?"":t,m=t=>{if(t.tagName==="svg")return{};const e={},s=S[t.tagName]||{},a=t.attributes;return r.forEach(a,({key:c,value:l})=>{if(c!==h)if(s[c]){if(t.tagName==="img"&&c==="src"&&!l.startsWith("http")){const i=r.find(t.attributes,{key:"width"}),n=r.find(t.attributes,{key:"height"});i&&n?l=`https://via.placeholder.com/${i==null?void 0:i.value}x${n==null?void 0:n.value}`:l="https://via.placeholder.com/150x150"}r.set(e,s[c],y(l))}else r.includes(["style","class","srcset"],c)||(g.has(e,"styles_attrs")||(e.styles_attrs={}),g.startsWith(c,"@")&&(c=c.replace("@","x-on:")),e.styles_attrs[`${c}`]=y(l))}),delete e.class,e},N=(t,e="styles")=>{if(!t.attributes)return{[e]:`${o.STYLES_KEY},`};const s=r.find(t.attributes,{key:"class"});if(s){const a=s.value;return{[e]:`${o.STYLES_KEY},${a}`}}return{[e]:`${o.STYLES_KEY},`}},L=t=>{switch(t.tagName){case"img":return{_type:"Image"};case"input":return{_type:"Input",showLabel:!1};case"hr":return{_type:"Divider"};case"br":return{_type:"LineBreak"};case"textarea":return{_type:"TextArea",showLabel:!1};case"audio":return{_type:"Audio"};case"canvas":return{_type:"Canvas"};case"video":case"iframe":return{_type:"CustomHTML"};case"svg":return{_type:"Icon"};case"select":return{_type:"Select",options:[]};case"option":return{_type:"Option"};case"ul":case"ol":case"dl":return{_type:"List",tag:t.tagName,_listType:t.tagName==="ol"?"list-decimal":"list-none"};case"li":case"dt":return{_type:"ListItem",tag:t.tagName};case"span":case"figcaption":case"legend":return{_type:"Span",tag:t.tagName};case"p":return{_type:"Paragraph",content:""};case"a":return{_type:"Link"};case"form":return{_type:"Form"};case"label":return{_type:"Label"};case"button":return{_type:"Button"};case"code":return{_type:"Code"};case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return{_type:"Heading",tag:t.tagName};case"table":return{_type:"Table"};case"tr":return{_type:"TableRow"};case"td":case"th":return{_type:"TableCell",tag:t.tagName};case"thead":return{_type:"TableHead"};case"tbody":return{_type:"TableBody"};case"tfoot":return{_type:"TableFooter"};default:const e=r.get(t,"children",[]).length>0?"Box":"EmptyBox";return{_type:e,tag:t.tagName,_name:e=="EmptyBox"||t.tagName==="div"?e:r.capitalize(t.tagName)}}},b=(t,e=null)=>r.flatMapDeep(t,s=>{var l;if(s.type==="comment")return[];let a={_id:p.generateUUID()};if(e&&(a._parent=e.block._id),s.type==="text")return r.isEmpty(r.get(s,"content",""))?[]:e&&E(e.node,e.block)?(r.set(e,"block.content",r.get(s,"content","")),[]):{...a,_type:"Text",content:r.get(s,"content","")};if(a={...a,...L(s),...m(s),...N(s)},s.attributes){const i=s.attributes.find(n=>n.key===h);i&&(a._name=i.value)}if(a._type==="Input"){const i=a.inputType||"text";i==="checkbox"?r.set(a,"_type","Checkbox"):i==="radio"&&r.set(a,"_type","Radio")}else if(s.tagName==="video"||s.tagName==="iframe"){const i=u.stringify([s]);return x(i)&&(r.set(a,"_type","Video"),r.set(a,"url",w(i)),r.set(a,"styles",`${o.STYLES_KEY},absolute top-0 left-0 w-full h-full`),r.set(a,"controls",{autoPlay:!1,muted:!0,loop:!1,controls:!1})),a.content=i,[a]}else if(s.tagName==="svg"){const i=r.find(s.attributes,{key:"height"}),n=r.find(s.attributes,{key:"width"}),d=r.get(i,"value")?`[${r.get(i,"value")}px]`:"24px",_=r.get(n,"value")?`[${r.get(n,"value")}px]`:"24px",T=r.get(r.find(s.attributes,{key:"class"}),"value","w-full h-full");return a.styles=`${o.STYLES_KEY}, ${p.cn(`w-${_} h-${d}`,T)}`.trim(),s.attributes=r.filter(s.attributes,v=>!r.includes(["style","width","height","class"],v.key)),a.icon=u.stringify([s]),[a]}else if(s.tagName=="option"&&e&&((l=e.block)==null?void 0:l._type)==="Select")return e.block.options.push({label:f(s.children),...m(s)}),[];const c=b(s.children,{block:a,node:s});return[a,...c]}),k=t=>{const e=t.match(/<body[^>]*>[\s\S]*?<\/body>/);return(e&&e.length>0?e[0].replace(/<body/,"<div").replace(/<\/body>/,"</div>"):t).replace(/\s+/g," ").replaceAll("> <","><").replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"").trim()},$=t=>{const e=u.parse(k(t));return r.isEmpty(t)?[]:r.flatten(b(e))};exports.getBlocksFromHTML=$;
|