@angular/core 18.2.7 → 18.2.9
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.
- package/esm2022/src/event_emitter.mjs +4 -1
- package/esm2022/src/interface/type.mjs +1 -1
- package/esm2022/src/linker/view_ref.mjs +1 -1
- package/esm2022/src/platform/bootstrap.mjs +8 -4
- package/esm2022/src/platform/platform_ref.mjs +6 -2
- package/esm2022/src/render3/after_render/manager.mjs +4 -1
- package/esm2022/src/render3/component_ref.mjs +1 -1
- package/esm2022/src/render3/definition.mjs +1 -1
- package/esm2022/src/render3/features/input_transforms_feature.mjs +1 -1
- package/esm2022/src/render3/view_ref.mjs +1 -1
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/testing/src/application_error_handler.mjs +3 -3
- package/esm2022/testing/src/component_fixture.mjs +1 -1
- package/esm2022/testing/src/logger.mjs +3 -3
- package/fesm2022/core.mjs +21 -7
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives/event-dispatch.mjs +1 -1
- package/fesm2022/primitives/signals.mjs +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/testing.mjs +4 -4
- package/fesm2022/testing.mjs.map +1 -1
- package/index.d.ts +4 -20
- package/package.json +1 -1
- package/primitives/event-dispatch/index.d.ts +1 -1
- package/primitives/signals/index.d.ts +1 -1
- package/rxjs-interop/index.d.ts +1 -1
- package/schematics/migrations/after-render-phase/bundle.js +64 -22
- package/schematics/migrations/http-providers/bundle.js +64 -22
- package/schematics/migrations/invalid-two-way-bindings/bundle.js +64 -22
- package/schematics/ng-generate/control-flow-migration/bundle.js +64 -22
- package/schematics/ng-generate/inject-migration/bundle.js +64 -22
- package/schematics/ng-generate/route-lazy-loading/bundle.js +64 -22
- package/schematics/ng-generate/standalone-migration/bundle.js +107 -43
- package/testing/index.d.ts +3 -1
|
@@ -6010,7 +6010,7 @@ var ShadowCss = class {
|
|
|
6010
6010
|
});
|
|
6011
6011
|
}
|
|
6012
6012
|
_convertColonHostContext(cssText) {
|
|
6013
|
-
return cssText.replace(_cssColonHostContextReGlobal, (selectorText) => {
|
|
6013
|
+
return cssText.replace(_cssColonHostContextReGlobal, (selectorText, pseudoPrefix) => {
|
|
6014
6014
|
var _a2;
|
|
6015
6015
|
const contextSelectorGroups = [[]];
|
|
6016
6016
|
let match;
|
|
@@ -6025,7 +6025,7 @@ var ShadowCss = class {
|
|
|
6025
6025
|
}
|
|
6026
6026
|
selectorText = match[2];
|
|
6027
6027
|
}
|
|
6028
|
-
return contextSelectorGroups.map((contextSelectors) =>
|
|
6028
|
+
return contextSelectorGroups.map((contextSelectors) => _combineHostContextSelectors(contextSelectors, selectorText, pseudoPrefix)).join(", ");
|
|
6029
6029
|
});
|
|
6030
6030
|
}
|
|
6031
6031
|
_convertShadowDOMSelectors(cssText) {
|
|
@@ -6036,7 +6036,12 @@ var ShadowCss = class {
|
|
|
6036
6036
|
let selector = rule.selector;
|
|
6037
6037
|
let content = rule.content;
|
|
6038
6038
|
if (rule.selector[0] !== "@") {
|
|
6039
|
-
selector = this._scopeSelector(
|
|
6039
|
+
selector = this._scopeSelector({
|
|
6040
|
+
selector,
|
|
6041
|
+
scopeSelector,
|
|
6042
|
+
hostSelector,
|
|
6043
|
+
isParentSelector: true
|
|
6044
|
+
});
|
|
6040
6045
|
} else if (scopedAtRuleIdentifiers.some((atRule) => rule.selector.startsWith(atRule))) {
|
|
6041
6046
|
content = this._scopeSelectors(rule.content, scopeSelector, hostSelector);
|
|
6042
6047
|
} else if (rule.selector.startsWith("@font-face") || rule.selector.startsWith("@page")) {
|
|
@@ -6051,12 +6056,18 @@ var ShadowCss = class {
|
|
|
6051
6056
|
return new CssRule(selector, rule.content);
|
|
6052
6057
|
});
|
|
6053
6058
|
}
|
|
6054
|
-
_scopeSelector(selector, scopeSelector, hostSelector) {
|
|
6055
|
-
|
|
6059
|
+
_scopeSelector({ selector, scopeSelector, hostSelector, isParentSelector = false }) {
|
|
6060
|
+
const selectorSplitRe = / ?,(?!(?:[^)(]*(?:\([^)(]*(?:\([^)(]*(?:\([^)(]*\)[^)(]*)*\)[^)(]*)*\)[^)(]*)*\))) ?/;
|
|
6061
|
+
return selector.split(selectorSplitRe).map((part) => part.split(_shadowDeepSelectors)).map((deepParts) => {
|
|
6056
6062
|
const [shallowPart, ...otherParts] = deepParts;
|
|
6057
6063
|
const applyScope = (shallowPart2) => {
|
|
6058
6064
|
if (this._selectorNeedsScoping(shallowPart2, scopeSelector)) {
|
|
6059
|
-
return this._applySelectorScope(
|
|
6065
|
+
return this._applySelectorScope({
|
|
6066
|
+
selector: shallowPart2,
|
|
6067
|
+
scopeSelector,
|
|
6068
|
+
hostSelector,
|
|
6069
|
+
isParentSelector
|
|
6070
|
+
});
|
|
6060
6071
|
} else {
|
|
6061
6072
|
return shallowPart2;
|
|
6062
6073
|
}
|
|
@@ -6078,15 +6089,15 @@ var ShadowCss = class {
|
|
|
6078
6089
|
_polyfillHostRe.lastIndex = 0;
|
|
6079
6090
|
if (_polyfillHostRe.test(selector)) {
|
|
6080
6091
|
const replaceBy = `[${hostSelector}]`;
|
|
6081
|
-
return selector.replace(
|
|
6082
|
-
return selector2.replace(/([
|
|
6092
|
+
return selector.replace(_polyfillHostNoCombinatorReGlobal, (_hnc, selector2) => {
|
|
6093
|
+
return selector2.replace(/([^:\)]*)(:*)(.*)/, (_, before, colon, after) => {
|
|
6083
6094
|
return before + replaceBy + colon + after;
|
|
6084
6095
|
});
|
|
6085
6096
|
}).replace(_polyfillHostRe, replaceBy + " ");
|
|
6086
6097
|
}
|
|
6087
6098
|
return scopeSelector + " " + selector;
|
|
6088
6099
|
}
|
|
6089
|
-
_applySelectorScope(selector, scopeSelector, hostSelector) {
|
|
6100
|
+
_applySelectorScope({ selector, scopeSelector, hostSelector, isParentSelector }) {
|
|
6090
6101
|
var _a2;
|
|
6091
6102
|
const isRe = /\[is=([^\]]*)\]/g;
|
|
6092
6103
|
scopeSelector = scopeSelector.replace(isRe, (_, ...parts) => parts[0]);
|
|
@@ -6098,6 +6109,10 @@ var ShadowCss = class {
|
|
|
6098
6109
|
}
|
|
6099
6110
|
if (p.includes(_polyfillHostNoCombinator)) {
|
|
6100
6111
|
scopedP = this._applySimpleSelectorScope(p, scopeSelector, hostSelector);
|
|
6112
|
+
if (_polyfillHostNoCombinatorWithinPseudoFunction.test(p)) {
|
|
6113
|
+
const [_, before, colon, after] = scopedP.match(/([^:]*)(:*)(.*)/);
|
|
6114
|
+
scopedP = before + attrName + colon + after;
|
|
6115
|
+
}
|
|
6101
6116
|
} else {
|
|
6102
6117
|
const t = p.replace(_polyfillHostRe, "");
|
|
6103
6118
|
if (t.length > 0) {
|
|
@@ -6109,29 +6124,52 @@ var ShadowCss = class {
|
|
|
6109
6124
|
}
|
|
6110
6125
|
return scopedP;
|
|
6111
6126
|
};
|
|
6112
|
-
const
|
|
6113
|
-
|
|
6127
|
+
const _pseudoFunctionAwareScopeSelectorPart = (selectorPart) => {
|
|
6128
|
+
let scopedPart = "";
|
|
6129
|
+
const cssPrefixWithPseudoSelectorFunctionMatch = selectorPart.match(_cssPrefixWithPseudoSelectorFunction);
|
|
6130
|
+
if (cssPrefixWithPseudoSelectorFunctionMatch) {
|
|
6131
|
+
const [cssPseudoSelectorFunction] = cssPrefixWithPseudoSelectorFunctionMatch;
|
|
6132
|
+
const selectorToScope = selectorPart.slice(cssPseudoSelectorFunction.length, -1);
|
|
6133
|
+
if (selectorToScope.includes(_polyfillHostNoCombinator)) {
|
|
6134
|
+
this._shouldScopeIndicator = true;
|
|
6135
|
+
}
|
|
6136
|
+
const scopedInnerPart = this._scopeSelector({
|
|
6137
|
+
selector: selectorToScope,
|
|
6138
|
+
scopeSelector,
|
|
6139
|
+
hostSelector
|
|
6140
|
+
});
|
|
6141
|
+
scopedPart = `${cssPseudoSelectorFunction}${scopedInnerPart})`;
|
|
6142
|
+
} else {
|
|
6143
|
+
this._shouldScopeIndicator = this._shouldScopeIndicator || selectorPart.includes(_polyfillHostNoCombinator);
|
|
6144
|
+
scopedPart = this._shouldScopeIndicator ? _scopeSelectorPart(selectorPart) : selectorPart;
|
|
6145
|
+
}
|
|
6146
|
+
return scopedPart;
|
|
6147
|
+
};
|
|
6148
|
+
if (isParentSelector) {
|
|
6149
|
+
this._safeSelector = new SafeSelector(selector);
|
|
6150
|
+
selector = this._safeSelector.content();
|
|
6151
|
+
}
|
|
6114
6152
|
let scopedSelector = "";
|
|
6115
6153
|
let startIndex = 0;
|
|
6116
6154
|
let res;
|
|
6117
|
-
const sep = /( |>|\+|~(?!=))\s*/g;
|
|
6155
|
+
const sep = /( |>|\+|~(?!=))(?!([^)(]*(?:\([^)(]*(?:\([^)(]*(?:\([^)(]*\)[^)(]*)*\)[^)(]*)*\)[^)(]*)*\)))\s*/g;
|
|
6118
6156
|
const hasHost = selector.includes(_polyfillHostNoCombinator);
|
|
6119
|
-
|
|
6157
|
+
if (isParentSelector || this._shouldScopeIndicator) {
|
|
6158
|
+
this._shouldScopeIndicator = !hasHost;
|
|
6159
|
+
}
|
|
6120
6160
|
while ((res = sep.exec(selector)) !== null) {
|
|
6121
6161
|
const separator = res[1];
|
|
6122
6162
|
const part2 = selector.slice(startIndex, res.index);
|
|
6123
6163
|
if (part2.match(/__esc-ph-(\d+)__/) && ((_a2 = selector[res.index + 1]) == null ? void 0 : _a2.match(/[a-fA-F\d]/))) {
|
|
6124
6164
|
continue;
|
|
6125
6165
|
}
|
|
6126
|
-
|
|
6127
|
-
const scopedPart = shouldScope ? _scopeSelectorPart(part2) : part2;
|
|
6166
|
+
const scopedPart = _pseudoFunctionAwareScopeSelectorPart(part2);
|
|
6128
6167
|
scopedSelector += `${scopedPart} ${separator} `;
|
|
6129
6168
|
startIndex = sep.lastIndex;
|
|
6130
6169
|
}
|
|
6131
6170
|
const part = selector.substring(startIndex);
|
|
6132
|
-
|
|
6133
|
-
|
|
6134
|
-
return safeContent.restore(scopedSelector);
|
|
6171
|
+
scopedSelector += _pseudoFunctionAwareScopeSelectorPart(part);
|
|
6172
|
+
return this._safeSelector.restore(scopedSelector);
|
|
6135
6173
|
}
|
|
6136
6174
|
_insertPolyfillHostInCssText(selector) {
|
|
6137
6175
|
return selector.replace(_colonHostContextRe, _polyfillHostContext).replace(_colonHostRe, _polyfillHost);
|
|
@@ -6170,6 +6208,8 @@ var SafeSelector = class {
|
|
|
6170
6208
|
});
|
|
6171
6209
|
}
|
|
6172
6210
|
};
|
|
6211
|
+
var _cssScopedPseudoFunctionPrefix = "(:(where|is)\\()?";
|
|
6212
|
+
var _cssPrefixWithPseudoSelectorFunction = /^:(where|is)\(/i;
|
|
6173
6213
|
var _cssContentNextSelectorRe = /polyfill-next-selector[^}]*content:[\s]*?(['"])(.*?)\1[;\s]*}([^{]*?){/gim;
|
|
6174
6214
|
var _cssContentRuleRe = /(polyfill-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim;
|
|
6175
6215
|
var _cssContentUnscopedRuleRe = /(polyfill-unscoped-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim;
|
|
@@ -6177,10 +6217,12 @@ var _polyfillHost = "-shadowcsshost";
|
|
|
6177
6217
|
var _polyfillHostContext = "-shadowcsscontext";
|
|
6178
6218
|
var _parenSuffix = "(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)";
|
|
6179
6219
|
var _cssColonHostRe = new RegExp(_polyfillHost + _parenSuffix, "gim");
|
|
6180
|
-
var _cssColonHostContextReGlobal = new RegExp(_polyfillHostContext + _parenSuffix, "gim");
|
|
6220
|
+
var _cssColonHostContextReGlobal = new RegExp(_cssScopedPseudoFunctionPrefix + "(" + _polyfillHostContext + _parenSuffix + ")", "gim");
|
|
6181
6221
|
var _cssColonHostContextRe = new RegExp(_polyfillHostContext + _parenSuffix, "im");
|
|
6182
6222
|
var _polyfillHostNoCombinator = _polyfillHost + "-no-combinator";
|
|
6223
|
+
var _polyfillHostNoCombinatorWithinPseudoFunction = new RegExp(`:.*\\(.*${_polyfillHostNoCombinator}.*\\)`);
|
|
6183
6224
|
var _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\s]*)/;
|
|
6225
|
+
var _polyfillHostNoCombinatorReGlobal = new RegExp(_polyfillHostNoCombinatorRe, "g");
|
|
6184
6226
|
var _shadowDOMSelectorsRe = [
|
|
6185
6227
|
/::shadow/g,
|
|
6186
6228
|
/::content/g,
|
|
@@ -6315,7 +6357,7 @@ function unescapeInStrings(input) {
|
|
|
6315
6357
|
function unescapeQuotes(str, isQuoted) {
|
|
6316
6358
|
return !isQuoted ? str : str.replace(/((?:^|[^\\])(?:\\\\)*)\\(?=['"])/g, "$1");
|
|
6317
6359
|
}
|
|
6318
|
-
function
|
|
6360
|
+
function _combineHostContextSelectors(contextSelectors, otherSelectors, pseudoPrefix = "") {
|
|
6319
6361
|
const hostMarker = _polyfillHostNoCombinator;
|
|
6320
6362
|
_polyfillHostRe.lastIndex = 0;
|
|
6321
6363
|
const otherSelectorsHasHost = _polyfillHostRe.test(otherSelectors);
|
|
@@ -6333,7 +6375,7 @@ function combineHostContextSelectors(contextSelectors, otherSelectors) {
|
|
|
6333
6375
|
combined[i] = contextSelector + previousSelectors;
|
|
6334
6376
|
}
|
|
6335
6377
|
}
|
|
6336
|
-
return combined.map((s) => otherSelectorsHasHost ? `${s}${otherSelectors}` : `${s}${hostMarker}${otherSelectors}, ${s} ${hostMarker}${otherSelectors}`).join(",");
|
|
6378
|
+
return combined.map((s) => otherSelectorsHasHost ? `${pseudoPrefix}${s}${otherSelectors}` : `${pseudoPrefix}${s}${hostMarker}${otherSelectors}, ${pseudoPrefix}${s} ${hostMarker}${otherSelectors}`).join(",");
|
|
6337
6379
|
}
|
|
6338
6380
|
function repeatGroups(groups, multiples) {
|
|
6339
6381
|
const length = groups.length;
|
|
@@ -23572,7 +23614,7 @@ function publishFacade(global) {
|
|
|
23572
23614
|
}
|
|
23573
23615
|
|
|
23574
23616
|
// bazel-out/k8-fastbuild/bin/packages/compiler/src/version.mjs
|
|
23575
|
-
var VERSION2 = new Version("18.2.
|
|
23617
|
+
var VERSION2 = new Version("18.2.9");
|
|
23576
23618
|
|
|
23577
23619
|
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
|
|
23578
23620
|
var _VisitorMode;
|
|
@@ -5752,7 +5752,7 @@ var ShadowCss = class {
|
|
|
5752
5752
|
});
|
|
5753
5753
|
}
|
|
5754
5754
|
_convertColonHostContext(cssText) {
|
|
5755
|
-
return cssText.replace(_cssColonHostContextReGlobal, (selectorText) => {
|
|
5755
|
+
return cssText.replace(_cssColonHostContextReGlobal, (selectorText, pseudoPrefix) => {
|
|
5756
5756
|
var _a2;
|
|
5757
5757
|
const contextSelectorGroups = [[]];
|
|
5758
5758
|
let match;
|
|
@@ -5767,7 +5767,7 @@ var ShadowCss = class {
|
|
|
5767
5767
|
}
|
|
5768
5768
|
selectorText = match[2];
|
|
5769
5769
|
}
|
|
5770
|
-
return contextSelectorGroups.map((contextSelectors) =>
|
|
5770
|
+
return contextSelectorGroups.map((contextSelectors) => _combineHostContextSelectors(contextSelectors, selectorText, pseudoPrefix)).join(", ");
|
|
5771
5771
|
});
|
|
5772
5772
|
}
|
|
5773
5773
|
_convertShadowDOMSelectors(cssText) {
|
|
@@ -5778,7 +5778,12 @@ var ShadowCss = class {
|
|
|
5778
5778
|
let selector = rule.selector;
|
|
5779
5779
|
let content = rule.content;
|
|
5780
5780
|
if (rule.selector[0] !== "@") {
|
|
5781
|
-
selector = this._scopeSelector(
|
|
5781
|
+
selector = this._scopeSelector({
|
|
5782
|
+
selector,
|
|
5783
|
+
scopeSelector,
|
|
5784
|
+
hostSelector,
|
|
5785
|
+
isParentSelector: true
|
|
5786
|
+
});
|
|
5782
5787
|
} else if (scopedAtRuleIdentifiers.some((atRule) => rule.selector.startsWith(atRule))) {
|
|
5783
5788
|
content = this._scopeSelectors(rule.content, scopeSelector, hostSelector);
|
|
5784
5789
|
} else if (rule.selector.startsWith("@font-face") || rule.selector.startsWith("@page")) {
|
|
@@ -5793,12 +5798,18 @@ var ShadowCss = class {
|
|
|
5793
5798
|
return new CssRule(selector, rule.content);
|
|
5794
5799
|
});
|
|
5795
5800
|
}
|
|
5796
|
-
_scopeSelector(selector, scopeSelector, hostSelector) {
|
|
5797
|
-
|
|
5801
|
+
_scopeSelector({ selector, scopeSelector, hostSelector, isParentSelector = false }) {
|
|
5802
|
+
const selectorSplitRe = / ?,(?!(?:[^)(]*(?:\([^)(]*(?:\([^)(]*(?:\([^)(]*\)[^)(]*)*\)[^)(]*)*\)[^)(]*)*\))) ?/;
|
|
5803
|
+
return selector.split(selectorSplitRe).map((part) => part.split(_shadowDeepSelectors)).map((deepParts) => {
|
|
5798
5804
|
const [shallowPart, ...otherParts] = deepParts;
|
|
5799
5805
|
const applyScope = (shallowPart2) => {
|
|
5800
5806
|
if (this._selectorNeedsScoping(shallowPart2, scopeSelector)) {
|
|
5801
|
-
return this._applySelectorScope(
|
|
5807
|
+
return this._applySelectorScope({
|
|
5808
|
+
selector: shallowPart2,
|
|
5809
|
+
scopeSelector,
|
|
5810
|
+
hostSelector,
|
|
5811
|
+
isParentSelector
|
|
5812
|
+
});
|
|
5802
5813
|
} else {
|
|
5803
5814
|
return shallowPart2;
|
|
5804
5815
|
}
|
|
@@ -5820,15 +5831,15 @@ var ShadowCss = class {
|
|
|
5820
5831
|
_polyfillHostRe.lastIndex = 0;
|
|
5821
5832
|
if (_polyfillHostRe.test(selector)) {
|
|
5822
5833
|
const replaceBy = `[${hostSelector}]`;
|
|
5823
|
-
return selector.replace(
|
|
5824
|
-
return selector2.replace(/([
|
|
5834
|
+
return selector.replace(_polyfillHostNoCombinatorReGlobal, (_hnc, selector2) => {
|
|
5835
|
+
return selector2.replace(/([^:\)]*)(:*)(.*)/, (_, before, colon, after) => {
|
|
5825
5836
|
return before + replaceBy + colon + after;
|
|
5826
5837
|
});
|
|
5827
5838
|
}).replace(_polyfillHostRe, replaceBy + " ");
|
|
5828
5839
|
}
|
|
5829
5840
|
return scopeSelector + " " + selector;
|
|
5830
5841
|
}
|
|
5831
|
-
_applySelectorScope(selector, scopeSelector, hostSelector) {
|
|
5842
|
+
_applySelectorScope({ selector, scopeSelector, hostSelector, isParentSelector }) {
|
|
5832
5843
|
var _a2;
|
|
5833
5844
|
const isRe = /\[is=([^\]]*)\]/g;
|
|
5834
5845
|
scopeSelector = scopeSelector.replace(isRe, (_, ...parts) => parts[0]);
|
|
@@ -5840,6 +5851,10 @@ var ShadowCss = class {
|
|
|
5840
5851
|
}
|
|
5841
5852
|
if (p.includes(_polyfillHostNoCombinator)) {
|
|
5842
5853
|
scopedP = this._applySimpleSelectorScope(p, scopeSelector, hostSelector);
|
|
5854
|
+
if (_polyfillHostNoCombinatorWithinPseudoFunction.test(p)) {
|
|
5855
|
+
const [_, before, colon, after] = scopedP.match(/([^:]*)(:*)(.*)/);
|
|
5856
|
+
scopedP = before + attrName + colon + after;
|
|
5857
|
+
}
|
|
5843
5858
|
} else {
|
|
5844
5859
|
const t = p.replace(_polyfillHostRe, "");
|
|
5845
5860
|
if (t.length > 0) {
|
|
@@ -5851,29 +5866,52 @@ var ShadowCss = class {
|
|
|
5851
5866
|
}
|
|
5852
5867
|
return scopedP;
|
|
5853
5868
|
};
|
|
5854
|
-
const
|
|
5855
|
-
|
|
5869
|
+
const _pseudoFunctionAwareScopeSelectorPart = (selectorPart) => {
|
|
5870
|
+
let scopedPart = "";
|
|
5871
|
+
const cssPrefixWithPseudoSelectorFunctionMatch = selectorPart.match(_cssPrefixWithPseudoSelectorFunction);
|
|
5872
|
+
if (cssPrefixWithPseudoSelectorFunctionMatch) {
|
|
5873
|
+
const [cssPseudoSelectorFunction] = cssPrefixWithPseudoSelectorFunctionMatch;
|
|
5874
|
+
const selectorToScope = selectorPart.slice(cssPseudoSelectorFunction.length, -1);
|
|
5875
|
+
if (selectorToScope.includes(_polyfillHostNoCombinator)) {
|
|
5876
|
+
this._shouldScopeIndicator = true;
|
|
5877
|
+
}
|
|
5878
|
+
const scopedInnerPart = this._scopeSelector({
|
|
5879
|
+
selector: selectorToScope,
|
|
5880
|
+
scopeSelector,
|
|
5881
|
+
hostSelector
|
|
5882
|
+
});
|
|
5883
|
+
scopedPart = `${cssPseudoSelectorFunction}${scopedInnerPart})`;
|
|
5884
|
+
} else {
|
|
5885
|
+
this._shouldScopeIndicator = this._shouldScopeIndicator || selectorPart.includes(_polyfillHostNoCombinator);
|
|
5886
|
+
scopedPart = this._shouldScopeIndicator ? _scopeSelectorPart(selectorPart) : selectorPart;
|
|
5887
|
+
}
|
|
5888
|
+
return scopedPart;
|
|
5889
|
+
};
|
|
5890
|
+
if (isParentSelector) {
|
|
5891
|
+
this._safeSelector = new SafeSelector(selector);
|
|
5892
|
+
selector = this._safeSelector.content();
|
|
5893
|
+
}
|
|
5856
5894
|
let scopedSelector = "";
|
|
5857
5895
|
let startIndex = 0;
|
|
5858
5896
|
let res;
|
|
5859
|
-
const sep = /( |>|\+|~(?!=))\s*/g;
|
|
5897
|
+
const sep = /( |>|\+|~(?!=))(?!([^)(]*(?:\([^)(]*(?:\([^)(]*(?:\([^)(]*\)[^)(]*)*\)[^)(]*)*\)[^)(]*)*\)))\s*/g;
|
|
5860
5898
|
const hasHost = selector.includes(_polyfillHostNoCombinator);
|
|
5861
|
-
|
|
5899
|
+
if (isParentSelector || this._shouldScopeIndicator) {
|
|
5900
|
+
this._shouldScopeIndicator = !hasHost;
|
|
5901
|
+
}
|
|
5862
5902
|
while ((res = sep.exec(selector)) !== null) {
|
|
5863
5903
|
const separator = res[1];
|
|
5864
5904
|
const part2 = selector.slice(startIndex, res.index);
|
|
5865
5905
|
if (part2.match(/__esc-ph-(\d+)__/) && ((_a2 = selector[res.index + 1]) == null ? void 0 : _a2.match(/[a-fA-F\d]/))) {
|
|
5866
5906
|
continue;
|
|
5867
5907
|
}
|
|
5868
|
-
|
|
5869
|
-
const scopedPart = shouldScope ? _scopeSelectorPart(part2) : part2;
|
|
5908
|
+
const scopedPart = _pseudoFunctionAwareScopeSelectorPart(part2);
|
|
5870
5909
|
scopedSelector += `${scopedPart} ${separator} `;
|
|
5871
5910
|
startIndex = sep.lastIndex;
|
|
5872
5911
|
}
|
|
5873
5912
|
const part = selector.substring(startIndex);
|
|
5874
|
-
|
|
5875
|
-
|
|
5876
|
-
return safeContent.restore(scopedSelector);
|
|
5913
|
+
scopedSelector += _pseudoFunctionAwareScopeSelectorPart(part);
|
|
5914
|
+
return this._safeSelector.restore(scopedSelector);
|
|
5877
5915
|
}
|
|
5878
5916
|
_insertPolyfillHostInCssText(selector) {
|
|
5879
5917
|
return selector.replace(_colonHostContextRe, _polyfillHostContext).replace(_colonHostRe, _polyfillHost);
|
|
@@ -5912,6 +5950,8 @@ var SafeSelector = class {
|
|
|
5912
5950
|
});
|
|
5913
5951
|
}
|
|
5914
5952
|
};
|
|
5953
|
+
var _cssScopedPseudoFunctionPrefix = "(:(where|is)\\()?";
|
|
5954
|
+
var _cssPrefixWithPseudoSelectorFunction = /^:(where|is)\(/i;
|
|
5915
5955
|
var _cssContentNextSelectorRe = /polyfill-next-selector[^}]*content:[\s]*?(['"])(.*?)\1[;\s]*}([^{]*?){/gim;
|
|
5916
5956
|
var _cssContentRuleRe = /(polyfill-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim;
|
|
5917
5957
|
var _cssContentUnscopedRuleRe = /(polyfill-unscoped-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim;
|
|
@@ -5919,10 +5959,12 @@ var _polyfillHost = "-shadowcsshost";
|
|
|
5919
5959
|
var _polyfillHostContext = "-shadowcsscontext";
|
|
5920
5960
|
var _parenSuffix = "(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)";
|
|
5921
5961
|
var _cssColonHostRe = new RegExp(_polyfillHost + _parenSuffix, "gim");
|
|
5922
|
-
var _cssColonHostContextReGlobal = new RegExp(_polyfillHostContext + _parenSuffix, "gim");
|
|
5962
|
+
var _cssColonHostContextReGlobal = new RegExp(_cssScopedPseudoFunctionPrefix + "(" + _polyfillHostContext + _parenSuffix + ")", "gim");
|
|
5923
5963
|
var _cssColonHostContextRe = new RegExp(_polyfillHostContext + _parenSuffix, "im");
|
|
5924
5964
|
var _polyfillHostNoCombinator = _polyfillHost + "-no-combinator";
|
|
5965
|
+
var _polyfillHostNoCombinatorWithinPseudoFunction = new RegExp(`:.*\\(.*${_polyfillHostNoCombinator}.*\\)`);
|
|
5925
5966
|
var _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\s]*)/;
|
|
5967
|
+
var _polyfillHostNoCombinatorReGlobal = new RegExp(_polyfillHostNoCombinatorRe, "g");
|
|
5926
5968
|
var _shadowDOMSelectorsRe = [
|
|
5927
5969
|
/::shadow/g,
|
|
5928
5970
|
/::content/g,
|
|
@@ -6057,7 +6099,7 @@ function unescapeInStrings(input) {
|
|
|
6057
6099
|
function unescapeQuotes(str, isQuoted) {
|
|
6058
6100
|
return !isQuoted ? str : str.replace(/((?:^|[^\\])(?:\\\\)*)\\(?=['"])/g, "$1");
|
|
6059
6101
|
}
|
|
6060
|
-
function
|
|
6102
|
+
function _combineHostContextSelectors(contextSelectors, otherSelectors, pseudoPrefix = "") {
|
|
6061
6103
|
const hostMarker = _polyfillHostNoCombinator;
|
|
6062
6104
|
_polyfillHostRe.lastIndex = 0;
|
|
6063
6105
|
const otherSelectorsHasHost = _polyfillHostRe.test(otherSelectors);
|
|
@@ -6075,7 +6117,7 @@ function combineHostContextSelectors(contextSelectors, otherSelectors) {
|
|
|
6075
6117
|
combined[i] = contextSelector + previousSelectors;
|
|
6076
6118
|
}
|
|
6077
6119
|
}
|
|
6078
|
-
return combined.map((s) => otherSelectorsHasHost ? `${s}${otherSelectors}` : `${s}${hostMarker}${otherSelectors}, ${s} ${hostMarker}${otherSelectors}`).join(",");
|
|
6120
|
+
return combined.map((s) => otherSelectorsHasHost ? `${pseudoPrefix}${s}${otherSelectors}` : `${pseudoPrefix}${s}${hostMarker}${otherSelectors}, ${pseudoPrefix}${s} ${hostMarker}${otherSelectors}`).join(",");
|
|
6079
6121
|
}
|
|
6080
6122
|
function repeatGroups(groups, multiples) {
|
|
6081
6123
|
const length = groups.length;
|
|
@@ -23357,7 +23399,7 @@ function publishFacade(global) {
|
|
|
23357
23399
|
}
|
|
23358
23400
|
|
|
23359
23401
|
// bazel-out/k8-fastbuild/bin/packages/compiler/src/version.mjs
|
|
23360
|
-
var VERSION2 = new Version("18.2.
|
|
23402
|
+
var VERSION2 = new Version("18.2.9");
|
|
23361
23403
|
|
|
23362
23404
|
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
|
|
23363
23405
|
var _VisitorMode;
|
|
@@ -5752,7 +5752,7 @@ var ShadowCss = class {
|
|
|
5752
5752
|
});
|
|
5753
5753
|
}
|
|
5754
5754
|
_convertColonHostContext(cssText) {
|
|
5755
|
-
return cssText.replace(_cssColonHostContextReGlobal, (selectorText) => {
|
|
5755
|
+
return cssText.replace(_cssColonHostContextReGlobal, (selectorText, pseudoPrefix) => {
|
|
5756
5756
|
var _a2;
|
|
5757
5757
|
const contextSelectorGroups = [[]];
|
|
5758
5758
|
let match;
|
|
@@ -5767,7 +5767,7 @@ var ShadowCss = class {
|
|
|
5767
5767
|
}
|
|
5768
5768
|
selectorText = match[2];
|
|
5769
5769
|
}
|
|
5770
|
-
return contextSelectorGroups.map((contextSelectors) =>
|
|
5770
|
+
return contextSelectorGroups.map((contextSelectors) => _combineHostContextSelectors(contextSelectors, selectorText, pseudoPrefix)).join(", ");
|
|
5771
5771
|
});
|
|
5772
5772
|
}
|
|
5773
5773
|
_convertShadowDOMSelectors(cssText) {
|
|
@@ -5778,7 +5778,12 @@ var ShadowCss = class {
|
|
|
5778
5778
|
let selector = rule.selector;
|
|
5779
5779
|
let content = rule.content;
|
|
5780
5780
|
if (rule.selector[0] !== "@") {
|
|
5781
|
-
selector = this._scopeSelector(
|
|
5781
|
+
selector = this._scopeSelector({
|
|
5782
|
+
selector,
|
|
5783
|
+
scopeSelector,
|
|
5784
|
+
hostSelector,
|
|
5785
|
+
isParentSelector: true
|
|
5786
|
+
});
|
|
5782
5787
|
} else if (scopedAtRuleIdentifiers.some((atRule) => rule.selector.startsWith(atRule))) {
|
|
5783
5788
|
content = this._scopeSelectors(rule.content, scopeSelector, hostSelector);
|
|
5784
5789
|
} else if (rule.selector.startsWith("@font-face") || rule.selector.startsWith("@page")) {
|
|
@@ -5793,12 +5798,18 @@ var ShadowCss = class {
|
|
|
5793
5798
|
return new CssRule(selector, rule.content);
|
|
5794
5799
|
});
|
|
5795
5800
|
}
|
|
5796
|
-
_scopeSelector(selector, scopeSelector, hostSelector) {
|
|
5797
|
-
|
|
5801
|
+
_scopeSelector({ selector, scopeSelector, hostSelector, isParentSelector = false }) {
|
|
5802
|
+
const selectorSplitRe = / ?,(?!(?:[^)(]*(?:\([^)(]*(?:\([^)(]*(?:\([^)(]*\)[^)(]*)*\)[^)(]*)*\)[^)(]*)*\))) ?/;
|
|
5803
|
+
return selector.split(selectorSplitRe).map((part) => part.split(_shadowDeepSelectors)).map((deepParts) => {
|
|
5798
5804
|
const [shallowPart, ...otherParts] = deepParts;
|
|
5799
5805
|
const applyScope = (shallowPart2) => {
|
|
5800
5806
|
if (this._selectorNeedsScoping(shallowPart2, scopeSelector)) {
|
|
5801
|
-
return this._applySelectorScope(
|
|
5807
|
+
return this._applySelectorScope({
|
|
5808
|
+
selector: shallowPart2,
|
|
5809
|
+
scopeSelector,
|
|
5810
|
+
hostSelector,
|
|
5811
|
+
isParentSelector
|
|
5812
|
+
});
|
|
5802
5813
|
} else {
|
|
5803
5814
|
return shallowPart2;
|
|
5804
5815
|
}
|
|
@@ -5820,15 +5831,15 @@ var ShadowCss = class {
|
|
|
5820
5831
|
_polyfillHostRe.lastIndex = 0;
|
|
5821
5832
|
if (_polyfillHostRe.test(selector)) {
|
|
5822
5833
|
const replaceBy = `[${hostSelector}]`;
|
|
5823
|
-
return selector.replace(
|
|
5824
|
-
return selector2.replace(/([
|
|
5834
|
+
return selector.replace(_polyfillHostNoCombinatorReGlobal, (_hnc, selector2) => {
|
|
5835
|
+
return selector2.replace(/([^:\)]*)(:*)(.*)/, (_, before, colon, after) => {
|
|
5825
5836
|
return before + replaceBy + colon + after;
|
|
5826
5837
|
});
|
|
5827
5838
|
}).replace(_polyfillHostRe, replaceBy + " ");
|
|
5828
5839
|
}
|
|
5829
5840
|
return scopeSelector + " " + selector;
|
|
5830
5841
|
}
|
|
5831
|
-
_applySelectorScope(selector, scopeSelector, hostSelector) {
|
|
5842
|
+
_applySelectorScope({ selector, scopeSelector, hostSelector, isParentSelector }) {
|
|
5832
5843
|
var _a2;
|
|
5833
5844
|
const isRe = /\[is=([^\]]*)\]/g;
|
|
5834
5845
|
scopeSelector = scopeSelector.replace(isRe, (_, ...parts) => parts[0]);
|
|
@@ -5840,6 +5851,10 @@ var ShadowCss = class {
|
|
|
5840
5851
|
}
|
|
5841
5852
|
if (p.includes(_polyfillHostNoCombinator)) {
|
|
5842
5853
|
scopedP = this._applySimpleSelectorScope(p, scopeSelector, hostSelector);
|
|
5854
|
+
if (_polyfillHostNoCombinatorWithinPseudoFunction.test(p)) {
|
|
5855
|
+
const [_, before, colon, after] = scopedP.match(/([^:]*)(:*)(.*)/);
|
|
5856
|
+
scopedP = before + attrName + colon + after;
|
|
5857
|
+
}
|
|
5843
5858
|
} else {
|
|
5844
5859
|
const t = p.replace(_polyfillHostRe, "");
|
|
5845
5860
|
if (t.length > 0) {
|
|
@@ -5851,29 +5866,52 @@ var ShadowCss = class {
|
|
|
5851
5866
|
}
|
|
5852
5867
|
return scopedP;
|
|
5853
5868
|
};
|
|
5854
|
-
const
|
|
5855
|
-
|
|
5869
|
+
const _pseudoFunctionAwareScopeSelectorPart = (selectorPart) => {
|
|
5870
|
+
let scopedPart = "";
|
|
5871
|
+
const cssPrefixWithPseudoSelectorFunctionMatch = selectorPart.match(_cssPrefixWithPseudoSelectorFunction);
|
|
5872
|
+
if (cssPrefixWithPseudoSelectorFunctionMatch) {
|
|
5873
|
+
const [cssPseudoSelectorFunction] = cssPrefixWithPseudoSelectorFunctionMatch;
|
|
5874
|
+
const selectorToScope = selectorPart.slice(cssPseudoSelectorFunction.length, -1);
|
|
5875
|
+
if (selectorToScope.includes(_polyfillHostNoCombinator)) {
|
|
5876
|
+
this._shouldScopeIndicator = true;
|
|
5877
|
+
}
|
|
5878
|
+
const scopedInnerPart = this._scopeSelector({
|
|
5879
|
+
selector: selectorToScope,
|
|
5880
|
+
scopeSelector,
|
|
5881
|
+
hostSelector
|
|
5882
|
+
});
|
|
5883
|
+
scopedPart = `${cssPseudoSelectorFunction}${scopedInnerPart})`;
|
|
5884
|
+
} else {
|
|
5885
|
+
this._shouldScopeIndicator = this._shouldScopeIndicator || selectorPart.includes(_polyfillHostNoCombinator);
|
|
5886
|
+
scopedPart = this._shouldScopeIndicator ? _scopeSelectorPart(selectorPart) : selectorPart;
|
|
5887
|
+
}
|
|
5888
|
+
return scopedPart;
|
|
5889
|
+
};
|
|
5890
|
+
if (isParentSelector) {
|
|
5891
|
+
this._safeSelector = new SafeSelector(selector);
|
|
5892
|
+
selector = this._safeSelector.content();
|
|
5893
|
+
}
|
|
5856
5894
|
let scopedSelector = "";
|
|
5857
5895
|
let startIndex = 0;
|
|
5858
5896
|
let res;
|
|
5859
|
-
const sep = /( |>|\+|~(?!=))\s*/g;
|
|
5897
|
+
const sep = /( |>|\+|~(?!=))(?!([^)(]*(?:\([^)(]*(?:\([^)(]*(?:\([^)(]*\)[^)(]*)*\)[^)(]*)*\)[^)(]*)*\)))\s*/g;
|
|
5860
5898
|
const hasHost = selector.includes(_polyfillHostNoCombinator);
|
|
5861
|
-
|
|
5899
|
+
if (isParentSelector || this._shouldScopeIndicator) {
|
|
5900
|
+
this._shouldScopeIndicator = !hasHost;
|
|
5901
|
+
}
|
|
5862
5902
|
while ((res = sep.exec(selector)) !== null) {
|
|
5863
5903
|
const separator = res[1];
|
|
5864
5904
|
const part2 = selector.slice(startIndex, res.index);
|
|
5865
5905
|
if (part2.match(/__esc-ph-(\d+)__/) && ((_a2 = selector[res.index + 1]) == null ? void 0 : _a2.match(/[a-fA-F\d]/))) {
|
|
5866
5906
|
continue;
|
|
5867
5907
|
}
|
|
5868
|
-
|
|
5869
|
-
const scopedPart = shouldScope ? _scopeSelectorPart(part2) : part2;
|
|
5908
|
+
const scopedPart = _pseudoFunctionAwareScopeSelectorPart(part2);
|
|
5870
5909
|
scopedSelector += `${scopedPart} ${separator} `;
|
|
5871
5910
|
startIndex = sep.lastIndex;
|
|
5872
5911
|
}
|
|
5873
5912
|
const part = selector.substring(startIndex);
|
|
5874
|
-
|
|
5875
|
-
|
|
5876
|
-
return safeContent.restore(scopedSelector);
|
|
5913
|
+
scopedSelector += _pseudoFunctionAwareScopeSelectorPart(part);
|
|
5914
|
+
return this._safeSelector.restore(scopedSelector);
|
|
5877
5915
|
}
|
|
5878
5916
|
_insertPolyfillHostInCssText(selector) {
|
|
5879
5917
|
return selector.replace(_colonHostContextRe, _polyfillHostContext).replace(_colonHostRe, _polyfillHost);
|
|
@@ -5912,6 +5950,8 @@ var SafeSelector = class {
|
|
|
5912
5950
|
});
|
|
5913
5951
|
}
|
|
5914
5952
|
};
|
|
5953
|
+
var _cssScopedPseudoFunctionPrefix = "(:(where|is)\\()?";
|
|
5954
|
+
var _cssPrefixWithPseudoSelectorFunction = /^:(where|is)\(/i;
|
|
5915
5955
|
var _cssContentNextSelectorRe = /polyfill-next-selector[^}]*content:[\s]*?(['"])(.*?)\1[;\s]*}([^{]*?){/gim;
|
|
5916
5956
|
var _cssContentRuleRe = /(polyfill-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim;
|
|
5917
5957
|
var _cssContentUnscopedRuleRe = /(polyfill-unscoped-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim;
|
|
@@ -5919,10 +5959,12 @@ var _polyfillHost = "-shadowcsshost";
|
|
|
5919
5959
|
var _polyfillHostContext = "-shadowcsscontext";
|
|
5920
5960
|
var _parenSuffix = "(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)";
|
|
5921
5961
|
var _cssColonHostRe = new RegExp(_polyfillHost + _parenSuffix, "gim");
|
|
5922
|
-
var _cssColonHostContextReGlobal = new RegExp(_polyfillHostContext + _parenSuffix, "gim");
|
|
5962
|
+
var _cssColonHostContextReGlobal = new RegExp(_cssScopedPseudoFunctionPrefix + "(" + _polyfillHostContext + _parenSuffix + ")", "gim");
|
|
5923
5963
|
var _cssColonHostContextRe = new RegExp(_polyfillHostContext + _parenSuffix, "im");
|
|
5924
5964
|
var _polyfillHostNoCombinator = _polyfillHost + "-no-combinator";
|
|
5965
|
+
var _polyfillHostNoCombinatorWithinPseudoFunction = new RegExp(`:.*\\(.*${_polyfillHostNoCombinator}.*\\)`);
|
|
5925
5966
|
var _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\s]*)/;
|
|
5967
|
+
var _polyfillHostNoCombinatorReGlobal = new RegExp(_polyfillHostNoCombinatorRe, "g");
|
|
5926
5968
|
var _shadowDOMSelectorsRe = [
|
|
5927
5969
|
/::shadow/g,
|
|
5928
5970
|
/::content/g,
|
|
@@ -6057,7 +6099,7 @@ function unescapeInStrings(input) {
|
|
|
6057
6099
|
function unescapeQuotes(str, isQuoted) {
|
|
6058
6100
|
return !isQuoted ? str : str.replace(/((?:^|[^\\])(?:\\\\)*)\\(?=['"])/g, "$1");
|
|
6059
6101
|
}
|
|
6060
|
-
function
|
|
6102
|
+
function _combineHostContextSelectors(contextSelectors, otherSelectors, pseudoPrefix = "") {
|
|
6061
6103
|
const hostMarker = _polyfillHostNoCombinator;
|
|
6062
6104
|
_polyfillHostRe.lastIndex = 0;
|
|
6063
6105
|
const otherSelectorsHasHost = _polyfillHostRe.test(otherSelectors);
|
|
@@ -6075,7 +6117,7 @@ function combineHostContextSelectors(contextSelectors, otherSelectors) {
|
|
|
6075
6117
|
combined[i] = contextSelector + previousSelectors;
|
|
6076
6118
|
}
|
|
6077
6119
|
}
|
|
6078
|
-
return combined.map((s) => otherSelectorsHasHost ? `${s}${otherSelectors}` : `${s}${hostMarker}${otherSelectors}, ${s} ${hostMarker}${otherSelectors}`).join(",");
|
|
6120
|
+
return combined.map((s) => otherSelectorsHasHost ? `${pseudoPrefix}${s}${otherSelectors}` : `${pseudoPrefix}${s}${hostMarker}${otherSelectors}, ${pseudoPrefix}${s} ${hostMarker}${otherSelectors}`).join(",");
|
|
6079
6121
|
}
|
|
6080
6122
|
function repeatGroups(groups, multiples) {
|
|
6081
6123
|
const length = groups.length;
|
|
@@ -23314,7 +23356,7 @@ function publishFacade(global) {
|
|
|
23314
23356
|
}
|
|
23315
23357
|
|
|
23316
23358
|
// bazel-out/k8-fastbuild/bin/packages/compiler/src/version.mjs
|
|
23317
|
-
var VERSION2 = new Version("18.2.
|
|
23359
|
+
var VERSION2 = new Version("18.2.9");
|
|
23318
23360
|
|
|
23319
23361
|
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
|
|
23320
23362
|
var _VisitorMode;
|