@chaibuilder/sdk 1.2.10 → 1.2.12

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 (98) hide show
  1. package/README.md +10 -12
  2. package/dist/AddBlocks-ByeMUUzE.js +218 -0
  3. package/dist/AddBlocks-nMUkm4og.cjs +1 -0
  4. package/dist/{BrandingOptions-10jJO8mG.js → BrandingOptions--poS5shs.js} +18 -21
  5. package/dist/BrandingOptions-eeDfvB0R.cjs +1 -0
  6. package/dist/{CanvasArea-jgBDM5Qd.js → CanvasArea--TKubnIM.js} +184 -185
  7. package/dist/{CanvasArea-6O8dMPug.cjs → CanvasArea-h4lA4oqP.cjs} +4 -4
  8. package/dist/{utils-AvyFzbPC.js → Class-17XFhL48.js} +15 -16
  9. package/dist/Class-5ARpH_Tu.cjs +1 -0
  10. package/dist/CurrentPage-B3YumhrX.cjs +1 -0
  11. package/dist/{CurrentPage-lakeZviD.js → CurrentPage-Gw9LJ40j.js} +24 -25
  12. package/dist/Layers-4r_4F6ST.cjs +1 -0
  13. package/dist/{Layers-R7TfREUd.js → Layers-d-xge4On.js} +77 -78
  14. package/dist/{PagesPanel-4mqxCFHq.js → PagesPanel-E4wSgVcE.js} +14 -15
  15. package/dist/PagesPanel-iZLDBwXQ.cjs +1 -0
  16. package/dist/ProjectPanel-2TcqGnfN.cjs +1 -0
  17. package/dist/{ProjectPanel-Wy2nw-1w.js → ProjectPanel-q7upaf7h.js} +17 -18
  18. package/dist/Settings-NuDNH2dR.cjs +1 -0
  19. package/dist/{Settings-_K28Ontt.js → Settings-y3DHsT88.js} +163 -164
  20. package/dist/SidePanels-91l1CjYv.cjs +1 -0
  21. package/dist/{SidePanels-6slnxdSj.js → SidePanels-BK_QnEh9.js} +40 -41
  22. package/dist/{Topbar-bwt6HjlL.js → Topbar-b7jnOD57.js} +16 -17
  23. package/dist/Topbar-rEO5z57t.cjs +1 -0
  24. package/dist/{UnsplashImages-V29UE-57.js → UnsplashImages-Lb78FYx7.js} +27 -28
  25. package/dist/UnsplashImages-p-WdKs3b.cjs +1 -0
  26. package/dist/{UploadImages-E0mi_qn8.js → UploadImages-aWG_1r7N.js} +23 -24
  27. package/dist/UploadImages-zk-IYDx8.cjs +1 -0
  28. package/dist/{add-page-modal-FJEAqfD3.js → add-page-modal-7djj9GZj.js} +28 -29
  29. package/dist/add-page-modal-iUffBbAe.cjs +1 -0
  30. package/dist/{confirm-alert-5hfE116f.js → confirm-alert-QuqMrpWn.js} +12 -13
  31. package/dist/confirm-alert-i3FRAgP4.cjs +1 -0
  32. package/dist/core.cjs +1 -1
  33. package/dist/core.d.ts +9 -50
  34. package/dist/core.js +47 -56
  35. package/dist/defaultTheme-IH19g4fv.cjs +1 -0
  36. package/dist/defaultTheme-YY8mlQS3.js +1055 -0
  37. package/dist/{delete-page-modal-wH0yLiQI.js → delete-page-modal-DEBiprds.js} +14 -15
  38. package/dist/delete-page-modal-RllDrgxs.cjs +1 -0
  39. package/dist/email-blocks.cjs +1 -1
  40. package/dist/email-blocks.js +100 -81
  41. package/dist/email.cjs +1 -0
  42. package/dist/email.d.ts +116 -0
  43. package/dist/email.js +79 -0
  44. package/dist/{controls-XPXGHKht.js → empty-slot-MWycClTb.js} +61 -50
  45. package/dist/empty-slot-TF2kd-0X.cjs +1 -0
  46. package/dist/{form-UVHCD9N3.js → form-94xR0NG8.js} +1 -1
  47. package/dist/{form-1j01gADS.cjs → form-yz7h2msc.cjs} +1 -1
  48. package/dist/{index-B4sL0YTN.js → index-0m8Zuv5X.js} +1434 -1552
  49. package/dist/{index-c2VLKuhY.js → index-19nTm_cE.js} +2069 -2059
  50. package/dist/index-TEfD-2ti.cjs +1 -0
  51. package/dist/{index-xbQL0wpz.cjs → index-XVud0HL8.cjs} +33 -33
  52. package/dist/lib.cjs +3 -3
  53. package/dist/lib.js +95 -1125
  54. package/dist/page-viewer-_ktv1pgX.cjs +1 -0
  55. package/dist/{page-viewer-TcK0I240.js → page-viewer-xPLhXv6k.js} +16 -17
  56. package/dist/{project-general-setting-4ruKl033.js → project-general-setting-XlORLtqJ.js} +15 -16
  57. package/dist/project-general-setting-nULU3Tzw.cjs +1 -0
  58. package/dist/project-seo-setting-9QkARPhg.cjs +1 -0
  59. package/dist/{project-seo-setting-d1EZlacB.js → project-seo-setting-KQkeHwny.js} +14 -15
  60. package/dist/render.cjs +1 -1
  61. package/dist/render.d.ts +2 -0
  62. package/dist/render.js +111 -70
  63. package/dist/single-page-detail-Gb6O3Yyw.cjs +1 -0
  64. package/dist/{single-page-detail-PihQi-dP.js → single-page-detail-gtVN9hxR.js} +44 -45
  65. package/dist/studio.cjs +1 -1
  66. package/dist/studio.js +13 -14
  67. package/dist/ui.cjs +1 -1
  68. package/dist/ui.d.ts +3 -3
  69. package/dist/ui.js +138 -139
  70. package/dist/{useAddBlockByDrop-nLzs79He.cjs → useAddBlockByDrop-GU5QLPtz.cjs} +1 -1
  71. package/dist/{useAddBlockByDrop-rcDR-z9_.js → useAddBlockByDrop-b5KJh_7w.js} +1 -1
  72. package/dist/web-blocks.cjs +1 -1
  73. package/dist/web-blocks.js +313 -322
  74. package/package.json +8 -2
  75. package/dist/AddBlocks-GiMnBMeQ.js +0 -224
  76. package/dist/AddBlocks-SzURo9Bj.cjs +0 -1
  77. package/dist/BrandingOptions-yK-54R-c.cjs +0 -1
  78. package/dist/CurrentPage-1y62Ne77.cjs +0 -1
  79. package/dist/Layers-Z4nmm9xK.cjs +0 -1
  80. package/dist/PagesPanel-ouHdxyOH.cjs +0 -1
  81. package/dist/ProjectPanel-hHolYZjt.cjs +0 -1
  82. package/dist/Settings-EYOw02iE.cjs +0 -1
  83. package/dist/SidePanels-U-_O1QN8.cjs +0 -1
  84. package/dist/Topbar-dQEoY2P8.cjs +0 -1
  85. package/dist/UnsplashImages-pGgaUPQy.cjs +0 -1
  86. package/dist/UploadImages-7oLycdSh.cjs +0 -1
  87. package/dist/add-page-modal-In6XI-vZ.cjs +0 -1
  88. package/dist/confirm-alert-Vwd3OzL9.cjs +0 -1
  89. package/dist/controls-Dy1qa8Dc.cjs +0 -1
  90. package/dist/delete-page-modal-tl7FLK9J.cjs +0 -1
  91. package/dist/functions-Ox_svtKm.cjs +0 -1
  92. package/dist/functions-xIebp8Aw.js +0 -23
  93. package/dist/index-7ogwGh39.cjs +0 -1
  94. package/dist/page-viewer-SfQUe0SI.cjs +0 -1
  95. package/dist/project-general-setting-t7E2Y_w9.cjs +0 -1
  96. package/dist/project-seo-setting-4b_BJZDF.cjs +0 -1
  97. package/dist/single-page-detail-KuXd9Mur.cjs +0 -1
  98. package/dist/utils-PTxFk6qT.cjs +0 -1
@@ -1,24 +1,28 @@
1
1
  import { j as e } from "./jsx-runtime-WbnYoNE9.js";
2
2
  import * as ne from "react";
3
- import $, { useState as C, useMemo as _, useEffect as O, useCallback as V, memo as dt, createContext as Me, useContext as se } from "react";
3
+ import P, { useState as C, useMemo as _, useEffect as O, useCallback as V, memo as dt, createContext as Me, useContext as se } from "react";
4
4
  import { useThrottledCallback as fe } from "@react-hookz/web";
5
- import { forEach as ke, isArray as ie, omit as ct, truncate as pt, includes as E, get as x, first as ue, split as ut, startCase as Y, toLower as le, isEmpty as f, map as k, find as xt, last as ve, filter as we, set as Oe, debounce as gt, keys as ht, cloneDeep as yt, each as bt, capitalize as mt, reject as ft, nth as Ve, startsWith as W, isNumber as vt, parseInt as wt, isNaN as Fe, findLast as jt, flatten as U, intersection as Ye, has as ye, isNull as Ct } from "lodash-es";
5
+ import { forEach as ke, isArray as ie, omit as ct, truncate as pt, includes as E, get as x, first as ue, split as ut, startCase as Y, toLower as le, isEmpty as f, map as k, find as xt, last as ve, filter as we, set as Oe, debounce as gt, keys as ht, cloneDeep as yt, each as mt, capitalize as bt, reject as ft, nth as Ve, startsWith as W, isNumber as vt, parseInt as wt, isNaN as Fe, findLast as jt, flatten as U, intersection as Ye, has as ye, isNull as Ct } from "lodash-es";
6
6
  import { useTranslation as K } from "react-i18next";
7
- import { PlusIcon as Ne, Cross2Icon as Xe, EyeOpenIcon as kt, EyeClosedIcon as He, BorderAllIcon as A, WidthIcon as T, HeightIcon as R, ArrowUpIcon as Q, ArrowRightIcon as ee, ArrowDownIcon as te, ArrowLeftIcon as re, ArrowTopLeftIcon as Nt, ArrowTopRightIcon as _t, ArrowBottomRightIcon as St, ArrowBottomLeftIcon as Tt, AlignLeftIcon as Rt, AlignCenterHorizontallyIcon as Vt, AlignRightIcon as Ht, StretchHorizontallyIcon as Bt, FontItalicIcon as Dt, UnderlineIcon as It, OverlineIcon as Pt, LetterCaseUppercaseIcon as $t, Cross1Icon as At, InfoCircledIcon as _e, MinusIcon as Et, BoxIcon as ze, RowSpacingIcon as Lt, TriangleDownIcon as Mt, CrossCircledIcon as Ot, TrashIcon as Ft, MixerHorizontalIcon as Ze } from "@radix-ui/react-icons";
8
- import { b0 as Yt, b1 as Xt, B as xe, b2 as zt, b3 as Zt, b4 as Wt, b5 as Ut, b6 as Kt, b7 as qt, b8 as Gt, a7 as q, ao as Jt, ap as Qt, aq as er, b9 as tr, am as rr, ba as lr, an as sr, aE as X, aF as z, aG as Z, bb as or, bc as ar, bd as nr, be as ir, bf as dr, bg as cr, ad as We, ac as pr, i as ur, bh as Ue, bi as de, bj as ce, bk as pe, ak as Se, M as Ke, a4 as qe, j as Ge, aI as Te, bl as xr, m as gr, bm as hr, a5 as ge, W as yr, aa as Je, P as Be, ah as br, ae as mr, bn as fr, as as vr, at as wr, au as jr, av as Cr, aw as H, bo as Qe, ay as kr, az as Nr, aA as De, aB as Ie } from "./index-B4sL0YTN.js";
9
- import { u as _r } from "./controls-XPXGHKht.js";
10
- import { Check as Sr, EditIcon as Tr, TrashIcon as Rr } from "lucide-react";
7
+ import { PlusIcon as Ne, Cross2Icon as Xe, EyeOpenIcon as kt, EyeClosedIcon as He, BorderAllIcon as A, WidthIcon as S, HeightIcon as R, ArrowUpIcon as Q, ArrowRightIcon as ee, ArrowDownIcon as te, ArrowLeftIcon as re, ArrowTopLeftIcon as Nt, ArrowTopRightIcon as _t, ArrowBottomRightIcon as Tt, ArrowBottomLeftIcon as St, AlignLeftIcon as Rt, AlignCenterHorizontallyIcon as Vt, AlignRightIcon as Ht, StretchHorizontallyIcon as Bt, FontItalicIcon as Dt, UnderlineIcon as $t, OverlineIcon as It, LetterCaseUppercaseIcon as Pt, Cross1Icon as At, InfoCircledIcon as _e, MinusIcon as Et, BoxIcon as ze, RowSpacingIcon as Lt, TriangleDownIcon as Mt, CrossCircledIcon as Ot, TrashIcon as Ft, MixerHorizontalIcon as Ze } from "@radix-ui/react-icons";
8
+ import { aT as Yt, aU as Xt, B as xe, aV as zt, aW as Zt, aX as Wt, aY as Ut, aZ as Kt, a_ as qt, a$ as Gt, a0 as q, af as Jt, ag as Qt, ah as er, b0 as tr, ad as rr, b1 as lr, ae as sr, av as X, aw as z, ax as Z, b2 as or, b3 as ar, b4 as nr, b5 as ir, b6 as dr, b7 as cr, a5 as We, a4 as pr, i as ur, b8 as Ue, b9 as de, ba as ce, bb as pe, ac as Te, L as Ke, Z as qe, j as Ge, az as Se, bc as xr, m as gr, bd as hr, _ as ge, U as yr, a3 as Je, M as Be, a9 as mr, a6 as br, be as fr, aj as vr, ak as wr, al as jr, am as Cr, an as H, bf as Qe, ap as kr, aq as Nr, ar as De, as as $e } from "./index-0m8Zuv5X.js";
9
+ import { u as _r } from "./empty-slot-MWycClTb.js";
10
+ import { Check as Tr, EditIcon as Sr, TrashIcon as Rr } from "lucide-react";
11
11
  import { getBlockComponent as et, getChaiDataProviders as Vr } from "@chaibuilder/runtime";
12
- import { E as tt, u as rt } from "./index-c2VLKuhY.js";
12
+ import { E as tt, u as rt } from "./index-19nTm_cE.js";
13
13
  import { J as Hr, a as Br, d as Dr } from "./index-e0c8PmRQ.js";
14
- import Ir from "@rjsf/core";
15
- import Pr from "@rjsf/validator-ajv8";
16
- import { useAtom as $r } from "jotai";
14
+ import $r from "@rjsf/core";
15
+ import Ir from "@rjsf/validator-ajv8";
16
+ import { useAtom as Pr } from "jotai";
17
17
  import Ar from "react-autosuggest";
18
18
  import Er from "fuse.js";
19
- import { A as Lr, C as he, g as Mr } from "./utils-AvyFzbPC.js";
19
+ import { A as Lr, C as he, g as Mr } from "./Class-17XFhL48.js";
20
20
  import { a as Or } from "./MODIFIERS-RiXS5Mn1.js";
21
21
  import "./_commonjsHelpers-UyOWmZb0.js";
22
+ import "./Functions-7jnEwJyw.js";
23
+ import "clsx";
24
+ import "tailwind-merge";
25
+ import "flat-to-nested";
22
26
  import "@radix-ui/react-toggle";
23
27
  import "class-variance-authority";
24
28
  import "@radix-ui/react-switch";
@@ -42,11 +46,6 @@ import "@radix-ui/react-context-menu";
42
46
  import "react-icons-picker";
43
47
  import "react-dom";
44
48
  import "react-quill";
45
- import "flat-to-nested";
46
- import "./Functions-7jnEwJyw.js";
47
- import "clsx";
48
- import "tailwind-merge";
49
- import "redux-undo";
50
49
  import "i18next";
51
50
  import "@floating-ui/react-dom";
52
51
  import "react-textarea-autosize";
@@ -91,7 +90,7 @@ const je = ({ data: r, fullView: o }) => {
91
90
  /* @__PURE__ */ e.jsx("span", { className: "font-medium text-gray-800/80", children: "Content: " }),
92
91
  r
93
92
  ] }) : /* @__PURE__ */ e.jsx("div", { className: "w-full overflow-hidden whitespace-nowrap text-[10px] leading-3 text-gray-800/50", children: pt(t === "object" ? JSON.stringify(r) : r, { length: 40 }) });
94
- }, Pe = ({
93
+ }, Ie = ({
95
94
  type: r,
96
95
  value: o = "",
97
96
  setValue: t,
@@ -136,12 +135,12 @@ const je = ({ data: r, fullView: o }) => {
136
135
  {
137
136
  value: p,
138
137
  className: `cursor-pointer ${y ? "flex items-center justify-between" : "flex flex-col items-start justify-start"}`,
139
- onSelect: (m) => {
140
- t(xt(g, (w) => w === m) || null), h(!1);
138
+ onSelect: (b) => {
139
+ t(xt(g, (w) => w === b) || null), h(!1);
141
140
  },
142
141
  children: [
143
142
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
144
- /* @__PURE__ */ e.jsx(Sr, { className: `h-4 w-4 text-green-500 ${o === p ? "" : "opacity-0"}` }),
143
+ /* @__PURE__ */ e.jsx(Tr, { className: `h-4 w-4 text-green-500 ${o === p ? "" : "opacity-0"}` }),
145
144
  p
146
145
  ] }),
147
146
  y ? /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx("span", { className: "rounded-full bg-purple-100 px-2 py-0.5 text-[10px] text-purple-500", children: Y(x(n, p, "")) }) }) : /* @__PURE__ */ e.jsx("div", { className: "pl-6", children: /* @__PURE__ */ e.jsx(je, { data: x(s, p) }) })
@@ -166,10 +165,10 @@ const je = ({ data: r, fullView: o }) => {
166
165
  if (f(g))
167
166
  return "";
168
167
  {
169
- const m = x(p === "PROP" ? n : u, g, "");
170
- if (ie(m))
168
+ const b = x(p === "PROP" ? n : u, g, "");
169
+ if (ie(b))
171
170
  return "list";
172
- const w = typeof m;
171
+ const w = typeof b;
173
172
  return w === "string" ? "text" : w === "object" ? "model" : w;
174
173
  }
175
174
  },
@@ -182,7 +181,7 @@ const je = ({ data: r, fullView: o }) => {
182
181
  ] }),
183
182
  /* @__PURE__ */ e.jsxs("div", { className: "relative flex flex-col gap-1", children: [
184
183
  /* @__PURE__ */ e.jsx(
185
- Pe,
184
+ Ie,
186
185
  {
187
186
  type: "PROP",
188
187
  isDisabled: !1,
@@ -200,7 +199,7 @@ const je = ({ data: r, fullView: o }) => {
200
199
  ),
201
200
  /* @__PURE__ */ e.jsx("div", { className: "h-2" }),
202
201
  /* @__PURE__ */ e.jsx(
203
- Pe,
202
+ Ie,
204
203
  {
205
204
  type: "PATH",
206
205
  isDisabled: f(l),
@@ -268,7 +267,7 @@ const je = ({ data: r, fullView: o }) => {
268
267
  /* @__PURE__ */ e.jsx("div", { className: "font-medium leading-5", children: r.value }),
269
268
  /* @__PURE__ */ e.jsx(je, { data: x(l, r.value, "") }),
270
269
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-end gap-x-2", children: [
271
- /* @__PURE__ */ e.jsx(lt, { editMode: !0, onAddBinding: o, appliedBindings: d, item: r, children: /* @__PURE__ */ e.jsx(Tr, { className: "mt-1 h-6 w-6 cursor-pointer rounded border border-blue-400 p-1 text-blue-400 duration-200 hover:scale-105 hover:bg-blue-400 hover:text-white" }) }),
270
+ /* @__PURE__ */ e.jsx(lt, { editMode: !0, onAddBinding: o, appliedBindings: d, item: r, children: /* @__PURE__ */ e.jsx(Sr, { 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
271
  /* @__PURE__ */ e.jsx(
273
272
  Rr,
274
273
  {
@@ -348,7 +347,7 @@ const je = ({ data: r, fullView: o }) => {
348
347
  c && /* @__PURE__ */ e.jsx(Z, { sideOffset: -55, className: "text-[11px]", children: f(s) ? "No data provider has been set up for this page." : "Complete last added data binding to add more" })
349
348
  ] })
350
349
  ] });
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 = dt(({ properties: r, formData: o, onChange: t }) => {
350
+ }, 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" }), me = dt(({ properties: r, formData: o, onChange: t }) => {
352
351
  const s = { type: "object", properties: {} }, l = {};
353
352
  return Object.keys(r).forEach((d) => {
354
353
  const a = r[d];
@@ -357,7 +356,7 @@ const je = ({ data: r, fullView: o }) => {
357
356
  const c = d;
358
357
  s.properties[c] = or(a), l[c] = ar(a);
359
358
  }), /* @__PURE__ */ e.jsx(
360
- Ir,
359
+ $r,
361
360
  {
362
361
  widgets: {
363
362
  binding: Zr,
@@ -371,7 +370,7 @@ const je = ({ data: r, fullView: o }) => {
371
370
  omitExtraData: !1,
372
371
  liveOmit: !1,
373
372
  liveValidate: !1,
374
- validator: Pr,
373
+ validator: Ir,
375
374
  uiSchema: l,
376
375
  schema: s,
377
376
  formData: o,
@@ -380,20 +379,20 @@ const je = ({ data: r, fullView: o }) => {
380
379
  );
381
380
  });
382
381
  function Wr() {
383
- const r = q(), o = We(), t = pr(), s = et(r._type), l = { ...r }, [d, a] = C(l), c = ur("dataBindingSupport", !1), n = ({ formData: p }, m, w) => {
384
- if (m) {
385
- const D = m.replace("root.", "");
382
+ const r = q(), o = We(), t = pr(), s = et(r._type), l = { ...r }, [d, a] = C(l), c = ur("dataBindingSupport", !1), n = ({ formData: p }, b, w) => {
383
+ if (b) {
384
+ const D = b.replace("root.", "");
386
385
  t([r._id], { [D]: x(p, D) }, w);
387
386
  }
388
387
  }, u = V(
389
- gt(({ formData: p }, m, w) => {
390
- n({ formData: p }, m, w), a(p);
388
+ gt(({ formData: p }, b, w) => {
389
+ n({ formData: p }, b, w), a(p);
391
390
  }, 1500),
392
391
  []
393
- ), y = ({ formData: p }, m) => {
394
- if (m) {
395
- const w = m.replace("root.", "");
396
- o([r._id], { [w]: x(p, w) }), u({ formData: p }, m, { [w]: x(d, w) });
392
+ ), y = ({ formData: p }, b) => {
393
+ if (b) {
394
+ const w = b.replace("root.", "");
395
+ o([r._id], { [w]: x(p, w) }), u({ formData: p }, b, { [w]: x(d, w) });
397
396
  }
398
397
  }, i = {
399
398
  _name: _r({
@@ -402,10 +401,10 @@ function Wr() {
402
401
  })
403
402
  }, h = ht(x(l, "_bindings", {})), g = _(() => {
404
403
  const p = yt(x(s, "props", {}));
405
- return c && bt(h, (m) => delete p[m]), p;
404
+ return c && mt(h, (b) => delete p[b]), p;
406
405
  }, [s, h, c]);
407
406
  return /* @__PURE__ */ e.jsxs("div", { className: "overflow-x-hidden", children: [
408
- /* @__PURE__ */ e.jsx(be, { onChange: y, formData: l, properties: i }),
407
+ /* @__PURE__ */ e.jsx(me, { onChange: y, formData: l, properties: i }),
409
408
  /* @__PURE__ */ e.jsx("hr", { className: "mt-4" }),
410
409
  c ? /* @__PURE__ */ e.jsxs(Ue, { type: "multiple", defaultValue: ["STATIC", "BINDING"], className: "h-full w-full", children: [
411
410
  /* @__PURE__ */ e.jsxs(de, { value: "BINDING", children: [
@@ -436,19 +435,19 @@ function Wr() {
436
435
  /* @__PURE__ */ e.jsxs(pe, { className: "pt-4", children: [
437
436
  f(h) ? null : /* @__PURE__ */ e.jsxs("div", { className: "mx-4 mb-1 mt-0 rounded-sm border border-orange-500 bg-orange-100 p-1 text-xs text-orange-500", children: [
438
437
  "Data binding is set for ",
439
- /* @__PURE__ */ e.jsx("b", { children: k(h, mt).join(", ") }),
438
+ /* @__PURE__ */ e.jsx("b", { children: k(h, bt).join(", ") }),
440
439
  " ",
441
440
  h.length === 1 ? "property" : "properties",
442
441
  ". Remove data binding to edit static content."
443
442
  ] }),
444
- /* @__PURE__ */ e.jsx(be, { onChange: y, formData: l, properties: g })
443
+ /* @__PURE__ */ e.jsx(me, { onChange: y, formData: l, properties: g })
445
444
  ] })
446
445
  ] })
447
- ] }) : /* @__PURE__ */ e.jsx(be, { onChange: y, formData: l, properties: g }),
446
+ ] }) : /* @__PURE__ */ e.jsx(me, { onChange: y, formData: l, properties: g }),
448
447
  /* @__PURE__ */ e.jsx("div", { className: "pb-60" })
449
448
  ] });
450
449
  }
451
- const $e = new Er(Lr, {
450
+ const Pe = new Er(Lr, {
452
451
  isCaseSensitive: !1,
453
452
  threshold: 0.2,
454
453
  minMatchCharLength: 2,
@@ -456,24 +455,24 @@ const $e = new Er(Lr, {
456
455
  });
457
456
  function Ur() {
458
457
  var D;
459
- const [r] = Se(), o = q(), t = Ke(), s = qe(), [l] = Ge(), [d, a] = C(""), c = (D = ue(r)) == null ? void 0 : D.prop, n = ft((x(o, c, "").replace(Or, "").split(",").pop() || "").split(" "), f), u = () => {
458
+ const [r] = Te(), o = q(), t = Ke(), s = qe(), [l] = Ge(), [d, a] = C(""), c = (D = ue(r)) == null ? void 0 : D.prop, n = ft((x(o, c, "").replace(Or, "").split(",").pop() || "").split(" "), f), u = () => {
460
459
  const j = d.trim().toLowerCase().replace(/ +(?= )/g, "").split(" ");
461
460
  t(l, j, !0), a("");
462
461
  }, [y, i] = C([]), h = ({ value: j }) => {
463
- const P = j.trim().toLowerCase(), L = P.match(/.+:/g);
462
+ const I = j.trim().toLowerCase(), L = I.match(/.+:/g);
464
463
  let N = [];
465
464
  if (L && L.length > 0) {
466
- const [I] = L, F = P.replace(I, "");
467
- N = $e.search(F).map((b) => ({
468
- ...b,
469
- item: { ...b.item, name: I + b.item.name }
465
+ const [$] = L, F = I.replace($, "");
466
+ N = Pe.search(F).map((m) => ({
467
+ ...m,
468
+ item: { ...m.item, name: $ + m.item.name }
470
469
  }));
471
470
  } else
472
- N = $e.search(P);
471
+ N = Pe.search(I);
473
472
  i(k(N, "item"));
474
473
  }, g = () => {
475
474
  i([]);
476
- }, p = (j) => j.name, m = (j) => /* @__PURE__ */ e.jsx("div", { className: "rounded-md p-1", children: j.name }), w = {
475
+ }, p = (j) => j.name, b = (j) => /* @__PURE__ */ e.jsx("div", { className: "rounded-md p-1", children: j.name }), w = {
477
476
  autoComplete: "off",
478
477
  autoCorrect: "off",
479
478
  autoCapitalize: "off",
@@ -483,7 +482,7 @@ function Ur() {
483
482
  onKeyDown: (j) => {
484
483
  j.key === "Enter" && d.trim() !== "" && u();
485
484
  },
486
- onChange: (j, { newValue: P }) => a(P),
485
+ onChange: (j, { newValue: I }) => a(I),
487
486
  className: "w-full rounded-md text-xs px-2 hover:outline-0 bg-background border-border py-1"
488
487
  };
489
488
  return /* @__PURE__ */ e.jsxs(
@@ -491,7 +490,7 @@ function Ur() {
491
490
  {
492
491
  className: `no-scrollbar flex ${y.length > 0 ? "min-h-[300px]" : "min-h-max"} w-full flex-col gap-y-5 overflow-y-auto bg-gray-100 px-px`,
493
492
  children: [
494
- /* @__PURE__ */ e.jsx(Te, { className: "mt-2", children: "Add Tailwind classes" }),
493
+ /* @__PURE__ */ e.jsx(Se, { className: "mt-2", children: "Add Tailwind classes" }),
495
494
  /* @__PURE__ */ e.jsxs("div", { className: "relative -mt-4 flex items-center gap-x-3", children: [
496
495
  /* @__PURE__ */ e.jsx("div", { className: "relative flex w-full items-center gap-x-3", children: /* @__PURE__ */ e.jsx(
497
496
  Ar,
@@ -500,7 +499,7 @@ function Ur() {
500
499
  onSuggestionsFetchRequested: h,
501
500
  onSuggestionsClearRequested: g,
502
501
  getSuggestionValue: p,
503
- renderSuggestion: m,
502
+ renderSuggestion: b,
504
503
  inputProps: w,
505
504
  containerProps: {
506
505
  className: "relative h-8 w-full gap-y-1 py-1 border-gray-600"
@@ -982,32 +981,32 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Kr = {
982
981
  // display
983
982
  hidden: He,
984
983
  gap: A,
985
- gapX: T,
984
+ gapX: S,
986
985
  gapY: R,
987
- spaceX: T,
986
+ spaceX: S,
988
987
  spaceY: R,
989
988
  overscroll: A,
990
- overscrollX: T,
989
+ overscrollX: S,
991
990
  overscrollY: R,
992
991
  overflow: A,
993
- overflowX: T,
992
+ overflowX: S,
994
993
  overflowY: R,
995
994
  top: Q,
996
995
  right: ee,
997
996
  bottom: te,
998
997
  left: re,
999
998
  inset: A,
1000
- insetX: T,
999
+ insetX: S,
1001
1000
  insetY: R,
1002
1001
  border: A,
1003
- borderX: T,
1002
+ borderX: S,
1004
1003
  borderY: R,
1005
1004
  borderTop: Q,
1006
1005
  borderRight: ee,
1007
1006
  borderBottom: te,
1008
1007
  borderLeft: re,
1009
1008
  borderRadius: A,
1010
- borderRadiusX: T,
1009
+ borderRadiusX: S,
1011
1010
  borderRadiusY: R,
1012
1011
  borderRadiusTop: Q,
1013
1012
  borderRadiusRight: ee,
@@ -1015,20 +1014,20 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Kr = {
1015
1014
  borderRadiusLeft: re,
1016
1015
  borderRadiusTopLeft: Nt,
1017
1016
  borderRadiusTopRight: _t,
1018
- borderRadiusBottomRight: St,
1019
- borderRadiusBottomLeft: Tt,
1020
- divideXWidth: T,
1017
+ borderRadiusBottomRight: Tt,
1018
+ borderRadiusBottomLeft: St,
1019
+ divideXWidth: S,
1021
1020
  divideYWidth: R,
1022
1021
  scale: A,
1023
- scaleX: T,
1022
+ scaleX: S,
1024
1023
  scaleY: R,
1025
- skewX: T,
1024
+ skewX: S,
1026
1025
  skewY: R,
1027
- translateX: T,
1026
+ translateX: S,
1028
1027
  translateY: R,
1029
1028
  // padding
1030
1029
  padding: A,
1031
- paddingX: T,
1030
+ paddingX: S,
1032
1031
  paddingY: R,
1033
1032
  paddingTop: Q,
1034
1033
  paddingRight: ee,
@@ -1036,7 +1035,7 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Kr = {
1036
1035
  paddingLeft: re,
1037
1036
  // margin
1038
1037
  margin: A,
1039
- marginX: T,
1038
+ marginX: S,
1040
1039
  marginY: R,
1041
1040
  marginTop: Q,
1042
1041
  marginRight: ee,
@@ -1051,10 +1050,10 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Kr = {
1051
1050
  italic: Dt,
1052
1051
  // "not-italic": "",
1053
1052
  // decoration
1054
- underline: It,
1055
- overline: Pt,
1053
+ underline: $t,
1054
+ overline: It,
1056
1055
  // transform
1057
- uppercase: $t,
1056
+ uppercase: Pt,
1058
1057
  block: () => /* @__PURE__ */ e.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
1059
1058
  /* @__PURE__ */ e.jsx(
1060
1059
  "path",
@@ -1204,7 +1203,7 @@ function Ce({ selected: r, onChange: o, rounded: t = !1, options: s, disabled: l
1204
1203
  value: d,
1205
1204
  children: [
1206
1205
  /* @__PURE__ */ e.jsx("option", { className: "bg-transparent", value: "" }),
1207
- $.Children.toArray(
1206
+ P.Children.toArray(
1208
1207
  s.map((n) => /* @__PURE__ */ e.jsx("option", { className: "bg-transparent", value: n, children: n }))
1209
1208
  )
1210
1209
  ]
@@ -1256,7 +1255,7 @@ const Qr = ({ property: r, onChange: o }) => {
1256
1255
  disabled: !s,
1257
1256
  onClick: () => o(a, r),
1258
1257
  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"}`,
1259
- children: $.createElement(x(st, a, ze))
1258
+ children: P.createElement(x(st, a, ze))
1260
1259
  }
1261
1260
  ) }),
1262
1261
  /* @__PURE__ */ e.jsx(Z, { children: Y(le(a)) })
@@ -1277,7 +1276,7 @@ const Qr = ({ property: r, onChange: o }) => {
1277
1276
  const t = ae(r), s = _(() => x(t, "cls", ""), [t]), { canChange: l } = se(oe), [d, a] = C([]), [c, n] = C({ color: "", shade: "" }), u = s.split("-"), y = x(u, "1", ""), i = x(u, "2", ""), h = V(
1278
1277
  // eslint-disable-next-line no-shadow
1279
1278
  (p) => {
1280
- ["current", "inherit", "transparent", "black", "white"].includes(p) ? (a([]), n({ color: p })) : (a(["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"]), n((m) => ({ ...m, color: p, shade: m.shade ? m.shade : "500" })));
1279
+ ["current", "inherit", "transparent", "black", "white"].includes(p) ? (a([]), n({ color: p })) : (a(["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"]), n((b) => ({ ...b, color: p, shade: b.shade ? b.shade : "500" })));
1281
1280
  },
1282
1281
  [a, n]
1283
1282
  );
@@ -1296,8 +1295,8 @@ const Qr = ({ property: r, onChange: o }) => {
1296
1295
  return O(() => {
1297
1296
  n({ color: "", shade: "" });
1298
1297
  }, [t]), O(() => {
1299
- const m = `${x(tl, r, "")}-${c.color}${c.shade ? `-${c.shade}` : ""}`;
1300
- m.match(new RegExp(x(he, `${r}.regExp`, ""))) && o(m, r);
1298
+ const b = `${x(tl, r, "")}-${c.color}${c.shade ? `-${c.shade}` : ""}`;
1299
+ b.match(new RegExp(x(he, `${r}.regExp`, ""))) && o(b, r);
1301
1300
  }, [c, o, r]), /* @__PURE__ */ e.jsxs("div", { className: "flex flex-row divide-x divide-solid divide-border rounded-lg border border-border text-xs", children: [
1302
1301
  /* @__PURE__ */ e.jsx("div", { className: "grow text-center", children: /* @__PURE__ */ e.jsx(
1303
1302
  Ce,
@@ -1487,7 +1486,7 @@ const sl = (r) => {
1487
1486
  return ol(r);
1488
1487
  const t = x(o, "0", "").replace(/\[|\]/g, ""), s = r.startsWith("-") ? "-" : "", l = ue(t.match(/\d+.\d+|\d+/g));
1489
1488
  return { value: `${s}${l}`, unit: t.replace(l, "") };
1490
- }, ol = (r) => f(r) ? { value: "", unit: "" } : ll(r), at = $.createContext({
1489
+ }, ol = (r) => f(r) ? { value: "", unit: "" } : ll(r), at = P.createContext({
1491
1490
  setDragData: () => {
1492
1491
  }
1493
1492
  }), al = ({
@@ -1535,47 +1534,47 @@ const sl = (r) => {
1535
1534
  },
1536
1535
  s
1537
1536
  )) }), Ee = 50, il = (r) => {
1538
- const [o, t] = C(!1), [s, l] = C(""), { currentClass: d, onChange: a, classPrefix: c, cssProperty: n, units: u, negative: y } = r, [i, h] = C(n != null && n.toLowerCase().includes("width") ? "%" : u[0]), [g, p] = C(!1), [m, w] = C(""), [D, j] = C(!1), [P, L] = C(!1);
1537
+ const [o, t] = C(!1), [s, l] = C(""), { currentClass: d, onChange: a, classPrefix: c, cssProperty: n, units: u, negative: y } = r, [i, h] = C(n != null && n.toLowerCase().includes("width") ? "%" : u[0]), [g, p] = C(!1), [b, w] = C(""), [D, j] = C(!1), [I, L] = C(!1);
1539
1538
  O(() => {
1540
- const { value: b, unit: v } = sl(d);
1539
+ const { value: m, unit: v } = sl(d);
1541
1540
  if (v === "") {
1542
- l(b), h(n != null && n.toLowerCase().includes("width") ? "%" : ue(u));
1541
+ l(m), h(n != null && n.toLowerCase().includes("width") ? "%" : ue(u));
1543
1542
  return;
1544
1543
  }
1545
- h(v), l(v === "class" || f(b) ? "" : b);
1544
+ h(v), l(v === "class" || f(m) ? "" : m);
1546
1545
  }, [d, n, u]);
1547
- const N = fe((b) => a(b), [a], Ee), I = fe((b) => a(b, !1), [a], Ee), F = V(
1548
- (b = !1) => {
1546
+ const N = fe((m) => a(m), [a], Ee), $ = fe((m) => a(m, !1), [a], Ee), F = V(
1547
+ (m = !1) => {
1549
1548
  const v = Ae(`${s}`, u);
1550
1549
  if (x(v, "error", !1)) {
1551
1550
  p(!0);
1552
1551
  return;
1553
1552
  }
1554
- const S = x(v, "unit") !== "" ? x(v, "unit") : i;
1555
- if (S === "auto" || S === "none") {
1556
- N(`${c}${S}`);
1553
+ const T = x(v, "unit") !== "" ? x(v, "unit") : i;
1554
+ if (T === "auto" || T === "none") {
1555
+ N(`${c}${T}`);
1557
1556
  return;
1558
1557
  }
1559
1558
  if (x(v, "value") === "")
1560
1559
  return;
1561
- const J = `${x(v, "value", "").startsWith("-") ? "-" : ""}${c}[${x(v, "value", "").replace("-", "")}${S === "-" ? "" : S}]`;
1562
- b ? I(J) : N(J);
1560
+ const J = `${x(v, "value", "").startsWith("-") ? "-" : ""}${c}[${x(v, "value", "").replace("-", "")}${T === "-" ? "" : T}]`;
1561
+ m ? $(J) : N(J);
1563
1562
  },
1564
- [N, I, s, i, c, u]
1563
+ [N, $, s, i, c, u]
1565
1564
  ), G = V(
1566
- (b) => {
1565
+ (m) => {
1567
1566
  const v = Ae(`${s}`, u);
1568
1567
  if (x(v, "error", !1)) {
1569
1568
  p(!0);
1570
1569
  return;
1571
1570
  }
1572
- if (b === "auto" || b === "none") {
1573
- N(`${c}${b}`);
1571
+ if (m === "auto" || m === "none") {
1572
+ N(`${c}${m}`);
1574
1573
  return;
1575
1574
  }
1576
1575
  if (x(v, "value") === "")
1577
1576
  return;
1578
- const S = x(v, "unit") !== "" ? x(v, "unit") : b, J = `${x(v, "value", "").startsWith("-") ? "-" : ""}${c}[${x(v, "value", "").replace("-", "")}${S === "-" ? "" : S}]`;
1577
+ const T = x(v, "unit") !== "" ? x(v, "unit") : m, J = `${x(v, "value", "").startsWith("-") ? "-" : ""}${c}[${x(v, "value", "").replace("-", "")}${T === "-" ? "" : T}]`;
1579
1578
  N(J);
1580
1579
  },
1581
1580
  [N, s, c, u]
@@ -1592,31 +1591,31 @@ const sl = (r) => {
1592
1591
  "input",
1593
1592
  {
1594
1593
  readOnly: i === "class",
1595
- onKeyPress: (b) => {
1596
- b.key === "Enter" && F();
1594
+ onKeyPress: (m) => {
1595
+ m.key === "Enter" && F();
1597
1596
  },
1598
- onKeyDown: (b) => {
1599
- if (b.keyCode !== 38 && b.keyCode !== 40)
1597
+ onKeyDown: (m) => {
1598
+ if (m.keyCode !== 38 && m.keyCode !== 40)
1600
1599
  return;
1601
- b.preventDefault(), L(!0);
1602
- const v = wt(b.target.value);
1603
- let S = Fe(v) ? 0 : v;
1604
- b.keyCode === 38 && (S += 1), b.keyCode === 40 && (S -= 1);
1605
- const M = `${S}`, it = `${M.startsWith("-") ? "-" : ""}${c}[${M.replace("-", "")}${i === "-" ? "" : i}]`;
1606
- I(it);
1600
+ m.preventDefault(), L(!0);
1601
+ const v = wt(m.target.value);
1602
+ let T = Fe(v) ? 0 : v;
1603
+ m.keyCode === 38 && (T += 1), m.keyCode === 40 && (T -= 1);
1604
+ const M = `${T}`, it = `${M.startsWith("-") ? "-" : ""}${c}[${M.replace("-", "")}${i === "-" ? "" : i}]`;
1605
+ $(it);
1607
1606
  },
1608
- onKeyUp: (b) => {
1609
- P && (b.preventDefault(), L(!1));
1607
+ onKeyUp: (m) => {
1608
+ I && (m.preventDefault(), L(!1));
1610
1609
  },
1611
1610
  onBlur: () => F(),
1612
- onChange: (b) => {
1613
- p(!1), l(b.target.value);
1611
+ onChange: (m) => {
1612
+ p(!1), l(m.target.value);
1614
1613
  },
1615
- onClick: (b) => {
1614
+ onClick: (m) => {
1616
1615
  var v;
1617
- (v = b == null ? void 0 : b.target) == null || v.select(), t(!1);
1616
+ (v = m == null ? void 0 : m.target) == null || v.select(), t(!1);
1618
1617
  },
1619
- value: D ? m : s,
1618
+ value: D ? b : s,
1620
1619
  className: "h-6 w-14 rounded rounded-r-none bg-background pl-2 text-sm focus-visible:outline-0 ".concat(
1621
1620
  " ",
1622
1621
  g ? "border-red-500 text-red-500" : "border-foreground/20"
@@ -1641,8 +1640,8 @@ const sl = (r) => {
1641
1640
  {
1642
1641
  units: u,
1643
1642
  current: i,
1644
- onSelect: (b) => {
1645
- t(!1), h(b), G(b);
1643
+ onSelect: (m) => {
1644
+ t(!1), h(m), G(m);
1646
1645
  }
1647
1646
  }
1648
1647
  ) }) })
@@ -1652,18 +1651,18 @@ const sl = (r) => {
1652
1651
  al,
1653
1652
  {
1654
1653
  onDragStart: () => j(!0),
1655
- onDragEnd: (b) => {
1656
- if (w(() => ""), j(!1), f(b))
1654
+ onDragEnd: (m) => {
1655
+ if (w(() => ""), j(!1), f(m))
1657
1656
  return;
1658
- const v = `${b}`, M = `${v.startsWith("-") ? "-" : ""}${c}[${v.replace("-", "")}${i === "-" ? "" : i}]`;
1657
+ const v = `${m}`, M = `${v.startsWith("-") ? "-" : ""}${c}[${v.replace("-", "")}${i === "-" ? "" : i}]`;
1659
1658
  N(M);
1660
1659
  },
1661
- onDrag: (b) => {
1662
- if (f(b))
1660
+ onDrag: (m) => {
1661
+ if (f(m))
1663
1662
  return;
1664
- w(b);
1665
- const v = `${b}`, M = `${v.startsWith("-") ? "-" : ""}${c}[${v.replace("-", "")}${i === "-" ? "" : i}]`;
1666
- I(M);
1663
+ w(m);
1664
+ const v = `${m}`, M = `${v.startsWith("-") ? "-" : ""}${c}[${v.replace("-", "")}${i === "-" ? "" : i}]`;
1665
+ $(M);
1667
1666
  },
1668
1667
  currentValue: s,
1669
1668
  unit: i,
@@ -1760,32 +1759,32 @@ const sl = (r) => {
1760
1759
  "2xl": "1536px"
1761
1760
  }, pl = (r) => `${r.toUpperCase()} ${Le[r] ? `(${Le[r]} & up)` : ""}`, Re = (r) => {
1762
1761
  const { t: o } = K(), { type: t = "icons", label: s, property: l, onEmitChange: d = () => {
1763
- }, units: a, negative: c = !1 } = r, [n] = yr(), [u] = Je(), [, y] = Be(), i = ae(l), h = Ke(), g = qe(), [p] = Ge(), m = _(() => x(i, "fullCls", ""), [i]), w = V(
1764
- (I, F = !0) => {
1765
- const G = { dark: n, mq: y, mod: u, cls: I, property: l, fullCls: "" };
1762
+ }, units: a, negative: c = !1 } = r, [n] = yr(), [u] = Je(), [, y] = Be(), i = ae(l), h = Ke(), g = qe(), [p] = Ge(), b = _(() => x(i, "fullCls", ""), [i]), w = V(
1763
+ ($, F = !0) => {
1764
+ const G = { dark: n, mq: y, mod: u, cls: $, property: l, fullCls: "" };
1766
1765
  (n || u !== "") && (G.mq = "xs");
1767
- const b = Mr(G);
1768
- h(p, [b], F);
1766
+ const m = Mr(G);
1767
+ h(p, [m], F);
1769
1768
  },
1770
1769
  [p, n, y, u, l, h]
1771
1770
  ), D = V(() => {
1772
- g(p, [m]);
1773
- }, [p, m, g]), j = _(() => dl(i, y), [i, y]);
1771
+ g(p, [b]);
1772
+ }, [p, b, g]), j = _(() => dl(i, y), [i, y]);
1774
1773
  O(() => {
1775
1774
  d(j, i);
1776
1775
  }, [j, d, i]);
1777
- const [, , P] = Be(), L = V(
1778
- (I) => {
1779
- P({
1776
+ const [, , I] = Be(), L = V(
1777
+ ($) => {
1778
+ I({
1780
1779
  xs: 400,
1781
1780
  sm: 640,
1782
1781
  md: 800,
1783
1782
  lg: 1024,
1784
1783
  xl: 1420,
1785
1784
  "2xl": 1920
1786
- }[I]);
1785
+ }[$]);
1787
1786
  },
1788
- [P]
1787
+ [I]
1789
1788
  ), N = x(i, "dark", null) === n && x(i, "mod", null) === u && x(i, "mq", null) === y;
1790
1789
  return /* @__PURE__ */ e.jsx(Jr, { canChange: j, canReset: i && N, children: /* @__PURE__ */ e.jsxs("div", { className: "group flex flex-row items-center py-2 first:pt-0 last:pb-0", children: [
1791
1790
  /* @__PURE__ */ e.jsx("div", { className: "relative w-[70px] truncate text-xs text-foreground", children: /* @__PURE__ */ e.jsx("span", { className: `text-[11px] ${i && !N ? "text-foreground" : ""}`, children: o(s) }) }),
@@ -1807,7 +1806,7 @@ const sl = (r) => {
1807
1806
  t === "color" && /* @__PURE__ */ e.jsx(rl, { property: l, onChange: w }),
1808
1807
  t === "dropdown" && /* @__PURE__ */ e.jsx(ot, { label: s, property: l, onChange: w })
1809
1808
  ] }),
1810
- /* @__PURE__ */ e.jsx("div", { className: `w-[30px] cursor-pointer ${m ? "visible" : "invisible"}`, children: N ? /* @__PURE__ */ e.jsx("button", { type: "button", onClick: () => D(), title: "Reset", className: "flex px-1.5 text-xs", children: /* @__PURE__ */ e.jsx(Ot, { className: "h-5 w-5 text-blue-500 hover:opacity-80" }) }) : j && i ? /* @__PURE__ */ e.jsxs(X, { delayDuration: 100, children: [
1809
+ /* @__PURE__ */ e.jsx("div", { className: `w-[30px] cursor-pointer ${b ? "visible" : "invisible"}`, children: N ? /* @__PURE__ */ e.jsx("button", { type: "button", onClick: () => D(), title: "Reset", className: "flex px-1.5 text-xs", children: /* @__PURE__ */ e.jsx(Ot, { className: "h-5 w-5 text-blue-500 hover:opacity-80" }) }) : j && i ? /* @__PURE__ */ e.jsxs(X, { delayDuration: 100, children: [
1811
1810
  /* @__PURE__ */ e.jsx(z, { asChild: !0, children: /* @__PURE__ */ e.jsx(
1812
1811
  "button",
1813
1812
  {
@@ -1856,7 +1855,7 @@ const sl = (r) => {
1856
1855
  children: [
1857
1856
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-row text-xs", children: [
1858
1857
  r && /* @__PURE__ */ e.jsx("span", { className: "relative w-[70px] flex-none text-xs text-foreground", children: c(r) }),
1859
- /* @__PURE__ */ e.jsx("div", { className: "mb-3 flex grow flex-row flex-wrap gap-x-px", children: $.Children.toArray(
1858
+ /* @__PURE__ */ e.jsx("div", { className: "mb-3 flex grow flex-row flex-wrap gap-x-px", children: P.Children.toArray(
1860
1859
  o.map(({ label: h, key: g }) => /* @__PURE__ */ e.jsx("div", { className: "first:rounded-l last:rounded-r", children: /* @__PURE__ */ e.jsxs(X, { children: [
1861
1860
  /* @__PURE__ */ e.jsx(z, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
1862
1861
  "button",
@@ -1865,10 +1864,10 @@ const sl = (r) => {
1865
1864
  onClick: () => u(g),
1866
1865
  className: `relative cursor-pointer rounded-full p-1 text-[8px] ${g === n ? " bg-[#3E57F0] text-white" : "text-gray-600 dark:text-gray-300"}`,
1867
1866
  children: [
1868
- $.createElement("div", {
1867
+ P.createElement("div", {
1869
1868
  className: i(g) ? "-bottom-1.5 absolute bg-[#3E57F0] h-[2px] left-0 w-full" : ""
1870
1869
  }),
1871
- $.createElement(x(st, g, ze), { className: "text-inherit w-3 h-3" })
1870
+ P.createElement(x(st, g, ze), { className: "text-inherit w-3 h-3" })
1872
1871
  ]
1873
1872
  }
1874
1873
  ) }),
@@ -1910,7 +1909,7 @@ const sl = (r) => {
1910
1909
  ] }) }),
1911
1910
  /* @__PURE__ */ e.jsx("div", { className: "p-2", children: o.map((d) => d.styleType === "multiple" ? /* @__PURE__ */ e.jsx(nt, { ...d }, d.label) : /* @__PURE__ */ e.jsx(Re, { ...d }, d.label)) })
1912
1911
  ] });
1913
- }, gl = Me({}), me = ({ section: r }) => {
1912
+ }, gl = Me({}), be = ({ section: r }) => {
1914
1913
  const { t: o } = K(), t = ge(), s = V(
1915
1914
  (a = []) => {
1916
1915
  const c = {};
@@ -1940,8 +1939,8 @@ const sl = (r) => {
1940
1939
  /* @__PURE__ */ e.jsx("div", { className: `h-[8px] w-[8px] rounded-full ${l ? "bg-blue-500" : "bg-gray-300"}` }),
1941
1940
  o(r.heading)
1942
1941
  ] }) }),
1943
- /* @__PURE__ */ e.jsx(pe, { className: "bg-gray-100 px-3.5 py-2", children: $.Children.toArray(
1944
- r.items.map((a) => ye(a, "component") ? $.createElement(a.component, { key: a.label }) : ye(a, "styleType") ? a.styleType === "multiple" ? /* @__PURE__ */ e.jsx(nt, { ...a }, a.label) : a.styleType === "accordion" && s(a == null ? void 0 : a.conditions) ? /* @__PURE__ */ e.jsx(xl, { ...a }, a.label) : null : /* @__PURE__ */ e.jsx(Re, { ...a }, a.label))
1942
+ /* @__PURE__ */ e.jsx(pe, { className: "bg-gray-100 px-3.5 py-2", children: P.Children.toArray(
1943
+ r.items.map((a) => ye(a, "component") ? P.createElement(a.component, { key: a.label }) : ye(a, "styleType") ? a.styleType === "multiple" ? /* @__PURE__ */ e.jsx(nt, { ...a }, a.label) : a.styleType === "accordion" && s(a == null ? void 0 : a.conditions) ? /* @__PURE__ */ e.jsx(xl, { ...a }, a.label) : null : /* @__PURE__ */ e.jsx(Re, { ...a }, a.label))
1945
1944
  ) })
1946
1945
  ] }) });
1947
1946
  }, hl = ({
@@ -1986,22 +1985,22 @@ const sl = (r) => {
1986
1985
  ] })
1987
1986
  ] }), yl = ({ section: r }) => {
1988
1987
  var h;
1989
- const { setSyncState: o } = br(), t = q(), [s, l] = C([]), [d] = Se(), a = We(), c = `${x(d, "0.prop")}_attrs`;
1988
+ const { setSyncState: o } = mr(), t = q(), [s, l] = C([]), [d] = Te(), a = We(), c = `${x(d, "0.prop")}_attrs`;
1990
1989
  ne.useEffect(() => {
1991
- const g = k(x(t, c), (p, m) => ({ key: m, value: p }));
1990
+ const g = k(x(t, c), (p, b) => ({ key: b, value: p }));
1992
1991
  f(g) ? l([]) : l(g);
1993
1992
  }, [x(t, c)]);
1994
1993
  const n = () => l([...s, { key: "", value: "" }]), u = (g) => {
1995
- const p = we(s, (m, w) => g !== w);
1994
+ const p = we(s, (b, w) => g !== w);
1996
1995
  i(p);
1997
1996
  }, y = (g, p) => {
1998
- const m = [...s];
1999
- m[p][g.target.name] = g.target.value, i(m);
1997
+ const b = [...s];
1998
+ b[p][g.target.name] = g.target.value, i(b);
2000
1999
  }, i = ne.useCallback(
2001
2000
  (g = []) => {
2002
2001
  const p = {};
2003
- ke(g, (m) => {
2004
- f(m.key) || Oe(p, m.key, m.value);
2002
+ ke(g, (b) => {
2003
+ f(b.key) || Oe(p, b.key, b.value);
2005
2004
  }), a([x(t, "_id")], { [c]: p }), o("UNSAVED");
2006
2005
  },
2007
2006
  [t, o, a, c]
@@ -2017,7 +2016,7 @@ const sl = (r) => {
2017
2016
  "Attributes"
2018
2017
  ] }) }),
2019
2018
  /* @__PURE__ */ e.jsx(pe, { className: "bg-gray-100 px-3.5 py-2", children: /* @__PURE__ */ e.jsxs("div", { className: "no-scrollbar flex min-h-max flex-col gap-y-2 overflow-y-auto bg-gray-100 p-px", children: [
2020
- /* @__PURE__ */ e.jsxs(Te, { className: "mt-2 flex w-full items-center justify-between", children: [
2019
+ /* @__PURE__ */ e.jsxs(Se, { className: "mt-2 flex w-full items-center justify-between", children: [
2021
2020
  "Add Custom attributes",
2022
2021
  /* @__PURE__ */ e.jsxs(
2023
2022
  "div",
@@ -2038,13 +2037,13 @@ const sl = (r) => {
2038
2037
  f(s) && /* @__PURE__ */ e.jsx("div", { className: "flex h-12 items-center justify-center text-sm text-gray-400", children: "Click + Add to add attributes" }),
2039
2038
  ne.Children.toArray(
2040
2039
  k(s, (g, p) => {
2041
- const m = s.length > 0 && p < s.length - 1;
2040
+ const b = s.length > 0 && p < s.length - 1;
2042
2041
  return /* @__PURE__ */ e.jsx(
2043
2042
  hl,
2044
2043
  {
2045
2044
  item: g,
2046
2045
  index: p,
2047
- canDelete: m,
2046
+ canDelete: b,
2048
2047
  onChange: y,
2049
2048
  onRemove: () => u(p)
2050
2049
  }
@@ -2055,8 +2054,8 @@ const sl = (r) => {
2055
2054
  ] }) })
2056
2055
  ] });
2057
2056
  };
2058
- function bl() {
2059
- const [r, o] = Je(), { flexChild: t, gridChild: s } = mr(), [, l] = $r(fr), { t: d } = K(), [a] = Se();
2057
+ function ml() {
2058
+ const [r, o] = Je(), { flexChild: t, gridChild: s } = br(), [, l] = Pr(fr), { t: d } = K(), [a] = Te();
2060
2059
  return f(a) ? /* @__PURE__ */ e.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 rounded-xl p-4", children: [
2061
2060
  /* @__PURE__ */ e.jsx(Ze, { className: "mx-auto text-3xl" }),
2062
2061
  /* @__PURE__ */ e.jsx("h1", { children: d("no_styling_block_selected") })
@@ -2064,7 +2063,7 @@ function bl() {
2064
2063
  // eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions
2065
2064
  /* @__PURE__ */ e.jsxs("div", { onClick: () => l(!1), className: "flex h-full flex-col", children: [
2066
2065
  /* @__PURE__ */ e.jsx("div", { className: "flex h-12 flex-col space-x-4 space-y-3 border-b border-border px-4 py-1", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-end gap-x-1.5", children: [
2067
- /* @__PURE__ */ e.jsx(Te, { htmlFor: "", className: "flex gap-x-1.5 text-xs italic", children: "State" }),
2066
+ /* @__PURE__ */ e.jsx(Se, { htmlFor: "", className: "flex gap-x-1.5 text-xs italic", children: "State" }),
2068
2067
  /* @__PURE__ */ e.jsxs(vr, { defaultValue: r, onValueChange: (c) => o(c), children: [
2069
2068
  /* @__PURE__ */ e.jsx(wr, { className: "h-auto w-fit p-1 px-3", children: /* @__PURE__ */ e.jsx(jr, { placeholder: "State" }) }),
2070
2069
  /* @__PURE__ */ e.jsxs(Cr, { children: [
@@ -2084,15 +2083,15 @@ function bl() {
2084
2083
  ] })
2085
2084
  ] }) }),
2086
2085
  /* @__PURE__ */ e.jsx(Qe, { className: "no-scrollbar -mx-1 max-h-full flex-1 overflow-x-hidden overflow-y-hidden", children: /* @__PURE__ */ e.jsxs(Ue, { defaultValue: ["Layout"], type: "multiple", className: "w-full", children: [
2087
- t && /* @__PURE__ */ e.jsx(me, { section: Kr }),
2088
- s ? /* @__PURE__ */ e.jsx(me, { section: qr }) : null,
2089
- Gr.map((c) => /* @__PURE__ */ e.jsx(me, { section: c }, c.heading)),
2086
+ t && /* @__PURE__ */ e.jsx(be, { section: Kr }),
2087
+ s ? /* @__PURE__ */ e.jsx(be, { section: qr }) : null,
2088
+ Gr.map((c) => /* @__PURE__ */ e.jsx(be, { section: c }, c.heading)),
2090
2089
  /* @__PURE__ */ e.jsx(yl, { section: { heading: "Attributes" } })
2091
2090
  ] }) })
2092
2091
  ] })
2093
2092
  );
2094
2093
  }
2095
- const ml = {
2094
+ const bl = {
2096
2095
  px: 1,
2097
2096
  "%": 1,
2098
2097
  em: 100,
@@ -2103,8 +2102,8 @@ const ml = {
2103
2102
  "-": 1,
2104
2103
  deg: 1,
2105
2104
  ms: 0.1
2106
- }, ks = () => {
2107
- const r = q(), { t: o } = K(), [t, s] = $.useState(""), [l, d] = $.useState({
2105
+ }, Cs = () => {
2106
+ const r = q(), { t: o } = K(), [t, s] = P.useState(""), [l, d] = P.useState({
2108
2107
  onDrag: (n) => n,
2109
2108
  onDragEnd: (n) => n,
2110
2109
  dragStartY: 0,
@@ -2118,7 +2117,7 @@ const ml = {
2118
2117
  const u = !x(l, "negative", !1), y = x(l, "cssProperty", "");
2119
2118
  let i = parseFloat(l.dragStartValue);
2120
2119
  i = Fe(i) ? 0 : i;
2121
- let h = ml[l.dragUnit];
2120
+ let h = bl[l.dragUnit];
2122
2121
  (W(y, "scale") || y === "opacity") && (h = 10);
2123
2122
  let p = (l.dragStartY - n.pageY) / h + i;
2124
2123
  u && p < 0 && (p = 0), y === "opacity" && p > 1 && (p = 1), l.onDrag(`${p}`), s(`${p}`);
@@ -2154,11 +2153,11 @@ const ml = {
2154
2153
  /* @__PURE__ */ e.jsx(De, { value: "settings", children: o("settings") }),
2155
2154
  /* @__PURE__ */ e.jsx(De, { value: "styling", children: o("styling") })
2156
2155
  ] }),
2157
- /* @__PURE__ */ e.jsx(Ie, { value: "settings", className: "no-scrollbar h-full flex-1 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(Qe, { className: "no-scrollbar max-h-full flex-1 overflow-x-hidden overflow-y-hidden pb-5", children: /* @__PURE__ */ e.jsx(Wr, {}) }) }),
2158
- /* @__PURE__ */ e.jsx(Ie, { value: "styling", className: "h-full flex-1 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(bl, {}) })
2156
+ /* @__PURE__ */ e.jsx($e, { value: "settings", className: "no-scrollbar h-full flex-1 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(Qe, { className: "no-scrollbar max-h-full flex-1 overflow-x-hidden overflow-y-hidden pb-5", children: /* @__PURE__ */ e.jsx(Wr, {}) }) }),
2157
+ /* @__PURE__ */ e.jsx($e, { value: "styling", className: "h-full flex-1 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(ml, {}) })
2159
2158
  ] })
2160
2159
  ] }) });
2161
2160
  };
2162
2161
  export {
2163
- ks as default
2162
+ Cs as default
2164
2163
  };