@angular/platform-browser 22.0.0-next.4 → 22.0.0-next.5

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,12 +1,12 @@
1
1
  /**
2
- * @license Angular v22.0.0-next.4
2
+ * @license Angular v22.0.0-next.5
3
3
  * (c) 2010-2026 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
6
6
 
7
7
  export { BootstrapContext, BrowserModule, bootstrapApplication, createApplication, platformBrowser, provideProtractorTestingSupport } from './_browser-chunk.js';
8
8
  import * as i0 from '@angular/core';
9
- import { ComponentRef, Predicate, DebugNode, DebugElement, Type, ListenerOptions, InjectionToken, NgZone, OnDestroy, RendererFactory2, ɵTracingService as _TracingService, ɵTracingSnapshot as _TracingSnapshot, RendererType2, Renderer2, Injector, Sanitizer, SecurityContext, Provider, EnvironmentProviders, GetTestability, TestabilityRegistry, Testability, Version } from '@angular/core';
9
+ import { ComponentRef, Predicate, DebugNode, DebugElement, Type, ListenerOptions, InjectionToken, NgZone, OnDestroy, RendererFactory2, ɵTracingService as _TracingService, ɵTracingSnapshot as _TracingSnapshot, RendererType2, Renderer2, Provider, EnvironmentProviders, Sanitizer, SecurityContext, GetTestability, TestabilityRegistry, Testability, Version } from '@angular/core';
10
10
  import { HttpTransferCacheOptions } from '@angular/common/http';
11
11
  import { ɵDomAdapter as _DomAdapter } from '@angular/common';
12
12
  export { ɵgetDOM } from '@angular/common';
@@ -356,133 +356,137 @@ declare class DomRendererFactory2 implements RendererFactory2, OnDestroy {
356
356
  }
357
357
 
358
358
  /**
359
- * DI token for providing [HammerJS](https://hammerjs.github.io/) support to Angular.
360
- * @see {@link HammerGestureConfig}
359
+ * The list of features as an enum to uniquely type each `HydrationFeature`.
360
+ * @see {@link HydrationFeature}
361
361
  *
362
- * @ngModule HammerModule
363
362
  * @publicApi
364
- *
365
- * @deprecated The HammerJS integration is deprecated. Replace it by your own implementation.
366
363
  */
367
- declare const HAMMER_GESTURE_CONFIG: InjectionToken<HammerGestureConfig>;
364
+ declare enum HydrationFeatureKind {
365
+ NoHttpTransferCache = 0,
366
+ HttpTransferCacheOptions = 1,
367
+ I18nSupport = 2,
368
+ EventReplay = 3,
369
+ IncrementalHydration = 4
370
+ }
368
371
  /**
369
- * Function that loads HammerJS, returning a promise that is resolved once HammerJs is loaded.
372
+ * Helper type to represent a Hydration feature.
370
373
  *
371
374
  * @publicApi
375
+ */
376
+ interface HydrationFeature<FeatureKind extends HydrationFeatureKind> {
377
+ ɵkind: FeatureKind;
378
+ ɵproviders: Provider[];
379
+ }
380
+ /**
381
+ * Disables HTTP transfer cache. Effectively causes HTTP requests to be performed twice: once on the
382
+ * server and other one on the browser.
383
+ *
384
+ * @see [Disabling Caching](guide/ssr#disabling-caching)
372
385
  *
373
- * @deprecated The hammerjs integration is deprecated. Replace it by your own implementation.
386
+ * @publicApi
374
387
  */
375
- type HammerLoader = () => Promise<void>;
388
+ declare function withNoHttpTransferCache(): HydrationFeature<HydrationFeatureKind.NoHttpTransferCache>;
376
389
  /**
377
- * Injection token used to provide a HammerLoader to Angular.
390
+ * The function accepts an object, which allows to configure cache parameters,
391
+ * such as which headers should be included (no headers are included by default),
392
+ * whether POST requests should be cached or a callback function to determine if a
393
+ * particular request should be cached.
378
394
  *
379
- * @see {@link HammerLoader}
395
+ * @see [Configuring HTTP transfer cache options](guide/ssr#caching-data-when-using-httpclient)
380
396
  *
381
397
  * @publicApi
398
+ */
399
+ declare function withHttpTransferCacheOptions(options: HttpTransferCacheOptions): HydrationFeature<HydrationFeatureKind.HttpTransferCacheOptions>;
400
+ /**
401
+ * Enables support for hydrating i18n blocks.
382
402
  *
383
- * @deprecated The HammerJS integration is deprecated. Replace it by your own implementation.
403
+ * @publicApi 20.0
384
404
  */
385
- declare const HAMMER_LOADER: InjectionToken<HammerLoader>;
386
- interface HammerInstance {
387
- on(eventName: string, callback?: Function): void;
388
- off(eventName: string, callback?: Function): void;
389
- destroy?(): void;
390
- }
405
+ declare function withI18nSupport(): HydrationFeature<HydrationFeatureKind.I18nSupport>;
391
406
  /**
392
- * An injectable [HammerJS Manager](https://hammerjs.github.io/api/#hammermanager)
393
- * for gesture recognition. Configures specific event recognition.
394
- * @publicApi
407
+ * Enables support for replaying user events (e.g. `click`s) that happened on a page
408
+ * before hydration logic has completed. Once an application is hydrated, all captured
409
+ * events are replayed and relevant event listeners are executed.
410
+ *
411
+ * @usageNotes
395
412
  *
396
- * @deprecated The HammerJS integration is deprecated. Replace it by your own implementation.
413
+ * Basic example of how you can enable event replay in your application when
414
+ * `bootstrapApplication` function is used:
415
+ * ```ts
416
+ * bootstrapApplication(AppComponent, {
417
+ * providers: [provideClientHydration(withEventReplay())]
418
+ * });
419
+ * ```
420
+ * @publicApi
421
+ * @see {@link provideClientHydration}
397
422
  */
398
- declare class HammerGestureConfig {
399
- /**
400
- * A set of supported event names for gestures to be used in Angular.
401
- * Angular supports all built-in recognizers, as listed in
402
- * [HammerJS documentation](https://hammerjs.github.io/).
403
- */
404
- events: string[];
405
- /**
406
- * Maps gesture event names to a set of configuration options
407
- * that specify overrides to the default values for specific properties.
408
- *
409
- * The key is a supported event name to be configured,
410
- * and the options object contains a set of properties, with override values
411
- * to be applied to the named recognizer event.
412
- * For example, to disable recognition of the rotate event, specify
413
- * `{"rotate": {"enable": false}}`.
414
- *
415
- * Properties that are not present take the HammerJS default values.
416
- * For information about which properties are supported for which events,
417
- * and their allowed and default values, see
418
- * [HammerJS documentation](https://hammerjs.github.io/).
419
- *
420
- */
421
- overrides: {
422
- [key: string]: Object;
423
- };
424
- /**
425
- * Properties whose default values can be overridden for a given event.
426
- * Different sets of properties apply to different events.
427
- * For information about which properties are supported for which events,
428
- * and their allowed and default values, see
429
- * [HammerJS documentation](https://hammerjs.github.io/).
430
- */
431
- options?: {
432
- cssProps?: any;
433
- domEvents?: boolean;
434
- enable?: boolean | ((manager: any) => boolean);
435
- preset?: any[];
436
- touchAction?: string;
437
- recognizers?: any[];
438
- inputClass?: any;
439
- inputTarget?: EventTarget;
440
- };
441
- /**
442
- * Creates a [HammerJS Manager](https://hammerjs.github.io/api/#hammermanager)
443
- * and attaches it to a given HTML element.
444
- * @param element The element that will recognize gestures.
445
- * @returns A HammerJS event-manager object.
446
- */
447
- buildHammer(element: HTMLElement): HammerInstance;
448
- static ɵfac: i0.ɵɵFactoryDeclaration<HammerGestureConfig, never>;
449
- static ɵprov: i0.ɵɵInjectableDeclaration<HammerGestureConfig>;
450
- }
423
+ declare function withEventReplay(): HydrationFeature<HydrationFeatureKind.EventReplay>;
451
424
  /**
452
- * Event plugin that adds Hammer support to an application.
425
+ * Enables support for incremental hydration using the `hydrate` trigger syntax.
453
426
  *
454
- * @ngModule HammerModule
427
+ * @usageNotes
428
+ *
429
+ * Basic example of how you can enable incremental hydration in your application when
430
+ * the `bootstrapApplication` function is used:
431
+ * ```ts
432
+ * bootstrapApplication(AppComponent, {
433
+ * providers: [provideClientHydration(withIncrementalHydration())]
434
+ * });
435
+ * ```
436
+ * @publicApi 20.0
437
+ * @see {@link provideClientHydration}
455
438
  */
456
- declare class HammerGesturesPlugin extends EventManagerPlugin {
457
- private _config;
458
- private _injector;
459
- private loader?;
460
- private _loaderPromise;
461
- constructor(doc: any, _config: HammerGestureConfig, _injector: Injector, loader?: (HammerLoader | null) | undefined);
462
- supports(eventName: string): boolean;
463
- addEventListener(element: HTMLElement, eventName: string, handler: Function): Function;
464
- isCustomEvent(eventName: string): boolean;
465
- static ɵfac: i0.ɵɵFactoryDeclaration<HammerGesturesPlugin, [null, null, null, { optional: true; }]>;
466
- static ɵprov: i0.ɵɵInjectableDeclaration<HammerGesturesPlugin>;
467
- }
439
+ declare function withIncrementalHydration(): HydrationFeature<HydrationFeatureKind.IncrementalHydration>;
468
440
  /**
469
- * Adds support for HammerJS.
441
+ * Sets up providers necessary to enable hydration functionality for the application.
442
+ *
443
+ * By default, the function enables the recommended set of features for the optimal
444
+ * performance for most of the applications. It includes the following features:
445
+ *
446
+ * * Reconciling DOM hydration. Learn more about it [here](guide/hydration).
447
+ * * [`HttpClient`](api/common/http/HttpClient) response caching while running on the server and
448
+ * transferring this cache to the client to avoid extra HTTP requests. Learn more about data caching
449
+ * [here](guide/ssr#caching-data-when-using-httpclient).
470
450
  *
471
- * Import this module at the root of your application so that Angular can work with
472
- * HammerJS to detect gesture events.
451
+ * These functions allow you to disable some of the default features or enable new ones:
473
452
  *
474
- * Note that applications still need to include the HammerJS script itself. This module
475
- * simply sets up the coordination layer between HammerJS and Angular's `EventManager`.
453
+ * * {@link withNoHttpTransferCache} to disable HTTP transfer cache
454
+ * * {@link withHttpTransferCacheOptions} to configure some HTTP transfer cache options
455
+ * * {@link withI18nSupport} to enable hydration support for i18n blocks
456
+ * * {@link withEventReplay} to enable support for replaying user events
476
457
  *
477
- * @publicApi
458
+ * @usageNotes
478
459
  *
479
- * @deprecated The hammer integration is deprecated. Replace it by your own implementation.
460
+ * Basic example of how you can enable hydration in your application when
461
+ * `bootstrapApplication` function is used:
462
+ * ```ts
463
+ * bootstrapApplication(AppComponent, {
464
+ * providers: [provideClientHydration()]
465
+ * });
466
+ * ```
467
+ *
468
+ * Alternatively if you are using NgModules, you would add `provideClientHydration`
469
+ * to your root app module's provider list.
470
+ * ```ts
471
+ * @NgModule({
472
+ * declarations: [RootCmp],
473
+ * bootstrap: [RootCmp],
474
+ * providers: [provideClientHydration()],
475
+ * })
476
+ * export class AppModule {}
477
+ * ```
478
+ *
479
+ * @see {@link withNoHttpTransferCache}
480
+ * @see {@link withHttpTransferCacheOptions}
481
+ * @see {@link withI18nSupport}
482
+ * @see {@link withEventReplay}
483
+ *
484
+ * @param features Optional features to configure additional hydration behaviors.
485
+ * @returns A set of providers to enable hydration.
486
+ *
487
+ * @publicApi 17.0
480
488
  */
481
- declare class HammerModule {
482
- static ɵfac: i0.ɵɵFactoryDeclaration<HammerModule, never>;
483
- static ɵmod: i0.ɵɵNgModuleDeclaration<HammerModule, never, never, never>;
484
- static ɵinj: i0.ɵɵInjectorDeclaration<HammerModule>;
485
- }
489
+ declare function provideClientHydration(...features: HydrationFeature<HydrationFeatureKind>[]): EnvironmentProviders;
486
490
 
487
491
  /**
488
492
  * Marker interface for a value that's safe to use in a particular context.
@@ -623,139 +627,6 @@ declare class DomSanitizerImpl extends DomSanitizer {
623
627
  static ɵprov: i0.ɵɵInjectableDeclaration<DomSanitizerImpl>;
624
628
  }
625
629
 
626
- /**
627
- * The list of features as an enum to uniquely type each `HydrationFeature`.
628
- * @see {@link HydrationFeature}
629
- *
630
- * @publicApi
631
- */
632
- declare enum HydrationFeatureKind {
633
- NoHttpTransferCache = 0,
634
- HttpTransferCacheOptions = 1,
635
- I18nSupport = 2,
636
- EventReplay = 3,
637
- IncrementalHydration = 4
638
- }
639
- /**
640
- * Helper type to represent a Hydration feature.
641
- *
642
- * @publicApi
643
- */
644
- interface HydrationFeature<FeatureKind extends HydrationFeatureKind> {
645
- ɵkind: FeatureKind;
646
- ɵproviders: Provider[];
647
- }
648
- /**
649
- * Disables HTTP transfer cache. Effectively causes HTTP requests to be performed twice: once on the
650
- * server and other one on the browser.
651
- *
652
- * @see [Disabling Caching](guide/ssr#disabling-caching)
653
- *
654
- * @publicApi
655
- */
656
- declare function withNoHttpTransferCache(): HydrationFeature<HydrationFeatureKind.NoHttpTransferCache>;
657
- /**
658
- * The function accepts an object, which allows to configure cache parameters,
659
- * such as which headers should be included (no headers are included by default),
660
- * whether POST requests should be cached or a callback function to determine if a
661
- * particular request should be cached.
662
- *
663
- * @see [Configuring HTTP transfer cache options](guide/ssr#caching-data-when-using-httpclient)
664
- *
665
- * @publicApi
666
- */
667
- declare function withHttpTransferCacheOptions(options: HttpTransferCacheOptions): HydrationFeature<HydrationFeatureKind.HttpTransferCacheOptions>;
668
- /**
669
- * Enables support for hydrating i18n blocks.
670
- *
671
- * @publicApi 20.0
672
- */
673
- declare function withI18nSupport(): HydrationFeature<HydrationFeatureKind.I18nSupport>;
674
- /**
675
- * Enables support for replaying user events (e.g. `click`s) that happened on a page
676
- * before hydration logic has completed. Once an application is hydrated, all captured
677
- * events are replayed and relevant event listeners are executed.
678
- *
679
- * @usageNotes
680
- *
681
- * Basic example of how you can enable event replay in your application when
682
- * `bootstrapApplication` function is used:
683
- * ```ts
684
- * bootstrapApplication(AppComponent, {
685
- * providers: [provideClientHydration(withEventReplay())]
686
- * });
687
- * ```
688
- * @publicApi
689
- * @see {@link provideClientHydration}
690
- */
691
- declare function withEventReplay(): HydrationFeature<HydrationFeatureKind.EventReplay>;
692
- /**
693
- * Enables support for incremental hydration using the `hydrate` trigger syntax.
694
- *
695
- * @usageNotes
696
- *
697
- * Basic example of how you can enable incremental hydration in your application when
698
- * the `bootstrapApplication` function is used:
699
- * ```ts
700
- * bootstrapApplication(AppComponent, {
701
- * providers: [provideClientHydration(withIncrementalHydration())]
702
- * });
703
- * ```
704
- * @publicApi 20.0
705
- * @see {@link provideClientHydration}
706
- */
707
- declare function withIncrementalHydration(): HydrationFeature<HydrationFeatureKind.IncrementalHydration>;
708
- /**
709
- * Sets up providers necessary to enable hydration functionality for the application.
710
- *
711
- * By default, the function enables the recommended set of features for the optimal
712
- * performance for most of the applications. It includes the following features:
713
- *
714
- * * Reconciling DOM hydration. Learn more about it [here](guide/hydration).
715
- * * [`HttpClient`](api/common/http/HttpClient) response caching while running on the server and
716
- * transferring this cache to the client to avoid extra HTTP requests. Learn more about data caching
717
- * [here](guide/ssr#caching-data-when-using-httpclient).
718
- *
719
- * These functions allow you to disable some of the default features or enable new ones:
720
- *
721
- * * {@link withNoHttpTransferCache} to disable HTTP transfer cache
722
- * * {@link withHttpTransferCacheOptions} to configure some HTTP transfer cache options
723
- * * {@link withI18nSupport} to enable hydration support for i18n blocks
724
- * * {@link withEventReplay} to enable support for replaying user events
725
- *
726
- * @usageNotes
727
- *
728
- * Basic example of how you can enable hydration in your application when
729
- * `bootstrapApplication` function is used:
730
- * ```ts
731
- * bootstrapApplication(AppComponent, {
732
- * providers: [provideClientHydration()]
733
- * });
734
- * ```
735
- *
736
- * Alternatively if you are using NgModules, you would add `provideClientHydration`
737
- * to your root app module's provider list.
738
- * ```ts
739
- * @NgModule({
740
- * declarations: [RootCmp],
741
- * bootstrap: [RootCmp],
742
- * providers: [provideClientHydration()],
743
- * })
744
- * export class AppModule {}
745
- * ```
746
- *
747
- * @see {@link withNoHttpTransferCache}
748
- * @see {@link withHttpTransferCacheOptions}
749
- * @see {@link withI18nSupport}
750
- * @see {@link withEventReplay}
751
- *
752
- * @param features Optional features to configure additional hydration behaviors.
753
- * @returns A set of providers to enable hydration.
754
- *
755
- * @publicApi 17.0
756
- */
757
- declare function provideClientHydration(...features: HydrationFeature<HydrationFeatureKind>[]): EnvironmentProviders;
758
-
759
630
  /**
760
631
  * A `DomAdapter` powered by full browser DOM APIs.
761
632
  *
@@ -885,5 +756,5 @@ declare const enum RuntimeErrorCode {
885
756
  */
886
757
  declare const VERSION: Version;
887
758
 
888
- export { By, DomSanitizer, EVENT_MANAGER_PLUGINS, EventManager, EventManagerPlugin, HAMMER_GESTURE_CONFIG, HAMMER_LOADER, HammerGestureConfig, HammerModule, HydrationFeatureKind, Meta, REMOVE_STYLES_ON_COMPONENT_DESTROY, Title, VERSION, disableDebugTools, enableDebugTools, provideClientHydration, withEventReplay, withHttpTransferCacheOptions, withI18nSupport, withIncrementalHydration, withNoHttpTransferCache, BrowserDomAdapter as ɵBrowserDomAdapter, BrowserGetTestability as ɵBrowserGetTestability, DomEventsPlugin as ɵDomEventsPlugin, DomRendererFactory2 as ɵDomRendererFactory2, DomSanitizerImpl as ɵDomSanitizerImpl, HammerGesturesPlugin as ɵHammerGesturesPlugin, KeyEventsPlugin as ɵKeyEventsPlugin, RuntimeErrorCode as ɵRuntimeErrorCode, SharedStylesHost as ɵSharedStylesHost };
889
- export type { HammerLoader, HydrationFeature, MetaDefinition, SafeHtml, SafeResourceUrl, SafeScript, SafeStyle, SafeUrl, SafeValue };
759
+ export { By, DomSanitizer, EVENT_MANAGER_PLUGINS, EventManager, EventManagerPlugin, HydrationFeatureKind, Meta, REMOVE_STYLES_ON_COMPONENT_DESTROY, Title, VERSION, disableDebugTools, enableDebugTools, provideClientHydration, withEventReplay, withHttpTransferCacheOptions, withI18nSupport, withIncrementalHydration, withNoHttpTransferCache, BrowserDomAdapter as ɵBrowserDomAdapter, BrowserGetTestability as ɵBrowserGetTestability, DomEventsPlugin as ɵDomEventsPlugin, DomRendererFactory2 as ɵDomRendererFactory2, DomSanitizerImpl as ɵDomSanitizerImpl, KeyEventsPlugin as ɵKeyEventsPlugin, RuntimeErrorCode as ɵRuntimeErrorCode, SharedStylesHost as ɵSharedStylesHost };
760
+ export type { HydrationFeature, MetaDefinition, SafeHtml, SafeResourceUrl, SafeScript, SafeStyle, SafeUrl, SafeValue };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v22.0.0-next.4
2
+ * @license Angular v22.0.0-next.5
3
3
  * (c) 2010-2026 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */