@chaibuilder/sdk 1.1.0 → 1.1.1
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/CanvasArea-JzBGfXSp.js +1412 -0
- package/dist/CanvasArea-rC2E_4eS.cjs +58 -0
- package/dist/{CurrentPage-pSsaLyEf.js → CurrentPage-2Hqp8dwp.js} +1 -1
- package/dist/{CurrentPage-_Em0U2gh.cjs → CurrentPage-v7RxefU-.cjs} +1 -1
- package/dist/{Layers-RyVRzaUa.cjs → Layers-1H-MUoKM.cjs} +1 -1
- package/dist/{Layers-wp2Uc2Y5.js → Layers-K_1pMZK5.js} +1 -1
- package/dist/{PagesPanel-ZuXc2610.cjs → PagesPanel-Qt66yy3K.cjs} +1 -1
- package/dist/{PagesPanel-L2VS8RyZ.js → PagesPanel-uMZT46fo.js} +2 -2
- package/dist/{ProjectPanel-SErKorHi.cjs → ProjectPanel-g92sgZ-g.cjs} +1 -1
- package/dist/{ProjectPanel-T3AXGe7O.js → ProjectPanel-nhhdOgSP.js} +2 -2
- package/dist/Settings-IcmgBZm9.cjs +1 -0
- package/dist/{Settings-xkL3U3Y-.js → Settings-pYbQsClt.js} +483 -475
- package/dist/{SidePanels-pd7HYv8I.js → SidePanels-9AjWdvVI.js} +45 -39
- package/dist/{SidePanels-5FNROZe7.cjs → SidePanels-CBkl8HgT.cjs} +1 -1
- package/dist/{add-page-modal-Njd5M7E2.js → add-page-modal-Ny4uAvWB.js} +1 -1
- package/dist/{add-page-modal-U8EH-GIa.cjs → add-page-modal-eahhWw2b.cjs} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +1 -0
- package/dist/core.js +1 -1
- package/dist/{delete-page-modal-0LQiM0fX.cjs → delete-page-modal-07nDpZpj.cjs} +1 -1
- package/dist/{delete-page-modal-NT7df4pk.js → delete-page-modal-4qrgJQ0x.js} +1 -1
- package/dist/{index-pYZXf7hY.cjs → index-Ua5E0Syv.cjs} +10 -10
- package/dist/{index-N3mTbV2j.js → index-aDqFUJ8v.js} +163 -160
- package/dist/{page-viewer-e3lOBAH3.js → page-viewer-1Eb7ypob.js} +2 -2
- package/dist/{page-viewer-UxwOwHCO.cjs → page-viewer-X8h3FMwb.cjs} +1 -1
- package/dist/{project-general-setting-DrLwWE-6.cjs → project-general-setting-I4z0C7PE.cjs} +1 -1
- package/dist/{project-general-setting-el86II8N.js → project-general-setting-TCl_JNdl.js} +1 -1
- package/dist/{single-page-detail-UFEXRI81.js → single-page-detail-W5sW6771.js} +2 -2
- package/dist/{single-page-detail-fUh22jZE.cjs → single-page-detail-sdTzXA5i.cjs} +1 -1
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +1 -1
- package/package.json +1 -1
- package/dist/CanvasArea-TzIgm_vh.cjs +0 -58
- package/dist/CanvasArea-dS2B20gv.js +0 -1421
- package/dist/Settings-GJHtwQaa.cjs +0 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-NV737rRe.js";
|
|
2
2
|
import * as ne from "react";
|
|
3
3
|
import I, { useState as w, useMemo as N, useEffect as _, useCallback as A, memo as dt, createContext as Me, useContext as re } from "react";
|
|
4
|
-
import { useThrottledCallback as
|
|
5
|
-
import { forEach as
|
|
4
|
+
import { useThrottledCallback as be } from "@react-hookz/web";
|
|
5
|
+
import { forEach as Ce, isArray as ae, omit as ct, truncate as pt, includes as M, get as u, first as pe, split as ut, startCase as Y, toLower as te, isEmpty as b, map as C, find as xt, last as fe, filter as ve, set as Ee, keys as gt, cloneDeep as ht, each as mt, capitalize as yt, reject as bt, nth as Ve, startsWith as z, isNumber as ft, parseInt as vt, isNaN as _e, findLast as jt, flatten as U, intersection as Fe, has as he, isNull as wt } from "lodash";
|
|
6
6
|
import { useTranslation as Ye } from "react-i18next";
|
|
7
|
-
import { PlusIcon as
|
|
8
|
-
import { b3 as Ft, b4 as Yt, B as ue, b5 as Wt, b6 as Xt, b7 as Zt, b8 as zt, b9 as Ut, ba as Gt, bb as Kt, a6 as G, aq as qt, ar as Jt, as as Qt, bc as er, ao as tr, bd as rr, ap as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { u as
|
|
12
|
-
import { Check as Rr, EditIcon as
|
|
13
|
-
import { getBlockComponent as et, getChaiDataProviders as
|
|
14
|
-
import { E as tt, u as rt } from "./index-
|
|
15
|
-
import { useAtom as
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import { A as
|
|
19
|
-
import { a as
|
|
7
|
+
import { PlusIcon as ke, Cross2Icon as We, EyeOpenIcon as Ct, EyeClosedIcon as He, BorderAllIcon as O, WidthIcon as R, HeightIcon as V, ArrowUpIcon as q, ArrowRightIcon as J, ArrowDownIcon as Q, ArrowLeftIcon as ee, ArrowTopLeftIcon as kt, ArrowTopRightIcon as Nt, ArrowBottomRightIcon as Tt, ArrowBottomLeftIcon as St, AlignLeftIcon as Rt, AlignCenterHorizontallyIcon as Vt, AlignRightIcon as Ht, StretchHorizontallyIcon as Bt, FontItalicIcon as At, UnderlineIcon as Dt, OverlineIcon as It, LetterCaseUppercaseIcon as Pt, Cross1Icon as $t, InfoCircledIcon as Ne, MinusIcon as Lt, BoxIcon as Xe, RowSpacingIcon as Ot, TriangleDownIcon as Mt, CrossCircledIcon as Et, TrashIcon as _t, MixerHorizontalIcon as Ze } from "@radix-ui/react-icons";
|
|
8
|
+
import { b3 as Ft, b4 as Yt, B as ue, b5 as Wt, b6 as Xt, b7 as Zt, b8 as zt, b9 as Ut, ba as Gt, bb as Kt, a6 as G, aq as qt, ar as Jt, as as Qt, bc as er, ao as tr, bd as rr, ap as sr, aH as W, aI as X, aK as Z, ak as lr, be as or, bf as nr, bg as ar, bh as ir, bi as dr, bj as cr, p as ze, ac as Ue, i as pr, bk as Ge, bl as ie, bm as de, bn as ce, aj as Te, P as Ke, a3 as qe, j as Je, aM as Se, bo as ur, bp as xr, a4 as xe, W as gr, a9 as Qe, R as Be, ag as hr, ad as mr, bq as yr, au as br, av as fr, aw as vr, ax as jr, ay as H, br as wr, aB as Cr, aC as kr, aD as Ae, aE as De } from "./index-ORFlyrBx.js";
|
|
9
|
+
import Nr from "@rjsf/core";
|
|
10
|
+
import Tr from "@rjsf/validator-ajv8";
|
|
11
|
+
import { u as Sr } from "./controls-G0puEH71.js";
|
|
12
|
+
import { Check as Rr, EditIcon as Vr, TrashIcon as Hr } from "lucide-react";
|
|
13
|
+
import { getBlockComponent as et, getChaiDataProviders as Br } from "@chaibuilder/runtime";
|
|
14
|
+
import { E as tt, u as rt } from "./index-aDqFUJ8v.js";
|
|
15
|
+
import { useAtom as Ar } from "jotai";
|
|
16
|
+
import Dr from "react-autosuggest";
|
|
17
|
+
import Ir from "fuse.js";
|
|
18
|
+
import { A as Pr, C as ge, d as $r } from "./utils-PPBbw5bk.js";
|
|
19
|
+
import { a as Lr } from "./MODIFIERS-MLfpKQY1.js";
|
|
20
20
|
import "@radix-ui/react-toggle";
|
|
21
21
|
import "class-variance-authority";
|
|
22
22
|
import "@radix-ui/react-switch";
|
|
@@ -62,25 +62,25 @@ import "./tailwind-config-d1VL1lzE.js";
|
|
|
62
62
|
import "tailwind-merge";
|
|
63
63
|
import "react-hotkeys-hook";
|
|
64
64
|
import "sonner";
|
|
65
|
-
const
|
|
66
|
-
function
|
|
67
|
-
const
|
|
68
|
-
function
|
|
69
|
-
|
|
70
|
-
const
|
|
71
|
-
|
|
65
|
+
const Or = I.lazy(() => import("react-json-view"));
|
|
66
|
+
function Mr(t) {
|
|
67
|
+
const s = [], r = {};
|
|
68
|
+
function l(o, a) {
|
|
69
|
+
Ce(a, (d, i) => {
|
|
70
|
+
const n = o ? `${o}.${i}` : i, p = ae(d) ? "list" : typeof d;
|
|
71
|
+
s.push(n), r[n] = p === "string" ? "text" : p === "object" ? "model" : p, p === "object" && !ae(d) && l(n, d);
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
|
-
return
|
|
74
|
+
return l("", ct(t, ["styles", "_type", "_id", "_name", "_bindings"])), { paths: s, pathsType: r };
|
|
75
75
|
}
|
|
76
|
-
const
|
|
76
|
+
const je = ({ data: t, fullView: s }) => {
|
|
77
77
|
if (!t)
|
|
78
78
|
return null;
|
|
79
79
|
const r = typeof t;
|
|
80
|
-
return
|
|
80
|
+
return s ? typeof t == "object" ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
81
81
|
/* @__PURE__ */ e.jsx("div", { className: "h-3" }),
|
|
82
82
|
/* @__PURE__ */ e.jsx(tt, { children: /* @__PURE__ */ e.jsx(
|
|
83
|
-
|
|
83
|
+
Or,
|
|
84
84
|
{
|
|
85
85
|
style: { maxHeight: "40vh", overflowY: "auto" },
|
|
86
86
|
name: "Content",
|
|
@@ -95,21 +95,21 @@ const ve = ({ data: t, fullView: l }) => {
|
|
|
95
95
|
/* @__PURE__ */ e.jsx("span", { className: "font-medium text-gray-800/80", children: "Content: " }),
|
|
96
96
|
t
|
|
97
97
|
] }) : /* @__PURE__ */ e.jsx("div", { className: "text-[10px] text-gray-800/50 leading-3 whitespace-nowrap overflow-hidden w-full", children: pt(r === "object" ? JSON.stringify(t) : t, { length: 40 }) });
|
|
98
|
-
},
|
|
98
|
+
}, Ie = ({
|
|
99
99
|
type: t,
|
|
100
|
-
value:
|
|
100
|
+
value: s = "",
|
|
101
101
|
setValue: r,
|
|
102
|
-
data:
|
|
103
|
-
onChange:
|
|
102
|
+
data: l,
|
|
103
|
+
onChange: o,
|
|
104
104
|
dataType: a,
|
|
105
105
|
appliedBindings: d
|
|
106
106
|
}) => {
|
|
107
|
-
const { paths: i, pathsType:
|
|
108
|
-
(
|
|
109
|
-
) : i.filter((
|
|
107
|
+
const { paths: i, pathsType: n } = Mr(l), p = t === "PROP" ? et(l == null ? void 0 : l._type) : {}, g = t === "PROP", [c, m] = w(!1), h = N(() => t === "PROP" ? i.filter(
|
|
108
|
+
(x) => !M(d, x) && u(p, `props.${pe(ut(x, "."))}.binding`)
|
|
109
|
+
) : i.filter((x) => a === u(n, x, "")), [t, i, d, a, p]);
|
|
110
110
|
return _(() => {
|
|
111
|
-
|
|
112
|
-
}, [
|
|
111
|
+
s && o(s);
|
|
112
|
+
}, [s, t]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
113
113
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-4", children: [
|
|
114
114
|
/* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted-foreground", children: Y(te(t)) }),
|
|
115
115
|
/* @__PURE__ */ e.jsxs(Ft, { open: c, onOpenChange: m, children: [
|
|
@@ -118,11 +118,11 @@ const ve = ({ data: t, fullView: l }) => {
|
|
|
118
118
|
{
|
|
119
119
|
variant: "outline",
|
|
120
120
|
size: "sm",
|
|
121
|
-
className: ` ${b(
|
|
122
|
-
children:
|
|
121
|
+
className: ` ${b(s) ? "bg-blue-500 text-gray-100 hover:bg-blue-400 hover:text-white w-44 justify-center" : "min-w-[350px] justify-between items-center"}`,
|
|
122
|
+
children: s ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
123
123
|
/* @__PURE__ */ e.jsxs("span", { className: "text-sm pr-8", children: [
|
|
124
|
-
|
|
125
|
-
|
|
124
|
+
g && /* @__PURE__ */ e.jsx("span", { className: "text-[10px] text-purple-500 bg-purple-100 px-2 py-0.5 mr-2 rounded-full", children: Y(a) }),
|
|
125
|
+
s
|
|
126
126
|
] }),
|
|
127
127
|
/* @__PURE__ */ e.jsx("span", { className: "text-[9px] text-blue-400 underline cursor-pointer hover:text-blue-700", children: "Change" })
|
|
128
128
|
] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
@@ -135,50 +135,50 @@ const ve = ({ data: t, fullView: l }) => {
|
|
|
135
135
|
/* @__PURE__ */ e.jsx(Zt, { placeholder: `Choose ${te(t)}...` }),
|
|
136
136
|
/* @__PURE__ */ e.jsxs(zt, { children: [
|
|
137
137
|
/* @__PURE__ */ e.jsx(Ut, { children: "No results found." }),
|
|
138
|
-
/* @__PURE__ */ e.jsx(Gt, { children: C(h, (
|
|
138
|
+
/* @__PURE__ */ e.jsx(Gt, { children: C(h, (x) => /* @__PURE__ */ e.jsxs(
|
|
139
139
|
Kt,
|
|
140
140
|
{
|
|
141
|
-
value:
|
|
142
|
-
className: `cursor-pointer ${
|
|
141
|
+
value: x,
|
|
142
|
+
className: `cursor-pointer ${g ? "flex justify-between items-center" : "flex flex-col items-start justify-start"}`,
|
|
143
143
|
onSelect: (f) => {
|
|
144
144
|
r(xt(h, (T) => T === f) || null), m(!1);
|
|
145
145
|
},
|
|
146
146
|
children: [
|
|
147
147
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
|
|
148
|
-
/* @__PURE__ */ e.jsx(Rr, { className: `w-4 h-4 text-green-500 ${
|
|
149
|
-
|
|
148
|
+
/* @__PURE__ */ e.jsx(Rr, { className: `w-4 h-4 text-green-500 ${s === x ? "" : "opacity-0"}` }),
|
|
149
|
+
x
|
|
150
150
|
] }),
|
|
151
|
-
|
|
151
|
+
g ? /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx("span", { className: "text-[10px] text-purple-500 bg-purple-100 px-2 py-0.5 rounded-full", children: Y(u(n, x, "")) }) }) : /* @__PURE__ */ e.jsx("div", { className: "pl-6", children: /* @__PURE__ */ e.jsx(je, { data: u(l, x) }) })
|
|
152
152
|
]
|
|
153
153
|
},
|
|
154
|
-
|
|
154
|
+
x
|
|
155
155
|
)) })
|
|
156
156
|
] })
|
|
157
157
|
] }) })
|
|
158
158
|
] })
|
|
159
159
|
] }),
|
|
160
|
-
!
|
|
160
|
+
!g && !b(s) && /* @__PURE__ */ e.jsx("div", { className: "pt-2", children: /* @__PURE__ */ e.jsx(je, { data: u(l, s, ""), fullView: !0 }) })
|
|
161
161
|
] });
|
|
162
|
-
},
|
|
162
|
+
}, Er = ({
|
|
163
163
|
appliedBindings: t = [],
|
|
164
|
-
onAddBinding:
|
|
164
|
+
onAddBinding: s,
|
|
165
165
|
editMode: r,
|
|
166
|
-
item:
|
|
166
|
+
item: l
|
|
167
167
|
}) => {
|
|
168
|
-
const [
|
|
169
|
-
(h,
|
|
168
|
+
const [o, a] = w(r ? l.key : ""), [d, i] = w(r ? l.value : ""), n = G(), [p] = rt(), g = A(
|
|
169
|
+
(h, x) => {
|
|
170
170
|
if (b(h))
|
|
171
171
|
return "";
|
|
172
172
|
{
|
|
173
|
-
const f =
|
|
173
|
+
const f = u(x === "PROP" ? n : p, h, "");
|
|
174
174
|
if (ae(f))
|
|
175
175
|
return "list";
|
|
176
176
|
const T = typeof f;
|
|
177
177
|
return T === "string" ? "text" : T === "object" ? "model" : T;
|
|
178
178
|
}
|
|
179
179
|
},
|
|
180
|
-
[
|
|
181
|
-
), [c, m] = w(r ?
|
|
180
|
+
[n, p]
|
|
181
|
+
), [c, m] = w(r ? g(l.key, "PROP") : "");
|
|
182
182
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
183
183
|
/* @__PURE__ */ e.jsxs(qt, { children: [
|
|
184
184
|
/* @__PURE__ */ e.jsx(Jt, { children: "Add Data Binding" }),
|
|
@@ -186,36 +186,36 @@ const ve = ({ data: t, fullView: l }) => {
|
|
|
186
186
|
] }),
|
|
187
187
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1 relative", children: [
|
|
188
188
|
/* @__PURE__ */ e.jsx(
|
|
189
|
-
|
|
189
|
+
Ie,
|
|
190
190
|
{
|
|
191
191
|
type: "PROP",
|
|
192
192
|
isDisabled: !1,
|
|
193
193
|
placeholder: "Enter prop key",
|
|
194
|
-
value:
|
|
194
|
+
value: o,
|
|
195
195
|
setValue: a,
|
|
196
196
|
onChange: (h) => {
|
|
197
|
-
const
|
|
198
|
-
a(h), c !==
|
|
197
|
+
const x = g(h, "PROP");
|
|
198
|
+
a(h), c !== x && i(""), m(x);
|
|
199
199
|
},
|
|
200
|
-
data:
|
|
200
|
+
data: n,
|
|
201
201
|
dataType: c,
|
|
202
202
|
appliedBindings: t
|
|
203
203
|
}
|
|
204
204
|
),
|
|
205
205
|
/* @__PURE__ */ e.jsx("div", { className: "h-2" }),
|
|
206
206
|
/* @__PURE__ */ e.jsx(
|
|
207
|
-
|
|
207
|
+
Ie,
|
|
208
208
|
{
|
|
209
209
|
type: "PATH",
|
|
210
|
-
isDisabled: b(
|
|
210
|
+
isDisabled: b(o),
|
|
211
211
|
placeholder: "Enter data path",
|
|
212
212
|
value: d,
|
|
213
213
|
setValue: i,
|
|
214
214
|
onChange: (h) => {
|
|
215
|
-
const
|
|
216
|
-
i(c ===
|
|
215
|
+
const x = g(h, "PATH");
|
|
216
|
+
i(c === x ? h : "");
|
|
217
217
|
},
|
|
218
|
-
data:
|
|
218
|
+
data: p,
|
|
219
219
|
dataType: c,
|
|
220
220
|
appliedBindings: t
|
|
221
221
|
}
|
|
@@ -226,55 +226,55 @@ const ve = ({ data: t, fullView: l }) => {
|
|
|
226
226
|
{
|
|
227
227
|
type: "submit",
|
|
228
228
|
className: "mt-4",
|
|
229
|
-
disabled: b(
|
|
230
|
-
onClick: () =>
|
|
229
|
+
disabled: b(o) && b(d),
|
|
230
|
+
onClick: () => s({ key: o, value: d }),
|
|
231
231
|
children: "Save"
|
|
232
232
|
}
|
|
233
233
|
) })
|
|
234
234
|
] });
|
|
235
|
-
},
|
|
235
|
+
}, st = ({ disabled: t, children: s, onAddBinding: r, appliedBindings: l, editMode: o = !0, item: a = {} }) => {
|
|
236
236
|
const [d, i] = w(!1);
|
|
237
237
|
return /* @__PURE__ */ e.jsxs(tr, { children: [
|
|
238
|
-
/* @__PURE__ */ e.jsx(rr, { disabled: t, asChild: !0, onClick: () => i(!0), children:
|
|
239
|
-
d && /* @__PURE__ */ e.jsx(
|
|
240
|
-
|
|
238
|
+
/* @__PURE__ */ e.jsx(rr, { disabled: t, asChild: !0, onClick: () => i(!0), children: s }),
|
|
239
|
+
d && /* @__PURE__ */ e.jsx(sr, { children: /* @__PURE__ */ e.jsx(
|
|
240
|
+
Er,
|
|
241
241
|
{
|
|
242
242
|
item: a,
|
|
243
|
-
editMode:
|
|
244
|
-
appliedBindings:
|
|
245
|
-
onAddBinding: (
|
|
246
|
-
r(
|
|
243
|
+
editMode: o,
|
|
244
|
+
appliedBindings: l,
|
|
245
|
+
onAddBinding: (n) => {
|
|
246
|
+
r(n), i(!1);
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
249
|
) })
|
|
250
250
|
] });
|
|
251
|
-
},
|
|
251
|
+
}, _r = ({
|
|
252
252
|
item: t,
|
|
253
|
-
onAddBinding:
|
|
253
|
+
onAddBinding: s,
|
|
254
254
|
onRemove: r,
|
|
255
|
-
selectedBlock:
|
|
256
|
-
dataProvider:
|
|
255
|
+
selectedBlock: l,
|
|
256
|
+
dataProvider: o,
|
|
257
257
|
appliedBindings: a
|
|
258
258
|
}) => {
|
|
259
|
-
const [d, i] = w("string"),
|
|
260
|
-
if (b(
|
|
259
|
+
const [d, i] = w("string"), n = (p, g) => {
|
|
260
|
+
if (b(p))
|
|
261
261
|
return "";
|
|
262
262
|
{
|
|
263
|
-
const c =
|
|
263
|
+
const c = u(g === "PROP" ? l : o, p, "");
|
|
264
264
|
if (ae(c))
|
|
265
265
|
return "list";
|
|
266
266
|
const m = typeof c;
|
|
267
267
|
return m === "string" ? "text" : m === "object" ? "model" : m;
|
|
268
268
|
}
|
|
269
269
|
};
|
|
270
|
-
return _(() => i(() =>
|
|
270
|
+
return _(() => i(() => n(t.key, "PROP")), [t.key]), /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col border border-gray-200 relative rounded-md p-2", children: [
|
|
271
271
|
/* @__PURE__ */ e.jsx("div", { className: "text-gray-500 font-normal text-sm", children: t.key }),
|
|
272
272
|
/* @__PURE__ */ e.jsx("div", { className: "font-medium leading-5", children: t.value }),
|
|
273
|
-
/* @__PURE__ */ e.jsx(
|
|
273
|
+
/* @__PURE__ */ e.jsx(je, { data: u(o, t.value, "") }),
|
|
274
274
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-end gap-x-2", children: [
|
|
275
|
-
/* @__PURE__ */ e.jsx(
|
|
275
|
+
/* @__PURE__ */ e.jsx(st, { editMode: !0, onAddBinding: s, appliedBindings: a, item: t, children: /* @__PURE__ */ e.jsx(Vr, { className: "h-6 w-6 mt-1 cursor-pointer rounded border hover:bg-blue-400 hover:text-white border-blue-400 p-1 text-blue-400 hover:scale-105 duration-200" }) }),
|
|
276
276
|
/* @__PURE__ */ e.jsx(
|
|
277
|
-
|
|
277
|
+
Hr,
|
|
278
278
|
{
|
|
279
279
|
onClick: () => r(),
|
|
280
280
|
className: "h-6 w-6 mt-1 cursor-pointer rounded border hover:bg-red-400 hover:text-white border-red-400 p-1 text-red-400 hover:scale-105 duration-200"
|
|
@@ -283,94 +283,94 @@ const ve = ({ data: t, fullView: l }) => {
|
|
|
283
283
|
] }),
|
|
284
284
|
!b(d) && !b(t.key) && /* @__PURE__ */ e.jsx("div", { className: "mt-px absolute right-0 top-1 text-purple-600 text-[10px] flex items-center font-medium h-4 px-2 rounded-full", children: Y(d) })
|
|
285
285
|
] });
|
|
286
|
-
},
|
|
287
|
-
const r = G(), [
|
|
286
|
+
}, Fr = ({ bindingData: t, onChange: s }) => {
|
|
287
|
+
const r = G(), [l] = rt(), o = Br(), [a, d] = w(
|
|
288
288
|
C(t, (c, m) => ({ key: m, value: c }))
|
|
289
289
|
);
|
|
290
290
|
_(() => {
|
|
291
291
|
d(C(t, (c, m) => ({ key: m, value: c })));
|
|
292
292
|
}, [r == null ? void 0 : r._id]);
|
|
293
293
|
const i = N(() => {
|
|
294
|
-
if (b(
|
|
294
|
+
if (b(l))
|
|
295
295
|
return !0;
|
|
296
296
|
if (b(a))
|
|
297
297
|
return !1;
|
|
298
|
-
const c =
|
|
298
|
+
const c = fe(a);
|
|
299
299
|
return b(c == null ? void 0 : c.key) || b(c == null ? void 0 : c.value);
|
|
300
|
-
}, [
|
|
301
|
-
const m =
|
|
302
|
-
d([...m, c]),
|
|
303
|
-
},
|
|
304
|
-
const m =
|
|
305
|
-
|
|
306
|
-
},
|
|
300
|
+
}, [l, a]), n = (c) => {
|
|
301
|
+
const m = ve(a, (h) => h.key !== c.key);
|
|
302
|
+
d([...m, c]), g([...m, c]);
|
|
303
|
+
}, p = (c) => {
|
|
304
|
+
const m = ve(a, (h, x) => c !== x);
|
|
305
|
+
g([...m]);
|
|
306
|
+
}, g = A(
|
|
307
307
|
(c = []) => {
|
|
308
308
|
if (d(c), b(c)) {
|
|
309
|
-
|
|
309
|
+
s({});
|
|
310
310
|
return;
|
|
311
311
|
}
|
|
312
312
|
const m = {};
|
|
313
|
-
|
|
313
|
+
Ce(c, (h) => {
|
|
314
314
|
!b(h == null ? void 0 : h.key) && !b(h == null ? void 0 : h.value) && Ee(m, h.key, h.value);
|
|
315
|
-
}),
|
|
315
|
+
}), s(m);
|
|
316
316
|
},
|
|
317
|
-
[
|
|
317
|
+
[s]
|
|
318
318
|
);
|
|
319
|
-
return b(
|
|
319
|
+
return b(o) ? /* @__PURE__ */ e.jsx("div", { className: "w-full flex items-center justify-center", children: /* @__PURE__ */ e.jsxs("p", { className: "text-gray-500 mb-1.5 text-xs", children: [
|
|
320
320
|
"You have no data providers registered. Please add a data provider to your project. ",
|
|
321
321
|
/* @__PURE__ */ e.jsx("br", {}),
|
|
322
322
|
/* @__PURE__ */ e.jsx("a", { className: "text-blue-500", href: "https://chaibuilder.com/docs/registering-data-providers", target: "_blank", children: "Learn more" })
|
|
323
323
|
] }) }) : /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
324
324
|
C(a, (c, m) => /* @__PURE__ */ e.jsx(
|
|
325
|
-
|
|
325
|
+
_r,
|
|
326
326
|
{
|
|
327
327
|
item: c,
|
|
328
|
-
onAddBinding:
|
|
329
|
-
onRemove: () =>
|
|
328
|
+
onAddBinding: n,
|
|
329
|
+
onRemove: () => p(m),
|
|
330
330
|
selectedBlock: r,
|
|
331
|
-
dataProvider:
|
|
331
|
+
dataProvider: l,
|
|
332
332
|
appliedBindings: C(a, "key")
|
|
333
333
|
},
|
|
334
334
|
c.key
|
|
335
335
|
)),
|
|
336
336
|
/* @__PURE__ */ e.jsxs(W, { delayDuration: 200, children: [
|
|
337
337
|
/* @__PURE__ */ e.jsx(X, { className: "w-full", children: /* @__PURE__ */ e.jsx(
|
|
338
|
-
|
|
338
|
+
st,
|
|
339
339
|
{
|
|
340
340
|
disabled: i,
|
|
341
341
|
appliedBindings: C(a, "key"),
|
|
342
|
-
onAddBinding:
|
|
342
|
+
onAddBinding: n,
|
|
343
343
|
children: /* @__PURE__ */ e.jsx(
|
|
344
344
|
"span",
|
|
345
345
|
{
|
|
346
346
|
className: `w-full px-5 py-1.5 text-xs rounded-md font-medium duration-200 ${i ? "cursor-not-allowed bg-gray-200 text-gray-400" : "bg-blue-700/20 text-blue-800 hover:bg-blue-700/30"}`,
|
|
347
|
-
children: b(
|
|
347
|
+
children: b(l) ? /* @__PURE__ */ e.jsx("small", { className: "text-gray-500 text-[9.5px]", children: "No data provider has been set up for this page" }) : "+ Add Data Binding"
|
|
348
348
|
}
|
|
349
349
|
)
|
|
350
350
|
}
|
|
351
351
|
) }),
|
|
352
|
-
i && /* @__PURE__ */ e.jsx(Z, { sideOffset: -55, className: "text-[11px]", children: b(
|
|
352
|
+
i && /* @__PURE__ */ e.jsx(Z, { sideOffset: -55, className: "text-[11px]", children: b(l) ? "No data provider has been set up for this page." : "Complete last added data binding to add more" })
|
|
353
353
|
] })
|
|
354
354
|
] });
|
|
355
|
-
},
|
|
355
|
+
}, Yr = () => /* @__PURE__ */ e.jsx("div", { className: "text-xs border rounded-sm p-1 mt-1 border-orange-500 text-orange-500 bg-orange-100", children: "Data binding is set for this field" }), me = dt(
|
|
356
356
|
({
|
|
357
357
|
createHistorySnapshot: t,
|
|
358
|
-
properties:
|
|
358
|
+
properties: s,
|
|
359
359
|
formData: r,
|
|
360
|
-
onChange:
|
|
360
|
+
onChange: l
|
|
361
361
|
}) => {
|
|
362
|
-
const [
|
|
363
|
-
return Object.keys(
|
|
364
|
-
const
|
|
365
|
-
if (M(["slot", "styles"],
|
|
362
|
+
const [o] = lr(), a = { type: "object", properties: {} }, d = {};
|
|
363
|
+
return Object.keys(s).forEach((i) => {
|
|
364
|
+
const n = s[i];
|
|
365
|
+
if (M(["slot", "styles"], n.type))
|
|
366
366
|
return;
|
|
367
|
-
const
|
|
368
|
-
a.properties[
|
|
367
|
+
const p = u(n, "i18n", !1) ? `${i}-${o}` : i;
|
|
368
|
+
a.properties[p] = or(n, o), d[p] = nr(n, o);
|
|
369
369
|
}), /* @__PURE__ */ e.jsx(
|
|
370
|
-
|
|
370
|
+
Nr,
|
|
371
371
|
{
|
|
372
372
|
widgets: {
|
|
373
|
-
binding:
|
|
373
|
+
binding: Yr,
|
|
374
374
|
richtext: ar,
|
|
375
375
|
icon: ir,
|
|
376
376
|
image: dr
|
|
@@ -383,61 +383,61 @@ const ve = ({ data: t, fullView: l }) => {
|
|
|
383
383
|
omitExtraData: !1,
|
|
384
384
|
liveOmit: !1,
|
|
385
385
|
liveValidate: !0,
|
|
386
|
-
validator:
|
|
386
|
+
validator: Tr,
|
|
387
387
|
uiSchema: d,
|
|
388
388
|
onBlur: t,
|
|
389
389
|
schema: a,
|
|
390
390
|
formData: r,
|
|
391
|
-
onChange:
|
|
391
|
+
onChange: l
|
|
392
392
|
}
|
|
393
393
|
);
|
|
394
394
|
}
|
|
395
395
|
);
|
|
396
|
-
function
|
|
397
|
-
const t = G(), { createSnapshot:
|
|
398
|
-
if (
|
|
399
|
-
const
|
|
400
|
-
r([t._id], { [
|
|
396
|
+
function Wr() {
|
|
397
|
+
const t = G(), { createSnapshot: s } = ze(), r = Ue(), l = et(t._type), o = { ...t }, a = pr("dataBindingSupport", !1), d = () => s(), i = ({ formData: c }, m) => {
|
|
398
|
+
if (m) {
|
|
399
|
+
const h = m.replace("root.", "");
|
|
400
|
+
r([t._id], { [h]: u(c, h) });
|
|
401
401
|
}
|
|
402
|
-
},
|
|
403
|
-
_name:
|
|
402
|
+
}, n = {
|
|
403
|
+
_name: Sr({
|
|
404
404
|
title: "Name",
|
|
405
|
-
default:
|
|
405
|
+
default: u(t, "_name", t._type)
|
|
406
406
|
})
|
|
407
|
-
},
|
|
408
|
-
const
|
|
409
|
-
return mt(
|
|
410
|
-
delete
|
|
411
|
-
}),
|
|
412
|
-
}, [
|
|
407
|
+
}, p = gt(u(o, "_bindings", {})), g = N(() => {
|
|
408
|
+
const c = ht(u(l, "props", {}));
|
|
409
|
+
return mt(p, (m) => {
|
|
410
|
+
delete c[m];
|
|
411
|
+
}), c;
|
|
412
|
+
}, [l, p]);
|
|
413
413
|
return /* @__PURE__ */ e.jsxs("div", { className: "overflow-x-hidden", children: [
|
|
414
414
|
/* @__PURE__ */ e.jsx(
|
|
415
|
-
|
|
415
|
+
me,
|
|
416
416
|
{
|
|
417
|
-
onChange:
|
|
418
|
-
createHistorySnapshot:
|
|
419
|
-
formData:
|
|
420
|
-
properties:
|
|
417
|
+
onChange: i,
|
|
418
|
+
createHistorySnapshot: d,
|
|
419
|
+
formData: o,
|
|
420
|
+
properties: n
|
|
421
421
|
}
|
|
422
422
|
),
|
|
423
423
|
/* @__PURE__ */ e.jsx("hr", { className: "mt-4" }),
|
|
424
|
-
/* @__PURE__ */ e.jsxs(Ge, { type: "multiple", defaultValue: ["STATIC", "BINDING"], className: "h-full w-full", children: [
|
|
424
|
+
a ? /* @__PURE__ */ e.jsxs(Ge, { type: "multiple", defaultValue: ["STATIC", "BINDING"], className: "h-full w-full", children: [
|
|
425
425
|
/* @__PURE__ */ e.jsxs(ie, { value: "BINDING", children: [
|
|
426
426
|
/* @__PURE__ */ e.jsx(de, { className: "px-3 py-2 text-xs hover:no-underline bg-gray-100 ml-1", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
|
|
427
427
|
/* @__PURE__ */ e.jsx(
|
|
428
428
|
"div",
|
|
429
429
|
{
|
|
430
|
-
className: `h-[8px] w-[8px] rounded-full ${b(
|
|
430
|
+
className: `h-[8px] w-[8px] rounded-full ${b(u(t, "_bindings", {})) ? "bg-gray-300" : "bg-blue-500"}`
|
|
431
431
|
}
|
|
432
432
|
),
|
|
433
433
|
"Data Binding"
|
|
434
434
|
] }) }),
|
|
435
435
|
/* @__PURE__ */ e.jsx(ce, { className: "pt-4 px-4", children: /* @__PURE__ */ e.jsx(
|
|
436
|
-
|
|
436
|
+
Fr,
|
|
437
437
|
{
|
|
438
|
-
bindingData:
|
|
439
|
-
onChange: (
|
|
440
|
-
|
|
438
|
+
bindingData: u(o, "_bindings", {}),
|
|
439
|
+
onChange: (c) => {
|
|
440
|
+
i({ formData: { ...o, _bindings: c } }, "root._bindings");
|
|
441
441
|
}
|
|
442
442
|
}
|
|
443
443
|
) })
|
|
@@ -448,40 +448,48 @@ function Yr() {
|
|
|
448
448
|
"Static Content"
|
|
449
449
|
] }) }),
|
|
450
450
|
/* @__PURE__ */ e.jsxs(ce, { className: "pt-4", children: [
|
|
451
|
-
b(
|
|
451
|
+
b(p) ? "" : /* @__PURE__ */ e.jsxs("div", { className: "text-xs mx-4 border rounded-sm p-1 mb-1 mt-0 border-orange-500 text-orange-500 bg-orange-100", children: [
|
|
452
452
|
"Data binding is set for ",
|
|
453
|
-
/* @__PURE__ */ e.jsx("b", { children: C(
|
|
453
|
+
/* @__PURE__ */ e.jsx("b", { children: C(p, yt).join(", ") }),
|
|
454
454
|
" ",
|
|
455
|
-
|
|
455
|
+
p.length === 1 ? "property" : "properties",
|
|
456
456
|
". Remove data binding to edit static content."
|
|
457
457
|
] }),
|
|
458
458
|
/* @__PURE__ */ e.jsx(
|
|
459
|
-
|
|
459
|
+
me,
|
|
460
460
|
{
|
|
461
|
-
onChange:
|
|
462
|
-
createHistorySnapshot:
|
|
463
|
-
formData:
|
|
464
|
-
properties:
|
|
461
|
+
onChange: i,
|
|
462
|
+
createHistorySnapshot: d,
|
|
463
|
+
formData: o,
|
|
464
|
+
properties: g
|
|
465
465
|
}
|
|
466
466
|
)
|
|
467
467
|
] })
|
|
468
468
|
] })
|
|
469
|
-
] })
|
|
469
|
+
] }) : /* @__PURE__ */ e.jsx(
|
|
470
|
+
me,
|
|
471
|
+
{
|
|
472
|
+
onChange: i,
|
|
473
|
+
createHistorySnapshot: d,
|
|
474
|
+
formData: o,
|
|
475
|
+
properties: g
|
|
476
|
+
}
|
|
477
|
+
),
|
|
470
478
|
/* @__PURE__ */ e.jsx("div", { className: "pb-60" })
|
|
471
479
|
] });
|
|
472
480
|
}
|
|
473
|
-
const Pe = new
|
|
481
|
+
const Pe = new Ir(Pr, {
|
|
474
482
|
isCaseSensitive: !1,
|
|
475
483
|
threshold: 0.2,
|
|
476
484
|
minMatchCharLength: 2,
|
|
477
485
|
keys: ["name"]
|
|
478
486
|
});
|
|
479
|
-
function
|
|
487
|
+
function Xr() {
|
|
480
488
|
var D;
|
|
481
|
-
const [t] =
|
|
489
|
+
const [t] = Te(), s = G(), r = Ke(), l = qe(), [o] = Je(), [a, d] = w(""), i = (D = pe(t)) == null ? void 0 : D.prop, n = bt((u(s, i, "").replace(Lr, "").split(",").pop() || "").split(" "), b), p = () => {
|
|
482
490
|
const j = a.trim().toLowerCase().replace(/ +(?= )/g, "").split(" ");
|
|
483
|
-
r(
|
|
484
|
-
}, [
|
|
491
|
+
r(o, j, !0), d("");
|
|
492
|
+
}, [g, c] = w([]), m = ({ value: j }) => {
|
|
485
493
|
const L = j.trim().toLowerCase(), P = L.match(/.+:/g);
|
|
486
494
|
let k = [];
|
|
487
495
|
if (P && P.length > 0) {
|
|
@@ -495,7 +503,7 @@ function Wr() {
|
|
|
495
503
|
c(C(k, "item"));
|
|
496
504
|
}, h = () => {
|
|
497
505
|
c([]);
|
|
498
|
-
},
|
|
506
|
+
}, x = (j) => j.name, f = (j) => /* @__PURE__ */ e.jsx("div", { className: "rounded-md p-1", children: j.name }), T = {
|
|
499
507
|
autoComplete: "off",
|
|
500
508
|
autoCorrect: "off",
|
|
501
509
|
autoCapitalize: "off",
|
|
@@ -503,7 +511,7 @@ function Wr() {
|
|
|
503
511
|
placeholder: "Enter class name",
|
|
504
512
|
value: a,
|
|
505
513
|
onKeyDown: (j) => {
|
|
506
|
-
j.key === "Enter" && a.trim() !== "" &&
|
|
514
|
+
j.key === "Enter" && a.trim() !== "" && p();
|
|
507
515
|
},
|
|
508
516
|
onChange: (j, { newValue: L }) => d(L),
|
|
509
517
|
className: "w-full rounded-md text-xs px-2 hover:outline-0 bg-background border-border py-1"
|
|
@@ -511,17 +519,17 @@ function Wr() {
|
|
|
511
519
|
return /* @__PURE__ */ e.jsxs(
|
|
512
520
|
"div",
|
|
513
521
|
{
|
|
514
|
-
className: `no-scrollbar flex ${
|
|
522
|
+
className: `no-scrollbar flex ${g.length > 0 ? "min-h-[300px]" : "min-h-max"} w-full flex-col gap-y-5 overflow-y-auto bg-gray-100 px-px`,
|
|
515
523
|
children: [
|
|
516
|
-
/* @__PURE__ */ e.jsx(
|
|
524
|
+
/* @__PURE__ */ e.jsx(Se, { className: "mt-2", children: "Add Tailwind classes" }),
|
|
517
525
|
/* @__PURE__ */ e.jsxs("div", { className: "relative -mt-4 flex items-center gap-x-3", children: [
|
|
518
526
|
/* @__PURE__ */ e.jsx("div", { className: "relative flex w-full items-center gap-x-3", children: /* @__PURE__ */ e.jsx(
|
|
519
|
-
|
|
527
|
+
Dr,
|
|
520
528
|
{
|
|
521
|
-
suggestions:
|
|
529
|
+
suggestions: g,
|
|
522
530
|
onSuggestionsFetchRequested: m,
|
|
523
531
|
onSuggestionsClearRequested: h,
|
|
524
|
-
getSuggestionValue:
|
|
532
|
+
getSuggestionValue: x,
|
|
525
533
|
renderSuggestion: f,
|
|
526
534
|
inputProps: T,
|
|
527
535
|
containerProps: {
|
|
@@ -539,17 +547,17 @@ function Wr() {
|
|
|
539
547
|
{
|
|
540
548
|
variant: "outline",
|
|
541
549
|
className: "h-6 border-gray-700",
|
|
542
|
-
onClick:
|
|
550
|
+
onClick: p,
|
|
543
551
|
disabled: a.trim() === "",
|
|
544
552
|
size: "sm",
|
|
545
|
-
children: /* @__PURE__ */ e.jsx(
|
|
553
|
+
children: /* @__PURE__ */ e.jsx(ke, {})
|
|
546
554
|
}
|
|
547
555
|
)
|
|
548
556
|
] }),
|
|
549
557
|
/* @__PURE__ */ e.jsxs("div", { className: "flex w-full flex-wrap gap-2", children: [
|
|
550
|
-
b(
|
|
558
|
+
b(n) && /* @__PURE__ */ e.jsx("div", { className: "flex h-10 w-full items-center justify-center text-center text-sm text-gray-400", children: "No class added" }),
|
|
551
559
|
ne.Children.toArray(
|
|
552
|
-
|
|
560
|
+
n.map((j) => /* @__PURE__ */ e.jsxs(
|
|
553
561
|
"div",
|
|
554
562
|
{
|
|
555
563
|
className: "group relative flex cursor-default items-center gap-x-1 rounded-full border border-blue-600 bg-blue-500 p-px px-1.5 text-[11px] text-white hover:border-blue-900",
|
|
@@ -558,7 +566,7 @@ function Wr() {
|
|
|
558
566
|
/* @__PURE__ */ e.jsx(
|
|
559
567
|
We,
|
|
560
568
|
{
|
|
561
|
-
onClick: () =>
|
|
569
|
+
onClick: () => l(o, [j]),
|
|
562
570
|
className: "invisible absolute right-1 hover:text-white group-hover:visible group-hover:cursor-pointer"
|
|
563
571
|
}
|
|
564
572
|
)
|
|
@@ -572,7 +580,7 @@ function Wr() {
|
|
|
572
580
|
}
|
|
573
581
|
);
|
|
574
582
|
}
|
|
575
|
-
const B = ["px", "%", "em", "rem", "ch", "vh", "vw"],
|
|
583
|
+
const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Zr = {
|
|
576
584
|
heading: "Flex Child",
|
|
577
585
|
items: [
|
|
578
586
|
{ type: "arbitrary", label: "Basis", units: B, property: "flexBasis" },
|
|
@@ -581,7 +589,7 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Xr = {
|
|
|
581
589
|
{ type: "dropdown", label: "Grow", property: "flexGrow" },
|
|
582
590
|
{ type: "dropdown", label: "Shrink", property: "flexShrink" }
|
|
583
591
|
]
|
|
584
|
-
},
|
|
592
|
+
}, zr = {
|
|
585
593
|
heading: "Grid Child",
|
|
586
594
|
items: [
|
|
587
595
|
{ type: "range", label: "Col Span", property: "gridColSpan" },
|
|
@@ -592,7 +600,7 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Xr = {
|
|
|
592
600
|
{ type: "range", label: "Row End", property: "gridRowEnd" },
|
|
593
601
|
{ type: "range", label: "Order", property: "order" }
|
|
594
602
|
]
|
|
595
|
-
},
|
|
603
|
+
}, Ur = [
|
|
596
604
|
{
|
|
597
605
|
heading: "Layout",
|
|
598
606
|
items: [
|
|
@@ -994,42 +1002,42 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Xr = {
|
|
|
994
1002
|
},
|
|
995
1003
|
{
|
|
996
1004
|
heading: "Classes",
|
|
997
|
-
items: [{ component:
|
|
1005
|
+
items: [{ component: Xr }]
|
|
998
1006
|
}
|
|
999
|
-
],
|
|
1007
|
+
], lt = {
|
|
1000
1008
|
"not-italic": () => /* @__PURE__ */ e.jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ e.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9 3H11V5H9V11H11V13H5V11H7V5H5V3H9Z", fill: "white" }) }),
|
|
1001
1009
|
// visibility
|
|
1002
1010
|
visible: Ct,
|
|
1003
|
-
invisible:
|
|
1011
|
+
invisible: He,
|
|
1004
1012
|
// display
|
|
1005
|
-
hidden:
|
|
1013
|
+
hidden: He,
|
|
1006
1014
|
gap: O,
|
|
1007
|
-
gapX:
|
|
1015
|
+
gapX: R,
|
|
1008
1016
|
gapY: V,
|
|
1009
|
-
spaceX:
|
|
1017
|
+
spaceX: R,
|
|
1010
1018
|
spaceY: V,
|
|
1011
1019
|
overscroll: O,
|
|
1012
|
-
overscrollX:
|
|
1020
|
+
overscrollX: R,
|
|
1013
1021
|
overscrollY: V,
|
|
1014
1022
|
overflow: O,
|
|
1015
|
-
overflowX:
|
|
1023
|
+
overflowX: R,
|
|
1016
1024
|
overflowY: V,
|
|
1017
1025
|
top: q,
|
|
1018
1026
|
right: J,
|
|
1019
1027
|
bottom: Q,
|
|
1020
1028
|
left: ee,
|
|
1021
1029
|
inset: O,
|
|
1022
|
-
insetX:
|
|
1030
|
+
insetX: R,
|
|
1023
1031
|
insetY: V,
|
|
1024
1032
|
border: O,
|
|
1025
|
-
borderX:
|
|
1033
|
+
borderX: R,
|
|
1026
1034
|
borderY: V,
|
|
1027
1035
|
borderTop: q,
|
|
1028
1036
|
borderRight: J,
|
|
1029
1037
|
borderBottom: Q,
|
|
1030
1038
|
borderLeft: ee,
|
|
1031
1039
|
borderRadius: O,
|
|
1032
|
-
borderRadiusX:
|
|
1040
|
+
borderRadiusX: R,
|
|
1033
1041
|
borderRadiusY: V,
|
|
1034
1042
|
borderRadiusTop: q,
|
|
1035
1043
|
borderRadiusRight: J,
|
|
@@ -1038,19 +1046,19 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Xr = {
|
|
|
1038
1046
|
borderRadiusTopLeft: kt,
|
|
1039
1047
|
borderRadiusTopRight: Nt,
|
|
1040
1048
|
borderRadiusBottomRight: Tt,
|
|
1041
|
-
borderRadiusBottomLeft:
|
|
1042
|
-
divideXWidth:
|
|
1049
|
+
borderRadiusBottomLeft: St,
|
|
1050
|
+
divideXWidth: R,
|
|
1043
1051
|
divideYWidth: V,
|
|
1044
1052
|
scale: O,
|
|
1045
|
-
scaleX:
|
|
1053
|
+
scaleX: R,
|
|
1046
1054
|
scaleY: V,
|
|
1047
|
-
skewX:
|
|
1055
|
+
skewX: R,
|
|
1048
1056
|
skewY: V,
|
|
1049
|
-
translateX:
|
|
1057
|
+
translateX: R,
|
|
1050
1058
|
translateY: V,
|
|
1051
1059
|
// padding
|
|
1052
1060
|
padding: O,
|
|
1053
|
-
paddingX:
|
|
1061
|
+
paddingX: R,
|
|
1054
1062
|
paddingY: V,
|
|
1055
1063
|
paddingTop: q,
|
|
1056
1064
|
paddingRight: J,
|
|
@@ -1058,14 +1066,14 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Xr = {
|
|
|
1058
1066
|
paddingLeft: ee,
|
|
1059
1067
|
// margin
|
|
1060
1068
|
margin: O,
|
|
1061
|
-
marginX:
|
|
1069
|
+
marginX: R,
|
|
1062
1070
|
marginY: V,
|
|
1063
1071
|
marginTop: q,
|
|
1064
1072
|
marginRight: J,
|
|
1065
1073
|
marginBottom: Q,
|
|
1066
1074
|
marginLeft: ee,
|
|
1067
1075
|
// text-align
|
|
1068
|
-
textLeft:
|
|
1076
|
+
textLeft: Rt,
|
|
1069
1077
|
textCenter: Vt,
|
|
1070
1078
|
textRight: Ht,
|
|
1071
1079
|
textJustify: Bt,
|
|
@@ -1190,100 +1198,100 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Xr = {
|
|
|
1190
1198
|
)
|
|
1191
1199
|
] }),
|
|
1192
1200
|
static: $t
|
|
1193
|
-
},
|
|
1201
|
+
}, se = Me({ canReset: !1, canChange: !0 }), Gr = ({ children: t, canReset: s = !1, canChange: r = !0 }) => (
|
|
1194
1202
|
// eslint-disable-next-line react/jsx-no-constructed-context-values
|
|
1195
|
-
/* @__PURE__ */ e.jsx(
|
|
1196
|
-
), ot = ({ label: t, property:
|
|
1197
|
-
const
|
|
1203
|
+
/* @__PURE__ */ e.jsx(se.Provider, { value: { canReset: s, canChange: r }, children: t })
|
|
1204
|
+
), ot = ({ label: t, property: s, onChange: r }) => {
|
|
1205
|
+
const l = N(() => u(ge, `${s}.classes`, [""]), [s]), o = le(s), a = N(() => u(o, "cls", ""), [o]), { canChange: d } = re(se), i = /\[.*\]/g.test(a);
|
|
1198
1206
|
return /* @__PURE__ */ e.jsx("div", { className: t ? "w-full rounded " : "grow", children: i ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
|
|
1199
|
-
/* @__PURE__ */ e.jsx(
|
|
1207
|
+
/* @__PURE__ */ e.jsx(ur, { className: "w-[70%] rounded py-1", readOnly: !0, value: a }),
|
|
1200
1208
|
/* @__PURE__ */ e.jsxs(W, { delayDuration: 100, children: [
|
|
1201
|
-
/* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsx("button", { type: "button", className: "invisible ml-3 mt-1 text-blue-600 group-hover:visible", children: /* @__PURE__ */ e.jsx(
|
|
1209
|
+
/* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsx("button", { type: "button", className: "invisible ml-3 mt-1 text-blue-600 group-hover:visible", children: /* @__PURE__ */ e.jsx(Ne, {}) }) }),
|
|
1202
1210
|
/* @__PURE__ */ e.jsx(Z, { children: "Current value is using a Tailwind arbitrary value." })
|
|
1203
1211
|
] })
|
|
1204
1212
|
] }) : /* @__PURE__ */ e.jsx(
|
|
1205
|
-
|
|
1213
|
+
we,
|
|
1206
1214
|
{
|
|
1207
1215
|
rounded: t,
|
|
1208
|
-
onChange: (
|
|
1216
|
+
onChange: (n) => r(n, s),
|
|
1209
1217
|
selected: a,
|
|
1210
|
-
options:
|
|
1218
|
+
options: l,
|
|
1211
1219
|
disabled: !d
|
|
1212
1220
|
}
|
|
1213
1221
|
) });
|
|
1214
1222
|
};
|
|
1215
|
-
function
|
|
1223
|
+
function we({ selected: t, onChange: s, rounded: r = !1, options: l, disabled: o = !1 }) {
|
|
1216
1224
|
const a = t.replace(/.*:/g, "").trim(), { undo: d, redo: i } = ze();
|
|
1217
1225
|
return /* @__PURE__ */ e.jsxs(
|
|
1218
1226
|
"select",
|
|
1219
1227
|
{
|
|
1220
|
-
disabled: !
|
|
1228
|
+
disabled: !l.length || o,
|
|
1221
1229
|
className: `${r ? "rounded-md border border-border" : "border-0"} w-full disable:bg-gray-500 h-full truncate rounded bg-background px-2 py-1 text-xs outline-none disabled:cursor-not-allowed`,
|
|
1222
|
-
onChange: (
|
|
1223
|
-
onKeyDown: (
|
|
1224
|
-
|
|
1230
|
+
onChange: (n) => s(n.target.value),
|
|
1231
|
+
onKeyDown: (n) => {
|
|
1232
|
+
n.ctrlKey && (n.key === "z" && d(), n.key === "y" && i());
|
|
1225
1233
|
},
|
|
1226
1234
|
value: a,
|
|
1227
1235
|
children: [
|
|
1228
1236
|
/* @__PURE__ */ e.jsx("option", { className: "bg-transparent", value: "" }),
|
|
1229
1237
|
I.Children.toArray(
|
|
1230
|
-
|
|
1238
|
+
l.map((n) => /* @__PURE__ */ e.jsx("option", { className: "bg-transparent", value: n, children: n }))
|
|
1231
1239
|
)
|
|
1232
1240
|
]
|
|
1233
1241
|
}
|
|
1234
1242
|
);
|
|
1235
1243
|
}
|
|
1236
|
-
const
|
|
1237
|
-
const { canReset: r, canChange:
|
|
1238
|
-
return /* @__PURE__ */ e.jsx("div", { className: "flex flex-row divide-x divide-solid divide-border rounded border border-border text-xs", children:
|
|
1244
|
+
const Kr = ({ property: t, onChange: s }) => {
|
|
1245
|
+
const { canReset: r, canChange: l } = re(se), o = le(t), a = N(() => u(o, "cls", ""), [o]), d = N(() => u(ge, `${t}.classes`, [""]), [t]), i = d.indexOf(a) > -1 ? d.indexOf(a) : 0, n = /\[.*\]/g.test(a);
|
|
1246
|
+
return /* @__PURE__ */ e.jsx("div", { className: "flex flex-row divide-x divide-solid divide-border rounded border border-border text-xs", children: n ? /* @__PURE__ */ e.jsx("div", { className: "py-[5px] px-2", children: a }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1239
1247
|
/* @__PURE__ */ e.jsx(
|
|
1240
1248
|
"button",
|
|
1241
1249
|
{
|
|
1242
1250
|
type: "button",
|
|
1243
1251
|
className: "box-border w-2/12 rounded-tl rounded-bl bg-background px-1 text-center hover:bg-bg-gray-700 disabled:cursor-not-allowed disabled:bg-gray-600",
|
|
1244
|
-
disabled: !
|
|
1245
|
-
onClick: () =>
|
|
1252
|
+
disabled: !l && (!r || i - 1 < 0),
|
|
1253
|
+
onClick: () => s(Ve(d, i - 1), t),
|
|
1246
1254
|
children: /* @__PURE__ */ e.jsx("span", { className: "flex items-center justify-center", children: /* @__PURE__ */ e.jsx(
|
|
1247
1255
|
Lt,
|
|
1248
1256
|
{
|
|
1249
|
-
className: !
|
|
1257
|
+
className: !l && (!r || i - 1 < 0) ? "text-gray-500" : "text-black/60 dark:text-white/60"
|
|
1250
1258
|
}
|
|
1251
1259
|
) })
|
|
1252
1260
|
}
|
|
1253
1261
|
),
|
|
1254
|
-
/* @__PURE__ */ e.jsx("div", { className: "w-8/12 text-center", children: /* @__PURE__ */ e.jsx(ot, { label: !1, property: t, onChange:
|
|
1262
|
+
/* @__PURE__ */ e.jsx("div", { className: "w-8/12 text-center", children: /* @__PURE__ */ e.jsx(ot, { label: !1, property: t, onChange: s }) }),
|
|
1255
1263
|
/* @__PURE__ */ e.jsx(
|
|
1256
1264
|
"button",
|
|
1257
1265
|
{
|
|
1258
1266
|
type: "button",
|
|
1259
1267
|
className: "w-2/12 rounded-tr rounded-br bg-background px-1 text-center hover:bg-bg-gray-700 disabled:cursor-not-allowed disabled:bg-gray-600",
|
|
1260
|
-
disabled: !
|
|
1261
|
-
onClick: () =>
|
|
1268
|
+
disabled: !l && (!r || i + 1 >= d.length),
|
|
1269
|
+
onClick: () => s(Ve(d, i + 1), t),
|
|
1262
1270
|
children: /* @__PURE__ */ e.jsx("span", { className: "flex items-center justify-center", children: /* @__PURE__ */ e.jsx(
|
|
1263
|
-
|
|
1271
|
+
ke,
|
|
1264
1272
|
{
|
|
1265
|
-
className: !
|
|
1273
|
+
className: !l && (!r || i + 1 >= d.length) ? "text-gray-500" : "text-black/60 dark:text-white/60"
|
|
1266
1274
|
}
|
|
1267
1275
|
) })
|
|
1268
1276
|
}
|
|
1269
1277
|
)
|
|
1270
1278
|
] }) });
|
|
1271
|
-
},
|
|
1272
|
-
const r = N(() =>
|
|
1279
|
+
}, qr = ({ property: t, onChange: s }) => {
|
|
1280
|
+
const r = N(() => u(ge, `${t}.classes`, [""]), [t]), { canChange: l } = re(se), o = le(t), a = N(() => u(o, "cls", ""), [o]);
|
|
1273
1281
|
return /* @__PURE__ */ e.jsx("div", { className: "flex grow flex-wrap gap-1", children: C(r, (d) => /* @__PURE__ */ e.jsxs(W, { children: [
|
|
1274
1282
|
/* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
1275
1283
|
"button",
|
|
1276
1284
|
{
|
|
1277
1285
|
type: "button",
|
|
1278
|
-
disabled: !
|
|
1279
|
-
onClick: () =>
|
|
1286
|
+
disabled: !l,
|
|
1287
|
+
onClick: () => s(d, t),
|
|
1280
1288
|
className: `cursor-pointer rounded border border-gray-600 p-1 disabled:cursor-not-allowed ${a === d ? " bg-blue-500 text-white" : "disabled:bg-gray-600 disabled:text-gray-400"}`,
|
|
1281
|
-
children: I.createElement(
|
|
1289
|
+
children: I.createElement(u(lt, d, Xe))
|
|
1282
1290
|
}
|
|
1283
1291
|
) }),
|
|
1284
1292
|
/* @__PURE__ */ e.jsx(Z, { children: Y(te(d)) })
|
|
1285
1293
|
] })) });
|
|
1286
|
-
},
|
|
1294
|
+
}, Jr = {
|
|
1287
1295
|
backgroundColor: "bg",
|
|
1288
1296
|
textColor: "text",
|
|
1289
1297
|
borderColor: "border",
|
|
@@ -1295,38 +1303,38 @@ const Gr = ({ property: t, onChange: l }) => {
|
|
|
1295
1303
|
toColor: "to",
|
|
1296
1304
|
ringColor: "ring",
|
|
1297
1305
|
ringOffsetColor: "ring-offset"
|
|
1298
|
-
},
|
|
1299
|
-
const r =
|
|
1306
|
+
}, Qr = ({ property: t, onChange: s }) => {
|
|
1307
|
+
const r = le(t), l = N(() => u(r, "cls", ""), [r]), { canChange: o } = re(se), [a, d] = w([]), [i, n] = w({ color: "", shade: "" }), p = l.split("-"), g = u(p, "1", ""), c = u(p, "2", ""), m = A(
|
|
1300
1308
|
// eslint-disable-next-line no-shadow
|
|
1301
|
-
(
|
|
1302
|
-
["current", "inherit", "transparent", "black", "white"].includes(
|
|
1309
|
+
(x) => {
|
|
1310
|
+
["current", "inherit", "transparent", "black", "white"].includes(x) ? (d([]), n({ color: x })) : (d(["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"]), n((f) => ({ ...f, color: x, shade: f.shade ? f.shade : "500" })));
|
|
1303
1311
|
},
|
|
1304
|
-
[d,
|
|
1312
|
+
[d, n]
|
|
1305
1313
|
);
|
|
1306
1314
|
_(() => {
|
|
1307
|
-
if (["current", "inherit", "transparent", "black", "white"].includes(
|
|
1315
|
+
if (["current", "inherit", "transparent", "black", "white"].includes(g))
|
|
1308
1316
|
return d([]);
|
|
1309
1317
|
d(["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"]);
|
|
1310
|
-
}, [
|
|
1318
|
+
}, [g]);
|
|
1311
1319
|
const h = A(
|
|
1312
1320
|
// eslint-disable-next-line no-shadow
|
|
1313
|
-
(
|
|
1314
|
-
|
|
1321
|
+
(x) => {
|
|
1322
|
+
n({ color: g, shade: x });
|
|
1315
1323
|
},
|
|
1316
|
-
[
|
|
1324
|
+
[g]
|
|
1317
1325
|
);
|
|
1318
1326
|
return _(() => {
|
|
1319
|
-
|
|
1327
|
+
n({ color: "", shade: "" });
|
|
1320
1328
|
}, [r]), _(() => {
|
|
1321
|
-
const f = `${
|
|
1322
|
-
f.match(new RegExp(
|
|
1323
|
-
}, [i,
|
|
1329
|
+
const f = `${u(Jr, t, "")}-${i.color}${i.shade ? `-${i.shade}` : ""}`;
|
|
1330
|
+
f.match(new RegExp(u(ge, `${t}.regExp`, ""))) && s(f, t);
|
|
1331
|
+
}, [i, s, t]), /* @__PURE__ */ e.jsxs("div", { className: "flex flex-row divide-x divide-solid divide-border rounded-lg border border-border text-xs", children: [
|
|
1324
1332
|
/* @__PURE__ */ e.jsx("div", { className: "grow text-center", children: /* @__PURE__ */ e.jsx(
|
|
1325
|
-
|
|
1333
|
+
we,
|
|
1326
1334
|
{
|
|
1327
|
-
disabled: !
|
|
1335
|
+
disabled: !o,
|
|
1328
1336
|
rounded: !0,
|
|
1329
|
-
selected:
|
|
1337
|
+
selected: g,
|
|
1330
1338
|
onChange: m,
|
|
1331
1339
|
options: [
|
|
1332
1340
|
"current",
|
|
@@ -1360,20 +1368,20 @@ const Gr = ({ property: t, onChange: l }) => {
|
|
|
1360
1368
|
]
|
|
1361
1369
|
}
|
|
1362
1370
|
) }),
|
|
1363
|
-
/* @__PURE__ */ e.jsx("button", { type: "button", className: "grow text-center", children: /* @__PURE__ */ e.jsx(
|
|
1371
|
+
/* @__PURE__ */ e.jsx("button", { type: "button", className: "grow text-center", children: /* @__PURE__ */ e.jsx(we, { rounded: !0, selected: c, disabled: !g || !o, onChange: h, options: a }) })
|
|
1364
1372
|
] });
|
|
1365
|
-
}, $e = (t,
|
|
1373
|
+
}, $e = (t, s) => {
|
|
1366
1374
|
t = t.toLowerCase();
|
|
1367
1375
|
let r = t.trim().replace(/ |\+/g, "");
|
|
1368
|
-
if ((r === "auto" || r === "none") &&
|
|
1376
|
+
if ((r === "auto" || r === "none") && s.includes(r))
|
|
1369
1377
|
return { value: "", unit: r };
|
|
1370
|
-
const
|
|
1371
|
-
r = r.replace(
|
|
1372
|
-
const
|
|
1373
|
-
return a || d ? { error: "Invalid value" } :
|
|
1378
|
+
const l = s.length ? new RegExp(s.join("|"), "g") : /XXXXXX/g;
|
|
1379
|
+
r = r.replace(l, "");
|
|
1380
|
+
const o = t.match(l), a = o && o.length > 1, d = !b(r) && Number.isNaN(Number(r));
|
|
1381
|
+
return a || d ? { error: "Invalid value" } : o && (o[0] === "auto" || o[0] === "none") ? { value: o[0], unit: "" } : { value: r, unit: o ? o[0] : "" };
|
|
1374
1382
|
};
|
|
1375
|
-
const
|
|
1376
|
-
const
|
|
1383
|
+
const es = (t) => {
|
|
1384
|
+
const s = t.startsWith("-") ? "-" : "", r = t.split("-").pop();
|
|
1377
1385
|
if (["auto", "none"].includes(r))
|
|
1378
1386
|
return { value: "", unit: r };
|
|
1379
1387
|
if (r === "px")
|
|
@@ -1383,21 +1391,21 @@ const Qr = (t) => {
|
|
|
1383
1391
|
if (r === "full")
|
|
1384
1392
|
return { value: "100", unit: "%" };
|
|
1385
1393
|
if (M(t, "skew-"))
|
|
1386
|
-
return { value: `${
|
|
1394
|
+
return { value: `${s}${r}`, unit: "deg" };
|
|
1387
1395
|
if (M(t, "rotate-"))
|
|
1388
|
-
return { value: `${
|
|
1396
|
+
return { value: `${s}${r}`, unit: "deg" };
|
|
1389
1397
|
if (M(t, "opacity-"))
|
|
1390
1398
|
return { value: `${r / 100}`, unit: "-" };
|
|
1391
1399
|
if (M(t, "duration-") || M(t, "delay-"))
|
|
1392
1400
|
return { value: `${r}`, unit: "ms" };
|
|
1393
1401
|
if (M(t, "translate-") && !r.includes("/"))
|
|
1394
|
-
return { value: `${
|
|
1402
|
+
return { value: `${s}${`${r / 4}`}`, unit: "rem" };
|
|
1395
1403
|
if (M(t, "scale-"))
|
|
1396
|
-
return { value: `${
|
|
1404
|
+
return { value: `${s}${`${r / 100}`}`, unit: "-" };
|
|
1397
1405
|
if (z(t, "border")) {
|
|
1398
|
-
const
|
|
1399
|
-
if (
|
|
1400
|
-
return { value:
|
|
1406
|
+
const l = t.match(/border-?(x|y|t|r|b|l)?\d+/g);
|
|
1407
|
+
if (l)
|
|
1408
|
+
return { value: l[0].split("-").pop(), unit: "px" };
|
|
1401
1409
|
if (t.match(/border-?(x|y|t|r|b|l)?/g))
|
|
1402
1410
|
return { value: "1", unit: "px" };
|
|
1403
1411
|
}
|
|
@@ -1496,28 +1504,28 @@ const Qr = (t) => {
|
|
|
1496
1504
|
if (["max", "min", "fit"].includes(r))
|
|
1497
1505
|
return { value: t, unit: "class" };
|
|
1498
1506
|
if (r.includes("/")) {
|
|
1499
|
-
const [
|
|
1500
|
-
return { value:
|
|
1507
|
+
const [l, o] = C(r.split("/"), (a) => parseInt(a, 10));
|
|
1508
|
+
return { value: s + (l / o * 100).toFixed(2).replace(".00", ""), unit: "%" };
|
|
1501
1509
|
}
|
|
1502
|
-
return ft(parseFloat(r)) ? { value: `${
|
|
1510
|
+
return ft(parseFloat(r)) ? { value: `${s + parseFloat(r) * 4}`, unit: "px" } : { value: r, unit: "class" };
|
|
1503
1511
|
};
|
|
1504
|
-
const
|
|
1512
|
+
const ts = (t) => {
|
|
1505
1513
|
if (b(t))
|
|
1506
1514
|
return { value: "", unit: "" };
|
|
1507
|
-
const
|
|
1508
|
-
if (
|
|
1509
|
-
return
|
|
1510
|
-
const r =
|
|
1511
|
-
return { value: `${
|
|
1512
|
-
},
|
|
1515
|
+
const s = t.match(/\[.*\]/g);
|
|
1516
|
+
if (s === null)
|
|
1517
|
+
return rs(t);
|
|
1518
|
+
const r = u(s, "0", "").replace(/\[|\]/g, ""), l = t.startsWith("-") ? "-" : "", o = pe(r.match(/\d+.\d+|\d+/g));
|
|
1519
|
+
return { value: `${l}${o}`, unit: r.replace(o, "") };
|
|
1520
|
+
}, rs = (t) => b(t) ? { value: "", unit: "" } : es(t), nt = I.createContext({
|
|
1513
1521
|
setDragData: () => {
|
|
1514
1522
|
}
|
|
1515
|
-
}),
|
|
1523
|
+
}), ss = ({
|
|
1516
1524
|
unit: t,
|
|
1517
|
-
currentValue:
|
|
1525
|
+
currentValue: s,
|
|
1518
1526
|
onDrag: r,
|
|
1519
|
-
onDragEnd:
|
|
1520
|
-
onDragStart:
|
|
1527
|
+
onDragEnd: l,
|
|
1528
|
+
onDragStart: o,
|
|
1521
1529
|
negative: a,
|
|
1522
1530
|
cssProperty: d
|
|
1523
1531
|
}) => {
|
|
@@ -1526,86 +1534,86 @@ const el = (t) => {
|
|
|
1526
1534
|
"button",
|
|
1527
1535
|
{
|
|
1528
1536
|
type: "button",
|
|
1529
|
-
onMouseDown: (
|
|
1530
|
-
const
|
|
1537
|
+
onMouseDown: (n) => {
|
|
1538
|
+
const p = {
|
|
1531
1539
|
onDrag: r,
|
|
1532
|
-
onDragEnd:
|
|
1540
|
+
onDragEnd: l,
|
|
1533
1541
|
dragging: !0,
|
|
1534
|
-
dragStartY:
|
|
1535
|
-
dragStartValue: `${
|
|
1542
|
+
dragStartY: n.pageY,
|
|
1543
|
+
dragStartValue: `${s}`,
|
|
1536
1544
|
dragUnit: t,
|
|
1537
1545
|
negative: a,
|
|
1538
1546
|
cssProperty: d
|
|
1539
1547
|
};
|
|
1540
|
-
|
|
1548
|
+
o(p), i(p);
|
|
1541
1549
|
},
|
|
1542
1550
|
color: void 0,
|
|
1543
1551
|
className: "relative z-50 ml-1 hidden h-6 cursor-row-resize rounded bg-background/70 px-2 group-hover:inline",
|
|
1544
1552
|
children: /* @__PURE__ */ e.jsx(Ot, {})
|
|
1545
1553
|
}
|
|
1546
1554
|
);
|
|
1547
|
-
},
|
|
1555
|
+
}, ls = ({ onSelect: t, current: s, units: r }) => /* @__PURE__ */ e.jsx("div", { "data-theme": "light", className: "-m-[7px] -mx-[13px] flex w-9 flex-col", children: r.map((l) => /* @__PURE__ */ e.jsx(
|
|
1548
1556
|
ue,
|
|
1549
1557
|
{
|
|
1550
1558
|
className: "h-max rounded-none px-1 py-1 text-right text-[11px] hover:bg-blue-400",
|
|
1551
|
-
color:
|
|
1559
|
+
color: s === l ? "primary" : void 0,
|
|
1552
1560
|
size: "sm",
|
|
1553
|
-
onClick: (
|
|
1554
|
-
|
|
1561
|
+
onClick: (o) => {
|
|
1562
|
+
o.stopPropagation(), t(l);
|
|
1555
1563
|
},
|
|
1556
|
-
children:
|
|
1564
|
+
children: l
|
|
1557
1565
|
},
|
|
1558
|
-
|
|
1559
|
-
)) }), Le = 50,
|
|
1560
|
-
const [
|
|
1566
|
+
l
|
|
1567
|
+
)) }), Le = 50, os = (t) => {
|
|
1568
|
+
const [s, r] = w(!1), [l, o] = w(""), { currentClass: a, onChange: d, classPrefix: i, cssProperty: n, units: p, negative: g } = t, [c, m] = w(n != null && n.toLowerCase().includes("width") ? "%" : p[0]), [h, x] = w(!1), [f, T] = w(""), [D, j] = w(!1), [L, P] = w(!1);
|
|
1561
1569
|
_(() => {
|
|
1562
|
-
const { value: y, unit: v } =
|
|
1570
|
+
const { value: y, unit: v } = ts(a);
|
|
1563
1571
|
if (v === "") {
|
|
1564
|
-
|
|
1572
|
+
o(y), m(n != null && n.toLowerCase().includes("width") ? "%" : pe(p));
|
|
1565
1573
|
return;
|
|
1566
1574
|
}
|
|
1567
|
-
m(v),
|
|
1568
|
-
}, [a,
|
|
1569
|
-
const k =
|
|
1575
|
+
m(v), o(v === "class" || b(y) ? "" : y);
|
|
1576
|
+
}, [a, n, p]);
|
|
1577
|
+
const k = be((y) => d(y), [d], Le), $ = be((y) => d(y, !1), [d], Le), F = A(
|
|
1570
1578
|
(y = !1) => {
|
|
1571
|
-
const v = $e(`${
|
|
1572
|
-
if (
|
|
1573
|
-
|
|
1579
|
+
const v = $e(`${l}`, p);
|
|
1580
|
+
if (u(v, "error", !1)) {
|
|
1581
|
+
x(!0);
|
|
1574
1582
|
return;
|
|
1575
1583
|
}
|
|
1576
|
-
const
|
|
1577
|
-
if (
|
|
1578
|
-
k(`${i}${
|
|
1584
|
+
const S = u(v, "unit") !== "" ? u(v, "unit") : c;
|
|
1585
|
+
if (S === "auto" || S === "none") {
|
|
1586
|
+
k(`${i}${S}`);
|
|
1579
1587
|
return;
|
|
1580
1588
|
}
|
|
1581
|
-
if (
|
|
1589
|
+
if (u(v, "value") === "")
|
|
1582
1590
|
return;
|
|
1583
|
-
const K = `${
|
|
1591
|
+
const K = `${u(v, "value", "").startsWith("-") ? "-" : ""}${i}[${u(v, "value", "").replace("-", "")}${S === "-" ? "" : S}]`;
|
|
1584
1592
|
y ? $(K) : k(K);
|
|
1585
1593
|
},
|
|
1586
|
-
[k, $,
|
|
1594
|
+
[k, $, l, c, i, p]
|
|
1587
1595
|
), oe = A(
|
|
1588
1596
|
(y) => {
|
|
1589
|
-
const v = $e(`${
|
|
1590
|
-
if (
|
|
1591
|
-
|
|
1597
|
+
const v = $e(`${l}`, p);
|
|
1598
|
+
if (u(v, "error", !1)) {
|
|
1599
|
+
x(!0);
|
|
1592
1600
|
return;
|
|
1593
1601
|
}
|
|
1594
1602
|
if (y === "auto" || y === "none") {
|
|
1595
1603
|
k(`${i}${y}`);
|
|
1596
1604
|
return;
|
|
1597
1605
|
}
|
|
1598
|
-
if (
|
|
1606
|
+
if (u(v, "value") === "")
|
|
1599
1607
|
return;
|
|
1600
|
-
const
|
|
1608
|
+
const S = u(v, "unit") !== "" ? u(v, "unit") : y, K = `${u(v, "value", "").startsWith("-") ? "-" : ""}${i}[${u(v, "value", "").replace("-", "")}${S === "-" ? "" : S}]`;
|
|
1601
1609
|
k(K);
|
|
1602
1610
|
},
|
|
1603
|
-
[k,
|
|
1611
|
+
[k, l, i, p]
|
|
1604
1612
|
);
|
|
1605
1613
|
return /* @__PURE__ */ e.jsx("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-start", children: c === "class" ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1606
1614
|
/* @__PURE__ */ e.jsx("input", { className: "w-20 rounded py-1", readOnly: !0, value: a }),
|
|
1607
1615
|
/* @__PURE__ */ e.jsxs(W, { children: [
|
|
1608
|
-
/* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsx("button", { type: "button", className: "invisible ml-3 mt-1 text-blue-600 group-hover:visible", children: /* @__PURE__ */ e.jsx(
|
|
1616
|
+
/* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsx("button", { type: "button", className: "invisible ml-3 mt-1 text-blue-600 group-hover:visible", children: /* @__PURE__ */ e.jsx(Ne, {}) }) }),
|
|
1609
1617
|
/* @__PURE__ */ e.jsx(Z, { children: "Current value is using a Tailwind preset class." })
|
|
1610
1618
|
] })
|
|
1611
1619
|
] }) : /* @__PURE__ */ e.jsxs("div", { className: `group relative flex items-center ${D ? "z-auto" : ""}`, children: [
|
|
@@ -1622,9 +1630,9 @@ const el = (t) => {
|
|
|
1622
1630
|
return;
|
|
1623
1631
|
y.preventDefault(), P(!0);
|
|
1624
1632
|
const v = vt(y.target.value);
|
|
1625
|
-
let
|
|
1626
|
-
y.keyCode === 38 && (
|
|
1627
|
-
const E = `${
|
|
1633
|
+
let S = _e(v) ? 0 : v;
|
|
1634
|
+
y.keyCode === 38 && (S += 1), y.keyCode === 40 && (S -= 1);
|
|
1635
|
+
const E = `${S}`, it = `${E.startsWith("-") ? "-" : ""}${i}[${E.replace("-", "")}${c === "-" ? "" : c}]`;
|
|
1628
1636
|
$(it);
|
|
1629
1637
|
},
|
|
1630
1638
|
onKeyUp: (y) => {
|
|
@@ -1632,36 +1640,36 @@ const el = (t) => {
|
|
|
1632
1640
|
},
|
|
1633
1641
|
onBlur: () => F(),
|
|
1634
1642
|
onChange: (y) => {
|
|
1635
|
-
|
|
1643
|
+
x(!1), o(y.target.value);
|
|
1636
1644
|
},
|
|
1637
1645
|
onClick: (y) => {
|
|
1638
1646
|
var v;
|
|
1639
1647
|
(v = y == null ? void 0 : y.target) == null || v.select(), r(!1);
|
|
1640
1648
|
},
|
|
1641
|
-
value: D ? f :
|
|
1649
|
+
value: D ? f : l,
|
|
1642
1650
|
className: "h-6 w-14 rounded rounded-r-none bg-background pl-2 text-sm focus-visible:outline-0 ".concat(
|
|
1643
1651
|
" ",
|
|
1644
1652
|
h ? "border-red-500 text-red-500" : "border-foreground/20"
|
|
1645
1653
|
)
|
|
1646
1654
|
}
|
|
1647
1655
|
),
|
|
1648
|
-
/* @__PURE__ */ e.jsxs(W, { open:
|
|
1656
|
+
/* @__PURE__ */ e.jsxs(W, { open: s, delayDuration: 100, children: [
|
|
1649
1657
|
/* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
1650
1658
|
"button",
|
|
1651
1659
|
{
|
|
1652
1660
|
type: "button",
|
|
1653
|
-
onClick: () => r(!
|
|
1661
|
+
onClick: () => r(!s),
|
|
1654
1662
|
className: "flex h-6 cursor-pointer items-center gap-x-1 rounded rounded-l-none bg-background p-px px-1 text-[11px] uppercase",
|
|
1655
1663
|
children: [
|
|
1656
|
-
/* @__PURE__ */ e.jsx("span", { className: `inline-block ${
|
|
1657
|
-
|
|
1664
|
+
/* @__PURE__ */ e.jsx("span", { className: `inline-block ${p.length === 1 ? "px-2 font-semibold" : ""}`, children: c }),
|
|
1665
|
+
p.length > 1 ? /* @__PURE__ */ e.jsx(Mt, {}) : null
|
|
1658
1666
|
]
|
|
1659
1667
|
}
|
|
1660
1668
|
) }),
|
|
1661
|
-
/* @__PURE__ */ e.jsx(
|
|
1662
|
-
|
|
1669
|
+
/* @__PURE__ */ e.jsx(xr, { children: /* @__PURE__ */ e.jsx(Z, { className: "bg-background", children: /* @__PURE__ */ e.jsx(
|
|
1670
|
+
ls,
|
|
1663
1671
|
{
|
|
1664
|
-
units:
|
|
1672
|
+
units: p,
|
|
1665
1673
|
current: c,
|
|
1666
1674
|
onSelect: (y) => {
|
|
1667
1675
|
r(!1), m(y), oe(y);
|
|
@@ -1671,7 +1679,7 @@ const el = (t) => {
|
|
|
1671
1679
|
] })
|
|
1672
1680
|
] }),
|
|
1673
1681
|
["none", "auto"].indexOf(c) !== -1 || D ? null : /* @__PURE__ */ e.jsx(
|
|
1674
|
-
|
|
1682
|
+
ss,
|
|
1675
1683
|
{
|
|
1676
1684
|
onDragStart: () => j(!0),
|
|
1677
1685
|
onDragEnd: (y) => {
|
|
@@ -1687,17 +1695,17 @@ const el = (t) => {
|
|
|
1687
1695
|
const v = `${y}`, E = `${v.startsWith("-") ? "-" : ""}${i}[${v.replace("-", "")}${c === "-" ? "" : c}]`;
|
|
1688
1696
|
$(E);
|
|
1689
1697
|
},
|
|
1690
|
-
currentValue:
|
|
1698
|
+
currentValue: l,
|
|
1691
1699
|
unit: c,
|
|
1692
|
-
negative:
|
|
1693
|
-
cssProperty:
|
|
1700
|
+
negative: g,
|
|
1701
|
+
cssProperty: n
|
|
1694
1702
|
}
|
|
1695
1703
|
)
|
|
1696
1704
|
] }) }) });
|
|
1697
|
-
},
|
|
1698
|
-
const
|
|
1699
|
-
return jt(
|
|
1700
|
-
},
|
|
1705
|
+
}, le = (t) => {
|
|
1706
|
+
const s = xe();
|
|
1707
|
+
return jt(s, { property: t });
|
|
1708
|
+
}, ns = (t, s) => {
|
|
1701
1709
|
const r = {
|
|
1702
1710
|
xs: 0,
|
|
1703
1711
|
sm: 1,
|
|
@@ -1706,8 +1714,8 @@ const el = (t) => {
|
|
|
1706
1714
|
xl: 4,
|
|
1707
1715
|
"2xl": 5
|
|
1708
1716
|
};
|
|
1709
|
-
return r[
|
|
1710
|
-
},
|
|
1717
|
+
return r[u(t, "mq", "xs")] <= r[s];
|
|
1718
|
+
}, as = {
|
|
1711
1719
|
width: "w-",
|
|
1712
1720
|
height: "h-",
|
|
1713
1721
|
minWidth: "min-w-",
|
|
@@ -1780,23 +1788,23 @@ const el = (t) => {
|
|
|
1780
1788
|
lg: "1024px",
|
|
1781
1789
|
xl: "1280px",
|
|
1782
1790
|
"2xl": "1536px"
|
|
1783
|
-
},
|
|
1784
|
-
const { type:
|
|
1785
|
-
}, units: a, negative: d = !1 } = t, [i] =
|
|
1791
|
+
}, is = (t) => `${t.toUpperCase()} ${Oe[t] ? `(${Oe[t]} & up)` : ""}`, Re = (t) => {
|
|
1792
|
+
const { type: s = "icons", label: r, property: l, onEmitChange: o = () => {
|
|
1793
|
+
}, units: a, negative: d = !1 } = t, [i] = gr(), [n] = Qe(), [, p] = Be(), g = le(l), c = Ke(), m = qe(), [h] = Je(), x = N(() => u(g, "fullCls", ""), [g]), f = A(
|
|
1786
1794
|
(k, $ = !0) => {
|
|
1787
|
-
const F = { dark: i, mq:
|
|
1788
|
-
(i ||
|
|
1789
|
-
const oe =
|
|
1795
|
+
const F = { dark: i, mq: p, mod: n, cls: k, property: l, fullCls: "" };
|
|
1796
|
+
(i || n !== "") && (F.mq = "xs");
|
|
1797
|
+
const oe = $r(F);
|
|
1790
1798
|
c(h, [oe], $);
|
|
1791
1799
|
},
|
|
1792
|
-
[h, i,
|
|
1800
|
+
[h, i, p, n, l, c]
|
|
1793
1801
|
), T = A(() => {
|
|
1794
|
-
m(h, [
|
|
1795
|
-
}, [h,
|
|
1802
|
+
m(h, [x]);
|
|
1803
|
+
}, [h, x, m]), D = N(() => ns(g, p), [g, p]);
|
|
1796
1804
|
_(() => {
|
|
1797
|
-
|
|
1798
|
-
}, [D,
|
|
1799
|
-
const [, , j] =
|
|
1805
|
+
o(D, g);
|
|
1806
|
+
}, [D, o, g]);
|
|
1807
|
+
const [, , j] = Be(), L = A(
|
|
1800
1808
|
(k) => {
|
|
1801
1809
|
j({
|
|
1802
1810
|
xs: 400,
|
|
@@ -1808,52 +1816,52 @@ const el = (t) => {
|
|
|
1808
1816
|
}[k]);
|
|
1809
1817
|
},
|
|
1810
1818
|
[j]
|
|
1811
|
-
), P =
|
|
1812
|
-
return /* @__PURE__ */ e.jsx(
|
|
1813
|
-
/* @__PURE__ */ e.jsx("div", { className: "relative w-[70px] truncate text-xs text-foreground", children: /* @__PURE__ */ e.jsx("span", { className: `text-[11px] ${
|
|
1819
|
+
), P = u(g, "dark", null) === i && u(g, "mod", null) === n && u(g, "mq", null) === p;
|
|
1820
|
+
return /* @__PURE__ */ e.jsx(Gr, { canChange: D, canReset: g && P, children: /* @__PURE__ */ e.jsxs("div", { className: "group flex flex-row items-center py-2 first:pt-0 last:pb-0", children: [
|
|
1821
|
+
/* @__PURE__ */ e.jsx("div", { className: "relative w-[70px] truncate text-xs text-foreground", children: /* @__PURE__ */ e.jsx("span", { className: `text-[11px] ${g && !P ? "text-foreground" : ""}`, children: r }) }),
|
|
1814
1822
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-row items-center", children: [
|
|
1815
1823
|
/* @__PURE__ */ e.jsxs("div", { className: "w-[150px]", children: [
|
|
1816
|
-
|
|
1817
|
-
|
|
1824
|
+
s === "arbitrary" ? /* @__PURE__ */ e.jsx(
|
|
1825
|
+
os,
|
|
1818
1826
|
{
|
|
1819
|
-
currentClass:
|
|
1820
|
-
classPrefix:
|
|
1827
|
+
currentClass: u(g, "cls", ""),
|
|
1828
|
+
classPrefix: u(as, l, ""),
|
|
1821
1829
|
units: a || [],
|
|
1822
1830
|
onChange: f,
|
|
1823
1831
|
negative: d,
|
|
1824
|
-
cssProperty:
|
|
1832
|
+
cssProperty: l
|
|
1825
1833
|
}
|
|
1826
1834
|
) : null,
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1835
|
+
s === "icons" && /* @__PURE__ */ e.jsx(qr, { property: l, onChange: f }),
|
|
1836
|
+
s === "range" && /* @__PURE__ */ e.jsx(Kr, { property: l, onChange: f }),
|
|
1837
|
+
s === "color" && /* @__PURE__ */ e.jsx(Qr, { property: l, onChange: f }),
|
|
1838
|
+
s === "dropdown" && /* @__PURE__ */ e.jsx(ot, { label: r, property: l, onChange: f })
|
|
1831
1839
|
] }),
|
|
1832
|
-
/* @__PURE__ */ e.jsx("div", { className: `w-[30px] cursor-pointer ${
|
|
1840
|
+
/* @__PURE__ */ e.jsx("div", { className: `w-[30px] cursor-pointer ${x ? "visible" : "invisible"}`, children: P ? /* @__PURE__ */ e.jsx("button", { type: "button", onClick: () => T(), title: "Reset", className: "flex px-1.5 text-xs", children: /* @__PURE__ */ e.jsx(Et, { className: "h-5 w-5 text-blue-500 hover:opacity-80" }) }) : D && g ? /* @__PURE__ */ e.jsxs(W, { delayDuration: 100, children: [
|
|
1833
1841
|
/* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
1834
1842
|
"button",
|
|
1835
1843
|
{
|
|
1836
1844
|
type: "button",
|
|
1837
1845
|
className: "invisible ml-3 mt-1 rounded-full bg-blue-500 text-white group-hover:visible",
|
|
1838
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1846
|
+
children: /* @__PURE__ */ e.jsx(Ne, {})
|
|
1839
1847
|
}
|
|
1840
1848
|
) }),
|
|
1841
1849
|
/* @__PURE__ */ e.jsx(Z, { children: /* @__PURE__ */ e.jsx("div", { className: "text-right", children: /* @__PURE__ */ e.jsxs("div", { children: [
|
|
1842
1850
|
"Current style is set at ",
|
|
1843
1851
|
/* @__PURE__ */ e.jsxs("span", { className: "font-bold ", children: [
|
|
1844
|
-
|
|
1845
|
-
i && !
|
|
1852
|
+
is(u(g, "mq")),
|
|
1853
|
+
i && !g.dark ? "(Light mode)" : ""
|
|
1846
1854
|
] }),
|
|
1847
1855
|
/* @__PURE__ */ e.jsx("br", {}),
|
|
1848
1856
|
/* @__PURE__ */ e.jsxs(
|
|
1849
1857
|
"button",
|
|
1850
1858
|
{
|
|
1851
1859
|
type: "button",
|
|
1852
|
-
onClick: () => L(
|
|
1860
|
+
onClick: () => L(u(g, "mq")),
|
|
1853
1861
|
className: "block w-full cursor-default text-right font-semibold text-blue-500",
|
|
1854
1862
|
children: [
|
|
1855
1863
|
"Switch to ",
|
|
1856
|
-
|
|
1864
|
+
u(g, "mq").toUpperCase()
|
|
1857
1865
|
]
|
|
1858
1866
|
}
|
|
1859
1867
|
)
|
|
@@ -1861,36 +1869,36 @@ const el = (t) => {
|
|
|
1861
1869
|
] }) : null })
|
|
1862
1870
|
] })
|
|
1863
1871
|
] }) });
|
|
1864
|
-
},
|
|
1872
|
+
}, ds = ["px", "%", "em", "rem", "ch", "vh", "vw"], at = ({
|
|
1865
1873
|
label: t,
|
|
1866
|
-
options:
|
|
1874
|
+
options: s,
|
|
1867
1875
|
borderB: r = !1,
|
|
1868
|
-
borderT:
|
|
1869
|
-
type:
|
|
1870
|
-
units: a =
|
|
1876
|
+
borderT: l = !1,
|
|
1877
|
+
type: o = "arbitrary",
|
|
1878
|
+
units: a = ds,
|
|
1871
1879
|
negative: d = !1
|
|
1872
1880
|
}) => {
|
|
1873
|
-
const [i,
|
|
1881
|
+
const [i, n] = w(s[0].key), p = xe(), g = A((c) => C(p, "property").includes(c), [p]);
|
|
1874
1882
|
return /* @__PURE__ */ e.jsxs(
|
|
1875
1883
|
"div",
|
|
1876
1884
|
{
|
|
1877
|
-
className: `mb-2 border-gray-800 py-2 first:pt-0 last:pb-0 ${r ? "border-b" : ""} ${
|
|
1885
|
+
className: `mb-2 border-gray-800 py-2 first:pt-0 last:pb-0 ${r ? "border-b" : ""} ${l ? "border-t" : ""}`,
|
|
1878
1886
|
children: [
|
|
1879
1887
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-row text-xs", children: [
|
|
1880
1888
|
t && /* @__PURE__ */ e.jsx("span", { className: "relative w-[70px] flex-none text-xs text-foreground", children: t }),
|
|
1881
1889
|
/* @__PURE__ */ e.jsx("div", { className: "mb-3 flex grow flex-row flex-wrap gap-x-px", children: I.Children.toArray(
|
|
1882
|
-
|
|
1890
|
+
s.map(({ label: c, key: m }) => /* @__PURE__ */ e.jsx("div", { className: "first:rounded-l last:rounded-r", children: /* @__PURE__ */ e.jsxs(W, { children: [
|
|
1883
1891
|
/* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
1884
1892
|
"button",
|
|
1885
1893
|
{
|
|
1886
1894
|
type: "button",
|
|
1887
|
-
onClick: () =>
|
|
1895
|
+
onClick: () => n(m),
|
|
1888
1896
|
className: `relative cursor-pointer rounded-full p-1 text-[8px] ${m === i ? " bg-[#3E57F0] text-white" : "text-gray-600 dark:text-gray-300"}`,
|
|
1889
1897
|
children: [
|
|
1890
1898
|
I.createElement("div", {
|
|
1891
|
-
className:
|
|
1899
|
+
className: g(m) ? "-bottom-1.5 absolute bg-[#3E57F0] h-[2px] left-0 w-full" : ""
|
|
1892
1900
|
}),
|
|
1893
|
-
I.createElement(
|
|
1901
|
+
I.createElement(u(lt, m, Xe), { className: "text-inherit w-3 h-3" })
|
|
1894
1902
|
]
|
|
1895
1903
|
}
|
|
1896
1904
|
) }),
|
|
@@ -1901,7 +1909,7 @@ const el = (t) => {
|
|
|
1901
1909
|
/* @__PURE__ */ e.jsx("div", { className: "mt-0 flex items-center", children: /* @__PURE__ */ e.jsx(
|
|
1902
1910
|
Re,
|
|
1903
1911
|
{
|
|
1904
|
-
type:
|
|
1912
|
+
type: o,
|
|
1905
1913
|
units: [...a],
|
|
1906
1914
|
label: "",
|
|
1907
1915
|
property: i,
|
|
@@ -1911,73 +1919,73 @@ const el = (t) => {
|
|
|
1911
1919
|
]
|
|
1912
1920
|
}
|
|
1913
1921
|
);
|
|
1914
|
-
},
|
|
1915
|
-
const r = xe(),
|
|
1916
|
-
const
|
|
1917
|
-
i.map((
|
|
1922
|
+
}, cs = ({ heading: t, items: s }) => {
|
|
1923
|
+
const r = xe(), l = N(() => {
|
|
1924
|
+
const o = (i) => U(
|
|
1925
|
+
i.map((n) => n.styleType === "multiple" ? C(n.options, "key") : n.property)
|
|
1918
1926
|
), a = U(
|
|
1919
|
-
|
|
1927
|
+
s.map((i) => i.styleType === "accordion" ? o(i.items) : i.styleType === "multiple" ? C(i.options, "key") : i.property)
|
|
1920
1928
|
), d = C(r, "property");
|
|
1921
1929
|
return Fe(a, d).length > 0;
|
|
1922
|
-
}, [r,
|
|
1930
|
+
}, [r, s]);
|
|
1923
1931
|
return /* @__PURE__ */ e.jsxs("details", { children: [
|
|
1924
1932
|
/* @__PURE__ */ e.jsx("summary", { className: "my-px cursor-default rounded-md bg-background p-px px-2 text-[11px] text-foreground", children: /* @__PURE__ */ e.jsxs("div", { className: "inline", children: [
|
|
1925
1933
|
t,
|
|
1926
|
-
|
|
1934
|
+
l ? /* @__PURE__ */ e.jsx(
|
|
1927
1935
|
"span",
|
|
1928
1936
|
{
|
|
1929
|
-
className: `ml-1 mr-2 inline-block h-[8px] w-[8px] rounded-full ${
|
|
1937
|
+
className: `ml-1 mr-2 inline-block h-[8px] w-[8px] rounded-full ${l ? "bg-blue-500" : "bg-gray-300"}`
|
|
1930
1938
|
}
|
|
1931
1939
|
) : null
|
|
1932
1940
|
] }) }),
|
|
1933
|
-
/* @__PURE__ */ e.jsx("div", { className: "p-2", children:
|
|
1941
|
+
/* @__PURE__ */ e.jsx("div", { className: "p-2", children: s.map((o) => o.styleType === "multiple" ? /* @__PURE__ */ e.jsx(at, { ...o }, o.label) : /* @__PURE__ */ e.jsx(Re, { ...o }, o.label)) })
|
|
1934
1942
|
] });
|
|
1935
|
-
},
|
|
1936
|
-
const
|
|
1943
|
+
}, ps = Me({}), ye = ({ section: t }) => {
|
|
1944
|
+
const s = xe(), r = A(
|
|
1937
1945
|
(a = []) => {
|
|
1938
1946
|
const d = {};
|
|
1939
|
-
for (let
|
|
1940
|
-
d[
|
|
1947
|
+
for (let n = 0; n < s.length; n++)
|
|
1948
|
+
d[s[n].property] = s[n].cls;
|
|
1941
1949
|
let i = !0;
|
|
1942
|
-
for (const
|
|
1943
|
-
if (!he(d,
|
|
1950
|
+
for (const n in a)
|
|
1951
|
+
if (!he(d, n) || d[n] !== a[n]) {
|
|
1944
1952
|
i = !1;
|
|
1945
1953
|
break;
|
|
1946
1954
|
}
|
|
1947
1955
|
return i;
|
|
1948
1956
|
},
|
|
1949
|
-
[
|
|
1950
|
-
),
|
|
1951
|
-
if (
|
|
1957
|
+
[s]
|
|
1958
|
+
), l = N(() => {
|
|
1959
|
+
if (s.length > 0 && t.heading === "Classes")
|
|
1952
1960
|
return !0;
|
|
1953
|
-
const a = (
|
|
1954
|
-
|
|
1961
|
+
const a = (n) => U(
|
|
1962
|
+
n.map((p) => p.styleType === "multiple" ? U(C(p.options, "key")) : p.property)
|
|
1955
1963
|
), d = U(
|
|
1956
|
-
t.items.map((
|
|
1957
|
-
), i = C(
|
|
1964
|
+
t.items.map((n) => n.styleType === "accordion" ? a(n.items) : n.styleType === "multiple" ? U(C(n.options, "key")) : n.property)
|
|
1965
|
+
), i = C(s, "property");
|
|
1958
1966
|
return Fe(d, i).length > 0;
|
|
1959
|
-
}, [
|
|
1960
|
-
return /* @__PURE__ */ e.jsx(
|
|
1967
|
+
}, [s, t.heading, t.items]), o = N(() => ({}), []);
|
|
1968
|
+
return /* @__PURE__ */ e.jsx(ps.Provider, { value: o, children: /* @__PURE__ */ e.jsxs(ie, { value: t.heading, children: [
|
|
1961
1969
|
/* @__PURE__ */ e.jsx(de, { className: "px-3 py-2 text-xs hover:no-underline", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
|
|
1962
|
-
/* @__PURE__ */ e.jsx("div", { className: `h-[8px] w-[8px] rounded-full ${
|
|
1970
|
+
/* @__PURE__ */ e.jsx("div", { className: `h-[8px] w-[8px] rounded-full ${l ? "bg-blue-500" : "bg-gray-300"}` }),
|
|
1963
1971
|
t.heading
|
|
1964
1972
|
] }) }),
|
|
1965
1973
|
/* @__PURE__ */ e.jsx(ce, { className: "bg-gray-100 px-3.5 py-2", children: I.Children.toArray(
|
|
1966
|
-
t.items.map((a) => he(a, "component") ? I.createElement(a.component, { key: a.label }) : he(a, "styleType") ? a.styleType === "multiple" ? /* @__PURE__ */ e.jsx(at, { ...a }, a.label) : a.styleType === "accordion" && r(a == null ? void 0 : a.conditions) ? /* @__PURE__ */ e.jsx(
|
|
1974
|
+
t.items.map((a) => he(a, "component") ? I.createElement(a.component, { key: a.label }) : he(a, "styleType") ? a.styleType === "multiple" ? /* @__PURE__ */ e.jsx(at, { ...a }, a.label) : a.styleType === "accordion" && r(a == null ? void 0 : a.conditions) ? /* @__PURE__ */ e.jsx(cs, { ...a }, a.label) : null : /* @__PURE__ */ e.jsx(Re, { ...a }, a.label))
|
|
1967
1975
|
) })
|
|
1968
1976
|
] }) });
|
|
1969
|
-
},
|
|
1977
|
+
}, us = ({
|
|
1970
1978
|
item: t,
|
|
1971
|
-
index:
|
|
1979
|
+
index: s,
|
|
1972
1980
|
canDelete: r,
|
|
1973
|
-
onChange:
|
|
1974
|
-
onRemove:
|
|
1981
|
+
onChange: l,
|
|
1982
|
+
onRemove: o
|
|
1975
1983
|
}) => /* @__PURE__ */ e.jsxs("div", { className: `flex flex-col gap-1 border-gray-400 py-2 ${r ? "border-b" : ""}`, children: [
|
|
1976
1984
|
/* @__PURE__ */ e.jsx(
|
|
1977
1985
|
"input",
|
|
1978
1986
|
{
|
|
1979
1987
|
name: "key",
|
|
1980
|
-
onChange: (a) =>
|
|
1988
|
+
onChange: (a) => l(a, s),
|
|
1981
1989
|
value: t.key,
|
|
1982
1990
|
placeholder: "Key",
|
|
1983
1991
|
className: "w-full rounded border-gray-300 bg-background p-0.5 pl-2 text-sm focus-visible:outline-0",
|
|
@@ -1990,7 +1998,7 @@ const el = (t) => {
|
|
|
1990
1998
|
"input",
|
|
1991
1999
|
{
|
|
1992
2000
|
name: "value",
|
|
1993
|
-
onChange: (a) => b(t.key) ? {} :
|
|
2001
|
+
onChange: (a) => b(t.key) ? {} : l(a, s),
|
|
1994
2002
|
value: t.value,
|
|
1995
2003
|
placeholder: "Value",
|
|
1996
2004
|
className: "w-full rounded border-gray-300 bg-background p-0.5 pl-2 text-sm focus-visible:outline-0",
|
|
@@ -2001,74 +2009,74 @@ const el = (t) => {
|
|
|
2001
2009
|
/* @__PURE__ */ e.jsx(
|
|
2002
2010
|
_t,
|
|
2003
2011
|
{
|
|
2004
|
-
onClick:
|
|
2012
|
+
onClick: o,
|
|
2005
2013
|
className: "h-6 w-6 cursor-pointer rounded border border-red-400 p-1 text-red-400 hover:opacity-80"
|
|
2006
2014
|
}
|
|
2007
2015
|
)
|
|
2008
2016
|
] })
|
|
2009
|
-
] }),
|
|
2017
|
+
] }), xs = ({ section: t }) => {
|
|
2010
2018
|
var m;
|
|
2011
|
-
const { setSyncState:
|
|
2019
|
+
const { setSyncState: s } = hr(), r = G(), [l, o] = w([]), [a] = Te(), d = Ue(), i = `${u(a, "0.prop")}_attrs`;
|
|
2012
2020
|
ne.useEffect(() => {
|
|
2013
|
-
const h = C(
|
|
2014
|
-
b(h) ?
|
|
2015
|
-
}, [
|
|
2016
|
-
const
|
|
2017
|
-
const
|
|
2018
|
-
c(
|
|
2019
|
-
},
|
|
2020
|
-
const f = [...
|
|
2021
|
-
f[
|
|
2021
|
+
const h = C(u(r, i), (x, f) => ({ key: f, value: x }));
|
|
2022
|
+
b(h) ? o([]) : o(h);
|
|
2023
|
+
}, [u(r, i)]);
|
|
2024
|
+
const n = () => o([...l, { key: "", value: "" }]), p = (h) => {
|
|
2025
|
+
const x = ve(l, (f, T) => h !== T);
|
|
2026
|
+
c(x);
|
|
2027
|
+
}, g = (h, x) => {
|
|
2028
|
+
const f = [...l];
|
|
2029
|
+
f[x][h.target.name] = h.target.value, c(f);
|
|
2022
2030
|
}, c = ne.useCallback(
|
|
2023
2031
|
(h = []) => {
|
|
2024
|
-
const
|
|
2025
|
-
|
|
2026
|
-
b(f.key) || Ee(
|
|
2027
|
-
}), d([
|
|
2032
|
+
const x = {};
|
|
2033
|
+
Ce(h, (f) => {
|
|
2034
|
+
b(f.key) || Ee(x, f.key, f.value);
|
|
2035
|
+
}), d([u(r, "_id")], { [i]: x }), s("UNSAVED");
|
|
2028
2036
|
},
|
|
2029
|
-
[r,
|
|
2037
|
+
[r, s, d, i]
|
|
2030
2038
|
);
|
|
2031
2039
|
return /* @__PURE__ */ e.jsxs(ie, { value: t.heading, children: [
|
|
2032
2040
|
/* @__PURE__ */ e.jsx(de, { className: "px-3 py-2 text-xs hover:no-underline", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
|
|
2033
2041
|
/* @__PURE__ */ e.jsx(
|
|
2034
2042
|
"div",
|
|
2035
2043
|
{
|
|
2036
|
-
className: `h-[8px] w-[8px] rounded-full ${b(
|
|
2044
|
+
className: `h-[8px] w-[8px] rounded-full ${b(u(r, i)) ? "bg-gray-300" : "bg-blue-500"}`
|
|
2037
2045
|
}
|
|
2038
2046
|
),
|
|
2039
2047
|
"Attributes"
|
|
2040
2048
|
] }) }),
|
|
2041
2049
|
/* @__PURE__ */ e.jsx(ce, { className: "bg-gray-100 px-3.5 py-2", children: /* @__PURE__ */ e.jsxs("div", { className: "no-scrollbar flex min-h-max flex-col gap-y-2 overflow-y-auto bg-gray-100 p-px", children: [
|
|
2042
|
-
/* @__PURE__ */ e.jsxs(
|
|
2050
|
+
/* @__PURE__ */ e.jsxs(Se, { className: "mt-2 flex w-full items-center justify-between", children: [
|
|
2043
2051
|
"Add Custom attributes",
|
|
2044
2052
|
/* @__PURE__ */ e.jsxs(
|
|
2045
2053
|
"div",
|
|
2046
2054
|
{
|
|
2047
|
-
className: `flex h-6 w-max items-center justify-center gap-x-0.5 rounded-full border p-1 px-2 text-xs ${!b(
|
|
2055
|
+
className: `flex h-6 w-max items-center justify-center gap-x-0.5 rounded-full border p-1 px-2 text-xs ${!b(l) && b((m = fe(l)) == null ? void 0 : m.key) ? "cursor-not-allowed border-gray-400 text-gray-400" : "cursor-pointer border-blue-400 text-blue-400 hover:bg-blue-400 hover:text-white"}`,
|
|
2048
2056
|
onClick: () => {
|
|
2049
2057
|
var h;
|
|
2050
|
-
!b(
|
|
2058
|
+
!b(l) && b((h = fe(l)) == null ? void 0 : h.key) || n();
|
|
2051
2059
|
},
|
|
2052
2060
|
children: [
|
|
2053
|
-
/* @__PURE__ */ e.jsx(
|
|
2061
|
+
/* @__PURE__ */ e.jsx(ke, { width: 12, height: 12 }),
|
|
2054
2062
|
" Add"
|
|
2055
2063
|
]
|
|
2056
2064
|
}
|
|
2057
2065
|
)
|
|
2058
2066
|
] }),
|
|
2059
2067
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col", children: [
|
|
2060
|
-
b(
|
|
2068
|
+
b(l) && /* @__PURE__ */ e.jsx("div", { className: "flex h-12 items-center justify-center text-sm text-gray-400", children: "Click + Add to add attributes" }),
|
|
2061
2069
|
ne.Children.toArray(
|
|
2062
|
-
C(
|
|
2063
|
-
const f =
|
|
2070
|
+
C(l, (h, x) => {
|
|
2071
|
+
const f = l.length > 0 && x < l.length - 1;
|
|
2064
2072
|
return /* @__PURE__ */ e.jsx(
|
|
2065
|
-
|
|
2073
|
+
us,
|
|
2066
2074
|
{
|
|
2067
2075
|
item: h,
|
|
2068
|
-
index:
|
|
2076
|
+
index: x,
|
|
2069
2077
|
canDelete: f,
|
|
2070
|
-
onChange:
|
|
2071
|
-
onRemove: () =>
|
|
2078
|
+
onChange: g,
|
|
2079
|
+
onRemove: () => p(x)
|
|
2072
2080
|
}
|
|
2073
2081
|
);
|
|
2074
2082
|
})
|
|
@@ -2077,8 +2085,8 @@ const el = (t) => {
|
|
|
2077
2085
|
] }) })
|
|
2078
2086
|
] });
|
|
2079
2087
|
};
|
|
2080
|
-
function
|
|
2081
|
-
const [t,
|
|
2088
|
+
function gs() {
|
|
2089
|
+
const [t, s] = Qe(), { flexChild: r, gridChild: l } = mr(), [, o] = Ar(yr), { t: a } = Ye(), [d] = Te();
|
|
2082
2090
|
return b(d) ? /* @__PURE__ */ e.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 rounded-xl p-4", children: [
|
|
2083
2091
|
/* @__PURE__ */ e.jsx(Ze, { className: "mx-auto text-3xl" }),
|
|
2084
2092
|
/* @__PURE__ */ e.jsx("h1", { children: a("no_styling_block_selected") }),
|
|
@@ -2090,12 +2098,12 @@ function xl() {
|
|
|
2090
2098
|
] })
|
|
2091
2099
|
] }) }) : (
|
|
2092
2100
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions
|
|
2093
|
-
/* @__PURE__ */ e.jsxs("div", { onClick: () =>
|
|
2101
|
+
/* @__PURE__ */ e.jsxs("div", { onClick: () => o(!1), className: "flex h-full flex-col", children: [
|
|
2094
2102
|
/* @__PURE__ */ e.jsx("div", { className: "flex flex-col space-x-4 space-y-3 border-b border-border px-4 py-2", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-end gap-x-1.5", children: [
|
|
2095
|
-
/* @__PURE__ */ e.jsx(
|
|
2096
|
-
/* @__PURE__ */ e.jsxs(
|
|
2097
|
-
/* @__PURE__ */ e.jsx(
|
|
2098
|
-
/* @__PURE__ */ e.jsxs(
|
|
2103
|
+
/* @__PURE__ */ e.jsx(Se, { htmlFor: "", className: "flex gap-x-1.5 text-xs italic", children: "State" }),
|
|
2104
|
+
/* @__PURE__ */ e.jsxs(br, { defaultValue: t, onValueChange: (i) => s(i), children: [
|
|
2105
|
+
/* @__PURE__ */ e.jsx(fr, { className: "h-auto w-fit p-1 px-3", children: /* @__PURE__ */ e.jsx(vr, { placeholder: "State" }) }),
|
|
2106
|
+
/* @__PURE__ */ e.jsxs(jr, { children: [
|
|
2099
2107
|
/* @__PURE__ */ e.jsx(H, { value: "", children: "Normal" }),
|
|
2100
2108
|
/* @__PURE__ */ e.jsx(H, { value: "hover", children: "Hover" }),
|
|
2101
2109
|
/* @__PURE__ */ e.jsx(H, { value: "active", children: "Active" }),
|
|
@@ -2111,19 +2119,19 @@ function xl() {
|
|
|
2111
2119
|
] })
|
|
2112
2120
|
] })
|
|
2113
2121
|
] }) }),
|
|
2114
|
-
/* @__PURE__ */ e.jsxs(
|
|
2122
|
+
/* @__PURE__ */ e.jsxs(wr, { className: "no-scrollbar -mx-1 h-full overflow-x-hidden", children: [
|
|
2115
2123
|
/* @__PURE__ */ e.jsxs(Ge, { defaultValue: ["Layout"], type: "multiple", className: "h-full w-full", children: [
|
|
2116
|
-
r && /* @__PURE__ */ e.jsx(
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
/* @__PURE__ */ e.jsx(
|
|
2124
|
+
r && /* @__PURE__ */ e.jsx(ye, { section: Zr }),
|
|
2125
|
+
l ? /* @__PURE__ */ e.jsx(ye, { section: zr }) : null,
|
|
2126
|
+
Ur.map((i) => /* @__PURE__ */ e.jsx(ye, { section: i }, i.heading)),
|
|
2127
|
+
/* @__PURE__ */ e.jsx(xs, { section: { heading: "Attributes" } })
|
|
2120
2128
|
] }),
|
|
2121
2129
|
/* @__PURE__ */ e.jsx("div", { className: "h-60" })
|
|
2122
2130
|
] })
|
|
2123
2131
|
] })
|
|
2124
2132
|
);
|
|
2125
2133
|
}
|
|
2126
|
-
const
|
|
2134
|
+
const hs = {
|
|
2127
2135
|
px: 1,
|
|
2128
2136
|
"%": 1,
|
|
2129
2137
|
em: 100,
|
|
@@ -2134,32 +2142,32 @@ const gl = {
|
|
|
2134
2142
|
"-": 1,
|
|
2135
2143
|
deg: 1,
|
|
2136
2144
|
ms: 0.1
|
|
2137
|
-
},
|
|
2138
|
-
const t = G(), { t:
|
|
2139
|
-
onDrag: (
|
|
2140
|
-
onDragEnd: (
|
|
2145
|
+
}, Nl = () => {
|
|
2146
|
+
const t = G(), { t: s } = Ye(), [r, l] = I.useState(""), [o, a] = I.useState({
|
|
2147
|
+
onDrag: (n) => n,
|
|
2148
|
+
onDragEnd: (n) => n,
|
|
2141
2149
|
dragStartY: 0,
|
|
2142
2150
|
dragging: !1,
|
|
2143
2151
|
dragStartValue: 0,
|
|
2144
2152
|
dragUnit: "",
|
|
2145
2153
|
negative: !1,
|
|
2146
2154
|
cssProperty: ""
|
|
2147
|
-
}), d =
|
|
2148
|
-
(
|
|
2149
|
-
const
|
|
2150
|
-
let c = parseFloat(
|
|
2155
|
+
}), d = be(
|
|
2156
|
+
(n) => {
|
|
2157
|
+
const p = !u(o, "negative", !1), g = u(o, "cssProperty", "");
|
|
2158
|
+
let c = parseFloat(o.dragStartValue);
|
|
2151
2159
|
c = _e(c) ? 0 : c;
|
|
2152
|
-
let m =
|
|
2153
|
-
(z(
|
|
2154
|
-
let
|
|
2155
|
-
|
|
2160
|
+
let m = hs[o.dragUnit];
|
|
2161
|
+
(z(g, "scale") || g === "opacity") && (m = 10);
|
|
2162
|
+
let x = (o.dragStartY - n.pageY) / m + c;
|
|
2163
|
+
p && x < 0 && (x = 0), g === "opacity" && x > 1 && (x = 1), o.onDrag(`${x}`), l(`${x}`);
|
|
2156
2164
|
},
|
|
2157
|
-
[
|
|
2165
|
+
[o],
|
|
2158
2166
|
50
|
|
2159
2167
|
), i = A(() => {
|
|
2160
|
-
setTimeout(() =>
|
|
2161
|
-
onDrag: (
|
|
2162
|
-
onDragEnd: (
|
|
2168
|
+
setTimeout(() => o.onDragEnd(`${r}`), 100), a({
|
|
2169
|
+
onDrag: (n) => n,
|
|
2170
|
+
onDragEnd: (n) => n,
|
|
2163
2171
|
dragStartY: 0,
|
|
2164
2172
|
dragging: !1,
|
|
2165
2173
|
dragStartValue: 0,
|
|
@@ -2167,12 +2175,12 @@ const gl = {
|
|
|
2167
2175
|
negative: !1,
|
|
2168
2176
|
cssProperty: ""
|
|
2169
2177
|
});
|
|
2170
|
-
}, [
|
|
2178
|
+
}, [o, r, a]);
|
|
2171
2179
|
return wt(t) ? /* @__PURE__ */ e.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 rounded-xl p-4", children: [
|
|
2172
2180
|
/* @__PURE__ */ e.jsx(Ze, { className: "mx-auto text-3xl" }),
|
|
2173
|
-
/* @__PURE__ */ e.jsx("h1", { children:
|
|
2181
|
+
/* @__PURE__ */ e.jsx("h1", { children: s("no_block_selected_for_styling") })
|
|
2174
2182
|
] }) }) : /* @__PURE__ */ e.jsx(tt, { children: /* @__PURE__ */ e.jsxs(nt.Provider, { value: { setDragData: a }, children: [
|
|
2175
|
-
|
|
2183
|
+
o.dragging ? /* @__PURE__ */ e.jsx(
|
|
2176
2184
|
"div",
|
|
2177
2185
|
{
|
|
2178
2186
|
onMouseMove: d,
|
|
@@ -2180,23 +2188,23 @@ const gl = {
|
|
|
2180
2188
|
className: "absolute inset-0 z-30 cursor-row-resize bg-gray-300/10 "
|
|
2181
2189
|
}
|
|
2182
2190
|
) : null,
|
|
2183
|
-
/* @__PURE__ */ e.jsxs(
|
|
2184
|
-
/* @__PURE__ */ e.jsxs(
|
|
2185
|
-
/* @__PURE__ */ e.jsx(
|
|
2186
|
-
/* @__PURE__ */ e.jsx(
|
|
2191
|
+
/* @__PURE__ */ e.jsxs(Cr, { defaultValue: "settings", className: "flex h-full w-full flex-col py-1", children: [
|
|
2192
|
+
/* @__PURE__ */ e.jsxs(kr, { className: "mx-1 grid grid-cols-2", children: [
|
|
2193
|
+
/* @__PURE__ */ e.jsx(Ae, { value: "settings", children: "Settings" }),
|
|
2194
|
+
/* @__PURE__ */ e.jsx(Ae, { value: "styling", children: "Styling" })
|
|
2187
2195
|
] }),
|
|
2188
2196
|
/* @__PURE__ */ e.jsx(
|
|
2189
|
-
|
|
2197
|
+
De,
|
|
2190
2198
|
{
|
|
2191
2199
|
value: "settings",
|
|
2192
2200
|
className: "no-scrollbar -mx-1 -mr-2 h-full flex-1 overflow-y-auto overflow-x-hidden",
|
|
2193
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2201
|
+
children: /* @__PURE__ */ e.jsx(Wr, {})
|
|
2194
2202
|
}
|
|
2195
2203
|
),
|
|
2196
|
-
/* @__PURE__ */ e.jsx(
|
|
2204
|
+
/* @__PURE__ */ e.jsx(De, { value: "styling", className: "flex-1 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(gs, {}) })
|
|
2197
2205
|
] })
|
|
2198
2206
|
] }) });
|
|
2199
2207
|
};
|
|
2200
2208
|
export {
|
|
2201
|
-
|
|
2209
|
+
Nl as default
|
|
2202
2210
|
};
|