@chaibuilder/sdk 1.2.19 → 1.2.20

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