@vue-jsx-vapor/macros 2.6.2 → 2.6.3
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/esbuild.d.cts +2 -2
- package/dist/esbuild.d.ts +2 -2
- package/dist/nuxt.d.cts +2 -2
- package/dist/nuxt.d.ts +2 -2
- package/dist/rolldown.d.cts +2 -2
- package/dist/rolldown.d.ts +2 -2
- package/dist/rollup.d.cts +2 -2
- package/dist/rollup.d.ts +2 -2
- package/dist/vite.d.cts +2 -2
- package/dist/vite.d.ts +2 -2
- package/dist/volar.cjs +18 -26
- package/dist/volar.js +18 -26
- package/dist/webpack.d.cts +2 -2
- package/dist/webpack.d.ts +2 -2
- package/package.json +8 -8
package/dist/esbuild.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Options } from "./options-Egmm6BVJ.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as esbuild12 from "esbuild";
|
|
3
3
|
|
|
4
4
|
//#region src/esbuild.d.ts
|
|
5
|
-
declare const _default: (options?: Options | undefined) =>
|
|
5
|
+
declare const _default: (options?: Options | undefined) => esbuild12.Plugin;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { _default as default };
|
package/dist/esbuild.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Options } from "./options-K4yleEdU.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as esbuild7 from "esbuild";
|
|
3
3
|
|
|
4
4
|
//#region src/esbuild.d.ts
|
|
5
|
-
declare const _default: (options?: Options | undefined) =>
|
|
5
|
+
declare const _default: (options?: Options | undefined) => esbuild7.Plugin;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { _default as default };
|
package/dist/nuxt.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Options } from "./options-Egmm6BVJ.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _nuxt_schema1 from "@nuxt/schema";
|
|
3
3
|
|
|
4
4
|
//#region src/nuxt.d.ts
|
|
5
5
|
interface ModuleOptions extends Options {}
|
|
6
|
-
declare const _default:
|
|
6
|
+
declare const _default: _nuxt_schema1.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
7
7
|
//#endregion
|
|
8
8
|
export { ModuleOptions, _default as default };
|
package/dist/nuxt.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Options } from "./options-K4yleEdU.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _nuxt_schema14 from "@nuxt/schema";
|
|
3
3
|
|
|
4
4
|
//#region src/nuxt.d.ts
|
|
5
5
|
interface ModuleOptions extends Options {}
|
|
6
|
-
declare const _default:
|
|
6
|
+
declare const _default: _nuxt_schema14.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
7
7
|
//#endregion
|
|
8
8
|
export { ModuleOptions, _default as default };
|
package/dist/rolldown.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Options } from "./options-Egmm6BVJ.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as unplugin3 from "unplugin";
|
|
3
3
|
|
|
4
4
|
//#region src/rolldown.d.ts
|
|
5
|
-
declare const _default: (options?: Options | undefined) =>
|
|
5
|
+
declare const _default: (options?: Options | undefined) => unplugin3.RolldownPlugin<any> | unplugin3.RolldownPlugin<any>[];
|
|
6
6
|
//#endregion
|
|
7
7
|
export { _default as default };
|
package/dist/rolldown.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Options } from "./options-K4yleEdU.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as unplugin1 from "unplugin";
|
|
3
3
|
|
|
4
4
|
//#region src/rolldown.d.ts
|
|
5
|
-
declare const _default: (options?: Options | undefined) =>
|
|
5
|
+
declare const _default: (options?: Options | undefined) => unplugin1.RolldownPlugin<any> | unplugin1.RolldownPlugin<any>[];
|
|
6
6
|
//#endregion
|
|
7
7
|
export { _default as default };
|
package/dist/rollup.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Options } from "./options-Egmm6BVJ.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as rollup6 from "rollup";
|
|
3
3
|
|
|
4
4
|
//#region src/rollup.d.ts
|
|
5
|
-
declare const _default: (options?: Options | undefined) =>
|
|
5
|
+
declare const _default: (options?: Options | undefined) => rollup6.Plugin<any> | rollup6.Plugin<any>[];
|
|
6
6
|
//#endregion
|
|
7
7
|
export { _default as default };
|
package/dist/rollup.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Options } from "./options-K4yleEdU.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as rollup4 from "rollup";
|
|
3
3
|
|
|
4
4
|
//#region src/rollup.d.ts
|
|
5
|
-
declare const _default: (options?: Options | undefined) =>
|
|
5
|
+
declare const _default: (options?: Options | undefined) => rollup4.Plugin<any> | rollup4.Plugin<any>[];
|
|
6
6
|
//#endregion
|
|
7
7
|
export { _default as default };
|
package/dist/vite.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Options } from "./options-Egmm6BVJ.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vite9 from "vite";
|
|
3
3
|
|
|
4
4
|
//#region src/vite.d.ts
|
|
5
|
-
declare const _default: (options?: Options | undefined) =>
|
|
5
|
+
declare const _default: (options?: Options | undefined) => vite9.Plugin<any> | vite9.Plugin<any>[];
|
|
6
6
|
//#endregion
|
|
7
7
|
export { _default as default };
|
package/dist/vite.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Options } from "./options-K4yleEdU.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vite12 from "vite";
|
|
3
3
|
|
|
4
4
|
//#region src/vite.d.ts
|
|
5
|
-
declare const _default: (options?: Options | undefined) =>
|
|
5
|
+
declare const _default: (options?: Options | undefined) => vite12.Plugin<any> | vite12.Plugin<any>[];
|
|
6
6
|
//#endregion
|
|
7
7
|
export { _default as default };
|
package/dist/volar.cjs
CHANGED
|
@@ -14,31 +14,23 @@ function transformDefineComponent(node, parent, options) {
|
|
|
14
14
|
const __setup = `);
|
|
15
15
|
const result = (ts.isArrowFunction(comp) || ts.isFunctionExpression(comp)) && comp.typeParameters?.length ? ["\nreturn __setup"] : [
|
|
16
16
|
`
|
|
17
|
-
type
|
|
18
|
-
type
|
|
19
|
-
type
|
|
17
|
+
type __Setup = typeof __setup
|
|
18
|
+
type __Props = Parameters<__Setup>[0]
|
|
19
|
+
type __Slots = Parameters<__Setup>[1] extends { slots?: infer Slots } | undefined ? Slots : {}
|
|
20
|
+
type __Exposed = Parameters<__Setup>[1] extends { expose?: (exposed: infer Exposed) => any } | undefined ? Exposed : {}`,
|
|
20
21
|
"\n const __component = ",
|
|
22
|
+
isVapor ? `// @ts-ignore\n(defineVaporComponent,await import('vue-jsx-vapor')).` : "",
|
|
21
23
|
[node.expression.getText(ast), node.expression.getStart(ast)],
|
|
22
|
-
`({`,
|
|
23
|
-
|
|
24
|
-
setup: () => __Exposed,
|
|
25
|
-
|
|
24
|
+
`({\n`,
|
|
25
|
+
`...{} as {
|
|
26
|
+
setup: (props: __Props) => __Exposed,
|
|
27
|
+
render: () => ReturnType<__Setup>
|
|
28
|
+
slots: ${isVapor ? "__Slots" : `import('vue').SlotsType<__Slots>`}
|
|
26
29
|
},`,
|
|
27
30
|
...compOptions ? ["...", [compOptions.getText(ast), compOptions.getStart(ast)]] : [],
|
|
28
31
|
`})
|
|
29
|
-
|
|
30
|
-
$props: __Props
|
|
31
|
-
}
|
|
32
|
-
return {} as {
|
|
33
|
-
__isFragment?: never
|
|
34
|
-
__isTeleport?: never
|
|
35
|
-
__isSuspense?: never
|
|
36
|
-
new (props: __Props): __Instance,
|
|
37
|
-
setup: (props: __Props, ctx?: {
|
|
38
|
-
attrs?: Record<string, any>
|
|
39
|
-
slots?: __Slots,
|
|
40
|
-
expose?: (exposed: keyof __Exposed extends never ? __Instance : __Exposed) => any
|
|
41
|
-
}) => {},
|
|
32
|
+
return {} as Omit<typeof __component, 'constructor'> & {
|
|
33
|
+
new (props?: __Props): InstanceType<typeof __component> & {${isVapor ? "\n/** @deprecated This is only a type when used in Vapor Instances. */\n$props: __Props" : ""}},
|
|
42
34
|
}`
|
|
43
35
|
];
|
|
44
36
|
codes.replaceRange(node.end, node.end, ...result, `\n})()`);
|
|
@@ -136,16 +128,16 @@ function transformJsxMacros(rootMap, options) {
|
|
|
136
128
|
}
|
|
137
129
|
codes.replaceRange(node.getStart(ast), node.expression.getStart(ast), "const ", [
|
|
138
130
|
`__render`,
|
|
139
|
-
node.getStart(ast),
|
|
131
|
+
node.getStart(ast) - 1,
|
|
140
132
|
{ verification: true }
|
|
141
|
-
], macros.defineComponent ? macros.defineComponent?.expression.getText(ast) === "defineVaporComponent" ? "
|
|
133
|
+
], macros.defineComponent ? macros.defineComponent?.expression.getText(ast) === "defineVaporComponent" ? "" : ": () => JSX.Element" : "", " = ");
|
|
142
134
|
codes.replaceRange(node.expression.end, node.expression.end, `
|
|
143
135
|
return {} as {
|
|
144
136
|
props: {${props.join(", ")}},
|
|
145
|
-
context: {
|
|
146
|
-
slots
|
|
147
|
-
expose
|
|
148
|
-
attrs
|
|
137
|
+
context: ${root.parameters[1]?.type ? root.parameters[1].type.getText(ast) : "{}"} & {
|
|
138
|
+
slots: ${macros.defineSlots ?? "{}"},
|
|
139
|
+
expose: (exposed: ${macros.defineExpose ?? "{}"}) => void,
|
|
140
|
+
attrs: Record<string, any>
|
|
149
141
|
},
|
|
150
142
|
render: typeof __render
|
|
151
143
|
}`);
|
package/dist/volar.js
CHANGED
|
@@ -12,31 +12,23 @@ function transformDefineComponent(node, parent, options) {
|
|
|
12
12
|
const __setup = `);
|
|
13
13
|
const result = (ts.isArrowFunction(comp) || ts.isFunctionExpression(comp)) && comp.typeParameters?.length ? ["\nreturn __setup"] : [
|
|
14
14
|
`
|
|
15
|
-
type
|
|
16
|
-
type
|
|
17
|
-
type
|
|
15
|
+
type __Setup = typeof __setup
|
|
16
|
+
type __Props = Parameters<__Setup>[0]
|
|
17
|
+
type __Slots = Parameters<__Setup>[1] extends { slots?: infer Slots } | undefined ? Slots : {}
|
|
18
|
+
type __Exposed = Parameters<__Setup>[1] extends { expose?: (exposed: infer Exposed) => any } | undefined ? Exposed : {}`,
|
|
18
19
|
"\n const __component = ",
|
|
20
|
+
isVapor ? `// @ts-ignore\n(defineVaporComponent,await import('vue-jsx-vapor')).` : "",
|
|
19
21
|
[node.expression.getText(ast), node.expression.getStart(ast)],
|
|
20
|
-
`({`,
|
|
21
|
-
|
|
22
|
-
setup: () => __Exposed,
|
|
23
|
-
|
|
22
|
+
`({\n`,
|
|
23
|
+
`...{} as {
|
|
24
|
+
setup: (props: __Props) => __Exposed,
|
|
25
|
+
render: () => ReturnType<__Setup>
|
|
26
|
+
slots: ${isVapor ? "__Slots" : `import('vue').SlotsType<__Slots>`}
|
|
24
27
|
},`,
|
|
25
28
|
...compOptions ? ["...", [compOptions.getText(ast), compOptions.getStart(ast)]] : [],
|
|
26
29
|
`})
|
|
27
|
-
|
|
28
|
-
$props: __Props
|
|
29
|
-
}
|
|
30
|
-
return {} as {
|
|
31
|
-
__isFragment?: never
|
|
32
|
-
__isTeleport?: never
|
|
33
|
-
__isSuspense?: never
|
|
34
|
-
new (props: __Props): __Instance,
|
|
35
|
-
setup: (props: __Props, ctx?: {
|
|
36
|
-
attrs?: Record<string, any>
|
|
37
|
-
slots?: __Slots,
|
|
38
|
-
expose?: (exposed: keyof __Exposed extends never ? __Instance : __Exposed) => any
|
|
39
|
-
}) => {},
|
|
30
|
+
return {} as Omit<typeof __component, 'constructor'> & {
|
|
31
|
+
new (props?: __Props): InstanceType<typeof __component> & {${isVapor ? "\n/** @deprecated This is only a type when used in Vapor Instances. */\n$props: __Props" : ""}},
|
|
40
32
|
}`
|
|
41
33
|
];
|
|
42
34
|
codes.replaceRange(node.end, node.end, ...result, `\n})()`);
|
|
@@ -134,16 +126,16 @@ function transformJsxMacros(rootMap, options) {
|
|
|
134
126
|
}
|
|
135
127
|
codes.replaceRange(node.getStart(ast), node.expression.getStart(ast), "const ", [
|
|
136
128
|
`__render`,
|
|
137
|
-
node.getStart(ast),
|
|
129
|
+
node.getStart(ast) - 1,
|
|
138
130
|
{ verification: true }
|
|
139
|
-
], macros.defineComponent ? macros.defineComponent?.expression.getText(ast) === "defineVaporComponent" ? "
|
|
131
|
+
], macros.defineComponent ? macros.defineComponent?.expression.getText(ast) === "defineVaporComponent" ? "" : ": () => JSX.Element" : "", " = ");
|
|
140
132
|
codes.replaceRange(node.expression.end, node.expression.end, `
|
|
141
133
|
return {} as {
|
|
142
134
|
props: {${props.join(", ")}},
|
|
143
|
-
context: {
|
|
144
|
-
slots
|
|
145
|
-
expose
|
|
146
|
-
attrs
|
|
135
|
+
context: ${root.parameters[1]?.type ? root.parameters[1].type.getText(ast) : "{}"} & {
|
|
136
|
+
slots: ${macros.defineSlots ?? "{}"},
|
|
137
|
+
expose: (exposed: ${macros.defineExpose ?? "{}"}) => void,
|
|
138
|
+
attrs: Record<string, any>
|
|
147
139
|
},
|
|
148
140
|
render: typeof __render
|
|
149
141
|
}`);
|
package/dist/webpack.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Options } from "./options-Egmm6BVJ.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as webpack14 from "webpack";
|
|
3
3
|
|
|
4
4
|
//#region src/webpack.d.ts
|
|
5
|
-
declare const _default: (options?: Options | undefined) =>
|
|
5
|
+
declare const _default: (options?: Options | undefined) => webpack14.WebpackPluginInstance;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { _default as default };
|
package/dist/webpack.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Options } from "./options-K4yleEdU.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as webpack10 from "webpack";
|
|
3
3
|
|
|
4
4
|
//#region src/webpack.d.ts
|
|
5
|
-
declare const _default: (options?: Options | undefined) =>
|
|
5
|
+
declare const _default: (options?: Options | undefined) => webpack10.WebpackPluginInstance;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { _default as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue-jsx-vapor/macros",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.3",
|
|
4
4
|
"description": "Macros for Vue JSX Vapor",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -131,18 +131,18 @@
|
|
|
131
131
|
}
|
|
132
132
|
},
|
|
133
133
|
"dependencies": {
|
|
134
|
-
"@vue-macros/common": "^3.0.0-beta.
|
|
134
|
+
"@vue-macros/common": "^3.0.0-beta.23",
|
|
135
135
|
"@vue/compiler-sfc": "3.6.0-alpha.2",
|
|
136
136
|
"hash-sum": "^2.0.0",
|
|
137
|
-
"ts-macro": "^0.3.
|
|
138
|
-
"unplugin": "^2.3.
|
|
137
|
+
"ts-macro": "^0.3.4",
|
|
138
|
+
"unplugin": "^2.3.10"
|
|
139
139
|
},
|
|
140
140
|
"devDependencies": {
|
|
141
|
-
"@babel/types": "^7.28.
|
|
142
|
-
"@nuxt/kit": "^3.
|
|
143
|
-
"@nuxt/schema": "^3.
|
|
141
|
+
"@babel/types": "^7.28.4",
|
|
142
|
+
"@nuxt/kit": "^3.19.1",
|
|
143
|
+
"@nuxt/schema": "^3.19.1",
|
|
144
144
|
"@types/hash-sum": "^1.0.2",
|
|
145
|
-
"@vue-macros/test-utils": "^3.0.0-beta.
|
|
145
|
+
"@vue-macros/test-utils": "^3.0.0-beta.23",
|
|
146
146
|
"vue": "3.6.0-alpha.2"
|
|
147
147
|
},
|
|
148
148
|
"scripts": {
|