@vue-jsx-vapor/macros 2.3.3 → 2.3.5
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 +9 -6
- package/dist/api.d.ts +9 -6
- package/dist/api.js +1 -1
- package/dist/astro.cjs +4 -4
- package/dist/astro.d.cts +1 -1
- package/dist/astro.d.ts +1 -1
- package/dist/astro.js +4 -4
- package/dist/{core-CdPKEM79.cjs → core-C740HxiF.cjs} +36 -23
- package/dist/{core-B_EM_kTA.js → core-CHBxRAvb.js} +36 -23
- package/dist/esbuild.cjs +4 -4
- package/dist/esbuild.d.cts +1 -1
- package/dist/esbuild.d.ts +1 -1
- package/dist/esbuild.js +4 -4
- package/dist/index.cjs +4 -4
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -4
- package/dist/nuxt.cjs +6 -6
- package/dist/nuxt.d.cts +1 -1
- package/dist/nuxt.d.ts +1 -1
- package/dist/nuxt.js +6 -6
- package/dist/{options-CNIhAQHD.cjs → options-BSX_vMxh.cjs} +8 -5
- package/dist/options-BWRkHmm5.js +23 -0
- package/dist/options.cjs +1 -1
- package/dist/options.d-CXMsJZSo.d.cts +37 -0
- package/dist/options.d-DNWXuL_g.d.ts +37 -0
- package/dist/options.d.cts +1 -1
- package/dist/options.d.ts +1 -1
- package/dist/options.js +1 -1
- package/dist/{raw-oJpqvj1N.cjs → raw-BXpT71mV.cjs} +2 -2
- package/dist/{raw-9H5vTeLe.js → raw-Hr7QYA0U.js} +2 -2
- package/dist/raw.cjs +3 -3
- package/dist/raw.d.cts +1 -1
- package/dist/raw.d.ts +1 -1
- package/dist/raw.js +3 -3
- package/dist/rolldown.cjs +4 -4
- package/dist/rolldown.d.cts +1 -1
- package/dist/rolldown.d.ts +1 -1
- package/dist/rolldown.js +4 -4
- package/dist/rollup.cjs +4 -4
- package/dist/rollup.d.cts +1 -1
- package/dist/rollup.d.ts +1 -1
- package/dist/rollup.js +4 -4
- package/dist/rspack.cjs +4 -4
- package/dist/rspack.d.cts +1 -1
- package/dist/rspack.d.ts +1 -1
- package/dist/rspack.js +4 -4
- package/dist/{src-CY9FOMwg.cjs → src-2EUAmvRo.cjs} +1 -1
- package/dist/{src-CjDaDFw_.js → src-BDMVJUXS.js} +1 -1
- package/dist/{vite-HbXTfQl_.js → vite-CS2vynmi.js} +1 -1
- package/dist/{vite-CtRiheet.cjs → vite-DP98E6od.cjs} +1 -1
- package/dist/vite.cjs +5 -5
- package/dist/vite.d.cts +1 -1
- package/dist/vite.d.ts +1 -1
- package/dist/vite.js +5 -5
- package/dist/volar.cjs +70 -57
- package/dist/volar.d.cts +1 -1
- package/dist/volar.d.ts +1 -1
- package/dist/volar.js +70 -57
- package/dist/{webpack-5inEmXrh.js → webpack-C78RZrII.js} +1 -1
- package/dist/{webpack-YO7qm0E9.cjs → webpack-qmJC3FBB.cjs} +1 -1
- package/dist/webpack.cjs +5 -5
- package/dist/webpack.d.cts +1 -1
- package/dist/webpack.d.ts +1 -1
- package/dist/webpack.js +5 -5
- package/package.json +1 -2
- package/dist/options-pbSvpKdV.js +0 -20
- package/dist/options.d-B3WOiT_L.d.cts +0 -26
- package/dist/options.d-DtyRfe-9.d.ts +0 -26
package/dist/volar.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { resolveOptions } from "./options-
|
|
1
|
+
import { resolveOptions } from "./options-BWRkHmm5.js";
|
|
2
2
|
import { HELPER_PREFIX, createFilter } from "@vue-macros/common";
|
|
3
3
|
import { allCodeFeatures, createPlugin, replaceRange } from "ts-macro";
|
|
4
|
-
import { generateClassProperty } from "@vue/language-core/lib/codegen/style/classProperty.js";
|
|
5
|
-
import { parseCssClassNames } from "@vue/language-core/lib/utils/parseCssClassNames.js";
|
|
6
4
|
|
|
7
5
|
//#region src/volar/define-component.ts
|
|
8
6
|
function transformDefineComponent(node, parent, options) {
|
|
@@ -24,16 +22,10 @@ function transformDefineComponent(node, parent, options) {
|
|
|
24
22
|
|
|
25
23
|
//#endregion
|
|
26
24
|
//#region src/volar/define-style.ts
|
|
27
|
-
function transformDefineStyle(
|
|
28
|
-
if (!defineStyles?.length) return;
|
|
25
|
+
function transformDefineStyle({ expression, isCssModules }, index, options) {
|
|
29
26
|
const { ts, codes, ast } = options;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
addEmbeddedCode(expression, index, options);
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
function* generateCssClassesType(css, offset, index) {
|
|
36
|
-
for (const className of [...parseCssClassNames(css)]) yield* generateClassProperty(index, className.text, className.offset + offset, "string");
|
|
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)).map(({ text }) => `\n'${text.slice(1)}': string`), "\n}>");
|
|
28
|
+
addEmbeddedCode(expression, index, options);
|
|
37
29
|
}
|
|
38
30
|
function addEmbeddedCode(expression, index, options) {
|
|
39
31
|
const { ts, ast } = options;
|
|
@@ -64,16 +56,33 @@ function addEmbeddedCode(expression, index, options) {
|
|
|
64
56
|
embeddedCodes: []
|
|
65
57
|
});
|
|
66
58
|
}
|
|
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
|
+
}
|
|
67
75
|
|
|
68
76
|
//#endregion
|
|
69
77
|
//#region src/volar/transform.ts
|
|
70
78
|
function transformJsxMacros(rootMap, options) {
|
|
71
79
|
const { ts, codes, ast } = options;
|
|
72
|
-
|
|
73
|
-
|
|
80
|
+
let defineStyleIndex = 0;
|
|
81
|
+
for (const [root, macros] of rootMap) {
|
|
82
|
+
macros.defineStyle?.forEach((defaultStyle) => transformDefineStyle(defaultStyle, defineStyleIndex++, options));
|
|
74
83
|
if (!root?.body) continue;
|
|
75
84
|
const asyncModifier = root.modifiers?.find((modifier) => modifier.kind === ts.SyntaxKind.AsyncKeyword);
|
|
76
|
-
if (asyncModifier &&
|
|
85
|
+
if (asyncModifier && macros.defineComponent) replaceRange(codes, asyncModifier.pos, asyncModifier.end);
|
|
77
86
|
const result = `({}) as __VLS_PickNotAny<typeof ${HELPER_PREFIX}ctx.render, {}> & { __ctx: typeof ${HELPER_PREFIX}ctx }`;
|
|
78
87
|
const propsType = root.parameters[0]?.type ? String(root.parameters[0].type.getText(ast)) : "{}";
|
|
79
88
|
replaceRange(codes, root.parameters.pos, root.parameters.pos, ts.isArrowFunction(root) && root.parameters.pos === root.pos ? "(" : "", `${HELPER_PREFIX}props: typeof ${HELPER_PREFIX}ctx.props & ${propsType}, `, `${HELPER_PREFIX}placeholder?: {}, `, `${HELPER_PREFIX}ctx = {} as Awaited<ReturnType<typeof ${HELPER_PREFIX}setup>>, `, `${HELPER_PREFIX}setup = (${asyncModifier ? "async" : ""}(`);
|
|
@@ -84,16 +93,16 @@ function transformJsxMacros(rootMap, options) {
|
|
|
84
93
|
}
|
|
85
94
|
ts.forEachChild(root.body, (node) => {
|
|
86
95
|
if (ts.isReturnStatement(node) && node.expression) {
|
|
87
|
-
const props = [...
|
|
96
|
+
const props = [...macros.defineModel ?? []];
|
|
88
97
|
const elements = root.parameters[0] && !root.parameters[0].type && ts.isObjectBindingPattern(root.parameters[0].name) ? root.parameters[0].name.elements : [];
|
|
89
98
|
for (const element of elements) if (ts.isIdentifier(element.name)) props.push(`${element.name.escapedText}${element.initializer && ts.isNonNullExpression(element.initializer) ? ":" : "?:"} typeof ${element.name.escapedText}`);
|
|
90
|
-
const shouldWrapByCall = (ts.isArrowFunction(node.expression) || ts.isFunctionExpression(node.expression)) &&
|
|
99
|
+
const shouldWrapByCall = (ts.isArrowFunction(node.expression) || ts.isFunctionExpression(node.expression)) && macros.defineComponent;
|
|
91
100
|
replaceRange(codes, node.getStart(ast), node.expression.getStart(ast), `const ${HELPER_PREFIX}render = `, shouldWrapByCall ? "(" : "");
|
|
92
101
|
replaceRange(codes, node.expression.end, node.expression.end, shouldWrapByCall ? ")()" : "", `
|
|
93
102
|
return {
|
|
94
103
|
props: {} as {${props.join(", ")}},
|
|
95
|
-
slots: {} as ${
|
|
96
|
-
expose: (exposed: import('vue').ShallowUnwrapRef<${
|
|
104
|
+
slots: {} as ${macros.defineSlots ?? "{}"},
|
|
105
|
+
expose: (exposed: import('vue').ShallowUnwrapRef<${macros.defineExpose ?? "{}"}>) => {},
|
|
97
106
|
render: ${HELPER_PREFIX}render,
|
|
98
107
|
}`);
|
|
99
108
|
}
|
|
@@ -115,7 +124,6 @@ ${defineSlots}
|
|
|
115
124
|
${defineExpose}
|
|
116
125
|
${defineStyle}
|
|
117
126
|
type ${HELPER_PREFIX}StyleArgs = [style: string, options?: { scoped?: boolean }];
|
|
118
|
-
type ${HELPER_PREFIX}PrettifyLocal<T> = { [K in keyof T]: T[K]; } & {};
|
|
119
127
|
// @ts-ignore
|
|
120
128
|
type __VLS_IsAny<T> = 0 extends 1 & T ? true : false; type __VLS_PickNotAny<A, B> = __VLS_IsAny<A> extends true ? B : A;
|
|
121
129
|
`;
|
|
@@ -162,11 +170,6 @@ function getRootMap(options) {
|
|
|
162
170
|
const { ts, ast, codes } = options;
|
|
163
171
|
const rootMap = new Map();
|
|
164
172
|
function walk(node, parents) {
|
|
165
|
-
ts.forEachChild(node, (child) => {
|
|
166
|
-
parents.unshift(node);
|
|
167
|
-
walk(child, parents);
|
|
168
|
-
parents.shift();
|
|
169
|
-
});
|
|
170
173
|
const root = parents[1] && (ts.isArrowFunction(parents[1]) || ts.isFunctionExpression(parents[1]) || ts.isFunctionDeclaration(parents[1])) ? parents[1] : void 0;
|
|
171
174
|
if (root && parents[2] && ts.isCallExpression(parents[2]) && !parents[2].typeArguments && options.defineComponent.alias.includes(parents[2].expression.getText(ast))) {
|
|
172
175
|
if (!rootMap.has(root)) rootMap.set(root, {});
|
|
@@ -176,40 +179,50 @@ function getRootMap(options) {
|
|
|
176
179
|
}
|
|
177
180
|
}
|
|
178
181
|
const macro = getMacro(node, ts, options);
|
|
179
|
-
if (
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
182
|
+
if (macro) {
|
|
183
|
+
const { expression, initializer } = macro;
|
|
184
|
+
let isRequired = macro.isRequired;
|
|
185
|
+
if (!rootMap.has(root)) rootMap.set(root, {});
|
|
186
|
+
const macroName = expression.expression.getText(ast);
|
|
187
|
+
if (macroName.startsWith("defineStyle")) {
|
|
188
|
+
(rootMap.get(root).defineStyle ??= []).push({
|
|
189
|
+
expression,
|
|
190
|
+
isCssModules: ts.isVariableStatement(node)
|
|
191
|
+
});
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
if (root) {
|
|
195
|
+
if (options.defineModel.alias.includes(macroName)) {
|
|
196
|
+
const modelName = expression.arguments[0] && ts.isStringLiteralLike(expression.arguments[0]) ? expression.arguments[0].text : "modelValue";
|
|
197
|
+
const modelOptions = expression.arguments[0] && ts.isStringLiteralLike(expression.arguments[0]) ? expression.arguments[1] : expression.arguments[0];
|
|
198
|
+
if (modelOptions && ts.isObjectLiteralExpression(modelOptions)) {
|
|
199
|
+
let hasRequired = false;
|
|
200
|
+
for (const prop of modelOptions.properties) if (ts.isPropertyAssignment(prop) && prop.name.getText(ast) === "required") {
|
|
201
|
+
hasRequired = true;
|
|
202
|
+
isRequired = prop.initializer.kind === ts.SyntaxKind.TrueKeyword;
|
|
203
|
+
}
|
|
204
|
+
if (!hasRequired && isRequired) replaceRange(codes, modelOptions.end - 1, modelOptions.end - 1, `${!modelOptions.properties.hasTrailingComma && modelOptions.properties.length ? "," : ""} required: true`);
|
|
205
|
+
} else if (isRequired) replaceRange(codes, expression.arguments.end, expression.arguments.end, `${!expression.arguments.hasTrailingComma && expression.arguments.length ? "," : ""} { required: true }`);
|
|
206
|
+
const id = toValidAssetId(modelName, `${HELPER_PREFIX}model`);
|
|
207
|
+
const typeString = `import('vue').UnwrapRef<typeof ${id}>`;
|
|
208
|
+
const defineModel = rootMap.get(root).defineModel ??= [];
|
|
209
|
+
defineModel.push(`${modelName.includes("-") ? `'${modelName}'` : modelName}${isRequired ? ":" : "?:"} ${typeString}`, `'onUpdate:${modelName}'?: ($event: ${typeString}) => any`);
|
|
210
|
+
if (expression.typeArguments?.[1]) defineModel.push(`${modelName}Modifiers?: Partial<Record<${expression.typeArguments[1].getText(ast)}, boolean>>`);
|
|
211
|
+
if (ts.isVariableStatement(node)) replaceRange(codes, initializer.getStart(ast), initializer.getStart(ast), `// @ts-ignore\n${id};\nlet ${id} = `);
|
|
212
|
+
} else if (options.defineSlots.alias.includes(macroName)) {
|
|
213
|
+
replaceRange(codes, expression.getStart(ast), expression.getStart(ast), `// @ts-ignore\n${HELPER_PREFIX}slots;\nconst ${HELPER_PREFIX}slots = `);
|
|
214
|
+
rootMap.get(root).defineSlots = `Partial<typeof ${HELPER_PREFIX}slots>`;
|
|
215
|
+
} else if (options.defineExpose.alias.includes(macroName)) {
|
|
216
|
+
replaceRange(codes, expression.getStart(ast), expression.getStart(ast), `// @ts-ignore\n${HELPER_PREFIX}exposed;\nconst ${HELPER_PREFIX}exposed = `);
|
|
217
|
+
rootMap.get(root).defineExpose = `typeof ${HELPER_PREFIX}exposed`;
|
|
197
218
|
}
|
|
198
|
-
|
|
199
|
-
} else if (isRequired) replaceRange(codes, expression.arguments.end, expression.arguments.end, `${!expression.arguments.hasTrailingComma && expression.arguments.length ? "," : ""} { required: true }`);
|
|
200
|
-
const id = toValidAssetId(modelName, `${HELPER_PREFIX}model`);
|
|
201
|
-
const typeString = `import('vue').UnwrapRef<typeof ${id}>`;
|
|
202
|
-
const defineModel = rootMap.get(root).defineModel ??= [];
|
|
203
|
-
defineModel.push(`${modelName.includes("-") ? `'${modelName}'` : modelName}${isRequired ? ":" : "?:"} ${typeString}`, `'onUpdate:${modelName}'?: ($event: ${typeString}) => any`);
|
|
204
|
-
if (expression.typeArguments?.[1]) defineModel.push(`${modelName}Modifiers?: Partial<Record<${expression.typeArguments[1].getText(ast)}, boolean>>`);
|
|
205
|
-
replaceRange(codes, initializer.getStart(ast), initializer.getStart(ast), `// @ts-ignore\n${id};\nlet ${id} = `);
|
|
206
|
-
} else if (options.defineSlots.alias.includes(macroName)) {
|
|
207
|
-
replaceRange(codes, expression.getStart(ast), expression.getStart(ast), `// @ts-ignore\n${HELPER_PREFIX}slots;\nconst ${HELPER_PREFIX}slots = `);
|
|
208
|
-
rootMap.get(root).defineSlots = `Partial<typeof ${HELPER_PREFIX}slots>`;
|
|
209
|
-
} else if (options.defineExpose.alias.includes(macroName)) {
|
|
210
|
-
replaceRange(codes, expression.getStart(ast), expression.getStart(ast), `// @ts-ignore\n${HELPER_PREFIX}exposed;\nconst ${HELPER_PREFIX}exposed = `);
|
|
211
|
-
rootMap.get(root).defineExpose = `typeof ${HELPER_PREFIX}exposed`;
|
|
219
|
+
}
|
|
212
220
|
}
|
|
221
|
+
ts.forEachChild(node, (child) => {
|
|
222
|
+
parents.unshift(node);
|
|
223
|
+
walk(child, parents);
|
|
224
|
+
parents.shift();
|
|
225
|
+
});
|
|
213
226
|
}
|
|
214
227
|
ts.forEachChild(ast, (node) => walk(node, []));
|
|
215
228
|
return rootMap;
|
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-C740HxiF.cjs');
|
|
3
|
+
require('./raw-BXpT71mV.cjs');
|
|
4
|
+
require('./options-BSX_vMxh.cjs');
|
|
5
|
+
require('./src-2EUAmvRo.cjs');
|
|
6
|
+
const require_webpack = require('./webpack-qmJC3FBB.cjs');
|
|
7
7
|
|
|
8
8
|
exports.default = require_webpack.webpack_default
|
package/dist/webpack.d.cts
CHANGED
package/dist/webpack.d.ts
CHANGED
package/dist/webpack.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./core-
|
|
2
|
-
import "./raw-
|
|
3
|
-
import "./options-
|
|
4
|
-
import "./src-
|
|
5
|
-
import { webpack_default } from "./webpack-
|
|
1
|
+
import "./core-CHBxRAvb.js";
|
|
2
|
+
import "./raw-Hr7QYA0U.js";
|
|
3
|
+
import "./options-BWRkHmm5.js";
|
|
4
|
+
import "./src-BDMVJUXS.js";
|
|
5
|
+
import { webpack_default } from "./webpack-C78RZrII.js";
|
|
6
6
|
|
|
7
7
|
export { webpack_default as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue-jsx-vapor/macros",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.5",
|
|
4
4
|
"description": "Macros for Vue JSX Vapor",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -169,7 +169,6 @@
|
|
|
169
169
|
"dependencies": {
|
|
170
170
|
"@vue-macros/common": "^3.0.0-beta.10",
|
|
171
171
|
"@vue/compiler-sfc": "https://pkg.pr.new/@vue/compiler-sfc@42f38ca",
|
|
172
|
-
"@vue/language-core": "^2.2.8",
|
|
173
172
|
"hash-sum": "^2.0.0",
|
|
174
173
|
"ts-macro": "^0.1.25",
|
|
175
174
|
"unplugin": "^2.2.2"
|
package/dist/options-pbSvpKdV.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { REGEX_NODE_MODULES, REGEX_SETUP_SFC, REGEX_SRC_FILE } from "@vue-macros/common";
|
|
2
|
-
|
|
3
|
-
//#region src/options.ts
|
|
4
|
-
function resolveOptions(options) {
|
|
5
|
-
const version = options.version || 3.6;
|
|
6
|
-
return {
|
|
7
|
-
include: [REGEX_SRC_FILE],
|
|
8
|
-
exclude: [REGEX_SETUP_SFC, REGEX_NODE_MODULES],
|
|
9
|
-
...options,
|
|
10
|
-
version,
|
|
11
|
-
defineComponent: { alias: options?.defineComponent?.alias ?? ["defineComponent", "defineVaporComponent"] },
|
|
12
|
-
defineModel: { alias: options?.defineModel?.alias ?? ["defineModel"] },
|
|
13
|
-
defineSlots: { alias: options?.defineSlots?.alias ?? ["defineSlots"] },
|
|
14
|
-
defineExpose: { alias: options?.defineExpose?.alias ?? ["defineExpose"] },
|
|
15
|
-
defineStyle: { alias: options?.defineStyle?.alias ?? ["defineStyle"] }
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
//#endregion
|
|
20
|
-
export { resolveOptions };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { BaseOptions, MarkRequired } from "@vue-macros/common";
|
|
2
|
-
|
|
3
|
-
//#region src/options.d.ts
|
|
4
|
-
type Options = BaseOptions & {
|
|
5
|
-
defineComponent?: {
|
|
6
|
-
alias: string[];
|
|
7
|
-
autoReturnFunction?: boolean;
|
|
8
|
-
};
|
|
9
|
-
defineModel?: {
|
|
10
|
-
alias: string[];
|
|
11
|
-
};
|
|
12
|
-
defineExpose?: {
|
|
13
|
-
alias: string[];
|
|
14
|
-
};
|
|
15
|
-
defineSlots?: {
|
|
16
|
-
alias: string[];
|
|
17
|
-
};
|
|
18
|
-
defineStyle?: {
|
|
19
|
-
alias: string[];
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
type OptionsResolved = MarkRequired<Options, 'include' | 'version' | 'defineComponent' | 'defineModel' | 'defineExpose' | 'defineSlots' | 'defineStyle'>;
|
|
23
|
-
declare function resolveOptions(options: Options): OptionsResolved;
|
|
24
|
-
|
|
25
|
-
//#endregion
|
|
26
|
-
export { Options, OptionsResolved, resolveOptions };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { BaseOptions, MarkRequired } from "@vue-macros/common";
|
|
2
|
-
|
|
3
|
-
//#region src/options.d.ts
|
|
4
|
-
type Options = BaseOptions & {
|
|
5
|
-
defineComponent?: {
|
|
6
|
-
alias: string[];
|
|
7
|
-
autoReturnFunction?: boolean;
|
|
8
|
-
};
|
|
9
|
-
defineModel?: {
|
|
10
|
-
alias: string[];
|
|
11
|
-
};
|
|
12
|
-
defineExpose?: {
|
|
13
|
-
alias: string[];
|
|
14
|
-
};
|
|
15
|
-
defineSlots?: {
|
|
16
|
-
alias: string[];
|
|
17
|
-
};
|
|
18
|
-
defineStyle?: {
|
|
19
|
-
alias: string[];
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
type OptionsResolved = MarkRequired<Options, 'include' | 'version' | 'defineComponent' | 'defineModel' | 'defineExpose' | 'defineSlots' | 'defineStyle'>;
|
|
23
|
-
declare function resolveOptions(options: Options): OptionsResolved;
|
|
24
|
-
|
|
25
|
-
//#endregion
|
|
26
|
-
export { Options, OptionsResolved, resolveOptions as resolveOptions$1 };
|