@angular/core 19.1.0-next.2 → 19.1.0-next.4

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/fesm2022/core.mjs +511 -109
  2. package/fesm2022/core.mjs.map +1 -1
  3. package/fesm2022/primitives/event-dispatch.mjs +1 -1
  4. package/fesm2022/primitives/signals.mjs +1 -1
  5. package/fesm2022/rxjs-interop.mjs +1 -1
  6. package/fesm2022/testing.mjs +6 -6
  7. package/fesm2022/testing.mjs.map +1 -1
  8. package/index.d.ts +232 -27
  9. package/package.json +1 -1
  10. package/primitives/event-dispatch/index.d.ts +1 -1
  11. package/primitives/signals/index.d.ts +1 -1
  12. package/rxjs-interop/index.d.ts +1 -1
  13. package/schematics/bundles/{checker-c58f97d2.js → checker-884633eb.js} +158 -31
  14. package/schematics/bundles/{combine_units-8b29b7f6.js → combine_units-4a95b1b9.js} +3 -3
  15. package/schematics/bundles/{compiler_host-f5d588fe.js → compiler_host-22f6513d.js} +2 -2
  16. package/schematics/bundles/control-flow-migration.js +3 -3
  17. package/schematics/bundles/explicit-standalone-flag.js +5 -5
  18. package/schematics/bundles/{imports-31a38653.js → imports-abe29092.js} +1 -1
  19. package/schematics/bundles/inject-migration.js +6 -6
  20. package/schematics/bundles/{leading_space-6e7a8ec6.js → leading_space-d190b83b.js} +1 -1
  21. package/schematics/bundles/{migrate_ts_type_references-a8676ec1.js → migrate_ts_type_references-4b11f3f2.js} +5 -5
  22. package/schematics/bundles/{nodes-88c2157f.js → nodes-a9f0b985.js} +2 -2
  23. package/schematics/bundles/output-migration.js +5 -5
  24. package/schematics/bundles/pending-tasks.js +5 -5
  25. package/schematics/bundles/{program-30e02255.js → program-094352ba.js} +30 -23
  26. package/schematics/bundles/{project_tsconfig_paths-6c9cde78.js → project_tsconfig_paths-e9ccccbf.js} +1 -1
  27. package/schematics/bundles/provide-initializer.js +5 -5
  28. package/schematics/bundles/route-lazy-loading.js +4 -4
  29. package/schematics/bundles/signal-input-migration.js +7 -7
  30. package/schematics/bundles/signal-queries-migration.js +7 -7
  31. package/schematics/bundles/signals.js +7 -7
  32. package/schematics/bundles/standalone-migration.js +8 -8
  33. package/testing/index.d.ts +1 -1
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v19.1.0-next.2
2
+ * @license Angular v19.1.0-next.4
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -2962,6 +2962,31 @@ export declare class DebugNode {
2962
2962
  get providerTokens(): any[];
2963
2963
  }
2964
2964
 
2965
+ /**
2966
+ * A debug representation of the signal graph.
2967
+ */
2968
+ declare interface DebugSignalGraph {
2969
+ nodes: DebugSignalGraphNode[];
2970
+ edges: DebugSignalGraphEdge[];
2971
+ }
2972
+
2973
+ declare interface DebugSignalGraphEdge {
2974
+ /**
2975
+ * Index of a signal node in the `nodes` array that is a consumer of the signal produced by the producer node.
2976
+ */
2977
+ consumer: number;
2978
+ /**
2979
+ * Index of a signal node in the `nodes` array that is a producer of the signal consumed by the consumer node.
2980
+ */
2981
+ producer: number;
2982
+ }
2983
+
2984
+ declare interface DebugSignalGraphNode {
2985
+ kind: string;
2986
+ label?: string;
2987
+ value?: unknown;
2988
+ }
2989
+
2965
2990
  declare const DECLARATION_COMPONENT_VIEW = 15;
2966
2991
 
2967
2992
  declare const DECLARATION_LCONTAINER = 16;
@@ -3048,6 +3073,36 @@ declare const DEFER_BLOCK_ID = "di";
3048
3073
 
3049
3074
  declare const DEFER_BLOCK_STATE = "s";
3050
3075
 
3076
+ /** Retrieved information about a `@defer` block. */
3077
+ declare interface DeferBlockData {
3078
+ /** Current state of the block. */
3079
+ state: 'placeholder' | 'loading' | 'complete' | 'error' | 'initial';
3080
+ /** Hydration state of the block. */
3081
+ incrementalHydrationState: 'not-configured' | 'hydrated' | 'dehydrated';
3082
+ /** Wherther the block has a connected `@error` block. */
3083
+ hasErrorBlock: boolean;
3084
+ /** Information about the connected `@loading` block. */
3085
+ loadingBlock: {
3086
+ /** Whether the block is defined. */
3087
+ exists: boolean;
3088
+ /** Minimum amount of milliseconds that the block should be shown. */
3089
+ minimumTime: number | null;
3090
+ /** Amount of time after which the block should be shown. */
3091
+ afterTime: number | null;
3092
+ };
3093
+ /** Information about the connected `@placeholder` block. */
3094
+ placeholderBlock: {
3095
+ /** Whether the block is defined. */
3096
+ exists: boolean;
3097
+ /** Minimum amount of time that block should be shown. */
3098
+ minimumTime: number | null;
3099
+ };
3100
+ /** Stringified version of the block's triggers. */
3101
+ triggers: string[];
3102
+ /** Element root nodes that are currently being shown in the block. */
3103
+ rootNodes: Node[];
3104
+ }
3105
+
3051
3106
  /**
3052
3107
  * Represents defer trigger types.
3053
3108
  */
@@ -4584,6 +4639,14 @@ declare function getDebugNode(nativeNode: any): DebugNode | null;
4584
4639
  export { getDebugNode }
4585
4640
  export { getDebugNode as ɵgetDebugNode }
4586
4641
 
4642
+ /**
4643
+ * Gets all of the `@defer` blocks that are present inside the specified DOM node.
4644
+ * @param node Node in which to look for `@defer` blocks.
4645
+ *
4646
+ * @publicApi
4647
+ */
4648
+ declare function getDeferBlocks(node: Node): DeferBlockData[];
4649
+
4587
4650
  /**
4588
4651
  * Discovers the dependencies of an injectable instance. Provides DI information about each
4589
4652
  * dependency that the injectable was instantiated with, including where they were provided from.
@@ -4742,6 +4805,18 @@ export declare function getPlatform(): PlatformRef | null;
4742
4805
  */
4743
4806
  declare function getRootComponents(elementOrDir: Element | {}): {}[];
4744
4807
 
4808
+ /**
4809
+ * Returns a debug representation of the signal graph for the given injector.
4810
+ *
4811
+ * Currently only supports element injectors. Starts by discovering the consumer nodes
4812
+ * and then traverses their producer nodes to build the signal graph.
4813
+ *
4814
+ * @param injector The injector to get the signal graph for.
4815
+ * @returns A debug representation of the signal graph.
4816
+ * @throws If the injector is an environment injector.
4817
+ */
4818
+ declare function getSignalGraph(injector: Injector): DebugSignalGraph;
4819
+
4745
4820
  /**
4746
4821
  * Adapter interface for retrieving the `Testability` service associated for a
4747
4822
  * particular context.
@@ -4782,6 +4857,8 @@ declare const globalUtilsFunctions: {
4782
4857
  ɵgetInjectorResolutionPath: typeof getInjectorResolutionPath;
4783
4858
  ɵgetInjectorMetadata: typeof getInjectorMetadata;
4784
4859
  ɵsetProfiler: (profiler: ɵProfiler_2 | null) => void;
4860
+ ɵgetSignalGraph: typeof getSignalGraph;
4861
+ ɵgetDeferBlocks: typeof getDeferBlocks;
4785
4862
  getDirectiveMetadata: typeof getDirectiveMetadata;
4786
4863
  getComponent: typeof getComponent;
4787
4864
  getContext: typeof getContext;
@@ -6845,6 +6922,16 @@ declare interface Listener {
6845
6922
  type: 'dom' | 'output';
6846
6923
  }
6847
6924
 
6925
+ /**
6926
+ * Options that can be used to configure an event listener.
6927
+ * @publicApi
6928
+ */
6929
+ export declare interface ListenerOptions {
6930
+ capture?: boolean;
6931
+ once?: boolean;
6932
+ passive?: boolean;
6933
+ }
6934
+
6848
6935
  /**
6849
6936
  * Provide this token to set the locale of your application.
6850
6937
  * It is used for i18n extraction, by i18n pipes (DatePipe, I18nPluralPipe, CurrencyPipe,
@@ -7903,7 +7990,7 @@ export declare class NgZone {
7903
7990
  * Executes the `fn` function synchronously within the Angular zone as a task and returns value
7904
7991
  * returned by the function.
7905
7992
  *
7906
- * Running functions via `run` allows you to reenter Angular zone from a task that was executed
7993
+ * Running functions via `runTask` allows you to reenter Angular zone from a task that was executed
7907
7994
  * outside of the Angular zone (typically started via {@link #runOutsideAngular}).
7908
7995
  *
7909
7996
  * Any future tasks or microtasks scheduled from within this function will continue executing from
@@ -8408,24 +8495,6 @@ export declare class PendingTasks {
8408
8495
  static ɵprov: unknown;
8409
8496
  }
8410
8497
 
8411
- /**
8412
- * Internal implementation of the pending tasks service.
8413
- */
8414
- declare class PendingTasksInternal implements OnDestroy {
8415
- private taskId;
8416
- private pendingTasks;
8417
- private get _hasPendingTasks();
8418
- hasPendingTasks: BehaviorSubject<boolean>;
8419
- add(): number;
8420
- has(taskId: number): boolean;
8421
- remove(taskId: number): void;
8422
- ngOnDestroy(): void;
8423
- /** @nocollapse */
8424
- static ɵprov: unknown;
8425
- }
8426
- export { PendingTasksInternal as ɵPendingTasks }
8427
- export { PendingTasksInternal as ɵPendingTasksInternal }
8428
-
8429
8498
  /**
8430
8499
  * Type of the Pipe metadata.
8431
8500
  *
@@ -9332,7 +9401,7 @@ declare interface Renderer {
9332
9401
  removeStyle(el: RElement, style: string, flags?: RendererStyleFlags2): void;
9333
9402
  setProperty(el: RElement, name: string, value: any): void;
9334
9403
  setValue(node: RText | RComment, value: string): void;
9335
- listen(target: GlobalTargetName | RNode, eventName: string, callback: (event: any) => boolean | void): () => void;
9404
+ listen(target: GlobalTargetName | RNode, eventName: string, callback: (event: any) => boolean | void, options?: ListenerOptions): () => void;
9336
9405
  }
9337
9406
 
9338
9407
  /**
@@ -9504,9 +9573,10 @@ export declare abstract class Renderer2 {
9504
9573
  * DOM element.
9505
9574
  * @param eventName The event to listen for.
9506
9575
  * @param callback A handler function to invoke when the event occurs.
9576
+ * @param options Options that configure how the event listener is bound.
9507
9577
  * @returns An "unlisten" function for disposing of this handler.
9508
9578
  */
9509
- abstract listen(target: 'window' | 'document' | 'body' | any, eventName: string, callback: (event: any) => boolean | void): () => void;
9579
+ abstract listen(target: 'window' | 'document' | 'body' | any, eventName: string, callback: (event: any) => boolean | void, options?: ListenerOptions): () => void;
9510
9580
  }
9511
9581
 
9512
9582
  declare interface RendererFactory {
@@ -10449,16 +10519,19 @@ declare interface TDeferBlockDetails {
10449
10519
  * List of hydrate triggers for a given block
10450
10520
  */
10451
10521
  hydrateTriggers: Map<DeferBlockTrigger, HydrateTriggerDetails | null> | null;
10452
- /**
10453
- * List of prefetch triggers for a given block
10454
- */
10455
- prefetchTriggers: Set<DeferBlockTrigger> | null;
10456
10522
  /**
10457
10523
  * Defer block flags, which should be used for all
10458
10524
  * instances of a given defer block (the flags that should be
10459
10525
  * placed into the `TDeferDetails` at runtime).
10460
10526
  */
10461
10527
  flags: TDeferDetailsFlags;
10528
+ /**
10529
+ * Tracks debugging information about the deferred block.
10530
+ */
10531
+ debug: {
10532
+ /** Text representations of the block's triggers. */
10533
+ triggers?: Set<string>;
10534
+ } | null;
10462
10535
  }
10463
10536
 
10464
10537
  /**
@@ -13474,6 +13547,28 @@ export declare abstract class ɵEffectScheduler {
13474
13547
  static ɵprov: unknown;
13475
13548
  }
13476
13549
 
13550
+ /**
13551
+ * InjectionToken to control root component bootstrap behavior.
13552
+ *
13553
+ * This token is primarily used in Angular's server-side rendering (SSR) scenarios,
13554
+ * particularly by the `@angular/ssr` package, to manage whether the root component
13555
+ * should be bootstrapped during the application initialization process.
13556
+ *
13557
+ * ## Purpose:
13558
+ * During SSR route extraction, setting this token to `false` prevents Angular from
13559
+ * bootstrapping the root component. This avoids unnecessary component rendering,
13560
+ * enabling route extraction without requiring additional APIs or triggering
13561
+ * component logic.
13562
+ *
13563
+ * ## Behavior:
13564
+ * - **`false`**: Prevents the root component from being bootstrapped.
13565
+ * - **`true`** (default): Proceeds with the normal root component bootstrap process.
13566
+ *
13567
+ * This mechanism ensures SSR can efficiently separate route extraction logic
13568
+ * from component rendering.
13569
+ */
13570
+ export declare const ɵENABLE_ROOT_COMPONENT_BOOTSTRAP: InjectionToken<boolean>;
13571
+
13477
13572
  /**
13478
13573
  * This enables an internal performance profiler
13479
13574
  *
@@ -14110,6 +14205,22 @@ export declare const enum ɵNotificationSource {
14110
14205
  */
14111
14206
  export declare function ɵpatchComponentDefWithScope<C>(componentDef: ɵComponentDef<C>, transitiveScopes: ɵNgModuleTransitiveScopes): void;
14112
14207
 
14208
+ /**
14209
+ * Internal implementation of the pending tasks service.
14210
+ */
14211
+ export declare class ɵPendingTasksInternal implements OnDestroy {
14212
+ private taskId;
14213
+ private pendingTasks;
14214
+ private get _hasPendingTasks();
14215
+ hasPendingTasks: BehaviorSubject<boolean>;
14216
+ add(): number;
14217
+ has(taskId: number): boolean;
14218
+ remove(taskId: number): void;
14219
+ ngOnDestroy(): void;
14220
+ /** @nocollapse */
14221
+ static ɵprov: unknown;
14222
+ }
14223
+
14113
14224
 
14114
14225
  export declare const ɵPERFORMANCE_MARK_PREFIX = "\uD83C\uDD70\uFE0F";
14115
14226
 
@@ -14214,7 +14325,81 @@ export declare const enum ɵProfilerEvent {
14214
14325
  * Corresponds to the point in time after the runtime has evaluated an expression associated with
14215
14326
  * an event or an output.
14216
14327
  */
14217
- OutputEnd = 7
14328
+ OutputEnd = 7,
14329
+ /**
14330
+ * Corresponds to the point in time just before application bootstrap.
14331
+ */
14332
+ BootstrapApplicationStart = 8,
14333
+ /**
14334
+ * Corresponds to the point in time after application bootstrap.
14335
+ */
14336
+ BootstrapApplicationEnd = 9,
14337
+ /**
14338
+ * Corresponds to the point in time just before root component bootstrap.
14339
+ */
14340
+ BootstrapComponentStart = 10,
14341
+ /**
14342
+ * Corresponds to the point in time after root component bootstrap.
14343
+ */
14344
+ BootstrapComponentEnd = 11,
14345
+ /**
14346
+ * Corresponds to the point in time just before Angular starts a change detection tick.
14347
+ */
14348
+ ChangeDetectionStart = 12,
14349
+ /**
14350
+ * Corresponds to the point in time after Angular ended a change detection tick.
14351
+ */
14352
+ ChangeDetectionEnd = 13,
14353
+ /**
14354
+ * Corresponds to the point in time just before Angular starts a new synchronization pass of change detection tick.
14355
+ */
14356
+ ChangeDetectionSyncStart = 14,
14357
+ /**
14358
+ * Corresponds to the point in time after Angular ended a synchronization pass.
14359
+ */
14360
+ ChangeDetectionSyncEnd = 15,
14361
+ /**
14362
+ * Corresponds to the point in time just before Angular executes after render hooks.
14363
+ */
14364
+ AfterRenderHooksStart = 16,
14365
+ /**
14366
+ * Corresponds to the point in time after Angular executed after render hooks.
14367
+ */
14368
+ AfterRenderHooksEnd = 17,
14369
+ /**
14370
+ * Corresponds to the point in time just before Angular starts processing a component (create or update).
14371
+ */
14372
+ ComponentStart = 18,
14373
+ /**
14374
+ * Corresponds to the point in time after Angular finished processing a component.
14375
+ */
14376
+ ComponentEnd = 19,
14377
+ /**
14378
+ * Corresponds to the point in time just before a defer block transitions between states.
14379
+ */
14380
+ DeferBlockStateStart = 20,
14381
+ /**
14382
+ * Corresponds to the point in time after a defer block transitioned between states.
14383
+ */
14384
+ DeferBlockStateEnd = 21,
14385
+ /**
14386
+ * Corresponds to the point in time just before a component instance is created dynamically.
14387
+ */
14388
+ DynamicComponentStart = 22,
14389
+ /**
14390
+ * Corresponds to the point in time after a a component instance is created dynamically.
14391
+ */
14392
+ DynamicComponentEnd = 23,
14393
+ /**
14394
+ * Corresponds to the point in time before the runtime has called the host bindings function
14395
+ * of a directive.
14396
+ */
14397
+ HostBindingsUpdateStart = 24,
14398
+ /**
14399
+ * Corresponds to the point in time after the runtime has called the host bindings function
14400
+ * of a directive.
14401
+ */
14402
+ HostBindingsUpdateEnd = 25
14218
14403
  }
14219
14404
 
14220
14405
  /**
@@ -14737,6 +14922,14 @@ export declare interface ɵTracingService<T extends ɵTracingSnapshot> {
14737
14922
  * snapshot.
14738
14923
  */
14739
14924
  snapshot(linkedSnapshot: T | null): T;
14925
+ /**
14926
+ * Wrap an event listener bound by the framework for tracing.
14927
+ * @param element Element on which the event is bound.
14928
+ * @param eventName Name of the event.
14929
+ * @param handler Event handler.
14930
+ * @return A new event handler to be bound instead of the original one.
14931
+ */
14932
+ wrapEventListener?<T extends Function>(element: HTMLElement, eventName: string, handler: T): T;
14740
14933
  }
14741
14934
 
14742
14935
  /** A single tracing snapshot. */
@@ -15128,6 +15321,18 @@ export declare const ɵZONELESS_ENABLED: InjectionToken<boolean>;
15128
15321
  */
15129
15322
  export declare function ɵɵadvance(delta?: number): void;
15130
15323
 
15324
+ /**
15325
+ * Sets the location within the source template at which
15326
+ * each element in the current view was defined.
15327
+ *
15328
+ * @param index Index at which the DOM node was created.
15329
+ * @param templatePath Path to the template at which the node was defined.
15330
+ * @param locations Element locations to which to attach the source location.
15331
+ *
15332
+ * @codeGenApi
15333
+ */
15334
+ export declare function ɵɵattachSourceLocations(templatePath: string, locations: [index: number, offset: number, line: number, column: number][]): void;
15335
+
15131
15336
  /**
15132
15337
  * Updates the value of or removes a bound attribute on an Element.
15133
15338
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/core",
3
- "version": "19.1.0-next.2",
3
+ "version": "19.1.0-next.4",
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.2
2
+ * @license Angular v19.1.0-next.4
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.2
2
+ * @license Angular v19.1.0-next.4
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.2
2
+ * @license Angular v19.1.0-next.4
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */