@chaibuilder/sdk 1.0.9 → 1.0.10

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 (162) hide show
  1. package/LICENSE +28 -0
  2. package/README.md +123 -21
  3. package/dist/AddBlocks-tdvDe7xL.cjs +3 -0
  4. package/dist/{AddBlocks-d10b7b87.js → AddBlocks-xR2s2BVa.js} +47 -44
  5. package/dist/BrandingOptions-DpJ-oNnf.cjs +1 -0
  6. package/dist/{BrandingOptions-f4ab5d9f.js → BrandingOptions-cHK2bVZy.js} +14 -18
  7. package/dist/{CanvasArea-10356200.js → CanvasArea-2zqT1lSE.js} +492 -503
  8. package/dist/CanvasArea-Br8bBSeT.cjs +46 -0
  9. package/dist/ChaiBuilderEditor-SacH75l4.cjs +163 -0
  10. package/dist/{index-aa42febc.js → ChaiBuilderEditor-h9bXC4l-.js} +11215 -15404
  11. package/dist/Class-_uCzl5v1.cjs +1 -0
  12. package/dist/{html-to-json-45e0e3b5.js → Class-l7qYbuoN.js} +185 -366
  13. package/dist/{CurrentPage-35e14043.js → CurrentPage-4lTETR2f.js} +26 -23
  14. package/dist/CurrentPage-nlUWJiUA.cjs +1 -0
  15. package/dist/{ImagesPanel-8b7a989d.cjs → ImagesPanel-6us7hiLN.cjs} +1 -1
  16. package/dist/{ImagesPanel-47ac13c3.js → ImagesPanel-oaHOD-Ex.js} +4 -4
  17. package/dist/Layers-Vw4XE6YB.cjs +1 -0
  18. package/dist/{Layers-c3dd4fc8.js → Layers-wOfijZnb.js} +42 -41
  19. package/dist/MarkAsGlobalBlock-1J_YyL1L.cjs +1 -0
  20. package/dist/{MarkAsGlobalBlock-505ae793.js → MarkAsGlobalBlock-xRyn29gC.js} +17 -20
  21. package/dist/{PagesPanel-bafc506f.js → PagesPanel-82gCVzHS.js} +16 -13
  22. package/dist/PagesPanel-ZKRdK-mI.cjs +1 -0
  23. package/dist/ProjectPanel-kYg4KkJu.cjs +1 -0
  24. package/dist/{ProjectPanel-6113f394.js → ProjectPanel-vz5WOyqZ.js} +22 -19
  25. package/dist/Settings-1E3Y_5r6.cjs +1 -0
  26. package/dist/{Settings-1c41c514.js → Settings-IuAF359L.js} +297 -296
  27. package/dist/SidePanels-WL1UioF2.cjs +1 -0
  28. package/dist/{SidePanels-c13f87dc.js → SidePanels-xssTWt4M.js} +34 -42
  29. package/dist/Topbar-3ozdWfSy.cjs +1 -0
  30. package/dist/{Topbar-b38d5d50.js → Topbar-H0f0EL6-.js} +33 -35
  31. package/dist/UnsplashImages-BoBBSi1a.cjs +1 -0
  32. package/dist/{UnsplashImages-4edb97e7.js → UnsplashImages-gPcBLjgB.js} +13 -14
  33. package/dist/UploadImages-T6kW0s3G.cjs +1 -0
  34. package/dist/{UploadImages-52181c3e.js → UploadImages-_ZyUU66E.js} +11 -12
  35. package/dist/{accordion-c0176dc5.js → accordion-oPUeqPCZ.js} +2 -2
  36. package/dist/{accordion-0afd8143.cjs → accordion-ynvFtV_p.cjs} +1 -1
  37. package/dist/{add-page-modal-08a19915.js → add-page-modal-J1E7rh1U.js} +25 -22
  38. package/dist/add-page-modal-eiiUZCJX.cjs +1 -0
  39. package/dist/alert-dialog-GNfnpqFB.js +64 -0
  40. package/dist/alert-dialog-Mv0-wAvS.cjs +1 -0
  41. package/dist/{command-b1103666.cjs → command-ThdTuUxt.cjs} +1 -1
  42. package/dist/{command-6f260f61.js → command-VHca6CcN.js} +3 -3
  43. package/dist/confirm-alert-8EHe0OOd.cjs +1 -0
  44. package/dist/confirm-alert-b0e_BLhF.js +36 -0
  45. package/dist/{context-menu-e1c240ce.js → context-menu-8dC9uGXj.js} +2 -2
  46. package/dist/{context-menu-fec580f2.cjs → context-menu-IgLbIuth.cjs} +1 -1
  47. package/dist/controls-Ni5kEzLz.js +103 -0
  48. package/dist/controls-xUKa23ic.cjs +1 -0
  49. package/dist/core.cjs +1 -1
  50. package/dist/core.d.ts +1 -10
  51. package/dist/core.js +116 -69
  52. package/dist/delete-page-modal-TGTmRjyn.cjs +1 -0
  53. package/dist/{delete-page-modal-9b37665b.js → delete-page-modal-ysj4O0bM.js} +25 -22
  54. package/dist/{dialog-170eaad9.cjs → dialog-S_QbL1iq.cjs} +1 -1
  55. package/dist/{dialog-18207bef.js → dialog-jrw9DF1f.js} +2 -2
  56. package/dist/{dropdown-menu-ae3ed09b.js → dropdown-menu-S03K_fNs.js} +2 -2
  57. package/dist/{dropdown-menu-84b2439e.cjs → dropdown-menu-sMXR59cB.cjs} +1 -1
  58. package/dist/{form-25e1af37.js → form-dVpOAyRl.js} +2 -2
  59. package/dist/{form-ea21db6c.cjs → form-nRAvKPQj.cjs} +1 -1
  60. package/dist/{functions-83b1de8d.js → functions-nNTuSTsR.js} +1 -1
  61. package/dist/functions-pcUZhFJM.js +12 -0
  62. package/dist/{functions-f84d5e2a.cjs → functions-sCuB7nvZ.cjs} +1 -1
  63. package/dist/functions-uw7QP2kT.cjs +1 -0
  64. package/dist/html-to-json-P6GpbcQX.cjs +1 -0
  65. package/dist/html-to-json-pdHQfRkN.js +178 -0
  66. package/dist/index-8L3zCc6V.cjs +1 -0
  67. package/dist/index-cZ4uo6aT.js +2256 -0
  68. package/dist/{label-e770a087.js → label-KaP7MRrs.js} +2 -2
  69. package/dist/{label-167415e5.cjs → label-tFm8HZdb.cjs} +1 -1
  70. package/dist/lib.cjs +1 -1
  71. package/dist/lib.d.ts +20 -13
  72. package/dist/lib.js +24 -23
  73. package/dist/{link-57de608a.js → link-6o6n2Tnd.js} +4 -4
  74. package/dist/link-ece8dZGH.cjs +1 -0
  75. package/dist/{page-viewer-5c733179.js → page-viewer-84Giu0Rs.js} +29 -26
  76. package/dist/page-viewer-OdVEG83P.cjs +1 -0
  77. package/dist/{popover-f7addcf4.js → popover-a84pbVhQ.js} +2 -2
  78. package/dist/{popover-7cb9079b.cjs → popover-fKjgcRUx.cjs} +1 -1
  79. package/dist/{project-general-setting-d9736056.js → project-general-setting-8OEVVxzn.js} +20 -17
  80. package/dist/project-general-setting-laHNQPW5.cjs +1 -0
  81. package/dist/{project-seo-setting-d81fc1e3.js → project-seo-setting-9kD_stdI.js} +11 -12
  82. package/dist/project-seo-setting-F3Opt9Uj.cjs +1 -0
  83. package/dist/render.cjs +1 -1
  84. package/dist/render.d.ts +7 -7
  85. package/dist/render.js +3 -3
  86. package/dist/{scroll-area-bb343b86.cjs → scroll-area-FiHvy-TZ.cjs} +1 -1
  87. package/dist/{scroll-area-83bd9e8f.js → scroll-area-ewXbxc3n.js} +2 -2
  88. package/dist/{select-0e32300c.cjs → select-7bjg-rr9.cjs} +1 -1
  89. package/dist/{select-7fddd7c3.js → select-POGdEDHT.js} +2 -2
  90. package/dist/{separator-a597dba7.cjs → separator-3Civ-6hb.cjs} +1 -1
  91. package/dist/{separator-a80d065b.js → separator-SctTn0Qi.js} +2 -2
  92. package/dist/server.d.ts +7 -10
  93. package/dist/server.js +0 -3
  94. package/dist/single-page-detail-X0TGlsT4.cjs +1 -0
  95. package/dist/{single-page-detail-04410e64.js → single-page-detail-iXpavDy8.js} +32 -29
  96. package/dist/skeleton-CU_FIbg3.js +239 -0
  97. package/dist/skeleton-JHP9zwL2.cjs +1 -0
  98. package/dist/studio.cjs +1 -0
  99. package/dist/studio.d.ts +13 -0
  100. package/dist/studio.js +39 -0
  101. package/dist/{tabs-85caa1e8.js → tabs-Gb9v5dVb.js} +2 -2
  102. package/dist/{tabs-860e37aa.cjs → tabs-iWeaaVrg.cjs} +1 -1
  103. package/dist/{textarea-a338ede6.cjs → textarea-1kZEh7ki.cjs} +1 -1
  104. package/dist/{textarea-0750bcd2.js → textarea-b2QvVhrK.js} +2 -2
  105. package/dist/{toggle-00c9d11e.js → toggle-ASJRAaGP.js} +2 -2
  106. package/dist/{toggle-b90fed97.cjs → toggle-ehNIPmme.cjs} +1 -1
  107. package/dist/ui.cjs +1 -1
  108. package/dist/ui.d.ts +69 -4
  109. package/dist/ui.js +272 -212
  110. package/dist/useAddBlock-1cMXaOVk.cjs +1 -0
  111. package/dist/useAddBlock-BOjrGBEO.js +86 -0
  112. package/dist/useAllBlocks-RU_Xw8j9.cjs +1 -0
  113. package/dist/useAllBlocks-lX6uVO39.js +20 -0
  114. package/dist/useChaiExternalData-4K9WxANa.js +6 -0
  115. package/dist/useChaiExternalData-DkyBJ81C.cjs +1 -0
  116. package/dist/useDarkMode-JWkrNFpH.js +23 -0
  117. package/dist/useDarkMode-zeTW_UUR.cjs +1 -0
  118. package/dist/useFeatureSupport-jWSuY7wk.js +16 -0
  119. package/dist/useFeatureSupport-tZ0QfBxp.cjs +1 -0
  120. package/dist/useHiddenBlocks-3MsGOJ1s.js +15 -0
  121. package/dist/useHiddenBlocks-oJuQDmTy.cjs +1 -0
  122. package/dist/useLanguage-O1uu2Bzu.js +216 -0
  123. package/dist/useLanguage-Y3qgAbgG.cjs +1 -0
  124. package/dist/useMarkAsGlobalBlock-DB5B1UP6.js +25 -0
  125. package/dist/useMarkAsGlobalBlock-toxRSLc_.cjs +1 -0
  126. package/dist/useUiLibraries-4hPOi8DI.js +12 -0
  127. package/dist/useUiLibraries-9FhQCpKo.cjs +1 -0
  128. package/package.json +19 -5
  129. package/dist/AddBlocks-76275943.cjs +0 -3
  130. package/dist/BrandingOptions-d3b3309a.cjs +0 -1
  131. package/dist/CanvasArea-9f94cd28.cjs +0 -46
  132. package/dist/CurrentPage-edb509db.cjs +0 -1
  133. package/dist/Layers-ecba52c1.cjs +0 -1
  134. package/dist/MarkAsGlobalBlock-3a06a159.cjs +0 -1
  135. package/dist/PagesPanel-f4329082.cjs +0 -1
  136. package/dist/ProjectPanel-ce3116d3.cjs +0 -1
  137. package/dist/Settings-b6a2bef6.cjs +0 -1
  138. package/dist/SidePanels-2cc72c0b.cjs +0 -1
  139. package/dist/Topbar-3b9db9f3.cjs +0 -1
  140. package/dist/UnsplashImages-98c085c2.cjs +0 -1
  141. package/dist/UploadImages-61ef83ad.cjs +0 -1
  142. package/dist/add-page-modal-7f9ff733.cjs +0 -1
  143. package/dist/confirm-alert-c1fdf1e4.js +0 -35
  144. package/dist/confirm-alert-e1ea5110.cjs +0 -1
  145. package/dist/delete-page-modal-7066b01f.cjs +0 -1
  146. package/dist/html-to-json-aadcbf66.cjs +0 -1
  147. package/dist/index-c535cc95.cjs +0 -164
  148. package/dist/link-24679521.cjs +0 -1
  149. package/dist/page-viewer-da99c71e.cjs +0 -1
  150. package/dist/project-general-setting-90f8416d.cjs +0 -1
  151. package/dist/project-seo-setting-6eef8387.cjs +0 -1
  152. package/dist/single-page-detail-90f49d7a.cjs +0 -1
  153. package/dist/useBuilderProp-21feb2da.js +0 -296
  154. package/dist/useBuilderProp-adacf42f.cjs +0 -1
  155. package/dist/useChaiExternalData-192c7896.js +0 -5
  156. package/dist/useChaiExternalData-a90e8aac.cjs +0 -1
  157. /package/dist/{MODIFIERS-2f19c314.js → MODIFIERS-DsEzQ3aH.js} +0 -0
  158. /package/dist/{MODIFIERS-4716c669.cjs → MODIFIERS-Fx6WAZcw.cjs} +0 -0
  159. /package/dist/{jsx-runtime-5c3ac4f7.cjs → jsx-runtime-JYMCiFoE.cjs} +0 -0
  160. /package/dist/{jsx-runtime-944c88e2.js → jsx-runtime-Sp0orL4X.js} +0 -0
  161. /package/dist/{utils-ac68b2c8.js → utils-dze1SGvB.js} +0 -0
  162. /package/dist/{utils-3c452dd0.cjs → utils-qK_SjzzV.cjs} +0 -0
@@ -1,33 +1,36 @@
1
- import { j as e } from "./jsx-runtime-944c88e2.js";
1
+ import { j as e } from "./jsx-runtime-Sp0orL4X.js";
2
2
  import * as ne from "react";
3
- import P, { useState as w, useEffect as E, useMemo as k, useCallback as A, createContext as Oe, useContext as re } from "react";
3
+ import $, { useState as w, useEffect as E, useMemo as k, useCallback as A, createContext as Oe, useContext as re } from "react";
4
4
  import { useThrottledCallback as me } from "@react-hookz/web";
5
5
  import { map as C, isEmpty as b, last as ye, forEach as je, set as Me, get as p, startCase as Y, filter as be, truncate as it, isArray as ae, includes as M, first as we, split as dt, toLower as te, find as ct, omit as pt, keys as ut, cloneDeep as xt, each as gt, capitalize as ht, reject as mt, nth as Re, startsWith as z, isNumber as yt, parseInt as bt, isNaN as _e, findLast as ft, has as ge, flatten as U, intersection as Ee, isNull as vt } from "lodash";
6
6
  import { useTranslation as Fe } from "react-i18next";
7
- import { PlusIcon as Ce, Cross2Icon as Ye, EyeOpenIcon as jt, EyeClosedIcon as Ve, BorderAllIcon as O, WidthIcon as R, HeightIcon as V, ArrowUpIcon as q, ArrowRightIcon as J, ArrowDownIcon as Q, ArrowLeftIcon as ee, ArrowTopLeftIcon as wt, ArrowTopRightIcon as Ct, ArrowBottomRightIcon as Nt, ArrowBottomLeftIcon as kt, AlignLeftIcon as St, AlignCenterHorizontallyIcon as Tt, AlignRightIcon as Rt, StretchHorizontallyIcon as Vt, FontItalicIcon as Ht, UnderlineIcon as Bt, OverlineIcon as At, LetterCaseUppercaseIcon as Dt, Cross1Icon as Pt, InfoCircledIcon as Ne, MinusIcon as $t, BoxIcon as Xe, TriangleDownIcon as It, RowSpacingIcon as Lt, TrashIcon as We, MixerHorizontalIcon as Ze } from "@radix-ui/react-icons";
8
- import { T as Ot, a as Mt, b as He, c as Be } from "./tabs-85caa1e8.js";
7
+ import { PlusIcon as Ce, Cross2Icon as Ye, EyeOpenIcon as jt, EyeClosedIcon as Ve, BorderAllIcon as O, WidthIcon as R, HeightIcon as V, ArrowUpIcon as q, ArrowRightIcon as J, ArrowDownIcon as Q, ArrowLeftIcon as ee, ArrowTopLeftIcon as wt, ArrowTopRightIcon as Ct, ArrowBottomRightIcon as Nt, ArrowBottomLeftIcon as kt, AlignLeftIcon as Tt, AlignCenterHorizontallyIcon as St, AlignRightIcon as Rt, StretchHorizontallyIcon as Vt, FontItalicIcon as Bt, UnderlineIcon as Ht, OverlineIcon as At, LetterCaseUppercaseIcon as Dt, Cross1Icon as $t, InfoCircledIcon as Ne, MinusIcon as Pt, BoxIcon as Xe, TriangleDownIcon as It, RowSpacingIcon as Lt, TrashIcon as We, MixerHorizontalIcon as Ze } from "@radix-ui/react-icons";
8
+ import { T as Ot, a as Mt, b as Be, c as He } from "./tabs-Gb9v5dVb.js";
9
9
  import _t from "@rjsf/core";
10
10
  import Et from "@rjsf/validator-ajv8";
11
- import { D as G, E as Ft, d as ze, G as Ue, H as Yt, I as Xt, J as Wt, j as ke, K as Ge, L as Ke, i as qe, e as Zt, M as Je, f as Ae, N as pe, c as zt, O as Ut, P as Gt } from "./index-aa42febc.js";
12
- import { getChaiDataProviders as Kt, getBlockComponent as Qe, SingleLineText as qt } from "@chaibuilder/blocks";
13
- import { EditIcon as Jt, TrashIcon as Qt, Check as er } from "lucide-react";
14
- import { u as et } from "./useChaiExternalData-192c7896.js";
15
- import { l as X, m as W, n as Z, B as ue, o as tr } from "./useBuilderProp-21feb2da.js";
16
- import { D as rr, a as sr, b as lr, c as or, e as nr, f as ar, d as ir } from "./dialog-18207bef.js";
17
- import { P as dr, a as cr, b as pr } from "./popover-f7addcf4.js";
18
- import { C as ur, b as xr, c as gr, d as hr, e as mr, f as yr, I as br } from "./command-6f260f61.js";
19
- import { A as tt, a as ie, b as de, c as ce } from "./accordion-c0176dc5.js";
20
- import { R as fr, I as vr, a as jr, L as wr } from "./link-57de608a.js";
21
- import { useAtom as Cr } from "jotai";
22
- import Nr from "react-autosuggest";
23
- import kr from "fuse.js";
24
- import { A as Sr, C as xe, d as Tr } from "./html-to-json-45e0e3b5.js";
25
- import { L as Se } from "./label-e770a087.js";
26
- import { S as Rr } from "./MODIFIERS-2f19c314.js";
27
- import { S as Vr } from "./scroll-area-83bd9e8f.js";
28
- import { S as Hr, c as Br, b as Ar, d as Dr, f as H } from "./select-7fddd7c3.js";
11
+ import { m as G, E as Ft, a as ze, q as ke, l as Ue, p as Yt, o as Xt, G as Wt } from "./ChaiBuilderEditor-h9bXC4l-.js";
12
+ import { f as Ge, g as Zt, u as Ke, a as qe, d as Je, b as pe } from "./useLanguage-O1uu2Bzu.js";
13
+ import { g as zt, a as Ut } from "./controls-Ni5kEzLz.js";
14
+ import { getChaiDataProviders as Gt, getBlockComponent as Qe, SingleLineText as Kt } from "@chaibuilder/blocks";
15
+ import { EditIcon as qt, TrashIcon as Jt, Check as Qt } from "lucide-react";
16
+ import { T as X, a as W, c as Z, B as ue, e as er } from "./skeleton-CU_FIbg3.js";
17
+ import { D as tr, a as rr, b as sr, c as or, e as lr, f as nr, d as ar } from "./dialog-jrw9DF1f.js";
18
+ import { P as ir, a as dr, b as cr } from "./popover-a84pbVhQ.js";
19
+ import { C as pr, b as ur, c as xr, d as gr, e as hr, f as mr, I as yr } from "./command-VHca6CcN.js";
20
+ import { u as et } from "./useChaiExternalData-4K9WxANa.js";
21
+ import { A as tt, a as ie, b as de, c as ce } from "./accordion-oPUeqPCZ.js";
22
+ import { R as br, I as fr, a as vr, L as jr } from "./link-6o6n2Tnd.js";
23
+ import { useAtom as wr } from "jotai";
24
+ import Cr from "react-autosuggest";
25
+ import Nr from "fuse.js";
26
+ import { A as kr, C as xe, g as Tr } from "./Class-l7qYbuoN.js";
27
+ import { L as Te } from "./label-KaP7MRrs.js";
28
+ import { S as Sr } from "./MODIFIERS-DsEzQ3aH.js";
29
+ import { a as Rr, u as Ae } from "./useDarkMode-JWkrNFpH.js";
30
+ import { S as Vr } from "./scroll-area-ewXbxc3n.js";
31
+ import { S as Br, c as Hr, b as Ar, d as Dr, f as B } from "./select-POGdEDHT.js";
29
32
  import "@radix-ui/react-tabs";
30
- import "./utils-ac68b2c8.js";
33
+ import "./utils-dze1SGvB.js";
31
34
  import "clsx";
32
35
  import "tailwind-merge";
33
36
  import "@radix-ui/react-scroll-area";
@@ -39,9 +42,8 @@ import "react-dnd";
39
42
  import "@minoru/react-dnd-treeview";
40
43
  import "react-hotkeys-hook";
41
44
  import "flat-to-nested";
45
+ import "./functions-pcUZhFJM.js";
42
46
  import "redux-undo";
43
- import "sonner";
44
- import "@radix-ui/react-alert-dialog";
45
47
  import "@radix-ui/react-slot";
46
48
  import "class-variance-authority";
47
49
  import "@radix-ui/react-tooltip";
@@ -51,21 +53,20 @@ import "@radix-ui/react-popover";
51
53
  import "cmdk";
52
54
  import "@radix-ui/react-accordion";
53
55
  import "react-icons-picker";
54
- import "./ImagesPanel-47ac13c3.js";
56
+ import "./ImagesPanel-oaHOD-Ex.js";
55
57
  import "react-quill";
56
- import "himalaya";
57
58
  import "@radix-ui/react-label";
58
59
  import "@radix-ui/react-select";
59
- const Pr = P.lazy(() => import("react-json-view"));
60
- function $r(t) {
60
+ const $r = $.lazy(() => import("react-json-view"));
61
+ function Pr(t) {
61
62
  const s = [], r = {};
62
- function l(o, a) {
63
+ function o(l, a) {
63
64
  je(a, (d, i) => {
64
- const n = o ? `${o}.${i}` : i, u = ae(d) ? "list" : typeof d;
65
- s.push(n), r[n] = u === "string" ? "text" : u === "object" ? "model" : u, u === "object" && !ae(d) && l(n, d);
65
+ const n = l ? `${l}.${i}` : i, u = ae(d) ? "list" : typeof d;
66
+ s.push(n), r[n] = u === "string" ? "text" : u === "object" ? "model" : u, u === "object" && !ae(d) && o(n, d);
66
67
  });
67
68
  }
68
- return l("", pt(t, ["styles", "_type", "_id", "_name", "_bindings"])), { paths: s, pathsType: r };
69
+ return o("", pt(t, ["styles", "_type", "_id", "_name", "_bindings"])), { paths: s, pathsType: r };
69
70
  }
70
71
  const fe = ({ data: t, fullView: s }) => {
71
72
  if (!t)
@@ -74,7 +75,7 @@ const fe = ({ data: t, fullView: s }) => {
74
75
  return s ? typeof t == "object" ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
75
76
  /* @__PURE__ */ e.jsx("div", { className: "h-3" }),
76
77
  /* @__PURE__ */ e.jsx(Ft, { children: /* @__PURE__ */ e.jsx(
77
- Pr,
78
+ $r,
78
79
  {
79
80
  style: { maxHeight: "40vh", overflowY: "auto" },
80
81
  name: "Content",
@@ -93,21 +94,21 @@ const fe = ({ data: t, fullView: s }) => {
93
94
  type: t,
94
95
  value: s = "",
95
96
  setValue: r,
96
- data: l,
97
- onChange: o,
97
+ data: o,
98
+ onChange: l,
98
99
  dataType: a,
99
100
  appliedBindings: d
100
101
  }) => {
101
- const { paths: i, pathsType: n } = $r(l), u = t === "PROP" ? Qe(l == null ? void 0 : l._type) : {}, x = t === "PROP", [c, m] = w(!1), h = k(() => t === "PROP" ? i.filter(
102
+ const { paths: i, pathsType: n } = Pr(o), u = t === "PROP" ? Qe(o == null ? void 0 : o._type) : {}, x = t === "PROP", [c, m] = w(!1), h = k(() => t === "PROP" ? i.filter(
102
103
  (g) => !M(d, g) && p(u, `props.${we(dt(g, "."))}.binding`)
103
104
  ) : i.filter((g) => a === p(n, g, "")), [t, i, d, a, u]);
104
105
  return E(() => {
105
- s && o(s);
106
+ s && l(s);
106
107
  }, [s, t]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
107
108
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-4", children: [
108
109
  /* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted-foreground", children: Y(te(t)) }),
109
- /* @__PURE__ */ e.jsxs(dr, { open: c, onOpenChange: m, children: [
110
- /* @__PURE__ */ e.jsx(cr, { asChild: !0, children: /* @__PURE__ */ e.jsx(
110
+ /* @__PURE__ */ e.jsxs(ir, { open: c, onOpenChange: m, children: [
111
+ /* @__PURE__ */ e.jsx(dr, { asChild: !0, children: /* @__PURE__ */ e.jsx(
111
112
  ue,
112
113
  {
113
114
  variant: "outline",
@@ -125,24 +126,24 @@ const fe = ({ data: t, fullView: s }) => {
125
126
  ] })
126
127
  }
127
128
  ) }),
128
- /* @__PURE__ */ e.jsx(pr, { className: "p-0 z-[999] min-w-[300px]", side: "right", align: "start", children: /* @__PURE__ */ e.jsxs(ur, { children: [
129
- /* @__PURE__ */ e.jsx(xr, { placeholder: `Choose ${te(t)}...` }),
130
- /* @__PURE__ */ e.jsxs(gr, { children: [
131
- /* @__PURE__ */ e.jsx(hr, { children: "No results found." }),
132
- /* @__PURE__ */ e.jsx(mr, { children: C(h, (g) => /* @__PURE__ */ e.jsxs(
133
- yr,
129
+ /* @__PURE__ */ e.jsx(cr, { className: "p-0 z-[999] min-w-[300px]", side: "right", align: "start", children: /* @__PURE__ */ e.jsxs(pr, { children: [
130
+ /* @__PURE__ */ e.jsx(ur, { placeholder: `Choose ${te(t)}...` }),
131
+ /* @__PURE__ */ e.jsxs(xr, { children: [
132
+ /* @__PURE__ */ e.jsx(gr, { children: "No results found." }),
133
+ /* @__PURE__ */ e.jsx(hr, { children: C(h, (g) => /* @__PURE__ */ e.jsxs(
134
+ mr,
134
135
  {
135
136
  value: g,
136
137
  className: `cursor-pointer ${x ? "flex justify-between items-center" : "flex flex-col items-start justify-start"}`,
137
138
  onSelect: (f) => {
138
- r(ct(h, (S) => S === f) || null), m(!1);
139
+ r(ct(h, (T) => T === f) || null), m(!1);
139
140
  },
140
141
  children: [
141
142
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
142
- /* @__PURE__ */ e.jsx(er, { className: `w-4 h-4 text-green-500 ${s === g ? "" : "opacity-0"}` }),
143
+ /* @__PURE__ */ e.jsx(Qt, { className: `w-4 h-4 text-green-500 ${s === g ? "" : "opacity-0"}` }),
143
144
  g
144
145
  ] }),
145
- x ? /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx("span", { className: "text-[10px] text-purple-500 bg-purple-100 px-2 py-0.5 rounded-full", children: Y(p(n, g, "")) }) }) : /* @__PURE__ */ e.jsx("div", { className: "pl-6", children: /* @__PURE__ */ e.jsx(fe, { data: p(l, g) }) })
146
+ x ? /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx("span", { className: "text-[10px] text-purple-500 bg-purple-100 px-2 py-0.5 rounded-full", children: Y(p(n, g, "")) }) }) : /* @__PURE__ */ e.jsx("div", { className: "pl-6", children: /* @__PURE__ */ e.jsx(fe, { data: p(o, g) }) })
146
147
  ]
147
148
  },
148
149
  g
@@ -151,15 +152,15 @@ const fe = ({ data: t, fullView: s }) => {
151
152
  ] }) })
152
153
  ] })
153
154
  ] }),
154
- !x && !b(s) && /* @__PURE__ */ e.jsx("div", { className: "pt-2", children: /* @__PURE__ */ e.jsx(fe, { data: p(l, s, ""), fullView: !0 }) })
155
+ !x && !b(s) && /* @__PURE__ */ e.jsx("div", { className: "pt-2", children: /* @__PURE__ */ e.jsx(fe, { data: p(o, s, ""), fullView: !0 }) })
155
156
  ] });
156
157
  }, Ir = ({
157
158
  appliedBindings: t = [],
158
159
  onAddBinding: s,
159
160
  editMode: r,
160
- item: l
161
+ item: o
161
162
  }) => {
162
- const [o, a] = w(r ? l.key : ""), [d, i] = w(r ? l.value : ""), n = G(), [u] = et(), x = A(
163
+ const [l, a] = w(r ? o.key : ""), [d, i] = w(r ? o.value : ""), n = G(), [u] = et(), x = A(
163
164
  (h, g) => {
164
165
  if (b(h))
165
166
  return "";
@@ -167,16 +168,16 @@ const fe = ({ data: t, fullView: s }) => {
167
168
  const f = p(g === "PROP" ? n : u, h, "");
168
169
  if (ae(f))
169
170
  return "list";
170
- const S = typeof f;
171
- return S === "string" ? "text" : S === "object" ? "model" : S;
171
+ const T = typeof f;
172
+ return T === "string" ? "text" : T === "object" ? "model" : T;
172
173
  }
173
174
  },
174
175
  [n, u]
175
- ), [c, m] = w(r ? x(l.key, "PROP") : "");
176
+ ), [c, m] = w(r ? x(o.key, "PROP") : "");
176
177
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
177
178
  /* @__PURE__ */ e.jsxs(or, { children: [
178
- /* @__PURE__ */ e.jsx(nr, { children: "Add Data Binding" }),
179
- /* @__PURE__ */ e.jsx(ar, { className: "text-xs", children: "Add prop and path of binding. Click save when you're done." })
179
+ /* @__PURE__ */ e.jsx(lr, { children: "Add Data Binding" }),
180
+ /* @__PURE__ */ e.jsx(nr, { className: "text-xs", children: "Add prop and path of binding. Click save when you're done." })
180
181
  ] }),
181
182
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1 relative", children: [
182
183
  /* @__PURE__ */ e.jsx(
@@ -185,7 +186,7 @@ const fe = ({ data: t, fullView: s }) => {
185
186
  type: "PROP",
186
187
  isDisabled: !1,
187
188
  placeholder: "Enter prop key",
188
- value: o,
189
+ value: l,
189
190
  setValue: a,
190
191
  onChange: (h) => {
191
192
  const g = x(h, "PROP");
@@ -201,7 +202,7 @@ const fe = ({ data: t, fullView: s }) => {
201
202
  De,
202
203
  {
203
204
  type: "PATH",
204
- isDisabled: b(o),
205
+ isDisabled: b(l),
205
206
  placeholder: "Enter data path",
206
207
  value: d,
207
208
  setValue: i,
@@ -215,26 +216,26 @@ const fe = ({ data: t, fullView: s }) => {
215
216
  }
216
217
  )
217
218
  ] }),
218
- /* @__PURE__ */ e.jsx(ir, { children: /* @__PURE__ */ e.jsx(
219
+ /* @__PURE__ */ e.jsx(ar, { children: /* @__PURE__ */ e.jsx(
219
220
  ue,
220
221
  {
221
222
  type: "submit",
222
223
  className: "mt-4",
223
- disabled: b(o) && b(d),
224
- onClick: () => s({ key: o, value: d }),
224
+ disabled: b(l) && b(d),
225
+ onClick: () => s({ key: l, value: d }),
225
226
  children: "Save"
226
227
  }
227
228
  ) })
228
229
  ] });
229
- }, rt = ({ children: t, onAddBinding: s, appliedBindings: r, editMode: l = !0, item: o = {} }) => {
230
+ }, rt = ({ children: t, onAddBinding: s, appliedBindings: r, editMode: o = !0, item: l = {} }) => {
230
231
  const [a, d] = w(!1);
231
- return /* @__PURE__ */ e.jsxs(rr, { children: [
232
- /* @__PURE__ */ e.jsx(sr, { asChild: !0, onClick: () => d(!0), children: t }),
233
- a && /* @__PURE__ */ e.jsx(lr, { children: /* @__PURE__ */ e.jsx(
232
+ return /* @__PURE__ */ e.jsxs(tr, { children: [
233
+ /* @__PURE__ */ e.jsx(rr, { asChild: !0, onClick: () => d(!0), children: t }),
234
+ a && /* @__PURE__ */ e.jsx(sr, { children: /* @__PURE__ */ e.jsx(
234
235
  Ir,
235
236
  {
236
- item: o,
237
- editMode: l,
237
+ item: l,
238
+ editMode: o,
238
239
  appliedBindings: r,
239
240
  onAddBinding: (i) => {
240
241
  s(i), d(!1);
@@ -246,15 +247,15 @@ const fe = ({ data: t, fullView: s }) => {
246
247
  item: t,
247
248
  onAddBinding: s,
248
249
  onRemove: r,
249
- selectedBlock: l,
250
- dataProvider: o,
250
+ selectedBlock: o,
251
+ dataProvider: l,
251
252
  appliedBindings: a
252
253
  }) => {
253
254
  const [d, i] = w("string"), n = (u, x) => {
254
255
  if (b(u))
255
256
  return "";
256
257
  {
257
- const c = p(x === "PROP" ? l : o, u, "");
258
+ const c = p(x === "PROP" ? o : l, u, "");
258
259
  if (ae(c))
259
260
  return "list";
260
261
  const m = typeof c;
@@ -264,11 +265,11 @@ const fe = ({ data: t, fullView: s }) => {
264
265
  return E(() => i(() => n(t.key, "PROP")), [t.key]), /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col border border-gray-200 relative rounded-md p-2", children: [
265
266
  /* @__PURE__ */ e.jsx("div", { className: "text-gray-500 font-normal text-sm", children: t.key }),
266
267
  /* @__PURE__ */ e.jsx("div", { className: "font-medium leading-5", children: t.value }),
267
- /* @__PURE__ */ e.jsx(fe, { data: p(o, t.value, "") }),
268
+ /* @__PURE__ */ e.jsx(fe, { data: p(l, t.value, "") }),
268
269
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-end gap-x-2", children: [
269
- /* @__PURE__ */ e.jsx(rt, { editMode: !0, onAddBinding: s, appliedBindings: a, item: t, children: /* @__PURE__ */ e.jsx(Jt, { className: "h-6 w-6 mt-1 cursor-pointer rounded border hover:bg-blue-400 hover:text-white border-blue-400 p-1 text-blue-400 hover:scale-105 duration-200" }) }),
270
+ /* @__PURE__ */ e.jsx(rt, { editMode: !0, onAddBinding: s, appliedBindings: a, item: t, children: /* @__PURE__ */ e.jsx(qt, { className: "h-6 w-6 mt-1 cursor-pointer rounded border hover:bg-blue-400 hover:text-white border-blue-400 p-1 text-blue-400 hover:scale-105 duration-200" }) }),
270
271
  /* @__PURE__ */ e.jsx(
271
- Qt,
272
+ Jt,
272
273
  {
273
274
  onClick: () => r(),
274
275
  className: "h-6 w-6 mt-1 cursor-pointer rounded border hover:bg-red-400 hover:text-white border-red-400 p-1 text-red-400 hover:scale-105 duration-200"
@@ -278,20 +279,20 @@ const fe = ({ data: t, fullView: s }) => {
278
279
  !b(d) && !b(t.key) && /* @__PURE__ */ e.jsx("div", { className: "mt-px absolute right-0 top-1 text-purple-600 text-[10px] flex items-center font-medium h-4 px-2 rounded-full", children: Y(d) })
279
280
  ] });
280
281
  }, Or = ({ bindingData: t, onChange: s }) => {
281
- const r = G(), [l] = et(), o = Kt(), [a, d] = w(
282
+ const r = G(), [o] = et(), l = Gt(), [a, d] = w(
282
283
  C(t, (c, m) => ({ key: m, value: c }))
283
284
  );
284
285
  E(() => {
285
286
  d(C(t, (c, m) => ({ key: m, value: c })));
286
287
  }, [r == null ? void 0 : r._id]);
287
288
  const i = k(() => {
288
- if (b(l))
289
+ if (b(o))
289
290
  return !0;
290
291
  if (b(a))
291
292
  return !1;
292
293
  const c = ye(a);
293
294
  return b(c == null ? void 0 : c.key) || b(c == null ? void 0 : c.value);
294
- }, [l, a]), n = (c) => {
295
+ }, [o, a]), n = (c) => {
295
296
  const m = be(a, (h) => h.key !== c.key);
296
297
  d([...m, c]), x([...m, c]);
297
298
  }, u = (c) => {
@@ -308,9 +309,9 @@ const fe = ({ data: t, fullView: s }) => {
308
309
  !b(h == null ? void 0 : h.key) && !b(h == null ? void 0 : h.value) && Me(m, h.key, h.value);
309
310
  }), s(m);
310
311
  },
311
- [r]
312
+ [s]
312
313
  );
313
- return b(o) ? /* @__PURE__ */ e.jsx("div", { className: "w-full flex items-center justify-center", children: /* @__PURE__ */ e.jsxs("p", { className: "text-gray-500 mb-1.5 text-xs", children: [
314
+ return b(l) ? /* @__PURE__ */ e.jsx("div", { className: "w-full flex items-center justify-center", children: /* @__PURE__ */ e.jsxs("p", { className: "text-gray-500 mb-1.5 text-xs", children: [
314
315
  "You have no data providers registered. Please add a data provider to your project. ",
315
316
  /* @__PURE__ */ e.jsx("br", {}),
316
317
  /* @__PURE__ */ e.jsx("a", { className: "text-blue-500", href: "https://chaibuilder.com/docs/registering-data-providers", target: "_blank", children: "Learn more" })
@@ -322,7 +323,7 @@ const fe = ({ data: t, fullView: s }) => {
322
323
  onAddBinding: n,
323
324
  onRemove: () => u(m),
324
325
  selectedBlock: r,
325
- dataProvider: l,
326
+ dataProvider: o,
326
327
  appliedBindings: C(a, "key")
327
328
  },
328
329
  c.key
@@ -333,36 +334,36 @@ const fe = ({ data: t, fullView: s }) => {
333
334
  {
334
335
  disabled: i,
335
336
  className: `w-full px-5 py-1.5 text-xs rounded-md font-medium duration-200 ${i ? "cursor-not-allowed bg-gray-200 text-gray-400" : "bg-blue-700/20 text-blue-800 hover:bg-blue-700/30"}`,
336
- children: b(l) ? /* @__PURE__ */ e.jsx("small", { className: "text-gray-500 text-[9.5px]", children: "No data provider has been set up for this page" }) : "+ Add Data Binding"
337
+ children: b(o) ? /* @__PURE__ */ e.jsx("small", { className: "text-gray-500 text-[9.5px]", children: "No data provider has been set up for this page" }) : "+ Add Data Binding"
337
338
  }
338
339
  ) }) }),
339
- i && /* @__PURE__ */ e.jsx(Z, { sideOffset: -55, className: "text-[11px]", children: b(l) ? "No data provider has been set up for this page." : "Complete last added data binding to add more" })
340
+ i && /* @__PURE__ */ e.jsx(Z, { sideOffset: -55, className: "text-[11px]", children: b(o) ? "No data provider has been set up for this page." : "Complete last added data binding to add more" })
340
341
  ] })
341
342
  ] });
342
- }, Mr = Or, _r = () => /* @__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" }), Pe = ({
343
+ }, Mr = Or, _r = () => /* @__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" }), $e = ({
343
344
  createHistorySnapshot: t,
344
345
  properties: s,
345
346
  formData: r,
346
- onChange: l
347
+ onChange: o
347
348
  }) => {
348
- const [o] = Yt(), a = { type: "object", properties: {} }, d = {};
349
+ const [l] = Zt(), a = { type: "object", properties: {} }, d = {};
349
350
  return Object.keys(s).forEach((i) => {
350
351
  const n = s[i];
351
352
  if (M(["slot", "styles"], n.type))
352
353
  return;
353
- const u = p(n, "i18n", !1) ? `${i}-${o}` : i;
354
- a.properties[u] = Xt(n, o), d[u] = Wt(n, o);
354
+ const u = p(n, "i18n", !1) ? `${i}-${l}` : i;
355
+ a.properties[u] = zt(n, l), d[u] = Ut(n, l);
355
356
  }), /* @__PURE__ */ e.jsx(
356
357
  _t,
357
358
  {
358
359
  widgets: {
359
360
  binding: _r,
360
- richtext: fr,
361
- icon: vr,
362
- image: jr
361
+ richtext: br,
362
+ icon: fr,
363
+ image: vr
363
364
  },
364
365
  fields: {
365
- link: wr
366
+ link: jr
366
367
  },
367
368
  idSeparator: ".",
368
369
  autoComplete: "off",
@@ -374,34 +375,34 @@ const fe = ({ data: t, fullView: s }) => {
374
375
  onBlur: t,
375
376
  schema: a,
376
377
  formData: r,
377
- onChange: l
378
+ onChange: o
378
379
  }
379
380
  );
380
381
  };
381
382
  function Er() {
382
- const t = G(), { createSnapshot: s } = ze(), r = Ue(), l = Qe(t._type), o = { ...t }, a = () => s(), d = ({ formData: x }, c) => {
383
+ const t = G(), { createSnapshot: s } = ze(), r = Ge(), o = Qe(t._type), l = { ...t }, a = () => s(), d = ({ formData: x }, c) => {
383
384
  if (c) {
384
385
  const m = c.replace("root.", "");
385
386
  r([t._id], { [m]: p(x, m) });
386
387
  }
387
388
  }, i = {
388
- _name: qt({
389
+ _name: Kt({
389
390
  title: "Name",
390
391
  default: p(t, "_name", t._type)
391
392
  })
392
- }, n = ut(p(o, "_bindings", {})), u = k(() => {
393
- const x = xt(p(l, "props", {}));
393
+ }, n = ut(p(l, "_bindings", {})), u = k(() => {
394
+ const x = xt(p(o, "props", {}));
394
395
  return gt(n, (c) => {
395
396
  delete x[c];
396
397
  }), x;
397
- }, [l, n]);
398
+ }, [o, n]);
398
399
  return /* @__PURE__ */ e.jsxs("div", { className: "overflow-x-hidden", children: [
399
400
  /* @__PURE__ */ e.jsx(
400
- Pe,
401
+ $e,
401
402
  {
402
403
  onChange: d,
403
404
  createHistorySnapshot: a,
404
- formData: o,
405
+ formData: l,
405
406
  properties: i
406
407
  }
407
408
  ),
@@ -420,9 +421,9 @@ function Er() {
420
421
  /* @__PURE__ */ e.jsx(ce, { className: "pt-4 px-4", children: /* @__PURE__ */ e.jsx(
421
422
  Mr,
422
423
  {
423
- bindingData: p(o, "_bindings", {}),
424
+ bindingData: p(l, "_bindings", {}),
424
425
  onChange: (x) => {
425
- d({ formData: { ...o, _bindings: x } }, "root._bindings");
426
+ d({ formData: { ...l, _bindings: x } }, "root._bindings");
426
427
  }
427
428
  }
428
429
  ) })
@@ -441,11 +442,11 @@ function Er() {
441
442
  ". Remove data binding to edit static content."
442
443
  ] }),
443
444
  /* @__PURE__ */ e.jsx(
444
- Pe,
445
+ $e,
445
446
  {
446
447
  onChange: d,
447
448
  createHistorySnapshot: a,
448
- formData: o,
449
+ formData: l,
449
450
  properties: u
450
451
  }
451
452
  )
@@ -455,7 +456,7 @@ function Er() {
455
456
  /* @__PURE__ */ e.jsx("div", { className: "pb-60" })
456
457
  ] });
457
458
  }
458
- const $e = new kr(Sr, {
459
+ const Pe = new Nr(kr, {
459
460
  isCaseSensitive: !1,
460
461
  threshold: 0.2,
461
462
  minMatchCharLength: 2,
@@ -463,24 +464,24 @@ const $e = new kr(Sr, {
463
464
  });
464
465
  function Fr() {
465
466
  var D;
466
- const [t] = ke(), s = G(), r = Ge(), l = Ke(), [o] = qe(), [a, d] = w(""), i = (D = we(t)) == null ? void 0 : D.prop, n = mt((p(s, i, "").replace(Rr, "").split(",").pop() || "").split(" "), b), u = () => {
467
+ const [t] = ke(), s = G(), r = Ke(), o = qe(), [l] = Ue(), [a, d] = w(""), i = (D = we(t)) == null ? void 0 : D.prop, n = mt((p(s, i, "").replace(Sr, "").split(",").pop() || "").split(" "), b), u = () => {
467
468
  const j = a.trim().toLowerCase().replace(/ +(?= )/g, "").split(" ");
468
- r(o, j, !0), d("");
469
+ r(l, j, !0), d("");
469
470
  }, [x, c] = w([]), m = ({ value: j }) => {
470
- const L = j.trim().toLowerCase(), $ = L.match(/.+:/g);
471
+ const L = j.trim().toLowerCase(), P = L.match(/.+:/g);
471
472
  let N = [];
472
- if ($ && $.length > 0) {
473
- const [I] = $, F = L.replace(I, "");
474
- N = $e.search(F).map((y) => ({
473
+ if (P && P.length > 0) {
474
+ const [I] = P, F = L.replace(I, "");
475
+ N = Pe.search(F).map((y) => ({
475
476
  ...y,
476
477
  item: { ...y.item, name: I + y.item.name }
477
478
  }));
478
479
  } else
479
- N = $e.search(L);
480
+ N = Pe.search(L);
480
481
  c(C(N, "item"));
481
482
  }, h = () => {
482
483
  c([]);
483
- }, g = (j) => j.name, f = (j) => /* @__PURE__ */ e.jsx("div", { className: "rounded-md p-1", children: j.name }), S = {
484
+ }, g = (j) => j.name, f = (j) => /* @__PURE__ */ e.jsx("div", { className: "rounded-md p-1", children: j.name }), T = {
484
485
  autoComplete: "off",
485
486
  autoCorrect: "off",
486
487
  autoCapitalize: "off",
@@ -498,17 +499,17 @@ function Fr() {
498
499
  {
499
500
  className: `no-scrollbar flex ${x.length > 0 ? "min-h-[300px]" : "min-h-max"} w-full flex-col gap-y-5 overflow-y-auto bg-gray-100 px-px`,
500
501
  children: [
501
- /* @__PURE__ */ e.jsx(Se, { className: "mt-2", children: "Add Tailwind classes" }),
502
+ /* @__PURE__ */ e.jsx(Te, { className: "mt-2", children: "Add Tailwind classes" }),
502
503
  /* @__PURE__ */ e.jsxs("div", { className: "relative -mt-4 flex items-center gap-x-3", children: [
503
504
  /* @__PURE__ */ e.jsx("div", { className: "relative flex w-full items-center gap-x-3", children: /* @__PURE__ */ e.jsx(
504
- Nr,
505
+ Cr,
505
506
  {
506
507
  suggestions: x,
507
508
  onSuggestionsFetchRequested: m,
508
509
  onSuggestionsClearRequested: h,
509
510
  getSuggestionValue: g,
510
511
  renderSuggestion: f,
511
- inputProps: S,
512
+ inputProps: T,
512
513
  containerProps: {
513
514
  className: "relative h-8 w-full gap-y-1 py-1 border-gray-600"
514
515
  },
@@ -543,7 +544,7 @@ function Fr() {
543
544
  /* @__PURE__ */ e.jsx(
544
545
  Ye,
545
546
  {
546
- onClick: () => l(o, [j]),
547
+ onClick: () => o(l, [j]),
547
548
  className: "invisible absolute right-1 hover:text-white group-hover:visible group-hover:cursor-pointer"
548
549
  }
549
550
  )
@@ -557,10 +558,10 @@ function Fr() {
557
558
  }
558
559
  );
559
560
  }
560
- const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Yr = {
561
+ const H = ["px", "%", "em", "rem", "ch", "vh", "vw"], Yr = {
561
562
  heading: "Flex Child",
562
563
  items: [
563
- { type: "arbitrary", label: "Basis", units: B, property: "flexBasis" },
564
+ { type: "arbitrary", label: "Basis", units: H, property: "flexBasis" },
564
565
  { type: "range", label: "Order", property: "order" },
565
566
  { type: "dropdown", label: "Flex", property: "flexGrowShrink" },
566
567
  { type: "dropdown", label: "Grow", property: "flexGrow" },
@@ -581,7 +582,7 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Yr = {
581
582
  {
582
583
  heading: "Display",
583
584
  items: [
584
- { type: "dropdown", label: "Display", property: "display", units: B },
585
+ { type: "dropdown", label: "Display", property: "display", units: H },
585
586
  {
586
587
  styleType: "accordion",
587
588
  heading: "Flex options",
@@ -632,7 +633,7 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Yr = {
632
633
  styleType: "accordion",
633
634
  heading: "Visibility & Opacity",
634
635
  items: [
635
- { type: "dropdown", label: "Visibility", property: "visibility", units: B },
636
+ { type: "dropdown", label: "Visibility", property: "visibility", units: H },
636
637
  { type: "arbitrary", label: "Opacity", property: "opacity", units: ["-"] }
637
638
  ]
638
639
  }
@@ -645,7 +646,7 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Yr = {
645
646
  styleType: "multiple",
646
647
  label: "Margin",
647
648
  negative: !0,
648
- units: [...B, "auto"],
649
+ units: [...H, "auto"],
649
650
  options: [
650
651
  { key: "margin", label: "All" },
651
652
  { key: "marginX", label: "Left-Right" },
@@ -682,22 +683,22 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Yr = {
682
683
  {
683
684
  heading: "Size",
684
685
  items: [
685
- { type: "arbitrary", label: "Width", units: B.concat("auto"), property: "width" },
686
- { type: "arbitrary", label: "Height", units: B.concat("auto"), property: "height" },
686
+ { type: "arbitrary", label: "Width", units: H.concat("auto"), property: "width" },
687
+ { type: "arbitrary", label: "Height", units: H.concat("auto"), property: "height" },
687
688
  {
688
689
  styleType: "accordion",
689
690
  heading: "Min width & height",
690
691
  items: [
691
- { type: "arbitrary", label: "Min Width", units: B.concat("auto"), property: "minWidth" },
692
- { type: "arbitrary", label: "Min Height", units: B.concat("auto"), property: "minHeight" }
692
+ { type: "arbitrary", label: "Min Width", units: H.concat("auto"), property: "minWidth" },
693
+ { type: "arbitrary", label: "Min Height", units: H.concat("auto"), property: "minHeight" }
693
694
  ]
694
695
  },
695
696
  {
696
697
  styleType: "accordion",
697
698
  heading: "Max width & height",
698
699
  items: [
699
- { type: "arbitrary", label: "Max Width", units: B.concat("auto"), property: "maxWidth" },
700
- { type: "arbitrary", label: "Max Height", units: B.concat("auto"), property: "maxHeight" }
700
+ { type: "arbitrary", label: "Max Width", units: H.concat("auto"), property: "maxWidth" },
701
+ { type: "arbitrary", label: "Max Height", units: H.concat("auto"), property: "maxHeight" }
701
702
  ]
702
703
  },
703
704
  {
@@ -781,8 +782,8 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Yr = {
781
782
  heading: "Typography",
782
783
  items: [
783
784
  { type: "dropdown", property: "fontFamily", label: "Font" },
784
- { type: "arbitrary", property: "fontSize", label: "Size", units: B },
785
- { type: "arbitrary", property: "lineHeight", label: "Height", units: B.concat("-") },
785
+ { type: "arbitrary", property: "fontSize", label: "Size", units: H },
786
+ { type: "arbitrary", property: "lineHeight", label: "Height", units: H.concat("-") },
786
787
  { type: "range", property: "fontWeight", label: "Weight" },
787
788
  { type: "color", property: "textColor", label: "Color" },
788
789
  {
@@ -1050,15 +1051,15 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Yr = {
1050
1051
  marginBottom: Q,
1051
1052
  marginLeft: ee,
1052
1053
  // text-align
1053
- textLeft: St,
1054
- textCenter: Tt,
1054
+ textLeft: Tt,
1055
+ textCenter: St,
1055
1056
  textRight: Rt,
1056
1057
  textJustify: Vt,
1057
1058
  // font style
1058
- italic: Ht,
1059
+ italic: Bt,
1059
1060
  // "not-italic": "",
1060
1061
  // decoration
1061
- underline: Bt,
1062
+ underline: Ht,
1062
1063
  overline: At,
1063
1064
  // transform
1064
1065
  uppercase: Dt,
@@ -1174,14 +1175,14 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Yr = {
1174
1175
  }
1175
1176
  )
1176
1177
  ] }),
1177
- static: Pt
1178
+ static: $t
1178
1179
  }, se = Oe({ canReset: !1, canChange: !0 }), Zr = ({ children: t, canReset: s = !1, canChange: r = !0 }) => (
1179
1180
  // eslint-disable-next-line react/jsx-no-constructed-context-values
1180
1181
  /* @__PURE__ */ e.jsx(se.Provider, { value: { canReset: s, canChange: r }, children: t })
1181
- ), lt = ({ label: t, property: s, onChange: r }) => {
1182
- const l = k(() => p(xe, `${s}.classes`, [""]), [s]), o = le(s), a = k(() => p(o, "cls", ""), [o]), { canChange: d } = re(se), i = /\[.*\]/g.test(a);
1182
+ ), ot = ({ label: t, property: s, onChange: r }) => {
1183
+ const o = k(() => p(xe, `${s}.classes`, [""]), [s]), l = oe(s), a = k(() => p(l, "cls", ""), [l]), { canChange: d } = re(se), i = /\[.*\]/g.test(a);
1183
1184
  return /* @__PURE__ */ e.jsx("div", { className: t ? "w-full rounded " : "grow", children: i ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
1184
- /* @__PURE__ */ e.jsx(br, { className: "w-[70%] rounded py-1", readOnly: !0, value: a }),
1185
+ /* @__PURE__ */ e.jsx(yr, { className: "w-[70%] rounded py-1", readOnly: !0, value: a }),
1185
1186
  /* @__PURE__ */ e.jsxs(X, { delayDuration: 100, children: [
1186
1187
  /* @__PURE__ */ e.jsx(W, { 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(Ne, {}) }) }),
1187
1188
  /* @__PURE__ */ e.jsx(Z, { children: "Current value is using a Tailwind arbitrary value." })
@@ -1192,17 +1193,17 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Yr = {
1192
1193
  rounded: t,
1193
1194
  onChange: (n) => r(n, s),
1194
1195
  selected: a,
1195
- options: l,
1196
+ options: o,
1196
1197
  disabled: !d
1197
1198
  }
1198
1199
  ) });
1199
1200
  };
1200
- function ve({ selected: t, onChange: s, rounded: r = !1, options: l, disabled: o = !1 }) {
1201
+ function ve({ selected: t, onChange: s, rounded: r = !1, options: o, disabled: l = !1 }) {
1201
1202
  const a = t.replace(/.*:/g, "").trim(), { undo: d, redo: i } = ze();
1202
1203
  return /* @__PURE__ */ e.jsxs(
1203
1204
  "select",
1204
1205
  {
1205
- disabled: !l.length || o,
1206
+ disabled: !o.length || l,
1206
1207
  className: `${r ? "rounded-md border border-border" : "border-0"} w-full disable:bg-gray-500 h-full truncate rounded bg-background px-2 py-1 text-xs outline-none disabled:cursor-not-allowed`,
1207
1208
  onChange: (n) => s(n.target.value),
1208
1209
  onKeyDown: (n) => {
@@ -1211,54 +1212,54 @@ function ve({ selected: t, onChange: s, rounded: r = !1, options: l, disabled: o
1211
1212
  value: a,
1212
1213
  children: [
1213
1214
  /* @__PURE__ */ e.jsx("option", { className: "bg-transparent", value: "" }),
1214
- P.Children.toArray(
1215
- l.map((n) => /* @__PURE__ */ e.jsx("option", { className: "bg-transparent", value: n, children: n }))
1215
+ $.Children.toArray(
1216
+ o.map((n) => /* @__PURE__ */ e.jsx("option", { className: "bg-transparent", value: n, children: n }))
1216
1217
  )
1217
1218
  ]
1218
1219
  }
1219
1220
  );
1220
1221
  }
1221
1222
  const zr = ({ property: t, onChange: s }) => {
1222
- const { canReset: r, canChange: l } = re(se), o = le(t), a = k(() => p(o, "cls", ""), [o]), d = k(() => p(xe, `${t}.classes`, [""]), [t]), i = d.indexOf(a) > -1 ? d.indexOf(a) : 0, n = /\[.*\]/g.test(a);
1223
+ const { canReset: r, canChange: o } = re(se), l = oe(t), a = k(() => p(l, "cls", ""), [l]), d = k(() => p(xe, `${t}.classes`, [""]), [t]), i = d.indexOf(a) > -1 ? d.indexOf(a) : 0, n = /\[.*\]/g.test(a);
1223
1224
  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: a }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1224
1225
  /* @__PURE__ */ e.jsx(
1225
1226
  "button",
1226
1227
  {
1227
1228
  type: "button",
1228
1229
  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",
1229
- disabled: !l && (!r || i - 1 < 0),
1230
+ disabled: !o && (!r || i - 1 < 0),
1230
1231
  onClick: () => s(Re(d, i - 1), t),
1231
- children: /* @__PURE__ */ e.jsx("span", { className: "flex items-center justify-center", children: /* @__PURE__ */ e.jsx($t, { className: !l && (!r || i - 1 < 0) ? "text-gray-500" : "text-white/60" }) })
1232
+ children: /* @__PURE__ */ e.jsx("span", { className: "flex items-center justify-center", children: /* @__PURE__ */ e.jsx(Pt, { className: !o && (!r || i - 1 < 0) ? "text-gray-500" : "text-white/60" }) })
1232
1233
  }
1233
1234
  ),
1234
- /* @__PURE__ */ e.jsx("div", { className: "w-8/12 text-center", children: /* @__PURE__ */ e.jsx(lt, { label: !1, property: t, onChange: s }) }),
1235
+ /* @__PURE__ */ e.jsx("div", { className: "w-8/12 text-center", children: /* @__PURE__ */ e.jsx(ot, { label: !1, property: t, onChange: s }) }),
1235
1236
  /* @__PURE__ */ e.jsx(
1236
1237
  "button",
1237
1238
  {
1238
1239
  type: "button",
1239
1240
  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",
1240
- disabled: !l && (!r || i + 1 >= d.length),
1241
+ disabled: !o && (!r || i + 1 >= d.length),
1241
1242
  onClick: () => s(Re(d, i + 1), t),
1242
1243
  children: /* @__PURE__ */ e.jsx("span", { className: "flex items-center justify-center", children: /* @__PURE__ */ e.jsx(
1243
1244
  Ce,
1244
1245
  {
1245
- className: !l && (!r || i + 1 >= d.length) ? "text-gray-500" : "text-white/60"
1246
+ className: !o && (!r || i + 1 >= d.length) ? "text-gray-500" : "text-white/60"
1246
1247
  }
1247
1248
  ) })
1248
1249
  }
1249
1250
  )
1250
1251
  ] }) });
1251
1252
  }, Ur = ({ property: t, onChange: s }) => {
1252
- const r = k(() => p(xe, `${t}.classes`, [""]), [t]), { canChange: l } = re(se), o = le(t), a = k(() => p(o, "cls", ""), [o]);
1253
+ const r = k(() => p(xe, `${t}.classes`, [""]), [t]), { canChange: o } = re(se), l = oe(t), a = k(() => p(l, "cls", ""), [l]);
1253
1254
  return /* @__PURE__ */ e.jsx("div", { className: "flex grow flex-wrap gap-1", children: C(r, (d) => /* @__PURE__ */ e.jsxs(X, { children: [
1254
1255
  /* @__PURE__ */ e.jsx(W, { asChild: !0, children: /* @__PURE__ */ e.jsx(
1255
1256
  "button",
1256
1257
  {
1257
1258
  type: "button",
1258
- disabled: !l,
1259
+ disabled: !o,
1259
1260
  onClick: () => s(d, t),
1260
1261
  className: `cursor-pointer rounded border border-gray-600 p-1 disabled:cursor-not-allowed ${a === d ? " bg-blue-500 text-white" : "disabled:bg-gray-600 disabled:text-gray-400"}`,
1261
- children: P.createElement(p(st, d, Xe))
1262
+ children: $.createElement(p(st, d, Xe))
1262
1263
  }
1263
1264
  ) }),
1264
1265
  /* @__PURE__ */ e.jsx(Z, { children: Y(te(d)) })
@@ -1276,7 +1277,7 @@ const zr = ({ property: t, onChange: s }) => {
1276
1277
  ringColor: "ring",
1277
1278
  ringOffsetColor: "ring-offset"
1278
1279
  }, Kr = ({ property: t, onChange: s }) => {
1279
- const r = le(t), l = k(() => p(r, "cls", ""), [r]), { canChange: o } = re(se), [a, d] = w([]), [i, n] = w({ color: "", shade: "" }), u = l.split("-"), x = p(u, "1", ""), c = p(u, "2", ""), m = A(
1280
+ const r = oe(t), o = k(() => p(r, "cls", ""), [r]), { canChange: l } = re(se), [a, d] = w([]), [i, n] = w({ color: "", shade: "" }), u = o.split("-"), x = p(u, "1", ""), c = p(u, "2", ""), m = A(
1280
1281
  // eslint-disable-next-line no-shadow
1281
1282
  (g) => {
1282
1283
  ["current", "inherit", "transparent", "black", "white"].includes(g) ? (d([]), n({ color: g })) : (d(["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"]), n((f) => ({ ...f, color: g, shade: f.shade ? f.shade : "500" })));
@@ -1304,7 +1305,7 @@ const zr = ({ property: t, onChange: s }) => {
1304
1305
  /* @__PURE__ */ e.jsx("div", { className: "grow text-center", children: /* @__PURE__ */ e.jsx(
1305
1306
  ve,
1306
1307
  {
1307
- disabled: !o,
1308
+ disabled: !l,
1308
1309
  rounded: !0,
1309
1310
  selected: x,
1310
1311
  onChange: m,
@@ -1340,17 +1341,17 @@ const zr = ({ property: t, onChange: s }) => {
1340
1341
  ]
1341
1342
  }
1342
1343
  ) }),
1343
- /* @__PURE__ */ e.jsx("button", { type: "button", className: "grow text-center", children: /* @__PURE__ */ e.jsx(ve, { rounded: !0, selected: c, disabled: !x || !o, onChange: h, options: a }) })
1344
+ /* @__PURE__ */ e.jsx("button", { type: "button", className: "grow text-center", children: /* @__PURE__ */ e.jsx(ve, { rounded: !0, selected: c, disabled: !x || !l, onChange: h, options: a }) })
1344
1345
  ] });
1345
1346
  }, Ie = (t, s) => {
1346
1347
  t = t.toLowerCase();
1347
1348
  let r = t.trim().replace(/ |\+/g, "");
1348
1349
  if ((r === "auto" || r === "none") && s.includes(r))
1349
1350
  return { value: "", unit: r };
1350
- const l = s.length ? new RegExp(s.join("|"), "g") : /XXXXXX/g;
1351
- r = r.replace(l, "");
1352
- const o = t.match(l), a = o && o.length > 1, d = !b(r) && Number.isNaN(Number(r));
1353
- return a || d ? { error: "Invalid value" } : o && (o[0] === "auto" || o[0] === "none") ? { value: o[0], unit: "" } : { value: r, unit: o ? o[0] : "" };
1351
+ const o = s.length ? new RegExp(s.join("|"), "g") : /XXXXXX/g;
1352
+ r = r.replace(o, "");
1353
+ const l = t.match(o), a = l && l.length > 1, d = !b(r) && Number.isNaN(Number(r));
1354
+ return a || d ? { error: "Invalid value" } : l && (l[0] === "auto" || l[0] === "none") ? { value: l[0], unit: "" } : { value: r, unit: l ? l[0] : "" };
1354
1355
  }, qr = (t) => {
1355
1356
  const s = t.startsWith("-") ? "-" : "", r = t.split("-").pop();
1356
1357
  if (["auto", "none"].includes(r))
@@ -1374,9 +1375,9 @@ const zr = ({ property: t, onChange: s }) => {
1374
1375
  if (M(t, "scale-"))
1375
1376
  return { value: `${s}${`${r / 100}`}`, unit: "-" };
1376
1377
  if (z(t, "border")) {
1377
- const l = t.match(/border-?(x|y|t|r|b|l)?\d+/g);
1378
- if (l)
1379
- return { value: l[0].split("-").pop(), unit: "px" };
1378
+ const o = t.match(/border-?(x|y|t|r|b|l)?\d+/g);
1379
+ if (o)
1380
+ return { value: o[0].split("-").pop(), unit: "px" };
1380
1381
  if (t.match(/border-?(x|y|t|r|b|l)?/g))
1381
1382
  return { value: "1", unit: "px" };
1382
1383
  }
@@ -1475,8 +1476,8 @@ const zr = ({ property: t, onChange: s }) => {
1475
1476
  if (["max", "min", "fit"].includes(r))
1476
1477
  return { value: t, unit: "class" };
1477
1478
  if (r.includes("/")) {
1478
- const [l, o] = C(r.split("/"), (a) => parseInt(a, 10));
1479
- return { value: s + (l / o * 100).toFixed(2).replace(".00", ""), unit: "%" };
1479
+ const [o, l] = C(r.split("/"), (a) => parseInt(a, 10));
1480
+ return { value: s + (o / l * 100).toFixed(2).replace(".00", ""), unit: "%" };
1480
1481
  }
1481
1482
  return yt(parseFloat(r)) ? { value: `${s + parseFloat(r) * 4}`, unit: "px" } : { value: r, unit: "class" };
1482
1483
  }, Jr = (t) => {
@@ -1485,21 +1486,21 @@ const zr = ({ property: t, onChange: s }) => {
1485
1486
  const s = t.match(/\[.*\]/g);
1486
1487
  if (s === null)
1487
1488
  return Qr(t);
1488
- const r = p(s, "0", "").replace(/\[|\]/g, ""), l = t.startsWith("-") ? "-" : "", o = we(r.match(/\d+.\d+|\d+/g));
1489
- return { value: `${l}${o}`, unit: r.replace(o, "") };
1490
- }, Qr = (t) => b(t) ? { value: "", unit: "" } : qr(t), ot = P.createContext({
1489
+ const r = p(s, "0", "").replace(/\[|\]/g, ""), o = t.startsWith("-") ? "-" : "", l = we(r.match(/\d+.\d+|\d+/g));
1490
+ return { value: `${o}${l}`, unit: r.replace(l, "") };
1491
+ }, Qr = (t) => b(t) ? { value: "", unit: "" } : qr(t), lt = $.createContext({
1491
1492
  setDragData: () => {
1492
1493
  }
1493
1494
  }), es = ({
1494
1495
  unit: t,
1495
1496
  currentValue: s,
1496
1497
  onDrag: r,
1497
- onDragEnd: l,
1498
- onDragStart: o,
1498
+ onDragEnd: o,
1499
+ onDragStart: l,
1499
1500
  negative: a,
1500
1501
  cssProperty: d
1501
1502
  }) => {
1502
- const { setDragData: i } = re(ot);
1503
+ const { setDragData: i } = re(lt);
1503
1504
  return /* @__PURE__ */ e.jsx(
1504
1505
  "button",
1505
1506
  {
@@ -1507,7 +1508,7 @@ const zr = ({ property: t, onChange: s }) => {
1507
1508
  onMouseDown: (n) => {
1508
1509
  const u = {
1509
1510
  onDrag: r,
1510
- onDragEnd: l,
1511
+ onDragEnd: o,
1511
1512
  dragging: !0,
1512
1513
  dragStartY: n.pageY,
1513
1514
  dragStartValue: `${s}`,
@@ -1515,34 +1516,34 @@ const zr = ({ property: t, onChange: s }) => {
1515
1516
  negative: a,
1516
1517
  cssProperty: d
1517
1518
  };
1518
- o(u), i(u);
1519
+ l(u), i(u);
1519
1520
  },
1520
1521
  color: void 0,
1521
1522
  className: "relative z-50 ml-1 hidden h-6 cursor-row-resize rounded bg-background/70 px-2 group-hover:inline",
1522
1523
  children: /* @__PURE__ */ e.jsx(Lt, {})
1523
1524
  }
1524
1525
  );
1525
- }, ts = ({ onSelect: t, current: s, units: r }) => /* @__PURE__ */ e.jsx("div", { "data-theme": "light", className: "-m-[7px] -mx-[13px] flex w-9 flex-col", children: r.map((l) => /* @__PURE__ */ e.jsx(
1526
+ }, ts = ({ onSelect: t, current: s, units: r }) => /* @__PURE__ */ e.jsx("div", { "data-theme": "light", className: "-m-[7px] -mx-[13px] flex w-9 flex-col", children: r.map((o) => /* @__PURE__ */ e.jsx(
1526
1527
  ue,
1527
1528
  {
1528
1529
  className: "h-max rounded-none px-1 py-1 text-right text-[11px] hover:bg-blue-400",
1529
- color: s === l ? "primary" : void 0,
1530
+ color: s === o ? "primary" : void 0,
1530
1531
  size: "sm",
1531
- onClick: (o) => {
1532
- o.stopPropagation(), t(l);
1532
+ onClick: (l) => {
1533
+ l.stopPropagation(), t(o);
1533
1534
  },
1534
- children: l
1535
+ children: o
1535
1536
  },
1536
- l
1537
+ o
1537
1538
  )) }), rs = (t) => {
1538
- const [s, r] = w(!1), [l, o] = w(""), { currentClass: a, onChange: d, classPrefix: i, cssProperty: n, units: u, negative: x } = t, [c, m] = w(n != null && n.toLowerCase().includes("width") ? "%" : u[0]), [h, g] = w(!1), [f, S] = w(""), [D, j] = w(!1), [L, $] = w(!1);
1539
+ const [s, r] = w(!1), [o, l] = w(""), { currentClass: a, onChange: d, classPrefix: i, cssProperty: n, units: u, negative: x } = t, [c, m] = w(n != null && n.toLowerCase().includes("width") ? "%" : u[0]), [h, g] = w(!1), [f, T] = w(""), [D, j] = w(!1), [L, P] = w(!1);
1539
1540
  E(() => {
1540
1541
  const { value: y, unit: v } = Jr(a);
1541
1542
  if (v === "") {
1542
- o(y), m(n != null && n.toLowerCase().includes("width") ? "%" : u[0]);
1543
+ l(y), m(n != null && n.toLowerCase().includes("width") ? "%" : u[0]);
1543
1544
  return;
1544
1545
  }
1545
- m(v), o(v === "class" || b(y) ? "" : y);
1546
+ m(v), l(v === "class" || b(y) ? "" : y);
1546
1547
  }, [a, n, u]);
1547
1548
  const N = me(
1548
1549
  (y) => {
@@ -1558,25 +1559,25 @@ const zr = ({ property: t, onChange: s }) => {
1558
1559
  200
1559
1560
  ), F = A(
1560
1561
  (y = !1) => {
1561
- const v = Ie(`${l}`, u);
1562
+ const v = Ie(`${o}`, u);
1562
1563
  if (p(v, "error", !1)) {
1563
1564
  g(!0);
1564
1565
  return;
1565
1566
  }
1566
- const T = p(v, "unit") !== "" ? p(v, "unit") : c;
1567
- if (T === "auto" || T === "none") {
1568
- N(`${i}${T}`);
1567
+ const S = p(v, "unit") !== "" ? p(v, "unit") : c;
1568
+ if (S === "auto" || S === "none") {
1569
+ N(`${i}${S}`);
1569
1570
  return;
1570
1571
  }
1571
1572
  if (p(v, "value") === "")
1572
1573
  return;
1573
- const K = `${p(v, "value", "").startsWith("-") ? "-" : ""}${i}[${p(v, "value", "").replace("-", "")}${T === "-" ? "" : T}]`;
1574
+ const K = `${p(v, "value", "").startsWith("-") ? "-" : ""}${i}[${p(v, "value", "").replace("-", "")}${S === "-" ? "" : S}]`;
1574
1575
  y ? I(K) : N(K);
1575
1576
  },
1576
- [N, I, l, c, i, u]
1577
- ), oe = A(
1577
+ [N, I, o, c, i, u]
1578
+ ), le = A(
1578
1579
  (y) => {
1579
- const v = Ie(`${l}`, u);
1580
+ const v = Ie(`${o}`, u);
1580
1581
  if (p(v, "error", !1)) {
1581
1582
  g(!0);
1582
1583
  return;
@@ -1587,10 +1588,10 @@ const zr = ({ property: t, onChange: s }) => {
1587
1588
  }
1588
1589
  if (p(v, "value") === "")
1589
1590
  return;
1590
- const T = p(v, "unit") !== "" ? p(v, "unit") : y, K = `${p(v, "value", "").startsWith("-") ? "-" : ""}${i}[${p(v, "value", "").replace("-", "")}${T === "-" ? "" : T}]`;
1591
+ const S = p(v, "unit") !== "" ? p(v, "unit") : y, K = `${p(v, "value", "").startsWith("-") ? "-" : ""}${i}[${p(v, "value", "").replace("-", "")}${S === "-" ? "" : S}]`;
1591
1592
  N(K);
1592
1593
  },
1593
- [N, l, i, u]
1594
+ [N, o, i, u]
1594
1595
  );
1595
1596
  return /* @__PURE__ */ e.jsx("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-start", children: c === "class" ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1596
1597
  /* @__PURE__ */ e.jsx("input", { className: "w-20 rounded py-1", readOnly: !0, value: a }),
@@ -1610,25 +1611,25 @@ const zr = ({ property: t, onChange: s }) => {
1610
1611
  onKeyDown: (y) => {
1611
1612
  if (y.keyCode !== 38 && y.keyCode !== 40)
1612
1613
  return;
1613
- y.preventDefault(), $(!0);
1614
+ y.preventDefault(), P(!0);
1614
1615
  const v = bt(y.target.value);
1615
- let T = _e(v) ? 0 : v;
1616
- y.keyCode === 38 && (T += 1), y.keyCode === 40 && (T -= 1);
1617
- const _ = `${T}`, at = `${_.startsWith("-") ? "-" : ""}${i}[${_.replace("-", "")}${c === "-" ? "" : c}]`;
1616
+ let S = _e(v) ? 0 : v;
1617
+ y.keyCode === 38 && (S += 1), y.keyCode === 40 && (S -= 1);
1618
+ const _ = `${S}`, at = `${_.startsWith("-") ? "-" : ""}${i}[${_.replace("-", "")}${c === "-" ? "" : c}]`;
1618
1619
  I(at);
1619
1620
  },
1620
1621
  onKeyUp: (y) => {
1621
- L && (y.preventDefault(), $(!1));
1622
+ L && (y.preventDefault(), P(!1));
1622
1623
  },
1623
1624
  onBlur: () => F(),
1624
1625
  onChange: (y) => {
1625
- g(!1), o(y.target.value);
1626
+ g(!1), l(y.target.value);
1626
1627
  },
1627
1628
  onClick: (y) => {
1628
1629
  var v;
1629
1630
  (v = y == null ? void 0 : y.target) == null || v.select(), r(!1);
1630
1631
  },
1631
- value: D ? f : l,
1632
+ value: D ? f : o,
1632
1633
  className: "h-6 w-14 rounded rounded-r-none bg-background pl-2 text-sm focus-visible:outline-0 ".concat(
1633
1634
  " ",
1634
1635
  h ? "border-red-500 text-red-500" : "border-foreground/20"
@@ -1648,13 +1649,13 @@ const zr = ({ property: t, onChange: s }) => {
1648
1649
  ]
1649
1650
  }
1650
1651
  ) }),
1651
- /* @__PURE__ */ e.jsx(tr, { children: /* @__PURE__ */ e.jsx(Z, { className: "bg-background", children: /* @__PURE__ */ e.jsx(
1652
+ /* @__PURE__ */ e.jsx(er, { children: /* @__PURE__ */ e.jsx(Z, { className: "bg-background", children: /* @__PURE__ */ e.jsx(
1652
1653
  ts,
1653
1654
  {
1654
1655
  units: u,
1655
1656
  current: c,
1656
1657
  onSelect: (y) => {
1657
- r(!1), m(y), oe(y);
1658
+ r(!1), m(y), le(y);
1658
1659
  }
1659
1660
  }
1660
1661
  ) }) })
@@ -1665,7 +1666,7 @@ const zr = ({ property: t, onChange: s }) => {
1665
1666
  {
1666
1667
  onDragStart: () => j(!0),
1667
1668
  onDragEnd: (y) => {
1668
- if (S(() => ""), j(!1), b(y))
1669
+ if (T(() => ""), j(!1), b(y))
1669
1670
  return;
1670
1671
  const v = `${y}`, _ = `${v.startsWith("-") ? "-" : ""}${i}[${v.replace("-", "")}${c === "-" ? "" : c}]`;
1671
1672
  N(_);
@@ -1673,18 +1674,18 @@ const zr = ({ property: t, onChange: s }) => {
1673
1674
  onDrag: (y) => {
1674
1675
  if (b(y))
1675
1676
  return;
1676
- S(y);
1677
+ T(y);
1677
1678
  const v = `${y}`, _ = `${v.startsWith("-") ? "-" : ""}${i}[${v.replace("-", "")}${c === "-" ? "" : c}]`;
1678
1679
  I(_);
1679
1680
  },
1680
- currentValue: l,
1681
+ currentValue: o,
1681
1682
  unit: c,
1682
1683
  negative: x,
1683
1684
  cssProperty: n
1684
1685
  }
1685
1686
  )
1686
1687
  ] }) }) });
1687
- }, le = (t) => {
1688
+ }, oe = (t) => {
1688
1689
  const s = pe();
1689
1690
  return ft(s, { property: t });
1690
1691
  }, ss = (t, s) => {
@@ -1697,7 +1698,7 @@ const zr = ({ property: t, onChange: s }) => {
1697
1698
  "2xl": 5
1698
1699
  };
1699
1700
  return r[p(t, "mq", "xs")] <= r[s];
1700
- }, ls = {
1701
+ }, os = {
1701
1702
  width: "w-",
1702
1703
  height: "h-",
1703
1704
  minWidth: "min-w-",
@@ -1770,22 +1771,22 @@ const zr = ({ property: t, onChange: s }) => {
1770
1771
  lg: "1024px",
1771
1772
  xl: "1280px",
1772
1773
  "2xl": "1536px"
1773
- }, os = (t) => `${t.toUpperCase()} ${Le[t] ? `(${Le[t]} & up)` : ""}`, Te = (t) => {
1774
- const { type: s = "icons", label: r, property: l, onEmitChange: o = () => {
1775
- }, units: a, negative: d = !1 } = t, [i] = Zt(), [n] = Je(), [, u] = Ae(), x = le(l), c = Ge(), m = Ke(), [h] = qe(), g = k(() => p(x, "fullCls", ""), [x]), f = A(
1774
+ }, ls = (t) => `${t.toUpperCase()} ${Le[t] ? `(${Le[t]} & up)` : ""}`, Se = (t) => {
1775
+ const { type: s = "icons", label: r, property: o, onEmitChange: l = () => {
1776
+ }, units: a, negative: d = !1 } = t, [i] = Rr(), [n] = Je(), [, u] = Ae(), x = oe(o), c = Ke(), m = qe(), [h] = Ue(), g = k(() => p(x, "fullCls", ""), [x]), f = A(
1776
1777
  (N, I = !0) => {
1777
- const F = { dark: i, mq: u, mod: n, cls: N, property: l, fullCls: "" };
1778
+ const F = { dark: i, mq: u, mod: n, cls: N, property: o, fullCls: "" };
1778
1779
  (i || n !== "") && (F.mq = "xs");
1779
- const oe = Tr(F);
1780
- c(h, [oe], I);
1780
+ const le = Tr(F);
1781
+ c(h, [le], I);
1781
1782
  },
1782
- [h, i, u, n, l, c]
1783
- ), S = A(() => {
1783
+ [h, i, u, n, o, c]
1784
+ ), T = A(() => {
1784
1785
  m(h, [g]);
1785
1786
  }, [h, g, m]), D = k(() => ss(x, u), [x, u]);
1786
1787
  E(() => {
1787
- o(D, x);
1788
- }, [D, o, x]);
1788
+ l(D, x);
1789
+ }, [D, l, x]);
1789
1790
  const [, , j] = Ae(), L = A(
1790
1791
  (N) => {
1791
1792
  j({
@@ -1798,28 +1799,28 @@ const zr = ({ property: t, onChange: s }) => {
1798
1799
  }[N]);
1799
1800
  },
1800
1801
  [j]
1801
- ), $ = p(x, "dark", null) === i && p(x, "mod", null) === n && p(x, "mq", null) === u;
1802
- return /* @__PURE__ */ e.jsx(Zr, { canChange: D, canReset: x && $, children: /* @__PURE__ */ e.jsxs("div", { className: "group flex flex-row items-center py-2 first:pt-0 last:pb-0", children: [
1803
- /* @__PURE__ */ e.jsx("div", { className: "relative w-[70px] truncate text-xs text-foreground", children: /* @__PURE__ */ e.jsx("span", { className: `text-[11px] ${x && !$ ? "text-foreground" : ""}`, children: r }) }),
1802
+ ), P = p(x, "dark", null) === i && p(x, "mod", null) === n && p(x, "mq", null) === u;
1803
+ return /* @__PURE__ */ e.jsx(Zr, { canChange: D, canReset: x && P, children: /* @__PURE__ */ e.jsxs("div", { className: "group flex flex-row items-center py-2 first:pt-0 last:pb-0", children: [
1804
+ /* @__PURE__ */ e.jsx("div", { className: "relative w-[70px] truncate text-xs text-foreground", children: /* @__PURE__ */ e.jsx("span", { className: `text-[11px] ${x && !P ? "text-foreground" : ""}`, children: r }) }),
1804
1805
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-row items-center", children: [
1805
1806
  /* @__PURE__ */ e.jsxs("div", { className: "w-[150px]", children: [
1806
1807
  s === "arbitrary" ? /* @__PURE__ */ e.jsx(
1807
1808
  rs,
1808
1809
  {
1809
1810
  currentClass: p(x, "cls", ""),
1810
- classPrefix: p(ls, l, ""),
1811
+ classPrefix: p(os, o, ""),
1811
1812
  units: a || [],
1812
1813
  onChange: f,
1813
1814
  negative: d,
1814
- cssProperty: l
1815
+ cssProperty: o
1815
1816
  }
1816
1817
  ) : null,
1817
- s === "icons" && /* @__PURE__ */ e.jsx(Ur, { property: l, onChange: f }),
1818
- s === "range" && /* @__PURE__ */ e.jsx(zr, { property: l, onChange: f }),
1819
- s === "color" && /* @__PURE__ */ e.jsx(Kr, { property: l, onChange: f }),
1820
- s === "dropdown" && /* @__PURE__ */ e.jsx(lt, { label: r, property: l, onChange: f })
1818
+ s === "icons" && /* @__PURE__ */ e.jsx(Ur, { property: o, onChange: f }),
1819
+ s === "range" && /* @__PURE__ */ e.jsx(zr, { property: o, onChange: f }),
1820
+ s === "color" && /* @__PURE__ */ e.jsx(Kr, { property: o, onChange: f }),
1821
+ s === "dropdown" && /* @__PURE__ */ e.jsx(ot, { label: r, property: o, onChange: f })
1821
1822
  ] }),
1822
- /* @__PURE__ */ e.jsx("div", { className: `w-[30px] cursor-pointer ${g ? "visible" : "invisible"}`, children: $ ? /* @__PURE__ */ e.jsx("button", { type: "button", onClick: () => S(), title: "Reset", className: "flex px-1.5 text-xs", children: /* @__PURE__ */ e.jsx(We, { className: "h-5 w-5 text-blue-500 hover:opacity-80" }) }) : D && x ? /* @__PURE__ */ e.jsxs(X, { delayDuration: 100, children: [
1823
+ /* @__PURE__ */ e.jsx("div", { className: `w-[30px] cursor-pointer ${g ? "visible" : "invisible"}`, children: P ? /* @__PURE__ */ e.jsx("button", { type: "button", onClick: () => T(), title: "Reset", className: "flex px-1.5 text-xs", children: /* @__PURE__ */ e.jsx(We, { className: "h-5 w-5 text-blue-500 hover:opacity-80" }) }) : D && x ? /* @__PURE__ */ e.jsxs(X, { delayDuration: 100, children: [
1823
1824
  /* @__PURE__ */ e.jsx(W, { asChild: !0, children: /* @__PURE__ */ e.jsx(
1824
1825
  "button",
1825
1826
  {
@@ -1831,7 +1832,7 @@ const zr = ({ property: t, onChange: s }) => {
1831
1832
  /* @__PURE__ */ e.jsx(Z, { children: /* @__PURE__ */ e.jsx("div", { className: "text-right", children: /* @__PURE__ */ e.jsxs("div", { children: [
1832
1833
  "Current style is set at  ",
1833
1834
  /* @__PURE__ */ e.jsxs("span", { className: "font-bold ", children: [
1834
- os(p(x, "mq")),
1835
+ ls(p(x, "mq")),
1835
1836
  i && !x.dark ? "(Light mode)" : ""
1836
1837
  ] }),
1837
1838
  /* @__PURE__ */ e.jsx("br", {}),
@@ -1855,8 +1856,8 @@ const zr = ({ property: t, onChange: s }) => {
1855
1856
  label: t,
1856
1857
  options: s,
1857
1858
  borderB: r = !1,
1858
- borderT: l = !1,
1859
- type: o = "arbitrary",
1859
+ borderT: o = !1,
1860
+ type: l = "arbitrary",
1860
1861
  units: a = ns,
1861
1862
  negative: d = !1
1862
1863
  }) => {
@@ -1864,11 +1865,11 @@ const zr = ({ property: t, onChange: s }) => {
1864
1865
  return /* @__PURE__ */ e.jsxs(
1865
1866
  "div",
1866
1867
  {
1867
- className: `mb-2 border-gray-800 py-2 first:pt-0 last:pb-0 ${r ? "border-b" : ""} ${l ? "border-t" : ""}`,
1868
+ className: `mb-2 border-gray-800 py-2 first:pt-0 last:pb-0 ${r ? "border-b" : ""} ${o ? "border-t" : ""}`,
1868
1869
  children: [
1869
1870
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-row text-xs", children: [
1870
1871
  t && /* @__PURE__ */ e.jsx("span", { className: "relative w-[70px] flex-none text-xs text-foreground", children: t }),
1871
- /* @__PURE__ */ e.jsx("div", { className: "mb-3 flex grow flex-row flex-wrap gap-x-px", children: P.Children.toArray(
1872
+ /* @__PURE__ */ e.jsx("div", { className: "mb-3 flex grow flex-row flex-wrap gap-x-px", children: $.Children.toArray(
1872
1873
  s.map(({ label: c, key: m }) => /* @__PURE__ */ e.jsx("div", { className: "first:rounded-l last:rounded-r", children: /* @__PURE__ */ e.jsxs(X, { children: [
1873
1874
  /* @__PURE__ */ e.jsx(W, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
1874
1875
  "button",
@@ -1877,10 +1878,10 @@ const zr = ({ property: t, onChange: s }) => {
1877
1878
  onClick: () => n(m),
1878
1879
  className: `relative cursor-pointer rounded-full p-1 text-[8px] ${m === i ? " bg-[#3E57F0] text-white" : "text-gray-600 dark:text-gray-300"}`,
1879
1880
  children: [
1880
- P.createElement("div", {
1881
+ $.createElement("div", {
1881
1882
  className: x(m) ? "-bottom-1.5 absolute bg-[#3E57F0] h-[2px] left-0 w-full" : ""
1882
1883
  }),
1883
- P.createElement(p(st, m, Xe), { className: "text-inherit w-3 h-3" })
1884
+ $.createElement(p(st, m, Xe), { className: "text-inherit w-3 h-3" })
1884
1885
  ]
1885
1886
  }
1886
1887
  ) }),
@@ -1889,9 +1890,9 @@ const zr = ({ property: t, onChange: s }) => {
1889
1890
  ) })
1890
1891
  ] }),
1891
1892
  /* @__PURE__ */ e.jsx("div", { className: "mt-0 flex items-center", children: /* @__PURE__ */ e.jsx(
1892
- Te,
1893
+ Se,
1893
1894
  {
1894
- type: o,
1895
+ type: l,
1895
1896
  units: [...a],
1896
1897
  label: "",
1897
1898
  property: i,
@@ -1902,25 +1903,25 @@ const zr = ({ property: t, onChange: s }) => {
1902
1903
  }
1903
1904
  );
1904
1905
  }, as = ({ heading: t, items: s }) => {
1905
- const r = pe(), l = k(() => {
1906
- const o = (i) => U(
1906
+ const r = pe(), o = k(() => {
1907
+ const l = (i) => U(
1907
1908
  i.map((n) => n.styleType === "multiple" ? C(n.options, "key") : n.property)
1908
1909
  ), a = U(
1909
- s.map((i) => i.styleType === "accordion" ? o(i.items) : i.styleType === "multiple" ? C(i.options, "key") : i.property)
1910
+ s.map((i) => i.styleType === "accordion" ? l(i.items) : i.styleType === "multiple" ? C(i.options, "key") : i.property)
1910
1911
  ), d = C(r, "property");
1911
1912
  return Ee(a, d).length > 0;
1912
1913
  }, [r, s]);
1913
1914
  return /* @__PURE__ */ e.jsxs("details", { children: [
1914
1915
  /* @__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: [
1915
1916
  t,
1916
- l ? /* @__PURE__ */ e.jsx(
1917
+ o ? /* @__PURE__ */ e.jsx(
1917
1918
  "span",
1918
1919
  {
1919
- className: `ml-1 mr-2 inline-block h-[8px] w-[8px] rounded-full ${l ? "bg-blue-500" : "bg-gray-300"}`
1920
+ className: `ml-1 mr-2 inline-block h-[8px] w-[8px] rounded-full ${o ? "bg-blue-500" : "bg-gray-300"}`
1920
1921
  }
1921
1922
  ) : null
1922
1923
  ] }) }),
1923
- /* @__PURE__ */ e.jsx("div", { className: "p-2", children: s.map((o) => o.styleType === "multiple" ? /* @__PURE__ */ e.jsx(nt, { ...o }, o.label) : /* @__PURE__ */ e.jsx(Te, { ...o }, o.label)) })
1924
+ /* @__PURE__ */ e.jsx("div", { className: "p-2", children: s.map((l) => l.styleType === "multiple" ? /* @__PURE__ */ e.jsx(nt, { ...l }, l.label) : /* @__PURE__ */ e.jsx(Se, { ...l }, l.label)) })
1924
1925
  ] });
1925
1926
  }, is = Oe({}), he = ({ section: t }) => {
1926
1927
  const s = pe(), r = A(
@@ -1937,7 +1938,7 @@ const zr = ({ property: t, onChange: s }) => {
1937
1938
  return i;
1938
1939
  },
1939
1940
  [s]
1940
- ), l = k(() => {
1941
+ ), o = k(() => {
1941
1942
  if (s.length > 0 && t.heading === "Classes")
1942
1943
  return !0;
1943
1944
  const a = (n) => U(
@@ -1946,28 +1947,28 @@ const zr = ({ property: t, onChange: s }) => {
1946
1947
  t.items.map((n) => n.styleType === "accordion" ? a(n.items) : n.styleType === "multiple" ? U(C(n.options, "key")) : n.property)
1947
1948
  ), i = C(s, "property");
1948
1949
  return Ee(d, i).length > 0;
1949
- }, [s, t.heading, t.items]), o = k(() => ({}), []);
1950
- return /* @__PURE__ */ e.jsx(is.Provider, { value: o, children: /* @__PURE__ */ e.jsxs(ie, { value: t.heading, children: [
1950
+ }, [s, t.heading, t.items]), l = k(() => ({}), []);
1951
+ return /* @__PURE__ */ e.jsx(is.Provider, { value: l, children: /* @__PURE__ */ e.jsxs(ie, { value: t.heading, children: [
1951
1952
  /* @__PURE__ */ e.jsx(de, { className: "px-3 py-2 text-xs hover:no-underline", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
1952
- /* @__PURE__ */ e.jsx("div", { className: `h-[8px] w-[8px] rounded-full ${l ? "bg-blue-500" : "bg-gray-300"}` }),
1953
+ /* @__PURE__ */ e.jsx("div", { className: `h-[8px] w-[8px] rounded-full ${o ? "bg-blue-500" : "bg-gray-300"}` }),
1953
1954
  t.heading
1954
1955
  ] }) }),
1955
- /* @__PURE__ */ e.jsx(ce, { className: "bg-gray-100 px-3.5 py-2", children: P.Children.toArray(
1956
- t.items.map((a) => ge(a, "component") ? P.createElement(a.component, { key: a.label }) : ge(a, "styleType") ? a.styleType === "multiple" ? /* @__PURE__ */ e.jsx(nt, { ...a }, a.label) : a.styleType === "accordion" && r(a == null ? void 0 : a.conditions) ? /* @__PURE__ */ e.jsx(as, { ...a }, a.label) : null : /* @__PURE__ */ e.jsx(Te, { ...a }, a.label))
1956
+ /* @__PURE__ */ e.jsx(ce, { className: "bg-gray-100 px-3.5 py-2", children: $.Children.toArray(
1957
+ t.items.map((a) => ge(a, "component") ? $.createElement(a.component, { key: a.label }) : ge(a, "styleType") ? a.styleType === "multiple" ? /* @__PURE__ */ e.jsx(nt, { ...a }, a.label) : a.styleType === "accordion" && r(a == null ? void 0 : a.conditions) ? /* @__PURE__ */ e.jsx(as, { ...a }, a.label) : null : /* @__PURE__ */ e.jsx(Se, { ...a }, a.label))
1957
1958
  ) })
1958
1959
  ] }) });
1959
1960
  }, ds = ({
1960
1961
  item: t,
1961
1962
  index: s,
1962
1963
  canDelete: r,
1963
- onChange: l,
1964
- onRemove: o
1964
+ onChange: o,
1965
+ onRemove: l
1965
1966
  }) => /* @__PURE__ */ e.jsxs("div", { className: `flex flex-col gap-1 border-gray-400 py-2 ${r ? "border-b" : ""}`, children: [
1966
1967
  /* @__PURE__ */ e.jsx(
1967
1968
  "input",
1968
1969
  {
1969
1970
  name: "key",
1970
- onChange: (a) => l(a, s),
1971
+ onChange: (a) => o(a, s),
1971
1972
  value: t.key,
1972
1973
  placeholder: "Key",
1973
1974
  className: "w-full rounded border-gray-300 bg-background p-0.5 pl-2 text-sm focus-visible:outline-0",
@@ -1980,7 +1981,7 @@ const zr = ({ property: t, onChange: s }) => {
1980
1981
  "input",
1981
1982
  {
1982
1983
  name: "value",
1983
- onChange: (a) => b(t.key) ? {} : l(a, s),
1984
+ onChange: (a) => b(t.key) ? {} : o(a, s),
1984
1985
  value: t.value,
1985
1986
  placeholder: "Value",
1986
1987
  className: "w-full rounded border-gray-300 bg-background p-0.5 pl-2 text-sm focus-visible:outline-0",
@@ -1991,23 +1992,23 @@ const zr = ({ property: t, onChange: s }) => {
1991
1992
  /* @__PURE__ */ e.jsx(
1992
1993
  We,
1993
1994
  {
1994
- onClick: o,
1995
+ onClick: l,
1995
1996
  className: "h-6 w-6 cursor-pointer rounded border border-red-400 p-1 text-red-400 hover:opacity-80"
1996
1997
  }
1997
1998
  )
1998
1999
  ] })
1999
2000
  ] }), cs = ({ section: t }) => {
2000
2001
  var m;
2001
- const { setSyncState: s } = zt(), r = G(), [l, o] = w([]), [a] = ke(), d = Ue(), i = `${p(a, "0.prop")}_attrs`;
2002
+ const { setSyncState: s } = Yt(), r = G(), [o, l] = w([]), [a] = ke(), d = Ge(), i = `${p(a, "0.prop")}_attrs`;
2002
2003
  ne.useEffect(() => {
2003
2004
  const h = C(p(r, i), (g, f) => ({ key: f, value: g }));
2004
- b(h) ? o([]) : o(h);
2005
+ b(h) ? l([]) : l(h);
2005
2006
  }, [p(r, i)]);
2006
- const n = () => o([...l, { key: "", value: "" }]), u = (h) => {
2007
- const g = be(l, (f, S) => h !== S);
2007
+ const n = () => l([...o, { key: "", value: "" }]), u = (h) => {
2008
+ const g = be(o, (f, T) => h !== T);
2008
2009
  c(g);
2009
2010
  }, x = (h, g) => {
2010
- const f = [...l];
2011
+ const f = [...o];
2011
2012
  f[g][h.target.name] = h.target.value, c(f);
2012
2013
  }, c = ne.useCallback(
2013
2014
  (h = []) => {
@@ -2029,15 +2030,15 @@ const zr = ({ property: t, onChange: s }) => {
2029
2030
  "Attributes"
2030
2031
  ] }) }),
2031
2032
  /* @__PURE__ */ e.jsx(ce, { 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: [
2032
- /* @__PURE__ */ e.jsxs(Se, { className: "mt-2 flex w-full items-center justify-between", children: [
2033
+ /* @__PURE__ */ e.jsxs(Te, { className: "mt-2 flex w-full items-center justify-between", children: [
2033
2034
  "Add Custom attributes",
2034
2035
  /* @__PURE__ */ e.jsxs(
2035
2036
  "div",
2036
2037
  {
2037
- className: `flex h-6 w-max items-center justify-center gap-x-0.5 rounded-full border p-1 px-2 text-xs ${!b(l) && b((m = ye(l)) == null ? void 0 : m.key) ? "cursor-not-allowed border-gray-400 text-gray-400" : "cursor-pointer border-blue-400 text-blue-400 hover:bg-blue-400 hover:text-white"}`,
2038
+ className: `flex h-6 w-max items-center justify-center gap-x-0.5 rounded-full border p-1 px-2 text-xs ${!b(o) && b((m = ye(o)) == null ? void 0 : m.key) ? "cursor-not-allowed border-gray-400 text-gray-400" : "cursor-pointer border-blue-400 text-blue-400 hover:bg-blue-400 hover:text-white"}`,
2038
2039
  onClick: () => {
2039
2040
  var h;
2040
- !b(l) && b((h = ye(l)) == null ? void 0 : h.key) || n();
2041
+ !b(o) && b((h = ye(o)) == null ? void 0 : h.key) || n();
2041
2042
  },
2042
2043
  children: [
2043
2044
  /* @__PURE__ */ e.jsx(Ce, { width: 12, height: 12 }),
@@ -2047,10 +2048,10 @@ const zr = ({ property: t, onChange: s }) => {
2047
2048
  )
2048
2049
  ] }),
2049
2050
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col", children: [
2050
- b(l) && /* @__PURE__ */ e.jsx("div", { className: "flex h-12 items-center justify-center text-sm text-gray-400", children: "Click + Add to add attributes" }),
2051
+ b(o) && /* @__PURE__ */ e.jsx("div", { className: "flex h-12 items-center justify-center text-sm text-gray-400", children: "Click + Add to add attributes" }),
2051
2052
  ne.Children.toArray(
2052
- C(l, (h, g) => {
2053
- const f = l.length > 0 && g < l.length - 1;
2053
+ C(o, (h, g) => {
2054
+ const f = o.length > 0 && g < o.length - 1;
2054
2055
  return /* @__PURE__ */ e.jsx(
2055
2056
  ds,
2056
2057
  {
@@ -2068,7 +2069,7 @@ const zr = ({ property: t, onChange: s }) => {
2068
2069
  ] });
2069
2070
  };
2070
2071
  function ps() {
2071
- const [t, s] = Je(), { flexChild: r, gridChild: l } = Ut(), [, o] = Cr(Gt), { t: a } = Fe(), [d] = ke();
2072
+ const [t, s] = Je(), { flexChild: r, gridChild: o } = Xt(), [, l] = wr(Wt), { t: a } = Fe(), [d] = ke();
2072
2073
  return b(d) ? /* @__PURE__ */ e.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 rounded-xl p-4", children: [
2073
2074
  /* @__PURE__ */ e.jsx(Ze, { className: "mx-auto text-3xl" }),
2074
2075
  /* @__PURE__ */ e.jsx("h1", { children: a("no_styling_block_selected") }),
@@ -2080,31 +2081,31 @@ function ps() {
2080
2081
  ] })
2081
2082
  ] }) }) : (
2082
2083
  // eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions
2083
- /* @__PURE__ */ e.jsxs("div", { onClick: () => o(!1), className: "flex h-full flex-col", children: [
2084
+ /* @__PURE__ */ e.jsxs("div", { onClick: () => l(!1), className: "flex h-full flex-col", children: [
2084
2085
  /* @__PURE__ */ e.jsx("div", { className: "flex flex-col space-x-4 space-y-3 border-b border-border px-4 py-2", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-end gap-x-1.5", children: [
2085
- /* @__PURE__ */ e.jsx(Se, { htmlFor: "", className: "flex gap-x-1.5 text-xs italic", children: "State" }),
2086
- /* @__PURE__ */ e.jsxs(Hr, { defaultValue: t, onValueChange: (i) => s(i), children: [
2087
- /* @__PURE__ */ e.jsx(Br, { className: "h-auto w-fit p-1 px-3", children: /* @__PURE__ */ e.jsx(Ar, { placeholder: "State" }) }),
2086
+ /* @__PURE__ */ e.jsx(Te, { htmlFor: "", className: "flex gap-x-1.5 text-xs italic", children: "State" }),
2087
+ /* @__PURE__ */ e.jsxs(Br, { defaultValue: t, onValueChange: (i) => s(i), children: [
2088
+ /* @__PURE__ */ e.jsx(Hr, { className: "h-auto w-fit p-1 px-3", children: /* @__PURE__ */ e.jsx(Ar, { placeholder: "State" }) }),
2088
2089
  /* @__PURE__ */ e.jsxs(Dr, { children: [
2089
- /* @__PURE__ */ e.jsx(H, { value: "", children: "Normal" }),
2090
- /* @__PURE__ */ e.jsx(H, { value: "hover", children: "Hover" }),
2091
- /* @__PURE__ */ e.jsx(H, { value: "active", children: "Active" }),
2092
- /* @__PURE__ */ e.jsx(H, { value: "focus", children: "Focus" }),
2093
- /* @__PURE__ */ e.jsx(H, { value: "before", children: "Before" }),
2094
- /* @__PURE__ */ e.jsx(H, { value: "after", children: "After" }),
2095
- /* @__PURE__ */ e.jsx(H, { value: "only", children: "Only" }),
2096
- /* @__PURE__ */ e.jsx(H, { value: "first", children: "First" }),
2097
- /* @__PURE__ */ e.jsx(H, { value: "last", children: "Last" }),
2098
- /* @__PURE__ */ e.jsx(H, { value: "first-letter", children: "First Letter" }),
2099
- /* @__PURE__ */ e.jsx(H, { value: "first-line", children: "First Line" }),
2100
- /* @__PURE__ */ e.jsx(H, { value: "disabled", children: "Disabled" })
2090
+ /* @__PURE__ */ e.jsx(B, { value: "", children: "Normal" }),
2091
+ /* @__PURE__ */ e.jsx(B, { value: "hover", children: "Hover" }),
2092
+ /* @__PURE__ */ e.jsx(B, { value: "active", children: "Active" }),
2093
+ /* @__PURE__ */ e.jsx(B, { value: "focus", children: "Focus" }),
2094
+ /* @__PURE__ */ e.jsx(B, { value: "before", children: "Before" }),
2095
+ /* @__PURE__ */ e.jsx(B, { value: "after", children: "After" }),
2096
+ /* @__PURE__ */ e.jsx(B, { value: "only", children: "Only" }),
2097
+ /* @__PURE__ */ e.jsx(B, { value: "first", children: "First" }),
2098
+ /* @__PURE__ */ e.jsx(B, { value: "last", children: "Last" }),
2099
+ /* @__PURE__ */ e.jsx(B, { value: "first-letter", children: "First Letter" }),
2100
+ /* @__PURE__ */ e.jsx(B, { value: "first-line", children: "First Line" }),
2101
+ /* @__PURE__ */ e.jsx(B, { value: "disabled", children: "Disabled" })
2101
2102
  ] })
2102
2103
  ] })
2103
2104
  ] }) }),
2104
2105
  /* @__PURE__ */ e.jsxs(Vr, { className: "no-scrollbar -mx-1 h-full overflow-x-hidden", children: [
2105
2106
  /* @__PURE__ */ e.jsxs(tt, { type: "multiple", className: "h-full w-full", children: [
2106
2107
  r && /* @__PURE__ */ e.jsx(he, { section: Yr }),
2107
- l ? /* @__PURE__ */ e.jsx(he, { section: Xr }) : null,
2108
+ o ? /* @__PURE__ */ e.jsx(he, { section: Xr }) : null,
2108
2109
  Wr.map((i) => /* @__PURE__ */ e.jsx(he, { section: i }, i.heading)),
2109
2110
  /* @__PURE__ */ e.jsx(cs, { section: { heading: "Attributes" } })
2110
2111
  ] }),
@@ -2124,8 +2125,8 @@ const us = {
2124
2125
  "-": 1,
2125
2126
  deg: 1,
2126
2127
  ms: 0.1
2127
- }, ml = () => {
2128
- const t = G(), { t: s } = Fe(), [r, l] = P.useState(""), [o, a] = P.useState({
2128
+ }, bo = () => {
2129
+ const t = G(), { t: s } = Fe(), [r, o] = $.useState(""), [l, a] = $.useState({
2129
2130
  onDrag: (n) => n,
2130
2131
  onDragEnd: (n) => n,
2131
2132
  dragStartY: 0,
@@ -2136,18 +2137,18 @@ const us = {
2136
2137
  cssProperty: ""
2137
2138
  }), d = me(
2138
2139
  (n) => {
2139
- const u = !p(o, "negative", !1), x = p(o, "cssProperty", "");
2140
- let c = parseFloat(o.dragStartValue);
2140
+ const u = !p(l, "negative", !1), x = p(l, "cssProperty", "");
2141
+ let c = parseFloat(l.dragStartValue);
2141
2142
  c = _e(c) ? 0 : c;
2142
- let m = us[o.dragUnit];
2143
+ let m = us[l.dragUnit];
2143
2144
  (z(x, "scale") || x === "opacity") && (m = 10);
2144
- let g = (o.dragStartY - n.pageY) / m + c;
2145
- u && g < 0 && (g = 0), x === "opacity" && g > 1 && (g = 1), o.onDrag(`${g}`), l(`${g}`);
2145
+ let g = (l.dragStartY - n.pageY) / m + c;
2146
+ u && g < 0 && (g = 0), x === "opacity" && g > 1 && (g = 1), l.onDrag(`${g}`), o(`${g}`);
2146
2147
  },
2147
- [o],
2148
+ [l],
2148
2149
  50
2149
2150
  ), i = A(() => {
2150
- setTimeout(() => o.onDragEnd(`${r}`), 100), a({
2151
+ setTimeout(() => l.onDragEnd(`${r}`), 100), a({
2151
2152
  onDrag: (n) => n,
2152
2153
  onDragEnd: (n) => n,
2153
2154
  dragStartY: 0,
@@ -2157,12 +2158,12 @@ const us = {
2157
2158
  negative: !1,
2158
2159
  cssProperty: ""
2159
2160
  });
2160
- }, [o, r, a]);
2161
+ }, [l, r, a]);
2161
2162
  return vt(t) ? /* @__PURE__ */ e.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 rounded-xl p-4", children: [
2162
2163
  /* @__PURE__ */ e.jsx(Ze, { className: "mx-auto text-3xl" }),
2163
2164
  /* @__PURE__ */ e.jsx("h1", { children: s("no_block_selected_for_styling") })
2164
- ] }) }) : /* @__PURE__ */ e.jsxs(ot.Provider, { value: { setDragData: a }, children: [
2165
- o.dragging ? /* @__PURE__ */ e.jsx(
2165
+ ] }) }) : /* @__PURE__ */ e.jsxs(lt.Provider, { value: { setDragData: a }, children: [
2166
+ l.dragging ? /* @__PURE__ */ e.jsx(
2166
2167
  "div",
2167
2168
  {
2168
2169
  onMouseMove: d,
@@ -2172,21 +2173,21 @@ const us = {
2172
2173
  ) : null,
2173
2174
  /* @__PURE__ */ e.jsxs(Ot, { defaultValue: "settings", className: "flex h-full w-full flex-col py-1", children: [
2174
2175
  /* @__PURE__ */ e.jsxs(Mt, { className: "mx-1 grid grid-cols-2", children: [
2175
- /* @__PURE__ */ e.jsx(He, { value: "settings", children: "Settings" }),
2176
- /* @__PURE__ */ e.jsx(He, { value: "styling", children: "Styling" })
2176
+ /* @__PURE__ */ e.jsx(Be, { value: "settings", children: "Settings" }),
2177
+ /* @__PURE__ */ e.jsx(Be, { value: "styling", children: "Styling" })
2177
2178
  ] }),
2178
2179
  /* @__PURE__ */ e.jsx(
2179
- Be,
2180
+ He,
2180
2181
  {
2181
2182
  value: "settings",
2182
2183
  className: "no-scrollbar -mx-1 -mr-2 h-full flex-1 overflow-y-auto overflow-x-hidden",
2183
2184
  children: /* @__PURE__ */ e.jsx(Er, {})
2184
2185
  }
2185
2186
  ),
2186
- /* @__PURE__ */ e.jsx(Be, { value: "styling", className: "flex-1 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(ps, {}) })
2187
+ /* @__PURE__ */ e.jsx(He, { value: "styling", className: "flex-1 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(ps, {}) })
2187
2188
  ] })
2188
2189
  ] });
2189
2190
  };
2190
2191
  export {
2191
- ml as default
2192
+ bo as default
2192
2193
  };