vue-jsx-vapor 2.1.6 → 2.1.7
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 +2 -2
- package/dist/api.js +1 -1
- package/dist/astro.cjs +4 -4
- package/dist/astro.js +3 -3
- package/dist/{chunk-L5DPFMXV.cjs → chunk-4FRXY2W6.cjs} +2 -2
- package/dist/{chunk-KX2A7OHI.cjs → chunk-CVVA3UFV.cjs} +2 -2
- package/dist/{chunk-ODAQLE75.js → chunk-E4OOBQM6.js} +1 -1
- package/dist/{chunk-KQYI25OX.js → chunk-G5FQVEHY.js} +1 -1
- package/dist/chunk-GY27NIU6.cjs +134 -0
- package/dist/{chunk-54T6FZV5.cjs → chunk-JOQ6HUZ7.cjs} +2 -2
- package/dist/chunk-K7YI4ZKB.js +134 -0
- package/dist/{chunk-RE7HJXVF.js → chunk-MBCYFLIE.js} +1 -1
- package/dist/{chunk-LJD2GXFT.cjs → chunk-WAOMEMCZ.cjs} +2 -2
- package/dist/{chunk-64YD56NL.js → chunk-WKWVDEIZ.js} +1 -1
- package/dist/esbuild.cjs +4 -4
- package/dist/esbuild.js +3 -3
- package/dist/nuxt.cjs +7 -7
- package/dist/nuxt.js +5 -5
- package/dist/raw.cjs +3 -3
- package/dist/raw.js +2 -2
- package/dist/rolldown.cjs +4 -4
- package/dist/rolldown.js +3 -3
- package/dist/rollup.cjs +4 -4
- package/dist/rollup.js +3 -3
- package/dist/rspack.cjs +4 -4
- package/dist/rspack.js +3 -3
- package/dist/unplugin.cjs +4 -4
- package/dist/unplugin.js +3 -3
- package/dist/vite.cjs +5 -5
- package/dist/vite.js +4 -4
- package/dist/webpack.cjs +5 -5
- package/dist/webpack.js +4 -4
- package/package.json +8 -6
- package/dist/chunk-RGJB4EQM.js +0 -26
- package/dist/chunk-VTXOK4UC.cjs +0 -26
package/dist/api.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkGY27NIU6cjs = require('./chunk-GY27NIU6.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
exports.transformVueJsxVapor =
|
|
6
|
+
exports.transformVueJsxVapor = _chunkGY27NIU6cjs.transformVueJsxVapor;
|
package/dist/api.js
CHANGED
package/dist/astro.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkJOQ6HUZ7cjs = require('./chunk-JOQ6HUZ7.cjs');
|
|
4
4
|
require('./chunk-GODVM7NB.cjs');
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
5
|
+
require('./chunk-CVVA3UFV.cjs');
|
|
6
|
+
require('./chunk-GY27NIU6.cjs');
|
|
7
7
|
|
|
8
8
|
// src/astro.ts
|
|
9
9
|
var astro_default = (options) => ({
|
|
@@ -11,7 +11,7 @@ var astro_default = (options) => ({
|
|
|
11
11
|
hooks: {
|
|
12
12
|
"astro:config:setup": (astro) => {
|
|
13
13
|
astro.config.vite.plugins ||= [];
|
|
14
|
-
astro.config.vite.plugins.push(
|
|
14
|
+
astro.config.vite.plugins.push(_chunkJOQ6HUZ7cjs.unplugin_default.vite(options));
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
});
|
package/dist/astro.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
unplugin_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-G5FQVEHY.js";
|
|
4
4
|
import "./chunk-JNAGPWSX.js";
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-MBCYFLIE.js";
|
|
6
|
+
import "./chunk-K7YI4ZKB.js";
|
|
7
7
|
|
|
8
8
|
// src/astro.ts
|
|
9
9
|
var astro_default = (options) => ({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkJOQ6HUZ7cjs = require('./chunk-JOQ6HUZ7.cjs');
|
|
4
4
|
|
|
5
5
|
// src/vite.ts
|
|
6
|
-
var vite_default =
|
|
6
|
+
var vite_default = _chunkJOQ6HUZ7cjs.unplugin_default.vite;
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkGY27NIU6cjs = require('./chunk-GY27NIU6.cjs');
|
|
4
4
|
|
|
5
5
|
// src/raw.ts
|
|
6
6
|
var _raw = require('@vue-jsx-vapor/macros/raw'); var _raw2 = _interopRequireDefault(_raw);
|
|
@@ -45,7 +45,7 @@ var plugin = (options = {}) => {
|
|
|
45
45
|
},
|
|
46
46
|
transformInclude,
|
|
47
47
|
transform(code, id) {
|
|
48
|
-
return
|
|
48
|
+
return _chunkGY27NIU6cjs.transformVueJsxVapor.call(void 0, code, id, options);
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
...options.macros === false ? [] : options.macros ? [_raw2.default.call(void 0, options.macros === true ? void 0 : options.macros)] : []
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/core/index.ts
|
|
2
|
+
var _core = require('@babel/core');
|
|
3
|
+
var _plugintransformtypescript = require('@babel/plugin-transform-typescript'); var _plugintransformtypescript2 = _interopRequireDefault(_plugintransformtypescript);
|
|
4
|
+
var _babel = require('@vue-jsx-vapor/babel'); var _babel2 = _interopRequireDefault(_babel);
|
|
5
|
+
|
|
6
|
+
// src/core/hmr.ts
|
|
7
|
+
var _api = require('@vue-jsx-vapor/macros/api');
|
|
8
|
+
var _hashsum = require('hash-sum'); var _hashsum2 = _interopRequireDefault(_hashsum);
|
|
9
|
+
function registerHMR(result, id, defineComponentNames = ["defineComponent", "defineVaporComponent"]) {
|
|
10
|
+
const { ast } = result;
|
|
11
|
+
const declaredComponents = [];
|
|
12
|
+
const hotComponents = [];
|
|
13
|
+
let hasDefaultExport = false;
|
|
14
|
+
const ssr = false;
|
|
15
|
+
for (const node of ast.program.body) {
|
|
16
|
+
if (node.type === "VariableDeclaration") {
|
|
17
|
+
const names = parseComponentDecls(node, defineComponentNames);
|
|
18
|
+
if (names.length) {
|
|
19
|
+
declaredComponents.push(...names);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
if (node.type === "ExportNamedDeclaration") {
|
|
23
|
+
if (node.declaration && node.declaration.type === "VariableDeclaration") {
|
|
24
|
+
hotComponents.push(
|
|
25
|
+
...parseComponentDecls(node.declaration, defineComponentNames).map(
|
|
26
|
+
(name) => ({
|
|
27
|
+
local: name,
|
|
28
|
+
exported: name,
|
|
29
|
+
id: _hashsum2.default.call(void 0, id + name)
|
|
30
|
+
})
|
|
31
|
+
)
|
|
32
|
+
);
|
|
33
|
+
} else if (node.specifiers.length) {
|
|
34
|
+
for (const spec of node.specifiers) {
|
|
35
|
+
if (spec.type === "ExportSpecifier" && spec.exported.type === "Identifier") {
|
|
36
|
+
const matched = declaredComponents.find(
|
|
37
|
+
(name) => name === spec.local.name
|
|
38
|
+
);
|
|
39
|
+
if (matched) {
|
|
40
|
+
hotComponents.push({
|
|
41
|
+
local: spec.local.name,
|
|
42
|
+
exported: spec.exported.name,
|
|
43
|
+
id: _hashsum2.default.call(void 0, id + spec.exported.name)
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
if (node.type === "ExportDefaultDeclaration") {
|
|
51
|
+
if (node.declaration.type === "Identifier") {
|
|
52
|
+
const _name = node.declaration.name;
|
|
53
|
+
const matched = declaredComponents.find((name) => name === _name);
|
|
54
|
+
if (matched) {
|
|
55
|
+
hotComponents.push({
|
|
56
|
+
local: _name,
|
|
57
|
+
exported: "default",
|
|
58
|
+
id: _hashsum2.default.call(void 0, `${id}default`)
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
} else if (isDefineComponentCall(node.declaration, defineComponentNames) || _api.isFunctionalNode.call(void 0, node.declaration)) {
|
|
62
|
+
hasDefaultExport = true;
|
|
63
|
+
hotComponents.push({
|
|
64
|
+
local: "__default__",
|
|
65
|
+
exported: "default",
|
|
66
|
+
id: _hashsum2.default.call(void 0, `${id}default`)
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
if (hotComponents.length) {
|
|
72
|
+
if (hasDefaultExport || ssr) {
|
|
73
|
+
result.code = `${result.code.replaceAll(
|
|
74
|
+
`export default `,
|
|
75
|
+
`const __default__ = `
|
|
76
|
+
)}
|
|
77
|
+
export default __default__`;
|
|
78
|
+
}
|
|
79
|
+
if (!ssr && !/\?vue&type=script/.test(id)) {
|
|
80
|
+
let code = result.code;
|
|
81
|
+
let callbackCode = ``;
|
|
82
|
+
for (const { local, exported, id: id2 } of hotComponents) {
|
|
83
|
+
code += `
|
|
84
|
+
${local}.__hmrId = "${id2}"
|
|
85
|
+
__VUE_HMR_RUNTIME__.createRecord("${id2}", ${local})`;
|
|
86
|
+
callbackCode += `
|
|
87
|
+
__VUE_HMR_RUNTIME__.rerender(mod['${exported}'].__hmrId, mod['${exported}'].setup || mod['${exported}'])`;
|
|
88
|
+
}
|
|
89
|
+
code += `
|
|
90
|
+
if (import.meta.hot) {
|
|
91
|
+
import.meta.hot.accept((mod) => {${callbackCode}
|
|
92
|
+
})
|
|
93
|
+
}`;
|
|
94
|
+
result.code = code;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
function parseComponentDecls(node, fnNames) {
|
|
99
|
+
const names = [];
|
|
100
|
+
for (const decl of node.declarations) {
|
|
101
|
+
if (decl.id.type === "Identifier" && (isDefineComponentCall(decl.init, fnNames) || _api.isFunctionalNode.call(void 0, decl.init)))
|
|
102
|
+
names.push(decl.id.name);
|
|
103
|
+
}
|
|
104
|
+
return names;
|
|
105
|
+
}
|
|
106
|
+
function isDefineComponentCall(node, names) {
|
|
107
|
+
return !!(node && node.type === "CallExpression" && node.callee.type === "Identifier" && names.includes(node.callee.name));
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// src/core/index.ts
|
|
111
|
+
function transformVueJsxVapor(code, id, options) {
|
|
112
|
+
const result = _core.transformSync.call(void 0, code, {
|
|
113
|
+
plugins: [
|
|
114
|
+
[_babel2.default, { compile: _optionalChain([options, 'optionalAccess', _ => _.compile]), interop: _optionalChain([options, 'optionalAccess', _2 => _2.interop]) }],
|
|
115
|
+
id.endsWith(".tsx") ? [_plugintransformtypescript2.default, { isTSX: true, allowExtensions: true }] : null
|
|
116
|
+
].filter((i) => i !== null),
|
|
117
|
+
filename: id,
|
|
118
|
+
sourceMaps: true,
|
|
119
|
+
sourceFileName: id,
|
|
120
|
+
babelrc: false,
|
|
121
|
+
configFile: false,
|
|
122
|
+
ast: true
|
|
123
|
+
});
|
|
124
|
+
if (result) registerHMR(result, id);
|
|
125
|
+
if (_optionalChain([result, 'optionalAccess', _3 => _3.code]))
|
|
126
|
+
return {
|
|
127
|
+
code: result.code,
|
|
128
|
+
map: result.map
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
exports.transformVueJsxVapor = transformVueJsxVapor;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkCVVA3UFVcjs = require('./chunk-CVVA3UFV.cjs');
|
|
4
4
|
|
|
5
5
|
// src/unplugin.ts
|
|
6
6
|
var _unplugin = require('unplugin');
|
|
7
7
|
var _vite = require('vite');
|
|
8
8
|
var unpluginFactory = (options = {}) => {
|
|
9
9
|
return [
|
|
10
|
-
...
|
|
10
|
+
..._chunkCVVA3UFVcjs.raw_default.call(void 0, options),
|
|
11
11
|
options.interop ? { name: "interop" } : {
|
|
12
12
|
name: "unplugin-esbuild",
|
|
13
13
|
transformInclude: _vite.createFilter.call(void 0,
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
// src/core/index.ts
|
|
2
|
+
import { transformSync } from "@babel/core";
|
|
3
|
+
import babelTypescript from "@babel/plugin-transform-typescript";
|
|
4
|
+
import jsx from "@vue-jsx-vapor/babel";
|
|
5
|
+
|
|
6
|
+
// src/core/hmr.ts
|
|
7
|
+
import { isFunctionalNode } from "@vue-jsx-vapor/macros/api";
|
|
8
|
+
import getHash from "hash-sum";
|
|
9
|
+
function registerHMR(result, id, defineComponentNames = ["defineComponent", "defineVaporComponent"]) {
|
|
10
|
+
const { ast } = result;
|
|
11
|
+
const declaredComponents = [];
|
|
12
|
+
const hotComponents = [];
|
|
13
|
+
let hasDefaultExport = false;
|
|
14
|
+
const ssr = false;
|
|
15
|
+
for (const node of ast.program.body) {
|
|
16
|
+
if (node.type === "VariableDeclaration") {
|
|
17
|
+
const names = parseComponentDecls(node, defineComponentNames);
|
|
18
|
+
if (names.length) {
|
|
19
|
+
declaredComponents.push(...names);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
if (node.type === "ExportNamedDeclaration") {
|
|
23
|
+
if (node.declaration && node.declaration.type === "VariableDeclaration") {
|
|
24
|
+
hotComponents.push(
|
|
25
|
+
...parseComponentDecls(node.declaration, defineComponentNames).map(
|
|
26
|
+
(name) => ({
|
|
27
|
+
local: name,
|
|
28
|
+
exported: name,
|
|
29
|
+
id: getHash(id + name)
|
|
30
|
+
})
|
|
31
|
+
)
|
|
32
|
+
);
|
|
33
|
+
} else if (node.specifiers.length) {
|
|
34
|
+
for (const spec of node.specifiers) {
|
|
35
|
+
if (spec.type === "ExportSpecifier" && spec.exported.type === "Identifier") {
|
|
36
|
+
const matched = declaredComponents.find(
|
|
37
|
+
(name) => name === spec.local.name
|
|
38
|
+
);
|
|
39
|
+
if (matched) {
|
|
40
|
+
hotComponents.push({
|
|
41
|
+
local: spec.local.name,
|
|
42
|
+
exported: spec.exported.name,
|
|
43
|
+
id: getHash(id + spec.exported.name)
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
if (node.type === "ExportDefaultDeclaration") {
|
|
51
|
+
if (node.declaration.type === "Identifier") {
|
|
52
|
+
const _name = node.declaration.name;
|
|
53
|
+
const matched = declaredComponents.find((name) => name === _name);
|
|
54
|
+
if (matched) {
|
|
55
|
+
hotComponents.push({
|
|
56
|
+
local: _name,
|
|
57
|
+
exported: "default",
|
|
58
|
+
id: getHash(`${id}default`)
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
} else if (isDefineComponentCall(node.declaration, defineComponentNames) || isFunctionalNode(node.declaration)) {
|
|
62
|
+
hasDefaultExport = true;
|
|
63
|
+
hotComponents.push({
|
|
64
|
+
local: "__default__",
|
|
65
|
+
exported: "default",
|
|
66
|
+
id: getHash(`${id}default`)
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
if (hotComponents.length) {
|
|
72
|
+
if (hasDefaultExport || ssr) {
|
|
73
|
+
result.code = `${result.code.replaceAll(
|
|
74
|
+
`export default `,
|
|
75
|
+
`const __default__ = `
|
|
76
|
+
)}
|
|
77
|
+
export default __default__`;
|
|
78
|
+
}
|
|
79
|
+
if (!ssr && !/\?vue&type=script/.test(id)) {
|
|
80
|
+
let code = result.code;
|
|
81
|
+
let callbackCode = ``;
|
|
82
|
+
for (const { local, exported, id: id2 } of hotComponents) {
|
|
83
|
+
code += `
|
|
84
|
+
${local}.__hmrId = "${id2}"
|
|
85
|
+
__VUE_HMR_RUNTIME__.createRecord("${id2}", ${local})`;
|
|
86
|
+
callbackCode += `
|
|
87
|
+
__VUE_HMR_RUNTIME__.rerender(mod['${exported}'].__hmrId, mod['${exported}'].setup || mod['${exported}'])`;
|
|
88
|
+
}
|
|
89
|
+
code += `
|
|
90
|
+
if (import.meta.hot) {
|
|
91
|
+
import.meta.hot.accept((mod) => {${callbackCode}
|
|
92
|
+
})
|
|
93
|
+
}`;
|
|
94
|
+
result.code = code;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
function parseComponentDecls(node, fnNames) {
|
|
99
|
+
const names = [];
|
|
100
|
+
for (const decl of node.declarations) {
|
|
101
|
+
if (decl.id.type === "Identifier" && (isDefineComponentCall(decl.init, fnNames) || isFunctionalNode(decl.init)))
|
|
102
|
+
names.push(decl.id.name);
|
|
103
|
+
}
|
|
104
|
+
return names;
|
|
105
|
+
}
|
|
106
|
+
function isDefineComponentCall(node, names) {
|
|
107
|
+
return !!(node && node.type === "CallExpression" && node.callee.type === "Identifier" && names.includes(node.callee.name));
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// src/core/index.ts
|
|
111
|
+
function transformVueJsxVapor(code, id, options) {
|
|
112
|
+
const result = transformSync(code, {
|
|
113
|
+
plugins: [
|
|
114
|
+
[jsx, { compile: options?.compile, interop: options?.interop }],
|
|
115
|
+
id.endsWith(".tsx") ? [babelTypescript, { isTSX: true, allowExtensions: true }] : null
|
|
116
|
+
].filter((i) => i !== null),
|
|
117
|
+
filename: id,
|
|
118
|
+
sourceMaps: true,
|
|
119
|
+
sourceFileName: id,
|
|
120
|
+
babelrc: false,
|
|
121
|
+
configFile: false,
|
|
122
|
+
ast: true
|
|
123
|
+
});
|
|
124
|
+
if (result) registerHMR(result, id);
|
|
125
|
+
if (result?.code)
|
|
126
|
+
return {
|
|
127
|
+
code: result.code,
|
|
128
|
+
map: result.map
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export {
|
|
133
|
+
transformVueJsxVapor
|
|
134
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkJOQ6HUZ7cjs = require('./chunk-JOQ6HUZ7.cjs');
|
|
4
4
|
|
|
5
5
|
// src/webpack.ts
|
|
6
|
-
var webpack_default =
|
|
6
|
+
var webpack_default = _chunkJOQ6HUZ7cjs.unplugin_default.webpack;
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
package/dist/esbuild.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkJOQ6HUZ7cjs = require('./chunk-JOQ6HUZ7.cjs');
|
|
4
4
|
require('./chunk-GODVM7NB.cjs');
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
5
|
+
require('./chunk-CVVA3UFV.cjs');
|
|
6
|
+
require('./chunk-GY27NIU6.cjs');
|
|
7
7
|
|
|
8
8
|
// src/esbuild.ts
|
|
9
|
-
var esbuild_default =
|
|
9
|
+
var esbuild_default = _chunkJOQ6HUZ7cjs.unplugin_default.esbuild;
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
exports.default = esbuild_default;
|
package/dist/esbuild.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
unplugin_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-G5FQVEHY.js";
|
|
4
4
|
import "./chunk-JNAGPWSX.js";
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-MBCYFLIE.js";
|
|
6
|
+
import "./chunk-K7YI4ZKB.js";
|
|
7
7
|
|
|
8
8
|
// src/esbuild.ts
|
|
9
9
|
var esbuild_default = unplugin_default.esbuild;
|
package/dist/nuxt.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk4FRXY2W6cjs = require('./chunk-4FRXY2W6.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
7
|
-
require('./chunk-
|
|
6
|
+
var _chunkWAOMEMCZcjs = require('./chunk-WAOMEMCZ.cjs');
|
|
7
|
+
require('./chunk-JOQ6HUZ7.cjs');
|
|
8
8
|
require('./chunk-GODVM7NB.cjs');
|
|
9
|
-
require('./chunk-
|
|
10
|
-
require('./chunk-
|
|
9
|
+
require('./chunk-CVVA3UFV.cjs');
|
|
10
|
+
require('./chunk-GY27NIU6.cjs');
|
|
11
11
|
|
|
12
12
|
// src/nuxt.ts
|
|
13
13
|
var _kit = require('@nuxt/kit');
|
|
@@ -18,8 +18,8 @@ var nuxt_default = _kit.defineNuxtModule.call(void 0, {
|
|
|
18
18
|
configKey: "unpluginStarter"
|
|
19
19
|
},
|
|
20
20
|
setup(options) {
|
|
21
|
-
_kit.addVitePlugin.call(void 0, () =>
|
|
22
|
-
_kit.addWebpackPlugin.call(void 0, () =>
|
|
21
|
+
_kit.addVitePlugin.call(void 0, () => _chunk4FRXY2W6cjs.vite_default.call(void 0, options));
|
|
22
|
+
_kit.addWebpackPlugin.call(void 0, () => _chunkWAOMEMCZcjs.webpack_default.call(void 0, options));
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
25
|
|
package/dist/nuxt.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
vite_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WKWVDEIZ.js";
|
|
4
4
|
import {
|
|
5
5
|
webpack_default
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-E4OOBQM6.js";
|
|
7
|
+
import "./chunk-G5FQVEHY.js";
|
|
8
8
|
import "./chunk-JNAGPWSX.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-MBCYFLIE.js";
|
|
10
|
+
import "./chunk-K7YI4ZKB.js";
|
|
11
11
|
|
|
12
12
|
// src/nuxt.ts
|
|
13
13
|
import { addVitePlugin, addWebpackPlugin, defineNuxtModule } from "@nuxt/kit";
|
package/dist/raw.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var _chunkCVVA3UFVcjs = require('./chunk-CVVA3UFV.cjs');
|
|
4
|
+
require('./chunk-GY27NIU6.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
exports.default =
|
|
7
|
+
exports.default = _chunkCVVA3UFVcjs.raw_default;
|
|
8
8
|
|
|
9
9
|
module.exports = exports.default;
|
package/dist/raw.js
CHANGED
package/dist/rolldown.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkJOQ6HUZ7cjs = require('./chunk-JOQ6HUZ7.cjs');
|
|
4
4
|
require('./chunk-GODVM7NB.cjs');
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
5
|
+
require('./chunk-CVVA3UFV.cjs');
|
|
6
|
+
require('./chunk-GY27NIU6.cjs');
|
|
7
7
|
|
|
8
8
|
// src/rolldown.ts
|
|
9
9
|
var _unplugin = require('unplugin');
|
|
10
|
-
var rolldown_default = _unplugin.createRollupPlugin.call(void 0,
|
|
10
|
+
var rolldown_default = _unplugin.createRollupPlugin.call(void 0, _chunkJOQ6HUZ7cjs.unpluginFactory);
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
exports.default = rolldown_default;
|
package/dist/rolldown.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
unpluginFactory
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-G5FQVEHY.js";
|
|
4
4
|
import "./chunk-JNAGPWSX.js";
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-MBCYFLIE.js";
|
|
6
|
+
import "./chunk-K7YI4ZKB.js";
|
|
7
7
|
|
|
8
8
|
// src/rolldown.ts
|
|
9
9
|
import { createRollupPlugin } from "unplugin";
|
package/dist/rollup.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkJOQ6HUZ7cjs = require('./chunk-JOQ6HUZ7.cjs');
|
|
4
4
|
require('./chunk-GODVM7NB.cjs');
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
5
|
+
require('./chunk-CVVA3UFV.cjs');
|
|
6
|
+
require('./chunk-GY27NIU6.cjs');
|
|
7
7
|
|
|
8
8
|
// src/rollup.ts
|
|
9
|
-
var rollup_default =
|
|
9
|
+
var rollup_default = _chunkJOQ6HUZ7cjs.unplugin_default.rollup;
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
exports.default = rollup_default;
|
package/dist/rollup.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
unplugin_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-G5FQVEHY.js";
|
|
4
4
|
import "./chunk-JNAGPWSX.js";
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-MBCYFLIE.js";
|
|
6
|
+
import "./chunk-K7YI4ZKB.js";
|
|
7
7
|
|
|
8
8
|
// src/rollup.ts
|
|
9
9
|
var rollup_default = unplugin_default.rollup;
|
package/dist/rspack.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkJOQ6HUZ7cjs = require('./chunk-JOQ6HUZ7.cjs');
|
|
4
4
|
require('./chunk-GODVM7NB.cjs');
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
5
|
+
require('./chunk-CVVA3UFV.cjs');
|
|
6
|
+
require('./chunk-GY27NIU6.cjs');
|
|
7
7
|
|
|
8
8
|
// src/rspack.ts
|
|
9
|
-
var rspack_default =
|
|
9
|
+
var rspack_default = _chunkJOQ6HUZ7cjs.unplugin_default.rspack;
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
exports.default = rspack_default;
|
package/dist/rspack.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
unplugin_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-G5FQVEHY.js";
|
|
4
4
|
import "./chunk-JNAGPWSX.js";
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-MBCYFLIE.js";
|
|
6
|
+
import "./chunk-K7YI4ZKB.js";
|
|
7
7
|
|
|
8
8
|
// src/rspack.ts
|
|
9
9
|
var rspack_default = unplugin_default.rspack;
|
package/dist/unplugin.cjs
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkJOQ6HUZ7cjs = require('./chunk-JOQ6HUZ7.cjs');
|
|
6
6
|
require('./chunk-GODVM7NB.cjs');
|
|
7
|
-
require('./chunk-
|
|
8
|
-
require('./chunk-
|
|
7
|
+
require('./chunk-CVVA3UFV.cjs');
|
|
8
|
+
require('./chunk-GY27NIU6.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
exports.default =
|
|
13
|
+
exports.default = _chunkJOQ6HUZ7cjs.unplugin_default; exports.unplugin = _chunkJOQ6HUZ7cjs.unplugin; exports.unpluginFactory = _chunkJOQ6HUZ7cjs.unpluginFactory;
|
package/dist/unplugin.js
CHANGED
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
unplugin,
|
|
3
3
|
unpluginFactory,
|
|
4
4
|
unplugin_default
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-G5FQVEHY.js";
|
|
6
6
|
import "./chunk-JNAGPWSX.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-MBCYFLIE.js";
|
|
8
|
+
import "./chunk-K7YI4ZKB.js";
|
|
9
9
|
export {
|
|
10
10
|
unplugin_default as default,
|
|
11
11
|
unplugin,
|
package/dist/vite.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var _chunk4FRXY2W6cjs = require('./chunk-4FRXY2W6.cjs');
|
|
4
|
+
require('./chunk-JOQ6HUZ7.cjs');
|
|
5
5
|
require('./chunk-GODVM7NB.cjs');
|
|
6
|
-
require('./chunk-
|
|
7
|
-
require('./chunk-
|
|
6
|
+
require('./chunk-CVVA3UFV.cjs');
|
|
7
|
+
require('./chunk-GY27NIU6.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.default =
|
|
10
|
+
exports.default = _chunk4FRXY2W6cjs.vite_default;
|
|
11
11
|
|
|
12
12
|
module.exports = exports.default;
|
package/dist/vite.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
vite_default
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-WKWVDEIZ.js";
|
|
4
|
+
import "./chunk-G5FQVEHY.js";
|
|
5
5
|
import "./chunk-JNAGPWSX.js";
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-MBCYFLIE.js";
|
|
7
|
+
import "./chunk-K7YI4ZKB.js";
|
|
8
8
|
export {
|
|
9
9
|
vite_default as default
|
|
10
10
|
};
|
package/dist/webpack.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var _chunkWAOMEMCZcjs = require('./chunk-WAOMEMCZ.cjs');
|
|
4
|
+
require('./chunk-JOQ6HUZ7.cjs');
|
|
5
5
|
require('./chunk-GODVM7NB.cjs');
|
|
6
|
-
require('./chunk-
|
|
7
|
-
require('./chunk-
|
|
6
|
+
require('./chunk-CVVA3UFV.cjs');
|
|
7
|
+
require('./chunk-GY27NIU6.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.default =
|
|
10
|
+
exports.default = _chunkWAOMEMCZcjs.webpack_default;
|
|
11
11
|
|
|
12
12
|
module.exports = exports.default;
|
package/dist/webpack.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
webpack_default
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-E4OOBQM6.js";
|
|
4
|
+
import "./chunk-G5FQVEHY.js";
|
|
5
5
|
import "./chunk-JNAGPWSX.js";
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-MBCYFLIE.js";
|
|
7
|
+
import "./chunk-K7YI4ZKB.js";
|
|
8
8
|
export {
|
|
9
9
|
webpack_default as default
|
|
10
10
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-jsx-vapor",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.7",
|
|
4
4
|
"description": "Convert Vue JSX to Vapor",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -208,20 +208,22 @@
|
|
|
208
208
|
"dependencies": {
|
|
209
209
|
"@babel/core": "^7.26.8",
|
|
210
210
|
"@babel/plugin-transform-typescript": "^7.26.8",
|
|
211
|
-
"@
|
|
211
|
+
"@types/hash-sum": "^1.0.2",
|
|
212
|
+
"@vue-macros/volar": "^3.0.0-beta.7",
|
|
213
|
+
"hash-sum": "^2.0.0",
|
|
212
214
|
"ts-macro": "^0.1.25",
|
|
213
215
|
"unplugin": "^1.16.1",
|
|
214
216
|
"unplugin-utils": "^0.2.4",
|
|
215
|
-
"@vue-jsx-vapor/babel": "2.1.
|
|
216
|
-
"@vue-jsx-vapor/compiler": "2.1.
|
|
217
|
-
"@vue-jsx-vapor/macros": "2.1.
|
|
217
|
+
"@vue-jsx-vapor/babel": "2.1.7",
|
|
218
|
+
"@vue-jsx-vapor/compiler": "2.1.7",
|
|
219
|
+
"@vue-jsx-vapor/macros": "2.1.7"
|
|
218
220
|
},
|
|
219
221
|
"devDependencies": {
|
|
220
222
|
"@nuxt/kit": "^3.16.0",
|
|
221
223
|
"@nuxt/schema": "^3.16.0",
|
|
222
224
|
"@types/babel__core": "^7.20.5",
|
|
223
225
|
"csstype": "^3.1.3",
|
|
224
|
-
"vue": "https://pkg.pr.new/vue@
|
|
226
|
+
"vue": "https://pkg.pr.new/vue@b43f4f5"
|
|
225
227
|
},
|
|
226
228
|
"scripts": {
|
|
227
229
|
"build": "tsup",
|
package/dist/chunk-RGJB4EQM.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// src/core/index.ts
|
|
2
|
-
import { transformSync } from "@babel/core";
|
|
3
|
-
import babelTypescript from "@babel/plugin-transform-typescript";
|
|
4
|
-
import jsx from "@vue-jsx-vapor/babel";
|
|
5
|
-
function transformVueJsxVapor(code, id, options) {
|
|
6
|
-
const result = transformSync(code, {
|
|
7
|
-
plugins: [
|
|
8
|
-
[jsx, { compile: options?.compile, interop: options?.interop }],
|
|
9
|
-
id.endsWith(".tsx") ? [babelTypescript, { isTSX: true, allowExtensions: true }] : null
|
|
10
|
-
].filter((i) => i !== null),
|
|
11
|
-
filename: id,
|
|
12
|
-
sourceMaps: true,
|
|
13
|
-
sourceFileName: id,
|
|
14
|
-
babelrc: false,
|
|
15
|
-
configFile: false
|
|
16
|
-
});
|
|
17
|
-
if (result?.code)
|
|
18
|
-
return {
|
|
19
|
-
code: result.code,
|
|
20
|
-
map: result.map
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export {
|
|
25
|
-
transformVueJsxVapor
|
|
26
|
-
};
|
package/dist/chunk-VTXOK4UC.cjs
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/core/index.ts
|
|
2
|
-
var _core = require('@babel/core');
|
|
3
|
-
var _plugintransformtypescript = require('@babel/plugin-transform-typescript'); var _plugintransformtypescript2 = _interopRequireDefault(_plugintransformtypescript);
|
|
4
|
-
var _babel = require('@vue-jsx-vapor/babel'); var _babel2 = _interopRequireDefault(_babel);
|
|
5
|
-
function transformVueJsxVapor(code, id, options) {
|
|
6
|
-
const result = _core.transformSync.call(void 0, code, {
|
|
7
|
-
plugins: [
|
|
8
|
-
[_babel2.default, { compile: _optionalChain([options, 'optionalAccess', _ => _.compile]), interop: _optionalChain([options, 'optionalAccess', _2 => _2.interop]) }],
|
|
9
|
-
id.endsWith(".tsx") ? [_plugintransformtypescript2.default, { isTSX: true, allowExtensions: true }] : null
|
|
10
|
-
].filter((i) => i !== null),
|
|
11
|
-
filename: id,
|
|
12
|
-
sourceMaps: true,
|
|
13
|
-
sourceFileName: id,
|
|
14
|
-
babelrc: false,
|
|
15
|
-
configFile: false
|
|
16
|
-
});
|
|
17
|
-
if (_optionalChain([result, 'optionalAccess', _3 => _3.code]))
|
|
18
|
-
return {
|
|
19
|
-
code: result.code,
|
|
20
|
-
map: result.map
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
exports.transformVueJsxVapor = transformVueJsxVapor;
|