@tanstack/router-core 1.171.22 → 1.171.24
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/cjs/new-process-route-tree.cjs +3 -11
- package/dist/cjs/new-process-route-tree.cjs.map +1 -1
- package/dist/cjs/route.cjs.map +1 -1
- package/dist/cjs/route.d.cts +1 -1
- package/dist/cjs/router.cjs +16 -25
- package/dist/cjs/router.cjs.map +1 -1
- package/dist/cjs/utils.cjs +1 -4
- package/dist/cjs/utils.cjs.map +1 -1
- package/dist/esm/new-process-route-tree.js +3 -11
- package/dist/esm/new-process-route-tree.js.map +1 -1
- package/dist/esm/route.d.ts +1 -1
- package/dist/esm/route.js.map +1 -1
- package/dist/esm/router.js +16 -25
- package/dist/esm/router.js.map +1 -1
- package/dist/esm/utils.js +1 -4
- package/dist/esm/utils.js.map +1 -1
- package/package.json +1 -1
- package/src/new-process-route-tree.ts +7 -15
- package/src/route.ts +1 -1
- package/src/router.ts +22 -46
- package/src/utils.ts +2 -6
package/dist/cjs/router.cjs
CHANGED
|
@@ -345,34 +345,25 @@ var RouterCore = class {
|
|
|
345
345
|
unmaskOnReload: dest.unmaskOnReload
|
|
346
346
|
};
|
|
347
347
|
};
|
|
348
|
-
const
|
|
349
|
-
|
|
350
|
-
let maskedNext = maskedDest ? build(maskedDest) : void 0;
|
|
351
|
-
if (!maskedNext) {
|
|
352
|
-
const params = Object.create(null);
|
|
353
|
-
if (this.options.routeMasks) {
|
|
354
|
-
const match = require_new_process_route_tree.findFlatMatch(next.pathname, this.processedTree);
|
|
355
|
-
if (match) {
|
|
356
|
-
Object.assign(params, match.rawParams);
|
|
357
|
-
const { from: _from, params: maskParams, ...maskProps } = match.route;
|
|
358
|
-
const nextParams = resolveNextParams(maskParams, params);
|
|
359
|
-
maskedDest = {
|
|
360
|
-
from: opts.from,
|
|
361
|
-
...maskProps,
|
|
362
|
-
params: nextParams
|
|
363
|
-
};
|
|
364
|
-
maskedNext = build(maskedDest);
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
if (maskedNext) next.maskedLocation = maskedNext;
|
|
369
|
-
return next;
|
|
370
|
-
};
|
|
371
|
-
if (opts.mask) return buildWithMatches(opts, {
|
|
348
|
+
const next = build(opts);
|
|
349
|
+
if (opts.mask) next.maskedLocation = build({
|
|
372
350
|
from: opts.from,
|
|
373
351
|
...opts.mask
|
|
374
352
|
});
|
|
375
|
-
|
|
353
|
+
else if (this.options.routeMasks) {
|
|
354
|
+
const match = require_new_process_route_tree.findFlatMatch(next.pathname, this.processedTree);
|
|
355
|
+
if (match) {
|
|
356
|
+
const params = Object.assign(Object.create(null), match.rawParams);
|
|
357
|
+
const { from: _from, params: maskParams, ...maskProps } = match.route;
|
|
358
|
+
const nextParams = resolveNextParams(maskParams, params);
|
|
359
|
+
next.maskedLocation = build({
|
|
360
|
+
from: opts.from,
|
|
361
|
+
...maskProps,
|
|
362
|
+
params: nextParams
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
return next;
|
|
376
367
|
};
|
|
377
368
|
this.commitLocation = async ({ viewTransition, ignoreBlocker, ...next }) => {
|
|
378
369
|
let historyAction;
|