@hotwired/turbo 7.2.3 → 7.2.4
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/dist/turbo.es2017-esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Turbo 7.2.
|
|
2
|
+
Turbo 7.2.4
|
|
3
3
|
Copyright © 2022 37signals LLC
|
|
4
4
|
*/
|
|
5
5
|
(function () {
|
|
@@ -1869,6 +1869,7 @@ class Visit {
|
|
|
1869
1869
|
this.render(async () => {
|
|
1870
1870
|
this.cacheSnapshot();
|
|
1871
1871
|
this.performScroll();
|
|
1872
|
+
this.changeHistory();
|
|
1872
1873
|
this.adapter.visitRendered(this);
|
|
1873
1874
|
});
|
|
1874
1875
|
}
|
|
@@ -2277,7 +2278,6 @@ class Navigator {
|
|
|
2277
2278
|
}
|
|
2278
2279
|
}
|
|
2279
2280
|
startVisit(locatable, restorationIdentifier, options = {}) {
|
|
2280
|
-
this.lastVisit = this.currentVisit;
|
|
2281
2281
|
this.stop();
|
|
2282
2282
|
this.currentVisit = new Visit(this, expandURL(locatable), restorationIdentifier, Object.assign({ referrer: this.location }, options));
|
|
2283
2283
|
this.currentVisit.start();
|
|
@@ -2359,13 +2359,11 @@ class Navigator {
|
|
|
2359
2359
|
this.delegate.visitCompleted(visit);
|
|
2360
2360
|
}
|
|
2361
2361
|
locationWithActionIsSamePage(location, action) {
|
|
2362
|
-
var _a;
|
|
2363
2362
|
const anchor = getAnchor(location);
|
|
2364
|
-
const
|
|
2365
|
-
const currentAnchor = getAnchor(lastLocation);
|
|
2363
|
+
const currentAnchor = getAnchor(this.view.lastRenderedLocation);
|
|
2366
2364
|
const isRestorationToTop = action === "restore" && typeof anchor === "undefined";
|
|
2367
2365
|
return (action !== "replace" &&
|
|
2368
|
-
getRequestURL(location) === getRequestURL(
|
|
2366
|
+
getRequestURL(location) === getRequestURL(this.view.lastRenderedLocation) &&
|
|
2369
2367
|
(isRestorationToTop || (anchor != null && anchor !== currentAnchor)));
|
|
2370
2368
|
}
|
|
2371
2369
|
visitScrolledToSamePageLocation(oldURL, newURL) {
|
package/dist/turbo.es2017-umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Turbo 7.2.
|
|
2
|
+
Turbo 7.2.4
|
|
3
3
|
Copyright © 2022 37signals LLC
|
|
4
4
|
*/
|
|
5
5
|
(function (global, factory) {
|
|
@@ -1875,6 +1875,7 @@ Copyright © 2022 37signals LLC
|
|
|
1875
1875
|
this.render(async () => {
|
|
1876
1876
|
this.cacheSnapshot();
|
|
1877
1877
|
this.performScroll();
|
|
1878
|
+
this.changeHistory();
|
|
1878
1879
|
this.adapter.visitRendered(this);
|
|
1879
1880
|
});
|
|
1880
1881
|
}
|
|
@@ -2283,7 +2284,6 @@ Copyright © 2022 37signals LLC
|
|
|
2283
2284
|
}
|
|
2284
2285
|
}
|
|
2285
2286
|
startVisit(locatable, restorationIdentifier, options = {}) {
|
|
2286
|
-
this.lastVisit = this.currentVisit;
|
|
2287
2287
|
this.stop();
|
|
2288
2288
|
this.currentVisit = new Visit(this, expandURL(locatable), restorationIdentifier, Object.assign({ referrer: this.location }, options));
|
|
2289
2289
|
this.currentVisit.start();
|
|
@@ -2365,13 +2365,11 @@ Copyright © 2022 37signals LLC
|
|
|
2365
2365
|
this.delegate.visitCompleted(visit);
|
|
2366
2366
|
}
|
|
2367
2367
|
locationWithActionIsSamePage(location, action) {
|
|
2368
|
-
var _a;
|
|
2369
2368
|
const anchor = getAnchor(location);
|
|
2370
|
-
const
|
|
2371
|
-
const currentAnchor = getAnchor(lastLocation);
|
|
2369
|
+
const currentAnchor = getAnchor(this.view.lastRenderedLocation);
|
|
2372
2370
|
const isRestorationToTop = action === "restore" && typeof anchor === "undefined";
|
|
2373
2371
|
return (action !== "replace" &&
|
|
2374
|
-
getRequestURL(location) === getRequestURL(
|
|
2372
|
+
getRequestURL(location) === getRequestURL(this.view.lastRenderedLocation) &&
|
|
2375
2373
|
(isRestorationToTop || (anchor != null && anchor !== currentAnchor)));
|
|
2376
2374
|
}
|
|
2377
2375
|
visitScrolledToSamePageLocation(oldURL, newURL) {
|
|
@@ -12,7 +12,6 @@ export declare class Navigator {
|
|
|
12
12
|
readonly delegate: NavigatorDelegate;
|
|
13
13
|
formSubmission?: FormSubmission;
|
|
14
14
|
currentVisit?: Visit;
|
|
15
|
-
lastVisit?: Visit;
|
|
16
15
|
constructor(delegate: NavigatorDelegate);
|
|
17
16
|
proposeVisit(location: URL, options?: Partial<VisitOptions>): void;
|
|
18
17
|
startVisit(locatable: Locatable, restorationIdentifier: string, options?: Partial<VisitOptions>): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hotwired/turbo",
|
|
3
|
-
"version": "7.2.
|
|
3
|
+
"version": "7.2.4",
|
|
4
4
|
"description": "The speed of a single-page web application without having to write any JavaScript",
|
|
5
5
|
"module": "dist/turbo.es2017-esm.js",
|
|
6
6
|
"main": "dist/turbo.es2017-umd.js",
|
|
@@ -64,8 +64,7 @@
|
|
|
64
64
|
"test:browser": "playwright test",
|
|
65
65
|
"test:unit": "NODE_OPTIONS=--inspect node src/tests/runner.js",
|
|
66
66
|
"test:unit:win": "SET NODE_OPTIONS=--inspect & node src/tests/runner.js",
|
|
67
|
-
"
|
|
68
|
-
"release": "npm publish && git commit -am \"$npm_package_name v$npm_package_version\" && git push",
|
|
67
|
+
"release": "yarn build && npm publish",
|
|
69
68
|
"lint": "eslint . --ext .ts"
|
|
70
69
|
},
|
|
71
70
|
"engines": {
|