@chaibuilder/sdk 1.2.20 → 1.2.22

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.
Files changed (63) hide show
  1. package/dist/{AddBlocks-X9eh8OWJ.cjs → AddBlocks-157fSrJX.cjs} +1 -1
  2. package/dist/{AddBlocks-VIWJkaHJ.js → AddBlocks-WgpssWmQ.js} +2 -2
  3. package/dist/{BrandingOptions-5ss0k1nb.js → BrandingOptions-4961TxX2.js} +2 -2
  4. package/dist/{BrandingOptions-PzPdafIT.cjs → BrandingOptions-nwXR9TMl.cjs} +1 -1
  5. package/dist/{CanvasArea-TTGqlBKO.js → CanvasArea-MajWGr9z.js} +3 -3
  6. package/dist/{CanvasArea-hoyr4dfb.cjs → CanvasArea-MmTlc5Vb.cjs} +1 -1
  7. package/dist/{CurrentPage-EddxgHU-.cjs → CurrentPage-LpLr0lDI.cjs} +1 -1
  8. package/dist/{CurrentPage-a3T2uy8Q.js → CurrentPage-oPZN6Gwj.js} +3 -3
  9. package/dist/ListTree-dvxHTXs4.js +167 -0
  10. package/dist/ListTree-gTmusfso.cjs +1 -0
  11. package/dist/{Outline-rNFJGkap.js → Outline-2OxsXs1-.js} +3 -3
  12. package/dist/{Outline-3IHYlOzF.cjs → Outline-7CCnnzmK.cjs} +1 -1
  13. package/dist/{PagesPanel-B33hWN11.cjs → PagesPanel-8536oBWB.cjs} +1 -1
  14. package/dist/{PagesPanel-0bL28ofN.js → PagesPanel-pRKHw-AZ.js} +4 -4
  15. package/dist/{ProjectPanel-sBRkUXnY.js → ProjectPanel-iU6DY-Yp.js} +4 -4
  16. package/dist/{ProjectPanel-qtRTXNOP.cjs → ProjectPanel-oILsUWOH.cjs} +1 -1
  17. package/dist/{Settings-HgGe1ANj.js → Settings-BhSrj-cE.js} +552 -532
  18. package/dist/Settings-jHiYmt0y.cjs +1 -0
  19. package/dist/{SidePanels-R_g9rSjP.js → SidePanels-OLOUpKn4.js} +45 -45
  20. package/dist/{SidePanels-aAm-2A3s.cjs → SidePanels-bcJJocSq.cjs} +1 -1
  21. package/dist/{Topbar-cXtxVswU.cjs → Topbar-NMvzqQHW.cjs} +1 -1
  22. package/dist/{Topbar-AUTKpVHO.js → Topbar-Ny9T-7Zb.js} +1 -1
  23. package/dist/{UnsplashImages-p34UJJWJ.cjs → UnsplashImages-6tZv1q2_.cjs} +1 -1
  24. package/dist/{UnsplashImages-1RFHZIte.js → UnsplashImages-Y8RGFVSh.js} +1 -1
  25. package/dist/{UploadImages-CLfyNo1i.cjs → UploadImages-VLlVg9Ur.cjs} +1 -1
  26. package/dist/{UploadImages-G2orrhmZ.js → UploadImages-dd8LfyFr.js} +1 -1
  27. package/dist/{add-page-modal-KCy_Khfe.cjs → add-page-modal-IsqDdK7X.cjs} +1 -1
  28. package/dist/{add-page-modal-DUthvJNJ.js → add-page-modal-Jni6CY1x.js} +4 -4
  29. package/dist/{confirm-alert-T8vimDRx.cjs → confirm-alert-f26zJ7Js.cjs} +1 -1
  30. package/dist/{confirm-alert-nk2WQHud.js → confirm-alert-sc8RaWvD.js} +1 -1
  31. package/dist/core.cjs +1 -1
  32. package/dist/core.js +2 -2
  33. package/dist/{delete-page-modal-WvWRQUgU.js → delete-page-modal-0WiMZFxr.js} +3 -3
  34. package/dist/{delete-page-modal-_pFjWLJn.cjs → delete-page-modal-c3b-GCap.cjs} +1 -1
  35. package/dist/email.cjs +1 -1
  36. package/dist/email.js +2 -2
  37. package/dist/{form-kXQX4L2W.js → form-Nj6Kdn3g.js} +1 -1
  38. package/dist/{form-YnnWtUGk.cjs → form-n1Q6u16z.cjs} +1 -1
  39. package/dist/{index-e5cgISUO.cjs → index-0bwkNnA0.cjs} +2 -2
  40. package/dist/index-9PHdn80L.cjs +1 -0
  41. package/dist/{index-la4rqGKN.js → index-IPJAbzzO.js} +965 -928
  42. package/dist/{index-QIbDWoML.js → index-UP_4awU9.js} +2 -2
  43. package/dist/{index--Pt4B5bv.js → index-_VPpjzJu.js} +3 -3
  44. package/dist/{index-JqRQZLN5.cjs → index-nwAgi0aD.cjs} +1 -1
  45. package/dist/{page-viewer-s_lHBVfx.js → page-viewer-L1Dmgj-c.js} +4 -4
  46. package/dist/{page-viewer-6phtctz6.cjs → page-viewer-TnxHhq7S.cjs} +1 -1
  47. package/dist/{project-general-setting-SaNOMXEl.cjs → project-general-setting-1Ot1RU43.cjs} +1 -1
  48. package/dist/{project-general-setting-gj4A0X5W.js → project-general-setting-sUP7JqWK.js} +4 -4
  49. package/dist/{project-seo-setting-bMDdgKRZ.cjs → project-seo-setting-3-vBkx2v.cjs} +1 -1
  50. package/dist/{project-seo-setting-aCPg-IIc.js → project-seo-setting-NNvAGt4T.js} +2 -2
  51. package/dist/{single-page-detail-TP-cxVIT.js → single-page-detail-FXg_NebW.js} +5 -5
  52. package/dist/{single-page-detail-er8i2FIF.cjs → single-page-detail-btEKYXjE.cjs} +1 -1
  53. package/dist/studio.cjs +1 -1
  54. package/dist/studio.js +3 -3
  55. package/dist/ui.cjs +1 -1
  56. package/dist/ui.js +1 -1
  57. package/dist/{useAddBlockByDrop-_vczk5o_.js → useAddBlockByDrop-V8xo-PNQ.js} +1 -1
  58. package/dist/{useAddBlockByDrop-LSV8adwE.cjs → useAddBlockByDrop-qRHgy8_0.cjs} +1 -1
  59. package/package.json +24 -25
  60. package/dist/ListTree-kergCZrw.js +0 -126
  61. package/dist/ListTree-tADrgsqZ.cjs +0 -1
  62. package/dist/Settings-rXxS3RGM.cjs +0 -1
  63. package/dist/index-DeHH1q_1.cjs +0 -1
@@ -1,21 +1,21 @@
1
1
  import { j as e } from "./jsx-runtime-WbnYoNE9.js";
2
2
  import * as de from "react";
3
- import I, { useState as C, useMemo as _, useEffect as O, useCallback as V, memo as ft, createContext as Qe, useContext as le } from "react";
3
+ import I, { useState as C, useMemo as _, useEffect as E, useCallback as V, memo as ft, createContext as Qe, useContext as le } from "react";
4
4
  import { useThrottledCallback as je } from "@react-hookz/web";
5
- import { forEach as _e, isArray as ce, omit as vt, truncate as jt, includes as M, get as x, first as ge, split as wt, startCase as z, toLower as se, isEmpty as f, map as k, find as Ct, last as we, filter as Ce, set as et, debounce as kt, keys as Nt, cloneDeep as _t, each as St, capitalize as Tt, reject as Rt, nth as $e, startsWith as G, isNumber as Vt, parseInt as Ht, isNaN as tt, findLast as Dt, flatten as K, intersection as rt, has as me, isNull as Bt } from "lodash-es";
5
+ import { forEach as _e, isArray as ce, omit as vt, truncate as jt, includes as M, get as x, first as ge, split as wt, startCase as F, toLower as se, isEmpty as f, map as k, find as Ct, last as we, filter as Ce, set as et, debounce as kt, keys as Nt, cloneDeep as _t, each as St, capitalize as Tt, reject as Rt, nth as Be, startsWith as G, isNumber as Vt, parseInt as Ht, isNaN as tt, findLast as Dt, flatten as K, intersection as rt, has as be, isNull as $t } from "lodash-es";
6
6
  import { useTranslation as W } from "react-i18next";
7
- import { PlusIcon as Se, Cross2Icon as st, EyeOpenIcon as $t, EyeClosedIcon as Pe, BorderAllIcon as A, WidthIcon as T, HeightIcon as R, ArrowUpIcon as Q, ArrowRightIcon as ee, ArrowDownIcon as te, ArrowLeftIcon as re, ArrowTopLeftIcon as Pt, ArrowTopRightIcon as It, ArrowBottomRightIcon as At, ArrowBottomLeftIcon as Mt, AlignLeftIcon as Et, AlignCenterHorizontallyIcon as Lt, AlignRightIcon as Ot, StretchHorizontallyIcon as Ft, FontItalicIcon as zt, UnderlineIcon as Yt, OverlineIcon as Xt, LetterCaseUppercaseIcon as Zt, Cross1Icon as Wt, InfoCircledIcon as Te, MinusIcon as Ut, BoxIcon as lt, RowSpacingIcon as Gt, TriangleDownIcon as Kt, CrossCircledIcon as qt, TrashIcon as Jt, CaretDownIcon as Qt, MixerHorizontalIcon as ot } from "@radix-ui/react-icons";
8
- import { aV as er, aW as tr, B as oe, aX as rr, aY as sr, aZ as lr, a_ as or, a$ as ar, b0 as nr, b1 as ir, a1 as U, af as dr, ag as cr, ah as pr, b2 as ur, ad as xr, ao as gr, ae as hr, ap as Y, aq as X, ar as Z, b3 as yr, b4 as br, b5 as mr, b6 as fr, b7 as vr, b8 as jr, a6 as at, a5 as wr, h as Cr, b9 as nt, ba as pe, bb as ue, bc as xe, ac as he, M as Re, _ as it, r as dt, aB as Ve, bd as kr, v as Nr, be as _r, $ as ye, V as Sr, a4 as ct, N as Ie, z as Tr, aG as Rr, aH as Vr, aI as Hr, bf as He, aJ as Ae, aK as Me, bg as Ee, bh as Le, bi as Oe, a7 as Dr, aj as Br, ak as $r, al as Pr, am as Ir, an as H, au as Ar, av as Mr, aw as Fe, ax as ze } from "./index-la4rqGKN.js";
7
+ import { PlusIcon as Se, Cross2Icon as st, EyeOpenIcon as Bt, EyeClosedIcon as Pe, BorderAllIcon as A, WidthIcon as T, HeightIcon as R, ArrowUpIcon as Q, ArrowRightIcon as ee, ArrowDownIcon as te, ArrowLeftIcon as re, ArrowTopLeftIcon as Pt, ArrowTopRightIcon as It, ArrowBottomRightIcon as At, ArrowBottomLeftIcon as Mt, AlignLeftIcon as Et, AlignCenterHorizontallyIcon as Lt, AlignRightIcon as Ot, StretchHorizontallyIcon as zt, FontItalicIcon as Ft, UnderlineIcon as Yt, OverlineIcon as Xt, LetterCaseUppercaseIcon as Zt, Cross1Icon as Wt, InfoCircledIcon as Te, MinusIcon as Ut, BoxIcon as lt, RowSpacingIcon as Gt, TriangleDownIcon as Kt, CrossCircledIcon as qt, TrashIcon as Jt, CaretDownIcon as Qt, MixerHorizontalIcon as ot } from "@radix-ui/react-icons";
8
+ import { aV as er, aW as tr, B as oe, aX as rr, aY as sr, aZ as lr, a_ as or, a$ as ar, b0 as nr, b1 as ir, a1 as U, af as dr, ag as cr, ah as pr, b2 as ur, ad as xr, ao as gr, ae as hr, ap as Y, aq as X, ar as Z, b3 as yr, b4 as mr, b5 as br, b6 as fr, b7 as vr, b8 as jr, a6 as at, a5 as wr, h as Cr, b9 as nt, ba as pe, bb as ue, bc as xe, ac as he, M as Re, _ as it, r as dt, aB as Ve, bd as kr, v as Nr, be as _r, $ as ye, V as Sr, a4 as ct, N as Ie, z as Tr, aG as Rr, aH as Vr, aI as Hr, bf as He, aJ as Ae, aK as Me, bg as Ee, bh as Le, bi as Oe, a7 as Dr, aj as $r, ak as Br, al as Pr, am as Ir, an as H, au as Ar, av as Mr, aw as ze, ax as Fe } from "./index-IPJAbzzO.js";
9
9
  import { u as Er } from "./controls-OfJWSEqC.js";
10
- import { Check as Lr, EditIcon as Or, TrashIcon as Fr, BrushIcon as zr } from "lucide-react";
10
+ import { Check as Lr, EditIcon as Or, TrashIcon as zr, BrushIcon as Fr } from "lucide-react";
11
11
  import { getBlockComponent as De, getChaiDataProviders as Yr, useGlobalStylingPresets as Xr } from "@chaibuilder/runtime";
12
- import { E as pt, u as ut } from "./index-QIbDWoML.js";
12
+ import { E as pt, u as ut } from "./index-UP_4awU9.js";
13
13
  import { J as Zr, a as Wr, d as Ur } from "./index-e0c8PmRQ.js";
14
14
  import Gr from "@rjsf/core";
15
15
  import Kr from "@rjsf/validator-ajv8";
16
16
  import qr from "react-autosuggest";
17
17
  import Jr from "fuse.js";
18
- import { A as Qr, C as be, g as es } from "./Class-3k8xjeiM.js";
18
+ import { A as Qr, C as me, g as es } from "./Class-3k8xjeiM.js";
19
19
  import { a as ts } from "./MODIFIERS-WQdaNvb8.js";
20
20
  import { get as Ye, first as rs, isEmpty as ie, has as ss, keys as Xe, capitalize as Ze, startCase as We } from "lodash";
21
21
  import "./_commonjsHelpers-UyOWmZb0.js";
@@ -52,26 +52,26 @@ import "flagged";
52
52
  import "react-dnd";
53
53
  import "@minoru/react-dnd-treeview";
54
54
  import "react-hotkeys-hook";
55
- function ls(r) {
56
- const a = [], t = {};
55
+ function ls(t) {
56
+ const o = [], r = {};
57
57
  function s(l, i) {
58
- _e(i, (o, c) => {
59
- const n = l ? `${l}.${c}` : c, p = ce(o) ? "list" : typeof o;
60
- a.push(n), t[n] = p === "string" ? "text" : p === "object" ? "model" : p, p === "object" && !ce(o) && s(n, o);
58
+ _e(i, (a, p) => {
59
+ const n = l ? `${l}.${p}` : p, d = ce(a) ? "list" : typeof a;
60
+ o.push(n), r[n] = d === "string" ? "text" : d === "object" ? "model" : d, d === "object" && !ce(a) && s(n, a);
61
61
  });
62
62
  }
63
- return s("", vt(r, ["styles", "_type", "_id", "_name", "_bindings"])), { paths: a, pathsType: t };
63
+ return s("", vt(t, ["styles", "_type", "_id", "_name", "_bindings"])), { paths: o, pathsType: r };
64
64
  }
65
- const ke = ({ data: r, fullView: a }) => {
66
- if (!r)
65
+ const ke = ({ data: t, fullView: o }) => {
66
+ if (!t)
67
67
  return null;
68
- const t = typeof r;
69
- return a ? typeof r == "object" ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
68
+ const r = typeof t;
69
+ return o ? typeof t == "object" ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
70
70
  /* @__PURE__ */ e.jsx("div", { className: "h-3" }),
71
71
  /* @__PURE__ */ e.jsx(pt, { children: /* @__PURE__ */ e.jsx(
72
72
  Zr,
73
73
  {
74
- data: r,
74
+ data: t,
75
75
  shouldExpandNode: Wr,
76
76
  style: {
77
77
  ...Ur,
@@ -83,46 +83,46 @@ const ke = ({ data: r, fullView: a }) => {
83
83
  ) })
84
84
  ] }) : /* @__PURE__ */ e.jsxs("div", { className: "max-h-36 w-full overflow-y-auto overflow-x-hidden text-[12px] leading-4 text-gray-800/50", children: [
85
85
  /* @__PURE__ */ e.jsx("span", { className: "font-medium text-gray-800/80", children: "Content: " }),
86
- r
87
- ] }) : /* @__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
+ t
87
+ ] }) : /* @__PURE__ */ e.jsx("div", { className: "w-full overflow-hidden whitespace-nowrap text-[10px] leading-3 text-gray-800/50", children: jt(r === "object" ? JSON.stringify(t) : t, { length: 40 }) });
88
88
  }, Ue = ({
89
- type: r,
90
- value: a = "",
91
- setValue: t,
89
+ type: t,
90
+ value: o = "",
91
+ setValue: r,
92
92
  data: s,
93
93
  onChange: l,
94
94
  dataType: i,
95
- appliedBindings: o
95
+ appliedBindings: a
96
96
  }) => {
97
- const { paths: c, pathsType: n } = ls(s), p = r === "PROP" ? De(s == null ? void 0 : s._type) : {}, h = r === "PROP", [d, y] = C(!1), g = _(() => r === "PROP" ? c.filter(
98
- (u) => !M(o, u) && x(p, `props.${ge(wt(u, "."))}.binding`)
99
- ) : c.filter((u) => i === x(n, u, "")), [r, c, o, i, p]);
100
- return O(() => {
101
- a && l(a);
102
- }, [a, r]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
97
+ const { paths: p, pathsType: n } = ls(s), d = t === "PROP" ? De(s == null ? void 0 : s._type) : {}, h = t === "PROP", [c, y] = C(!1), g = _(() => t === "PROP" ? p.filter(
98
+ (u) => !M(a, u) && x(d, `props.${ge(wt(u, "."))}.binding`)
99
+ ) : p.filter((u) => i === x(n, u, "")), [t, p, a, i, d]);
100
+ return E(() => {
101
+ o && l(o);
102
+ }, [o, t]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
103
103
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-4", children: [
104
- /* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted-foreground", children: z(se(r)) }),
105
- /* @__PURE__ */ e.jsxs(er, { open: d, onOpenChange: y, children: [
104
+ /* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted-foreground", children: F(se(t)) }),
105
+ /* @__PURE__ */ e.jsxs(er, { open: c, onOpenChange: y, children: [
106
106
  /* @__PURE__ */ e.jsx(tr, { asChild: !0, children: /* @__PURE__ */ e.jsx(
107
107
  oe,
108
108
  {
109
109
  variant: "outline",
110
110
  size: "sm",
111
- className: ` ${f(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"}`,
112
- children: a ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
111
+ className: ` ${f(o) ? "w-44 justify-center bg-blue-500 text-gray-100 hover:bg-blue-400 hover:text-white" : "min-w-[350px] items-center justify-between"}`,
112
+ children: o ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
113
113
  /* @__PURE__ */ e.jsxs("span", { className: "pr-8 text-sm", children: [
114
- h && /* @__PURE__ */ e.jsx("span", { className: "mr-2 rounded-full bg-purple-100 px-2 py-0.5 text-[10px] text-purple-500", children: z(i) }),
115
- a
114
+ 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(i) }),
115
+ o
116
116
  ] }),
117
117
  /* @__PURE__ */ e.jsx("span", { className: "cursor-pointer text-[9px] text-blue-400 underline hover:text-blue-700", children: "Change" })
118
118
  ] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
119
119
  "+ Set ",
120
- z(se(r))
120
+ F(se(t))
121
121
  ] })
122
122
  }
123
123
  ) }),
124
124
  /* @__PURE__ */ e.jsx(rr, { className: "z-[999] min-w-[300px] p-0", side: "right", align: "start", children: /* @__PURE__ */ e.jsxs(sr, { children: [
125
- /* @__PURE__ */ e.jsx(lr, { placeholder: `Choose ${se(r)}...` }),
125
+ /* @__PURE__ */ e.jsx(lr, { placeholder: `Choose ${se(t)}...` }),
126
126
  /* @__PURE__ */ e.jsxs(or, { children: [
127
127
  /* @__PURE__ */ e.jsx(ar, { children: "No results found." }),
128
128
  /* @__PURE__ */ e.jsx(nr, { children: k(g, (u) => /* @__PURE__ */ e.jsxs(
@@ -130,15 +130,15 @@ const ke = ({ data: r, fullView: a }) => {
130
130
  {
131
131
  value: u,
132
132
  className: `cursor-pointer ${h ? "flex items-center justify-between" : "flex flex-col items-start justify-start"}`,
133
- onSelect: (m) => {
134
- t(Ct(g, (j) => j === m) || null), y(!1);
133
+ onSelect: (b) => {
134
+ r(Ct(g, (j) => j === b) || null), y(!1);
135
135
  },
136
136
  children: [
137
137
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
138
- /* @__PURE__ */ e.jsx(Lr, { className: `h-4 w-4 text-green-500 ${a === u ? "" : "opacity-0"}` }),
138
+ /* @__PURE__ */ e.jsx(Lr, { className: `h-4 w-4 text-green-500 ${o === u ? "" : "opacity-0"}` }),
139
139
  u
140
140
  ] }),
141
- 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: z(x(n, u, "")) }) }) : /* @__PURE__ */ e.jsx("div", { className: "pl-6", children: /* @__PURE__ */ e.jsx(ke, { data: x(s, u) }) })
141
+ 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(x(n, u, "")) }) }) : /* @__PURE__ */ e.jsx("div", { className: "pl-6", children: /* @__PURE__ */ e.jsx(ke, { data: x(s, u) }) })
142
142
  ]
143
143
  },
144
144
  u
@@ -147,28 +147,28 @@ const ke = ({ data: r, fullView: a }) => {
147
147
  ] }) })
148
148
  ] })
149
149
  ] }),
150
- !h && !f(a) && /* @__PURE__ */ e.jsx("div", { className: "pt-2", children: /* @__PURE__ */ e.jsx(ke, { data: x(s, a, ""), fullView: !0 }) })
150
+ !h && !f(o) && /* @__PURE__ */ e.jsx("div", { className: "pt-2", children: /* @__PURE__ */ e.jsx(ke, { data: x(s, o, ""), fullView: !0 }) })
151
151
  ] });
152
152
  }, os = ({
153
- appliedBindings: r = [],
154
- onAddBinding: a,
155
- editMode: t,
153
+ appliedBindings: t = [],
154
+ onAddBinding: o,
155
+ editMode: r,
156
156
  item: s
157
157
  }) => {
158
- const [l, i] = C(t ? s.key : ""), [o, c] = C(t ? s.value : ""), n = U(), [p] = ut(), h = V(
158
+ const [l, i] = C(r ? s.key : ""), [a, p] = C(r ? s.value : ""), n = U(), [d] = ut(), h = V(
159
159
  (g, u) => {
160
160
  if (f(g))
161
161
  return "";
162
162
  {
163
- const m = x(u === "PROP" ? n : p, g, "");
164
- if (ce(m))
163
+ const b = x(u === "PROP" ? n : d, g, "");
164
+ if (ce(b))
165
165
  return "list";
166
- const j = typeof m;
166
+ const j = typeof b;
167
167
  return j === "string" ? "text" : j === "object" ? "model" : j;
168
168
  }
169
169
  },
170
- [n, p]
171
- ), [d, y] = C(t ? h(s.key, "PROP") : "");
170
+ [n, d]
171
+ ), [c, y] = C(r ? h(s.key, "PROP") : "");
172
172
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
173
173
  /* @__PURE__ */ e.jsxs(dr, { children: [
174
174
  /* @__PURE__ */ e.jsx(cr, { children: "Add Data Binding" }),
@@ -185,11 +185,11 @@ const ke = ({ data: r, fullView: a }) => {
185
185
  setValue: i,
186
186
  onChange: (g) => {
187
187
  const u = h(g, "PROP");
188
- i(g), d !== u && c(""), y(u);
188
+ i(g), c !== u && p(""), y(u);
189
189
  },
190
190
  data: n,
191
- dataType: d,
192
- appliedBindings: r
191
+ dataType: c,
192
+ appliedBindings: t
193
193
  }
194
194
  ),
195
195
  /* @__PURE__ */ e.jsx("div", { className: "h-2" }),
@@ -199,15 +199,15 @@ const ke = ({ data: r, fullView: a }) => {
199
199
  type: "PATH",
200
200
  isDisabled: f(l),
201
201
  placeholder: "Enter data path",
202
- value: o,
203
- setValue: c,
202
+ value: a,
203
+ setValue: p,
204
204
  onChange: (g) => {
205
205
  const u = h(g, "PATH");
206
- c(d === u ? g : "");
206
+ p(c === u ? g : "");
207
207
  },
208
- data: p,
209
- dataType: d,
210
- appliedBindings: r
208
+ data: d,
209
+ dataType: c,
210
+ appliedBindings: t
211
211
  }
212
212
  )
213
213
  ] }),
@@ -216,146 +216,148 @@ const ke = ({ data: r, fullView: a }) => {
216
216
  {
217
217
  type: "submit",
218
218
  className: "mt-4",
219
- disabled: f(l) && f(o),
220
- onClick: () => a({ key: l, value: o }),
219
+ disabled: f(l) && f(a),
220
+ onClick: () => o({ key: l, value: a }),
221
221
  children: "Save"
222
222
  }
223
223
  ) })
224
224
  ] });
225
- }, xt = ({ disabled: r, children: a, onAddBinding: t, appliedBindings: s, editMode: l = !0, item: i = {} }) => {
226
- const [o, c] = C(!1);
225
+ }, xt = ({ disabled: t, children: o, onAddBinding: r, appliedBindings: s, editMode: l = !0, item: i = {} }) => {
226
+ const [a, p] = C(!1);
227
227
  return /* @__PURE__ */ e.jsxs(xr, { children: [
228
- /* @__PURE__ */ e.jsx(gr, { disabled: r, asChild: !0, onClick: () => c(!0), children: a }),
229
- o && /* @__PURE__ */ e.jsx(hr, { children: /* @__PURE__ */ e.jsx(
228
+ /* @__PURE__ */ e.jsx(gr, { disabled: t, asChild: !0, onClick: () => p(!0), children: o }),
229
+ a && /* @__PURE__ */ e.jsx(hr, { children: /* @__PURE__ */ e.jsx(
230
230
  os,
231
231
  {
232
232
  item: i,
233
233
  editMode: l,
234
234
  appliedBindings: s,
235
235
  onAddBinding: (n) => {
236
- t(n), c(!1);
236
+ r(n), p(!1);
237
237
  }
238
238
  }
239
239
  ) })
240
240
  ] });
241
241
  }, as = ({
242
- item: r,
243
- onAddBinding: a,
244
- onRemove: t,
242
+ item: t,
243
+ onAddBinding: o,
244
+ onRemove: r,
245
245
  selectedBlock: s,
246
246
  dataProvider: l,
247
247
  appliedBindings: i
248
248
  }) => {
249
- const [o, c] = C("string"), n = (p, h) => {
250
- if (f(p))
249
+ const [a, p] = C("string"), n = (d, h) => {
250
+ if (f(d))
251
251
  return "";
252
252
  {
253
- const d = x(h === "PROP" ? s : l, p, "");
254
- if (ce(d))
253
+ const c = x(h === "PROP" ? s : l, d, "");
254
+ if (ce(c))
255
255
  return "list";
256
- const y = typeof d;
256
+ const y = typeof c;
257
257
  return y === "string" ? "text" : y === "object" ? "model" : y;
258
258
  }
259
259
  };
260
- return O(() => c(() => n(r.key, "PROP")), [r.key]), /* @__PURE__ */ e.jsxs("div", { className: "relative flex flex-col rounded-md border border-gray-200 p-2", children: [
261
- /* @__PURE__ */ e.jsx("div", { className: "text-sm font-normal text-gray-500", children: r.key }),
262
- /* @__PURE__ */ e.jsx("div", { className: "font-medium leading-5", children: r.value }),
263
- /* @__PURE__ */ e.jsx(ke, { data: x(l, r.value, "") }),
260
+ return E(() => p(() => n(t.key, "PROP")), [t.key]), /* @__PURE__ */ e.jsxs("div", { className: "relative flex flex-col rounded-md border border-gray-200 p-2", children: [
261
+ /* @__PURE__ */ e.jsx("div", { className: "text-sm font-normal text-gray-500", children: t.key }),
262
+ /* @__PURE__ */ e.jsx("div", { className: "font-medium leading-5", children: t.value }),
263
+ /* @__PURE__ */ e.jsx(ke, { data: x(l, t.value, "") }),
264
264
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-end gap-x-2", children: [
265
- /* @__PURE__ */ e.jsx(xt, { editMode: !0, onAddBinding: a, appliedBindings: i, item: r, children: /* @__PURE__ */ e.jsx(Or, { 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" }) }),
265
+ /* @__PURE__ */ e.jsx(xt, { editMode: !0, onAddBinding: o, appliedBindings: i, item: t, children: /* @__PURE__ */ e.jsx(Or, { 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" }) }),
266
266
  /* @__PURE__ */ e.jsx(
267
- Fr,
267
+ zr,
268
268
  {
269
- onClick: () => t(),
269
+ onClick: () => r(),
270
270
  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"
271
271
  }
272
272
  )
273
273
  ] }),
274
- !f(o) && !f(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: z(o) })
274
+ !f(a) && !f(t.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(a) })
275
275
  ] });
276
- }, ns = ({ bindingData: r, onChange: a }) => {
277
- const t = U(), [s] = ut(), l = Yr(), [i, o] = C(
278
- k(r, (d, y) => ({ key: y, value: d }))
276
+ }, ns = ({ bindingData: t, onChange: o }) => {
277
+ const r = U(), [s] = ut(), l = Yr(), [i, a] = C(
278
+ k(t, (c, y) => ({ key: y, value: c }))
279
279
  );
280
- O(() => {
281
- o(k(r, (d, y) => ({ key: y, value: d })));
282
- }, [t == null ? void 0 : t._id, r]);
283
- const c = _(() => {
280
+ E(() => {
281
+ a(k(t, (c, y) => ({ key: y, value: c })));
282
+ }, [r == null ? void 0 : r._id, t]);
283
+ const p = _(() => {
284
284
  if (f(s))
285
285
  return !0;
286
286
  if (f(i))
287
287
  return !1;
288
- const d = we(i);
289
- return f(d == null ? void 0 : d.key) || f(d == null ? void 0 : d.value);
290
- }, [s, i]), n = (d) => {
291
- const y = Ce(i, (g) => g.key !== d.key);
292
- o([...y, d]), h([...y, d]);
293
- }, p = (d) => {
294
- const y = Ce(i, (g, u) => d !== u);
288
+ const c = we(i);
289
+ return f(c == null ? void 0 : c.key) || f(c == null ? void 0 : c.value);
290
+ }, [s, i]), n = (c) => {
291
+ const y = Ce(i, (g) => g.key !== c.key);
292
+ a([...y, c]), h([...y, c]);
293
+ }, d = (c) => {
294
+ const y = Ce(i, (g, u) => c !== u);
295
295
  h([...y]);
296
296
  }, h = V(
297
- (d = []) => {
298
- if (o(d), f(d)) {
299
- a({});
297
+ (c = []) => {
298
+ if (a(c), f(c)) {
299
+ o({});
300
300
  return;
301
301
  }
302
302
  const y = {};
303
- _e(d, (g) => {
303
+ _e(c, (g) => {
304
304
  !f(g == null ? void 0 : g.key) && !f(g == null ? void 0 : g.value) && et(y, g.key, g.value);
305
- }), a(y);
305
+ }), o(y);
306
306
  },
307
- [a]
307
+ [o]
308
308
  );
309
309
  return f(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: [
310
310
  "You have no data providers registered. Please add a data provider to your project. ",
311
311
  /* @__PURE__ */ e.jsx("br", {}),
312
312
  /* @__PURE__ */ e.jsx("a", { className: "text-blue-500", href: "https://chaibuilder.com/docs/registering-data-providers", target: "_blank", children: "Learn more" })
313
313
  ] }) }) : /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
314
- k(i, (d, y) => /* @__PURE__ */ e.jsx(
314
+ k(i, (c, y) => /* @__PURE__ */ e.jsx(
315
315
  as,
316
316
  {
317
- item: d,
317
+ item: c,
318
318
  onAddBinding: n,
319
- onRemove: () => p(y),
320
- selectedBlock: t,
319
+ onRemove: () => d(y),
320
+ selectedBlock: r,
321
321
  dataProvider: s,
322
322
  appliedBindings: k(i, "key")
323
323
  },
324
- d.key
324
+ c.key
325
325
  )),
326
326
  /* @__PURE__ */ e.jsxs(Y, { delayDuration: 200, children: [
327
327
  /* @__PURE__ */ e.jsx(X, { disabled: f(s), className: "w-full", children: /* @__PURE__ */ e.jsx(
328
328
  xt,
329
329
  {
330
- disabled: c,
330
+ disabled: p,
331
331
  appliedBindings: k(i, "key"),
332
332
  onAddBinding: n,
333
333
  children: /* @__PURE__ */ e.jsx(
334
334
  "span",
335
335
  {
336
- 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"}`,
336
+ className: `w-full rounded-md px-5 py-1.5 text-xs font-medium duration-200 ${p ? "cursor-not-allowed bg-gray-200 text-gray-400" : "bg-blue-700/20 text-blue-800 hover:bg-blue-700/30"}`,
337
337
  children: f(s) ? /* @__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"
338
338
  }
339
339
  )
340
340
  }
341
341
  ) }),
342
- c && /* @__PURE__ */ e.jsx(Z, { sideOffset: -55, className: "text-[11px]", children: f(s) ? "No data provider has been set up for this page." : "Complete last added data binding to add more" })
342
+ p && /* @__PURE__ */ e.jsx(Z, { sideOffset: -55, className: "text-[11px]", children: f(s) ? "No data provider has been set up for this page." : "Complete last added data binding to add more" })
343
343
  ] })
344
344
  ] });
345
- }, is = () => /* @__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" }), fe = ft(({ properties: r, formData: a, onChange: t }) => {
346
- const s = { type: "object", properties: {} }, l = {};
347
- return Object.keys(r).forEach((i) => {
348
- const o = r[i];
349
- if (M(["slot", "styles"], o.type))
345
+ }, is = () => /* @__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" }), fe = ft(({ id: t, properties: o, formData: r, onChange: s }) => {
346
+ const [l, i] = C(r), a = { type: "object", properties: {} }, p = {};
347
+ return Object.keys(o).forEach((n) => {
348
+ const d = o[n];
349
+ if (M(["slot", "styles"], d.type))
350
350
  return;
351
- const c = i;
352
- s.properties[c] = yr(o), l[c] = br(o);
353
- }), /* @__PURE__ */ e.jsx(
351
+ const h = n;
352
+ a.properties[h] = yr(d), p[h] = mr(d);
353
+ }), E(() => {
354
+ i(r);
355
+ }, [t]), /* @__PURE__ */ e.jsx(
354
356
  Gr,
355
357
  {
356
358
  widgets: {
357
359
  binding: is,
358
- richtext: mr,
360
+ richtext: br,
359
361
  icon: fr,
360
362
  image: vr
361
363
  },
@@ -366,48 +368,50 @@ const ke = ({ data: r, fullView: a }) => {
366
368
  liveOmit: !1,
367
369
  liveValidate: !1,
368
370
  validator: Kr,
369
- uiSchema: l,
370
- schema: s,
371
- formData: a,
372
- onChange: t
371
+ uiSchema: p,
372
+ schema: a,
373
+ formData: l,
374
+ onChange: ({ formData: n }, d) => {
375
+ d && (i(n), s({ formData: n }, d));
376
+ }
373
377
  }
374
378
  );
375
379
  });
376
380
  function ds() {
377
- const r = U(), a = at(), t = wr(), s = De(r._type), l = { ...r }, [i, o] = C(l), c = Cr("dataBindingSupport", !1), n = ({ formData: u }, m, j) => {
378
- if (m) {
379
- const B = m.replace("root.", "");
380
- t([r._id], { [B]: x(u, B) }, j);
381
+ const t = U(), o = at(), r = wr(), s = De(t._type), l = { ...t }, [i, a] = C(l), p = Cr("dataBindingSupport", !1), n = ({ formData: u }, b, j) => {
382
+ if (b && (i == null ? void 0 : i._id) === t._id) {
383
+ const $ = b.replace("root.", "");
384
+ r([t._id], { [$]: x(u, $) }, j);
381
385
  }
382
- }, p = V(
383
- kt(({ formData: u }, m, j) => {
384
- n({ formData: u }, m, j), o(u);
386
+ }, d = V(
387
+ kt(({ formData: u }, b, j) => {
388
+ n({ formData: u }, b, j), a(u);
385
389
  }, 1500),
386
- []
387
- ), h = ({ formData: u }, m) => {
388
- if (m) {
389
- const j = m.replace("root.", "");
390
- a([r._id], { [j]: x(u, j) }), p({ formData: u }, m, { [j]: x(i, j) });
390
+ [t == null ? void 0 : t._id]
391
+ ), h = ({ formData: u }, b) => {
392
+ if (b) {
393
+ const j = b.replace("root.", "");
394
+ o([t._id], { [j]: x(u, j) }), d({ formData: u }, b, { [j]: x(i, j) });
391
395
  }
392
- }, d = {
396
+ }, c = {
393
397
  _name: Er({
394
398
  title: "Name",
395
- default: x(r, "_name", r._type)
399
+ default: x(t, "_name", t._type)
396
400
  })
397
401
  }, y = Nt(x(l, "_bindings", {})), g = _(() => {
398
402
  const u = _t(x(s, "props", {}));
399
- return c && St(y, (m) => delete u[m]), u;
400
- }, [s, y, c]);
403
+ return p && St(y, (b) => delete u[b]), u;
404
+ }, [s, y, p]);
401
405
  return /* @__PURE__ */ e.jsxs("div", { className: "overflow-x-hidden", children: [
402
- /* @__PURE__ */ e.jsx(fe, { onChange: h, formData: l, properties: d }),
406
+ /* @__PURE__ */ e.jsx(fe, { id: t == null ? void 0 : t._id, onChange: h, formData: l, properties: c }),
403
407
  /* @__PURE__ */ e.jsx("hr", { className: "mt-4" }),
404
- c ? /* @__PURE__ */ e.jsxs(nt, { type: "multiple", defaultValue: ["STATIC", "BINDING"], className: "h-full w-full", children: [
408
+ p ? /* @__PURE__ */ e.jsxs(nt, { type: "multiple", defaultValue: ["STATIC", "BINDING"], className: "h-full w-full", children: [
405
409
  /* @__PURE__ */ e.jsxs(pe, { value: "BINDING", children: [
406
410
  /* @__PURE__ */ e.jsx(ue, { 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: [
407
411
  /* @__PURE__ */ e.jsx(
408
412
  "div",
409
413
  {
410
- className: `h-[8px] w-[8px] rounded-full ${f(x(r, "_bindings", {})) ? "bg-gray-300" : "bg-blue-500"}`
414
+ className: `h-[8px] w-[8px] rounded-full ${f(x(t, "_bindings", {})) ? "bg-gray-300" : "bg-blue-500"}`
411
415
  }
412
416
  ),
413
417
  "Data Binding"
@@ -415,7 +419,7 @@ function ds() {
415
419
  /* @__PURE__ */ e.jsx(xe, { className: "px-4 pt-4", children: /* @__PURE__ */ e.jsx(
416
420
  ns,
417
421
  {
418
- bindingData: x(r, "_bindings", {}),
422
+ bindingData: x(t, "_bindings", {}),
419
423
  onChange: (u) => {
420
424
  n({ formData: { _bindings: u } }, "root._bindings");
421
425
  }
@@ -435,10 +439,26 @@ function ds() {
435
439
  y.length === 1 ? "property" : "properties",
436
440
  ". Remove data binding to edit static content."
437
441
  ] }),
438
- /* @__PURE__ */ e.jsx(fe, { onChange: h, formData: l, properties: g })
442
+ /* @__PURE__ */ e.jsx(
443
+ fe,
444
+ {
445
+ id: t == null ? void 0 : t._id,
446
+ onChange: h,
447
+ formData: l,
448
+ properties: g
449
+ }
450
+ )
439
451
  ] })
440
452
  ] })
441
- ] }) : /* @__PURE__ */ e.jsx(fe, { onChange: h, formData: l, properties: g }),
453
+ ] }) : /* @__PURE__ */ e.jsx(
454
+ fe,
455
+ {
456
+ id: t == null ? void 0 : t._id,
457
+ onChange: h,
458
+ formData: l,
459
+ properties: g
460
+ }
461
+ ),
442
462
  /* @__PURE__ */ e.jsx("div", { className: "pb-60" })
443
463
  ] });
444
464
  }
@@ -449,25 +469,25 @@ const Ge = new Jr(Qr, {
449
469
  keys: ["name"]
450
470
  });
451
471
  function cs() {
452
- var B;
453
- const [r] = he(), a = U(), t = Re(), s = it(), [l] = dt(), [i, o] = C(""), c = (B = ge(r)) == null ? void 0 : B.prop, n = Rt((x(a, c, "").replace(ts, "").split(",").pop() || "").split(" "), f), p = () => {
472
+ var $;
473
+ const [t] = he(), o = U(), r = Re(), s = it(), [l] = dt(), [i, a] = C(""), p = ($ = ge(t)) == null ? void 0 : $.prop, n = Rt((x(o, p, "").replace(ts, "").split(",").pop() || "").split(" "), f), d = () => {
454
474
  const w = i.trim().toLowerCase().replace(/ +(?= )/g, "").split(" ");
455
- t(l, w, !0), o("");
456
- }, [h, d] = C([]), y = ({ value: w }) => {
457
- const P = w.trim().toLowerCase(), E = P.match(/.+:/g);
475
+ r(l, w, !0), a("");
476
+ }, [h, c] = C([]), y = ({ value: w }) => {
477
+ const P = w.trim().toLowerCase(), L = P.match(/.+:/g);
458
478
  let N = [];
459
- if (E && E.length > 0) {
460
- const [$] = E, F = P.replace($, "");
461
- N = Ge.search(F).map((b) => ({
462
- ...b,
463
- item: { ...b.item, name: $ + b.item.name }
479
+ if (L && L.length > 0) {
480
+ const [B] = L, z = P.replace(B, "");
481
+ N = Ge.search(z).map((m) => ({
482
+ ...m,
483
+ item: { ...m.item, name: B + m.item.name }
464
484
  }));
465
485
  } else
466
486
  N = Ge.search(P);
467
- d(k(N, "item"));
487
+ c(k(N, "item"));
468
488
  }, g = () => {
469
- d([]);
470
- }, u = (w) => w.name, m = (w) => /* @__PURE__ */ e.jsx("div", { className: "rounded-md p-1", children: w.name }), j = {
489
+ c([]);
490
+ }, u = (w) => w.name, b = (w) => /* @__PURE__ */ e.jsx("div", { className: "rounded-md p-1", children: w.name }), j = {
471
491
  autoComplete: "off",
472
492
  autoCorrect: "off",
473
493
  autoCapitalize: "off",
@@ -475,9 +495,9 @@ function cs() {
475
495
  placeholder: "Enter class name",
476
496
  value: i,
477
497
  onKeyDown: (w) => {
478
- w.key === "Enter" && i.trim() !== "" && p();
498
+ w.key === "Enter" && i.trim() !== "" && d();
479
499
  },
480
- onChange: (w, { newValue: P }) => o(P),
500
+ onChange: (w, { newValue: P }) => a(P),
481
501
  className: "w-full rounded-md text-xs px-2 hover:outline-0 bg-background border-border py-1"
482
502
  };
483
503
  return /* @__PURE__ */ e.jsxs(
@@ -494,7 +514,7 @@ function cs() {
494
514
  onSuggestionsFetchRequested: y,
495
515
  onSuggestionsClearRequested: g,
496
516
  getSuggestionValue: u,
497
- renderSuggestion: m,
517
+ renderSuggestion: b,
498
518
  inputProps: j,
499
519
  containerProps: {
500
520
  className: "relative h-8 w-full gap-y-1 py-1 border-gray-600"
@@ -511,7 +531,7 @@ function cs() {
511
531
  {
512
532
  variant: "outline",
513
533
  className: "h-6 border-gray-700",
514
- onClick: p,
534
+ onClick: d,
515
535
  disabled: i.trim() === "",
516
536
  size: "sm",
517
537
  children: /* @__PURE__ */ e.jsx(Se, {})
@@ -971,7 +991,7 @@ const D = ["px", "%", "em", "rem", "ch", "vh", "vw"], ps = {
971
991
  ], gt = {
972
992
  "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" }) }),
973
993
  // visibility
974
- visible: $t,
994
+ visible: Bt,
975
995
  invisible: Pe,
976
996
  // display
977
997
  hidden: Pe,
@@ -1040,9 +1060,9 @@ const D = ["px", "%", "em", "rem", "ch", "vh", "vw"], ps = {
1040
1060
  textLeft: Et,
1041
1061
  textCenter: Lt,
1042
1062
  textRight: Ot,
1043
- textJustify: Ft,
1063
+ textJustify: zt,
1044
1064
  // font style
1045
- italic: zt,
1065
+ italic: Ft,
1046
1066
  // "not-italic": "",
1047
1067
  // decoration
1048
1068
  underline: Yt,
@@ -1162,12 +1182,12 @@ const D = ["px", "%", "em", "rem", "ch", "vh", "vw"], ps = {
1162
1182
  )
1163
1183
  ] }),
1164
1184
  static: Wt
1165
- }, ae = Qe({ canReset: !1, canChange: !0 }), gs = ({ children: r, canReset: a = !1, canChange: t = !0 }) => (
1185
+ }, ae = Qe({ canReset: !1, canChange: !0 }), gs = ({ children: t, canReset: o = !1, canChange: r = !0 }) => (
1166
1186
  // eslint-disable-next-line react/jsx-no-constructed-context-values
1167
- /* @__PURE__ */ e.jsx(ae.Provider, { value: { canReset: a, canChange: t }, children: r })
1168
- ), ht = ({ label: r, property: a, onChange: t }) => {
1169
- const s = _(() => x(be, `${a}.classes`, [""]), [a]), l = ne(a), i = _(() => x(l, "cls", ""), [l]), { canChange: o } = le(ae), c = /\[.*\]/g.test(i);
1170
- return /* @__PURE__ */ e.jsx("div", { className: r ? "w-full rounded" : "grow", children: c ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
1187
+ /* @__PURE__ */ e.jsx(ae.Provider, { value: { canReset: o, canChange: r }, children: t })
1188
+ ), ht = ({ label: t, property: o, onChange: r }) => {
1189
+ const s = _(() => x(me, `${o}.classes`, [""]), [o]), l = ne(o), i = _(() => x(l, "cls", ""), [l]), { canChange: a } = le(ae), p = /\[.*\]/g.test(i);
1190
+ return /* @__PURE__ */ e.jsx("div", { className: t ? "w-full rounded" : "grow", children: p ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
1171
1191
  /* @__PURE__ */ e.jsx(kr, { className: "w-[70%] rounded py-1", readOnly: !0, value: i }),
1172
1192
  /* @__PURE__ */ e.jsxs(Y, { delayDuration: 100, children: [
1173
1193
  /* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsx("button", { type: "button", className: "invisible ml-3 mt-1 text-blue-600 group-hover:visible", children: /* @__PURE__ */ e.jsx(Te, {}) }) }),
@@ -1176,24 +1196,24 @@ const D = ["px", "%", "em", "rem", "ch", "vh", "vw"], ps = {
1176
1196
  ] }) : /* @__PURE__ */ e.jsx(
1177
1197
  Ne,
1178
1198
  {
1179
- rounded: r,
1180
- onChange: (n) => t(n, a),
1199
+ rounded: t,
1200
+ onChange: (n) => r(n, o),
1181
1201
  selected: i,
1182
1202
  options: s,
1183
- disabled: !o
1203
+ disabled: !a
1184
1204
  }
1185
1205
  ) });
1186
1206
  };
1187
- function Ne({ selected: r, onChange: a, rounded: t = !1, options: s, disabled: l = !1 }) {
1188
- const i = r.replace(/.*:/g, "").trim(), { undo: o, redo: c } = Nr();
1207
+ function Ne({ selected: t, onChange: o, rounded: r = !1, options: s, disabled: l = !1 }) {
1208
+ const i = t.replace(/.*:/g, "").trim(), { undo: a, redo: p } = Nr();
1189
1209
  return /* @__PURE__ */ e.jsxs(
1190
1210
  "select",
1191
1211
  {
1192
1212
  disabled: !s.length || l,
1193
- 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`,
1194
- onChange: (n) => a(n.target.value),
1213
+ className: `${r ? "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`,
1214
+ onChange: (n) => o(n.target.value),
1195
1215
  onKeyDown: (n) => {
1196
- n.ctrlKey && (n.key === "z" && o(), n.key === "y" && c());
1216
+ n.ctrlKey && (n.key === "z" && a(), n.key === "y" && p());
1197
1217
  },
1198
1218
  value: i,
1199
1219
  children: [
@@ -1205,57 +1225,57 @@ function Ne({ selected: r, onChange: a, rounded: t = !1, options: s, disabled: l
1205
1225
  }
1206
1226
  );
1207
1227
  }
1208
- const hs = ({ property: r, onChange: a }) => {
1209
- const { canReset: t, canChange: s } = le(ae), l = ne(r), i = _(() => x(l, "cls", ""), [l]), o = _(() => x(be, `${r}.classes`, [""]), [r]), c = o.indexOf(i) > -1 ? o.indexOf(i) : 0, n = /\[.*\]/g.test(i);
1228
+ const hs = ({ property: t, onChange: o }) => {
1229
+ const { canReset: r, canChange: s } = le(ae), l = ne(t), i = _(() => x(l, "cls", ""), [l]), a = _(() => x(me, `${t}.classes`, [""]), [t]), p = a.indexOf(i) > -1 ? a.indexOf(i) : 0, n = /\[.*\]/g.test(i);
1210
1230
  return /* @__PURE__ */ e.jsx("div", { className: "flex flex-row divide-x divide-solid divide-border rounded border border-border text-xs", children: n ? /* @__PURE__ */ e.jsx("div", { className: "py-[5px] px-2", children: i }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1211
1231
  /* @__PURE__ */ e.jsx(
1212
1232
  "button",
1213
1233
  {
1214
1234
  type: "button",
1215
1235
  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",
1216
- disabled: !s && (!t || c - 1 < 0),
1217
- onClick: () => a($e(o, c - 1), r),
1236
+ disabled: !s && (!r || p - 1 < 0),
1237
+ onClick: () => o(Be(a, p - 1), t),
1218
1238
  children: /* @__PURE__ */ e.jsx("span", { className: "flex items-center justify-center", children: /* @__PURE__ */ e.jsx(
1219
1239
  Ut,
1220
1240
  {
1221
- className: !s && (!t || c - 1 < 0) ? "text-gray-500" : "text-black/60 dark:text-white/60"
1241
+ className: !s && (!r || p - 1 < 0) ? "text-gray-500" : "text-black/60 dark:text-white/60"
1222
1242
  }
1223
1243
  ) })
1224
1244
  }
1225
1245
  ),
1226
- /* @__PURE__ */ e.jsx("div", { className: "w-8/12 text-center", children: /* @__PURE__ */ e.jsx(ht, { label: !1, property: r, onChange: a }) }),
1246
+ /* @__PURE__ */ e.jsx("div", { className: "w-8/12 text-center", children: /* @__PURE__ */ e.jsx(ht, { label: !1, property: t, onChange: o }) }),
1227
1247
  /* @__PURE__ */ e.jsx(
1228
1248
  "button",
1229
1249
  {
1230
1250
  type: "button",
1231
1251
  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",
1232
- disabled: !s && (!t || c + 1 >= o.length),
1233
- onClick: () => a($e(o, c + 1), r),
1252
+ disabled: !s && (!r || p + 1 >= a.length),
1253
+ onClick: () => o(Be(a, p + 1), t),
1234
1254
  children: /* @__PURE__ */ e.jsx("span", { className: "flex items-center justify-center", children: /* @__PURE__ */ e.jsx(
1235
1255
  Se,
1236
1256
  {
1237
- className: !s && (!t || c + 1 >= o.length) ? "text-gray-500" : "text-black/60 dark:text-white/60"
1257
+ className: !s && (!r || p + 1 >= a.length) ? "text-gray-500" : "text-black/60 dark:text-white/60"
1238
1258
  }
1239
1259
  ) })
1240
1260
  }
1241
1261
  )
1242
1262
  ] }) });
1243
- }, ys = ({ property: r, onChange: a }) => {
1244
- const t = _(() => x(be, `${r}.classes`, [""]), [r]), { canChange: s } = le(ae), l = ne(r), i = _(() => x(l, "cls", ""), [l]);
1245
- return /* @__PURE__ */ e.jsx("div", { className: "flex grow flex-wrap gap-1", children: k(t, (o) => /* @__PURE__ */ e.jsxs(Y, { children: [
1263
+ }, ys = ({ property: t, onChange: o }) => {
1264
+ const r = _(() => x(me, `${t}.classes`, [""]), [t]), { canChange: s } = le(ae), l = ne(t), i = _(() => x(l, "cls", ""), [l]);
1265
+ return /* @__PURE__ */ e.jsx("div", { className: "flex grow flex-wrap gap-1", children: k(r, (a) => /* @__PURE__ */ e.jsxs(Y, { children: [
1246
1266
  /* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsx(
1247
1267
  "button",
1248
1268
  {
1249
1269
  type: "button",
1250
1270
  disabled: !s,
1251
- onClick: () => a(o, r),
1252
- className: `cursor-pointer rounded border border-gray-600 p-1 disabled:cursor-not-allowed ${i === o ? " bg-blue-500 text-white" : "disabled:bg-gray-600 disabled:text-gray-400"}`,
1253
- children: I.createElement(x(gt, o, lt))
1271
+ onClick: () => o(a, t),
1272
+ className: `cursor-pointer rounded border border-gray-600 p-1 disabled:cursor-not-allowed ${i === a ? " bg-blue-500 text-white" : "disabled:bg-gray-600 disabled:text-gray-400"}`,
1273
+ children: I.createElement(x(gt, a, lt))
1254
1274
  }
1255
1275
  ) }),
1256
- /* @__PURE__ */ e.jsx(Z, { children: z(se(o)) })
1276
+ /* @__PURE__ */ e.jsx(Z, { children: F(se(a)) })
1257
1277
  ] })) });
1258
- }, bs = {
1278
+ }, ms = {
1259
1279
  backgroundColor: "bg",
1260
1280
  textColor: "text",
1261
1281
  borderColor: "border",
@@ -1267,18 +1287,18 @@ const hs = ({ property: r, onChange: a }) => {
1267
1287
  toColor: "to",
1268
1288
  ringColor: "ring",
1269
1289
  ringOffsetColor: "ring-offset"
1270
- }, ms = ({ property: r, onChange: a }) => {
1271
- const t = ne(r), s = _(() => x(t, "cls", ""), [t]), { canChange: l } = le(ae), [i, o] = C([]), [c, n] = C({ color: "", shade: "" }), p = s.split("-"), h = x(p, "1", ""), d = x(p, "2", ""), y = V(
1290
+ }, bs = ({ property: t, onChange: o }) => {
1291
+ const r = ne(t), s = _(() => x(r, "cls", ""), [r]), { canChange: l } = le(ae), [i, a] = C([]), [p, n] = C({ color: "", shade: "" }), d = s.split("-"), h = x(d, "1", ""), c = x(d, "2", ""), y = V(
1272
1292
  // eslint-disable-next-line no-shadow
1273
1293
  (u) => {
1274
- ["current", "inherit", "transparent", "black", "white"].includes(u) ? (o([]), n({ color: u })) : (o(["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"]), n((m) => ({ ...m, color: u, shade: m.shade ? m.shade : "500" })));
1294
+ ["current", "inherit", "transparent", "black", "white"].includes(u) ? (a([]), n({ color: u })) : (a(["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"]), n((b) => ({ ...b, color: u, shade: b.shade ? b.shade : "500" })));
1275
1295
  },
1276
- [o, n]
1296
+ [a, n]
1277
1297
  );
1278
- O(() => {
1298
+ E(() => {
1279
1299
  if (["current", "inherit", "transparent", "black", "white"].includes(h))
1280
- return o([]);
1281
- o(["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"]);
1300
+ return a([]);
1301
+ a(["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"]);
1282
1302
  }, [h]);
1283
1303
  const g = V(
1284
1304
  // eslint-disable-next-line no-shadow
@@ -1287,12 +1307,12 @@ const hs = ({ property: r, onChange: a }) => {
1287
1307
  },
1288
1308
  [h]
1289
1309
  );
1290
- return O(() => {
1310
+ return E(() => {
1291
1311
  n({ color: "", shade: "" });
1292
- }, [t]), O(() => {
1293
- const m = `${x(bs, r, "")}-${c.color}${c.shade ? `-${c.shade}` : ""}`;
1294
- m.match(new RegExp(x(be, `${r}.regExp`, ""))) && a(m, r);
1295
- }, [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: [
1312
+ }, [r]), E(() => {
1313
+ const b = `${x(ms, t, "")}-${p.color}${p.shade ? `-${p.shade}` : ""}`;
1314
+ b.match(new RegExp(x(me, `${t}.regExp`, ""))) && o(b, t);
1315
+ }, [p, o, t]), /* @__PURE__ */ e.jsxs("div", { className: "flex flex-row divide-x divide-solid divide-border rounded-lg border border-border text-xs", children: [
1296
1316
  /* @__PURE__ */ e.jsx("div", { className: "grow text-center", children: /* @__PURE__ */ e.jsx(
1297
1317
  Ne,
1298
1318
  {
@@ -1332,345 +1352,345 @@ const hs = ({ property: r, onChange: a }) => {
1332
1352
  ]
1333
1353
  }
1334
1354
  ) }),
1335
- /* @__PURE__ */ e.jsx("button", { type: "button", className: "grow text-center", children: /* @__PURE__ */ e.jsx(Ne, { rounded: !0, selected: d, disabled: !h || !l, onChange: g, options: i }) })
1355
+ /* @__PURE__ */ e.jsx("button", { type: "button", className: "grow text-center", children: /* @__PURE__ */ e.jsx(Ne, { rounded: !0, selected: c, disabled: !h || !l, onChange: g, options: i }) })
1336
1356
  ] });
1337
- }, Ke = (r, a) => {
1338
- r = r.toLowerCase();
1339
- let t = r.trim().replace(/ |\+/g, "");
1340
- if ((t === "auto" || t === "none") && a.includes(t))
1341
- return { value: "", unit: t };
1342
- const s = a.length ? new RegExp(a.join("|"), "g") : /XXXXXX/g;
1343
- t = t.replace(s, "");
1344
- const l = r.match(s), i = l && l.length > 1, o = !f(t) && Number.isNaN(Number(t));
1345
- return i || o ? { error: "Invalid value" } : l && (l[0] === "auto" || l[0] === "none") ? { value: l[0], unit: "" } : { value: t, unit: l ? l[0] : "" };
1357
+ }, Ke = (t, o) => {
1358
+ t = t.toLowerCase();
1359
+ let r = t.trim().replace(/ |\+/g, "");
1360
+ if ((r === "auto" || r === "none") && o.includes(r))
1361
+ return { value: "", unit: r };
1362
+ const s = o.length ? new RegExp(o.join("|"), "g") : /XXXXXX/g;
1363
+ r = r.replace(s, "");
1364
+ const l = t.match(s), i = l && l.length > 1, a = !f(r) && Number.isNaN(Number(r));
1365
+ return i || a ? { error: "Invalid value" } : l && (l[0] === "auto" || l[0] === "none") ? { value: l[0], unit: "" } : { value: r, unit: l ? l[0] : "" };
1346
1366
  };
1347
- const fs = (r) => {
1348
- const a = r.startsWith("-") ? "-" : "", t = r.split("-").pop();
1349
- if (["auto", "none"].includes(t))
1350
- return { value: "", unit: t };
1351
- if (t === "px")
1367
+ const fs = (t) => {
1368
+ const o = t.startsWith("-") ? "-" : "", r = t.split("-").pop();
1369
+ if (["auto", "none"].includes(r))
1370
+ return { value: "", unit: r };
1371
+ if (r === "px")
1352
1372
  return { value: "1", unit: "px" };
1353
- if (t === "screen")
1354
- return { value: "100", unit: r.indexOf("w-") !== -1 ? "vw" : "vh" };
1355
- if (t === "full")
1373
+ if (r === "screen")
1374
+ return { value: "100", unit: t.indexOf("w-") !== -1 ? "vw" : "vh" };
1375
+ if (r === "full")
1356
1376
  return { value: "100", unit: "%" };
1357
- if (M(r, "skew-"))
1358
- return { value: `${a}${t}`, unit: "deg" };
1359
- if (M(r, "rotate-"))
1360
- return { value: `${a}${t}`, unit: "deg" };
1361
- if (M(r, "opacity-"))
1362
- return { value: `${t / 100}`, unit: "-" };
1363
- if (M(r, "duration-") || M(r, "delay-"))
1364
- return { value: `${t}`, unit: "ms" };
1365
- if (M(r, "translate-") && !t.includes("/"))
1366
- return { value: `${a}${`${t / 4}`}`, unit: "rem" };
1367
- if (M(r, "scale-"))
1368
- return { value: `${a}${`${t / 100}`}`, unit: "-" };
1369
- if (G(r, "border")) {
1370
- const s = r.match(/border-?(x|y|t|r|b|l)?\d+/g);
1377
+ if (M(t, "skew-"))
1378
+ return { value: `${o}${r}`, unit: "deg" };
1379
+ if (M(t, "rotate-"))
1380
+ return { value: `${o}${r}`, unit: "deg" };
1381
+ if (M(t, "opacity-"))
1382
+ return { value: `${r / 100}`, unit: "-" };
1383
+ if (M(t, "duration-") || M(t, "delay-"))
1384
+ return { value: `${r}`, unit: "ms" };
1385
+ if (M(t, "translate-") && !r.includes("/"))
1386
+ return { value: `${o}${`${r / 4}`}`, unit: "rem" };
1387
+ if (M(t, "scale-"))
1388
+ return { value: `${o}${`${r / 100}`}`, unit: "-" };
1389
+ if (G(t, "border")) {
1390
+ const s = t.match(/border-?(x|y|t|r|b|l)?\d+/g);
1371
1391
  if (s)
1372
1392
  return { value: s[0].split("-").pop(), unit: "px" };
1373
- if (r.match(/border-?(x|y|t|r|b|l)?/g))
1393
+ if (t.match(/border-?(x|y|t|r|b|l)?/g))
1374
1394
  return { value: "1", unit: "px" };
1375
1395
  }
1376
- if (G(r, "max-w-")) {
1377
- if (r === "max-w-screen-sm")
1396
+ if (G(t, "max-w-")) {
1397
+ if (t === "max-w-screen-sm")
1378
1398
  return { value: "640", unit: "px" };
1379
- if (r === "max-w-screen-md")
1399
+ if (t === "max-w-screen-md")
1380
1400
  return { value: "768", unit: "px" };
1381
- if (r === "max-w-screen-lg")
1401
+ if (t === "max-w-screen-lg")
1382
1402
  return { value: "1024", unit: "px" };
1383
- if (r === "max-w-screen-xl")
1403
+ if (t === "max-w-screen-xl")
1384
1404
  return { value: "1280", unit: "px" };
1385
- if (r === "max-w-screen-2xl")
1405
+ if (t === "max-w-screen-2xl")
1386
1406
  return { value: "1536", unit: "px" };
1387
- if (t === "xs")
1407
+ if (r === "xs")
1388
1408
  return { value: "320", unit: "px" };
1389
- if (t === "sm")
1409
+ if (r === "sm")
1390
1410
  return { value: "384", unit: "px" };
1391
- if (t === "md")
1411
+ if (r === "md")
1392
1412
  return { value: "448", unit: "px" };
1393
- if (t === "lg")
1413
+ if (r === "lg")
1394
1414
  return { value: "512", unit: "px" };
1395
- if (t === "xl")
1415
+ if (r === "xl")
1396
1416
  return { value: "576", unit: "px" };
1397
- if (t === "2xl")
1417
+ if (r === "2xl")
1398
1418
  return { value: "672", unit: "px" };
1399
- if (t === "3xl")
1419
+ if (r === "3xl")
1400
1420
  return { value: "768", unit: "px" };
1401
- if (t === "4xl")
1421
+ if (r === "4xl")
1402
1422
  return { value: "896", unit: "px" };
1403
- if (t === "5xl")
1423
+ if (r === "5xl")
1404
1424
  return { value: "1024", unit: "px" };
1405
- if (t === "6xl")
1425
+ if (r === "6xl")
1406
1426
  return { value: "1152", unit: "px" };
1407
- if (t === "7xl")
1427
+ if (r === "7xl")
1408
1428
  return { value: "1280", unit: "px" };
1409
- if (t === "prose")
1429
+ if (r === "prose")
1410
1430
  return { value: "65", unit: "ch" };
1411
1431
  }
1412
- if (G(r, "text-")) {
1413
- if (t === "xs")
1432
+ if (G(t, "text-")) {
1433
+ if (r === "xs")
1414
1434
  return { value: "12", unit: "px" };
1415
- if (t === "sm")
1435
+ if (r === "sm")
1416
1436
  return { value: "14", unit: "px" };
1417
- if (t === "base")
1437
+ if (r === "base")
1418
1438
  return { value: "16", unit: "px" };
1419
- if (t === "lg")
1439
+ if (r === "lg")
1420
1440
  return { value: "18", unit: "px" };
1421
- if (t === "xl")
1441
+ if (r === "xl")
1422
1442
  return { value: "20", unit: "px" };
1423
- if (t === "2xl")
1443
+ if (r === "2xl")
1424
1444
  return { value: "24", unit: "px" };
1425
- if (t === "3xl")
1445
+ if (r === "3xl")
1426
1446
  return { value: "30", unit: "px" };
1427
- if (t === "4xl")
1447
+ if (r === "4xl")
1428
1448
  return { value: "36", unit: "px" };
1429
- if (t === "5xl")
1449
+ if (r === "5xl")
1430
1450
  return { value: "48", unit: "px" };
1431
- if (t === "6xl")
1451
+ if (r === "6xl")
1432
1452
  return { value: "60", unit: "px" };
1433
- if (t === "7xl")
1453
+ if (r === "7xl")
1434
1454
  return { value: "72", unit: "px" };
1435
- if (t === "8xl")
1455
+ if (r === "8xl")
1436
1456
  return { value: "96", unit: "px" };
1437
- if (t === "9xl")
1457
+ if (r === "9xl")
1438
1458
  return { value: "128", unit: "px" };
1439
1459
  }
1440
- if (G(r, "leading-")) {
1441
- if (t === "none")
1460
+ if (G(t, "leading-")) {
1461
+ if (r === "none")
1442
1462
  return { value: "1", unit: "-" };
1443
- if (t === "tight")
1463
+ if (r === "tight")
1444
1464
  return { value: "1.25", unit: "-" };
1445
- if (t === "snug")
1465
+ if (r === "snug")
1446
1466
  return { value: "1.375", unit: "-" };
1447
- if (t === "normal")
1467
+ if (r === "normal")
1448
1468
  return { value: "1.5", unit: "-" };
1449
- if (t === "relaxed")
1469
+ if (r === "relaxed")
1450
1470
  return { value: "1.625", unit: "-" };
1451
- if (t === "loose")
1471
+ if (r === "loose")
1452
1472
  return { value: "2", unit: "-" };
1453
1473
  }
1454
- if (G(r, "tracking-")) {
1455
- if (t === "tighter")
1474
+ if (G(t, "tracking-")) {
1475
+ if (r === "tighter")
1456
1476
  return { value: "-0.05", unit: "em" };
1457
- if (t === "tight")
1477
+ if (r === "tight")
1458
1478
  return { value: "-0.025", unit: "em" };
1459
- if (t === "normal")
1479
+ if (r === "normal")
1460
1480
  return { value: "0", unit: "em" };
1461
- if (t === "wide")
1481
+ if (r === "wide")
1462
1482
  return { value: "0.025", unit: "em" };
1463
- if (t === "wider")
1483
+ if (r === "wider")
1464
1484
  return { value: "0.05", unit: "em" };
1465
- if (t === "widest")
1485
+ if (r === "widest")
1466
1486
  return { value: "0.1", unit: "em" };
1467
1487
  }
1468
- if (["max", "min", "fit"].includes(t))
1469
- return { value: r, unit: "class" };
1470
- if (t.includes("/")) {
1471
- const [s, l] = k(t.split("/"), (i) => parseInt(i, 10));
1472
- return { value: a + (s / l * 100).toFixed(2).replace(".00", ""), unit: "%" };
1488
+ if (["max", "min", "fit"].includes(r))
1489
+ return { value: t, unit: "class" };
1490
+ if (r.includes("/")) {
1491
+ const [s, l] = k(r.split("/"), (i) => parseInt(i, 10));
1492
+ return { value: o + (s / l * 100).toFixed(2).replace(".00", ""), unit: "%" };
1473
1493
  }
1474
- return Vt(parseFloat(t)) ? { value: `${a + parseFloat(t) * 4}`, unit: "px" } : { value: t, unit: "class" };
1494
+ return Vt(parseFloat(r)) ? { value: `${o + parseFloat(r) * 4}`, unit: "px" } : { value: r, unit: "class" };
1475
1495
  };
1476
- const vs = (r) => {
1477
- if (f(r))
1496
+ const vs = (t) => {
1497
+ if (f(t))
1478
1498
  return { value: "", unit: "" };
1479
- const a = r.match(/\[.*\]/g);
1480
- if (a === null)
1481
- return js(r);
1482
- const t = x(a, "0", "").replace(/\[|\]/g, ""), s = r.startsWith("-") ? "-" : "", l = ge(t.match(/\d+.\d+|\d+/g));
1483
- return { value: `${s}${l}`, unit: t.replace(l, "") };
1484
- }, js = (r) => f(r) ? { value: "", unit: "" } : fs(r), yt = I.createContext({
1499
+ const o = t.match(/\[.*\]/g);
1500
+ if (o === null)
1501
+ return js(t);
1502
+ const r = x(o, "0", "").replace(/\[|\]/g, ""), s = t.startsWith("-") ? "-" : "", l = ge(r.match(/\d+.\d+|\d+/g));
1503
+ return { value: `${s}${l}`, unit: r.replace(l, "") };
1504
+ }, js = (t) => f(t) ? { value: "", unit: "" } : fs(t), yt = I.createContext({
1485
1505
  setDragData: () => {
1486
1506
  }
1487
1507
  }), ws = ({
1488
- unit: r,
1489
- currentValue: a,
1490
- onDrag: t,
1508
+ unit: t,
1509
+ currentValue: o,
1510
+ onDrag: r,
1491
1511
  onDragEnd: s,
1492
1512
  onDragStart: l,
1493
1513
  negative: i,
1494
- cssProperty: o
1514
+ cssProperty: a
1495
1515
  }) => {
1496
- const { setDragData: c } = le(yt);
1516
+ const { setDragData: p } = le(yt);
1497
1517
  return /* @__PURE__ */ e.jsx(
1498
1518
  "button",
1499
1519
  {
1500
1520
  type: "button",
1501
1521
  onMouseDown: (n) => {
1502
- const p = {
1503
- onDrag: t,
1522
+ const d = {
1523
+ onDrag: r,
1504
1524
  onDragEnd: s,
1505
1525
  dragging: !0,
1506
1526
  dragStartY: n.pageY,
1507
- dragStartValue: `${a}`,
1508
- dragUnit: r,
1527
+ dragStartValue: `${o}`,
1528
+ dragUnit: t,
1509
1529
  negative: i,
1510
- cssProperty: o
1530
+ cssProperty: a
1511
1531
  };
1512
- l(p), c(p);
1532
+ l(d), p(d);
1513
1533
  },
1514
1534
  color: void 0,
1515
1535
  className: "relative z-50 ml-1 hidden h-6 cursor-row-resize rounded bg-background/70 px-2 group-hover:inline",
1516
1536
  children: /* @__PURE__ */ e.jsx(Gt, {})
1517
1537
  }
1518
1538
  );
1519
- }, Cs = ({ 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((s) => /* @__PURE__ */ e.jsx(
1539
+ }, Cs = ({ onSelect: t, current: o, units: r }) => /* @__PURE__ */ e.jsx("div", { "data-theme": "light", className: "-m-[7px] -mx-[13px] flex w-9 flex-col", children: r.map((s) => /* @__PURE__ */ e.jsx(
1520
1540
  oe,
1521
1541
  {
1522
1542
  className: "h-max rounded-none px-1 py-1 text-right text-[11px] hover:bg-blue-400",
1523
- color: a === s ? "primary" : void 0,
1543
+ color: o === s ? "primary" : void 0,
1524
1544
  size: "sm",
1525
1545
  onClick: (l) => {
1526
- l.stopPropagation(), r(s);
1546
+ l.stopPropagation(), t(s);
1527
1547
  },
1528
1548
  children: s
1529
1549
  },
1530
1550
  s
1531
- )) }), qe = 50, ks = (r) => {
1532
- const [a, t] = C(!1), [s, l] = C(""), { currentClass: i, onChange: o, classPrefix: c, cssProperty: n, units: p, negative: h } = r, [d, y] = C(n != null && n.toLowerCase().includes("width") ? "%" : p[0]), [g, u] = C(!1), [m, j] = C(""), [B, w] = C(!1), [P, E] = C(!1);
1533
- O(() => {
1534
- const { value: b, unit: v } = vs(i);
1551
+ )) }), qe = 50, ks = (t) => {
1552
+ const [o, r] = C(!1), [s, l] = C(""), { currentClass: i, onChange: a, classPrefix: p, cssProperty: n, units: d, negative: h } = t, [c, y] = C(n != null && n.toLowerCase().includes("width") ? "%" : d[0]), [g, u] = C(!1), [b, j] = C(""), [$, w] = C(!1), [P, L] = C(!1);
1553
+ E(() => {
1554
+ const { value: m, unit: v } = vs(i);
1535
1555
  if (v === "") {
1536
- l(b), y(n != null && n.toLowerCase().includes("width") ? "%" : ge(p));
1556
+ l(m), y(n != null && n.toLowerCase().includes("width") ? "%" : ge(d));
1537
1557
  return;
1538
1558
  }
1539
- y(v), l(v === "class" || f(b) ? "" : b);
1540
- }, [i, n, p]);
1541
- const N = je((b) => o(b), [o], qe), $ = je((b) => o(b, !1), [o], qe), F = V(
1542
- (b = !1) => {
1543
- const v = Ke(`${s}`, p);
1559
+ y(v), l(v === "class" || f(m) ? "" : m);
1560
+ }, [i, n, d]);
1561
+ const N = je((m) => a(m), [a], qe), B = je((m) => a(m, !1), [a], qe), z = V(
1562
+ (m = !1) => {
1563
+ const v = Ke(`${s}`, d);
1544
1564
  if (x(v, "error", !1)) {
1545
1565
  u(!0);
1546
1566
  return;
1547
1567
  }
1548
- const S = x(v, "unit") !== "" ? x(v, "unit") : d;
1568
+ const S = x(v, "unit") !== "" ? x(v, "unit") : c;
1549
1569
  if (S === "auto" || S === "none") {
1550
- N(`${c}${S}`);
1570
+ N(`${p}${S}`);
1551
1571
  return;
1552
1572
  }
1553
1573
  if (x(v, "value") === "")
1554
1574
  return;
1555
- const J = `${x(v, "value", "").startsWith("-") ? "-" : ""}${c}[${x(v, "value", "").replace("-", "")}${S === "-" ? "" : S}]`;
1556
- b ? $(J) : N(J);
1575
+ const J = `${x(v, "value", "").startsWith("-") ? "-" : ""}${p}[${x(v, "value", "").replace("-", "")}${S === "-" ? "" : S}]`;
1576
+ m ? B(J) : N(J);
1557
1577
  },
1558
- [N, $, s, d, c, p]
1578
+ [N, B, s, c, p, d]
1559
1579
  ), q = V(
1560
- (b) => {
1561
- const v = Ke(`${s}`, p);
1580
+ (m) => {
1581
+ const v = Ke(`${s}`, d);
1562
1582
  if (x(v, "error", !1)) {
1563
1583
  u(!0);
1564
1584
  return;
1565
1585
  }
1566
- if (b === "auto" || b === "none") {
1567
- N(`${c}${b}`);
1586
+ if (m === "auto" || m === "none") {
1587
+ N(`${p}${m}`);
1568
1588
  return;
1569
1589
  }
1570
1590
  if (x(v, "value") === "")
1571
1591
  return;
1572
- const S = x(v, "unit") !== "" ? x(v, "unit") : b, J = `${x(v, "value", "").startsWith("-") ? "-" : ""}${c}[${x(v, "value", "").replace("-", "")}${S === "-" ? "" : S}]`;
1592
+ const S = x(v, "unit") !== "" ? x(v, "unit") : m, J = `${x(v, "value", "").startsWith("-") ? "-" : ""}${p}[${x(v, "value", "").replace("-", "")}${S === "-" ? "" : S}]`;
1573
1593
  N(J);
1574
1594
  },
1575
- [N, s, c, p]
1595
+ [N, s, p, d]
1576
1596
  );
1577
- return /* @__PURE__ */ e.jsx("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-start", children: d === "class" ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1597
+ return /* @__PURE__ */ e.jsx("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-start", children: c === "class" ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1578
1598
  /* @__PURE__ */ e.jsx("input", { className: "w-20 rounded py-1", readOnly: !0, value: i }),
1579
1599
  /* @__PURE__ */ e.jsxs(Y, { children: [
1580
1600
  /* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsx("button", { type: "button", className: "invisible ml-3 mt-1 text-blue-600 group-hover:visible", children: /* @__PURE__ */ e.jsx(Te, {}) }) }),
1581
1601
  /* @__PURE__ */ e.jsx(Z, { children: "Current value is using a Tailwind preset class." })
1582
1602
  ] })
1583
- ] }) : /* @__PURE__ */ e.jsxs("div", { className: `group relative flex items-center ${B ? "z-auto" : ""}`, children: [
1603
+ ] }) : /* @__PURE__ */ e.jsxs("div", { className: `group relative flex items-center ${$ ? "z-auto" : ""}`, children: [
1584
1604
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center rounded-md border border-border", children: [
1585
- ["none", "auto"].indexOf(d) !== -1 ? null : /* @__PURE__ */ e.jsx(
1605
+ ["none", "auto"].indexOf(c) !== -1 ? null : /* @__PURE__ */ e.jsx(
1586
1606
  "input",
1587
1607
  {
1588
- readOnly: d === "class",
1589
- onKeyPress: (b) => {
1590
- b.key === "Enter" && F();
1608
+ readOnly: c === "class",
1609
+ onKeyPress: (m) => {
1610
+ m.key === "Enter" && z();
1591
1611
  },
1592
- onKeyDown: (b) => {
1593
- if (b.keyCode !== 38 && b.keyCode !== 40)
1612
+ onKeyDown: (m) => {
1613
+ if (m.keyCode !== 38 && m.keyCode !== 40)
1594
1614
  return;
1595
- b.preventDefault(), E(!0);
1596
- const v = Ht(b.target.value);
1615
+ m.preventDefault(), L(!0);
1616
+ const v = Ht(m.target.value);
1597
1617
  let S = tt(v) ? 0 : v;
1598
- b.keyCode === 38 && (S += 1), b.keyCode === 40 && (S -= 1);
1599
- const L = `${S}`, mt = `${L.startsWith("-") ? "-" : ""}${c}[${L.replace("-", "")}${d === "-" ? "" : d}]`;
1600
- $(mt);
1618
+ m.keyCode === 38 && (S += 1), m.keyCode === 40 && (S -= 1);
1619
+ const O = `${S}`, bt = `${O.startsWith("-") ? "-" : ""}${p}[${O.replace("-", "")}${c === "-" ? "" : c}]`;
1620
+ B(bt);
1601
1621
  },
1602
- onKeyUp: (b) => {
1603
- P && (b.preventDefault(), E(!1));
1622
+ onKeyUp: (m) => {
1623
+ P && (m.preventDefault(), L(!1));
1604
1624
  },
1605
- onBlur: () => F(),
1606
- onChange: (b) => {
1607
- u(!1), l(b.target.value);
1625
+ onBlur: () => z(),
1626
+ onChange: (m) => {
1627
+ u(!1), l(m.target.value);
1608
1628
  },
1609
- onClick: (b) => {
1629
+ onClick: (m) => {
1610
1630
  var v;
1611
- (v = b == null ? void 0 : b.target) == null || v.select(), t(!1);
1631
+ (v = m == null ? void 0 : m.target) == null || v.select(), r(!1);
1612
1632
  },
1613
- value: B ? m : s,
1633
+ value: $ ? b : s,
1614
1634
  className: "h-6 w-14 rounded rounded-r-none bg-background pl-2 text-sm focus-visible:outline-0 ".concat(
1615
1635
  " ",
1616
1636
  g ? "border-red-500 text-red-500" : "border-foreground/20"
1617
1637
  )
1618
1638
  }
1619
1639
  ),
1620
- /* @__PURE__ */ e.jsxs(Y, { open: a, delayDuration: 100, children: [
1640
+ /* @__PURE__ */ e.jsxs(Y, { open: o, delayDuration: 100, children: [
1621
1641
  /* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
1622
1642
  "button",
1623
1643
  {
1624
1644
  type: "button",
1625
- onClick: () => t(!a),
1645
+ onClick: () => r(!o),
1626
1646
  className: "flex h-6 cursor-pointer items-center gap-x-1 rounded rounded-l-none bg-background p-px px-1 text-[11px] uppercase",
1627
1647
  children: [
1628
- /* @__PURE__ */ e.jsx("span", { className: `inline-block ${p.length === 1 ? "px-2 font-semibold" : ""}`, children: d }),
1629
- p.length > 1 ? /* @__PURE__ */ e.jsx(Kt, {}) : null
1648
+ /* @__PURE__ */ e.jsx("span", { className: `inline-block ${d.length === 1 ? "px-2 font-semibold" : ""}`, children: c }),
1649
+ d.length > 1 ? /* @__PURE__ */ e.jsx(Kt, {}) : null
1630
1650
  ]
1631
1651
  }
1632
1652
  ) }),
1633
1653
  /* @__PURE__ */ e.jsx(_r, { children: /* @__PURE__ */ e.jsx(Z, { className: "bg-background", children: /* @__PURE__ */ e.jsx(
1634
1654
  Cs,
1635
1655
  {
1636
- units: p,
1637
- current: d,
1638
- onSelect: (b) => {
1639
- t(!1), y(b), q(b);
1656
+ units: d,
1657
+ current: c,
1658
+ onSelect: (m) => {
1659
+ r(!1), y(m), q(m);
1640
1660
  }
1641
1661
  }
1642
1662
  ) }) })
1643
1663
  ] })
1644
1664
  ] }),
1645
- ["none", "auto"].indexOf(d) !== -1 || B ? null : /* @__PURE__ */ e.jsx(
1665
+ ["none", "auto"].indexOf(c) !== -1 || $ ? null : /* @__PURE__ */ e.jsx(
1646
1666
  ws,
1647
1667
  {
1648
1668
  onDragStart: () => w(!0),
1649
- onDragEnd: (b) => {
1650
- if (j(() => ""), w(!1), f(b))
1669
+ onDragEnd: (m) => {
1670
+ if (j(() => ""), w(!1), f(m))
1651
1671
  return;
1652
- const v = `${b}`, L = `${v.startsWith("-") ? "-" : ""}${c}[${v.replace("-", "")}${d === "-" ? "" : d}]`;
1653
- N(L);
1672
+ const v = `${m}`, O = `${v.startsWith("-") ? "-" : ""}${p}[${v.replace("-", "")}${c === "-" ? "" : c}]`;
1673
+ N(O);
1654
1674
  },
1655
- onDrag: (b) => {
1656
- if (f(b))
1675
+ onDrag: (m) => {
1676
+ if (f(m))
1657
1677
  return;
1658
- j(b);
1659
- const v = `${b}`, L = `${v.startsWith("-") ? "-" : ""}${c}[${v.replace("-", "")}${d === "-" ? "" : d}]`;
1660
- $(L);
1678
+ j(m);
1679
+ const v = `${m}`, O = `${v.startsWith("-") ? "-" : ""}${p}[${v.replace("-", "")}${c === "-" ? "" : c}]`;
1680
+ B(O);
1661
1681
  },
1662
1682
  currentValue: s,
1663
- unit: d,
1683
+ unit: c,
1664
1684
  negative: h,
1665
1685
  cssProperty: n
1666
1686
  }
1667
1687
  )
1668
1688
  ] }) }) });
1669
- }, ne = (r) => {
1670
- const a = ye();
1671
- return Dt(a, { property: r });
1672
- }, Ns = (r, a) => {
1673
- const t = {
1689
+ }, ne = (t) => {
1690
+ const o = ye();
1691
+ return Dt(o, { property: t });
1692
+ }, Ns = (t, o) => {
1693
+ const r = {
1674
1694
  xs: 0,
1675
1695
  sm: 1,
1676
1696
  md: 2,
@@ -1678,7 +1698,7 @@ const vs = (r) => {
1678
1698
  xl: 4,
1679
1699
  "2xl": 5
1680
1700
  };
1681
- return t[x(r, "mq", "xs")] <= t[a];
1701
+ return r[x(t, "mq", "xs")] <= r[o];
1682
1702
  }, _s = {
1683
1703
  width: "w-",
1684
1704
  height: "h-",
@@ -1752,24 +1772,24 @@ const vs = (r) => {
1752
1772
  lg: "1024px",
1753
1773
  xl: "1280px",
1754
1774
  "2xl": "1536px"
1755
- }, Ss = (r) => `${r.toUpperCase()} ${Je[r] ? `(${Je[r]} & up)` : ""}`, Be = (r) => {
1756
- const { t: a } = W(), { type: t = "icons", label: s, property: l, onEmitChange: i = () => {
1757
- }, units: o, negative: c = !1 } = r, [n] = Sr(), [p] = ct(), [, h] = Ie(), d = ne(l), y = Re(), g = it(), [u] = dt(), m = _(() => x(d, "fullCls", ""), [d]), j = V(
1758
- ($, F = !0) => {
1759
- const q = { dark: n, mq: h, mod: p, cls: $, property: l, fullCls: "" };
1760
- (n || p !== "") && (q.mq = "xs");
1761
- const b = es(q);
1762
- y(u, [b], F);
1775
+ }, Ss = (t) => `${t.toUpperCase()} ${Je[t] ? `(${Je[t]} & up)` : ""}`, $e = (t) => {
1776
+ const { t: o } = W(), { type: r = "icons", label: s, property: l, onEmitChange: i = () => {
1777
+ }, units: a, negative: p = !1 } = t, [n] = Sr(), [d] = ct(), [, h] = Ie(), c = ne(l), y = Re(), g = it(), [u] = dt(), b = _(() => x(c, "fullCls", ""), [c]), j = V(
1778
+ (B, z = !0) => {
1779
+ const q = { dark: n, mq: h, mod: d, cls: B, property: l, fullCls: "" };
1780
+ (n || d !== "") && (q.mq = "xs");
1781
+ const m = es(q);
1782
+ y(u, [m], z);
1763
1783
  },
1764
- [u, n, h, p, l, y]
1765
- ), B = V(() => {
1766
- g(u, [m]);
1767
- }, [u, m, g]), w = _(() => Ns(d, h), [d, h]);
1768
- O(() => {
1769
- i(w, d);
1770
- }, [w, i, d]);
1771
- const [, , P] = Ie(), E = V(
1772
- ($) => {
1784
+ [u, n, h, d, l, y]
1785
+ ), $ = V(() => {
1786
+ g(u, [b]);
1787
+ }, [u, b, g]), w = _(() => Ns(c, h), [c, h]);
1788
+ E(() => {
1789
+ i(w, c);
1790
+ }, [w, i, c]);
1791
+ const [, , P] = Ie(), L = V(
1792
+ (B) => {
1773
1793
  P({
1774
1794
  xs: 400,
1775
1795
  sm: 640,
@@ -1777,31 +1797,31 @@ const vs = (r) => {
1777
1797
  lg: 1024,
1778
1798
  xl: 1420,
1779
1799
  "2xl": 1920
1780
- }[$]);
1800
+ }[B]);
1781
1801
  },
1782
1802
  [P]
1783
- ), N = x(d, "dark", null) === n && x(d, "mod", null) === p && x(d, "mq", null) === h;
1784
- return /* @__PURE__ */ e.jsx(gs, { canChange: w, canReset: d && N, children: /* @__PURE__ */ e.jsxs("div", { className: "group flex flex-row items-center py-2 first:pt-0 last:pb-0", children: [
1785
- /* @__PURE__ */ e.jsx("div", { className: "relative w-[70px] truncate text-xs text-foreground", children: /* @__PURE__ */ e.jsx("span", { className: `text-[11px] ${d && !N ? "text-foreground" : ""}`, children: a(s) }) }),
1803
+ ), N = x(c, "dark", null) === n && x(c, "mod", null) === d && x(c, "mq", null) === h;
1804
+ return /* @__PURE__ */ e.jsx(gs, { canChange: w, canReset: c && N, children: /* @__PURE__ */ e.jsxs("div", { className: "group flex flex-row items-center py-2 first:pt-0 last:pb-0", children: [
1805
+ /* @__PURE__ */ e.jsx("div", { className: "relative w-[70px] truncate text-xs text-foreground", children: /* @__PURE__ */ e.jsx("span", { className: `text-[11px] ${c && !N ? "text-foreground" : ""}`, children: o(s) }) }),
1786
1806
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-row items-center", children: [
1787
1807
  /* @__PURE__ */ e.jsxs("div", { className: "w-[150px]", children: [
1788
- t === "arbitrary" ? /* @__PURE__ */ e.jsx(
1808
+ r === "arbitrary" ? /* @__PURE__ */ e.jsx(
1789
1809
  ks,
1790
1810
  {
1791
- currentClass: x(d, "cls", ""),
1811
+ currentClass: x(c, "cls", ""),
1792
1812
  classPrefix: x(_s, l, ""),
1793
- units: o || [],
1813
+ units: a || [],
1794
1814
  onChange: j,
1795
- negative: c,
1815
+ negative: p,
1796
1816
  cssProperty: l
1797
1817
  }
1798
1818
  ) : null,
1799
- t === "icons" && /* @__PURE__ */ e.jsx(ys, { property: l, onChange: j }),
1800
- t === "range" && /* @__PURE__ */ e.jsx(hs, { property: l, onChange: j }),
1801
- t === "color" && /* @__PURE__ */ e.jsx(ms, { property: l, onChange: j }),
1802
- t === "dropdown" && /* @__PURE__ */ e.jsx(ht, { label: s, property: l, onChange: j })
1819
+ r === "icons" && /* @__PURE__ */ e.jsx(ys, { property: l, onChange: j }),
1820
+ r === "range" && /* @__PURE__ */ e.jsx(hs, { property: l, onChange: j }),
1821
+ r === "color" && /* @__PURE__ */ e.jsx(bs, { property: l, onChange: j }),
1822
+ r === "dropdown" && /* @__PURE__ */ e.jsx(ht, { label: s, property: l, onChange: j })
1803
1823
  ] }),
1804
- /* @__PURE__ */ e.jsx("div", { className: `w-[30px] cursor-pointer ${m ? "visible" : "invisible"}`, children: N ? /* @__PURE__ */ e.jsx("button", { type: "button", onClick: () => B(), title: "Reset", className: "flex px-1.5 text-xs", children: /* @__PURE__ */ e.jsx(qt, { className: "h-5 w-5 text-blue-500 hover:opacity-80" }) }) : w && d ? /* @__PURE__ */ e.jsxs(Y, { delayDuration: 100, children: [
1824
+ /* @__PURE__ */ e.jsx("div", { className: `w-[30px] cursor-pointer ${b ? "visible" : "invisible"}`, children: N ? /* @__PURE__ */ e.jsx("button", { type: "button", onClick: () => $(), title: "Reset", className: "flex px-1.5 text-xs", children: /* @__PURE__ */ e.jsx(qt, { className: "h-5 w-5 text-blue-500 hover:opacity-80" }) }) : w && c ? /* @__PURE__ */ e.jsxs(Y, { delayDuration: 100, children: [
1805
1825
  /* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsx(
1806
1826
  "button",
1807
1827
  {
@@ -1813,19 +1833,19 @@ const vs = (r) => {
1813
1833
  /* @__PURE__ */ e.jsx(Z, { children: /* @__PURE__ */ e.jsx("div", { className: "text-right", children: /* @__PURE__ */ e.jsxs("div", { children: [
1814
1834
  "Current style is set at  ",
1815
1835
  /* @__PURE__ */ e.jsxs("span", { className: "font-bold", children: [
1816
- Ss(x(d, "mq")),
1817
- n && !d.dark ? "(Light mode)" : ""
1836
+ Ss(x(c, "mq")),
1837
+ n && !c.dark ? "(Light mode)" : ""
1818
1838
  ] }),
1819
1839
  /* @__PURE__ */ e.jsx("br", {}),
1820
1840
  /* @__PURE__ */ e.jsxs(
1821
1841
  "button",
1822
1842
  {
1823
1843
  type: "button",
1824
- onClick: () => E(x(d, "mq")),
1844
+ onClick: () => L(x(c, "mq")),
1825
1845
  className: "block w-full cursor-default text-right font-semibold text-blue-500",
1826
1846
  children: [
1827
1847
  "Switch to ",
1828
- x(d, "mq").toUpperCase()
1848
+ x(c, "mq").toUpperCase()
1829
1849
  ]
1830
1850
  }
1831
1851
  )
@@ -1833,68 +1853,68 @@ const vs = (r) => {
1833
1853
  ] }) : null })
1834
1854
  ] })
1835
1855
  ] }) });
1836
- }, Ts = ["px", "%", "em", "rem", "ch", "vh", "vw"], bt = ({
1837
- label: r,
1838
- options: a,
1839
- borderB: t = !1,
1856
+ }, Ts = ["px", "%", "em", "rem", "ch", "vh", "vw"], mt = ({
1857
+ label: t,
1858
+ options: o,
1859
+ borderB: r = !1,
1840
1860
  borderT: s = !1,
1841
1861
  type: l = "arbitrary",
1842
1862
  units: i = Ts,
1843
- negative: o = !1
1863
+ negative: a = !1
1844
1864
  }) => {
1845
- const { t: c } = W(), [n, p] = C(a[0].key), h = ye(), d = V((y) => k(h, "property").includes(y), [h]);
1865
+ const { t: p } = W(), [n, d] = C(o[0].key), h = ye(), c = V((y) => k(h, "property").includes(y), [h]);
1846
1866
  return /* @__PURE__ */ e.jsxs(
1847
1867
  "div",
1848
1868
  {
1849
- className: `mb-2 border-gray-800 py-2 first:pt-0 last:pb-0 ${t ? "border-b" : ""} ${s ? "border-t" : ""}`,
1869
+ className: `mb-2 border-gray-800 py-2 first:pt-0 last:pb-0 ${r ? "border-b" : ""} ${s ? "border-t" : ""}`,
1850
1870
  children: [
1851
1871
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-row text-xs", children: [
1852
- r && /* @__PURE__ */ e.jsx("span", { className: "relative w-[70px] flex-none text-xs text-foreground", children: c(r) }),
1872
+ t && /* @__PURE__ */ e.jsx("span", { className: "relative w-[70px] flex-none text-xs text-foreground", children: p(t) }),
1853
1873
  /* @__PURE__ */ e.jsx("div", { className: "mb-3 flex grow flex-row flex-wrap gap-x-px", children: I.Children.toArray(
1854
- a.map(({ label: y, key: g }) => /* @__PURE__ */ e.jsx("div", { className: "first:rounded-l last:rounded-r", children: /* @__PURE__ */ e.jsxs(Y, { children: [
1874
+ o.map(({ label: y, key: g }) => /* @__PURE__ */ e.jsx("div", { className: "first:rounded-l last:rounded-r", children: /* @__PURE__ */ e.jsxs(Y, { children: [
1855
1875
  /* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
1856
1876
  "button",
1857
1877
  {
1858
1878
  type: "button",
1859
- onClick: () => p(g),
1879
+ onClick: () => d(g),
1860
1880
  className: `relative cursor-pointer rounded-full p-1 text-[8px] ${g === n ? " bg-[#3E57F0] text-white" : "text-gray-600 dark:text-gray-300"}`,
1861
1881
  children: [
1862
1882
  I.createElement("div", {
1863
- className: d(g) ? "-bottom-1.5 absolute bg-[#3E57F0] h-[2px] left-0 w-full" : ""
1883
+ className: c(g) ? "-bottom-1.5 absolute bg-[#3E57F0] h-[2px] left-0 w-full" : ""
1864
1884
  }),
1865
1885
  I.createElement(x(gt, g, lt), { className: "text-inherit w-3 h-3" })
1866
1886
  ]
1867
1887
  }
1868
1888
  ) }),
1869
- /* @__PURE__ */ e.jsx(Z, { children: z(se(y)) })
1889
+ /* @__PURE__ */ e.jsx(Z, { children: F(se(y)) })
1870
1890
  ] }) }))
1871
1891
  ) })
1872
1892
  ] }),
1873
1893
  /* @__PURE__ */ e.jsx("div", { className: "mt-0 flex items-center", children: /* @__PURE__ */ e.jsx(
1874
- Be,
1894
+ $e,
1875
1895
  {
1876
1896
  type: l,
1877
1897
  units: [...i],
1878
1898
  label: "",
1879
1899
  property: n,
1880
- negative: o
1900
+ negative: a
1881
1901
  }
1882
1902
  ) })
1883
1903
  ]
1884
1904
  }
1885
1905
  );
1886
- }, Rs = ({ heading: r, items: a }) => {
1887
- const { t } = W(), s = ye(), l = _(() => {
1906
+ }, Rs = ({ heading: t, items: o }) => {
1907
+ const { t: r } = W(), s = ye(), l = _(() => {
1888
1908
  const i = (n) => K(
1889
- n.map((p) => p.styleType === "multiple" ? k(p.options, "key") : p.property)
1890
- ), o = K(
1891
- a.map((n) => n.styleType === "accordion" ? i(n.items) : n.styleType === "multiple" ? k(n.options, "key") : n.property)
1892
- ), c = k(s, "property");
1893
- return rt(o, c).length > 0;
1894
- }, [s, a]);
1909
+ n.map((d) => d.styleType === "multiple" ? k(d.options, "key") : d.property)
1910
+ ), a = K(
1911
+ o.map((n) => n.styleType === "accordion" ? i(n.items) : n.styleType === "multiple" ? k(n.options, "key") : n.property)
1912
+ ), p = k(s, "property");
1913
+ return rt(a, p).length > 0;
1914
+ }, [s, o]);
1895
1915
  return /* @__PURE__ */ e.jsxs("details", { children: [
1896
1916
  /* @__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: [
1897
- t(r),
1917
+ r(t),
1898
1918
  l ? /* @__PURE__ */ e.jsx(
1899
1919
  "span",
1900
1920
  {
@@ -1902,55 +1922,55 @@ const vs = (r) => {
1902
1922
  }
1903
1923
  ) : null
1904
1924
  ] }) }),
1905
- /* @__PURE__ */ e.jsx("div", { className: "p-2", children: a.map((i) => i.styleType === "multiple" ? /* @__PURE__ */ e.jsx(bt, { ...i }, i.label) : /* @__PURE__ */ e.jsx(Be, { ...i }, i.label)) })
1925
+ /* @__PURE__ */ e.jsx("div", { className: "p-2", children: o.map((i) => i.styleType === "multiple" ? /* @__PURE__ */ e.jsx(mt, { ...i }, i.label) : /* @__PURE__ */ e.jsx($e, { ...i }, i.label)) })
1906
1926
  ] });
1907
- }, Vs = Qe({}), ve = ({ section: r }) => {
1908
- const { t: a } = W(), t = ye(), s = V(
1909
- (o = []) => {
1910
- const c = {};
1911
- for (let p = 0; p < t.length; p++)
1912
- c[t[p].property] = t[p].cls;
1927
+ }, Vs = Qe({}), ve = ({ section: t }) => {
1928
+ const { t: o } = W(), r = ye(), s = V(
1929
+ (a = []) => {
1930
+ const p = {};
1931
+ for (let d = 0; d < r.length; d++)
1932
+ p[r[d].property] = r[d].cls;
1913
1933
  let n = !0;
1914
- for (const p in o)
1915
- if (!me(c, p) || c[p] !== o[p]) {
1934
+ for (const d in a)
1935
+ if (!be(p, d) || p[d] !== a[d]) {
1916
1936
  n = !1;
1917
1937
  break;
1918
1938
  }
1919
1939
  return n;
1920
1940
  },
1921
- [t]
1941
+ [r]
1922
1942
  ), l = _(() => {
1923
- if (t.length > 0 && r.heading === "classes.heading")
1943
+ if (r.length > 0 && t.heading === "classes.heading")
1924
1944
  return !0;
1925
- const o = (p) => K(
1926
- p.map((h) => h.styleType === "multiple" ? K(k(h.options, "key")) : h.property)
1927
- ), c = K(
1928
- r.items.map((p) => p.styleType === "accordion" ? o(p.items) : p.styleType === "multiple" ? K(k(p.options, "key")) : p.property)
1929
- ), n = k(t, "property");
1930
- return rt(c, n).length > 0;
1931
- }, [t, r.heading, r.items]), i = _(() => ({}), []);
1932
- return /* @__PURE__ */ e.jsx(Vs.Provider, { value: i, children: /* @__PURE__ */ e.jsxs(pe, { value: r.heading, children: [
1945
+ const a = (d) => K(
1946
+ d.map((h) => h.styleType === "multiple" ? K(k(h.options, "key")) : h.property)
1947
+ ), p = K(
1948
+ t.items.map((d) => d.styleType === "accordion" ? a(d.items) : d.styleType === "multiple" ? K(k(d.options, "key")) : d.property)
1949
+ ), n = k(r, "property");
1950
+ return rt(p, n).length > 0;
1951
+ }, [r, t.heading, t.items]), i = _(() => ({}), []);
1952
+ return /* @__PURE__ */ e.jsx(Vs.Provider, { value: i, children: /* @__PURE__ */ e.jsxs(pe, { value: t.heading, children: [
1933
1953
  /* @__PURE__ */ e.jsx(ue, { className: "px-3 py-2 text-xs hover:no-underline", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
1934
1954
  /* @__PURE__ */ e.jsx("div", { className: `h-[8px] w-[8px] rounded-full ${l ? "bg-blue-500" : "bg-gray-300"}` }),
1935
- a(r.heading)
1955
+ o(t.heading)
1936
1956
  ] }) }),
1937
1957
  /* @__PURE__ */ e.jsx(xe, { className: "bg-gray-100 px-3.5 py-2", children: I.Children.toArray(
1938
- r.items.map((o) => me(o, "component") ? I.createElement(o.component, { key: o.label }) : me(o, "styleType") ? o.styleType === "multiple" ? /* @__PURE__ */ e.jsx(bt, { ...o }, o.label) : o.styleType === "accordion" && s(o == null ? void 0 : o.conditions) ? /* @__PURE__ */ e.jsx(Rs, { ...o }, o.label) : null : /* @__PURE__ */ e.jsx(Be, { ...o }, o.label))
1958
+ t.items.map((a) => be(a, "component") ? I.createElement(a.component, { key: a.label }) : be(a, "styleType") ? a.styleType === "multiple" ? /* @__PURE__ */ e.jsx(mt, { ...a }, a.label) : a.styleType === "accordion" && s(a == null ? void 0 : a.conditions) ? /* @__PURE__ */ e.jsx(Rs, { ...a }, a.label) : null : /* @__PURE__ */ e.jsx($e, { ...a }, a.label))
1939
1959
  ) })
1940
1960
  ] }) });
1941
1961
  }, Hs = ({
1942
- item: r,
1943
- index: a,
1944
- canDelete: t,
1962
+ item: t,
1963
+ index: o,
1964
+ canDelete: r,
1945
1965
  onChange: s,
1946
1966
  onRemove: l
1947
- }) => /* @__PURE__ */ e.jsxs("div", { className: `flex flex-col gap-1 border-gray-400 py-2 ${t ? "border-b" : ""}`, children: [
1967
+ }) => /* @__PURE__ */ e.jsxs("div", { className: `flex flex-col gap-1 border-gray-400 py-2 ${r ? "border-b" : ""}`, children: [
1948
1968
  /* @__PURE__ */ e.jsx(
1949
1969
  "input",
1950
1970
  {
1951
1971
  name: "key",
1952
- onChange: (i) => s(i, a),
1953
- value: r.key,
1972
+ onChange: (i) => s(i, o),
1973
+ value: t.key,
1954
1974
  placeholder: "Key",
1955
1975
  className: "w-full rounded border-gray-300 bg-background p-0.5 pl-2 text-sm focus-visible:outline-0",
1956
1976
  autoComplete: "off",
@@ -1962,8 +1982,8 @@ const vs = (r) => {
1962
1982
  "input",
1963
1983
  {
1964
1984
  name: "value",
1965
- onChange: (i) => f(r.key) ? {} : s(i, a),
1966
- value: r.value,
1985
+ onChange: (i) => f(t.key) ? {} : s(i, o),
1986
+ value: t.value,
1967
1987
  placeholder: "Value",
1968
1988
  className: "w-full rounded border-gray-300 bg-background p-0.5 pl-2 text-sm focus-visible:outline-0",
1969
1989
  autoComplete: "off",
@@ -1978,34 +1998,34 @@ const vs = (r) => {
1978
1998
  }
1979
1999
  )
1980
2000
  ] })
1981
- ] }), Ds = ({ section: r }) => {
2001
+ ] }), Ds = ({ section: t }) => {
1982
2002
  var y;
1983
- const { setSyncState: a } = Tr(), t = U(), [s, l] = C([]), [i] = he(), o = at(), c = `${x(i, "0.prop")}_attrs`;
2003
+ const { setSyncState: o } = Tr(), r = U(), [s, l] = C([]), [i] = he(), a = at(), p = `${x(i, "0.prop")}_attrs`;
1984
2004
  de.useEffect(() => {
1985
- const g = k(x(t, c), (u, m) => ({ key: m, value: u }));
2005
+ const g = k(x(r, p), (u, b) => ({ key: b, value: u }));
1986
2006
  f(g) ? l([]) : l(g);
1987
- }, [x(t, c)]);
1988
- const n = () => l([...s, { key: "", value: "" }]), p = (g) => {
1989
- const u = Ce(s, (m, j) => g !== j);
1990
- d(u);
2007
+ }, [x(r, p)]);
2008
+ const n = () => l([...s, { key: "", value: "" }]), d = (g) => {
2009
+ const u = Ce(s, (b, j) => g !== j);
2010
+ c(u);
1991
2011
  }, h = (g, u) => {
1992
- const m = [...s];
1993
- m[u][g.target.name] = g.target.value, d(m);
1994
- }, d = de.useCallback(
2012
+ const b = [...s];
2013
+ b[u][g.target.name] = g.target.value, c(b);
2014
+ }, c = de.useCallback(
1995
2015
  (g = []) => {
1996
2016
  const u = {};
1997
- _e(g, (m) => {
1998
- f(m.key) || et(u, m.key, m.value);
1999
- }), o([x(t, "_id")], { [c]: u }), a("UNSAVED");
2017
+ _e(g, (b) => {
2018
+ f(b.key) || et(u, b.key, b.value);
2019
+ }), a([x(r, "_id")], { [p]: u }), o("UNSAVED");
2000
2020
  },
2001
- [t, a, o, c]
2021
+ [r, o, a, p]
2002
2022
  );
2003
- return /* @__PURE__ */ e.jsxs(pe, { value: r.heading, children: [
2023
+ return /* @__PURE__ */ e.jsxs(pe, { value: t.heading, children: [
2004
2024
  /* @__PURE__ */ e.jsx(ue, { className: "px-3 py-2 text-xs hover:no-underline", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
2005
2025
  /* @__PURE__ */ e.jsx(
2006
2026
  "div",
2007
2027
  {
2008
- className: `h-[8px] w-[8px] rounded-full ${f(x(t, c)) ? "bg-gray-300" : "bg-blue-500"}`
2028
+ className: `h-[8px] w-[8px] rounded-full ${f(x(r, p)) ? "bg-gray-300" : "bg-blue-500"}`
2009
2029
  }
2010
2030
  ),
2011
2031
  "Attributes"
@@ -2032,15 +2052,15 @@ const vs = (r) => {
2032
2052
  f(s) && /* @__PURE__ */ e.jsx("div", { className: "flex h-12 items-center justify-center text-sm text-gray-400", children: "Click + Add to add attributes" }),
2033
2053
  de.Children.toArray(
2034
2054
  k(s, (g, u) => {
2035
- const m = s.length > 0 && u < s.length - 1;
2055
+ const b = s.length > 0 && u < s.length - 1;
2036
2056
  return /* @__PURE__ */ e.jsx(
2037
2057
  Hs,
2038
2058
  {
2039
2059
  item: g,
2040
2060
  index: u,
2041
- canDelete: m,
2061
+ canDelete: b,
2042
2062
  onChange: h,
2043
- onRemove: () => p(u)
2063
+ onRemove: () => d(u)
2044
2064
  }
2045
2065
  );
2046
2066
  })
@@ -2048,54 +2068,54 @@ const vs = (r) => {
2048
2068
  ] })
2049
2069
  ] }) })
2050
2070
  ] });
2051
- }, Bs = () => {
2052
- const r = U(), [a] = he(), { t } = W(), s = Xr(), l = Re(), i = De(r._type), o = Ye(rs(a), "prop"), c = Ye(i.props, `${o}.presets`, {});
2053
- if (ie(s) && (!ss(i, "props") || ie(c)))
2071
+ }, $s = () => {
2072
+ const t = U(), [o] = he(), { t: r } = W(), s = Xr(), l = Re(), i = De(t._type), a = Ye(rs(o), "prop"), p = Ye(i.props, `${a}.presets`, {});
2073
+ if (ie(s) && (!ss(i, "props") || ie(p)))
2054
2074
  return null;
2055
- const n = (p) => {
2056
- const h = p.trim().toLowerCase().replace(/ +(?= )/g, "").split(" ");
2057
- l([r._id], h, !0);
2075
+ const n = (d) => {
2076
+ const h = d.trim().toLowerCase().replace(/ +(?= )/g, "").split(" ");
2077
+ l([t._id], h, !0);
2058
2078
  };
2059
2079
  return /* @__PURE__ */ e.jsx("div", { className: "h-10", children: /* @__PURE__ */ e.jsxs(Rr, { children: [
2060
2080
  /* @__PURE__ */ e.jsx(Vr, { asChild: !0, children: /* @__PURE__ */ e.jsx("div", { className: "px-4", children: /* @__PURE__ */ e.jsxs(oe, { variant: "default", className: "w-full", size: "sm", children: [
2061
- t("Apply Presets"),
2081
+ r("Apply Presets"),
2062
2082
  /* @__PURE__ */ e.jsx(Qt, {})
2063
2083
  ] }) }) }),
2064
2084
  /* @__PURE__ */ e.jsx(Hr, { className: "max-h-80 w-56", children: /* @__PURE__ */ e.jsxs(He, { className: "no-scrollbar h-full", children: [
2065
- ie(c) ? null : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2085
+ ie(p) ? null : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2066
2086
  /* @__PURE__ */ e.jsxs(Ae, { children: [
2067
2087
  i.type,
2068
2088
  " ",
2069
- t("presets")
2089
+ r("presets")
2070
2090
  ] }),
2071
2091
  /* @__PURE__ */ e.jsx(Me, {}),
2072
- /* @__PURE__ */ e.jsx(Ee, { children: Xe(c).map((p) => /* @__PURE__ */ e.jsxs(Le, { className: "group text-xs", onClick: () => n(c[p]), children: [
2073
- Ze(We(t(p))),
2074
- /* @__PURE__ */ e.jsx(Oe, { className: "invisible hover:font-bold hover:text-blue-600 group-hover:visible", children: t("apply") })
2092
+ /* @__PURE__ */ e.jsx(Ee, { children: Xe(p).map((d) => /* @__PURE__ */ e.jsxs(Le, { className: "group text-xs", onClick: () => n(p[d]), children: [
2093
+ Ze(We(r(d))),
2094
+ /* @__PURE__ */ e.jsx(Oe, { className: "invisible hover:font-bold hover:text-blue-600 group-hover:visible", children: r("apply") })
2075
2095
  ] })) })
2076
2096
  ] }),
2077
2097
  ie(s) ? null : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2078
- /* @__PURE__ */ e.jsx(Ae, { children: t("Global presets") }),
2098
+ /* @__PURE__ */ e.jsx(Ae, { children: r("Global presets") }),
2079
2099
  /* @__PURE__ */ e.jsx(Me, {}),
2080
- /* @__PURE__ */ e.jsx(Ee, { children: Xe(s).map((p) => /* @__PURE__ */ e.jsxs(Le, { className: "group text-xs", onClick: () => n(s[p]), children: [
2081
- Ze(We(t(p))),
2082
- /* @__PURE__ */ e.jsx(Oe, { className: "invisible hover:font-bold hover:text-blue-600 group-hover:visible", children: t("apply") })
2100
+ /* @__PURE__ */ e.jsx(Ee, { children: Xe(s).map((d) => /* @__PURE__ */ e.jsxs(Le, { className: "group text-xs", onClick: () => n(s[d]), children: [
2101
+ Ze(We(r(d))),
2102
+ /* @__PURE__ */ e.jsx(Oe, { className: "invisible hover:font-bold hover:text-blue-600 group-hover:visible", children: r("apply") })
2083
2103
  ] })) })
2084
2104
  ] })
2085
2105
  ] }) })
2086
2106
  ] }) });
2087
2107
  };
2088
- function $s() {
2089
- const [r, a] = ct(), { flexChild: t, gridChild: s } = Dr(), { t: l } = W(), [i] = he();
2108
+ function Bs() {
2109
+ const [t, o] = ct(), { flexChild: r, gridChild: s } = Dr(), { t: l } = W(), [i] = he();
2090
2110
  return f(i) ? /* @__PURE__ */ e.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 rounded-xl p-4", children: [
2091
2111
  /* @__PURE__ */ e.jsx(ot, { className: "mx-auto text-3xl" }),
2092
2112
  /* @__PURE__ */ e.jsx("h1", { children: l("no_styling_block_selected") })
2093
2113
  ] }) }) : /* @__PURE__ */ e.jsxs("div", { className: "flex h-full flex-col", children: [
2094
- /* @__PURE__ */ e.jsx(Bs, {}),
2114
+ /* @__PURE__ */ e.jsx($s, {}),
2095
2115
  /* @__PURE__ */ e.jsx("div", { className: "flex h-12 flex-col space-x-4 px-4 py-1", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-end gap-x-1.5", children: [
2096
2116
  /* @__PURE__ */ e.jsx(Ve, { htmlFor: "", className: "flex gap-x-1.5 text-xs italic", children: "State" }),
2097
- /* @__PURE__ */ e.jsxs(Br, { defaultValue: r, onValueChange: (o) => a(o), children: [
2098
- /* @__PURE__ */ e.jsx($r, { className: "h-auto w-fit p-1 px-3", children: /* @__PURE__ */ e.jsx(Pr, { placeholder: "State" }) }),
2117
+ /* @__PURE__ */ e.jsxs($r, { defaultValue: t, onValueChange: (a) => o(a), children: [
2118
+ /* @__PURE__ */ e.jsx(Br, { className: "h-auto w-fit p-1 px-3", children: /* @__PURE__ */ e.jsx(Pr, { placeholder: "State" }) }),
2099
2119
  /* @__PURE__ */ e.jsxs(Ir, { children: [
2100
2120
  /* @__PURE__ */ e.jsx(H, { value: "", children: "Normal" }),
2101
2121
  /* @__PURE__ */ e.jsx(H, { value: "hover", children: "Hover" }),
@@ -2112,14 +2132,14 @@ function $s() {
2112
2132
  ] })
2113
2133
  ] })
2114
2134
  ] }) }),
2115
- 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: [
2116
- /* @__PURE__ */ e.jsx(zr, { className: "w-3" }),
2117
- /* @__PURE__ */ e.jsx("span", { children: l(`Styles will be applied for (:${r}) state`) })
2135
+ t !== "" ? /* @__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: [
2136
+ /* @__PURE__ */ e.jsx(Fr, { className: "w-3" }),
2137
+ /* @__PURE__ */ e.jsx("span", { children: l(`Styles will be applied for (:${t}) state`) })
2118
2138
  ] }) : null,
2119
2139
  /* @__PURE__ */ e.jsx(He, { 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: [
2120
- t && /* @__PURE__ */ e.jsx(ve, { section: ps }),
2140
+ r && /* @__PURE__ */ e.jsx(ve, { section: ps }),
2121
2141
  s ? /* @__PURE__ */ e.jsx(ve, { section: us }) : null,
2122
- xs.map((o) => /* @__PURE__ */ e.jsx(ve, { section: o }, o.heading)),
2142
+ xs.map((a) => /* @__PURE__ */ e.jsx(ve, { section: a }, a.heading)),
2123
2143
  /* @__PURE__ */ e.jsx(Ds, { section: { heading: "Attributes" } })
2124
2144
  ] }) })
2125
2145
  ] });
@@ -2136,7 +2156,7 @@ const Ps = {
2136
2156
  deg: 1,
2137
2157
  ms: 0.1
2138
2158
  }, Pl = () => {
2139
- const r = U(), { t: a } = W(), [t, s] = I.useState(""), [l, i] = I.useState({
2159
+ const t = U(), { t: o } = W(), [r, s] = I.useState(""), [l, i] = I.useState({
2140
2160
  onDrag: (n) => n,
2141
2161
  onDragEnd: (n) => n,
2142
2162
  dragStartY: 0,
@@ -2145,20 +2165,20 @@ const Ps = {
2145
2165
  dragUnit: "",
2146
2166
  negative: !1,
2147
2167
  cssProperty: ""
2148
- }), o = je(
2168
+ }), a = je(
2149
2169
  (n) => {
2150
- const p = !x(l, "negative", !1), h = x(l, "cssProperty", "");
2151
- let d = parseFloat(l.dragStartValue);
2152
- d = tt(d) ? 0 : d;
2170
+ const d = !x(l, "negative", !1), h = x(l, "cssProperty", "");
2171
+ let c = parseFloat(l.dragStartValue);
2172
+ c = tt(c) ? 0 : c;
2153
2173
  let y = Ps[l.dragUnit];
2154
2174
  (G(h, "scale") || h === "opacity") && (y = 10);
2155
- let u = (l.dragStartY - n.pageY) / y + d;
2156
- p && u < 0 && (u = 0), h === "opacity" && u > 1 && (u = 1), l.onDrag(`${u}`), s(`${u}`);
2175
+ let u = (l.dragStartY - n.pageY) / y + c;
2176
+ d && u < 0 && (u = 0), h === "opacity" && u > 1 && (u = 1), l.onDrag(`${u}`), s(`${u}`);
2157
2177
  },
2158
2178
  [l],
2159
2179
  50
2160
- ), c = V(() => {
2161
- setTimeout(() => l.onDragEnd(`${t}`), 100), i({
2180
+ ), p = V(() => {
2181
+ setTimeout(() => l.onDragEnd(`${r}`), 100), i({
2162
2182
  onDrag: (n) => n,
2163
2183
  onDragEnd: (n) => n,
2164
2184
  dragStartY: 0,
@@ -2168,26 +2188,26 @@ const Ps = {
2168
2188
  negative: !1,
2169
2189
  cssProperty: ""
2170
2190
  });
2171
- }, [l, t, i]);
2172
- 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: [
2191
+ }, [l, r, i]);
2192
+ return $t(t) ? /* @__PURE__ */ e.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 rounded-xl p-4", children: [
2173
2193
  /* @__PURE__ */ e.jsx(ot, { className: "mx-auto text-3xl" }),
2174
- /* @__PURE__ */ e.jsx("h1", { children: a("no_block_selected_for_styling") })
2194
+ /* @__PURE__ */ e.jsx("h1", { children: o("no_block_selected_for_styling") })
2175
2195
  ] }) }) : /* @__PURE__ */ e.jsx(pt, { children: /* @__PURE__ */ e.jsxs(yt.Provider, { value: { setDragData: i }, children: [
2176
2196
  l.dragging ? /* @__PURE__ */ e.jsx(
2177
2197
  "div",
2178
2198
  {
2179
- onMouseMove: o,
2180
- onMouseUp: () => c(),
2199
+ onMouseMove: a,
2200
+ onMouseUp: () => p(),
2181
2201
  className: "absolute inset-0 z-30 cursor-row-resize bg-gray-300/10"
2182
2202
  }
2183
2203
  ) : null,
2184
2204
  /* @__PURE__ */ e.jsxs(Ar, { defaultValue: "settings", className: "flex h-full w-full flex-col py-1", children: [
2185
2205
  /* @__PURE__ */ e.jsxs(Mr, { className: "mx-1 grid grid-cols-2", children: [
2186
- /* @__PURE__ */ e.jsx(Fe, { value: "settings", children: a("settings") }),
2187
- /* @__PURE__ */ e.jsx(Fe, { value: "styling", children: a("styling") })
2206
+ /* @__PURE__ */ e.jsx(ze, { value: "settings", children: o("settings") }),
2207
+ /* @__PURE__ */ e.jsx(ze, { value: "styling", children: o("styling") })
2188
2208
  ] }),
2189
- /* @__PURE__ */ e.jsx(ze, { value: "settings", className: "no-scrollbar h-full flex-1 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(He, { className: "no-scrollbar max-h-full flex-1 overflow-x-hidden overflow-y-hidden pb-5", children: /* @__PURE__ */ e.jsx(ds, {}) }) }),
2190
- /* @__PURE__ */ e.jsx(ze, { value: "styling", className: "h-full flex-1 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx($s, {}) })
2209
+ /* @__PURE__ */ e.jsx(Fe, { value: "settings", className: "no-scrollbar h-full flex-1 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(He, { className: "no-scrollbar max-h-full flex-1 overflow-x-hidden overflow-y-hidden pb-5", children: /* @__PURE__ */ e.jsx(ds, {}) }) }),
2210
+ /* @__PURE__ */ e.jsx(Fe, { value: "styling", className: "h-full flex-1 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(Bs, {}) })
2191
2211
  ] })
2192
2212
  ] }) });
2193
2213
  };