@chaibuilder/sdk 1.0.9 → 1.0.11

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