@chaibuilder/sdk 1.2.6 → 1.2.8

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 (78) hide show
  1. package/dist/{AddBlocks-gbfzju1d.js → AddBlocks-tMxKPoen.js} +50 -50
  2. package/dist/{AddBlocks-wuKI1ieB.cjs → AddBlocks-x2LkOHSj.cjs} +1 -1
  3. package/dist/BrandingOptions-EzT9UYd6.cjs +1 -0
  4. package/dist/{BrandingOptions-mZXO7thQ.js → BrandingOptions-QJJ1y5ez.js} +55 -50
  5. package/dist/{CanvasArea-7GpvsKP6.js → CanvasArea-EfZgx-gN.js} +406 -404
  6. package/dist/CanvasArea-rIDwPHl5.cjs +60 -0
  7. package/dist/{CurrentPage-tHBommaV.cjs → CurrentPage-QNFPD078.cjs} +1 -1
  8. package/dist/{CurrentPage-C52wu_r7.js → CurrentPage-ulHTz4MD.js} +7 -7
  9. package/dist/{Layers-NDtp2-im.js → Layers-rehZkz78.js} +171 -148
  10. package/dist/Layers-v-7k3W2I.cjs +1 -0
  11. package/dist/{MarkAsGlobalBlock-SPWd6Flk.js → MarkAsGlobalBlock-BjP-Rqlf.js} +6 -5
  12. package/dist/MarkAsGlobalBlock-X5dNmZcb.cjs +1 -0
  13. package/dist/{PagesPanel-qV7yGT-K.js → PagesPanel-acGVGJf-.js} +5 -5
  14. package/dist/{PagesPanel-qZ_-tybb.cjs → PagesPanel-x5ms_LOD.cjs} +1 -1
  15. package/dist/{ProjectPanel-vzyFbBNU.cjs → ProjectPanel-5BHQ5ANP.cjs} +1 -1
  16. package/dist/{ProjectPanel-RJqNz-uq.js → ProjectPanel-aLFJq49M.js} +5 -5
  17. package/dist/Settings-iOjfw5NQ.cjs +1 -0
  18. package/dist/{Settings-t0I7LKxe.js → Settings-v-txwlII.js} +172 -171
  19. package/dist/{SidePanels-rXx-fGjB.js → SidePanels-Vdc-J5wK.js} +96 -93
  20. package/dist/SidePanels-t0g9ZQFT.cjs +1 -0
  21. package/dist/Topbar-V8xCetWF.cjs +1 -0
  22. package/dist/{Topbar-ks1ckGLz.js → Topbar-j4t4AgCq.js} +4 -3
  23. package/dist/{UnsplashImages-8vJPuqrF.js → UnsplashImages-41Y3q5_Q.js} +7 -6
  24. package/dist/UnsplashImages-DbHky6cj.cjs +1 -0
  25. package/dist/UploadImages-DnQ95_NW.cjs +1 -0
  26. package/dist/{UploadImages-6N6UrjLo.js → UploadImages-xBg-kbKv.js} +13 -12
  27. package/dist/{add-page-modal-a8r8poMY.cjs → add-page-modal-0YAI9dXr.cjs} +1 -1
  28. package/dist/{add-page-modal-2VlONTs5.js → add-page-modal-6DlGzdA4.js} +5 -5
  29. package/dist/{confirm-alert-f3DYO5Hj.cjs → confirm-alert-U7-NcG7G.cjs} +1 -1
  30. package/dist/{confirm-alert-biqvaLT-.js → confirm-alert-i4pM3mOt.js} +4 -3
  31. package/dist/core.cjs +1 -1
  32. package/dist/core.js +19 -19
  33. package/dist/{delete-page-modal-_8O4RCkG.js → delete-page-modal-T_rlQfNd.js} +4 -4
  34. package/dist/{delete-page-modal-NmwHGjZP.cjs → delete-page-modal-qXpi_2xR.cjs} +1 -1
  35. package/dist/email-blocks.cjs +1 -1
  36. package/dist/email-blocks.js +263 -24
  37. package/dist/{form-Moz_psOw.js → form-OVmsLOrc.js} +1 -1
  38. package/dist/{form-lJhy9DEC.cjs → form-VbouZlAW.cjs} +1 -1
  39. package/dist/html-to-json-2PeOCVey.cjs +1 -0
  40. package/dist/{html-to-json-yjzEN9OX.js → html-to-json-57841sEK.js} +25 -26
  41. package/dist/{index-482XFRhB.js → index-EGUphg4R.js} +5402 -5366
  42. package/dist/index-H6vIwGfD.cjs +1 -0
  43. package/dist/index-e0c8PmRQ.js +205 -0
  44. package/dist/index-gi1LIOCw.cjs +1 -0
  45. package/dist/{index-3OU9zl6c.cjs → index-jw8RxsTv.cjs} +33 -33
  46. package/dist/{index-_OgCuSUz.js → index-niHREMmR.js} +1051 -1043
  47. package/dist/lib.cjs +1 -1
  48. package/dist/lib.js +20 -21
  49. package/dist/mockServiceWorker.js +1 -1
  50. package/dist/{page-viewer-ajtG_WZC.js → page-viewer-EoYYnA56.js} +5 -5
  51. package/dist/{page-viewer-k2VlWE3T.cjs → page-viewer-Ou8vDXGV.cjs} +1 -1
  52. package/dist/{project-general-setting-tAgCjUtR.cjs → project-general-setting-92q4oEYv.cjs} +1 -1
  53. package/dist/{project-general-setting-TIHLI4Qg.js → project-general-setting-DC_nADG-.js} +5 -5
  54. package/dist/{project-seo-setting-9JGBPzcA.cjs → project-seo-setting-Snn2nZgS.cjs} +1 -1
  55. package/dist/{project-seo-setting-dXclexQW.js → project-seo-setting-wxAGEkd_.js} +8 -7
  56. package/dist/{single-page-detail-6btKDNjs.cjs → single-page-detail-QmmhR_h2.cjs} +1 -1
  57. package/dist/{single-page-detail-lST7hWvC.js → single-page-detail-xtNZ9YxX.js} +6 -6
  58. package/dist/studio.cjs +1 -1
  59. package/dist/studio.js +4 -4
  60. package/dist/style.css +1 -1
  61. package/dist/ui.cjs +1 -1
  62. package/dist/ui.js +134 -133
  63. package/dist/{useAddBlockByDrop-uPXvrg4G.js → useAddBlockByDrop-_nwI4W3q.js} +1 -1
  64. package/dist/{useAddBlockByDrop-_nd8yZBa.cjs → useAddBlockByDrop-inkD7Lck.cjs} +1 -1
  65. package/dist/web-blocks.cjs +2 -2
  66. package/dist/web-blocks.js +138 -139
  67. package/package.json +5 -5
  68. package/dist/BrandingOptions-arKT1zCy.cjs +0 -1
  69. package/dist/CanvasArea-jvwkPvtQ.cjs +0 -59
  70. package/dist/Layers-4G-0aNk9.cjs +0 -1
  71. package/dist/MarkAsGlobalBlock-S2BhHTsK.cjs +0 -1
  72. package/dist/Settings-SV08lVcH.cjs +0 -1
  73. package/dist/SidePanels-TOJotvzn.cjs +0 -1
  74. package/dist/Topbar-u5XKdWgQ.cjs +0 -1
  75. package/dist/UnsplashImages-V8oKEHfi.cjs +0 -1
  76. package/dist/UploadImages-eHYxwWAp.cjs +0 -1
  77. package/dist/html-to-json-5UoswV2Q.cjs +0 -1
  78. package/dist/index-IIJ_o44s.cjs +0 -1
@@ -1,22 +1,23 @@
1
1
  import { j as e } from "./jsx-runtime-WbnYoNE9.js";
2
2
  import * as ne from "react";
3
- import $, { useState as j, useMemo as _, useEffect as M, useCallback as B, memo as ct, createContext as Oe, useContext as se } from "react";
3
+ import I, { useState as j, useMemo as _, useEffect as O, useCallback as B, memo as ct, createContext as Me, useContext as se } from "react";
4
4
  import { useThrottledCallback as fe } from "@react-hookz/web";
5
- import { forEach as ke, isArray as ie, omit as pt, truncate as ut, includes as P, get as x, first as ue, split as xt, startCase as Y, toLower as le, isEmpty as m, map as C, find as gt, last as ve, filter as we, set as Me, keys as ht, cloneDeep as yt, each as bt, capitalize as mt, reject as ft, nth as Ve, startsWith as W, isNumber as vt, parseInt as wt, isNaN as ze, findLast as jt, flatten as U, intersection as Ye, has as ye, isNull as Ct } from "lodash-es";
5
+ import { forEach as ke, isArray as ie, omit as pt, truncate as ut, includes as P, get as x, first as ue, split as xt, startCase as Y, toLower as le, isEmpty as m, map as C, find as gt, last as ve, filter as we, set as Oe, keys as ht, cloneDeep as yt, each as bt, capitalize as mt, reject as ft, nth as Ve, startsWith as W, isNumber as vt, parseInt as wt, isNaN as Xe, findLast as jt, flatten as U, intersection as Ye, has as ye, isNull as Ct } from "lodash-es";
6
6
  import { useTranslation as K } from "react-i18next";
7
- import { PlusIcon as Ne, Cross2Icon as Fe, EyeOpenIcon as kt, EyeClosedIcon as He, BorderAllIcon as A, WidthIcon as T, HeightIcon as R, ArrowUpIcon as Q, ArrowRightIcon as ee, ArrowDownIcon as te, ArrowLeftIcon as re, ArrowTopLeftIcon as Nt, ArrowTopRightIcon as _t, ArrowBottomRightIcon as St, ArrowBottomLeftIcon as Tt, AlignLeftIcon as Rt, AlignCenterHorizontallyIcon as Vt, AlignRightIcon as Ht, StretchHorizontallyIcon as Bt, FontItalicIcon as Dt, UnderlineIcon as $t, OverlineIcon as It, LetterCaseUppercaseIcon as At, Cross1Icon as Pt, InfoCircledIcon as _e, MinusIcon as Lt, BoxIcon as Xe, RowSpacingIcon as Et, TriangleDownIcon as Ot, CrossCircledIcon as Mt, TrashIcon as zt, MixerHorizontalIcon as Ze } from "@radix-ui/react-icons";
8
- import { a$ as Yt, b0 as Ft, B as xe, b1 as Xt, b2 as Zt, b3 as Wt, b4 as Ut, b5 as Kt, b6 as qt, b7 as Gt, a6 as q, am as Jt, an as Qt, ao as er, b8 as tr, ak as rr, b9 as lr, al as sr, aC as F, aD as X, aF as Z, ba as or, bb as ar, bc as nr, bd as ir, be as dr, bf as cr, p as We, ac as Ue, i as pr, bg as Ke, bh as de, bi as ce, bj as pe, aj as Se, P as qe, a3 as Ge, j as Je, aH as Te, bk as ur, bl as xr, a4 as ge, W as gr, a9 as Qe, R as Be, ag as hr, ad as yr, bm as br, aq as mr, ar as fr, as as vr, at as wr, au as V, bn as et, aw as jr, ax as Cr, ay as De, az as $e } from "./index-_OgCuSUz.js";
7
+ import { PlusIcon as Ne, Cross2Icon as Fe, EyeOpenIcon as kt, EyeClosedIcon as He, BorderAllIcon as A, WidthIcon as T, HeightIcon as R, ArrowUpIcon as Q, ArrowRightIcon as ee, ArrowDownIcon as te, ArrowLeftIcon as re, ArrowTopLeftIcon as Nt, ArrowTopRightIcon as _t, ArrowBottomRightIcon as St, ArrowBottomLeftIcon as Tt, AlignLeftIcon as Rt, AlignCenterHorizontallyIcon as Vt, AlignRightIcon as Ht, StretchHorizontallyIcon as Bt, FontItalicIcon as Dt, UnderlineIcon as $t, OverlineIcon as It, LetterCaseUppercaseIcon as At, Cross1Icon as Pt, InfoCircledIcon as _e, MinusIcon as Et, BoxIcon as ze, RowSpacingIcon as Lt, TriangleDownIcon as Mt, CrossCircledIcon as Ot, TrashIcon as Xt, MixerHorizontalIcon as Ze } from "@radix-ui/react-icons";
8
+ import { a$ as Yt, b0 as Ft, B as xe, b1 as zt, b2 as Zt, b3 as Wt, b4 as Ut, b5 as Kt, b6 as qt, b7 as Gt, a7 as q, an as Jt, ao as Qt, ap as er, b8 as tr, al as rr, b9 as lr, am as sr, aD as F, aE as z, aG as Z, ba as or, bb as ar, bc as nr, bd as ir, be as dr, bf as cr, p as We, ad as Ue, i as pr, bg as Ke, bh as de, bi as ce, bj as pe, ak as Se, Q as qe, a4 as Ge, j as Je, aI as Te, bk as ur, bl as xr, a5 as ge, X as gr, aa as Qe, U as Be, ah as hr, ae as yr, bm as br, ar as mr, as as fr, at as vr, au as wr, av as V, bn as et, ax as jr, ay as Cr, az as De, aA as $e } from "./index-niHREMmR.js";
9
9
  import { u as kr } from "./controls-XPXGHKht.js";
10
10
  import { Check as Nr, EditIcon as _r, TrashIcon as Sr } from "lucide-react";
11
11
  import { getBlockComponent as tt, getChaiDataProviders as Tr } from "@chaibuilder/runtime";
12
- import { E as rt, u as lt } from "./index-482XFRhB.js";
13
- import Rr from "@rjsf/core";
14
- import Vr from "@rjsf/validator-ajv8";
15
- import { useAtom as Hr } from "jotai";
16
- import Br from "react-autosuggest";
17
- import Dr from "fuse.js";
18
- import { A as $r, C as he, g as Ir } from "./utils-AvyFzbPC.js";
19
- import { a as Ar } from "./MODIFIERS-RiXS5Mn1.js";
12
+ import { E as rt, u as lt } from "./index-EGUphg4R.js";
13
+ import { J as Rr, a as Vr, d as Hr } from "./index-e0c8PmRQ.js";
14
+ import Br from "@rjsf/core";
15
+ import Dr from "@rjsf/validator-ajv8";
16
+ import { useAtom as $r } from "jotai";
17
+ import Ir from "react-autosuggest";
18
+ import Ar from "fuse.js";
19
+ import { A as Pr, C as he, g as Er } from "./utils-AvyFzbPC.js";
20
+ import { a as Lr } from "./MODIFIERS-RiXS5Mn1.js";
20
21
  import "./_commonjsHelpers-UyOWmZb0.js";
21
22
  import "@radix-ui/react-toggle";
22
23
  import "class-variance-authority";
@@ -46,6 +47,7 @@ import "./Functions-7jnEwJyw.js";
46
47
  import "clsx";
47
48
  import "tailwind-merge";
48
49
  import "redux-undo";
50
+ import "lodash";
49
51
  import "i18next";
50
52
  import "@floating-ui/react-dom";
51
53
  import "react-textarea-autosize";
@@ -54,12 +56,10 @@ import "react-dnd";
54
56
  import "@minoru/react-dnd-treeview";
55
57
  import "react-hotkeys-hook";
56
58
  import "sonner";
57
- import "./html-to-json-yjzEN9OX.js";
59
+ import "./html-to-json-57841sEK.js";
58
60
  import "himalaya";
59
- import "lodash";
60
61
  import "./web-blocks.js";
61
- const Pr = $.lazy(() => import("react-json-view"));
62
- function Lr(r) {
62
+ function Mr(r) {
63
63
  const s = [], t = {};
64
64
  function o(l, d) {
65
65
  ke(d, (a, c) => {
@@ -76,21 +76,22 @@ const je = ({ data: r, fullView: s }) => {
76
76
  return s ? typeof r == "object" ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
77
77
  /* @__PURE__ */ e.jsx("div", { className: "h-3" }),
78
78
  /* @__PURE__ */ e.jsx(rt, { children: /* @__PURE__ */ e.jsx(
79
- Pr,
79
+ Rr,
80
80
  {
81
- style: { maxHeight: "40vh", overflowY: "auto" },
82
- name: "Content",
83
- enableClipboard: !1,
84
- displayObjectSize: !1,
85
- displayDataTypes: !1,
86
- src: r,
87
- collapsed: !0
81
+ data: r,
82
+ shouldExpandNode: Vr,
83
+ style: {
84
+ ...Hr,
85
+ container: "max-h-[40vh] overflow-y-auto text-[12px] leading-[1.5] tracking-wide font-mono",
86
+ stringValue: "text-orange-600",
87
+ label: "text-green-900 font-semibold pr-1 tracking-wider"
88
+ }
88
89
  }
89
90
  ) })
90
- ] }) : /* @__PURE__ */ e.jsxs("div", { className: "text-gray-800/50 text-[12px] leading-4 w-full max-h-36 overflow-x-hidden overflow-y-auto", children: [
91
+ ] }) : /* @__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
92
  /* @__PURE__ */ e.jsx("span", { className: "font-medium text-gray-800/80", children: "Content: " }),
92
93
  r
93
- ] }) : /* @__PURE__ */ e.jsx("div", { className: "text-[10px] text-gray-800/50 leading-3 whitespace-nowrap overflow-hidden w-full", children: ut(t === "object" ? JSON.stringify(r) : r, { length: 40 }) });
94
+ ] }) : /* @__PURE__ */ e.jsx("div", { className: "w-full overflow-hidden whitespace-nowrap text-[10px] leading-3 text-gray-800/50", children: ut(t === "object" ? JSON.stringify(r) : r, { length: 40 }) });
94
95
  }, Ie = ({
95
96
  type: r,
96
97
  value: s = "",
@@ -100,10 +101,10 @@ const je = ({ data: r, fullView: s }) => {
100
101
  dataType: d,
101
102
  appliedBindings: a
102
103
  }) => {
103
- const { paths: c, pathsType: i } = Lr(o), p = r === "PROP" ? tt(o == null ? void 0 : o._type) : {}, y = r === "PROP", [n, h] = j(!1), g = _(() => r === "PROP" ? c.filter(
104
+ const { paths: c, pathsType: i } = Mr(o), p = r === "PROP" ? tt(o == null ? void 0 : o._type) : {}, y = r === "PROP", [n, h] = j(!1), g = _(() => r === "PROP" ? c.filter(
104
105
  (u) => !P(a, u) && x(p, `props.${ue(xt(u, "."))}.binding`)
105
106
  ) : c.filter((u) => d === x(i, u, "")), [r, c, a, d, p]);
106
- return M(() => {
107
+ return O(() => {
107
108
  s && l(s);
108
109
  }, [s, r]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
109
110
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-4", children: [
@@ -114,20 +115,20 @@ const je = ({ data: r, fullView: s }) => {
114
115
  {
115
116
  variant: "outline",
116
117
  size: "sm",
117
- className: ` ${m(s) ? "bg-blue-500 text-gray-100 hover:bg-blue-400 hover:text-white w-44 justify-center" : "min-w-[350px] justify-between items-center"}`,
118
+ className: ` ${m(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
119
  children: s ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
119
- /* @__PURE__ */ e.jsxs("span", { className: "text-sm pr-8", children: [
120
- y && /* @__PURE__ */ e.jsx("span", { className: "text-[10px] text-purple-500 bg-purple-100 px-2 py-0.5 mr-2 rounded-full", children: Y(d) }),
120
+ /* @__PURE__ */ e.jsxs("span", { className: "pr-8 text-sm", children: [
121
+ y && /* @__PURE__ */ e.jsx("span", { className: "mr-2 rounded-full bg-purple-100 px-2 py-0.5 text-[10px] text-purple-500", children: Y(d) }),
121
122
  s
122
123
  ] }),
123
- /* @__PURE__ */ e.jsx("span", { className: "text-[9px] text-blue-400 underline cursor-pointer hover:text-blue-700", children: "Change" })
124
+ /* @__PURE__ */ e.jsx("span", { className: "cursor-pointer text-[9px] text-blue-400 underline hover:text-blue-700", children: "Change" })
124
125
  ] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
125
126
  "+ Set ",
126
127
  Y(le(r))
127
128
  ] })
128
129
  }
129
130
  ) }),
130
- /* @__PURE__ */ e.jsx(Xt, { className: "p-0 z-[999] min-w-[300px]", side: "right", align: "start", children: /* @__PURE__ */ e.jsxs(Zt, { children: [
131
+ /* @__PURE__ */ e.jsx(zt, { className: "z-[999] min-w-[300px] p-0", side: "right", align: "start", children: /* @__PURE__ */ e.jsxs(Zt, { children: [
131
132
  /* @__PURE__ */ e.jsx(Wt, { placeholder: `Choose ${le(r)}...` }),
132
133
  /* @__PURE__ */ e.jsxs(Ut, { children: [
133
134
  /* @__PURE__ */ e.jsx(Kt, { children: "No results found." }),
@@ -135,16 +136,16 @@ const je = ({ data: r, fullView: s }) => {
135
136
  Gt,
136
137
  {
137
138
  value: u,
138
- className: `cursor-pointer ${y ? "flex justify-between items-center" : "flex flex-col items-start justify-start"}`,
139
+ className: `cursor-pointer ${y ? "flex items-center justify-between" : "flex flex-col items-start justify-start"}`,
139
140
  onSelect: (f) => {
140
141
  t(gt(g, (k) => k === f) || null), h(!1);
141
142
  },
142
143
  children: [
143
144
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
144
- /* @__PURE__ */ e.jsx(Nr, { className: `w-4 h-4 text-green-500 ${s === u ? "" : "opacity-0"}` }),
145
+ /* @__PURE__ */ e.jsx(Nr, { className: `h-4 w-4 text-green-500 ${s === u ? "" : "opacity-0"}` }),
145
146
  u
146
147
  ] }),
147
- y ? /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx("span", { className: "text-[10px] text-purple-500 bg-purple-100 px-2 py-0.5 rounded-full", children: Y(x(i, u, "")) }) }) : /* @__PURE__ */ e.jsx("div", { className: "pl-6", children: /* @__PURE__ */ e.jsx(je, { data: x(o, u) }) })
148
+ y ? /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx("span", { className: "rounded-full bg-purple-100 px-2 py-0.5 text-[10px] text-purple-500", children: Y(x(i, u, "")) }) }) : /* @__PURE__ */ e.jsx("div", { className: "pl-6", children: /* @__PURE__ */ e.jsx(je, { data: x(o, u) }) })
148
149
  ]
149
150
  },
150
151
  u
@@ -155,7 +156,7 @@ const je = ({ data: r, fullView: s }) => {
155
156
  ] }),
156
157
  !y && !m(s) && /* @__PURE__ */ e.jsx("div", { className: "pt-2", children: /* @__PURE__ */ e.jsx(je, { data: x(o, s, ""), fullView: !0 }) })
157
158
  ] });
158
- }, Er = ({
159
+ }, Or = ({
159
160
  appliedBindings: r = [],
160
161
  onAddBinding: s,
161
162
  editMode: t,
@@ -180,7 +181,7 @@ const je = ({ data: r, fullView: s }) => {
180
181
  /* @__PURE__ */ e.jsx(Qt, { children: "Add Data Binding" }),
181
182
  /* @__PURE__ */ e.jsx(er, { className: "text-xs", children: "Add prop and path of binding. Click save when you're done." })
182
183
  ] }),
183
- /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1 relative", children: [
184
+ /* @__PURE__ */ e.jsxs("div", { className: "relative flex flex-col gap-1", children: [
184
185
  /* @__PURE__ */ e.jsx(
185
186
  Ie,
186
187
  {
@@ -233,7 +234,7 @@ const je = ({ data: r, fullView: s }) => {
233
234
  return /* @__PURE__ */ e.jsxs(rr, { children: [
234
235
  /* @__PURE__ */ e.jsx(lr, { disabled: r, asChild: !0, onClick: () => c(!0), children: s }),
235
236
  a && /* @__PURE__ */ e.jsx(sr, { children: /* @__PURE__ */ e.jsx(
236
- Er,
237
+ Or,
237
238
  {
238
239
  item: d,
239
240
  editMode: l,
@@ -244,7 +245,7 @@ const je = ({ data: r, fullView: s }) => {
244
245
  }
245
246
  ) })
246
247
  ] });
247
- }, Or = ({
248
+ }, Xr = ({
248
249
  item: r,
249
250
  onAddBinding: s,
250
251
  onRemove: t,
@@ -263,27 +264,27 @@ const je = ({ data: r, fullView: s }) => {
263
264
  return h === "string" ? "text" : h === "object" ? "model" : h;
264
265
  }
265
266
  };
266
- return M(() => c(() => i(r.key, "PROP")), [r.key]), /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col border border-gray-200 relative rounded-md p-2", children: [
267
- /* @__PURE__ */ e.jsx("div", { className: "text-gray-500 font-normal text-sm", children: r.key }),
267
+ return O(() => c(() => i(r.key, "PROP")), [r.key]), /* @__PURE__ */ e.jsxs("div", { className: "relative flex flex-col rounded-md border border-gray-200 p-2", children: [
268
+ /* @__PURE__ */ e.jsx("div", { className: "text-sm font-normal text-gray-500", children: r.key }),
268
269
  /* @__PURE__ */ e.jsx("div", { className: "font-medium leading-5", children: r.value }),
269
270
  /* @__PURE__ */ e.jsx(je, { data: x(l, r.value, "") }),
270
271
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-end gap-x-2", children: [
271
- /* @__PURE__ */ e.jsx(st, { editMode: !0, onAddBinding: s, appliedBindings: d, item: r, children: /* @__PURE__ */ e.jsx(_r, { className: "h-6 w-6 mt-1 cursor-pointer rounded border hover:bg-blue-400 hover:text-white border-blue-400 p-1 text-blue-400 hover:scale-105 duration-200" }) }),
272
+ /* @__PURE__ */ e.jsx(st, { editMode: !0, onAddBinding: s, appliedBindings: d, item: r, children: /* @__PURE__ */ e.jsx(_r, { 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
273
  /* @__PURE__ */ e.jsx(
273
274
  Sr,
274
275
  {
275
276
  onClick: () => t(),
276
- className: "h-6 w-6 mt-1 cursor-pointer rounded border hover:bg-red-400 hover:text-white border-red-400 p-1 text-red-400 hover:scale-105 duration-200"
277
+ 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
278
  }
278
279
  )
279
280
  ] }),
280
- !m(a) && !m(r.key) && /* @__PURE__ */ e.jsx("div", { className: "mt-px absolute right-0 top-1 text-purple-600 text-[10px] flex items-center font-medium h-4 px-2 rounded-full", children: Y(a) })
281
+ !m(a) && !m(r.key) && /* @__PURE__ */ e.jsx("div", { className: "absolute right-0 top-1 mt-px flex h-4 items-center rounded-full px-2 text-[10px] font-medium text-purple-600", children: Y(a) })
281
282
  ] });
282
- }, Mr = ({ bindingData: r, onChange: s }) => {
283
+ }, Yr = ({ bindingData: r, onChange: s }) => {
283
284
  const t = q(), [o] = lt(), l = Tr(), [d, a] = j(
284
285
  C(r, (n, h) => ({ key: h, value: n }))
285
286
  );
286
- M(() => {
287
+ O(() => {
287
288
  a(C(r, (n, h) => ({ key: h, value: n })));
288
289
  }, [t == null ? void 0 : t._id]);
289
290
  const c = _(() => {
@@ -307,18 +308,18 @@ const je = ({ data: r, fullView: s }) => {
307
308
  }
308
309
  const h = {};
309
310
  ke(n, (g) => {
310
- !m(g == null ? void 0 : g.key) && !m(g == null ? void 0 : g.value) && Me(h, g.key, g.value);
311
+ !m(g == null ? void 0 : g.key) && !m(g == null ? void 0 : g.value) && Oe(h, g.key, g.value);
311
312
  }), s(h);
312
313
  },
313
314
  [s]
314
315
  );
315
- return m(l) ? /* @__PURE__ */ e.jsx("div", { className: "w-full flex items-center justify-center", children: /* @__PURE__ */ e.jsxs("p", { className: "text-gray-500 mb-1.5 text-xs", children: [
316
+ return m(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
317
  "You have no data providers registered. Please add a data provider to your project. ",
317
318
  /* @__PURE__ */ e.jsx("br", {}),
318
319
  /* @__PURE__ */ e.jsx("a", { className: "text-blue-500", href: "https://chaibuilder.com/docs/registering-data-providers", target: "_blank", children: "Learn more" })
319
320
  ] }) }) : /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
320
321
  C(d, (n, h) => /* @__PURE__ */ e.jsx(
321
- Or,
322
+ Xr,
322
323
  {
323
324
  item: n,
324
325
  onAddBinding: i,
@@ -330,7 +331,7 @@ const je = ({ data: r, fullView: s }) => {
330
331
  n.key
331
332
  )),
332
333
  /* @__PURE__ */ e.jsxs(F, { delayDuration: 200, children: [
333
- /* @__PURE__ */ e.jsx(X, { className: "w-full", children: /* @__PURE__ */ e.jsx(
334
+ /* @__PURE__ */ e.jsx(z, { className: "w-full", children: /* @__PURE__ */ e.jsx(
334
335
  st,
335
336
  {
336
337
  disabled: c,
@@ -339,8 +340,8 @@ const je = ({ data: r, fullView: s }) => {
339
340
  children: /* @__PURE__ */ e.jsx(
340
341
  "span",
341
342
  {
342
- className: `w-full px-5 py-1.5 text-xs rounded-md font-medium duration-200 ${c ? "cursor-not-allowed bg-gray-200 text-gray-400" : "bg-blue-700/20 text-blue-800 hover:bg-blue-700/30"}`,
343
- children: m(o) ? /* @__PURE__ */ e.jsx("small", { className: "text-gray-500 text-[9.5px]", children: "No data provider has been set up for this page" }) : "+ Add Data Binding"
343
+ className: `w-full rounded-md px-5 py-1.5 text-xs font-medium duration-200 ${c ? "cursor-not-allowed bg-gray-200 text-gray-400" : "bg-blue-700/20 text-blue-800 hover:bg-blue-700/30"}`,
344
+ children: m(o) ? /* @__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
345
  }
345
346
  )
346
347
  }
@@ -348,7 +349,7 @@ const je = ({ data: r, fullView: s }) => {
348
349
  c && /* @__PURE__ */ e.jsx(Z, { sideOffset: -55, className: "text-[11px]", children: m(o) ? "No data provider has been set up for this page." : "Complete last added data binding to add more" })
349
350
  ] })
350
351
  ] });
351
- }, zr = () => /* @__PURE__ */ e.jsx("div", { className: "text-xs border rounded-sm p-1 mt-1 border-orange-500 text-orange-500 bg-orange-100", children: "Data binding is set for this field" }), be = ct(({ createHistorySnapshot: r, properties: s, formData: t, onChange: o }) => {
352
+ }, Fr = () => /* @__PURE__ */ e.jsx("div", { className: "text-xs border rounded-sm p-1 mt-1 border-orange-500 text-orange-500 bg-orange-100", children: "Data binding is set for this field" }), be = ct(({ createHistorySnapshot: r, properties: s, formData: t, onChange: o }) => {
352
353
  const l = { type: "object", properties: {} }, d = {};
353
354
  return Object.keys(s).forEach((a) => {
354
355
  const c = s[a];
@@ -357,10 +358,10 @@ const je = ({ data: r, fullView: s }) => {
357
358
  const i = a;
358
359
  l.properties[i] = or(c), d[i] = ar(c);
359
360
  }), /* @__PURE__ */ e.jsx(
360
- Rr,
361
+ Br,
361
362
  {
362
363
  widgets: {
363
- binding: zr,
364
+ binding: Fr,
364
365
  richtext: nr,
365
366
  icon: ir,
366
367
  image: dr
@@ -371,7 +372,7 @@ const je = ({ data: r, fullView: s }) => {
371
372
  omitExtraData: !1,
372
373
  liveOmit: !1,
373
374
  liveValidate: !1,
374
- validator: Vr,
375
+ validator: Dr,
375
376
  uiSchema: d,
376
377
  onBlur: r,
377
378
  schema: l,
@@ -380,7 +381,7 @@ const je = ({ data: r, fullView: s }) => {
380
381
  }
381
382
  );
382
383
  });
383
- function Yr() {
384
+ function zr() {
384
385
  const r = q(), { createSnapshot: s } = We(), t = Ue(), o = tt(r._type), l = { ...r }, d = pr("dataBindingSupport", !1), a = () => s(), c = ({ formData: n }, h) => {
385
386
  if (h) {
386
387
  const g = h.replace("root.", "");
@@ -418,7 +419,7 @@ function Yr() {
418
419
  "Data Binding"
419
420
  ] }) }),
420
421
  /* @__PURE__ */ e.jsx(pe, { className: "pt-4 px-4", children: /* @__PURE__ */ e.jsx(
421
- Mr,
422
+ Yr,
422
423
  {
423
424
  bindingData: x(l, "_bindings", {}),
424
425
  onChange: (n) => {
@@ -463,28 +464,28 @@ function Yr() {
463
464
  /* @__PURE__ */ e.jsx("div", { className: "pb-60" })
464
465
  ] });
465
466
  }
466
- const Ae = new Dr($r, {
467
+ const Ae = new Ar(Pr, {
467
468
  isCaseSensitive: !1,
468
469
  threshold: 0.2,
469
470
  minMatchCharLength: 2,
470
471
  keys: ["name"]
471
472
  });
472
- function Fr() {
473
- var L;
474
- const [r] = Se(), s = q(), t = qe(), o = Ge(), [l] = Je(), [d, a] = j(""), c = (L = ue(r)) == null ? void 0 : L.prop, i = ft((x(s, c, "").replace(Ar, "").split(",").pop() || "").split(" "), m), p = () => {
473
+ function Zr() {
474
+ var E;
475
+ const [r] = Se(), s = q(), t = qe(), o = Ge(), [l] = Je(), [d, a] = j(""), c = (E = ue(r)) == null ? void 0 : E.prop, i = ft((x(s, c, "").replace(Lr, "").split(",").pop() || "").split(" "), m), p = () => {
475
476
  const w = d.trim().toLowerCase().replace(/ +(?= )/g, "").split(" ");
476
477
  t(l, w, !0), a("");
477
478
  }, [y, n] = j([]), h = ({ value: w }) => {
478
- const I = w.trim().toLowerCase(), E = I.match(/.+:/g);
479
+ const $ = w.trim().toLowerCase(), L = $.match(/.+:/g);
479
480
  let N = [];
480
- if (E && E.length > 0) {
481
- const [D] = E, z = I.replace(D, "");
482
- N = Ae.search(z).map((b) => ({
481
+ if (L && L.length > 0) {
482
+ const [D] = L, X = $.replace(D, "");
483
+ N = Ae.search(X).map((b) => ({
483
484
  ...b,
484
485
  item: { ...b.item, name: D + b.item.name }
485
486
  }));
486
487
  } else
487
- N = Ae.search(I);
488
+ N = Ae.search($);
488
489
  n(C(N, "item"));
489
490
  }, g = () => {
490
491
  n([]);
@@ -498,7 +499,7 @@ function Fr() {
498
499
  onKeyDown: (w) => {
499
500
  w.key === "Enter" && d.trim() !== "" && p();
500
501
  },
501
- onChange: (w, { newValue: I }) => a(I),
502
+ onChange: (w, { newValue: $ }) => a($),
502
503
  className: "w-full rounded-md text-xs px-2 hover:outline-0 bg-background border-border py-1"
503
504
  };
504
505
  return /* @__PURE__ */ e.jsxs(
@@ -509,7 +510,7 @@ function Fr() {
509
510
  /* @__PURE__ */ e.jsx(Te, { className: "mt-2", children: "Add Tailwind classes" }),
510
511
  /* @__PURE__ */ e.jsxs("div", { className: "relative -mt-4 flex items-center gap-x-3", children: [
511
512
  /* @__PURE__ */ e.jsx("div", { className: "relative flex w-full items-center gap-x-3", children: /* @__PURE__ */ e.jsx(
512
- Br,
513
+ Ir,
513
514
  {
514
515
  suggestions: y,
515
516
  onSuggestionsFetchRequested: h,
@@ -565,7 +566,7 @@ function Fr() {
565
566
  }
566
567
  );
567
568
  }
568
- const H = ["px", "%", "em", "rem", "ch", "vh", "vw"], Xr = {
569
+ const H = ["px", "%", "em", "rem", "ch", "vh", "vw"], Wr = {
569
570
  heading: "flex.heading",
570
571
  items: [
571
572
  { type: "arbitrary", label: "flex.basis", units: H, property: "flexBasis" },
@@ -574,7 +575,7 @@ const H = ["px", "%", "em", "rem", "ch", "vh", "vw"], Xr = {
574
575
  { type: "dropdown", label: "flex.grow", property: "flexGrow" },
575
576
  { type: "dropdown", label: "flex.shrink", property: "flexShrink" }
576
577
  ]
577
- }, Zr = {
578
+ }, Ur = {
578
579
  heading: "grid.heading",
579
580
  items: [
580
581
  { type: "range", label: "grid.col_span", property: "gridColSpan" },
@@ -585,7 +586,7 @@ const H = ["px", "%", "em", "rem", "ch", "vh", "vw"], Xr = {
585
586
  { type: "range", label: "grid.row_end", property: "gridRowEnd" },
586
587
  { type: "range", label: "grid.order", property: "order" }
587
588
  ]
588
- }, Wr = [
589
+ }, Kr = [
589
590
  {
590
591
  heading: "layout.heading",
591
592
  items: [
@@ -987,7 +988,7 @@ const H = ["px", "%", "em", "rem", "ch", "vh", "vw"], Xr = {
987
988
  },
988
989
  {
989
990
  heading: "classes.heading",
990
- items: [{ component: Fr }]
991
+ items: [{ component: Zr }]
991
992
  }
992
993
  ], ot = {
993
994
  "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" }) }),
@@ -1183,7 +1184,7 @@ const H = ["px", "%", "em", "rem", "ch", "vh", "vw"], Xr = {
1183
1184
  )
1184
1185
  ] }),
1185
1186
  static: Pt
1186
- }, oe = Oe({ canReset: !1, canChange: !0 }), Ur = ({ children: r, canReset: s = !1, canChange: t = !0 }) => (
1187
+ }, oe = Me({ canReset: !1, canChange: !0 }), qr = ({ children: r, canReset: s = !1, canChange: t = !0 }) => (
1187
1188
  // eslint-disable-next-line react/jsx-no-constructed-context-values
1188
1189
  /* @__PURE__ */ e.jsx(oe.Provider, { value: { canReset: s, canChange: t }, children: r })
1189
1190
  ), at = ({ label: r, property: s, onChange: t }) => {
@@ -1191,7 +1192,7 @@ const H = ["px", "%", "em", "rem", "ch", "vh", "vw"], Xr = {
1191
1192
  return /* @__PURE__ */ e.jsx("div", { className: r ? "w-full rounded " : "grow", children: c ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
1192
1193
  /* @__PURE__ */ e.jsx(ur, { className: "w-[70%] rounded py-1", readOnly: !0, value: d }),
1193
1194
  /* @__PURE__ */ e.jsxs(F, { delayDuration: 100, children: [
1194
- /* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsx("button", { type: "button", className: "invisible ml-3 mt-1 text-blue-600 group-hover:visible", children: /* @__PURE__ */ e.jsx(_e, {}) }) }),
1195
+ /* @__PURE__ */ e.jsx(z, { asChild: !0, children: /* @__PURE__ */ e.jsx("button", { type: "button", className: "invisible ml-3 mt-1 text-blue-600 group-hover:visible", children: /* @__PURE__ */ e.jsx(_e, {}) }) }),
1195
1196
  /* @__PURE__ */ e.jsx(Z, { children: "Current value is using a Tailwind arbitrary value." })
1196
1197
  ] })
1197
1198
  ] }) : /* @__PURE__ */ e.jsx(
@@ -1219,14 +1220,14 @@ function Ce({ selected: r, onChange: s, rounded: t = !1, options: o, disabled: l
1219
1220
  value: d,
1220
1221
  children: [
1221
1222
  /* @__PURE__ */ e.jsx("option", { className: "bg-transparent", value: "" }),
1222
- $.Children.toArray(
1223
+ I.Children.toArray(
1223
1224
  o.map((i) => /* @__PURE__ */ e.jsx("option", { className: "bg-transparent", value: i, children: i }))
1224
1225
  )
1225
1226
  ]
1226
1227
  }
1227
1228
  );
1228
1229
  }
1229
- const Kr = ({ property: r, onChange: s }) => {
1230
+ const Gr = ({ property: r, onChange: s }) => {
1230
1231
  const { canReset: t, canChange: o } = se(oe), l = ae(r), d = _(() => x(l, "cls", ""), [l]), a = _(() => x(he, `${r}.classes`, [""]), [r]), c = a.indexOf(d) > -1 ? a.indexOf(d) : 0, i = /\[.*\]/g.test(d);
1231
1232
  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: d }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1232
1233
  /* @__PURE__ */ e.jsx(
@@ -1237,7 +1238,7 @@ const Kr = ({ property: r, onChange: s }) => {
1237
1238
  disabled: !o && (!t || c - 1 < 0),
1238
1239
  onClick: () => s(Ve(a, c - 1), r),
1239
1240
  children: /* @__PURE__ */ e.jsx("span", { className: "flex items-center justify-center", children: /* @__PURE__ */ e.jsx(
1240
- Lt,
1241
+ Et,
1241
1242
  {
1242
1243
  className: !o && (!t || c - 1 < 0) ? "text-gray-500" : "text-black/60 dark:text-white/60"
1243
1244
  }
@@ -1261,22 +1262,22 @@ const Kr = ({ property: r, onChange: s }) => {
1261
1262
  }
1262
1263
  )
1263
1264
  ] }) });
1264
- }, qr = ({ property: r, onChange: s }) => {
1265
+ }, Jr = ({ property: r, onChange: s }) => {
1265
1266
  const t = _(() => x(he, `${r}.classes`, [""]), [r]), { canChange: o } = se(oe), l = ae(r), d = _(() => x(l, "cls", ""), [l]);
1266
1267
  return /* @__PURE__ */ e.jsx("div", { className: "flex grow flex-wrap gap-1", children: C(t, (a) => /* @__PURE__ */ e.jsxs(F, { children: [
1267
- /* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsx(
1268
+ /* @__PURE__ */ e.jsx(z, { asChild: !0, children: /* @__PURE__ */ e.jsx(
1268
1269
  "button",
1269
1270
  {
1270
1271
  type: "button",
1271
1272
  disabled: !o,
1272
1273
  onClick: () => s(a, r),
1273
1274
  className: `cursor-pointer rounded border border-gray-600 p-1 disabled:cursor-not-allowed ${d === a ? " bg-blue-500 text-white" : "disabled:bg-gray-600 disabled:text-gray-400"}`,
1274
- children: $.createElement(x(ot, a, Xe))
1275
+ children: I.createElement(x(ot, a, ze))
1275
1276
  }
1276
1277
  ) }),
1277
1278
  /* @__PURE__ */ e.jsx(Z, { children: Y(le(a)) })
1278
1279
  ] })) });
1279
- }, Gr = {
1280
+ }, Qr = {
1280
1281
  backgroundColor: "bg",
1281
1282
  textColor: "text",
1282
1283
  borderColor: "border",
@@ -1288,7 +1289,7 @@ const Kr = ({ property: r, onChange: s }) => {
1288
1289
  toColor: "to",
1289
1290
  ringColor: "ring",
1290
1291
  ringOffsetColor: "ring-offset"
1291
- }, Jr = ({ property: r, onChange: s }) => {
1292
+ }, el = ({ property: r, onChange: s }) => {
1292
1293
  const t = ae(r), o = _(() => x(t, "cls", ""), [t]), { canChange: l } = se(oe), [d, a] = j([]), [c, i] = j({ color: "", shade: "" }), p = o.split("-"), y = x(p, "1", ""), n = x(p, "2", ""), h = B(
1293
1294
  // eslint-disable-next-line no-shadow
1294
1295
  (u) => {
@@ -1296,7 +1297,7 @@ const Kr = ({ property: r, onChange: s }) => {
1296
1297
  },
1297
1298
  [a, i]
1298
1299
  );
1299
- M(() => {
1300
+ O(() => {
1300
1301
  if (["current", "inherit", "transparent", "black", "white"].includes(y))
1301
1302
  return a([]);
1302
1303
  a(["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"]);
@@ -1308,10 +1309,10 @@ const Kr = ({ property: r, onChange: s }) => {
1308
1309
  },
1309
1310
  [y]
1310
1311
  );
1311
- return M(() => {
1312
+ return O(() => {
1312
1313
  i({ color: "", shade: "" });
1313
- }, [t]), M(() => {
1314
- const f = `${x(Gr, r, "")}-${c.color}${c.shade ? `-${c.shade}` : ""}`;
1314
+ }, [t]), O(() => {
1315
+ const f = `${x(Qr, r, "")}-${c.color}${c.shade ? `-${c.shade}` : ""}`;
1315
1316
  f.match(new RegExp(x(he, `${r}.regExp`, ""))) && s(f, r);
1316
1317
  }, [c, s, r]), /* @__PURE__ */ e.jsxs("div", { className: "flex flex-row divide-x divide-solid divide-border rounded-lg border border-border text-xs", children: [
1317
1318
  /* @__PURE__ */ e.jsx("div", { className: "grow text-center", children: /* @__PURE__ */ e.jsx(
@@ -1365,7 +1366,7 @@ const Kr = ({ property: r, onChange: s }) => {
1365
1366
  const l = r.match(o), d = l && l.length > 1, a = !m(t) && Number.isNaN(Number(t));
1366
1367
  return d || a ? { error: "Invalid value" } : l && (l[0] === "auto" || l[0] === "none") ? { value: l[0], unit: "" } : { value: t, unit: l ? l[0] : "" };
1367
1368
  };
1368
- const Qr = (r) => {
1369
+ const tl = (r) => {
1369
1370
  const s = r.startsWith("-") ? "-" : "", t = r.split("-").pop();
1370
1371
  if (["auto", "none"].includes(t))
1371
1372
  return { value: "", unit: t };
@@ -1494,18 +1495,18 @@ const Qr = (r) => {
1494
1495
  }
1495
1496
  return vt(parseFloat(t)) ? { value: `${s + parseFloat(t) * 4}`, unit: "px" } : { value: t, unit: "class" };
1496
1497
  };
1497
- const el = (r) => {
1498
+ const rl = (r) => {
1498
1499
  if (m(r))
1499
1500
  return { value: "", unit: "" };
1500
1501
  const s = r.match(/\[.*\]/g);
1501
1502
  if (s === null)
1502
- return tl(r);
1503
+ return ll(r);
1503
1504
  const t = x(s, "0", "").replace(/\[|\]/g, ""), o = r.startsWith("-") ? "-" : "", l = ue(t.match(/\d+.\d+|\d+/g));
1504
1505
  return { value: `${o}${l}`, unit: t.replace(l, "") };
1505
- }, tl = (r) => m(r) ? { value: "", unit: "" } : Qr(r), nt = $.createContext({
1506
+ }, ll = (r) => m(r) ? { value: "", unit: "" } : tl(r), nt = I.createContext({
1506
1507
  setDragData: () => {
1507
1508
  }
1508
- }), rl = ({
1509
+ }), sl = ({
1509
1510
  unit: r,
1510
1511
  currentValue: s,
1511
1512
  onDrag: t,
@@ -1534,10 +1535,10 @@ const el = (r) => {
1534
1535
  },
1535
1536
  color: void 0,
1536
1537
  className: "relative z-50 ml-1 hidden h-6 cursor-row-resize rounded bg-background/70 px-2 group-hover:inline",
1537
- children: /* @__PURE__ */ e.jsx(Et, {})
1538
+ children: /* @__PURE__ */ e.jsx(Lt, {})
1538
1539
  }
1539
1540
  );
1540
- }, ll = ({ 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((o) => /* @__PURE__ */ e.jsx(
1541
+ }, ol = ({ 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((o) => /* @__PURE__ */ e.jsx(
1541
1542
  xe,
1542
1543
  {
1543
1544
  className: "h-max rounded-none px-1 py-1 text-right text-[11px] hover:bg-blue-400",
@@ -1549,17 +1550,17 @@ const el = (r) => {
1549
1550
  children: o
1550
1551
  },
1551
1552
  o
1552
- )) }), Le = 50, sl = (r) => {
1553
- const [s, t] = j(!1), [o, l] = j(""), { currentClass: d, onChange: a, classPrefix: c, cssProperty: i, units: p, negative: y } = r, [n, h] = j(i != null && i.toLowerCase().includes("width") ? "%" : p[0]), [g, u] = j(!1), [f, k] = j(""), [L, w] = j(!1), [I, E] = j(!1);
1554
- M(() => {
1555
- const { value: b, unit: v } = el(d);
1553
+ )) }), Ee = 50, al = (r) => {
1554
+ const [s, t] = j(!1), [o, l] = j(""), { currentClass: d, onChange: a, classPrefix: c, cssProperty: i, units: p, negative: y } = r, [n, h] = j(i != null && i.toLowerCase().includes("width") ? "%" : p[0]), [g, u] = j(!1), [f, k] = j(""), [E, w] = j(!1), [$, L] = j(!1);
1555
+ O(() => {
1556
+ const { value: b, unit: v } = rl(d);
1556
1557
  if (v === "") {
1557
1558
  l(b), h(i != null && i.toLowerCase().includes("width") ? "%" : ue(p));
1558
1559
  return;
1559
1560
  }
1560
1561
  h(v), l(v === "class" || m(b) ? "" : b);
1561
1562
  }, [d, i, p]);
1562
- const N = fe((b) => a(b), [a], Le), D = fe((b) => a(b, !1), [a], Le), z = B(
1563
+ const N = fe((b) => a(b), [a], Ee), D = fe((b) => a(b, !1), [a], Ee), X = B(
1563
1564
  (b = !1) => {
1564
1565
  const v = Pe(`${o}`, p);
1565
1566
  if (x(v, "error", !1)) {
@@ -1598,32 +1599,32 @@ const el = (r) => {
1598
1599
  return /* @__PURE__ */ e.jsx("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-start", children: n === "class" ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1599
1600
  /* @__PURE__ */ e.jsx("input", { className: "w-20 rounded py-1", readOnly: !0, value: d }),
1600
1601
  /* @__PURE__ */ e.jsxs(F, { children: [
1601
- /* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsx("button", { type: "button", className: "invisible ml-3 mt-1 text-blue-600 group-hover:visible", children: /* @__PURE__ */ e.jsx(_e, {}) }) }),
1602
+ /* @__PURE__ */ e.jsx(z, { asChild: !0, children: /* @__PURE__ */ e.jsx("button", { type: "button", className: "invisible ml-3 mt-1 text-blue-600 group-hover:visible", children: /* @__PURE__ */ e.jsx(_e, {}) }) }),
1602
1603
  /* @__PURE__ */ e.jsx(Z, { children: "Current value is using a Tailwind preset class." })
1603
1604
  ] })
1604
- ] }) : /* @__PURE__ */ e.jsxs("div", { className: `group relative flex items-center ${L ? "z-auto" : ""}`, children: [
1605
+ ] }) : /* @__PURE__ */ e.jsxs("div", { className: `group relative flex items-center ${E ? "z-auto" : ""}`, children: [
1605
1606
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center rounded-md border border-border", children: [
1606
1607
  ["none", "auto"].indexOf(n) !== -1 ? null : /* @__PURE__ */ e.jsx(
1607
1608
  "input",
1608
1609
  {
1609
1610
  readOnly: n === "class",
1610
1611
  onKeyPress: (b) => {
1611
- b.key === "Enter" && z();
1612
+ b.key === "Enter" && X();
1612
1613
  },
1613
1614
  onKeyDown: (b) => {
1614
1615
  if (b.keyCode !== 38 && b.keyCode !== 40)
1615
1616
  return;
1616
- b.preventDefault(), E(!0);
1617
+ b.preventDefault(), L(!0);
1617
1618
  const v = wt(b.target.value);
1618
- let S = ze(v) ? 0 : v;
1619
+ let S = Xe(v) ? 0 : v;
1619
1620
  b.keyCode === 38 && (S += 1), b.keyCode === 40 && (S -= 1);
1620
- const O = `${S}`, dt = `${O.startsWith("-") ? "-" : ""}${c}[${O.replace("-", "")}${n === "-" ? "" : n}]`;
1621
+ const M = `${S}`, dt = `${M.startsWith("-") ? "-" : ""}${c}[${M.replace("-", "")}${n === "-" ? "" : n}]`;
1621
1622
  D(dt);
1622
1623
  },
1623
1624
  onKeyUp: (b) => {
1624
- I && (b.preventDefault(), E(!1));
1625
+ $ && (b.preventDefault(), L(!1));
1625
1626
  },
1626
- onBlur: () => z(),
1627
+ onBlur: () => X(),
1627
1628
  onChange: (b) => {
1628
1629
  u(!1), l(b.target.value);
1629
1630
  },
@@ -1631,7 +1632,7 @@ const el = (r) => {
1631
1632
  var v;
1632
1633
  (v = b == null ? void 0 : b.target) == null || v.select(), t(!1);
1633
1634
  },
1634
- value: L ? f : o,
1635
+ value: E ? f : o,
1635
1636
  className: "h-6 w-14 rounded rounded-r-none bg-background pl-2 text-sm focus-visible:outline-0 ".concat(
1636
1637
  " ",
1637
1638
  g ? "border-red-500 text-red-500" : "border-foreground/20"
@@ -1639,7 +1640,7 @@ const el = (r) => {
1639
1640
  }
1640
1641
  ),
1641
1642
  /* @__PURE__ */ e.jsxs(F, { open: s, delayDuration: 100, children: [
1642
- /* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
1643
+ /* @__PURE__ */ e.jsx(z, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
1643
1644
  "button",
1644
1645
  {
1645
1646
  type: "button",
@@ -1647,12 +1648,12 @@ const el = (r) => {
1647
1648
  className: "flex h-6 cursor-pointer items-center gap-x-1 rounded rounded-l-none bg-background p-px px-1 text-[11px] uppercase",
1648
1649
  children: [
1649
1650
  /* @__PURE__ */ e.jsx("span", { className: `inline-block ${p.length === 1 ? "px-2 font-semibold" : ""}`, children: n }),
1650
- p.length > 1 ? /* @__PURE__ */ e.jsx(Ot, {}) : null
1651
+ p.length > 1 ? /* @__PURE__ */ e.jsx(Mt, {}) : null
1651
1652
  ]
1652
1653
  }
1653
1654
  ) }),
1654
1655
  /* @__PURE__ */ e.jsx(xr, { children: /* @__PURE__ */ e.jsx(Z, { className: "bg-background", children: /* @__PURE__ */ e.jsx(
1655
- ll,
1656
+ ol,
1656
1657
  {
1657
1658
  units: p,
1658
1659
  current: n,
@@ -1663,22 +1664,22 @@ const el = (r) => {
1663
1664
  ) }) })
1664
1665
  ] })
1665
1666
  ] }),
1666
- ["none", "auto"].indexOf(n) !== -1 || L ? null : /* @__PURE__ */ e.jsx(
1667
- rl,
1667
+ ["none", "auto"].indexOf(n) !== -1 || E ? null : /* @__PURE__ */ e.jsx(
1668
+ sl,
1668
1669
  {
1669
1670
  onDragStart: () => w(!0),
1670
1671
  onDragEnd: (b) => {
1671
1672
  if (k(() => ""), w(!1), m(b))
1672
1673
  return;
1673
- const v = `${b}`, O = `${v.startsWith("-") ? "-" : ""}${c}[${v.replace("-", "")}${n === "-" ? "" : n}]`;
1674
- N(O);
1674
+ const v = `${b}`, M = `${v.startsWith("-") ? "-" : ""}${c}[${v.replace("-", "")}${n === "-" ? "" : n}]`;
1675
+ N(M);
1675
1676
  },
1676
1677
  onDrag: (b) => {
1677
1678
  if (m(b))
1678
1679
  return;
1679
1680
  k(b);
1680
- const v = `${b}`, O = `${v.startsWith("-") ? "-" : ""}${c}[${v.replace("-", "")}${n === "-" ? "" : n}]`;
1681
- D(O);
1681
+ const v = `${b}`, M = `${v.startsWith("-") ? "-" : ""}${c}[${v.replace("-", "")}${n === "-" ? "" : n}]`;
1682
+ D(M);
1682
1683
  },
1683
1684
  currentValue: o,
1684
1685
  unit: n,
@@ -1690,7 +1691,7 @@ const el = (r) => {
1690
1691
  }, ae = (r) => {
1691
1692
  const s = ge();
1692
1693
  return jt(s, { property: r });
1693
- }, ol = (r, s) => {
1694
+ }, nl = (r, s) => {
1694
1695
  const t = {
1695
1696
  xs: 0,
1696
1697
  sm: 1,
@@ -1700,7 +1701,7 @@ const el = (r) => {
1700
1701
  "2xl": 5
1701
1702
  };
1702
1703
  return t[x(r, "mq", "xs")] <= t[s];
1703
- }, al = {
1704
+ }, il = {
1704
1705
  width: "w-",
1705
1706
  height: "h-",
1706
1707
  minWidth: "min-w-",
@@ -1766,32 +1767,32 @@ const el = (r) => {
1766
1767
  insetY: "inset-y-",
1767
1768
  opacity: "opacity-",
1768
1769
  flexBasis: "basis-"
1769
- }, Ee = {
1770
+ }, Le = {
1770
1771
  xs: "",
1771
1772
  sm: "640px",
1772
1773
  md: "768px",
1773
1774
  lg: "1024px",
1774
1775
  xl: "1280px",
1775
1776
  "2xl": "1536px"
1776
- }, nl = (r) => `${r.toUpperCase()} ${Ee[r] ? `(${Ee[r]} & up)` : ""}`, Re = (r) => {
1777
+ }, dl = (r) => `${r.toUpperCase()} ${Le[r] ? `(${Le[r]} & up)` : ""}`, Re = (r) => {
1777
1778
  const { t: s } = K(), { type: t = "icons", label: o, property: l, onEmitChange: d = () => {
1778
1779
  }, units: a, negative: c = !1 } = r, [i] = gr(), [p] = Qe(), [, y] = Be(), n = ae(l), h = qe(), g = Ge(), [u] = Je(), f = _(() => x(n, "fullCls", ""), [n]), k = B(
1779
- (D, z = !0) => {
1780
+ (D, X = !0) => {
1780
1781
  const G = { dark: i, mq: y, mod: p, cls: D, property: l, fullCls: "" };
1781
1782
  (i || p !== "") && (G.mq = "xs");
1782
- const b = Ir(G);
1783
- h(u, [b], z);
1783
+ const b = Er(G);
1784
+ h(u, [b], X);
1784
1785
  },
1785
1786
  [u, i, y, p, l, h]
1786
- ), L = B(() => {
1787
+ ), E = B(() => {
1787
1788
  g(u, [f]);
1788
- }, [u, f, g]), w = _(() => ol(n, y), [n, y]);
1789
- M(() => {
1789
+ }, [u, f, g]), w = _(() => nl(n, y), [n, y]);
1790
+ O(() => {
1790
1791
  d(w, n);
1791
1792
  }, [w, d, n]);
1792
- const [, , I] = Be(), E = B(
1793
+ const [, , $] = Be(), L = B(
1793
1794
  (D) => {
1794
- I({
1795
+ $({
1795
1796
  xs: 400,
1796
1797
  sm: 640,
1797
1798
  md: 800,
@@ -1800,30 +1801,30 @@ const el = (r) => {
1800
1801
  "2xl": 1920
1801
1802
  }[D]);
1802
1803
  },
1803
- [I]
1804
+ [$]
1804
1805
  ), N = x(n, "dark", null) === i && x(n, "mod", null) === p && x(n, "mq", null) === y;
1805
- return /* @__PURE__ */ e.jsx(Ur, { canChange: w, canReset: n && N, children: /* @__PURE__ */ e.jsxs("div", { className: "group flex flex-row items-center py-2 first:pt-0 last:pb-0", children: [
1806
+ return /* @__PURE__ */ e.jsx(qr, { canChange: w, canReset: n && N, children: /* @__PURE__ */ e.jsxs("div", { className: "group flex flex-row items-center py-2 first:pt-0 last:pb-0", children: [
1806
1807
  /* @__PURE__ */ e.jsx("div", { className: "relative w-[70px] truncate text-xs text-foreground", children: /* @__PURE__ */ e.jsx("span", { className: `text-[11px] ${n && !N ? "text-foreground" : ""}`, children: s(o) }) }),
1807
1808
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-row items-center", children: [
1808
1809
  /* @__PURE__ */ e.jsxs("div", { className: "w-[150px]", children: [
1809
1810
  t === "arbitrary" ? /* @__PURE__ */ e.jsx(
1810
- sl,
1811
+ al,
1811
1812
  {
1812
1813
  currentClass: x(n, "cls", ""),
1813
- classPrefix: x(al, l, ""),
1814
+ classPrefix: x(il, l, ""),
1814
1815
  units: a || [],
1815
1816
  onChange: k,
1816
1817
  negative: c,
1817
1818
  cssProperty: l
1818
1819
  }
1819
1820
  ) : null,
1820
- t === "icons" && /* @__PURE__ */ e.jsx(qr, { property: l, onChange: k }),
1821
- t === "range" && /* @__PURE__ */ e.jsx(Kr, { property: l, onChange: k }),
1822
- t === "color" && /* @__PURE__ */ e.jsx(Jr, { property: l, onChange: k }),
1821
+ t === "icons" && /* @__PURE__ */ e.jsx(Jr, { property: l, onChange: k }),
1822
+ t === "range" && /* @__PURE__ */ e.jsx(Gr, { property: l, onChange: k }),
1823
+ t === "color" && /* @__PURE__ */ e.jsx(el, { property: l, onChange: k }),
1823
1824
  t === "dropdown" && /* @__PURE__ */ e.jsx(at, { label: o, property: l, onChange: k })
1824
1825
  ] }),
1825
- /* @__PURE__ */ e.jsx("div", { className: `w-[30px] cursor-pointer ${f ? "visible" : "invisible"}`, children: N ? /* @__PURE__ */ e.jsx("button", { type: "button", onClick: () => L(), title: "Reset", className: "flex px-1.5 text-xs", children: /* @__PURE__ */ e.jsx(Mt, { className: "h-5 w-5 text-blue-500 hover:opacity-80" }) }) : w && n ? /* @__PURE__ */ e.jsxs(F, { delayDuration: 100, children: [
1826
- /* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsx(
1826
+ /* @__PURE__ */ e.jsx("div", { className: `w-[30px] cursor-pointer ${f ? "visible" : "invisible"}`, children: N ? /* @__PURE__ */ e.jsx("button", { type: "button", onClick: () => E(), title: "Reset", className: "flex px-1.5 text-xs", children: /* @__PURE__ */ e.jsx(Ot, { className: "h-5 w-5 text-blue-500 hover:opacity-80" }) }) : w && n ? /* @__PURE__ */ e.jsxs(F, { delayDuration: 100, children: [
1827
+ /* @__PURE__ */ e.jsx(z, { asChild: !0, children: /* @__PURE__ */ e.jsx(
1827
1828
  "button",
1828
1829
  {
1829
1830
  type: "button",
@@ -1834,7 +1835,7 @@ const el = (r) => {
1834
1835
  /* @__PURE__ */ e.jsx(Z, { children: /* @__PURE__ */ e.jsx("div", { className: "text-right", children: /* @__PURE__ */ e.jsxs("div", { children: [
1835
1836
  "Current style is set at  ",
1836
1837
  /* @__PURE__ */ e.jsxs("span", { className: "font-bold ", children: [
1837
- nl(x(n, "mq")),
1838
+ dl(x(n, "mq")),
1838
1839
  i && !n.dark ? "(Light mode)" : ""
1839
1840
  ] }),
1840
1841
  /* @__PURE__ */ e.jsx("br", {}),
@@ -1842,7 +1843,7 @@ const el = (r) => {
1842
1843
  "button",
1843
1844
  {
1844
1845
  type: "button",
1845
- onClick: () => E(x(n, "mq")),
1846
+ onClick: () => L(x(n, "mq")),
1846
1847
  className: "block w-full cursor-default text-right font-semibold text-blue-500",
1847
1848
  children: [
1848
1849
  "Switch to ",
@@ -1854,13 +1855,13 @@ const el = (r) => {
1854
1855
  ] }) : null })
1855
1856
  ] })
1856
1857
  ] }) });
1857
- }, il = ["px", "%", "em", "rem", "ch", "vh", "vw"], it = ({
1858
+ }, cl = ["px", "%", "em", "rem", "ch", "vh", "vw"], it = ({
1858
1859
  label: r,
1859
1860
  options: s,
1860
1861
  borderB: t = !1,
1861
1862
  borderT: o = !1,
1862
1863
  type: l = "arbitrary",
1863
- units: d = il,
1864
+ units: d = cl,
1864
1865
  negative: a = !1
1865
1866
  }) => {
1866
1867
  const { t: c } = K(), [i, p] = j(s[0].key), y = ge(), n = B((h) => C(y, "property").includes(h), [y]);
@@ -1871,19 +1872,19 @@ const el = (r) => {
1871
1872
  children: [
1872
1873
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-row text-xs", children: [
1873
1874
  r && /* @__PURE__ */ e.jsx("span", { className: "relative w-[70px] flex-none text-xs text-foreground", children: c(r) }),
1874
- /* @__PURE__ */ e.jsx("div", { className: "mb-3 flex grow flex-row flex-wrap gap-x-px", children: $.Children.toArray(
1875
+ /* @__PURE__ */ e.jsx("div", { className: "mb-3 flex grow flex-row flex-wrap gap-x-px", children: I.Children.toArray(
1875
1876
  s.map(({ label: h, key: g }) => /* @__PURE__ */ e.jsx("div", { className: "first:rounded-l last:rounded-r", children: /* @__PURE__ */ e.jsxs(F, { children: [
1876
- /* @__PURE__ */ e.jsx(X, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
1877
+ /* @__PURE__ */ e.jsx(z, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
1877
1878
  "button",
1878
1879
  {
1879
1880
  type: "button",
1880
1881
  onClick: () => p(g),
1881
1882
  className: `relative cursor-pointer rounded-full p-1 text-[8px] ${g === i ? " bg-[#3E57F0] text-white" : "text-gray-600 dark:text-gray-300"}`,
1882
1883
  children: [
1883
- $.createElement("div", {
1884
+ I.createElement("div", {
1884
1885
  className: n(g) ? "-bottom-1.5 absolute bg-[#3E57F0] h-[2px] left-0 w-full" : ""
1885
1886
  }),
1886
- $.createElement(x(ot, g, Xe), { className: "text-inherit w-3 h-3" })
1887
+ I.createElement(x(ot, g, ze), { className: "text-inherit w-3 h-3" })
1887
1888
  ]
1888
1889
  }
1889
1890
  ) }),
@@ -1904,7 +1905,7 @@ const el = (r) => {
1904
1905
  ]
1905
1906
  }
1906
1907
  );
1907
- }, dl = ({ heading: r, items: s }) => {
1908
+ }, pl = ({ heading: r, items: s }) => {
1908
1909
  const { t } = K(), o = ge(), l = _(() => {
1909
1910
  const d = (i) => U(
1910
1911
  i.map((p) => p.styleType === "multiple" ? C(p.options, "key") : p.property)
@@ -1925,7 +1926,7 @@ const el = (r) => {
1925
1926
  ] }) }),
1926
1927
  /* @__PURE__ */ e.jsx("div", { className: "p-2", children: s.map((d) => d.styleType === "multiple" ? /* @__PURE__ */ e.jsx(it, { ...d }, d.label) : /* @__PURE__ */ e.jsx(Re, { ...d }, d.label)) })
1927
1928
  ] });
1928
- }, cl = Oe({}), me = ({ section: r }) => {
1929
+ }, ul = Me({}), me = ({ section: r }) => {
1929
1930
  const { t: s } = K(), t = ge(), o = B(
1930
1931
  (a = []) => {
1931
1932
  const c = {};
@@ -1950,16 +1951,16 @@ const el = (r) => {
1950
1951
  ), i = C(t, "property");
1951
1952
  return Ye(c, i).length > 0;
1952
1953
  }, [t, r.heading, r.items]), d = _(() => ({}), []);
1953
- return /* @__PURE__ */ e.jsx(cl.Provider, { value: d, children: /* @__PURE__ */ e.jsxs(de, { value: r.heading, children: [
1954
+ return /* @__PURE__ */ e.jsx(ul.Provider, { value: d, children: /* @__PURE__ */ e.jsxs(de, { value: r.heading, children: [
1954
1955
  /* @__PURE__ */ e.jsx(ce, { className: "px-3 py-2 text-xs hover:no-underline", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
1955
1956
  /* @__PURE__ */ e.jsx("div", { className: `h-[8px] w-[8px] rounded-full ${l ? "bg-blue-500" : "bg-gray-300"}` }),
1956
1957
  s(r.heading)
1957
1958
  ] }) }),
1958
- /* @__PURE__ */ e.jsx(pe, { className: "bg-gray-100 px-3.5 py-2", children: $.Children.toArray(
1959
- r.items.map((a) => ye(a, "component") ? $.createElement(a.component, { key: a.label }) : ye(a, "styleType") ? a.styleType === "multiple" ? /* @__PURE__ */ e.jsx(it, { ...a }, a.label) : a.styleType === "accordion" && o(a == null ? void 0 : a.conditions) ? /* @__PURE__ */ e.jsx(dl, { ...a }, a.label) : null : /* @__PURE__ */ e.jsx(Re, { ...a }, a.label))
1959
+ /* @__PURE__ */ e.jsx(pe, { className: "bg-gray-100 px-3.5 py-2", children: I.Children.toArray(
1960
+ r.items.map((a) => ye(a, "component") ? I.createElement(a.component, { key: a.label }) : ye(a, "styleType") ? a.styleType === "multiple" ? /* @__PURE__ */ e.jsx(it, { ...a }, a.label) : a.styleType === "accordion" && o(a == null ? void 0 : a.conditions) ? /* @__PURE__ */ e.jsx(pl, { ...a }, a.label) : null : /* @__PURE__ */ e.jsx(Re, { ...a }, a.label))
1960
1961
  ) })
1961
1962
  ] }) });
1962
- }, pl = ({
1963
+ }, xl = ({
1963
1964
  item: r,
1964
1965
  index: s,
1965
1966
  canDelete: t,
@@ -1992,14 +1993,14 @@ const el = (r) => {
1992
1993
  }
1993
1994
  ),
1994
1995
  /* @__PURE__ */ e.jsx(
1995
- zt,
1996
+ Xt,
1996
1997
  {
1997
1998
  onClick: l,
1998
1999
  className: "h-6 w-6 cursor-pointer rounded border border-red-400 p-1 text-red-400 hover:opacity-80"
1999
2000
  }
2000
2001
  )
2001
2002
  ] })
2002
- ] }), ul = ({ section: r }) => {
2003
+ ] }), gl = ({ section: r }) => {
2003
2004
  var h;
2004
2005
  const { setSyncState: s } = hr(), t = q(), [o, l] = j([]), [d] = Se(), a = Ue(), c = `${x(d, "0.prop")}_attrs`;
2005
2006
  ne.useEffect(() => {
@@ -2016,7 +2017,7 @@ const el = (r) => {
2016
2017
  (g = []) => {
2017
2018
  const u = {};
2018
2019
  ke(g, (f) => {
2019
- m(f.key) || Me(u, f.key, f.value);
2020
+ m(f.key) || Oe(u, f.key, f.value);
2020
2021
  }), a([x(t, "_id")], { [c]: u }), s("UNSAVED");
2021
2022
  },
2022
2023
  [t, s, a, c]
@@ -2055,7 +2056,7 @@ const el = (r) => {
2055
2056
  C(o, (g, u) => {
2056
2057
  const f = o.length > 0 && u < o.length - 1;
2057
2058
  return /* @__PURE__ */ e.jsx(
2058
- pl,
2059
+ xl,
2059
2060
  {
2060
2061
  item: g,
2061
2062
  index: u,
@@ -2070,8 +2071,8 @@ const el = (r) => {
2070
2071
  ] }) })
2071
2072
  ] });
2072
2073
  };
2073
- function xl() {
2074
- const [r, s] = Qe(), { flexChild: t, gridChild: o } = yr(), [, l] = Hr(br), { t: d } = K(), [a] = Se();
2074
+ function hl() {
2075
+ const [r, s] = Qe(), { flexChild: t, gridChild: o } = yr(), [, l] = $r(br), { t: d } = K(), [a] = Se();
2075
2076
  return m(a) ? /* @__PURE__ */ e.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 rounded-xl p-4", children: [
2076
2077
  /* @__PURE__ */ e.jsx(Ze, { className: "mx-auto text-3xl" }),
2077
2078
  /* @__PURE__ */ e.jsx("h1", { children: d("no_styling_block_selected") }),
@@ -2105,15 +2106,15 @@ function xl() {
2105
2106
  ] })
2106
2107
  ] }) }),
2107
2108
  /* @__PURE__ */ e.jsx(et, { className: "no-scrollbar -mx-1 flex-1 max-h-full overflow-y-hidden overflow-x-hidden", children: /* @__PURE__ */ e.jsxs(Ke, { defaultValue: ["Layout"], type: "multiple", className: "w-full", children: [
2108
- t && /* @__PURE__ */ e.jsx(me, { section: Xr }),
2109
- o ? /* @__PURE__ */ e.jsx(me, { section: Zr }) : null,
2110
- Wr.map((c) => /* @__PURE__ */ e.jsx(me, { section: c }, c.heading)),
2111
- /* @__PURE__ */ e.jsx(ul, { section: { heading: "Attributes" } })
2109
+ t && /* @__PURE__ */ e.jsx(me, { section: Wr }),
2110
+ o ? /* @__PURE__ */ e.jsx(me, { section: Ur }) : null,
2111
+ Kr.map((c) => /* @__PURE__ */ e.jsx(me, { section: c }, c.heading)),
2112
+ /* @__PURE__ */ e.jsx(gl, { section: { heading: "Attributes" } })
2112
2113
  ] }) })
2113
2114
  ] })
2114
2115
  );
2115
2116
  }
2116
- const gl = {
2117
+ const yl = {
2117
2118
  px: 1,
2118
2119
  "%": 1,
2119
2120
  em: 100,
@@ -2124,8 +2125,8 @@ const gl = {
2124
2125
  "-": 1,
2125
2126
  deg: 1,
2126
2127
  ms: 0.1
2127
- }, vs = () => {
2128
- const r = q(), { t: s } = K(), [t, o] = $.useState(""), [l, d] = $.useState({
2128
+ }, Cs = () => {
2129
+ const r = q(), { t: s } = K(), [t, o] = I.useState(""), [l, d] = I.useState({
2129
2130
  onDrag: (i) => i,
2130
2131
  onDragEnd: (i) => i,
2131
2132
  dragStartY: 0,
@@ -2138,8 +2139,8 @@ const gl = {
2138
2139
  (i) => {
2139
2140
  const p = !x(l, "negative", !1), y = x(l, "cssProperty", "");
2140
2141
  let n = parseFloat(l.dragStartValue);
2141
- n = ze(n) ? 0 : n;
2142
- let h = gl[l.dragUnit];
2142
+ n = Xe(n) ? 0 : n;
2143
+ let h = yl[l.dragUnit];
2143
2144
  (W(y, "scale") || y === "opacity") && (h = 10);
2144
2145
  let u = (l.dragStartY - i.pageY) / h + n;
2145
2146
  p && u < 0 && (u = 0), y === "opacity" && u > 1 && (u = 1), l.onDrag(`${u}`), o(`${u}`);
@@ -2180,13 +2181,13 @@ const gl = {
2180
2181
  {
2181
2182
  value: "settings",
2182
2183
  className: "no-scrollbar -mx-1 -mr-2 h-full flex-1 overflow-y-auto overflow-x-hidden",
2183
- children: /* @__PURE__ */ e.jsx(et, { className: "no-scrollbar -mx-1 pb-5 flex-1 max-h-full overflow-y-hidden overflow-x-hidden", children: /* @__PURE__ */ e.jsx(Yr, {}) })
2184
+ children: /* @__PURE__ */ e.jsx(et, { className: "no-scrollbar -mx-1 pb-5 flex-1 max-h-full overflow-y-hidden overflow-x-hidden", children: /* @__PURE__ */ e.jsx(zr, {}) })
2184
2185
  }
2185
2186
  ),
2186
- /* @__PURE__ */ e.jsx($e, { value: "styling", className: "flex-1 h-full overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(xl, {}) })
2187
+ /* @__PURE__ */ e.jsx($e, { value: "styling", className: "flex-1 h-full overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(hl, {}) })
2187
2188
  ] })
2188
2189
  ] }) });
2189
2190
  };
2190
2191
  export {
2191
- vs as default
2192
+ Cs as default
2192
2193
  };