@angular/core 19.1.0 → 19.1.1

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 (35) hide show
  1. package/fesm2022/core.mjs +247 -240
  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 +1 -1
  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/apply_import_manager-5082ccea.js +1 -1
  13. package/schematics/bundles/checker-aa999c96.js +2 -2
  14. package/schematics/bundles/cleanup-unused-imports.js +1 -1
  15. package/schematics/bundles/compiler_host-f0b570c8.js +1 -1
  16. package/schematics/bundles/control-flow-migration.js +1 -1
  17. package/schematics/bundles/explicit-standalone-flag.js +1 -1
  18. package/schematics/bundles/imports-31a38653.js +1 -1
  19. package/schematics/bundles/index-02a11f43.js +2 -2
  20. package/schematics/bundles/index-15b61bae.js +1 -1
  21. package/schematics/bundles/inject-migration.js +1 -1
  22. package/schematics/bundles/leading_space-6e7a8ec6.js +1 -1
  23. package/schematics/bundles/migrate_ts_type_references-042ca765.js +1 -1
  24. package/schematics/bundles/nodes-88c2157f.js +1 -1
  25. package/schematics/bundles/output-migration.js +1 -1
  26. package/schematics/bundles/pending-tasks.js +1 -1
  27. package/schematics/bundles/program-393ca8f3.js +10 -10
  28. package/schematics/bundles/project_tsconfig_paths-6c9cde78.js +1 -1
  29. package/schematics/bundles/provide-initializer.js +1 -1
  30. package/schematics/bundles/route-lazy-loading.js +1 -1
  31. package/schematics/bundles/signal-input-migration.js +1 -1
  32. package/schematics/bundles/signal-queries-migration.js +1 -1
  33. package/schematics/bundles/signals.js +1 -1
  34. package/schematics/bundles/standalone-migration.js +1 -1
  35. package/testing/index.d.ts +1 -1
package/fesm2022/core.mjs CHANGED
@@ -1,10 +1,10 @@
1
1
  /**
2
- * @license Angular v19.1.0
2
+ * @license Angular v19.1.1
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
6
6
 
7
- import { SIGNAL_NODE as SIGNAL_NODE$1, signalSetFn as signalSetFn$1, producerAccessed as producerAccessed$1, SIGNAL as SIGNAL$1, getActiveConsumer as getActiveConsumer$1, setActiveConsumer as setActiveConsumer$1, consumerDestroy as consumerDestroy$1, REACTIVE_NODE as REACTIVE_NODE$1, consumerBeforeComputation as consumerBeforeComputation$1, consumerAfterComputation as consumerAfterComputation$1, consumerPollProducersForChange as consumerPollProducersForChange$1, createSignal as createSignal$1, signalUpdateFn as signalUpdateFn$1, createComputed as createComputed$1, setThrowInvalidWriteToSignalError as setThrowInvalidWriteToSignalError$1, producerUpdateValueVersion as producerUpdateValueVersion$1, producerMarkClean as producerMarkClean$1, defaultEquals as defaultEquals$1, createWatch as createWatch$1, isInNotificationPhase as isInNotificationPhase$1 } from '@angular/core/primitives/signals';
7
+ import { SIGNAL_NODE as SIGNAL_NODE$1, signalSetFn as signalSetFn$1, producerAccessed as producerAccessed$1, SIGNAL as SIGNAL$1, getActiveConsumer as getActiveConsumer$1, setActiveConsumer as setActiveConsumer$1, createSignal as createSignal$1, signalUpdateFn as signalUpdateFn$1, consumerDestroy as consumerDestroy$1, REACTIVE_NODE as REACTIVE_NODE$1, consumerBeforeComputation as consumerBeforeComputation$1, consumerAfterComputation as consumerAfterComputation$1, consumerPollProducersForChange as consumerPollProducersForChange$1, createComputed as createComputed$1, setThrowInvalidWriteToSignalError as setThrowInvalidWriteToSignalError$1, producerUpdateValueVersion as producerUpdateValueVersion$1, producerMarkClean as producerMarkClean$1, defaultEquals as defaultEquals$1, createWatch as createWatch$1, isInNotificationPhase as isInNotificationPhase$1 } from '@angular/core/primitives/signals';
8
8
  export { SIGNAL as ɵSIGNAL } from '@angular/core/primitives/signals';
9
9
  import { BehaviorSubject, Subject, Subscription } from 'rxjs';
10
10
  import { Attribute as Attribute$1, EventContract, EventContractContainer, getAppScopedQueuedEventInfos, clearAppScopedEarlyEventContract, EventDispatcher, registerDispatcher, isEarlyEventType, isCaptureEventType, EventPhase } from '@angular/core/primitives/event-dispatch';
@@ -3482,6 +3482,40 @@ function getLViewParent(lView) {
3482
3482
  const parent = lView[PARENT];
3483
3483
  return isLContainer(parent) ? parent[PARENT] : parent;
3484
3484
  }
3485
+ function getOrCreateLViewCleanup(view) {
3486
+ // top level variables should not be exported for performance reasons (PERF_NOTES.md)
3487
+ return (view[CLEANUP] ??= []);
3488
+ }
3489
+ function getOrCreateTViewCleanup(tView) {
3490
+ return (tView.cleanup ??= []);
3491
+ }
3492
+ /**
3493
+ * Saves context for this cleanup function in LView.cleanupInstances.
3494
+ *
3495
+ * On the first template pass, saves in TView:
3496
+ * - Cleanup function
3497
+ * - Index of context we just saved in LView.cleanupInstances
3498
+ */
3499
+ function storeCleanupWithContext(tView, lView, context, cleanupFn) {
3500
+ const lCleanup = getOrCreateLViewCleanup(lView);
3501
+ // Historically the `storeCleanupWithContext` was used to register both framework-level and
3502
+ // user-defined cleanup callbacks, but over time those two types of cleanups were separated.
3503
+ // This dev mode checks assures that user-level cleanup callbacks are _not_ stored in data
3504
+ // structures reserved for framework-specific hooks.
3505
+ ngDevMode &&
3506
+ assertDefined(context, 'Cleanup context is mandatory when registering framework-level destroy hooks');
3507
+ lCleanup.push(context);
3508
+ if (tView.firstCreatePass) {
3509
+ getOrCreateTViewCleanup(tView).push(cleanupFn, lCleanup.length - 1);
3510
+ }
3511
+ else {
3512
+ // Make sure that no new framework-level cleanup functions are registered after the first
3513
+ // template pass is done (and TView data structures are meant to fully constructed).
3514
+ if (ngDevMode) {
3515
+ Object.freeze(getOrCreateTViewCleanup(tView));
3516
+ }
3517
+ }
3518
+ }
3485
3519
 
3486
3520
  const instructionState = {
3487
3521
  lFrame: createLFrame(null),
@@ -7074,6 +7108,76 @@ function unwrapElementRef(value) {
7074
7108
  return value instanceof ElementRef ? value.nativeElement : value;
7075
7109
  }
7076
7110
 
7111
+ const markedFeatures = new Set();
7112
+ // tslint:disable:ban
7113
+ /**
7114
+ * A guarded `performance.mark` for feature marking.
7115
+ *
7116
+ * This method exists because while all supported browser and node.js version supported by Angular
7117
+ * support performance.mark API. This is not the case for other environments such as JSDOM and
7118
+ * Cloudflare workers.
7119
+ */
7120
+ function performanceMarkFeature(feature) {
7121
+ if (markedFeatures.has(feature)) {
7122
+ return;
7123
+ }
7124
+ markedFeatures.add(feature);
7125
+ performance?.mark?.('mark_feature_usage', { detail: { feature } });
7126
+ }
7127
+
7128
+ /**
7129
+ * Checks if the given `value` is a reactive `Signal`.
7130
+ */
7131
+ function isSignal(value) {
7132
+ return typeof value === 'function' && value[SIGNAL$1] !== undefined;
7133
+ }
7134
+
7135
+ /** Symbol used distinguish `WritableSignal` from other non-writable signals and functions. */
7136
+ const ɵWRITABLE_SIGNAL = /* @__PURE__ */ Symbol('WRITABLE_SIGNAL');
7137
+ /**
7138
+ * Utility function used during template type checking to extract the value from a `WritableSignal`.
7139
+ * @codeGenApi
7140
+ */
7141
+ function ɵunwrapWritableSignal(value) {
7142
+ // Note: the function uses `WRITABLE_SIGNAL` as a brand instead of `WritableSignal<T>`,
7143
+ // because the latter incorrectly unwraps non-signal getter functions.
7144
+ return null;
7145
+ }
7146
+ /**
7147
+ * Create a `Signal` that can be set or updated directly.
7148
+ */
7149
+ function signal(initialValue, options) {
7150
+ performanceMarkFeature('NgSignals');
7151
+ const signalFn = createSignal$1(initialValue);
7152
+ const node = signalFn[SIGNAL$1];
7153
+ if (options?.equal) {
7154
+ node.equal = options.equal;
7155
+ }
7156
+ signalFn.set = (newValue) => signalSetFn$1(node, newValue);
7157
+ signalFn.update = (updateFn) => signalUpdateFn$1(node, updateFn);
7158
+ signalFn.asReadonly = signalAsReadonlyFn.bind(signalFn);
7159
+ if (ngDevMode) {
7160
+ signalFn.toString = () => `[Signal: ${signalFn()}]`;
7161
+ node.debugName = options?.debugName;
7162
+ }
7163
+ return signalFn;
7164
+ }
7165
+ function signalAsReadonlyFn() {
7166
+ const node = this[SIGNAL$1];
7167
+ if (node.readonlyFn === undefined) {
7168
+ const readonlyFn = () => this();
7169
+ readonlyFn[SIGNAL$1] = node;
7170
+ node.readonlyFn = readonlyFn;
7171
+ }
7172
+ return node.readonlyFn;
7173
+ }
7174
+ /**
7175
+ * Checks if the given `value` is a writeable signal.
7176
+ */
7177
+ function isWritableSignal(value) {
7178
+ return isSignal(value) && typeof value.set === 'function';
7179
+ }
7180
+
7077
7181
  function symbolIterator() {
7078
7182
  // @ts-expect-error accessing a private member
7079
7183
  return this._results[Symbol.iterator]();
@@ -8535,23 +8639,6 @@ var TracingAction;
8535
8639
  */
8536
8640
  const TracingService = new InjectionToken(ngDevMode ? 'TracingService' : '');
8537
8641
 
8538
- const markedFeatures = new Set();
8539
- // tslint:disable:ban
8540
- /**
8541
- * A guarded `performance.mark` for feature marking.
8542
- *
8543
- * This method exists because while all supported browser and node.js version supported by Angular
8544
- * support performance.mark API. This is not the case for other environments such as JSDOM and
8545
- * Cloudflare workers.
8546
- */
8547
- function performanceMarkFeature(feature) {
8548
- if (markedFeatures.has(feature)) {
8549
- return;
8550
- }
8551
- markedFeatures.add(feature);
8552
- performance?.mark?.('mark_feature_usage', { detail: { feature } });
8553
- }
8554
-
8555
8642
  /**
8556
8643
  * Asserts that the current stack frame is not within a reactive context. Useful
8557
8644
  * to disallow certain code from running inside a reactive context (see {@link toSignal}).
@@ -10007,6 +10094,63 @@ function processBlockData(injector) {
10007
10094
  return blockDetails;
10008
10095
  }
10009
10096
 
10097
+ /** Refreshes all content queries declared by directives in a given view */
10098
+ function refreshContentQueries(tView, lView) {
10099
+ const contentQueries = tView.contentQueries;
10100
+ if (contentQueries !== null) {
10101
+ const prevConsumer = setActiveConsumer$1(null);
10102
+ try {
10103
+ for (let i = 0; i < contentQueries.length; i += 2) {
10104
+ const queryStartIdx = contentQueries[i];
10105
+ const directiveDefIdx = contentQueries[i + 1];
10106
+ if (directiveDefIdx !== -1) {
10107
+ const directiveDef = tView.data[directiveDefIdx];
10108
+ ngDevMode && assertDefined(directiveDef, 'DirectiveDef not found.');
10109
+ ngDevMode &&
10110
+ assertDefined(directiveDef.contentQueries, 'contentQueries function should be defined');
10111
+ setCurrentQueryIndex(queryStartIdx);
10112
+ directiveDef.contentQueries(2 /* RenderFlags.Update */, lView[directiveDefIdx], directiveDefIdx);
10113
+ }
10114
+ }
10115
+ }
10116
+ finally {
10117
+ setActiveConsumer$1(prevConsumer);
10118
+ }
10119
+ }
10120
+ }
10121
+ function executeViewQueryFn(flags, viewQueryFn, component) {
10122
+ ngDevMode && assertDefined(viewQueryFn, 'View queries function to execute must be defined.');
10123
+ setCurrentQueryIndex(0);
10124
+ const prevConsumer = setActiveConsumer$1(null);
10125
+ try {
10126
+ viewQueryFn(flags, component);
10127
+ }
10128
+ finally {
10129
+ setActiveConsumer$1(prevConsumer);
10130
+ }
10131
+ }
10132
+ function executeContentQueries(tView, tNode, lView) {
10133
+ if (isContentQueryHost(tNode)) {
10134
+ const prevConsumer = setActiveConsumer$1(null);
10135
+ try {
10136
+ const start = tNode.directiveStart;
10137
+ const end = tNode.directiveEnd;
10138
+ for (let directiveIndex = start; directiveIndex < end; directiveIndex++) {
10139
+ const def = tView.data[directiveIndex];
10140
+ if (def.contentQueries) {
10141
+ const directiveInstance = lView[directiveIndex];
10142
+ ngDevMode &&
10143
+ assertDefined(directiveIndex, 'Incorrect reference to a directive defining a content query');
10144
+ def.contentQueries(1 /* RenderFlags.Create */, directiveInstance, directiveIndex);
10145
+ }
10146
+ }
10147
+ }
10148
+ finally {
10149
+ setActiveConsumer$1(prevConsumer);
10150
+ }
10151
+ }
10152
+ }
10153
+
10010
10154
  /**
10011
10155
  * Defines the CSS styles encapsulation policies for the {@link Component} decorator's
10012
10156
  * `encapsulation` option.
@@ -13058,41 +13202,6 @@ function writeToDirectiveInput(def, instance, publicName, privateName, flags, va
13058
13202
  }
13059
13203
  }
13060
13204
 
13061
- /**
13062
- * Invoke `HostBindingsFunction`s for view.
13063
- *
13064
- * This methods executes `TView.hostBindingOpCodes`. It is used to execute the
13065
- * `HostBindingsFunction`s associated with the current `LView`.
13066
- *
13067
- * @param tView Current `TView`.
13068
- * @param lView Current `LView`.
13069
- */
13070
- function processHostBindingOpCodes(tView, lView) {
13071
- const hostBindingOpCodes = tView.hostBindingOpCodes;
13072
- if (hostBindingOpCodes === null)
13073
- return;
13074
- try {
13075
- for (let i = 0; i < hostBindingOpCodes.length; i++) {
13076
- const opCode = hostBindingOpCodes[i];
13077
- if (opCode < 0) {
13078
- // Negative numbers are element indexes.
13079
- setSelectedIndex(~opCode);
13080
- }
13081
- else {
13082
- // Positive numbers are NumberTuple which store bindingRootIndex and directiveIndex.
13083
- const directiveIdx = opCode;
13084
- const bindingRootIndx = hostBindingOpCodes[++i];
13085
- const hostBindingFn = hostBindingOpCodes[++i];
13086
- setBindingRootForHostBindings(bindingRootIndx, directiveIdx);
13087
- const context = lView[directiveIdx];
13088
- hostBindingFn(2 /* RenderFlags.Update */, context);
13089
- }
13090
- }
13091
- }
13092
- finally {
13093
- setSelectedIndex(-1);
13094
- }
13095
- }
13096
13205
  function createLView(parentLView, tView, context, flags, host, tHostNode, environment, renderer, injector, embeddedViewInjector, hydrationInfo) {
13097
13206
  const lView = tView.blueprint.slice();
13098
13207
  lView[HOST] = host;
@@ -13239,30 +13348,6 @@ function executeTemplate(tView, lView, templateFn, rf, context) {
13239
13348
  profiler(postHookType, context);
13240
13349
  }
13241
13350
  }
13242
- //////////////////////////
13243
- //// Element
13244
- //////////////////////////
13245
- function executeContentQueries(tView, tNode, lView) {
13246
- if (isContentQueryHost(tNode)) {
13247
- const prevConsumer = setActiveConsumer$1(null);
13248
- try {
13249
- const start = tNode.directiveStart;
13250
- const end = tNode.directiveEnd;
13251
- for (let directiveIndex = start; directiveIndex < end; directiveIndex++) {
13252
- const def = tView.data[directiveIndex];
13253
- if (def.contentQueries) {
13254
- const directiveInstance = lView[directiveIndex];
13255
- ngDevMode &&
13256
- assertDefined(directiveIndex, 'Incorrect reference to a directive defining a content query');
13257
- def.contentQueries(1 /* RenderFlags.Create */, directiveInstance, directiveIndex);
13258
- }
13259
- }
13260
- }
13261
- finally {
13262
- setActiveConsumer$1(prevConsumer);
13263
- }
13264
- }
13265
- }
13266
13351
  /**
13267
13352
  * Creates directive instances.
13268
13353
  */
@@ -13444,33 +13529,6 @@ function applyRootElementTransformImpl(rootElement) {
13444
13529
  function enableApplyRootElementTransformImpl() {
13445
13530
  _applyRootElementTransformImpl = applyRootElementTransformImpl;
13446
13531
  }
13447
- /**
13448
- * Saves context for this cleanup function in LView.cleanupInstances.
13449
- *
13450
- * On the first template pass, saves in TView:
13451
- * - Cleanup function
13452
- * - Index of context we just saved in LView.cleanupInstances
13453
- */
13454
- function storeCleanupWithContext(tView, lView, context, cleanupFn) {
13455
- const lCleanup = getOrCreateLViewCleanup(lView);
13456
- // Historically the `storeCleanupWithContext` was used to register both framework-level and
13457
- // user-defined cleanup callbacks, but over time those two types of cleanups were separated.
13458
- // This dev mode checks assures that user-level cleanup callbacks are _not_ stored in data
13459
- // structures reserved for framework-specific hooks.
13460
- ngDevMode &&
13461
- assertDefined(context, 'Cleanup context is mandatory when registering framework-level destroy hooks');
13462
- lCleanup.push(context);
13463
- if (tView.firstCreatePass) {
13464
- getOrCreateTViewCleanup(tView).push(cleanupFn, lCleanup.length - 1);
13465
- }
13466
- else {
13467
- // Make sure that no new framework-level cleanup functions are registered after the first
13468
- // template pass is done (and TView data structures are meant to fully constructed).
13469
- if (ngDevMode) {
13470
- Object.freeze(getOrCreateTViewCleanup(tView));
13471
- }
13472
- }
13473
- }
13474
13532
  function createTNode(tView, tParent, type, index, value, attrs) {
13475
13533
  ngDevMode &&
13476
13534
  index !== 0 && // 0 are bogus nodes and they are OK. See `createContainerRef` in
@@ -14214,30 +14272,6 @@ function createLContainer(hostNative, currentView, native, tNode) {
14214
14272
  assertEqual(lContainer.length, CONTAINER_HEADER_OFFSET, 'Should allocate correct number of slots for LContainer header.');
14215
14273
  return lContainer;
14216
14274
  }
14217
- /** Refreshes all content queries declared by directives in a given view */
14218
- function refreshContentQueries(tView, lView) {
14219
- const contentQueries = tView.contentQueries;
14220
- if (contentQueries !== null) {
14221
- const prevConsumer = setActiveConsumer$1(null);
14222
- try {
14223
- for (let i = 0; i < contentQueries.length; i += 2) {
14224
- const queryStartIdx = contentQueries[i];
14225
- const directiveDefIdx = contentQueries[i + 1];
14226
- if (directiveDefIdx !== -1) {
14227
- const directiveDef = tView.data[directiveDefIdx];
14228
- ngDevMode && assertDefined(directiveDef, 'DirectiveDef not found.');
14229
- ngDevMode &&
14230
- assertDefined(directiveDef.contentQueries, 'contentQueries function should be defined');
14231
- setCurrentQueryIndex(queryStartIdx);
14232
- directiveDef.contentQueries(2 /* RenderFlags.Update */, lView[directiveDefIdx], directiveDefIdx);
14233
- }
14234
- }
14235
- }
14236
- finally {
14237
- setActiveConsumer$1(prevConsumer);
14238
- }
14239
- }
14240
- }
14241
14275
  /**
14242
14276
  * Adds LView or LContainer to the end of the current view tree.
14243
14277
  *
@@ -14264,20 +14298,6 @@ function addToEndOfViewTree(lView, lViewOrLContainer) {
14264
14298
  return lViewOrLContainer;
14265
14299
  }
14266
14300
  ///////////////////////////////
14267
- //// Change detection
14268
- ///////////////////////////////
14269
- function executeViewQueryFn(flags, viewQueryFn, component) {
14270
- ngDevMode && assertDefined(viewQueryFn, 'View queries function to execute must be defined.');
14271
- setCurrentQueryIndex(0);
14272
- const prevConsumer = setActiveConsumer$1(null);
14273
- try {
14274
- viewQueryFn(flags, component);
14275
- }
14276
- finally {
14277
- setActiveConsumer$1(prevConsumer);
14278
- }
14279
- }
14280
- ///////////////////////////////
14281
14301
  //// Bindings & interpolations
14282
14302
  ///////////////////////////////
14283
14303
  /**
@@ -14318,13 +14338,6 @@ function storePropertyBindingMetadata(tData, tNode, propertyName, bindingIndex,
14318
14338
  }
14319
14339
  }
14320
14340
  }
14321
- function getOrCreateLViewCleanup(view) {
14322
- // top level variables should not be exported for performance reasons (PERF_NOTES.md)
14323
- return (view[CLEANUP] ??= []);
14324
- }
14325
- function getOrCreateTViewCleanup(tView) {
14326
- return (tView.cleanup ??= []);
14327
- }
14328
14341
  /**
14329
14342
  * There are cases where the sub component's renderer needs to be included
14330
14343
  * instead of the current renderer (see the componentSyntheticHost* instructions).
@@ -14367,17 +14380,6 @@ function setInputsForProperty(tView, lView, inputs, publicName, value) {
14367
14380
  writeToDirectiveInput(def, instance, publicName, privateName, flags, value);
14368
14381
  }
14369
14382
  }
14370
- /**
14371
- * Updates a text binding at a given index in a given LView.
14372
- */
14373
- function textBindingInternal(lView, index, value) {
14374
- ngDevMode && assertString(value, 'Value should be a string');
14375
- ngDevMode && assertNotSame(value, NO_CHANGE, 'value should not be NO_CHANGE');
14376
- ngDevMode && assertIndexInRange(lView, index);
14377
- const element = getNativeByIndex(index, lView);
14378
- ngDevMode && assertDefined(element, 'native element should exist');
14379
- updateTextNode(lView[RENDERER], element, value);
14380
- }
14381
14383
 
14382
14384
  function renderComponent(hostLView, componentHostIdx) {
14383
14385
  ngDevMode && assertEqual(isCreationMode(hostLView), true, 'Should be run in creation mode');
@@ -15117,6 +15119,43 @@ function detectChangesInChildComponents(hostLView, components, mode) {
15117
15119
  detectChangesInComponent(hostLView, components[i], mode);
15118
15120
  }
15119
15121
  }
15122
+ /**
15123
+ * Invoke `HostBindingsFunction`s for view.
15124
+ *
15125
+ * This methods executes `TView.hostBindingOpCodes`. It is used to execute the
15126
+ * `HostBindingsFunction`s associated with the current `LView`.
15127
+ *
15128
+ * @param tView Current `TView`.
15129
+ * @param lView Current `LView`.
15130
+ */
15131
+ function processHostBindingOpCodes(tView, lView) {
15132
+ const hostBindingOpCodes = tView.hostBindingOpCodes;
15133
+ if (hostBindingOpCodes === null)
15134
+ return;
15135
+ try {
15136
+ for (let i = 0; i < hostBindingOpCodes.length; i++) {
15137
+ const opCode = hostBindingOpCodes[i];
15138
+ if (opCode < 0) {
15139
+ // Negative numbers are element indexes.
15140
+ setSelectedIndex(~opCode);
15141
+ }
15142
+ else {
15143
+ // Positive numbers are NumberTuple which store bindingRootIndex and directiveIndex.
15144
+ const directiveIdx = opCode;
15145
+ const bindingRootIndx = hostBindingOpCodes[++i];
15146
+ const hostBindingFn = hostBindingOpCodes[++i];
15147
+ setBindingRootForHostBindings(bindingRootIndx, directiveIdx);
15148
+ const context = lView[directiveIdx];
15149
+ profiler(24 /* ProfilerEvent.HostBindingsUpdateStart */, context);
15150
+ hostBindingFn(2 /* RenderFlags.Update */, context);
15151
+ profiler(25 /* ProfilerEvent.HostBindingsUpdateEnd */, context);
15152
+ }
15153
+ }
15154
+ }
15155
+ finally {
15156
+ setSelectedIndex(-1);
15157
+ }
15158
+ }
15120
15159
 
15121
15160
  /**
15122
15161
  * Marks current view and all ancestors dirty.
@@ -18093,7 +18132,7 @@ function createRootComponent(componentView, rootComponentDef, rootDirectives, ho
18093
18132
  function setRootNodeAttributes(hostRenderer, componentDef, hostRNode, rootSelectorOrNode) {
18094
18133
  if (rootSelectorOrNode) {
18095
18134
  // The placeholder will be replaced with the actual version at build time.
18096
- setUpAttributes(hostRenderer, hostRNode, ['ng-version', '19.1.0']);
18135
+ setUpAttributes(hostRenderer, hostRNode, ['ng-version', '19.1.1']);
18097
18136
  }
18098
18137
  else {
18099
18138
  // If host element is created as a part of this function call (i.e. `rootSelectorOrNode`
@@ -19005,59 +19044,6 @@ function getQueryResults(lView, queryIndex) {
19005
19044
  : materializeViewResults(tView, lView, tQuery, queryIndex);
19006
19045
  }
19007
19046
 
19008
- /**
19009
- * Checks if the given `value` is a reactive `Signal`.
19010
- */
19011
- function isSignal(value) {
19012
- return typeof value === 'function' && value[SIGNAL$1] !== undefined;
19013
- }
19014
-
19015
- /** Symbol used distinguish `WritableSignal` from other non-writable signals and functions. */
19016
- const ɵWRITABLE_SIGNAL = /* @__PURE__ */ Symbol('WRITABLE_SIGNAL');
19017
- /**
19018
- * Utility function used during template type checking to extract the value from a `WritableSignal`.
19019
- * @codeGenApi
19020
- */
19021
- function ɵunwrapWritableSignal(value) {
19022
- // Note: the function uses `WRITABLE_SIGNAL` as a brand instead of `WritableSignal<T>`,
19023
- // because the latter incorrectly unwraps non-signal getter functions.
19024
- return null;
19025
- }
19026
- /**
19027
- * Create a `Signal` that can be set or updated directly.
19028
- */
19029
- function signal(initialValue, options) {
19030
- performanceMarkFeature('NgSignals');
19031
- const signalFn = createSignal$1(initialValue);
19032
- const node = signalFn[SIGNAL$1];
19033
- if (options?.equal) {
19034
- node.equal = options.equal;
19035
- }
19036
- signalFn.set = (newValue) => signalSetFn$1(node, newValue);
19037
- signalFn.update = (updateFn) => signalUpdateFn$1(node, updateFn);
19038
- signalFn.asReadonly = signalAsReadonlyFn.bind(signalFn);
19039
- if (ngDevMode) {
19040
- signalFn.toString = () => `[Signal: ${signalFn()}]`;
19041
- node.debugName = options?.debugName;
19042
- }
19043
- return signalFn;
19044
- }
19045
- function signalAsReadonlyFn() {
19046
- const node = this[SIGNAL$1];
19047
- if (node.readonlyFn === undefined) {
19048
- const readonlyFn = () => this();
19049
- readonlyFn[SIGNAL$1] = node;
19050
- node.readonlyFn = readonlyFn;
19051
- }
19052
- return node.readonlyFn;
19053
- }
19054
- /**
19055
- * Checks if the given `value` is a writeable signal.
19056
- */
19057
- function isWritableSignal(value) {
19058
- return isSignal(value) && typeof value.set === 'function';
19059
- }
19060
-
19061
19047
  /**
19062
19048
  * A signal factory function in charge of creating a new computed signal capturing query
19063
19049
  * results. This centralized creation function is used by all types of queries (child / children,
@@ -32278,6 +32264,17 @@ function ɵɵtextInterpolateV(values) {
32278
32264
  }
32279
32265
  return ɵɵtextInterpolateV;
32280
32266
  }
32267
+ /**
32268
+ * Updates a text binding at a given index in a given LView.
32269
+ */
32270
+ function textBindingInternal(lView, index, value) {
32271
+ ngDevMode && assertString(value, 'Value should be a string');
32272
+ ngDevMode && assertNotSame(value, NO_CHANGE, 'value should not be NO_CHANGE');
32273
+ ngDevMode && assertIndexInRange(lView, index);
32274
+ const element = getNativeByIndex(index, lView);
32275
+ ngDevMode && assertDefined(element, 'native element should exist');
32276
+ updateTextNode(lView[RENDERER], element, value);
32277
+ }
32281
32278
 
32282
32279
  /*!
32283
32280
  * @license
@@ -33517,30 +33514,40 @@ function recreateLView(newDef, oldDef, lView) {
33517
33514
  const tNode = lView[T_HOST];
33518
33515
  ngDevMode && assertTNodeType(tNode, 2 /* TNodeType.Element */);
33519
33516
  ngDevMode && assertNotEqual(newDef, oldDef, 'Expected different component definition');
33520
- // Recreate the TView since the template might've changed.
33521
- const newTView = getOrCreateComponentTView(newDef);
33522
- // Always force the creation of a new renderer to ensure state captured during construction
33523
- // stays consistent with the new component definition by clearing any old cached factories.
33524
- const rendererFactory = lView[ENVIRONMENT].rendererFactory;
33525
- clearRendererCache(rendererFactory, oldDef);
33526
- // Create a new LView from the new TView, but reusing the existing TNode and DOM node.
33527
- const newLView = createLView(parentLView, newTView, instance, getInitialLViewFlagsFromDef(newDef), host, tNode, null, rendererFactory.createRenderer(host, newDef), null, null, null);
33528
- // Detach the LView from its current place in the tree so we don't
33529
- // start traversing any siblings and modifying their structure.
33530
- replaceLViewInTree(parentLView, lView, newLView, tNode.index);
33531
- // Destroy the detached LView.
33532
- destroyLView(lView[TVIEW], lView);
33533
- // Remove the nodes associated with the destroyed LView. This removes the
33534
- // descendants, but not the host which we want to stay in place.
33535
- removeViewFromDOM(lView[TVIEW], lView);
33536
- // Reset the content projection state of the TNode before the first render.
33537
- // Note that this has to happen after the LView has been destroyed or we
33538
- // risk some projected nodes not being removed correctly.
33539
- resetProjectionState(tNode);
33540
- // Creation pass for the new view.
33541
- renderView(newTView, newLView, instance);
33542
- // Update pass for the new view.
33543
- refreshView(newTView, newLView, newTView.template, instance);
33517
+ const zone = lView[INJECTOR].get(NgZone, null);
33518
+ const recreate = () => {
33519
+ // Recreate the TView since the template might've changed.
33520
+ const newTView = getOrCreateComponentTView(newDef);
33521
+ // Always force the creation of a new renderer to ensure state captured during construction
33522
+ // stays consistent with the new component definition by clearing any old cached factories.
33523
+ const rendererFactory = lView[ENVIRONMENT].rendererFactory;
33524
+ clearRendererCache(rendererFactory, oldDef);
33525
+ // Create a new LView from the new TView, but reusing the existing TNode and DOM node.
33526
+ const newLView = createLView(parentLView, newTView, instance, getInitialLViewFlagsFromDef(newDef), host, tNode, null, rendererFactory.createRenderer(host, newDef), null, null, null);
33527
+ // Detach the LView from its current place in the tree so we don't
33528
+ // start traversing any siblings and modifying their structure.
33529
+ replaceLViewInTree(parentLView, lView, newLView, tNode.index);
33530
+ // Destroy the detached LView.
33531
+ destroyLView(lView[TVIEW], lView);
33532
+ // Remove the nodes associated with the destroyed LView. This removes the
33533
+ // descendants, but not the host which we want to stay in place.
33534
+ removeViewFromDOM(lView[TVIEW], lView);
33535
+ // Reset the content projection state of the TNode before the first render.
33536
+ // Note that this has to happen after the LView has been destroyed or we
33537
+ // risk some projected nodes not being removed correctly.
33538
+ resetProjectionState(tNode);
33539
+ // Creation pass for the new view.
33540
+ renderView(newTView, newLView, instance);
33541
+ // Update pass for the new view.
33542
+ refreshView(newTView, newLView, newTView.template, instance);
33543
+ };
33544
+ // The callback isn't guaranteed to be inside the Zone so we need to bring it in ourselves.
33545
+ if (zone === null) {
33546
+ recreate();
33547
+ }
33548
+ else {
33549
+ zone.run(recreate);
33550
+ }
33544
33551
  }
33545
33552
  /**
33546
33553
  * Replaces one LView in the tree with another one.
@@ -34967,7 +34974,7 @@ class Version {
34967
34974
  /**
34968
34975
  * @publicApi
34969
34976
  */
34970
- const VERSION = new Version('19.1.0');
34977
+ const VERSION = new Version('19.1.1');
34971
34978
 
34972
34979
  /**
34973
34980
  * Combination of NgModuleFactory and ComponentFactories.