@molecule/app-routing-react-router 1.2.2 → 1.2.3
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/README.md +20 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
|
|
|
3
3
|
Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
|
|
4
4
|
Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
|
|
5
5
|
To change this document, edit the module-level JSDoc in src/index.ts.
|
|
6
|
-
Generated: 2026-11-
|
|
6
|
+
Generated: 2026-11-08T06:10:19.355Z
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
9
|
# @molecule/app-routing-react-router
|
|
@@ -412,18 +412,22 @@ interface RouteLocation {
|
|
|
412
412
|
* Current pathname.
|
|
413
413
|
*/
|
|
414
414
|
pathname: string
|
|
415
|
+
|
|
415
416
|
/**
|
|
416
417
|
* Query string (including leading ?).
|
|
417
418
|
*/
|
|
418
419
|
search: string
|
|
420
|
+
|
|
419
421
|
/**
|
|
420
422
|
* Hash (including leading #).
|
|
421
423
|
*/
|
|
422
424
|
hash: string
|
|
425
|
+
|
|
423
426
|
/**
|
|
424
427
|
* State data passed with navigation.
|
|
425
428
|
*/
|
|
426
429
|
state?: unknown
|
|
430
|
+
|
|
427
431
|
/**
|
|
428
432
|
* Unique key for this location.
|
|
429
433
|
*/
|
|
@@ -441,14 +445,17 @@ interface RouteMatch<Params extends RouteParams = RouteParams> {
|
|
|
441
445
|
* Route path pattern.
|
|
442
446
|
*/
|
|
443
447
|
path: string
|
|
448
|
+
|
|
444
449
|
/**
|
|
445
450
|
* Matched URL pathname.
|
|
446
451
|
*/
|
|
447
452
|
pathname: string
|
|
453
|
+
|
|
448
454
|
/**
|
|
449
455
|
* Route parameters.
|
|
450
456
|
*/
|
|
451
457
|
params: Params
|
|
458
|
+
|
|
452
459
|
/**
|
|
453
460
|
* Whether this is an exact match.
|
|
454
461
|
*/
|
|
@@ -466,14 +473,17 @@ interface NavigateOptions {
|
|
|
466
473
|
* Replace current history entry instead of pushing.
|
|
467
474
|
*/
|
|
468
475
|
replace?: boolean
|
|
476
|
+
|
|
469
477
|
/**
|
|
470
478
|
* State to pass with navigation.
|
|
471
479
|
*/
|
|
472
480
|
state?: unknown
|
|
481
|
+
|
|
473
482
|
/**
|
|
474
483
|
* Preserve current query params.
|
|
475
484
|
*/
|
|
476
485
|
preserveQuery?: boolean
|
|
486
|
+
|
|
477
487
|
/**
|
|
478
488
|
* Preserve current hash.
|
|
479
489
|
*/
|
|
@@ -491,26 +501,32 @@ interface RouteDefinition {
|
|
|
491
501
|
* Route path pattern.
|
|
492
502
|
*/
|
|
493
503
|
path: string
|
|
504
|
+
|
|
494
505
|
/**
|
|
495
506
|
* Route name (for named routes).
|
|
496
507
|
*/
|
|
497
508
|
name?: string
|
|
509
|
+
|
|
498
510
|
/**
|
|
499
511
|
* Whether the route requires exact matching.
|
|
500
512
|
*/
|
|
501
513
|
exact?: boolean
|
|
514
|
+
|
|
502
515
|
/**
|
|
503
516
|
* Whether the route requires authentication.
|
|
504
517
|
*/
|
|
505
518
|
requiresAuth?: boolean
|
|
519
|
+
|
|
506
520
|
/**
|
|
507
521
|
* Required roles/permissions.
|
|
508
522
|
*/
|
|
509
523
|
roles?: string[]
|
|
524
|
+
|
|
510
525
|
/**
|
|
511
526
|
* Route metadata.
|
|
512
527
|
*/
|
|
513
528
|
meta?: Record<string, unknown>
|
|
529
|
+
|
|
514
530
|
/**
|
|
515
531
|
* Child routes.
|
|
516
532
|
*/
|
|
@@ -528,10 +544,12 @@ interface RouterConfig {
|
|
|
528
544
|
* Router mode.
|
|
529
545
|
*/
|
|
530
546
|
mode?: 'history' | 'hash' | 'memory'
|
|
547
|
+
|
|
531
548
|
/**
|
|
532
549
|
* Base path.
|
|
533
550
|
*/
|
|
534
551
|
basePath?: string
|
|
552
|
+
|
|
535
553
|
/**
|
|
536
554
|
* Initial routes.
|
|
537
555
|
*/
|
|
@@ -618,14 +636,7 @@ type QueryParams = Record<string, string | string[] | undefined>
|
|
|
618
636
|
Navigation guard result.
|
|
619
637
|
|
|
620
638
|
```typescript
|
|
621
|
-
type GuardResult =
|
|
622
|
-
| boolean
|
|
623
|
-
| string
|
|
624
|
-
| {
|
|
625
|
-
path: string
|
|
626
|
-
replace?: boolean
|
|
627
|
-
}
|
|
628
|
-
| void
|
|
639
|
+
type GuardResult = boolean | string | { path: string; replace?: boolean } | void
|
|
629
640
|
```
|
|
630
641
|
|
|
631
642
|
#### `NavigationGuard`
|