@angular/core 19.1.0-next.3 → 19.1.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.
Files changed (39) hide show
  1. package/LICENSE +1 -1
  2. package/fesm2022/core.mjs +516 -266
  3. package/fesm2022/core.mjs.map +1 -1
  4. package/fesm2022/primitives/event-dispatch.mjs +1 -24
  5. package/fesm2022/primitives/event-dispatch.mjs.map +1 -1
  6. package/fesm2022/primitives/signals.mjs +1 -1
  7. package/fesm2022/rxjs-interop.mjs +1 -1
  8. package/fesm2022/testing.mjs +5 -5
  9. package/index.d.ts +169 -17
  10. package/package.json +1 -1
  11. package/primitives/event-dispatch/index.d.ts +1 -1
  12. package/primitives/signals/index.d.ts +1 -1
  13. package/rxjs-interop/index.d.ts +1 -1
  14. package/schematics/bundles/apply_import_manager-6508401d.js +732 -0
  15. package/schematics/bundles/{checker-228cb8a8.js → checker-24b68d23.js} +75 -27
  16. package/schematics/bundles/cleanup-unused-imports.js +295 -0
  17. package/schematics/bundles/{compiler_host-fc806dbe.js → compiler_host-5f693799.js} +2 -2
  18. package/schematics/bundles/control-flow-migration.js +3 -3
  19. package/schematics/bundles/explicit-standalone-flag.js +3 -3
  20. package/schematics/bundles/imports-abe29092.js +1 -1
  21. package/schematics/bundles/{combine_units-5d6a7099.js → index-767e341d.js} +10 -723
  22. package/schematics/bundles/index-b1033cf0.js +30 -0
  23. package/schematics/bundles/inject-migration.js +3 -3
  24. package/schematics/bundles/leading_space-d190b83b.js +1 -1
  25. package/schematics/bundles/{migrate_ts_type_references-d02c6750.js → migrate_ts_type_references-bc7d8784.js} +29 -28
  26. package/schematics/bundles/nodes-a9f0b985.js +1 -1
  27. package/schematics/bundles/output-migration.js +26 -25
  28. package/schematics/bundles/pending-tasks.js +3 -3
  29. package/schematics/bundles/{program-1591ec8f.js → program-c810a4c2.js} +81 -40
  30. package/schematics/bundles/project_tsconfig_paths-e9ccccbf.js +1 -1
  31. package/schematics/bundles/provide-initializer.js +3 -3
  32. package/schematics/bundles/route-lazy-loading.js +3 -3
  33. package/schematics/bundles/signal-input-migration.js +31 -30
  34. package/schematics/bundles/signal-queries-migration.js +48 -47
  35. package/schematics/bundles/signals.js +6 -5
  36. package/schematics/bundles/standalone-migration.js +9 -25
  37. package/schematics/collection.json +5 -0
  38. package/schematics/ng-generate/cleanup-unused-imports/schema.json +7 -0
  39. package/testing/index.d.ts +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v19.1.0-next.3
2
+ * @license Angular v19.1.0-rc.0
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.1.0-next.3
2
+ * @license Angular v19.1.0-rc.0
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.1.0-next.3
2
+ * @license Angular v19.1.0-rc.0
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -175,10 +175,10 @@ class TestBedApplicationErrorHandler {
175
175
  throw e;
176
176
  }
177
177
  }
178
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-next.3", ngImport: i0, type: TestBedApplicationErrorHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
179
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0-next.3", ngImport: i0, type: TestBedApplicationErrorHandler });
178
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: TestBedApplicationErrorHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
179
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: TestBedApplicationErrorHandler });
180
180
  }
181
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-next.3", ngImport: i0, type: TestBedApplicationErrorHandler, decorators: [{
181
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: TestBedApplicationErrorHandler, decorators: [{
182
182
  type: Injectable
183
183
  }] });
184
184
 
@@ -246,7 +246,7 @@ class ComponentFixture {
246
246
  this.componentRef = componentRef;
247
247
  if (this.autoDetect) {
248
248
  this._testAppRef.externalTestViews.add(this.componentRef.hostView);
249
- this.scheduler?.notify(9 /* ɵNotificationSource.ViewAttached */);
249
+ this.scheduler?.notify(8 /* ɵNotificationSource.ViewAttached */);
250
250
  this.scheduler?.notify(0 /* ɵNotificationSource.MarkAncestorsForTraversal */);
251
251
  }
252
252
  this.componentRef.hostView.onDestroy(() => {
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v19.1.0-next.3
2
+ * @license Angular v19.1.0-rc.0
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -29,6 +29,8 @@ export declare interface AbstractType<T> extends Function {
29
29
  prototype: T;
30
30
  }
31
31
 
32
+ declare const AFTER_RENDER_SEQUENCES_TO_ADD = 25;
33
+
32
34
  /**
33
35
  * @description
34
36
  * A lifecycle hook that is called after the default change detector has
@@ -486,6 +488,7 @@ declare class AfterRenderImpl {
486
488
  */
487
489
  execute(): void;
488
490
  register(sequence: AfterRenderSequence): void;
491
+ addSequence(sequence: AfterRenderSequence): void;
489
492
  unregister(sequence: AfterRenderSequence): void;
490
493
  protected maybeTrace<T>(fn: () => T, snapshot: ɵTracingSnapshot | null): T;
491
494
  /** @nocollapse */
@@ -605,6 +608,7 @@ export declare interface AfterRenderRef {
605
608
  declare class AfterRenderSequence implements AfterRenderRef {
606
609
  readonly impl: AfterRenderImpl;
607
610
  readonly hooks: AfterRenderHooks;
611
+ readonly view: LView | undefined;
608
612
  once: boolean;
609
613
  snapshot: ɵTracingSnapshot | null;
610
614
  /**
@@ -618,7 +622,7 @@ declare class AfterRenderSequence implements AfterRenderRef {
618
622
  */
619
623
  pipelinedValue: unknown;
620
624
  private unregisterOnDestroy;
621
- constructor(impl: AfterRenderImpl, hooks: AfterRenderHooks, once: boolean, destroyRef: DestroyRef | null, snapshot?: ɵTracingSnapshot | null);
625
+ constructor(impl: AfterRenderImpl, hooks: AfterRenderHooks, view: LView | undefined, once: boolean, destroyRef: DestroyRef | null, snapshot?: ɵTracingSnapshot | null);
622
626
  afterRun(): void;
623
627
  destroy(): void;
624
628
  }
@@ -1170,7 +1174,6 @@ export declare class ApplicationRef {
1170
1174
  * Returns the number of attached views.
1171
1175
  */
1172
1176
  get viewCount(): number;
1173
- private warnIfDestroyed;
1174
1177
  static ɵfac: i0.ɵɵFactoryDeclaration<ApplicationRef, never>;
1175
1178
  static ɵprov: i0.ɵɵInjectableDeclaration<ApplicationRef>;
1176
1179
  }
@@ -3073,6 +3076,36 @@ declare const DEFER_BLOCK_ID = "di";
3073
3076
 
3074
3077
  declare const DEFER_BLOCK_STATE = "s";
3075
3078
 
3079
+ /** Retrieved information about a `@defer` block. */
3080
+ declare interface DeferBlockData {
3081
+ /** Current state of the block. */
3082
+ state: 'placeholder' | 'loading' | 'complete' | 'error' | 'initial';
3083
+ /** Hydration state of the block. */
3084
+ incrementalHydrationState: 'not-configured' | 'hydrated' | 'dehydrated';
3085
+ /** Wherther the block has a connected `@error` block. */
3086
+ hasErrorBlock: boolean;
3087
+ /** Information about the connected `@loading` block. */
3088
+ loadingBlock: {
3089
+ /** Whether the block is defined. */
3090
+ exists: boolean;
3091
+ /** Minimum amount of milliseconds that the block should be shown. */
3092
+ minimumTime: number | null;
3093
+ /** Amount of time after which the block should be shown. */
3094
+ afterTime: number | null;
3095
+ };
3096
+ /** Information about the connected `@placeholder` block. */
3097
+ placeholderBlock: {
3098
+ /** Whether the block is defined. */
3099
+ exists: boolean;
3100
+ /** Minimum amount of time that block should be shown. */
3101
+ minimumTime: number | null;
3102
+ };
3103
+ /** Stringified version of the block's triggers. */
3104
+ triggers: string[];
3105
+ /** Element root nodes that are currently being shown in the block. */
3106
+ rootNodes: Node[];
3107
+ }
3108
+
3076
3109
  /**
3077
3110
  * Represents defer trigger types.
3078
3111
  */
@@ -4609,6 +4642,14 @@ declare function getDebugNode(nativeNode: any): DebugNode | null;
4609
4642
  export { getDebugNode }
4610
4643
  export { getDebugNode as ɵgetDebugNode }
4611
4644
 
4645
+ /**
4646
+ * Gets all of the `@defer` blocks that are present inside the specified DOM node.
4647
+ * @param node Node in which to look for `@defer` blocks.
4648
+ *
4649
+ * @publicApi
4650
+ */
4651
+ declare function getDeferBlocks(node: Node): DeferBlockData[];
4652
+
4612
4653
  /**
4613
4654
  * Discovers the dependencies of an injectable instance. Provides DI information about each
4614
4655
  * dependency that the injectable was instantiated with, including where they were provided from.
@@ -4820,6 +4861,7 @@ declare const globalUtilsFunctions: {
4820
4861
  ɵgetInjectorMetadata: typeof getInjectorMetadata;
4821
4862
  ɵsetProfiler: (profiler: ɵProfiler_2 | null) => void;
4822
4863
  ɵgetSignalGraph: typeof getSignalGraph;
4864
+ ɵgetDeferBlocks: typeof getDeferBlocks;
4823
4865
  getDirectiveMetadata: typeof getDirectiveMetadata;
4824
4866
  getComponent: typeof getComponent;
4825
4867
  getContext: typeof getContext;
@@ -7242,6 +7284,7 @@ declare interface LView<T = unknown> extends Array<any> {
7242
7284
  * if any signals were read.
7243
7285
  */
7244
7286
  [REACTIVE_TEMPLATE_CONSUMER]: ReactiveLViewConsumer | null;
7287
+ [AFTER_RENDER_SEQUENCES_TO_ADD]: AfterRenderSequence[] | null;
7245
7288
  }
7246
7289
 
7247
7290
  /**
@@ -7951,7 +7994,7 @@ export declare class NgZone {
7951
7994
  * Executes the `fn` function synchronously within the Angular zone as a task and returns value
7952
7995
  * returned by the function.
7953
7996
  *
7954
- * Running functions via `run` allows you to reenter Angular zone from a task that was executed
7997
+ * Running functions via `runTask` allows you to reenter Angular zone from a task that was executed
7955
7998
  * outside of the Angular zone (typically started via {@link #runOutsideAngular}).
7956
7999
  *
7957
8000
  * Any future tasks or microtasks scheduled from within this function will continue executing from
@@ -10480,16 +10523,19 @@ declare interface TDeferBlockDetails {
10480
10523
  * List of hydrate triggers for a given block
10481
10524
  */
10482
10525
  hydrateTriggers: Map<DeferBlockTrigger, HydrateTriggerDetails | null> | null;
10483
- /**
10484
- * List of prefetch triggers for a given block
10485
- */
10486
- prefetchTriggers: Set<DeferBlockTrigger> | null;
10487
10526
  /**
10488
10527
  * Defer block flags, which should be used for all
10489
10528
  * instances of a given defer block (the flags that should be
10490
10529
  * placed into the `TDeferDetails` at runtime).
10491
10530
  */
10492
10531
  flags: TDeferDetailsFlags;
10532
+ /**
10533
+ * Tracks debugging information about the deferred block.
10534
+ */
10535
+ debug: {
10536
+ /** Text representations of the block's triggers. */
10537
+ triggers?: Set<string>;
10538
+ } | null;
10493
10539
  }
10494
10540
 
10495
10541
  /**
@@ -12690,6 +12736,7 @@ declare class ZoneAwareEffectScheduler implements ɵEffectScheduler {
12690
12736
  private queuedEffectCount;
12691
12737
  private queues;
12692
12738
  schedule(handle: SchedulableEffect): void;
12739
+ remove(handle: SchedulableEffect): void;
12693
12740
  private enqueue;
12694
12741
  /**
12695
12742
  * Run all scheduled effects.
@@ -13501,10 +13548,34 @@ export declare abstract class ɵEffectScheduler {
13501
13548
  * Run any scheduled effects.
13502
13549
  */
13503
13550
  abstract flush(): void;
13551
+ /** Remove a scheduled effect */
13552
+ abstract remove(e: SchedulableEffect): void;
13504
13553
  /** @nocollapse */
13505
13554
  static ɵprov: unknown;
13506
13555
  }
13507
13556
 
13557
+ /**
13558
+ * InjectionToken to control root component bootstrap behavior.
13559
+ *
13560
+ * This token is primarily used in Angular's server-side rendering (SSR) scenarios,
13561
+ * particularly by the `@angular/ssr` package, to manage whether the root component
13562
+ * should be bootstrapped during the application initialization process.
13563
+ *
13564
+ * ## Purpose:
13565
+ * During SSR route extraction, setting this token to `false` prevents Angular from
13566
+ * bootstrapping the root component. This avoids unnecessary component rendering,
13567
+ * enabling route extraction without requiring additional APIs or triggering
13568
+ * component logic.
13569
+ *
13570
+ * ## Behavior:
13571
+ * - **`false`**: Prevents the root component from being bootstrapped.
13572
+ * - **`true`** (default): Proceeds with the normal root component bootstrap process.
13573
+ *
13574
+ * This mechanism ensures SSR can efficiently separate route extraction logic
13575
+ * from component rendering.
13576
+ */
13577
+ export declare const ɵENABLE_ROOT_COMPONENT_BOOTSTRAP: InjectionToken<boolean>;
13578
+
13508
13579
  /**
13509
13580
  * This enables an internal performance profiler
13510
13581
  *
@@ -14126,13 +14197,12 @@ export declare const enum ɵNotificationSource {
14126
14197
  Listener = 5,
14127
14198
  CustomElement = 6,
14128
14199
  RenderHook = 7,
14129
- DeferredRenderHook = 8,
14130
- ViewAttached = 9,
14131
- ViewDetachedFromDOM = 10,
14132
- AsyncAnimationsLoaded = 11,
14133
- PendingTaskRemoved = 12,
14134
- RootEffect = 13,
14135
- ViewEffect = 14
14200
+ ViewAttached = 8,
14201
+ ViewDetachedFromDOM = 9,
14202
+ AsyncAnimationsLoaded = 10,
14203
+ PendingTaskRemoved = 11,
14204
+ RootEffect = 12,
14205
+ ViewEffect = 13
14136
14206
  }
14137
14207
 
14138
14208
  /**
@@ -14261,7 +14331,81 @@ export declare const enum ɵProfilerEvent {
14261
14331
  * Corresponds to the point in time after the runtime has evaluated an expression associated with
14262
14332
  * an event or an output.
14263
14333
  */
14264
- OutputEnd = 7
14334
+ OutputEnd = 7,
14335
+ /**
14336
+ * Corresponds to the point in time just before application bootstrap.
14337
+ */
14338
+ BootstrapApplicationStart = 8,
14339
+ /**
14340
+ * Corresponds to the point in time after application bootstrap.
14341
+ */
14342
+ BootstrapApplicationEnd = 9,
14343
+ /**
14344
+ * Corresponds to the point in time just before root component bootstrap.
14345
+ */
14346
+ BootstrapComponentStart = 10,
14347
+ /**
14348
+ * Corresponds to the point in time after root component bootstrap.
14349
+ */
14350
+ BootstrapComponentEnd = 11,
14351
+ /**
14352
+ * Corresponds to the point in time just before Angular starts a change detection tick.
14353
+ */
14354
+ ChangeDetectionStart = 12,
14355
+ /**
14356
+ * Corresponds to the point in time after Angular ended a change detection tick.
14357
+ */
14358
+ ChangeDetectionEnd = 13,
14359
+ /**
14360
+ * Corresponds to the point in time just before Angular starts a new synchronization pass of change detection tick.
14361
+ */
14362
+ ChangeDetectionSyncStart = 14,
14363
+ /**
14364
+ * Corresponds to the point in time after Angular ended a synchronization pass.
14365
+ */
14366
+ ChangeDetectionSyncEnd = 15,
14367
+ /**
14368
+ * Corresponds to the point in time just before Angular executes after render hooks.
14369
+ */
14370
+ AfterRenderHooksStart = 16,
14371
+ /**
14372
+ * Corresponds to the point in time after Angular executed after render hooks.
14373
+ */
14374
+ AfterRenderHooksEnd = 17,
14375
+ /**
14376
+ * Corresponds to the point in time just before Angular starts processing a component (create or update).
14377
+ */
14378
+ ComponentStart = 18,
14379
+ /**
14380
+ * Corresponds to the point in time after Angular finished processing a component.
14381
+ */
14382
+ ComponentEnd = 19,
14383
+ /**
14384
+ * Corresponds to the point in time just before a defer block transitions between states.
14385
+ */
14386
+ DeferBlockStateStart = 20,
14387
+ /**
14388
+ * Corresponds to the point in time after a defer block transitioned between states.
14389
+ */
14390
+ DeferBlockStateEnd = 21,
14391
+ /**
14392
+ * Corresponds to the point in time just before a component instance is created dynamically.
14393
+ */
14394
+ DynamicComponentStart = 22,
14395
+ /**
14396
+ * Corresponds to the point in time after a a component instance is created dynamically.
14397
+ */
14398
+ DynamicComponentEnd = 23,
14399
+ /**
14400
+ * Corresponds to the point in time before the runtime has called the host bindings function
14401
+ * of a directive.
14402
+ */
14403
+ HostBindingsUpdateStart = 24,
14404
+ /**
14405
+ * Corresponds to the point in time after the runtime has called the host bindings function
14406
+ * of a directive.
14407
+ */
14408
+ HostBindingsUpdateEnd = 25
14265
14409
  }
14266
14410
 
14267
14411
  /**
@@ -14558,7 +14702,7 @@ export declare const enum ɵRuntimeErrorCode {
14558
14702
  ASSERTION_NOT_INSIDE_REACTIVE_CONTEXT = -602,
14559
14703
  INVALID_I18N_STRUCTURE = 700,
14560
14704
  MISSING_LOCALE_DATA = 701,
14561
- DEFER_LOADING_FAILED = 750,
14705
+ DEFER_LOADING_FAILED = -750,
14562
14706
  IMPORT_PROVIDERS_FROM_STANDALONE = 800,
14563
14707
  INVALID_DIFFER_INPUT = 900,
14564
14708
  NO_SUPPORTING_DIFFER_FACTORY = 901,
@@ -14784,6 +14928,14 @@ export declare interface ɵTracingService<T extends ɵTracingSnapshot> {
14784
14928
  * snapshot.
14785
14929
  */
14786
14930
  snapshot(linkedSnapshot: T | null): T;
14931
+ /**
14932
+ * Wrap an event listener bound by the framework for tracing.
14933
+ * @param element Element on which the event is bound.
14934
+ * @param eventName Name of the event.
14935
+ * @param handler Event handler.
14936
+ * @return A new event handler to be bound instead of the original one.
14937
+ */
14938
+ wrapEventListener?<T extends Function>(element: HTMLElement, eventName: string, handler: T): T;
14787
14939
  }
14788
14940
 
14789
14941
  /** A single tracing snapshot. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/core",
3
- "version": "19.1.0-next.3",
3
+ "version": "19.1.0-rc.0",
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.1.0-next.3
2
+ * @license Angular v19.1.0-rc.0
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.1.0-next.3
2
+ * @license Angular v19.1.0-rc.0
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.1.0-next.3
2
+ * @license Angular v19.1.0-rc.0
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */