@chaibuilder/sdk 1.2.18 → 1.2.20

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 (101) hide show
  1. package/dist/{AddBlocks-uCdu9Xpr.js → AddBlocks-VIWJkaHJ.js} +24 -25
  2. package/dist/AddBlocks-X9eh8OWJ.cjs +1 -0
  3. package/dist/{BrandingOptions-JbHRN7V5.js → BrandingOptions-5ss0k1nb.js} +12 -13
  4. package/dist/BrandingOptions-PzPdafIT.cjs +1 -0
  5. package/dist/CanvasArea-TTGqlBKO.js +908 -0
  6. package/dist/CanvasArea-hoyr4dfb.cjs +55 -0
  7. package/dist/CurrentPage-EddxgHU-.cjs +1 -0
  8. package/dist/{CurrentPage-AlOLPG4o.js → CurrentPage-a3T2uy8Q.js} +10 -12
  9. package/dist/ListTree-kergCZrw.js +126 -0
  10. package/dist/ListTree-tADrgsqZ.cjs +1 -0
  11. package/dist/Outline-3IHYlOzF.cjs +1 -0
  12. package/dist/Outline-rNFJGkap.js +294 -0
  13. package/dist/{PagesPanel-VbSQHEu_.js → PagesPanel-0bL28ofN.js} +5 -7
  14. package/dist/PagesPanel-B33hWN11.cjs +1 -0
  15. package/dist/ProjectPanel-qtRTXNOP.cjs +1 -0
  16. package/dist/{ProjectPanel-fqux215P.js → ProjectPanel-sBRkUXnY.js} +15 -17
  17. package/dist/{Settings-IhWI1ice.js → Settings-HgGe1ANj.js} +587 -554
  18. package/dist/Settings-rXxS3RGM.cjs +1 -0
  19. package/dist/{SidePanels-lMCXrchR.js → SidePanels-R_g9rSjP.js} +132 -134
  20. package/dist/SidePanels-aAm-2A3s.cjs +1 -0
  21. package/dist/{Topbar-DYiisBtw.js → Topbar-AUTKpVHO.js} +3 -4
  22. package/dist/Topbar-cXtxVswU.cjs +1 -0
  23. package/dist/TypeIcon-ElNNPazl.cjs +1 -0
  24. package/dist/TypeIcon-qO96rNbV.js +69 -0
  25. package/dist/{UnsplashImages-lGLcqo4M.js → UnsplashImages-1RFHZIte.js} +13 -14
  26. package/dist/UnsplashImages-p34UJJWJ.cjs +1 -0
  27. package/dist/UploadImages-CLfyNo1i.cjs +1 -0
  28. package/dist/{UploadImages-06m6vjbL.js → UploadImages-G2orrhmZ.js} +8 -9
  29. package/dist/{add-page-modal-mEbIXSKX.js → add-page-modal-DUthvJNJ.js} +7 -9
  30. package/dist/add-page-modal-KCy_Khfe.cjs +1 -0
  31. package/dist/confirm-alert-T8vimDRx.cjs +1 -0
  32. package/dist/{confirm-alert-YETlIRpE.js → confirm-alert-nk2WQHud.js} +3 -4
  33. package/dist/{controls-Dy1qa8Dc.cjs → controls-KK2oLIa8.cjs} +1 -1
  34. package/dist/{controls-XPXGHKht.js → controls-OfJWSEqC.js} +29 -28
  35. package/dist/core.cjs +1 -1
  36. package/dist/core.d.ts +2 -1
  37. package/dist/core.js +45 -47
  38. package/dist/defaultTheme-7Lk2zq60.cjs +1 -0
  39. package/dist/{defaultTheme-s0cpA5Oy.js → defaultTheme-gunU_Fe5.js} +31 -33
  40. package/dist/{delete-page-modal-J_SmPWrw.js → delete-page-modal-WvWRQUgU.js} +8 -10
  41. package/dist/delete-page-modal-_pFjWLJn.cjs +1 -0
  42. package/dist/email-blocks.cjs +1 -1
  43. package/dist/email-blocks.js +81 -81
  44. package/dist/email.cjs +1 -1
  45. package/dist/email.d.ts +2 -0
  46. package/dist/email.js +4 -6
  47. package/dist/{form-Y0Vb4m04.cjs → form-YnnWtUGk.cjs} +1 -1
  48. package/dist/{form-2xJcQs_Y.js → form-kXQX4L2W.js} +1 -1
  49. package/dist/{index-627XtO9e.js → index--Pt4B5bv.js} +3 -3
  50. package/dist/index-DeHH1q_1.cjs +1 -0
  51. package/dist/{index-3TQsdso6.cjs → index-JqRQZLN5.cjs} +1 -1
  52. package/dist/{index-LF3KXx4u.js → index-QIbDWoML.js} +8308 -8162
  53. package/dist/{index-ZwpjuB-N.cjs → index-e5cgISUO.cjs} +51 -51
  54. package/dist/{index-ZBqiaKhx.js → index-la4rqGKN.js} +802 -794
  55. package/dist/lib.cjs +1 -1
  56. package/dist/lib.js +1 -1
  57. package/dist/page-viewer-6phtctz6.cjs +1 -0
  58. package/dist/{page-viewer-7u0SWWmO.js → page-viewer-s_lHBVfx.js} +6 -8
  59. package/dist/project-general-setting-SaNOMXEl.cjs +1 -0
  60. package/dist/{project-general-setting-SqC85J7F.js → project-general-setting-gj4A0X5W.js} +7 -9
  61. package/dist/{project-seo-setting-TlQherop.js → project-seo-setting-aCPg-IIc.js} +5 -6
  62. package/dist/project-seo-setting-bMDdgKRZ.cjs +1 -0
  63. package/dist/render.cjs +1 -1
  64. package/dist/render.d.ts +10 -0
  65. package/dist/render.js +164 -78
  66. package/dist/{single-page-detail-ClZYIdSO.js → single-page-detail-TP-cxVIT.js} +36 -38
  67. package/dist/single-page-detail-er8i2FIF.cjs +1 -0
  68. package/dist/studio.cjs +1 -1
  69. package/dist/studio.d.ts +2 -0
  70. package/dist/studio.js +4 -6
  71. package/dist/ui.cjs +1 -1
  72. package/dist/ui.d.ts +1 -1
  73. package/dist/ui.js +130 -131
  74. package/dist/{useAddBlockByDrop-E343zoB3.cjs → useAddBlockByDrop-LSV8adwE.cjs} +1 -1
  75. package/dist/{useAddBlockByDrop-sPX4lN-O.js → useAddBlockByDrop-_vczk5o_.js} +1 -1
  76. package/dist/web-blocks.cjs +1 -1
  77. package/dist/web-blocks.js +1 -1
  78. package/package.json +4 -14
  79. package/dist/AddBlocks-5Q5w5lPJ.cjs +0 -1
  80. package/dist/BrandingOptions-xrGQI1Kn.cjs +0 -1
  81. package/dist/CanvasArea-aWzbzB9p.js +0 -1403
  82. package/dist/CanvasArea-oUIvLfdq.cjs +0 -60
  83. package/dist/CurrentPage-atmd8UrZ.cjs +0 -1
  84. package/dist/Outline-oGoAdnBw.js +0 -355
  85. package/dist/Outline-uMUTwN-R.cjs +0 -1
  86. package/dist/PagesPanel-nN3QUwXp.cjs +0 -1
  87. package/dist/ProjectPanel-UIEFhref.cjs +0 -1
  88. package/dist/Settings-8qUW0Iow.cjs +0 -1
  89. package/dist/SidePanels-cOHgPE9y.cjs +0 -1
  90. package/dist/Topbar-vLD-rWl5.cjs +0 -1
  91. package/dist/UnsplashImages-1JWfKlBc.cjs +0 -1
  92. package/dist/UploadImages-T4MYMOhW.cjs +0 -1
  93. package/dist/add-page-modal-niwhffYL.cjs +0 -1
  94. package/dist/confirm-alert-ZpEIxh3X.cjs +0 -1
  95. package/dist/defaultTheme-1XwPZT2b.cjs +0 -1
  96. package/dist/delete-page-modal-sOqRlmKb.cjs +0 -1
  97. package/dist/index-T3wfa1kz.cjs +0 -1
  98. package/dist/page-viewer-6UDraUKW.cjs +0 -1
  99. package/dist/project-general-setting-AW5Vtmgx.cjs +0 -1
  100. package/dist/project-seo-setting-cWiNZcxW.cjs +0 -1
  101. package/dist/single-page-detail-kJUW6FE9.cjs +0 -1
@@ -1,28 +1,28 @@
1
1
  import { j as e } from "./jsx-runtime-WbnYoNE9.js";
2
- import * as ne from "react";
3
- import P, { useState as C, useMemo as _, useEffect as O, useCallback as V, memo as dt, createContext as Me, useContext as se } from "react";
4
- import { useThrottledCallback as fe } from "@react-hookz/web";
5
- import { forEach as ke, isArray as ie, omit as ct, truncate as pt, includes as E, get as x, first as ue, split as ut, startCase as Y, toLower as le, isEmpty as f, map as k, find as xt, last as ve, filter as we, set as Oe, debounce as gt, keys as ht, cloneDeep as yt, each as bt, capitalize as mt, reject as ft, nth as Ve, startsWith as W, isNumber as vt, parseInt as wt, isNaN as Fe, findLast as jt, flatten as U, intersection as Ye, has as ye, isNull as Ct } from "lodash-es";
6
- import { useTranslation as K } from "react-i18next";
7
- import { PlusIcon as Ne, Cross2Icon as Xe, EyeOpenIcon as kt, EyeClosedIcon as He, BorderAllIcon as A, WidthIcon as T, HeightIcon as R, ArrowUpIcon as Q, ArrowRightIcon as ee, ArrowDownIcon as te, ArrowLeftIcon as re, ArrowTopLeftIcon as Nt, ArrowTopRightIcon as _t, ArrowBottomRightIcon as St, ArrowBottomLeftIcon as Tt, AlignLeftIcon as Rt, AlignCenterHorizontallyIcon as Vt, AlignRightIcon as Ht, StretchHorizontallyIcon as Bt, FontItalicIcon as Dt, UnderlineIcon as $t, OverlineIcon as It, LetterCaseUppercaseIcon as Pt, Cross1Icon as At, InfoCircledIcon as _e, MinusIcon as Et, BoxIcon as ze, RowSpacingIcon as Lt, TriangleDownIcon as Mt, CrossCircledIcon as Ot, TrashIcon as Ft, MixerHorizontalIcon as Ze } from "@radix-ui/react-icons";
8
- import { aV as Yt, aW as Xt, B as xe, aX as zt, aY as Zt, aZ as Wt, a_ as Ut, a$ as Kt, b0 as qt, b1 as Gt, a1 as q, af as Jt, ag as Qt, ah as er, b2 as tr, ad as rr, ao as lr, ae as sr, ap as X, aq as z, ar as Z, b3 as or, b4 as ar, b5 as nr, b6 as ir, b7 as dr, b8 as cr, a6 as We, a5 as pr, h as ur, b9 as Ue, ba as de, bb as ce, bc as pe, ac as Se, M as Ke, _ as qe, r as Ge, aB as Te, bd as xr, v as gr, be as hr, $ as ge, V as yr, a4 as Je, N as Be, z as br, a7 as mr, bf as fr, aj as vr, ak as wr, al as jr, am as Cr, an as H, bg as Qe, au as kr, av as Nr, aw as De, ax as $e } from "./index-ZBqiaKhx.js";
9
- import { u as _r } from "./controls-XPXGHKht.js";
10
- import { Check as Sr, EditIcon as Tr, TrashIcon as Rr, BrushIcon as Vr } from "lucide-react";
11
- import { getBlockComponent as et, getChaiDataProviders as Hr } from "@chaibuilder/runtime";
12
- import { E as tt, u as rt } from "./index-LF3KXx4u.js";
13
- import { J as Br, a as Dr, d as $r } from "./index-e0c8PmRQ.js";
14
- import Ir from "@rjsf/core";
15
- import Pr from "@rjsf/validator-ajv8";
16
- import { useAtom as Ar } from "jotai";
17
- import Er from "react-autosuggest";
18
- import Lr from "fuse.js";
19
- import { A as Mr, C as he, g as Or } from "./Class-3k8xjeiM.js";
20
- import { a as Fr } from "./MODIFIERS-WQdaNvb8.js";
2
+ import * as de from "react";
3
+ import I, { useState as C, useMemo as _, useEffect as O, useCallback as V, memo as ft, createContext as Qe, useContext as le } from "react";
4
+ import { useThrottledCallback as je } from "@react-hookz/web";
5
+ import { forEach as _e, isArray as ce, omit as vt, truncate as jt, includes as M, get as x, first as ge, split as wt, startCase as z, toLower as se, isEmpty as f, map as k, find as Ct, last as we, filter as Ce, set as et, debounce as kt, keys as Nt, cloneDeep as _t, each as St, capitalize as Tt, reject as Rt, nth as $e, startsWith as G, isNumber as Vt, parseInt as Ht, isNaN as tt, findLast as Dt, flatten as K, intersection as rt, has as me, isNull as Bt } from "lodash-es";
6
+ import { useTranslation as W } from "react-i18next";
7
+ import { PlusIcon as Se, Cross2Icon as st, EyeOpenIcon as $t, EyeClosedIcon as Pe, BorderAllIcon as A, WidthIcon as T, HeightIcon as R, ArrowUpIcon as Q, ArrowRightIcon as ee, ArrowDownIcon as te, ArrowLeftIcon as re, ArrowTopLeftIcon as Pt, ArrowTopRightIcon as It, ArrowBottomRightIcon as At, ArrowBottomLeftIcon as Mt, AlignLeftIcon as Et, AlignCenterHorizontallyIcon as Lt, AlignRightIcon as Ot, StretchHorizontallyIcon as Ft, FontItalicIcon as zt, UnderlineIcon as Yt, OverlineIcon as Xt, LetterCaseUppercaseIcon as Zt, Cross1Icon as Wt, InfoCircledIcon as Te, MinusIcon as Ut, BoxIcon as lt, RowSpacingIcon as Gt, TriangleDownIcon as Kt, CrossCircledIcon as qt, TrashIcon as Jt, CaretDownIcon as Qt, MixerHorizontalIcon as ot } from "@radix-ui/react-icons";
8
+ import { aV as er, aW as tr, B as oe, aX as rr, aY as sr, aZ as lr, a_ as or, a$ as ar, b0 as nr, b1 as ir, a1 as U, af as dr, ag as cr, ah as pr, b2 as ur, ad as xr, ao as gr, ae as hr, ap as Y, aq as X, ar as Z, b3 as yr, b4 as br, b5 as mr, b6 as fr, b7 as vr, b8 as jr, a6 as at, a5 as wr, h as Cr, b9 as nt, ba as pe, bb as ue, bc as xe, ac as he, M as Re, _ as it, r as dt, aB as Ve, bd as kr, v as Nr, be as _r, $ as ye, V as Sr, a4 as ct, N as Ie, z as Tr, aG as Rr, aH as Vr, aI as Hr, bf as He, aJ as Ae, aK as Me, bg as Ee, bh as Le, bi as Oe, a7 as Dr, aj as Br, ak as $r, al as Pr, am as Ir, an as H, au as Ar, av as Mr, aw as Fe, ax as ze } from "./index-la4rqGKN.js";
9
+ import { u as Er } from "./controls-OfJWSEqC.js";
10
+ import { Check as Lr, EditIcon as Or, TrashIcon as Fr, BrushIcon as zr } from "lucide-react";
11
+ import { getBlockComponent as De, getChaiDataProviders as Yr, useGlobalStylingPresets as Xr } from "@chaibuilder/runtime";
12
+ import { E as pt, u as ut } from "./index-QIbDWoML.js";
13
+ import { J as Zr, a as Wr, d as Ur } from "./index-e0c8PmRQ.js";
14
+ import Gr from "@rjsf/core";
15
+ import Kr from "@rjsf/validator-ajv8";
16
+ import qr from "react-autosuggest";
17
+ import Jr from "fuse.js";
18
+ import { A as Qr, C as be, g as es } from "./Class-3k8xjeiM.js";
19
+ import { a as ts } from "./MODIFIERS-WQdaNvb8.js";
20
+ import { get as Ye, first as rs, isEmpty as ie, has as ss, keys as Xe, capitalize as Ze, startCase as We } from "lodash";
21
21
  import "./_commonjsHelpers-UyOWmZb0.js";
22
22
  import "./Functions-7jnEwJyw.js";
23
23
  import "clsx";
24
24
  import "tailwind-merge";
25
- import "flat-to-nested";
25
+ import "jotai";
26
26
  import "@radix-ui/react-toggle";
27
27
  import "class-variance-authority";
28
28
  import "@radix-ui/react-switch";
@@ -48,34 +48,33 @@ import "react-dom";
48
48
  import "react-quill";
49
49
  import "i18next";
50
50
  import "@floating-ui/react-dom";
51
- import "react-textarea-autosize";
52
51
  import "flagged";
53
52
  import "react-dnd";
54
53
  import "@minoru/react-dnd-treeview";
55
54
  import "react-hotkeys-hook";
56
- function Yr(r) {
57
- const o = [], t = {};
55
+ function ls(r) {
56
+ const a = [], t = {};
58
57
  function s(l, i) {
59
- ke(i, (a, c) => {
60
- const n = l ? `${l}.${c}` : c, u = ie(a) ? "list" : typeof a;
61
- o.push(n), t[n] = u === "string" ? "text" : u === "object" ? "model" : u, u === "object" && !ie(a) && s(n, a);
58
+ _e(i, (o, c) => {
59
+ const n = l ? `${l}.${c}` : c, p = ce(o) ? "list" : typeof o;
60
+ a.push(n), t[n] = p === "string" ? "text" : p === "object" ? "model" : p, p === "object" && !ce(o) && s(n, o);
62
61
  });
63
62
  }
64
- return s("", ct(r, ["styles", "_type", "_id", "_name", "_bindings"])), { paths: o, pathsType: t };
63
+ return s("", vt(r, ["styles", "_type", "_id", "_name", "_bindings"])), { paths: a, pathsType: t };
65
64
  }
66
- const je = ({ data: r, fullView: o }) => {
65
+ const ke = ({ data: r, fullView: a }) => {
67
66
  if (!r)
68
67
  return null;
69
68
  const t = typeof r;
70
- return o ? typeof r == "object" ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
69
+ return a ? typeof r == "object" ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
71
70
  /* @__PURE__ */ e.jsx("div", { className: "h-3" }),
72
- /* @__PURE__ */ e.jsx(tt, { children: /* @__PURE__ */ e.jsx(
73
- Br,
71
+ /* @__PURE__ */ e.jsx(pt, { children: /* @__PURE__ */ e.jsx(
72
+ Zr,
74
73
  {
75
74
  data: r,
76
- shouldExpandNode: Dr,
75
+ shouldExpandNode: Wr,
77
76
  style: {
78
- ...$r,
77
+ ...Ur,
79
78
  container: "max-h-[40vh] overflow-y-auto text-[12px] leading-[1.5] tracking-wide font-mono",
80
79
  stringValue: "text-orange-600",
81
80
  label: "text-green-900 font-semibold pr-1 tracking-wider"
@@ -85,99 +84,99 @@ const je = ({ data: r, fullView: o }) => {
85
84
  ] }) : /* @__PURE__ */ e.jsxs("div", { className: "max-h-36 w-full overflow-y-auto overflow-x-hidden text-[12px] leading-4 text-gray-800/50", children: [
86
85
  /* @__PURE__ */ e.jsx("span", { className: "font-medium text-gray-800/80", children: "Content: " }),
87
86
  r
88
- ] }) : /* @__PURE__ */ e.jsx("div", { className: "w-full overflow-hidden whitespace-nowrap text-[10px] leading-3 text-gray-800/50", children: pt(t === "object" ? JSON.stringify(r) : r, { length: 40 }) });
89
- }, Ie = ({
87
+ ] }) : /* @__PURE__ */ e.jsx("div", { className: "w-full overflow-hidden whitespace-nowrap text-[10px] leading-3 text-gray-800/50", children: jt(t === "object" ? JSON.stringify(r) : r, { length: 40 }) });
88
+ }, Ue = ({
90
89
  type: r,
91
- value: o = "",
90
+ value: a = "",
92
91
  setValue: t,
93
92
  data: s,
94
93
  onChange: l,
95
94
  dataType: i,
96
- appliedBindings: a
95
+ appliedBindings: o
97
96
  }) => {
98
- const { paths: c, pathsType: n } = Yr(s), u = r === "PROP" ? et(s == null ? void 0 : s._type) : {}, y = r === "PROP", [d, h] = C(!1), g = _(() => r === "PROP" ? c.filter(
99
- (p) => !E(a, p) && x(u, `props.${ue(ut(p, "."))}.binding`)
100
- ) : c.filter((p) => i === x(n, p, "")), [r, c, a, i, u]);
97
+ const { paths: c, pathsType: n } = ls(s), p = r === "PROP" ? De(s == null ? void 0 : s._type) : {}, h = r === "PROP", [d, y] = C(!1), g = _(() => r === "PROP" ? c.filter(
98
+ (u) => !M(o, u) && x(p, `props.${ge(wt(u, "."))}.binding`)
99
+ ) : c.filter((u) => i === x(n, u, "")), [r, c, o, i, p]);
101
100
  return O(() => {
102
- o && l(o);
103
- }, [o, r]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
101
+ a && l(a);
102
+ }, [a, r]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
104
103
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-4", children: [
105
- /* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted-foreground", children: Y(le(r)) }),
106
- /* @__PURE__ */ e.jsxs(Yt, { open: d, onOpenChange: h, children: [
107
- /* @__PURE__ */ e.jsx(Xt, { asChild: !0, children: /* @__PURE__ */ e.jsx(
108
- xe,
104
+ /* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted-foreground", children: z(se(r)) }),
105
+ /* @__PURE__ */ e.jsxs(er, { open: d, onOpenChange: y, children: [
106
+ /* @__PURE__ */ e.jsx(tr, { asChild: !0, children: /* @__PURE__ */ e.jsx(
107
+ oe,
109
108
  {
110
109
  variant: "outline",
111
110
  size: "sm",
112
- className: ` ${f(o) ? "w-44 justify-center bg-blue-500 text-gray-100 hover:bg-blue-400 hover:text-white" : "min-w-[350px] items-center justify-between"}`,
113
- children: o ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
111
+ className: ` ${f(a) ? "w-44 justify-center bg-blue-500 text-gray-100 hover:bg-blue-400 hover:text-white" : "min-w-[350px] items-center justify-between"}`,
112
+ children: a ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
114
113
  /* @__PURE__ */ e.jsxs("span", { className: "pr-8 text-sm", children: [
115
- y && /* @__PURE__ */ e.jsx("span", { className: "mr-2 rounded-full bg-purple-100 px-2 py-0.5 text-[10px] text-purple-500", children: Y(i) }),
116
- o
114
+ h && /* @__PURE__ */ e.jsx("span", { className: "mr-2 rounded-full bg-purple-100 px-2 py-0.5 text-[10px] text-purple-500", children: z(i) }),
115
+ a
117
116
  ] }),
118
117
  /* @__PURE__ */ e.jsx("span", { className: "cursor-pointer text-[9px] text-blue-400 underline hover:text-blue-700", children: "Change" })
119
118
  ] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
120
119
  "+ Set ",
121
- Y(le(r))
120
+ z(se(r))
122
121
  ] })
123
122
  }
124
123
  ) }),
125
- /* @__PURE__ */ e.jsx(zt, { className: "z-[999] min-w-[300px] p-0", side: "right", align: "start", children: /* @__PURE__ */ e.jsxs(Zt, { children: [
126
- /* @__PURE__ */ e.jsx(Wt, { placeholder: `Choose ${le(r)}...` }),
127
- /* @__PURE__ */ e.jsxs(Ut, { children: [
128
- /* @__PURE__ */ e.jsx(Kt, { children: "No results found." }),
129
- /* @__PURE__ */ e.jsx(qt, { children: k(g, (p) => /* @__PURE__ */ e.jsxs(
130
- Gt,
124
+ /* @__PURE__ */ e.jsx(rr, { className: "z-[999] min-w-[300px] p-0", side: "right", align: "start", children: /* @__PURE__ */ e.jsxs(sr, { children: [
125
+ /* @__PURE__ */ e.jsx(lr, { placeholder: `Choose ${se(r)}...` }),
126
+ /* @__PURE__ */ e.jsxs(or, { children: [
127
+ /* @__PURE__ */ e.jsx(ar, { children: "No results found." }),
128
+ /* @__PURE__ */ e.jsx(nr, { children: k(g, (u) => /* @__PURE__ */ e.jsxs(
129
+ ir,
131
130
  {
132
- value: p,
133
- className: `cursor-pointer ${y ? "flex items-center justify-between" : "flex flex-col items-start justify-start"}`,
131
+ value: u,
132
+ className: `cursor-pointer ${h ? "flex items-center justify-between" : "flex flex-col items-start justify-start"}`,
134
133
  onSelect: (m) => {
135
- t(xt(g, (w) => w === m) || null), h(!1);
134
+ t(Ct(g, (j) => j === m) || null), y(!1);
136
135
  },
137
136
  children: [
138
137
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
139
- /* @__PURE__ */ e.jsx(Sr, { className: `h-4 w-4 text-green-500 ${o === p ? "" : "opacity-0"}` }),
140
- p
138
+ /* @__PURE__ */ e.jsx(Lr, { className: `h-4 w-4 text-green-500 ${a === u ? "" : "opacity-0"}` }),
139
+ u
141
140
  ] }),
142
- y ? /* @__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: Y(x(n, p, "")) }) }) : /* @__PURE__ */ e.jsx("div", { className: "pl-6", children: /* @__PURE__ */ e.jsx(je, { data: x(s, p) }) })
141
+ h ? /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx("span", { className: "rounded-full bg-purple-100 px-2 py-0.5 text-[10px] text-purple-500", children: z(x(n, u, "")) }) }) : /* @__PURE__ */ e.jsx("div", { className: "pl-6", children: /* @__PURE__ */ e.jsx(ke, { data: x(s, u) }) })
143
142
  ]
144
143
  },
145
- p
144
+ u
146
145
  )) })
147
146
  ] })
148
147
  ] }) })
149
148
  ] })
150
149
  ] }),
151
- !y && !f(o) && /* @__PURE__ */ e.jsx("div", { className: "pt-2", children: /* @__PURE__ */ e.jsx(je, { data: x(s, o, ""), fullView: !0 }) })
150
+ !h && !f(a) && /* @__PURE__ */ e.jsx("div", { className: "pt-2", children: /* @__PURE__ */ e.jsx(ke, { data: x(s, a, ""), fullView: !0 }) })
152
151
  ] });
153
- }, Xr = ({
152
+ }, os = ({
154
153
  appliedBindings: r = [],
155
- onAddBinding: o,
154
+ onAddBinding: a,
156
155
  editMode: t,
157
156
  item: s
158
157
  }) => {
159
- const [l, i] = C(t ? s.key : ""), [a, c] = C(t ? s.value : ""), n = q(), [u] = rt(), y = V(
160
- (g, p) => {
158
+ const [l, i] = C(t ? s.key : ""), [o, c] = C(t ? s.value : ""), n = U(), [p] = ut(), h = V(
159
+ (g, u) => {
161
160
  if (f(g))
162
161
  return "";
163
162
  {
164
- const m = x(p === "PROP" ? n : u, g, "");
165
- if (ie(m))
163
+ const m = x(u === "PROP" ? n : p, g, "");
164
+ if (ce(m))
166
165
  return "list";
167
- const w = typeof m;
168
- return w === "string" ? "text" : w === "object" ? "model" : w;
166
+ const j = typeof m;
167
+ return j === "string" ? "text" : j === "object" ? "model" : j;
169
168
  }
170
169
  },
171
- [n, u]
172
- ), [d, h] = C(t ? y(s.key, "PROP") : "");
170
+ [n, p]
171
+ ), [d, y] = C(t ? h(s.key, "PROP") : "");
173
172
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
174
- /* @__PURE__ */ e.jsxs(Jt, { children: [
175
- /* @__PURE__ */ e.jsx(Qt, { children: "Add Data Binding" }),
176
- /* @__PURE__ */ e.jsx(er, { className: "text-xs", children: "Add prop and path of binding. Click save when you're done." })
173
+ /* @__PURE__ */ e.jsxs(dr, { children: [
174
+ /* @__PURE__ */ e.jsx(cr, { children: "Add Data Binding" }),
175
+ /* @__PURE__ */ e.jsx(pr, { className: "text-xs", children: "Add prop and path of binding. Click save when you're done." })
177
176
  ] }),
178
177
  /* @__PURE__ */ e.jsxs("div", { className: "relative flex flex-col gap-1", children: [
179
178
  /* @__PURE__ */ e.jsx(
180
- Ie,
179
+ Ue,
181
180
  {
182
181
  type: "PROP",
183
182
  isDisabled: !1,
@@ -185,8 +184,8 @@ const je = ({ data: r, fullView: o }) => {
185
184
  value: l,
186
185
  setValue: i,
187
186
  onChange: (g) => {
188
- const p = y(g, "PROP");
189
- i(g), d !== p && c(""), h(p);
187
+ const u = h(g, "PROP");
188
+ i(g), d !== u && c(""), y(u);
190
189
  },
191
190
  data: n,
192
191
  dataType: d,
@@ -195,40 +194,40 @@ const je = ({ data: r, fullView: o }) => {
195
194
  ),
196
195
  /* @__PURE__ */ e.jsx("div", { className: "h-2" }),
197
196
  /* @__PURE__ */ e.jsx(
198
- Ie,
197
+ Ue,
199
198
  {
200
199
  type: "PATH",
201
200
  isDisabled: f(l),
202
201
  placeholder: "Enter data path",
203
- value: a,
202
+ value: o,
204
203
  setValue: c,
205
204
  onChange: (g) => {
206
- const p = y(g, "PATH");
207
- c(d === p ? g : "");
205
+ const u = h(g, "PATH");
206
+ c(d === u ? g : "");
208
207
  },
209
- data: u,
208
+ data: p,
210
209
  dataType: d,
211
210
  appliedBindings: r
212
211
  }
213
212
  )
214
213
  ] }),
215
- /* @__PURE__ */ e.jsx(tr, { children: /* @__PURE__ */ e.jsx(
216
- xe,
214
+ /* @__PURE__ */ e.jsx(ur, { children: /* @__PURE__ */ e.jsx(
215
+ oe,
217
216
  {
218
217
  type: "submit",
219
218
  className: "mt-4",
220
- disabled: f(l) && f(a),
221
- onClick: () => o({ key: l, value: a }),
219
+ disabled: f(l) && f(o),
220
+ onClick: () => a({ key: l, value: o }),
222
221
  children: "Save"
223
222
  }
224
223
  ) })
225
224
  ] });
226
- }, lt = ({ disabled: r, children: o, onAddBinding: t, appliedBindings: s, editMode: l = !0, item: i = {} }) => {
227
- const [a, c] = C(!1);
228
- return /* @__PURE__ */ e.jsxs(rr, { children: [
229
- /* @__PURE__ */ e.jsx(lr, { disabled: r, asChild: !0, onClick: () => c(!0), children: o }),
230
- a && /* @__PURE__ */ e.jsx(sr, { children: /* @__PURE__ */ e.jsx(
231
- Xr,
225
+ }, xt = ({ disabled: r, children: a, onAddBinding: t, appliedBindings: s, editMode: l = !0, item: i = {} }) => {
226
+ const [o, c] = C(!1);
227
+ return /* @__PURE__ */ e.jsxs(xr, { children: [
228
+ /* @__PURE__ */ e.jsx(gr, { disabled: r, asChild: !0, onClick: () => c(!0), children: a }),
229
+ o && /* @__PURE__ */ e.jsx(hr, { children: /* @__PURE__ */ e.jsx(
230
+ os,
232
231
  {
233
232
  item: i,
234
233
  editMode: l,
@@ -239,94 +238,94 @@ const je = ({ data: r, fullView: o }) => {
239
238
  }
240
239
  ) })
241
240
  ] });
242
- }, zr = ({
241
+ }, as = ({
243
242
  item: r,
244
- onAddBinding: o,
243
+ onAddBinding: a,
245
244
  onRemove: t,
246
245
  selectedBlock: s,
247
246
  dataProvider: l,
248
247
  appliedBindings: i
249
248
  }) => {
250
- const [a, c] = C("string"), n = (u, y) => {
251
- if (f(u))
249
+ const [o, c] = C("string"), n = (p, h) => {
250
+ if (f(p))
252
251
  return "";
253
252
  {
254
- const d = x(y === "PROP" ? s : l, u, "");
255
- if (ie(d))
253
+ const d = x(h === "PROP" ? s : l, p, "");
254
+ if (ce(d))
256
255
  return "list";
257
- const h = typeof d;
258
- return h === "string" ? "text" : h === "object" ? "model" : h;
256
+ const y = typeof d;
257
+ return y === "string" ? "text" : y === "object" ? "model" : y;
259
258
  }
260
259
  };
261
260
  return O(() => c(() => n(r.key, "PROP")), [r.key]), /* @__PURE__ */ e.jsxs("div", { className: "relative flex flex-col rounded-md border border-gray-200 p-2", children: [
262
261
  /* @__PURE__ */ e.jsx("div", { className: "text-sm font-normal text-gray-500", children: r.key }),
263
262
  /* @__PURE__ */ e.jsx("div", { className: "font-medium leading-5", children: r.value }),
264
- /* @__PURE__ */ e.jsx(je, { data: x(l, r.value, "") }),
263
+ /* @__PURE__ */ e.jsx(ke, { data: x(l, r.value, "") }),
265
264
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-end gap-x-2", children: [
266
- /* @__PURE__ */ e.jsx(lt, { editMode: !0, onAddBinding: o, appliedBindings: i, item: r, children: /* @__PURE__ */ e.jsx(Tr, { className: "mt-1 h-6 w-6 cursor-pointer rounded border border-blue-400 p-1 text-blue-400 duration-200 hover:scale-105 hover:bg-blue-400 hover:text-white" }) }),
265
+ /* @__PURE__ */ e.jsx(xt, { editMode: !0, onAddBinding: a, appliedBindings: i, item: r, children: /* @__PURE__ */ e.jsx(Or, { className: "mt-1 h-6 w-6 cursor-pointer rounded border border-blue-400 p-1 text-blue-400 duration-200 hover:scale-105 hover:bg-blue-400 hover:text-white" }) }),
267
266
  /* @__PURE__ */ e.jsx(
268
- Rr,
267
+ Fr,
269
268
  {
270
269
  onClick: () => t(),
271
270
  className: "mt-1 h-6 w-6 cursor-pointer rounded border border-red-400 p-1 text-red-400 duration-200 hover:scale-105 hover:bg-red-400 hover:text-white"
272
271
  }
273
272
  )
274
273
  ] }),
275
- !f(a) && !f(r.key) && /* @__PURE__ */ e.jsx("div", { className: "absolute right-0 top-1 mt-px flex h-4 items-center rounded-full px-2 text-[10px] font-medium text-purple-600", children: Y(a) })
274
+ !f(o) && !f(r.key) && /* @__PURE__ */ e.jsx("div", { className: "absolute right-0 top-1 mt-px flex h-4 items-center rounded-full px-2 text-[10px] font-medium text-purple-600", children: z(o) })
276
275
  ] });
277
- }, Zr = ({ bindingData: r, onChange: o }) => {
278
- const t = q(), [s] = rt(), l = Hr(), [i, a] = C(
279
- k(r, (d, h) => ({ key: h, value: d }))
276
+ }, ns = ({ bindingData: r, onChange: a }) => {
277
+ const t = U(), [s] = ut(), l = Yr(), [i, o] = C(
278
+ k(r, (d, y) => ({ key: y, value: d }))
280
279
  );
281
280
  O(() => {
282
- a(k(r, (d, h) => ({ key: h, value: d })));
281
+ o(k(r, (d, y) => ({ key: y, value: d })));
283
282
  }, [t == null ? void 0 : t._id, r]);
284
283
  const c = _(() => {
285
284
  if (f(s))
286
285
  return !0;
287
286
  if (f(i))
288
287
  return !1;
289
- const d = ve(i);
288
+ const d = we(i);
290
289
  return f(d == null ? void 0 : d.key) || f(d == null ? void 0 : d.value);
291
290
  }, [s, i]), n = (d) => {
292
- const h = we(i, (g) => g.key !== d.key);
293
- a([...h, d]), y([...h, d]);
294
- }, u = (d) => {
295
- const h = we(i, (g, p) => d !== p);
296
- y([...h]);
297
- }, y = V(
291
+ const y = Ce(i, (g) => g.key !== d.key);
292
+ o([...y, d]), h([...y, d]);
293
+ }, p = (d) => {
294
+ const y = Ce(i, (g, u) => d !== u);
295
+ h([...y]);
296
+ }, h = V(
298
297
  (d = []) => {
299
- if (a(d), f(d)) {
300
- o({});
298
+ if (o(d), f(d)) {
299
+ a({});
301
300
  return;
302
301
  }
303
- const h = {};
304
- ke(d, (g) => {
305
- !f(g == null ? void 0 : g.key) && !f(g == null ? void 0 : g.value) && Oe(h, g.key, g.value);
306
- }), o(h);
302
+ const y = {};
303
+ _e(d, (g) => {
304
+ !f(g == null ? void 0 : g.key) && !f(g == null ? void 0 : g.value) && et(y, g.key, g.value);
305
+ }), a(y);
307
306
  },
308
- [o]
307
+ [a]
309
308
  );
310
309
  return f(l) ? /* @__PURE__ */ e.jsx("div", { className: "flex w-full items-center justify-center", children: /* @__PURE__ */ e.jsxs("p", { className: "mb-1.5 text-xs text-gray-500", children: [
311
310
  "You have no data providers registered. Please add a data provider to your project. ",
312
311
  /* @__PURE__ */ e.jsx("br", {}),
313
312
  /* @__PURE__ */ e.jsx("a", { className: "text-blue-500", href: "https://chaibuilder.com/docs/registering-data-providers", target: "_blank", children: "Learn more" })
314
313
  ] }) }) : /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
315
- k(i, (d, h) => /* @__PURE__ */ e.jsx(
316
- zr,
314
+ k(i, (d, y) => /* @__PURE__ */ e.jsx(
315
+ as,
317
316
  {
318
317
  item: d,
319
318
  onAddBinding: n,
320
- onRemove: () => u(h),
319
+ onRemove: () => p(y),
321
320
  selectedBlock: t,
322
321
  dataProvider: s,
323
322
  appliedBindings: k(i, "key")
324
323
  },
325
324
  d.key
326
325
  )),
327
- /* @__PURE__ */ e.jsxs(X, { delayDuration: 200, children: [
328
- /* @__PURE__ */ e.jsx(z, { disabled: f(s), className: "w-full", children: /* @__PURE__ */ e.jsx(
329
- lt,
326
+ /* @__PURE__ */ e.jsxs(Y, { delayDuration: 200, children: [
327
+ /* @__PURE__ */ e.jsx(X, { disabled: f(s), className: "w-full", children: /* @__PURE__ */ e.jsx(
328
+ xt,
330
329
  {
331
330
  disabled: c,
332
331
  appliedBindings: k(i, "key"),
@@ -343,68 +342,68 @@ const je = ({ data: r, fullView: o }) => {
343
342
  c && /* @__PURE__ */ e.jsx(Z, { sideOffset: -55, className: "text-[11px]", children: f(s) ? "No data provider has been set up for this page." : "Complete last added data binding to add more" })
344
343
  ] })
345
344
  ] });
346
- }, Wr = () => /* @__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" }), be = dt(({ properties: r, formData: o, onChange: t }) => {
345
+ }, is = () => /* @__PURE__ */ e.jsx("div", { className: "text-xs border rounded-sm p-1 mt-1 border-orange-500 text-orange-500 bg-orange-100", children: "Data binding is set for this field" }), fe = ft(({ properties: r, formData: a, onChange: t }) => {
347
346
  const s = { type: "object", properties: {} }, l = {};
348
347
  return Object.keys(r).forEach((i) => {
349
- const a = r[i];
350
- if (E(["slot", "styles"], a.type))
348
+ const o = r[i];
349
+ if (M(["slot", "styles"], o.type))
351
350
  return;
352
351
  const c = i;
353
- s.properties[c] = or(a), l[c] = ar(a);
352
+ s.properties[c] = yr(o), l[c] = br(o);
354
353
  }), /* @__PURE__ */ e.jsx(
355
- Ir,
354
+ Gr,
356
355
  {
357
356
  widgets: {
358
- binding: Wr,
359
- richtext: nr,
360
- icon: ir,
361
- image: dr
357
+ binding: is,
358
+ richtext: mr,
359
+ icon: fr,
360
+ image: vr
362
361
  },
363
- fields: { link: cr },
362
+ fields: { link: jr },
364
363
  idSeparator: ".",
365
364
  autoComplete: "off",
366
365
  omitExtraData: !1,
367
366
  liveOmit: !1,
368
367
  liveValidate: !1,
369
- validator: Pr,
368
+ validator: Kr,
370
369
  uiSchema: l,
371
370
  schema: s,
372
- formData: o,
371
+ formData: a,
373
372
  onChange: t
374
373
  }
375
374
  );
376
375
  });
377
- function Ur() {
378
- const r = q(), o = We(), t = pr(), s = et(r._type), l = { ...r }, [i, a] = C(l), c = ur("dataBindingSupport", !1), n = ({ formData: p }, m, w) => {
376
+ function ds() {
377
+ const r = U(), a = at(), t = wr(), s = De(r._type), l = { ...r }, [i, o] = C(l), c = Cr("dataBindingSupport", !1), n = ({ formData: u }, m, j) => {
379
378
  if (m) {
380
- const D = m.replace("root.", "");
381
- t([r._id], { [D]: x(p, D) }, w);
379
+ const B = m.replace("root.", "");
380
+ t([r._id], { [B]: x(u, B) }, j);
382
381
  }
383
- }, u = V(
384
- gt(({ formData: p }, m, w) => {
385
- n({ formData: p }, m, w), a(p);
382
+ }, p = V(
383
+ kt(({ formData: u }, m, j) => {
384
+ n({ formData: u }, m, j), o(u);
386
385
  }, 1500),
387
386
  []
388
- ), y = ({ formData: p }, m) => {
387
+ ), h = ({ formData: u }, m) => {
389
388
  if (m) {
390
- const w = m.replace("root.", "");
391
- o([r._id], { [w]: x(p, w) }), u({ formData: p }, m, { [w]: x(i, w) });
389
+ const j = m.replace("root.", "");
390
+ a([r._id], { [j]: x(u, j) }), p({ formData: u }, m, { [j]: x(i, j) });
392
391
  }
393
392
  }, d = {
394
- _name: _r({
393
+ _name: Er({
395
394
  title: "Name",
396
395
  default: x(r, "_name", r._type)
397
396
  })
398
- }, h = ht(x(l, "_bindings", {})), g = _(() => {
399
- const p = yt(x(s, "props", {}));
400
- return c && bt(h, (m) => delete p[m]), p;
401
- }, [s, h, c]);
397
+ }, y = Nt(x(l, "_bindings", {})), g = _(() => {
398
+ const u = _t(x(s, "props", {}));
399
+ return c && St(y, (m) => delete u[m]), u;
400
+ }, [s, y, c]);
402
401
  return /* @__PURE__ */ e.jsxs("div", { className: "overflow-x-hidden", children: [
403
- /* @__PURE__ */ e.jsx(be, { onChange: y, formData: l, properties: d }),
402
+ /* @__PURE__ */ e.jsx(fe, { onChange: h, formData: l, properties: d }),
404
403
  /* @__PURE__ */ e.jsx("hr", { className: "mt-4" }),
405
- c ? /* @__PURE__ */ e.jsxs(Ue, { type: "multiple", defaultValue: ["STATIC", "BINDING"], className: "h-full w-full", children: [
406
- /* @__PURE__ */ e.jsxs(de, { value: "BINDING", children: [
407
- /* @__PURE__ */ e.jsx(ce, { 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: [
404
+ c ? /* @__PURE__ */ e.jsxs(nt, { type: "multiple", defaultValue: ["STATIC", "BINDING"], className: "h-full w-full", children: [
405
+ /* @__PURE__ */ e.jsxs(pe, { value: "BINDING", children: [
406
+ /* @__PURE__ */ e.jsx(ue, { className: "bg-gray-100 px-3 py-2 text-xs hover:no-underline", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
408
407
  /* @__PURE__ */ e.jsx(
409
408
  "div",
410
409
  {
@@ -413,90 +412,90 @@ function Ur() {
413
412
  ),
414
413
  "Data Binding"
415
414
  ] }) }),
416
- /* @__PURE__ */ e.jsx(pe, { className: "px-4 pt-4", children: /* @__PURE__ */ e.jsx(
417
- Zr,
415
+ /* @__PURE__ */ e.jsx(xe, { className: "px-4 pt-4", children: /* @__PURE__ */ e.jsx(
416
+ ns,
418
417
  {
419
418
  bindingData: x(r, "_bindings", {}),
420
- onChange: (p) => {
421
- n({ formData: { _bindings: p } }, "root._bindings");
419
+ onChange: (u) => {
420
+ n({ formData: { _bindings: u } }, "root._bindings");
422
421
  }
423
422
  }
424
423
  ) })
425
424
  ] }),
426
- /* @__PURE__ */ e.jsxs(de, { value: "STATIC", children: [
427
- /* @__PURE__ */ e.jsx(ce, { 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: [
425
+ /* @__PURE__ */ e.jsxs(pe, { value: "STATIC", children: [
426
+ /* @__PURE__ */ e.jsx(ue, { className: "bg-gray-100 px-3 py-2 text-xs hover:no-underline", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
428
427
  /* @__PURE__ */ e.jsx("div", { className: "h-[8px] w-[8px] rounded-full bg-blue-500" }),
429
428
  "Static Content"
430
429
  ] }) }),
431
- /* @__PURE__ */ e.jsxs(pe, { className: "pt-4", children: [
432
- f(h) ? null : /* @__PURE__ */ e.jsxs("div", { className: "mx-4 mb-1 mt-0 rounded-sm border border-orange-500 bg-orange-100 p-1 text-xs text-orange-500", children: [
430
+ /* @__PURE__ */ e.jsxs(xe, { className: "pt-4", children: [
431
+ f(y) ? null : /* @__PURE__ */ e.jsxs("div", { className: "mx-4 mb-1 mt-0 rounded-sm border border-orange-500 bg-orange-100 p-1 text-xs text-orange-500", children: [
433
432
  "Data binding is set for ",
434
- /* @__PURE__ */ e.jsx("b", { children: k(h, mt).join(", ") }),
433
+ /* @__PURE__ */ e.jsx("b", { children: k(y, Tt).join(", ") }),
435
434
  " ",
436
- h.length === 1 ? "property" : "properties",
435
+ y.length === 1 ? "property" : "properties",
437
436
  ". Remove data binding to edit static content."
438
437
  ] }),
439
- /* @__PURE__ */ e.jsx(be, { onChange: y, formData: l, properties: g })
438
+ /* @__PURE__ */ e.jsx(fe, { onChange: h, formData: l, properties: g })
440
439
  ] })
441
440
  ] })
442
- ] }) : /* @__PURE__ */ e.jsx(be, { onChange: y, formData: l, properties: g }),
441
+ ] }) : /* @__PURE__ */ e.jsx(fe, { onChange: h, formData: l, properties: g }),
443
442
  /* @__PURE__ */ e.jsx("div", { className: "pb-60" })
444
443
  ] });
445
444
  }
446
- const Pe = new Lr(Mr, {
445
+ const Ge = new Jr(Qr, {
447
446
  isCaseSensitive: !1,
448
447
  threshold: 0.2,
449
448
  minMatchCharLength: 2,
450
449
  keys: ["name"]
451
450
  });
452
- function Kr() {
453
- var D;
454
- const [r] = Se(), o = q(), t = Ke(), s = qe(), [l] = Ge(), [i, a] = C(""), c = (D = ue(r)) == null ? void 0 : D.prop, n = ft((x(o, c, "").replace(Fr, "").split(",").pop() || "").split(" "), f), u = () => {
455
- const j = i.trim().toLowerCase().replace(/ +(?= )/g, "").split(" ");
456
- t(l, j, !0), a("");
457
- }, [y, d] = C([]), h = ({ value: j }) => {
458
- const I = j.trim().toLowerCase(), L = I.match(/.+:/g);
451
+ function cs() {
452
+ var B;
453
+ const [r] = he(), a = U(), t = Re(), s = it(), [l] = dt(), [i, o] = C(""), c = (B = ge(r)) == null ? void 0 : B.prop, n = Rt((x(a, c, "").replace(ts, "").split(",").pop() || "").split(" "), f), p = () => {
454
+ const w = i.trim().toLowerCase().replace(/ +(?= )/g, "").split(" ");
455
+ t(l, w, !0), o("");
456
+ }, [h, d] = C([]), y = ({ value: w }) => {
457
+ const P = w.trim().toLowerCase(), E = P.match(/.+:/g);
459
458
  let N = [];
460
- if (L && L.length > 0) {
461
- const [$] = L, F = I.replace($, "");
462
- N = Pe.search(F).map((b) => ({
459
+ if (E && E.length > 0) {
460
+ const [$] = E, F = P.replace($, "");
461
+ N = Ge.search(F).map((b) => ({
463
462
  ...b,
464
463
  item: { ...b.item, name: $ + b.item.name }
465
464
  }));
466
465
  } else
467
- N = Pe.search(I);
466
+ N = Ge.search(P);
468
467
  d(k(N, "item"));
469
468
  }, g = () => {
470
469
  d([]);
471
- }, p = (j) => j.name, m = (j) => /* @__PURE__ */ e.jsx("div", { className: "rounded-md p-1", children: j.name }), w = {
470
+ }, u = (w) => w.name, m = (w) => /* @__PURE__ */ e.jsx("div", { className: "rounded-md p-1", children: w.name }), j = {
472
471
  autoComplete: "off",
473
472
  autoCorrect: "off",
474
473
  autoCapitalize: "off",
475
474
  spellCheck: !1,
476
475
  placeholder: "Enter class name",
477
476
  value: i,
478
- onKeyDown: (j) => {
479
- j.key === "Enter" && i.trim() !== "" && u();
477
+ onKeyDown: (w) => {
478
+ w.key === "Enter" && i.trim() !== "" && p();
480
479
  },
481
- onChange: (j, { newValue: I }) => a(I),
480
+ onChange: (w, { newValue: P }) => o(P),
482
481
  className: "w-full rounded-md text-xs px-2 hover:outline-0 bg-background border-border py-1"
483
482
  };
484
483
  return /* @__PURE__ */ e.jsxs(
485
484
  "div",
486
485
  {
487
- className: `no-scrollbar flex ${y.length > 0 ? "min-h-[300px]" : "min-h-max"} w-full flex-col gap-y-5 overflow-y-auto bg-gray-100 px-px`,
486
+ className: `no-scrollbar flex ${h.length > 0 ? "min-h-[300px]" : "min-h-max"} w-full flex-col gap-y-5 overflow-y-auto bg-gray-100 px-px`,
488
487
  children: [
489
- /* @__PURE__ */ e.jsx(Te, { className: "mt-2", children: "Add Tailwind classes" }),
488
+ /* @__PURE__ */ e.jsx(Ve, { className: "mt-2", children: "Add Tailwind classes" }),
490
489
  /* @__PURE__ */ e.jsxs("div", { className: "relative -mt-4 flex items-center gap-x-3", children: [
491
490
  /* @__PURE__ */ e.jsx("div", { className: "relative flex w-full items-center gap-x-3", children: /* @__PURE__ */ e.jsx(
492
- Er,
491
+ qr,
493
492
  {
494
- suggestions: y,
495
- onSuggestionsFetchRequested: h,
493
+ suggestions: h,
494
+ onSuggestionsFetchRequested: y,
496
495
  onSuggestionsClearRequested: g,
497
- getSuggestionValue: p,
496
+ getSuggestionValue: u,
498
497
  renderSuggestion: m,
499
- inputProps: w,
498
+ inputProps: j,
500
499
  containerProps: {
501
500
  className: "relative h-8 w-full gap-y-1 py-1 border-gray-600"
502
501
  },
@@ -508,36 +507,36 @@ function Kr() {
508
507
  }
509
508
  ) }),
510
509
  /* @__PURE__ */ e.jsx(
511
- xe,
510
+ oe,
512
511
  {
513
512
  variant: "outline",
514
513
  className: "h-6 border-gray-700",
515
- onClick: u,
514
+ onClick: p,
516
515
  disabled: i.trim() === "",
517
516
  size: "sm",
518
- children: /* @__PURE__ */ e.jsx(Ne, {})
517
+ children: /* @__PURE__ */ e.jsx(Se, {})
519
518
  }
520
519
  )
521
520
  ] }),
522
521
  /* @__PURE__ */ e.jsxs("div", { className: "flex w-full flex-wrap gap-2", children: [
523
522
  f(n) && /* @__PURE__ */ e.jsx("div", { className: "flex h-10 w-full items-center justify-center text-center text-sm text-gray-400", children: "No class added" }),
524
- ne.Children.toArray(
525
- n.map((j) => /* @__PURE__ */ e.jsxs(
523
+ de.Children.toArray(
524
+ n.map((w) => /* @__PURE__ */ e.jsxs(
526
525
  "div",
527
526
  {
528
527
  className: "group relative flex cursor-default items-center gap-x-1 rounded-full border border-blue-600 bg-blue-500 p-px px-1.5 text-[11px] text-white hover:border-blue-900",
529
528
  children: [
530
- j,
529
+ w,
531
530
  /* @__PURE__ */ e.jsx(
532
- Xe,
531
+ st,
533
532
  {
534
- onClick: () => s(l, [j]),
533
+ onClick: () => s(l, [w]),
535
534
  className: "invisible absolute right-1 hover:text-white group-hover:visible group-hover:cursor-pointer"
536
535
  }
537
536
  )
538
537
  ]
539
538
  },
540
- j
539
+ w
541
540
  ))
542
541
  )
543
542
  ] })
@@ -545,16 +544,16 @@ function Kr() {
545
544
  }
546
545
  );
547
546
  }
548
- const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], qr = {
547
+ const D = ["px", "%", "em", "rem", "ch", "vh", "vw"], ps = {
549
548
  heading: "flex.heading",
550
549
  items: [
551
- { type: "arbitrary", label: "flex.basis", units: B, property: "flexBasis" },
550
+ { type: "arbitrary", label: "flex.basis", units: D, property: "flexBasis" },
552
551
  { type: "range", label: "flex.order", property: "order" },
553
552
  { type: "dropdown", label: "flex.flex", property: "flexGrowShrink" },
554
553
  { type: "dropdown", label: "flex.grow", property: "flexGrow" },
555
554
  { type: "dropdown", label: "flex.shrink", property: "flexShrink" }
556
555
  ]
557
- }, Gr = {
556
+ }, us = {
558
557
  heading: "grid.heading",
559
558
  items: [
560
559
  { type: "range", label: "grid.col_span", property: "gridColSpan" },
@@ -565,17 +564,17 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], qr = {
565
564
  { type: "range", label: "grid.row_end", property: "gridRowEnd" },
566
565
  { type: "range", label: "grid.order", property: "order" }
567
566
  ]
568
- }, Jr = [
567
+ }, xs = [
569
568
  {
570
569
  heading: "layout.heading",
571
570
  items: [
572
- { type: "arbitrary", label: "layout.width", units: B.concat("auto"), property: "width" },
573
- { type: "arbitrary", label: "layout.height", units: B.concat("auto"), property: "height" },
571
+ { type: "arbitrary", label: "layout.width", units: D.concat("auto"), property: "width" },
572
+ { type: "arbitrary", label: "layout.height", units: D.concat("auto"), property: "height" },
574
573
  {
575
574
  styleType: "multiple",
576
575
  label: "layout.margin",
577
576
  negative: !0,
578
- units: [...B, "auto"],
577
+ units: [...D, "auto"],
579
578
  options: [
580
579
  { key: "margin", label: "layout.margin_all" },
581
580
  { key: "marginX", label: "layout.margin_lr" },
@@ -616,16 +615,16 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], qr = {
616
615
  styleType: "accordion",
617
616
  heading: "size.min_width_height",
618
617
  items: [
619
- { type: "arbitrary", label: "size.min_width", units: B.concat("auto"), property: "minWidth" },
620
- { type: "arbitrary", label: "size.min_height", units: B.concat("auto"), property: "minHeight" }
618
+ { type: "arbitrary", label: "size.min_width", units: D.concat("auto"), property: "minWidth" },
619
+ { type: "arbitrary", label: "size.min_height", units: D.concat("auto"), property: "minHeight" }
621
620
  ]
622
621
  },
623
622
  {
624
623
  styleType: "accordion",
625
624
  heading: "size.max_width_height",
626
625
  items: [
627
- { type: "arbitrary", label: "size.max_width", units: B.concat("auto"), property: "maxWidth" },
628
- { type: "arbitrary", label: "size.max_height", units: B.concat("auto"), property: "maxHeight" }
626
+ { type: "arbitrary", label: "size.max_width", units: D.concat("auto"), property: "maxWidth" },
627
+ { type: "arbitrary", label: "size.max_height", units: D.concat("auto"), property: "maxHeight" }
629
628
  ]
630
629
  },
631
630
  {
@@ -642,7 +641,7 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], qr = {
642
641
  {
643
642
  heading: "display.heading",
644
643
  items: [
645
- { type: "dropdown", label: "display.display", property: "display", units: B },
644
+ { type: "dropdown", label: "display.display", property: "display", units: D },
646
645
  {
647
646
  styleType: "accordion",
648
647
  heading: "display.flex_options",
@@ -693,7 +692,7 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], qr = {
693
692
  styleType: "accordion",
694
693
  heading: "display.visibility_opacity",
695
694
  items: [
696
- { type: "dropdown", label: "display.visibility", property: "visibility", units: B },
695
+ { type: "dropdown", label: "display.visibility", property: "visibility", units: D },
697
696
  { type: "arbitrary", label: "display.opacity", property: "opacity", units: ["-"] }
698
697
  ]
699
698
  }
@@ -769,8 +768,8 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], qr = {
769
768
  heading: "typography.heading",
770
769
  items: [
771
770
  { type: "dropdown", property: "fontFamily", label: "typography.font" },
772
- { type: "arbitrary", property: "fontSize", label: "typography.size", units: B },
773
- { type: "arbitrary", property: "lineHeight", label: "typography.height", units: B.concat("-") },
771
+ { type: "arbitrary", property: "fontSize", label: "typography.size", units: D },
772
+ { type: "arbitrary", property: "lineHeight", label: "typography.height", units: D.concat("-") },
774
773
  { type: "range", property: "fontWeight", label: "typography.weight" },
775
774
  { type: "color", property: "textColor", label: "typography.color" },
776
775
  {
@@ -967,15 +966,15 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], qr = {
967
966
  },
968
967
  {
969
968
  heading: "classes.heading",
970
- items: [{ component: Kr }]
969
+ items: [{ component: cs }]
971
970
  }
972
- ], st = {
971
+ ], gt = {
973
972
  "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" }) }),
974
973
  // visibility
975
- visible: kt,
976
- invisible: He,
974
+ visible: $t,
975
+ invisible: Pe,
977
976
  // display
978
- hidden: He,
977
+ hidden: Pe,
979
978
  gap: A,
980
979
  gapX: T,
981
980
  gapY: R,
@@ -1008,10 +1007,10 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], qr = {
1008
1007
  borderRadiusRight: ee,
1009
1008
  borderRadiusBottom: te,
1010
1009
  borderRadiusLeft: re,
1011
- borderRadiusTopLeft: Nt,
1012
- borderRadiusTopRight: _t,
1013
- borderRadiusBottomRight: St,
1014
- borderRadiusBottomLeft: Tt,
1010
+ borderRadiusTopLeft: Pt,
1011
+ borderRadiusTopRight: It,
1012
+ borderRadiusBottomRight: At,
1013
+ borderRadiusBottomLeft: Mt,
1015
1014
  divideXWidth: T,
1016
1015
  divideYWidth: R,
1017
1016
  scale: A,
@@ -1038,18 +1037,18 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], qr = {
1038
1037
  marginBottom: te,
1039
1038
  marginLeft: re,
1040
1039
  // text-align
1041
- textLeft: Rt,
1042
- textCenter: Vt,
1043
- textRight: Ht,
1044
- textJustify: Bt,
1040
+ textLeft: Et,
1041
+ textCenter: Lt,
1042
+ textRight: Ot,
1043
+ textJustify: Ft,
1045
1044
  // font style
1046
- italic: Dt,
1045
+ italic: zt,
1047
1046
  // "not-italic": "",
1048
1047
  // decoration
1049
- underline: $t,
1050
- overline: It,
1048
+ underline: Yt,
1049
+ overline: Xt,
1051
1050
  // transform
1052
- uppercase: Pt,
1051
+ uppercase: Zt,
1053
1052
  block: () => /* @__PURE__ */ e.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
1054
1053
  /* @__PURE__ */ e.jsx(
1055
1054
  "path",
@@ -1090,7 +1089,7 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], qr = {
1090
1089
  }
1091
1090
  )
1092
1091
  ] }),
1093
- "float-none": Xe,
1092
+ "float-none": st,
1094
1093
  // position
1095
1094
  fixed: () => /* @__PURE__ */ e.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
1096
1095
  /* @__PURE__ */ e.jsx(
@@ -1162,52 +1161,52 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], qr = {
1162
1161
  }
1163
1162
  )
1164
1163
  ] }),
1165
- static: At
1166
- }, oe = Me({ canReset: !1, canChange: !0 }), Qr = ({ children: r, canReset: o = !1, canChange: t = !0 }) => (
1164
+ static: Wt
1165
+ }, ae = Qe({ canReset: !1, canChange: !0 }), gs = ({ children: r, canReset: a = !1, canChange: t = !0 }) => (
1167
1166
  // eslint-disable-next-line react/jsx-no-constructed-context-values
1168
- /* @__PURE__ */ e.jsx(oe.Provider, { value: { canReset: o, canChange: t }, children: r })
1169
- ), ot = ({ label: r, property: o, onChange: t }) => {
1170
- const s = _(() => x(he, `${o}.classes`, [""]), [o]), l = ae(o), i = _(() => x(l, "cls", ""), [l]), { canChange: a } = se(oe), c = /\[.*\]/g.test(i);
1167
+ /* @__PURE__ */ e.jsx(ae.Provider, { value: { canReset: a, canChange: t }, children: r })
1168
+ ), ht = ({ label: r, property: a, onChange: t }) => {
1169
+ const s = _(() => x(be, `${a}.classes`, [""]), [a]), l = ne(a), i = _(() => x(l, "cls", ""), [l]), { canChange: o } = le(ae), c = /\[.*\]/g.test(i);
1171
1170
  return /* @__PURE__ */ e.jsx("div", { className: r ? "w-full rounded" : "grow", children: c ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
1172
- /* @__PURE__ */ e.jsx(xr, { className: "w-[70%] rounded py-1", readOnly: !0, value: i }),
1173
- /* @__PURE__ */ e.jsxs(X, { delayDuration: 100, children: [
1174
- /* @__PURE__ */ e.jsx(z, { 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(_e, {}) }) }),
1171
+ /* @__PURE__ */ e.jsx(kr, { className: "w-[70%] rounded py-1", readOnly: !0, value: i }),
1172
+ /* @__PURE__ */ e.jsxs(Y, { delayDuration: 100, children: [
1173
+ /* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsx("button", { type: "button", className: "invisible ml-3 mt-1 text-blue-600 group-hover:visible", children: /* @__PURE__ */ e.jsx(Te, {}) }) }),
1175
1174
  /* @__PURE__ */ e.jsx(Z, { children: "Current value is using a Tailwind arbitrary value." })
1176
1175
  ] })
1177
1176
  ] }) : /* @__PURE__ */ e.jsx(
1178
- Ce,
1177
+ Ne,
1179
1178
  {
1180
1179
  rounded: r,
1181
- onChange: (n) => t(n, o),
1180
+ onChange: (n) => t(n, a),
1182
1181
  selected: i,
1183
1182
  options: s,
1184
- disabled: !a
1183
+ disabled: !o
1185
1184
  }
1186
1185
  ) });
1187
1186
  };
1188
- function Ce({ selected: r, onChange: o, rounded: t = !1, options: s, disabled: l = !1 }) {
1189
- const i = r.replace(/.*:/g, "").trim(), { undo: a, redo: c } = gr();
1187
+ function Ne({ selected: r, onChange: a, rounded: t = !1, options: s, disabled: l = !1 }) {
1188
+ const i = r.replace(/.*:/g, "").trim(), { undo: o, redo: c } = Nr();
1190
1189
  return /* @__PURE__ */ e.jsxs(
1191
1190
  "select",
1192
1191
  {
1193
1192
  disabled: !s.length || l,
1194
1193
  className: `${t ? "rounded-md border border-border" : "border-0"} disable:bg-gray-500 h-full w-full truncate rounded bg-background px-2 py-1 text-xs outline-none disabled:cursor-not-allowed`,
1195
- onChange: (n) => o(n.target.value),
1194
+ onChange: (n) => a(n.target.value),
1196
1195
  onKeyDown: (n) => {
1197
- n.ctrlKey && (n.key === "z" && a(), n.key === "y" && c());
1196
+ n.ctrlKey && (n.key === "z" && o(), n.key === "y" && c());
1198
1197
  },
1199
1198
  value: i,
1200
1199
  children: [
1201
1200
  /* @__PURE__ */ e.jsx("option", { className: "bg-transparent", value: "" }),
1202
- P.Children.toArray(
1201
+ I.Children.toArray(
1203
1202
  s.map((n) => /* @__PURE__ */ e.jsx("option", { className: "bg-transparent", value: n, children: n }))
1204
1203
  )
1205
1204
  ]
1206
1205
  }
1207
1206
  );
1208
1207
  }
1209
- const el = ({ property: r, onChange: o }) => {
1210
- const { canReset: t, canChange: s } = se(oe), l = ae(r), i = _(() => x(l, "cls", ""), [l]), a = _(() => x(he, `${r}.classes`, [""]), [r]), c = a.indexOf(i) > -1 ? a.indexOf(i) : 0, n = /\[.*\]/g.test(i);
1208
+ const hs = ({ property: r, onChange: a }) => {
1209
+ const { canReset: t, canChange: s } = le(ae), l = ne(r), i = _(() => x(l, "cls", ""), [l]), o = _(() => x(be, `${r}.classes`, [""]), [r]), c = o.indexOf(i) > -1 ? o.indexOf(i) : 0, n = /\[.*\]/g.test(i);
1211
1210
  return /* @__PURE__ */ e.jsx("div", { className: "flex flex-row divide-x divide-solid divide-border rounded border border-border text-xs", children: n ? /* @__PURE__ */ e.jsx("div", { className: "py-[5px] px-2", children: i }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1212
1211
  /* @__PURE__ */ e.jsx(
1213
1212
  "button",
@@ -1215,48 +1214,48 @@ const el = ({ property: r, onChange: o }) => {
1215
1214
  type: "button",
1216
1215
  className: "box-border w-2/12 rounded-tl rounded-bl bg-background px-1 text-center hover:bg-bg-gray-700 disabled:cursor-not-allowed disabled:bg-gray-600",
1217
1216
  disabled: !s && (!t || c - 1 < 0),
1218
- onClick: () => o(Ve(a, c - 1), r),
1217
+ onClick: () => a($e(o, c - 1), r),
1219
1218
  children: /* @__PURE__ */ e.jsx("span", { className: "flex items-center justify-center", children: /* @__PURE__ */ e.jsx(
1220
- Et,
1219
+ Ut,
1221
1220
  {
1222
1221
  className: !s && (!t || c - 1 < 0) ? "text-gray-500" : "text-black/60 dark:text-white/60"
1223
1222
  }
1224
1223
  ) })
1225
1224
  }
1226
1225
  ),
1227
- /* @__PURE__ */ e.jsx("div", { className: "w-8/12 text-center", children: /* @__PURE__ */ e.jsx(ot, { label: !1, property: r, onChange: o }) }),
1226
+ /* @__PURE__ */ e.jsx("div", { className: "w-8/12 text-center", children: /* @__PURE__ */ e.jsx(ht, { label: !1, property: r, onChange: a }) }),
1228
1227
  /* @__PURE__ */ e.jsx(
1229
1228
  "button",
1230
1229
  {
1231
1230
  type: "button",
1232
1231
  className: "w-2/12 rounded-tr rounded-br bg-background px-1 text-center hover:bg-bg-gray-700 disabled:cursor-not-allowed disabled:bg-gray-600",
1233
- disabled: !s && (!t || c + 1 >= a.length),
1234
- onClick: () => o(Ve(a, c + 1), r),
1232
+ disabled: !s && (!t || c + 1 >= o.length),
1233
+ onClick: () => a($e(o, c + 1), r),
1235
1234
  children: /* @__PURE__ */ e.jsx("span", { className: "flex items-center justify-center", children: /* @__PURE__ */ e.jsx(
1236
- Ne,
1235
+ Se,
1237
1236
  {
1238
- className: !s && (!t || c + 1 >= a.length) ? "text-gray-500" : "text-black/60 dark:text-white/60"
1237
+ className: !s && (!t || c + 1 >= o.length) ? "text-gray-500" : "text-black/60 dark:text-white/60"
1239
1238
  }
1240
1239
  ) })
1241
1240
  }
1242
1241
  )
1243
1242
  ] }) });
1244
- }, tl = ({ property: r, onChange: o }) => {
1245
- const t = _(() => x(he, `${r}.classes`, [""]), [r]), { canChange: s } = se(oe), l = ae(r), i = _(() => x(l, "cls", ""), [l]);
1246
- return /* @__PURE__ */ e.jsx("div", { className: "flex grow flex-wrap gap-1", children: k(t, (a) => /* @__PURE__ */ e.jsxs(X, { children: [
1247
- /* @__PURE__ */ e.jsx(z, { asChild: !0, children: /* @__PURE__ */ e.jsx(
1243
+ }, ys = ({ property: r, onChange: a }) => {
1244
+ const t = _(() => x(be, `${r}.classes`, [""]), [r]), { canChange: s } = le(ae), l = ne(r), i = _(() => x(l, "cls", ""), [l]);
1245
+ return /* @__PURE__ */ e.jsx("div", { className: "flex grow flex-wrap gap-1", children: k(t, (o) => /* @__PURE__ */ e.jsxs(Y, { children: [
1246
+ /* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsx(
1248
1247
  "button",
1249
1248
  {
1250
1249
  type: "button",
1251
1250
  disabled: !s,
1252
- onClick: () => o(a, r),
1253
- className: `cursor-pointer rounded border border-gray-600 p-1 disabled:cursor-not-allowed ${i === a ? " bg-blue-500 text-white" : "disabled:bg-gray-600 disabled:text-gray-400"}`,
1254
- children: P.createElement(x(st, a, ze))
1251
+ onClick: () => a(o, r),
1252
+ className: `cursor-pointer rounded border border-gray-600 p-1 disabled:cursor-not-allowed ${i === o ? " bg-blue-500 text-white" : "disabled:bg-gray-600 disabled:text-gray-400"}`,
1253
+ children: I.createElement(x(gt, o, lt))
1255
1254
  }
1256
1255
  ) }),
1257
- /* @__PURE__ */ e.jsx(Z, { children: Y(le(a)) })
1256
+ /* @__PURE__ */ e.jsx(Z, { children: z(se(o)) })
1258
1257
  ] })) });
1259
- }, rl = {
1258
+ }, bs = {
1260
1259
  backgroundColor: "bg",
1261
1260
  textColor: "text",
1262
1261
  borderColor: "border",
@@ -1268,39 +1267,39 @@ const el = ({ property: r, onChange: o }) => {
1268
1267
  toColor: "to",
1269
1268
  ringColor: "ring",
1270
1269
  ringOffsetColor: "ring-offset"
1271
- }, ll = ({ property: r, onChange: o }) => {
1272
- const t = ae(r), s = _(() => x(t, "cls", ""), [t]), { canChange: l } = se(oe), [i, a] = C([]), [c, n] = C({ color: "", shade: "" }), u = s.split("-"), y = x(u, "1", ""), d = x(u, "2", ""), h = V(
1270
+ }, ms = ({ property: r, onChange: a }) => {
1271
+ const t = ne(r), s = _(() => x(t, "cls", ""), [t]), { canChange: l } = le(ae), [i, o] = C([]), [c, n] = C({ color: "", shade: "" }), p = s.split("-"), h = x(p, "1", ""), d = x(p, "2", ""), y = V(
1273
1272
  // eslint-disable-next-line no-shadow
1274
- (p) => {
1275
- ["current", "inherit", "transparent", "black", "white"].includes(p) ? (a([]), n({ color: p })) : (a(["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"]), n((m) => ({ ...m, color: p, shade: m.shade ? m.shade : "500" })));
1273
+ (u) => {
1274
+ ["current", "inherit", "transparent", "black", "white"].includes(u) ? (o([]), n({ color: u })) : (o(["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"]), n((m) => ({ ...m, color: u, shade: m.shade ? m.shade : "500" })));
1276
1275
  },
1277
- [a, n]
1276
+ [o, n]
1278
1277
  );
1279
1278
  O(() => {
1280
- if (["current", "inherit", "transparent", "black", "white"].includes(y))
1281
- return a([]);
1282
- a(["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"]);
1283
- }, [y]);
1279
+ if (["current", "inherit", "transparent", "black", "white"].includes(h))
1280
+ return o([]);
1281
+ o(["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"]);
1282
+ }, [h]);
1284
1283
  const g = V(
1285
1284
  // eslint-disable-next-line no-shadow
1286
- (p) => {
1287
- n({ color: y, shade: p });
1285
+ (u) => {
1286
+ n({ color: h, shade: u });
1288
1287
  },
1289
- [y]
1288
+ [h]
1290
1289
  );
1291
1290
  return O(() => {
1292
1291
  n({ color: "", shade: "" });
1293
1292
  }, [t]), O(() => {
1294
- const m = `${x(rl, r, "")}-${c.color}${c.shade ? `-${c.shade}` : ""}`;
1295
- m.match(new RegExp(x(he, `${r}.regExp`, ""))) && o(m, r);
1296
- }, [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: [
1293
+ const m = `${x(bs, r, "")}-${c.color}${c.shade ? `-${c.shade}` : ""}`;
1294
+ m.match(new RegExp(x(be, `${r}.regExp`, ""))) && a(m, r);
1295
+ }, [c, a, r]), /* @__PURE__ */ e.jsxs("div", { className: "flex flex-row divide-x divide-solid divide-border rounded-lg border border-border text-xs", children: [
1297
1296
  /* @__PURE__ */ e.jsx("div", { className: "grow text-center", children: /* @__PURE__ */ e.jsx(
1298
- Ce,
1297
+ Ne,
1299
1298
  {
1300
1299
  disabled: !l,
1301
1300
  rounded: !0,
1302
- selected: y,
1303
- onChange: h,
1301
+ selected: h,
1302
+ onChange: y,
1304
1303
  options: [
1305
1304
  "current",
1306
1305
  "transparent",
@@ -1333,20 +1332,20 @@ const el = ({ property: r, onChange: o }) => {
1333
1332
  ]
1334
1333
  }
1335
1334
  ) }),
1336
- /* @__PURE__ */ e.jsx("button", { type: "button", className: "grow text-center", children: /* @__PURE__ */ e.jsx(Ce, { rounded: !0, selected: d, disabled: !y || !l, onChange: g, options: i }) })
1335
+ /* @__PURE__ */ e.jsx("button", { type: "button", className: "grow text-center", children: /* @__PURE__ */ e.jsx(Ne, { rounded: !0, selected: d, disabled: !h || !l, onChange: g, options: i }) })
1337
1336
  ] });
1338
- }, Ae = (r, o) => {
1337
+ }, Ke = (r, a) => {
1339
1338
  r = r.toLowerCase();
1340
1339
  let t = r.trim().replace(/ |\+/g, "");
1341
- if ((t === "auto" || t === "none") && o.includes(t))
1340
+ if ((t === "auto" || t === "none") && a.includes(t))
1342
1341
  return { value: "", unit: t };
1343
- const s = o.length ? new RegExp(o.join("|"), "g") : /XXXXXX/g;
1342
+ const s = a.length ? new RegExp(a.join("|"), "g") : /XXXXXX/g;
1344
1343
  t = t.replace(s, "");
1345
- const l = r.match(s), i = l && l.length > 1, a = !f(t) && Number.isNaN(Number(t));
1346
- return i || a ? { error: "Invalid value" } : l && (l[0] === "auto" || l[0] === "none") ? { value: l[0], unit: "" } : { value: t, unit: l ? l[0] : "" };
1344
+ const l = r.match(s), i = l && l.length > 1, o = !f(t) && Number.isNaN(Number(t));
1345
+ return i || o ? { error: "Invalid value" } : l && (l[0] === "auto" || l[0] === "none") ? { value: l[0], unit: "" } : { value: t, unit: l ? l[0] : "" };
1347
1346
  };
1348
- const sl = (r) => {
1349
- const o = r.startsWith("-") ? "-" : "", t = r.split("-").pop();
1347
+ const fs = (r) => {
1348
+ const a = r.startsWith("-") ? "-" : "", t = r.split("-").pop();
1350
1349
  if (["auto", "none"].includes(t))
1351
1350
  return { value: "", unit: t };
1352
1351
  if (t === "px")
@@ -1355,26 +1354,26 @@ const sl = (r) => {
1355
1354
  return { value: "100", unit: r.indexOf("w-") !== -1 ? "vw" : "vh" };
1356
1355
  if (t === "full")
1357
1356
  return { value: "100", unit: "%" };
1358
- if (E(r, "skew-"))
1359
- return { value: `${o}${t}`, unit: "deg" };
1360
- if (E(r, "rotate-"))
1361
- return { value: `${o}${t}`, unit: "deg" };
1362
- if (E(r, "opacity-"))
1357
+ if (M(r, "skew-"))
1358
+ return { value: `${a}${t}`, unit: "deg" };
1359
+ if (M(r, "rotate-"))
1360
+ return { value: `${a}${t}`, unit: "deg" };
1361
+ if (M(r, "opacity-"))
1363
1362
  return { value: `${t / 100}`, unit: "-" };
1364
- if (E(r, "duration-") || E(r, "delay-"))
1363
+ if (M(r, "duration-") || M(r, "delay-"))
1365
1364
  return { value: `${t}`, unit: "ms" };
1366
- if (E(r, "translate-") && !t.includes("/"))
1367
- return { value: `${o}${`${t / 4}`}`, unit: "rem" };
1368
- if (E(r, "scale-"))
1369
- return { value: `${o}${`${t / 100}`}`, unit: "-" };
1370
- if (W(r, "border")) {
1365
+ if (M(r, "translate-") && !t.includes("/"))
1366
+ return { value: `${a}${`${t / 4}`}`, unit: "rem" };
1367
+ if (M(r, "scale-"))
1368
+ return { value: `${a}${`${t / 100}`}`, unit: "-" };
1369
+ if (G(r, "border")) {
1371
1370
  const s = r.match(/border-?(x|y|t|r|b|l)?\d+/g);
1372
1371
  if (s)
1373
1372
  return { value: s[0].split("-").pop(), unit: "px" };
1374
1373
  if (r.match(/border-?(x|y|t|r|b|l)?/g))
1375
1374
  return { value: "1", unit: "px" };
1376
1375
  }
1377
- if (W(r, "max-w-")) {
1376
+ if (G(r, "max-w-")) {
1378
1377
  if (r === "max-w-screen-sm")
1379
1378
  return { value: "640", unit: "px" };
1380
1379
  if (r === "max-w-screen-md")
@@ -1410,7 +1409,7 @@ const sl = (r) => {
1410
1409
  if (t === "prose")
1411
1410
  return { value: "65", unit: "ch" };
1412
1411
  }
1413
- if (W(r, "text-")) {
1412
+ if (G(r, "text-")) {
1414
1413
  if (t === "xs")
1415
1414
  return { value: "12", unit: "px" };
1416
1415
  if (t === "sm")
@@ -1438,7 +1437,7 @@ const sl = (r) => {
1438
1437
  if (t === "9xl")
1439
1438
  return { value: "128", unit: "px" };
1440
1439
  }
1441
- if (W(r, "leading-")) {
1440
+ if (G(r, "leading-")) {
1442
1441
  if (t === "none")
1443
1442
  return { value: "1", unit: "-" };
1444
1443
  if (t === "tight")
@@ -1452,7 +1451,7 @@ const sl = (r) => {
1452
1451
  if (t === "loose")
1453
1452
  return { value: "2", unit: "-" };
1454
1453
  }
1455
- if (W(r, "tracking-")) {
1454
+ if (G(r, "tracking-")) {
1456
1455
  if (t === "tighter")
1457
1456
  return { value: "-0.05", unit: "em" };
1458
1457
  if (t === "tight")
@@ -1470,58 +1469,58 @@ const sl = (r) => {
1470
1469
  return { value: r, unit: "class" };
1471
1470
  if (t.includes("/")) {
1472
1471
  const [s, l] = k(t.split("/"), (i) => parseInt(i, 10));
1473
- return { value: o + (s / l * 100).toFixed(2).replace(".00", ""), unit: "%" };
1472
+ return { value: a + (s / l * 100).toFixed(2).replace(".00", ""), unit: "%" };
1474
1473
  }
1475
- return vt(parseFloat(t)) ? { value: `${o + parseFloat(t) * 4}`, unit: "px" } : { value: t, unit: "class" };
1474
+ return Vt(parseFloat(t)) ? { value: `${a + parseFloat(t) * 4}`, unit: "px" } : { value: t, unit: "class" };
1476
1475
  };
1477
- const ol = (r) => {
1476
+ const vs = (r) => {
1478
1477
  if (f(r))
1479
1478
  return { value: "", unit: "" };
1480
- const o = r.match(/\[.*\]/g);
1481
- if (o === null)
1482
- return al(r);
1483
- const t = x(o, "0", "").replace(/\[|\]/g, ""), s = r.startsWith("-") ? "-" : "", l = ue(t.match(/\d+.\d+|\d+/g));
1479
+ const a = r.match(/\[.*\]/g);
1480
+ if (a === null)
1481
+ return js(r);
1482
+ const t = x(a, "0", "").replace(/\[|\]/g, ""), s = r.startsWith("-") ? "-" : "", l = ge(t.match(/\d+.\d+|\d+/g));
1484
1483
  return { value: `${s}${l}`, unit: t.replace(l, "") };
1485
- }, al = (r) => f(r) ? { value: "", unit: "" } : sl(r), at = P.createContext({
1484
+ }, js = (r) => f(r) ? { value: "", unit: "" } : fs(r), yt = I.createContext({
1486
1485
  setDragData: () => {
1487
1486
  }
1488
- }), nl = ({
1487
+ }), ws = ({
1489
1488
  unit: r,
1490
- currentValue: o,
1489
+ currentValue: a,
1491
1490
  onDrag: t,
1492
1491
  onDragEnd: s,
1493
1492
  onDragStart: l,
1494
1493
  negative: i,
1495
- cssProperty: a
1494
+ cssProperty: o
1496
1495
  }) => {
1497
- const { setDragData: c } = se(at);
1496
+ const { setDragData: c } = le(yt);
1498
1497
  return /* @__PURE__ */ e.jsx(
1499
1498
  "button",
1500
1499
  {
1501
1500
  type: "button",
1502
1501
  onMouseDown: (n) => {
1503
- const u = {
1502
+ const p = {
1504
1503
  onDrag: t,
1505
1504
  onDragEnd: s,
1506
1505
  dragging: !0,
1507
1506
  dragStartY: n.pageY,
1508
- dragStartValue: `${o}`,
1507
+ dragStartValue: `${a}`,
1509
1508
  dragUnit: r,
1510
1509
  negative: i,
1511
- cssProperty: a
1510
+ cssProperty: o
1512
1511
  };
1513
- l(u), c(u);
1512
+ l(p), c(p);
1514
1513
  },
1515
1514
  color: void 0,
1516
1515
  className: "relative z-50 ml-1 hidden h-6 cursor-row-resize rounded bg-background/70 px-2 group-hover:inline",
1517
- children: /* @__PURE__ */ e.jsx(Lt, {})
1516
+ children: /* @__PURE__ */ e.jsx(Gt, {})
1518
1517
  }
1519
1518
  );
1520
- }, il = ({ 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((s) => /* @__PURE__ */ e.jsx(
1521
- xe,
1519
+ }, Cs = ({ onSelect: r, current: a, units: t }) => /* @__PURE__ */ e.jsx("div", { "data-theme": "light", className: "-m-[7px] -mx-[13px] flex w-9 flex-col", children: t.map((s) => /* @__PURE__ */ e.jsx(
1520
+ oe,
1522
1521
  {
1523
1522
  className: "h-max rounded-none px-1 py-1 text-right text-[11px] hover:bg-blue-400",
1524
- color: o === s ? "primary" : void 0,
1523
+ color: a === s ? "primary" : void 0,
1525
1524
  size: "sm",
1526
1525
  onClick: (l) => {
1527
1526
  l.stopPropagation(), r(s);
@@ -1529,21 +1528,21 @@ const ol = (r) => {
1529
1528
  children: s
1530
1529
  },
1531
1530
  s
1532
- )) }), Ee = 50, dl = (r) => {
1533
- const [o, t] = C(!1), [s, l] = C(""), { currentClass: i, onChange: a, classPrefix: c, cssProperty: n, units: u, negative: y } = r, [d, h] = C(n != null && n.toLowerCase().includes("width") ? "%" : u[0]), [g, p] = C(!1), [m, w] = C(""), [D, j] = C(!1), [I, L] = C(!1);
1531
+ )) }), qe = 50, ks = (r) => {
1532
+ const [a, t] = C(!1), [s, l] = C(""), { currentClass: i, onChange: o, classPrefix: c, cssProperty: n, units: p, negative: h } = r, [d, y] = C(n != null && n.toLowerCase().includes("width") ? "%" : p[0]), [g, u] = C(!1), [m, j] = C(""), [B, w] = C(!1), [P, E] = C(!1);
1534
1533
  O(() => {
1535
- const { value: b, unit: v } = ol(i);
1534
+ const { value: b, unit: v } = vs(i);
1536
1535
  if (v === "") {
1537
- l(b), h(n != null && n.toLowerCase().includes("width") ? "%" : ue(u));
1536
+ l(b), y(n != null && n.toLowerCase().includes("width") ? "%" : ge(p));
1538
1537
  return;
1539
1538
  }
1540
- h(v), l(v === "class" || f(b) ? "" : b);
1541
- }, [i, n, u]);
1542
- const N = fe((b) => a(b), [a], Ee), $ = fe((b) => a(b, !1), [a], Ee), F = V(
1539
+ y(v), l(v === "class" || f(b) ? "" : b);
1540
+ }, [i, n, p]);
1541
+ const N = je((b) => o(b), [o], qe), $ = je((b) => o(b, !1), [o], qe), F = V(
1543
1542
  (b = !1) => {
1544
- const v = Ae(`${s}`, u);
1543
+ const v = Ke(`${s}`, p);
1545
1544
  if (x(v, "error", !1)) {
1546
- p(!0);
1545
+ u(!0);
1547
1546
  return;
1548
1547
  }
1549
1548
  const S = x(v, "unit") !== "" ? x(v, "unit") : d;
@@ -1556,12 +1555,12 @@ const ol = (r) => {
1556
1555
  const J = `${x(v, "value", "").startsWith("-") ? "-" : ""}${c}[${x(v, "value", "").replace("-", "")}${S === "-" ? "" : S}]`;
1557
1556
  b ? $(J) : N(J);
1558
1557
  },
1559
- [N, $, s, d, c, u]
1560
- ), G = V(
1558
+ [N, $, s, d, c, p]
1559
+ ), q = V(
1561
1560
  (b) => {
1562
- const v = Ae(`${s}`, u);
1561
+ const v = Ke(`${s}`, p);
1563
1562
  if (x(v, "error", !1)) {
1564
- p(!0);
1563
+ u(!0);
1565
1564
  return;
1566
1565
  }
1567
1566
  if (b === "auto" || b === "none") {
@@ -1573,15 +1572,15 @@ const ol = (r) => {
1573
1572
  const S = x(v, "unit") !== "" ? x(v, "unit") : b, J = `${x(v, "value", "").startsWith("-") ? "-" : ""}${c}[${x(v, "value", "").replace("-", "")}${S === "-" ? "" : S}]`;
1574
1573
  N(J);
1575
1574
  },
1576
- [N, s, c, u]
1575
+ [N, s, c, p]
1577
1576
  );
1578
1577
  return /* @__PURE__ */ e.jsx("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-start", children: d === "class" ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1579
1578
  /* @__PURE__ */ e.jsx("input", { className: "w-20 rounded py-1", readOnly: !0, value: i }),
1580
- /* @__PURE__ */ e.jsxs(X, { children: [
1581
- /* @__PURE__ */ e.jsx(z, { 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(_e, {}) }) }),
1579
+ /* @__PURE__ */ e.jsxs(Y, { children: [
1580
+ /* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsx("button", { type: "button", className: "invisible ml-3 mt-1 text-blue-600 group-hover:visible", children: /* @__PURE__ */ e.jsx(Te, {}) }) }),
1582
1581
  /* @__PURE__ */ e.jsx(Z, { children: "Current value is using a Tailwind preset class." })
1583
1582
  ] })
1584
- ] }) : /* @__PURE__ */ e.jsxs("div", { className: `group relative flex items-center ${D ? "z-auto" : ""}`, children: [
1583
+ ] }) : /* @__PURE__ */ e.jsxs("div", { className: `group relative flex items-center ${B ? "z-auto" : ""}`, children: [
1585
1584
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center rounded-md border border-border", children: [
1586
1585
  ["none", "auto"].indexOf(d) !== -1 ? null : /* @__PURE__ */ e.jsx(
1587
1586
  "input",
@@ -1593,84 +1592,84 @@ const ol = (r) => {
1593
1592
  onKeyDown: (b) => {
1594
1593
  if (b.keyCode !== 38 && b.keyCode !== 40)
1595
1594
  return;
1596
- b.preventDefault(), L(!0);
1597
- const v = wt(b.target.value);
1598
- let S = Fe(v) ? 0 : v;
1595
+ b.preventDefault(), E(!0);
1596
+ const v = Ht(b.target.value);
1597
+ let S = tt(v) ? 0 : v;
1599
1598
  b.keyCode === 38 && (S += 1), b.keyCode === 40 && (S -= 1);
1600
- const M = `${S}`, it = `${M.startsWith("-") ? "-" : ""}${c}[${M.replace("-", "")}${d === "-" ? "" : d}]`;
1601
- $(it);
1599
+ const L = `${S}`, mt = `${L.startsWith("-") ? "-" : ""}${c}[${L.replace("-", "")}${d === "-" ? "" : d}]`;
1600
+ $(mt);
1602
1601
  },
1603
1602
  onKeyUp: (b) => {
1604
- I && (b.preventDefault(), L(!1));
1603
+ P && (b.preventDefault(), E(!1));
1605
1604
  },
1606
1605
  onBlur: () => F(),
1607
1606
  onChange: (b) => {
1608
- p(!1), l(b.target.value);
1607
+ u(!1), l(b.target.value);
1609
1608
  },
1610
1609
  onClick: (b) => {
1611
1610
  var v;
1612
1611
  (v = b == null ? void 0 : b.target) == null || v.select(), t(!1);
1613
1612
  },
1614
- value: D ? m : s,
1613
+ value: B ? m : s,
1615
1614
  className: "h-6 w-14 rounded rounded-r-none bg-background pl-2 text-sm focus-visible:outline-0 ".concat(
1616
1615
  " ",
1617
1616
  g ? "border-red-500 text-red-500" : "border-foreground/20"
1618
1617
  )
1619
1618
  }
1620
1619
  ),
1621
- /* @__PURE__ */ e.jsxs(X, { open: o, delayDuration: 100, children: [
1622
- /* @__PURE__ */ e.jsx(z, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
1620
+ /* @__PURE__ */ e.jsxs(Y, { open: a, delayDuration: 100, children: [
1621
+ /* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
1623
1622
  "button",
1624
1623
  {
1625
1624
  type: "button",
1626
- onClick: () => t(!o),
1625
+ onClick: () => t(!a),
1627
1626
  className: "flex h-6 cursor-pointer items-center gap-x-1 rounded rounded-l-none bg-background p-px px-1 text-[11px] uppercase",
1628
1627
  children: [
1629
- /* @__PURE__ */ e.jsx("span", { className: `inline-block ${u.length === 1 ? "px-2 font-semibold" : ""}`, children: d }),
1630
- u.length > 1 ? /* @__PURE__ */ e.jsx(Mt, {}) : null
1628
+ /* @__PURE__ */ e.jsx("span", { className: `inline-block ${p.length === 1 ? "px-2 font-semibold" : ""}`, children: d }),
1629
+ p.length > 1 ? /* @__PURE__ */ e.jsx(Kt, {}) : null
1631
1630
  ]
1632
1631
  }
1633
1632
  ) }),
1634
- /* @__PURE__ */ e.jsx(hr, { children: /* @__PURE__ */ e.jsx(Z, { className: "bg-background", children: /* @__PURE__ */ e.jsx(
1635
- il,
1633
+ /* @__PURE__ */ e.jsx(_r, { children: /* @__PURE__ */ e.jsx(Z, { className: "bg-background", children: /* @__PURE__ */ e.jsx(
1634
+ Cs,
1636
1635
  {
1637
- units: u,
1636
+ units: p,
1638
1637
  current: d,
1639
1638
  onSelect: (b) => {
1640
- t(!1), h(b), G(b);
1639
+ t(!1), y(b), q(b);
1641
1640
  }
1642
1641
  }
1643
1642
  ) }) })
1644
1643
  ] })
1645
1644
  ] }),
1646
- ["none", "auto"].indexOf(d) !== -1 || D ? null : /* @__PURE__ */ e.jsx(
1647
- nl,
1645
+ ["none", "auto"].indexOf(d) !== -1 || B ? null : /* @__PURE__ */ e.jsx(
1646
+ ws,
1648
1647
  {
1649
- onDragStart: () => j(!0),
1648
+ onDragStart: () => w(!0),
1650
1649
  onDragEnd: (b) => {
1651
- if (w(() => ""), j(!1), f(b))
1650
+ if (j(() => ""), w(!1), f(b))
1652
1651
  return;
1653
- const v = `${b}`, M = `${v.startsWith("-") ? "-" : ""}${c}[${v.replace("-", "")}${d === "-" ? "" : d}]`;
1654
- N(M);
1652
+ const v = `${b}`, L = `${v.startsWith("-") ? "-" : ""}${c}[${v.replace("-", "")}${d === "-" ? "" : d}]`;
1653
+ N(L);
1655
1654
  },
1656
1655
  onDrag: (b) => {
1657
1656
  if (f(b))
1658
1657
  return;
1659
- w(b);
1660
- const v = `${b}`, M = `${v.startsWith("-") ? "-" : ""}${c}[${v.replace("-", "")}${d === "-" ? "" : d}]`;
1661
- $(M);
1658
+ j(b);
1659
+ const v = `${b}`, L = `${v.startsWith("-") ? "-" : ""}${c}[${v.replace("-", "")}${d === "-" ? "" : d}]`;
1660
+ $(L);
1662
1661
  },
1663
1662
  currentValue: s,
1664
1663
  unit: d,
1665
- negative: y,
1664
+ negative: h,
1666
1665
  cssProperty: n
1667
1666
  }
1668
1667
  )
1669
1668
  ] }) }) });
1670
- }, ae = (r) => {
1671
- const o = ge();
1672
- return jt(o, { property: r });
1673
- }, cl = (r, o) => {
1669
+ }, ne = (r) => {
1670
+ const a = ye();
1671
+ return Dt(a, { property: r });
1672
+ }, Ns = (r, a) => {
1674
1673
  const t = {
1675
1674
  xs: 0,
1676
1675
  sm: 1,
@@ -1679,8 +1678,8 @@ const ol = (r) => {
1679
1678
  xl: 4,
1680
1679
  "2xl": 5
1681
1680
  };
1682
- return t[x(r, "mq", "xs")] <= t[o];
1683
- }, pl = {
1681
+ return t[x(r, "mq", "xs")] <= t[a];
1682
+ }, _s = {
1684
1683
  width: "w-",
1685
1684
  height: "h-",
1686
1685
  minWidth: "min-w-",
@@ -1746,32 +1745,32 @@ const ol = (r) => {
1746
1745
  insetY: "inset-y-",
1747
1746
  opacity: "opacity-",
1748
1747
  flexBasis: "basis-"
1749
- }, Le = {
1748
+ }, Je = {
1750
1749
  xs: "",
1751
1750
  sm: "640px",
1752
1751
  md: "768px",
1753
1752
  lg: "1024px",
1754
1753
  xl: "1280px",
1755
1754
  "2xl": "1536px"
1756
- }, ul = (r) => `${r.toUpperCase()} ${Le[r] ? `(${Le[r]} & up)` : ""}`, Re = (r) => {
1757
- const { t: o } = K(), { type: t = "icons", label: s, property: l, onEmitChange: i = () => {
1758
- }, units: a, negative: c = !1 } = r, [n] = yr(), [u] = Je(), [, y] = Be(), d = ae(l), h = Ke(), g = qe(), [p] = Ge(), m = _(() => x(d, "fullCls", ""), [d]), w = V(
1755
+ }, Ss = (r) => `${r.toUpperCase()} ${Je[r] ? `(${Je[r]} & up)` : ""}`, Be = (r) => {
1756
+ const { t: a } = W(), { type: t = "icons", label: s, property: l, onEmitChange: i = () => {
1757
+ }, units: o, negative: c = !1 } = r, [n] = Sr(), [p] = ct(), [, h] = Ie(), d = ne(l), y = Re(), g = it(), [u] = dt(), m = _(() => x(d, "fullCls", ""), [d]), j = V(
1759
1758
  ($, F = !0) => {
1760
- const G = { dark: n, mq: y, mod: u, cls: $, property: l, fullCls: "" };
1761
- (n || u !== "") && (G.mq = "xs");
1762
- const b = Or(G);
1763
- h(p, [b], F);
1759
+ const q = { dark: n, mq: h, mod: p, cls: $, property: l, fullCls: "" };
1760
+ (n || p !== "") && (q.mq = "xs");
1761
+ const b = es(q);
1762
+ y(u, [b], F);
1764
1763
  },
1765
- [p, n, y, u, l, h]
1766
- ), D = V(() => {
1767
- g(p, [m]);
1768
- }, [p, m, g]), j = _(() => cl(d, y), [d, y]);
1764
+ [u, n, h, p, l, y]
1765
+ ), B = V(() => {
1766
+ g(u, [m]);
1767
+ }, [u, m, g]), w = _(() => Ns(d, h), [d, h]);
1769
1768
  O(() => {
1770
- i(j, d);
1771
- }, [j, i, d]);
1772
- const [, , I] = Be(), L = V(
1769
+ i(w, d);
1770
+ }, [w, i, d]);
1771
+ const [, , P] = Ie(), E = V(
1773
1772
  ($) => {
1774
- I({
1773
+ P({
1775
1774
  xs: 400,
1776
1775
  sm: 640,
1777
1776
  md: 800,
@@ -1780,41 +1779,41 @@ const ol = (r) => {
1780
1779
  "2xl": 1920
1781
1780
  }[$]);
1782
1781
  },
1783
- [I]
1784
- ), N = x(d, "dark", null) === n && x(d, "mod", null) === u && x(d, "mq", null) === y;
1785
- return /* @__PURE__ */ e.jsx(Qr, { canChange: j, canReset: d && N, children: /* @__PURE__ */ e.jsxs("div", { className: "group flex flex-row items-center py-2 first:pt-0 last:pb-0", children: [
1786
- /* @__PURE__ */ e.jsx("div", { className: "relative w-[70px] truncate text-xs text-foreground", children: /* @__PURE__ */ e.jsx("span", { className: `text-[11px] ${d && !N ? "text-foreground" : ""}`, children: o(s) }) }),
1782
+ [P]
1783
+ ), N = x(d, "dark", null) === n && x(d, "mod", null) === p && x(d, "mq", null) === h;
1784
+ return /* @__PURE__ */ e.jsx(gs, { canChange: w, canReset: d && N, children: /* @__PURE__ */ e.jsxs("div", { className: "group flex flex-row items-center py-2 first:pt-0 last:pb-0", children: [
1785
+ /* @__PURE__ */ e.jsx("div", { className: "relative w-[70px] truncate text-xs text-foreground", children: /* @__PURE__ */ e.jsx("span", { className: `text-[11px] ${d && !N ? "text-foreground" : ""}`, children: a(s) }) }),
1787
1786
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-row items-center", children: [
1788
1787
  /* @__PURE__ */ e.jsxs("div", { className: "w-[150px]", children: [
1789
1788
  t === "arbitrary" ? /* @__PURE__ */ e.jsx(
1790
- dl,
1789
+ ks,
1791
1790
  {
1792
1791
  currentClass: x(d, "cls", ""),
1793
- classPrefix: x(pl, l, ""),
1794
- units: a || [],
1795
- onChange: w,
1792
+ classPrefix: x(_s, l, ""),
1793
+ units: o || [],
1794
+ onChange: j,
1796
1795
  negative: c,
1797
1796
  cssProperty: l
1798
1797
  }
1799
1798
  ) : null,
1800
- t === "icons" && /* @__PURE__ */ e.jsx(tl, { property: l, onChange: w }),
1801
- t === "range" && /* @__PURE__ */ e.jsx(el, { property: l, onChange: w }),
1802
- t === "color" && /* @__PURE__ */ e.jsx(ll, { property: l, onChange: w }),
1803
- t === "dropdown" && /* @__PURE__ */ e.jsx(ot, { label: s, property: l, onChange: w })
1799
+ t === "icons" && /* @__PURE__ */ e.jsx(ys, { property: l, onChange: j }),
1800
+ t === "range" && /* @__PURE__ */ e.jsx(hs, { property: l, onChange: j }),
1801
+ t === "color" && /* @__PURE__ */ e.jsx(ms, { property: l, onChange: j }),
1802
+ t === "dropdown" && /* @__PURE__ */ e.jsx(ht, { label: s, property: l, onChange: j })
1804
1803
  ] }),
1805
- /* @__PURE__ */ e.jsx("div", { className: `w-[30px] cursor-pointer ${m ? "visible" : "invisible"}`, children: N ? /* @__PURE__ */ e.jsx("button", { type: "button", onClick: () => D(), title: "Reset", className: "flex px-1.5 text-xs", children: /* @__PURE__ */ e.jsx(Ot, { className: "h-5 w-5 text-blue-500 hover:opacity-80" }) }) : j && d ? /* @__PURE__ */ e.jsxs(X, { delayDuration: 100, children: [
1806
- /* @__PURE__ */ e.jsx(z, { asChild: !0, children: /* @__PURE__ */ e.jsx(
1804
+ /* @__PURE__ */ e.jsx("div", { className: `w-[30px] cursor-pointer ${m ? "visible" : "invisible"}`, children: N ? /* @__PURE__ */ e.jsx("button", { type: "button", onClick: () => B(), title: "Reset", className: "flex px-1.5 text-xs", children: /* @__PURE__ */ e.jsx(qt, { className: "h-5 w-5 text-blue-500 hover:opacity-80" }) }) : w && d ? /* @__PURE__ */ e.jsxs(Y, { delayDuration: 100, children: [
1805
+ /* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsx(
1807
1806
  "button",
1808
1807
  {
1809
1808
  type: "button",
1810
1809
  className: "invisible ml-3 mt-1 rounded-full bg-blue-500 text-white group-hover:visible",
1811
- children: /* @__PURE__ */ e.jsx(_e, {})
1810
+ children: /* @__PURE__ */ e.jsx(Te, {})
1812
1811
  }
1813
1812
  ) }),
1814
1813
  /* @__PURE__ */ e.jsx(Z, { children: /* @__PURE__ */ e.jsx("div", { className: "text-right", children: /* @__PURE__ */ e.jsxs("div", { children: [
1815
1814
  "Current style is set at  ",
1816
1815
  /* @__PURE__ */ e.jsxs("span", { className: "font-bold", children: [
1817
- ul(x(d, "mq")),
1816
+ Ss(x(d, "mq")),
1818
1817
  n && !d.dark ? "(Light mode)" : ""
1819
1818
  ] }),
1820
1819
  /* @__PURE__ */ e.jsx("br", {}),
@@ -1822,7 +1821,7 @@ const ol = (r) => {
1822
1821
  "button",
1823
1822
  {
1824
1823
  type: "button",
1825
- onClick: () => L(x(d, "mq")),
1824
+ onClick: () => E(x(d, "mq")),
1826
1825
  className: "block w-full cursor-default text-right font-semibold text-blue-500",
1827
1826
  children: [
1828
1827
  "Switch to ",
@@ -1834,16 +1833,16 @@ const ol = (r) => {
1834
1833
  ] }) : null })
1835
1834
  ] })
1836
1835
  ] }) });
1837
- }, xl = ["px", "%", "em", "rem", "ch", "vh", "vw"], nt = ({
1836
+ }, Ts = ["px", "%", "em", "rem", "ch", "vh", "vw"], bt = ({
1838
1837
  label: r,
1839
- options: o,
1838
+ options: a,
1840
1839
  borderB: t = !1,
1841
1840
  borderT: s = !1,
1842
1841
  type: l = "arbitrary",
1843
- units: i = xl,
1844
- negative: a = !1
1842
+ units: i = Ts,
1843
+ negative: o = !1
1845
1844
  }) => {
1846
- const { t: c } = K(), [n, u] = C(o[0].key), y = ge(), d = V((h) => k(y, "property").includes(h), [y]);
1845
+ const { t: c } = W(), [n, p] = C(a[0].key), h = ye(), d = V((y) => k(h, "property").includes(y), [h]);
1847
1846
  return /* @__PURE__ */ e.jsxs(
1848
1847
  "div",
1849
1848
  {
@@ -1851,48 +1850,48 @@ const ol = (r) => {
1851
1850
  children: [
1852
1851
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-row text-xs", children: [
1853
1852
  r && /* @__PURE__ */ e.jsx("span", { className: "relative w-[70px] flex-none text-xs text-foreground", children: c(r) }),
1854
- /* @__PURE__ */ e.jsx("div", { className: "mb-3 flex grow flex-row flex-wrap gap-x-px", children: P.Children.toArray(
1855
- o.map(({ label: h, key: g }) => /* @__PURE__ */ e.jsx("div", { className: "first:rounded-l last:rounded-r", children: /* @__PURE__ */ e.jsxs(X, { children: [
1856
- /* @__PURE__ */ e.jsx(z, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
1853
+ /* @__PURE__ */ e.jsx("div", { className: "mb-3 flex grow flex-row flex-wrap gap-x-px", children: I.Children.toArray(
1854
+ a.map(({ label: y, key: g }) => /* @__PURE__ */ e.jsx("div", { className: "first:rounded-l last:rounded-r", children: /* @__PURE__ */ e.jsxs(Y, { children: [
1855
+ /* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
1857
1856
  "button",
1858
1857
  {
1859
1858
  type: "button",
1860
- onClick: () => u(g),
1859
+ onClick: () => p(g),
1861
1860
  className: `relative cursor-pointer rounded-full p-1 text-[8px] ${g === n ? " bg-[#3E57F0] text-white" : "text-gray-600 dark:text-gray-300"}`,
1862
1861
  children: [
1863
- P.createElement("div", {
1862
+ I.createElement("div", {
1864
1863
  className: d(g) ? "-bottom-1.5 absolute bg-[#3E57F0] h-[2px] left-0 w-full" : ""
1865
1864
  }),
1866
- P.createElement(x(st, g, ze), { className: "text-inherit w-3 h-3" })
1865
+ I.createElement(x(gt, g, lt), { className: "text-inherit w-3 h-3" })
1867
1866
  ]
1868
1867
  }
1869
1868
  ) }),
1870
- /* @__PURE__ */ e.jsx(Z, { children: Y(le(h)) })
1869
+ /* @__PURE__ */ e.jsx(Z, { children: z(se(y)) })
1871
1870
  ] }) }))
1872
1871
  ) })
1873
1872
  ] }),
1874
1873
  /* @__PURE__ */ e.jsx("div", { className: "mt-0 flex items-center", children: /* @__PURE__ */ e.jsx(
1875
- Re,
1874
+ Be,
1876
1875
  {
1877
1876
  type: l,
1878
1877
  units: [...i],
1879
1878
  label: "",
1880
1879
  property: n,
1881
- negative: a
1880
+ negative: o
1882
1881
  }
1883
1882
  ) })
1884
1883
  ]
1885
1884
  }
1886
1885
  );
1887
- }, gl = ({ heading: r, items: o }) => {
1888
- const { t } = K(), s = ge(), l = _(() => {
1889
- const i = (n) => U(
1890
- n.map((u) => u.styleType === "multiple" ? k(u.options, "key") : u.property)
1891
- ), a = U(
1892
- o.map((n) => n.styleType === "accordion" ? i(n.items) : n.styleType === "multiple" ? k(n.options, "key") : n.property)
1886
+ }, Rs = ({ heading: r, items: a }) => {
1887
+ const { t } = W(), s = ye(), l = _(() => {
1888
+ const i = (n) => K(
1889
+ n.map((p) => p.styleType === "multiple" ? k(p.options, "key") : p.property)
1890
+ ), o = K(
1891
+ a.map((n) => n.styleType === "accordion" ? i(n.items) : n.styleType === "multiple" ? k(n.options, "key") : n.property)
1893
1892
  ), c = k(s, "property");
1894
- return Ye(a, c).length > 0;
1895
- }, [s, o]);
1893
+ return rt(o, c).length > 0;
1894
+ }, [s, a]);
1896
1895
  return /* @__PURE__ */ e.jsxs("details", { children: [
1897
1896
  /* @__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: [
1898
1897
  t(r),
@@ -1903,17 +1902,17 @@ const ol = (r) => {
1903
1902
  }
1904
1903
  ) : null
1905
1904
  ] }) }),
1906
- /* @__PURE__ */ e.jsx("div", { className: "p-2", children: o.map((i) => i.styleType === "multiple" ? /* @__PURE__ */ e.jsx(nt, { ...i }, i.label) : /* @__PURE__ */ e.jsx(Re, { ...i }, i.label)) })
1905
+ /* @__PURE__ */ e.jsx("div", { className: "p-2", children: a.map((i) => i.styleType === "multiple" ? /* @__PURE__ */ e.jsx(bt, { ...i }, i.label) : /* @__PURE__ */ e.jsx(Be, { ...i }, i.label)) })
1907
1906
  ] });
1908
- }, hl = Me({}), me = ({ section: r }) => {
1909
- const { t: o } = K(), t = ge(), s = V(
1910
- (a = []) => {
1907
+ }, Vs = Qe({}), ve = ({ section: r }) => {
1908
+ const { t: a } = W(), t = ye(), s = V(
1909
+ (o = []) => {
1911
1910
  const c = {};
1912
- for (let u = 0; u < t.length; u++)
1913
- c[t[u].property] = t[u].cls;
1911
+ for (let p = 0; p < t.length; p++)
1912
+ c[t[p].property] = t[p].cls;
1914
1913
  let n = !0;
1915
- for (const u in a)
1916
- if (!ye(c, u) || c[u] !== a[u]) {
1914
+ for (const p in o)
1915
+ if (!me(c, p) || c[p] !== o[p]) {
1917
1916
  n = !1;
1918
1917
  break;
1919
1918
  }
@@ -1923,25 +1922,25 @@ const ol = (r) => {
1923
1922
  ), l = _(() => {
1924
1923
  if (t.length > 0 && r.heading === "classes.heading")
1925
1924
  return !0;
1926
- const a = (u) => U(
1927
- u.map((y) => y.styleType === "multiple" ? U(k(y.options, "key")) : y.property)
1928
- ), c = U(
1929
- r.items.map((u) => u.styleType === "accordion" ? a(u.items) : u.styleType === "multiple" ? U(k(u.options, "key")) : u.property)
1925
+ const o = (p) => K(
1926
+ p.map((h) => h.styleType === "multiple" ? K(k(h.options, "key")) : h.property)
1927
+ ), c = K(
1928
+ r.items.map((p) => p.styleType === "accordion" ? o(p.items) : p.styleType === "multiple" ? K(k(p.options, "key")) : p.property)
1930
1929
  ), n = k(t, "property");
1931
- return Ye(c, n).length > 0;
1930
+ return rt(c, n).length > 0;
1932
1931
  }, [t, r.heading, r.items]), i = _(() => ({}), []);
1933
- return /* @__PURE__ */ e.jsx(hl.Provider, { value: i, children: /* @__PURE__ */ e.jsxs(de, { value: r.heading, children: [
1934
- /* @__PURE__ */ e.jsx(ce, { className: "px-3 py-2 text-xs hover:no-underline", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
1932
+ return /* @__PURE__ */ e.jsx(Vs.Provider, { value: i, children: /* @__PURE__ */ e.jsxs(pe, { value: r.heading, children: [
1933
+ /* @__PURE__ */ e.jsx(ue, { className: "px-3 py-2 text-xs hover:no-underline", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
1935
1934
  /* @__PURE__ */ e.jsx("div", { className: `h-[8px] w-[8px] rounded-full ${l ? "bg-blue-500" : "bg-gray-300"}` }),
1936
- o(r.heading)
1935
+ a(r.heading)
1937
1936
  ] }) }),
1938
- /* @__PURE__ */ e.jsx(pe, { className: "bg-gray-100 px-3.5 py-2", children: P.Children.toArray(
1939
- r.items.map((a) => ye(a, "component") ? P.createElement(a.component, { key: a.label }) : ye(a, "styleType") ? a.styleType === "multiple" ? /* @__PURE__ */ e.jsx(nt, { ...a }, a.label) : a.styleType === "accordion" && s(a == null ? void 0 : a.conditions) ? /* @__PURE__ */ e.jsx(gl, { ...a }, a.label) : null : /* @__PURE__ */ e.jsx(Re, { ...a }, a.label))
1937
+ /* @__PURE__ */ e.jsx(xe, { className: "bg-gray-100 px-3.5 py-2", children: I.Children.toArray(
1938
+ r.items.map((o) => me(o, "component") ? I.createElement(o.component, { key: o.label }) : me(o, "styleType") ? o.styleType === "multiple" ? /* @__PURE__ */ e.jsx(bt, { ...o }, o.label) : o.styleType === "accordion" && s(o == null ? void 0 : o.conditions) ? /* @__PURE__ */ e.jsx(Rs, { ...o }, o.label) : null : /* @__PURE__ */ e.jsx(Be, { ...o }, o.label))
1940
1939
  ) })
1941
1940
  ] }) });
1942
- }, yl = ({
1941
+ }, Hs = ({
1943
1942
  item: r,
1944
- index: o,
1943
+ index: a,
1945
1944
  canDelete: t,
1946
1945
  onChange: s,
1947
1946
  onRemove: l
@@ -1950,7 +1949,7 @@ const ol = (r) => {
1950
1949
  "input",
1951
1950
  {
1952
1951
  name: "key",
1953
- onChange: (i) => s(i, o),
1952
+ onChange: (i) => s(i, a),
1954
1953
  value: r.key,
1955
1954
  placeholder: "Key",
1956
1955
  className: "w-full rounded border-gray-300 bg-background p-0.5 pl-2 text-sm focus-visible:outline-0",
@@ -1963,7 +1962,7 @@ const ol = (r) => {
1963
1962
  "input",
1964
1963
  {
1965
1964
  name: "value",
1966
- onChange: (i) => f(r.key) ? {} : s(i, o),
1965
+ onChange: (i) => f(r.key) ? {} : s(i, a),
1967
1966
  value: r.value,
1968
1967
  placeholder: "Value",
1969
1968
  className: "w-full rounded border-gray-300 bg-background p-0.5 pl-2 text-sm focus-visible:outline-0",
@@ -1972,37 +1971,37 @@ const ol = (r) => {
1972
1971
  }
1973
1972
  ),
1974
1973
  /* @__PURE__ */ e.jsx(
1975
- Ft,
1974
+ Jt,
1976
1975
  {
1977
1976
  onClick: l,
1978
1977
  className: "h-6 w-6 cursor-pointer rounded border border-red-400 p-1 text-red-400 hover:opacity-80"
1979
1978
  }
1980
1979
  )
1981
1980
  ] })
1982
- ] }), bl = ({ section: r }) => {
1983
- var h;
1984
- const { setSyncState: o } = br(), t = q(), [s, l] = C([]), [i] = Se(), a = We(), c = `${x(i, "0.prop")}_attrs`;
1985
- ne.useEffect(() => {
1986
- const g = k(x(t, c), (p, m) => ({ key: m, value: p }));
1981
+ ] }), Ds = ({ section: r }) => {
1982
+ var y;
1983
+ const { setSyncState: a } = Tr(), t = U(), [s, l] = C([]), [i] = he(), o = at(), c = `${x(i, "0.prop")}_attrs`;
1984
+ de.useEffect(() => {
1985
+ const g = k(x(t, c), (u, m) => ({ key: m, value: u }));
1987
1986
  f(g) ? l([]) : l(g);
1988
1987
  }, [x(t, c)]);
1989
- const n = () => l([...s, { key: "", value: "" }]), u = (g) => {
1990
- const p = we(s, (m, w) => g !== w);
1991
- d(p);
1992
- }, y = (g, p) => {
1988
+ const n = () => l([...s, { key: "", value: "" }]), p = (g) => {
1989
+ const u = Ce(s, (m, j) => g !== j);
1990
+ d(u);
1991
+ }, h = (g, u) => {
1993
1992
  const m = [...s];
1994
- m[p][g.target.name] = g.target.value, d(m);
1995
- }, d = ne.useCallback(
1993
+ m[u][g.target.name] = g.target.value, d(m);
1994
+ }, d = de.useCallback(
1996
1995
  (g = []) => {
1997
- const p = {};
1998
- ke(g, (m) => {
1999
- f(m.key) || Oe(p, m.key, m.value);
2000
- }), a([x(t, "_id")], { [c]: p }), o("UNSAVED");
1996
+ const u = {};
1997
+ _e(g, (m) => {
1998
+ f(m.key) || et(u, m.key, m.value);
1999
+ }), o([x(t, "_id")], { [c]: u }), a("UNSAVED");
2001
2000
  },
2002
- [t, o, a, c]
2001
+ [t, a, o, c]
2003
2002
  );
2004
- return /* @__PURE__ */ e.jsxs(de, { value: r.heading, children: [
2005
- /* @__PURE__ */ e.jsx(ce, { className: "px-3 py-2 text-xs hover:no-underline", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
2003
+ return /* @__PURE__ */ e.jsxs(pe, { value: r.heading, children: [
2004
+ /* @__PURE__ */ e.jsx(ue, { className: "px-3 py-2 text-xs hover:no-underline", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
2006
2005
  /* @__PURE__ */ e.jsx(
2007
2006
  "div",
2008
2007
  {
@@ -2011,19 +2010,19 @@ const ol = (r) => {
2011
2010
  ),
2012
2011
  "Attributes"
2013
2012
  ] }) }),
2014
- /* @__PURE__ */ e.jsx(pe, { className: "bg-gray-100 px-3.5 py-2", children: /* @__PURE__ */ e.jsxs("div", { className: "no-scrollbar flex min-h-max flex-col gap-y-2 overflow-y-auto bg-gray-100 p-px", children: [
2015
- /* @__PURE__ */ e.jsxs(Te, { className: "mt-2 flex w-full items-center justify-between", children: [
2013
+ /* @__PURE__ */ e.jsx(xe, { className: "bg-gray-100 px-3.5 py-2", children: /* @__PURE__ */ e.jsxs("div", { className: "no-scrollbar flex min-h-max flex-col gap-y-2 overflow-y-auto bg-gray-100 p-px", children: [
2014
+ /* @__PURE__ */ e.jsxs(Ve, { className: "mt-2 flex w-full items-center justify-between", children: [
2016
2015
  "Add Custom attributes",
2017
2016
  /* @__PURE__ */ e.jsxs(
2018
2017
  "div",
2019
2018
  {
2020
- className: `flex h-6 w-max items-center justify-center gap-x-0.5 rounded-full border p-1 px-2 text-xs ${!f(s) && f((h = ve(s)) == null ? void 0 : h.key) ? "cursor-not-allowed border-gray-400 text-gray-400" : "cursor-pointer border-blue-400 text-blue-400 hover:bg-blue-400 hover:text-white"}`,
2019
+ className: `flex h-6 w-max items-center justify-center gap-x-0.5 rounded-full border p-1 px-2 text-xs ${!f(s) && f((y = we(s)) == null ? void 0 : y.key) ? "cursor-not-allowed border-gray-400 text-gray-400" : "cursor-pointer border-blue-400 text-blue-400 hover:bg-blue-400 hover:text-white"}`,
2021
2020
  onClick: () => {
2022
2021
  var g;
2023
- !f(s) && f((g = ve(s)) == null ? void 0 : g.key) || n();
2022
+ !f(s) && f((g = we(s)) == null ? void 0 : g.key) || n();
2024
2023
  },
2025
2024
  children: [
2026
- /* @__PURE__ */ e.jsx(Ne, { width: 12, height: 12 }),
2025
+ /* @__PURE__ */ e.jsx(Se, { width: 12, height: 12 }),
2027
2026
  " Add"
2028
2027
  ]
2029
2028
  }
@@ -2031,17 +2030,17 @@ const ol = (r) => {
2031
2030
  ] }),
2032
2031
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col", children: [
2033
2032
  f(s) && /* @__PURE__ */ e.jsx("div", { className: "flex h-12 items-center justify-center text-sm text-gray-400", children: "Click + Add to add attributes" }),
2034
- ne.Children.toArray(
2035
- k(s, (g, p) => {
2036
- const m = s.length > 0 && p < s.length - 1;
2033
+ de.Children.toArray(
2034
+ k(s, (g, u) => {
2035
+ const m = s.length > 0 && u < s.length - 1;
2037
2036
  return /* @__PURE__ */ e.jsx(
2038
- yl,
2037
+ Hs,
2039
2038
  {
2040
2039
  item: g,
2041
- index: p,
2040
+ index: u,
2042
2041
  canDelete: m,
2043
- onChange: y,
2044
- onRemove: () => u(p)
2042
+ onChange: h,
2043
+ onRemove: () => p(u)
2045
2044
  }
2046
2045
  );
2047
2046
  })
@@ -2049,49 +2048,83 @@ const ol = (r) => {
2049
2048
  ] })
2050
2049
  ] }) })
2051
2050
  ] });
2051
+ }, Bs = () => {
2052
+ const r = U(), [a] = he(), { t } = W(), s = Xr(), l = Re(), i = De(r._type), o = Ye(rs(a), "prop"), c = Ye(i.props, `${o}.presets`, {});
2053
+ if (ie(s) && (!ss(i, "props") || ie(c)))
2054
+ return null;
2055
+ const n = (p) => {
2056
+ const h = p.trim().toLowerCase().replace(/ +(?= )/g, "").split(" ");
2057
+ l([r._id], h, !0);
2058
+ };
2059
+ return /* @__PURE__ */ e.jsx("div", { className: "h-10", children: /* @__PURE__ */ e.jsxs(Rr, { children: [
2060
+ /* @__PURE__ */ e.jsx(Vr, { asChild: !0, children: /* @__PURE__ */ e.jsx("div", { className: "px-4", children: /* @__PURE__ */ e.jsxs(oe, { variant: "default", className: "w-full", size: "sm", children: [
2061
+ t("Apply Presets"),
2062
+ /* @__PURE__ */ e.jsx(Qt, {})
2063
+ ] }) }) }),
2064
+ /* @__PURE__ */ e.jsx(Hr, { className: "max-h-80 w-56", children: /* @__PURE__ */ e.jsxs(He, { className: "no-scrollbar h-full", children: [
2065
+ ie(c) ? null : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2066
+ /* @__PURE__ */ e.jsxs(Ae, { children: [
2067
+ i.type,
2068
+ " ",
2069
+ t("presets")
2070
+ ] }),
2071
+ /* @__PURE__ */ e.jsx(Me, {}),
2072
+ /* @__PURE__ */ e.jsx(Ee, { children: Xe(c).map((p) => /* @__PURE__ */ e.jsxs(Le, { className: "group text-xs", onClick: () => n(c[p]), children: [
2073
+ Ze(We(t(p))),
2074
+ /* @__PURE__ */ e.jsx(Oe, { className: "invisible hover:font-bold hover:text-blue-600 group-hover:visible", children: t("apply") })
2075
+ ] })) })
2076
+ ] }),
2077
+ ie(s) ? null : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2078
+ /* @__PURE__ */ e.jsx(Ae, { children: t("Global presets") }),
2079
+ /* @__PURE__ */ e.jsx(Me, {}),
2080
+ /* @__PURE__ */ e.jsx(Ee, { children: Xe(s).map((p) => /* @__PURE__ */ e.jsxs(Le, { className: "group text-xs", onClick: () => n(s[p]), children: [
2081
+ Ze(We(t(p))),
2082
+ /* @__PURE__ */ e.jsx(Oe, { className: "invisible hover:font-bold hover:text-blue-600 group-hover:visible", children: t("apply") })
2083
+ ] })) })
2084
+ ] })
2085
+ ] }) })
2086
+ ] }) });
2052
2087
  };
2053
- function ml() {
2054
- const [r, o] = Je(), { flexChild: t, gridChild: s } = mr(), [, l] = Ar(fr), { t: i } = K(), [a] = Se();
2055
- return f(a) ? /* @__PURE__ */ e.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 rounded-xl p-4", children: [
2056
- /* @__PURE__ */ e.jsx(Ze, { className: "mx-auto text-3xl" }),
2057
- /* @__PURE__ */ e.jsx("h1", { children: i("no_styling_block_selected") })
2058
- ] }) }) : (
2059
- // eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions
2060
- /* @__PURE__ */ e.jsxs("div", { onClick: () => l(!1), className: "flex h-full flex-col", children: [
2061
- /* @__PURE__ */ e.jsx("div", { className: "flex h-12 flex-col space-x-4 px-4 py-1", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-end gap-x-1.5", children: [
2062
- /* @__PURE__ */ e.jsx(Te, { htmlFor: "", className: "flex gap-x-1.5 text-xs italic", children: "State" }),
2063
- /* @__PURE__ */ e.jsxs(vr, { defaultValue: r, onValueChange: (c) => o(c), children: [
2064
- /* @__PURE__ */ e.jsx(wr, { className: "h-auto w-fit p-1 px-3", children: /* @__PURE__ */ e.jsx(jr, { placeholder: "State" }) }),
2065
- /* @__PURE__ */ e.jsxs(Cr, { children: [
2066
- /* @__PURE__ */ e.jsx(H, { value: "", children: "Normal" }),
2067
- /* @__PURE__ */ e.jsx(H, { value: "hover", children: "Hover" }),
2068
- /* @__PURE__ */ e.jsx(H, { value: "active", children: "Active" }),
2069
- /* @__PURE__ */ e.jsx(H, { value: "focus", children: "Focus" }),
2070
- /* @__PURE__ */ e.jsx(H, { value: "before", children: "Before" }),
2071
- /* @__PURE__ */ e.jsx(H, { value: "after", children: "After" }),
2072
- /* @__PURE__ */ e.jsx(H, { value: "only", children: "Only" }),
2073
- /* @__PURE__ */ e.jsx(H, { value: "first", children: "First" }),
2074
- /* @__PURE__ */ e.jsx(H, { value: "last", children: "Last" }),
2075
- /* @__PURE__ */ e.jsx(H, { value: "first-letter", children: "First Letter" }),
2076
- /* @__PURE__ */ e.jsx(H, { value: "first-line", children: "First Line" }),
2077
- /* @__PURE__ */ e.jsx(H, { value: "disabled", children: "Disabled" })
2078
- ] })
2088
+ function $s() {
2089
+ const [r, a] = ct(), { flexChild: t, gridChild: s } = Dr(), { t: l } = W(), [i] = he();
2090
+ return f(i) ? /* @__PURE__ */ e.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 rounded-xl p-4", children: [
2091
+ /* @__PURE__ */ e.jsx(ot, { className: "mx-auto text-3xl" }),
2092
+ /* @__PURE__ */ e.jsx("h1", { children: l("no_styling_block_selected") })
2093
+ ] }) }) : /* @__PURE__ */ e.jsxs("div", { className: "flex h-full flex-col", children: [
2094
+ /* @__PURE__ */ e.jsx(Bs, {}),
2095
+ /* @__PURE__ */ e.jsx("div", { className: "flex h-12 flex-col space-x-4 px-4 py-1", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-end gap-x-1.5", children: [
2096
+ /* @__PURE__ */ e.jsx(Ve, { htmlFor: "", className: "flex gap-x-1.5 text-xs italic", children: "State" }),
2097
+ /* @__PURE__ */ e.jsxs(Br, { defaultValue: r, onValueChange: (o) => a(o), children: [
2098
+ /* @__PURE__ */ e.jsx($r, { className: "h-auto w-fit p-1 px-3", children: /* @__PURE__ */ e.jsx(Pr, { placeholder: "State" }) }),
2099
+ /* @__PURE__ */ e.jsxs(Ir, { children: [
2100
+ /* @__PURE__ */ e.jsx(H, { value: "", children: "Normal" }),
2101
+ /* @__PURE__ */ e.jsx(H, { value: "hover", children: "Hover" }),
2102
+ /* @__PURE__ */ e.jsx(H, { value: "active", children: "Active" }),
2103
+ /* @__PURE__ */ e.jsx(H, { value: "focus", children: "Focus" }),
2104
+ /* @__PURE__ */ e.jsx(H, { value: "before", children: "Before" }),
2105
+ /* @__PURE__ */ e.jsx(H, { value: "after", children: "After" }),
2106
+ /* @__PURE__ */ e.jsx(H, { value: "only", children: "Only" }),
2107
+ /* @__PURE__ */ e.jsx(H, { value: "first", children: "First" }),
2108
+ /* @__PURE__ */ e.jsx(H, { value: "last", children: "Last" }),
2109
+ /* @__PURE__ */ e.jsx(H, { value: "first-letter", children: "First Letter" }),
2110
+ /* @__PURE__ */ e.jsx(H, { value: "first-line", children: "First Line" }),
2111
+ /* @__PURE__ */ e.jsx(H, { value: "disabled", children: "Disabled" })
2079
2112
  ] })
2080
- ] }) }),
2081
- r !== "" ? /* @__PURE__ */ e.jsxs("div", { className: "m-1 flex items-center space-x-1 rounded border border-orange-500 bg-orange-200 p-px px-2 text-xs text-orange-900", children: [
2082
- /* @__PURE__ */ e.jsx(Vr, { className: "w-3" }),
2083
- /* @__PURE__ */ e.jsx("span", { children: i(`Styles will be applied for (:${r}) state`) })
2084
- ] }) : null,
2085
- /* @__PURE__ */ e.jsx(Qe, { className: "no-scrollbar -mx-1 max-h-full flex-1 overflow-x-hidden overflow-y-hidden border-t border-border", children: /* @__PURE__ */ e.jsxs(Ue, { defaultValue: ["Layout"], type: "multiple", className: "w-full", children: [
2086
- t && /* @__PURE__ */ e.jsx(me, { section: qr }),
2087
- s ? /* @__PURE__ */ e.jsx(me, { section: Gr }) : null,
2088
- Jr.map((c) => /* @__PURE__ */ e.jsx(me, { section: c }, c.heading)),
2089
- /* @__PURE__ */ e.jsx(bl, { section: { heading: "Attributes" } })
2090
- ] }) })
2091
- ] })
2092
- );
2113
+ ] })
2114
+ ] }) }),
2115
+ r !== "" ? /* @__PURE__ */ e.jsxs("div", { className: "m-1 flex items-center space-x-1 rounded border border-orange-500 bg-orange-200 p-px px-2 text-xs text-orange-900", children: [
2116
+ /* @__PURE__ */ e.jsx(zr, { className: "w-3" }),
2117
+ /* @__PURE__ */ e.jsx("span", { children: l(`Styles will be applied for (:${r}) state`) })
2118
+ ] }) : null,
2119
+ /* @__PURE__ */ e.jsx(He, { className: "no-scrollbar -mx-1 max-h-full flex-1 overflow-x-hidden overflow-y-hidden border-t border-border", children: /* @__PURE__ */ e.jsxs(nt, { defaultValue: ["Layout"], type: "multiple", className: "w-full", children: [
2120
+ t && /* @__PURE__ */ e.jsx(ve, { section: ps }),
2121
+ s ? /* @__PURE__ */ e.jsx(ve, { section: us }) : null,
2122
+ xs.map((o) => /* @__PURE__ */ e.jsx(ve, { section: o }, o.heading)),
2123
+ /* @__PURE__ */ e.jsx(Ds, { section: { heading: "Attributes" } })
2124
+ ] }) })
2125
+ ] });
2093
2126
  }
2094
- const fl = {
2127
+ const Ps = {
2095
2128
  px: 1,
2096
2129
  "%": 1,
2097
2130
  em: 100,
@@ -2102,8 +2135,8 @@ const fl = {
2102
2135
  "-": 1,
2103
2136
  deg: 1,
2104
2137
  ms: 0.1
2105
- }, vs = () => {
2106
- const r = q(), { t: o } = K(), [t, s] = P.useState(""), [l, i] = P.useState({
2138
+ }, Pl = () => {
2139
+ const r = U(), { t: a } = W(), [t, s] = I.useState(""), [l, i] = I.useState({
2107
2140
  onDrag: (n) => n,
2108
2141
  onDragEnd: (n) => n,
2109
2142
  dragStartY: 0,
@@ -2112,15 +2145,15 @@ const fl = {
2112
2145
  dragUnit: "",
2113
2146
  negative: !1,
2114
2147
  cssProperty: ""
2115
- }), a = fe(
2148
+ }), o = je(
2116
2149
  (n) => {
2117
- const u = !x(l, "negative", !1), y = x(l, "cssProperty", "");
2150
+ const p = !x(l, "negative", !1), h = x(l, "cssProperty", "");
2118
2151
  let d = parseFloat(l.dragStartValue);
2119
- d = Fe(d) ? 0 : d;
2120
- let h = fl[l.dragUnit];
2121
- (W(y, "scale") || y === "opacity") && (h = 10);
2122
- let p = (l.dragStartY - n.pageY) / h + d;
2123
- u && p < 0 && (p = 0), y === "opacity" && p > 1 && (p = 1), l.onDrag(`${p}`), s(`${p}`);
2152
+ d = tt(d) ? 0 : d;
2153
+ let y = Ps[l.dragUnit];
2154
+ (G(h, "scale") || h === "opacity") && (y = 10);
2155
+ let u = (l.dragStartY - n.pageY) / y + d;
2156
+ p && u < 0 && (u = 0), h === "opacity" && u > 1 && (u = 1), l.onDrag(`${u}`), s(`${u}`);
2124
2157
  },
2125
2158
  [l],
2126
2159
  50
@@ -2136,28 +2169,28 @@ const fl = {
2136
2169
  cssProperty: ""
2137
2170
  });
2138
2171
  }, [l, t, i]);
2139
- return Ct(r) ? /* @__PURE__ */ e.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 rounded-xl p-4", children: [
2140
- /* @__PURE__ */ e.jsx(Ze, { className: "mx-auto text-3xl" }),
2141
- /* @__PURE__ */ e.jsx("h1", { children: o("no_block_selected_for_styling") })
2142
- ] }) }) : /* @__PURE__ */ e.jsx(tt, { children: /* @__PURE__ */ e.jsxs(at.Provider, { value: { setDragData: i }, children: [
2172
+ return Bt(r) ? /* @__PURE__ */ e.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 rounded-xl p-4", children: [
2173
+ /* @__PURE__ */ e.jsx(ot, { className: "mx-auto text-3xl" }),
2174
+ /* @__PURE__ */ e.jsx("h1", { children: a("no_block_selected_for_styling") })
2175
+ ] }) }) : /* @__PURE__ */ e.jsx(pt, { children: /* @__PURE__ */ e.jsxs(yt.Provider, { value: { setDragData: i }, children: [
2143
2176
  l.dragging ? /* @__PURE__ */ e.jsx(
2144
2177
  "div",
2145
2178
  {
2146
- onMouseMove: a,
2179
+ onMouseMove: o,
2147
2180
  onMouseUp: () => c(),
2148
2181
  className: "absolute inset-0 z-30 cursor-row-resize bg-gray-300/10"
2149
2182
  }
2150
2183
  ) : null,
2151
- /* @__PURE__ */ e.jsxs(kr, { defaultValue: "settings", className: "flex h-full w-full flex-col py-1", children: [
2152
- /* @__PURE__ */ e.jsxs(Nr, { className: "mx-1 grid grid-cols-2", children: [
2153
- /* @__PURE__ */ e.jsx(De, { value: "settings", children: o("settings") }),
2154
- /* @__PURE__ */ e.jsx(De, { value: "styling", children: o("styling") })
2184
+ /* @__PURE__ */ e.jsxs(Ar, { defaultValue: "settings", className: "flex h-full w-full flex-col py-1", children: [
2185
+ /* @__PURE__ */ e.jsxs(Mr, { className: "mx-1 grid grid-cols-2", children: [
2186
+ /* @__PURE__ */ e.jsx(Fe, { value: "settings", children: a("settings") }),
2187
+ /* @__PURE__ */ e.jsx(Fe, { value: "styling", children: a("styling") })
2155
2188
  ] }),
2156
- /* @__PURE__ */ e.jsx($e, { value: "settings", className: "no-scrollbar h-full flex-1 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(Qe, { className: "no-scrollbar max-h-full flex-1 overflow-x-hidden overflow-y-hidden pb-5", children: /* @__PURE__ */ e.jsx(Ur, {}) }) }),
2157
- /* @__PURE__ */ e.jsx($e, { value: "styling", className: "h-full flex-1 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(ml, {}) })
2189
+ /* @__PURE__ */ e.jsx(ze, { value: "settings", className: "no-scrollbar h-full flex-1 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(He, { className: "no-scrollbar max-h-full flex-1 overflow-x-hidden overflow-y-hidden pb-5", children: /* @__PURE__ */ e.jsx(ds, {}) }) }),
2190
+ /* @__PURE__ */ e.jsx(ze, { value: "styling", className: "h-full flex-1 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx($s, {}) })
2158
2191
  ] })
2159
2192
  ] }) });
2160
2193
  };
2161
2194
  export {
2162
- vs as default
2195
+ Pl as default
2163
2196
  };