@tanstack/history
Advanced tools
Comparing version 1.58.15 to 1.61.0
@@ -6,2 +6,3 @@ export interface NavigateOptions { | ||
location: HistoryLocation; | ||
length: number; | ||
subscribers: Set<() => void>; | ||
@@ -37,2 +38,3 @@ subscribe: (cb: () => void) => () => void; | ||
getLocation: () => HistoryLocation; | ||
getLength: () => number; | ||
pushState: (path: string, state: any) => void; | ||
@@ -39,0 +41,0 @@ replaceState: (path: string, state: any) => void; |
@@ -39,2 +39,5 @@ const pushStateEvent = "pushstate"; | ||
}, | ||
get length() { | ||
return opts.getLength(); | ||
}, | ||
subscribers, | ||
@@ -164,2 +167,3 @@ subscribe: (cb) => { | ||
getLocation, | ||
getLength: () => win.history.length, | ||
pushState: (href, state) => queueHistoryAction("push", href, state), | ||
@@ -221,2 +225,3 @@ replaceState: (href, state) => queueHistoryAction("replace", href, state), | ||
getLocation, | ||
getLength: () => entries.length, | ||
pushState: (path, state) => { | ||
@@ -223,0 +228,0 @@ currentState = state; |
{ | ||
"name": "@tanstack/history", | ||
"version": "1.58.15", | ||
"version": "1.61.0", | ||
"description": "Modern and scalable routing for React applications", | ||
@@ -5,0 +5,0 @@ "author": "Tanner Linsley", |
@@ -10,2 +10,3 @@ // While the public API was clearly inspired by the "history" npm package, | ||
location: HistoryLocation | ||
length: number | ||
subscribers: Set<() => void> | ||
@@ -65,2 +66,3 @@ subscribe: (cb: () => void) => () => void | ||
getLocation: () => HistoryLocation | ||
getLength: () => number | ||
pushState: (path: string, state: any) => void | ||
@@ -107,2 +109,5 @@ replaceState: (path: string, state: any) => void | ||
}, | ||
get length() { | ||
return opts.getLength() | ||
}, | ||
subscribers, | ||
@@ -299,2 +304,3 @@ subscribe: (cb: () => void) => { | ||
getLocation, | ||
getLength: () => win.history.length, | ||
pushState: (href, state) => queueHistoryAction('push', href, state), | ||
@@ -375,3 +381,3 @@ replaceState: (href, state) => queueHistoryAction('replace', href, state), | ||
getLocation, | ||
getLength: () => entries.length, | ||
pushState: (path, state) => { | ||
@@ -378,0 +384,0 @@ currentState = state |
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
73233
1016