@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
@@ -457,6 +457,12 @@ var ChangeDetectionStrategy;
457
457
  ChangeDetectionStrategy2[ChangeDetectionStrategy2["OnPush"] = 0] = "OnPush";
458
458
  ChangeDetectionStrategy2[ChangeDetectionStrategy2["Default"] = 1] = "Default";
459
459
  })(ChangeDetectionStrategy || (ChangeDetectionStrategy = {}));
460
+ var InputFlags;
461
+ (function(InputFlags2) {
462
+ InputFlags2[InputFlags2["None"] = 0] = "None";
463
+ InputFlags2[InputFlags2["SignalBased"] = 1] = "SignalBased";
464
+ InputFlags2[InputFlags2["HasDecoratorInputTransform"] = 2] = "HasDecoratorInputTransform";
465
+ })(InputFlags || (InputFlags = {}));
460
466
  var CUSTOM_ELEMENTS_SCHEMA = {
461
467
  name: "custom-elements"
462
468
  };
@@ -817,12 +823,13 @@ var BinaryOperator;
817
823
  BinaryOperator2[BinaryOperator2["Modulo"] = 8] = "Modulo";
818
824
  BinaryOperator2[BinaryOperator2["And"] = 9] = "And";
819
825
  BinaryOperator2[BinaryOperator2["Or"] = 10] = "Or";
820
- BinaryOperator2[BinaryOperator2["BitwiseAnd"] = 11] = "BitwiseAnd";
821
- BinaryOperator2[BinaryOperator2["Lower"] = 12] = "Lower";
822
- BinaryOperator2[BinaryOperator2["LowerEquals"] = 13] = "LowerEquals";
823
- BinaryOperator2[BinaryOperator2["Bigger"] = 14] = "Bigger";
824
- BinaryOperator2[BinaryOperator2["BiggerEquals"] = 15] = "BiggerEquals";
825
- BinaryOperator2[BinaryOperator2["NullishCoalesce"] = 16] = "NullishCoalesce";
826
+ BinaryOperator2[BinaryOperator2["BitwiseOr"] = 11] = "BitwiseOr";
827
+ BinaryOperator2[BinaryOperator2["BitwiseAnd"] = 12] = "BitwiseAnd";
828
+ BinaryOperator2[BinaryOperator2["Lower"] = 13] = "Lower";
829
+ BinaryOperator2[BinaryOperator2["LowerEquals"] = 14] = "LowerEquals";
830
+ BinaryOperator2[BinaryOperator2["Bigger"] = 15] = "Bigger";
831
+ BinaryOperator2[BinaryOperator2["BiggerEquals"] = 16] = "BiggerEquals";
832
+ BinaryOperator2[BinaryOperator2["NullishCoalesce"] = 17] = "NullishCoalesce";
826
833
  })(BinaryOperator || (BinaryOperator = {}));
827
834
  function nullSafeIsEquivalent(base, other) {
828
835
  if (base == null || other == null) {
@@ -895,6 +902,9 @@ var Expression = class {
895
902
  and(rhs, sourceSpan) {
896
903
  return new BinaryOperatorExpr(BinaryOperator.And, this, rhs, null, sourceSpan);
897
904
  }
905
+ bitwiseOr(rhs, sourceSpan, parens = true) {
906
+ return new BinaryOperatorExpr(BinaryOperator.BitwiseOr, this, rhs, null, sourceSpan, parens);
907
+ }
898
908
  bitwiseAnd(rhs, sourceSpan, parens = true) {
899
909
  return new BinaryOperatorExpr(BinaryOperator.BitwiseAnd, this, rhs, null, sourceSpan, parens);
900
910
  }
@@ -2490,6 +2500,12 @@ var Identifiers = _Identifiers;
2490
2500
  moduleName: CORE
2491
2501
  };
2492
2502
  })();
2503
+ (() => {
2504
+ _Identifiers.InputFlags = {
2505
+ name: "\u0275\u0275InputFlags",
2506
+ moduleName: CORE
2507
+ };
2508
+ })();
2493
2509
  (() => {
2494
2510
  _Identifiers.sanitizeHtml = { name: "\u0275\u0275sanitizeHtml", moduleName: CORE };
2495
2511
  })();
@@ -3089,6 +3105,9 @@ var AbstractEmitterVisitor = class {
3089
3105
  case BinaryOperator.And:
3090
3106
  opStr = "&&";
3091
3107
  break;
3108
+ case BinaryOperator.BitwiseOr:
3109
+ opStr = "|";
3110
+ break;
3092
3111
  case BinaryOperator.BitwiseAnd:
3093
3112
  opStr = "&";
3094
3113
  break;
@@ -4215,7 +4234,7 @@ function asLiteral(value) {
4215
4234
  }
4216
4235
  return literal(value, INFERRED_TYPE);
4217
4236
  }
4218
- function conditionallyCreateDirectiveBindingLiteral(map, keepDeclared) {
4237
+ function conditionallyCreateDirectiveBindingLiteral(map, forInputs) {
4219
4238
  const keys = Object.getOwnPropertyNames(map);
4220
4239
  if (keys.length === 0) {
4221
4240
  return null;
@@ -4235,12 +4254,25 @@ function conditionallyCreateDirectiveBindingLiteral(map, keepDeclared) {
4235
4254
  minifiedName = key;
4236
4255
  declaredName = value.classPropertyName;
4237
4256
  publicName = value.bindingPropertyName;
4238
- if (keepDeclared && (publicName !== declaredName || value.transformFunction != null)) {
4239
- const expressionKeys = [asLiteral(publicName), asLiteral(declaredName)];
4240
- if (value.transformFunction != null) {
4241
- expressionKeys.push(value.transformFunction);
4257
+ const differentDeclaringName = publicName !== declaredName;
4258
+ const hasDecoratorInputTransform = value.transformFunction !== null;
4259
+ let flags = null;
4260
+ if (value.isSignal) {
4261
+ flags = bitwiseOrInputFlagsExpr(InputFlags.SignalBased, flags);
4262
+ }
4263
+ if (hasDecoratorInputTransform) {
4264
+ flags = bitwiseOrInputFlagsExpr(InputFlags.HasDecoratorInputTransform, flags);
4265
+ }
4266
+ if (forInputs && (differentDeclaringName || hasDecoratorInputTransform || flags !== null)) {
4267
+ const flagsExpr = flags != null ? flags : importExpr(Identifiers.InputFlags).prop(InputFlags[InputFlags.None]);
4268
+ const result = [flagsExpr, asLiteral(publicName)];
4269
+ if (differentDeclaringName || hasDecoratorInputTransform) {
4270
+ result.push(asLiteral(declaredName));
4271
+ if (hasDecoratorInputTransform) {
4272
+ result.push(value.transformFunction);
4273
+ }
4242
4274
  }
4243
- expressionValue = literalArr(expressionKeys);
4275
+ expressionValue = literalArr(result);
4244
4276
  } else {
4245
4277
  expressionValue = asLiteral(publicName);
4246
4278
  }
@@ -4252,6 +4284,15 @@ function conditionallyCreateDirectiveBindingLiteral(map, keepDeclared) {
4252
4284
  };
4253
4285
  }));
4254
4286
  }
4287
+ function getInputFlagExpr(flag) {
4288
+ return importExpr(Identifiers.InputFlags).prop(InputFlags[flag]);
4289
+ }
4290
+ function bitwiseOrInputFlagsExpr(flag, expr) {
4291
+ if (expr === null) {
4292
+ return getInputFlagExpr(flag);
4293
+ }
4294
+ return getInputFlagExpr(flag).bitwiseOr(expr);
4295
+ }
4255
4296
  function trimTrailingNulls(parameters) {
4256
4297
  while (isNull(parameters[parameters.length - 1])) {
4257
4298
  parameters.pop();
@@ -7127,13 +7168,6 @@ var DeferTriggerKind;
7127
7168
  DeferTriggerKind2[DeferTriggerKind2["Interaction"] = 4] = "Interaction";
7128
7169
  DeferTriggerKind2[DeferTriggerKind2["Viewport"] = 5] = "Viewport";
7129
7170
  })(DeferTriggerKind || (DeferTriggerKind = {}));
7130
- var DerivedRepeaterVarIdentity;
7131
- (function(DerivedRepeaterVarIdentity2) {
7132
- DerivedRepeaterVarIdentity2[DerivedRepeaterVarIdentity2["First"] = 0] = "First";
7133
- DerivedRepeaterVarIdentity2[DerivedRepeaterVarIdentity2["Last"] = 1] = "Last";
7134
- DerivedRepeaterVarIdentity2[DerivedRepeaterVarIdentity2["Even"] = 2] = "Even";
7135
- DerivedRepeaterVarIdentity2[DerivedRepeaterVarIdentity2["Odd"] = 3] = "Odd";
7136
- })(DerivedRepeaterVarIdentity || (DerivedRepeaterVarIdentity = {}));
7137
7171
  var I18nContextKind;
7138
7172
  (function(I18nContextKind2) {
7139
7173
  I18nContextKind2[I18nContextKind2["RootI18n"] = 0] = "RootI18n";
@@ -7288,10 +7322,11 @@ function createClassMapOp(xref, expression, sourceSpan) {
7288
7322
  sourceSpan
7289
7323
  }, TRAIT_DEPENDS_ON_SLOT_CONTEXT), TRAIT_CONSUMES_VARS), NEW_OP);
7290
7324
  }
7291
- function createAttributeOp(target, name, expression, securityContext, isTextAttribute, isStructuralTemplateAttribute, templateKind, i18nMessage, sourceSpan) {
7325
+ function createAttributeOp(target, namespace, name, expression, securityContext, isTextAttribute, isStructuralTemplateAttribute, templateKind, i18nMessage, sourceSpan) {
7292
7326
  return __spreadValues(__spreadValues(__spreadValues({
7293
7327
  kind: OpKind.Attribute,
7294
7328
  target,
7329
+ namespace,
7295
7330
  name,
7296
7331
  expression,
7297
7332
  securityContext,
@@ -7946,27 +7981,6 @@ var ConditionalCaseExpr = class extends ExpressionBase {
7946
7981
  }
7947
7982
  }
7948
7983
  };
7949
- var DerivedRepeaterVarExpr = class extends ExpressionBase {
7950
- constructor(xref, identity) {
7951
- super();
7952
- this.xref = xref;
7953
- this.identity = identity;
7954
- this.kind = ExpressionKind.DerivedRepeaterVar;
7955
- }
7956
- transformInternalExpressions(transform2, flags) {
7957
- }
7958
- visitExpression(visitor, context) {
7959
- }
7960
- isEquivalent(e) {
7961
- return e instanceof DerivedRepeaterVarExpr && e.identity === this.identity && e.xref === this.xref;
7962
- }
7963
- isConstant() {
7964
- return false;
7965
- }
7966
- clone() {
7967
- return new DerivedRepeaterVarExpr(this.xref, this.identity);
7968
- }
7969
- };
7970
7984
  var ConstCollectedExpr = class extends ExpressionBase {
7971
7985
  constructor(expr) {
7972
7986
  super();
@@ -8572,11 +8586,12 @@ function createProjectionOp(xref, selector, i18nPlaceholder, sourceSpan) {
8572
8586
  sourceSpan
8573
8587
  }, NEW_OP), TRAIT_CONSUMES_SLOT);
8574
8588
  }
8575
- function createExtractedAttributeOp(target, bindingKind, name, expression, i18nContext, i18nMessage, securityContext) {
8589
+ function createExtractedAttributeOp(target, bindingKind, namespace, name, expression, i18nContext, i18nMessage, securityContext) {
8576
8590
  return __spreadValues({
8577
8591
  kind: OpKind.ExtractedAttribute,
8578
8592
  target,
8579
8593
  bindingKind,
8594
+ namespace,
8580
8595
  name,
8581
8596
  expression,
8582
8597
  i18nContext,
@@ -8971,6 +8986,7 @@ function extractAttributes(job) {
8971
8986
  createExtractedAttributeOp(
8972
8987
  op.target,
8973
8988
  bindingKind,
8989
+ null,
8974
8990
  op.name,
8975
8991
  null,
8976
8992
  null,
@@ -8987,6 +9003,7 @@ function extractAttributes(job) {
8987
9003
  OpList.insertBefore(createExtractedAttributeOp(
8988
9004
  op.target,
8989
9005
  BindingKind.Property,
9006
+ null,
8990
9007
  op.name,
8991
9008
  null,
8992
9009
  null,
@@ -9000,6 +9017,7 @@ function extractAttributes(job) {
9000
9017
  const extractedAttributeOp = createExtractedAttributeOp(
9001
9018
  op.target,
9002
9019
  BindingKind.Property,
9020
+ null,
9003
9021
  op.name,
9004
9022
  null,
9005
9023
  null,
@@ -9036,7 +9054,7 @@ function extractAttributeOp(unit, op, elements) {
9036
9054
  extractable && (extractable = op.isTextAttribute);
9037
9055
  }
9038
9056
  if (extractable) {
9039
- const extractedAttributeOp = createExtractedAttributeOp(op.target, op.isStructuralTemplateAttribute ? BindingKind.Template : BindingKind.Attribute, op.name, op.expression, op.i18nContext, op.i18nMessage, op.securityContext);
9057
+ const extractedAttributeOp = createExtractedAttributeOp(op.target, op.isStructuralTemplateAttribute ? BindingKind.Template : BindingKind.Attribute, op.namespace, op.name, op.expression, op.i18nContext, op.i18nMessage, op.securityContext);
9040
9058
  if (unit.job.kind === CompilationJobKind.Host) {
9041
9059
  unit.create.push(extractedAttributeOp);
9042
9060
  } else {
@@ -9077,7 +9095,8 @@ function specializeBindings(job) {
9077
9095
  const target = lookupElement2(elements, op.target);
9078
9096
  target.nonBindable = true;
9079
9097
  } else {
9080
- OpList.replace(op, createAttributeOp(op.target, op.name, op.expression, op.securityContext, op.isTextAttribute, op.isStructuralTemplateAttribute, op.templateKind, op.i18nMessage, op.sourceSpan));
9098
+ const [namespace, name] = splitNsName(op.name);
9099
+ OpList.replace(op, createAttributeOp(op.target, namespace, name, op.expression, op.securityContext, op.isTextAttribute, op.isStructuralTemplateAttribute, op.templateKind, op.i18nMessage, op.sourceSpan));
9081
9100
  }
9082
9101
  break;
9083
9102
  case BindingKind.Property:
@@ -9217,6 +9236,7 @@ var BINARY_OPERATORS = /* @__PURE__ */ new Map([
9217
9236
  ["&&", BinaryOperator.And],
9218
9237
  [">", BinaryOperator.Bigger],
9219
9238
  [">=", BinaryOperator.BiggerEquals],
9239
+ ["|", BinaryOperator.BitwiseOr],
9220
9240
  ["&", BinaryOperator.BitwiseAnd],
9221
9241
  ["/", BinaryOperator.Divide],
9222
9242
  ["==", BinaryOperator.Equals],
@@ -9270,7 +9290,7 @@ function collectElementConsts(job) {
9270
9290
  if (op.kind === OpKind.ExtractedAttribute) {
9271
9291
  const attributes = allElementAttributes.get(op.target) || new ElementAttributes(job.compatibility);
9272
9292
  allElementAttributes.set(op.target, attributes);
9273
- attributes.add(op.bindingKind, op.name, op.expression, op.trustedValueFn);
9293
+ attributes.add(op.bindingKind, op.name, op.expression, op.namespace, op.trustedValueFn);
9274
9294
  OpList.remove(op);
9275
9295
  }
9276
9296
  }
@@ -9358,7 +9378,7 @@ var ElementAttributes = class {
9358
9378
  nameToValue.add(name);
9359
9379
  return false;
9360
9380
  }
9361
- add(kind, name, value, trustedValueFn) {
9381
+ add(kind, name, value, namespace, trustedValueFn) {
9362
9382
  var _a2;
9363
9383
  const allowDuplicates = this.compatibility === CompatibilityMode.TemplateDefinitionBuilder && (kind === BindingKind.Attribute || kind === BindingKind.ClassName || kind === BindingKind.StyleProperty);
9364
9384
  if (!allowDuplicates && this.isKnown(kind, name, value)) {
@@ -9371,7 +9391,7 @@ var ElementAttributes = class {
9371
9391
  this.projectAs = value.value.toString();
9372
9392
  }
9373
9393
  const array = this.arrayFor(kind);
9374
- array.push(...getAttributeNameLiterals(name));
9394
+ array.push(...getAttributeNameLiterals(namespace, name));
9375
9395
  if (kind === BindingKind.Attribute || kind === BindingKind.StyleProperty) {
9376
9396
  if (value === null) {
9377
9397
  throw Error("Attribute, i18n attribute, & style element attributes must have a value");
@@ -9393,15 +9413,10 @@ var ElementAttributes = class {
9393
9413
  return this.byKind.get(kind);
9394
9414
  }
9395
9415
  };
9396
- function getAttributeNameLiterals(name) {
9397
- const [attributeNamespace, attributeName] = splitNsName(name, false);
9398
- const nameLiteral = literal(attributeName);
9399
- if (attributeNamespace) {
9400
- return [
9401
- literal(0),
9402
- literal(attributeNamespace),
9403
- nameLiteral
9404
- ];
9416
+ function getAttributeNameLiterals(namespace, name) {
9417
+ const nameLiteral = literal(name);
9418
+ if (namespace) {
9419
+ return [literal(0), literal(namespace), nameLiteral];
9405
9420
  }
9406
9421
  return [nameLiteral];
9407
9422
  }
@@ -10192,7 +10207,7 @@ function parseHostStyleProperties(job) {
10192
10207
  if (op.name.startsWith(STYLE_DOT)) {
10193
10208
  op.bindingKind = BindingKind.StyleProperty;
10194
10209
  op.name = op.name.substring(STYLE_DOT.length);
10195
- if (isCssCustomProperty(op.name)) {
10210
+ if (!isCssCustomProperty(op.name)) {
10196
10211
  op.name = hyphenate(op.name);
10197
10212
  }
10198
10213
  const { property: property2, suffix } = parseProperty(op.name);
@@ -16883,13 +16898,13 @@ function parseExtractedStyles(job) {
16883
16898
  if (op.name === "style") {
16884
16899
  const parsedStyles = parse(op.expression.value);
16885
16900
  for (let i = 0; i < parsedStyles.length - 1; i += 2) {
16886
- OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.StyleProperty, parsedStyles[i], literal(parsedStyles[i + 1]), null, null, SecurityContext.STYLE), op);
16901
+ OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.StyleProperty, null, parsedStyles[i], literal(parsedStyles[i + 1]), null, null, SecurityContext.STYLE), op);
16887
16902
  }
16888
16903
  OpList.remove(op);
16889
16904
  } else if (op.name === "class") {
16890
16905
  const parsedClasses = op.expression.value.trim().split(/\s+/g);
16891
16906
  for (const parsedClass of parsedClasses) {
16892
- OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.ClassName, parsedClass, null, null, null, SecurityContext.NONE), op);
16907
+ OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.ClassName, null, parsedClass, null, null, null, SecurityContext.NONE), op);
16893
16908
  }
16894
16909
  OpList.remove(op);
16895
16910
  }
@@ -17215,9 +17230,7 @@ function namespaceMath() {
17215
17230
  return call(Identifiers.namespaceMathML, [], null);
17216
17231
  }
17217
17232
  function advance(delta, sourceSpan) {
17218
- return call(Identifiers.advance, [
17219
- literal(delta)
17220
- ], sourceSpan);
17233
+ return call(Identifiers.advance, delta > 1 ? [literal(delta)] : [], sourceSpan);
17221
17234
  }
17222
17235
  function reference(slot) {
17223
17236
  return importExpr(Identifiers.reference).callFn([
@@ -17361,10 +17374,13 @@ function property(name, expression, sanitizer, sourceSpan) {
17361
17374
  }
17362
17375
  return call(Identifiers.property, args, sourceSpan);
17363
17376
  }
17364
- function attribute(name, expression, sanitizer) {
17377
+ function attribute(name, expression, sanitizer, namespace) {
17365
17378
  const args = [literal(name), expression];
17366
- if (sanitizer !== null) {
17367
- args.push(sanitizer);
17379
+ if (sanitizer !== null || namespace !== null) {
17380
+ args.push(sanitizer != null ? sanitizer : literal(null));
17381
+ }
17382
+ if (namespace !== null) {
17383
+ args.push(literal(namespace));
17368
17384
  }
17369
17385
  return call(Identifiers.attribute, args, null);
17370
17386
  }
@@ -17877,7 +17893,7 @@ function reifyUpdateOperations(_unit, ops) {
17877
17893
  if (op.expression instanceof Interpolation2) {
17878
17894
  OpList.replace(op, attributeInterpolate(op.name, op.expression.strings, op.expression.expressions, op.sanitizer, op.sourceSpan));
17879
17895
  } else {
17880
- OpList.replace(op, attribute(op.name, op.expression, op.sanitizer));
17896
+ OpList.replace(op, attribute(op.name, op.expression, op.sanitizer, op.namespace));
17881
17897
  }
17882
17898
  break;
17883
17899
  case OpKind.HostProperty:
@@ -18046,38 +18062,6 @@ function removeUnusedI18nAttributesOps(job) {
18046
18062
  }
18047
18063
  }
18048
18064
 
18049
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/repeater_derived_vars.mjs
18050
- function generateRepeaterDerivedVars(job) {
18051
- const repeaters = /* @__PURE__ */ new Map();
18052
- for (const unit of job.units) {
18053
- for (const op of unit.ops()) {
18054
- if (op.kind === OpKind.RepeaterCreate) {
18055
- repeaters.set(op.xref, op);
18056
- }
18057
- }
18058
- }
18059
- for (const unit of job.units) {
18060
- for (const op of unit.ops()) {
18061
- transformExpressionsInOp(op, (expr) => {
18062
- if (!(expr instanceof DerivedRepeaterVarExpr)) {
18063
- return expr;
18064
- }
18065
- const repeaterOp = repeaters.get(expr.xref);
18066
- switch (expr.identity) {
18067
- case DerivedRepeaterVarIdentity.First:
18068
- return new BinaryOperatorExpr(BinaryOperator.Identical, new LexicalReadExpr(repeaterOp.varNames.$index), literal(0));
18069
- case DerivedRepeaterVarIdentity.Last:
18070
- return new BinaryOperatorExpr(BinaryOperator.Identical, new LexicalReadExpr(repeaterOp.varNames.$index), new BinaryOperatorExpr(BinaryOperator.Minus, new LexicalReadExpr(repeaterOp.varNames.$count), literal(1)));
18071
- case DerivedRepeaterVarIdentity.Even:
18072
- return new BinaryOperatorExpr(BinaryOperator.Identical, new BinaryOperatorExpr(BinaryOperator.Modulo, new LexicalReadExpr(repeaterOp.varNames.$index), literal(2)), literal(0));
18073
- case DerivedRepeaterVarIdentity.Odd:
18074
- return new BinaryOperatorExpr(BinaryOperator.NotIdentical, new BinaryOperatorExpr(BinaryOperator.Modulo, new LexicalReadExpr(repeaterOp.varNames.$index), literal(2)), literal(0));
18075
- }
18076
- }, VisitorContextFlag.None);
18077
- }
18078
- }
18079
- }
18080
-
18081
18065
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_contexts.mjs
18082
18066
  function resolveContexts(job) {
18083
18067
  for (const unit of job.units) {
@@ -19184,7 +19168,6 @@ var phases = [
19184
19168
  { kind: CompilationJobKind.Tmpl, fn: saveAndRestoreView },
19185
19169
  { kind: CompilationJobKind.Both, fn: deleteAnyCasts },
19186
19170
  { kind: CompilationJobKind.Both, fn: resolveDollarEvent },
19187
- { kind: CompilationJobKind.Tmpl, fn: generateRepeaterDerivedVars },
19188
19171
  { kind: CompilationJobKind.Tmpl, fn: generateTrackVariables },
19189
19172
  { kind: CompilationJobKind.Both, fn: resolveNames },
19190
19173
  { kind: CompilationJobKind.Tmpl, fn: resolveDeferTargetNames },
@@ -19535,6 +19518,9 @@ function ingestIfBlock(unit, ifBlock) {
19535
19518
  }
19536
19519
  function ingestSwitchBlock(unit, switchBlock) {
19537
19520
  var _a2;
19521
+ if (switchBlock.cases.length === 0) {
19522
+ return;
19523
+ }
19538
19524
  let firstXref = null;
19539
19525
  let firstSlotHandle = null;
19540
19526
  let conditions = [];
@@ -19679,21 +19665,37 @@ function ingestIcu(unit, icu) {
19679
19665
  function ingestForBlock(unit, forBlock) {
19680
19666
  var _a2, _b2, _c2;
19681
19667
  const repeaterView = unit.job.allocateView(unit.xref);
19682
- const createRepeaterAlias = (ident, repeaterVar) => {
19683
- repeaterView.aliases.add({
19684
- kind: SemanticVariableKind.Alias,
19685
- name: null,
19686
- identifier: ident,
19687
- expression: new DerivedRepeaterVarExpr(repeaterView.xref, repeaterVar)
19688
- });
19689
- };
19690
19668
  repeaterView.contextVariables.set(forBlock.item.name, forBlock.item.value);
19691
19669
  repeaterView.contextVariables.set(forBlock.contextVariables.$index.name, forBlock.contextVariables.$index.value);
19692
19670
  repeaterView.contextVariables.set(forBlock.contextVariables.$count.name, forBlock.contextVariables.$count.value);
19693
- createRepeaterAlias(forBlock.contextVariables.$first.name, DerivedRepeaterVarIdentity.First);
19694
- createRepeaterAlias(forBlock.contextVariables.$last.name, DerivedRepeaterVarIdentity.Last);
19695
- createRepeaterAlias(forBlock.contextVariables.$even.name, DerivedRepeaterVarIdentity.Even);
19696
- createRepeaterAlias(forBlock.contextVariables.$odd.name, DerivedRepeaterVarIdentity.Odd);
19671
+ const indexName = `\u0275${forBlock.contextVariables.$index.name}_${repeaterView.xref}`;
19672
+ const countName = `\u0275${forBlock.contextVariables.$count.name}_${repeaterView.xref}`;
19673
+ repeaterView.contextVariables.set(indexName, forBlock.contextVariables.$index.value);
19674
+ repeaterView.contextVariables.set(countName, forBlock.contextVariables.$count.value);
19675
+ repeaterView.aliases.add({
19676
+ kind: SemanticVariableKind.Alias,
19677
+ name: null,
19678
+ identifier: forBlock.contextVariables.$first.name,
19679
+ expression: new LexicalReadExpr(indexName).identical(literal(0))
19680
+ });
19681
+ repeaterView.aliases.add({
19682
+ kind: SemanticVariableKind.Alias,
19683
+ name: null,
19684
+ identifier: forBlock.contextVariables.$last.name,
19685
+ expression: new LexicalReadExpr(indexName).identical(new LexicalReadExpr(countName).minus(literal(1)))
19686
+ });
19687
+ repeaterView.aliases.add({
19688
+ kind: SemanticVariableKind.Alias,
19689
+ name: null,
19690
+ identifier: forBlock.contextVariables.$even.name,
19691
+ expression: new LexicalReadExpr(indexName).modulo(literal(2)).identical(literal(0))
19692
+ });
19693
+ repeaterView.aliases.add({
19694
+ kind: SemanticVariableKind.Alias,
19695
+ name: null,
19696
+ identifier: forBlock.contextVariables.$odd.name,
19697
+ expression: new LexicalReadExpr(indexName).modulo(literal(2)).notIdentical(literal(0))
19698
+ });
19697
19699
  const sourceSpan = convertSourceSpan(forBlock.trackBy.span, forBlock.sourceSpan);
19698
19700
  const track = convertAst(forBlock.trackBy, unit.job, sourceSpan);
19699
19701
  ingestNodes(repeaterView, forBlock.children);
@@ -19895,7 +19897,7 @@ function ingestTemplateBindings(unit, op, template2, templateKind) {
19895
19897
  }
19896
19898
  if (templateKind === TemplateKind.Structural && output.type !== 1) {
19897
19899
  const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, output.name, false);
19898
- unit.create.push(createExtractedAttributeOp(op.xref, BindingKind.Property, output.name, null, null, null, securityContext));
19900
+ unit.create.push(createExtractedAttributeOp(op.xref, BindingKind.Property, null, output.name, null, null, null, securityContext));
19899
19901
  }
19900
19902
  }
19901
19903
  if (bindings.some((b) => b == null ? void 0 : b.i18nMessage) !== null) {
@@ -19906,7 +19908,7 @@ function createTemplateBinding(view, xref, type, name, value, unit, securityCont
19906
19908
  const isTextBinding = typeof value === "string";
19907
19909
  if (templateKind === TemplateKind.Structural) {
19908
19910
  if (!isStructuralTemplateAttribute && (type === 0 || type === 2 || type === 3)) {
19909
- return createExtractedAttributeOp(xref, BindingKind.Property, name, null, null, i18nMessage, securityContext);
19911
+ return createExtractedAttributeOp(xref, BindingKind.Property, null, name, null, null, i18nMessage, securityContext);
19910
19912
  }
19911
19913
  if (!isTextBinding && (type === 1 || type === 4)) {
19912
19914
  return null;
@@ -22765,6 +22767,9 @@ var TemplateDefinitionBuilder = class {
22765
22767
  this.updateInstructionWithAdvance(containerIndex, block.branches[0].sourceSpan, Identifiers.conditional, paramsCallback);
22766
22768
  }
22767
22769
  visitSwitchBlock(block) {
22770
+ if (block.cases.length === 0) {
22771
+ return;
22772
+ }
22768
22773
  const caseData = block.cases.map((currentCase) => {
22769
22774
  const index = this.createEmbeddedTemplateFn(null, currentCase.children, "_Case", currentCase.sourceSpan, void 0, void 0, void 0, currentCase.i18n);
22770
22775
  const expression = currentCase.expression === null ? null : currentCase.expression.visit(this._valueConverter);
@@ -23092,7 +23097,7 @@ var TemplateDefinitionBuilder = class {
23092
23097
  if (delta < 1) {
23093
23098
  throw new Error("advance instruction can only go forwards");
23094
23099
  }
23095
- this.instructionFn(this._updateCodeFns, span, Identifiers.advance, [literal(delta)]);
23100
+ this.instructionFn(this._updateCodeFns, span, Identifiers.advance, delta > 1 ? [literal(delta)] : []);
23096
23101
  this._currentIndex = nodeIndex;
23097
23102
  }
23098
23103
  }
@@ -25182,7 +25187,7 @@ function convertDirectiveFacadeToMetadata(facade) {
25182
25187
  bindingPropertyName: ann.alias || field,
25183
25188
  classPropertyName: field,
25184
25189
  required: ann.required || false,
25185
- isSignal: false,
25190
+ isSignal: !!ann.isSignal,
25186
25191
  transformFunction: ann.transform != null ? new WrappedNodeExpr(ann.transform) : null
25187
25192
  };
25188
25193
  } else if (isOutput(ann)) {
@@ -25536,7 +25541,7 @@ function publishFacade(global) {
25536
25541
  }
25537
25542
 
25538
25543
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/version.mjs
25539
- var VERSION2 = new Version("17.1.0-next.5");
25544
+ var VERSION2 = new Version("17.1.0-rc.0");
25540
25545
 
25541
25546
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
25542
25547
  var _VisitorMode;
@@ -26296,7 +26301,7 @@ function getMainBlock(etm, tmpl, offset) {
26296
26301
  const { childStart: childStart2, childEnd: childEnd2 } = etm.getChildSpan(offset);
26297
26302
  middle2 = tmpl.slice(childStart2, childEnd2);
26298
26303
  } else {
26299
- middle2 = startMarker + endMarker;
26304
+ middle2 = "";
26300
26305
  }
26301
26306
  return { start: "", middle: middle2, end: "" };
26302
26307
  } else if (isI18nTemplate(etm, i18nAttr)) {