@resistdesign/voltra 3.0.0-alpha.19 → 3.0.0-alpha.20

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/native/index.js CHANGED
@@ -1185,11 +1185,15 @@ var createNativeHistory = (options = {}) => {
1185
1185
  if (!adapter) {
1186
1186
  return;
1187
1187
  }
1188
- const initialURL = await adapter.getInitialURL();
1189
- applyIncomingURL(initialURL);
1188
+ const startKey = history.location.key;
1189
+ const startIndex = history.index;
1190
1190
  unsubscribe = adapter.subscribe((url) => {
1191
1191
  applyIncomingURL(url);
1192
1192
  });
1193
+ const initialURL = await adapter.getInitialURL();
1194
+ if (history.location.key === startKey && history.index === startIndex) {
1195
+ applyIncomingURL(initialURL);
1196
+ }
1193
1197
  },
1194
1198
  stop: () => {
1195
1199
  if (!started) {
@@ -75,7 +75,10 @@ export declare const mapNativeURLToPath: (url: string) => string;
75
75
  * Lifecycle behavior:
76
76
  * - `start()` is idempotent.
77
77
  * - `stop()` is idempotent.
78
- * - `start()` applies `getInitialURL()` once per start cycle.
78
+ * - `start()` applies `getInitialURL()` once per start cycle only if
79
+ * navigation state has not changed since startup began.
80
+ * - This prevents late `getInitialURL()` resolution from overriding
81
+ * user navigation that happened during startup.
79
82
  *
80
83
  * Incoming URL behavior:
81
84
  * - `"replace"` updates current entry (default).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@resistdesign/voltra",
3
- "version": "3.0.0-alpha.19",
3
+ "version": "3.0.0-alpha.20",
4
4
  "description": "With our powers combined!",
5
5
  "homepage": "https://voltra.app",
6
6
  "repository": "git@github.com:resistdesign/voltra.git",