@chaibuilder/sdk 1.1.18 → 1.2.0

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 (122) hide show
  1. package/dist/AddBlocks-57-vroWk.cjs +1 -0
  2. package/dist/AddBlocks-QvCc-oag.js +225 -0
  3. package/dist/BrandingOptions-arKT1zCy.cjs +1 -0
  4. package/dist/{BrandingOptions-zFJ28xmJ.js → BrandingOptions-mZXO7thQ.js} +27 -25
  5. package/dist/{CanvasArea-vTV3O27-.js → CanvasArea-59Gm0EZx.js} +581 -598
  6. package/dist/CanvasArea-jRg53jrS.cjs +59 -0
  7. package/dist/CurrentPage-MLObvs0K.cjs +1 -0
  8. package/dist/{CurrentPage-Ay7X9h9y.js → CurrentPage-YPI5QTjk.js} +17 -14
  9. package/dist/Functions-7jnEwJyw.js +15 -0
  10. package/dist/Functions-N3yhPYKY.cjs +1 -0
  11. package/dist/{Layers-CWnzKXMo.js → Layers-no2keK4N.js} +149 -146
  12. package/dist/Layers-x_mWeT_q.cjs +1 -0
  13. package/dist/MODIFIERS-2FeVfZQ9.cjs +1 -0
  14. package/dist/{MODIFIERS-MLfpKQY1.js → MODIFIERS-RiXS5Mn1.js} +7 -13
  15. package/dist/MarkAsGlobalBlock-S2BhHTsK.cjs +1 -0
  16. package/dist/{MarkAsGlobalBlock-uhj0kGZo.js → MarkAsGlobalBlock-SPWd6Flk.js} +9 -7
  17. package/dist/{PagesPanel-ALbBHaO3.js → PagesPanel-Q08uN4X3.js} +12 -9
  18. package/dist/PagesPanel-pOIuFPOA.cjs +1 -0
  19. package/dist/ProjectPanel-4bN_GyNm.cjs +1 -0
  20. package/dist/{ProjectPanel-tIDarI9R.js → ProjectPanel-zzYV9yrV.js} +25 -22
  21. package/dist/{Settings-5uDMY9SU.js → Settings-28A7R61i.js} +334 -331
  22. package/dist/Settings-KlTtgu3w.cjs +1 -0
  23. package/dist/{SidePanels-D6U95ur1.js → SidePanels--ZK6Iqou.js} +80 -77
  24. package/dist/SidePanels-eJBA_cUu.cjs +1 -0
  25. package/dist/{Topbar-_-1HX-EE.js → Topbar-ks1ckGLz.js} +15 -13
  26. package/dist/Topbar-u5XKdWgQ.cjs +1 -0
  27. package/dist/{UnsplashImages-mqK09h8E.js → UnsplashImages-8vJPuqrF.js} +25 -23
  28. package/dist/UnsplashImages-V8oKEHfi.cjs +1 -0
  29. package/dist/{UploadImages-IDkkRuhx.js → UploadImages-6N6UrjLo.js} +26 -24
  30. package/dist/UploadImages-eHYxwWAp.cjs +1 -0
  31. package/dist/_commonjsHelpers-UyOWmZb0.js +8 -0
  32. package/dist/_commonjsHelpers-wDK0ZLPo.cjs +1 -0
  33. package/dist/{add-page-modal-C1UGoRkw.js → add-page-modal-EHIYTW4T.js} +27 -24
  34. package/dist/add-page-modal-OvNXLGf0.cjs +1 -0
  35. package/dist/{confirm-alert-ea5xpncD.js → confirm-alert-biqvaLT-.js} +9 -7
  36. package/dist/confirm-alert-f3DYO5Hj.cjs +1 -0
  37. package/dist/controls-Dy1qa8Dc.cjs +1 -0
  38. package/dist/controls-XPXGHKht.js +182 -0
  39. package/dist/core.cjs +1 -1
  40. package/dist/core.d.ts +10 -1
  41. package/dist/core.js +60 -57
  42. package/dist/delete-page-modal-U4yiuhx0.cjs +1 -0
  43. package/dist/{delete-page-modal-0GxR128b.js → delete-page-modal-qZJCk_JH.js} +15 -12
  44. package/dist/email-blocks.cjs +1 -0
  45. package/dist/email-blocks.d.ts +3 -0
  46. package/dist/email-blocks.js +35 -0
  47. package/dist/{form-irY39wvJ.js → form-Moz_psOw.js} +16 -16
  48. package/dist/form-lJhy9DEC.cjs +1 -0
  49. package/dist/functions-Ox_svtKm.cjs +1 -0
  50. package/dist/functions-xIebp8Aw.js +23 -0
  51. package/dist/html-to-json-dfALTAdG.cjs +1 -0
  52. package/dist/{html-to-json-wmbV9eZP.js → html-to-json-xKBERAI1.js} +47 -46
  53. package/dist/index-IIJ_o44s.cjs +1 -0
  54. package/dist/{index-qEix1meh.js → index-QEchoZ98.js} +8 -8
  55. package/dist/{index-0OqmBgqo.js → index-_OgCuSUz.js} +528 -533
  56. package/dist/{index-npVo1wi3.cjs → index-hMoPNZVn.cjs} +2 -2
  57. package/dist/{jsx-runtime-NV737rRe.js → jsx-runtime-WbnYoNE9.js} +1 -1
  58. package/dist/{jsx-runtime-WUGKV8jN.cjs → jsx-runtime-Z_BpKhVy.cjs} +7 -7
  59. package/dist/lib.cjs +2 -2
  60. package/dist/lib.d.ts +1 -1
  61. package/dist/lib.js +47 -44
  62. package/dist/page-viewer-WhM1FSU0.cjs +1 -0
  63. package/dist/{page-viewer-mgnZt6nO.js → page-viewer-zFLkUu2I.js} +17 -14
  64. package/dist/{project-general-setting-M52W-vUp.js → project-general-setting-MWGOOurD.js} +16 -13
  65. package/dist/project-general-setting-y8daY7V9.cjs +1 -0
  66. package/dist/project-seo-setting-9JGBPzcA.cjs +1 -0
  67. package/dist/{project-seo-setting-EhqUcTKy.js → project-seo-setting-dXclexQW.js} +15 -13
  68. package/dist/render.cjs +1 -1
  69. package/dist/render.d.ts +1 -1
  70. package/dist/render.js +50 -49
  71. package/dist/server.cjs +1 -1
  72. package/dist/server.d.ts +1 -1
  73. package/dist/server.js +11 -11
  74. package/dist/single-page-detail--xPv74bX.cjs +1 -0
  75. package/dist/{single-page-detail-61UDUgWG.js → single-page-detail-C48IPzbd.js} +77 -74
  76. package/dist/studio.cjs +1 -1
  77. package/dist/studio.js +11 -8
  78. package/dist/ui.cjs +1 -1
  79. package/dist/ui.d.ts +3 -3
  80. package/dist/ui.js +144 -142
  81. package/dist/useAddBlockByDrop-_nd8yZBa.cjs +1 -0
  82. package/dist/useAddBlockByDrop-uPXvrg4G.js +20 -0
  83. package/dist/{utils-XsPKXMVo.js → utils-AvyFzbPC.js} +26 -35
  84. package/dist/utils-PTxFk6qT.cjs +1 -0
  85. package/dist/web-blocks.cjs +9 -0
  86. package/dist/web-blocks.d.ts +3 -0
  87. package/dist/web-blocks.js +1033 -0
  88. package/package.json +5 -2
  89. package/dist/AddBlocks-sKF4ti68.js +0 -222
  90. package/dist/AddBlocks-yPovJXtD.cjs +0 -1
  91. package/dist/BrandingOptions-TRVyCvVq.cjs +0 -1
  92. package/dist/CanvasArea-xxqOiENt.cjs +0 -59
  93. package/dist/CurrentPage-ju6otPNk.cjs +0 -1
  94. package/dist/Layers-d9OU0HRE.cjs +0 -1
  95. package/dist/MODIFIERS-WFzDQfiT.cjs +0 -1
  96. package/dist/MarkAsGlobalBlock-CDmEHNx7.cjs +0 -1
  97. package/dist/PagesPanel-F9Cdi4Pf.cjs +0 -1
  98. package/dist/ProjectPanel-T49RUDyt.cjs +0 -1
  99. package/dist/Settings-eZnusNbR.cjs +0 -1
  100. package/dist/SidePanels-BVM5JwGC.cjs +0 -1
  101. package/dist/Topbar-gQxbcPtG.cjs +0 -1
  102. package/dist/UnsplashImages-PNp5fYCc.cjs +0 -1
  103. package/dist/UploadImages-BoSSsLtD.cjs +0 -1
  104. package/dist/add-page-modal-HP1yv9yJ.cjs +0 -1
  105. package/dist/confirm-alert-dHRDZrA1.cjs +0 -1
  106. package/dist/controls-QnyBNkXG.cjs +0 -36
  107. package/dist/controls-kEuiMMDf.js +0 -4600
  108. package/dist/delete-page-modal-yOgfPcHr.cjs +0 -1
  109. package/dist/form-6qGAOYI3.cjs +0 -1
  110. package/dist/functions-86L6n983.js +0 -23
  111. package/dist/functions-Jr7gX_RX.cjs +0 -1
  112. package/dist/html-to-json-AqLy6ye-.cjs +0 -1
  113. package/dist/index-d55M5MRz.cjs +0 -1
  114. package/dist/lodash-2us0VT8I.cjs +0 -36
  115. package/dist/lodash-3gkdNK5u.js +0 -4538
  116. package/dist/page-viewer-G2YIKVSt.cjs +0 -1
  117. package/dist/project-general-setting-sinIiBKe.cjs +0 -1
  118. package/dist/project-seo-setting-N0OnBCvh.cjs +0 -1
  119. package/dist/single-page-detail-oa-yTXhQ.cjs +0 -1
  120. package/dist/useAddBlockByDrop-5QW86HjG.js +0 -20
  121. package/dist/useAddBlockByDrop-Ckzuvu-s.cjs +0 -1
  122. package/dist/utils-37UXq2O5.cjs +0 -1
@@ -1,22 +1,23 @@
1
- import { j as e } from "./jsx-runtime-NV737rRe.js";
1
+ import { j as e } from "./jsx-runtime-WbnYoNE9.js";
2
2
  import * as ne from "react";
3
- import $, { useState as j, useMemo as _, useEffect as M, useCallback as B, memo as ct, createContext as Oe, useContext as le } from "react";
4
- import { useThrottledCallback as ve } from "@react-hookz/web";
5
- import { f as ue, L as ie, o as pt, M as ut, c as A, g, h as ge, N as gt, O as Y, P as se, a as m, d as C, j as xt, l as we, b as je, s as Me, k as yt, Q as ht, u as bt, R as mt, S as Ve, e as W, T as ft, p as vt, U as ze, V as wt, n as U, W as Ye, t as be, A as jt } from "./lodash-3gkdNK5u.js";
3
+ import $, { useState as j, useMemo as _, useEffect as M, useCallback as B, memo as ct, createContext as Oe, useContext as se } from "react";
4
+ import { useThrottledCallback as fe } from "@react-hookz/web";
5
+ import { forEach as ke, isArray as ie, omit as pt, truncate as ut, includes as A, get as g, first as ue, split as gt, startCase as Y, toLower as le, isEmpty as m, map as C, find as xt, last as ve, filter as we, set as Me, keys as yt, cloneDeep as ht, each as bt, capitalize as mt, reject as ft, nth as Ve, startsWith as W, isNumber as vt, parseInt as wt, isNaN as ze, findLast as jt, flatten as U, intersection as Ye, has as he, isNull as Ct } from "lodash-es";
6
6
  import { useTranslation as K } from "react-i18next";
7
- import { PlusIcon as Ne, Cross2Icon as Xe, EyeOpenIcon as Ct, EyeClosedIcon as He, BorderAllIcon as P, WidthIcon as T, HeightIcon as R, ArrowUpIcon as Q, ArrowRightIcon as ee, ArrowDownIcon as te, ArrowLeftIcon as re, ArrowTopLeftIcon as kt, ArrowTopRightIcon as Nt, ArrowBottomRightIcon as _t, ArrowBottomLeftIcon as St, AlignLeftIcon as Tt, AlignCenterHorizontallyIcon as Rt, AlignRightIcon as Vt, StretchHorizontallyIcon as Ht, FontItalicIcon as Bt, UnderlineIcon as Dt, OverlineIcon as $t, LetterCaseUppercaseIcon as It, Cross1Icon as Pt, InfoCircledIcon as _e, MinusIcon as At, BoxIcon as Fe, RowSpacingIcon as Lt, TriangleDownIcon as Et, CrossCircledIcon as Ot, TrashIcon as Mt, MixerHorizontalIcon as Ze } from "@radix-ui/react-icons";
8
- import { b0 as zt, b1 as Yt, B as xe, b2 as Xt, b3 as Ft, b4 as Zt, b5 as Wt, b6 as Ut, b7 as Kt, b8 as qt, a6 as q, am as Gt, an as Jt, ao as Qt, b9 as er, ak as tr, ba as rr, al as sr, aD as X, aE as F, aG as Z, bb as lr, bc as or, bd as ar, be as nr, bf as ir, bg as dr, p as We, ac as Ue, i as cr, bh as Ke, bi as de, bj as ce, bk as pe, aj as Se, P as qe, a3 as Ge, j as Je, aI as Te, bl as pr, bm as ur, a4 as ye, W as gr, a9 as Qe, R as Be, ag as xr, ad as yr, bn as hr, aq as br, ar as mr, as as fr, at as vr, au as V, bo as et, ax as wr, ay as jr, az as De, aA as $e } from "./index-0OqmBgqo.js";
9
- import { R as Cr } from "./controls-kEuiMMDf.js";
10
- import { Check as kr, EditIcon as Nr, TrashIcon as _r } from "lucide-react";
11
- import { getBlockComponent as tt, getChaiDataProviders as Sr } from "@chaibuilder/runtime";
12
- import { E as rt, u as st } from "./index-qEix1meh.js";
13
- import Tr from "@rjsf/core";
14
- import Rr from "@rjsf/validator-ajv8";
15
- import { useAtom as Vr } from "jotai";
16
- import Hr from "react-autosuggest";
17
- import Br from "fuse.js";
18
- import { A as Dr, C as he, e as $r } from "./utils-XsPKXMVo.js";
19
- import { a as Ir } from "./MODIFIERS-MLfpKQY1.js";
7
+ import { PlusIcon as Ne, Cross2Icon as Fe, EyeOpenIcon as kt, EyeClosedIcon as He, BorderAllIcon as P, 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 Lt, BoxIcon as Xe, RowSpacingIcon as Et, TriangleDownIcon as Ot, CrossCircledIcon as Mt, TrashIcon as zt, MixerHorizontalIcon as Ze } from "@radix-ui/react-icons";
8
+ import { a$ as Yt, b0 as Ft, B as ge, b1 as Xt, b2 as Zt, b3 as Wt, b4 as Ut, b5 as Kt, b6 as qt, b7 as Gt, a6 as q, am as Jt, an as Qt, ao as er, b8 as tr, ak as rr, b9 as lr, al as sr, aC as F, aD as X, aF as Z, ba as or, bb as ar, bc as nr, bd as ir, be as dr, bf as cr, p as We, ac as Ue, i as pr, bg as Ke, bh as de, bi as ce, bj as pe, aj as Se, P as qe, a3 as Ge, j as Je, aH as Te, bk as ur, bl as gr, a4 as xe, W as xr, a9 as Qe, R as Be, ag as yr, ad as hr, bm as br, aq as mr, ar as fr, as as vr, at as wr, au as V, bn as et, aw as jr, ax as Cr, ay as De, az as $e } from "./index-_OgCuSUz.js";
9
+ import { u as kr } from "./controls-XPXGHKht.js";
10
+ import { Check as Nr, EditIcon as _r, TrashIcon as Sr } from "lucide-react";
11
+ import { getBlockComponent as tt, getChaiDataProviders as Tr } from "@chaibuilder/runtime";
12
+ import { E as rt, u as lt } from "./index-QEchoZ98.js";
13
+ import Rr from "@rjsf/core";
14
+ import Vr from "@rjsf/validator-ajv8";
15
+ import { useAtom as Hr } from "jotai";
16
+ import Br from "react-autosuggest";
17
+ import Dr from "fuse.js";
18
+ import { A as $r, C as ye, g as Ir } from "./utils-AvyFzbPC.js";
19
+ import { a as Pr } from "./MODIFIERS-RiXS5Mn1.js";
20
+ import "./_commonjsHelpers-UyOWmZb0.js";
20
21
  import "@radix-ui/react-toggle";
21
22
  import "class-variance-authority";
22
23
  import "@radix-ui/react-switch";
@@ -41,9 +42,11 @@ import "react-icons-picker";
41
42
  import "react-dom";
42
43
  import "react-quill";
43
44
  import "flat-to-nested";
45
+ import "./Functions-7jnEwJyw.js";
46
+ import "clsx";
47
+ import "tailwind-merge";
44
48
  import "redux-undo";
45
49
  import "i18next";
46
- import "clsx";
47
50
  import "@floating-ui/react-dom";
48
51
  import "react-textarea-autosize";
49
52
  import "flagged";
@@ -51,28 +54,28 @@ import "react-dnd";
51
54
  import "@minoru/react-dnd-treeview";
52
55
  import "react-hotkeys-hook";
53
56
  import "sonner";
54
- import "./html-to-json-wmbV9eZP.js";
57
+ import "./html-to-json-xKBERAI1.js";
55
58
  import "himalaya";
56
- import "tailwind-merge";
57
- const Pr = $.lazy(() => import("react-json-view"));
58
- function Ar(r) {
59
- const l = [], t = {};
60
- function o(s, d) {
61
- ue(d, (a, c) => {
62
- const i = s ? `${s}.${c}` : c, p = ie(a) ? "list" : typeof a;
63
- l.push(i), t[i] = p === "string" ? "text" : p === "object" ? "model" : p, p === "object" && !ie(a) && o(i, a);
59
+ import "lodash";
60
+ const Ar = $.lazy(() => import("react-json-view"));
61
+ function Lr(r) {
62
+ const s = [], t = {};
63
+ function o(l, d) {
64
+ ke(d, (a, c) => {
65
+ const i = l ? `${l}.${c}` : c, p = ie(a) ? "list" : typeof a;
66
+ s.push(i), t[i] = p === "string" ? "text" : p === "object" ? "model" : p, p === "object" && !ie(a) && o(i, a);
64
67
  });
65
68
  }
66
- return o("", pt(r, ["styles", "_type", "_id", "_name", "_bindings"])), { paths: l, pathsType: t };
69
+ return o("", pt(r, ["styles", "_type", "_id", "_name", "_bindings"])), { paths: s, pathsType: t };
67
70
  }
68
- const Ce = ({ data: r, fullView: l }) => {
71
+ const je = ({ data: r, fullView: s }) => {
69
72
  if (!r)
70
73
  return null;
71
74
  const t = typeof r;
72
- return l ? typeof r == "object" ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
75
+ return s ? typeof r == "object" ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
73
76
  /* @__PURE__ */ e.jsx("div", { className: "h-3" }),
74
77
  /* @__PURE__ */ e.jsx(rt, { children: /* @__PURE__ */ e.jsx(
75
- Pr,
78
+ Ar,
76
79
  {
77
80
  style: { maxHeight: "40vh", overflowY: "auto" },
78
81
  name: "Content",
@@ -89,46 +92,46 @@ const Ce = ({ data: r, fullView: l }) => {
89
92
  ] }) : /* @__PURE__ */ e.jsx("div", { className: "text-[10px] text-gray-800/50 leading-3 whitespace-nowrap overflow-hidden w-full", children: ut(t === "object" ? JSON.stringify(r) : r, { length: 40 }) });
90
93
  }, Ie = ({
91
94
  type: r,
92
- value: l = "",
95
+ value: s = "",
93
96
  setValue: t,
94
97
  data: o,
95
- onChange: s,
98
+ onChange: l,
96
99
  dataType: d,
97
100
  appliedBindings: a
98
101
  }) => {
99
- const { paths: c, pathsType: i } = Ar(o), p = r === "PROP" ? tt(o == null ? void 0 : o._type) : {}, h = r === "PROP", [n, y] = j(!1), x = _(() => r === "PROP" ? c.filter(
100
- (u) => !A(a, u) && g(p, `props.${ge(gt(u, "."))}.binding`)
102
+ const { paths: c, pathsType: i } = Lr(o), p = r === "PROP" ? tt(o == null ? void 0 : o._type) : {}, h = r === "PROP", [n, y] = j(!1), x = _(() => r === "PROP" ? c.filter(
103
+ (u) => !A(a, u) && g(p, `props.${ue(gt(u, "."))}.binding`)
101
104
  ) : c.filter((u) => d === g(i, u, "")), [r, c, a, d, p]);
102
105
  return M(() => {
103
- l && s(l);
104
- }, [l, r]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
106
+ s && l(s);
107
+ }, [s, r]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
105
108
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-4", children: [
106
- /* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted-foreground", children: Y(se(r)) }),
107
- /* @__PURE__ */ e.jsxs(zt, { open: n, onOpenChange: y, children: [
108
- /* @__PURE__ */ e.jsx(Yt, { asChild: !0, children: /* @__PURE__ */ e.jsx(
109
- xe,
109
+ /* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted-foreground", children: Y(le(r)) }),
110
+ /* @__PURE__ */ e.jsxs(Yt, { open: n, onOpenChange: y, children: [
111
+ /* @__PURE__ */ e.jsx(Ft, { asChild: !0, children: /* @__PURE__ */ e.jsx(
112
+ ge,
110
113
  {
111
114
  variant: "outline",
112
115
  size: "sm",
113
- className: ` ${m(l) ? "bg-blue-500 text-gray-100 hover:bg-blue-400 hover:text-white w-44 justify-center" : "min-w-[350px] justify-between items-center"}`,
114
- children: l ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
116
+ className: ` ${m(s) ? "bg-blue-500 text-gray-100 hover:bg-blue-400 hover:text-white w-44 justify-center" : "min-w-[350px] justify-between items-center"}`,
117
+ children: s ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
115
118
  /* @__PURE__ */ e.jsxs("span", { className: "text-sm pr-8", children: [
116
119
  h && /* @__PURE__ */ e.jsx("span", { className: "text-[10px] text-purple-500 bg-purple-100 px-2 py-0.5 mr-2 rounded-full", children: Y(d) }),
117
- l
120
+ s
118
121
  ] }),
119
122
  /* @__PURE__ */ e.jsx("span", { className: "text-[9px] text-blue-400 underline cursor-pointer hover:text-blue-700", children: "Change" })
120
123
  ] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
121
124
  "+ Set ",
122
- Y(se(r))
125
+ Y(le(r))
123
126
  ] })
124
127
  }
125
128
  ) }),
126
- /* @__PURE__ */ e.jsx(Xt, { className: "p-0 z-[999] min-w-[300px]", side: "right", align: "start", children: /* @__PURE__ */ e.jsxs(Ft, { children: [
127
- /* @__PURE__ */ e.jsx(Zt, { placeholder: `Choose ${se(r)}...` }),
128
- /* @__PURE__ */ e.jsxs(Wt, { children: [
129
- /* @__PURE__ */ e.jsx(Ut, { children: "No results found." }),
130
- /* @__PURE__ */ e.jsx(Kt, { children: C(x, (u) => /* @__PURE__ */ e.jsxs(
131
- qt,
129
+ /* @__PURE__ */ e.jsx(Xt, { className: "p-0 z-[999] min-w-[300px]", side: "right", align: "start", children: /* @__PURE__ */ e.jsxs(Zt, { children: [
130
+ /* @__PURE__ */ e.jsx(Wt, { placeholder: `Choose ${le(r)}...` }),
131
+ /* @__PURE__ */ e.jsxs(Ut, { children: [
132
+ /* @__PURE__ */ e.jsx(Kt, { children: "No results found." }),
133
+ /* @__PURE__ */ e.jsx(qt, { children: C(x, (u) => /* @__PURE__ */ e.jsxs(
134
+ Gt,
132
135
  {
133
136
  value: u,
134
137
  className: `cursor-pointer ${h ? "flex justify-between items-center" : "flex flex-col items-start justify-start"}`,
@@ -137,10 +140,10 @@ const Ce = ({ data: r, fullView: l }) => {
137
140
  },
138
141
  children: [
139
142
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
140
- /* @__PURE__ */ e.jsx(kr, { className: `w-4 h-4 text-green-500 ${l === u ? "" : "opacity-0"}` }),
143
+ /* @__PURE__ */ e.jsx(Nr, { className: `w-4 h-4 text-green-500 ${s === u ? "" : "opacity-0"}` }),
141
144
  u
142
145
  ] }),
143
- h ? /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx("span", { className: "text-[10px] text-purple-500 bg-purple-100 px-2 py-0.5 rounded-full", children: Y(g(i, u, "")) }) }) : /* @__PURE__ */ e.jsx("div", { className: "pl-6", children: /* @__PURE__ */ e.jsx(Ce, { data: g(o, u) }) })
146
+ h ? /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx("span", { className: "text-[10px] text-purple-500 bg-purple-100 px-2 py-0.5 rounded-full", children: Y(g(i, u, "")) }) }) : /* @__PURE__ */ e.jsx("div", { className: "pl-6", children: /* @__PURE__ */ e.jsx(je, { data: g(o, u) }) })
144
147
  ]
145
148
  },
146
149
  u
@@ -149,15 +152,15 @@ const Ce = ({ data: r, fullView: l }) => {
149
152
  ] }) })
150
153
  ] })
151
154
  ] }),
152
- !h && !m(l) && /* @__PURE__ */ e.jsx("div", { className: "pt-2", children: /* @__PURE__ */ e.jsx(Ce, { data: g(o, l, ""), fullView: !0 }) })
155
+ !h && !m(s) && /* @__PURE__ */ e.jsx("div", { className: "pt-2", children: /* @__PURE__ */ e.jsx(je, { data: g(o, s, ""), fullView: !0 }) })
153
156
  ] });
154
- }, Lr = ({
157
+ }, Er = ({
155
158
  appliedBindings: r = [],
156
- onAddBinding: l,
159
+ onAddBinding: s,
157
160
  editMode: t,
158
161
  item: o
159
162
  }) => {
160
- const [s, d] = j(t ? o.key : ""), [a, c] = j(t ? o.value : ""), i = q(), [p] = st(), h = B(
163
+ const [l, d] = j(t ? o.key : ""), [a, c] = j(t ? o.value : ""), i = q(), [p] = lt(), h = B(
161
164
  (x, u) => {
162
165
  if (m(x))
163
166
  return "";
@@ -172,9 +175,9 @@ const Ce = ({ data: r, fullView: l }) => {
172
175
  [i, p]
173
176
  ), [n, y] = j(t ? h(o.key, "PROP") : "");
174
177
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
175
- /* @__PURE__ */ e.jsxs(Gt, { children: [
176
- /* @__PURE__ */ e.jsx(Jt, { children: "Add Data Binding" }),
177
- /* @__PURE__ */ e.jsx(Qt, { className: "text-xs", children: "Add prop and path of binding. Click save when you're done." })
178
+ /* @__PURE__ */ e.jsxs(Jt, { children: [
179
+ /* @__PURE__ */ e.jsx(Qt, { children: "Add Data Binding" }),
180
+ /* @__PURE__ */ e.jsx(er, { className: "text-xs", children: "Add prop and path of binding. Click save when you're done." })
178
181
  ] }),
179
182
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1 relative", children: [
180
183
  /* @__PURE__ */ e.jsx(
@@ -183,7 +186,7 @@ const Ce = ({ data: r, fullView: l }) => {
183
186
  type: "PROP",
184
187
  isDisabled: !1,
185
188
  placeholder: "Enter prop key",
186
- value: s,
189
+ value: l,
187
190
  setValue: d,
188
191
  onChange: (x) => {
189
192
  const u = h(x, "PROP");
@@ -199,7 +202,7 @@ const Ce = ({ data: r, fullView: l }) => {
199
202
  Ie,
200
203
  {
201
204
  type: "PATH",
202
- isDisabled: m(s),
205
+ isDisabled: m(l),
203
206
  placeholder: "Enter data path",
204
207
  value: a,
205
208
  setValue: c,
@@ -213,26 +216,26 @@ const Ce = ({ data: r, fullView: l }) => {
213
216
  }
214
217
  )
215
218
  ] }),
216
- /* @__PURE__ */ e.jsx(er, { children: /* @__PURE__ */ e.jsx(
217
- xe,
219
+ /* @__PURE__ */ e.jsx(tr, { children: /* @__PURE__ */ e.jsx(
220
+ ge,
218
221
  {
219
222
  type: "submit",
220
223
  className: "mt-4",
221
- disabled: m(s) && m(a),
222
- onClick: () => l({ key: s, value: a }),
224
+ disabled: m(l) && m(a),
225
+ onClick: () => s({ key: l, value: a }),
223
226
  children: "Save"
224
227
  }
225
228
  ) })
226
229
  ] });
227
- }, lt = ({ disabled: r, children: l, onAddBinding: t, appliedBindings: o, editMode: s = !0, item: d = {} }) => {
230
+ }, st = ({ disabled: r, children: s, onAddBinding: t, appliedBindings: o, editMode: l = !0, item: d = {} }) => {
228
231
  const [a, c] = j(!1);
229
- return /* @__PURE__ */ e.jsxs(tr, { children: [
230
- /* @__PURE__ */ e.jsx(rr, { disabled: r, asChild: !0, onClick: () => c(!0), children: l }),
232
+ return /* @__PURE__ */ e.jsxs(rr, { children: [
233
+ /* @__PURE__ */ e.jsx(lr, { disabled: r, asChild: !0, onClick: () => c(!0), children: s }),
231
234
  a && /* @__PURE__ */ e.jsx(sr, { children: /* @__PURE__ */ e.jsx(
232
- Lr,
235
+ Er,
233
236
  {
234
237
  item: d,
235
- editMode: s,
238
+ editMode: l,
236
239
  appliedBindings: o,
237
240
  onAddBinding: (i) => {
238
241
  t(i), c(!1);
@@ -240,19 +243,19 @@ const Ce = ({ data: r, fullView: l }) => {
240
243
  }
241
244
  ) })
242
245
  ] });
243
- }, Er = ({
246
+ }, Or = ({
244
247
  item: r,
245
- onAddBinding: l,
248
+ onAddBinding: s,
246
249
  onRemove: t,
247
250
  selectedBlock: o,
248
- dataProvider: s,
251
+ dataProvider: l,
249
252
  appliedBindings: d
250
253
  }) => {
251
254
  const [a, c] = j("string"), i = (p, h) => {
252
255
  if (m(p))
253
256
  return "";
254
257
  {
255
- const n = g(h === "PROP" ? o : s, p, "");
258
+ const n = g(h === "PROP" ? o : l, p, "");
256
259
  if (ie(n))
257
260
  return "list";
258
261
  const y = typeof n;
@@ -262,11 +265,11 @@ const Ce = ({ data: r, fullView: l }) => {
262
265
  return M(() => c(() => i(r.key, "PROP")), [r.key]), /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col border border-gray-200 relative rounded-md p-2", children: [
263
266
  /* @__PURE__ */ e.jsx("div", { className: "text-gray-500 font-normal text-sm", children: r.key }),
264
267
  /* @__PURE__ */ e.jsx("div", { className: "font-medium leading-5", children: r.value }),
265
- /* @__PURE__ */ e.jsx(Ce, { data: g(s, r.value, "") }),
268
+ /* @__PURE__ */ e.jsx(je, { data: g(l, r.value, "") }),
266
269
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-end gap-x-2", children: [
267
- /* @__PURE__ */ e.jsx(lt, { editMode: !0, onAddBinding: l, appliedBindings: d, item: r, children: /* @__PURE__ */ e.jsx(Nr, { className: "h-6 w-6 mt-1 cursor-pointer rounded border hover:bg-blue-400 hover:text-white border-blue-400 p-1 text-blue-400 hover:scale-105 duration-200" }) }),
270
+ /* @__PURE__ */ e.jsx(st, { editMode: !0, onAddBinding: s, appliedBindings: d, item: r, children: /* @__PURE__ */ e.jsx(_r, { className: "h-6 w-6 mt-1 cursor-pointer rounded border hover:bg-blue-400 hover:text-white border-blue-400 p-1 text-blue-400 hover:scale-105 duration-200" }) }),
268
271
  /* @__PURE__ */ e.jsx(
269
- _r,
272
+ Sr,
270
273
  {
271
274
  onClick: () => t(),
272
275
  className: "h-6 w-6 mt-1 cursor-pointer rounded border hover:bg-red-400 hover:text-white border-red-400 p-1 text-red-400 hover:scale-105 duration-200"
@@ -275,8 +278,8 @@ const Ce = ({ data: r, fullView: l }) => {
275
278
  ] }),
276
279
  !m(a) && !m(r.key) && /* @__PURE__ */ e.jsx("div", { className: "mt-px absolute right-0 top-1 text-purple-600 text-[10px] flex items-center font-medium h-4 px-2 rounded-full", children: Y(a) })
277
280
  ] });
278
- }, Or = ({ bindingData: r, onChange: l }) => {
279
- const t = q(), [o] = st(), s = Sr(), [d, a] = j(
281
+ }, Mr = ({ bindingData: r, onChange: s }) => {
282
+ const t = q(), [o] = lt(), l = Tr(), [d, a] = j(
280
283
  C(r, (n, y) => ({ key: y, value: n }))
281
284
  );
282
285
  M(() => {
@@ -287,34 +290,34 @@ const Ce = ({ data: r, fullView: l }) => {
287
290
  return !0;
288
291
  if (m(d))
289
292
  return !1;
290
- const n = we(d);
293
+ const n = ve(d);
291
294
  return m(n == null ? void 0 : n.key) || m(n == null ? void 0 : n.value);
292
295
  }, [o, d]), i = (n) => {
293
- const y = je(d, (x) => x.key !== n.key);
296
+ const y = we(d, (x) => x.key !== n.key);
294
297
  a([...y, n]), h([...y, n]);
295
298
  }, p = (n) => {
296
- const y = je(d, (x, u) => n !== u);
299
+ const y = we(d, (x, u) => n !== u);
297
300
  h([...y]);
298
301
  }, h = B(
299
302
  (n = []) => {
300
303
  if (a(n), m(n)) {
301
- l({});
304
+ s({});
302
305
  return;
303
306
  }
304
307
  const y = {};
305
- ue(n, (x) => {
308
+ ke(n, (x) => {
306
309
  !m(x == null ? void 0 : x.key) && !m(x == null ? void 0 : x.value) && Me(y, x.key, x.value);
307
- }), l(y);
310
+ }), s(y);
308
311
  },
309
- [l]
312
+ [s]
310
313
  );
311
- return m(s) ? /* @__PURE__ */ e.jsx("div", { className: "w-full flex items-center justify-center", children: /* @__PURE__ */ e.jsxs("p", { className: "text-gray-500 mb-1.5 text-xs", children: [
314
+ return m(l) ? /* @__PURE__ */ e.jsx("div", { className: "w-full flex items-center justify-center", children: /* @__PURE__ */ e.jsxs("p", { className: "text-gray-500 mb-1.5 text-xs", children: [
312
315
  "You have no data providers registered. Please add a data provider to your project. ",
313
316
  /* @__PURE__ */ e.jsx("br", {}),
314
317
  /* @__PURE__ */ e.jsx("a", { className: "text-blue-500", href: "https://chaibuilder.com/docs/registering-data-providers", target: "_blank", children: "Learn more" })
315
318
  ] }) }) : /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
316
319
  C(d, (n, y) => /* @__PURE__ */ e.jsx(
317
- Er,
320
+ Or,
318
321
  {
319
322
  item: n,
320
323
  onAddBinding: i,
@@ -325,9 +328,9 @@ const Ce = ({ data: r, fullView: l }) => {
325
328
  },
326
329
  n.key
327
330
  )),
328
- /* @__PURE__ */ e.jsxs(X, { delayDuration: 200, children: [
329
- /* @__PURE__ */ e.jsx(F, { className: "w-full", children: /* @__PURE__ */ e.jsx(
330
- lt,
331
+ /* @__PURE__ */ e.jsxs(F, { delayDuration: 200, children: [
332
+ /* @__PURE__ */ e.jsx(X, { className: "w-full", children: /* @__PURE__ */ e.jsx(
333
+ st,
331
334
  {
332
335
  disabled: c,
333
336
  appliedBindings: C(d, "key"),
@@ -344,60 +347,60 @@ const Ce = ({ data: r, fullView: l }) => {
344
347
  c && /* @__PURE__ */ e.jsx(Z, { sideOffset: -55, className: "text-[11px]", children: m(o) ? "No data provider has been set up for this page." : "Complete last added data binding to add more" })
345
348
  ] })
346
349
  ] });
347
- }, Mr = () => /* @__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" }), me = ct(({ createHistorySnapshot: r, properties: l, formData: t, onChange: o }) => {
348
- const s = { type: "object", properties: {} }, d = {};
349
- return Object.keys(l).forEach((a) => {
350
- const c = l[a];
350
+ }, zr = () => /* @__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 = ct(({ createHistorySnapshot: r, properties: s, formData: t, onChange: o }) => {
351
+ const l = { type: "object", properties: {} }, d = {};
352
+ return Object.keys(s).forEach((a) => {
353
+ const c = s[a];
351
354
  if (A(["slot", "styles"], c.type))
352
355
  return;
353
356
  const i = a;
354
- s.properties[i] = lr(c), d[i] = or(c);
357
+ l.properties[i] = or(c), d[i] = ar(c);
355
358
  }), /* @__PURE__ */ e.jsx(
356
- Tr,
359
+ Rr,
357
360
  {
358
361
  widgets: {
359
- binding: Mr,
360
- richtext: ar,
361
- icon: nr,
362
- image: ir
362
+ binding: zr,
363
+ richtext: nr,
364
+ icon: ir,
365
+ image: dr
363
366
  },
364
- fields: { link: dr },
367
+ fields: { link: cr },
365
368
  idSeparator: ".",
366
369
  autoComplete: "off",
367
370
  omitExtraData: !1,
368
371
  liveOmit: !1,
369
- liveValidate: !0,
370
- validator: Rr,
372
+ liveValidate: !1,
373
+ validator: Vr,
371
374
  uiSchema: d,
372
375
  onBlur: r,
373
- schema: s,
376
+ schema: l,
374
377
  formData: t,
375
378
  onChange: o
376
379
  }
377
380
  );
378
381
  });
379
- function zr() {
380
- const r = q(), { createSnapshot: l } = We(), t = Ue(), o = tt(r._type), s = { ...r }, d = cr("dataBindingSupport", !1), a = () => l(), c = ({ formData: n }, y) => {
382
+ function Yr() {
383
+ const r = q(), { createSnapshot: s } = We(), t = Ue(), o = tt(r._type), l = { ...r }, d = pr("dataBindingSupport", !1), a = () => s(), c = ({ formData: n }, y) => {
381
384
  if (y) {
382
385
  const x = y.replace("root.", "");
383
386
  t([r._id], { [x]: g(n, x) });
384
387
  }
385
388
  }, i = {
386
- _name: Cr({
389
+ _name: kr({
387
390
  title: "Name",
388
391
  default: g(r, "_name", r._type)
389
392
  })
390
- }, p = yt(g(s, "_bindings", {})), h = _(() => {
393
+ }, p = yt(g(l, "_bindings", {})), h = _(() => {
391
394
  const n = ht(g(o, "props", {}));
392
- return d && ue(p, (y) => delete n[y]), n;
395
+ return d && bt(p, (y) => delete n[y]), n;
393
396
  }, [o, p, d]);
394
397
  return /* @__PURE__ */ e.jsxs("div", { className: "overflow-x-hidden", children: [
395
398
  /* @__PURE__ */ e.jsx(
396
- me,
399
+ be,
397
400
  {
398
401
  onChange: c,
399
402
  createHistorySnapshot: a,
400
- formData: s,
403
+ formData: l,
401
404
  properties: i
402
405
  }
403
406
  ),
@@ -414,11 +417,11 @@ function zr() {
414
417
  "Data Binding"
415
418
  ] }) }),
416
419
  /* @__PURE__ */ e.jsx(pe, { className: "pt-4 px-4", children: /* @__PURE__ */ e.jsx(
417
- Or,
420
+ Mr,
418
421
  {
419
- bindingData: g(s, "_bindings", {}),
422
+ bindingData: g(l, "_bindings", {}),
420
423
  onChange: (n) => {
421
- c({ formData: { ...s, _bindings: n } }, "root._bindings");
424
+ c({ formData: { ...l, _bindings: n } }, "root._bindings");
422
425
  }
423
426
  }
424
427
  ) })
@@ -429,47 +432,47 @@ function zr() {
429
432
  "Static Content"
430
433
  ] }) }),
431
434
  /* @__PURE__ */ e.jsxs(pe, { className: "pt-4", children: [
432
- m(p) ? "" : /* @__PURE__ */ e.jsxs("div", { className: "text-xs mx-4 border rounded-sm p-1 mb-1 mt-0 border-orange-500 text-orange-500 bg-orange-100", children: [
435
+ m(p) ? null : /* @__PURE__ */ e.jsxs("div", { className: "text-xs mx-4 border rounded-sm p-1 mb-1 mt-0 border-orange-500 text-orange-500 bg-orange-100", children: [
433
436
  "Data binding is set for ",
434
- /* @__PURE__ */ e.jsx("b", { children: C(p, bt).join(", ") }),
437
+ /* @__PURE__ */ e.jsx("b", { children: C(p, mt).join(", ") }),
435
438
  " ",
436
439
  p.length === 1 ? "property" : "properties",
437
440
  ". Remove data binding to edit static content."
438
441
  ] }),
439
442
  /* @__PURE__ */ e.jsx(
440
- me,
443
+ be,
441
444
  {
442
445
  onChange: c,
443
446
  createHistorySnapshot: a,
444
- formData: s,
447
+ formData: l,
445
448
  properties: h
446
449
  }
447
450
  )
448
451
  ] })
449
452
  ] })
450
453
  ] }) : /* @__PURE__ */ e.jsx(
451
- me,
454
+ be,
452
455
  {
453
456
  onChange: c,
454
457
  createHistorySnapshot: a,
455
- formData: s,
458
+ formData: l,
456
459
  properties: h
457
460
  }
458
461
  ),
459
462
  /* @__PURE__ */ e.jsx("div", { className: "pb-60" })
460
463
  ] });
461
464
  }
462
- const Pe = new Br(Dr, {
465
+ const Pe = new Dr($r, {
463
466
  isCaseSensitive: !1,
464
467
  threshold: 0.2,
465
468
  minMatchCharLength: 2,
466
469
  keys: ["name"]
467
470
  });
468
- function Yr() {
471
+ function Fr() {
469
472
  var L;
470
- const [r] = Se(), l = q(), t = qe(), o = Ge(), [s] = Je(), [d, a] = j(""), c = (L = ge(r)) == null ? void 0 : L.prop, i = mt((g(l, c, "").replace(Ir, "").split(",").pop() || "").split(" "), m), p = () => {
473
+ const [r] = Se(), s = q(), t = qe(), o = Ge(), [l] = Je(), [d, a] = j(""), c = (L = ue(r)) == null ? void 0 : L.prop, i = ft((g(s, c, "").replace(Pr, "").split(",").pop() || "").split(" "), m), p = () => {
471
474
  const w = d.trim().toLowerCase().replace(/ +(?= )/g, "").split(" ");
472
- t(s, w, !0), a("");
475
+ t(l, w, !0), a("");
473
476
  }, [h, n] = j([]), y = ({ value: w }) => {
474
477
  const I = w.trim().toLowerCase(), E = I.match(/.+:/g);
475
478
  let N = [];
@@ -505,7 +508,7 @@ function Yr() {
505
508
  /* @__PURE__ */ e.jsx(Te, { className: "mt-2", children: "Add Tailwind classes" }),
506
509
  /* @__PURE__ */ e.jsxs("div", { className: "relative -mt-4 flex items-center gap-x-3", children: [
507
510
  /* @__PURE__ */ e.jsx("div", { className: "relative flex w-full items-center gap-x-3", children: /* @__PURE__ */ e.jsx(
508
- Hr,
511
+ Br,
509
512
  {
510
513
  suggestions: h,
511
514
  onSuggestionsFetchRequested: y,
@@ -524,7 +527,7 @@ function Yr() {
524
527
  }
525
528
  ) }),
526
529
  /* @__PURE__ */ e.jsx(
527
- xe,
530
+ ge,
528
531
  {
529
532
  variant: "outline",
530
533
  className: "h-6 border-gray-700",
@@ -545,9 +548,9 @@ function Yr() {
545
548
  children: [
546
549
  w,
547
550
  /* @__PURE__ */ e.jsx(
548
- Xe,
551
+ Fe,
549
552
  {
550
- onClick: () => o(s, [w]),
553
+ onClick: () => o(l, [w]),
551
554
  className: "invisible absolute right-1 hover:text-white group-hover:visible group-hover:cursor-pointer"
552
555
  }
553
556
  )
@@ -570,7 +573,7 @@ const H = ["px", "%", "em", "rem", "ch", "vh", "vw"], Xr = {
570
573
  { type: "dropdown", label: "flex.grow", property: "flexGrow" },
571
574
  { type: "dropdown", label: "flex.shrink", property: "flexShrink" }
572
575
  ]
573
- }, Fr = {
576
+ }, Zr = {
574
577
  heading: "grid.heading",
575
578
  items: [
576
579
  { type: "range", label: "grid.col_span", property: "gridColSpan" },
@@ -581,7 +584,7 @@ const H = ["px", "%", "em", "rem", "ch", "vh", "vw"], Xr = {
581
584
  { type: "range", label: "grid.row_end", property: "gridRowEnd" },
582
585
  { type: "range", label: "grid.order", property: "order" }
583
586
  ]
584
- }, Zr = [
587
+ }, Wr = [
585
588
  {
586
589
  heading: "layout.heading",
587
590
  items: [
@@ -983,12 +986,12 @@ const H = ["px", "%", "em", "rem", "ch", "vh", "vw"], Xr = {
983
986
  },
984
987
  {
985
988
  heading: "classes.heading",
986
- items: [{ component: Yr }]
989
+ items: [{ component: Fr }]
987
990
  }
988
991
  ], ot = {
989
992
  "not-italic": () => /* @__PURE__ */ e.jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ e.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9 3H11V5H9V11H11V13H5V11H7V5H5V3H9Z", fill: "white" }) }),
990
993
  // visibility
991
- visible: Ct,
994
+ visible: kt,
992
995
  invisible: He,
993
996
  // display
994
997
  hidden: He,
@@ -1024,10 +1027,10 @@ const H = ["px", "%", "em", "rem", "ch", "vh", "vw"], Xr = {
1024
1027
  borderRadiusRight: ee,
1025
1028
  borderRadiusBottom: te,
1026
1029
  borderRadiusLeft: re,
1027
- borderRadiusTopLeft: kt,
1028
- borderRadiusTopRight: Nt,
1029
- borderRadiusBottomRight: _t,
1030
- borderRadiusBottomLeft: St,
1030
+ borderRadiusTopLeft: Nt,
1031
+ borderRadiusTopRight: _t,
1032
+ borderRadiusBottomRight: St,
1033
+ borderRadiusBottomLeft: Tt,
1031
1034
  divideXWidth: T,
1032
1035
  divideYWidth: R,
1033
1036
  scale: P,
@@ -1054,18 +1057,18 @@ const H = ["px", "%", "em", "rem", "ch", "vh", "vw"], Xr = {
1054
1057
  marginBottom: te,
1055
1058
  marginLeft: re,
1056
1059
  // text-align
1057
- textLeft: Tt,
1058
- textCenter: Rt,
1059
- textRight: Vt,
1060
- textJustify: Ht,
1060
+ textLeft: Rt,
1061
+ textCenter: Vt,
1062
+ textRight: Ht,
1063
+ textJustify: Bt,
1061
1064
  // font style
1062
- italic: Bt,
1065
+ italic: Dt,
1063
1066
  // "not-italic": "",
1064
1067
  // decoration
1065
- underline: Dt,
1066
- overline: $t,
1068
+ underline: $t,
1069
+ overline: It,
1067
1070
  // transform
1068
- uppercase: It,
1071
+ uppercase: Pt,
1069
1072
  block: () => /* @__PURE__ */ e.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
1070
1073
  /* @__PURE__ */ e.jsx(
1071
1074
  "path",
@@ -1106,7 +1109,7 @@ const H = ["px", "%", "em", "rem", "ch", "vh", "vw"], Xr = {
1106
1109
  }
1107
1110
  )
1108
1111
  ] }),
1109
- "float-none": Xe,
1112
+ "float-none": Fe,
1110
1113
  // position
1111
1114
  fixed: () => /* @__PURE__ */ e.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
1112
1115
  /* @__PURE__ */ e.jsx(
@@ -1178,37 +1181,37 @@ const H = ["px", "%", "em", "rem", "ch", "vh", "vw"], Xr = {
1178
1181
  }
1179
1182
  )
1180
1183
  ] }),
1181
- static: Pt
1182
- }, oe = Oe({ canReset: !1, canChange: !0 }), Wr = ({ children: r, canReset: l = !1, canChange: t = !0 }) => (
1184
+ static: At
1185
+ }, oe = Oe({ canReset: !1, canChange: !0 }), Ur = ({ children: r, canReset: s = !1, canChange: t = !0 }) => (
1183
1186
  // eslint-disable-next-line react/jsx-no-constructed-context-values
1184
- /* @__PURE__ */ e.jsx(oe.Provider, { value: { canReset: l, canChange: t }, children: r })
1185
- ), at = ({ label: r, property: l, onChange: t }) => {
1186
- const o = _(() => g(he, `${l}.classes`, [""]), [l]), s = ae(l), d = _(() => g(s, "cls", ""), [s]), { canChange: a } = le(oe), c = /\[.*\]/g.test(d);
1187
+ /* @__PURE__ */ e.jsx(oe.Provider, { value: { canReset: s, canChange: t }, children: r })
1188
+ ), at = ({ label: r, property: s, onChange: t }) => {
1189
+ const o = _(() => g(ye, `${s}.classes`, [""]), [s]), l = ae(s), d = _(() => g(l, "cls", ""), [l]), { canChange: a } = se(oe), c = /\[.*\]/g.test(d);
1187
1190
  return /* @__PURE__ */ e.jsx("div", { className: r ? "w-full rounded " : "grow", children: c ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
1188
- /* @__PURE__ */ e.jsx(pr, { className: "w-[70%] rounded py-1", readOnly: !0, value: d }),
1189
- /* @__PURE__ */ e.jsxs(X, { delayDuration: 100, children: [
1190
- /* @__PURE__ */ e.jsx(F, { 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, {}) }) }),
1191
+ /* @__PURE__ */ e.jsx(ur, { className: "w-[70%] rounded py-1", readOnly: !0, value: d }),
1192
+ /* @__PURE__ */ e.jsxs(F, { delayDuration: 100, children: [
1193
+ /* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsx("button", { type: "button", className: "invisible ml-3 mt-1 text-blue-600 group-hover:visible", children: /* @__PURE__ */ e.jsx(_e, {}) }) }),
1191
1194
  /* @__PURE__ */ e.jsx(Z, { children: "Current value is using a Tailwind arbitrary value." })
1192
1195
  ] })
1193
1196
  ] }) : /* @__PURE__ */ e.jsx(
1194
- ke,
1197
+ Ce,
1195
1198
  {
1196
1199
  rounded: r,
1197
- onChange: (i) => t(i, l),
1200
+ onChange: (i) => t(i, s),
1198
1201
  selected: d,
1199
1202
  options: o,
1200
1203
  disabled: !a
1201
1204
  }
1202
1205
  ) });
1203
1206
  };
1204
- function ke({ selected: r, onChange: l, rounded: t = !1, options: o, disabled: s = !1 }) {
1207
+ function Ce({ selected: r, onChange: s, rounded: t = !1, options: o, disabled: l = !1 }) {
1205
1208
  const d = r.replace(/.*:/g, "").trim(), { undo: a, redo: c } = We();
1206
1209
  return /* @__PURE__ */ e.jsxs(
1207
1210
  "select",
1208
1211
  {
1209
- disabled: !o.length || s,
1212
+ disabled: !o.length || l,
1210
1213
  className: `${t ? "rounded-md border border-border" : "border-0"} w-full disable:bg-gray-500 h-full truncate rounded bg-background px-2 py-1 text-xs outline-none disabled:cursor-not-allowed`,
1211
- onChange: (i) => l(i.target.value),
1214
+ onChange: (i) => s(i.target.value),
1212
1215
  onKeyDown: (i) => {
1213
1216
  i.ctrlKey && (i.key === "z" && a(), i.key === "y" && c());
1214
1217
  },
@@ -1222,8 +1225,8 @@ function ke({ selected: r, onChange: l, rounded: t = !1, options: o, disabled: s
1222
1225
  }
1223
1226
  );
1224
1227
  }
1225
- const Ur = ({ property: r, onChange: l }) => {
1226
- const { canReset: t, canChange: o } = le(oe), s = ae(r), d = _(() => g(s, "cls", ""), [s]), a = _(() => g(he, `${r}.classes`, [""]), [r]), c = a.indexOf(d) > -1 ? a.indexOf(d) : 0, i = /\[.*\]/g.test(d);
1228
+ const Kr = ({ property: r, onChange: s }) => {
1229
+ const { canReset: t, canChange: o } = se(oe), l = ae(r), d = _(() => g(l, "cls", ""), [l]), a = _(() => g(ye, `${r}.classes`, [""]), [r]), c = a.indexOf(d) > -1 ? a.indexOf(d) : 0, i = /\[.*\]/g.test(d);
1227
1230
  return /* @__PURE__ */ e.jsx("div", { className: "flex flex-row divide-x divide-solid divide-border rounded border border-border text-xs", children: i ? /* @__PURE__ */ e.jsx("div", { className: "py-[5px] px-2", children: d }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1228
1231
  /* @__PURE__ */ e.jsx(
1229
1232
  "button",
@@ -1231,23 +1234,23 @@ const Ur = ({ property: r, onChange: l }) => {
1231
1234
  type: "button",
1232
1235
  className: "box-border w-2/12 rounded-tl rounded-bl bg-background px-1 text-center hover:bg-bg-gray-700 disabled:cursor-not-allowed disabled:bg-gray-600",
1233
1236
  disabled: !o && (!t || c - 1 < 0),
1234
- onClick: () => l(Ve(a, c - 1), r),
1237
+ onClick: () => s(Ve(a, c - 1), r),
1235
1238
  children: /* @__PURE__ */ e.jsx("span", { className: "flex items-center justify-center", children: /* @__PURE__ */ e.jsx(
1236
- At,
1239
+ Lt,
1237
1240
  {
1238
1241
  className: !o && (!t || c - 1 < 0) ? "text-gray-500" : "text-black/60 dark:text-white/60"
1239
1242
  }
1240
1243
  ) })
1241
1244
  }
1242
1245
  ),
1243
- /* @__PURE__ */ e.jsx("div", { className: "w-8/12 text-center", children: /* @__PURE__ */ e.jsx(at, { label: !1, property: r, onChange: l }) }),
1246
+ /* @__PURE__ */ e.jsx("div", { className: "w-8/12 text-center", children: /* @__PURE__ */ e.jsx(at, { label: !1, property: r, onChange: s }) }),
1244
1247
  /* @__PURE__ */ e.jsx(
1245
1248
  "button",
1246
1249
  {
1247
1250
  type: "button",
1248
1251
  className: "w-2/12 rounded-tr rounded-br bg-background px-1 text-center hover:bg-bg-gray-700 disabled:cursor-not-allowed disabled:bg-gray-600",
1249
1252
  disabled: !o && (!t || c + 1 >= a.length),
1250
- onClick: () => l(Ve(a, c + 1), r),
1253
+ onClick: () => s(Ve(a, c + 1), r),
1251
1254
  children: /* @__PURE__ */ e.jsx("span", { className: "flex items-center justify-center", children: /* @__PURE__ */ e.jsx(
1252
1255
  Ne,
1253
1256
  {
@@ -1257,22 +1260,22 @@ const Ur = ({ property: r, onChange: l }) => {
1257
1260
  }
1258
1261
  )
1259
1262
  ] }) });
1260
- }, Kr = ({ property: r, onChange: l }) => {
1261
- const t = _(() => g(he, `${r}.classes`, [""]), [r]), { canChange: o } = le(oe), s = ae(r), d = _(() => g(s, "cls", ""), [s]);
1262
- return /* @__PURE__ */ e.jsx("div", { className: "flex grow flex-wrap gap-1", children: C(t, (a) => /* @__PURE__ */ e.jsxs(X, { children: [
1263
- /* @__PURE__ */ e.jsx(F, { asChild: !0, children: /* @__PURE__ */ e.jsx(
1263
+ }, qr = ({ property: r, onChange: s }) => {
1264
+ const t = _(() => g(ye, `${r}.classes`, [""]), [r]), { canChange: o } = se(oe), l = ae(r), d = _(() => g(l, "cls", ""), [l]);
1265
+ return /* @__PURE__ */ e.jsx("div", { className: "flex grow flex-wrap gap-1", children: C(t, (a) => /* @__PURE__ */ e.jsxs(F, { children: [
1266
+ /* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsx(
1264
1267
  "button",
1265
1268
  {
1266
1269
  type: "button",
1267
1270
  disabled: !o,
1268
- onClick: () => l(a, r),
1271
+ onClick: () => s(a, r),
1269
1272
  className: `cursor-pointer rounded border border-gray-600 p-1 disabled:cursor-not-allowed ${d === a ? " bg-blue-500 text-white" : "disabled:bg-gray-600 disabled:text-gray-400"}`,
1270
- children: $.createElement(g(ot, a, Fe))
1273
+ children: $.createElement(g(ot, a, Xe))
1271
1274
  }
1272
1275
  ) }),
1273
- /* @__PURE__ */ e.jsx(Z, { children: Y(se(a)) })
1276
+ /* @__PURE__ */ e.jsx(Z, { children: Y(le(a)) })
1274
1277
  ] })) });
1275
- }, qr = {
1278
+ }, Gr = {
1276
1279
  backgroundColor: "bg",
1277
1280
  textColor: "text",
1278
1281
  borderColor: "border",
@@ -1284,8 +1287,8 @@ const Ur = ({ property: r, onChange: l }) => {
1284
1287
  toColor: "to",
1285
1288
  ringColor: "ring",
1286
1289
  ringOffsetColor: "ring-offset"
1287
- }, Gr = ({ property: r, onChange: l }) => {
1288
- const t = ae(r), o = _(() => g(t, "cls", ""), [t]), { canChange: s } = le(oe), [d, a] = j([]), [c, i] = j({ color: "", shade: "" }), p = o.split("-"), h = g(p, "1", ""), n = g(p, "2", ""), y = B(
1290
+ }, Jr = ({ property: r, onChange: s }) => {
1291
+ const t = ae(r), o = _(() => g(t, "cls", ""), [t]), { canChange: l } = se(oe), [d, a] = j([]), [c, i] = j({ color: "", shade: "" }), p = o.split("-"), h = g(p, "1", ""), n = g(p, "2", ""), y = B(
1289
1292
  // eslint-disable-next-line no-shadow
1290
1293
  (u) => {
1291
1294
  ["current", "inherit", "transparent", "black", "white"].includes(u) ? (a([]), i({ color: u })) : (a(["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"]), i((f) => ({ ...f, color: u, shade: f.shade ? f.shade : "500" })));
@@ -1307,13 +1310,13 @@ const Ur = ({ property: r, onChange: l }) => {
1307
1310
  return M(() => {
1308
1311
  i({ color: "", shade: "" });
1309
1312
  }, [t]), M(() => {
1310
- const f = `${g(qr, r, "")}-${c.color}${c.shade ? `-${c.shade}` : ""}`;
1311
- f.match(new RegExp(g(he, `${r}.regExp`, ""))) && l(f, r);
1312
- }, [c, l, r]), /* @__PURE__ */ e.jsxs("div", { className: "flex flex-row divide-x divide-solid divide-border rounded-lg border border-border text-xs", children: [
1313
+ const f = `${g(Gr, r, "")}-${c.color}${c.shade ? `-${c.shade}` : ""}`;
1314
+ f.match(new RegExp(g(ye, `${r}.regExp`, ""))) && s(f, r);
1315
+ }, [c, s, r]), /* @__PURE__ */ e.jsxs("div", { className: "flex flex-row divide-x divide-solid divide-border rounded-lg border border-border text-xs", children: [
1313
1316
  /* @__PURE__ */ e.jsx("div", { className: "grow text-center", children: /* @__PURE__ */ e.jsx(
1314
- ke,
1317
+ Ce,
1315
1318
  {
1316
- disabled: !s,
1319
+ disabled: !l,
1317
1320
  rounded: !0,
1318
1321
  selected: h,
1319
1322
  onChange: y,
@@ -1349,20 +1352,20 @@ const Ur = ({ property: r, onChange: l }) => {
1349
1352
  ]
1350
1353
  }
1351
1354
  ) }),
1352
- /* @__PURE__ */ e.jsx("button", { type: "button", className: "grow text-center", children: /* @__PURE__ */ e.jsx(ke, { rounded: !0, selected: n, disabled: !h || !s, onChange: x, options: d }) })
1355
+ /* @__PURE__ */ e.jsx("button", { type: "button", className: "grow text-center", children: /* @__PURE__ */ e.jsx(Ce, { rounded: !0, selected: n, disabled: !h || !l, onChange: x, options: d }) })
1353
1356
  ] });
1354
- }, Ae = (r, l) => {
1357
+ }, Ae = (r, s) => {
1355
1358
  r = r.toLowerCase();
1356
1359
  let t = r.trim().replace(/ |\+/g, "");
1357
- if ((t === "auto" || t === "none") && l.includes(t))
1360
+ if ((t === "auto" || t === "none") && s.includes(t))
1358
1361
  return { value: "", unit: t };
1359
- const o = l.length ? new RegExp(l.join("|"), "g") : /XXXXXX/g;
1362
+ const o = s.length ? new RegExp(s.join("|"), "g") : /XXXXXX/g;
1360
1363
  t = t.replace(o, "");
1361
- const s = r.match(o), d = s && s.length > 1, a = !m(t) && Number.isNaN(Number(t));
1362
- return d || a ? { error: "Invalid value" } : s && (s[0] === "auto" || s[0] === "none") ? { value: s[0], unit: "" } : { value: t, unit: s ? s[0] : "" };
1364
+ const l = r.match(o), d = l && l.length > 1, a = !m(t) && Number.isNaN(Number(t));
1365
+ return d || a ? { error: "Invalid value" } : l && (l[0] === "auto" || l[0] === "none") ? { value: l[0], unit: "" } : { value: t, unit: l ? l[0] : "" };
1363
1366
  };
1364
- const Jr = (r) => {
1365
- const l = r.startsWith("-") ? "-" : "", t = r.split("-").pop();
1367
+ const Qr = (r) => {
1368
+ const s = r.startsWith("-") ? "-" : "", t = r.split("-").pop();
1366
1369
  if (["auto", "none"].includes(t))
1367
1370
  return { value: "", unit: t };
1368
1371
  if (t === "px")
@@ -1372,17 +1375,17 @@ const Jr = (r) => {
1372
1375
  if (t === "full")
1373
1376
  return { value: "100", unit: "%" };
1374
1377
  if (A(r, "skew-"))
1375
- return { value: `${l}${t}`, unit: "deg" };
1378
+ return { value: `${s}${t}`, unit: "deg" };
1376
1379
  if (A(r, "rotate-"))
1377
- return { value: `${l}${t}`, unit: "deg" };
1380
+ return { value: `${s}${t}`, unit: "deg" };
1378
1381
  if (A(r, "opacity-"))
1379
1382
  return { value: `${t / 100}`, unit: "-" };
1380
1383
  if (A(r, "duration-") || A(r, "delay-"))
1381
1384
  return { value: `${t}`, unit: "ms" };
1382
1385
  if (A(r, "translate-") && !t.includes("/"))
1383
- return { value: `${l}${`${t / 4}`}`, unit: "rem" };
1386
+ return { value: `${s}${`${t / 4}`}`, unit: "rem" };
1384
1387
  if (A(r, "scale-"))
1385
- return { value: `${l}${`${t / 100}`}`, unit: "-" };
1388
+ return { value: `${s}${`${t / 100}`}`, unit: "-" };
1386
1389
  if (W(r, "border")) {
1387
1390
  const o = r.match(/border-?(x|y|t|r|b|l)?\d+/g);
1388
1391
  if (o)
@@ -1485,32 +1488,32 @@ const Jr = (r) => {
1485
1488
  if (["max", "min", "fit"].includes(t))
1486
1489
  return { value: r, unit: "class" };
1487
1490
  if (t.includes("/")) {
1488
- const [o, s] = C(t.split("/"), (d) => parseInt(d, 10));
1489
- return { value: l + (o / s * 100).toFixed(2).replace(".00", ""), unit: "%" };
1491
+ const [o, l] = C(t.split("/"), (d) => parseInt(d, 10));
1492
+ return { value: s + (o / l * 100).toFixed(2).replace(".00", ""), unit: "%" };
1490
1493
  }
1491
- return ft(parseFloat(t)) ? { value: `${l + parseFloat(t) * 4}`, unit: "px" } : { value: t, unit: "class" };
1494
+ return vt(parseFloat(t)) ? { value: `${s + parseFloat(t) * 4}`, unit: "px" } : { value: t, unit: "class" };
1492
1495
  };
1493
- const Qr = (r) => {
1496
+ const el = (r) => {
1494
1497
  if (m(r))
1495
1498
  return { value: "", unit: "" };
1496
- const l = r.match(/\[.*\]/g);
1497
- if (l === null)
1498
- return es(r);
1499
- const t = g(l, "0", "").replace(/\[|\]/g, ""), o = r.startsWith("-") ? "-" : "", s = ge(t.match(/\d+.\d+|\d+/g));
1500
- return { value: `${o}${s}`, unit: t.replace(s, "") };
1501
- }, es = (r) => m(r) ? { value: "", unit: "" } : Jr(r), nt = $.createContext({
1499
+ const s = r.match(/\[.*\]/g);
1500
+ if (s === null)
1501
+ return tl(r);
1502
+ const t = g(s, "0", "").replace(/\[|\]/g, ""), o = r.startsWith("-") ? "-" : "", l = ue(t.match(/\d+.\d+|\d+/g));
1503
+ return { value: `${o}${l}`, unit: t.replace(l, "") };
1504
+ }, tl = (r) => m(r) ? { value: "", unit: "" } : Qr(r), nt = $.createContext({
1502
1505
  setDragData: () => {
1503
1506
  }
1504
- }), ts = ({
1507
+ }), rl = ({
1505
1508
  unit: r,
1506
- currentValue: l,
1509
+ currentValue: s,
1507
1510
  onDrag: t,
1508
1511
  onDragEnd: o,
1509
- onDragStart: s,
1512
+ onDragStart: l,
1510
1513
  negative: d,
1511
1514
  cssProperty: a
1512
1515
  }) => {
1513
- const { setDragData: c } = le(nt);
1516
+ const { setDragData: c } = se(nt);
1514
1517
  return /* @__PURE__ */ e.jsx(
1515
1518
  "button",
1516
1519
  {
@@ -1521,41 +1524,41 @@ const Qr = (r) => {
1521
1524
  onDragEnd: o,
1522
1525
  dragging: !0,
1523
1526
  dragStartY: i.pageY,
1524
- dragStartValue: `${l}`,
1527
+ dragStartValue: `${s}`,
1525
1528
  dragUnit: r,
1526
1529
  negative: d,
1527
1530
  cssProperty: a
1528
1531
  };
1529
- s(p), c(p);
1532
+ l(p), c(p);
1530
1533
  },
1531
1534
  color: void 0,
1532
1535
  className: "relative z-50 ml-1 hidden h-6 cursor-row-resize rounded bg-background/70 px-2 group-hover:inline",
1533
- children: /* @__PURE__ */ e.jsx(Lt, {})
1536
+ children: /* @__PURE__ */ e.jsx(Et, {})
1534
1537
  }
1535
1538
  );
1536
- }, rs = ({ onSelect: r, current: l, units: t }) => /* @__PURE__ */ e.jsx("div", { "data-theme": "light", className: "-m-[7px] -mx-[13px] flex w-9 flex-col", children: t.map((o) => /* @__PURE__ */ e.jsx(
1537
- xe,
1539
+ }, ll = ({ onSelect: r, current: s, units: t }) => /* @__PURE__ */ e.jsx("div", { "data-theme": "light", className: "-m-[7px] -mx-[13px] flex w-9 flex-col", children: t.map((o) => /* @__PURE__ */ e.jsx(
1540
+ ge,
1538
1541
  {
1539
1542
  className: "h-max rounded-none px-1 py-1 text-right text-[11px] hover:bg-blue-400",
1540
- color: l === o ? "primary" : void 0,
1543
+ color: s === o ? "primary" : void 0,
1541
1544
  size: "sm",
1542
- onClick: (s) => {
1543
- s.stopPropagation(), r(o);
1545
+ onClick: (l) => {
1546
+ l.stopPropagation(), r(o);
1544
1547
  },
1545
1548
  children: o
1546
1549
  },
1547
1550
  o
1548
- )) }), Le = 50, ss = (r) => {
1549
- const [l, t] = j(!1), [o, s] = j(""), { currentClass: d, onChange: a, classPrefix: c, cssProperty: i, units: p, negative: h } = r, [n, y] = j(i != null && i.toLowerCase().includes("width") ? "%" : p[0]), [x, u] = j(!1), [f, k] = j(""), [L, w] = j(!1), [I, E] = j(!1);
1551
+ )) }), Le = 50, sl = (r) => {
1552
+ const [s, t] = j(!1), [o, l] = j(""), { currentClass: d, onChange: a, classPrefix: c, cssProperty: i, units: p, negative: h } = r, [n, y] = j(i != null && i.toLowerCase().includes("width") ? "%" : p[0]), [x, u] = j(!1), [f, k] = j(""), [L, w] = j(!1), [I, E] = j(!1);
1550
1553
  M(() => {
1551
- const { value: b, unit: v } = Qr(d);
1554
+ const { value: b, unit: v } = el(d);
1552
1555
  if (v === "") {
1553
- s(b), y(i != null && i.toLowerCase().includes("width") ? "%" : ge(p));
1556
+ l(b), y(i != null && i.toLowerCase().includes("width") ? "%" : ue(p));
1554
1557
  return;
1555
1558
  }
1556
- y(v), s(v === "class" || m(b) ? "" : b);
1559
+ y(v), l(v === "class" || m(b) ? "" : b);
1557
1560
  }, [d, i, p]);
1558
- const N = ve((b) => a(b), [a], Le), D = ve((b) => a(b, !1), [a], Le), z = B(
1561
+ const N = fe((b) => a(b), [a], Le), D = fe((b) => a(b, !1), [a], Le), z = B(
1559
1562
  (b = !1) => {
1560
1563
  const v = Ae(`${o}`, p);
1561
1564
  if (g(v, "error", !1)) {
@@ -1593,8 +1596,8 @@ const Qr = (r) => {
1593
1596
  );
1594
1597
  return /* @__PURE__ */ e.jsx("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-start", children: n === "class" ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1595
1598
  /* @__PURE__ */ e.jsx("input", { className: "w-20 rounded py-1", readOnly: !0, value: d }),
1596
- /* @__PURE__ */ e.jsxs(X, { children: [
1597
- /* @__PURE__ */ e.jsx(F, { 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, {}) }) }),
1599
+ /* @__PURE__ */ e.jsxs(F, { children: [
1600
+ /* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsx("button", { type: "button", className: "invisible ml-3 mt-1 text-blue-600 group-hover:visible", children: /* @__PURE__ */ e.jsx(_e, {}) }) }),
1598
1601
  /* @__PURE__ */ e.jsx(Z, { children: "Current value is using a Tailwind preset class." })
1599
1602
  ] })
1600
1603
  ] }) : /* @__PURE__ */ e.jsxs("div", { className: `group relative flex items-center ${L ? "z-auto" : ""}`, children: [
@@ -1610,7 +1613,7 @@ const Qr = (r) => {
1610
1613
  if (b.keyCode !== 38 && b.keyCode !== 40)
1611
1614
  return;
1612
1615
  b.preventDefault(), E(!0);
1613
- const v = vt(b.target.value);
1616
+ const v = wt(b.target.value);
1614
1617
  let S = ze(v) ? 0 : v;
1615
1618
  b.keyCode === 38 && (S += 1), b.keyCode === 40 && (S -= 1);
1616
1619
  const O = `${S}`, dt = `${O.startsWith("-") ? "-" : ""}${c}[${O.replace("-", "")}${n === "-" ? "" : n}]`;
@@ -1621,7 +1624,7 @@ const Qr = (r) => {
1621
1624
  },
1622
1625
  onBlur: () => z(),
1623
1626
  onChange: (b) => {
1624
- u(!1), s(b.target.value);
1627
+ u(!1), l(b.target.value);
1625
1628
  },
1626
1629
  onClick: (b) => {
1627
1630
  var v;
@@ -1634,21 +1637,21 @@ const Qr = (r) => {
1634
1637
  )
1635
1638
  }
1636
1639
  ),
1637
- /* @__PURE__ */ e.jsxs(X, { open: l, delayDuration: 100, children: [
1638
- /* @__PURE__ */ e.jsx(F, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
1640
+ /* @__PURE__ */ e.jsxs(F, { open: s, delayDuration: 100, children: [
1641
+ /* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
1639
1642
  "button",
1640
1643
  {
1641
1644
  type: "button",
1642
- onClick: () => t(!l),
1645
+ onClick: () => t(!s),
1643
1646
  className: "flex h-6 cursor-pointer items-center gap-x-1 rounded rounded-l-none bg-background p-px px-1 text-[11px] uppercase",
1644
1647
  children: [
1645
1648
  /* @__PURE__ */ e.jsx("span", { className: `inline-block ${p.length === 1 ? "px-2 font-semibold" : ""}`, children: n }),
1646
- p.length > 1 ? /* @__PURE__ */ e.jsx(Et, {}) : null
1649
+ p.length > 1 ? /* @__PURE__ */ e.jsx(Ot, {}) : null
1647
1650
  ]
1648
1651
  }
1649
1652
  ) }),
1650
- /* @__PURE__ */ e.jsx(ur, { children: /* @__PURE__ */ e.jsx(Z, { className: "bg-background", children: /* @__PURE__ */ e.jsx(
1651
- rs,
1653
+ /* @__PURE__ */ e.jsx(gr, { children: /* @__PURE__ */ e.jsx(Z, { className: "bg-background", children: /* @__PURE__ */ e.jsx(
1654
+ ll,
1652
1655
  {
1653
1656
  units: p,
1654
1657
  current: n,
@@ -1660,7 +1663,7 @@ const Qr = (r) => {
1660
1663
  ] })
1661
1664
  ] }),
1662
1665
  ["none", "auto"].indexOf(n) !== -1 || L ? null : /* @__PURE__ */ e.jsx(
1663
- ts,
1666
+ rl,
1664
1667
  {
1665
1668
  onDragStart: () => w(!0),
1666
1669
  onDragEnd: (b) => {
@@ -1684,9 +1687,9 @@ const Qr = (r) => {
1684
1687
  )
1685
1688
  ] }) }) });
1686
1689
  }, ae = (r) => {
1687
- const l = ye();
1688
- return wt(l, { property: r });
1689
- }, ls = (r, l) => {
1690
+ const s = xe();
1691
+ return jt(s, { property: r });
1692
+ }, ol = (r, s) => {
1690
1693
  const t = {
1691
1694
  xs: 0,
1692
1695
  sm: 1,
@@ -1695,8 +1698,8 @@ const Qr = (r) => {
1695
1698
  xl: 4,
1696
1699
  "2xl": 5
1697
1700
  };
1698
- return t[g(r, "mq", "xs")] <= t[l];
1699
- }, os = {
1701
+ return t[g(r, "mq", "xs")] <= t[s];
1702
+ }, al = {
1700
1703
  width: "w-",
1701
1704
  height: "h-",
1702
1705
  minWidth: "min-w-",
@@ -1769,19 +1772,19 @@ const Qr = (r) => {
1769
1772
  lg: "1024px",
1770
1773
  xl: "1280px",
1771
1774
  "2xl": "1536px"
1772
- }, as = (r) => `${r.toUpperCase()} ${Ee[r] ? `(${Ee[r]} & up)` : ""}`, Re = (r) => {
1773
- const { t: l } = K(), { type: t = "icons", label: o, property: s, onEmitChange: d = () => {
1774
- }, units: a, negative: c = !1 } = r, [i] = gr(), [p] = Qe(), [, h] = Be(), n = ae(s), y = qe(), x = Ge(), [u] = Je(), f = _(() => g(n, "fullCls", ""), [n]), k = B(
1775
+ }, nl = (r) => `${r.toUpperCase()} ${Ee[r] ? `(${Ee[r]} & up)` : ""}`, Re = (r) => {
1776
+ const { t: s } = K(), { type: t = "icons", label: o, property: l, onEmitChange: d = () => {
1777
+ }, units: a, negative: c = !1 } = r, [i] = xr(), [p] = Qe(), [, h] = Be(), n = ae(l), y = qe(), x = Ge(), [u] = Je(), f = _(() => g(n, "fullCls", ""), [n]), k = B(
1775
1778
  (D, z = !0) => {
1776
- const G = { dark: i, mq: h, mod: p, cls: D, property: s, fullCls: "" };
1779
+ const G = { dark: i, mq: h, mod: p, cls: D, property: l, fullCls: "" };
1777
1780
  (i || p !== "") && (G.mq = "xs");
1778
- const b = $r(G);
1781
+ const b = Ir(G);
1779
1782
  y(u, [b], z);
1780
1783
  },
1781
- [u, i, h, p, s, y]
1784
+ [u, i, h, p, l, y]
1782
1785
  ), L = B(() => {
1783
1786
  x(u, [f]);
1784
- }, [u, f, x]), w = _(() => ls(n, h), [n, h]);
1787
+ }, [u, f, x]), w = _(() => ol(n, h), [n, h]);
1785
1788
  M(() => {
1786
1789
  d(w, n);
1787
1790
  }, [w, d, n]);
@@ -1798,28 +1801,28 @@ const Qr = (r) => {
1798
1801
  },
1799
1802
  [I]
1800
1803
  ), N = g(n, "dark", null) === i && g(n, "mod", null) === p && g(n, "mq", null) === h;
1801
- return /* @__PURE__ */ e.jsx(Wr, { canChange: w, canReset: n && N, children: /* @__PURE__ */ e.jsxs("div", { className: "group flex flex-row items-center py-2 first:pt-0 last:pb-0", children: [
1802
- /* @__PURE__ */ e.jsx("div", { className: "relative w-[70px] truncate text-xs text-foreground", children: /* @__PURE__ */ e.jsx("span", { className: `text-[11px] ${n && !N ? "text-foreground" : ""}`, children: l(o) }) }),
1804
+ return /* @__PURE__ */ e.jsx(Ur, { canChange: w, canReset: n && N, children: /* @__PURE__ */ e.jsxs("div", { className: "group flex flex-row items-center py-2 first:pt-0 last:pb-0", children: [
1805
+ /* @__PURE__ */ e.jsx("div", { className: "relative w-[70px] truncate text-xs text-foreground", children: /* @__PURE__ */ e.jsx("span", { className: `text-[11px] ${n && !N ? "text-foreground" : ""}`, children: s(o) }) }),
1803
1806
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-row items-center", children: [
1804
1807
  /* @__PURE__ */ e.jsxs("div", { className: "w-[150px]", children: [
1805
1808
  t === "arbitrary" ? /* @__PURE__ */ e.jsx(
1806
- ss,
1809
+ sl,
1807
1810
  {
1808
1811
  currentClass: g(n, "cls", ""),
1809
- classPrefix: g(os, s, ""),
1812
+ classPrefix: g(al, l, ""),
1810
1813
  units: a || [],
1811
1814
  onChange: k,
1812
1815
  negative: c,
1813
- cssProperty: s
1816
+ cssProperty: l
1814
1817
  }
1815
1818
  ) : null,
1816
- t === "icons" && /* @__PURE__ */ e.jsx(Kr, { property: s, onChange: k }),
1817
- t === "range" && /* @__PURE__ */ e.jsx(Ur, { property: s, onChange: k }),
1818
- t === "color" && /* @__PURE__ */ e.jsx(Gr, { property: s, onChange: k }),
1819
- t === "dropdown" && /* @__PURE__ */ e.jsx(at, { label: o, property: s, onChange: k })
1819
+ t === "icons" && /* @__PURE__ */ e.jsx(qr, { property: l, onChange: k }),
1820
+ t === "range" && /* @__PURE__ */ e.jsx(Kr, { property: l, onChange: k }),
1821
+ t === "color" && /* @__PURE__ */ e.jsx(Jr, { property: l, onChange: k }),
1822
+ t === "dropdown" && /* @__PURE__ */ e.jsx(at, { label: o, property: l, onChange: k })
1820
1823
  ] }),
1821
- /* @__PURE__ */ e.jsx("div", { className: `w-[30px] cursor-pointer ${f ? "visible" : "invisible"}`, children: N ? /* @__PURE__ */ e.jsx("button", { type: "button", onClick: () => L(), 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" }) }) : w && n ? /* @__PURE__ */ e.jsxs(X, { delayDuration: 100, children: [
1822
- /* @__PURE__ */ e.jsx(F, { asChild: !0, children: /* @__PURE__ */ e.jsx(
1824
+ /* @__PURE__ */ e.jsx("div", { className: `w-[30px] cursor-pointer ${f ? "visible" : "invisible"}`, children: N ? /* @__PURE__ */ e.jsx("button", { type: "button", onClick: () => L(), title: "Reset", className: "flex px-1.5 text-xs", children: /* @__PURE__ */ e.jsx(Mt, { className: "h-5 w-5 text-blue-500 hover:opacity-80" }) }) : w && n ? /* @__PURE__ */ e.jsxs(F, { delayDuration: 100, children: [
1825
+ /* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsx(
1823
1826
  "button",
1824
1827
  {
1825
1828
  type: "button",
@@ -1830,7 +1833,7 @@ const Qr = (r) => {
1830
1833
  /* @__PURE__ */ e.jsx(Z, { children: /* @__PURE__ */ e.jsx("div", { className: "text-right", children: /* @__PURE__ */ e.jsxs("div", { children: [
1831
1834
  "Current style is set at  ",
1832
1835
  /* @__PURE__ */ e.jsxs("span", { className: "font-bold ", children: [
1833
- as(g(n, "mq")),
1836
+ nl(g(n, "mq")),
1834
1837
  i && !n.dark ? "(Light mode)" : ""
1835
1838
  ] }),
1836
1839
  /* @__PURE__ */ e.jsx("br", {}),
@@ -1850,16 +1853,16 @@ const Qr = (r) => {
1850
1853
  ] }) : null })
1851
1854
  ] })
1852
1855
  ] }) });
1853
- }, ns = ["px", "%", "em", "rem", "ch", "vh", "vw"], it = ({
1856
+ }, il = ["px", "%", "em", "rem", "ch", "vh", "vw"], it = ({
1854
1857
  label: r,
1855
- options: l,
1858
+ options: s,
1856
1859
  borderB: t = !1,
1857
1860
  borderT: o = !1,
1858
- type: s = "arbitrary",
1859
- units: d = ns,
1861
+ type: l = "arbitrary",
1862
+ units: d = il,
1860
1863
  negative: a = !1
1861
1864
  }) => {
1862
- const { t: c } = K(), [i, p] = j(l[0].key), h = ye(), n = B((y) => C(h, "property").includes(y), [h]);
1865
+ const { t: c } = K(), [i, p] = j(s[0].key), h = xe(), n = B((y) => C(h, "property").includes(y), [h]);
1863
1866
  return /* @__PURE__ */ e.jsxs(
1864
1867
  "div",
1865
1868
  {
@@ -1868,8 +1871,8 @@ const Qr = (r) => {
1868
1871
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-row text-xs", children: [
1869
1872
  r && /* @__PURE__ */ e.jsx("span", { className: "relative w-[70px] flex-none text-xs text-foreground", children: c(r) }),
1870
1873
  /* @__PURE__ */ e.jsx("div", { className: "mb-3 flex grow flex-row flex-wrap gap-x-px", children: $.Children.toArray(
1871
- l.map(({ label: y, key: x }) => /* @__PURE__ */ e.jsx("div", { className: "first:rounded-l last:rounded-r", children: /* @__PURE__ */ e.jsxs(X, { children: [
1872
- /* @__PURE__ */ e.jsx(F, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
1874
+ s.map(({ label: y, key: x }) => /* @__PURE__ */ e.jsx("div", { className: "first:rounded-l last:rounded-r", children: /* @__PURE__ */ e.jsxs(F, { children: [
1875
+ /* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
1873
1876
  "button",
1874
1877
  {
1875
1878
  type: "button",
@@ -1879,18 +1882,18 @@ const Qr = (r) => {
1879
1882
  $.createElement("div", {
1880
1883
  className: n(x) ? "-bottom-1.5 absolute bg-[#3E57F0] h-[2px] left-0 w-full" : ""
1881
1884
  }),
1882
- $.createElement(g(ot, x, Fe), { className: "text-inherit w-3 h-3" })
1885
+ $.createElement(g(ot, x, Xe), { className: "text-inherit w-3 h-3" })
1883
1886
  ]
1884
1887
  }
1885
1888
  ) }),
1886
- /* @__PURE__ */ e.jsx(Z, { children: Y(se(y)) })
1889
+ /* @__PURE__ */ e.jsx(Z, { children: Y(le(y)) })
1887
1890
  ] }) }))
1888
1891
  ) })
1889
1892
  ] }),
1890
1893
  /* @__PURE__ */ e.jsx("div", { className: "mt-0 flex items-center", children: /* @__PURE__ */ e.jsx(
1891
1894
  Re,
1892
1895
  {
1893
- type: s,
1896
+ type: l,
1894
1897
  units: [...d],
1895
1898
  label: "",
1896
1899
  property: i,
@@ -1900,43 +1903,43 @@ const Qr = (r) => {
1900
1903
  ]
1901
1904
  }
1902
1905
  );
1903
- }, is = ({ heading: r, items: l }) => {
1904
- const { t } = K(), o = ye(), s = _(() => {
1906
+ }, dl = ({ heading: r, items: s }) => {
1907
+ const { t } = K(), o = xe(), l = _(() => {
1905
1908
  const d = (i) => U(
1906
1909
  i.map((p) => p.styleType === "multiple" ? C(p.options, "key") : p.property)
1907
1910
  ), a = U(
1908
- l.map((i) => i.styleType === "accordion" ? d(i.items) : i.styleType === "multiple" ? C(i.options, "key") : i.property)
1911
+ s.map((i) => i.styleType === "accordion" ? d(i.items) : i.styleType === "multiple" ? C(i.options, "key") : i.property)
1909
1912
  ), c = C(o, "property");
1910
1913
  return Ye(a, c).length > 0;
1911
- }, [o, l]);
1914
+ }, [o, s]);
1912
1915
  return /* @__PURE__ */ e.jsxs("details", { children: [
1913
1916
  /* @__PURE__ */ e.jsx("summary", { className: "my-px cursor-default rounded-md bg-background p-px px-2 text-[11px] text-foreground", children: /* @__PURE__ */ e.jsxs("div", { className: "inline", children: [
1914
1917
  t(r),
1915
- s ? /* @__PURE__ */ e.jsx(
1918
+ l ? /* @__PURE__ */ e.jsx(
1916
1919
  "span",
1917
1920
  {
1918
- className: `ml-1 mr-2 inline-block h-[8px] w-[8px] rounded-full ${s ? "bg-blue-500" : "bg-gray-300"}`
1921
+ className: `ml-1 mr-2 inline-block h-[8px] w-[8px] rounded-full ${l ? "bg-blue-500" : "bg-gray-300"}`
1919
1922
  }
1920
1923
  ) : null
1921
1924
  ] }) }),
1922
- /* @__PURE__ */ e.jsx("div", { className: "p-2", children: l.map((d) => d.styleType === "multiple" ? /* @__PURE__ */ e.jsx(it, { ...d }, d.label) : /* @__PURE__ */ e.jsx(Re, { ...d }, d.label)) })
1925
+ /* @__PURE__ */ e.jsx("div", { className: "p-2", children: s.map((d) => d.styleType === "multiple" ? /* @__PURE__ */ e.jsx(it, { ...d }, d.label) : /* @__PURE__ */ e.jsx(Re, { ...d }, d.label)) })
1923
1926
  ] });
1924
- }, ds = Oe({}), fe = ({ section: r }) => {
1925
- const { t: l } = K(), t = ye(), o = B(
1927
+ }, cl = Oe({}), me = ({ section: r }) => {
1928
+ const { t: s } = K(), t = xe(), o = B(
1926
1929
  (a = []) => {
1927
1930
  const c = {};
1928
1931
  for (let p = 0; p < t.length; p++)
1929
1932
  c[t[p].property] = t[p].cls;
1930
1933
  let i = !0;
1931
1934
  for (const p in a)
1932
- if (!be(c, p) || c[p] !== a[p]) {
1935
+ if (!he(c, p) || c[p] !== a[p]) {
1933
1936
  i = !1;
1934
1937
  break;
1935
1938
  }
1936
1939
  return i;
1937
1940
  },
1938
1941
  [t]
1939
- ), s = _(() => {
1942
+ ), l = _(() => {
1940
1943
  if (t.length > 0 && r.heading === "classes.heading")
1941
1944
  return !0;
1942
1945
  const a = (p) => U(
@@ -1946,27 +1949,27 @@ const Qr = (r) => {
1946
1949
  ), i = C(t, "property");
1947
1950
  return Ye(c, i).length > 0;
1948
1951
  }, [t, r.heading, r.items]), d = _(() => ({}), []);
1949
- return /* @__PURE__ */ e.jsx(ds.Provider, { value: d, children: /* @__PURE__ */ e.jsxs(de, { value: r.heading, children: [
1952
+ return /* @__PURE__ */ e.jsx(cl.Provider, { value: d, children: /* @__PURE__ */ e.jsxs(de, { value: r.heading, children: [
1950
1953
  /* @__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: [
1951
- /* @__PURE__ */ e.jsx("div", { className: `h-[8px] w-[8px] rounded-full ${s ? "bg-blue-500" : "bg-gray-300"}` }),
1952
- l(r.heading)
1954
+ /* @__PURE__ */ e.jsx("div", { className: `h-[8px] w-[8px] rounded-full ${l ? "bg-blue-500" : "bg-gray-300"}` }),
1955
+ s(r.heading)
1953
1956
  ] }) }),
1954
1957
  /* @__PURE__ */ e.jsx(pe, { className: "bg-gray-100 px-3.5 py-2", children: $.Children.toArray(
1955
- r.items.map((a) => be(a, "component") ? $.createElement(a.component, { key: a.label }) : be(a, "styleType") ? a.styleType === "multiple" ? /* @__PURE__ */ e.jsx(it, { ...a }, a.label) : a.styleType === "accordion" && o(a == null ? void 0 : a.conditions) ? /* @__PURE__ */ e.jsx(is, { ...a }, a.label) : null : /* @__PURE__ */ e.jsx(Re, { ...a }, a.label))
1958
+ r.items.map((a) => he(a, "component") ? $.createElement(a.component, { key: a.label }) : he(a, "styleType") ? a.styleType === "multiple" ? /* @__PURE__ */ e.jsx(it, { ...a }, a.label) : a.styleType === "accordion" && o(a == null ? void 0 : a.conditions) ? /* @__PURE__ */ e.jsx(dl, { ...a }, a.label) : null : /* @__PURE__ */ e.jsx(Re, { ...a }, a.label))
1956
1959
  ) })
1957
1960
  ] }) });
1958
- }, cs = ({
1961
+ }, pl = ({
1959
1962
  item: r,
1960
- index: l,
1963
+ index: s,
1961
1964
  canDelete: t,
1962
1965
  onChange: o,
1963
- onRemove: s
1966
+ onRemove: l
1964
1967
  }) => /* @__PURE__ */ e.jsxs("div", { className: `flex flex-col gap-1 border-gray-400 py-2 ${t ? "border-b" : ""}`, children: [
1965
1968
  /* @__PURE__ */ e.jsx(
1966
1969
  "input",
1967
1970
  {
1968
1971
  name: "key",
1969
- onChange: (d) => o(d, l),
1972
+ onChange: (d) => o(d, s),
1970
1973
  value: r.key,
1971
1974
  placeholder: "Key",
1972
1975
  className: "w-full rounded border-gray-300 bg-background p-0.5 pl-2 text-sm focus-visible:outline-0",
@@ -1979,7 +1982,7 @@ const Qr = (r) => {
1979
1982
  "input",
1980
1983
  {
1981
1984
  name: "value",
1982
- onChange: (d) => m(r.key) ? {} : o(d, l),
1985
+ onChange: (d) => m(r.key) ? {} : o(d, s),
1983
1986
  value: r.value,
1984
1987
  placeholder: "Value",
1985
1988
  className: "w-full rounded border-gray-300 bg-background p-0.5 pl-2 text-sm focus-visible:outline-0",
@@ -1988,22 +1991,22 @@ const Qr = (r) => {
1988
1991
  }
1989
1992
  ),
1990
1993
  /* @__PURE__ */ e.jsx(
1991
- Mt,
1994
+ zt,
1992
1995
  {
1993
- onClick: s,
1996
+ onClick: l,
1994
1997
  className: "h-6 w-6 cursor-pointer rounded border border-red-400 p-1 text-red-400 hover:opacity-80"
1995
1998
  }
1996
1999
  )
1997
2000
  ] })
1998
- ] }), ps = ({ section: r }) => {
2001
+ ] }), ul = ({ section: r }) => {
1999
2002
  var y;
2000
- const { setSyncState: l } = xr(), t = q(), [o, s] = j([]), [d] = Se(), a = Ue(), c = `${g(d, "0.prop")}_attrs`;
2003
+ const { setSyncState: s } = yr(), t = q(), [o, l] = j([]), [d] = Se(), a = Ue(), c = `${g(d, "0.prop")}_attrs`;
2001
2004
  ne.useEffect(() => {
2002
2005
  const x = C(g(t, c), (u, f) => ({ key: f, value: u }));
2003
- m(x) ? s([]) : s(x);
2006
+ m(x) ? l([]) : l(x);
2004
2007
  }, [g(t, c)]);
2005
- const i = () => s([...o, { key: "", value: "" }]), p = (x) => {
2006
- const u = je(o, (f, k) => x !== k);
2008
+ const i = () => l([...o, { key: "", value: "" }]), p = (x) => {
2009
+ const u = we(o, (f, k) => x !== k);
2007
2010
  n(u);
2008
2011
  }, h = (x, u) => {
2009
2012
  const f = [...o];
@@ -2011,11 +2014,11 @@ const Qr = (r) => {
2011
2014
  }, n = ne.useCallback(
2012
2015
  (x = []) => {
2013
2016
  const u = {};
2014
- ue(x, (f) => {
2017
+ ke(x, (f) => {
2015
2018
  m(f.key) || Me(u, f.key, f.value);
2016
- }), a([g(t, "_id")], { [c]: u }), l("UNSAVED");
2019
+ }), a([g(t, "_id")], { [c]: u }), s("UNSAVED");
2017
2020
  },
2018
- [t, l, a, c]
2021
+ [t, s, a, c]
2019
2022
  );
2020
2023
  return /* @__PURE__ */ e.jsxs(de, { value: r.heading, children: [
2021
2024
  /* @__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: [
@@ -2033,10 +2036,10 @@ const Qr = (r) => {
2033
2036
  /* @__PURE__ */ e.jsxs(
2034
2037
  "div",
2035
2038
  {
2036
- className: `flex h-6 w-max items-center justify-center gap-x-0.5 rounded-full border p-1 px-2 text-xs ${!m(o) && m((y = we(o)) == 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"}`,
2039
+ className: `flex h-6 w-max items-center justify-center gap-x-0.5 rounded-full border p-1 px-2 text-xs ${!m(o) && m((y = ve(o)) == 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"}`,
2037
2040
  onClick: () => {
2038
2041
  var x;
2039
- !m(o) && m((x = we(o)) == null ? void 0 : x.key) || i();
2042
+ !m(o) && m((x = ve(o)) == null ? void 0 : x.key) || i();
2040
2043
  },
2041
2044
  children: [
2042
2045
  /* @__PURE__ */ e.jsx(Ne, { width: 12, height: 12 }),
@@ -2051,7 +2054,7 @@ const Qr = (r) => {
2051
2054
  C(o, (x, u) => {
2052
2055
  const f = o.length > 0 && u < o.length - 1;
2053
2056
  return /* @__PURE__ */ e.jsx(
2054
- cs,
2057
+ pl,
2055
2058
  {
2056
2059
  item: x,
2057
2060
  index: u,
@@ -2066,8 +2069,8 @@ const Qr = (r) => {
2066
2069
  ] }) })
2067
2070
  ] });
2068
2071
  };
2069
- function us() {
2070
- const [r, l] = Qe(), { flexChild: t, gridChild: o } = yr(), [, s] = Vr(hr), { t: d } = K(), [a] = Se();
2072
+ function gl() {
2073
+ const [r, s] = Qe(), { flexChild: t, gridChild: o } = hr(), [, l] = Hr(br), { t: d } = K(), [a] = Se();
2071
2074
  return m(a) ? /* @__PURE__ */ e.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 rounded-xl p-4", children: [
2072
2075
  /* @__PURE__ */ e.jsx(Ze, { className: "mx-auto text-3xl" }),
2073
2076
  /* @__PURE__ */ e.jsx("h1", { children: d("no_styling_block_selected") }),
@@ -2079,12 +2082,12 @@ function us() {
2079
2082
  ] })
2080
2083
  ] }) }) : (
2081
2084
  // eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions
2082
- /* @__PURE__ */ e.jsxs("div", { onClick: () => s(!1), className: "flex h-full flex-col", children: [
2085
+ /* @__PURE__ */ e.jsxs("div", { onClick: () => l(!1), className: "flex h-full flex-col", children: [
2083
2086
  /* @__PURE__ */ e.jsx("div", { className: "flex flex-col space-x-4 space-y-3 border-b h-12 border-border px-4 py-1", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-end gap-x-1.5", children: [
2084
2087
  /* @__PURE__ */ e.jsx(Te, { htmlFor: "", className: "flex gap-x-1.5 text-xs italic", children: "State" }),
2085
- /* @__PURE__ */ e.jsxs(br, { defaultValue: r, onValueChange: (c) => l(c), children: [
2086
- /* @__PURE__ */ e.jsx(mr, { className: "h-auto w-fit p-1 px-3", children: /* @__PURE__ */ e.jsx(fr, { placeholder: "State" }) }),
2087
- /* @__PURE__ */ e.jsxs(vr, { children: [
2088
+ /* @__PURE__ */ e.jsxs(mr, { defaultValue: r, onValueChange: (c) => s(c), children: [
2089
+ /* @__PURE__ */ e.jsx(fr, { className: "h-auto w-fit p-1 px-3", children: /* @__PURE__ */ e.jsx(vr, { placeholder: "State" }) }),
2090
+ /* @__PURE__ */ e.jsxs(wr, { children: [
2088
2091
  /* @__PURE__ */ e.jsx(V, { value: "", children: "Normal" }),
2089
2092
  /* @__PURE__ */ e.jsx(V, { value: "hover", children: "Hover" }),
2090
2093
  /* @__PURE__ */ e.jsx(V, { value: "active", children: "Active" }),
@@ -2101,15 +2104,15 @@ function us() {
2101
2104
  ] })
2102
2105
  ] }) }),
2103
2106
  /* @__PURE__ */ e.jsx(et, { className: "no-scrollbar -mx-1 flex-1 max-h-full overflow-y-hidden overflow-x-hidden", children: /* @__PURE__ */ e.jsxs(Ke, { defaultValue: ["Layout"], type: "multiple", className: "w-full", children: [
2104
- t && /* @__PURE__ */ e.jsx(fe, { section: Xr }),
2105
- o ? /* @__PURE__ */ e.jsx(fe, { section: Fr }) : null,
2106
- Zr.map((c) => /* @__PURE__ */ e.jsx(fe, { section: c }, c.heading)),
2107
- /* @__PURE__ */ e.jsx(ps, { section: { heading: "Attributes" } })
2107
+ t && /* @__PURE__ */ e.jsx(me, { section: Xr }),
2108
+ o ? /* @__PURE__ */ e.jsx(me, { section: Zr }) : null,
2109
+ Wr.map((c) => /* @__PURE__ */ e.jsx(me, { section: c }, c.heading)),
2110
+ /* @__PURE__ */ e.jsx(ul, { section: { heading: "Attributes" } })
2108
2111
  ] }) })
2109
2112
  ] })
2110
2113
  );
2111
2114
  }
2112
- const gs = {
2115
+ const xl = {
2113
2116
  px: 1,
2114
2117
  "%": 1,
2115
2118
  em: 100,
@@ -2120,8 +2123,8 @@ const gs = {
2120
2123
  "-": 1,
2121
2124
  deg: 1,
2122
2125
  ms: 0.1
2123
- }, yl = () => {
2124
- const r = q(), { t: l } = K(), [t, o] = $.useState(""), [s, d] = $.useState({
2126
+ }, fs = () => {
2127
+ const r = q(), { t: s } = K(), [t, o] = $.useState(""), [l, d] = $.useState({
2125
2128
  onDrag: (i) => i,
2126
2129
  onDragEnd: (i) => i,
2127
2130
  dragStartY: 0,
@@ -2130,20 +2133,20 @@ const gs = {
2130
2133
  dragUnit: "",
2131
2134
  negative: !1,
2132
2135
  cssProperty: ""
2133
- }), a = ve(
2136
+ }), a = fe(
2134
2137
  (i) => {
2135
- const p = !g(s, "negative", !1), h = g(s, "cssProperty", "");
2136
- let n = parseFloat(s.dragStartValue);
2138
+ const p = !g(l, "negative", !1), h = g(l, "cssProperty", "");
2139
+ let n = parseFloat(l.dragStartValue);
2137
2140
  n = ze(n) ? 0 : n;
2138
- let y = gs[s.dragUnit];
2141
+ let y = xl[l.dragUnit];
2139
2142
  (W(h, "scale") || h === "opacity") && (y = 10);
2140
- let u = (s.dragStartY - i.pageY) / y + n;
2141
- p && u < 0 && (u = 0), h === "opacity" && u > 1 && (u = 1), s.onDrag(`${u}`), o(`${u}`);
2143
+ let u = (l.dragStartY - i.pageY) / y + n;
2144
+ p && u < 0 && (u = 0), h === "opacity" && u > 1 && (u = 1), l.onDrag(`${u}`), o(`${u}`);
2142
2145
  },
2143
- [s],
2146
+ [l],
2144
2147
  50
2145
2148
  ), c = B(() => {
2146
- setTimeout(() => s.onDragEnd(`${t}`), 100), d({
2149
+ setTimeout(() => l.onDragEnd(`${t}`), 100), d({
2147
2150
  onDrag: (i) => i,
2148
2151
  onDragEnd: (i) => i,
2149
2152
  dragStartY: 0,
@@ -2153,12 +2156,12 @@ const gs = {
2153
2156
  negative: !1,
2154
2157
  cssProperty: ""
2155
2158
  });
2156
- }, [s, t, d]);
2157
- return jt(r) ? /* @__PURE__ */ e.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 rounded-xl p-4", children: [
2159
+ }, [l, t, d]);
2160
+ 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: [
2158
2161
  /* @__PURE__ */ e.jsx(Ze, { className: "mx-auto text-3xl" }),
2159
- /* @__PURE__ */ e.jsx("h1", { children: l("no_block_selected_for_styling") })
2162
+ /* @__PURE__ */ e.jsx("h1", { children: s("no_block_selected_for_styling") })
2160
2163
  ] }) }) : /* @__PURE__ */ e.jsx(rt, { children: /* @__PURE__ */ e.jsxs(nt.Provider, { value: { setDragData: d }, children: [
2161
- s.dragging ? /* @__PURE__ */ e.jsx(
2164
+ l.dragging ? /* @__PURE__ */ e.jsx(
2162
2165
  "div",
2163
2166
  {
2164
2167
  onMouseMove: a,
@@ -2166,23 +2169,23 @@ const gs = {
2166
2169
  className: "absolute inset-0 z-30 cursor-row-resize bg-gray-300/10 "
2167
2170
  }
2168
2171
  ) : null,
2169
- /* @__PURE__ */ e.jsxs(wr, { defaultValue: "settings", className: "flex h-full w-full flex-col py-1", children: [
2170
- /* @__PURE__ */ e.jsxs(jr, { className: "mx-1 grid grid-cols-2", children: [
2171
- /* @__PURE__ */ e.jsx(De, { value: "settings", children: l("settings") }),
2172
- /* @__PURE__ */ e.jsx(De, { value: "styling", children: l("styling") })
2172
+ /* @__PURE__ */ e.jsxs(jr, { defaultValue: "settings", className: "flex h-full w-full flex-col py-1", children: [
2173
+ /* @__PURE__ */ e.jsxs(Cr, { className: "mx-1 grid grid-cols-2", children: [
2174
+ /* @__PURE__ */ e.jsx(De, { value: "settings", children: s("settings") }),
2175
+ /* @__PURE__ */ e.jsx(De, { value: "styling", children: s("styling") })
2173
2176
  ] }),
2174
2177
  /* @__PURE__ */ e.jsx(
2175
2178
  $e,
2176
2179
  {
2177
2180
  value: "settings",
2178
2181
  className: "no-scrollbar -mx-1 -mr-2 h-full flex-1 overflow-y-auto overflow-x-hidden",
2179
- children: /* @__PURE__ */ e.jsx(et, { className: "no-scrollbar -mx-1 pb-5 flex-1 max-h-full overflow-y-hidden overflow-x-hidden", children: /* @__PURE__ */ e.jsx(zr, {}) })
2182
+ children: /* @__PURE__ */ e.jsx(et, { className: "no-scrollbar -mx-1 pb-5 flex-1 max-h-full overflow-y-hidden overflow-x-hidden", children: /* @__PURE__ */ e.jsx(Yr, {}) })
2180
2183
  }
2181
2184
  ),
2182
- /* @__PURE__ */ e.jsx($e, { value: "styling", className: "flex-1 h-full overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(us, {}) })
2185
+ /* @__PURE__ */ e.jsx($e, { value: "styling", className: "flex-1 h-full overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(gl, {}) })
2183
2186
  ] })
2184
2187
  ] }) });
2185
2188
  };
2186
2189
  export {
2187
- yl as default
2190
+ fs as default
2188
2191
  };