@vue-jsx-vapor/macros 2.3.6 → 2.4.0
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/api.cjs +5 -6
- package/dist/api.d.cts +28 -27
- package/dist/api.d.ts +28 -27
- package/dist/api.js +2 -2
- package/dist/astro.cjs +5 -6
- package/dist/astro.d.cts +6 -8
- package/dist/astro.d.ts +6 -8
- package/dist/astro.js +3 -3
- package/dist/{chunk-BCwAaXi7.cjs → chunk-CUT6urMc.cjs} +0 -1
- package/dist/{core-C740HxiF.cjs → core-Bcy1Ov-P.cjs} +236 -44
- package/dist/{core-CHBxRAvb.js → core-CVDOxdBq.js} +234 -35
- package/dist/esbuild.cjs +5 -6
- package/dist/esbuild.d.cts +3 -3
- package/dist/esbuild.d.ts +3 -3
- package/dist/esbuild.js +3 -3
- package/dist/index.cjs +6 -6
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/nuxt.cjs +8 -9
- package/dist/nuxt.d.cts +4 -5
- package/dist/nuxt.d.ts +4 -5
- package/dist/nuxt.js +5 -5
- package/dist/{options-BSX_vMxh.cjs → options-BejTnOdM.cjs} +1 -2
- package/dist/options-BxlJkUDe.d.cts +37 -0
- package/dist/options-QKLCzlvG.d.ts +37 -0
- package/dist/options.cjs +2 -2
- package/dist/options.d.cts +1 -2
- package/dist/options.d.ts +1 -2
- package/dist/{raw-Hr7QYA0U.js → raw-BYuezyBg.js} +1 -1
- package/dist/{raw-BXpT71mV.cjs → raw-CWSp77B1.cjs} +3 -4
- package/dist/raw.cjs +4 -4
- package/dist/raw.d.cts +1 -1
- package/dist/raw.d.ts +1 -1
- package/dist/raw.js +2 -2
- package/dist/rolldown.cjs +5 -6
- package/dist/rolldown.d.cts +3 -2
- package/dist/rolldown.d.ts +3 -2
- package/dist/rolldown.js +3 -3
- package/dist/rollup.cjs +5 -6
- package/dist/rollup.d.cts +3 -3
- package/dist/rollup.d.ts +3 -3
- package/dist/rollup.js +3 -3
- package/dist/rspack.cjs +5 -6
- package/dist/rspack.d.cts +1 -1
- package/dist/rspack.d.ts +1 -1
- package/dist/rspack.js +3 -3
- package/dist/{src-2EUAmvRo.cjs → src-B6eLwniY.cjs} +2 -3
- package/dist/{src-BDMVJUXS.js → src-CLt7j2eU.js} +1 -1
- package/dist/{vite-DP98E6od.cjs → vite-TO-g3dBi.cjs} +1 -2
- package/dist/{vite-CS2vynmi.js → vite-YbByXTNo.js} +1 -1
- package/dist/vite.cjs +6 -6
- package/dist/vite.d.cts +3 -3
- package/dist/vite.d.ts +3 -3
- package/dist/vite.js +4 -4
- package/dist/volar.cjs +30 -29
- package/dist/volar.d.cts +1 -1
- package/dist/volar.d.ts +1 -1
- package/dist/volar.js +27 -25
- package/dist/{webpack-C78RZrII.js → webpack-BtB3goNy.js} +1 -1
- package/dist/{webpack-qmJC3FBB.cjs → webpack-DoPd9jaB.cjs} +1 -2
- package/dist/webpack.cjs +6 -6
- package/dist/webpack.d.cts +3 -3
- package/dist/webpack.d.ts +3 -3
- package/dist/webpack.js +4 -4
- package/package.json +25 -69
- package/dist/options.d-CXMsJZSo.d.cts +0 -37
- package/dist/options.d-DNWXuL_g.d.ts +0 -37
package/dist/raw.d.ts
CHANGED
package/dist/raw.js
CHANGED
package/dist/rolldown.cjs
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3
|
-
require('./core-
|
|
4
|
-
require('./raw-
|
|
5
|
-
require('./options-
|
|
6
|
-
const require_src = require('./src-
|
|
2
|
+
require('./core-Bcy1Ov-P.cjs');
|
|
3
|
+
require('./raw-CWSp77B1.cjs');
|
|
4
|
+
require('./options-BejTnOdM.cjs');
|
|
5
|
+
const require_src = require('./src-B6eLwniY.cjs');
|
|
7
6
|
|
|
8
7
|
//#region src/rolldown.ts
|
|
9
8
|
var rolldown_default = require_src.src_default.rolldown;
|
|
10
9
|
|
|
11
10
|
//#endregion
|
|
12
|
-
exports.default = rolldown_default
|
|
11
|
+
exports.default = rolldown_default;
|
package/dist/rolldown.d.cts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Options } from "./options
|
|
1
|
+
import { Options } from "./options-BxlJkUDe.cjs";
|
|
2
|
+
import * as unplugin13 from "unplugin";
|
|
2
3
|
|
|
3
4
|
//#region src/rolldown.d.ts
|
|
4
|
-
declare const _default: (options?: Options | undefined) => any;
|
|
5
|
+
declare const _default: (options?: Options | undefined) => unplugin13.RolldownPlugin<any> | unplugin13.RolldownPlugin<any>[];
|
|
5
6
|
|
|
6
7
|
//#endregion
|
|
7
8
|
export { _default as default };
|
package/dist/rolldown.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Options } from "./options
|
|
1
|
+
import { Options } from "./options-QKLCzlvG.js";
|
|
2
|
+
import * as unplugin4 from "unplugin";
|
|
2
3
|
|
|
3
4
|
//#region src/rolldown.d.ts
|
|
4
|
-
declare const _default: (options?: Options | undefined) => any;
|
|
5
|
+
declare const _default: (options?: Options | undefined) => unplugin4.RolldownPlugin<any> | unplugin4.RolldownPlugin<any>[];
|
|
5
6
|
|
|
6
7
|
//#endregion
|
|
7
8
|
export { _default as default };
|
package/dist/rolldown.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./core-
|
|
2
|
-
import "./raw-
|
|
1
|
+
import "./core-CVDOxdBq.js";
|
|
2
|
+
import "./raw-BYuezyBg.js";
|
|
3
3
|
import "./options-BWRkHmm5.js";
|
|
4
|
-
import { src_default } from "./src-
|
|
4
|
+
import { src_default } from "./src-CLt7j2eU.js";
|
|
5
5
|
|
|
6
6
|
//#region src/rolldown.ts
|
|
7
7
|
var rolldown_default = src_default.rolldown;
|
package/dist/rollup.cjs
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3
|
-
require('./core-
|
|
4
|
-
require('./raw-
|
|
5
|
-
require('./options-
|
|
6
|
-
const require_src = require('./src-
|
|
2
|
+
require('./core-Bcy1Ov-P.cjs');
|
|
3
|
+
require('./raw-CWSp77B1.cjs');
|
|
4
|
+
require('./options-BejTnOdM.cjs');
|
|
5
|
+
const require_src = require('./src-B6eLwniY.cjs');
|
|
7
6
|
|
|
8
7
|
//#region src/rollup.ts
|
|
9
8
|
var rollup_default = require_src.src_default.rollup;
|
|
10
9
|
|
|
11
10
|
//#endregion
|
|
12
|
-
exports.default = rollup_default
|
|
11
|
+
exports.default = rollup_default;
|
package/dist/rollup.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Options } from "./options
|
|
2
|
-
import
|
|
1
|
+
import { Options } from "./options-BxlJkUDe.cjs";
|
|
2
|
+
import * as rollup7 from "rollup";
|
|
3
3
|
|
|
4
4
|
//#region src/rollup.d.ts
|
|
5
|
-
declare const _default: (options?: Options | undefined) => Plugin<any> | Plugin<any>[];
|
|
5
|
+
declare const _default: (options?: Options | undefined) => rollup7.Plugin<any> | rollup7.Plugin<any>[];
|
|
6
6
|
|
|
7
7
|
//#endregion
|
|
8
8
|
export { _default as default };
|
package/dist/rollup.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Options } from "./options
|
|
2
|
-
import
|
|
1
|
+
import { Options } from "./options-QKLCzlvG.js";
|
|
2
|
+
import * as rollup7 from "rollup";
|
|
3
3
|
|
|
4
4
|
//#region src/rollup.d.ts
|
|
5
|
-
declare const _default: (options?: Options | undefined) => Plugin<any> | Plugin<any>[];
|
|
5
|
+
declare const _default: (options?: Options | undefined) => rollup7.Plugin<any> | rollup7.Plugin<any>[];
|
|
6
6
|
|
|
7
7
|
//#endregion
|
|
8
8
|
export { _default as default };
|
package/dist/rollup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./core-
|
|
2
|
-
import "./raw-
|
|
1
|
+
import "./core-CVDOxdBq.js";
|
|
2
|
+
import "./raw-BYuezyBg.js";
|
|
3
3
|
import "./options-BWRkHmm5.js";
|
|
4
|
-
import { src_default } from "./src-
|
|
4
|
+
import { src_default } from "./src-CLt7j2eU.js";
|
|
5
5
|
|
|
6
6
|
//#region src/rollup.ts
|
|
7
7
|
var rollup_default = src_default.rollup;
|
package/dist/rspack.cjs
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3
|
-
require('./core-
|
|
4
|
-
require('./raw-
|
|
5
|
-
require('./options-
|
|
6
|
-
const require_src = require('./src-
|
|
2
|
+
require('./core-Bcy1Ov-P.cjs');
|
|
3
|
+
require('./raw-CWSp77B1.cjs');
|
|
4
|
+
require('./options-BejTnOdM.cjs');
|
|
5
|
+
const require_src = require('./src-B6eLwniY.cjs');
|
|
7
6
|
|
|
8
7
|
//#region src/rspack.ts
|
|
9
8
|
var rspack_default = require_src.src_default.rspack;
|
|
10
9
|
|
|
11
10
|
//#endregion
|
|
12
|
-
exports.default = rspack_default
|
|
11
|
+
exports.default = rspack_default;
|
package/dist/rspack.d.cts
CHANGED
package/dist/rspack.d.ts
CHANGED
package/dist/rspack.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./core-
|
|
2
|
-
import "./raw-
|
|
1
|
+
import "./core-CVDOxdBq.js";
|
|
2
|
+
import "./raw-BYuezyBg.js";
|
|
3
3
|
import "./options-BWRkHmm5.js";
|
|
4
|
-
import { src_default } from "./src-
|
|
4
|
+
import { src_default } from "./src-CLt7j2eU.js";
|
|
5
5
|
|
|
6
6
|
//#region src/rspack.ts
|
|
7
7
|
var rspack_default = src_default.rspack;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
const
|
|
3
|
-
const require_raw = require('./raw-BXpT71mV.cjs');
|
|
1
|
+
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
+
const require_raw = require('./raw-CWSp77B1.cjs');
|
|
4
3
|
const unplugin = require_chunk.__toESM(require("unplugin"));
|
|
5
4
|
|
|
6
5
|
//#region src/index.ts
|
package/dist/vite.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
require('./core-
|
|
3
|
-
require('./raw-
|
|
4
|
-
require('./options-
|
|
5
|
-
require('./src-
|
|
6
|
-
const require_vite = require('./vite-
|
|
2
|
+
require('./core-Bcy1Ov-P.cjs');
|
|
3
|
+
require('./raw-CWSp77B1.cjs');
|
|
4
|
+
require('./options-BejTnOdM.cjs');
|
|
5
|
+
require('./src-B6eLwniY.cjs');
|
|
6
|
+
const require_vite = require('./vite-TO-g3dBi.cjs');
|
|
7
7
|
|
|
8
|
-
exports.default = require_vite.vite_default
|
|
8
|
+
exports.default = require_vite.vite_default;
|
package/dist/vite.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Options } from "./options
|
|
2
|
-
import
|
|
1
|
+
import { Options } from "./options-BxlJkUDe.cjs";
|
|
2
|
+
import * as vite4 from "vite";
|
|
3
3
|
|
|
4
4
|
//#region src/vite.d.ts
|
|
5
|
-
declare const _default: (options?: Options | undefined) => Plugin<any> | Plugin<any>[];
|
|
5
|
+
declare const _default: (options?: Options | undefined) => vite4.Plugin<any> | vite4.Plugin<any>[];
|
|
6
6
|
|
|
7
7
|
//#endregion
|
|
8
8
|
export { _default as default };
|
package/dist/vite.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Options } from "./options
|
|
2
|
-
import
|
|
1
|
+
import { Options } from "./options-QKLCzlvG.js";
|
|
2
|
+
import * as vite11 from "vite";
|
|
3
3
|
|
|
4
4
|
//#region src/vite.d.ts
|
|
5
|
-
declare const _default: (options?: Options | undefined) => Plugin<any> | Plugin<any>[];
|
|
5
|
+
declare const _default: (options?: Options | undefined) => vite11.Plugin<any> | vite11.Plugin<any>[];
|
|
6
6
|
|
|
7
7
|
//#endregion
|
|
8
8
|
export { _default as default };
|
package/dist/vite.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./core-
|
|
2
|
-
import "./raw-
|
|
1
|
+
import "./core-CVDOxdBq.js";
|
|
2
|
+
import "./raw-BYuezyBg.js";
|
|
3
3
|
import "./options-BWRkHmm5.js";
|
|
4
|
-
import "./src-
|
|
5
|
-
import { vite_default } from "./vite-
|
|
4
|
+
import "./src-CLt7j2eU.js";
|
|
5
|
+
import { vite_default } from "./vite-YbByXTNo.js";
|
|
6
6
|
|
|
7
7
|
export { vite_default as default };
|
package/dist/volar.cjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3
|
-
const require_chunk = require('./chunk-
|
|
4
|
-
const require_options = require('./options-
|
|
2
|
+
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
3
|
+
const require_options = require('./options-BejTnOdM.cjs');
|
|
5
4
|
const __vue_macros_common = require_chunk.__toESM(require("@vue-macros/common"));
|
|
6
5
|
const ts_macro = require_chunk.__toESM(require("ts-macro"));
|
|
7
6
|
|
|
@@ -27,9 +26,34 @@ function transformDefineComponent(node, parent, options) {
|
|
|
27
26
|
//#region src/volar/define-style.ts
|
|
28
27
|
function transformDefineStyle({ expression, isCssModules }, index, options) {
|
|
29
28
|
const { ts, codes, ast } = options;
|
|
30
|
-
if (isCssModules && expression?.arguments[0] && !expression.typeArguments && ts.isTemplateLiteral(expression.arguments[0])) (0, ts_macro.replaceRange)(codes, expression.arguments.pos - 1, expression.arguments.pos - 1, `<{`, ...parseCssClassNames(expression.arguments[0].getText(ast).slice(1, -1)).
|
|
29
|
+
if (isCssModules && expression?.arguments[0] && !expression.typeArguments && ts.isTemplateLiteral(expression.arguments[0])) (0, ts_macro.replaceRange)(codes, expression.arguments.pos - 1, expression.arguments.pos - 1, `<{`, ...parseCssClassNames(expression.arguments[0].getText(ast).slice(1, -1)).flatMap(({ text, offset }) => [
|
|
30
|
+
`\n`,
|
|
31
|
+
[
|
|
32
|
+
`'${text.slice(1)}'`,
|
|
33
|
+
`style_${index}`,
|
|
34
|
+
expression.arguments.pos + offset + 1,
|
|
35
|
+
{ navigation: true }
|
|
36
|
+
],
|
|
37
|
+
`: string`
|
|
38
|
+
]), "\n}>");
|
|
31
39
|
addEmbeddedCode(expression, index, options);
|
|
32
40
|
}
|
|
41
|
+
const commentReg = /(?<=\/\*)[\s\S]*?(?=\*\/)|(?<=\/\/)[\s\S]*?(?=\n)/g;
|
|
42
|
+
const cssClassNameReg = /(?=(\.[a-z_][-\w]*)[\s.,+~>:#)[{])/gi;
|
|
43
|
+
const fragmentReg = /(?<=\{)[^{]*(?=(?<!\\);)/g;
|
|
44
|
+
function parseCssClassNames(css) {
|
|
45
|
+
for (const reg of [commentReg, fragmentReg]) css = css.replace(reg, (match) => " ".repeat(match.length));
|
|
46
|
+
const matches = css.matchAll(cssClassNameReg);
|
|
47
|
+
const result = [];
|
|
48
|
+
for (const match of matches) {
|
|
49
|
+
const matchText = match[1];
|
|
50
|
+
if (matchText) result.push({
|
|
51
|
+
offset: match.index,
|
|
52
|
+
text: matchText
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
return result;
|
|
56
|
+
}
|
|
33
57
|
function addEmbeddedCode(expression, index, options) {
|
|
34
58
|
const { ts, ast } = options;
|
|
35
59
|
const languageId = ts.isPropertyAccessExpression(expression.expression) && ts.isIdentifier(expression.expression.name) ? expression.expression.name.text : "css";
|
|
@@ -47,34 +71,11 @@ function addEmbeddedCode(expression, index, options) {
|
|
|
47
71
|
sourceOffsets: [style.getStart(ast) + 1],
|
|
48
72
|
generatedOffsets: [0],
|
|
49
73
|
lengths: [styleText.length],
|
|
50
|
-
data:
|
|
51
|
-
completion: true,
|
|
52
|
-
format: true,
|
|
53
|
-
navigation: true,
|
|
54
|
-
semantic: true,
|
|
55
|
-
structure: true,
|
|
56
|
-
verification: true
|
|
57
|
-
}
|
|
74
|
+
data: ts_macro.allCodeFeatures
|
|
58
75
|
}],
|
|
59
76
|
embeddedCodes: []
|
|
60
77
|
});
|
|
61
78
|
}
|
|
62
|
-
const commentReg = /(?<=\/\*)[\s\S]*?(?=\*\/)|(?<=\/\/)[\s\S]*?(?=\n)/g;
|
|
63
|
-
const cssClassNameReg = /(?=(\.[a-z_][-\w]*)[\s.,+~>:#)[{])/gi;
|
|
64
|
-
const fragmentReg = /(?<=\{)[^{]*(?=(?<!\\);)/g;
|
|
65
|
-
function parseCssClassNames(css) {
|
|
66
|
-
for (const reg of [commentReg, fragmentReg]) css = css.replace(reg, (match) => " ".repeat(match.length));
|
|
67
|
-
const matches = css.matchAll(cssClassNameReg);
|
|
68
|
-
const result = [];
|
|
69
|
-
for (const match of matches) {
|
|
70
|
-
const matchText = match[1];
|
|
71
|
-
if (matchText) result.push({
|
|
72
|
-
offset: match.index,
|
|
73
|
-
text: matchText
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
return result;
|
|
77
|
-
}
|
|
78
79
|
|
|
79
80
|
//#endregion
|
|
80
81
|
//#region src/volar/transform.ts
|
|
@@ -262,4 +263,4 @@ const plugin = (0, ts_macro.createPlugin)(({ ts }, userOptions = {}) => {
|
|
|
262
263
|
var volar_default = plugin;
|
|
263
264
|
|
|
264
265
|
//#endregion
|
|
265
|
-
exports.default = volar_default
|
|
266
|
+
exports.default = volar_default;
|
package/dist/volar.d.cts
CHANGED
package/dist/volar.d.ts
CHANGED
package/dist/volar.js
CHANGED
|
@@ -24,9 +24,34 @@ function transformDefineComponent(node, parent, options) {
|
|
|
24
24
|
//#region src/volar/define-style.ts
|
|
25
25
|
function transformDefineStyle({ expression, isCssModules }, index, options) {
|
|
26
26
|
const { ts, codes, ast } = options;
|
|
27
|
-
if (isCssModules && expression?.arguments[0] && !expression.typeArguments && ts.isTemplateLiteral(expression.arguments[0])) replaceRange(codes, expression.arguments.pos - 1, expression.arguments.pos - 1, `<{`, ...parseCssClassNames(expression.arguments[0].getText(ast).slice(1, -1)).
|
|
27
|
+
if (isCssModules && expression?.arguments[0] && !expression.typeArguments && ts.isTemplateLiteral(expression.arguments[0])) replaceRange(codes, expression.arguments.pos - 1, expression.arguments.pos - 1, `<{`, ...parseCssClassNames(expression.arguments[0].getText(ast).slice(1, -1)).flatMap(({ text, offset }) => [
|
|
28
|
+
`\n`,
|
|
29
|
+
[
|
|
30
|
+
`'${text.slice(1)}'`,
|
|
31
|
+
`style_${index}`,
|
|
32
|
+
expression.arguments.pos + offset + 1,
|
|
33
|
+
{ navigation: true }
|
|
34
|
+
],
|
|
35
|
+
`: string`
|
|
36
|
+
]), "\n}>");
|
|
28
37
|
addEmbeddedCode(expression, index, options);
|
|
29
38
|
}
|
|
39
|
+
const commentReg = /(?<=\/\*)[\s\S]*?(?=\*\/)|(?<=\/\/)[\s\S]*?(?=\n)/g;
|
|
40
|
+
const cssClassNameReg = /(?=(\.[a-z_][-\w]*)[\s.,+~>:#)[{])/gi;
|
|
41
|
+
const fragmentReg = /(?<=\{)[^{]*(?=(?<!\\);)/g;
|
|
42
|
+
function parseCssClassNames(css) {
|
|
43
|
+
for (const reg of [commentReg, fragmentReg]) css = css.replace(reg, (match) => " ".repeat(match.length));
|
|
44
|
+
const matches = css.matchAll(cssClassNameReg);
|
|
45
|
+
const result = [];
|
|
46
|
+
for (const match of matches) {
|
|
47
|
+
const matchText = match[1];
|
|
48
|
+
if (matchText) result.push({
|
|
49
|
+
offset: match.index,
|
|
50
|
+
text: matchText
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
return result;
|
|
54
|
+
}
|
|
30
55
|
function addEmbeddedCode(expression, index, options) {
|
|
31
56
|
const { ts, ast } = options;
|
|
32
57
|
const languageId = ts.isPropertyAccessExpression(expression.expression) && ts.isIdentifier(expression.expression.name) ? expression.expression.name.text : "css";
|
|
@@ -44,34 +69,11 @@ function addEmbeddedCode(expression, index, options) {
|
|
|
44
69
|
sourceOffsets: [style.getStart(ast) + 1],
|
|
45
70
|
generatedOffsets: [0],
|
|
46
71
|
lengths: [styleText.length],
|
|
47
|
-
data:
|
|
48
|
-
completion: true,
|
|
49
|
-
format: true,
|
|
50
|
-
navigation: true,
|
|
51
|
-
semantic: true,
|
|
52
|
-
structure: true,
|
|
53
|
-
verification: true
|
|
54
|
-
}
|
|
72
|
+
data: allCodeFeatures
|
|
55
73
|
}],
|
|
56
74
|
embeddedCodes: []
|
|
57
75
|
});
|
|
58
76
|
}
|
|
59
|
-
const commentReg = /(?<=\/\*)[\s\S]*?(?=\*\/)|(?<=\/\/)[\s\S]*?(?=\n)/g;
|
|
60
|
-
const cssClassNameReg = /(?=(\.[a-z_][-\w]*)[\s.,+~>:#)[{])/gi;
|
|
61
|
-
const fragmentReg = /(?<=\{)[^{]*(?=(?<!\\);)/g;
|
|
62
|
-
function parseCssClassNames(css) {
|
|
63
|
-
for (const reg of [commentReg, fragmentReg]) css = css.replace(reg, (match) => " ".repeat(match.length));
|
|
64
|
-
const matches = css.matchAll(cssClassNameReg);
|
|
65
|
-
const result = [];
|
|
66
|
-
for (const match of matches) {
|
|
67
|
-
const matchText = match[1];
|
|
68
|
-
if (matchText) result.push({
|
|
69
|
-
offset: match.index,
|
|
70
|
-
text: matchText
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
return result;
|
|
74
|
-
}
|
|
75
77
|
|
|
76
78
|
//#endregion
|
|
77
79
|
//#region src/volar/transform.ts
|
package/dist/webpack.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
require('./core-
|
|
3
|
-
require('./raw-
|
|
4
|
-
require('./options-
|
|
5
|
-
require('./src-
|
|
6
|
-
const require_webpack = require('./webpack-
|
|
2
|
+
require('./core-Bcy1Ov-P.cjs');
|
|
3
|
+
require('./raw-CWSp77B1.cjs');
|
|
4
|
+
require('./options-BejTnOdM.cjs');
|
|
5
|
+
require('./src-B6eLwniY.cjs');
|
|
6
|
+
const require_webpack = require('./webpack-DoPd9jaB.cjs');
|
|
7
7
|
|
|
8
|
-
exports.default = require_webpack.webpack_default
|
|
8
|
+
exports.default = require_webpack.webpack_default;
|
package/dist/webpack.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Options } from "./options
|
|
2
|
-
import
|
|
1
|
+
import { Options } from "./options-BxlJkUDe.cjs";
|
|
2
|
+
import * as webpack10 from "webpack";
|
|
3
3
|
|
|
4
4
|
//#region src/webpack.d.ts
|
|
5
|
-
declare const _default: (options?: Options | undefined) => WebpackPluginInstance;
|
|
5
|
+
declare const _default: (options?: Options | undefined) => webpack10.WebpackPluginInstance;
|
|
6
6
|
|
|
7
7
|
//#endregion
|
|
8
8
|
export { _default as default };
|
package/dist/webpack.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Options } from "./options
|
|
2
|
-
import
|
|
1
|
+
import { Options } from "./options-QKLCzlvG.js";
|
|
2
|
+
import * as webpack14 from "webpack";
|
|
3
3
|
|
|
4
4
|
//#region src/webpack.d.ts
|
|
5
|
-
declare const _default: (options?: Options | undefined) => WebpackPluginInstance;
|
|
5
|
+
declare const _default: (options?: Options | undefined) => webpack14.WebpackPluginInstance;
|
|
6
6
|
|
|
7
7
|
//#endregion
|
|
8
8
|
export { _default as default };
|
package/dist/webpack.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./core-
|
|
2
|
-
import "./raw-
|
|
1
|
+
import "./core-CVDOxdBq.js";
|
|
2
|
+
import "./raw-BYuezyBg.js";
|
|
3
3
|
import "./options-BWRkHmm5.js";
|
|
4
|
-
import "./src-
|
|
5
|
-
import { webpack_default } from "./webpack-
|
|
4
|
+
import "./src-CLt7j2eU.js";
|
|
5
|
+
import { webpack_default } from "./webpack-BtB3goNy.js";
|
|
6
6
|
|
|
7
7
|
export { webpack_default as default };
|