@vue/compiler-sfc 3.6.0-beta.10 → 3.6.0-beta.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/dist/compiler-sfc.cjs.js +142 -44
- package/dist/compiler-sfc.esm-browser.js +784 -415
- package/package.json +8 -8
package/dist/compiler-sfc.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-sfc v3.6.0-beta.
|
|
2
|
+
* @vue/compiler-sfc v3.6.0-beta.11
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -14,7 +14,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
14
14
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
15
15
|
var __getProtoOf = Object.getPrototypeOf;
|
|
16
16
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
17
|
-
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
17
|
+
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
18
18
|
var __copyProps = (to, from, except, desc) => {
|
|
19
19
|
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
20
20
|
key = keys[i];
|
|
@@ -197,33 +197,33 @@ function genNormalScriptCssVarsCode(cssVars, bindings, id, isProd, defaultVar) {
|
|
|
197
197
|
return `\nimport { ${CSS_VARS_HELPER} as _${CSS_VARS_HELPER} } from 'vue'\nconst __injectCSSVars__ = () => {\n${genCssVarsCode(cssVars, bindings, id, isProd)}}\nconst __setup__ = ${defaultVar}.setup\n${defaultVar}.setup = __setup__\n ? (props, ctx) => { __injectCSSVars__();return __setup__(props, ctx) }\n : __injectCSSVars__\n`;
|
|
198
198
|
}
|
|
199
199
|
//#endregion
|
|
200
|
-
//#region \0@oxc-project+runtime@0.
|
|
200
|
+
//#region \0@oxc-project+runtime@0.128.0/helpers/checkPrivateRedeclaration.js
|
|
201
201
|
function _checkPrivateRedeclaration(e, t) {
|
|
202
202
|
if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
203
203
|
}
|
|
204
204
|
//#endregion
|
|
205
|
-
//#region \0@oxc-project+runtime@0.
|
|
205
|
+
//#region \0@oxc-project+runtime@0.128.0/helpers/classPrivateMethodInitSpec.js
|
|
206
206
|
function _classPrivateMethodInitSpec(e, a) {
|
|
207
207
|
_checkPrivateRedeclaration(e, a), a.add(e);
|
|
208
208
|
}
|
|
209
209
|
//#endregion
|
|
210
|
-
//#region \0@oxc-project+runtime@0.
|
|
210
|
+
//#region \0@oxc-project+runtime@0.128.0/helpers/classPrivateFieldInitSpec.js
|
|
211
211
|
function _classPrivateFieldInitSpec(e, t, a) {
|
|
212
212
|
_checkPrivateRedeclaration(e, t), t.set(e, a);
|
|
213
213
|
}
|
|
214
214
|
//#endregion
|
|
215
|
-
//#region \0@oxc-project+runtime@0.
|
|
215
|
+
//#region \0@oxc-project+runtime@0.128.0/helpers/assertClassBrand.js
|
|
216
216
|
function _assertClassBrand(e, t, n) {
|
|
217
217
|
if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
|
|
218
218
|
throw new TypeError("Private element is not present on this object");
|
|
219
219
|
}
|
|
220
220
|
//#endregion
|
|
221
|
-
//#region \0@oxc-project+runtime@0.
|
|
221
|
+
//#region \0@oxc-project+runtime@0.128.0/helpers/classPrivateFieldGet2.js
|
|
222
222
|
function _classPrivateFieldGet2(s, a) {
|
|
223
223
|
return s.get(_assertClassBrand(s, a));
|
|
224
224
|
}
|
|
225
225
|
//#endregion
|
|
226
|
-
//#region \0@oxc-project+runtime@0.
|
|
226
|
+
//#region \0@oxc-project+runtime@0.128.0/helpers/classPrivateFieldSet2.js
|
|
227
227
|
function _classPrivateFieldSet2(s, a, r) {
|
|
228
228
|
return s.set(_assertClassBrand(s, a), r), r;
|
|
229
229
|
}
|
|
@@ -1715,14 +1715,14 @@ function isTemplateBlock(value) {
|
|
|
1715
1715
|
const resourceUrlTagConfig = {
|
|
1716
1716
|
video: ["src", "poster"],
|
|
1717
1717
|
source: ["src"],
|
|
1718
|
-
img: ["src"]
|
|
1719
|
-
image: ["xlink:href", "href"]
|
|
1718
|
+
img: ["src"]
|
|
1720
1719
|
};
|
|
1721
1720
|
const defaultAssetUrlOptions = {
|
|
1722
1721
|
base: null,
|
|
1723
1722
|
includeAbsolute: false,
|
|
1724
1723
|
tags: {
|
|
1725
1724
|
...resourceUrlTagConfig,
|
|
1725
|
+
image: ["xlink:href", "href"],
|
|
1726
1726
|
use: ["xlink:href", "href"]
|
|
1727
1727
|
}
|
|
1728
1728
|
};
|
|
@@ -1768,7 +1768,7 @@ const transformAssetUrl = (node, context, options = defaultAssetUrlOptions) => {
|
|
|
1768
1768
|
if (attr.type !== 6 || !assetAttrs.includes(attr.name) || !attr.value) return;
|
|
1769
1769
|
const urlValue = attr.value.content;
|
|
1770
1770
|
const isHashOnlyValue = urlValue[0] === "#";
|
|
1771
|
-
if (isExternalUrl(urlValue) || isDataUrl(urlValue) || isHashOnlyValue && !canTransformHashImport(node.tag, attr.name) || !options.includeAbsolute && !isRelativeUrl(urlValue)) return;
|
|
1771
|
+
if (isExternalUrl(urlValue) || isDataUrl(urlValue) || urlValue === "#" || isHashOnlyValue && !canTransformHashImport(node.tag, attr.name) || !options.includeAbsolute && !isRelativeUrl(urlValue)) return;
|
|
1772
1772
|
const url = parseUrl(urlValue);
|
|
1773
1773
|
if (options.base && urlValue[0] === ".") {
|
|
1774
1774
|
const base = parseUrl(options.base);
|
|
@@ -3312,6 +3312,7 @@ function doCompileTemplate({ filename, id, scoped, slotted, inMap, source, ast:
|
|
|
3312
3312
|
slotted,
|
|
3313
3313
|
sourceMap: true,
|
|
3314
3314
|
...compilerOptions,
|
|
3315
|
+
bindingMetadata: vapor && !ssr && compilerOptions.bindingMetadata == null ? {} : compilerOptions.bindingMetadata,
|
|
3315
3316
|
hmr: !isProd,
|
|
3316
3317
|
nodeTransforms: nodeTransforms.concat(compilerOptions.nodeTransforms || []),
|
|
3317
3318
|
filename,
|
|
@@ -6419,6 +6420,8 @@ function processRule(id, rule) {
|
|
|
6419
6420
|
function rewriteSelector(id, rule, selector, selectorRoot, deep, slotted = false) {
|
|
6420
6421
|
let node = null;
|
|
6421
6422
|
let shouldInject = !deep;
|
|
6423
|
+
let hasNestedDeep = false;
|
|
6424
|
+
let splitForNestedDeep = false;
|
|
6422
6425
|
selector.each((n) => {
|
|
6423
6426
|
if (n.type === "combinator" && (n.value === ">>>" || n.value === "/deep/")) {
|
|
6424
6427
|
n.value = " ";
|
|
@@ -6428,6 +6431,25 @@ function rewriteSelector(id, rule, selector, selectorRoot, deep, slotted = false
|
|
|
6428
6431
|
}
|
|
6429
6432
|
if (n.type === "pseudo") {
|
|
6430
6433
|
const { value } = n;
|
|
6434
|
+
if (isDeepContainerPseudo(n)) {
|
|
6435
|
+
if (n.nodes.some((selector) => selector.some(isDeepSelector))) {
|
|
6436
|
+
const hasScopeAnchor = !!node;
|
|
6437
|
+
const hasMixedSelectors = n.nodes.some((selector) => !selector.some(isDeepSelector));
|
|
6438
|
+
const hasTrailingNodes = selector.index(n) < selector.length - 1;
|
|
6439
|
+
if (canSplitDeepContainerPseudo(n) && !deep && !hasScopeAnchor && hasMixedSelectors && hasTrailingNodes) {
|
|
6440
|
+
splitSelectorForNestedDeep(id, rule, selector, selectorRoot, n, deep, slotted);
|
|
6441
|
+
splitForNestedDeep = true;
|
|
6442
|
+
return false;
|
|
6443
|
+
}
|
|
6444
|
+
if (value === ":not" && !deep && !hasScopeAnchor && hasMixedSelectors && hasTrailingNodes) return;
|
|
6445
|
+
n.nodes.forEach((selector) => rewriteSelector(id, rule, selector, selectorRoot, deep || hasScopeAnchor, slotted));
|
|
6446
|
+
if (!hasScopeAnchor) {
|
|
6447
|
+
node = n;
|
|
6448
|
+
shouldInject = false;
|
|
6449
|
+
}
|
|
6450
|
+
hasNestedDeep = true;
|
|
6451
|
+
}
|
|
6452
|
+
}
|
|
6431
6453
|
if (value === ":deep" || value === "::v-deep") {
|
|
6432
6454
|
rule.__deep = true;
|
|
6433
6455
|
if (n.nodes.length) {
|
|
@@ -6478,8 +6500,9 @@ function rewriteSelector(id, rule, selector, selectorRoot, deep, slotted = false
|
|
|
6478
6500
|
}
|
|
6479
6501
|
if (node) return;
|
|
6480
6502
|
}
|
|
6481
|
-
if (n.type !== "pseudo" && n.type !== "combinator" || n.type === "pseudo" && (n.value === ":is" || n.value === ":where") && !node) node = n;
|
|
6503
|
+
if (!hasNestedDeep && (n.type !== "pseudo" && n.type !== "combinator" || n.type === "pseudo" && (n.value === ":is" || n.value === ":where") && !node)) node = n;
|
|
6482
6504
|
});
|
|
6505
|
+
if (splitForNestedDeep) return;
|
|
6483
6506
|
if (rule.nodes.some((node) => node.type === "rule")) {
|
|
6484
6507
|
const deep = rule.__deep;
|
|
6485
6508
|
if (!deep) {
|
|
@@ -6489,7 +6512,7 @@ function rewriteSelector(id, rule, selector, selectorRoot, deep, slotted = false
|
|
|
6489
6512
|
}
|
|
6490
6513
|
shouldInject = deep;
|
|
6491
6514
|
}
|
|
6492
|
-
if (node) {
|
|
6515
|
+
if (node && !hasNestedDeep) {
|
|
6493
6516
|
const { type, value } = node;
|
|
6494
6517
|
if (type === "pseudo" && (value === ":is" || value === ":where")) {
|
|
6495
6518
|
node.nodes.forEach((value) => rewriteSelector(id, rule, value, selectorRoot, deep, slotted));
|
|
@@ -6511,6 +6534,32 @@ function rewriteSelector(id, rule, selector, selectorRoot, deep, slotted = false
|
|
|
6511
6534
|
function isSpaceCombinator(node) {
|
|
6512
6535
|
return node.type === "combinator" && /^\s+$/.test(node.value);
|
|
6513
6536
|
}
|
|
6537
|
+
function isDeepSelector(node) {
|
|
6538
|
+
var _nodes;
|
|
6539
|
+
if (node.type === "pseudo" && (node.value === ":deep" || node.value === "::v-deep")) return true;
|
|
6540
|
+
return !!((_nodes = node.nodes) === null || _nodes === void 0 ? void 0 : _nodes.some((child) => isDeepSelector(child)));
|
|
6541
|
+
}
|
|
6542
|
+
function isDeepContainerPseudo(node) {
|
|
6543
|
+
return node.type === "pseudo" && (node.value === ":is" || node.value === ":where" || node.value === ":has" || node.value === ":not");
|
|
6544
|
+
}
|
|
6545
|
+
function canSplitDeepContainerPseudo(node) {
|
|
6546
|
+
return node.value === ":is" || node.value === ":where" || node.value === ":has";
|
|
6547
|
+
}
|
|
6548
|
+
function splitSelectorForNestedDeep(id, rule, selector, selectorRoot, pseudo, deep, slotted) {
|
|
6549
|
+
const pseudoIndex = selector.index(pseudo);
|
|
6550
|
+
const selectors = pseudo.nodes.map((branch, index) => {
|
|
6551
|
+
const branchSelector = selector.clone();
|
|
6552
|
+
if (branchSelector.first) branchSelector.first.spaces.before = index === 0 ? selector.first.spaces.before : " ";
|
|
6553
|
+
const branchPseudo = branchSelector.at(pseudoIndex);
|
|
6554
|
+
const branchClone = branch.clone();
|
|
6555
|
+
if (branchClone.first) branchClone.first.spaces.before = "";
|
|
6556
|
+
branchPseudo.removeAll();
|
|
6557
|
+
branchPseudo.append(branchClone);
|
|
6558
|
+
rewriteSelector(id, rule, branchSelector, selectorRoot, deep, slotted);
|
|
6559
|
+
return branchSelector;
|
|
6560
|
+
});
|
|
6561
|
+
selector.replaceWith(...selectors);
|
|
6562
|
+
}
|
|
6514
6563
|
function extractAndWrapNodes(parentNode) {
|
|
6515
6564
|
if (!parentNode.nodes) return;
|
|
6516
6565
|
const nodes = parentNode.nodes.filter((node) => node.type === "decl" || node.type === "comment");
|
|
@@ -8681,7 +8730,7 @@ const processors = {
|
|
|
8681
8730
|
stylus: styl
|
|
8682
8731
|
};
|
|
8683
8732
|
//#endregion
|
|
8684
|
-
//#region node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.
|
|
8733
|
+
//#region node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.14/node_modules/postcss-modules/build/fs.js
|
|
8685
8734
|
var require_fs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
8686
8735
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8687
8736
|
exports.getFileSystem = getFileSystem;
|
|
@@ -8703,7 +8752,7 @@ var require_fs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
8703
8752
|
}
|
|
8704
8753
|
}));
|
|
8705
8754
|
//#endregion
|
|
8706
|
-
//#region node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.
|
|
8755
|
+
//#region node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.14/node_modules/postcss-modules/build/unquote.js
|
|
8707
8756
|
var require_unquote = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
8708
8757
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8709
8758
|
exports.default = unquote;
|
|
@@ -8716,7 +8765,7 @@ var require_unquote = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
8716
8765
|
}
|
|
8717
8766
|
}));
|
|
8718
8767
|
//#endregion
|
|
8719
|
-
//#region node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.
|
|
8768
|
+
//#region node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.14/node_modules/icss-utils/src/replaceValueSymbols.js
|
|
8720
8769
|
var require_replaceValueSymbols = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8721
8770
|
const matchValueName = /[$]?[\w-]+/g;
|
|
8722
8771
|
const replaceValueSymbols = (value, replacements) => {
|
|
@@ -8733,7 +8782,7 @@ var require_replaceValueSymbols = /* @__PURE__ */ __commonJSMin(((exports, modul
|
|
|
8733
8782
|
module.exports = replaceValueSymbols;
|
|
8734
8783
|
}));
|
|
8735
8784
|
//#endregion
|
|
8736
|
-
//#region node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.
|
|
8785
|
+
//#region node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.14/node_modules/icss-utils/src/replaceSymbols.js
|
|
8737
8786
|
var require_replaceSymbols = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8738
8787
|
const replaceValueSymbols = require_replaceValueSymbols();
|
|
8739
8788
|
const replaceSymbols = (css, replacements) => {
|
|
@@ -8746,7 +8795,7 @@ var require_replaceSymbols = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
8746
8795
|
module.exports = replaceSymbols;
|
|
8747
8796
|
}));
|
|
8748
8797
|
//#endregion
|
|
8749
|
-
//#region node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.
|
|
8798
|
+
//#region node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.14/node_modules/icss-utils/src/extractICSS.js
|
|
8750
8799
|
var require_extractICSS = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8751
8800
|
const importPattern = /^:import\(("[^"]*"|'[^']*'|[^"']+)\)$/;
|
|
8752
8801
|
const balancedQuotes = /^("[^"]*"|'[^']*'|[^"']+)$/;
|
|
@@ -8800,7 +8849,7 @@ var require_extractICSS = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
8800
8849
|
module.exports = extractICSS;
|
|
8801
8850
|
}));
|
|
8802
8851
|
//#endregion
|
|
8803
|
-
//#region node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.
|
|
8852
|
+
//#region node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.14/node_modules/icss-utils/src/createICSSRules.js
|
|
8804
8853
|
var require_createICSSRules = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8805
8854
|
const createImports = (imports, postcss, mode = "rule") => {
|
|
8806
8855
|
return Object.keys(imports).map((path) => {
|
|
@@ -8844,7 +8893,7 @@ var require_createICSSRules = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
8844
8893
|
module.exports = createICSSRules;
|
|
8845
8894
|
}));
|
|
8846
8895
|
//#endregion
|
|
8847
|
-
//#region node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.
|
|
8896
|
+
//#region node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.14/node_modules/icss-utils/src/index.js
|
|
8848
8897
|
var require_src$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8849
8898
|
module.exports = {
|
|
8850
8899
|
replaceValueSymbols: require_replaceValueSymbols(),
|
|
@@ -8854,7 +8903,7 @@ var require_src$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
8854
8903
|
};
|
|
8855
8904
|
}));
|
|
8856
8905
|
//#endregion
|
|
8857
|
-
//#region node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.
|
|
8906
|
+
//#region node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.14/node_modules/postcss-modules/build/Parser.js
|
|
8858
8907
|
var require_Parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
8859
8908
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8860
8909
|
exports.default = void 0;
|
|
@@ -8922,7 +8971,7 @@ var require_Parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
8922
8971
|
exports.default = Parser;
|
|
8923
8972
|
}));
|
|
8924
8973
|
//#endregion
|
|
8925
|
-
//#region node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.
|
|
8974
|
+
//#region node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.14/node_modules/postcss-modules/build/saveJSON.js
|
|
8926
8975
|
var require_saveJSON = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
8927
8976
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8928
8977
|
exports.default = saveJSON;
|
|
@@ -9578,7 +9627,7 @@ var require_lodash_camelcase = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
9578
9627
|
module.exports = camelCase;
|
|
9579
9628
|
}));
|
|
9580
9629
|
//#endregion
|
|
9581
|
-
//#region node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.
|
|
9630
|
+
//#region node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.14/node_modules/postcss-modules/build/localsConvention.js
|
|
9582
9631
|
var require_localsConvention = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
9583
9632
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9584
9633
|
exports.makeLocalsConventionReducer = makeLocalsConventionReducer;
|
|
@@ -9618,7 +9667,7 @@ var require_localsConvention = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
9618
9667
|
}
|
|
9619
9668
|
}));
|
|
9620
9669
|
//#endregion
|
|
9621
|
-
//#region node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.
|
|
9670
|
+
//#region node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.14/node_modules/postcss-modules/build/FileSystemLoader.js
|
|
9622
9671
|
var require_FileSystemLoader = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
9623
9672
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9624
9673
|
exports.default = void 0;
|
|
@@ -9703,7 +9752,7 @@ var require_FileSystemLoader = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
9703
9752
|
exports.default = FileSystemLoader;
|
|
9704
9753
|
}));
|
|
9705
9754
|
//#endregion
|
|
9706
|
-
//#region node_modules/.pnpm/postcss-modules-extract-imports@3.1.0_postcss@8.5.
|
|
9755
|
+
//#region node_modules/.pnpm/postcss-modules-extract-imports@3.1.0_postcss@8.5.14/node_modules/postcss-modules-extract-imports/src/topologicalSort.js
|
|
9707
9756
|
var require_topologicalSort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
9708
9757
|
const PERMANENT_MARKER = 2;
|
|
9709
9758
|
const TEMPORARY_MARKER = 1;
|
|
@@ -9742,7 +9791,7 @@ var require_topologicalSort = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
9742
9791
|
module.exports = topologicalSort;
|
|
9743
9792
|
}));
|
|
9744
9793
|
//#endregion
|
|
9745
|
-
//#region node_modules/.pnpm/postcss-modules-extract-imports@3.1.0_postcss@8.5.
|
|
9794
|
+
//#region node_modules/.pnpm/postcss-modules-extract-imports@3.1.0_postcss@8.5.14/node_modules/postcss-modules-extract-imports/src/index.js
|
|
9746
9795
|
var require_src$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
9747
9796
|
const topologicalSort = require_topologicalSort();
|
|
9748
9797
|
const matchImports = /^(.+?)\s+from\s+(?:"([^"]+)"|'([^']+)'|(global))$/;
|
|
@@ -10660,7 +10709,7 @@ var require_lib = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
10660
10709
|
module.exports = ValueParser;
|
|
10661
10710
|
}));
|
|
10662
10711
|
//#endregion
|
|
10663
|
-
//#region node_modules/.pnpm/postcss-modules-local-by-default@4.2.0_postcss@8.5.
|
|
10712
|
+
//#region node_modules/.pnpm/postcss-modules-local-by-default@4.2.0_postcss@8.5.14/node_modules/postcss-modules-local-by-default/src/index.js
|
|
10664
10713
|
var require_src$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
10665
10714
|
const selectorParser = require_dist();
|
|
10666
10715
|
const valueParser = require_lib();
|
|
@@ -11059,7 +11108,7 @@ var require_src$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
11059
11108
|
module.exports.postcss = true;
|
|
11060
11109
|
}));
|
|
11061
11110
|
//#endregion
|
|
11062
|
-
//#region node_modules/.pnpm/postcss-modules-scope@3.2.1_postcss@8.5.
|
|
11111
|
+
//#region node_modules/.pnpm/postcss-modules-scope@3.2.1_postcss@8.5.14/node_modules/postcss-modules-scope/src/index.js
|
|
11063
11112
|
var require_src$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
11064
11113
|
const selectorParser = require_dist();
|
|
11065
11114
|
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
@@ -11239,7 +11288,7 @@ var require_string_hash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
11239
11288
|
module.exports = hash;
|
|
11240
11289
|
}));
|
|
11241
11290
|
//#endregion
|
|
11242
|
-
//#region node_modules/.pnpm/postcss-modules-values@4.0.0_postcss@8.5.
|
|
11291
|
+
//#region node_modules/.pnpm/postcss-modules-values@4.0.0_postcss@8.5.14/node_modules/postcss-modules-values/src/index.js
|
|
11243
11292
|
var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
11244
11293
|
const ICSSUtils = require_src$4();
|
|
11245
11294
|
const matchImports = /^(.+?|\([\s\S]+?\))\s+from\s+("[^"]*"|'[^']*'|[\w-]+)$/;
|
|
@@ -11326,7 +11375,7 @@ var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
11326
11375
|
module.exports.postcss = true;
|
|
11327
11376
|
}));
|
|
11328
11377
|
//#endregion
|
|
11329
|
-
//#region node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.
|
|
11378
|
+
//#region node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.14/node_modules/postcss-modules/build/scoping.js
|
|
11330
11379
|
var require_scoping = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
11331
11380
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11332
11381
|
exports.behaviours = void 0;
|
|
@@ -11388,7 +11437,7 @@ var require_scoping = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11388
11437
|
}
|
|
11389
11438
|
}));
|
|
11390
11439
|
//#endregion
|
|
11391
|
-
//#region node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.
|
|
11440
|
+
//#region node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.14/node_modules/postcss-modules/build/pluginFactory.js
|
|
11392
11441
|
var require_pluginFactory = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
11393
11442
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11394
11443
|
exports.makePlugin = makePlugin;
|
|
@@ -12881,7 +12930,8 @@ var Minimatch = class {
|
|
|
12881
12930
|
this.pattern = pattern;
|
|
12882
12931
|
this.platform = options.platform || defaultPlatform;
|
|
12883
12932
|
this.isWindows = this.platform === "win32";
|
|
12884
|
-
|
|
12933
|
+
const awe = "allowWindowsEscape";
|
|
12934
|
+
this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options[awe] === false;
|
|
12885
12935
|
if (this.windowsPathsNoEscape) this.pattern = this.pattern.replace(/\\/g, "/");
|
|
12886
12936
|
this.preserveMultipleSlashes = !!options.preserveMultipleSlashes;
|
|
12887
12937
|
this.regexp = null;
|
|
@@ -13366,13 +13416,22 @@ var TypeScope = class {
|
|
|
13366
13416
|
this.exportedDeclares = Object.create(null);
|
|
13367
13417
|
}
|
|
13368
13418
|
};
|
|
13419
|
+
function recordScopeDep(ctx, scope) {
|
|
13420
|
+
if (scope && scope.filename !== ctx.filename) (ctx.deps || (ctx.deps = /* @__PURE__ */ new Set())).add(scope.filename);
|
|
13421
|
+
}
|
|
13422
|
+
function recordResolvedElementDeps(ctx, { props }) {
|
|
13423
|
+
for (const key in props) recordScopeDep(ctx, props[key]._ownerScope);
|
|
13424
|
+
}
|
|
13369
13425
|
/**
|
|
13370
13426
|
* Resolve arbitrary type node to a list of type elements that can be then
|
|
13371
13427
|
* mapped to runtime props or emits.
|
|
13372
13428
|
*/
|
|
13373
13429
|
function resolveTypeElements(ctx, node, scope, typeParameters) {
|
|
13374
13430
|
const canCache = !typeParameters;
|
|
13375
|
-
if (canCache && node._resolvedElements)
|
|
13431
|
+
if (canCache && node._resolvedElements) {
|
|
13432
|
+
recordResolvedElementDeps(ctx, node._resolvedElements);
|
|
13433
|
+
return node._resolvedElements;
|
|
13434
|
+
}
|
|
13376
13435
|
const resolved = innerResolveTypeElements(ctx, node, node._ownerScope || scope || ctxToScope(ctx), typeParameters);
|
|
13377
13436
|
return canCache ? node._resolvedElements = resolved : resolved;
|
|
13378
13437
|
}
|
|
@@ -13644,7 +13703,10 @@ function resolveBuiltin(ctx, node, name, scope, typeParameters) {
|
|
|
13644
13703
|
}
|
|
13645
13704
|
function resolveTypeReference(ctx, node, scope, name, onlyExported = false) {
|
|
13646
13705
|
const canCache = !(scope === null || scope === void 0 ? void 0 : scope.isGenericScope);
|
|
13647
|
-
if (canCache && node._resolvedReference)
|
|
13706
|
+
if (canCache && node._resolvedReference) {
|
|
13707
|
+
recordScopeDep(ctx, node._resolvedReference._ownerScope);
|
|
13708
|
+
return node._resolvedReference;
|
|
13709
|
+
}
|
|
13648
13710
|
const resolved = innerResolveTypeReference(ctx, scope || ctxToScope(ctx), name || getReferenceName(node), node, onlyExported);
|
|
13649
13711
|
return canCache ? node._resolvedReference = resolved : resolved;
|
|
13650
13712
|
}
|
|
@@ -13659,7 +13721,9 @@ function innerResolveTypeReference(ctx, scope, name, node, onlyExported) {
|
|
|
13659
13721
|
const src = node.type === "TSTypeQuery" ? s.declares : s.types;
|
|
13660
13722
|
if (src[name]) {
|
|
13661
13723
|
(ctx.deps || (ctx.deps = /* @__PURE__ */ new Set())).add(s.filename);
|
|
13662
|
-
|
|
13724
|
+
const resolved = src[name];
|
|
13725
|
+
if (resolved._ownerScope && resolved._ownerScope !== s) ctx.deps.add(resolved._ownerScope.filename);
|
|
13726
|
+
return resolved;
|
|
13663
13727
|
}
|
|
13664
13728
|
}
|
|
13665
13729
|
}
|
|
@@ -13724,7 +13788,7 @@ function resolveTypeFromImport(ctx, node, name, scope) {
|
|
|
13724
13788
|
const { source, imported } = scope.imports[name];
|
|
13725
13789
|
return resolveTypeReference(ctx, node, importSourceToScope(ctx, node, scope, source), imported, true);
|
|
13726
13790
|
}
|
|
13727
|
-
function importSourceToScope(ctx, node, scope, source) {
|
|
13791
|
+
function importSourceToScope(ctx, node, scope, source, trackDep = true) {
|
|
13728
13792
|
let fs;
|
|
13729
13793
|
try {
|
|
13730
13794
|
fs = resolveFS(ctx);
|
|
@@ -13743,10 +13807,16 @@ function importSourceToScope(ctx, node, scope, source) {
|
|
|
13743
13807
|
}
|
|
13744
13808
|
resolved = resolveWithTS(scope.filename, source, ts, fs);
|
|
13745
13809
|
}
|
|
13810
|
+
if (!resolved && source[0] === "." && true) {
|
|
13811
|
+
if (!ts) {
|
|
13812
|
+
if (loadTS) ts = loadTS();
|
|
13813
|
+
}
|
|
13814
|
+
if (ts) resolved = resolveWithTS(scope.filename, source, ts, fs);
|
|
13815
|
+
}
|
|
13746
13816
|
if (resolved) resolved = scope.resolvedImportSources[source] = normalizePath(resolved);
|
|
13747
13817
|
}
|
|
13748
13818
|
if (resolved) {
|
|
13749
|
-
(ctx.deps || (ctx.deps = /* @__PURE__ */ new Set())).add(resolved);
|
|
13819
|
+
if (trackDep) (ctx.deps || (ctx.deps = /* @__PURE__ */ new Set())).add(resolved);
|
|
13750
13820
|
return fileToScope(ctx, resolved);
|
|
13751
13821
|
} else return ctx.error(`Failed to resolve import source ${JSON.stringify(source)}.`, node, scope);
|
|
13752
13822
|
}
|
|
@@ -13900,8 +13970,22 @@ function recordTypes(ctx, body, scope, asGlobal = false) {
|
|
|
13900
13970
|
for (const stmt of body) if (asGlobal) {
|
|
13901
13971
|
if (isAmbient) {
|
|
13902
13972
|
if (stmt.declare) recordType(stmt, types, declares);
|
|
13903
|
-
} else if (stmt.type === "TSModuleDeclaration" && stmt.global) for (const s of stmt.body.body) if (s.type === "ExportNamedDeclaration"
|
|
13904
|
-
|
|
13973
|
+
} else if (stmt.type === "TSModuleDeclaration" && stmt.global) for (const s of stmt.body.body) if (s.type === "ExportNamedDeclaration") {
|
|
13974
|
+
if (s.declaration) recordType(s.declaration, types, declares);
|
|
13975
|
+
else if (s.source) {
|
|
13976
|
+
const sourceScope = importSourceToScope(ctx, s.source, scope, s.source.value, false);
|
|
13977
|
+
for (const spec of s.specifiers) if (spec.type === "ExportSpecifier") {
|
|
13978
|
+
const exported = getId(spec.exported);
|
|
13979
|
+
const local = spec.local.name;
|
|
13980
|
+
if (sourceScope.exportedTypes[local]) types[exported] = sourceScope.exportedTypes[local];
|
|
13981
|
+
if (sourceScope.exportedDeclares[local]) declares[exported] = sourceScope.exportedDeclares[local];
|
|
13982
|
+
}
|
|
13983
|
+
}
|
|
13984
|
+
} else if (s.type === "ExportAllDeclaration" && s.source) {
|
|
13985
|
+
const sourceScope = importSourceToScope(ctx, s.source, scope, s.source.value, false);
|
|
13986
|
+
Object.assign(types, sourceScope.exportedTypes);
|
|
13987
|
+
Object.assign(declares, sourceScope.exportedDeclares);
|
|
13988
|
+
} else recordType(s, types, declares);
|
|
13905
13989
|
} else recordType(stmt, types, declares);
|
|
13906
13990
|
if (!asGlobal) {
|
|
13907
13991
|
for (const stmt of body) if (stmt.type === "ExportNamedDeclaration") {
|
|
@@ -13938,10 +14022,10 @@ function recordTypes(ctx, body, scope, asGlobal = false) {
|
|
|
13938
14022
|
}
|
|
13939
14023
|
for (const key of Object.keys(types)) {
|
|
13940
14024
|
const node = types[key];
|
|
13941
|
-
node._ownerScope = scope;
|
|
13942
|
-
if (node._ns) node._ns._ownerScope = scope;
|
|
14025
|
+
if (!node._ownerScope) node._ownerScope = scope;
|
|
14026
|
+
if (node._ns && !node._ns._ownerScope) node._ns._ownerScope = scope;
|
|
13943
14027
|
}
|
|
13944
|
-
for (const key of Object.keys(declares)) declares[key]._ownerScope = scope;
|
|
14028
|
+
for (const key of Object.keys(declares)) if (!declares[key]._ownerScope) declares[key]._ownerScope = scope;
|
|
13945
14029
|
}
|
|
13946
14030
|
function recordType(node, types, declares, overwriteId) {
|
|
13947
14031
|
switch (node.type) {
|
|
@@ -14066,7 +14150,10 @@ function inferRuntimeType(ctx, node, scope = node._ownerScope || ctxToScope(ctx)
|
|
|
14066
14150
|
default: return [UNKNOWN_TYPE];
|
|
14067
14151
|
}
|
|
14068
14152
|
case "TSTypeReference": {
|
|
14069
|
-
|
|
14153
|
+
let resolved;
|
|
14154
|
+
try {
|
|
14155
|
+
resolved = resolveTypeReference(ctx, node, scope);
|
|
14156
|
+
} catch {}
|
|
14070
14157
|
if (resolved) {
|
|
14071
14158
|
if (resolved.type === "TSTypeAliasDeclaration") {
|
|
14072
14159
|
if (resolved.typeAnnotation.type === "TSFunctionType") return ["Function"];
|
|
@@ -14142,6 +14229,17 @@ function inferRuntimeType(ctx, node, scope = node._ownerScope || ctxToScope(ctx)
|
|
|
14142
14229
|
case "ReadonlyArray": return ["Array"];
|
|
14143
14230
|
case "ReadonlyMap": return ["Map"];
|
|
14144
14231
|
case "ReadonlySet": return ["Set"];
|
|
14232
|
+
case "Ref":
|
|
14233
|
+
case "ShallowRef":
|
|
14234
|
+
case "ComputedRef":
|
|
14235
|
+
case "WritableComputedRef": return ["Object"];
|
|
14236
|
+
case "MaybeRef":
|
|
14237
|
+
case "MaybeRefOrGetter": {
|
|
14238
|
+
const types = new Set(["Object"]);
|
|
14239
|
+
if (node.typeName.name === "MaybeRefOrGetter") types.add("Function");
|
|
14240
|
+
if (node.typeParameters && node.typeParameters.params[0]) for (const t of inferRuntimeType(ctx, node.typeParameters.params[0], scope, false, typeParameters)) types.add(t);
|
|
14241
|
+
return Array.from(types);
|
|
14242
|
+
}
|
|
14145
14243
|
case "NonNullable":
|
|
14146
14244
|
if (node.typeParameters && node.typeParameters.params[0]) return inferRuntimeType(ctx, node.typeParameters.params[0], scope).filter((t) => t !== "null");
|
|
14147
14245
|
break;
|
|
@@ -15342,7 +15440,7 @@ function mergeSourceMaps(scriptMap, templateMap, templateLineOffset) {
|
|
|
15342
15440
|
}
|
|
15343
15441
|
//#endregion
|
|
15344
15442
|
//#region packages/compiler-sfc/src/index.ts
|
|
15345
|
-
const version = "3.6.0-beta.
|
|
15443
|
+
const version = "3.6.0-beta.11";
|
|
15346
15444
|
const parseCache = parseCache$1;
|
|
15347
15445
|
const errorMessages = {
|
|
15348
15446
|
..._vue_compiler_dom.errorMessages,
|