@almadar/ui 4.39.1 → 4.41.0
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/avl/index.cjs +20 -3
- package/dist/avl/index.js +20 -3
- package/package.json +1 -1
package/dist/avl/index.cjs
CHANGED
|
@@ -52828,8 +52828,24 @@ var AvlOrbitalsCosmicZoom = ({
|
|
|
52828
52828
|
() => parseApplicationLevel(parsedSchema),
|
|
52829
52829
|
[parsedSchema]
|
|
52830
52830
|
);
|
|
52831
|
-
const
|
|
52832
|
-
const
|
|
52831
|
+
const outerRef = React119.useRef(null);
|
|
52832
|
+
const [measured, setMeasured] = React119.useState(null);
|
|
52833
|
+
React119.useLayoutEffect(() => {
|
|
52834
|
+
const el = outerRef.current;
|
|
52835
|
+
if (!el) return;
|
|
52836
|
+
const update = () => {
|
|
52837
|
+
const r2 = el.getBoundingClientRect();
|
|
52838
|
+
if (r2.width > 0 && r2.height > 0) setMeasured({ w: r2.width, h: r2.height });
|
|
52839
|
+
};
|
|
52840
|
+
update();
|
|
52841
|
+
const ro = new ResizeObserver(update);
|
|
52842
|
+
ro.observe(el);
|
|
52843
|
+
return () => ro.disconnect();
|
|
52844
|
+
}, []);
|
|
52845
|
+
const fallbackW = typeof width === "number" ? width : 800;
|
|
52846
|
+
const fallbackH = typeof height === "number" ? height : 450;
|
|
52847
|
+
const containerW = measured?.w ?? fallbackW;
|
|
52848
|
+
const containerH = measured?.h ?? fallbackH;
|
|
52833
52849
|
const positions = React119.useMemo(
|
|
52834
52850
|
() => layoutOrbitals(orbitals.length, containerW, containerH),
|
|
52835
52851
|
[orbitals.length, containerW, containerH]
|
|
@@ -52985,10 +53001,11 @@ var AvlOrbitalsCosmicZoom = ({
|
|
|
52985
53001
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
52986
53002
|
Box,
|
|
52987
53003
|
{
|
|
53004
|
+
ref: outerRef,
|
|
52988
53005
|
className,
|
|
52989
53006
|
position: "relative",
|
|
52990
53007
|
overflow: "visible",
|
|
52991
|
-
style: { width, height
|
|
53008
|
+
style: { width, height },
|
|
52992
53009
|
children: [
|
|
52993
53010
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
52994
53011
|
Box,
|
package/dist/avl/index.js
CHANGED
|
@@ -52782,8 +52782,24 @@ var AvlOrbitalsCosmicZoom = ({
|
|
|
52782
52782
|
() => parseApplicationLevel(parsedSchema),
|
|
52783
52783
|
[parsedSchema]
|
|
52784
52784
|
);
|
|
52785
|
-
const
|
|
52786
|
-
const
|
|
52785
|
+
const outerRef = useRef(null);
|
|
52786
|
+
const [measured, setMeasured] = useState(null);
|
|
52787
|
+
useLayoutEffect(() => {
|
|
52788
|
+
const el = outerRef.current;
|
|
52789
|
+
if (!el) return;
|
|
52790
|
+
const update = () => {
|
|
52791
|
+
const r2 = el.getBoundingClientRect();
|
|
52792
|
+
if (r2.width > 0 && r2.height > 0) setMeasured({ w: r2.width, h: r2.height });
|
|
52793
|
+
};
|
|
52794
|
+
update();
|
|
52795
|
+
const ro = new ResizeObserver(update);
|
|
52796
|
+
ro.observe(el);
|
|
52797
|
+
return () => ro.disconnect();
|
|
52798
|
+
}, []);
|
|
52799
|
+
const fallbackW = typeof width === "number" ? width : 800;
|
|
52800
|
+
const fallbackH = typeof height === "number" ? height : 450;
|
|
52801
|
+
const containerW = measured?.w ?? fallbackW;
|
|
52802
|
+
const containerH = measured?.h ?? fallbackH;
|
|
52787
52803
|
const positions = useMemo(
|
|
52788
52804
|
() => layoutOrbitals(orbitals.length, containerW, containerH),
|
|
52789
52805
|
[orbitals.length, containerW, containerH]
|
|
@@ -52939,10 +52955,11 @@ var AvlOrbitalsCosmicZoom = ({
|
|
|
52939
52955
|
return /* @__PURE__ */ jsxs(
|
|
52940
52956
|
Box,
|
|
52941
52957
|
{
|
|
52958
|
+
ref: outerRef,
|
|
52942
52959
|
className,
|
|
52943
52960
|
position: "relative",
|
|
52944
52961
|
overflow: "visible",
|
|
52945
|
-
style: { width, height
|
|
52962
|
+
style: { width, height },
|
|
52946
52963
|
children: [
|
|
52947
52964
|
/* @__PURE__ */ jsx(
|
|
52948
52965
|
Box,
|