@chaibuilder/sdk 1.2.56 → 1.2.58

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 (96) hide show
  1. package/dist/{AddBlocks-HeYXoex4.js → AddBlocks-05ZH2Suu.js} +46 -50
  2. package/dist/AddBlocks-MH_fqSRf.cjs +1 -0
  3. package/dist/CanvasArea-7nhpzTI-.cjs +59 -0
  4. package/dist/{CanvasArea-CqILE5PR.js → CanvasArea-kMGTLtCw.js} +409 -394
  5. package/dist/CodeEditor-vECReGwz.cjs +1 -0
  6. package/dist/{CodeEditor-kxV5RCpd.js → CodeEditor-zYBqhBv3.js} +33 -39
  7. package/dist/{CurrentPage-IrFGAb7n.js → CurrentPage-VksVpchp.js} +26 -25
  8. package/dist/CurrentPage-caSpOhR9.cjs +1 -0
  9. package/dist/{ListTree-0n_G8NJx.js → ListTree-0iy8aBgI.js} +82 -65
  10. package/dist/ListTree-Njsk1AzL.cjs +1 -0
  11. package/dist/{PagesPanel-RYBf0Yct.js → PagesPanel-2AEsdqhe.js} +20 -19
  12. package/dist/PagesPanel-tb0qtxz4.cjs +1 -0
  13. package/dist/{ProjectPanel-Zagx6l3Q.js → ProjectPanel-IHFBvE5H.js} +25 -24
  14. package/dist/ProjectPanel-gmBUq2NI.cjs +1 -0
  15. package/dist/{Settings-RLDTFFf8.js → Settings-r9IvIq0G.js} +405 -396
  16. package/dist/Settings-uVLt1oiz.cjs +1 -0
  17. package/dist/{SidePanels-ao969pMV.js → SidePanels-2fD5UfH5.js} +89 -88
  18. package/dist/SidePanels-rhTLiLy6.cjs +1 -0
  19. package/dist/ThemeConfiguration-PvMN3j6h.cjs +1 -0
  20. package/dist/{ThemeConfiguration-S7yArRMp.js → ThemeConfiguration-ab7lbA2y.js} +18 -24
  21. package/dist/Topbar-1JTIu0uN.cjs +1 -0
  22. package/dist/{Topbar-B8u0whpc.js → Topbar-x4gslZ4T.js} +39 -38
  23. package/dist/UILibrariesPanel-CaGLzB9c.cjs +1 -0
  24. package/dist/UILibrariesPanel-raxCToMd.js +216 -0
  25. package/dist/{UnsplashImages-wWRifkCp.js → UnsplashImages-alt_doTy.js} +42 -47
  26. package/dist/UnsplashImages-cah1BRL_.cjs +1 -0
  27. package/dist/UploadImages-5dRETWCo.cjs +1 -0
  28. package/dist/{UploadImages-lUvZhW_j.js → UploadImages-JqVL_aQd.js} +32 -38
  29. package/dist/add-page-modal-9e6JkoxV.cjs +1 -0
  30. package/dist/{add-page-modal-04b4l2zu.js → add-page-modal-DbmbwG7V.js} +29 -28
  31. package/dist/{confirm-alert-FX5030eR.js → confirm-alert-m85JJlQi.js} +15 -21
  32. package/dist/confirm-alert-rYsxlfR4.cjs +1 -0
  33. package/dist/core.cjs +1 -1
  34. package/dist/core.js +44 -43
  35. package/dist/delete-page-modal-YtRcj7eK.cjs +1 -0
  36. package/dist/{delete-page-modal-1u9CyAIP.js → delete-page-modal-nIBA3zCg.js} +22 -21
  37. package/dist/email.cjs +1 -1
  38. package/dist/email.js +19 -19
  39. package/dist/form-G3PqS2Gc.cjs +1 -0
  40. package/dist/{form-HRdEJjVq.js → form-MSL4CDff.js} +3 -3
  41. package/dist/{html-to-json-OnIZDDXw.js → html-to-json-_01DXd-a.js} +37 -36
  42. package/dist/html-to-json-ndxaXRT8.cjs +1 -0
  43. package/dist/index-0FIxW0gR.cjs +1 -0
  44. package/dist/index-5IJnVFyU.cjs +206 -0
  45. package/dist/index-7zSzDmAA.cjs +1 -0
  46. package/dist/{index-vfmO3y2d.js → index-b4Wjumon.js} +19 -19
  47. package/dist/{ChaiBuilderEditor-tkzS851D.js → index-grcmKbfu.js} +14660 -17763
  48. package/dist/index-uLn8W3eR.js +3145 -0
  49. package/dist/lib.cjs +2 -2
  50. package/dist/lib.js +17 -16
  51. package/dist/mockServiceWorker.js +18 -10
  52. package/dist/page-viewer-JySaivSD.cjs +1 -0
  53. package/dist/{page-viewer-dcb3u4OV.js → page-viewer-QxHe6m6V.js} +27 -26
  54. package/dist/project-general-setting-FqXwffxC.cjs +1 -0
  55. package/dist/{project-general-setting--sS34seu.js → project-general-setting-nSzmnyIU.js} +23 -22
  56. package/dist/{project-seo-setting-8tc3I-0M.js → project-seo-setting-3kFJ77jY.js} +20 -26
  57. package/dist/project-seo-setting-C3ilIIeM.cjs +1 -0
  58. package/dist/render.cjs +1 -1
  59. package/dist/render.js +104 -102
  60. package/dist/single-page-detail-F5J53NCW.cjs +1 -0
  61. package/dist/{single-page-detail-tP2pfgBp.js → single-page-detail-uSK1ExCH.js} +26 -25
  62. package/dist/studio.cjs +1 -1
  63. package/dist/studio.js +19 -18
  64. package/dist/ui.cjs +1 -1
  65. package/dist/ui.js +144 -150
  66. package/dist/web-blocks.cjs +1 -1
  67. package/dist/web-blocks.js +164 -107
  68. package/package.json +1 -1
  69. package/dist/AddBlocks-VHoZezjj.cjs +0 -1
  70. package/dist/CanvasArea-137WY3Wx.cjs +0 -56
  71. package/dist/ChaiBuilderEditor-aY8flOgX.cjs +0 -206
  72. package/dist/CodeEditor-R2jKe97T.cjs +0 -1
  73. package/dist/CurrentPage-PjrVzHXR.cjs +0 -1
  74. package/dist/ListTree-C6oCXZDV.cjs +0 -1
  75. package/dist/PagesPanel-lIC3kYmS.cjs +0 -1
  76. package/dist/ProjectPanel-0Siyi5YS.cjs +0 -1
  77. package/dist/Settings-6QRVcl16.cjs +0 -1
  78. package/dist/SidePanels-j1EFsBlK.cjs +0 -1
  79. package/dist/ThemeConfiguration-q1471P7b.cjs +0 -1
  80. package/dist/Topbar-ogFKKDbx.cjs +0 -1
  81. package/dist/UILibrariesPanel-cm9CFWxc.cjs +0 -1
  82. package/dist/UILibrariesPanel-tcfz2ELp.js +0 -196
  83. package/dist/UnsplashImages-E2L3YDJI.cjs +0 -1
  84. package/dist/UploadImages-s-eeaGiS.cjs +0 -1
  85. package/dist/add-page-modal-eroF20lO.cjs +0 -1
  86. package/dist/confirm-alert-XuxEzG-V.cjs +0 -1
  87. package/dist/delete-page-modal-pgh7sdfg.cjs +0 -1
  88. package/dist/form-Z4IRWj0o.cjs +0 -1
  89. package/dist/html-to-json-rauxDBi6.cjs +0 -1
  90. package/dist/index-bt7EhwLh.cjs +0 -1
  91. package/dist/page-viewer-O960kM2x.cjs +0 -1
  92. package/dist/project-general-setting-lIvNs-Vq.cjs +0 -1
  93. package/dist/project-seo-setting-MIlAuqcc.cjs +0 -1
  94. package/dist/single-page-detail-0Z_hvd_j.cjs +0 -1
  95. package/dist/useCanvasSettings-R0h03UfD.cjs +0 -1
  96. package/dist/useCanvasSettings-rEZHbw3s.js +0 -6
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),b=require("@monaco-editor/react"),i=require("./index-0FIxW0gR.cjs"),k=require("react-i18next"),n=require("react"),C=require("@radix-ui/react-icons"),E=require("@react-hookz/web");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-D_vtk3zK.cjs");require("lodash-es");require("./MODIFIERS-mVmfEGgo.cjs");require("clsx");require("tailwind-merge");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("react-icons-picker");require("react-dom");require("react-quill");require("./Functions-N3yhPYKY.cjs");require("@chaibuilder/runtime");require("jotai");require("tree-model");const a=u=>{const s=document.createElement("div");return s.innerHTML=u,s.innerHTML};function R(){const{t:u}=k.useTranslation(),[s,d]=n.useState(!1),[l,x]=n.useState(""),[r,o]=i.useCodeEditor(),[c]=i.useSelectedBlockIds(),q=i.useUpdateBlocksProps(),m=i.useUpdateBlocksPropsRealtime(),p=E.useThrottledCallback(t=>{const h=a(t);m([r.blockId],{[r.blockProp]:h})},[],300),j=n.useCallback(()=>{if(s){const t=a(l);q([r.blockId],{[r.blockProp]:t})}},[s,l]);n.useEffect(()=>{c.includes(r==null?void 0:r.blockId)||(j(),o(null))},[c]);const f=()=>{o(null)};return e.jsxRuntimeExports.jsxs("div",{className:"h-full rounded-t-lg border-t-4 border-black bg-black text-white",children:[e.jsxRuntimeExports.jsx("button",{onClick:f,className:"fixed inset-0 z-[100000] cursor-default bg-gray-400/20"}),e.jsxRuntimeExports.jsxs("div",{className:"relative z-[100001] h-full w-full flex-col gap-y-1",children:[e.jsxRuntimeExports.jsxs("div",{className:"-mt-1 flex items-center justify-between px-2 py-2",children:[e.jsxRuntimeExports.jsxs("h3",{className:"space-x-3 text-sm font-semibold",children:[e.jsxRuntimeExports.jsx("span",{children:u("HTML Code Editor |")}),e.jsxRuntimeExports.jsx("span",{className:"text-xs text-gray-400",children:u("Scripts will be only executed in preview and live mode.")})]}),e.jsxRuntimeExports.jsx("div",{className:"flex gap-x-2",children:e.jsxRuntimeExports.jsx(i.Button,{onClick:()=>o(null),size:"sm",variant:"destructive",className:"h-6 w-fit",children:e.jsxRuntimeExports.jsx(C.Cross2Icon,{})})})]}),e.jsxRuntimeExports.jsx(b,{onMount:t=>{t.setValue(r.initialCode)},onChange:t=>{d(!0),x(t),p(t)},height:"100%",defaultLanguage:"html",theme:"vs-dark",defaultValue:"",options:{minimap:{enabled:!1}}})]})]})}exports.default=R;
@@ -1,33 +1,25 @@
1
1
  import { j as t } from "./jsx-runtime-WbnYoNE9.js";
2
2
  import k from "@monaco-editor/react";
3
- import { i as C, L as j, Q as v, R as g, B as y } from "./ChaiBuilderEditor-tkzS851D.js";
3
+ import { $ as C, r as j, am as v, an as g, B as y } from "./index-uLn8W3eR.js";
4
4
  import { useTranslation as N } from "react-i18next";
5
- import { useState as n, useCallback as T, useEffect as E } from "react";
5
+ import { useState as a, useCallback as T, useEffect as E } from "react";
6
6
  import { Cross2Icon as w } from "@radix-ui/react-icons";
7
7
  import { useThrottledCallback as B } from "@react-hookz/web";
8
8
  import "./_commonjsHelpers-UyOWmZb0.js";
9
- import "clsx";
10
- import "react-dom";
11
- import "@radix-ui/react-scroll-area";
12
- import "@floating-ui/react-dom";
13
- import "jotai";
14
- import "i18next";
15
- import "flagged";
9
+ import "@radix-ui/react-toggle";
10
+ import "class-variance-authority";
11
+ import "./utils-VpVqnC9m.js";
16
12
  import "lodash-es";
17
13
  import "./MODIFIERS-fd5XOmum.js";
18
- import "./Functions-7jnEwJyw.js";
14
+ import "clsx";
19
15
  import "tailwind-merge";
20
- import "@chaibuilder/runtime";
21
- import "tree-model";
22
- import "./utils-VpVqnC9m.js";
23
- import "@radix-ui/react-toggle";
24
- import "class-variance-authority";
25
16
  import "@radix-ui/react-switch";
26
17
  import "@radix-ui/react-slot";
27
18
  import "@radix-ui/react-accordion";
28
19
  import "@radix-ui/react-alert-dialog";
29
20
  import "@radix-ui/react-dialog";
30
21
  import "@radix-ui/react-label";
22
+ import "@radix-ui/react-scroll-area";
31
23
  import "@radix-ui/react-tabs";
32
24
  import "@radix-ui/react-tooltip";
33
25
  import "@radix-ui/react-popover";
@@ -40,46 +32,48 @@ import "@radix-ui/react-toast";
40
32
  import "cmdk";
41
33
  import "@radix-ui/react-context-menu";
42
34
  import "react-icons-picker";
35
+ import "react-dom";
43
36
  import "react-quill";
44
- import "react-hotkeys-hook";
45
- import "lucide-react";
46
- import "./index-VBXQixVm.js";
47
- const a = (r) => {
37
+ import "./Functions-7jnEwJyw.js";
38
+ import "@chaibuilder/runtime";
39
+ import "jotai";
40
+ import "tree-model";
41
+ const n = (s) => {
48
42
  const i = document.createElement("div");
49
- return i.innerHTML = r, i.innerHTML;
43
+ return i.innerHTML = s, i.innerHTML;
50
44
  };
51
- function vt() {
52
- const { t: r } = N(), [i, p] = n(!1), [m, c] = n(""), [o, s] = C(), [l] = j(), d = v(), u = g(), f = B(
53
- (e) => {
54
- const b = a(e);
55
- u([o.blockId], { [o.blockProp]: b });
45
+ function xt() {
46
+ const { t: s } = N(), [i, p] = a(!1), [l, c] = a(""), [e, r] = C(), [m] = j(), d = v(), u = g(), f = B(
47
+ (o) => {
48
+ const b = n(o);
49
+ u([e.blockId], { [e.blockProp]: b });
56
50
  },
57
51
  [],
58
52
  300
59
53
  ), x = T(() => {
60
54
  if (i) {
61
- const e = a(m);
62
- d([o.blockId], { [o.blockProp]: e });
55
+ const o = n(l);
56
+ d([e.blockId], { [e.blockProp]: o });
63
57
  }
64
- }, [i, m]);
58
+ }, [i, l]);
65
59
  E(() => {
66
- l.includes(o == null ? void 0 : o.blockId) || (x(), s(null));
67
- }, [l]);
60
+ m.includes(e == null ? void 0 : e.blockId) || (x(), r(null));
61
+ }, [m]);
68
62
  const h = () => {
69
- s(null);
63
+ r(null);
70
64
  };
71
65
  return /* @__PURE__ */ t.jsxs("div", { className: "h-full rounded-t-lg border-t-4 border-black bg-black text-white", children: [
72
66
  /* @__PURE__ */ t.jsx("button", { onClick: h, className: "fixed inset-0 z-[100000] cursor-default bg-gray-400/20" }),
73
67
  /* @__PURE__ */ t.jsxs("div", { className: "relative z-[100001] h-full w-full flex-col gap-y-1", children: [
74
68
  /* @__PURE__ */ t.jsxs("div", { className: "-mt-1 flex items-center justify-between px-2 py-2", children: [
75
69
  /* @__PURE__ */ t.jsxs("h3", { className: "space-x-3 text-sm font-semibold", children: [
76
- /* @__PURE__ */ t.jsx("span", { children: r("HTML Code Editor |") }),
77
- /* @__PURE__ */ t.jsx("span", { className: "text-xs text-gray-400", children: r("Scripts will be only executed in preview and live mode.") })
70
+ /* @__PURE__ */ t.jsx("span", { children: s("HTML Code Editor |") }),
71
+ /* @__PURE__ */ t.jsx("span", { className: "text-xs text-gray-400", children: s("Scripts will be only executed in preview and live mode.") })
78
72
  ] }),
79
73
  /* @__PURE__ */ t.jsx("div", { className: "flex gap-x-2", children: /* @__PURE__ */ t.jsx(
80
74
  y,
81
75
  {
82
- onClick: () => s(null),
76
+ onClick: () => r(null),
83
77
  size: "sm",
84
78
  variant: "destructive",
85
79
  className: "h-6 w-fit",
@@ -90,11 +84,11 @@ function vt() {
90
84
  /* @__PURE__ */ t.jsx(
91
85
  k,
92
86
  {
93
- onMount: (e) => {
94
- e.setValue(o.initialCode);
87
+ onMount: (o) => {
88
+ o.setValue(e.initialCode);
95
89
  },
96
- onChange: (e) => {
97
- p(!0), c(e), f(e);
90
+ onChange: (o) => {
91
+ p(!0), c(o), f(o);
98
92
  },
99
93
  height: "100%",
100
94
  defaultLanguage: "html",
@@ -111,5 +105,5 @@ function vt() {
111
105
  ] });
112
106
  }
113
107
  export {
114
- vt as default
108
+ xt as default
115
109
  };
@@ -1,28 +1,18 @@
1
1
  import { j as e } from "./jsx-runtime-WbnYoNE9.js";
2
- import { V as h, a6 as f, a7 as j, a8 as y, a9 as v, aa as P } from "./ChaiBuilderEditor-tkzS851D.js";
3
- import { sortBy as b, filter as w, get as C, isEmpty as m, find as n, capitalize as N, map as S } from "lodash-es";
2
+ import { Q as h, az as f, aA as j, aB as y, aC as v, aD as P } from "./index-uLn8W3eR.js";
3
+ import { sortBy as C, filter as b, get as w, isEmpty as m, find as n, capitalize as N, map as S } from "lodash-es";
4
4
  import { toast as k } from "sonner";
5
5
  import { useEffect as p } from "react";
6
- import { a as B, u as E, c as T, d as V } from "./index-vfmO3y2d.js";
7
- import { BriefcaseIcon as I } from "lucide-react";
8
- import { useTranslation as L } from "react-i18next";
6
+ import { a as B, u as E, c as T, d as z } from "./index-b4Wjumon.js";
7
+ import { BriefcaseIcon as A } from "lucide-react";
8
+ import { useTranslation as D } from "react-i18next";
9
9
  import "./_commonjsHelpers-UyOWmZb0.js";
10
- import "clsx";
11
- import "react-dom";
12
- import "@radix-ui/react-scroll-area";
13
- import "@floating-ui/react-dom";
14
- import "jotai";
15
- import "i18next";
16
- import "flagged";
17
- import "./MODIFIERS-fd5XOmum.js";
18
- import "./Functions-7jnEwJyw.js";
19
- import "tailwind-merge";
20
- import "@chaibuilder/runtime";
21
- import "@react-hookz/web";
22
- import "tree-model";
23
- import "./utils-VpVqnC9m.js";
24
10
  import "@radix-ui/react-toggle";
25
11
  import "class-variance-authority";
12
+ import "./utils-VpVqnC9m.js";
13
+ import "./MODIFIERS-fd5XOmum.js";
14
+ import "clsx";
15
+ import "tailwind-merge";
26
16
  import "@radix-ui/react-switch";
27
17
  import "@radix-ui/react-slot";
28
18
  import "@radix-ui/react-accordion";
@@ -30,6 +20,7 @@ import "@radix-ui/react-icons";
30
20
  import "@radix-ui/react-alert-dialog";
31
21
  import "@radix-ui/react-dialog";
32
22
  import "@radix-ui/react-label";
23
+ import "@radix-ui/react-scroll-area";
33
24
  import "@radix-ui/react-tabs";
34
25
  import "@radix-ui/react-tooltip";
35
26
  import "@radix-ui/react-popover";
@@ -42,14 +33,24 @@ import "@radix-ui/react-toast";
42
33
  import "cmdk";
43
34
  import "@radix-ui/react-context-menu";
44
35
  import "react-icons-picker";
36
+ import "react-dom";
45
37
  import "react-quill";
38
+ import "./Functions-7jnEwJyw.js";
39
+ import "@chaibuilder/runtime";
40
+ import "jotai";
41
+ import "@react-hookz/web";
42
+ import "tree-model";
43
+ import "./index-grcmKbfu.js";
44
+ import "i18next";
45
+ import "@floating-ui/react-dom";
46
+ import "flagged";
46
47
  import "react-hotkeys-hook";
47
48
  import "./index-VBXQixVm.js";
48
- import "./core.js";
49
- import "./html-to-json-OnIZDDXw.js";
49
+ import "./html-to-json-_01DXd-a.js";
50
50
  import "himalaya";
51
- const Te = () => {
52
- const { data: t } = B(), { data: i, isLoading: l } = E(), { saveState: c } = h(), d = T(), { t: u } = L(), [a, o] = V(), s = b(w(i, { type: "STATIC" }), (r) => C(r, "uuid") === (t == null ? void 0 : t.homepage) ? 0 : 1);
51
+ import "lodash";
52
+ const ze = () => {
53
+ const { data: t } = B(), { data: i, isLoading: l } = E(), { saveState: c } = h(), d = T(), { t: u } = D(), [a, o] = z(), s = C(b(i, { type: "STATIC" }), (r) => w(r, "uuid") === (t == null ? void 0 : t.homepage) ? 0 : 1);
53
54
  p(() => {
54
55
  !m(i) && t.homepage && !n(i, { uuid: a }) && o(t.homepage);
55
56
  }, [a, i, t, o]), p(() => () => o(null), [o]);
@@ -68,7 +69,7 @@ const Te = () => {
68
69
  "aria-label": "Breadcrumb",
69
70
  children: /* @__PURE__ */ e.jsxs("ol", { className: "inline-flex items-center space-x-1 md:space-x-3", children: [
70
71
  /* @__PURE__ */ e.jsx("li", { className: "inline-flex items-center", children: /* @__PURE__ */ e.jsxs("div", { className: "inline-flex items-center text-sm font-medium text-gray-500 dark:text-gray-400", children: [
71
- /* @__PURE__ */ e.jsx(I, { className: "mr-2 h-4 w-4" }),
72
+ /* @__PURE__ */ e.jsx(A, { className: "mr-2 h-4 w-4" }),
72
73
  N(t.name)
73
74
  ] }) }),
74
75
  /* @__PURE__ */ e.jsx("li", { "aria-current": "page", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
@@ -102,5 +103,5 @@ const Te = () => {
102
103
  );
103
104
  };
104
105
  export {
105
- Te as default
106
+ ze as default
106
107
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),s=require("./index-0FIxW0gR.cjs"),i=require("lodash-es"),j=require("sonner"),l=require("react"),o=require("./index-7zSzDmAA.cjs"),p=require("lucide-react"),f=require("react-i18next");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-D_vtk3zK.cjs");require("./MODIFIERS-mVmfEGgo.cjs");require("clsx");require("tailwind-merge");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-icons");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("react-icons-picker");require("react-dom");require("react-quill");require("./Functions-N3yhPYKY.cjs");require("@chaibuilder/runtime");require("jotai");require("@react-hookz/web");require("tree-model");require("./index-5IJnVFyU.cjs");require("i18next");require("@floating-ui/react-dom");require("flagged");require("react-hotkeys-hook");require("./index--mLLy7QQ.cjs");require("./html-to-json-ndxaXRT8.cjs");require("himalaya");require("lodash");const E=()=>{const{data:t}=o.useProject(),{data:u,isLoading:x}=o.usePages(),{saveState:d}=s.useSavePage(),m=o.useChangePage(),{t:q}=f.useTranslation(),[n,a]=o.useCurrentPage(),c=i.sortBy(i.filter(u,{type:"STATIC"}),r=>i.get(r,"uuid")===(t==null?void 0:t.homepage)?0:1);l.useEffect(()=>{!i.isEmpty(u)&&t.homepage&&!i.find(u,{uuid:n})&&a(t.homepage)},[n,u,t,a]),l.useEffect(()=>()=>a(null),[a]);const g=r=>{if(d!=="SAVED")j.toast.error(q("You have unsaved changes. Please save before changing the page."));else{const h=i.find(c,{uuid:r});m(h)}};return x||i.isEmpty(n)?null:e.jsxRuntimeExports.jsx("nav",{className:"flex rounded-lg border border-gray-200 bg-gray-50 px-3 py-1 pr-0 text-gray-700 dark:border-gray-700 dark:bg-gray-800","aria-label":"Breadcrumb",children:e.jsxRuntimeExports.jsxs("ol",{className:"inline-flex items-center space-x-1 md:space-x-3",children:[e.jsxRuntimeExports.jsx("li",{className:"inline-flex items-center",children:e.jsxRuntimeExports.jsxs("div",{className:"inline-flex items-center text-sm font-medium text-gray-500 dark:text-gray-400",children:[e.jsxRuntimeExports.jsx(p.BriefcaseIcon,{className:"mr-2 h-4 w-4"}),i.capitalize(t.name)]})}),e.jsxRuntimeExports.jsx("li",{"aria-current":"page",children:e.jsxRuntimeExports.jsxs("div",{className:"flex items-center",children:[e.jsxRuntimeExports.jsx("svg",{className:"mx-1 h-3 w-3 text-gray-400","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 6 10",children:e.jsxRuntimeExports.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"m1 9 4-4-4-4"})}),e.jsxRuntimeExports.jsxs(s.Select,{value:n||"",onValueChange:g,children:[e.jsxRuntimeExports.jsx(s.SelectTrigger,{className:"h-max border-0 py-0 text-sm font-medium text-gray-600 shadow-none outline-none ring-0 focus:ring-0 dark:text-gray-400",children:e.jsxRuntimeExports.jsx(s.SelectValue,{placeholder:"Page"})}),e.jsxRuntimeExports.jsx(s.SelectContent,{className:"z-[999]",children:i.map(c,r=>e.jsxRuntimeExports.jsx(s.SelectItem,{value:r.uuid,children:r==null?void 0:r.name},r.uuid))})]})]})})]})})};exports.default=E;
@@ -3,7 +3,7 @@ import React__default, { memo, useMemo, useCallback, useEffect, useRef } from "r
3
3
  import { useAtom } from "jotai";
4
4
  import { useDebouncedCallback } from "@react-hookz/web";
5
5
  import { Tree } from "react-arborist";
6
- import { j as useBlocksStore, L as useSelectedBlockIds, H as useRemoveBlocks, M as useSelectedBlock, bt as ContextMenuItem, aK as canDeleteBlock, x as useDuplicateBlocks, bu as ContextMenuContent, aJ as canDuplicateBlock, bv as ContextMenu, bw as ContextMenuTrigger, h as useBuilderProp, D as useHighlightBlockId, aM as canAcceptChildBlock, ac as Tooltip, ad as TooltipTrigger, ae as TooltipContent, bx as treeDSBlocks, Q as useUpdateBlocksProps, Y as useSelectedStylingBlocks, aB as useBlocksStoreUndoableActions, aH as treeRefAtom } from "./ChaiBuilderEditor-tkzS851D.js";
6
+ import { D as useBlocksStore, r as useSelectedBlockIds, s as useRemoveBlocks, ai as useSelectedBlock, bC as ContextMenuItem, b2 as canDeleteBlock, t as useDuplicateBlocks, bD as ContextMenuContent, b1 as canDuplicateBlock, bE as ContextMenu, bF as ContextMenuTrigger, h as useBuilderProp, b7 as canvasIframeAtom, b5 as canAcceptChildBlock, aF as Tooltip, aG as TooltipTrigger, aH as TooltipContent, bG as treeDSBlocks, am as useUpdateBlocksProps, at as useSelectedStylingBlocks, aW as useBlocksStoreUndoableActions, a$ as treeRefAtom } from "./index-uLn8W3eR.js";
7
7
  import { c as cn } from "./Functions-7jnEwJyw.js";
8
8
  import { BoxModelIcon, BoxIcon, DragHandleHorizontalIcon, ViewHorizontalIcon, BorderAllIcon, BorderTopIcon, TableIcon, DropdownMenuIcon, RadiobuttonIcon, InputIcon, ButtonIcon, CheckboxIcon, GroupIcon, SpaceBetweenVerticallyIcon, ColumnsIcon, RowsIcon, TextIcon, SketchLogoIcon, DividerHorizontalIcon, CodeIcon, CursorTextIcon, VideoIcon, Link1Icon, HeadingIcon, ImageIcon, TrashIcon, CopyIcon, TriangleRightIcon } from "@radix-ui/react-icons";
9
9
  import { DatabaseIcon } from "lucide-react";
@@ -11,25 +11,19 @@ import { find, first, isEmpty } from "lodash-es";
11
11
  import { useTranslation } from "react-i18next";
12
12
  import { G as GenIcon } from "./index-VBXQixVm.js";
13
13
  import "./_commonjsHelpers-UyOWmZb0.js";
14
- import "clsx";
15
- import "react-dom";
16
- import "@radix-ui/react-scroll-area";
17
- import "@floating-ui/react-dom";
18
- import "i18next";
19
- import "flagged";
20
- import "./MODIFIERS-fd5XOmum.js";
21
- import "@chaibuilder/runtime";
22
- import "tree-model";
23
- import "./utils-VpVqnC9m.js";
24
- import "tailwind-merge";
25
14
  import "@radix-ui/react-toggle";
26
15
  import "class-variance-authority";
16
+ import "./utils-VpVqnC9m.js";
17
+ import "./MODIFIERS-fd5XOmum.js";
18
+ import "clsx";
19
+ import "tailwind-merge";
27
20
  import "@radix-ui/react-switch";
28
21
  import "@radix-ui/react-slot";
29
22
  import "@radix-ui/react-accordion";
30
23
  import "@radix-ui/react-alert-dialog";
31
24
  import "@radix-ui/react-dialog";
32
25
  import "@radix-ui/react-label";
26
+ import "@radix-ui/react-scroll-area";
33
27
  import "@radix-ui/react-tabs";
34
28
  import "@radix-ui/react-tooltip";
35
29
  import "@radix-ui/react-popover";
@@ -42,8 +36,10 @@ import "@radix-ui/react-toast";
42
36
  import "cmdk";
43
37
  import "@radix-ui/react-context-menu";
44
38
  import "react-icons-picker";
39
+ import "react-dom";
45
40
  import "react-quill";
46
- import "react-hotkeys-hook";
41
+ import "@chaibuilder/runtime";
42
+ import "tree-model";
47
43
  const TypeIcon = (a) => {
48
44
  switch (a.type) {
49
45
  case "Image":
@@ -111,18 +107,18 @@ const TypeIcon = (a) => {
111
107
  alignItems: "center",
112
108
  zIndex: 1
113
109
  }, DefaultCursor = React__default.memo(function({ top: l, left: r }) {
114
- const n = {
110
+ const o = {
115
111
  position: "absolute",
116
112
  pointerEvents: "none",
117
113
  top: l + "px",
118
114
  left: r + "px",
119
115
  right: 0
120
116
  };
121
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { ...placeholderStyle, ...n }, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "h-0.5 flex-1 rounded-[1px] bg-green-500" }) });
117
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { ...placeholderStyle, ...o }, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "h-0.5 flex-1 rounded-[1px] bg-green-500" }) });
122
118
  }), Overlay = memo(function({ children: l, isDragging: r }) {
123
119
  return r ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "pointer-events-none fixed left-0 top-0 z-[100] h-full w-full", children: l }) : null;
124
120
  }), DefaultDragPreview = memo(({ id: a, isDragging: l, mouse: r }) => {
125
- const [n] = useBlocksStore(), i = useMemo(() => n.find((c) => c._id === a), [n, a]), d = useMemo(
121
+ const [o] = useBlocksStore(), i = useMemo(() => o.find((M) => M._id === a), [o, a]), c = useMemo(
126
122
  () => ({
127
123
  transform: `translate(${(r == null ? void 0 : r.x) - 10}px, ${(r == null ? void 0 : r.y) - 10}px)`
128
124
  }),
@@ -132,7 +128,7 @@ const TypeIcon = (a) => {
132
128
  "div",
133
129
  {
134
130
  className: "pointer-events-none absolute z-50 rounded border border-gray-200 bg-gray-100/80 font-semibold text-blue-600 shadow-md dark:border-gray-700 dark:bg-gray-800",
135
- style: d,
131
+ style: c,
136
132
  children: /* @__PURE__ */ jsxRuntimeExports.jsxs("button", { type: "button", className: "flex !cursor-grab items-center p-0.5", "aria-label": `Type: ${i == null ? void 0 : i._type}`, children: [
137
133
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "-mt-0.5 h-3 w-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx(TypeIcon, { type: i == null ? void 0 : i._type }) }),
138
134
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ml-2 truncate text-[11px]", children: (i == null ? void 0 : i._name) || (i == null ? void 0 : i._type) })
@@ -154,7 +150,7 @@ const TypeIcon = (a) => {
154
150
  }
155
151
  );
156
152
  }, BlockContextMenuContent = () => {
157
- const [a] = useSelectedBlockIds(), l = useDuplicateBlocks(), r = useSelectedBlock(), n = useCallback(() => {
153
+ const [a] = useSelectedBlockIds(), l = useDuplicateBlocks(), r = useSelectedBlock(), o = useCallback(() => {
158
154
  l(a);
159
155
  }, [a, l]);
160
156
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuContent, { className: "text-xs", children: [
@@ -163,7 +159,7 @@ const TypeIcon = (a) => {
163
159
  {
164
160
  disabled: !canDuplicateBlock(r == null ? void 0 : r._type),
165
161
  className: "flex items-center gap-x-4 text-xs",
166
- onClick: n,
162
+ onClick: o,
167
163
  children: [
168
164
  /* @__PURE__ */ jsxRuntimeExports.jsx(CopyIcon, {}),
169
165
  " Duplicate"
@@ -200,8 +196,8 @@ function selectPrev(a) {
200
196
  a.select(l.id);
201
197
  }
202
198
  const selectParent = (a, l) => {
203
- var n;
204
- const r = ((n = a.selectedIds[0]) == null ? void 0 : n.parent) || null;
199
+ var o;
200
+ const r = ((o = a.selectedIds[0]) == null ? void 0 : o.parent) || null;
205
201
  r && l && a.select(r.id);
206
202
  }, open = (a, l) => {
207
203
  const r = a.selectedNodes[0];
@@ -25510,39 +25506,60 @@ function TbZzz(a) {
25510
25506
  return GenIcon({ tag: "svg", attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { d: "M4 12h6l-6 8h6" }, child: [] }, { tag: "path", attr: { d: "M14 4h6l-6 8h6" }, child: [] }] })(a);
25511
25507
  }
25512
25508
  const Node = memo(({ node: a, style: l, dragHandle: r }) => {
25513
- const n = useBuilderProp("outlineMenuItems", []), [, i] = useHighlightBlockId(), d = a.children.length > 0, { id: c, data: h, isSelected: f, willReceiveDrop: u, isDragging: k, isEditing: L, handleClick: C } = a, B = useDebouncedCallback((o) => i(o), [], 300), m = (o) => {
25514
- o.stopPropagation(), a.toggle();
25515
- }, z = (o) => {
25516
- o.stopPropagation(), a.isOpen || a.toggle(), C(o);
25509
+ const o = useBuilderProp("outlineMenuItems", []), [i] = useAtom(canvasIframeAtom);
25510
+ let c = null;
25511
+ const M = a.children.length > 0, { id: d, data: h, isSelected: m, willReceiveDrop: k, isDragging: L, isEditing: z, handleClick: w } = a, x = (n) => {
25512
+ n.stopPropagation(), a.toggle();
25513
+ }, I = (n) => {
25514
+ n.isInternal && (c = n.isOpen, n.isOpen && n.close());
25515
+ }, G = (n) => {
25516
+ n.isInternal && c !== null && (c ? n.open() : n.close(), c = null);
25517
+ }, V = (n) => {
25518
+ n.stopPropagation(), a.isOpen || a.toggle(), w(n);
25517
25519
  };
25518
25520
  useEffect(() => {
25519
- const o = setTimeout(() => {
25520
- u && !a.isOpen && a.toggle();
25521
+ const n = setTimeout(() => {
25522
+ k && !a.isOpen && !L && a.toggle();
25521
25523
  }, 500);
25522
- return () => clearTimeout(o);
25523
- }, [u, a]);
25524
- const p = useMemo(() => {
25525
- const o = Object.keys(h), g = [];
25526
- for (let v = 0; v < o.length; v++)
25527
- if (o[v].endsWith("_attrs")) {
25528
- const w = h[o[v]], M = Object.keys(w).join("|");
25529
- M.match(/x-data/) && g.push("data"), M.match(/x-on:|@click/) && g.push("event"), M.match(/x-show/) && g.push("show");
25524
+ return () => clearTimeout(n);
25525
+ }, [k, a, L]);
25526
+ const C = useMemo(() => {
25527
+ const n = Object.keys(h), u = [];
25528
+ for (let v = 0; v < n.length; v++)
25529
+ if (n[v].endsWith("_attrs")) {
25530
+ const p = h[n[v]], g = Object.keys(p).join("|");
25531
+ g.match(/x-data/) && u.push("data"), g.match(/x-on/) && u.push("event"), g.match(/x-show|x-if/) && u.push("show");
25530
25532
  }
25531
- return g;
25532
- }, [h]);
25533
- return /* @__PURE__ */ jsxRuntimeExports.jsx(BlockContextMenu, { id: c, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
25533
+ return u;
25534
+ }, [h]), B = (n, u) => {
25535
+ const v = i.contentDocument || i.contentWindow.document, p = v.querySelector(`[data-block-id=${n}]`);
25536
+ p && p.setAttribute("data-drop", u);
25537
+ const g = p.getBoundingClientRect(), f = i.getBoundingClientRect();
25538
+ g.top >= f.top && g.left >= f.left && g.bottom <= f.bottom && g.right <= f.right || (v.documentElement.scrollTop = p.offsetTop - f.top);
25539
+ };
25540
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(BlockContextMenu, { id: d, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
25534
25541
  "div",
25535
25542
  {
25536
- onClick: z,
25537
- onMouseEnter: () => B(c),
25543
+ onClick: V,
25538
25544
  style: l,
25539
- "data-node-id": c,
25545
+ "data-node-id": d,
25540
25546
  ref: r,
25547
+ onDragStart: () => I(a),
25548
+ onDragEnd: () => G(a),
25549
+ onDragOver: (n) => {
25550
+ n.preventDefault(), B(d, "yes");
25551
+ },
25552
+ onDragLeave: (n) => {
25553
+ n.preventDefault(), B(d, "no");
25554
+ },
25555
+ onDrop: (n) => {
25556
+ n.preventDefault(), B(d, "no");
25557
+ },
25541
25558
  className: cn(
25542
25559
  "group flex !h-fit w-full items-center justify-between space-x-px py-px outline-none",
25543
- f ? "bg-blue-500 text-white" : "text-gray-600 hover:bg-gray-200 dark:hover:bg-gray-800",
25544
- u && canAcceptChildBlock(h._type, "Icon") ? "bg-green-200" : "",
25545
- k && "opacity-20"
25560
+ m ? "bg-blue-500 text-white" : "text-gray-600 hover:bg-gray-200 dark:hover:bg-gray-800",
25561
+ k && canAcceptChildBlock(h._type, "Icon") ? "bg-green-200" : "",
25562
+ L && "opacity-20"
25546
25563
  ),
25547
25564
  children: [
25548
25565
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center", children: [
@@ -25550,38 +25567,38 @@ const Node = memo(({ node: a, style: l, dragHandle: r }) => {
25550
25567
  "div",
25551
25568
  {
25552
25569
  className: `flex h-4 w-4 rotate-0 transform cursor-pointer items-center justify-center text-xs transition-transform duration-100 ${a.isOpen ? "rotate-90" : ""}`,
25553
- children: d && /* @__PURE__ */ jsxRuntimeExports.jsx("button", { onClick: m, type: "button", children: /* @__PURE__ */ jsxRuntimeExports.jsx(TriangleRightIcon, {}) })
25570
+ children: M && /* @__PURE__ */ jsxRuntimeExports.jsx("button", { onClick: x, type: "button", children: /* @__PURE__ */ jsxRuntimeExports.jsx(TriangleRightIcon, {}) })
25554
25571
  }
25555
25572
  ),
25556
25573
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center", children: [
25557
25574
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "-mt-0.5 h-3 w-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx(TypeIcon, { type: h == null ? void 0 : h._type }) }),
25558
- L ? /* @__PURE__ */ jsxRuntimeExports.jsx(Input, { node: a }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(
25575
+ z ? /* @__PURE__ */ jsxRuntimeExports.jsx(Input, { node: a }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(
25559
25576
  "div",
25560
25577
  {
25561
25578
  className: "ml-2 flex items-center gap-x-1 truncate text-[11px]",
25562
- onDoubleClick: (o) => {
25563
- o.stopPropagation(), a.edit(), a.deselect();
25579
+ onDoubleClick: (n) => {
25580
+ n.stopPropagation(), a.edit(), a.deselect();
25564
25581
  },
25565
25582
  children: [
25566
25583
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: (h == null ? void 0 : h._name) || (h == null ? void 0 : h._type.split("/").pop()) }),
25567
- p.includes("data") && /* @__PURE__ */ jsxRuntimeExports.jsx(VscJson, { className: "h-3 w-3 text-orange-600" }),
25568
- p.includes("event") && /* @__PURE__ */ jsxRuntimeExports.jsx(BsLightningFill, { className: "h-3 w-3 text-yellow-500" }),
25569
- p.includes("show") && /* @__PURE__ */ jsxRuntimeExports.jsx(TbEyeDown, { className: "h-3 w-3 text-orange-600" })
25584
+ C.includes("data") && /* @__PURE__ */ jsxRuntimeExports.jsx(VscJson, { className: "h-3 w-3 text-orange-600" }),
25585
+ C.includes("event") && /* @__PURE__ */ jsxRuntimeExports.jsx(BsLightningFill, { className: "h-3 w-3 text-yellow-500" }),
25586
+ C.includes("show") && /* @__PURE__ */ jsxRuntimeExports.jsx(TbEyeDown, { className: "h-3 w-3 text-orange-600" })
25570
25587
  ]
25571
25588
  }
25572
25589
  )
25573
25590
  ] })
25574
25591
  ] }),
25575
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "invisible flex items-center space-x-1 pr-2 group-hover:visible", children: n.map((o) => /* @__PURE__ */ jsxRuntimeExports.jsxs(Tooltip, { children: [
25592
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "invisible flex items-center space-x-1 pr-2 group-hover:visible", children: o.map((n) => /* @__PURE__ */ jsxRuntimeExports.jsxs(Tooltip, { children: [
25576
25593
  /* @__PURE__ */ jsxRuntimeExports.jsx(
25577
25594
  TooltipTrigger,
25578
25595
  {
25579
25596
  className: "cursor-pointer rounded bg-transparent hover:bg-white hover:text-blue-500",
25580
25597
  asChild: !0,
25581
- children: React__default.createElement(o.item, { blockId: c })
25598
+ children: React__default.createElement(n.item, { blockId: d })
25582
25599
  }
25583
25600
  ),
25584
- /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipContent, { className: "z-[9999]", children: o.tooltip })
25601
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipContent, { className: "z-[9999]", children: n.tooltip })
25585
25602
  ] })) })
25586
25603
  ]
25587
25604
  }
@@ -25595,22 +25612,22 @@ const Node = memo(({ node: a, style: l, dragHandle: r }) => {
25595
25612
  className: "ml-2 w-full rounded-sm border border-black/30 bg-transparent px-1 text-[11px] outline-none",
25596
25613
  type: "text",
25597
25614
  defaultValue: ((l = a.data) == null ? void 0 : l._name) || ((r = a.data) == null ? void 0 : r._type),
25598
- onFocus: (n) => n.currentTarget.select(),
25599
- onBlur: (n) => a.submit(n.currentTarget.value),
25600
- onKeyDown: (n) => {
25601
- n.key === "Enter" && a.submit(n.currentTarget.value);
25615
+ onFocus: (o) => o.currentTarget.select(),
25616
+ onBlur: (o) => a.submit(o.currentTarget.value),
25617
+ onKeyDown: (o) => {
25618
+ o.key === "Enter" && a.submit(o.currentTarget.value);
25602
25619
  }
25603
25620
  }
25604
25621
  );
25605
25622
  }, useCanMove = () => {
25606
25623
  const [a] = useBlocksStore();
25607
25624
  return (l, r) => {
25608
- var d;
25609
- const n = (d = find(a, { _id: r })) == null ? void 0 : d._type, i = first(l.map((c) => {
25610
- var h;
25611
- return (h = find(a, { _id: c })) == null ? void 0 : h._type;
25625
+ var c;
25626
+ const o = (c = find(a, { _id: r })) == null ? void 0 : c._type, i = first(l.map((M) => {
25627
+ var d;
25628
+ return (d = find(a, { _id: M })) == null ? void 0 : d._type;
25612
25629
  }));
25613
- return canAcceptChildBlock(n, i);
25630
+ return canAcceptChildBlock(o, i);
25614
25631
  };
25615
25632
  }, ListTree = () => {
25616
25633
  const [treeData] = useAtom(treeDSBlocks), [ids, setIds] = useSelectedBlockIds(), updateBlockProps = useUpdateBlocksProps(), [, setStyleBlocks] = useSelectedStylingBlocks(), { moveBlocks } = useBlocksStoreUndoableActions(), canMove = useCanMove(), treeRef = useRef(null), [, setTreeRef] = useAtom(treeRefAtom), { t } = useTranslation(), clearSelection = () => {
@@ -25629,9 +25646,9 @@ const Node = memo(({ node: a, style: l, dragHandle: r }) => {
25629
25646
  const l = a[0] ? a[0].id : "";
25630
25647
  setStyleBlocks([]), setIds([l]);
25631
25648
  }, onContextMenu = (a) => {
25632
- var n;
25649
+ var o;
25633
25650
  a.preventDefault();
25634
- const l = a.target, r = l.getAttribute("data-node-id") || ((n = l.closest("[data-node-id]")) == null ? void 0 : n.getAttribute("data-node-id"));
25651
+ const l = a.target, r = l.getAttribute("data-node-id") || ((o = l.closest("[data-node-id]")) == null ? void 0 : o.getAttribute("data-node-id"));
25635
25652
  r && (setStyleBlocks([]), setIds([r]));
25636
25653
  }, debouncedDisableDrop = useDebouncedCallback(
25637
25654
  ({ parentNode: a, dragNodes: l }) => {