@angular/core 19.0.0-next.7 → 19.0.0-next.9

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.
Files changed (33) hide show
  1. package/LICENSE +21 -0
  2. package/fesm2022/core.mjs +363 -156
  3. package/fesm2022/core.mjs.map +1 -1
  4. package/fesm2022/primitives/event-dispatch.mjs +1 -1
  5. package/fesm2022/primitives/signals.mjs +1 -1
  6. package/fesm2022/primitives/signals.mjs.map +1 -1
  7. package/fesm2022/rxjs-interop.mjs +1 -1
  8. package/fesm2022/testing.mjs +6 -4
  9. package/fesm2022/testing.mjs.map +1 -1
  10. package/index.d.ts +107 -69
  11. package/package.json +1 -1
  12. package/primitives/event-dispatch/index.d.ts +1 -1
  13. package/primitives/signals/index.d.ts +5 -1
  14. package/rxjs-interop/index.d.ts +1 -1
  15. package/schematics/bundles/{checker-637eee78.js → checker-3b2ea20f.js} +136 -78
  16. package/schematics/bundles/{compiler_host-1e62b899.js → compiler_host-b4ba5a28.js} +2 -2
  17. package/schematics/bundles/control-flow-migration.js +3 -3
  18. package/schematics/bundles/explicit-standalone-flag.js +5 -5
  19. package/schematics/bundles/group_replacements-e1b5cbf8.js +31571 -0
  20. package/schematics/bundles/{imports-44987700.js → imports-4ac08251.js} +1 -1
  21. package/schematics/bundles/inject-migration.js +24 -8
  22. package/schematics/bundles/{leading_space-6e7a8ec6.js → leading_space-d190b83b.js} +1 -1
  23. package/schematics/bundles/{nodes-b12e919a.js → nodes-0e7d45ca.js} +2 -2
  24. package/schematics/bundles/pending-tasks.js +5 -5
  25. package/schematics/bundles/{program-893e3fe7.js → program-6534a30a.js} +120 -32
  26. package/schematics/bundles/{project_tsconfig_paths-6c9cde78.js → project_tsconfig_paths-e9ccccbf.js} +1 -1
  27. package/schematics/bundles/route-lazy-loading.js +4 -4
  28. package/schematics/bundles/signal-input-migration.js +386 -31727
  29. package/schematics/bundles/signal-queries-migration.js +924 -0
  30. package/schematics/bundles/standalone-migration.js +8 -8
  31. package/schematics/collection.json +6 -0
  32. package/schematics/ng-generate/signal-queries-migration/schema.json +19 -0
  33. package/testing/index.d.ts +3 -1
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v19.0.0-next.7
2
+ * @license Angular v19.0.0-next.9
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -10,12 +10,12 @@ import { EnvironmentProviders as EnvironmentProviders_2 } from '@angular/core';
10
10
  import { EventContract } from '@angular/core/primitives/event-dispatch';
11
11
  import { Observable } from 'rxjs';
12
12
  import { ReactiveNode } from '@angular/core/primitives/signals';
13
- import { SIGNAL } from '@angular/core/primitives/signals';
14
13
  import { SignalNode } from '@angular/core/primitives/signals';
15
14
  import { Subject } from 'rxjs';
16
15
  import { Subscribable } from 'rxjs';
17
16
  import { Subscription } from 'rxjs';
18
17
  import { ɵProfiler as ɵProfiler_2 } from '@angular/core';
18
+ import { SIGNAL as ɵSIGNAL } from '@angular/core/primitives/signals';
19
19
 
20
20
  /**
21
21
  * @description
@@ -503,6 +503,13 @@ export declare interface AfterRenderOptions {
503
503
  * If this is not provided, the current injection context will be used instead (via `inject`).
504
504
  */
505
505
  injector?: Injector;
506
+ /**
507
+ * Whether the hook should require manual cleanup.
508
+ *
509
+ * If this is `false` (the default) the hook will automatically register itself to be cleaned up
510
+ * with the current `DestroyRef`.
511
+ */
512
+ manualCleanup?: boolean;
506
513
  /**
507
514
  * The phase the callback should be invoked in.
508
515
  *
@@ -609,7 +616,7 @@ declare class AfterRenderSequence implements AfterRenderRef {
609
616
  */
610
617
  pipelinedValue: unknown;
611
618
  private unregisterOnDestroy;
612
- constructor(impl: AfterRenderImpl, hooks: AfterRenderHooks, once: boolean, destroyRef: DestroyRef);
619
+ constructor(impl: AfterRenderImpl, hooks: AfterRenderHooks, once: boolean, destroyRef: DestroyRef | null);
613
620
  afterRun(): void;
614
621
  destroy(): void;
615
622
  }
@@ -4334,6 +4341,8 @@ export declare interface ExistingSansProvider {
4334
4341
  useExisting: any;
4335
4342
  }
4336
4343
 
4344
+ declare type ExternalGlobalUtilsFunctions = keyof NgGlobalPublishUtils;
4345
+
4337
4346
  /**
4338
4347
  * Definition of what a factory function should look like.
4339
4348
  */
@@ -4686,21 +4695,6 @@ export declare interface GetTestability {
4686
4695
  * */
4687
4696
  declare const GLOBAL_PUBLISH_EXPANDO_KEY = "ng";
4688
4697
 
4689
- /**
4690
- * This class is the delegate for `EventDelegationPlugin`. It represents the
4691
- * noop version of this class, with the enabled version set when
4692
- * `provideGlobalEventDelegation` is called.
4693
- */
4694
- declare class GlobalEventDelegation implements OnDestroy {
4695
- private eventContractDetails;
4696
- ngOnDestroy(): void;
4697
- supports(eventType: string): boolean;
4698
- addEventListener(element: HTMLElement, eventType: string, handler: Function): Function;
4699
- removeEventListener(element: HTMLElement, eventType: string, callback: Function): void;
4700
- static ɵfac: i0.ɵɵFactoryDeclaration<GlobalEventDelegation, never>;
4701
- static ɵprov: i0.ɵɵInjectableDeclaration<GlobalEventDelegation>;
4702
- }
4703
-
4704
4698
  /**
4705
4699
  * The goal here is to make sure that the browser DOM API is the Renderer.
4706
4700
  * We do this by defining a subset of DOM API to be the renderer and then
@@ -6270,27 +6264,6 @@ export declare type InputOptionsWithTransform<T, TransformT> = Required<Pick<Inp
6270
6264
  export declare interface InputSignal<T> extends InputSignalWithTransform<T, T> {
6271
6265
  }
6272
6266
 
6273
- /**
6274
- * Reactive node type for an input signal. An input signal extends a signal.
6275
- * There are special properties to enable transforms and required inputs.
6276
- */
6277
- declare interface InputSignalNode<T, TransformT> extends SignalNode<T> {
6278
- /**
6279
- * User-configured transform that will run whenever a new value is applied
6280
- * to the input signal node.
6281
- */
6282
- transformFn: ((value: TransformT) => T) | undefined;
6283
- /**
6284
- * Applies a new value to the input signal. Expects transforms to be run
6285
- * manually before.
6286
- *
6287
- * This function is called by the framework runtime code whenever a binding
6288
- * changes. The value can in practice be anything at runtime, but for typing
6289
- * purposes we assume it's a valid `T` value. Type-checking will enforce that.
6290
- */
6291
- applyValueToInputSignal<T, TransformT>(node: InputSignalNode<T, TransformT>, value: T): void;
6292
- }
6293
-
6294
6267
  /**
6295
6268
  * `InputSignalWithTransform` represents a special `Signal` for a
6296
6269
  * directive/component input with a `transform` function.
@@ -6316,7 +6289,7 @@ declare interface InputSignalNode<T, TransformT> extends SignalNode<T> {
6316
6289
  * @publicAPI
6317
6290
  */
6318
6291
  export declare interface InputSignalWithTransform<T, TransformT> extends Signal<T> {
6319
- [SIGNAL]: InputSignalNode<T, TransformT>;
6292
+ [ɵSIGNAL]: ɵInputSignalNode<T, TransformT>;
6320
6293
  [ɵINPUT_SIGNAL_BRAND_READ_TYPE]: T;
6321
6294
  [ɵINPUT_SIGNAL_BRAND_WRITE_TYPE]: TransformT;
6322
6295
  }
@@ -6648,10 +6621,7 @@ export declare interface KeyValueDifferFactory {
6648
6621
  export declare class KeyValueDiffers {
6649
6622
  /** @nocollapse */
6650
6623
  static ɵprov: unknown;
6651
- /**
6652
- * @deprecated v4.0.0 - Should be private.
6653
- */
6654
- factories: KeyValueDifferFactory[];
6624
+ private readonly factories;
6655
6625
  constructor(factories: KeyValueDifferFactory[]);
6656
6626
  static create<S>(factories: KeyValueDifferFactory[], parent?: KeyValueDiffers): KeyValueDiffers;
6657
6627
  /**
@@ -7365,7 +7335,7 @@ export declare interface ModelOptions {
7365
7335
  * @publicAPI
7366
7336
  */
7367
7337
  export declare interface ModelSignal<T> extends WritableSignal<T>, InputSignal<T>, OutputRef<T> {
7368
- [SIGNAL]: InputSignalNode<T, T>;
7338
+ [ɵSIGNAL]: ɵInputSignalNode<T, T>;
7369
7339
  }
7370
7340
 
7371
7341
  /**
@@ -7407,6 +7377,10 @@ declare const NATIVE = 7;
7407
7377
 
7408
7378
  declare const NEXT = 4;
7409
7379
 
7380
+ declare interface NgGlobalPublishUtils {
7381
+ ɵgetLoadedRoutes(route: any): any;
7382
+ }
7383
+
7410
7384
  /**
7411
7385
  * A type describing supported iterable types.
7412
7386
  *
@@ -9432,6 +9406,11 @@ export declare interface RendererType2 {
9432
9406
  data: {
9433
9407
  [kind: string]: any;
9434
9408
  };
9409
+ /**
9410
+ * A function added by the {@link ɵɵExternalStylesFeature} and used by the framework to create
9411
+ * the list of external runtime style URLs.
9412
+ */
9413
+ getExternalStyles?: ((encapsulationId?: string) => string[]) | null;
9435
9414
  }
9436
9415
 
9437
9416
  /**
@@ -9746,7 +9725,7 @@ export declare function setTestabilityGetter(getter: GetTestability): void;
9746
9725
  * Ordinary values can be turned into `Signal`s with the `signal` function.
9747
9726
  */
9748
9727
  export declare type Signal<T> = (() => T) & {
9749
- [SIGNAL]: unknown;
9728
+ [ɵSIGNAL]: unknown;
9750
9729
  };
9751
9730
 
9752
9731
  /**
@@ -12189,16 +12168,6 @@ export declare abstract class ViewRef extends ChangeDetectorRef {
12189
12168
  abstract onDestroy(callback: Function): void;
12190
12169
  }
12191
12170
 
12192
- /**
12193
- * Interface for tracking root `ViewRef`s in `ApplicationRef`.
12194
- *
12195
- * NOTE: Importing `ApplicationRef` here directly creates circular dependency, which is why we have
12196
- * a subset of the `ApplicationRef` interface `ViewRefTracker` here.
12197
- */
12198
- declare interface ViewRefTracker {
12199
- detachView(viewRef: ViewRef): void;
12200
- }
12201
-
12202
12171
  /**
12203
12172
  * A `Signal` with a value that can be mutated via a setter interface.
12204
12173
  */
@@ -12696,6 +12665,11 @@ export declare interface ɵComponentDef<T> extends ɵDirectiveDef<T> {
12696
12665
  * standalone injectors.
12697
12666
  */
12698
12667
  getStandaloneInjector: ((parentInjector: EnvironmentInjector) => EnvironmentInjector | null) | null;
12668
+ /**
12669
+ * A function added by the {@link ɵɵExternalStylesFeature} and used by the framework to create
12670
+ * the list of external runtime style URLs.
12671
+ */
12672
+ getExternalStyles: ((encapsulationId?: string) => string[]) | null;
12699
12673
  /**
12700
12674
  * Used to store the result of `noSideEffects` function so that it is not removed by closure
12701
12675
  * compiler. The property should never be read.
@@ -13003,7 +12977,7 @@ export declare interface ɵDirectiveDef<T> {
13003
12977
  findHostDirectiveDefs: ((currentDef: ɵDirectiveDef<unknown>, matchedDefs: ɵDirectiveDef<unknown>[], hostDirectiveDefs: HostDirectiveDefs) => void) | null;
13004
12978
  /** Additional directives to be applied whenever the directive has been matched. */
13005
12979
  hostDirectives: HostDirectiveDef[] | null;
13006
- setInput: (<U extends T>(this: ɵDirectiveDef<U>, instance: U, inputSignalNode: null | InputSignalNode<unknown, unknown>, value: any, publicName: string, privateName: string) => void) | null;
12980
+ setInput: (<U extends T>(this: ɵDirectiveDef<U>, instance: U, inputSignalNode: null | ɵInputSignalNode<unknown, unknown>, value: any, publicName: string, privateName: string) => void) | null;
13007
12981
  }
13008
12982
 
13009
12983
  /**
@@ -13015,6 +12989,8 @@ export declare interface ɵDirectiveType<T> extends Type<T> {
13015
12989
  ɵfac: unknown;
13016
12990
  }
13017
12991
 
12992
+ export declare function ɵdisableProfiling(): void;
12993
+
13018
12994
  /**
13019
12995
  * A scheduler which manages the execution of effects.
13020
12996
  */
@@ -13033,6 +13009,13 @@ export declare abstract class ɵEffectScheduler {
13033
13009
  static ɵprov: unknown;
13034
13010
  }
13035
13011
 
13012
+ /**
13013
+ * This enables an internal performance profiler
13014
+ *
13015
+ * It should not be imported in application code
13016
+ */
13017
+ export declare function ɵenableProfiling(): void;
13018
+
13036
13019
  /**
13037
13020
  * Index of each type of locale data from the extra locale data array
13038
13021
  */
@@ -13202,8 +13185,6 @@ export declare function ɵgetUnknownPropertyStrictMode(): boolean;
13202
13185
 
13203
13186
  export declare const ɵglobal: any;
13204
13187
 
13205
- export declare const ɵGLOBAL_EVENT_DELEGATION: InjectionToken<GlobalEventDelegation>;
13206
-
13207
13188
  /**
13208
13189
  * Default debug tools available under `window.ng`.
13209
13190
  */
@@ -13288,6 +13269,27 @@ declare const ɵINPUT_SIGNAL_BRAND_READ_TYPE: unique symbol;
13288
13269
 
13289
13270
  export declare const ɵINPUT_SIGNAL_BRAND_WRITE_TYPE: unique symbol;
13290
13271
 
13272
+ /**
13273
+ * Reactive node type for an input signal. An input signal extends a signal.
13274
+ * There are special properties to enable transforms and required inputs.
13275
+ */
13276
+ export declare interface ɵInputSignalNode<T, TransformT> extends SignalNode<T> {
13277
+ /**
13278
+ * User-configured transform that will run whenever a new value is applied
13279
+ * to the input signal node.
13280
+ */
13281
+ transformFn: ((value: TransformT) => T) | undefined;
13282
+ /**
13283
+ * Applies a new value to the input signal. Expects transforms to be run
13284
+ * manually before.
13285
+ *
13286
+ * This function is called by the framework runtime code whenever a binding
13287
+ * changes. The value can in practice be anything at runtime, but for typing
13288
+ * purposes we assume it's a valid `T` value. Type-checking will enforce that.
13289
+ */
13290
+ applyValueToInputSignal<T, TransformT>(node: ɵInputSignalNode<T, TransformT>, value: T): void;
13291
+ }
13292
+
13291
13293
  /**
13292
13294
  * `InjectionToken` used to configure how to call the `ErrorHandler`.
13293
13295
  *
@@ -13624,6 +13626,9 @@ export declare const enum ɵNotificationSource {
13624
13626
  export declare function ɵpatchComponentDefWithScope<C>(componentDef: ɵComponentDef<C>, transitiveScopes: ɵNgModuleTransitiveScopes): void;
13625
13627
 
13626
13628
 
13629
+ export declare const ɵPERFORMANCE_MARK_PREFIX = "\uD83C\uDD70\uFE0F";
13630
+
13631
+
13627
13632
  /**
13628
13633
  * A guarded `performance.mark` for feature marking.
13629
13634
  *
@@ -13733,13 +13738,6 @@ export declare const enum ɵProfilerEvent {
13733
13738
  */
13734
13739
  export declare const ɵPROVIDED_NG_ZONE: InjectionToken<boolean>;
13735
13740
 
13736
- /**
13737
- * Returns a set of providers required to setup support for event delegation.
13738
- * @param multiContract - Experimental support to provide one event contract
13739
- * when there are multiple binaries on the page.
13740
- */
13741
- export declare function ɵprovideGlobalEventDelegation(multiContract?: boolean): Provider[];
13742
-
13743
13741
  /**
13744
13742
  * An object that contains information about a provider that has been configured
13745
13743
  *
@@ -13764,6 +13762,12 @@ export declare interface ɵProviderRecord {
13764
13762
  importPath?: Type<unknown>[];
13765
13763
  }
13766
13764
 
13765
+ /**
13766
+ * Publishes the given function to `window.ng` from package other than @angular/core
13767
+ * So that it can be used from the browser console when an application is not in production.
13768
+ */
13769
+ export declare function ɵpublishExternalGlobalUtil<K extends ExternalGlobalUtilsFunctions>(name: K, fn: NgGlobalPublishUtils[K]): void;
13770
+
13767
13771
  export declare function ɵreadHydrationInfo(node: RNode): ɵHydrationInfo | null;
13768
13772
 
13769
13773
  export declare class ɵReflectionCapabilities implements PlatformReflectionCapabilities {
@@ -14043,8 +14047,8 @@ export declare const enum ɵRuntimeErrorCode {
14043
14047
  OUTPUT_REF_DESTROYED = 953,
14044
14048
  LOOP_TRACK_DUPLICATE_KEYS = -955,
14045
14049
  LOOP_TRACK_RECREATE = -956,
14046
- RUNTIME_DEPS_INVALID_IMPORTED_TYPE = 1000,
14047
- RUNTIME_DEPS_ORPHAN_COMPONENT = 1001
14050
+ RUNTIME_DEPS_INVALID_IMPORTED_TYPE = 980,
14051
+ RUNTIME_DEPS_ORPHAN_COMPONENT = 981
14048
14052
  }
14049
14053
 
14050
14054
  /**
@@ -14175,11 +14179,25 @@ export declare function ɵsetUnknownElementStrictMode(shouldThrow: boolean): voi
14175
14179
  */
14176
14180
  export declare function ɵsetUnknownPropertyStrictMode(shouldThrow: boolean): void;
14177
14181
 
14182
+ export { ɵSIGNAL }
14183
+
14178
14184
  /**
14179
14185
  * Marker used in a comment node to ensure hydration content integrity
14180
14186
  */
14181
14187
  export declare const ɵSSR_CONTENT_INTEGRITY_MARKER = "nghm";
14182
14188
 
14189
+ /**
14190
+ * Function that will start measuring against the performance API
14191
+ * Should be used in pair with stopMeasuring
14192
+ */
14193
+ export declare function ɵstartMeasuring<T>(label: string): void;
14194
+
14195
+ /**
14196
+ * Function that will stop measuring against the performance API
14197
+ * Should be used in pair with stopMeasuring
14198
+ */
14199
+ export declare function ɵstopMeasuring(label: string): void;
14200
+
14183
14201
  /** Store a value in the `data` at a given `index`. */
14184
14202
  export declare function ɵstore<T>(tView: TView, lView: LView, index: number, value: T): void;
14185
14203
 
@@ -14483,7 +14501,7 @@ export declare class ɵViewRef<T> implements EmbeddedViewRef<T>, ChangeDetectorR
14483
14501
  checkNoChanges(): void;
14484
14502
  attachToViewContainerRef(): void;
14485
14503
  detachFromAppRef(): void;
14486
- attachToAppRef(appRef: ViewRefTracker): void;
14504
+ attachToAppRef(appRef: ApplicationRef): void;
14487
14505
  }
14488
14506
 
14489
14507
  /**
@@ -15727,6 +15745,18 @@ export declare function ɵɵelementStart(index: number, name: string, attrsIndex
15727
15745
  */
15728
15746
  export declare function ɵɵenableBindings(): void;
15729
15747
 
15748
+ /**
15749
+ * A feature that adds support for external runtime styles for a component.
15750
+ * An external runtime style is a URL to a CSS stylesheet that contains the styles
15751
+ * for a given component. For browsers, this URL will be used in an appended `link` element
15752
+ * when the component is rendered. This feature is typically used for Hot Module Replacement
15753
+ * (HMR) of component stylesheets by leveraging preexisting global stylesheet HMR available
15754
+ * in most development servers.
15755
+ *
15756
+ * @codeGenApi
15757
+ */
15758
+ export declare function ɵɵExternalStylesFeature(styleUrls: string[]): ComponentDefFeature;
15759
+
15730
15760
  /**
15731
15761
  * @publicApi
15732
15762
  */
@@ -17075,6 +17105,14 @@ export declare function ɵɵrepeaterTrackByIdentity<T>(_: number, value: T): T;
17075
17105
  */
17076
17106
  export declare function ɵɵrepeaterTrackByIndex(index: number): number;
17077
17107
 
17108
+ /**
17109
+ * Replaces the metadata of a component type and re-renders all live instances of the component.
17110
+ * @param type Class whose metadata will be replaced.
17111
+ * @param applyMetadata Callback that will apply a new set of metadata on the `type` when invoked.
17112
+ * @codeGenApi
17113
+ */
17114
+ export declare function ɵɵreplaceMetadata(type: Type<unknown>, applyMetadata: () => void): void;
17115
+
17078
17116
  /**
17079
17117
  * Clears the view set in `ɵɵrestoreView` from memory. Returns the passed in
17080
17118
  * value so that it can be used as a return value of an instruction.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/core",
3
- "version": "19.0.0-next.7",
3
+ "version": "19.0.0-next.9",
4
4
  "description": "Angular - the core framework",
5
5
  "author": "angular",
6
6
  "license": "MIT",
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v19.0.0-next.7
2
+ * @license Angular v19.0.0-next.9
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v19.0.0-next.7
2
+ * @license Angular v19.0.0-next.9
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -213,6 +213,10 @@ export declare interface ReactiveNode {
213
213
  * Called when a signal is read within this consumer.
214
214
  */
215
215
  consumerOnSignalRead(node: unknown): void;
216
+ /**
217
+ * A debug name for the reactive node. Used in Angular DevTools to identify the node.
218
+ */
219
+ debugName?: string;
216
220
  }
217
221
 
218
222
  export declare function runPostSignalSetFn(): void;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v19.0.0-next.7
2
+ * @license Angular v19.0.0-next.9
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */