@angular/core 19.0.0-next.2 → 19.0.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 (30) hide show
  1. package/fesm2022/core.mjs +193 -20
  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 +4 -4
  7. package/index.d.ts +113 -4
  8. package/package.json +1 -1
  9. package/primitives/event-dispatch/index.d.ts +1 -1
  10. package/primitives/signals/index.d.ts +1 -1
  11. package/rxjs-interop/index.d.ts +1 -1
  12. package/schematics/bundles/compiler_host-ca7ba733.js +44719 -0
  13. package/schematics/bundles/control-flow-migration.js +1847 -0
  14. package/schematics/bundles/explicit-standalone-flag.js +157 -0
  15. package/schematics/bundles/imports-4ac08251.js +110 -0
  16. package/schematics/bundles/inject-migration.js +927 -0
  17. package/schematics/bundles/nodes-0e7d45ca.js +56 -0
  18. package/schematics/bundles/project_tsconfig_paths-e9ccccbf.js +90 -0
  19. package/schematics/bundles/route-lazy-loading.js +411 -0
  20. package/schematics/bundles/standalone-migration.js +22441 -0
  21. package/schematics/collection.json +7 -14
  22. package/schematics/migrations.json +4 -14
  23. package/testing/index.d.ts +1 -1
  24. package/schematics/migrations/after-render-phase/bundle.js +0 -27333
  25. package/schematics/migrations/http-providers/bundle.js +0 -27582
  26. package/schematics/migrations/invalid-two-way-bindings/bundle.js +0 -23808
  27. package/schematics/ng-generate/control-flow-migration/bundle.js +0 -28076
  28. package/schematics/ng-generate/inject-migration/bundle.js +0 -27777
  29. package/schematics/ng-generate/route-lazy-loading/bundle.js +0 -27478
  30. package/schematics/ng-generate/standalone-migration/bundle.js +0 -52161
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v19.0.0-next.2
2
+ * @license Angular v19.0.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.0.0-next.2
2
+ * @license Angular v19.0.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.0.0-next.2
2
+ * @license Angular v19.0.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.0.0-next.2
2
+ * @license Angular v19.0.0-next.4
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 { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.2", ngImport: i0, type: TestBedApplicationErrorHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
179
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.2", ngImport: i0, type: TestBedApplicationErrorHandler }); }
178
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.4", ngImport: i0, type: TestBedApplicationErrorHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
179
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.4", ngImport: i0, type: TestBedApplicationErrorHandler }); }
180
180
  }
181
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.2", ngImport: i0, type: TestBedApplicationErrorHandler, decorators: [{
181
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.4", ngImport: i0, type: TestBedApplicationErrorHandler, decorators: [{
182
182
  type: Injectable
183
183
  }] });
184
184
 
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v19.0.0-next.2
2
+ * @license Angular v19.0.0-next.4
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -362,6 +362,104 @@ export declare function afterRender<E = never, W = never, M = never>(spec: {
362
362
  */
363
363
  export declare function afterRender(callback: VoidFunction, options?: AfterRenderOptions): AfterRenderRef;
364
364
 
365
+ /**
366
+ * Register an effect that, when triggered, is invoked when the application finishes rendering, during the
367
+ * `mixedReadWrite` phase.
368
+ *
369
+ * <div class="alert is-critical">
370
+ *
371
+ * You should prefer specifying an explicit phase for the effect instead, or you risk significant
372
+ * performance degradation.
373
+ *
374
+ * </div>
375
+ *
376
+ * Note that callback-based `afterRenderEffect`s will run
377
+ * - in the order it they are registered
378
+ * - only when dirty
379
+ * - on browser platforms only
380
+ * - during the `mixedReadWrite` phase
381
+ *
382
+ * <div class="alert is-important">
383
+ *
384
+ * Components are not guaranteed to be [hydrated](guide/hydration) before the callback runs.
385
+ * You must use caution when directly reading or writing the DOM and layout.
386
+ *
387
+ * </div>
388
+ *
389
+ * @param callback An effect callback function to register
390
+ * @param options Options to control the behavior of the callback
391
+ *
392
+ * @experimental
393
+ */
394
+ export declare function afterRenderEffect(callback: (onCleanup: EffectCleanupRegisterFn) => void, options?: Omit<AfterRenderOptions, 'phase'>): AfterRenderRef;
395
+
396
+ /**
397
+ * Register effects that, when triggered, are invoked when the application finishes rendering,
398
+ * during the specified phases. The available phases are:
399
+ * - `earlyRead`
400
+ * Use this phase to **read** from the DOM before a subsequent `write` callback, for example to
401
+ * perform custom layout that the browser doesn't natively support. Prefer the `read` phase if
402
+ * reading can wait until after the write phase. **Never** write to the DOM in this phase.
403
+ * - `write`
404
+ * Use this phase to **write** to the DOM. **Never** read from the DOM in this phase.
405
+ * - `mixedReadWrite`
406
+ * Use this phase to read from and write to the DOM simultaneously. **Never** use this phase if
407
+ * it is possible to divide the work among the other phases instead.
408
+ * - `read`
409
+ * Use this phase to **read** from the DOM. **Never** write to the DOM in this phase.
410
+ *
411
+ * <div class="alert is-critical">
412
+ *
413
+ * You should prefer using the `read` and `write` phases over the `earlyRead` and `mixedReadWrite`
414
+ * phases when possible, to avoid performance degradation.
415
+ *
416
+ * </div>
417
+ *
418
+ * Note that:
419
+ * - Effects run in the following phase order, only when dirty through signal dependencies:
420
+ * 1. `earlyRead`
421
+ * 2. `write`
422
+ * 3. `mixedReadWrite`
423
+ * 4. `read`
424
+ * - `afterRenderEffect`s in the same phase run in the order they are registered.
425
+ * - `afterRenderEffect`s run on browser platforms only, they will not run on the server.
426
+ * - `afterRenderEffect`s will run at least once.
427
+ *
428
+ * The first phase callback to run as part of this spec will receive no parameters. Each
429
+ * subsequent phase callback in this spec will receive the return value of the previously run
430
+ * phase callback as a `Signal`. This can be used to coordinate work across multiple phases.
431
+ *
432
+ * Angular is unable to verify or enforce that phases are used correctly, and instead
433
+ * relies on each developer to follow the guidelines documented for each value and
434
+ * carefully choose the appropriate one, refactoring their code if necessary. By doing
435
+ * so, Angular is better able to minimize the performance degradation associated with
436
+ * manual DOM access, ensuring the best experience for the end users of your application
437
+ * or library.
438
+ *
439
+ * <div class="alert is-important">
440
+ *
441
+ * Components are not guaranteed to be [hydrated](guide/hydration) before the callback runs.
442
+ * You must use caution when directly reading or writing the DOM and layout.
443
+ *
444
+ * </div>
445
+ *
446
+ * @param spec The effect functions to register
447
+ * @param options Options to control the behavior of the effects
448
+ *
449
+ * @usageNotes
450
+ *
451
+ * Use `afterRenderEffect` to create effects that will read or write from the DOM and thus should
452
+ * run after rendering.
453
+ *
454
+ * @experimental
455
+ */
456
+ export declare function afterRenderEffect<E = never, W = never, M = never>(spec: {
457
+ earlyRead?: (onCleanup: EffectCleanupRegisterFn) => E;
458
+ write?: (...args: [...ɵFirstAvailableSignal<[E]>, EffectCleanupRegisterFn]) => W;
459
+ mixedReadWrite?: (...args: [...ɵFirstAvailableSignal<[W, E]>, EffectCleanupRegisterFn]) => M;
460
+ read?: (...args: [...ɵFirstAvailableSignal<[M, W, E]>, EffectCleanupRegisterFn]) => void;
461
+ }, options?: Omit<AfterRenderOptions, 'phase'>): AfterRenderRef;
462
+
365
463
  declare type AfterRenderHook = (value?: unknown) => unknown;
366
464
 
367
465
  declare type AfterRenderHooks = [
@@ -1458,11 +1556,11 @@ export declare class Compiler {
1458
1556
  */
1459
1557
  compileModuleAsync<T>(moduleType: Type<T>): Promise<NgModuleFactory<T>>;
1460
1558
  /**
1461
- * Same as {@link #compileModuleSync} but also creates ComponentFactories for all components.
1559
+ * Same as {@link Compiler#compileModuleSync compileModuleSync} but also creates ComponentFactories for all components.
1462
1560
  */
1463
1561
  compileModuleAndAllComponentsSync<T>(moduleType: Type<T>): ModuleWithComponentFactories<T>;
1464
1562
  /**
1465
- * Same as {@link #compileModuleAsync} but also creates ComponentFactories for all components.
1563
+ * Same as {@link Compiler#compileModuleAsync compileModuleAsync} but also creates ComponentFactories for all components.
1466
1564
  */
1467
1565
  compileModuleAndAllComponentsAsync<T>(moduleType: Type<T>): Promise<ModuleWithComponentFactories<T>>;
1468
1566
  /**
@@ -3962,6 +4060,9 @@ declare const ENVIRONMENT = 10;
3962
4060
  * A multi-provider token for initialization functions that will run upon construction of an
3963
4061
  * environment injector.
3964
4062
  *
4063
+ * Note: As opposed to the `APP_INITIALIZER` token, the `ENVIRONMENT_INITIALIZER` functions are not awaited,
4064
+ * hence they should not be `async`.
4065
+ *
3965
4066
  * @publicApi
3966
4067
  */
3967
4068
  export declare const ENVIRONMENT_INITIALIZER: InjectionToken<readonly (() => void)[]>;
@@ -4232,6 +4333,7 @@ export declare interface ExistingSansProvider {
4232
4333
  */
4233
4334
  export declare class ExperimentalPendingTasks {
4234
4335
  private internalPendingTasks;
4336
+ private scheduler;
4235
4337
  /**
4236
4338
  * Adds a new task that should block application's stability.
4237
4339
  * @returns A cleanup function that removes a task when called.
@@ -12854,6 +12956,12 @@ export declare function ɵfindLocaleData(locale: string): any;
12854
12956
  */
12855
12957
  export declare type ɵFirstAvailable<T extends unknown[]> = T extends [infer H, ...infer R] ? [H] extends [never] ? ɵFirstAvailable<R> : [H] : [];
12856
12958
 
12959
+ /**
12960
+ * An argument list containing the first non-never type in the given type array, or an empty
12961
+ * argument list if there are no non-never types in the type array.
12962
+ */
12963
+ export declare type ɵFirstAvailableSignal<T extends unknown[]> = T extends [infer H, ...infer R] ? [H] extends [never] ? ɵFirstAvailableSignal<R> : [Signal<H>] : [];
12964
+
12857
12965
  /**
12858
12966
  * Loops over queued module definitions, if a given module definition has all of its
12859
12967
  * declarations resolved, it dequeues that module definition and sets the scope on
@@ -13392,7 +13500,8 @@ export declare const enum ɵNotificationSource {
13392
13500
  DeferredRenderHook = 8,
13393
13501
  ViewAttached = 9,
13394
13502
  ViewDetachedFromDOM = 10,
13395
- AsyncAnimationsLoaded = 11
13503
+ AsyncAnimationsLoaded = 11,
13504
+ PendingTaskRemoved = 12
13396
13505
  }
13397
13506
 
13398
13507
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/core",
3
- "version": "19.0.0-next.2",
3
+ "version": "19.0.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.0.0-next.2
2
+ * @license Angular v19.0.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.0.0-next.2
2
+ * @license Angular v19.0.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.0.0-next.2
2
+ * @license Angular v19.0.0-next.4
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */