@chaibuilder/sdk 1.2.44 → 1.2.45

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 (76) hide show
  1. package/dist/AddBlocks-UjnfO1xM.cjs +1 -0
  2. package/dist/{AddBlocks-QCb-vIta.js → AddBlocks-vkMNQu2M.js} +4 -3
  3. package/dist/{CanvasArea-Hqy_21xf.js → CanvasArea-DLg9e6l5.js} +6 -5
  4. package/dist/{CanvasArea-xvT325mp.cjs → CanvasArea-tyXurhEm.cjs} +1 -1
  5. package/dist/{ChaiBuilderEditor-NnMEdW3k.js → ChaiBuilderEditor-1K-wcF5D.js} +5109 -5124
  6. package/dist/{ChaiBuilderEditor-AIXWnz29.cjs → ChaiBuilderEditor-iXQwbYNr.cjs} +42 -42
  7. package/dist/CurrentPage-6t2cmyoQ.cjs +1 -0
  8. package/dist/{CurrentPage-rkdt2mNr.js → CurrentPage-JjZQQ8fp.js} +10 -9
  9. package/dist/{ListTree-PuZP9LQu.js → ListTree-KsggM2ac.js} +2 -1
  10. package/dist/ListTree-OTrtj3iM.cjs +1 -0
  11. package/dist/{PagesPanel-TYArrNU6.js → PagesPanel-bElLBHNI.js} +5 -4
  12. package/dist/PagesPanel-zm1EC6Iw.cjs +1 -0
  13. package/dist/ProjectPanel-4zPiPARX.cjs +1 -0
  14. package/dist/{ProjectPanel-qY_Bnqjm.js → ProjectPanel-o1BnitsI.js} +6 -5
  15. package/dist/Settings-7LXieIrg.cjs +1 -0
  16. package/dist/{Settings-k9Ll55Wc.js → Settings-Bj2wI1at.js} +103 -102
  17. package/dist/SidePanels-9DSI8ysE.cjs +1 -0
  18. package/dist/{SidePanels-eOnxPSSw.js → SidePanels-Q23Yldya.js} +5 -4
  19. package/dist/{ThemeConfiguration-TINcg8VX.js → ThemeConfiguration-GY85_LR8.js} +4 -3
  20. package/dist/ThemeConfiguration-mgyKWvYY.cjs +1 -0
  21. package/dist/Topbar-_7BQ50Y4.cjs +1 -0
  22. package/dist/{Topbar--KrJ6nJg.js → Topbar-_T58hnmh.js} +4 -3
  23. package/dist/UILibrariesPanel-28G5q5uW.cjs +1 -0
  24. package/dist/{UILibrariesPanel-sleogb55.js → UILibrariesPanel-e9sgXFmR.js} +4 -3
  25. package/dist/{UnsplashImages-P7_2yEo-.js → UnsplashImages-2Iew1REO.js} +4 -3
  26. package/dist/UnsplashImages-wiV_0gCf.cjs +1 -0
  27. package/dist/{UploadImages-ovzzQW6b.js → UploadImages--batsol9.js} +4 -3
  28. package/dist/UploadImages-XNNW2MnE.cjs +1 -0
  29. package/dist/{add-page-modal-SmBfx0LH.js → add-page-modal-1hTp3XOU.js} +17 -16
  30. package/dist/add-page-modal-AvOI8Zy3.cjs +1 -0
  31. package/dist/confirm-alert-8gHBC9xl.cjs +1 -0
  32. package/dist/{confirm-alert-yipdBkkj.js → confirm-alert-pMcaye-H.js} +4 -3
  33. package/dist/core.cjs +1 -1
  34. package/dist/core.js +45 -44
  35. package/dist/delete-page-modal--GqB4-ya.cjs +1 -0
  36. package/dist/{delete-page-modal-HIul7JBc.js → delete-page-modal-pPp6AAO1.js} +5 -4
  37. package/dist/email.cjs +1 -1
  38. package/dist/email.js +4 -3
  39. package/dist/{form-cZPoXqTP.js → form-BbIs9ZUH.js} +1 -1
  40. package/dist/{form-yq_mbR58.cjs → form-svmj4OQd.cjs} +1 -1
  41. package/dist/{index-Vu40oRWp.js → index-GRkx-GlC.js} +2 -2
  42. package/dist/{index-q_bEEzdK.cjs → index-ssLLO7-s.cjs} +1 -1
  43. package/dist/page-viewer-0QMFEzfk.cjs +1 -0
  44. package/dist/{page-viewer-ZOVAaE9q.js → page-viewer-3ne7tW8e.js} +6 -5
  45. package/dist/{project-general-setting-2iNlm_kN.js → project-general-setting-cIjIy8PW.js} +6 -5
  46. package/dist/project-general-setting-oNYVjfNV.cjs +1 -0
  47. package/dist/project-seo-setting-5699qkWN.cjs +1 -0
  48. package/dist/{project-seo-setting-FX0cbkrO.js → project-seo-setting-HLwPjaL2.js} +5 -4
  49. package/dist/{single-page-detail-4v8ojQss.js → single-page-detail-MLxPXKfu.js} +7 -6
  50. package/dist/single-page-detail-amfiKMF_.cjs +1 -0
  51. package/dist/studio.cjs +1 -1
  52. package/dist/studio.js +4 -3
  53. package/dist/ui.cjs +1 -1
  54. package/dist/ui.js +139 -138
  55. package/dist/{useCanvasSettings-A7Qj0z4L.cjs → useCanvasSettings-KDwtap3V.cjs} +1 -1
  56. package/dist/{useCanvasSettings-QH5zCmxD.js → useCanvasSettings-qs-7bwyA.js} +1 -1
  57. package/package.json +2 -1
  58. package/dist/AddBlocks-Bb-K6Y0Z.cjs +0 -1
  59. package/dist/CurrentPage-n_oOiHx5.cjs +0 -1
  60. package/dist/ListTree-z0FeSAsc.cjs +0 -1
  61. package/dist/PagesPanel-4ftrFiS0.cjs +0 -1
  62. package/dist/ProjectPanel-2scMInUn.cjs +0 -1
  63. package/dist/Settings-kbUR5-xt.cjs +0 -1
  64. package/dist/SidePanels-ZHxoiJ7y.cjs +0 -1
  65. package/dist/ThemeConfiguration-fRsktVs4.cjs +0 -1
  66. package/dist/Topbar-tgFkKz7R.cjs +0 -1
  67. package/dist/UILibrariesPanel-2HyAEVLE.cjs +0 -1
  68. package/dist/UnsplashImages-azP_HIqG.cjs +0 -1
  69. package/dist/UploadImages-nnszHoZa.cjs +0 -1
  70. package/dist/add-page-modal-nDBqhemF.cjs +0 -1
  71. package/dist/confirm-alert-75rfTsgE.cjs +0 -1
  72. package/dist/delete-page-modal-lO-dULGW.cjs +0 -1
  73. package/dist/page-viewer-3ZqrDjrz.cjs +0 -1
  74. package/dist/project-general-setting-IIxWGrU2.cjs +0 -1
  75. package/dist/project-seo-setting-46PdN9FR.cjs +0 -1
  76. package/dist/single-page-detail-MsBTVx9h.cjs +0 -1
@@ -5,17 +5,17 @@ import { useThrottledCallback as de } from "@react-hookz/web";
5
5
  import { forEach as Ne, isArray as ce, omit as vt, truncate as jt, includes as X, get as y, first as ae, split as wt, startCase as F, toLower as re, isEmpty as m, map as _, find as Ze, last as Ct, filter as ye, set as We, debounce as kt, keys as he, cloneDeep as Nt, each as _t, capitalize as be, reject as St, kebabCase as Tt, startsWith as W, nth as He, isNumber as Rt, parseInt as Vt, isNaN as Ue, findLast as Ht, flatten as De, intersection as Dt, has as ie, isNull as Bt } from "lodash-es";
6
6
  import { useTranslation as B } from "react-i18next";
7
7
  import { CopyIcon as It, PlusIcon as _e, Cross2Icon as Ge, EyeOpenIcon as Pt, EyeClosedIcon as Be, BorderAllIcon as Y, WidthIcon as R, HeightIcon as V, ArrowUpIcon as J, ArrowRightIcon as Q, ArrowDownIcon as ee, ArrowLeftIcon as te, ArrowTopLeftIcon as At, ArrowTopRightIcon as $t, ArrowBottomRightIcon as Mt, ArrowBottomLeftIcon as Et, AlignLeftIcon as Lt, AlignCenterHorizontallyIcon as Ot, AlignRightIcon as zt, StretchHorizontallyIcon as Yt, FontItalicIcon as Xt, UnderlineIcon as Ft, OverlineIcon as Zt, LetterCaseUppercaseIcon as Wt, Cross1Icon as Ut, InfoCircledIcon as Se, MinusIcon as Gt, BoxIcon as Ke, RowSpacingIcon as Kt, TriangleDownIcon as qt, CrossCircledIcon as Jt, CaretDownIcon as Qt, MixerHorizontalIcon as qe } from "@radix-ui/react-icons";
8
- import { a2 as Je, aP as Qe, aQ as et, B as A, aR as tt, aS as er, aT as tr, aU as rr, aV as sr, aW as ar, aX as lr, M as G, aK as rt, $ as or, a0 as nr, a1 as ir, aY as dr, Z as cr, ab as pr, _ as ur, ac as $, ad as M, ae as E, aZ as gr, a_ as xr, a$ as yr, b0 as hr, b1 as br, b2 as mr, b3 as fr, R as st, Q as at, h as lt, b4 as vr, b5 as ot, b6 as me, b7 as fe, b8 as ve, b9 as jr, ba as wr, ah as Cr, bb as kr, Y as pe, n as Te, I as nt, L as it, bc as dt, aq as Nr, bd as je, j as _r, be as Sr, J as ue, v as Tr, P as Rr, o as Ie, av as Vr, aw as Hr, ax as Dr, bf as ct, ay as Pe, az as Ae, bg as $e, bh as Me, bi as Ee, S as Br } from "./ChaiBuilderEditor-NnMEdW3k.js";
9
- import { Check as Ir, EditIcon as Pr, TrashIcon as Ar, Loader as $r, SparklesIcon as Mr, DeleteIcon as Er } from "lucide-react";
10
- import { getBlockComponent as Re, getChaiDataProviders as Lr, useGlobalStylingPresets as Or } from "@chaibuilder/runtime";
11
- import { J as zr, a as Yr, d as Xr } from "./index-e0c8PmRQ.js";
12
- import Fr from "@rjsf/core";
13
- import Zr from "@rjsf/validator-ajv8";
14
- import { u as Wr } from "./useCanvasSettings-QH5zCmxD.js";
15
- import Ur from "react-autosuggest";
16
- import Gr from "fuse.js";
17
- import { A as Kr, C as ge, g as qr } from "./utils-iMv3T4WT.js";
18
- import { a as Jr } from "./STRINGS--j49GZJP.js";
8
+ import { a2 as Je, aP as Qe, aQ as et, B as A, aR as tt, aS as er, aT as tr, aU as rr, aV as sr, aW as ar, aX as lr, M as G, aK as rt, $ as or, a0 as nr, a1 as ir, aY as dr, Z as cr, ab as pr, _ as ur, ac as $, ad as M, ae as E, aZ as gr, a_ as xr, a$ as yr, b0 as hr, b1 as br, b2 as mr, b3 as fr, R as st, Q as at, h as lt, b4 as vr, b5 as ot, b6 as me, b7 as fe, b8 as ve, b9 as jr, ba as wr, ah as Cr, bb as kr, Y as pe, n as Te, I as nt, L as it, bc as dt, bd as je, j as Nr, be as _r, J as ue, v as Sr, P as Tr, o as Ie, av as Rr, aw as Vr, ax as Hr, bf as ct, ay as Pe, az as Ae, bg as $e, bh as Me, bi as Ee, S as Dr } from "./ChaiBuilderEditor-1K-wcF5D.js";
9
+ import { Check as Br, EditIcon as Ir, TrashIcon as Pr, Loader as Ar, SparklesIcon as $r, DeleteIcon as Mr } from "lucide-react";
10
+ import { getBlockComponent as Re, getChaiDataProviders as Er, useGlobalStylingPresets as Lr } from "@chaibuilder/runtime";
11
+ import { J as Or, a as zr, d as Yr } from "./index-e0c8PmRQ.js";
12
+ import Xr from "@rjsf/core";
13
+ import Fr from "@rjsf/validator-ajv8";
14
+ import { u as Zr } from "./useCanvasSettings-qs-7bwyA.js";
15
+ import Wr from "react-autosuggest";
16
+ import Ur from "fuse.js";
17
+ import { A as Gr, C as ge, g as Kr } from "./utils-iMv3T4WT.js";
18
+ import { a as qr } from "./STRINGS--j49GZJP.js";
19
19
  import "./_commonjsHelpers-UyOWmZb0.js";
20
20
  import "clsx";
21
21
  import "react-dom";
@@ -27,6 +27,7 @@ import "flagged";
27
27
  import "./Functions-7jnEwJyw.js";
28
28
  import "tailwind-merge";
29
29
  import "./MODIFIERS-cBT31iqE.js";
30
+ import "tree-model";
30
31
  import "@radix-ui/react-toggle";
31
32
  import "class-variance-authority";
32
33
  import "@radix-ui/react-switch";
@@ -49,7 +50,7 @@ import "@radix-ui/react-context-menu";
49
50
  import "react-icons-picker";
50
51
  import "react-quill";
51
52
  import "react-hotkeys-hook";
52
- function Qr(r) {
53
+ function Jr(r) {
53
54
  const a = [], t = {};
54
55
  function n(l, s) {
55
56
  Ne(s, (d, c) => {
@@ -66,12 +67,12 @@ const we = ({ data: r, fullView: a }) => {
66
67
  return a ? typeof r == "object" ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
67
68
  /* @__PURE__ */ e.jsx("div", { className: "h-3" }),
68
69
  /* @__PURE__ */ e.jsx(Je, { children: /* @__PURE__ */ e.jsx(
69
- zr,
70
+ Or,
70
71
  {
71
72
  data: r,
72
- shouldExpandNode: Yr,
73
+ shouldExpandNode: zr,
73
74
  style: {
74
- ...Xr,
75
+ ...Yr,
75
76
  container: "max-h-[40vh] overflow-y-auto text-[12px] leading-[1.5] tracking-wide font-mono",
76
77
  stringValue: "text-orange-600",
77
78
  label: "text-green-900 font-semibold pr-1 tracking-wider"
@@ -91,7 +92,7 @@ const we = ({ data: r, fullView: a }) => {
91
92
  dataType: s,
92
93
  appliedBindings: d
93
94
  }) => {
94
- const { paths: c, pathsType: o } = Qr(n), p = r === "PROP" ? Re(n == null ? void 0 : n._type) : {}, h = r === "PROP", [i, g] = j(!1), x = T(() => r === "PROP" ? c.filter(
95
+ const { paths: c, pathsType: o } = Jr(n), p = r === "PROP" ? Re(n == null ? void 0 : n._type) : {}, h = r === "PROP", [i, g] = j(!1), x = T(() => r === "PROP" ? c.filter(
95
96
  (u) => !X(d, u) && y(p, `props.${ae(wt(u, "."))}.binding`)
96
97
  ) : c.filter((u) => s === y(o, u, "")), [r, c, d, s, p]);
97
98
  return P(() => {
@@ -132,7 +133,7 @@ const we = ({ data: r, fullView: a }) => {
132
133
  },
133
134
  children: [
134
135
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
135
- /* @__PURE__ */ e.jsx(Ir, { className: `h-4 w-4 text-green-500 ${a === u ? "" : "opacity-0"}` }),
136
+ /* @__PURE__ */ e.jsx(Br, { className: `h-4 w-4 text-green-500 ${a === u ? "" : "opacity-0"}` }),
136
137
  u
137
138
  ] }),
138
139
  h ? /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx("span", { className: "rounded-full bg-purple-100 px-2 py-0.5 text-[10px] text-purple-500", children: F(y(o, u, "")) }) }) : /* @__PURE__ */ e.jsx("div", { className: "pl-6", children: /* @__PURE__ */ e.jsx(we, { data: y(n, u) }) })
@@ -146,7 +147,7 @@ const we = ({ data: r, fullView: a }) => {
146
147
  ] }),
147
148
  !h && !m(a) && /* @__PURE__ */ e.jsx("div", { className: "pt-2", children: /* @__PURE__ */ e.jsx(we, { data: y(n, a, ""), fullView: !0 }) })
148
149
  ] });
149
- }, es = ({
150
+ }, Qr = ({
150
151
  appliedBindings: r = [],
151
152
  onAddBinding: a,
152
153
  editMode: t,
@@ -224,7 +225,7 @@ const we = ({ data: r, fullView: a }) => {
224
225
  return /* @__PURE__ */ e.jsxs(cr, { children: [
225
226
  /* @__PURE__ */ e.jsx(pr, { disabled: r, asChild: !0, onClick: () => c(!0), children: a }),
226
227
  d && /* @__PURE__ */ e.jsx(ur, { children: /* @__PURE__ */ e.jsx(
227
- es,
228
+ Qr,
228
229
  {
229
230
  item: s,
230
231
  editMode: l,
@@ -235,7 +236,7 @@ const we = ({ data: r, fullView: a }) => {
235
236
  }
236
237
  ) })
237
238
  ] });
238
- }, ts = ({
239
+ }, es = ({
239
240
  item: r,
240
241
  onAddBinding: a,
241
242
  onRemove: t,
@@ -259,9 +260,9 @@ const we = ({ data: r, fullView: a }) => {
259
260
  /* @__PURE__ */ e.jsx("div", { className: "font-medium leading-5", children: r.value }),
260
261
  /* @__PURE__ */ e.jsx(we, { data: y(l, r.value, "") }),
261
262
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-end gap-x-2", children: [
262
- /* @__PURE__ */ e.jsx(pt, { editMode: !0, onAddBinding: a, appliedBindings: s, item: r, children: /* @__PURE__ */ e.jsx(Pr, { className: "mt-1 h-6 w-6 cursor-pointer rounded border border-blue-400 p-1 text-blue-400 duration-200 hover:scale-105 hover:bg-blue-400 hover:text-white" }) }),
263
+ /* @__PURE__ */ e.jsx(pt, { editMode: !0, onAddBinding: a, appliedBindings: s, item: r, children: /* @__PURE__ */ e.jsx(Ir, { className: "mt-1 h-6 w-6 cursor-pointer rounded border border-blue-400 p-1 text-blue-400 duration-200 hover:scale-105 hover:bg-blue-400 hover:text-white" }) }),
263
264
  /* @__PURE__ */ e.jsx(
264
- Ar,
265
+ Pr,
265
266
  {
266
267
  onClick: () => t(),
267
268
  className: "mt-1 h-6 w-6 cursor-pointer rounded border border-red-400 p-1 text-red-400 duration-200 hover:scale-105 hover:bg-red-400 hover:text-white"
@@ -270,8 +271,8 @@ const we = ({ data: r, fullView: a }) => {
270
271
  ] }),
271
272
  !m(d) && !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: F(d) })
272
273
  ] });
273
- }, rs = ({ bindingData: r, onChange: a }) => {
274
- const t = G(), [n] = rt(), l = Lr(), [s, d] = j(
274
+ }, ts = ({ bindingData: r, onChange: a }) => {
275
+ const t = G(), [n] = rt(), l = Er(), [s, d] = j(
275
276
  _(r, (i, g) => ({ key: g, value: i }))
276
277
  );
277
278
  P(() => {
@@ -309,7 +310,7 @@ const we = ({ data: r, fullView: a }) => {
309
310
  /* @__PURE__ */ e.jsx("a", { className: "text-blue-500", href: "https://chaibuilder.com/docs/registering-data-providers", target: "_blank", children: "Learn more" })
310
311
  ] }) }) : /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
311
312
  _(s, (i, g) => /* @__PURE__ */ e.jsx(
312
- ts,
313
+ es,
313
314
  {
314
315
  item: i,
315
316
  onAddBinding: o,
@@ -339,7 +340,7 @@ const we = ({ data: r, fullView: a }) => {
339
340
  c && /* @__PURE__ */ e.jsx(E, { sideOffset: -55, className: "text-[11px]", children: m(n) ? "No data provider has been set up for this page." : "Complete last added data binding to add more" })
340
341
  ] })
341
342
  ] });
342
- }, ss = () => /* @__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" }), Ce = mt(({ id: r, properties: a, formData: t, onChange: n }) => {
343
+ }, rs = () => /* @__PURE__ */ e.jsx("div", { className: "text-xs border rounded-sm p-1 mt-1 border-orange-500 text-orange-500 bg-orange-100", children: "Data binding is set for this field" }), Ce = mt(({ id: r, properties: a, formData: t, onChange: n }) => {
343
344
  const [l, s] = j(t), d = { type: "object", properties: {} }, c = {};
344
345
  Object.keys(a).forEach((p) => {
345
346
  const h = a[p];
@@ -359,10 +360,10 @@ const we = ({ data: r, fullView: a }) => {
359
360
  // save only every 5 seconds
360
361
  );
361
362
  return /* @__PURE__ */ e.jsx(
362
- Fr,
363
+ Xr,
363
364
  {
364
365
  widgets: {
365
- binding: ss,
366
+ binding: rs,
366
367
  richtext: yr,
367
368
  icon: hr,
368
369
  image: br
@@ -373,7 +374,7 @@ const we = ({ data: r, fullView: a }) => {
373
374
  omitExtraData: !1,
374
375
  liveOmit: !1,
375
376
  liveValidate: !1,
376
- validator: Zr,
377
+ validator: Fr,
377
378
  uiSchema: c,
378
379
  schema: d,
379
380
  formData: l,
@@ -382,8 +383,8 @@ const we = ({ data: r, fullView: a }) => {
382
383
  }
383
384
  }
384
385
  );
385
- }), as = () => {
386
- const [r, a] = Wr(), t = fr(), n = (d, c) => {
386
+ }), ss = () => {
387
+ const [r, a] = Zr(), t = fr(), n = (d, c) => {
387
388
  a((o) => ({ ...o, [d]: c }));
388
389
  };
389
390
  if (m(t))
@@ -405,7 +406,7 @@ const we = ({ data: r, fullView: a }) => {
405
406
  ) })
406
407
  ] });
407
408
  };
408
- function ls() {
409
+ function as() {
409
410
  const r = G(), a = st(), t = at(), n = Re(r._type), l = { ...r }, [s, d] = j(l), c = lt("dataBindingSupport", !1), o = ({ formData: x }, u, v) => {
410
411
  if (u && (s == null ? void 0 : s._id) === r._id) {
411
412
  const C = u.replace("root.", "");
@@ -429,7 +430,7 @@ function ls() {
429
430
  return c && _t(i, (u) => delete x[u]), x;
430
431
  }, [n, i, c]);
431
432
  return /* @__PURE__ */ e.jsxs("div", { className: "overflow-x-hidden", children: [
432
- /* @__PURE__ */ e.jsx(as, {}),
433
+ /* @__PURE__ */ e.jsx(ss, {}),
433
434
  c ? /* @__PURE__ */ e.jsxs(ot, { type: "multiple", defaultValue: ["STATIC", "BINDING"], className: "h-full w-full", children: [
434
435
  /* @__PURE__ */ e.jsxs(me, { value: "BINDING", children: [
435
436
  /* @__PURE__ */ e.jsx(fe, { className: "bg-gray-100 px-3 py-2 text-xs hover:no-underline", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
@@ -442,7 +443,7 @@ function ls() {
442
443
  "Data Binding"
443
444
  ] }) }),
444
445
  /* @__PURE__ */ e.jsx(ve, { className: "px-4 pt-4", children: /* @__PURE__ */ e.jsx(
445
- rs,
446
+ ts,
446
447
  {
447
448
  bindingData: y(r, "_bindings", {}),
448
449
  onChange: (x) => {
@@ -486,7 +487,7 @@ function ls() {
486
487
  )
487
488
  ] });
488
489
  }
489
- const os = ({ blockId: r }) => {
490
+ const ls = ({ blockId: r }) => {
490
491
  const { t: a } = B(), { askAi: t, loading: n, error: l } = jr(), [s, d] = j(""), c = ft(null);
491
492
  P(() => {
492
493
  var p;
@@ -521,7 +522,7 @@ const os = ({ blockId: r }) => {
521
522
  className: "w-fit",
522
523
  size: "sm",
523
524
  children: n ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
524
- /* @__PURE__ */ e.jsx($r, { className: "h-5 w-5 animate-spin" }),
525
+ /* @__PURE__ */ e.jsx(Ar, { className: "h-5 w-5 animate-spin" }),
525
526
  a("Generating... Please wait")
526
527
  ] }) : a("Edit with AI")
527
528
  }
@@ -535,7 +536,7 @@ const os = ({ blockId: r }) => {
535
536
  ] }) : null
536
537
  ] })
537
538
  ] });
538
- }, Oe = new Gr(Kr, {
539
+ }, Oe = new Ur(Gr, {
539
540
  isCaseSensitive: !1,
540
541
  threshold: 0.2,
541
542
  minMatchCharLength: 2,
@@ -543,7 +544,7 @@ const os = ({ blockId: r }) => {
543
544
  });
544
545
  function ut() {
545
546
  var S;
546
- const { t: r } = B(), [a] = pe(), t = G(), n = Te(), l = nt(), [s] = it(), d = lt("askAiCallBack", null), [c, o] = j(""), { toast: p } = dt(), h = (S = ae(a)) == null ? void 0 : S.prop, i = St((y(t, h, "").replace(Jr, "").split(",").pop() || "").split(" "), m), g = () => {
547
+ const { t: r } = B(), [a] = pe(), t = G(), n = Te(), l = nt(), [s] = it(), d = lt("askAiCallBack", null), [c, o] = j(""), { toast: p } = dt(), h = (S = ae(a)) == null ? void 0 : S.prop, i = St((y(t, h, "").replace(qr, "").split(",").pop() || "").split(" "), m), g = () => {
547
548
  const w = c.trim().toLowerCase().replace(/ +(?= )/g, "").split(" ");
548
549
  n(s, w, !0), o("");
549
550
  }, [x, u] = j([]), v = ({ value: w }) => {
@@ -591,7 +592,7 @@ function ut() {
591
592
  {
592
593
  className: `flex ${x.length > 0 ? "min-h-[300px]" : "min-h-max"} w-full flex-col gap-y-1.5 overflow-y-auto border-b-2 bg-gray-100 pb-4`,
593
594
  children: [
594
- /* @__PURE__ */ e.jsxs(Nr, { className: "flex items-center justify-between gap-x-2", children: [
595
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-x-2", children: [
595
596
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
596
597
  /* @__PURE__ */ e.jsx("span", { children: r("Classes") }),
597
598
  /* @__PURE__ */ e.jsxs($, { children: [
@@ -601,15 +602,15 @@ function ut() {
601
602
  ] }),
602
603
  d ? /* @__PURE__ */ e.jsxs(Qe, { children: [
603
604
  /* @__PURE__ */ e.jsx(et, { children: /* @__PURE__ */ e.jsxs(A, { variant: "default", className: "h-6 w-fit", size: "sm", children: [
604
- /* @__PURE__ */ e.jsx(Mr, { className: "h-4 w-4" }),
605
+ /* @__PURE__ */ e.jsx($r, { className: "h-4 w-4" }),
605
606
  /* @__PURE__ */ e.jsx("span", { className: "ml-2", children: r("Ask AI") })
606
607
  ] }) }),
607
- /* @__PURE__ */ e.jsx(tt, { side: "left", className: "p-2", children: /* @__PURE__ */ e.jsx(os, { blockId: t == null ? void 0 : t._id }) })
608
+ /* @__PURE__ */ e.jsx(tt, { side: "left", className: "p-2", children: /* @__PURE__ */ e.jsx(ls, { blockId: t == null ? void 0 : t._id }) })
608
609
  ] }) : null
609
610
  ] }),
610
611
  /* @__PURE__ */ e.jsxs("div", { className: "relative flex items-center gap-x-3", children: [
611
612
  /* @__PURE__ */ e.jsx("div", { className: "relative flex w-full items-center gap-x-3", children: /* @__PURE__ */ e.jsx(
612
- Ur,
613
+ Wr,
613
614
  {
614
615
  suggestions: x,
615
616
  onSuggestionsFetchRequested: v,
@@ -662,7 +663,7 @@ function ut() {
662
663
  }
663
664
  );
664
665
  }
665
- const ns = ({ onAdd: r }) => {
666
+ const os = ({ onAdd: r }) => {
666
667
  const { t: a } = B(), [t, n] = j({ key: "", value: "" }), l = () => {
667
668
  m(t.key) || (r({ ...t, key: Tt(t.key) }), n({ key: "", value: "" }));
668
669
  };
@@ -708,7 +709,7 @@ const ns = ({ onAdd: r }) => {
708
709
  m(t.key) ? null : /* @__PURE__ */ e.jsx(A, { variant: "ghost", onClick: () => n({ key: "", value: "" }), children: a("Cancel") })
709
710
  ] })
710
711
  ] });
711
- }, is = () => {
712
+ }, ns = () => {
712
713
  const r = G(), [a, t] = j([]), [n] = pe(), l = st(), s = at(), { t: d } = B(), { toast: c } = dt(), o = `${y(n, "0.prop")}_attrs`;
713
714
  ne.useEffect(() => {
714
715
  const g = _(y(r, o), (x, u) => ({ key: u, value: x }));
@@ -771,7 +772,7 @@ const ns = ({ onAdd: r }) => {
771
772
  disabled: W(g.value, "dnd-"),
772
773
  className: "invisible group-hover:visible",
773
774
  onClick: () => p(a.indexOf(g)),
774
- children: /* @__PURE__ */ e.jsx(Er, { className: "w-4 text-gray-500" })
775
+ children: /* @__PURE__ */ e.jsx(Mr, { className: "w-4 text-gray-500" })
775
776
  }
776
777
  ) }),
777
778
  /* @__PURE__ */ e.jsx(E, { className: "max-w-[200px]", children: W(g.value, "dnd-") ? d("Predefined attribute. Cannot be deleted") : d("Remove attribute") })
@@ -780,9 +781,9 @@ const ns = ({ onAdd: r }) => {
780
781
  )
781
782
  ] }) }),
782
783
  /* @__PURE__ */ e.jsx("div", { className: "py-2" }),
783
- /* @__PURE__ */ e.jsx(ns, { onAdd: (g) => h(g) })
784
+ /* @__PURE__ */ e.jsx(os, { onAdd: (g) => h(g) })
784
785
  ] }) });
785
- }, k = ["px", "%", "em", "rem", "ch", "vh", "vw"], ds = {
786
+ }, k = ["px", "%", "em", "rem", "ch", "vh", "vw"], is = {
786
787
  heading: "flex.heading",
787
788
  items: [
788
789
  { type: "arbitrary", label: "flex.basis", units: k, property: "flexBasis" },
@@ -791,7 +792,7 @@ const ns = ({ onAdd: r }) => {
791
792
  { type: "dropdown", label: "flex.grow", property: "flexGrow" },
792
793
  { type: "dropdown", label: "flex.shrink", property: "flexShrink" }
793
794
  ]
794
- }, cs = {
795
+ }, ds = {
795
796
  heading: "grid.heading",
796
797
  items: [
797
798
  { type: "range", label: "grid.col_span", property: "gridColSpan" },
@@ -802,7 +803,7 @@ const ns = ({ onAdd: r }) => {
802
803
  { type: "range", label: "grid.row_end", property: "gridRowEnd" },
803
804
  { type: "range", label: "grid.order", property: "order" }
804
805
  ]
805
- }, ps = [
806
+ }, cs = [
806
807
  {
807
808
  heading: "Styles",
808
809
  items: [
@@ -866,7 +867,7 @@ const ns = ({ onAdd: r }) => {
866
867
  },
867
868
  {
868
869
  heading: "Attributes",
869
- items: [{ component: is }]
870
+ items: [{ component: ns }]
870
871
  }
871
872
  ], Ta = [
872
873
  {
@@ -1466,7 +1467,7 @@ const ns = ({ onAdd: r }) => {
1466
1467
  )
1467
1468
  ] }),
1468
1469
  static: Ut
1469
- }, le = Fe({ canReset: !1, canChange: !0 }), us = ({ children: r, canReset: a = !1, canChange: t = !0 }) => (
1470
+ }, le = Fe({ canReset: !1, canChange: !0 }), ps = ({ children: r, canReset: a = !1, canChange: t = !0 }) => (
1470
1471
  // eslint-disable-next-line react/jsx-no-constructed-context-values
1471
1472
  /* @__PURE__ */ e.jsx(le.Provider, { value: { canReset: a, canChange: t }, children: r })
1472
1473
  ), xt = ({ label: r, property: a, onChange: t }) => {
@@ -1489,7 +1490,7 @@ const ns = ({ onAdd: r }) => {
1489
1490
  ) });
1490
1491
  };
1491
1492
  function ke({ selected: r, onChange: a, rounded: t = !1, options: n, disabled: l = !1 }) {
1492
- const s = r.replace(/.*:/g, "").trim(), { undo: d, redo: c } = _r();
1493
+ const s = r.replace(/.*:/g, "").trim(), { undo: d, redo: c } = Nr();
1493
1494
  return /* @__PURE__ */ e.jsxs(
1494
1495
  "select",
1495
1496
  {
@@ -1509,7 +1510,7 @@ function ke({ selected: r, onChange: a, rounded: t = !1, options: n, disabled: l
1509
1510
  }
1510
1511
  );
1511
1512
  }
1512
- const gs = ({ property: r, onChange: a }) => {
1513
+ const us = ({ property: r, onChange: a }) => {
1513
1514
  const { canReset: t, canChange: n } = se(le), l = oe(r), s = T(() => y(l, "cls", ""), [l]), d = T(() => y(ge, `${r}.classes`, [""]), [r]), c = d.indexOf(s) > -1 ? d.indexOf(s) : 0, o = /\[.*\]/g.test(s);
1514
1515
  return /* @__PURE__ */ e.jsx("div", { className: "flex flex-row divide-x divide-solid divide-border rounded border border-border text-xs", children: o ? /* @__PURE__ */ e.jsx("div", { className: "py-[5px] px-2", children: s }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1515
1516
  /* @__PURE__ */ e.jsx(
@@ -1544,7 +1545,7 @@ const gs = ({ property: r, onChange: a }) => {
1544
1545
  }
1545
1546
  )
1546
1547
  ] }) });
1547
- }, xs = ({ property: r, onChange: a }) => {
1548
+ }, gs = ({ property: r, onChange: a }) => {
1548
1549
  const t = T(() => y(ge, `${r}.classes`, [""]), [r]), { canChange: n } = se(le), l = oe(r), s = T(() => y(l, "cls", ""), [l]);
1549
1550
  return /* @__PURE__ */ e.jsx("div", { className: "flex grow flex-wrap gap-1", children: _(t, (d) => /* @__PURE__ */ e.jsxs($, { children: [
1550
1551
  /* @__PURE__ */ e.jsx(M, { asChild: !0, children: /* @__PURE__ */ e.jsx(
@@ -1559,7 +1560,7 @@ const gs = ({ property: r, onChange: a }) => {
1559
1560
  ) }),
1560
1561
  /* @__PURE__ */ e.jsx(E, { children: F(re(d)) })
1561
1562
  ] })) });
1562
- }, ys = {
1563
+ }, xs = {
1563
1564
  backgroundColor: "bg",
1564
1565
  textColor: "text",
1565
1566
  borderColor: "border",
@@ -1571,7 +1572,7 @@ const gs = ({ property: r, onChange: a }) => {
1571
1572
  toColor: "to",
1572
1573
  ringColor: "ring",
1573
1574
  ringOffsetColor: "ring-offset"
1574
- }, hs = ({ property: r, onChange: a }) => {
1575
+ }, ys = ({ property: r, onChange: a }) => {
1575
1576
  const t = oe(r), n = T(() => y(t, "cls", ""), [t]), { canChange: l } = se(le), [s, d] = j([]), [c, o] = j({ color: "", shade: "" }), p = n.split("-"), h = y(p, "1", ""), i = y(p, "2", ""), g = H(
1576
1577
  // eslint-disable-next-line no-shadow
1577
1578
  (u) => {
@@ -1594,7 +1595,7 @@ const gs = ({ property: r, onChange: a }) => {
1594
1595
  return P(() => {
1595
1596
  o({ color: "", shade: "" });
1596
1597
  }, [t]), P(() => {
1597
- const v = `${y(ys, r, "")}-${c.color}${c.shade ? `-${c.shade}` : ""}`;
1598
+ const v = `${y(xs, r, "")}-${c.color}${c.shade ? `-${c.shade}` : ""}`;
1598
1599
  v.match(new RegExp(y(ge, `${r}.regExp`, ""))) && a(v, r);
1599
1600
  }, [c, a, r]), /* @__PURE__ */ e.jsxs("div", { className: "flex flex-row divide-x divide-solid divide-border rounded-lg border border-border text-xs", children: [
1600
1601
  /* @__PURE__ */ e.jsx("div", { className: "grow text-center", children: /* @__PURE__ */ e.jsx(
@@ -1648,7 +1649,7 @@ const gs = ({ property: r, onChange: a }) => {
1648
1649
  const l = r.match(n), s = l && l.length > 1, d = !m(t) && Number.isNaN(Number(t));
1649
1650
  return s || d ? { error: "Invalid value" } : l && (l[0] === "auto" || l[0] === "none") ? { value: l[0], unit: "" } : { value: t, unit: l ? l[0] : "" };
1650
1651
  };
1651
- const bs = (r) => {
1652
+ const hs = (r) => {
1652
1653
  const a = r.startsWith("-") ? "-" : "", t = r.split("-").pop();
1653
1654
  if (["auto", "none"].includes(t))
1654
1655
  return { value: "", unit: t };
@@ -1777,18 +1778,18 @@ const bs = (r) => {
1777
1778
  }
1778
1779
  return Rt(parseFloat(t)) ? { value: `${a + parseFloat(t) * 4}`, unit: "px" } : { value: t, unit: "class" };
1779
1780
  };
1780
- const ms = (r) => {
1781
+ const bs = (r) => {
1781
1782
  if (m(r))
1782
1783
  return { value: "", unit: "" };
1783
1784
  const a = r.match(/\[.*\]/g);
1784
1785
  if (a === null)
1785
- return fs(r);
1786
+ return ms(r);
1786
1787
  const t = y(a, "0", "").replace(/\[|\]/g, ""), n = r.startsWith("-") ? "-" : "", l = ae(t.match(/\d+.\d+|\d+/g));
1787
1788
  return { value: `${n}${l}`, unit: t.replace(l, "") };
1788
- }, fs = (r) => m(r) ? { value: "", unit: "" } : bs(r), yt = I.createContext({
1789
+ }, ms = (r) => m(r) ? { value: "", unit: "" } : hs(r), yt = I.createContext({
1789
1790
  setDragData: () => {
1790
1791
  }
1791
- }), vs = ({
1792
+ }), fs = ({
1792
1793
  unit: r,
1793
1794
  currentValue: a,
1794
1795
  onDrag: t,
@@ -1820,7 +1821,7 @@ const ms = (r) => {
1820
1821
  children: /* @__PURE__ */ e.jsx(Kt, {})
1821
1822
  }
1822
1823
  );
1823
- }, js = ({ onSelect: r, current: a, units: t }) => /* @__PURE__ */ e.jsx("div", { "data-theme": "light", className: "-m-[7px] -mx-[13px] flex w-9 flex-col", children: t.map((n) => /* @__PURE__ */ e.jsx(
1824
+ }, vs = ({ onSelect: r, current: a, units: t }) => /* @__PURE__ */ e.jsx("div", { "data-theme": "light", className: "-m-[7px] -mx-[13px] flex w-9 flex-col", children: t.map((n) => /* @__PURE__ */ e.jsx(
1824
1825
  A,
1825
1826
  {
1826
1827
  className: "h-max rounded-none px-1 py-1 text-right text-[11px] hover:bg-blue-400",
@@ -1832,10 +1833,10 @@ const ms = (r) => {
1832
1833
  children: n
1833
1834
  },
1834
1835
  n
1835
- )) }), Ye = 50, ws = (r) => {
1836
+ )) }), Ye = 50, js = (r) => {
1836
1837
  const [a, t] = j(!1), [n, l] = j(""), { currentClass: s, onChange: d, classPrefix: c, cssProperty: o, units: p, negative: h } = r, [i, g] = j(o != null && o.toLowerCase().includes("width") ? "%" : p[0]), [x, u] = j(!1), [v, C] = j(""), [U, L] = j(!1), [K, q] = j(!1);
1837
1838
  P(() => {
1838
- const { value: b, unit: f } = ms(s);
1839
+ const { value: b, unit: f } = bs(s);
1839
1840
  if (f === "") {
1840
1841
  l(b), g(o != null && o.toLowerCase().includes("width") ? "%" : ae(p));
1841
1842
  return;
@@ -1934,8 +1935,8 @@ const ms = (r) => {
1934
1935
  ]
1935
1936
  }
1936
1937
  ) }),
1937
- /* @__PURE__ */ e.jsx(Sr, { children: /* @__PURE__ */ e.jsx(E, { className: "bg-background", children: /* @__PURE__ */ e.jsx(
1938
- js,
1938
+ /* @__PURE__ */ e.jsx(_r, { children: /* @__PURE__ */ e.jsx(E, { className: "bg-background", children: /* @__PURE__ */ e.jsx(
1939
+ vs,
1939
1940
  {
1940
1941
  units: p,
1941
1942
  current: i,
@@ -1947,7 +1948,7 @@ const ms = (r) => {
1947
1948
  ] })
1948
1949
  ] }),
1949
1950
  ["none", "auto"].indexOf(i) !== -1 || U ? null : /* @__PURE__ */ e.jsx(
1950
- vs,
1951
+ fs,
1951
1952
  {
1952
1953
  onDragStart: () => L(!0),
1953
1954
  onDragEnd: (b) => {
@@ -1973,7 +1974,7 @@ const ms = (r) => {
1973
1974
  }, oe = (r) => {
1974
1975
  const a = ue();
1975
1976
  return Ht(a, { property: r });
1976
- }, Cs = (r, a) => {
1977
+ }, ws = (r, a) => {
1977
1978
  const t = {
1978
1979
  xs: 0,
1979
1980
  sm: 1,
@@ -1983,7 +1984,7 @@ const ms = (r) => {
1983
1984
  "2xl": 5
1984
1985
  };
1985
1986
  return t[y(r, "mq", "xs")] <= t[a];
1986
- }, ks = {
1987
+ }, Cs = {
1987
1988
  width: "w-",
1988
1989
  height: "h-",
1989
1990
  minWidth: "min-w-",
@@ -2056,19 +2057,19 @@ const ms = (r) => {
2056
2057
  lg: "1024px",
2057
2058
  xl: "1280px",
2058
2059
  "2xl": "1536px"
2059
- }, Ns = (r) => `${r.toUpperCase()} ${Xe[r] ? `(${Xe[r]} & up)` : ""}`, Ve = (r) => {
2060
+ }, ks = (r) => `${r.toUpperCase()} ${Xe[r] ? `(${Xe[r]} & up)` : ""}`, Ve = (r) => {
2060
2061
  const { t: a } = B(), { type: t = "icons", label: n, property: l, onEmitChange: s = () => {
2061
- }, units: d, negative: c = !1 } = r, [o] = Tr(), [p] = Rr(), [, h] = Ie(), i = oe(l), g = Te(), x = nt(), [u] = it(), v = T(() => y(i, "fullCls", ""), [i]), C = H(
2062
+ }, units: d, negative: c = !1 } = r, [o] = Sr(), [p] = Tr(), [, h] = Ie(), i = oe(l), g = Te(), x = nt(), [u] = it(), v = T(() => y(i, "fullCls", ""), [i]), C = H(
2062
2063
  (w, D = !0) => {
2063
2064
  const Z = { dark: o, mq: h, mod: p, cls: w, property: l, fullCls: "" };
2064
2065
  (o || p !== "") && (Z.mq = "xs");
2065
- const b = qr(Z);
2066
+ const b = Kr(Z);
2066
2067
  g(u, [b], D);
2067
2068
  },
2068
2069
  [u, o, h, p, l, g]
2069
2070
  ), U = H(() => {
2070
2071
  x(u, [v]);
2071
- }, [u, v, x]), L = T(() => Cs(i, h), [i, h]);
2072
+ }, [u, v, x]), L = T(() => ws(i, h), [i, h]);
2072
2073
  P(() => {
2073
2074
  s(L, i);
2074
2075
  }, [L, s, i]);
@@ -2085,24 +2086,24 @@ const ms = (r) => {
2085
2086
  },
2086
2087
  [K]
2087
2088
  ), S = y(i, "dark", null) === o && y(i, "mod", null) === p && y(i, "mq", null) === h;
2088
- return /* @__PURE__ */ e.jsx(us, { canChange: L, canReset: i && S, children: /* @__PURE__ */ e.jsxs("div", { className: "group flex flex-row items-center py-2 first:pt-0 last:pb-0", children: [
2089
+ return /* @__PURE__ */ e.jsx(ps, { canChange: L, canReset: i && S, children: /* @__PURE__ */ e.jsxs("div", { className: "group flex flex-row items-center py-2 first:pt-0 last:pb-0", children: [
2089
2090
  /* @__PURE__ */ e.jsx("div", { className: "relative w-[70px] truncate text-xs text-foreground", children: /* @__PURE__ */ e.jsx("span", { className: `text-[11px] ${i && !S ? "text-foreground" : ""}`, children: a(n) }) }),
2090
2091
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-row items-center", children: [
2091
2092
  /* @__PURE__ */ e.jsxs("div", { className: "w-[150px]", children: [
2092
2093
  t === "arbitrary" ? /* @__PURE__ */ e.jsx(
2093
- ws,
2094
+ js,
2094
2095
  {
2095
2096
  currentClass: y(i, "cls", ""),
2096
- classPrefix: y(ks, l, ""),
2097
+ classPrefix: y(Cs, l, ""),
2097
2098
  units: d || [],
2098
2099
  onChange: C,
2099
2100
  negative: c,
2100
2101
  cssProperty: l
2101
2102
  }
2102
2103
  ) : null,
2103
- t === "icons" && /* @__PURE__ */ e.jsx(xs, { property: l, onChange: C }),
2104
- t === "range" && /* @__PURE__ */ e.jsx(gs, { property: l, onChange: C }),
2105
- t === "color" && /* @__PURE__ */ e.jsx(hs, { property: l, onChange: C }),
2104
+ t === "icons" && /* @__PURE__ */ e.jsx(gs, { property: l, onChange: C }),
2105
+ t === "range" && /* @__PURE__ */ e.jsx(us, { property: l, onChange: C }),
2106
+ t === "color" && /* @__PURE__ */ e.jsx(ys, { property: l, onChange: C }),
2106
2107
  t === "dropdown" && /* @__PURE__ */ e.jsx(xt, { label: n, property: l, onChange: C })
2107
2108
  ] }),
2108
2109
  /* @__PURE__ */ e.jsx("div", { className: `w-[30px] cursor-pointer ${v ? "visible" : "invisible"}`, children: S ? /* @__PURE__ */ e.jsx("button", { type: "button", onClick: () => U(), title: "Reset", className: "flex px-1.5 text-xs", children: /* @__PURE__ */ e.jsx(Jt, { className: "h-5 w-5 text-blue-500 hover:opacity-80" }) }) : L && i ? /* @__PURE__ */ e.jsxs($, { delayDuration: 100, children: [
@@ -2117,7 +2118,7 @@ const ms = (r) => {
2117
2118
  /* @__PURE__ */ e.jsx(E, { children: /* @__PURE__ */ e.jsx("div", { className: "text-right", children: /* @__PURE__ */ e.jsxs("div", { children: [
2118
2119
  "Current style is set at  ",
2119
2120
  /* @__PURE__ */ e.jsxs("span", { className: "font-bold", children: [
2120
- Ns(y(i, "mq")),
2121
+ ks(y(i, "mq")),
2121
2122
  o && !i.dark ? "(Light mode)" : ""
2122
2123
  ] }),
2123
2124
  /* @__PURE__ */ e.jsx("br", {}),
@@ -2137,13 +2138,13 @@ const ms = (r) => {
2137
2138
  ] }) : null })
2138
2139
  ] })
2139
2140
  ] }) });
2140
- }, _s = ["px", "%", "em", "rem", "ch", "vh", "vw"], ht = ({
2141
+ }, Ns = ["px", "%", "em", "rem", "ch", "vh", "vw"], ht = ({
2141
2142
  label: r,
2142
2143
  options: a,
2143
2144
  borderB: t = !1,
2144
2145
  borderT: n = !1,
2145
2146
  type: l = "arbitrary",
2146
- units: s = _s,
2147
+ units: s = Ns,
2147
2148
  negative: d = !1
2148
2149
  }) => {
2149
2150
  const { t: c } = B(), [o, p] = j(a[0].key), h = ue(), i = H((g) => _(h, "property").includes(g), [h]);
@@ -2187,7 +2188,7 @@ const ms = (r) => {
2187
2188
  ]
2188
2189
  }
2189
2190
  );
2190
- }, Ss = ({ heading: r, items: a }) => {
2191
+ }, _s = ({ heading: r, items: a }) => {
2191
2192
  const { t } = B(), n = ue(), l = T(() => {
2192
2193
  const s = (o) => De(
2193
2194
  o.map((p) => p.styleType === "multiple" ? _(p.options, "key") : p.property)
@@ -2208,7 +2209,7 @@ const ms = (r) => {
2208
2209
  ] }) }),
2209
2210
  /* @__PURE__ */ e.jsx("div", { className: "p-2", children: a.map((s) => s.styleType === "multiple" ? /* @__PURE__ */ e.jsx(ht, { ...s }, s.label) : /* @__PURE__ */ e.jsx(Ve, { ...s }, s.label)) })
2210
2211
  ] });
2211
- }, Ts = Fe({}), xe = ({ section: r }) => {
2212
+ }, Ss = Fe({}), xe = ({ section: r }) => {
2212
2213
  const { t: a } = B(), t = ue(), n = H(
2213
2214
  (s = []) => {
2214
2215
  const d = {};
@@ -2224,26 +2225,26 @@ const ms = (r) => {
2224
2225
  },
2225
2226
  [t]
2226
2227
  ), l = T(() => ({}), []);
2227
- return /* @__PURE__ */ e.jsx(Ts.Provider, { value: l, children: /* @__PURE__ */ e.jsxs(me, { value: r.heading, children: [
2228
+ return /* @__PURE__ */ e.jsx(Ss.Provider, { value: l, children: /* @__PURE__ */ e.jsxs(me, { value: r.heading, children: [
2228
2229
  /* @__PURE__ */ e.jsx(fe, { className: "bg-gray-200 px-3 py-2 text-xs hover:no-underline", children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-x-2", children: a(r.heading) }) }),
2229
2230
  /* @__PURE__ */ e.jsx(ve, { className: "bg-gray-100 px-3.5 py-2", children: I.Children.toArray(
2230
- r.items.map((s) => ie(s, "component") ? I.createElement(s.component, { key: s.label }) : ie(s, "styleType") ? s.styleType === "multiple" ? /* @__PURE__ */ e.jsx(ht, { ...s }, s.label) : s.styleType === "accordion" && n(s == null ? void 0 : s.conditions) ? /* @__PURE__ */ e.jsx(Ss, { ...s }, s.label) : null : /* @__PURE__ */ e.jsx(Ve, { ...s }, s.label))
2231
+ r.items.map((s) => ie(s, "component") ? I.createElement(s.component, { key: s.label }) : ie(s, "styleType") ? s.styleType === "multiple" ? /* @__PURE__ */ e.jsx(ht, { ...s }, s.label) : s.styleType === "accordion" && n(s == null ? void 0 : s.conditions) ? /* @__PURE__ */ e.jsx(_s, { ...s }, s.label) : null : /* @__PURE__ */ e.jsx(Ve, { ...s }, s.label))
2231
2232
  ) })
2232
2233
  ] }) });
2233
- }, Rs = () => {
2234
- const r = G(), [a] = pe(), { t } = B(), n = Or(), l = Te(), s = Re(r._type), d = y(ae(a), "prop"), c = y(s.props, `${d}.presets`, {});
2234
+ }, Ts = () => {
2235
+ const r = G(), [a] = pe(), { t } = B(), n = Lr(), l = Te(), s = Re(r._type), d = y(ae(a), "prop"), c = y(s.props, `${d}.presets`, {});
2235
2236
  if (m(n) && (!ie(s, "props") || m(c)))
2236
2237
  return null;
2237
2238
  const o = (p) => {
2238
2239
  const h = p.trim().toLowerCase().replace(/ +(?= )/g, "").split(" ");
2239
2240
  l([r._id], h, !0);
2240
2241
  };
2241
- return /* @__PURE__ */ e.jsx("div", { className: "h-10", children: /* @__PURE__ */ e.jsxs(Vr, { children: [
2242
- /* @__PURE__ */ e.jsx(Hr, { asChild: !0, children: /* @__PURE__ */ e.jsx("div", { className: "px-4", children: /* @__PURE__ */ e.jsxs(A, { variant: "default", className: "w-full", size: "sm", children: [
2242
+ return /* @__PURE__ */ e.jsx("div", { className: "h-10", children: /* @__PURE__ */ e.jsxs(Rr, { children: [
2243
+ /* @__PURE__ */ e.jsx(Vr, { asChild: !0, children: /* @__PURE__ */ e.jsx("div", { className: "px-4", children: /* @__PURE__ */ e.jsxs(A, { variant: "default", className: "w-full", size: "sm", children: [
2243
2244
  t("Apply Presets"),
2244
2245
  /* @__PURE__ */ e.jsx(Qt, {})
2245
2246
  ] }) }) }),
2246
- /* @__PURE__ */ e.jsx(Dr, { className: "max-h-80 w-56", children: /* @__PURE__ */ e.jsxs(ct, { className: "no-scrollbar h-full", children: [
2247
+ /* @__PURE__ */ e.jsx(Hr, { className: "max-h-80 w-56", children: /* @__PURE__ */ e.jsxs(ct, { className: "no-scrollbar h-full", children: [
2247
2248
  m(c) ? null : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2248
2249
  /* @__PURE__ */ e.jsxs(Pe, { children: [
2249
2250
  s.type,
@@ -2267,21 +2268,21 @@ const ms = (r) => {
2267
2268
  ] }) })
2268
2269
  ] }) });
2269
2270
  };
2270
- function Vs() {
2271
- const { flexChild: r, gridChild: a } = Br(), { t } = B(), [n] = pe();
2271
+ function Rs() {
2272
+ const { flexChild: r, gridChild: a } = Dr(), { t } = B(), [n] = pe();
2272
2273
  return m(n) ? /* @__PURE__ */ e.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 rounded-xl p-4", children: [
2273
2274
  /* @__PURE__ */ e.jsx(qe, { className: "mx-auto text-3xl" }),
2274
2275
  /* @__PURE__ */ e.jsx("h1", { children: t("no_styling_block_selected") })
2275
2276
  ] }) }) : /* @__PURE__ */ e.jsxs("div", { className: "flex h-full flex-col", children: [
2276
- /* @__PURE__ */ e.jsx(Rs, {}),
2277
+ /* @__PURE__ */ e.jsx(Ts, {}),
2277
2278
  /* @__PURE__ */ e.jsxs(ot, { defaultValue: ["Styles"], type: "multiple", className: "w-full", children: [
2278
- r && /* @__PURE__ */ e.jsx(xe, { section: ds }),
2279
- a ? /* @__PURE__ */ e.jsx(xe, { section: cs }) : null,
2280
- ps.map((l) => /* @__PURE__ */ e.jsx(xe, { section: l }, l.heading))
2279
+ r && /* @__PURE__ */ e.jsx(xe, { section: is }),
2280
+ a ? /* @__PURE__ */ e.jsx(xe, { section: ds }) : null,
2281
+ cs.map((l) => /* @__PURE__ */ e.jsx(xe, { section: l }, l.heading))
2281
2282
  ] })
2282
2283
  ] });
2283
2284
  }
2284
- const Hs = {
2285
+ const Vs = {
2285
2286
  px: 1,
2286
2287
  "%": 1,
2287
2288
  em: 100,
@@ -2307,7 +2308,7 @@ const Hs = {
2307
2308
  const p = !y(l, "negative", !1), h = y(l, "cssProperty", "");
2308
2309
  let i = parseFloat(l.dragStartValue);
2309
2310
  i = Ue(i) ? 0 : i;
2310
- let g = Hs[l.dragUnit];
2311
+ let g = Vs[l.dragUnit];
2311
2312
  (W(h, "scale") || h === "opacity") && (g = 10);
2312
2313
  let u = (l.dragStartY - o.pageY) / g + i;
2313
2314
  p && u < 0 && (u = 0), h === "opacity" && u > 1 && (u = 1), l.onDrag(`${u}`), n(`${u}`);
@@ -2339,8 +2340,8 @@ const Hs = {
2339
2340
  }
2340
2341
  ) : null,
2341
2342
  /* @__PURE__ */ e.jsxs(ct, { className: "no-scrollbar max-h-full flex-1 overflow-x-hidden overflow-y-hidden bg-gray-100 pb-5", children: [
2342
- /* @__PURE__ */ e.jsx(ls, {}),
2343
- /* @__PURE__ */ e.jsx(Vs, {})
2343
+ /* @__PURE__ */ e.jsx(as, {}),
2344
+ /* @__PURE__ */ e.jsx(Rs, {})
2344
2345
  ] })
2345
2346
  ] }) });
2346
2347
  };