@angular/router 21.0.1 → 21.1.0-next.0

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v21.0.1
2
+ * @license Angular v21.1.0-next.0
3
3
  * (c) 2010-2025 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
@@ -28,7 +28,7 @@ function mapToResolve(provider) {
28
28
  return (...params) => inject(provider).resolve(...params);
29
29
  }
30
30
 
31
- const VERSION = /* @__PURE__ */new Version('21.0.1');
31
+ const VERSION = /* @__PURE__ */new Version('21.1.0-next.0');
32
32
 
33
33
  export { VERSION, mapToCanActivate, mapToCanActivateChild, mapToCanDeactivate, mapToCanMatch, mapToResolve };
34
34
  //# sourceMappingURL=router.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"router.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/packages/router/src/utils/functional_guards.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/packages/router/src/version.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {inject, Type} from '@angular/core';\n\nimport {\n CanActivate,\n CanActivateChild,\n CanActivateChildFn,\n CanActivateFn,\n CanDeactivate,\n CanDeactivateFn,\n CanMatch,\n CanMatchFn,\n Resolve,\n ResolveFn,\n} from '../models';\n\n/**\n * Maps an array of injectable classes with canMatch functions to an array of equivalent\n * `CanMatchFn` for use in a `Route` definition.\n *\n * Usage {@example router/utils/functional_guards.ts region='CanActivate'}\n *\n * @publicApi\n * @see {@link Route}\n */\nexport function mapToCanMatch(providers: Array<Type<CanMatch>>): CanMatchFn[] {\n return providers.map(\n (provider) =>\n (...params) =>\n inject(provider).canMatch(...params),\n );\n}\n\n/**\n * Maps an array of injectable classes with canActivate functions to an array of equivalent\n * `CanActivateFn` for use in a `Route` definition.\n *\n * Usage {@example router/utils/functional_guards.ts region='CanActivate'}\n *\n * @publicApi\n * @see {@link Route}\n */\nexport function mapToCanActivate(providers: Array<Type<CanActivate>>): CanActivateFn[] {\n return providers.map(\n (provider) =>\n (...params) =>\n inject(provider).canActivate(...params),\n );\n}\n/**\n * Maps an array of injectable classes with canActivateChild functions to an array of equivalent\n * `CanActivateChildFn` for use in a `Route` definition.\n *\n * Usage {@example router/utils/functional_guards.ts region='CanActivate'}\n *\n * @publicApi\n * @see {@link Route}\n */\nexport function mapToCanActivateChild(\n providers: Array<Type<CanActivateChild>>,\n): CanActivateChildFn[] {\n return providers.map(\n (provider) =>\n (...params) =>\n inject(provider).canActivateChild(...params),\n );\n}\n/**\n * Maps an array of injectable classes with canDeactivate functions to an array of equivalent\n * `CanDeactivateFn` for use in a `Route` definition.\n *\n * Usage {@example router/utils/functional_guards.ts region='CanActivate'}\n *\n * @publicApi\n * @see {@link Route}\n */\nexport function mapToCanDeactivate<T = unknown>(\n providers: Array<Type<CanDeactivate<T>>>,\n): CanDeactivateFn<T>[] {\n return providers.map(\n (provider) =>\n (...params) =>\n inject(provider).canDeactivate(...params),\n );\n}\n/**\n * Maps an injectable class with a resolve function to an equivalent `ResolveFn`\n * for use in a `Route` definition.\n *\n * Usage {@example router/utils/functional_guards.ts region='Resolve'}\n *\n * @publicApi\n * @see {@link Route}\n */\nexport function mapToResolve<T>(provider: Type<Resolve<T>>): ResolveFn<T> {\n return (...params) => inject(provider).resolve(...params);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the router package.\n */\n\nimport {Version} from '@angular/core';\n\n/**\n * @publicApi\n */\nexport const VERSION = /* @__PURE__ */ new Version('21.0.1');\n"],"names":["mapToCanMatch","providers","map","provider","params","inject","canMatch","mapToCanActivate","canActivate","mapToCanActivateChild","canActivateChild","mapToCanDeactivate","canDeactivate","mapToResolve","resolve","VERSION","Version"],"mappings":";;;;;;;;;;;;;;AAgCM,SAAUA,aAAaA,CAACC,SAAgC,EAAA;EAC5D,OAAOA,SAAS,CAACC,GAAG,CACjBC,QAAQ,IACP,CAAC,GAAGC,MAAM,KACRC,MAAM,CAACF,QAAQ,CAAC,CAACG,QAAQ,CAAC,GAAGF,MAAM,CAAC,CACzC;AACH;AAWM,SAAUG,gBAAgBA,CAACN,SAAmC,EAAA;EAClE,OAAOA,SAAS,CAACC,GAAG,CACjBC,QAAQ,IACP,CAAC,GAAGC,MAAM,KACRC,MAAM,CAACF,QAAQ,CAAC,CAACK,WAAW,CAAC,GAAGJ,MAAM,CAAC,CAC5C;AACH;AAUM,SAAUK,qBAAqBA,CACnCR,SAAwC,EAAA;EAExC,OAAOA,SAAS,CAACC,GAAG,CACjBC,QAAQ,IACP,CAAC,GAAGC,MAAM,KACRC,MAAM,CAACF,QAAQ,CAAC,CAACO,gBAAgB,CAAC,GAAGN,MAAM,CAAC,CACjD;AACH;AAUM,SAAUO,kBAAkBA,CAChCV,SAAwC,EAAA;EAExC,OAAOA,SAAS,CAACC,GAAG,CACjBC,QAAQ,IACP,CAAC,GAAGC,MAAM,KACRC,MAAM,CAACF,QAAQ,CAAC,CAACS,aAAa,CAAC,GAAGR,MAAM,CAAC,CAC9C;AACH;AAUM,SAAUS,YAAYA,CAAIV,QAA0B,EAAA;AACxD,EAAA,OAAO,CAAC,GAAGC,MAAM,KAAKC,MAAM,CAACF,QAAQ,CAAC,CAACW,OAAO,CAAC,GAAGV,MAAM,CAAC;AAC3D;;ACpFO,MAAMW,OAAO,kBAAmB,IAAIC,OAAO,CAAC,mBAAmB;;;;"}
1
+ {"version":3,"file":"router.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/packages/router/src/utils/functional_guards.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/packages/router/src/version.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {inject, Type} from '@angular/core';\n\nimport {\n CanActivate,\n CanActivateChild,\n CanActivateChildFn,\n CanActivateFn,\n CanDeactivate,\n CanDeactivateFn,\n CanMatch,\n CanMatchFn,\n Resolve,\n ResolveFn,\n} from '../models';\n\n/**\n * Maps an array of injectable classes with canMatch functions to an array of equivalent\n * `CanMatchFn` for use in a `Route` definition.\n *\n * Usage {@example router/utils/functional_guards.ts region='CanActivate'}\n *\n * @publicApi\n * @see {@link Route}\n */\nexport function mapToCanMatch(providers: Array<Type<CanMatch>>): CanMatchFn[] {\n return providers.map(\n (provider) =>\n (...params) =>\n inject(provider).canMatch(...params),\n );\n}\n\n/**\n * Maps an array of injectable classes with canActivate functions to an array of equivalent\n * `CanActivateFn` for use in a `Route` definition.\n *\n * Usage {@example router/utils/functional_guards.ts region='CanActivate'}\n *\n * @publicApi\n * @see {@link Route}\n */\nexport function mapToCanActivate(providers: Array<Type<CanActivate>>): CanActivateFn[] {\n return providers.map(\n (provider) =>\n (...params) =>\n inject(provider).canActivate(...params),\n );\n}\n/**\n * Maps an array of injectable classes with canActivateChild functions to an array of equivalent\n * `CanActivateChildFn` for use in a `Route` definition.\n *\n * Usage {@example router/utils/functional_guards.ts region='CanActivate'}\n *\n * @publicApi\n * @see {@link Route}\n */\nexport function mapToCanActivateChild(\n providers: Array<Type<CanActivateChild>>,\n): CanActivateChildFn[] {\n return providers.map(\n (provider) =>\n (...params) =>\n inject(provider).canActivateChild(...params),\n );\n}\n/**\n * Maps an array of injectable classes with canDeactivate functions to an array of equivalent\n * `CanDeactivateFn` for use in a `Route` definition.\n *\n * Usage {@example router/utils/functional_guards.ts region='CanActivate'}\n *\n * @publicApi\n * @see {@link Route}\n */\nexport function mapToCanDeactivate<T = unknown>(\n providers: Array<Type<CanDeactivate<T>>>,\n): CanDeactivateFn<T>[] {\n return providers.map(\n (provider) =>\n (...params) =>\n inject(provider).canDeactivate(...params),\n );\n}\n/**\n * Maps an injectable class with a resolve function to an equivalent `ResolveFn`\n * for use in a `Route` definition.\n *\n * Usage {@example router/utils/functional_guards.ts region='Resolve'}\n *\n * @publicApi\n * @see {@link Route}\n */\nexport function mapToResolve<T>(provider: Type<Resolve<T>>): ResolveFn<T> {\n return (...params) => inject(provider).resolve(...params);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the router package.\n */\n\nimport {Version} from '@angular/core';\n\n/**\n * @publicApi\n */\nexport const VERSION = /* @__PURE__ */ new Version('21.1.0-next.0');\n"],"names":["mapToCanMatch","providers","map","provider","params","inject","canMatch","mapToCanActivate","canActivate","mapToCanActivateChild","canActivateChild","mapToCanDeactivate","canDeactivate","mapToResolve","resolve","VERSION","Version"],"mappings":";;;;;;;;;;;;;;AAgCM,SAAUA,aAAaA,CAACC,SAAgC,EAAA;EAC5D,OAAOA,SAAS,CAACC,GAAG,CACjBC,QAAQ,IACP,CAAC,GAAGC,MAAM,KACRC,MAAM,CAACF,QAAQ,CAAC,CAACG,QAAQ,CAAC,GAAGF,MAAM,CAAC,CACzC;AACH;AAWM,SAAUG,gBAAgBA,CAACN,SAAmC,EAAA;EAClE,OAAOA,SAAS,CAACC,GAAG,CACjBC,QAAQ,IACP,CAAC,GAAGC,MAAM,KACRC,MAAM,CAACF,QAAQ,CAAC,CAACK,WAAW,CAAC,GAAGJ,MAAM,CAAC,CAC5C;AACH;AAUM,SAAUK,qBAAqBA,CACnCR,SAAwC,EAAA;EAExC,OAAOA,SAAS,CAACC,GAAG,CACjBC,QAAQ,IACP,CAAC,GAAGC,MAAM,KACRC,MAAM,CAACF,QAAQ,CAAC,CAACO,gBAAgB,CAAC,GAAGN,MAAM,CAAC,CACjD;AACH;AAUM,SAAUO,kBAAkBA,CAChCV,SAAwC,EAAA;EAExC,OAAOA,SAAS,CAACC,GAAG,CACjBC,QAAQ,IACP,CAAC,GAAGC,MAAM,KACRC,MAAM,CAACF,QAAQ,CAAC,CAACS,aAAa,CAAC,GAAGR,MAAM,CAAC,CAC9C;AACH;AAUM,SAAUS,YAAYA,CAAIV,QAA0B,EAAA;AACxD,EAAA,OAAO,CAAC,GAAGC,MAAM,KAAKC,MAAM,CAACF,QAAQ,CAAC,CAACW,OAAO,CAAC,GAAGV,MAAM,CAAC;AAC3D;;ACpFO,MAAMW,OAAO,kBAAmB,IAAIC,OAAO,CAAC,mBAAmB;;;;"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v21.0.1
2
+ * @license Angular v21.1.0-next.0
3
3
  * (c) 2010-2025 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
@@ -33,7 +33,7 @@ class RouterTestingModule {
33
33
  }
34
34
  static ɵfac = i0.ɵɵngDeclareFactory({
35
35
  minVersion: "12.0.0",
36
- version: "21.0.1",
36
+ version: "21.1.0-next.0",
37
37
  ngImport: i0,
38
38
  type: RouterTestingModule,
39
39
  deps: [],
@@ -41,14 +41,14 @@ class RouterTestingModule {
41
41
  });
42
42
  static ɵmod = i0.ɵɵngDeclareNgModule({
43
43
  minVersion: "14.0.0",
44
- version: "21.0.1",
44
+ version: "21.1.0-next.0",
45
45
  ngImport: i0,
46
46
  type: RouterTestingModule,
47
47
  exports: [RouterModule]
48
48
  });
49
49
  static ɵinj = i0.ɵɵngDeclareInjector({
50
50
  minVersion: "12.0.0",
51
- version: "21.0.1",
51
+ version: "21.1.0-next.0",
52
52
  ngImport: i0,
53
53
  type: RouterTestingModule,
54
54
  providers: [ROUTER_PROVIDERS, provideLocationMocks(), withPreloading(NoPreloading).ɵproviders, {
@@ -61,7 +61,7 @@ class RouterTestingModule {
61
61
  }
62
62
  i0.ɵɵngDeclareClassMetadata({
63
63
  minVersion: "12.0.0",
64
- version: "21.0.1",
64
+ version: "21.1.0-next.0",
65
65
  ngImport: i0,
66
66
  type: RouterTestingModule,
67
67
  decorators: [{
@@ -97,7 +97,7 @@ class RootFixtureService {
97
97
  }
98
98
  static ɵfac = i0.ɵɵngDeclareFactory({
99
99
  minVersion: "12.0.0",
100
- version: "21.0.1",
100
+ version: "21.1.0-next.0",
101
101
  ngImport: i0,
102
102
  type: RootFixtureService,
103
103
  deps: [],
@@ -105,7 +105,7 @@ class RootFixtureService {
105
105
  });
106
106
  static ɵprov = i0.ɵɵngDeclareInjectable({
107
107
  minVersion: "12.0.0",
108
- version: "21.0.1",
108
+ version: "21.1.0-next.0",
109
109
  ngImport: i0,
110
110
  type: RootFixtureService,
111
111
  providedIn: 'root'
@@ -113,7 +113,7 @@ class RootFixtureService {
113
113
  }
114
114
  i0.ɵɵngDeclareClassMetadata({
115
115
  minVersion: "12.0.0",
116
- version: "21.0.1",
116
+ version: "21.1.0-next.0",
117
117
  ngImport: i0,
118
118
  type: RootFixtureService,
119
119
  decorators: [{
@@ -132,7 +132,7 @@ class RootCmp {
132
132
  });
133
133
  static ɵfac = i0.ɵɵngDeclareFactory({
134
134
  minVersion: "12.0.0",
135
- version: "21.0.1",
135
+ version: "21.1.0-next.0",
136
136
  ngImport: i0,
137
137
  type: RootCmp,
138
138
  deps: [],
@@ -140,7 +140,7 @@ class RootCmp {
140
140
  });
141
141
  static ɵcmp = i0.ɵɵngDeclareComponent({
142
142
  minVersion: "14.0.0",
143
- version: "21.0.1",
143
+ version: "21.1.0-next.0",
144
144
  type: RootCmp,
145
145
  isStandalone: true,
146
146
  selector: "ng-component",
@@ -165,7 +165,7 @@ class RootCmp {
165
165
  }
166
166
  i0.ɵɵngDeclareClassMetadata({
167
167
  minVersion: "12.0.0",
168
- version: "21.0.1",
168
+ version: "21.1.0-next.0",
169
169
  ngImport: i0,
170
170
  type: RootCmp,
171
171
  decorators: [{
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v21.0.1
2
+ * @license Angular v21.1.0-next.0
3
3
  * (c) 2010-2025 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/router",
3
- "version": "21.0.1",
3
+ "version": "21.1.0-next.0",
4
4
  "description": "Angular - the routing library",
5
5
  "keywords": [
6
6
  "angular",
@@ -23,10 +23,13 @@
23
23
  "dependencies": {
24
24
  "tslib": "^2.3.0"
25
25
  },
26
+ "devDependencies": {
27
+ "@types/dom-navigation": "^1.0.5"
28
+ },
26
29
  "peerDependencies": {
27
- "@angular/core": "21.0.1",
28
- "@angular/common": "21.0.1",
29
- "@angular/platform-browser": "21.0.1",
30
+ "@angular/core": "21.1.0-next.0",
31
+ "@angular/common": "21.1.0-next.0",
32
+ "@angular/platform-browser": "21.1.0-next.0",
30
33
  "rxjs": "^6.5.3 || ^7.4.0"
31
34
  },
32
35
  "ng-update": {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v21.0.1
2
+ * @license Angular v21.1.0-next.0
3
3
  * (c) 2010-2025 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
@@ -1746,6 +1746,19 @@ interface NavigationBehaviorOptions {
1746
1746
  * state, such as `skipLocationChange`.
1747
1747
  */
1748
1748
  readonly browserUrl?: UrlTree | string;
1749
+ /**
1750
+ * Configures how scrolling is handled for an individual navigation when scroll restoration
1751
+ * is enabled in the router.
1752
+ *
1753
+ * - When 'manual', the router will not perform scrolling when the navigation is complete,
1754
+ * even if scroll restoration is enabled.
1755
+ * - When 'after-transition', scrolling will be performed after the `NavigationEnd` event,
1756
+ * according to the behavior configured in the router scrolling feature.
1757
+ *
1758
+ * @see withInMemoryRouterScroller
1759
+ * @see InMemoryScrollingOptions
1760
+ */
1761
+ readonly scroll?: 'manual' | 'after-transition';
1749
1762
  }
1750
1763
 
1751
1764
  declare class Tree<T> {
@@ -2515,6 +2528,8 @@ declare class Scroll {
2515
2528
  readonly position: [number, number] | null;
2516
2529
  /** @docsNotRequired */
2517
2530
  readonly anchor: string | null;
2531
+ /** @docsNotRequired */
2532
+ readonly scrollBehavior?: "manual" | "after-transition" | undefined;
2518
2533
  readonly type = EventType.Scroll;
2519
2534
  constructor(
2520
2535
  /** @docsNotRequired */
@@ -2522,7 +2537,9 @@ declare class Scroll {
2522
2537
  /** @docsNotRequired */
2523
2538
  position: [number, number] | null,
2524
2539
  /** @docsNotRequired */
2525
- anchor: string | null);
2540
+ anchor: string | null,
2541
+ /** @docsNotRequired */
2542
+ scrollBehavior?: "manual" | "after-transition" | undefined);
2526
2543
  toString(): string;
2527
2544
  }
2528
2545
  /**
@@ -3803,9 +3820,11 @@ interface RouterConfigOptions {
3803
3820
  }
3804
3821
  /**
3805
3822
  * Configuration options for the scrolling feature which can be used with `withInMemoryScrolling`
3806
- * function.
3823
+ * function or `RouterModule.forRoot`.
3807
3824
  *
3808
3825
  * @publicApi
3826
+ * @see withInMemoryScrolling
3827
+ * @see RouterModule#forRoot
3809
3828
  */
3810
3829
  interface InMemoryScrollingOptions {
3811
3830
  /**
package/types/router.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v21.0.1
2
+ * @license Angular v21.1.0-next.0
3
3
  * (c) 2010-2025 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v21.0.1
2
+ * @license Angular v21.1.0-next.0
3
3
  * (c) 2010-2025 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v21.0.1
2
+ * @license Angular v21.1.0-next.0
3
3
  * (c) 2010-2025 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */