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