@angular/compiler 20.2.0-rc.1 → 20.2.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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v20.2.0-rc.1
2
+ * @license Angular v20.2.0
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -23224,6 +23224,11 @@ function propagateI18nBlocksToTemplates(unit, subTemplateIndex) {
23224
23224
  subTemplateIndex = propagateI18nBlocksForView(unit.job.views.get(op.emptyView), i18nBlock, op.emptyI18nPlaceholder, subTemplateIndex);
23225
23225
  }
23226
23226
  break;
23227
+ case OpKind.Projection:
23228
+ if (op.fallbackView !== null) {
23229
+ subTemplateIndex = propagateI18nBlocksForView(unit.job.views.get(op.fallbackView), i18nBlock, op.fallbackViewI18nPlaceholder, subTemplateIndex);
23230
+ }
23231
+ break;
23227
23232
  }
23228
23233
  }
23229
23234
  return subTemplateIndex;
@@ -24807,6 +24812,21 @@ function resolvePlaceholdersForView(job, unit, i18nContexts, elements, pendingSt
24807
24812
  // Clear out the pending structural directive now that its been accounted for.
24808
24813
  pendingStructuralDirective = undefined;
24809
24814
  }
24815
+ if (op.fallbackView !== null) {
24816
+ const view = job.views.get(op.fallbackView);
24817
+ if (op.fallbackViewI18nPlaceholder === undefined) {
24818
+ resolvePlaceholdersForView(job, view, i18nContexts, elements);
24819
+ }
24820
+ else {
24821
+ if (currentOps === null) {
24822
+ throw Error('i18n tag placeholder should only occur inside an i18n block');
24823
+ }
24824
+ recordTemplateStart(job, view, op.handle.slot, op.fallbackViewI18nPlaceholder, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
24825
+ resolvePlaceholdersForView(job, view, i18nContexts, elements);
24826
+ recordTemplateClose(job, view, op.handle.slot, op.fallbackViewI18nPlaceholder, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
24827
+ pendingStructuralDirective = undefined;
24828
+ }
24829
+ }
24810
24830
  break;
24811
24831
  case OpKind.ConditionalCreate:
24812
24832
  case OpKind.ConditionalBranchCreate:
@@ -26656,10 +26676,16 @@ function ingestHostAttribute(job, name, value, securityContexts) {
26656
26676
  job.root.update.push(attrBinding);
26657
26677
  }
26658
26678
  function ingestHostEvent(job, event) {
26659
- const [phase, target] = event.type !== ParsedEventType.LegacyAnimation
26660
- ? [null, event.targetOrPhase]
26661
- : [event.targetOrPhase, null];
26662
- const eventBinding = createListenerOp(job.root.xref, new SlotHandle(), event.name, null, makeListenerHandlerOps(job.root, event.handler, event.handlerSpan), phase, target, true, event.sourceSpan);
26679
+ let eventBinding;
26680
+ if (event.type === ParsedEventType.Animation) {
26681
+ eventBinding = createAnimationListenerOp(job.root.xref, new SlotHandle(), event.name, null, makeListenerHandlerOps(job.root, event.handler, event.handlerSpan), event.name.endsWith('enter') ? "enter" /* ir.AnimationKind.ENTER */ : "leave" /* ir.AnimationKind.LEAVE */, event.targetOrPhase, true, event.sourceSpan);
26682
+ }
26683
+ else {
26684
+ const [phase, target] = event.type !== ParsedEventType.LegacyAnimation
26685
+ ? [null, event.targetOrPhase]
26686
+ : [event.targetOrPhase, null];
26687
+ eventBinding = createListenerOp(job.root.xref, new SlotHandle(), event.name, null, makeListenerHandlerOps(job.root, event.handler, event.handlerSpan), phase, target, true, event.sourceSpan);
26688
+ }
26663
26689
  job.root.create.push(eventBinding);
26664
26690
  }
26665
26691
  /**
@@ -29720,11 +29746,11 @@ class HtmlAstToIvyAst {
29720
29746
  const templateKey = normalizedName.substring(TEMPLATE_ATTR_PREFIX.length);
29721
29747
  const parsedVariables = [];
29722
29748
  const absoluteValueOffset = attribute.valueSpan
29723
- ? attribute.valueSpan.start.offset
29749
+ ? attribute.valueSpan.fullStart.offset
29724
29750
  : // If there is no value span the attribute does not have a value, like `attr` in
29725
29751
  //`<div attr></div>`. In this case, point to one character beyond the last character of
29726
29752
  // the attribute name.
29727
- attribute.sourceSpan.start.offset + attribute.name.length;
29753
+ attribute.sourceSpan.fullStart.offset + attribute.name.length;
29728
29754
  this.bindingParser.parseInlineTemplateBinding(templateKey, templateValue, attribute.sourceSpan, absoluteValueOffset, [], templateParsedProperties, parsedVariables, true /* isIvyAst */);
29729
29755
  templateVariables.push(...parsedVariables.map((v) => new Variable(v.name, v.value, v.sourceSpan, v.keySpan, v.valueSpan)));
29730
29756
  }
@@ -34274,7 +34300,7 @@ const MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = '18.0.0';
34274
34300
  function compileDeclareClassMetadata(metadata) {
34275
34301
  const definitionMap = new DefinitionMap();
34276
34302
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
34277
- definitionMap.set('version', literal('20.2.0-rc.1'));
34303
+ definitionMap.set('version', literal('20.2.0'));
34278
34304
  definitionMap.set('ngImport', importExpr(Identifiers.core));
34279
34305
  definitionMap.set('type', metadata.type);
34280
34306
  definitionMap.set('decorators', metadata.decorators);
@@ -34292,7 +34318,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
34292
34318
  callbackReturnDefinitionMap.set('ctorParameters', metadata.ctorParameters ?? literal(null));
34293
34319
  callbackReturnDefinitionMap.set('propDecorators', metadata.propDecorators ?? literal(null));
34294
34320
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
34295
- definitionMap.set('version', literal('20.2.0-rc.1'));
34321
+ definitionMap.set('version', literal('20.2.0'));
34296
34322
  definitionMap.set('ngImport', importExpr(Identifiers.core));
34297
34323
  definitionMap.set('type', metadata.type);
34298
34324
  definitionMap.set('resolveDeferredDeps', compileComponentMetadataAsyncResolver(dependencies));
@@ -34387,7 +34413,7 @@ function createDirectiveDefinitionMap(meta) {
34387
34413
  const definitionMap = new DefinitionMap();
34388
34414
  const minVersion = getMinimumVersionForPartialOutput(meta);
34389
34415
  definitionMap.set('minVersion', literal(minVersion));
34390
- definitionMap.set('version', literal('20.2.0-rc.1'));
34416
+ definitionMap.set('version', literal('20.2.0'));
34391
34417
  // e.g. `type: MyDirective`
34392
34418
  definitionMap.set('type', meta.type.value);
34393
34419
  if (meta.isStandalone !== undefined) {
@@ -34803,7 +34829,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
34803
34829
  function compileDeclareFactoryFunction(meta) {
34804
34830
  const definitionMap = new DefinitionMap();
34805
34831
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
34806
- definitionMap.set('version', literal('20.2.0-rc.1'));
34832
+ definitionMap.set('version', literal('20.2.0'));
34807
34833
  definitionMap.set('ngImport', importExpr(Identifiers.core));
34808
34834
  definitionMap.set('type', meta.type.value);
34809
34835
  definitionMap.set('deps', compileDependencies(meta.deps));
@@ -34838,7 +34864,7 @@ function compileDeclareInjectableFromMetadata(meta) {
34838
34864
  function createInjectableDefinitionMap(meta) {
34839
34865
  const definitionMap = new DefinitionMap();
34840
34866
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
34841
- definitionMap.set('version', literal('20.2.0-rc.1'));
34867
+ definitionMap.set('version', literal('20.2.0'));
34842
34868
  definitionMap.set('ngImport', importExpr(Identifiers.core));
34843
34869
  definitionMap.set('type', meta.type.value);
34844
34870
  // Only generate providedIn property if it has a non-null value
@@ -34889,7 +34915,7 @@ function compileDeclareInjectorFromMetadata(meta) {
34889
34915
  function createInjectorDefinitionMap(meta) {
34890
34916
  const definitionMap = new DefinitionMap();
34891
34917
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
34892
- definitionMap.set('version', literal('20.2.0-rc.1'));
34918
+ definitionMap.set('version', literal('20.2.0'));
34893
34919
  definitionMap.set('ngImport', importExpr(Identifiers.core));
34894
34920
  definitionMap.set('type', meta.type.value);
34895
34921
  definitionMap.set('providers', meta.providers);
@@ -34922,7 +34948,7 @@ function createNgModuleDefinitionMap(meta) {
34922
34948
  throw new Error('Invalid path! Local compilation mode should not get into the partial compilation path');
34923
34949
  }
34924
34950
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
34925
- definitionMap.set('version', literal('20.2.0-rc.1'));
34951
+ definitionMap.set('version', literal('20.2.0'));
34926
34952
  definitionMap.set('ngImport', importExpr(Identifiers.core));
34927
34953
  definitionMap.set('type', meta.type.value);
34928
34954
  // We only generate the keys in the metadata if the arrays contain values.
@@ -34973,7 +34999,7 @@ function compileDeclarePipeFromMetadata(meta) {
34973
34999
  function createPipeDefinitionMap(meta) {
34974
35000
  const definitionMap = new DefinitionMap();
34975
35001
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
34976
- definitionMap.set('version', literal('20.2.0-rc.1'));
35002
+ definitionMap.set('version', literal('20.2.0'));
34977
35003
  definitionMap.set('ngImport', importExpr(Identifiers.core));
34978
35004
  // e.g. `type: MyPipe`
34979
35005
  definitionMap.set('type', meta.type.value);
@@ -35129,7 +35155,7 @@ function compileHmrUpdateCallback(definitions, constantStatements, meta) {
35129
35155
  * @description
35130
35156
  * Entry point for all public APIs of the compiler package.
35131
35157
  */
35132
- const VERSION = new Version('20.2.0-rc.1');
35158
+ const VERSION = new Version('20.2.0');
35133
35159
 
35134
35160
  //////////////////////////////////////
35135
35161
  // THIS FILE HAS GLOBAL SIDE EFFECT //