loon-bulma-react 2026.0.41 → 2026.0.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.
- package/dist/index.js +27 -9
- package/dist/styles/_all.scss +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10952,21 +10952,39 @@ function Th(e) {
|
|
|
10952
10952
|
show: o
|
|
10953
10953
|
};
|
|
10954
10954
|
}
|
|
10955
|
-
function Eh({ outerRef: e, children:
|
|
10956
|
-
let { x:
|
|
10957
|
-
|
|
10958
|
-
|
|
10955
|
+
function Eh({ outerRef: e, children: n }) {
|
|
10956
|
+
let { x: r, y: i, show: a } = Th(e), o = t.useRef(null), [s, c] = t.useState({
|
|
10957
|
+
left: 0,
|
|
10958
|
+
top: 0
|
|
10959
|
+
});
|
|
10960
|
+
if (t.useLayoutEffect(() => {
|
|
10961
|
+
if (!a || !o.current) return;
|
|
10962
|
+
let e = Number.parseFloat(r), t = Number.parseFloat(i), n = Number.isFinite(e) ? e : 0, s = Number.isFinite(t) ? t : 0, l = o.current.offsetWidth, u = o.current.offsetHeight, d = Math.max(8, window.innerWidth - l - 8), f = Math.max(8, window.innerHeight - u - 8), p = Math.min(Math.max(n, 8), d), m = Math.min(Math.max(s, 8), f);
|
|
10963
|
+
c((e) => e.left === p && e.top === m ? e : {
|
|
10964
|
+
left: p,
|
|
10965
|
+
top: m
|
|
10966
|
+
});
|
|
10967
|
+
}, [
|
|
10968
|
+
a,
|
|
10969
|
+
r,
|
|
10970
|
+
i
|
|
10971
|
+
]), e === null) return /* @__PURE__ */ b(y, {});
|
|
10972
|
+
let l = a ? /* @__PURE__ */ b("div", {
|
|
10973
|
+
ref: o,
|
|
10959
10974
|
className: "context-menu",
|
|
10960
10975
|
"data-lbr-context-menu": "true",
|
|
10961
10976
|
style: {
|
|
10962
10977
|
position: "fixed",
|
|
10963
|
-
top:
|
|
10964
|
-
left:
|
|
10965
|
-
zIndex: 9999
|
|
10978
|
+
top: `${s.top}px`,
|
|
10979
|
+
left: `${s.left}px`,
|
|
10980
|
+
zIndex: 9999,
|
|
10981
|
+
maxWidth: "calc(100vw - 16px)",
|
|
10982
|
+
maxHeight: "calc(100vh - 16px)",
|
|
10983
|
+
overflow: "auto"
|
|
10966
10984
|
},
|
|
10967
|
-
children: typeof
|
|
10985
|
+
children: typeof n == "function" ? n() : n
|
|
10968
10986
|
}) : null;
|
|
10969
|
-
return
|
|
10987
|
+
return l ? C(l, document.body) : /* @__PURE__ */ b(y, {});
|
|
10970
10988
|
}
|
|
10971
10989
|
//#endregion
|
|
10972
10990
|
//#region lib/hooks/useDebounced.hooks.ts
|
package/dist/styles/_all.scss
CHANGED