@chaibuilder/sdk 1.0.19 → 1.0.21
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-eoo1CzaK.js → AddBlocks-0-e393Fn.js} +29 -27
- package/dist/AddBlocks-p68Cz79o.cjs +3 -0
- package/dist/BrandingOptions-HtNCJO9_.cjs +1 -0
- package/dist/{BrandingOptions-1zbCs5bl.js → BrandingOptions-QqqJ-YRb.js} +15 -22
- package/dist/{CanvasArea-Mpb5yTgf.js → CanvasArea-0hMAhzxn.js} +15 -14
- package/dist/{CanvasArea-AsL1cGRZ.cjs → CanvasArea-pZz5czrV.cjs} +4 -4
- package/dist/{CurrentPage-ddbm_deC.js → CurrentPage-UOkxZISs.js} +16 -15
- package/dist/CurrentPage-phMDH1Ub.cjs +1 -0
- package/dist/Layers-NKZXi2LV.cjs +1 -0
- package/dist/{Layers-3UtlSah_.js → Layers-TB-Lriju.js} +18 -17
- package/dist/MODIFIERS-MLfpKQY1.js +73 -0
- package/dist/MODIFIERS-WFzDQfiT.cjs +1 -0
- package/dist/MarkAsGlobalBlock-5h3wP4zj.cjs +1 -0
- package/dist/{MarkAsGlobalBlock-ySc-D4SB.js → MarkAsGlobalBlock-Pa8po8qP.js} +11 -10
- package/dist/PagesPanel-ffrNyFyp.cjs +1 -0
- package/dist/{PagesPanel-nLcJD9CK.js → PagesPanel-mAMSbYPt.js} +20 -19
- package/dist/ProjectPanel-1ywILLme.cjs +1 -0
- package/dist/{ProjectPanel-sFE2KDi-.js → ProjectPanel-XvsYajju.js} +17 -16
- package/dist/{Settings-UOB68lg0.js → Settings-8AbHXcDP.js} +98 -96
- package/dist/Settings-hdmnT_mI.cjs +1 -0
- package/dist/{SidePanels-IFF2nXXZ.js → SidePanels-LQg3mdC4.js} +28 -27
- package/dist/SidePanels-xaNrI3oK.cjs +1 -0
- package/dist/Topbar-A3WZDrK4.cjs +1 -0
- package/dist/{Topbar-lX9OMPwj.js → Topbar-wA6jhMj9.js} +27 -26
- package/dist/UnsplashImages-E8zPMgJf.cjs +1 -0
- package/dist/{UnsplashImages-u_QTABzi.js → UnsplashImages-mzIO1QeT.js} +9 -8
- package/dist/UploadImages-qEuDUEMn.cjs +1 -0
- package/dist/{UploadImages-gV5xDHIu.js → UploadImages-qMeaY4sk.js} +9 -8
- package/dist/add-page-modal-9deiA1W9.cjs +1 -0
- package/dist/{add-page-modal-1z_f7PxL.js → add-page-modal-oER3yE4F.js} +21 -19
- package/dist/{confirm-alert-ZQ-sxX0X.js → confirm-alert-rDSai_jQ.js} +10 -9
- package/dist/confirm-alert-tH8UCCSF.cjs +1 -0
- package/dist/controls-G0puEH71.js +120 -0
- package/dist/controls-aHZq-q4b.cjs +1 -0
- package/dist/core.cjs +1 -1
- package/dist/core.js +72 -71
- package/dist/{delete-page-modal-OnKk3P5L.js → delete-page-modal-QzQdrLYI.js} +22 -21
- package/dist/delete-page-modal-ShTRkqkB.cjs +1 -0
- package/dist/{form-Osm1AmO5.cjs → form-MlgUSEy_.cjs} +1 -1
- package/dist/{form-zZJyZuNH.js → form-vWeEsG9Y.js} +2 -2
- package/dist/functions-eu6BbvqO.cjs +2 -0
- package/dist/functions-hmbWDcnW.js +1108 -0
- package/dist/{index-2EHcmZqL.js → index-G55KtqnU.js} +191 -190
- package/dist/index-T5MFAHA0.cjs +1 -0
- package/dist/{index-2-Cf7p7w.js → index-mLIwGF5W.js} +5439 -5429
- package/dist/{index-vKSUqeQx.cjs → index-pCHSFoQO.cjs} +44 -44
- package/dist/{jsx-runtime-qAwJ85SY.js → jsx-runtime-NV737rRe.js} +1 -1
- package/dist/{jsx-runtime-WKRPbKtm.cjs → jsx-runtime-WUGKV8jN.cjs} +6 -6
- package/dist/lib.cjs +1 -2
- package/dist/lib.js +116 -1208
- package/dist/page-viewer-GPNN1H92.cjs +1 -0
- package/dist/{page-viewer-d2r9KEIw.js → page-viewer-X3IEOrUC.js} +18 -17
- package/dist/project-general-setting-HZeYf9A1.cjs +1 -0
- package/dist/{project-general-setting--Qu-QJlM.js → project-general-setting-oujmeWOG.js} +22 -20
- package/dist/project-seo-setting-3FZQXaTn.cjs +1 -0
- package/dist/{project-seo-setting-v6l-AbZS.js → project-seo-setting-_X6ckVa4.js} +17 -24
- package/dist/render.cjs +1 -1
- package/dist/render.js +39 -43
- package/dist/server.cjs +1 -1
- package/dist/server.js +1 -1
- package/dist/single-page-detail-ILshOKys.cjs +1 -0
- package/dist/{single-page-detail-olLc2XXk.js → single-page-detail-SxboE7TI.js} +47 -45
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +20 -19
- package/dist/ui.cjs +1 -1
- package/dist/ui.d.ts +4 -4
- package/dist/ui.js +145 -144
- package/dist/utils-It2K33fU.cjs +1 -0
- package/dist/{Class-nQk08vqd.js → utils-PPBbw5bk.js} +115 -183
- package/package.json +2 -7
- package/dist/AddBlocks-jU0NwP_s.cjs +0 -3
- package/dist/BrandingOptions-DXAH3zCN.cjs +0 -1
- package/dist/Class-RZuPYbUS.cjs +0 -1
- package/dist/CurrentPage-VYXjpKJ-.cjs +0 -1
- package/dist/Layers-cUeI3Uhq.cjs +0 -1
- package/dist/MarkAsGlobalBlock-lYL8cO9x.cjs +0 -1
- package/dist/PagesPanel-iFpq7X9a.cjs +0 -1
- package/dist/ProjectPanel-Nq_fot83.cjs +0 -1
- package/dist/Settings-jiWn1Oof.cjs +0 -1
- package/dist/SidePanels-JhPtKGnL.cjs +0 -1
- package/dist/Topbar-qi5ab8rR.cjs +0 -1
- package/dist/UnsplashImages-a2r7b3kB.cjs +0 -1
- package/dist/UploadImages-jLQgLujd.cjs +0 -1
- package/dist/add-page-modal-iRSIjkvI.cjs +0 -1
- package/dist/blocks.cjs +0 -1
- package/dist/blocks.d.ts +0 -4
- package/dist/blocks.js +0 -20
- package/dist/confirm-alert-z74-fGOT.cjs +0 -1
- package/dist/delete-page-modal-a3Tb8T6e.cjs +0 -1
- package/dist/index-XvLiA8z7.js +0 -1191
- package/dist/index-c8zW_D2V.cjs +0 -1
- package/dist/index-fwo4wa7u.cjs +0 -1
- package/dist/index-gmZcUXyn.js +0 -25
- package/dist/index-l9moYwFE.cjs +0 -9
- package/dist/page-viewer-9OzvKHZd.cjs +0 -1
- package/dist/project-general-setting-15WMnfLc.cjs +0 -1
- package/dist/project-seo-setting-PvLLVhvk.cjs +0 -1
- package/dist/single-page-detail-jIi5lRLh.cjs +0 -1
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { j as e } from "./jsx-runtime-
|
|
1
|
+
import { j as e } from "./jsx-runtime-NV737rRe.js";
|
|
2
2
|
import * as ne from "react";
|
|
3
|
-
import
|
|
3
|
+
import P, { useState as w, useMemo as N, useEffect as _, useCallback as A, createContext as Oe, useContext as re } from "react";
|
|
4
4
|
import { useThrottledCallback as me } from "@react-hookz/web";
|
|
5
5
|
import { forEach as je, isArray as ae, omit as it, truncate as dt, includes as M, get as p, first as we, split as ct, startCase as Y, toLower as te, isEmpty as b, map as C, find as pt, last as ye, filter as be, set as Me, keys as ut, cloneDeep as xt, each as gt, capitalize as ht, reject as mt, nth as Re, startsWith as z, isNumber as yt, parseInt as bt, isNaN as Ee, findLast as ft, flatten as U, intersection as _e, has as ge, isNull as vt } from "lodash";
|
|
6
6
|
import { useTranslation as Fe } from "react-i18next";
|
|
7
|
-
import { PlusIcon as Ce, Cross2Icon as Ye, EyeOpenIcon as jt, 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 wt, ArrowTopRightIcon as Ct, ArrowBottomRightIcon as
|
|
8
|
-
import { b1 as Ot, b2 as Mt, B as pe, b3 as Et, b4 as _t, b5 as Ft, b6 as Yt, b7 as Wt, b8 as Xt, b9 as Zt, a6 as G, aq as zt, ar as Ut, as as Gt, ba as Kt, ao as qt, bb as Jt, ap as Qt, aH as W, aI as X, aK as Z, ak as er, bc as tr, bd as rr, be as lr, bf as sr, bg as or, bh as nr, p as ze, ac as Ue, bi as Ge, bj as ie, bk as de, bl as ce, aj as
|
|
7
|
+
import { PlusIcon as Ce, Cross2Icon as Ye, EyeOpenIcon as jt, 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 wt, ArrowTopRightIcon as Ct, ArrowBottomRightIcon as kt, ArrowBottomLeftIcon as Nt, AlignLeftIcon as Tt, AlignCenterHorizontallyIcon as St, AlignRightIcon as Rt, StretchHorizontallyIcon as Vt, FontItalicIcon as Ht, UnderlineIcon as Bt, OverlineIcon as At, LetterCaseUppercaseIcon as Dt, Cross1Icon as Pt, InfoCircledIcon as ke, MinusIcon as $t, BoxIcon as We, RowSpacingIcon as It, TriangleDownIcon as Lt, TrashIcon as Xe, MixerHorizontalIcon as Ze } from "@radix-ui/react-icons";
|
|
8
|
+
import { b1 as Ot, b2 as Mt, B as pe, b3 as Et, b4 as _t, b5 as Ft, b6 as Yt, b7 as Wt, b8 as Xt, b9 as Zt, a6 as G, aq as zt, ar as Ut, as as Gt, ba as Kt, ao as qt, bb as Jt, ap as Qt, aH as W, aI as X, aK as Z, ak as er, bc as tr, bd as rr, be as lr, bf as sr, bg as or, bh as nr, 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 ar, bn as ir, a4 as ue, W as dr, a9 as Qe, R as He, ag as cr, ad as pr, bo as ur, au as xr, av as gr, aw as hr, ax as mr, ay as H, bp as yr, aB as br, aC as fr, aD as Be, aE as Ae } from "./index-G55KtqnU.js";
|
|
9
9
|
import vr from "@rjsf/core";
|
|
10
10
|
import jr from "@rjsf/validator-ajv8";
|
|
11
|
-
import { u as wr } from "./
|
|
12
|
-
import { Check as Cr, EditIcon as
|
|
13
|
-
import {
|
|
14
|
-
import { E as Sr, u as tt } from "./index-
|
|
11
|
+
import { u as wr } from "./controls-G0puEH71.js";
|
|
12
|
+
import { Check as Cr, EditIcon as kr, TrashIcon as Nr } from "lucide-react";
|
|
13
|
+
import { getBlockComponent as et, getChaiDataProviders as Tr } from "@chaibuilder/runtime";
|
|
14
|
+
import { E as Sr, u as tt } from "./index-mLIwGF5W.js";
|
|
15
15
|
import { useAtom as Rr } from "jotai";
|
|
16
16
|
import Vr from "react-autosuggest";
|
|
17
17
|
import Hr from "fuse.js";
|
|
18
|
-
import { A as Br,
|
|
18
|
+
import { A as Br, C as xe, d as Ar } from "./utils-PPBbw5bk.js";
|
|
19
|
+
import { a as Dr } from "./MODIFIERS-MLfpKQY1.js";
|
|
19
20
|
import "@radix-ui/react-toggle";
|
|
20
21
|
import "class-variance-authority";
|
|
21
22
|
import "@radix-ui/react-switch";
|
|
@@ -41,26 +42,27 @@ import "react-dom";
|
|
|
41
42
|
import "react-quill";
|
|
42
43
|
import "flat-to-nested";
|
|
43
44
|
import "redux-undo";
|
|
45
|
+
import "i18next";
|
|
46
|
+
import "clsx";
|
|
47
|
+
import "@floating-ui/react-dom";
|
|
48
|
+
import "react-textarea-autosize";
|
|
49
|
+
import "flagged";
|
|
50
|
+
import "react-dnd";
|
|
51
|
+
import "@minoru/react-dnd-treeview";
|
|
44
52
|
import "./lib.js";
|
|
45
53
|
import "himalaya";
|
|
54
|
+
import "./functions-hmbWDcnW.js";
|
|
46
55
|
import "@mhsdesign/jit-browser-tailwindcss";
|
|
47
56
|
import "@bobthered/tailwindcss-palette-generator";
|
|
48
57
|
import "@tailwindcss/forms";
|
|
49
58
|
import "@tailwindcss/typography";
|
|
50
59
|
import "@tailwindcss/aspect-ratio";
|
|
51
60
|
import "@tailwindcss/line-clamp";
|
|
52
|
-
import "clsx";
|
|
53
61
|
import "tailwind-merge";
|
|
54
|
-
import "i18next";
|
|
55
|
-
import "@floating-ui/react-dom";
|
|
56
|
-
import "react-textarea-autosize";
|
|
57
|
-
import "flagged";
|
|
58
|
-
import "react-dnd";
|
|
59
|
-
import "@minoru/react-dnd-treeview";
|
|
60
62
|
import "react-hotkeys-hook";
|
|
61
63
|
import "sonner";
|
|
62
|
-
const
|
|
63
|
-
function
|
|
64
|
+
const Pr = P.lazy(() => import("react-json-view"));
|
|
65
|
+
function $r(t) {
|
|
64
66
|
const l = [], r = {};
|
|
65
67
|
function s(o, a) {
|
|
66
68
|
je(a, (d, i) => {
|
|
@@ -77,7 +79,7 @@ const fe = ({ data: t, fullView: l }) => {
|
|
|
77
79
|
return l ? typeof t == "object" ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
78
80
|
/* @__PURE__ */ e.jsx("div", { className: "h-3" }),
|
|
79
81
|
/* @__PURE__ */ e.jsx(Sr, { children: /* @__PURE__ */ e.jsx(
|
|
80
|
-
|
|
82
|
+
Pr,
|
|
81
83
|
{
|
|
82
84
|
style: { maxHeight: "40vh", overflowY: "auto" },
|
|
83
85
|
name: "Content",
|
|
@@ -101,7 +103,7 @@ const fe = ({ data: t, fullView: l }) => {
|
|
|
101
103
|
dataType: a,
|
|
102
104
|
appliedBindings: d
|
|
103
105
|
}) => {
|
|
104
|
-
const { paths: i, pathsType: n } =
|
|
106
|
+
const { paths: i, pathsType: n } = $r(s), u = t === "PROP" ? et(s == null ? void 0 : s._type) : {}, x = t === "PROP", [c, m] = w(!1), h = N(() => t === "PROP" ? i.filter(
|
|
105
107
|
(g) => !M(d, g) && p(u, `props.${we(ct(g, "."))}.binding`)
|
|
106
108
|
) : i.filter((g) => a === p(n, g, "")), [t, i, d, a, u]);
|
|
107
109
|
return _(() => {
|
|
@@ -156,7 +158,7 @@ const fe = ({ data: t, fullView: l }) => {
|
|
|
156
158
|
] }),
|
|
157
159
|
!x && !b(l) && /* @__PURE__ */ e.jsx("div", { className: "pt-2", children: /* @__PURE__ */ e.jsx(fe, { data: p(s, l, ""), fullView: !0 }) })
|
|
158
160
|
] });
|
|
159
|
-
},
|
|
161
|
+
}, Ir = ({
|
|
160
162
|
appliedBindings: t = [],
|
|
161
163
|
onAddBinding: l,
|
|
162
164
|
editMode: r,
|
|
@@ -234,7 +236,7 @@ const fe = ({ data: t, fullView: l }) => {
|
|
|
234
236
|
return /* @__PURE__ */ e.jsxs(qt, { children: [
|
|
235
237
|
/* @__PURE__ */ e.jsx(Jt, { asChild: !0, onClick: () => d(!0), children: t }),
|
|
236
238
|
a && /* @__PURE__ */ e.jsx(Qt, { children: /* @__PURE__ */ e.jsx(
|
|
237
|
-
|
|
239
|
+
Ir,
|
|
238
240
|
{
|
|
239
241
|
item: o,
|
|
240
242
|
editMode: s,
|
|
@@ -269,9 +271,9 @@ const fe = ({ data: t, fullView: l }) => {
|
|
|
269
271
|
/* @__PURE__ */ e.jsx("div", { className: "font-medium leading-5", children: t.value }),
|
|
270
272
|
/* @__PURE__ */ e.jsx(fe, { data: p(o, t.value, "") }),
|
|
271
273
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-end gap-x-2", children: [
|
|
272
|
-
/* @__PURE__ */ e.jsx(rt, { editMode: !0, onAddBinding: l, appliedBindings: a, item: t, children: /* @__PURE__ */ e.jsx(
|
|
274
|
+
/* @__PURE__ */ e.jsx(rt, { editMode: !0, onAddBinding: l, appliedBindings: a, item: t, children: /* @__PURE__ */ e.jsx(kr, { 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" }) }),
|
|
273
275
|
/* @__PURE__ */ e.jsx(
|
|
274
|
-
|
|
276
|
+
Nr,
|
|
275
277
|
{
|
|
276
278
|
onClick: () => r(),
|
|
277
279
|
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"
|
|
@@ -287,7 +289,7 @@ const fe = ({ data: t, fullView: l }) => {
|
|
|
287
289
|
_(() => {
|
|
288
290
|
d(C(t, (c, m) => ({ key: m, value: c })));
|
|
289
291
|
}, [r == null ? void 0 : r._id]);
|
|
290
|
-
const i =
|
|
292
|
+
const i = N(() => {
|
|
291
293
|
if (b(s))
|
|
292
294
|
return !0;
|
|
293
295
|
if (b(a))
|
|
@@ -342,7 +344,7 @@ const fe = ({ data: t, fullView: l }) => {
|
|
|
342
344
|
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" })
|
|
343
345
|
] })
|
|
344
346
|
] });
|
|
345
|
-
}, Mr = () => /* @__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" }),
|
|
347
|
+
}, Mr = () => /* @__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 = ({
|
|
346
348
|
createHistorySnapshot: t,
|
|
347
349
|
properties: l,
|
|
348
350
|
formData: r,
|
|
@@ -392,7 +394,7 @@ function Er() {
|
|
|
392
394
|
title: "Name",
|
|
393
395
|
default: p(t, "_name", t._type)
|
|
394
396
|
})
|
|
395
|
-
}, n = ut(p(o, "_bindings", {})), u =
|
|
397
|
+
}, n = ut(p(o, "_bindings", {})), u = N(() => {
|
|
396
398
|
const x = xt(p(s, "props", {}));
|
|
397
399
|
return gt(n, (c) => {
|
|
398
400
|
delete x[c];
|
|
@@ -400,7 +402,7 @@ function Er() {
|
|
|
400
402
|
}, [s, n]);
|
|
401
403
|
return /* @__PURE__ */ e.jsxs("div", { className: "overflow-x-hidden", children: [
|
|
402
404
|
/* @__PURE__ */ e.jsx(
|
|
403
|
-
|
|
405
|
+
Pe,
|
|
404
406
|
{
|
|
405
407
|
onChange: d,
|
|
406
408
|
createHistorySnapshot: a,
|
|
@@ -444,7 +446,7 @@ function Er() {
|
|
|
444
446
|
". Remove data binding to edit static content."
|
|
445
447
|
] }),
|
|
446
448
|
/* @__PURE__ */ e.jsx(
|
|
447
|
-
|
|
449
|
+
Pe,
|
|
448
450
|
{
|
|
449
451
|
onChange: d,
|
|
450
452
|
createHistorySnapshot: a,
|
|
@@ -458,7 +460,7 @@ function Er() {
|
|
|
458
460
|
/* @__PURE__ */ e.jsx("div", { className: "pb-60" })
|
|
459
461
|
] });
|
|
460
462
|
}
|
|
461
|
-
const
|
|
463
|
+
const $e = new Hr(Br, {
|
|
462
464
|
isCaseSensitive: !1,
|
|
463
465
|
threshold: 0.2,
|
|
464
466
|
minMatchCharLength: 2,
|
|
@@ -466,21 +468,21 @@ const Ie = new Hr(Br, {
|
|
|
466
468
|
});
|
|
467
469
|
function _r() {
|
|
468
470
|
var D;
|
|
469
|
-
const [t] =
|
|
471
|
+
const [t] = Ne(), l = G(), r = Ke(), s = qe(), [o] = Je(), [a, d] = w(""), i = (D = we(t)) == null ? void 0 : D.prop, n = mt((p(l, i, "").replace(Dr, "").split(",").pop() || "").split(" "), b), u = () => {
|
|
470
472
|
const j = a.trim().toLowerCase().replace(/ +(?= )/g, "").split(" ");
|
|
471
473
|
r(o, j, !0), d("");
|
|
472
474
|
}, [x, c] = w([]), m = ({ value: j }) => {
|
|
473
|
-
const L = j.trim().toLowerCase(),
|
|
474
|
-
let
|
|
475
|
-
if (
|
|
476
|
-
const [
|
|
477
|
-
|
|
475
|
+
const L = j.trim().toLowerCase(), $ = L.match(/.+:/g);
|
|
476
|
+
let k = [];
|
|
477
|
+
if ($ && $.length > 0) {
|
|
478
|
+
const [I] = $, F = L.replace(I, "");
|
|
479
|
+
k = $e.search(F).map((y) => ({
|
|
478
480
|
...y,
|
|
479
|
-
item: { ...y.item, name:
|
|
481
|
+
item: { ...y.item, name: I + y.item.name }
|
|
480
482
|
}));
|
|
481
483
|
} else
|
|
482
|
-
|
|
483
|
-
c(C(
|
|
484
|
+
k = $e.search(L);
|
|
485
|
+
c(C(k, "item"));
|
|
484
486
|
}, h = () => {
|
|
485
487
|
c([]);
|
|
486
488
|
}, g = (j) => j.name, f = (j) => /* @__PURE__ */ e.jsx("div", { className: "rounded-md p-1", children: j.name }), T = {
|
|
@@ -1025,8 +1027,8 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Fr = {
|
|
|
1025
1027
|
borderRadiusLeft: ee,
|
|
1026
1028
|
borderRadiusTopLeft: wt,
|
|
1027
1029
|
borderRadiusTopRight: Ct,
|
|
1028
|
-
borderRadiusBottomRight:
|
|
1029
|
-
borderRadiusBottomLeft:
|
|
1030
|
+
borderRadiusBottomRight: kt,
|
|
1031
|
+
borderRadiusBottomLeft: Nt,
|
|
1030
1032
|
divideXWidth: R,
|
|
1031
1033
|
divideYWidth: V,
|
|
1032
1034
|
scale: O,
|
|
@@ -1177,16 +1179,16 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Fr = {
|
|
|
1177
1179
|
}
|
|
1178
1180
|
)
|
|
1179
1181
|
] }),
|
|
1180
|
-
static:
|
|
1182
|
+
static: Pt
|
|
1181
1183
|
}, le = Oe({ canReset: !1, canChange: !0 }), Xr = ({ children: t, canReset: l = !1, canChange: r = !0 }) => (
|
|
1182
1184
|
// eslint-disable-next-line react/jsx-no-constructed-context-values
|
|
1183
1185
|
/* @__PURE__ */ e.jsx(le.Provider, { value: { canReset: l, canChange: r }, children: t })
|
|
1184
1186
|
), st = ({ label: t, property: l, onChange: r }) => {
|
|
1185
|
-
const s =
|
|
1187
|
+
const s = N(() => p(xe, `${l}.classes`, [""]), [l]), o = se(l), a = N(() => p(o, "cls", ""), [o]), { canChange: d } = re(le), i = /\[.*\]/g.test(a);
|
|
1186
1188
|
return /* @__PURE__ */ e.jsx("div", { className: t ? "w-full rounded " : "grow", children: i ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
|
|
1187
1189
|
/* @__PURE__ */ e.jsx(ar, { className: "w-[70%] rounded py-1", readOnly: !0, value: a }),
|
|
1188
1190
|
/* @__PURE__ */ e.jsxs(W, { delayDuration: 100, children: [
|
|
1189
|
-
/* @__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(
|
|
1191
|
+
/* @__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, {}) }) }),
|
|
1190
1192
|
/* @__PURE__ */ e.jsx(Z, { children: "Current value is using a Tailwind arbitrary value." })
|
|
1191
1193
|
] })
|
|
1192
1194
|
] }) : /* @__PURE__ */ e.jsx(
|
|
@@ -1214,7 +1216,7 @@ function ve({ selected: t, onChange: l, rounded: r = !1, options: s, disabled: o
|
|
|
1214
1216
|
value: a,
|
|
1215
1217
|
children: [
|
|
1216
1218
|
/* @__PURE__ */ e.jsx("option", { className: "bg-transparent", value: "" }),
|
|
1217
|
-
|
|
1219
|
+
P.Children.toArray(
|
|
1218
1220
|
s.map((n) => /* @__PURE__ */ e.jsx("option", { className: "bg-transparent", value: n, children: n }))
|
|
1219
1221
|
)
|
|
1220
1222
|
]
|
|
@@ -1222,7 +1224,7 @@ function ve({ selected: t, onChange: l, rounded: r = !1, options: s, disabled: o
|
|
|
1222
1224
|
);
|
|
1223
1225
|
}
|
|
1224
1226
|
const Zr = ({ property: t, onChange: l }) => {
|
|
1225
|
-
const { canReset: r, canChange: s } = re(le), o = se(t), a =
|
|
1227
|
+
const { canReset: r, canChange: s } = re(le), o = se(t), a = N(() => p(o, "cls", ""), [o]), d = N(() => p(xe, `${t}.classes`, [""]), [t]), i = d.indexOf(a) > -1 ? d.indexOf(a) : 0, n = /\[.*\]/g.test(a);
|
|
1226
1228
|
return /* @__PURE__ */ e.jsx("div", { className: "flex flex-row divide-x divide-solid divide-border rounded border border-border text-xs", children: n ? /* @__PURE__ */ e.jsx("div", { className: "py-[5px] px-2", children: a }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1227
1229
|
/* @__PURE__ */ e.jsx(
|
|
1228
1230
|
"button",
|
|
@@ -1231,7 +1233,7 @@ const Zr = ({ property: t, onChange: l }) => {
|
|
|
1231
1233
|
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",
|
|
1232
1234
|
disabled: !s && (!r || i - 1 < 0),
|
|
1233
1235
|
onClick: () => l(Re(d, i - 1), t),
|
|
1234
|
-
children: /* @__PURE__ */ e.jsx("span", { className: "flex items-center justify-center", children: /* @__PURE__ */ e.jsx(
|
|
1236
|
+
children: /* @__PURE__ */ e.jsx("span", { className: "flex items-center justify-center", children: /* @__PURE__ */ e.jsx($t, { className: !s && (!r || i - 1 < 0) ? "text-gray-500" : "text-white/60" }) })
|
|
1235
1237
|
}
|
|
1236
1238
|
),
|
|
1237
1239
|
/* @__PURE__ */ e.jsx("div", { className: "w-8/12 text-center", children: /* @__PURE__ */ e.jsx(st, { label: !1, property: t, onChange: l }) }),
|
|
@@ -1252,7 +1254,7 @@ const Zr = ({ property: t, onChange: l }) => {
|
|
|
1252
1254
|
)
|
|
1253
1255
|
] }) });
|
|
1254
1256
|
}, zr = ({ property: t, onChange: l }) => {
|
|
1255
|
-
const r =
|
|
1257
|
+
const r = N(() => p(xe, `${t}.classes`, [""]), [t]), { canChange: s } = re(le), o = se(t), a = N(() => p(o, "cls", ""), [o]);
|
|
1256
1258
|
return /* @__PURE__ */ e.jsx("div", { className: "flex grow flex-wrap gap-1", children: C(r, (d) => /* @__PURE__ */ e.jsxs(W, { children: [
|
|
1257
1259
|
/* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
1258
1260
|
"button",
|
|
@@ -1261,7 +1263,7 @@ const Zr = ({ property: t, onChange: l }) => {
|
|
|
1261
1263
|
disabled: !s,
|
|
1262
1264
|
onClick: () => l(d, t),
|
|
1263
1265
|
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"}`,
|
|
1264
|
-
children:
|
|
1266
|
+
children: P.createElement(p(lt, d, We))
|
|
1265
1267
|
}
|
|
1266
1268
|
) }),
|
|
1267
1269
|
/* @__PURE__ */ e.jsx(Z, { children: Y(te(d)) })
|
|
@@ -1279,7 +1281,7 @@ const Zr = ({ property: t, onChange: l }) => {
|
|
|
1279
1281
|
ringColor: "ring",
|
|
1280
1282
|
ringOffsetColor: "ring-offset"
|
|
1281
1283
|
}, Gr = ({ property: t, onChange: l }) => {
|
|
1282
|
-
const r = se(t), s =
|
|
1284
|
+
const r = se(t), s = N(() => p(r, "cls", ""), [r]), { canChange: o } = re(le), [a, d] = w([]), [i, n] = w({ color: "", shade: "" }), u = s.split("-"), x = p(u, "1", ""), c = p(u, "2", ""), m = A(
|
|
1283
1285
|
// eslint-disable-next-line no-shadow
|
|
1284
1286
|
(g) => {
|
|
1285
1287
|
["current", "inherit", "transparent", "black", "white"].includes(g) ? (d([]), n({ color: g })) : (d(["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"]), n((f) => ({ ...f, color: g, shade: f.shade ? f.shade : "500" })));
|
|
@@ -1345,7 +1347,7 @@ const Zr = ({ property: t, onChange: l }) => {
|
|
|
1345
1347
|
) }),
|
|
1346
1348
|
/* @__PURE__ */ e.jsx("button", { type: "button", className: "grow text-center", children: /* @__PURE__ */ e.jsx(ve, { rounded: !0, selected: c, disabled: !x || !o, onChange: h, options: a }) })
|
|
1347
1349
|
] });
|
|
1348
|
-
},
|
|
1350
|
+
}, Ie = (t, l) => {
|
|
1349
1351
|
t = t.toLowerCase();
|
|
1350
1352
|
let r = t.trim().replace(/ |\+/g, "");
|
|
1351
1353
|
if ((r === "auto" || r === "none") && l.includes(r))
|
|
@@ -1492,7 +1494,7 @@ const qr = (t) => {
|
|
|
1492
1494
|
return Jr(t);
|
|
1493
1495
|
const r = p(l, "0", "").replace(/\[|\]/g, ""), s = t.startsWith("-") ? "-" : "", o = we(r.match(/\d+.\d+|\d+/g));
|
|
1494
1496
|
return { value: `${s}${o}`, unit: r.replace(o, "") };
|
|
1495
|
-
}, Jr = (t) => b(t) ? { value: "", unit: "" } : Kr(t), ot =
|
|
1497
|
+
}, Jr = (t) => b(t) ? { value: "", unit: "" } : Kr(t), ot = P.createContext({
|
|
1496
1498
|
setDragData: () => {
|
|
1497
1499
|
}
|
|
1498
1500
|
}), Qr = ({
|
|
@@ -1524,7 +1526,7 @@ const qr = (t) => {
|
|
|
1524
1526
|
},
|
|
1525
1527
|
color: void 0,
|
|
1526
1528
|
className: "relative z-50 ml-1 hidden h-6 cursor-row-resize rounded bg-background/70 px-2 group-hover:inline",
|
|
1527
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1529
|
+
children: /* @__PURE__ */ e.jsx(It, {})
|
|
1528
1530
|
}
|
|
1529
1531
|
);
|
|
1530
1532
|
}, el = ({ 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(
|
|
@@ -1540,7 +1542,7 @@ const qr = (t) => {
|
|
|
1540
1542
|
},
|
|
1541
1543
|
s
|
|
1542
1544
|
)) }), tl = (t) => {
|
|
1543
|
-
const [l, r] = w(!1), [s, o] = w(""), { currentClass: a, onChange: d, classPrefix: i, cssProperty: n, units: u, negative: x } = t, [c, m] = w(n != null && n.toLowerCase().includes("width") ? "%" : u[0]), [h, g] = w(!1), [f, T] = w(""), [D, j] = w(!1), [L,
|
|
1545
|
+
const [l, r] = w(!1), [s, o] = w(""), { currentClass: a, onChange: d, classPrefix: i, cssProperty: n, units: u, negative: x } = t, [c, m] = w(n != null && n.toLowerCase().includes("width") ? "%" : u[0]), [h, g] = w(!1), [f, T] = w(""), [D, j] = w(!1), [L, $] = w(!1);
|
|
1544
1546
|
_(() => {
|
|
1545
1547
|
const { value: y, unit: v } = qr(a);
|
|
1546
1548
|
if (v === "") {
|
|
@@ -1549,13 +1551,13 @@ const qr = (t) => {
|
|
|
1549
1551
|
}
|
|
1550
1552
|
m(v), o(v === "class" || b(y) ? "" : y);
|
|
1551
1553
|
}, [a, n, u]);
|
|
1552
|
-
const
|
|
1554
|
+
const k = me(
|
|
1553
1555
|
(y) => {
|
|
1554
1556
|
d(y);
|
|
1555
1557
|
},
|
|
1556
1558
|
[d],
|
|
1557
1559
|
200
|
|
1558
|
-
),
|
|
1560
|
+
), I = me(
|
|
1559
1561
|
(y) => {
|
|
1560
1562
|
d(y, !1);
|
|
1561
1563
|
},
|
|
@@ -1563,44 +1565,44 @@ const qr = (t) => {
|
|
|
1563
1565
|
200
|
|
1564
1566
|
), F = A(
|
|
1565
1567
|
(y = !1) => {
|
|
1566
|
-
const v =
|
|
1568
|
+
const v = Ie(`${s}`, u);
|
|
1567
1569
|
if (p(v, "error", !1)) {
|
|
1568
1570
|
g(!0);
|
|
1569
1571
|
return;
|
|
1570
1572
|
}
|
|
1571
1573
|
const S = p(v, "unit") !== "" ? p(v, "unit") : c;
|
|
1572
1574
|
if (S === "auto" || S === "none") {
|
|
1573
|
-
|
|
1575
|
+
k(`${i}${S}`);
|
|
1574
1576
|
return;
|
|
1575
1577
|
}
|
|
1576
1578
|
if (p(v, "value") === "")
|
|
1577
1579
|
return;
|
|
1578
1580
|
const K = `${p(v, "value", "").startsWith("-") ? "-" : ""}${i}[${p(v, "value", "").replace("-", "")}${S === "-" ? "" : S}]`;
|
|
1579
|
-
y ?
|
|
1581
|
+
y ? I(K) : k(K);
|
|
1580
1582
|
},
|
|
1581
|
-
[
|
|
1583
|
+
[k, I, s, c, i, u]
|
|
1582
1584
|
), oe = A(
|
|
1583
1585
|
(y) => {
|
|
1584
|
-
const v =
|
|
1586
|
+
const v = Ie(`${s}`, u);
|
|
1585
1587
|
if (p(v, "error", !1)) {
|
|
1586
1588
|
g(!0);
|
|
1587
1589
|
return;
|
|
1588
1590
|
}
|
|
1589
1591
|
if (y === "auto" || y === "none") {
|
|
1590
|
-
|
|
1592
|
+
k(`${i}${y}`);
|
|
1591
1593
|
return;
|
|
1592
1594
|
}
|
|
1593
1595
|
if (p(v, "value") === "")
|
|
1594
1596
|
return;
|
|
1595
1597
|
const S = p(v, "unit") !== "" ? p(v, "unit") : y, K = `${p(v, "value", "").startsWith("-") ? "-" : ""}${i}[${p(v, "value", "").replace("-", "")}${S === "-" ? "" : S}]`;
|
|
1596
|
-
|
|
1598
|
+
k(K);
|
|
1597
1599
|
},
|
|
1598
|
-
[
|
|
1600
|
+
[k, s, i, u]
|
|
1599
1601
|
);
|
|
1600
1602
|
return /* @__PURE__ */ e.jsx("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-start", children: c === "class" ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1601
1603
|
/* @__PURE__ */ e.jsx("input", { className: "w-20 rounded py-1", readOnly: !0, value: a }),
|
|
1602
1604
|
/* @__PURE__ */ e.jsxs(W, { children: [
|
|
1603
|
-
/* @__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(
|
|
1605
|
+
/* @__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, {}) }) }),
|
|
1604
1606
|
/* @__PURE__ */ e.jsx(Z, { children: "Current value is using a Tailwind preset class." })
|
|
1605
1607
|
] })
|
|
1606
1608
|
] }) : /* @__PURE__ */ e.jsxs("div", { className: `group relative flex items-center ${D ? "z-auto" : ""}`, children: [
|
|
@@ -1615,15 +1617,15 @@ const qr = (t) => {
|
|
|
1615
1617
|
onKeyDown: (y) => {
|
|
1616
1618
|
if (y.keyCode !== 38 && y.keyCode !== 40)
|
|
1617
1619
|
return;
|
|
1618
|
-
y.preventDefault(),
|
|
1620
|
+
y.preventDefault(), $(!0);
|
|
1619
1621
|
const v = bt(y.target.value);
|
|
1620
1622
|
let S = Ee(v) ? 0 : v;
|
|
1621
1623
|
y.keyCode === 38 && (S += 1), y.keyCode === 40 && (S -= 1);
|
|
1622
1624
|
const E = `${S}`, at = `${E.startsWith("-") ? "-" : ""}${i}[${E.replace("-", "")}${c === "-" ? "" : c}]`;
|
|
1623
|
-
|
|
1625
|
+
I(at);
|
|
1624
1626
|
},
|
|
1625
1627
|
onKeyUp: (y) => {
|
|
1626
|
-
L && (y.preventDefault(),
|
|
1628
|
+
L && (y.preventDefault(), $(!1));
|
|
1627
1629
|
},
|
|
1628
1630
|
onBlur: () => F(),
|
|
1629
1631
|
onChange: (y) => {
|
|
@@ -1673,14 +1675,14 @@ const qr = (t) => {
|
|
|
1673
1675
|
if (T(() => ""), j(!1), b(y))
|
|
1674
1676
|
return;
|
|
1675
1677
|
const v = `${y}`, E = `${v.startsWith("-") ? "-" : ""}${i}[${v.replace("-", "")}${c === "-" ? "" : c}]`;
|
|
1676
|
-
|
|
1678
|
+
k(E);
|
|
1677
1679
|
},
|
|
1678
1680
|
onDrag: (y) => {
|
|
1679
1681
|
if (b(y))
|
|
1680
1682
|
return;
|
|
1681
1683
|
T(y);
|
|
1682
1684
|
const v = `${y}`, E = `${v.startsWith("-") ? "-" : ""}${i}[${v.replace("-", "")}${c === "-" ? "" : c}]`;
|
|
1683
|
-
|
|
1685
|
+
I(E);
|
|
1684
1686
|
},
|
|
1685
1687
|
currentValue: s,
|
|
1686
1688
|
unit: c,
|
|
@@ -1777,22 +1779,22 @@ const qr = (t) => {
|
|
|
1777
1779
|
"2xl": "1536px"
|
|
1778
1780
|
}, sl = (t) => `${t.toUpperCase()} ${Le[t] ? `(${Le[t]} & up)` : ""}`, Se = (t) => {
|
|
1779
1781
|
const { type: l = "icons", label: r, property: s, onEmitChange: o = () => {
|
|
1780
|
-
}, units: a, negative: d = !1 } = t, [i] = dr(), [n] = Qe(), [, u] = He(), x = se(s), c = Ke(), m = qe(), [h] = Je(), g =
|
|
1781
|
-
(
|
|
1782
|
-
const F = { dark: i, mq: u, mod: n, cls:
|
|
1782
|
+
}, units: a, negative: d = !1 } = t, [i] = dr(), [n] = Qe(), [, u] = He(), x = se(s), c = Ke(), m = qe(), [h] = Je(), g = N(() => p(x, "fullCls", ""), [x]), f = A(
|
|
1783
|
+
(k, I = !0) => {
|
|
1784
|
+
const F = { dark: i, mq: u, mod: n, cls: k, property: s, fullCls: "" };
|
|
1783
1785
|
(i || n !== "") && (F.mq = "xs");
|
|
1784
|
-
const oe =
|
|
1785
|
-
c(h, [oe],
|
|
1786
|
+
const oe = Ar(F);
|
|
1787
|
+
c(h, [oe], I);
|
|
1786
1788
|
},
|
|
1787
1789
|
[h, i, u, n, s, c]
|
|
1788
1790
|
), T = A(() => {
|
|
1789
1791
|
m(h, [g]);
|
|
1790
|
-
}, [h, g, m]), D =
|
|
1792
|
+
}, [h, g, m]), D = N(() => rl(x, u), [x, u]);
|
|
1791
1793
|
_(() => {
|
|
1792
1794
|
o(D, x);
|
|
1793
1795
|
}, [D, o, x]);
|
|
1794
1796
|
const [, , j] = He(), L = A(
|
|
1795
|
-
(
|
|
1797
|
+
(k) => {
|
|
1796
1798
|
j({
|
|
1797
1799
|
xs: 400,
|
|
1798
1800
|
sm: 640,
|
|
@@ -1800,12 +1802,12 @@ const qr = (t) => {
|
|
|
1800
1802
|
lg: 1024,
|
|
1801
1803
|
xl: 1420,
|
|
1802
1804
|
"2xl": 1920
|
|
1803
|
-
}[
|
|
1805
|
+
}[k]);
|
|
1804
1806
|
},
|
|
1805
1807
|
[j]
|
|
1806
|
-
),
|
|
1807
|
-
return /* @__PURE__ */ e.jsx(Xr, { canChange: D, canReset: x &&
|
|
1808
|
-
/* @__PURE__ */ e.jsx("div", { className: "relative w-[70px] truncate text-xs text-foreground", children: /* @__PURE__ */ e.jsx("span", { className: `text-[11px] ${x &&
|
|
1808
|
+
), $ = p(x, "dark", null) === i && p(x, "mod", null) === n && p(x, "mq", null) === u;
|
|
1809
|
+
return /* @__PURE__ */ e.jsx(Xr, { 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: [
|
|
1810
|
+
/* @__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 }) }),
|
|
1809
1811
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-row items-center", children: [
|
|
1810
1812
|
/* @__PURE__ */ e.jsxs("div", { className: "w-[150px]", children: [
|
|
1811
1813
|
l === "arbitrary" ? /* @__PURE__ */ e.jsx(
|
|
@@ -1824,13 +1826,13 @@ const qr = (t) => {
|
|
|
1824
1826
|
l === "color" && /* @__PURE__ */ e.jsx(Gr, { property: s, onChange: f }),
|
|
1825
1827
|
l === "dropdown" && /* @__PURE__ */ e.jsx(st, { label: r, property: s, onChange: f })
|
|
1826
1828
|
] }),
|
|
1827
|
-
/* @__PURE__ */ e.jsx("div", { className: `w-[30px] cursor-pointer ${g ? "visible" : "invisible"}`, children:
|
|
1829
|
+
/* @__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: [
|
|
1828
1830
|
/* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
1829
1831
|
"button",
|
|
1830
1832
|
{
|
|
1831
1833
|
type: "button",
|
|
1832
1834
|
className: "invisible ml-3 mt-1 rounded-full bg-blue-500 text-white group-hover:visible",
|
|
1833
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1835
|
+
children: /* @__PURE__ */ e.jsx(ke, {})
|
|
1834
1836
|
}
|
|
1835
1837
|
) }),
|
|
1836
1838
|
/* @__PURE__ */ e.jsx(Z, { children: /* @__PURE__ */ e.jsx("div", { className: "text-right", children: /* @__PURE__ */ e.jsxs("div", { children: [
|
|
@@ -1873,7 +1875,7 @@ const qr = (t) => {
|
|
|
1873
1875
|
children: [
|
|
1874
1876
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-row text-xs", children: [
|
|
1875
1877
|
t && /* @__PURE__ */ e.jsx("span", { className: "relative w-[70px] flex-none text-xs text-foreground", children: t }),
|
|
1876
|
-
/* @__PURE__ */ e.jsx("div", { className: "mb-3 flex grow flex-row flex-wrap gap-x-px", children:
|
|
1878
|
+
/* @__PURE__ */ e.jsx("div", { className: "mb-3 flex grow flex-row flex-wrap gap-x-px", children: P.Children.toArray(
|
|
1877
1879
|
l.map(({ label: c, key: m }) => /* @__PURE__ */ e.jsx("div", { className: "first:rounded-l last:rounded-r", children: /* @__PURE__ */ e.jsxs(W, { children: [
|
|
1878
1880
|
/* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
1879
1881
|
"button",
|
|
@@ -1882,10 +1884,10 @@ const qr = (t) => {
|
|
|
1882
1884
|
onClick: () => n(m),
|
|
1883
1885
|
className: `relative cursor-pointer rounded-full p-1 text-[8px] ${m === i ? " bg-[#3E57F0] text-white" : "text-gray-600 dark:text-gray-300"}`,
|
|
1884
1886
|
children: [
|
|
1885
|
-
|
|
1887
|
+
P.createElement("div", {
|
|
1886
1888
|
className: x(m) ? "-bottom-1.5 absolute bg-[#3E57F0] h-[2px] left-0 w-full" : ""
|
|
1887
1889
|
}),
|
|
1888
|
-
|
|
1890
|
+
P.createElement(p(lt, m, We), { className: "text-inherit w-3 h-3" })
|
|
1889
1891
|
]
|
|
1890
1892
|
}
|
|
1891
1893
|
) }),
|
|
@@ -1907,7 +1909,7 @@ const qr = (t) => {
|
|
|
1907
1909
|
}
|
|
1908
1910
|
);
|
|
1909
1911
|
}, nl = ({ heading: t, items: l }) => {
|
|
1910
|
-
const r = ue(), s =
|
|
1912
|
+
const r = ue(), s = N(() => {
|
|
1911
1913
|
const o = (i) => U(
|
|
1912
1914
|
i.map((n) => n.styleType === "multiple" ? C(n.options, "key") : n.property)
|
|
1913
1915
|
), a = U(
|
|
@@ -1942,7 +1944,7 @@ const qr = (t) => {
|
|
|
1942
1944
|
return i;
|
|
1943
1945
|
},
|
|
1944
1946
|
[l]
|
|
1945
|
-
), s =
|
|
1947
|
+
), s = N(() => {
|
|
1946
1948
|
if (l.length > 0 && t.heading === "Classes")
|
|
1947
1949
|
return !0;
|
|
1948
1950
|
const a = (n) => U(
|
|
@@ -1951,14 +1953,14 @@ const qr = (t) => {
|
|
|
1951
1953
|
t.items.map((n) => n.styleType === "accordion" ? a(n.items) : n.styleType === "multiple" ? U(C(n.options, "key")) : n.property)
|
|
1952
1954
|
), i = C(l, "property");
|
|
1953
1955
|
return _e(d, i).length > 0;
|
|
1954
|
-
}, [l, t.heading, t.items]), o =
|
|
1956
|
+
}, [l, t.heading, t.items]), o = N(() => ({}), []);
|
|
1955
1957
|
return /* @__PURE__ */ e.jsx(al.Provider, { value: o, children: /* @__PURE__ */ e.jsxs(ie, { value: t.heading, children: [
|
|
1956
1958
|
/* @__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: [
|
|
1957
1959
|
/* @__PURE__ */ e.jsx("div", { className: `h-[8px] w-[8px] rounded-full ${s ? "bg-blue-500" : "bg-gray-300"}` }),
|
|
1958
1960
|
t.heading
|
|
1959
1961
|
] }) }),
|
|
1960
|
-
/* @__PURE__ */ e.jsx(ce, { className: "bg-gray-100 px-3.5 py-2", children:
|
|
1961
|
-
t.items.map((a) => ge(a, "component") ?
|
|
1962
|
+
/* @__PURE__ */ e.jsx(ce, { className: "bg-gray-100 px-3.5 py-2", children: P.Children.toArray(
|
|
1963
|
+
t.items.map((a) => ge(a, "component") ? P.createElement(a.component, { key: a.label }) : ge(a, "styleType") ? a.styleType === "multiple" ? /* @__PURE__ */ e.jsx(nt, { ...a }, a.label) : a.styleType === "accordion" && r(a == null ? void 0 : a.conditions) ? /* @__PURE__ */ e.jsx(nl, { ...a }, a.label) : null : /* @__PURE__ */ e.jsx(Se, { ...a }, a.label))
|
|
1962
1964
|
) })
|
|
1963
1965
|
] }) });
|
|
1964
1966
|
}, il = ({
|
|
@@ -2003,7 +2005,7 @@ const qr = (t) => {
|
|
|
2003
2005
|
] })
|
|
2004
2006
|
] }), dl = ({ section: t }) => {
|
|
2005
2007
|
var m;
|
|
2006
|
-
const { setSyncState: l } = cr(), r = G(), [s, o] = w([]), [a] =
|
|
2008
|
+
const { setSyncState: l } = cr(), r = G(), [s, o] = w([]), [a] = Ne(), d = Ue(), i = `${p(a, "0.prop")}_attrs`;
|
|
2007
2009
|
ne.useEffect(() => {
|
|
2008
2010
|
const h = C(p(r, i), (g, f) => ({ key: f, value: g }));
|
|
2009
2011
|
b(h) ? o([]) : o(h);
|
|
@@ -2073,7 +2075,7 @@ const qr = (t) => {
|
|
|
2073
2075
|
] });
|
|
2074
2076
|
};
|
|
2075
2077
|
function cl() {
|
|
2076
|
-
const [t, l] = Qe(), { flexChild: r, gridChild: s } = pr(), [, o] = Rr(ur), { t: a } = Fe(), [d] =
|
|
2078
|
+
const [t, l] = Qe(), { flexChild: r, gridChild: s } = pr(), [, o] = Rr(ur), { t: a } = Fe(), [d] = Ne();
|
|
2077
2079
|
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: [
|
|
2078
2080
|
/* @__PURE__ */ e.jsx(Ze, { className: "mx-auto text-3xl" }),
|
|
2079
2081
|
/* @__PURE__ */ e.jsx("h1", { children: a("no_styling_block_selected") }),
|
|
@@ -2129,8 +2131,8 @@ const pl = {
|
|
|
2129
2131
|
"-": 1,
|
|
2130
2132
|
deg: 1,
|
|
2131
2133
|
ms: 0.1
|
|
2132
|
-
},
|
|
2133
|
-
const t = G(), { t: l } = Fe(), [r, s] =
|
|
2134
|
+
}, vs = () => {
|
|
2135
|
+
const t = G(), { t: l } = Fe(), [r, s] = P.useState(""), [o, a] = P.useState({
|
|
2134
2136
|
onDrag: (n) => n,
|
|
2135
2137
|
onDragEnd: (n) => n,
|
|
2136
2138
|
dragStartY: 0,
|
|
@@ -2193,5 +2195,5 @@ const pl = {
|
|
|
2193
2195
|
] });
|
|
2194
2196
|
};
|
|
2195
2197
|
export {
|
|
2196
|
-
|
|
2198
|
+
vs as default
|
|
2197
2199
|
};
|