@angular/compiler 20.1.7 → 20.1.8

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.1.7
2
+ * @license Angular v20.1.8
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -22950,6 +22950,11 @@ function propagateI18nBlocksToTemplates(unit, subTemplateIndex) {
22950
22950
  subTemplateIndex = propagateI18nBlocksForView(unit.job.views.get(op.emptyView), i18nBlock, op.emptyI18nPlaceholder, subTemplateIndex);
22951
22951
  }
22952
22952
  break;
22953
+ case OpKind.Projection:
22954
+ if (op.fallbackView !== null) {
22955
+ subTemplateIndex = propagateI18nBlocksForView(unit.job.views.get(op.fallbackView), i18nBlock, op.fallbackViewI18nPlaceholder, subTemplateIndex);
22956
+ }
22957
+ break;
22953
22958
  }
22954
22959
  }
22955
22960
  return subTemplateIndex;
@@ -24425,6 +24430,21 @@ function resolvePlaceholdersForView(job, unit, i18nContexts, elements, pendingSt
24425
24430
  // Clear out the pending structural directive now that its been accounted for.
24426
24431
  pendingStructuralDirective = undefined;
24427
24432
  }
24433
+ if (op.fallbackView !== null) {
24434
+ const view = job.views.get(op.fallbackView);
24435
+ if (op.fallbackViewI18nPlaceholder === undefined) {
24436
+ resolvePlaceholdersForView(job, view, i18nContexts, elements);
24437
+ }
24438
+ else {
24439
+ if (currentOps === null) {
24440
+ throw Error('i18n tag placeholder should only occur inside an i18n block');
24441
+ }
24442
+ recordTemplateStart(job, view, op.handle.slot, op.fallbackViewI18nPlaceholder, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
24443
+ resolvePlaceholdersForView(job, view, i18nContexts, elements);
24444
+ recordTemplateClose(job, view, op.handle.slot, op.fallbackViewI18nPlaceholder, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
24445
+ pendingStructuralDirective = undefined;
24446
+ }
24447
+ }
24428
24448
  break;
24429
24449
  case OpKind.ConditionalCreate:
24430
24450
  case OpKind.ConditionalBranchCreate:
@@ -29286,11 +29306,11 @@ class HtmlAstToIvyAst {
29286
29306
  const templateKey = normalizedName.substring(TEMPLATE_ATTR_PREFIX.length);
29287
29307
  const parsedVariables = [];
29288
29308
  const absoluteValueOffset = attribute.valueSpan
29289
- ? attribute.valueSpan.start.offset
29309
+ ? attribute.valueSpan.fullStart.offset
29290
29310
  : // If there is no value span the attribute does not have a value, like `attr` in
29291
29311
  //`<div attr></div>`. In this case, point to one character beyond the last character of
29292
29312
  // the attribute name.
29293
- attribute.sourceSpan.start.offset + attribute.name.length;
29313
+ attribute.sourceSpan.fullStart.offset + attribute.name.length;
29294
29314
  this.bindingParser.parseInlineTemplateBinding(templateKey, templateValue, attribute.sourceSpan, absoluteValueOffset, [], templateParsedProperties, parsedVariables, true /* isIvyAst */);
29295
29315
  templateVariables.push(...parsedVariables.map((v) => new Variable(v.name, v.value, v.sourceSpan, v.keySpan, v.valueSpan)));
29296
29316
  }
@@ -33780,7 +33800,7 @@ const MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = '18.0.0';
33780
33800
  function compileDeclareClassMetadata(metadata) {
33781
33801
  const definitionMap = new DefinitionMap();
33782
33802
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
33783
- definitionMap.set('version', literal('20.1.7'));
33803
+ definitionMap.set('version', literal('20.1.8'));
33784
33804
  definitionMap.set('ngImport', importExpr(Identifiers.core));
33785
33805
  definitionMap.set('type', metadata.type);
33786
33806
  definitionMap.set('decorators', metadata.decorators);
@@ -33798,7 +33818,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
33798
33818
  callbackReturnDefinitionMap.set('ctorParameters', metadata.ctorParameters ?? literal(null));
33799
33819
  callbackReturnDefinitionMap.set('propDecorators', metadata.propDecorators ?? literal(null));
33800
33820
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
33801
- definitionMap.set('version', literal('20.1.7'));
33821
+ definitionMap.set('version', literal('20.1.8'));
33802
33822
  definitionMap.set('ngImport', importExpr(Identifiers.core));
33803
33823
  definitionMap.set('type', metadata.type);
33804
33824
  definitionMap.set('resolveDeferredDeps', compileComponentMetadataAsyncResolver(dependencies));
@@ -33893,7 +33913,7 @@ function createDirectiveDefinitionMap(meta) {
33893
33913
  const definitionMap = new DefinitionMap();
33894
33914
  const minVersion = getMinimumVersionForPartialOutput(meta);
33895
33915
  definitionMap.set('minVersion', literal(minVersion));
33896
- definitionMap.set('version', literal('20.1.7'));
33916
+ definitionMap.set('version', literal('20.1.8'));
33897
33917
  // e.g. `type: MyDirective`
33898
33918
  definitionMap.set('type', meta.type.value);
33899
33919
  if (meta.isStandalone !== undefined) {
@@ -34309,7 +34329,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
34309
34329
  function compileDeclareFactoryFunction(meta) {
34310
34330
  const definitionMap = new DefinitionMap();
34311
34331
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
34312
- definitionMap.set('version', literal('20.1.7'));
34332
+ definitionMap.set('version', literal('20.1.8'));
34313
34333
  definitionMap.set('ngImport', importExpr(Identifiers.core));
34314
34334
  definitionMap.set('type', meta.type.value);
34315
34335
  definitionMap.set('deps', compileDependencies(meta.deps));
@@ -34344,7 +34364,7 @@ function compileDeclareInjectableFromMetadata(meta) {
34344
34364
  function createInjectableDefinitionMap(meta) {
34345
34365
  const definitionMap = new DefinitionMap();
34346
34366
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
34347
- definitionMap.set('version', literal('20.1.7'));
34367
+ definitionMap.set('version', literal('20.1.8'));
34348
34368
  definitionMap.set('ngImport', importExpr(Identifiers.core));
34349
34369
  definitionMap.set('type', meta.type.value);
34350
34370
  // Only generate providedIn property if it has a non-null value
@@ -34395,7 +34415,7 @@ function compileDeclareInjectorFromMetadata(meta) {
34395
34415
  function createInjectorDefinitionMap(meta) {
34396
34416
  const definitionMap = new DefinitionMap();
34397
34417
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
34398
- definitionMap.set('version', literal('20.1.7'));
34418
+ definitionMap.set('version', literal('20.1.8'));
34399
34419
  definitionMap.set('ngImport', importExpr(Identifiers.core));
34400
34420
  definitionMap.set('type', meta.type.value);
34401
34421
  definitionMap.set('providers', meta.providers);
@@ -34428,7 +34448,7 @@ function createNgModuleDefinitionMap(meta) {
34428
34448
  throw new Error('Invalid path! Local compilation mode should not get into the partial compilation path');
34429
34449
  }
34430
34450
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
34431
- definitionMap.set('version', literal('20.1.7'));
34451
+ definitionMap.set('version', literal('20.1.8'));
34432
34452
  definitionMap.set('ngImport', importExpr(Identifiers.core));
34433
34453
  definitionMap.set('type', meta.type.value);
34434
34454
  // We only generate the keys in the metadata if the arrays contain values.
@@ -34479,7 +34499,7 @@ function compileDeclarePipeFromMetadata(meta) {
34479
34499
  function createPipeDefinitionMap(meta) {
34480
34500
  const definitionMap = new DefinitionMap();
34481
34501
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
34482
- definitionMap.set('version', literal('20.1.7'));
34502
+ definitionMap.set('version', literal('20.1.8'));
34483
34503
  definitionMap.set('ngImport', importExpr(Identifiers.core));
34484
34504
  // e.g. `type: MyPipe`
34485
34505
  definitionMap.set('type', meta.type.value);
@@ -34635,7 +34655,7 @@ function compileHmrUpdateCallback(definitions, constantStatements, meta) {
34635
34655
  * @description
34636
34656
  * Entry point for all public APIs of the compiler package.
34637
34657
  */
34638
- const VERSION = new Version('20.1.7');
34658
+ const VERSION = new Version('20.1.8');
34639
34659
 
34640
34660
  //////////////////////////////////////
34641
34661
  // THIS FILE HAS GLOBAL SIDE EFFECT //