@angular/core 18.2.7 → 18.2.8
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/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/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 +18 -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 +2 -12
- 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 +79 -34
- package/testing/index.d.ts +3 -1
|
@@ -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.8");
|
|
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.8");
|
|
23318
23360
|
|
|
23319
23361
|
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
|
|
23320
23362
|
var _VisitorMode;
|
|
@@ -5753,7 +5753,7 @@ var ShadowCss = class {
|
|
|
5753
5753
|
});
|
|
5754
5754
|
}
|
|
5755
5755
|
_convertColonHostContext(cssText) {
|
|
5756
|
-
return cssText.replace(_cssColonHostContextReGlobal, (selectorText) => {
|
|
5756
|
+
return cssText.replace(_cssColonHostContextReGlobal, (selectorText, pseudoPrefix) => {
|
|
5757
5757
|
var _a2;
|
|
5758
5758
|
const contextSelectorGroups = [[]];
|
|
5759
5759
|
let match;
|
|
@@ -5768,7 +5768,7 @@ var ShadowCss = class {
|
|
|
5768
5768
|
}
|
|
5769
5769
|
selectorText = match[2];
|
|
5770
5770
|
}
|
|
5771
|
-
return contextSelectorGroups.map((contextSelectors) =>
|
|
5771
|
+
return contextSelectorGroups.map((contextSelectors) => _combineHostContextSelectors(contextSelectors, selectorText, pseudoPrefix)).join(", ");
|
|
5772
5772
|
});
|
|
5773
5773
|
}
|
|
5774
5774
|
_convertShadowDOMSelectors(cssText) {
|
|
@@ -5779,7 +5779,12 @@ var ShadowCss = class {
|
|
|
5779
5779
|
let selector = rule.selector;
|
|
5780
5780
|
let content = rule.content;
|
|
5781
5781
|
if (rule.selector[0] !== "@") {
|
|
5782
|
-
selector = this._scopeSelector(
|
|
5782
|
+
selector = this._scopeSelector({
|
|
5783
|
+
selector,
|
|
5784
|
+
scopeSelector,
|
|
5785
|
+
hostSelector,
|
|
5786
|
+
isParentSelector: true
|
|
5787
|
+
});
|
|
5783
5788
|
} else if (scopedAtRuleIdentifiers.some((atRule) => rule.selector.startsWith(atRule))) {
|
|
5784
5789
|
content = this._scopeSelectors(rule.content, scopeSelector, hostSelector);
|
|
5785
5790
|
} else if (rule.selector.startsWith("@font-face") || rule.selector.startsWith("@page")) {
|
|
@@ -5794,12 +5799,18 @@ var ShadowCss = class {
|
|
|
5794
5799
|
return new CssRule(selector, rule.content);
|
|
5795
5800
|
});
|
|
5796
5801
|
}
|
|
5797
|
-
_scopeSelector(selector, scopeSelector, hostSelector) {
|
|
5798
|
-
|
|
5802
|
+
_scopeSelector({ selector, scopeSelector, hostSelector, isParentSelector = false }) {
|
|
5803
|
+
const selectorSplitRe = / ?,(?!(?:[^)(]*(?:\([^)(]*(?:\([^)(]*(?:\([^)(]*\)[^)(]*)*\)[^)(]*)*\)[^)(]*)*\))) ?/;
|
|
5804
|
+
return selector.split(selectorSplitRe).map((part) => part.split(_shadowDeepSelectors)).map((deepParts) => {
|
|
5799
5805
|
const [shallowPart, ...otherParts] = deepParts;
|
|
5800
5806
|
const applyScope = (shallowPart2) => {
|
|
5801
5807
|
if (this._selectorNeedsScoping(shallowPart2, scopeSelector)) {
|
|
5802
|
-
return this._applySelectorScope(
|
|
5808
|
+
return this._applySelectorScope({
|
|
5809
|
+
selector: shallowPart2,
|
|
5810
|
+
scopeSelector,
|
|
5811
|
+
hostSelector,
|
|
5812
|
+
isParentSelector
|
|
5813
|
+
});
|
|
5803
5814
|
} else {
|
|
5804
5815
|
return shallowPart2;
|
|
5805
5816
|
}
|
|
@@ -5821,15 +5832,15 @@ var ShadowCss = class {
|
|
|
5821
5832
|
_polyfillHostRe.lastIndex = 0;
|
|
5822
5833
|
if (_polyfillHostRe.test(selector)) {
|
|
5823
5834
|
const replaceBy = `[${hostSelector}]`;
|
|
5824
|
-
return selector.replace(
|
|
5825
|
-
return selector2.replace(/([
|
|
5835
|
+
return selector.replace(_polyfillHostNoCombinatorReGlobal, (_hnc, selector2) => {
|
|
5836
|
+
return selector2.replace(/([^:\)]*)(:*)(.*)/, (_, before, colon, after) => {
|
|
5826
5837
|
return before + replaceBy + colon + after;
|
|
5827
5838
|
});
|
|
5828
5839
|
}).replace(_polyfillHostRe, replaceBy + " ");
|
|
5829
5840
|
}
|
|
5830
5841
|
return scopeSelector + " " + selector;
|
|
5831
5842
|
}
|
|
5832
|
-
_applySelectorScope(selector, scopeSelector, hostSelector) {
|
|
5843
|
+
_applySelectorScope({ selector, scopeSelector, hostSelector, isParentSelector }) {
|
|
5833
5844
|
var _a2;
|
|
5834
5845
|
const isRe = /\[is=([^\]]*)\]/g;
|
|
5835
5846
|
scopeSelector = scopeSelector.replace(isRe, (_, ...parts) => parts[0]);
|
|
@@ -5841,6 +5852,10 @@ var ShadowCss = class {
|
|
|
5841
5852
|
}
|
|
5842
5853
|
if (p.includes(_polyfillHostNoCombinator)) {
|
|
5843
5854
|
scopedP = this._applySimpleSelectorScope(p, scopeSelector, hostSelector);
|
|
5855
|
+
if (_polyfillHostNoCombinatorWithinPseudoFunction.test(p)) {
|
|
5856
|
+
const [_, before, colon, after] = scopedP.match(/([^:]*)(:*)(.*)/);
|
|
5857
|
+
scopedP = before + attrName + colon + after;
|
|
5858
|
+
}
|
|
5844
5859
|
} else {
|
|
5845
5860
|
const t = p.replace(_polyfillHostRe, "");
|
|
5846
5861
|
if (t.length > 0) {
|
|
@@ -5852,29 +5867,52 @@ var ShadowCss = class {
|
|
|
5852
5867
|
}
|
|
5853
5868
|
return scopedP;
|
|
5854
5869
|
};
|
|
5855
|
-
const
|
|
5856
|
-
|
|
5870
|
+
const _pseudoFunctionAwareScopeSelectorPart = (selectorPart) => {
|
|
5871
|
+
let scopedPart = "";
|
|
5872
|
+
const cssPrefixWithPseudoSelectorFunctionMatch = selectorPart.match(_cssPrefixWithPseudoSelectorFunction);
|
|
5873
|
+
if (cssPrefixWithPseudoSelectorFunctionMatch) {
|
|
5874
|
+
const [cssPseudoSelectorFunction] = cssPrefixWithPseudoSelectorFunctionMatch;
|
|
5875
|
+
const selectorToScope = selectorPart.slice(cssPseudoSelectorFunction.length, -1);
|
|
5876
|
+
if (selectorToScope.includes(_polyfillHostNoCombinator)) {
|
|
5877
|
+
this._shouldScopeIndicator = true;
|
|
5878
|
+
}
|
|
5879
|
+
const scopedInnerPart = this._scopeSelector({
|
|
5880
|
+
selector: selectorToScope,
|
|
5881
|
+
scopeSelector,
|
|
5882
|
+
hostSelector
|
|
5883
|
+
});
|
|
5884
|
+
scopedPart = `${cssPseudoSelectorFunction}${scopedInnerPart})`;
|
|
5885
|
+
} else {
|
|
5886
|
+
this._shouldScopeIndicator = this._shouldScopeIndicator || selectorPart.includes(_polyfillHostNoCombinator);
|
|
5887
|
+
scopedPart = this._shouldScopeIndicator ? _scopeSelectorPart(selectorPart) : selectorPart;
|
|
5888
|
+
}
|
|
5889
|
+
return scopedPart;
|
|
5890
|
+
};
|
|
5891
|
+
if (isParentSelector) {
|
|
5892
|
+
this._safeSelector = new SafeSelector(selector);
|
|
5893
|
+
selector = this._safeSelector.content();
|
|
5894
|
+
}
|
|
5857
5895
|
let scopedSelector = "";
|
|
5858
5896
|
let startIndex = 0;
|
|
5859
5897
|
let res;
|
|
5860
|
-
const sep = /( |>|\+|~(?!=))\s*/g;
|
|
5898
|
+
const sep = /( |>|\+|~(?!=))(?!([^)(]*(?:\([^)(]*(?:\([^)(]*(?:\([^)(]*\)[^)(]*)*\)[^)(]*)*\)[^)(]*)*\)))\s*/g;
|
|
5861
5899
|
const hasHost = selector.includes(_polyfillHostNoCombinator);
|
|
5862
|
-
|
|
5900
|
+
if (isParentSelector || this._shouldScopeIndicator) {
|
|
5901
|
+
this._shouldScopeIndicator = !hasHost;
|
|
5902
|
+
}
|
|
5863
5903
|
while ((res = sep.exec(selector)) !== null) {
|
|
5864
5904
|
const separator = res[1];
|
|
5865
5905
|
const part2 = selector.slice(startIndex, res.index);
|
|
5866
5906
|
if (part2.match(/__esc-ph-(\d+)__/) && ((_a2 = selector[res.index + 1]) == null ? void 0 : _a2.match(/[a-fA-F\d]/))) {
|
|
5867
5907
|
continue;
|
|
5868
5908
|
}
|
|
5869
|
-
|
|
5870
|
-
const scopedPart = shouldScope ? _scopeSelectorPart(part2) : part2;
|
|
5909
|
+
const scopedPart = _pseudoFunctionAwareScopeSelectorPart(part2);
|
|
5871
5910
|
scopedSelector += `${scopedPart} ${separator} `;
|
|
5872
5911
|
startIndex = sep.lastIndex;
|
|
5873
5912
|
}
|
|
5874
5913
|
const part = selector.substring(startIndex);
|
|
5875
|
-
|
|
5876
|
-
|
|
5877
|
-
return safeContent.restore(scopedSelector);
|
|
5914
|
+
scopedSelector += _pseudoFunctionAwareScopeSelectorPart(part);
|
|
5915
|
+
return this._safeSelector.restore(scopedSelector);
|
|
5878
5916
|
}
|
|
5879
5917
|
_insertPolyfillHostInCssText(selector) {
|
|
5880
5918
|
return selector.replace(_colonHostContextRe, _polyfillHostContext).replace(_colonHostRe, _polyfillHost);
|
|
@@ -5913,6 +5951,8 @@ var SafeSelector = class {
|
|
|
5913
5951
|
});
|
|
5914
5952
|
}
|
|
5915
5953
|
};
|
|
5954
|
+
var _cssScopedPseudoFunctionPrefix = "(:(where|is)\\()?";
|
|
5955
|
+
var _cssPrefixWithPseudoSelectorFunction = /^:(where|is)\(/i;
|
|
5916
5956
|
var _cssContentNextSelectorRe = /polyfill-next-selector[^}]*content:[\s]*?(['"])(.*?)\1[;\s]*}([^{]*?){/gim;
|
|
5917
5957
|
var _cssContentRuleRe = /(polyfill-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim;
|
|
5918
5958
|
var _cssContentUnscopedRuleRe = /(polyfill-unscoped-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim;
|
|
@@ -5920,10 +5960,12 @@ var _polyfillHost = "-shadowcsshost";
|
|
|
5920
5960
|
var _polyfillHostContext = "-shadowcsscontext";
|
|
5921
5961
|
var _parenSuffix = "(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)";
|
|
5922
5962
|
var _cssColonHostRe = new RegExp(_polyfillHost + _parenSuffix, "gim");
|
|
5923
|
-
var _cssColonHostContextReGlobal = new RegExp(_polyfillHostContext + _parenSuffix, "gim");
|
|
5963
|
+
var _cssColonHostContextReGlobal = new RegExp(_cssScopedPseudoFunctionPrefix + "(" + _polyfillHostContext + _parenSuffix + ")", "gim");
|
|
5924
5964
|
var _cssColonHostContextRe = new RegExp(_polyfillHostContext + _parenSuffix, "im");
|
|
5925
5965
|
var _polyfillHostNoCombinator = _polyfillHost + "-no-combinator";
|
|
5966
|
+
var _polyfillHostNoCombinatorWithinPseudoFunction = new RegExp(`:.*\\(.*${_polyfillHostNoCombinator}.*\\)`);
|
|
5926
5967
|
var _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\s]*)/;
|
|
5968
|
+
var _polyfillHostNoCombinatorReGlobal = new RegExp(_polyfillHostNoCombinatorRe, "g");
|
|
5927
5969
|
var _shadowDOMSelectorsRe = [
|
|
5928
5970
|
/::shadow/g,
|
|
5929
5971
|
/::content/g,
|
|
@@ -6058,7 +6100,7 @@ function unescapeInStrings(input) {
|
|
|
6058
6100
|
function unescapeQuotes(str, isQuoted) {
|
|
6059
6101
|
return !isQuoted ? str : str.replace(/((?:^|[^\\])(?:\\\\)*)\\(?=['"])/g, "$1");
|
|
6060
6102
|
}
|
|
6061
|
-
function
|
|
6103
|
+
function _combineHostContextSelectors(contextSelectors, otherSelectors, pseudoPrefix = "") {
|
|
6062
6104
|
const hostMarker = _polyfillHostNoCombinator;
|
|
6063
6105
|
_polyfillHostRe.lastIndex = 0;
|
|
6064
6106
|
const otherSelectorsHasHost = _polyfillHostRe.test(otherSelectors);
|
|
@@ -6076,7 +6118,7 @@ function combineHostContextSelectors(contextSelectors, otherSelectors) {
|
|
|
6076
6118
|
combined[i] = contextSelector + previousSelectors;
|
|
6077
6119
|
}
|
|
6078
6120
|
}
|
|
6079
|
-
return combined.map((s) => otherSelectorsHasHost ? `${s}${otherSelectors}` : `${s}${hostMarker}${otherSelectors}, ${s} ${hostMarker}${otherSelectors}`).join(",");
|
|
6121
|
+
return combined.map((s) => otherSelectorsHasHost ? `${pseudoPrefix}${s}${otherSelectors}` : `${pseudoPrefix}${s}${hostMarker}${otherSelectors}, ${pseudoPrefix}${s} ${hostMarker}${otherSelectors}`).join(",");
|
|
6080
6122
|
}
|
|
6081
6123
|
function repeatGroups(groups, multiples) {
|
|
6082
6124
|
const length = groups.length;
|
|
@@ -23315,7 +23357,7 @@ function publishFacade(global) {
|
|
|
23315
23357
|
}
|
|
23316
23358
|
|
|
23317
23359
|
// bazel-out/k8-fastbuild/bin/packages/compiler/src/version.mjs
|
|
23318
|
-
var VERSION2 = new Version("18.2.
|
|
23360
|
+
var VERSION2 = new Version("18.2.8");
|
|
23319
23361
|
|
|
23320
23362
|
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
|
|
23321
23363
|
var _VisitorMode;
|