@chaibuilder/sdk 1.0.23 → 1.1.0
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-P3qHuE5J.cjs +1 -0
- package/dist/AddBlocks-imyQSCbI.js +230 -0
- package/dist/{BrandingOptions-Fyo8qs4o.cjs → BrandingOptions-_2XBEPab.cjs} +1 -1
- package/dist/{BrandingOptions-orZyDGiL.js → BrandingOptions-tSNtQ1Kv.js} +1 -1
- package/dist/CanvasArea-TzIgm_vh.cjs +58 -0
- package/dist/CanvasArea-dS2B20gv.js +1421 -0
- package/dist/{CurrentPage-lIithDJy.cjs → CurrentPage-_Em0U2gh.cjs} +1 -1
- package/dist/{CurrentPage-70sBzc2_.js → CurrentPage-pSsaLyEf.js} +2 -2
- package/dist/Layers-RyVRzaUa.cjs +1 -0
- package/dist/{Layers-W0N2zfnf.js → Layers-wp2Uc2Y5.js} +119 -137
- package/dist/{MarkAsGlobalBlock-FPCQmRIh.js → MarkAsGlobalBlock-aqik3ouc.js} +1 -1
- package/dist/{MarkAsGlobalBlock-EOsABFjY.cjs → MarkAsGlobalBlock-p_wvHkQZ.cjs} +1 -1
- package/dist/{PagesPanel-RbHN6lvQ.js → PagesPanel-L2VS8RyZ.js} +3 -3
- package/dist/{PagesPanel-i-MQEmm_.cjs → PagesPanel-ZuXc2610.cjs} +1 -1
- package/dist/{ProjectPanel-0BGx-hP-.cjs → ProjectPanel-SErKorHi.cjs} +1 -1
- package/dist/{ProjectPanel-CzwuyR0N.js → ProjectPanel-T3AXGe7O.js} +3 -3
- package/dist/Settings-GJHtwQaa.cjs +1 -0
- package/dist/{Settings-lxTrbI-C.js → Settings-xkL3U3Y-.js} +301 -308
- package/dist/{SidePanels-pUOJTYfr.cjs → SidePanels-5FNROZe7.cjs} +1 -1
- package/dist/{SidePanels-g4M6oTs-.js → SidePanels-pd7HYv8I.js} +33 -32
- package/dist/{Topbar-KqZt4TEY.js → Topbar-Jc74a6oE.js} +1 -1
- package/dist/{Topbar-kHffytzr.cjs → Topbar-ZjAs5fDc.cjs} +1 -1
- package/dist/{UnsplashImages-Ua7ksJ8c.js → UnsplashImages-_PxEYx5c.js} +1 -1
- package/dist/{UnsplashImages-y7I_7_W7.cjs → UnsplashImages-nXceZLmd.cjs} +1 -1
- package/dist/{UploadImages-RzEm0Stb.cjs → UploadImages-tcQb5NZu.cjs} +1 -1
- package/dist/{UploadImages-YP_J6erG.js → UploadImages-zzSgKmP9.js} +10 -10
- package/dist/{add-page-modal-btGWaXyq.js → add-page-modal-Njd5M7E2.js} +3 -3
- package/dist/{add-page-modal-ekFis5D8.cjs → add-page-modal-U8EH-GIa.cjs} +1 -1
- package/dist/{confirm-alert-Py2WqZhJ.js → confirm-alert-2JxcNf3T.js} +1 -1
- package/dist/{confirm-alert-mAhT8vln.cjs → confirm-alert-mzlwOW9w.cjs} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +1 -3
- package/dist/core.js +2 -2
- package/dist/{delete-page-modal-QzleoJG2.cjs → delete-page-modal-0LQiM0fX.cjs} +1 -1
- package/dist/{delete-page-modal-Rq4ThQpu.js → delete-page-modal-NT7df4pk.js} +2 -2
- package/dist/{form-Lm3bupAq.js → form-TQ7vwDYO.js} +1 -1
- package/dist/{form-kAjrBaV-.cjs → form-bSW-Pkw9.cjs} +1 -1
- package/dist/{index-WPlT_Q87.js → index-N3mTbV2j.js} +6 -4
- package/dist/{index-Vx4ctSV6.js → index-ORFlyrBx.js} +569 -556
- package/dist/{index-fvoD_laH.cjs → index-pYZXf7hY.cjs} +2 -2
- package/dist/index-zkc4SQCu.cjs +1 -0
- package/dist/{page-viewer-AlOCzh1b.cjs → page-viewer-UxwOwHCO.cjs} +1 -1
- package/dist/{page-viewer-_wGsV2_o.js → page-viewer-e3lOBAH3.js} +3 -3
- package/dist/{project-general-setting-XnNyOpXO.cjs → project-general-setting-DrLwWE-6.cjs} +1 -1
- package/dist/{project-general-setting-B8uuHccU.js → project-general-setting-el86II8N.js} +3 -3
- package/dist/{project-seo-setting-QJBATF59.cjs → project-seo-setting-cERASO9j.cjs} +1 -1
- package/dist/{project-seo-setting-Zg2Z-Frr.js → project-seo-setting-k0HlefUD.js} +2 -2
- package/dist/{single-page-detail-HXpxgQnU.js → single-page-detail-UFEXRI81.js} +4 -4
- package/dist/{single-page-detail-MWh30E_-.cjs → single-page-detail-fUh22jZE.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 +57 -57
- package/dist/useAddBlockByDrop-DPV32UHP.cjs +1 -0
- package/dist/useAddBlockByDrop-UA_Iw_4l.js +20 -0
- package/package.json +3 -3
- package/dist/AddBlocks-Izn_rxXD.js +0 -270
- package/dist/AddBlocks-RHuwwfe5.cjs +0 -3
- package/dist/CanvasArea-C30uJLef.js +0 -1298
- package/dist/CanvasArea-IM2K8bud.cjs +0 -46
- package/dist/Layers-YMtavzUG.cjs +0 -1
- package/dist/Settings-mTWkKG82.cjs +0 -1
- package/dist/index-W5drgyWI.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
|
|
4
|
-
import { useThrottledCallback as
|
|
5
|
-
import { forEach as
|
|
6
|
-
import { useTranslation as
|
|
7
|
-
import { PlusIcon as Ce, Cross2Icon as
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { u as
|
|
12
|
-
import { Check as
|
|
13
|
-
import { getBlockComponent as et, getChaiDataProviders as
|
|
14
|
-
import { E as tt, u as rt } from "./index-
|
|
15
|
-
import { useAtom as
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import { A as
|
|
19
|
-
import { a as
|
|
3
|
+
import I, { useState as w, useMemo as N, useEffect as _, useCallback as A, memo as dt, createContext as Me, useContext as re } from "react";
|
|
4
|
+
import { useThrottledCallback as ye } from "@react-hookz/web";
|
|
5
|
+
import { forEach as we, isArray as ae, omit as ct, truncate as pt, includes as M, get as p, first as pe, split as ut, startCase as Y, toLower as te, isEmpty as b, map as C, find as xt, last as be, filter as fe, set as Ee, keys as gt, cloneDeep as ht, each as mt, capitalize as yt, reject as bt, nth as Se, startsWith as z, isNumber as ft, parseInt as vt, isNaN as _e, findLast as jt, flatten as U, intersection as Fe, has as he, isNull as wt } from "lodash";
|
|
6
|
+
import { useTranslation as Ye } from "react-i18next";
|
|
7
|
+
import { PlusIcon as Ce, Cross2Icon as We, EyeOpenIcon as Ct, EyeClosedIcon as Ve, BorderAllIcon as O, WidthIcon as S, 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 Rt, AlignLeftIcon as St, AlignCenterHorizontallyIcon as Vt, AlignRightIcon as Ht, StretchHorizontallyIcon as Bt, FontItalicIcon as At, UnderlineIcon as Dt, OverlineIcon as It, LetterCaseUppercaseIcon as Pt, Cross1Icon as $t, InfoCircledIcon as ke, MinusIcon as Lt, BoxIcon as Xe, RowSpacingIcon as Ot, TriangleDownIcon as Mt, CrossCircledIcon as Et, TrashIcon as _t, MixerHorizontalIcon as Ze } from "@radix-ui/react-icons";
|
|
8
|
+
import { b3 as Ft, b4 as Yt, B as ue, b5 as Wt, b6 as Xt, b7 as Zt, b8 as zt, b9 as Ut, ba as Gt, bb as Kt, a6 as G, aq as qt, ar as Jt, as as Qt, bc as er, ao as tr, bd as rr, ap as lr, aH as W, aI as X, aK as Z, ak as sr, be as or, bf as nr, bg as ar, bh as ir, bi as dr, bj as cr, p as ze, ac as Ue, bk as Ge, bl as ie, bm as de, bn as ce, aj as Ne, P as Ke, a3 as qe, j as Je, aM as Te, bo as pr, bp as ur, a4 as xe, W as xr, a9 as Qe, R as He, ag as gr, ad as hr, bq as mr, au as yr, av as br, aw as fr, ax as vr, ay as H, br as jr, aB as wr, aC as Cr, aD as Be, aE as Ae } from "./index-ORFlyrBx.js";
|
|
9
|
+
import kr from "@rjsf/core";
|
|
10
|
+
import Nr from "@rjsf/validator-ajv8";
|
|
11
|
+
import { u as Tr } from "./controls-G0puEH71.js";
|
|
12
|
+
import { Check as Rr, EditIcon as Sr, TrashIcon as Vr } from "lucide-react";
|
|
13
|
+
import { getBlockComponent as et, getChaiDataProviders as Hr } from "@chaibuilder/runtime";
|
|
14
|
+
import { E as tt, u as rt } from "./index-N3mTbV2j.js";
|
|
15
|
+
import { useAtom as Br } from "jotai";
|
|
16
|
+
import Ar from "react-autosuggest";
|
|
17
|
+
import Dr from "fuse.js";
|
|
18
|
+
import { A as Ir, C as ge, d as Pr } from "./utils-PPBbw5bk.js";
|
|
19
|
+
import { a as $r } from "./MODIFIERS-MLfpKQY1.js";
|
|
20
20
|
import "@radix-ui/react-toggle";
|
|
21
21
|
import "class-variance-authority";
|
|
22
22
|
import "@radix-ui/react-switch";
|
|
@@ -62,25 +62,25 @@ import "./tailwind-config-d1VL1lzE.js";
|
|
|
62
62
|
import "tailwind-merge";
|
|
63
63
|
import "react-hotkeys-hook";
|
|
64
64
|
import "sonner";
|
|
65
|
-
const
|
|
66
|
-
function
|
|
65
|
+
const Lr = I.lazy(() => import("react-json-view"));
|
|
66
|
+
function Or(t) {
|
|
67
67
|
const l = [], r = {};
|
|
68
68
|
function s(n, a) {
|
|
69
|
-
|
|
69
|
+
we(a, (d, i) => {
|
|
70
70
|
const o = n ? `${n}.${i}` : i, u = ae(d) ? "list" : typeof d;
|
|
71
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
74
|
return s("", ct(t, ["styles", "_type", "_id", "_name", "_bindings"])), { paths: l, pathsType: r };
|
|
75
75
|
}
|
|
76
|
-
const
|
|
76
|
+
const ve = ({ data: t, fullView: l }) => {
|
|
77
77
|
if (!t)
|
|
78
78
|
return null;
|
|
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
82
|
/* @__PURE__ */ e.jsx(tt, { children: /* @__PURE__ */ e.jsx(
|
|
83
|
-
|
|
83
|
+
Lr,
|
|
84
84
|
{
|
|
85
85
|
style: { maxHeight: "40vh", overflowY: "auto" },
|
|
86
86
|
name: "Content",
|
|
@@ -104,17 +104,17 @@ const fe = ({ data: t, fullView: l }) => {
|
|
|
104
104
|
dataType: a,
|
|
105
105
|
appliedBindings: d
|
|
106
106
|
}) => {
|
|
107
|
-
const { paths: i, pathsType: o } =
|
|
108
|
-
(g) => !M(d, g) && p(u, `props.${
|
|
107
|
+
const { paths: i, pathsType: o } = Or(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.${pe(ut(g, "."))}.binding`)
|
|
109
109
|
) : i.filter((g) => a === p(o, g, "")), [t, i, d, a, u]);
|
|
110
110
|
return _(() => {
|
|
111
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(
|
|
117
|
-
|
|
115
|
+
/* @__PURE__ */ e.jsxs(Ft, { open: c, onOpenChange: m, children: [
|
|
116
|
+
/* @__PURE__ */ e.jsx(Yt, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
117
|
+
ue,
|
|
118
118
|
{
|
|
119
119
|
variant: "outline",
|
|
120
120
|
size: "sm",
|
|
@@ -131,12 +131,12 @@ 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(Wt, { className: "p-0 z-[999] min-w-[300px]", side: "right", align: "start", children: /* @__PURE__ */ e.jsxs(Xt, { children: [
|
|
135
|
+
/* @__PURE__ */ e.jsx(Zt, { placeholder: `Choose ${te(t)}...` }),
|
|
136
|
+
/* @__PURE__ */ e.jsxs(zt, { children: [
|
|
137
|
+
/* @__PURE__ */ e.jsx(Ut, { children: "No results found." }),
|
|
138
|
+
/* @__PURE__ */ e.jsx(Gt, { children: C(h, (g) => /* @__PURE__ */ e.jsxs(
|
|
139
|
+
Kt,
|
|
140
140
|
{
|
|
141
141
|
value: g,
|
|
142
142
|
className: `cursor-pointer ${x ? "flex justify-between items-center" : "flex flex-col items-start justify-start"}`,
|
|
@@ -145,10 +145,10 @@ const fe = ({ data: t, fullView: l }) => {
|
|
|
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(Rr, { 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(o, g, "")) }) }) : /* @__PURE__ */ e.jsx("div", { className: "pl-6", children: /* @__PURE__ */ e.jsx(
|
|
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(ve, { data: p(s, g) }) })
|
|
152
152
|
]
|
|
153
153
|
},
|
|
154
154
|
g
|
|
@@ -157,9 +157,9 @@ const fe = ({ data: t, fullView: l }) => {
|
|
|
157
157
|
] }) })
|
|
158
158
|
] })
|
|
159
159
|
] }),
|
|
160
|
-
!x && !b(l) && /* @__PURE__ */ e.jsx("div", { className: "pt-2", children: /* @__PURE__ */ e.jsx(
|
|
160
|
+
!x && !b(l) && /* @__PURE__ */ e.jsx("div", { className: "pt-2", children: /* @__PURE__ */ e.jsx(ve, { data: p(s, l, ""), fullView: !0 }) })
|
|
161
161
|
] });
|
|
162
|
-
},
|
|
162
|
+
}, Mr = ({
|
|
163
163
|
appliedBindings: t = [],
|
|
164
164
|
onAddBinding: l,
|
|
165
165
|
editMode: r,
|
|
@@ -180,9 +180,9 @@ const fe = ({ data: t, fullView: l }) => {
|
|
|
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(qt, { children: [
|
|
184
|
+
/* @__PURE__ */ e.jsx(Jt, { 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(
|
|
@@ -221,8 +221,8 @@ const fe = ({ data: t, fullView: l }) => {
|
|
|
221
221
|
}
|
|
222
222
|
)
|
|
223
223
|
] }),
|
|
224
|
-
/* @__PURE__ */ e.jsx(
|
|
225
|
-
|
|
224
|
+
/* @__PURE__ */ e.jsx(er, { children: /* @__PURE__ */ e.jsx(
|
|
225
|
+
ue,
|
|
226
226
|
{
|
|
227
227
|
type: "submit",
|
|
228
228
|
className: "mt-4",
|
|
@@ -234,10 +234,10 @@ const fe = ({ data: t, fullView: l }) => {
|
|
|
234
234
|
] });
|
|
235
235
|
}, lt = ({ disabled: t, children: l, onAddBinding: r, appliedBindings: s, editMode: n = !0, item: a = {} }) => {
|
|
236
236
|
const [d, i] = w(!1);
|
|
237
|
-
return /* @__PURE__ */ e.jsxs(
|
|
238
|
-
/* @__PURE__ */ e.jsx(
|
|
239
|
-
d && /* @__PURE__ */ e.jsx(
|
|
240
|
-
|
|
237
|
+
return /* @__PURE__ */ e.jsxs(tr, { children: [
|
|
238
|
+
/* @__PURE__ */ e.jsx(rr, { disabled: t, asChild: !0, onClick: () => i(!0), children: l }),
|
|
239
|
+
d && /* @__PURE__ */ e.jsx(lr, { children: /* @__PURE__ */ e.jsx(
|
|
240
|
+
Mr,
|
|
241
241
|
{
|
|
242
242
|
item: a,
|
|
243
243
|
editMode: n,
|
|
@@ -248,7 +248,7 @@ const fe = ({ data: t, fullView: l }) => {
|
|
|
248
248
|
}
|
|
249
249
|
) })
|
|
250
250
|
] });
|
|
251
|
-
},
|
|
251
|
+
}, Er = ({
|
|
252
252
|
item: t,
|
|
253
253
|
onAddBinding: l,
|
|
254
254
|
onRemove: r,
|
|
@@ -270,11 +270,11 @@ const fe = ({ data: t, fullView: l }) => {
|
|
|
270
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(
|
|
273
|
+
/* @__PURE__ */ e.jsx(ve, { 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(lt, { editMode: !0, onAddBinding: l, appliedBindings: a, item: t, children: /* @__PURE__ */ e.jsx(
|
|
275
|
+
/* @__PURE__ */ e.jsx(lt, { editMode: !0, onAddBinding: l, appliedBindings: a, item: t, children: /* @__PURE__ */ e.jsx(Sr, { 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
|
+
Vr,
|
|
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] = rt(), n =
|
|
286
|
+
}, _r = ({ bindingData: t, onChange: l }) => {
|
|
287
|
+
const r = G(), [s] = rt(), n = Hr(), [a, d] = w(
|
|
288
288
|
C(t, (c, m) => ({ key: m, value: c }))
|
|
289
289
|
);
|
|
290
290
|
_(() => {
|
|
@@ -295,13 +295,13 @@ const fe = ({ data: t, fullView: l }) => {
|
|
|
295
295
|
return !0;
|
|
296
296
|
if (b(a))
|
|
297
297
|
return !1;
|
|
298
|
-
const c =
|
|
298
|
+
const c = be(a);
|
|
299
299
|
return b(c == null ? void 0 : c.key) || b(c == null ? void 0 : c.value);
|
|
300
300
|
}, [s, a]), o = (c) => {
|
|
301
|
-
const m =
|
|
301
|
+
const m = fe(a, (h) => h.key !== c.key);
|
|
302
302
|
d([...m, c]), x([...m, c]);
|
|
303
303
|
}, u = (c) => {
|
|
304
|
-
const m =
|
|
304
|
+
const m = fe(a, (h, g) => c !== g);
|
|
305
305
|
x([...m]);
|
|
306
306
|
}, x = A(
|
|
307
307
|
(c = []) => {
|
|
@@ -310,8 +310,8 @@ const fe = ({ data: t, fullView: l }) => {
|
|
|
310
310
|
return;
|
|
311
311
|
}
|
|
312
312
|
const m = {};
|
|
313
|
-
|
|
314
|
-
!b(h == null ? void 0 : h.key) && !b(h == null ? void 0 : h.value) &&
|
|
313
|
+
we(c, (h) => {
|
|
314
|
+
!b(h == null ? void 0 : h.key) && !b(h == null ? void 0 : h.value) && Ee(m, h.key, h.value);
|
|
315
315
|
}), l(m);
|
|
316
316
|
},
|
|
317
317
|
[l]
|
|
@@ -322,7 +322,7 @@ const fe = ({ data: t, fullView: l }) => {
|
|
|
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
|
+
Er,
|
|
326
326
|
{
|
|
327
327
|
item: c,
|
|
328
328
|
onAddBinding: o,
|
|
@@ -352,38 +352,38 @@ const fe = ({ data: t, fullView: l }) => {
|
|
|
352
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" })
|
|
353
353
|
] })
|
|
354
354
|
] });
|
|
355
|
-
},
|
|
355
|
+
}, Fr = () => /* @__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" }), Ie = dt(
|
|
356
356
|
({
|
|
357
357
|
createHistorySnapshot: t,
|
|
358
358
|
properties: l,
|
|
359
359
|
formData: r,
|
|
360
360
|
onChange: s
|
|
361
361
|
}) => {
|
|
362
|
-
const [n] =
|
|
362
|
+
const [n] = sr(), a = { type: "object", properties: {} }, d = {};
|
|
363
363
|
return Object.keys(l).forEach((i) => {
|
|
364
364
|
const o = l[i];
|
|
365
365
|
if (M(["slot", "styles"], o.type))
|
|
366
366
|
return;
|
|
367
367
|
const u = p(o, "i18n", !1) ? `${i}-${n}` : i;
|
|
368
|
-
a.properties[u] =
|
|
368
|
+
a.properties[u] = or(o, n), d[u] = nr(o, n);
|
|
369
369
|
}), /* @__PURE__ */ e.jsx(
|
|
370
|
-
|
|
370
|
+
kr,
|
|
371
371
|
{
|
|
372
372
|
widgets: {
|
|
373
|
-
binding:
|
|
374
|
-
richtext:
|
|
375
|
-
icon:
|
|
376
|
-
image:
|
|
373
|
+
binding: Fr,
|
|
374
|
+
richtext: ar,
|
|
375
|
+
icon: ir,
|
|
376
|
+
image: dr
|
|
377
377
|
},
|
|
378
378
|
fields: {
|
|
379
|
-
link:
|
|
379
|
+
link: cr
|
|
380
380
|
},
|
|
381
381
|
idSeparator: ".",
|
|
382
382
|
autoComplete: "off",
|
|
383
383
|
omitExtraData: !1,
|
|
384
384
|
liveOmit: !1,
|
|
385
385
|
liveValidate: !0,
|
|
386
|
-
validator:
|
|
386
|
+
validator: Nr,
|
|
387
387
|
uiSchema: d,
|
|
388
388
|
onBlur: t,
|
|
389
389
|
schema: a,
|
|
@@ -393,14 +393,14 @@ const fe = ({ data: t, fullView: l }) => {
|
|
|
393
393
|
);
|
|
394
394
|
}
|
|
395
395
|
);
|
|
396
|
-
function
|
|
396
|
+
function Yr() {
|
|
397
397
|
const t = G(), { createSnapshot: l } = ze(), r = Ue(), s = et(t._type), n = { ...t }, a = () => l(), d = ({ formData: x }, c) => {
|
|
398
398
|
if (c) {
|
|
399
399
|
const m = c.replace("root.", "");
|
|
400
400
|
r([t._id], { [m]: p(x, m) });
|
|
401
401
|
}
|
|
402
402
|
}, i = {
|
|
403
|
-
_name:
|
|
403
|
+
_name: Tr({
|
|
404
404
|
title: "Name",
|
|
405
405
|
default: p(t, "_name", t._type)
|
|
406
406
|
})
|
|
@@ -412,7 +412,7 @@ function _r() {
|
|
|
412
412
|
}, [s, o]);
|
|
413
413
|
return /* @__PURE__ */ e.jsxs("div", { className: "overflow-x-hidden", children: [
|
|
414
414
|
/* @__PURE__ */ e.jsx(
|
|
415
|
-
|
|
415
|
+
Ie,
|
|
416
416
|
{
|
|
417
417
|
onChange: d,
|
|
418
418
|
createHistorySnapshot: a,
|
|
@@ -433,7 +433,7 @@ function _r() {
|
|
|
433
433
|
"Data Binding"
|
|
434
434
|
] }) }),
|
|
435
435
|
/* @__PURE__ */ e.jsx(ce, { className: "pt-4 px-4", children: /* @__PURE__ */ e.jsx(
|
|
436
|
-
|
|
436
|
+
_r,
|
|
437
437
|
{
|
|
438
438
|
bindingData: p(n, "_bindings", {}),
|
|
439
439
|
onChange: (x) => {
|
|
@@ -456,7 +456,7 @@ function _r() {
|
|
|
456
456
|
". Remove data binding to edit static content."
|
|
457
457
|
] }),
|
|
458
458
|
/* @__PURE__ */ e.jsx(
|
|
459
|
-
|
|
459
|
+
Ie,
|
|
460
460
|
{
|
|
461
461
|
onChange: d,
|
|
462
462
|
createHistorySnapshot: a,
|
|
@@ -470,28 +470,28 @@ function _r() {
|
|
|
470
470
|
/* @__PURE__ */ e.jsx("div", { className: "pb-60" })
|
|
471
471
|
] });
|
|
472
472
|
}
|
|
473
|
-
const
|
|
473
|
+
const Pe = new Dr(Ir, {
|
|
474
474
|
isCaseSensitive: !1,
|
|
475
475
|
threshold: 0.2,
|
|
476
476
|
minMatchCharLength: 2,
|
|
477
477
|
keys: ["name"]
|
|
478
478
|
});
|
|
479
|
-
function
|
|
479
|
+
function Wr() {
|
|
480
480
|
var D;
|
|
481
|
-
const [t] = Ne(), l = G(), r = Ke(), s = qe(), [n] = Je(), [a, d] = w(""), i = (D =
|
|
481
|
+
const [t] = Ne(), l = G(), r = Ke(), s = qe(), [n] = Je(), [a, d] = w(""), i = (D = pe(t)) == null ? void 0 : D.prop, o = bt((p(l, i, "").replace($r, "").split(",").pop() || "").split(" "), b), u = () => {
|
|
482
482
|
const j = a.trim().toLowerCase().replace(/ +(?= )/g, "").split(" ");
|
|
483
483
|
r(n, j, !0), d("");
|
|
484
484
|
}, [x, c] = w([]), m = ({ value: j }) => {
|
|
485
|
-
const L = j.trim().toLowerCase(),
|
|
485
|
+
const L = j.trim().toLowerCase(), P = L.match(/.+:/g);
|
|
486
486
|
let k = [];
|
|
487
|
-
if (
|
|
488
|
-
const [
|
|
489
|
-
k =
|
|
487
|
+
if (P && P.length > 0) {
|
|
488
|
+
const [$] = P, F = L.replace($, "");
|
|
489
|
+
k = Pe.search(F).map((y) => ({
|
|
490
490
|
...y,
|
|
491
|
-
item: { ...y.item, name:
|
|
491
|
+
item: { ...y.item, name: $ + y.item.name }
|
|
492
492
|
}));
|
|
493
493
|
} else
|
|
494
|
-
k =
|
|
494
|
+
k = Pe.search(L);
|
|
495
495
|
c(C(k, "item"));
|
|
496
496
|
}, h = () => {
|
|
497
497
|
c([]);
|
|
@@ -516,7 +516,7 @@ function Fr() {
|
|
|
516
516
|
/* @__PURE__ */ e.jsx(Te, { className: "mt-2", children: "Add Tailwind classes" }),
|
|
517
517
|
/* @__PURE__ */ e.jsxs("div", { className: "relative -mt-4 flex items-center gap-x-3", children: [
|
|
518
518
|
/* @__PURE__ */ e.jsx("div", { className: "relative flex w-full items-center gap-x-3", children: /* @__PURE__ */ e.jsx(
|
|
519
|
-
|
|
519
|
+
Ar,
|
|
520
520
|
{
|
|
521
521
|
suggestions: x,
|
|
522
522
|
onSuggestionsFetchRequested: m,
|
|
@@ -535,7 +535,7 @@ function Fr() {
|
|
|
535
535
|
}
|
|
536
536
|
) }),
|
|
537
537
|
/* @__PURE__ */ e.jsx(
|
|
538
|
-
|
|
538
|
+
ue,
|
|
539
539
|
{
|
|
540
540
|
variant: "outline",
|
|
541
541
|
className: "h-6 border-gray-700",
|
|
@@ -556,7 +556,7 @@ function Fr() {
|
|
|
556
556
|
children: [
|
|
557
557
|
j,
|
|
558
558
|
/* @__PURE__ */ e.jsx(
|
|
559
|
-
|
|
559
|
+
We,
|
|
560
560
|
{
|
|
561
561
|
onClick: () => s(n, [j]),
|
|
562
562
|
className: "invisible absolute right-1 hover:text-white group-hover:visible group-hover:cursor-pointer"
|
|
@@ -572,7 +572,7 @@ function Fr() {
|
|
|
572
572
|
}
|
|
573
573
|
);
|
|
574
574
|
}
|
|
575
|
-
const B = ["px", "%", "em", "rem", "ch", "vh", "vw"],
|
|
575
|
+
const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Xr = {
|
|
576
576
|
heading: "Flex Child",
|
|
577
577
|
items: [
|
|
578
578
|
{ type: "arbitrary", label: "Basis", units: B, property: "flexBasis" },
|
|
@@ -581,7 +581,7 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Yr = {
|
|
|
581
581
|
{ type: "dropdown", label: "Grow", property: "flexGrow" },
|
|
582
582
|
{ type: "dropdown", label: "Shrink", property: "flexShrink" }
|
|
583
583
|
]
|
|
584
|
-
},
|
|
584
|
+
}, Zr = {
|
|
585
585
|
heading: "Grid Child",
|
|
586
586
|
items: [
|
|
587
587
|
{ type: "range", label: "Col Span", property: "gridColSpan" },
|
|
@@ -592,70 +592,12 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Yr = {
|
|
|
592
592
|
{ type: "range", label: "Row End", property: "gridRowEnd" },
|
|
593
593
|
{ type: "range", label: "Order", property: "order" }
|
|
594
594
|
]
|
|
595
|
-
},
|
|
596
|
-
{
|
|
597
|
-
heading: "Display",
|
|
598
|
-
items: [
|
|
599
|
-
{ type: "dropdown", label: "Display", property: "display", units: B },
|
|
600
|
-
{
|
|
601
|
-
styleType: "accordion",
|
|
602
|
-
heading: "Flex options",
|
|
603
|
-
items: [
|
|
604
|
-
{ type: "dropdown", label: "Direction", property: "flexDirection" },
|
|
605
|
-
{ type: "dropdown", label: "Wrap", property: "flexWrap" },
|
|
606
|
-
{ type: "dropdown", label: "Justify", property: "justifyContent" },
|
|
607
|
-
{ type: "dropdown", label: "Content", property: "alignContent" },
|
|
608
|
-
{ type: "dropdown", label: "Items", property: "alignItems" },
|
|
609
|
-
{
|
|
610
|
-
styleType: "multiple",
|
|
611
|
-
label: "Gap",
|
|
612
|
-
options: [
|
|
613
|
-
{ key: "gap", label: "All" },
|
|
614
|
-
{ key: "gapX", label: "Left-Right" },
|
|
615
|
-
{ key: "gapY", label: "Top-Bottom" }
|
|
616
|
-
]
|
|
617
|
-
}
|
|
618
|
-
],
|
|
619
|
-
conditions: { display: "flex" }
|
|
620
|
-
},
|
|
621
|
-
{
|
|
622
|
-
styleType: "accordion",
|
|
623
|
-
heading: "Grid options",
|
|
624
|
-
items: [
|
|
625
|
-
{ type: "range", label: "Columns", property: "gridColumns" },
|
|
626
|
-
{ type: "range", label: "Rows", property: "gridRows" },
|
|
627
|
-
{ type: "dropdown", label: "Auto Flow", property: "gridAutoFlow" },
|
|
628
|
-
{ type: "dropdown", label: "Auto Cols", property: "gridAutoColumns" },
|
|
629
|
-
{ type: "dropdown", label: "Auto Rows", property: "gridAutoRows" },
|
|
630
|
-
{ type: "dropdown", label: "Justify", property: "justifyContent" },
|
|
631
|
-
{ type: "dropdown", label: "Content", property: "alignContent" },
|
|
632
|
-
{ type: "dropdown", label: "Items", property: "alignItems" },
|
|
633
|
-
{
|
|
634
|
-
styleType: "multiple",
|
|
635
|
-
label: "Gap",
|
|
636
|
-
units: ["px", "rem"],
|
|
637
|
-
options: [
|
|
638
|
-
{ key: "gap", label: "All" },
|
|
639
|
-
{ key: "gapX", label: "Left-Right" },
|
|
640
|
-
{ key: "gapY", label: "Top-Bottom" }
|
|
641
|
-
]
|
|
642
|
-
}
|
|
643
|
-
],
|
|
644
|
-
conditions: { display: "grid" }
|
|
645
|
-
},
|
|
646
|
-
{
|
|
647
|
-
styleType: "accordion",
|
|
648
|
-
heading: "Visibility & Opacity",
|
|
649
|
-
items: [
|
|
650
|
-
{ type: "dropdown", label: "Visibility", property: "visibility", units: B },
|
|
651
|
-
{ type: "arbitrary", label: "Opacity", property: "opacity", units: ["-"] }
|
|
652
|
-
]
|
|
653
|
-
}
|
|
654
|
-
]
|
|
655
|
-
},
|
|
595
|
+
}, zr = [
|
|
656
596
|
{
|
|
657
|
-
heading: "
|
|
597
|
+
heading: "Layout",
|
|
658
598
|
items: [
|
|
599
|
+
{ type: "arbitrary", label: "Width", units: B.concat("auto"), property: "width" },
|
|
600
|
+
{ type: "arbitrary", label: "Height", units: B.concat("auto"), property: "height" },
|
|
659
601
|
{
|
|
660
602
|
styleType: "multiple",
|
|
661
603
|
label: "Margin",
|
|
@@ -686,7 +628,7 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Yr = {
|
|
|
686
628
|
},
|
|
687
629
|
{
|
|
688
630
|
styleType: "multiple",
|
|
689
|
-
label: "Space
|
|
631
|
+
label: "Space Bt.",
|
|
690
632
|
options: [
|
|
691
633
|
{ key: "spaceX", label: "Left-Right" },
|
|
692
634
|
{ key: "spaceY", label: "Top-Bottom" }
|
|
@@ -697,8 +639,6 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Yr = {
|
|
|
697
639
|
{
|
|
698
640
|
heading: "Size",
|
|
699
641
|
items: [
|
|
700
|
-
{ type: "arbitrary", label: "Width", units: B.concat("auto"), property: "width" },
|
|
701
|
-
{ type: "arbitrary", label: "Height", units: B.concat("auto"), property: "height" },
|
|
702
642
|
{
|
|
703
643
|
styleType: "accordion",
|
|
704
644
|
heading: "Min width & height",
|
|
@@ -726,6 +666,66 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Yr = {
|
|
|
726
666
|
}
|
|
727
667
|
]
|
|
728
668
|
},
|
|
669
|
+
{
|
|
670
|
+
heading: "Display",
|
|
671
|
+
items: [
|
|
672
|
+
{ type: "dropdown", label: "Display", property: "display", units: B },
|
|
673
|
+
{
|
|
674
|
+
styleType: "accordion",
|
|
675
|
+
heading: "Flex options",
|
|
676
|
+
items: [
|
|
677
|
+
{ type: "dropdown", label: "Direction", property: "flexDirection" },
|
|
678
|
+
{ type: "dropdown", label: "Wrap", property: "flexWrap" },
|
|
679
|
+
{ type: "dropdown", label: "Justify", property: "justifyContent" },
|
|
680
|
+
{ type: "dropdown", label: "Content", property: "alignContent" },
|
|
681
|
+
{ type: "dropdown", label: "Items", property: "alignItems" },
|
|
682
|
+
{
|
|
683
|
+
styleType: "multiple",
|
|
684
|
+
label: "Gap",
|
|
685
|
+
options: [
|
|
686
|
+
{ key: "gap", label: "All" },
|
|
687
|
+
{ key: "gapX", label: "Left-Right" },
|
|
688
|
+
{ key: "gapY", label: "Top-Bottom" }
|
|
689
|
+
]
|
|
690
|
+
}
|
|
691
|
+
],
|
|
692
|
+
conditions: { display: "flex" }
|
|
693
|
+
},
|
|
694
|
+
{
|
|
695
|
+
styleType: "accordion",
|
|
696
|
+
heading: "Grid options",
|
|
697
|
+
items: [
|
|
698
|
+
{ type: "range", label: "Columns", property: "gridColumns" },
|
|
699
|
+
{ type: "range", label: "Rows", property: "gridRows" },
|
|
700
|
+
{ type: "dropdown", label: "Auto Flow", property: "gridAutoFlow" },
|
|
701
|
+
{ type: "dropdown", label: "Auto Cols", property: "gridAutoColumns" },
|
|
702
|
+
{ type: "dropdown", label: "Auto Rows", property: "gridAutoRows" },
|
|
703
|
+
{ type: "dropdown", label: "Justify", property: "justifyContent" },
|
|
704
|
+
{ type: "dropdown", label: "Content", property: "alignContent" },
|
|
705
|
+
{ type: "dropdown", label: "Items", property: "alignItems" },
|
|
706
|
+
{
|
|
707
|
+
styleType: "multiple",
|
|
708
|
+
label: "Gap",
|
|
709
|
+
units: ["px", "rem"],
|
|
710
|
+
options: [
|
|
711
|
+
{ key: "gap", label: "All" },
|
|
712
|
+
{ key: "gapX", label: "Left-Right" },
|
|
713
|
+
{ key: "gapY", label: "Top-Bottom" }
|
|
714
|
+
]
|
|
715
|
+
}
|
|
716
|
+
],
|
|
717
|
+
conditions: { display: "grid" }
|
|
718
|
+
},
|
|
719
|
+
{
|
|
720
|
+
styleType: "accordion",
|
|
721
|
+
heading: "Visibility & Opacity",
|
|
722
|
+
items: [
|
|
723
|
+
{ type: "dropdown", label: "Visibility", property: "visibility", units: B },
|
|
724
|
+
{ type: "arbitrary", label: "Opacity", property: "opacity", units: ["-"] }
|
|
725
|
+
]
|
|
726
|
+
}
|
|
727
|
+
]
|
|
728
|
+
},
|
|
729
729
|
{
|
|
730
730
|
heading: "Position",
|
|
731
731
|
items: [
|
|
@@ -994,7 +994,7 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Yr = {
|
|
|
994
994
|
},
|
|
995
995
|
{
|
|
996
996
|
heading: "Classes",
|
|
997
|
-
items: [{ component:
|
|
997
|
+
items: [{ component: Wr }]
|
|
998
998
|
}
|
|
999
999
|
], st = {
|
|
1000
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" }) }),
|
|
@@ -1004,32 +1004,32 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Yr = {
|
|
|
1004
1004
|
// display
|
|
1005
1005
|
hidden: Ve,
|
|
1006
1006
|
gap: O,
|
|
1007
|
-
gapX:
|
|
1007
|
+
gapX: S,
|
|
1008
1008
|
gapY: V,
|
|
1009
|
-
spaceX:
|
|
1009
|
+
spaceX: S,
|
|
1010
1010
|
spaceY: V,
|
|
1011
1011
|
overscroll: O,
|
|
1012
|
-
overscrollX:
|
|
1012
|
+
overscrollX: S,
|
|
1013
1013
|
overscrollY: V,
|
|
1014
1014
|
overflow: O,
|
|
1015
|
-
overflowX:
|
|
1015
|
+
overflowX: S,
|
|
1016
1016
|
overflowY: V,
|
|
1017
1017
|
top: q,
|
|
1018
1018
|
right: J,
|
|
1019
1019
|
bottom: Q,
|
|
1020
1020
|
left: ee,
|
|
1021
1021
|
inset: O,
|
|
1022
|
-
insetX:
|
|
1022
|
+
insetX: S,
|
|
1023
1023
|
insetY: V,
|
|
1024
1024
|
border: O,
|
|
1025
|
-
borderX:
|
|
1025
|
+
borderX: S,
|
|
1026
1026
|
borderY: V,
|
|
1027
1027
|
borderTop: q,
|
|
1028
1028
|
borderRight: J,
|
|
1029
1029
|
borderBottom: Q,
|
|
1030
1030
|
borderLeft: ee,
|
|
1031
1031
|
borderRadius: O,
|
|
1032
|
-
borderRadiusX:
|
|
1032
|
+
borderRadiusX: S,
|
|
1033
1033
|
borderRadiusY: V,
|
|
1034
1034
|
borderRadiusTop: q,
|
|
1035
1035
|
borderRadiusRight: J,
|
|
@@ -1038,19 +1038,19 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Yr = {
|
|
|
1038
1038
|
borderRadiusTopLeft: kt,
|
|
1039
1039
|
borderRadiusTopRight: Nt,
|
|
1040
1040
|
borderRadiusBottomRight: Tt,
|
|
1041
|
-
borderRadiusBottomLeft:
|
|
1042
|
-
divideXWidth:
|
|
1041
|
+
borderRadiusBottomLeft: Rt,
|
|
1042
|
+
divideXWidth: S,
|
|
1043
1043
|
divideYWidth: V,
|
|
1044
1044
|
scale: O,
|
|
1045
|
-
scaleX:
|
|
1045
|
+
scaleX: S,
|
|
1046
1046
|
scaleY: V,
|
|
1047
|
-
skewX:
|
|
1047
|
+
skewX: S,
|
|
1048
1048
|
skewY: V,
|
|
1049
|
-
translateX:
|
|
1049
|
+
translateX: S,
|
|
1050
1050
|
translateY: V,
|
|
1051
1051
|
// padding
|
|
1052
1052
|
padding: O,
|
|
1053
|
-
paddingX:
|
|
1053
|
+
paddingX: S,
|
|
1054
1054
|
paddingY: V,
|
|
1055
1055
|
paddingTop: q,
|
|
1056
1056
|
paddingRight: J,
|
|
@@ -1058,14 +1058,14 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Yr = {
|
|
|
1058
1058
|
paddingLeft: ee,
|
|
1059
1059
|
// margin
|
|
1060
1060
|
margin: O,
|
|
1061
|
-
marginX:
|
|
1061
|
+
marginX: S,
|
|
1062
1062
|
marginY: V,
|
|
1063
1063
|
marginTop: q,
|
|
1064
1064
|
marginRight: J,
|
|
1065
1065
|
marginBottom: Q,
|
|
1066
1066
|
marginLeft: ee,
|
|
1067
1067
|
// text-align
|
|
1068
|
-
textLeft:
|
|
1068
|
+
textLeft: St,
|
|
1069
1069
|
textCenter: Vt,
|
|
1070
1070
|
textRight: Ht,
|
|
1071
1071
|
textJustify: Bt,
|
|
@@ -1074,9 +1074,9 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Yr = {
|
|
|
1074
1074
|
// "not-italic": "",
|
|
1075
1075
|
// decoration
|
|
1076
1076
|
underline: Dt,
|
|
1077
|
-
overline:
|
|
1077
|
+
overline: It,
|
|
1078
1078
|
// transform
|
|
1079
|
-
uppercase:
|
|
1079
|
+
uppercase: Pt,
|
|
1080
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: [
|
|
1081
1081
|
/* @__PURE__ */ e.jsx(
|
|
1082
1082
|
"path",
|
|
@@ -1117,7 +1117,7 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Yr = {
|
|
|
1117
1117
|
}
|
|
1118
1118
|
)
|
|
1119
1119
|
] }),
|
|
1120
|
-
"float-none":
|
|
1120
|
+
"float-none": We,
|
|
1121
1121
|
// position
|
|
1122
1122
|
fixed: () => /* @__PURE__ */ e.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1123
1123
|
/* @__PURE__ */ e.jsx(
|
|
@@ -1189,20 +1189,20 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Yr = {
|
|
|
1189
1189
|
}
|
|
1190
1190
|
)
|
|
1191
1191
|
] }),
|
|
1192
|
-
static:
|
|
1193
|
-
}, le =
|
|
1192
|
+
static: $t
|
|
1193
|
+
}, le = Me({ canReset: !1, canChange: !0 }), Ur = ({ children: t, canReset: l = !1, canChange: r = !0 }) => (
|
|
1194
1194
|
// eslint-disable-next-line react/jsx-no-constructed-context-values
|
|
1195
1195
|
/* @__PURE__ */ e.jsx(le.Provider, { value: { canReset: l, canChange: r }, children: t })
|
|
1196
1196
|
), ot = ({ label: t, property: l, onChange: r }) => {
|
|
1197
|
-
const s = N(() => p(
|
|
1197
|
+
const s = N(() => p(ge, `${l}.classes`, [""]), [l]), n = se(l), a = N(() => p(n, "cls", ""), [n]), { canChange: d } = re(le), i = /\[.*\]/g.test(a);
|
|
1198
1198
|
return /* @__PURE__ */ e.jsx("div", { className: t ? "w-full rounded " : "grow", children: i ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
|
|
1199
|
-
/* @__PURE__ */ e.jsx(
|
|
1199
|
+
/* @__PURE__ */ e.jsx(pr, { className: "w-[70%] rounded py-1", readOnly: !0, value: a }),
|
|
1200
1200
|
/* @__PURE__ */ e.jsxs(W, { delayDuration: 100, children: [
|
|
1201
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, {}) }) }),
|
|
1202
1202
|
/* @__PURE__ */ e.jsx(Z, { children: "Current value is using a Tailwind arbitrary value." })
|
|
1203
1203
|
] })
|
|
1204
1204
|
] }) : /* @__PURE__ */ e.jsx(
|
|
1205
|
-
|
|
1205
|
+
je,
|
|
1206
1206
|
{
|
|
1207
1207
|
rounded: t,
|
|
1208
1208
|
onChange: (o) => r(o, l),
|
|
@@ -1212,7 +1212,7 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Yr = {
|
|
|
1212
1212
|
}
|
|
1213
1213
|
) });
|
|
1214
1214
|
};
|
|
1215
|
-
function
|
|
1215
|
+
function je({ selected: t, onChange: l, rounded: r = !1, options: s, disabled: n = !1 }) {
|
|
1216
1216
|
const a = t.replace(/.*:/g, "").trim(), { undo: d, redo: i } = ze();
|
|
1217
1217
|
return /* @__PURE__ */ e.jsxs(
|
|
1218
1218
|
"select",
|
|
@@ -1226,15 +1226,15 @@ function ve({ selected: t, onChange: l, rounded: r = !1, options: s, disabled: n
|
|
|
1226
1226
|
value: a,
|
|
1227
1227
|
children: [
|
|
1228
1228
|
/* @__PURE__ */ e.jsx("option", { className: "bg-transparent", value: "" }),
|
|
1229
|
-
|
|
1229
|
+
I.Children.toArray(
|
|
1230
1230
|
s.map((o) => /* @__PURE__ */ e.jsx("option", { className: "bg-transparent", value: o, children: o }))
|
|
1231
1231
|
)
|
|
1232
1232
|
]
|
|
1233
1233
|
}
|
|
1234
1234
|
);
|
|
1235
1235
|
}
|
|
1236
|
-
const
|
|
1237
|
-
const { canReset: r, canChange: s } = re(le), n = se(t), a = N(() => p(n, "cls", ""), [n]), d = N(() => p(
|
|
1236
|
+
const Gr = ({ property: t, onChange: l }) => {
|
|
1237
|
+
const { canReset: r, canChange: s } = re(le), n = se(t), a = N(() => p(n, "cls", ""), [n]), d = N(() => p(ge, `${t}.classes`, [""]), [t]), i = d.indexOf(a) > -1 ? d.indexOf(a) : 0, o = /\[.*\]/g.test(a);
|
|
1238
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: [
|
|
1239
1239
|
/* @__PURE__ */ e.jsx(
|
|
1240
1240
|
"button",
|
|
@@ -1242,8 +1242,13 @@ const zr = ({ property: t, onChange: l }) => {
|
|
|
1242
1242
|
type: "button",
|
|
1243
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",
|
|
1244
1244
|
disabled: !s && (!r || i - 1 < 0),
|
|
1245
|
-
onClick: () => l(
|
|
1246
|
-
children: /* @__PURE__ */ e.jsx("span", { className: "flex items-center justify-center", children: /* @__PURE__ */ e.jsx(
|
|
1245
|
+
onClick: () => l(Se(d, i - 1), t),
|
|
1246
|
+
children: /* @__PURE__ */ e.jsx("span", { className: "flex items-center justify-center", children: /* @__PURE__ */ e.jsx(
|
|
1247
|
+
Lt,
|
|
1248
|
+
{
|
|
1249
|
+
className: !s && (!r || i - 1 < 0) ? "text-gray-500" : "text-black/60 dark:text-white/60"
|
|
1250
|
+
}
|
|
1251
|
+
) })
|
|
1247
1252
|
}
|
|
1248
1253
|
),
|
|
1249
1254
|
/* @__PURE__ */ e.jsx("div", { className: "w-8/12 text-center", children: /* @__PURE__ */ e.jsx(ot, { label: !1, property: t, onChange: l }) }),
|
|
@@ -1253,18 +1258,18 @@ const zr = ({ property: t, onChange: l }) => {
|
|
|
1253
1258
|
type: "button",
|
|
1254
1259
|
className: "w-2/12 rounded-tr rounded-br bg-background px-1 text-center hover:bg-bg-gray-700 disabled:cursor-not-allowed disabled:bg-gray-600",
|
|
1255
1260
|
disabled: !s && (!r || i + 1 >= d.length),
|
|
1256
|
-
onClick: () => l(
|
|
1261
|
+
onClick: () => l(Se(d, i + 1), t),
|
|
1257
1262
|
children: /* @__PURE__ */ e.jsx("span", { className: "flex items-center justify-center", children: /* @__PURE__ */ e.jsx(
|
|
1258
1263
|
Ce,
|
|
1259
1264
|
{
|
|
1260
|
-
className: !s && (!r || i + 1 >= d.length) ? "text-gray-500" : "text-white/60"
|
|
1265
|
+
className: !s && (!r || i + 1 >= d.length) ? "text-gray-500" : "text-black/60 dark:text-white/60"
|
|
1261
1266
|
}
|
|
1262
1267
|
) })
|
|
1263
1268
|
}
|
|
1264
1269
|
)
|
|
1265
1270
|
] }) });
|
|
1266
|
-
},
|
|
1267
|
-
const r = N(() => p(
|
|
1271
|
+
}, Kr = ({ property: t, onChange: l }) => {
|
|
1272
|
+
const r = N(() => p(ge, `${t}.classes`, [""]), [t]), { canChange: s } = re(le), n = se(t), a = N(() => p(n, "cls", ""), [n]);
|
|
1268
1273
|
return /* @__PURE__ */ e.jsx("div", { className: "flex grow flex-wrap gap-1", children: C(r, (d) => /* @__PURE__ */ e.jsxs(W, { children: [
|
|
1269
1274
|
/* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
1270
1275
|
"button",
|
|
@@ -1273,12 +1278,12 @@ const zr = ({ property: t, onChange: l }) => {
|
|
|
1273
1278
|
disabled: !s,
|
|
1274
1279
|
onClick: () => l(d, t),
|
|
1275
1280
|
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"}`,
|
|
1276
|
-
children:
|
|
1281
|
+
children: I.createElement(p(st, d, Xe))
|
|
1277
1282
|
}
|
|
1278
1283
|
) }),
|
|
1279
1284
|
/* @__PURE__ */ e.jsx(Z, { children: Y(te(d)) })
|
|
1280
1285
|
] })) });
|
|
1281
|
-
},
|
|
1286
|
+
}, qr = {
|
|
1282
1287
|
backgroundColor: "bg",
|
|
1283
1288
|
textColor: "text",
|
|
1284
1289
|
borderColor: "border",
|
|
@@ -1290,7 +1295,7 @@ const zr = ({ property: t, onChange: l }) => {
|
|
|
1290
1295
|
toColor: "to",
|
|
1291
1296
|
ringColor: "ring",
|
|
1292
1297
|
ringOffsetColor: "ring-offset"
|
|
1293
|
-
},
|
|
1298
|
+
}, Jr = ({ property: t, onChange: l }) => {
|
|
1294
1299
|
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(
|
|
1295
1300
|
// eslint-disable-next-line no-shadow
|
|
1296
1301
|
(g) => {
|
|
@@ -1313,11 +1318,11 @@ const zr = ({ property: t, onChange: l }) => {
|
|
|
1313
1318
|
return _(() => {
|
|
1314
1319
|
o({ color: "", shade: "" });
|
|
1315
1320
|
}, [r]), _(() => {
|
|
1316
|
-
const f = `${p(
|
|
1317
|
-
f.match(new RegExp(p(
|
|
1321
|
+
const f = `${p(qr, t, "")}-${i.color}${i.shade ? `-${i.shade}` : ""}`;
|
|
1322
|
+
f.match(new RegExp(p(ge, `${t}.regExp`, ""))) && l(f, t);
|
|
1318
1323
|
}, [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: [
|
|
1319
1324
|
/* @__PURE__ */ e.jsx("div", { className: "grow text-center", children: /* @__PURE__ */ e.jsx(
|
|
1320
|
-
|
|
1325
|
+
je,
|
|
1321
1326
|
{
|
|
1322
1327
|
disabled: !n,
|
|
1323
1328
|
rounded: !0,
|
|
@@ -1355,9 +1360,9 @@ const zr = ({ property: t, onChange: l }) => {
|
|
|
1355
1360
|
]
|
|
1356
1361
|
}
|
|
1357
1362
|
) }),
|
|
1358
|
-
/* @__PURE__ */ e.jsx("button", { type: "button", className: "grow text-center", children: /* @__PURE__ */ e.jsx(
|
|
1363
|
+
/* @__PURE__ */ e.jsx("button", { type: "button", className: "grow text-center", children: /* @__PURE__ */ e.jsx(je, { rounded: !0, selected: c, disabled: !x || !n, onChange: h, options: a }) })
|
|
1359
1364
|
] });
|
|
1360
|
-
},
|
|
1365
|
+
}, $e = (t, l) => {
|
|
1361
1366
|
t = t.toLowerCase();
|
|
1362
1367
|
let r = t.trim().replace(/ |\+/g, "");
|
|
1363
1368
|
if ((r === "auto" || r === "none") && l.includes(r))
|
|
@@ -1367,7 +1372,7 @@ const zr = ({ property: t, onChange: l }) => {
|
|
|
1367
1372
|
const n = t.match(s), a = n && n.length > 1, d = !b(r) && Number.isNaN(Number(r));
|
|
1368
1373
|
return a || d ? { error: "Invalid value" } : n && (n[0] === "auto" || n[0] === "none") ? { value: n[0], unit: "" } : { value: r, unit: n ? n[0] : "" };
|
|
1369
1374
|
};
|
|
1370
|
-
const
|
|
1375
|
+
const Qr = (t) => {
|
|
1371
1376
|
const l = t.startsWith("-") ? "-" : "", r = t.split("-").pop();
|
|
1372
1377
|
if (["auto", "none"].includes(r))
|
|
1373
1378
|
return { value: "", unit: r };
|
|
@@ -1496,18 +1501,18 @@ const qr = (t) => {
|
|
|
1496
1501
|
}
|
|
1497
1502
|
return ft(parseFloat(r)) ? { value: `${l + parseFloat(r) * 4}`, unit: "px" } : { value: r, unit: "class" };
|
|
1498
1503
|
};
|
|
1499
|
-
const
|
|
1504
|
+
const el = (t) => {
|
|
1500
1505
|
if (b(t))
|
|
1501
1506
|
return { value: "", unit: "" };
|
|
1502
1507
|
const l = t.match(/\[.*\]/g);
|
|
1503
1508
|
if (l === null)
|
|
1504
|
-
return
|
|
1505
|
-
const r = p(l, "0", "").replace(/\[|\]/g, ""), s = t.startsWith("-") ? "-" : "", n =
|
|
1509
|
+
return tl(t);
|
|
1510
|
+
const r = p(l, "0", "").replace(/\[|\]/g, ""), s = t.startsWith("-") ? "-" : "", n = pe(r.match(/\d+.\d+|\d+/g));
|
|
1506
1511
|
return { value: `${s}${n}`, unit: r.replace(n, "") };
|
|
1507
|
-
},
|
|
1512
|
+
}, tl = (t) => b(t) ? { value: "", unit: "" } : Qr(t), nt = I.createContext({
|
|
1508
1513
|
setDragData: () => {
|
|
1509
1514
|
}
|
|
1510
|
-
}),
|
|
1515
|
+
}), rl = ({
|
|
1511
1516
|
unit: t,
|
|
1512
1517
|
currentValue: l,
|
|
1513
1518
|
onDrag: r,
|
|
@@ -1539,8 +1544,8 @@ const Jr = (t) => {
|
|
|
1539
1544
|
children: /* @__PURE__ */ e.jsx(Ot, {})
|
|
1540
1545
|
}
|
|
1541
1546
|
);
|
|
1542
|
-
},
|
|
1543
|
-
|
|
1547
|
+
}, ll = ({ 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(
|
|
1548
|
+
ue,
|
|
1544
1549
|
{
|
|
1545
1550
|
className: "h-max rounded-none px-1 py-1 text-right text-[11px] hover:bg-blue-400",
|
|
1546
1551
|
color: l === s ? "primary" : void 0,
|
|
@@ -1551,49 +1556,37 @@ const Jr = (t) => {
|
|
|
1551
1556
|
children: s
|
|
1552
1557
|
},
|
|
1553
1558
|
s
|
|
1554
|
-
)) }),
|
|
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,
|
|
1559
|
+
)) }), Le = 50, sl = (t) => {
|
|
1560
|
+
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, P] = w(!1);
|
|
1556
1561
|
_(() => {
|
|
1557
|
-
const { value: y, unit: v } =
|
|
1562
|
+
const { value: y, unit: v } = el(a);
|
|
1558
1563
|
if (v === "") {
|
|
1559
|
-
n(y), m(o != null && o.toLowerCase().includes("width") ? "%" : u
|
|
1564
|
+
n(y), m(o != null && o.toLowerCase().includes("width") ? "%" : pe(u));
|
|
1560
1565
|
return;
|
|
1561
1566
|
}
|
|
1562
1567
|
m(v), n(v === "class" || b(y) ? "" : y);
|
|
1563
1568
|
}, [a, o, u]);
|
|
1564
|
-
const k =
|
|
1565
|
-
(y) => {
|
|
1566
|
-
d(y);
|
|
1567
|
-
},
|
|
1568
|
-
[d],
|
|
1569
|
-
200
|
|
1570
|
-
), I = me(
|
|
1571
|
-
(y) => {
|
|
1572
|
-
d(y, !1);
|
|
1573
|
-
},
|
|
1574
|
-
[d],
|
|
1575
|
-
200
|
|
1576
|
-
), F = A(
|
|
1569
|
+
const k = ye((y) => d(y), [d], Le), $ = ye((y) => d(y, !1), [d], Le), F = A(
|
|
1577
1570
|
(y = !1) => {
|
|
1578
|
-
const v =
|
|
1571
|
+
const v = $e(`${s}`, u);
|
|
1579
1572
|
if (p(v, "error", !1)) {
|
|
1580
1573
|
g(!0);
|
|
1581
1574
|
return;
|
|
1582
1575
|
}
|
|
1583
|
-
const
|
|
1584
|
-
if (
|
|
1585
|
-
k(`${i}${
|
|
1576
|
+
const R = p(v, "unit") !== "" ? p(v, "unit") : c;
|
|
1577
|
+
if (R === "auto" || R === "none") {
|
|
1578
|
+
k(`${i}${R}`);
|
|
1586
1579
|
return;
|
|
1587
1580
|
}
|
|
1588
1581
|
if (p(v, "value") === "")
|
|
1589
1582
|
return;
|
|
1590
|
-
const K = `${p(v, "value", "").startsWith("-") ? "-" : ""}${i}[${p(v, "value", "").replace("-", "")}${
|
|
1591
|
-
y ?
|
|
1583
|
+
const K = `${p(v, "value", "").startsWith("-") ? "-" : ""}${i}[${p(v, "value", "").replace("-", "")}${R === "-" ? "" : R}]`;
|
|
1584
|
+
y ? $(K) : k(K);
|
|
1592
1585
|
},
|
|
1593
|
-
[k,
|
|
1586
|
+
[k, $, s, c, i, u]
|
|
1594
1587
|
), oe = A(
|
|
1595
1588
|
(y) => {
|
|
1596
|
-
const v =
|
|
1589
|
+
const v = $e(`${s}`, u);
|
|
1597
1590
|
if (p(v, "error", !1)) {
|
|
1598
1591
|
g(!0);
|
|
1599
1592
|
return;
|
|
@@ -1604,7 +1597,7 @@ const Jr = (t) => {
|
|
|
1604
1597
|
}
|
|
1605
1598
|
if (p(v, "value") === "")
|
|
1606
1599
|
return;
|
|
1607
|
-
const
|
|
1600
|
+
const R = p(v, "unit") !== "" ? p(v, "unit") : y, K = `${p(v, "value", "").startsWith("-") ? "-" : ""}${i}[${p(v, "value", "").replace("-", "")}${R === "-" ? "" : R}]`;
|
|
1608
1601
|
k(K);
|
|
1609
1602
|
},
|
|
1610
1603
|
[k, s, i, u]
|
|
@@ -1627,15 +1620,15 @@ const Jr = (t) => {
|
|
|
1627
1620
|
onKeyDown: (y) => {
|
|
1628
1621
|
if (y.keyCode !== 38 && y.keyCode !== 40)
|
|
1629
1622
|
return;
|
|
1630
|
-
y.preventDefault(),
|
|
1623
|
+
y.preventDefault(), P(!0);
|
|
1631
1624
|
const v = vt(y.target.value);
|
|
1632
|
-
let
|
|
1633
|
-
y.keyCode === 38 && (
|
|
1634
|
-
const E = `${
|
|
1635
|
-
|
|
1625
|
+
let R = _e(v) ? 0 : v;
|
|
1626
|
+
y.keyCode === 38 && (R += 1), y.keyCode === 40 && (R -= 1);
|
|
1627
|
+
const E = `${R}`, it = `${E.startsWith("-") ? "-" : ""}${i}[${E.replace("-", "")}${c === "-" ? "" : c}]`;
|
|
1628
|
+
$(it);
|
|
1636
1629
|
},
|
|
1637
1630
|
onKeyUp: (y) => {
|
|
1638
|
-
L && (y.preventDefault(),
|
|
1631
|
+
L && (y.preventDefault(), P(!1));
|
|
1639
1632
|
},
|
|
1640
1633
|
onBlur: () => F(),
|
|
1641
1634
|
onChange: (y) => {
|
|
@@ -1665,8 +1658,8 @@ const Jr = (t) => {
|
|
|
1665
1658
|
]
|
|
1666
1659
|
}
|
|
1667
1660
|
) }),
|
|
1668
|
-
/* @__PURE__ */ e.jsx(
|
|
1669
|
-
|
|
1661
|
+
/* @__PURE__ */ e.jsx(ur, { children: /* @__PURE__ */ e.jsx(Z, { className: "bg-background", children: /* @__PURE__ */ e.jsx(
|
|
1662
|
+
ll,
|
|
1670
1663
|
{
|
|
1671
1664
|
units: u,
|
|
1672
1665
|
current: c,
|
|
@@ -1678,7 +1671,7 @@ const Jr = (t) => {
|
|
|
1678
1671
|
] })
|
|
1679
1672
|
] }),
|
|
1680
1673
|
["none", "auto"].indexOf(c) !== -1 || D ? null : /* @__PURE__ */ e.jsx(
|
|
1681
|
-
|
|
1674
|
+
rl,
|
|
1682
1675
|
{
|
|
1683
1676
|
onDragStart: () => j(!0),
|
|
1684
1677
|
onDragEnd: (y) => {
|
|
@@ -1692,7 +1685,7 @@ const Jr = (t) => {
|
|
|
1692
1685
|
return;
|
|
1693
1686
|
T(y);
|
|
1694
1687
|
const v = `${y}`, E = `${v.startsWith("-") ? "-" : ""}${i}[${v.replace("-", "")}${c === "-" ? "" : c}]`;
|
|
1695
|
-
|
|
1688
|
+
$(E);
|
|
1696
1689
|
},
|
|
1697
1690
|
currentValue: s,
|
|
1698
1691
|
unit: c,
|
|
@@ -1702,9 +1695,9 @@ const Jr = (t) => {
|
|
|
1702
1695
|
)
|
|
1703
1696
|
] }) }) });
|
|
1704
1697
|
}, se = (t) => {
|
|
1705
|
-
const l =
|
|
1698
|
+
const l = xe();
|
|
1706
1699
|
return jt(l, { property: t });
|
|
1707
|
-
},
|
|
1700
|
+
}, ol = (t, l) => {
|
|
1708
1701
|
const r = {
|
|
1709
1702
|
xs: 0,
|
|
1710
1703
|
sm: 1,
|
|
@@ -1714,7 +1707,7 @@ const Jr = (t) => {
|
|
|
1714
1707
|
"2xl": 5
|
|
1715
1708
|
};
|
|
1716
1709
|
return r[p(t, "mq", "xs")] <= r[l];
|
|
1717
|
-
},
|
|
1710
|
+
}, nl = {
|
|
1718
1711
|
width: "w-",
|
|
1719
1712
|
height: "h-",
|
|
1720
1713
|
minWidth: "min-w-",
|
|
@@ -1780,26 +1773,26 @@ const Jr = (t) => {
|
|
|
1780
1773
|
insetY: "inset-y-",
|
|
1781
1774
|
opacity: "opacity-",
|
|
1782
1775
|
flexBasis: "basis-"
|
|
1783
|
-
},
|
|
1776
|
+
}, Oe = {
|
|
1784
1777
|
xs: "",
|
|
1785
1778
|
sm: "640px",
|
|
1786
1779
|
md: "768px",
|
|
1787
1780
|
lg: "1024px",
|
|
1788
1781
|
xl: "1280px",
|
|
1789
1782
|
"2xl": "1536px"
|
|
1790
|
-
},
|
|
1783
|
+
}, al = (t) => `${t.toUpperCase()} ${Oe[t] ? `(${Oe[t]} & up)` : ""}`, Re = (t) => {
|
|
1791
1784
|
const { type: l = "icons", label: r, property: s, onEmitChange: n = () => {
|
|
1792
|
-
}, units: a, negative: d = !1 } = t, [i] =
|
|
1793
|
-
(k,
|
|
1785
|
+
}, units: a, negative: d = !1 } = t, [i] = xr(), [o] = Qe(), [, u] = He(), x = se(s), c = Ke(), m = qe(), [h] = Je(), g = N(() => p(x, "fullCls", ""), [x]), f = A(
|
|
1786
|
+
(k, $ = !0) => {
|
|
1794
1787
|
const F = { dark: i, mq: u, mod: o, cls: k, property: s, fullCls: "" };
|
|
1795
1788
|
(i || o !== "") && (F.mq = "xs");
|
|
1796
|
-
const oe =
|
|
1797
|
-
c(h, [oe],
|
|
1789
|
+
const oe = Pr(F);
|
|
1790
|
+
c(h, [oe], $);
|
|
1798
1791
|
},
|
|
1799
1792
|
[h, i, u, o, s, c]
|
|
1800
1793
|
), T = A(() => {
|
|
1801
1794
|
m(h, [g]);
|
|
1802
|
-
}, [h, g, m]), D = N(() =>
|
|
1795
|
+
}, [h, g, m]), D = N(() => ol(x, u), [x, u]);
|
|
1803
1796
|
_(() => {
|
|
1804
1797
|
n(D, x);
|
|
1805
1798
|
}, [D, n, x]);
|
|
@@ -1815,28 +1808,28 @@ const Jr = (t) => {
|
|
|
1815
1808
|
}[k]);
|
|
1816
1809
|
},
|
|
1817
1810
|
[j]
|
|
1818
|
-
),
|
|
1819
|
-
return /* @__PURE__ */ e.jsx(
|
|
1820
|
-
/* @__PURE__ */ e.jsx("div", { className: "relative w-[70px] truncate text-xs text-foreground", children: /* @__PURE__ */ e.jsx("span", { className: `text-[11px] ${x &&
|
|
1811
|
+
), P = p(x, "dark", null) === i && p(x, "mod", null) === o && p(x, "mq", null) === u;
|
|
1812
|
+
return /* @__PURE__ */ e.jsx(Ur, { canChange: D, canReset: x && P, children: /* @__PURE__ */ e.jsxs("div", { className: "group flex flex-row items-center py-2 first:pt-0 last:pb-0", children: [
|
|
1813
|
+
/* @__PURE__ */ e.jsx("div", { className: "relative w-[70px] truncate text-xs text-foreground", children: /* @__PURE__ */ e.jsx("span", { className: `text-[11px] ${x && !P ? "text-foreground" : ""}`, children: r }) }),
|
|
1821
1814
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-row items-center", children: [
|
|
1822
1815
|
/* @__PURE__ */ e.jsxs("div", { className: "w-[150px]", children: [
|
|
1823
1816
|
l === "arbitrary" ? /* @__PURE__ */ e.jsx(
|
|
1824
|
-
|
|
1817
|
+
sl,
|
|
1825
1818
|
{
|
|
1826
1819
|
currentClass: p(x, "cls", ""),
|
|
1827
|
-
classPrefix: p(
|
|
1820
|
+
classPrefix: p(nl, s, ""),
|
|
1828
1821
|
units: a || [],
|
|
1829
1822
|
onChange: f,
|
|
1830
1823
|
negative: d,
|
|
1831
1824
|
cssProperty: s
|
|
1832
1825
|
}
|
|
1833
1826
|
) : null,
|
|
1834
|
-
l === "icons" && /* @__PURE__ */ e.jsx(
|
|
1835
|
-
l === "range" && /* @__PURE__ */ e.jsx(
|
|
1836
|
-
l === "color" && /* @__PURE__ */ e.jsx(
|
|
1827
|
+
l === "icons" && /* @__PURE__ */ e.jsx(Kr, { property: s, onChange: f }),
|
|
1828
|
+
l === "range" && /* @__PURE__ */ e.jsx(Gr, { property: s, onChange: f }),
|
|
1829
|
+
l === "color" && /* @__PURE__ */ e.jsx(Jr, { property: s, onChange: f }),
|
|
1837
1830
|
l === "dropdown" && /* @__PURE__ */ e.jsx(ot, { label: r, property: s, onChange: f })
|
|
1838
1831
|
] }),
|
|
1839
|
-
/* @__PURE__ */ e.jsx("div", { className: `w-[30px] cursor-pointer ${g ? "visible" : "invisible"}`, children:
|
|
1832
|
+
/* @__PURE__ */ e.jsx("div", { className: `w-[30px] cursor-pointer ${g ? "visible" : "invisible"}`, children: P ? /* @__PURE__ */ e.jsx("button", { type: "button", onClick: () => T(), title: "Reset", className: "flex px-1.5 text-xs", children: /* @__PURE__ */ e.jsx(Et, { className: "h-5 w-5 text-blue-500 hover:opacity-80" }) }) : D && x ? /* @__PURE__ */ e.jsxs(W, { delayDuration: 100, children: [
|
|
1840
1833
|
/* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
1841
1834
|
"button",
|
|
1842
1835
|
{
|
|
@@ -1848,7 +1841,7 @@ const Jr = (t) => {
|
|
|
1848
1841
|
/* @__PURE__ */ e.jsx(Z, { children: /* @__PURE__ */ e.jsx("div", { className: "text-right", children: /* @__PURE__ */ e.jsxs("div", { children: [
|
|
1849
1842
|
"Current style is set at ",
|
|
1850
1843
|
/* @__PURE__ */ e.jsxs("span", { className: "font-bold ", children: [
|
|
1851
|
-
|
|
1844
|
+
al(p(x, "mq")),
|
|
1852
1845
|
i && !x.dark ? "(Light mode)" : ""
|
|
1853
1846
|
] }),
|
|
1854
1847
|
/* @__PURE__ */ e.jsx("br", {}),
|
|
@@ -1868,16 +1861,16 @@ const Jr = (t) => {
|
|
|
1868
1861
|
] }) : null })
|
|
1869
1862
|
] })
|
|
1870
1863
|
] }) });
|
|
1871
|
-
},
|
|
1864
|
+
}, il = ["px", "%", "em", "rem", "ch", "vh", "vw"], at = ({
|
|
1872
1865
|
label: t,
|
|
1873
1866
|
options: l,
|
|
1874
1867
|
borderB: r = !1,
|
|
1875
1868
|
borderT: s = !1,
|
|
1876
1869
|
type: n = "arbitrary",
|
|
1877
|
-
units: a =
|
|
1870
|
+
units: a = il,
|
|
1878
1871
|
negative: d = !1
|
|
1879
1872
|
}) => {
|
|
1880
|
-
const [i, o] = w(l[0].key), u =
|
|
1873
|
+
const [i, o] = w(l[0].key), u = xe(), x = A((c) => C(u, "property").includes(c), [u]);
|
|
1881
1874
|
return /* @__PURE__ */ e.jsxs(
|
|
1882
1875
|
"div",
|
|
1883
1876
|
{
|
|
@@ -1885,7 +1878,7 @@ const Jr = (t) => {
|
|
|
1885
1878
|
children: [
|
|
1886
1879
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-row text-xs", children: [
|
|
1887
1880
|
t && /* @__PURE__ */ e.jsx("span", { className: "relative w-[70px] flex-none text-xs text-foreground", children: t }),
|
|
1888
|
-
/* @__PURE__ */ e.jsx("div", { className: "mb-3 flex grow flex-row flex-wrap gap-x-px", children:
|
|
1881
|
+
/* @__PURE__ */ e.jsx("div", { className: "mb-3 flex grow flex-row flex-wrap gap-x-px", children: I.Children.toArray(
|
|
1889
1882
|
l.map(({ label: c, key: m }) => /* @__PURE__ */ e.jsx("div", { className: "first:rounded-l last:rounded-r", children: /* @__PURE__ */ e.jsxs(W, { children: [
|
|
1890
1883
|
/* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
1891
1884
|
"button",
|
|
@@ -1894,10 +1887,10 @@ const Jr = (t) => {
|
|
|
1894
1887
|
onClick: () => o(m),
|
|
1895
1888
|
className: `relative cursor-pointer rounded-full p-1 text-[8px] ${m === i ? " bg-[#3E57F0] text-white" : "text-gray-600 dark:text-gray-300"}`,
|
|
1896
1889
|
children: [
|
|
1897
|
-
|
|
1890
|
+
I.createElement("div", {
|
|
1898
1891
|
className: x(m) ? "-bottom-1.5 absolute bg-[#3E57F0] h-[2px] left-0 w-full" : ""
|
|
1899
1892
|
}),
|
|
1900
|
-
|
|
1893
|
+
I.createElement(p(st, m, Xe), { className: "text-inherit w-3 h-3" })
|
|
1901
1894
|
]
|
|
1902
1895
|
}
|
|
1903
1896
|
) }),
|
|
@@ -1906,7 +1899,7 @@ const Jr = (t) => {
|
|
|
1906
1899
|
) })
|
|
1907
1900
|
] }),
|
|
1908
1901
|
/* @__PURE__ */ e.jsx("div", { className: "mt-0 flex items-center", children: /* @__PURE__ */ e.jsx(
|
|
1909
|
-
|
|
1902
|
+
Re,
|
|
1910
1903
|
{
|
|
1911
1904
|
type: n,
|
|
1912
1905
|
units: [...a],
|
|
@@ -1918,14 +1911,14 @@ const Jr = (t) => {
|
|
|
1918
1911
|
]
|
|
1919
1912
|
}
|
|
1920
1913
|
);
|
|
1921
|
-
},
|
|
1922
|
-
const r =
|
|
1914
|
+
}, dl = ({ heading: t, items: l }) => {
|
|
1915
|
+
const r = xe(), s = N(() => {
|
|
1923
1916
|
const n = (i) => U(
|
|
1924
1917
|
i.map((o) => o.styleType === "multiple" ? C(o.options, "key") : o.property)
|
|
1925
1918
|
), a = U(
|
|
1926
1919
|
l.map((i) => i.styleType === "accordion" ? n(i.items) : i.styleType === "multiple" ? C(i.options, "key") : i.property)
|
|
1927
1920
|
), d = C(r, "property");
|
|
1928
|
-
return
|
|
1921
|
+
return Fe(a, d).length > 0;
|
|
1929
1922
|
}, [r, l]);
|
|
1930
1923
|
return /* @__PURE__ */ e.jsxs("details", { children: [
|
|
1931
1924
|
/* @__PURE__ */ e.jsx("summary", { className: "my-px cursor-default rounded-md bg-background p-px px-2 text-[11px] text-foreground", children: /* @__PURE__ */ e.jsxs("div", { className: "inline", children: [
|
|
@@ -1937,17 +1930,17 @@ const Jr = (t) => {
|
|
|
1937
1930
|
}
|
|
1938
1931
|
) : null
|
|
1939
1932
|
] }) }),
|
|
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(
|
|
1933
|
+
/* @__PURE__ */ e.jsx("div", { className: "p-2", children: l.map((n) => n.styleType === "multiple" ? /* @__PURE__ */ e.jsx(at, { ...n }, n.label) : /* @__PURE__ */ e.jsx(Re, { ...n }, n.label)) })
|
|
1941
1934
|
] });
|
|
1942
|
-
},
|
|
1943
|
-
const l =
|
|
1935
|
+
}, cl = Me({}), me = ({ section: t }) => {
|
|
1936
|
+
const l = xe(), r = A(
|
|
1944
1937
|
(a = []) => {
|
|
1945
1938
|
const d = {};
|
|
1946
1939
|
for (let o = 0; o < l.length; o++)
|
|
1947
1940
|
d[l[o].property] = l[o].cls;
|
|
1948
1941
|
let i = !0;
|
|
1949
1942
|
for (const o in a)
|
|
1950
|
-
if (!
|
|
1943
|
+
if (!he(d, o) || d[o] !== a[o]) {
|
|
1951
1944
|
i = !1;
|
|
1952
1945
|
break;
|
|
1953
1946
|
}
|
|
@@ -1962,18 +1955,18 @@ const Jr = (t) => {
|
|
|
1962
1955
|
), d = U(
|
|
1963
1956
|
t.items.map((o) => o.styleType === "accordion" ? a(o.items) : o.styleType === "multiple" ? U(C(o.options, "key")) : o.property)
|
|
1964
1957
|
), i = C(l, "property");
|
|
1965
|
-
return
|
|
1958
|
+
return Fe(d, i).length > 0;
|
|
1966
1959
|
}, [l, t.heading, t.items]), n = N(() => ({}), []);
|
|
1967
|
-
return /* @__PURE__ */ e.jsx(
|
|
1960
|
+
return /* @__PURE__ */ e.jsx(cl.Provider, { value: n, children: /* @__PURE__ */ e.jsxs(ie, { value: t.heading, children: [
|
|
1968
1961
|
/* @__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: [
|
|
1969
1962
|
/* @__PURE__ */ e.jsx("div", { className: `h-[8px] w-[8px] rounded-full ${s ? "bg-blue-500" : "bg-gray-300"}` }),
|
|
1970
1963
|
t.heading
|
|
1971
1964
|
] }) }),
|
|
1972
|
-
/* @__PURE__ */ e.jsx(ce, { className: "bg-gray-100 px-3.5 py-2", children:
|
|
1973
|
-
t.items.map((a) =>
|
|
1965
|
+
/* @__PURE__ */ e.jsx(ce, { className: "bg-gray-100 px-3.5 py-2", children: I.Children.toArray(
|
|
1966
|
+
t.items.map((a) => he(a, "component") ? I.createElement(a.component, { key: a.label }) : he(a, "styleType") ? a.styleType === "multiple" ? /* @__PURE__ */ e.jsx(at, { ...a }, a.label) : a.styleType === "accordion" && r(a == null ? void 0 : a.conditions) ? /* @__PURE__ */ e.jsx(dl, { ...a }, a.label) : null : /* @__PURE__ */ e.jsx(Re, { ...a }, a.label))
|
|
1974
1967
|
) })
|
|
1975
1968
|
] }) });
|
|
1976
|
-
},
|
|
1969
|
+
}, pl = ({
|
|
1977
1970
|
item: t,
|
|
1978
1971
|
index: l,
|
|
1979
1972
|
canDelete: r,
|
|
@@ -2006,22 +1999,22 @@ const Jr = (t) => {
|
|
|
2006
1999
|
}
|
|
2007
2000
|
),
|
|
2008
2001
|
/* @__PURE__ */ e.jsx(
|
|
2009
|
-
|
|
2002
|
+
_t,
|
|
2010
2003
|
{
|
|
2011
2004
|
onClick: n,
|
|
2012
2005
|
className: "h-6 w-6 cursor-pointer rounded border border-red-400 p-1 text-red-400 hover:opacity-80"
|
|
2013
2006
|
}
|
|
2014
2007
|
)
|
|
2015
2008
|
] })
|
|
2016
|
-
] }),
|
|
2009
|
+
] }), ul = ({ section: t }) => {
|
|
2017
2010
|
var m;
|
|
2018
|
-
const { setSyncState: l } =
|
|
2011
|
+
const { setSyncState: l } = gr(), r = G(), [s, n] = w([]), [a] = Ne(), d = Ue(), i = `${p(a, "0.prop")}_attrs`;
|
|
2019
2012
|
ne.useEffect(() => {
|
|
2020
2013
|
const h = C(p(r, i), (g, f) => ({ key: f, value: g }));
|
|
2021
2014
|
b(h) ? n([]) : n(h);
|
|
2022
2015
|
}, [p(r, i)]);
|
|
2023
2016
|
const o = () => n([...s, { key: "", value: "" }]), u = (h) => {
|
|
2024
|
-
const g =
|
|
2017
|
+
const g = fe(s, (f, T) => h !== T);
|
|
2025
2018
|
c(g);
|
|
2026
2019
|
}, x = (h, g) => {
|
|
2027
2020
|
const f = [...s];
|
|
@@ -2029,8 +2022,8 @@ const Jr = (t) => {
|
|
|
2029
2022
|
}, c = ne.useCallback(
|
|
2030
2023
|
(h = []) => {
|
|
2031
2024
|
const g = {};
|
|
2032
|
-
|
|
2033
|
-
b(f.key) ||
|
|
2025
|
+
we(h, (f) => {
|
|
2026
|
+
b(f.key) || Ee(g, f.key, f.value);
|
|
2034
2027
|
}), d([p(r, "_id")], { [i]: g }), l("UNSAVED");
|
|
2035
2028
|
},
|
|
2036
2029
|
[r, l, d, i]
|
|
@@ -2051,10 +2044,10 @@ const Jr = (t) => {
|
|
|
2051
2044
|
/* @__PURE__ */ e.jsxs(
|
|
2052
2045
|
"div",
|
|
2053
2046
|
{
|
|
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 =
|
|
2047
|
+
className: `flex h-6 w-max items-center justify-center gap-x-0.5 rounded-full border p-1 px-2 text-xs ${!b(s) && b((m = be(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"}`,
|
|
2055
2048
|
onClick: () => {
|
|
2056
2049
|
var h;
|
|
2057
|
-
!b(s) && b((h =
|
|
2050
|
+
!b(s) && b((h = be(s)) == null ? void 0 : h.key) || o();
|
|
2058
2051
|
},
|
|
2059
2052
|
children: [
|
|
2060
2053
|
/* @__PURE__ */ e.jsx(Ce, { width: 12, height: 12 }),
|
|
@@ -2069,7 +2062,7 @@ const Jr = (t) => {
|
|
|
2069
2062
|
C(s, (h, g) => {
|
|
2070
2063
|
const f = s.length > 0 && g < s.length - 1;
|
|
2071
2064
|
return /* @__PURE__ */ e.jsx(
|
|
2072
|
-
|
|
2065
|
+
pl,
|
|
2073
2066
|
{
|
|
2074
2067
|
item: h,
|
|
2075
2068
|
index: g,
|
|
@@ -2084,8 +2077,8 @@ const Jr = (t) => {
|
|
|
2084
2077
|
] }) })
|
|
2085
2078
|
] });
|
|
2086
2079
|
};
|
|
2087
|
-
function
|
|
2088
|
-
const [t, l] = Qe(), { flexChild: r, gridChild: s } =
|
|
2080
|
+
function xl() {
|
|
2081
|
+
const [t, l] = Qe(), { flexChild: r, gridChild: s } = hr(), [, n] = Br(mr), { t: a } = Ye(), [d] = Ne();
|
|
2089
2082
|
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: [
|
|
2090
2083
|
/* @__PURE__ */ e.jsx(Ze, { className: "mx-auto text-3xl" }),
|
|
2091
2084
|
/* @__PURE__ */ e.jsx("h1", { children: a("no_styling_block_selected") }),
|
|
@@ -2100,9 +2093,9 @@ function pl() {
|
|
|
2100
2093
|
/* @__PURE__ */ e.jsxs("div", { onClick: () => n(!1), className: "flex h-full flex-col", children: [
|
|
2101
2094
|
/* @__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: [
|
|
2102
2095
|
/* @__PURE__ */ e.jsx(Te, { htmlFor: "", className: "flex gap-x-1.5 text-xs italic", children: "State" }),
|
|
2103
|
-
/* @__PURE__ */ e.jsxs(
|
|
2104
|
-
/* @__PURE__ */ e.jsx(
|
|
2105
|
-
/* @__PURE__ */ e.jsxs(
|
|
2096
|
+
/* @__PURE__ */ e.jsxs(yr, { defaultValue: t, onValueChange: (i) => l(i), children: [
|
|
2097
|
+
/* @__PURE__ */ e.jsx(br, { className: "h-auto w-fit p-1 px-3", children: /* @__PURE__ */ e.jsx(fr, { placeholder: "State" }) }),
|
|
2098
|
+
/* @__PURE__ */ e.jsxs(vr, { children: [
|
|
2106
2099
|
/* @__PURE__ */ e.jsx(H, { value: "", children: "Normal" }),
|
|
2107
2100
|
/* @__PURE__ */ e.jsx(H, { value: "hover", children: "Hover" }),
|
|
2108
2101
|
/* @__PURE__ */ e.jsx(H, { value: "active", children: "Active" }),
|
|
@@ -2118,19 +2111,19 @@ function pl() {
|
|
|
2118
2111
|
] })
|
|
2119
2112
|
] })
|
|
2120
2113
|
] }) }),
|
|
2121
|
-
/* @__PURE__ */ e.jsxs(
|
|
2122
|
-
/* @__PURE__ */ e.jsxs(Ge, { type: "multiple", className: "h-full w-full", children: [
|
|
2123
|
-
r && /* @__PURE__ */ e.jsx(
|
|
2124
|
-
s ? /* @__PURE__ */ e.jsx(
|
|
2125
|
-
|
|
2126
|
-
/* @__PURE__ */ e.jsx(
|
|
2114
|
+
/* @__PURE__ */ e.jsxs(jr, { className: "no-scrollbar -mx-1 h-full overflow-x-hidden", children: [
|
|
2115
|
+
/* @__PURE__ */ e.jsxs(Ge, { defaultValue: ["Layout"], type: "multiple", className: "h-full w-full", children: [
|
|
2116
|
+
r && /* @__PURE__ */ e.jsx(me, { section: Xr }),
|
|
2117
|
+
s ? /* @__PURE__ */ e.jsx(me, { section: Zr }) : null,
|
|
2118
|
+
zr.map((i) => /* @__PURE__ */ e.jsx(me, { section: i }, i.heading)),
|
|
2119
|
+
/* @__PURE__ */ e.jsx(ul, { section: { heading: "Attributes" } })
|
|
2127
2120
|
] }),
|
|
2128
2121
|
/* @__PURE__ */ e.jsx("div", { className: "h-60" })
|
|
2129
2122
|
] })
|
|
2130
2123
|
] })
|
|
2131
2124
|
);
|
|
2132
2125
|
}
|
|
2133
|
-
const
|
|
2126
|
+
const gl = {
|
|
2134
2127
|
px: 1,
|
|
2135
2128
|
"%": 1,
|
|
2136
2129
|
em: 100,
|
|
@@ -2141,8 +2134,8 @@ const ul = {
|
|
|
2141
2134
|
"-": 1,
|
|
2142
2135
|
deg: 1,
|
|
2143
2136
|
ms: 0.1
|
|
2144
|
-
},
|
|
2145
|
-
const t = G(), { t: l } =
|
|
2137
|
+
}, ks = () => {
|
|
2138
|
+
const t = G(), { t: l } = Ye(), [r, s] = I.useState(""), [n, a] = I.useState({
|
|
2146
2139
|
onDrag: (o) => o,
|
|
2147
2140
|
onDragEnd: (o) => o,
|
|
2148
2141
|
dragStartY: 0,
|
|
@@ -2151,12 +2144,12 @@ const ul = {
|
|
|
2151
2144
|
dragUnit: "",
|
|
2152
2145
|
negative: !1,
|
|
2153
2146
|
cssProperty: ""
|
|
2154
|
-
}), d =
|
|
2147
|
+
}), d = ye(
|
|
2155
2148
|
(o) => {
|
|
2156
2149
|
const u = !p(n, "negative", !1), x = p(n, "cssProperty", "");
|
|
2157
2150
|
let c = parseFloat(n.dragStartValue);
|
|
2158
|
-
c =
|
|
2159
|
-
let m =
|
|
2151
|
+
c = _e(c) ? 0 : c;
|
|
2152
|
+
let m = gl[n.dragUnit];
|
|
2160
2153
|
(z(x, "scale") || x === "opacity") && (m = 10);
|
|
2161
2154
|
let g = (n.dragStartY - o.pageY) / m + c;
|
|
2162
2155
|
u && g < 0 && (g = 0), x === "opacity" && g > 1 && (g = 1), n.onDrag(`${g}`), s(`${g}`);
|
|
@@ -2187,8 +2180,8 @@ const ul = {
|
|
|
2187
2180
|
className: "absolute inset-0 z-30 cursor-row-resize bg-gray-300/10 "
|
|
2188
2181
|
}
|
|
2189
2182
|
) : null,
|
|
2190
|
-
/* @__PURE__ */ e.jsxs(
|
|
2191
|
-
/* @__PURE__ */ e.jsxs(
|
|
2183
|
+
/* @__PURE__ */ e.jsxs(wr, { defaultValue: "settings", className: "flex h-full w-full flex-col py-1", children: [
|
|
2184
|
+
/* @__PURE__ */ e.jsxs(Cr, { className: "mx-1 grid grid-cols-2", children: [
|
|
2192
2185
|
/* @__PURE__ */ e.jsx(Be, { value: "settings", children: "Settings" }),
|
|
2193
2186
|
/* @__PURE__ */ e.jsx(Be, { value: "styling", children: "Styling" })
|
|
2194
2187
|
] }),
|
|
@@ -2197,13 +2190,13 @@ const ul = {
|
|
|
2197
2190
|
{
|
|
2198
2191
|
value: "settings",
|
|
2199
2192
|
className: "no-scrollbar -mx-1 -mr-2 h-full flex-1 overflow-y-auto overflow-x-hidden",
|
|
2200
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2193
|
+
children: /* @__PURE__ */ e.jsx(Yr, {})
|
|
2201
2194
|
}
|
|
2202
2195
|
),
|
|
2203
|
-
/* @__PURE__ */ e.jsx(Ae, { value: "styling", className: "flex-1 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(
|
|
2196
|
+
/* @__PURE__ */ e.jsx(Ae, { value: "styling", className: "flex-1 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(xl, {}) })
|
|
2204
2197
|
] })
|
|
2205
2198
|
] }) });
|
|
2206
2199
|
};
|
|
2207
2200
|
export {
|
|
2208
|
-
|
|
2201
|
+
ks as default
|
|
2209
2202
|
};
|