@tanem/react-nprogress
Advanced tools
Comparing version 5.0.0 to 5.0.1
@@ -43,3 +43,3 @@ (function (global, factory) { | ||
function _extends() { | ||
_extends = Object.assign || function (target) { | ||
_extends = Object.assign ? Object.assign.bind() : function (target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
@@ -57,3 +57,2 @@ var source = arguments[i]; | ||
}; | ||
return _extends.apply(this, arguments); | ||
@@ -368,176 +367,187 @@ } | ||
var hasRequiredReactIs_development; | ||
function requireReactIs_development () { | ||
if (hasRequiredReactIs_development) return reactIs_development; | ||
hasRequiredReactIs_development = 1; | ||
{ | ||
(function() { | ||
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol | ||
// nor polyfill, then a plain number is used for performance. | ||
var hasSymbol = typeof Symbol === 'function' && Symbol.for; | ||
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; | ||
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; | ||
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; | ||
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; | ||
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; | ||
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; | ||
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary | ||
// (unstable) APIs that have been removed. Can we remove the symbols? | ||
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf; | ||
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; | ||
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; | ||
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; | ||
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8; | ||
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; | ||
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; | ||
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9; | ||
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5; | ||
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6; | ||
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7; | ||
{ | ||
(function() { | ||
function isValidElementType(type) { | ||
return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. | ||
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE); | ||
} | ||
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol | ||
// nor polyfill, then a plain number is used for performance. | ||
var hasSymbol = typeof Symbol === 'function' && Symbol.for; | ||
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; | ||
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; | ||
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; | ||
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; | ||
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; | ||
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; | ||
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary | ||
// (unstable) APIs that have been removed. Can we remove the symbols? | ||
function typeOf(object) { | ||
if (typeof object === 'object' && object !== null) { | ||
var $$typeof = object.$$typeof; | ||
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf; | ||
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; | ||
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; | ||
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; | ||
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8; | ||
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; | ||
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; | ||
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9; | ||
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5; | ||
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6; | ||
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7; | ||
switch ($$typeof) { | ||
case REACT_ELEMENT_TYPE: | ||
var type = object.type; | ||
function isValidElementType(type) { | ||
return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. | ||
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE); | ||
} | ||
switch (type) { | ||
case REACT_ASYNC_MODE_TYPE: | ||
case REACT_CONCURRENT_MODE_TYPE: | ||
case REACT_FRAGMENT_TYPE: | ||
case REACT_PROFILER_TYPE: | ||
case REACT_STRICT_MODE_TYPE: | ||
case REACT_SUSPENSE_TYPE: | ||
return type; | ||
function typeOf(object) { | ||
if (typeof object === 'object' && object !== null) { | ||
var $$typeof = object.$$typeof; | ||
default: | ||
var $$typeofType = type && type.$$typeof; | ||
switch ($$typeof) { | ||
case REACT_ELEMENT_TYPE: | ||
var type = object.type; | ||
switch ($$typeofType) { | ||
case REACT_CONTEXT_TYPE: | ||
case REACT_FORWARD_REF_TYPE: | ||
case REACT_LAZY_TYPE: | ||
case REACT_MEMO_TYPE: | ||
case REACT_PROVIDER_TYPE: | ||
return $$typeofType; | ||
switch (type) { | ||
case REACT_ASYNC_MODE_TYPE: | ||
case REACT_CONCURRENT_MODE_TYPE: | ||
case REACT_FRAGMENT_TYPE: | ||
case REACT_PROFILER_TYPE: | ||
case REACT_STRICT_MODE_TYPE: | ||
case REACT_SUSPENSE_TYPE: | ||
return type; | ||
default: | ||
return $$typeof; | ||
} | ||
default: | ||
var $$typeofType = type && type.$$typeof; | ||
} | ||
switch ($$typeofType) { | ||
case REACT_CONTEXT_TYPE: | ||
case REACT_FORWARD_REF_TYPE: | ||
case REACT_LAZY_TYPE: | ||
case REACT_MEMO_TYPE: | ||
case REACT_PROVIDER_TYPE: | ||
return $$typeofType; | ||
case REACT_PORTAL_TYPE: | ||
return $$typeof; | ||
} | ||
} | ||
default: | ||
return $$typeof; | ||
} | ||
return undefined; | ||
} // AsyncMode is deprecated along with isAsyncMode | ||
} | ||
var AsyncMode = REACT_ASYNC_MODE_TYPE; | ||
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE; | ||
var ContextConsumer = REACT_CONTEXT_TYPE; | ||
var ContextProvider = REACT_PROVIDER_TYPE; | ||
var Element = REACT_ELEMENT_TYPE; | ||
var ForwardRef = REACT_FORWARD_REF_TYPE; | ||
var Fragment = REACT_FRAGMENT_TYPE; | ||
var Lazy = REACT_LAZY_TYPE; | ||
var Memo = REACT_MEMO_TYPE; | ||
var Portal = REACT_PORTAL_TYPE; | ||
var Profiler = REACT_PROFILER_TYPE; | ||
var StrictMode = REACT_STRICT_MODE_TYPE; | ||
var Suspense = REACT_SUSPENSE_TYPE; | ||
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated | ||
case REACT_PORTAL_TYPE: | ||
return $$typeof; | ||
} | ||
} | ||
function isAsyncMode(object) { | ||
{ | ||
if (!hasWarnedAboutDeprecatedIsAsyncMode) { | ||
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint | ||
return undefined; | ||
} // AsyncMode is deprecated along with isAsyncMode | ||
console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.'); | ||
} | ||
} | ||
var AsyncMode = REACT_ASYNC_MODE_TYPE; | ||
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE; | ||
var ContextConsumer = REACT_CONTEXT_TYPE; | ||
var ContextProvider = REACT_PROVIDER_TYPE; | ||
var Element = REACT_ELEMENT_TYPE; | ||
var ForwardRef = REACT_FORWARD_REF_TYPE; | ||
var Fragment = REACT_FRAGMENT_TYPE; | ||
var Lazy = REACT_LAZY_TYPE; | ||
var Memo = REACT_MEMO_TYPE; | ||
var Portal = REACT_PORTAL_TYPE; | ||
var Profiler = REACT_PROFILER_TYPE; | ||
var StrictMode = REACT_STRICT_MODE_TYPE; | ||
var Suspense = REACT_SUSPENSE_TYPE; | ||
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated | ||
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE; | ||
} | ||
function isConcurrentMode(object) { | ||
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE; | ||
} | ||
function isContextConsumer(object) { | ||
return typeOf(object) === REACT_CONTEXT_TYPE; | ||
} | ||
function isContextProvider(object) { | ||
return typeOf(object) === REACT_PROVIDER_TYPE; | ||
} | ||
function isElement(object) { | ||
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; | ||
} | ||
function isForwardRef(object) { | ||
return typeOf(object) === REACT_FORWARD_REF_TYPE; | ||
} | ||
function isFragment(object) { | ||
return typeOf(object) === REACT_FRAGMENT_TYPE; | ||
} | ||
function isLazy(object) { | ||
return typeOf(object) === REACT_LAZY_TYPE; | ||
} | ||
function isMemo(object) { | ||
return typeOf(object) === REACT_MEMO_TYPE; | ||
} | ||
function isPortal(object) { | ||
return typeOf(object) === REACT_PORTAL_TYPE; | ||
} | ||
function isProfiler(object) { | ||
return typeOf(object) === REACT_PROFILER_TYPE; | ||
} | ||
function isStrictMode(object) { | ||
return typeOf(object) === REACT_STRICT_MODE_TYPE; | ||
} | ||
function isSuspense(object) { | ||
return typeOf(object) === REACT_SUSPENSE_TYPE; | ||
} | ||
function isAsyncMode(object) { | ||
{ | ||
if (!hasWarnedAboutDeprecatedIsAsyncMode) { | ||
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint | ||
reactIs_development.AsyncMode = AsyncMode; | ||
reactIs_development.ConcurrentMode = ConcurrentMode; | ||
reactIs_development.ContextConsumer = ContextConsumer; | ||
reactIs_development.ContextProvider = ContextProvider; | ||
reactIs_development.Element = Element; | ||
reactIs_development.ForwardRef = ForwardRef; | ||
reactIs_development.Fragment = Fragment; | ||
reactIs_development.Lazy = Lazy; | ||
reactIs_development.Memo = Memo; | ||
reactIs_development.Portal = Portal; | ||
reactIs_development.Profiler = Profiler; | ||
reactIs_development.StrictMode = StrictMode; | ||
reactIs_development.Suspense = Suspense; | ||
reactIs_development.isAsyncMode = isAsyncMode; | ||
reactIs_development.isConcurrentMode = isConcurrentMode; | ||
reactIs_development.isContextConsumer = isContextConsumer; | ||
reactIs_development.isContextProvider = isContextProvider; | ||
reactIs_development.isElement = isElement; | ||
reactIs_development.isForwardRef = isForwardRef; | ||
reactIs_development.isFragment = isFragment; | ||
reactIs_development.isLazy = isLazy; | ||
reactIs_development.isMemo = isMemo; | ||
reactIs_development.isPortal = isPortal; | ||
reactIs_development.isProfiler = isProfiler; | ||
reactIs_development.isStrictMode = isStrictMode; | ||
reactIs_development.isSuspense = isSuspense; | ||
reactIs_development.isValidElementType = isValidElementType; | ||
reactIs_development.typeOf = typeOf; | ||
})(); | ||
} | ||
console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.'); | ||
} | ||
} | ||
{ | ||
reactIs$1.exports = reactIs_development; | ||
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE; | ||
} | ||
function isConcurrentMode(object) { | ||
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE; | ||
} | ||
function isContextConsumer(object) { | ||
return typeOf(object) === REACT_CONTEXT_TYPE; | ||
} | ||
function isContextProvider(object) { | ||
return typeOf(object) === REACT_PROVIDER_TYPE; | ||
} | ||
function isElement(object) { | ||
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; | ||
} | ||
function isForwardRef(object) { | ||
return typeOf(object) === REACT_FORWARD_REF_TYPE; | ||
} | ||
function isFragment(object) { | ||
return typeOf(object) === REACT_FRAGMENT_TYPE; | ||
} | ||
function isLazy(object) { | ||
return typeOf(object) === REACT_LAZY_TYPE; | ||
} | ||
function isMemo(object) { | ||
return typeOf(object) === REACT_MEMO_TYPE; | ||
} | ||
function isPortal(object) { | ||
return typeOf(object) === REACT_PORTAL_TYPE; | ||
} | ||
function isProfiler(object) { | ||
return typeOf(object) === REACT_PROFILER_TYPE; | ||
} | ||
function isStrictMode(object) { | ||
return typeOf(object) === REACT_STRICT_MODE_TYPE; | ||
} | ||
function isSuspense(object) { | ||
return typeOf(object) === REACT_SUSPENSE_TYPE; | ||
} | ||
reactIs_development.AsyncMode = AsyncMode; | ||
reactIs_development.ConcurrentMode = ConcurrentMode; | ||
reactIs_development.ContextConsumer = ContextConsumer; | ||
reactIs_development.ContextProvider = ContextProvider; | ||
reactIs_development.Element = Element; | ||
reactIs_development.ForwardRef = ForwardRef; | ||
reactIs_development.Fragment = Fragment; | ||
reactIs_development.Lazy = Lazy; | ||
reactIs_development.Memo = Memo; | ||
reactIs_development.Portal = Portal; | ||
reactIs_development.Profiler = Profiler; | ||
reactIs_development.StrictMode = StrictMode; | ||
reactIs_development.Suspense = Suspense; | ||
reactIs_development.isAsyncMode = isAsyncMode; | ||
reactIs_development.isConcurrentMode = isConcurrentMode; | ||
reactIs_development.isContextConsumer = isContextConsumer; | ||
reactIs_development.isContextProvider = isContextProvider; | ||
reactIs_development.isElement = isElement; | ||
reactIs_development.isForwardRef = isForwardRef; | ||
reactIs_development.isFragment = isFragment; | ||
reactIs_development.isLazy = isLazy; | ||
reactIs_development.isMemo = isMemo; | ||
reactIs_development.isPortal = isPortal; | ||
reactIs_development.isProfiler = isProfiler; | ||
reactIs_development.isStrictMode = isStrictMode; | ||
reactIs_development.isSuspense = isSuspense; | ||
reactIs_development.isValidElementType = isValidElementType; | ||
reactIs_development.typeOf = typeOf; | ||
})(); | ||
} | ||
return reactIs_development; | ||
} | ||
(function (module) { | ||
{ | ||
module.exports = requireReactIs_development(); | ||
} | ||
} (reactIs$1)); | ||
var reactIs = reactIs$1.exports; | ||
@@ -544,0 +554,0 @@ |
@@ -1,2 +0,2 @@ | ||
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).NProgress={},e.React)}(this,(function(e,r){"use strict";function t(e){if(e&&e.__esModule)return e;var r=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}})),r.default=e,Object.freeze(r)}var n=t(r);function o(){return o=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},o.apply(this,arguments)}var u=function(e,r,t){return e=(e=e<=t?e:t)>=r?e:r},c=function(){var e=!1,r=[],t=function t(){e=!0;var n=r.shift();if(n)return n(t);e=!1};return{clear:function(){e=!1,r=[]},enqueue:function(n){r.push(n),e||1!==r.length||t()}}},i=function(e){r.useEffect(e,[])},f=function(e){return++e%1e6},a=function(e){void 0===e&&(e={});var t,n=(t=r.useState(0)[1],r.useCallback((function(){return t(f)}),[])),u=r.useRef(o({},e));return[r.useCallback((function(){return u.current}),[]),r.useCallback((function(e){e&&(Object.assign(u.current,e),n())}),[])]},s=function(e,t){var n,o=(n=r.useRef(!0)).current?(n.current=!1,!0):n.current;r.useEffect((function(){if(!o)return e()}),t)},l=function(){},p={isFinished:!0,progress:0,sideEffect:l},y=function(e){var t=void 0===e?{}:e,n=t.animationDuration,f=void 0===n?200:n,y=t.incrementDuration,d=void 0===y?800:y,m=t.isAnimating,b=void 0!==m&&m,v=t.minimum,g=void 0===v?.08:v,h=a(p),$=h[0],S=h[1],O=r.useRef(null),P=r.useRef(null);i((function(){var e;O.current=c(),P.current={cancel:function(){e&&window.cancelAnimationFrame(e)},schedule:function(r,t){var n;e=window.requestAnimationFrame((function o(u){u-(n=n||u)>t?r():e=window.requestAnimationFrame(o)}))}}}));var j=r.useCallback((function(){var e,r;null==(e=P.current)||e.cancel(),null==(r=O.current)||r.clear()}),[]),w=r.useCallback((function(e){var r,t,n;if(1===(e=u(e,g,1)))return j(),null==(t=O.current)||t.enqueue((function(r){S({progress:e,sideEffect:function(){var e;return null==(e=P.current)?void 0:e.schedule(r,f)}})})),void(null==(n=O.current)||n.enqueue((function(){S({isFinished:!0,sideEffect:j})})));null==(r=O.current)||r.enqueue((function(r){S({isFinished:!1,progress:e,sideEffect:function(){var e;return null==(e=P.current)?void 0:e.schedule(r,f)}})}))}),[f,j,g,O,S,P]),x=r.useCallback((function(){var e,r;w((e=$().progress,r=0,e>=0&&e<.2?r=.1:e>=.2&&e<.5?r=.04:e>=.5&&e<.8?r=.02:e>=.8&&e<.99&&(r=.005),u(e+r,0,.994)))}),[$,w]),C=r.useCallback((function(){!function e(){var r;x(),null==(r=O.current)||r.enqueue((function(r){var t;null==(t=P.current)||t.schedule((function(){e(),r()}),d)}))}()}),[d,O,P,x]),E=r.useRef(l),F=$().sideEffect;return r.useEffect((function(){E.current=x})),i((function(){return b&&C(),j})),s((function(){$().sideEffect()}),[$,F]),s((function(){b?S(o({},p,{sideEffect:C})):w(1)}),[b,w,S,C]),{animationDuration:f,isFinished:$().isFinished,progress:$().progress}},d=["children"],m={exports:{}},b={},v="function"==typeof Symbol&&Symbol.for,g=v?Symbol.for("react.element"):60103,h=v?Symbol.for("react.portal"):60106,$=v?Symbol.for("react.fragment"):60107,S=v?Symbol.for("react.strict_mode"):60108,O=v?Symbol.for("react.profiler"):60114,P=v?Symbol.for("react.provider"):60109,j=v?Symbol.for("react.context"):60110,w=v?Symbol.for("react.async_mode"):60111,x=v?Symbol.for("react.concurrent_mode"):60111,C=v?Symbol.for("react.forward_ref"):60112,E=v?Symbol.for("react.suspense"):60113,F=v?Symbol.for("react.suspense_list"):60120,M=v?Symbol.for("react.memo"):60115,k=v?Symbol.for("react.lazy"):60116,R=v?Symbol.for("react.block"):60121,T=v?Symbol.for("react.fundamental"):60117,_=v?Symbol.for("react.responder"):60118,q=v?Symbol.for("react.scope"):60119;function D(e){if("object"==typeof e&&null!==e){var r=e.$$typeof;switch(r){case g:switch(e=e.type){case w:case x:case $:case O:case S:case E:return e;default:switch(e=e&&e.$$typeof){case j:case C:case k:case M:case P:return e;default:return r}}case h:return r}}}function N(e){return D(e)===x}b.AsyncMode=w,b.ConcurrentMode=x,b.ContextConsumer=j,b.ContextProvider=P,b.Element=g,b.ForwardRef=C,b.Fragment=$,b.Lazy=k,b.Memo=M,b.Portal=h,b.Profiler=O,b.StrictMode=S,b.Suspense=E,b.isAsyncMode=function(e){return N(e)||D(e)===w},b.isConcurrentMode=N,b.isContextConsumer=function(e){return D(e)===j},b.isContextProvider=function(e){return D(e)===P},b.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===g},b.isForwardRef=function(e){return D(e)===C},b.isFragment=function(e){return D(e)===$},b.isLazy=function(e){return D(e)===k},b.isMemo=function(e){return D(e)===M},b.isPortal=function(e){return D(e)===h},b.isProfiler=function(e){return D(e)===O},b.isStrictMode=function(e){return D(e)===S},b.isSuspense=function(e){return D(e)===E},b.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===$||e===x||e===O||e===S||e===E||e===F||"object"==typeof e&&null!==e&&(e.$$typeof===k||e.$$typeof===M||e.$$typeof===P||e.$$typeof===j||e.$$typeof===C||e.$$typeof===T||e.$$typeof===_||e.$$typeof===q||e.$$typeof===R)},b.typeOf=D,m.exports=b;var A=m.exports,z={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},L={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},V={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},B={};function G(e){return A.isMemo(e)?V:B[e.$$typeof]||z}B[A.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},B[A.Memo]=V;var H=Object.defineProperty,I=Object.getOwnPropertyNames,J=Object.getOwnPropertySymbols,K=Object.getOwnPropertyDescriptor,Q=Object.getPrototypeOf,U=Object.prototype;var W=function e(r,t,n){if("string"!=typeof t){if(U){var o=Q(t);o&&o!==U&&e(r,o,n)}var u=I(t);J&&(u=u.concat(J(t)));for(var c=G(r),i=G(t),f=0;f<u.length;++f){var a=u[f];if(!(L[a]||n&&n[a]||i&&i[a]||c&&c[a])){var s=K(t,a);try{H(r,a,s)}catch(e){}}}}return r};e.NProgress=function(e){var r=e.children,t=function(e,r){if(null==e)return{};var t,n,o={},u=Object.keys(e);for(n=0;n<u.length;n++)r.indexOf(t=u[n])>=0||(o[t]=e[t]);return o}(e,d);return r(y(t))},e.useNProgress=y,e.withNProgress=function(e){var r=function(r){var t=y(r);return n.createElement(e,o({},r,t))};return W(r,e),r},Object.defineProperty(e,"__esModule",{value:!0})})); | ||
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).NProgress={},e.React)}(this,(function(e,r){"use strict";function t(e){if(e&&e.__esModule)return e;var r=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}})),r.default=e,Object.freeze(r)}var n=t(r);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},o.apply(this,arguments)}var u,c=function(e,r,t){return e=(e=e<=t?e:t)>=r?e:r},i=function(){var e=!1,r=[],t=function t(){e=!0;var n=r.shift();if(n)return n(t);e=!1};return{clear:function(){e=!1,r=[]},enqueue:function(n){r.push(n),e||1!==r.length||t()}}},f=function(e){r.useEffect(e,[])},a=function(e){return++e%1e6},s=function(e){void 0===e&&(e={});var t,n=(t=r.useState(0)[1],r.useCallback((function(){return t(a)}),[])),u=r.useRef(o({},e));return[r.useCallback((function(){return u.current}),[]),r.useCallback((function(e){e&&(Object.assign(u.current,e),n())}),[])]},l=function(e,t){var n,o=(n=r.useRef(!0)).current?(n.current=!1,!0):n.current;r.useEffect((function(){if(!o)return e()}),t)},p=function(){},y={isFinished:!0,progress:0,sideEffect:p},d=function(e){var t=void 0===e?{}:e,n=t.animationDuration,u=void 0===n?200:n,a=t.incrementDuration,d=void 0===a?800:a,m=t.isAnimating,b=void 0!==m&&m,v=t.minimum,g=void 0===v?.08:v,h=s(y),$=h[0],S=h[1],O=r.useRef(null),P=r.useRef(null);f((function(){var e;O.current=i(),P.current={cancel:function(){e&&window.cancelAnimationFrame(e)},schedule:function(r,t){var n;e=window.requestAnimationFrame((function o(u){u-(n=n||u)>t?r():e=window.requestAnimationFrame(o)}))}}}));var j=r.useCallback((function(){var e,r;null==(e=P.current)||e.cancel(),null==(r=O.current)||r.clear()}),[]),w=r.useCallback((function(e){var r,t,n;if(1===(e=c(e,g,1)))return j(),null==(t=O.current)||t.enqueue((function(r){S({progress:e,sideEffect:function(){var e;return null==(e=P.current)?void 0:e.schedule(r,u)}})})),void(null==(n=O.current)||n.enqueue((function(){S({isFinished:!0,sideEffect:j})})));null==(r=O.current)||r.enqueue((function(r){S({isFinished:!1,progress:e,sideEffect:function(){var e;return null==(e=P.current)?void 0:e.schedule(r,u)}})}))}),[u,j,g,O,S,P]),x=r.useCallback((function(){var e,r;w((e=$().progress,r=0,e>=0&&e<.2?r=.1:e>=.2&&e<.5?r=.04:e>=.5&&e<.8?r=.02:e>=.8&&e<.99&&(r=.005),c(e+r,0,.994)))}),[$,w]),C=r.useCallback((function(){!function e(){var r;x(),null==(r=O.current)||r.enqueue((function(r){var t;null==(t=P.current)||t.schedule((function(){e(),r()}),d)}))}()}),[d,O,P,x]),E=r.useRef(p),F=$().sideEffect;return r.useEffect((function(){E.current=x})),f((function(){return b&&C(),j})),l((function(){$().sideEffect()}),[$,F]),l((function(){b?S(o({},y,{sideEffect:C})):w(1)}),[b,w,S,C]),{animationDuration:u,isFinished:$().isFinished,progress:$().progress}},m=["children"],b={exports:{}},v={};!function(e){e.exports=function(){if(u)return v;u=1;var e="function"==typeof Symbol&&Symbol.for,r=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,c=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,f=e?Symbol.for("react.context"):60110,a=e?Symbol.for("react.async_mode"):60111,s=e?Symbol.for("react.concurrent_mode"):60111,l=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,y=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,b=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,h=e?Symbol.for("react.responder"):60118,$=e?Symbol.for("react.scope"):60119;function S(e){if("object"==typeof e&&null!==e){var u=e.$$typeof;switch(u){case r:switch(e=e.type){case a:case s:case n:case c:case o:case p:return e;default:switch(e=e&&e.$$typeof){case f:case l:case m:case d:case i:return e;default:return u}}case t:return u}}}function O(e){return S(e)===s}return v.AsyncMode=a,v.ConcurrentMode=s,v.ContextConsumer=f,v.ContextProvider=i,v.Element=r,v.ForwardRef=l,v.Fragment=n,v.Lazy=m,v.Memo=d,v.Portal=t,v.Profiler=c,v.StrictMode=o,v.Suspense=p,v.isAsyncMode=function(e){return O(e)||S(e)===a},v.isConcurrentMode=O,v.isContextConsumer=function(e){return S(e)===f},v.isContextProvider=function(e){return S(e)===i},v.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},v.isForwardRef=function(e){return S(e)===l},v.isFragment=function(e){return S(e)===n},v.isLazy=function(e){return S(e)===m},v.isMemo=function(e){return S(e)===d},v.isPortal=function(e){return S(e)===t},v.isProfiler=function(e){return S(e)===c},v.isStrictMode=function(e){return S(e)===o},v.isSuspense=function(e){return S(e)===p},v.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===s||e===c||e===o||e===p||e===y||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===d||e.$$typeof===i||e.$$typeof===f||e.$$typeof===l||e.$$typeof===g||e.$$typeof===h||e.$$typeof===$||e.$$typeof===b)},v.typeOf=S,v}()}(b);var g=b.exports,h={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},$={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},S={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},O={};function P(e){return g.isMemo(e)?S:O[e.$$typeof]||h}O[g.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},O[g.Memo]=S;var j=Object.defineProperty,w=Object.getOwnPropertyNames,x=Object.getOwnPropertySymbols,C=Object.getOwnPropertyDescriptor,E=Object.getPrototypeOf,F=Object.prototype;var M=function e(r,t,n){if("string"!=typeof t){if(F){var o=E(t);o&&o!==F&&e(r,o,n)}var u=w(t);x&&(u=u.concat(x(t)));for(var c=P(r),i=P(t),f=0;f<u.length;++f){var a=u[f];if(!($[a]||n&&n[a]||i&&i[a]||c&&c[a])){var s=C(t,a);try{j(r,a,s)}catch(e){}}}}return r};e.NProgress=function(e){var r=e.children,t=function(e,r){if(null==e)return{};var t,n,o={},u=Object.keys(e);for(n=0;n<u.length;n++)r.indexOf(t=u[n])>=0||(o[t]=e[t]);return o}(e,m);return r(d(t))},e.useNProgress=d,e.withNProgress=function(e){var r=function(r){var t=d(r);return n.createElement(e,o({},r,t))};return M(r,e),r},Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=react-nprogress.umd.production.js.map |
{ | ||
"name": "@tanem/react-nprogress", | ||
"version": "5.0.0", | ||
"version": "5.0.1", | ||
"description": "A React primitive for building slim progress bars.", | ||
@@ -69,46 +69,46 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@babel/runtime": "^7.17.9", | ||
"@babel/runtime": "^7.18.3", | ||
"hoist-non-react-statics": "^3.3.2" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "7.17.9", | ||
"@babel/plugin-transform-runtime": "7.17.0", | ||
"@babel/preset-env": "7.16.11", | ||
"@babel/preset-react": "7.16.7", | ||
"@babel/preset-typescript": "7.16.7", | ||
"@rollup/plugin-babel": "^5.3.1", | ||
"@rollup/plugin-commonjs": "^21.0.3", | ||
"@rollup/plugin-node-resolve": "^13.1.3", | ||
"@rollup/plugin-replace": "^4.0.0", | ||
"@testing-library/react": "13.0.0", | ||
"@testing-library/react-hooks": "7.0.2", | ||
"@babel/core": "7.18.2", | ||
"@babel/plugin-transform-runtime": "7.18.2", | ||
"@babel/preset-env": "7.18.2", | ||
"@babel/preset-react": "7.17.12", | ||
"@babel/preset-typescript": "7.17.12", | ||
"@rollup/plugin-babel": "5.3.1", | ||
"@rollup/plugin-commonjs": "22.0.0", | ||
"@rollup/plugin-node-resolve": "13.3.0", | ||
"@rollup/plugin-replace": "4.0.0", | ||
"@testing-library/react": "13.3.0", | ||
"@types/hoist-non-react-statics": "3.3.1", | ||
"@types/jest": "27.4.1", | ||
"@types/jest": "27.5.1", | ||
"@types/mock-raf": "1.0.3", | ||
"@types/react": "18.0.1", | ||
"@types/react-dom": "18.0.0", | ||
"@typescript-eslint/eslint-plugin": "5.18.0", | ||
"@typescript-eslint/parser": "5.18.0", | ||
"@types/react": "18.0.9", | ||
"@types/react-dom": "18.0.5", | ||
"@typescript-eslint/eslint-plugin": "5.27.0", | ||
"@typescript-eslint/parser": "5.27.0", | ||
"babel-core": "6.26.3", | ||
"eslint": "8.13.0", | ||
"eslint": "8.16.0", | ||
"eslint-config-prettier": "8.5.0", | ||
"eslint-plugin-react": "7.29.4", | ||
"eslint-plugin-react-hooks": "4.4.0", | ||
"eslint-plugin-react": "7.30.0", | ||
"eslint-plugin-react-hooks": "4.5.0", | ||
"eslint-plugin-simple-import-sort": "7.0.0", | ||
"jest": "27.5.1", | ||
"jest": "28.1.0", | ||
"jest-environment-jsdom": "28.1.0", | ||
"mock-raf": "1.0.1", | ||
"npm-run-all": "4.1.5", | ||
"prettier": "2.6.2", | ||
"react": "18.0.0", | ||
"react-dom": "18.0.0", | ||
"react-test-renderer": "18.0.0", | ||
"react": "18.1.0", | ||
"react-dom": "18.1.0", | ||
"react-test-renderer": "18.1.0", | ||
"regenerator-runtime": "0.13.9", | ||
"rollup": "2.70.1", | ||
"rollup": "2.74.1", | ||
"rollup-plugin-sourcemaps": "0.6.3", | ||
"rollup-plugin-terser": "7.0.2", | ||
"shx": "0.3.4", | ||
"tanem-scripts": "6.0.46", | ||
"ts-jest": "27.1.4", | ||
"typescript": "4.6.3" | ||
"tanem-scripts": "6.0.47", | ||
"ts-jest": "28.0.3", | ||
"typescript": "4.7.2" | ||
} | ||
} |
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
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
1203
177146
Updated@babel/runtime@^7.18.3