Your Name 1912bcd25b
Some checks failed
Lint / build (20) (push) Has been cancelled
Playwright Tests / test (push) Has been cancelled
chore: sync all remaining local workspace changes
2026-05-08 11:26:57 +08:00

121 lines
2.8 KiB
JavaScript

/*
* Extracted from browser-delivered Turbopack chunk: cde068e14ffee6a8.f8b5a2ab76.js
* Module id: 485615
* For reading/searching only; this factory depends on the original Turbopack runtime.
*/
const moduleFactory = (e) => {
"use strict";
var t = e.i(462214),
i = e.i(768924),
n = e.i(41114);
let r = (e) => e.transform[2];
function a({
children: e,
className: i,
style: r,
panelScale: a,
opacity: o,
isNodeDragging: u,
hideWhenDragging: l,
noPan: s = !0,
noWheel: d = !0,
noDrag: c = !0,
}) {
return void 0 !== o && o <= 0
? null
: (0, t.jsx)("div", {
className: (0, n.cn)(
"node-floating-ui",
c && "nodrag",
d && "nowheel",
s && "nopan",
"origin-top transition-[transform,opacity] duration-150 ease-out",
i,
),
style: {
...r,
transform: `scale(${a})`,
opacity: o ?? r?.opacity,
visibility: l && u ? "hidden" : r?.visibility,
},
children: e,
});
}
function o({
children: e,
className: n,
style: r,
panelScale: o,
opacity: u,
nodeId: l,
noPan: s = !0,
noWheel: d = !0,
noDrag: c = !0,
}) {
let m = (0, i.useStore)((e) => e.nodeLookup.get(l)?.dragging === !0);
return (0, t.jsx)(a, {
className: n,
style: r,
panelScale: o,
opacity: u,
isNodeDragging: m,
hideWhenDragging: !0,
noPan: s,
noWheel: d,
noDrag: c,
children: e,
});
}
function u({
children: e,
className: n,
style: u,
zoom: l,
hideWhenDragging: s = !1,
nodeId: d,
noPan: c = !0,
noWheel: m = !0,
noDrag: f = !0,
maxScale: p,
fadeZoomRange: g,
}) {
let v,
h = (0, i.useStore)(r),
$ = l ?? h,
y = 1 / $,
_ = p ? Math.min(y, p) : y;
if (g) {
let [e, t] = g;
v = $ <= e ? 0 : $ >= t ? void 0 : ($ - e) / (t - e);
}
return s && d
? (0, t.jsx)(o, {
className: n,
style: u,
panelScale: _,
opacity: v,
nodeId: d,
noPan: c,
noWheel: m,
noDrag: f,
children: e,
})
: (0, t.jsx)(a, {
className: n,
style: u,
panelScale: _,
opacity: v,
isNodeDragging: !1,
hideWhenDragging: !1,
noPan: c,
noWheel: m,
noDrag: f,
children: e,
});
}
e.s(["default", () => u]);
};
export default moduleFactory;