Comparing version 1.5.0 to 1.5.1
@@ -1,2 +0,2 @@ | ||
import{useState as n,useEffect as e}from"react";function t(){return(t=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n}).apply(this,arguments)}var i=["children","in","timeout","shouldUnmount"];function r(r){var o=r.children,u=r.in,c=r.timeout,a=r.shouldUnmount,d=function(n,e){if(null==n)return{};var t,i,r={},o=Object.keys(n);for(i=0;i<o.length;i++)e.indexOf(t=o[i])>=0||(r[t]=n[t]);return r}(r,i),f=n({active:u,ready:u,entering:!1,entered:u,exiting:!1,exited:!1}),g=f[0],l=f[1];return e(function(){u&&!g.active?(l(function(n){return t({},n,{active:!0,entered:!1,exited:!1})}),setTimeout(function(){l(function(n){return t({},n,{ready:!0,entering:!0})}),d.onEntering&&d.onEntering(),setTimeout(function(){l(function(n){return t({},n,{entering:!1,entered:!0})}),d.onEntered&&d.onEntered()},c)},50)):!u&&g.active&&(l(function(n){return t({},n,{exiting:!0,ready:!1,entered:!1})}),d.onExiting&&d.onExiting(),setTimeout(function(){l(function(n){return t({},n,{active:!1,exiting:!1,exited:!0})}),d.onExited&&d.onExited()},c))},[u]),!g.active&&a?null:o(g)}export{r as Mounty}; | ||
import{useState as n,useEffect as e}from"react";function t(){return(t=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n}).apply(this,arguments)}var i=["children","in","timeout","shouldUnmount"];function r(r){var o=r.children,u=r.in,c=r.timeout,a=r.shouldUnmount,f=function(n,e){if(null==n)return{};var t,i,r={},o=Object.keys(n);for(i=0;i<o.length;i++)e.indexOf(t=o[i])>=0||(r[t]=n[t]);return r}(r,i),d=n({active:u,ready:u,entering:!1,entered:u,exiting:!1,exited:!1}),g=d[0],l=d[1];return e(function(){u&&!g.active?(l(function(n){return t({},n,{active:!0,entered:!1,exited:!1})}),requestAnimationFrame(function(){requestAnimationFrame(function(){l(function(n){return t({},n,{ready:!0,entering:!0})}),f.onEntering&&f.onEntering(),setTimeout(function(){l(function(n){return t({},n,{entering:!1,entered:!0})}),f.onEntered&&f.onEntered()},c)})})):!u&&g.active&&(l(function(n){return t({},n,{exiting:!0,ready:!1,entered:!1})}),f.onExiting&&f.onExiting(),setTimeout(function(){l(function(n){return t({},n,{active:!1,exiting:!1,exited:!0})}),f.onExited&&f.onExited()},c))},[u]),!g.active&&a?null:o(g)}export{r as Mounty}; | ||
//# sourceMappingURL=mounty.es.js.map |
@@ -1,2 +0,2 @@ | ||
var n=require("react");function e(){return(e=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n}).apply(this,arguments)}var t=["children","in","timeout","shouldUnmount"];exports.Mounty=function(i){var r=i.children,o=i.in,u=i.timeout,c=i.shouldUnmount,a=function(n,e){if(null==n)return{};var t,i,r={},o=Object.keys(n);for(i=0;i<o.length;i++)e.indexOf(t=o[i])>=0||(r[t]=n[t]);return r}(i,t),f=n.useState({active:o,ready:o,entering:!1,entered:o,exiting:!1,exited:!1}),d=f[0],g=f[1];return n.useEffect(function(){o&&!d.active?(g(function(n){return e({},n,{active:!0,entered:!1,exited:!1})}),setTimeout(function(){g(function(n){return e({},n,{ready:!0,entering:!0})}),a.onEntering&&a.onEntering(),setTimeout(function(){g(function(n){return e({},n,{entering:!1,entered:!0})}),a.onEntered&&a.onEntered()},u)},50)):!o&&d.active&&(g(function(n){return e({},n,{exiting:!0,ready:!1,entered:!1})}),a.onExiting&&a.onExiting(),setTimeout(function(){g(function(n){return e({},n,{active:!1,exiting:!1,exited:!0})}),a.onExited&&a.onExited()},u))},[o]),!d.active&&c?null:r(d)}; | ||
var n=require("react");function e(){return(e=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n}).apply(this,arguments)}var t=["children","in","timeout","shouldUnmount"];exports.Mounty=function(i){var r=i.children,o=i.in,u=i.timeout,c=i.shouldUnmount,a=function(n,e){if(null==n)return{};var t,i,r={},o=Object.keys(n);for(i=0;i<o.length;i++)e.indexOf(t=o[i])>=0||(r[t]=n[t]);return r}(i,t),f=n.useState({active:o,ready:o,entering:!1,entered:o,exiting:!1,exited:!1}),d=f[0],s=f[1];return n.useEffect(function(){o&&!d.active?(s(function(n){return e({},n,{active:!0,entered:!1,exited:!1})}),requestAnimationFrame(function(){requestAnimationFrame(function(){s(function(n){return e({},n,{ready:!0,entering:!0})}),a.onEntering&&a.onEntering(),setTimeout(function(){s(function(n){return e({},n,{entering:!1,entered:!0})}),a.onEntered&&a.onEntered()},u)})})):!o&&d.active&&(s(function(n){return e({},n,{exiting:!0,ready:!1,entered:!1})}),a.onExiting&&a.onExiting(),setTimeout(function(){s(function(n){return e({},n,{active:!1,exiting:!1,exited:!0})}),a.onExited&&a.onExited()},u))},[o]),!d.active&&c?null:r(d)}; | ||
//# sourceMappingURL=mounty.js.map |
@@ -1,2 +0,2 @@ | ||
import{useState as e,useEffect as t}from"react";function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}const i=["children","in","timeout","shouldUnmount"];function r(r){let{children:o,in:u,timeout:c,shouldUnmount:d}=r,a=function(e,t){if(null==e)return{};var n,i,r={},o=Object.keys(e);for(i=0;i<o.length;i++)t.indexOf(n=o[i])>=0||(r[n]=e[n]);return r}(r,i);const[l,g]=e({active:u,ready:u,entering:!1,entered:u,exiting:!1,exited:!1});return t(()=>{u&&!l.active?(g(e=>n({},e,{active:!0,entered:!1,exited:!1})),setTimeout(()=>{g(e=>n({},e,{ready:!0,entering:!0})),a.onEntering&&a.onEntering(),setTimeout(()=>{g(e=>n({},e,{entering:!1,entered:!0})),a.onEntered&&a.onEntered()},c)},50)):!u&&l.active&&(g(e=>n({},e,{exiting:!0,ready:!1,entered:!1})),a.onExiting&&a.onExiting(),setTimeout(()=>{g(e=>n({},e,{active:!1,exiting:!1,exited:!0})),a.onExited&&a.onExited()},c))},[u]),!l.active&&d?null:o(l)}export{r as Mounty}; | ||
import{useState as e,useEffect as t}from"react";function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}const i=["children","in","timeout","shouldUnmount"];function r(r){let{children:o,in:a,timeout:u,shouldUnmount:c}=r,d=function(e,t){if(null==e)return{};var n,i,r={},o=Object.keys(e);for(i=0;i<o.length;i++)t.indexOf(n=o[i])>=0||(r[n]=e[n]);return r}(r,i);const[l,g]=e({active:a,ready:a,entering:!1,entered:a,exiting:!1,exited:!1});return t(()=>{a&&!l.active?(g(e=>n({},e,{active:!0,entered:!1,exited:!1})),requestAnimationFrame(()=>{requestAnimationFrame(()=>{g(e=>n({},e,{ready:!0,entering:!0})),d.onEntering&&d.onEntering(),setTimeout(()=>{g(e=>n({},e,{entering:!1,entered:!0})),d.onEntered&&d.onEntered()},u)})})):!a&&l.active&&(g(e=>n({},e,{exiting:!0,ready:!1,entered:!1})),d.onExiting&&d.onExiting(),setTimeout(()=>{g(e=>n({},e,{active:!1,exiting:!1,exited:!0})),d.onExited&&d.onExited()},u))},[a]),!l.active&&c?null:o(l)}export{r as Mounty}; | ||
//# sourceMappingURL=mounty.modern.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],n):n((e=e||self).mounty={},e.react)}(this,function(e,n){function t(){return(t=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e}).apply(this,arguments)}var i=["children","in","timeout","shouldUnmount"];e.Mounty=function(e){var r=e.children,o=e.in,u=e.timeout,c=e.shouldUnmount,f=function(e,n){if(null==e)return{};var t,i,r={},o=Object.keys(e);for(i=0;i<o.length;i++)n.indexOf(t=o[i])>=0||(r[t]=e[t]);return r}(e,i),d=n.useState({active:o,ready:o,entering:!1,entered:o,exiting:!1,exited:!1}),a=d[0],s=d[1];return n.useEffect(function(){o&&!a.active?(s(function(e){return t({},e,{active:!0,entered:!1,exited:!1})}),setTimeout(function(){s(function(e){return t({},e,{ready:!0,entering:!0})}),f.onEntering&&f.onEntering(),setTimeout(function(){s(function(e){return t({},e,{entering:!1,entered:!0})}),f.onEntered&&f.onEntered()},u)},50)):!o&&a.active&&(s(function(e){return t({},e,{exiting:!0,ready:!1,entered:!1})}),f.onExiting&&f.onExiting(),setTimeout(function(){s(function(e){return t({},e,{active:!1,exiting:!1,exited:!0})}),f.onExited&&f.onExited()},u))},[o]),!a.active&&c?null:r(a)}}); | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],n):n((e=e||self).mounty={},e.react)}(this,function(e,n){function t(){return(t=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e}).apply(this,arguments)}var i=["children","in","timeout","shouldUnmount"];e.Mounty=function(e){var r=e.children,o=e.in,u=e.timeout,c=e.shouldUnmount,f=function(e,n){if(null==e)return{};var t,i,r={},o=Object.keys(e);for(i=0;i<o.length;i++)n.indexOf(t=o[i])>=0||(r[t]=e[t]);return r}(e,i),a=n.useState({active:o,ready:o,entering:!1,entered:o,exiting:!1,exited:!1}),d=a[0],s=a[1];return n.useEffect(function(){o&&!d.active?(s(function(e){return t({},e,{active:!0,entered:!1,exited:!1})}),requestAnimationFrame(function(){requestAnimationFrame(function(){s(function(e){return t({},e,{ready:!0,entering:!0})}),f.onEntering&&f.onEntering(),setTimeout(function(){s(function(e){return t({},e,{entering:!1,entered:!0})}),f.onEntered&&f.onEntered()},u)})})):!o&&d.active&&(s(function(e){return t({},e,{exiting:!0,ready:!1,entered:!1})}),f.onExiting&&f.onExiting(),setTimeout(function(){s(function(e){return t({},e,{active:!1,exiting:!1,exited:!0})}),f.onExited&&f.onExited()},u))},[o]),!d.active&&c?null:r(d)}}); | ||
//# sourceMappingURL=mounty.umd.js.map |
{ | ||
"name": "mounty", | ||
"version": "1.5.0", | ||
"version": "1.5.1", | ||
"description": "A tiny React transition manager with mount/unmount support and a familiar API.", | ||
@@ -5,0 +5,0 @@ "source": "lib/index.tsx", |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
21124
0