@mcurros2/microm 1.1.99-0 → 1.1.101-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/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +48 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3490,6 +3490,8 @@ var $jNUqj = parcelRequire("jNUqj");
|
|
|
3490
3490
|
var $8tnwL = parcelRequire("8tnwL");
|
|
3491
3491
|
|
|
3492
3492
|
var $8SZSR = parcelRequire("8SZSR");
|
|
3493
|
+
|
|
3494
|
+
var $lwxCY = parcelRequire("lwxCY");
|
|
3493
3495
|
$parcel$exportWildcard(module.exports, $d50o9);
|
|
3494
3496
|
$parcel$exportWildcard(module.exports, $i6yJ4);
|
|
3495
3497
|
$parcel$exportWildcard(module.exports, $gLcPf);
|
|
@@ -3558,6 +3560,7 @@ $parcel$exportWildcard(module.exports, $cSyOF);
|
|
|
3558
3560
|
$parcel$exportWildcard(module.exports, $jNUqj);
|
|
3559
3561
|
$parcel$exportWildcard(module.exports, $8tnwL);
|
|
3560
3562
|
$parcel$exportWildcard(module.exports, $8SZSR);
|
|
3563
|
+
$parcel$exportWildcard(module.exports, $lwxCY);
|
|
3561
3564
|
|
|
3562
3565
|
});
|
|
3563
3566
|
parcelRegister("d50o9", function(module, exports) {
|
|
@@ -47869,6 +47872,51 @@ const $0dfe00414db620c5$export$523d4cd6cd71a35c = (validationFunction)=>{
|
|
|
47869
47872
|
|
|
47870
47873
|
|
|
47871
47874
|
|
|
47875
|
+
parcelRegister("lwxCY", function(module, exports) {
|
|
47876
|
+
|
|
47877
|
+
$parcel$export(module.exports, "useAncestorResize", function () { return $fab6abe4da65ff17$export$d994cf386c6f1d98; });
|
|
47878
|
+
|
|
47879
|
+
function $fab6abe4da65ff17$export$d994cf386c6f1d98(minSize = {
|
|
47880
|
+
width: 300,
|
|
47881
|
+
height: 400
|
|
47882
|
+
}) {
|
|
47883
|
+
const ref = (0, $b4te3$react.useRef)(null);
|
|
47884
|
+
const [size, setSize] = (0, $b4te3$react.useState)(minSize);
|
|
47885
|
+
(0, $b4te3$react.useEffect)(()=>{
|
|
47886
|
+
var _a;
|
|
47887
|
+
if (!ref.current) return;
|
|
47888
|
+
// Buscamos el ancestro más relevante (por ejemplo, el contenedor scrollable o modal)
|
|
47889
|
+
const findTargetAncestor = (el)=>{
|
|
47890
|
+
while(el){
|
|
47891
|
+
const overflowY = getComputedStyle(el).overflowY;
|
|
47892
|
+
if (overflowY === "auto" || overflowY === "scroll") return el;
|
|
47893
|
+
el = el.parentElement;
|
|
47894
|
+
}
|
|
47895
|
+
return null;
|
|
47896
|
+
};
|
|
47897
|
+
const ancestor = (_a = findTargetAncestor(ref.current.parentElement)) !== null && _a !== void 0 ? _a : ref.current.parentElement;
|
|
47898
|
+
if (!ancestor) return;
|
|
47899
|
+
const observer = new ResizeObserver(([entry])=>{
|
|
47900
|
+
const { width: width, height: height } = entry.contentRect;
|
|
47901
|
+
setSize({
|
|
47902
|
+
width: Math.max(minSize.width, width),
|
|
47903
|
+
height: Math.max(minSize.height, height)
|
|
47904
|
+
});
|
|
47905
|
+
});
|
|
47906
|
+
observer.observe(ancestor);
|
|
47907
|
+
return ()=>observer.disconnect();
|
|
47908
|
+
}, [
|
|
47909
|
+
minSize.width,
|
|
47910
|
+
minSize.height
|
|
47911
|
+
]);
|
|
47912
|
+
return {
|
|
47913
|
+
ref: ref,
|
|
47914
|
+
size: size
|
|
47915
|
+
};
|
|
47916
|
+
}
|
|
47917
|
+
|
|
47918
|
+
});
|
|
47919
|
+
|
|
47872
47920
|
|
|
47873
47921
|
|
|
47874
47922
|
parcelRegister("8xtCs", function(module, exports) {
|