@angular/compiler 15.2.0-next.1 → 15.2.0-next.2

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 v15.2.0-next.1
2
+ * @license Angular v15.2.0-next.2
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -7553,6 +7553,7 @@ const animationKeywords = new Set([
7553
7553
  */
7554
7554
  class ShadowCss {
7555
7555
  constructor() {
7556
+ // TODO: Is never re-assigned, could be removed.
7556
7557
  this.strictStyling = true;
7557
7558
  /**
7558
7559
  * Regular expression used to extrapolate the possible keyframes from an
@@ -8014,6 +8015,7 @@ class ShadowCss {
8014
8015
  // return a selector with [name] suffix on each simple selector
8015
8016
  // e.g. .foo.bar > .zot becomes .foo[name].bar[name] > .zot[name] /** @internal */
8016
8017
  _applyStrictSelectorScope(selector, scopeSelector, hostSelector) {
8018
+ var _a;
8017
8019
  const isRe = /\[is=([^\]]*)\]/g;
8018
8020
  scopeSelector = scopeSelector.replace(isRe, (_, ...parts) => parts[0]);
8019
8021
  const attrName = '[' + scopeSelector + ']';
@@ -8060,6 +8062,13 @@ class ShadowCss {
8060
8062
  while ((res = sep.exec(selector)) !== null) {
8061
8063
  const separator = res[1];
8062
8064
  const part = selector.slice(startIndex, res.index).trim();
8065
+ // A space following an escaped hex value and followed by another hex character
8066
+ // (ie: ".\fc ber" for ".über") is not a separator between 2 selectors
8067
+ // also keep in mind that backslashes are replaced by a placeholder by SafeSelector
8068
+ // These escaped selectors happen for example when esbuild runs with optimization.minify.
8069
+ if (part.match(_placeholderRe) && ((_a = selector[res.index + 1]) === null || _a === void 0 ? void 0 : _a.match(/[a-fA-F\d]/))) {
8070
+ continue;
8071
+ }
8063
8072
  shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;
8064
8073
  const scopedPart = shouldScope ? _scopeSelectorPart(part) : part;
8065
8074
  scopedSelector += `${scopedPart} ${separator} `;
@@ -8099,7 +8108,7 @@ class SafeSelector {
8099
8108
  });
8100
8109
  }
8101
8110
  restore(content) {
8102
- return content.replace(/__ph-(\d+)__/g, (_ph, index) => this.placeholders[+index]);
8111
+ return content.replace(_placeholderRe, (_ph, index) => this.placeholders[+index]);
8103
8112
  }
8104
8113
  content() {
8105
8114
  return this._content;
@@ -8147,6 +8156,7 @@ const _polyfillHostRe = /-shadowcsshost/gim;
8147
8156
  const _colonHostRe = /:host/gim;
8148
8157
  const _colonHostContextRe = /:host-context/gim;
8149
8158
  const _commentRe = /\/\*[\s\S]*?\*\//g;
8159
+ const _placeholderRe = /__ph-(\d+)__/g;
8150
8160
  function stripComments(input) {
8151
8161
  return input.replace(_commentRe, '');
8152
8162
  }
@@ -19871,7 +19881,7 @@ function publishFacade(global) {
19871
19881
  * @description
19872
19882
  * Entry point for all public APIs of the compiler package.
19873
19883
  */
19874
- const VERSION = new Version('15.2.0-next.1');
19884
+ const VERSION = new Version('15.2.0-next.2');
19875
19885
 
19876
19886
  class CompilerConfig {
19877
19887
  constructor({ defaultEncapsulation = ViewEncapsulation.Emulated, useJit = true, missingTranslation = null, preserveWhitespaces, strictInjectionParameters } = {}) {
@@ -21797,7 +21807,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$6 = '12.0.0';
21797
21807
  function compileDeclareClassMetadata(metadata) {
21798
21808
  const definitionMap = new DefinitionMap();
21799
21809
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$6));
21800
- definitionMap.set('version', literal('15.2.0-next.1'));
21810
+ definitionMap.set('version', literal('15.2.0-next.2'));
21801
21811
  definitionMap.set('ngImport', importExpr(Identifiers.core));
21802
21812
  definitionMap.set('type', metadata.type);
21803
21813
  definitionMap.set('decorators', metadata.decorators);
@@ -21901,7 +21911,7 @@ function createDirectiveDefinitionMap(meta) {
21901
21911
  var _a;
21902
21912
  const definitionMap = new DefinitionMap();
21903
21913
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
21904
- definitionMap.set('version', literal('15.2.0-next.1'));
21914
+ definitionMap.set('version', literal('15.2.0-next.2'));
21905
21915
  // e.g. `type: MyDirective`
21906
21916
  definitionMap.set('type', meta.internalType);
21907
21917
  if (meta.isStandalone) {
@@ -22126,7 +22136,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
22126
22136
  function compileDeclareFactoryFunction(meta) {
22127
22137
  const definitionMap = new DefinitionMap();
22128
22138
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
22129
- definitionMap.set('version', literal('15.2.0-next.1'));
22139
+ definitionMap.set('version', literal('15.2.0-next.2'));
22130
22140
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22131
22141
  definitionMap.set('type', meta.internalType);
22132
22142
  definitionMap.set('deps', compileDependencies(meta.deps));
@@ -22161,7 +22171,7 @@ function compileDeclareInjectableFromMetadata(meta) {
22161
22171
  function createInjectableDefinitionMap(meta) {
22162
22172
  const definitionMap = new DefinitionMap();
22163
22173
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
22164
- definitionMap.set('version', literal('15.2.0-next.1'));
22174
+ definitionMap.set('version', literal('15.2.0-next.2'));
22165
22175
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22166
22176
  definitionMap.set('type', meta.internalType);
22167
22177
  // Only generate providedIn property if it has a non-null value
@@ -22212,7 +22222,7 @@ function compileDeclareInjectorFromMetadata(meta) {
22212
22222
  function createInjectorDefinitionMap(meta) {
22213
22223
  const definitionMap = new DefinitionMap();
22214
22224
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
22215
- definitionMap.set('version', literal('15.2.0-next.1'));
22225
+ definitionMap.set('version', literal('15.2.0-next.2'));
22216
22226
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22217
22227
  definitionMap.set('type', meta.internalType);
22218
22228
  definitionMap.set('providers', meta.providers);
@@ -22242,7 +22252,7 @@ function compileDeclareNgModuleFromMetadata(meta) {
22242
22252
  function createNgModuleDefinitionMap(meta) {
22243
22253
  const definitionMap = new DefinitionMap();
22244
22254
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
22245
- definitionMap.set('version', literal('15.2.0-next.1'));
22255
+ definitionMap.set('version', literal('15.2.0-next.2'));
22246
22256
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22247
22257
  definitionMap.set('type', meta.internalType);
22248
22258
  // We only generate the keys in the metadata if the arrays contain values.
@@ -22293,7 +22303,7 @@ function compileDeclarePipeFromMetadata(meta) {
22293
22303
  function createPipeDefinitionMap(meta) {
22294
22304
  const definitionMap = new DefinitionMap();
22295
22305
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
22296
- definitionMap.set('version', literal('15.2.0-next.1'));
22306
+ definitionMap.set('version', literal('15.2.0-next.2'));
22297
22307
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22298
22308
  // e.g. `type: MyPipe`
22299
22309
  definitionMap.set('type', meta.internalType);