@vue-jsx-vapor/macros 2.4.2 → 2.4.4
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 +1 -1
- package/dist/api.d.cts +4 -6
- package/dist/api.d.ts +4 -6
- package/dist/api.js +1 -1
- package/dist/astro.cjs +3 -3
- package/dist/astro.d.cts +3 -2
- package/dist/astro.d.ts +3 -2
- package/dist/astro.js +3 -3
- package/dist/{core-BP7HnDkZ.cjs → core-BQThMqcW.cjs} +20 -210
- package/dist/{core-Bo9gAeWA.js → core-DNI6OWXg.js} +19 -209
- package/dist/esbuild.cjs +3 -3
- package/dist/esbuild.d.cts +3 -4
- package/dist/esbuild.d.ts +1 -2
- package/dist/esbuild.js +3 -3
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +3 -3
- package/dist/nuxt.cjs +5 -5
- package/dist/nuxt.d.cts +3 -4
- package/dist/nuxt.d.ts +1 -2
- package/dist/nuxt.js +5 -5
- package/dist/{options-BxlJkUDe.d.cts → options-Egmm6BVJ.d.cts} +0 -1
- package/dist/{options-QKLCzlvG.d.ts → options-K4yleEdU.d.ts} +1 -2
- package/dist/options.d.cts +1 -1
- package/dist/options.d.ts +1 -1
- package/dist/{raw-DrrIS86r.cjs → raw-1tKjLen5.cjs} +2 -2
- package/dist/{raw-BLYamp8z.js → raw-D9bTtojC.js} +2 -2
- package/dist/raw.cjs +2 -2
- package/dist/raw.d.cts +1 -2
- package/dist/raw.d.ts +1 -2
- package/dist/raw.js +2 -2
- package/dist/rolldown.cjs +3 -3
- package/dist/rolldown.d.cts +3 -4
- package/dist/rolldown.d.ts +1 -2
- package/dist/rolldown.js +3 -3
- package/dist/rollup.cjs +3 -3
- package/dist/rollup.d.cts +3 -4
- package/dist/rollup.d.ts +1 -2
- package/dist/rollup.js +3 -3
- package/dist/rspack.cjs +3 -3
- package/dist/rspack.d.cts +1 -2
- package/dist/rspack.d.ts +1 -2
- package/dist/rspack.js +3 -3
- package/dist/{src-DyWBtz6W.js → src-Cf1P9kTp.js} +1 -1
- package/dist/{src-HPKL-RKa.cjs → src-CoejG7EN.cjs} +1 -1
- package/dist/{vite-Dh79M9Hy.cjs → vite-Bxyo1gXJ.cjs} +1 -1
- package/dist/{vite-C3qfPxM8.js → vite-DElZQ-WP.js} +1 -1
- package/dist/vite.cjs +4 -4
- package/dist/vite.d.cts +3 -4
- package/dist/vite.d.ts +1 -2
- package/dist/vite.js +4 -4
- package/dist/volar.cjs +1 -1
- package/dist/volar.d.cts +1 -2
- package/dist/volar.d.ts +1 -2
- package/dist/volar.js +1 -1
- package/dist/{webpack-D9QKBbTH.cjs → webpack-9NZmGyue.cjs} +1 -1
- package/dist/{webpack-DJtxInME.js → webpack-C9K1h8eA.js} +1 -1
- package/dist/webpack.cjs +4 -4
- package/dist/webpack.d.cts +3 -4
- package/dist/webpack.d.ts +1 -2
- package/dist/webpack.js +4 -4
- package/package.json +10 -10
|
@@ -1,197 +1,21 @@
|
|
|
1
|
-
import { HELPER_PREFIX, MagicStringAST, babelParse, generateTransform, getLang, importHelperFn, isFunctionType, walkAST } from "@vue-macros/common";
|
|
1
|
+
import { HELPER_PREFIX, MagicStringAST, babelParse, generateTransform, getLang, importHelperFn, isFunctionType, walkAST, walkIdentifiers } from "@vue-macros/common";
|
|
2
2
|
import hash from "hash-sum";
|
|
3
3
|
|
|
4
|
-
//#region src/core/
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
else if (isFunctionType$1(node)) if (node.scopeIds) node.scopeIds.forEach((id) => markKnownIds(id, knownIds));
|
|
20
|
-
else walkFunctionParams(node, (id) => markScopeIdentifier(node, id, knownIds));
|
|
21
|
-
else if (node.type === "BlockStatement") if (node.scopeIds) node.scopeIds.forEach((id) => markKnownIds(id, knownIds));
|
|
22
|
-
else walkBlockDeclarations(node, (id) => markScopeIdentifier(node, id, knownIds));
|
|
23
|
-
else if (node.type === "CatchClause" && node.param) for (const id of extractIdentifiers(node.param)) markScopeIdentifier(node, id, knownIds);
|
|
24
|
-
else if (isForStatement(node)) walkForStatement(node, false, (id) => markScopeIdentifier(node, id, knownIds));
|
|
25
|
-
},
|
|
26
|
-
leave(node, parent) {
|
|
27
|
-
parent && parentStack.pop();
|
|
28
|
-
if (node !== rootExp && node.scopeIds) for (const id of node.scopeIds) {
|
|
29
|
-
knownIds[id]--;
|
|
30
|
-
if (knownIds[id] === 0) delete knownIds[id];
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
function isReferencedIdentifier(id, parent, parentStack) {
|
|
36
|
-
if (!parent) return true;
|
|
37
|
-
if (id.name === "arguments") return false;
|
|
38
|
-
if (isReferenced(id, parent)) return true;
|
|
39
|
-
switch (parent.type) {
|
|
40
|
-
case "AssignmentExpression":
|
|
41
|
-
case "AssignmentPattern": return true;
|
|
42
|
-
case "ObjectPattern":
|
|
43
|
-
case "ArrayPattern": return isInDestructureAssignment(parent, parentStack);
|
|
44
|
-
}
|
|
45
|
-
return false;
|
|
46
|
-
}
|
|
47
|
-
function isInDestructureAssignment(parent, parentStack) {
|
|
48
|
-
if (parent && (parent.type === "ObjectProperty" || parent.type === "ArrayPattern")) {
|
|
49
|
-
let i = parentStack.length;
|
|
50
|
-
while (i--) {
|
|
51
|
-
const p = parentStack[i];
|
|
52
|
-
if (p.type === "AssignmentExpression") return true;
|
|
53
|
-
else if (p.type !== "ObjectProperty" && !p.type.endsWith("Pattern")) break;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
return false;
|
|
57
|
-
}
|
|
58
|
-
function walkFunctionParams(node, onIdent) {
|
|
59
|
-
for (const p of node.params) for (const id of extractIdentifiers(p)) onIdent(id);
|
|
60
|
-
}
|
|
61
|
-
function walkBlockDeclarations(block, onIdent) {
|
|
62
|
-
for (const stmt of block.body) if (stmt.type === "VariableDeclaration") {
|
|
63
|
-
if (stmt.declare) continue;
|
|
64
|
-
for (const decl of stmt.declarations) for (const id of extractIdentifiers(decl.id)) onIdent(id);
|
|
65
|
-
} else if (stmt.type === "FunctionDeclaration" || stmt.type === "ClassDeclaration") {
|
|
66
|
-
if (stmt.declare || !stmt.id) continue;
|
|
67
|
-
onIdent(stmt.id);
|
|
68
|
-
} else if (isForStatement(stmt)) walkForStatement(stmt, true, onIdent);
|
|
69
|
-
}
|
|
70
|
-
function isForStatement(stmt) {
|
|
71
|
-
return stmt.type === "ForOfStatement" || stmt.type === "ForInStatement" || stmt.type === "ForStatement";
|
|
72
|
-
}
|
|
73
|
-
function walkForStatement(stmt, isVar, onIdent) {
|
|
74
|
-
const variable = stmt.type === "ForStatement" ? stmt.init : stmt.left;
|
|
75
|
-
if (variable && variable.type === "VariableDeclaration" && (variable.kind === "var" ? isVar : !isVar)) for (const decl of variable.declarations) for (const id of extractIdentifiers(decl.id)) onIdent(id);
|
|
76
|
-
}
|
|
77
|
-
function extractIdentifiers(param, nodes = []) {
|
|
78
|
-
switch (param.type) {
|
|
79
|
-
case "Identifier":
|
|
80
|
-
nodes.push(param);
|
|
81
|
-
break;
|
|
82
|
-
case "MemberExpression": {
|
|
83
|
-
let object = param;
|
|
84
|
-
while (object.type === "MemberExpression") object = object.object;
|
|
85
|
-
nodes.push(object);
|
|
86
|
-
break;
|
|
87
|
-
}
|
|
88
|
-
case "JSXMemberExpression": {
|
|
89
|
-
let object = param;
|
|
90
|
-
while (object.type === "JSXMemberExpression") object = object.object;
|
|
91
|
-
nodes.push(object);
|
|
92
|
-
break;
|
|
93
|
-
}
|
|
94
|
-
case "ObjectPattern":
|
|
95
|
-
for (const prop of param.properties) if (prop.type === "RestElement") extractIdentifiers(prop.argument, nodes);
|
|
96
|
-
else extractIdentifiers(prop.value, nodes);
|
|
97
|
-
break;
|
|
98
|
-
case "ArrayPattern":
|
|
99
|
-
param.elements.forEach((element) => {
|
|
100
|
-
if (element) extractIdentifiers(element, nodes);
|
|
101
|
-
});
|
|
102
|
-
break;
|
|
103
|
-
case "RestElement":
|
|
104
|
-
extractIdentifiers(param.argument, nodes);
|
|
105
|
-
break;
|
|
106
|
-
case "AssignmentPattern":
|
|
107
|
-
extractIdentifiers(param.left, nodes);
|
|
108
|
-
break;
|
|
109
|
-
}
|
|
110
|
-
return nodes;
|
|
111
|
-
}
|
|
112
|
-
function markKnownIds(name, knownIds) {
|
|
113
|
-
if (name in knownIds) knownIds[name]++;
|
|
114
|
-
else knownIds[name] = 1;
|
|
115
|
-
}
|
|
116
|
-
function markScopeIdentifier(node, child, knownIds) {
|
|
117
|
-
const { name } = child;
|
|
118
|
-
if (node.scopeIds && node.scopeIds.has(name)) return;
|
|
119
|
-
markKnownIds(name, knownIds);
|
|
120
|
-
(node.scopeIds || (node.scopeIds = new Set())).add(name);
|
|
121
|
-
}
|
|
122
|
-
const isFunctionType$1 = (node) => {
|
|
123
|
-
return /Function(?:Expression|Declaration)$|Method$/.test(node.type);
|
|
124
|
-
};
|
|
125
|
-
/**
|
|
126
|
-
* Copied from https://github.com/babel/babel/blob/main/packages/babel-types/src/validators/isReferenced.ts
|
|
127
|
-
* To avoid runtime dependency on @babel/types (which includes process references)
|
|
128
|
-
* This file should not change very often in babel but we may need to keep it
|
|
129
|
-
* up-to-date from time to time.
|
|
130
|
-
*
|
|
131
|
-
* https://github.com/babel/babel/blob/main/LICENSE
|
|
132
|
-
*
|
|
133
|
-
*/
|
|
134
|
-
function isReferenced(node, parent, grandparent) {
|
|
135
|
-
switch (parent.type) {
|
|
136
|
-
case "MemberExpression":
|
|
137
|
-
case "OptionalMemberExpression":
|
|
138
|
-
if (parent.property === node) return !!parent.computed;
|
|
139
|
-
return parent.object === node;
|
|
140
|
-
case "JSXMemberExpression": return parent.object === node;
|
|
141
|
-
case "VariableDeclarator": return parent.init === node;
|
|
142
|
-
case "ArrowFunctionExpression": return parent.body === node;
|
|
143
|
-
case "PrivateName": return false;
|
|
144
|
-
case "ClassMethod":
|
|
145
|
-
case "ClassPrivateMethod":
|
|
146
|
-
case "ObjectMethod":
|
|
147
|
-
if (parent.key === node) return !!parent.computed;
|
|
148
|
-
return false;
|
|
149
|
-
case "ObjectProperty":
|
|
150
|
-
if (parent.key === node) return !!parent.computed;
|
|
151
|
-
return !grandparent || grandparent.type !== "ObjectPattern";
|
|
152
|
-
case "ClassProperty":
|
|
153
|
-
if (parent.key === node) return !!parent.computed;
|
|
154
|
-
return true;
|
|
155
|
-
case "ClassPrivateProperty": return parent.key !== node;
|
|
156
|
-
case "ClassDeclaration":
|
|
157
|
-
case "ClassExpression": return parent.superClass === node;
|
|
158
|
-
case "AssignmentExpression": return parent.right === node;
|
|
159
|
-
case "AssignmentPattern": return parent.right === node;
|
|
160
|
-
case "LabeledStatement": return false;
|
|
161
|
-
case "CatchClause": return false;
|
|
162
|
-
case "RestElement": return false;
|
|
163
|
-
case "BreakStatement":
|
|
164
|
-
case "ContinueStatement": return false;
|
|
165
|
-
case "FunctionDeclaration":
|
|
166
|
-
case "FunctionExpression": return false;
|
|
167
|
-
case "ExportNamespaceSpecifier":
|
|
168
|
-
case "ExportDefaultSpecifier": return false;
|
|
169
|
-
case "ExportSpecifier":
|
|
170
|
-
if (grandparent?.source) return false;
|
|
171
|
-
return parent.local === node;
|
|
172
|
-
case "ImportDefaultSpecifier":
|
|
173
|
-
case "ImportNamespaceSpecifier":
|
|
174
|
-
case "ImportSpecifier": return false;
|
|
175
|
-
case "ImportAttribute": return false;
|
|
176
|
-
case "JSXAttribute": return false;
|
|
177
|
-
case "ObjectPattern":
|
|
178
|
-
case "ArrayPattern": return false;
|
|
179
|
-
case "MetaProperty": return false;
|
|
180
|
-
case "ObjectTypeProperty": return parent.key !== node;
|
|
181
|
-
case "TSEnumMember": return parent.id !== node;
|
|
182
|
-
case "TSPropertySignature":
|
|
183
|
-
if (parent.key === node) return !!parent.computed;
|
|
184
|
-
return true;
|
|
185
|
-
}
|
|
186
|
-
return true;
|
|
187
|
-
}
|
|
188
|
-
const TS_NODE_TYPES = [
|
|
189
|
-
"TSAsExpression",
|
|
190
|
-
"TSTypeAssertion",
|
|
191
|
-
"TSNonNullExpression",
|
|
192
|
-
"TSInstantiationExpression",
|
|
193
|
-
"TSSatisfiesExpression"
|
|
194
|
-
];
|
|
4
|
+
//#region src/core/helper/use-model.ts?raw
|
|
5
|
+
var use_model_default = "import { customRef, watchSyncEffect } from \"vue\";\nexport function useModel(props, name, options = {}) {\n const res = customRef((track, trigger) => {\n let localValue = options && options.default;\n let prevEmittedValue;\n watchSyncEffect(() => {\n const propValue = props[name];\n if (!Object.is(prevEmittedValue, propValue)) {\n localValue = propValue;\n trigger();\n }\n });\n return {\n get() {\n track();\n return options.get ? options.get(localValue) : localValue;\n },\n set(value) {\n if (Object.is(value, localValue)) return;\n localValue = value;\n trigger();\n const emittedValue = prevEmittedValue = options.set ? options.set(value) : value;\n for (const emit of [props[`onUpdate:${name}`]].flat()) {\n if (typeof emit === \"function\") emit(emittedValue);\n }\n }\n };\n });\n res[Symbol.iterator] = () => {\n let i = 0;\n return {\n next() {\n if (i < 2) {\n return {\n value: i++ ? props[`${name}Modifiers`] || {} : res,\n done: false\n };\n } else {\n return { done: true };\n }\n }\n };\n };\n return res;\n}\n";
|
|
6
|
+
|
|
7
|
+
//#endregion
|
|
8
|
+
//#region src/core/helper/with-defaults.ts?raw
|
|
9
|
+
var with_defaults_default = "function resolveDefaultProps(paths) {\n const result = {};\n for (const path of Object.keys(paths)) {\n const segments = path.split(/[.?[\\]]/).filter(Boolean);\n let current = result;\n for (let i = 0; i < segments.length; i++) {\n const segment = segments[i];\n if (i === segments.length - 1) {\n current[segment] = paths[path];\n } else {\n if (!current[segment]) {\n current[segment] = Number.isNaN(Number(segments[i + 1])) ? {} : [];\n }\n current = current[segment];\n }\n }\n }\n return result;\n}\nexport function createPropsDefaultProxy(props, defaults) {\n const defaultProps = resolveDefaultProps(defaults);\n const result = {};\n for (const key of [\n .../* @__PURE__ */ new Set([...Object.keys(props), ...Object.keys(defaultProps)])\n ]) {\n Object.defineProperty(result, key, {\n enumerable: true,\n get: () => props[key] === void 0 ? defaultProps[key] : props[key]\n });\n }\n return result;\n}\n";
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region src/core/helper/index.ts
|
|
13
|
+
const helperPrefix = "vue-jsx-vapor/macros";
|
|
14
|
+
const useModelHelperId = `${helperPrefix}/use-model`;
|
|
15
|
+
const withDefaultsHelperId = `${helperPrefix}/with-defaults`;
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region src/core/utils.ts
|
|
195
19
|
function prependFunctionalNode(node, s, result) {
|
|
196
20
|
const isBlockStatement = node.body.type === "BlockStatement";
|
|
197
21
|
const start = node.body.extra?.parenthesized ? node.body.extra.parenStart : node.body.start;
|
|
@@ -213,20 +37,6 @@ function getDefaultValue(node) {
|
|
|
213
37
|
return node;
|
|
214
38
|
}
|
|
215
39
|
|
|
216
|
-
//#endregion
|
|
217
|
-
//#region src/core/helper/use-model.ts?raw
|
|
218
|
-
var use_model_default = "import { customRef, watchSyncEffect } from \"vue\";\nexport function useModel(props, name, options = {}) {\n const res = customRef((track, trigger) => {\n let localValue = options && options.default;\n let prevEmittedValue;\n watchSyncEffect(() => {\n const propValue = props[name];\n if (!Object.is(prevEmittedValue, propValue)) {\n localValue = propValue;\n trigger();\n }\n });\n return {\n get() {\n track();\n return options.get ? options.get(localValue) : localValue;\n },\n set(value) {\n if (Object.is(value, localValue)) return;\n localValue = value;\n trigger();\n const emittedValue = prevEmittedValue = options.set ? options.set(value) : value;\n for (const emit of [props[`onUpdate:${name}`]].flat()) {\n if (typeof emit === \"function\") emit(emittedValue);\n }\n }\n };\n });\n res[Symbol.iterator] = () => {\n let i = 0;\n return {\n next() {\n if (i < 2) {\n return {\n value: i++ ? props[`${name}Modifiers`] || {} : res,\n done: false\n };\n } else {\n return { done: true };\n }\n }\n };\n };\n return res;\n}\n";
|
|
219
|
-
|
|
220
|
-
//#endregion
|
|
221
|
-
//#region src/core/helper/with-defaults.ts?raw
|
|
222
|
-
var with_defaults_default = "function resolveDefaultProps(paths) {\n const result = {};\n for (const path of Object.keys(paths)) {\n const segments = path.split(/[.?[\\]]/).filter(Boolean);\n let current = result;\n for (let i = 0; i < segments.length; i++) {\n const segment = segments[i];\n if (i === segments.length - 1) {\n current[segment] = paths[path];\n } else {\n if (!current[segment]) {\n current[segment] = Number.isNaN(Number(segments[i + 1])) ? {} : [];\n }\n current = current[segment];\n }\n }\n }\n return result;\n}\nexport function createPropsDefaultProxy(props, defaults) {\n const defaultProps = resolveDefaultProps(defaults);\n const result = {};\n for (const key of [\n .../* @__PURE__ */ new Set([...Object.keys(props), ...Object.keys(defaultProps)])\n ]) {\n Object.defineProperty(result, key, {\n enumerable: true,\n get: () => props[key] === void 0 ? defaultProps[key] : props[key]\n });\n }\n return result;\n}\n";
|
|
223
|
-
|
|
224
|
-
//#endregion
|
|
225
|
-
//#region src/core/helper/index.ts
|
|
226
|
-
const helperPrefix = "vue-jsx-vapor/macros";
|
|
227
|
-
const useModelHelperId = `${helperPrefix}/use-model`;
|
|
228
|
-
const withDefaultsHelperId = `${helperPrefix}/with-defaults`;
|
|
229
|
-
|
|
230
40
|
//#endregion
|
|
231
41
|
//#region src/core/restructure.ts
|
|
232
42
|
function restructure(s, node, options = {}) {
|
|
@@ -425,7 +235,7 @@ function prependObjectExpression(argument, name, value, s) {
|
|
|
425
235
|
return prop;
|
|
426
236
|
}
|
|
427
237
|
function getWalkedIds(root, propsName) {
|
|
428
|
-
const walkedIds = new Set();
|
|
238
|
+
const walkedIds = /* @__PURE__ */ new Set();
|
|
429
239
|
walkIdentifiers(root.body, (id, parent) => {
|
|
430
240
|
if (id.name === propsName && (parent?.type === "MemberExpression" || parent?.type === "JSXMemberExpression" || parent?.type === "OptionalMemberExpression")) {
|
|
431
241
|
const prop = parent.property.type === "Identifier" || parent.property.type === "JSXIdentifier" ? parent.property.name : parent.property.type === "StringLiteral" ? parent.property.value : "";
|
|
@@ -525,7 +335,7 @@ function transformDefineStyle(defineStyle, index, root, s, importMap, { defineSl
|
|
|
525
335
|
if (expression.arguments[0]?.type !== "TemplateLiteral") return;
|
|
526
336
|
let css = s.sliceNode(expression.arguments[0]).slice(1, -1);
|
|
527
337
|
const scopeId = hash(css);
|
|
528
|
-
const vars = new Map();
|
|
338
|
+
const vars = /* @__PURE__ */ new Map();
|
|
529
339
|
expression.arguments[0].expressions.forEach((exp) => {
|
|
530
340
|
const cssVar = s.sliceNode(exp);
|
|
531
341
|
const cssVarId = toCssVarId(cssVar, `--${scopeId}-`);
|
|
@@ -607,7 +417,7 @@ function transformJsxMacros(code, id, importMap, options) {
|
|
|
607
417
|
}
|
|
608
418
|
function getRootMap(ast, s, options) {
|
|
609
419
|
const parents = [];
|
|
610
|
-
const rootMap = new Map();
|
|
420
|
+
const rootMap = /* @__PURE__ */ new Map();
|
|
611
421
|
walkAST(ast, {
|
|
612
422
|
enter(node, parent) {
|
|
613
423
|
parents.unshift(parent);
|
package/dist/esbuild.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
require('./core-
|
|
3
|
-
require('./raw-
|
|
2
|
+
require('./core-BQThMqcW.cjs');
|
|
3
|
+
require('./raw-1tKjLen5.cjs');
|
|
4
4
|
require('./options-BejTnOdM.cjs');
|
|
5
|
-
const require_src = require('./src-
|
|
5
|
+
const require_src = require('./src-CoejG7EN.cjs');
|
|
6
6
|
|
|
7
7
|
//#region src/esbuild.ts
|
|
8
8
|
var esbuild_default = require_src.src_default.esbuild;
|
package/dist/esbuild.d.cts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Options } from "./options-
|
|
2
|
-
import * as
|
|
1
|
+
import { Options } from "./options-Egmm6BVJ.cjs";
|
|
2
|
+
import * as esbuild1 from "esbuild";
|
|
3
3
|
|
|
4
4
|
//#region src/esbuild.d.ts
|
|
5
|
-
declare const _default: (options?: Options | undefined) =>
|
|
6
|
-
|
|
5
|
+
declare const _default: (options?: Options | undefined) => esbuild1.Plugin;
|
|
7
6
|
//#endregion
|
|
8
7
|
export { _default as default };
|
package/dist/esbuild.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Options } from "./options-
|
|
1
|
+
import { Options } from "./options-K4yleEdU.js";
|
|
2
2
|
import * as esbuild1 from "esbuild";
|
|
3
3
|
|
|
4
4
|
//#region src/esbuild.d.ts
|
|
5
5
|
declare const _default: (options?: Options | undefined) => esbuild1.Plugin;
|
|
6
|
-
|
|
7
6
|
//#endregion
|
|
8
7
|
export { _default as default };
|
package/dist/esbuild.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./core-
|
|
2
|
-
import "./raw-
|
|
1
|
+
import "./core-DNI6OWXg.js";
|
|
2
|
+
import "./raw-D9bTtojC.js";
|
|
3
3
|
import "./options-BWRkHmm5.js";
|
|
4
|
-
import { src_default } from "./src-
|
|
4
|
+
import { src_default } from "./src-Cf1P9kTp.js";
|
|
5
5
|
|
|
6
6
|
//#region src/esbuild.ts
|
|
7
7
|
var esbuild_default = src_default.esbuild;
|
package/dist/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
require('./core-
|
|
3
|
-
require('./raw-
|
|
2
|
+
require('./core-BQThMqcW.cjs');
|
|
3
|
+
require('./raw-1tKjLen5.cjs');
|
|
4
4
|
const require_options = require('./options-BejTnOdM.cjs');
|
|
5
|
-
const require_src = require('./src-
|
|
5
|
+
const require_src = require('./src-CoejG7EN.cjs');
|
|
6
6
|
|
|
7
7
|
exports.default = require_src.src_default;
|
|
8
8
|
exports.resolveOptions = require_options.resolveOptions;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Options, OptionsResolved, resolveOptions } from "./options-
|
|
1
|
+
import { Options, OptionsResolved, resolveOptions } from "./options-Egmm6BVJ.cjs";
|
|
2
2
|
import { UnpluginInstance } from "unplugin";
|
|
3
3
|
|
|
4
4
|
//#region src/index.d.ts
|
|
5
5
|
declare const unplugin: UnpluginInstance<Options | undefined>;
|
|
6
|
-
|
|
7
6
|
//#endregion
|
|
8
7
|
export { Options, OptionsResolved, unplugin as default, resolveOptions };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Options, OptionsResolved, resolveOptions
|
|
1
|
+
import { Options, OptionsResolved, resolveOptions } from "./options-K4yleEdU.js";
|
|
2
2
|
import { UnpluginInstance } from "unplugin";
|
|
3
3
|
|
|
4
4
|
//#region src/index.d.ts
|
|
5
5
|
declare const unplugin: UnpluginInstance<Options | undefined>;
|
|
6
|
-
|
|
7
6
|
//#endregion
|
|
8
7
|
export { Options, OptionsResolved, unplugin as default, resolveOptions };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./core-
|
|
2
|
-
import "./raw-
|
|
1
|
+
import "./core-DNI6OWXg.js";
|
|
2
|
+
import "./raw-D9bTtojC.js";
|
|
3
3
|
import { resolveOptions } from "./options-BWRkHmm5.js";
|
|
4
|
-
import { src_default } from "./src-
|
|
4
|
+
import { src_default } from "./src-Cf1P9kTp.js";
|
|
5
5
|
|
|
6
6
|
export { src_default as default, resolveOptions };
|
package/dist/nuxt.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
2
|
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
3
|
-
require('./core-
|
|
4
|
-
require('./raw-
|
|
3
|
+
require('./core-BQThMqcW.cjs');
|
|
4
|
+
require('./raw-1tKjLen5.cjs');
|
|
5
5
|
require('./options-BejTnOdM.cjs');
|
|
6
|
-
require('./src-
|
|
7
|
-
const require_vite = require('./vite-
|
|
8
|
-
const require_webpack = require('./webpack-
|
|
6
|
+
require('./src-CoejG7EN.cjs');
|
|
7
|
+
const require_vite = require('./vite-Bxyo1gXJ.cjs');
|
|
8
|
+
const require_webpack = require('./webpack-9NZmGyue.cjs');
|
|
9
9
|
const __nuxt_kit = require_chunk.__toESM(require("@nuxt/kit"));
|
|
10
10
|
require("@nuxt/schema");
|
|
11
11
|
|
package/dist/nuxt.d.cts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { Options } from "./options-
|
|
2
|
-
import * as
|
|
1
|
+
import { Options } from "./options-Egmm6BVJ.cjs";
|
|
2
|
+
import * as _nuxt_schema2 from "@nuxt/schema";
|
|
3
3
|
|
|
4
4
|
//#region src/nuxt.d.ts
|
|
5
5
|
interface ModuleOptions extends Options {}
|
|
6
|
-
declare const _default:
|
|
7
|
-
|
|
6
|
+
declare const _default: _nuxt_schema2.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
8
7
|
//#endregion
|
|
9
8
|
export { ModuleOptions, _default as default };
|
package/dist/nuxt.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { Options } from "./options-
|
|
1
|
+
import { Options } from "./options-K4yleEdU.js";
|
|
2
2
|
import * as _nuxt_schema2 from "@nuxt/schema";
|
|
3
3
|
|
|
4
4
|
//#region src/nuxt.d.ts
|
|
5
5
|
interface ModuleOptions extends Options {}
|
|
6
6
|
declare const _default: _nuxt_schema2.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
7
|
-
|
|
8
7
|
//#endregion
|
|
9
8
|
export { ModuleOptions, _default as default };
|
package/dist/nuxt.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "./core-
|
|
2
|
-
import "./raw-
|
|
1
|
+
import "./core-DNI6OWXg.js";
|
|
2
|
+
import "./raw-D9bTtojC.js";
|
|
3
3
|
import "./options-BWRkHmm5.js";
|
|
4
|
-
import "./src-
|
|
5
|
-
import { vite_default } from "./vite-
|
|
6
|
-
import { webpack_default } from "./webpack-
|
|
4
|
+
import "./src-Cf1P9kTp.js";
|
|
5
|
+
import { vite_default } from "./vite-DElZQ-WP.js";
|
|
6
|
+
import { webpack_default } from "./webpack-C9K1h8eA.js";
|
|
7
7
|
import { addVitePlugin, addWebpackPlugin, defineNuxtModule } from "@nuxt/kit";
|
|
8
8
|
import "@nuxt/schema";
|
|
9
9
|
|
|
@@ -32,6 +32,5 @@ type OptionsResolved = MarkRequired<Options, 'include' | 'version'> & {
|
|
|
32
32
|
defineStyle: MarkRequired<DefineStyleOptions, 'alias'>;
|
|
33
33
|
};
|
|
34
34
|
declare function resolveOptions(options: Options): OptionsResolved;
|
|
35
|
-
|
|
36
35
|
//#endregion
|
|
37
36
|
export { Options, OptionsResolved, resolveOptions };
|
|
@@ -32,6 +32,5 @@ type OptionsResolved = MarkRequired<Options, 'include' | 'version'> & {
|
|
|
32
32
|
defineStyle: MarkRequired<DefineStyleOptions, 'alias'>;
|
|
33
33
|
};
|
|
34
34
|
declare function resolveOptions(options: Options): OptionsResolved;
|
|
35
|
-
|
|
36
35
|
//#endregion
|
|
37
|
-
export { Options, OptionsResolved, resolveOptions
|
|
36
|
+
export { Options, OptionsResolved, resolveOptions };
|
package/dist/options.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Options, OptionsResolved, resolveOptions } from "./options-
|
|
1
|
+
import { Options, OptionsResolved, resolveOptions } from "./options-Egmm6BVJ.cjs";
|
|
2
2
|
export { Options, OptionsResolved, resolveOptions };
|
package/dist/options.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Options, OptionsResolved, resolveOptions
|
|
1
|
+
import { Options, OptionsResolved, resolveOptions } from "./options-K4yleEdU.js";
|
|
2
2
|
export { Options, OptionsResolved, resolveOptions };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
-
const require_core = require('./core-
|
|
2
|
+
const require_core = require('./core-BQThMqcW.cjs');
|
|
3
3
|
const require_options = require('./options-BejTnOdM.cjs');
|
|
4
4
|
const __vue_macros_common = require_chunk.__toESM(require("@vue-macros/common"));
|
|
5
5
|
const __vue_compiler_sfc = require_chunk.__toESM(require("@vue/compiler-sfc"));
|
|
@@ -23,7 +23,7 @@ const name = "@vue-jsx-vapor/macros";
|
|
|
23
23
|
const plugin = (userOptions = {}) => {
|
|
24
24
|
const options = require_options.resolveOptions(userOptions);
|
|
25
25
|
const filter = (0, __vue_macros_common.createFilter)(options);
|
|
26
|
-
const importMap = new Map();
|
|
26
|
+
const importMap = /* @__PURE__ */ new Map();
|
|
27
27
|
return {
|
|
28
28
|
name,
|
|
29
29
|
enforce: "pre",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { helperPrefix, transformJsxMacros, useModelHelperId, use_model_default, withDefaultsHelperId, with_defaults_default } from "./core-
|
|
1
|
+
import { helperPrefix, transformJsxMacros, useModelHelperId, use_model_default, withDefaultsHelperId, with_defaults_default } from "./core-DNI6OWXg.js";
|
|
2
2
|
import { resolveOptions } from "./options-BWRkHmm5.js";
|
|
3
3
|
import { createFilter, normalizePath } from "@vue-macros/common";
|
|
4
4
|
import { compileStyleAsync } from "@vue/compiler-sfc";
|
|
@@ -22,7 +22,7 @@ const name = "@vue-jsx-vapor/macros";
|
|
|
22
22
|
const plugin = (userOptions = {}) => {
|
|
23
23
|
const options = resolveOptions(userOptions);
|
|
24
24
|
const filter = createFilter(options);
|
|
25
|
-
const importMap = new Map();
|
|
25
|
+
const importMap = /* @__PURE__ */ new Map();
|
|
26
26
|
return {
|
|
27
27
|
name,
|
|
28
28
|
enforce: "pre",
|
package/dist/raw.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
require('./core-
|
|
3
|
-
const require_raw = require('./raw-
|
|
2
|
+
require('./core-BQThMqcW.cjs');
|
|
3
|
+
const require_raw = require('./raw-1tKjLen5.cjs');
|
|
4
4
|
require('./options-BejTnOdM.cjs');
|
|
5
5
|
|
|
6
6
|
exports.default = require_raw.raw_default;
|
package/dist/raw.d.cts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Options } from "./options-
|
|
1
|
+
import { Options } from "./options-Egmm6BVJ.cjs";
|
|
2
2
|
import { UnpluginOptions } from "unplugin";
|
|
3
3
|
|
|
4
4
|
//#region src/raw.d.ts
|
|
5
5
|
declare const plugin: (userOptions?: Options) => UnpluginOptions;
|
|
6
|
-
|
|
7
6
|
//#endregion
|
|
8
7
|
export { plugin as default };
|
package/dist/raw.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Options } from "./options-
|
|
1
|
+
import { Options } from "./options-K4yleEdU.js";
|
|
2
2
|
import { UnpluginOptions } from "unplugin";
|
|
3
3
|
|
|
4
4
|
//#region src/raw.d.ts
|
|
5
5
|
declare const plugin: (userOptions?: Options) => UnpluginOptions;
|
|
6
|
-
|
|
7
6
|
//#endregion
|
|
8
7
|
export { plugin as default };
|
package/dist/raw.js
CHANGED
package/dist/rolldown.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
require('./core-
|
|
3
|
-
require('./raw-
|
|
2
|
+
require('./core-BQThMqcW.cjs');
|
|
3
|
+
require('./raw-1tKjLen5.cjs');
|
|
4
4
|
require('./options-BejTnOdM.cjs');
|
|
5
|
-
const require_src = require('./src-
|
|
5
|
+
const require_src = require('./src-CoejG7EN.cjs');
|
|
6
6
|
|
|
7
7
|
//#region src/rolldown.ts
|
|
8
8
|
var rolldown_default = require_src.src_default.rolldown;
|
package/dist/rolldown.d.cts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Options } from "./options-
|
|
2
|
-
import * as
|
|
1
|
+
import { Options } from "./options-Egmm6BVJ.cjs";
|
|
2
|
+
import * as unplugin4 from "unplugin";
|
|
3
3
|
|
|
4
4
|
//#region src/rolldown.d.ts
|
|
5
|
-
declare const _default: (options?: Options | undefined) =>
|
|
6
|
-
|
|
5
|
+
declare const _default: (options?: Options | undefined) => unplugin4.RolldownPlugin<any> | unplugin4.RolldownPlugin<any>[];
|
|
7
6
|
//#endregion
|
|
8
7
|
export { _default as default };
|
package/dist/rolldown.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Options } from "./options-
|
|
1
|
+
import { Options } from "./options-K4yleEdU.js";
|
|
2
2
|
import * as unplugin4 from "unplugin";
|
|
3
3
|
|
|
4
4
|
//#region src/rolldown.d.ts
|
|
5
5
|
declare const _default: (options?: Options | undefined) => unplugin4.RolldownPlugin<any> | unplugin4.RolldownPlugin<any>[];
|
|
6
|
-
|
|
7
6
|
//#endregion
|
|
8
7
|
export { _default as default };
|
package/dist/rolldown.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./core-
|
|
2
|
-
import "./raw-
|
|
1
|
+
import "./core-DNI6OWXg.js";
|
|
2
|
+
import "./raw-D9bTtojC.js";
|
|
3
3
|
import "./options-BWRkHmm5.js";
|
|
4
|
-
import { src_default } from "./src-
|
|
4
|
+
import { src_default } from "./src-Cf1P9kTp.js";
|
|
5
5
|
|
|
6
6
|
//#region src/rolldown.ts
|
|
7
7
|
var rolldown_default = src_default.rolldown;
|
package/dist/rollup.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
require('./core-
|
|
3
|
-
require('./raw-
|
|
2
|
+
require('./core-BQThMqcW.cjs');
|
|
3
|
+
require('./raw-1tKjLen5.cjs');
|
|
4
4
|
require('./options-BejTnOdM.cjs');
|
|
5
|
-
const require_src = require('./src-
|
|
5
|
+
const require_src = require('./src-CoejG7EN.cjs');
|
|
6
6
|
|
|
7
7
|
//#region src/rollup.ts
|
|
8
8
|
var rollup_default = require_src.src_default.rollup;
|
package/dist/rollup.d.cts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Options } from "./options-
|
|
2
|
-
import * as
|
|
1
|
+
import { Options } from "./options-Egmm6BVJ.cjs";
|
|
2
|
+
import * as rollup7 from "rollup";
|
|
3
3
|
|
|
4
4
|
//#region src/rollup.d.ts
|
|
5
|
-
declare const _default: (options?: Options | undefined) =>
|
|
6
|
-
|
|
5
|
+
declare const _default: (options?: Options | undefined) => rollup7.Plugin<any> | rollup7.Plugin<any>[];
|
|
7
6
|
//#endregion
|
|
8
7
|
export { _default as default };
|
package/dist/rollup.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Options } from "./options-
|
|
1
|
+
import { Options } from "./options-K4yleEdU.js";
|
|
2
2
|
import * as rollup7 from "rollup";
|
|
3
3
|
|
|
4
4
|
//#region src/rollup.d.ts
|
|
5
5
|
declare const _default: (options?: Options | undefined) => rollup7.Plugin<any> | rollup7.Plugin<any>[];
|
|
6
|
-
|
|
7
6
|
//#endregion
|
|
8
7
|
export { _default as default };
|
package/dist/rollup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./core-
|
|
2
|
-
import "./raw-
|
|
1
|
+
import "./core-DNI6OWXg.js";
|
|
2
|
+
import "./raw-D9bTtojC.js";
|
|
3
3
|
import "./options-BWRkHmm5.js";
|
|
4
|
-
import { src_default } from "./src-
|
|
4
|
+
import { src_default } from "./src-Cf1P9kTp.js";
|
|
5
5
|
|
|
6
6
|
//#region src/rollup.ts
|
|
7
7
|
var rollup_default = src_default.rollup;
|
package/dist/rspack.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
require('./core-
|
|
3
|
-
require('./raw-
|
|
2
|
+
require('./core-BQThMqcW.cjs');
|
|
3
|
+
require('./raw-1tKjLen5.cjs');
|
|
4
4
|
require('./options-BejTnOdM.cjs');
|
|
5
|
-
const require_src = require('./src-
|
|
5
|
+
const require_src = require('./src-CoejG7EN.cjs');
|
|
6
6
|
|
|
7
7
|
//#region src/rspack.ts
|
|
8
8
|
var rspack_default = require_src.src_default.rspack;
|