@chaibuilder/sdk 0.1.22 → 0.1.24
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-254892c5.js → AddBlocks-5818ee33.js} +13 -14
- package/dist/AddBlocks-97c464e1.cjs +3 -0
- package/dist/{BrandingOptions-81fb41d9.js → BrandingOptions-3095a1ac.js} +1 -1
- package/dist/{BrandingOptions-10c05f85.cjs → BrandingOptions-a4de85eb.cjs} +1 -1
- package/dist/{CanvasArea-a261378b.cjs → CanvasArea-45062968.cjs} +2 -2
- package/dist/{CanvasArea-7e09f98e.js → CanvasArea-a6706381.js} +2 -2
- package/dist/{CurrentPage-b67bee36.cjs → CurrentPage-181bbdc0.cjs} +1 -1
- package/dist/{CurrentPage-ce5a51fa.js → CurrentPage-36e1f888.js} +1 -1
- package/dist/{Layers-b3a452cc.js → Layers-066e5450.js} +2 -2
- package/dist/{Layers-4e859d15.cjs → Layers-884713c8.cjs} +1 -1
- package/dist/{MarkAsGlobalBlock-1a1039f8.cjs → MarkAsGlobalBlock-3336e964.cjs} +1 -1
- package/dist/{MarkAsGlobalBlock-7d9f5e11.js → MarkAsGlobalBlock-dc93e527.js} +1 -1
- package/dist/{PagesPanel-163b7771.cjs → PagesPanel-574a0a87.cjs} +1 -1
- package/dist/{PagesPanel-2559ea9e.js → PagesPanel-dba3d5fa.js} +2 -2
- package/dist/{ProjectPanel-e78931cd.cjs → ProjectPanel-a737a211.cjs} +1 -1
- package/dist/{ProjectPanel-fab32a4f.js → ProjectPanel-b7c44110.js} +2 -2
- package/dist/Settings-7d129d30.cjs +1 -0
- package/dist/{Settings-a2638a6e.js → Settings-a3117310.js} +584 -579
- package/dist/SidePanels-b4ba0640.cjs +1 -0
- package/dist/SidePanels-ffe30d1c.js +329 -0
- package/dist/{Topbar-ef648e78.js → Topbar-4e04e218.js} +1 -1
- package/dist/{Topbar-c131ef83.cjs → Topbar-836552a6.cjs} +1 -1
- package/dist/{add-page-modal-7d645bf7.cjs → add-page-modal-217f08a5.cjs} +1 -1
- package/dist/{add-page-modal-8c9dad17.js → add-page-modal-41831178.js} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/{delete-page-modal-ec091c19.js → delete-page-modal-9c81fd1f.js} +1 -1
- package/dist/{delete-page-modal-19001f8d.cjs → delete-page-modal-a58fb14e.cjs} +1 -1
- package/dist/{index-e6e838ec.js → index-088a9534.js} +6 -6
- package/dist/{index-2f61b040.cjs → index-e2dad9ec.cjs} +18 -18
- package/dist/{page-viewer-dec9a6d2.js → page-viewer-6a9db9cc.js} +2 -2
- package/dist/{page-viewer-65e2ca1a.cjs → page-viewer-ff2173dd.cjs} +1 -1
- package/dist/{project-general-setting-c7d95cc0.cjs → project-general-setting-695a14fa.cjs} +1 -1
- package/dist/{project-general-setting-067afe22.js → project-general-setting-d0cb6eca.js} +1 -1
- package/dist/render.cjs +1 -1
- package/dist/render.d.ts +2 -4
- package/dist/render.js +59 -67
- package/dist/{single-page-detail-f110be66.js → single-page-detail-ac77d6d0.js} +2 -2
- package/dist/{single-page-detail-14e7a650.cjs → single-page-detail-f54b60af.cjs} +1 -1
- package/dist/textarea-0750bcd2.js +73 -0
- package/dist/textarea-a338ede6.cjs +1 -0
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +72 -73
- package/package.json +3 -3
- package/dist/AddBlocks-a86eec32.cjs +0 -3
- package/dist/Settings-d9df3548.cjs +0 -1
- package/dist/SidePanels-1439e695.cjs +0 -1
- package/dist/SidePanels-aa583e71.js +0 -242
- package/dist/card-14e1d020.cjs +0 -1
- package/dist/card-f8f4f985.js +0 -33
- package/dist/textarea-20b2f6b2.cjs +0 -1
- package/dist/textarea-9dfb6a32.js +0 -45
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-944c88e2.js";
|
|
2
2
|
import * as se from "react";
|
|
3
|
-
import
|
|
3
|
+
import P, { useState as k, useEffect as M, useMemo as R, useCallback as L, createContext as Pe, useContext as ee } from "react";
|
|
4
4
|
import { useThrottledCallback as xe } from "@react-hookz/web";
|
|
5
|
-
import { map as
|
|
5
|
+
import { map as N, isEmpty as b, last as he, forEach as be, set as Le, startCase as Q, filter as Oe, get as u, isArray as me, omit as at, includes as O, toLower as ne, first as fe, split as Ne, truncate as it, keys as dt, cloneDeep as ct, each as pt, capitalize as ut, reject as gt, nth as Se, startsWith as Z, isNumber as xt, parseInt as ht, isNaN as Me, findLast as mt, has as ue, flatten as z, intersection as _e, isNull as yt } from "lodash";
|
|
6
6
|
import { useTranslation as Ee } from "react-i18next";
|
|
7
|
-
import { PlusIcon as ve, Cross2Icon as Fe, EyeOpenIcon as
|
|
8
|
-
import { T as It, a as
|
|
9
|
-
import
|
|
7
|
+
import { PlusIcon as ve, Cross2Icon as Fe, EyeOpenIcon as bt, EyeClosedIcon as Te, BorderAllIcon as E, WidthIcon as H, HeightIcon as V, ArrowUpIcon as G, ArrowRightIcon as K, ArrowDownIcon as q, ArrowLeftIcon as J, ArrowTopLeftIcon as ft, ArrowTopRightIcon as vt, ArrowBottomRightIcon as wt, ArrowBottomLeftIcon as jt, AlignLeftIcon as Ct, AlignCenterHorizontallyIcon as kt, AlignRightIcon as Nt, StretchHorizontallyIcon as St, FontItalicIcon as Tt, UnderlineIcon as Rt, OverlineIcon as Ht, LetterCaseUppercaseIcon as Vt, Cross1Icon as Bt, InfoCircledIcon as we, MinusIcon as At, BoxIcon as Ye, TriangleDownIcon as Dt, RowSpacingIcon as $t, TrashIcon as Xe, MixerHorizontalIcon as We } from "@radix-ui/react-icons";
|
|
8
|
+
import { T as It, a as Pt, b as Re, c as He } from "./tabs-85caa1e8.js";
|
|
9
|
+
import Lt from "@rjsf/core";
|
|
10
10
|
import Ot from "@rjsf/validator-ajv8";
|
|
11
|
-
import { D as te, d as Ze, G as ze, H as Mt, I as _t, J as Et, j as je, K as Ue, L as Ge, i as Ke, e as Ft, M as qe, f as
|
|
12
|
-
import { getBlockComponent as Je, SingleLineText as
|
|
13
|
-
import { TrashIcon as
|
|
11
|
+
import { D as te, d as Ze, G as ze, H as Mt, I as _t, J as Et, j as je, K as Ue, L as Ge, i as Ke, e as Ft, M as qe, f as Ve, N as ce, c as Yt, O as Xt, P as Wt } from "./index-088a9534.js";
|
|
12
|
+
import { getChaiDataProviders as Zt, getBlockComponent as Je, SingleLineText as zt } from "@chaibuilder/blocks";
|
|
13
|
+
import { TrashIcon as Ut, ChevronRight as Gt } from "lucide-react";
|
|
14
14
|
import Qe from "react-autosuggest";
|
|
15
|
-
import { u as
|
|
16
|
-
import { d as
|
|
15
|
+
import { u as Kt } from "./useChaiExternalData-192c7896.js";
|
|
16
|
+
import { d as Y, e as X, f as W, B as et, g as qt } from "./useBuilderProp-81a14920.js";
|
|
17
17
|
import { A as tt, a as ae, b as ie, c as de } from "./accordion-c0176dc5.js";
|
|
18
|
-
import { R as
|
|
19
|
-
import { useAtom as
|
|
20
|
-
import
|
|
21
|
-
import { A as
|
|
18
|
+
import { R as Jt, I as Qt, a as er, L as tr } from "./link-2af5de8b.js";
|
|
19
|
+
import { useAtom as rr } from "jotai";
|
|
20
|
+
import lr from "fuse.js";
|
|
21
|
+
import { A as or, C as pe, d as sr } from "./html-to-json-45e0e3b5.js";
|
|
22
22
|
import { L as Ce } from "./label-e770a087.js";
|
|
23
|
-
import { S as
|
|
24
|
-
import { I as
|
|
25
|
-
import { S as
|
|
26
|
-
import { S as
|
|
23
|
+
import { S as nr } from "./MODIFIERS-2f19c314.js";
|
|
24
|
+
import { I as ar } from "./input-a0ea2bc7.js";
|
|
25
|
+
import { S as ir } from "./scroll-area-83bd9e8f.js";
|
|
26
|
+
import { S as dr, c as cr, b as pr, d as ur, f as A } from "./select-7fddd7c3.js";
|
|
27
27
|
import "@radix-ui/react-tabs";
|
|
28
28
|
import "./utils-ac68b2c8.js";
|
|
29
29
|
import "clsx";
|
|
@@ -52,90 +52,91 @@ import "react-quill";
|
|
|
52
52
|
import "himalaya";
|
|
53
53
|
import "@radix-ui/react-label";
|
|
54
54
|
import "@radix-ui/react-select";
|
|
55
|
-
function
|
|
56
|
-
const
|
|
57
|
-
function
|
|
58
|
-
|
|
59
|
-
const
|
|
60
|
-
|
|
55
|
+
function gr(r) {
|
|
56
|
+
const o = [], t = {};
|
|
57
|
+
function a(l, s) {
|
|
58
|
+
be(s, (d, i) => {
|
|
59
|
+
const n = l ? `${l}.${i}` : i, p = me(d) ? "list" : typeof d;
|
|
60
|
+
o.push(n), t[n] = p === "string" ? "text" : p === "object" ? "model" : p, p === "object" && !me(d) && a(n, d);
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
|
-
return
|
|
63
|
+
return a("", at(r, ["styles", "_type", "_id", "_name", "_bindings"])), { paths: o, pathsType: t };
|
|
64
64
|
}
|
|
65
|
-
const
|
|
65
|
+
const xr = ({ data: r }) => {
|
|
66
66
|
if (!r)
|
|
67
67
|
return null;
|
|
68
|
-
const
|
|
69
|
-
return /* @__PURE__ */ e.jsx("div", { className: "text-[10px] text-gray-800/50 leading-3 whitespace-nowrap overflow-hidden w-full", children: it(
|
|
68
|
+
const o = typeof r;
|
|
69
|
+
return /* @__PURE__ */ e.jsx("div", { className: "text-[10px] text-gray-800/50 leading-3 whitespace-nowrap overflow-hidden w-full", children: it(o === "object" ? JSON.stringify(r) : r, { length: 40 }) });
|
|
70
70
|
}, Be = ({
|
|
71
71
|
type: r,
|
|
72
|
-
isDisabled:
|
|
72
|
+
isDisabled: o = !1,
|
|
73
73
|
placeholder: t,
|
|
74
|
-
defaultValue:
|
|
74
|
+
defaultValue: a = "",
|
|
75
75
|
data: l,
|
|
76
|
-
onChange:
|
|
76
|
+
onChange: s,
|
|
77
77
|
dataType: d,
|
|
78
78
|
appliedBindings: i
|
|
79
79
|
}) => {
|
|
80
|
-
const [
|
|
80
|
+
const [n, p] = k(!1), [c, h] = k(a), { paths: g, pathsType: y } = gr(l), x = r === "PROP" ? Je(l == null ? void 0 : l._type) : {};
|
|
81
81
|
M(() => {
|
|
82
|
-
b(
|
|
83
|
-
}, [
|
|
84
|
-
const
|
|
85
|
-
const
|
|
86
|
-
return r === "PATH" ?
|
|
87
|
-
}), [
|
|
88
|
-
M(() =>
|
|
89
|
-
const
|
|
82
|
+
b(c) && s("");
|
|
83
|
+
}, [c]), M(() => h(a), [a]);
|
|
84
|
+
const f = () => g.filter((v) => {
|
|
85
|
+
const C = b(c) || O(ne(v), ne(c));
|
|
86
|
+
return r === "PATH" ? C && d === u(y, v, "") : C && !O(i, v) && u(x, `props.${fe(Ne(v, "."))}.binding`);
|
|
87
|
+
}), [$, S] = k(() => f());
|
|
88
|
+
M(() => S(() => f()), [d]);
|
|
89
|
+
const j = r === "PATH" && b($) && n && !b(d), I = {
|
|
90
90
|
autoComplete: "off",
|
|
91
91
|
autoCorrect: "on",
|
|
92
92
|
autoCapitalize: "off",
|
|
93
93
|
spellCheck: !1,
|
|
94
|
-
placeholder: t,
|
|
95
|
-
value:
|
|
96
|
-
disabled:
|
|
94
|
+
placeholder: j ? "No available options" : t,
|
|
95
|
+
value: c,
|
|
96
|
+
disabled: o,
|
|
97
|
+
onFocus: () => p(r === "PATH"),
|
|
97
98
|
onBlur: () => {
|
|
98
|
-
|
|
99
|
+
p(!1), g.includes(c) ? s(c) : (h(""), s(""));
|
|
99
100
|
},
|
|
100
|
-
onChange: (
|
|
101
|
-
className: `chai-input w-full ${
|
|
102
|
-
},
|
|
101
|
+
onChange: (v, { newValue: C }) => h(j ? "" : C),
|
|
102
|
+
className: `chai-input w-full ${o ? "cursor-not-allowed" : ""} ${j ? "placeholder-red-400" : ""}`
|
|
103
|
+
}, B = (v) => /* @__PURE__ */ e.jsxs(
|
|
103
104
|
"div",
|
|
104
105
|
{
|
|
105
106
|
className: "rounded-md px-1 py-1.5 flex items-center justify-between space-x-2 font-light relative",
|
|
106
|
-
"data-suggest":
|
|
107
|
+
"data-suggest": v,
|
|
107
108
|
children: [
|
|
108
|
-
/* @__PURE__ */ e.jsx("div", { className: "-mt-1 w-full h-full absolute opacity-0 z-20", children:
|
|
109
|
+
/* @__PURE__ */ e.jsx("div", { className: "-mt-1 w-full h-full absolute opacity-0 z-20", children: v }),
|
|
109
110
|
/* @__PURE__ */ e.jsxs("div", { className: "w-full", children: [
|
|
110
|
-
/* @__PURE__ */ e.jsx("div", { className: "leading-4 text-xs flex items-center text-gray-800", children:
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
Q(
|
|
111
|
+
/* @__PURE__ */ e.jsx("div", { className: "leading-4 text-xs flex items-center text-gray-800", children: P.Children.toArray(
|
|
112
|
+
N(Ne(v, "."), (C, _) => /* @__PURE__ */ e.jsxs("span", { className: "flex items-end", children: [
|
|
113
|
+
_ > 0 && /* @__PURE__ */ e.jsx(Gt, { size: 14, className: "h-full text-gray-400" }),
|
|
114
|
+
Q(C)
|
|
114
115
|
] }))
|
|
115
116
|
) }),
|
|
116
|
-
r === "PATH" && /* @__PURE__ */ e.jsx(
|
|
117
|
+
r === "PATH" && /* @__PURE__ */ e.jsx(xr, { data: u(l, v) })
|
|
117
118
|
] }),
|
|
118
|
-
r === "PROP" && /* @__PURE__ */ e.jsx("div", { className: "bg-purple-100 text-purple-400 text-[9px] flex items-center font-medium h-4 px-2 rounded-full", children: Q(
|
|
119
|
+
r === "PROP" && /* @__PURE__ */ e.jsx("div", { className: "bg-purple-100 text-purple-400 text-[9px] flex items-center font-medium h-4 px-2 rounded-full", children: Q(u(y, v, "")) })
|
|
119
120
|
]
|
|
120
121
|
}
|
|
121
122
|
);
|
|
122
123
|
return /* @__PURE__ */ e.jsx(
|
|
123
124
|
Qe,
|
|
124
125
|
{
|
|
125
|
-
suggestions:
|
|
126
|
-
onSuggestionsFetchRequested: () =>
|
|
127
|
-
onSuggestionsClearRequested: () =>
|
|
128
|
-
onSuggestionSelected: (
|
|
129
|
-
if (
|
|
130
|
-
const
|
|
131
|
-
|
|
126
|
+
suggestions: $,
|
|
127
|
+
onSuggestionsFetchRequested: () => S(() => f()),
|
|
128
|
+
onSuggestionsClearRequested: () => S([]),
|
|
129
|
+
onSuggestionSelected: (v) => {
|
|
130
|
+
if (v.type === "click") {
|
|
131
|
+
const C = u(v.target, "childNodes[0].data", "");
|
|
132
|
+
g.includes(C) && s(C);
|
|
132
133
|
} else
|
|
133
|
-
|
|
134
|
+
s(v.target.value);
|
|
134
135
|
},
|
|
135
|
-
getSuggestionValue: (
|
|
136
|
-
renderSuggestion:
|
|
136
|
+
getSuggestionValue: (v) => v,
|
|
137
|
+
renderSuggestion: B,
|
|
137
138
|
shouldRenderSuggestions: () => !0,
|
|
138
|
-
inputProps:
|
|
139
|
+
inputProps: I,
|
|
139
140
|
containerProps: { className: "w-full" },
|
|
140
141
|
theme: {
|
|
141
142
|
suggestion: "text-gray-500 border-b overflow-hidden text-ellipsis",
|
|
@@ -144,26 +145,26 @@ const gr = ({ data: r }) => {
|
|
|
144
145
|
}
|
|
145
146
|
}
|
|
146
147
|
);
|
|
147
|
-
},
|
|
148
|
+
}, hr = ({
|
|
148
149
|
item: r,
|
|
149
|
-
onChange:
|
|
150
|
+
onChange: o,
|
|
150
151
|
onRemove: t,
|
|
151
|
-
selectedBlock:
|
|
152
|
+
selectedBlock: a,
|
|
152
153
|
dataProvider: l,
|
|
153
|
-
appliedBindings:
|
|
154
|
+
appliedBindings: s
|
|
154
155
|
}) => {
|
|
155
|
-
const [d, i] = k("string"),
|
|
156
|
+
const [d, i] = k("string"), n = (p, c) => {
|
|
156
157
|
if (b(p))
|
|
157
158
|
return "";
|
|
158
159
|
{
|
|
159
|
-
const
|
|
160
|
-
if (
|
|
160
|
+
const h = u(c === "PROP" ? a : l, p, "");
|
|
161
|
+
if (me(h))
|
|
161
162
|
return "list";
|
|
162
|
-
const
|
|
163
|
-
return
|
|
163
|
+
const g = typeof h;
|
|
164
|
+
return g === "string" ? "text" : g === "object" ? "model" : g;
|
|
164
165
|
}
|
|
165
166
|
};
|
|
166
|
-
return M(() => i(() =>
|
|
167
|
+
return M(() => i(() => n(r.key, "PROP")), [r.key]), /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1 border border-gray-200 relative rounded-md p-2", children: [
|
|
167
168
|
!b(d) && !b(r.key) && /* @__PURE__ */ e.jsx("div", { className: "mt-px absolute right-2 top-4 text-purple-600 text-[10px] flex items-center font-medium h-4 px-2 rounded-full", children: Q(d) }),
|
|
168
169
|
/* @__PURE__ */ e.jsx(
|
|
169
170
|
Be,
|
|
@@ -173,12 +174,12 @@ const gr = ({ data: r }) => {
|
|
|
173
174
|
placeholder: "Enter prop key",
|
|
174
175
|
defaultValue: r.key,
|
|
175
176
|
onChange: (p) => {
|
|
176
|
-
const
|
|
177
|
-
|
|
177
|
+
const c = n(p, "PROP");
|
|
178
|
+
o({ target: { name: "key", value: p } }), d !== c && o({ target: { name: "value", value: "" } }), i(c);
|
|
178
179
|
},
|
|
179
|
-
data:
|
|
180
|
+
data: a,
|
|
180
181
|
dataType: d,
|
|
181
|
-
appliedBindings:
|
|
182
|
+
appliedBindings: s
|
|
182
183
|
}
|
|
183
184
|
),
|
|
184
185
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-start justify-between gap-x-1.5 w-full relative", children: [
|
|
@@ -190,16 +191,16 @@ const gr = ({ data: r }) => {
|
|
|
190
191
|
placeholder: "Enter data path",
|
|
191
192
|
defaultValue: r.value,
|
|
192
193
|
onChange: (p) => {
|
|
193
|
-
const
|
|
194
|
-
|
|
194
|
+
const c = n(p, "PATH");
|
|
195
|
+
o(d !== c ? { target: { name: "value", value: "" } } : { target: { name: "value", value: p } });
|
|
195
196
|
},
|
|
196
197
|
data: l,
|
|
197
198
|
dataType: d,
|
|
198
|
-
appliedBindings:
|
|
199
|
+
appliedBindings: s
|
|
199
200
|
}
|
|
200
201
|
),
|
|
201
202
|
/* @__PURE__ */ e.jsx(
|
|
202
|
-
|
|
203
|
+
Ut,
|
|
203
204
|
{
|
|
204
205
|
onClick: t,
|
|
205
206
|
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"
|
|
@@ -207,87 +208,91 @@ const gr = ({ data: r }) => {
|
|
|
207
208
|
)
|
|
208
209
|
] })
|
|
209
210
|
] });
|
|
210
|
-
},
|
|
211
|
-
const t = te(), [
|
|
211
|
+
}, mr = ({ bindingData: r, onChange: o }) => {
|
|
212
|
+
const t = te(), [a] = Kt(), l = Zt(), [s, d] = k(N(r, (g, y) => ({ key: y, value: g })));
|
|
212
213
|
M(() => {
|
|
213
|
-
|
|
214
|
+
d(N(r, (g, y) => ({ key: y, value: g })));
|
|
214
215
|
}, [t == null ? void 0 : t._id]);
|
|
215
|
-
const
|
|
216
|
-
if (b(
|
|
216
|
+
const i = R(() => {
|
|
217
|
+
if (b(s))
|
|
217
218
|
return !1;
|
|
218
|
-
const
|
|
219
|
-
return b(
|
|
220
|
-
}, [
|
|
221
|
-
|
|
222
|
-
},
|
|
223
|
-
const y = Oe(
|
|
224
|
-
|
|
225
|
-
},
|
|
226
|
-
const x = [...
|
|
227
|
-
x[y][
|
|
228
|
-
},
|
|
229
|
-
(
|
|
230
|
-
if (
|
|
231
|
-
|
|
219
|
+
const g = he(s);
|
|
220
|
+
return b(g == null ? void 0 : g.key) || b(g == null ? void 0 : g.value);
|
|
221
|
+
}, [s]), n = () => {
|
|
222
|
+
d([...s, { key: "", value: "" }]);
|
|
223
|
+
}, p = (g) => {
|
|
224
|
+
const y = Oe(s, (x, f) => g !== f);
|
|
225
|
+
h([...y]);
|
|
226
|
+
}, c = (g, y) => {
|
|
227
|
+
const x = [...s];
|
|
228
|
+
x[y][g.target.name] = g.target.value, h(x);
|
|
229
|
+
}, h = L(
|
|
230
|
+
(g = []) => {
|
|
231
|
+
if (d(g), b(g)) {
|
|
232
|
+
o({});
|
|
232
233
|
return;
|
|
233
234
|
}
|
|
234
235
|
const y = {};
|
|
235
|
-
|
|
236
|
-
!b(x == null ? void 0 : x.key) && !b(x == null ? void 0 : x.value) &&
|
|
237
|
-
}),
|
|
236
|
+
be(g, (x) => {
|
|
237
|
+
!b(x == null ? void 0 : x.key) && !b(x == null ? void 0 : x.value) && Le(y, x.key, x.value);
|
|
238
|
+
}), o(y);
|
|
238
239
|
},
|
|
239
240
|
[t]
|
|
240
241
|
);
|
|
241
|
-
return b(
|
|
242
|
-
|
|
243
|
-
|
|
242
|
+
return b(l) ? /* @__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: [
|
|
243
|
+
"You have no data providers registered. Please add a data provider to your project. ",
|
|
244
|
+
/* @__PURE__ */ e.jsx("br", {}),
|
|
245
|
+
/* @__PURE__ */ e.jsx("a", { className: "text-blue-500", href: "https://chaibuilder.com/docs/registering-data-providers", target: "_blank", children: "Learn more" })
|
|
246
|
+
] }) }) : /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
247
|
+
N(s, (g, y) => /* @__PURE__ */ e.jsx(
|
|
248
|
+
hr,
|
|
244
249
|
{
|
|
245
|
-
item:
|
|
246
|
-
onChange: (x) =>
|
|
247
|
-
onRemove: () =>
|
|
250
|
+
item: g,
|
|
251
|
+
onChange: (x) => c(x, y),
|
|
252
|
+
onRemove: () => p(y),
|
|
248
253
|
selectedBlock: t,
|
|
249
|
-
dataProvider:
|
|
250
|
-
appliedBindings:
|
|
254
|
+
dataProvider: a,
|
|
255
|
+
appliedBindings: N(s, "key")
|
|
251
256
|
},
|
|
252
|
-
|
|
257
|
+
g.key
|
|
253
258
|
)),
|
|
254
|
-
/* @__PURE__ */ e.jsxs(
|
|
255
|
-
/* @__PURE__ */ e.jsx(
|
|
259
|
+
/* @__PURE__ */ e.jsxs(Y, { delayDuration: 200, children: [
|
|
260
|
+
/* @__PURE__ */ e.jsx(X, { className: "w-full", children: /* @__PURE__ */ e.jsx(
|
|
256
261
|
"button",
|
|
257
262
|
{
|
|
258
|
-
onClick:
|
|
259
|
-
disabled:
|
|
260
|
-
className: `w-full px-5 py-1.5 text-xs rounded-md font-medium duration-200 ${b(
|
|
263
|
+
onClick: n,
|
|
264
|
+
disabled: i,
|
|
265
|
+
className: `w-full px-5 py-1.5 text-xs rounded-md font-medium duration-200 ${b(s) ? "bg-blue-700/20 text-blue-800 hover:bg-blue-700/30 " : ""} ${i ? "cursor-not-allowed bg-gray-200 text-gray-400" : b(s) ? "" : "bg-gray-700/20 text-gray-800 hover:bg-blue-700/30"}`,
|
|
261
266
|
children: "+ Add Data Binding"
|
|
262
267
|
}
|
|
263
268
|
) }),
|
|
264
|
-
|
|
269
|
+
i && /* @__PURE__ */ e.jsx(W, { sideOffset: -55, className: "text-[11px]", children: "Complete last added data binding to add more" })
|
|
265
270
|
] })
|
|
266
271
|
] });
|
|
267
|
-
}, yr =
|
|
272
|
+
}, yr = mr, br = () => /* @__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" }), Ae = ({
|
|
268
273
|
createHistorySnapshot: r,
|
|
269
|
-
properties:
|
|
274
|
+
properties: o,
|
|
270
275
|
formData: t,
|
|
271
|
-
onChange:
|
|
276
|
+
onChange: a
|
|
272
277
|
}) => {
|
|
273
|
-
const [l] = Mt(),
|
|
274
|
-
return Object.keys(
|
|
275
|
-
const
|
|
276
|
-
if (O(["slot", "styles"],
|
|
278
|
+
const [l] = Mt(), s = { type: "object", properties: {} }, d = {};
|
|
279
|
+
return Object.keys(o).forEach((i) => {
|
|
280
|
+
const n = o[i];
|
|
281
|
+
if (O(["slot", "styles"], n.type))
|
|
277
282
|
return;
|
|
278
|
-
const p =
|
|
279
|
-
|
|
283
|
+
const p = u(n, "i18n", !1) ? `${i}-${l}` : i;
|
|
284
|
+
s.properties[p] = _t(n, l), d[p] = Et(n, l);
|
|
280
285
|
}), /* @__PURE__ */ e.jsx(
|
|
281
|
-
|
|
286
|
+
Lt,
|
|
282
287
|
{
|
|
283
288
|
widgets: {
|
|
284
|
-
binding:
|
|
285
|
-
richtext:
|
|
286
|
-
icon:
|
|
287
|
-
image:
|
|
289
|
+
binding: br,
|
|
290
|
+
richtext: Jt,
|
|
291
|
+
icon: Qt,
|
|
292
|
+
image: er
|
|
288
293
|
},
|
|
289
294
|
fields: {
|
|
290
|
-
link:
|
|
295
|
+
link: tr
|
|
291
296
|
},
|
|
292
297
|
idSeparator: ".",
|
|
293
298
|
autoComplete: "off",
|
|
@@ -297,35 +302,35 @@ const gr = ({ data: r }) => {
|
|
|
297
302
|
validator: Ot,
|
|
298
303
|
uiSchema: d,
|
|
299
304
|
onBlur: r,
|
|
300
|
-
schema:
|
|
305
|
+
schema: s,
|
|
301
306
|
formData: t,
|
|
302
|
-
onChange:
|
|
307
|
+
onChange: a
|
|
303
308
|
}
|
|
304
309
|
);
|
|
305
310
|
};
|
|
306
311
|
function fr() {
|
|
307
|
-
const r = te(), { createSnapshot:
|
|
308
|
-
if (
|
|
309
|
-
const
|
|
310
|
-
t([r._id], { [
|
|
312
|
+
const r = te(), { createSnapshot: o } = Ze(), t = ze(), a = Je(r._type), l = { ...r }, s = () => o(), d = ({ formData: c }, h) => {
|
|
313
|
+
if (h) {
|
|
314
|
+
const g = h.replace("root.", "");
|
|
315
|
+
t([r._id], { [g]: u(c, g) });
|
|
311
316
|
}
|
|
312
317
|
}, i = {
|
|
313
|
-
_name:
|
|
318
|
+
_name: zt({
|
|
314
319
|
title: "Name",
|
|
315
|
-
default:
|
|
320
|
+
default: u(r, "_name", r._type)
|
|
316
321
|
})
|
|
317
|
-
},
|
|
318
|
-
const
|
|
319
|
-
return pt(
|
|
320
|
-
delete
|
|
321
|
-
}),
|
|
322
|
-
}, [
|
|
322
|
+
}, n = dt(u(l, "_bindings", {})), p = R(() => {
|
|
323
|
+
const c = ct(u(a, "props", {}));
|
|
324
|
+
return pt(n, (h) => {
|
|
325
|
+
delete c[h];
|
|
326
|
+
}), c;
|
|
327
|
+
}, [a, n]);
|
|
323
328
|
return /* @__PURE__ */ e.jsxs("div", { className: "overflow-x-hidden", children: [
|
|
324
329
|
/* @__PURE__ */ e.jsx(
|
|
325
330
|
Ae,
|
|
326
331
|
{
|
|
327
332
|
onChange: d,
|
|
328
|
-
createHistorySnapshot:
|
|
333
|
+
createHistorySnapshot: s,
|
|
329
334
|
formData: l,
|
|
330
335
|
properties: i
|
|
331
336
|
}
|
|
@@ -337,7 +342,7 @@ function fr() {
|
|
|
337
342
|
/* @__PURE__ */ e.jsx(
|
|
338
343
|
"div",
|
|
339
344
|
{
|
|
340
|
-
className: `h-[8px] w-[8px] rounded-full ${b(
|
|
345
|
+
className: `h-[8px] w-[8px] rounded-full ${b(u(r, "_bindings", {})) ? "bg-gray-300" : "bg-blue-500"}`
|
|
341
346
|
}
|
|
342
347
|
),
|
|
343
348
|
"Data Binding"
|
|
@@ -345,9 +350,9 @@ function fr() {
|
|
|
345
350
|
/* @__PURE__ */ e.jsx(de, { className: "pt-4 px-4", children: /* @__PURE__ */ e.jsx(
|
|
346
351
|
yr,
|
|
347
352
|
{
|
|
348
|
-
bindingData:
|
|
349
|
-
onChange: (
|
|
350
|
-
d({ formData: { ...l, _bindings:
|
|
353
|
+
bindingData: u(l, "_bindings", {}),
|
|
354
|
+
onChange: (c) => {
|
|
355
|
+
d({ formData: { ...l, _bindings: c } }, "root._bindings");
|
|
351
356
|
}
|
|
352
357
|
}
|
|
353
358
|
) })
|
|
@@ -358,18 +363,18 @@ function fr() {
|
|
|
358
363
|
"Static Content"
|
|
359
364
|
] }) }),
|
|
360
365
|
/* @__PURE__ */ e.jsxs(de, { className: "pt-4", children: [
|
|
361
|
-
b(
|
|
366
|
+
b(n) ? "" : /* @__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: [
|
|
362
367
|
"Data binding is set for ",
|
|
363
|
-
/* @__PURE__ */ e.jsx("b", { children:
|
|
368
|
+
/* @__PURE__ */ e.jsx("b", { children: N(n, ut).join(", ") }),
|
|
364
369
|
" ",
|
|
365
|
-
|
|
370
|
+
n.length === 1 ? "property" : "properties",
|
|
366
371
|
". Remove data binding to edit static content."
|
|
367
372
|
] }),
|
|
368
373
|
/* @__PURE__ */ e.jsx(
|
|
369
374
|
Ae,
|
|
370
375
|
{
|
|
371
376
|
onChange: d,
|
|
372
|
-
createHistorySnapshot:
|
|
377
|
+
createHistorySnapshot: s,
|
|
373
378
|
formData: l,
|
|
374
379
|
properties: p
|
|
375
380
|
}
|
|
@@ -380,60 +385,60 @@ function fr() {
|
|
|
380
385
|
/* @__PURE__ */ e.jsx("div", { className: "pb-60" })
|
|
381
386
|
] });
|
|
382
387
|
}
|
|
383
|
-
const De = new
|
|
388
|
+
const De = new lr(or, {
|
|
384
389
|
isCaseSensitive: !1,
|
|
385
390
|
threshold: 0.2,
|
|
386
391
|
minMatchCharLength: 2,
|
|
387
392
|
keys: ["name"]
|
|
388
393
|
});
|
|
389
|
-
function
|
|
390
|
-
var
|
|
391
|
-
const [r] = je(),
|
|
392
|
-
const
|
|
393
|
-
t(l,
|
|
394
|
-
}, [
|
|
395
|
-
const
|
|
396
|
-
let
|
|
394
|
+
function vr() {
|
|
395
|
+
var S;
|
|
396
|
+
const [r] = je(), o = te(), t = Ue(), a = Ge(), [l] = Ke(), [s, d] = k(""), i = (S = fe(r)) == null ? void 0 : S.prop, n = gt((u(o, i, "").replace(nr, "").split(",").pop() || "").split(" "), b), p = () => {
|
|
397
|
+
const j = s.trim().toLowerCase().replace(/ +(?= )/g, "").split(" ");
|
|
398
|
+
t(l, j, !0), d("");
|
|
399
|
+
}, [c, h] = k([]), g = ({ value: j }) => {
|
|
400
|
+
const I = j.trim().toLowerCase(), B = I.match(/.+:/g);
|
|
401
|
+
let v = [];
|
|
397
402
|
if (B && B.length > 0) {
|
|
398
|
-
const [
|
|
399
|
-
|
|
400
|
-
...
|
|
401
|
-
item: { ...
|
|
403
|
+
const [C] = B, _ = I.replace(C, "");
|
|
404
|
+
v = De.search(_).map((m) => ({
|
|
405
|
+
...m,
|
|
406
|
+
item: { ...m.item, name: C + m.item.name }
|
|
402
407
|
}));
|
|
403
408
|
} else
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
},
|
|
407
|
-
|
|
408
|
-
},
|
|
409
|
+
v = De.search(I);
|
|
410
|
+
h(N(v, "item"));
|
|
411
|
+
}, y = () => {
|
|
412
|
+
h([]);
|
|
413
|
+
}, x = (j) => j.name, f = (j) => /* @__PURE__ */ e.jsx("div", { className: "rounded-md p-1", children: j.name }), $ = {
|
|
409
414
|
autoComplete: "off",
|
|
410
415
|
autoCorrect: "off",
|
|
411
416
|
autoCapitalize: "off",
|
|
412
417
|
spellCheck: !1,
|
|
413
418
|
placeholder: "Enter class name",
|
|
414
|
-
value:
|
|
415
|
-
onKeyDown: (
|
|
416
|
-
|
|
419
|
+
value: s,
|
|
420
|
+
onKeyDown: (j) => {
|
|
421
|
+
j.key === "Enter" && s.trim() !== "" && p();
|
|
417
422
|
},
|
|
418
|
-
onChange: (
|
|
423
|
+
onChange: (j, { newValue: I }) => d(I),
|
|
419
424
|
className: "w-full rounded-md text-xs px-2 hover:outline-0 bg-background border-border py-1"
|
|
420
425
|
};
|
|
421
426
|
return /* @__PURE__ */ e.jsxs(
|
|
422
427
|
"div",
|
|
423
428
|
{
|
|
424
|
-
className: `no-scrollbar flex ${
|
|
429
|
+
className: `no-scrollbar flex ${c.length > 0 ? "min-h-[300px]" : "min-h-max"} w-full flex-col gap-y-5 overflow-y-auto bg-gray-100 px-px`,
|
|
425
430
|
children: [
|
|
426
431
|
/* @__PURE__ */ e.jsx(Ce, { className: "mt-2", children: "Add Tailwind classes" }),
|
|
427
432
|
/* @__PURE__ */ e.jsxs("div", { className: "relative -mt-4 flex items-center gap-x-3", children: [
|
|
428
433
|
/* @__PURE__ */ e.jsx("div", { className: "relative flex w-full items-center gap-x-3", children: /* @__PURE__ */ e.jsx(
|
|
429
434
|
Qe,
|
|
430
435
|
{
|
|
431
|
-
suggestions:
|
|
432
|
-
onSuggestionsFetchRequested:
|
|
433
|
-
onSuggestionsClearRequested:
|
|
434
|
-
getSuggestionValue:
|
|
435
|
-
renderSuggestion:
|
|
436
|
-
inputProps:
|
|
436
|
+
suggestions: c,
|
|
437
|
+
onSuggestionsFetchRequested: g,
|
|
438
|
+
onSuggestionsClearRequested: y,
|
|
439
|
+
getSuggestionValue: x,
|
|
440
|
+
renderSuggestion: f,
|
|
441
|
+
inputProps: $,
|
|
437
442
|
containerProps: {
|
|
438
443
|
className: "relative h-8 w-full gap-y-1 py-1 border-gray-600"
|
|
439
444
|
},
|
|
@@ -450,31 +455,31 @@ function br() {
|
|
|
450
455
|
variant: "outline",
|
|
451
456
|
className: "h-6 border-gray-700",
|
|
452
457
|
onClick: p,
|
|
453
|
-
disabled:
|
|
458
|
+
disabled: s.trim() === "",
|
|
454
459
|
size: "sm",
|
|
455
460
|
children: /* @__PURE__ */ e.jsx(ve, {})
|
|
456
461
|
}
|
|
457
462
|
)
|
|
458
463
|
] }),
|
|
459
464
|
/* @__PURE__ */ e.jsxs("div", { className: "flex w-full flex-wrap gap-2", children: [
|
|
460
|
-
b(
|
|
465
|
+
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" }),
|
|
461
466
|
se.Children.toArray(
|
|
462
|
-
|
|
467
|
+
n.map((j) => /* @__PURE__ */ e.jsxs(
|
|
463
468
|
"div",
|
|
464
469
|
{
|
|
465
470
|
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",
|
|
466
471
|
children: [
|
|
467
|
-
|
|
472
|
+
j,
|
|
468
473
|
/* @__PURE__ */ e.jsx(
|
|
469
474
|
Fe,
|
|
470
475
|
{
|
|
471
|
-
onClick: () =>
|
|
476
|
+
onClick: () => a(l, [j]),
|
|
472
477
|
className: "invisible absolute right-1 hover:text-white group-hover:visible group-hover:cursor-pointer"
|
|
473
478
|
}
|
|
474
479
|
)
|
|
475
480
|
]
|
|
476
481
|
},
|
|
477
|
-
|
|
482
|
+
j
|
|
478
483
|
))
|
|
479
484
|
)
|
|
480
485
|
] })
|
|
@@ -482,7 +487,7 @@ function br() {
|
|
|
482
487
|
}
|
|
483
488
|
);
|
|
484
489
|
}
|
|
485
|
-
const D = ["px", "%", "em", "rem", "ch", "vh", "vw"],
|
|
490
|
+
const D = ["px", "%", "em", "rem", "ch", "vh", "vw"], wr = {
|
|
486
491
|
heading: "Flex Child",
|
|
487
492
|
items: [
|
|
488
493
|
{ type: "arbitrary", label: "Basis", units: D, property: "flexBasis" },
|
|
@@ -491,7 +496,7 @@ const D = ["px", "%", "em", "rem", "ch", "vh", "vw"], vr = {
|
|
|
491
496
|
{ type: "dropdown", label: "Grow", property: "flexGrow" },
|
|
492
497
|
{ type: "dropdown", label: "Shrink", property: "flexShrink" }
|
|
493
498
|
]
|
|
494
|
-
},
|
|
499
|
+
}, jr = {
|
|
495
500
|
heading: "Grid Child",
|
|
496
501
|
items: [
|
|
497
502
|
{ type: "range", label: "Col Span", property: "gridColSpan" },
|
|
@@ -502,7 +507,7 @@ const D = ["px", "%", "em", "rem", "ch", "vh", "vw"], vr = {
|
|
|
502
507
|
{ type: "range", label: "Row End", property: "gridRowEnd" },
|
|
503
508
|
{ type: "range", label: "Order", property: "order" }
|
|
504
509
|
]
|
|
505
|
-
},
|
|
510
|
+
}, Cr = [
|
|
506
511
|
{
|
|
507
512
|
heading: "Display",
|
|
508
513
|
items: [
|
|
@@ -904,72 +909,72 @@ const D = ["px", "%", "em", "rem", "ch", "vh", "vw"], vr = {
|
|
|
904
909
|
},
|
|
905
910
|
{
|
|
906
911
|
heading: "Classes",
|
|
907
|
-
items: [{ component:
|
|
912
|
+
items: [{ component: vr }]
|
|
908
913
|
}
|
|
909
914
|
], rt = {
|
|
910
915
|
"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" }) }),
|
|
911
916
|
// visibility
|
|
912
|
-
visible:
|
|
917
|
+
visible: bt,
|
|
913
918
|
invisible: Te,
|
|
914
919
|
// display
|
|
915
920
|
hidden: Te,
|
|
916
|
-
gap:
|
|
917
|
-
gapX:
|
|
918
|
-
gapY:
|
|
919
|
-
spaceX:
|
|
920
|
-
spaceY:
|
|
921
|
-
overscroll:
|
|
922
|
-
overscrollX:
|
|
923
|
-
overscrollY:
|
|
924
|
-
overflow:
|
|
925
|
-
overflowX:
|
|
926
|
-
overflowY:
|
|
921
|
+
gap: E,
|
|
922
|
+
gapX: H,
|
|
923
|
+
gapY: V,
|
|
924
|
+
spaceX: H,
|
|
925
|
+
spaceY: V,
|
|
926
|
+
overscroll: E,
|
|
927
|
+
overscrollX: H,
|
|
928
|
+
overscrollY: V,
|
|
929
|
+
overflow: E,
|
|
930
|
+
overflowX: H,
|
|
931
|
+
overflowY: V,
|
|
927
932
|
top: G,
|
|
928
933
|
right: K,
|
|
929
934
|
bottom: q,
|
|
930
935
|
left: J,
|
|
931
|
-
inset:
|
|
932
|
-
insetX:
|
|
933
|
-
insetY:
|
|
934
|
-
border:
|
|
935
|
-
borderX:
|
|
936
|
-
borderY:
|
|
936
|
+
inset: E,
|
|
937
|
+
insetX: H,
|
|
938
|
+
insetY: V,
|
|
939
|
+
border: E,
|
|
940
|
+
borderX: H,
|
|
941
|
+
borderY: V,
|
|
937
942
|
borderTop: G,
|
|
938
943
|
borderRight: K,
|
|
939
944
|
borderBottom: q,
|
|
940
945
|
borderLeft: J,
|
|
941
|
-
borderRadius:
|
|
942
|
-
borderRadiusX:
|
|
943
|
-
borderRadiusY:
|
|
946
|
+
borderRadius: E,
|
|
947
|
+
borderRadiusX: H,
|
|
948
|
+
borderRadiusY: V,
|
|
944
949
|
borderRadiusTop: G,
|
|
945
950
|
borderRadiusRight: K,
|
|
946
951
|
borderRadiusBottom: q,
|
|
947
952
|
borderRadiusLeft: J,
|
|
948
|
-
borderRadiusTopLeft:
|
|
953
|
+
borderRadiusTopLeft: ft,
|
|
949
954
|
borderRadiusTopRight: vt,
|
|
950
955
|
borderRadiusBottomRight: wt,
|
|
951
956
|
borderRadiusBottomLeft: jt,
|
|
952
|
-
divideXWidth:
|
|
953
|
-
divideYWidth:
|
|
954
|
-
scale:
|
|
955
|
-
scaleX:
|
|
956
|
-
scaleY:
|
|
957
|
-
skewX:
|
|
958
|
-
skewY:
|
|
959
|
-
translateX:
|
|
960
|
-
translateY:
|
|
957
|
+
divideXWidth: H,
|
|
958
|
+
divideYWidth: V,
|
|
959
|
+
scale: E,
|
|
960
|
+
scaleX: H,
|
|
961
|
+
scaleY: V,
|
|
962
|
+
skewX: H,
|
|
963
|
+
skewY: V,
|
|
964
|
+
translateX: H,
|
|
965
|
+
translateY: V,
|
|
961
966
|
// padding
|
|
962
|
-
padding:
|
|
963
|
-
paddingX:
|
|
964
|
-
paddingY:
|
|
967
|
+
padding: E,
|
|
968
|
+
paddingX: H,
|
|
969
|
+
paddingY: V,
|
|
965
970
|
paddingTop: G,
|
|
966
971
|
paddingRight: K,
|
|
967
972
|
paddingBottom: q,
|
|
968
973
|
paddingLeft: J,
|
|
969
974
|
// margin
|
|
970
|
-
margin:
|
|
971
|
-
marginX:
|
|
972
|
-
marginY:
|
|
975
|
+
margin: E,
|
|
976
|
+
marginX: H,
|
|
977
|
+
marginY: V,
|
|
973
978
|
marginTop: G,
|
|
974
979
|
marginRight: K,
|
|
975
980
|
marginBottom: q,
|
|
@@ -984,9 +989,9 @@ const D = ["px", "%", "em", "rem", "ch", "vh", "vw"], vr = {
|
|
|
984
989
|
// "not-italic": "",
|
|
985
990
|
// decoration
|
|
986
991
|
underline: Rt,
|
|
987
|
-
overline:
|
|
992
|
+
overline: Ht,
|
|
988
993
|
// transform
|
|
989
|
-
uppercase:
|
|
994
|
+
uppercase: Vt,
|
|
990
995
|
block: () => /* @__PURE__ */ e.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
991
996
|
/* @__PURE__ */ e.jsx(
|
|
992
997
|
"path",
|
|
@@ -1100,95 +1105,95 @@ const D = ["px", "%", "em", "rem", "ch", "vh", "vw"], vr = {
|
|
|
1100
1105
|
)
|
|
1101
1106
|
] }),
|
|
1102
1107
|
static: Bt
|
|
1103
|
-
}, re =
|
|
1108
|
+
}, re = Pe({ canReset: !1, canChange: !0 }), kr = ({ children: r, canReset: o = !1, canChange: t = !0 }) => (
|
|
1104
1109
|
// eslint-disable-next-line react/jsx-no-constructed-context-values
|
|
1105
|
-
/* @__PURE__ */ e.jsx(re.Provider, { value: { canReset:
|
|
1106
|
-
), lt = ({ label: r, property:
|
|
1107
|
-
const
|
|
1110
|
+
/* @__PURE__ */ e.jsx(re.Provider, { value: { canReset: o, canChange: t }, children: r })
|
|
1111
|
+
), lt = ({ label: r, property: o, onChange: t }) => {
|
|
1112
|
+
const a = R(() => u(pe, `${o}.classes`, [""]), [o]), l = le(o), s = R(() => u(l, "cls", ""), [l]), { canChange: d } = ee(re), i = /\[.*\]/g.test(s);
|
|
1108
1113
|
return /* @__PURE__ */ e.jsx("div", { className: r ? "w-full rounded " : "grow", children: i ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
|
|
1109
|
-
/* @__PURE__ */ e.jsx(
|
|
1110
|
-
/* @__PURE__ */ e.jsxs(
|
|
1111
|
-
/* @__PURE__ */ e.jsx(
|
|
1114
|
+
/* @__PURE__ */ e.jsx(ar, { className: "w-[70%] rounded py-1", readOnly: !0, value: s }),
|
|
1115
|
+
/* @__PURE__ */ e.jsxs(Y, { delayDuration: 100, children: [
|
|
1116
|
+
/* @__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(we, {}) }) }),
|
|
1112
1117
|
/* @__PURE__ */ e.jsx(W, { children: "Current value is using a Tailwind arbitrary value." })
|
|
1113
1118
|
] })
|
|
1114
1119
|
] }) : /* @__PURE__ */ e.jsx(
|
|
1115
|
-
|
|
1120
|
+
ye,
|
|
1116
1121
|
{
|
|
1117
1122
|
rounded: r,
|
|
1118
|
-
onChange: (
|
|
1119
|
-
selected:
|
|
1120
|
-
options:
|
|
1123
|
+
onChange: (n) => t(n, o),
|
|
1124
|
+
selected: s,
|
|
1125
|
+
options: a,
|
|
1121
1126
|
disabled: !d
|
|
1122
1127
|
}
|
|
1123
1128
|
) });
|
|
1124
1129
|
};
|
|
1125
|
-
function
|
|
1126
|
-
const
|
|
1130
|
+
function ye({ selected: r, onChange: o, rounded: t = !1, options: a, disabled: l = !1 }) {
|
|
1131
|
+
const s = r.replace(/.*:/g, "").trim(), { undo: d, redo: i } = Ze();
|
|
1127
1132
|
return /* @__PURE__ */ e.jsxs(
|
|
1128
1133
|
"select",
|
|
1129
1134
|
{
|
|
1130
|
-
disabled: !
|
|
1135
|
+
disabled: !a.length || l,
|
|
1131
1136
|
className: `${t ? "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`,
|
|
1132
|
-
onChange: (
|
|
1133
|
-
onKeyDown: (
|
|
1134
|
-
|
|
1137
|
+
onChange: (n) => o(n.target.value),
|
|
1138
|
+
onKeyDown: (n) => {
|
|
1139
|
+
n.ctrlKey && (n.key === "z" && d(), n.key === "y" && i());
|
|
1135
1140
|
},
|
|
1136
|
-
value:
|
|
1141
|
+
value: s,
|
|
1137
1142
|
children: [
|
|
1138
1143
|
/* @__PURE__ */ e.jsx("option", { className: "bg-transparent", value: "" }),
|
|
1139
|
-
|
|
1140
|
-
|
|
1144
|
+
P.Children.toArray(
|
|
1145
|
+
a.map((n) => /* @__PURE__ */ e.jsx("option", { className: "bg-transparent", value: n, children: n }))
|
|
1141
1146
|
)
|
|
1142
1147
|
]
|
|
1143
1148
|
}
|
|
1144
1149
|
);
|
|
1145
1150
|
}
|
|
1146
|
-
const
|
|
1147
|
-
const { canReset: t, canChange:
|
|
1148
|
-
return /* @__PURE__ */ e.jsx("div", { className: "flex flex-row divide-x divide-solid divide-border rounded border border-border text-xs", children:
|
|
1151
|
+
const Nr = ({ property: r, onChange: o }) => {
|
|
1152
|
+
const { canReset: t, canChange: a } = ee(re), l = le(r), s = R(() => u(l, "cls", ""), [l]), d = R(() => u(pe, `${r}.classes`, [""]), [r]), i = d.indexOf(s) > -1 ? d.indexOf(s) : 0, n = /\[.*\]/g.test(s);
|
|
1153
|
+
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: s }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1149
1154
|
/* @__PURE__ */ e.jsx(
|
|
1150
1155
|
"button",
|
|
1151
1156
|
{
|
|
1152
1157
|
type: "button",
|
|
1153
1158
|
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",
|
|
1154
|
-
disabled: !
|
|
1155
|
-
onClick: () =>
|
|
1156
|
-
children: /* @__PURE__ */ e.jsx("span", { className: "flex items-center justify-center", children: /* @__PURE__ */ e.jsx(At, { className: !
|
|
1159
|
+
disabled: !a && (!t || i - 1 < 0),
|
|
1160
|
+
onClick: () => o(Se(d, i - 1), r),
|
|
1161
|
+
children: /* @__PURE__ */ e.jsx("span", { className: "flex items-center justify-center", children: /* @__PURE__ */ e.jsx(At, { className: !a && (!t || i - 1 < 0) ? "text-gray-500" : "text-white/60" }) })
|
|
1157
1162
|
}
|
|
1158
1163
|
),
|
|
1159
|
-
/* @__PURE__ */ e.jsx("div", { className: "w-8/12 text-center", children: /* @__PURE__ */ e.jsx(lt, { label: !1, property: r, onChange:
|
|
1164
|
+
/* @__PURE__ */ e.jsx("div", { className: "w-8/12 text-center", children: /* @__PURE__ */ e.jsx(lt, { label: !1, property: r, onChange: o }) }),
|
|
1160
1165
|
/* @__PURE__ */ e.jsx(
|
|
1161
1166
|
"button",
|
|
1162
1167
|
{
|
|
1163
1168
|
type: "button",
|
|
1164
1169
|
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",
|
|
1165
|
-
disabled: !
|
|
1166
|
-
onClick: () =>
|
|
1170
|
+
disabled: !a && (!t || i + 1 >= d.length),
|
|
1171
|
+
onClick: () => o(Se(d, i + 1), r),
|
|
1167
1172
|
children: /* @__PURE__ */ e.jsx("span", { className: "flex items-center justify-center", children: /* @__PURE__ */ e.jsx(
|
|
1168
1173
|
ve,
|
|
1169
1174
|
{
|
|
1170
|
-
className: !
|
|
1175
|
+
className: !a && (!t || i + 1 >= d.length) ? "text-gray-500" : "text-white/60"
|
|
1171
1176
|
}
|
|
1172
1177
|
) })
|
|
1173
1178
|
}
|
|
1174
1179
|
)
|
|
1175
1180
|
] }) });
|
|
1176
|
-
},
|
|
1177
|
-
const t =
|
|
1178
|
-
return /* @__PURE__ */ e.jsx("div", { className: "flex grow flex-wrap gap-1", children:
|
|
1179
|
-
/* @__PURE__ */ e.jsx(
|
|
1181
|
+
}, Sr = ({ property: r, onChange: o }) => {
|
|
1182
|
+
const t = R(() => u(pe, `${r}.classes`, [""]), [r]), { canChange: a } = ee(re), l = le(r), s = R(() => u(l, "cls", ""), [l]);
|
|
1183
|
+
return /* @__PURE__ */ e.jsx("div", { className: "flex grow flex-wrap gap-1", children: N(t, (d) => /* @__PURE__ */ e.jsxs(Y, { children: [
|
|
1184
|
+
/* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
1180
1185
|
"button",
|
|
1181
1186
|
{
|
|
1182
1187
|
type: "button",
|
|
1183
|
-
disabled: !
|
|
1184
|
-
onClick: () =>
|
|
1185
|
-
className: `cursor-pointer rounded border border-gray-600 p-1 disabled:cursor-not-allowed ${
|
|
1186
|
-
children:
|
|
1188
|
+
disabled: !a,
|
|
1189
|
+
onClick: () => o(d, r),
|
|
1190
|
+
className: `cursor-pointer rounded border border-gray-600 p-1 disabled:cursor-not-allowed ${s === d ? " bg-blue-500 text-white" : "disabled:bg-gray-600 disabled:text-gray-400"}`,
|
|
1191
|
+
children: P.createElement(u(rt, d, Ye))
|
|
1187
1192
|
}
|
|
1188
1193
|
) }),
|
|
1189
1194
|
/* @__PURE__ */ e.jsx(W, { children: Q(ne(d)) })
|
|
1190
1195
|
] })) });
|
|
1191
|
-
},
|
|
1196
|
+
}, Tr = {
|
|
1192
1197
|
backgroundColor: "bg",
|
|
1193
1198
|
textColor: "text",
|
|
1194
1199
|
borderColor: "border",
|
|
@@ -1200,39 +1205,39 @@ const kr = ({ property: r, onChange: s }) => {
|
|
|
1200
1205
|
toColor: "to",
|
|
1201
1206
|
ringColor: "ring",
|
|
1202
1207
|
ringOffsetColor: "ring-offset"
|
|
1203
|
-
},
|
|
1204
|
-
const t = le(r),
|
|
1208
|
+
}, Rr = ({ property: r, onChange: o }) => {
|
|
1209
|
+
const t = le(r), a = R(() => u(t, "cls", ""), [t]), { canChange: l } = ee(re), [s, d] = k([]), [i, n] = k({ color: "", shade: "" }), p = a.split("-"), c = u(p, "1", ""), h = u(p, "2", ""), g = L(
|
|
1205
1210
|
// eslint-disable-next-line no-shadow
|
|
1206
|
-
(
|
|
1207
|
-
["current", "inherit", "transparent", "black", "white"].includes(
|
|
1211
|
+
(x) => {
|
|
1212
|
+
["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" })));
|
|
1208
1213
|
},
|
|
1209
|
-
[d,
|
|
1214
|
+
[d, n]
|
|
1210
1215
|
);
|
|
1211
1216
|
M(() => {
|
|
1212
|
-
if (["current", "inherit", "transparent", "black", "white"].includes(
|
|
1217
|
+
if (["current", "inherit", "transparent", "black", "white"].includes(c))
|
|
1213
1218
|
return d([]);
|
|
1214
1219
|
d(["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"]);
|
|
1215
|
-
}, [
|
|
1216
|
-
const
|
|
1220
|
+
}, [c]);
|
|
1221
|
+
const y = L(
|
|
1217
1222
|
// eslint-disable-next-line no-shadow
|
|
1218
|
-
(
|
|
1219
|
-
|
|
1223
|
+
(x) => {
|
|
1224
|
+
n({ color: c, shade: x });
|
|
1220
1225
|
},
|
|
1221
|
-
[
|
|
1226
|
+
[c]
|
|
1222
1227
|
);
|
|
1223
1228
|
return M(() => {
|
|
1224
|
-
|
|
1229
|
+
n({ color: "", shade: "" });
|
|
1225
1230
|
}, [t]), M(() => {
|
|
1226
|
-
const
|
|
1227
|
-
|
|
1228
|
-
}, [i,
|
|
1231
|
+
const f = `${u(Tr, r, "")}-${i.color}${i.shade ? `-${i.shade}` : ""}`;
|
|
1232
|
+
f.match(new RegExp(u(pe, `${r}.regExp`, ""))) && o(f, r);
|
|
1233
|
+
}, [i, o, r]), /* @__PURE__ */ e.jsxs("div", { className: "flex flex-row divide-x divide-solid divide-border rounded-lg border border-border text-xs", children: [
|
|
1229
1234
|
/* @__PURE__ */ e.jsx("div", { className: "grow text-center", children: /* @__PURE__ */ e.jsx(
|
|
1230
|
-
|
|
1235
|
+
ye,
|
|
1231
1236
|
{
|
|
1232
1237
|
disabled: !l,
|
|
1233
1238
|
rounded: !0,
|
|
1234
|
-
selected:
|
|
1235
|
-
onChange:
|
|
1239
|
+
selected: c,
|
|
1240
|
+
onChange: g,
|
|
1236
1241
|
options: [
|
|
1237
1242
|
"current",
|
|
1238
1243
|
"transparent",
|
|
@@ -1265,19 +1270,19 @@ const kr = ({ property: r, onChange: s }) => {
|
|
|
1265
1270
|
]
|
|
1266
1271
|
}
|
|
1267
1272
|
) }),
|
|
1268
|
-
/* @__PURE__ */ e.jsx("button", { type: "button", className: "grow text-center", children: /* @__PURE__ */ e.jsx(
|
|
1273
|
+
/* @__PURE__ */ e.jsx("button", { type: "button", className: "grow text-center", children: /* @__PURE__ */ e.jsx(ye, { rounded: !0, selected: h, disabled: !c || !l, onChange: y, options: s }) })
|
|
1269
1274
|
] });
|
|
1270
|
-
}, $e = (r,
|
|
1275
|
+
}, $e = (r, o) => {
|
|
1271
1276
|
r = r.toLowerCase();
|
|
1272
1277
|
let t = r.trim().replace(/ |\+/g, "");
|
|
1273
|
-
if ((t === "auto" || t === "none") &&
|
|
1278
|
+
if ((t === "auto" || t === "none") && o.includes(t))
|
|
1274
1279
|
return { value: "", unit: t };
|
|
1275
|
-
const
|
|
1276
|
-
t = t.replace(
|
|
1277
|
-
const l = r.match(
|
|
1278
|
-
return
|
|
1279
|
-
},
|
|
1280
|
-
const
|
|
1280
|
+
const a = o.length ? new RegExp(o.join("|"), "g") : /XXXXXX/g;
|
|
1281
|
+
t = t.replace(a, "");
|
|
1282
|
+
const l = r.match(a), s = l && l.length > 1, d = !b(t) && Number.isNaN(Number(t));
|
|
1283
|
+
return s || d ? { error: "Invalid value" } : l && (l[0] === "auto" || l[0] === "none") ? { value: l[0], unit: "" } : { value: t, unit: l ? l[0] : "" };
|
|
1284
|
+
}, Hr = (r) => {
|
|
1285
|
+
const o = r.startsWith("-") ? "-" : "", t = r.split("-").pop();
|
|
1281
1286
|
if (["auto", "none"].includes(t))
|
|
1282
1287
|
return { value: "", unit: t };
|
|
1283
1288
|
if (t === "px")
|
|
@@ -1287,21 +1292,21 @@ const kr = ({ property: r, onChange: s }) => {
|
|
|
1287
1292
|
if (t === "full")
|
|
1288
1293
|
return { value: "100", unit: "%" };
|
|
1289
1294
|
if (O(r, "skew-"))
|
|
1290
|
-
return { value: `${
|
|
1295
|
+
return { value: `${o}${t}`, unit: "deg" };
|
|
1291
1296
|
if (O(r, "rotate-"))
|
|
1292
|
-
return { value: `${
|
|
1297
|
+
return { value: `${o}${t}`, unit: "deg" };
|
|
1293
1298
|
if (O(r, "opacity-"))
|
|
1294
1299
|
return { value: `${t / 100}`, unit: "-" };
|
|
1295
1300
|
if (O(r, "duration-") || O(r, "delay-"))
|
|
1296
1301
|
return { value: `${t}`, unit: "ms" };
|
|
1297
1302
|
if (O(r, "translate-") && !t.includes("/"))
|
|
1298
|
-
return { value: `${
|
|
1303
|
+
return { value: `${o}${`${t / 4}`}`, unit: "rem" };
|
|
1299
1304
|
if (O(r, "scale-"))
|
|
1300
|
-
return { value: `${
|
|
1305
|
+
return { value: `${o}${`${t / 100}`}`, unit: "-" };
|
|
1301
1306
|
if (Z(r, "border")) {
|
|
1302
|
-
const
|
|
1303
|
-
if (
|
|
1304
|
-
return { value:
|
|
1307
|
+
const a = r.match(/border-?(x|y|t|r|b|l)?\d+/g);
|
|
1308
|
+
if (a)
|
|
1309
|
+
return { value: a[0].split("-").pop(), unit: "px" };
|
|
1305
1310
|
if (r.match(/border-?(x|y|t|r|b|l)?/g))
|
|
1306
1311
|
return { value: "1", unit: "px" };
|
|
1307
1312
|
}
|
|
@@ -1400,28 +1405,28 @@ const kr = ({ property: r, onChange: s }) => {
|
|
|
1400
1405
|
if (["max", "min", "fit"].includes(t))
|
|
1401
1406
|
return { value: r, unit: "class" };
|
|
1402
1407
|
if (t.includes("/")) {
|
|
1403
|
-
const [
|
|
1404
|
-
return { value:
|
|
1408
|
+
const [a, l] = N(t.split("/"), (s) => parseInt(s, 10));
|
|
1409
|
+
return { value: o + (a / l * 100).toFixed(2).replace(".00", ""), unit: "%" };
|
|
1405
1410
|
}
|
|
1406
|
-
return xt(parseFloat(t)) ? { value: `${
|
|
1411
|
+
return xt(parseFloat(t)) ? { value: `${o + parseFloat(t) * 4}`, unit: "px" } : { value: t, unit: "class" };
|
|
1407
1412
|
}, Vr = (r) => {
|
|
1408
1413
|
if (b(r))
|
|
1409
1414
|
return { value: "", unit: "" };
|
|
1410
|
-
const
|
|
1411
|
-
if (
|
|
1412
|
-
return
|
|
1413
|
-
const t =
|
|
1414
|
-
return { value: `${
|
|
1415
|
-
},
|
|
1415
|
+
const o = r.match(/\[.*\]/g);
|
|
1416
|
+
if (o === null)
|
|
1417
|
+
return Br(r);
|
|
1418
|
+
const t = u(o, "0", "").replace(/\[|\]/g, ""), a = r.startsWith("-") ? "-" : "", l = fe(t.match(/\d+.\d+|\d+/g));
|
|
1419
|
+
return { value: `${a}${l}`, unit: t.replace(l, "") };
|
|
1420
|
+
}, Br = (r) => b(r) ? { value: "", unit: "" } : Hr(r), ot = P.createContext({
|
|
1416
1421
|
setDragData: () => {
|
|
1417
1422
|
}
|
|
1418
|
-
}),
|
|
1423
|
+
}), Ar = ({
|
|
1419
1424
|
unit: r,
|
|
1420
|
-
currentValue:
|
|
1425
|
+
currentValue: o,
|
|
1421
1426
|
onDrag: t,
|
|
1422
|
-
onDragEnd:
|
|
1427
|
+
onDragEnd: a,
|
|
1423
1428
|
onDragStart: l,
|
|
1424
|
-
negative:
|
|
1429
|
+
negative: s,
|
|
1425
1430
|
cssProperty: d
|
|
1426
1431
|
}) => {
|
|
1427
1432
|
const { setDragData: i } = ee(ot);
|
|
@@ -1429,15 +1434,15 @@ const kr = ({ property: r, onChange: s }) => {
|
|
|
1429
1434
|
"button",
|
|
1430
1435
|
{
|
|
1431
1436
|
type: "button",
|
|
1432
|
-
onMouseDown: (
|
|
1437
|
+
onMouseDown: (n) => {
|
|
1433
1438
|
const p = {
|
|
1434
1439
|
onDrag: t,
|
|
1435
|
-
onDragEnd:
|
|
1440
|
+
onDragEnd: a,
|
|
1436
1441
|
dragging: !0,
|
|
1437
|
-
dragStartY:
|
|
1438
|
-
dragStartValue: `${
|
|
1442
|
+
dragStartY: n.pageY,
|
|
1443
|
+
dragStartValue: `${o}`,
|
|
1439
1444
|
dragUnit: r,
|
|
1440
|
-
negative:
|
|
1445
|
+
negative: s,
|
|
1441
1446
|
cssProperty: d
|
|
1442
1447
|
};
|
|
1443
1448
|
l(p), i(p);
|
|
@@ -1447,172 +1452,172 @@ const kr = ({ property: r, onChange: s }) => {
|
|
|
1447
1452
|
children: /* @__PURE__ */ e.jsx($t, {})
|
|
1448
1453
|
}
|
|
1449
1454
|
);
|
|
1450
|
-
},
|
|
1455
|
+
}, Dr = ({ onSelect: r, current: o, units: t }) => /* @__PURE__ */ e.jsx("div", { "data-theme": "light", className: "-m-[7px] -mx-[13px] flex w-9 flex-col", children: t.map((a) => /* @__PURE__ */ e.jsx(
|
|
1451
1456
|
et,
|
|
1452
1457
|
{
|
|
1453
1458
|
className: "h-max rounded-none px-1 py-1 text-right text-[11px] hover:bg-blue-400",
|
|
1454
|
-
color:
|
|
1459
|
+
color: o === a ? "primary" : void 0,
|
|
1455
1460
|
size: "sm",
|
|
1456
1461
|
onClick: (l) => {
|
|
1457
|
-
l.stopPropagation(), r(
|
|
1462
|
+
l.stopPropagation(), r(a);
|
|
1458
1463
|
},
|
|
1459
|
-
children:
|
|
1464
|
+
children: a
|
|
1460
1465
|
},
|
|
1461
|
-
|
|
1462
|
-
)) }),
|
|
1463
|
-
const [
|
|
1466
|
+
a
|
|
1467
|
+
)) }), $r = (r) => {
|
|
1468
|
+
const [o, t] = k(!1), [a, l] = k(""), { currentClass: s, onChange: d, classPrefix: i, cssProperty: n, units: p, negative: c } = r, [h, g] = k(n != null && n.toLowerCase().includes("width") ? "%" : p[0]), [y, x] = k(!1), [f, $] = k(""), [S, j] = k(!1), [I, B] = k(!1);
|
|
1464
1469
|
M(() => {
|
|
1465
|
-
const { value:
|
|
1470
|
+
const { value: m, unit: w } = Vr(s);
|
|
1466
1471
|
if (w === "") {
|
|
1467
|
-
l(
|
|
1472
|
+
l(m), g(n != null && n.toLowerCase().includes("width") ? "%" : p[0]);
|
|
1468
1473
|
return;
|
|
1469
1474
|
}
|
|
1470
|
-
|
|
1471
|
-
}, [
|
|
1472
|
-
const
|
|
1473
|
-
(
|
|
1474
|
-
d(
|
|
1475
|
+
g(w), l(w === "class" || b(m) ? "" : m);
|
|
1476
|
+
}, [s, n, p]);
|
|
1477
|
+
const v = xe(
|
|
1478
|
+
(m) => {
|
|
1479
|
+
d(m);
|
|
1475
1480
|
},
|
|
1476
1481
|
[d],
|
|
1477
1482
|
200
|
|
1478
|
-
),
|
|
1479
|
-
(
|
|
1480
|
-
d(
|
|
1483
|
+
), C = xe(
|
|
1484
|
+
(m) => {
|
|
1485
|
+
d(m, !1);
|
|
1481
1486
|
},
|
|
1482
1487
|
[d],
|
|
1483
1488
|
200
|
|
1484
|
-
),
|
|
1485
|
-
(
|
|
1486
|
-
const w = $e(`${
|
|
1487
|
-
if (
|
|
1488
|
-
|
|
1489
|
+
), _ = L(
|
|
1490
|
+
(m = !1) => {
|
|
1491
|
+
const w = $e(`${a}`, p);
|
|
1492
|
+
if (u(w, "error", !1)) {
|
|
1493
|
+
x(!0);
|
|
1489
1494
|
return;
|
|
1490
1495
|
}
|
|
1491
|
-
const
|
|
1492
|
-
if (
|
|
1493
|
-
|
|
1496
|
+
const T = u(w, "unit") !== "" ? u(w, "unit") : h;
|
|
1497
|
+
if (T === "auto" || T === "none") {
|
|
1498
|
+
v(`${i}${T}`);
|
|
1494
1499
|
return;
|
|
1495
1500
|
}
|
|
1496
|
-
if (
|
|
1501
|
+
if (u(w, "value") === "")
|
|
1497
1502
|
return;
|
|
1498
|
-
const U = `${
|
|
1499
|
-
|
|
1503
|
+
const U = `${u(w, "value", "").startsWith("-") ? "-" : ""}${i}[${u(w, "value", "").replace("-", "")}${T === "-" ? "" : T}]`;
|
|
1504
|
+
m ? C(U) : v(U);
|
|
1500
1505
|
},
|
|
1501
|
-
[
|
|
1502
|
-
), oe =
|
|
1503
|
-
(
|
|
1504
|
-
const w = $e(`${
|
|
1505
|
-
if (
|
|
1506
|
-
|
|
1506
|
+
[v, C, a, h, i, p]
|
|
1507
|
+
), oe = L(
|
|
1508
|
+
(m) => {
|
|
1509
|
+
const w = $e(`${a}`, p);
|
|
1510
|
+
if (u(w, "error", !1)) {
|
|
1511
|
+
x(!0);
|
|
1507
1512
|
return;
|
|
1508
1513
|
}
|
|
1509
|
-
if (
|
|
1510
|
-
|
|
1514
|
+
if (m === "auto" || m === "none") {
|
|
1515
|
+
v(`${i}${m}`);
|
|
1511
1516
|
return;
|
|
1512
1517
|
}
|
|
1513
|
-
if (
|
|
1518
|
+
if (u(w, "value") === "")
|
|
1514
1519
|
return;
|
|
1515
|
-
const
|
|
1516
|
-
|
|
1520
|
+
const T = u(w, "unit") !== "" ? u(w, "unit") : m, U = `${u(w, "value", "").startsWith("-") ? "-" : ""}${i}[${u(w, "value", "").replace("-", "")}${T === "-" ? "" : T}]`;
|
|
1521
|
+
v(U);
|
|
1517
1522
|
},
|
|
1518
|
-
[
|
|
1523
|
+
[v, a, i, p]
|
|
1519
1524
|
);
|
|
1520
|
-
return /* @__PURE__ */ e.jsx("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-start", children:
|
|
1521
|
-
/* @__PURE__ */ e.jsx("input", { className: "w-20 rounded py-1", readOnly: !0, value:
|
|
1522
|
-
/* @__PURE__ */ e.jsxs(
|
|
1523
|
-
/* @__PURE__ */ e.jsx(
|
|
1525
|
+
return /* @__PURE__ */ e.jsx("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-start", children: h === "class" ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1526
|
+
/* @__PURE__ */ e.jsx("input", { className: "w-20 rounded py-1", readOnly: !0, value: s }),
|
|
1527
|
+
/* @__PURE__ */ e.jsxs(Y, { children: [
|
|
1528
|
+
/* @__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(we, {}) }) }),
|
|
1524
1529
|
/* @__PURE__ */ e.jsx(W, { children: "Current value is using a Tailwind preset class." })
|
|
1525
1530
|
] })
|
|
1526
|
-
] }) : /* @__PURE__ */ e.jsxs("div", { className: `group relative flex items-center ${
|
|
1531
|
+
] }) : /* @__PURE__ */ e.jsxs("div", { className: `group relative flex items-center ${S ? "z-auto" : ""}`, children: [
|
|
1527
1532
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center rounded-md border border-border", children: [
|
|
1528
|
-
["none", "auto"].indexOf(
|
|
1533
|
+
["none", "auto"].indexOf(h) !== -1 ? null : /* @__PURE__ */ e.jsx(
|
|
1529
1534
|
"input",
|
|
1530
1535
|
{
|
|
1531
|
-
readOnly:
|
|
1532
|
-
onKeyPress: (
|
|
1533
|
-
|
|
1536
|
+
readOnly: h === "class",
|
|
1537
|
+
onKeyPress: (m) => {
|
|
1538
|
+
m.key === "Enter" && _();
|
|
1534
1539
|
},
|
|
1535
|
-
onKeyDown: (
|
|
1536
|
-
if (
|
|
1540
|
+
onKeyDown: (m) => {
|
|
1541
|
+
if (m.keyCode !== 38 && m.keyCode !== 40)
|
|
1537
1542
|
return;
|
|
1538
|
-
|
|
1539
|
-
const w = ht(
|
|
1540
|
-
let
|
|
1541
|
-
|
|
1542
|
-
const
|
|
1543
|
-
|
|
1543
|
+
m.preventDefault(), B(!0);
|
|
1544
|
+
const w = ht(m.target.value);
|
|
1545
|
+
let T = Me(w) ? 0 : w;
|
|
1546
|
+
m.keyCode === 38 && (T += 1), m.keyCode === 40 && (T -= 1);
|
|
1547
|
+
const F = `${T}`, nt = `${F.startsWith("-") ? "-" : ""}${i}[${F.replace("-", "")}${h === "-" ? "" : h}]`;
|
|
1548
|
+
C(nt);
|
|
1544
1549
|
},
|
|
1545
|
-
onKeyUp: (
|
|
1546
|
-
|
|
1550
|
+
onKeyUp: (m) => {
|
|
1551
|
+
I && (m.preventDefault(), B(!1));
|
|
1547
1552
|
},
|
|
1548
|
-
onBlur: () =>
|
|
1549
|
-
onChange: (
|
|
1550
|
-
|
|
1553
|
+
onBlur: () => _(),
|
|
1554
|
+
onChange: (m) => {
|
|
1555
|
+
x(!1), l(m.target.value);
|
|
1551
1556
|
},
|
|
1552
|
-
onClick: (
|
|
1557
|
+
onClick: (m) => {
|
|
1553
1558
|
var w;
|
|
1554
|
-
(w =
|
|
1559
|
+
(w = m == null ? void 0 : m.target) == null || w.select(), t(!1);
|
|
1555
1560
|
},
|
|
1556
|
-
value:
|
|
1561
|
+
value: S ? f : a,
|
|
1557
1562
|
className: "h-6 w-14 rounded rounded-r-none bg-background pl-2 text-sm focus-visible:outline-0 ".concat(
|
|
1558
1563
|
" ",
|
|
1559
|
-
|
|
1564
|
+
y ? "border-red-500 text-red-500" : "border-foreground/20"
|
|
1560
1565
|
)
|
|
1561
1566
|
}
|
|
1562
1567
|
),
|
|
1563
|
-
/* @__PURE__ */ e.jsxs(
|
|
1564
|
-
/* @__PURE__ */ e.jsx(
|
|
1568
|
+
/* @__PURE__ */ e.jsxs(Y, { open: o, delayDuration: 100, children: [
|
|
1569
|
+
/* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
1565
1570
|
"button",
|
|
1566
1571
|
{
|
|
1567
1572
|
type: "button",
|
|
1568
|
-
onClick: () => t(!
|
|
1573
|
+
onClick: () => t(!o),
|
|
1569
1574
|
className: "flex h-6 cursor-pointer items-center gap-x-1 rounded rounded-l-none bg-background p-px px-1 text-[11px] uppercase",
|
|
1570
1575
|
children: [
|
|
1571
|
-
/* @__PURE__ */ e.jsx("span", { className: `inline-block ${p.length === 1 ? "px-2 font-semibold" : ""}`, children:
|
|
1576
|
+
/* @__PURE__ */ e.jsx("span", { className: `inline-block ${p.length === 1 ? "px-2 font-semibold" : ""}`, children: h }),
|
|
1572
1577
|
p.length > 1 ? /* @__PURE__ */ e.jsx(Dt, {}) : null
|
|
1573
1578
|
]
|
|
1574
1579
|
}
|
|
1575
1580
|
) }),
|
|
1576
|
-
/* @__PURE__ */ e.jsx(
|
|
1577
|
-
|
|
1581
|
+
/* @__PURE__ */ e.jsx(qt, { children: /* @__PURE__ */ e.jsx(W, { className: "bg-background", children: /* @__PURE__ */ e.jsx(
|
|
1582
|
+
Dr,
|
|
1578
1583
|
{
|
|
1579
1584
|
units: p,
|
|
1580
|
-
current:
|
|
1581
|
-
onSelect: (
|
|
1582
|
-
t(!1),
|
|
1585
|
+
current: h,
|
|
1586
|
+
onSelect: (m) => {
|
|
1587
|
+
t(!1), g(m), oe(m);
|
|
1583
1588
|
}
|
|
1584
1589
|
}
|
|
1585
1590
|
) }) })
|
|
1586
1591
|
] })
|
|
1587
1592
|
] }),
|
|
1588
|
-
["none", "auto"].indexOf(
|
|
1589
|
-
|
|
1593
|
+
["none", "auto"].indexOf(h) !== -1 || S ? null : /* @__PURE__ */ e.jsx(
|
|
1594
|
+
Ar,
|
|
1590
1595
|
{
|
|
1591
|
-
onDragStart: () =>
|
|
1592
|
-
onDragEnd: (
|
|
1593
|
-
if (
|
|
1596
|
+
onDragStart: () => j(!0),
|
|
1597
|
+
onDragEnd: (m) => {
|
|
1598
|
+
if ($(() => ""), j(!1), b(m))
|
|
1594
1599
|
return;
|
|
1595
|
-
const w = `${
|
|
1596
|
-
|
|
1600
|
+
const w = `${m}`, F = `${w.startsWith("-") ? "-" : ""}${i}[${w.replace("-", "")}${h === "-" ? "" : h}]`;
|
|
1601
|
+
v(F);
|
|
1597
1602
|
},
|
|
1598
|
-
onDrag: (
|
|
1599
|
-
if (b(
|
|
1603
|
+
onDrag: (m) => {
|
|
1604
|
+
if (b(m))
|
|
1600
1605
|
return;
|
|
1601
|
-
|
|
1602
|
-
const w = `${
|
|
1603
|
-
|
|
1606
|
+
$(m);
|
|
1607
|
+
const w = `${m}`, F = `${w.startsWith("-") ? "-" : ""}${i}[${w.replace("-", "")}${h === "-" ? "" : h}]`;
|
|
1608
|
+
C(F);
|
|
1604
1609
|
},
|
|
1605
|
-
currentValue:
|
|
1606
|
-
unit:
|
|
1607
|
-
negative:
|
|
1608
|
-
cssProperty:
|
|
1610
|
+
currentValue: a,
|
|
1611
|
+
unit: h,
|
|
1612
|
+
negative: c,
|
|
1613
|
+
cssProperty: n
|
|
1609
1614
|
}
|
|
1610
1615
|
)
|
|
1611
1616
|
] }) }) });
|
|
1612
1617
|
}, le = (r) => {
|
|
1613
|
-
const
|
|
1614
|
-
return
|
|
1615
|
-
},
|
|
1618
|
+
const o = ce();
|
|
1619
|
+
return mt(o, { property: r });
|
|
1620
|
+
}, Ir = (r, o) => {
|
|
1616
1621
|
const t = {
|
|
1617
1622
|
xs: 0,
|
|
1618
1623
|
sm: 1,
|
|
@@ -1621,8 +1626,8 @@ const kr = ({ property: r, onChange: s }) => {
|
|
|
1621
1626
|
xl: 4,
|
|
1622
1627
|
"2xl": 5
|
|
1623
1628
|
};
|
|
1624
|
-
return t[
|
|
1625
|
-
},
|
|
1629
|
+
return t[u(r, "mq", "xs")] <= t[o];
|
|
1630
|
+
}, Pr = {
|
|
1626
1631
|
width: "w-",
|
|
1627
1632
|
height: "h-",
|
|
1628
1633
|
minWidth: "min-w-",
|
|
@@ -1696,56 +1701,56 @@ const kr = ({ property: r, onChange: s }) => {
|
|
|
1696
1701
|
xl: "1280px",
|
|
1697
1702
|
"2xl": "1536px"
|
|
1698
1703
|
}, Lr = (r) => `${r.toUpperCase()} ${Ie[r] ? `(${Ie[r]} & up)` : ""}`, ke = (r) => {
|
|
1699
|
-
const { type:
|
|
1700
|
-
}, units:
|
|
1701
|
-
(
|
|
1702
|
-
const
|
|
1703
|
-
(i ||
|
|
1704
|
-
const oe =
|
|
1705
|
-
|
|
1704
|
+
const { type: o = "icons", label: t, property: a, onEmitChange: l = () => {
|
|
1705
|
+
}, units: s, negative: d = !1 } = r, [i] = Ft(), [n] = qe(), [, p] = Ve(), c = le(a), h = Ue(), g = Ge(), [y] = Ke(), x = R(() => u(c, "fullCls", ""), [c]), f = L(
|
|
1706
|
+
(v, C = !0) => {
|
|
1707
|
+
const _ = { dark: i, mq: p, mod: n, cls: v, property: a, fullCls: "" };
|
|
1708
|
+
(i || n !== "") && (_.mq = "xs");
|
|
1709
|
+
const oe = sr(_);
|
|
1710
|
+
h(y, [oe], C);
|
|
1706
1711
|
},
|
|
1707
|
-
[
|
|
1708
|
-
),
|
|
1709
|
-
y
|
|
1710
|
-
}, [
|
|
1712
|
+
[y, i, p, n, a, h]
|
|
1713
|
+
), $ = L(() => {
|
|
1714
|
+
g(y, [x]);
|
|
1715
|
+
}, [y, x, g]), S = R(() => Ir(c, p), [c, p]);
|
|
1711
1716
|
M(() => {
|
|
1712
|
-
l(
|
|
1713
|
-
}, [
|
|
1714
|
-
const [, ,
|
|
1715
|
-
(
|
|
1716
|
-
|
|
1717
|
+
l(S, c);
|
|
1718
|
+
}, [S, l, c]);
|
|
1719
|
+
const [, , j] = Ve(), I = L(
|
|
1720
|
+
(v) => {
|
|
1721
|
+
j({
|
|
1717
1722
|
xs: 400,
|
|
1718
1723
|
sm: 640,
|
|
1719
1724
|
md: 800,
|
|
1720
1725
|
lg: 1024,
|
|
1721
1726
|
xl: 1420,
|
|
1722
1727
|
"2xl": 1920
|
|
1723
|
-
}[
|
|
1728
|
+
}[v]);
|
|
1724
1729
|
},
|
|
1725
|
-
[
|
|
1726
|
-
), B =
|
|
1727
|
-
return /* @__PURE__ */ e.jsx(
|
|
1728
|
-
/* @__PURE__ */ e.jsx("div", { className: "relative w-[70px] truncate text-xs text-foreground", children: /* @__PURE__ */ e.jsx("span", { className: `text-[11px] ${
|
|
1730
|
+
[j]
|
|
1731
|
+
), B = u(c, "dark", null) === i && u(c, "mod", null) === n && u(c, "mq", null) === p;
|
|
1732
|
+
return /* @__PURE__ */ e.jsx(kr, { canChange: S, canReset: c && B, children: /* @__PURE__ */ e.jsxs("div", { className: "group flex flex-row items-center py-2 first:pt-0 last:pb-0", children: [
|
|
1733
|
+
/* @__PURE__ */ e.jsx("div", { className: "relative w-[70px] truncate text-xs text-foreground", children: /* @__PURE__ */ e.jsx("span", { className: `text-[11px] ${c && !B ? "text-foreground" : ""}`, children: t }) }),
|
|
1729
1734
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-row items-center", children: [
|
|
1730
1735
|
/* @__PURE__ */ e.jsxs("div", { className: "w-[150px]", children: [
|
|
1731
|
-
|
|
1732
|
-
|
|
1736
|
+
o === "arbitrary" ? /* @__PURE__ */ e.jsx(
|
|
1737
|
+
$r,
|
|
1733
1738
|
{
|
|
1734
|
-
currentClass:
|
|
1735
|
-
classPrefix:
|
|
1736
|
-
units:
|
|
1737
|
-
onChange:
|
|
1739
|
+
currentClass: u(c, "cls", ""),
|
|
1740
|
+
classPrefix: u(Pr, a, ""),
|
|
1741
|
+
units: s || [],
|
|
1742
|
+
onChange: f,
|
|
1738
1743
|
negative: d,
|
|
1739
|
-
cssProperty:
|
|
1744
|
+
cssProperty: a
|
|
1740
1745
|
}
|
|
1741
1746
|
) : null,
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1747
|
+
o === "icons" && /* @__PURE__ */ e.jsx(Sr, { property: a, onChange: f }),
|
|
1748
|
+
o === "range" && /* @__PURE__ */ e.jsx(Nr, { property: a, onChange: f }),
|
|
1749
|
+
o === "color" && /* @__PURE__ */ e.jsx(Rr, { property: a, onChange: f }),
|
|
1750
|
+
o === "dropdown" && /* @__PURE__ */ e.jsx(lt, { label: t, property: a, onChange: f })
|
|
1746
1751
|
] }),
|
|
1747
|
-
/* @__PURE__ */ e.jsx("div", { className: `w-[30px] cursor-pointer ${
|
|
1748
|
-
/* @__PURE__ */ e.jsx(
|
|
1752
|
+
/* @__PURE__ */ e.jsx("div", { className: `w-[30px] cursor-pointer ${x ? "visible" : "invisible"}`, children: B ? /* @__PURE__ */ e.jsx("button", { type: "button", onClick: () => $(), title: "Reset", className: "flex px-1.5 text-xs", children: /* @__PURE__ */ e.jsx(Xe, { className: "h-5 w-5 text-blue-500 hover:opacity-80" }) }) : S && c ? /* @__PURE__ */ e.jsxs(Y, { delayDuration: 100, children: [
|
|
1753
|
+
/* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
1749
1754
|
"button",
|
|
1750
1755
|
{
|
|
1751
1756
|
type: "button",
|
|
@@ -1756,19 +1761,19 @@ const kr = ({ property: r, onChange: s }) => {
|
|
|
1756
1761
|
/* @__PURE__ */ e.jsx(W, { children: /* @__PURE__ */ e.jsx("div", { className: "text-right", children: /* @__PURE__ */ e.jsxs("div", { children: [
|
|
1757
1762
|
"Current style is set at ",
|
|
1758
1763
|
/* @__PURE__ */ e.jsxs("span", { className: "font-bold ", children: [
|
|
1759
|
-
Lr(
|
|
1760
|
-
i && !
|
|
1764
|
+
Lr(u(c, "mq")),
|
|
1765
|
+
i && !c.dark ? "(Light mode)" : ""
|
|
1761
1766
|
] }),
|
|
1762
1767
|
/* @__PURE__ */ e.jsx("br", {}),
|
|
1763
1768
|
/* @__PURE__ */ e.jsxs(
|
|
1764
1769
|
"button",
|
|
1765
1770
|
{
|
|
1766
1771
|
type: "button",
|
|
1767
|
-
onClick: () =>
|
|
1772
|
+
onClick: () => I(u(c, "mq")),
|
|
1768
1773
|
className: "block w-full cursor-default text-right font-semibold text-blue-500",
|
|
1769
1774
|
children: [
|
|
1770
1775
|
"Switch to ",
|
|
1771
|
-
|
|
1776
|
+
u(c, "mq").toUpperCase()
|
|
1772
1777
|
]
|
|
1773
1778
|
}
|
|
1774
1779
|
)
|
|
@@ -1776,40 +1781,40 @@ const kr = ({ property: r, onChange: s }) => {
|
|
|
1776
1781
|
] }) : null })
|
|
1777
1782
|
] })
|
|
1778
1783
|
] }) });
|
|
1779
|
-
},
|
|
1784
|
+
}, Or = ["px", "%", "em", "rem", "ch", "vh", "vw"], st = ({
|
|
1780
1785
|
label: r,
|
|
1781
|
-
options:
|
|
1786
|
+
options: o,
|
|
1782
1787
|
borderB: t = !1,
|
|
1783
|
-
borderT:
|
|
1788
|
+
borderT: a = !1,
|
|
1784
1789
|
type: l = "arbitrary",
|
|
1785
|
-
units:
|
|
1790
|
+
units: s = Or,
|
|
1786
1791
|
negative: d = !1
|
|
1787
1792
|
}) => {
|
|
1788
|
-
const [i,
|
|
1793
|
+
const [i, n] = k(o[0].key), p = ce(), c = L((h) => N(p, "property").includes(h), [p]);
|
|
1789
1794
|
return /* @__PURE__ */ e.jsxs(
|
|
1790
1795
|
"div",
|
|
1791
1796
|
{
|
|
1792
|
-
className: `mb-2 border-gray-800 py-2 first:pt-0 last:pb-0 ${t ? "border-b" : ""} ${
|
|
1797
|
+
className: `mb-2 border-gray-800 py-2 first:pt-0 last:pb-0 ${t ? "border-b" : ""} ${a ? "border-t" : ""}`,
|
|
1793
1798
|
children: [
|
|
1794
1799
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-row text-xs", children: [
|
|
1795
1800
|
r && /* @__PURE__ */ e.jsx("span", { className: "relative w-[70px] flex-none text-xs text-foreground", children: r }),
|
|
1796
|
-
/* @__PURE__ */ e.jsx("div", { className: "mb-3 flex grow flex-row flex-wrap gap-x-px", children:
|
|
1797
|
-
|
|
1798
|
-
/* @__PURE__ */ e.jsx(
|
|
1801
|
+
/* @__PURE__ */ e.jsx("div", { className: "mb-3 flex grow flex-row flex-wrap gap-x-px", children: P.Children.toArray(
|
|
1802
|
+
o.map(({ label: h, key: g }) => /* @__PURE__ */ e.jsx("div", { className: "first:rounded-l last:rounded-r", children: /* @__PURE__ */ e.jsxs(Y, { children: [
|
|
1803
|
+
/* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
1799
1804
|
"button",
|
|
1800
1805
|
{
|
|
1801
1806
|
type: "button",
|
|
1802
|
-
onClick: () =>
|
|
1803
|
-
className: `relative cursor-pointer rounded-full p-1 text-[8px] ${
|
|
1807
|
+
onClick: () => n(g),
|
|
1808
|
+
className: `relative cursor-pointer rounded-full p-1 text-[8px] ${g === i ? " bg-[#3E57F0] text-white" : "text-gray-600 dark:text-gray-300"}`,
|
|
1804
1809
|
children: [
|
|
1805
|
-
|
|
1806
|
-
className:
|
|
1810
|
+
P.createElement("div", {
|
|
1811
|
+
className: c(g) ? "-bottom-1.5 absolute bg-[#3E57F0] h-[2px] left-0 w-full" : ""
|
|
1807
1812
|
}),
|
|
1808
|
-
|
|
1813
|
+
P.createElement(u(rt, g, Ye), { className: "text-inherit w-3 h-3" })
|
|
1809
1814
|
]
|
|
1810
1815
|
}
|
|
1811
1816
|
) }),
|
|
1812
|
-
/* @__PURE__ */ e.jsx(W, { children: Q(ne(
|
|
1817
|
+
/* @__PURE__ */ e.jsx(W, { children: Q(ne(h)) })
|
|
1813
1818
|
] }) }))
|
|
1814
1819
|
) })
|
|
1815
1820
|
] }),
|
|
@@ -1817,7 +1822,7 @@ const kr = ({ property: r, onChange: s }) => {
|
|
|
1817
1822
|
ke,
|
|
1818
1823
|
{
|
|
1819
1824
|
type: l,
|
|
1820
|
-
units: [...
|
|
1825
|
+
units: [...s],
|
|
1821
1826
|
label: "",
|
|
1822
1827
|
property: i,
|
|
1823
1828
|
negative: d
|
|
@@ -1826,73 +1831,73 @@ const kr = ({ property: r, onChange: s }) => {
|
|
|
1826
1831
|
]
|
|
1827
1832
|
}
|
|
1828
1833
|
);
|
|
1829
|
-
},
|
|
1830
|
-
const t = ce(),
|
|
1834
|
+
}, Mr = ({ heading: r, items: o }) => {
|
|
1835
|
+
const t = ce(), a = R(() => {
|
|
1831
1836
|
const l = (i) => z(
|
|
1832
|
-
i.map((
|
|
1833
|
-
),
|
|
1834
|
-
|
|
1835
|
-
), d =
|
|
1836
|
-
return _e(
|
|
1837
|
-
}, [t,
|
|
1837
|
+
i.map((n) => n.styleType === "multiple" ? N(n.options, "key") : n.property)
|
|
1838
|
+
), s = z(
|
|
1839
|
+
o.map((i) => i.styleType === "accordion" ? l(i.items) : i.styleType === "multiple" ? N(i.options, "key") : i.property)
|
|
1840
|
+
), d = N(t, "property");
|
|
1841
|
+
return _e(s, d).length > 0;
|
|
1842
|
+
}, [t, o]);
|
|
1838
1843
|
return /* @__PURE__ */ e.jsxs("details", { children: [
|
|
1839
1844
|
/* @__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: [
|
|
1840
1845
|
r,
|
|
1841
|
-
|
|
1846
|
+
a ? /* @__PURE__ */ e.jsx(
|
|
1842
1847
|
"span",
|
|
1843
1848
|
{
|
|
1844
|
-
className: `ml-1 mr-2 inline-block h-[8px] w-[8px] rounded-full ${
|
|
1849
|
+
className: `ml-1 mr-2 inline-block h-[8px] w-[8px] rounded-full ${a ? "bg-blue-500" : "bg-gray-300"}`
|
|
1845
1850
|
}
|
|
1846
1851
|
) : null
|
|
1847
1852
|
] }) }),
|
|
1848
|
-
/* @__PURE__ */ e.jsx("div", { className: "p-2", children:
|
|
1853
|
+
/* @__PURE__ */ e.jsx("div", { className: "p-2", children: o.map((l) => l.styleType === "multiple" ? /* @__PURE__ */ e.jsx(st, { ...l }, l.label) : /* @__PURE__ */ e.jsx(ke, { ...l }, l.label)) })
|
|
1849
1854
|
] });
|
|
1850
|
-
},
|
|
1851
|
-
const
|
|
1852
|
-
(
|
|
1855
|
+
}, _r = Pe({}), ge = ({ section: r }) => {
|
|
1856
|
+
const o = ce(), t = L(
|
|
1857
|
+
(s = []) => {
|
|
1853
1858
|
const d = {};
|
|
1854
|
-
for (let
|
|
1855
|
-
d[
|
|
1859
|
+
for (let n = 0; n < o.length; n++)
|
|
1860
|
+
d[o[n].property] = o[n].cls;
|
|
1856
1861
|
let i = !0;
|
|
1857
|
-
for (const
|
|
1858
|
-
if (!ue(d,
|
|
1862
|
+
for (const n in s)
|
|
1863
|
+
if (!ue(d, n) || d[n] !== s[n]) {
|
|
1859
1864
|
i = !1;
|
|
1860
1865
|
break;
|
|
1861
1866
|
}
|
|
1862
1867
|
return i;
|
|
1863
1868
|
},
|
|
1864
|
-
[
|
|
1865
|
-
),
|
|
1866
|
-
if (
|
|
1869
|
+
[o]
|
|
1870
|
+
), a = R(() => {
|
|
1871
|
+
if (o.length > 0 && r.heading === "Classes")
|
|
1867
1872
|
return !0;
|
|
1868
|
-
const
|
|
1869
|
-
|
|
1873
|
+
const s = (n) => z(
|
|
1874
|
+
n.map((p) => p.styleType === "multiple" ? z(N(p.options, "key")) : p.property)
|
|
1870
1875
|
), d = z(
|
|
1871
|
-
r.items.map((
|
|
1872
|
-
), i =
|
|
1876
|
+
r.items.map((n) => n.styleType === "accordion" ? s(n.items) : n.styleType === "multiple" ? z(N(n.options, "key")) : n.property)
|
|
1877
|
+
), i = N(o, "property");
|
|
1873
1878
|
return _e(d, i).length > 0;
|
|
1874
|
-
}, [
|
|
1875
|
-
return /* @__PURE__ */ e.jsx(
|
|
1879
|
+
}, [o, r.heading, r.items]), l = R(() => ({}), []);
|
|
1880
|
+
return /* @__PURE__ */ e.jsx(_r.Provider, { value: l, children: /* @__PURE__ */ e.jsxs(ae, { value: r.heading, children: [
|
|
1876
1881
|
/* @__PURE__ */ e.jsx(ie, { className: "px-3 py-2 text-xs hover:no-underline", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
|
|
1877
|
-
/* @__PURE__ */ e.jsx("div", { className: `h-[8px] w-[8px] rounded-full ${
|
|
1882
|
+
/* @__PURE__ */ e.jsx("div", { className: `h-[8px] w-[8px] rounded-full ${a ? "bg-blue-500" : "bg-gray-300"}` }),
|
|
1878
1883
|
r.heading
|
|
1879
1884
|
] }) }),
|
|
1880
|
-
/* @__PURE__ */ e.jsx(de, { className: "bg-gray-100 px-3.5 py-2", children:
|
|
1881
|
-
r.items.map((
|
|
1885
|
+
/* @__PURE__ */ e.jsx(de, { className: "bg-gray-100 px-3.5 py-2", children: P.Children.toArray(
|
|
1886
|
+
r.items.map((s) => ue(s, "component") ? P.createElement(s.component, { key: s.label }) : ue(s, "styleType") ? s.styleType === "multiple" ? /* @__PURE__ */ e.jsx(st, { ...s }, s.label) : s.styleType === "accordion" && t(s == null ? void 0 : s.conditions) ? /* @__PURE__ */ e.jsx(Mr, { ...s }, s.label) : null : /* @__PURE__ */ e.jsx(ke, { ...s }, s.label))
|
|
1882
1887
|
) })
|
|
1883
1888
|
] }) });
|
|
1884
|
-
},
|
|
1889
|
+
}, Er = ({
|
|
1885
1890
|
item: r,
|
|
1886
|
-
index:
|
|
1891
|
+
index: o,
|
|
1887
1892
|
canDelete: t,
|
|
1888
|
-
onChange:
|
|
1893
|
+
onChange: a,
|
|
1889
1894
|
onRemove: l
|
|
1890
1895
|
}) => /* @__PURE__ */ e.jsxs("div", { className: `flex flex-col gap-1 border-gray-400 py-2 ${t ? "border-b" : ""}`, children: [
|
|
1891
1896
|
/* @__PURE__ */ e.jsx(
|
|
1892
1897
|
"input",
|
|
1893
1898
|
{
|
|
1894
1899
|
name: "key",
|
|
1895
|
-
onChange: (
|
|
1900
|
+
onChange: (s) => a(s, o),
|
|
1896
1901
|
value: r.key,
|
|
1897
1902
|
placeholder: "Key",
|
|
1898
1903
|
className: "w-full rounded border-gray-300 bg-background p-0.5 pl-2 text-sm focus-visible:outline-0",
|
|
@@ -1905,7 +1910,7 @@ const kr = ({ property: r, onChange: s }) => {
|
|
|
1905
1910
|
"input",
|
|
1906
1911
|
{
|
|
1907
1912
|
name: "value",
|
|
1908
|
-
onChange: (
|
|
1913
|
+
onChange: (s) => b(r.key) ? {} : a(s, o),
|
|
1909
1914
|
value: r.value,
|
|
1910
1915
|
placeholder: "Value",
|
|
1911
1916
|
className: "w-full rounded border-gray-300 bg-background p-0.5 pl-2 text-sm focus-visible:outline-0",
|
|
@@ -1914,41 +1919,41 @@ const kr = ({ property: r, onChange: s }) => {
|
|
|
1914
1919
|
}
|
|
1915
1920
|
),
|
|
1916
1921
|
/* @__PURE__ */ e.jsx(
|
|
1917
|
-
|
|
1922
|
+
Xe,
|
|
1918
1923
|
{
|
|
1919
1924
|
onClick: l,
|
|
1920
1925
|
className: "h-6 w-6 cursor-pointer rounded border border-red-400 p-1 text-red-400 hover:opacity-80"
|
|
1921
1926
|
}
|
|
1922
1927
|
)
|
|
1923
1928
|
] })
|
|
1924
|
-
] }),
|
|
1925
|
-
var
|
|
1926
|
-
const { setSyncState:
|
|
1929
|
+
] }), Fr = ({ section: r }) => {
|
|
1930
|
+
var g;
|
|
1931
|
+
const { setSyncState: o } = Yt(), t = te(), [a, l] = k([]), [s] = je(), d = ze(), i = `${u(s, "0.prop")}_attrs`;
|
|
1927
1932
|
se.useEffect(() => {
|
|
1928
|
-
const
|
|
1929
|
-
b(
|
|
1930
|
-
}, [
|
|
1931
|
-
const
|
|
1932
|
-
const
|
|
1933
|
-
|
|
1934
|
-
},
|
|
1935
|
-
const
|
|
1936
|
-
|
|
1937
|
-
},
|
|
1938
|
-
(
|
|
1939
|
-
const
|
|
1940
|
-
|
|
1941
|
-
b(
|
|
1942
|
-
}), d([
|
|
1933
|
+
const y = N(u(t, i), (x, f) => ({ key: f, value: x }));
|
|
1934
|
+
b(y) ? l([]) : l(y);
|
|
1935
|
+
}, [u(t, i)]);
|
|
1936
|
+
const n = () => l([...a, { key: "", value: "" }]), p = (y) => {
|
|
1937
|
+
const x = Oe(a, (f, $) => y !== $);
|
|
1938
|
+
h(x);
|
|
1939
|
+
}, c = (y, x) => {
|
|
1940
|
+
const f = [...a];
|
|
1941
|
+
f[x][y.target.name] = y.target.value, h(f);
|
|
1942
|
+
}, h = se.useCallback(
|
|
1943
|
+
(y = []) => {
|
|
1944
|
+
const x = {};
|
|
1945
|
+
be(y, (f) => {
|
|
1946
|
+
b(f.key) || Le(x, f.key, f.value);
|
|
1947
|
+
}), d([u(t, "_id")], { [i]: x }), o("UNSAVED");
|
|
1943
1948
|
},
|
|
1944
|
-
[t,
|
|
1949
|
+
[t, o, d, i]
|
|
1945
1950
|
);
|
|
1946
1951
|
return /* @__PURE__ */ e.jsxs(ae, { value: r.heading, children: [
|
|
1947
1952
|
/* @__PURE__ */ e.jsx(ie, { className: "px-3 py-2 text-xs hover:no-underline", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
|
|
1948
1953
|
/* @__PURE__ */ e.jsx(
|
|
1949
1954
|
"div",
|
|
1950
1955
|
{
|
|
1951
|
-
className: `h-[8px] w-[8px] rounded-full ${b(
|
|
1956
|
+
className: `h-[8px] w-[8px] rounded-full ${b(u(t, i)) ? "bg-gray-300" : "bg-blue-500"}`
|
|
1952
1957
|
}
|
|
1953
1958
|
),
|
|
1954
1959
|
"Attributes"
|
|
@@ -1959,10 +1964,10 @@ const kr = ({ property: r, onChange: s }) => {
|
|
|
1959
1964
|
/* @__PURE__ */ e.jsxs(
|
|
1960
1965
|
"div",
|
|
1961
1966
|
{
|
|
1962
|
-
className: `flex h-6 w-max items-center justify-center gap-x-0.5 rounded-full border p-1 px-2 text-xs ${!b(
|
|
1967
|
+
className: `flex h-6 w-max items-center justify-center gap-x-0.5 rounded-full border p-1 px-2 text-xs ${!b(a) && b((g = he(a)) == null ? void 0 : g.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"}`,
|
|
1963
1968
|
onClick: () => {
|
|
1964
|
-
var
|
|
1965
|
-
!b(
|
|
1969
|
+
var y;
|
|
1970
|
+
!b(a) && b((y = he(a)) == null ? void 0 : y.key) || n();
|
|
1966
1971
|
},
|
|
1967
1972
|
children: [
|
|
1968
1973
|
/* @__PURE__ */ e.jsx(ve, { width: 12, height: 12 }),
|
|
@@ -1972,18 +1977,18 @@ const kr = ({ property: r, onChange: s }) => {
|
|
|
1972
1977
|
)
|
|
1973
1978
|
] }),
|
|
1974
1979
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col", children: [
|
|
1975
|
-
b(
|
|
1980
|
+
b(a) && /* @__PURE__ */ e.jsx("div", { className: "flex h-12 items-center justify-center text-sm text-gray-400", children: "Click + Add to add attributes" }),
|
|
1976
1981
|
se.Children.toArray(
|
|
1977
|
-
|
|
1978
|
-
const
|
|
1982
|
+
N(a, (y, x) => {
|
|
1983
|
+
const f = a.length > 0 && x < a.length - 1;
|
|
1979
1984
|
return /* @__PURE__ */ e.jsx(
|
|
1980
|
-
|
|
1985
|
+
Er,
|
|
1981
1986
|
{
|
|
1982
|
-
item:
|
|
1983
|
-
index:
|
|
1984
|
-
canDelete:
|
|
1985
|
-
onChange:
|
|
1986
|
-
onRemove: () => p(
|
|
1987
|
+
item: y,
|
|
1988
|
+
index: x,
|
|
1989
|
+
canDelete: f,
|
|
1990
|
+
onChange: c,
|
|
1991
|
+
onRemove: () => p(x)
|
|
1987
1992
|
}
|
|
1988
1993
|
);
|
|
1989
1994
|
})
|
|
@@ -1992,11 +1997,11 @@ const kr = ({ property: r, onChange: s }) => {
|
|
|
1992
1997
|
] }) })
|
|
1993
1998
|
] });
|
|
1994
1999
|
};
|
|
1995
|
-
function
|
|
1996
|
-
const [r,
|
|
2000
|
+
function Yr() {
|
|
2001
|
+
const [r, o] = qe(), { flexChild: t, gridChild: a } = Xt(), [, l] = rr(Wt), { t: s } = Ee(), [d] = je();
|
|
1997
2002
|
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: [
|
|
1998
2003
|
/* @__PURE__ */ e.jsx(We, { className: "mx-auto text-3xl" }),
|
|
1999
|
-
/* @__PURE__ */ e.jsx("h1", { children:
|
|
2004
|
+
/* @__PURE__ */ e.jsx("h1", { children: s("no_styling_block_selected") }),
|
|
2000
2005
|
/* @__PURE__ */ e.jsxs("p", { className: "text-xs ", children: [
|
|
2001
2006
|
"Hint: Styling allowed blocks are highlighted with",
|
|
2002
2007
|
" ",
|
|
@@ -2008,9 +2013,9 @@ function Fr() {
|
|
|
2008
2013
|
/* @__PURE__ */ e.jsxs("div", { onClick: () => l(!1), className: "flex h-full flex-col", children: [
|
|
2009
2014
|
/* @__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: [
|
|
2010
2015
|
/* @__PURE__ */ e.jsx(Ce, { htmlFor: "", className: "flex gap-x-1.5 text-xs italic", children: "State" }),
|
|
2011
|
-
/* @__PURE__ */ e.jsxs(
|
|
2012
|
-
/* @__PURE__ */ e.jsx(
|
|
2013
|
-
/* @__PURE__ */ e.jsxs(
|
|
2016
|
+
/* @__PURE__ */ e.jsxs(dr, { defaultValue: r, onValueChange: (i) => o(i), children: [
|
|
2017
|
+
/* @__PURE__ */ e.jsx(cr, { className: "h-auto w-fit p-1 px-3", children: /* @__PURE__ */ e.jsx(pr, { placeholder: "State" }) }),
|
|
2018
|
+
/* @__PURE__ */ e.jsxs(ur, { children: [
|
|
2014
2019
|
/* @__PURE__ */ e.jsx(A, { value: "", children: "Normal" }),
|
|
2015
2020
|
/* @__PURE__ */ e.jsx(A, { value: "hover", children: "Hover" }),
|
|
2016
2021
|
/* @__PURE__ */ e.jsx(A, { value: "active", children: "Active" }),
|
|
@@ -2026,12 +2031,12 @@ function Fr() {
|
|
|
2026
2031
|
] })
|
|
2027
2032
|
] })
|
|
2028
2033
|
] }) }),
|
|
2029
|
-
/* @__PURE__ */ e.jsxs(
|
|
2034
|
+
/* @__PURE__ */ e.jsxs(ir, { className: "no-scrollbar -mx-1 h-full overflow-x-hidden", children: [
|
|
2030
2035
|
/* @__PURE__ */ e.jsxs(tt, { type: "multiple", className: "h-full w-full", children: [
|
|
2031
|
-
t && /* @__PURE__ */ e.jsx(ge, { section:
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
/* @__PURE__ */ e.jsx(
|
|
2036
|
+
t && /* @__PURE__ */ e.jsx(ge, { section: wr }),
|
|
2037
|
+
a ? /* @__PURE__ */ e.jsx(ge, { section: jr }) : null,
|
|
2038
|
+
Cr.map((i) => /* @__PURE__ */ e.jsx(ge, { section: i }, i.heading)),
|
|
2039
|
+
/* @__PURE__ */ e.jsx(Fr, { section: { heading: "Attributes" } })
|
|
2035
2040
|
] }),
|
|
2036
2041
|
/* @__PURE__ */ e.jsx("div", { className: "h-60" })
|
|
2037
2042
|
] })
|
|
@@ -2050,9 +2055,9 @@ const Xr = {
|
|
|
2050
2055
|
deg: 1,
|
|
2051
2056
|
ms: 0.1
|
|
2052
2057
|
}, Xl = () => {
|
|
2053
|
-
const r = te(), { t:
|
|
2054
|
-
onDrag: (
|
|
2055
|
-
onDragEnd: (
|
|
2058
|
+
const r = te(), { t: o } = Ee(), [t, a] = P.useState(""), [l, s] = P.useState({
|
|
2059
|
+
onDrag: (n) => n,
|
|
2060
|
+
onDragEnd: (n) => n,
|
|
2056
2061
|
dragStartY: 0,
|
|
2057
2062
|
dragging: !1,
|
|
2058
2063
|
dragStartValue: 0,
|
|
@@ -2060,21 +2065,21 @@ const Xr = {
|
|
|
2060
2065
|
negative: !1,
|
|
2061
2066
|
cssProperty: ""
|
|
2062
2067
|
}), d = xe(
|
|
2063
|
-
(
|
|
2064
|
-
const p = !
|
|
2065
|
-
let
|
|
2066
|
-
|
|
2067
|
-
let
|
|
2068
|
-
(Z(
|
|
2069
|
-
let
|
|
2070
|
-
p &&
|
|
2068
|
+
(n) => {
|
|
2069
|
+
const p = !u(l, "negative", !1), c = u(l, "cssProperty", "");
|
|
2070
|
+
let h = parseFloat(l.dragStartValue);
|
|
2071
|
+
h = Me(h) ? 0 : h;
|
|
2072
|
+
let g = Xr[l.dragUnit];
|
|
2073
|
+
(Z(c, "scale") || c === "opacity") && (g = 10);
|
|
2074
|
+
let x = (l.dragStartY - n.pageY) / g + h;
|
|
2075
|
+
p && x < 0 && (x = 0), c === "opacity" && x > 1 && (x = 1), l.onDrag(`${x}`), a(`${x}`);
|
|
2071
2076
|
},
|
|
2072
2077
|
[l],
|
|
2073
2078
|
50
|
|
2074
|
-
), i =
|
|
2075
|
-
setTimeout(() => l.onDragEnd(`${t}`), 100),
|
|
2076
|
-
onDrag: (
|
|
2077
|
-
onDragEnd: (
|
|
2079
|
+
), i = L(() => {
|
|
2080
|
+
setTimeout(() => l.onDragEnd(`${t}`), 100), s({
|
|
2081
|
+
onDrag: (n) => n,
|
|
2082
|
+
onDragEnd: (n) => n,
|
|
2078
2083
|
dragStartY: 0,
|
|
2079
2084
|
dragging: !1,
|
|
2080
2085
|
dragStartValue: 0,
|
|
@@ -2082,11 +2087,11 @@ const Xr = {
|
|
|
2082
2087
|
negative: !1,
|
|
2083
2088
|
cssProperty: ""
|
|
2084
2089
|
});
|
|
2085
|
-
}, [l, t,
|
|
2086
|
-
return
|
|
2090
|
+
}, [l, t, s]);
|
|
2091
|
+
return yt(r) ? /* @__PURE__ */ e.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 rounded-xl p-4", children: [
|
|
2087
2092
|
/* @__PURE__ */ e.jsx(We, { className: "mx-auto text-3xl" }),
|
|
2088
|
-
/* @__PURE__ */ e.jsx("h1", { children:
|
|
2089
|
-
] }) }) : /* @__PURE__ */ e.jsxs(ot.Provider, { value: { setDragData:
|
|
2093
|
+
/* @__PURE__ */ e.jsx("h1", { children: o("no_block_selected_for_styling") })
|
|
2094
|
+
] }) }) : /* @__PURE__ */ e.jsxs(ot.Provider, { value: { setDragData: s }, children: [
|
|
2090
2095
|
l.dragging ? /* @__PURE__ */ e.jsx(
|
|
2091
2096
|
"div",
|
|
2092
2097
|
{
|
|
@@ -2096,19 +2101,19 @@ const Xr = {
|
|
|
2096
2101
|
}
|
|
2097
2102
|
) : null,
|
|
2098
2103
|
/* @__PURE__ */ e.jsxs(It, { defaultValue: "settings", className: "flex h-full w-full flex-col py-1", children: [
|
|
2099
|
-
/* @__PURE__ */ e.jsxs(
|
|
2104
|
+
/* @__PURE__ */ e.jsxs(Pt, { className: "mx-1 grid grid-cols-2", children: [
|
|
2100
2105
|
/* @__PURE__ */ e.jsx(Re, { value: "settings", children: "Settings" }),
|
|
2101
2106
|
/* @__PURE__ */ e.jsx(Re, { value: "styling", children: "Styling" })
|
|
2102
2107
|
] }),
|
|
2103
2108
|
/* @__PURE__ */ e.jsx(
|
|
2104
|
-
|
|
2109
|
+
He,
|
|
2105
2110
|
{
|
|
2106
2111
|
value: "settings",
|
|
2107
2112
|
className: "no-scrollbar -mx-1 -mr-2 h-full flex-1 overflow-y-auto overflow-x-hidden",
|
|
2108
2113
|
children: /* @__PURE__ */ e.jsx(fr, {})
|
|
2109
2114
|
}
|
|
2110
2115
|
),
|
|
2111
|
-
/* @__PURE__ */ e.jsx(
|
|
2116
|
+
/* @__PURE__ */ e.jsx(He, { value: "styling", className: "flex-1 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(Yr, {}) })
|
|
2112
2117
|
] })
|
|
2113
2118
|
] });
|
|
2114
2119
|
};
|