@chaibuilder/sdk 1.2.50 → 1.2.52

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 (88) hide show
  1. package/dist/{AddBlocks-IX7HKzSe.js → AddBlocks-GxEmM16E.js} +18 -18
  2. package/dist/{AddBlocks-zwZ63DdP.cjs → AddBlocks-fozauzIV.cjs} +1 -1
  3. package/dist/CanvasArea-NRtblq5d.cjs +56 -0
  4. package/dist/{CanvasArea-ehmBje_E.js → CanvasArea-rdY6SFYn.js} +57 -57
  5. package/dist/{ChaiBuilderEditor-ZRHqW7Gd.cjs → ChaiBuilderEditor-Pga_zJgw.cjs} +55 -55
  6. package/dist/{ChaiBuilderEditor-3xIN-AP_.js → ChaiBuilderEditor-bNZZWYMh.js} +14537 -14544
  7. package/dist/CodeEditor-tqtgia3I.js +115 -0
  8. package/dist/CodeEditor-ye3IXW3i.cjs +1 -0
  9. package/dist/{CurrentPage-qhBjm7th.js → CurrentPage-7NM90y76.js} +8 -8
  10. package/dist/{CurrentPage-HOPNdQZ-.cjs → CurrentPage-sx7KVTmt.cjs} +1 -1
  11. package/dist/ListTree-7Pz6H6eE.cjs +1 -0
  12. package/dist/ListTree-oRbeDNod.js +25724 -0
  13. package/dist/{PagesPanel-kdl4A0IN.cjs → PagesPanel-Nr-908vy.cjs} +1 -1
  14. package/dist/{PagesPanel-5iVsbDP1.js → PagesPanel-XiTUaiq_.js} +5 -5
  15. package/dist/{ProjectPanel-mXPBI-TU.cjs → ProjectPanel-SuFYN60H.cjs} +1 -1
  16. package/dist/{ProjectPanel-c8oTzhQd.js → ProjectPanel-XfknsGkz.js} +5 -5
  17. package/dist/Settings-22Hy7jUT.cjs +1 -0
  18. package/dist/{Settings-0uSGoECC.js → Settings-dJ72rwnH.js} +408 -401
  19. package/dist/{SidePanels-kKram02Q.cjs → SidePanels-5dnRAsJh.cjs} +1 -1
  20. package/dist/{SidePanels-YLWdBer9.js → SidePanels-t9oUA51J.js} +38 -38
  21. package/dist/{ThemeConfiguration-8W1CM4tW.cjs → ThemeConfiguration-2Sbh29qi.cjs} +1 -1
  22. package/dist/{ThemeConfiguration-AAGFJieC.js → ThemeConfiguration-pcHbYiIP.js} +9 -9
  23. package/dist/{Topbar-nX9Muoem.js → Topbar-0DmS6VpB.js} +4 -4
  24. package/dist/{Topbar-CLNUPx7K.cjs → Topbar-ID6Ipphd.cjs} +1 -1
  25. package/dist/{UILibrariesPanel-fKn2nlgI.js → UILibrariesPanel-G9J4KUsZ.js} +6 -6
  26. package/dist/{UILibrariesPanel-cp0Mkaq_.cjs → UILibrariesPanel-sXY6hozJ.cjs} +1 -1
  27. package/dist/{UnsplashImages-56HoW_ZA.cjs → UnsplashImages-HK4_1VVL.cjs} +1 -1
  28. package/dist/{UnsplashImages-zTZa3LjG.js → UnsplashImages-MeS5Cu7a.js} +4 -4
  29. package/dist/{UploadImages-SnfaTrlz.js → UploadImages-AIKATqfP.js} +2 -2
  30. package/dist/{UploadImages-okNGjkXb.cjs → UploadImages-LSnxByGV.cjs} +1 -1
  31. package/dist/{add-page-modal-uDoO0zws.js → add-page-modal-JkD45moJ.js} +9 -9
  32. package/dist/{add-page-modal-Y2RY3x01.cjs → add-page-modal-krxKdX7-.cjs} +1 -1
  33. package/dist/{confirm-alert-aD7AMK_6.cjs → confirm-alert--QTC21Z2.cjs} +1 -1
  34. package/dist/{confirm-alert-9XiVxCc0.js → confirm-alert-NHxthdRK.js} +2 -2
  35. package/dist/core.cjs +1 -1
  36. package/dist/core.d.ts +9 -0
  37. package/dist/core.js +32 -31
  38. package/dist/{delete-page-modal-7sfoFf9r.js → delete-page-modal-8rjPEchH.js} +4 -4
  39. package/dist/{delete-page-modal-ieJ367JA.cjs → delete-page-modal-BIe0kYNH.cjs} +1 -1
  40. package/dist/email.cjs +1 -1
  41. package/dist/email.js +2 -2
  42. package/dist/{form-KWYHDVIf.cjs → form-6OLp5uEG.cjs} +1 -1
  43. package/dist/{form-PQSmqcIl.js → form-PQYPrD_Q.js} +5 -5
  44. package/dist/functions--tdNWQDW.js +30 -0
  45. package/dist/functions-EVUeSwX1.cjs +1 -0
  46. package/dist/html-to-json-9uiQ2Dp2.cjs +1 -0
  47. package/dist/html-to-json-ofq1N3tB.js +186 -0
  48. package/dist/index--mLLy7QQ.cjs +1 -0
  49. package/dist/index-9_b2eou7.js +2201 -0
  50. package/dist/index-VBXQixVm.js +117 -0
  51. package/dist/index-seU0_UZX.cjs +1 -0
  52. package/dist/lib.cjs +1 -1
  53. package/dist/lib.js +11 -11
  54. package/dist/{page-viewer-aoro5JxT.cjs → page-viewer-WwwMC1Kq.cjs} +1 -1
  55. package/dist/{page-viewer-qkwZJ6e-.js → page-viewer-sKluQ_e1.js} +10 -10
  56. package/dist/{project-general-setting-3gkaXq1F.js → project-general-setting-Lc2ByvTt.js} +7 -7
  57. package/dist/{project-general-setting-arXitV5_.cjs → project-general-setting-pRO1ikDV.cjs} +1 -1
  58. package/dist/{project-seo-setting-X8pykTmc.js → project-seo-setting-530_6o9S.js} +3 -3
  59. package/dist/{project-seo-setting-kjtUt-er.cjs → project-seo-setting-BzSrXFVv.cjs} +1 -1
  60. package/dist/render.cjs +1 -1
  61. package/dist/render.js +2 -2
  62. package/dist/{single-page-detail-UsWG0gfh.cjs → single-page-detail-_VP4zaCI.cjs} +1 -1
  63. package/dist/{single-page-detail-ZXZX6Xmw.js → single-page-detail-qDxxtedN.js} +6 -6
  64. package/dist/studio.cjs +1 -1
  65. package/dist/studio.js +4 -4
  66. package/dist/ui.cjs +1 -1
  67. package/dist/ui.js +98 -98
  68. package/dist/useCanvasSettings-5y2fSCpN.js +6 -0
  69. package/dist/useCanvasSettings-pURFQG4q.cjs +1 -0
  70. package/dist/web-blocks.cjs +1 -1
  71. package/dist/web-blocks.js +320 -320
  72. package/package.json +3 -2
  73. package/dist/CanvasArea-URgoG1jc.cjs +0 -56
  74. package/dist/CodeEditor-0F7Dz3AB.js +0 -97
  75. package/dist/CodeEditor-1vu-qNgT.cjs +0 -1
  76. package/dist/ListTree-DkbFFDXB.cjs +0 -1
  77. package/dist/ListTree-sTwXvXST.js +0 -409
  78. package/dist/Settings-3kBSStO6.cjs +0 -1
  79. package/dist/functions-JO0EW8GX.js +0 -30
  80. package/dist/functions-ZZVUnIjD.cjs +0 -1
  81. package/dist/html-to-json-GJ6RioQf.js +0 -221
  82. package/dist/html-to-json-O1OpqICe.cjs +0 -1
  83. package/dist/index-VOrp9ZpX.cjs +0 -1
  84. package/dist/index-YpnaudSM.js +0 -63
  85. package/dist/index-ecnGWzh9.cjs +0 -1
  86. package/dist/index-i2kgLkjC.js +0 -2201
  87. package/dist/useCodeEditor-CtjbxWLf.cjs +0 -1
  88. package/dist/useCodeEditor-yl5V3Hte.js +0 -7
@@ -1,21 +1,22 @@
1
1
  import { j as e } from "./jsx-runtime-WbnYoNE9.js";
2
- import * as ne from "react";
3
- import P, { useState as w, useMemo as T, useEffect as A, useCallback as H, memo as bt, useRef as mt, createContext as Fe, useContext as se } from "react";
4
- import { useThrottledCallback as de } from "@react-hookz/web";
5
- import { forEach as Ne, isArray as ce, omit as ft, truncate as vt, includes as X, get as y, first as oe, split as wt, startCase as F, toLower as re, isEmpty as m, map as _, find as Ze, last as jt, filter as ye, set as We, debounce as Ct, keys as he, cloneDeep as kt, each as Nt, capitalize as be, reject as _t, startsWith as W, nth as He, isNumber as St, parseInt as Tt, isNaN as Ue, findLast as Rt, flatten as De, intersection as Vt, has as ie, isNull as Ht } from "lodash-es";
2
+ import * as ie from "react";
3
+ import P, { useState as w, useMemo as S, useEffect as A, useCallback as H, memo as mt, useRef as ft, createContext as Ze, useContext as se } from "react";
4
+ import { useThrottledCallback as ce } from "@react-hookz/web";
5
+ import { forEach as Ne, isArray as pe, omit as vt, truncate as wt, includes as F, get as y, first as oe, split as jt, startCase as X, toLower as re, isEmpty as m, map as _, find as We, last as Ct, filter as ye, set as Ue, debounce as kt, keys as he, cloneDeep as Nt, each as _t, capitalize as be, reject as St, startsWith as U, nth as He, isNumber as Tt, parseInt as Rt, isNaN as Ge, findLast as Vt, flatten as De, intersection as Ht, has as de, isNull as Dt } from "lodash-es";
6
6
  import { useTranslation as I } from "react-i18next";
7
- import { CopyIcon as Dt, PlusIcon as _e, Cross2Icon as Ke, EyeOpenIcon as Bt, EyeClosedIcon as Be, BorderAllIcon as Y, WidthIcon as R, HeightIcon as V, ArrowUpIcon as J, ArrowRightIcon as Q, ArrowDownIcon as ee, ArrowLeftIcon as te, ArrowTopLeftIcon as It, ArrowTopRightIcon as Pt, ArrowBottomRightIcon as At, ArrowBottomLeftIcon as $t, AlignLeftIcon as Et, AlignCenterHorizontallyIcon as Mt, AlignRightIcon as Lt, StretchHorizontallyIcon as Ot, FontItalicIcon as zt, UnderlineIcon as Yt, OverlineIcon as Xt, LetterCaseUppercaseIcon as Ft, Cross1Icon as Zt, InfoCircledIcon as Se, MinusIcon as Wt, BoxIcon as Ge, RowSpacingIcon as Ut, TriangleDownIcon as Kt, CrossCircledIcon as Gt, CaretDownIcon as qt, MixerHorizontalIcon as Jt } from "@radix-ui/react-icons";
8
- import { a1 as qe, aP as Je, aQ as Qe, B, aR as et, aS as Qt, aT as er, aU as tr, aV as rr, aW as sr, aX as or, L as U, aK as tt, _ as lr, $ as ar, a0 as nr, aY as ir, Y as dr, aa as cr, Z as pr, ab as $, ac as E, ad as M, aZ as ur, a_ as gr, a$ as xr, b0 as yr, b1 as hr, b2 as br, b3 as mr, Q as rt, P as st, h as ot, b4 as fr, b5 as lt, b6 as me, b7 as fe, b8 as ve, b9 as vr, ba as wr, ag as jr, bb as Cr, X as pe, n as Te, H as at, K as nt, bc as it, bd as we, j as kr, be as Nr, I as ue, v as _r, O as Sr, o as Ie, au as Tr, av as Rr, aw as Vr, bf as dt, ax as Pe, ay as Ae, bg as $e, bh as Ee, bi as Me, R as Hr } from "./ChaiBuilderEditor-3xIN-AP_.js";
9
- import { Check as Dr, EditIcon as Br, TrashIcon as Ir, Loader as Pr, SparklesIcon as Ar, DeleteIcon as $r } from "lucide-react";
10
- import { getBlockComponent as Re, getChaiDataProviders as Er, useGlobalStylingPresets as Mr } from "@chaibuilder/runtime";
11
- import { J as Lr, a as Or, d as zr } from "./index-e0c8PmRQ.js";
12
- import Yr from "@rjsf/core";
13
- import Xr from "@rjsf/validator-ajv8";
14
- import { a as Fr, u as Zr } from "./useCodeEditor-yl5V3Hte.js";
15
- import Wr from "react-autosuggest";
16
- import Ur from "fuse.js";
17
- import { A as Kr, C as ge, g as Gr } from "./utils-VpVqnC9m.js";
18
- import { a as qr } from "./MODIFIERS-fd5XOmum.js";
7
+ import { CopyIcon as Bt, PlusIcon as _e, Cross2Icon as Ke, EyeOpenIcon as It, EyeClosedIcon as Be, BorderAllIcon as Y, WidthIcon as R, HeightIcon as V, ArrowUpIcon as J, ArrowRightIcon as Q, ArrowDownIcon as ee, ArrowLeftIcon as te, ArrowTopLeftIcon as Pt, ArrowTopRightIcon as At, ArrowBottomRightIcon as $t, ArrowBottomLeftIcon as Et, AlignLeftIcon as Mt, AlignCenterHorizontallyIcon as Lt, AlignRightIcon as Ot, StretchHorizontallyIcon as zt, FontItalicIcon as Yt, UnderlineIcon as Ft, OverlineIcon as Xt, LetterCaseUppercaseIcon as Zt, Cross1Icon as Wt, InfoCircledIcon as Se, MinusIcon as Ut, BoxIcon as qe, RowSpacingIcon as Gt, TriangleDownIcon as Kt, CrossCircledIcon as qt, CaretDownIcon as Jt, MixerHorizontalIcon as Qt } from "@radix-ui/react-icons";
8
+ import { a2 as Je, aQ as Qe, aR as et, B, aS as tt, aT as er, aU as tr, aV as rr, aW as sr, aX as or, aY as lr, M as Z, aL as rt, $ as ar, a0 as nr, a1 as ir, aZ as dr, Z as cr, ab as pr, _ as ur, ac as $, ad as E, ae as M, i as gr, a_ as xr, a$ as yr, b0 as hr, b1 as br, b2 as mr, b3 as fr, b4 as vr, R as st, Q as ot, h as lt, b5 as wr, b6 as at, b7 as me, b8 as fe, b9 as ve, ba as jr, bb as Cr, ah as kr, bc as Nr, Y as le, o as Te, I as nt, L as it, bd as dt, be as we, k as _r, bf as Sr, J as ue, w as Tr, P as Rr, p as Ie, av as Vr, aw as Hr, ax as Dr, bg as ct, ay as Pe, az as Ae, bh as $e, bi as Ee, bj as Me, S as Br } from "./ChaiBuilderEditor-bNZZWYMh.js";
9
+ import { Check as Ir, EditIcon as Pr, TrashIcon as Ar, Loader as $r, SparklesIcon as Er, DeleteIcon as Mr } from "lucide-react";
10
+ import { getBlockComponent as Re, getChaiDataProviders as Lr, useGlobalStylingPresets as Or } from "@chaibuilder/runtime";
11
+ import { J as zr, a as Yr, d as Fr } from "./index-e0c8PmRQ.js";
12
+ import Xr from "@rjsf/core";
13
+ import Zr from "@rjsf/validator-ajv8";
14
+ import { u as Wr } from "./useCanvasSettings-5y2fSCpN.js";
15
+ import Ur from "react-autosuggest";
16
+ import Gr from "fuse.js";
17
+ import { A as Kr, C as ge, g as qr } from "./utils-VpVqnC9m.js";
18
+ import { a as Jr } from "./MODIFIERS-fd5XOmum.js";
19
+ import { get as Le, isEmpty as Qr } from "lodash";
19
20
  import "./_commonjsHelpers-UyOWmZb0.js";
20
21
  import "clsx";
21
22
  import "react-dom";
@@ -49,16 +50,16 @@ import "@radix-ui/react-context-menu";
49
50
  import "react-icons-picker";
50
51
  import "react-quill";
51
52
  import "react-hotkeys-hook";
52
- import "./index-YpnaudSM.js";
53
- function Jr(r) {
53
+ import "./index-VBXQixVm.js";
54
+ function es(r) {
54
55
  const o = [], t = {};
55
- function a(l, s) {
56
- Ne(s, (d, c) => {
57
- const n = l ? `${l}.${c}` : c, p = ce(d) ? "list" : typeof d;
58
- o.push(n), t[n] = p === "string" ? "text" : p === "object" ? "model" : p, p === "object" && !ce(d) && a(n, d);
56
+ function a(l, n) {
57
+ Ne(n, (d, c) => {
58
+ const s = l ? `${l}.${c}` : c, p = pe(d) ? "list" : typeof d;
59
+ o.push(s), t[s] = p === "string" ? "text" : p === "object" ? "model" : p, p === "object" && !pe(d) && a(s, d);
59
60
  });
60
61
  }
61
- return a("", ft(r, ["styles", "_type", "_id", "_name", "_bindings"])), { paths: o, pathsType: t };
62
+ return a("", vt(r, ["styles", "_type", "_id", "_name", "_bindings"])), { paths: o, pathsType: t };
62
63
  }
63
64
  const je = ({ data: r, fullView: o }) => {
64
65
  if (!r)
@@ -66,13 +67,13 @@ const je = ({ data: r, fullView: o }) => {
66
67
  const t = typeof r;
67
68
  return o ? typeof r == "object" ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
68
69
  /* @__PURE__ */ e.jsx("div", { className: "h-3" }),
69
- /* @__PURE__ */ e.jsx(qe, { children: /* @__PURE__ */ e.jsx(
70
- Lr,
70
+ /* @__PURE__ */ e.jsx(Je, { children: /* @__PURE__ */ e.jsx(
71
+ zr,
71
72
  {
72
73
  data: r,
73
- shouldExpandNode: Or,
74
+ shouldExpandNode: Yr,
74
75
  style: {
75
- ...zr,
76
+ ...Fr,
76
77
  container: "max-h-[40vh] overflow-y-auto text-[12px] leading-[1.5] tracking-wide font-mono",
77
78
  stringValue: "text-orange-600",
78
79
  label: "text-green-900 font-semibold pr-1 tracking-wider"
@@ -82,26 +83,26 @@ const je = ({ data: r, fullView: o }) => {
82
83
  ] }) : /* @__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: [
83
84
  /* @__PURE__ */ e.jsx("span", { className: "font-medium text-gray-800/80", children: "Content: " }),
84
85
  r
85
- ] }) : /* @__PURE__ */ e.jsx("div", { className: "w-full overflow-hidden whitespace-nowrap text-[10px] leading-3 text-gray-800/50", children: vt(t === "object" ? JSON.stringify(r) : r, { length: 40 }) });
86
- }, Le = ({
86
+ ] }) : /* @__PURE__ */ e.jsx("div", { className: "w-full overflow-hidden whitespace-nowrap text-[10px] leading-3 text-gray-800/50", children: wt(t === "object" ? JSON.stringify(r) : r, { length: 40 }) });
87
+ }, Oe = ({
87
88
  type: r,
88
89
  value: o = "",
89
90
  setValue: t,
90
91
  data: a,
91
92
  onChange: l,
92
- dataType: s,
93
+ dataType: n,
93
94
  appliedBindings: d
94
95
  }) => {
95
- const { paths: c, pathsType: n } = Jr(a), p = r === "PROP" ? Re(a == null ? void 0 : a._type) : {}, h = r === "PROP", [i, u] = w(!1), x = T(() => r === "PROP" ? c.filter(
96
- (g) => !X(d, g) && y(p, `props.${oe(wt(g, "."))}.binding`)
97
- ) : c.filter((g) => s === y(n, g, "")), [r, c, d, s, p]);
96
+ const { paths: c, pathsType: s } = es(a), p = r === "PROP" ? Re(a == null ? void 0 : a._type) : {}, h = r === "PROP", [i, u] = w(!1), x = S(() => r === "PROP" ? c.filter(
97
+ (g) => !F(d, g) && y(p, `props.${oe(jt(g, "."))}.binding`)
98
+ ) : c.filter((g) => n === y(s, g, "")), [r, c, d, n, p]);
98
99
  return A(() => {
99
100
  o && l(o);
100
101
  }, [o, r]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
101
102
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-4", children: [
102
- /* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted-foreground", children: F(re(r)) }),
103
- /* @__PURE__ */ e.jsxs(Je, { open: i, onOpenChange: u, children: [
104
- /* @__PURE__ */ e.jsx(Qe, { asChild: !0, children: /* @__PURE__ */ e.jsx(
103
+ /* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted-foreground", children: X(re(r)) }),
104
+ /* @__PURE__ */ e.jsxs(Qe, { open: i, onOpenChange: u, children: [
105
+ /* @__PURE__ */ e.jsx(et, { asChild: !0, children: /* @__PURE__ */ e.jsx(
105
106
  B,
106
107
  {
107
108
  variant: "outline",
@@ -109,34 +110,34 @@ const je = ({ data: r, fullView: o }) => {
109
110
  className: ` ${m(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"}`,
110
111
  children: o ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
111
112
  /* @__PURE__ */ e.jsxs("span", { className: "pr-8 text-sm", children: [
112
- h && /* @__PURE__ */ e.jsx("span", { className: "mr-2 rounded-full bg-purple-100 px-2 py-0.5 text-[10px] text-purple-500", children: F(s) }),
113
+ h && /* @__PURE__ */ e.jsx("span", { className: "mr-2 rounded-full bg-purple-100 px-2 py-0.5 text-[10px] text-purple-500", children: X(n) }),
113
114
  o
114
115
  ] }),
115
116
  /* @__PURE__ */ e.jsx("span", { className: "cursor-pointer text-[9px] text-blue-400 underline hover:text-blue-700", children: "Change" })
116
117
  ] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
117
118
  "+ Set ",
118
- F(re(r))
119
+ X(re(r))
119
120
  ] })
120
121
  }
121
122
  ) }),
122
- /* @__PURE__ */ e.jsx(et, { className: "z-[999] min-w-[300px] p-0", side: "right", align: "start", children: /* @__PURE__ */ e.jsxs(Qt, { children: [
123
- /* @__PURE__ */ e.jsx(er, { placeholder: `Choose ${re(r)}...` }),
124
- /* @__PURE__ */ e.jsxs(tr, { children: [
125
- /* @__PURE__ */ e.jsx(rr, { children: "No results found." }),
126
- /* @__PURE__ */ e.jsx(sr, { children: _(x, (g) => /* @__PURE__ */ e.jsxs(
127
- or,
123
+ /* @__PURE__ */ e.jsx(tt, { className: "z-[999] min-w-[300px] p-0", side: "right", align: "start", children: /* @__PURE__ */ e.jsxs(er, { children: [
124
+ /* @__PURE__ */ e.jsx(tr, { placeholder: `Choose ${re(r)}...` }),
125
+ /* @__PURE__ */ e.jsxs(rr, { children: [
126
+ /* @__PURE__ */ e.jsx(sr, { children: "No results found." }),
127
+ /* @__PURE__ */ e.jsx(or, { children: _(x, (g) => /* @__PURE__ */ e.jsxs(
128
+ lr,
128
129
  {
129
130
  value: g,
130
131
  className: `cursor-pointer ${h ? "flex items-center justify-between" : "flex flex-col items-start justify-start"}`,
131
132
  onSelect: (v) => {
132
- t(Ze(x, (C) => C === v) || null), u(!1);
133
+ t(We(x, (C) => C === v) || null), u(!1);
133
134
  },
134
135
  children: [
135
136
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
136
- /* @__PURE__ */ e.jsx(Dr, { className: `h-4 w-4 text-green-500 ${o === g ? "" : "opacity-0"}` }),
137
+ /* @__PURE__ */ e.jsx(Ir, { className: `h-4 w-4 text-green-500 ${o === g ? "" : "opacity-0"}` }),
137
138
  g
138
139
  ] }),
139
- h ? /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx("span", { className: "rounded-full bg-purple-100 px-2 py-0.5 text-[10px] text-purple-500", children: F(y(n, g, "")) }) }) : /* @__PURE__ */ e.jsx("div", { className: "pl-6", children: /* @__PURE__ */ e.jsx(je, { data: y(a, g) }) })
140
+ 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: X(y(s, g, "")) }) }) : /* @__PURE__ */ e.jsx("div", { className: "pl-6", children: /* @__PURE__ */ e.jsx(je, { data: y(a, g) }) })
140
141
  ]
141
142
  },
142
143
  g
@@ -147,52 +148,52 @@ const je = ({ data: r, fullView: o }) => {
147
148
  ] }),
148
149
  !h && !m(o) && /* @__PURE__ */ e.jsx("div", { className: "pt-2", children: /* @__PURE__ */ e.jsx(je, { data: y(a, o, ""), fullView: !0 }) })
149
150
  ] });
150
- }, Qr = ({
151
+ }, ts = ({
151
152
  appliedBindings: r = [],
152
153
  onAddBinding: o,
153
154
  editMode: t,
154
155
  item: a
155
156
  }) => {
156
- const [l, s] = w(t ? a.key : ""), [d, c] = w(t ? a.value : ""), n = U(), [p] = tt(), h = H(
157
+ const [l, n] = w(t ? a.key : ""), [d, c] = w(t ? a.value : ""), s = Z(), [p] = rt(), h = H(
157
158
  (x, g) => {
158
159
  if (m(x))
159
160
  return "";
160
161
  {
161
- const v = y(g === "PROP" ? n : p, x, "");
162
- if (ce(v))
162
+ const v = y(g === "PROP" ? s : p, x, "");
163
+ if (pe(v))
163
164
  return "list";
164
165
  const C = typeof v;
165
166
  return C === "string" ? "text" : C === "object" ? "model" : C;
166
167
  }
167
168
  },
168
- [n, p]
169
+ [s, p]
169
170
  ), [i, u] = w(t ? h(a.key, "PROP") : "");
170
171
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
171
- /* @__PURE__ */ e.jsxs(lr, { children: [
172
- /* @__PURE__ */ e.jsx(ar, { children: "Add Data Binding" }),
173
- /* @__PURE__ */ e.jsx(nr, { className: "text-xs", children: "Add prop and path of binding. Click save when you're done." })
172
+ /* @__PURE__ */ e.jsxs(ar, { children: [
173
+ /* @__PURE__ */ e.jsx(nr, { children: "Add Data Binding" }),
174
+ /* @__PURE__ */ e.jsx(ir, { className: "text-xs", children: "Add prop and path of binding. Click save when you're done." })
174
175
  ] }),
175
176
  /* @__PURE__ */ e.jsxs("div", { className: "relative flex flex-col gap-1", children: [
176
177
  /* @__PURE__ */ e.jsx(
177
- Le,
178
+ Oe,
178
179
  {
179
180
  type: "PROP",
180
181
  isDisabled: !1,
181
182
  placeholder: "Enter prop key",
182
183
  value: l,
183
- setValue: s,
184
+ setValue: n,
184
185
  onChange: (x) => {
185
186
  const g = h(x, "PROP");
186
- s(x), i !== g && c(""), u(g);
187
+ n(x), i !== g && c(""), u(g);
187
188
  },
188
- data: n,
189
+ data: s,
189
190
  dataType: i,
190
191
  appliedBindings: r
191
192
  }
192
193
  ),
193
194
  /* @__PURE__ */ e.jsx("div", { className: "h-2" }),
194
195
  /* @__PURE__ */ e.jsx(
195
- Le,
196
+ Oe,
196
197
  {
197
198
  type: "PATH",
198
199
  isDisabled: m(l),
@@ -209,7 +210,7 @@ const je = ({ data: r, fullView: o }) => {
209
210
  }
210
211
  )
211
212
  ] }),
212
- /* @__PURE__ */ e.jsx(ir, { children: /* @__PURE__ */ e.jsx(
213
+ /* @__PURE__ */ e.jsx(dr, { children: /* @__PURE__ */ e.jsx(
213
214
  B,
214
215
  {
215
216
  type: "submit",
@@ -220,76 +221,76 @@ const je = ({ data: r, fullView: o }) => {
220
221
  }
221
222
  ) })
222
223
  ] });
223
- }, ct = ({ disabled: r, children: o, onAddBinding: t, appliedBindings: a, editMode: l = !0, item: s = {} }) => {
224
+ }, pt = ({ disabled: r, children: o, onAddBinding: t, appliedBindings: a, editMode: l = !0, item: n = {} }) => {
224
225
  const [d, c] = w(!1);
225
- return /* @__PURE__ */ e.jsxs(dr, { children: [
226
- /* @__PURE__ */ e.jsx(cr, { disabled: r, asChild: !0, onClick: () => c(!0), children: o }),
227
- d && /* @__PURE__ */ e.jsx(pr, { children: /* @__PURE__ */ e.jsx(
228
- Qr,
226
+ return /* @__PURE__ */ e.jsxs(cr, { children: [
227
+ /* @__PURE__ */ e.jsx(pr, { disabled: r, asChild: !0, onClick: () => c(!0), children: o }),
228
+ d && /* @__PURE__ */ e.jsx(ur, { children: /* @__PURE__ */ e.jsx(
229
+ ts,
229
230
  {
230
- item: s,
231
+ item: n,
231
232
  editMode: l,
232
233
  appliedBindings: a,
233
- onAddBinding: (n) => {
234
- t(n), c(!1);
234
+ onAddBinding: (s) => {
235
+ t(s), c(!1);
235
236
  }
236
237
  }
237
238
  ) })
238
239
  ] });
239
- }, es = ({
240
+ }, rs = ({
240
241
  item: r,
241
242
  onAddBinding: o,
242
243
  onRemove: t,
243
244
  selectedBlock: a,
244
245
  dataProvider: l,
245
- appliedBindings: s
246
+ appliedBindings: n
246
247
  }) => {
247
- const [d, c] = w("string"), n = (p, h) => {
248
+ const [d, c] = w("string"), s = (p, h) => {
248
249
  if (m(p))
249
250
  return "";
250
251
  {
251
252
  const i = y(h === "PROP" ? a : l, p, "");
252
- if (ce(i))
253
+ if (pe(i))
253
254
  return "list";
254
255
  const u = typeof i;
255
256
  return u === "string" ? "text" : u === "object" ? "model" : u;
256
257
  }
257
258
  };
258
- return A(() => 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: [
259
+ return A(() => c(() => s(r.key, "PROP")), [r.key]), /* @__PURE__ */ e.jsxs("div", { className: "relative flex flex-col rounded-md border border-gray-200 p-2", children: [
259
260
  /* @__PURE__ */ e.jsx("div", { className: "text-sm font-normal text-gray-500", children: r.key }),
260
261
  /* @__PURE__ */ e.jsx("div", { className: "font-medium leading-5", children: r.value }),
261
262
  /* @__PURE__ */ e.jsx(je, { data: y(l, r.value, "") }),
262
263
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-end gap-x-2", children: [
263
- /* @__PURE__ */ e.jsx(ct, { editMode: !0, onAddBinding: o, appliedBindings: s, item: r, children: /* @__PURE__ */ e.jsx(Br, { className: "mt-1 h-6 w-6 cursor-pointer rounded border border-blue-400 p-1 text-blue-400 duration-200 hover:scale-105 hover:bg-blue-400 hover:text-white" }) }),
264
+ /* @__PURE__ */ e.jsx(pt, { editMode: !0, onAddBinding: o, appliedBindings: n, item: r, children: /* @__PURE__ */ e.jsx(Pr, { className: "mt-1 h-6 w-6 cursor-pointer rounded border border-blue-400 p-1 text-blue-400 duration-200 hover:scale-105 hover:bg-blue-400 hover:text-white" }) }),
264
265
  /* @__PURE__ */ e.jsx(
265
- Ir,
266
+ Ar,
266
267
  {
267
268
  onClick: () => t(),
268
269
  className: "mt-1 h-6 w-6 cursor-pointer rounded border border-red-400 p-1 text-red-400 duration-200 hover:scale-105 hover:bg-red-400 hover:text-white"
269
270
  }
270
271
  )
271
272
  ] }),
272
- !m(d) && !m(r.key) && /* @__PURE__ */ e.jsx("div", { className: "absolute right-0 top-1 mt-px flex h-4 items-center rounded-full px-2 text-[10px] font-medium text-purple-600", children: F(d) })
273
+ !m(d) && !m(r.key) && /* @__PURE__ */ e.jsx("div", { className: "absolute right-0 top-1 mt-px flex h-4 items-center rounded-full px-2 text-[10px] font-medium text-purple-600", children: X(d) })
273
274
  ] });
274
- }, ts = ({ bindingData: r, onChange: o }) => {
275
- const t = U(), [a] = tt(), l = Er(), [s, d] = w(
275
+ }, ss = ({ bindingData: r, onChange: o }) => {
276
+ const t = Z(), [a] = rt(), l = Lr(), [n, d] = w(
276
277
  _(r, (i, u) => ({ key: u, value: i }))
277
278
  );
278
279
  A(() => {
279
280
  d(_(r, (i, u) => ({ key: u, value: i })));
280
281
  }, [t == null ? void 0 : t._id, r]);
281
- const c = T(() => {
282
+ const c = S(() => {
282
283
  if (m(a))
283
284
  return !0;
284
- if (m(s))
285
+ if (m(n))
285
286
  return !1;
286
- const i = jt(s);
287
+ const i = Ct(n);
287
288
  return m(i == null ? void 0 : i.key) || m(i == null ? void 0 : i.value);
288
- }, [a, s]), n = (i) => {
289
- const u = ye(s, (x) => x.key !== i.key);
289
+ }, [a, n]), s = (i) => {
290
+ const u = ye(n, (x) => x.key !== i.key);
290
291
  d([...u, i]), h([...u, i]);
291
292
  }, p = (i) => {
292
- const u = ye(s, (x, g) => i !== g);
293
+ const u = ye(n, (x, g) => i !== g);
293
294
  h([...u]);
294
295
  }, h = H(
295
296
  (i = []) => {
@@ -299,7 +300,7 @@ const je = ({ data: r, fullView: o }) => {
299
300
  }
300
301
  const u = {};
301
302
  Ne(i, (x) => {
302
- !m(x == null ? void 0 : x.key) && !m(x == null ? void 0 : x.value) && We(u, x.key, x.value);
303
+ !m(x == null ? void 0 : x.key) && !m(x == null ? void 0 : x.value) && Ue(u, x.key, x.value);
303
304
  }), o(u);
304
305
  },
305
306
  [o]
@@ -309,25 +310,25 @@ const je = ({ data: r, fullView: o }) => {
309
310
  /* @__PURE__ */ e.jsx("br", {}),
310
311
  /* @__PURE__ */ e.jsx("a", { className: "text-blue-500", href: "https://chaibuilder.com/docs/registering-data-providers", target: "_blank", children: "Learn more" })
311
312
  ] }) }) : /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
312
- _(s, (i, u) => /* @__PURE__ */ e.jsx(
313
- es,
313
+ _(n, (i, u) => /* @__PURE__ */ e.jsx(
314
+ rs,
314
315
  {
315
316
  item: i,
316
- onAddBinding: n,
317
+ onAddBinding: s,
317
318
  onRemove: () => p(u),
318
319
  selectedBlock: t,
319
320
  dataProvider: a,
320
- appliedBindings: _(s, "key")
321
+ appliedBindings: _(n, "key")
321
322
  },
322
323
  i.key
323
324
  )),
324
325
  /* @__PURE__ */ e.jsxs($, { delayDuration: 200, children: [
325
326
  /* @__PURE__ */ e.jsx(E, { disabled: m(a), className: "w-full", children: /* @__PURE__ */ e.jsx(
326
- ct,
327
+ pt,
327
328
  {
328
329
  disabled: c,
329
- appliedBindings: _(s, "key"),
330
- onAddBinding: n,
330
+ appliedBindings: _(n, "key"),
331
+ onAddBinding: s,
331
332
  children: /* @__PURE__ */ e.jsx(
332
333
  "span",
333
334
  {
@@ -340,13 +341,13 @@ const je = ({ data: r, fullView: o }) => {
340
341
  c && /* @__PURE__ */ e.jsx(M, { sideOffset: -55, className: "text-[11px]", children: m(a) ? "No data provider has been set up for this page." : "Complete last added data binding to add more" })
341
342
  ] })
342
343
  ] });
343
- }, rs = () => /* @__PURE__ */ e.jsx("div", { className: "text-xs border rounded-sm p-1 mt-1 border-orange-500 text-orange-500 bg-orange-100", children: "Data binding is set for this field" }), ss = ({ id: r, placeholder: o, value: t }) => {
344
- const { t: a } = I(), [, l] = Fr(), s = U();
344
+ }, os = () => /* @__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" }), ls = ({ id: r, placeholder: o, value: t }) => {
345
+ const { t: a } = I(), [, l] = gr(), n = Z();
345
346
  if (typeof window > "u")
346
347
  return null;
347
348
  const d = () => {
348
- const c = s == null ? void 0 : s._id, n = r.replace("root.", "");
349
- l({ blockId: c, blockProp: n, placeholder: o, initialCode: t });
349
+ const c = n == null ? void 0 : n._id, s = r.replace("root.", "");
350
+ l({ blockId: c, blockProp: s, placeholder: o, initialCode: t });
350
351
  };
351
352
  return /* @__PURE__ */ e.jsxs("div", { className: "mt-2 flex flex-col gap-y-1", children: [
352
353
  /* @__PURE__ */ e.jsx(
@@ -359,18 +360,18 @@ const je = ({ data: r, fullView: o }) => {
359
360
  ),
360
361
  /* @__PURE__ */ e.jsx(B, { onClick: d, size: "sm", variant: "outline", className: "w-fit", children: a("Open code editor") })
361
362
  ] });
362
- }, Ce = bt(({ id: r, properties: o, formData: t, onChange: a }) => {
363
- const [l, s] = w(t), d = { type: "object", properties: {} }, c = {};
363
+ }, Ce = mt(({ id: r, properties: o, formData: t, onChange: a }) => {
364
+ const [l, n] = w(t), d = { type: "object", properties: {} }, c = {};
364
365
  Object.keys(o).forEach((p) => {
365
366
  const h = o[p];
366
- if (X(["slot", "styles"], h.type))
367
+ if (F(["slot", "styles"], h.type))
367
368
  return;
368
369
  const i = p;
369
- d.properties[i] = ur(h), c[i] = gr(h);
370
+ d.properties[i] = xr(h), c[i] = yr(h);
370
371
  }), A(() => {
371
- s(t);
372
+ n(t);
372
373
  }, [r]);
373
- const n = de(
374
+ const s = ce(
374
375
  async ({ formData: p }, h) => {
375
376
  a({ formData: p }, h);
376
377
  },
@@ -379,37 +380,37 @@ const je = ({ data: r, fullView: o }) => {
379
380
  // save only every 5 seconds
380
381
  );
381
382
  return /* @__PURE__ */ e.jsx(
382
- Yr,
383
+ Xr,
383
384
  {
384
385
  widgets: {
385
- binding: rs,
386
- richtext: xr,
387
- icon: yr,
388
- image: hr,
389
- code: ss
386
+ binding: os,
387
+ richtext: hr,
388
+ icon: br,
389
+ image: mr,
390
+ code: ls
390
391
  },
391
- fields: { link: br },
392
+ fields: { link: fr },
392
393
  idSeparator: ".",
393
394
  autoComplete: "off",
394
395
  omitExtraData: !1,
395
396
  liveOmit: !1,
396
397
  liveValidate: !1,
397
- validator: Xr,
398
+ validator: Zr,
398
399
  uiSchema: c,
399
400
  schema: d,
400
401
  formData: l,
401
402
  onChange: ({ formData: p }, h) => {
402
- h && (s(p), n({ formData: p }, h));
403
+ h && (n(p), s({ formData: p }, h));
403
404
  }
404
405
  }
405
406
  );
406
- }), os = () => {
407
- const [r, o] = Zr(), t = mr(), a = (d, c) => {
408
- o((n) => ({ ...n, [d]: c }));
407
+ }), as = () => {
408
+ const [r, o] = Wr(), t = vr(), a = (d, c) => {
409
+ o((s) => ({ ...s, [d]: c }));
409
410
  };
410
411
  if (m(t))
411
412
  return null;
412
- const { block: l, settings: s } = t;
413
+ const { block: l, settings: n } = t;
413
414
  return /* @__PURE__ */ e.jsxs("div", { className: "text-xs hover:no-underline", children: [
414
415
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2 bg-gray-100 px-4 py-2", children: [
415
416
  t.block._type,
@@ -421,20 +422,20 @@ const je = ({ data: r, fullView: o }) => {
421
422
  id: l == null ? void 0 : l._id,
422
423
  onChange: ({ formData: d }) => a(l._id, d),
423
424
  formData: y(r, l._id, {}),
424
- properties: s
425
+ properties: n
425
426
  }
426
427
  ) })
427
428
  ] });
428
429
  };
429
- function ls() {
430
- const r = U(), o = rt(), t = st(), a = Re(r._type), l = { ...r }, [s, d] = w(l), c = ot("dataBindingSupport", !1), n = ({ formData: x }, g, v) => {
431
- if (g && (s == null ? void 0 : s._id) === r._id) {
430
+ function ns() {
431
+ const r = Z(), o = st(), t = ot(), a = Re(r._type), l = { ...r }, [n, d] = w(l), c = lt("dataBindingSupport", !1), s = ({ formData: x }, g, v) => {
432
+ if (g && (n == null ? void 0 : n._id) === r._id) {
432
433
  const C = g.replace("root.", "");
433
434
  t([r._id], { [C]: y(x, C) }, v);
434
435
  }
435
436
  }, p = H(
436
- Ct(({ formData: x }, g, v) => {
437
- n({ formData: x }, g, v), d(x);
437
+ kt(({ formData: x }, g, v) => {
438
+ s({ formData: x }, g, v), d(x);
438
439
  }, 1500),
439
440
  [r == null ? void 0 : r._id]
440
441
  ), h = ({ formData: x }, g) => {
@@ -442,16 +443,16 @@ function ls() {
442
443
  const v = g.replace("root.", "");
443
444
  o(
444
445
  [r._id],
445
- fr(v, y(x, v.split(".")))
446
- ), p({ formData: x }, g, { [v]: y(s, v) });
446
+ wr(v, y(x, v.split(".")))
447
+ ), p({ formData: x }, g, { [v]: y(n, v) });
447
448
  }
448
- }, i = he(y(l, "_bindings", {})), u = T(() => {
449
- const x = kt(y(a, "props", {}));
450
- return c && Nt(i, (g) => delete x[g]), x;
449
+ }, i = he(y(l, "_bindings", {})), u = S(() => {
450
+ const x = Nt(y(a, "props", {}));
451
+ return c && _t(i, (g) => delete x[g]), x;
451
452
  }, [a, i, c]);
452
453
  return /* @__PURE__ */ e.jsxs("div", { className: "overflow-x-hidden", children: [
453
- /* @__PURE__ */ e.jsx(os, {}),
454
- c ? /* @__PURE__ */ e.jsxs(lt, { type: "multiple", defaultValue: ["STATIC", "BINDING"], className: "h-full w-full", children: [
454
+ /* @__PURE__ */ e.jsx(as, {}),
455
+ c ? /* @__PURE__ */ e.jsxs(at, { type: "multiple", defaultValue: ["STATIC", "BINDING"], className: "h-full w-full", children: [
455
456
  /* @__PURE__ */ e.jsxs(me, { value: "BINDING", children: [
456
457
  /* @__PURE__ */ e.jsx(fe, { className: "bg-gray-100 px-3 py-2 text-xs hover:no-underline", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
457
458
  /* @__PURE__ */ e.jsx(
@@ -463,11 +464,11 @@ function ls() {
463
464
  "Data Binding"
464
465
  ] }) }),
465
466
  /* @__PURE__ */ e.jsx(ve, { className: "px-4 pt-4", children: /* @__PURE__ */ e.jsx(
466
- ts,
467
+ ss,
467
468
  {
468
469
  bindingData: y(r, "_bindings", {}),
469
470
  onChange: (x) => {
470
- n({ formData: { _bindings: x } }, "root._bindings");
471
+ s({ formData: { _bindings: x } }, "root._bindings");
471
472
  }
472
473
  }
473
474
  ) })
@@ -507,28 +508,28 @@ function ls() {
507
508
  )
508
509
  ] });
509
510
  }
510
- const as = ({ blockId: r }) => {
511
- const { t: o } = I(), { askAi: t, loading: a, error: l } = vr(), [s, d] = w(""), c = mt(null);
511
+ const is = ({ blockId: r }) => {
512
+ const { t: o } = I(), { askAi: t, loading: a, error: l } = jr(), [n, d] = w(""), c = ft(null);
512
513
  A(() => {
513
514
  var p;
514
515
  (p = c.current) == null || p.focus();
515
516
  }, []);
516
- const n = () => {
517
+ const s = () => {
517
518
  l || d("");
518
519
  };
519
520
  return /* @__PURE__ */ e.jsxs("div", { className: "", children: [
520
521
  /* @__PURE__ */ e.jsx("h2", { className: "mb-1 text-sm font-semibold leading-none tracking-tight", children: o("Ask AI") }),
521
522
  /* @__PURE__ */ e.jsx(
522
- wr,
523
+ Cr,
523
524
  {
524
525
  ref: c,
525
- value: s,
526
+ value: n,
526
527
  onChange: (p) => d(p.target.value),
527
528
  placeholder: o("Ask AI to edit styles"),
528
529
  className: "w-full border border-gray-400 focus:border-0",
529
530
  rows: 3,
530
531
  onKeyDown: (p) => {
531
- p.key === "Enter" && (p.preventDefault(), t("styles", r, s, n));
532
+ p.key === "Enter" && (p.preventDefault(), t("styles", r, n, s));
532
533
  }
533
534
  }
534
535
  ),
@@ -536,20 +537,20 @@ const as = ({ blockId: r }) => {
536
537
  a ? null : /* @__PURE__ */ e.jsx(
537
538
  B,
538
539
  {
539
- disabled: s.trim().length < 5 || a,
540
- onClick: () => t("styles", r, s, n),
540
+ disabled: n.trim().length < 5 || a,
541
+ onClick: () => t("styles", r, n, s),
541
542
  variant: "default",
542
543
  className: "w-fit",
543
544
  size: "sm",
544
545
  children: a ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
545
- /* @__PURE__ */ e.jsx(Pr, { className: "w-5 h-5 animate-spin" }),
546
+ /* @__PURE__ */ e.jsx($r, { className: "w-5 h-5 animate-spin" }),
546
547
  o("Generating... Please wait")
547
548
  ] }) : o("Edit with AI")
548
549
  }
549
550
  ),
550
551
  a ? /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
551
- /* @__PURE__ */ e.jsxs(jr, { className: "flex items-center w-full px-4 py-1 pl-2 space-x-1", children: [
552
- /* @__PURE__ */ e.jsx(Cr, { className: "w-4 h-4 text-gray-500 animate-spin" }),
552
+ /* @__PURE__ */ e.jsxs(kr, { className: "flex items-center w-full px-4 py-1 pl-2 space-x-1", children: [
553
+ /* @__PURE__ */ e.jsx(Nr, { className: "w-4 h-4 text-gray-500 animate-spin" }),
553
554
  /* @__PURE__ */ e.jsx("p", { className: "text-xs", children: o("Generating... Please wait") })
554
555
  ] }),
555
556
  /* @__PURE__ */ e.jsx(B, { variant: "destructive", onClick: () => stop(), className: "hidden w-fit", size: "sm", children: o("Stop") })
@@ -557,32 +558,32 @@ const as = ({ blockId: r }) => {
557
558
  ] }),
558
559
  /* @__PURE__ */ e.jsx("div", { className: "max-w-full", children: l && /* @__PURE__ */ e.jsx("p", { className: "p-1 text-xs text-red-500 break-words bg-red-100 border border-red-500 rounded", children: l.message }) })
559
560
  ] });
560
- }, Oe = new Ur(Kr, {
561
+ }, ze = new Gr(Kr, {
561
562
  isCaseSensitive: !1,
562
563
  threshold: 0.2,
563
564
  minMatchCharLength: 2,
564
565
  keys: ["name"]
565
566
  });
566
- function pt() {
567
- var S;
568
- const { t: r } = I(), [o] = pe(), t = U(), a = Te(), l = at(), [s] = nt(), d = ot("askAiCallBack", null), [c, n] = w(""), { toast: p } = it(), h = (S = oe(o)) == null ? void 0 : S.prop, i = _t((y(t, h, "").replace(qr, "").split(",").pop() || "").split(" "), m), u = () => {
567
+ function ut() {
568
+ var T;
569
+ const { t: r } = I(), [o] = le(), t = Z(), a = Te(), l = nt(), [n] = it(), d = lt("askAiCallBack", null), [c, s] = w(""), { toast: p } = dt(), h = (T = oe(o)) == null ? void 0 : T.prop, i = St((y(t, h, "").replace(Jr, "").split(",").pop() || "").split(" "), m), u = () => {
569
570
  const j = c.trim().toLowerCase().replace(/ +(?= )/g, "").split(" ");
570
- a(s, j, !0), n("");
571
+ a(n, j, !0), s("");
571
572
  }, [x, g] = w([]), v = ({ value: j }) => {
572
- const D = j.trim().toLowerCase(), Z = D.match(/.+:/g);
573
+ const D = j.trim().toLowerCase(), W = D.match(/.+:/g);
573
574
  let b = [];
574
- if (Z && Z.length > 0) {
575
- const [f] = Z, N = D.replace(f, "");
576
- b = Oe.search(N).map((z) => ({
575
+ if (W && W.length > 0) {
576
+ const [f] = W, N = D.replace(f, "");
577
+ b = ze.search(N).map((z) => ({
577
578
  ...z,
578
579
  item: { ...z.item, name: f + z.item.name }
579
580
  }));
580
581
  } else
581
- b = Oe.search(D);
582
+ b = ze.search(D);
582
583
  return g(_(b, "item"));
583
584
  }, C = () => {
584
585
  g([]);
585
- }, K = (j) => j.name, L = (j) => /* @__PURE__ */ e.jsx("div", { className: "rounded-md p-1", children: j.name }), G = {
586
+ }, G = (j) => j.name, L = (j) => /* @__PURE__ */ e.jsx("div", { className: "rounded-md p-1", children: j.name }), K = {
586
587
  autoComplete: "off",
587
588
  autoCorrect: "off",
588
589
  autoCapitalize: "off",
@@ -592,7 +593,7 @@ function pt() {
592
593
  onKeyDown: (j) => {
593
594
  j.key === "Enter" && c.trim() !== "" && u();
594
595
  },
595
- onChange: (j, { newValue: D }) => n(D),
596
+ onChange: (j, { newValue: D }) => s(D),
596
597
  className: "w-full rounded-md text-xs px-2 hover:outline-0 bg-background border-border py-1"
597
598
  }, q = () => {
598
599
  if (navigator.clipboard === void 0) {
@@ -617,28 +618,28 @@ function pt() {
617
618
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
618
619
  /* @__PURE__ */ e.jsx("span", { children: r("Classes") }),
619
620
  /* @__PURE__ */ e.jsxs($, { children: [
620
- /* @__PURE__ */ e.jsx(E, { asChild: !0, children: /* @__PURE__ */ e.jsx(Dt, { onClick: q, className: "cursor-pointer" }) }),
621
+ /* @__PURE__ */ e.jsx(E, { asChild: !0, children: /* @__PURE__ */ e.jsx(Bt, { onClick: q, className: "cursor-pointer" }) }),
621
622
  /* @__PURE__ */ e.jsx(M, { children: /* @__PURE__ */ e.jsx("p", { children: r("Copy classes to clipboard") }) })
622
623
  ] })
623
624
  ] }),
624
- d ? /* @__PURE__ */ e.jsxs(Je, { children: [
625
- /* @__PURE__ */ e.jsx(Qe, { children: /* @__PURE__ */ e.jsxs(B, { variant: "default", className: "h-6 w-fit", size: "sm", children: [
626
- /* @__PURE__ */ e.jsx(Ar, { className: "h-4 w-4" }),
625
+ d ? /* @__PURE__ */ e.jsxs(Qe, { children: [
626
+ /* @__PURE__ */ e.jsx(et, { children: /* @__PURE__ */ e.jsxs(B, { variant: "default", className: "h-6 w-fit", size: "sm", children: [
627
+ /* @__PURE__ */ e.jsx(Er, { className: "h-4 w-4" }),
627
628
  /* @__PURE__ */ e.jsx("span", { className: "ml-2", children: r("Ask AI") })
628
629
  ] }) }),
629
- /* @__PURE__ */ e.jsx(et, { side: "left", className: "p-2", children: /* @__PURE__ */ e.jsx(as, { blockId: t == null ? void 0 : t._id }) })
630
+ /* @__PURE__ */ e.jsx(tt, { side: "left", className: "p-2", children: /* @__PURE__ */ e.jsx(is, { blockId: t == null ? void 0 : t._id }) })
630
631
  ] }) : null
631
632
  ] }),
632
633
  /* @__PURE__ */ e.jsxs("div", { className: "relative flex items-center gap-x-3", children: [
633
634
  /* @__PURE__ */ e.jsx("div", { className: "relative flex w-full items-center gap-x-3", children: /* @__PURE__ */ e.jsx(
634
- Wr,
635
+ Ur,
635
636
  {
636
637
  suggestions: x,
637
638
  onSuggestionsFetchRequested: v,
638
639
  onSuggestionsClearRequested: C,
639
- getSuggestionValue: K,
640
+ getSuggestionValue: G,
640
641
  renderSuggestion: L,
641
- inputProps: G,
642
+ inputProps: K,
642
643
  containerProps: {
643
644
  className: "relative h-8 w-full gap-y-1 py-1 border-gray-600"
644
645
  },
@@ -661,7 +662,7 @@ function pt() {
661
662
  }
662
663
  )
663
664
  ] }),
664
- /* @__PURE__ */ e.jsx("div", { className: "flex w-full flex-wrap gap-2 overflow-x-hidden", children: ne.Children.toArray(
665
+ /* @__PURE__ */ e.jsx("div", { className: "flex w-full flex-wrap gap-2 overflow-x-hidden", children: ie.Children.toArray(
665
666
  i.map((j) => /* @__PURE__ */ e.jsxs(
666
667
  "div",
667
668
  {
@@ -671,7 +672,7 @@ function pt() {
671
672
  /* @__PURE__ */ e.jsx(
672
673
  Ke,
673
674
  {
674
- onClick: () => l(s, [j]),
675
+ onClick: () => l(n, [j]),
675
676
  className: "invisible absolute right-1 rounded-full bg-red-400 hover:text-white group-hover:visible group-hover:cursor-pointer"
676
677
  }
677
678
  )
@@ -684,7 +685,7 @@ function pt() {
684
685
  }
685
686
  );
686
687
  }
687
- const ns = ({ onAdd: r }) => {
688
+ const ds = ({ onAdd: r }) => {
688
689
  const { t: o } = I(), [t, a] = w({ key: "", value: "" }), l = () => {
689
690
  m(t.key) || (r({ ...t, key: t.key }), a({ key: "", value: "" }));
690
691
  };
@@ -694,13 +695,13 @@ const ns = ({ onAdd: r }) => {
694
695
  {
695
696
  name: "key",
696
697
  className: "h-6",
697
- onChange: (s) => a({ ...t, key: s.target.value }),
698
+ onChange: (n) => a({ ...t, key: n.target.value }),
698
699
  value: t.key,
699
700
  placeholder: o("Name"),
700
701
  autoComplete: "off",
701
702
  autoCapitalize: "off",
702
- onKeyDown: (s) => {
703
- s.key === "Enter" && (s.preventDefault(), m(t.key) || l());
703
+ onKeyDown: (n) => {
704
+ n.key === "Enter" && (n.preventDefault(), m(t.key) || l());
704
705
  }
705
706
  }
706
707
  ),
@@ -709,13 +710,13 @@ const ns = ({ onAdd: r }) => {
709
710
  {
710
711
  className: "h-6",
711
712
  name: "value",
712
- onChange: (s) => a({ ...t, value: s.target.value }),
713
+ onChange: (n) => a({ ...t, value: n.target.value }),
713
714
  value: t.value,
714
715
  placeholder: o("Value"),
715
716
  autoComplete: "off",
716
717
  autoCapitalize: "off",
717
- onKeyDown: (s) => {
718
- s.key === "Enter" && (s.preventDefault(), m(t.key) || l());
718
+ onKeyDown: (n) => {
719
+ n.key === "Enter" && (n.preventDefault(), m(t.key) || l());
719
720
  }
720
721
  }
721
722
  ) }),
@@ -730,17 +731,17 @@ const ns = ({ onAdd: r }) => {
730
731
  m(t.key) ? null : /* @__PURE__ */ e.jsx(B, { variant: "ghost", onClick: () => a({ key: "", value: "" }), children: o("Cancel") })
731
732
  ] })
732
733
  ] });
733
- }, is = () => {
734
- const r = U(), [o, t] = w([]), [a] = pe(), l = rt(), s = st(), { t: d } = I(), { toast: c } = it(), n = `${y(a, "0.prop")}_attrs`;
735
- ne.useEffect(() => {
736
- const u = _(y(r, n), (x, g) => ({ key: g, value: x }));
734
+ }, cs = () => {
735
+ const r = Z(), [o, t] = w([]), [a] = le(), l = st(), n = ot(), { t: d } = I(), { toast: c } = dt(), s = `${y(a, "0.prop")}_attrs`;
736
+ ie.useEffect(() => {
737
+ const u = _(y(r, s), (x, g) => ({ key: g, value: x }));
737
738
  m(u) ? t([]) : t(u);
738
- }, [y(r, n)]);
739
+ }, [y(r, s)]);
739
740
  const p = (u) => {
740
741
  const x = ye(o, (g, v) => u !== v);
741
742
  i(x);
742
743
  }, h = (u) => {
743
- const x = Ze(o, { key: u.key });
744
+ const x = We(o, { key: u.key });
744
745
  if (x && (x.value.startsWith("dnd-") || x.value.startsWith("#dnd-"))) {
745
746
  c({
746
747
  title: d("Cannot add predefined attribute"),
@@ -751,28 +752,28 @@ const ns = ({ onAdd: r }) => {
751
752
  }
752
753
  const g = [...o, u];
753
754
  i(g);
754
- }, i = ne.useCallback(
755
+ }, i = ie.useCallback(
755
756
  (u = []) => {
756
757
  const x = {};
757
758
  Ne(u, (g) => {
758
- m(g.key) || We(x, g.key, g.value);
759
- }), s([y(r, "_id")], { [n]: x });
759
+ m(g.key) || Ue(x, g.key, g.value);
760
+ }), n([y(r, "_id")], { [s]: x });
760
761
  },
761
- [r, l, n]
762
+ [r, l, s]
762
763
  );
763
764
  return /* @__PURE__ */ e.jsx("div", { className: "mb-20 flex min-h-max flex-col gap-y-2 overflow-y-auto", children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col", children: [
764
765
  /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsxs("ul", { className: "overflow-hidden rounded-md bg-gray-100 text-xs text-gray-700", children: [
765
766
  m(o) ? /* @__PURE__ */ e.jsx("li", { className: "flex h-4 items-center justify-center", children: /* @__PURE__ */ e.jsx("p", { children: d("No attributes added") }) }) : null,
766
- ne.Children.toArray(
767
+ ie.Children.toArray(
767
768
  _(o, (u) => /* @__PURE__ */ e.jsxs("li", { className: "group flex w-full max-w-full items-center justify-between", children: [
768
769
  /* @__PURE__ */ e.jsxs($, { delayDuration: 1e3, children: [
769
770
  /* @__PURE__ */ e.jsx(E, { asChild: !0, children: /* @__PURE__ */ e.jsxs("div", { className: "max-w-[230px] cursor-default truncate px-1 hover:bg-gray-200", children: [
770
771
  u.key,
771
- u.value.trim() ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
772
+ u.value.toString().trim() ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
772
773
  " ",
773
774
  /* @__PURE__ */ e.jsx("span", { className: "font-bold text-orange-500", children: "=" }),
774
775
  " ",
775
- u.value.trim()
776
+ u.value.toString().trim()
776
777
  ] }) : null
777
778
  ] }) }),
778
779
  /* @__PURE__ */ e.jsxs(M, { className: "max-w-[200px]", children: [
@@ -784,7 +785,7 @@ const ns = ({ onAdd: r }) => {
784
785
  /* @__PURE__ */ e.jsxs("div", { children: [
785
786
  d("Value"),
786
787
  ": ",
787
- u.value
788
+ u.value.toString()
788
789
  ] })
789
790
  ] })
790
791
  ] }),
@@ -792,21 +793,21 @@ const ns = ({ onAdd: r }) => {
792
793
  /* @__PURE__ */ e.jsx(E, { asChild: !0, children: /* @__PURE__ */ e.jsx(
793
794
  "button",
794
795
  {
795
- disabled: W(u.value, "dnd-"),
796
+ disabled: U(u.value, "dnd-"),
796
797
  className: "invisible group-hover:visible",
797
798
  onClick: () => p(o.indexOf(u)),
798
- children: /* @__PURE__ */ e.jsx($r, { className: "w-4 text-gray-500" })
799
+ children: /* @__PURE__ */ e.jsx(Mr, { className: "w-4 text-gray-500" })
799
800
  }
800
801
  ) }),
801
- /* @__PURE__ */ e.jsx(M, { className: "max-w-[200px]", children: W(u.value, "dnd-") ? d("Predefined attribute. Cannot be deleted") : d("Remove attribute") })
802
+ /* @__PURE__ */ e.jsx(M, { className: "max-w-[200px]", children: U(u.value.toString(), "dnd-") ? d("Predefined attribute. Cannot be deleted") : d("Remove attribute") })
802
803
  ] })
803
804
  ] }))
804
805
  )
805
806
  ] }) }),
806
807
  /* @__PURE__ */ e.jsx("div", { className: "py-2" }),
807
- /* @__PURE__ */ e.jsx(ns, { onAdd: (u) => h(u) })
808
+ /* @__PURE__ */ e.jsx(ds, { onAdd: (u) => h(u) })
808
809
  ] }) });
809
- }, k = ["px", "%", "em", "rem", "ch", "vh", "vw"], ds = {
810
+ }, k = ["px", "%", "em", "rem", "ch", "vh", "vw"], ps = {
810
811
  heading: "flex.heading",
811
812
  items: [
812
813
  { type: "arbitrary", label: "flex.basis", units: k, property: "flexBasis" },
@@ -815,7 +816,7 @@ const ns = ({ onAdd: r }) => {
815
816
  { type: "dropdown", label: "flex.grow", property: "flexGrow" },
816
817
  { type: "dropdown", label: "flex.shrink", property: "flexShrink" }
817
818
  ]
818
- }, cs = {
819
+ }, us = {
819
820
  heading: "grid.heading",
820
821
  items: [
821
822
  { type: "range", label: "grid.col_span", property: "gridColSpan" },
@@ -826,11 +827,11 @@ const ns = ({ onAdd: r }) => {
826
827
  { type: "range", label: "grid.row_end", property: "gridRowEnd" },
827
828
  { type: "range", label: "grid.order", property: "order" }
828
829
  ]
829
- }, ps = [
830
+ }, gs = [
830
831
  {
831
832
  heading: "Styles",
832
833
  items: [
833
- { component: pt },
834
+ { component: ut },
834
835
  { type: "arbitrary", label: "layout.width", units: k.concat("auto"), property: "width" },
835
836
  { type: "arbitrary", label: "layout.height", units: k.concat("auto"), property: "height" },
836
837
  {
@@ -890,9 +891,9 @@ const ns = ({ onAdd: r }) => {
890
891
  },
891
892
  {
892
893
  heading: "Attributes",
893
- items: [{ component: is }]
894
+ items: [{ component: cs }]
894
895
  }
895
- ], Vo = [
896
+ ], Bo = [
896
897
  {
897
898
  heading: "layout.heading",
898
899
  items: [
@@ -1294,12 +1295,12 @@ const ns = ({ onAdd: r }) => {
1294
1295
  },
1295
1296
  {
1296
1297
  heading: "classes.heading",
1297
- items: [{ component: pt }]
1298
+ items: [{ component: ut }]
1298
1299
  }
1299
- ], ut = {
1300
+ ], gt = {
1300
1301
  "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" }) }),
1301
1302
  // visibility
1302
- visible: Bt,
1303
+ visible: It,
1303
1304
  invisible: Be,
1304
1305
  // display
1305
1306
  hidden: Be,
@@ -1335,10 +1336,10 @@ const ns = ({ onAdd: r }) => {
1335
1336
  borderRadiusRight: Q,
1336
1337
  borderRadiusBottom: ee,
1337
1338
  borderRadiusLeft: te,
1338
- borderRadiusTopLeft: It,
1339
- borderRadiusTopRight: Pt,
1340
- borderRadiusBottomRight: At,
1341
- borderRadiusBottomLeft: $t,
1339
+ borderRadiusTopLeft: Pt,
1340
+ borderRadiusTopRight: At,
1341
+ borderRadiusBottomRight: $t,
1342
+ borderRadiusBottomLeft: Et,
1342
1343
  divideXWidth: R,
1343
1344
  divideYWidth: V,
1344
1345
  scale: Y,
@@ -1365,18 +1366,18 @@ const ns = ({ onAdd: r }) => {
1365
1366
  marginBottom: ee,
1366
1367
  marginLeft: te,
1367
1368
  // text-align
1368
- textLeft: Et,
1369
- textCenter: Mt,
1370
- textRight: Lt,
1371
- textJustify: Ot,
1369
+ textLeft: Mt,
1370
+ textCenter: Lt,
1371
+ textRight: Ot,
1372
+ textJustify: zt,
1372
1373
  // font style
1373
- italic: zt,
1374
+ italic: Yt,
1374
1375
  // "not-italic": "",
1375
1376
  // decoration
1376
- underline: Yt,
1377
+ underline: Ft,
1377
1378
  overline: Xt,
1378
1379
  // transform
1379
- uppercase: Ft,
1380
+ uppercase: Zt,
1380
1381
  block: () => /* @__PURE__ */ e.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
1381
1382
  /* @__PURE__ */ e.jsx(
1382
1383
  "path",
@@ -1489,14 +1490,14 @@ const ns = ({ onAdd: r }) => {
1489
1490
  }
1490
1491
  )
1491
1492
  ] }),
1492
- static: Zt
1493
- }, le = Fe({ canReset: !1, canChange: !0 }), us = ({ children: r, canReset: o = !1, canChange: t = !0 }) => (
1493
+ static: Wt
1494
+ }, ae = Ze({ canReset: !1, canChange: !0 }), xs = ({ children: r, canReset: o = !1, canChange: t = !0 }) => (
1494
1495
  // eslint-disable-next-line react/jsx-no-constructed-context-values
1495
- /* @__PURE__ */ e.jsx(le.Provider, { value: { canReset: o, canChange: t }, children: r })
1496
- ), gt = ({ label: r, property: o, onChange: t }) => {
1497
- const a = T(() => y(ge, `${o}.classes`, [""]), [o]), l = ae(o), s = T(() => y(l, "cls", ""), [l]), { canChange: d } = se(le), c = /\[.*\]/g.test(s);
1496
+ /* @__PURE__ */ e.jsx(ae.Provider, { value: { canReset: o, canChange: t }, children: r })
1497
+ ), xt = ({ label: r, property: o, onChange: t }) => {
1498
+ const a = S(() => y(ge, `${o}.classes`, [""]), [o]), l = ne(o), n = S(() => y(l, "cls", ""), [l]), { canChange: d } = se(ae), c = /\[.*\]/g.test(n);
1498
1499
  return /* @__PURE__ */ e.jsx("div", { className: r ? "w-full rounded" : "grow", children: c ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
1499
- /* @__PURE__ */ e.jsx(we, { className: "w-[70%] rounded py-1", readOnly: !0, value: s }),
1500
+ /* @__PURE__ */ e.jsx(we, { className: "w-[70%] rounded py-1", readOnly: !0, value: n }),
1500
1501
  /* @__PURE__ */ e.jsxs($, { delayDuration: 100, children: [
1501
1502
  /* @__PURE__ */ e.jsx(E, { asChild: !0, children: /* @__PURE__ */ e.jsx("button", { type: "button", className: "invisible ml-3 mt-1 text-blue-600 group-hover:visible", children: /* @__PURE__ */ e.jsx(Se, {}) }) }),
1502
1503
  /* @__PURE__ */ e.jsx(M, { children: "Current value is using a Tailwind arbitrary value." })
@@ -1505,37 +1506,37 @@ const ns = ({ onAdd: r }) => {
1505
1506
  ke,
1506
1507
  {
1507
1508
  rounded: r,
1508
- onChange: (n) => t(n, o),
1509
- selected: s,
1509
+ onChange: (s) => t(s, o),
1510
+ selected: n,
1510
1511
  options: a,
1511
1512
  disabled: !d
1512
1513
  }
1513
1514
  ) });
1514
1515
  };
1515
1516
  function ke({ selected: r, onChange: o, rounded: t = !1, options: a, disabled: l = !1 }) {
1516
- const s = r.replace(/.*:/g, "").trim(), { undo: d, redo: c } = kr();
1517
+ const n = r.replace(/.*:/g, "").trim(), { undo: d, redo: c } = _r();
1517
1518
  return /* @__PURE__ */ e.jsxs(
1518
1519
  "select",
1519
1520
  {
1520
1521
  disabled: !a.length || l,
1521
1522
  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`,
1522
- onChange: (n) => o(n.target.value),
1523
- onKeyDown: (n) => {
1524
- n.ctrlKey && (n.key === "z" && d(), n.key === "y" && c());
1523
+ onChange: (s) => o(s.target.value),
1524
+ onKeyDown: (s) => {
1525
+ s.ctrlKey && (s.key === "z" && d(), s.key === "y" && c());
1525
1526
  },
1526
- value: s,
1527
+ value: n,
1527
1528
  children: [
1528
1529
  /* @__PURE__ */ e.jsx("option", { className: "bg-transparent", value: "" }),
1529
1530
  P.Children.toArray(
1530
- a.map((n) => /* @__PURE__ */ e.jsx("option", { className: "bg-transparent", value: n, children: n }))
1531
+ a.map((s) => /* @__PURE__ */ e.jsx("option", { className: "bg-transparent", value: s, children: s }))
1531
1532
  )
1532
1533
  ]
1533
1534
  }
1534
1535
  );
1535
1536
  }
1536
- const gs = ({ property: r, onChange: o }) => {
1537
- const { canReset: t, canChange: a } = se(le), l = ae(r), s = T(() => y(l, "cls", ""), [l]), d = T(() => y(ge, `${r}.classes`, [""]), [r]), c = d.indexOf(s) > -1 ? d.indexOf(s) : 0, n = /\[.*\]/g.test(s);
1538
- 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: s }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1537
+ const ys = ({ property: r, onChange: o }) => {
1538
+ const { canReset: t, canChange: a } = se(ae), l = ne(r), n = S(() => y(l, "cls", ""), [l]), d = S(() => y(ge, `${r}.classes`, [""]), [r]), c = d.indexOf(n) > -1 ? d.indexOf(n) : 0, s = /\[.*\]/g.test(n);
1539
+ return /* @__PURE__ */ e.jsx("div", { className: "flex flex-row divide-x divide-solid divide-border rounded border border-border text-xs", children: s ? /* @__PURE__ */ e.jsx("div", { className: "py-[5px] px-2", children: n }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1539
1540
  /* @__PURE__ */ e.jsx(
1540
1541
  "button",
1541
1542
  {
@@ -1544,14 +1545,14 @@ const gs = ({ property: r, onChange: o }) => {
1544
1545
  disabled: !a && (!t || c - 1 < 0),
1545
1546
  onClick: () => o(He(d, c - 1), r),
1546
1547
  children: /* @__PURE__ */ e.jsx("span", { className: "flex items-center justify-center", children: /* @__PURE__ */ e.jsx(
1547
- Wt,
1548
+ Ut,
1548
1549
  {
1549
1550
  className: !a && (!t || c - 1 < 0) ? "text-gray-500" : "text-black/60 dark:text-white/60"
1550
1551
  }
1551
1552
  ) })
1552
1553
  }
1553
1554
  ),
1554
- /* @__PURE__ */ e.jsx("div", { className: "w-8/12 text-center", children: /* @__PURE__ */ e.jsx(gt, { label: !1, property: r, onChange: o }) }),
1555
+ /* @__PURE__ */ e.jsx("div", { className: "w-8/12 text-center", children: /* @__PURE__ */ e.jsx(xt, { label: !1, property: r, onChange: o }) }),
1555
1556
  /* @__PURE__ */ e.jsx(
1556
1557
  "button",
1557
1558
  {
@@ -1568,8 +1569,8 @@ const gs = ({ property: r, onChange: o }) => {
1568
1569
  }
1569
1570
  )
1570
1571
  ] }) });
1571
- }, xs = ({ property: r, onChange: o }) => {
1572
- const t = T(() => y(ge, `${r}.classes`, [""]), [r]), { canChange: a } = se(le), l = ae(r), s = T(() => y(l, "cls", ""), [l]);
1572
+ }, hs = ({ property: r, onChange: o }) => {
1573
+ const t = S(() => y(ge, `${r}.classes`, [""]), [r]), { canChange: a } = se(ae), l = ne(r), n = S(() => y(l, "cls", ""), [l]);
1573
1574
  return /* @__PURE__ */ e.jsx("div", { className: "flex grow flex-wrap gap-1", children: _(t, (d) => /* @__PURE__ */ e.jsxs($, { children: [
1574
1575
  /* @__PURE__ */ e.jsx(E, { asChild: !0, children: /* @__PURE__ */ e.jsx(
1575
1576
  "button",
@@ -1577,13 +1578,13 @@ const gs = ({ property: r, onChange: o }) => {
1577
1578
  type: "button",
1578
1579
  disabled: !a,
1579
1580
  onClick: () => o(d, r),
1580
- className: `cursor-pointer rounded border border-gray-600 p-1 disabled:cursor-not-allowed ${s === d ? " bg-blue-500 text-white" : "disabled:bg-gray-600 disabled:text-gray-400"}`,
1581
- children: P.createElement(y(ut, d, Ge))
1581
+ className: `cursor-pointer rounded border border-gray-600 p-1 disabled:cursor-not-allowed ${n === d ? " bg-blue-500 text-white" : "disabled:bg-gray-600 disabled:text-gray-400"}`,
1582
+ children: P.createElement(y(gt, d, qe))
1582
1583
  }
1583
1584
  ) }),
1584
- /* @__PURE__ */ e.jsx(M, { children: F(re(d)) })
1585
+ /* @__PURE__ */ e.jsx(M, { children: X(re(d)) })
1585
1586
  ] })) });
1586
- }, ys = {
1587
+ }, bs = {
1587
1588
  backgroundColor: "bg",
1588
1589
  textColor: "text",
1589
1590
  borderColor: "border",
@@ -1595,13 +1596,13 @@ const gs = ({ property: r, onChange: o }) => {
1595
1596
  toColor: "to",
1596
1597
  ringColor: "ring",
1597
1598
  ringOffsetColor: "ring-offset"
1598
- }, hs = ({ property: r, onChange: o }) => {
1599
- const t = ae(r), a = T(() => y(t, "cls", ""), [t]), { canChange: l } = se(le), [s, d] = w([]), [c, n] = w({ color: "", shade: "" }), p = a.split("-"), h = y(p, "1", ""), i = y(p, "2", ""), u = H(
1599
+ }, ms = ({ property: r, onChange: o }) => {
1600
+ const t = ne(r), a = S(() => y(t, "cls", ""), [t]), { canChange: l } = se(ae), [n, d] = w([]), [c, s] = w({ color: "", shade: "" }), p = a.split("-"), h = y(p, "1", ""), i = y(p, "2", ""), u = H(
1600
1601
  // eslint-disable-next-line no-shadow
1601
1602
  (g) => {
1602
- ["current", "inherit", "transparent", "black", "white"].includes(g) ? (d([]), n({ color: g })) : (d(["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"]), n((v) => ({ ...v, color: g, shade: v.shade ? v.shade : "500" })));
1603
+ ["current", "inherit", "transparent", "black", "white"].includes(g) ? (d([]), s({ color: g })) : (d(["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"]), s((v) => ({ ...v, color: g, shade: v.shade ? v.shade : "500" })));
1603
1604
  },
1604
- [d, n]
1605
+ [d, s]
1605
1606
  );
1606
1607
  A(() => {
1607
1608
  if (["current", "inherit", "transparent", "black", "white"].includes(h))
@@ -1611,14 +1612,14 @@ const gs = ({ property: r, onChange: o }) => {
1611
1612
  const x = H(
1612
1613
  // eslint-disable-next-line no-shadow
1613
1614
  (g) => {
1614
- n({ color: h, shade: g });
1615
+ s({ color: h, shade: g });
1615
1616
  },
1616
1617
  [h]
1617
1618
  );
1618
1619
  return A(() => {
1619
- n({ color: "", shade: "" });
1620
+ s({ color: "", shade: "" });
1620
1621
  }, [t]), A(() => {
1621
- const v = `${y(ys, r, "")}-${c.color}${c.shade ? `-${c.shade}` : ""}`;
1622
+ const v = `${y(bs, r, "")}-${c.color}${c.shade ? `-${c.shade}` : ""}`;
1622
1623
  v.match(new RegExp(y(ge, `${r}.regExp`, ""))) && o(v, r);
1623
1624
  }, [c, o, r]), /* @__PURE__ */ e.jsxs("div", { className: "flex flex-row divide-x divide-solid divide-border rounded-lg border border-border text-xs", children: [
1624
1625
  /* @__PURE__ */ e.jsx("div", { className: "grow text-center", children: /* @__PURE__ */ e.jsx(
@@ -1660,19 +1661,19 @@ const gs = ({ property: r, onChange: o }) => {
1660
1661
  ]
1661
1662
  }
1662
1663
  ) }),
1663
- /* @__PURE__ */ e.jsx("button", { type: "button", className: "grow text-center", children: /* @__PURE__ */ e.jsx(ke, { rounded: !0, selected: i, disabled: !h || !l, onChange: x, options: s }) })
1664
+ /* @__PURE__ */ e.jsx("button", { type: "button", className: "grow text-center", children: /* @__PURE__ */ e.jsx(ke, { rounded: !0, selected: i, disabled: !h || !l, onChange: x, options: n }) })
1664
1665
  ] });
1665
- }, ze = (r, o) => {
1666
+ }, Ye = (r, o) => {
1666
1667
  r = r.toLowerCase();
1667
1668
  let t = r.trim().replace(/ |\+/g, "");
1668
1669
  if ((t === "auto" || t === "none") && o.includes(t))
1669
1670
  return { value: "", unit: t };
1670
1671
  const a = o.length ? new RegExp(o.join("|"), "g") : /XXXXXX/g;
1671
1672
  t = t.replace(a, "");
1672
- const l = r.match(a), s = l && l.length > 1, d = !m(t) && Number.isNaN(Number(t));
1673
- return s || d ? { error: "Invalid value" } : l && (l[0] === "auto" || l[0] === "none") ? { value: l[0], unit: "" } : { value: t, unit: l ? l[0] : "" };
1673
+ const l = r.match(a), n = l && l.length > 1, d = !m(t) && Number.isNaN(Number(t));
1674
+ return n || d ? { error: "Invalid value" } : l && (l[0] === "auto" || l[0] === "none") ? { value: l[0], unit: "" } : { value: t, unit: l ? l[0] : "" };
1674
1675
  };
1675
- const bs = (r) => {
1676
+ const fs = (r) => {
1676
1677
  const o = r.startsWith("-") ? "-" : "", t = r.split("-").pop();
1677
1678
  if (["auto", "none"].includes(t))
1678
1679
  return { value: "", unit: t };
@@ -1682,26 +1683,26 @@ const bs = (r) => {
1682
1683
  return { value: "100", unit: r.indexOf("w-") !== -1 ? "vw" : "vh" };
1683
1684
  if (t === "full")
1684
1685
  return { value: "100", unit: "%" };
1685
- if (X(r, "skew-"))
1686
+ if (F(r, "skew-"))
1686
1687
  return { value: `${o}${t}`, unit: "deg" };
1687
- if (X(r, "rotate-"))
1688
+ if (F(r, "rotate-"))
1688
1689
  return { value: `${o}${t}`, unit: "deg" };
1689
- if (X(r, "opacity-"))
1690
+ if (F(r, "opacity-"))
1690
1691
  return { value: `${t / 100}`, unit: "-" };
1691
- if (X(r, "duration-") || X(r, "delay-"))
1692
+ if (F(r, "duration-") || F(r, "delay-"))
1692
1693
  return { value: `${t}`, unit: "ms" };
1693
- if (X(r, "translate-") && !t.includes("/"))
1694
+ if (F(r, "translate-") && !t.includes("/"))
1694
1695
  return { value: `${o}${`${t / 4}`}`, unit: "rem" };
1695
- if (X(r, "scale-"))
1696
+ if (F(r, "scale-"))
1696
1697
  return { value: `${o}${`${t / 100}`}`, unit: "-" };
1697
- if (W(r, "border")) {
1698
+ if (U(r, "border")) {
1698
1699
  const a = r.match(/border-?(x|y|t|r|b|l)?\d+/g);
1699
1700
  if (a)
1700
1701
  return { value: a[0].split("-").pop(), unit: "px" };
1701
1702
  if (r.match(/border-?(x|y|t|r|b|l)?/g))
1702
1703
  return { value: "1", unit: "px" };
1703
1704
  }
1704
- if (W(r, "max-w-")) {
1705
+ if (U(r, "max-w-")) {
1705
1706
  if (r === "max-w-screen-sm")
1706
1707
  return { value: "640", unit: "px" };
1707
1708
  if (r === "max-w-screen-md")
@@ -1737,7 +1738,7 @@ const bs = (r) => {
1737
1738
  if (t === "prose")
1738
1739
  return { value: "65", unit: "ch" };
1739
1740
  }
1740
- if (W(r, "text-")) {
1741
+ if (U(r, "text-")) {
1741
1742
  if (t === "xs")
1742
1743
  return { value: "12", unit: "px" };
1743
1744
  if (t === "sm")
@@ -1765,7 +1766,7 @@ const bs = (r) => {
1765
1766
  if (t === "9xl")
1766
1767
  return { value: "128", unit: "px" };
1767
1768
  }
1768
- if (W(r, "leading-")) {
1769
+ if (U(r, "leading-")) {
1769
1770
  if (t === "none")
1770
1771
  return { value: "1", unit: "-" };
1771
1772
  if (t === "tight")
@@ -1779,7 +1780,7 @@ const bs = (r) => {
1779
1780
  if (t === "loose")
1780
1781
  return { value: "2", unit: "-" };
1781
1782
  }
1782
- if (W(r, "tracking-")) {
1783
+ if (U(r, "tracking-")) {
1783
1784
  if (t === "tighter")
1784
1785
  return { value: "-0.05", unit: "em" };
1785
1786
  if (t === "tight")
@@ -1796,55 +1797,55 @@ const bs = (r) => {
1796
1797
  if (["max", "min", "fit"].includes(t))
1797
1798
  return { value: r, unit: "class" };
1798
1799
  if (t.includes("/")) {
1799
- const [a, l] = _(t.split("/"), (s) => parseInt(s, 10));
1800
+ const [a, l] = _(t.split("/"), (n) => parseInt(n, 10));
1800
1801
  return { value: o + (a / l * 100).toFixed(2).replace(".00", ""), unit: "%" };
1801
1802
  }
1802
- return St(parseFloat(t)) ? { value: `${o + parseFloat(t) * 4}`, unit: "px" } : { value: t, unit: "class" };
1803
+ return Tt(parseFloat(t)) ? { value: `${o + parseFloat(t) * 4}`, unit: "px" } : { value: t, unit: "class" };
1803
1804
  };
1804
- const ms = (r) => {
1805
+ const vs = (r) => {
1805
1806
  if (m(r))
1806
1807
  return { value: "", unit: "" };
1807
1808
  const o = r.match(/\[.*\]/g);
1808
1809
  if (o === null)
1809
- return fs(r);
1810
+ return ws(r);
1810
1811
  const t = y(o, "0", "").replace(/\[|\]/g, ""), a = r.startsWith("-") ? "-" : "", l = oe(t.match(/\d+.\d+|\d+/g));
1811
1812
  return { value: `${a}${l}`, unit: t.replace(l, "") };
1812
- }, fs = (r) => m(r) ? { value: "", unit: "" } : bs(r), xt = P.createContext({
1813
+ }, ws = (r) => m(r) ? { value: "", unit: "" } : fs(r), yt = P.createContext({
1813
1814
  setDragData: () => {
1814
1815
  }
1815
- }), vs = ({
1816
+ }), js = ({
1816
1817
  unit: r,
1817
1818
  currentValue: o,
1818
1819
  onDrag: t,
1819
1820
  onDragEnd: a,
1820
1821
  onDragStart: l,
1821
- negative: s,
1822
+ negative: n,
1822
1823
  cssProperty: d
1823
1824
  }) => {
1824
- const { setDragData: c } = se(xt);
1825
+ const { setDragData: c } = se(yt);
1825
1826
  return /* @__PURE__ */ e.jsx(
1826
1827
  "button",
1827
1828
  {
1828
1829
  type: "button",
1829
- onMouseDown: (n) => {
1830
+ onMouseDown: (s) => {
1830
1831
  const p = {
1831
1832
  onDrag: t,
1832
1833
  onDragEnd: a,
1833
1834
  dragging: !0,
1834
- dragStartY: n.pageY,
1835
+ dragStartY: s.pageY,
1835
1836
  dragStartValue: `${o}`,
1836
1837
  dragUnit: r,
1837
- negative: s,
1838
+ negative: n,
1838
1839
  cssProperty: d
1839
1840
  };
1840
1841
  l(p), c(p);
1841
1842
  },
1842
1843
  color: void 0,
1843
1844
  className: "relative z-50 ml-1 hidden h-6 cursor-row-resize rounded bg-background/70 px-2 group-hover:inline",
1844
- children: /* @__PURE__ */ e.jsx(Ut, {})
1845
+ children: /* @__PURE__ */ e.jsx(Gt, {})
1845
1846
  }
1846
1847
  );
1847
- }, ws = ({ onSelect: r, current: o, units: t }) => /* @__PURE__ */ e.jsx("div", { "data-theme": "light", className: "-m-[7px] -mx-[13px] flex w-9 flex-col", children: t.map((a) => /* @__PURE__ */ e.jsx(
1848
+ }, Cs = ({ onSelect: r, current: o, units: t }) => /* @__PURE__ */ e.jsx("div", { "data-theme": "light", className: "-m-[7px] -mx-[13px] flex w-9 flex-col", children: t.map((a) => /* @__PURE__ */ e.jsx(
1848
1849
  B,
1849
1850
  {
1850
1851
  className: "h-max rounded-none px-1 py-1 text-right text-[11px] hover:bg-blue-400",
@@ -1856,59 +1857,59 @@ const ms = (r) => {
1856
1857
  children: a
1857
1858
  },
1858
1859
  a
1859
- )) }), Ye = 50, js = (r) => {
1860
- const [o, t] = w(!1), [a, l] = w(""), { currentClass: s, onChange: d, classPrefix: c, cssProperty: n, units: p, negative: h } = r, [i, u] = w(n != null && n.toLowerCase().includes("width") ? "%" : p[0]), [x, g] = w(!1), [v, C] = w(""), [K, L] = w(!1), [G, q] = w(!1);
1860
+ )) }), Fe = 50, ks = (r) => {
1861
+ const [o, t] = w(!1), [a, l] = w(""), { currentClass: n, onChange: d, classPrefix: c, cssProperty: s, units: p, negative: h } = r, [i, u] = w(s != null && s.toLowerCase().includes("width") ? "%" : p[0]), [x, g] = w(!1), [v, C] = w(""), [G, L] = w(!1), [K, q] = w(!1);
1861
1862
  A(() => {
1862
- const { value: b, unit: f } = ms(s);
1863
+ const { value: b, unit: f } = vs(n);
1863
1864
  if (f === "") {
1864
- l(b), u(n != null && n.toLowerCase().includes("width") ? "%" : oe(p));
1865
+ l(b), u(s != null && s.toLowerCase().includes("width") ? "%" : oe(p));
1865
1866
  return;
1866
1867
  }
1867
1868
  u(f), l(f === "class" || m(b) ? "" : b);
1868
- }, [s, n, p]);
1869
- const S = de((b) => d(b), [d], Ye), j = de((b) => d(b, !1), [d], Ye), D = H(
1869
+ }, [n, s, p]);
1870
+ const T = ce((b) => d(b), [d], Fe), j = ce((b) => d(b, !1), [d], Fe), D = H(
1870
1871
  (b = !1) => {
1871
- const f = ze(`${a}`, p);
1872
+ const f = Ye(`${a}`, p);
1872
1873
  if (y(f, "error", !1)) {
1873
1874
  g(!0);
1874
1875
  return;
1875
1876
  }
1876
1877
  const N = y(f, "unit") !== "" ? y(f, "unit") : i;
1877
1878
  if (N === "auto" || N === "none") {
1878
- S(`${c}${N}`);
1879
+ T(`${c}${N}`);
1879
1880
  return;
1880
1881
  }
1881
1882
  if (y(f, "value") === "")
1882
1883
  return;
1883
1884
  const z = `${y(f, "value", "").startsWith("-") ? "-" : ""}${c}[${y(f, "value", "").replace("-", "")}${N === "-" ? "" : N}]`;
1884
- b ? j(z) : S(z);
1885
+ b ? j(z) : T(z);
1885
1886
  },
1886
- [S, j, a, i, c, p]
1887
- ), Z = H(
1887
+ [T, j, a, i, c, p]
1888
+ ), W = H(
1888
1889
  (b) => {
1889
- const f = ze(`${a}`, p);
1890
+ const f = Ye(`${a}`, p);
1890
1891
  if (y(f, "error", !1)) {
1891
1892
  g(!0);
1892
1893
  return;
1893
1894
  }
1894
1895
  if (b === "auto" || b === "none") {
1895
- S(`${c}${b}`);
1896
+ T(`${c}${b}`);
1896
1897
  return;
1897
1898
  }
1898
1899
  if (y(f, "value") === "")
1899
1900
  return;
1900
1901
  const N = y(f, "unit") !== "" ? y(f, "unit") : b, z = `${y(f, "value", "").startsWith("-") ? "-" : ""}${c}[${y(f, "value", "").replace("-", "")}${N === "-" ? "" : N}]`;
1901
- S(z);
1902
+ T(z);
1902
1903
  },
1903
- [S, a, c, p]
1904
+ [T, a, c, p]
1904
1905
  );
1905
1906
  return /* @__PURE__ */ e.jsx("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-start", children: i === "class" ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1906
- /* @__PURE__ */ e.jsx("input", { className: "w-20 rounded py-1", readOnly: !0, value: s }),
1907
+ /* @__PURE__ */ e.jsx("input", { className: "w-20 rounded py-1", readOnly: !0, value: n }),
1907
1908
  /* @__PURE__ */ e.jsxs($, { children: [
1908
1909
  /* @__PURE__ */ e.jsx(E, { asChild: !0, children: /* @__PURE__ */ e.jsx("button", { type: "button", className: "invisible ml-3 mt-1 text-blue-600 group-hover:visible", children: /* @__PURE__ */ e.jsx(Se, {}) }) }),
1909
1910
  /* @__PURE__ */ e.jsx(M, { children: "Current value is using a Tailwind preset class." })
1910
1911
  ] })
1911
- ] }) : /* @__PURE__ */ e.jsxs("div", { className: `group relative flex items-center ${K ? "z-auto" : ""}`, children: [
1912
+ ] }) : /* @__PURE__ */ e.jsxs("div", { className: `group relative flex items-center ${G ? "z-auto" : ""}`, children: [
1912
1913
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center rounded-md border border-border", children: [
1913
1914
  ["none", "auto"].indexOf(i) !== -1 ? null : /* @__PURE__ */ e.jsx(
1914
1915
  "input",
@@ -1921,14 +1922,14 @@ const ms = (r) => {
1921
1922
  if (b.keyCode !== 38 && b.keyCode !== 40)
1922
1923
  return;
1923
1924
  b.preventDefault(), q(!0);
1924
- const f = Tt(b.target.value);
1925
- let N = Ue(f) ? 0 : f;
1925
+ const f = Rt(b.target.value);
1926
+ let N = Ge(f) ? 0 : f;
1926
1927
  b.keyCode === 38 && (N += 1), b.keyCode === 40 && (N -= 1);
1927
- const O = `${N}`, ht = `${O.startsWith("-") ? "-" : ""}${c}[${O.replace("-", "")}${i === "-" ? "" : i}]`;
1928
- j(ht);
1928
+ const O = `${N}`, bt = `${O.startsWith("-") ? "-" : ""}${c}[${O.replace("-", "")}${i === "-" ? "" : i}]`;
1929
+ j(bt);
1929
1930
  },
1930
1931
  onKeyUp: (b) => {
1931
- G && (b.preventDefault(), q(!1));
1932
+ K && (b.preventDefault(), q(!1));
1932
1933
  },
1933
1934
  onBlur: () => D(),
1934
1935
  onChange: (b) => {
@@ -1938,7 +1939,7 @@ const ms = (r) => {
1938
1939
  var f;
1939
1940
  (f = b == null ? void 0 : b.target) == null || f.select(), t(!1);
1940
1941
  },
1941
- value: K ? v : a,
1942
+ value: G ? v : a,
1942
1943
  className: "h-6 w-14 rounded rounded-r-none bg-background pl-2 text-sm focus-visible:outline-0 ".concat(
1943
1944
  " ",
1944
1945
  x ? "border-red-500 text-red-500" : "border-foreground/20"
@@ -1958,27 +1959,27 @@ const ms = (r) => {
1958
1959
  ]
1959
1960
  }
1960
1961
  ) }),
1961
- /* @__PURE__ */ e.jsx(Nr, { children: /* @__PURE__ */ e.jsx(M, { className: "bg-background", children: /* @__PURE__ */ e.jsx(
1962
- ws,
1962
+ /* @__PURE__ */ e.jsx(Sr, { children: /* @__PURE__ */ e.jsx(M, { className: "bg-background", children: /* @__PURE__ */ e.jsx(
1963
+ Cs,
1963
1964
  {
1964
1965
  units: p,
1965
1966
  current: i,
1966
1967
  onSelect: (b) => {
1967
- t(!1), u(b), Z(b);
1968
+ t(!1), u(b), W(b);
1968
1969
  }
1969
1970
  }
1970
1971
  ) }) })
1971
1972
  ] })
1972
1973
  ] }),
1973
- ["none", "auto"].indexOf(i) !== -1 || K ? null : /* @__PURE__ */ e.jsx(
1974
- vs,
1974
+ ["none", "auto"].indexOf(i) !== -1 || G ? null : /* @__PURE__ */ e.jsx(
1975
+ js,
1975
1976
  {
1976
1977
  onDragStart: () => L(!0),
1977
1978
  onDragEnd: (b) => {
1978
1979
  if (C(() => ""), L(!1), m(b))
1979
1980
  return;
1980
1981
  const f = `${b}`, O = `${f.startsWith("-") ? "-" : ""}${c}[${f.replace("-", "")}${i === "-" ? "" : i}]`;
1981
- S(O);
1982
+ T(O);
1982
1983
  },
1983
1984
  onDrag: (b) => {
1984
1985
  if (m(b))
@@ -1990,14 +1991,14 @@ const ms = (r) => {
1990
1991
  currentValue: a,
1991
1992
  unit: i,
1992
1993
  negative: h,
1993
- cssProperty: n
1994
+ cssProperty: s
1994
1995
  }
1995
1996
  )
1996
1997
  ] }) }) });
1997
- }, ae = (r) => {
1998
+ }, ne = (r) => {
1998
1999
  const o = ue();
1999
- return Rt(o, { property: r });
2000
- }, Cs = (r, o) => {
2000
+ return Vt(o, { property: r });
2001
+ }, Ns = (r, o) => {
2001
2002
  const t = {
2002
2003
  xs: 0,
2003
2004
  sm: 1,
@@ -2007,7 +2008,7 @@ const ms = (r) => {
2007
2008
  "2xl": 5
2008
2009
  };
2009
2010
  return t[y(r, "mq", "xs")] <= t[o];
2010
- }, ks = {
2011
+ }, _s = {
2011
2012
  width: "w-",
2012
2013
  height: "h-",
2013
2014
  minWidth: "min-w-",
@@ -2080,25 +2081,25 @@ const ms = (r) => {
2080
2081
  lg: "1024px",
2081
2082
  xl: "1280px",
2082
2083
  "2xl": "1536px"
2083
- }, Ns = (r) => `${r.toUpperCase()} ${Xe[r] ? `(${Xe[r]} & up)` : ""}`, Ve = (r) => {
2084
- const { t: o } = I(), { type: t = "icons", label: a, property: l, onEmitChange: s = () => {
2085
- }, units: d, negative: c = !1 } = r, [n] = _r(), [p] = Sr(), [, h] = Ie(), i = ae(l), u = Te(), x = at(), [g] = nt(), v = T(() => y(i, "fullCls", ""), [i]), C = H(
2084
+ }, Ss = (r) => `${r.toUpperCase()} ${Xe[r] ? `(${Xe[r]} & up)` : ""}`, Ve = (r) => {
2085
+ const { t: o } = I(), { type: t = "icons", label: a, property: l, onEmitChange: n = () => {
2086
+ }, units: d, negative: c = !1 } = r, [s] = Tr(), [p] = Rr(), [, h] = Ie(), i = ne(l), u = Te(), x = nt(), [g] = it(), v = S(() => y(i, "fullCls", ""), [i]), C = H(
2086
2087
  (j, D = !0) => {
2087
- const Z = { dark: n, mq: h, mod: p, cls: j, property: l, fullCls: "" };
2088
- (n || p !== "") && (Z.mq = "xs");
2089
- const b = Gr(Z);
2088
+ const W = { dark: s, mq: h, mod: p, cls: j, property: l, fullCls: "" };
2089
+ (s || p !== "") && (W.mq = "xs");
2090
+ const b = qr(W);
2090
2091
  u(g, [b], D);
2091
2092
  },
2092
- [g, n, h, p, l, u]
2093
- ), K = H(() => {
2093
+ [g, s, h, p, l, u]
2094
+ ), G = H(() => {
2094
2095
  x(g, [v]);
2095
- }, [g, v, x]), L = T(() => Cs(i, h), [i, h]);
2096
+ }, [g, v, x]), L = S(() => Ns(i, h), [i, h]);
2096
2097
  A(() => {
2097
- s(L, i);
2098
- }, [L, s, i]);
2099
- const [, , G] = Ie(), q = H(
2098
+ n(L, i);
2099
+ }, [L, n, i]);
2100
+ const [, , K] = Ie(), q = H(
2100
2101
  (j) => {
2101
- G({
2102
+ K({
2102
2103
  xs: 400,
2103
2104
  sm: 640,
2104
2105
  md: 800,
@@ -2107,29 +2108,29 @@ const ms = (r) => {
2107
2108
  "2xl": 1920
2108
2109
  }[j]);
2109
2110
  },
2110
- [G]
2111
- ), S = y(i, "dark", null) === n && y(i, "mod", null) === p && y(i, "mq", null) === h;
2112
- return /* @__PURE__ */ e.jsx(us, { canChange: L, canReset: i && S, children: /* @__PURE__ */ e.jsxs("div", { className: "group flex flex-row items-center py-2 first:pt-0 last:pb-0", children: [
2113
- /* @__PURE__ */ e.jsx("div", { className: "relative w-[70px] truncate text-xs text-foreground", children: /* @__PURE__ */ e.jsx("span", { className: `text-[11px] ${i && !S ? "text-foreground" : ""}`, children: o(a) }) }),
2111
+ [K]
2112
+ ), T = y(i, "dark", null) === s && y(i, "mod", null) === p && y(i, "mq", null) === h;
2113
+ return /* @__PURE__ */ e.jsx(xs, { canChange: L, canReset: i && T, children: /* @__PURE__ */ e.jsxs("div", { className: "group flex flex-row items-center py-2 first:pt-0 last:pb-0", children: [
2114
+ /* @__PURE__ */ e.jsx("div", { className: "relative w-[70px] truncate text-xs text-foreground", children: /* @__PURE__ */ e.jsx("span", { className: `text-[11px] ${i && !T ? "text-foreground" : ""}`, children: o(a) }) }),
2114
2115
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-row items-center", children: [
2115
2116
  /* @__PURE__ */ e.jsxs("div", { className: "w-[150px]", children: [
2116
2117
  t === "arbitrary" ? /* @__PURE__ */ e.jsx(
2117
- js,
2118
+ ks,
2118
2119
  {
2119
2120
  currentClass: y(i, "cls", ""),
2120
- classPrefix: y(ks, l, ""),
2121
+ classPrefix: y(_s, l, ""),
2121
2122
  units: d || [],
2122
2123
  onChange: C,
2123
2124
  negative: c,
2124
2125
  cssProperty: l
2125
2126
  }
2126
2127
  ) : null,
2127
- t === "icons" && /* @__PURE__ */ e.jsx(xs, { property: l, onChange: C }),
2128
- t === "range" && /* @__PURE__ */ e.jsx(gs, { property: l, onChange: C }),
2129
- t === "color" && /* @__PURE__ */ e.jsx(hs, { property: l, onChange: C }),
2130
- t === "dropdown" && /* @__PURE__ */ e.jsx(gt, { label: a, property: l, onChange: C })
2128
+ t === "icons" && /* @__PURE__ */ e.jsx(hs, { property: l, onChange: C }),
2129
+ t === "range" && /* @__PURE__ */ e.jsx(ys, { property: l, onChange: C }),
2130
+ t === "color" && /* @__PURE__ */ e.jsx(ms, { property: l, onChange: C }),
2131
+ t === "dropdown" && /* @__PURE__ */ e.jsx(xt, { label: a, property: l, onChange: C })
2131
2132
  ] }),
2132
- /* @__PURE__ */ e.jsx("div", { className: `w-[30px] cursor-pointer ${v ? "visible" : "invisible"}`, children: S ? /* @__PURE__ */ e.jsx("button", { type: "button", onClick: () => K(), title: "Reset", className: "flex px-1.5 text-xs", children: /* @__PURE__ */ e.jsx(Gt, { className: "h-5 w-5 text-blue-500 hover:opacity-80" }) }) : L && i ? /* @__PURE__ */ e.jsxs($, { delayDuration: 100, children: [
2133
+ /* @__PURE__ */ e.jsx("div", { className: `w-[30px] cursor-pointer ${v ? "visible" : "invisible"}`, children: T ? /* @__PURE__ */ e.jsx("button", { type: "button", onClick: () => G(), 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" }) }) : L && i ? /* @__PURE__ */ e.jsxs($, { delayDuration: 100, children: [
2133
2134
  /* @__PURE__ */ e.jsx(E, { asChild: !0, children: /* @__PURE__ */ e.jsx(
2134
2135
  "button",
2135
2136
  {
@@ -2141,8 +2142,8 @@ const ms = (r) => {
2141
2142
  /* @__PURE__ */ e.jsx(M, { children: /* @__PURE__ */ e.jsx("div", { className: "text-right", children: /* @__PURE__ */ e.jsxs("div", { children: [
2142
2143
  "Current style is set at  ",
2143
2144
  /* @__PURE__ */ e.jsxs("span", { className: "font-bold", children: [
2144
- Ns(y(i, "mq")),
2145
- n && !i.dark ? "(Light mode)" : ""
2145
+ Ss(y(i, "mq")),
2146
+ s && !i.dark ? "(Light mode)" : ""
2146
2147
  ] }),
2147
2148
  /* @__PURE__ */ e.jsx("br", {}),
2148
2149
  /* @__PURE__ */ e.jsxs(
@@ -2161,16 +2162,16 @@ const ms = (r) => {
2161
2162
  ] }) : null })
2162
2163
  ] })
2163
2164
  ] }) });
2164
- }, _s = ["px", "%", "em", "rem", "ch", "vh", "vw"], yt = ({
2165
+ }, Ts = ["px", "%", "em", "rem", "ch", "vh", "vw"], ht = ({
2165
2166
  label: r,
2166
2167
  options: o,
2167
2168
  borderB: t = !1,
2168
2169
  borderT: a = !1,
2169
2170
  type: l = "arbitrary",
2170
- units: s = _s,
2171
+ units: n = Ts,
2171
2172
  negative: d = !1
2172
2173
  }) => {
2173
- const { t: c } = I(), [n, p] = w(o[0].key), h = ue(), i = H((u) => _(h, "property").includes(u), [h]);
2174
+ const { t: c } = I(), [s, p] = w(o[0].key), h = ue(), i = H((u) => _(h, "property").includes(u), [h]);
2174
2175
  return /* @__PURE__ */ e.jsxs(
2175
2176
  "div",
2176
2177
  {
@@ -2185,16 +2186,16 @@ const ms = (r) => {
2185
2186
  {
2186
2187
  type: "button",
2187
2188
  onClick: () => p(x),
2188
- className: `relative cursor-pointer rounded-full p-1 text-[8px] ${x === n ? " bg-[#3E57F0] text-white" : "text-gray-600 dark:text-gray-300"}`,
2189
+ className: `relative cursor-pointer rounded-full p-1 text-[8px] ${x === s ? " bg-[#3E57F0] text-white" : "text-gray-600 dark:text-gray-300"}`,
2189
2190
  children: [
2190
2191
  P.createElement("div", {
2191
2192
  className: i(x) ? "-bottom-1.5 absolute bg-[#3E57F0] h-[2px] left-0 w-full" : ""
2192
2193
  }),
2193
- P.createElement(y(ut, x, Ge), { className: "text-inherit w-3 h-3" })
2194
+ P.createElement(y(gt, x, qe), { className: "text-inherit w-3 h-3" })
2194
2195
  ]
2195
2196
  }
2196
2197
  ) }),
2197
- /* @__PURE__ */ e.jsx(M, { children: F(re(u)) })
2198
+ /* @__PURE__ */ e.jsx(M, { children: X(re(u)) })
2198
2199
  ] }) }))
2199
2200
  ) })
2200
2201
  ] }),
@@ -2202,23 +2203,23 @@ const ms = (r) => {
2202
2203
  Ve,
2203
2204
  {
2204
2205
  type: l,
2205
- units: [...s],
2206
+ units: [...n],
2206
2207
  label: "",
2207
- property: n,
2208
+ property: s,
2208
2209
  negative: d
2209
2210
  }
2210
2211
  ) })
2211
2212
  ]
2212
2213
  }
2213
2214
  );
2214
- }, Ss = ({ heading: r, items: o }) => {
2215
- const { t } = I(), a = ue(), l = T(() => {
2216
- const s = (n) => De(
2217
- n.map((p) => p.styleType === "multiple" ? _(p.options, "key") : p.property)
2215
+ }, Rs = ({ heading: r, items: o }) => {
2216
+ const { t } = I(), a = ue(), l = S(() => {
2217
+ const n = (s) => De(
2218
+ s.map((p) => p.styleType === "multiple" ? _(p.options, "key") : p.property)
2218
2219
  ), d = De(
2219
- o.map((n) => n.styleType === "accordion" ? s(n.items) : n.styleType === "multiple" ? _(n.options, "key") : n.property)
2220
+ o.map((s) => s.styleType === "accordion" ? n(s.items) : s.styleType === "multiple" ? _(s.options, "key") : s.property)
2220
2221
  ), c = _(a, "property");
2221
- return Vt(d, c).length > 0;
2222
+ return Ht(d, c).length > 0;
2222
2223
  }, [a, o]);
2223
2224
  return /* @__PURE__ */ e.jsxs("details", { children: [
2224
2225
  /* @__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: [
@@ -2230,79 +2231,85 @@ const ms = (r) => {
2230
2231
  }
2231
2232
  ) : null
2232
2233
  ] }) }),
2233
- /* @__PURE__ */ e.jsx("div", { className: "p-2", children: o.map((s) => s.styleType === "multiple" ? /* @__PURE__ */ e.jsx(yt, { ...s }, s.label) : /* @__PURE__ */ e.jsx(Ve, { ...s }, s.label)) })
2234
+ /* @__PURE__ */ e.jsx("div", { className: "p-2", children: o.map((n) => n.styleType === "multiple" ? /* @__PURE__ */ e.jsx(ht, { ...n }, n.label) : /* @__PURE__ */ e.jsx(Ve, { ...n }, n.label)) })
2234
2235
  ] });
2235
- }, Ts = Fe({}), xe = ({ section: r }) => {
2236
- const { t: o } = I(), t = ue(), a = H(
2236
+ }, Vs = Ze({}), xe = ({ section: r }) => {
2237
+ const { t: o } = I(), t = ue(), a = Z(), l = H(
2237
2238
  (s = []) => {
2238
- const d = {};
2239
- for (let n = 0; n < t.length; n++)
2240
- d[t[n].property] = t[n].cls;
2241
- let c = !0;
2242
- for (const n in s)
2243
- if (!ie(d, n) || d[n] !== s[n]) {
2244
- c = !1;
2239
+ const p = {};
2240
+ for (let i = 0; i < t.length; i++)
2241
+ p[t[i].property] = t[i].cls;
2242
+ let h = !0;
2243
+ for (const i in s)
2244
+ if (!de(p, i) || p[i] !== s[i]) {
2245
+ h = !1;
2245
2246
  break;
2246
2247
  }
2247
- return c;
2248
+ return h;
2248
2249
  },
2249
2250
  [t]
2250
- ), l = T(() => ({}), []);
2251
- return /* @__PURE__ */ e.jsx(Ts.Provider, { value: l, children: /* @__PURE__ */ e.jsxs(me, { value: r.heading, children: [
2252
- /* @__PURE__ */ e.jsx(fe, { className: "bg-gray-200 px-3 py-2 text-xs hover:no-underline", children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-x-2", children: o(r.heading) }) }),
2251
+ ), n = S(() => ({}), []), [d] = le(), c = S(() => {
2252
+ const s = `${Le(d, "0.prop")}_attrs`;
2253
+ return !Qr(Le(a, s, {}));
2254
+ }, [d]);
2255
+ return /* @__PURE__ */ e.jsx(Vs.Provider, { value: n, children: /* @__PURE__ */ e.jsxs(me, { value: r.heading, children: [
2256
+ /* @__PURE__ */ e.jsx(fe, { className: "border-b border-gray-300 bg-gray-200 px-3 py-2 text-xs hover:no-underline", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
2257
+ r.heading === "Attributes" && c ? /* @__PURE__ */ e.jsx("span", { className: "mr-2 inline-block h-[8px] w-[8px] rounded-full bg-blue-600" }) : null,
2258
+ /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-x-2", children: o(r.heading) })
2259
+ ] }) }),
2253
2260
  /* @__PURE__ */ e.jsx(ve, { className: "bg-gray-100 px-3.5 py-2", children: P.Children.toArray(
2254
- r.items.map((s) => ie(s, "component") ? P.createElement(s.component, { key: s.label }) : ie(s, "styleType") ? s.styleType === "multiple" ? /* @__PURE__ */ e.jsx(yt, { ...s }, s.label) : s.styleType === "accordion" && a(s == null ? void 0 : s.conditions) ? /* @__PURE__ */ e.jsx(Ss, { ...s }, s.label) : null : /* @__PURE__ */ e.jsx(Ve, { ...s }, s.label))
2261
+ r.items.map((s) => de(s, "component") ? P.createElement(s.component, { key: s.label }) : de(s, "styleType") ? s.styleType === "multiple" ? /* @__PURE__ */ e.jsx(ht, { ...s }, s.label) : s.styleType === "accordion" && l(s == null ? void 0 : s.conditions) ? /* @__PURE__ */ e.jsx(Rs, { ...s }, s.label) : null : /* @__PURE__ */ e.jsx(Ve, { ...s }, s.label))
2255
2262
  ) })
2256
2263
  ] }) });
2257
- }, Rs = () => {
2258
- const r = U(), [o] = pe(), { t } = I(), a = Mr(), l = Te(), s = Re(r._type), d = y(oe(o), "prop"), c = y(s.props, `${d}.presets`, {});
2259
- if (m(a) && (!ie(s, "props") || m(c)))
2264
+ }, Hs = () => {
2265
+ const r = Z(), [o] = le(), { t } = I(), a = Or(), l = Te(), n = Re(r._type), d = y(oe(o), "prop"), c = y(n.props, `${d}.presets`, {});
2266
+ if (m(a) && (!de(n, "props") || m(c)))
2260
2267
  return null;
2261
- const n = (p) => {
2268
+ const s = (p) => {
2262
2269
  const h = p.trim().toLowerCase().replace(/ +(?= )/g, "").split(" ");
2263
2270
  l([r._id], h, !0);
2264
2271
  };
2265
- return /* @__PURE__ */ e.jsx("div", { className: "h-10", children: /* @__PURE__ */ e.jsxs(Tr, { children: [
2266
- /* @__PURE__ */ e.jsx(Rr, { asChild: !0, children: /* @__PURE__ */ e.jsx("div", { className: "px-4", children: /* @__PURE__ */ e.jsxs(B, { variant: "default", className: "w-full", size: "sm", children: [
2272
+ return /* @__PURE__ */ e.jsx("div", { className: "h-10", children: /* @__PURE__ */ e.jsxs(Vr, { children: [
2273
+ /* @__PURE__ */ e.jsx(Hr, { asChild: !0, children: /* @__PURE__ */ e.jsx("div", { className: "px-4", children: /* @__PURE__ */ e.jsxs(B, { variant: "default", className: "w-full", size: "sm", children: [
2267
2274
  t("Apply Presets"),
2268
- /* @__PURE__ */ e.jsx(qt, {})
2275
+ /* @__PURE__ */ e.jsx(Jt, {})
2269
2276
  ] }) }) }),
2270
- /* @__PURE__ */ e.jsx(Vr, { className: "max-h-80 w-56", children: /* @__PURE__ */ e.jsxs(dt, { className: "no-scrollbar h-full", children: [
2277
+ /* @__PURE__ */ e.jsx(Dr, { className: "max-h-80 w-56", children: /* @__PURE__ */ e.jsxs(ct, { className: "no-scrollbar h-full", children: [
2271
2278
  m(c) ? null : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2272
2279
  /* @__PURE__ */ e.jsxs(Pe, { children: [
2273
- s.type,
2280
+ n.type,
2274
2281
  " ",
2275
2282
  t("presets")
2276
2283
  ] }),
2277
2284
  /* @__PURE__ */ e.jsx(Ae, {}),
2278
- /* @__PURE__ */ e.jsx($e, { children: he(c).map((p) => /* @__PURE__ */ e.jsxs(Ee, { className: "group text-xs", onClick: () => n(c[p]), children: [
2279
- be(F(t(p))),
2285
+ /* @__PURE__ */ e.jsx($e, { children: he(c).map((p) => /* @__PURE__ */ e.jsxs(Ee, { className: "group text-xs", onClick: () => s(c[p]), children: [
2286
+ be(X(t(p))),
2280
2287
  /* @__PURE__ */ e.jsx(Me, { className: "invisible hover:font-bold hover:text-blue-600 group-hover:visible", children: t("apply") })
2281
2288
  ] })) })
2282
2289
  ] }),
2283
2290
  m(a) ? null : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2284
2291
  /* @__PURE__ */ e.jsx(Pe, { children: t("Global presets") }),
2285
2292
  /* @__PURE__ */ e.jsx(Ae, {}),
2286
- /* @__PURE__ */ e.jsx($e, { children: he(a).map((p) => /* @__PURE__ */ e.jsxs(Ee, { className: "group text-xs", onClick: () => n(a[p]), children: [
2287
- be(F(t(p))),
2293
+ /* @__PURE__ */ e.jsx($e, { children: he(a).map((p) => /* @__PURE__ */ e.jsxs(Ee, { className: "group text-xs", onClick: () => s(a[p]), children: [
2294
+ be(X(t(p))),
2288
2295
  /* @__PURE__ */ e.jsx(Me, { className: "invisible hover:font-bold hover:text-blue-600 group-hover:visible", children: t("apply") })
2289
2296
  ] })) })
2290
2297
  ] })
2291
2298
  ] }) })
2292
2299
  ] }) });
2293
2300
  };
2294
- function Vs() {
2295
- const { flexChild: r, gridChild: o } = Hr(), [t] = pe();
2301
+ function Ds() {
2302
+ const { flexChild: r, gridChild: o } = Br(), [t] = le();
2296
2303
  return m(t) ? null : /* @__PURE__ */ e.jsxs("div", { className: "flex h-full flex-col", children: [
2297
- /* @__PURE__ */ e.jsx(Rs, {}),
2298
- /* @__PURE__ */ e.jsxs(lt, { defaultValue: ["Styles"], type: "multiple", className: "w-full", children: [
2299
- r && /* @__PURE__ */ e.jsx(xe, { section: ds }),
2300
- o ? /* @__PURE__ */ e.jsx(xe, { section: cs }) : null,
2301
- ps.map((a) => /* @__PURE__ */ e.jsx(xe, { section: a }, a.heading))
2304
+ /* @__PURE__ */ e.jsx(Hs, {}),
2305
+ /* @__PURE__ */ e.jsxs(at, { defaultValue: ["Styles"], type: "multiple", className: "w-full", children: [
2306
+ r && /* @__PURE__ */ e.jsx(xe, { section: ps }),
2307
+ o ? /* @__PURE__ */ e.jsx(xe, { section: us }) : null,
2308
+ gs.map((a) => /* @__PURE__ */ e.jsx(xe, { section: a }, a.heading))
2302
2309
  ] })
2303
2310
  ] });
2304
2311
  }
2305
- const Hs = {
2312
+ const Bs = {
2306
2313
  px: 1,
2307
2314
  "%": 1,
2308
2315
  em: 100,
@@ -2313,32 +2320,32 @@ const Hs = {
2313
2320
  "-": 1,
2314
2321
  deg: 1,
2315
2322
  ms: 0.1
2316
- }, Ho = () => {
2317
- const r = U(), { t: o } = I(), [t, a] = P.useState(""), [l, s] = P.useState({
2318
- onDrag: (n) => n,
2319
- onDragEnd: (n) => n,
2323
+ }, Io = () => {
2324
+ const r = Z(), { t: o } = I(), [t, a] = P.useState(""), [l, n] = P.useState({
2325
+ onDrag: (s) => s,
2326
+ onDragEnd: (s) => s,
2320
2327
  dragStartY: 0,
2321
2328
  dragging: !1,
2322
2329
  dragStartValue: 0,
2323
2330
  dragUnit: "",
2324
2331
  negative: !1,
2325
2332
  cssProperty: ""
2326
- }), d = de(
2327
- (n) => {
2333
+ }), d = ce(
2334
+ (s) => {
2328
2335
  const p = !y(l, "negative", !1), h = y(l, "cssProperty", "");
2329
2336
  let i = parseFloat(l.dragStartValue);
2330
- i = Ue(i) ? 0 : i;
2331
- let u = Hs[l.dragUnit];
2332
- (W(h, "scale") || h === "opacity") && (u = 10);
2333
- let g = (l.dragStartY - n.pageY) / u + i;
2337
+ i = Ge(i) ? 0 : i;
2338
+ let u = Bs[l.dragUnit];
2339
+ (U(h, "scale") || h === "opacity") && (u = 10);
2340
+ let g = (l.dragStartY - s.pageY) / u + i;
2334
2341
  p && g < 0 && (g = 0), h === "opacity" && g > 1 && (g = 1), l.onDrag(`${g}`), a(`${g}`);
2335
2342
  },
2336
2343
  [l],
2337
2344
  50
2338
2345
  ), c = H(() => {
2339
- setTimeout(() => l.onDragEnd(`${t}`), 100), s({
2340
- onDrag: (n) => n,
2341
- onDragEnd: (n) => n,
2346
+ setTimeout(() => l.onDragEnd(`${t}`), 100), n({
2347
+ onDrag: (s) => s,
2348
+ onDragEnd: (s) => s,
2342
2349
  dragStartY: 0,
2343
2350
  dragging: !1,
2344
2351
  dragStartValue: 0,
@@ -2346,11 +2353,11 @@ const Hs = {
2346
2353
  negative: !1,
2347
2354
  cssProperty: ""
2348
2355
  });
2349
- }, [l, t, s]);
2350
- return Ht(r) ? /* @__PURE__ */ e.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 rounded-xl p-4", children: [
2351
- /* @__PURE__ */ e.jsx(Jt, { className: "mx-auto text-3xl" }),
2356
+ }, [l, t, n]);
2357
+ return Dt(r) ? /* @__PURE__ */ e.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 rounded-xl p-4", children: [
2358
+ /* @__PURE__ */ e.jsx(Qt, { className: "mx-auto text-3xl" }),
2352
2359
  /* @__PURE__ */ e.jsx("h1", { children: o("no_block_selected_for_styling") })
2353
- ] }) }) : /* @__PURE__ */ e.jsx(qe, { children: /* @__PURE__ */ e.jsxs(xt.Provider, { value: { setDragData: s }, children: [
2360
+ ] }) }) : /* @__PURE__ */ e.jsx(Je, { children: /* @__PURE__ */ e.jsxs(yt.Provider, { value: { setDragData: n }, children: [
2354
2361
  l.dragging ? /* @__PURE__ */ e.jsx(
2355
2362
  "div",
2356
2363
  {
@@ -2359,9 +2366,9 @@ const Hs = {
2359
2366
  className: "absolute inset-0 z-30 cursor-row-resize bg-gray-300/10"
2360
2367
  }
2361
2368
  ) : null,
2362
- /* @__PURE__ */ e.jsxs(dt, { className: "no-scrollbar max-h-full flex-1 overflow-x-hidden overflow-y-hidden bg-gray-100 pb-5", children: [
2363
- /* @__PURE__ */ e.jsx(ls, {}),
2364
- /* @__PURE__ */ e.jsx(Vs, {}),
2369
+ /* @__PURE__ */ e.jsxs(ct, { className: "no-scrollbar max-h-full flex-1 overflow-x-hidden overflow-y-hidden bg-gray-100 pb-5", children: [
2370
+ /* @__PURE__ */ e.jsx(ns, {}),
2371
+ /* @__PURE__ */ e.jsx(Ds, {}),
2365
2372
  /* @__PURE__ */ e.jsx("br", {}),
2366
2373
  /* @__PURE__ */ e.jsx("br", {}),
2367
2374
  /* @__PURE__ */ e.jsx("br", {})
@@ -2369,5 +2376,5 @@ const Hs = {
2369
2376
  ] }) });
2370
2377
  };
2371
2378
  export {
2372
- Ho as default
2379
+ Io as default
2373
2380
  };