@chaibuilder/sdk 1.2.25 → 1.2.26

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 (182) hide show
  1. package/dist/AddBlocks-l1JENNvq.js +206 -0
  2. package/dist/AddBlocks-zPPKkeKs.cjs +1 -0
  3. package/dist/BrandingOptions-DkpqGARR.cjs +1 -0
  4. package/dist/{BrandingOptions-iTyWpwTs.js → BrandingOptions-udtH5yJs.js} +54 -40
  5. package/dist/{CanvasArea-dZjng782.js → CanvasArea-h0W-Tyha.js} +324 -340
  6. package/dist/CanvasArea-zme1r3Zi.cjs +55 -0
  7. package/dist/Class-PoYusiA5.cjs +1 -0
  8. package/dist/{Class-ahc3NIbq.js → Class-lGzsNBOK.js} +29 -26
  9. package/dist/CurrentPage-Hl52iub_.cjs +1 -0
  10. package/dist/{CurrentPage-Kmfp-kFk.js → CurrentPage-tJUjXWdb.js} +54 -40
  11. package/dist/Functions-7jnEwJyw.js +15 -0
  12. package/dist/Functions-N3yhPYKY.cjs +1 -0
  13. package/dist/ListTree-WvTjY5rr.cjs +1 -0
  14. package/dist/{ListTree-N3jeD790.js → ListTree-cZ-Ihlt3.js} +96 -86
  15. package/dist/MODIFIERS-0g14w5RS.cjs +1 -0
  16. package/dist/{MODIFIERS-CNqNUapY.js → MODIFIERS-dytZ-osO.js} +4 -10
  17. package/dist/PagesPanel-6rrLXEO-.js +64 -0
  18. package/dist/PagesPanel-WzCocl6u.cjs +1 -0
  19. package/dist/ProjectPanel-o7gdcwPn.cjs +1 -0
  20. package/dist/ProjectPanel-tz3bjdXy.js +85 -0
  21. package/dist/{STRINGS-b432aBJJ.js → STRINGS--j49GZJP.js} +2 -2
  22. package/dist/{Settings-jCcd-VE6.js → Settings-4s2LUVmC.js} +401 -407
  23. package/dist/Settings-AqoKwR92.cjs +1 -0
  24. package/dist/SidePanels-3o6Okmvu.cjs +1 -0
  25. package/dist/{SidePanels-pHMYprpW.js → SidePanels-bugFfInz.js} +118 -108
  26. package/dist/Topbar-CqW7G360.cjs +1 -0
  27. package/dist/Topbar-pWzBEOed.js +132 -0
  28. package/dist/UnsplashImages-NGskB93R.cjs +1 -0
  29. package/dist/{UnsplashImages-L7x_3RQf.js → UnsplashImages-qvwFbV-E.js} +63 -50
  30. package/dist/{UploadImages-zdEJRLD8.js → UploadImages-9NapgXBq.js} +60 -37
  31. package/dist/UploadImages-Oh7Glr9A.cjs +1 -0
  32. package/dist/_commonjsHelpers-UyOWmZb0.js +8 -0
  33. package/dist/_commonjsHelpers-wDK0ZLPo.cjs +1 -0
  34. package/dist/add-page-modal--6TTBRYa.cjs +1 -0
  35. package/dist/add-page-modal-k2Kb92HS.js +104 -0
  36. package/dist/confirm-alert-C4M9eF-o.cjs +1 -0
  37. package/dist/confirm-alert-GUhZ_G8w.js +60 -0
  38. package/dist/controls-KK2oLIa8.cjs +1 -0
  39. package/dist/{controls-IS5qnRce.js → controls-OfJWSEqC.js} +85 -20
  40. package/dist/core.cjs +1 -1
  41. package/dist/core.js +75 -150
  42. package/dist/defaultTheme-7VqqhOcp.cjs +1 -0
  43. package/dist/{defaultTheme-4kA60XdB.js → defaultTheme-D8B4-wHO.js} +8 -6
  44. package/dist/delete-page-modal-cFoL-wdo.cjs +1 -0
  45. package/dist/delete-page-modal-zONvdebd.js +83 -0
  46. package/dist/email-blocks.cjs +1 -1
  47. package/dist/email-blocks.js +292 -3
  48. package/dist/email.cjs +1 -1
  49. package/dist/email.js +37 -18
  50. package/dist/empty-slot-ZBlsQi6m.js +15 -0
  51. package/dist/empty-slot-nzYOgZuS.cjs +1 -0
  52. package/dist/{form-0_RLz2TB.js → form-STUz-6nE.js} +12 -12
  53. package/dist/form-lBQ_76Uw.cjs +1 -0
  54. package/dist/{html-to-json-uSnxl72F.cjs → html-to-json-efmv1pCj.cjs} +1 -1
  55. package/dist/{html-to-json-2xtb7520.js → html-to-json-ngX9ef2u.js} +41 -41
  56. package/dist/index-Gk6sASBd.js +3080 -0
  57. package/dist/index-OB199Izc.cjs +206 -0
  58. package/dist/index-SkyM3d6Q.js +39503 -0
  59. package/dist/index-YpnaudSM.js +63 -0
  60. package/dist/index-e0c8PmRQ.js +205 -0
  61. package/dist/index-ecnGWzh9.cjs +1 -0
  62. package/dist/index-gi1LIOCw.cjs +1 -0
  63. package/dist/index-h-hd6EvN.cjs +1 -0
  64. package/dist/index-llTXLDGE.js +2201 -0
  65. package/dist/index-mbyqq81O.cjs +1 -0
  66. package/dist/{jsx-runtime-Sp0orL4X.js → jsx-runtime-WbnYoNE9.js} +109 -106
  67. package/dist/jsx-runtime-Z_BpKhVy.cjs +27 -0
  68. package/dist/lib.cjs +2 -2
  69. package/dist/lib.js +66 -62
  70. package/dist/page-viewer-2kwnKM6v.cjs +1 -0
  71. package/dist/{page-viewer-NnOwmAmu.js → page-viewer-Pdg9F5Hv.js} +57 -43
  72. package/dist/project-general-setting-CnNL98NM.cjs +1 -0
  73. package/dist/{project-general-setting-9ju3TDju.js → project-general-setting-f8Ebsn6K.js} +43 -35
  74. package/dist/project-seo-setting-mlxL_e2_.cjs +1 -0
  75. package/dist/{project-seo-setting-36CdUszM.js → project-seo-setting-pX34Qsym.js} +40 -23
  76. package/dist/render.cjs +1 -1
  77. package/dist/render.js +14 -13
  78. package/dist/single-page-detail-XfzrGlzA.cjs +1 -0
  79. package/dist/{single-page-detail-hD1jKZ8k.js → single-page-detail-dpe5LT0M.js} +74 -66
  80. package/dist/studio.cjs +1 -1
  81. package/dist/studio.js +40 -24
  82. package/dist/ui.cjs +1 -1
  83. package/dist/ui.js +160 -365
  84. package/dist/web-blocks.cjs +6 -1
  85. package/dist/web-blocks.js +1153 -3
  86. package/package.json +1 -1
  87. package/dist/AddBlocks-Ol3iIVKa.js +0 -207
  88. package/dist/AddBlocks-a1c-7Ewz.cjs +0 -1
  89. package/dist/BrandingOptions-6rnt0UaA.cjs +0 -1
  90. package/dist/CanvasArea-R4ogF9AT.cjs +0 -55
  91. package/dist/ChaiBuilderEditor-m30yoOgJ.cjs +0 -163
  92. package/dist/ChaiBuilderEditor-vP4at00I.js +0 -27974
  93. package/dist/Class-eieto7e-.cjs +0 -1
  94. package/dist/Controls-3Cc1XYXg.js +0 -105
  95. package/dist/Controls-ky25Ebo3.cjs +0 -1
  96. package/dist/CurrentPage-3gQTH0Zt.cjs +0 -1
  97. package/dist/Functions-Hvon6AMZ.cjs +0 -1
  98. package/dist/Functions-NzT2Six_.js +0 -15
  99. package/dist/ImagesPanel-J1RlG7xG.cjs +0 -1
  100. package/dist/ImagesPanel-Wb0GF_NA.js +0 -29
  101. package/dist/ListTree-CZ-mtjZ9.cjs +0 -1
  102. package/dist/MODIFIERS-o1p3VnpS.cjs +0 -1
  103. package/dist/PagesPanel-Gi0z6gaf.cjs +0 -1
  104. package/dist/PagesPanel-u1IB-nRr.js +0 -48
  105. package/dist/ProjectPanel-EydGZmMW.js +0 -71
  106. package/dist/ProjectPanel-kiiljG4H.cjs +0 -1
  107. package/dist/Settings-8ilCSH8b.cjs +0 -1
  108. package/dist/SidePanels-T36C6Lhc.cjs +0 -1
  109. package/dist/Topbar-CvWQuspR.cjs +0 -1
  110. package/dist/Topbar-pbIDUE_B.js +0 -122
  111. package/dist/UnsplashImages-KBZPd9dv.cjs +0 -1
  112. package/dist/UploadImages-GkkJVAgG.cjs +0 -1
  113. package/dist/accordion-oPUeqPCZ.js +0 -42
  114. package/dist/accordion-ynvFtV_p.cjs +0 -1
  115. package/dist/add-page-modal-9SGv2hgc.cjs +0 -1
  116. package/dist/add-page-modal-JCDXZIPW.js +0 -95
  117. package/dist/alert-dialog-P9xMMB6C.cjs +0 -1
  118. package/dist/alert-dialog-rypfO5ly.js +0 -64
  119. package/dist/badge-E-S7CqUt.cjs +0 -1
  120. package/dist/badge-tEwO7C51.js +0 -23
  121. package/dist/block-helpers-OKHmRRol.cjs +0 -1
  122. package/dist/block-helpers-oSFpSsGz.js +0 -23
  123. package/dist/command-BxR6jaCI.cjs +0 -1
  124. package/dist/command-Pn3HKDuV.js +0 -97
  125. package/dist/confirm-alert-uNm0lZ0y.cjs +0 -1
  126. package/dist/confirm-alert-wR5_VJ1l.js +0 -36
  127. package/dist/context-menu-8dC9uGXj.js +0 -122
  128. package/dist/context-menu-IgLbIuth.cjs +0 -1
  129. package/dist/controls-L7DPvB0m.cjs +0 -1
  130. package/dist/defaultTheme-mrkeGFGI.cjs +0 -1
  131. package/dist/delete-page-modal-7KmP1elv.js +0 -67
  132. package/dist/delete-page-modal-SgfwvfNu.cjs +0 -1
  133. package/dist/dropdown-menu-El86_9Uo.js +0 -124
  134. package/dist/dropdown-menu-SiHzqWwZ.cjs +0 -1
  135. package/dist/form-W58AVUdf.cjs +0 -1
  136. package/dist/hover-card-KUwpDkW8.cjs +0 -1
  137. package/dist/hover-card-q138xxXR.js +0 -45
  138. package/dist/iconBase-gbUAAO2L.cjs +0 -1
  139. package/dist/iconBase-h4DuR_XT.js +0 -63
  140. package/dist/index-9MmykVSc.cjs +0 -1
  141. package/dist/index-hElOGcFr.js +0 -2200
  142. package/dist/index-lDTsQp7h.js +0 -188
  143. package/dist/index-rq5Y9ZDy.cjs +0 -1
  144. package/dist/jsx-runtime-JYMCiFoE.cjs +0 -27
  145. package/dist/label-KaP7MRrs.js +0 -10
  146. package/dist/label-tFm8HZdb.cjs +0 -1
  147. package/dist/link-WbcKdQ9k.cjs +0 -1
  148. package/dist/link-xuhP-4dN.js +0 -196
  149. package/dist/page-viewer-Hx5hxHKm.cjs +0 -1
  150. package/dist/popover-a84pbVhQ.js +0 -23
  151. package/dist/popover-fKjgcRUx.cjs +0 -1
  152. package/dist/project-general-setting-FxkwjvJz.cjs +0 -1
  153. package/dist/project-seo-setting-RU7qiXxb.cjs +0 -1
  154. package/dist/scroll-area-FiHvy-TZ.cjs +0 -1
  155. package/dist/scroll-area-ewXbxc3n.js +0 -30
  156. package/dist/select-7bjg-rr9.cjs +0 -1
  157. package/dist/select-POGdEDHT.js +0 -75
  158. package/dist/separator-3Civ-6hb.cjs +0 -1
  159. package/dist/separator-SctTn0Qi.js +0 -18
  160. package/dist/single-page-detail-beY0MT1b.cjs +0 -1
  161. package/dist/skeleton-STeL9VrJ.cjs +0 -1
  162. package/dist/skeleton-lu8e7q2y.js +0 -239
  163. package/dist/tabs-_4WbA1cc.cjs +0 -1
  164. package/dist/tabs-yQ3oGziM.js +0 -106
  165. package/dist/textarea-1kZEh7ki.cjs +0 -1
  166. package/dist/textarea-b2QvVhrK.js +0 -73
  167. package/dist/useAddBlock-8pxOEYIl.cjs +0 -1
  168. package/dist/useAddBlock-FEKFJNwQ.js +0 -69
  169. package/dist/useChaiExternalData-fkFgoS80.js +0 -6
  170. package/dist/useChaiExternalData-rwoAZ6uU.cjs +0 -1
  171. package/dist/useDarkMode-7i57segK.cjs +0 -1
  172. package/dist/useDarkMode-8VHJlYyE.js +0 -23
  173. package/dist/useSelectedBreakpoints-6NK5qd7T.js +0 -10
  174. package/dist/useSelectedBreakpoints-7ONXb-vN.cjs +0 -1
  175. package/dist/useStylingState-Iuj84yvc.js +0 -186
  176. package/dist/useStylingState-OIvJMV6p.cjs +0 -1
  177. package/dist/useUiLibraries-nCdauJ4N.cjs +0 -1
  178. package/dist/useUiLibraries-psyWFbNc.js +0 -12
  179. package/dist/useUpdateBlocksProps-Unn8lUyj.cjs +0 -1
  180. package/dist/useUpdateBlocksProps-vWcDp-P9.js +0 -23
  181. package/dist/utils-dze1SGvB.js +0 -6
  182. package/dist/utils-qK_SjzzV.cjs +0 -1
@@ -1,86 +1,78 @@
1
- import { j as e } from "./jsx-runtime-Sp0orL4X.js";
1
+ import { j as e } from "./jsx-runtime-WbnYoNE9.js";
2
2
  import * as de from "react";
3
- import $, { useState as w, useEffect as E, useMemo as _, useCallback as V, memo as mt, createContext as Ke, useContext as le } from "react";
4
- import { useThrottledCallback as be } from "@react-hookz/web";
5
- import { map as k, isEmpty as f, last as ft, forEach as Re, set as Ge, get as x, startCase as L, filter as ve, truncate as bt, isArray as pe, includes as M, first as ae, split as vt, toLower as oe, find as jt, omit as wt, debounce as Ct, keys as je, cloneDeep as kt, each as Nt, capitalize as we, reject as _t, nth as $e, startsWith as G, isNumber as St, parseInt as Tt, isNaN as qe, findLast as Rt, has as ce, flatten as q, intersection as Je, kebabCase as Vt, isNull as Ht } from "lodash-es";
6
- import { useTranslation as Y } from "react-i18next";
7
- import { PlusIcon as Ve, Cross2Icon as Qe, EyeOpenIcon as Dt, EyeClosedIcon as Ae, BorderAllIcon as A, WidthIcon as T, HeightIcon as R, ArrowUpIcon as ee, ArrowRightIcon as te, ArrowDownIcon as re, ArrowLeftIcon as se, ArrowTopLeftIcon as Bt, ArrowTopRightIcon as Pt, ArrowBottomRightIcon as It, ArrowBottomLeftIcon as $t, AlignLeftIcon as At, AlignCenterHorizontallyIcon as Mt, AlignRightIcon as Lt, StretchHorizontallyIcon as Et, FontItalicIcon as Ot, UnderlineIcon as Ft, OverlineIcon as zt, LetterCaseUppercaseIcon as Yt, Cross1Icon as Xt, InfoCircledIcon as He, MinusIcon as Zt, BoxIcon as et, TriangleDownIcon as Wt, RowSpacingIcon as Ut, CrossCircledIcon as Kt, CaretDownIcon as Gt, MixerHorizontalIcon as tt } from "@radix-ui/react-icons";
8
- import { S as De } from "./scroll-area-ewXbxc3n.js";
9
- import { D as qt, a as Jt, b as Qt, c as er, e as tr, f as rr, d as sr, T as or, g as lr, h as he, i as ye } from "./tabs-yQ3oGziM.js";
10
- import { k as K, E as rt, n as ue, j as st, b as ar, l as nr } from "./ChaiBuilderEditor-vP4at00I.js";
11
- import { a as ot, u as lt } from "./useUpdateBlocksProps-vWcDp-P9.js";
12
- import { T as O, a as F, c as z, B as U, u as ir, e as dr } from "./skeleton-lu8e7q2y.js";
13
- import { u as cr } from "./controls-IS5qnRce.js";
14
- import { EditIcon as pr, TrashIcon as ur, Check as xr, BrushIcon as gr, DeleteIcon as hr } from "lucide-react";
15
- import { P as yr, a as mr, b as fr } from "./popover-a84pbVhQ.js";
16
- import { C as br, b as vr, c as jr, d as wr, e as Cr, f as kr, I as Ce } from "./command-Pn3HKDuV.js";
17
- import { getChaiDataProviders as Nr, getBlockComponent as Be, useGlobalStylingPresets as _r } from "@chaibuilder/runtime";
18
- import { u as at } from "./useChaiExternalData-fkFgoS80.js";
19
- import { J as Sr, a as Tr, d as Rr } from "./index-lDTsQp7h.js";
20
- import { A as nt, a as ke, b as Ne, c as _e } from "./accordion-oPUeqPCZ.js";
21
- import { g as Vr, a as Hr } from "./Controls-3Cc1XYXg.js";
22
- import Dr from "@rjsf/core";
23
- import Br from "@rjsf/validator-ajv8";
24
- import { R as Pr, I as Ir, a as $r, L as Ar } from "./link-xuhP-4dN.js";
25
- import { u as Pe, a as it, d as dt, b as xe } from "./useStylingState-Iuj84yvc.js";
26
- import Mr from "react-autosuggest";
27
- import Lr from "fuse.js";
28
- import { A as Er, C as ge, g as Or } from "./Class-ahc3NIbq.js";
29
- import { L as ct } from "./label-KaP7MRrs.js";
30
- import { S as Fr } from "./STRINGS-b432aBJJ.js";
31
- import { a as zr, u as Me } from "./useDarkMode-8VHJlYyE.js";
32
- import { S as Yr, c as Xr, b as Zr, d as Wr, f as H } from "./select-POGdEDHT.js";
33
- import { D as Ur, a as Kr, b as Gr, f as Le, g as Ee, i as Oe, c as Fe, h as ze } from "./dropdown-menu-El86_9Uo.js";
34
- import "@radix-ui/react-scroll-area";
35
- import "./utils-dze1SGvB.js";
3
+ import $, { useState as w, useMemo as _, useEffect as L, useCallback as V, memo as mt, createContext as Ke, useContext as oe } from "react";
4
+ import { useThrottledCallback as fe } from "@react-hookz/web";
5
+ import { forEach as Re, isArray as pe, omit as bt, truncate as ft, includes as M, get as x, first as ae, split as vt, startCase as E, toLower as le, isEmpty as b, map as k, find as jt, last as wt, filter as ve, set as Ge, debounce as Ct, keys as je, cloneDeep as kt, each as Nt, capitalize as we, reject as _t, nth as $e, startsWith as G, isNumber as Tt, parseInt as St, isNaN as qe, findLast as Rt, flatten as q, intersection as Je, has as ce, kebabCase as Vt, isNull as Ht } from "lodash-es";
6
+ import { useTranslation as z } from "react-i18next";
7
+ import { PlusIcon as Ve, Cross2Icon as Qe, EyeOpenIcon as Dt, EyeClosedIcon as Ae, BorderAllIcon as A, WidthIcon as S, HeightIcon as R, ArrowUpIcon as ee, ArrowRightIcon as te, ArrowDownIcon as re, ArrowLeftIcon as se, ArrowTopLeftIcon as Bt, ArrowTopRightIcon as Pt, ArrowBottomRightIcon as It, ArrowBottomLeftIcon as $t, AlignLeftIcon as At, AlignCenterHorizontallyIcon as Mt, AlignRightIcon as Et, StretchHorizontallyIcon as Lt, FontItalicIcon as Ot, UnderlineIcon as Ft, OverlineIcon as Yt, LetterCaseUppercaseIcon as zt, Cross1Icon as Xt, InfoCircledIcon as He, MinusIcon as Zt, BoxIcon as et, RowSpacingIcon as Wt, TriangleDownIcon as Ut, CrossCircledIcon as Kt, CaretDownIcon as Gt, MixerHorizontalIcon as tt } from "@radix-ui/react-icons";
8
+ import { aV as qt, aW as Jt, B as U, aX as Qt, aY as er, aZ as tr, a_ as rr, a$ as sr, b0 as lr, b1 as or, a1 as K, af as ar, ag as nr, ah as ir, b2 as dr, ad as cr, ao as pr, ae as ur, ap as O, aq as F, ar as Y, b3 as xr, b4 as gr, b5 as hr, b6 as yr, b7 as mr, b8 as br, a6 as rt, a5 as st, h as fr, b9 as lt, ba as Ce, bb as ke, bc as Ne, ac as ue, M as De, _ as ot, r as at, aB as nt, bd as _e, v as vr, be as jr, $ as xe, V as wr, a4 as it, N as Me, aG as Cr, aH as kr, aI as Nr, bf as Be, aJ as Ee, aK as Le, bg as Oe, bh as Fe, bi as Ye, a7 as _r, aj as Tr, ak as Sr, al as Rr, am as Vr, an as H, au as Hr, av as Dr, aw as he, ax as ye } from "./index-Gk6sASBd.js";
9
+ import { u as Br } from "./controls-OfJWSEqC.js";
10
+ import { Check as Pr, EditIcon as Ir, TrashIcon as $r, BrushIcon as Ar, DeleteIcon as Mr } from "lucide-react";
11
+ import { getBlockComponent as Pe, getChaiDataProviders as Er, useGlobalStylingPresets as Lr } from "@chaibuilder/runtime";
12
+ import { E as dt, u as ct } from "./index-SkyM3d6Q.js";
13
+ import { J as Or, a as Fr, d as Yr } from "./index-e0c8PmRQ.js";
14
+ import zr from "@rjsf/core";
15
+ import Xr from "@rjsf/validator-ajv8";
16
+ import Zr from "react-autosuggest";
17
+ import Wr from "fuse.js";
18
+ import { A as Ur, C as ge, g as Kr } from "./Class-lGzsNBOK.js";
19
+ import { a as Gr } from "./STRINGS--j49GZJP.js";
20
+ import "./_commonjsHelpers-UyOWmZb0.js";
21
+ import "./Functions-7jnEwJyw.js";
36
22
  import "clsx";
37
23
  import "tailwind-merge";
38
- import "@radix-ui/react-dialog";
39
- import "@radix-ui/react-tabs";
40
- import "./MODIFIERS-CNqNUapY.js";
41
- import "react-dom";
42
- import "@floating-ui/react-dom";
43
24
  import "jotai";
44
- import "i18next";
45
- import "flagged";
46
- import "./Functions-NzT2Six_.js";
47
- import "react-hotkeys-hook";
48
- import "@radix-ui/react-slot";
25
+ import "./MODIFIERS-dytZ-osO.js";
26
+ import "@radix-ui/react-toggle";
49
27
  import "class-variance-authority";
28
+ import "@radix-ui/react-switch";
29
+ import "@radix-ui/react-slot";
30
+ import "@radix-ui/react-accordion";
31
+ import "@radix-ui/react-alert-dialog";
32
+ import "@radix-ui/react-dialog";
33
+ import "@radix-ui/react-label";
34
+ import "@radix-ui/react-scroll-area";
35
+ import "@radix-ui/react-tabs";
50
36
  import "@radix-ui/react-tooltip";
51
- import "@radix-ui/react-toast";
52
37
  import "@radix-ui/react-popover";
38
+ import "@radix-ui/react-menubar";
39
+ import "@radix-ui/react-hover-card";
40
+ import "@radix-ui/react-select";
41
+ import "@radix-ui/react-dropdown-menu";
42
+ import "@radix-ui/react-separator";
43
+ import "@radix-ui/react-toast";
53
44
  import "cmdk";
54
- import "@radix-ui/react-accordion";
45
+ import "@radix-ui/react-context-menu";
55
46
  import "react-icons-picker";
56
- import "./ImagesPanel-Wb0GF_NA.js";
47
+ import "react-dom";
57
48
  import "react-quill";
58
- import "@radix-ui/react-label";
59
- import "@radix-ui/react-select";
60
- import "@radix-ui/react-dropdown-menu";
49
+ import "i18next";
50
+ import "@floating-ui/react-dom";
51
+ import "flagged";
52
+ import "react-hotkeys-hook";
61
53
  function qr(r) {
62
54
  const s = [], t = {};
63
- function d(o, n) {
64
- Re(n, (l, p) => {
65
- const i = o ? `${o}.${p}` : p, c = pe(l) ? "list" : typeof l;
66
- s.push(i), t[i] = c === "string" ? "text" : c === "object" ? "model" : c, c === "object" && !pe(l) && d(i, l);
55
+ function d(l, n) {
56
+ Re(n, (o, p) => {
57
+ const i = l ? `${l}.${p}` : p, c = pe(o) ? "list" : typeof o;
58
+ s.push(i), t[i] = c === "string" ? "text" : c === "object" ? "model" : c, c === "object" && !pe(o) && d(i, o);
67
59
  });
68
60
  }
69
- return d("", wt(r, ["styles", "_type", "_id", "_name", "_bindings"])), { paths: s, pathsType: t };
61
+ return d("", bt(r, ["styles", "_type", "_id", "_name", "_bindings"])), { paths: s, pathsType: t };
70
62
  }
71
- const Se = ({ data: r, fullView: s }) => {
63
+ const Te = ({ data: r, fullView: s }) => {
72
64
  if (!r)
73
65
  return null;
74
66
  const t = typeof r;
75
67
  return s ? typeof r == "object" ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
76
68
  /* @__PURE__ */ e.jsx("div", { className: "h-3" }),
77
- /* @__PURE__ */ e.jsx(rt, { children: /* @__PURE__ */ e.jsx(
78
- Sr,
69
+ /* @__PURE__ */ e.jsx(dt, { children: /* @__PURE__ */ e.jsx(
70
+ Or,
79
71
  {
80
72
  data: r,
81
- shouldExpandNode: Tr,
73
+ shouldExpandNode: Fr,
82
74
  style: {
83
- ...Rr,
75
+ ...Yr,
84
76
  container: "max-h-[40vh] overflow-y-auto text-[12px] leading-[1.5] tracking-wide font-mono",
85
77
  stringValue: "text-orange-600",
86
78
  label: "text-green-900 font-semibold pr-1 tracking-wider"
@@ -90,61 +82,61 @@ const Se = ({ data: r, fullView: s }) => {
90
82
  ] }) : /* @__PURE__ */ e.jsxs("div", { className: "max-h-36 w-full overflow-y-auto overflow-x-hidden text-[12px] leading-4 text-gray-800/50", children: [
91
83
  /* @__PURE__ */ e.jsx("span", { className: "font-medium text-gray-800/80", children: "Content: " }),
92
84
  r
93
- ] }) : /* @__PURE__ */ e.jsx("div", { className: "w-full overflow-hidden whitespace-nowrap text-[10px] leading-3 text-gray-800/50", children: bt(t === "object" ? JSON.stringify(r) : r, { length: 40 }) });
94
- }, Ye = ({
85
+ ] }) : /* @__PURE__ */ e.jsx("div", { className: "w-full overflow-hidden whitespace-nowrap text-[10px] leading-3 text-gray-800/50", children: ft(t === "object" ? JSON.stringify(r) : r, { length: 40 }) });
86
+ }, ze = ({
95
87
  type: r,
96
88
  value: s = "",
97
89
  setValue: t,
98
90
  data: d,
99
- onChange: o,
91
+ onChange: l,
100
92
  dataType: n,
101
- appliedBindings: l
93
+ appliedBindings: o
102
94
  }) => {
103
- const { paths: p, pathsType: i } = qr(d), c = r === "PROP" ? Be(d == null ? void 0 : d._type) : {}, h = r === "PROP", [a, g] = w(!1), y = _(() => r === "PROP" ? p.filter(
104
- (u) => !M(l, u) && x(c, `props.${ae(vt(u, "."))}.binding`)
105
- ) : p.filter((u) => n === x(i, u, "")), [r, p, l, n, c]);
106
- return E(() => {
107
- s && o(s);
95
+ const { paths: p, pathsType: i } = qr(d), c = r === "PROP" ? Pe(d == null ? void 0 : d._type) : {}, h = r === "PROP", [a, g] = w(!1), y = _(() => r === "PROP" ? p.filter(
96
+ (u) => !M(o, u) && x(c, `props.${ae(vt(u, "."))}.binding`)
97
+ ) : p.filter((u) => n === x(i, u, "")), [r, p, o, n, c]);
98
+ return L(() => {
99
+ s && l(s);
108
100
  }, [s, r]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
109
101
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-4", children: [
110
- /* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted-foreground", children: L(oe(r)) }),
111
- /* @__PURE__ */ e.jsxs(yr, { open: a, onOpenChange: g, children: [
112
- /* @__PURE__ */ e.jsx(mr, { asChild: !0, children: /* @__PURE__ */ e.jsx(
102
+ /* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted-foreground", children: E(le(r)) }),
103
+ /* @__PURE__ */ e.jsxs(qt, { open: a, onOpenChange: g, children: [
104
+ /* @__PURE__ */ e.jsx(Jt, { asChild: !0, children: /* @__PURE__ */ e.jsx(
113
105
  U,
114
106
  {
115
107
  variant: "outline",
116
108
  size: "sm",
117
- className: ` ${f(s) ? "w-44 justify-center bg-blue-500 text-gray-100 hover:bg-blue-400 hover:text-white" : "min-w-[350px] items-center justify-between"}`,
109
+ className: ` ${b(s) ? "w-44 justify-center bg-blue-500 text-gray-100 hover:bg-blue-400 hover:text-white" : "min-w-[350px] items-center justify-between"}`,
118
110
  children: s ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
119
111
  /* @__PURE__ */ e.jsxs("span", { className: "pr-8 text-sm", children: [
120
- h && /* @__PURE__ */ e.jsx("span", { className: "mr-2 rounded-full bg-purple-100 px-2 py-0.5 text-[10px] text-purple-500", children: L(n) }),
112
+ h && /* @__PURE__ */ e.jsx("span", { className: "mr-2 rounded-full bg-purple-100 px-2 py-0.5 text-[10px] text-purple-500", children: E(n) }),
121
113
  s
122
114
  ] }),
123
115
  /* @__PURE__ */ e.jsx("span", { className: "cursor-pointer text-[9px] text-blue-400 underline hover:text-blue-700", children: "Change" })
124
116
  ] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
125
117
  "+ Set ",
126
- L(oe(r))
118
+ E(le(r))
127
119
  ] })
128
120
  }
129
121
  ) }),
130
- /* @__PURE__ */ e.jsx(fr, { className: "z-[999] min-w-[300px] p-0", side: "right", align: "start", children: /* @__PURE__ */ e.jsxs(br, { children: [
131
- /* @__PURE__ */ e.jsx(vr, { placeholder: `Choose ${oe(r)}...` }),
132
- /* @__PURE__ */ e.jsxs(jr, { children: [
133
- /* @__PURE__ */ e.jsx(wr, { children: "No results found." }),
134
- /* @__PURE__ */ e.jsx(Cr, { children: k(y, (u) => /* @__PURE__ */ e.jsxs(
135
- kr,
122
+ /* @__PURE__ */ e.jsx(Qt, { className: "z-[999] min-w-[300px] p-0", side: "right", align: "start", children: /* @__PURE__ */ e.jsxs(er, { children: [
123
+ /* @__PURE__ */ e.jsx(tr, { placeholder: `Choose ${le(r)}...` }),
124
+ /* @__PURE__ */ e.jsxs(rr, { children: [
125
+ /* @__PURE__ */ e.jsx(sr, { children: "No results found." }),
126
+ /* @__PURE__ */ e.jsx(lr, { children: k(y, (u) => /* @__PURE__ */ e.jsxs(
127
+ or,
136
128
  {
137
129
  value: u,
138
130
  className: `cursor-pointer ${h ? "flex items-center justify-between" : "flex flex-col items-start justify-start"}`,
139
- onSelect: (b) => {
140
- t(jt(y, (j) => j === b) || null), g(!1);
131
+ onSelect: (f) => {
132
+ t(jt(y, (j) => j === f) || null), g(!1);
141
133
  },
142
134
  children: [
143
135
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
144
- /* @__PURE__ */ e.jsx(xr, { className: `h-4 w-4 text-green-500 ${s === u ? "" : "opacity-0"}` }),
136
+ /* @__PURE__ */ e.jsx(Pr, { className: `h-4 w-4 text-green-500 ${s === u ? "" : "opacity-0"}` }),
145
137
  u
146
138
  ] }),
147
- h ? /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx("span", { className: "rounded-full bg-purple-100 px-2 py-0.5 text-[10px] text-purple-500", children: L(x(i, u, "")) }) }) : /* @__PURE__ */ e.jsx("div", { className: "pl-6", children: /* @__PURE__ */ e.jsx(Se, { data: x(d, u) }) })
139
+ h ? /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx("span", { className: "rounded-full bg-purple-100 px-2 py-0.5 text-[10px] text-purple-500", children: E(x(i, u, "")) }) }) : /* @__PURE__ */ e.jsx("div", { className: "pl-6", children: /* @__PURE__ */ e.jsx(Te, { data: x(d, u) }) })
148
140
  ]
149
141
  },
150
142
  u
@@ -153,7 +145,7 @@ const Se = ({ data: r, fullView: s }) => {
153
145
  ] }) })
154
146
  ] })
155
147
  ] }),
156
- !h && !f(s) && /* @__PURE__ */ e.jsx("div", { className: "pt-2", children: /* @__PURE__ */ e.jsx(Se, { data: x(d, s, ""), fullView: !0 }) })
148
+ !h && !b(s) && /* @__PURE__ */ e.jsx("div", { className: "pt-2", children: /* @__PURE__ */ e.jsx(Te, { data: x(d, s, ""), fullView: !0 }) })
157
149
  ] });
158
150
  }, Jr = ({
159
151
  appliedBindings: r = [],
@@ -161,33 +153,33 @@ const Se = ({ data: r, fullView: s }) => {
161
153
  editMode: t,
162
154
  item: d
163
155
  }) => {
164
- const [o, n] = w(t ? d.key : ""), [l, p] = w(t ? d.value : ""), i = K(), [c] = at(), h = V(
156
+ const [l, n] = w(t ? d.key : ""), [o, p] = w(t ? d.value : ""), i = K(), [c] = ct(), h = V(
165
157
  (y, u) => {
166
- if (f(y))
158
+ if (b(y))
167
159
  return "";
168
160
  {
169
- const b = x(u === "PROP" ? i : c, y, "");
170
- if (pe(b))
161
+ const f = x(u === "PROP" ? i : c, y, "");
162
+ if (pe(f))
171
163
  return "list";
172
- const j = typeof b;
164
+ const j = typeof f;
173
165
  return j === "string" ? "text" : j === "object" ? "model" : j;
174
166
  }
175
167
  },
176
168
  [i, c]
177
169
  ), [a, g] = w(t ? h(d.key, "PROP") : "");
178
170
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
179
- /* @__PURE__ */ e.jsxs(er, { children: [
180
- /* @__PURE__ */ e.jsx(tr, { children: "Add Data Binding" }),
181
- /* @__PURE__ */ e.jsx(rr, { className: "text-xs", children: "Add prop and path of binding. Click save when you're done." })
171
+ /* @__PURE__ */ e.jsxs(ar, { children: [
172
+ /* @__PURE__ */ e.jsx(nr, { children: "Add Data Binding" }),
173
+ /* @__PURE__ */ e.jsx(ir, { className: "text-xs", children: "Add prop and path of binding. Click save when you're done." })
182
174
  ] }),
183
175
  /* @__PURE__ */ e.jsxs("div", { className: "relative flex flex-col gap-1", children: [
184
176
  /* @__PURE__ */ e.jsx(
185
- Ye,
177
+ ze,
186
178
  {
187
179
  type: "PROP",
188
180
  isDisabled: !1,
189
181
  placeholder: "Enter prop key",
190
- value: o,
182
+ value: l,
191
183
  setValue: n,
192
184
  onChange: (y) => {
193
185
  const u = h(y, "PROP");
@@ -200,12 +192,12 @@ const Se = ({ data: r, fullView: s }) => {
200
192
  ),
201
193
  /* @__PURE__ */ e.jsx("div", { className: "h-2" }),
202
194
  /* @__PURE__ */ e.jsx(
203
- Ye,
195
+ ze,
204
196
  {
205
197
  type: "PATH",
206
- isDisabled: f(o),
198
+ isDisabled: b(l),
207
199
  placeholder: "Enter data path",
208
- value: l,
200
+ value: o,
209
201
  setValue: p,
210
202
  onChange: (y) => {
211
203
  const u = h(y, "PATH");
@@ -217,26 +209,26 @@ const Se = ({ data: r, fullView: s }) => {
217
209
  }
218
210
  )
219
211
  ] }),
220
- /* @__PURE__ */ e.jsx(sr, { children: /* @__PURE__ */ e.jsx(
212
+ /* @__PURE__ */ e.jsx(dr, { children: /* @__PURE__ */ e.jsx(
221
213
  U,
222
214
  {
223
215
  type: "submit",
224
216
  className: "mt-4",
225
- disabled: f(o) && f(l),
226
- onClick: () => s({ key: o, value: l }),
217
+ disabled: b(l) && b(o),
218
+ onClick: () => s({ key: l, value: o }),
227
219
  children: "Save"
228
220
  }
229
221
  ) })
230
222
  ] });
231
- }, pt = ({ disabled: r, children: s, onAddBinding: t, appliedBindings: d, editMode: o = !0, item: n = {} }) => {
232
- const [l, p] = w(!1);
233
- return /* @__PURE__ */ e.jsxs(qt, { children: [
234
- /* @__PURE__ */ e.jsx(Jt, { disabled: r, asChild: !0, onClick: () => p(!0), children: s }),
235
- l && /* @__PURE__ */ e.jsx(Qt, { children: /* @__PURE__ */ e.jsx(
223
+ }, pt = ({ disabled: r, children: s, onAddBinding: t, appliedBindings: d, editMode: l = !0, item: n = {} }) => {
224
+ const [o, p] = w(!1);
225
+ return /* @__PURE__ */ e.jsxs(cr, { children: [
226
+ /* @__PURE__ */ e.jsx(pr, { disabled: r, asChild: !0, onClick: () => p(!0), children: s }),
227
+ o && /* @__PURE__ */ e.jsx(ur, { children: /* @__PURE__ */ e.jsx(
236
228
  Jr,
237
229
  {
238
230
  item: n,
239
- editMode: o,
231
+ editMode: l,
240
232
  appliedBindings: d,
241
233
  onAddBinding: (i) => {
242
234
  t(i), p(!1);
@@ -249,70 +241,70 @@ const Se = ({ data: r, fullView: s }) => {
249
241
  onAddBinding: s,
250
242
  onRemove: t,
251
243
  selectedBlock: d,
252
- dataProvider: o,
244
+ dataProvider: l,
253
245
  appliedBindings: n
254
246
  }) => {
255
- const [l, p] = w("string"), i = (c, h) => {
256
- if (f(c))
247
+ const [o, p] = w("string"), i = (c, h) => {
248
+ if (b(c))
257
249
  return "";
258
250
  {
259
- const a = x(h === "PROP" ? d : o, c, "");
251
+ const a = x(h === "PROP" ? d : l, c, "");
260
252
  if (pe(a))
261
253
  return "list";
262
254
  const g = typeof a;
263
255
  return g === "string" ? "text" : g === "object" ? "model" : g;
264
256
  }
265
257
  };
266
- return E(() => p(() => i(r.key, "PROP")), [r.key]), /* @__PURE__ */ e.jsxs("div", { className: "relative flex flex-col rounded-md border border-gray-200 p-2", children: [
258
+ return L(() => p(() => i(r.key, "PROP")), [r.key]), /* @__PURE__ */ e.jsxs("div", { className: "relative flex flex-col rounded-md border border-gray-200 p-2", children: [
267
259
  /* @__PURE__ */ e.jsx("div", { className: "text-sm font-normal text-gray-500", children: r.key }),
268
260
  /* @__PURE__ */ e.jsx("div", { className: "font-medium leading-5", children: r.value }),
269
- /* @__PURE__ */ e.jsx(Se, { data: x(o, r.value, "") }),
261
+ /* @__PURE__ */ e.jsx(Te, { data: x(l, r.value, "") }),
270
262
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-end gap-x-2", children: [
271
- /* @__PURE__ */ e.jsx(pt, { editMode: !0, onAddBinding: s, appliedBindings: n, item: r, children: /* @__PURE__ */ e.jsx(pr, { className: "mt-1 h-6 w-6 cursor-pointer rounded border border-blue-400 p-1 text-blue-400 duration-200 hover:scale-105 hover:bg-blue-400 hover:text-white" }) }),
263
+ /* @__PURE__ */ e.jsx(pt, { editMode: !0, onAddBinding: s, appliedBindings: n, item: r, children: /* @__PURE__ */ e.jsx(Ir, { className: "mt-1 h-6 w-6 cursor-pointer rounded border border-blue-400 p-1 text-blue-400 duration-200 hover:scale-105 hover:bg-blue-400 hover:text-white" }) }),
272
264
  /* @__PURE__ */ e.jsx(
273
- ur,
265
+ $r,
274
266
  {
275
267
  onClick: () => t(),
276
268
  className: "mt-1 h-6 w-6 cursor-pointer rounded border border-red-400 p-1 text-red-400 duration-200 hover:scale-105 hover:bg-red-400 hover:text-white"
277
269
  }
278
270
  )
279
271
  ] }),
280
- !f(l) && !f(r.key) && /* @__PURE__ */ e.jsx("div", { className: "absolute right-0 top-1 mt-px flex h-4 items-center rounded-full px-2 text-[10px] font-medium text-purple-600", children: L(l) })
272
+ !b(o) && !b(r.key) && /* @__PURE__ */ e.jsx("div", { className: "absolute right-0 top-1 mt-px flex h-4 items-center rounded-full px-2 text-[10px] font-medium text-purple-600", children: E(o) })
281
273
  ] });
282
274
  }, es = ({ bindingData: r, onChange: s }) => {
283
- const t = K(), [d] = at(), o = Nr(), [n, l] = w(
275
+ const t = K(), [d] = ct(), l = Er(), [n, o] = w(
284
276
  k(r, (a, g) => ({ key: g, value: a }))
285
277
  );
286
- E(() => {
287
- l(k(r, (a, g) => ({ key: g, value: a })));
278
+ L(() => {
279
+ o(k(r, (a, g) => ({ key: g, value: a })));
288
280
  }, [t == null ? void 0 : t._id, r]);
289
281
  const p = _(() => {
290
- if (f(d))
282
+ if (b(d))
291
283
  return !0;
292
- if (f(n))
284
+ if (b(n))
293
285
  return !1;
294
- const a = ft(n);
295
- return f(a == null ? void 0 : a.key) || f(a == null ? void 0 : a.value);
286
+ const a = wt(n);
287
+ return b(a == null ? void 0 : a.key) || b(a == null ? void 0 : a.value);
296
288
  }, [d, n]), i = (a) => {
297
289
  const g = ve(n, (y) => y.key !== a.key);
298
- l([...g, a]), h([...g, a]);
290
+ o([...g, a]), h([...g, a]);
299
291
  }, c = (a) => {
300
292
  const g = ve(n, (y, u) => a !== u);
301
293
  h([...g]);
302
294
  }, h = V(
303
295
  (a = []) => {
304
- if (l(a), f(a)) {
296
+ if (o(a), b(a)) {
305
297
  s({});
306
298
  return;
307
299
  }
308
300
  const g = {};
309
301
  Re(a, (y) => {
310
- !f(y == null ? void 0 : y.key) && !f(y == null ? void 0 : y.value) && Ge(g, y.key, y.value);
302
+ !b(y == null ? void 0 : y.key) && !b(y == null ? void 0 : y.value) && Ge(g, y.key, y.value);
311
303
  }), s(g);
312
304
  },
313
305
  [s]
314
306
  );
315
- return f(o) ? /* @__PURE__ */ e.jsx("div", { className: "flex w-full items-center justify-center", children: /* @__PURE__ */ e.jsxs("p", { className: "mb-1.5 text-xs text-gray-500", children: [
307
+ return b(l) ? /* @__PURE__ */ e.jsx("div", { className: "flex w-full items-center justify-center", children: /* @__PURE__ */ e.jsxs("p", { className: "mb-1.5 text-xs text-gray-500", children: [
316
308
  "You have no data providers registered. Please add a data provider to your project. ",
317
309
  /* @__PURE__ */ e.jsx("br", {}),
318
310
  /* @__PURE__ */ e.jsx("a", { className: "text-blue-500", href: "https://chaibuilder.com/docs/registering-data-providers", target: "_blank", children: "Learn more" })
@@ -330,7 +322,7 @@ const Se = ({ data: r, fullView: s }) => {
330
322
  a.key
331
323
  )),
332
324
  /* @__PURE__ */ e.jsxs(O, { delayDuration: 200, children: [
333
- /* @__PURE__ */ e.jsx(F, { disabled: f(d), className: "w-full", children: /* @__PURE__ */ e.jsx(
325
+ /* @__PURE__ */ e.jsx(F, { disabled: b(d), className: "w-full", children: /* @__PURE__ */ e.jsx(
334
326
  pt,
335
327
  {
336
328
  disabled: p,
@@ -340,90 +332,90 @@ const Se = ({ data: r, fullView: s }) => {
340
332
  "span",
341
333
  {
342
334
  className: `w-full rounded-md px-5 py-1.5 text-xs font-medium duration-200 ${p ? "cursor-not-allowed bg-gray-200 text-gray-400" : "bg-blue-700/20 text-blue-800 hover:bg-blue-700/30"}`,
343
- children: f(d) ? /* @__PURE__ */ e.jsx("small", { className: "text-[9.5px] text-gray-500", children: "No data provider has been set up for this page" }) : "+ Add Data Binding"
335
+ children: b(d) ? /* @__PURE__ */ e.jsx("small", { className: "text-[9.5px] text-gray-500", children: "No data provider has been set up for this page" }) : "+ Add Data Binding"
344
336
  }
345
337
  )
346
338
  }
347
339
  ) }),
348
- p && /* @__PURE__ */ e.jsx(z, { sideOffset: -55, className: "text-[11px]", children: f(d) ? "No data provider has been set up for this page." : "Complete last added data binding to add more" })
340
+ p && /* @__PURE__ */ e.jsx(Y, { sideOffset: -55, className: "text-[11px]", children: b(d) ? "No data provider has been set up for this page." : "Complete last added data binding to add more" })
349
341
  ] })
350
342
  ] });
351
- }, ts = es, rs = () => /* @__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" }), me = mt(({ id: r, properties: s, formData: t, onChange: d }) => {
352
- const [o, n] = w(t), l = { type: "object", properties: {} }, p = {};
343
+ }, ts = () => /* @__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" }), me = mt(({ id: r, properties: s, formData: t, onChange: d }) => {
344
+ const [l, n] = w(t), o = { type: "object", properties: {} }, p = {};
353
345
  return Object.keys(s).forEach((i) => {
354
346
  const c = s[i];
355
347
  if (M(["slot", "styles"], c.type))
356
348
  return;
357
349
  const h = i;
358
- l.properties[h] = Vr(c), p[h] = Hr(c);
359
- }), E(() => {
350
+ o.properties[h] = xr(c), p[h] = gr(c);
351
+ }), L(() => {
360
352
  n(t);
361
353
  }, [r]), /* @__PURE__ */ e.jsx(
362
- Dr,
354
+ zr,
363
355
  {
364
356
  widgets: {
365
- binding: rs,
366
- richtext: Pr,
367
- icon: Ir,
368
- image: $r
357
+ binding: ts,
358
+ richtext: hr,
359
+ icon: yr,
360
+ image: mr
369
361
  },
370
- fields: { link: Ar },
362
+ fields: { link: br },
371
363
  idSeparator: ".",
372
364
  autoComplete: "off",
373
365
  omitExtraData: !1,
374
366
  liveOmit: !1,
375
367
  liveValidate: !1,
376
- validator: Br,
368
+ validator: Xr,
377
369
  uiSchema: p,
378
- schema: l,
379
- formData: o,
370
+ schema: o,
371
+ formData: l,
380
372
  onChange: ({ formData: i }, c) => {
381
373
  c && (n(i), d({ formData: i }, c));
382
374
  }
383
375
  }
384
376
  );
385
377
  });
386
- function ss() {
387
- const r = K(), s = ot(), t = lt(), d = Be(r._type), o = { ...r }, [n, l] = w(o), p = ir("dataBindingSupport", !1), i = ({ formData: u }, b, j) => {
388
- if (b && (n == null ? void 0 : n._id) === r._id) {
389
- const B = b.replace("root.", "");
378
+ function rs() {
379
+ const r = K(), s = rt(), t = st(), d = Pe(r._type), l = { ...r }, [n, o] = w(l), p = fr("dataBindingSupport", !1), i = ({ formData: u }, f, j) => {
380
+ if (f && (n == null ? void 0 : n._id) === r._id) {
381
+ const B = f.replace("root.", "");
390
382
  t([r._id], { [B]: x(u, B) }, j);
391
383
  }
392
384
  }, c = V(
393
- Ct(({ formData: u }, b, j) => {
394
- i({ formData: u }, b, j), l(u);
385
+ Ct(({ formData: u }, f, j) => {
386
+ i({ formData: u }, f, j), o(u);
395
387
  }, 1500),
396
388
  [r == null ? void 0 : r._id]
397
- ), h = ({ formData: u }, b) => {
398
- if (b) {
399
- const j = b.replace("root.", "");
400
- s([r._id], { [j]: x(u, j) }), c({ formData: u }, b, { [j]: x(n, j) });
389
+ ), h = ({ formData: u }, f) => {
390
+ if (f) {
391
+ const j = f.replace("root.", "");
392
+ s([r._id], { [j]: x(u, j) }), c({ formData: u }, f, { [j]: x(n, j) });
401
393
  }
402
394
  }, a = {
403
- _name: cr({
395
+ _name: Br({
404
396
  title: "Name",
405
397
  default: x(r, "_name", r._type)
406
398
  })
407
- }, g = je(x(o, "_bindings", {})), y = _(() => {
399
+ }, g = je(x(l, "_bindings", {})), y = _(() => {
408
400
  const u = kt(x(d, "props", {}));
409
- return p && Nt(g, (b) => delete u[b]), u;
401
+ return p && Nt(g, (f) => delete u[f]), u;
410
402
  }, [d, g, p]);
411
403
  return /* @__PURE__ */ e.jsxs("div", { className: "overflow-x-hidden", children: [
412
- /* @__PURE__ */ e.jsx(me, { id: r == null ? void 0 : r._id, onChange: h, formData: o, properties: a }),
404
+ /* @__PURE__ */ e.jsx(me, { id: r == null ? void 0 : r._id, onChange: h, formData: l, properties: a }),
413
405
  /* @__PURE__ */ e.jsx("hr", { className: "mt-4" }),
414
- p ? /* @__PURE__ */ e.jsxs(nt, { type: "multiple", defaultValue: ["STATIC", "BINDING"], className: "h-full w-full", children: [
415
- /* @__PURE__ */ e.jsxs(ke, { value: "BINDING", children: [
416
- /* @__PURE__ */ e.jsx(Ne, { className: "bg-gray-100 px-3 py-2 text-xs hover:no-underline", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
406
+ p ? /* @__PURE__ */ e.jsxs(lt, { type: "multiple", defaultValue: ["STATIC", "BINDING"], className: "h-full w-full", children: [
407
+ /* @__PURE__ */ e.jsxs(Ce, { value: "BINDING", children: [
408
+ /* @__PURE__ */ e.jsx(ke, { className: "bg-gray-100 px-3 py-2 text-xs hover:no-underline", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
417
409
  /* @__PURE__ */ e.jsx(
418
410
  "div",
419
411
  {
420
- className: `h-[8px] w-[8px] rounded-full ${f(x(r, "_bindings", {})) ? "bg-gray-300" : "bg-blue-500"}`
412
+ className: `h-[8px] w-[8px] rounded-full ${b(x(r, "_bindings", {})) ? "bg-gray-300" : "bg-blue-500"}`
421
413
  }
422
414
  ),
423
415
  "Data Binding"
424
416
  ] }) }),
425
- /* @__PURE__ */ e.jsx(_e, { className: "px-4 pt-4", children: /* @__PURE__ */ e.jsx(
426
- ts,
417
+ /* @__PURE__ */ e.jsx(Ne, { className: "px-4 pt-4", children: /* @__PURE__ */ e.jsx(
418
+ es,
427
419
  {
428
420
  bindingData: x(r, "_bindings", {}),
429
421
  onChange: (u) => {
@@ -432,13 +424,13 @@ function ss() {
432
424
  }
433
425
  ) })
434
426
  ] }),
435
- /* @__PURE__ */ e.jsxs(ke, { value: "STATIC", children: [
436
- /* @__PURE__ */ e.jsx(Ne, { className: "bg-gray-100 px-3 py-2 text-xs hover:no-underline", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
427
+ /* @__PURE__ */ e.jsxs(Ce, { value: "STATIC", children: [
428
+ /* @__PURE__ */ e.jsx(ke, { className: "bg-gray-100 px-3 py-2 text-xs hover:no-underline", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
437
429
  /* @__PURE__ */ e.jsx("div", { className: "h-[8px] w-[8px] rounded-full bg-blue-500" }),
438
430
  "Static Content"
439
431
  ] }) }),
440
- /* @__PURE__ */ e.jsxs(_e, { className: "pt-4", children: [
441
- f(g) ? null : /* @__PURE__ */ e.jsxs("div", { className: "mx-4 mb-1 mt-0 rounded-sm border border-orange-500 bg-orange-100 p-1 text-xs text-orange-500", children: [
432
+ /* @__PURE__ */ e.jsxs(Ne, { className: "pt-4", children: [
433
+ b(g) ? null : /* @__PURE__ */ e.jsxs("div", { className: "mx-4 mb-1 mt-0 rounded-sm border border-orange-500 bg-orange-100 p-1 text-xs text-orange-500", children: [
442
434
  "Data binding is set for ",
443
435
  /* @__PURE__ */ e.jsx("b", { children: k(g, we).join(", ") }),
444
436
  " ",
@@ -450,7 +442,7 @@ function ss() {
450
442
  {
451
443
  id: r == null ? void 0 : r._id,
452
444
  onChange: h,
453
- formData: o,
445
+ formData: l,
454
446
  properties: y
455
447
  }
456
448
  )
@@ -461,24 +453,24 @@ function ss() {
461
453
  {
462
454
  id: r == null ? void 0 : r._id,
463
455
  onChange: h,
464
- formData: o,
456
+ formData: l,
465
457
  properties: y
466
458
  }
467
459
  ),
468
460
  /* @__PURE__ */ e.jsx("div", { className: "pb-60" })
469
461
  ] });
470
462
  }
471
- const Xe = new Lr(Er, {
463
+ const Xe = new Wr(Ur, {
472
464
  isCaseSensitive: !1,
473
465
  threshold: 0.2,
474
466
  minMatchCharLength: 2,
475
467
  keys: ["name"]
476
468
  });
477
- function os() {
469
+ function ss() {
478
470
  var B;
479
- const [r] = ue(), s = K(), t = Pe(), d = it(), [o] = st(), [n, l] = w(""), p = (B = ae(r)) == null ? void 0 : B.prop, i = _t((x(s, p, "").replace(Fr, "").split(",").pop() || "").split(" "), f), c = () => {
471
+ const [r] = ue(), s = K(), t = De(), d = ot(), [l] = at(), [n, o] = w(""), p = (B = ae(r)) == null ? void 0 : B.prop, i = _t((x(s, p, "").replace(Gr, "").split(",").pop() || "").split(" "), b), c = () => {
480
472
  const C = n.trim().toLowerCase().replace(/ +(?= )/g, "").split(" ");
481
- t(o, C, !0), l("");
473
+ t(l, C, !0), o("");
482
474
  }, [h, a] = w([]), g = ({ value: C }) => {
483
475
  const I = C.trim().toLowerCase(), X = I.match(/.+:/g);
484
476
  let N = [];
@@ -493,7 +485,7 @@ function os() {
493
485
  a(k(N, "item"));
494
486
  }, y = () => {
495
487
  a([]);
496
- }, u = (C) => C.name, b = (C) => /* @__PURE__ */ e.jsx("div", { className: "rounded-md p-1", children: C.name }), j = {
488
+ }, u = (C) => C.name, f = (C) => /* @__PURE__ */ e.jsx("div", { className: "rounded-md p-1", children: C.name }), j = {
497
489
  autoComplete: "off",
498
490
  autoCorrect: "off",
499
491
  autoCapitalize: "off",
@@ -503,7 +495,7 @@ function os() {
503
495
  onKeyDown: (C) => {
504
496
  C.key === "Enter" && n.trim() !== "" && c();
505
497
  },
506
- onChange: (C, { newValue: I }) => l(I),
498
+ onChange: (C, { newValue: I }) => o(I),
507
499
  className: "w-full rounded-md text-xs px-2 hover:outline-0 bg-background border-border py-1"
508
500
  };
509
501
  return /* @__PURE__ */ e.jsxs(
@@ -511,16 +503,16 @@ function os() {
511
503
  {
512
504
  className: `no-scrollbar flex ${h.length > 0 ? "min-h-[300px]" : "min-h-max"} w-full flex-col gap-y-5 overflow-y-auto bg-gray-100 px-px`,
513
505
  children: [
514
- /* @__PURE__ */ e.jsx(ct, { className: "mt-2", children: "Add Tailwind classes" }),
506
+ /* @__PURE__ */ e.jsx(nt, { className: "mt-2", children: "Add Tailwind classes" }),
515
507
  /* @__PURE__ */ e.jsxs("div", { className: "relative -mt-4 flex items-center gap-x-3", children: [
516
508
  /* @__PURE__ */ e.jsx("div", { className: "relative flex w-full items-center gap-x-3", children: /* @__PURE__ */ e.jsx(
517
- Mr,
509
+ Zr,
518
510
  {
519
511
  suggestions: h,
520
512
  onSuggestionsFetchRequested: g,
521
513
  onSuggestionsClearRequested: y,
522
514
  getSuggestionValue: u,
523
- renderSuggestion: b,
515
+ renderSuggestion: f,
524
516
  inputProps: j,
525
517
  containerProps: {
526
518
  className: "relative h-8 w-full gap-y-1 py-1 border-gray-600"
@@ -545,7 +537,7 @@ function os() {
545
537
  )
546
538
  ] }),
547
539
  /* @__PURE__ */ e.jsxs("div", { className: "flex w-full flex-wrap gap-2", children: [
548
- f(i) && /* @__PURE__ */ e.jsx("div", { className: "flex h-10 w-full items-center justify-center text-center text-sm text-gray-400", children: "No class added" }),
540
+ b(i) && /* @__PURE__ */ e.jsx("div", { className: "flex h-10 w-full items-center justify-center text-center text-sm text-gray-400", children: "No class added" }),
549
541
  de.Children.toArray(
550
542
  i.map((C) => /* @__PURE__ */ e.jsxs(
551
543
  "div",
@@ -556,7 +548,7 @@ function os() {
556
548
  /* @__PURE__ */ e.jsx(
557
549
  Qe,
558
550
  {
559
- onClick: () => d(o, [C]),
551
+ onClick: () => d(l, [C]),
560
552
  className: "invisible absolute right-1 hover:text-white group-hover:visible group-hover:cursor-pointer"
561
553
  }
562
554
  )
@@ -579,7 +571,7 @@ const D = ["px", "%", "em", "rem", "ch", "vh", "vw"], ls = {
579
571
  { type: "dropdown", label: "flex.grow", property: "flexGrow" },
580
572
  { type: "dropdown", label: "flex.shrink", property: "flexShrink" }
581
573
  ]
582
- }, as = {
574
+ }, os = {
583
575
  heading: "grid.heading",
584
576
  items: [
585
577
  { type: "range", label: "grid.col_span", property: "gridColSpan" },
@@ -590,7 +582,7 @@ const D = ["px", "%", "em", "rem", "ch", "vh", "vw"], ls = {
590
582
  { type: "range", label: "grid.row_end", property: "gridRowEnd" },
591
583
  { type: "range", label: "grid.order", property: "order" }
592
584
  ]
593
- }, ns = [
585
+ }, as = [
594
586
  {
595
587
  heading: "layout.heading",
596
588
  items: [
@@ -992,7 +984,7 @@ const D = ["px", "%", "em", "rem", "ch", "vh", "vw"], ls = {
992
984
  },
993
985
  {
994
986
  heading: "classes.heading",
995
- items: [{ component: os }]
987
+ items: [{ component: ss }]
996
988
  }
997
989
  ], ut = {
998
990
  "not-italic": () => /* @__PURE__ */ e.jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ e.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9 3H11V5H9V11H11V13H5V11H7V5H5V3H9Z", fill: "white" }) }),
@@ -1002,32 +994,32 @@ const D = ["px", "%", "em", "rem", "ch", "vh", "vw"], ls = {
1002
994
  // display
1003
995
  hidden: Ae,
1004
996
  gap: A,
1005
- gapX: T,
997
+ gapX: S,
1006
998
  gapY: R,
1007
- spaceX: T,
999
+ spaceX: S,
1008
1000
  spaceY: R,
1009
1001
  overscroll: A,
1010
- overscrollX: T,
1002
+ overscrollX: S,
1011
1003
  overscrollY: R,
1012
1004
  overflow: A,
1013
- overflowX: T,
1005
+ overflowX: S,
1014
1006
  overflowY: R,
1015
1007
  top: ee,
1016
1008
  right: te,
1017
1009
  bottom: re,
1018
1010
  left: se,
1019
1011
  inset: A,
1020
- insetX: T,
1012
+ insetX: S,
1021
1013
  insetY: R,
1022
1014
  border: A,
1023
- borderX: T,
1015
+ borderX: S,
1024
1016
  borderY: R,
1025
1017
  borderTop: ee,
1026
1018
  borderRight: te,
1027
1019
  borderBottom: re,
1028
1020
  borderLeft: se,
1029
1021
  borderRadius: A,
1030
- borderRadiusX: T,
1022
+ borderRadiusX: S,
1031
1023
  borderRadiusY: R,
1032
1024
  borderRadiusTop: ee,
1033
1025
  borderRadiusRight: te,
@@ -1037,18 +1029,18 @@ const D = ["px", "%", "em", "rem", "ch", "vh", "vw"], ls = {
1037
1029
  borderRadiusTopRight: Pt,
1038
1030
  borderRadiusBottomRight: It,
1039
1031
  borderRadiusBottomLeft: $t,
1040
- divideXWidth: T,
1032
+ divideXWidth: S,
1041
1033
  divideYWidth: R,
1042
1034
  scale: A,
1043
- scaleX: T,
1035
+ scaleX: S,
1044
1036
  scaleY: R,
1045
- skewX: T,
1037
+ skewX: S,
1046
1038
  skewY: R,
1047
- translateX: T,
1039
+ translateX: S,
1048
1040
  translateY: R,
1049
1041
  // padding
1050
1042
  padding: A,
1051
- paddingX: T,
1043
+ paddingX: S,
1052
1044
  paddingY: R,
1053
1045
  paddingTop: ee,
1054
1046
  paddingRight: te,
@@ -1056,7 +1048,7 @@ const D = ["px", "%", "em", "rem", "ch", "vh", "vw"], ls = {
1056
1048
  paddingLeft: se,
1057
1049
  // margin
1058
1050
  margin: A,
1059
- marginX: T,
1051
+ marginX: S,
1060
1052
  marginY: R,
1061
1053
  marginTop: ee,
1062
1054
  marginRight: te,
@@ -1065,16 +1057,16 @@ const D = ["px", "%", "em", "rem", "ch", "vh", "vw"], ls = {
1065
1057
  // text-align
1066
1058
  textLeft: At,
1067
1059
  textCenter: Mt,
1068
- textRight: Lt,
1069
- textJustify: Et,
1060
+ textRight: Et,
1061
+ textJustify: Lt,
1070
1062
  // font style
1071
1063
  italic: Ot,
1072
1064
  // "not-italic": "",
1073
1065
  // decoration
1074
1066
  underline: Ft,
1075
- overline: zt,
1067
+ overline: Yt,
1076
1068
  // transform
1077
- uppercase: Yt,
1069
+ uppercase: zt,
1078
1070
  block: () => /* @__PURE__ */ e.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
1079
1071
  /* @__PURE__ */ e.jsx(
1080
1072
  "path",
@@ -1188,38 +1180,38 @@ const D = ["px", "%", "em", "rem", "ch", "vh", "vw"], ls = {
1188
1180
  )
1189
1181
  ] }),
1190
1182
  static: Xt
1191
- }, ne = Ke({ canReset: !1, canChange: !0 }), is = ({ children: r, canReset: s = !1, canChange: t = !0 }) => (
1183
+ }, ne = Ke({ canReset: !1, canChange: !0 }), ns = ({ children: r, canReset: s = !1, canChange: t = !0 }) => (
1192
1184
  // eslint-disable-next-line react/jsx-no-constructed-context-values
1193
1185
  /* @__PURE__ */ e.jsx(ne.Provider, { value: { canReset: s, canChange: t }, children: r })
1194
1186
  ), xt = ({ label: r, property: s, onChange: t }) => {
1195
- const d = _(() => x(ge, `${s}.classes`, [""]), [s]), o = ie(s), n = _(() => x(o, "cls", ""), [o]), { canChange: l } = le(ne), p = /\[.*\]/g.test(n);
1187
+ const d = _(() => x(ge, `${s}.classes`, [""]), [s]), l = ie(s), n = _(() => x(l, "cls", ""), [l]), { canChange: o } = oe(ne), p = /\[.*\]/g.test(n);
1196
1188
  return /* @__PURE__ */ e.jsx("div", { className: r ? "w-full rounded" : "grow", children: p ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
1197
- /* @__PURE__ */ e.jsx(Ce, { className: "w-[70%] rounded py-1", readOnly: !0, value: n }),
1189
+ /* @__PURE__ */ e.jsx(_e, { className: "w-[70%] rounded py-1", readOnly: !0, value: n }),
1198
1190
  /* @__PURE__ */ e.jsxs(O, { delayDuration: 100, children: [
1199
1191
  /* @__PURE__ */ e.jsx(F, { 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(He, {}) }) }),
1200
- /* @__PURE__ */ e.jsx(z, { children: "Current value is using a Tailwind arbitrary value." })
1192
+ /* @__PURE__ */ e.jsx(Y, { children: "Current value is using a Tailwind arbitrary value." })
1201
1193
  ] })
1202
1194
  ] }) : /* @__PURE__ */ e.jsx(
1203
- Te,
1195
+ Se,
1204
1196
  {
1205
1197
  rounded: r,
1206
1198
  onChange: (i) => t(i, s),
1207
1199
  selected: n,
1208
1200
  options: d,
1209
- disabled: !l
1201
+ disabled: !o
1210
1202
  }
1211
1203
  ) });
1212
1204
  };
1213
- function Te({ selected: r, onChange: s, rounded: t = !1, options: d, disabled: o = !1 }) {
1214
- const n = r.replace(/.*:/g, "").trim(), { undo: l, redo: p } = ar();
1205
+ function Se({ selected: r, onChange: s, rounded: t = !1, options: d, disabled: l = !1 }) {
1206
+ const n = r.replace(/.*:/g, "").trim(), { undo: o, redo: p } = vr();
1215
1207
  return /* @__PURE__ */ e.jsxs(
1216
1208
  "select",
1217
1209
  {
1218
- disabled: !d.length || o,
1210
+ disabled: !d.length || l,
1219
1211
  className: `${t ? "rounded-md border border-border" : "border-0"} disable:bg-gray-500 h-full w-full truncate rounded bg-background px-2 py-1 text-xs outline-none disabled:cursor-not-allowed`,
1220
1212
  onChange: (i) => s(i.target.value),
1221
1213
  onKeyDown: (i) => {
1222
- i.ctrlKey && (i.key === "z" && l(), i.key === "y" && p());
1214
+ i.ctrlKey && (i.key === "z" && o(), i.key === "y" && p());
1223
1215
  },
1224
1216
  value: n,
1225
1217
  children: [
@@ -1231,8 +1223,8 @@ function Te({ selected: r, onChange: s, rounded: t = !1, options: d, disabled: o
1231
1223
  }
1232
1224
  );
1233
1225
  }
1234
- const ds = ({ property: r, onChange: s }) => {
1235
- const { canReset: t, canChange: d } = le(ne), o = ie(r), n = _(() => x(o, "cls", ""), [o]), l = _(() => x(ge, `${r}.classes`, [""]), [r]), p = l.indexOf(n) > -1 ? l.indexOf(n) : 0, i = /\[.*\]/g.test(n);
1226
+ const is = ({ property: r, onChange: s }) => {
1227
+ const { canReset: t, canChange: d } = oe(ne), l = ie(r), n = _(() => x(l, "cls", ""), [l]), o = _(() => x(ge, `${r}.classes`, [""]), [r]), p = o.indexOf(n) > -1 ? o.indexOf(n) : 0, i = /\[.*\]/g.test(n);
1236
1228
  return /* @__PURE__ */ e.jsx("div", { className: "flex flex-row divide-x divide-solid divide-border rounded border border-border text-xs", children: i ? /* @__PURE__ */ e.jsx("div", { className: "py-[5px] px-2", children: n }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1237
1229
  /* @__PURE__ */ e.jsx(
1238
1230
  "button",
@@ -1240,7 +1232,7 @@ const ds = ({ property: r, onChange: s }) => {
1240
1232
  type: "button",
1241
1233
  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",
1242
1234
  disabled: !d && (!t || p - 1 < 0),
1243
- onClick: () => s($e(l, p - 1), r),
1235
+ onClick: () => s($e(o, p - 1), r),
1244
1236
  children: /* @__PURE__ */ e.jsx("span", { className: "flex items-center justify-center", children: /* @__PURE__ */ e.jsx(
1245
1237
  Zt,
1246
1238
  {
@@ -1255,33 +1247,33 @@ const ds = ({ property: r, onChange: s }) => {
1255
1247
  {
1256
1248
  type: "button",
1257
1249
  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",
1258
- disabled: !d && (!t || p + 1 >= l.length),
1259
- onClick: () => s($e(l, p + 1), r),
1250
+ disabled: !d && (!t || p + 1 >= o.length),
1251
+ onClick: () => s($e(o, p + 1), r),
1260
1252
  children: /* @__PURE__ */ e.jsx("span", { className: "flex items-center justify-center", children: /* @__PURE__ */ e.jsx(
1261
1253
  Ve,
1262
1254
  {
1263
- className: !d && (!t || p + 1 >= l.length) ? "text-gray-500" : "text-black/60 dark:text-white/60"
1255
+ className: !d && (!t || p + 1 >= o.length) ? "text-gray-500" : "text-black/60 dark:text-white/60"
1264
1256
  }
1265
1257
  ) })
1266
1258
  }
1267
1259
  )
1268
1260
  ] }) });
1269
- }, cs = ({ property: r, onChange: s }) => {
1270
- const t = _(() => x(ge, `${r}.classes`, [""]), [r]), { canChange: d } = le(ne), o = ie(r), n = _(() => x(o, "cls", ""), [o]);
1271
- return /* @__PURE__ */ e.jsx("div", { className: "flex grow flex-wrap gap-1", children: k(t, (l) => /* @__PURE__ */ e.jsxs(O, { children: [
1261
+ }, ds = ({ property: r, onChange: s }) => {
1262
+ const t = _(() => x(ge, `${r}.classes`, [""]), [r]), { canChange: d } = oe(ne), l = ie(r), n = _(() => x(l, "cls", ""), [l]);
1263
+ return /* @__PURE__ */ e.jsx("div", { className: "flex grow flex-wrap gap-1", children: k(t, (o) => /* @__PURE__ */ e.jsxs(O, { children: [
1272
1264
  /* @__PURE__ */ e.jsx(F, { asChild: !0, children: /* @__PURE__ */ e.jsx(
1273
1265
  "button",
1274
1266
  {
1275
1267
  type: "button",
1276
1268
  disabled: !d,
1277
- onClick: () => s(l, r),
1278
- className: `cursor-pointer rounded border border-gray-600 p-1 disabled:cursor-not-allowed ${n === l ? " bg-blue-500 text-white" : "disabled:bg-gray-600 disabled:text-gray-400"}`,
1279
- children: $.createElement(x(ut, l, et))
1269
+ onClick: () => s(o, r),
1270
+ className: `cursor-pointer rounded border border-gray-600 p-1 disabled:cursor-not-allowed ${n === o ? " bg-blue-500 text-white" : "disabled:bg-gray-600 disabled:text-gray-400"}`,
1271
+ children: $.createElement(x(ut, o, et))
1280
1272
  }
1281
1273
  ) }),
1282
- /* @__PURE__ */ e.jsx(z, { children: L(oe(l)) })
1274
+ /* @__PURE__ */ e.jsx(Y, { children: E(le(o)) })
1283
1275
  ] })) });
1284
- }, ps = {
1276
+ }, cs = {
1285
1277
  backgroundColor: "bg",
1286
1278
  textColor: "text",
1287
1279
  borderColor: "border",
@@ -1293,18 +1285,18 @@ const ds = ({ property: r, onChange: s }) => {
1293
1285
  toColor: "to",
1294
1286
  ringColor: "ring",
1295
1287
  ringOffsetColor: "ring-offset"
1296
- }, us = ({ property: r, onChange: s }) => {
1297
- const t = ie(r), d = _(() => x(t, "cls", ""), [t]), { canChange: o } = le(ne), [n, l] = w([]), [p, i] = w({ color: "", shade: "" }), c = d.split("-"), h = x(c, "1", ""), a = x(c, "2", ""), g = V(
1288
+ }, ps = ({ property: r, onChange: s }) => {
1289
+ const t = ie(r), d = _(() => x(t, "cls", ""), [t]), { canChange: l } = oe(ne), [n, o] = w([]), [p, i] = w({ color: "", shade: "" }), c = d.split("-"), h = x(c, "1", ""), a = x(c, "2", ""), g = V(
1298
1290
  // eslint-disable-next-line no-shadow
1299
1291
  (u) => {
1300
- ["current", "inherit", "transparent", "black", "white"].includes(u) ? (l([]), i({ color: u })) : (l(["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"]), i((b) => ({ ...b, color: u, shade: b.shade ? b.shade : "500" })));
1292
+ ["current", "inherit", "transparent", "black", "white"].includes(u) ? (o([]), i({ color: u })) : (o(["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"]), i((f) => ({ ...f, color: u, shade: f.shade ? f.shade : "500" })));
1301
1293
  },
1302
- [l, i]
1294
+ [o, i]
1303
1295
  );
1304
- E(() => {
1296
+ L(() => {
1305
1297
  if (["current", "inherit", "transparent", "black", "white"].includes(h))
1306
- return l([]);
1307
- l(["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"]);
1298
+ return o([]);
1299
+ o(["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"]);
1308
1300
  }, [h]);
1309
1301
  const y = V(
1310
1302
  // eslint-disable-next-line no-shadow
@@ -1313,16 +1305,16 @@ const ds = ({ property: r, onChange: s }) => {
1313
1305
  },
1314
1306
  [h]
1315
1307
  );
1316
- return E(() => {
1308
+ return L(() => {
1317
1309
  i({ color: "", shade: "" });
1318
- }, [t]), E(() => {
1319
- const b = `${x(ps, r, "")}-${p.color}${p.shade ? `-${p.shade}` : ""}`;
1320
- b.match(new RegExp(x(ge, `${r}.regExp`, ""))) && s(b, r);
1310
+ }, [t]), L(() => {
1311
+ const f = `${x(cs, r, "")}-${p.color}${p.shade ? `-${p.shade}` : ""}`;
1312
+ f.match(new RegExp(x(ge, `${r}.regExp`, ""))) && s(f, r);
1321
1313
  }, [p, s, r]), /* @__PURE__ */ e.jsxs("div", { className: "flex flex-row divide-x divide-solid divide-border rounded-lg border border-border text-xs", children: [
1322
1314
  /* @__PURE__ */ e.jsx("div", { className: "grow text-center", children: /* @__PURE__ */ e.jsx(
1323
- Te,
1315
+ Se,
1324
1316
  {
1325
- disabled: !o,
1317
+ disabled: !l,
1326
1318
  rounded: !0,
1327
1319
  selected: h,
1328
1320
  onChange: g,
@@ -1358,7 +1350,7 @@ const ds = ({ property: r, onChange: s }) => {
1358
1350
  ]
1359
1351
  }
1360
1352
  ) }),
1361
- /* @__PURE__ */ e.jsx("button", { type: "button", className: "grow text-center", children: /* @__PURE__ */ e.jsx(Te, { rounded: !0, selected: a, disabled: !h || !o, onChange: y, options: n }) })
1353
+ /* @__PURE__ */ e.jsx("button", { type: "button", className: "grow text-center", children: /* @__PURE__ */ e.jsx(Se, { rounded: !0, selected: a, disabled: !h || !l, onChange: y, options: n }) })
1362
1354
  ] });
1363
1355
  }, Ze = (r, s) => {
1364
1356
  r = r.toLowerCase();
@@ -1367,9 +1359,10 @@ const ds = ({ property: r, onChange: s }) => {
1367
1359
  return { value: "", unit: t };
1368
1360
  const d = s.length ? new RegExp(s.join("|"), "g") : /XXXXXX/g;
1369
1361
  t = t.replace(d, "");
1370
- const o = r.match(d), n = o && o.length > 1, l = !f(t) && Number.isNaN(Number(t));
1371
- return n || l ? { error: "Invalid value" } : o && (o[0] === "auto" || o[0] === "none") ? { value: o[0], unit: "" } : { value: t, unit: o ? o[0] : "" };
1372
- }, xs = (r) => {
1362
+ const l = r.match(d), n = l && l.length > 1, o = !b(t) && Number.isNaN(Number(t));
1363
+ return n || o ? { error: "Invalid value" } : l && (l[0] === "auto" || l[0] === "none") ? { value: l[0], unit: "" } : { value: t, unit: l ? l[0] : "" };
1364
+ };
1365
+ const us = (r) => {
1373
1366
  const s = r.startsWith("-") ? "-" : "", t = r.split("-").pop();
1374
1367
  if (["auto", "none"].includes(t))
1375
1368
  return { value: "", unit: t };
@@ -1493,31 +1486,32 @@ const ds = ({ property: r, onChange: s }) => {
1493
1486
  if (["max", "min", "fit"].includes(t))
1494
1487
  return { value: r, unit: "class" };
1495
1488
  if (t.includes("/")) {
1496
- const [d, o] = k(t.split("/"), (n) => parseInt(n, 10));
1497
- return { value: s + (d / o * 100).toFixed(2).replace(".00", ""), unit: "%" };
1489
+ const [d, l] = k(t.split("/"), (n) => parseInt(n, 10));
1490
+ return { value: s + (d / l * 100).toFixed(2).replace(".00", ""), unit: "%" };
1498
1491
  }
1499
- return St(parseFloat(t)) ? { value: `${s + parseFloat(t) * 4}`, unit: "px" } : { value: t, unit: "class" };
1500
- }, gs = (r) => {
1501
- if (f(r))
1492
+ return Tt(parseFloat(t)) ? { value: `${s + parseFloat(t) * 4}`, unit: "px" } : { value: t, unit: "class" };
1493
+ };
1494
+ const xs = (r) => {
1495
+ if (b(r))
1502
1496
  return { value: "", unit: "" };
1503
1497
  const s = r.match(/\[.*\]/g);
1504
1498
  if (s === null)
1505
- return hs(r);
1506
- const t = x(s, "0", "").replace(/\[|\]/g, ""), d = r.startsWith("-") ? "-" : "", o = ae(t.match(/\d+.\d+|\d+/g));
1507
- return { value: `${d}${o}`, unit: t.replace(o, "") };
1508
- }, hs = (r) => f(r) ? { value: "", unit: "" } : xs(r), gt = $.createContext({
1499
+ return gs(r);
1500
+ const t = x(s, "0", "").replace(/\[|\]/g, ""), d = r.startsWith("-") ? "-" : "", l = ae(t.match(/\d+.\d+|\d+/g));
1501
+ return { value: `${d}${l}`, unit: t.replace(l, "") };
1502
+ }, gs = (r) => b(r) ? { value: "", unit: "" } : us(r), gt = $.createContext({
1509
1503
  setDragData: () => {
1510
1504
  }
1511
- }), ys = ({
1505
+ }), hs = ({
1512
1506
  unit: r,
1513
1507
  currentValue: s,
1514
1508
  onDrag: t,
1515
1509
  onDragEnd: d,
1516
- onDragStart: o,
1510
+ onDragStart: l,
1517
1511
  negative: n,
1518
- cssProperty: l
1512
+ cssProperty: o
1519
1513
  }) => {
1520
- const { setDragData: p } = le(gt);
1514
+ const { setDragData: p } = oe(gt);
1521
1515
  return /* @__PURE__ */ e.jsx(
1522
1516
  "button",
1523
1517
  {
@@ -1531,52 +1525,52 @@ const ds = ({ property: r, onChange: s }) => {
1531
1525
  dragStartValue: `${s}`,
1532
1526
  dragUnit: r,
1533
1527
  negative: n,
1534
- cssProperty: l
1528
+ cssProperty: o
1535
1529
  };
1536
- o(c), p(c);
1530
+ l(c), p(c);
1537
1531
  },
1538
1532
  color: void 0,
1539
1533
  className: "relative z-50 ml-1 hidden h-6 cursor-row-resize rounded bg-background/70 px-2 group-hover:inline",
1540
- children: /* @__PURE__ */ e.jsx(Ut, {})
1534
+ children: /* @__PURE__ */ e.jsx(Wt, {})
1541
1535
  }
1542
1536
  );
1543
- }, ms = ({ onSelect: r, current: s, units: t }) => /* @__PURE__ */ e.jsx("div", { "data-theme": "light", className: "-m-[7px] -mx-[13px] flex w-9 flex-col", children: t.map((d) => /* @__PURE__ */ e.jsx(
1537
+ }, ys = ({ onSelect: r, current: s, units: t }) => /* @__PURE__ */ e.jsx("div", { "data-theme": "light", className: "-m-[7px] -mx-[13px] flex w-9 flex-col", children: t.map((d) => /* @__PURE__ */ e.jsx(
1544
1538
  U,
1545
1539
  {
1546
1540
  className: "h-max rounded-none px-1 py-1 text-right text-[11px] hover:bg-blue-400",
1547
1541
  color: s === d ? "primary" : void 0,
1548
1542
  size: "sm",
1549
- onClick: (o) => {
1550
- o.stopPropagation(), r(d);
1543
+ onClick: (l) => {
1544
+ l.stopPropagation(), r(d);
1551
1545
  },
1552
1546
  children: d
1553
1547
  },
1554
1548
  d
1555
- )) }), We = 50, fs = (r) => {
1556
- const [s, t] = w(!1), [d, o] = w(""), { currentClass: n, onChange: l, classPrefix: p, cssProperty: i, units: c, negative: h } = r, [a, g] = w(i != null && i.toLowerCase().includes("width") ? "%" : c[0]), [y, u] = w(!1), [b, j] = w(""), [B, C] = w(!1), [I, X] = w(!1);
1557
- E(() => {
1558
- const { value: m, unit: v } = gs(n);
1549
+ )) }), We = 50, ms = (r) => {
1550
+ const [s, t] = w(!1), [d, l] = w(""), { currentClass: n, onChange: o, classPrefix: p, cssProperty: i, units: c, negative: h } = r, [a, g] = w(i != null && i.toLowerCase().includes("width") ? "%" : c[0]), [y, u] = w(!1), [f, j] = w(""), [B, C] = w(!1), [I, X] = w(!1);
1551
+ L(() => {
1552
+ const { value: m, unit: v } = xs(n);
1559
1553
  if (v === "") {
1560
- o(m), g(i != null && i.toLowerCase().includes("width") ? "%" : ae(c));
1554
+ l(m), g(i != null && i.toLowerCase().includes("width") ? "%" : ae(c));
1561
1555
  return;
1562
1556
  }
1563
- g(v), o(v === "class" || f(m) ? "" : m);
1557
+ g(v), l(v === "class" || b(m) ? "" : m);
1564
1558
  }, [n, i, c]);
1565
- const N = be((m) => l(m), [l], We), P = be((m) => l(m, !1), [l], We), W = V(
1559
+ const N = fe((m) => o(m), [o], We), P = fe((m) => o(m, !1), [o], We), W = V(
1566
1560
  (m = !1) => {
1567
1561
  const v = Ze(`${d}`, c);
1568
1562
  if (x(v, "error", !1)) {
1569
1563
  u(!0);
1570
1564
  return;
1571
1565
  }
1572
- const S = x(v, "unit") !== "" ? x(v, "unit") : a;
1573
- if (S === "auto" || S === "none") {
1574
- N(`${p}${S}`);
1566
+ const T = x(v, "unit") !== "" ? x(v, "unit") : a;
1567
+ if (T === "auto" || T === "none") {
1568
+ N(`${p}${T}`);
1575
1569
  return;
1576
1570
  }
1577
1571
  if (x(v, "value") === "")
1578
1572
  return;
1579
- const Q = `${x(v, "value", "").startsWith("-") ? "-" : ""}${p}[${x(v, "value", "").replace("-", "")}${S === "-" ? "" : S}]`;
1573
+ const Q = `${x(v, "value", "").startsWith("-") ? "-" : ""}${p}[${x(v, "value", "").replace("-", "")}${T === "-" ? "" : T}]`;
1580
1574
  m ? P(Q) : N(Q);
1581
1575
  },
1582
1576
  [N, P, d, a, p, c]
@@ -1593,7 +1587,7 @@ const ds = ({ property: r, onChange: s }) => {
1593
1587
  }
1594
1588
  if (x(v, "value") === "")
1595
1589
  return;
1596
- const S = x(v, "unit") !== "" ? x(v, "unit") : m, Q = `${x(v, "value", "").startsWith("-") ? "-" : ""}${p}[${x(v, "value", "").replace("-", "")}${S === "-" ? "" : S}]`;
1590
+ const T = x(v, "unit") !== "" ? x(v, "unit") : m, Q = `${x(v, "value", "").startsWith("-") ? "-" : ""}${p}[${x(v, "value", "").replace("-", "")}${T === "-" ? "" : T}]`;
1597
1591
  N(Q);
1598
1592
  },
1599
1593
  [N, d, p, c]
@@ -1602,7 +1596,7 @@ const ds = ({ property: r, onChange: s }) => {
1602
1596
  /* @__PURE__ */ e.jsx("input", { className: "w-20 rounded py-1", readOnly: !0, value: n }),
1603
1597
  /* @__PURE__ */ e.jsxs(O, { children: [
1604
1598
  /* @__PURE__ */ e.jsx(F, { 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(He, {}) }) }),
1605
- /* @__PURE__ */ e.jsx(z, { children: "Current value is using a Tailwind preset class." })
1599
+ /* @__PURE__ */ e.jsx(Y, { children: "Current value is using a Tailwind preset class." })
1606
1600
  ] })
1607
1601
  ] }) : /* @__PURE__ */ e.jsxs("div", { className: `group relative flex items-center ${B ? "z-auto" : ""}`, children: [
1608
1602
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center rounded-md border border-border", children: [
@@ -1617,10 +1611,10 @@ const ds = ({ property: r, onChange: s }) => {
1617
1611
  if (m.keyCode !== 38 && m.keyCode !== 40)
1618
1612
  return;
1619
1613
  m.preventDefault(), X(!0);
1620
- const v = Tt(m.target.value);
1621
- let S = qe(v) ? 0 : v;
1622
- m.keyCode === 38 && (S += 1), m.keyCode === 40 && (S -= 1);
1623
- const Z = `${S}`, yt = `${Z.startsWith("-") ? "-" : ""}${p}[${Z.replace("-", "")}${a === "-" ? "" : a}]`;
1614
+ const v = St(m.target.value);
1615
+ let T = qe(v) ? 0 : v;
1616
+ m.keyCode === 38 && (T += 1), m.keyCode === 40 && (T -= 1);
1617
+ const Z = `${T}`, yt = `${Z.startsWith("-") ? "-" : ""}${p}[${Z.replace("-", "")}${a === "-" ? "" : a}]`;
1624
1618
  P(yt);
1625
1619
  },
1626
1620
  onKeyUp: (m) => {
@@ -1628,13 +1622,13 @@ const ds = ({ property: r, onChange: s }) => {
1628
1622
  },
1629
1623
  onBlur: () => W(),
1630
1624
  onChange: (m) => {
1631
- u(!1), o(m.target.value);
1625
+ u(!1), l(m.target.value);
1632
1626
  },
1633
1627
  onClick: (m) => {
1634
1628
  var v;
1635
1629
  (v = m == null ? void 0 : m.target) == null || v.select(), t(!1);
1636
1630
  },
1637
- value: B ? b : d,
1631
+ value: B ? f : d,
1638
1632
  className: "h-6 w-14 rounded rounded-r-none bg-background pl-2 text-sm focus-visible:outline-0 ".concat(
1639
1633
  " ",
1640
1634
  y ? "border-red-500 text-red-500" : "border-foreground/20"
@@ -1650,12 +1644,12 @@ const ds = ({ property: r, onChange: s }) => {
1650
1644
  className: "flex h-6 cursor-pointer items-center gap-x-1 rounded rounded-l-none bg-background p-px px-1 text-[11px] uppercase",
1651
1645
  children: [
1652
1646
  /* @__PURE__ */ e.jsx("span", { className: `inline-block ${c.length === 1 ? "px-2 font-semibold" : ""}`, children: a }),
1653
- c.length > 1 ? /* @__PURE__ */ e.jsx(Wt, {}) : null
1647
+ c.length > 1 ? /* @__PURE__ */ e.jsx(Ut, {}) : null
1654
1648
  ]
1655
1649
  }
1656
1650
  ) }),
1657
- /* @__PURE__ */ e.jsx(dr, { children: /* @__PURE__ */ e.jsx(z, { className: "bg-background", children: /* @__PURE__ */ e.jsx(
1658
- ms,
1651
+ /* @__PURE__ */ e.jsx(jr, { children: /* @__PURE__ */ e.jsx(Y, { className: "bg-background", children: /* @__PURE__ */ e.jsx(
1652
+ ys,
1659
1653
  {
1660
1654
  units: c,
1661
1655
  current: a,
@@ -1667,17 +1661,17 @@ const ds = ({ property: r, onChange: s }) => {
1667
1661
  ] })
1668
1662
  ] }),
1669
1663
  ["none", "auto"].indexOf(a) !== -1 || B ? null : /* @__PURE__ */ e.jsx(
1670
- ys,
1664
+ hs,
1671
1665
  {
1672
1666
  onDragStart: () => C(!0),
1673
1667
  onDragEnd: (m) => {
1674
- if (j(() => ""), C(!1), f(m))
1668
+ if (j(() => ""), C(!1), b(m))
1675
1669
  return;
1676
1670
  const v = `${m}`, Z = `${v.startsWith("-") ? "-" : ""}${p}[${v.replace("-", "")}${a === "-" ? "" : a}]`;
1677
1671
  N(Z);
1678
1672
  },
1679
1673
  onDrag: (m) => {
1680
- if (f(m))
1674
+ if (b(m))
1681
1675
  return;
1682
1676
  j(m);
1683
1677
  const v = `${m}`, Z = `${v.startsWith("-") ? "-" : ""}${p}[${v.replace("-", "")}${a === "-" ? "" : a}]`;
@@ -1703,7 +1697,7 @@ const ds = ({ property: r, onChange: s }) => {
1703
1697
  "2xl": 5
1704
1698
  };
1705
1699
  return t[x(r, "mq", "xs")] <= t[s];
1706
- }, vs = {
1700
+ }, fs = {
1707
1701
  width: "w-",
1708
1702
  height: "h-",
1709
1703
  minWidth: "min-w-",
@@ -1776,20 +1770,20 @@ const ds = ({ property: r, onChange: s }) => {
1776
1770
  lg: "1024px",
1777
1771
  xl: "1280px",
1778
1772
  "2xl": "1536px"
1779
- }, js = (r) => `${r.toUpperCase()} ${Ue[r] ? `(${Ue[r]} & up)` : ""}`, Ie = (r) => {
1780
- const { t: s } = Y(), { type: t = "icons", label: d, property: o, onEmitChange: n = () => {
1781
- }, units: l, negative: p = !1 } = r, [i] = zr(), [c] = dt(), [, h] = Me(), a = ie(o), g = Pe(), y = it(), [u] = st(), b = _(() => x(a, "fullCls", ""), [a]), j = V(
1773
+ }, vs = (r) => `${r.toUpperCase()} ${Ue[r] ? `(${Ue[r]} & up)` : ""}`, Ie = (r) => {
1774
+ const { t: s } = z(), { type: t = "icons", label: d, property: l, onEmitChange: n = () => {
1775
+ }, units: o, negative: p = !1 } = r, [i] = wr(), [c] = it(), [, h] = Me(), a = ie(l), g = De(), y = ot(), [u] = at(), f = _(() => x(a, "fullCls", ""), [a]), j = V(
1782
1776
  (P, W = !0) => {
1783
- const J = { dark: i, mq: h, mod: c, cls: P, property: o, fullCls: "" };
1777
+ const J = { dark: i, mq: h, mod: c, cls: P, property: l, fullCls: "" };
1784
1778
  (i || c !== "") && (J.mq = "xs");
1785
- const m = Or(J);
1779
+ const m = Kr(J);
1786
1780
  g(u, [m], W);
1787
1781
  },
1788
- [u, i, h, c, o, g]
1782
+ [u, i, h, c, l, g]
1789
1783
  ), B = V(() => {
1790
- y(u, [b]);
1791
- }, [u, b, y]), C = _(() => bs(a, h), [a, h]);
1792
- E(() => {
1784
+ y(u, [f]);
1785
+ }, [u, f, y]), C = _(() => bs(a, h), [a, h]);
1786
+ L(() => {
1793
1787
  n(C, a);
1794
1788
  }, [C, n, a]);
1795
1789
  const [, , I] = Me(), X = V(
@@ -1805,27 +1799,27 @@ const ds = ({ property: r, onChange: s }) => {
1805
1799
  },
1806
1800
  [I]
1807
1801
  ), N = x(a, "dark", null) === i && x(a, "mod", null) === c && x(a, "mq", null) === h;
1808
- return /* @__PURE__ */ e.jsx(is, { canChange: C, canReset: a && N, children: /* @__PURE__ */ e.jsxs("div", { className: "group flex flex-row items-center py-2 first:pt-0 last:pb-0", children: [
1802
+ return /* @__PURE__ */ e.jsx(ns, { canChange: C, canReset: a && N, children: /* @__PURE__ */ e.jsxs("div", { className: "group flex flex-row items-center py-2 first:pt-0 last:pb-0", children: [
1809
1803
  /* @__PURE__ */ e.jsx("div", { className: "relative w-[70px] truncate text-xs text-foreground", children: /* @__PURE__ */ e.jsx("span", { className: `text-[11px] ${a && !N ? "text-foreground" : ""}`, children: s(d) }) }),
1810
1804
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-row items-center", children: [
1811
1805
  /* @__PURE__ */ e.jsxs("div", { className: "w-[150px]", children: [
1812
1806
  t === "arbitrary" ? /* @__PURE__ */ e.jsx(
1813
- fs,
1807
+ ms,
1814
1808
  {
1815
1809
  currentClass: x(a, "cls", ""),
1816
- classPrefix: x(vs, o, ""),
1817
- units: l || [],
1810
+ classPrefix: x(fs, l, ""),
1811
+ units: o || [],
1818
1812
  onChange: j,
1819
1813
  negative: p,
1820
- cssProperty: o
1814
+ cssProperty: l
1821
1815
  }
1822
1816
  ) : null,
1823
- t === "icons" && /* @__PURE__ */ e.jsx(cs, { property: o, onChange: j }),
1824
- t === "range" && /* @__PURE__ */ e.jsx(ds, { property: o, onChange: j }),
1825
- t === "color" && /* @__PURE__ */ e.jsx(us, { property: o, onChange: j }),
1826
- t === "dropdown" && /* @__PURE__ */ e.jsx(xt, { label: d, property: o, onChange: j })
1817
+ t === "icons" && /* @__PURE__ */ e.jsx(ds, { property: l, onChange: j }),
1818
+ t === "range" && /* @__PURE__ */ e.jsx(is, { property: l, onChange: j }),
1819
+ t === "color" && /* @__PURE__ */ e.jsx(ps, { property: l, onChange: j }),
1820
+ t === "dropdown" && /* @__PURE__ */ e.jsx(xt, { label: d, property: l, onChange: j })
1827
1821
  ] }),
1828
- /* @__PURE__ */ e.jsx("div", { className: `w-[30px] cursor-pointer ${b ? "visible" : "invisible"}`, children: N ? /* @__PURE__ */ e.jsx("button", { type: "button", onClick: () => B(), title: "Reset", className: "flex px-1.5 text-xs", children: /* @__PURE__ */ e.jsx(Kt, { className: "h-5 w-5 text-blue-500 hover:opacity-80" }) }) : C && a ? /* @__PURE__ */ e.jsxs(O, { delayDuration: 100, children: [
1822
+ /* @__PURE__ */ e.jsx("div", { className: `w-[30px] cursor-pointer ${f ? "visible" : "invisible"}`, children: N ? /* @__PURE__ */ e.jsx("button", { type: "button", onClick: () => B(), title: "Reset", className: "flex px-1.5 text-xs", children: /* @__PURE__ */ e.jsx(Kt, { className: "h-5 w-5 text-blue-500 hover:opacity-80" }) }) : C && a ? /* @__PURE__ */ e.jsxs(O, { delayDuration: 100, children: [
1829
1823
  /* @__PURE__ */ e.jsx(F, { asChild: !0, children: /* @__PURE__ */ e.jsx(
1830
1824
  "button",
1831
1825
  {
@@ -1834,10 +1828,10 @@ const ds = ({ property: r, onChange: s }) => {
1834
1828
  children: /* @__PURE__ */ e.jsx(He, {})
1835
1829
  }
1836
1830
  ) }),
1837
- /* @__PURE__ */ e.jsx(z, { children: /* @__PURE__ */ e.jsx("div", { className: "text-right", children: /* @__PURE__ */ e.jsxs("div", { children: [
1831
+ /* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsx("div", { className: "text-right", children: /* @__PURE__ */ e.jsxs("div", { children: [
1838
1832
  "Current style is set at  ",
1839
1833
  /* @__PURE__ */ e.jsxs("span", { className: "font-bold", children: [
1840
- js(x(a, "mq")),
1834
+ vs(x(a, "mq")),
1841
1835
  i && !a.dark ? "(Light mode)" : ""
1842
1836
  ] }),
1843
1837
  /* @__PURE__ */ e.jsx("br", {}),
@@ -1857,16 +1851,16 @@ const ds = ({ property: r, onChange: s }) => {
1857
1851
  ] }) : null })
1858
1852
  ] })
1859
1853
  ] }) });
1860
- }, ws = ["px", "%", "em", "rem", "ch", "vh", "vw"], ht = ({
1854
+ }, js = ["px", "%", "em", "rem", "ch", "vh", "vw"], ht = ({
1861
1855
  label: r,
1862
1856
  options: s,
1863
1857
  borderB: t = !1,
1864
1858
  borderT: d = !1,
1865
- type: o = "arbitrary",
1866
- units: n = ws,
1867
- negative: l = !1
1859
+ type: l = "arbitrary",
1860
+ units: n = js,
1861
+ negative: o = !1
1868
1862
  }) => {
1869
- const { t: p } = Y(), [i, c] = w(s[0].key), h = xe(), a = V((g) => k(h, "property").includes(g), [h]);
1863
+ const { t: p } = z(), [i, c] = w(s[0].key), h = xe(), a = V((g) => k(h, "property").includes(g), [h]);
1870
1864
  return /* @__PURE__ */ e.jsxs(
1871
1865
  "div",
1872
1866
  {
@@ -1890,127 +1884,127 @@ const ds = ({ property: r, onChange: s }) => {
1890
1884
  ]
1891
1885
  }
1892
1886
  ) }),
1893
- /* @__PURE__ */ e.jsx(z, { children: L(oe(g)) })
1887
+ /* @__PURE__ */ e.jsx(Y, { children: E(le(g)) })
1894
1888
  ] }) }))
1895
1889
  ) })
1896
1890
  ] }),
1897
1891
  /* @__PURE__ */ e.jsx("div", { className: "mt-0 flex items-center", children: /* @__PURE__ */ e.jsx(
1898
1892
  Ie,
1899
1893
  {
1900
- type: o,
1894
+ type: l,
1901
1895
  units: [...n],
1902
1896
  label: "",
1903
1897
  property: i,
1904
- negative: l
1898
+ negative: o
1905
1899
  }
1906
1900
  ) })
1907
1901
  ]
1908
1902
  }
1909
1903
  );
1910
- }, Cs = ({ heading: r, items: s }) => {
1911
- const { t } = Y(), d = xe(), o = _(() => {
1904
+ }, ws = ({ heading: r, items: s }) => {
1905
+ const { t } = z(), d = xe(), l = _(() => {
1912
1906
  const n = (i) => q(
1913
1907
  i.map((c) => c.styleType === "multiple" ? k(c.options, "key") : c.property)
1914
- ), l = q(
1908
+ ), o = q(
1915
1909
  s.map((i) => i.styleType === "accordion" ? n(i.items) : i.styleType === "multiple" ? k(i.options, "key") : i.property)
1916
1910
  ), p = k(d, "property");
1917
- return Je(l, p).length > 0;
1911
+ return Je(o, p).length > 0;
1918
1912
  }, [d, s]);
1919
1913
  return /* @__PURE__ */ e.jsxs("details", { children: [
1920
1914
  /* @__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: [
1921
1915
  t(r),
1922
- o ? /* @__PURE__ */ e.jsx(
1916
+ l ? /* @__PURE__ */ e.jsx(
1923
1917
  "span",
1924
1918
  {
1925
- className: `ml-1 mr-2 inline-block h-[8px] w-[8px] rounded-full ${o ? "bg-blue-500" : "bg-gray-300"}`
1919
+ className: `ml-1 mr-2 inline-block h-[8px] w-[8px] rounded-full ${l ? "bg-blue-500" : "bg-gray-300"}`
1926
1920
  }
1927
1921
  ) : null
1928
1922
  ] }) }),
1929
1923
  /* @__PURE__ */ e.jsx("div", { className: "p-2", children: s.map((n) => n.styleType === "multiple" ? /* @__PURE__ */ e.jsx(ht, { ...n }, n.label) : /* @__PURE__ */ e.jsx(Ie, { ...n }, n.label)) })
1930
1924
  ] });
1931
- }, ks = Ke({}), fe = ({ section: r }) => {
1932
- const { t: s } = Y(), t = xe(), d = V(
1933
- (l = []) => {
1925
+ }, Cs = Ke({}), be = ({ section: r }) => {
1926
+ const { t: s } = z(), t = xe(), d = V(
1927
+ (o = []) => {
1934
1928
  const p = {};
1935
1929
  for (let c = 0; c < t.length; c++)
1936
1930
  p[t[c].property] = t[c].cls;
1937
1931
  let i = !0;
1938
- for (const c in l)
1939
- if (!ce(p, c) || p[c] !== l[c]) {
1932
+ for (const c in o)
1933
+ if (!ce(p, c) || p[c] !== o[c]) {
1940
1934
  i = !1;
1941
1935
  break;
1942
1936
  }
1943
1937
  return i;
1944
1938
  },
1945
1939
  [t]
1946
- ), o = _(() => {
1940
+ ), l = _(() => {
1947
1941
  if (t.length > 0 && r.heading === "classes.heading")
1948
1942
  return !0;
1949
- const l = (c) => q(
1943
+ const o = (c) => q(
1950
1944
  c.map((h) => h.styleType === "multiple" ? q(k(h.options, "key")) : h.property)
1951
1945
  ), p = q(
1952
- r.items.map((c) => c.styleType === "accordion" ? l(c.items) : c.styleType === "multiple" ? q(k(c.options, "key")) : c.property)
1946
+ r.items.map((c) => c.styleType === "accordion" ? o(c.items) : c.styleType === "multiple" ? q(k(c.options, "key")) : c.property)
1953
1947
  ), i = k(t, "property");
1954
1948
  return Je(p, i).length > 0;
1955
1949
  }, [t, r.heading, r.items]), n = _(() => ({}), []);
1956
- return /* @__PURE__ */ e.jsx(ks.Provider, { value: n, children: /* @__PURE__ */ e.jsxs(ke, { value: r.heading, children: [
1957
- /* @__PURE__ */ e.jsx(Ne, { className: "px-3 py-2 text-xs hover:no-underline", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
1958
- /* @__PURE__ */ e.jsx("div", { className: `h-[8px] w-[8px] rounded-full ${o ? "bg-blue-500" : "bg-gray-300"}` }),
1950
+ return /* @__PURE__ */ e.jsx(Cs.Provider, { value: n, children: /* @__PURE__ */ e.jsxs(Ce, { value: r.heading, children: [
1951
+ /* @__PURE__ */ e.jsx(ke, { 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"}` }),
1959
1953
  s(r.heading)
1960
1954
  ] }) }),
1961
- /* @__PURE__ */ e.jsx(_e, { className: "bg-gray-100 px-3.5 py-2", children: $.Children.toArray(
1962
- r.items.map((l) => ce(l, "component") ? $.createElement(l.component, { key: l.label }) : ce(l, "styleType") ? l.styleType === "multiple" ? /* @__PURE__ */ e.jsx(ht, { ...l }, l.label) : l.styleType === "accordion" && d(l == null ? void 0 : l.conditions) ? /* @__PURE__ */ e.jsx(Cs, { ...l }, l.label) : null : /* @__PURE__ */ e.jsx(Ie, { ...l }, l.label))
1955
+ /* @__PURE__ */ e.jsx(Ne, { className: "bg-gray-100 px-3.5 py-2", children: $.Children.toArray(
1956
+ r.items.map((o) => ce(o, "component") ? $.createElement(o.component, { key: o.label }) : ce(o, "styleType") ? o.styleType === "multiple" ? /* @__PURE__ */ e.jsx(ht, { ...o }, o.label) : o.styleType === "accordion" && d(o == null ? void 0 : o.conditions) ? /* @__PURE__ */ e.jsx(ws, { ...o }, o.label) : null : /* @__PURE__ */ e.jsx(Ie, { ...o }, o.label))
1963
1957
  ) })
1964
1958
  ] }) });
1965
- }, Ns = () => {
1966
- const r = K(), [s] = ue(), { t } = Y(), d = _r(), o = Pe(), n = Be(r._type), l = x(ae(s), "prop"), p = x(n.props, `${l}.presets`, {});
1967
- if (f(d) && (!ce(n, "props") || f(p)))
1959
+ }, ks = () => {
1960
+ const r = K(), [s] = ue(), { t } = z(), d = Lr(), l = De(), n = Pe(r._type), o = x(ae(s), "prop"), p = x(n.props, `${o}.presets`, {});
1961
+ if (b(d) && (!ce(n, "props") || b(p)))
1968
1962
  return null;
1969
1963
  const i = (c) => {
1970
1964
  const h = c.trim().toLowerCase().replace(/ +(?= )/g, "").split(" ");
1971
- o([r._id], h, !0);
1965
+ l([r._id], h, !0);
1972
1966
  };
1973
- return /* @__PURE__ */ e.jsx("div", { className: "h-10", children: /* @__PURE__ */ e.jsxs(Ur, { children: [
1974
- /* @__PURE__ */ e.jsx(Kr, { asChild: !0, children: /* @__PURE__ */ e.jsx("div", { className: "px-4", children: /* @__PURE__ */ e.jsxs(U, { variant: "default", className: "w-full", size: "sm", children: [
1967
+ return /* @__PURE__ */ e.jsx("div", { className: "h-10", children: /* @__PURE__ */ e.jsxs(Cr, { children: [
1968
+ /* @__PURE__ */ e.jsx(kr, { asChild: !0, children: /* @__PURE__ */ e.jsx("div", { className: "px-4", children: /* @__PURE__ */ e.jsxs(U, { variant: "default", className: "w-full", size: "sm", children: [
1975
1969
  t("Apply Presets"),
1976
1970
  /* @__PURE__ */ e.jsx(Gt, {})
1977
1971
  ] }) }) }),
1978
- /* @__PURE__ */ e.jsx(Gr, { className: "max-h-80 w-56", children: /* @__PURE__ */ e.jsxs(De, { className: "no-scrollbar h-full", children: [
1979
- f(p) ? null : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1980
- /* @__PURE__ */ e.jsxs(Le, { children: [
1972
+ /* @__PURE__ */ e.jsx(Nr, { className: "max-h-80 w-56", children: /* @__PURE__ */ e.jsxs(Be, { className: "no-scrollbar h-full", children: [
1973
+ b(p) ? null : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1974
+ /* @__PURE__ */ e.jsxs(Ee, { children: [
1981
1975
  n.type,
1982
1976
  " ",
1983
1977
  t("presets")
1984
1978
  ] }),
1985
- /* @__PURE__ */ e.jsx(Ee, {}),
1979
+ /* @__PURE__ */ e.jsx(Le, {}),
1986
1980
  /* @__PURE__ */ e.jsx(Oe, { children: je(p).map((c) => /* @__PURE__ */ e.jsxs(Fe, { className: "group text-xs", onClick: () => i(p[c]), children: [
1987
- we(L(t(c))),
1988
- /* @__PURE__ */ e.jsx(ze, { className: "invisible hover:font-bold hover:text-blue-600 group-hover:visible", children: t("apply") })
1981
+ we(E(t(c))),
1982
+ /* @__PURE__ */ e.jsx(Ye, { className: "invisible hover:font-bold hover:text-blue-600 group-hover:visible", children: t("apply") })
1989
1983
  ] })) })
1990
1984
  ] }),
1991
- f(d) ? null : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1992
- /* @__PURE__ */ e.jsx(Le, { children: t("Global presets") }),
1993
- /* @__PURE__ */ e.jsx(Ee, {}),
1985
+ b(d) ? null : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1986
+ /* @__PURE__ */ e.jsx(Ee, { children: t("Global presets") }),
1987
+ /* @__PURE__ */ e.jsx(Le, {}),
1994
1988
  /* @__PURE__ */ e.jsx(Oe, { children: je(d).map((c) => /* @__PURE__ */ e.jsxs(Fe, { className: "group text-xs", onClick: () => i(d[c]), children: [
1995
- we(L(t(c))),
1996
- /* @__PURE__ */ e.jsx(ze, { className: "invisible hover:font-bold hover:text-blue-600 group-hover:visible", children: t("apply") })
1989
+ we(E(t(c))),
1990
+ /* @__PURE__ */ e.jsx(Ye, { className: "invisible hover:font-bold hover:text-blue-600 group-hover:visible", children: t("apply") })
1997
1991
  ] })) })
1998
1992
  ] })
1999
1993
  ] }) })
2000
1994
  ] }) });
2001
1995
  };
2002
- function _s() {
2003
- const [r, s] = dt(), { flexChild: t, gridChild: d } = nr(), { t: o } = Y(), [n] = ue();
2004
- return f(n) ? /* @__PURE__ */ e.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 rounded-xl p-4", children: [
1996
+ function Ns() {
1997
+ const [r, s] = it(), { flexChild: t, gridChild: d } = _r(), { t: l } = z(), [n] = ue();
1998
+ return b(n) ? /* @__PURE__ */ e.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 rounded-xl p-4", children: [
2005
1999
  /* @__PURE__ */ e.jsx(tt, { className: "mx-auto text-3xl" }),
2006
- /* @__PURE__ */ e.jsx("h1", { children: o("no_styling_block_selected") })
2000
+ /* @__PURE__ */ e.jsx("h1", { children: l("no_styling_block_selected") })
2007
2001
  ] }) }) : /* @__PURE__ */ e.jsxs("div", { className: "flex h-full flex-col", children: [
2008
- /* @__PURE__ */ e.jsx(Ns, {}),
2002
+ /* @__PURE__ */ e.jsx(ks, {}),
2009
2003
  /* @__PURE__ */ e.jsx("div", { className: "flex h-12 flex-col space-x-4 px-4 py-1", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-end gap-x-1.5", children: [
2010
- /* @__PURE__ */ e.jsx(ct, { htmlFor: "", className: "flex gap-x-1.5 text-xs italic", children: "State" }),
2011
- /* @__PURE__ */ e.jsxs(Yr, { defaultValue: r, onValueChange: (l) => s(l), children: [
2012
- /* @__PURE__ */ e.jsx(Xr, { className: "h-auto w-fit p-1 px-3", children: /* @__PURE__ */ e.jsx(Zr, { placeholder: "State" }) }),
2013
- /* @__PURE__ */ e.jsxs(Wr, { children: [
2004
+ /* @__PURE__ */ e.jsx(nt, { htmlFor: "", className: "flex gap-x-1.5 text-xs italic", children: "State" }),
2005
+ /* @__PURE__ */ e.jsxs(Tr, { defaultValue: r, onValueChange: (o) => s(o), children: [
2006
+ /* @__PURE__ */ e.jsx(Sr, { className: "h-auto w-fit p-1 px-3", children: /* @__PURE__ */ e.jsx(Rr, { placeholder: "State" }) }),
2007
+ /* @__PURE__ */ e.jsxs(Vr, { children: [
2014
2008
  /* @__PURE__ */ e.jsx(H, { value: "", children: "Normal" }),
2015
2009
  /* @__PURE__ */ e.jsx(H, { value: "hover", children: "Hover" }),
2016
2010
  /* @__PURE__ */ e.jsx(H, { value: "active", children: "Active" }),
@@ -2027,23 +2021,23 @@ function _s() {
2027
2021
  ] })
2028
2022
  ] }) }),
2029
2023
  r !== "" ? /* @__PURE__ */ e.jsxs("div", { className: "m-1 flex items-center space-x-1 rounded border border-orange-500 bg-orange-200 p-px px-2 text-xs text-orange-900", children: [
2030
- /* @__PURE__ */ e.jsx(gr, { className: "w-3" }),
2031
- /* @__PURE__ */ e.jsx("span", { children: o(`Styles will be applied for (:${r}) state`) })
2024
+ /* @__PURE__ */ e.jsx(Ar, { className: "w-3" }),
2025
+ /* @__PURE__ */ e.jsx("span", { children: l(`Styles will be applied for (:${r}) state`) })
2032
2026
  ] }) : null,
2033
- /* @__PURE__ */ e.jsx(De, { className: "no-scrollbar -mx-1 max-h-full flex-1 overflow-x-hidden overflow-y-hidden border-t border-border", children: /* @__PURE__ */ e.jsxs(nt, { defaultValue: ["Layout"], type: "multiple", className: "w-full", children: [
2034
- t && /* @__PURE__ */ e.jsx(fe, { section: ls }),
2035
- d ? /* @__PURE__ */ e.jsx(fe, { section: as }) : null,
2036
- ns.map((l) => /* @__PURE__ */ e.jsx(fe, { section: l }, l.heading))
2027
+ /* @__PURE__ */ e.jsx(Be, { className: "no-scrollbar -mx-1 max-h-full flex-1 overflow-x-hidden overflow-y-hidden border-t border-border", children: /* @__PURE__ */ e.jsxs(lt, { defaultValue: ["Layout"], type: "multiple", className: "w-full", children: [
2028
+ t && /* @__PURE__ */ e.jsx(be, { section: ls }),
2029
+ d ? /* @__PURE__ */ e.jsx(be, { section: os }) : null,
2030
+ as.map((o) => /* @__PURE__ */ e.jsx(be, { section: o }, o.heading))
2037
2031
  ] }) })
2038
2032
  ] });
2039
2033
  }
2040
- const Ss = ({ onAdd: r }) => {
2041
- const { t: s } = Y(), [t, d] = w({ key: "", value: "" }), o = () => {
2042
- f(t.key) || (r({ ...t, key: Vt(t.key) }), d({ key: "", value: "" }));
2034
+ const _s = ({ onAdd: r }) => {
2035
+ const { t: s } = z(), [t, d] = w({ key: "", value: "" }), l = () => {
2036
+ b(t.key) || (r({ ...t, key: Vt(t.key) }), d({ key: "", value: "" }));
2043
2037
  };
2044
2038
  return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1 border-gray-200 px-1", children: [
2045
2039
  /* @__PURE__ */ e.jsx(
2046
- Ce,
2040
+ _e,
2047
2041
  {
2048
2042
  name: "key",
2049
2043
  onChange: (n) => d({ ...t, key: n.target.value }),
@@ -2052,12 +2046,12 @@ const Ss = ({ onAdd: r }) => {
2052
2046
  autoComplete: "off",
2053
2047
  autoCapitalize: "off",
2054
2048
  onKeyDown: (n) => {
2055
- n.key === "Enter" && (n.preventDefault(), f(t.key) || o());
2049
+ n.key === "Enter" && (n.preventDefault(), b(t.key) || l());
2056
2050
  }
2057
2051
  }
2058
2052
  ),
2059
2053
  /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-x-1.5", children: /* @__PURE__ */ e.jsx(
2060
- Ce,
2054
+ _e,
2061
2055
  {
2062
2056
  name: "value",
2063
2057
  onChange: (n) => d({ ...t, value: n.target.value }),
@@ -2066,26 +2060,26 @@ const Ss = ({ onAdd: r }) => {
2066
2060
  autoComplete: "off",
2067
2061
  autoCapitalize: "off",
2068
2062
  onKeyDown: (n) => {
2069
- n.key === "Enter" && (n.preventDefault(), f(t.key) || o());
2063
+ n.key === "Enter" && (n.preventDefault(), b(t.key) || l());
2070
2064
  }
2071
2065
  }
2072
2066
  ) }),
2073
2067
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
2074
- /* @__PURE__ */ e.jsxs(U, { disabled: f(t.key), onClick: o, size: "sm", className: "flex items-center", children: [
2068
+ /* @__PURE__ */ e.jsxs(U, { disabled: b(t.key), onClick: l, size: "sm", className: "flex items-center", children: [
2075
2069
  /* @__PURE__ */ e.jsxs("span", { children: [
2076
2070
  s("Add"),
2077
2071
  " "
2078
2072
  ] }),
2079
2073
  /* @__PURE__ */ e.jsx(Ve, {})
2080
2074
  ] }),
2081
- f(t.key) ? null : /* @__PURE__ */ e.jsx(U, { variant: "ghost", onClick: () => d({ key: "", value: "" }), children: s("Cancel") })
2075
+ b(t.key) ? null : /* @__PURE__ */ e.jsx(U, { variant: "ghost", onClick: () => d({ key: "", value: "" }), children: s("Cancel") })
2082
2076
  ] })
2083
2077
  ] });
2084
2078
  }, Ts = () => {
2085
- const r = K(), [s, t] = w([]), [d] = ue(), o = ot(), n = lt(), { t: l } = Y(), p = `${x(d, "0.prop")}_attrs`;
2079
+ const r = K(), [s, t] = w([]), [d] = ue(), l = rt(), n = st(), { t: o } = z(), p = `${x(d, "0.prop")}_attrs`;
2086
2080
  de.useEffect(() => {
2087
2081
  const a = k(x(r, p), (g, y) => ({ key: y, value: g }));
2088
- f(a) ? t([]) : t(a);
2082
+ b(a) ? t([]) : t(a);
2089
2083
  }, [x(r, p)]);
2090
2084
  const i = (a) => {
2091
2085
  const g = ve(s, (y, u) => a !== u);
@@ -2097,14 +2091,14 @@ const Ss = ({ onAdd: r }) => {
2097
2091
  (a = []) => {
2098
2092
  const g = {};
2099
2093
  Re(a, (y) => {
2100
- f(y.key) || Ge(g, y.key, y.value);
2094
+ b(y.key) || Ge(g, y.key, y.value);
2101
2095
  }), n([x(r, "_id")], { [p]: g });
2102
2096
  },
2103
- [r, o, p]
2097
+ [r, l, p]
2104
2098
  );
2105
2099
  return /* @__PURE__ */ e.jsx("div", { className: "px-2", children: /* @__PURE__ */ e.jsx("div", { className: "no-scrollbar flex min-h-max flex-col gap-y-2 overflow-y-auto", children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col", children: [
2106
2100
  /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsxs("ul", { className: "overflow-hidden rounded-md bg-gray-100 p-2 text-xs text-gray-700", children: [
2107
- f(s) ? /* @__PURE__ */ e.jsx("li", { className: "flex h-16 items-center justify-center", children: /* @__PURE__ */ e.jsx("p", { children: l("No custom attributes added yet") }) }) : /* @__PURE__ */ e.jsx("li", { children: /* @__PURE__ */ e.jsx("span", { className: "font-bold", children: l("Custom attributes") }) }),
2101
+ b(s) ? /* @__PURE__ */ e.jsx("li", { className: "flex h-16 items-center justify-center", children: /* @__PURE__ */ e.jsx("p", { children: o("No custom attributes added yet") }) }) : /* @__PURE__ */ e.jsx("li", { children: /* @__PURE__ */ e.jsx("span", { className: "font-bold", children: o("Custom attributes") }) }),
2108
2102
  de.Children.toArray(
2109
2103
  k(s, (a) => /* @__PURE__ */ e.jsxs("li", { className: "group flex max-w-full items-center justify-between", children: [
2110
2104
  /* @__PURE__ */ e.jsxs(O, { delayDuration: 1e3, children: [
@@ -2115,14 +2109,14 @@ const Ss = ({ onAdd: r }) => {
2115
2109
  " ",
2116
2110
  a.value
2117
2111
  ] }) }),
2118
- /* @__PURE__ */ e.jsxs(z, { className: "max-w-[200px]", children: [
2112
+ /* @__PURE__ */ e.jsxs(Y, { className: "max-w-[200px]", children: [
2119
2113
  /* @__PURE__ */ e.jsxs("div", { children: [
2120
- l("Name"),
2114
+ o("Name"),
2121
2115
  ": ",
2122
2116
  a.key
2123
2117
  ] }),
2124
2118
  /* @__PURE__ */ e.jsxs("div", { children: [
2125
- l("Value"),
2119
+ o("Value"),
2126
2120
  ": ",
2127
2121
  a.value
2128
2122
  ] })
@@ -2134,18 +2128,18 @@ const Ss = ({ onAdd: r }) => {
2134
2128
  {
2135
2129
  className: "invisible group-hover:visible",
2136
2130
  onClick: () => i(s.indexOf(a)),
2137
- children: /* @__PURE__ */ e.jsx(hr, { className: "w-4 text-gray-500" })
2131
+ children: /* @__PURE__ */ e.jsx(Mr, { className: "w-4 text-gray-500" })
2138
2132
  }
2139
2133
  ) }),
2140
- /* @__PURE__ */ e.jsx(z, { className: "max-w-[200px]", children: l("Remove attribute") })
2134
+ /* @__PURE__ */ e.jsx(Y, { className: "max-w-[200px]", children: o("Remove attribute") })
2141
2135
  ] })
2142
2136
  ] }))
2143
2137
  )
2144
2138
  ] }) }),
2145
2139
  /* @__PURE__ */ e.jsx("div", { className: "py-2" }),
2146
- /* @__PURE__ */ e.jsx(Ss, { onAdd: (a) => c(a) })
2140
+ /* @__PURE__ */ e.jsx(_s, { onAdd: (a) => c(a) })
2147
2141
  ] }) }) });
2148
- }, Rs = {
2142
+ }, Ss = {
2149
2143
  px: 1,
2150
2144
  "%": 1,
2151
2145
  em: 100,
@@ -2156,8 +2150,8 @@ const Ss = ({ onAdd: r }) => {
2156
2150
  "-": 1,
2157
2151
  deg: 1,
2158
2152
  ms: 0.1
2159
- }, $o = () => {
2160
- const r = K(), { t: s } = Y(), [t, d] = $.useState(""), [o, n] = $.useState({
2153
+ }, _l = () => {
2154
+ const r = K(), { t: s } = z(), [t, d] = $.useState(""), [l, n] = $.useState({
2161
2155
  onDrag: (i) => i,
2162
2156
  onDragEnd: (i) => i,
2163
2157
  dragStartY: 0,
@@ -2166,20 +2160,20 @@ const Ss = ({ onAdd: r }) => {
2166
2160
  dragUnit: "",
2167
2161
  negative: !1,
2168
2162
  cssProperty: ""
2169
- }), l = be(
2163
+ }), o = fe(
2170
2164
  (i) => {
2171
- const c = !x(o, "negative", !1), h = x(o, "cssProperty", "");
2172
- let a = parseFloat(o.dragStartValue);
2165
+ const c = !x(l, "negative", !1), h = x(l, "cssProperty", "");
2166
+ let a = parseFloat(l.dragStartValue);
2173
2167
  a = qe(a) ? 0 : a;
2174
- let g = Rs[o.dragUnit];
2168
+ let g = Ss[l.dragUnit];
2175
2169
  (G(h, "scale") || h === "opacity") && (g = 10);
2176
- let u = (o.dragStartY - i.pageY) / g + a;
2177
- c && u < 0 && (u = 0), h === "opacity" && u > 1 && (u = 1), o.onDrag(`${u}`), d(`${u}`);
2170
+ let u = (l.dragStartY - i.pageY) / g + a;
2171
+ c && u < 0 && (u = 0), h === "opacity" && u > 1 && (u = 1), l.onDrag(`${u}`), d(`${u}`);
2178
2172
  },
2179
- [o],
2173
+ [l],
2180
2174
  50
2181
2175
  ), p = V(() => {
2182
- setTimeout(() => o.onDragEnd(`${t}`), 100), n({
2176
+ setTimeout(() => l.onDragEnd(`${t}`), 100), n({
2183
2177
  onDrag: (i) => i,
2184
2178
  onDragEnd: (i) => i,
2185
2179
  dragStartY: 0,
@@ -2189,31 +2183,31 @@ const Ss = ({ onAdd: r }) => {
2189
2183
  negative: !1,
2190
2184
  cssProperty: ""
2191
2185
  });
2192
- }, [o, t, n]);
2186
+ }, [l, t, n]);
2193
2187
  return Ht(r) ? /* @__PURE__ */ e.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 rounded-xl p-4", children: [
2194
2188
  /* @__PURE__ */ e.jsx(tt, { className: "mx-auto text-3xl" }),
2195
2189
  /* @__PURE__ */ e.jsx("h1", { children: s("no_block_selected_for_styling") })
2196
- ] }) }) : /* @__PURE__ */ e.jsx(rt, { children: /* @__PURE__ */ e.jsxs(gt.Provider, { value: { setDragData: n }, children: [
2197
- o.dragging ? /* @__PURE__ */ e.jsx(
2190
+ ] }) }) : /* @__PURE__ */ e.jsx(dt, { children: /* @__PURE__ */ e.jsxs(gt.Provider, { value: { setDragData: n }, children: [
2191
+ l.dragging ? /* @__PURE__ */ e.jsx(
2198
2192
  "div",
2199
2193
  {
2200
- onMouseMove: l,
2194
+ onMouseMove: o,
2201
2195
  onMouseUp: () => p(),
2202
2196
  className: "absolute inset-0 z-30 cursor-row-resize bg-gray-300/10"
2203
2197
  }
2204
2198
  ) : null,
2205
- /* @__PURE__ */ e.jsxs(or, { defaultValue: "settings", className: "flex h-full w-full flex-col py-1 text-xs", children: [
2206
- /* @__PURE__ */ e.jsxs(lr, { className: "mx-1 grid grid-cols-3", children: [
2199
+ /* @__PURE__ */ e.jsxs(Hr, { defaultValue: "settings", className: "flex h-full w-full flex-col py-1 text-xs", children: [
2200
+ /* @__PURE__ */ e.jsxs(Dr, { className: "mx-1 grid grid-cols-3", children: [
2207
2201
  /* @__PURE__ */ e.jsx(he, { value: "settings", children: s("settings") }),
2208
2202
  /* @__PURE__ */ e.jsx(he, { value: "styling", children: s("styling") }),
2209
2203
  /* @__PURE__ */ e.jsx(he, { value: "attrs", children: s("Attributes") })
2210
2204
  ] }),
2211
- /* @__PURE__ */ e.jsx(ye, { value: "settings", className: "no-scrollbar h-full flex-1 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(De, { className: "no-scrollbar max-h-full flex-1 overflow-x-hidden overflow-y-hidden pb-5", children: /* @__PURE__ */ e.jsx(ss, {}) }) }),
2212
- /* @__PURE__ */ e.jsx(ye, { value: "styling", className: "h-full flex-1 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(_s, {}) }),
2205
+ /* @__PURE__ */ e.jsx(ye, { value: "settings", className: "no-scrollbar h-full flex-1 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(Be, { className: "no-scrollbar max-h-full flex-1 overflow-x-hidden overflow-y-hidden pb-5", children: /* @__PURE__ */ e.jsx(rs, {}) }) }),
2206
+ /* @__PURE__ */ e.jsx(ye, { value: "styling", className: "h-full flex-1 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(Ns, {}) }),
2213
2207
  /* @__PURE__ */ e.jsx(ye, { value: "attrs", className: "h-full flex-1 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(Ts, {}) })
2214
2208
  ] })
2215
2209
  ] }) });
2216
2210
  };
2217
2211
  export {
2218
- $o as default
2212
+ _l as default
2219
2213
  };