@angular/compiler 18.0.0-next.6 → 18.0.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.
@@ -11,5 +11,5 @@
11
11
  * Entry point for all public APIs of the compiler package.
12
12
  */
13
13
  import { Version } from './util';
14
- export const VERSION = new Version('18.0.0-next.6');
14
+ export const VERSION = new Version('18.0.0-rc.0');
15
15
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2NvbXBpbGVyL3NyYy92ZXJzaW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7R0FNRztBQUVIOzs7O0dBSUc7QUFFSCxPQUFPLEVBQUMsT0FBTyxFQUFDLE1BQU0sUUFBUSxDQUFDO0FBRS9CLE1BQU0sQ0FBQyxNQUFNLE9BQU8sR0FBRyxJQUFJLE9BQU8sQ0FBQyxtQkFBbUIsQ0FBQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBAbGljZW5zZVxuICogQ29weXJpZ2h0IEdvb2dsZSBMTEMgQWxsIFJpZ2h0cyBSZXNlcnZlZC5cbiAqXG4gKiBVc2Ugb2YgdGhpcyBzb3VyY2UgY29kZSBpcyBnb3Zlcm5lZCBieSBhbiBNSVQtc3R5bGUgbGljZW5zZSB0aGF0IGNhbiBiZVxuICogZm91bmQgaW4gdGhlIExJQ0VOU0UgZmlsZSBhdCBodHRwczovL2FuZ3VsYXIuaW8vbGljZW5zZVxuICovXG5cbi8qKlxuICogQG1vZHVsZVxuICogQGRlc2NyaXB0aW9uXG4gKiBFbnRyeSBwb2ludCBmb3IgYWxsIHB1YmxpYyBBUElzIG9mIHRoZSBjb21waWxlciBwYWNrYWdlLlxuICovXG5cbmltcG9ydCB7VmVyc2lvbn0gZnJvbSAnLi91dGlsJztcblxuZXhwb3J0IGNvbnN0IFZFUlNJT04gPSBuZXcgVmVyc2lvbignMC4wLjAtUExBQ0VIT0xERVInKTtcbiJdfQ==
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v18.0.0-next.6
2
+ * @license Angular v18.0.0-rc.0
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -5608,6 +5608,14 @@ function escapeXml(text) {
5608
5608
  return _ESCAPED_CHARS.reduce((text, entry) => text.replace(entry[0], entry[1]), text);
5609
5609
  }
5610
5610
 
5611
+ /**
5612
+ * Defines the `handler` value on the serialized XMB, indicating that Angular
5613
+ * generated the bundle. This is useful for analytics in Translation Console.
5614
+ *
5615
+ * NOTE: Keep in sync with
5616
+ * packages/localize/tools/src/extract/translation_files/xmb_translation_serializer.ts.
5617
+ */
5618
+ const _XMB_HANDLER = 'angular';
5611
5619
  const _MESSAGES_TAG = 'messagebundle';
5612
5620
  const _MESSAGE_TAG = 'msg';
5613
5621
  const _PLACEHOLDER_TAG$3 = 'ph';
@@ -5636,7 +5644,8 @@ class Xmb extends Serializer {
5636
5644
  write(messages, locale) {
5637
5645
  const exampleVisitor = new ExampleVisitor();
5638
5646
  const visitor = new _Visitor$1();
5639
- let rootNode = new Tag(_MESSAGES_TAG);
5647
+ const rootNode = new Tag(_MESSAGES_TAG);
5648
+ rootNode.attrs['handler'] = _XMB_HANDLER;
5640
5649
  messages.forEach((message) => {
5641
5650
  const attrs = { id: message.id };
5642
5651
  if (message.description) {
@@ -23907,14 +23916,16 @@ function ingestContent(unit, content) {
23907
23916
  if (content.i18n !== undefined && !(content.i18n instanceof TagPlaceholder)) {
23908
23917
  throw Error(`Unhandled i18n metadata type for element: ${content.i18n.constructor.name}`);
23909
23918
  }
23910
- const id = unit.job.allocateXrefId();
23911
23919
  let fallbackView = null;
23912
23920
  // Don't capture default content that's only made up of empty text nodes and comments.
23921
+ // Note that we process the default content before the projection in order to match the
23922
+ // insertion order at runtime.
23913
23923
  if (content.children.some((child) => !(child instanceof Comment$1) &&
23914
23924
  (!(child instanceof Text$3) || child.value.trim().length > 0))) {
23915
23925
  fallbackView = unit.job.allocateView(unit.xref);
23916
23926
  ingestNodes(fallbackView, content.children);
23917
23927
  }
23928
+ const id = unit.job.allocateXrefId();
23918
23929
  const op = createProjectionOp(id, content.selector, content.i18n, fallbackView?.xref ?? null, content.sourceSpan);
23919
23930
  for (const attr of content.attributes) {
23920
23931
  const securityContext = domSchema.securityContext(content.name, attr.name, true);
@@ -29010,7 +29021,7 @@ function publishFacade(global) {
29010
29021
  * @description
29011
29022
  * Entry point for all public APIs of the compiler package.
29012
29023
  */
29013
- const VERSION = new Version('18.0.0-next.6');
29024
+ const VERSION = new Version('18.0.0-rc.0');
29014
29025
 
29015
29026
  class CompilerConfig {
29016
29027
  constructor({ defaultEncapsulation = ViewEncapsulation.Emulated, preserveWhitespaces, strictInjectionParameters, } = {}) {
@@ -30641,7 +30652,7 @@ const MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = '18.0.0';
30641
30652
  function compileDeclareClassMetadata(metadata) {
30642
30653
  const definitionMap = new DefinitionMap();
30643
30654
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
30644
- definitionMap.set('version', literal('18.0.0-next.6'));
30655
+ definitionMap.set('version', literal('18.0.0-rc.0'));
30645
30656
  definitionMap.set('ngImport', importExpr(Identifiers.core));
30646
30657
  definitionMap.set('type', metadata.type);
30647
30658
  definitionMap.set('decorators', metadata.decorators);
@@ -30659,7 +30670,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
30659
30670
  callbackReturnDefinitionMap.set('ctorParameters', metadata.ctorParameters ?? literal(null));
30660
30671
  callbackReturnDefinitionMap.set('propDecorators', metadata.propDecorators ?? literal(null));
30661
30672
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
30662
- definitionMap.set('version', literal('18.0.0-next.6'));
30673
+ definitionMap.set('version', literal('18.0.0-rc.0'));
30663
30674
  definitionMap.set('ngImport', importExpr(Identifiers.core));
30664
30675
  definitionMap.set('type', metadata.type);
30665
30676
  definitionMap.set('resolveDeferredDeps', compileComponentMetadataAsyncResolver(dependencies));
@@ -30754,7 +30765,7 @@ function createDirectiveDefinitionMap(meta) {
30754
30765
  const definitionMap = new DefinitionMap();
30755
30766
  const minVersion = getMinimumVersionForPartialOutput(meta);
30756
30767
  definitionMap.set('minVersion', literal(minVersion));
30757
- definitionMap.set('version', literal('18.0.0-next.6'));
30768
+ definitionMap.set('version', literal('18.0.0-rc.0'));
30758
30769
  // e.g. `type: MyDirective`
30759
30770
  definitionMap.set('type', meta.type.value);
30760
30771
  if (meta.isStandalone) {
@@ -31176,7 +31187,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
31176
31187
  function compileDeclareFactoryFunction(meta) {
31177
31188
  const definitionMap = new DefinitionMap();
31178
31189
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
31179
- definitionMap.set('version', literal('18.0.0-next.6'));
31190
+ definitionMap.set('version', literal('18.0.0-rc.0'));
31180
31191
  definitionMap.set('ngImport', importExpr(Identifiers.core));
31181
31192
  definitionMap.set('type', meta.type.value);
31182
31193
  definitionMap.set('deps', compileDependencies(meta.deps));
@@ -31211,7 +31222,7 @@ function compileDeclareInjectableFromMetadata(meta) {
31211
31222
  function createInjectableDefinitionMap(meta) {
31212
31223
  const definitionMap = new DefinitionMap();
31213
31224
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
31214
- definitionMap.set('version', literal('18.0.0-next.6'));
31225
+ definitionMap.set('version', literal('18.0.0-rc.0'));
31215
31226
  definitionMap.set('ngImport', importExpr(Identifiers.core));
31216
31227
  definitionMap.set('type', meta.type.value);
31217
31228
  // Only generate providedIn property if it has a non-null value
@@ -31262,7 +31273,7 @@ function compileDeclareInjectorFromMetadata(meta) {
31262
31273
  function createInjectorDefinitionMap(meta) {
31263
31274
  const definitionMap = new DefinitionMap();
31264
31275
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
31265
- definitionMap.set('version', literal('18.0.0-next.6'));
31276
+ definitionMap.set('version', literal('18.0.0-rc.0'));
31266
31277
  definitionMap.set('ngImport', importExpr(Identifiers.core));
31267
31278
  definitionMap.set('type', meta.type.value);
31268
31279
  definitionMap.set('providers', meta.providers);
@@ -31295,7 +31306,7 @@ function createNgModuleDefinitionMap(meta) {
31295
31306
  throw new Error('Invalid path! Local compilation mode should not get into the partial compilation path');
31296
31307
  }
31297
31308
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
31298
- definitionMap.set('version', literal('18.0.0-next.6'));
31309
+ definitionMap.set('version', literal('18.0.0-rc.0'));
31299
31310
  definitionMap.set('ngImport', importExpr(Identifiers.core));
31300
31311
  definitionMap.set('type', meta.type.value);
31301
31312
  // We only generate the keys in the metadata if the arrays contain values.
@@ -31346,7 +31357,7 @@ function compileDeclarePipeFromMetadata(meta) {
31346
31357
  function createPipeDefinitionMap(meta) {
31347
31358
  const definitionMap = new DefinitionMap();
31348
31359
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
31349
- definitionMap.set('version', literal('18.0.0-next.6'));
31360
+ definitionMap.set('version', literal('18.0.0-rc.0'));
31350
31361
  definitionMap.set('ngImport', importExpr(Identifiers.core));
31351
31362
  // e.g. `type: MyPipe`
31352
31363
  definitionMap.set('type', meta.type.value);