@chaibuilder/sdk 1.0.22 → 1.0.23
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--G1jvF_h.js → AddBlocks-Izn_rxXD.js} +1 -1
- package/dist/{AddBlocks-kQZRgF1n.cjs → AddBlocks-RHuwwfe5.cjs} +1 -1
- package/dist/{BrandingOptions-3zuS6-D8.cjs → BrandingOptions-Fyo8qs4o.cjs} +1 -1
- package/dist/{BrandingOptions-dwNB6XlX.js → BrandingOptions-orZyDGiL.js} +1 -1
- package/dist/{CanvasArea-YM7NWbx0.js → CanvasArea-C30uJLef.js} +3 -3
- package/dist/{CanvasArea-SzwU-7i5.cjs → CanvasArea-IM2K8bud.cjs} +2 -2
- package/dist/{CurrentPage-iC1tGuWi.js → CurrentPage-70sBzc2_.js} +2 -2
- package/dist/{CurrentPage-Fw-gGZIK.cjs → CurrentPage-lIithDJy.cjs} +1 -1
- package/dist/{Layers-tvGxr-fn.js → Layers-W0N2zfnf.js} +3 -3
- package/dist/{Layers-bvtrSZ0e.cjs → Layers-YMtavzUG.cjs} +1 -1
- package/dist/{MarkAsGlobalBlock-wqHaABl_.cjs → MarkAsGlobalBlock-EOsABFjY.cjs} +1 -1
- package/dist/{MarkAsGlobalBlock-hUoxbVet.js → MarkAsGlobalBlock-FPCQmRIh.js} +1 -1
- package/dist/{PagesPanel-w32nyAEE.js → PagesPanel-RbHN6lvQ.js} +3 -3
- package/dist/{PagesPanel-IHkdL59C.cjs → PagesPanel-i-MQEmm_.cjs} +1 -1
- package/dist/{ProjectPanel-Rt_C00rp.cjs → ProjectPanel-0BGx-hP-.cjs} +1 -1
- package/dist/{ProjectPanel-1yH8uzoo.js → ProjectPanel-CzwuyR0N.js} +3 -3
- package/dist/{Settings-MbtN9j5p.js → Settings-lxTrbI-C.js} +328 -319
- package/dist/Settings-mTWkKG82.cjs +1 -0
- package/dist/{SidePanels-WDSKmDRO.js → SidePanels-g4M6oTs-.js} +3 -3
- package/dist/{SidePanels-PcCVJHFu.cjs → SidePanels-pUOJTYfr.cjs} +1 -1
- package/dist/{Topbar-QBbGJftd.js → Topbar-KqZt4TEY.js} +1 -1
- package/dist/{Topbar-p07CgA1J.cjs → Topbar-kHffytzr.cjs} +1 -1
- package/dist/{UnsplashImages-NOdXhrYp.js → UnsplashImages-Ua7ksJ8c.js} +1 -1
- package/dist/{UnsplashImages-RobUmAqJ.cjs → UnsplashImages-y7I_7_W7.cjs} +1 -1
- package/dist/{UploadImages-oRvUykXU.cjs → UploadImages-RzEm0Stb.cjs} +1 -1
- package/dist/{UploadImages-_yFxI_3x.js → UploadImages-YP_J6erG.js} +1 -1
- package/dist/{add-page-modal-1C4AYlR3.js → add-page-modal-btGWaXyq.js} +14 -15
- package/dist/{add-page-modal-c20toln3.cjs → add-page-modal-ekFis5D8.cjs} +1 -1
- package/dist/{confirm-alert-LM4La_do.js → confirm-alert-Py2WqZhJ.js} +1 -1
- package/dist/{confirm-alert-exrulqxB.cjs → confirm-alert-mAhT8vln.cjs} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.js +2 -2
- package/dist/{delete-page-modal-sMfhH69k.cjs → delete-page-modal-QzleoJG2.cjs} +1 -1
- package/dist/{delete-page-modal-ZkdZdhkf.js → delete-page-modal-Rq4ThQpu.js} +2 -2
- package/dist/{form-rvWlnmcr.js → form-Lm3bupAq.js} +1 -1
- package/dist/{form-0TlI-dUt.cjs → form-kAjrBaV-.cjs} +1 -1
- package/dist/{index-pgz9p5Yh.js → index-Vx4ctSV6.js} +9 -19
- package/dist/{index-lH7BBNlu.cjs → index-W5drgyWI.cjs} +1 -1
- package/dist/{index-UPQtDmUs.js → index-WPlT_Q87.js} +3 -3
- package/dist/{index-8dYzEcE3.cjs → index-fvoD_laH.cjs} +2 -2
- package/dist/{page-viewer-1EuLsHyz.cjs → page-viewer-AlOCzh1b.cjs} +1 -1
- package/dist/{page-viewer-3860AKDT.js → page-viewer-_wGsV2_o.js} +3 -3
- package/dist/{project-general-setting-mg_zEkzX.js → project-general-setting-B8uuHccU.js} +3 -3
- package/dist/{project-general-setting-Bg7qIWUd.cjs → project-general-setting-XnNyOpXO.cjs} +1 -1
- package/dist/{project-seo-setting-8B9pZPZN.cjs → project-seo-setting-QJBATF59.cjs} +1 -1
- package/dist/{project-seo-setting-6Q0gFmHY.js → project-seo-setting-Zg2Z-Frr.js} +2 -2
- package/dist/{single-page-detail-Asn7bb7f.js → single-page-detail-HXpxgQnU.js} +4 -4
- package/dist/{single-page-detail-52Xz-XJ7.cjs → single-page-detail-MWh30E_-.cjs} +1 -1
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +2 -2
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +1 -1
- package/package.json +2 -2
- package/dist/Settings-zqxhKtAP.cjs +0 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-NV737rRe.js";
|
|
2
2
|
import * as ne from "react";
|
|
3
|
-
import P, { useState as w, useMemo as N, useEffect as _, useCallback as A, createContext as Oe, useContext as re } from "react";
|
|
3
|
+
import P, { useState as w, useMemo as N, useEffect as _, useCallback as A, memo as dt, createContext as Oe, useContext as re } from "react";
|
|
4
4
|
import { useThrottledCallback as me } from "@react-hookz/web";
|
|
5
|
-
import { forEach as je, isArray as ae, omit as
|
|
5
|
+
import { forEach as je, isArray as ae, omit as ct, truncate as pt, includes as M, get as p, first as we, split as ut, startCase as Y, toLower as te, isEmpty as b, map as C, find as xt, last as ye, filter as be, set as Me, keys as gt, cloneDeep as ht, each as mt, capitalize as yt, reject as bt, nth as Re, startsWith as z, isNumber as ft, parseInt as vt, isNaN as Ee, findLast as jt, flatten as U, intersection as _e, has as ge, isNull as wt } from "lodash";
|
|
6
6
|
import { useTranslation as Fe } from "react-i18next";
|
|
7
|
-
import { PlusIcon as Ce, Cross2Icon as Ye, EyeOpenIcon as
|
|
8
|
-
import { b1 as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { u as
|
|
12
|
-
import { Check as
|
|
13
|
-
import { getBlockComponent as et, getChaiDataProviders as
|
|
14
|
-
import { E as
|
|
15
|
-
import { useAtom as
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import { A as
|
|
19
|
-
import { a as
|
|
7
|
+
import { PlusIcon as Ce, Cross2Icon as Ye, EyeOpenIcon as Ct, EyeClosedIcon as Ve, BorderAllIcon as O, WidthIcon as R, HeightIcon as V, ArrowUpIcon as q, ArrowRightIcon as J, ArrowDownIcon as Q, ArrowLeftIcon as ee, ArrowTopLeftIcon as kt, ArrowTopRightIcon as Nt, ArrowBottomRightIcon as Tt, ArrowBottomLeftIcon as St, AlignLeftIcon as Rt, AlignCenterHorizontallyIcon as Vt, AlignRightIcon as Ht, StretchHorizontallyIcon as Bt, FontItalicIcon as At, UnderlineIcon as Dt, OverlineIcon as Pt, LetterCaseUppercaseIcon as $t, Cross1Icon as It, InfoCircledIcon as ke, MinusIcon as Lt, BoxIcon as We, RowSpacingIcon as Ot, TriangleDownIcon as Mt, TrashIcon as Xe, MixerHorizontalIcon as Ze } from "@radix-ui/react-icons";
|
|
8
|
+
import { b1 as Et, b2 as _t, B as pe, b3 as Ft, b4 as Yt, b5 as Wt, b6 as Xt, b7 as Zt, b8 as zt, b9 as Ut, a6 as G, aq as Gt, ar as Kt, as as qt, ba as Jt, ao as Qt, bb as er, ap as tr, aH as W, aI as X, aK as Z, ak as rr, bc as lr, bd as sr, be as or, bf as nr, bg as ar, bh as ir, p as ze, ac as Ue, bi as Ge, bj as ie, bk as de, bl as ce, aj as Ne, P as Ke, a3 as qe, j as Je, aM as Te, bm as dr, bn as cr, a4 as ue, W as pr, a9 as Qe, R as He, ag as ur, ad as xr, bo as gr, au as hr, av as mr, aw as yr, ax as br, ay as H, bp as fr, aB as vr, aC as jr, aD as Be, aE as Ae } from "./index-Vx4ctSV6.js";
|
|
9
|
+
import wr from "@rjsf/core";
|
|
10
|
+
import Cr from "@rjsf/validator-ajv8";
|
|
11
|
+
import { u as kr } from "./controls-G0puEH71.js";
|
|
12
|
+
import { Check as Nr, EditIcon as Tr, TrashIcon as Sr } from "lucide-react";
|
|
13
|
+
import { getBlockComponent as et, getChaiDataProviders as Rr } from "@chaibuilder/runtime";
|
|
14
|
+
import { E as tt, u as rt } from "./index-WPlT_Q87.js";
|
|
15
|
+
import { useAtom as Vr } from "jotai";
|
|
16
|
+
import Hr from "react-autosuggest";
|
|
17
|
+
import Br from "fuse.js";
|
|
18
|
+
import { A as Ar, C as xe, d as Dr } from "./utils-PPBbw5bk.js";
|
|
19
|
+
import { a as Pr } from "./MODIFIERS-MLfpKQY1.js";
|
|
20
20
|
import "@radix-ui/react-toggle";
|
|
21
21
|
import "class-variance-authority";
|
|
22
22
|
import "@radix-ui/react-switch";
|
|
@@ -62,16 +62,16 @@ import "./tailwind-config-d1VL1lzE.js";
|
|
|
62
62
|
import "tailwind-merge";
|
|
63
63
|
import "react-hotkeys-hook";
|
|
64
64
|
import "sonner";
|
|
65
|
-
const
|
|
66
|
-
function
|
|
65
|
+
const $r = P.lazy(() => import("react-json-view"));
|
|
66
|
+
function Ir(t) {
|
|
67
67
|
const l = [], r = {};
|
|
68
|
-
function s(
|
|
68
|
+
function s(n, a) {
|
|
69
69
|
je(a, (d, i) => {
|
|
70
|
-
const
|
|
71
|
-
l.push(
|
|
70
|
+
const o = n ? `${n}.${i}` : i, u = ae(d) ? "list" : typeof d;
|
|
71
|
+
l.push(o), r[o] = u === "string" ? "text" : u === "object" ? "model" : u, u === "object" && !ae(d) && s(o, d);
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
|
-
return s("",
|
|
74
|
+
return s("", ct(t, ["styles", "_type", "_id", "_name", "_bindings"])), { paths: l, pathsType: r };
|
|
75
75
|
}
|
|
76
76
|
const fe = ({ data: t, fullView: l }) => {
|
|
77
77
|
if (!t)
|
|
@@ -79,8 +79,8 @@ const fe = ({ data: t, fullView: l }) => {
|
|
|
79
79
|
const r = typeof t;
|
|
80
80
|
return l ? typeof t == "object" ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
81
81
|
/* @__PURE__ */ e.jsx("div", { className: "h-3" }),
|
|
82
|
-
/* @__PURE__ */ e.jsx(
|
|
83
|
-
|
|
82
|
+
/* @__PURE__ */ e.jsx(tt, { children: /* @__PURE__ */ e.jsx(
|
|
83
|
+
$r,
|
|
84
84
|
{
|
|
85
85
|
style: { maxHeight: "40vh", overflowY: "auto" },
|
|
86
86
|
name: "Content",
|
|
@@ -94,26 +94,26 @@ const fe = ({ data: t, fullView: l }) => {
|
|
|
94
94
|
] }) : /* @__PURE__ */ e.jsxs("div", { className: "text-gray-800/50 text-[12px] leading-4 w-full max-h-36 overflow-x-hidden overflow-y-auto", children: [
|
|
95
95
|
/* @__PURE__ */ e.jsx("span", { className: "font-medium text-gray-800/80", children: "Content: " }),
|
|
96
96
|
t
|
|
97
|
-
] }) : /* @__PURE__ */ e.jsx("div", { className: "text-[10px] text-gray-800/50 leading-3 whitespace-nowrap overflow-hidden w-full", children:
|
|
97
|
+
] }) : /* @__PURE__ */ e.jsx("div", { className: "text-[10px] text-gray-800/50 leading-3 whitespace-nowrap overflow-hidden w-full", children: pt(r === "object" ? JSON.stringify(t) : t, { length: 40 }) });
|
|
98
98
|
}, De = ({
|
|
99
99
|
type: t,
|
|
100
100
|
value: l = "",
|
|
101
101
|
setValue: r,
|
|
102
102
|
data: s,
|
|
103
|
-
onChange:
|
|
103
|
+
onChange: n,
|
|
104
104
|
dataType: a,
|
|
105
105
|
appliedBindings: d
|
|
106
106
|
}) => {
|
|
107
|
-
const { paths: i, pathsType:
|
|
108
|
-
(g) => !M(d, g) && p(u, `props.${we(
|
|
109
|
-
) : i.filter((g) => a === p(
|
|
107
|
+
const { paths: i, pathsType: o } = Ir(s), u = t === "PROP" ? et(s == null ? void 0 : s._type) : {}, x = t === "PROP", [c, m] = w(!1), h = N(() => t === "PROP" ? i.filter(
|
|
108
|
+
(g) => !M(d, g) && p(u, `props.${we(ut(g, "."))}.binding`)
|
|
109
|
+
) : i.filter((g) => a === p(o, g, "")), [t, i, d, a, u]);
|
|
110
110
|
return _(() => {
|
|
111
|
-
l &&
|
|
111
|
+
l && n(l);
|
|
112
112
|
}, [l, t]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
113
113
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-4", children: [
|
|
114
114
|
/* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted-foreground", children: Y(te(t)) }),
|
|
115
|
-
/* @__PURE__ */ e.jsxs(
|
|
116
|
-
/* @__PURE__ */ e.jsx(
|
|
115
|
+
/* @__PURE__ */ e.jsxs(Et, { open: c, onOpenChange: m, children: [
|
|
116
|
+
/* @__PURE__ */ e.jsx(_t, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
117
117
|
pe,
|
|
118
118
|
{
|
|
119
119
|
variant: "outline",
|
|
@@ -131,24 +131,24 @@ const fe = ({ data: t, fullView: l }) => {
|
|
|
131
131
|
] })
|
|
132
132
|
}
|
|
133
133
|
) }),
|
|
134
|
-
/* @__PURE__ */ e.jsx(
|
|
135
|
-
/* @__PURE__ */ e.jsx(
|
|
136
|
-
/* @__PURE__ */ e.jsxs(
|
|
137
|
-
/* @__PURE__ */ e.jsx(
|
|
138
|
-
/* @__PURE__ */ e.jsx(
|
|
139
|
-
|
|
134
|
+
/* @__PURE__ */ e.jsx(Ft, { className: "p-0 z-[999] min-w-[300px]", side: "right", align: "start", children: /* @__PURE__ */ e.jsxs(Yt, { children: [
|
|
135
|
+
/* @__PURE__ */ e.jsx(Wt, { placeholder: `Choose ${te(t)}...` }),
|
|
136
|
+
/* @__PURE__ */ e.jsxs(Xt, { children: [
|
|
137
|
+
/* @__PURE__ */ e.jsx(Zt, { children: "No results found." }),
|
|
138
|
+
/* @__PURE__ */ e.jsx(zt, { children: C(h, (g) => /* @__PURE__ */ e.jsxs(
|
|
139
|
+
Ut,
|
|
140
140
|
{
|
|
141
141
|
value: g,
|
|
142
142
|
className: `cursor-pointer ${x ? "flex justify-between items-center" : "flex flex-col items-start justify-start"}`,
|
|
143
143
|
onSelect: (f) => {
|
|
144
|
-
r(
|
|
144
|
+
r(xt(h, (T) => T === f) || null), m(!1);
|
|
145
145
|
},
|
|
146
146
|
children: [
|
|
147
147
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
|
|
148
|
-
/* @__PURE__ */ e.jsx(
|
|
148
|
+
/* @__PURE__ */ e.jsx(Nr, { className: `w-4 h-4 text-green-500 ${l === g ? "" : "opacity-0"}` }),
|
|
149
149
|
g
|
|
150
150
|
] }),
|
|
151
|
-
x ? /* @__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(p(
|
|
151
|
+
x ? /* @__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(p(o, g, "")) }) }) : /* @__PURE__ */ e.jsx("div", { className: "pl-6", children: /* @__PURE__ */ e.jsx(fe, { data: p(s, g) }) })
|
|
152
152
|
]
|
|
153
153
|
},
|
|
154
154
|
g
|
|
@@ -159,30 +159,30 @@ const fe = ({ data: t, fullView: l }) => {
|
|
|
159
159
|
] }),
|
|
160
160
|
!x && !b(l) && /* @__PURE__ */ e.jsx("div", { className: "pt-2", children: /* @__PURE__ */ e.jsx(fe, { data: p(s, l, ""), fullView: !0 }) })
|
|
161
161
|
] });
|
|
162
|
-
},
|
|
162
|
+
}, Lr = ({
|
|
163
163
|
appliedBindings: t = [],
|
|
164
164
|
onAddBinding: l,
|
|
165
165
|
editMode: r,
|
|
166
166
|
item: s
|
|
167
167
|
}) => {
|
|
168
|
-
const [
|
|
168
|
+
const [n, a] = w(r ? s.key : ""), [d, i] = w(r ? s.value : ""), o = G(), [u] = rt(), x = A(
|
|
169
169
|
(h, g) => {
|
|
170
170
|
if (b(h))
|
|
171
171
|
return "";
|
|
172
172
|
{
|
|
173
|
-
const f = p(g === "PROP" ?
|
|
173
|
+
const f = p(g === "PROP" ? o : u, h, "");
|
|
174
174
|
if (ae(f))
|
|
175
175
|
return "list";
|
|
176
176
|
const T = typeof f;
|
|
177
177
|
return T === "string" ? "text" : T === "object" ? "model" : T;
|
|
178
178
|
}
|
|
179
179
|
},
|
|
180
|
-
[
|
|
180
|
+
[o, u]
|
|
181
181
|
), [c, m] = w(r ? x(s.key, "PROP") : "");
|
|
182
182
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
183
|
-
/* @__PURE__ */ e.jsxs(
|
|
184
|
-
/* @__PURE__ */ e.jsx(
|
|
185
|
-
/* @__PURE__ */ e.jsx(
|
|
183
|
+
/* @__PURE__ */ e.jsxs(Gt, { children: [
|
|
184
|
+
/* @__PURE__ */ e.jsx(Kt, { children: "Add Data Binding" }),
|
|
185
|
+
/* @__PURE__ */ e.jsx(qt, { className: "text-xs", children: "Add prop and path of binding. Click save when you're done." })
|
|
186
186
|
] }),
|
|
187
187
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1 relative", children: [
|
|
188
188
|
/* @__PURE__ */ e.jsx(
|
|
@@ -191,13 +191,13 @@ const fe = ({ data: t, fullView: l }) => {
|
|
|
191
191
|
type: "PROP",
|
|
192
192
|
isDisabled: !1,
|
|
193
193
|
placeholder: "Enter prop key",
|
|
194
|
-
value:
|
|
194
|
+
value: n,
|
|
195
195
|
setValue: a,
|
|
196
196
|
onChange: (h) => {
|
|
197
197
|
const g = x(h, "PROP");
|
|
198
198
|
a(h), c !== g && i(""), m(g);
|
|
199
199
|
},
|
|
200
|
-
data:
|
|
200
|
+
data: o,
|
|
201
201
|
dataType: c,
|
|
202
202
|
appliedBindings: t
|
|
203
203
|
}
|
|
@@ -207,7 +207,7 @@ const fe = ({ data: t, fullView: l }) => {
|
|
|
207
207
|
De,
|
|
208
208
|
{
|
|
209
209
|
type: "PATH",
|
|
210
|
-
isDisabled: b(
|
|
210
|
+
isDisabled: b(n),
|
|
211
211
|
placeholder: "Enter data path",
|
|
212
212
|
value: d,
|
|
213
213
|
setValue: i,
|
|
@@ -221,60 +221,60 @@ const fe = ({ data: t, fullView: l }) => {
|
|
|
221
221
|
}
|
|
222
222
|
)
|
|
223
223
|
] }),
|
|
224
|
-
/* @__PURE__ */ e.jsx(
|
|
224
|
+
/* @__PURE__ */ e.jsx(Jt, { children: /* @__PURE__ */ e.jsx(
|
|
225
225
|
pe,
|
|
226
226
|
{
|
|
227
227
|
type: "submit",
|
|
228
228
|
className: "mt-4",
|
|
229
|
-
disabled: b(
|
|
230
|
-
onClick: () => l({ key:
|
|
229
|
+
disabled: b(n) && b(d),
|
|
230
|
+
onClick: () => l({ key: n, value: d }),
|
|
231
231
|
children: "Save"
|
|
232
232
|
}
|
|
233
233
|
) })
|
|
234
234
|
] });
|
|
235
|
-
},
|
|
236
|
-
const [
|
|
237
|
-
return /* @__PURE__ */ e.jsxs(
|
|
238
|
-
/* @__PURE__ */ e.jsx(
|
|
239
|
-
|
|
240
|
-
|
|
235
|
+
}, lt = ({ disabled: t, children: l, onAddBinding: r, appliedBindings: s, editMode: n = !0, item: a = {} }) => {
|
|
236
|
+
const [d, i] = w(!1);
|
|
237
|
+
return /* @__PURE__ */ e.jsxs(Qt, { children: [
|
|
238
|
+
/* @__PURE__ */ e.jsx(er, { disabled: t, asChild: !0, onClick: () => i(!0), children: l }),
|
|
239
|
+
d && /* @__PURE__ */ e.jsx(tr, { children: /* @__PURE__ */ e.jsx(
|
|
240
|
+
Lr,
|
|
241
241
|
{
|
|
242
|
-
item:
|
|
243
|
-
editMode:
|
|
244
|
-
appliedBindings:
|
|
245
|
-
onAddBinding: (
|
|
246
|
-
|
|
242
|
+
item: a,
|
|
243
|
+
editMode: n,
|
|
244
|
+
appliedBindings: s,
|
|
245
|
+
onAddBinding: (o) => {
|
|
246
|
+
r(o), i(!1);
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
249
|
) })
|
|
250
250
|
] });
|
|
251
|
-
},
|
|
251
|
+
}, Or = ({
|
|
252
252
|
item: t,
|
|
253
253
|
onAddBinding: l,
|
|
254
254
|
onRemove: r,
|
|
255
255
|
selectedBlock: s,
|
|
256
|
-
dataProvider:
|
|
256
|
+
dataProvider: n,
|
|
257
257
|
appliedBindings: a
|
|
258
258
|
}) => {
|
|
259
|
-
const [d, i] = w("string"),
|
|
259
|
+
const [d, i] = w("string"), o = (u, x) => {
|
|
260
260
|
if (b(u))
|
|
261
261
|
return "";
|
|
262
262
|
{
|
|
263
|
-
const c = p(x === "PROP" ? s :
|
|
263
|
+
const c = p(x === "PROP" ? s : n, u, "");
|
|
264
264
|
if (ae(c))
|
|
265
265
|
return "list";
|
|
266
266
|
const m = typeof c;
|
|
267
267
|
return m === "string" ? "text" : m === "object" ? "model" : m;
|
|
268
268
|
}
|
|
269
269
|
};
|
|
270
|
-
return _(() => i(() =>
|
|
270
|
+
return _(() => i(() => o(t.key, "PROP")), [t.key]), /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col border border-gray-200 relative rounded-md p-2", children: [
|
|
271
271
|
/* @__PURE__ */ e.jsx("div", { className: "text-gray-500 font-normal text-sm", children: t.key }),
|
|
272
272
|
/* @__PURE__ */ e.jsx("div", { className: "font-medium leading-5", children: t.value }),
|
|
273
|
-
/* @__PURE__ */ e.jsx(fe, { data: p(
|
|
273
|
+
/* @__PURE__ */ e.jsx(fe, { data: p(n, t.value, "") }),
|
|
274
274
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-end gap-x-2", children: [
|
|
275
|
-
/* @__PURE__ */ e.jsx(
|
|
275
|
+
/* @__PURE__ */ e.jsx(lt, { editMode: !0, onAddBinding: l, appliedBindings: a, item: t, children: /* @__PURE__ */ e.jsx(Tr, { className: "h-6 w-6 mt-1 cursor-pointer rounded border hover:bg-blue-400 hover:text-white border-blue-400 p-1 text-blue-400 hover:scale-105 duration-200" }) }),
|
|
276
276
|
/* @__PURE__ */ e.jsx(
|
|
277
|
-
|
|
277
|
+
Sr,
|
|
278
278
|
{
|
|
279
279
|
onClick: () => r(),
|
|
280
280
|
className: "h-6 w-6 mt-1 cursor-pointer rounded border hover:bg-red-400 hover:text-white border-red-400 p-1 text-red-400 hover:scale-105 duration-200"
|
|
@@ -283,8 +283,8 @@ const fe = ({ data: t, fullView: l }) => {
|
|
|
283
283
|
] }),
|
|
284
284
|
!b(d) && !b(t.key) && /* @__PURE__ */ e.jsx("div", { className: "mt-px absolute right-0 top-1 text-purple-600 text-[10px] flex items-center font-medium h-4 px-2 rounded-full", children: Y(d) })
|
|
285
285
|
] });
|
|
286
|
-
},
|
|
287
|
-
const r = G(), [s] =
|
|
286
|
+
}, Mr = ({ bindingData: t, onChange: l }) => {
|
|
287
|
+
const r = G(), [s] = rt(), n = Rr(), [a, d] = w(
|
|
288
288
|
C(t, (c, m) => ({ key: m, value: c }))
|
|
289
289
|
);
|
|
290
290
|
_(() => {
|
|
@@ -297,7 +297,7 @@ const fe = ({ data: t, fullView: l }) => {
|
|
|
297
297
|
return !1;
|
|
298
298
|
const c = ye(a);
|
|
299
299
|
return b(c == null ? void 0 : c.key) || b(c == null ? void 0 : c.value);
|
|
300
|
-
}, [s, a]),
|
|
300
|
+
}, [s, a]), o = (c) => {
|
|
301
301
|
const m = be(a, (h) => h.key !== c.key);
|
|
302
302
|
d([...m, c]), x([...m, c]);
|
|
303
303
|
}, u = (c) => {
|
|
@@ -316,16 +316,16 @@ const fe = ({ data: t, fullView: l }) => {
|
|
|
316
316
|
},
|
|
317
317
|
[l]
|
|
318
318
|
);
|
|
319
|
-
return b(
|
|
319
|
+
return b(n) ? /* @__PURE__ */ e.jsx("div", { className: "w-full flex items-center justify-center", children: /* @__PURE__ */ e.jsxs("p", { className: "text-gray-500 mb-1.5 text-xs", children: [
|
|
320
320
|
"You have no data providers registered. Please add a data provider to your project. ",
|
|
321
321
|
/* @__PURE__ */ e.jsx("br", {}),
|
|
322
322
|
/* @__PURE__ */ e.jsx("a", { className: "text-blue-500", href: "https://chaibuilder.com/docs/registering-data-providers", target: "_blank", children: "Learn more" })
|
|
323
323
|
] }) }) : /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
324
324
|
C(a, (c, m) => /* @__PURE__ */ e.jsx(
|
|
325
|
-
|
|
325
|
+
Or,
|
|
326
326
|
{
|
|
327
327
|
item: c,
|
|
328
|
-
onAddBinding:
|
|
328
|
+
onAddBinding: o,
|
|
329
329
|
onRemove: () => u(m),
|
|
330
330
|
selectedBlock: r,
|
|
331
331
|
dataProvider: s,
|
|
@@ -334,80 +334,89 @@ const fe = ({ data: t, fullView: l }) => {
|
|
|
334
334
|
c.key
|
|
335
335
|
)),
|
|
336
336
|
/* @__PURE__ */ e.jsxs(W, { delayDuration: 200, children: [
|
|
337
|
-
/* @__PURE__ */ e.jsx(X, { className: "w-full", children: /* @__PURE__ */ e.jsx(
|
|
338
|
-
|
|
337
|
+
/* @__PURE__ */ e.jsx(X, { className: "w-full", children: /* @__PURE__ */ e.jsx(
|
|
338
|
+
lt,
|
|
339
339
|
{
|
|
340
340
|
disabled: i,
|
|
341
|
-
|
|
342
|
-
|
|
341
|
+
appliedBindings: C(a, "key"),
|
|
342
|
+
onAddBinding: o,
|
|
343
|
+
children: /* @__PURE__ */ e.jsx(
|
|
344
|
+
"span",
|
|
345
|
+
{
|
|
346
|
+
className: `w-full px-5 py-1.5 text-xs rounded-md font-medium duration-200 ${i ? "cursor-not-allowed bg-gray-200 text-gray-400" : "bg-blue-700/20 text-blue-800 hover:bg-blue-700/30"}`,
|
|
347
|
+
children: b(s) ? /* @__PURE__ */ e.jsx("small", { className: "text-gray-500 text-[9.5px]", children: "No data provider has been set up for this page" }) : "+ Add Data Binding"
|
|
348
|
+
}
|
|
349
|
+
)
|
|
343
350
|
}
|
|
344
|
-
) })
|
|
351
|
+
) }),
|
|
345
352
|
i && /* @__PURE__ */ e.jsx(Z, { sideOffset: -55, className: "text-[11px]", children: b(s) ? "No data provider has been set up for this page." : "Complete last added data binding to add more" })
|
|
346
353
|
] })
|
|
347
354
|
] });
|
|
348
|
-
},
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
355
|
+
}, Er = () => /* @__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" }), Pe = dt(
|
|
356
|
+
({
|
|
357
|
+
createHistorySnapshot: t,
|
|
358
|
+
properties: l,
|
|
359
|
+
formData: r,
|
|
360
|
+
onChange: s
|
|
361
|
+
}) => {
|
|
362
|
+
const [n] = rr(), a = { type: "object", properties: {} }, d = {};
|
|
363
|
+
return Object.keys(l).forEach((i) => {
|
|
364
|
+
const o = l[i];
|
|
365
|
+
if (M(["slot", "styles"], o.type))
|
|
366
|
+
return;
|
|
367
|
+
const u = p(o, "i18n", !1) ? `${i}-${n}` : i;
|
|
368
|
+
a.properties[u] = lr(o, n), d[u] = sr(o, n);
|
|
369
|
+
}), /* @__PURE__ */ e.jsx(
|
|
370
|
+
wr,
|
|
371
|
+
{
|
|
372
|
+
widgets: {
|
|
373
|
+
binding: Er,
|
|
374
|
+
richtext: or,
|
|
375
|
+
icon: nr,
|
|
376
|
+
image: ar
|
|
377
|
+
},
|
|
378
|
+
fields: {
|
|
379
|
+
link: ir
|
|
380
|
+
},
|
|
381
|
+
idSeparator: ".",
|
|
382
|
+
autoComplete: "off",
|
|
383
|
+
omitExtraData: !1,
|
|
384
|
+
liveOmit: !1,
|
|
385
|
+
liveValidate: !0,
|
|
386
|
+
validator: Cr,
|
|
387
|
+
uiSchema: d,
|
|
388
|
+
onBlur: t,
|
|
389
|
+
schema: a,
|
|
390
|
+
formData: r,
|
|
391
|
+
onChange: s
|
|
392
|
+
}
|
|
393
|
+
);
|
|
394
|
+
}
|
|
395
|
+
);
|
|
396
|
+
function _r() {
|
|
397
|
+
const t = G(), { createSnapshot: l } = ze(), r = Ue(), s = et(t._type), n = { ...t }, a = () => l(), d = ({ formData: x }, c) => {
|
|
389
398
|
if (c) {
|
|
390
399
|
const m = c.replace("root.", "");
|
|
391
400
|
r([t._id], { [m]: p(x, m) });
|
|
392
401
|
}
|
|
393
402
|
}, i = {
|
|
394
|
-
_name:
|
|
403
|
+
_name: kr({
|
|
395
404
|
title: "Name",
|
|
396
405
|
default: p(t, "_name", t._type)
|
|
397
406
|
})
|
|
398
|
-
},
|
|
399
|
-
const x =
|
|
400
|
-
return
|
|
407
|
+
}, o = gt(p(n, "_bindings", {})), u = N(() => {
|
|
408
|
+
const x = ht(p(s, "props", {}));
|
|
409
|
+
return mt(o, (c) => {
|
|
401
410
|
delete x[c];
|
|
402
411
|
}), x;
|
|
403
|
-
}, [s,
|
|
412
|
+
}, [s, o]);
|
|
404
413
|
return /* @__PURE__ */ e.jsxs("div", { className: "overflow-x-hidden", children: [
|
|
405
414
|
/* @__PURE__ */ e.jsx(
|
|
406
415
|
Pe,
|
|
407
416
|
{
|
|
408
417
|
onChange: d,
|
|
409
418
|
createHistorySnapshot: a,
|
|
410
|
-
formData:
|
|
419
|
+
formData: n,
|
|
411
420
|
properties: i
|
|
412
421
|
}
|
|
413
422
|
),
|
|
@@ -424,11 +433,11 @@ function Er() {
|
|
|
424
433
|
"Data Binding"
|
|
425
434
|
] }) }),
|
|
426
435
|
/* @__PURE__ */ e.jsx(ce, { className: "pt-4 px-4", children: /* @__PURE__ */ e.jsx(
|
|
427
|
-
|
|
436
|
+
Mr,
|
|
428
437
|
{
|
|
429
|
-
bindingData: p(
|
|
438
|
+
bindingData: p(n, "_bindings", {}),
|
|
430
439
|
onChange: (x) => {
|
|
431
|
-
d({ formData: { ...
|
|
440
|
+
d({ formData: { ...n, _bindings: x } }, "root._bindings");
|
|
432
441
|
}
|
|
433
442
|
}
|
|
434
443
|
) })
|
|
@@ -439,11 +448,11 @@ function Er() {
|
|
|
439
448
|
"Static Content"
|
|
440
449
|
] }) }),
|
|
441
450
|
/* @__PURE__ */ e.jsxs(ce, { className: "pt-4", children: [
|
|
442
|
-
b(
|
|
451
|
+
b(o) ? "" : /* @__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: [
|
|
443
452
|
"Data binding is set for ",
|
|
444
|
-
/* @__PURE__ */ e.jsx("b", { children: C(
|
|
453
|
+
/* @__PURE__ */ e.jsx("b", { children: C(o, yt).join(", ") }),
|
|
445
454
|
" ",
|
|
446
|
-
|
|
455
|
+
o.length === 1 ? "property" : "properties",
|
|
447
456
|
". Remove data binding to edit static content."
|
|
448
457
|
] }),
|
|
449
458
|
/* @__PURE__ */ e.jsx(
|
|
@@ -451,7 +460,7 @@ function Er() {
|
|
|
451
460
|
{
|
|
452
461
|
onChange: d,
|
|
453
462
|
createHistorySnapshot: a,
|
|
454
|
-
formData:
|
|
463
|
+
formData: n,
|
|
455
464
|
properties: u
|
|
456
465
|
}
|
|
457
466
|
)
|
|
@@ -461,17 +470,17 @@ function Er() {
|
|
|
461
470
|
/* @__PURE__ */ e.jsx("div", { className: "pb-60" })
|
|
462
471
|
] });
|
|
463
472
|
}
|
|
464
|
-
const $e = new
|
|
473
|
+
const $e = new Br(Ar, {
|
|
465
474
|
isCaseSensitive: !1,
|
|
466
475
|
threshold: 0.2,
|
|
467
476
|
minMatchCharLength: 2,
|
|
468
477
|
keys: ["name"]
|
|
469
478
|
});
|
|
470
|
-
function
|
|
479
|
+
function Fr() {
|
|
471
480
|
var D;
|
|
472
|
-
const [t] = Ne(), l = G(), r = Ke(), s = qe(), [
|
|
481
|
+
const [t] = Ne(), l = G(), r = Ke(), s = qe(), [n] = Je(), [a, d] = w(""), i = (D = we(t)) == null ? void 0 : D.prop, o = bt((p(l, i, "").replace(Pr, "").split(",").pop() || "").split(" "), b), u = () => {
|
|
473
482
|
const j = a.trim().toLowerCase().replace(/ +(?= )/g, "").split(" ");
|
|
474
|
-
r(
|
|
483
|
+
r(n, j, !0), d("");
|
|
475
484
|
}, [x, c] = w([]), m = ({ value: j }) => {
|
|
476
485
|
const L = j.trim().toLowerCase(), $ = L.match(/.+:/g);
|
|
477
486
|
let k = [];
|
|
@@ -507,7 +516,7 @@ function _r() {
|
|
|
507
516
|
/* @__PURE__ */ e.jsx(Te, { className: "mt-2", children: "Add Tailwind classes" }),
|
|
508
517
|
/* @__PURE__ */ e.jsxs("div", { className: "relative -mt-4 flex items-center gap-x-3", children: [
|
|
509
518
|
/* @__PURE__ */ e.jsx("div", { className: "relative flex w-full items-center gap-x-3", children: /* @__PURE__ */ e.jsx(
|
|
510
|
-
|
|
519
|
+
Hr,
|
|
511
520
|
{
|
|
512
521
|
suggestions: x,
|
|
513
522
|
onSuggestionsFetchRequested: m,
|
|
@@ -538,9 +547,9 @@ function _r() {
|
|
|
538
547
|
)
|
|
539
548
|
] }),
|
|
540
549
|
/* @__PURE__ */ e.jsxs("div", { className: "flex w-full flex-wrap gap-2", children: [
|
|
541
|
-
b(
|
|
550
|
+
b(o) && /* @__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" }),
|
|
542
551
|
ne.Children.toArray(
|
|
543
|
-
|
|
552
|
+
o.map((j) => /* @__PURE__ */ e.jsxs(
|
|
544
553
|
"div",
|
|
545
554
|
{
|
|
546
555
|
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",
|
|
@@ -549,7 +558,7 @@ function _r() {
|
|
|
549
558
|
/* @__PURE__ */ e.jsx(
|
|
550
559
|
Ye,
|
|
551
560
|
{
|
|
552
|
-
onClick: () => s(
|
|
561
|
+
onClick: () => s(n, [j]),
|
|
553
562
|
className: "invisible absolute right-1 hover:text-white group-hover:visible group-hover:cursor-pointer"
|
|
554
563
|
}
|
|
555
564
|
)
|
|
@@ -563,7 +572,7 @@ function _r() {
|
|
|
563
572
|
}
|
|
564
573
|
);
|
|
565
574
|
}
|
|
566
|
-
const B = ["px", "%", "em", "rem", "ch", "vh", "vw"],
|
|
575
|
+
const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Yr = {
|
|
567
576
|
heading: "Flex Child",
|
|
568
577
|
items: [
|
|
569
578
|
{ type: "arbitrary", label: "Basis", units: B, property: "flexBasis" },
|
|
@@ -572,7 +581,7 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Fr = {
|
|
|
572
581
|
{ type: "dropdown", label: "Grow", property: "flexGrow" },
|
|
573
582
|
{ type: "dropdown", label: "Shrink", property: "flexShrink" }
|
|
574
583
|
]
|
|
575
|
-
},
|
|
584
|
+
}, Wr = {
|
|
576
585
|
heading: "Grid Child",
|
|
577
586
|
items: [
|
|
578
587
|
{ type: "range", label: "Col Span", property: "gridColSpan" },
|
|
@@ -583,7 +592,7 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Fr = {
|
|
|
583
592
|
{ type: "range", label: "Row End", property: "gridRowEnd" },
|
|
584
593
|
{ type: "range", label: "Order", property: "order" }
|
|
585
594
|
]
|
|
586
|
-
},
|
|
595
|
+
}, Xr = [
|
|
587
596
|
{
|
|
588
597
|
heading: "Display",
|
|
589
598
|
items: [
|
|
@@ -985,12 +994,12 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Fr = {
|
|
|
985
994
|
},
|
|
986
995
|
{
|
|
987
996
|
heading: "Classes",
|
|
988
|
-
items: [{ component:
|
|
997
|
+
items: [{ component: Fr }]
|
|
989
998
|
}
|
|
990
|
-
],
|
|
999
|
+
], st = {
|
|
991
1000
|
"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" }) }),
|
|
992
1001
|
// visibility
|
|
993
|
-
visible:
|
|
1002
|
+
visible: Ct,
|
|
994
1003
|
invisible: Ve,
|
|
995
1004
|
// display
|
|
996
1005
|
hidden: Ve,
|
|
@@ -1026,10 +1035,10 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Fr = {
|
|
|
1026
1035
|
borderRadiusRight: J,
|
|
1027
1036
|
borderRadiusBottom: Q,
|
|
1028
1037
|
borderRadiusLeft: ee,
|
|
1029
|
-
borderRadiusTopLeft:
|
|
1030
|
-
borderRadiusTopRight:
|
|
1031
|
-
borderRadiusBottomRight:
|
|
1032
|
-
borderRadiusBottomLeft:
|
|
1038
|
+
borderRadiusTopLeft: kt,
|
|
1039
|
+
borderRadiusTopRight: Nt,
|
|
1040
|
+
borderRadiusBottomRight: Tt,
|
|
1041
|
+
borderRadiusBottomLeft: St,
|
|
1033
1042
|
divideXWidth: R,
|
|
1034
1043
|
divideYWidth: V,
|
|
1035
1044
|
scale: O,
|
|
@@ -1056,18 +1065,18 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Fr = {
|
|
|
1056
1065
|
marginBottom: Q,
|
|
1057
1066
|
marginLeft: ee,
|
|
1058
1067
|
// text-align
|
|
1059
|
-
textLeft:
|
|
1060
|
-
textCenter:
|
|
1061
|
-
textRight:
|
|
1062
|
-
textJustify:
|
|
1068
|
+
textLeft: Rt,
|
|
1069
|
+
textCenter: Vt,
|
|
1070
|
+
textRight: Ht,
|
|
1071
|
+
textJustify: Bt,
|
|
1063
1072
|
// font style
|
|
1064
|
-
italic:
|
|
1073
|
+
italic: At,
|
|
1065
1074
|
// "not-italic": "",
|
|
1066
1075
|
// decoration
|
|
1067
|
-
underline:
|
|
1068
|
-
overline:
|
|
1076
|
+
underline: Dt,
|
|
1077
|
+
overline: Pt,
|
|
1069
1078
|
// transform
|
|
1070
|
-
uppercase:
|
|
1079
|
+
uppercase: $t,
|
|
1071
1080
|
block: () => /* @__PURE__ */ e.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1072
1081
|
/* @__PURE__ */ e.jsx(
|
|
1073
1082
|
"path",
|
|
@@ -1180,14 +1189,14 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Fr = {
|
|
|
1180
1189
|
}
|
|
1181
1190
|
)
|
|
1182
1191
|
] }),
|
|
1183
|
-
static:
|
|
1184
|
-
}, le = Oe({ canReset: !1, canChange: !0 }),
|
|
1192
|
+
static: It
|
|
1193
|
+
}, le = Oe({ canReset: !1, canChange: !0 }), Zr = ({ children: t, canReset: l = !1, canChange: r = !0 }) => (
|
|
1185
1194
|
// eslint-disable-next-line react/jsx-no-constructed-context-values
|
|
1186
1195
|
/* @__PURE__ */ e.jsx(le.Provider, { value: { canReset: l, canChange: r }, children: t })
|
|
1187
|
-
),
|
|
1188
|
-
const s = N(() => p(xe, `${l}.classes`, [""]), [l]),
|
|
1196
|
+
), ot = ({ label: t, property: l, onChange: r }) => {
|
|
1197
|
+
const s = N(() => p(xe, `${l}.classes`, [""]), [l]), n = se(l), a = N(() => p(n, "cls", ""), [n]), { canChange: d } = re(le), i = /\[.*\]/g.test(a);
|
|
1189
1198
|
return /* @__PURE__ */ e.jsx("div", { className: t ? "w-full rounded " : "grow", children: i ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
|
|
1190
|
-
/* @__PURE__ */ e.jsx(
|
|
1199
|
+
/* @__PURE__ */ e.jsx(dr, { className: "w-[70%] rounded py-1", readOnly: !0, value: a }),
|
|
1191
1200
|
/* @__PURE__ */ e.jsxs(W, { delayDuration: 100, children: [
|
|
1192
1201
|
/* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsx("button", { type: "button", className: "invisible ml-3 mt-1 text-blue-600 group-hover:visible", children: /* @__PURE__ */ e.jsx(ke, {}) }) }),
|
|
1193
1202
|
/* @__PURE__ */ e.jsx(Z, { children: "Current value is using a Tailwind arbitrary value." })
|
|
@@ -1196,37 +1205,37 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Fr = {
|
|
|
1196
1205
|
ve,
|
|
1197
1206
|
{
|
|
1198
1207
|
rounded: t,
|
|
1199
|
-
onChange: (
|
|
1208
|
+
onChange: (o) => r(o, l),
|
|
1200
1209
|
selected: a,
|
|
1201
1210
|
options: s,
|
|
1202
1211
|
disabled: !d
|
|
1203
1212
|
}
|
|
1204
1213
|
) });
|
|
1205
1214
|
};
|
|
1206
|
-
function ve({ selected: t, onChange: l, rounded: r = !1, options: s, disabled:
|
|
1215
|
+
function ve({ selected: t, onChange: l, rounded: r = !1, options: s, disabled: n = !1 }) {
|
|
1207
1216
|
const a = t.replace(/.*:/g, "").trim(), { undo: d, redo: i } = ze();
|
|
1208
1217
|
return /* @__PURE__ */ e.jsxs(
|
|
1209
1218
|
"select",
|
|
1210
1219
|
{
|
|
1211
|
-
disabled: !s.length ||
|
|
1220
|
+
disabled: !s.length || n,
|
|
1212
1221
|
className: `${r ? "rounded-md border border-border" : "border-0"} w-full disable:bg-gray-500 h-full truncate rounded bg-background px-2 py-1 text-xs outline-none disabled:cursor-not-allowed`,
|
|
1213
|
-
onChange: (
|
|
1214
|
-
onKeyDown: (
|
|
1215
|
-
|
|
1222
|
+
onChange: (o) => l(o.target.value),
|
|
1223
|
+
onKeyDown: (o) => {
|
|
1224
|
+
o.ctrlKey && (o.key === "z" && d(), o.key === "y" && i());
|
|
1216
1225
|
},
|
|
1217
1226
|
value: a,
|
|
1218
1227
|
children: [
|
|
1219
1228
|
/* @__PURE__ */ e.jsx("option", { className: "bg-transparent", value: "" }),
|
|
1220
1229
|
P.Children.toArray(
|
|
1221
|
-
s.map((
|
|
1230
|
+
s.map((o) => /* @__PURE__ */ e.jsx("option", { className: "bg-transparent", value: o, children: o }))
|
|
1222
1231
|
)
|
|
1223
1232
|
]
|
|
1224
1233
|
}
|
|
1225
1234
|
);
|
|
1226
1235
|
}
|
|
1227
|
-
const
|
|
1228
|
-
const { canReset: r, canChange: s } = re(le),
|
|
1229
|
-
return /* @__PURE__ */ e.jsx("div", { className: "flex flex-row divide-x divide-solid divide-border rounded border border-border text-xs", children:
|
|
1236
|
+
const zr = ({ property: t, onChange: l }) => {
|
|
1237
|
+
const { canReset: r, canChange: s } = re(le), n = se(t), a = N(() => p(n, "cls", ""), [n]), d = N(() => p(xe, `${t}.classes`, [""]), [t]), i = d.indexOf(a) > -1 ? d.indexOf(a) : 0, o = /\[.*\]/g.test(a);
|
|
1238
|
+
return /* @__PURE__ */ e.jsx("div", { className: "flex flex-row divide-x divide-solid divide-border rounded border border-border text-xs", children: o ? /* @__PURE__ */ e.jsx("div", { className: "py-[5px] px-2", children: a }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1230
1239
|
/* @__PURE__ */ e.jsx(
|
|
1231
1240
|
"button",
|
|
1232
1241
|
{
|
|
@@ -1234,10 +1243,10 @@ const Zr = ({ property: t, onChange: l }) => {
|
|
|
1234
1243
|
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",
|
|
1235
1244
|
disabled: !s && (!r || i - 1 < 0),
|
|
1236
1245
|
onClick: () => l(Re(d, i - 1), t),
|
|
1237
|
-
children: /* @__PURE__ */ e.jsx("span", { className: "flex items-center justify-center", children: /* @__PURE__ */ e.jsx(
|
|
1246
|
+
children: /* @__PURE__ */ e.jsx("span", { className: "flex items-center justify-center", children: /* @__PURE__ */ e.jsx(Lt, { className: !s && (!r || i - 1 < 0) ? "text-gray-500" : "text-white/60" }) })
|
|
1238
1247
|
}
|
|
1239
1248
|
),
|
|
1240
|
-
/* @__PURE__ */ e.jsx("div", { className: "w-8/12 text-center", children: /* @__PURE__ */ e.jsx(
|
|
1249
|
+
/* @__PURE__ */ e.jsx("div", { className: "w-8/12 text-center", children: /* @__PURE__ */ e.jsx(ot, { label: !1, property: t, onChange: l }) }),
|
|
1241
1250
|
/* @__PURE__ */ e.jsx(
|
|
1242
1251
|
"button",
|
|
1243
1252
|
{
|
|
@@ -1254,8 +1263,8 @@ const Zr = ({ property: t, onChange: l }) => {
|
|
|
1254
1263
|
}
|
|
1255
1264
|
)
|
|
1256
1265
|
] }) });
|
|
1257
|
-
},
|
|
1258
|
-
const r = N(() => p(xe, `${t}.classes`, [""]), [t]), { canChange: s } = re(le),
|
|
1266
|
+
}, Ur = ({ property: t, onChange: l }) => {
|
|
1267
|
+
const r = N(() => p(xe, `${t}.classes`, [""]), [t]), { canChange: s } = re(le), n = se(t), a = N(() => p(n, "cls", ""), [n]);
|
|
1259
1268
|
return /* @__PURE__ */ e.jsx("div", { className: "flex grow flex-wrap gap-1", children: C(r, (d) => /* @__PURE__ */ e.jsxs(W, { children: [
|
|
1260
1269
|
/* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
1261
1270
|
"button",
|
|
@@ -1264,12 +1273,12 @@ const Zr = ({ property: t, onChange: l }) => {
|
|
|
1264
1273
|
disabled: !s,
|
|
1265
1274
|
onClick: () => l(d, t),
|
|
1266
1275
|
className: `cursor-pointer rounded border border-gray-600 p-1 disabled:cursor-not-allowed ${a === d ? " bg-blue-500 text-white" : "disabled:bg-gray-600 disabled:text-gray-400"}`,
|
|
1267
|
-
children: P.createElement(p(
|
|
1276
|
+
children: P.createElement(p(st, d, We))
|
|
1268
1277
|
}
|
|
1269
1278
|
) }),
|
|
1270
1279
|
/* @__PURE__ */ e.jsx(Z, { children: Y(te(d)) })
|
|
1271
1280
|
] })) });
|
|
1272
|
-
},
|
|
1281
|
+
}, Gr = {
|
|
1273
1282
|
backgroundColor: "bg",
|
|
1274
1283
|
textColor: "text",
|
|
1275
1284
|
borderColor: "border",
|
|
@@ -1281,13 +1290,13 @@ const Zr = ({ property: t, onChange: l }) => {
|
|
|
1281
1290
|
toColor: "to",
|
|
1282
1291
|
ringColor: "ring",
|
|
1283
1292
|
ringOffsetColor: "ring-offset"
|
|
1284
|
-
},
|
|
1285
|
-
const r = se(t), s = N(() => p(r, "cls", ""), [r]), { canChange:
|
|
1293
|
+
}, Kr = ({ property: t, onChange: l }) => {
|
|
1294
|
+
const r = se(t), s = N(() => p(r, "cls", ""), [r]), { canChange: n } = re(le), [a, d] = w([]), [i, o] = w({ color: "", shade: "" }), u = s.split("-"), x = p(u, "1", ""), c = p(u, "2", ""), m = A(
|
|
1286
1295
|
// eslint-disable-next-line no-shadow
|
|
1287
1296
|
(g) => {
|
|
1288
|
-
["current", "inherit", "transparent", "black", "white"].includes(g) ? (d([]),
|
|
1297
|
+
["current", "inherit", "transparent", "black", "white"].includes(g) ? (d([]), o({ color: g })) : (d(["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"]), o((f) => ({ ...f, color: g, shade: f.shade ? f.shade : "500" })));
|
|
1289
1298
|
},
|
|
1290
|
-
[d,
|
|
1299
|
+
[d, o]
|
|
1291
1300
|
);
|
|
1292
1301
|
_(() => {
|
|
1293
1302
|
if (["current", "inherit", "transparent", "black", "white"].includes(x))
|
|
@@ -1297,20 +1306,20 @@ const Zr = ({ property: t, onChange: l }) => {
|
|
|
1297
1306
|
const h = A(
|
|
1298
1307
|
// eslint-disable-next-line no-shadow
|
|
1299
1308
|
(g) => {
|
|
1300
|
-
|
|
1309
|
+
o({ color: x, shade: g });
|
|
1301
1310
|
},
|
|
1302
1311
|
[x]
|
|
1303
1312
|
);
|
|
1304
1313
|
return _(() => {
|
|
1305
|
-
|
|
1314
|
+
o({ color: "", shade: "" });
|
|
1306
1315
|
}, [r]), _(() => {
|
|
1307
|
-
const f = `${p(
|
|
1316
|
+
const f = `${p(Gr, t, "")}-${i.color}${i.shade ? `-${i.shade}` : ""}`;
|
|
1308
1317
|
f.match(new RegExp(p(xe, `${t}.regExp`, ""))) && l(f, t);
|
|
1309
1318
|
}, [i, l, t]), /* @__PURE__ */ e.jsxs("div", { className: "flex flex-row divide-x divide-solid divide-border rounded-lg border border-border text-xs", children: [
|
|
1310
1319
|
/* @__PURE__ */ e.jsx("div", { className: "grow text-center", children: /* @__PURE__ */ e.jsx(
|
|
1311
1320
|
ve,
|
|
1312
1321
|
{
|
|
1313
|
-
disabled: !
|
|
1322
|
+
disabled: !n,
|
|
1314
1323
|
rounded: !0,
|
|
1315
1324
|
selected: x,
|
|
1316
1325
|
onChange: m,
|
|
@@ -1346,7 +1355,7 @@ const Zr = ({ property: t, onChange: l }) => {
|
|
|
1346
1355
|
]
|
|
1347
1356
|
}
|
|
1348
1357
|
) }),
|
|
1349
|
-
/* @__PURE__ */ e.jsx("button", { type: "button", className: "grow text-center", children: /* @__PURE__ */ e.jsx(ve, { rounded: !0, selected: c, disabled: !x || !
|
|
1358
|
+
/* @__PURE__ */ e.jsx("button", { type: "button", className: "grow text-center", children: /* @__PURE__ */ e.jsx(ve, { rounded: !0, selected: c, disabled: !x || !n, onChange: h, options: a }) })
|
|
1350
1359
|
] });
|
|
1351
1360
|
}, Ie = (t, l) => {
|
|
1352
1361
|
t = t.toLowerCase();
|
|
@@ -1355,10 +1364,10 @@ const Zr = ({ property: t, onChange: l }) => {
|
|
|
1355
1364
|
return { value: "", unit: r };
|
|
1356
1365
|
const s = l.length ? new RegExp(l.join("|"), "g") : /XXXXXX/g;
|
|
1357
1366
|
r = r.replace(s, "");
|
|
1358
|
-
const
|
|
1359
|
-
return a || d ? { error: "Invalid value" } :
|
|
1367
|
+
const n = t.match(s), a = n && n.length > 1, d = !b(r) && Number.isNaN(Number(r));
|
|
1368
|
+
return a || d ? { error: "Invalid value" } : n && (n[0] === "auto" || n[0] === "none") ? { value: n[0], unit: "" } : { value: r, unit: n ? n[0] : "" };
|
|
1360
1369
|
};
|
|
1361
|
-
const
|
|
1370
|
+
const qr = (t) => {
|
|
1362
1371
|
const l = t.startsWith("-") ? "-" : "", r = t.split("-").pop();
|
|
1363
1372
|
if (["auto", "none"].includes(r))
|
|
1364
1373
|
return { value: "", unit: r };
|
|
@@ -1482,76 +1491,76 @@ const Kr = (t) => {
|
|
|
1482
1491
|
if (["max", "min", "fit"].includes(r))
|
|
1483
1492
|
return { value: t, unit: "class" };
|
|
1484
1493
|
if (r.includes("/")) {
|
|
1485
|
-
const [s,
|
|
1486
|
-
return { value: l + (s /
|
|
1494
|
+
const [s, n] = C(r.split("/"), (a) => parseInt(a, 10));
|
|
1495
|
+
return { value: l + (s / n * 100).toFixed(2).replace(".00", ""), unit: "%" };
|
|
1487
1496
|
}
|
|
1488
|
-
return
|
|
1497
|
+
return ft(parseFloat(r)) ? { value: `${l + parseFloat(r) * 4}`, unit: "px" } : { value: r, unit: "class" };
|
|
1489
1498
|
};
|
|
1490
|
-
const
|
|
1499
|
+
const Jr = (t) => {
|
|
1491
1500
|
if (b(t))
|
|
1492
1501
|
return { value: "", unit: "" };
|
|
1493
1502
|
const l = t.match(/\[.*\]/g);
|
|
1494
1503
|
if (l === null)
|
|
1495
|
-
return
|
|
1496
|
-
const r = p(l, "0", "").replace(/\[|\]/g, ""), s = t.startsWith("-") ? "-" : "",
|
|
1497
|
-
return { value: `${s}${
|
|
1498
|
-
},
|
|
1504
|
+
return Qr(t);
|
|
1505
|
+
const r = p(l, "0", "").replace(/\[|\]/g, ""), s = t.startsWith("-") ? "-" : "", n = we(r.match(/\d+.\d+|\d+/g));
|
|
1506
|
+
return { value: `${s}${n}`, unit: r.replace(n, "") };
|
|
1507
|
+
}, Qr = (t) => b(t) ? { value: "", unit: "" } : qr(t), nt = P.createContext({
|
|
1499
1508
|
setDragData: () => {
|
|
1500
1509
|
}
|
|
1501
|
-
}),
|
|
1510
|
+
}), el = ({
|
|
1502
1511
|
unit: t,
|
|
1503
1512
|
currentValue: l,
|
|
1504
1513
|
onDrag: r,
|
|
1505
1514
|
onDragEnd: s,
|
|
1506
|
-
onDragStart:
|
|
1515
|
+
onDragStart: n,
|
|
1507
1516
|
negative: a,
|
|
1508
1517
|
cssProperty: d
|
|
1509
1518
|
}) => {
|
|
1510
|
-
const { setDragData: i } = re(
|
|
1519
|
+
const { setDragData: i } = re(nt);
|
|
1511
1520
|
return /* @__PURE__ */ e.jsx(
|
|
1512
1521
|
"button",
|
|
1513
1522
|
{
|
|
1514
1523
|
type: "button",
|
|
1515
|
-
onMouseDown: (
|
|
1524
|
+
onMouseDown: (o) => {
|
|
1516
1525
|
const u = {
|
|
1517
1526
|
onDrag: r,
|
|
1518
1527
|
onDragEnd: s,
|
|
1519
1528
|
dragging: !0,
|
|
1520
|
-
dragStartY:
|
|
1529
|
+
dragStartY: o.pageY,
|
|
1521
1530
|
dragStartValue: `${l}`,
|
|
1522
1531
|
dragUnit: t,
|
|
1523
1532
|
negative: a,
|
|
1524
1533
|
cssProperty: d
|
|
1525
1534
|
};
|
|
1526
|
-
|
|
1535
|
+
n(u), i(u);
|
|
1527
1536
|
},
|
|
1528
1537
|
color: void 0,
|
|
1529
1538
|
className: "relative z-50 ml-1 hidden h-6 cursor-row-resize rounded bg-background/70 px-2 group-hover:inline",
|
|
1530
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1539
|
+
children: /* @__PURE__ */ e.jsx(Ot, {})
|
|
1531
1540
|
}
|
|
1532
1541
|
);
|
|
1533
|
-
},
|
|
1542
|
+
}, tl = ({ onSelect: t, current: l, units: r }) => /* @__PURE__ */ e.jsx("div", { "data-theme": "light", className: "-m-[7px] -mx-[13px] flex w-9 flex-col", children: r.map((s) => /* @__PURE__ */ e.jsx(
|
|
1534
1543
|
pe,
|
|
1535
1544
|
{
|
|
1536
1545
|
className: "h-max rounded-none px-1 py-1 text-right text-[11px] hover:bg-blue-400",
|
|
1537
1546
|
color: l === s ? "primary" : void 0,
|
|
1538
1547
|
size: "sm",
|
|
1539
|
-
onClick: (
|
|
1540
|
-
|
|
1548
|
+
onClick: (n) => {
|
|
1549
|
+
n.stopPropagation(), t(s);
|
|
1541
1550
|
},
|
|
1542
1551
|
children: s
|
|
1543
1552
|
},
|
|
1544
1553
|
s
|
|
1545
|
-
)) }),
|
|
1546
|
-
const [l, r] = w(!1), [s,
|
|
1554
|
+
)) }), rl = (t) => {
|
|
1555
|
+
const [l, r] = w(!1), [s, n] = w(""), { currentClass: a, onChange: d, classPrefix: i, cssProperty: o, units: u, negative: x } = t, [c, m] = w(o != null && o.toLowerCase().includes("width") ? "%" : u[0]), [h, g] = w(!1), [f, T] = w(""), [D, j] = w(!1), [L, $] = w(!1);
|
|
1547
1556
|
_(() => {
|
|
1548
|
-
const { value: y, unit: v } =
|
|
1557
|
+
const { value: y, unit: v } = Jr(a);
|
|
1549
1558
|
if (v === "") {
|
|
1550
|
-
|
|
1559
|
+
n(y), m(o != null && o.toLowerCase().includes("width") ? "%" : u[0]);
|
|
1551
1560
|
return;
|
|
1552
1561
|
}
|
|
1553
|
-
m(v),
|
|
1554
|
-
}, [a,
|
|
1562
|
+
m(v), n(v === "class" || b(y) ? "" : y);
|
|
1563
|
+
}, [a, o, u]);
|
|
1555
1564
|
const k = me(
|
|
1556
1565
|
(y) => {
|
|
1557
1566
|
d(y);
|
|
@@ -1619,18 +1628,18 @@ const qr = (t) => {
|
|
|
1619
1628
|
if (y.keyCode !== 38 && y.keyCode !== 40)
|
|
1620
1629
|
return;
|
|
1621
1630
|
y.preventDefault(), $(!0);
|
|
1622
|
-
const v =
|
|
1631
|
+
const v = vt(y.target.value);
|
|
1623
1632
|
let S = Ee(v) ? 0 : v;
|
|
1624
1633
|
y.keyCode === 38 && (S += 1), y.keyCode === 40 && (S -= 1);
|
|
1625
|
-
const E = `${S}`,
|
|
1626
|
-
I(
|
|
1634
|
+
const E = `${S}`, it = `${E.startsWith("-") ? "-" : ""}${i}[${E.replace("-", "")}${c === "-" ? "" : c}]`;
|
|
1635
|
+
I(it);
|
|
1627
1636
|
},
|
|
1628
1637
|
onKeyUp: (y) => {
|
|
1629
1638
|
L && (y.preventDefault(), $(!1));
|
|
1630
1639
|
},
|
|
1631
1640
|
onBlur: () => F(),
|
|
1632
1641
|
onChange: (y) => {
|
|
1633
|
-
g(!1),
|
|
1642
|
+
g(!1), n(y.target.value);
|
|
1634
1643
|
},
|
|
1635
1644
|
onClick: (y) => {
|
|
1636
1645
|
var v;
|
|
@@ -1652,12 +1661,12 @@ const qr = (t) => {
|
|
|
1652
1661
|
className: "flex h-6 cursor-pointer items-center gap-x-1 rounded rounded-l-none bg-background p-px px-1 text-[11px] uppercase",
|
|
1653
1662
|
children: [
|
|
1654
1663
|
/* @__PURE__ */ e.jsx("span", { className: `inline-block ${u.length === 1 ? "px-2 font-semibold" : ""}`, children: c }),
|
|
1655
|
-
u.length > 1 ? /* @__PURE__ */ e.jsx(
|
|
1664
|
+
u.length > 1 ? /* @__PURE__ */ e.jsx(Mt, {}) : null
|
|
1656
1665
|
]
|
|
1657
1666
|
}
|
|
1658
1667
|
) }),
|
|
1659
|
-
/* @__PURE__ */ e.jsx(
|
|
1660
|
-
|
|
1668
|
+
/* @__PURE__ */ e.jsx(cr, { children: /* @__PURE__ */ e.jsx(Z, { className: "bg-background", children: /* @__PURE__ */ e.jsx(
|
|
1669
|
+
tl,
|
|
1661
1670
|
{
|
|
1662
1671
|
units: u,
|
|
1663
1672
|
current: c,
|
|
@@ -1669,7 +1678,7 @@ const qr = (t) => {
|
|
|
1669
1678
|
] })
|
|
1670
1679
|
] }),
|
|
1671
1680
|
["none", "auto"].indexOf(c) !== -1 || D ? null : /* @__PURE__ */ e.jsx(
|
|
1672
|
-
|
|
1681
|
+
el,
|
|
1673
1682
|
{
|
|
1674
1683
|
onDragStart: () => j(!0),
|
|
1675
1684
|
onDragEnd: (y) => {
|
|
@@ -1688,14 +1697,14 @@ const qr = (t) => {
|
|
|
1688
1697
|
currentValue: s,
|
|
1689
1698
|
unit: c,
|
|
1690
1699
|
negative: x,
|
|
1691
|
-
cssProperty:
|
|
1700
|
+
cssProperty: o
|
|
1692
1701
|
}
|
|
1693
1702
|
)
|
|
1694
1703
|
] }) }) });
|
|
1695
1704
|
}, se = (t) => {
|
|
1696
1705
|
const l = ue();
|
|
1697
|
-
return
|
|
1698
|
-
},
|
|
1706
|
+
return jt(l, { property: t });
|
|
1707
|
+
}, ll = (t, l) => {
|
|
1699
1708
|
const r = {
|
|
1700
1709
|
xs: 0,
|
|
1701
1710
|
sm: 1,
|
|
@@ -1705,7 +1714,7 @@ const qr = (t) => {
|
|
|
1705
1714
|
"2xl": 5
|
|
1706
1715
|
};
|
|
1707
1716
|
return r[p(t, "mq", "xs")] <= r[l];
|
|
1708
|
-
},
|
|
1717
|
+
}, sl = {
|
|
1709
1718
|
width: "w-",
|
|
1710
1719
|
height: "h-",
|
|
1711
1720
|
minWidth: "min-w-",
|
|
@@ -1778,22 +1787,22 @@ const qr = (t) => {
|
|
|
1778
1787
|
lg: "1024px",
|
|
1779
1788
|
xl: "1280px",
|
|
1780
1789
|
"2xl": "1536px"
|
|
1781
|
-
},
|
|
1782
|
-
const { type: l = "icons", label: r, property: s, onEmitChange:
|
|
1783
|
-
}, units: a, negative: d = !1 } = t, [i] =
|
|
1790
|
+
}, ol = (t) => `${t.toUpperCase()} ${Le[t] ? `(${Le[t]} & up)` : ""}`, Se = (t) => {
|
|
1791
|
+
const { type: l = "icons", label: r, property: s, onEmitChange: n = () => {
|
|
1792
|
+
}, units: a, negative: d = !1 } = t, [i] = pr(), [o] = Qe(), [, u] = He(), x = se(s), c = Ke(), m = qe(), [h] = Je(), g = N(() => p(x, "fullCls", ""), [x]), f = A(
|
|
1784
1793
|
(k, I = !0) => {
|
|
1785
|
-
const F = { dark: i, mq: u, mod:
|
|
1786
|
-
(i ||
|
|
1787
|
-
const oe =
|
|
1794
|
+
const F = { dark: i, mq: u, mod: o, cls: k, property: s, fullCls: "" };
|
|
1795
|
+
(i || o !== "") && (F.mq = "xs");
|
|
1796
|
+
const oe = Dr(F);
|
|
1788
1797
|
c(h, [oe], I);
|
|
1789
1798
|
},
|
|
1790
|
-
[h, i, u,
|
|
1799
|
+
[h, i, u, o, s, c]
|
|
1791
1800
|
), T = A(() => {
|
|
1792
1801
|
m(h, [g]);
|
|
1793
|
-
}, [h, g, m]), D = N(() =>
|
|
1802
|
+
}, [h, g, m]), D = N(() => ll(x, u), [x, u]);
|
|
1794
1803
|
_(() => {
|
|
1795
|
-
|
|
1796
|
-
}, [D,
|
|
1804
|
+
n(D, x);
|
|
1805
|
+
}, [D, n, x]);
|
|
1797
1806
|
const [, , j] = He(), L = A(
|
|
1798
1807
|
(k) => {
|
|
1799
1808
|
j({
|
|
@@ -1806,26 +1815,26 @@ const qr = (t) => {
|
|
|
1806
1815
|
}[k]);
|
|
1807
1816
|
},
|
|
1808
1817
|
[j]
|
|
1809
|
-
), $ = p(x, "dark", null) === i && p(x, "mod", null) ===
|
|
1810
|
-
return /* @__PURE__ */ e.jsx(
|
|
1818
|
+
), $ = p(x, "dark", null) === i && p(x, "mod", null) === o && p(x, "mq", null) === u;
|
|
1819
|
+
return /* @__PURE__ */ e.jsx(Zr, { canChange: D, canReset: x && $, children: /* @__PURE__ */ e.jsxs("div", { className: "group flex flex-row items-center py-2 first:pt-0 last:pb-0", children: [
|
|
1811
1820
|
/* @__PURE__ */ e.jsx("div", { className: "relative w-[70px] truncate text-xs text-foreground", children: /* @__PURE__ */ e.jsx("span", { className: `text-[11px] ${x && !$ ? "text-foreground" : ""}`, children: r }) }),
|
|
1812
1821
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-row items-center", children: [
|
|
1813
1822
|
/* @__PURE__ */ e.jsxs("div", { className: "w-[150px]", children: [
|
|
1814
1823
|
l === "arbitrary" ? /* @__PURE__ */ e.jsx(
|
|
1815
|
-
|
|
1824
|
+
rl,
|
|
1816
1825
|
{
|
|
1817
1826
|
currentClass: p(x, "cls", ""),
|
|
1818
|
-
classPrefix: p(
|
|
1827
|
+
classPrefix: p(sl, s, ""),
|
|
1819
1828
|
units: a || [],
|
|
1820
1829
|
onChange: f,
|
|
1821
1830
|
negative: d,
|
|
1822
1831
|
cssProperty: s
|
|
1823
1832
|
}
|
|
1824
1833
|
) : null,
|
|
1825
|
-
l === "icons" && /* @__PURE__ */ e.jsx(
|
|
1826
|
-
l === "range" && /* @__PURE__ */ e.jsx(
|
|
1827
|
-
l === "color" && /* @__PURE__ */ e.jsx(
|
|
1828
|
-
l === "dropdown" && /* @__PURE__ */ e.jsx(
|
|
1834
|
+
l === "icons" && /* @__PURE__ */ e.jsx(Ur, { property: s, onChange: f }),
|
|
1835
|
+
l === "range" && /* @__PURE__ */ e.jsx(zr, { property: s, onChange: f }),
|
|
1836
|
+
l === "color" && /* @__PURE__ */ e.jsx(Kr, { property: s, onChange: f }),
|
|
1837
|
+
l === "dropdown" && /* @__PURE__ */ e.jsx(ot, { label: r, property: s, onChange: f })
|
|
1829
1838
|
] }),
|
|
1830
1839
|
/* @__PURE__ */ e.jsx("div", { className: `w-[30px] cursor-pointer ${g ? "visible" : "invisible"}`, children: $ ? /* @__PURE__ */ e.jsx("button", { type: "button", onClick: () => T(), 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" }) }) : D && x ? /* @__PURE__ */ e.jsxs(W, { delayDuration: 100, children: [
|
|
1831
1840
|
/* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
@@ -1839,7 +1848,7 @@ const qr = (t) => {
|
|
|
1839
1848
|
/* @__PURE__ */ e.jsx(Z, { children: /* @__PURE__ */ e.jsx("div", { className: "text-right", children: /* @__PURE__ */ e.jsxs("div", { children: [
|
|
1840
1849
|
"Current style is set at ",
|
|
1841
1850
|
/* @__PURE__ */ e.jsxs("span", { className: "font-bold ", children: [
|
|
1842
|
-
|
|
1851
|
+
ol(p(x, "mq")),
|
|
1843
1852
|
i && !x.dark ? "(Light mode)" : ""
|
|
1844
1853
|
] }),
|
|
1845
1854
|
/* @__PURE__ */ e.jsx("br", {}),
|
|
@@ -1859,16 +1868,16 @@ const qr = (t) => {
|
|
|
1859
1868
|
] }) : null })
|
|
1860
1869
|
] })
|
|
1861
1870
|
] }) });
|
|
1862
|
-
},
|
|
1871
|
+
}, nl = ["px", "%", "em", "rem", "ch", "vh", "vw"], at = ({
|
|
1863
1872
|
label: t,
|
|
1864
1873
|
options: l,
|
|
1865
1874
|
borderB: r = !1,
|
|
1866
1875
|
borderT: s = !1,
|
|
1867
|
-
type:
|
|
1868
|
-
units: a =
|
|
1876
|
+
type: n = "arbitrary",
|
|
1877
|
+
units: a = nl,
|
|
1869
1878
|
negative: d = !1
|
|
1870
1879
|
}) => {
|
|
1871
|
-
const [i,
|
|
1880
|
+
const [i, o] = w(l[0].key), u = ue(), x = A((c) => C(u, "property").includes(c), [u]);
|
|
1872
1881
|
return /* @__PURE__ */ e.jsxs(
|
|
1873
1882
|
"div",
|
|
1874
1883
|
{
|
|
@@ -1882,13 +1891,13 @@ const qr = (t) => {
|
|
|
1882
1891
|
"button",
|
|
1883
1892
|
{
|
|
1884
1893
|
type: "button",
|
|
1885
|
-
onClick: () =>
|
|
1894
|
+
onClick: () => o(m),
|
|
1886
1895
|
className: `relative cursor-pointer rounded-full p-1 text-[8px] ${m === i ? " bg-[#3E57F0] text-white" : "text-gray-600 dark:text-gray-300"}`,
|
|
1887
1896
|
children: [
|
|
1888
1897
|
P.createElement("div", {
|
|
1889
1898
|
className: x(m) ? "-bottom-1.5 absolute bg-[#3E57F0] h-[2px] left-0 w-full" : ""
|
|
1890
1899
|
}),
|
|
1891
|
-
P.createElement(p(
|
|
1900
|
+
P.createElement(p(st, m, We), { className: "text-inherit w-3 h-3" })
|
|
1892
1901
|
]
|
|
1893
1902
|
}
|
|
1894
1903
|
) }),
|
|
@@ -1899,7 +1908,7 @@ const qr = (t) => {
|
|
|
1899
1908
|
/* @__PURE__ */ e.jsx("div", { className: "mt-0 flex items-center", children: /* @__PURE__ */ e.jsx(
|
|
1900
1909
|
Se,
|
|
1901
1910
|
{
|
|
1902
|
-
type:
|
|
1911
|
+
type: n,
|
|
1903
1912
|
units: [...a],
|
|
1904
1913
|
label: "",
|
|
1905
1914
|
property: i,
|
|
@@ -1909,12 +1918,12 @@ const qr = (t) => {
|
|
|
1909
1918
|
]
|
|
1910
1919
|
}
|
|
1911
1920
|
);
|
|
1912
|
-
},
|
|
1921
|
+
}, al = ({ heading: t, items: l }) => {
|
|
1913
1922
|
const r = ue(), s = N(() => {
|
|
1914
|
-
const
|
|
1915
|
-
i.map((
|
|
1923
|
+
const n = (i) => U(
|
|
1924
|
+
i.map((o) => o.styleType === "multiple" ? C(o.options, "key") : o.property)
|
|
1916
1925
|
), a = U(
|
|
1917
|
-
l.map((i) => i.styleType === "accordion" ?
|
|
1926
|
+
l.map((i) => i.styleType === "accordion" ? n(i.items) : i.styleType === "multiple" ? C(i.options, "key") : i.property)
|
|
1918
1927
|
), d = C(r, "property");
|
|
1919
1928
|
return _e(a, d).length > 0;
|
|
1920
1929
|
}, [r, l]);
|
|
@@ -1928,17 +1937,17 @@ const qr = (t) => {
|
|
|
1928
1937
|
}
|
|
1929
1938
|
) : null
|
|
1930
1939
|
] }) }),
|
|
1931
|
-
/* @__PURE__ */ e.jsx("div", { className: "p-2", children: l.map((
|
|
1940
|
+
/* @__PURE__ */ e.jsx("div", { className: "p-2", children: l.map((n) => n.styleType === "multiple" ? /* @__PURE__ */ e.jsx(at, { ...n }, n.label) : /* @__PURE__ */ e.jsx(Se, { ...n }, n.label)) })
|
|
1932
1941
|
] });
|
|
1933
|
-
},
|
|
1942
|
+
}, il = Oe({}), he = ({ section: t }) => {
|
|
1934
1943
|
const l = ue(), r = A(
|
|
1935
1944
|
(a = []) => {
|
|
1936
1945
|
const d = {};
|
|
1937
|
-
for (let
|
|
1938
|
-
d[l[
|
|
1946
|
+
for (let o = 0; o < l.length; o++)
|
|
1947
|
+
d[l[o].property] = l[o].cls;
|
|
1939
1948
|
let i = !0;
|
|
1940
|
-
for (const
|
|
1941
|
-
if (!ge(d,
|
|
1949
|
+
for (const o in a)
|
|
1950
|
+
if (!ge(d, o) || d[o] !== a[o]) {
|
|
1942
1951
|
i = !1;
|
|
1943
1952
|
break;
|
|
1944
1953
|
}
|
|
@@ -1948,28 +1957,28 @@ const qr = (t) => {
|
|
|
1948
1957
|
), s = N(() => {
|
|
1949
1958
|
if (l.length > 0 && t.heading === "Classes")
|
|
1950
1959
|
return !0;
|
|
1951
|
-
const a = (
|
|
1952
|
-
|
|
1960
|
+
const a = (o) => U(
|
|
1961
|
+
o.map((u) => u.styleType === "multiple" ? U(C(u.options, "key")) : u.property)
|
|
1953
1962
|
), d = U(
|
|
1954
|
-
t.items.map((
|
|
1963
|
+
t.items.map((o) => o.styleType === "accordion" ? a(o.items) : o.styleType === "multiple" ? U(C(o.options, "key")) : o.property)
|
|
1955
1964
|
), i = C(l, "property");
|
|
1956
1965
|
return _e(d, i).length > 0;
|
|
1957
|
-
}, [l, t.heading, t.items]),
|
|
1958
|
-
return /* @__PURE__ */ e.jsx(
|
|
1966
|
+
}, [l, t.heading, t.items]), n = N(() => ({}), []);
|
|
1967
|
+
return /* @__PURE__ */ e.jsx(il.Provider, { value: n, children: /* @__PURE__ */ e.jsxs(ie, { value: t.heading, children: [
|
|
1959
1968
|
/* @__PURE__ */ e.jsx(de, { className: "px-3 py-2 text-xs hover:no-underline", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
|
|
1960
1969
|
/* @__PURE__ */ e.jsx("div", { className: `h-[8px] w-[8px] rounded-full ${s ? "bg-blue-500" : "bg-gray-300"}` }),
|
|
1961
1970
|
t.heading
|
|
1962
1971
|
] }) }),
|
|
1963
1972
|
/* @__PURE__ */ e.jsx(ce, { className: "bg-gray-100 px-3.5 py-2", children: P.Children.toArray(
|
|
1964
|
-
t.items.map((a) => ge(a, "component") ? P.createElement(a.component, { key: a.label }) : ge(a, "styleType") ? a.styleType === "multiple" ? /* @__PURE__ */ e.jsx(
|
|
1973
|
+
t.items.map((a) => ge(a, "component") ? P.createElement(a.component, { key: a.label }) : ge(a, "styleType") ? a.styleType === "multiple" ? /* @__PURE__ */ e.jsx(at, { ...a }, a.label) : a.styleType === "accordion" && r(a == null ? void 0 : a.conditions) ? /* @__PURE__ */ e.jsx(al, { ...a }, a.label) : null : /* @__PURE__ */ e.jsx(Se, { ...a }, a.label))
|
|
1965
1974
|
) })
|
|
1966
1975
|
] }) });
|
|
1967
|
-
},
|
|
1976
|
+
}, dl = ({
|
|
1968
1977
|
item: t,
|
|
1969
1978
|
index: l,
|
|
1970
1979
|
canDelete: r,
|
|
1971
1980
|
onChange: s,
|
|
1972
|
-
onRemove:
|
|
1981
|
+
onRemove: n
|
|
1973
1982
|
}) => /* @__PURE__ */ e.jsxs("div", { className: `flex flex-col gap-1 border-gray-400 py-2 ${r ? "border-b" : ""}`, children: [
|
|
1974
1983
|
/* @__PURE__ */ e.jsx(
|
|
1975
1984
|
"input",
|
|
@@ -1999,19 +2008,19 @@ const qr = (t) => {
|
|
|
1999
2008
|
/* @__PURE__ */ e.jsx(
|
|
2000
2009
|
Xe,
|
|
2001
2010
|
{
|
|
2002
|
-
onClick:
|
|
2011
|
+
onClick: n,
|
|
2003
2012
|
className: "h-6 w-6 cursor-pointer rounded border border-red-400 p-1 text-red-400 hover:opacity-80"
|
|
2004
2013
|
}
|
|
2005
2014
|
)
|
|
2006
2015
|
] })
|
|
2007
|
-
] }),
|
|
2016
|
+
] }), cl = ({ section: t }) => {
|
|
2008
2017
|
var m;
|
|
2009
|
-
const { setSyncState: l } =
|
|
2018
|
+
const { setSyncState: l } = ur(), r = G(), [s, n] = w([]), [a] = Ne(), d = Ue(), i = `${p(a, "0.prop")}_attrs`;
|
|
2010
2019
|
ne.useEffect(() => {
|
|
2011
2020
|
const h = C(p(r, i), (g, f) => ({ key: f, value: g }));
|
|
2012
|
-
b(h) ?
|
|
2021
|
+
b(h) ? n([]) : n(h);
|
|
2013
2022
|
}, [p(r, i)]);
|
|
2014
|
-
const
|
|
2023
|
+
const o = () => n([...s, { key: "", value: "" }]), u = (h) => {
|
|
2015
2024
|
const g = be(s, (f, T) => h !== T);
|
|
2016
2025
|
c(g);
|
|
2017
2026
|
}, x = (h, g) => {
|
|
@@ -2045,7 +2054,7 @@ const qr = (t) => {
|
|
|
2045
2054
|
className: `flex h-6 w-max items-center justify-center gap-x-0.5 rounded-full border p-1 px-2 text-xs ${!b(s) && b((m = ye(s)) == null ? void 0 : m.key) ? "cursor-not-allowed border-gray-400 text-gray-400" : "cursor-pointer border-blue-400 text-blue-400 hover:bg-blue-400 hover:text-white"}`,
|
|
2046
2055
|
onClick: () => {
|
|
2047
2056
|
var h;
|
|
2048
|
-
!b(s) && b((h = ye(s)) == null ? void 0 : h.key) ||
|
|
2057
|
+
!b(s) && b((h = ye(s)) == null ? void 0 : h.key) || o();
|
|
2049
2058
|
},
|
|
2050
2059
|
children: [
|
|
2051
2060
|
/* @__PURE__ */ e.jsx(Ce, { width: 12, height: 12 }),
|
|
@@ -2060,7 +2069,7 @@ const qr = (t) => {
|
|
|
2060
2069
|
C(s, (h, g) => {
|
|
2061
2070
|
const f = s.length > 0 && g < s.length - 1;
|
|
2062
2071
|
return /* @__PURE__ */ e.jsx(
|
|
2063
|
-
|
|
2072
|
+
dl,
|
|
2064
2073
|
{
|
|
2065
2074
|
item: h,
|
|
2066
2075
|
index: g,
|
|
@@ -2075,8 +2084,8 @@ const qr = (t) => {
|
|
|
2075
2084
|
] }) })
|
|
2076
2085
|
] });
|
|
2077
2086
|
};
|
|
2078
|
-
function
|
|
2079
|
-
const [t, l] = Qe(), { flexChild: r, gridChild: s } =
|
|
2087
|
+
function pl() {
|
|
2088
|
+
const [t, l] = Qe(), { flexChild: r, gridChild: s } = xr(), [, n] = Vr(gr), { t: a } = Fe(), [d] = Ne();
|
|
2080
2089
|
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: [
|
|
2081
2090
|
/* @__PURE__ */ e.jsx(Ze, { className: "mx-auto text-3xl" }),
|
|
2082
2091
|
/* @__PURE__ */ e.jsx("h1", { children: a("no_styling_block_selected") }),
|
|
@@ -2088,12 +2097,12 @@ function cl() {
|
|
|
2088
2097
|
] })
|
|
2089
2098
|
] }) }) : (
|
|
2090
2099
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions
|
|
2091
|
-
/* @__PURE__ */ e.jsxs("div", { onClick: () =>
|
|
2100
|
+
/* @__PURE__ */ e.jsxs("div", { onClick: () => n(!1), className: "flex h-full flex-col", children: [
|
|
2092
2101
|
/* @__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: [
|
|
2093
2102
|
/* @__PURE__ */ e.jsx(Te, { htmlFor: "", className: "flex gap-x-1.5 text-xs italic", children: "State" }),
|
|
2094
|
-
/* @__PURE__ */ e.jsxs(
|
|
2095
|
-
/* @__PURE__ */ e.jsx(
|
|
2096
|
-
/* @__PURE__ */ e.jsxs(
|
|
2103
|
+
/* @__PURE__ */ e.jsxs(hr, { defaultValue: t, onValueChange: (i) => l(i), children: [
|
|
2104
|
+
/* @__PURE__ */ e.jsx(mr, { className: "h-auto w-fit p-1 px-3", children: /* @__PURE__ */ e.jsx(yr, { placeholder: "State" }) }),
|
|
2105
|
+
/* @__PURE__ */ e.jsxs(br, { children: [
|
|
2097
2106
|
/* @__PURE__ */ e.jsx(H, { value: "", children: "Normal" }),
|
|
2098
2107
|
/* @__PURE__ */ e.jsx(H, { value: "hover", children: "Hover" }),
|
|
2099
2108
|
/* @__PURE__ */ e.jsx(H, { value: "active", children: "Active" }),
|
|
@@ -2109,19 +2118,19 @@ function cl() {
|
|
|
2109
2118
|
] })
|
|
2110
2119
|
] })
|
|
2111
2120
|
] }) }),
|
|
2112
|
-
/* @__PURE__ */ e.jsxs(
|
|
2121
|
+
/* @__PURE__ */ e.jsxs(fr, { className: "no-scrollbar -mx-1 h-full overflow-x-hidden", children: [
|
|
2113
2122
|
/* @__PURE__ */ e.jsxs(Ge, { type: "multiple", className: "h-full w-full", children: [
|
|
2114
|
-
r && /* @__PURE__ */ e.jsx(he, { section:
|
|
2115
|
-
s ? /* @__PURE__ */ e.jsx(he, { section:
|
|
2116
|
-
|
|
2117
|
-
/* @__PURE__ */ e.jsx(
|
|
2123
|
+
r && /* @__PURE__ */ e.jsx(he, { section: Yr }),
|
|
2124
|
+
s ? /* @__PURE__ */ e.jsx(he, { section: Wr }) : null,
|
|
2125
|
+
Xr.map((i) => /* @__PURE__ */ e.jsx(he, { section: i }, i.heading)),
|
|
2126
|
+
/* @__PURE__ */ e.jsx(cl, { section: { heading: "Attributes" } })
|
|
2118
2127
|
] }),
|
|
2119
2128
|
/* @__PURE__ */ e.jsx("div", { className: "h-60" })
|
|
2120
2129
|
] })
|
|
2121
2130
|
] })
|
|
2122
2131
|
);
|
|
2123
2132
|
}
|
|
2124
|
-
const
|
|
2133
|
+
const ul = {
|
|
2125
2134
|
px: 1,
|
|
2126
2135
|
"%": 1,
|
|
2127
2136
|
em: 100,
|
|
@@ -2132,10 +2141,10 @@ const pl = {
|
|
|
2132
2141
|
"-": 1,
|
|
2133
2142
|
deg: 1,
|
|
2134
2143
|
ms: 0.1
|
|
2135
|
-
},
|
|
2136
|
-
const t = G(), { t: l } = Fe(), [r, s] = P.useState(""), [
|
|
2137
|
-
onDrag: (
|
|
2138
|
-
onDragEnd: (
|
|
2144
|
+
}, ws = () => {
|
|
2145
|
+
const t = G(), { t: l } = Fe(), [r, s] = P.useState(""), [n, a] = P.useState({
|
|
2146
|
+
onDrag: (o) => o,
|
|
2147
|
+
onDragEnd: (o) => o,
|
|
2139
2148
|
dragStartY: 0,
|
|
2140
2149
|
dragging: !1,
|
|
2141
2150
|
dragStartValue: 0,
|
|
@@ -2143,21 +2152,21 @@ const pl = {
|
|
|
2143
2152
|
negative: !1,
|
|
2144
2153
|
cssProperty: ""
|
|
2145
2154
|
}), d = me(
|
|
2146
|
-
(
|
|
2147
|
-
const u = !p(
|
|
2148
|
-
let c = parseFloat(
|
|
2155
|
+
(o) => {
|
|
2156
|
+
const u = !p(n, "negative", !1), x = p(n, "cssProperty", "");
|
|
2157
|
+
let c = parseFloat(n.dragStartValue);
|
|
2149
2158
|
c = Ee(c) ? 0 : c;
|
|
2150
|
-
let m =
|
|
2159
|
+
let m = ul[n.dragUnit];
|
|
2151
2160
|
(z(x, "scale") || x === "opacity") && (m = 10);
|
|
2152
|
-
let g = (
|
|
2153
|
-
u && g < 0 && (g = 0), x === "opacity" && g > 1 && (g = 1),
|
|
2161
|
+
let g = (n.dragStartY - o.pageY) / m + c;
|
|
2162
|
+
u && g < 0 && (g = 0), x === "opacity" && g > 1 && (g = 1), n.onDrag(`${g}`), s(`${g}`);
|
|
2154
2163
|
},
|
|
2155
|
-
[
|
|
2164
|
+
[n],
|
|
2156
2165
|
50
|
|
2157
2166
|
), i = A(() => {
|
|
2158
|
-
setTimeout(() =>
|
|
2159
|
-
onDrag: (
|
|
2160
|
-
onDragEnd: (
|
|
2167
|
+
setTimeout(() => n.onDragEnd(`${r}`), 100), a({
|
|
2168
|
+
onDrag: (o) => o,
|
|
2169
|
+
onDragEnd: (o) => o,
|
|
2161
2170
|
dragStartY: 0,
|
|
2162
2171
|
dragging: !1,
|
|
2163
2172
|
dragStartValue: 0,
|
|
@@ -2165,12 +2174,12 @@ const pl = {
|
|
|
2165
2174
|
negative: !1,
|
|
2166
2175
|
cssProperty: ""
|
|
2167
2176
|
});
|
|
2168
|
-
}, [
|
|
2169
|
-
return
|
|
2177
|
+
}, [n, r, a]);
|
|
2178
|
+
return wt(t) ? /* @__PURE__ */ e.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 rounded-xl p-4", children: [
|
|
2170
2179
|
/* @__PURE__ */ e.jsx(Ze, { className: "mx-auto text-3xl" }),
|
|
2171
2180
|
/* @__PURE__ */ e.jsx("h1", { children: l("no_block_selected_for_styling") })
|
|
2172
|
-
] }) }) : /* @__PURE__ */ e.jsxs(
|
|
2173
|
-
|
|
2181
|
+
] }) }) : /* @__PURE__ */ e.jsx(tt, { children: /* @__PURE__ */ e.jsxs(nt.Provider, { value: { setDragData: a }, children: [
|
|
2182
|
+
n.dragging ? /* @__PURE__ */ e.jsx(
|
|
2174
2183
|
"div",
|
|
2175
2184
|
{
|
|
2176
2185
|
onMouseMove: d,
|
|
@@ -2178,8 +2187,8 @@ const pl = {
|
|
|
2178
2187
|
className: "absolute inset-0 z-30 cursor-row-resize bg-gray-300/10 "
|
|
2179
2188
|
}
|
|
2180
2189
|
) : null,
|
|
2181
|
-
/* @__PURE__ */ e.jsxs(
|
|
2182
|
-
/* @__PURE__ */ e.jsxs(
|
|
2190
|
+
/* @__PURE__ */ e.jsxs(vr, { defaultValue: "settings", className: "flex h-full w-full flex-col py-1", children: [
|
|
2191
|
+
/* @__PURE__ */ e.jsxs(jr, { className: "mx-1 grid grid-cols-2", children: [
|
|
2183
2192
|
/* @__PURE__ */ e.jsx(Be, { value: "settings", children: "Settings" }),
|
|
2184
2193
|
/* @__PURE__ */ e.jsx(Be, { value: "styling", children: "Styling" })
|
|
2185
2194
|
] }),
|
|
@@ -2188,13 +2197,13 @@ const pl = {
|
|
|
2188
2197
|
{
|
|
2189
2198
|
value: "settings",
|
|
2190
2199
|
className: "no-scrollbar -mx-1 -mr-2 h-full flex-1 overflow-y-auto overflow-x-hidden",
|
|
2191
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2200
|
+
children: /* @__PURE__ */ e.jsx(_r, {})
|
|
2192
2201
|
}
|
|
2193
2202
|
),
|
|
2194
|
-
/* @__PURE__ */ e.jsx(Ae, { value: "styling", className: "flex-1 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(
|
|
2203
|
+
/* @__PURE__ */ e.jsx(Ae, { value: "styling", className: "flex-1 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(pl, {}) })
|
|
2195
2204
|
] })
|
|
2196
|
-
] });
|
|
2205
|
+
] }) });
|
|
2197
2206
|
};
|
|
2198
2207
|
export {
|
|
2199
|
-
|
|
2208
|
+
ws as default
|
|
2200
2209
|
};
|