@chaibuilder/sdk 1.2.5 → 1.2.6
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-WS9dnLyS.js → CanvasArea-7GpvsKP6.js} +1 -1
- package/dist/{CanvasArea-wpskKN1H.cjs → CanvasArea-jvwkPvtQ.cjs} +1 -1
- package/dist/{CurrentPage-iaGHiR2B.js → CurrentPage-C52wu_r7.js} +1 -1
- package/dist/{CurrentPage-X9fCVXgY.cjs → CurrentPage-tHBommaV.cjs} +1 -1
- package/dist/{Layers-EGhZWmvD.cjs → Layers-4G-0aNk9.cjs} +1 -1
- package/dist/{Layers-V15IDskJ.js → Layers-NDtp2-im.js} +1 -1
- package/dist/{PagesPanel-wfyKhLJ5.js → PagesPanel-qV7yGT-K.js} +2 -2
- package/dist/{PagesPanel-Vla7HZkm.cjs → PagesPanel-qZ_-tybb.cjs} +1 -1
- package/dist/{ProjectPanel-aiKhpNvr.js → ProjectPanel-RJqNz-uq.js} +2 -2
- package/dist/{ProjectPanel-YLS4oOuU.cjs → ProjectPanel-vzyFbBNU.cjs} +1 -1
- package/dist/Settings-SV08lVcH.cjs +1 -0
- package/dist/{Settings-JjYbPJrt.js → Settings-t0I7LKxe.js} +191 -191
- package/dist/{SidePanels-vcWHxatg.cjs → SidePanels-TOJotvzn.cjs} +1 -1
- package/dist/{SidePanels-XABN8kD3.js → SidePanels-rXx-fGjB.js} +2 -2
- package/dist/{add-page-modal-Gwhl6J1F.js → add-page-modal-2VlONTs5.js} +1 -1
- package/dist/{add-page-modal-o5dy8nwt.cjs → add-page-modal-a8r8poMY.cjs} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/{delete-page-modal-IO_9ZCm4.cjs → delete-page-modal-NmwHGjZP.cjs} +1 -1
- package/dist/{delete-page-modal-xGWX8RHn.js → delete-page-modal-_8O4RCkG.js} +1 -1
- package/dist/{index-mUPP605-.cjs → index-3OU9zl6c.cjs} +1 -1
- package/dist/{index-7mV_OcXd.js → index-482XFRhB.js} +2 -2
- package/dist/{page-viewer-Xl1i1V3J.js → page-viewer-ajtG_WZC.js} +2 -2
- package/dist/{page-viewer-pJFW_LaN.cjs → page-viewer-k2VlWE3T.cjs} +1 -1
- package/dist/{project-general-setting-8H1Rka2z.js → project-general-setting-TIHLI4Qg.js} +1 -1
- package/dist/{project-general-setting-lNEoQK1n.cjs → project-general-setting-tAgCjUtR.cjs} +1 -1
- package/dist/{single-page-detail-VKqGt-s1.cjs → single-page-detail-6btKDNjs.cjs} +1 -1
- package/dist/{single-page-detail-1hsqXV8c.js → single-page-detail-lST7hWvC.js} +2 -2
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +1 -1
- package/package.json +1 -1
- package/dist/Settings-rnHnjhZ4.cjs +0 -1
|
@@ -2,21 +2,21 @@ import { j as e } from "./jsx-runtime-WbnYoNE9.js";
|
|
|
2
2
|
import * as ne from "react";
|
|
3
3
|
import $, { useState as j, useMemo as _, useEffect as M, useCallback as B, memo as ct, createContext as Oe, useContext as se } from "react";
|
|
4
4
|
import { useThrottledCallback as fe } from "@react-hookz/web";
|
|
5
|
-
import { forEach as ke, isArray as ie, omit as pt, truncate as ut, includes as
|
|
5
|
+
import { forEach as ke, isArray as ie, omit as pt, truncate as ut, includes as P, get as x, first as ue, split as xt, startCase as Y, toLower as le, isEmpty as m, map as C, find as gt, last as ve, filter as we, set as Me, keys as ht, cloneDeep as yt, each as bt, capitalize as mt, reject as ft, nth as Ve, startsWith as W, isNumber as vt, parseInt as wt, isNaN as ze, findLast as jt, flatten as U, intersection as Ye, has as ye, isNull as Ct } from "lodash-es";
|
|
6
6
|
import { useTranslation as K } from "react-i18next";
|
|
7
|
-
import { PlusIcon as Ne, Cross2Icon as Fe, EyeOpenIcon as kt, EyeClosedIcon as He, BorderAllIcon as
|
|
8
|
-
import { a$ as Yt, b0 as Ft, B as
|
|
7
|
+
import { PlusIcon as Ne, Cross2Icon as Fe, EyeOpenIcon as kt, EyeClosedIcon as He, BorderAllIcon as A, WidthIcon as T, HeightIcon as R, ArrowUpIcon as Q, ArrowRightIcon as ee, ArrowDownIcon as te, ArrowLeftIcon as re, ArrowTopLeftIcon as Nt, ArrowTopRightIcon as _t, ArrowBottomRightIcon as St, ArrowBottomLeftIcon as Tt, AlignLeftIcon as Rt, AlignCenterHorizontallyIcon as Vt, AlignRightIcon as Ht, StretchHorizontallyIcon as Bt, FontItalicIcon as Dt, UnderlineIcon as $t, OverlineIcon as It, LetterCaseUppercaseIcon as At, Cross1Icon as Pt, InfoCircledIcon as _e, MinusIcon as Lt, BoxIcon as Xe, RowSpacingIcon as Et, TriangleDownIcon as Ot, CrossCircledIcon as Mt, TrashIcon as zt, MixerHorizontalIcon as Ze } from "@radix-ui/react-icons";
|
|
8
|
+
import { a$ as Yt, b0 as Ft, B as xe, b1 as Xt, b2 as Zt, b3 as Wt, b4 as Ut, b5 as Kt, b6 as qt, b7 as Gt, a6 as q, am as Jt, an as Qt, ao as er, b8 as tr, ak as rr, b9 as lr, al as sr, aC as F, aD as X, aF as Z, ba as or, bb as ar, bc as nr, bd as ir, be as dr, bf as cr, p as We, ac as Ue, i as pr, bg as Ke, bh as de, bi as ce, bj as pe, aj as Se, P as qe, a3 as Ge, j as Je, aH as Te, bk as ur, bl as xr, a4 as ge, W as gr, a9 as Qe, R as Be, ag as hr, ad as yr, bm as br, aq as mr, ar as fr, as as vr, at as wr, au as V, bn as et, aw as jr, ax as Cr, ay as De, az as $e } from "./index-_OgCuSUz.js";
|
|
9
9
|
import { u as kr } from "./controls-XPXGHKht.js";
|
|
10
10
|
import { Check as Nr, EditIcon as _r, TrashIcon as Sr } from "lucide-react";
|
|
11
11
|
import { getBlockComponent as tt, getChaiDataProviders as Tr } from "@chaibuilder/runtime";
|
|
12
|
-
import { E as rt, u as lt } from "./index-
|
|
12
|
+
import { E as rt, u as lt } from "./index-482XFRhB.js";
|
|
13
13
|
import Rr from "@rjsf/core";
|
|
14
14
|
import Vr from "@rjsf/validator-ajv8";
|
|
15
15
|
import { useAtom as Hr } from "jotai";
|
|
16
16
|
import Br from "react-autosuggest";
|
|
17
17
|
import Dr from "fuse.js";
|
|
18
|
-
import { A as $r, C as
|
|
19
|
-
import { a as
|
|
18
|
+
import { A as $r, C as he, g as Ir } from "./utils-AvyFzbPC.js";
|
|
19
|
+
import { a as Ar } from "./MODIFIERS-RiXS5Mn1.js";
|
|
20
20
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
21
21
|
import "@radix-ui/react-toggle";
|
|
22
22
|
import "class-variance-authority";
|
|
@@ -58,7 +58,7 @@ import "./html-to-json-yjzEN9OX.js";
|
|
|
58
58
|
import "himalaya";
|
|
59
59
|
import "lodash";
|
|
60
60
|
import "./web-blocks.js";
|
|
61
|
-
const
|
|
61
|
+
const Pr = $.lazy(() => import("react-json-view"));
|
|
62
62
|
function Lr(r) {
|
|
63
63
|
const s = [], t = {};
|
|
64
64
|
function o(l, d) {
|
|
@@ -76,7 +76,7 @@ const je = ({ data: r, fullView: s }) => {
|
|
|
76
76
|
return s ? typeof r == "object" ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
77
77
|
/* @__PURE__ */ e.jsx("div", { className: "h-3" }),
|
|
78
78
|
/* @__PURE__ */ e.jsx(rt, { children: /* @__PURE__ */ e.jsx(
|
|
79
|
-
|
|
79
|
+
Pr,
|
|
80
80
|
{
|
|
81
81
|
style: { maxHeight: "40vh", overflowY: "auto" },
|
|
82
82
|
name: "Content",
|
|
@@ -100,24 +100,24 @@ const je = ({ data: r, fullView: s }) => {
|
|
|
100
100
|
dataType: d,
|
|
101
101
|
appliedBindings: a
|
|
102
102
|
}) => {
|
|
103
|
-
const { paths: c, pathsType: i } = Lr(o), p = r === "PROP" ? tt(o == null ? void 0 : o._type) : {},
|
|
104
|
-
(u) => !
|
|
105
|
-
) : c.filter((u) => d ===
|
|
103
|
+
const { paths: c, pathsType: i } = Lr(o), p = r === "PROP" ? tt(o == null ? void 0 : o._type) : {}, y = r === "PROP", [n, h] = j(!1), g = _(() => r === "PROP" ? c.filter(
|
|
104
|
+
(u) => !P(a, u) && x(p, `props.${ue(xt(u, "."))}.binding`)
|
|
105
|
+
) : c.filter((u) => d === x(i, u, "")), [r, c, a, d, p]);
|
|
106
106
|
return M(() => {
|
|
107
107
|
s && l(s);
|
|
108
108
|
}, [s, r]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
109
109
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-4", children: [
|
|
110
110
|
/* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted-foreground", children: Y(le(r)) }),
|
|
111
|
-
/* @__PURE__ */ e.jsxs(Yt, { open: n, onOpenChange:
|
|
111
|
+
/* @__PURE__ */ e.jsxs(Yt, { open: n, onOpenChange: h, children: [
|
|
112
112
|
/* @__PURE__ */ e.jsx(Ft, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
113
|
-
|
|
113
|
+
xe,
|
|
114
114
|
{
|
|
115
115
|
variant: "outline",
|
|
116
116
|
size: "sm",
|
|
117
117
|
className: ` ${m(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"}`,
|
|
118
118
|
children: s ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
119
119
|
/* @__PURE__ */ e.jsxs("span", { className: "text-sm pr-8", children: [
|
|
120
|
-
|
|
120
|
+
y && /* @__PURE__ */ e.jsx("span", { className: "text-[10px] text-purple-500 bg-purple-100 px-2 py-0.5 mr-2 rounded-full", children: Y(d) }),
|
|
121
121
|
s
|
|
122
122
|
] }),
|
|
123
123
|
/* @__PURE__ */ e.jsx("span", { className: "text-[9px] text-blue-400 underline cursor-pointer hover:text-blue-700", children: "Change" })
|
|
@@ -131,20 +131,20 @@ const je = ({ data: r, fullView: s }) => {
|
|
|
131
131
|
/* @__PURE__ */ e.jsx(Wt, { placeholder: `Choose ${le(r)}...` }),
|
|
132
132
|
/* @__PURE__ */ e.jsxs(Ut, { children: [
|
|
133
133
|
/* @__PURE__ */ e.jsx(Kt, { children: "No results found." }),
|
|
134
|
-
/* @__PURE__ */ e.jsx(qt, { children: C(
|
|
134
|
+
/* @__PURE__ */ e.jsx(qt, { children: C(g, (u) => /* @__PURE__ */ e.jsxs(
|
|
135
135
|
Gt,
|
|
136
136
|
{
|
|
137
137
|
value: u,
|
|
138
|
-
className: `cursor-pointer ${
|
|
138
|
+
className: `cursor-pointer ${y ? "flex justify-between items-center" : "flex flex-col items-start justify-start"}`,
|
|
139
139
|
onSelect: (f) => {
|
|
140
|
-
t(
|
|
140
|
+
t(gt(g, (k) => k === f) || null), h(!1);
|
|
141
141
|
},
|
|
142
142
|
children: [
|
|
143
143
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
|
|
144
144
|
/* @__PURE__ */ e.jsx(Nr, { className: `w-4 h-4 text-green-500 ${s === u ? "" : "opacity-0"}` }),
|
|
145
145
|
u
|
|
146
146
|
] }),
|
|
147
|
-
|
|
147
|
+
y ? /* @__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(x(i, u, "")) }) }) : /* @__PURE__ */ e.jsx("div", { className: "pl-6", children: /* @__PURE__ */ e.jsx(je, { data: x(o, u) }) })
|
|
148
148
|
]
|
|
149
149
|
},
|
|
150
150
|
u
|
|
@@ -153,7 +153,7 @@ const je = ({ data: r, fullView: s }) => {
|
|
|
153
153
|
] }) })
|
|
154
154
|
] })
|
|
155
155
|
] }),
|
|
156
|
-
!
|
|
156
|
+
!y && !m(s) && /* @__PURE__ */ e.jsx("div", { className: "pt-2", children: /* @__PURE__ */ e.jsx(je, { data: x(o, s, ""), fullView: !0 }) })
|
|
157
157
|
] });
|
|
158
158
|
}, Er = ({
|
|
159
159
|
appliedBindings: r = [],
|
|
@@ -161,12 +161,12 @@ const je = ({ data: r, fullView: s }) => {
|
|
|
161
161
|
editMode: t,
|
|
162
162
|
item: o
|
|
163
163
|
}) => {
|
|
164
|
-
const [l, d] = j(t ? o.key : ""), [a, c] = j(t ? o.value : ""), i = q(), [p] = lt(),
|
|
165
|
-
(
|
|
166
|
-
if (m(
|
|
164
|
+
const [l, d] = j(t ? o.key : ""), [a, c] = j(t ? o.value : ""), i = q(), [p] = lt(), y = B(
|
|
165
|
+
(g, u) => {
|
|
166
|
+
if (m(g))
|
|
167
167
|
return "";
|
|
168
168
|
{
|
|
169
|
-
const f =
|
|
169
|
+
const f = x(u === "PROP" ? i : p, g, "");
|
|
170
170
|
if (ie(f))
|
|
171
171
|
return "list";
|
|
172
172
|
const k = typeof f;
|
|
@@ -174,7 +174,7 @@ const je = ({ data: r, fullView: s }) => {
|
|
|
174
174
|
}
|
|
175
175
|
},
|
|
176
176
|
[i, p]
|
|
177
|
-
), [n,
|
|
177
|
+
), [n, h] = j(t ? y(o.key, "PROP") : "");
|
|
178
178
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
179
179
|
/* @__PURE__ */ e.jsxs(Jt, { children: [
|
|
180
180
|
/* @__PURE__ */ e.jsx(Qt, { children: "Add Data Binding" }),
|
|
@@ -189,9 +189,9 @@ const je = ({ data: r, fullView: s }) => {
|
|
|
189
189
|
placeholder: "Enter prop key",
|
|
190
190
|
value: l,
|
|
191
191
|
setValue: d,
|
|
192
|
-
onChange: (
|
|
193
|
-
const u =
|
|
194
|
-
d(
|
|
192
|
+
onChange: (g) => {
|
|
193
|
+
const u = y(g, "PROP");
|
|
194
|
+
d(g), n !== u && c(""), h(u);
|
|
195
195
|
},
|
|
196
196
|
data: i,
|
|
197
197
|
dataType: n,
|
|
@@ -207,9 +207,9 @@ const je = ({ data: r, fullView: s }) => {
|
|
|
207
207
|
placeholder: "Enter data path",
|
|
208
208
|
value: a,
|
|
209
209
|
setValue: c,
|
|
210
|
-
onChange: (
|
|
211
|
-
const u =
|
|
212
|
-
c(n === u ?
|
|
210
|
+
onChange: (g) => {
|
|
211
|
+
const u = y(g, "PATH");
|
|
212
|
+
c(n === u ? g : "");
|
|
213
213
|
},
|
|
214
214
|
data: p,
|
|
215
215
|
dataType: n,
|
|
@@ -218,7 +218,7 @@ const je = ({ data: r, fullView: s }) => {
|
|
|
218
218
|
)
|
|
219
219
|
] }),
|
|
220
220
|
/* @__PURE__ */ e.jsx(tr, { children: /* @__PURE__ */ e.jsx(
|
|
221
|
-
|
|
221
|
+
xe,
|
|
222
222
|
{
|
|
223
223
|
type: "submit",
|
|
224
224
|
className: "mt-4",
|
|
@@ -252,21 +252,21 @@ const je = ({ data: r, fullView: s }) => {
|
|
|
252
252
|
dataProvider: l,
|
|
253
253
|
appliedBindings: d
|
|
254
254
|
}) => {
|
|
255
|
-
const [a, c] = j("string"), i = (p,
|
|
255
|
+
const [a, c] = j("string"), i = (p, y) => {
|
|
256
256
|
if (m(p))
|
|
257
257
|
return "";
|
|
258
258
|
{
|
|
259
|
-
const n =
|
|
259
|
+
const n = x(y === "PROP" ? o : l, p, "");
|
|
260
260
|
if (ie(n))
|
|
261
261
|
return "list";
|
|
262
|
-
const
|
|
263
|
-
return
|
|
262
|
+
const h = typeof n;
|
|
263
|
+
return h === "string" ? "text" : h === "object" ? "model" : h;
|
|
264
264
|
}
|
|
265
265
|
};
|
|
266
266
|
return M(() => c(() => i(r.key, "PROP")), [r.key]), /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col border border-gray-200 relative rounded-md p-2", children: [
|
|
267
267
|
/* @__PURE__ */ e.jsx("div", { className: "text-gray-500 font-normal text-sm", children: r.key }),
|
|
268
268
|
/* @__PURE__ */ e.jsx("div", { className: "font-medium leading-5", children: r.value }),
|
|
269
|
-
/* @__PURE__ */ e.jsx(je, { data:
|
|
269
|
+
/* @__PURE__ */ e.jsx(je, { data: x(l, r.value, "") }),
|
|
270
270
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-end gap-x-2", children: [
|
|
271
271
|
/* @__PURE__ */ e.jsx(st, { editMode: !0, onAddBinding: s, appliedBindings: d, item: r, children: /* @__PURE__ */ e.jsx(_r, { 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" }) }),
|
|
272
272
|
/* @__PURE__ */ e.jsx(
|
|
@@ -281,10 +281,10 @@ const je = ({ data: r, fullView: s }) => {
|
|
|
281
281
|
] });
|
|
282
282
|
}, Mr = ({ bindingData: r, onChange: s }) => {
|
|
283
283
|
const t = q(), [o] = lt(), l = Tr(), [d, a] = j(
|
|
284
|
-
C(r, (n,
|
|
284
|
+
C(r, (n, h) => ({ key: h, value: n }))
|
|
285
285
|
);
|
|
286
286
|
M(() => {
|
|
287
|
-
a(C(r, (n,
|
|
287
|
+
a(C(r, (n, h) => ({ key: h, value: n })));
|
|
288
288
|
}, [t == null ? void 0 : t._id]);
|
|
289
289
|
const c = _(() => {
|
|
290
290
|
if (m(o))
|
|
@@ -294,21 +294,21 @@ const je = ({ data: r, fullView: s }) => {
|
|
|
294
294
|
const n = ve(d);
|
|
295
295
|
return m(n == null ? void 0 : n.key) || m(n == null ? void 0 : n.value);
|
|
296
296
|
}, [o, d]), i = (n) => {
|
|
297
|
-
const
|
|
298
|
-
a([...
|
|
297
|
+
const h = we(d, (g) => g.key !== n.key);
|
|
298
|
+
a([...h, n]), y([...h, n]);
|
|
299
299
|
}, p = (n) => {
|
|
300
|
-
const
|
|
301
|
-
|
|
302
|
-
},
|
|
300
|
+
const h = we(d, (g, u) => n !== u);
|
|
301
|
+
y([...h]);
|
|
302
|
+
}, y = B(
|
|
303
303
|
(n = []) => {
|
|
304
304
|
if (a(n), m(n)) {
|
|
305
305
|
s({});
|
|
306
306
|
return;
|
|
307
307
|
}
|
|
308
|
-
const
|
|
309
|
-
ke(n, (
|
|
310
|
-
!m(
|
|
311
|
-
}), s(
|
|
308
|
+
const h = {};
|
|
309
|
+
ke(n, (g) => {
|
|
310
|
+
!m(g == null ? void 0 : g.key) && !m(g == null ? void 0 : g.value) && Me(h, g.key, g.value);
|
|
311
|
+
}), s(h);
|
|
312
312
|
},
|
|
313
313
|
[s]
|
|
314
314
|
);
|
|
@@ -317,12 +317,12 @@ const je = ({ data: r, fullView: s }) => {
|
|
|
317
317
|
/* @__PURE__ */ e.jsx("br", {}),
|
|
318
318
|
/* @__PURE__ */ e.jsx("a", { className: "text-blue-500", href: "https://chaibuilder.com/docs/registering-data-providers", target: "_blank", children: "Learn more" })
|
|
319
319
|
] }) }) : /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
320
|
-
C(d, (n,
|
|
320
|
+
C(d, (n, h) => /* @__PURE__ */ e.jsx(
|
|
321
321
|
Or,
|
|
322
322
|
{
|
|
323
323
|
item: n,
|
|
324
324
|
onAddBinding: i,
|
|
325
|
-
onRemove: () => p(
|
|
325
|
+
onRemove: () => p(h),
|
|
326
326
|
selectedBlock: t,
|
|
327
327
|
dataProvider: o,
|
|
328
328
|
appliedBindings: C(d, "key")
|
|
@@ -352,7 +352,7 @@ const je = ({ data: r, fullView: s }) => {
|
|
|
352
352
|
const l = { type: "object", properties: {} }, d = {};
|
|
353
353
|
return Object.keys(s).forEach((a) => {
|
|
354
354
|
const c = s[a];
|
|
355
|
-
if (
|
|
355
|
+
if (P(["slot", "styles"], c.type))
|
|
356
356
|
return;
|
|
357
357
|
const i = a;
|
|
358
358
|
l.properties[i] = or(c), d[i] = ar(c);
|
|
@@ -381,19 +381,19 @@ const je = ({ data: r, fullView: s }) => {
|
|
|
381
381
|
);
|
|
382
382
|
});
|
|
383
383
|
function Yr() {
|
|
384
|
-
const r = q(), { createSnapshot: s } = We(), t = Ue(), o = tt(r._type), l = { ...r }, d = pr("dataBindingSupport", !1), a = () => s(), c = ({ formData: n },
|
|
385
|
-
if (
|
|
386
|
-
const
|
|
387
|
-
t([r._id], { [
|
|
384
|
+
const r = q(), { createSnapshot: s } = We(), t = Ue(), o = tt(r._type), l = { ...r }, d = pr("dataBindingSupport", !1), a = () => s(), c = ({ formData: n }, h) => {
|
|
385
|
+
if (h) {
|
|
386
|
+
const g = h.replace("root.", "");
|
|
387
|
+
t([r._id], { [g]: x(n, g) });
|
|
388
388
|
}
|
|
389
389
|
}, i = {
|
|
390
390
|
_name: kr({
|
|
391
391
|
title: "Name",
|
|
392
|
-
default:
|
|
392
|
+
default: x(r, "_name", r._type)
|
|
393
393
|
})
|
|
394
|
-
}, p =
|
|
395
|
-
const n =
|
|
396
|
-
return d && bt(p, (
|
|
394
|
+
}, p = ht(x(l, "_bindings", {})), y = _(() => {
|
|
395
|
+
const n = yt(x(o, "props", {}));
|
|
396
|
+
return d && bt(p, (h) => delete n[h]), n;
|
|
397
397
|
}, [o, p, d]);
|
|
398
398
|
return /* @__PURE__ */ e.jsxs("div", { className: "overflow-x-hidden", children: [
|
|
399
399
|
/* @__PURE__ */ e.jsx(
|
|
@@ -412,7 +412,7 @@ function Yr() {
|
|
|
412
412
|
/* @__PURE__ */ e.jsx(
|
|
413
413
|
"div",
|
|
414
414
|
{
|
|
415
|
-
className: `h-[8px] w-[8px] rounded-full ${m(
|
|
415
|
+
className: `h-[8px] w-[8px] rounded-full ${m(x(r, "_bindings", {})) ? "bg-gray-300" : "bg-blue-500"}`
|
|
416
416
|
}
|
|
417
417
|
),
|
|
418
418
|
"Data Binding"
|
|
@@ -420,7 +420,7 @@ function Yr() {
|
|
|
420
420
|
/* @__PURE__ */ e.jsx(pe, { className: "pt-4 px-4", children: /* @__PURE__ */ e.jsx(
|
|
421
421
|
Mr,
|
|
422
422
|
{
|
|
423
|
-
bindingData:
|
|
423
|
+
bindingData: x(l, "_bindings", {}),
|
|
424
424
|
onChange: (n) => {
|
|
425
425
|
c({ formData: { ...l, _bindings: n } }, "root._bindings");
|
|
426
426
|
}
|
|
@@ -446,7 +446,7 @@ function Yr() {
|
|
|
446
446
|
onChange: c,
|
|
447
447
|
createHistorySnapshot: a,
|
|
448
448
|
formData: l,
|
|
449
|
-
properties:
|
|
449
|
+
properties: y
|
|
450
450
|
}
|
|
451
451
|
)
|
|
452
452
|
] })
|
|
@@ -457,13 +457,13 @@ function Yr() {
|
|
|
457
457
|
onChange: c,
|
|
458
458
|
createHistorySnapshot: a,
|
|
459
459
|
formData: l,
|
|
460
|
-
properties:
|
|
460
|
+
properties: y
|
|
461
461
|
}
|
|
462
462
|
),
|
|
463
463
|
/* @__PURE__ */ e.jsx("div", { className: "pb-60" })
|
|
464
464
|
] });
|
|
465
465
|
}
|
|
466
|
-
const
|
|
466
|
+
const Ae = new Dr($r, {
|
|
467
467
|
isCaseSensitive: !1,
|
|
468
468
|
threshold: 0.2,
|
|
469
469
|
minMatchCharLength: 2,
|
|
@@ -471,22 +471,22 @@ const Pe = new Dr($r, {
|
|
|
471
471
|
});
|
|
472
472
|
function Fr() {
|
|
473
473
|
var L;
|
|
474
|
-
const [r] = Se(), s = q(), t = qe(), o = Ge(), [l] = Je(), [d, a] = j(""), c = (L = ue(r)) == null ? void 0 : L.prop, i = ft((
|
|
474
|
+
const [r] = Se(), s = q(), t = qe(), o = Ge(), [l] = Je(), [d, a] = j(""), c = (L = ue(r)) == null ? void 0 : L.prop, i = ft((x(s, c, "").replace(Ar, "").split(",").pop() || "").split(" "), m), p = () => {
|
|
475
475
|
const w = d.trim().toLowerCase().replace(/ +(?= )/g, "").split(" ");
|
|
476
476
|
t(l, w, !0), a("");
|
|
477
|
-
}, [
|
|
477
|
+
}, [y, n] = j([]), h = ({ value: w }) => {
|
|
478
478
|
const I = w.trim().toLowerCase(), E = I.match(/.+:/g);
|
|
479
479
|
let N = [];
|
|
480
480
|
if (E && E.length > 0) {
|
|
481
481
|
const [D] = E, z = I.replace(D, "");
|
|
482
|
-
N =
|
|
482
|
+
N = Ae.search(z).map((b) => ({
|
|
483
483
|
...b,
|
|
484
484
|
item: { ...b.item, name: D + b.item.name }
|
|
485
485
|
}));
|
|
486
486
|
} else
|
|
487
|
-
N =
|
|
487
|
+
N = Ae.search(I);
|
|
488
488
|
n(C(N, "item"));
|
|
489
|
-
},
|
|
489
|
+
}, g = () => {
|
|
490
490
|
n([]);
|
|
491
491
|
}, u = (w) => w.name, f = (w) => /* @__PURE__ */ e.jsx("div", { className: "rounded-md p-1", children: w.name }), k = {
|
|
492
492
|
autoComplete: "off",
|
|
@@ -504,16 +504,16 @@ function Fr() {
|
|
|
504
504
|
return /* @__PURE__ */ e.jsxs(
|
|
505
505
|
"div",
|
|
506
506
|
{
|
|
507
|
-
className: `no-scrollbar flex ${
|
|
507
|
+
className: `no-scrollbar flex ${y.length > 0 ? "min-h-[300px]" : "min-h-max"} w-full flex-col gap-y-5 overflow-y-auto bg-gray-100 px-px`,
|
|
508
508
|
children: [
|
|
509
509
|
/* @__PURE__ */ e.jsx(Te, { className: "mt-2", children: "Add Tailwind classes" }),
|
|
510
510
|
/* @__PURE__ */ e.jsxs("div", { className: "relative -mt-4 flex items-center gap-x-3", children: [
|
|
511
511
|
/* @__PURE__ */ e.jsx("div", { className: "relative flex w-full items-center gap-x-3", children: /* @__PURE__ */ e.jsx(
|
|
512
512
|
Br,
|
|
513
513
|
{
|
|
514
|
-
suggestions:
|
|
515
|
-
onSuggestionsFetchRequested:
|
|
516
|
-
onSuggestionsClearRequested:
|
|
514
|
+
suggestions: y,
|
|
515
|
+
onSuggestionsFetchRequested: h,
|
|
516
|
+
onSuggestionsClearRequested: g,
|
|
517
517
|
getSuggestionValue: u,
|
|
518
518
|
renderSuggestion: f,
|
|
519
519
|
inputProps: k,
|
|
@@ -528,7 +528,7 @@ function Fr() {
|
|
|
528
528
|
}
|
|
529
529
|
) }),
|
|
530
530
|
/* @__PURE__ */ e.jsx(
|
|
531
|
-
|
|
531
|
+
xe,
|
|
532
532
|
{
|
|
533
533
|
variant: "outline",
|
|
534
534
|
className: "h-6 border-gray-700",
|
|
@@ -788,35 +788,35 @@ const H = ["px", "%", "em", "rem", "ch", "vh", "vw"], Xr = {
|
|
|
788
788
|
{
|
|
789
789
|
heading: "typography.heading",
|
|
790
790
|
items: [
|
|
791
|
-
{ type: "dropdown", property: "
|
|
792
|
-
{ type: "arbitrary", property: "
|
|
793
|
-
{ type: "arbitrary", property: "
|
|
794
|
-
{ type: "range", property: "
|
|
795
|
-
{ type: "color", property: "
|
|
791
|
+
{ type: "dropdown", property: "fontFamily", label: "typography.font" },
|
|
792
|
+
{ type: "arbitrary", property: "fontSize", label: "typography.size", units: H },
|
|
793
|
+
{ type: "arbitrary", property: "lineHeight", label: "typography.height", units: H.concat("-") },
|
|
794
|
+
{ type: "range", property: "fontWeight", label: "typography.weight" },
|
|
795
|
+
{ type: "color", property: "textColor", label: "typography.color" },
|
|
796
796
|
{
|
|
797
797
|
styleType: "accordion",
|
|
798
798
|
heading: "typography.alignments",
|
|
799
799
|
items: [
|
|
800
|
-
{ type: "dropdown", property: "
|
|
801
|
-
{ type: "dropdown", property: "
|
|
800
|
+
{ type: "dropdown", property: "textAlign", label: "typography.align" },
|
|
801
|
+
{ type: "dropdown", property: "verticalAlign", label: "typography.valign" }
|
|
802
802
|
]
|
|
803
803
|
},
|
|
804
804
|
{
|
|
805
805
|
styleType: "accordion",
|
|
806
806
|
heading: "typography.spacing_decoration_more",
|
|
807
807
|
items: [
|
|
808
|
-
{ type: "dropdown", property: "
|
|
809
|
-
{ type: "dropdown", property: "
|
|
810
|
-
{ type: "range", property: "
|
|
811
|
-
{ type: "dropdown", property: "
|
|
808
|
+
{ type: "dropdown", property: "letterSpacing", label: "typography.spacing" },
|
|
809
|
+
{ type: "dropdown", property: "textDecoration", label: "typography.decoration" },
|
|
810
|
+
{ type: "range", property: "textDecorationThickness", label: "typography.thickness" },
|
|
811
|
+
{ type: "dropdown", property: "textTransform", label: "typography.transform" }
|
|
812
812
|
]
|
|
813
813
|
},
|
|
814
814
|
{
|
|
815
815
|
styleType: "accordion",
|
|
816
816
|
heading: "typography.whitespace_breaks",
|
|
817
817
|
items: [
|
|
818
|
-
{ type: "dropdown", property: "
|
|
819
|
-
{ type: "dropdown", property: "
|
|
818
|
+
{ type: "dropdown", property: "whitespace", label: "typography.whitespace" },
|
|
819
|
+
{ type: "dropdown", property: "wordbreak", label: "typography.wordbreak" }
|
|
820
820
|
]
|
|
821
821
|
}
|
|
822
822
|
]
|
|
@@ -996,32 +996,32 @@ const H = ["px", "%", "em", "rem", "ch", "vh", "vw"], Xr = {
|
|
|
996
996
|
invisible: He,
|
|
997
997
|
// display
|
|
998
998
|
hidden: He,
|
|
999
|
-
gap:
|
|
999
|
+
gap: A,
|
|
1000
1000
|
gapX: T,
|
|
1001
1001
|
gapY: R,
|
|
1002
1002
|
spaceX: T,
|
|
1003
1003
|
spaceY: R,
|
|
1004
|
-
overscroll:
|
|
1004
|
+
overscroll: A,
|
|
1005
1005
|
overscrollX: T,
|
|
1006
1006
|
overscrollY: R,
|
|
1007
|
-
overflow:
|
|
1007
|
+
overflow: A,
|
|
1008
1008
|
overflowX: T,
|
|
1009
1009
|
overflowY: R,
|
|
1010
1010
|
top: Q,
|
|
1011
1011
|
right: ee,
|
|
1012
1012
|
bottom: te,
|
|
1013
1013
|
left: re,
|
|
1014
|
-
inset:
|
|
1014
|
+
inset: A,
|
|
1015
1015
|
insetX: T,
|
|
1016
1016
|
insetY: R,
|
|
1017
|
-
border:
|
|
1017
|
+
border: A,
|
|
1018
1018
|
borderX: T,
|
|
1019
1019
|
borderY: R,
|
|
1020
1020
|
borderTop: Q,
|
|
1021
1021
|
borderRight: ee,
|
|
1022
1022
|
borderBottom: te,
|
|
1023
1023
|
borderLeft: re,
|
|
1024
|
-
borderRadius:
|
|
1024
|
+
borderRadius: A,
|
|
1025
1025
|
borderRadiusX: T,
|
|
1026
1026
|
borderRadiusY: R,
|
|
1027
1027
|
borderRadiusTop: Q,
|
|
@@ -1034,7 +1034,7 @@ const H = ["px", "%", "em", "rem", "ch", "vh", "vw"], Xr = {
|
|
|
1034
1034
|
borderRadiusBottomLeft: Tt,
|
|
1035
1035
|
divideXWidth: T,
|
|
1036
1036
|
divideYWidth: R,
|
|
1037
|
-
scale:
|
|
1037
|
+
scale: A,
|
|
1038
1038
|
scaleX: T,
|
|
1039
1039
|
scaleY: R,
|
|
1040
1040
|
skewX: T,
|
|
@@ -1042,7 +1042,7 @@ const H = ["px", "%", "em", "rem", "ch", "vh", "vw"], Xr = {
|
|
|
1042
1042
|
translateX: T,
|
|
1043
1043
|
translateY: R,
|
|
1044
1044
|
// padding
|
|
1045
|
-
padding:
|
|
1045
|
+
padding: A,
|
|
1046
1046
|
paddingX: T,
|
|
1047
1047
|
paddingY: R,
|
|
1048
1048
|
paddingTop: Q,
|
|
@@ -1050,7 +1050,7 @@ const H = ["px", "%", "em", "rem", "ch", "vh", "vw"], Xr = {
|
|
|
1050
1050
|
paddingBottom: te,
|
|
1051
1051
|
paddingLeft: re,
|
|
1052
1052
|
// margin
|
|
1053
|
-
margin:
|
|
1053
|
+
margin: A,
|
|
1054
1054
|
marginX: T,
|
|
1055
1055
|
marginY: R,
|
|
1056
1056
|
marginTop: Q,
|
|
@@ -1069,7 +1069,7 @@ const H = ["px", "%", "em", "rem", "ch", "vh", "vw"], Xr = {
|
|
|
1069
1069
|
underline: $t,
|
|
1070
1070
|
overline: It,
|
|
1071
1071
|
// transform
|
|
1072
|
-
uppercase:
|
|
1072
|
+
uppercase: At,
|
|
1073
1073
|
block: () => /* @__PURE__ */ e.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1074
1074
|
/* @__PURE__ */ e.jsx(
|
|
1075
1075
|
"path",
|
|
@@ -1182,12 +1182,12 @@ const H = ["px", "%", "em", "rem", "ch", "vh", "vw"], Xr = {
|
|
|
1182
1182
|
}
|
|
1183
1183
|
)
|
|
1184
1184
|
] }),
|
|
1185
|
-
static:
|
|
1185
|
+
static: Pt
|
|
1186
1186
|
}, oe = Oe({ canReset: !1, canChange: !0 }), Ur = ({ children: r, canReset: s = !1, canChange: t = !0 }) => (
|
|
1187
1187
|
// eslint-disable-next-line react/jsx-no-constructed-context-values
|
|
1188
1188
|
/* @__PURE__ */ e.jsx(oe.Provider, { value: { canReset: s, canChange: t }, children: r })
|
|
1189
1189
|
), at = ({ label: r, property: s, onChange: t }) => {
|
|
1190
|
-
const o = _(() =>
|
|
1190
|
+
const o = _(() => x(he, `${s}.classes`, [""]), [s]), l = ae(s), d = _(() => x(l, "cls", ""), [l]), { canChange: a } = se(oe), c = /\[.*\]/g.test(d);
|
|
1191
1191
|
return /* @__PURE__ */ e.jsx("div", { className: r ? "w-full rounded " : "grow", children: c ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
|
|
1192
1192
|
/* @__PURE__ */ e.jsx(ur, { className: "w-[70%] rounded py-1", readOnly: !0, value: d }),
|
|
1193
1193
|
/* @__PURE__ */ e.jsxs(F, { delayDuration: 100, children: [
|
|
@@ -1227,7 +1227,7 @@ function Ce({ selected: r, onChange: s, rounded: t = !1, options: o, disabled: l
|
|
|
1227
1227
|
);
|
|
1228
1228
|
}
|
|
1229
1229
|
const Kr = ({ property: r, onChange: s }) => {
|
|
1230
|
-
const { canReset: t, canChange: o } = se(oe), l = ae(r), d = _(() =>
|
|
1230
|
+
const { canReset: t, canChange: o } = se(oe), l = ae(r), d = _(() => x(l, "cls", ""), [l]), a = _(() => x(he, `${r}.classes`, [""]), [r]), c = a.indexOf(d) > -1 ? a.indexOf(d) : 0, i = /\[.*\]/g.test(d);
|
|
1231
1231
|
return /* @__PURE__ */ e.jsx("div", { className: "flex flex-row divide-x divide-solid divide-border rounded border border-border text-xs", children: i ? /* @__PURE__ */ e.jsx("div", { className: "py-[5px] px-2", children: d }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1232
1232
|
/* @__PURE__ */ e.jsx(
|
|
1233
1233
|
"button",
|
|
@@ -1262,7 +1262,7 @@ const Kr = ({ property: r, onChange: s }) => {
|
|
|
1262
1262
|
)
|
|
1263
1263
|
] }) });
|
|
1264
1264
|
}, qr = ({ property: r, onChange: s }) => {
|
|
1265
|
-
const t = _(() =>
|
|
1265
|
+
const t = _(() => x(he, `${r}.classes`, [""]), [r]), { canChange: o } = se(oe), l = ae(r), d = _(() => x(l, "cls", ""), [l]);
|
|
1266
1266
|
return /* @__PURE__ */ e.jsx("div", { className: "flex grow flex-wrap gap-1", children: C(t, (a) => /* @__PURE__ */ e.jsxs(F, { children: [
|
|
1267
1267
|
/* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
1268
1268
|
"button",
|
|
@@ -1271,7 +1271,7 @@ const Kr = ({ property: r, onChange: s }) => {
|
|
|
1271
1271
|
disabled: !o,
|
|
1272
1272
|
onClick: () => s(a, r),
|
|
1273
1273
|
className: `cursor-pointer rounded border border-gray-600 p-1 disabled:cursor-not-allowed ${d === a ? " bg-blue-500 text-white" : "disabled:bg-gray-600 disabled:text-gray-400"}`,
|
|
1274
|
-
children: $.createElement(
|
|
1274
|
+
children: $.createElement(x(ot, a, Xe))
|
|
1275
1275
|
}
|
|
1276
1276
|
) }),
|
|
1277
1277
|
/* @__PURE__ */ e.jsx(Z, { children: Y(le(a)) })
|
|
@@ -1289,7 +1289,7 @@ const Kr = ({ property: r, onChange: s }) => {
|
|
|
1289
1289
|
ringColor: "ring",
|
|
1290
1290
|
ringOffsetColor: "ring-offset"
|
|
1291
1291
|
}, Jr = ({ property: r, onChange: s }) => {
|
|
1292
|
-
const t = ae(r), o = _(() =>
|
|
1292
|
+
const t = ae(r), o = _(() => x(t, "cls", ""), [t]), { canChange: l } = se(oe), [d, a] = j([]), [c, i] = j({ color: "", shade: "" }), p = o.split("-"), y = x(p, "1", ""), n = x(p, "2", ""), h = B(
|
|
1293
1293
|
// eslint-disable-next-line no-shadow
|
|
1294
1294
|
(u) => {
|
|
1295
1295
|
["current", "inherit", "transparent", "black", "white"].includes(u) ? (a([]), i({ color: u })) : (a(["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"]), i((f) => ({ ...f, color: u, shade: f.shade ? f.shade : "500" })));
|
|
@@ -1297,30 +1297,30 @@ const Kr = ({ property: r, onChange: s }) => {
|
|
|
1297
1297
|
[a, i]
|
|
1298
1298
|
);
|
|
1299
1299
|
M(() => {
|
|
1300
|
-
if (["current", "inherit", "transparent", "black", "white"].includes(
|
|
1300
|
+
if (["current", "inherit", "transparent", "black", "white"].includes(y))
|
|
1301
1301
|
return a([]);
|
|
1302
1302
|
a(["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"]);
|
|
1303
|
-
}, [
|
|
1304
|
-
const
|
|
1303
|
+
}, [y]);
|
|
1304
|
+
const g = B(
|
|
1305
1305
|
// eslint-disable-next-line no-shadow
|
|
1306
1306
|
(u) => {
|
|
1307
|
-
i({ color:
|
|
1307
|
+
i({ color: y, shade: u });
|
|
1308
1308
|
},
|
|
1309
|
-
[
|
|
1309
|
+
[y]
|
|
1310
1310
|
);
|
|
1311
1311
|
return M(() => {
|
|
1312
1312
|
i({ color: "", shade: "" });
|
|
1313
1313
|
}, [t]), M(() => {
|
|
1314
|
-
const f = `${
|
|
1315
|
-
f.match(new RegExp(
|
|
1314
|
+
const f = `${x(Gr, r, "")}-${c.color}${c.shade ? `-${c.shade}` : ""}`;
|
|
1315
|
+
f.match(new RegExp(x(he, `${r}.regExp`, ""))) && s(f, r);
|
|
1316
1316
|
}, [c, s, r]), /* @__PURE__ */ e.jsxs("div", { className: "flex flex-row divide-x divide-solid divide-border rounded-lg border border-border text-xs", children: [
|
|
1317
1317
|
/* @__PURE__ */ e.jsx("div", { className: "grow text-center", children: /* @__PURE__ */ e.jsx(
|
|
1318
1318
|
Ce,
|
|
1319
1319
|
{
|
|
1320
1320
|
disabled: !l,
|
|
1321
1321
|
rounded: !0,
|
|
1322
|
-
selected:
|
|
1323
|
-
onChange:
|
|
1322
|
+
selected: y,
|
|
1323
|
+
onChange: h,
|
|
1324
1324
|
options: [
|
|
1325
1325
|
"current",
|
|
1326
1326
|
"transparent",
|
|
@@ -1353,9 +1353,9 @@ const Kr = ({ property: r, onChange: s }) => {
|
|
|
1353
1353
|
]
|
|
1354
1354
|
}
|
|
1355
1355
|
) }),
|
|
1356
|
-
/* @__PURE__ */ e.jsx("button", { type: "button", className: "grow text-center", children: /* @__PURE__ */ e.jsx(Ce, { rounded: !0, selected: n, disabled: !
|
|
1356
|
+
/* @__PURE__ */ e.jsx("button", { type: "button", className: "grow text-center", children: /* @__PURE__ */ e.jsx(Ce, { rounded: !0, selected: n, disabled: !y || !l, onChange: g, options: d }) })
|
|
1357
1357
|
] });
|
|
1358
|
-
},
|
|
1358
|
+
}, Pe = (r, s) => {
|
|
1359
1359
|
r = r.toLowerCase();
|
|
1360
1360
|
let t = r.trim().replace(/ |\+/g, "");
|
|
1361
1361
|
if ((t === "auto" || t === "none") && s.includes(t))
|
|
@@ -1375,17 +1375,17 @@ const Qr = (r) => {
|
|
|
1375
1375
|
return { value: "100", unit: r.indexOf("w-") !== -1 ? "vw" : "vh" };
|
|
1376
1376
|
if (t === "full")
|
|
1377
1377
|
return { value: "100", unit: "%" };
|
|
1378
|
-
if (
|
|
1378
|
+
if (P(r, "skew-"))
|
|
1379
1379
|
return { value: `${s}${t}`, unit: "deg" };
|
|
1380
|
-
if (
|
|
1380
|
+
if (P(r, "rotate-"))
|
|
1381
1381
|
return { value: `${s}${t}`, unit: "deg" };
|
|
1382
|
-
if (
|
|
1382
|
+
if (P(r, "opacity-"))
|
|
1383
1383
|
return { value: `${t / 100}`, unit: "-" };
|
|
1384
|
-
if (
|
|
1384
|
+
if (P(r, "duration-") || P(r, "delay-"))
|
|
1385
1385
|
return { value: `${t}`, unit: "ms" };
|
|
1386
|
-
if (
|
|
1386
|
+
if (P(r, "translate-") && !t.includes("/"))
|
|
1387
1387
|
return { value: `${s}${`${t / 4}`}`, unit: "rem" };
|
|
1388
|
-
if (
|
|
1388
|
+
if (P(r, "scale-"))
|
|
1389
1389
|
return { value: `${s}${`${t / 100}`}`, unit: "-" };
|
|
1390
1390
|
if (W(r, "border")) {
|
|
1391
1391
|
const o = r.match(/border-?(x|y|t|r|b|l)?\d+/g);
|
|
@@ -1500,7 +1500,7 @@ const el = (r) => {
|
|
|
1500
1500
|
const s = r.match(/\[.*\]/g);
|
|
1501
1501
|
if (s === null)
|
|
1502
1502
|
return tl(r);
|
|
1503
|
-
const t =
|
|
1503
|
+
const t = x(s, "0", "").replace(/\[|\]/g, ""), o = r.startsWith("-") ? "-" : "", l = ue(t.match(/\d+.\d+|\d+/g));
|
|
1504
1504
|
return { value: `${o}${l}`, unit: t.replace(l, "") };
|
|
1505
1505
|
}, tl = (r) => m(r) ? { value: "", unit: "" } : Qr(r), nt = $.createContext({
|
|
1506
1506
|
setDragData: () => {
|
|
@@ -1538,7 +1538,7 @@ const el = (r) => {
|
|
|
1538
1538
|
}
|
|
1539
1539
|
);
|
|
1540
1540
|
}, ll = ({ onSelect: r, current: s, units: t }) => /* @__PURE__ */ e.jsx("div", { "data-theme": "light", className: "-m-[7px] -mx-[13px] flex w-9 flex-col", children: t.map((o) => /* @__PURE__ */ e.jsx(
|
|
1541
|
-
|
|
1541
|
+
xe,
|
|
1542
1542
|
{
|
|
1543
1543
|
className: "h-max rounded-none px-1 py-1 text-right text-[11px] hover:bg-blue-400",
|
|
1544
1544
|
color: s === o ? "primary" : void 0,
|
|
@@ -1550,37 +1550,37 @@ const el = (r) => {
|
|
|
1550
1550
|
},
|
|
1551
1551
|
o
|
|
1552
1552
|
)) }), Le = 50, sl = (r) => {
|
|
1553
|
-
const [s, t] = j(!1), [o, l] = j(""), { currentClass: d, onChange: a, classPrefix: c, cssProperty: i, units: p, negative:
|
|
1553
|
+
const [s, t] = j(!1), [o, l] = j(""), { currentClass: d, onChange: a, classPrefix: c, cssProperty: i, units: p, negative: y } = r, [n, h] = j(i != null && i.toLowerCase().includes("width") ? "%" : p[0]), [g, u] = j(!1), [f, k] = j(""), [L, w] = j(!1), [I, E] = j(!1);
|
|
1554
1554
|
M(() => {
|
|
1555
1555
|
const { value: b, unit: v } = el(d);
|
|
1556
1556
|
if (v === "") {
|
|
1557
|
-
l(b),
|
|
1557
|
+
l(b), h(i != null && i.toLowerCase().includes("width") ? "%" : ue(p));
|
|
1558
1558
|
return;
|
|
1559
1559
|
}
|
|
1560
|
-
|
|
1560
|
+
h(v), l(v === "class" || m(b) ? "" : b);
|
|
1561
1561
|
}, [d, i, p]);
|
|
1562
1562
|
const N = fe((b) => a(b), [a], Le), D = fe((b) => a(b, !1), [a], Le), z = B(
|
|
1563
1563
|
(b = !1) => {
|
|
1564
|
-
const v =
|
|
1565
|
-
if (
|
|
1564
|
+
const v = Pe(`${o}`, p);
|
|
1565
|
+
if (x(v, "error", !1)) {
|
|
1566
1566
|
u(!0);
|
|
1567
1567
|
return;
|
|
1568
1568
|
}
|
|
1569
|
-
const S =
|
|
1569
|
+
const S = x(v, "unit") !== "" ? x(v, "unit") : n;
|
|
1570
1570
|
if (S === "auto" || S === "none") {
|
|
1571
1571
|
N(`${c}${S}`);
|
|
1572
1572
|
return;
|
|
1573
1573
|
}
|
|
1574
|
-
if (
|
|
1574
|
+
if (x(v, "value") === "")
|
|
1575
1575
|
return;
|
|
1576
|
-
const J = `${
|
|
1576
|
+
const J = `${x(v, "value", "").startsWith("-") ? "-" : ""}${c}[${x(v, "value", "").replace("-", "")}${S === "-" ? "" : S}]`;
|
|
1577
1577
|
b ? D(J) : N(J);
|
|
1578
1578
|
},
|
|
1579
1579
|
[N, D, o, n, c, p]
|
|
1580
1580
|
), G = B(
|
|
1581
1581
|
(b) => {
|
|
1582
|
-
const v =
|
|
1583
|
-
if (
|
|
1582
|
+
const v = Pe(`${o}`, p);
|
|
1583
|
+
if (x(v, "error", !1)) {
|
|
1584
1584
|
u(!0);
|
|
1585
1585
|
return;
|
|
1586
1586
|
}
|
|
@@ -1588,9 +1588,9 @@ const el = (r) => {
|
|
|
1588
1588
|
N(`${c}${b}`);
|
|
1589
1589
|
return;
|
|
1590
1590
|
}
|
|
1591
|
-
if (
|
|
1591
|
+
if (x(v, "value") === "")
|
|
1592
1592
|
return;
|
|
1593
|
-
const S =
|
|
1593
|
+
const S = x(v, "unit") !== "" ? x(v, "unit") : b, J = `${x(v, "value", "").startsWith("-") ? "-" : ""}${c}[${x(v, "value", "").replace("-", "")}${S === "-" ? "" : S}]`;
|
|
1594
1594
|
N(J);
|
|
1595
1595
|
},
|
|
1596
1596
|
[N, o, c, p]
|
|
@@ -1634,7 +1634,7 @@ const el = (r) => {
|
|
|
1634
1634
|
value: L ? f : o,
|
|
1635
1635
|
className: "h-6 w-14 rounded rounded-r-none bg-background pl-2 text-sm focus-visible:outline-0 ".concat(
|
|
1636
1636
|
" ",
|
|
1637
|
-
|
|
1637
|
+
g ? "border-red-500 text-red-500" : "border-foreground/20"
|
|
1638
1638
|
)
|
|
1639
1639
|
}
|
|
1640
1640
|
),
|
|
@@ -1651,13 +1651,13 @@ const el = (r) => {
|
|
|
1651
1651
|
]
|
|
1652
1652
|
}
|
|
1653
1653
|
) }),
|
|
1654
|
-
/* @__PURE__ */ e.jsx(
|
|
1654
|
+
/* @__PURE__ */ e.jsx(xr, { children: /* @__PURE__ */ e.jsx(Z, { className: "bg-background", children: /* @__PURE__ */ e.jsx(
|
|
1655
1655
|
ll,
|
|
1656
1656
|
{
|
|
1657
1657
|
units: p,
|
|
1658
1658
|
current: n,
|
|
1659
1659
|
onSelect: (b) => {
|
|
1660
|
-
t(!1),
|
|
1660
|
+
t(!1), h(b), G(b);
|
|
1661
1661
|
}
|
|
1662
1662
|
}
|
|
1663
1663
|
) }) })
|
|
@@ -1682,13 +1682,13 @@ const el = (r) => {
|
|
|
1682
1682
|
},
|
|
1683
1683
|
currentValue: o,
|
|
1684
1684
|
unit: n,
|
|
1685
|
-
negative:
|
|
1685
|
+
negative: y,
|
|
1686
1686
|
cssProperty: i
|
|
1687
1687
|
}
|
|
1688
1688
|
)
|
|
1689
1689
|
] }) }) });
|
|
1690
1690
|
}, ae = (r) => {
|
|
1691
|
-
const s =
|
|
1691
|
+
const s = ge();
|
|
1692
1692
|
return jt(s, { property: r });
|
|
1693
1693
|
}, ol = (r, s) => {
|
|
1694
1694
|
const t = {
|
|
@@ -1699,7 +1699,7 @@ const el = (r) => {
|
|
|
1699
1699
|
xl: 4,
|
|
1700
1700
|
"2xl": 5
|
|
1701
1701
|
};
|
|
1702
|
-
return t[
|
|
1702
|
+
return t[x(r, "mq", "xs")] <= t[s];
|
|
1703
1703
|
}, al = {
|
|
1704
1704
|
width: "w-",
|
|
1705
1705
|
height: "h-",
|
|
@@ -1775,17 +1775,17 @@ const el = (r) => {
|
|
|
1775
1775
|
"2xl": "1536px"
|
|
1776
1776
|
}, nl = (r) => `${r.toUpperCase()} ${Ee[r] ? `(${Ee[r]} & up)` : ""}`, Re = (r) => {
|
|
1777
1777
|
const { t: s } = K(), { type: t = "icons", label: o, property: l, onEmitChange: d = () => {
|
|
1778
|
-
}, units: a, negative: c = !1 } = r, [i] =
|
|
1778
|
+
}, units: a, negative: c = !1 } = r, [i] = gr(), [p] = Qe(), [, y] = Be(), n = ae(l), h = qe(), g = Ge(), [u] = Je(), f = _(() => x(n, "fullCls", ""), [n]), k = B(
|
|
1779
1779
|
(D, z = !0) => {
|
|
1780
|
-
const G = { dark: i, mq:
|
|
1780
|
+
const G = { dark: i, mq: y, mod: p, cls: D, property: l, fullCls: "" };
|
|
1781
1781
|
(i || p !== "") && (G.mq = "xs");
|
|
1782
1782
|
const b = Ir(G);
|
|
1783
|
-
|
|
1783
|
+
h(u, [b], z);
|
|
1784
1784
|
},
|
|
1785
|
-
[u, i,
|
|
1785
|
+
[u, i, y, p, l, h]
|
|
1786
1786
|
), L = B(() => {
|
|
1787
|
-
|
|
1788
|
-
}, [u, f,
|
|
1787
|
+
g(u, [f]);
|
|
1788
|
+
}, [u, f, g]), w = _(() => ol(n, y), [n, y]);
|
|
1789
1789
|
M(() => {
|
|
1790
1790
|
d(w, n);
|
|
1791
1791
|
}, [w, d, n]);
|
|
@@ -1801,7 +1801,7 @@ const el = (r) => {
|
|
|
1801
1801
|
}[D]);
|
|
1802
1802
|
},
|
|
1803
1803
|
[I]
|
|
1804
|
-
), N =
|
|
1804
|
+
), N = x(n, "dark", null) === i && x(n, "mod", null) === p && x(n, "mq", null) === y;
|
|
1805
1805
|
return /* @__PURE__ */ e.jsx(Ur, { canChange: w, canReset: n && N, children: /* @__PURE__ */ e.jsxs("div", { className: "group flex flex-row items-center py-2 first:pt-0 last:pb-0", children: [
|
|
1806
1806
|
/* @__PURE__ */ e.jsx("div", { className: "relative w-[70px] truncate text-xs text-foreground", children: /* @__PURE__ */ e.jsx("span", { className: `text-[11px] ${n && !N ? "text-foreground" : ""}`, children: s(o) }) }),
|
|
1807
1807
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-row items-center", children: [
|
|
@@ -1809,8 +1809,8 @@ const el = (r) => {
|
|
|
1809
1809
|
t === "arbitrary" ? /* @__PURE__ */ e.jsx(
|
|
1810
1810
|
sl,
|
|
1811
1811
|
{
|
|
1812
|
-
currentClass:
|
|
1813
|
-
classPrefix:
|
|
1812
|
+
currentClass: x(n, "cls", ""),
|
|
1813
|
+
classPrefix: x(al, l, ""),
|
|
1814
1814
|
units: a || [],
|
|
1815
1815
|
onChange: k,
|
|
1816
1816
|
negative: c,
|
|
@@ -1834,7 +1834,7 @@ const el = (r) => {
|
|
|
1834
1834
|
/* @__PURE__ */ e.jsx(Z, { children: /* @__PURE__ */ e.jsx("div", { className: "text-right", children: /* @__PURE__ */ e.jsxs("div", { children: [
|
|
1835
1835
|
"Current style is set at ",
|
|
1836
1836
|
/* @__PURE__ */ e.jsxs("span", { className: "font-bold ", children: [
|
|
1837
|
-
nl(
|
|
1837
|
+
nl(x(n, "mq")),
|
|
1838
1838
|
i && !n.dark ? "(Light mode)" : ""
|
|
1839
1839
|
] }),
|
|
1840
1840
|
/* @__PURE__ */ e.jsx("br", {}),
|
|
@@ -1842,11 +1842,11 @@ const el = (r) => {
|
|
|
1842
1842
|
"button",
|
|
1843
1843
|
{
|
|
1844
1844
|
type: "button",
|
|
1845
|
-
onClick: () => E(
|
|
1845
|
+
onClick: () => E(x(n, "mq")),
|
|
1846
1846
|
className: "block w-full cursor-default text-right font-semibold text-blue-500",
|
|
1847
1847
|
children: [
|
|
1848
1848
|
"Switch to ",
|
|
1849
|
-
|
|
1849
|
+
x(n, "mq").toUpperCase()
|
|
1850
1850
|
]
|
|
1851
1851
|
}
|
|
1852
1852
|
)
|
|
@@ -1863,7 +1863,7 @@ const el = (r) => {
|
|
|
1863
1863
|
units: d = il,
|
|
1864
1864
|
negative: a = !1
|
|
1865
1865
|
}) => {
|
|
1866
|
-
const { t: c } = K(), [i, p] = j(s[0].key),
|
|
1866
|
+
const { t: c } = K(), [i, p] = j(s[0].key), y = ge(), n = B((h) => C(y, "property").includes(h), [y]);
|
|
1867
1867
|
return /* @__PURE__ */ e.jsxs(
|
|
1868
1868
|
"div",
|
|
1869
1869
|
{
|
|
@@ -1872,22 +1872,22 @@ const el = (r) => {
|
|
|
1872
1872
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-row text-xs", children: [
|
|
1873
1873
|
r && /* @__PURE__ */ e.jsx("span", { className: "relative w-[70px] flex-none text-xs text-foreground", children: c(r) }),
|
|
1874
1874
|
/* @__PURE__ */ e.jsx("div", { className: "mb-3 flex grow flex-row flex-wrap gap-x-px", children: $.Children.toArray(
|
|
1875
|
-
s.map(({ label:
|
|
1875
|
+
s.map(({ label: h, key: g }) => /* @__PURE__ */ e.jsx("div", { className: "first:rounded-l last:rounded-r", children: /* @__PURE__ */ e.jsxs(F, { children: [
|
|
1876
1876
|
/* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
1877
1877
|
"button",
|
|
1878
1878
|
{
|
|
1879
1879
|
type: "button",
|
|
1880
|
-
onClick: () => p(
|
|
1881
|
-
className: `relative cursor-pointer rounded-full p-1 text-[8px] ${
|
|
1880
|
+
onClick: () => p(g),
|
|
1881
|
+
className: `relative cursor-pointer rounded-full p-1 text-[8px] ${g === i ? " bg-[#3E57F0] text-white" : "text-gray-600 dark:text-gray-300"}`,
|
|
1882
1882
|
children: [
|
|
1883
1883
|
$.createElement("div", {
|
|
1884
|
-
className: n(
|
|
1884
|
+
className: n(g) ? "-bottom-1.5 absolute bg-[#3E57F0] h-[2px] left-0 w-full" : ""
|
|
1885
1885
|
}),
|
|
1886
|
-
$.createElement(
|
|
1886
|
+
$.createElement(x(ot, g, Xe), { className: "text-inherit w-3 h-3" })
|
|
1887
1887
|
]
|
|
1888
1888
|
}
|
|
1889
1889
|
) }),
|
|
1890
|
-
/* @__PURE__ */ e.jsx(Z, { children: Y(le(
|
|
1890
|
+
/* @__PURE__ */ e.jsx(Z, { children: Y(le(h)) })
|
|
1891
1891
|
] }) }))
|
|
1892
1892
|
) })
|
|
1893
1893
|
] }),
|
|
@@ -1905,7 +1905,7 @@ const el = (r) => {
|
|
|
1905
1905
|
}
|
|
1906
1906
|
);
|
|
1907
1907
|
}, dl = ({ heading: r, items: s }) => {
|
|
1908
|
-
const { t } = K(), o =
|
|
1908
|
+
const { t } = K(), o = ge(), l = _(() => {
|
|
1909
1909
|
const d = (i) => U(
|
|
1910
1910
|
i.map((p) => p.styleType === "multiple" ? C(p.options, "key") : p.property)
|
|
1911
1911
|
), a = U(
|
|
@@ -1926,14 +1926,14 @@ const el = (r) => {
|
|
|
1926
1926
|
/* @__PURE__ */ e.jsx("div", { className: "p-2", children: s.map((d) => d.styleType === "multiple" ? /* @__PURE__ */ e.jsx(it, { ...d }, d.label) : /* @__PURE__ */ e.jsx(Re, { ...d }, d.label)) })
|
|
1927
1927
|
] });
|
|
1928
1928
|
}, cl = Oe({}), me = ({ section: r }) => {
|
|
1929
|
-
const { t: s } = K(), t =
|
|
1929
|
+
const { t: s } = K(), t = ge(), o = B(
|
|
1930
1930
|
(a = []) => {
|
|
1931
1931
|
const c = {};
|
|
1932
1932
|
for (let p = 0; p < t.length; p++)
|
|
1933
1933
|
c[t[p].property] = t[p].cls;
|
|
1934
1934
|
let i = !0;
|
|
1935
1935
|
for (const p in a)
|
|
1936
|
-
if (!
|
|
1936
|
+
if (!ye(c, p) || c[p] !== a[p]) {
|
|
1937
1937
|
i = !1;
|
|
1938
1938
|
break;
|
|
1939
1939
|
}
|
|
@@ -1944,7 +1944,7 @@ const el = (r) => {
|
|
|
1944
1944
|
if (t.length > 0 && r.heading === "classes.heading")
|
|
1945
1945
|
return !0;
|
|
1946
1946
|
const a = (p) => U(
|
|
1947
|
-
p.map((
|
|
1947
|
+
p.map((y) => y.styleType === "multiple" ? U(C(y.options, "key")) : y.property)
|
|
1948
1948
|
), c = U(
|
|
1949
1949
|
r.items.map((p) => p.styleType === "accordion" ? a(p.items) : p.styleType === "multiple" ? U(C(p.options, "key")) : p.property)
|
|
1950
1950
|
), i = C(t, "property");
|
|
@@ -1956,7 +1956,7 @@ const el = (r) => {
|
|
|
1956
1956
|
s(r.heading)
|
|
1957
1957
|
] }) }),
|
|
1958
1958
|
/* @__PURE__ */ e.jsx(pe, { className: "bg-gray-100 px-3.5 py-2", children: $.Children.toArray(
|
|
1959
|
-
r.items.map((a) =>
|
|
1959
|
+
r.items.map((a) => ye(a, "component") ? $.createElement(a.component, { key: a.label }) : ye(a, "styleType") ? a.styleType === "multiple" ? /* @__PURE__ */ e.jsx(it, { ...a }, a.label) : a.styleType === "accordion" && o(a == null ? void 0 : a.conditions) ? /* @__PURE__ */ e.jsx(dl, { ...a }, a.label) : null : /* @__PURE__ */ e.jsx(Re, { ...a }, a.label))
|
|
1960
1960
|
) })
|
|
1961
1961
|
] }) });
|
|
1962
1962
|
}, pl = ({
|
|
@@ -2000,24 +2000,24 @@ const el = (r) => {
|
|
|
2000
2000
|
)
|
|
2001
2001
|
] })
|
|
2002
2002
|
] }), ul = ({ section: r }) => {
|
|
2003
|
-
var
|
|
2004
|
-
const { setSyncState: s } =
|
|
2003
|
+
var h;
|
|
2004
|
+
const { setSyncState: s } = hr(), t = q(), [o, l] = j([]), [d] = Se(), a = Ue(), c = `${x(d, "0.prop")}_attrs`;
|
|
2005
2005
|
ne.useEffect(() => {
|
|
2006
|
-
const
|
|
2007
|
-
m(
|
|
2008
|
-
}, [
|
|
2009
|
-
const i = () => l([...o, { key: "", value: "" }]), p = (
|
|
2010
|
-
const u = we(o, (f, k) =>
|
|
2006
|
+
const g = C(x(t, c), (u, f) => ({ key: f, value: u }));
|
|
2007
|
+
m(g) ? l([]) : l(g);
|
|
2008
|
+
}, [x(t, c)]);
|
|
2009
|
+
const i = () => l([...o, { key: "", value: "" }]), p = (g) => {
|
|
2010
|
+
const u = we(o, (f, k) => g !== k);
|
|
2011
2011
|
n(u);
|
|
2012
|
-
},
|
|
2012
|
+
}, y = (g, u) => {
|
|
2013
2013
|
const f = [...o];
|
|
2014
|
-
f[u][
|
|
2014
|
+
f[u][g.target.name] = g.target.value, n(f);
|
|
2015
2015
|
}, n = ne.useCallback(
|
|
2016
|
-
(
|
|
2016
|
+
(g = []) => {
|
|
2017
2017
|
const u = {};
|
|
2018
|
-
ke(
|
|
2018
|
+
ke(g, (f) => {
|
|
2019
2019
|
m(f.key) || Me(u, f.key, f.value);
|
|
2020
|
-
}), a([
|
|
2020
|
+
}), a([x(t, "_id")], { [c]: u }), s("UNSAVED");
|
|
2021
2021
|
},
|
|
2022
2022
|
[t, s, a, c]
|
|
2023
2023
|
);
|
|
@@ -2026,7 +2026,7 @@ const el = (r) => {
|
|
|
2026
2026
|
/* @__PURE__ */ e.jsx(
|
|
2027
2027
|
"div",
|
|
2028
2028
|
{
|
|
2029
|
-
className: `h-[8px] w-[8px] rounded-full ${m(
|
|
2029
|
+
className: `h-[8px] w-[8px] rounded-full ${m(x(t, c)) ? "bg-gray-300" : "bg-blue-500"}`
|
|
2030
2030
|
}
|
|
2031
2031
|
),
|
|
2032
2032
|
"Attributes"
|
|
@@ -2037,10 +2037,10 @@ const el = (r) => {
|
|
|
2037
2037
|
/* @__PURE__ */ e.jsxs(
|
|
2038
2038
|
"div",
|
|
2039
2039
|
{
|
|
2040
|
-
className: `flex h-6 w-max items-center justify-center gap-x-0.5 rounded-full border p-1 px-2 text-xs ${!m(o) && m((
|
|
2040
|
+
className: `flex h-6 w-max items-center justify-center gap-x-0.5 rounded-full border p-1 px-2 text-xs ${!m(o) && m((h = ve(o)) == null ? void 0 : h.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"}`,
|
|
2041
2041
|
onClick: () => {
|
|
2042
|
-
var
|
|
2043
|
-
!m(o) && m((
|
|
2042
|
+
var g;
|
|
2043
|
+
!m(o) && m((g = ve(o)) == null ? void 0 : g.key) || i();
|
|
2044
2044
|
},
|
|
2045
2045
|
children: [
|
|
2046
2046
|
/* @__PURE__ */ e.jsx(Ne, { width: 12, height: 12 }),
|
|
@@ -2052,15 +2052,15 @@ const el = (r) => {
|
|
|
2052
2052
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col", children: [
|
|
2053
2053
|
m(o) && /* @__PURE__ */ e.jsx("div", { className: "flex h-12 items-center justify-center text-sm text-gray-400", children: "Click + Add to add attributes" }),
|
|
2054
2054
|
ne.Children.toArray(
|
|
2055
|
-
C(o, (
|
|
2055
|
+
C(o, (g, u) => {
|
|
2056
2056
|
const f = o.length > 0 && u < o.length - 1;
|
|
2057
2057
|
return /* @__PURE__ */ e.jsx(
|
|
2058
2058
|
pl,
|
|
2059
2059
|
{
|
|
2060
|
-
item:
|
|
2060
|
+
item: g,
|
|
2061
2061
|
index: u,
|
|
2062
2062
|
canDelete: f,
|
|
2063
|
-
onChange:
|
|
2063
|
+
onChange: y,
|
|
2064
2064
|
onRemove: () => p(u)
|
|
2065
2065
|
}
|
|
2066
2066
|
);
|
|
@@ -2070,8 +2070,8 @@ const el = (r) => {
|
|
|
2070
2070
|
] }) })
|
|
2071
2071
|
] });
|
|
2072
2072
|
};
|
|
2073
|
-
function
|
|
2074
|
-
const [r, s] = Qe(), { flexChild: t, gridChild: o } =
|
|
2073
|
+
function xl() {
|
|
2074
|
+
const [r, s] = Qe(), { flexChild: t, gridChild: o } = yr(), [, l] = Hr(br), { t: d } = K(), [a] = Se();
|
|
2075
2075
|
return m(a) ? /* @__PURE__ */ e.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 rounded-xl p-4", children: [
|
|
2076
2076
|
/* @__PURE__ */ e.jsx(Ze, { className: "mx-auto text-3xl" }),
|
|
2077
2077
|
/* @__PURE__ */ e.jsx("h1", { children: d("no_styling_block_selected") }),
|
|
@@ -2113,7 +2113,7 @@ function gl() {
|
|
|
2113
2113
|
] })
|
|
2114
2114
|
);
|
|
2115
2115
|
}
|
|
2116
|
-
const
|
|
2116
|
+
const gl = {
|
|
2117
2117
|
px: 1,
|
|
2118
2118
|
"%": 1,
|
|
2119
2119
|
em: 100,
|
|
@@ -2136,13 +2136,13 @@ const xl = {
|
|
|
2136
2136
|
cssProperty: ""
|
|
2137
2137
|
}), a = fe(
|
|
2138
2138
|
(i) => {
|
|
2139
|
-
const p = !
|
|
2139
|
+
const p = !x(l, "negative", !1), y = x(l, "cssProperty", "");
|
|
2140
2140
|
let n = parseFloat(l.dragStartValue);
|
|
2141
2141
|
n = ze(n) ? 0 : n;
|
|
2142
|
-
let
|
|
2143
|
-
(W(
|
|
2144
|
-
let u = (l.dragStartY - i.pageY) /
|
|
2145
|
-
p && u < 0 && (u = 0),
|
|
2142
|
+
let h = gl[l.dragUnit];
|
|
2143
|
+
(W(y, "scale") || y === "opacity") && (h = 10);
|
|
2144
|
+
let u = (l.dragStartY - i.pageY) / h + n;
|
|
2145
|
+
p && u < 0 && (u = 0), y === "opacity" && u > 1 && (u = 1), l.onDrag(`${u}`), o(`${u}`);
|
|
2146
2146
|
},
|
|
2147
2147
|
[l],
|
|
2148
2148
|
50
|
|
@@ -2183,7 +2183,7 @@ const xl = {
|
|
|
2183
2183
|
children: /* @__PURE__ */ e.jsx(et, { className: "no-scrollbar -mx-1 pb-5 flex-1 max-h-full overflow-y-hidden overflow-x-hidden", children: /* @__PURE__ */ e.jsx(Yr, {}) })
|
|
2184
2184
|
}
|
|
2185
2185
|
),
|
|
2186
|
-
/* @__PURE__ */ e.jsx($e, { value: "styling", className: "flex-1 h-full overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(
|
|
2186
|
+
/* @__PURE__ */ e.jsx($e, { value: "styling", className: "flex-1 h-full overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(xl, {}) })
|
|
2187
2187
|
] })
|
|
2188
2188
|
] }) });
|
|
2189
2189
|
};
|