@tanem/react-nprogress 6.0.4 → 7.1.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/README.md +114 -108
- package/dist/react-nprogress.cjs +124 -0
- package/dist/react-nprogress.cjs.map +1 -0
- package/dist/react-nprogress.d.cts +26 -0
- package/dist/react-nprogress.d.cts.map +1 -0
- package/dist/react-nprogress.d.mts +26 -0
- package/dist/react-nprogress.d.mts.map +1 -0
- package/dist/react-nprogress.mjs +122 -0
- package/dist/react-nprogress.mjs.map +1 -0
- package/package.json +50 -36
- package/src/NProgress.tsx +13 -0
- package/src/clamp.ts +5 -0
- package/src/createTimeout.ts +35 -0
- package/src/env.d.ts +0 -0
- package/src/increment.ts +17 -0
- package/src/index.tsx +3 -0
- package/src/types.ts +13 -0
- package/src/useNProgress.tsx +137 -0
- package/dist/NProgress.d.ts +0 -8
- package/dist/clamp.d.ts +0 -1
- package/dist/createQueue.d.ts +0 -7
- package/dist/createTimeout.d.ts +0 -4
- package/dist/increment.d.ts +0 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.js +0 -7
- package/dist/react-nprogress.cjs.development.js +0 -299
- package/dist/react-nprogress.cjs.development.js.map +0 -1
- package/dist/react-nprogress.cjs.production.js +0 -2
- package/dist/react-nprogress.cjs.production.js.map +0 -1
- package/dist/react-nprogress.esm.js +0 -295
- package/dist/react-nprogress.esm.js.map +0 -1
- package/dist/react-nprogress.umd.development.js +0 -727
- package/dist/react-nprogress.umd.development.js.map +0 -1
- package/dist/react-nprogress.umd.production.js +0 -2
- package/dist/react-nprogress.umd.production.js.map +0 -1
- package/dist/types.d.ts +0 -6
- package/dist/useEffectOnce.d.ts +0 -2
- package/dist/useGetSetState.d.ts +0 -1
- package/dist/useNProgress.d.ts +0 -6
- package/dist/useUpdateEffect.d.ts +0 -2
- package/dist/withNProgress.d.ts +0 -7
|
@@ -1,295 +0,0 @@
|
|
|
1
|
-
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
2
|
-
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
3
|
-
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
4
|
-
import { useEffect, useRef, useCallback, useReducer } from 'react';
|
|
5
|
-
import { jsx } from 'react/jsx-runtime';
|
|
6
|
-
import hoistNonReactStatics from 'hoist-non-react-statics';
|
|
7
|
-
|
|
8
|
-
var clamp = function clamp(num, lower, upper) {
|
|
9
|
-
num = num <= upper ? num : upper;
|
|
10
|
-
num = num >= lower ? num : lower;
|
|
11
|
-
return num;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
var createQueue = function createQueue() {
|
|
15
|
-
var isRunning = false;
|
|
16
|
-
var pending = [];
|
|
17
|
-
var _next = function next() {
|
|
18
|
-
isRunning = true;
|
|
19
|
-
var cb = pending.shift();
|
|
20
|
-
if (cb) {
|
|
21
|
-
return cb(_next);
|
|
22
|
-
}
|
|
23
|
-
isRunning = false;
|
|
24
|
-
};
|
|
25
|
-
var clear = function clear() {
|
|
26
|
-
isRunning = false;
|
|
27
|
-
pending = [];
|
|
28
|
-
};
|
|
29
|
-
var enqueue = function enqueue(cb) {
|
|
30
|
-
pending.push(cb);
|
|
31
|
-
if (!isRunning && pending.length === 1) {
|
|
32
|
-
_next();
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
return {
|
|
36
|
-
clear: clear,
|
|
37
|
-
enqueue: enqueue
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
// Uses requestAnimationFrame rather than setTimeout for smoother animation
|
|
42
|
-
// timing. Note that rAF is throttled or paused in background tabs, so progress
|
|
43
|
-
// will stall when the tab is hidden and resume when it regains focus.
|
|
44
|
-
var createTimeout = function createTimeout() {
|
|
45
|
-
var handle;
|
|
46
|
-
var cancel = function cancel() {
|
|
47
|
-
if (handle !== undefined) {
|
|
48
|
-
window.cancelAnimationFrame(handle);
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
var schedule = function schedule(callback, delay) {
|
|
52
|
-
cancel();
|
|
53
|
-
var deltaTime;
|
|
54
|
-
var start;
|
|
55
|
-
var _frame = function frame(time) {
|
|
56
|
-
start = start || time;
|
|
57
|
-
deltaTime = time - start;
|
|
58
|
-
if (deltaTime > delay) {
|
|
59
|
-
callback();
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
handle = window.requestAnimationFrame(_frame);
|
|
63
|
-
};
|
|
64
|
-
handle = window.requestAnimationFrame(_frame);
|
|
65
|
-
};
|
|
66
|
-
return {
|
|
67
|
-
cancel: cancel,
|
|
68
|
-
schedule: schedule
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
var increment = function increment(progress) {
|
|
73
|
-
var amount = 0;
|
|
74
|
-
if (progress >= 0 && progress < 0.2) {
|
|
75
|
-
amount = 0.1;
|
|
76
|
-
} else if (progress >= 0.2 && progress < 0.5) {
|
|
77
|
-
amount = 0.04;
|
|
78
|
-
} else if (progress >= 0.5 && progress < 0.8) {
|
|
79
|
-
amount = 0.02;
|
|
80
|
-
} else if (progress >= 0.8 && progress < 0.99) {
|
|
81
|
-
amount = 0.005;
|
|
82
|
-
}
|
|
83
|
-
return clamp(progress + amount, 0, 0.994);
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
// Hat-tip:
|
|
87
|
-
// https://github.com/streamich/react-use/blob/master/src/useEffectOnce.ts.
|
|
88
|
-
//
|
|
89
|
-
// `react-use` appears to be unmaintained, so moving the required code into
|
|
90
|
-
// this project for now.
|
|
91
|
-
var useEffectOnce = function useEffectOnce(effect) {
|
|
92
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
93
|
-
useEffect(effect, []);
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
function ownKeys$2(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
97
|
-
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
98
|
-
var useUpdate = function useUpdate() {
|
|
99
|
-
var _useReducer = useReducer(function (num) {
|
|
100
|
-
return (num + 1) % 1000000;
|
|
101
|
-
}, 0),
|
|
102
|
-
_useReducer2 = _slicedToArray(_useReducer, 2),
|
|
103
|
-
update = _useReducer2[1];
|
|
104
|
-
return update;
|
|
105
|
-
};
|
|
106
|
-
var useGetSetState = function useGetSetState() {
|
|
107
|
-
var initialState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
108
|
-
var update = useUpdate();
|
|
109
|
-
var stateRef = useRef(_objectSpread$2({}, initialState));
|
|
110
|
-
var get = useCallback(function () {
|
|
111
|
-
return stateRef.current;
|
|
112
|
-
}, []);
|
|
113
|
-
var set = useCallback(function (patch) {
|
|
114
|
-
if (!patch) {
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
Object.assign(stateRef.current, patch);
|
|
118
|
-
update();
|
|
119
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
120
|
-
}, []);
|
|
121
|
-
return [get, set];
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
// Hat-tip:
|
|
125
|
-
// https://github.com/streamich/react-use/blob/master/src/useUpdateEffect.ts.
|
|
126
|
-
//
|
|
127
|
-
// `react-use` appears to be unmaintained, so moving the required code into
|
|
128
|
-
// this project for now.
|
|
129
|
-
var useFirstMountState = function useFirstMountState() {
|
|
130
|
-
var isFirstRef = useRef(true);
|
|
131
|
-
// Read and mutated directly during render (rather than in an effect) so
|
|
132
|
-
// the first-mount result is available synchronously on the very first
|
|
133
|
-
// render, before any effect has run.
|
|
134
|
-
/* eslint-disable react-hooks/refs -- intentional, see comment above */
|
|
135
|
-
if (isFirstRef.current) {
|
|
136
|
-
isFirstRef.current = false;
|
|
137
|
-
return true;
|
|
138
|
-
}
|
|
139
|
-
return isFirstRef.current;
|
|
140
|
-
/* eslint-enable react-hooks/refs */
|
|
141
|
-
};
|
|
142
|
-
var useUpdateEffect = function useUpdateEffect(effect, deps) {
|
|
143
|
-
var isFirstMount = useFirstMountState();
|
|
144
|
-
useEffect(function () {
|
|
145
|
-
if (!isFirstMount) {
|
|
146
|
-
return effect();
|
|
147
|
-
}
|
|
148
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
149
|
-
}, deps);
|
|
150
|
-
};
|
|
151
|
-
|
|
152
|
-
function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
153
|
-
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
154
|
-
/* istanbul ignore next */
|
|
155
|
-
var noop = function noop() {
|
|
156
|
-
return undefined;
|
|
157
|
-
};
|
|
158
|
-
// State includes a `sideEffect` callback that bridges imperative queue
|
|
159
|
-
// operations into React's declarative model. Each `setState` stores a callback;
|
|
160
|
-
// `useUpdateEffect` fires it after React commits the update. This lets the
|
|
161
|
-
// queue drive animations and schedule follow-up work without breaking React's
|
|
162
|
-
// rendering lifecycle.
|
|
163
|
-
var initialState = {
|
|
164
|
-
isFinished: true,
|
|
165
|
-
progress: 0,
|
|
166
|
-
sideEffect: noop
|
|
167
|
-
};
|
|
168
|
-
var useNProgress = function useNProgress() {
|
|
169
|
-
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
170
|
-
_ref$animationDuratio = _ref.animationDuration,
|
|
171
|
-
animationDuration = _ref$animationDuratio === void 0 ? 200 : _ref$animationDuratio,
|
|
172
|
-
_ref$incrementDuratio = _ref.incrementDuration,
|
|
173
|
-
incrementDuration = _ref$incrementDuratio === void 0 ? 200 : _ref$incrementDuratio,
|
|
174
|
-
_ref$isAnimating = _ref.isAnimating,
|
|
175
|
-
isAnimating = _ref$isAnimating === void 0 ? false : _ref$isAnimating,
|
|
176
|
-
_ref$minimum = _ref.minimum,
|
|
177
|
-
minimum = _ref$minimum === void 0 ? 0.08 : _ref$minimum;
|
|
178
|
-
var _useGetSetState = useGetSetState(initialState),
|
|
179
|
-
_useGetSetState2 = _slicedToArray(_useGetSetState, 2),
|
|
180
|
-
get = _useGetSetState2[0],
|
|
181
|
-
setState = _useGetSetState2[1];
|
|
182
|
-
var queueRef = useRef(null);
|
|
183
|
-
var timeoutRef = useRef(null);
|
|
184
|
-
useEffectOnce(function () {
|
|
185
|
-
queueRef.current = createQueue();
|
|
186
|
-
timeoutRef.current = createTimeout();
|
|
187
|
-
});
|
|
188
|
-
var cleanup = useCallback(function () {
|
|
189
|
-
var _timeoutRef$current, _queueRef$current;
|
|
190
|
-
(_timeoutRef$current = timeoutRef.current) === null || _timeoutRef$current === void 0 || _timeoutRef$current.cancel();
|
|
191
|
-
(_queueRef$current = queueRef.current) === null || _queueRef$current === void 0 || _queueRef$current.clear();
|
|
192
|
-
}, []);
|
|
193
|
-
var set = useCallback(function (n) {
|
|
194
|
-
var _queueRef$current4;
|
|
195
|
-
n = clamp(n, minimum, 1);
|
|
196
|
-
// Unlike the original nprogress `done()`, completion does not include a
|
|
197
|
-
// random progress jump before animating to 1. This keeps the primitive
|
|
198
|
-
// predictable; consumers can set a higher progress value before stopping
|
|
199
|
-
// the animation if they want that effect.
|
|
200
|
-
if (n === 1) {
|
|
201
|
-
var _queueRef$current2, _queueRef$current3;
|
|
202
|
-
cleanup();
|
|
203
|
-
(_queueRef$current2 = queueRef.current) === null || _queueRef$current2 === void 0 || _queueRef$current2.enqueue(function (next) {
|
|
204
|
-
setState({
|
|
205
|
-
progress: n,
|
|
206
|
-
sideEffect: function sideEffect() {
|
|
207
|
-
var _timeoutRef$current2;
|
|
208
|
-
return (_timeoutRef$current2 = timeoutRef.current) === null || _timeoutRef$current2 === void 0 ? void 0 : _timeoutRef$current2.schedule(next, animationDuration);
|
|
209
|
-
}
|
|
210
|
-
});
|
|
211
|
-
});
|
|
212
|
-
(_queueRef$current3 = queueRef.current) === null || _queueRef$current3 === void 0 || _queueRef$current3.enqueue(function () {
|
|
213
|
-
setState({
|
|
214
|
-
isFinished: true,
|
|
215
|
-
sideEffect: cleanup
|
|
216
|
-
});
|
|
217
|
-
});
|
|
218
|
-
return;
|
|
219
|
-
}
|
|
220
|
-
(_queueRef$current4 = queueRef.current) === null || _queueRef$current4 === void 0 || _queueRef$current4.enqueue(function (next) {
|
|
221
|
-
setState({
|
|
222
|
-
isFinished: false,
|
|
223
|
-
progress: n,
|
|
224
|
-
sideEffect: next
|
|
225
|
-
});
|
|
226
|
-
});
|
|
227
|
-
}, [animationDuration, cleanup, minimum, queueRef, setState, timeoutRef]);
|
|
228
|
-
var trickle = useCallback(function () {
|
|
229
|
-
set(increment(get().progress));
|
|
230
|
-
}, [get, set]);
|
|
231
|
-
var start = useCallback(function () {
|
|
232
|
-
// The original nprogress calls set(0) - which clamps to `minimum` - before
|
|
233
|
-
// the first trickle. Here, the first trickle starts from increment(0) =
|
|
234
|
-
// 0.1, so the bar appears at max(0.1, minimum) rather than exactly
|
|
235
|
-
// `minimum`. The difference is negligible at the default minimum of 0.08.
|
|
236
|
-
var _work = function work() {
|
|
237
|
-
var _queueRef$current5;
|
|
238
|
-
trickle();
|
|
239
|
-
(_queueRef$current5 = queueRef.current) === null || _queueRef$current5 === void 0 || _queueRef$current5.enqueue(function (next) {
|
|
240
|
-
var _timeoutRef$current3;
|
|
241
|
-
(_timeoutRef$current3 = timeoutRef.current) === null || _timeoutRef$current3 === void 0 || _timeoutRef$current3.schedule(function () {
|
|
242
|
-
_work();
|
|
243
|
-
next();
|
|
244
|
-
}, incrementDuration);
|
|
245
|
-
});
|
|
246
|
-
};
|
|
247
|
-
_work();
|
|
248
|
-
}, [incrementDuration, queueRef, timeoutRef, trickle]);
|
|
249
|
-
var sideEffect = get().sideEffect;
|
|
250
|
-
useEffectOnce(function () {
|
|
251
|
-
if (isAnimating) {
|
|
252
|
-
start();
|
|
253
|
-
}
|
|
254
|
-
return cleanup;
|
|
255
|
-
});
|
|
256
|
-
useUpdateEffect(function () {
|
|
257
|
-
get().sideEffect();
|
|
258
|
-
}, [get, sideEffect]);
|
|
259
|
-
useUpdateEffect(function () {
|
|
260
|
-
if (!isAnimating) {
|
|
261
|
-
set(1);
|
|
262
|
-
} else {
|
|
263
|
-
setState(_objectSpread$1(_objectSpread$1({}, initialState), {}, {
|
|
264
|
-
sideEffect: start
|
|
265
|
-
}));
|
|
266
|
-
}
|
|
267
|
-
}, [isAnimating, set, setState, start]);
|
|
268
|
-
return {
|
|
269
|
-
animationDuration: animationDuration,
|
|
270
|
-
isFinished: get().isFinished,
|
|
271
|
-
progress: get().progress
|
|
272
|
-
};
|
|
273
|
-
};
|
|
274
|
-
|
|
275
|
-
var _excluded = ["children"];
|
|
276
|
-
var NProgress = function NProgress(_ref) {
|
|
277
|
-
var children = _ref.children,
|
|
278
|
-
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
279
|
-
var renderProps = useNProgress(restProps);
|
|
280
|
-
return children(renderProps);
|
|
281
|
-
};
|
|
282
|
-
|
|
283
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
284
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
285
|
-
function withNProgress(BaseComponent) {
|
|
286
|
-
var WithNProgress = function WithNProgress(props) {
|
|
287
|
-
var hookProps = useNProgress(props);
|
|
288
|
-
return jsx(BaseComponent, _objectSpread(_objectSpread({}, props), hookProps));
|
|
289
|
-
};
|
|
290
|
-
hoistNonReactStatics(WithNProgress, BaseComponent);
|
|
291
|
-
return WithNProgress;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
export { NProgress, useNProgress, withNProgress };
|
|
295
|
-
//# sourceMappingURL=react-nprogress.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"react-nprogress.esm.js","sources":["../compiled/clamp.js","../compiled/createQueue.js","../compiled/createTimeout.js","../compiled/increment.js","../compiled/useEffectOnce.js","../compiled/useGetSetState.js","../compiled/useUpdateEffect.js","../compiled/useNProgress.js","../compiled/NProgress.js","../compiled/withNProgress.js"],"sourcesContent":["export const clamp = (num, lower, upper) => {\n num = num <= upper ? num : upper;\n num = num >= lower ? num : lower;\n return num;\n};\n","export const createQueue = () => {\n let isRunning = false;\n let pending = [];\n const next = () => {\n isRunning = true;\n const cb = pending.shift();\n if (cb) {\n return cb(next);\n }\n isRunning = false;\n };\n const clear = () => {\n isRunning = false;\n pending = [];\n };\n const enqueue = (cb) => {\n pending.push(cb);\n if (!isRunning && pending.length === 1) {\n next();\n }\n };\n return {\n clear,\n enqueue,\n };\n};\n","// Uses requestAnimationFrame rather than setTimeout for smoother animation\n// timing. Note that rAF is throttled or paused in background tabs, so progress\n// will stall when the tab is hidden and resume when it regains focus.\nexport const createTimeout = () => {\n let handle;\n const cancel = () => {\n if (handle !== undefined) {\n window.cancelAnimationFrame(handle);\n }\n };\n const schedule = (callback, delay) => {\n cancel();\n let deltaTime;\n let start;\n const frame = (time) => {\n start = start || time;\n deltaTime = time - start;\n if (deltaTime > delay) {\n callback();\n return;\n }\n handle = window.requestAnimationFrame(frame);\n };\n handle = window.requestAnimationFrame(frame);\n };\n return {\n cancel,\n schedule,\n };\n};\n","import { clamp } from './clamp';\nexport const increment = (progress) => {\n let amount = 0;\n if (progress >= 0 && progress < 0.2) {\n amount = 0.1;\n }\n else if (progress >= 0.2 && progress < 0.5) {\n amount = 0.04;\n }\n else if (progress >= 0.5 && progress < 0.8) {\n amount = 0.02;\n }\n else if (progress >= 0.8 && progress < 0.99) {\n amount = 0.005;\n }\n return clamp(progress + amount, 0, 0.994);\n};\n","// Hat-tip:\n// https://github.com/streamich/react-use/blob/master/src/useEffectOnce.ts.\n//\n// `react-use` appears to be unmaintained, so moving the required code into\n// this project for now.\nimport { useEffect } from 'react';\nexport const useEffectOnce = (effect) => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useEffect(effect, []);\n};\n","// Hat-tip:\n// https://github.com/streamich/react-use/blob/master/src/useGetSetState.ts.\n//\n// `react-use` appears to be unmaintained, so moving the required code into\n// this project for now.\nimport { useCallback, useReducer, useRef } from 'react';\nconst useUpdate = () => {\n const [, update] = useReducer((num) => (num + 1) % 1_000_000, 0);\n return update;\n};\nexport const useGetSetState = (\n/* istanbul ignore next */\ninitialState = {}) => {\n const update = useUpdate();\n const stateRef = useRef({ ...initialState });\n const get = useCallback(() => stateRef.current, []);\n const set = useCallback((patch) => {\n if (!patch) {\n return;\n }\n Object.assign(stateRef.current, patch);\n update();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n return [get, set];\n};\n","// Hat-tip:\n// https://github.com/streamich/react-use/blob/master/src/useUpdateEffect.ts.\n//\n// `react-use` appears to be unmaintained, so moving the required code into\n// this project for now.\nimport { useEffect, useRef } from 'react';\nconst useFirstMountState = () => {\n const isFirstRef = useRef(true);\n // Read and mutated directly during render (rather than in an effect) so\n // the first-mount result is available synchronously on the very first\n // render, before any effect has run.\n /* eslint-disable react-hooks/refs -- intentional, see comment above */\n if (isFirstRef.current) {\n isFirstRef.current = false;\n return true;\n }\n return isFirstRef.current;\n /* eslint-enable react-hooks/refs */\n};\nexport const useUpdateEffect = (effect, deps) => {\n const isFirstMount = useFirstMountState();\n useEffect(() => {\n if (!isFirstMount) {\n return effect();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, deps);\n};\n","import { useCallback, useRef } from 'react';\nimport { clamp } from './clamp';\nimport { createQueue } from './createQueue';\nimport { createTimeout } from './createTimeout';\nimport { increment } from './increment';\nimport { useEffectOnce } from './useEffectOnce';\nimport { useGetSetState } from './useGetSetState';\nimport { useUpdateEffect } from './useUpdateEffect';\n/* istanbul ignore next */\nconst noop = () => undefined;\n// State includes a `sideEffect` callback that bridges imperative queue\n// operations into React's declarative model. Each `setState` stores a callback;\n// `useUpdateEffect` fires it after React commits the update. This lets the\n// queue drive animations and schedule follow-up work without breaking React's\n// rendering lifecycle.\nconst initialState = {\n isFinished: true,\n progress: 0,\n sideEffect: noop,\n};\nexport const useNProgress = ({ animationDuration = 200, incrementDuration = 200, isAnimating = false, minimum = 0.08, } = {}) => {\n const [get, setState] = useGetSetState(initialState);\n const queueRef = useRef(null);\n const timeoutRef = useRef(null);\n useEffectOnce(() => {\n queueRef.current = createQueue();\n timeoutRef.current = createTimeout();\n });\n const cleanup = useCallback(() => {\n timeoutRef.current?.cancel();\n queueRef.current?.clear();\n }, []);\n const set = useCallback((n) => {\n n = clamp(n, minimum, 1);\n // Unlike the original nprogress `done()`, completion does not include a\n // random progress jump before animating to 1. This keeps the primitive\n // predictable; consumers can set a higher progress value before stopping\n // the animation if they want that effect.\n if (n === 1) {\n cleanup();\n queueRef.current?.enqueue((next) => {\n setState({\n progress: n,\n sideEffect: () => timeoutRef.current?.schedule(next, animationDuration),\n });\n });\n queueRef.current?.enqueue(() => {\n setState({ isFinished: true, sideEffect: cleanup });\n });\n return;\n }\n queueRef.current?.enqueue((next) => {\n setState({\n isFinished: false,\n progress: n,\n sideEffect: next,\n });\n });\n }, [animationDuration, cleanup, minimum, queueRef, setState, timeoutRef]);\n const trickle = useCallback(() => {\n set(increment(get().progress));\n }, [get, set]);\n const start = useCallback(() => {\n // The original nprogress calls set(0) - which clamps to `minimum` - before\n // the first trickle. Here, the first trickle starts from increment(0) =\n // 0.1, so the bar appears at max(0.1, minimum) rather than exactly\n // `minimum`. The difference is negligible at the default minimum of 0.08.\n const work = () => {\n trickle();\n queueRef.current?.enqueue((next) => {\n timeoutRef.current?.schedule(() => {\n work();\n next();\n }, incrementDuration);\n });\n };\n work();\n }, [incrementDuration, queueRef, timeoutRef, trickle]);\n const sideEffect = get().sideEffect;\n useEffectOnce(() => {\n if (isAnimating) {\n start();\n }\n return cleanup;\n });\n useUpdateEffect(() => {\n get().sideEffect();\n }, [get, sideEffect]);\n useUpdateEffect(() => {\n if (!isAnimating) {\n set(1);\n }\n else {\n setState({\n ...initialState,\n sideEffect: start,\n });\n }\n }, [isAnimating, set, setState, start]);\n return {\n animationDuration,\n isFinished: get().isFinished,\n progress: get().progress,\n };\n};\n","import { useNProgress } from './useNProgress';\nexport const NProgress = ({ children, ...restProps }) => {\n const renderProps = useNProgress(restProps);\n return children(renderProps);\n};\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport { useNProgress } from './useNProgress';\nexport function withNProgress(BaseComponent) {\n const WithNProgress = (props) => {\n const hookProps = useNProgress(props);\n return _jsx(BaseComponent, { ...props, ...hookProps });\n };\n hoistNonReactStatics(WithNProgress, BaseComponent);\n return WithNProgress;\n}\n"],"names":["clamp","num","lower","upper","createQueue","isRunning","pending","next","cb","shift","clear","enqueue","push","length","createTimeout","handle","cancel","undefined","window","cancelAnimationFrame","schedule","callback","delay","deltaTime","start","frame","time","requestAnimationFrame","increment","progress","amount","useEffectOnce","effect","useEffect","useUpdate","_useReducer","useReducer","_useReducer2","_slicedToArray","update","useGetSetState","initialState","arguments","stateRef","useRef","_objectSpread","get","useCallback","current","set","patch","Object","assign","useFirstMountState","isFirstRef","useUpdateEffect","deps","isFirstMount","noop","isFinished","sideEffect","useNProgress","_ref","_ref$animationDuratio","animationDuration","_ref$incrementDuratio","incrementDuration","_ref$isAnimating","isAnimating","_ref$minimum","minimum","_useGetSetState","_useGetSetState2","setState","queueRef","timeoutRef","cleanup","_timeoutRef$current","_queueRef$current","n","_queueRef$current4","_queueRef$current2","_queueRef$current3","_timeoutRef$current2","trickle","work","_queueRef$current5","_timeoutRef$current3","NProgress","children","restProps","_objectWithoutProperties","_excluded","renderProps","withNProgress","BaseComponent","WithNProgress","props","hookProps","_jsx","hoistNonReactStatics"],"mappings":";;;;;;;AAAO,IAAMA,KAAK,GAAG,SAARA,KAAKA,CAAIC,GAAG,EAAEC,KAAK,EAAEC,KAAK,EAAK;AACxCF,EAAAA,GAAG,GAAGA,GAAG,IAAIE,KAAK,GAAGF,GAAG,GAAGE,KAAK;AAChCF,EAAAA,GAAG,GAAGA,GAAG,IAAIC,KAAK,GAAGD,GAAG,GAAGC,KAAK;AAChC,EAAA,OAAOD,GAAG;AACd,CAAC;;ACJM,IAAMG,WAAW,GAAG,SAAdA,WAAWA,GAAS;EAC7B,IAAIC,SAAS,GAAG,KAAK;EACrB,IAAIC,OAAO,GAAG,EAAE;AAChB,EAAA,IAAMC,KAAI,GAAG,SAAPA,IAAIA,GAAS;AACfF,IAAAA,SAAS,GAAG,IAAI;AAChB,IAAA,IAAMG,EAAE,GAAGF,OAAO,CAACG,KAAK,EAAE;AAC1B,IAAA,IAAID,EAAE,EAA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