@chaibuilder/sdk 0.1.16 → 0.1.18

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 (89) hide show
  1. package/dist/AddBlocks-5cb44efb.cjs +3 -0
  2. package/dist/{AddBlocks-6f4db22d.js → AddBlocks-c47af38f.js} +49 -45
  3. package/dist/BrandingOptions-4f3e3a8d.cjs +1 -0
  4. package/dist/{BrandingOptions-d6351932.js → BrandingOptions-52b2de6f.js} +11 -7
  5. package/dist/CanvasArea-90a395c1.js +1311 -0
  6. package/dist/CanvasArea-aef3fa5e.cjs +46 -0
  7. package/dist/{CurrentPage-e8f8ff05.js → CurrentPage-2721bc7b.js} +18 -14
  8. package/dist/CurrentPage-d1ec06db.cjs +1 -0
  9. package/dist/{ImagesPanel-68a11293.cjs → ImagesPanel-0db5c72f.cjs} +1 -1
  10. package/dist/{ImagesPanel-996761b1.js → ImagesPanel-38c44785.js} +1 -1
  11. package/dist/{Layers-6fc21e86.js → Layers-a9cf4d7c.js} +144 -142
  12. package/dist/Layers-d0edf1a8.cjs +1 -0
  13. package/dist/{MarkAsGlobalBlock-cf7e8b31.js → MarkAsGlobalBlock-0cf6e5a2.js} +15 -11
  14. package/dist/MarkAsGlobalBlock-c43c3b2c.cjs +1 -0
  15. package/dist/PagesPanel-22050a98.cjs +1 -0
  16. package/dist/{PagesPanel-7db807df.js → PagesPanel-589544c2.js} +12 -8
  17. package/dist/ProjectPanel-215ba7f1.cjs +1 -0
  18. package/dist/{ProjectPanel-a7c78e1f.js → ProjectPanel-dbea8af1.js} +12 -8
  19. package/dist/Settings-71c0312b.cjs +1 -0
  20. package/dist/{Settings-1e6e0534.js → Settings-c347533e.js} +909 -640
  21. package/dist/SidePanels-214fef72.js +2999 -0
  22. package/dist/SidePanels-3844d8b5.cjs +13 -0
  23. package/dist/{Topbar-4f1aca98.js → Topbar-1dd5c34e.js} +23 -19
  24. package/dist/Topbar-4fa3ab61.cjs +1 -0
  25. package/dist/{UnsplashImages-f761ad96.cjs → UnsplashImages-0d091e33.cjs} +1 -1
  26. package/dist/{UnsplashImages-47374e0c.js → UnsplashImages-10c95b63.js} +1 -1
  27. package/dist/{UploadImages-33c1507a.cjs → UploadImages-10439fde.cjs} +1 -1
  28. package/dist/{UploadImages-f0ba3215.js → UploadImages-b14bd152.js} +1 -1
  29. package/dist/_commonjsHelpers-10dfc225.js +8 -0
  30. package/dist/_commonjsHelpers-87b0abe8.cjs +1 -0
  31. package/dist/add-page-modal-05c947fb.cjs +1 -0
  32. package/dist/{add-page-modal-d4f5ba20.js → add-page-modal-5cc1393d.js} +14 -11
  33. package/dist/card-14e1d020.cjs +1 -0
  34. package/dist/card-f8f4f985.js +33 -0
  35. package/dist/core.cjs +1 -1
  36. package/dist/core.d.ts +6 -4
  37. package/dist/core.js +63 -59
  38. package/dist/delete-page-modal-859c3a09.cjs +1 -0
  39. package/dist/{delete-page-modal-00d5fbab.js → delete-page-modal-a79bfc45.js} +15 -11
  40. package/dist/{form-bf09d392.js → form-725e3191.js} +3 -3
  41. package/dist/{form-5d04c9b3.cjs → form-99b51245.cjs} +1 -1
  42. package/dist/index-dfeadcce.cjs +164 -0
  43. package/dist/index-f8a2f8ef.js +31068 -0
  44. package/dist/{link-6467eda6.js → link-2af5de8b.js} +1 -1
  45. package/dist/{link-4585b2d6.cjs → link-86ac8848.cjs} +1 -1
  46. package/dist/page-viewer-aac7b439.cjs +1 -0
  47. package/dist/{page-viewer-c494031b.js → page-viewer-c6421156.js} +22 -18
  48. package/dist/project-general-setting-ce814ecf.cjs +1 -0
  49. package/dist/{project-general-setting-fca12629.js → project-general-setting-f9fd21cc.js} +9 -7
  50. package/dist/{project-seo-setting-3f645a02.cjs → project-seo-setting-a9403f1d.cjs} +1 -1
  51. package/dist/{project-seo-setting-e9587467.js → project-seo-setting-c1980ec3.js} +3 -3
  52. package/dist/render.cjs +1 -1
  53. package/dist/render.js +1 -1
  54. package/dist/{scroll-area-9f64a082.js → scroll-area-83bd9e8f.js} +7 -7
  55. package/dist/{scroll-area-088530b9.cjs → scroll-area-bb343b86.cjs} +1 -1
  56. package/dist/{single-page-detail-ff7fceb1.js → single-page-detail-2ac00c2e.js} +32 -30
  57. package/dist/single-page-detail-dcbb3cab.cjs +1 -0
  58. package/dist/style.css +1 -1
  59. package/dist/textarea-20b2f6b2.cjs +1 -0
  60. package/dist/textarea-9dfb6a32.js +45 -0
  61. package/dist/ui.cjs +1 -1
  62. package/dist/ui.js +74 -73
  63. package/dist/useChaiExternalData-192c7896.js +5 -0
  64. package/dist/useChaiExternalData-a90e8aac.cjs +1 -0
  65. package/package.json +5 -3
  66. package/dist/AddBlocks-59a68fc9.cjs +0 -3
  67. package/dist/BrandingOptions-8e7a159f.cjs +0 -1
  68. package/dist/CanvasArea-08537c6e.cjs +0 -60
  69. package/dist/CanvasArea-a585620d.js +0 -1459
  70. package/dist/CurrentPage-cbbfdbf4.cjs +0 -1
  71. package/dist/Layers-636e0bc6.cjs +0 -1
  72. package/dist/MarkAsGlobalBlock-23dd24b9.cjs +0 -1
  73. package/dist/PagesPanel-bf13d0a5.cjs +0 -1
  74. package/dist/ProjectPanel-d98d3585.cjs +0 -1
  75. package/dist/Settings-1b76c006.cjs +0 -1
  76. package/dist/SidePanels-55124e18.cjs +0 -1
  77. package/dist/SidePanels-af4f2c45.js +0 -149
  78. package/dist/Topbar-5df341d7.cjs +0 -1
  79. package/dist/_commonjsHelpers-5a53b418.cjs +0 -1
  80. package/dist/_commonjsHelpers-d4512b9c.js +0 -6
  81. package/dist/add-page-modal-b685709e.cjs +0 -1
  82. package/dist/delete-page-modal-bbd3ffa2.cjs +0 -1
  83. package/dist/index-8a7a37ce.js +0 -5028
  84. package/dist/index-bf44bc93.cjs +0 -2
  85. package/dist/page-viewer-f0a54a92.cjs +0 -1
  86. package/dist/project-general-setting-a3e99d1e.cjs +0 -1
  87. package/dist/single-page-detail-84c67e67.cjs +0 -1
  88. package/dist/textarea-0750bcd2.js +0 -73
  89. package/dist/textarea-a338ede6.cjs +0 -1
@@ -1,31 +1,37 @@
1
1
  import { j as e } from "./jsx-runtime-944c88e2.js";
2
- import * as le from "react";
3
- import L, { useState as S, createContext as Ne, useMemo as H, useContext as Q, useCallback as I, useEffect as J } from "react";
4
- import { useThrottledCallback as de } from "@react-hookz/web";
5
- import { get as c, includes as P, first as Se, reject as qe, isEmpty as w, map as V, nth as he, startCase as Re, toLower as Te, startsWith as X, isNumber as Je, parseInt as Qe, isNaN as Ve, findLast as et, has as ne, flatten as Y, intersection as He, forEach as tt, set as rt, last as me, filter as lt, isNull as ot } from "lodash";
6
- import { useTranslation as Be } from "react-i18next";
7
- import { PlusIcon as pe, Cross2Icon as Ae, EyeOpenIcon as st, EyeClosedIcon as be, BorderAllIcon as M, WidthIcon as k, HeightIcon as N, ArrowUpIcon as U, ArrowRightIcon as G, ArrowDownIcon as K, ArrowLeftIcon as q, ArrowTopLeftIcon as at, ArrowTopRightIcon as nt, ArrowBottomRightIcon as it, ArrowBottomLeftIcon as dt, AlignLeftIcon as ct, AlignCenterHorizontallyIcon as pt, AlignRightIcon as ut, StretchHorizontallyIcon as gt, FontItalicIcon as xt, UnderlineIcon as yt, OverlineIcon as ht, LetterCaseUppercaseIcon as mt, Cross1Icon as bt, InfoCircledIcon as ue, MinusIcon as ft, BoxIcon as $e, TriangleDownIcon as vt, RowSpacingIcon as wt, TrashIcon as Le, MixerHorizontalIcon as Ie } from "@radix-ui/react-icons";
8
- import { T as Ct, a as jt, b as fe, c as ve } from "./tabs-85caa1e8.js";
9
- import kt from "@rjsf/core";
10
- import Nt from "@rjsf/validator-ajv8";
11
- import { A as oe, c as De, C as Me, D as St, F as Rt, G as Tt, i as ge, H as Oe, I as Ee, h as Pe, d as Vt, J as Fe, e as we, K as se, u as Ht, L as Bt, M as At } from "./index-8a7a37ce.js";
12
- import { getBlockComponent as $t } from "@chaibuilder/blocks";
13
- import { R as Lt, I as It, a as Dt, L as Mt } from "./link-6467eda6.js";
14
- import { useAtom as Ot } from "jotai";
15
- import Et from "react-autosuggest";
16
- import Pt from "fuse.js";
17
- import { A as Ft, C as ae, d as Xt } from "./html-to-json-8397fab5.js";
18
- import { B as Xe, d as W, e as Z, f as _, g as Yt } from "./useBuilderProp-81a14920.js";
19
- import { L as xe } from "./label-e770a087.js";
20
- import { S as Wt } from "./MODIFIERS-c2e02614.js";
21
- import { I as Zt } from "./input-a0ea2bc7.js";
22
- import { a as Ye, b as We, c as Ze, A as _t } from "./accordion-c0176dc5.js";
23
- import { S as zt } from "./scroll-area-9f64a082.js";
24
- import { S as Ut, c as Gt, b as Kt, d as qt, f as R } from "./select-7fddd7c3.js";
2
+ import * as se from "react";
3
+ import $, { useState as k, useEffect as M, useMemo as T, useCallback as I, createContext as Le, useContext as ee } from "react";
4
+ import { useThrottledCallback as xe } from "@react-hookz/web";
5
+ import { map as C, isEmpty as b, last as he, forEach as fe, set as Pe, startCase as Q, filter as Oe, get as g, isArray as me, omit as at, includes as O, toLower as ne, first as be, split as Ne, truncate as it, keys as dt, cloneDeep as ct, each as pt, capitalize as ut, reject as gt, nth as Se, startsWith as Z, isNumber as xt, parseInt as ht, isNaN as Me, findLast as mt, has as ue, flatten as z, intersection as _e, isNull as yt } from "lodash";
6
+ import { useTranslation as Ee } from "react-i18next";
7
+ import { PlusIcon as ve, Cross2Icon as Fe, EyeOpenIcon as ft, EyeClosedIcon as Te, BorderAllIcon as _, WidthIcon as V, HeightIcon as H, ArrowUpIcon as G, ArrowRightIcon as K, ArrowDownIcon as q, ArrowLeftIcon as J, ArrowTopLeftIcon as bt, ArrowTopRightIcon as vt, ArrowBottomRightIcon as wt, ArrowBottomLeftIcon as jt, AlignLeftIcon as Ct, AlignCenterHorizontallyIcon as kt, AlignRightIcon as Nt, StretchHorizontallyIcon as St, FontItalicIcon as Tt, UnderlineIcon as Rt, OverlineIcon as Vt, LetterCaseUppercaseIcon as Ht, Cross1Icon as Bt, InfoCircledIcon as we, MinusIcon as At, BoxIcon as Xe, TriangleDownIcon as Dt, RowSpacingIcon as $t, TrashIcon as Ye, MixerHorizontalIcon as We } from "@radix-ui/react-icons";
8
+ import { T as It, a as Lt, b as Re, c as Ve } from "./tabs-85caa1e8.js";
9
+ import Pt from "@rjsf/core";
10
+ import Ot from "@rjsf/validator-ajv8";
11
+ import { D as te, d as Ze, G as ze, H as Mt, I as _t, J as Et, j as je, K as Ue, L as Ge, i as Ke, e as Ft, M as qe, f as He, N as ce, c as Xt, O as Yt, P as Wt } from "./index-f8a2f8ef.js";
12
+ import { getBlockComponent as Je, SingleLineText as Zt } from "@chaibuilder/blocks";
13
+ import { TrashIcon as zt, ChevronRight as Ut } from "lucide-react";
14
+ import Qe from "react-autosuggest";
15
+ import { u as Gt } from "./useChaiExternalData-192c7896.js";
16
+ import { d as X, e as Y, f as W, B as et, g as Kt } from "./useBuilderProp-81a14920.js";
17
+ import { A as tt, a as ae, b as ie, c as de } from "./accordion-c0176dc5.js";
18
+ import { R as qt, I as Jt, a as Qt, L as er } from "./link-2af5de8b.js";
19
+ import { useAtom as tr } from "jotai";
20
+ import rr from "fuse.js";
21
+ import { A as lr, C as pe, d as or } from "./html-to-json-8397fab5.js";
22
+ import { L as Ce } from "./label-e770a087.js";
23
+ import { S as sr } from "./MODIFIERS-c2e02614.js";
24
+ import { I as nr } from "./input-a0ea2bc7.js";
25
+ import { S as ar } from "./scroll-area-83bd9e8f.js";
26
+ import { S as ir, c as dr, b as cr, d as pr, f as A } from "./select-7fddd7c3.js";
25
27
  import "@radix-ui/react-tabs";
26
28
  import "./utils-ac68b2c8.js";
27
29
  import "clsx";
28
30
  import "tailwind-merge";
31
+ import "./_commonjsHelpers-10dfc225.js";
32
+ import "@radix-ui/react-scroll-area";
33
+ import "react-dom";
34
+ import "@floating-ui/react-dom";
29
35
  import "i18next";
30
36
  import "flagged";
31
37
  import "react-dnd";
@@ -33,131 +39,402 @@ import "@minoru/react-dnd-treeview";
33
39
  import "react-hotkeys-hook";
34
40
  import "flat-to-nested";
35
41
  import "redux-undo";
36
- import "lucide-react";
37
42
  import "sonner";
43
+ import "@radix-ui/react-slot";
44
+ import "class-variance-authority";
45
+ import "@radix-ui/react-tooltip";
46
+ import "@radix-ui/react-toast";
47
+ import "@radix-ui/react-accordion";
38
48
  import "react-icons-picker";
39
- import "react-dom";
40
49
  import "./dialog-3d4e82ed.js";
41
50
  import "@radix-ui/react-dialog";
42
- import "./ImagesPanel-996761b1.js";
51
+ import "./ImagesPanel-38c44785.js";
43
52
  import "react-quill";
44
53
  import "himalaya";
45
- import "@radix-ui/react-slot";
46
- import "class-variance-authority";
47
- import "@radix-ui/react-tooltip";
48
- import "@radix-ui/react-toast";
49
54
  import "@radix-ui/react-label";
50
- import "@radix-ui/react-accordion";
51
- import "@radix-ui/react-scroll-area";
52
55
  import "@radix-ui/react-select";
53
- function Jt() {
54
- const r = oe(), { createSnapshot: o } = De(), t = Me(), [l] = St(), s = $t(r._type), n = c(s, "props", {}), d = {
55
- type: "object",
56
- properties: {
57
- _name: {
58
- title: "Name",
59
- type: "string",
60
- default: c(r, "_name", r._type)
56
+ function ur(r) {
57
+ const s = [], t = {};
58
+ function n(l, a) {
59
+ fe(a, (d, i) => {
60
+ const o = l ? `${l}.${i}` : i, p = me(d) ? "list" : typeof d;
61
+ s.push(o), t[o] = p === "string" ? "text" : p === "object" ? "model" : p, p === "object" && !me(d) && n(o, d);
62
+ });
63
+ }
64
+ return n("", at(r, ["styles", "_type", "_id", "_name", "_bindings"])), { paths: s, pathsType: t };
65
+ }
66
+ const gr = ({ data: r }) => {
67
+ if (!r)
68
+ return null;
69
+ const s = typeof r;
70
+ return /* @__PURE__ */ e.jsx("div", { className: "text-[10px] text-gray-800/50 leading-3 whitespace-nowrap overflow-hidden w-full", children: it(s === "object" ? JSON.stringify(r) : r, { length: 40 }) });
71
+ }, Be = ({
72
+ type: r,
73
+ isDisabled: s = !1,
74
+ placeholder: t,
75
+ defaultValue: n = "",
76
+ data: l,
77
+ onChange: a,
78
+ dataType: d,
79
+ appliedBindings: i
80
+ }) => {
81
+ const [o, p] = k(n), { paths: u, pathsType: c } = ur(l), m = r === "PROP" ? Je(l == null ? void 0 : l._type) : {};
82
+ M(() => {
83
+ b(o) && a("");
84
+ }, [o]), M(() => p(n), [n]);
85
+ const x = () => u.filter((f) => {
86
+ const j = b(o) || O(ne(f), ne(o));
87
+ return r === "PATH" ? j && d === g(c, f, "") : j && !O(i, f) && g(m, `props.${be(Ne(f, "."))}.binding`);
88
+ }), [y, v] = k(() => x());
89
+ M(() => v(() => x()), [d]);
90
+ const L = {
91
+ autoComplete: "off",
92
+ autoCorrect: "on",
93
+ autoCapitalize: "off",
94
+ spellCheck: !1,
95
+ placeholder: t,
96
+ value: o,
97
+ disabled: s,
98
+ onBlur: () => {
99
+ u.includes(o) ? a(o) : (p(""), a(""));
100
+ },
101
+ onChange: (f, { newValue: j }) => p(j),
102
+ className: `chai-input w-full ${s ? "cursor-not-allowed" : ""}`
103
+ }, R = (f) => /* @__PURE__ */ e.jsxs(
104
+ "div",
105
+ {
106
+ className: "rounded-md px-1 py-1.5 flex items-center justify-between space-x-2 font-light relative",
107
+ "data-suggest": f,
108
+ children: [
109
+ /* @__PURE__ */ e.jsx("div", { className: "-mt-1 w-full h-full absolute opacity-0 z-20", children: f }),
110
+ /* @__PURE__ */ e.jsxs("div", { className: "w-full", children: [
111
+ /* @__PURE__ */ e.jsx("div", { className: "leading-4 text-xs flex items-center text-gray-800", children: $.Children.toArray(
112
+ C(Ne(f, "."), (j, B) => /* @__PURE__ */ e.jsxs("span", { className: "flex items-end", children: [
113
+ B > 0 && /* @__PURE__ */ e.jsx(Ut, { size: 14, className: "h-full text-gray-400" }),
114
+ Q(j)
115
+ ] }))
116
+ ) }),
117
+ r === "PATH" && /* @__PURE__ */ e.jsx(gr, { data: g(l, f) })
118
+ ] }),
119
+ r === "PROP" && /* @__PURE__ */ e.jsx("div", { className: "bg-purple-100 text-purple-400 text-[9px] flex items-center font-medium h-4 px-2 rounded-full", children: Q(g(c, f, "")) })
120
+ ]
121
+ }
122
+ );
123
+ return /* @__PURE__ */ e.jsx(
124
+ Qe,
125
+ {
126
+ suggestions: y,
127
+ onSuggestionsFetchRequested: () => v(() => x()),
128
+ onSuggestionsClearRequested: () => v([]),
129
+ onSuggestionSelected: (f) => {
130
+ if (f.type === "click") {
131
+ const j = g(f.target, "childNodes[0].data", "");
132
+ u.includes(j) && a(j);
133
+ } else
134
+ a(f.target.value);
135
+ },
136
+ getSuggestionValue: (f) => f,
137
+ renderSuggestion: R,
138
+ shouldRenderSuggestions: () => !0,
139
+ inputProps: L,
140
+ containerProps: { className: "w-full" },
141
+ theme: {
142
+ suggestion: "text-gray-500 border-b overflow-hidden text-ellipsis",
143
+ suggestionHighlighted: "bg-blue-100 text-blue-800 font-normal cursor-pointer",
144
+ suggestionsContainerOpen: "bg-white border border-gray-300 z-50 max-h-52 left-2 overflow-y-auto w-full rounded-md shadow-2xl text-sm font-light w-full"
61
145
  }
62
146
  }
63
- }, i = {};
64
- Object.keys(n).forEach((u) => {
65
- const m = n[u];
66
- if (P(["slot", "styles"], m.type))
67
- return;
68
- const h = c(m, "i18n", !1) ? `${u}-${l}` : u;
69
- d.properties[h] = Rt(m, l), i[h] = Tt(m, l);
70
- });
71
- const a = { ...r }, x = ({ formData: u }, m) => {
72
- if (m) {
73
- const h = m.replace("root.", "");
74
- t([r._id], { [h]: c(u, h) });
147
+ );
148
+ }, xr = ({
149
+ item: r,
150
+ onChange: s,
151
+ onRemove: t,
152
+ selectedBlock: n,
153
+ dataProvider: l,
154
+ appliedBindings: a
155
+ }) => {
156
+ const [d, i] = k("string"), o = (p, u) => {
157
+ if (b(p))
158
+ return "";
159
+ {
160
+ const c = g(u === "PROP" ? n : l, p, "");
161
+ if (me(c))
162
+ return "list";
163
+ const m = typeof c;
164
+ return m === "string" ? "text" : m === "object" ? "model" : m;
75
165
  }
76
- }, g = () => {
77
- o();
78
166
  };
79
- return /* @__PURE__ */ e.jsxs("div", { children: [
167
+ return M(() => i(() => o(r.key, "PROP")), [r.key]), /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1 border border-gray-200 relative rounded-md p-2", children: [
168
+ !b(d) && !b(r.key) && /* @__PURE__ */ e.jsx("div", { className: "mt-px absolute right-2 top-4 text-purple-600 text-[10px] flex items-center font-medium h-4 px-2 rounded-full", children: Q(d) }),
80
169
  /* @__PURE__ */ e.jsx(
81
- kt,
170
+ Be,
82
171
  {
83
- widgets: {
84
- richtext: Lt,
85
- icon: It,
86
- image: Dt
87
- },
88
- fields: {
89
- link: Mt
172
+ type: "PROP",
173
+ isDisabled: !1,
174
+ placeholder: "Enter prop key",
175
+ defaultValue: r.key,
176
+ onChange: (p) => {
177
+ const u = o(p, "PROP");
178
+ s({ target: { name: "key", value: p } }), d !== u && s({ target: { name: "value", value: "" } }), i(u);
90
179
  },
91
- idSeparator: ".",
92
- autoComplete: "off",
93
- omitExtraData: !1,
94
- liveOmit: !1,
95
- liveValidate: !0,
96
- uiSchema: i,
97
- onBlur: g,
98
- schema: d,
99
- formData: a,
100
- validator: Nt,
101
- onChange: x
180
+ data: n,
181
+ dataType: d,
182
+ appliedBindings: a
183
+ }
184
+ ),
185
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-start justify-between gap-x-1.5 w-full relative", children: [
186
+ /* @__PURE__ */ e.jsx(
187
+ Be,
188
+ {
189
+ type: "PATH",
190
+ isDisabled: b(r.key),
191
+ placeholder: "Enter data path",
192
+ defaultValue: r.value,
193
+ onChange: (p) => {
194
+ const u = o(p, "PATH");
195
+ s(d !== u ? { target: { name: "value", value: "" } } : { target: { name: "value", value: p } });
196
+ },
197
+ data: l,
198
+ dataType: d,
199
+ appliedBindings: a
200
+ }
201
+ ),
202
+ /* @__PURE__ */ e.jsx(
203
+ zt,
204
+ {
205
+ onClick: t,
206
+ 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"
207
+ }
208
+ )
209
+ ] })
210
+ ] });
211
+ }, hr = ({ bindingData: r, onChange: s }) => {
212
+ const t = te(), [n] = Gt(), [l, a] = k(C(r, (c, m) => ({ key: m, value: c })));
213
+ M(() => {
214
+ a(C(r, (c, m) => ({ key: m, value: c })));
215
+ }, [t == null ? void 0 : t._id]);
216
+ const d = T(() => {
217
+ if (b(l))
218
+ return !1;
219
+ const c = he(l);
220
+ return b(c == null ? void 0 : c.key) || b(c == null ? void 0 : c.value);
221
+ }, [l]), i = () => {
222
+ a([...l, { key: "", value: "" }]);
223
+ }, o = (c) => {
224
+ const m = Oe(l, (x, y) => c !== y);
225
+ u([...m]);
226
+ }, p = (c, m) => {
227
+ const x = [...l];
228
+ x[m][c.target.name] = c.target.value, u(x);
229
+ }, u = I(
230
+ (c = []) => {
231
+ if (a(c), b(c)) {
232
+ s({});
233
+ return;
234
+ }
235
+ const m = {};
236
+ fe(c, (x) => {
237
+ !b(x == null ? void 0 : x.key) && !b(x == null ? void 0 : x.value) && Pe(m, x.key, x.value);
238
+ }), s(m);
239
+ },
240
+ [t]
241
+ );
242
+ return b(n) ? /* @__PURE__ */ e.jsx("div", { className: "w-full flex items-center justify-center", children: /* @__PURE__ */ e.jsx("div", { className: "text-xs text-gray-400", children: "No data provider selected." }) }) : /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
243
+ C(l, (c, m) => /* @__PURE__ */ e.jsx(
244
+ xr,
245
+ {
246
+ item: c,
247
+ onChange: (x) => p(x, m),
248
+ onRemove: () => o(m),
249
+ selectedBlock: t,
250
+ dataProvider: n,
251
+ appliedBindings: C(l, "key")
252
+ },
253
+ c.key
254
+ )),
255
+ /* @__PURE__ */ e.jsxs(X, { delayDuration: 200, children: [
256
+ /* @__PURE__ */ e.jsx(Y, { className: "w-full", children: /* @__PURE__ */ e.jsx(
257
+ "button",
258
+ {
259
+ onClick: i,
260
+ disabled: d,
261
+ className: `w-full px-5 py-1.5 text-xs rounded-md font-medium duration-200 ${b(l) ? "bg-blue-700/20 text-blue-800 hover:bg-blue-700/30 " : ""} ${d ? "cursor-not-allowed bg-gray-200 text-gray-400" : b(l) ? "" : "bg-gray-700/20 text-gray-800 hover:bg-blue-700/30"}`,
262
+ children: "+ Add Data Binding"
263
+ }
264
+ ) }),
265
+ d && /* @__PURE__ */ e.jsx(W, { sideOffset: 10, className: "text-[11px]", children: "Complete last added data binding to add more" })
266
+ ] })
267
+ ] });
268
+ }, mr = hr, yr = () => /* @__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" }), Ae = ({
269
+ createHistorySnapshot: r,
270
+ properties: s,
271
+ formData: t,
272
+ onChange: n
273
+ }) => {
274
+ const [l] = Mt(), a = { type: "object", properties: {} }, d = {};
275
+ return Object.keys(s).forEach((i) => {
276
+ const o = s[i];
277
+ if (O(["slot", "styles"], o.type))
278
+ return;
279
+ const p = g(o, "i18n", !1) ? `${i}-${l}` : i;
280
+ a.properties[p] = _t(o, l), d[p] = Et(o, l);
281
+ }), /* @__PURE__ */ e.jsx(
282
+ Pt,
283
+ {
284
+ widgets: {
285
+ binding: yr,
286
+ richtext: qt,
287
+ icon: Jt,
288
+ image: Qt
289
+ },
290
+ fields: {
291
+ link: er
292
+ },
293
+ idSeparator: ".",
294
+ autoComplete: "off",
295
+ omitExtraData: !1,
296
+ liveOmit: !1,
297
+ liveValidate: !0,
298
+ validator: Ot,
299
+ uiSchema: d,
300
+ onBlur: r,
301
+ schema: a,
302
+ formData: t,
303
+ onChange: n
304
+ }
305
+ );
306
+ };
307
+ function fr() {
308
+ const r = te(), { createSnapshot: s } = Ze(), t = ze(), n = Je(r._type), l = { ...r }, a = () => s(), d = ({ formData: u }, c) => {
309
+ if (c) {
310
+ const m = c.replace("root.", "");
311
+ t([r._id], { [m]: g(u, m) });
312
+ }
313
+ }, i = {
314
+ _name: Zt({
315
+ title: "Name",
316
+ default: g(r, "_name", r._type)
317
+ })
318
+ }, o = dt(g(l, "_bindings", {})), p = T(() => {
319
+ const u = ct(g(n, "props", {}));
320
+ return pt(o, (c) => {
321
+ delete u[c];
322
+ }), u;
323
+ }, [n, o]);
324
+ return /* @__PURE__ */ e.jsxs("div", { className: "overflow-x-hidden", children: [
325
+ /* @__PURE__ */ e.jsx(
326
+ Ae,
327
+ {
328
+ onChange: d,
329
+ createHistorySnapshot: a,
330
+ formData: l,
331
+ properties: i
102
332
  }
103
333
  ),
334
+ /* @__PURE__ */ e.jsx("hr", { className: "mt-4" }),
335
+ /* @__PURE__ */ e.jsxs(tt, { type: "multiple", defaultValue: ["STATIC", "BINDING"], className: "h-full w-full", children: [
336
+ /* @__PURE__ */ e.jsxs(ae, { value: "BINDING", children: [
337
+ /* @__PURE__ */ e.jsx(ie, { className: "px-3 py-2 text-xs hover:no-underline bg-gray-100 ml-1", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
338
+ /* @__PURE__ */ e.jsx(
339
+ "div",
340
+ {
341
+ className: `h-[8px] w-[8px] rounded-full ${b(g(r, "_bindings", {})) ? "bg-gray-300" : "bg-blue-500"}`
342
+ }
343
+ ),
344
+ "Data Binding"
345
+ ] }) }),
346
+ /* @__PURE__ */ e.jsx(de, { className: "pt-4 px-4", children: /* @__PURE__ */ e.jsx(
347
+ mr,
348
+ {
349
+ bindingData: g(l, "_bindings", {}),
350
+ onChange: (u) => {
351
+ d({ formData: { ...l, _bindings: u } }, "root._bindings");
352
+ }
353
+ }
354
+ ) })
355
+ ] }),
356
+ /* @__PURE__ */ e.jsxs(ae, { value: "STATIC", children: [
357
+ /* @__PURE__ */ e.jsx(ie, { className: "px-3 py-2 text-xs hover:no-underline bg-gray-100 ml-1", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
358
+ /* @__PURE__ */ e.jsx("div", { className: "h-[8px] w-[8px] rounded-full bg-blue-500" }),
359
+ "Static Content"
360
+ ] }) }),
361
+ /* @__PURE__ */ e.jsxs(de, { className: "pt-4", children: [
362
+ b(o) ? "" : /* @__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: [
363
+ "Data binding is set for ",
364
+ /* @__PURE__ */ e.jsx("b", { children: C(o, ut).join(", ") }),
365
+ " ",
366
+ o.length === 1 ? "property" : "properties",
367
+ ". Remove data binding to edit static content."
368
+ ] }),
369
+ /* @__PURE__ */ e.jsx(
370
+ Ae,
371
+ {
372
+ onChange: d,
373
+ createHistorySnapshot: a,
374
+ formData: l,
375
+ properties: p
376
+ }
377
+ )
378
+ ] })
379
+ ] })
380
+ ] }),
104
381
  /* @__PURE__ */ e.jsx("div", { className: "pb-60" })
105
382
  ] });
106
383
  }
107
- const Ce = new Pt(Ft, {
384
+ const De = new rr(lr, {
108
385
  isCaseSensitive: !1,
109
386
  threshold: 0.2,
110
387
  minMatchCharLength: 2,
111
388
  keys: ["name"]
112
389
  });
113
- function Qt() {
114
- var B;
115
- const [r] = ge(), o = oe(), t = Oe(), l = Ee(), [s] = Pe(), [n, d] = S(""), i = (B = Se(r)) == null ? void 0 : B.prop, a = qe((c(o, i, "").replace(Wt, "").split(",").pop() || "").split(" "), w), x = () => {
116
- const v = n.trim().toLowerCase().replace(/ +(?= )/g, "").split(" ");
117
- t(s, v, !0), d("");
118
- }, [g, u] = S([]), m = ({ value: v }) => {
119
- const D = v.trim().toLowerCase(), A = D.match(/.+:/g);
120
- let C = [];
121
- if (A && A.length > 0) {
122
- const [$] = A, F = D.replace($, "");
123
- C = Ce.search(F).map((p) => ({
124
- ...p,
125
- item: { ...p.item, name: $ + p.item.name }
390
+ function br() {
391
+ var R;
392
+ const [r] = je(), s = te(), t = Ue(), n = Ge(), [l] = Ke(), [a, d] = k(""), i = (R = be(r)) == null ? void 0 : R.prop, o = gt((g(s, i, "").replace(sr, "").split(",").pop() || "").split(" "), b), p = () => {
393
+ const f = a.trim().toLowerCase().replace(/ +(?= )/g, "").split(" ");
394
+ t(l, f, !0), d("");
395
+ }, [u, c] = k([]), m = ({ value: f }) => {
396
+ const j = f.trim().toLowerCase(), B = j.match(/.+:/g);
397
+ let N = [];
398
+ if (B && B.length > 0) {
399
+ const [P] = B, F = j.replace(P, "");
400
+ N = De.search(F).map((h) => ({
401
+ ...h,
402
+ item: { ...h.item, name: P + h.item.name }
126
403
  }));
127
404
  } else
128
- C = Ce.search(D);
129
- u(V(C, "item"));
130
- }, h = () => {
131
- u([]);
132
- }, y = (v) => v.name, f = (v) => /* @__PURE__ */ e.jsx("div", { className: "rounded-md p-1", children: v.name }), O = {
405
+ N = De.search(j);
406
+ c(C(N, "item"));
407
+ }, x = () => {
408
+ c([]);
409
+ }, y = (f) => f.name, v = (f) => /* @__PURE__ */ e.jsx("div", { className: "rounded-md p-1", children: f.name }), L = {
133
410
  autoComplete: "off",
134
411
  autoCorrect: "off",
135
412
  autoCapitalize: "off",
136
413
  spellCheck: !1,
137
414
  placeholder: "Enter class name",
138
- value: n,
139
- onKeyDown: (v) => {
140
- v.key === "Enter" && n.trim() !== "" && x();
415
+ value: a,
416
+ onKeyDown: (f) => {
417
+ f.key === "Enter" && a.trim() !== "" && p();
141
418
  },
142
- onChange: (v, { newValue: D }) => d(D),
419
+ onChange: (f, { newValue: j }) => d(j),
143
420
  className: "w-full rounded-md text-xs px-2 hover:outline-0 bg-background border-border py-1"
144
421
  };
145
422
  return /* @__PURE__ */ e.jsxs(
146
423
  "div",
147
424
  {
148
- className: `no-scrollbar flex ${g.length > 0 ? "min-h-[300px]" : "min-h-max"} w-full flex-col gap-y-5 overflow-y-auto bg-gray-100 px-px`,
425
+ className: `no-scrollbar flex ${u.length > 0 ? "min-h-[300px]" : "min-h-max"} w-full flex-col gap-y-5 overflow-y-auto bg-gray-100 px-px`,
149
426
  children: [
150
- /* @__PURE__ */ e.jsx(xe, { className: "mt-2", children: "Add Tailwind classes" }),
427
+ /* @__PURE__ */ e.jsx(Ce, { className: "mt-2", children: "Add Tailwind classes" }),
151
428
  /* @__PURE__ */ e.jsxs("div", { className: "relative -mt-4 flex items-center gap-x-3", children: [
152
429
  /* @__PURE__ */ e.jsx("div", { className: "relative flex w-full items-center gap-x-3", children: /* @__PURE__ */ e.jsx(
153
- Et,
430
+ Qe,
154
431
  {
155
- suggestions: g,
432
+ suggestions: u,
156
433
  onSuggestionsFetchRequested: m,
157
- onSuggestionsClearRequested: h,
434
+ onSuggestionsClearRequested: x,
158
435
  getSuggestionValue: y,
159
- renderSuggestion: f,
160
- inputProps: O,
436
+ renderSuggestion: v,
437
+ inputProps: L,
161
438
  containerProps: {
162
439
  className: "relative h-8 w-full gap-y-1 py-1 border-gray-600"
163
440
  },
@@ -169,36 +446,36 @@ function Qt() {
169
446
  }
170
447
  ) }),
171
448
  /* @__PURE__ */ e.jsx(
172
- Xe,
449
+ et,
173
450
  {
174
451
  variant: "outline",
175
452
  className: "h-6 border-gray-700",
176
- onClick: x,
177
- disabled: n.trim() === "",
453
+ onClick: p,
454
+ disabled: a.trim() === "",
178
455
  size: "sm",
179
- children: /* @__PURE__ */ e.jsx(pe, {})
456
+ children: /* @__PURE__ */ e.jsx(ve, {})
180
457
  }
181
458
  )
182
459
  ] }),
183
460
  /* @__PURE__ */ e.jsxs("div", { className: "flex w-full flex-wrap gap-2", children: [
184
- w(a) && /* @__PURE__ */ e.jsx("div", { className: "flex h-10 w-full items-center justify-center text-center text-sm text-gray-400", children: "No class added" }),
185
- le.Children.toArray(
186
- a.map((v) => /* @__PURE__ */ e.jsxs(
461
+ b(o) && /* @__PURE__ */ e.jsx("div", { className: "flex h-10 w-full items-center justify-center text-center text-sm text-gray-400", children: "No class added" }),
462
+ se.Children.toArray(
463
+ o.map((f) => /* @__PURE__ */ e.jsxs(
187
464
  "div",
188
465
  {
189
466
  className: "group relative flex cursor-default items-center gap-x-1 rounded-full border border-blue-600 bg-blue-500 p-px px-1.5 text-[11px] text-white hover:border-blue-900",
190
467
  children: [
191
- v,
468
+ f,
192
469
  /* @__PURE__ */ e.jsx(
193
- Ae,
470
+ Fe,
194
471
  {
195
- onClick: () => l(s, [v]),
472
+ onClick: () => n(l, [f]),
196
473
  className: "invisible absolute right-1 hover:text-white group-hover:visible group-hover:cursor-pointer"
197
474
  }
198
475
  )
199
476
  ]
200
477
  },
201
- v
478
+ f
202
479
  ))
203
480
  )
204
481
  ] })
@@ -206,16 +483,16 @@ function Qt() {
206
483
  }
207
484
  );
208
485
  }
209
- const T = ["px", "%", "em", "rem", "ch", "vh", "vw"], er = {
486
+ const D = ["px", "%", "em", "rem", "ch", "vh", "vw"], vr = {
210
487
  heading: "Flex Child",
211
488
  items: [
212
- { type: "arbitrary", label: "Basis", units: T, property: "flexBasis" },
489
+ { type: "arbitrary", label: "Basis", units: D, property: "flexBasis" },
213
490
  { type: "range", label: "Order", property: "order" },
214
491
  { type: "dropdown", label: "Flex", property: "flexGrowShrink" },
215
492
  { type: "dropdown", label: "Grow", property: "flexGrow" },
216
493
  { type: "dropdown", label: "Shrink", property: "flexShrink" }
217
494
  ]
218
- }, tr = {
495
+ }, wr = {
219
496
  heading: "Grid Child",
220
497
  items: [
221
498
  { type: "range", label: "Col Span", property: "gridColSpan" },
@@ -226,11 +503,11 @@ const T = ["px", "%", "em", "rem", "ch", "vh", "vw"], er = {
226
503
  { type: "range", label: "Row End", property: "gridRowEnd" },
227
504
  { type: "range", label: "Order", property: "order" }
228
505
  ]
229
- }, rr = [
506
+ }, jr = [
230
507
  {
231
508
  heading: "Display",
232
509
  items: [
233
- { type: "dropdown", label: "Display", property: "display", units: T },
510
+ { type: "dropdown", label: "Display", property: "display", units: D },
234
511
  {
235
512
  styleType: "accordion",
236
513
  heading: "Flex options",
@@ -281,7 +558,7 @@ const T = ["px", "%", "em", "rem", "ch", "vh", "vw"], er = {
281
558
  styleType: "accordion",
282
559
  heading: "Visibility & Opacity",
283
560
  items: [
284
- { type: "dropdown", label: "Visibility", property: "visibility", units: T },
561
+ { type: "dropdown", label: "Visibility", property: "visibility", units: D },
285
562
  { type: "arbitrary", label: "Opacity", property: "opacity", units: ["-"] }
286
563
  ]
287
564
  }
@@ -294,7 +571,7 @@ const T = ["px", "%", "em", "rem", "ch", "vh", "vw"], er = {
294
571
  styleType: "multiple",
295
572
  label: "Margin",
296
573
  negative: !0,
297
- units: [...T, "auto"],
574
+ units: [...D, "auto"],
298
575
  options: [
299
576
  { key: "margin", label: "All" },
300
577
  { key: "marginX", label: "Left-Right" },
@@ -331,22 +608,22 @@ const T = ["px", "%", "em", "rem", "ch", "vh", "vw"], er = {
331
608
  {
332
609
  heading: "Size",
333
610
  items: [
334
- { type: "arbitrary", label: "Width", units: T.concat("auto"), property: "width" },
335
- { type: "arbitrary", label: "Height", units: T.concat("auto"), property: "height" },
611
+ { type: "arbitrary", label: "Width", units: D.concat("auto"), property: "width" },
612
+ { type: "arbitrary", label: "Height", units: D.concat("auto"), property: "height" },
336
613
  {
337
614
  styleType: "accordion",
338
615
  heading: "Min width & height",
339
616
  items: [
340
- { type: "arbitrary", label: "Min Width", units: T.concat("auto"), property: "minWidth" },
341
- { type: "arbitrary", label: "Min Height", units: T.concat("auto"), property: "minHeight" }
617
+ { type: "arbitrary", label: "Min Width", units: D.concat("auto"), property: "minWidth" },
618
+ { type: "arbitrary", label: "Min Height", units: D.concat("auto"), property: "minHeight" }
342
619
  ]
343
620
  },
344
621
  {
345
622
  styleType: "accordion",
346
623
  heading: "Max width & height",
347
624
  items: [
348
- { type: "arbitrary", label: "Max Width", units: T.concat("auto"), property: "maxWidth" },
349
- { type: "arbitrary", label: "Max Height", units: T.concat("auto"), property: "maxHeight" }
625
+ { type: "arbitrary", label: "Max Width", units: D.concat("auto"), property: "maxWidth" },
626
+ { type: "arbitrary", label: "Max Height", units: D.concat("auto"), property: "maxHeight" }
350
627
  ]
351
628
  },
352
629
  {
@@ -430,8 +707,8 @@ const T = ["px", "%", "em", "rem", "ch", "vh", "vw"], er = {
430
707
  heading: "Typography",
431
708
  items: [
432
709
  { type: "dropdown", property: "fontFamily", label: "Font" },
433
- { type: "arbitrary", property: "fontSize", label: "Size", units: T },
434
- { type: "arbitrary", property: "lineHeight", label: "Height", units: T.concat("-") },
710
+ { type: "arbitrary", property: "fontSize", label: "Size", units: D },
711
+ { type: "arbitrary", property: "lineHeight", label: "Height", units: D.concat("-") },
435
712
  { type: "range", property: "fontWeight", label: "Weight" },
436
713
  { type: "color", property: "textColor", label: "Color" },
437
714
  {
@@ -628,89 +905,89 @@ const T = ["px", "%", "em", "rem", "ch", "vh", "vw"], er = {
628
905
  },
629
906
  {
630
907
  heading: "Classes",
631
- items: [{ component: Qt }]
908
+ items: [{ component: br }]
632
909
  }
633
- ], _e = {
910
+ ], rt = {
634
911
  "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" }) }),
635
912
  // visibility
636
- visible: st,
637
- invisible: be,
913
+ visible: ft,
914
+ invisible: Te,
638
915
  // display
639
- hidden: be,
640
- gap: M,
641
- gapX: k,
642
- gapY: N,
643
- spaceX: k,
644
- spaceY: N,
645
- overscroll: M,
646
- overscrollX: k,
647
- overscrollY: N,
648
- overflow: M,
649
- overflowX: k,
650
- overflowY: N,
651
- top: U,
652
- right: G,
653
- bottom: K,
654
- left: q,
655
- inset: M,
656
- insetX: k,
657
- insetY: N,
658
- border: M,
659
- borderX: k,
660
- borderY: N,
661
- borderTop: U,
662
- borderRight: G,
663
- borderBottom: K,
664
- borderLeft: q,
665
- borderRadius: M,
666
- borderRadiusX: k,
667
- borderRadiusY: N,
668
- borderRadiusTop: U,
669
- borderRadiusRight: G,
670
- borderRadiusBottom: K,
671
- borderRadiusLeft: q,
672
- borderRadiusTopLeft: at,
673
- borderRadiusTopRight: nt,
674
- borderRadiusBottomRight: it,
675
- borderRadiusBottomLeft: dt,
676
- divideXWidth: k,
677
- divideYWidth: N,
678
- scale: M,
679
- scaleX: k,
680
- scaleY: N,
681
- skewX: k,
682
- skewY: N,
683
- translateX: k,
684
- translateY: N,
916
+ hidden: Te,
917
+ gap: _,
918
+ gapX: V,
919
+ gapY: H,
920
+ spaceX: V,
921
+ spaceY: H,
922
+ overscroll: _,
923
+ overscrollX: V,
924
+ overscrollY: H,
925
+ overflow: _,
926
+ overflowX: V,
927
+ overflowY: H,
928
+ top: G,
929
+ right: K,
930
+ bottom: q,
931
+ left: J,
932
+ inset: _,
933
+ insetX: V,
934
+ insetY: H,
935
+ border: _,
936
+ borderX: V,
937
+ borderY: H,
938
+ borderTop: G,
939
+ borderRight: K,
940
+ borderBottom: q,
941
+ borderLeft: J,
942
+ borderRadius: _,
943
+ borderRadiusX: V,
944
+ borderRadiusY: H,
945
+ borderRadiusTop: G,
946
+ borderRadiusRight: K,
947
+ borderRadiusBottom: q,
948
+ borderRadiusLeft: J,
949
+ borderRadiusTopLeft: bt,
950
+ borderRadiusTopRight: vt,
951
+ borderRadiusBottomRight: wt,
952
+ borderRadiusBottomLeft: jt,
953
+ divideXWidth: V,
954
+ divideYWidth: H,
955
+ scale: _,
956
+ scaleX: V,
957
+ scaleY: H,
958
+ skewX: V,
959
+ skewY: H,
960
+ translateX: V,
961
+ translateY: H,
685
962
  // padding
686
- padding: M,
687
- paddingX: k,
688
- paddingY: N,
689
- paddingTop: U,
690
- paddingRight: G,
691
- paddingBottom: K,
692
- paddingLeft: q,
963
+ padding: _,
964
+ paddingX: V,
965
+ paddingY: H,
966
+ paddingTop: G,
967
+ paddingRight: K,
968
+ paddingBottom: q,
969
+ paddingLeft: J,
693
970
  // margin
694
- margin: M,
695
- marginX: k,
696
- marginY: N,
697
- marginTop: U,
698
- marginRight: G,
699
- marginBottom: K,
700
- marginLeft: q,
971
+ margin: _,
972
+ marginX: V,
973
+ marginY: H,
974
+ marginTop: G,
975
+ marginRight: K,
976
+ marginBottom: q,
977
+ marginLeft: J,
701
978
  // text-align
702
- textLeft: ct,
703
- textCenter: pt,
704
- textRight: ut,
705
- textJustify: gt,
979
+ textLeft: Ct,
980
+ textCenter: kt,
981
+ textRight: Nt,
982
+ textJustify: St,
706
983
  // font style
707
- italic: xt,
984
+ italic: Tt,
708
985
  // "not-italic": "",
709
986
  // decoration
710
- underline: yt,
711
- overline: ht,
987
+ underline: Rt,
988
+ overline: Vt,
712
989
  // transform
713
- uppercase: mt,
990
+ uppercase: Ht,
714
991
  block: () => /* @__PURE__ */ e.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
715
992
  /* @__PURE__ */ e.jsx(
716
993
  "path",
@@ -751,7 +1028,7 @@ const T = ["px", "%", "em", "rem", "ch", "vh", "vw"], er = {
751
1028
  }
752
1029
  )
753
1030
  ] }),
754
- "float-none": Ae,
1031
+ "float-none": Fe,
755
1032
  // position
756
1033
  fixed: () => /* @__PURE__ */ e.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
757
1034
  /* @__PURE__ */ e.jsx(
@@ -823,96 +1100,96 @@ const T = ["px", "%", "em", "rem", "ch", "vh", "vw"], er = {
823
1100
  }
824
1101
  )
825
1102
  ] }),
826
- static: bt
827
- }, ee = Ne({ canReset: !1, canChange: !0 }), lr = ({ children: r, canReset: o = !1, canChange: t = !0 }) => (
1103
+ static: Bt
1104
+ }, re = Le({ canReset: !1, canChange: !0 }), Cr = ({ children: r, canReset: s = !1, canChange: t = !0 }) => (
828
1105
  // eslint-disable-next-line react/jsx-no-constructed-context-values
829
- /* @__PURE__ */ e.jsx(ee.Provider, { value: { canReset: o, canChange: t }, children: r })
830
- ), ze = ({ label: r, property: o, onChange: t }) => {
831
- const l = H(() => c(ae, `${o}.classes`, [""]), [o]), s = te(o), n = H(() => c(s, "cls", ""), [s]), { canChange: d } = Q(ee), i = /\[.*\]/g.test(n);
1106
+ /* @__PURE__ */ e.jsx(re.Provider, { value: { canReset: s, canChange: t }, children: r })
1107
+ ), lt = ({ label: r, property: s, onChange: t }) => {
1108
+ const n = T(() => g(pe, `${s}.classes`, [""]), [s]), l = le(s), a = T(() => g(l, "cls", ""), [l]), { canChange: d } = ee(re), i = /\[.*\]/g.test(a);
832
1109
  return /* @__PURE__ */ e.jsx("div", { className: r ? "w-full rounded " : "grow", children: i ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
833
- /* @__PURE__ */ e.jsx(Zt, { className: "w-[70%] rounded py-1", readOnly: !0, value: n }),
834
- /* @__PURE__ */ e.jsxs(W, { delayDuration: 100, children: [
835
- /* @__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(ue, {}) }) }),
836
- /* @__PURE__ */ e.jsx(_, { children: "Current value is using a Tailwind arbitrary value." })
1110
+ /* @__PURE__ */ e.jsx(nr, { className: "w-[70%] rounded py-1", readOnly: !0, value: a }),
1111
+ /* @__PURE__ */ e.jsxs(X, { delayDuration: 100, children: [
1112
+ /* @__PURE__ */ e.jsx(Y, { 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(we, {}) }) }),
1113
+ /* @__PURE__ */ e.jsx(W, { children: "Current value is using a Tailwind arbitrary value." })
837
1114
  ] })
838
1115
  ] }) : /* @__PURE__ */ e.jsx(
839
- ce,
1116
+ ye,
840
1117
  {
841
1118
  rounded: r,
842
- onChange: (a) => t(a, o),
843
- selected: n,
844
- options: l,
1119
+ onChange: (o) => t(o, s),
1120
+ selected: a,
1121
+ options: n,
845
1122
  disabled: !d
846
1123
  }
847
1124
  ) });
848
1125
  };
849
- function ce({ selected: r, onChange: o, rounded: t = !1, options: l, disabled: s = !1 }) {
850
- const n = r.replace(/.*:/g, "").trim(), { undo: d, redo: i } = De();
1126
+ function ye({ selected: r, onChange: s, rounded: t = !1, options: n, disabled: l = !1 }) {
1127
+ const a = r.replace(/.*:/g, "").trim(), { undo: d, redo: i } = Ze();
851
1128
  return /* @__PURE__ */ e.jsxs(
852
1129
  "select",
853
1130
  {
854
- disabled: !l.length || s,
1131
+ disabled: !n.length || l,
855
1132
  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`,
856
- onChange: (a) => o(a.target.value),
857
- onKeyDown: (a) => {
858
- a.ctrlKey && (a.key === "z" && d(), a.key === "y" && i());
1133
+ onChange: (o) => s(o.target.value),
1134
+ onKeyDown: (o) => {
1135
+ o.ctrlKey && (o.key === "z" && d(), o.key === "y" && i());
859
1136
  },
860
- value: n,
1137
+ value: a,
861
1138
  children: [
862
1139
  /* @__PURE__ */ e.jsx("option", { className: "bg-transparent", value: "" }),
863
- L.Children.toArray(
864
- l.map((a) => /* @__PURE__ */ e.jsx("option", { className: "bg-transparent", value: a, children: a }))
1140
+ $.Children.toArray(
1141
+ n.map((o) => /* @__PURE__ */ e.jsx("option", { className: "bg-transparent", value: o, children: o }))
865
1142
  )
866
1143
  ]
867
1144
  }
868
1145
  );
869
1146
  }
870
- const or = ({ property: r, onChange: o }) => {
871
- const { canReset: t, canChange: l } = Q(ee), s = te(r), n = H(() => c(s, "cls", ""), [s]), d = H(() => c(ae, `${r}.classes`, [""]), [r]), i = d.indexOf(n) > -1 ? d.indexOf(n) : 0, a = /\[.*\]/g.test(n);
872
- return /* @__PURE__ */ e.jsx("div", { className: "flex flex-row divide-x divide-solid divide-border rounded border border-border text-xs", children: a ? /* @__PURE__ */ e.jsx("div", { className: "py-[5px] px-2", children: n }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1147
+ const kr = ({ property: r, onChange: s }) => {
1148
+ const { canReset: t, canChange: n } = ee(re), l = le(r), a = T(() => g(l, "cls", ""), [l]), d = T(() => g(pe, `${r}.classes`, [""]), [r]), i = d.indexOf(a) > -1 ? d.indexOf(a) : 0, o = /\[.*\]/g.test(a);
1149
+ return /* @__PURE__ */ e.jsx("div", { className: "flex flex-row divide-x divide-solid divide-border rounded border border-border text-xs", children: o ? /* @__PURE__ */ e.jsx("div", { className: "py-[5px] px-2", children: a }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
873
1150
  /* @__PURE__ */ e.jsx(
874
1151
  "button",
875
1152
  {
876
1153
  type: "button",
877
1154
  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",
878
- disabled: !l && (!t || i - 1 < 0),
879
- onClick: () => o(he(d, i - 1), r),
880
- children: /* @__PURE__ */ e.jsx("span", { className: "flex items-center justify-center", children: /* @__PURE__ */ e.jsx(ft, { className: !l && (!t || i - 1 < 0) ? "text-gray-500" : "text-white/60" }) })
1155
+ disabled: !n && (!t || i - 1 < 0),
1156
+ onClick: () => s(Se(d, i - 1), r),
1157
+ children: /* @__PURE__ */ e.jsx("span", { className: "flex items-center justify-center", children: /* @__PURE__ */ e.jsx(At, { className: !n && (!t || i - 1 < 0) ? "text-gray-500" : "text-white/60" }) })
881
1158
  }
882
1159
  ),
883
- /* @__PURE__ */ e.jsx("div", { className: "w-8/12 text-center", children: /* @__PURE__ */ e.jsx(ze, { label: !1, property: r, onChange: o }) }),
1160
+ /* @__PURE__ */ e.jsx("div", { className: "w-8/12 text-center", children: /* @__PURE__ */ e.jsx(lt, { label: !1, property: r, onChange: s }) }),
884
1161
  /* @__PURE__ */ e.jsx(
885
1162
  "button",
886
1163
  {
887
1164
  type: "button",
888
1165
  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",
889
- disabled: !l && (!t || i + 1 >= d.length),
890
- onClick: () => o(he(d, i + 1), r),
1166
+ disabled: !n && (!t || i + 1 >= d.length),
1167
+ onClick: () => s(Se(d, i + 1), r),
891
1168
  children: /* @__PURE__ */ e.jsx("span", { className: "flex items-center justify-center", children: /* @__PURE__ */ e.jsx(
892
- pe,
1169
+ ve,
893
1170
  {
894
- className: !l && (!t || i + 1 >= d.length) ? "text-gray-500" : "text-white/60"
1171
+ className: !n && (!t || i + 1 >= d.length) ? "text-gray-500" : "text-white/60"
895
1172
  }
896
1173
  ) })
897
1174
  }
898
1175
  )
899
1176
  ] }) });
900
- }, sr = ({ property: r, onChange: o }) => {
901
- const t = H(() => c(ae, `${r}.classes`, [""]), [r]), { canChange: l } = Q(ee), s = te(r), n = H(() => c(s, "cls", ""), [s]);
902
- return /* @__PURE__ */ e.jsx("div", { className: "flex grow flex-wrap gap-1", children: V(t, (d) => /* @__PURE__ */ e.jsxs(W, { children: [
903
- /* @__PURE__ */ e.jsx(Z, { asChild: !0, children: /* @__PURE__ */ e.jsx(
1177
+ }, Nr = ({ property: r, onChange: s }) => {
1178
+ const t = T(() => g(pe, `${r}.classes`, [""]), [r]), { canChange: n } = ee(re), l = le(r), a = T(() => g(l, "cls", ""), [l]);
1179
+ return /* @__PURE__ */ e.jsx("div", { className: "flex grow flex-wrap gap-1", children: C(t, (d) => /* @__PURE__ */ e.jsxs(X, { children: [
1180
+ /* @__PURE__ */ e.jsx(Y, { asChild: !0, children: /* @__PURE__ */ e.jsx(
904
1181
  "button",
905
1182
  {
906
1183
  type: "button",
907
- disabled: !l,
908
- onClick: () => o(d, r),
909
- className: `cursor-pointer rounded border border-gray-600 p-1 disabled:cursor-not-allowed ${n === d ? " bg-blue-500 text-white" : "disabled:bg-gray-600 disabled:text-gray-400"}`,
910
- children: L.createElement(c(_e, d, $e))
1184
+ disabled: !n,
1185
+ onClick: () => s(d, r),
1186
+ className: `cursor-pointer rounded border border-gray-600 p-1 disabled:cursor-not-allowed ${a === d ? " bg-blue-500 text-white" : "disabled:bg-gray-600 disabled:text-gray-400"}`,
1187
+ children: $.createElement(g(rt, d, Xe))
911
1188
  }
912
1189
  ) }),
913
- /* @__PURE__ */ e.jsx(_, { children: Re(Te(d)) })
1190
+ /* @__PURE__ */ e.jsx(W, { children: Q(ne(d)) })
914
1191
  ] })) });
915
- }, ar = {
1192
+ }, Sr = {
916
1193
  backgroundColor: "bg",
917
1194
  textColor: "text",
918
1195
  borderColor: "border",
@@ -924,38 +1201,38 @@ const or = ({ property: r, onChange: o }) => {
924
1201
  toColor: "to",
925
1202
  ringColor: "ring",
926
1203
  ringOffsetColor: "ring-offset"
927
- }, nr = ({ property: r, onChange: o }) => {
928
- const t = te(r), l = H(() => c(t, "cls", ""), [t]), { canChange: s } = Q(ee), [n, d] = S([]), [i, a] = S({ color: "", shade: "" }), x = l.split("-"), g = c(x, "1", ""), u = c(x, "2", ""), m = I(
1204
+ }, Tr = ({ property: r, onChange: s }) => {
1205
+ const t = le(r), n = T(() => g(t, "cls", ""), [t]), { canChange: l } = ee(re), [a, d] = k([]), [i, o] = k({ color: "", shade: "" }), p = n.split("-"), u = g(p, "1", ""), c = g(p, "2", ""), m = I(
929
1206
  // eslint-disable-next-line no-shadow
930
1207
  (y) => {
931
- ["current", "inherit", "transparent", "black", "white"].includes(y) ? (d([]), a({ color: y })) : (d(["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"]), a((f) => ({ ...f, color: y, shade: f.shade ? f.shade : "500" })));
1208
+ ["current", "inherit", "transparent", "black", "white"].includes(y) ? (d([]), o({ color: y })) : (d(["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"]), o((v) => ({ ...v, color: y, shade: v.shade ? v.shade : "500" })));
932
1209
  },
933
- [d, a]
1210
+ [d, o]
934
1211
  );
935
- J(() => {
936
- if (["current", "inherit", "transparent", "black", "white"].includes(g))
1212
+ M(() => {
1213
+ if (["current", "inherit", "transparent", "black", "white"].includes(u))
937
1214
  return d([]);
938
1215
  d(["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"]);
939
- }, [g]);
940
- const h = I(
1216
+ }, [u]);
1217
+ const x = I(
941
1218
  // eslint-disable-next-line no-shadow
942
1219
  (y) => {
943
- a({ color: g, shade: y });
1220
+ o({ color: u, shade: y });
944
1221
  },
945
- [g]
1222
+ [u]
946
1223
  );
947
- return J(() => {
948
- a({ color: "", shade: "" });
949
- }, [t]), J(() => {
950
- const f = `${c(ar, r, "")}-${i.color}${i.shade ? `-${i.shade}` : ""}`;
951
- f.match(new RegExp(c(ae, `${r}.regExp`, ""))) && o(f, r);
952
- }, [i, o, r]), /* @__PURE__ */ e.jsxs("div", { className: "flex flex-row divide-x divide-solid divide-border rounded-lg border border-border text-xs", children: [
1224
+ return M(() => {
1225
+ o({ color: "", shade: "" });
1226
+ }, [t]), M(() => {
1227
+ const v = `${g(Sr, r, "")}-${i.color}${i.shade ? `-${i.shade}` : ""}`;
1228
+ v.match(new RegExp(g(pe, `${r}.regExp`, ""))) && s(v, r);
1229
+ }, [i, s, r]), /* @__PURE__ */ e.jsxs("div", { className: "flex flex-row divide-x divide-solid divide-border rounded-lg border border-border text-xs", children: [
953
1230
  /* @__PURE__ */ e.jsx("div", { className: "grow text-center", children: /* @__PURE__ */ e.jsx(
954
- ce,
1231
+ ye,
955
1232
  {
956
- disabled: !s,
1233
+ disabled: !l,
957
1234
  rounded: !0,
958
- selected: g,
1235
+ selected: u,
959
1236
  onChange: m,
960
1237
  options: [
961
1238
  "current",
@@ -989,19 +1266,19 @@ const or = ({ property: r, onChange: o }) => {
989
1266
  ]
990
1267
  }
991
1268
  ) }),
992
- /* @__PURE__ */ e.jsx("button", { type: "button", className: "grow text-center", children: /* @__PURE__ */ e.jsx(ce, { rounded: !0, selected: u, disabled: !g || !s, onChange: h, options: n }) })
1269
+ /* @__PURE__ */ e.jsx("button", { type: "button", className: "grow text-center", children: /* @__PURE__ */ e.jsx(ye, { rounded: !0, selected: c, disabled: !u || !l, onChange: x, options: a }) })
993
1270
  ] });
994
- }, je = (r, o) => {
1271
+ }, $e = (r, s) => {
995
1272
  r = r.toLowerCase();
996
1273
  let t = r.trim().replace(/ |\+/g, "");
997
- if ((t === "auto" || t === "none") && o.includes(t))
1274
+ if ((t === "auto" || t === "none") && s.includes(t))
998
1275
  return { value: "", unit: t };
999
- const l = o.length ? new RegExp(o.join("|"), "g") : /XXXXXX/g;
1000
- t = t.replace(l, "");
1001
- const s = r.match(l), n = s && s.length > 1, d = !w(t) && Number.isNaN(Number(t));
1002
- return n || d ? { error: "Invalid value" } : s && (s[0] === "auto" || s[0] === "none") ? { value: s[0], unit: "" } : { value: t, unit: s ? s[0] : "" };
1003
- }, ir = (r) => {
1004
- const o = r.startsWith("-") ? "-" : "", t = r.split("-").pop();
1276
+ const n = s.length ? new RegExp(s.join("|"), "g") : /XXXXXX/g;
1277
+ t = t.replace(n, "");
1278
+ const l = r.match(n), a = l && l.length > 1, d = !b(t) && Number.isNaN(Number(t));
1279
+ return a || d ? { error: "Invalid value" } : l && (l[0] === "auto" || l[0] === "none") ? { value: l[0], unit: "" } : { value: t, unit: l ? l[0] : "" };
1280
+ }, Rr = (r) => {
1281
+ const s = r.startsWith("-") ? "-" : "", t = r.split("-").pop();
1005
1282
  if (["auto", "none"].includes(t))
1006
1283
  return { value: "", unit: t };
1007
1284
  if (t === "px")
@@ -1010,26 +1287,26 @@ const or = ({ property: r, onChange: o }) => {
1010
1287
  return { value: "100", unit: r.indexOf("w-") !== -1 ? "vw" : "vh" };
1011
1288
  if (t === "full")
1012
1289
  return { value: "100", unit: "%" };
1013
- if (P(r, "skew-"))
1014
- return { value: `${o}${t}`, unit: "deg" };
1015
- if (P(r, "rotate-"))
1016
- return { value: `${o}${t}`, unit: "deg" };
1017
- if (P(r, "opacity-"))
1290
+ if (O(r, "skew-"))
1291
+ return { value: `${s}${t}`, unit: "deg" };
1292
+ if (O(r, "rotate-"))
1293
+ return { value: `${s}${t}`, unit: "deg" };
1294
+ if (O(r, "opacity-"))
1018
1295
  return { value: `${t / 100}`, unit: "-" };
1019
- if (P(r, "duration-") || P(r, "delay-"))
1296
+ if (O(r, "duration-") || O(r, "delay-"))
1020
1297
  return { value: `${t}`, unit: "ms" };
1021
- if (P(r, "translate-") && !t.includes("/"))
1022
- return { value: `${o}${`${t / 4}`}`, unit: "rem" };
1023
- if (P(r, "scale-"))
1024
- return { value: `${o}${`${t / 100}`}`, unit: "-" };
1025
- if (X(r, "border")) {
1026
- const l = r.match(/border-?(x|y|t|r|b|l)?\d+/g);
1027
- if (l)
1028
- return { value: l[0].split("-").pop(), unit: "px" };
1298
+ if (O(r, "translate-") && !t.includes("/"))
1299
+ return { value: `${s}${`${t / 4}`}`, unit: "rem" };
1300
+ if (O(r, "scale-"))
1301
+ return { value: `${s}${`${t / 100}`}`, unit: "-" };
1302
+ if (Z(r, "border")) {
1303
+ const n = r.match(/border-?(x|y|t|r|b|l)?\d+/g);
1304
+ if (n)
1305
+ return { value: n[0].split("-").pop(), unit: "px" };
1029
1306
  if (r.match(/border-?(x|y|t|r|b|l)?/g))
1030
1307
  return { value: "1", unit: "px" };
1031
1308
  }
1032
- if (X(r, "max-w-")) {
1309
+ if (Z(r, "max-w-")) {
1033
1310
  if (r === "max-w-screen-sm")
1034
1311
  return { value: "640", unit: "px" };
1035
1312
  if (r === "max-w-screen-md")
@@ -1065,7 +1342,7 @@ const or = ({ property: r, onChange: o }) => {
1065
1342
  if (t === "prose")
1066
1343
  return { value: "65", unit: "ch" };
1067
1344
  }
1068
- if (X(r, "text-")) {
1345
+ if (Z(r, "text-")) {
1069
1346
  if (t === "xs")
1070
1347
  return { value: "12", unit: "px" };
1071
1348
  if (t === "sm")
@@ -1093,7 +1370,7 @@ const or = ({ property: r, onChange: o }) => {
1093
1370
  if (t === "9xl")
1094
1371
  return { value: "128", unit: "px" };
1095
1372
  }
1096
- if (X(r, "leading-")) {
1373
+ if (Z(r, "leading-")) {
1097
1374
  if (t === "none")
1098
1375
  return { value: "1", unit: "-" };
1099
1376
  if (t === "tight")
@@ -1107,7 +1384,7 @@ const or = ({ property: r, onChange: o }) => {
1107
1384
  if (t === "loose")
1108
1385
  return { value: "2", unit: "-" };
1109
1386
  }
1110
- if (X(r, "tracking-")) {
1387
+ if (Z(r, "tracking-")) {
1111
1388
  if (t === "tighter")
1112
1389
  return { value: "-0.05", unit: "em" };
1113
1390
  if (t === "tight")
@@ -1124,219 +1401,219 @@ const or = ({ property: r, onChange: o }) => {
1124
1401
  if (["max", "min", "fit"].includes(t))
1125
1402
  return { value: r, unit: "class" };
1126
1403
  if (t.includes("/")) {
1127
- const [l, s] = V(t.split("/"), (n) => parseInt(n, 10));
1128
- return { value: o + (l / s * 100).toFixed(2).replace(".00", ""), unit: "%" };
1404
+ const [n, l] = C(t.split("/"), (a) => parseInt(a, 10));
1405
+ return { value: s + (n / l * 100).toFixed(2).replace(".00", ""), unit: "%" };
1129
1406
  }
1130
- return Je(parseFloat(t)) ? { value: `${o + parseFloat(t) * 4}`, unit: "px" } : { value: t, unit: "class" };
1131
- }, dr = (r) => {
1132
- if (w(r))
1407
+ return xt(parseFloat(t)) ? { value: `${s + parseFloat(t) * 4}`, unit: "px" } : { value: t, unit: "class" };
1408
+ }, Vr = (r) => {
1409
+ if (b(r))
1133
1410
  return { value: "", unit: "" };
1134
- const o = r.match(/\[.*\]/g);
1135
- if (o === null)
1136
- return cr(r);
1137
- const t = c(o, "0", "").replace(/\[|\]/g, ""), l = r.startsWith("-") ? "-" : "", s = Se(t.match(/\d+.\d+|\d+/g));
1138
- return { value: `${l}${s}`, unit: t.replace(s, "") };
1139
- }, cr = (r) => w(r) ? { value: "", unit: "" } : ir(r), Ue = L.createContext({
1411
+ const s = r.match(/\[.*\]/g);
1412
+ if (s === null)
1413
+ return Hr(r);
1414
+ const t = g(s, "0", "").replace(/\[|\]/g, ""), n = r.startsWith("-") ? "-" : "", l = be(t.match(/\d+.\d+|\d+/g));
1415
+ return { value: `${n}${l}`, unit: t.replace(l, "") };
1416
+ }, Hr = (r) => b(r) ? { value: "", unit: "" } : Rr(r), ot = $.createContext({
1140
1417
  setDragData: () => {
1141
1418
  }
1142
- }), pr = ({
1419
+ }), Br = ({
1143
1420
  unit: r,
1144
- currentValue: o,
1421
+ currentValue: s,
1145
1422
  onDrag: t,
1146
- onDragEnd: l,
1147
- onDragStart: s,
1148
- negative: n,
1423
+ onDragEnd: n,
1424
+ onDragStart: l,
1425
+ negative: a,
1149
1426
  cssProperty: d
1150
1427
  }) => {
1151
- const { setDragData: i } = Q(Ue);
1428
+ const { setDragData: i } = ee(ot);
1152
1429
  return /* @__PURE__ */ e.jsx(
1153
1430
  "button",
1154
1431
  {
1155
1432
  type: "button",
1156
- onMouseDown: (a) => {
1157
- const x = {
1433
+ onMouseDown: (o) => {
1434
+ const p = {
1158
1435
  onDrag: t,
1159
- onDragEnd: l,
1436
+ onDragEnd: n,
1160
1437
  dragging: !0,
1161
- dragStartY: a.pageY,
1162
- dragStartValue: `${o}`,
1438
+ dragStartY: o.pageY,
1439
+ dragStartValue: `${s}`,
1163
1440
  dragUnit: r,
1164
- negative: n,
1441
+ negative: a,
1165
1442
  cssProperty: d
1166
1443
  };
1167
- s(x), i(x);
1444
+ l(p), i(p);
1168
1445
  },
1169
1446
  color: void 0,
1170
1447
  className: "relative z-50 ml-1 hidden h-6 cursor-row-resize rounded bg-background/70 px-2 group-hover:inline",
1171
- children: /* @__PURE__ */ e.jsx(wt, {})
1448
+ children: /* @__PURE__ */ e.jsx($t, {})
1172
1449
  }
1173
1450
  );
1174
- }, ur = ({ onSelect: r, current: o, units: t }) => /* @__PURE__ */ e.jsx("div", { "data-theme": "light", className: "-m-[7px] -mx-[13px] flex w-9 flex-col", children: t.map((l) => /* @__PURE__ */ e.jsx(
1175
- Xe,
1451
+ }, Ar = ({ 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((n) => /* @__PURE__ */ e.jsx(
1452
+ et,
1176
1453
  {
1177
1454
  className: "h-max rounded-none px-1 py-1 text-right text-[11px] hover:bg-blue-400",
1178
- color: o === l ? "primary" : void 0,
1455
+ color: s === n ? "primary" : void 0,
1179
1456
  size: "sm",
1180
- onClick: (s) => {
1181
- s.stopPropagation(), r(l);
1457
+ onClick: (l) => {
1458
+ l.stopPropagation(), r(n);
1182
1459
  },
1183
- children: l
1460
+ children: n
1184
1461
  },
1185
- l
1186
- )) }), gr = (r) => {
1187
- const [o, t] = S(!1), [l, s] = S(""), { currentClass: n, onChange: d, classPrefix: i, cssProperty: a, units: x, negative: g } = r, [u, m] = S(a != null && a.toLowerCase().includes("width") ? "%" : x[0]), [h, y] = S(!1), [f, O] = S(""), [B, v] = S(!1), [D, A] = S(!1);
1188
- J(() => {
1189
- const { value: p, unit: b } = dr(n);
1190
- if (b === "") {
1191
- s(p), m(a != null && a.toLowerCase().includes("width") ? "%" : x[0]);
1462
+ n
1463
+ )) }), Dr = (r) => {
1464
+ const [s, t] = k(!1), [n, l] = k(""), { currentClass: a, onChange: d, classPrefix: i, cssProperty: o, units: p, negative: u } = r, [c, m] = k(o != null && o.toLowerCase().includes("width") ? "%" : p[0]), [x, y] = k(!1), [v, L] = k(""), [R, f] = k(!1), [j, B] = k(!1);
1465
+ M(() => {
1466
+ const { value: h, unit: w } = Vr(a);
1467
+ if (w === "") {
1468
+ l(h), m(o != null && o.toLowerCase().includes("width") ? "%" : p[0]);
1192
1469
  return;
1193
1470
  }
1194
- m(b), s(b === "class" || w(p) ? "" : p);
1195
- }, [n, a, x]);
1196
- const C = de(
1197
- (p) => {
1198
- d(p);
1471
+ m(w), l(w === "class" || b(h) ? "" : h);
1472
+ }, [a, o, p]);
1473
+ const N = xe(
1474
+ (h) => {
1475
+ d(h);
1199
1476
  },
1200
1477
  [d],
1201
1478
  200
1202
- ), $ = de(
1203
- (p) => {
1204
- d(p, !1);
1479
+ ), P = xe(
1480
+ (h) => {
1481
+ d(h, !1);
1205
1482
  },
1206
1483
  [d],
1207
1484
  200
1208
1485
  ), F = I(
1209
- (p = !1) => {
1210
- const b = je(`${l}`, x);
1211
- if (c(b, "error", !1)) {
1486
+ (h = !1) => {
1487
+ const w = $e(`${n}`, p);
1488
+ if (g(w, "error", !1)) {
1212
1489
  y(!0);
1213
1490
  return;
1214
1491
  }
1215
- const j = c(b, "unit") !== "" ? c(b, "unit") : u;
1216
- if (j === "auto" || j === "none") {
1217
- C(`${i}${j}`);
1492
+ const S = g(w, "unit") !== "" ? g(w, "unit") : c;
1493
+ if (S === "auto" || S === "none") {
1494
+ N(`${i}${S}`);
1218
1495
  return;
1219
1496
  }
1220
- if (c(b, "value") === "")
1497
+ if (g(w, "value") === "")
1221
1498
  return;
1222
- const z = `${c(b, "value", "").startsWith("-") ? "-" : ""}${i}[${c(b, "value", "").replace("-", "")}${j === "-" ? "" : j}]`;
1223
- p ? $(z) : C(z);
1499
+ const U = `${g(w, "value", "").startsWith("-") ? "-" : ""}${i}[${g(w, "value", "").replace("-", "")}${S === "-" ? "" : S}]`;
1500
+ h ? P(U) : N(U);
1224
1501
  },
1225
- [C, $, l, u, i, x]
1226
- ), re = I(
1227
- (p) => {
1228
- const b = je(`${l}`, x);
1229
- if (c(b, "error", !1)) {
1502
+ [N, P, n, c, i, p]
1503
+ ), oe = I(
1504
+ (h) => {
1505
+ const w = $e(`${n}`, p);
1506
+ if (g(w, "error", !1)) {
1230
1507
  y(!0);
1231
1508
  return;
1232
1509
  }
1233
- if (p === "auto" || p === "none") {
1234
- C(`${i}${p}`);
1510
+ if (h === "auto" || h === "none") {
1511
+ N(`${i}${h}`);
1235
1512
  return;
1236
1513
  }
1237
- if (c(b, "value") === "")
1514
+ if (g(w, "value") === "")
1238
1515
  return;
1239
- const j = c(b, "unit") !== "" ? c(b, "unit") : p, z = `${c(b, "value", "").startsWith("-") ? "-" : ""}${i}[${c(b, "value", "").replace("-", "")}${j === "-" ? "" : j}]`;
1240
- C(z);
1516
+ const S = g(w, "unit") !== "" ? g(w, "unit") : h, U = `${g(w, "value", "").startsWith("-") ? "-" : ""}${i}[${g(w, "value", "").replace("-", "")}${S === "-" ? "" : S}]`;
1517
+ N(U);
1241
1518
  },
1242
- [C, l, i, x]
1519
+ [N, n, i, p]
1243
1520
  );
1244
- return /* @__PURE__ */ e.jsx("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-start", children: u === "class" ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1245
- /* @__PURE__ */ e.jsx("input", { className: "w-20 rounded py-1", readOnly: !0, value: n }),
1246
- /* @__PURE__ */ e.jsxs(W, { children: [
1247
- /* @__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(ue, {}) }) }),
1248
- /* @__PURE__ */ e.jsx(_, { children: "Current value is using a Tailwind preset class." })
1521
+ return /* @__PURE__ */ e.jsx("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-start", children: c === "class" ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1522
+ /* @__PURE__ */ e.jsx("input", { className: "w-20 rounded py-1", readOnly: !0, value: a }),
1523
+ /* @__PURE__ */ e.jsxs(X, { children: [
1524
+ /* @__PURE__ */ e.jsx(Y, { 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(we, {}) }) }),
1525
+ /* @__PURE__ */ e.jsx(W, { children: "Current value is using a Tailwind preset class." })
1249
1526
  ] })
1250
- ] }) : /* @__PURE__ */ e.jsxs("div", { className: `group relative flex items-center ${B ? "z-auto" : ""}`, children: [
1527
+ ] }) : /* @__PURE__ */ e.jsxs("div", { className: `group relative flex items-center ${R ? "z-auto" : ""}`, children: [
1251
1528
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center rounded-md border border-border", children: [
1252
- ["none", "auto"].indexOf(u) !== -1 ? null : /* @__PURE__ */ e.jsx(
1529
+ ["none", "auto"].indexOf(c) !== -1 ? null : /* @__PURE__ */ e.jsx(
1253
1530
  "input",
1254
1531
  {
1255
- readOnly: u === "class",
1256
- onKeyPress: (p) => {
1257
- p.key === "Enter" && F();
1532
+ readOnly: c === "class",
1533
+ onKeyPress: (h) => {
1534
+ h.key === "Enter" && F();
1258
1535
  },
1259
- onKeyDown: (p) => {
1260
- if (p.keyCode !== 38 && p.keyCode !== 40)
1536
+ onKeyDown: (h) => {
1537
+ if (h.keyCode !== 38 && h.keyCode !== 40)
1261
1538
  return;
1262
- p.preventDefault(), A(!0);
1263
- const b = Qe(p.target.value);
1264
- let j = Ve(b) ? 0 : b;
1265
- p.keyCode === 38 && (j += 1), p.keyCode === 40 && (j -= 1);
1266
- const E = `${j}`, Ke = `${E.startsWith("-") ? "-" : ""}${i}[${E.replace("-", "")}${u === "-" ? "" : u}]`;
1267
- $(Ke);
1539
+ h.preventDefault(), B(!0);
1540
+ const w = ht(h.target.value);
1541
+ let S = Me(w) ? 0 : w;
1542
+ h.keyCode === 38 && (S += 1), h.keyCode === 40 && (S -= 1);
1543
+ const E = `${S}`, nt = `${E.startsWith("-") ? "-" : ""}${i}[${E.replace("-", "")}${c === "-" ? "" : c}]`;
1544
+ P(nt);
1268
1545
  },
1269
- onKeyUp: (p) => {
1270
- D && (p.preventDefault(), A(!1));
1546
+ onKeyUp: (h) => {
1547
+ j && (h.preventDefault(), B(!1));
1271
1548
  },
1272
1549
  onBlur: () => F(),
1273
- onChange: (p) => {
1274
- y(!1), s(p.target.value);
1550
+ onChange: (h) => {
1551
+ y(!1), l(h.target.value);
1275
1552
  },
1276
- onClick: (p) => {
1277
- var b;
1278
- (b = p == null ? void 0 : p.target) == null || b.select(), t(!1);
1553
+ onClick: (h) => {
1554
+ var w;
1555
+ (w = h == null ? void 0 : h.target) == null || w.select(), t(!1);
1279
1556
  },
1280
- value: B ? f : l,
1557
+ value: R ? v : n,
1281
1558
  className: "h-6 w-14 rounded rounded-r-none bg-background pl-2 text-sm focus-visible:outline-0 ".concat(
1282
1559
  " ",
1283
- h ? "border-red-500 text-red-500" : "border-foreground/20"
1560
+ x ? "border-red-500 text-red-500" : "border-foreground/20"
1284
1561
  )
1285
1562
  }
1286
1563
  ),
1287
- /* @__PURE__ */ e.jsxs(W, { open: o, delayDuration: 100, children: [
1288
- /* @__PURE__ */ e.jsx(Z, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
1564
+ /* @__PURE__ */ e.jsxs(X, { open: s, delayDuration: 100, children: [
1565
+ /* @__PURE__ */ e.jsx(Y, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
1289
1566
  "button",
1290
1567
  {
1291
1568
  type: "button",
1292
- onClick: () => t(!o),
1569
+ onClick: () => t(!s),
1293
1570
  className: "flex h-6 cursor-pointer items-center gap-x-1 rounded rounded-l-none bg-background p-px px-1 text-[11px] uppercase",
1294
1571
  children: [
1295
- /* @__PURE__ */ e.jsx("span", { className: `inline-block ${x.length === 1 ? "px-2 font-semibold" : ""}`, children: u }),
1296
- x.length > 1 ? /* @__PURE__ */ e.jsx(vt, {}) : null
1572
+ /* @__PURE__ */ e.jsx("span", { className: `inline-block ${p.length === 1 ? "px-2 font-semibold" : ""}`, children: c }),
1573
+ p.length > 1 ? /* @__PURE__ */ e.jsx(Dt, {}) : null
1297
1574
  ]
1298
1575
  }
1299
1576
  ) }),
1300
- /* @__PURE__ */ e.jsx(Yt, { children: /* @__PURE__ */ e.jsx(_, { className: "bg-background", children: /* @__PURE__ */ e.jsx(
1301
- ur,
1577
+ /* @__PURE__ */ e.jsx(Kt, { children: /* @__PURE__ */ e.jsx(W, { className: "bg-background", children: /* @__PURE__ */ e.jsx(
1578
+ Ar,
1302
1579
  {
1303
- units: x,
1304
- current: u,
1305
- onSelect: (p) => {
1306
- t(!1), m(p), re(p);
1580
+ units: p,
1581
+ current: c,
1582
+ onSelect: (h) => {
1583
+ t(!1), m(h), oe(h);
1307
1584
  }
1308
1585
  }
1309
1586
  ) }) })
1310
1587
  ] })
1311
1588
  ] }),
1312
- ["none", "auto"].indexOf(u) !== -1 || B ? null : /* @__PURE__ */ e.jsx(
1313
- pr,
1589
+ ["none", "auto"].indexOf(c) !== -1 || R ? null : /* @__PURE__ */ e.jsx(
1590
+ Br,
1314
1591
  {
1315
- onDragStart: () => v(!0),
1316
- onDragEnd: (p) => {
1317
- if (O(() => ""), v(!1), w(p))
1592
+ onDragStart: () => f(!0),
1593
+ onDragEnd: (h) => {
1594
+ if (L(() => ""), f(!1), b(h))
1318
1595
  return;
1319
- const b = `${p}`, E = `${b.startsWith("-") ? "-" : ""}${i}[${b.replace("-", "")}${u === "-" ? "" : u}]`;
1320
- C(E);
1596
+ const w = `${h}`, E = `${w.startsWith("-") ? "-" : ""}${i}[${w.replace("-", "")}${c === "-" ? "" : c}]`;
1597
+ N(E);
1321
1598
  },
1322
- onDrag: (p) => {
1323
- if (w(p))
1599
+ onDrag: (h) => {
1600
+ if (b(h))
1324
1601
  return;
1325
- O(p);
1326
- const b = `${p}`, E = `${b.startsWith("-") ? "-" : ""}${i}[${b.replace("-", "")}${u === "-" ? "" : u}]`;
1327
- $(E);
1602
+ L(h);
1603
+ const w = `${h}`, E = `${w.startsWith("-") ? "-" : ""}${i}[${w.replace("-", "")}${c === "-" ? "" : c}]`;
1604
+ P(E);
1328
1605
  },
1329
- currentValue: l,
1330
- unit: u,
1331
- negative: g,
1332
- cssProperty: a
1606
+ currentValue: n,
1607
+ unit: c,
1608
+ negative: u,
1609
+ cssProperty: o
1333
1610
  }
1334
1611
  )
1335
1612
  ] }) }) });
1336
- }, te = (r) => {
1337
- const o = se();
1338
- return et(o, { property: r });
1339
- }, xr = (r, o) => {
1613
+ }, le = (r) => {
1614
+ const s = ce();
1615
+ return mt(s, { property: r });
1616
+ }, $r = (r, s) => {
1340
1617
  const t = {
1341
1618
  xs: 0,
1342
1619
  sm: 1,
@@ -1345,8 +1622,8 @@ const or = ({ property: r, onChange: o }) => {
1345
1622
  xl: 4,
1346
1623
  "2xl": 5
1347
1624
  };
1348
- return t[c(r, "mq", "xs")] <= t[o];
1349
- }, yr = {
1625
+ return t[g(r, "mq", "xs")] <= t[s];
1626
+ }, Ir = {
1350
1627
  width: "w-",
1351
1628
  height: "h-",
1352
1629
  minWidth: "min-w-",
@@ -1412,87 +1689,87 @@ const or = ({ property: r, onChange: o }) => {
1412
1689
  insetY: "inset-y-",
1413
1690
  opacity: "opacity-",
1414
1691
  flexBasis: "basis-"
1415
- }, ke = {
1692
+ }, Ie = {
1416
1693
  xs: "",
1417
1694
  sm: "640px",
1418
1695
  md: "768px",
1419
1696
  lg: "1024px",
1420
1697
  xl: "1280px",
1421
1698
  "2xl": "1536px"
1422
- }, hr = (r) => `${r.toUpperCase()} ${ke[r] ? `(${ke[r]} & up)` : ""}`, ye = (r) => {
1423
- const { type: o = "icons", label: t, property: l, onEmitChange: s = () => {
1424
- }, units: n, negative: d = !1 } = r, [i] = Vt(), [a] = Fe(), [, x] = we(), g = te(l), u = Oe(), m = Ee(), [h] = Pe(), y = H(() => c(g, "fullCls", ""), [g]), f = I(
1425
- (C, $ = !0) => {
1426
- const F = { dark: i, mq: x, mod: a, cls: C, property: l, fullCls: "" };
1427
- (i || a !== "") && (F.mq = "xs");
1428
- const re = Xt(F);
1429
- u(h, [re], $);
1699
+ }, Lr = (r) => `${r.toUpperCase()} ${Ie[r] ? `(${Ie[r]} & up)` : ""}`, ke = (r) => {
1700
+ const { type: s = "icons", label: t, property: n, onEmitChange: l = () => {
1701
+ }, units: a, negative: d = !1 } = r, [i] = Ft(), [o] = qe(), [, p] = He(), u = le(n), c = Ue(), m = Ge(), [x] = Ke(), y = T(() => g(u, "fullCls", ""), [u]), v = I(
1702
+ (N, P = !0) => {
1703
+ const F = { dark: i, mq: p, mod: o, cls: N, property: n, fullCls: "" };
1704
+ (i || o !== "") && (F.mq = "xs");
1705
+ const oe = or(F);
1706
+ c(x, [oe], P);
1430
1707
  },
1431
- [h, i, x, a, l, u]
1432
- ), O = I(() => {
1433
- m(h, [y]);
1434
- }, [h, y, m]), B = H(() => xr(g, x), [g, x]);
1435
- J(() => {
1436
- s(B, g);
1437
- }, [B, s, g]);
1438
- const [, , v] = we(), D = I(
1439
- (C) => {
1440
- v({
1708
+ [x, i, p, o, n, c]
1709
+ ), L = I(() => {
1710
+ m(x, [y]);
1711
+ }, [x, y, m]), R = T(() => $r(u, p), [u, p]);
1712
+ M(() => {
1713
+ l(R, u);
1714
+ }, [R, l, u]);
1715
+ const [, , f] = He(), j = I(
1716
+ (N) => {
1717
+ f({
1441
1718
  xs: 400,
1442
1719
  sm: 640,
1443
1720
  md: 800,
1444
1721
  lg: 1024,
1445
1722
  xl: 1420,
1446
1723
  "2xl": 1920
1447
- }[C]);
1724
+ }[N]);
1448
1725
  },
1449
- [v]
1450
- ), A = c(g, "dark", null) === i && c(g, "mod", null) === a && c(g, "mq", null) === x;
1451
- return /* @__PURE__ */ e.jsx(lr, { canChange: B, canReset: g && A, children: /* @__PURE__ */ e.jsxs("div", { className: "group flex flex-row items-center py-2 first:pt-0 last:pb-0", children: [
1452
- /* @__PURE__ */ e.jsx("div", { className: "relative w-[70px] truncate text-xs text-foreground", children: /* @__PURE__ */ e.jsx("span", { className: `text-[11px] ${g && !A ? "text-foreground" : ""}`, children: t }) }),
1726
+ [f]
1727
+ ), B = g(u, "dark", null) === i && g(u, "mod", null) === o && g(u, "mq", null) === p;
1728
+ return /* @__PURE__ */ e.jsx(Cr, { canChange: R, canReset: u && B, children: /* @__PURE__ */ e.jsxs("div", { className: "group flex flex-row items-center py-2 first:pt-0 last:pb-0", children: [
1729
+ /* @__PURE__ */ e.jsx("div", { className: "relative w-[70px] truncate text-xs text-foreground", children: /* @__PURE__ */ e.jsx("span", { className: `text-[11px] ${u && !B ? "text-foreground" : ""}`, children: t }) }),
1453
1730
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-row items-center", children: [
1454
1731
  /* @__PURE__ */ e.jsxs("div", { className: "w-[150px]", children: [
1455
- o === "arbitrary" ? /* @__PURE__ */ e.jsx(
1456
- gr,
1732
+ s === "arbitrary" ? /* @__PURE__ */ e.jsx(
1733
+ Dr,
1457
1734
  {
1458
- currentClass: c(g, "cls", ""),
1459
- classPrefix: c(yr, l, ""),
1460
- units: n || [],
1461
- onChange: f,
1735
+ currentClass: g(u, "cls", ""),
1736
+ classPrefix: g(Ir, n, ""),
1737
+ units: a || [],
1738
+ onChange: v,
1462
1739
  negative: d,
1463
- cssProperty: l
1740
+ cssProperty: n
1464
1741
  }
1465
1742
  ) : null,
1466
- o === "icons" && /* @__PURE__ */ e.jsx(sr, { property: l, onChange: f }),
1467
- o === "range" && /* @__PURE__ */ e.jsx(or, { property: l, onChange: f }),
1468
- o === "color" && /* @__PURE__ */ e.jsx(nr, { property: l, onChange: f }),
1469
- o === "dropdown" && /* @__PURE__ */ e.jsx(ze, { label: t, property: l, onChange: f })
1743
+ s === "icons" && /* @__PURE__ */ e.jsx(Nr, { property: n, onChange: v }),
1744
+ s === "range" && /* @__PURE__ */ e.jsx(kr, { property: n, onChange: v }),
1745
+ s === "color" && /* @__PURE__ */ e.jsx(Tr, { property: n, onChange: v }),
1746
+ s === "dropdown" && /* @__PURE__ */ e.jsx(lt, { label: t, property: n, onChange: v })
1470
1747
  ] }),
1471
- /* @__PURE__ */ e.jsx("div", { className: `w-[30px] cursor-pointer ${y ? "visible" : "invisible"}`, children: A ? /* @__PURE__ */ e.jsx("button", { type: "button", onClick: () => O(), title: "Reset", className: "flex px-1.5 text-xs", children: /* @__PURE__ */ e.jsx(Le, { className: "h-5 w-5 text-blue-500 hover:opacity-80" }) }) : B && g ? /* @__PURE__ */ e.jsxs(W, { delayDuration: 100, children: [
1472
- /* @__PURE__ */ e.jsx(Z, { asChild: !0, children: /* @__PURE__ */ e.jsx(
1748
+ /* @__PURE__ */ e.jsx("div", { className: `w-[30px] cursor-pointer ${y ? "visible" : "invisible"}`, children: B ? /* @__PURE__ */ e.jsx("button", { type: "button", onClick: () => L(), title: "Reset", className: "flex px-1.5 text-xs", children: /* @__PURE__ */ e.jsx(Ye, { className: "h-5 w-5 text-blue-500 hover:opacity-80" }) }) : R && u ? /* @__PURE__ */ e.jsxs(X, { delayDuration: 100, children: [
1749
+ /* @__PURE__ */ e.jsx(Y, { asChild: !0, children: /* @__PURE__ */ e.jsx(
1473
1750
  "button",
1474
1751
  {
1475
1752
  type: "button",
1476
1753
  className: "invisible ml-3 mt-1 rounded-full bg-blue-500 text-white group-hover:visible",
1477
- children: /* @__PURE__ */ e.jsx(ue, {})
1754
+ children: /* @__PURE__ */ e.jsx(we, {})
1478
1755
  }
1479
1756
  ) }),
1480
- /* @__PURE__ */ e.jsx(_, { children: /* @__PURE__ */ e.jsx("div", { className: "text-right", children: /* @__PURE__ */ e.jsxs("div", { children: [
1757
+ /* @__PURE__ */ e.jsx(W, { children: /* @__PURE__ */ e.jsx("div", { className: "text-right", children: /* @__PURE__ */ e.jsxs("div", { children: [
1481
1758
  "Current style is set at  ",
1482
1759
  /* @__PURE__ */ e.jsxs("span", { className: "font-bold ", children: [
1483
- hr(c(g, "mq")),
1484
- i && !g.dark ? "(Light mode)" : ""
1760
+ Lr(g(u, "mq")),
1761
+ i && !u.dark ? "(Light mode)" : ""
1485
1762
  ] }),
1486
1763
  /* @__PURE__ */ e.jsx("br", {}),
1487
1764
  /* @__PURE__ */ e.jsxs(
1488
1765
  "button",
1489
1766
  {
1490
1767
  type: "button",
1491
- onClick: () => D(c(g, "mq")),
1768
+ onClick: () => j(g(u, "mq")),
1492
1769
  className: "block w-full cursor-default text-right font-semibold text-blue-500",
1493
1770
  children: [
1494
1771
  "Switch to ",
1495
- c(g, "mq").toUpperCase()
1772
+ g(u, "mq").toUpperCase()
1496
1773
  ]
1497
1774
  }
1498
1775
  )
@@ -1500,48 +1777,48 @@ const or = ({ property: r, onChange: o }) => {
1500
1777
  ] }) : null })
1501
1778
  ] })
1502
1779
  ] }) });
1503
- }, mr = ["px", "%", "em", "rem", "ch", "vh", "vw"], Ge = ({
1780
+ }, Pr = ["px", "%", "em", "rem", "ch", "vh", "vw"], st = ({
1504
1781
  label: r,
1505
- options: o,
1782
+ options: s,
1506
1783
  borderB: t = !1,
1507
- borderT: l = !1,
1508
- type: s = "arbitrary",
1509
- units: n = mr,
1784
+ borderT: n = !1,
1785
+ type: l = "arbitrary",
1786
+ units: a = Pr,
1510
1787
  negative: d = !1
1511
1788
  }) => {
1512
- const [i, a] = S(o[0].key), x = se(), g = I((u) => V(x, "property").includes(u), [x]);
1789
+ const [i, o] = k(s[0].key), p = ce(), u = I((c) => C(p, "property").includes(c), [p]);
1513
1790
  return /* @__PURE__ */ e.jsxs(
1514
1791
  "div",
1515
1792
  {
1516
- className: `mb-2 border-gray-800 py-2 first:pt-0 last:pb-0 ${t ? "border-b" : ""} ${l ? "border-t" : ""}`,
1793
+ className: `mb-2 border-gray-800 py-2 first:pt-0 last:pb-0 ${t ? "border-b" : ""} ${n ? "border-t" : ""}`,
1517
1794
  children: [
1518
1795
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-row text-xs", children: [
1519
1796
  r && /* @__PURE__ */ e.jsx("span", { className: "relative w-[70px] flex-none text-xs text-foreground", children: r }),
1520
- /* @__PURE__ */ e.jsx("div", { className: "mb-3 flex grow flex-row flex-wrap gap-x-px", children: L.Children.toArray(
1521
- o.map(({ label: u, key: m }) => /* @__PURE__ */ e.jsx("div", { className: "first:rounded-l last:rounded-r", children: /* @__PURE__ */ e.jsxs(W, { children: [
1522
- /* @__PURE__ */ e.jsx(Z, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
1797
+ /* @__PURE__ */ e.jsx("div", { className: "mb-3 flex grow flex-row flex-wrap gap-x-px", children: $.Children.toArray(
1798
+ s.map(({ label: c, key: m }) => /* @__PURE__ */ e.jsx("div", { className: "first:rounded-l last:rounded-r", children: /* @__PURE__ */ e.jsxs(X, { children: [
1799
+ /* @__PURE__ */ e.jsx(Y, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
1523
1800
  "button",
1524
1801
  {
1525
1802
  type: "button",
1526
- onClick: () => a(m),
1803
+ onClick: () => o(m),
1527
1804
  className: `relative cursor-pointer rounded-full p-1 text-[8px] ${m === i ? " bg-[#3E57F0] text-white" : "text-gray-600 dark:text-gray-300"}`,
1528
1805
  children: [
1529
- L.createElement("div", {
1530
- className: g(m) ? "-bottom-1.5 absolute bg-[#3E57F0] h-[2px] left-0 w-full" : ""
1806
+ $.createElement("div", {
1807
+ className: u(m) ? "-bottom-1.5 absolute bg-[#3E57F0] h-[2px] left-0 w-full" : ""
1531
1808
  }),
1532
- L.createElement(c(_e, m, $e), { className: "text-inherit w-3 h-3" })
1809
+ $.createElement(g(rt, m, Xe), { className: "text-inherit w-3 h-3" })
1533
1810
  ]
1534
1811
  }
1535
1812
  ) }),
1536
- /* @__PURE__ */ e.jsx(_, { children: Re(Te(u)) })
1813
+ /* @__PURE__ */ e.jsx(W, { children: Q(ne(c)) })
1537
1814
  ] }) }))
1538
1815
  ) })
1539
1816
  ] }),
1540
1817
  /* @__PURE__ */ e.jsx("div", { className: "mt-0 flex items-center", children: /* @__PURE__ */ e.jsx(
1541
- ye,
1818
+ ke,
1542
1819
  {
1543
- type: s,
1544
- units: [...n],
1820
+ type: l,
1821
+ units: [...a],
1545
1822
  label: "",
1546
1823
  property: i,
1547
1824
  negative: d
@@ -1550,73 +1827,73 @@ const or = ({ property: r, onChange: o }) => {
1550
1827
  ]
1551
1828
  }
1552
1829
  );
1553
- }, br = ({ heading: r, items: o }) => {
1554
- const t = se(), l = H(() => {
1555
- const s = (i) => Y(
1556
- i.map((a) => a.styleType === "multiple" ? V(a.options, "key") : a.property)
1557
- ), n = Y(
1558
- o.map((i) => i.styleType === "accordion" ? s(i.items) : i.styleType === "multiple" ? V(i.options, "key") : i.property)
1559
- ), d = V(t, "property");
1560
- return He(n, d).length > 0;
1561
- }, [t, o]);
1830
+ }, Or = ({ heading: r, items: s }) => {
1831
+ const t = ce(), n = T(() => {
1832
+ const l = (i) => z(
1833
+ i.map((o) => o.styleType === "multiple" ? C(o.options, "key") : o.property)
1834
+ ), a = z(
1835
+ s.map((i) => i.styleType === "accordion" ? l(i.items) : i.styleType === "multiple" ? C(i.options, "key") : i.property)
1836
+ ), d = C(t, "property");
1837
+ return _e(a, d).length > 0;
1838
+ }, [t, s]);
1562
1839
  return /* @__PURE__ */ e.jsxs("details", { children: [
1563
1840
  /* @__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: [
1564
1841
  r,
1565
- l ? /* @__PURE__ */ e.jsx(
1842
+ n ? /* @__PURE__ */ e.jsx(
1566
1843
  "span",
1567
1844
  {
1568
- className: `ml-1 mr-2 inline-block h-[8px] w-[8px] rounded-full ${l ? "bg-blue-500" : "bg-gray-300"}`
1845
+ className: `ml-1 mr-2 inline-block h-[8px] w-[8px] rounded-full ${n ? "bg-blue-500" : "bg-gray-300"}`
1569
1846
  }
1570
1847
  ) : null
1571
1848
  ] }) }),
1572
- /* @__PURE__ */ e.jsx("div", { className: "p-2", children: o.map((s) => s.styleType === "multiple" ? /* @__PURE__ */ e.jsx(Ge, { ...s }, s.label) : /* @__PURE__ */ e.jsx(ye, { ...s }, s.label)) })
1849
+ /* @__PURE__ */ e.jsx("div", { className: "p-2", children: s.map((l) => l.styleType === "multiple" ? /* @__PURE__ */ e.jsx(st, { ...l }, l.label) : /* @__PURE__ */ e.jsx(ke, { ...l }, l.label)) })
1573
1850
  ] });
1574
- }, fr = Ne({}), ie = ({ section: r }) => {
1575
- const o = se(), t = I(
1576
- (n = []) => {
1851
+ }, Mr = Le({}), ge = ({ section: r }) => {
1852
+ const s = ce(), t = I(
1853
+ (a = []) => {
1577
1854
  const d = {};
1578
- for (let a = 0; a < o.length; a++)
1579
- d[o[a].property] = o[a].cls;
1855
+ for (let o = 0; o < s.length; o++)
1856
+ d[s[o].property] = s[o].cls;
1580
1857
  let i = !0;
1581
- for (const a in n)
1582
- if (!ne(d, a) || d[a] !== n[a]) {
1858
+ for (const o in a)
1859
+ if (!ue(d, o) || d[o] !== a[o]) {
1583
1860
  i = !1;
1584
1861
  break;
1585
1862
  }
1586
1863
  return i;
1587
1864
  },
1588
- [o]
1589
- ), l = H(() => {
1590
- if (o.length > 0 && r.heading === "Classes")
1865
+ [s]
1866
+ ), n = T(() => {
1867
+ if (s.length > 0 && r.heading === "Classes")
1591
1868
  return !0;
1592
- const n = (a) => Y(
1593
- a.map((x) => x.styleType === "multiple" ? Y(V(x.options, "key")) : x.property)
1594
- ), d = Y(
1595
- r.items.map((a) => a.styleType === "accordion" ? n(a.items) : a.styleType === "multiple" ? Y(V(a.options, "key")) : a.property)
1596
- ), i = V(o, "property");
1597
- return He(d, i).length > 0;
1598
- }, [o, r.heading, r.items]), s = H(() => ({}), []);
1599
- return /* @__PURE__ */ e.jsx(fr.Provider, { value: s, children: /* @__PURE__ */ e.jsxs(Ye, { value: r.heading, children: [
1600
- /* @__PURE__ */ e.jsx(We, { className: "px-3 py-2 text-xs hover:no-underline", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
1601
- /* @__PURE__ */ e.jsx("div", { className: `h-[8px] w-[8px] rounded-full ${l ? "bg-blue-500" : "bg-gray-300"}` }),
1869
+ const a = (o) => z(
1870
+ o.map((p) => p.styleType === "multiple" ? z(C(p.options, "key")) : p.property)
1871
+ ), d = z(
1872
+ r.items.map((o) => o.styleType === "accordion" ? a(o.items) : o.styleType === "multiple" ? z(C(o.options, "key")) : o.property)
1873
+ ), i = C(s, "property");
1874
+ return _e(d, i).length > 0;
1875
+ }, [s, r.heading, r.items]), l = T(() => ({}), []);
1876
+ return /* @__PURE__ */ e.jsx(Mr.Provider, { value: l, children: /* @__PURE__ */ e.jsxs(ae, { value: r.heading, children: [
1877
+ /* @__PURE__ */ e.jsx(ie, { className: "px-3 py-2 text-xs hover:no-underline", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
1878
+ /* @__PURE__ */ e.jsx("div", { className: `h-[8px] w-[8px] rounded-full ${n ? "bg-blue-500" : "bg-gray-300"}` }),
1602
1879
  r.heading
1603
1880
  ] }) }),
1604
- /* @__PURE__ */ e.jsx(Ze, { className: "bg-gray-100 px-3.5 py-2", children: L.Children.toArray(
1605
- r.items.map((n) => ne(n, "component") ? L.createElement(n.component, { key: n.label }) : ne(n, "styleType") ? n.styleType === "multiple" ? /* @__PURE__ */ e.jsx(Ge, { ...n }, n.label) : n.styleType === "accordion" && t(n == null ? void 0 : n.conditions) ? /* @__PURE__ */ e.jsx(br, { ...n }, n.label) : null : /* @__PURE__ */ e.jsx(ye, { ...n }, n.label))
1881
+ /* @__PURE__ */ e.jsx(de, { className: "bg-gray-100 px-3.5 py-2", children: $.Children.toArray(
1882
+ r.items.map((a) => ue(a, "component") ? $.createElement(a.component, { key: a.label }) : ue(a, "styleType") ? a.styleType === "multiple" ? /* @__PURE__ */ e.jsx(st, { ...a }, a.label) : a.styleType === "accordion" && t(a == null ? void 0 : a.conditions) ? /* @__PURE__ */ e.jsx(Or, { ...a }, a.label) : null : /* @__PURE__ */ e.jsx(ke, { ...a }, a.label))
1606
1883
  ) })
1607
1884
  ] }) });
1608
- }, vr = ({
1885
+ }, _r = ({
1609
1886
  item: r,
1610
- index: o,
1887
+ index: s,
1611
1888
  canDelete: t,
1612
- onChange: l,
1613
- onRemove: s
1889
+ onChange: n,
1890
+ onRemove: l
1614
1891
  }) => /* @__PURE__ */ e.jsxs("div", { className: `flex flex-col gap-1 border-gray-400 py-2 ${t ? "border-b" : ""}`, children: [
1615
1892
  /* @__PURE__ */ e.jsx(
1616
1893
  "input",
1617
1894
  {
1618
1895
  name: "key",
1619
- onChange: (n) => l(n, o),
1896
+ onChange: (a) => n(a, s),
1620
1897
  value: r.key,
1621
1898
  placeholder: "Key",
1622
1899
  className: "w-full rounded border-gray-300 bg-background p-0.5 pl-2 text-sm focus-visible:outline-0",
@@ -1629,7 +1906,7 @@ const or = ({ property: r, onChange: o }) => {
1629
1906
  "input",
1630
1907
  {
1631
1908
  name: "value",
1632
- onChange: (n) => w(r.key) ? {} : l(n, o),
1909
+ onChange: (a) => b(r.key) ? {} : n(a, s),
1633
1910
  value: r.value,
1634
1911
  placeholder: "Value",
1635
1912
  className: "w-full rounded border-gray-300 bg-background p-0.5 pl-2 text-sm focus-visible:outline-0",
@@ -1638,76 +1915,76 @@ const or = ({ property: r, onChange: o }) => {
1638
1915
  }
1639
1916
  ),
1640
1917
  /* @__PURE__ */ e.jsx(
1641
- Le,
1918
+ Ye,
1642
1919
  {
1643
- onClick: s,
1920
+ onClick: l,
1644
1921
  className: "h-6 w-6 cursor-pointer rounded border border-red-400 p-1 text-red-400 hover:opacity-80"
1645
1922
  }
1646
1923
  )
1647
1924
  ] })
1648
- ] }), wr = ({ section: r }) => {
1925
+ ] }), Er = ({ section: r }) => {
1649
1926
  var m;
1650
- const { setSyncState: o } = Ht(), t = oe(), [l, s] = S([]), [n] = ge(), d = Me(), i = `${c(n, "0.prop")}_attrs`;
1651
- le.useEffect(() => {
1652
- const h = V(c(t, i), (y, f) => ({ key: f, value: y }));
1653
- w(h) ? s([]) : s(h);
1654
- }, [c(t, i)]);
1655
- const a = () => s([...l, { key: "", value: "" }]), x = (h) => {
1656
- const y = lt(l, (f, O) => h !== O);
1657
- u(y);
1658
- }, g = (h, y) => {
1659
- const f = [...l];
1660
- f[y][h.target.name] = h.target.value, u(f);
1661
- }, u = le.useCallback(
1662
- (h = []) => {
1927
+ const { setSyncState: s } = Xt(), t = te(), [n, l] = k([]), [a] = je(), d = ze(), i = `${g(a, "0.prop")}_attrs`;
1928
+ se.useEffect(() => {
1929
+ const x = C(g(t, i), (y, v) => ({ key: v, value: y }));
1930
+ b(x) ? l([]) : l(x);
1931
+ }, [g(t, i)]);
1932
+ const o = () => l([...n, { key: "", value: "" }]), p = (x) => {
1933
+ const y = Oe(n, (v, L) => x !== L);
1934
+ c(y);
1935
+ }, u = (x, y) => {
1936
+ const v = [...n];
1937
+ v[y][x.target.name] = x.target.value, c(v);
1938
+ }, c = se.useCallback(
1939
+ (x = []) => {
1663
1940
  const y = {};
1664
- tt(h, (f) => {
1665
- w(f.key) || rt(y, f.key, f.value);
1666
- }), d([c(t, "_id")], { [i]: y }), o("UNSAVED");
1941
+ fe(x, (v) => {
1942
+ b(v.key) || Pe(y, v.key, v.value);
1943
+ }), d([g(t, "_id")], { [i]: y }), s("UNSAVED");
1667
1944
  },
1668
- [t, o, d, i]
1945
+ [t, s, d, i]
1669
1946
  );
1670
- return /* @__PURE__ */ e.jsxs(Ye, { value: r.heading, children: [
1671
- /* @__PURE__ */ e.jsx(We, { className: "px-3 py-2 text-xs hover:no-underline", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
1947
+ return /* @__PURE__ */ e.jsxs(ae, { value: r.heading, children: [
1948
+ /* @__PURE__ */ e.jsx(ie, { className: "px-3 py-2 text-xs hover:no-underline", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
1672
1949
  /* @__PURE__ */ e.jsx(
1673
1950
  "div",
1674
1951
  {
1675
- className: `h-[8px] w-[8px] rounded-full ${w(c(t, i)) ? "bg-gray-300" : "bg-blue-500"}`
1952
+ className: `h-[8px] w-[8px] rounded-full ${b(g(t, i)) ? "bg-gray-300" : "bg-blue-500"}`
1676
1953
  }
1677
1954
  ),
1678
1955
  "Attributes"
1679
1956
  ] }) }),
1680
- /* @__PURE__ */ e.jsx(Ze, { className: "bg-gray-100 px-3.5 py-2", children: /* @__PURE__ */ e.jsxs("div", { className: "no-scrollbar flex min-h-max flex-col gap-y-2 overflow-y-auto bg-gray-100 p-px", children: [
1681
- /* @__PURE__ */ e.jsxs(xe, { className: "mt-2 flex w-full items-center justify-between", children: [
1957
+ /* @__PURE__ */ e.jsx(de, { className: "bg-gray-100 px-3.5 py-2", children: /* @__PURE__ */ e.jsxs("div", { className: "no-scrollbar flex min-h-max flex-col gap-y-2 overflow-y-auto bg-gray-100 p-px", children: [
1958
+ /* @__PURE__ */ e.jsxs(Ce, { className: "mt-2 flex w-full items-center justify-between", children: [
1682
1959
  "Add Custom attributes",
1683
1960
  /* @__PURE__ */ e.jsxs(
1684
1961
  "div",
1685
1962
  {
1686
- className: `flex h-6 w-max items-center justify-center gap-x-0.5 rounded-full border p-1 px-2 text-xs ${!w(l) && w((m = me(l)) == null ? void 0 : m.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"}`,
1963
+ className: `flex h-6 w-max items-center justify-center gap-x-0.5 rounded-full border p-1 px-2 text-xs ${!b(n) && b((m = he(n)) == null ? void 0 : m.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"}`,
1687
1964
  onClick: () => {
1688
- var h;
1689
- !w(l) && w((h = me(l)) == null ? void 0 : h.key) || a();
1965
+ var x;
1966
+ !b(n) && b((x = he(n)) == null ? void 0 : x.key) || o();
1690
1967
  },
1691
1968
  children: [
1692
- /* @__PURE__ */ e.jsx(pe, { width: 12, height: 12 }),
1969
+ /* @__PURE__ */ e.jsx(ve, { width: 12, height: 12 }),
1693
1970
  " Add"
1694
1971
  ]
1695
1972
  }
1696
1973
  )
1697
1974
  ] }),
1698
1975
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col", children: [
1699
- w(l) && /* @__PURE__ */ e.jsx("div", { className: "flex h-12 items-center justify-center text-sm text-gray-400", children: "Click + Add to add attributes" }),
1700
- le.Children.toArray(
1701
- V(l, (h, y) => {
1702
- const f = l.length > 0 && y < l.length - 1;
1976
+ b(n) && /* @__PURE__ */ e.jsx("div", { className: "flex h-12 items-center justify-center text-sm text-gray-400", children: "Click + Add to add attributes" }),
1977
+ se.Children.toArray(
1978
+ C(n, (x, y) => {
1979
+ const v = n.length > 0 && y < n.length - 1;
1703
1980
  return /* @__PURE__ */ e.jsx(
1704
- vr,
1981
+ _r,
1705
1982
  {
1706
- item: h,
1983
+ item: x,
1707
1984
  index: y,
1708
- canDelete: f,
1709
- onChange: g,
1710
- onRemove: () => x(y)
1985
+ canDelete: v,
1986
+ onChange: u,
1987
+ onRemove: () => p(y)
1711
1988
  }
1712
1989
  );
1713
1990
  })
@@ -1716,11 +1993,11 @@ const or = ({ property: r, onChange: o }) => {
1716
1993
  ] }) })
1717
1994
  ] });
1718
1995
  };
1719
- function Cr() {
1720
- const [r, o] = Fe(), { flexChild: t, gridChild: l } = Bt(), [, s] = Ot(At), { t: n } = Be(), [d] = ge();
1721
- return w(d) ? /* @__PURE__ */ e.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 rounded-xl p-4", children: [
1722
- /* @__PURE__ */ e.jsx(Ie, { className: "mx-auto text-3xl" }),
1723
- /* @__PURE__ */ e.jsx("h1", { children: n("no_styling_block_selected") }),
1996
+ function Fr() {
1997
+ const [r, s] = qe(), { flexChild: t, gridChild: n } = Yt(), [, l] = tr(Wt), { t: a } = Ee(), [d] = je();
1998
+ return b(d) ? /* @__PURE__ */ e.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 rounded-xl p-4", children: [
1999
+ /* @__PURE__ */ e.jsx(We, { className: "mx-auto text-3xl" }),
2000
+ /* @__PURE__ */ e.jsx("h1", { children: a("no_styling_block_selected") }),
1724
2001
  /* @__PURE__ */ e.jsxs("p", { className: "text-xs ", children: [
1725
2002
  "Hint: Styling allowed blocks are highlighted with",
1726
2003
  " ",
@@ -1729,40 +2006,40 @@ function Cr() {
1729
2006
  ] })
1730
2007
  ] }) }) : (
1731
2008
  // eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions
1732
- /* @__PURE__ */ e.jsxs("div", { onClick: () => s(!1), className: "flex h-full flex-col", children: [
2009
+ /* @__PURE__ */ e.jsxs("div", { onClick: () => l(!1), className: "flex h-full flex-col", children: [
1733
2010
  /* @__PURE__ */ e.jsx("div", { className: "flex flex-col space-x-4 space-y-3 border-b border-border px-4 py-2", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-end gap-x-1.5", children: [
1734
- /* @__PURE__ */ e.jsx(xe, { htmlFor: "", className: "flex gap-x-1.5 text-xs italic", children: "State" }),
1735
- /* @__PURE__ */ e.jsxs(Ut, { defaultValue: r, onValueChange: (i) => o(i), children: [
1736
- /* @__PURE__ */ e.jsx(Gt, { className: "h-auto w-fit p-1 px-3", children: /* @__PURE__ */ e.jsx(Kt, { placeholder: "State" }) }),
1737
- /* @__PURE__ */ e.jsxs(qt, { children: [
1738
- /* @__PURE__ */ e.jsx(R, { value: "", children: "Normal" }),
1739
- /* @__PURE__ */ e.jsx(R, { value: "hover", children: "Hover" }),
1740
- /* @__PURE__ */ e.jsx(R, { value: "active", children: "Active" }),
1741
- /* @__PURE__ */ e.jsx(R, { value: "focus", children: "Focus" }),
1742
- /* @__PURE__ */ e.jsx(R, { value: "before", children: "Before" }),
1743
- /* @__PURE__ */ e.jsx(R, { value: "after", children: "After" }),
1744
- /* @__PURE__ */ e.jsx(R, { value: "only", children: "Only" }),
1745
- /* @__PURE__ */ e.jsx(R, { value: "first", children: "First" }),
1746
- /* @__PURE__ */ e.jsx(R, { value: "last", children: "Last" }),
1747
- /* @__PURE__ */ e.jsx(R, { value: "first-letter", children: "First Letter" }),
1748
- /* @__PURE__ */ e.jsx(R, { value: "first-line", children: "First Line" }),
1749
- /* @__PURE__ */ e.jsx(R, { value: "disabled", children: "Disabled" })
2011
+ /* @__PURE__ */ e.jsx(Ce, { htmlFor: "", className: "flex gap-x-1.5 text-xs italic", children: "State" }),
2012
+ /* @__PURE__ */ e.jsxs(ir, { defaultValue: r, onValueChange: (i) => s(i), children: [
2013
+ /* @__PURE__ */ e.jsx(dr, { className: "h-auto w-fit p-1 px-3", children: /* @__PURE__ */ e.jsx(cr, { placeholder: "State" }) }),
2014
+ /* @__PURE__ */ e.jsxs(pr, { children: [
2015
+ /* @__PURE__ */ e.jsx(A, { value: "", children: "Normal" }),
2016
+ /* @__PURE__ */ e.jsx(A, { value: "hover", children: "Hover" }),
2017
+ /* @__PURE__ */ e.jsx(A, { value: "active", children: "Active" }),
2018
+ /* @__PURE__ */ e.jsx(A, { value: "focus", children: "Focus" }),
2019
+ /* @__PURE__ */ e.jsx(A, { value: "before", children: "Before" }),
2020
+ /* @__PURE__ */ e.jsx(A, { value: "after", children: "After" }),
2021
+ /* @__PURE__ */ e.jsx(A, { value: "only", children: "Only" }),
2022
+ /* @__PURE__ */ e.jsx(A, { value: "first", children: "First" }),
2023
+ /* @__PURE__ */ e.jsx(A, { value: "last", children: "Last" }),
2024
+ /* @__PURE__ */ e.jsx(A, { value: "first-letter", children: "First Letter" }),
2025
+ /* @__PURE__ */ e.jsx(A, { value: "first-line", children: "First Line" }),
2026
+ /* @__PURE__ */ e.jsx(A, { value: "disabled", children: "Disabled" })
1750
2027
  ] })
1751
2028
  ] })
1752
2029
  ] }) }),
1753
- /* @__PURE__ */ e.jsxs(zt, { className: "no-scrollbar -mx-1 h-full overflow-x-hidden", children: [
1754
- /* @__PURE__ */ e.jsxs(_t, { type: "multiple", className: "h-full w-full", children: [
1755
- t && /* @__PURE__ */ e.jsx(ie, { section: er }),
1756
- l ? /* @__PURE__ */ e.jsx(ie, { section: tr }) : null,
1757
- rr.map((i) => /* @__PURE__ */ e.jsx(ie, { section: i }, i.heading)),
1758
- /* @__PURE__ */ e.jsx(wr, { section: { heading: "Attributes" } })
2030
+ /* @__PURE__ */ e.jsxs(ar, { className: "no-scrollbar -mx-1 h-full overflow-x-hidden", children: [
2031
+ /* @__PURE__ */ e.jsxs(tt, { type: "multiple", className: "h-full w-full", children: [
2032
+ t && /* @__PURE__ */ e.jsx(ge, { section: vr }),
2033
+ n ? /* @__PURE__ */ e.jsx(ge, { section: wr }) : null,
2034
+ jr.map((i) => /* @__PURE__ */ e.jsx(ge, { section: i }, i.heading)),
2035
+ /* @__PURE__ */ e.jsx(Er, { section: { heading: "Attributes" } })
1759
2036
  ] }),
1760
2037
  /* @__PURE__ */ e.jsx("div", { className: "h-60" })
1761
2038
  ] })
1762
2039
  ] })
1763
2040
  );
1764
2041
  }
1765
- const jr = {
2042
+ const Xr = {
1766
2043
  px: 1,
1767
2044
  "%": 1,
1768
2045
  em: 100,
@@ -1773,32 +2050,32 @@ const jr = {
1773
2050
  "-": 1,
1774
2051
  deg: 1,
1775
2052
  ms: 0.1
1776
- }, wl = () => {
1777
- const r = oe(), { t: o } = Be(), [t, l] = L.useState(""), [s, n] = L.useState({
1778
- onDrag: (a) => a,
1779
- onDragEnd: (a) => a,
2053
+ }, Yl = () => {
2054
+ const r = te(), { t: s } = Ee(), [t, n] = $.useState(""), [l, a] = $.useState({
2055
+ onDrag: (o) => o,
2056
+ onDragEnd: (o) => o,
1780
2057
  dragStartY: 0,
1781
2058
  dragging: !1,
1782
2059
  dragStartValue: 0,
1783
2060
  dragUnit: "",
1784
2061
  negative: !1,
1785
2062
  cssProperty: ""
1786
- }), d = de(
1787
- (a) => {
1788
- const x = !c(s, "negative", !1), g = c(s, "cssProperty", "");
1789
- let u = parseFloat(s.dragStartValue);
1790
- u = Ve(u) ? 0 : u;
1791
- let m = jr[s.dragUnit];
1792
- (X(g, "scale") || g === "opacity") && (m = 10);
1793
- let y = (s.dragStartY - a.pageY) / m + u;
1794
- x && y < 0 && (y = 0), g === "opacity" && y > 1 && (y = 1), s.onDrag(`${y}`), l(`${y}`);
2063
+ }), d = xe(
2064
+ (o) => {
2065
+ const p = !g(l, "negative", !1), u = g(l, "cssProperty", "");
2066
+ let c = parseFloat(l.dragStartValue);
2067
+ c = Me(c) ? 0 : c;
2068
+ let m = Xr[l.dragUnit];
2069
+ (Z(u, "scale") || u === "opacity") && (m = 10);
2070
+ let y = (l.dragStartY - o.pageY) / m + c;
2071
+ p && y < 0 && (y = 0), u === "opacity" && y > 1 && (y = 1), l.onDrag(`${y}`), n(`${y}`);
1795
2072
  },
1796
- [s],
2073
+ [l],
1797
2074
  50
1798
2075
  ), i = I(() => {
1799
- setTimeout(() => s.onDragEnd(`${t}`), 100), n({
1800
- onDrag: (a) => a,
1801
- onDragEnd: (a) => a,
2076
+ setTimeout(() => l.onDragEnd(`${t}`), 100), a({
2077
+ onDrag: (o) => o,
2078
+ onDragEnd: (o) => o,
1802
2079
  dragStartY: 0,
1803
2080
  dragging: !1,
1804
2081
  dragStartValue: 0,
@@ -1806,44 +2083,36 @@ const jr = {
1806
2083
  negative: !1,
1807
2084
  cssProperty: ""
1808
2085
  });
1809
- }, [s, t, n]);
1810
- return ot(r) ? /* @__PURE__ */ e.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 rounded-xl p-4", children: [
1811
- /* @__PURE__ */ e.jsx(Ie, { className: "mx-auto text-3xl" }),
1812
- /* @__PURE__ */ e.jsx("h1", { children: o("no_block_selected_for_styling") })
1813
- ] }) }) : (
1814
- // eslint-disable-next-line react/jsx-no-constructed-context-values
1815
- /* @__PURE__ */ e.jsxs(Ue.Provider, { value: { setDragData: n }, children: [
1816
- s.dragging ? (
1817
- // eslint-disable-next-line jsx-a11y/no-static-element-interactions
1818
- /* @__PURE__ */ e.jsx(
1819
- "div",
1820
- {
1821
- onMouseMove: d,
1822
- onMouseUp: () => {
1823
- i();
1824
- },
1825
- className: "absolute inset-0 z-30 cursor-row-resize bg-gray-300/10 "
1826
- }
1827
- )
1828
- ) : null,
1829
- /* @__PURE__ */ e.jsxs(Ct, { defaultValue: "settings", className: "flex h-full w-full flex-col py-1", children: [
1830
- /* @__PURE__ */ e.jsxs(jt, { className: "mx-1 grid grid-cols-2", children: [
1831
- /* @__PURE__ */ e.jsx(fe, { value: "settings", children: "Settings" }),
1832
- /* @__PURE__ */ e.jsx(fe, { value: "styling", children: "Styling" })
1833
- ] }),
1834
- /* @__PURE__ */ e.jsx(
1835
- ve,
1836
- {
1837
- value: "settings",
1838
- className: "no-scrollbar -mx-1 -mr-2 h-full flex-1 overflow-y-auto overflow-x-hidden",
1839
- children: /* @__PURE__ */ e.jsx(Jt, {})
1840
- }
1841
- ),
1842
- /* @__PURE__ */ e.jsx(ve, { value: "styling", className: "flex-1 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(Cr, {}) })
1843
- ] })
2086
+ }, [l, t, a]);
2087
+ return yt(r) ? /* @__PURE__ */ e.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 rounded-xl p-4", children: [
2088
+ /* @__PURE__ */ e.jsx(We, { className: "mx-auto text-3xl" }),
2089
+ /* @__PURE__ */ e.jsx("h1", { children: s("no_block_selected_for_styling") })
2090
+ ] }) }) : /* @__PURE__ */ e.jsxs(ot.Provider, { value: { setDragData: a }, children: [
2091
+ l.dragging ? /* @__PURE__ */ e.jsx(
2092
+ "div",
2093
+ {
2094
+ onMouseMove: d,
2095
+ onMouseUp: () => i(),
2096
+ className: "absolute inset-0 z-30 cursor-row-resize bg-gray-300/10 "
2097
+ }
2098
+ ) : null,
2099
+ /* @__PURE__ */ e.jsxs(It, { defaultValue: "settings", className: "flex h-full w-full flex-col py-1", children: [
2100
+ /* @__PURE__ */ e.jsxs(Lt, { className: "mx-1 grid grid-cols-2", children: [
2101
+ /* @__PURE__ */ e.jsx(Re, { value: "settings", children: "Settings" }),
2102
+ /* @__PURE__ */ e.jsx(Re, { value: "styling", children: "Styling" })
2103
+ ] }),
2104
+ /* @__PURE__ */ e.jsx(
2105
+ Ve,
2106
+ {
2107
+ value: "settings",
2108
+ className: "no-scrollbar -mx-1 -mr-2 h-full flex-1 overflow-y-auto overflow-x-hidden",
2109
+ children: /* @__PURE__ */ e.jsx(fr, {})
2110
+ }
2111
+ ),
2112
+ /* @__PURE__ */ e.jsx(Ve, { value: "styling", className: "flex-1 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(Fr, {}) })
1844
2113
  ] })
1845
- );
2114
+ ] });
1846
2115
  };
1847
2116
  export {
1848
- wl as default
2117
+ Yl as default
1849
2118
  };