next-nprogress-bar
Advanced tools
Comparing version 2.3.10 to 2.3.11
@@ -47,5 +47,8 @@ /// <reference types="react" /> | ||
startPosition?: number; | ||
disableSameURL?: boolean; | ||
} | ||
export declare const startProgress: () => void; | ||
export declare const stopProgress: (force?: boolean) => void; | ||
declare const AppProgressBar: (props: ProgressBarProps) => import("react").JSX.Element; | ||
export { AppProgressBar, useRouter }; | ||
export { PagesProgressBar } from './PagesProgressBar'; |
'use strict'; | ||
var NProgress = require('nprogress'); | ||
var React = require('react'); | ||
var NProgress = require('nprogress'); | ||
var navigation = require('next/navigation'); | ||
@@ -211,3 +211,4 @@ var Router = require('next/router'); | ||
var targetUrl = new URL(href, location.href); | ||
if (isSameURL(targetUrl, currentUrl)) | ||
if (isSameURL(targetUrl, currentUrl) && | ||
(NProgressOptions === null || NProgressOptions === void 0 ? void 0 : NProgressOptions.disableSameURL) !== false) | ||
return router.push(href, options); | ||
@@ -304,2 +305,8 @@ startProgress(NProgressOptions === null || NProgressOptions === void 0 ? void 0 : NProgressOptions.startPosition); | ||
var startProgress = function () { | ||
NProgress.start(); | ||
}; | ||
var stopProgress = function (force) { | ||
NProgress.done(force); | ||
}; | ||
var AppProgressBar = withSuspense(AppProgressBar$1); | ||
@@ -309,3 +316,5 @@ | ||
exports.PagesProgressBar = PagesProgressBar; | ||
exports.startProgress = startProgress; | ||
exports.stopProgress = stopProgress; | ||
exports.useRouter = useRouter; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "next-nprogress-bar", | ||
"version": "2.3.10", | ||
"version": "2.3.11", | ||
"description": "NextJS progress bar compatible with new app directory", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -401,2 +401,3 @@ <div align="center"> | ||
startPosition?: number; | ||
disableSameURL?: boolean; | ||
} | ||
@@ -403,0 +404,0 @@ ``` |
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
72972
388
478