@angular/common 20.0.0-next.4 → 20.0.0-next.6

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/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@angular/common",
3
- "version": "20.0.0-next.4",
3
+ "version": "20.0.0-next.6",
4
4
  "description": "Angular - commonly needed directives and services",
5
5
  "author": "angular",
6
6
  "license": "MIT",
7
7
  "engines": {
8
- "node": "^18.19.1 || ^20.11.1 || >=22.0.0"
8
+ "node": "^20.11.1 || >=22.11.0"
9
9
  },
10
10
  "locales": "locales",
11
11
  "dependencies": {
@@ -44,7 +44,7 @@
44
44
  }
45
45
  },
46
46
  "peerDependencies": {
47
- "@angular/core": "20.0.0-next.4",
47
+ "@angular/core": "20.0.0-next.6",
48
48
  "rxjs": "^6.5.3 || ^7.4.0"
49
49
  },
50
50
  "repository": {
@@ -0,0 +1,115 @@
1
+ /**
2
+ * @license Angular v20.0.0-next.6
3
+ * (c) 2010-2025 Google LLC. https://angular.io/
4
+ * License: MIT
5
+ */
6
+
7
+ import * as i0 from '@angular/core';
8
+ import { InjectionToken } from '@angular/core';
9
+
10
+ /**
11
+ * This class should not be used directly by an application developer. Instead, use
12
+ * {@link Location}.
13
+ *
14
+ * `PlatformLocation` encapsulates all calls to DOM APIs, which allows the Router to be
15
+ * platform-agnostic.
16
+ * This means that we can have different implementation of `PlatformLocation` for the different
17
+ * platforms that Angular supports. For example, `@angular/platform-browser` provides an
18
+ * implementation specific to the browser environment, while `@angular/platform-server` provides
19
+ * one suitable for use with server-side rendering.
20
+ *
21
+ * The `PlatformLocation` class is used directly by all implementations of {@link LocationStrategy}
22
+ * when they need to interact with the DOM APIs like pushState, popState, etc.
23
+ *
24
+ * {@link LocationStrategy} in turn is used by the {@link Location} service which is used directly
25
+ * by the {@link /api/router/Router Router} in order to navigate between routes. Since all interactions between
26
+ * {@link /api/router/Router Router} /
27
+ * {@link Location} / {@link LocationStrategy} and DOM APIs flow through the `PlatformLocation`
28
+ * class, they are all platform-agnostic.
29
+ *
30
+ * @publicApi
31
+ */
32
+ declare abstract class PlatformLocation {
33
+ abstract getBaseHrefFromDOM(): string;
34
+ abstract getState(): unknown;
35
+ /**
36
+ * Returns a function that, when executed, removes the `popstate` event handler.
37
+ */
38
+ abstract onPopState(fn: LocationChangeListener): VoidFunction;
39
+ /**
40
+ * Returns a function that, when executed, removes the `hashchange` event handler.
41
+ */
42
+ abstract onHashChange(fn: LocationChangeListener): VoidFunction;
43
+ abstract get href(): string;
44
+ abstract get protocol(): string;
45
+ abstract get hostname(): string;
46
+ abstract get port(): string;
47
+ abstract get pathname(): string;
48
+ abstract get search(): string;
49
+ abstract get hash(): string;
50
+ abstract replaceState(state: any, title: string, url: string): void;
51
+ abstract pushState(state: any, title: string, url: string): void;
52
+ abstract forward(): void;
53
+ abstract back(): void;
54
+ historyGo?(relativePosition: number): void;
55
+ static ɵfac: i0.ɵɵFactoryDeclaration<PlatformLocation, never>;
56
+ static ɵprov: i0.ɵɵInjectableDeclaration<PlatformLocation>;
57
+ }
58
+ /**
59
+ * @description
60
+ * Indicates when a location is initialized.
61
+ *
62
+ * @publicApi
63
+ */
64
+ declare const LOCATION_INITIALIZED: InjectionToken<Promise<any>>;
65
+ /**
66
+ * @description
67
+ * A serializable version of the event from `onPopState` or `onHashChange`
68
+ *
69
+ * @publicApi
70
+ */
71
+ interface LocationChangeEvent {
72
+ type: string;
73
+ state: any;
74
+ }
75
+ /**
76
+ * @publicApi
77
+ */
78
+ interface LocationChangeListener {
79
+ (event: LocationChangeEvent): any;
80
+ }
81
+ /**
82
+ * `PlatformLocation` encapsulates all of the direct calls to platform APIs.
83
+ * This class should not be used directly by an application developer. Instead, use
84
+ * {@link Location}.
85
+ *
86
+ * @publicApi
87
+ */
88
+ declare class BrowserPlatformLocation extends PlatformLocation {
89
+ private _location;
90
+ private _history;
91
+ private _doc;
92
+ constructor();
93
+ getBaseHrefFromDOM(): string;
94
+ onPopState(fn: LocationChangeListener): VoidFunction;
95
+ onHashChange(fn: LocationChangeListener): VoidFunction;
96
+ get href(): string;
97
+ get protocol(): string;
98
+ get hostname(): string;
99
+ get port(): string;
100
+ get pathname(): string;
101
+ get search(): string;
102
+ get hash(): string;
103
+ set pathname(newPath: string);
104
+ pushState(state: any, title: string, url: string): void;
105
+ replaceState(state: any, title: string, url: string): void;
106
+ forward(): void;
107
+ back(): void;
108
+ historyGo(relativePosition?: number): void;
109
+ getState(): unknown;
110
+ static ɵfac: i0.ɵɵFactoryDeclaration<BrowserPlatformLocation, never>;
111
+ static ɵprov: i0.ɵɵInjectableDeclaration<BrowserPlatformLocation>;
112
+ }
113
+
114
+ export { BrowserPlatformLocation, LOCATION_INITIALIZED, PlatformLocation };
115
+ export type { LocationChangeEvent, LocationChangeListener };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v20.0.0-next.4
2
+ * @license Angular v20.0.0-next.6
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -7,8 +7,9 @@
7
7
  import * as i0 from '@angular/core';
8
8
  import { Provider, InjectionToken } from '@angular/core';
9
9
  export { ɵFakeNavigation } from '@angular/core/testing';
10
- import { Location, LocationStrategy, PlatformLocation, LocationChangeListener } from '@angular/common';
10
+ import { Location, LocationStrategy } from '@angular/common';
11
11
  import { SubscriptionLike } from 'rxjs';
12
+ import { PlatformLocation, LocationChangeListener } from '../platform_location.d-Lbv6Ueec.js';
12
13
 
13
14
  /**
14
15
  * Return a provider for the `FakeNavigation` in place of the real Navigation API.
@@ -143,4 +144,5 @@ declare class MockPlatformLocation implements PlatformLocation {
143
144
  */
144
145
  declare function provideLocationMocks(): Provider[];
145
146
 
146
- export { MOCK_PLATFORM_LOCATION_CONFIG, MockLocationStrategy, MockPlatformLocation, type MockPlatformLocationConfig, SpyLocation, provideLocationMocks, provideFakePlatformNavigation as ɵprovideFakePlatformNavigation };
147
+ export { MOCK_PLATFORM_LOCATION_CONFIG, MockLocationStrategy, MockPlatformLocation, SpyLocation, provideLocationMocks, provideFakePlatformNavigation as ɵprovideFakePlatformNavigation };
148
+ export type { MockPlatformLocationConfig };
@@ -1,14 +1,15 @@
1
1
  /**
2
- * @license Angular v20.0.0-next.4
2
+ * @license Angular v20.0.0-next.6
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
6
6
 
7
- import * as i1 from '@angular/common';
8
- import { Location, PlatformLocation, LocationStrategy } from '@angular/common';
7
+ import { Location, LocationStrategy, CommonModule } from '../common_module.d-1Ij4nFjY.js';
8
+ import { PlatformLocation } from '../platform_location.d-Lbv6Ueec.js';
9
9
  import { UpgradeModule } from '@angular/upgrade/static';
10
10
  import * as i0 from '@angular/core';
11
11
  import { InjectionToken, ModuleWithProviders } from '@angular/core';
12
+ import 'rxjs';
12
13
 
13
14
  /**
14
15
  * A codec for encoding and decoding URL parts.
@@ -435,8 +436,9 @@ declare const LOCATION_UPGRADE_CONFIGURATION: InjectionToken<LocationUpgradeConf
435
436
  declare class LocationUpgradeModule {
436
437
  static config(config?: LocationUpgradeConfig): ModuleWithProviders<LocationUpgradeModule>;
437
438
  static ɵfac: i0.ɵɵFactoryDeclaration<LocationUpgradeModule, never>;
438
- static ɵmod: i0.ɵɵNgModuleDeclaration<LocationUpgradeModule, never, [typeof i1.CommonModule], never>;
439
+ static ɵmod: i0.ɵɵNgModuleDeclaration<LocationUpgradeModule, never, [typeof CommonModule], never>;
439
440
  static ɵinj: i0.ɵɵInjectorDeclaration<LocationUpgradeModule>;
440
441
  }
441
442
 
442
- export { $locationShim, $locationShimProvider, AngularJSUrlCodec, LOCATION_UPGRADE_CONFIGURATION, type LocationUpgradeConfig, LocationUpgradeModule, UrlCodec };
443
+ export { $locationShim, $locationShimProvider, AngularJSUrlCodec, LOCATION_UPGRADE_CONFIGURATION, LocationUpgradeModule, UrlCodec };
444
+ export type { LocationUpgradeConfig };
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @license Angular v20.0.0-next.6
3
+ * (c) 2010-2025 Google LLC. https://angular.io/
4
+ * License: MIT
5
+ */
6
+
7
+ /**
8
+ * A wrapper around the `XMLHttpRequest` constructor.
9
+ *
10
+ * @publicApi
11
+ */
12
+ declare abstract class XhrFactory {
13
+ abstract build(): XMLHttpRequest;
14
+ }
15
+
16
+ export { XhrFactory };