@angular/platform-browser 16.0.0-next.6 → 16.0.0-rc.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 v16.0.0-next.6
2
+ * @license Angular v16.0.0-rc.0
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -194,15 +194,15 @@ const platformBrowserTesting = createPlatformFactory(platformCore, 'browserTesti
194
194
  * @publicApi
195
195
  */
196
196
  class BrowserTestingModule {
197
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.6", ngImport: i0, type: BrowserTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
198
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-next.6", ngImport: i0, type: BrowserTestingModule, exports: [BrowserModule] }); }
199
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-next.6", ngImport: i0, type: BrowserTestingModule, providers: [
197
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.0", ngImport: i0, type: BrowserTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
198
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-rc.0", ngImport: i0, type: BrowserTestingModule, exports: [BrowserModule] }); }
199
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-rc.0", ngImport: i0, type: BrowserTestingModule, providers: [
200
200
  { provide: APP_ID, useValue: 'a' },
201
201
  provideZoneChangeDetection(),
202
202
  { provide: PlatformLocation, useClass: MockPlatformLocation },
203
203
  ], imports: [BrowserModule] }); }
204
204
  }
205
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.6", ngImport: i0, type: BrowserTestingModule, decorators: [{
205
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.0", ngImport: i0, type: BrowserTestingModule, decorators: [{
206
206
  type: NgModule,
207
207
  args: [{
208
208
  exports: [BrowserModule],
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v16.0.0-next.6
2
+ * @license Angular v16.0.0-rc.0
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -10,6 +10,7 @@ import { ApplicationRef } from '@angular/core';
10
10
  import { ComponentRef } from '@angular/core';
11
11
  import { DebugElement } from '@angular/core';
12
12
  import { DebugNode } from '@angular/core';
13
+ import { EnvironmentProviders } from '@angular/core';
13
14
  import { GetTestability } from '@angular/core';
14
15
  import * as i0 from '@angular/core';
15
16
  import * as i1 from '@angular/common';
@@ -137,20 +138,6 @@ export declare class BrowserModule {
137
138
  static ɵinj: i0.ɵɵInjectorDeclaration<BrowserModule>;
138
139
  }
139
140
 
140
- /**
141
- * NgModule to install on the client side while using the `TransferState` to transfer state from
142
- * server to client.
143
- *
144
- * @publicApi
145
- * @deprecated no longer needed, you can inject the `TransferState` in an app without providing
146
- * this module.
147
- */
148
- export declare class BrowserTransferStateModule {
149
- static ɵfac: i0.ɵɵFactoryDeclaration<BrowserTransferStateModule, never>;
150
- static ɵmod: i0.ɵɵNgModuleDeclaration<BrowserTransferStateModule, never, never, never>;
151
- static ɵinj: i0.ɵɵInjectorDeclaration<BrowserTransferStateModule>;
152
- }
153
-
154
141
  /**
155
142
  * Predicates for use with {@link DebugElement}'s query functions.
156
143
  *
@@ -469,6 +456,29 @@ export declare class HammerModule {
469
456
  static ɵinj: i0.ɵɵInjectorDeclaration<HammerModule>;
470
457
  }
471
458
 
459
+ /**
460
+ * Helper type to represent a Hydration feature.
461
+ *
462
+ * @publicApi
463
+ * @developerPreview
464
+ */
465
+ export declare interface HydrationFeature<FeatureKind extends HydrationFeatureKind> {
466
+ ɵkind: FeatureKind;
467
+ ɵproviders: Provider[];
468
+ }
469
+
470
+ /**
471
+ * The list of features as an enum to uniquely type each `HydrationFeature`.
472
+ * @see HydrationFeature
473
+ *
474
+ * @publicApi
475
+ * @developerPreview
476
+ */
477
+ export declare const enum HydrationFeatureKind {
478
+ NoDomReuseFeature = 0,
479
+ NoHttpTransferCache = 1
480
+ }
481
+
472
482
  /**
473
483
  * Create a `StateKey<T>` that can be used to store value of type T with `TransferState`.
474
484
  *
@@ -607,6 +617,45 @@ export declare type MetaDefinition = {
607
617
  */
608
618
  export declare const platformBrowser: (extraProviders?: StaticProvider[]) => PlatformRef;
609
619
 
620
+ /**
621
+ * Sets up providers necessary to enable hydration functionality for the application.
622
+ * By default, the function enables the recommended set of features for the optimal
623
+ * performance for most of the applications. You can enable/disable features by
624
+ * passing special functions (from the `HydrationFeatures` set) as arguments to the
625
+ * `provideClientHydration` function.
626
+ *
627
+ * @usageNotes
628
+ *
629
+ * Basic example of how you can enable hydration in your application when
630
+ * `bootstrapApplication` function is used:
631
+ * ```
632
+ * bootstrapApplication(AppComponent, {
633
+ * providers: [provideClientHydration()]
634
+ * });
635
+ * ```
636
+ *
637
+ * Alternatively if you are using NgModules, you would add `provideClientHydration`
638
+ * to your root app module's provider list.
639
+ * ```
640
+ * @NgModule({
641
+ * declarations: [RootCmp],
642
+ * bootstrap: [RootCmp],
643
+ * providers: [provideClientHydration()],
644
+ * })
645
+ * export class AppModule {}
646
+ * ```
647
+ *
648
+ * @see `withNoDomReuse`
649
+ * @see `withNoHttpTransferCache`
650
+ *
651
+ * @param features Optional features to configure additional router behaviors.
652
+ * @returns A set of providers to enable hydration.
653
+ *
654
+ * @publicApi
655
+ * @developerPreview
656
+ */
657
+ export declare function provideClientHydration(...features: HydrationFeature<HydrationFeatureKind>[]): EnvironmentProviders;
658
+
610
659
  /**
611
660
  * Returns a set of providers required to setup [Testability](api/core/Testability) for an
612
661
  * application bootstrapped using the `bootstrapApplication` function. The set of providers is
@@ -748,6 +797,24 @@ export declare const TransferState: {
748
797
  */
749
798
  export declare const VERSION: Version;
750
799
 
800
+ /**
801
+ * Disables DOM nodes reuse during hydration. Effectively makes
802
+ * Angular re-render an application from scratch on the client.
803
+ *
804
+ * @publicApi
805
+ * @developerPreview
806
+ */
807
+ export declare function withNoDomReuse(): HydrationFeature<HydrationFeatureKind.NoDomReuseFeature>;
808
+
809
+ /**
810
+ * Disables HTTP transfer cache. Effectively causes HTTP requests to be performed twice: once on the
811
+ * server and other one on the browser.
812
+ *
813
+ * @publicApi
814
+ * @developerPreview
815
+ */
816
+ export declare function withNoHttpTransferCache(): HydrationFeature<HydrationFeatureKind.NoHttpTransferCache>;
817
+
751
818
  /**
752
819
  * A `DomAdapter` powered by full browser DOM APIs.
753
820
  *
@@ -787,20 +854,22 @@ export declare class ɵDomEventsPlugin extends EventManagerPlugin {
787
854
  }
788
855
 
789
856
  export declare class ɵDomRendererFactory2 implements RendererFactory2, OnDestroy {
790
- private eventManager;
791
- private sharedStylesHost;
792
- private appId;
857
+ private readonly eventManager;
858
+ private readonly sharedStylesHost;
859
+ private readonly appId;
793
860
  private removeStylesOnCompDestory;
794
- private nonce?;
795
- private rendererByCompId;
796
- private defaultRenderer;
797
- constructor(eventManager: EventManager, sharedStylesHost: ɵSharedStylesHost, appId: string, removeStylesOnCompDestory: boolean, nonce?: string | null | undefined);
861
+ private readonly doc;
862
+ readonly platformId: Object;
863
+ readonly ngZone: NgZone;
864
+ private readonly nonce;
865
+ private readonly rendererByCompId;
866
+ private readonly defaultRenderer;
867
+ private readonly platformIsServer;
868
+ constructor(eventManager: EventManager, sharedStylesHost: ɵSharedStylesHost, appId: string, removeStylesOnCompDestory: boolean, doc: Document, platformId: Object, ngZone: NgZone, nonce?: string | null);
798
869
  createRenderer(element: any, type: RendererType2 | null): Renderer2;
799
870
  private getOrCreateRenderer;
800
871
  ngOnDestroy(): void;
801
- begin(): void;
802
- end(): void;
803
- static ɵfac: i0.ɵɵFactoryDeclaration<ɵDomRendererFactory2, [null, null, null, null, { optional: true; }]>;
872
+ static ɵfac: i0.ɵɵFactoryDeclaration<ɵDomRendererFactory2, never>;
804
873
  static ɵprov: i0.ɵɵInjectableDeclaration<ɵDomRendererFactory2>;
805
874
  }
806
875
 
@@ -902,10 +971,6 @@ export declare class ɵKeyEventsPlugin extends EventManagerPlugin {
902
971
  static ɵprov: i0.ɵɵInjectableDeclaration<ɵKeyEventsPlugin>;
903
972
  }
904
973
 
905
- export declare const ɵNAMESPACE_URIS: {
906
- [ns: string]: string;
907
- };
908
-
909
974
  export declare class ɵSharedStylesHost implements OnDestroy {
910
975
  private readonly doc;
911
976
  private readonly appId;
@@ -933,10 +998,4 @@ export declare class ɵSharedStylesHost implements OnDestroy {
933
998
  static ɵprov: i0.ɵɵInjectableDeclaration<ɵSharedStylesHost>;
934
999
  }
935
1000
 
936
- export declare function ɵshimContentAttribute(componentShortId: string): string;
937
-
938
- export declare function ɵshimHostAttribute(componentShortId: string): string;
939
-
940
- export declare function ɵshimStyles(compId: string, styles: string[]): string[];
941
-
942
1001
  export { }
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@angular/platform-browser",
3
- "version": "16.0.0-next.6",
3
+ "version": "16.0.0-rc.0",
4
4
  "description": "Angular - library for using Angular in a web browser",
5
5
  "author": "angular",
6
6
  "license": "MIT",
7
7
  "engines": {
8
- "node": "^16.13.0 || >=18.10.0"
8
+ "node": "^16.14.0 || >=18.10.0"
9
9
  },
10
10
  "dependencies": {
11
11
  "tslib": "^2.3.0"
12
12
  },
13
13
  "peerDependencies": {
14
- "@angular/animations": "16.0.0-next.6",
15
- "@angular/core": "16.0.0-next.6",
16
- "@angular/common": "16.0.0-next.6"
14
+ "@angular/animations": "16.0.0-rc.0",
15
+ "@angular/core": "16.0.0-rc.0",
16
+ "@angular/common": "16.0.0-rc.0"
17
17
  },
18
18
  "peerDependenciesMeta": {
19
19
  "@angular/animations": {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v16.0.0-next.6
2
+ * @license Angular v16.0.0-rc.0
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,28 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- import { NgModule } from '@angular/core';
9
- import * as i0 from "@angular/core";
10
- /**
11
- * NgModule to install on the client side while using the `TransferState` to transfer state from
12
- * server to client.
13
- *
14
- * @publicApi
15
- * @deprecated no longer needed, you can inject the `TransferState` in an app without providing
16
- * this module.
17
- */
18
- class BrowserTransferStateModule {
19
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.6", ngImport: i0, type: BrowserTransferStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
20
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-next.6", ngImport: i0, type: BrowserTransferStateModule }); }
21
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-next.6", ngImport: i0, type: BrowserTransferStateModule }); }
22
- }
23
- export { BrowserTransferStateModule };
24
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.6", ngImport: i0, type: BrowserTransferStateModule, decorators: [{
25
- type: NgModule,
26
- args: [{}]
27
- }] });
28
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNmZXJfc3RhdGVfbW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvcGxhdGZvcm0tYnJvd3Nlci9zcmMvYnJvd3Nlci90cmFuc2Zlcl9zdGF0ZV9tb2R1bGUudHMiXSwibmFtZXMiOltdLC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