@angular/core 16.0.0-next.3 → 16.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 (59) hide show
  1. package/esm2020/src/application_tokens.mjs +33 -1
  2. package/esm2020/src/change_detection/change_detector_ref.mjs +4 -4
  3. package/esm2020/src/compiler/compiler_facade_interface.mjs +1 -1
  4. package/esm2020/src/core.mjs +2 -2
  5. package/esm2020/src/core_private_export.mjs +2 -1
  6. package/esm2020/src/core_reactivity_export_internal.mjs +1 -1
  7. package/esm2020/src/core_render3_private_export.mjs +1 -2
  8. package/esm2020/src/di/r3_injector.mjs +8 -1
  9. package/esm2020/src/errors.mjs +1 -1
  10. package/esm2020/src/hydration/annotate.mjs +118 -5
  11. package/esm2020/src/hydration/api.mjs +14 -1
  12. package/esm2020/src/hydration/cleanup.mjs +54 -3
  13. package/esm2020/src/hydration/compression.mjs +69 -0
  14. package/esm2020/src/hydration/error_handling.mjs +357 -15
  15. package/esm2020/src/hydration/interfaces.mjs +17 -1
  16. package/esm2020/src/hydration/node_lookup_utils.mjs +199 -7
  17. package/esm2020/src/hydration/utils.mjs +16 -3
  18. package/esm2020/src/hydration/views.mjs +19 -15
  19. package/esm2020/src/linker/destroy_ref.mjs +5 -2
  20. package/esm2020/src/linker/view_container_ref.mjs +8 -7
  21. package/esm2020/src/metadata/directives.mjs +8 -3
  22. package/esm2020/src/render3/instructions/element.mjs +16 -9
  23. package/esm2020/src/render3/instructions/element_container.mjs +2 -5
  24. package/esm2020/src/render3/instructions/element_validation.mjs +2 -2
  25. package/esm2020/src/render3/instructions/projection.mjs +7 -4
  26. package/esm2020/src/render3/instructions/template.mjs +4 -7
  27. package/esm2020/src/render3/instructions/text.mjs +6 -6
  28. package/esm2020/src/render3/interfaces/public_definitions.mjs +1 -1
  29. package/esm2020/src/render3/interfaces/type_checks.mjs +4 -1
  30. package/esm2020/src/render3/node_manipulation.mjs +2 -2
  31. package/esm2020/src/render3/node_selector_matcher.mjs +17 -5
  32. package/esm2020/src/render3/util/view_utils.mjs +12 -1
  33. package/esm2020/src/render3/view_ref.mjs +1 -1
  34. package/esm2020/src/signals/index.mjs +2 -1
  35. package/esm2020/src/signals/src/computed.mjs +3 -3
  36. package/esm2020/src/signals/src/effect.mjs +1 -3
  37. package/esm2020/src/signals/src/signal.mjs +3 -3
  38. package/esm2020/src/signals/src/watch.mjs +3 -3
  39. package/esm2020/src/signals/src/weak_ref.mjs +18 -2
  40. package/esm2020/src/util/ng_dev_mode.mjs +2 -1
  41. package/esm2020/src/version.mjs +1 -1
  42. package/esm2020/testing/src/logger.mjs +3 -3
  43. package/esm2020/testing/src/ng_zone_mock.mjs +3 -3
  44. package/esm2020/testing/src/test_bed_compiler.mjs +12 -7
  45. package/fesm2015/core.mjs +1066 -178
  46. package/fesm2015/core.mjs.map +1 -1
  47. package/fesm2015/testing.mjs +816 -68
  48. package/fesm2015/testing.mjs.map +1 -1
  49. package/fesm2020/core.mjs +1051 -170
  50. package/fesm2020/core.mjs.map +1 -1
  51. package/fesm2020/testing.mjs +810 -67
  52. package/fesm2020/testing.mjs.map +1 -1
  53. package/index.d.ts +128 -216
  54. package/package.json +1 -1
  55. package/schematics/migrations/relative-link-resolution/bundle.js +7 -7
  56. package/schematics/migrations/router-link-with-href/bundle.js +10 -10
  57. package/schematics/ng-generate/standalone-migration/bundle.js +473 -376
  58. package/schematics/ng-generate/standalone-migration/bundle.js.map +2 -2
  59. package/testing/index.d.ts +1 -1
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v16.0.0-next.3
2
+ * @license Angular v16.0.0-next.4
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -813,6 +813,9 @@ export declare abstract class ChangeDetectorRef {
813
813
  abstract reattach(): void;
814
814
  }
815
815
 
816
+ declare interface ChangeDetectorRefInterface extends ChangeDetectorRef {
817
+ }
818
+
816
819
  declare const CHILD_HEAD = 13;
817
820
 
818
821
  declare const CHILD_TAIL = 14;
@@ -1588,78 +1591,6 @@ export declare interface ConstructorSansProvider {
1588
1591
  deps?: any[];
1589
1592
  }
1590
1593
 
1591
- /**
1592
- * Represents a reader that can depend on reactive values (`Producer`s) and receive
1593
- * notifications when those values change.
1594
- *
1595
- * `Consumer`s do not wrap the reads they consume themselves, but rather can be set
1596
- * as the active reader via `setActiveConsumer`.
1597
- *
1598
- * The set of dependencies of a `Consumer` is dynamic. Implementers expose a
1599
- * monotonically increasing `trackingVersion` counter, which increments whenever
1600
- * the `Consumer` is about to re-run any reactive reads it needs and establish a
1601
- * new set of dependencies as a result.
1602
- *
1603
- * `Producer`s store the last `trackingVersion` they've seen from `Consumer`s which
1604
- * have read them. This allows a `Producer` to identify whether its record of the
1605
- * dependency is current or stale, by comparing the `Consumer`'s `trackingVersion`
1606
- * to the version at which the dependency was established.
1607
- */
1608
- declare interface Consumer {
1609
- /**
1610
- * Numeric identifier of this `Producer`.
1611
- *
1612
- * May also be used to satisfy the interface for `Producer`.
1613
- */
1614
- readonly id: ConsumerId;
1615
- /**
1616
- * A `WeakRef` to this `Consumer` instance.
1617
- *
1618
- * An implementer provides this as a cached value to avoid the need to instantiate
1619
- * multiple `WeakRef` instances for the same `Consumer`.
1620
- *
1621
- * May also be used to satisfy the interface for `Producer`.
1622
- */
1623
- readonly ref: WeakRef<Consumer>;
1624
- /**
1625
- * A map of `Edge`s to `Producer` dependencies, keyed by the `ProducerId`.
1626
- *
1627
- * Used to poll `Producer`s to determine if the `Consumer` has really updated
1628
- * or not.
1629
- */
1630
- readonly producers: Map<ProducerId, Edge>;
1631
- /**
1632
- * Monotonically increasing counter representing a version of this `Consumer`'s
1633
- * dependencies.
1634
- */
1635
- readonly trackingVersion: number;
1636
- /**
1637
- * Called when a `Producer` dependency of this `Consumer` indicates it may
1638
- * have a new value.
1639
- *
1640
- * Notification alone does not mean the `Producer` has definitely produced a
1641
- * semantically different value, only that it _may_ have changed. Before a
1642
- * `Consumer` re-runs any computations or side effects, it should use the
1643
- * `consumerPollValueStatus` method to poll the `Producer`s on which it depends
1644
- * and determine if any of them have actually updated.
1645
- */
1646
- notify(): void;
1647
- }
1648
-
1649
- /**
1650
- * Identifier for a `Consumer`, which is a branded `number`.
1651
- *
1652
- * Note that `ProducerId` and `ConsumerId` are assigned from the same sequence, so the same `number`
1653
- * will never be used for both.
1654
- *
1655
- * Branding provides additional type safety by ensuring that `ProducerId` and `ConsumerId` are
1656
- * mutually unassignable without a cast. Since several `Map`s are keyed by these IDs, this prevents
1657
- * `ConsumerId`s from being inadvertently used to look up `Producer`s or vice versa.
1658
- */
1659
- declare type ConsumerId = number & {
1660
- __consumer: true;
1661
- };
1662
-
1663
1594
  declare const CONTAINERS = "c";
1664
1595
 
1665
1596
  /**
@@ -1974,6 +1905,15 @@ export declare function createPlatform(injector: Injector): PlatformRef;
1974
1905
  */
1975
1906
  export declare function createPlatformFactory(parentPlatformFactory: ((extraProviders?: StaticProvider[]) => PlatformRef) | null, name: string, providers?: StaticProvider[]): (extraProviders?: StaticProvider[]) => PlatformRef;
1976
1907
 
1908
+ /**
1909
+ * Token used to configure the [Content Security Policy](https://web.dev/strict-csp/) nonce that
1910
+ * Angular will apply when inserting inline styles. If not provided, Angular will look up its value
1911
+ * from the `ngCspNonce` attribute of the application root node.
1912
+ *
1913
+ * @publicApi
1914
+ */
1915
+ export declare const CSP_NONCE: InjectionToken<string | null>;
1916
+
1977
1917
 
1978
1918
  /**
1979
1919
  * Expresses a single CSS Selector.
@@ -2328,6 +2268,18 @@ declare interface DehydratedView {
2328
2268
  segmentHeads?: {
2329
2269
  [index: number]: RNode | null;
2330
2270
  };
2271
+ /**
2272
+ * An instance of a Set that represents nodes disconnected from
2273
+ * the DOM tree at the serialization time, but otherwise present
2274
+ * in the internal data structures.
2275
+ *
2276
+ * The Set is based on the `SerializedView[DISCONNECTED_NODES]` data
2277
+ * and is needed to have constant-time lookups.
2278
+ *
2279
+ * If the value is `null`, it means that there were no disconnected
2280
+ * nodes detected in this view at serialization time.
2281
+ */
2282
+ disconnectedNodes?: Set<number> | null;
2331
2283
  }
2332
2284
 
2333
2285
  declare type DependencyTypeList = (ɵDirectiveType<any> | ɵComponentType<any> | PipeType<any> | Type<any>)[];
@@ -2366,12 +2318,27 @@ export declare function destroyPlatform(): void;
2366
2318
  * The scope of this destruction depends on where `DestroyRef` is injected. If `DestroyRef`
2367
2319
  * is injected in a component or directive, the callbacks run when that component or
2368
2320
  * directive is destroyed. Otherwise the callbacks run when a corresponding injector is destroyed.
2321
+ *
2322
+ * @publicApi
2369
2323
  */
2370
2324
  export declare abstract class DestroyRef {
2371
2325
  /**
2372
- * Registers a destroy callback in a given lifecycle scope.
2326
+ * Registers a destroy callback in a given lifecycle scope. Returns a cleanup function that can
2327
+ * be invoked to unregister the callback.
2328
+ *
2329
+ * @usageNotes
2330
+ * ### Example
2331
+ * ```typescript
2332
+ * const destroyRef = inject(DestroyRef);
2333
+ *
2334
+ * // register a destroy callback
2335
+ * const unregisterFn = destroyRef.onDestroy(() => doSomethingOnDestroy());
2336
+ *
2337
+ * // stop the destroy callback from executing if needed
2338
+ * unregisterFn();
2339
+ * ```
2373
2340
  */
2374
- abstract onDestroy(callback: () => void): void;
2341
+ abstract onDestroy(callback: () => void): () => void;
2375
2342
  }
2376
2343
 
2377
2344
  /**
@@ -2413,13 +2380,19 @@ export declare interface Directive {
2413
2380
  * Enumerates the set of data-bound input properties for a directive
2414
2381
  *
2415
2382
  * Angular automatically updates input properties during change detection.
2416
- * The `inputs` property defines a set of `directiveProperty` to `bindingProperty`
2417
- * configuration:
2383
+ * The `inputs` property accepts either strings or object literals that configure the directive
2384
+ * properties that should be exposed as inputs.
2418
2385
  *
2419
- * - `directiveProperty` specifies the component property where the value is written.
2420
- * - `bindingProperty` specifies the DOM property where the value is read from.
2386
+ * When an object literal is passed in, the `name` property indicates which property on the
2387
+ * class the input should write to, while the `alias` determines the name under
2388
+ * which the input will be available in template bindings. The `required` property indicates that
2389
+ * the input is required which will trigger a compile-time error if it isn't passed in when the
2390
+ * directive is used.
2421
2391
  *
2422
- * When `bindingProperty` is not provided, it is assumed to be equal to `directiveProperty`.
2392
+ * When a string is passed into the `inputs` array, it can have a format of `'name'` or
2393
+ * `'name: alias'` where `name` is the property on the class that the directive should write
2394
+ * to, while the `alias` determines the name under which the input will be available in
2395
+ * template bindings. String-based input definitions are assumed to be optional.
2423
2396
  *
2424
2397
  * @usageNotes
2425
2398
  *
@@ -2428,7 +2401,7 @@ export declare interface Directive {
2428
2401
  * ```typescript
2429
2402
  * @Component({
2430
2403
  * selector: 'bank-account',
2431
- * inputs: ['bankName', 'id: account-id'],
2404
+ * inputs: ['bankName', {name: 'id', alias: 'account-id'}],
2432
2405
  * template: `
2433
2406
  * Bank Name: {{bankName}}
2434
2407
  * Account Id: {{id}}
@@ -2441,18 +2414,22 @@ export declare interface Directive {
2441
2414
  * ```
2442
2415
  *
2443
2416
  */
2444
- inputs?: string[];
2417
+ inputs?: ({
2418
+ name: string;
2419
+ alias?: string;
2420
+ required?: boolean;
2421
+ } | string)[];
2445
2422
  /**
2446
2423
  * Enumerates the set of event-bound output properties.
2447
2424
  *
2448
2425
  * When an output property emits an event, an event handler attached to that event
2449
2426
  * in the template is invoked.
2450
2427
  *
2451
- * The `outputs` property defines a set of `directiveProperty` to `bindingProperty`
2428
+ * The `outputs` property defines a set of `directiveProperty` to `alias`
2452
2429
  * configuration:
2453
2430
  *
2454
2431
  * - `directiveProperty` specifies the component property that emits events.
2455
- * - `bindingProperty` specifies the DOM property the event handler is attached to.
2432
+ * - `alias` specifies the DOM property the event handler is attached to.
2456
2433
  *
2457
2434
  * @usageNotes
2458
2435
  *
@@ -2862,6 +2839,8 @@ declare type DirectiveDefList = (ɵDirectiveDef<any> | ɵComponentDef<any>)[];
2862
2839
  */
2863
2840
  declare type DirectiveDefListOrFactory = (() => DirectiveDefList) | DirectiveDefList;
2864
2841
 
2842
+ declare const DISCONNECTED_NODES = "d";
2843
+
2865
2844
  /**
2866
2845
  * @description
2867
2846
  * Hook for manual bootstrapping of the application instead of using `bootstrap` array in @NgModule
@@ -2928,60 +2907,25 @@ export declare interface DoCheck {
2928
2907
  }
2929
2908
 
2930
2909
  /**
2931
- * A bidirectional edge in the producer-consumer dependency graph.
2910
+ * Create a global `Effect` for the given reactive function.
2911
+ *
2912
+ * @developerPreview
2932
2913
  */
2933
- declare interface Edge {
2934
- /**
2935
- * Weakly held reference to the `Consumer` side of this edge.
2936
- */
2937
- readonly consumerRef: WeakRef<Consumer>;
2938
- /**
2939
- * Weakly held reference to the `Producer` side of this edge.
2940
- */
2941
- readonly producerRef: WeakRef<Producer>;
2942
- /**
2943
- * `trackingVersion` of the `Consumer` at which this dependency edge was last observed.
2944
- *
2945
- * If this doesn't match the `Consumer`'s current `trackingVersion`, then this dependency record
2946
- * is stale, and needs to be cleaned up.
2947
- */
2948
- atTrackingVersion: number;
2949
- /**
2950
- * `valueVersion` of the `Producer` at the time this dependency was last accessed.
2951
- *
2952
- * This is used by `consumerPollValueStatus` to determine whether a `Consumer`'s dependencies have
2953
- * semantically changed.
2954
- */
2955
- seenValueVersion: number;
2956
- }
2914
+ export declare function effect(effectFn: () => void): EffectRef;
2915
+
2957
2916
 
2958
2917
  /**
2959
- * A global reactive effect, which can be manually scheduled or destroyed.
2918
+ * A global reactive effect, which can be manually destroyed.
2960
2919
  *
2961
2920
  * @developerPreview
2962
2921
  */
2963
- export declare interface Effect {
2964
- /**
2965
- * Schedule the effect for manual execution, if it's not already.
2966
- */
2967
- schedule(): void;
2922
+ export declare interface EffectRef {
2968
2923
  /**
2969
2924
  * Shut down the effect, removing it from any upcoming scheduled executions.
2970
2925
  */
2971
2926
  destroy(): void;
2972
- /**
2973
- * Direct access to the effect's `Consumer` for advanced use cases.
2974
- */
2975
- readonly consumer: Consumer;
2976
2927
  }
2977
2928
 
2978
- /**
2979
- * Create a global `Effect` for the given reactive function.
2980
- *
2981
- * @developerPreview
2982
- */
2983
- export declare function effect(effectFn: () => void): Effect;
2984
-
2985
2929
  /**
2986
2930
  * Keys within serialized view data structure to represent various
2987
2931
  * parts. See the `SerializedView` interface below for additional information.
@@ -4606,7 +4550,11 @@ export declare interface Input {
4606
4550
  /**
4607
4551
  * The name of the DOM property to which the input property is bound.
4608
4552
  */
4609
- bindingPropertyName?: string;
4553
+ alias?: string;
4554
+ /**
4555
+ * Whether the input is required for the directive to function.
4556
+ */
4557
+ required?: boolean;
4610
4558
  }
4611
4559
 
4612
4560
  /**
@@ -4664,8 +4612,8 @@ export declare interface InputDecorator {
4664
4612
  *
4665
4613
  * @see [Input and Output properties](guide/inputs-outputs)
4666
4614
  */
4667
- (bindingPropertyName?: string): any;
4668
- new (bindingPropertyName?: string): any;
4615
+ (arg?: string | Input): any;
4616
+ new (arg?: string | Input): any;
4669
4617
  }
4670
4618
 
4671
4619
  /**
@@ -5538,6 +5486,8 @@ export declare interface ModuleWithProviders<T> {
5538
5486
 
5539
5487
  declare const MOVED_VIEWS = 9;
5540
5488
 
5489
+ declare const MULTIPLIER = "x";
5490
+
5541
5491
  declare type Mutable<T extends {
5542
5492
  [x: string]: any;
5543
5493
  }, K extends string> = {
@@ -5994,6 +5944,8 @@ export declare class NgZone {
5994
5944
  */
5995
5945
  export declare const NO_ERRORS_SCHEMA: SchemaMetadata;
5996
5946
 
5947
+ declare const NODES = "n";
5948
+
5997
5949
  declare const NUM_ROOT_NODES = "r";
5998
5950
 
5999
5951
  declare const ON_DESTROY_HOOKS = 22;
@@ -6134,7 +6086,7 @@ export declare interface Output {
6134
6086
  /**
6135
6087
  * The name of the DOM property to which the output property is bound.
6136
6088
  */
6137
- bindingPropertyName?: string;
6089
+ alias?: string;
6138
6090
  }
6139
6091
 
6140
6092
  /**
@@ -6165,8 +6117,8 @@ export declare interface OutputDecorator {
6165
6117
  * @see [Input and Output properties](guide/inputs-outputs)
6166
6118
  *
6167
6119
  */
6168
- (bindingPropertyName?: string): any;
6169
- new (bindingPropertyName?: string): any;
6120
+ (alias?: string): any;
6121
+ new (alias?: string): any;
6170
6122
  }
6171
6123
 
6172
6124
  /**
@@ -6428,74 +6380,6 @@ declare const enum PreOrderHookFlags {
6428
6380
  */
6429
6381
  declare type ProcessProvidersFunction = (providers: Provider[]) => Provider[];
6430
6382
 
6431
- /**
6432
- * Represents a value that can be read reactively, and can notify readers (`Consumer`s)
6433
- * when it changes.
6434
- *
6435
- * Producers maintain a weak reference to any `Consumer`s which may depend on the
6436
- * producer's value.
6437
- *
6438
- * Implementers of `Producer` expose a monotonic `valueVersion` counter, and are responsible
6439
- * for incrementing this version when their value semantically changes. Some Producers may
6440
- * produce this value lazily and thus at times need to be polled for potential updates to
6441
- * their value (and by extension their `valueVersion`). This is accomplished via the
6442
- * `checkForChangedValue` method for Producers, which should perform whatever calculations
6443
- * are necessary to ensure `valueVersion` is up to date.
6444
- *
6445
- * `Producer`s support two operations:
6446
- * * `producerNotifyConsumers`
6447
- * * `producerAccessed`
6448
- */
6449
- declare interface Producer {
6450
- /**
6451
- * Numeric identifier of this `Producer`.
6452
- *
6453
- * May also be used to satisfy the interface for `Consumer`.
6454
- */
6455
- readonly id: ProducerId;
6456
- /**
6457
- * A `WeakRef` to this `Producer` instance.
6458
- *
6459
- * An implementer provides this as a cached value to avoid the need to instantiate
6460
- * multiple `WeakRef` instances for the same `Producer`.
6461
- *
6462
- * May also be used to satisfy the interface for `Consumer`.
6463
- */
6464
- readonly ref: WeakRef<Producer>;
6465
- /**
6466
- * A map of dependency `Edge`s to `Consumer`s, keyed by the `ConsumerId`.
6467
- *
6468
- * Used when the produced value changes to notify interested `Consumer`s.
6469
- */
6470
- readonly consumers: Map<ConsumerId, Edge>;
6471
- /**
6472
- * Monotonically increasing counter which increases when the value of this `Producer`
6473
- * semantically changes.
6474
- */
6475
- readonly valueVersion: number;
6476
- /**
6477
- * Ensure that `valueVersion` is up to date for the `Producer`'s value.
6478
- *
6479
- * Some `Producer`s may produce values lazily, and thus require polling before their
6480
- * `valueVersion` can be compared with the version captured during a previous read.
6481
- */
6482
- checkForChangedValue(): void;
6483
- }
6484
-
6485
- /**
6486
- * Identifier for a `Producer`, which is a branded `number`.
6487
- *
6488
- * Note that `ProducerId` and `ConsumerId` are assigned from the same sequence, so the same `number`
6489
- * will never be used for both.
6490
- *
6491
- * Branding provides additional type safety by ensuring that `ProducerId` and `ConsumerId` are
6492
- * mutually unassignable without a cast. Since several `Map`s are keyed by these IDs, this prevents
6493
- * `ProducerId`s from being inadvertently used to look up `Consumer`s or vice versa.
6494
- */
6495
- declare type ProducerId = number & {
6496
- __producer: true;
6497
- };
6498
-
6499
6383
  /**
6500
6384
  * List of slots for a projection. A slot can be either based on a parsed CSS selector
6501
6385
  * which will be used to determine nodes which are projected into that slot.
@@ -6894,7 +6778,7 @@ declare class R3Injector extends EnvironmentInjector {
6894
6778
  * hook was found.
6895
6779
  */
6896
6780
  destroy(): void;
6897
- onDestroy(callback: () => void): void;
6781
+ onDestroy(callback: () => void): () => void;
6898
6782
  runInContext<ReturnT>(fn: () => ReturnT): ReturnT;
6899
6783
  get<T>(token: ProviderToken<T>, notFoundValue?: any, flags?: InjectFlags | InjectOptions): T;
6900
6784
  toString(): string;
@@ -6905,6 +6789,7 @@ declare class R3Injector extends EnvironmentInjector {
6905
6789
  private processProvider;
6906
6790
  private hydrate;
6907
6791
  private injectableDefInScope;
6792
+ private removeOnDestroy;
6908
6793
  }
6909
6794
 
6910
6795
  declare interface RComment extends RNode {
@@ -7741,6 +7626,12 @@ declare const enum RuntimeErrorCode {
7741
7626
  ASYNC_INITIALIZERS_STILL_RUNNING = 405,
7742
7627
  APPLICATION_REF_ALREADY_DESTROYED = 406,
7743
7628
  RENDERER_NOT_FOUND = 407,
7629
+ HYDRATION_NODE_MISMATCH = 500,
7630
+ HYDRATION_MISSING_SIBLINGS = 501,
7631
+ HYDRATION_MISSING_NODE = 502,
7632
+ UNSUPPORTED_PROJECTION_DOM_NODES = 503,
7633
+ INVALID_SKIP_HYDRATION_HOST = 504,
7634
+ HYDRATION_I18N_NOT_YET_SUPPORTED = 518,
7744
7635
  INVALID_I18N_STRUCTURE = 700,
7745
7636
  MISSING_LOCALE_DATA = 701,
7746
7637
  IMPORT_PROVIDERS_FROM_STANDALONE = 800,
@@ -7886,6 +7777,12 @@ declare interface SerializedContainerView extends SerializedView {
7886
7777
  * and identify segments that belong to different views.
7887
7778
  */
7888
7779
  [NUM_ROOT_NODES]: number;
7780
+ /**
7781
+ * Number of times this view is repeated.
7782
+ * This is used to avoid serializing and sending the same hydration
7783
+ * information about similar views (for example, produced by *ngFor).
7784
+ */
7785
+ [MULTIPLIER]?: number;
7889
7786
  }
7890
7787
 
7891
7788
  /**
@@ -7923,6 +7820,22 @@ declare interface SerializedView {
7923
7820
  * of serialized information about views within this container.
7924
7821
  */
7925
7822
  [CONTAINERS]?: Record<number, SerializedContainerView[]>;
7823
+ /**
7824
+ * Serialized information about nodes in a template.
7825
+ * Key-value pairs where a key is an index of the corresponding
7826
+ * DOM node in an LView and the value is a path that describes
7827
+ * the location of this node (as a set of navigation instructions).
7828
+ */
7829
+ [NODES]?: Record<number, string>;
7830
+ /**
7831
+ * A list of ids which represents a set of nodes disconnected
7832
+ * from the DOM tree at the serialization time, but otherwise
7833
+ * present in the internal data structures.
7834
+ *
7835
+ * This information is used to avoid triggering the hydration
7836
+ * logic for such nodes and instead use a regular "creation mode".
7837
+ */
7838
+ [DISCONNECTED_NODES]?: number[];
7926
7839
  }
7927
7840
 
7928
7841
  /**
@@ -10141,9 +10054,6 @@ declare enum ViewEncapsulation_2 {
10141
10054
  ShadowDom = 3
10142
10055
  }
10143
10056
 
10144
- declare interface viewEngine_ChangeDetectorRef_interface extends ChangeDetectorRef {
10145
- }
10146
-
10147
10057
  /**
10148
10058
  * Definition of what a view queries function should look like.
10149
10059
  */
@@ -10190,8 +10100,6 @@ declare interface WeakRef<T extends object> {
10190
10100
  deref(): T | undefined;
10191
10101
  }
10192
10102
 
10193
- declare const WeakRef: WeakRefCtor;
10194
-
10195
10103
  declare interface WeakRefCtor {
10196
10104
  new <T extends object>(value: T): WeakRef<T>;
10197
10105
  }
@@ -10814,13 +10722,6 @@ export declare function ɵflushModuleScopingQueueAsMuchAsPossible(): void;
10814
10722
  */
10815
10723
  export declare function ɵformatRuntimeError<T extends number = RuntimeErrorCode>(code: T, message: null | false | string): string;
10816
10724
 
10817
- /**
10818
- * The following getter methods retrieve the definition from the type. Currently the retrieval
10819
- * honors inheritance, but in the future we may change the rule to require that definitions are
10820
- * explicit. This would require some sort of migration strategy.
10821
- */
10822
- export declare function ɵgetComponentDef<T>(type: any): ɵComponentDef<T> | null;
10823
-
10824
10725
  /**
10825
10726
  * Retrieves directive instances associated with a given DOM node. Does not include
10826
10727
  * component instances.
@@ -11620,6 +11521,11 @@ export declare interface ɵSafeValue {
11620
11521
  */
11621
11522
  export declare function ɵsetAllowDuplicateNgModuleIdsForTest(allowDuplicates: boolean): void;
11622
11523
 
11524
+ /**
11525
+ * Use an alternate implementation of `WeakRef` if a platform implementation isn't available.
11526
+ */
11527
+ export declare function ɵsetAlternateWeakRefImpl(impl: WeakRefCtor): void;
11528
+
11623
11529
  /**
11624
11530
  * Adds decorator, constructor, and property metadata to a given type via static metadata fields
11625
11531
  * on the type.
@@ -11776,7 +11682,7 @@ export declare function ɵunwrapSafeValue(value: ɵSafeValue): string;
11776
11682
 
11777
11683
  export declare function ɵunwrapSafeValue<T>(value: T): T;
11778
11684
 
11779
- export declare class ɵViewRef<T> implements EmbeddedViewRef<T>, InternalViewRef, viewEngine_ChangeDetectorRef_interface {
11685
+ export declare class ɵViewRef<T> implements EmbeddedViewRef<T>, InternalViewRef, ChangeDetectorRefInterface {
11780
11686
  /**
11781
11687
  * This represents the `LView` associated with the point where `ChangeDetectorRef` was
11782
11688
  * requested.
@@ -12647,7 +12553,10 @@ export declare function ɵɵclassProp(className: string, value: boolean | undefi
12647
12553
  * @publicApi
12648
12554
  */
12649
12555
  export declare type ɵɵComponentDeclaration<T, Selector extends String, ExportAs extends string[], InputMap extends {
12650
- [key: string]: string;
12556
+ [key: string]: string | {
12557
+ alias: string | null;
12558
+ required: boolean;
12559
+ };
12651
12560
  }, OutputMap extends {
12652
12561
  [key: string]: string;
12653
12562
  }, QueryFields extends string[], NgContentSelectors extends string[], IsStandalone extends boolean = false, HostDirectives = never> = unknown;
@@ -12822,7 +12731,10 @@ export declare function ɵɵdefinePipe<T>(pipeDef: {
12822
12731
  * @publicApi
12823
12732
  */
12824
12733
  export declare type ɵɵDirectiveDeclaration<T, Selector extends string, ExportAs extends string[], InputMap extends {
12825
- [key: string]: string;
12734
+ [key: string]: string | {
12735
+ alias: string | null;
12736
+ required: boolean;
12737
+ };
12826
12738
  }, OutputMap extends {
12827
12739
  [key: string]: string;
12828
12740
  }, QueryFields extends string[], NgContentSelectors extends never = never, IsStandalone extends boolean = false, HostDirectives = never> = unknown;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/core",
3
- "version": "16.0.0-next.3",
3
+ "version": "16.0.0-next.4",
4
4
  "description": "Angular - the core framework",
5
5
  "author": "angular",
6
6
  "license": "MIT",
@@ -56,7 +56,7 @@ var __async = (__this, __arguments, generator) => {
56
56
  });
57
57
  };
58
58
 
59
- // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/migrations/relative-link-resolution/index.mjs
59
+ // bazel-out/k8-fastbuild/bin/packages/core/schematics/migrations/relative-link-resolution/index.mjs
60
60
  var relative_link_resolution_exports = {};
61
61
  __export(relative_link_resolution_exports, {
62
62
  default: () => relative_link_resolution_default
@@ -65,7 +65,7 @@ module.exports = __toCommonJS(relative_link_resolution_exports);
65
65
  var import_schematics = require("@angular-devkit/schematics");
66
66
  var import_path2 = require("path");
67
67
 
68
- // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/project_tsconfig_paths.mjs
68
+ // bazel-out/k8-fastbuild/bin/packages/core/schematics/utils/project_tsconfig_paths.mjs
69
69
  var import_core = require("@angular-devkit/core");
70
70
  function getProjectTsConfigPaths(tree) {
71
71
  return __async(this, null, function* () {
@@ -145,11 +145,11 @@ function getWorkspace(tree) {
145
145
  });
146
146
  }
147
147
 
148
- // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
148
+ // bazel-out/k8-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
149
149
  var import_path = require("path");
150
150
  var import_typescript2 = __toESM(require("typescript"), 1);
151
151
 
152
- // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/parse_tsconfig.mjs
152
+ // bazel-out/k8-fastbuild/bin/packages/core/schematics/utils/typescript/parse_tsconfig.mjs
153
153
  var path = __toESM(require("path"), 1);
154
154
  var import_typescript = __toESM(require("typescript"), 1);
155
155
  function parseTsconfigFile(tsconfigPath, basePath) {
@@ -166,7 +166,7 @@ function parseTsconfigFile(tsconfigPath, basePath) {
166
166
  return import_typescript.default.parseJsonConfigFileContent(config, parseConfigHost, basePath, {});
167
167
  }
168
168
 
169
- // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
169
+ // bazel-out/k8-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
170
170
  function createMigrationProgram(tree, tsconfigPath, basePath, fakeFileRead, additionalFiles) {
171
171
  const { rootNames, options, host } = createProgramOptions(tree, tsconfigPath, basePath, fakeFileRead, additionalFiles);
172
172
  return import_typescript2.default.createProgram(rootNames, options, host);
@@ -199,7 +199,7 @@ function canMigrateFile(basePath, sourceFile, program) {
199
199
  return !(0, import_path.relative)(basePath, sourceFile.fileName).startsWith("..");
200
200
  }
201
201
 
202
- // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/migrations/relative-link-resolution/util.mjs
202
+ // bazel-out/k8-fastbuild/bin/packages/core/schematics/migrations/relative-link-resolution/util.mjs
203
203
  var import_typescript3 = __toESM(require("typescript"), 1);
204
204
  var relativeLinkResolution = "relativeLinkResolution";
205
205
  var knownConfigValues = /* @__PURE__ */ new Set([`'legacy'`, `'corrected'`]);
@@ -239,7 +239,7 @@ function sortByStartPosDescending(rewrites) {
239
239
  return rewrites.sort((entityA, entityB) => entityB.startPos - entityA.startPos);
240
240
  }
241
241
 
242
- // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/migrations/relative-link-resolution/index.mjs
242
+ // bazel-out/k8-fastbuild/bin/packages/core/schematics/migrations/relative-link-resolution/index.mjs
243
243
  function relative_link_resolution_default() {
244
244
  return (tree) => __async(this, null, function* () {
245
245
  const { buildPaths, testPaths } = yield getProjectTsConfigPaths(tree);