@chaibuilder/sdk 1.2.5 → 1.2.7

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 (96) hide show
  1. package/dist/AddBlocks-MKhgtI8x.cjs +1 -0
  2. package/dist/{AddBlocks-gbfzju1d.js → AddBlocks-pjLrzkvz.js} +52 -53
  3. package/dist/{BrandingOptions-mZXO7thQ.js → BrandingOptions-PXCI0z-H.js} +57 -53
  4. package/dist/BrandingOptions-tZaUILYP.cjs +1 -0
  5. package/dist/CanvasArea-C2ak1ui1.cjs +60 -0
  6. package/dist/{CanvasArea-WS9dnLyS.js → CanvasArea-Fhg-6_nZ.js} +407 -407
  7. package/dist/CurrentPage-4O-iqW3w.cjs +1 -0
  8. package/dist/{CurrentPage-iaGHiR2B.js → CurrentPage-Zz9LEdez.js} +15 -17
  9. package/dist/{Layers-V15IDskJ.js → Layers-cgmxKAP9.js} +173 -152
  10. package/dist/Layers-uo4KpGCs.cjs +1 -0
  11. package/dist/MarkAsGlobalBlock-1kOwPbPm.cjs +1 -0
  12. package/dist/{MarkAsGlobalBlock-SPWd6Flk.js → MarkAsGlobalBlock-htrpRVJM.js} +6 -6
  13. package/dist/{PagesPanel-wfyKhLJ5.js → PagesPanel-TYBKN2Am.js} +8 -10
  14. package/dist/PagesPanel-z5qHpU24.cjs +1 -0
  15. package/dist/{ProjectPanel-aiKhpNvr.js → ProjectPanel-PJ1iPaLY.js} +15 -17
  16. package/dist/ProjectPanel-mEVh8sLb.cjs +1 -0
  17. package/dist/{Settings-JjYbPJrt.js → Settings-Na0NVS-E.js} +334 -334
  18. package/dist/Settings-YNxmjfAl.cjs +1 -0
  19. package/dist/{SidePanels-XABN8kD3.js → SidePanels-bHll6xCt.js} +99 -98
  20. package/dist/SidePanels-jsHvSEtM.cjs +1 -0
  21. package/dist/{Topbar-ks1ckGLz.js → Topbar-JKdXHH8P.js} +4 -4
  22. package/dist/Topbar-jWRuTvxv.cjs +1 -0
  23. package/dist/UnsplashImages-dBdqJNux.cjs +1 -0
  24. package/dist/{UnsplashImages-8vJPuqrF.js → UnsplashImages-jiOES16m.js} +7 -7
  25. package/dist/UploadImages-OD3RPS7j.cjs +1 -0
  26. package/dist/{UploadImages-6N6UrjLo.js → UploadImages-imersU7l.js} +4 -4
  27. package/dist/{add-page-modal-Gwhl6J1F.js → add-page-modal-EQWWxbry.js} +10 -11
  28. package/dist/add-page-modal-nFQ8TUBM.cjs +1 -0
  29. package/dist/{confirm-alert-biqvaLT-.js → confirm-alert-HOs52FKE.js} +4 -4
  30. package/dist/confirm-alert-j6hcFSlG.cjs +1 -0
  31. package/dist/{controls-XPXGHKht.js → controls-QGClapUl.js} +9 -45
  32. package/dist/{controls-Dy1qa8Dc.cjs → controls-hpe3HxsR.cjs} +1 -1
  33. package/dist/core.cjs +1 -1
  34. package/dist/core.js +56 -58
  35. package/dist/{delete-page-modal-xGWX8RHn.js → delete-page-modal-DU388lPm.js} +21 -23
  36. package/dist/delete-page-modal-bkSWhTxz.cjs +1 -0
  37. package/dist/email-blocks.cjs +1 -1
  38. package/dist/email-blocks.js +263 -24
  39. package/dist/{form-Moz_psOw.js → form-7E1GY3U7.js} +1 -1
  40. package/dist/{form-lJhy9DEC.cjs → form-lF5eSfMe.cjs} +1 -1
  41. package/dist/html-to-json-JS8zQjYB.cjs +1 -0
  42. package/dist/{html-to-json-yjzEN9OX.js → html-to-json-lNLC8Y7D.js} +26 -27
  43. package/dist/{index-7mV_OcXd.js → index-7vwIQQ-T.js} +5402 -5366
  44. package/dist/index-98CxilGX.cjs +1 -0
  45. package/dist/{index-mUPP605-.cjs → index-Hf23Fq9m.cjs} +33 -33
  46. package/dist/{index-_OgCuSUz.js → index-WKIG_VPl.js} +1043 -1036
  47. package/dist/index-e0c8PmRQ.js +205 -0
  48. package/dist/index-gi1LIOCw.cjs +1 -0
  49. package/dist/lib.cjs +2 -2
  50. package/dist/lib.js +20 -22
  51. package/dist/mockServiceWorker.js +1 -1
  52. package/dist/page-viewer-6a4GFMUg.cjs +1 -0
  53. package/dist/{page-viewer-Xl1i1V3J.js → page-viewer-fohh_Dwv.js} +9 -11
  54. package/dist/{project-general-setting-8H1Rka2z.js → project-general-setting-Ryf5OhPd.js} +10 -11
  55. package/dist/project-general-setting-j4lKlLUE.cjs +1 -0
  56. package/dist/project-seo-setting-CATo4bEL.cjs +1 -0
  57. package/dist/{project-seo-setting-dXclexQW.js → project-seo-setting-KKOCl416.js} +6 -6
  58. package/dist/{single-page-detail-1hsqXV8c.js → single-page-detail-mJBo7VRe.js} +11 -12
  59. package/dist/single-page-detail-zms-5Fa_.cjs +1 -0
  60. package/dist/studio.cjs +1 -1
  61. package/dist/studio.js +7 -9
  62. package/dist/style.css +1 -1
  63. package/dist/ui.cjs +1 -1
  64. package/dist/ui.js +18 -18
  65. package/dist/{useAddBlockByDrop-uPXvrg4G.js → useAddBlockByDrop-CmSt8dRr.js} +1 -1
  66. package/dist/{useAddBlockByDrop-_nd8yZBa.cjs → useAddBlockByDrop-pVcDjcgp.cjs} +1 -1
  67. package/dist/{utils-AvyFzbPC.js → utils-Jw11nj1S.js} +35 -26
  68. package/dist/utils-j7Kg63NR.cjs +1 -0
  69. package/dist/web-blocks.cjs +1 -9
  70. package/dist/web-blocks.js +3 -1049
  71. package/package.json +5 -5
  72. package/dist/AddBlocks-wuKI1ieB.cjs +0 -1
  73. package/dist/BrandingOptions-arKT1zCy.cjs +0 -1
  74. package/dist/CanvasArea-wpskKN1H.cjs +0 -59
  75. package/dist/CurrentPage-X9fCVXgY.cjs +0 -1
  76. package/dist/Functions-7jnEwJyw.js +0 -15
  77. package/dist/Functions-N3yhPYKY.cjs +0 -1
  78. package/dist/Layers-EGhZWmvD.cjs +0 -1
  79. package/dist/MarkAsGlobalBlock-S2BhHTsK.cjs +0 -1
  80. package/dist/PagesPanel-Vla7HZkm.cjs +0 -1
  81. package/dist/ProjectPanel-YLS4oOuU.cjs +0 -1
  82. package/dist/Settings-rnHnjhZ4.cjs +0 -1
  83. package/dist/SidePanels-vcWHxatg.cjs +0 -1
  84. package/dist/Topbar-u5XKdWgQ.cjs +0 -1
  85. package/dist/UnsplashImages-V8oKEHfi.cjs +0 -1
  86. package/dist/UploadImages-eHYxwWAp.cjs +0 -1
  87. package/dist/add-page-modal-o5dy8nwt.cjs +0 -1
  88. package/dist/confirm-alert-f3DYO5Hj.cjs +0 -1
  89. package/dist/delete-page-modal-IO_9ZCm4.cjs +0 -1
  90. package/dist/html-to-json-5UoswV2Q.cjs +0 -1
  91. package/dist/index-IIJ_o44s.cjs +0 -1
  92. package/dist/page-viewer-pJFW_LaN.cjs +0 -1
  93. package/dist/project-general-setting-lNEoQK1n.cjs +0 -1
  94. package/dist/project-seo-setting-9JGBPzcA.cjs +0 -1
  95. package/dist/single-page-detail-VKqGt-s1.cjs +0 -1
  96. package/dist/utils-PTxFk6qT.cjs +0 -1
@@ -1,22 +1,23 @@
1
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 se } from "react";
3
+ import I, { useState as j, useMemo as _, useEffect as O, useCallback as B, memo as ct, createContext as Me, useContext as se } from "react";
4
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";
5
+ import { forEach as ke, isArray as ie, omit as pt, truncate as ut, includes as P, get as x, first as ue, split as xt, startCase as Y, toLower as le, isEmpty as m, map as C, find as gt, last as ve, filter as we, set as Oe, 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 Xe, findLast as jt, flatten as U, intersection as Ye, has as ye, isNull as Ct } from "lodash-es";
6
6
  import { useTranslation as K } from "react-i18next";
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";
7
+ import { PlusIcon as Ne, Cross2Icon as Fe, 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 At, Cross1Icon as Pt, InfoCircledIcon as _e, MinusIcon as Et, BoxIcon as ze, RowSpacingIcon as Lt, TriangleDownIcon as Mt, CrossCircledIcon as Ot, TrashIcon as Xt, MixerHorizontalIcon as Ze } from "@radix-ui/react-icons";
8
+ import { a$ as Yt, b0 as Ft, B as xe, b1 as zt, b2 as Zt, b3 as Wt, b4 as Ut, b5 as Kt, b6 as qt, b7 as Gt, a7 as q, an as Jt, ao as Qt, ap as er, b8 as tr, al as rr, b9 as lr, am as sr, aD as F, aE as z, aG as Z, ba as or, bb as ar, bc as nr, bd as ir, be as dr, bf as cr, p as We, ad as Ue, i as pr, bg as Ke, bh as de, bi as ce, bj as pe, ak as Se, Q as qe, a4 as Ge, j as Je, aI as Te, bk as ur, bl as xr, a5 as ge, X as gr, aa as Qe, U as Be, ah as hr, ae as yr, bm as br, ar as mr, as as fr, at as vr, au as wr, av as V, bn as et, ax as jr, ay as Cr, az as De, aA as $e } from "./index-WKIG_VPl.js";
9
+ import { u as kr } from "./controls-QGClapUl.js";
10
10
  import { Check as Nr, EditIcon as _r, TrashIcon as Sr } from "lucide-react";
11
11
  import { getBlockComponent as tt, getChaiDataProviders as Tr } from "@chaibuilder/runtime";
12
- import { E as rt, u as lt } from "./index-7mV_OcXd.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";
12
+ import { E as rt, u as lt } from "./index-7vwIQQ-T.js";
13
+ import { J as Rr, a as Vr, d as Hr } from "./index-e0c8PmRQ.js";
14
+ import Br from "@rjsf/core";
15
+ import Dr from "@rjsf/validator-ajv8";
16
+ import { useAtom as $r } from "jotai";
17
+ import Ir from "react-autosuggest";
18
+ import Ar from "fuse.js";
19
+ import { A as Pr, C as he, e as Er } from "./utils-Jw11nj1S.js";
20
+ import { a as Lr } from "./MODIFIERS-RiXS5Mn1.js";
20
21
  import "./_commonjsHelpers-UyOWmZb0.js";
21
22
  import "@radix-ui/react-toggle";
22
23
  import "class-variance-authority";
@@ -42,11 +43,10 @@ import "react-icons-picker";
42
43
  import "react-dom";
43
44
  import "react-quill";
44
45
  import "flat-to-nested";
45
- import "./Functions-7jnEwJyw.js";
46
- import "clsx";
47
- import "tailwind-merge";
48
46
  import "redux-undo";
47
+ import "lodash";
49
48
  import "i18next";
49
+ import "clsx";
50
50
  import "@floating-ui/react-dom";
51
51
  import "react-textarea-autosize";
52
52
  import "flagged";
@@ -54,12 +54,11 @@ import "react-dnd";
54
54
  import "@minoru/react-dnd-treeview";
55
55
  import "react-hotkeys-hook";
56
56
  import "sonner";
57
- import "./html-to-json-yjzEN9OX.js";
57
+ import "./html-to-json-lNLC8Y7D.js";
58
58
  import "himalaya";
59
- import "lodash";
60
59
  import "./web-blocks.js";
61
- const Ar = $.lazy(() => import("react-json-view"));
62
- function Lr(r) {
60
+ import "tailwind-merge";
61
+ function Mr(r) {
63
62
  const s = [], t = {};
64
63
  function o(l, d) {
65
64
  ke(d, (a, c) => {
@@ -76,21 +75,22 @@ const je = ({ data: r, fullView: s }) => {
76
75
  return s ? typeof r == "object" ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
77
76
  /* @__PURE__ */ e.jsx("div", { className: "h-3" }),
78
77
  /* @__PURE__ */ e.jsx(rt, { children: /* @__PURE__ */ e.jsx(
79
- Ar,
78
+ Rr,
80
79
  {
81
- style: { maxHeight: "40vh", overflowY: "auto" },
82
- name: "Content",
83
- enableClipboard: !1,
84
- displayObjectSize: !1,
85
- displayDataTypes: !1,
86
- src: r,
87
- collapsed: !0
80
+ data: r,
81
+ shouldExpandNode: Vr,
82
+ style: {
83
+ ...Hr,
84
+ container: "max-h-[40vh] overflow-y-auto text-[12px] leading-[1.5] tracking-wide font-mono",
85
+ stringValue: "text-orange-600",
86
+ label: "text-green-900 font-semibold pr-1 tracking-wider"
87
+ }
88
88
  }
89
89
  ) })
90
- ] }) : /* @__PURE__ */ e.jsxs("div", { className: "text-gray-800/50 text-[12px] leading-4 w-full max-h-36 overflow-x-hidden overflow-y-auto", children: [
90
+ ] }) : /* @__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: [
91
91
  /* @__PURE__ */ e.jsx("span", { className: "font-medium text-gray-800/80", children: "Content: " }),
92
92
  r
93
- ] }) : /* @__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 }) });
93
+ ] }) : /* @__PURE__ */ e.jsx("div", { className: "w-full overflow-hidden whitespace-nowrap text-[10px] leading-3 text-gray-800/50", children: ut(t === "object" ? JSON.stringify(r) : r, { length: 40 }) });
94
94
  }, Ie = ({
95
95
  type: r,
96
96
  value: s = "",
@@ -100,51 +100,51 @@ const je = ({ data: r, fullView: s }) => {
100
100
  dataType: d,
101
101
  appliedBindings: a
102
102
  }) => {
103
- 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(
104
- (u) => !A(a, u) && g(p, `props.${ue(gt(u, "."))}.binding`)
105
- ) : c.filter((u) => d === g(i, u, "")), [r, c, a, d, p]);
106
- return M(() => {
103
+ const { paths: c, pathsType: i } = Mr(o), p = r === "PROP" ? tt(o == null ? void 0 : o._type) : {}, y = r === "PROP", [n, h] = j(!1), g = _(() => r === "PROP" ? c.filter(
104
+ (u) => !P(a, u) && x(p, `props.${ue(xt(u, "."))}.binding`)
105
+ ) : c.filter((u) => d === x(i, u, "")), [r, c, a, d, p]);
106
+ return O(() => {
107
107
  s && l(s);
108
108
  }, [s, r]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
109
109
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-4", children: [
110
110
  /* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted-foreground", children: Y(le(r)) }),
111
- /* @__PURE__ */ e.jsxs(Yt, { open: n, onOpenChange: y, children: [
111
+ /* @__PURE__ */ e.jsxs(Yt, { open: n, onOpenChange: h, children: [
112
112
  /* @__PURE__ */ e.jsx(Ft, { asChild: !0, children: /* @__PURE__ */ e.jsx(
113
- ge,
113
+ xe,
114
114
  {
115
115
  variant: "outline",
116
116
  size: "sm",
117
- 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
+ className: ` ${m(s) ? "w-44 justify-center bg-blue-500 text-gray-100 hover:bg-blue-400 hover:text-white" : "min-w-[350px] items-center justify-between"}`,
118
118
  children: s ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
119
- /* @__PURE__ */ e.jsxs("span", { className: "text-sm pr-8", children: [
120
- 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) }),
119
+ /* @__PURE__ */ e.jsxs("span", { className: "pr-8 text-sm", children: [
120
+ 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(d) }),
121
121
  s
122
122
  ] }),
123
- /* @__PURE__ */ e.jsx("span", { className: "text-[9px] text-blue-400 underline cursor-pointer hover:text-blue-700", children: "Change" })
123
+ /* @__PURE__ */ e.jsx("span", { className: "cursor-pointer text-[9px] text-blue-400 underline hover:text-blue-700", children: "Change" })
124
124
  ] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
125
125
  "+ Set ",
126
126
  Y(le(r))
127
127
  ] })
128
128
  }
129
129
  ) }),
130
- /* @__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(zt, { className: "z-[999] min-w-[300px] p-0", side: "right", align: "start", children: /* @__PURE__ */ e.jsxs(Zt, { children: [
131
131
  /* @__PURE__ */ e.jsx(Wt, { placeholder: `Choose ${le(r)}...` }),
132
132
  /* @__PURE__ */ e.jsxs(Ut, { children: [
133
133
  /* @__PURE__ */ e.jsx(Kt, { children: "No results found." }),
134
- /* @__PURE__ */ e.jsx(qt, { children: C(x, (u) => /* @__PURE__ */ e.jsxs(
134
+ /* @__PURE__ */ e.jsx(qt, { children: C(g, (u) => /* @__PURE__ */ e.jsxs(
135
135
  Gt,
136
136
  {
137
137
  value: u,
138
- className: `cursor-pointer ${h ? "flex justify-between items-center" : "flex flex-col items-start justify-start"}`,
138
+ className: `cursor-pointer ${y ? "flex items-center justify-between" : "flex flex-col items-start justify-start"}`,
139
139
  onSelect: (f) => {
140
- t(xt(x, (k) => k === f) || null), y(!1);
140
+ t(gt(g, (k) => k === f) || null), h(!1);
141
141
  },
142
142
  children: [
143
143
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
144
- /* @__PURE__ */ e.jsx(Nr, { className: `w-4 h-4 text-green-500 ${s === u ? "" : "opacity-0"}` }),
144
+ /* @__PURE__ */ e.jsx(Nr, { className: `h-4 w-4 text-green-500 ${s === u ? "" : "opacity-0"}` }),
145
145
  u
146
146
  ] }),
147
- 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) }) })
147
+ 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(i, u, "")) }) }) : /* @__PURE__ */ e.jsx("div", { className: "pl-6", children: /* @__PURE__ */ e.jsx(je, { data: x(o, u) }) })
148
148
  ]
149
149
  },
150
150
  u
@@ -153,20 +153,20 @@ const je = ({ data: r, fullView: s }) => {
153
153
  ] }) })
154
154
  ] })
155
155
  ] }),
156
- !h && !m(s) && /* @__PURE__ */ e.jsx("div", { className: "pt-2", children: /* @__PURE__ */ e.jsx(je, { data: g(o, s, ""), fullView: !0 }) })
156
+ !y && !m(s) && /* @__PURE__ */ e.jsx("div", { className: "pt-2", children: /* @__PURE__ */ e.jsx(je, { data: x(o, s, ""), fullView: !0 }) })
157
157
  ] });
158
- }, Er = ({
158
+ }, Or = ({
159
159
  appliedBindings: r = [],
160
160
  onAddBinding: s,
161
161
  editMode: t,
162
162
  item: o
163
163
  }) => {
164
- const [l, d] = j(t ? o.key : ""), [a, c] = j(t ? o.value : ""), i = q(), [p] = lt(), h = B(
165
- (x, u) => {
166
- if (m(x))
164
+ const [l, d] = j(t ? o.key : ""), [a, c] = j(t ? o.value : ""), i = q(), [p] = lt(), y = B(
165
+ (g, u) => {
166
+ if (m(g))
167
167
  return "";
168
168
  {
169
- const f = g(u === "PROP" ? i : p, x, "");
169
+ const f = x(u === "PROP" ? i : p, g, "");
170
170
  if (ie(f))
171
171
  return "list";
172
172
  const k = typeof f;
@@ -174,13 +174,13 @@ const je = ({ data: r, fullView: s }) => {
174
174
  }
175
175
  },
176
176
  [i, p]
177
- ), [n, y] = j(t ? h(o.key, "PROP") : "");
177
+ ), [n, h] = j(t ? y(o.key, "PROP") : "");
178
178
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
179
179
  /* @__PURE__ */ e.jsxs(Jt, { children: [
180
180
  /* @__PURE__ */ e.jsx(Qt, { children: "Add Data Binding" }),
181
181
  /* @__PURE__ */ e.jsx(er, { className: "text-xs", children: "Add prop and path of binding. Click save when you're done." })
182
182
  ] }),
183
- /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1 relative", children: [
183
+ /* @__PURE__ */ e.jsxs("div", { className: "relative flex flex-col gap-1", children: [
184
184
  /* @__PURE__ */ e.jsx(
185
185
  Ie,
186
186
  {
@@ -189,9 +189,9 @@ const je = ({ data: r, fullView: s }) => {
189
189
  placeholder: "Enter prop key",
190
190
  value: l,
191
191
  setValue: d,
192
- onChange: (x) => {
193
- const u = h(x, "PROP");
194
- d(x), n !== u && c(""), y(u);
192
+ onChange: (g) => {
193
+ const u = y(g, "PROP");
194
+ d(g), n !== u && c(""), h(u);
195
195
  },
196
196
  data: i,
197
197
  dataType: n,
@@ -207,9 +207,9 @@ const je = ({ data: r, fullView: s }) => {
207
207
  placeholder: "Enter data path",
208
208
  value: a,
209
209
  setValue: c,
210
- onChange: (x) => {
211
- const u = h(x, "PATH");
212
- c(n === u ? x : "");
210
+ onChange: (g) => {
211
+ const u = y(g, "PATH");
212
+ c(n === u ? g : "");
213
213
  },
214
214
  data: p,
215
215
  dataType: n,
@@ -218,7 +218,7 @@ const je = ({ data: r, fullView: s }) => {
218
218
  )
219
219
  ] }),
220
220
  /* @__PURE__ */ e.jsx(tr, { children: /* @__PURE__ */ e.jsx(
221
- ge,
221
+ xe,
222
222
  {
223
223
  type: "submit",
224
224
  className: "mt-4",
@@ -233,7 +233,7 @@ const je = ({ data: r, fullView: s }) => {
233
233
  return /* @__PURE__ */ e.jsxs(rr, { children: [
234
234
  /* @__PURE__ */ e.jsx(lr, { disabled: r, asChild: !0, onClick: () => c(!0), children: s }),
235
235
  a && /* @__PURE__ */ e.jsx(sr, { children: /* @__PURE__ */ e.jsx(
236
- Er,
236
+ Or,
237
237
  {
238
238
  item: d,
239
239
  editMode: l,
@@ -244,7 +244,7 @@ const je = ({ data: r, fullView: s }) => {
244
244
  }
245
245
  ) })
246
246
  ] });
247
- }, Or = ({
247
+ }, Xr = ({
248
248
  item: r,
249
249
  onAddBinding: s,
250
250
  onRemove: t,
@@ -252,39 +252,39 @@ const je = ({ data: r, fullView: s }) => {
252
252
  dataProvider: l,
253
253
  appliedBindings: d
254
254
  }) => {
255
- const [a, c] = j("string"), i = (p, h) => {
255
+ const [a, c] = j("string"), i = (p, y) => {
256
256
  if (m(p))
257
257
  return "";
258
258
  {
259
- const n = g(h === "PROP" ? o : l, p, "");
259
+ const n = x(y === "PROP" ? o : l, p, "");
260
260
  if (ie(n))
261
261
  return "list";
262
- const y = typeof n;
263
- return y === "string" ? "text" : y === "object" ? "model" : y;
262
+ const h = typeof n;
263
+ return h === "string" ? "text" : h === "object" ? "model" : h;
264
264
  }
265
265
  };
266
- 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: [
267
- /* @__PURE__ */ e.jsx("div", { className: "text-gray-500 font-normal text-sm", children: r.key }),
266
+ return O(() => c(() => i(r.key, "PROP")), [r.key]), /* @__PURE__ */ e.jsxs("div", { className: "relative flex flex-col rounded-md border border-gray-200 p-2", children: [
267
+ /* @__PURE__ */ e.jsx("div", { className: "text-sm font-normal text-gray-500", children: r.key }),
268
268
  /* @__PURE__ */ e.jsx("div", { className: "font-medium leading-5", children: r.value }),
269
- /* @__PURE__ */ e.jsx(je, { data: g(l, r.value, "") }),
269
+ /* @__PURE__ */ e.jsx(je, { data: x(l, r.value, "") }),
270
270
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-end gap-x-2", children: [
271
- /* @__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" }) }),
271
+ /* @__PURE__ */ e.jsx(st, { editMode: !0, onAddBinding: s, appliedBindings: d, item: r, children: /* @__PURE__ */ e.jsx(_r, { 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" }) }),
272
272
  /* @__PURE__ */ e.jsx(
273
273
  Sr,
274
274
  {
275
275
  onClick: () => t(),
276
- 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"
276
+ 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"
277
277
  }
278
278
  )
279
279
  ] }),
280
- !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) })
280
+ !m(a) && !m(r.key) && /* @__PURE__ */ e.jsx("div", { className: "absolute right-0 top-1 mt-px flex h-4 items-center rounded-full px-2 text-[10px] font-medium text-purple-600", children: Y(a) })
281
281
  ] });
282
- }, Mr = ({ bindingData: r, onChange: s }) => {
282
+ }, Yr = ({ bindingData: r, onChange: s }) => {
283
283
  const t = q(), [o] = lt(), l = Tr(), [d, a] = j(
284
- C(r, (n, y) => ({ key: y, value: n }))
284
+ C(r, (n, h) => ({ key: h, value: n }))
285
285
  );
286
- M(() => {
287
- a(C(r, (n, y) => ({ key: y, value: n })));
286
+ O(() => {
287
+ a(C(r, (n, h) => ({ key: h, value: n })));
288
288
  }, [t == null ? void 0 : t._id]);
289
289
  const c = _(() => {
290
290
  if (m(o))
@@ -294,35 +294,35 @@ const je = ({ data: r, fullView: s }) => {
294
294
  const n = ve(d);
295
295
  return m(n == null ? void 0 : n.key) || m(n == null ? void 0 : n.value);
296
296
  }, [o, d]), i = (n) => {
297
- const y = we(d, (x) => x.key !== n.key);
298
- a([...y, n]), h([...y, n]);
297
+ const h = we(d, (g) => g.key !== n.key);
298
+ a([...h, n]), y([...h, n]);
299
299
  }, p = (n) => {
300
- const y = we(d, (x, u) => n !== u);
301
- h([...y]);
302
- }, h = B(
300
+ const h = we(d, (g, u) => n !== u);
301
+ y([...h]);
302
+ }, y = B(
303
303
  (n = []) => {
304
304
  if (a(n), m(n)) {
305
305
  s({});
306
306
  return;
307
307
  }
308
- const y = {};
309
- ke(n, (x) => {
310
- !m(x == null ? void 0 : x.key) && !m(x == null ? void 0 : x.value) && Me(y, x.key, x.value);
311
- }), s(y);
308
+ const h = {};
309
+ ke(n, (g) => {
310
+ !m(g == null ? void 0 : g.key) && !m(g == null ? void 0 : g.value) && Oe(h, g.key, g.value);
311
+ }), s(h);
312
312
  },
313
313
  [s]
314
314
  );
315
- 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: [
315
+ return m(l) ? /* @__PURE__ */ e.jsx("div", { className: "flex w-full items-center justify-center", children: /* @__PURE__ */ e.jsxs("p", { className: "mb-1.5 text-xs text-gray-500", children: [
316
316
  "You have no data providers registered. Please add a data provider to your project. ",
317
317
  /* @__PURE__ */ e.jsx("br", {}),
318
318
  /* @__PURE__ */ e.jsx("a", { className: "text-blue-500", href: "https://chaibuilder.com/docs/registering-data-providers", target: "_blank", children: "Learn more" })
319
319
  ] }) }) : /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
320
- C(d, (n, y) => /* @__PURE__ */ e.jsx(
321
- Or,
320
+ C(d, (n, h) => /* @__PURE__ */ e.jsx(
321
+ Xr,
322
322
  {
323
323
  item: n,
324
324
  onAddBinding: i,
325
- onRemove: () => p(y),
325
+ onRemove: () => p(h),
326
326
  selectedBlock: t,
327
327
  dataProvider: o,
328
328
  appliedBindings: C(d, "key")
@@ -330,7 +330,7 @@ const je = ({ data: r, fullView: s }) => {
330
330
  n.key
331
331
  )),
332
332
  /* @__PURE__ */ e.jsxs(F, { delayDuration: 200, children: [
333
- /* @__PURE__ */ e.jsx(X, { className: "w-full", children: /* @__PURE__ */ e.jsx(
333
+ /* @__PURE__ */ e.jsx(z, { className: "w-full", children: /* @__PURE__ */ e.jsx(
334
334
  st,
335
335
  {
336
336
  disabled: c,
@@ -339,8 +339,8 @@ const je = ({ data: r, fullView: s }) => {
339
339
  children: /* @__PURE__ */ e.jsx(
340
340
  "span",
341
341
  {
342
- className: `w-full px-5 py-1.5 text-xs rounded-md font-medium duration-200 ${c ? "cursor-not-allowed bg-gray-200 text-gray-400" : "bg-blue-700/20 text-blue-800 hover:bg-blue-700/30"}`,
343
- children: m(o) ? /* @__PURE__ */ e.jsx("small", { className: "text-gray-500 text-[9.5px]", children: "No data provider has been set up for this page" }) : "+ Add Data Binding"
342
+ className: `w-full rounded-md px-5 py-1.5 text-xs font-medium duration-200 ${c ? "cursor-not-allowed bg-gray-200 text-gray-400" : "bg-blue-700/20 text-blue-800 hover:bg-blue-700/30"}`,
343
+ children: m(o) ? /* @__PURE__ */ e.jsx("small", { className: "text-[9.5px] text-gray-500", children: "No data provider has been set up for this page" }) : "+ Add Data Binding"
344
344
  }
345
345
  )
346
346
  }
@@ -348,19 +348,19 @@ const je = ({ data: r, fullView: s }) => {
348
348
  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" })
349
349
  ] })
350
350
  ] });
351
- }, 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
+ }, Fr = () => /* @__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 }) => {
352
352
  const l = { type: "object", properties: {} }, d = {};
353
353
  return Object.keys(s).forEach((a) => {
354
354
  const c = s[a];
355
- if (A(["slot", "styles"], c.type))
355
+ if (P(["slot", "styles"], c.type))
356
356
  return;
357
357
  const i = a;
358
358
  l.properties[i] = or(c), d[i] = ar(c);
359
359
  }), /* @__PURE__ */ e.jsx(
360
- Rr,
360
+ Br,
361
361
  {
362
362
  widgets: {
363
- binding: zr,
363
+ binding: Fr,
364
364
  richtext: nr,
365
365
  icon: ir,
366
366
  image: dr
@@ -371,7 +371,7 @@ const je = ({ data: r, fullView: s }) => {
371
371
  omitExtraData: !1,
372
372
  liveOmit: !1,
373
373
  liveValidate: !1,
374
- validator: Vr,
374
+ validator: Dr,
375
375
  uiSchema: d,
376
376
  onBlur: r,
377
377
  schema: l,
@@ -380,20 +380,20 @@ const je = ({ data: r, fullView: s }) => {
380
380
  }
381
381
  );
382
382
  });
383
- function Yr() {
384
- const r = q(), { createSnapshot: s } = We(), t = Ue(), o = tt(r._type), l = { ...r }, d = pr("dataBindingSupport", !1), a = () => s(), c = ({ formData: n }, y) => {
385
- if (y) {
386
- const x = y.replace("root.", "");
387
- t([r._id], { [x]: g(n, x) });
383
+ function zr() {
384
+ const r = q(), { createSnapshot: s } = We(), t = Ue(), o = tt(r._type), l = { ...r }, d = pr("dataBindingSupport", !1), a = () => s(), c = ({ formData: n }, h) => {
385
+ if (h) {
386
+ const g = h.replace("root.", "");
387
+ t([r._id], { [g]: x(n, g) });
388
388
  }
389
389
  }, i = {
390
390
  _name: kr({
391
391
  title: "Name",
392
- default: g(r, "_name", r._type)
392
+ default: x(r, "_name", r._type)
393
393
  })
394
- }, p = yt(g(l, "_bindings", {})), h = _(() => {
395
- const n = ht(g(o, "props", {}));
396
- return d && bt(p, (y) => delete n[y]), n;
394
+ }, p = ht(x(l, "_bindings", {})), y = _(() => {
395
+ const n = yt(x(o, "props", {}));
396
+ return d && bt(p, (h) => delete n[h]), n;
397
397
  }, [o, p, d]);
398
398
  return /* @__PURE__ */ e.jsxs("div", { className: "overflow-x-hidden", children: [
399
399
  /* @__PURE__ */ e.jsx(
@@ -412,15 +412,15 @@ function Yr() {
412
412
  /* @__PURE__ */ e.jsx(
413
413
  "div",
414
414
  {
415
- className: `h-[8px] w-[8px] rounded-full ${m(g(r, "_bindings", {})) ? "bg-gray-300" : "bg-blue-500"}`
415
+ className: `h-[8px] w-[8px] rounded-full ${m(x(r, "_bindings", {})) ? "bg-gray-300" : "bg-blue-500"}`
416
416
  }
417
417
  ),
418
418
  "Data Binding"
419
419
  ] }) }),
420
420
  /* @__PURE__ */ e.jsx(pe, { className: "pt-4 px-4", children: /* @__PURE__ */ e.jsx(
421
- Mr,
421
+ Yr,
422
422
  {
423
- bindingData: g(l, "_bindings", {}),
423
+ bindingData: x(l, "_bindings", {}),
424
424
  onChange: (n) => {
425
425
  c({ formData: { ...l, _bindings: n } }, "root._bindings");
426
426
  }
@@ -446,7 +446,7 @@ function Yr() {
446
446
  onChange: c,
447
447
  createHistorySnapshot: a,
448
448
  formData: l,
449
- properties: h
449
+ properties: y
450
450
  }
451
451
  )
452
452
  ] })
@@ -457,36 +457,36 @@ function Yr() {
457
457
  onChange: c,
458
458
  createHistorySnapshot: a,
459
459
  formData: l,
460
- properties: h
460
+ properties: y
461
461
  }
462
462
  ),
463
463
  /* @__PURE__ */ e.jsx("div", { className: "pb-60" })
464
464
  ] });
465
465
  }
466
- const Pe = new Dr($r, {
466
+ const Ae = new Ar(Pr, {
467
467
  isCaseSensitive: !1,
468
468
  threshold: 0.2,
469
469
  minMatchCharLength: 2,
470
470
  keys: ["name"]
471
471
  });
472
- function Fr() {
473
- var L;
474
- 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 = () => {
472
+ function Zr() {
473
+ var E;
474
+ const [r] = Se(), s = q(), t = qe(), o = Ge(), [l] = Je(), [d, a] = j(""), c = (E = ue(r)) == null ? void 0 : E.prop, i = ft((x(s, c, "").replace(Lr, "").split(",").pop() || "").split(" "), m), p = () => {
475
475
  const w = d.trim().toLowerCase().replace(/ +(?= )/g, "").split(" ");
476
476
  t(l, w, !0), a("");
477
- }, [h, n] = j([]), y = ({ value: w }) => {
478
- const I = w.trim().toLowerCase(), E = I.match(/.+:/g);
477
+ }, [y, n] = j([]), h = ({ value: w }) => {
478
+ const $ = w.trim().toLowerCase(), L = $.match(/.+:/g);
479
479
  let N = [];
480
- if (E && E.length > 0) {
481
- const [D] = E, z = I.replace(D, "");
482
- N = Pe.search(z).map((b) => ({
480
+ if (L && L.length > 0) {
481
+ const [D] = L, X = $.replace(D, "");
482
+ N = Ae.search(X).map((b) => ({
483
483
  ...b,
484
484
  item: { ...b.item, name: D + b.item.name }
485
485
  }));
486
486
  } else
487
- N = Pe.search(I);
487
+ N = Ae.search($);
488
488
  n(C(N, "item"));
489
- }, x = () => {
489
+ }, g = () => {
490
490
  n([]);
491
491
  }, u = (w) => w.name, f = (w) => /* @__PURE__ */ e.jsx("div", { className: "rounded-md p-1", children: w.name }), k = {
492
492
  autoComplete: "off",
@@ -498,22 +498,22 @@ function Fr() {
498
498
  onKeyDown: (w) => {
499
499
  w.key === "Enter" && d.trim() !== "" && p();
500
500
  },
501
- onChange: (w, { newValue: I }) => a(I),
501
+ onChange: (w, { newValue: $ }) => a($),
502
502
  className: "w-full rounded-md text-xs px-2 hover:outline-0 bg-background border-border py-1"
503
503
  };
504
504
  return /* @__PURE__ */ e.jsxs(
505
505
  "div",
506
506
  {
507
- 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`,
507
+ 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`,
508
508
  children: [
509
509
  /* @__PURE__ */ e.jsx(Te, { className: "mt-2", children: "Add Tailwind classes" }),
510
510
  /* @__PURE__ */ e.jsxs("div", { className: "relative -mt-4 flex items-center gap-x-3", children: [
511
511
  /* @__PURE__ */ e.jsx("div", { className: "relative flex w-full items-center gap-x-3", children: /* @__PURE__ */ e.jsx(
512
- Br,
512
+ Ir,
513
513
  {
514
- suggestions: h,
515
- onSuggestionsFetchRequested: y,
516
- onSuggestionsClearRequested: x,
514
+ suggestions: y,
515
+ onSuggestionsFetchRequested: h,
516
+ onSuggestionsClearRequested: g,
517
517
  getSuggestionValue: u,
518
518
  renderSuggestion: f,
519
519
  inputProps: k,
@@ -528,7 +528,7 @@ function Fr() {
528
528
  }
529
529
  ) }),
530
530
  /* @__PURE__ */ e.jsx(
531
- ge,
531
+ xe,
532
532
  {
533
533
  variant: "outline",
534
534
  className: "h-6 border-gray-700",
@@ -565,7 +565,7 @@ function Fr() {
565
565
  }
566
566
  );
567
567
  }
568
- const H = ["px", "%", "em", "rem", "ch", "vh", "vw"], Xr = {
568
+ const H = ["px", "%", "em", "rem", "ch", "vh", "vw"], Wr = {
569
569
  heading: "flex.heading",
570
570
  items: [
571
571
  { type: "arbitrary", label: "flex.basis", units: H, property: "flexBasis" },
@@ -574,7 +574,7 @@ const H = ["px", "%", "em", "rem", "ch", "vh", "vw"], Xr = {
574
574
  { type: "dropdown", label: "flex.grow", property: "flexGrow" },
575
575
  { type: "dropdown", label: "flex.shrink", property: "flexShrink" }
576
576
  ]
577
- }, Zr = {
577
+ }, Ur = {
578
578
  heading: "grid.heading",
579
579
  items: [
580
580
  { type: "range", label: "grid.col_span", property: "gridColSpan" },
@@ -585,7 +585,7 @@ const H = ["px", "%", "em", "rem", "ch", "vh", "vw"], Xr = {
585
585
  { type: "range", label: "grid.row_end", property: "gridRowEnd" },
586
586
  { type: "range", label: "grid.order", property: "order" }
587
587
  ]
588
- }, Wr = [
588
+ }, Kr = [
589
589
  {
590
590
  heading: "layout.heading",
591
591
  items: [
@@ -788,35 +788,35 @@ const H = ["px", "%", "em", "rem", "ch", "vh", "vw"], Xr = {
788
788
  {
789
789
  heading: "typography.heading",
790
790
  items: [
791
- { type: "dropdown", property: "typography.font", label: "typography.font" },
792
- { type: "arbitrary", property: "typography.size", label: "typography.size", units: H },
793
- { type: "arbitrary", property: "typography.height", label: "typography.height", units: H.concat("-") },
794
- { type: "range", property: "typography.weight", label: "typography.weight" },
795
- { type: "color", property: "typography.color", label: "typography.color" },
791
+ { type: "dropdown", property: "fontFamily", label: "typography.font" },
792
+ { type: "arbitrary", property: "fontSize", label: "typography.size", units: H },
793
+ { type: "arbitrary", property: "lineHeight", label: "typography.height", units: H.concat("-") },
794
+ { type: "range", property: "fontWeight", label: "typography.weight" },
795
+ { type: "color", property: "textColor", label: "typography.color" },
796
796
  {
797
797
  styleType: "accordion",
798
798
  heading: "typography.alignments",
799
799
  items: [
800
- { type: "dropdown", property: "typography.align", label: "typography.align" },
801
- { type: "dropdown", property: "typography.valign", label: "typography.valign" }
800
+ { type: "dropdown", property: "textAlign", label: "typography.align" },
801
+ { type: "dropdown", property: "verticalAlign", label: "typography.valign" }
802
802
  ]
803
803
  },
804
804
  {
805
805
  styleType: "accordion",
806
806
  heading: "typography.spacing_decoration_more",
807
807
  items: [
808
- { type: "dropdown", property: "typography.spacing", label: "typography.spacing" },
809
- { type: "dropdown", property: "typography.decoration", label: "typography.decoration" },
810
- { type: "range", property: "typography.thickness", label: "typography.thickness" },
811
- { type: "dropdown", property: "typography.transform", label: "typography.transform" }
808
+ { type: "dropdown", property: "letterSpacing", label: "typography.spacing" },
809
+ { type: "dropdown", property: "textDecoration", label: "typography.decoration" },
810
+ { type: "range", property: "textDecorationThickness", label: "typography.thickness" },
811
+ { type: "dropdown", property: "textTransform", label: "typography.transform" }
812
812
  ]
813
813
  },
814
814
  {
815
815
  styleType: "accordion",
816
816
  heading: "typography.whitespace_breaks",
817
817
  items: [
818
- { type: "dropdown", property: "typography.whitespace", label: "typography.whitespace" },
819
- { type: "dropdown", property: "typography.wordbreak", label: "typography.wordbreak" }
818
+ { type: "dropdown", property: "whitespace", label: "typography.whitespace" },
819
+ { type: "dropdown", property: "wordbreak", label: "typography.wordbreak" }
820
820
  ]
821
821
  }
822
822
  ]
@@ -987,7 +987,7 @@ const H = ["px", "%", "em", "rem", "ch", "vh", "vw"], Xr = {
987
987
  },
988
988
  {
989
989
  heading: "classes.heading",
990
- items: [{ component: Fr }]
990
+ items: [{ component: Zr }]
991
991
  }
992
992
  ], ot = {
993
993
  "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" }) }),
@@ -996,32 +996,32 @@ const H = ["px", "%", "em", "rem", "ch", "vh", "vw"], Xr = {
996
996
  invisible: He,
997
997
  // display
998
998
  hidden: He,
999
- gap: P,
999
+ gap: A,
1000
1000
  gapX: T,
1001
1001
  gapY: R,
1002
1002
  spaceX: T,
1003
1003
  spaceY: R,
1004
- overscroll: P,
1004
+ overscroll: A,
1005
1005
  overscrollX: T,
1006
1006
  overscrollY: R,
1007
- overflow: P,
1007
+ overflow: A,
1008
1008
  overflowX: T,
1009
1009
  overflowY: R,
1010
1010
  top: Q,
1011
1011
  right: ee,
1012
1012
  bottom: te,
1013
1013
  left: re,
1014
- inset: P,
1014
+ inset: A,
1015
1015
  insetX: T,
1016
1016
  insetY: R,
1017
- border: P,
1017
+ border: A,
1018
1018
  borderX: T,
1019
1019
  borderY: R,
1020
1020
  borderTop: Q,
1021
1021
  borderRight: ee,
1022
1022
  borderBottom: te,
1023
1023
  borderLeft: re,
1024
- borderRadius: P,
1024
+ borderRadius: A,
1025
1025
  borderRadiusX: T,
1026
1026
  borderRadiusY: R,
1027
1027
  borderRadiusTop: Q,
@@ -1034,7 +1034,7 @@ const H = ["px", "%", "em", "rem", "ch", "vh", "vw"], Xr = {
1034
1034
  borderRadiusBottomLeft: Tt,
1035
1035
  divideXWidth: T,
1036
1036
  divideYWidth: R,
1037
- scale: P,
1037
+ scale: A,
1038
1038
  scaleX: T,
1039
1039
  scaleY: R,
1040
1040
  skewX: T,
@@ -1042,7 +1042,7 @@ const H = ["px", "%", "em", "rem", "ch", "vh", "vw"], Xr = {
1042
1042
  translateX: T,
1043
1043
  translateY: R,
1044
1044
  // padding
1045
- padding: P,
1045
+ padding: A,
1046
1046
  paddingX: T,
1047
1047
  paddingY: R,
1048
1048
  paddingTop: Q,
@@ -1050,7 +1050,7 @@ const H = ["px", "%", "em", "rem", "ch", "vh", "vw"], Xr = {
1050
1050
  paddingBottom: te,
1051
1051
  paddingLeft: re,
1052
1052
  // margin
1053
- margin: P,
1053
+ margin: A,
1054
1054
  marginX: T,
1055
1055
  marginY: R,
1056
1056
  marginTop: Q,
@@ -1069,7 +1069,7 @@ const H = ["px", "%", "em", "rem", "ch", "vh", "vw"], Xr = {
1069
1069
  underline: $t,
1070
1070
  overline: It,
1071
1071
  // transform
1072
- uppercase: Pt,
1072
+ uppercase: At,
1073
1073
  block: () => /* @__PURE__ */ e.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
1074
1074
  /* @__PURE__ */ e.jsx(
1075
1075
  "path",
@@ -1182,16 +1182,16 @@ const H = ["px", "%", "em", "rem", "ch", "vh", "vw"], Xr = {
1182
1182
  }
1183
1183
  )
1184
1184
  ] }),
1185
- static: At
1186
- }, oe = Oe({ canReset: !1, canChange: !0 }), Ur = ({ children: r, canReset: s = !1, canChange: t = !0 }) => (
1185
+ static: Pt
1186
+ }, oe = Me({ canReset: !1, canChange: !0 }), qr = ({ children: r, canReset: s = !1, canChange: t = !0 }) => (
1187
1187
  // eslint-disable-next-line react/jsx-no-constructed-context-values
1188
1188
  /* @__PURE__ */ e.jsx(oe.Provider, { value: { canReset: s, canChange: t }, children: r })
1189
1189
  ), at = ({ label: r, property: s, onChange: t }) => {
1190
- const o = _(() => g(ye, `${s}.classes`, [""]), [s]), l = ae(s), d = _(() => g(l, "cls", ""), [l]), { canChange: a } = se(oe), c = /\[.*\]/g.test(d);
1190
+ const o = _(() => x(he, `${s}.classes`, [""]), [s]), l = ae(s), d = _(() => x(l, "cls", ""), [l]), { canChange: a } = se(oe), c = /\[.*\]/g.test(d);
1191
1191
  return /* @__PURE__ */ e.jsx("div", { className: r ? "w-full rounded " : "grow", children: c ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
1192
1192
  /* @__PURE__ */ e.jsx(ur, { className: "w-[70%] rounded py-1", readOnly: !0, value: d }),
1193
1193
  /* @__PURE__ */ e.jsxs(F, { delayDuration: 100, children: [
1194
- /* @__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, {}) }) }),
1194
+ /* @__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, {}) }) }),
1195
1195
  /* @__PURE__ */ e.jsx(Z, { children: "Current value is using a Tailwind arbitrary value." })
1196
1196
  ] })
1197
1197
  ] }) : /* @__PURE__ */ e.jsx(
@@ -1219,15 +1219,15 @@ function Ce({ selected: r, onChange: s, rounded: t = !1, options: o, disabled: l
1219
1219
  value: d,
1220
1220
  children: [
1221
1221
  /* @__PURE__ */ e.jsx("option", { className: "bg-transparent", value: "" }),
1222
- $.Children.toArray(
1222
+ I.Children.toArray(
1223
1223
  o.map((i) => /* @__PURE__ */ e.jsx("option", { className: "bg-transparent", value: i, children: i }))
1224
1224
  )
1225
1225
  ]
1226
1226
  }
1227
1227
  );
1228
1228
  }
1229
- const Kr = ({ property: r, onChange: s }) => {
1230
- 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);
1229
+ const Gr = ({ property: r, onChange: s }) => {
1230
+ const { canReset: t, canChange: o } = se(oe), l = ae(r), d = _(() => x(l, "cls", ""), [l]), a = _(() => x(he, `${r}.classes`, [""]), [r]), c = a.indexOf(d) > -1 ? a.indexOf(d) : 0, i = /\[.*\]/g.test(d);
1231
1231
  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: [
1232
1232
  /* @__PURE__ */ e.jsx(
1233
1233
  "button",
@@ -1237,7 +1237,7 @@ const Kr = ({ property: r, onChange: s }) => {
1237
1237
  disabled: !o && (!t || c - 1 < 0),
1238
1238
  onClick: () => s(Ve(a, c - 1), r),
1239
1239
  children: /* @__PURE__ */ e.jsx("span", { className: "flex items-center justify-center", children: /* @__PURE__ */ e.jsx(
1240
- Lt,
1240
+ Et,
1241
1241
  {
1242
1242
  className: !o && (!t || c - 1 < 0) ? "text-gray-500" : "text-black/60 dark:text-white/60"
1243
1243
  }
@@ -1261,22 +1261,22 @@ const Kr = ({ property: r, onChange: s }) => {
1261
1261
  }
1262
1262
  )
1263
1263
  ] }) });
1264
- }, qr = ({ property: r, onChange: s }) => {
1265
- const t = _(() => g(ye, `${r}.classes`, [""]), [r]), { canChange: o } = se(oe), l = ae(r), d = _(() => g(l, "cls", ""), [l]);
1264
+ }, Jr = ({ property: r, onChange: s }) => {
1265
+ const t = _(() => x(he, `${r}.classes`, [""]), [r]), { canChange: o } = se(oe), l = ae(r), d = _(() => x(l, "cls", ""), [l]);
1266
1266
  return /* @__PURE__ */ e.jsx("div", { className: "flex grow flex-wrap gap-1", children: C(t, (a) => /* @__PURE__ */ e.jsxs(F, { children: [
1267
- /* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsx(
1267
+ /* @__PURE__ */ e.jsx(z, { asChild: !0, children: /* @__PURE__ */ e.jsx(
1268
1268
  "button",
1269
1269
  {
1270
1270
  type: "button",
1271
1271
  disabled: !o,
1272
1272
  onClick: () => s(a, r),
1273
1273
  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"}`,
1274
- children: $.createElement(g(ot, a, Xe))
1274
+ children: I.createElement(x(ot, a, ze))
1275
1275
  }
1276
1276
  ) }),
1277
1277
  /* @__PURE__ */ e.jsx(Z, { children: Y(le(a)) })
1278
1278
  ] })) });
1279
- }, Gr = {
1279
+ }, Qr = {
1280
1280
  backgroundColor: "bg",
1281
1281
  textColor: "text",
1282
1282
  borderColor: "border",
@@ -1288,39 +1288,39 @@ const Kr = ({ property: r, onChange: s }) => {
1288
1288
  toColor: "to",
1289
1289
  ringColor: "ring",
1290
1290
  ringOffsetColor: "ring-offset"
1291
- }, Jr = ({ property: r, onChange: s }) => {
1292
- 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(
1291
+ }, el = ({ property: r, onChange: s }) => {
1292
+ const t = ae(r), o = _(() => x(t, "cls", ""), [t]), { canChange: l } = se(oe), [d, a] = j([]), [c, i] = j({ color: "", shade: "" }), p = o.split("-"), y = x(p, "1", ""), n = x(p, "2", ""), h = B(
1293
1293
  // eslint-disable-next-line no-shadow
1294
1294
  (u) => {
1295
1295
  ["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" })));
1296
1296
  },
1297
1297
  [a, i]
1298
1298
  );
1299
- M(() => {
1300
- if (["current", "inherit", "transparent", "black", "white"].includes(h))
1299
+ O(() => {
1300
+ if (["current", "inherit", "transparent", "black", "white"].includes(y))
1301
1301
  return a([]);
1302
1302
  a(["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"]);
1303
- }, [h]);
1304
- const x = B(
1303
+ }, [y]);
1304
+ const g = B(
1305
1305
  // eslint-disable-next-line no-shadow
1306
1306
  (u) => {
1307
- i({ color: h, shade: u });
1307
+ i({ color: y, shade: u });
1308
1308
  },
1309
- [h]
1309
+ [y]
1310
1310
  );
1311
- return M(() => {
1311
+ return O(() => {
1312
1312
  i({ color: "", shade: "" });
1313
- }, [t]), M(() => {
1314
- const f = `${g(Gr, r, "")}-${c.color}${c.shade ? `-${c.shade}` : ""}`;
1315
- f.match(new RegExp(g(ye, `${r}.regExp`, ""))) && s(f, r);
1313
+ }, [t]), O(() => {
1314
+ const f = `${x(Qr, r, "")}-${c.color}${c.shade ? `-${c.shade}` : ""}`;
1315
+ f.match(new RegExp(x(he, `${r}.regExp`, ""))) && s(f, r);
1316
1316
  }, [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: [
1317
1317
  /* @__PURE__ */ e.jsx("div", { className: "grow text-center", children: /* @__PURE__ */ e.jsx(
1318
1318
  Ce,
1319
1319
  {
1320
1320
  disabled: !l,
1321
1321
  rounded: !0,
1322
- selected: h,
1323
- onChange: y,
1322
+ selected: y,
1323
+ onChange: h,
1324
1324
  options: [
1325
1325
  "current",
1326
1326
  "transparent",
@@ -1353,9 +1353,9 @@ const Kr = ({ property: r, onChange: s }) => {
1353
1353
  ]
1354
1354
  }
1355
1355
  ) }),
1356
- /* @__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 }) })
1356
+ /* @__PURE__ */ e.jsx("button", { type: "button", className: "grow text-center", children: /* @__PURE__ */ e.jsx(Ce, { rounded: !0, selected: n, disabled: !y || !l, onChange: g, options: d }) })
1357
1357
  ] });
1358
- }, Ae = (r, s) => {
1358
+ }, Pe = (r, s) => {
1359
1359
  r = r.toLowerCase();
1360
1360
  let t = r.trim().replace(/ |\+/g, "");
1361
1361
  if ((t === "auto" || t === "none") && s.includes(t))
@@ -1365,7 +1365,7 @@ const Kr = ({ property: r, onChange: s }) => {
1365
1365
  const l = r.match(o), d = l && l.length > 1, a = !m(t) && Number.isNaN(Number(t));
1366
1366
  return d || a ? { error: "Invalid value" } : l && (l[0] === "auto" || l[0] === "none") ? { value: l[0], unit: "" } : { value: t, unit: l ? l[0] : "" };
1367
1367
  };
1368
- const Qr = (r) => {
1368
+ const tl = (r) => {
1369
1369
  const s = r.startsWith("-") ? "-" : "", t = r.split("-").pop();
1370
1370
  if (["auto", "none"].includes(t))
1371
1371
  return { value: "", unit: t };
@@ -1375,17 +1375,17 @@ const Qr = (r) => {
1375
1375
  return { value: "100", unit: r.indexOf("w-") !== -1 ? "vw" : "vh" };
1376
1376
  if (t === "full")
1377
1377
  return { value: "100", unit: "%" };
1378
- if (A(r, "skew-"))
1378
+ if (P(r, "skew-"))
1379
1379
  return { value: `${s}${t}`, unit: "deg" };
1380
- if (A(r, "rotate-"))
1380
+ if (P(r, "rotate-"))
1381
1381
  return { value: `${s}${t}`, unit: "deg" };
1382
- if (A(r, "opacity-"))
1382
+ if (P(r, "opacity-"))
1383
1383
  return { value: `${t / 100}`, unit: "-" };
1384
- if (A(r, "duration-") || A(r, "delay-"))
1384
+ if (P(r, "duration-") || P(r, "delay-"))
1385
1385
  return { value: `${t}`, unit: "ms" };
1386
- if (A(r, "translate-") && !t.includes("/"))
1386
+ if (P(r, "translate-") && !t.includes("/"))
1387
1387
  return { value: `${s}${`${t / 4}`}`, unit: "rem" };
1388
- if (A(r, "scale-"))
1388
+ if (P(r, "scale-"))
1389
1389
  return { value: `${s}${`${t / 100}`}`, unit: "-" };
1390
1390
  if (W(r, "border")) {
1391
1391
  const o = r.match(/border-?(x|y|t|r|b|l)?\d+/g);
@@ -1494,18 +1494,18 @@ const Qr = (r) => {
1494
1494
  }
1495
1495
  return vt(parseFloat(t)) ? { value: `${s + parseFloat(t) * 4}`, unit: "px" } : { value: t, unit: "class" };
1496
1496
  };
1497
- const el = (r) => {
1497
+ const rl = (r) => {
1498
1498
  if (m(r))
1499
1499
  return { value: "", unit: "" };
1500
1500
  const s = r.match(/\[.*\]/g);
1501
1501
  if (s === null)
1502
- return tl(r);
1503
- const t = g(s, "0", "").replace(/\[|\]/g, ""), o = r.startsWith("-") ? "-" : "", l = ue(t.match(/\d+.\d+|\d+/g));
1502
+ return ll(r);
1503
+ const t = x(s, "0", "").replace(/\[|\]/g, ""), o = r.startsWith("-") ? "-" : "", l = ue(t.match(/\d+.\d+|\d+/g));
1504
1504
  return { value: `${o}${l}`, unit: t.replace(l, "") };
1505
- }, tl = (r) => m(r) ? { value: "", unit: "" } : Qr(r), nt = $.createContext({
1505
+ }, ll = (r) => m(r) ? { value: "", unit: "" } : tl(r), nt = I.createContext({
1506
1506
  setDragData: () => {
1507
1507
  }
1508
- }), rl = ({
1508
+ }), sl = ({
1509
1509
  unit: r,
1510
1510
  currentValue: s,
1511
1511
  onDrag: t,
@@ -1534,11 +1534,11 @@ const el = (r) => {
1534
1534
  },
1535
1535
  color: void 0,
1536
1536
  className: "relative z-50 ml-1 hidden h-6 cursor-row-resize rounded bg-background/70 px-2 group-hover:inline",
1537
- children: /* @__PURE__ */ e.jsx(Et, {})
1537
+ children: /* @__PURE__ */ e.jsx(Lt, {})
1538
1538
  }
1539
1539
  );
1540
- }, 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(
1541
- ge,
1540
+ }, ol = ({ 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(
1541
+ xe,
1542
1542
  {
1543
1543
  className: "h-max rounded-none px-1 py-1 text-right text-[11px] hover:bg-blue-400",
1544
1544
  color: s === o ? "primary" : void 0,
@@ -1549,38 +1549,38 @@ const el = (r) => {
1549
1549
  children: o
1550
1550
  },
1551
1551
  o
1552
- )) }), Le = 50, sl = (r) => {
1553
- 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);
1554
- M(() => {
1555
- const { value: b, unit: v } = el(d);
1552
+ )) }), Ee = 50, al = (r) => {
1553
+ const [s, t] = j(!1), [o, l] = j(""), { currentClass: d, onChange: a, classPrefix: c, cssProperty: i, units: p, negative: y } = r, [n, h] = j(i != null && i.toLowerCase().includes("width") ? "%" : p[0]), [g, u] = j(!1), [f, k] = j(""), [E, w] = j(!1), [$, L] = j(!1);
1554
+ O(() => {
1555
+ const { value: b, unit: v } = rl(d);
1556
1556
  if (v === "") {
1557
- l(b), y(i != null && i.toLowerCase().includes("width") ? "%" : ue(p));
1557
+ l(b), h(i != null && i.toLowerCase().includes("width") ? "%" : ue(p));
1558
1558
  return;
1559
1559
  }
1560
- y(v), l(v === "class" || m(b) ? "" : b);
1560
+ h(v), l(v === "class" || m(b) ? "" : b);
1561
1561
  }, [d, i, p]);
1562
- const N = fe((b) => a(b), [a], Le), D = fe((b) => a(b, !1), [a], Le), z = B(
1562
+ const N = fe((b) => a(b), [a], Ee), D = fe((b) => a(b, !1), [a], Ee), X = B(
1563
1563
  (b = !1) => {
1564
- const v = Ae(`${o}`, p);
1565
- if (g(v, "error", !1)) {
1564
+ const v = Pe(`${o}`, p);
1565
+ if (x(v, "error", !1)) {
1566
1566
  u(!0);
1567
1567
  return;
1568
1568
  }
1569
- const S = g(v, "unit") !== "" ? g(v, "unit") : n;
1569
+ const S = x(v, "unit") !== "" ? x(v, "unit") : n;
1570
1570
  if (S === "auto" || S === "none") {
1571
1571
  N(`${c}${S}`);
1572
1572
  return;
1573
1573
  }
1574
- if (g(v, "value") === "")
1574
+ if (x(v, "value") === "")
1575
1575
  return;
1576
- const J = `${g(v, "value", "").startsWith("-") ? "-" : ""}${c}[${g(v, "value", "").replace("-", "")}${S === "-" ? "" : S}]`;
1576
+ const J = `${x(v, "value", "").startsWith("-") ? "-" : ""}${c}[${x(v, "value", "").replace("-", "")}${S === "-" ? "" : S}]`;
1577
1577
  b ? D(J) : N(J);
1578
1578
  },
1579
1579
  [N, D, o, n, c, p]
1580
1580
  ), G = B(
1581
1581
  (b) => {
1582
- const v = Ae(`${o}`, p);
1583
- if (g(v, "error", !1)) {
1582
+ const v = Pe(`${o}`, p);
1583
+ if (x(v, "error", !1)) {
1584
1584
  u(!0);
1585
1585
  return;
1586
1586
  }
@@ -1588,9 +1588,9 @@ const el = (r) => {
1588
1588
  N(`${c}${b}`);
1589
1589
  return;
1590
1590
  }
1591
- if (g(v, "value") === "")
1591
+ if (x(v, "value") === "")
1592
1592
  return;
1593
- const S = g(v, "unit") !== "" ? g(v, "unit") : b, J = `${g(v, "value", "").startsWith("-") ? "-" : ""}${c}[${g(v, "value", "").replace("-", "")}${S === "-" ? "" : S}]`;
1593
+ const S = x(v, "unit") !== "" ? x(v, "unit") : b, J = `${x(v, "value", "").startsWith("-") ? "-" : ""}${c}[${x(v, "value", "").replace("-", "")}${S === "-" ? "" : S}]`;
1594
1594
  N(J);
1595
1595
  },
1596
1596
  [N, o, c, p]
@@ -1598,32 +1598,32 @@ const el = (r) => {
1598
1598
  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: [
1599
1599
  /* @__PURE__ */ e.jsx("input", { className: "w-20 rounded py-1", readOnly: !0, value: d }),
1600
1600
  /* @__PURE__ */ e.jsxs(F, { children: [
1601
- /* @__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, {}) }) }),
1601
+ /* @__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, {}) }) }),
1602
1602
  /* @__PURE__ */ e.jsx(Z, { children: "Current value is using a Tailwind preset class." })
1603
1603
  ] })
1604
- ] }) : /* @__PURE__ */ e.jsxs("div", { className: `group relative flex items-center ${L ? "z-auto" : ""}`, children: [
1604
+ ] }) : /* @__PURE__ */ e.jsxs("div", { className: `group relative flex items-center ${E ? "z-auto" : ""}`, children: [
1605
1605
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center rounded-md border border-border", children: [
1606
1606
  ["none", "auto"].indexOf(n) !== -1 ? null : /* @__PURE__ */ e.jsx(
1607
1607
  "input",
1608
1608
  {
1609
1609
  readOnly: n === "class",
1610
1610
  onKeyPress: (b) => {
1611
- b.key === "Enter" && z();
1611
+ b.key === "Enter" && X();
1612
1612
  },
1613
1613
  onKeyDown: (b) => {
1614
1614
  if (b.keyCode !== 38 && b.keyCode !== 40)
1615
1615
  return;
1616
- b.preventDefault(), E(!0);
1616
+ b.preventDefault(), L(!0);
1617
1617
  const v = wt(b.target.value);
1618
- let S = ze(v) ? 0 : v;
1618
+ let S = Xe(v) ? 0 : v;
1619
1619
  b.keyCode === 38 && (S += 1), b.keyCode === 40 && (S -= 1);
1620
- const O = `${S}`, dt = `${O.startsWith("-") ? "-" : ""}${c}[${O.replace("-", "")}${n === "-" ? "" : n}]`;
1620
+ const M = `${S}`, dt = `${M.startsWith("-") ? "-" : ""}${c}[${M.replace("-", "")}${n === "-" ? "" : n}]`;
1621
1621
  D(dt);
1622
1622
  },
1623
1623
  onKeyUp: (b) => {
1624
- I && (b.preventDefault(), E(!1));
1624
+ $ && (b.preventDefault(), L(!1));
1625
1625
  },
1626
- onBlur: () => z(),
1626
+ onBlur: () => X(),
1627
1627
  onChange: (b) => {
1628
1628
  u(!1), l(b.target.value);
1629
1629
  },
@@ -1631,15 +1631,15 @@ const el = (r) => {
1631
1631
  var v;
1632
1632
  (v = b == null ? void 0 : b.target) == null || v.select(), t(!1);
1633
1633
  },
1634
- value: L ? f : o,
1634
+ value: E ? f : o,
1635
1635
  className: "h-6 w-14 rounded rounded-r-none bg-background pl-2 text-sm focus-visible:outline-0 ".concat(
1636
1636
  " ",
1637
- x ? "border-red-500 text-red-500" : "border-foreground/20"
1637
+ g ? "border-red-500 text-red-500" : "border-foreground/20"
1638
1638
  )
1639
1639
  }
1640
1640
  ),
1641
1641
  /* @__PURE__ */ e.jsxs(F, { open: s, delayDuration: 100, children: [
1642
- /* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
1642
+ /* @__PURE__ */ e.jsx(z, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
1643
1643
  "button",
1644
1644
  {
1645
1645
  type: "button",
@@ -1647,50 +1647,50 @@ const el = (r) => {
1647
1647
  className: "flex h-6 cursor-pointer items-center gap-x-1 rounded rounded-l-none bg-background p-px px-1 text-[11px] uppercase",
1648
1648
  children: [
1649
1649
  /* @__PURE__ */ e.jsx("span", { className: `inline-block ${p.length === 1 ? "px-2 font-semibold" : ""}`, children: n }),
1650
- p.length > 1 ? /* @__PURE__ */ e.jsx(Ot, {}) : null
1650
+ p.length > 1 ? /* @__PURE__ */ e.jsx(Mt, {}) : null
1651
1651
  ]
1652
1652
  }
1653
1653
  ) }),
1654
- /* @__PURE__ */ e.jsx(gr, { children: /* @__PURE__ */ e.jsx(Z, { className: "bg-background", children: /* @__PURE__ */ e.jsx(
1655
- ll,
1654
+ /* @__PURE__ */ e.jsx(xr, { children: /* @__PURE__ */ e.jsx(Z, { className: "bg-background", children: /* @__PURE__ */ e.jsx(
1655
+ ol,
1656
1656
  {
1657
1657
  units: p,
1658
1658
  current: n,
1659
1659
  onSelect: (b) => {
1660
- t(!1), y(b), G(b);
1660
+ t(!1), h(b), G(b);
1661
1661
  }
1662
1662
  }
1663
1663
  ) }) })
1664
1664
  ] })
1665
1665
  ] }),
1666
- ["none", "auto"].indexOf(n) !== -1 || L ? null : /* @__PURE__ */ e.jsx(
1667
- rl,
1666
+ ["none", "auto"].indexOf(n) !== -1 || E ? null : /* @__PURE__ */ e.jsx(
1667
+ sl,
1668
1668
  {
1669
1669
  onDragStart: () => w(!0),
1670
1670
  onDragEnd: (b) => {
1671
1671
  if (k(() => ""), w(!1), m(b))
1672
1672
  return;
1673
- const v = `${b}`, O = `${v.startsWith("-") ? "-" : ""}${c}[${v.replace("-", "")}${n === "-" ? "" : n}]`;
1674
- N(O);
1673
+ const v = `${b}`, M = `${v.startsWith("-") ? "-" : ""}${c}[${v.replace("-", "")}${n === "-" ? "" : n}]`;
1674
+ N(M);
1675
1675
  },
1676
1676
  onDrag: (b) => {
1677
1677
  if (m(b))
1678
1678
  return;
1679
1679
  k(b);
1680
- const v = `${b}`, O = `${v.startsWith("-") ? "-" : ""}${c}[${v.replace("-", "")}${n === "-" ? "" : n}]`;
1681
- D(O);
1680
+ const v = `${b}`, M = `${v.startsWith("-") ? "-" : ""}${c}[${v.replace("-", "")}${n === "-" ? "" : n}]`;
1681
+ D(M);
1682
1682
  },
1683
1683
  currentValue: o,
1684
1684
  unit: n,
1685
- negative: h,
1685
+ negative: y,
1686
1686
  cssProperty: i
1687
1687
  }
1688
1688
  )
1689
1689
  ] }) }) });
1690
1690
  }, ae = (r) => {
1691
- const s = xe();
1691
+ const s = ge();
1692
1692
  return jt(s, { property: r });
1693
- }, ol = (r, s) => {
1693
+ }, nl = (r, s) => {
1694
1694
  const t = {
1695
1695
  xs: 0,
1696
1696
  sm: 1,
@@ -1699,8 +1699,8 @@ const el = (r) => {
1699
1699
  xl: 4,
1700
1700
  "2xl": 5
1701
1701
  };
1702
- return t[g(r, "mq", "xs")] <= t[s];
1703
- }, al = {
1702
+ return t[x(r, "mq", "xs")] <= t[s];
1703
+ }, il = {
1704
1704
  width: "w-",
1705
1705
  height: "h-",
1706
1706
  minWidth: "min-w-",
@@ -1766,32 +1766,32 @@ const el = (r) => {
1766
1766
  insetY: "inset-y-",
1767
1767
  opacity: "opacity-",
1768
1768
  flexBasis: "basis-"
1769
- }, Ee = {
1769
+ }, Le = {
1770
1770
  xs: "",
1771
1771
  sm: "640px",
1772
1772
  md: "768px",
1773
1773
  lg: "1024px",
1774
1774
  xl: "1280px",
1775
1775
  "2xl": "1536px"
1776
- }, nl = (r) => `${r.toUpperCase()} ${Ee[r] ? `(${Ee[r]} & up)` : ""}`, Re = (r) => {
1776
+ }, dl = (r) => `${r.toUpperCase()} ${Le[r] ? `(${Le[r]} & up)` : ""}`, Re = (r) => {
1777
1777
  const { t: s } = K(), { type: t = "icons", label: o, property: l, onEmitChange: d = () => {
1778
- }, 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(
1779
- (D, z = !0) => {
1780
- const G = { dark: i, mq: h, mod: p, cls: D, property: l, fullCls: "" };
1778
+ }, units: a, negative: c = !1 } = r, [i] = gr(), [p] = Qe(), [, y] = Be(), n = ae(l), h = qe(), g = Ge(), [u] = Je(), f = _(() => x(n, "fullCls", ""), [n]), k = B(
1779
+ (D, X = !0) => {
1780
+ const G = { dark: i, mq: y, mod: p, cls: D, property: l, fullCls: "" };
1781
1781
  (i || p !== "") && (G.mq = "xs");
1782
- const b = Ir(G);
1783
- y(u, [b], z);
1782
+ const b = Er(G);
1783
+ h(u, [b], X);
1784
1784
  },
1785
- [u, i, h, p, l, y]
1786
- ), L = B(() => {
1787
- x(u, [f]);
1788
- }, [u, f, x]), w = _(() => ol(n, h), [n, h]);
1789
- M(() => {
1785
+ [u, i, y, p, l, h]
1786
+ ), E = B(() => {
1787
+ g(u, [f]);
1788
+ }, [u, f, g]), w = _(() => nl(n, y), [n, y]);
1789
+ O(() => {
1790
1790
  d(w, n);
1791
1791
  }, [w, d, n]);
1792
- const [, , I] = Be(), E = B(
1792
+ const [, , $] = Be(), L = B(
1793
1793
  (D) => {
1794
- I({
1794
+ $({
1795
1795
  xs: 400,
1796
1796
  sm: 640,
1797
1797
  md: 800,
@@ -1800,30 +1800,30 @@ const el = (r) => {
1800
1800
  "2xl": 1920
1801
1801
  }[D]);
1802
1802
  },
1803
- [I]
1804
- ), N = g(n, "dark", null) === i && g(n, "mod", null) === p && g(n, "mq", null) === h;
1805
- 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: [
1803
+ [$]
1804
+ ), N = x(n, "dark", null) === i && x(n, "mod", null) === p && x(n, "mq", null) === y;
1805
+ return /* @__PURE__ */ e.jsx(qr, { 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: [
1806
1806
  /* @__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) }) }),
1807
1807
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-row items-center", children: [
1808
1808
  /* @__PURE__ */ e.jsxs("div", { className: "w-[150px]", children: [
1809
1809
  t === "arbitrary" ? /* @__PURE__ */ e.jsx(
1810
- sl,
1810
+ al,
1811
1811
  {
1812
- currentClass: g(n, "cls", ""),
1813
- classPrefix: g(al, l, ""),
1812
+ currentClass: x(n, "cls", ""),
1813
+ classPrefix: x(il, l, ""),
1814
1814
  units: a || [],
1815
1815
  onChange: k,
1816
1816
  negative: c,
1817
1817
  cssProperty: l
1818
1818
  }
1819
1819
  ) : null,
1820
- t === "icons" && /* @__PURE__ */ e.jsx(qr, { property: l, onChange: k }),
1821
- t === "range" && /* @__PURE__ */ e.jsx(Kr, { property: l, onChange: k }),
1822
- t === "color" && /* @__PURE__ */ e.jsx(Jr, { property: l, onChange: k }),
1820
+ t === "icons" && /* @__PURE__ */ e.jsx(Jr, { property: l, onChange: k }),
1821
+ t === "range" && /* @__PURE__ */ e.jsx(Gr, { property: l, onChange: k }),
1822
+ t === "color" && /* @__PURE__ */ e.jsx(el, { property: l, onChange: k }),
1823
1823
  t === "dropdown" && /* @__PURE__ */ e.jsx(at, { label: o, property: l, onChange: k })
1824
1824
  ] }),
1825
- /* @__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: [
1826
- /* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsx(
1825
+ /* @__PURE__ */ e.jsx("div", { className: `w-[30px] cursor-pointer ${f ? "visible" : "invisible"}`, children: N ? /* @__PURE__ */ e.jsx("button", { type: "button", onClick: () => E(), 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(F, { delayDuration: 100, children: [
1826
+ /* @__PURE__ */ e.jsx(z, { asChild: !0, children: /* @__PURE__ */ e.jsx(
1827
1827
  "button",
1828
1828
  {
1829
1829
  type: "button",
@@ -1834,7 +1834,7 @@ const el = (r) => {
1834
1834
  /* @__PURE__ */ e.jsx(Z, { children: /* @__PURE__ */ e.jsx("div", { className: "text-right", children: /* @__PURE__ */ e.jsxs("div", { children: [
1835
1835
  "Current style is set at  ",
1836
1836
  /* @__PURE__ */ e.jsxs("span", { className: "font-bold ", children: [
1837
- nl(g(n, "mq")),
1837
+ dl(x(n, "mq")),
1838
1838
  i && !n.dark ? "(Light mode)" : ""
1839
1839
  ] }),
1840
1840
  /* @__PURE__ */ e.jsx("br", {}),
@@ -1842,11 +1842,11 @@ const el = (r) => {
1842
1842
  "button",
1843
1843
  {
1844
1844
  type: "button",
1845
- onClick: () => E(g(n, "mq")),
1845
+ onClick: () => L(x(n, "mq")),
1846
1846
  className: "block w-full cursor-default text-right font-semibold text-blue-500",
1847
1847
  children: [
1848
1848
  "Switch to ",
1849
- g(n, "mq").toUpperCase()
1849
+ x(n, "mq").toUpperCase()
1850
1850
  ]
1851
1851
  }
1852
1852
  )
@@ -1854,16 +1854,16 @@ const el = (r) => {
1854
1854
  ] }) : null })
1855
1855
  ] })
1856
1856
  ] }) });
1857
- }, il = ["px", "%", "em", "rem", "ch", "vh", "vw"], it = ({
1857
+ }, cl = ["px", "%", "em", "rem", "ch", "vh", "vw"], it = ({
1858
1858
  label: r,
1859
1859
  options: s,
1860
1860
  borderB: t = !1,
1861
1861
  borderT: o = !1,
1862
1862
  type: l = "arbitrary",
1863
- units: d = il,
1863
+ units: d = cl,
1864
1864
  negative: a = !1
1865
1865
  }) => {
1866
- const { t: c } = K(), [i, p] = j(s[0].key), h = xe(), n = B((y) => C(h, "property").includes(y), [h]);
1866
+ const { t: c } = K(), [i, p] = j(s[0].key), y = ge(), n = B((h) => C(y, "property").includes(h), [y]);
1867
1867
  return /* @__PURE__ */ e.jsxs(
1868
1868
  "div",
1869
1869
  {
@@ -1871,23 +1871,23 @@ const el = (r) => {
1871
1871
  children: [
1872
1872
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-row text-xs", children: [
1873
1873
  r && /* @__PURE__ */ e.jsx("span", { className: "relative w-[70px] flex-none text-xs text-foreground", children: c(r) }),
1874
- /* @__PURE__ */ e.jsx("div", { className: "mb-3 flex grow flex-row flex-wrap gap-x-px", children: $.Children.toArray(
1875
- s.map(({ label: y, key: x }) => /* @__PURE__ */ e.jsx("div", { className: "first:rounded-l last:rounded-r", children: /* @__PURE__ */ e.jsxs(F, { children: [
1876
- /* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
1874
+ /* @__PURE__ */ e.jsx("div", { className: "mb-3 flex grow flex-row flex-wrap gap-x-px", children: I.Children.toArray(
1875
+ s.map(({ label: h, key: g }) => /* @__PURE__ */ e.jsx("div", { className: "first:rounded-l last:rounded-r", children: /* @__PURE__ */ e.jsxs(F, { children: [
1876
+ /* @__PURE__ */ e.jsx(z, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
1877
1877
  "button",
1878
1878
  {
1879
1879
  type: "button",
1880
- onClick: () => p(x),
1881
- className: `relative cursor-pointer rounded-full p-1 text-[8px] ${x === i ? " bg-[#3E57F0] text-white" : "text-gray-600 dark:text-gray-300"}`,
1880
+ onClick: () => p(g),
1881
+ className: `relative cursor-pointer rounded-full p-1 text-[8px] ${g === i ? " bg-[#3E57F0] text-white" : "text-gray-600 dark:text-gray-300"}`,
1882
1882
  children: [
1883
- $.createElement("div", {
1884
- className: n(x) ? "-bottom-1.5 absolute bg-[#3E57F0] h-[2px] left-0 w-full" : ""
1883
+ I.createElement("div", {
1884
+ className: n(g) ? "-bottom-1.5 absolute bg-[#3E57F0] h-[2px] left-0 w-full" : ""
1885
1885
  }),
1886
- $.createElement(g(ot, x, Xe), { className: "text-inherit w-3 h-3" })
1886
+ I.createElement(x(ot, g, ze), { className: "text-inherit w-3 h-3" })
1887
1887
  ]
1888
1888
  }
1889
1889
  ) }),
1890
- /* @__PURE__ */ e.jsx(Z, { children: Y(le(y)) })
1890
+ /* @__PURE__ */ e.jsx(Z, { children: Y(le(h)) })
1891
1891
  ] }) }))
1892
1892
  ) })
1893
1893
  ] }),
@@ -1904,8 +1904,8 @@ const el = (r) => {
1904
1904
  ]
1905
1905
  }
1906
1906
  );
1907
- }, dl = ({ heading: r, items: s }) => {
1908
- const { t } = K(), o = xe(), l = _(() => {
1907
+ }, pl = ({ heading: r, items: s }) => {
1908
+ const { t } = K(), o = ge(), l = _(() => {
1909
1909
  const d = (i) => U(
1910
1910
  i.map((p) => p.styleType === "multiple" ? C(p.options, "key") : p.property)
1911
1911
  ), a = U(
@@ -1925,15 +1925,15 @@ const el = (r) => {
1925
1925
  ] }) }),
1926
1926
  /* @__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)) })
1927
1927
  ] });
1928
- }, cl = Oe({}), me = ({ section: r }) => {
1929
- const { t: s } = K(), t = xe(), o = B(
1928
+ }, ul = Me({}), me = ({ section: r }) => {
1929
+ const { t: s } = K(), t = ge(), o = B(
1930
1930
  (a = []) => {
1931
1931
  const c = {};
1932
1932
  for (let p = 0; p < t.length; p++)
1933
1933
  c[t[p].property] = t[p].cls;
1934
1934
  let i = !0;
1935
1935
  for (const p in a)
1936
- if (!he(c, p) || c[p] !== a[p]) {
1936
+ if (!ye(c, p) || c[p] !== a[p]) {
1937
1937
  i = !1;
1938
1938
  break;
1939
1939
  }
@@ -1944,22 +1944,22 @@ const el = (r) => {
1944
1944
  if (t.length > 0 && r.heading === "classes.heading")
1945
1945
  return !0;
1946
1946
  const a = (p) => U(
1947
- p.map((h) => h.styleType === "multiple" ? U(C(h.options, "key")) : h.property)
1947
+ p.map((y) => y.styleType === "multiple" ? U(C(y.options, "key")) : y.property)
1948
1948
  ), c = U(
1949
1949
  r.items.map((p) => p.styleType === "accordion" ? a(p.items) : p.styleType === "multiple" ? U(C(p.options, "key")) : p.property)
1950
1950
  ), i = C(t, "property");
1951
1951
  return Ye(c, i).length > 0;
1952
1952
  }, [t, r.heading, r.items]), d = _(() => ({}), []);
1953
- return /* @__PURE__ */ e.jsx(cl.Provider, { value: d, children: /* @__PURE__ */ e.jsxs(de, { value: r.heading, children: [
1953
+ return /* @__PURE__ */ e.jsx(ul.Provider, { value: d, children: /* @__PURE__ */ e.jsxs(de, { value: r.heading, children: [
1954
1954
  /* @__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: [
1955
1955
  /* @__PURE__ */ e.jsx("div", { className: `h-[8px] w-[8px] rounded-full ${l ? "bg-blue-500" : "bg-gray-300"}` }),
1956
1956
  s(r.heading)
1957
1957
  ] }) }),
1958
- /* @__PURE__ */ e.jsx(pe, { className: "bg-gray-100 px-3.5 py-2", children: $.Children.toArray(
1959
- 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))
1958
+ /* @__PURE__ */ e.jsx(pe, { className: "bg-gray-100 px-3.5 py-2", children: I.Children.toArray(
1959
+ r.items.map((a) => ye(a, "component") ? I.createElement(a.component, { key: a.label }) : ye(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(pl, { ...a }, a.label) : null : /* @__PURE__ */ e.jsx(Re, { ...a }, a.label))
1960
1960
  ) })
1961
1961
  ] }) });
1962
- }, pl = ({
1962
+ }, xl = ({
1963
1963
  item: r,
1964
1964
  index: s,
1965
1965
  canDelete: t,
@@ -1992,32 +1992,32 @@ const el = (r) => {
1992
1992
  }
1993
1993
  ),
1994
1994
  /* @__PURE__ */ e.jsx(
1995
- zt,
1995
+ Xt,
1996
1996
  {
1997
1997
  onClick: l,
1998
1998
  className: "h-6 w-6 cursor-pointer rounded border border-red-400 p-1 text-red-400 hover:opacity-80"
1999
1999
  }
2000
2000
  )
2001
2001
  ] })
2002
- ] }), ul = ({ section: r }) => {
2003
- var y;
2004
- const { setSyncState: s } = yr(), t = q(), [o, l] = j([]), [d] = Se(), a = Ue(), c = `${g(d, "0.prop")}_attrs`;
2002
+ ] }), gl = ({ section: r }) => {
2003
+ var h;
2004
+ const { setSyncState: s } = hr(), t = q(), [o, l] = j([]), [d] = Se(), a = Ue(), c = `${x(d, "0.prop")}_attrs`;
2005
2005
  ne.useEffect(() => {
2006
- const x = C(g(t, c), (u, f) => ({ key: f, value: u }));
2007
- m(x) ? l([]) : l(x);
2008
- }, [g(t, c)]);
2009
- const i = () => l([...o, { key: "", value: "" }]), p = (x) => {
2010
- const u = we(o, (f, k) => x !== k);
2006
+ const g = C(x(t, c), (u, f) => ({ key: f, value: u }));
2007
+ m(g) ? l([]) : l(g);
2008
+ }, [x(t, c)]);
2009
+ const i = () => l([...o, { key: "", value: "" }]), p = (g) => {
2010
+ const u = we(o, (f, k) => g !== k);
2011
2011
  n(u);
2012
- }, h = (x, u) => {
2012
+ }, y = (g, u) => {
2013
2013
  const f = [...o];
2014
- f[u][x.target.name] = x.target.value, n(f);
2014
+ f[u][g.target.name] = g.target.value, n(f);
2015
2015
  }, n = ne.useCallback(
2016
- (x = []) => {
2016
+ (g = []) => {
2017
2017
  const u = {};
2018
- ke(x, (f) => {
2019
- m(f.key) || Me(u, f.key, f.value);
2020
- }), a([g(t, "_id")], { [c]: u }), s("UNSAVED");
2018
+ ke(g, (f) => {
2019
+ m(f.key) || Oe(u, f.key, f.value);
2020
+ }), a([x(t, "_id")], { [c]: u }), s("UNSAVED");
2021
2021
  },
2022
2022
  [t, s, a, c]
2023
2023
  );
@@ -2026,7 +2026,7 @@ const el = (r) => {
2026
2026
  /* @__PURE__ */ e.jsx(
2027
2027
  "div",
2028
2028
  {
2029
- className: `h-[8px] w-[8px] rounded-full ${m(g(t, c)) ? "bg-gray-300" : "bg-blue-500"}`
2029
+ className: `h-[8px] w-[8px] rounded-full ${m(x(t, c)) ? "bg-gray-300" : "bg-blue-500"}`
2030
2030
  }
2031
2031
  ),
2032
2032
  "Attributes"
@@ -2037,10 +2037,10 @@ const el = (r) => {
2037
2037
  /* @__PURE__ */ e.jsxs(
2038
2038
  "div",
2039
2039
  {
2040
- 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"}`,
2040
+ 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((h = ve(o)) == 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"}`,
2041
2041
  onClick: () => {
2042
- var x;
2043
- !m(o) && m((x = ve(o)) == null ? void 0 : x.key) || i();
2042
+ var g;
2043
+ !m(o) && m((g = ve(o)) == null ? void 0 : g.key) || i();
2044
2044
  },
2045
2045
  children: [
2046
2046
  /* @__PURE__ */ e.jsx(Ne, { width: 12, height: 12 }),
@@ -2052,15 +2052,15 @@ const el = (r) => {
2052
2052
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col", children: [
2053
2053
  m(o) && /* @__PURE__ */ e.jsx("div", { className: "flex h-12 items-center justify-center text-sm text-gray-400", children: "Click + Add to add attributes" }),
2054
2054
  ne.Children.toArray(
2055
- C(o, (x, u) => {
2055
+ C(o, (g, u) => {
2056
2056
  const f = o.length > 0 && u < o.length - 1;
2057
2057
  return /* @__PURE__ */ e.jsx(
2058
- pl,
2058
+ xl,
2059
2059
  {
2060
- item: x,
2060
+ item: g,
2061
2061
  index: u,
2062
2062
  canDelete: f,
2063
- onChange: h,
2063
+ onChange: y,
2064
2064
  onRemove: () => p(u)
2065
2065
  }
2066
2066
  );
@@ -2070,8 +2070,8 @@ const el = (r) => {
2070
2070
  ] }) })
2071
2071
  ] });
2072
2072
  };
2073
- function gl() {
2074
- const [r, s] = Qe(), { flexChild: t, gridChild: o } = hr(), [, l] = Hr(br), { t: d } = K(), [a] = Se();
2073
+ function hl() {
2074
+ const [r, s] = Qe(), { flexChild: t, gridChild: o } = yr(), [, l] = $r(br), { t: d } = K(), [a] = Se();
2075
2075
  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: [
2076
2076
  /* @__PURE__ */ e.jsx(Ze, { className: "mx-auto text-3xl" }),
2077
2077
  /* @__PURE__ */ e.jsx("h1", { children: d("no_styling_block_selected") }),
@@ -2105,15 +2105,15 @@ function gl() {
2105
2105
  ] })
2106
2106
  ] }) }),
2107
2107
  /* @__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: [
2108
- t && /* @__PURE__ */ e.jsx(me, { section: Xr }),
2109
- o ? /* @__PURE__ */ e.jsx(me, { section: Zr }) : null,
2110
- Wr.map((c) => /* @__PURE__ */ e.jsx(me, { section: c }, c.heading)),
2111
- /* @__PURE__ */ e.jsx(ul, { section: { heading: "Attributes" } })
2108
+ t && /* @__PURE__ */ e.jsx(me, { section: Wr }),
2109
+ o ? /* @__PURE__ */ e.jsx(me, { section: Ur }) : null,
2110
+ Kr.map((c) => /* @__PURE__ */ e.jsx(me, { section: c }, c.heading)),
2111
+ /* @__PURE__ */ e.jsx(gl, { section: { heading: "Attributes" } })
2112
2112
  ] }) })
2113
2113
  ] })
2114
2114
  );
2115
2115
  }
2116
- const xl = {
2116
+ const yl = {
2117
2117
  px: 1,
2118
2118
  "%": 1,
2119
2119
  em: 100,
@@ -2124,8 +2124,8 @@ const xl = {
2124
2124
  "-": 1,
2125
2125
  deg: 1,
2126
2126
  ms: 0.1
2127
- }, vs = () => {
2128
- const r = q(), { t: s } = K(), [t, o] = $.useState(""), [l, d] = $.useState({
2127
+ }, js = () => {
2128
+ const r = q(), { t: s } = K(), [t, o] = I.useState(""), [l, d] = I.useState({
2129
2129
  onDrag: (i) => i,
2130
2130
  onDragEnd: (i) => i,
2131
2131
  dragStartY: 0,
@@ -2136,13 +2136,13 @@ const xl = {
2136
2136
  cssProperty: ""
2137
2137
  }), a = fe(
2138
2138
  (i) => {
2139
- const p = !g(l, "negative", !1), h = g(l, "cssProperty", "");
2139
+ const p = !x(l, "negative", !1), y = x(l, "cssProperty", "");
2140
2140
  let n = parseFloat(l.dragStartValue);
2141
- n = ze(n) ? 0 : n;
2142
- let y = xl[l.dragUnit];
2143
- (W(h, "scale") || h === "opacity") && (y = 10);
2144
- let u = (l.dragStartY - i.pageY) / y + n;
2145
- p && u < 0 && (u = 0), h === "opacity" && u > 1 && (u = 1), l.onDrag(`${u}`), o(`${u}`);
2141
+ n = Xe(n) ? 0 : n;
2142
+ let h = yl[l.dragUnit];
2143
+ (W(y, "scale") || y === "opacity") && (h = 10);
2144
+ let u = (l.dragStartY - i.pageY) / h + n;
2145
+ p && u < 0 && (u = 0), y === "opacity" && u > 1 && (u = 1), l.onDrag(`${u}`), o(`${u}`);
2146
2146
  },
2147
2147
  [l],
2148
2148
  50
@@ -2180,13 +2180,13 @@ const xl = {
2180
2180
  {
2181
2181
  value: "settings",
2182
2182
  className: "no-scrollbar -mx-1 -mr-2 h-full flex-1 overflow-y-auto overflow-x-hidden",
2183
- 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, {}) })
2183
+ 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, {}) })
2184
2184
  }
2185
2185
  ),
2186
- /* @__PURE__ */ e.jsx($e, { value: "styling", className: "flex-1 h-full overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(gl, {}) })
2186
+ /* @__PURE__ */ e.jsx($e, { value: "styling", className: "flex-1 h-full overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(hl, {}) })
2187
2187
  ] })
2188
2188
  ] }) });
2189
2189
  };
2190
2190
  export {
2191
- vs as default
2191
+ js as default
2192
2192
  };