@chaibuilder/sdk 1.2.40 → 1.2.42

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 (60) hide show
  1. package/dist/{AddBlocks-Q--k4QYI.js → AddBlocks--7JKHvJX.js} +17 -17
  2. package/dist/{AddBlocks-a20tIXfX.cjs → AddBlocks-HZaa1NM6.cjs} +1 -1
  3. package/dist/{CanvasArea-QQn0aXpj.cjs → CanvasArea-CTmYdaUo.cjs} +1 -1
  4. package/dist/{CanvasArea-ahsds4rc.js → CanvasArea-myZvxQCj.js} +2 -2
  5. package/dist/{ChaiBuilderEditor-hcoLrtq8.cjs → ChaiBuilderEditor-GronwWg6.cjs} +37 -37
  6. package/dist/{ChaiBuilderEditor-wfEkvtJ0.js → ChaiBuilderEditor-f4SJU7kK.js} +3839 -3827
  7. package/dist/{CurrentPage-f_5eIFbX.js → CurrentPage-S5EFVi8y.js} +2 -2
  8. package/dist/{CurrentPage-zo2GKFUx.cjs → CurrentPage-hq3wJX-B.cjs} +1 -1
  9. package/dist/{ListTree-FWHoDfbO.cjs → ListTree-PbmMwEnK.cjs} +1 -1
  10. package/dist/{ListTree-3riQsfip.js → ListTree-un8hNvIi.js} +1 -1
  11. package/dist/{PagesPanel-0Wi0ezNZ.cjs → PagesPanel-2zdTxUbm.cjs} +1 -1
  12. package/dist/{PagesPanel-3KIZEXOS.js → PagesPanel-f0XKYnEj.js} +3 -3
  13. package/dist/{ProjectPanel-fEYrObPB.cjs → ProjectPanel-RMEd0gwn.cjs} +1 -1
  14. package/dist/{ProjectPanel-0W6XTu0Y.js → ProjectPanel-vbBl5OmU.js} +3 -3
  15. package/dist/{Settings-ifUbqcam.js → Settings-Lsp-FmFS.js} +110 -110
  16. package/dist/Settings-UqeNroki.cjs +1 -0
  17. package/dist/{SidePanels-JIuL8NLu.cjs → SidePanels-DimF3tJV.cjs} +1 -1
  18. package/dist/{SidePanels-0P4IaIVn.js → SidePanels-zU4GsqbI.js} +2 -2
  19. package/dist/{ThemeConfiguration-7Hef-UKR.js → ThemeConfiguration-1rD36g89.js} +4 -4
  20. package/dist/{ThemeConfiguration-CcUA1_9A.cjs → ThemeConfiguration-76oEQ5z0.cjs} +1 -1
  21. package/dist/{Topbar-0hOp8tE7.js → Topbar--M5IjXGt.js} +1 -1
  22. package/dist/{Topbar-Wte9Jbw7.cjs → Topbar-7bRZS3P8.cjs} +1 -1
  23. package/dist/{UILibrariesPanel-vXOD3qRz.cjs → UILibrariesPanel-1F_Kcnkm.cjs} +1 -1
  24. package/dist/{UILibrariesPanel-qgwFZYvn.js → UILibrariesPanel-EaMt1AzV.js} +1 -1
  25. package/dist/{UnsplashImages-Cfq1lKeC.cjs → UnsplashImages-eq44FmxF.cjs} +1 -1
  26. package/dist/{UnsplashImages-qUDa1vAS.js → UnsplashImages-o7mUozj7.js} +1 -1
  27. package/dist/{UploadImages-Zle03BGi.cjs → UploadImages-o4teNCqv.cjs} +1 -1
  28. package/dist/{UploadImages-Xh-lPuZy.js → UploadImages-s52Hvpts.js} +6 -6
  29. package/dist/{add-page-modal-0jmyeD0x.cjs → add-page-modal-7FLXbRFp.cjs} +1 -1
  30. package/dist/{add-page-modal-ued8fkUY.js → add-page-modal-eoOwcRKz.js} +3 -3
  31. package/dist/{confirm-alert-4kucBgrO.js → confirm-alert-o0OjZdvp.js} +1 -1
  32. package/dist/{confirm-alert-rucvO9GC.cjs → confirm-alert-rFmTdGxh.cjs} +1 -1
  33. package/dist/core.cjs +1 -1
  34. package/dist/core.js +1 -1
  35. package/dist/{delete-page-modal-kxeOpfNd.js → delete-page-modal-OU79XN8M.js} +2 -2
  36. package/dist/{delete-page-modal-Eym3aZzC.cjs → delete-page-modal-sG2uFkT0.cjs} +1 -1
  37. package/dist/email.cjs +1 -1
  38. package/dist/email.js +1 -1
  39. package/dist/{form-2Veryr30.js → form--h34bK4z.js} +1 -1
  40. package/dist/{form-pdF1XhvW.cjs → form-SuV0Z9nJ.cjs} +1 -1
  41. package/dist/{index-SQ1sNajH.cjs → index-3mF2lq-B.cjs} +1 -1
  42. package/dist/{index-OdzdznTv.js → index-7hLL3kv4.js} +2 -2
  43. package/dist/{page-viewer-qr3NscoT.cjs → page-viewer-9-Dy66-a.cjs} +1 -1
  44. package/dist/{page-viewer-6qv40Sm2.js → page-viewer-tfXRwkWz.js} +3 -3
  45. package/dist/{project-general-setting-fm1YfS_2.cjs → project-general-setting-ZbNwglNP.cjs} +1 -1
  46. package/dist/{project-general-setting-GVzAsfrk.js → project-general-setting-ZjAN2VZX.js} +3 -3
  47. package/dist/{project-seo-setting-iPqsGKuc.js → project-seo-setting-gAXZ15Wb.js} +2 -2
  48. package/dist/{project-seo-setting-06jt9oDD.cjs → project-seo-setting-vqWoo5Ev.cjs} +1 -1
  49. package/dist/{single-page-detail-GVtRl8Pt.js → single-page-detail-ISRJ-Ebt.js} +4 -4
  50. package/dist/{single-page-detail-KQVwWJ-J.cjs → single-page-detail-a4nAhK0N.cjs} +1 -1
  51. package/dist/studio.cjs +1 -1
  52. package/dist/studio.js +2 -2
  53. package/dist/ui.cjs +1 -1
  54. package/dist/ui.js +1 -1
  55. package/dist/{useCanvasSettings-yYU51FJ3.cjs → useCanvasSettings-EyxD8eas.cjs} +1 -1
  56. package/dist/{useCanvasSettings-E5uIyvUR.js → useCanvasSettings-fsSISbZ6.js} +1 -1
  57. package/dist/web-blocks.cjs +2 -2
  58. package/dist/web-blocks.js +44 -46
  59. package/package.json +4 -4
  60. package/dist/Settings-kDwumlBm.cjs +0 -1
@@ -5,18 +5,18 @@ import { useThrottledCallback as ue } from "@react-hookz/web";
5
5
  import { forEach as Re, isArray as xe, omit as vt, truncate as jt, includes as F, get as g, first as oe, split as wt, startCase as Y, toLower as le, isEmpty as b, map as C, find as Ge, last as Ct, filter as ve, set as qe, debounce as kt, keys as je, cloneDeep as Nt, each as _t, capitalize as we, reject as St, nth as $e, startsWith as W, isNumber as Tt, parseInt as Rt, isNaN as Je, findLast as Vt, flatten as J, intersection as Qe, has as ce, kebabCase as Ht, isNull as Dt } from "lodash-es";
6
6
  import { useTranslation as X } from "react-i18next";
7
7
  import { CopyIcon as Bt, PlusIcon as Ve, Cross2Icon as et, EyeOpenIcon as Pt, EyeClosedIcon as Ae, BorderAllIcon as O, WidthIcon as T, HeightIcon as R, ArrowUpIcon as ee, ArrowRightIcon as te, ArrowDownIcon as re, ArrowLeftIcon as se, ArrowTopLeftIcon as It, ArrowTopRightIcon as $t, ArrowBottomRightIcon as At, ArrowBottomLeftIcon as Mt, AlignLeftIcon as Lt, AlignCenterHorizontallyIcon as Et, AlignRightIcon as Ot, StretchHorizontallyIcon as Ft, FontItalicIcon as Yt, UnderlineIcon as zt, OverlineIcon as Xt, LetterCaseUppercaseIcon as Zt, Cross1Icon as Wt, InfoCircledIcon as He, MinusIcon as Ut, BoxIcon as tt, RowSpacingIcon as Kt, TriangleDownIcon as Gt, CrossCircledIcon as qt, CaretDownIcon as Jt, MixerHorizontalIcon as rt } from "@radix-ui/react-icons";
8
- import { a2 as st, aO as Qt, aP as er, B as G, aQ as tr, aR as rr, aS as sr, aT as lr, aU as ar, aV as or, aW as nr, M as q, aK as lt, $ as ir, a0 as dr, a1 as cr, aX as pr, Z as ur, ab as xr, _ as gr, ac as $, ad as A, ae as M, aY as hr, aZ as yr, a_ as mr, a$ as br, b0 as fr, b1 as vr, b2 as jr, R as at, Q as ot, h as wr, b3 as nt, b4 as Ce, b5 as ke, b6 as Ne, Y as ge, n as De, I as it, L as dt, b7 as ct, aq as pt, b8 as _e, j as Cr, b9 as kr, J as he, v as Nr, P as ut, o as Me, av as _r, aw as Sr, ax as Tr, ba as Be, ay as Le, az as Ee, bb as Oe, bc as Fe, bd as Ye, S as Rr, be as Vr, a6 as Hr, a7 as Dr, a8 as Br, a9 as Pr, aa as V, ai as Ir, aj as $r, ak as me, al as be } from "./ChaiBuilderEditor-wfEkvtJ0.js";
9
- import { l as Ar } from "./controls-VTdJhdSz.js";
10
- import { Check as Mr, EditIcon as Lr, TrashIcon as Er, BrushIcon as Or, DeleteIcon as Fr } from "lucide-react";
11
- import { getBlockComponent as Pe, getChaiDataProviders as Yr, useGlobalStylingPresets as zr } from "@chaibuilder/runtime";
12
- import { J as Xr, a as Zr, d as Wr } from "./index-e0c8PmRQ.js";
13
- import Ur from "@rjsf/core";
14
- import Kr from "@rjsf/validator-ajv8";
15
- import { u as Gr } from "./useCanvasSettings-E5uIyvUR.js";
16
- import qr from "react-autosuggest";
17
- import Jr from "fuse.js";
18
- import { A as Qr, C as ye, g as es } from "./Class-6Hz2KzYb.js";
19
- import { a as ts } from "./STRINGS--j49GZJP.js";
8
+ import { a2 as st, aO as Qt, aP as er, B as G, aQ as tr, aR as rr, aS as sr, aT as lr, aU as ar, aV as or, aW as nr, M as q, aK as lt, $ as ir, a0 as dr, a1 as cr, aX as pr, Z as ur, ab as xr, _ as gr, ac as $, ad as A, ae as M, aY as hr, aZ as yr, a_ as mr, a$ as br, b0 as fr, b1 as vr, b2 as jr, R as at, Q as ot, h as wr, b3 as Cr, b4 as nt, b5 as Ce, b6 as ke, b7 as Ne, Y as ge, n as De, I as it, L as dt, b8 as ct, aq as pt, b9 as _e, j as kr, ba as Nr, J as he, v as _r, P as ut, o as Me, av as Sr, aw as Tr, ax as Rr, bb as Be, ay as Le, az as Ee, bc as Oe, bd as Fe, be as Ye, S as Vr, bf as Hr, a6 as Dr, a7 as Br, a8 as Pr, a9 as Ir, aa as V, ai as $r, aj as Ar, ak as me, al as be } from "./ChaiBuilderEditor-f4SJU7kK.js";
9
+ import { l as Mr } from "./controls-VTdJhdSz.js";
10
+ import { Check as Lr, EditIcon as Er, TrashIcon as Or, BrushIcon as Fr, DeleteIcon as Yr } from "lucide-react";
11
+ import { getBlockComponent as Pe, getChaiDataProviders as zr, useGlobalStylingPresets as Xr } from "@chaibuilder/runtime";
12
+ import { J as Zr, a as Wr, d as Ur } from "./index-e0c8PmRQ.js";
13
+ import Kr from "@rjsf/core";
14
+ import Gr from "@rjsf/validator-ajv8";
15
+ import { u as qr } from "./useCanvasSettings-fsSISbZ6.js";
16
+ import Jr from "react-autosuggest";
17
+ import Qr from "fuse.js";
18
+ import { A as es, C as ye, g as ts } from "./Class-6Hz2KzYb.js";
19
+ import { a as rs } from "./STRINGS--j49GZJP.js";
20
20
  import "./_commonjsHelpers-UyOWmZb0.js";
21
21
  import "clsx";
22
22
  import "react-dom";
@@ -50,7 +50,7 @@ import "@radix-ui/react-context-menu";
50
50
  import "react-icons-picker";
51
51
  import "react-quill";
52
52
  import "react-hotkeys-hook";
53
- function rs(r) {
53
+ function ss(r) {
54
54
  const l = [], t = {};
55
55
  function n(s, i) {
56
56
  Re(i, (a, d) => {
@@ -67,12 +67,12 @@ const Se = ({ data: r, fullView: l }) => {
67
67
  return l ? typeof r == "object" ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
68
68
  /* @__PURE__ */ e.jsx("div", { className: "h-3" }),
69
69
  /* @__PURE__ */ e.jsx(st, { children: /* @__PURE__ */ e.jsx(
70
- Xr,
70
+ Zr,
71
71
  {
72
72
  data: r,
73
- shouldExpandNode: Zr,
73
+ shouldExpandNode: Wr,
74
74
  style: {
75
- ...Wr,
75
+ ...Ur,
76
76
  container: "max-h-[40vh] overflow-y-auto text-[12px] leading-[1.5] tracking-wide font-mono",
77
77
  stringValue: "text-orange-600",
78
78
  label: "text-green-900 font-semibold pr-1 tracking-wider"
@@ -92,7 +92,7 @@ const Se = ({ data: r, fullView: l }) => {
92
92
  dataType: i,
93
93
  appliedBindings: a
94
94
  }) => {
95
- const { paths: d, pathsType: o } = rs(n), c = r === "PROP" ? Pe(n == null ? void 0 : n._type) : {}, h = r === "PROP", [p, u] = w(!1), y = S(() => r === "PROP" ? d.filter(
95
+ const { paths: d, pathsType: o } = ss(n), c = r === "PROP" ? Pe(n == null ? void 0 : n._type) : {}, h = r === "PROP", [p, u] = w(!1), y = S(() => r === "PROP" ? d.filter(
96
96
  (x) => !F(a, x) && g(c, `props.${oe(wt(x, "."))}.binding`)
97
97
  ) : d.filter((x) => i === g(o, x, "")), [r, d, a, i, c]);
98
98
  return z(() => {
@@ -133,7 +133,7 @@ const Se = ({ data: r, fullView: l }) => {
133
133
  },
134
134
  children: [
135
135
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
136
- /* @__PURE__ */ e.jsx(Mr, { className: `h-4 w-4 text-green-500 ${l === x ? "" : "opacity-0"}` }),
136
+ /* @__PURE__ */ e.jsx(Lr, { className: `h-4 w-4 text-green-500 ${l === x ? "" : "opacity-0"}` }),
137
137
  x
138
138
  ] }),
139
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: Y(g(o, x, "")) }) }) : /* @__PURE__ */ e.jsx("div", { className: "pl-6", children: /* @__PURE__ */ e.jsx(Se, { data: g(n, x) }) })
@@ -147,7 +147,7 @@ const Se = ({ data: r, fullView: l }) => {
147
147
  ] }),
148
148
  !h && !b(l) && /* @__PURE__ */ e.jsx("div", { className: "pt-2", children: /* @__PURE__ */ e.jsx(Se, { data: g(n, l, ""), fullView: !0 }) })
149
149
  ] });
150
- }, ss = ({
150
+ }, ls = ({
151
151
  appliedBindings: r = [],
152
152
  onAddBinding: l,
153
153
  editMode: t,
@@ -225,7 +225,7 @@ const Se = ({ data: r, fullView: l }) => {
225
225
  return /* @__PURE__ */ e.jsxs(ur, { children: [
226
226
  /* @__PURE__ */ e.jsx(xr, { disabled: r, asChild: !0, onClick: () => d(!0), children: l }),
227
227
  a && /* @__PURE__ */ e.jsx(gr, { children: /* @__PURE__ */ e.jsx(
228
- ss,
228
+ ls,
229
229
  {
230
230
  item: i,
231
231
  editMode: s,
@@ -236,7 +236,7 @@ const Se = ({ data: r, fullView: l }) => {
236
236
  }
237
237
  ) })
238
238
  ] });
239
- }, ls = ({
239
+ }, as = ({
240
240
  item: r,
241
241
  onAddBinding: l,
242
242
  onRemove: t,
@@ -260,9 +260,9 @@ const Se = ({ data: r, fullView: l }) => {
260
260
  /* @__PURE__ */ e.jsx("div", { className: "font-medium leading-5", children: r.value }),
261
261
  /* @__PURE__ */ e.jsx(Se, { data: g(s, r.value, "") }),
262
262
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-end gap-x-2", children: [
263
- /* @__PURE__ */ e.jsx(xt, { editMode: !0, onAddBinding: l, appliedBindings: i, item: r, children: /* @__PURE__ */ e.jsx(Lr, { 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(xt, { editMode: !0, onAddBinding: l, appliedBindings: i, item: r, children: /* @__PURE__ */ e.jsx(Er, { 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" }) }),
264
264
  /* @__PURE__ */ e.jsx(
265
- Er,
265
+ Or,
266
266
  {
267
267
  onClick: () => t(),
268
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"
@@ -271,8 +271,8 @@ const Se = ({ data: r, fullView: l }) => {
271
271
  ] }),
272
272
  !b(a) && !b(r.key) && /* @__PURE__ */ e.jsx("div", { className: "absolute right-0 top-1 mt-px flex h-4 items-center rounded-full px-2 text-[10px] font-medium text-purple-600", children: Y(a) })
273
273
  ] });
274
- }, as = ({ bindingData: r, onChange: l }) => {
275
- const t = q(), [n] = lt(), s = Yr(), [i, a] = w(
274
+ }, os = ({ bindingData: r, onChange: l }) => {
275
+ const t = q(), [n] = lt(), s = zr(), [i, a] = w(
276
276
  C(r, (p, u) => ({ key: u, value: p }))
277
277
  );
278
278
  z(() => {
@@ -310,7 +310,7 @@ const Se = ({ data: r, fullView: l }) => {
310
310
  /* @__PURE__ */ e.jsx("a", { className: "text-blue-500", href: "https://chaibuilder.com/docs/registering-data-providers", target: "_blank", children: "Learn more" })
311
311
  ] }) }) : /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
312
312
  C(i, (p, u) => /* @__PURE__ */ e.jsx(
313
- ls,
313
+ as,
314
314
  {
315
315
  item: p,
316
316
  onAddBinding: o,
@@ -340,7 +340,7 @@ const Se = ({ data: r, fullView: l }) => {
340
340
  d && /* @__PURE__ */ e.jsx(M, { sideOffset: -55, className: "text-[11px]", children: b(n) ? "No data provider has been set up for this page." : "Complete last added data binding to add more" })
341
341
  ] })
342
342
  ] });
343
- }, os = () => /* @__PURE__ */ e.jsx("div", { className: "text-xs border rounded-sm p-1 mt-1 border-orange-500 text-orange-500 bg-orange-100", children: "Data binding is set for this field" }), pe = ft(({ id: r, properties: l, formData: t, onChange: n }) => {
343
+ }, ns = () => /* @__PURE__ */ e.jsx("div", { className: "text-xs border rounded-sm p-1 mt-1 border-orange-500 text-orange-500 bg-orange-100", children: "Data binding is set for this field" }), pe = ft(({ id: r, properties: l, formData: t, onChange: n }) => {
344
344
  const [s, i] = w(t), a = { type: "object", properties: {} }, d = {};
345
345
  Object.keys(l).forEach((c) => {
346
346
  const h = l[c];
@@ -360,10 +360,10 @@ const Se = ({ data: r, fullView: l }) => {
360
360
  // save only every 5 seconds
361
361
  );
362
362
  return /* @__PURE__ */ e.jsx(
363
- Ur,
363
+ Kr,
364
364
  {
365
365
  widgets: {
366
- binding: os,
366
+ binding: ns,
367
367
  richtext: mr,
368
368
  icon: br,
369
369
  image: fr
@@ -374,7 +374,7 @@ const Se = ({ data: r, fullView: l }) => {
374
374
  omitExtraData: !1,
375
375
  liveOmit: !1,
376
376
  liveValidate: !1,
377
- validator: Kr,
377
+ validator: Gr,
378
378
  uiSchema: d,
379
379
  schema: a,
380
380
  formData: s,
@@ -383,8 +383,8 @@ const Se = ({ data: r, fullView: l }) => {
383
383
  }
384
384
  }
385
385
  );
386
- }), ns = () => {
387
- const [r, l] = Gr(), t = jr(), n = (a, d) => {
386
+ }), is = () => {
387
+ const [r, l] = qr(), t = jr(), n = (a, d) => {
388
388
  l((o) => ({ ...o, [a]: d }));
389
389
  };
390
390
  if (b(t))
@@ -406,7 +406,7 @@ const Se = ({ data: r, fullView: l }) => {
406
406
  ) })
407
407
  ] });
408
408
  };
409
- function is() {
409
+ function ds() {
410
410
  const r = q(), l = at(), t = ot(), n = Pe(r._type), s = { ...r }, [i, a] = w(s), d = wr("dataBindingSupport", !1), o = ({ formData: x }, f, j) => {
411
411
  if (f && (i == null ? void 0 : i._id) === r._id) {
412
412
  const P = f.replace("root.", "");
@@ -420,10 +420,10 @@ function is() {
420
420
  ), h = ({ formData: x }, f) => {
421
421
  if (f) {
422
422
  const j = f.replace("root.", "");
423
- l([r._id], { [j]: g(x, j) }), c({ formData: x }, f, { [j]: g(i, j) });
423
+ l([r._id], Cr(j, g(x, j.split(".")))), c({ formData: x }, f, { [j]: g(i, j) });
424
424
  }
425
425
  }, p = {
426
- _name: Ar({
426
+ _name: Mr({
427
427
  title: "Name",
428
428
  default: g(r, "_name", r._type)
429
429
  })
@@ -434,7 +434,7 @@ function is() {
434
434
  return /* @__PURE__ */ e.jsxs("div", { className: "overflow-x-hidden", children: [
435
435
  /* @__PURE__ */ e.jsx(pe, { id: r == null ? void 0 : r._id, onChange: h, formData: s, properties: p }),
436
436
  /* @__PURE__ */ e.jsx("hr", { className: "mt-4" }),
437
- /* @__PURE__ */ e.jsx(ns, {}),
437
+ /* @__PURE__ */ e.jsx(is, {}),
438
438
  d ? /* @__PURE__ */ e.jsxs(nt, { type: "multiple", defaultValue: ["STATIC", "BINDING"], className: "h-full w-full", children: [
439
439
  /* @__PURE__ */ e.jsxs(Ce, { value: "BINDING", children: [
440
440
  /* @__PURE__ */ e.jsx(ke, { className: "bg-gray-100 px-3 py-2 text-xs hover:no-underline", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
@@ -447,7 +447,7 @@ function is() {
447
447
  "Data Binding"
448
448
  ] }) }),
449
449
  /* @__PURE__ */ e.jsx(Ne, { className: "px-4 pt-4", children: /* @__PURE__ */ e.jsx(
450
- as,
450
+ os,
451
451
  {
452
452
  bindingData: g(r, "_bindings", {}),
453
453
  onChange: (x) => {
@@ -492,15 +492,15 @@ function is() {
492
492
  /* @__PURE__ */ e.jsx("div", { className: "pb-60" })
493
493
  ] });
494
494
  }
495
- const Xe = new Jr(Qr, {
495
+ const Xe = new Qr(es, {
496
496
  isCaseSensitive: !1,
497
497
  threshold: 0.2,
498
498
  minMatchCharLength: 2,
499
499
  keys: ["name"]
500
500
  });
501
- function ds() {
501
+ function cs() {
502
502
  var U;
503
- const [r] = ge(), l = q(), t = De(), n = it(), [s] = dt(), [i, a] = w(""), { toast: d } = ct(), o = (U = oe(r)) == null ? void 0 : U.prop, c = St((g(l, o, "").replace(ts, "").split(",").pop() || "").split(" "), b), h = () => {
503
+ const [r] = ge(), l = q(), t = De(), n = it(), [s] = dt(), [i, a] = w(""), { toast: d } = ct(), o = (U = oe(r)) == null ? void 0 : U.prop, c = St((g(l, o, "").replace(rs, "").split(",").pop() || "").split(" "), b), h = () => {
504
504
  const k = i.trim().toLowerCase().replace(/ +(?= )/g, "").split(" ");
505
505
  t(s, k, !0), a("");
506
506
  }, [p, u] = w([]), y = ({ value: k }) => {
@@ -557,7 +557,7 @@ function ds() {
557
557
  ] }),
558
558
  /* @__PURE__ */ e.jsxs("div", { className: "relative -mt-4 flex items-center gap-x-3", children: [
559
559
  /* @__PURE__ */ e.jsx("div", { className: "relative flex w-full items-center gap-x-3", children: /* @__PURE__ */ e.jsx(
560
- qr,
560
+ Jr,
561
561
  {
562
562
  suggestions: p,
563
563
  onSuggestionsFetchRequested: y,
@@ -613,7 +613,7 @@ function ds() {
613
613
  }
614
614
  );
615
615
  }
616
- const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], cs = {
616
+ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], ps = {
617
617
  heading: "flex.heading",
618
618
  items: [
619
619
  { type: "arbitrary", label: "flex.basis", units: B, property: "flexBasis" },
@@ -622,7 +622,7 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], cs = {
622
622
  { type: "dropdown", label: "flex.grow", property: "flexGrow" },
623
623
  { type: "dropdown", label: "flex.shrink", property: "flexShrink" }
624
624
  ]
625
- }, ps = {
625
+ }, us = {
626
626
  heading: "grid.heading",
627
627
  items: [
628
628
  { type: "range", label: "grid.col_span", property: "gridColSpan" },
@@ -633,7 +633,7 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], cs = {
633
633
  { type: "range", label: "grid.row_end", property: "gridRowEnd" },
634
634
  { type: "range", label: "grid.order", property: "order" }
635
635
  ]
636
- }, us = [
636
+ }, xs = [
637
637
  {
638
638
  heading: "layout.heading",
639
639
  items: [
@@ -1035,7 +1035,7 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], cs = {
1035
1035
  },
1036
1036
  {
1037
1037
  heading: "classes.heading",
1038
- items: [{ component: ds }]
1038
+ items: [{ component: cs }]
1039
1039
  }
1040
1040
  ], gt = {
1041
1041
  "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" }) }),
@@ -1231,7 +1231,7 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], cs = {
1231
1231
  )
1232
1232
  ] }),
1233
1233
  static: Wt
1234
- }, ne = Ke({ canReset: !1, canChange: !0 }), xs = ({ children: r, canReset: l = !1, canChange: t = !0 }) => (
1234
+ }, ne = Ke({ canReset: !1, canChange: !0 }), gs = ({ children: r, canReset: l = !1, canChange: t = !0 }) => (
1235
1235
  // eslint-disable-next-line react/jsx-no-constructed-context-values
1236
1236
  /* @__PURE__ */ e.jsx(ne.Provider, { value: { canReset: l, canChange: t }, children: r })
1237
1237
  ), ht = ({ label: r, property: l, onChange: t }) => {
@@ -1254,7 +1254,7 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], cs = {
1254
1254
  ) });
1255
1255
  };
1256
1256
  function Te({ selected: r, onChange: l, rounded: t = !1, options: n, disabled: s = !1 }) {
1257
- const i = r.replace(/.*:/g, "").trim(), { undo: a, redo: d } = Cr();
1257
+ const i = r.replace(/.*:/g, "").trim(), { undo: a, redo: d } = kr();
1258
1258
  return /* @__PURE__ */ e.jsxs(
1259
1259
  "select",
1260
1260
  {
@@ -1274,7 +1274,7 @@ function Te({ selected: r, onChange: l, rounded: t = !1, options: n, disabled: s
1274
1274
  }
1275
1275
  );
1276
1276
  }
1277
- const gs = ({ property: r, onChange: l }) => {
1277
+ const hs = ({ property: r, onChange: l }) => {
1278
1278
  const { canReset: t, canChange: n } = ae(ne), s = ie(r), i = S(() => g(s, "cls", ""), [s]), a = S(() => g(ye, `${r}.classes`, [""]), [r]), d = a.indexOf(i) > -1 ? a.indexOf(i) : 0, o = /\[.*\]/g.test(i);
1279
1279
  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: i }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1280
1280
  /* @__PURE__ */ e.jsx(
@@ -1309,7 +1309,7 @@ const gs = ({ property: r, onChange: l }) => {
1309
1309
  }
1310
1310
  )
1311
1311
  ] }) });
1312
- }, hs = ({ property: r, onChange: l }) => {
1312
+ }, ys = ({ property: r, onChange: l }) => {
1313
1313
  const t = S(() => g(ye, `${r}.classes`, [""]), [r]), { canChange: n } = ae(ne), s = ie(r), i = S(() => g(s, "cls", ""), [s]);
1314
1314
  return /* @__PURE__ */ e.jsx("div", { className: "flex grow flex-wrap gap-1", children: C(t, (a) => /* @__PURE__ */ e.jsxs($, { children: [
1315
1315
  /* @__PURE__ */ e.jsx(A, { asChild: !0, children: /* @__PURE__ */ e.jsx(
@@ -1324,7 +1324,7 @@ const gs = ({ property: r, onChange: l }) => {
1324
1324
  ) }),
1325
1325
  /* @__PURE__ */ e.jsx(M, { children: Y(le(a)) })
1326
1326
  ] })) });
1327
- }, ys = {
1327
+ }, ms = {
1328
1328
  backgroundColor: "bg",
1329
1329
  textColor: "text",
1330
1330
  borderColor: "border",
@@ -1336,7 +1336,7 @@ const gs = ({ property: r, onChange: l }) => {
1336
1336
  toColor: "to",
1337
1337
  ringColor: "ring",
1338
1338
  ringOffsetColor: "ring-offset"
1339
- }, ms = ({ property: r, onChange: l }) => {
1339
+ }, bs = ({ property: r, onChange: l }) => {
1340
1340
  const t = ie(r), n = S(() => g(t, "cls", ""), [t]), { canChange: s } = ae(ne), [i, a] = w([]), [d, o] = w({ color: "", shade: "" }), c = n.split("-"), h = g(c, "1", ""), p = g(c, "2", ""), u = H(
1341
1341
  // eslint-disable-next-line no-shadow
1342
1342
  (x) => {
@@ -1359,7 +1359,7 @@ const gs = ({ property: r, onChange: l }) => {
1359
1359
  return z(() => {
1360
1360
  o({ color: "", shade: "" });
1361
1361
  }, [t]), z(() => {
1362
- const f = `${g(ys, r, "")}-${d.color}${d.shade ? `-${d.shade}` : ""}`;
1362
+ const f = `${g(ms, r, "")}-${d.color}${d.shade ? `-${d.shade}` : ""}`;
1363
1363
  f.match(new RegExp(g(ye, `${r}.regExp`, ""))) && l(f, r);
1364
1364
  }, [d, l, r]), /* @__PURE__ */ e.jsxs("div", { className: "flex flex-row divide-x divide-solid divide-border rounded-lg border border-border text-xs", children: [
1365
1365
  /* @__PURE__ */ e.jsx("div", { className: "grow text-center", children: /* @__PURE__ */ e.jsx(
@@ -1413,7 +1413,7 @@ const gs = ({ property: r, onChange: l }) => {
1413
1413
  const s = r.match(n), i = s && s.length > 1, a = !b(t) && Number.isNaN(Number(t));
1414
1414
  return i || a ? { error: "Invalid value" } : s && (s[0] === "auto" || s[0] === "none") ? { value: s[0], unit: "" } : { value: t, unit: s ? s[0] : "" };
1415
1415
  };
1416
- const bs = (r) => {
1416
+ const fs = (r) => {
1417
1417
  const l = r.startsWith("-") ? "-" : "", t = r.split("-").pop();
1418
1418
  if (["auto", "none"].includes(t))
1419
1419
  return { value: "", unit: t };
@@ -1542,18 +1542,18 @@ const bs = (r) => {
1542
1542
  }
1543
1543
  return Tt(parseFloat(t)) ? { value: `${l + parseFloat(t) * 4}`, unit: "px" } : { value: t, unit: "class" };
1544
1544
  };
1545
- const fs = (r) => {
1545
+ const vs = (r) => {
1546
1546
  if (b(r))
1547
1547
  return { value: "", unit: "" };
1548
1548
  const l = r.match(/\[.*\]/g);
1549
1549
  if (l === null)
1550
- return vs(r);
1550
+ return js(r);
1551
1551
  const t = g(l, "0", "").replace(/\[|\]/g, ""), n = r.startsWith("-") ? "-" : "", s = oe(t.match(/\d+.\d+|\d+/g));
1552
1552
  return { value: `${n}${s}`, unit: t.replace(s, "") };
1553
- }, vs = (r) => b(r) ? { value: "", unit: "" } : bs(r), yt = I.createContext({
1553
+ }, js = (r) => b(r) ? { value: "", unit: "" } : fs(r), yt = I.createContext({
1554
1554
  setDragData: () => {
1555
1555
  }
1556
- }), js = ({
1556
+ }), ws = ({
1557
1557
  unit: r,
1558
1558
  currentValue: l,
1559
1559
  onDrag: t,
@@ -1585,7 +1585,7 @@ const fs = (r) => {
1585
1585
  children: /* @__PURE__ */ e.jsx(Kt, {})
1586
1586
  }
1587
1587
  );
1588
- }, ws = ({ onSelect: r, current: l, 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(
1588
+ }, Cs = ({ onSelect: r, current: l, 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(
1589
1589
  G,
1590
1590
  {
1591
1591
  className: "h-max rounded-none px-1 py-1 text-right text-[11px] hover:bg-blue-400",
@@ -1597,10 +1597,10 @@ const fs = (r) => {
1597
1597
  children: n
1598
1598
  },
1599
1599
  n
1600
- )) }), We = 50, Cs = (r) => {
1600
+ )) }), We = 50, ks = (r) => {
1601
1601
  const [l, t] = w(!1), [n, s] = w(""), { currentClass: i, onChange: a, classPrefix: d, cssProperty: o, units: c, negative: h } = r, [p, u] = w(o != null && o.toLowerCase().includes("width") ? "%" : c[0]), [y, x] = w(!1), [f, j] = w(""), [P, L] = w(!1), [U, k] = w(!1);
1602
1602
  z(() => {
1603
- const { value: m, unit: v } = fs(i);
1603
+ const { value: m, unit: v } = vs(i);
1604
1604
  if (v === "") {
1605
1605
  s(m), u(o != null && o.toLowerCase().includes("width") ? "%" : oe(c));
1606
1606
  return;
@@ -1699,8 +1699,8 @@ const fs = (r) => {
1699
1699
  ]
1700
1700
  }
1701
1701
  ) }),
1702
- /* @__PURE__ */ e.jsx(kr, { children: /* @__PURE__ */ e.jsx(M, { className: "bg-background", children: /* @__PURE__ */ e.jsx(
1703
- ws,
1702
+ /* @__PURE__ */ e.jsx(Nr, { children: /* @__PURE__ */ e.jsx(M, { className: "bg-background", children: /* @__PURE__ */ e.jsx(
1703
+ Cs,
1704
1704
  {
1705
1705
  units: c,
1706
1706
  current: p,
@@ -1712,7 +1712,7 @@ const fs = (r) => {
1712
1712
  ] })
1713
1713
  ] }),
1714
1714
  ["none", "auto"].indexOf(p) !== -1 || P ? null : /* @__PURE__ */ e.jsx(
1715
- js,
1715
+ ws,
1716
1716
  {
1717
1717
  onDragStart: () => L(!0),
1718
1718
  onDragEnd: (m) => {
@@ -1738,7 +1738,7 @@ const fs = (r) => {
1738
1738
  }, ie = (r) => {
1739
1739
  const l = he();
1740
1740
  return Vt(l, { property: r });
1741
- }, ks = (r, l) => {
1741
+ }, Ns = (r, l) => {
1742
1742
  const t = {
1743
1743
  xs: 0,
1744
1744
  sm: 1,
@@ -1748,7 +1748,7 @@ const fs = (r) => {
1748
1748
  "2xl": 5
1749
1749
  };
1750
1750
  return t[g(r, "mq", "xs")] <= t[l];
1751
- }, Ns = {
1751
+ }, _s = {
1752
1752
  width: "w-",
1753
1753
  height: "h-",
1754
1754
  minWidth: "min-w-",
@@ -1821,19 +1821,19 @@ const fs = (r) => {
1821
1821
  lg: "1024px",
1822
1822
  xl: "1280px",
1823
1823
  "2xl": "1536px"
1824
- }, _s = (r) => `${r.toUpperCase()} ${Ue[r] ? `(${Ue[r]} & up)` : ""}`, Ie = (r) => {
1824
+ }, Ss = (r) => `${r.toUpperCase()} ${Ue[r] ? `(${Ue[r]} & up)` : ""}`, Ie = (r) => {
1825
1825
  const { t: l } = X(), { type: t = "icons", label: n, property: s, onEmitChange: i = () => {
1826
- }, units: a, negative: d = !1 } = r, [o] = Nr(), [c] = ut(), [, h] = Me(), p = ie(s), u = De(), y = it(), [x] = dt(), f = S(() => g(p, "fullCls", ""), [p]), j = H(
1826
+ }, units: a, negative: d = !1 } = r, [o] = _r(), [c] = ut(), [, h] = Me(), p = ie(s), u = De(), y = it(), [x] = dt(), f = S(() => g(p, "fullCls", ""), [p]), j = H(
1827
1827
  (D, E = !0) => {
1828
1828
  const K = { dark: o, mq: h, mod: c, cls: D, property: s, fullCls: "" };
1829
1829
  (o || c !== "") && (K.mq = "xs");
1830
- const m = es(K);
1830
+ const m = ts(K);
1831
1831
  u(x, [m], E);
1832
1832
  },
1833
1833
  [x, o, h, c, s, u]
1834
1834
  ), P = H(() => {
1835
1835
  y(x, [f]);
1836
- }, [x, f, y]), L = S(() => ks(p, h), [p, h]);
1836
+ }, [x, f, y]), L = S(() => Ns(p, h), [p, h]);
1837
1837
  z(() => {
1838
1838
  i(L, p);
1839
1839
  }, [L, i, p]);
@@ -1850,24 +1850,24 @@ const fs = (r) => {
1850
1850
  },
1851
1851
  [U]
1852
1852
  ), _ = g(p, "dark", null) === o && g(p, "mod", null) === c && g(p, "mq", null) === h;
1853
- return /* @__PURE__ */ e.jsx(xs, { canChange: L, canReset: p && _, children: /* @__PURE__ */ e.jsxs("div", { className: "group flex flex-row items-center py-2 first:pt-0 last:pb-0", children: [
1853
+ return /* @__PURE__ */ e.jsx(gs, { canChange: L, canReset: p && _, children: /* @__PURE__ */ e.jsxs("div", { className: "group flex flex-row items-center py-2 first:pt-0 last:pb-0", children: [
1854
1854
  /* @__PURE__ */ e.jsx("div", { className: "relative w-[70px] truncate text-xs text-foreground", children: /* @__PURE__ */ e.jsx("span", { className: `text-[11px] ${p && !_ ? "text-foreground" : ""}`, children: l(n) }) }),
1855
1855
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-row items-center", children: [
1856
1856
  /* @__PURE__ */ e.jsxs("div", { className: "w-[150px]", children: [
1857
1857
  t === "arbitrary" ? /* @__PURE__ */ e.jsx(
1858
- Cs,
1858
+ ks,
1859
1859
  {
1860
1860
  currentClass: g(p, "cls", ""),
1861
- classPrefix: g(Ns, s, ""),
1861
+ classPrefix: g(_s, s, ""),
1862
1862
  units: a || [],
1863
1863
  onChange: j,
1864
1864
  negative: d,
1865
1865
  cssProperty: s
1866
1866
  }
1867
1867
  ) : null,
1868
- t === "icons" && /* @__PURE__ */ e.jsx(hs, { property: s, onChange: j }),
1869
- t === "range" && /* @__PURE__ */ e.jsx(gs, { property: s, onChange: j }),
1870
- t === "color" && /* @__PURE__ */ e.jsx(ms, { property: s, onChange: j }),
1868
+ t === "icons" && /* @__PURE__ */ e.jsx(ys, { property: s, onChange: j }),
1869
+ t === "range" && /* @__PURE__ */ e.jsx(hs, { property: s, onChange: j }),
1870
+ t === "color" && /* @__PURE__ */ e.jsx(bs, { property: s, onChange: j }),
1871
1871
  t === "dropdown" && /* @__PURE__ */ e.jsx(ht, { label: n, property: s, onChange: j })
1872
1872
  ] }),
1873
1873
  /* @__PURE__ */ e.jsx("div", { className: `w-[30px] cursor-pointer ${f ? "visible" : "invisible"}`, children: _ ? /* @__PURE__ */ e.jsx("button", { type: "button", onClick: () => P(), title: "Reset", className: "flex px-1.5 text-xs", children: /* @__PURE__ */ e.jsx(qt, { className: "h-5 w-5 text-blue-500 hover:opacity-80" }) }) : L && p ? /* @__PURE__ */ e.jsxs($, { delayDuration: 100, children: [
@@ -1882,7 +1882,7 @@ const fs = (r) => {
1882
1882
  /* @__PURE__ */ e.jsx(M, { children: /* @__PURE__ */ e.jsx("div", { className: "text-right", children: /* @__PURE__ */ e.jsxs("div", { children: [
1883
1883
  "Current style is set at  ",
1884
1884
  /* @__PURE__ */ e.jsxs("span", { className: "font-bold", children: [
1885
- _s(g(p, "mq")),
1885
+ Ss(g(p, "mq")),
1886
1886
  o && !p.dark ? "(Light mode)" : ""
1887
1887
  ] }),
1888
1888
  /* @__PURE__ */ e.jsx("br", {}),
@@ -1902,13 +1902,13 @@ const fs = (r) => {
1902
1902
  ] }) : null })
1903
1903
  ] })
1904
1904
  ] }) });
1905
- }, Ss = ["px", "%", "em", "rem", "ch", "vh", "vw"], mt = ({
1905
+ }, Ts = ["px", "%", "em", "rem", "ch", "vh", "vw"], mt = ({
1906
1906
  label: r,
1907
1907
  options: l,
1908
1908
  borderB: t = !1,
1909
1909
  borderT: n = !1,
1910
1910
  type: s = "arbitrary",
1911
- units: i = Ss,
1911
+ units: i = Ts,
1912
1912
  negative: a = !1
1913
1913
  }) => {
1914
1914
  const { t: d } = X(), [o, c] = w(l[0].key), h = he(), p = H((u) => C(h, "property").includes(u), [h]);
@@ -1952,7 +1952,7 @@ const fs = (r) => {
1952
1952
  ]
1953
1953
  }
1954
1954
  );
1955
- }, Ts = ({ heading: r, items: l }) => {
1955
+ }, Rs = ({ heading: r, items: l }) => {
1956
1956
  const { t } = X(), n = he(), s = S(() => {
1957
1957
  const i = (o) => J(
1958
1958
  o.map((c) => c.styleType === "multiple" ? C(c.options, "key") : c.property)
@@ -1973,7 +1973,7 @@ const fs = (r) => {
1973
1973
  ] }) }),
1974
1974
  /* @__PURE__ */ e.jsx("div", { className: "p-2", children: l.map((i) => i.styleType === "multiple" ? /* @__PURE__ */ e.jsx(mt, { ...i }, i.label) : /* @__PURE__ */ e.jsx(Ie, { ...i }, i.label)) })
1975
1975
  ] });
1976
- }, Rs = Ke({}), fe = ({ section: r }) => {
1976
+ }, Vs = Ke({}), fe = ({ section: r }) => {
1977
1977
  const { t: l } = X(), t = he(), n = H(
1978
1978
  (a = []) => {
1979
1979
  const d = {};
@@ -1998,29 +1998,29 @@ const fs = (r) => {
1998
1998
  ), o = C(t, "property");
1999
1999
  return Qe(d, o).length > 0;
2000
2000
  }, [t, r.heading, r.items]), i = S(() => ({}), []);
2001
- return /* @__PURE__ */ e.jsx(Rs.Provider, { value: i, children: /* @__PURE__ */ e.jsxs(Ce, { value: r.heading, children: [
2001
+ return /* @__PURE__ */ e.jsx(Vs.Provider, { value: i, children: /* @__PURE__ */ e.jsxs(Ce, { value: r.heading, children: [
2002
2002
  /* @__PURE__ */ e.jsx(ke, { className: "px-3 py-2 text-xs hover:no-underline", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
2003
2003
  /* @__PURE__ */ e.jsx("div", { className: `h-[8px] w-[8px] rounded-full ${s ? "bg-blue-500" : "bg-gray-300"}` }),
2004
2004
  l(r.heading)
2005
2005
  ] }) }),
2006
2006
  /* @__PURE__ */ e.jsx(Ne, { className: "bg-gray-100 px-3.5 py-2", children: I.Children.toArray(
2007
- r.items.map((a) => ce(a, "component") ? I.createElement(a.component, { key: a.label }) : ce(a, "styleType") ? a.styleType === "multiple" ? /* @__PURE__ */ e.jsx(mt, { ...a }, a.label) : a.styleType === "accordion" && n(a == null ? void 0 : a.conditions) ? /* @__PURE__ */ e.jsx(Ts, { ...a }, a.label) : null : /* @__PURE__ */ e.jsx(Ie, { ...a }, a.label))
2007
+ r.items.map((a) => ce(a, "component") ? I.createElement(a.component, { key: a.label }) : ce(a, "styleType") ? a.styleType === "multiple" ? /* @__PURE__ */ e.jsx(mt, { ...a }, a.label) : a.styleType === "accordion" && n(a == null ? void 0 : a.conditions) ? /* @__PURE__ */ e.jsx(Rs, { ...a }, a.label) : null : /* @__PURE__ */ e.jsx(Ie, { ...a }, a.label))
2008
2008
  ) })
2009
2009
  ] }) });
2010
- }, Vs = () => {
2011
- const r = q(), [l] = ge(), { t } = X(), n = zr(), s = De(), i = Pe(r._type), a = g(oe(l), "prop"), d = g(i.props, `${a}.presets`, {});
2010
+ }, Hs = () => {
2011
+ const r = q(), [l] = ge(), { t } = X(), n = Xr(), s = De(), i = Pe(r._type), a = g(oe(l), "prop"), d = g(i.props, `${a}.presets`, {});
2012
2012
  if (b(n) && (!ce(i, "props") || b(d)))
2013
2013
  return null;
2014
2014
  const o = (c) => {
2015
2015
  const h = c.trim().toLowerCase().replace(/ +(?= )/g, "").split(" ");
2016
2016
  s([r._id], h, !0);
2017
2017
  };
2018
- return /* @__PURE__ */ e.jsx("div", { className: "h-10", children: /* @__PURE__ */ e.jsxs(_r, { children: [
2019
- /* @__PURE__ */ e.jsx(Sr, { asChild: !0, children: /* @__PURE__ */ e.jsx("div", { className: "px-4", children: /* @__PURE__ */ e.jsxs(G, { variant: "default", className: "w-full", size: "sm", children: [
2018
+ return /* @__PURE__ */ e.jsx("div", { className: "h-10", children: /* @__PURE__ */ e.jsxs(Sr, { children: [
2019
+ /* @__PURE__ */ e.jsx(Tr, { asChild: !0, children: /* @__PURE__ */ e.jsx("div", { className: "px-4", children: /* @__PURE__ */ e.jsxs(G, { variant: "default", className: "w-full", size: "sm", children: [
2020
2020
  t("Apply Presets"),
2021
2021
  /* @__PURE__ */ e.jsx(Jt, {})
2022
2022
  ] }) }) }),
2023
- /* @__PURE__ */ e.jsx(Tr, { className: "max-h-80 w-56", children: /* @__PURE__ */ e.jsxs(Be, { className: "no-scrollbar h-full", children: [
2023
+ /* @__PURE__ */ e.jsx(Rr, { className: "max-h-80 w-56", children: /* @__PURE__ */ e.jsxs(Be, { className: "no-scrollbar h-full", children: [
2024
2024
  b(d) ? null : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2025
2025
  /* @__PURE__ */ e.jsxs(Le, { children: [
2026
2026
  i.type,
@@ -2044,18 +2044,18 @@ const fs = (r) => {
2044
2044
  ] }) })
2045
2045
  ] }) });
2046
2046
  };
2047
- function Hs() {
2048
- const [r, l] = ut(), { flexChild: t, gridChild: n } = Rr(), { t: s } = X(), i = Vr(), [a] = ge();
2047
+ function Ds() {
2048
+ const [r, l] = ut(), { flexChild: t, gridChild: n } = Vr(), { t: s } = X(), i = Hr(), [a] = ge();
2049
2049
  return b(a) ? /* @__PURE__ */ e.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 rounded-xl p-4", children: [
2050
2050
  /* @__PURE__ */ e.jsx(rt, { className: "mx-auto text-3xl" }),
2051
2051
  /* @__PURE__ */ e.jsx("h1", { children: s("no_styling_block_selected") })
2052
2052
  ] }) }) : /* @__PURE__ */ e.jsxs("div", { className: "flex h-full flex-col", children: [
2053
- /* @__PURE__ */ e.jsx(Vs, {}),
2053
+ /* @__PURE__ */ e.jsx(Hs, {}),
2054
2054
  /* @__PURE__ */ e.jsx("div", { className: "flex h-12 flex-col space-x-4 px-4 py-1", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-end gap-x-1.5", children: [
2055
2055
  /* @__PURE__ */ e.jsx(pt, { htmlFor: "", className: "flex gap-x-1.5 text-xs italic", children: "State" }),
2056
- /* @__PURE__ */ e.jsxs(Hr, { defaultValue: r, onValueChange: (d) => l(d), children: [
2057
- /* @__PURE__ */ e.jsx(Dr, { className: "h-auto w-fit p-1 px-3", children: /* @__PURE__ */ e.jsx(Br, { placeholder: s("State") }) }),
2058
- /* @__PURE__ */ e.jsxs(Pr, { children: [
2056
+ /* @__PURE__ */ e.jsxs(Dr, { defaultValue: r, onValueChange: (d) => l(d), children: [
2057
+ /* @__PURE__ */ e.jsx(Br, { className: "h-auto w-fit p-1 px-3", children: /* @__PURE__ */ e.jsx(Pr, { placeholder: s("State") }) }),
2058
+ /* @__PURE__ */ e.jsxs(Ir, { children: [
2059
2059
  C(i, (d, o) => /* @__PURE__ */ e.jsx(V, { value: o, children: s(d) }, o)),
2060
2060
  /* @__PURE__ */ e.jsx("hr", {}),
2061
2061
  /* @__PURE__ */ e.jsx(V, { value: "", children: s("Normal") }),
@@ -2074,17 +2074,17 @@ function Hs() {
2074
2074
  ] })
2075
2075
  ] }) }),
2076
2076
  r !== "" ? /* @__PURE__ */ e.jsxs("div", { className: "m-1 flex items-center space-x-1 rounded border border-orange-500 bg-orange-200 p-px px-2 text-xs text-orange-900", children: [
2077
- /* @__PURE__ */ e.jsx(Or, { className: "w-3" }),
2077
+ /* @__PURE__ */ e.jsx(Fr, { className: "w-3" }),
2078
2078
  /* @__PURE__ */ e.jsx("span", { children: s(`Styles will be applied for (:${r}) state`) })
2079
2079
  ] }) : null,
2080
2080
  /* @__PURE__ */ e.jsx(Be, { className: "no-scrollbar -mx-1 max-h-full flex-1 overflow-x-hidden overflow-y-hidden border-t border-border", children: /* @__PURE__ */ e.jsxs(nt, { defaultValue: ["Layout"], type: "multiple", className: "w-full", children: [
2081
- t && /* @__PURE__ */ e.jsx(fe, { section: cs }),
2082
- n ? /* @__PURE__ */ e.jsx(fe, { section: ps }) : null,
2083
- us.map((d) => /* @__PURE__ */ e.jsx(fe, { section: d }, d.heading))
2081
+ t && /* @__PURE__ */ e.jsx(fe, { section: ps }),
2082
+ n ? /* @__PURE__ */ e.jsx(fe, { section: us }) : null,
2083
+ xs.map((d) => /* @__PURE__ */ e.jsx(fe, { section: d }, d.heading))
2084
2084
  ] }) })
2085
2085
  ] });
2086
2086
  }
2087
- const Ds = ({ onAdd: r }) => {
2087
+ const Bs = ({ onAdd: r }) => {
2088
2088
  const { t: l } = X(), [t, n] = w({ key: "", value: "" }), s = () => {
2089
2089
  b(t.key) || (r({ ...t, key: Ht(t.key) }), n({ key: "", value: "" }));
2090
2090
  };
@@ -2128,7 +2128,7 @@ const Ds = ({ onAdd: r }) => {
2128
2128
  b(t.key) ? null : /* @__PURE__ */ e.jsx(G, { variant: "ghost", onClick: () => n({ key: "", value: "" }), children: l("Cancel") })
2129
2129
  ] })
2130
2130
  ] });
2131
- }, Bs = () => {
2131
+ }, Ps = () => {
2132
2132
  const r = q(), [l, t] = w([]), [n] = ge(), s = at(), i = ot(), { t: a } = X(), { toast: d } = ct(), o = `${g(n, "0.prop")}_attrs`;
2133
2133
  de.useEffect(() => {
2134
2134
  const u = C(g(r, o), (y, x) => ({ key: x, value: y }));
@@ -2191,7 +2191,7 @@ const Ds = ({ onAdd: r }) => {
2191
2191
  disabled: W(u.value, "dnd-"),
2192
2192
  className: "invisible group-hover:visible",
2193
2193
  onClick: () => c(l.indexOf(u)),
2194
- children: /* @__PURE__ */ e.jsx(Fr, { className: "w-4 text-gray-500" })
2194
+ children: /* @__PURE__ */ e.jsx(Yr, { className: "w-4 text-gray-500" })
2195
2195
  }
2196
2196
  ) }),
2197
2197
  /* @__PURE__ */ e.jsx(M, { className: "max-w-[200px]", children: W(u.value, "dnd-") ? a("Predefined attribute. Cannot be deleted") : a("Remove attribute") })
@@ -2200,9 +2200,9 @@ const Ds = ({ onAdd: r }) => {
2200
2200
  )
2201
2201
  ] }) }),
2202
2202
  /* @__PURE__ */ e.jsx("div", { className: "py-2" }),
2203
- /* @__PURE__ */ e.jsx(Ds, { onAdd: (u) => h(u) })
2203
+ /* @__PURE__ */ e.jsx(Bs, { onAdd: (u) => h(u) })
2204
2204
  ] }) }) });
2205
- }, Ps = {
2205
+ }, Is = {
2206
2206
  px: 1,
2207
2207
  "%": 1,
2208
2208
  em: 100,
@@ -2213,7 +2213,7 @@ const Ds = ({ onAdd: r }) => {
2213
2213
  "-": 1,
2214
2214
  deg: 1,
2215
2215
  ms: 0.1
2216
- }, Dl = () => {
2216
+ }, Bl = () => {
2217
2217
  const r = q(), { t: l } = X(), [t, n] = I.useState(""), [s, i] = I.useState({
2218
2218
  onDrag: (o) => o,
2219
2219
  onDragEnd: (o) => o,
@@ -2228,7 +2228,7 @@ const Ds = ({ onAdd: r }) => {
2228
2228
  const c = !g(s, "negative", !1), h = g(s, "cssProperty", "");
2229
2229
  let p = parseFloat(s.dragStartValue);
2230
2230
  p = Je(p) ? 0 : p;
2231
- let u = Ps[s.dragUnit];
2231
+ let u = Is[s.dragUnit];
2232
2232
  (W(h, "scale") || h === "opacity") && (u = 10);
2233
2233
  let x = (s.dragStartY - o.pageY) / u + p;
2234
2234
  c && x < 0 && (x = 0), h === "opacity" && x > 1 && (x = 1), s.onDrag(`${x}`), n(`${x}`);
@@ -2259,18 +2259,18 @@ const Ds = ({ onAdd: r }) => {
2259
2259
  className: "absolute inset-0 z-30 cursor-row-resize bg-gray-300/10"
2260
2260
  }
2261
2261
  ) : null,
2262
- /* @__PURE__ */ e.jsxs(Ir, { defaultValue: "settings", className: "flex h-full w-full flex-col py-1 text-xs", children: [
2263
- /* @__PURE__ */ e.jsxs($r, { className: "mx-1 grid grid-cols-3", children: [
2262
+ /* @__PURE__ */ e.jsxs($r, { defaultValue: "settings", className: "flex h-full w-full flex-col py-1 text-xs", children: [
2263
+ /* @__PURE__ */ e.jsxs(Ar, { className: "mx-1 grid grid-cols-3", children: [
2264
2264
  /* @__PURE__ */ e.jsx(me, { value: "settings", children: l("settings") }),
2265
2265
  /* @__PURE__ */ e.jsx(me, { value: "styling", children: l("styling") }),
2266
2266
  /* @__PURE__ */ e.jsx(me, { value: "attrs", children: l("Attributes") })
2267
2267
  ] }),
2268
- /* @__PURE__ */ e.jsx(be, { value: "settings", className: "no-scrollbar h-full flex-1 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(Be, { className: "no-scrollbar max-h-full flex-1 overflow-x-hidden overflow-y-hidden pb-5", children: /* @__PURE__ */ e.jsx(is, {}) }) }),
2269
- /* @__PURE__ */ e.jsx(be, { value: "styling", className: "h-full flex-1 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(Hs, {}) }),
2270
- /* @__PURE__ */ e.jsx(be, { value: "attrs", className: "h-full flex-1 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(Bs, {}) })
2268
+ /* @__PURE__ */ e.jsx(be, { value: "settings", className: "no-scrollbar h-full flex-1 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(Be, { className: "no-scrollbar max-h-full flex-1 overflow-x-hidden overflow-y-hidden pb-5", children: /* @__PURE__ */ e.jsx(ds, {}) }) }),
2269
+ /* @__PURE__ */ e.jsx(be, { value: "styling", className: "h-full flex-1 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(Ds, {}) }),
2270
+ /* @__PURE__ */ e.jsx(be, { value: "attrs", className: "h-full flex-1 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(Ps, {}) })
2271
2271
  ] })
2272
2272
  ] }) });
2273
2273
  };
2274
2274
  export {
2275
- Dl as default
2275
+ Bl as default
2276
2276
  };