@chaibuilder/sdk 1.0.9 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +28 -0
- package/README.md +123 -21
- package/dist/AddBlocks-tdvDe7xL.cjs +3 -0
- package/dist/{AddBlocks-d10b7b87.js → AddBlocks-xR2s2BVa.js} +47 -44
- package/dist/BrandingOptions-DpJ-oNnf.cjs +1 -0
- package/dist/{BrandingOptions-f4ab5d9f.js → BrandingOptions-cHK2bVZy.js} +14 -18
- package/dist/{CanvasArea-10356200.js → CanvasArea-2zqT1lSE.js} +492 -503
- package/dist/CanvasArea-Br8bBSeT.cjs +46 -0
- package/dist/ChaiBuilderEditor-SacH75l4.cjs +163 -0
- package/dist/{index-aa42febc.js → ChaiBuilderEditor-h9bXC4l-.js} +11215 -15404
- package/dist/Class-_uCzl5v1.cjs +1 -0
- package/dist/{html-to-json-45e0e3b5.js → Class-l7qYbuoN.js} +185 -366
- package/dist/{CurrentPage-35e14043.js → CurrentPage-4lTETR2f.js} +26 -23
- package/dist/CurrentPage-nlUWJiUA.cjs +1 -0
- package/dist/{ImagesPanel-8b7a989d.cjs → ImagesPanel-6us7hiLN.cjs} +1 -1
- package/dist/{ImagesPanel-47ac13c3.js → ImagesPanel-oaHOD-Ex.js} +4 -4
- package/dist/Layers-Vw4XE6YB.cjs +1 -0
- package/dist/{Layers-c3dd4fc8.js → Layers-wOfijZnb.js} +42 -41
- package/dist/MarkAsGlobalBlock-1J_YyL1L.cjs +1 -0
- package/dist/{MarkAsGlobalBlock-505ae793.js → MarkAsGlobalBlock-xRyn29gC.js} +17 -20
- package/dist/{PagesPanel-bafc506f.js → PagesPanel-82gCVzHS.js} +16 -13
- package/dist/PagesPanel-ZKRdK-mI.cjs +1 -0
- package/dist/ProjectPanel-kYg4KkJu.cjs +1 -0
- package/dist/{ProjectPanel-6113f394.js → ProjectPanel-vz5WOyqZ.js} +22 -19
- package/dist/Settings-1E3Y_5r6.cjs +1 -0
- package/dist/{Settings-1c41c514.js → Settings-IuAF359L.js} +297 -296
- package/dist/SidePanels-WL1UioF2.cjs +1 -0
- package/dist/{SidePanels-c13f87dc.js → SidePanels-xssTWt4M.js} +34 -42
- package/dist/Topbar-3ozdWfSy.cjs +1 -0
- package/dist/{Topbar-b38d5d50.js → Topbar-H0f0EL6-.js} +33 -35
- package/dist/UnsplashImages-BoBBSi1a.cjs +1 -0
- package/dist/{UnsplashImages-4edb97e7.js → UnsplashImages-gPcBLjgB.js} +13 -14
- package/dist/UploadImages-T6kW0s3G.cjs +1 -0
- package/dist/{UploadImages-52181c3e.js → UploadImages-_ZyUU66E.js} +11 -12
- package/dist/{accordion-c0176dc5.js → accordion-oPUeqPCZ.js} +2 -2
- package/dist/{accordion-0afd8143.cjs → accordion-ynvFtV_p.cjs} +1 -1
- package/dist/{add-page-modal-08a19915.js → add-page-modal-J1E7rh1U.js} +25 -22
- package/dist/add-page-modal-eiiUZCJX.cjs +1 -0
- package/dist/alert-dialog-GNfnpqFB.js +64 -0
- package/dist/alert-dialog-Mv0-wAvS.cjs +1 -0
- package/dist/{command-b1103666.cjs → command-ThdTuUxt.cjs} +1 -1
- package/dist/{command-6f260f61.js → command-VHca6CcN.js} +3 -3
- package/dist/confirm-alert-8EHe0OOd.cjs +1 -0
- package/dist/confirm-alert-b0e_BLhF.js +36 -0
- package/dist/{context-menu-e1c240ce.js → context-menu-8dC9uGXj.js} +2 -2
- package/dist/{context-menu-fec580f2.cjs → context-menu-IgLbIuth.cjs} +1 -1
- package/dist/controls-Ni5kEzLz.js +103 -0
- package/dist/controls-xUKa23ic.cjs +1 -0
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +1 -10
- package/dist/core.js +116 -69
- package/dist/delete-page-modal-TGTmRjyn.cjs +1 -0
- package/dist/{delete-page-modal-9b37665b.js → delete-page-modal-ysj4O0bM.js} +25 -22
- package/dist/{dialog-170eaad9.cjs → dialog-S_QbL1iq.cjs} +1 -1
- package/dist/{dialog-18207bef.js → dialog-jrw9DF1f.js} +2 -2
- package/dist/{dropdown-menu-ae3ed09b.js → dropdown-menu-S03K_fNs.js} +2 -2
- package/dist/{dropdown-menu-84b2439e.cjs → dropdown-menu-sMXR59cB.cjs} +1 -1
- package/dist/{form-25e1af37.js → form-dVpOAyRl.js} +2 -2
- package/dist/{form-ea21db6c.cjs → form-nRAvKPQj.cjs} +1 -1
- package/dist/{functions-83b1de8d.js → functions-nNTuSTsR.js} +1 -1
- package/dist/functions-pcUZhFJM.js +12 -0
- package/dist/{functions-f84d5e2a.cjs → functions-sCuB7nvZ.cjs} +1 -1
- package/dist/functions-uw7QP2kT.cjs +1 -0
- package/dist/html-to-json-P6GpbcQX.cjs +1 -0
- package/dist/html-to-json-pdHQfRkN.js +178 -0
- package/dist/index-8L3zCc6V.cjs +1 -0
- package/dist/index-cZ4uo6aT.js +2256 -0
- package/dist/{label-e770a087.js → label-KaP7MRrs.js} +2 -2
- package/dist/{label-167415e5.cjs → label-tFm8HZdb.cjs} +1 -1
- package/dist/lib.cjs +1 -1
- package/dist/lib.d.ts +20 -13
- package/dist/lib.js +24 -23
- package/dist/{link-57de608a.js → link-6o6n2Tnd.js} +4 -4
- package/dist/link-ece8dZGH.cjs +1 -0
- package/dist/{page-viewer-5c733179.js → page-viewer-84Giu0Rs.js} +29 -26
- package/dist/page-viewer-OdVEG83P.cjs +1 -0
- package/dist/{popover-f7addcf4.js → popover-a84pbVhQ.js} +2 -2
- package/dist/{popover-7cb9079b.cjs → popover-fKjgcRUx.cjs} +1 -1
- package/dist/{project-general-setting-d9736056.js → project-general-setting-8OEVVxzn.js} +20 -17
- package/dist/project-general-setting-laHNQPW5.cjs +1 -0
- package/dist/{project-seo-setting-d81fc1e3.js → project-seo-setting-9kD_stdI.js} +11 -12
- package/dist/project-seo-setting-F3Opt9Uj.cjs +1 -0
- package/dist/render.cjs +1 -1
- package/dist/render.d.ts +7 -7
- package/dist/render.js +3 -3
- package/dist/{scroll-area-bb343b86.cjs → scroll-area-FiHvy-TZ.cjs} +1 -1
- package/dist/{scroll-area-83bd9e8f.js → scroll-area-ewXbxc3n.js} +2 -2
- package/dist/{select-0e32300c.cjs → select-7bjg-rr9.cjs} +1 -1
- package/dist/{select-7fddd7c3.js → select-POGdEDHT.js} +2 -2
- package/dist/{separator-a597dba7.cjs → separator-3Civ-6hb.cjs} +1 -1
- package/dist/{separator-a80d065b.js → separator-SctTn0Qi.js} +2 -2
- package/dist/server.d.ts +7 -10
- package/dist/server.js +0 -3
- package/dist/single-page-detail-X0TGlsT4.cjs +1 -0
- package/dist/{single-page-detail-04410e64.js → single-page-detail-iXpavDy8.js} +32 -29
- package/dist/skeleton-CU_FIbg3.js +239 -0
- package/dist/skeleton-JHP9zwL2.cjs +1 -0
- package/dist/studio.cjs +1 -0
- package/dist/studio.d.ts +13 -0
- package/dist/studio.js +39 -0
- package/dist/{tabs-85caa1e8.js → tabs-Gb9v5dVb.js} +2 -2
- package/dist/{tabs-860e37aa.cjs → tabs-iWeaaVrg.cjs} +1 -1
- package/dist/{textarea-a338ede6.cjs → textarea-1kZEh7ki.cjs} +1 -1
- package/dist/{textarea-0750bcd2.js → textarea-b2QvVhrK.js} +2 -2
- package/dist/{toggle-00c9d11e.js → toggle-ASJRAaGP.js} +2 -2
- package/dist/{toggle-b90fed97.cjs → toggle-ehNIPmme.cjs} +1 -1
- package/dist/ui.cjs +1 -1
- package/dist/ui.d.ts +69 -4
- package/dist/ui.js +272 -212
- package/dist/useAddBlock-1cMXaOVk.cjs +1 -0
- package/dist/useAddBlock-BOjrGBEO.js +86 -0
- package/dist/useAllBlocks-RU_Xw8j9.cjs +1 -0
- package/dist/useAllBlocks-lX6uVO39.js +20 -0
- package/dist/useChaiExternalData-4K9WxANa.js +6 -0
- package/dist/useChaiExternalData-DkyBJ81C.cjs +1 -0
- package/dist/useDarkMode-JWkrNFpH.js +23 -0
- package/dist/useDarkMode-zeTW_UUR.cjs +1 -0
- package/dist/useFeatureSupport-jWSuY7wk.js +16 -0
- package/dist/useFeatureSupport-tZ0QfBxp.cjs +1 -0
- package/dist/useHiddenBlocks-3MsGOJ1s.js +15 -0
- package/dist/useHiddenBlocks-oJuQDmTy.cjs +1 -0
- package/dist/useLanguage-O1uu2Bzu.js +216 -0
- package/dist/useLanguage-Y3qgAbgG.cjs +1 -0
- package/dist/useMarkAsGlobalBlock-DB5B1UP6.js +25 -0
- package/dist/useMarkAsGlobalBlock-toxRSLc_.cjs +1 -0
- package/dist/useUiLibraries-4hPOi8DI.js +12 -0
- package/dist/useUiLibraries-9FhQCpKo.cjs +1 -0
- package/package.json +19 -5
- package/dist/AddBlocks-76275943.cjs +0 -3
- package/dist/BrandingOptions-d3b3309a.cjs +0 -1
- package/dist/CanvasArea-9f94cd28.cjs +0 -46
- package/dist/CurrentPage-edb509db.cjs +0 -1
- package/dist/Layers-ecba52c1.cjs +0 -1
- package/dist/MarkAsGlobalBlock-3a06a159.cjs +0 -1
- package/dist/PagesPanel-f4329082.cjs +0 -1
- package/dist/ProjectPanel-ce3116d3.cjs +0 -1
- package/dist/Settings-b6a2bef6.cjs +0 -1
- package/dist/SidePanels-2cc72c0b.cjs +0 -1
- package/dist/Topbar-3b9db9f3.cjs +0 -1
- package/dist/UnsplashImages-98c085c2.cjs +0 -1
- package/dist/UploadImages-61ef83ad.cjs +0 -1
- package/dist/add-page-modal-7f9ff733.cjs +0 -1
- package/dist/confirm-alert-c1fdf1e4.js +0 -35
- package/dist/confirm-alert-e1ea5110.cjs +0 -1
- package/dist/delete-page-modal-7066b01f.cjs +0 -1
- package/dist/html-to-json-aadcbf66.cjs +0 -1
- package/dist/index-c535cc95.cjs +0 -164
- package/dist/link-24679521.cjs +0 -1
- package/dist/page-viewer-da99c71e.cjs +0 -1
- package/dist/project-general-setting-90f8416d.cjs +0 -1
- package/dist/project-seo-setting-6eef8387.cjs +0 -1
- package/dist/single-page-detail-90f49d7a.cjs +0 -1
- package/dist/useBuilderProp-21feb2da.js +0 -296
- package/dist/useBuilderProp-adacf42f.cjs +0 -1
- package/dist/useChaiExternalData-192c7896.js +0 -5
- package/dist/useChaiExternalData-a90e8aac.cjs +0 -1
- /package/dist/{MODIFIERS-2f19c314.js → MODIFIERS-DsEzQ3aH.js} +0 -0
- /package/dist/{MODIFIERS-4716c669.cjs → MODIFIERS-Fx6WAZcw.cjs} +0 -0
- /package/dist/{jsx-runtime-5c3ac4f7.cjs → jsx-runtime-JYMCiFoE.cjs} +0 -0
- /package/dist/{jsx-runtime-944c88e2.js → jsx-runtime-Sp0orL4X.js} +0 -0
- /package/dist/{utils-ac68b2c8.js → utils-dze1SGvB.js} +0 -0
- /package/dist/{utils-3c452dd0.cjs → utils-qK_SjzzV.cjs} +0 -0
package/dist/ui.js
CHANGED
|
@@ -1,38 +1,39 @@
|
|
|
1
|
-
import { T as we, t as
|
|
2
|
-
import { D as
|
|
3
|
-
import {
|
|
4
|
-
import { A as
|
|
5
|
-
import { A as
|
|
6
|
-
import { j as
|
|
7
|
-
import { cva as
|
|
8
|
-
import { c as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
1
|
+
import { T as we, t as Te } from "./toggle-ASJRAaGP.js";
|
|
2
|
+
import { D as De, f as je, d as Ie, k as Re, e as Ae, h as ke, l as Le, p as Pe, g as Fe, i as Ee, j as Ge, m as He, n as ze, o as Ue, c as Ve, H as Be, b as Oe, a as qe, S as Je } from "./dropdown-menu-S03K_fNs.js";
|
|
3
|
+
import { B as Qe, S as We, g as Xe, T as Ye, c as Ze, e as _e, d as $e, a as ea, b as aa, r as ta, t as oa, f as ra } from "./skeleton-CU_FIbg3.js";
|
|
4
|
+
import { A as na, c as da, a as ia, b as la } from "./accordion-oPUeqPCZ.js";
|
|
5
|
+
import { A as ma, b as pa, a as ua, C as fa, g as ga, f as xa, d as ba, c as ha, e as va, T as ya } from "./textarea-b2QvVhrK.js";
|
|
6
|
+
import { j as t } from "./jsx-runtime-Sp0orL4X.js";
|
|
7
|
+
import { cva as c } from "class-variance-authority";
|
|
8
|
+
import { c as s } from "./utils-dze1SGvB.js";
|
|
9
|
+
import { A as Na, g as Sa, h as wa, b as Ta, f as Ma, d as Da, c as ja, e as Ia, a as Ra } from "./alert-dialog-GNfnpqFB.js";
|
|
10
|
+
import { D as ka, b as La, f as Pa, d as Fa, c as Ea, e as Ga, a as Ha } from "./dialog-jrw9DF1f.js";
|
|
11
|
+
import { C as Ua, a as Va, d as Ba, e as Oa, b as qa, f as Ja, c as Ka, h as Qa, g as Wa, I as Xa } from "./command-VHca6CcN.js";
|
|
12
|
+
import { L as Za } from "./label-KaP7MRrs.js";
|
|
13
|
+
import { S as $a, a as et } from "./scroll-area-ewXbxc3n.js";
|
|
14
|
+
import { T as tt, c as ot, a as rt, b as st } from "./tabs-Gb9v5dVb.js";
|
|
15
|
+
import { P as dt, b as it, a as lt } from "./popover-a84pbVhQ.js";
|
|
16
|
+
import * as d from "react";
|
|
16
17
|
import { ChevronRightIcon as f, CheckIcon as g, DotFilledIcon as x, Cross2Icon as b } from "@radix-ui/react-icons";
|
|
17
|
-
import * as
|
|
18
|
-
import { S as
|
|
18
|
+
import * as r from "@radix-ui/react-menubar";
|
|
19
|
+
import { S as mt, d as pt, a as ut, f as ft, e as gt, g as xt, c as bt, b as ht } from "./select-POGdEDHT.js";
|
|
19
20
|
import * as n from "@radix-ui/react-dialog";
|
|
20
|
-
import { S as
|
|
21
|
-
import { C as
|
|
22
|
-
import { I as
|
|
21
|
+
import { S as yt } from "./separator-SctTn0Qi.js";
|
|
22
|
+
import { C as Nt, d as St, b as wt, i as Tt, c as Mt, f as Dt, j as jt, n as It, e as Rt, g as At, h as kt, k as Lt, l as Pt, m as Ft, a as Et } from "./context-menu-8dC9uGXj.js";
|
|
23
|
+
import { I as Ht, a as zt, L as Ut, R as Vt } from "./link-6o6n2Tnd.js";
|
|
23
24
|
import "@radix-ui/react-toggle";
|
|
24
25
|
import "@radix-ui/react-switch";
|
|
25
26
|
import "@radix-ui/react-hover-card";
|
|
26
27
|
import "@radix-ui/react-dropdown-menu";
|
|
27
|
-
import "
|
|
28
|
+
import "jotai";
|
|
29
|
+
import "lodash";
|
|
28
30
|
import "@radix-ui/react-slot";
|
|
29
31
|
import "@radix-ui/react-tooltip";
|
|
30
32
|
import "@radix-ui/react-toast";
|
|
31
|
-
import "jotai";
|
|
32
|
-
import "lodash";
|
|
33
33
|
import "@radix-ui/react-accordion";
|
|
34
34
|
import "clsx";
|
|
35
35
|
import "tailwind-merge";
|
|
36
|
+
import "@radix-ui/react-alert-dialog";
|
|
36
37
|
import "cmdk";
|
|
37
38
|
import "@radix-ui/react-label";
|
|
38
39
|
import "@radix-ui/react-scroll-area";
|
|
@@ -43,10 +44,10 @@ import "@radix-ui/react-separator";
|
|
|
43
44
|
import "@radix-ui/react-context-menu";
|
|
44
45
|
import "react-icons-picker";
|
|
45
46
|
import "react-dom";
|
|
46
|
-
import "./ImagesPanel-
|
|
47
|
+
import "./ImagesPanel-oaHOD-Ex.js";
|
|
47
48
|
import "react-quill";
|
|
48
49
|
import "react-i18next";
|
|
49
|
-
const h =
|
|
50
|
+
const h = c(
|
|
50
51
|
"inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
51
52
|
{
|
|
52
53
|
variants: {
|
|
@@ -61,145 +62,145 @@ const h = m(
|
|
|
61
62
|
variant: "default"
|
|
62
63
|
}
|
|
63
64
|
}
|
|
64
|
-
), pe = ({ className: e, variant:
|
|
65
|
-
|
|
65
|
+
), pe = ({ className: e, variant: a, ...o }) => /* @__PURE__ */ t.jsx("div", { className: s(h({ variant: a }), e), ...o }), ue = r.Menu, fe = r.Group, ge = r.Portal, xe = r.Sub, be = r.RadioGroup, v = d.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ t.jsx(
|
|
66
|
+
r.Root,
|
|
66
67
|
{
|
|
67
68
|
ref: o,
|
|
68
|
-
className:
|
|
69
|
-
...
|
|
69
|
+
className: s("flex h-9 items-center space-x-1 rounded-md border bg-background p-1 shadow-sm", e),
|
|
70
|
+
...a
|
|
70
71
|
}
|
|
71
72
|
));
|
|
72
|
-
|
|
73
|
-
const y =
|
|
74
|
-
|
|
73
|
+
v.displayName = r.Root.displayName;
|
|
74
|
+
const y = d.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ t.jsx(
|
|
75
|
+
r.Trigger,
|
|
75
76
|
{
|
|
76
77
|
ref: o,
|
|
77
|
-
className:
|
|
78
|
+
className: s(
|
|
78
79
|
"flex cursor-default select-none items-center rounded-sm px-3 py-1 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
79
80
|
e
|
|
80
81
|
),
|
|
81
|
-
...
|
|
82
|
+
...a
|
|
82
83
|
}
|
|
83
84
|
));
|
|
84
|
-
y.displayName =
|
|
85
|
-
const
|
|
86
|
-
|
|
85
|
+
y.displayName = r.Trigger.displayName;
|
|
86
|
+
const C = d.forwardRef(({ className: e, inset: a, children: o, ...i }, l) => /* @__PURE__ */ t.jsxs(
|
|
87
|
+
r.SubTrigger,
|
|
87
88
|
{
|
|
88
89
|
ref: l,
|
|
89
|
-
className:
|
|
90
|
+
className: s(
|
|
90
91
|
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
91
|
-
|
|
92
|
+
a && "pl-8",
|
|
92
93
|
e
|
|
93
94
|
),
|
|
94
|
-
...
|
|
95
|
+
...i,
|
|
95
96
|
children: [
|
|
96
97
|
o,
|
|
97
|
-
/* @__PURE__ */
|
|
98
|
+
/* @__PURE__ */ t.jsx(f, { className: "ml-auto h-4 w-4" })
|
|
98
99
|
]
|
|
99
100
|
}
|
|
100
101
|
));
|
|
101
|
-
|
|
102
|
-
const
|
|
103
|
-
|
|
102
|
+
C.displayName = r.SubTrigger.displayName;
|
|
103
|
+
const N = d.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ t.jsx(
|
|
104
|
+
r.SubContent,
|
|
104
105
|
{
|
|
105
106
|
ref: o,
|
|
106
|
-
className:
|
|
107
|
+
className: s(
|
|
107
108
|
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
108
109
|
e
|
|
109
110
|
),
|
|
110
|
-
...
|
|
111
|
+
...a
|
|
111
112
|
}
|
|
112
113
|
));
|
|
113
|
-
|
|
114
|
-
const
|
|
115
|
-
|
|
114
|
+
N.displayName = r.SubContent.displayName;
|
|
115
|
+
const S = d.forwardRef(({ className: e, align: a = "start", alignOffset: o = -4, sideOffset: i = 8, ...l }, u) => /* @__PURE__ */ t.jsx(r.Portal, { children: /* @__PURE__ */ t.jsx(
|
|
116
|
+
r.Content,
|
|
116
117
|
{
|
|
117
118
|
ref: u,
|
|
118
|
-
align:
|
|
119
|
+
align: a,
|
|
119
120
|
alignOffset: o,
|
|
120
|
-
sideOffset:
|
|
121
|
-
className:
|
|
121
|
+
sideOffset: i,
|
|
122
|
+
className: s(
|
|
122
123
|
"z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
123
124
|
e
|
|
124
125
|
),
|
|
125
126
|
...l
|
|
126
127
|
}
|
|
127
128
|
) }));
|
|
128
|
-
|
|
129
|
-
const
|
|
130
|
-
|
|
129
|
+
S.displayName = r.Content.displayName;
|
|
130
|
+
const w = d.forwardRef(({ className: e, inset: a, ...o }, i) => /* @__PURE__ */ t.jsx(
|
|
131
|
+
r.Item,
|
|
131
132
|
{
|
|
132
|
-
ref:
|
|
133
|
-
className:
|
|
133
|
+
ref: i,
|
|
134
|
+
className: s(
|
|
134
135
|
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
135
|
-
|
|
136
|
+
a && "pl-8",
|
|
136
137
|
e
|
|
137
138
|
),
|
|
138
139
|
...o
|
|
139
140
|
}
|
|
140
141
|
));
|
|
141
|
-
|
|
142
|
-
const T =
|
|
143
|
-
|
|
142
|
+
w.displayName = r.Item.displayName;
|
|
143
|
+
const T = d.forwardRef(({ className: e, children: a, checked: o, ...i }, l) => /* @__PURE__ */ t.jsxs(
|
|
144
|
+
r.CheckboxItem,
|
|
144
145
|
{
|
|
145
146
|
ref: l,
|
|
146
|
-
className:
|
|
147
|
+
className: s(
|
|
147
148
|
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
148
149
|
e
|
|
149
150
|
),
|
|
150
151
|
checked: o,
|
|
151
|
-
...
|
|
152
|
+
...i,
|
|
152
153
|
children: [
|
|
153
|
-
/* @__PURE__ */
|
|
154
|
-
|
|
154
|
+
/* @__PURE__ */ t.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ t.jsx(r.ItemIndicator, { children: /* @__PURE__ */ t.jsx(g, { className: "h-4 w-4" }) }) }),
|
|
155
|
+
a
|
|
155
156
|
]
|
|
156
157
|
}
|
|
157
158
|
));
|
|
158
|
-
T.displayName =
|
|
159
|
-
const
|
|
160
|
-
|
|
159
|
+
T.displayName = r.CheckboxItem.displayName;
|
|
160
|
+
const M = d.forwardRef(({ className: e, children: a, ...o }, i) => /* @__PURE__ */ t.jsxs(
|
|
161
|
+
r.RadioItem,
|
|
161
162
|
{
|
|
162
|
-
ref:
|
|
163
|
-
className:
|
|
163
|
+
ref: i,
|
|
164
|
+
className: s(
|
|
164
165
|
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
165
166
|
e
|
|
166
167
|
),
|
|
167
168
|
...o,
|
|
168
169
|
children: [
|
|
169
|
-
/* @__PURE__ */
|
|
170
|
-
|
|
170
|
+
/* @__PURE__ */ t.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ t.jsx(r.ItemIndicator, { children: /* @__PURE__ */ t.jsx(x, { className: "h-4 w-4 fill-current" }) }) }),
|
|
171
|
+
a
|
|
171
172
|
]
|
|
172
173
|
}
|
|
173
174
|
));
|
|
174
|
-
|
|
175
|
-
const D =
|
|
176
|
-
|
|
175
|
+
M.displayName = r.RadioItem.displayName;
|
|
176
|
+
const D = d.forwardRef(({ className: e, inset: a, ...o }, i) => /* @__PURE__ */ t.jsx(
|
|
177
|
+
r.Label,
|
|
177
178
|
{
|
|
178
|
-
ref:
|
|
179
|
-
className:
|
|
179
|
+
ref: i,
|
|
180
|
+
className: s("px-2 py-1.5 text-sm font-semibold", a && "pl-8", e),
|
|
180
181
|
...o
|
|
181
182
|
}
|
|
182
183
|
));
|
|
183
|
-
D.displayName =
|
|
184
|
-
const j =
|
|
185
|
-
j.displayName =
|
|
186
|
-
const I = ({ className: e, ...
|
|
184
|
+
D.displayName = r.Label.displayName;
|
|
185
|
+
const j = d.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ t.jsx(r.Separator, { ref: o, className: s("-mx-1 my-1 h-px bg-muted", e), ...a }));
|
|
186
|
+
j.displayName = r.Separator.displayName;
|
|
187
|
+
const I = ({ className: e, ...a }) => /* @__PURE__ */ t.jsx("span", { className: s("ml-auto text-xs tracking-widest text-muted-foreground", e), ...a });
|
|
187
188
|
I.displayname = "MenubarShortcut";
|
|
188
|
-
const he = n.Root,
|
|
189
|
-
|
|
190
|
-
const p =
|
|
189
|
+
const he = n.Root, ve = n.Trigger, ye = n.Close, m = ({ className: e, ...a }) => /* @__PURE__ */ t.jsx(n.Portal, { className: s(e), ...a });
|
|
190
|
+
m.displayName = n.Portal.displayName;
|
|
191
|
+
const p = d.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ t.jsx(
|
|
191
192
|
n.Overlay,
|
|
192
193
|
{
|
|
193
|
-
className:
|
|
194
|
+
className: s(
|
|
194
195
|
"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
195
196
|
e
|
|
196
197
|
),
|
|
197
|
-
...
|
|
198
|
+
...a,
|
|
198
199
|
ref: o
|
|
199
200
|
}
|
|
200
201
|
));
|
|
201
202
|
p.displayName = n.Overlay.displayName;
|
|
202
|
-
const R =
|
|
203
|
+
const R = c(
|
|
203
204
|
"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
204
205
|
{
|
|
205
206
|
variants: {
|
|
@@ -214,163 +215,222 @@ const R = m(
|
|
|
214
215
|
side: "right"
|
|
215
216
|
}
|
|
216
217
|
}
|
|
217
|
-
), A =
|
|
218
|
-
({ side: e = "right", className:
|
|
219
|
-
/* @__PURE__ */
|
|
220
|
-
/* @__PURE__ */
|
|
218
|
+
), A = d.forwardRef(
|
|
219
|
+
({ side: e = "right", className: a, children: o, ...i }, l) => /* @__PURE__ */ t.jsxs(m, { children: [
|
|
220
|
+
/* @__PURE__ */ t.jsx(p, {}),
|
|
221
|
+
/* @__PURE__ */ t.jsxs(n.Content, { ref: l, className: s(R({ side: e }), a), ...i, children: [
|
|
221
222
|
o,
|
|
222
|
-
/* @__PURE__ */
|
|
223
|
-
/* @__PURE__ */
|
|
224
|
-
/* @__PURE__ */
|
|
223
|
+
/* @__PURE__ */ t.jsxs(n.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
|
|
224
|
+
/* @__PURE__ */ t.jsx(b, { className: "h-4 w-4" }),
|
|
225
|
+
/* @__PURE__ */ t.jsx("span", { className: "sr-only", children: "Close" })
|
|
225
226
|
] })
|
|
226
227
|
] })
|
|
227
228
|
] })
|
|
228
229
|
);
|
|
229
230
|
A.displayName = n.Content.displayName;
|
|
230
|
-
const k = ({ className: e, ...
|
|
231
|
+
const k = ({ className: e, ...a }) => /* @__PURE__ */ t.jsx("div", { className: s("flex flex-col space-y-2 text-center sm:text-left", e), ...a });
|
|
231
232
|
k.displayName = "SheetHeader";
|
|
232
|
-
const
|
|
233
|
-
|
|
234
|
-
const
|
|
235
|
-
|
|
236
|
-
const F =
|
|
233
|
+
const L = ({ className: e, ...a }) => /* @__PURE__ */ t.jsx("div", { className: s("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e), ...a });
|
|
234
|
+
L.displayName = "SheetFooter";
|
|
235
|
+
const P = d.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ t.jsx(n.Title, { ref: o, className: s("text-lg font-semibold text-foreground", e), ...a }));
|
|
236
|
+
P.displayName = n.Title.displayName;
|
|
237
|
+
const F = d.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ t.jsx(n.Description, { ref: o, className: s("text-sm text-muted-foreground", e), ...a }));
|
|
237
238
|
F.displayName = n.Description.displayName;
|
|
239
|
+
function Ce() {
|
|
240
|
+
return {
|
|
241
|
+
colors: {
|
|
242
|
+
border: "hsl(var(--border))",
|
|
243
|
+
input: "hsl(var(--input))",
|
|
244
|
+
ring: "hsl(var(--ring))",
|
|
245
|
+
background: "hsl(var(--background))",
|
|
246
|
+
foreground: "hsl(var(--foreground))",
|
|
247
|
+
primary: {
|
|
248
|
+
DEFAULT: "hsl(var(--primary))",
|
|
249
|
+
foreground: "hsl(var(--primary-foreground))"
|
|
250
|
+
},
|
|
251
|
+
secondary: {
|
|
252
|
+
DEFAULT: "hsl(var(--secondary))",
|
|
253
|
+
foreground: "hsl(var(--secondary-foreground))"
|
|
254
|
+
},
|
|
255
|
+
destructive: {
|
|
256
|
+
DEFAULT: "hsl(var(--destructive))",
|
|
257
|
+
foreground: "hsl(var(--destructive-foreground))"
|
|
258
|
+
},
|
|
259
|
+
muted: {
|
|
260
|
+
DEFAULT: "hsl(var(--muted))",
|
|
261
|
+
foreground: "hsl(var(--muted-foreground))"
|
|
262
|
+
},
|
|
263
|
+
accent: {
|
|
264
|
+
DEFAULT: "hsl(var(--accent))",
|
|
265
|
+
foreground: "hsl(var(--accent-foreground))"
|
|
266
|
+
},
|
|
267
|
+
popover: {
|
|
268
|
+
DEFAULT: "hsl(var(--popover))",
|
|
269
|
+
foreground: "hsl(var(--popover-foreground))"
|
|
270
|
+
},
|
|
271
|
+
card: {
|
|
272
|
+
DEFAULT: "hsl(var(--card))",
|
|
273
|
+
foreground: "hsl(var(--card-foreground))"
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
borderRadius: {
|
|
277
|
+
lg: "var(--radius)",
|
|
278
|
+
md: "calc(var(--radius) - 2px)",
|
|
279
|
+
sm: "calc(var(--radius) - 4px)"
|
|
280
|
+
},
|
|
281
|
+
keyframes: {
|
|
282
|
+
"accordion-down": {
|
|
283
|
+
from: { height: "0" },
|
|
284
|
+
to: { height: "var(--radix-accordion-content-height)" }
|
|
285
|
+
},
|
|
286
|
+
"accordion-up": {
|
|
287
|
+
from: { height: "var(--radix-accordion-content-height)" },
|
|
288
|
+
to: { height: "0" }
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
animation: {
|
|
292
|
+
"accordion-down": "accordion-down 0.2s ease-out",
|
|
293
|
+
"accordion-up": "accordion-up 0.2s ease-out"
|
|
294
|
+
}
|
|
295
|
+
};
|
|
296
|
+
}
|
|
238
297
|
export {
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
298
|
+
na as Accordion,
|
|
299
|
+
da as AccordionContent,
|
|
300
|
+
ia as AccordionItem,
|
|
301
|
+
la as AccordionTrigger,
|
|
302
|
+
ma as Alert,
|
|
303
|
+
pa as AlertDescription,
|
|
304
|
+
Na as AlertDialog,
|
|
305
|
+
Sa as AlertDialogAction,
|
|
306
|
+
wa as AlertDialogCancel,
|
|
307
|
+
Ta as AlertDialogContent,
|
|
308
|
+
Ma as AlertDialogDescription,
|
|
309
|
+
Da as AlertDialogFooter,
|
|
310
|
+
ja as AlertDialogHeader,
|
|
311
|
+
Ia as AlertDialogTitle,
|
|
312
|
+
Ra as AlertDialogTrigger,
|
|
313
|
+
ua as AlertTitle,
|
|
255
314
|
pe as Badge,
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
315
|
+
Qe as Button,
|
|
316
|
+
fa as Card,
|
|
317
|
+
ga as CardContent,
|
|
318
|
+
xa as CardDescription,
|
|
319
|
+
ba as CardFooter,
|
|
320
|
+
ha as CardHeader,
|
|
321
|
+
va as CardTitle,
|
|
322
|
+
Ua as Command,
|
|
323
|
+
Va as CommandDialog,
|
|
324
|
+
Ba as CommandEmpty,
|
|
325
|
+
Oa as CommandGroup,
|
|
326
|
+
qa as CommandInput,
|
|
327
|
+
Ja as CommandItem,
|
|
328
|
+
Ka as CommandList,
|
|
329
|
+
Qa as CommandSeparator,
|
|
330
|
+
Wa as CommandShortcut,
|
|
331
|
+
Nt as ContextMenu,
|
|
332
|
+
St as ContextMenuCheckboxItem,
|
|
333
|
+
wt as ContextMenuContent,
|
|
334
|
+
Tt as ContextMenuGroup,
|
|
335
|
+
Mt as ContextMenuItem,
|
|
336
|
+
Dt as ContextMenuLabel,
|
|
337
|
+
jt as ContextMenuPortal,
|
|
338
|
+
It as ContextMenuRadioGroup,
|
|
339
|
+
Rt as ContextMenuRadioItem,
|
|
340
|
+
At as ContextMenuSeparator,
|
|
341
|
+
kt as ContextMenuShortcut,
|
|
342
|
+
Lt as ContextMenuSub,
|
|
343
|
+
Pt as ContextMenuSubContent,
|
|
344
|
+
Ft as ContextMenuSubTrigger,
|
|
345
|
+
Et as ContextMenuTrigger,
|
|
346
|
+
ka as Dialog,
|
|
347
|
+
La as DialogContent,
|
|
348
|
+
Pa as DialogDescription,
|
|
349
|
+
Fa as DialogFooter,
|
|
350
|
+
Ea as DialogHeader,
|
|
351
|
+
Ga as DialogTitle,
|
|
352
|
+
Ha as DialogTrigger,
|
|
353
|
+
De as DropdownMenu,
|
|
354
|
+
je as DropdownMenuCheckboxItem,
|
|
355
|
+
Ie as DropdownMenuContent,
|
|
356
|
+
Re as DropdownMenuGroup,
|
|
357
|
+
Ae as DropdownMenuItem,
|
|
358
|
+
ke as DropdownMenuLabel,
|
|
359
|
+
Le as DropdownMenuPortal,
|
|
301
360
|
Pe as DropdownMenuRadioGroup,
|
|
302
|
-
|
|
303
|
-
|
|
361
|
+
Fe as DropdownMenuRadioItem,
|
|
362
|
+
Ee as DropdownMenuSeparator,
|
|
304
363
|
Ge as DropdownMenuShortcut,
|
|
305
364
|
He as DropdownMenuSub,
|
|
306
365
|
ze as DropdownMenuSubContent,
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
366
|
+
Ue as DropdownMenuSubTrigger,
|
|
367
|
+
Ve as DropdownMenuTrigger,
|
|
368
|
+
Be as HoverCard,
|
|
310
369
|
Oe as HoverCardContent,
|
|
311
370
|
qe as HoverCardTrigger,
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
371
|
+
Ht as IconPickerField,
|
|
372
|
+
zt as ImagePickerField,
|
|
373
|
+
Xa as Input,
|
|
374
|
+
Za as Label,
|
|
375
|
+
Ut as LinkField,
|
|
376
|
+
v as Menubar,
|
|
318
377
|
T as MenubarCheckboxItem,
|
|
319
|
-
|
|
378
|
+
S as MenubarContent,
|
|
320
379
|
fe as MenubarGroup,
|
|
321
|
-
|
|
380
|
+
w as MenubarItem,
|
|
322
381
|
D as MenubarLabel,
|
|
323
382
|
ue as MenubarMenu,
|
|
324
383
|
ge as MenubarPortal,
|
|
325
384
|
be as MenubarRadioGroup,
|
|
326
|
-
|
|
385
|
+
M as MenubarRadioItem,
|
|
327
386
|
j as MenubarSeparator,
|
|
328
387
|
I as MenubarShortcut,
|
|
329
388
|
xe as MenubarSub,
|
|
330
|
-
|
|
331
|
-
|
|
389
|
+
N as MenubarSubContent,
|
|
390
|
+
C as MenubarSubTrigger,
|
|
332
391
|
y as MenubarTrigger,
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
392
|
+
dt as Popover,
|
|
393
|
+
it as PopoverContent,
|
|
394
|
+
lt as PopoverTrigger,
|
|
395
|
+
Vt as RTEField,
|
|
396
|
+
$a as ScrollArea,
|
|
397
|
+
et as ScrollBar,
|
|
398
|
+
mt as Select,
|
|
399
|
+
pt as SelectContent,
|
|
400
|
+
ut as SelectGroup,
|
|
401
|
+
ft as SelectItem,
|
|
402
|
+
gt as SelectLabel,
|
|
403
|
+
xt as SelectSeparator,
|
|
404
|
+
bt as SelectTrigger,
|
|
405
|
+
ht as SelectValue,
|
|
406
|
+
yt as Separator,
|
|
348
407
|
he as Sheet,
|
|
349
408
|
ye as SheetClose,
|
|
350
409
|
A as SheetContent,
|
|
351
410
|
F as SheetDescription,
|
|
352
|
-
|
|
411
|
+
L as SheetFooter,
|
|
353
412
|
k as SheetHeader,
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
413
|
+
P as SheetTitle,
|
|
414
|
+
ve as SheetTrigger,
|
|
415
|
+
We as Skeleton,
|
|
357
416
|
Je as Switch,
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
417
|
+
tt as Tabs,
|
|
418
|
+
ot as TabsContent,
|
|
419
|
+
rt as TabsList,
|
|
420
|
+
st as TabsTrigger,
|
|
421
|
+
ya as Textarea,
|
|
422
|
+
Xe as Toaster,
|
|
364
423
|
we as Toggle,
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
424
|
+
Ye as Tooltip,
|
|
425
|
+
Ze as TooltipContent,
|
|
426
|
+
_e as TooltipPortal,
|
|
427
|
+
$e as TooltipProvider,
|
|
428
|
+
ea as TooltipTrigger,
|
|
370
429
|
h as badgeVariants,
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
430
|
+
aa as buttonVariants,
|
|
431
|
+
Ce as chaiBuilderTheme,
|
|
432
|
+
ta as reducer,
|
|
433
|
+
oa as toast,
|
|
434
|
+
Te as toggleVariants,
|
|
435
|
+
ra as useToast
|
|
376
436
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const S=require("react"),n=require("lodash"),q=require("./ChaiBuilderEditor-SacH75l4.cjs"),C=require("./functions-uw7QP2kT.cjs"),x=require("./useAllBlocks-RU_Xw8j9.cjs"),D=require("./controls-xUKa23ic.cjs"),I=require("./MODIFIERS-Fx6WAZcw.cjs");function g(e,i,u,o,A){if(i===null)return[...e,...o];if(u!==null){const r=n.findIndex(e,{_parent:i}),c=(r===-1?0:r)+u;return e.splice(c,0,...o),e}if(!A){const c=n.findIndex(e,{_id:i})+1;return e.splice(c,0,...o),e}let t=n.findIndex(e,{_id:i});const s=n.filter(e,{_parent:i});n.isEmpty(s)||(t=n.findIndex(e,{_id:n.last(s)._id}));const p=t+1;return e.splice(p,0,...o),e}const E=()=>{const e=q.useDispatch(),i=x.useAllBlocks(),[,u]=q.useSelectedBlockIds(),o=S.useCallback((t,s,p)=>{var l;for(let d=0;d<t.length;d++){const{_id:_}=t[d];t[d]._id=C.generateUUID();const f=n.filter(t,{_parent:_});for(let a=0;a<f.length;a++)f[a]._parent=t[d]._id}let r;s&&(r=n.find(i,{_id:s}),t[0]._parent=s);const c=r?x.canAddChildBlock(r._type):!0;return!c&&r&&(t[0]._parent=r._parent),e({type:"set_blocks",payload:g(i,s||null,p||null,t,c)}),u([(l=n.first(t))==null?void 0:l._id]),n.first(t)},[i,e,u]);return{addCoreBlock:S.useCallback((t,s,p)=>{if(n.has(t,"blocks")){const y=t.blocks;return o(y,s,p)}const r=C.generateUUID(),c=D.getBlockDefaultProps(t.props),l=[];n.forIn(c,(y,h)=>{if(n.startsWith(y,I.SLOT_KEY)){const m=y.replace(I.SLOT_KEY,"");l.push({_id:m,_type:"Slot",_parent:r,_name:t.props[h].name,_styles:t.props[h].styles,_emptyStyles:t.props[h].emptyStyles})}});const d={_type:t.type,_id:r,...c};let _;s&&(_=n.find(i,{_id:s}),d._parent=s);const f=_?x.canAddChildBlock(_._type):!0;!f&&_&&(d._parent=_._parent);const a=[d,...l];return e({type:"set_blocks",payload:g(i,s||null,p||null,a,f)}),u([d._id]),d},[o,i,e,u]),addPredefinedBlock:o}};exports.useAddBlock=E;
|