geonodes-web-render 0.3.20 → 0.3.22
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/README.md +4 -0
- package/dist/embed.js +66 -59
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
# geonodes-web-render
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/geonodes-web-render?activeTab=readme)
|
|
4
|
+
|
|
3
5
|
A browser-based viewer for Blender node trees exported via the [Tree Clipper](https://extensions.blender.org/add-ons/tree-clipper/) add-on. It renders the exported JSON as a read-only, Blender-styled node graph using React Flow.
|
|
4
6
|
|
|
7
|
+
📦 **npm:** [geonodes-web-render](https://www.npmjs.com/package/geonodes-web-render?activeTab=readme)
|
|
8
|
+
|
|
5
9
|
## What it does
|
|
6
10
|
|
|
7
11
|
Paste or load a Tree Clipper JSON export and the app displays the node graph with accurate socket colors, node header colors, reroute nodes, float curves, and simulation zones.
|
package/dist/embed.js
CHANGED
|
@@ -257,16 +257,16 @@ function re(e) {
|
|
|
257
257
|
//#endregion
|
|
258
258
|
//#region node_modules/d3-selection/src/selection/selectChild.js
|
|
259
259
|
var ie = Array.prototype.find;
|
|
260
|
-
function
|
|
260
|
+
function ae(e) {
|
|
261
261
|
return function() {
|
|
262
262
|
return ie.call(this.children, e);
|
|
263
263
|
};
|
|
264
264
|
}
|
|
265
|
-
function
|
|
265
|
+
function G() {
|
|
266
266
|
return this.firstElementChild;
|
|
267
267
|
}
|
|
268
268
|
function oe(e) {
|
|
269
|
-
return this.select(e == null ?
|
|
269
|
+
return this.select(e == null ? G : ae(typeof e == "function" ? e : re(e)));
|
|
270
270
|
}
|
|
271
271
|
//#endregion
|
|
272
272
|
//#region node_modules/d3-selection/src/selection/selectChildren.js
|
|
@@ -6312,9 +6312,9 @@ function Hu({ id: e, edgesFocusable: t, edgesReconnectable: n, elementsSelectabl
|
|
|
6312
6312
|
}), N.current?.blur()) : n([e])), i && i(t, T);
|
|
6313
6313
|
}, ie = o ? (e) => {
|
|
6314
6314
|
o(e, { ...T });
|
|
6315
|
-
} : void 0,
|
|
6315
|
+
} : void 0, ae = s ? (e) => {
|
|
6316
6316
|
s(e, { ...T });
|
|
6317
|
-
} : void 0,
|
|
6317
|
+
} : void 0, G = c ? (e) => {
|
|
6318
6318
|
c(e, { ...T });
|
|
6319
6319
|
} : void 0, oe = l ? (e) => {
|
|
6320
6320
|
l(e, { ...T });
|
|
@@ -6339,8 +6339,8 @@ function Hu({ id: e, edgesFocusable: t, edgesReconnectable: n, elementsSelectabl
|
|
|
6339
6339
|
]),
|
|
6340
6340
|
onClick: re,
|
|
6341
6341
|
onDoubleClick: ie,
|
|
6342
|
-
onContextMenu:
|
|
6343
|
-
onMouseEnter:
|
|
6342
|
+
onContextMenu: ae,
|
|
6343
|
+
onMouseEnter: G,
|
|
6344
6344
|
onMouseMove: oe,
|
|
6345
6345
|
onMouseLeave: se,
|
|
6346
6346
|
onKeyDown: A ? (t) => {
|
|
@@ -6582,7 +6582,7 @@ function od() {
|
|
|
6582
6582
|
}
|
|
6583
6583
|
}, []);
|
|
6584
6584
|
}
|
|
6585
|
-
function sd({ nodeTypes: e, edgeTypes: t, onInit: n, onNodeClick: r, onEdgeClick: i, onNodeDoubleClick: a, onEdgeDoubleClick: o, onNodeMouseEnter: s, onNodeMouseMove: c, onNodeMouseLeave: l, onNodeContextMenu: u, onSelectionContextMenu: d, onSelectionStart: f, onSelectionEnd: p, connectionLineType: m, connectionLineStyle: h, connectionLineComponent: v, connectionLineContainerStyle: y, selectionKeyCode: b, selectionOnDrag: x, selectionMode: S, multiSelectionKeyCode: C, panActivationKeyCode: w, zoomActivationKeyCode: T, deleteKeyCode: E, onlyRenderVisibleElements: D, elementsSelectable: O, defaultViewport: k, translateExtent: A, minZoom: j, maxZoom: M, preventScrolling: N, defaultMarkerColor: P, zoomOnScroll: F, zoomOnPinch: I, panOnScroll: L, panOnScrollSpeed: R, panOnScrollMode: ee, zoomOnDoubleClick: z, panOnDrag: B, autoPanOnSelection: V, onPaneClick: H, onPaneMouseEnter: U, onPaneMouseMove: W, onPaneMouseLeave: te, onPaneScroll: ne, onPaneContextMenu: re, paneClickDistance: ie, nodeClickDistance:
|
|
6585
|
+
function sd({ nodeTypes: e, edgeTypes: t, onInit: n, onNodeClick: r, onEdgeClick: i, onNodeDoubleClick: a, onEdgeDoubleClick: o, onNodeMouseEnter: s, onNodeMouseMove: c, onNodeMouseLeave: l, onNodeContextMenu: u, onSelectionContextMenu: d, onSelectionStart: f, onSelectionEnd: p, connectionLineType: m, connectionLineStyle: h, connectionLineComponent: v, connectionLineContainerStyle: y, selectionKeyCode: b, selectionOnDrag: x, selectionMode: S, multiSelectionKeyCode: C, panActivationKeyCode: w, zoomActivationKeyCode: T, deleteKeyCode: E, onlyRenderVisibleElements: D, elementsSelectable: O, defaultViewport: k, translateExtent: A, minZoom: j, maxZoom: M, preventScrolling: N, defaultMarkerColor: P, zoomOnScroll: F, zoomOnPinch: I, panOnScroll: L, panOnScrollSpeed: R, panOnScrollMode: ee, zoomOnDoubleClick: z, panOnDrag: B, autoPanOnSelection: V, onPaneClick: H, onPaneMouseEnter: U, onPaneMouseMove: W, onPaneMouseLeave: te, onPaneScroll: ne, onPaneContextMenu: re, paneClickDistance: ie, nodeClickDistance: ae, onEdgeContextMenu: G, onEdgeMouseEnter: oe, onEdgeMouseMove: se, onEdgeMouseLeave: ce, reconnectRadius: le, onReconnect: ue, onReconnectStart: de, onReconnectEnd: fe, noDragClassName: pe, noWheelClassName: me, noPanClassName: he, disableKeyboardA11y: ge, nodeExtent: _e, rfId: ve, viewport: ye, onViewportChange: be }) {
|
|
6586
6586
|
return ad(e), ad(t), od(), Yu(n), Zu(ye), g(Xl, {
|
|
6587
6587
|
onPaneClick: H,
|
|
6588
6588
|
onPaneMouseEnter: U,
|
|
@@ -6630,7 +6630,7 @@ function sd({ nodeTypes: e, edgeTypes: t, onInit: n, onNodeClick: r, onEdgeClick
|
|
|
6630
6630
|
onReconnectStart: de,
|
|
6631
6631
|
onReconnectEnd: fe,
|
|
6632
6632
|
onlyRenderVisibleElements: D,
|
|
6633
|
-
onEdgeContextMenu:
|
|
6633
|
+
onEdgeContextMenu: G,
|
|
6634
6634
|
onEdgeMouseEnter: oe,
|
|
6635
6635
|
onEdgeMouseMove: se,
|
|
6636
6636
|
onEdgeMouseLeave: ce,
|
|
@@ -6655,7 +6655,7 @@ function sd({ nodeTypes: e, edgeTypes: t, onInit: n, onNodeClick: r, onEdgeClick
|
|
|
6655
6655
|
onNodeMouseMove: c,
|
|
6656
6656
|
onNodeMouseLeave: l,
|
|
6657
6657
|
onNodeContextMenu: u,
|
|
6658
|
-
nodeClickDistance:
|
|
6658
|
+
nodeClickDistance: ae,
|
|
6659
6659
|
onlyRenderVisibleElements: D,
|
|
6660
6660
|
noPanClassName: he,
|
|
6661
6661
|
noDragClassName: pe,
|
|
@@ -7004,7 +7004,7 @@ var md = {
|
|
|
7004
7004
|
position: "relative",
|
|
7005
7005
|
zIndex: 0
|
|
7006
7006
|
};
|
|
7007
|
-
function hd({ nodes: e, edges: t, defaultNodes: n, defaultEdges: r, className: i, nodeTypes: o, edgeTypes: s, onNodeClick: c, onEdgeClick: l, onInit: u, onMove: d, onMoveStart: f, onMoveEnd: p, onConnect: m, onConnectStart: h, onConnectEnd: v, onClickConnectStart: y, onClickConnectEnd: b, onNodeMouseEnter: x, onNodeMouseMove: S, onNodeMouseLeave: C, onNodeContextMenu: w, onNodeDoubleClick: T, onNodeDragStart: E, onNodeDrag: O, onNodeDragStop: k, onNodesDelete: A, onEdgesDelete: j, onDelete: M, onSelectionChange: N, onSelectionDragStart: P, onSelectionDrag: F, onSelectionDragStop: I, onSelectionContextMenu: L, onSelectionStart: R, onSelectionEnd: ee, onBeforeDelete: z, connectionMode: B, connectionLineType: V = Ta.Bezier, connectionLineStyle: H, connectionLineComponent: U, connectionLineContainerStyle: W, deleteKeyCode: te = "Backspace", selectionKeyCode: ne = "Shift", selectionOnDrag: re = !1, selectionMode: ie = Ca.Full, panActivationKeyCode:
|
|
7007
|
+
function hd({ nodes: e, edges: t, defaultNodes: n, defaultEdges: r, className: i, nodeTypes: o, edgeTypes: s, onNodeClick: c, onEdgeClick: l, onInit: u, onMove: d, onMoveStart: f, onMoveEnd: p, onConnect: m, onConnectStart: h, onConnectEnd: v, onClickConnectStart: y, onClickConnectEnd: b, onNodeMouseEnter: x, onNodeMouseMove: S, onNodeMouseLeave: C, onNodeContextMenu: w, onNodeDoubleClick: T, onNodeDragStart: E, onNodeDrag: O, onNodeDragStop: k, onNodesDelete: A, onEdgesDelete: j, onDelete: M, onSelectionChange: N, onSelectionDragStart: P, onSelectionDrag: F, onSelectionDragStop: I, onSelectionContextMenu: L, onSelectionStart: R, onSelectionEnd: ee, onBeforeDelete: z, connectionMode: B, connectionLineType: V = Ta.Bezier, connectionLineStyle: H, connectionLineComponent: U, connectionLineContainerStyle: W, deleteKeyCode: te = "Backspace", selectionKeyCode: ne = "Shift", selectionOnDrag: re = !1, selectionMode: ie = Ca.Full, panActivationKeyCode: ae = "Space", multiSelectionKeyCode: G = lo() ? "Meta" : "Control", zoomActivationKeyCode: oe = lo() ? "Meta" : "Control", snapToGrid: se, snapGrid: ce, onlyRenderVisibleElements: le = !1, selectNodesOnDrag: ue, nodesDraggable: de, autoPanOnNodeFocus: fe, nodesConnectable: pe, nodesFocusable: me, nodeOrigin: he = Fc, edgesFocusable: ge, edgesReconnectable: _e, elementsSelectable: ve = !0, defaultViewport: ye = Ic, minZoom: be = .5, maxZoom: xe = 2, translateExtent: Se = va, preventScrolling: Ce = !0, nodeExtent: we, defaultMarkerColor: Te = "#b1b1b7", zoomOnScroll: Ee = !0, zoomOnPinch: De = !0, panOnScroll: Oe = !1, panOnScrollSpeed: ke = .5, panOnScrollMode: Ae = Sa.Free, zoomOnDoubleClick: je = !0, panOnDrag: Me = !0, onPaneClick: Ne, onPaneMouseEnter: Pe, onPaneMouseMove: Fe, onPaneMouseLeave: Ie, onPaneScroll: Le, onPaneContextMenu: Re, paneClickDistance: ze = 1, nodeClickDistance: Be = 0, children: Ve, onReconnect: He, onReconnectStart: Ue, onReconnectEnd: We, onEdgeContextMenu: Ge, onEdgeDoubleClick: Ke, onEdgeMouseEnter: qe, onEdgeMouseMove: Je, onEdgeMouseLeave: Ye, reconnectRadius: Xe = 10, onNodesChange: Ze, onEdgesChange: Qe, noDragClassName: $e = "nodrag", noWheelClassName: et = "nowheel", noPanClassName: tt = "nopan", fitView: nt, fitViewOptions: rt, connectOnClick: it, attributionPosition: at, proOptions: ot, defaultEdgeOptions: st, elevateNodesOnSelect: ct = !0, elevateEdgesOnSelect: lt = !1, disableKeyboardA11y: ut = !1, autoPanOnConnect: dt, autoPanOnNodeDrag: ft, autoPanOnSelection: pt = !0, autoPanSpeed: mt, connectionRadius: ht, isValidConnection: gt, onError: _t, style: vt, id: yt, nodeDragThreshold: bt, connectionDragThreshold: xt, viewport: St, onViewportChange: Ct, width: wt, height: Tt, colorMode: Et = "light", debug: Dt, onScroll: Ot, ariaLabelConfig: kt, zIndexMode: At = "basic", ...jt }, Mt) {
|
|
7008
7008
|
let Nt = yt || "1", Pt = Hc(Et), Ft = a((e) => {
|
|
7009
7009
|
e.currentTarget.scrollTo({
|
|
7010
7010
|
top: 0,
|
|
@@ -7121,8 +7121,8 @@ function hd({ nodes: e, edges: t, defaultNodes: n, defaultEdges: r, className: i
|
|
|
7121
7121
|
selectionOnDrag: re,
|
|
7122
7122
|
selectionMode: ie,
|
|
7123
7123
|
deleteKeyCode: te,
|
|
7124
|
-
multiSelectionKeyCode:
|
|
7125
|
-
panActivationKeyCode:
|
|
7124
|
+
multiSelectionKeyCode: G,
|
|
7125
|
+
panActivationKeyCode: ae,
|
|
7126
7126
|
zoomActivationKeyCode: oe,
|
|
7127
7127
|
onlyRenderVisibleElements: le,
|
|
7128
7128
|
defaultViewport: ye,
|
|
@@ -7486,18 +7486,18 @@ var Ud = i(Hd), Wd = i(Vd), Gd = 200, Kd = 150, qd = (e) => !e.hidden, Jd = (e)
|
|
|
7486
7486
|
};
|
|
7487
7487
|
}, Yd = "react-flow__minimap-desc";
|
|
7488
7488
|
function Xd({ style: e, className: t, nodeStrokeColor: n, nodeColor: r, nodeClassName: i = "", nodeBorderRadius: o = 5, nodeStrokeWidth: s, nodeComponent: l, bgColor: u, maskColor: f, maskStrokeColor: p, maskStrokeWidth: m, position: h = "bottom-right", onClick: v, onNodeClick: y, pannable: b = !1, zoomable: x = !1, ariaLabel: S, inversePan: C, zoomStep: w = 1, offsetScale: T = 5 }) {
|
|
7489
|
-
let E = Q(), O = d(null), { boundingRect: k, viewBB: A, rfId: j, panZoom: M, translateExtent: N, flowWidth: P, flowHeight: F, ariaLabelConfig: I } = Z(Jd, X), L = e?.width ?? Gd, R = e?.height ?? Kd, ee = k.width / L, z = k.height / R, B = Math.max(ee, z), V = B * L, H = B * R, U = T * B, W = k.x - (V - k.width) / 2 - U, te = k.y - (H - k.height) / 2 - U, ne = V + U * 2, re = H + U * 2, ie = `${Yd}-${j}`,
|
|
7490
|
-
|
|
7491
|
-
if (O.current && M) return
|
|
7489
|
+
let E = Q(), O = d(null), { boundingRect: k, viewBB: A, rfId: j, panZoom: M, translateExtent: N, flowWidth: P, flowHeight: F, ariaLabelConfig: I } = Z(Jd, X), L = e?.width ?? Gd, R = e?.height ?? Kd, ee = k.width / L, z = k.height / R, B = Math.max(ee, z), V = B * L, H = B * R, U = T * B, W = k.x - (V - k.width) / 2 - U, te = k.y - (H - k.height) / 2 - U, ne = V + U * 2, re = H + U * 2, ie = `${Yd}-${j}`, ae = d(0), G = d();
|
|
7490
|
+
ae.current = B, c(() => {
|
|
7491
|
+
if (O.current && M) return G.current = As({
|
|
7492
7492
|
domNode: O.current,
|
|
7493
7493
|
panZoom: M,
|
|
7494
7494
|
getTransform: () => E.getState().transform,
|
|
7495
|
-
getViewScale: () =>
|
|
7495
|
+
getViewScale: () => ae.current
|
|
7496
7496
|
}), () => {
|
|
7497
|
-
|
|
7497
|
+
G.current?.destroy();
|
|
7498
7498
|
};
|
|
7499
7499
|
}, [M]), c(() => {
|
|
7500
|
-
|
|
7500
|
+
G.current?.update({
|
|
7501
7501
|
translateExtent: N,
|
|
7502
7502
|
width: P,
|
|
7503
7503
|
height: F,
|
|
@@ -7516,7 +7516,7 @@ function Xd({ style: e, className: t, nodeStrokeColor: n, nodeColor: r, nodeClas
|
|
|
7516
7516
|
F
|
|
7517
7517
|
]);
|
|
7518
7518
|
let oe = v ? (e) => {
|
|
7519
|
-
let [t, n] =
|
|
7519
|
+
let [t, n] = G.current?.pointer(e) || [0, 0];
|
|
7520
7520
|
v(e, {
|
|
7521
7521
|
x: t,
|
|
7522
7522
|
y: n
|
|
@@ -7831,7 +7831,13 @@ var of = {
|
|
|
7831
7831
|
GeometryNodeEvaluateAtIndex: "CONVERTER",
|
|
7832
7832
|
GeometryNodeEvaluateOnDomain: "CONVERTER",
|
|
7833
7833
|
GeometryNodeFieldVariance: "CONVERTER",
|
|
7834
|
-
GeometryNodeViewer: "OUTPUT"
|
|
7834
|
+
GeometryNodeViewer: "OUTPUT",
|
|
7835
|
+
GeometryNodeSimulationInput: "DEFAULT",
|
|
7836
|
+
GeometryNodeSimulationOutput: "DEFAULT",
|
|
7837
|
+
GeometryNodeRepeatInput: "DEFAULT",
|
|
7838
|
+
GeometryNodeRepeatOutput: "DEFAULT",
|
|
7839
|
+
GeometryNodeForeachGeometryElementInput: "DEFAULT",
|
|
7840
|
+
GeometryNodeForeachGeometryElementOutput: "DEFAULT"
|
|
7835
7841
|
};
|
|
7836
7842
|
function sf(e, t) {
|
|
7837
7843
|
if (e === "ShaderNodeMix") return t === "VECTOR" ? "VECTOR" : t === "RGBA" ? "COLOR" : "CONVERTER";
|
|
@@ -8848,8 +8854,8 @@ function mp() {
|
|
|
8848
8854
|
width: "100%",
|
|
8849
8855
|
height: "100%",
|
|
8850
8856
|
borderRadius: 10,
|
|
8851
|
-
border: "1.5px solid rgba(
|
|
8852
|
-
background: "rgba(
|
|
8857
|
+
border: "1.5px solid rgba(102, 65, 98, 0.85)",
|
|
8858
|
+
background: "rgba(102, 65, 98, 0.2)",
|
|
8853
8859
|
pointerEvents: "none"
|
|
8854
8860
|
}
|
|
8855
8861
|
});
|
|
@@ -8893,26 +8899,26 @@ var gp = {
|
|
|
8893
8899
|
nodeFrame: hp
|
|
8894
8900
|
}, _p = { padding: .08 };
|
|
8895
8901
|
function vp(e) {
|
|
8896
|
-
let { nodes: t, edges: n, jsonText: r, breadcrumbs: i, onNavigate: o, onSelectionIds: s, onCopiedMagicString: l, interaction: u = "always" } = e, { fitView: p, getNodes: m, getNodesBounds: h } = ml(), v = bd(), y = d(null), b = d(!1), x = d([]), [S, C] = f(null), [w, D] = f(!1), [O, k] = f(!1), A = d(null), [j, M] = f("mouse"),
|
|
8902
|
+
let { nodes: t, edges: n, jsonText: r, breadcrumbs: i, onNavigate: o, onSelectionIds: s, onCopiedMagicString: l, interaction: u = "always" } = e, { fitView: p, getNodes: m, getNodesBounds: h } = ml(), v = bd(), y = d(null), b = d(!1), x = d([]), [S, C] = f(null), [w, D] = f(!1), [O, k] = f(!1), A = d(null), [j, M] = f("mouse"), N = d(-Infinity), [P, F] = f(!1), [I, L] = f(!1), R = d([]), [ee, z, B] = _d(t), [V, H, U] = vd(n), [W, te] = f(void 0);
|
|
8897
8903
|
c(() => {
|
|
8898
8904
|
if (!v) return;
|
|
8899
8905
|
let e = h(m());
|
|
8900
|
-
|
|
8906
|
+
te([[e.x, e.y], [e.x + e.width, e.y + e.height]]);
|
|
8901
8907
|
}, [
|
|
8902
8908
|
v,
|
|
8903
8909
|
t,
|
|
8904
8910
|
m,
|
|
8905
8911
|
h
|
|
8906
8912
|
]), c(() => {
|
|
8907
|
-
|
|
8913
|
+
z(t), s?.([]), b.current = !1, p(_p);
|
|
8908
8914
|
}, [
|
|
8909
8915
|
t,
|
|
8910
|
-
|
|
8916
|
+
z,
|
|
8911
8917
|
s,
|
|
8912
8918
|
p
|
|
8913
8919
|
]), c(() => {
|
|
8914
|
-
|
|
8915
|
-
}, [n,
|
|
8920
|
+
H(n);
|
|
8921
|
+
}, [n, H]), c(() => {
|
|
8916
8922
|
let e = y.current;
|
|
8917
8923
|
if (!e) return;
|
|
8918
8924
|
let t = new ResizeObserver(() => {
|
|
@@ -8920,19 +8926,19 @@ function vp(e) {
|
|
|
8920
8926
|
});
|
|
8921
8927
|
return t.observe(e), () => t.disconnect();
|
|
8922
8928
|
}, [p]);
|
|
8923
|
-
let
|
|
8929
|
+
let ne = a((e) => {
|
|
8924
8930
|
e && (b.current = !0);
|
|
8925
|
-
}, []),
|
|
8931
|
+
}, []), re = a(({ nodes: e }) => {
|
|
8926
8932
|
let t = e.map((e) => e.id);
|
|
8927
8933
|
x.current = t, s?.(t);
|
|
8928
|
-
}, [s]),
|
|
8934
|
+
}, [s]), ie = a((e) => {
|
|
8929
8935
|
e.preventDefault();
|
|
8930
8936
|
let t = y.current?.getBoundingClientRect();
|
|
8931
8937
|
C({
|
|
8932
8938
|
x: e.clientX - (t?.left ?? 0),
|
|
8933
8939
|
y: e.clientY - (t?.top ?? 0)
|
|
8934
8940
|
});
|
|
8935
|
-
}, []),
|
|
8941
|
+
}, []), ae = a(async () => {
|
|
8936
8942
|
C(null);
|
|
8937
8943
|
try {
|
|
8938
8944
|
let e = JSON.parse(r), t = new Set(x.current.map(Number).filter(Number.isFinite)), n = t.size > 0 ? E(e, t) : e, i = await T(JSON.stringify(n));
|
|
@@ -8940,23 +8946,24 @@ function vp(e) {
|
|
|
8940
8946
|
l();
|
|
8941
8947
|
return;
|
|
8942
8948
|
}
|
|
8943
|
-
|
|
8944
|
-
|
|
8949
|
+
R.current.forEach(clearTimeout), L(!1), F(!0), R.current = [setTimeout(() => L(!0), 2500), setTimeout(() => {
|
|
8950
|
+
F(!1), L(!1);
|
|
8945
8951
|
}, 3e3)];
|
|
8946
8952
|
} catch {}
|
|
8947
8953
|
}, [r, l]);
|
|
8948
|
-
c(() => () =>
|
|
8954
|
+
c(() => () => R.current.forEach(clearTimeout), []), c(() => () => {
|
|
8949
8955
|
A.current && clearTimeout(A.current);
|
|
8950
8956
|
}, []);
|
|
8951
|
-
let G = u === "hybrid",
|
|
8957
|
+
let G = u === "hybrid", oe = u === "always" || G && w, se = oe && j === "mouse", ce = oe && j === "trackpad", le = [1], ue = a((e) => {
|
|
8952
8958
|
if (!e.ctrlKey) {
|
|
8953
|
-
|
|
8959
|
+
e.deltaX !== 0 && (N.current = e.timeStamp);
|
|
8960
|
+
let t = e.timeStamp - N.current < 400 ? "trackpad" : "mouse";
|
|
8954
8961
|
M((e) => e === t ? e : t);
|
|
8955
8962
|
}
|
|
8956
8963
|
G && !w && !e.ctrlKey && (k(!0), A.current && clearTimeout(A.current), A.current = setTimeout(() => k(!1), 1600));
|
|
8957
|
-
}, [G, w]),
|
|
8964
|
+
}, [G, w]), de = a((e) => {
|
|
8958
8965
|
G && e.button === 0 && (D(!0), k(!1));
|
|
8959
|
-
}, [G]),
|
|
8966
|
+
}, [G]), fe = a(() => {
|
|
8960
8967
|
G && D(!1);
|
|
8961
8968
|
}, [G]);
|
|
8962
8969
|
return c(() => {
|
|
@@ -8975,23 +8982,23 @@ function vp(e) {
|
|
|
8975
8982
|
height: "100%",
|
|
8976
8983
|
position: "relative"
|
|
8977
8984
|
},
|
|
8978
|
-
onContextMenu:
|
|
8979
|
-
onPointerDown:
|
|
8980
|
-
onPointerLeave:
|
|
8981
|
-
onWheel:
|
|
8985
|
+
onContextMenu: ie,
|
|
8986
|
+
onPointerDown: de,
|
|
8987
|
+
onPointerLeave: fe,
|
|
8988
|
+
onWheel: ue,
|
|
8982
8989
|
children: [
|
|
8983
8990
|
/* @__PURE__ */ _(gd, {
|
|
8984
|
-
nodes:
|
|
8985
|
-
edges:
|
|
8986
|
-
onNodesChange:
|
|
8987
|
-
onEdgesChange:
|
|
8988
|
-
onSelectionChange:
|
|
8989
|
-
onMoveStart:
|
|
8991
|
+
nodes: ee,
|
|
8992
|
+
edges: V,
|
|
8993
|
+
onNodesChange: B,
|
|
8994
|
+
onEdgesChange: U,
|
|
8995
|
+
onSelectionChange: re,
|
|
8996
|
+
onMoveStart: ne,
|
|
8990
8997
|
nodeTypes: gp,
|
|
8991
8998
|
fitView: !0,
|
|
8992
8999
|
fitViewOptions: _p,
|
|
8993
9000
|
minZoom: .2,
|
|
8994
|
-
translateExtent:
|
|
9001
|
+
translateExtent: W,
|
|
8995
9002
|
nodesDraggable: !1,
|
|
8996
9003
|
nodesConnectable: !1,
|
|
8997
9004
|
elementsSelectable: !0,
|
|
@@ -9001,10 +9008,10 @@ function vp(e) {
|
|
|
9001
9008
|
selectionOnDrag: !0,
|
|
9002
9009
|
selectionMode: Ca.Partial,
|
|
9003
9010
|
connectOnClick: !1,
|
|
9004
|
-
panOnDrag:
|
|
9005
|
-
zoomOnScroll:
|
|
9006
|
-
panOnScroll:
|
|
9007
|
-
preventScrolling:
|
|
9011
|
+
panOnDrag: le,
|
|
9012
|
+
zoomOnScroll: se,
|
|
9013
|
+
panOnScroll: ce,
|
|
9014
|
+
preventScrolling: oe,
|
|
9008
9015
|
zoomOnDoubleClick: !1,
|
|
9009
9016
|
children: [
|
|
9010
9017
|
/* @__PURE__ */ g(Dd, {
|
|
@@ -9027,7 +9034,7 @@ function vp(e) {
|
|
|
9027
9034
|
className: "gn-top-left",
|
|
9028
9035
|
children: [/* @__PURE__ */ _("span", {
|
|
9029
9036
|
className: "gn-version-badge",
|
|
9030
|
-
children: ["node-web-render v", "0.3.
|
|
9037
|
+
children: ["node-web-render v", "0.3.22"]
|
|
9031
9038
|
}), i.length > 1 ? /* @__PURE__ */ g("nav", {
|
|
9032
9039
|
className: "gn-breadcrumbs",
|
|
9033
9040
|
"aria-label": "Node group path",
|
|
@@ -9068,12 +9075,12 @@ function vp(e) {
|
|
|
9068
9075
|
type: "button",
|
|
9069
9076
|
className: "gn-context-menu__item",
|
|
9070
9077
|
role: "menuitem",
|
|
9071
|
-
onClick:
|
|
9078
|
+
onClick: ae,
|
|
9072
9079
|
children: "Copy selected nodes to Tree Clipper magic string"
|
|
9073
9080
|
})
|
|
9074
9081
|
}) : null,
|
|
9075
|
-
|
|
9076
|
-
className: `gn-context-toast${
|
|
9082
|
+
P || I ? /* @__PURE__ */ g("div", {
|
|
9083
|
+
className: `gn-context-toast${I ? " gnwr-leaving" : ""}`,
|
|
9077
9084
|
role: "status",
|
|
9078
9085
|
children: "Copied Tree Clipper magic string"
|
|
9079
9086
|
}) : null
|
package/package.json
CHANGED