11/**
2- * @license Angular v19.2.0-next.0+sha-04c2447
2+ * @license Angular v19.2.0-next.0+sha-8e5c0f8
33 * (c) 2010-2024 Google LLC. https://angular.io/
44 * License: MIT
55 */
@@ -7794,6 +7794,36 @@ class ShadowCss {
77947794 * .foo<scopeName> .bar { ... }
77957795 */
77967796 _convertColonHostContext(cssText) {
7797+ const length = cssText.length;
7798+ let parens = 0;
7799+ let prev = 0;
7800+ let result = '';
7801+ // Splits up the selectors on their top-level commas, processes the :host-context in them
7802+ // individually and stitches them back together. This ensures that individual selectors don't
7803+ // affect each other.
7804+ for (let i = 0; i < length; i++) {
7805+ const char = cssText[i];
7806+ // If we hit a comma and there are no open parentheses, take the current chunk and process it.
7807+ if (char === ',' && parens === 0) {
7808+ result += this._convertColonHostContextInSelectorPart(cssText.slice(prev, i)) + ',';
7809+ prev = i + 1;
7810+ continue;
7811+ }
7812+ // We've hit the end. Take everything since the last comma.
7813+ if (i === length - 1) {
7814+ result += this._convertColonHostContextInSelectorPart(cssText.slice(prev));
7815+ break;
7816+ }
7817+ if (char === '(') {
7818+ parens++;
7819+ }
7820+ else if (char === ')') {
7821+ parens--;
7822+ }
7823+ }
7824+ return result;
7825+ }
7826+ _convertColonHostContextInSelectorPart(cssText) {
77977827 return cssText.replace(_cssColonHostContextReGlobal, (selectorText, pseudoPrefix) => {
77987828 // We have captured a selector that contains a `:host-context` rule.
77997829 // For backward compatibility `:host-context` may contain a comma separated list of selectors.
@@ -8181,10 +8211,13 @@ const _cssContentUnscopedRuleRe = /(polyfill-unscoped-rule)[^}]*(content:[\s]*([
81818211const _polyfillHost = '-shadowcsshost';
81828212// note: :host-context pre-processed to -shadowcsshostcontext.
81838213const _polyfillHostContext = '-shadowcsscontext';
8184- const _parenSuffix = '(?:\\((' + '(?:\\([^)(]*\\)|[^)(]*)+?' + ')\\))?([^,{]*)';
8185- const _cssColonHostRe = new RegExp(_polyfillHost + _parenSuffix, 'gim');
8186- const _cssColonHostContextReGlobal = new RegExp(_cssScopedPseudoFunctionPrefix + '(' + _polyfillHostContext + _parenSuffix + ')', 'gim');
8187- const _cssColonHostContextRe = new RegExp(_polyfillHostContext + _parenSuffix, 'im');
8214+ const _parenSuffix = '(?:\\((' + '(?:\\([^)(]*\\)|[^)(]*)+?' + ')\\))';
8215+ const _cssColonHostRe = new RegExp(_polyfillHost + _parenSuffix + '?([^,{]*)', 'gim');
8216+ // note: :host-context patterns are terminated with `{`, as opposed to :host which
8217+ // is both `{` and `,` because :host-context handles top-level commas differently.
8218+ const _hostContextPattern = _polyfillHostContext + _parenSuffix + '?([^{]*)';
8219+ const _cssColonHostContextReGlobal = new RegExp(`${_cssScopedPseudoFunctionPrefix}(${_hostContextPattern})`, 'gim');
8220+ const _cssColonHostContextRe = new RegExp(_hostContextPattern, 'im');
81888221const _polyfillHostNoCombinator = _polyfillHost + '-no-combinator';
81898222const _polyfillHostNoCombinatorOutsidePseudoFunction = new RegExp(`${_polyfillHostNoCombinator}(?![^(]*\\))`, 'g');
81908223const _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\s,]*)/;
@@ -30730,7 +30763,7 @@ function publishFacade(global) {
3073030763 * @description
3073130764 * Entry point for all public APIs of the compiler package.
3073230765 */
30733- const VERSION = new Version('19.2.0-next.0+sha-04c2447 ');
30766+ const VERSION = new Version('19.2.0-next.0+sha-8e5c0f8 ');
3073430767
3073530768class CompilerConfig {
3073630769 defaultEncapsulation;
@@ -32586,7 +32619,7 @@ const MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = '18.0.0';
3258632619function compileDeclareClassMetadata(metadata) {
3258732620 const definitionMap = new DefinitionMap();
3258832621 definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
32589- definitionMap.set('version', literal('19.2.0-next.0+sha-04c2447 '));
32622+ definitionMap.set('version', literal('19.2.0-next.0+sha-8e5c0f8 '));
3259032623 definitionMap.set('ngImport', importExpr(Identifiers.core));
3259132624 definitionMap.set('type', metadata.type);
3259232625 definitionMap.set('decorators', metadata.decorators);
@@ -32604,7 +32637,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
3260432637 callbackReturnDefinitionMap.set('ctorParameters', metadata.ctorParameters ?? literal(null));
3260532638 callbackReturnDefinitionMap.set('propDecorators', metadata.propDecorators ?? literal(null));
3260632639 definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
32607- definitionMap.set('version', literal('19.2.0-next.0+sha-04c2447 '));
32640+ definitionMap.set('version', literal('19.2.0-next.0+sha-8e5c0f8 '));
3260832641 definitionMap.set('ngImport', importExpr(Identifiers.core));
3260932642 definitionMap.set('type', metadata.type);
3261032643 definitionMap.set('resolveDeferredDeps', compileComponentMetadataAsyncResolver(dependencies));
@@ -32699,7 +32732,7 @@ function createDirectiveDefinitionMap(meta) {
3269932732 const definitionMap = new DefinitionMap();
3270032733 const minVersion = getMinimumVersionForPartialOutput(meta);
3270132734 definitionMap.set('minVersion', literal(minVersion));
32702- definitionMap.set('version', literal('19.2.0-next.0+sha-04c2447 '));
32735+ definitionMap.set('version', literal('19.2.0-next.0+sha-8e5c0f8 '));
3270332736 // e.g. `type: MyDirective`
3270432737 definitionMap.set('type', meta.type.value);
3270532738 if (meta.isStandalone !== undefined) {
@@ -33118,7 +33151,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
3311833151function compileDeclareFactoryFunction(meta) {
3311933152 const definitionMap = new DefinitionMap();
3312033153 definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
33121- definitionMap.set('version', literal('19.2.0-next.0+sha-04c2447 '));
33154+ definitionMap.set('version', literal('19.2.0-next.0+sha-8e5c0f8 '));
3312233155 definitionMap.set('ngImport', importExpr(Identifiers.core));
3312333156 definitionMap.set('type', meta.type.value);
3312433157 definitionMap.set('deps', compileDependencies(meta.deps));
@@ -33153,7 +33186,7 @@ function compileDeclareInjectableFromMetadata(meta) {
3315333186function createInjectableDefinitionMap(meta) {
3315433187 const definitionMap = new DefinitionMap();
3315533188 definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
33156- definitionMap.set('version', literal('19.2.0-next.0+sha-04c2447 '));
33189+ definitionMap.set('version', literal('19.2.0-next.0+sha-8e5c0f8 '));
3315733190 definitionMap.set('ngImport', importExpr(Identifiers.core));
3315833191 definitionMap.set('type', meta.type.value);
3315933192 // Only generate providedIn property if it has a non-null value
@@ -33204,7 +33237,7 @@ function compileDeclareInjectorFromMetadata(meta) {
3320433237function createInjectorDefinitionMap(meta) {
3320533238 const definitionMap = new DefinitionMap();
3320633239 definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
33207- definitionMap.set('version', literal('19.2.0-next.0+sha-04c2447 '));
33240+ definitionMap.set('version', literal('19.2.0-next.0+sha-8e5c0f8 '));
3320833241 definitionMap.set('ngImport', importExpr(Identifiers.core));
3320933242 definitionMap.set('type', meta.type.value);
3321033243 definitionMap.set('providers', meta.providers);
@@ -33237,7 +33270,7 @@ function createNgModuleDefinitionMap(meta) {
3323733270 throw new Error('Invalid path! Local compilation mode should not get into the partial compilation path');
3323833271 }
3323933272 definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
33240- definitionMap.set('version', literal('19.2.0-next.0+sha-04c2447 '));
33273+ definitionMap.set('version', literal('19.2.0-next.0+sha-8e5c0f8 '));
3324133274 definitionMap.set('ngImport', importExpr(Identifiers.core));
3324233275 definitionMap.set('type', meta.type.value);
3324333276 // We only generate the keys in the metadata if the arrays contain values.
@@ -33288,7 +33321,7 @@ function compileDeclarePipeFromMetadata(meta) {
3328833321function createPipeDefinitionMap(meta) {
3328933322 const definitionMap = new DefinitionMap();
3329033323 definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
33291- definitionMap.set('version', literal('19.2.0-next.0+sha-04c2447 '));
33324+ definitionMap.set('version', literal('19.2.0-next.0+sha-8e5c0f8 '));
3329233325 definitionMap.set('ngImport', importExpr(Identifiers.core));
3329333326 // e.g. `type: MyPipe`
3329433327 definitionMap.set('type', meta.type.value);
0 commit comments