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