treege 3.0.0-beta.36 → 3.0.0-beta.38
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.
- package/dist/{editor-B_W2kWB1.js → editor-DIDA-NYK.js} +33 -33
- package/dist/editor.js +1 -1
- package/dist/main.js +1 -1
- package/package.json +1 -1
|
@@ -596,35 +596,38 @@ function Rt({ className: e, ...t }) {
|
|
|
596
596
|
//#region src/editor/features/TreegeEditor/nodes/components/NodeMoreMenu.tsx
|
|
597
597
|
var zt = ({ nodeId: e, className: t }) => {
|
|
598
598
|
let { selectNode: n } = q(), { setIsNodeSheetOpen: r, openDeleteNodeConfirmation: i } = W(), a = G(), o = (e) => e.stopPropagation();
|
|
599
|
-
return /* @__PURE__ */ F(J, {
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
align: "end",
|
|
610
|
-
onClick: o,
|
|
611
|
-
children: [
|
|
612
|
-
/* @__PURE__ */ F(Z, {
|
|
613
|
-
onClick: () => {
|
|
614
|
-
n(e), r(!0);
|
|
615
|
-
},
|
|
616
|
-
children: [/* @__PURE__ */ P(it, {}), a("common.settings")]
|
|
617
|
-
}),
|
|
618
|
-
/* @__PURE__ */ P(Rt, {}),
|
|
619
|
-
/* @__PURE__ */ F(Z, {
|
|
620
|
-
variant: "destructive",
|
|
621
|
-
onSelect: (t) => {
|
|
622
|
-
t.preventDefault(), i(e);
|
|
623
|
-
},
|
|
624
|
-
children: [/* @__PURE__ */ P(ot, {}), a("common.delete")]
|
|
599
|
+
return /* @__PURE__ */ F(J, {
|
|
600
|
+
modal: !1,
|
|
601
|
+
children: [/* @__PURE__ */ P(Y, {
|
|
602
|
+
asChild: !0,
|
|
603
|
+
onClick: o,
|
|
604
|
+
children: /* @__PURE__ */ P("button", {
|
|
605
|
+
type: "button",
|
|
606
|
+
"aria-label": a("editor.nodeActionsSheet.editNode"),
|
|
607
|
+
className: d("nodrag nopan absolute top-2 right-2 flex h-6 w-6 cursor-pointer items-center justify-center rounded-md opacity-60 transition-all hover:text-[--treege-color-primary] hover:opacity-100", t),
|
|
608
|
+
children: /* @__PURE__ */ P(Ze, { className: "h-3.5 w-3.5" })
|
|
625
609
|
})
|
|
626
|
-
|
|
627
|
-
|
|
610
|
+
}), /* @__PURE__ */ F(X, {
|
|
611
|
+
align: "end",
|
|
612
|
+
onClick: o,
|
|
613
|
+
children: [
|
|
614
|
+
/* @__PURE__ */ F(Z, {
|
|
615
|
+
onSelect: () => {
|
|
616
|
+
n(e), r(!0);
|
|
617
|
+
},
|
|
618
|
+
children: [/* @__PURE__ */ P(it, {}), a("common.settings")]
|
|
619
|
+
}),
|
|
620
|
+
/* @__PURE__ */ P(Rt, {}),
|
|
621
|
+
/* @__PURE__ */ F(Z, {
|
|
622
|
+
variant: "destructive",
|
|
623
|
+
onSelect: () => {
|
|
624
|
+
i(e);
|
|
625
|
+
},
|
|
626
|
+
children: [/* @__PURE__ */ P(ot, {}), a("common.delete")]
|
|
627
|
+
})
|
|
628
|
+
]
|
|
629
|
+
})]
|
|
630
|
+
});
|
|
628
631
|
}, Bt = bt("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3", {
|
|
629
632
|
defaultVariants: { variant: "default" },
|
|
630
633
|
variants: { variant: {
|
|
@@ -737,9 +740,9 @@ var Ht = pt(({ data: e, id: t }) => /* @__PURE__ */ F(N, { children: [
|
|
|
737
740
|
}, [t, r]), l = z((e, t) => {
|
|
738
741
|
let n = r(e);
|
|
739
742
|
if (!n) return;
|
|
740
|
-
let s = getComputedStyle(document.documentElement).getPropertyValue("--node-height"), c = getComputedStyle(document.documentElement).getPropertyValue("--node-width"), l = parseFloat(s) || 100, u = parseFloat(c) || 100, d = n.position.y + l + 100, f = i(), p = a(), m = f.filter((t) => p.some((n) => n.source === e && n.target === t.id));
|
|
743
|
+
let s = getComputedStyle(document.documentElement).getPropertyValue("--node-height"), c = getComputedStyle(document.documentElement).getPropertyValue("--node-width"), l = parseFloat(s) || 100, u = parseFloat(c) || 100, d = n.position.y + l + 100, f = i(), p = a(), m = f.filter((t) => p.some((n) => n.source === e && n.target === t.id)).map((e) => e.position.x);
|
|
741
744
|
o(n, {
|
|
742
|
-
x: m.length
|
|
745
|
+
x: m.length === 0 ? n.position.x : m.length % 2 == 1 ? Math.max(...m) + u + 50 : Math.min(...m) - u - 50,
|
|
743
746
|
y: d
|
|
744
747
|
}, !0, t);
|
|
745
748
|
}, [
|
|
@@ -1063,11 +1066,8 @@ var Ht = pt(({ data: e, id: t }) => /* @__PURE__ */ F(N, { children: [
|
|
|
1063
1066
|
onOpenChange: (e) => {
|
|
1064
1067
|
e || t();
|
|
1065
1068
|
},
|
|
1066
|
-
modal: !1,
|
|
1067
1069
|
children: /* @__PURE__ */ F(b, {
|
|
1068
1070
|
showCloseButton: !1,
|
|
1069
|
-
onInteractOutside: (e) => e.preventDefault(),
|
|
1070
|
-
onPointerDownOutside: (e) => e.preventDefault(),
|
|
1071
1071
|
children: [/* @__PURE__ */ F(re, { children: [/* @__PURE__ */ P(C, { children: r("editor.nodeActionsSheet.deleteNode") }), /* @__PURE__ */ P(x, { children: r("editor.nodeActionsSheet.deleteNodeConfirm") })] }), /* @__PURE__ */ F(O, { children: [/* @__PURE__ */ P(p, {
|
|
1072
1072
|
variant: "outline",
|
|
1073
1073
|
onClick: t,
|
package/dist/editor.js
CHANGED
package/dist/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./editor-
|
|
1
|
+
import { t as e } from "./editor-DIDA-NYK.js";
|
|
2
2
|
import { c as t, d as n, l as r, n as i, o as a, s as o, t as s, u as c } from "./ThemeContext-DBFles56.js";
|
|
3
3
|
import { C as l, _ as u, a as d, b as f, d as p, f as m, g as h, h as g, i as _, l as v, m as y, n as b, p as x, r as S, u as C, v as w, w as T, x as E, y as D } from "./useRenderNode-BTzgPipn.js";
|
|
4
4
|
import { C as O, S as k, _ as A, a as j, b as M, c as N, d as P, f as F, g as I, h as L, i as R, l as z, m as B, n as V, o as H, p as U, r as W, s as G, t as K, u as q, v as J, x as Y, y as X } from "./renderer-JJGxelGQ.js";
|