next-nprogress-bar
Advanced tools
Comparing version 2.3.7 to 2.3.8
import React from 'react'; | ||
import { ProgressBarProps, RouterNProgressOptions } from '.'; | ||
import { NavigateOptions } from 'next/dist/shared/lib/app-router-context.shared-runtime'; | ||
export declare const AppProgressBar: React.MemoExoticComponent<({ color, height, options, shallowRouting, startPosition, delay, stopDelayMs, style, targetPreprocessor, }: ProgressBarProps) => React.JSX.Element>; | ||
export declare const AppProgressBar: React.MemoExoticComponent<({ color, height, options, shallowRouting, startPosition, delay, stopDelay, style, targetPreprocessor, }: ProgressBarProps) => React.JSX.Element>; | ||
export declare function useRouter(): { | ||
@@ -6,0 +6,0 @@ push: (href: string, options?: NavigateOptions, NProgressOptions?: RouterNProgressOptions) => void; |
@@ -23,3 +23,3 @@ /// <reference types="react" /> | ||
* @param delay When the page loads faster than the progress bar, it does not display - @default 0 | ||
* @param stopDelayMs Delay to stop the progress bar - @default 0 | ||
* @param stopDelay Delay to stop the progress bar - @default 0 | ||
* @param style Custom css - @default undefined | ||
@@ -36,3 +36,3 @@ * @param shouldCompareComplexProps If you want to compare props in the React.memo return - @default false | ||
delay?: number; | ||
stopDelayMs?: number; | ||
stopDelay?: number; | ||
style?: string; | ||
@@ -39,0 +39,0 @@ shouldCompareComplexProps?: boolean; |
@@ -91,3 +91,3 @@ 'use strict'; | ||
var AppProgressBar$1 = React.memo(function (_a) { | ||
var _b = _a.color, color = _b === void 0 ? '#0A2FFF' : _b, _c = _a.height, height = _c === void 0 ? '2px' : _c, options = _a.options, _d = _a.shallowRouting, shallowRouting = _d === void 0 ? false : _d, _e = _a.startPosition, startPosition = _e === void 0 ? 0 : _e, _f = _a.delay, delay = _f === void 0 ? 0 : _f, _g = _a.stopDelayMs, stopDelayMs = _g === void 0 ? 0 : _g, style = _a.style, targetPreprocessor = _a.targetPreprocessor; | ||
var _b = _a.color, color = _b === void 0 ? '#0A2FFF' : _b, _c = _a.height, height = _c === void 0 ? '2px' : _c, options = _a.options, _d = _a.shallowRouting, shallowRouting = _d === void 0 ? false : _d, _e = _a.startPosition, startPosition = _e === void 0 ? 0 : _e, _f = _a.delay, delay = _f === void 0 ? 0 : _f, _g = _a.stopDelay, stopDelay = _g === void 0 ? 0 : _g, style = _a.style, targetPreprocessor = _a.targetPreprocessor; | ||
var styles = (React.createElement("style", null, style || | ||
@@ -101,3 +101,3 @@ "\n #nprogress {\n pointer-events: none;\n }\n\n #nprogress .bar {\n background: ".concat(color, ";\n\n position: fixed;\n z-index: 1031;\n top: 0;\n left: 0;\n\n width: 100%;\n height: ").concat(height, ";\n }\n\n /* Fancy blur effect */\n #nprogress .peg {\n display: block;\n position: absolute;\n right: 0px;\n width: 100px;\n height: 100%;\n box-shadow: 0 0 10px ").concat(color, ", 0 0 5px ").concat(color, ";\n opacity: 1.0;\n\n -webkit-transform: rotate(3deg) translate(0px, -4px);\n -ms-transform: rotate(3deg) translate(0px, -4px);\n transform: rotate(3deg) translate(0px, -4px);\n }\n\n /* Remove these to get rid of the spinner */\n #nprogress .spinner {\n display: block;\n position: fixed;\n z-index: 1031;\n top: 15px;\n right: 15px;\n }\n\n #nprogress .spinner-icon {\n width: 18px;\n height: 18px;\n box-sizing: border-box;\n\n border: solid 2px transparent;\n border-top-color: ").concat(color, ";\n border-left-color: ").concat(color, ";\n border-radius: 50%;\n\n -webkit-animation: nprogress-spinner 400ms linear infinite;\n animation: nprogress-spinner 400ms linear infinite;\n }\n\n .nprogress-custom-parent {\n overflow: hidden;\n position: relative;\n }\n\n .nprogress-custom-parent #nprogress .spinner,\n .nprogress-custom-parent #nprogress .bar {\n position: absolute;\n }\n\n @-webkit-keyframes nprogress-spinner {\n 0% { -webkit-transform: rotate(0deg); }\n 100% { -webkit-transform: rotate(360deg); }\n }\n @keyframes nprogress-spinner {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n "))); | ||
NProgress.done(true); | ||
}, stopDelayMs); | ||
}, stopDelay); | ||
}, [pathname, searchParams]); | ||
@@ -118,3 +118,3 @@ React.useEffect(function () { | ||
NProgress.done(true); | ||
}, stopDelayMs); | ||
}, stopDelay); | ||
}; | ||
@@ -227,3 +227,3 @@ var handleAnchorClick = function (event) { | ||
var PagesProgressBar = React.memo(function (_a) { | ||
var _b = _a.color, color = _b === void 0 ? '#0A2FFF' : _b, _c = _a.height, height = _c === void 0 ? '2px' : _c, options = _a.options, _d = _a.shallowRouting, shallowRouting = _d === void 0 ? false : _d, _e = _a.startPosition, startPosition = _e === void 0 ? 0 : _e, _f = _a.delay, delay = _f === void 0 ? 0 : _f, _g = _a.stopDelayMs, stopDelayMs = _g === void 0 ? 0 : _g, style = _a.style; | ||
var _b = _a.color, color = _b === void 0 ? '#0A2FFF' : _b, _c = _a.height, height = _c === void 0 ? '2px' : _c, options = _a.options, _d = _a.shallowRouting, shallowRouting = _d === void 0 ? false : _d, _e = _a.startPosition, startPosition = _e === void 0 ? 0 : _e, _f = _a.delay, delay = _f === void 0 ? 0 : _f, _g = _a.stopDelay, stopDelay = _g === void 0 ? 0 : _g, style = _a.style; | ||
var styles = (React.createElement("style", null, style || | ||
@@ -246,3 +246,3 @@ "\n #nprogress {\n pointer-events: none;\n }\n \n #nprogress .bar {\n background: ".concat(color, ";\n \n position: fixed;\n z-index: 1031;\n top: 0;\n left: 0;\n \n width: 100%;\n height: ").concat(height, ";\n }\n \n /* Fancy blur effect */\n #nprogress .peg {\n display: block;\n position: absolute;\n right: 0px;\n width: 100px;\n height: 100%;\n box-shadow: 0 0 10px ").concat(color, ", 0 0 5px ").concat(color, ";\n opacity: 1.0;\n \n -webkit-transform: rotate(3deg) translate(0px, -4px);\n -ms-transform: rotate(3deg) translate(0px, -4px);\n transform: rotate(3deg) translate(0px, -4px);\n }\n \n /* Remove these to get rid of the spinner */\n #nprogress .spinner {\n display: block;\n position: fixed;\n z-index: 1031;\n top: 15px;\n right: 15px;\n }\n \n #nprogress .spinner-icon {\n width: 18px;\n height: 18px;\n box-sizing: border-box;\n \n border: solid 2px transparent;\n border-top-color: ").concat(color, ";\n border-left-color: ").concat(color, ";\n border-radius: 50%;\n \n -webkit-animation: nprogress-spinner 400ms linear infinite;\n animation: nprogress-spinner 400ms linear infinite;\n }\n \n .nprogress-custom-parent {\n overflow: hidden;\n position: relative;\n }\n \n .nprogress-custom-parent #nprogress .spinner,\n .nprogress-custom-parent #nprogress .bar {\n position: absolute;\n }\n \n @-webkit-keyframes nprogress-spinner {\n 0% { -webkit-transform: rotate(0deg); }\n 100% { -webkit-transform: rotate(360deg); }\n }\n @keyframes nprogress-spinner {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n "))); | ||
NProgress.done(true); | ||
}, stopDelayMs); | ||
}, stopDelay); | ||
}; | ||
@@ -249,0 +249,0 @@ var handleRouteStart = function (url) { |
import React from 'react'; | ||
import { ProgressBarProps } from '.'; | ||
export declare const PagesProgressBar: React.MemoExoticComponent<({ color, height, options, shallowRouting, startPosition, delay, stopDelayMs, style, }: Omit<ProgressBarProps, 'targetPreprocessor'>) => React.JSX.Element>; | ||
export declare const PagesProgressBar: React.MemoExoticComponent<({ color, height, options, shallowRouting, startPosition, delay, stopDelay, style, }: Omit<ProgressBarProps, 'targetPreprocessor'>) => React.JSX.Element>; |
{ | ||
"name": "next-nprogress-bar", | ||
"version": "2.3.7", | ||
"version": "2.3.8", | ||
"description": "NextJS progress bar compatible with new app directory", | ||
@@ -5,0 +5,0 @@ "repository": { |
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
65153