react-resize-aware
Advanced tools
Comparing version 3.1.2 to 3.1.3
@@ -1,2 +0,2 @@ | ||
import{useEffect as e,useRef as n,useState as t,useCallback as r,useMemo as o}from"react";var i={display:"block",opacity:0,position:"absolute",top:0,left:0,height:"100%",width:"100%",overflow:"hidden",pointerEvents:"none",zIndex:-1},u=function(t){var r=t.onResize,o=n();return function(n,t){var r=function(){return n.current&&n.current.contentDocument&&n.current.contentDocument.defaultView};function o(){t();var e=r();e&&e.addEventListener("resize",t)}e((function(){return r()?o():n.current&&n.current.addEventListener&&n.current.addEventListener("load",o),function(){var e=r();e&&"function"==typeof e.removeEventListener&&e.removeEventListener("resize",t)}}),[])}(o,(function(){return r(o)})),jsx("iframe",{style:i,src:"about:blank",ref:o,"aria-hidden":!0,tabIndex:-1,frameBorder:0})},c=function(e){return{width:null!=e?e.offsetWidth:null,height:null!=e?e.offsetHeight:null}};export default function(e){void 0===e&&(e=c);var n=t(e(null)),i=n[0],f=n[1],a=r((function(n){return f(e(n.current))}),[e]);return[o((function(){return jsx(u,{onResize:a})}),[a]),i]} | ||
import{useEffect as e,useRef as n,useState as t,useCallback as r,useMemo as i}from"react";var o={display:"block",opacity:0,position:"absolute",top:0,left:0,height:"100%",width:"100%",overflow:"hidden",pointerEvents:"none",zIndex:-1,maxHeight:"inherit",maxWidth:"inherit"},u=function(t){var r=t.onResize,i=n();return function(n,t){var r=function(){return n.current&&n.current.contentDocument&&n.current.contentDocument.defaultView};function i(){t();var e=r();e&&e.addEventListener("resize",t)}e((function(){return r()?i():n.current&&n.current.addEventListener&&n.current.addEventListener("load",i),function(){var e=r();e&&"function"==typeof e.removeEventListener&&e.removeEventListener("resize",t)}}),[])}(i,(function(){return r(i)})),jsx("iframe",{style:o,src:"about:blank",ref:i,"aria-hidden":!0,tabIndex:-1,frameBorder:0})},c=function(e){return{width:null!=e?e.offsetWidth:null,height:null!=e?e.offsetHeight:null}};export default function(e){void 0===e&&(e=c);var n=t(e(null)),o=n[0],a=n[1],f=r((function(n){return a(e(n.current))}),[e]);return[i((function(){return jsx(u,{onResize:f})}),[f]),o]} | ||
//# sourceMappingURL=index.esm.js.map |
@@ -1,2 +0,2 @@ | ||
var e=require("react"),n={display:"block",opacity:0,position:"absolute",top:0,left:0,height:"100%",width:"100%",overflow:"hidden",pointerEvents:"none",zIndex:-1},t=function(t){var r=t.onResize,u=e.useRef();return function(n,t){var r=function(){return n.current&&n.current.contentDocument&&n.current.contentDocument.defaultView};function u(){t();var e=r();e&&e.addEventListener("resize",t)}e.useEffect((function(){return r()?u():n.current&&n.current.addEventListener&&n.current.addEventListener("load",u),function(){var e=r();e&&"function"==typeof e.removeEventListener&&e.removeEventListener("resize",t)}}),[])}(u,(function(){return r(u)})),jsx("iframe",{style:n,src:"about:blank",ref:u,"aria-hidden":!0,tabIndex:-1,frameBorder:0})},r=function(e){return{width:null!=e?e.offsetWidth:null,height:null!=e?e.offsetHeight:null}};module.exports=function(n){void 0===n&&(n=r);var u=e.useState(n(null)),o=u[0],i=u[1],c=e.useCallback((function(e){return i(n(e.current))}),[n]);return[e.useMemo((function(){return jsx(t,{onResize:c})}),[c]),o]}; | ||
var e=require("react"),n={display:"block",opacity:0,position:"absolute",top:0,left:0,height:"100%",width:"100%",overflow:"hidden",pointerEvents:"none",zIndex:-1,maxHeight:"inherit",maxWidth:"inherit"},t=function(t){var r=t.onResize,i=e.useRef();return function(n,t){var r=function(){return n.current&&n.current.contentDocument&&n.current.contentDocument.defaultView};function i(){t();var e=r();e&&e.addEventListener("resize",t)}e.useEffect((function(){return r()?i():n.current&&n.current.addEventListener&&n.current.addEventListener("load",i),function(){var e=r();e&&"function"==typeof e.removeEventListener&&e.removeEventListener("resize",t)}}),[])}(i,(function(){return r(i)})),jsx("iframe",{style:n,src:"about:blank",ref:i,"aria-hidden":!0,tabIndex:-1,frameBorder:0})},r=function(e){return{width:null!=e?e.offsetWidth:null,height:null!=e?e.offsetHeight:null}};module.exports=function(n){void 0===n&&(n=r);var i=e.useState(n(null)),u=i[0],o=i[1],c=e.useCallback((function(e){return o(n(e.current))}),[n]);return[e.useMemo((function(){return jsx(t,{onResize:c})}),[c]),u]}; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
import{useEffect as e,useRef as n,useState as t,useCallback as r,useMemo as o}from"react";var i={display:"block",opacity:0,position:"absolute",top:0,left:0,height:"100%",width:"100%",overflow:"hidden",pointerEvents:"none",zIndex:-1},u=function(t){var r=t.onResize,o=n();return function(n,t){var r=function(){return n.current&&n.current.contentDocument&&n.current.contentDocument.defaultView};function o(){t();var e=r();e&&e.addEventListener("resize",t)}e((function(){return r()?o():n.current&&n.current.addEventListener&&n.current.addEventListener("load",o),function(){var e=r();e&&"function"==typeof e.removeEventListener&&e.removeEventListener("resize",t)}}),[])}(o,(function(){return r(o)})),jsx("iframe",{style:i,src:"about:blank",ref:o,"aria-hidden":!0,tabIndex:-1,frameBorder:0})},c=function(e){return{width:null!=e?e.offsetWidth:null,height:null!=e?e.offsetHeight:null}};export default function(e){void 0===e&&(e=c);var n=t(e(null)),i=n[0],f=n[1],a=r((function(n){return f(e(n.current))}),[e]);return[o((function(){return jsx(u,{onResize:a})}),[a]),i]} | ||
import{useEffect as e,useRef as n,useState as t,useCallback as r,useMemo as i}from"react";var o={display:"block",opacity:0,position:"absolute",top:0,left:0,height:"100%",width:"100%",overflow:"hidden",pointerEvents:"none",zIndex:-1,maxHeight:"inherit",maxWidth:"inherit"},u=function(t){var r=t.onResize,i=n();return function(n,t){var r=function(){return n.current&&n.current.contentDocument&&n.current.contentDocument.defaultView};function i(){t();var e=r();e&&e.addEventListener("resize",t)}e((function(){return r()?i():n.current&&n.current.addEventListener&&n.current.addEventListener("load",i),function(){var e=r();e&&"function"==typeof e.removeEventListener&&e.removeEventListener("resize",t)}}),[])}(i,(function(){return r(i)})),jsx("iframe",{style:o,src:"about:blank",ref:i,"aria-hidden":!0,tabIndex:-1,frameBorder:0})},c=function(e){return{width:null!=e?e.offsetWidth:null,height:null!=e?e.offsetHeight:null}};export default function(e){void 0===e&&(e=c);var n=t(e(null)),o=n[0],a=n[1],f=r((function(n){return a(e(n.current))}),[e]);return[i((function(){return jsx(u,{onResize:f})}),[f]),o]} | ||
//# sourceMappingURL=index.modern.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(require("react")):"function"==typeof define&&define.amd?define(["react"],n):(e=e||self).useResizeAware=n(e.react)}(this,(function(e){var n={display:"block",opacity:0,position:"absolute",top:0,left:0,height:"100%",width:"100%",overflow:"hidden",pointerEvents:"none",zIndex:-1},t=function(t){var r=t.onResize,u=e.useRef();return function(n,t){var r=function(){return n.current&&n.current.contentDocument&&n.current.contentDocument.defaultView};function u(){t();var e=r();e&&e.addEventListener("resize",t)}e.useEffect((function(){return r()?u():n.current&&n.current.addEventListener&&n.current.addEventListener("load",u),function(){var e=r();e&&"function"==typeof e.removeEventListener&&e.removeEventListener("resize",t)}}),[])}(u,(function(){return r(u)})),jsx("iframe",{style:n,src:"about:blank",ref:u,"aria-hidden":!0,tabIndex:-1,frameBorder:0})},r=function(e){return{width:null!=e?e.offsetWidth:null,height:null!=e?e.offsetHeight:null}};return function(n){void 0===n&&(n=r);var u=e.useState(n(null)),o=u[0],i=u[1],f=e.useCallback((function(e){return i(n(e.current))}),[n]);return[e.useMemo((function(){return jsx(t,{onResize:f})}),[f]),o]}})); | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(require("react")):"function"==typeof define&&define.amd?define(["react"],n):(e=e||self).useResizeAware=n(e.react)}(this,(function(e){var n={display:"block",opacity:0,position:"absolute",top:0,left:0,height:"100%",width:"100%",overflow:"hidden",pointerEvents:"none",zIndex:-1,maxHeight:"inherit",maxWidth:"inherit"},t=function(t){var r=t.onResize,i=e.useRef();return function(n,t){var r=function(){return n.current&&n.current.contentDocument&&n.current.contentDocument.defaultView};function i(){t();var e=r();e&&e.addEventListener("resize",t)}e.useEffect((function(){return r()?i():n.current&&n.current.addEventListener&&n.current.addEventListener("load",i),function(){var e=r();e&&"function"==typeof e.removeEventListener&&e.removeEventListener("resize",t)}}),[])}(i,(function(){return r(i)})),jsx("iframe",{style:n,src:"about:blank",ref:i,"aria-hidden":!0,tabIndex:-1,frameBorder:0})},r=function(e){return{width:null!=e?e.offsetWidth:null,height:null!=e?e.offsetHeight:null}};return function(n){void 0===n&&(n=r);var i=e.useState(n(null)),u=i[0],o=i[1],f=e.useCallback((function(e){return o(n(e.current))}),[n]);return[e.useMemo((function(){return jsx(t,{onResize:f})}),[f]),u]}})); | ||
//# sourceMappingURL=index.umd.js.map |
{ | ||
"name": "react-resize-aware", | ||
"version": "3.1.2", | ||
"version": "3.1.3", | ||
"description": "A React hook that makes it possible to listen to element resize events.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/FezVrasta/react-resize-aware#readme", |
@@ -16,2 +16,4 @@ // @flow | ||
zIndex: -1, | ||
maxHeight: 'inherit', | ||
maxWidth: 'inherit', | ||
}; | ||
@@ -18,0 +20,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
33141
123