@chaibuilder/sdk 1.2.19 → 1.2.21

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