@angular/core 17.1.0-next.5 → 17.1.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/esm2022/primitives/signals/index.mjs +2 -2
  2. package/esm2022/primitives/signals/src/signal.mjs +2 -10
  3. package/esm2022/src/application/application_ref.mjs +21 -5
  4. package/esm2022/src/authoring/input.mjs +12 -5
  5. package/esm2022/src/authoring/input_signal.mjs +28 -1
  6. package/esm2022/src/authoring/input_signal_node.mjs +22 -0
  7. package/esm2022/src/authoring.mjs +1 -4
  8. package/esm2022/src/change_detection/scheduling/zoneless_scheduling_impl.mjs +56 -0
  9. package/esm2022/src/compiler/compiler_facade_interface.mjs +1 -1
  10. package/esm2022/src/core.mjs +2 -2
  11. package/esm2022/src/core_private_export.mjs +2 -1
  12. package/esm2022/src/core_render3_private_export.mjs +2 -2
  13. package/esm2022/src/defer/dom_triggers.mjs +1 -5
  14. package/esm2022/src/di/inject_switch.mjs +2 -3
  15. package/esm2022/src/di/r3_injector.mjs +8 -6
  16. package/esm2022/src/errors.mjs +1 -1
  17. package/esm2022/src/hydration/utils.mjs +2 -2
  18. package/esm2022/src/hydration/views.mjs +2 -2
  19. package/esm2022/src/linker/view_container_ref.mjs +2 -2
  20. package/esm2022/src/metadata/directives.mjs +1 -1
  21. package/esm2022/src/render3/after_render_hooks.mjs +15 -33
  22. package/esm2022/src/render3/apply_value_input_field.mjs +16 -0
  23. package/esm2022/src/render3/collect_native_nodes.mjs +2 -3
  24. package/esm2022/src/render3/component_ref.mjs +13 -6
  25. package/esm2022/src/render3/debug/injector_profiler.mjs +1 -1
  26. package/esm2022/src/render3/definition.mjs +27 -68
  27. package/esm2022/src/render3/errors_di.mjs +4 -3
  28. package/esm2022/src/render3/features/host_directives_feature.mjs +2 -3
  29. package/esm2022/src/render3/features/inherit_definition_feature.mjs +31 -9
  30. package/esm2022/src/render3/features/input_transforms_feature.mjs +4 -5
  31. package/esm2022/src/render3/features/ng_onchanges_feature.mjs +4 -3
  32. package/esm2022/src/render3/instructions/advance.mjs +2 -2
  33. package/esm2022/src/render3/instructions/change_detection.mjs +1 -6
  34. package/esm2022/src/render3/instructions/listener.mjs +1 -1
  35. package/esm2022/src/render3/instructions/mark_view_dirty.mjs +2 -2
  36. package/esm2022/src/render3/instructions/shared.mjs +61 -58
  37. package/esm2022/src/render3/instructions/write_to_directive_input.mjs +43 -0
  38. package/esm2022/src/render3/interfaces/container.mjs +1 -6
  39. package/esm2022/src/render3/interfaces/definition.mjs +8 -2
  40. package/esm2022/src/render3/interfaces/node.mjs +1 -1
  41. package/esm2022/src/render3/jit/environment.mjs +3 -1
  42. package/esm2022/src/render3/node_manipulation.mjs +8 -8
  43. package/esm2022/src/render3/reactivity/effect.mjs +8 -6
  44. package/esm2022/src/render3/reactivity/signal.mjs +1 -1
  45. package/esm2022/src/render3/styling/style_binding_list.mjs +4 -4
  46. package/esm2022/src/render3/util/discovery_utils.mjs +37 -5
  47. package/esm2022/src/render3/util/global_utils.mjs +28 -28
  48. package/esm2022/src/render3/util/injector_discovery_utils.mjs +1 -1
  49. package/esm2022/src/render3/util/injector_utils.mjs +6 -5
  50. package/esm2022/src/render3/util/view_traversal_utils.mjs +3 -12
  51. package/esm2022/src/render3/util/view_utils.mjs +19 -15
  52. package/esm2022/src/testability/testability.mjs +3 -15
  53. package/esm2022/src/util/empty.mjs +1 -1
  54. package/esm2022/src/version.mjs +1 -1
  55. package/esm2022/testing/src/component_fixture.mjs +62 -58
  56. package/esm2022/testing/src/logger.mjs +3 -3
  57. package/fesm2022/core.mjs +527 -408
  58. package/fesm2022/core.mjs.map +1 -1
  59. package/fesm2022/primitives/signals.mjs +2 -10
  60. package/fesm2022/primitives/signals.mjs.map +1 -1
  61. package/fesm2022/rxjs-interop.mjs +1 -1
  62. package/fesm2022/testing.mjs +62 -58
  63. package/fesm2022/testing.mjs.map +1 -1
  64. package/index.d.ts +637 -230
  65. package/package.json +1 -1
  66. package/primitives/signals/index.d.ts +3 -4
  67. package/rxjs-interop/index.d.ts +1 -1
  68. package/schematics/migrations/block-template-entities/bundle.js +121 -116
  69. package/schematics/migrations/block-template-entities/bundle.js.map +4 -4
  70. package/schematics/ng-generate/control-flow-migration/bundle.js +122 -117
  71. package/schematics/ng-generate/control-flow-migration/bundle.js.map +4 -4
  72. package/schematics/ng-generate/standalone-migration/bundle.js +414 -360
  73. package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
  74. package/testing/index.d.ts +6 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/core",
3
- "version": "17.1.0-next.5",
3
+ "version": "17.1.0-rc.0",
4
4
  "description": "Angular - the core framework",
5
5
  "author": "angular",
6
6
  "license": "MIT",
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v17.1.0-next.5
2
+ * @license Angular v17.1.0-rc.0
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -222,6 +222,8 @@ export declare function setThrowInvalidWriteToSignalError(fn: () => never): void
222
222
  */
223
223
  export declare const SIGNAL: unique symbol;
224
224
 
225
+ export declare const SIGNAL_NODE: SignalNode<unknown>;
226
+
225
227
  declare type SignalBaseGetter<T> = (() => T) & {
226
228
  readonly [SIGNAL]: unknown;
227
229
  };
@@ -230,12 +232,9 @@ export declare interface SignalGetter<T> extends SignalBaseGetter<T> {
230
232
  readonly [SIGNAL]: SignalNode<T>;
231
233
  }
232
234
 
233
- export declare function signalMutateFn<T>(node: SignalNode<T>, mutator: (value: T) => void): void;
234
-
235
235
  export declare interface SignalNode<T> extends ReactiveNode {
236
236
  value: T;
237
237
  equal: ValueEqualityFn<T>;
238
- readonly [SIGNAL]: SignalNode<T>;
239
238
  }
240
239
 
241
240
  export declare function signalSetFn<T>(node: SignalNode<T>, newValue: T): void;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v17.1.0-next.5
2
+ * @license Angular v17.1.0-rc.0
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -526,6 +526,12 @@ var ChangeDetectionStrategy;
526
526
  ChangeDetectionStrategy2[ChangeDetectionStrategy2["OnPush"] = 0] = "OnPush";
527
527
  ChangeDetectionStrategy2[ChangeDetectionStrategy2["Default"] = 1] = "Default";
528
528
  })(ChangeDetectionStrategy || (ChangeDetectionStrategy = {}));
529
+ var InputFlags;
530
+ (function(InputFlags2) {
531
+ InputFlags2[InputFlags2["None"] = 0] = "None";
532
+ InputFlags2[InputFlags2["SignalBased"] = 1] = "SignalBased";
533
+ InputFlags2[InputFlags2["HasDecoratorInputTransform"] = 2] = "HasDecoratorInputTransform";
534
+ })(InputFlags || (InputFlags = {}));
529
535
  var CUSTOM_ELEMENTS_SCHEMA = {
530
536
  name: "custom-elements"
531
537
  };
@@ -886,12 +892,13 @@ var BinaryOperator;
886
892
  BinaryOperator2[BinaryOperator2["Modulo"] = 8] = "Modulo";
887
893
  BinaryOperator2[BinaryOperator2["And"] = 9] = "And";
888
894
  BinaryOperator2[BinaryOperator2["Or"] = 10] = "Or";
889
- BinaryOperator2[BinaryOperator2["BitwiseAnd"] = 11] = "BitwiseAnd";
890
- BinaryOperator2[BinaryOperator2["Lower"] = 12] = "Lower";
891
- BinaryOperator2[BinaryOperator2["LowerEquals"] = 13] = "LowerEquals";
892
- BinaryOperator2[BinaryOperator2["Bigger"] = 14] = "Bigger";
893
- BinaryOperator2[BinaryOperator2["BiggerEquals"] = 15] = "BiggerEquals";
894
- BinaryOperator2[BinaryOperator2["NullishCoalesce"] = 16] = "NullishCoalesce";
895
+ BinaryOperator2[BinaryOperator2["BitwiseOr"] = 11] = "BitwiseOr";
896
+ BinaryOperator2[BinaryOperator2["BitwiseAnd"] = 12] = "BitwiseAnd";
897
+ BinaryOperator2[BinaryOperator2["Lower"] = 13] = "Lower";
898
+ BinaryOperator2[BinaryOperator2["LowerEquals"] = 14] = "LowerEquals";
899
+ BinaryOperator2[BinaryOperator2["Bigger"] = 15] = "Bigger";
900
+ BinaryOperator2[BinaryOperator2["BiggerEquals"] = 16] = "BiggerEquals";
901
+ BinaryOperator2[BinaryOperator2["NullishCoalesce"] = 17] = "NullishCoalesce";
895
902
  })(BinaryOperator || (BinaryOperator = {}));
896
903
  function nullSafeIsEquivalent(base, other) {
897
904
  if (base == null || other == null) {
@@ -964,6 +971,9 @@ var Expression = class {
964
971
  and(rhs, sourceSpan) {
965
972
  return new BinaryOperatorExpr(BinaryOperator.And, this, rhs, null, sourceSpan);
966
973
  }
974
+ bitwiseOr(rhs, sourceSpan, parens = true) {
975
+ return new BinaryOperatorExpr(BinaryOperator.BitwiseOr, this, rhs, null, sourceSpan, parens);
976
+ }
967
977
  bitwiseAnd(rhs, sourceSpan, parens = true) {
968
978
  return new BinaryOperatorExpr(BinaryOperator.BitwiseAnd, this, rhs, null, sourceSpan, parens);
969
979
  }
@@ -2559,6 +2569,12 @@ var Identifiers = _Identifiers;
2559
2569
  moduleName: CORE
2560
2570
  };
2561
2571
  })();
2572
+ (() => {
2573
+ _Identifiers.InputFlags = {
2574
+ name: "\u0275\u0275InputFlags",
2575
+ moduleName: CORE
2576
+ };
2577
+ })();
2562
2578
  (() => {
2563
2579
  _Identifiers.sanitizeHtml = { name: "\u0275\u0275sanitizeHtml", moduleName: CORE };
2564
2580
  })();
@@ -3158,6 +3174,9 @@ var AbstractEmitterVisitor = class {
3158
3174
  case BinaryOperator.And:
3159
3175
  opStr = "&&";
3160
3176
  break;
3177
+ case BinaryOperator.BitwiseOr:
3178
+ opStr = "|";
3179
+ break;
3161
3180
  case BinaryOperator.BitwiseAnd:
3162
3181
  opStr = "&";
3163
3182
  break;
@@ -4284,7 +4303,7 @@ function asLiteral(value) {
4284
4303
  }
4285
4304
  return literal(value, INFERRED_TYPE);
4286
4305
  }
4287
- function conditionallyCreateDirectiveBindingLiteral(map, keepDeclared) {
4306
+ function conditionallyCreateDirectiveBindingLiteral(map, forInputs) {
4288
4307
  const keys = Object.getOwnPropertyNames(map);
4289
4308
  if (keys.length === 0) {
4290
4309
  return null;
@@ -4304,12 +4323,25 @@ function conditionallyCreateDirectiveBindingLiteral(map, keepDeclared) {
4304
4323
  minifiedName = key;
4305
4324
  declaredName = value.classPropertyName;
4306
4325
  publicName = value.bindingPropertyName;
4307
- if (keepDeclared && (publicName !== declaredName || value.transformFunction != null)) {
4308
- const expressionKeys = [asLiteral(publicName), asLiteral(declaredName)];
4309
- if (value.transformFunction != null) {
4310
- expressionKeys.push(value.transformFunction);
4326
+ const differentDeclaringName = publicName !== declaredName;
4327
+ const hasDecoratorInputTransform = value.transformFunction !== null;
4328
+ let flags = null;
4329
+ if (value.isSignal) {
4330
+ flags = bitwiseOrInputFlagsExpr(InputFlags.SignalBased, flags);
4331
+ }
4332
+ if (hasDecoratorInputTransform) {
4333
+ flags = bitwiseOrInputFlagsExpr(InputFlags.HasDecoratorInputTransform, flags);
4334
+ }
4335
+ if (forInputs && (differentDeclaringName || hasDecoratorInputTransform || flags !== null)) {
4336
+ const flagsExpr = flags != null ? flags : importExpr(Identifiers.InputFlags).prop(InputFlags[InputFlags.None]);
4337
+ const result = [flagsExpr, asLiteral(publicName)];
4338
+ if (differentDeclaringName || hasDecoratorInputTransform) {
4339
+ result.push(asLiteral(declaredName));
4340
+ if (hasDecoratorInputTransform) {
4341
+ result.push(value.transformFunction);
4342
+ }
4311
4343
  }
4312
- expressionValue = literalArr(expressionKeys);
4344
+ expressionValue = literalArr(result);
4313
4345
  } else {
4314
4346
  expressionValue = asLiteral(publicName);
4315
4347
  }
@@ -4321,6 +4353,15 @@ function conditionallyCreateDirectiveBindingLiteral(map, keepDeclared) {
4321
4353
  };
4322
4354
  }));
4323
4355
  }
4356
+ function getInputFlagExpr(flag) {
4357
+ return importExpr(Identifiers.InputFlags).prop(InputFlags[flag]);
4358
+ }
4359
+ function bitwiseOrInputFlagsExpr(flag, expr) {
4360
+ if (expr === null) {
4361
+ return getInputFlagExpr(flag);
4362
+ }
4363
+ return getInputFlagExpr(flag).bitwiseOr(expr);
4364
+ }
4324
4365
  function trimTrailingNulls(parameters) {
4325
4366
  while (isNull(parameters[parameters.length - 1])) {
4326
4367
  parameters.pop();
@@ -7196,13 +7237,6 @@ var DeferTriggerKind;
7196
7237
  DeferTriggerKind2[DeferTriggerKind2["Interaction"] = 4] = "Interaction";
7197
7238
  DeferTriggerKind2[DeferTriggerKind2["Viewport"] = 5] = "Viewport";
7198
7239
  })(DeferTriggerKind || (DeferTriggerKind = {}));
7199
- var DerivedRepeaterVarIdentity;
7200
- (function(DerivedRepeaterVarIdentity2) {
7201
- DerivedRepeaterVarIdentity2[DerivedRepeaterVarIdentity2["First"] = 0] = "First";
7202
- DerivedRepeaterVarIdentity2[DerivedRepeaterVarIdentity2["Last"] = 1] = "Last";
7203
- DerivedRepeaterVarIdentity2[DerivedRepeaterVarIdentity2["Even"] = 2] = "Even";
7204
- DerivedRepeaterVarIdentity2[DerivedRepeaterVarIdentity2["Odd"] = 3] = "Odd";
7205
- })(DerivedRepeaterVarIdentity || (DerivedRepeaterVarIdentity = {}));
7206
7240
  var I18nContextKind;
7207
7241
  (function(I18nContextKind2) {
7208
7242
  I18nContextKind2[I18nContextKind2["RootI18n"] = 0] = "RootI18n";
@@ -7357,10 +7391,11 @@ function createClassMapOp(xref, expression, sourceSpan) {
7357
7391
  sourceSpan
7358
7392
  }, TRAIT_DEPENDS_ON_SLOT_CONTEXT), TRAIT_CONSUMES_VARS), NEW_OP);
7359
7393
  }
7360
- function createAttributeOp(target, name, expression, securityContext, isTextAttribute, isStructuralTemplateAttribute, templateKind, i18nMessage, sourceSpan) {
7394
+ function createAttributeOp(target, namespace, name, expression, securityContext, isTextAttribute, isStructuralTemplateAttribute, templateKind, i18nMessage, sourceSpan) {
7361
7395
  return __spreadValues(__spreadValues(__spreadValues({
7362
7396
  kind: OpKind.Attribute,
7363
7397
  target,
7398
+ namespace,
7364
7399
  name,
7365
7400
  expression,
7366
7401
  securityContext,
@@ -8015,27 +8050,6 @@ var ConditionalCaseExpr = class extends ExpressionBase {
8015
8050
  }
8016
8051
  }
8017
8052
  };
8018
- var DerivedRepeaterVarExpr = class extends ExpressionBase {
8019
- constructor(xref, identity) {
8020
- super();
8021
- this.xref = xref;
8022
- this.identity = identity;
8023
- this.kind = ExpressionKind.DerivedRepeaterVar;
8024
- }
8025
- transformInternalExpressions(transform2, flags) {
8026
- }
8027
- visitExpression(visitor, context) {
8028
- }
8029
- isEquivalent(e) {
8030
- return e instanceof DerivedRepeaterVarExpr && e.identity === this.identity && e.xref === this.xref;
8031
- }
8032
- isConstant() {
8033
- return false;
8034
- }
8035
- clone() {
8036
- return new DerivedRepeaterVarExpr(this.xref, this.identity);
8037
- }
8038
- };
8039
8053
  var ConstCollectedExpr = class extends ExpressionBase {
8040
8054
  constructor(expr) {
8041
8055
  super();
@@ -8641,11 +8655,12 @@ function createProjectionOp(xref, selector, i18nPlaceholder, sourceSpan) {
8641
8655
  sourceSpan
8642
8656
  }, NEW_OP), TRAIT_CONSUMES_SLOT);
8643
8657
  }
8644
- function createExtractedAttributeOp(target, bindingKind, name, expression, i18nContext, i18nMessage, securityContext) {
8658
+ function createExtractedAttributeOp(target, bindingKind, namespace, name, expression, i18nContext, i18nMessage, securityContext) {
8645
8659
  return __spreadValues({
8646
8660
  kind: OpKind.ExtractedAttribute,
8647
8661
  target,
8648
8662
  bindingKind,
8663
+ namespace,
8649
8664
  name,
8650
8665
  expression,
8651
8666
  i18nContext,
@@ -9040,6 +9055,7 @@ function extractAttributes(job) {
9040
9055
  createExtractedAttributeOp(
9041
9056
  op.target,
9042
9057
  bindingKind,
9058
+ null,
9043
9059
  op.name,
9044
9060
  null,
9045
9061
  null,
@@ -9056,6 +9072,7 @@ function extractAttributes(job) {
9056
9072
  OpList.insertBefore(createExtractedAttributeOp(
9057
9073
  op.target,
9058
9074
  BindingKind.Property,
9075
+ null,
9059
9076
  op.name,
9060
9077
  null,
9061
9078
  null,
@@ -9069,6 +9086,7 @@ function extractAttributes(job) {
9069
9086
  const extractedAttributeOp = createExtractedAttributeOp(
9070
9087
  op.target,
9071
9088
  BindingKind.Property,
9089
+ null,
9072
9090
  op.name,
9073
9091
  null,
9074
9092
  null,
@@ -9105,7 +9123,7 @@ function extractAttributeOp(unit, op, elements) {
9105
9123
  extractable && (extractable = op.isTextAttribute);
9106
9124
  }
9107
9125
  if (extractable) {
9108
- const extractedAttributeOp = createExtractedAttributeOp(op.target, op.isStructuralTemplateAttribute ? BindingKind.Template : BindingKind.Attribute, op.name, op.expression, op.i18nContext, op.i18nMessage, op.securityContext);
9126
+ const extractedAttributeOp = createExtractedAttributeOp(op.target, op.isStructuralTemplateAttribute ? BindingKind.Template : BindingKind.Attribute, op.namespace, op.name, op.expression, op.i18nContext, op.i18nMessage, op.securityContext);
9109
9127
  if (unit.job.kind === CompilationJobKind.Host) {
9110
9128
  unit.create.push(extractedAttributeOp);
9111
9129
  } else {
@@ -9146,7 +9164,8 @@ function specializeBindings(job) {
9146
9164
  const target = lookupElement2(elements, op.target);
9147
9165
  target.nonBindable = true;
9148
9166
  } else {
9149
- OpList.replace(op, createAttributeOp(op.target, op.name, op.expression, op.securityContext, op.isTextAttribute, op.isStructuralTemplateAttribute, op.templateKind, op.i18nMessage, op.sourceSpan));
9167
+ const [namespace, name] = splitNsName(op.name);
9168
+ OpList.replace(op, createAttributeOp(op.target, namespace, name, op.expression, op.securityContext, op.isTextAttribute, op.isStructuralTemplateAttribute, op.templateKind, op.i18nMessage, op.sourceSpan));
9150
9169
  }
9151
9170
  break;
9152
9171
  case BindingKind.Property:
@@ -9286,6 +9305,7 @@ var BINARY_OPERATORS = /* @__PURE__ */ new Map([
9286
9305
  ["&&", BinaryOperator.And],
9287
9306
  [">", BinaryOperator.Bigger],
9288
9307
  [">=", BinaryOperator.BiggerEquals],
9308
+ ["|", BinaryOperator.BitwiseOr],
9289
9309
  ["&", BinaryOperator.BitwiseAnd],
9290
9310
  ["/", BinaryOperator.Divide],
9291
9311
  ["==", BinaryOperator.Equals],
@@ -9339,7 +9359,7 @@ function collectElementConsts(job) {
9339
9359
  if (op.kind === OpKind.ExtractedAttribute) {
9340
9360
  const attributes = allElementAttributes.get(op.target) || new ElementAttributes(job.compatibility);
9341
9361
  allElementAttributes.set(op.target, attributes);
9342
- attributes.add(op.bindingKind, op.name, op.expression, op.trustedValueFn);
9362
+ attributes.add(op.bindingKind, op.name, op.expression, op.namespace, op.trustedValueFn);
9343
9363
  OpList.remove(op);
9344
9364
  }
9345
9365
  }
@@ -9427,7 +9447,7 @@ var ElementAttributes = class {
9427
9447
  nameToValue.add(name);
9428
9448
  return false;
9429
9449
  }
9430
- add(kind, name, value, trustedValueFn) {
9450
+ add(kind, name, value, namespace, trustedValueFn) {
9431
9451
  var _a2;
9432
9452
  const allowDuplicates = this.compatibility === CompatibilityMode.TemplateDefinitionBuilder && (kind === BindingKind.Attribute || kind === BindingKind.ClassName || kind === BindingKind.StyleProperty);
9433
9453
  if (!allowDuplicates && this.isKnown(kind, name, value)) {
@@ -9440,7 +9460,7 @@ var ElementAttributes = class {
9440
9460
  this.projectAs = value.value.toString();
9441
9461
  }
9442
9462
  const array = this.arrayFor(kind);
9443
- array.push(...getAttributeNameLiterals(name));
9463
+ array.push(...getAttributeNameLiterals(namespace, name));
9444
9464
  if (kind === BindingKind.Attribute || kind === BindingKind.StyleProperty) {
9445
9465
  if (value === null) {
9446
9466
  throw Error("Attribute, i18n attribute, & style element attributes must have a value");
@@ -9462,15 +9482,10 @@ var ElementAttributes = class {
9462
9482
  return this.byKind.get(kind);
9463
9483
  }
9464
9484
  };
9465
- function getAttributeNameLiterals(name) {
9466
- const [attributeNamespace, attributeName] = splitNsName(name, false);
9467
- const nameLiteral = literal(attributeName);
9468
- if (attributeNamespace) {
9469
- return [
9470
- literal(0),
9471
- literal(attributeNamespace),
9472
- nameLiteral
9473
- ];
9485
+ function getAttributeNameLiterals(namespace, name) {
9486
+ const nameLiteral = literal(name);
9487
+ if (namespace) {
9488
+ return [literal(0), literal(namespace), nameLiteral];
9474
9489
  }
9475
9490
  return [nameLiteral];
9476
9491
  }
@@ -10261,7 +10276,7 @@ function parseHostStyleProperties(job) {
10261
10276
  if (op.name.startsWith(STYLE_DOT)) {
10262
10277
  op.bindingKind = BindingKind.StyleProperty;
10263
10278
  op.name = op.name.substring(STYLE_DOT.length);
10264
- if (isCssCustomProperty(op.name)) {
10279
+ if (!isCssCustomProperty(op.name)) {
10265
10280
  op.name = hyphenate(op.name);
10266
10281
  }
10267
10282
  const { property: property2, suffix } = parseProperty(op.name);
@@ -16952,13 +16967,13 @@ function parseExtractedStyles(job) {
16952
16967
  if (op.name === "style") {
16953
16968
  const parsedStyles = parse(op.expression.value);
16954
16969
  for (let i = 0; i < parsedStyles.length - 1; i += 2) {
16955
- OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.StyleProperty, parsedStyles[i], literal(parsedStyles[i + 1]), null, null, SecurityContext.STYLE), op);
16970
+ OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.StyleProperty, null, parsedStyles[i], literal(parsedStyles[i + 1]), null, null, SecurityContext.STYLE), op);
16956
16971
  }
16957
16972
  OpList.remove(op);
16958
16973
  } else if (op.name === "class") {
16959
16974
  const parsedClasses = op.expression.value.trim().split(/\s+/g);
16960
16975
  for (const parsedClass of parsedClasses) {
16961
- OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.ClassName, parsedClass, null, null, null, SecurityContext.NONE), op);
16976
+ OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.ClassName, null, parsedClass, null, null, null, SecurityContext.NONE), op);
16962
16977
  }
16963
16978
  OpList.remove(op);
16964
16979
  }
@@ -17284,9 +17299,7 @@ function namespaceMath() {
17284
17299
  return call(Identifiers.namespaceMathML, [], null);
17285
17300
  }
17286
17301
  function advance(delta, sourceSpan) {
17287
- return call(Identifiers.advance, [
17288
- literal(delta)
17289
- ], sourceSpan);
17302
+ return call(Identifiers.advance, delta > 1 ? [literal(delta)] : [], sourceSpan);
17290
17303
  }
17291
17304
  function reference(slot) {
17292
17305
  return importExpr(Identifiers.reference).callFn([
@@ -17430,10 +17443,13 @@ function property(name, expression, sanitizer, sourceSpan) {
17430
17443
  }
17431
17444
  return call(Identifiers.property, args, sourceSpan);
17432
17445
  }
17433
- function attribute(name, expression, sanitizer) {
17446
+ function attribute(name, expression, sanitizer, namespace) {
17434
17447
  const args = [literal(name), expression];
17435
- if (sanitizer !== null) {
17436
- args.push(sanitizer);
17448
+ if (sanitizer !== null || namespace !== null) {
17449
+ args.push(sanitizer != null ? sanitizer : literal(null));
17450
+ }
17451
+ if (namespace !== null) {
17452
+ args.push(literal(namespace));
17437
17453
  }
17438
17454
  return call(Identifiers.attribute, args, null);
17439
17455
  }
@@ -17946,7 +17962,7 @@ function reifyUpdateOperations(_unit, ops) {
17946
17962
  if (op.expression instanceof Interpolation2) {
17947
17963
  OpList.replace(op, attributeInterpolate(op.name, op.expression.strings, op.expression.expressions, op.sanitizer, op.sourceSpan));
17948
17964
  } else {
17949
- OpList.replace(op, attribute(op.name, op.expression, op.sanitizer));
17965
+ OpList.replace(op, attribute(op.name, op.expression, op.sanitizer, op.namespace));
17950
17966
  }
17951
17967
  break;
17952
17968
  case OpKind.HostProperty:
@@ -18115,38 +18131,6 @@ function removeUnusedI18nAttributesOps(job) {
18115
18131
  }
18116
18132
  }
18117
18133
 
18118
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/repeater_derived_vars.mjs
18119
- function generateRepeaterDerivedVars(job) {
18120
- const repeaters = /* @__PURE__ */ new Map();
18121
- for (const unit of job.units) {
18122
- for (const op of unit.ops()) {
18123
- if (op.kind === OpKind.RepeaterCreate) {
18124
- repeaters.set(op.xref, op);
18125
- }
18126
- }
18127
- }
18128
- for (const unit of job.units) {
18129
- for (const op of unit.ops()) {
18130
- transformExpressionsInOp(op, (expr) => {
18131
- if (!(expr instanceof DerivedRepeaterVarExpr)) {
18132
- return expr;
18133
- }
18134
- const repeaterOp = repeaters.get(expr.xref);
18135
- switch (expr.identity) {
18136
- case DerivedRepeaterVarIdentity.First:
18137
- return new BinaryOperatorExpr(BinaryOperator.Identical, new LexicalReadExpr(repeaterOp.varNames.$index), literal(0));
18138
- case DerivedRepeaterVarIdentity.Last:
18139
- return new BinaryOperatorExpr(BinaryOperator.Identical, new LexicalReadExpr(repeaterOp.varNames.$index), new BinaryOperatorExpr(BinaryOperator.Minus, new LexicalReadExpr(repeaterOp.varNames.$count), literal(1)));
18140
- case DerivedRepeaterVarIdentity.Even:
18141
- return new BinaryOperatorExpr(BinaryOperator.Identical, new BinaryOperatorExpr(BinaryOperator.Modulo, new LexicalReadExpr(repeaterOp.varNames.$index), literal(2)), literal(0));
18142
- case DerivedRepeaterVarIdentity.Odd:
18143
- return new BinaryOperatorExpr(BinaryOperator.NotIdentical, new BinaryOperatorExpr(BinaryOperator.Modulo, new LexicalReadExpr(repeaterOp.varNames.$index), literal(2)), literal(0));
18144
- }
18145
- }, VisitorContextFlag.None);
18146
- }
18147
- }
18148
- }
18149
-
18150
18134
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_contexts.mjs
18151
18135
  function resolveContexts(job) {
18152
18136
  for (const unit of job.units) {
@@ -19253,7 +19237,6 @@ var phases = [
19253
19237
  { kind: CompilationJobKind.Tmpl, fn: saveAndRestoreView },
19254
19238
  { kind: CompilationJobKind.Both, fn: deleteAnyCasts },
19255
19239
  { kind: CompilationJobKind.Both, fn: resolveDollarEvent },
19256
- { kind: CompilationJobKind.Tmpl, fn: generateRepeaterDerivedVars },
19257
19240
  { kind: CompilationJobKind.Tmpl, fn: generateTrackVariables },
19258
19241
  { kind: CompilationJobKind.Both, fn: resolveNames },
19259
19242
  { kind: CompilationJobKind.Tmpl, fn: resolveDeferTargetNames },
@@ -19604,6 +19587,9 @@ function ingestIfBlock(unit, ifBlock) {
19604
19587
  }
19605
19588
  function ingestSwitchBlock(unit, switchBlock) {
19606
19589
  var _a2;
19590
+ if (switchBlock.cases.length === 0) {
19591
+ return;
19592
+ }
19607
19593
  let firstXref = null;
19608
19594
  let firstSlotHandle = null;
19609
19595
  let conditions = [];
@@ -19748,21 +19734,37 @@ function ingestIcu(unit, icu) {
19748
19734
  function ingestForBlock(unit, forBlock) {
19749
19735
  var _a2, _b2, _c2;
19750
19736
  const repeaterView = unit.job.allocateView(unit.xref);
19751
- const createRepeaterAlias = (ident, repeaterVar) => {
19752
- repeaterView.aliases.add({
19753
- kind: SemanticVariableKind.Alias,
19754
- name: null,
19755
- identifier: ident,
19756
- expression: new DerivedRepeaterVarExpr(repeaterView.xref, repeaterVar)
19757
- });
19758
- };
19759
19737
  repeaterView.contextVariables.set(forBlock.item.name, forBlock.item.value);
19760
19738
  repeaterView.contextVariables.set(forBlock.contextVariables.$index.name, forBlock.contextVariables.$index.value);
19761
19739
  repeaterView.contextVariables.set(forBlock.contextVariables.$count.name, forBlock.contextVariables.$count.value);
19762
- createRepeaterAlias(forBlock.contextVariables.$first.name, DerivedRepeaterVarIdentity.First);
19763
- createRepeaterAlias(forBlock.contextVariables.$last.name, DerivedRepeaterVarIdentity.Last);
19764
- createRepeaterAlias(forBlock.contextVariables.$even.name, DerivedRepeaterVarIdentity.Even);
19765
- createRepeaterAlias(forBlock.contextVariables.$odd.name, DerivedRepeaterVarIdentity.Odd);
19740
+ const indexName = `\u0275${forBlock.contextVariables.$index.name}_${repeaterView.xref}`;
19741
+ const countName = `\u0275${forBlock.contextVariables.$count.name}_${repeaterView.xref}`;
19742
+ repeaterView.contextVariables.set(indexName, forBlock.contextVariables.$index.value);
19743
+ repeaterView.contextVariables.set(countName, forBlock.contextVariables.$count.value);
19744
+ repeaterView.aliases.add({
19745
+ kind: SemanticVariableKind.Alias,
19746
+ name: null,
19747
+ identifier: forBlock.contextVariables.$first.name,
19748
+ expression: new LexicalReadExpr(indexName).identical(literal(0))
19749
+ });
19750
+ repeaterView.aliases.add({
19751
+ kind: SemanticVariableKind.Alias,
19752
+ name: null,
19753
+ identifier: forBlock.contextVariables.$last.name,
19754
+ expression: new LexicalReadExpr(indexName).identical(new LexicalReadExpr(countName).minus(literal(1)))
19755
+ });
19756
+ repeaterView.aliases.add({
19757
+ kind: SemanticVariableKind.Alias,
19758
+ name: null,
19759
+ identifier: forBlock.contextVariables.$even.name,
19760
+ expression: new LexicalReadExpr(indexName).modulo(literal(2)).identical(literal(0))
19761
+ });
19762
+ repeaterView.aliases.add({
19763
+ kind: SemanticVariableKind.Alias,
19764
+ name: null,
19765
+ identifier: forBlock.contextVariables.$odd.name,
19766
+ expression: new LexicalReadExpr(indexName).modulo(literal(2)).notIdentical(literal(0))
19767
+ });
19766
19768
  const sourceSpan = convertSourceSpan(forBlock.trackBy.span, forBlock.sourceSpan);
19767
19769
  const track = convertAst(forBlock.trackBy, unit.job, sourceSpan);
19768
19770
  ingestNodes(repeaterView, forBlock.children);
@@ -19964,7 +19966,7 @@ function ingestTemplateBindings(unit, op, template2, templateKind) {
19964
19966
  }
19965
19967
  if (templateKind === TemplateKind.Structural && output.type !== 1) {
19966
19968
  const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, output.name, false);
19967
- unit.create.push(createExtractedAttributeOp(op.xref, BindingKind.Property, output.name, null, null, null, securityContext));
19969
+ unit.create.push(createExtractedAttributeOp(op.xref, BindingKind.Property, null, output.name, null, null, null, securityContext));
19968
19970
  }
19969
19971
  }
19970
19972
  if (bindings.some((b) => b == null ? void 0 : b.i18nMessage) !== null) {
@@ -19975,7 +19977,7 @@ function createTemplateBinding(view, xref, type, name, value, unit, securityCont
19975
19977
  const isTextBinding = typeof value === "string";
19976
19978
  if (templateKind === TemplateKind.Structural) {
19977
19979
  if (!isStructuralTemplateAttribute && (type === 0 || type === 2 || type === 3)) {
19978
- return createExtractedAttributeOp(xref, BindingKind.Property, name, null, null, i18nMessage, securityContext);
19980
+ return createExtractedAttributeOp(xref, BindingKind.Property, null, name, null, null, i18nMessage, securityContext);
19979
19981
  }
19980
19982
  if (!isTextBinding && (type === 1 || type === 4)) {
19981
19983
  return null;
@@ -22834,6 +22836,9 @@ var TemplateDefinitionBuilder = class {
22834
22836
  this.updateInstructionWithAdvance(containerIndex, block.branches[0].sourceSpan, Identifiers.conditional, paramsCallback);
22835
22837
  }
22836
22838
  visitSwitchBlock(block) {
22839
+ if (block.cases.length === 0) {
22840
+ return;
22841
+ }
22837
22842
  const caseData = block.cases.map((currentCase) => {
22838
22843
  const index = this.createEmbeddedTemplateFn(null, currentCase.children, "_Case", currentCase.sourceSpan, void 0, void 0, void 0, currentCase.i18n);
22839
22844
  const expression = currentCase.expression === null ? null : currentCase.expression.visit(this._valueConverter);
@@ -23161,7 +23166,7 @@ var TemplateDefinitionBuilder = class {
23161
23166
  if (delta < 1) {
23162
23167
  throw new Error("advance instruction can only go forwards");
23163
23168
  }
23164
- this.instructionFn(this._updateCodeFns, span, Identifiers.advance, [literal(delta)]);
23169
+ this.instructionFn(this._updateCodeFns, span, Identifiers.advance, delta > 1 ? [literal(delta)] : []);
23165
23170
  this._currentIndex = nodeIndex;
23166
23171
  }
23167
23172
  }
@@ -25251,7 +25256,7 @@ function convertDirectiveFacadeToMetadata(facade) {
25251
25256
  bindingPropertyName: ann.alias || field,
25252
25257
  classPropertyName: field,
25253
25258
  required: ann.required || false,
25254
- isSignal: false,
25259
+ isSignal: !!ann.isSignal,
25255
25260
  transformFunction: ann.transform != null ? new WrappedNodeExpr(ann.transform) : null
25256
25261
  };
25257
25262
  } else if (isOutput(ann)) {
@@ -25605,7 +25610,7 @@ function publishFacade(global) {
25605
25610
  }
25606
25611
 
25607
25612
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/version.mjs
25608
- var VERSION2 = new Version("17.1.0-next.5");
25613
+ var VERSION2 = new Version("17.1.0-rc.0");
25609
25614
 
25610
25615
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
25611
25616
  var _VisitorMode;