@chaibuilder/sdk 1.2.43 → 1.2.45
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-UjnfO1xM.cjs +1 -0
- package/dist/{AddBlocks-9UM7zj57.js → AddBlocks-vkMNQu2M.js} +48 -46
- package/dist/CanvasArea-DLg9e6l5.js +1216 -0
- package/dist/CanvasArea-tyXurhEm.cjs +57 -0
- package/dist/{ChaiBuilderEditor-yf2LRjL1.js → ChaiBuilderEditor-1K-wcF5D.js} +3910 -3933
- package/dist/{ChaiBuilderEditor--NV-B5az.cjs → ChaiBuilderEditor-iXQwbYNr.cjs} +44 -44
- package/dist/CurrentPage-6t2cmyoQ.cjs +1 -0
- package/dist/{CurrentPage-hKtVFDxU.js → CurrentPage-JjZQQ8fp.js} +11 -10
- package/dist/{ListTree-ulr_sjdn.js → ListTree-KsggM2ac.js} +4 -3
- package/dist/ListTree-OTrtj3iM.cjs +1 -0
- package/dist/{PagesPanel-EHLY-cfj.js → PagesPanel-bElLBHNI.js} +6 -5
- package/dist/PagesPanel-zm1EC6Iw.cjs +1 -0
- package/dist/ProjectPanel-4zPiPARX.cjs +1 -0
- package/dist/{ProjectPanel-qiqyRbwH.js → ProjectPanel-o1BnitsI.js} +7 -6
- package/dist/Settings-7LXieIrg.cjs +1 -0
- package/dist/{Settings-a7j3ihRx.js → Settings-Bj2wI1at.js} +966 -892
- package/dist/SidePanels-9DSI8ysE.cjs +1 -0
- package/dist/{SidePanels-9XdRZ7rz.js → SidePanels-Q23Yldya.js} +7 -6
- package/dist/{ThemeConfiguration-MaGPPza1.js → ThemeConfiguration-GY85_LR8.js} +6 -5
- package/dist/ThemeConfiguration-mgyKWvYY.cjs +1 -0
- package/dist/Topbar-_7BQ50Y4.cjs +1 -0
- package/dist/{Topbar-OpgHjdWn.js → Topbar-_T58hnmh.js} +5 -4
- package/dist/UILibrariesPanel-28G5q5uW.cjs +1 -0
- package/dist/{UILibrariesPanel-HVpapacm.js → UILibrariesPanel-e9sgXFmR.js} +6 -5
- package/dist/{UnsplashImages-Gx7dy6mp.js → UnsplashImages-2Iew1REO.js} +12 -11
- package/dist/UnsplashImages-wiV_0gCf.cjs +1 -0
- package/dist/{UploadImages-aClrfKqQ.js → UploadImages--batsol9.js} +10 -9
- package/dist/UploadImages-XNNW2MnE.cjs +1 -0
- package/dist/{add-page-modal-kP7x8GYO.js → add-page-modal-1hTp3XOU.js} +18 -17
- package/dist/add-page-modal-AvOI8Zy3.cjs +1 -0
- package/dist/atoms-ZOWyNoiC.js +6 -0
- package/dist/atoms-a0H_593V.cjs +1 -0
- package/dist/confirm-alert-8gHBC9xl.cjs +1 -0
- package/dist/{confirm-alert-gemzBTIt.js → confirm-alert-pMcaye-H.js} +5 -4
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +46 -45
- package/dist/delete-page-modal--GqB4-ya.cjs +1 -0
- package/dist/{delete-page-modal-ER-TAzRL.js → delete-page-modal-pPp6AAO1.js} +6 -5
- package/dist/email-blocks.cjs +1 -1
- package/dist/email-blocks.js +30 -30
- package/dist/email.cjs +1 -1
- package/dist/email.d.ts +1 -1
- package/dist/email.js +5 -4
- package/dist/empty-slot-Lsxjts7Q.js +6 -0
- package/dist/empty-slot-Sy930lX6.cjs +1 -0
- package/dist/{form-UruaB3s_.js → form-BbIs9ZUH.js} +5 -5
- package/dist/{form-l4PB76nt.cjs → form-svmj4OQd.cjs} +1 -1
- package/dist/{index-rKrjj7Vz.js → index-GRkx-GlC.js} +2 -2
- package/dist/{index-PXyps6Qc.cjs → index-ssLLO7-s.cjs} +1 -1
- package/dist/lib.cjs +1 -1
- package/dist/lib.js +3 -3
- package/dist/page-viewer-0QMFEzfk.cjs +1 -0
- package/dist/{page-viewer-bCH5PPSH.js → page-viewer-3ne7tW8e.js} +7 -6
- package/dist/{project-general-setting-rdCQBkQZ.js → project-general-setting-cIjIy8PW.js} +11 -10
- package/dist/project-general-setting-oNYVjfNV.cjs +1 -0
- package/dist/project-seo-setting-5699qkWN.cjs +1 -0
- package/dist/{project-seo-setting-_SGBKl0c.js → project-seo-setting-HLwPjaL2.js} +6 -5
- package/dist/{single-page-detail-H3Rb5gkJ.js → single-page-detail-MLxPXKfu.js} +8 -7
- package/dist/single-page-detail-amfiKMF_.cjs +1 -0
- package/dist/studio.cjs +1 -1
- package/dist/studio.d.ts +1 -1
- package/dist/studio.js +5 -4
- package/dist/style.css +1 -1
- package/dist/ui.cjs +1 -1
- package/dist/ui.d.ts +3 -3
- package/dist/ui.js +130 -129
- package/dist/{useCanvasSettings-IalZcnSd.cjs → useCanvasSettings-KDwtap3V.cjs} +1 -1
- package/dist/{useCanvasSettings-tkzd9Qrw.js → useCanvasSettings-qs-7bwyA.js} +1 -1
- package/dist/utils-K3Zk762G.cjs +1 -0
- package/dist/{Class-6Hz2KzYb.js → utils-iMv3T4WT.js} +16 -15
- package/dist/web-blocks.cjs +4 -4
- package/dist/web-blocks.js +237 -238
- package/package.json +3 -2
- package/dist/AddBlocks-_6X3bnJZ.cjs +0 -1
- package/dist/CanvasArea-HmbcRpgP.cjs +0 -55
- package/dist/CanvasArea-a3WMBMi3.js +0 -1199
- package/dist/Class-Zc8hpE7f.cjs +0 -1
- package/dist/CurrentPage-rgu6shCq.cjs +0 -1
- package/dist/ListTree-fwN6Y_EA.cjs +0 -1
- package/dist/PagesPanel-v6Nl5KWy.cjs +0 -1
- package/dist/ProjectPanel-ck-mOBEg.cjs +0 -1
- package/dist/Settings-Rtk4HDKy.cjs +0 -1
- package/dist/SidePanels-biCoYtzR.cjs +0 -1
- package/dist/ThemeConfiguration-f6AxqpmO.cjs +0 -1
- package/dist/Topbar-cDxKWgN6.cjs +0 -1
- package/dist/UILibrariesPanel-d08F5Ri0.cjs +0 -1
- package/dist/UnsplashImages-uyokFuF-.cjs +0 -1
- package/dist/UploadImages-kLPXfW7W.cjs +0 -1
- package/dist/add-page-modal-H5MTzKBT.cjs +0 -1
- package/dist/confirm-alert-zZAmXzx0.cjs +0 -1
- package/dist/delete-page-modal-E8MFNVWF.cjs +0 -1
- package/dist/empty-slot-ZBlsQi6m.js +0 -15
- package/dist/empty-slot-nzYOgZuS.cjs +0 -1
- package/dist/page-viewer-wQq2qD96.cjs +0 -1
- package/dist/project-general-setting-A5OelyCo.cjs +0 -1
- package/dist/project-seo-setting-Y_q0WJSy.cjs +0 -1
- package/dist/single-page-detail-xAO7x8a1.cjs +0 -1
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
|
-
import * as
|
|
3
|
-
import I, { useState as
|
|
4
|
-
import { useThrottledCallback as
|
|
5
|
-
import { forEach as
|
|
6
|
-
import { useTranslation as
|
|
7
|
-
import { CopyIcon as
|
|
8
|
-
import { a2 as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import {
|
|
19
|
-
import { a as rs } from "./STRINGS--j49GZJP.js";
|
|
2
|
+
import * as ne from "react";
|
|
3
|
+
import I, { useState as j, useMemo as T, useEffect as P, useCallback as H, memo as mt, useRef as ft, createContext as Fe, useContext as se } from "react";
|
|
4
|
+
import { useThrottledCallback as de } from "@react-hookz/web";
|
|
5
|
+
import { forEach as Ne, isArray as ce, omit as vt, truncate as jt, includes as X, get as y, first as ae, split as wt, startCase as F, toLower as re, isEmpty as m, map as _, find as Ze, last as Ct, filter as ye, set as We, debounce as kt, keys as he, cloneDeep as Nt, each as _t, capitalize as be, reject as St, kebabCase as Tt, startsWith as W, nth as He, isNumber as Rt, parseInt as Vt, isNaN as Ue, findLast as Ht, flatten as De, intersection as Dt, has as ie, isNull as Bt } from "lodash-es";
|
|
6
|
+
import { useTranslation as B } from "react-i18next";
|
|
7
|
+
import { CopyIcon as It, PlusIcon as _e, Cross2Icon as Ge, EyeOpenIcon as Pt, EyeClosedIcon as Be, BorderAllIcon as Y, WidthIcon as R, HeightIcon as V, ArrowUpIcon as J, ArrowRightIcon as Q, ArrowDownIcon as ee, ArrowLeftIcon as te, ArrowTopLeftIcon as At, ArrowTopRightIcon as $t, ArrowBottomRightIcon as Mt, ArrowBottomLeftIcon as Et, AlignLeftIcon as Lt, AlignCenterHorizontallyIcon as Ot, AlignRightIcon as zt, StretchHorizontallyIcon as Yt, FontItalicIcon as Xt, UnderlineIcon as Ft, OverlineIcon as Zt, LetterCaseUppercaseIcon as Wt, Cross1Icon as Ut, InfoCircledIcon as Se, MinusIcon as Gt, BoxIcon as Ke, RowSpacingIcon as Kt, TriangleDownIcon as qt, CrossCircledIcon as Jt, CaretDownIcon as Qt, MixerHorizontalIcon as qe } from "@radix-ui/react-icons";
|
|
8
|
+
import { a2 as Je, aP as Qe, aQ as et, B as A, aR as tt, aS as er, aT as tr, aU as rr, aV as sr, aW as ar, aX as lr, M as G, aK as rt, $ as or, a0 as nr, a1 as ir, aY as dr, Z as cr, ab as pr, _ as ur, ac as $, ad as M, ae as E, aZ as gr, a_ as xr, a$ as yr, b0 as hr, b1 as br, b2 as mr, b3 as fr, R as st, Q as at, h as lt, b4 as vr, b5 as ot, b6 as me, b7 as fe, b8 as ve, b9 as jr, ba as wr, ah as Cr, bb as kr, Y as pe, n as Te, I as nt, L as it, bc as dt, bd as je, j as Nr, be as _r, J as ue, v as Sr, P as Tr, o as Ie, av as Rr, aw as Vr, ax as Hr, bf as ct, ay as Pe, az as Ae, bg as $e, bh as Me, bi as Ee, S as Dr } from "./ChaiBuilderEditor-1K-wcF5D.js";
|
|
9
|
+
import { Check as Br, EditIcon as Ir, TrashIcon as Pr, Loader as Ar, SparklesIcon as $r, DeleteIcon as Mr } from "lucide-react";
|
|
10
|
+
import { getBlockComponent as Re, getChaiDataProviders as Er, useGlobalStylingPresets as Lr } from "@chaibuilder/runtime";
|
|
11
|
+
import { J as Or, a as zr, d as Yr } from "./index-e0c8PmRQ.js";
|
|
12
|
+
import Xr from "@rjsf/core";
|
|
13
|
+
import Fr from "@rjsf/validator-ajv8";
|
|
14
|
+
import { u as Zr } from "./useCanvasSettings-qs-7bwyA.js";
|
|
15
|
+
import Wr from "react-autosuggest";
|
|
16
|
+
import Ur from "fuse.js";
|
|
17
|
+
import { A as Gr, C as ge, g as Kr } from "./utils-iMv3T4WT.js";
|
|
18
|
+
import { a as qr } from "./STRINGS--j49GZJP.js";
|
|
20
19
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
21
20
|
import "clsx";
|
|
22
21
|
import "react-dom";
|
|
@@ -28,6 +27,7 @@ import "flagged";
|
|
|
28
27
|
import "./Functions-7jnEwJyw.js";
|
|
29
28
|
import "tailwind-merge";
|
|
30
29
|
import "./MODIFIERS-cBT31iqE.js";
|
|
30
|
+
import "tree-model";
|
|
31
31
|
import "@radix-ui/react-toggle";
|
|
32
32
|
import "class-variance-authority";
|
|
33
33
|
import "@radix-ui/react-switch";
|
|
@@ -50,29 +50,29 @@ import "@radix-ui/react-context-menu";
|
|
|
50
50
|
import "react-icons-picker";
|
|
51
51
|
import "react-quill";
|
|
52
52
|
import "react-hotkeys-hook";
|
|
53
|
-
function
|
|
54
|
-
const
|
|
55
|
-
function n(
|
|
56
|
-
|
|
57
|
-
const o =
|
|
58
|
-
|
|
53
|
+
function Jr(r) {
|
|
54
|
+
const a = [], t = {};
|
|
55
|
+
function n(l, s) {
|
|
56
|
+
Ne(s, (d, c) => {
|
|
57
|
+
const o = l ? `${l}.${c}` : c, p = ce(d) ? "list" : typeof d;
|
|
58
|
+
a.push(o), t[o] = p === "string" ? "text" : p === "object" ? "model" : p, p === "object" && !ce(d) && n(o, d);
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
|
-
return n("", vt(r, ["styles", "_type", "_id", "_name", "_bindings"])), { paths:
|
|
61
|
+
return n("", vt(r, ["styles", "_type", "_id", "_name", "_bindings"])), { paths: a, pathsType: t };
|
|
62
62
|
}
|
|
63
|
-
const
|
|
63
|
+
const we = ({ data: r, fullView: a }) => {
|
|
64
64
|
if (!r)
|
|
65
65
|
return null;
|
|
66
66
|
const t = typeof r;
|
|
67
|
-
return
|
|
67
|
+
return a ? typeof r == "object" ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
68
68
|
/* @__PURE__ */ e.jsx("div", { className: "h-3" }),
|
|
69
|
-
/* @__PURE__ */ e.jsx(
|
|
70
|
-
|
|
69
|
+
/* @__PURE__ */ e.jsx(Je, { children: /* @__PURE__ */ e.jsx(
|
|
70
|
+
Or,
|
|
71
71
|
{
|
|
72
72
|
data: r,
|
|
73
|
-
shouldExpandNode:
|
|
73
|
+
shouldExpandNode: zr,
|
|
74
74
|
style: {
|
|
75
|
-
...
|
|
75
|
+
...Yr,
|
|
76
76
|
container: "max-h-[40vh] overflow-y-auto text-[12px] leading-[1.5] tracking-wide font-mono",
|
|
77
77
|
stringValue: "text-orange-600",
|
|
78
78
|
label: "text-green-900 font-semibold pr-1 tracking-wider"
|
|
@@ -83,462 +83,506 @@ const Se = ({ data: r, fullView: l }) => {
|
|
|
83
83
|
/* @__PURE__ */ e.jsx("span", { className: "font-medium text-gray-800/80", children: "Content: " }),
|
|
84
84
|
r
|
|
85
85
|
] }) : /* @__PURE__ */ e.jsx("div", { className: "w-full overflow-hidden whitespace-nowrap text-[10px] leading-3 text-gray-800/50", children: jt(t === "object" ? JSON.stringify(r) : r, { length: 40 }) });
|
|
86
|
-
},
|
|
86
|
+
}, Le = ({
|
|
87
87
|
type: r,
|
|
88
|
-
value:
|
|
88
|
+
value: a = "",
|
|
89
89
|
setValue: t,
|
|
90
90
|
data: n,
|
|
91
|
-
onChange:
|
|
92
|
-
dataType:
|
|
93
|
-
appliedBindings:
|
|
91
|
+
onChange: l,
|
|
92
|
+
dataType: s,
|
|
93
|
+
appliedBindings: d
|
|
94
94
|
}) => {
|
|
95
|
-
const { paths:
|
|
96
|
-
(
|
|
97
|
-
) :
|
|
98
|
-
return
|
|
99
|
-
|
|
100
|
-
}, [
|
|
95
|
+
const { paths: c, pathsType: o } = Jr(n), p = r === "PROP" ? Re(n == null ? void 0 : n._type) : {}, h = r === "PROP", [i, g] = j(!1), x = T(() => r === "PROP" ? c.filter(
|
|
96
|
+
(u) => !X(d, u) && y(p, `props.${ae(wt(u, "."))}.binding`)
|
|
97
|
+
) : c.filter((u) => s === y(o, u, "")), [r, c, d, s, p]);
|
|
98
|
+
return P(() => {
|
|
99
|
+
a && l(a);
|
|
100
|
+
}, [a, r]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
101
101
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-4", children: [
|
|
102
|
-
/* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted-foreground", children:
|
|
103
|
-
/* @__PURE__ */ e.jsxs(
|
|
104
|
-
/* @__PURE__ */ e.jsx(
|
|
105
|
-
|
|
102
|
+
/* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted-foreground", children: F(re(r)) }),
|
|
103
|
+
/* @__PURE__ */ e.jsxs(Qe, { open: i, onOpenChange: g, children: [
|
|
104
|
+
/* @__PURE__ */ e.jsx(et, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
105
|
+
A,
|
|
106
106
|
{
|
|
107
107
|
variant: "outline",
|
|
108
108
|
size: "sm",
|
|
109
|
-
className: ` ${
|
|
110
|
-
children:
|
|
109
|
+
className: ` ${m(a) ? "w-44 justify-center bg-blue-500 text-gray-100 hover:bg-blue-400 hover:text-white" : "min-w-[350px] items-center justify-between"}`,
|
|
110
|
+
children: a ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
111
111
|
/* @__PURE__ */ e.jsxs("span", { className: "pr-8 text-sm", children: [
|
|
112
|
-
h && /* @__PURE__ */ e.jsx("span", { className: "mr-2 rounded-full bg-purple-100 px-2 py-0.5 text-[10px] text-purple-500", children:
|
|
113
|
-
|
|
112
|
+
h && /* @__PURE__ */ e.jsx("span", { className: "mr-2 rounded-full bg-purple-100 px-2 py-0.5 text-[10px] text-purple-500", children: F(s) }),
|
|
113
|
+
a
|
|
114
114
|
] }),
|
|
115
115
|
/* @__PURE__ */ e.jsx("span", { className: "cursor-pointer text-[9px] text-blue-400 underline hover:text-blue-700", children: "Change" })
|
|
116
116
|
] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
117
117
|
"+ Set ",
|
|
118
|
-
|
|
118
|
+
F(re(r))
|
|
119
119
|
] })
|
|
120
120
|
}
|
|
121
121
|
) }),
|
|
122
|
-
/* @__PURE__ */ e.jsx(
|
|
123
|
-
/* @__PURE__ */ e.jsx(
|
|
124
|
-
/* @__PURE__ */ e.jsxs(
|
|
125
|
-
/* @__PURE__ */ e.jsx(
|
|
126
|
-
/* @__PURE__ */ e.jsx(
|
|
127
|
-
|
|
122
|
+
/* @__PURE__ */ e.jsx(tt, { className: "z-[999] min-w-[300px] p-0", side: "right", align: "start", children: /* @__PURE__ */ e.jsxs(er, { children: [
|
|
123
|
+
/* @__PURE__ */ e.jsx(tr, { placeholder: `Choose ${re(r)}...` }),
|
|
124
|
+
/* @__PURE__ */ e.jsxs(rr, { children: [
|
|
125
|
+
/* @__PURE__ */ e.jsx(sr, { children: "No results found." }),
|
|
126
|
+
/* @__PURE__ */ e.jsx(ar, { children: _(x, (u) => /* @__PURE__ */ e.jsxs(
|
|
127
|
+
lr,
|
|
128
128
|
{
|
|
129
|
-
value:
|
|
129
|
+
value: u,
|
|
130
130
|
className: `cursor-pointer ${h ? "flex items-center justify-between" : "flex flex-col items-start justify-start"}`,
|
|
131
|
-
onSelect: (
|
|
132
|
-
t(
|
|
131
|
+
onSelect: (v) => {
|
|
132
|
+
t(Ze(x, (C) => C === v) || null), g(!1);
|
|
133
133
|
},
|
|
134
134
|
children: [
|
|
135
135
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
|
|
136
|
-
/* @__PURE__ */ e.jsx(
|
|
137
|
-
|
|
136
|
+
/* @__PURE__ */ e.jsx(Br, { className: `h-4 w-4 text-green-500 ${a === u ? "" : "opacity-0"}` }),
|
|
137
|
+
u
|
|
138
138
|
] }),
|
|
139
|
-
h ? /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx("span", { className: "rounded-full bg-purple-100 px-2 py-0.5 text-[10px] text-purple-500", children:
|
|
139
|
+
h ? /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx("span", { className: "rounded-full bg-purple-100 px-2 py-0.5 text-[10px] text-purple-500", children: F(y(o, u, "")) }) }) : /* @__PURE__ */ e.jsx("div", { className: "pl-6", children: /* @__PURE__ */ e.jsx(we, { data: y(n, u) }) })
|
|
140
140
|
]
|
|
141
141
|
},
|
|
142
|
-
|
|
142
|
+
u
|
|
143
143
|
)) })
|
|
144
144
|
] })
|
|
145
145
|
] }) })
|
|
146
146
|
] })
|
|
147
147
|
] }),
|
|
148
|
-
!h && !
|
|
148
|
+
!h && !m(a) && /* @__PURE__ */ e.jsx("div", { className: "pt-2", children: /* @__PURE__ */ e.jsx(we, { data: y(n, a, ""), fullView: !0 }) })
|
|
149
149
|
] });
|
|
150
|
-
},
|
|
150
|
+
}, Qr = ({
|
|
151
151
|
appliedBindings: r = [],
|
|
152
|
-
onAddBinding:
|
|
152
|
+
onAddBinding: a,
|
|
153
153
|
editMode: t,
|
|
154
154
|
item: n
|
|
155
155
|
}) => {
|
|
156
|
-
const [
|
|
157
|
-
(
|
|
158
|
-
if (
|
|
156
|
+
const [l, s] = j(t ? n.key : ""), [d, c] = j(t ? n.value : ""), o = G(), [p] = rt(), h = H(
|
|
157
|
+
(x, u) => {
|
|
158
|
+
if (m(x))
|
|
159
159
|
return "";
|
|
160
160
|
{
|
|
161
|
-
const
|
|
162
|
-
if (
|
|
161
|
+
const v = y(u === "PROP" ? o : p, x, "");
|
|
162
|
+
if (ce(v))
|
|
163
163
|
return "list";
|
|
164
|
-
const
|
|
165
|
-
return
|
|
164
|
+
const C = typeof v;
|
|
165
|
+
return C === "string" ? "text" : C === "object" ? "model" : C;
|
|
166
166
|
}
|
|
167
167
|
},
|
|
168
|
-
[o,
|
|
169
|
-
), [
|
|
168
|
+
[o, p]
|
|
169
|
+
), [i, g] = j(t ? h(n.key, "PROP") : "");
|
|
170
170
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
171
|
-
/* @__PURE__ */ e.jsxs(
|
|
172
|
-
/* @__PURE__ */ e.jsx(
|
|
173
|
-
/* @__PURE__ */ e.jsx(
|
|
171
|
+
/* @__PURE__ */ e.jsxs(or, { children: [
|
|
172
|
+
/* @__PURE__ */ e.jsx(nr, { children: "Add Data Binding" }),
|
|
173
|
+
/* @__PURE__ */ e.jsx(ir, { className: "text-xs", children: "Add prop and path of binding. Click save when you're done." })
|
|
174
174
|
] }),
|
|
175
175
|
/* @__PURE__ */ e.jsxs("div", { className: "relative flex flex-col gap-1", children: [
|
|
176
176
|
/* @__PURE__ */ e.jsx(
|
|
177
|
-
|
|
177
|
+
Le,
|
|
178
178
|
{
|
|
179
179
|
type: "PROP",
|
|
180
180
|
isDisabled: !1,
|
|
181
181
|
placeholder: "Enter prop key",
|
|
182
|
-
value:
|
|
183
|
-
setValue:
|
|
184
|
-
onChange: (
|
|
185
|
-
const
|
|
186
|
-
|
|
182
|
+
value: l,
|
|
183
|
+
setValue: s,
|
|
184
|
+
onChange: (x) => {
|
|
185
|
+
const u = h(x, "PROP");
|
|
186
|
+
s(x), i !== u && c(""), g(u);
|
|
187
187
|
},
|
|
188
188
|
data: o,
|
|
189
|
-
dataType:
|
|
189
|
+
dataType: i,
|
|
190
190
|
appliedBindings: r
|
|
191
191
|
}
|
|
192
192
|
),
|
|
193
193
|
/* @__PURE__ */ e.jsx("div", { className: "h-2" }),
|
|
194
194
|
/* @__PURE__ */ e.jsx(
|
|
195
|
-
|
|
195
|
+
Le,
|
|
196
196
|
{
|
|
197
197
|
type: "PATH",
|
|
198
|
-
isDisabled:
|
|
198
|
+
isDisabled: m(l),
|
|
199
199
|
placeholder: "Enter data path",
|
|
200
|
-
value:
|
|
201
|
-
setValue:
|
|
202
|
-
onChange: (
|
|
203
|
-
const
|
|
204
|
-
|
|
200
|
+
value: d,
|
|
201
|
+
setValue: c,
|
|
202
|
+
onChange: (x) => {
|
|
203
|
+
const u = h(x, "PATH");
|
|
204
|
+
c(i === u ? x : "");
|
|
205
205
|
},
|
|
206
|
-
data:
|
|
207
|
-
dataType:
|
|
206
|
+
data: p,
|
|
207
|
+
dataType: i,
|
|
208
208
|
appliedBindings: r
|
|
209
209
|
}
|
|
210
210
|
)
|
|
211
211
|
] }),
|
|
212
|
-
/* @__PURE__ */ e.jsx(
|
|
213
|
-
|
|
212
|
+
/* @__PURE__ */ e.jsx(dr, { children: /* @__PURE__ */ e.jsx(
|
|
213
|
+
A,
|
|
214
214
|
{
|
|
215
215
|
type: "submit",
|
|
216
216
|
className: "mt-4",
|
|
217
|
-
disabled:
|
|
218
|
-
onClick: () =>
|
|
217
|
+
disabled: m(l) && m(d),
|
|
218
|
+
onClick: () => a({ key: l, value: d }),
|
|
219
219
|
children: "Save"
|
|
220
220
|
}
|
|
221
221
|
) })
|
|
222
222
|
] });
|
|
223
|
-
},
|
|
224
|
-
const [
|
|
225
|
-
return /* @__PURE__ */ e.jsxs(
|
|
226
|
-
/* @__PURE__ */ e.jsx(
|
|
227
|
-
|
|
228
|
-
|
|
223
|
+
}, pt = ({ disabled: r, children: a, onAddBinding: t, appliedBindings: n, editMode: l = !0, item: s = {} }) => {
|
|
224
|
+
const [d, c] = j(!1);
|
|
225
|
+
return /* @__PURE__ */ e.jsxs(cr, { children: [
|
|
226
|
+
/* @__PURE__ */ e.jsx(pr, { disabled: r, asChild: !0, onClick: () => c(!0), children: a }),
|
|
227
|
+
d && /* @__PURE__ */ e.jsx(ur, { children: /* @__PURE__ */ e.jsx(
|
|
228
|
+
Qr,
|
|
229
229
|
{
|
|
230
|
-
item:
|
|
231
|
-
editMode:
|
|
230
|
+
item: s,
|
|
231
|
+
editMode: l,
|
|
232
232
|
appliedBindings: n,
|
|
233
233
|
onAddBinding: (o) => {
|
|
234
|
-
t(o),
|
|
234
|
+
t(o), c(!1);
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
237
|
) })
|
|
238
238
|
] });
|
|
239
|
-
},
|
|
239
|
+
}, es = ({
|
|
240
240
|
item: r,
|
|
241
|
-
onAddBinding:
|
|
241
|
+
onAddBinding: a,
|
|
242
242
|
onRemove: t,
|
|
243
243
|
selectedBlock: n,
|
|
244
|
-
dataProvider:
|
|
245
|
-
appliedBindings:
|
|
244
|
+
dataProvider: l,
|
|
245
|
+
appliedBindings: s
|
|
246
246
|
}) => {
|
|
247
|
-
const [
|
|
248
|
-
if (
|
|
247
|
+
const [d, c] = j("string"), o = (p, h) => {
|
|
248
|
+
if (m(p))
|
|
249
249
|
return "";
|
|
250
250
|
{
|
|
251
|
-
const
|
|
252
|
-
if (
|
|
251
|
+
const i = y(h === "PROP" ? n : l, p, "");
|
|
252
|
+
if (ce(i))
|
|
253
253
|
return "list";
|
|
254
|
-
const
|
|
255
|
-
return
|
|
254
|
+
const g = typeof i;
|
|
255
|
+
return g === "string" ? "text" : g === "object" ? "model" : g;
|
|
256
256
|
}
|
|
257
257
|
};
|
|
258
|
-
return
|
|
258
|
+
return P(() => c(() => o(r.key, "PROP")), [r.key]), /* @__PURE__ */ e.jsxs("div", { className: "relative flex flex-col rounded-md border border-gray-200 p-2", children: [
|
|
259
259
|
/* @__PURE__ */ e.jsx("div", { className: "text-sm font-normal text-gray-500", children: r.key }),
|
|
260
260
|
/* @__PURE__ */ e.jsx("div", { className: "font-medium leading-5", children: r.value }),
|
|
261
|
-
/* @__PURE__ */ e.jsx(
|
|
261
|
+
/* @__PURE__ */ e.jsx(we, { data: y(l, r.value, "") }),
|
|
262
262
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-end gap-x-2", children: [
|
|
263
|
-
/* @__PURE__ */ e.jsx(
|
|
263
|
+
/* @__PURE__ */ e.jsx(pt, { editMode: !0, onAddBinding: a, appliedBindings: s, item: r, children: /* @__PURE__ */ e.jsx(Ir, { className: "mt-1 h-6 w-6 cursor-pointer rounded border border-blue-400 p-1 text-blue-400 duration-200 hover:scale-105 hover:bg-blue-400 hover:text-white" }) }),
|
|
264
264
|
/* @__PURE__ */ e.jsx(
|
|
265
|
-
|
|
265
|
+
Pr,
|
|
266
266
|
{
|
|
267
267
|
onClick: () => t(),
|
|
268
268
|
className: "mt-1 h-6 w-6 cursor-pointer rounded border border-red-400 p-1 text-red-400 duration-200 hover:scale-105 hover:bg-red-400 hover:text-white"
|
|
269
269
|
}
|
|
270
270
|
)
|
|
271
271
|
] }),
|
|
272
|
-
!
|
|
272
|
+
!m(d) && !m(r.key) && /* @__PURE__ */ e.jsx("div", { className: "absolute right-0 top-1 mt-px flex h-4 items-center rounded-full px-2 text-[10px] font-medium text-purple-600", children: F(d) })
|
|
273
273
|
] });
|
|
274
|
-
},
|
|
275
|
-
const t =
|
|
276
|
-
|
|
274
|
+
}, ts = ({ bindingData: r, onChange: a }) => {
|
|
275
|
+
const t = G(), [n] = rt(), l = Er(), [s, d] = j(
|
|
276
|
+
_(r, (i, g) => ({ key: g, value: i }))
|
|
277
277
|
);
|
|
278
|
-
|
|
279
|
-
|
|
278
|
+
P(() => {
|
|
279
|
+
d(_(r, (i, g) => ({ key: g, value: i })));
|
|
280
280
|
}, [t == null ? void 0 : t._id, r]);
|
|
281
|
-
const
|
|
282
|
-
if (
|
|
281
|
+
const c = T(() => {
|
|
282
|
+
if (m(n))
|
|
283
283
|
return !0;
|
|
284
|
-
if (
|
|
284
|
+
if (m(s))
|
|
285
285
|
return !1;
|
|
286
|
-
const
|
|
287
|
-
return
|
|
288
|
-
}, [n,
|
|
289
|
-
const
|
|
290
|
-
|
|
291
|
-
},
|
|
292
|
-
const
|
|
293
|
-
h([...
|
|
286
|
+
const i = Ct(s);
|
|
287
|
+
return m(i == null ? void 0 : i.key) || m(i == null ? void 0 : i.value);
|
|
288
|
+
}, [n, s]), o = (i) => {
|
|
289
|
+
const g = ye(s, (x) => x.key !== i.key);
|
|
290
|
+
d([...g, i]), h([...g, i]);
|
|
291
|
+
}, p = (i) => {
|
|
292
|
+
const g = ye(s, (x, u) => i !== u);
|
|
293
|
+
h([...g]);
|
|
294
294
|
}, h = H(
|
|
295
|
-
(
|
|
296
|
-
if (
|
|
297
|
-
|
|
295
|
+
(i = []) => {
|
|
296
|
+
if (d(i), m(i)) {
|
|
297
|
+
a({});
|
|
298
298
|
return;
|
|
299
299
|
}
|
|
300
|
-
const
|
|
301
|
-
|
|
302
|
-
!
|
|
303
|
-
}),
|
|
300
|
+
const g = {};
|
|
301
|
+
Ne(i, (x) => {
|
|
302
|
+
!m(x == null ? void 0 : x.key) && !m(x == null ? void 0 : x.value) && We(g, x.key, x.value);
|
|
303
|
+
}), a(g);
|
|
304
304
|
},
|
|
305
|
-
[
|
|
305
|
+
[a]
|
|
306
306
|
);
|
|
307
|
-
return
|
|
307
|
+
return m(l) ? /* @__PURE__ */ e.jsx("div", { className: "flex w-full items-center justify-center", children: /* @__PURE__ */ e.jsxs("p", { className: "mb-1.5 text-xs text-gray-500", children: [
|
|
308
308
|
"You have no data providers registered. Please add a data provider to your project. ",
|
|
309
309
|
/* @__PURE__ */ e.jsx("br", {}),
|
|
310
310
|
/* @__PURE__ */ e.jsx("a", { className: "text-blue-500", href: "https://chaibuilder.com/docs/registering-data-providers", target: "_blank", children: "Learn more" })
|
|
311
311
|
] }) }) : /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
312
|
-
|
|
313
|
-
|
|
312
|
+
_(s, (i, g) => /* @__PURE__ */ e.jsx(
|
|
313
|
+
es,
|
|
314
314
|
{
|
|
315
|
-
item:
|
|
315
|
+
item: i,
|
|
316
316
|
onAddBinding: o,
|
|
317
|
-
onRemove: () =>
|
|
317
|
+
onRemove: () => p(g),
|
|
318
318
|
selectedBlock: t,
|
|
319
319
|
dataProvider: n,
|
|
320
|
-
appliedBindings:
|
|
320
|
+
appliedBindings: _(s, "key")
|
|
321
321
|
},
|
|
322
|
-
|
|
322
|
+
i.key
|
|
323
323
|
)),
|
|
324
324
|
/* @__PURE__ */ e.jsxs($, { delayDuration: 200, children: [
|
|
325
|
-
/* @__PURE__ */ e.jsx(
|
|
326
|
-
|
|
325
|
+
/* @__PURE__ */ e.jsx(M, { disabled: m(n), className: "w-full", children: /* @__PURE__ */ e.jsx(
|
|
326
|
+
pt,
|
|
327
327
|
{
|
|
328
|
-
disabled:
|
|
329
|
-
appliedBindings:
|
|
328
|
+
disabled: c,
|
|
329
|
+
appliedBindings: _(s, "key"),
|
|
330
330
|
onAddBinding: o,
|
|
331
331
|
children: /* @__PURE__ */ e.jsx(
|
|
332
332
|
"span",
|
|
333
333
|
{
|
|
334
|
-
className: `w-full rounded-md px-5 py-1.5 text-xs font-medium duration-200 ${
|
|
335
|
-
children:
|
|
334
|
+
className: `w-full rounded-md px-5 py-1.5 text-xs font-medium duration-200 ${c ? "cursor-not-allowed bg-gray-200 text-gray-400" : "bg-blue-700/20 text-blue-800 hover:bg-blue-700/30"}`,
|
|
335
|
+
children: m(n) ? /* @__PURE__ */ e.jsx("small", { className: "text-[9.5px] text-gray-500", children: "No data provider has been set up for this page" }) : "+ Add Data Binding"
|
|
336
336
|
}
|
|
337
337
|
)
|
|
338
338
|
}
|
|
339
339
|
) }),
|
|
340
|
-
|
|
340
|
+
c && /* @__PURE__ */ e.jsx(E, { sideOffset: -55, className: "text-[11px]", children: m(n) ? "No data provider has been set up for this page." : "Complete last added data binding to add more" })
|
|
341
341
|
] })
|
|
342
342
|
] });
|
|
343
|
-
},
|
|
344
|
-
const [
|
|
345
|
-
Object.keys(
|
|
346
|
-
const h =
|
|
347
|
-
if (
|
|
343
|
+
}, rs = () => /* @__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" }), Ce = mt(({ id: r, properties: a, formData: t, onChange: n }) => {
|
|
344
|
+
const [l, s] = j(t), d = { type: "object", properties: {} }, c = {};
|
|
345
|
+
Object.keys(a).forEach((p) => {
|
|
346
|
+
const h = a[p];
|
|
347
|
+
if (X(["slot", "styles"], h.type))
|
|
348
348
|
return;
|
|
349
|
-
const
|
|
350
|
-
|
|
351
|
-
}),
|
|
352
|
-
|
|
349
|
+
const i = p;
|
|
350
|
+
d.properties[i] = gr(h), c[i] = xr(h);
|
|
351
|
+
}), P(() => {
|
|
352
|
+
s(t);
|
|
353
353
|
}, [r]);
|
|
354
|
-
const o =
|
|
355
|
-
async ({ formData:
|
|
356
|
-
n({ formData:
|
|
354
|
+
const o = de(
|
|
355
|
+
async ({ formData: p }, h) => {
|
|
356
|
+
n({ formData: p }, h);
|
|
357
357
|
},
|
|
358
358
|
[n],
|
|
359
359
|
1e3
|
|
360
360
|
// save only every 5 seconds
|
|
361
361
|
);
|
|
362
362
|
return /* @__PURE__ */ e.jsx(
|
|
363
|
-
|
|
363
|
+
Xr,
|
|
364
364
|
{
|
|
365
365
|
widgets: {
|
|
366
|
-
binding:
|
|
367
|
-
richtext:
|
|
368
|
-
icon:
|
|
369
|
-
image:
|
|
366
|
+
binding: rs,
|
|
367
|
+
richtext: yr,
|
|
368
|
+
icon: hr,
|
|
369
|
+
image: br
|
|
370
370
|
},
|
|
371
|
-
fields: { link:
|
|
371
|
+
fields: { link: mr },
|
|
372
372
|
idSeparator: ".",
|
|
373
373
|
autoComplete: "off",
|
|
374
374
|
omitExtraData: !1,
|
|
375
375
|
liveOmit: !1,
|
|
376
376
|
liveValidate: !1,
|
|
377
|
-
validator:
|
|
378
|
-
uiSchema:
|
|
379
|
-
schema:
|
|
380
|
-
formData:
|
|
381
|
-
onChange: ({ formData:
|
|
382
|
-
h && (
|
|
377
|
+
validator: Fr,
|
|
378
|
+
uiSchema: c,
|
|
379
|
+
schema: d,
|
|
380
|
+
formData: l,
|
|
381
|
+
onChange: ({ formData: p }, h) => {
|
|
382
|
+
h && (s(p), o({ formData: p }, h));
|
|
383
383
|
}
|
|
384
384
|
}
|
|
385
385
|
);
|
|
386
|
-
}),
|
|
387
|
-
const [r,
|
|
388
|
-
|
|
386
|
+
}), ss = () => {
|
|
387
|
+
const [r, a] = Zr(), t = fr(), n = (d, c) => {
|
|
388
|
+
a((o) => ({ ...o, [d]: c }));
|
|
389
389
|
};
|
|
390
|
-
if (
|
|
390
|
+
if (m(t))
|
|
391
391
|
return null;
|
|
392
|
-
const { block:
|
|
392
|
+
const { block: l, settings: s } = t;
|
|
393
393
|
return /* @__PURE__ */ e.jsxs("div", { className: "text-xs hover:no-underline", children: [
|
|
394
394
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2 bg-gray-100 px-4 py-2", children: [
|
|
395
395
|
t.block._type,
|
|
396
396
|
" settings"
|
|
397
397
|
] }),
|
|
398
398
|
/* @__PURE__ */ e.jsx("div", { className: "bg-white pb-2", children: /* @__PURE__ */ e.jsx(
|
|
399
|
-
|
|
399
|
+
Ce,
|
|
400
400
|
{
|
|
401
|
-
id:
|
|
402
|
-
onChange: ({ formData:
|
|
403
|
-
formData:
|
|
404
|
-
properties:
|
|
401
|
+
id: l == null ? void 0 : l._id,
|
|
402
|
+
onChange: ({ formData: d }) => n(l._id, d),
|
|
403
|
+
formData: y(r, l._id, {}),
|
|
404
|
+
properties: s
|
|
405
405
|
}
|
|
406
406
|
) })
|
|
407
407
|
] });
|
|
408
408
|
};
|
|
409
|
-
function
|
|
410
|
-
const r =
|
|
411
|
-
if (
|
|
412
|
-
const
|
|
413
|
-
t([r._id], { [
|
|
409
|
+
function as() {
|
|
410
|
+
const r = G(), a = st(), t = at(), n = Re(r._type), l = { ...r }, [s, d] = j(l), c = lt("dataBindingSupport", !1), o = ({ formData: x }, u, v) => {
|
|
411
|
+
if (u && (s == null ? void 0 : s._id) === r._id) {
|
|
412
|
+
const C = u.replace("root.", "");
|
|
413
|
+
t([r._id], { [C]: y(x, C) }, v);
|
|
414
414
|
}
|
|
415
|
-
},
|
|
416
|
-
kt(({ formData: x },
|
|
417
|
-
o({ formData: x },
|
|
415
|
+
}, p = H(
|
|
416
|
+
kt(({ formData: x }, u, v) => {
|
|
417
|
+
o({ formData: x }, u, v), d(x);
|
|
418
418
|
}, 1500),
|
|
419
419
|
[r == null ? void 0 : r._id]
|
|
420
|
-
), h = ({ formData: x },
|
|
421
|
-
if (
|
|
422
|
-
const
|
|
423
|
-
|
|
420
|
+
), h = ({ formData: x }, u) => {
|
|
421
|
+
if (u) {
|
|
422
|
+
const v = u.replace("root.", "");
|
|
423
|
+
a(
|
|
424
|
+
[r._id],
|
|
425
|
+
vr(v, y(x, v.split(".")))
|
|
426
|
+
), p({ formData: x }, u, { [v]: y(s, v) });
|
|
424
427
|
}
|
|
425
|
-
},
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
})
|
|
430
|
-
}, u = je(g(s, "_bindings", {})), y = S(() => {
|
|
431
|
-
const x = Nt(g(n, "props", {}));
|
|
432
|
-
return d && _t(u, (f) => delete x[f]), x;
|
|
433
|
-
}, [n, u, d]);
|
|
428
|
+
}, i = he(y(l, "_bindings", {})), g = T(() => {
|
|
429
|
+
const x = Nt(y(n, "props", {}));
|
|
430
|
+
return c && _t(i, (u) => delete x[u]), x;
|
|
431
|
+
}, [n, i, c]);
|
|
434
432
|
return /* @__PURE__ */ e.jsxs("div", { className: "overflow-x-hidden", children: [
|
|
435
|
-
/* @__PURE__ */ e.jsx(
|
|
436
|
-
/* @__PURE__ */ e.
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
/* @__PURE__ */ e.jsxs(Ce, { value: "BINDING", children: [
|
|
440
|
-
/* @__PURE__ */ e.jsx(ke, { className: "bg-gray-100 px-3 py-2 text-xs hover:no-underline", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
|
|
433
|
+
/* @__PURE__ */ e.jsx(ss, {}),
|
|
434
|
+
c ? /* @__PURE__ */ e.jsxs(ot, { type: "multiple", defaultValue: ["STATIC", "BINDING"], className: "h-full w-full", children: [
|
|
435
|
+
/* @__PURE__ */ e.jsxs(me, { value: "BINDING", children: [
|
|
436
|
+
/* @__PURE__ */ e.jsx(fe, { className: "bg-gray-100 px-3 py-2 text-xs hover:no-underline", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
|
|
441
437
|
/* @__PURE__ */ e.jsx(
|
|
442
438
|
"div",
|
|
443
439
|
{
|
|
444
|
-
className: `h-[8px] w-[8px] rounded-full ${
|
|
440
|
+
className: `h-[8px] w-[8px] rounded-full ${m(y(r, "_bindings", {})) ? "bg-gray-300" : "bg-blue-500"}`
|
|
445
441
|
}
|
|
446
442
|
),
|
|
447
443
|
"Data Binding"
|
|
448
444
|
] }) }),
|
|
449
|
-
/* @__PURE__ */ e.jsx(
|
|
450
|
-
|
|
445
|
+
/* @__PURE__ */ e.jsx(ve, { className: "px-4 pt-4", children: /* @__PURE__ */ e.jsx(
|
|
446
|
+
ts,
|
|
451
447
|
{
|
|
452
|
-
bindingData:
|
|
448
|
+
bindingData: y(r, "_bindings", {}),
|
|
453
449
|
onChange: (x) => {
|
|
454
450
|
o({ formData: { _bindings: x } }, "root._bindings");
|
|
455
451
|
}
|
|
456
452
|
}
|
|
457
453
|
) })
|
|
458
454
|
] }),
|
|
459
|
-
/* @__PURE__ */ e.jsxs(
|
|
460
|
-
/* @__PURE__ */ e.jsx(
|
|
455
|
+
/* @__PURE__ */ e.jsxs(me, { value: "STATIC", children: [
|
|
456
|
+
/* @__PURE__ */ e.jsx(fe, { className: "bg-gray-100 px-3 py-2 text-xs hover:no-underline", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
|
|
461
457
|
/* @__PURE__ */ e.jsx("div", { className: "h-[8px] w-[8px] rounded-full bg-blue-500" }),
|
|
462
458
|
"Static Content"
|
|
463
459
|
] }) }),
|
|
464
|
-
/* @__PURE__ */ e.jsxs(
|
|
465
|
-
|
|
460
|
+
/* @__PURE__ */ e.jsxs(ve, { className: "pt-4", children: [
|
|
461
|
+
m(i) ? null : /* @__PURE__ */ e.jsxs("div", { className: "mx-4 mb-1 mt-0 rounded-sm border border-orange-500 bg-orange-100 p-1 text-xs text-orange-500", children: [
|
|
466
462
|
"Data binding is set for ",
|
|
467
|
-
/* @__PURE__ */ e.jsx("b", { children:
|
|
463
|
+
/* @__PURE__ */ e.jsx("b", { children: _(i, be).join(", ") }),
|
|
468
464
|
" ",
|
|
469
|
-
|
|
465
|
+
i.length === 1 ? "property" : "properties",
|
|
470
466
|
". Remove data binding to edit static content."
|
|
471
467
|
] }),
|
|
472
468
|
/* @__PURE__ */ e.jsx(
|
|
473
|
-
|
|
469
|
+
Ce,
|
|
474
470
|
{
|
|
475
471
|
id: r == null ? void 0 : r._id,
|
|
476
472
|
onChange: h,
|
|
477
|
-
formData:
|
|
478
|
-
properties:
|
|
473
|
+
formData: l,
|
|
474
|
+
properties: g
|
|
479
475
|
}
|
|
480
476
|
)
|
|
481
477
|
] })
|
|
482
478
|
] })
|
|
483
479
|
] }) : /* @__PURE__ */ e.jsx(
|
|
484
|
-
|
|
480
|
+
Ce,
|
|
485
481
|
{
|
|
486
482
|
id: r == null ? void 0 : r._id,
|
|
487
483
|
onChange: h,
|
|
488
|
-
formData:
|
|
489
|
-
properties:
|
|
484
|
+
formData: l,
|
|
485
|
+
properties: g
|
|
490
486
|
}
|
|
491
|
-
)
|
|
492
|
-
/* @__PURE__ */ e.jsx("div", { className: "pb-60" })
|
|
487
|
+
)
|
|
493
488
|
] });
|
|
494
489
|
}
|
|
495
|
-
const
|
|
490
|
+
const ls = ({ blockId: r }) => {
|
|
491
|
+
const { t: a } = B(), { askAi: t, loading: n, error: l } = jr(), [s, d] = j(""), c = ft(null);
|
|
492
|
+
P(() => {
|
|
493
|
+
var p;
|
|
494
|
+
(p = c.current) == null || p.focus();
|
|
495
|
+
}, []);
|
|
496
|
+
const o = () => {
|
|
497
|
+
l || d("");
|
|
498
|
+
};
|
|
499
|
+
return /* @__PURE__ */ e.jsxs("div", { className: "", children: [
|
|
500
|
+
/* @__PURE__ */ e.jsx("h2", { className: "mb-1 text-sm font-semibold leading-none tracking-tight", children: a("Ask AI") }),
|
|
501
|
+
/* @__PURE__ */ e.jsx(
|
|
502
|
+
wr,
|
|
503
|
+
{
|
|
504
|
+
ref: c,
|
|
505
|
+
value: s,
|
|
506
|
+
onChange: (p) => d(p.target.value),
|
|
507
|
+
placeholder: a("Ask AI to edit styles"),
|
|
508
|
+
className: "w-full border border-gray-400 focus:border-0",
|
|
509
|
+
rows: 3,
|
|
510
|
+
onKeyDown: (p) => {
|
|
511
|
+
p.key === "Enter" && (p.preventDefault(), t("styles", r, s, o));
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
),
|
|
515
|
+
/* @__PURE__ */ e.jsxs("div", { className: "my-2 flex items-center gap-2", children: [
|
|
516
|
+
n ? null : /* @__PURE__ */ e.jsx(
|
|
517
|
+
A,
|
|
518
|
+
{
|
|
519
|
+
disabled: s.trim().length < 5 || n,
|
|
520
|
+
onClick: () => t("styles", r, s, o),
|
|
521
|
+
variant: "default",
|
|
522
|
+
className: "w-fit",
|
|
523
|
+
size: "sm",
|
|
524
|
+
children: n ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
525
|
+
/* @__PURE__ */ e.jsx(Ar, { className: "h-5 w-5 animate-spin" }),
|
|
526
|
+
a("Generating... Please wait")
|
|
527
|
+
] }) : a("Edit with AI")
|
|
528
|
+
}
|
|
529
|
+
),
|
|
530
|
+
n ? /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
531
|
+
/* @__PURE__ */ e.jsxs(Cr, { className: "flex w-full items-center space-x-1 px-4 py-1 pl-2", children: [
|
|
532
|
+
/* @__PURE__ */ e.jsx(kr, { className: "h-4 w-4 animate-spin text-gray-500" }),
|
|
533
|
+
/* @__PURE__ */ e.jsx("p", { className: "text-xs", children: a("Generating... Please wait") })
|
|
534
|
+
] }),
|
|
535
|
+
/* @__PURE__ */ e.jsx(A, { variant: "destructive", onClick: () => stop(), className: "hidden w-fit", size: "sm", children: a("Stop") })
|
|
536
|
+
] }) : null
|
|
537
|
+
] })
|
|
538
|
+
] });
|
|
539
|
+
}, Oe = new Ur(Gr, {
|
|
496
540
|
isCaseSensitive: !1,
|
|
497
541
|
threshold: 0.2,
|
|
498
542
|
minMatchCharLength: 2,
|
|
499
543
|
keys: ["name"]
|
|
500
544
|
});
|
|
501
|
-
function
|
|
502
|
-
var
|
|
503
|
-
const
|
|
504
|
-
const
|
|
505
|
-
|
|
506
|
-
}, [
|
|
507
|
-
const
|
|
508
|
-
let
|
|
509
|
-
if (
|
|
510
|
-
const [
|
|
511
|
-
|
|
512
|
-
...
|
|
513
|
-
item: { ...
|
|
545
|
+
function ut() {
|
|
546
|
+
var S;
|
|
547
|
+
const { t: r } = B(), [a] = pe(), t = G(), n = Te(), l = nt(), [s] = it(), d = lt("askAiCallBack", null), [c, o] = j(""), { toast: p } = dt(), h = (S = ae(a)) == null ? void 0 : S.prop, i = St((y(t, h, "").replace(qr, "").split(",").pop() || "").split(" "), m), g = () => {
|
|
548
|
+
const w = c.trim().toLowerCase().replace(/ +(?= )/g, "").split(" ");
|
|
549
|
+
n(s, w, !0), o("");
|
|
550
|
+
}, [x, u] = j([]), v = ({ value: w }) => {
|
|
551
|
+
const D = w.trim().toLowerCase(), Z = D.match(/.+:/g);
|
|
552
|
+
let b = [];
|
|
553
|
+
if (Z && Z.length > 0) {
|
|
554
|
+
const [f] = Z, N = D.replace(f, "");
|
|
555
|
+
b = Oe.search(N).map((z) => ({
|
|
556
|
+
...z,
|
|
557
|
+
item: { ...z.item, name: f + z.item.name }
|
|
514
558
|
}));
|
|
515
559
|
} else
|
|
516
|
-
|
|
517
|
-
u(
|
|
518
|
-
},
|
|
560
|
+
b = Oe.search(D);
|
|
561
|
+
return u(_(b, "item"));
|
|
562
|
+
}, C = () => {
|
|
519
563
|
u([]);
|
|
520
|
-
},
|
|
564
|
+
}, U = (w) => w.name, L = (w) => /* @__PURE__ */ e.jsx("div", { className: "rounded-md p-1", children: w.name }), K = {
|
|
521
565
|
autoComplete: "off",
|
|
522
566
|
autoCorrect: "off",
|
|
523
567
|
autoCapitalize: "off",
|
|
524
568
|
spellCheck: !1,
|
|
525
|
-
placeholder: "Enter
|
|
526
|
-
value:
|
|
527
|
-
onKeyDown: (
|
|
528
|
-
|
|
569
|
+
placeholder: r("Enter classes separated by space"),
|
|
570
|
+
value: c,
|
|
571
|
+
onKeyDown: (w) => {
|
|
572
|
+
w.key === "Enter" && c.trim() !== "" && g();
|
|
529
573
|
},
|
|
530
|
-
onChange: (
|
|
574
|
+
onChange: (w, { newValue: D }) => o(D),
|
|
531
575
|
className: "w-full rounded-md text-xs px-2 hover:outline-0 bg-background border-border py-1"
|
|
532
|
-
},
|
|
576
|
+
}, q = () => {
|
|
533
577
|
if (navigator.clipboard === void 0) {
|
|
534
|
-
|
|
578
|
+
p({
|
|
535
579
|
title: "Clipboard not supported",
|
|
536
580
|
description: "Please use Chrome, Firefox or Safari",
|
|
537
581
|
variant: "destructive"
|
|
538
582
|
});
|
|
539
583
|
return;
|
|
540
584
|
}
|
|
541
|
-
navigator.clipboard.writeText(
|
|
585
|
+
navigator.clipboard.writeText(i.join(" ")), p({
|
|
542
586
|
title: "Copied",
|
|
543
587
|
description: "Classes copied to clipboard"
|
|
544
588
|
});
|
|
@@ -546,83 +590,209 @@ function cs() {
|
|
|
546
590
|
return /* @__PURE__ */ e.jsxs(
|
|
547
591
|
"div",
|
|
548
592
|
{
|
|
549
|
-
className: `
|
|
593
|
+
className: `flex ${x.length > 0 ? "min-h-[300px]" : "min-h-max"} w-full flex-col gap-y-1.5 overflow-y-auto border-b-2 bg-gray-100 pb-4`,
|
|
550
594
|
children: [
|
|
551
|
-
/* @__PURE__ */ e.jsxs(
|
|
552
|
-
/* @__PURE__ */ e.
|
|
553
|
-
|
|
554
|
-
/* @__PURE__ */ e.
|
|
555
|
-
|
|
556
|
-
|
|
595
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-x-2", children: [
|
|
596
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
|
|
597
|
+
/* @__PURE__ */ e.jsx("span", { children: r("Classes") }),
|
|
598
|
+
/* @__PURE__ */ e.jsxs($, { children: [
|
|
599
|
+
/* @__PURE__ */ e.jsx(M, { asChild: !0, children: /* @__PURE__ */ e.jsx(It, { onClick: q, className: "cursor-pointer" }) }),
|
|
600
|
+
/* @__PURE__ */ e.jsx(E, { children: /* @__PURE__ */ e.jsx("p", { children: r("Copy classes to clipboard") }) })
|
|
601
|
+
] })
|
|
602
|
+
] }),
|
|
603
|
+
d ? /* @__PURE__ */ e.jsxs(Qe, { children: [
|
|
604
|
+
/* @__PURE__ */ e.jsx(et, { children: /* @__PURE__ */ e.jsxs(A, { variant: "default", className: "h-6 w-fit", size: "sm", children: [
|
|
605
|
+
/* @__PURE__ */ e.jsx($r, { className: "h-4 w-4" }),
|
|
606
|
+
/* @__PURE__ */ e.jsx("span", { className: "ml-2", children: r("Ask AI") })
|
|
607
|
+
] }) }),
|
|
608
|
+
/* @__PURE__ */ e.jsx(tt, { side: "left", className: "p-2", children: /* @__PURE__ */ e.jsx(ls, { blockId: t == null ? void 0 : t._id }) })
|
|
609
|
+
] }) : null
|
|
557
610
|
] }),
|
|
558
|
-
/* @__PURE__ */ e.jsxs("div", { className: "relative
|
|
611
|
+
/* @__PURE__ */ e.jsxs("div", { className: "relative flex items-center gap-x-3", children: [
|
|
559
612
|
/* @__PURE__ */ e.jsx("div", { className: "relative flex w-full items-center gap-x-3", children: /* @__PURE__ */ e.jsx(
|
|
560
|
-
|
|
613
|
+
Wr,
|
|
561
614
|
{
|
|
562
|
-
suggestions:
|
|
563
|
-
onSuggestionsFetchRequested:
|
|
564
|
-
onSuggestionsClearRequested:
|
|
565
|
-
getSuggestionValue:
|
|
566
|
-
renderSuggestion:
|
|
567
|
-
inputProps:
|
|
615
|
+
suggestions: x,
|
|
616
|
+
onSuggestionsFetchRequested: v,
|
|
617
|
+
onSuggestionsClearRequested: C,
|
|
618
|
+
getSuggestionValue: U,
|
|
619
|
+
renderSuggestion: L,
|
|
620
|
+
inputProps: K,
|
|
568
621
|
containerProps: {
|
|
569
622
|
className: "relative h-8 w-full gap-y-1 py-1 border-gray-600"
|
|
570
623
|
},
|
|
571
624
|
theme: {
|
|
572
625
|
suggestion: "bg-transparent",
|
|
573
|
-
suggestionHighlighted: "bg-gray-
|
|
626
|
+
suggestionHighlighted: "!bg-gray-300 ",
|
|
574
627
|
suggestionsContainerOpen: "absolute bg-gray-100 z-50 max-h-[230px] overflow-y-auto w-full border border-gray-600 rounded-md"
|
|
575
628
|
}
|
|
576
629
|
}
|
|
577
630
|
) }),
|
|
578
631
|
/* @__PURE__ */ e.jsx(
|
|
579
|
-
|
|
632
|
+
A,
|
|
580
633
|
{
|
|
581
634
|
variant: "outline",
|
|
582
635
|
className: "h-6 border-gray-700",
|
|
583
|
-
onClick:
|
|
584
|
-
disabled:
|
|
636
|
+
onClick: g,
|
|
637
|
+
disabled: c.trim() === "",
|
|
585
638
|
size: "sm",
|
|
586
|
-
children: /* @__PURE__ */ e.jsx(
|
|
639
|
+
children: /* @__PURE__ */ e.jsx(_e, {})
|
|
587
640
|
}
|
|
588
641
|
)
|
|
589
642
|
] }),
|
|
590
|
-
/* @__PURE__ */ e.
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
"
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
))
|
|
610
|
-
)
|
|
611
|
-
] })
|
|
643
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex w-full flex-wrap gap-2 overflow-x-hidden", children: ne.Children.toArray(
|
|
644
|
+
i.map((w) => /* @__PURE__ */ e.jsxs(
|
|
645
|
+
"div",
|
|
646
|
+
{
|
|
647
|
+
className: "group relative flex max-w-[260px] cursor-default items-center gap-x-1 truncate rounded border border-gray-300 bg-gray-200 p-px px-1.5 text-[11px] text-gray-600 hover:border-gray-300",
|
|
648
|
+
children: [
|
|
649
|
+
w,
|
|
650
|
+
/* @__PURE__ */ e.jsx(
|
|
651
|
+
Ge,
|
|
652
|
+
{
|
|
653
|
+
onClick: () => l(s, [w]),
|
|
654
|
+
className: "invisible absolute right-1 rounded-full bg-red-400 hover:text-white group-hover:visible group-hover:cursor-pointer"
|
|
655
|
+
}
|
|
656
|
+
)
|
|
657
|
+
]
|
|
658
|
+
},
|
|
659
|
+
w
|
|
660
|
+
))
|
|
661
|
+
) })
|
|
612
662
|
]
|
|
613
663
|
}
|
|
614
664
|
);
|
|
615
665
|
}
|
|
616
|
-
const
|
|
666
|
+
const os = ({ onAdd: r }) => {
|
|
667
|
+
const { t: a } = B(), [t, n] = j({ key: "", value: "" }), l = () => {
|
|
668
|
+
m(t.key) || (r({ ...t, key: Tt(t.key) }), n({ key: "", value: "" }));
|
|
669
|
+
};
|
|
670
|
+
return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1 border-gray-200", children: [
|
|
671
|
+
/* @__PURE__ */ e.jsx(
|
|
672
|
+
je,
|
|
673
|
+
{
|
|
674
|
+
name: "key",
|
|
675
|
+
className: "h-6",
|
|
676
|
+
onChange: (s) => n({ ...t, key: s.target.value }),
|
|
677
|
+
value: t.key,
|
|
678
|
+
placeholder: a("Name"),
|
|
679
|
+
autoComplete: "off",
|
|
680
|
+
autoCapitalize: "off",
|
|
681
|
+
onKeyDown: (s) => {
|
|
682
|
+
s.key === "Enter" && (s.preventDefault(), m(t.key) || l());
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
),
|
|
686
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-x-1.5", children: /* @__PURE__ */ e.jsx(
|
|
687
|
+
je,
|
|
688
|
+
{
|
|
689
|
+
className: "h-6",
|
|
690
|
+
name: "value",
|
|
691
|
+
onChange: (s) => n({ ...t, value: s.target.value }),
|
|
692
|
+
value: t.value,
|
|
693
|
+
placeholder: a("Value"),
|
|
694
|
+
autoComplete: "off",
|
|
695
|
+
autoCapitalize: "off",
|
|
696
|
+
onKeyDown: (s) => {
|
|
697
|
+
s.key === "Enter" && (s.preventDefault(), m(t.key) || l());
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
) }),
|
|
701
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
|
|
702
|
+
/* @__PURE__ */ e.jsxs(A, { disabled: m(t.key), onClick: l, size: "sm", className: "flex items-center", children: [
|
|
703
|
+
/* @__PURE__ */ e.jsxs("span", { children: [
|
|
704
|
+
a("Add"),
|
|
705
|
+
" "
|
|
706
|
+
] }),
|
|
707
|
+
/* @__PURE__ */ e.jsx(_e, {})
|
|
708
|
+
] }),
|
|
709
|
+
m(t.key) ? null : /* @__PURE__ */ e.jsx(A, { variant: "ghost", onClick: () => n({ key: "", value: "" }), children: a("Cancel") })
|
|
710
|
+
] })
|
|
711
|
+
] });
|
|
712
|
+
}, ns = () => {
|
|
713
|
+
const r = G(), [a, t] = j([]), [n] = pe(), l = st(), s = at(), { t: d } = B(), { toast: c } = dt(), o = `${y(n, "0.prop")}_attrs`;
|
|
714
|
+
ne.useEffect(() => {
|
|
715
|
+
const g = _(y(r, o), (x, u) => ({ key: u, value: x }));
|
|
716
|
+
m(g) ? t([]) : t(g);
|
|
717
|
+
}, [y(r, o)]);
|
|
718
|
+
const p = (g) => {
|
|
719
|
+
const x = ye(a, (u, v) => g !== v);
|
|
720
|
+
i(x);
|
|
721
|
+
}, h = (g) => {
|
|
722
|
+
const x = Ze(a, { key: g.key });
|
|
723
|
+
if (x && (x.value.startsWith("dnd-") || x.value.startsWith("#dnd-"))) {
|
|
724
|
+
c({
|
|
725
|
+
title: d("Cannot add predefined attribute"),
|
|
726
|
+
variant: "destructive",
|
|
727
|
+
description: d(`"(${g.key})" cannot be added as it is a predefined attribute for this block`)
|
|
728
|
+
});
|
|
729
|
+
return;
|
|
730
|
+
}
|
|
731
|
+
const u = [...a, g];
|
|
732
|
+
i(u);
|
|
733
|
+
}, i = ne.useCallback(
|
|
734
|
+
(g = []) => {
|
|
735
|
+
const x = {};
|
|
736
|
+
Ne(g, (u) => {
|
|
737
|
+
m(u.key) || We(x, u.key, u.value);
|
|
738
|
+
}), s([y(r, "_id")], { [o]: x });
|
|
739
|
+
},
|
|
740
|
+
[r, l, o]
|
|
741
|
+
);
|
|
742
|
+
return /* @__PURE__ */ e.jsx("div", { className: "flex min-h-max flex-col gap-y-2 overflow-y-auto", children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col", children: [
|
|
743
|
+
/* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsxs("ul", { className: "overflow-hidden rounded-md bg-gray-100 p-2 text-xs text-gray-700", children: [
|
|
744
|
+
m(a) ? /* @__PURE__ */ e.jsx("li", { className: "flex h-4 items-center justify-center", children: /* @__PURE__ */ e.jsx("p", { children: d("No custom attributes added yet") }) }) : /* @__PURE__ */ e.jsx("li", { children: /* @__PURE__ */ e.jsx("span", { className: "font-bold", children: d("Attributes") }) }),
|
|
745
|
+
ne.Children.toArray(
|
|
746
|
+
_(a, (g) => /* @__PURE__ */ e.jsxs("li", { className: "group flex max-w-full items-center justify-between", children: [
|
|
747
|
+
/* @__PURE__ */ e.jsxs($, { delayDuration: 1e3, children: [
|
|
748
|
+
/* @__PURE__ */ e.jsx(M, { asChild: !0, children: /* @__PURE__ */ e.jsxs("div", { className: "w-[90%] cursor-default truncate px-1 hover:bg-gray-200", children: [
|
|
749
|
+
g.key,
|
|
750
|
+
" ",
|
|
751
|
+
/* @__PURE__ */ e.jsx("span", { className: "font-bold text-orange-500", children: "=" }),
|
|
752
|
+
" ",
|
|
753
|
+
g.value
|
|
754
|
+
] }) }),
|
|
755
|
+
/* @__PURE__ */ e.jsxs(E, { className: "max-w-[200px]", children: [
|
|
756
|
+
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
757
|
+
d("Name"),
|
|
758
|
+
": ",
|
|
759
|
+
g.key
|
|
760
|
+
] }),
|
|
761
|
+
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
762
|
+
d("Value"),
|
|
763
|
+
": ",
|
|
764
|
+
g.value
|
|
765
|
+
] })
|
|
766
|
+
] })
|
|
767
|
+
] }),
|
|
768
|
+
/* @__PURE__ */ e.jsxs($, { children: [
|
|
769
|
+
/* @__PURE__ */ e.jsx(M, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
770
|
+
"button",
|
|
771
|
+
{
|
|
772
|
+
disabled: W(g.value, "dnd-"),
|
|
773
|
+
className: "invisible group-hover:visible",
|
|
774
|
+
onClick: () => p(a.indexOf(g)),
|
|
775
|
+
children: /* @__PURE__ */ e.jsx(Mr, { className: "w-4 text-gray-500" })
|
|
776
|
+
}
|
|
777
|
+
) }),
|
|
778
|
+
/* @__PURE__ */ e.jsx(E, { className: "max-w-[200px]", children: W(g.value, "dnd-") ? d("Predefined attribute. Cannot be deleted") : d("Remove attribute") })
|
|
779
|
+
] })
|
|
780
|
+
] }))
|
|
781
|
+
)
|
|
782
|
+
] }) }),
|
|
783
|
+
/* @__PURE__ */ e.jsx("div", { className: "py-2" }),
|
|
784
|
+
/* @__PURE__ */ e.jsx(os, { onAdd: (g) => h(g) })
|
|
785
|
+
] }) });
|
|
786
|
+
}, k = ["px", "%", "em", "rem", "ch", "vh", "vw"], is = {
|
|
617
787
|
heading: "flex.heading",
|
|
618
788
|
items: [
|
|
619
|
-
{ type: "arbitrary", label: "flex.basis", units:
|
|
789
|
+
{ type: "arbitrary", label: "flex.basis", units: k, property: "flexBasis" },
|
|
620
790
|
{ type: "range", label: "flex.order", property: "order" },
|
|
621
791
|
{ type: "dropdown", label: "flex.flex", property: "flexGrowShrink" },
|
|
622
792
|
{ type: "dropdown", label: "flex.grow", property: "flexGrow" },
|
|
623
793
|
{ type: "dropdown", label: "flex.shrink", property: "flexShrink" }
|
|
624
794
|
]
|
|
625
|
-
},
|
|
795
|
+
}, ds = {
|
|
626
796
|
heading: "grid.heading",
|
|
627
797
|
items: [
|
|
628
798
|
{ type: "range", label: "grid.col_span", property: "gridColSpan" },
|
|
@@ -633,17 +803,83 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], ps = {
|
|
|
633
803
|
{ type: "range", label: "grid.row_end", property: "gridRowEnd" },
|
|
634
804
|
{ type: "range", label: "grid.order", property: "order" }
|
|
635
805
|
]
|
|
636
|
-
},
|
|
806
|
+
}, cs = [
|
|
807
|
+
{
|
|
808
|
+
heading: "Styles",
|
|
809
|
+
items: [
|
|
810
|
+
{ component: ut },
|
|
811
|
+
{ type: "arbitrary", label: "layout.width", units: k.concat("auto"), property: "width" },
|
|
812
|
+
{ type: "arbitrary", label: "layout.height", units: k.concat("auto"), property: "height" },
|
|
813
|
+
{
|
|
814
|
+
styleType: "multiple",
|
|
815
|
+
label: "layout.margin",
|
|
816
|
+
negative: !0,
|
|
817
|
+
units: [...k, "auto"],
|
|
818
|
+
options: [
|
|
819
|
+
{ key: "margin", label: "layout.margin_all" },
|
|
820
|
+
{ key: "marginX", label: "layout.margin_lr" },
|
|
821
|
+
{ key: "marginY", label: "layout.margin_tb" },
|
|
822
|
+
{ key: "marginTop", label: "layout.margin_top" },
|
|
823
|
+
{ key: "marginRight", label: "layout.margin_right" },
|
|
824
|
+
{ key: "marginBottom", label: "layout.margin_bottom" },
|
|
825
|
+
{ key: "marginLeft", label: "layout.margin_left" }
|
|
826
|
+
]
|
|
827
|
+
},
|
|
828
|
+
{
|
|
829
|
+
styleType: "multiple",
|
|
830
|
+
label: "layout.padding",
|
|
831
|
+
options: [
|
|
832
|
+
{ key: "padding", label: "layout.padding_all" },
|
|
833
|
+
{ key: "paddingX", label: "layout.padding_lr" },
|
|
834
|
+
{ key: "paddingY", label: "layout.padding_tb" },
|
|
835
|
+
{ key: "paddingTop", label: "layout.padding_top" },
|
|
836
|
+
{ key: "paddingRight", label: "layout.padding_right" },
|
|
837
|
+
{ key: "paddingBottom", label: "layout.padding_bottom" },
|
|
838
|
+
{ key: "paddingLeft", label: "layout.padding_left" }
|
|
839
|
+
]
|
|
840
|
+
},
|
|
841
|
+
{
|
|
842
|
+
styleType: "accordion",
|
|
843
|
+
heading: "Typography",
|
|
844
|
+
items: [
|
|
845
|
+
{ type: "dropdown", property: "textAlign", label: "typography.align" },
|
|
846
|
+
{ type: "dropdown", property: "fontFamily", label: "typography.font" },
|
|
847
|
+
{ type: "arbitrary", property: "fontSize", label: "typography.size", units: k },
|
|
848
|
+
{ type: "arbitrary", property: "lineHeight", label: "typography.height", units: k.concat("-") },
|
|
849
|
+
{ type: "range", property: "fontWeight", label: "typography.weight" },
|
|
850
|
+
{ type: "color", property: "textColor", label: "typography.color" }
|
|
851
|
+
]
|
|
852
|
+
},
|
|
853
|
+
{
|
|
854
|
+
styleType: "accordion",
|
|
855
|
+
heading: "Background",
|
|
856
|
+
items: [
|
|
857
|
+
{ type: "color", label: "background.bgcolor", property: "backgroundColor" },
|
|
858
|
+
{ type: "dropdown", label: "background.attachment", property: "backgroundAttachment" },
|
|
859
|
+
{ type: "dropdown", label: "background.clipping", property: "backgroundClip" },
|
|
860
|
+
{ type: "dropdown", label: "background.origin", property: "backgroundOrigin" },
|
|
861
|
+
{ type: "dropdown", label: "background.position", property: "backgroundPosition" },
|
|
862
|
+
{ type: "dropdown", label: "background.repeat", property: "backgroundRepeat" },
|
|
863
|
+
{ type: "dropdown", label: "background.size", property: "backgroundSize" }
|
|
864
|
+
]
|
|
865
|
+
}
|
|
866
|
+
]
|
|
867
|
+
},
|
|
868
|
+
{
|
|
869
|
+
heading: "Attributes",
|
|
870
|
+
items: [{ component: ns }]
|
|
871
|
+
}
|
|
872
|
+
], Ta = [
|
|
637
873
|
{
|
|
638
874
|
heading: "layout.heading",
|
|
639
875
|
items: [
|
|
640
|
-
{ type: "arbitrary", label: "layout.width", units:
|
|
641
|
-
{ type: "arbitrary", label: "layout.height", units:
|
|
876
|
+
{ type: "arbitrary", label: "layout.width", units: k.concat("auto"), property: "width" },
|
|
877
|
+
{ type: "arbitrary", label: "layout.height", units: k.concat("auto"), property: "height" },
|
|
642
878
|
{
|
|
643
879
|
styleType: "multiple",
|
|
644
880
|
label: "layout.margin",
|
|
645
881
|
negative: !0,
|
|
646
|
-
units: [...
|
|
882
|
+
units: [...k, "auto"],
|
|
647
883
|
options: [
|
|
648
884
|
{ key: "margin", label: "layout.margin_all" },
|
|
649
885
|
{ key: "marginX", label: "layout.margin_lr" },
|
|
@@ -684,16 +920,16 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], ps = {
|
|
|
684
920
|
styleType: "accordion",
|
|
685
921
|
heading: "size.min_width_height",
|
|
686
922
|
items: [
|
|
687
|
-
{ type: "arbitrary", label: "size.min_width", units:
|
|
688
|
-
{ type: "arbitrary", label: "size.min_height", units:
|
|
923
|
+
{ type: "arbitrary", label: "size.min_width", units: k.concat("auto"), property: "minWidth" },
|
|
924
|
+
{ type: "arbitrary", label: "size.min_height", units: k.concat("auto"), property: "minHeight" }
|
|
689
925
|
]
|
|
690
926
|
},
|
|
691
927
|
{
|
|
692
928
|
styleType: "accordion",
|
|
693
929
|
heading: "size.max_width_height",
|
|
694
930
|
items: [
|
|
695
|
-
{ type: "arbitrary", label: "size.max_width", units:
|
|
696
|
-
{ type: "arbitrary", label: "size.max_height", units:
|
|
931
|
+
{ type: "arbitrary", label: "size.max_width", units: k.concat("auto"), property: "maxWidth" },
|
|
932
|
+
{ type: "arbitrary", label: "size.max_height", units: k.concat("auto"), property: "maxHeight" }
|
|
697
933
|
]
|
|
698
934
|
},
|
|
699
935
|
{
|
|
@@ -710,7 +946,7 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], ps = {
|
|
|
710
946
|
{
|
|
711
947
|
heading: "display.heading",
|
|
712
948
|
items: [
|
|
713
|
-
{ type: "dropdown", label: "display.display", property: "display", units:
|
|
949
|
+
{ type: "dropdown", label: "display.display", property: "display", units: k },
|
|
714
950
|
{
|
|
715
951
|
styleType: "accordion",
|
|
716
952
|
heading: "display.flex_options",
|
|
@@ -761,7 +997,7 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], ps = {
|
|
|
761
997
|
styleType: "accordion",
|
|
762
998
|
heading: "display.visibility_opacity",
|
|
763
999
|
items: [
|
|
764
|
-
{ type: "dropdown", label: "display.visibility", property: "visibility", units:
|
|
1000
|
+
{ type: "dropdown", label: "display.visibility", property: "visibility", units: k },
|
|
765
1001
|
{ type: "arbitrary", label: "display.opacity", property: "opacity", units: ["-"] }
|
|
766
1002
|
]
|
|
767
1003
|
}
|
|
@@ -837,8 +1073,8 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], ps = {
|
|
|
837
1073
|
heading: "typography.heading",
|
|
838
1074
|
items: [
|
|
839
1075
|
{ type: "dropdown", property: "fontFamily", label: "typography.font" },
|
|
840
|
-
{ type: "arbitrary", property: "fontSize", label: "typography.size", units:
|
|
841
|
-
{ type: "arbitrary", property: "lineHeight", label: "typography.height", units:
|
|
1076
|
+
{ type: "arbitrary", property: "fontSize", label: "typography.size", units: k },
|
|
1077
|
+
{ type: "arbitrary", property: "lineHeight", label: "typography.height", units: k.concat("-") },
|
|
842
1078
|
{ type: "range", property: "fontWeight", label: "typography.weight" },
|
|
843
1079
|
{ type: "color", property: "textColor", label: "typography.color" },
|
|
844
1080
|
{
|
|
@@ -1035,89 +1271,89 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], ps = {
|
|
|
1035
1271
|
},
|
|
1036
1272
|
{
|
|
1037
1273
|
heading: "classes.heading",
|
|
1038
|
-
items: [{ component:
|
|
1274
|
+
items: [{ component: ut }]
|
|
1039
1275
|
}
|
|
1040
1276
|
], gt = {
|
|
1041
1277
|
"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" }) }),
|
|
1042
1278
|
// visibility
|
|
1043
1279
|
visible: Pt,
|
|
1044
|
-
invisible:
|
|
1280
|
+
invisible: Be,
|
|
1045
1281
|
// display
|
|
1046
|
-
hidden:
|
|
1047
|
-
gap:
|
|
1048
|
-
gapX:
|
|
1049
|
-
gapY:
|
|
1050
|
-
spaceX:
|
|
1051
|
-
spaceY:
|
|
1052
|
-
overscroll:
|
|
1053
|
-
overscrollX:
|
|
1054
|
-
overscrollY:
|
|
1055
|
-
overflow:
|
|
1056
|
-
overflowX:
|
|
1057
|
-
overflowY:
|
|
1058
|
-
top:
|
|
1059
|
-
right:
|
|
1060
|
-
bottom:
|
|
1061
|
-
left:
|
|
1062
|
-
inset:
|
|
1063
|
-
insetX:
|
|
1064
|
-
insetY:
|
|
1065
|
-
border:
|
|
1066
|
-
borderX:
|
|
1067
|
-
borderY:
|
|
1068
|
-
borderTop:
|
|
1069
|
-
borderRight:
|
|
1070
|
-
borderBottom:
|
|
1071
|
-
borderLeft:
|
|
1072
|
-
borderRadius:
|
|
1073
|
-
borderRadiusX:
|
|
1074
|
-
borderRadiusY:
|
|
1075
|
-
borderRadiusTop:
|
|
1076
|
-
borderRadiusRight:
|
|
1077
|
-
borderRadiusBottom:
|
|
1078
|
-
borderRadiusLeft:
|
|
1079
|
-
borderRadiusTopLeft:
|
|
1282
|
+
hidden: Be,
|
|
1283
|
+
gap: Y,
|
|
1284
|
+
gapX: R,
|
|
1285
|
+
gapY: V,
|
|
1286
|
+
spaceX: R,
|
|
1287
|
+
spaceY: V,
|
|
1288
|
+
overscroll: Y,
|
|
1289
|
+
overscrollX: R,
|
|
1290
|
+
overscrollY: V,
|
|
1291
|
+
overflow: Y,
|
|
1292
|
+
overflowX: R,
|
|
1293
|
+
overflowY: V,
|
|
1294
|
+
top: J,
|
|
1295
|
+
right: Q,
|
|
1296
|
+
bottom: ee,
|
|
1297
|
+
left: te,
|
|
1298
|
+
inset: Y,
|
|
1299
|
+
insetX: R,
|
|
1300
|
+
insetY: V,
|
|
1301
|
+
border: Y,
|
|
1302
|
+
borderX: R,
|
|
1303
|
+
borderY: V,
|
|
1304
|
+
borderTop: J,
|
|
1305
|
+
borderRight: Q,
|
|
1306
|
+
borderBottom: ee,
|
|
1307
|
+
borderLeft: te,
|
|
1308
|
+
borderRadius: Y,
|
|
1309
|
+
borderRadiusX: R,
|
|
1310
|
+
borderRadiusY: V,
|
|
1311
|
+
borderRadiusTop: J,
|
|
1312
|
+
borderRadiusRight: Q,
|
|
1313
|
+
borderRadiusBottom: ee,
|
|
1314
|
+
borderRadiusLeft: te,
|
|
1315
|
+
borderRadiusTopLeft: At,
|
|
1080
1316
|
borderRadiusTopRight: $t,
|
|
1081
|
-
borderRadiusBottomRight:
|
|
1082
|
-
borderRadiusBottomLeft:
|
|
1083
|
-
divideXWidth:
|
|
1084
|
-
divideYWidth:
|
|
1085
|
-
scale:
|
|
1086
|
-
scaleX:
|
|
1087
|
-
scaleY:
|
|
1088
|
-
skewX:
|
|
1089
|
-
skewY:
|
|
1090
|
-
translateX:
|
|
1091
|
-
translateY:
|
|
1317
|
+
borderRadiusBottomRight: Mt,
|
|
1318
|
+
borderRadiusBottomLeft: Et,
|
|
1319
|
+
divideXWidth: R,
|
|
1320
|
+
divideYWidth: V,
|
|
1321
|
+
scale: Y,
|
|
1322
|
+
scaleX: R,
|
|
1323
|
+
scaleY: V,
|
|
1324
|
+
skewX: R,
|
|
1325
|
+
skewY: V,
|
|
1326
|
+
translateX: R,
|
|
1327
|
+
translateY: V,
|
|
1092
1328
|
// padding
|
|
1093
|
-
padding:
|
|
1094
|
-
paddingX:
|
|
1095
|
-
paddingY:
|
|
1096
|
-
paddingTop:
|
|
1097
|
-
paddingRight:
|
|
1098
|
-
paddingBottom:
|
|
1099
|
-
paddingLeft:
|
|
1329
|
+
padding: Y,
|
|
1330
|
+
paddingX: R,
|
|
1331
|
+
paddingY: V,
|
|
1332
|
+
paddingTop: J,
|
|
1333
|
+
paddingRight: Q,
|
|
1334
|
+
paddingBottom: ee,
|
|
1335
|
+
paddingLeft: te,
|
|
1100
1336
|
// margin
|
|
1101
|
-
margin:
|
|
1102
|
-
marginX:
|
|
1103
|
-
marginY:
|
|
1104
|
-
marginTop:
|
|
1105
|
-
marginRight:
|
|
1106
|
-
marginBottom:
|
|
1107
|
-
marginLeft:
|
|
1337
|
+
margin: Y,
|
|
1338
|
+
marginX: R,
|
|
1339
|
+
marginY: V,
|
|
1340
|
+
marginTop: J,
|
|
1341
|
+
marginRight: Q,
|
|
1342
|
+
marginBottom: ee,
|
|
1343
|
+
marginLeft: te,
|
|
1108
1344
|
// text-align
|
|
1109
1345
|
textLeft: Lt,
|
|
1110
|
-
textCenter:
|
|
1111
|
-
textRight:
|
|
1112
|
-
textJustify:
|
|
1346
|
+
textCenter: Ot,
|
|
1347
|
+
textRight: zt,
|
|
1348
|
+
textJustify: Yt,
|
|
1113
1349
|
// font style
|
|
1114
|
-
italic:
|
|
1350
|
+
italic: Xt,
|
|
1115
1351
|
// "not-italic": "",
|
|
1116
1352
|
// decoration
|
|
1117
|
-
underline:
|
|
1118
|
-
overline:
|
|
1353
|
+
underline: Ft,
|
|
1354
|
+
overline: Zt,
|
|
1119
1355
|
// transform
|
|
1120
|
-
uppercase:
|
|
1356
|
+
uppercase: Wt,
|
|
1121
1357
|
block: () => /* @__PURE__ */ e.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1122
1358
|
/* @__PURE__ */ e.jsx(
|
|
1123
1359
|
"path",
|
|
@@ -1158,7 +1394,7 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], ps = {
|
|
|
1158
1394
|
}
|
|
1159
1395
|
)
|
|
1160
1396
|
] }),
|
|
1161
|
-
"float-none":
|
|
1397
|
+
"float-none": Ge,
|
|
1162
1398
|
// position
|
|
1163
1399
|
fixed: () => /* @__PURE__ */ e.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1164
1400
|
/* @__PURE__ */ e.jsx(
|
|
@@ -1230,41 +1466,41 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], ps = {
|
|
|
1230
1466
|
}
|
|
1231
1467
|
)
|
|
1232
1468
|
] }),
|
|
1233
|
-
static:
|
|
1234
|
-
},
|
|
1469
|
+
static: Ut
|
|
1470
|
+
}, le = Fe({ canReset: !1, canChange: !0 }), ps = ({ children: r, canReset: a = !1, canChange: t = !0 }) => (
|
|
1235
1471
|
// eslint-disable-next-line react/jsx-no-constructed-context-values
|
|
1236
|
-
/* @__PURE__ */ e.jsx(
|
|
1237
|
-
),
|
|
1238
|
-
const n =
|
|
1239
|
-
return /* @__PURE__ */ e.jsx("div", { className: r ? "w-full rounded" : "grow", children:
|
|
1240
|
-
/* @__PURE__ */ e.jsx(
|
|
1472
|
+
/* @__PURE__ */ e.jsx(le.Provider, { value: { canReset: a, canChange: t }, children: r })
|
|
1473
|
+
), xt = ({ label: r, property: a, onChange: t }) => {
|
|
1474
|
+
const n = T(() => y(ge, `${a}.classes`, [""]), [a]), l = oe(a), s = T(() => y(l, "cls", ""), [l]), { canChange: d } = se(le), c = /\[.*\]/g.test(s);
|
|
1475
|
+
return /* @__PURE__ */ e.jsx("div", { className: r ? "w-full rounded" : "grow", children: c ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
|
|
1476
|
+
/* @__PURE__ */ e.jsx(je, { className: "w-[70%] rounded py-1", readOnly: !0, value: s }),
|
|
1241
1477
|
/* @__PURE__ */ e.jsxs($, { delayDuration: 100, children: [
|
|
1242
|
-
/* @__PURE__ */ e.jsx(
|
|
1243
|
-
/* @__PURE__ */ e.jsx(
|
|
1478
|
+
/* @__PURE__ */ e.jsx(M, { 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(Se, {}) }) }),
|
|
1479
|
+
/* @__PURE__ */ e.jsx(E, { children: "Current value is using a Tailwind arbitrary value." })
|
|
1244
1480
|
] })
|
|
1245
1481
|
] }) : /* @__PURE__ */ e.jsx(
|
|
1246
|
-
|
|
1482
|
+
ke,
|
|
1247
1483
|
{
|
|
1248
1484
|
rounded: r,
|
|
1249
|
-
onChange: (o) => t(o,
|
|
1250
|
-
selected:
|
|
1485
|
+
onChange: (o) => t(o, a),
|
|
1486
|
+
selected: s,
|
|
1251
1487
|
options: n,
|
|
1252
|
-
disabled: !
|
|
1488
|
+
disabled: !d
|
|
1253
1489
|
}
|
|
1254
1490
|
) });
|
|
1255
1491
|
};
|
|
1256
|
-
function
|
|
1257
|
-
const
|
|
1492
|
+
function ke({ selected: r, onChange: a, rounded: t = !1, options: n, disabled: l = !1 }) {
|
|
1493
|
+
const s = r.replace(/.*:/g, "").trim(), { undo: d, redo: c } = Nr();
|
|
1258
1494
|
return /* @__PURE__ */ e.jsxs(
|
|
1259
1495
|
"select",
|
|
1260
1496
|
{
|
|
1261
|
-
disabled: !n.length ||
|
|
1497
|
+
disabled: !n.length || l,
|
|
1262
1498
|
className: `${t ? "rounded-md border border-border" : "border-0"} disable:bg-gray-500 h-full w-full truncate rounded bg-background px-2 py-1 text-xs outline-none disabled:cursor-not-allowed`,
|
|
1263
|
-
onChange: (o) =>
|
|
1499
|
+
onChange: (o) => a(o.target.value),
|
|
1264
1500
|
onKeyDown: (o) => {
|
|
1265
|
-
o.ctrlKey && (o.key === "z" &&
|
|
1501
|
+
o.ctrlKey && (o.key === "z" && d(), o.key === "y" && c());
|
|
1266
1502
|
},
|
|
1267
|
-
value:
|
|
1503
|
+
value: s,
|
|
1268
1504
|
children: [
|
|
1269
1505
|
/* @__PURE__ */ e.jsx("option", { className: "bg-transparent", value: "" }),
|
|
1270
1506
|
I.Children.toArray(
|
|
@@ -1274,57 +1510,57 @@ function Te({ selected: r, onChange: l, rounded: t = !1, options: n, disabled: s
|
|
|
1274
1510
|
}
|
|
1275
1511
|
);
|
|
1276
1512
|
}
|
|
1277
|
-
const
|
|
1278
|
-
const { canReset: t, canChange: n } =
|
|
1279
|
-
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:
|
|
1513
|
+
const us = ({ property: r, onChange: a }) => {
|
|
1514
|
+
const { canReset: t, canChange: n } = se(le), l = oe(r), s = T(() => y(l, "cls", ""), [l]), d = T(() => y(ge, `${r}.classes`, [""]), [r]), c = d.indexOf(s) > -1 ? d.indexOf(s) : 0, o = /\[.*\]/g.test(s);
|
|
1515
|
+
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: s }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1280
1516
|
/* @__PURE__ */ e.jsx(
|
|
1281
1517
|
"button",
|
|
1282
1518
|
{
|
|
1283
1519
|
type: "button",
|
|
1284
1520
|
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",
|
|
1285
|
-
disabled: !n && (!t ||
|
|
1286
|
-
onClick: () =>
|
|
1521
|
+
disabled: !n && (!t || c - 1 < 0),
|
|
1522
|
+
onClick: () => a(He(d, c - 1), r),
|
|
1287
1523
|
children: /* @__PURE__ */ e.jsx("span", { className: "flex items-center justify-center", children: /* @__PURE__ */ e.jsx(
|
|
1288
|
-
|
|
1524
|
+
Gt,
|
|
1289
1525
|
{
|
|
1290
|
-
className: !n && (!t ||
|
|
1526
|
+
className: !n && (!t || c - 1 < 0) ? "text-gray-500" : "text-black/60 dark:text-white/60"
|
|
1291
1527
|
}
|
|
1292
1528
|
) })
|
|
1293
1529
|
}
|
|
1294
1530
|
),
|
|
1295
|
-
/* @__PURE__ */ e.jsx("div", { className: "w-8/12 text-center", children: /* @__PURE__ */ e.jsx(
|
|
1531
|
+
/* @__PURE__ */ e.jsx("div", { className: "w-8/12 text-center", children: /* @__PURE__ */ e.jsx(xt, { label: !1, property: r, onChange: a }) }),
|
|
1296
1532
|
/* @__PURE__ */ e.jsx(
|
|
1297
1533
|
"button",
|
|
1298
1534
|
{
|
|
1299
1535
|
type: "button",
|
|
1300
1536
|
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",
|
|
1301
|
-
disabled: !n && (!t ||
|
|
1302
|
-
onClick: () =>
|
|
1537
|
+
disabled: !n && (!t || c + 1 >= d.length),
|
|
1538
|
+
onClick: () => a(He(d, c + 1), r),
|
|
1303
1539
|
children: /* @__PURE__ */ e.jsx("span", { className: "flex items-center justify-center", children: /* @__PURE__ */ e.jsx(
|
|
1304
|
-
|
|
1540
|
+
_e,
|
|
1305
1541
|
{
|
|
1306
|
-
className: !n && (!t ||
|
|
1542
|
+
className: !n && (!t || c + 1 >= d.length) ? "text-gray-500" : "text-black/60 dark:text-white/60"
|
|
1307
1543
|
}
|
|
1308
1544
|
) })
|
|
1309
1545
|
}
|
|
1310
1546
|
)
|
|
1311
1547
|
] }) });
|
|
1312
|
-
},
|
|
1313
|
-
const t =
|
|
1314
|
-
return /* @__PURE__ */ e.jsx("div", { className: "flex grow flex-wrap gap-1", children:
|
|
1315
|
-
/* @__PURE__ */ e.jsx(
|
|
1548
|
+
}, gs = ({ property: r, onChange: a }) => {
|
|
1549
|
+
const t = T(() => y(ge, `${r}.classes`, [""]), [r]), { canChange: n } = se(le), l = oe(r), s = T(() => y(l, "cls", ""), [l]);
|
|
1550
|
+
return /* @__PURE__ */ e.jsx("div", { className: "flex grow flex-wrap gap-1", children: _(t, (d) => /* @__PURE__ */ e.jsxs($, { children: [
|
|
1551
|
+
/* @__PURE__ */ e.jsx(M, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
1316
1552
|
"button",
|
|
1317
1553
|
{
|
|
1318
1554
|
type: "button",
|
|
1319
1555
|
disabled: !n,
|
|
1320
|
-
onClick: () =>
|
|
1321
|
-
className: `cursor-pointer rounded border border-gray-600 p-1 disabled:cursor-not-allowed ${
|
|
1322
|
-
children: I.createElement(
|
|
1556
|
+
onClick: () => a(d, r),
|
|
1557
|
+
className: `cursor-pointer rounded border border-gray-600 p-1 disabled:cursor-not-allowed ${s === d ? " bg-blue-500 text-white" : "disabled:bg-gray-600 disabled:text-gray-400"}`,
|
|
1558
|
+
children: I.createElement(y(gt, d, Ke))
|
|
1323
1559
|
}
|
|
1324
1560
|
) }),
|
|
1325
|
-
/* @__PURE__ */ e.jsx(
|
|
1561
|
+
/* @__PURE__ */ e.jsx(E, { children: F(re(d)) })
|
|
1326
1562
|
] })) });
|
|
1327
|
-
},
|
|
1563
|
+
}, xs = {
|
|
1328
1564
|
backgroundColor: "bg",
|
|
1329
1565
|
textColor: "text",
|
|
1330
1566
|
borderColor: "border",
|
|
@@ -1336,39 +1572,39 @@ const hs = ({ property: r, onChange: l }) => {
|
|
|
1336
1572
|
toColor: "to",
|
|
1337
1573
|
ringColor: "ring",
|
|
1338
1574
|
ringOffsetColor: "ring-offset"
|
|
1339
|
-
},
|
|
1340
|
-
const t =
|
|
1575
|
+
}, ys = ({ property: r, onChange: a }) => {
|
|
1576
|
+
const t = oe(r), n = T(() => y(t, "cls", ""), [t]), { canChange: l } = se(le), [s, d] = j([]), [c, o] = j({ color: "", shade: "" }), p = n.split("-"), h = y(p, "1", ""), i = y(p, "2", ""), g = H(
|
|
1341
1577
|
// eslint-disable-next-line no-shadow
|
|
1342
|
-
(
|
|
1343
|
-
["current", "inherit", "transparent", "black", "white"].includes(
|
|
1578
|
+
(u) => {
|
|
1579
|
+
["current", "inherit", "transparent", "black", "white"].includes(u) ? (d([]), o({ color: u })) : (d(["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"]), o((v) => ({ ...v, color: u, shade: v.shade ? v.shade : "500" })));
|
|
1344
1580
|
},
|
|
1345
|
-
[
|
|
1581
|
+
[d, o]
|
|
1346
1582
|
);
|
|
1347
|
-
|
|
1583
|
+
P(() => {
|
|
1348
1584
|
if (["current", "inherit", "transparent", "black", "white"].includes(h))
|
|
1349
|
-
return
|
|
1350
|
-
|
|
1585
|
+
return d([]);
|
|
1586
|
+
d(["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"]);
|
|
1351
1587
|
}, [h]);
|
|
1352
|
-
const
|
|
1588
|
+
const x = H(
|
|
1353
1589
|
// eslint-disable-next-line no-shadow
|
|
1354
|
-
(
|
|
1355
|
-
o({ color: h, shade:
|
|
1590
|
+
(u) => {
|
|
1591
|
+
o({ color: h, shade: u });
|
|
1356
1592
|
},
|
|
1357
1593
|
[h]
|
|
1358
1594
|
);
|
|
1359
|
-
return
|
|
1595
|
+
return P(() => {
|
|
1360
1596
|
o({ color: "", shade: "" });
|
|
1361
|
-
}, [t]),
|
|
1362
|
-
const
|
|
1363
|
-
|
|
1364
|
-
}, [
|
|
1597
|
+
}, [t]), P(() => {
|
|
1598
|
+
const v = `${y(xs, r, "")}-${c.color}${c.shade ? `-${c.shade}` : ""}`;
|
|
1599
|
+
v.match(new RegExp(y(ge, `${r}.regExp`, ""))) && a(v, r);
|
|
1600
|
+
}, [c, a, r]), /* @__PURE__ */ e.jsxs("div", { className: "flex flex-row divide-x divide-solid divide-border rounded-lg border border-border text-xs", children: [
|
|
1365
1601
|
/* @__PURE__ */ e.jsx("div", { className: "grow text-center", children: /* @__PURE__ */ e.jsx(
|
|
1366
|
-
|
|
1602
|
+
ke,
|
|
1367
1603
|
{
|
|
1368
|
-
disabled: !
|
|
1604
|
+
disabled: !l,
|
|
1369
1605
|
rounded: !0,
|
|
1370
1606
|
selected: h,
|
|
1371
|
-
onChange:
|
|
1607
|
+
onChange: g,
|
|
1372
1608
|
options: [
|
|
1373
1609
|
"current",
|
|
1374
1610
|
"transparent",
|
|
@@ -1401,20 +1637,20 @@ const hs = ({ property: r, onChange: l }) => {
|
|
|
1401
1637
|
]
|
|
1402
1638
|
}
|
|
1403
1639
|
) }),
|
|
1404
|
-
/* @__PURE__ */ e.jsx("button", { type: "button", className: "grow text-center", children: /* @__PURE__ */ e.jsx(
|
|
1640
|
+
/* @__PURE__ */ e.jsx("button", { type: "button", className: "grow text-center", children: /* @__PURE__ */ e.jsx(ke, { rounded: !0, selected: i, disabled: !h || !l, onChange: x, options: s }) })
|
|
1405
1641
|
] });
|
|
1406
|
-
},
|
|
1642
|
+
}, ze = (r, a) => {
|
|
1407
1643
|
r = r.toLowerCase();
|
|
1408
1644
|
let t = r.trim().replace(/ |\+/g, "");
|
|
1409
|
-
if ((t === "auto" || t === "none") &&
|
|
1645
|
+
if ((t === "auto" || t === "none") && a.includes(t))
|
|
1410
1646
|
return { value: "", unit: t };
|
|
1411
|
-
const n =
|
|
1647
|
+
const n = a.length ? new RegExp(a.join("|"), "g") : /XXXXXX/g;
|
|
1412
1648
|
t = t.replace(n, "");
|
|
1413
|
-
const
|
|
1414
|
-
return
|
|
1649
|
+
const l = r.match(n), s = l && l.length > 1, d = !m(t) && Number.isNaN(Number(t));
|
|
1650
|
+
return s || d ? { error: "Invalid value" } : l && (l[0] === "auto" || l[0] === "none") ? { value: l[0], unit: "" } : { value: t, unit: l ? l[0] : "" };
|
|
1415
1651
|
};
|
|
1416
|
-
const
|
|
1417
|
-
const
|
|
1652
|
+
const hs = (r) => {
|
|
1653
|
+
const a = r.startsWith("-") ? "-" : "", t = r.split("-").pop();
|
|
1418
1654
|
if (["auto", "none"].includes(t))
|
|
1419
1655
|
return { value: "", unit: t };
|
|
1420
1656
|
if (t === "px")
|
|
@@ -1423,18 +1659,18 @@ const fs = (r) => {
|
|
|
1423
1659
|
return { value: "100", unit: r.indexOf("w-") !== -1 ? "vw" : "vh" };
|
|
1424
1660
|
if (t === "full")
|
|
1425
1661
|
return { value: "100", unit: "%" };
|
|
1426
|
-
if (
|
|
1427
|
-
return { value: `${
|
|
1428
|
-
if (
|
|
1429
|
-
return { value: `${
|
|
1430
|
-
if (
|
|
1662
|
+
if (X(r, "skew-"))
|
|
1663
|
+
return { value: `${a}${t}`, unit: "deg" };
|
|
1664
|
+
if (X(r, "rotate-"))
|
|
1665
|
+
return { value: `${a}${t}`, unit: "deg" };
|
|
1666
|
+
if (X(r, "opacity-"))
|
|
1431
1667
|
return { value: `${t / 100}`, unit: "-" };
|
|
1432
|
-
if (
|
|
1668
|
+
if (X(r, "duration-") || X(r, "delay-"))
|
|
1433
1669
|
return { value: `${t}`, unit: "ms" };
|
|
1434
|
-
if (
|
|
1435
|
-
return { value: `${
|
|
1436
|
-
if (
|
|
1437
|
-
return { value: `${
|
|
1670
|
+
if (X(r, "translate-") && !t.includes("/"))
|
|
1671
|
+
return { value: `${a}${`${t / 4}`}`, unit: "rem" };
|
|
1672
|
+
if (X(r, "scale-"))
|
|
1673
|
+
return { value: `${a}${`${t / 100}`}`, unit: "-" };
|
|
1438
1674
|
if (W(r, "border")) {
|
|
1439
1675
|
const n = r.match(/border-?(x|y|t|r|b|l)?\d+/g);
|
|
1440
1676
|
if (n)
|
|
@@ -1537,208 +1773,208 @@ const fs = (r) => {
|
|
|
1537
1773
|
if (["max", "min", "fit"].includes(t))
|
|
1538
1774
|
return { value: r, unit: "class" };
|
|
1539
1775
|
if (t.includes("/")) {
|
|
1540
|
-
const [n,
|
|
1541
|
-
return { value:
|
|
1776
|
+
const [n, l] = _(t.split("/"), (s) => parseInt(s, 10));
|
|
1777
|
+
return { value: a + (n / l * 100).toFixed(2).replace(".00", ""), unit: "%" };
|
|
1542
1778
|
}
|
|
1543
|
-
return
|
|
1779
|
+
return Rt(parseFloat(t)) ? { value: `${a + parseFloat(t) * 4}`, unit: "px" } : { value: t, unit: "class" };
|
|
1544
1780
|
};
|
|
1545
|
-
const
|
|
1546
|
-
if (
|
|
1781
|
+
const bs = (r) => {
|
|
1782
|
+
if (m(r))
|
|
1547
1783
|
return { value: "", unit: "" };
|
|
1548
|
-
const
|
|
1549
|
-
if (
|
|
1550
|
-
return
|
|
1551
|
-
const t =
|
|
1552
|
-
return { value: `${n}${
|
|
1553
|
-
},
|
|
1784
|
+
const a = r.match(/\[.*\]/g);
|
|
1785
|
+
if (a === null)
|
|
1786
|
+
return ms(r);
|
|
1787
|
+
const t = y(a, "0", "").replace(/\[|\]/g, ""), n = r.startsWith("-") ? "-" : "", l = ae(t.match(/\d+.\d+|\d+/g));
|
|
1788
|
+
return { value: `${n}${l}`, unit: t.replace(l, "") };
|
|
1789
|
+
}, ms = (r) => m(r) ? { value: "", unit: "" } : hs(r), yt = I.createContext({
|
|
1554
1790
|
setDragData: () => {
|
|
1555
1791
|
}
|
|
1556
|
-
}),
|
|
1792
|
+
}), fs = ({
|
|
1557
1793
|
unit: r,
|
|
1558
|
-
currentValue:
|
|
1794
|
+
currentValue: a,
|
|
1559
1795
|
onDrag: t,
|
|
1560
1796
|
onDragEnd: n,
|
|
1561
|
-
onDragStart:
|
|
1562
|
-
negative:
|
|
1563
|
-
cssProperty:
|
|
1797
|
+
onDragStart: l,
|
|
1798
|
+
negative: s,
|
|
1799
|
+
cssProperty: d
|
|
1564
1800
|
}) => {
|
|
1565
|
-
const { setDragData:
|
|
1801
|
+
const { setDragData: c } = se(yt);
|
|
1566
1802
|
return /* @__PURE__ */ e.jsx(
|
|
1567
1803
|
"button",
|
|
1568
1804
|
{
|
|
1569
1805
|
type: "button",
|
|
1570
1806
|
onMouseDown: (o) => {
|
|
1571
|
-
const
|
|
1807
|
+
const p = {
|
|
1572
1808
|
onDrag: t,
|
|
1573
1809
|
onDragEnd: n,
|
|
1574
1810
|
dragging: !0,
|
|
1575
1811
|
dragStartY: o.pageY,
|
|
1576
|
-
dragStartValue: `${
|
|
1812
|
+
dragStartValue: `${a}`,
|
|
1577
1813
|
dragUnit: r,
|
|
1578
|
-
negative:
|
|
1579
|
-
cssProperty:
|
|
1814
|
+
negative: s,
|
|
1815
|
+
cssProperty: d
|
|
1580
1816
|
};
|
|
1581
|
-
|
|
1817
|
+
l(p), c(p);
|
|
1582
1818
|
},
|
|
1583
1819
|
color: void 0,
|
|
1584
1820
|
className: "relative z-50 ml-1 hidden h-6 cursor-row-resize rounded bg-background/70 px-2 group-hover:inline",
|
|
1585
1821
|
children: /* @__PURE__ */ e.jsx(Kt, {})
|
|
1586
1822
|
}
|
|
1587
1823
|
);
|
|
1588
|
-
},
|
|
1589
|
-
|
|
1824
|
+
}, vs = ({ onSelect: r, current: a, units: t }) => /* @__PURE__ */ e.jsx("div", { "data-theme": "light", className: "-m-[7px] -mx-[13px] flex w-9 flex-col", children: t.map((n) => /* @__PURE__ */ e.jsx(
|
|
1825
|
+
A,
|
|
1590
1826
|
{
|
|
1591
1827
|
className: "h-max rounded-none px-1 py-1 text-right text-[11px] hover:bg-blue-400",
|
|
1592
|
-
color:
|
|
1828
|
+
color: a === n ? "primary" : void 0,
|
|
1593
1829
|
size: "sm",
|
|
1594
|
-
onClick: (
|
|
1595
|
-
|
|
1830
|
+
onClick: (l) => {
|
|
1831
|
+
l.stopPropagation(), r(n);
|
|
1596
1832
|
},
|
|
1597
1833
|
children: n
|
|
1598
1834
|
},
|
|
1599
1835
|
n
|
|
1600
|
-
)) }),
|
|
1601
|
-
const [
|
|
1602
|
-
|
|
1603
|
-
const { value:
|
|
1604
|
-
if (
|
|
1605
|
-
|
|
1836
|
+
)) }), Ye = 50, js = (r) => {
|
|
1837
|
+
const [a, t] = j(!1), [n, l] = j(""), { currentClass: s, onChange: d, classPrefix: c, cssProperty: o, units: p, negative: h } = r, [i, g] = j(o != null && o.toLowerCase().includes("width") ? "%" : p[0]), [x, u] = j(!1), [v, C] = j(""), [U, L] = j(!1), [K, q] = j(!1);
|
|
1838
|
+
P(() => {
|
|
1839
|
+
const { value: b, unit: f } = bs(s);
|
|
1840
|
+
if (f === "") {
|
|
1841
|
+
l(b), g(o != null && o.toLowerCase().includes("width") ? "%" : ae(p));
|
|
1606
1842
|
return;
|
|
1607
1843
|
}
|
|
1608
|
-
|
|
1609
|
-
}, [
|
|
1610
|
-
const
|
|
1611
|
-
(
|
|
1612
|
-
const
|
|
1613
|
-
if (
|
|
1614
|
-
|
|
1844
|
+
g(f), l(f === "class" || m(b) ? "" : b);
|
|
1845
|
+
}, [s, o, p]);
|
|
1846
|
+
const S = de((b) => d(b), [d], Ye), w = de((b) => d(b, !1), [d], Ye), D = H(
|
|
1847
|
+
(b = !1) => {
|
|
1848
|
+
const f = ze(`${n}`, p);
|
|
1849
|
+
if (y(f, "error", !1)) {
|
|
1850
|
+
u(!0);
|
|
1615
1851
|
return;
|
|
1616
1852
|
}
|
|
1617
|
-
const N =
|
|
1853
|
+
const N = y(f, "unit") !== "" ? y(f, "unit") : i;
|
|
1618
1854
|
if (N === "auto" || N === "none") {
|
|
1619
|
-
|
|
1855
|
+
S(`${c}${N}`);
|
|
1620
1856
|
return;
|
|
1621
1857
|
}
|
|
1622
|
-
if (
|
|
1858
|
+
if (y(f, "value") === "")
|
|
1623
1859
|
return;
|
|
1624
|
-
const
|
|
1625
|
-
|
|
1860
|
+
const z = `${y(f, "value", "").startsWith("-") ? "-" : ""}${c}[${y(f, "value", "").replace("-", "")}${N === "-" ? "" : N}]`;
|
|
1861
|
+
b ? w(z) : S(z);
|
|
1626
1862
|
},
|
|
1627
|
-
[
|
|
1628
|
-
),
|
|
1629
|
-
(
|
|
1630
|
-
const
|
|
1631
|
-
if (
|
|
1632
|
-
|
|
1863
|
+
[S, w, n, i, c, p]
|
|
1864
|
+
), Z = H(
|
|
1865
|
+
(b) => {
|
|
1866
|
+
const f = ze(`${n}`, p);
|
|
1867
|
+
if (y(f, "error", !1)) {
|
|
1868
|
+
u(!0);
|
|
1633
1869
|
return;
|
|
1634
1870
|
}
|
|
1635
|
-
if (
|
|
1636
|
-
|
|
1871
|
+
if (b === "auto" || b === "none") {
|
|
1872
|
+
S(`${c}${b}`);
|
|
1637
1873
|
return;
|
|
1638
1874
|
}
|
|
1639
|
-
if (
|
|
1875
|
+
if (y(f, "value") === "")
|
|
1640
1876
|
return;
|
|
1641
|
-
const N =
|
|
1642
|
-
|
|
1877
|
+
const N = y(f, "unit") !== "" ? y(f, "unit") : b, z = `${y(f, "value", "").startsWith("-") ? "-" : ""}${c}[${y(f, "value", "").replace("-", "")}${N === "-" ? "" : N}]`;
|
|
1878
|
+
S(z);
|
|
1643
1879
|
},
|
|
1644
|
-
[
|
|
1880
|
+
[S, n, c, p]
|
|
1645
1881
|
);
|
|
1646
|
-
return /* @__PURE__ */ e.jsx("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-start", children:
|
|
1647
|
-
/* @__PURE__ */ e.jsx("input", { className: "w-20 rounded py-1", readOnly: !0, value:
|
|
1882
|
+
return /* @__PURE__ */ e.jsx("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-start", children: i === "class" ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1883
|
+
/* @__PURE__ */ e.jsx("input", { className: "w-20 rounded py-1", readOnly: !0, value: s }),
|
|
1648
1884
|
/* @__PURE__ */ e.jsxs($, { children: [
|
|
1649
|
-
/* @__PURE__ */ e.jsx(
|
|
1650
|
-
/* @__PURE__ */ e.jsx(
|
|
1885
|
+
/* @__PURE__ */ e.jsx(M, { 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(Se, {}) }) }),
|
|
1886
|
+
/* @__PURE__ */ e.jsx(E, { children: "Current value is using a Tailwind preset class." })
|
|
1651
1887
|
] })
|
|
1652
|
-
] }) : /* @__PURE__ */ e.jsxs("div", { className: `group relative flex items-center ${
|
|
1888
|
+
] }) : /* @__PURE__ */ e.jsxs("div", { className: `group relative flex items-center ${U ? "z-auto" : ""}`, children: [
|
|
1653
1889
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center rounded-md border border-border", children: [
|
|
1654
|
-
["none", "auto"].indexOf(
|
|
1890
|
+
["none", "auto"].indexOf(i) !== -1 ? null : /* @__PURE__ */ e.jsx(
|
|
1655
1891
|
"input",
|
|
1656
1892
|
{
|
|
1657
|
-
readOnly:
|
|
1658
|
-
onKeyPress: (
|
|
1659
|
-
|
|
1893
|
+
readOnly: i === "class",
|
|
1894
|
+
onKeyPress: (b) => {
|
|
1895
|
+
b.key === "Enter" && D();
|
|
1660
1896
|
},
|
|
1661
|
-
onKeyDown: (
|
|
1662
|
-
if (
|
|
1897
|
+
onKeyDown: (b) => {
|
|
1898
|
+
if (b.keyCode !== 38 && b.keyCode !== 40)
|
|
1663
1899
|
return;
|
|
1664
|
-
|
|
1665
|
-
const
|
|
1666
|
-
let N =
|
|
1667
|
-
|
|
1668
|
-
const
|
|
1669
|
-
|
|
1900
|
+
b.preventDefault(), q(!0);
|
|
1901
|
+
const f = Vt(b.target.value);
|
|
1902
|
+
let N = Ue(f) ? 0 : f;
|
|
1903
|
+
b.keyCode === 38 && (N += 1), b.keyCode === 40 && (N -= 1);
|
|
1904
|
+
const O = `${N}`, bt = `${O.startsWith("-") ? "-" : ""}${c}[${O.replace("-", "")}${i === "-" ? "" : i}]`;
|
|
1905
|
+
w(bt);
|
|
1670
1906
|
},
|
|
1671
|
-
onKeyUp: (
|
|
1672
|
-
|
|
1907
|
+
onKeyUp: (b) => {
|
|
1908
|
+
K && (b.preventDefault(), q(!1));
|
|
1673
1909
|
},
|
|
1674
|
-
onBlur: () =>
|
|
1675
|
-
onChange: (
|
|
1676
|
-
|
|
1910
|
+
onBlur: () => D(),
|
|
1911
|
+
onChange: (b) => {
|
|
1912
|
+
u(!1), l(b.target.value);
|
|
1677
1913
|
},
|
|
1678
|
-
onClick: (
|
|
1679
|
-
var
|
|
1680
|
-
(
|
|
1914
|
+
onClick: (b) => {
|
|
1915
|
+
var f;
|
|
1916
|
+
(f = b == null ? void 0 : b.target) == null || f.select(), t(!1);
|
|
1681
1917
|
},
|
|
1682
|
-
value:
|
|
1918
|
+
value: U ? v : n,
|
|
1683
1919
|
className: "h-6 w-14 rounded rounded-r-none bg-background pl-2 text-sm focus-visible:outline-0 ".concat(
|
|
1684
1920
|
" ",
|
|
1685
|
-
|
|
1921
|
+
x ? "border-red-500 text-red-500" : "border-foreground/20"
|
|
1686
1922
|
)
|
|
1687
1923
|
}
|
|
1688
1924
|
),
|
|
1689
|
-
/* @__PURE__ */ e.jsxs($, { open:
|
|
1690
|
-
/* @__PURE__ */ e.jsx(
|
|
1925
|
+
/* @__PURE__ */ e.jsxs($, { open: a, delayDuration: 100, children: [
|
|
1926
|
+
/* @__PURE__ */ e.jsx(M, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
1691
1927
|
"button",
|
|
1692
1928
|
{
|
|
1693
1929
|
type: "button",
|
|
1694
|
-
onClick: () => t(!
|
|
1930
|
+
onClick: () => t(!a),
|
|
1695
1931
|
className: "flex h-6 cursor-pointer items-center gap-x-1 rounded rounded-l-none bg-background p-px px-1 text-[11px] uppercase",
|
|
1696
1932
|
children: [
|
|
1697
|
-
/* @__PURE__ */ e.jsx("span", { className: `inline-block ${
|
|
1698
|
-
|
|
1933
|
+
/* @__PURE__ */ e.jsx("span", { className: `inline-block ${p.length === 1 ? "px-2 font-semibold" : ""}`, children: i }),
|
|
1934
|
+
p.length > 1 ? /* @__PURE__ */ e.jsx(qt, {}) : null
|
|
1699
1935
|
]
|
|
1700
1936
|
}
|
|
1701
1937
|
) }),
|
|
1702
|
-
/* @__PURE__ */ e.jsx(
|
|
1703
|
-
|
|
1938
|
+
/* @__PURE__ */ e.jsx(_r, { children: /* @__PURE__ */ e.jsx(E, { className: "bg-background", children: /* @__PURE__ */ e.jsx(
|
|
1939
|
+
vs,
|
|
1704
1940
|
{
|
|
1705
|
-
units:
|
|
1706
|
-
current:
|
|
1707
|
-
onSelect: (
|
|
1708
|
-
t(!1),
|
|
1941
|
+
units: p,
|
|
1942
|
+
current: i,
|
|
1943
|
+
onSelect: (b) => {
|
|
1944
|
+
t(!1), g(b), Z(b);
|
|
1709
1945
|
}
|
|
1710
1946
|
}
|
|
1711
1947
|
) }) })
|
|
1712
1948
|
] })
|
|
1713
1949
|
] }),
|
|
1714
|
-
["none", "auto"].indexOf(
|
|
1715
|
-
|
|
1950
|
+
["none", "auto"].indexOf(i) !== -1 || U ? null : /* @__PURE__ */ e.jsx(
|
|
1951
|
+
fs,
|
|
1716
1952
|
{
|
|
1717
1953
|
onDragStart: () => L(!0),
|
|
1718
|
-
onDragEnd: (
|
|
1719
|
-
if (
|
|
1954
|
+
onDragEnd: (b) => {
|
|
1955
|
+
if (C(() => ""), L(!1), m(b))
|
|
1720
1956
|
return;
|
|
1721
|
-
const
|
|
1722
|
-
|
|
1957
|
+
const f = `${b}`, O = `${f.startsWith("-") ? "-" : ""}${c}[${f.replace("-", "")}${i === "-" ? "" : i}]`;
|
|
1958
|
+
S(O);
|
|
1723
1959
|
},
|
|
1724
|
-
onDrag: (
|
|
1725
|
-
if (b
|
|
1960
|
+
onDrag: (b) => {
|
|
1961
|
+
if (m(b))
|
|
1726
1962
|
return;
|
|
1727
|
-
|
|
1728
|
-
const
|
|
1729
|
-
|
|
1963
|
+
C(b);
|
|
1964
|
+
const f = `${b}`, O = `${f.startsWith("-") ? "-" : ""}${c}[${f.replace("-", "")}${i === "-" ? "" : i}]`;
|
|
1965
|
+
w(O);
|
|
1730
1966
|
},
|
|
1731
1967
|
currentValue: n,
|
|
1732
|
-
unit:
|
|
1968
|
+
unit: i,
|
|
1733
1969
|
negative: h,
|
|
1734
1970
|
cssProperty: o
|
|
1735
1971
|
}
|
|
1736
1972
|
)
|
|
1737
1973
|
] }) }) });
|
|
1738
|
-
},
|
|
1739
|
-
const
|
|
1740
|
-
return
|
|
1741
|
-
},
|
|
1974
|
+
}, oe = (r) => {
|
|
1975
|
+
const a = ue();
|
|
1976
|
+
return Ht(a, { property: r });
|
|
1977
|
+
}, ws = (r, a) => {
|
|
1742
1978
|
const t = {
|
|
1743
1979
|
xs: 0,
|
|
1744
1980
|
sm: 1,
|
|
@@ -1747,8 +1983,8 @@ const vs = (r) => {
|
|
|
1747
1983
|
xl: 4,
|
|
1748
1984
|
"2xl": 5
|
|
1749
1985
|
};
|
|
1750
|
-
return t[
|
|
1751
|
-
},
|
|
1986
|
+
return t[y(r, "mq", "xs")] <= t[a];
|
|
1987
|
+
}, Cs = {
|
|
1752
1988
|
width: "w-",
|
|
1753
1989
|
height: "h-",
|
|
1754
1990
|
minWidth: "min-w-",
|
|
@@ -1814,87 +2050,87 @@ const vs = (r) => {
|
|
|
1814
2050
|
insetY: "inset-y-",
|
|
1815
2051
|
opacity: "opacity-",
|
|
1816
2052
|
flexBasis: "basis-"
|
|
1817
|
-
},
|
|
2053
|
+
}, Xe = {
|
|
1818
2054
|
xs: "",
|
|
1819
2055
|
sm: "640px",
|
|
1820
2056
|
md: "768px",
|
|
1821
2057
|
lg: "1024px",
|
|
1822
2058
|
xl: "1280px",
|
|
1823
2059
|
"2xl": "1536px"
|
|
1824
|
-
},
|
|
1825
|
-
const { t:
|
|
1826
|
-
}, units:
|
|
1827
|
-
(
|
|
1828
|
-
const
|
|
1829
|
-
(o ||
|
|
1830
|
-
const
|
|
1831
|
-
u
|
|
2060
|
+
}, ks = (r) => `${r.toUpperCase()} ${Xe[r] ? `(${Xe[r]} & up)` : ""}`, Ve = (r) => {
|
|
2061
|
+
const { t: a } = B(), { type: t = "icons", label: n, property: l, onEmitChange: s = () => {
|
|
2062
|
+
}, units: d, negative: c = !1 } = r, [o] = Sr(), [p] = Tr(), [, h] = Ie(), i = oe(l), g = Te(), x = nt(), [u] = it(), v = T(() => y(i, "fullCls", ""), [i]), C = H(
|
|
2063
|
+
(w, D = !0) => {
|
|
2064
|
+
const Z = { dark: o, mq: h, mod: p, cls: w, property: l, fullCls: "" };
|
|
2065
|
+
(o || p !== "") && (Z.mq = "xs");
|
|
2066
|
+
const b = Kr(Z);
|
|
2067
|
+
g(u, [b], D);
|
|
1832
2068
|
},
|
|
1833
|
-
[
|
|
1834
|
-
),
|
|
1835
|
-
|
|
1836
|
-
}, [
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
}, [L,
|
|
1840
|
-
const [, ,
|
|
1841
|
-
(
|
|
1842
|
-
|
|
2069
|
+
[u, o, h, p, l, g]
|
|
2070
|
+
), U = H(() => {
|
|
2071
|
+
x(u, [v]);
|
|
2072
|
+
}, [u, v, x]), L = T(() => ws(i, h), [i, h]);
|
|
2073
|
+
P(() => {
|
|
2074
|
+
s(L, i);
|
|
2075
|
+
}, [L, s, i]);
|
|
2076
|
+
const [, , K] = Ie(), q = H(
|
|
2077
|
+
(w) => {
|
|
2078
|
+
K({
|
|
1843
2079
|
xs: 400,
|
|
1844
2080
|
sm: 640,
|
|
1845
2081
|
md: 800,
|
|
1846
2082
|
lg: 1024,
|
|
1847
2083
|
xl: 1420,
|
|
1848
2084
|
"2xl": 1920
|
|
1849
|
-
}[
|
|
2085
|
+
}[w]);
|
|
1850
2086
|
},
|
|
1851
|
-
[
|
|
1852
|
-
),
|
|
1853
|
-
return /* @__PURE__ */ e.jsx(
|
|
1854
|
-
/* @__PURE__ */ e.jsx("div", { className: "relative w-[70px] truncate text-xs text-foreground", children: /* @__PURE__ */ e.jsx("span", { className: `text-[11px] ${
|
|
2087
|
+
[K]
|
|
2088
|
+
), S = y(i, "dark", null) === o && y(i, "mod", null) === p && y(i, "mq", null) === h;
|
|
2089
|
+
return /* @__PURE__ */ e.jsx(ps, { canChange: L, canReset: i && S, children: /* @__PURE__ */ e.jsxs("div", { className: "group flex flex-row items-center py-2 first:pt-0 last:pb-0", children: [
|
|
2090
|
+
/* @__PURE__ */ e.jsx("div", { className: "relative w-[70px] truncate text-xs text-foreground", children: /* @__PURE__ */ e.jsx("span", { className: `text-[11px] ${i && !S ? "text-foreground" : ""}`, children: a(n) }) }),
|
|
1855
2091
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-row items-center", children: [
|
|
1856
2092
|
/* @__PURE__ */ e.jsxs("div", { className: "w-[150px]", children: [
|
|
1857
2093
|
t === "arbitrary" ? /* @__PURE__ */ e.jsx(
|
|
1858
|
-
|
|
2094
|
+
js,
|
|
1859
2095
|
{
|
|
1860
|
-
currentClass:
|
|
1861
|
-
classPrefix:
|
|
1862
|
-
units:
|
|
1863
|
-
onChange:
|
|
1864
|
-
negative:
|
|
1865
|
-
cssProperty:
|
|
2096
|
+
currentClass: y(i, "cls", ""),
|
|
2097
|
+
classPrefix: y(Cs, l, ""),
|
|
2098
|
+
units: d || [],
|
|
2099
|
+
onChange: C,
|
|
2100
|
+
negative: c,
|
|
2101
|
+
cssProperty: l
|
|
1866
2102
|
}
|
|
1867
2103
|
) : null,
|
|
1868
|
-
t === "icons" && /* @__PURE__ */ e.jsx(
|
|
1869
|
-
t === "range" && /* @__PURE__ */ e.jsx(
|
|
1870
|
-
t === "color" && /* @__PURE__ */ e.jsx(
|
|
1871
|
-
t === "dropdown" && /* @__PURE__ */ e.jsx(
|
|
2104
|
+
t === "icons" && /* @__PURE__ */ e.jsx(gs, { property: l, onChange: C }),
|
|
2105
|
+
t === "range" && /* @__PURE__ */ e.jsx(us, { property: l, onChange: C }),
|
|
2106
|
+
t === "color" && /* @__PURE__ */ e.jsx(ys, { property: l, onChange: C }),
|
|
2107
|
+
t === "dropdown" && /* @__PURE__ */ e.jsx(xt, { label: n, property: l, onChange: C })
|
|
1872
2108
|
] }),
|
|
1873
|
-
/* @__PURE__ */ e.jsx("div", { className: `w-[30px] cursor-pointer ${
|
|
1874
|
-
/* @__PURE__ */ e.jsx(
|
|
2109
|
+
/* @__PURE__ */ e.jsx("div", { className: `w-[30px] cursor-pointer ${v ? "visible" : "invisible"}`, children: S ? /* @__PURE__ */ e.jsx("button", { type: "button", onClick: () => U(), title: "Reset", className: "flex px-1.5 text-xs", children: /* @__PURE__ */ e.jsx(Jt, { className: "h-5 w-5 text-blue-500 hover:opacity-80" }) }) : L && i ? /* @__PURE__ */ e.jsxs($, { delayDuration: 100, children: [
|
|
2110
|
+
/* @__PURE__ */ e.jsx(M, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
1875
2111
|
"button",
|
|
1876
2112
|
{
|
|
1877
2113
|
type: "button",
|
|
1878
2114
|
className: "invisible ml-3 mt-1 rounded-full bg-blue-500 text-white group-hover:visible",
|
|
1879
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2115
|
+
children: /* @__PURE__ */ e.jsx(Se, {})
|
|
1880
2116
|
}
|
|
1881
2117
|
) }),
|
|
1882
|
-
/* @__PURE__ */ e.jsx(
|
|
2118
|
+
/* @__PURE__ */ e.jsx(E, { children: /* @__PURE__ */ e.jsx("div", { className: "text-right", children: /* @__PURE__ */ e.jsxs("div", { children: [
|
|
1883
2119
|
"Current style is set at ",
|
|
1884
2120
|
/* @__PURE__ */ e.jsxs("span", { className: "font-bold", children: [
|
|
1885
|
-
|
|
1886
|
-
o && !
|
|
2121
|
+
ks(y(i, "mq")),
|
|
2122
|
+
o && !i.dark ? "(Light mode)" : ""
|
|
1887
2123
|
] }),
|
|
1888
2124
|
/* @__PURE__ */ e.jsx("br", {}),
|
|
1889
2125
|
/* @__PURE__ */ e.jsxs(
|
|
1890
2126
|
"button",
|
|
1891
2127
|
{
|
|
1892
2128
|
type: "button",
|
|
1893
|
-
onClick: () =>
|
|
2129
|
+
onClick: () => q(y(i, "mq")),
|
|
1894
2130
|
className: "block w-full cursor-default text-right font-semibold text-blue-500",
|
|
1895
2131
|
children: [
|
|
1896
2132
|
"Switch to ",
|
|
1897
|
-
|
|
2133
|
+
y(i, "mq").toUpperCase()
|
|
1898
2134
|
]
|
|
1899
2135
|
}
|
|
1900
2136
|
)
|
|
@@ -1902,307 +2138,151 @@ const vs = (r) => {
|
|
|
1902
2138
|
] }) : null })
|
|
1903
2139
|
] })
|
|
1904
2140
|
] }) });
|
|
1905
|
-
},
|
|
2141
|
+
}, Ns = ["px", "%", "em", "rem", "ch", "vh", "vw"], ht = ({
|
|
1906
2142
|
label: r,
|
|
1907
|
-
options:
|
|
2143
|
+
options: a,
|
|
1908
2144
|
borderB: t = !1,
|
|
1909
2145
|
borderT: n = !1,
|
|
1910
|
-
type:
|
|
1911
|
-
units:
|
|
1912
|
-
negative:
|
|
2146
|
+
type: l = "arbitrary",
|
|
2147
|
+
units: s = Ns,
|
|
2148
|
+
negative: d = !1
|
|
1913
2149
|
}) => {
|
|
1914
|
-
const { t:
|
|
2150
|
+
const { t: c } = B(), [o, p] = j(a[0].key), h = ue(), i = H((g) => _(h, "property").includes(g), [h]);
|
|
1915
2151
|
return /* @__PURE__ */ e.jsxs(
|
|
1916
2152
|
"div",
|
|
1917
2153
|
{
|
|
1918
2154
|
className: `mb-2 border-gray-800 py-2 first:pt-0 last:pb-0 ${t ? "border-b" : ""} ${n ? "border-t" : ""}`,
|
|
1919
2155
|
children: [
|
|
1920
2156
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-row text-xs", children: [
|
|
1921
|
-
r && /* @__PURE__ */ e.jsx("span", { className: "relative w-[70px] flex-none text-xs text-foreground", children:
|
|
2157
|
+
r && /* @__PURE__ */ e.jsx("span", { className: "relative w-[70px] flex-none text-xs text-foreground", children: c(r) }),
|
|
1922
2158
|
/* @__PURE__ */ e.jsx("div", { className: "mb-3 flex grow flex-row flex-wrap gap-x-px", children: I.Children.toArray(
|
|
1923
|
-
|
|
1924
|
-
/* @__PURE__ */ e.jsx(
|
|
2159
|
+
a.map(({ label: g, key: x }) => /* @__PURE__ */ e.jsx("div", { className: "first:rounded-l last:rounded-r", children: /* @__PURE__ */ e.jsxs($, { children: [
|
|
2160
|
+
/* @__PURE__ */ e.jsx(M, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
1925
2161
|
"button",
|
|
1926
2162
|
{
|
|
1927
2163
|
type: "button",
|
|
1928
|
-
onClick: () =>
|
|
1929
|
-
className: `relative cursor-pointer rounded-full p-1 text-[8px] ${
|
|
2164
|
+
onClick: () => p(x),
|
|
2165
|
+
className: `relative cursor-pointer rounded-full p-1 text-[8px] ${x === o ? " bg-[#3E57F0] text-white" : "text-gray-600 dark:text-gray-300"}`,
|
|
1930
2166
|
children: [
|
|
1931
2167
|
I.createElement("div", {
|
|
1932
|
-
className:
|
|
2168
|
+
className: i(x) ? "-bottom-1.5 absolute bg-[#3E57F0] h-[2px] left-0 w-full" : ""
|
|
1933
2169
|
}),
|
|
1934
|
-
I.createElement(
|
|
2170
|
+
I.createElement(y(gt, x, Ke), { className: "text-inherit w-3 h-3" })
|
|
1935
2171
|
]
|
|
1936
2172
|
}
|
|
1937
2173
|
) }),
|
|
1938
|
-
/* @__PURE__ */ e.jsx(
|
|
2174
|
+
/* @__PURE__ */ e.jsx(E, { children: F(re(g)) })
|
|
1939
2175
|
] }) }))
|
|
1940
2176
|
) })
|
|
1941
2177
|
] }),
|
|
1942
2178
|
/* @__PURE__ */ e.jsx("div", { className: "mt-0 flex items-center", children: /* @__PURE__ */ e.jsx(
|
|
1943
|
-
|
|
2179
|
+
Ve,
|
|
1944
2180
|
{
|
|
1945
|
-
type:
|
|
1946
|
-
units: [...
|
|
2181
|
+
type: l,
|
|
2182
|
+
units: [...s],
|
|
1947
2183
|
label: "",
|
|
1948
2184
|
property: o,
|
|
1949
|
-
negative:
|
|
2185
|
+
negative: d
|
|
1950
2186
|
}
|
|
1951
2187
|
) })
|
|
1952
2188
|
]
|
|
1953
2189
|
}
|
|
1954
2190
|
);
|
|
1955
|
-
},
|
|
1956
|
-
const { t } =
|
|
1957
|
-
const
|
|
1958
|
-
o.map((
|
|
1959
|
-
),
|
|
1960
|
-
|
|
1961
|
-
),
|
|
1962
|
-
return
|
|
1963
|
-
}, [n,
|
|
2191
|
+
}, _s = ({ heading: r, items: a }) => {
|
|
2192
|
+
const { t } = B(), n = ue(), l = T(() => {
|
|
2193
|
+
const s = (o) => De(
|
|
2194
|
+
o.map((p) => p.styleType === "multiple" ? _(p.options, "key") : p.property)
|
|
2195
|
+
), d = De(
|
|
2196
|
+
a.map((o) => o.styleType === "accordion" ? s(o.items) : o.styleType === "multiple" ? _(o.options, "key") : o.property)
|
|
2197
|
+
), c = _(n, "property");
|
|
2198
|
+
return Dt(d, c).length > 0;
|
|
2199
|
+
}, [n, a]);
|
|
1964
2200
|
return /* @__PURE__ */ e.jsxs("details", { children: [
|
|
1965
2201
|
/* @__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: [
|
|
1966
2202
|
t(r),
|
|
1967
|
-
|
|
2203
|
+
l ? /* @__PURE__ */ e.jsx(
|
|
1968
2204
|
"span",
|
|
1969
2205
|
{
|
|
1970
|
-
className: `ml-1 mr-2 inline-block h-[8px] w-[8px] rounded-full ${
|
|
2206
|
+
className: `ml-1 mr-2 inline-block h-[8px] w-[8px] rounded-full ${l ? "bg-blue-500" : "bg-gray-300"}`
|
|
1971
2207
|
}
|
|
1972
2208
|
) : null
|
|
1973
2209
|
] }) }),
|
|
1974
|
-
/* @__PURE__ */ e.jsx("div", { className: "p-2", children:
|
|
2210
|
+
/* @__PURE__ */ e.jsx("div", { className: "p-2", children: a.map((s) => s.styleType === "multiple" ? /* @__PURE__ */ e.jsx(ht, { ...s }, s.label) : /* @__PURE__ */ e.jsx(Ve, { ...s }, s.label)) })
|
|
1975
2211
|
] });
|
|
1976
|
-
},
|
|
1977
|
-
const { t:
|
|
1978
|
-
(
|
|
2212
|
+
}, Ss = Fe({}), xe = ({ section: r }) => {
|
|
2213
|
+
const { t: a } = B(), t = ue(), n = H(
|
|
2214
|
+
(s = []) => {
|
|
1979
2215
|
const d = {};
|
|
1980
|
-
for (let
|
|
1981
|
-
d[t[
|
|
1982
|
-
let
|
|
1983
|
-
for (const
|
|
1984
|
-
if (!
|
|
1985
|
-
|
|
2216
|
+
for (let o = 0; o < t.length; o++)
|
|
2217
|
+
d[t[o].property] = t[o].cls;
|
|
2218
|
+
let c = !0;
|
|
2219
|
+
for (const o in s)
|
|
2220
|
+
if (!ie(d, o) || d[o] !== s[o]) {
|
|
2221
|
+
c = !1;
|
|
1986
2222
|
break;
|
|
1987
2223
|
}
|
|
1988
|
-
return
|
|
2224
|
+
return c;
|
|
1989
2225
|
},
|
|
1990
2226
|
[t]
|
|
1991
|
-
),
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
), d = J(
|
|
1997
|
-
r.items.map((c) => c.styleType === "accordion" ? a(c.items) : c.styleType === "multiple" ? J(C(c.options, "key")) : c.property)
|
|
1998
|
-
), o = C(t, "property");
|
|
1999
|
-
return Qe(d, o).length > 0;
|
|
2000
|
-
}, [t, r.heading, r.items]), i = S(() => ({}), []);
|
|
2001
|
-
return /* @__PURE__ */ e.jsx(Vs.Provider, { value: i, children: /* @__PURE__ */ e.jsxs(Ce, { value: r.heading, children: [
|
|
2002
|
-
/* @__PURE__ */ e.jsx(ke, { className: "px-3 py-2 text-xs hover:no-underline", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
|
|
2003
|
-
/* @__PURE__ */ e.jsx("div", { className: `h-[8px] w-[8px] rounded-full ${s ? "bg-blue-500" : "bg-gray-300"}` }),
|
|
2004
|
-
l(r.heading)
|
|
2005
|
-
] }) }),
|
|
2006
|
-
/* @__PURE__ */ e.jsx(Ne, { className: "bg-gray-100 px-3.5 py-2", children: I.Children.toArray(
|
|
2007
|
-
r.items.map((a) => ce(a, "component") ? I.createElement(a.component, { key: a.label }) : ce(a, "styleType") ? a.styleType === "multiple" ? /* @__PURE__ */ e.jsx(mt, { ...a }, a.label) : a.styleType === "accordion" && n(a == null ? void 0 : a.conditions) ? /* @__PURE__ */ e.jsx(Rs, { ...a }, a.label) : null : /* @__PURE__ */ e.jsx(Ie, { ...a }, a.label))
|
|
2227
|
+
), l = T(() => ({}), []);
|
|
2228
|
+
return /* @__PURE__ */ e.jsx(Ss.Provider, { value: l, children: /* @__PURE__ */ e.jsxs(me, { value: r.heading, children: [
|
|
2229
|
+
/* @__PURE__ */ e.jsx(fe, { className: "bg-gray-200 px-3 py-2 text-xs hover:no-underline", children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-x-2", children: a(r.heading) }) }),
|
|
2230
|
+
/* @__PURE__ */ e.jsx(ve, { className: "bg-gray-100 px-3.5 py-2", children: I.Children.toArray(
|
|
2231
|
+
r.items.map((s) => ie(s, "component") ? I.createElement(s.component, { key: s.label }) : ie(s, "styleType") ? s.styleType === "multiple" ? /* @__PURE__ */ e.jsx(ht, { ...s }, s.label) : s.styleType === "accordion" && n(s == null ? void 0 : s.conditions) ? /* @__PURE__ */ e.jsx(_s, { ...s }, s.label) : null : /* @__PURE__ */ e.jsx(Ve, { ...s }, s.label))
|
|
2008
2232
|
) })
|
|
2009
2233
|
] }) });
|
|
2010
|
-
},
|
|
2011
|
-
const r =
|
|
2012
|
-
if (
|
|
2234
|
+
}, Ts = () => {
|
|
2235
|
+
const r = G(), [a] = pe(), { t } = B(), n = Lr(), l = Te(), s = Re(r._type), d = y(ae(a), "prop"), c = y(s.props, `${d}.presets`, {});
|
|
2236
|
+
if (m(n) && (!ie(s, "props") || m(c)))
|
|
2013
2237
|
return null;
|
|
2014
|
-
const o = (
|
|
2015
|
-
const h =
|
|
2016
|
-
|
|
2238
|
+
const o = (p) => {
|
|
2239
|
+
const h = p.trim().toLowerCase().replace(/ +(?= )/g, "").split(" ");
|
|
2240
|
+
l([r._id], h, !0);
|
|
2017
2241
|
};
|
|
2018
|
-
return /* @__PURE__ */ e.jsx("div", { className: "h-10", children: /* @__PURE__ */ e.jsxs(
|
|
2019
|
-
/* @__PURE__ */ e.jsx(
|
|
2242
|
+
return /* @__PURE__ */ e.jsx("div", { className: "h-10", children: /* @__PURE__ */ e.jsxs(Rr, { children: [
|
|
2243
|
+
/* @__PURE__ */ e.jsx(Vr, { asChild: !0, children: /* @__PURE__ */ e.jsx("div", { className: "px-4", children: /* @__PURE__ */ e.jsxs(A, { variant: "default", className: "w-full", size: "sm", children: [
|
|
2020
2244
|
t("Apply Presets"),
|
|
2021
|
-
/* @__PURE__ */ e.jsx(
|
|
2245
|
+
/* @__PURE__ */ e.jsx(Qt, {})
|
|
2022
2246
|
] }) }) }),
|
|
2023
|
-
/* @__PURE__ */ e.jsx(
|
|
2024
|
-
|
|
2025
|
-
/* @__PURE__ */ e.jsxs(
|
|
2026
|
-
|
|
2247
|
+
/* @__PURE__ */ e.jsx(Hr, { className: "max-h-80 w-56", children: /* @__PURE__ */ e.jsxs(ct, { className: "no-scrollbar h-full", children: [
|
|
2248
|
+
m(c) ? null : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2249
|
+
/* @__PURE__ */ e.jsxs(Pe, { children: [
|
|
2250
|
+
s.type,
|
|
2027
2251
|
" ",
|
|
2028
2252
|
t("presets")
|
|
2029
2253
|
] }),
|
|
2030
|
-
/* @__PURE__ */ e.jsx(
|
|
2031
|
-
/* @__PURE__ */ e.jsx(
|
|
2032
|
-
|
|
2033
|
-
/* @__PURE__ */ e.jsx(
|
|
2254
|
+
/* @__PURE__ */ e.jsx(Ae, {}),
|
|
2255
|
+
/* @__PURE__ */ e.jsx($e, { children: he(c).map((p) => /* @__PURE__ */ e.jsxs(Me, { className: "group text-xs", onClick: () => o(c[p]), children: [
|
|
2256
|
+
be(F(t(p))),
|
|
2257
|
+
/* @__PURE__ */ e.jsx(Ee, { className: "invisible hover:font-bold hover:text-blue-600 group-hover:visible", children: t("apply") })
|
|
2034
2258
|
] })) })
|
|
2035
2259
|
] }),
|
|
2036
|
-
|
|
2037
|
-
/* @__PURE__ */ e.jsx(
|
|
2038
|
-
/* @__PURE__ */ e.jsx(
|
|
2039
|
-
/* @__PURE__ */ e.jsx(
|
|
2040
|
-
|
|
2041
|
-
/* @__PURE__ */ e.jsx(
|
|
2260
|
+
m(n) ? null : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2261
|
+
/* @__PURE__ */ e.jsx(Pe, { children: t("Global presets") }),
|
|
2262
|
+
/* @__PURE__ */ e.jsx(Ae, {}),
|
|
2263
|
+
/* @__PURE__ */ e.jsx($e, { children: he(n).map((p) => /* @__PURE__ */ e.jsxs(Me, { className: "group text-xs", onClick: () => o(n[p]), children: [
|
|
2264
|
+
be(F(t(p))),
|
|
2265
|
+
/* @__PURE__ */ e.jsx(Ee, { className: "invisible hover:font-bold hover:text-blue-600 group-hover:visible", children: t("apply") })
|
|
2042
2266
|
] })) })
|
|
2043
2267
|
] })
|
|
2044
2268
|
] }) })
|
|
2045
2269
|
] }) });
|
|
2046
2270
|
};
|
|
2047
|
-
function
|
|
2048
|
-
const
|
|
2049
|
-
return
|
|
2050
|
-
/* @__PURE__ */ e.jsx(
|
|
2051
|
-
/* @__PURE__ */ e.jsx("h1", { children:
|
|
2271
|
+
function Rs() {
|
|
2272
|
+
const { flexChild: r, gridChild: a } = Dr(), { t } = B(), [n] = pe();
|
|
2273
|
+
return m(n) ? /* @__PURE__ */ e.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 rounded-xl p-4", children: [
|
|
2274
|
+
/* @__PURE__ */ e.jsx(qe, { className: "mx-auto text-3xl" }),
|
|
2275
|
+
/* @__PURE__ */ e.jsx("h1", { children: t("no_styling_block_selected") })
|
|
2052
2276
|
] }) }) : /* @__PURE__ */ e.jsxs("div", { className: "flex h-full flex-col", children: [
|
|
2053
|
-
/* @__PURE__ */ e.jsx(
|
|
2054
|
-
/* @__PURE__ */ e.
|
|
2055
|
-
/* @__PURE__ */ e.jsx(
|
|
2056
|
-
/* @__PURE__ */ e.
|
|
2057
|
-
|
|
2058
|
-
/* @__PURE__ */ e.jsxs(Ir, { children: [
|
|
2059
|
-
C(i, (d, o) => /* @__PURE__ */ e.jsx(V, { value: o, children: s(d) }, o)),
|
|
2060
|
-
/* @__PURE__ */ e.jsx("hr", {}),
|
|
2061
|
-
/* @__PURE__ */ e.jsx(V, { value: "", children: s("Normal") }),
|
|
2062
|
-
/* @__PURE__ */ e.jsx(V, { value: "hover", children: s("Hover") }),
|
|
2063
|
-
/* @__PURE__ */ e.jsx(V, { value: "active", children: s("Active") }),
|
|
2064
|
-
/* @__PURE__ */ e.jsx(V, { value: "focus", children: s("Focus") }),
|
|
2065
|
-
/* @__PURE__ */ e.jsx(V, { value: "before", children: s("Before") }),
|
|
2066
|
-
/* @__PURE__ */ e.jsx(V, { value: "after", children: s("After") }),
|
|
2067
|
-
/* @__PURE__ */ e.jsx(V, { value: "only", children: s("Only") }),
|
|
2068
|
-
/* @__PURE__ */ e.jsx(V, { value: "first", children: s("First") }),
|
|
2069
|
-
/* @__PURE__ */ e.jsx(V, { value: "last", children: s("Last") }),
|
|
2070
|
-
/* @__PURE__ */ e.jsx(V, { value: "first-letter", children: s("First Letter") }),
|
|
2071
|
-
/* @__PURE__ */ e.jsx(V, { value: "first-line", children: s("First Line") }),
|
|
2072
|
-
/* @__PURE__ */ e.jsx(V, { value: "disabled", children: s("Disabled") })
|
|
2073
|
-
] })
|
|
2074
|
-
] })
|
|
2075
|
-
] }) }),
|
|
2076
|
-
r !== "" ? /* @__PURE__ */ e.jsxs("div", { className: "m-1 flex items-center space-x-1 rounded border border-orange-500 bg-orange-200 p-px px-2 text-xs text-orange-900", children: [
|
|
2077
|
-
/* @__PURE__ */ e.jsx(Fr, { className: "w-3" }),
|
|
2078
|
-
/* @__PURE__ */ e.jsx("span", { children: s(`Styles will be applied for (:${r}) state`) })
|
|
2079
|
-
] }) : null,
|
|
2080
|
-
/* @__PURE__ */ e.jsx(Be, { className: "no-scrollbar -mx-1 max-h-full flex-1 overflow-x-hidden overflow-y-hidden border-t border-border", children: /* @__PURE__ */ e.jsxs(nt, { defaultValue: ["Layout"], type: "multiple", className: "w-full", children: [
|
|
2081
|
-
t && /* @__PURE__ */ e.jsx(fe, { section: ps }),
|
|
2082
|
-
n ? /* @__PURE__ */ e.jsx(fe, { section: us }) : null,
|
|
2083
|
-
xs.map((d) => /* @__PURE__ */ e.jsx(fe, { section: d }, d.heading))
|
|
2084
|
-
] }) })
|
|
2085
|
-
] });
|
|
2086
|
-
}
|
|
2087
|
-
const Bs = ({ onAdd: r }) => {
|
|
2088
|
-
const { t: l } = X(), [t, n] = w({ key: "", value: "" }), s = () => {
|
|
2089
|
-
b(t.key) || (r({ ...t, key: Ht(t.key) }), n({ key: "", value: "" }));
|
|
2090
|
-
};
|
|
2091
|
-
return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1 border-gray-200 px-1", children: [
|
|
2092
|
-
/* @__PURE__ */ e.jsx(
|
|
2093
|
-
_e,
|
|
2094
|
-
{
|
|
2095
|
-
name: "key",
|
|
2096
|
-
onChange: (i) => n({ ...t, key: i.target.value }),
|
|
2097
|
-
value: t.key,
|
|
2098
|
-
placeholder: l("Name"),
|
|
2099
|
-
autoComplete: "off",
|
|
2100
|
-
autoCapitalize: "off",
|
|
2101
|
-
onKeyDown: (i) => {
|
|
2102
|
-
i.key === "Enter" && (i.preventDefault(), b(t.key) || s());
|
|
2103
|
-
}
|
|
2104
|
-
}
|
|
2105
|
-
),
|
|
2106
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-x-1.5", children: /* @__PURE__ */ e.jsx(
|
|
2107
|
-
_e,
|
|
2108
|
-
{
|
|
2109
|
-
name: "value",
|
|
2110
|
-
onChange: (i) => n({ ...t, value: i.target.value }),
|
|
2111
|
-
value: t.value,
|
|
2112
|
-
placeholder: l("Value"),
|
|
2113
|
-
autoComplete: "off",
|
|
2114
|
-
autoCapitalize: "off",
|
|
2115
|
-
onKeyDown: (i) => {
|
|
2116
|
-
i.key === "Enter" && (i.preventDefault(), b(t.key) || s());
|
|
2117
|
-
}
|
|
2118
|
-
}
|
|
2119
|
-
) }),
|
|
2120
|
-
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
|
|
2121
|
-
/* @__PURE__ */ e.jsxs(G, { disabled: b(t.key), onClick: s, size: "sm", className: "flex items-center", children: [
|
|
2122
|
-
/* @__PURE__ */ e.jsxs("span", { children: [
|
|
2123
|
-
l("Add"),
|
|
2124
|
-
" "
|
|
2125
|
-
] }),
|
|
2126
|
-
/* @__PURE__ */ e.jsx(Ve, {})
|
|
2127
|
-
] }),
|
|
2128
|
-
b(t.key) ? null : /* @__PURE__ */ e.jsx(G, { variant: "ghost", onClick: () => n({ key: "", value: "" }), children: l("Cancel") })
|
|
2277
|
+
/* @__PURE__ */ e.jsx(Ts, {}),
|
|
2278
|
+
/* @__PURE__ */ e.jsxs(ot, { defaultValue: ["Styles"], type: "multiple", className: "w-full", children: [
|
|
2279
|
+
r && /* @__PURE__ */ e.jsx(xe, { section: is }),
|
|
2280
|
+
a ? /* @__PURE__ */ e.jsx(xe, { section: ds }) : null,
|
|
2281
|
+
cs.map((l) => /* @__PURE__ */ e.jsx(xe, { section: l }, l.heading))
|
|
2129
2282
|
] })
|
|
2130
2283
|
] });
|
|
2131
|
-
}
|
|
2132
|
-
|
|
2133
|
-
de.useEffect(() => {
|
|
2134
|
-
const u = C(g(r, o), (y, x) => ({ key: x, value: y }));
|
|
2135
|
-
b(u) ? t([]) : t(u);
|
|
2136
|
-
}, [g(r, o)]);
|
|
2137
|
-
const c = (u) => {
|
|
2138
|
-
const y = ve(l, (x, f) => u !== f);
|
|
2139
|
-
p(y);
|
|
2140
|
-
}, h = (u) => {
|
|
2141
|
-
const y = Ge(l, { key: u.key });
|
|
2142
|
-
if (y && (y.value.startsWith("dnd-") || y.value.startsWith("#dnd-"))) {
|
|
2143
|
-
d({
|
|
2144
|
-
title: a("Cannot add predefined attribute"),
|
|
2145
|
-
variant: "destructive",
|
|
2146
|
-
description: a(`"(${u.key})" cannot be added as it is a predefined attribute for this block`)
|
|
2147
|
-
});
|
|
2148
|
-
return;
|
|
2149
|
-
}
|
|
2150
|
-
const x = [...l, u];
|
|
2151
|
-
p(x);
|
|
2152
|
-
}, p = de.useCallback(
|
|
2153
|
-
(u = []) => {
|
|
2154
|
-
const y = {};
|
|
2155
|
-
Re(u, (x) => {
|
|
2156
|
-
b(x.key) || qe(y, x.key, x.value);
|
|
2157
|
-
}), i([g(r, "_id")], { [o]: y });
|
|
2158
|
-
},
|
|
2159
|
-
[r, s, o]
|
|
2160
|
-
);
|
|
2161
|
-
return /* @__PURE__ */ e.jsx("div", { className: "px-2", children: /* @__PURE__ */ e.jsx("div", { className: "no-scrollbar flex min-h-max flex-col gap-y-2 overflow-y-auto", children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col", children: [
|
|
2162
|
-
/* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsxs("ul", { className: "overflow-hidden rounded-md bg-gray-100 p-2 text-xs text-gray-700", children: [
|
|
2163
|
-
b(l) ? /* @__PURE__ */ e.jsx("li", { className: "flex h-16 items-center justify-center", children: /* @__PURE__ */ e.jsx("p", { children: a("No custom attributes added yet") }) }) : /* @__PURE__ */ e.jsx("li", { children: /* @__PURE__ */ e.jsx("span", { className: "font-bold", children: a("Attributes") }) }),
|
|
2164
|
-
de.Children.toArray(
|
|
2165
|
-
C(l, (u) => /* @__PURE__ */ e.jsxs("li", { className: "group flex max-w-full items-center justify-between", children: [
|
|
2166
|
-
/* @__PURE__ */ e.jsxs($, { delayDuration: 1e3, children: [
|
|
2167
|
-
/* @__PURE__ */ e.jsx(A, { asChild: !0, children: /* @__PURE__ */ e.jsxs("div", { className: "w-[90%] cursor-default truncate px-1 hover:bg-gray-200", children: [
|
|
2168
|
-
u.key,
|
|
2169
|
-
" ",
|
|
2170
|
-
/* @__PURE__ */ e.jsx("span", { className: "font-bold text-orange-500", children: "=" }),
|
|
2171
|
-
" ",
|
|
2172
|
-
u.value
|
|
2173
|
-
] }) }),
|
|
2174
|
-
/* @__PURE__ */ e.jsxs(M, { className: "max-w-[200px]", children: [
|
|
2175
|
-
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
2176
|
-
a("Name"),
|
|
2177
|
-
": ",
|
|
2178
|
-
u.key
|
|
2179
|
-
] }),
|
|
2180
|
-
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
2181
|
-
a("Value"),
|
|
2182
|
-
": ",
|
|
2183
|
-
u.value
|
|
2184
|
-
] })
|
|
2185
|
-
] })
|
|
2186
|
-
] }),
|
|
2187
|
-
/* @__PURE__ */ e.jsxs($, { children: [
|
|
2188
|
-
/* @__PURE__ */ e.jsx(A, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
2189
|
-
"button",
|
|
2190
|
-
{
|
|
2191
|
-
disabled: W(u.value, "dnd-"),
|
|
2192
|
-
className: "invisible group-hover:visible",
|
|
2193
|
-
onClick: () => c(l.indexOf(u)),
|
|
2194
|
-
children: /* @__PURE__ */ e.jsx(Yr, { className: "w-4 text-gray-500" })
|
|
2195
|
-
}
|
|
2196
|
-
) }),
|
|
2197
|
-
/* @__PURE__ */ e.jsx(M, { className: "max-w-[200px]", children: W(u.value, "dnd-") ? a("Predefined attribute. Cannot be deleted") : a("Remove attribute") })
|
|
2198
|
-
] })
|
|
2199
|
-
] }))
|
|
2200
|
-
)
|
|
2201
|
-
] }) }),
|
|
2202
|
-
/* @__PURE__ */ e.jsx("div", { className: "py-2" }),
|
|
2203
|
-
/* @__PURE__ */ e.jsx(Bs, { onAdd: (u) => h(u) })
|
|
2204
|
-
] }) }) });
|
|
2205
|
-
}, Is = {
|
|
2284
|
+
}
|
|
2285
|
+
const Vs = {
|
|
2206
2286
|
px: 1,
|
|
2207
2287
|
"%": 1,
|
|
2208
2288
|
em: 100,
|
|
@@ -2213,8 +2293,8 @@ const Bs = ({ onAdd: r }) => {
|
|
|
2213
2293
|
"-": 1,
|
|
2214
2294
|
deg: 1,
|
|
2215
2295
|
ms: 0.1
|
|
2216
|
-
},
|
|
2217
|
-
const r =
|
|
2296
|
+
}, Ra = () => {
|
|
2297
|
+
const r = G(), { t: a } = B(), [t, n] = I.useState(""), [l, s] = I.useState({
|
|
2218
2298
|
onDrag: (o) => o,
|
|
2219
2299
|
onDragEnd: (o) => o,
|
|
2220
2300
|
dragStartY: 0,
|
|
@@ -2223,20 +2303,20 @@ const Bs = ({ onAdd: r }) => {
|
|
|
2223
2303
|
dragUnit: "",
|
|
2224
2304
|
negative: !1,
|
|
2225
2305
|
cssProperty: ""
|
|
2226
|
-
}),
|
|
2306
|
+
}), d = de(
|
|
2227
2307
|
(o) => {
|
|
2228
|
-
const
|
|
2229
|
-
let
|
|
2230
|
-
|
|
2231
|
-
let
|
|
2232
|
-
(W(h, "scale") || h === "opacity") && (
|
|
2233
|
-
let
|
|
2234
|
-
|
|
2308
|
+
const p = !y(l, "negative", !1), h = y(l, "cssProperty", "");
|
|
2309
|
+
let i = parseFloat(l.dragStartValue);
|
|
2310
|
+
i = Ue(i) ? 0 : i;
|
|
2311
|
+
let g = Vs[l.dragUnit];
|
|
2312
|
+
(W(h, "scale") || h === "opacity") && (g = 10);
|
|
2313
|
+
let u = (l.dragStartY - o.pageY) / g + i;
|
|
2314
|
+
p && u < 0 && (u = 0), h === "opacity" && u > 1 && (u = 1), l.onDrag(`${u}`), n(`${u}`);
|
|
2235
2315
|
},
|
|
2236
|
-
[
|
|
2316
|
+
[l],
|
|
2237
2317
|
50
|
|
2238
|
-
),
|
|
2239
|
-
setTimeout(() =>
|
|
2318
|
+
), c = H(() => {
|
|
2319
|
+
setTimeout(() => l.onDragEnd(`${t}`), 100), s({
|
|
2240
2320
|
onDrag: (o) => o,
|
|
2241
2321
|
onDragEnd: (o) => o,
|
|
2242
2322
|
dragStartY: 0,
|
|
@@ -2246,31 +2326,25 @@ const Bs = ({ onAdd: r }) => {
|
|
|
2246
2326
|
negative: !1,
|
|
2247
2327
|
cssProperty: ""
|
|
2248
2328
|
});
|
|
2249
|
-
}, [
|
|
2250
|
-
return
|
|
2251
|
-
/* @__PURE__ */ e.jsx(
|
|
2252
|
-
/* @__PURE__ */ e.jsx("h1", { children:
|
|
2253
|
-
] }) }) : /* @__PURE__ */ e.jsx(
|
|
2254
|
-
|
|
2329
|
+
}, [l, t, s]);
|
|
2330
|
+
return Bt(r) ? /* @__PURE__ */ e.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 rounded-xl p-4", children: [
|
|
2331
|
+
/* @__PURE__ */ e.jsx(qe, { className: "mx-auto text-3xl" }),
|
|
2332
|
+
/* @__PURE__ */ e.jsx("h1", { children: a("no_block_selected_for_styling") })
|
|
2333
|
+
] }) }) : /* @__PURE__ */ e.jsx(Je, { children: /* @__PURE__ */ e.jsxs(yt.Provider, { value: { setDragData: s }, children: [
|
|
2334
|
+
l.dragging ? /* @__PURE__ */ e.jsx(
|
|
2255
2335
|
"div",
|
|
2256
2336
|
{
|
|
2257
|
-
onMouseMove:
|
|
2258
|
-
onMouseUp: () =>
|
|
2337
|
+
onMouseMove: d,
|
|
2338
|
+
onMouseUp: () => c(),
|
|
2259
2339
|
className: "absolute inset-0 z-30 cursor-row-resize bg-gray-300/10"
|
|
2260
2340
|
}
|
|
2261
2341
|
) : null,
|
|
2262
|
-
/* @__PURE__ */ e.jsxs(
|
|
2263
|
-
/* @__PURE__ */ e.
|
|
2264
|
-
|
|
2265
|
-
/* @__PURE__ */ e.jsx(me, { value: "styling", children: l("styling") }),
|
|
2266
|
-
/* @__PURE__ */ e.jsx(me, { value: "attrs", children: l("Attributes") })
|
|
2267
|
-
] }),
|
|
2268
|
-
/* @__PURE__ */ e.jsx(be, { value: "settings", className: "no-scrollbar h-full flex-1 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(Be, { className: "no-scrollbar max-h-full flex-1 overflow-x-hidden overflow-y-hidden pb-5", children: /* @__PURE__ */ e.jsx(ds, {}) }) }),
|
|
2269
|
-
/* @__PURE__ */ e.jsx(be, { value: "styling", className: "h-full flex-1 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(Ds, {}) }),
|
|
2270
|
-
/* @__PURE__ */ e.jsx(be, { value: "attrs", className: "h-full flex-1 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(Ps, {}) })
|
|
2342
|
+
/* @__PURE__ */ e.jsxs(ct, { className: "no-scrollbar max-h-full flex-1 overflow-x-hidden overflow-y-hidden bg-gray-100 pb-5", children: [
|
|
2343
|
+
/* @__PURE__ */ e.jsx(as, {}),
|
|
2344
|
+
/* @__PURE__ */ e.jsx(Rs, {})
|
|
2271
2345
|
] })
|
|
2272
2346
|
] }) });
|
|
2273
2347
|
};
|
|
2274
2348
|
export {
|
|
2275
|
-
|
|
2349
|
+
Ra as default
|
|
2276
2350
|
};
|