@chaibuilder/sdk 1.0.10 → 1.0.12
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-7ACJv8LW.cjs +3 -0
- package/dist/{AddBlocks-xR2s2BVa.js → AddBlocks-H7BZYHUC.js} +30 -30
- package/dist/BrandingOptions-5j-XszLM.cjs +1 -0
- package/dist/{BrandingOptions-cHK2bVZy.js → BrandingOptions-PAgY-kvj.js} +13 -12
- package/dist/{CanvasArea-Br8bBSeT.cjs → CanvasArea-Dnm-yeus.cjs} +2 -2
- package/dist/{CanvasArea-2zqT1lSE.js → CanvasArea-zn2ox-5h.js} +6 -6
- package/dist/{ChaiBuilderEditor-SacH75l4.cjs → ChaiBuilderEditor-BoE-sArB.cjs} +2 -2
- package/dist/{ChaiBuilderEditor-h9bXC4l-.js → ChaiBuilderEditor-hEuUONQ3.js} +2 -2
- package/dist/{CurrentPage-4lTETR2f.js → CurrentPage-6Jp4xAWK.js} +3 -3
- package/dist/CurrentPage-YMpqOqx7.cjs +1 -0
- package/dist/Layers-EzOZdWvd.cjs +1 -0
- package/dist/{Layers-wOfijZnb.js → Layers-WkZ48AUm.js} +5 -5
- package/dist/{MarkAsGlobalBlock-xRyn29gC.js → MarkAsGlobalBlock-0HubcRkY.js} +3 -3
- package/dist/MarkAsGlobalBlock-HmeIyLCP.cjs +1 -0
- package/dist/{PagesPanel-82gCVzHS.js → PagesPanel-6JuwBLFQ.js} +4 -4
- package/dist/PagesPanel-zJq8p1ja.cjs +1 -0
- package/dist/ProjectPanel-Zml2F8b9.cjs +1 -0
- package/dist/{ProjectPanel-vz5WOyqZ.js → ProjectPanel-cu2QSDW9.js} +4 -4
- package/dist/{Settings-IuAF359L.js → Settings-fH8fZKpm.js} +70 -69
- package/dist/Settings-lc9PfnmG.cjs +1 -0
- package/dist/SidePanels-VH72zFE2.cjs +1 -0
- package/dist/{SidePanels-xssTWt4M.js → SidePanels-w8ZHKJaR.js} +3 -3
- package/dist/{Topbar-H0f0EL6-.js → Topbar-hm1D_5sb.js} +2 -2
- package/dist/Topbar-vQPo9xSY.cjs +1 -0
- package/dist/add-page-modal--qZSwJuB.cjs +1 -0
- package/dist/{add-page-modal-J1E7rh1U.js → add-page-modal-bj7qbZuK.js} +6 -5
- package/dist/controls-W97-POR_.cjs +1 -0
- package/dist/controls-enQY7NI8.js +118 -0
- package/dist/core.cjs +1 -1
- package/dist/core.js +9 -9
- package/dist/delete-page-modal-2LuDLEiP.cjs +1 -0
- package/dist/{delete-page-modal-ysj4O0bM.js → delete-page-modal-cnrR8tWH.js} +3 -3
- package/dist/index-HAue58ea.cjs +1 -0
- package/dist/{index-cZ4uo6aT.js → index-T4_wfKl5.js} +2 -2
- package/dist/{index-8L3zCc6V.cjs → index-X9ZgD09V.cjs} +1 -1
- package/dist/index-ehKdBRUK.js +18 -0
- package/dist/lib.cjs +1 -1
- package/dist/lib.d.ts +65 -0
- package/dist/lib.js +117 -57
- package/dist/page-viewer-IARz6OSp.cjs +1 -0
- package/dist/{page-viewer-84Giu0Rs.js → page-viewer-Y4YiaZ_m.js} +4 -4
- package/dist/{project-general-setting-8OEVVxzn.js → project-general-setting-U4S_KlhU.js} +13 -12
- package/dist/project-general-setting-eSl3t-VH.cjs +1 -0
- package/dist/{project-seo-setting-9kD_stdI.js → project-seo-setting-Ga9v_ECU.js} +7 -7
- package/dist/project-seo-setting-rankm1z3.cjs +1 -0
- package/dist/render.cjs +1 -1
- package/dist/render.js +34 -34
- package/dist/server.cjs +1 -1
- package/dist/server.js +1 -1
- package/dist/{single-page-detail-iXpavDy8.js → single-page-detail-pAxCy_Pe.js} +43 -42
- package/dist/single-page-detail-yPgnu2AI.cjs +1 -0
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +3 -3
- package/dist/ui.cjs +1 -1
- package/dist/ui.d.ts +4 -69
- package/dist/ui.js +208 -267
- package/dist/{useAddBlock-BOjrGBEO.js → useAddBlock-WJc3OgG8.js} +2 -2
- package/dist/{useAddBlock-1cMXaOVk.cjs → useAddBlock-dCKRFPRU.cjs} +1 -1
- package/dist/{useAllBlocks-RU_Xw8j9.cjs → useAllBlocks-6hvuNuyw.cjs} +1 -1
- package/dist/{useAllBlocks-lX6uVO39.js → useAllBlocks-PQKYvs-e.js} +1 -1
- package/dist/{useDarkMode-JWkrNFpH.js → useDarkMode-ZKCO_gkt.js} +1 -1
- package/dist/{useDarkMode-zeTW_UUR.cjs → useDarkMode-dV6FM6l-.cjs} +1 -1
- package/dist/{useFeatureSupport-jWSuY7wk.js → useFeatureSupport-OLwNgEZb.js} +1 -1
- package/dist/{useFeatureSupport-tZ0QfBxp.cjs → useFeatureSupport-c9IgPW2t.cjs} +1 -1
- package/dist/{useLanguage-Y3qgAbgG.cjs → useLanguage-NKKKaxVM.cjs} +1 -1
- package/dist/{useLanguage-O1uu2Bzu.js → useLanguage-gVC5rxO5.js} +2 -2
- package/dist/{useMarkAsGlobalBlock-DB5B1UP6.js → useMarkAsGlobalBlock-X73Vny8u.js} +2 -2
- package/dist/useMarkAsGlobalBlock-ebBVGHg4.cjs +1 -0
- package/package.json +2 -2
- package/dist/AddBlocks-tdvDe7xL.cjs +0 -3
- package/dist/BrandingOptions-DpJ-oNnf.cjs +0 -1
- package/dist/CurrentPage-nlUWJiUA.cjs +0 -1
- package/dist/Layers-Vw4XE6YB.cjs +0 -1
- package/dist/MarkAsGlobalBlock-1J_YyL1L.cjs +0 -1
- package/dist/PagesPanel-ZKRdK-mI.cjs +0 -1
- package/dist/ProjectPanel-kYg4KkJu.cjs +0 -1
- package/dist/Settings-1E3Y_5r6.cjs +0 -1
- package/dist/SidePanels-WL1UioF2.cjs +0 -1
- package/dist/Topbar-3ozdWfSy.cjs +0 -1
- package/dist/add-page-modal-eiiUZCJX.cjs +0 -1
- package/dist/delete-page-modal-TGTmRjyn.cjs +0 -1
- package/dist/page-viewer-OdVEG83P.cjs +0 -1
- package/dist/project-general-setting-laHNQPW5.cjs +0 -1
- package/dist/project-seo-setting-F3Opt9Uj.cjs +0 -1
- package/dist/single-page-detail-X0TGlsT4.cjs +0 -1
- package/dist/useMarkAsGlobalBlock-toxRSLc_.cjs +0 -1
package/dist/ui.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { T as we, t as
|
|
2
|
-
import { D as
|
|
3
|
-
import { B as Qe, S as
|
|
4
|
-
import { A as
|
|
5
|
-
import { A as
|
|
6
|
-
import { j as
|
|
7
|
-
import { cva as
|
|
8
|
-
import { c as
|
|
9
|
-
import { A as
|
|
10
|
-
import { D as
|
|
11
|
-
import { C as
|
|
12
|
-
import { L as
|
|
13
|
-
import { S as
|
|
14
|
-
import { T as
|
|
15
|
-
import { P as
|
|
16
|
-
import * as
|
|
1
|
+
import { T as we, t as Me } from "./toggle-ASJRAaGP.js";
|
|
2
|
+
import { D as ve, f as De, d as je, k as Ie, e as Re, h as Ae, l as ke, p as Pe, g as Le, i as Fe, j as Ge, m as He, n as ze, o as Ve, c as Be, H as Ee, b as Oe, a as qe, S as Je } from "./dropdown-menu-S03K_fNs.js";
|
|
3
|
+
import { B as Qe, S as Ue, g as We, T as Xe, c as Ye, e as Ze, d as _e, a as $e, b as et, r as tt, t as at, f as ot } from "./skeleton-CU_FIbg3.js";
|
|
4
|
+
import { A as rt, c as nt, a as it, b as dt } from "./accordion-oPUeqPCZ.js";
|
|
5
|
+
import { A as mt, b as ct, a as pt, C as ut, g as ft, f as gt, d as xt, c as bt, e as ht, T as Ct } from "./textarea-b2QvVhrK.js";
|
|
6
|
+
import { j as a } from "./jsx-runtime-Sp0orL4X.js";
|
|
7
|
+
import { cva as m } from "class-variance-authority";
|
|
8
|
+
import { c as r } from "./utils-dze1SGvB.js";
|
|
9
|
+
import { A as Nt, g as St, h as wt, b as Mt, f as Tt, d as vt, c as Dt, e as jt, a as It } from "./alert-dialog-GNfnpqFB.js";
|
|
10
|
+
import { D as At, b as kt, f as Pt, d as Lt, c as Ft, e as Gt, a as Ht } from "./dialog-jrw9DF1f.js";
|
|
11
|
+
import { C as Vt, a as Bt, d as Et, e as Ot, b as qt, f as Jt, c as Kt, h as Qt, g as Ut, I as Wt } from "./command-VHca6CcN.js";
|
|
12
|
+
import { L as Yt } from "./label-KaP7MRrs.js";
|
|
13
|
+
import { S as _t, a as $t } from "./scroll-area-ewXbxc3n.js";
|
|
14
|
+
import { T as ta, c as aa, a as oa, b as sa } from "./tabs-Gb9v5dVb.js";
|
|
15
|
+
import { P as na, b as ia, a as da } from "./popover-a84pbVhQ.js";
|
|
16
|
+
import * as i from "react";
|
|
17
17
|
import { ChevronRightIcon as f, CheckIcon as g, DotFilledIcon as x, Cross2Icon as b } from "@radix-ui/react-icons";
|
|
18
|
-
import * as
|
|
19
|
-
import { S as
|
|
18
|
+
import * as s from "@radix-ui/react-menubar";
|
|
19
|
+
import { S as ma, d as ca, a as pa, f as ua, e as fa, g as ga, c as xa, b as ba } from "./select-POGdEDHT.js";
|
|
20
20
|
import * as n from "@radix-ui/react-dialog";
|
|
21
|
-
import { S as
|
|
22
|
-
import { C as
|
|
23
|
-
import { I as
|
|
21
|
+
import { S as Ca } from "./separator-SctTn0Qi.js";
|
|
22
|
+
import { C as Na, d as Sa, b as wa, i as Ma, c as Ta, f as va, j as Da, n as ja, e as Ia, g as Ra, h as Aa, k as ka, l as Pa, m as La, a as Fa } from "./context-menu-8dC9uGXj.js";
|
|
23
|
+
import { I as Ha, a as za, L as Va, R as Ba } from "./link-6o6n2Tnd.js";
|
|
24
24
|
import "@radix-ui/react-toggle";
|
|
25
25
|
import "@radix-ui/react-switch";
|
|
26
26
|
import "@radix-ui/react-hover-card";
|
|
@@ -47,7 +47,7 @@ import "react-dom";
|
|
|
47
47
|
import "./ImagesPanel-oaHOD-Ex.js";
|
|
48
48
|
import "react-quill";
|
|
49
49
|
import "react-i18next";
|
|
50
|
-
const h =
|
|
50
|
+
const h = m(
|
|
51
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",
|
|
52
52
|
{
|
|
53
53
|
variants: {
|
|
@@ -62,145 +62,145 @@ const h = c(
|
|
|
62
62
|
variant: "default"
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
), pe = ({ className: e, variant:
|
|
66
|
-
|
|
65
|
+
), pe = ({ className: e, variant: t, ...o }) => /* @__PURE__ */ a.jsx("div", { className: r(h({ variant: t }), e), ...o }), ue = s.Menu, fe = s.Group, ge = s.Portal, xe = s.Sub, be = s.RadioGroup, C = i.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a.jsx(
|
|
66
|
+
s.Root,
|
|
67
67
|
{
|
|
68
68
|
ref: o,
|
|
69
|
-
className:
|
|
70
|
-
...
|
|
69
|
+
className: r("flex h-9 items-center space-x-1 rounded-md border bg-background p-1 shadow-sm", e),
|
|
70
|
+
...t
|
|
71
71
|
}
|
|
72
72
|
));
|
|
73
|
-
|
|
74
|
-
const y =
|
|
75
|
-
|
|
73
|
+
C.displayName = s.Root.displayName;
|
|
74
|
+
const y = i.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a.jsx(
|
|
75
|
+
s.Trigger,
|
|
76
76
|
{
|
|
77
77
|
ref: o,
|
|
78
|
-
className:
|
|
78
|
+
className: r(
|
|
79
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",
|
|
80
80
|
e
|
|
81
81
|
),
|
|
82
|
-
...
|
|
82
|
+
...t
|
|
83
83
|
}
|
|
84
84
|
));
|
|
85
|
-
y.displayName =
|
|
86
|
-
const
|
|
87
|
-
|
|
85
|
+
y.displayName = s.Trigger.displayName;
|
|
86
|
+
const N = i.forwardRef(({ className: e, inset: t, children: o, ...d }, l) => /* @__PURE__ */ a.jsxs(
|
|
87
|
+
s.SubTrigger,
|
|
88
88
|
{
|
|
89
89
|
ref: l,
|
|
90
|
-
className:
|
|
90
|
+
className: r(
|
|
91
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",
|
|
92
|
-
|
|
92
|
+
t && "pl-8",
|
|
93
93
|
e
|
|
94
94
|
),
|
|
95
|
-
...
|
|
95
|
+
...d,
|
|
96
96
|
children: [
|
|
97
97
|
o,
|
|
98
|
-
/* @__PURE__ */
|
|
98
|
+
/* @__PURE__ */ a.jsx(f, { className: "ml-auto h-4 w-4" })
|
|
99
99
|
]
|
|
100
100
|
}
|
|
101
101
|
));
|
|
102
|
-
|
|
103
|
-
const
|
|
104
|
-
|
|
102
|
+
N.displayName = s.SubTrigger.displayName;
|
|
103
|
+
const S = i.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a.jsx(
|
|
104
|
+
s.SubContent,
|
|
105
105
|
{
|
|
106
106
|
ref: o,
|
|
107
|
-
className:
|
|
107
|
+
className: r(
|
|
108
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",
|
|
109
109
|
e
|
|
110
110
|
),
|
|
111
|
-
...
|
|
111
|
+
...t
|
|
112
112
|
}
|
|
113
113
|
));
|
|
114
|
-
|
|
115
|
-
const
|
|
116
|
-
|
|
114
|
+
S.displayName = s.SubContent.displayName;
|
|
115
|
+
const w = i.forwardRef(({ className: e, align: t = "start", alignOffset: o = -4, sideOffset: d = 8, ...l }, u) => /* @__PURE__ */ a.jsx(s.Portal, { children: /* @__PURE__ */ a.jsx(
|
|
116
|
+
s.Content,
|
|
117
117
|
{
|
|
118
118
|
ref: u,
|
|
119
|
-
align:
|
|
119
|
+
align: t,
|
|
120
120
|
alignOffset: o,
|
|
121
|
-
sideOffset:
|
|
122
|
-
className:
|
|
121
|
+
sideOffset: d,
|
|
122
|
+
className: r(
|
|
123
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",
|
|
124
124
|
e
|
|
125
125
|
),
|
|
126
126
|
...l
|
|
127
127
|
}
|
|
128
128
|
) }));
|
|
129
|
-
|
|
130
|
-
const
|
|
131
|
-
|
|
129
|
+
w.displayName = s.Content.displayName;
|
|
130
|
+
const M = i.forwardRef(({ className: e, inset: t, ...o }, d) => /* @__PURE__ */ a.jsx(
|
|
131
|
+
s.Item,
|
|
132
132
|
{
|
|
133
|
-
ref:
|
|
134
|
-
className:
|
|
133
|
+
ref: d,
|
|
134
|
+
className: r(
|
|
135
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",
|
|
136
|
-
|
|
136
|
+
t && "pl-8",
|
|
137
137
|
e
|
|
138
138
|
),
|
|
139
139
|
...o
|
|
140
140
|
}
|
|
141
141
|
));
|
|
142
|
-
|
|
143
|
-
const T =
|
|
144
|
-
|
|
142
|
+
M.displayName = s.Item.displayName;
|
|
143
|
+
const T = i.forwardRef(({ className: e, children: t, checked: o, ...d }, l) => /* @__PURE__ */ a.jsxs(
|
|
144
|
+
s.CheckboxItem,
|
|
145
145
|
{
|
|
146
146
|
ref: l,
|
|
147
|
-
className:
|
|
147
|
+
className: r(
|
|
148
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",
|
|
149
149
|
e
|
|
150
150
|
),
|
|
151
151
|
checked: o,
|
|
152
|
-
...
|
|
152
|
+
...d,
|
|
153
153
|
children: [
|
|
154
|
-
/* @__PURE__ */
|
|
155
|
-
|
|
154
|
+
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(s.ItemIndicator, { children: /* @__PURE__ */ a.jsx(g, { className: "h-4 w-4" }) }) }),
|
|
155
|
+
t
|
|
156
156
|
]
|
|
157
157
|
}
|
|
158
158
|
));
|
|
159
|
-
T.displayName =
|
|
160
|
-
const
|
|
161
|
-
|
|
159
|
+
T.displayName = s.CheckboxItem.displayName;
|
|
160
|
+
const v = i.forwardRef(({ className: e, children: t, ...o }, d) => /* @__PURE__ */ a.jsxs(
|
|
161
|
+
s.RadioItem,
|
|
162
162
|
{
|
|
163
|
-
ref:
|
|
164
|
-
className:
|
|
163
|
+
ref: d,
|
|
164
|
+
className: r(
|
|
165
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",
|
|
166
166
|
e
|
|
167
167
|
),
|
|
168
168
|
...o,
|
|
169
169
|
children: [
|
|
170
|
-
/* @__PURE__ */
|
|
171
|
-
|
|
170
|
+
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(s.ItemIndicator, { children: /* @__PURE__ */ a.jsx(x, { className: "h-4 w-4 fill-current" }) }) }),
|
|
171
|
+
t
|
|
172
172
|
]
|
|
173
173
|
}
|
|
174
174
|
));
|
|
175
|
-
|
|
176
|
-
const D =
|
|
177
|
-
|
|
175
|
+
v.displayName = s.RadioItem.displayName;
|
|
176
|
+
const D = i.forwardRef(({ className: e, inset: t, ...o }, d) => /* @__PURE__ */ a.jsx(
|
|
177
|
+
s.Label,
|
|
178
178
|
{
|
|
179
|
-
ref:
|
|
180
|
-
className:
|
|
179
|
+
ref: d,
|
|
180
|
+
className: r("px-2 py-1.5 text-sm font-semibold", t && "pl-8", e),
|
|
181
181
|
...o
|
|
182
182
|
}
|
|
183
183
|
));
|
|
184
|
-
D.displayName =
|
|
185
|
-
const j =
|
|
186
|
-
j.displayName =
|
|
187
|
-
const I = ({ className: e, ...
|
|
184
|
+
D.displayName = s.Label.displayName;
|
|
185
|
+
const j = i.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a.jsx(s.Separator, { ref: o, className: r("-mx-1 my-1 h-px bg-muted", e), ...t }));
|
|
186
|
+
j.displayName = s.Separator.displayName;
|
|
187
|
+
const I = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("span", { className: r("ml-auto text-xs tracking-widest text-muted-foreground", e), ...t });
|
|
188
188
|
I.displayname = "MenubarShortcut";
|
|
189
|
-
const he = n.Root,
|
|
190
|
-
|
|
191
|
-
const p =
|
|
189
|
+
const he = n.Root, Ce = n.Trigger, ye = n.Close, c = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx(n.Portal, { className: r(e), ...t });
|
|
190
|
+
c.displayName = n.Portal.displayName;
|
|
191
|
+
const p = i.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a.jsx(
|
|
192
192
|
n.Overlay,
|
|
193
193
|
{
|
|
194
|
-
className:
|
|
194
|
+
className: r(
|
|
195
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",
|
|
196
196
|
e
|
|
197
197
|
),
|
|
198
|
-
...
|
|
198
|
+
...t,
|
|
199
199
|
ref: o
|
|
200
200
|
}
|
|
201
201
|
));
|
|
202
202
|
p.displayName = n.Overlay.displayName;
|
|
203
|
-
const R =
|
|
203
|
+
const R = m(
|
|
204
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",
|
|
205
205
|
{
|
|
206
206
|
variants: {
|
|
@@ -215,222 +215,163 @@ const R = c(
|
|
|
215
215
|
side: "right"
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
|
-
), A =
|
|
219
|
-
({ side: e = "right", className:
|
|
220
|
-
/* @__PURE__ */
|
|
221
|
-
/* @__PURE__ */
|
|
218
|
+
), A = i.forwardRef(
|
|
219
|
+
({ side: e = "right", className: t, children: o, ...d }, l) => /* @__PURE__ */ a.jsxs(c, { children: [
|
|
220
|
+
/* @__PURE__ */ a.jsx(p, {}),
|
|
221
|
+
/* @__PURE__ */ a.jsxs(n.Content, { ref: l, className: r(R({ side: e }), t), ...d, children: [
|
|
222
222
|
o,
|
|
223
|
-
/* @__PURE__ */
|
|
224
|
-
/* @__PURE__ */
|
|
225
|
-
/* @__PURE__ */
|
|
223
|
+
/* @__PURE__ */ a.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__ */ a.jsx(b, { className: "h-4 w-4" }),
|
|
225
|
+
/* @__PURE__ */ a.jsx("span", { className: "sr-only", children: "Close" })
|
|
226
226
|
] })
|
|
227
227
|
] })
|
|
228
228
|
] })
|
|
229
229
|
);
|
|
230
230
|
A.displayName = n.Content.displayName;
|
|
231
|
-
const k = ({ className: e, ...
|
|
231
|
+
const k = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: r("flex flex-col space-y-2 text-center sm:text-left", e), ...t });
|
|
232
232
|
k.displayName = "SheetHeader";
|
|
233
|
-
const
|
|
234
|
-
|
|
235
|
-
const
|
|
236
|
-
|
|
237
|
-
const F =
|
|
233
|
+
const P = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: r("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e), ...t });
|
|
234
|
+
P.displayName = "SheetFooter";
|
|
235
|
+
const L = i.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a.jsx(n.Title, { ref: o, className: r("text-lg font-semibold text-foreground", e), ...t }));
|
|
236
|
+
L.displayName = n.Title.displayName;
|
|
237
|
+
const F = i.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a.jsx(n.Description, { ref: o, className: r("text-sm text-muted-foreground", e), ...t }));
|
|
238
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
|
-
}
|
|
297
239
|
export {
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
240
|
+
rt as Accordion,
|
|
241
|
+
nt as AccordionContent,
|
|
242
|
+
it as AccordionItem,
|
|
243
|
+
dt as AccordionTrigger,
|
|
244
|
+
mt as Alert,
|
|
245
|
+
ct as AlertDescription,
|
|
246
|
+
Nt as AlertDialog,
|
|
247
|
+
St as AlertDialogAction,
|
|
248
|
+
wt as AlertDialogCancel,
|
|
249
|
+
Mt as AlertDialogContent,
|
|
250
|
+
Tt as AlertDialogDescription,
|
|
251
|
+
vt as AlertDialogFooter,
|
|
252
|
+
Dt as AlertDialogHeader,
|
|
253
|
+
jt as AlertDialogTitle,
|
|
254
|
+
It as AlertDialogTrigger,
|
|
255
|
+
pt as AlertTitle,
|
|
314
256
|
pe as Badge,
|
|
315
257
|
Qe as Button,
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
258
|
+
ut as Card,
|
|
259
|
+
ft as CardContent,
|
|
260
|
+
gt as CardDescription,
|
|
261
|
+
xt as CardFooter,
|
|
262
|
+
bt as CardHeader,
|
|
263
|
+
ht as CardTitle,
|
|
264
|
+
Vt as Command,
|
|
265
|
+
Bt as CommandDialog,
|
|
266
|
+
Et as CommandEmpty,
|
|
267
|
+
Ot as CommandGroup,
|
|
268
|
+
qt as CommandInput,
|
|
269
|
+
Jt as CommandItem,
|
|
270
|
+
Kt as CommandList,
|
|
271
|
+
Qt as CommandSeparator,
|
|
272
|
+
Ut as CommandShortcut,
|
|
273
|
+
Na as ContextMenu,
|
|
274
|
+
Sa as ContextMenuCheckboxItem,
|
|
275
|
+
wa as ContextMenuContent,
|
|
276
|
+
Ma as ContextMenuGroup,
|
|
277
|
+
Ta as ContextMenuItem,
|
|
278
|
+
va as ContextMenuLabel,
|
|
279
|
+
Da as ContextMenuPortal,
|
|
280
|
+
ja as ContextMenuRadioGroup,
|
|
281
|
+
Ia as ContextMenuRadioItem,
|
|
282
|
+
Ra as ContextMenuSeparator,
|
|
283
|
+
Aa as ContextMenuShortcut,
|
|
284
|
+
ka as ContextMenuSub,
|
|
285
|
+
Pa as ContextMenuSubContent,
|
|
286
|
+
La as ContextMenuSubTrigger,
|
|
287
|
+
Fa as ContextMenuTrigger,
|
|
288
|
+
At as Dialog,
|
|
289
|
+
kt as DialogContent,
|
|
290
|
+
Pt as DialogDescription,
|
|
291
|
+
Lt as DialogFooter,
|
|
292
|
+
Ft as DialogHeader,
|
|
293
|
+
Gt as DialogTitle,
|
|
294
|
+
Ht as DialogTrigger,
|
|
295
|
+
ve as DropdownMenu,
|
|
296
|
+
De as DropdownMenuCheckboxItem,
|
|
297
|
+
je as DropdownMenuContent,
|
|
298
|
+
Ie as DropdownMenuGroup,
|
|
299
|
+
Re as DropdownMenuItem,
|
|
300
|
+
Ae as DropdownMenuLabel,
|
|
301
|
+
ke as DropdownMenuPortal,
|
|
360
302
|
Pe as DropdownMenuRadioGroup,
|
|
361
|
-
|
|
362
|
-
|
|
303
|
+
Le as DropdownMenuRadioItem,
|
|
304
|
+
Fe as DropdownMenuSeparator,
|
|
363
305
|
Ge as DropdownMenuShortcut,
|
|
364
306
|
He as DropdownMenuSub,
|
|
365
307
|
ze as DropdownMenuSubContent,
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
308
|
+
Ve as DropdownMenuSubTrigger,
|
|
309
|
+
Be as DropdownMenuTrigger,
|
|
310
|
+
Ee as HoverCard,
|
|
369
311
|
Oe as HoverCardContent,
|
|
370
312
|
qe as HoverCardTrigger,
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
313
|
+
Ha as IconPickerField,
|
|
314
|
+
za as ImagePickerField,
|
|
315
|
+
Wt as Input,
|
|
316
|
+
Yt as Label,
|
|
317
|
+
Va as LinkField,
|
|
318
|
+
C as Menubar,
|
|
377
319
|
T as MenubarCheckboxItem,
|
|
378
|
-
|
|
320
|
+
w as MenubarContent,
|
|
379
321
|
fe as MenubarGroup,
|
|
380
|
-
|
|
322
|
+
M as MenubarItem,
|
|
381
323
|
D as MenubarLabel,
|
|
382
324
|
ue as MenubarMenu,
|
|
383
325
|
ge as MenubarPortal,
|
|
384
326
|
be as MenubarRadioGroup,
|
|
385
|
-
|
|
327
|
+
v as MenubarRadioItem,
|
|
386
328
|
j as MenubarSeparator,
|
|
387
329
|
I as MenubarShortcut,
|
|
388
330
|
xe as MenubarSub,
|
|
389
|
-
|
|
390
|
-
|
|
331
|
+
S as MenubarSubContent,
|
|
332
|
+
N as MenubarSubTrigger,
|
|
391
333
|
y as MenubarTrigger,
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
334
|
+
na as Popover,
|
|
335
|
+
ia as PopoverContent,
|
|
336
|
+
da as PopoverTrigger,
|
|
337
|
+
Ba as RTEField,
|
|
338
|
+
_t as ScrollArea,
|
|
339
|
+
$t as ScrollBar,
|
|
340
|
+
ma as Select,
|
|
341
|
+
ca as SelectContent,
|
|
342
|
+
pa as SelectGroup,
|
|
343
|
+
ua as SelectItem,
|
|
344
|
+
fa as SelectLabel,
|
|
345
|
+
ga as SelectSeparator,
|
|
346
|
+
xa as SelectTrigger,
|
|
347
|
+
ba as SelectValue,
|
|
348
|
+
Ca as Separator,
|
|
407
349
|
he as Sheet,
|
|
408
350
|
ye as SheetClose,
|
|
409
351
|
A as SheetContent,
|
|
410
352
|
F as SheetDescription,
|
|
411
|
-
|
|
353
|
+
P as SheetFooter,
|
|
412
354
|
k as SheetHeader,
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
355
|
+
L as SheetTitle,
|
|
356
|
+
Ce as SheetTrigger,
|
|
357
|
+
Ue as Skeleton,
|
|
416
358
|
Je as Switch,
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
359
|
+
ta as Tabs,
|
|
360
|
+
aa as TabsContent,
|
|
361
|
+
oa as TabsList,
|
|
362
|
+
sa as TabsTrigger,
|
|
363
|
+
Ct as Textarea,
|
|
364
|
+
We as Toaster,
|
|
423
365
|
we as Toggle,
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
366
|
+
Xe as Tooltip,
|
|
367
|
+
Ye as TooltipContent,
|
|
368
|
+
Ze as TooltipPortal,
|
|
369
|
+
_e as TooltipProvider,
|
|
370
|
+
$e as TooltipTrigger,
|
|
429
371
|
h as badgeVariants,
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
ra as useToast
|
|
372
|
+
et as buttonVariants,
|
|
373
|
+
tt as reducer,
|
|
374
|
+
at as toast,
|
|
375
|
+
Me as toggleVariants,
|
|
376
|
+
ot as useToast
|
|
436
377
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useCallback as x } from "react";
|
|
2
2
|
import { findIndex as l, filter as P, isEmpty as j, last as J, find as A, first as S, has as K, forIn as L, startsWith as O } from "lodash";
|
|
3
|
-
import { J as T, l as W } from "./ChaiBuilderEditor-
|
|
3
|
+
import { J as T, l as W } from "./ChaiBuilderEditor-hEuUONQ3.js";
|
|
4
4
|
import { g } from "./functions-pcUZhFJM.js";
|
|
5
|
-
import { u as Y, d as C } from "./useAllBlocks-
|
|
5
|
+
import { u as Y, d as C } from "./useAllBlocks-PQKYvs-e.js";
|
|
6
6
|
import { b as q } from "./controls-Ni5kEzLz.js";
|
|
7
7
|
import { a as D } from "./MODIFIERS-DsEzQ3aH.js";
|
|
8
8
|
function E(e, s, d, o, h) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const S=require("react"),n=require("lodash"),q=require("./ChaiBuilderEditor-
|
|
1
|
+
"use strict";const S=require("react"),n=require("lodash"),q=require("./ChaiBuilderEditor-BoE-sArB.cjs"),C=require("./functions-uw7QP2kT.cjs"),x=require("./useAllBlocks-6hvuNuyw.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;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const l=require("lodash"),i=require("jotai"),r=require("./ChaiBuilderEditor-
|
|
1
|
+
"use strict";const l=require("lodash"),i=require("jotai"),r=require("./ChaiBuilderEditor-BoE-sArB.cjs"),s=t=>["Box","Slot","Form","DataProvider","Link","List","ListItem","Row","Column","Table","TableCell"].includes(t),u=t=>!["Slot"].includes(t),a=t=>!["Slot"].includes(t);function d(t,e){return t==="Slot"||e==="List"&&t!=="ListItem"||e==="Row"&&t!=="Column"?!1:s(e)}const B=(t,{dragSource:e,dropTarget:n})=>{const o=l.get(e,"data._type",""),c=l.get(n,"data._type","");return o==="Slot"||l.get(e,"id")&&l.get(e,"id")===l.get(n,"id")?!1:l.isEmpty(c)?!0:d(o,c)},k=()=>i.useAtomValue(r.presentBlocksAtom);exports.canAddChildBlock=s;exports.canDeleteBlock=a;exports.canDropBlock=B;exports.canDuplicateBlock=u;exports.useAllBlocks=k;
|