@vue-jsx-vapor/macros 2.6.3 → 2.6.6
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.js +1 -1
- package/dist/astro.cjs +3 -3
- package/dist/astro.js +3 -3
- package/dist/{core-BGMj1zaw.cjs → core-CJ6kVBLh.cjs} +5 -3
- package/dist/{core-u2ydd_-y.js → core-IZ-lh7Ab.js} +5 -3
- package/dist/esbuild.cjs +3 -3
- package/dist/esbuild.d.cts +2 -2
- package/dist/esbuild.js +3 -3
- package/dist/index.cjs +3 -3
- package/dist/index.js +3 -3
- package/dist/nuxt.cjs +5 -5
- package/dist/nuxt.d.cts +2 -2
- package/dist/nuxt.d.ts +2 -2
- package/dist/nuxt.js +5 -5
- package/dist/{raw-Dprh1tIQ.js → raw-BzMrHm2x.js} +1 -1
- package/dist/{raw-V1VJGrnC.cjs → raw-D-cvhDxp.cjs} +1 -1
- package/dist/raw.cjs +2 -2
- package/dist/raw.js +2 -2
- package/dist/rolldown.cjs +3 -3
- package/dist/rolldown.d.cts +2 -2
- package/dist/rolldown.js +3 -3
- package/dist/rollup.cjs +3 -3
- package/dist/rollup.d.cts +2 -2
- package/dist/rollup.d.ts +2 -2
- package/dist/rollup.js +3 -3
- package/dist/rspack.cjs +3 -3
- package/dist/rspack.js +3 -3
- package/dist/{src-9_QEflZu.js → src-COtQ0Dxh.js} +1 -1
- package/dist/{src-Zbpeaztk.cjs → src-sczI65zX.cjs} +1 -1
- package/dist/{vite-BX_gYdbF.cjs → vite-BPouBS8o.cjs} +1 -1
- package/dist/{vite-DMiSdzmA.js → vite-C-w3oGdz.js} +1 -1
- package/dist/vite.cjs +4 -4
- package/dist/vite.d.cts +2 -2
- package/dist/vite.d.ts +2 -2
- package/dist/vite.js +4 -4
- package/dist/volar.cjs +3 -3
- package/dist/volar.js +3 -3
- package/dist/{webpack-337kgHM4.cjs → webpack-4fI2h8AS.cjs} +1 -1
- package/dist/{webpack-BijR4yVK.js → webpack-BiwlEwnr.js} +1 -1
- package/dist/webpack.cjs +4 -4
- package/dist/webpack.d.cts +2 -2
- package/dist/webpack.d.ts +2 -2
- package/dist/webpack.js +4 -4
- package/package.json +6 -6
package/dist/api.cjs
CHANGED
package/dist/api.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { getMacroExpression, isFunctionalNode, restructure, transformJsxMacros } from "./core-
|
|
1
|
+
import { getMacroExpression, isFunctionalNode, restructure, transformJsxMacros } from "./core-IZ-lh7Ab.js";
|
|
2
2
|
|
|
3
3
|
export { getMacroExpression, isFunctionalNode, restructure, transformJsxMacros };
|
package/dist/astro.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
require('./core-
|
|
3
|
-
require('./raw-
|
|
2
|
+
require('./core-CJ6kVBLh.cjs');
|
|
3
|
+
require('./raw-D-cvhDxp.cjs');
|
|
4
4
|
require('./options-BejTnOdM.cjs');
|
|
5
|
-
const require_src = require('./src-
|
|
5
|
+
const require_src = require('./src-sczI65zX.cjs');
|
|
6
6
|
|
|
7
7
|
//#region src/astro.ts
|
|
8
8
|
var astro_default = (options) => ({
|
package/dist/astro.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./core-
|
|
2
|
-
import "./raw-
|
|
1
|
+
import "./core-IZ-lh7Ab.js";
|
|
2
|
+
import "./raw-BzMrHm2x.js";
|
|
3
3
|
import "./options-BWRkHmm5.js";
|
|
4
|
-
import { src_default } from "./src-
|
|
4
|
+
import { src_default } from "./src-COtQ0Dxh.js";
|
|
5
5
|
|
|
6
6
|
//#region src/astro.ts
|
|
7
7
|
var astro_default = (options) => ({
|
|
@@ -11,7 +11,7 @@ var with_defaults_default = "function resolveDefaultProps(paths) {\n const resu
|
|
|
11
11
|
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region src/core/helper/index.ts
|
|
14
|
-
const helperPrefix = "vue-jsx-vapor/macros";
|
|
14
|
+
const helperPrefix = "/vue-jsx-vapor/macros";
|
|
15
15
|
const useModelHelperId = `${helperPrefix}/use-model`;
|
|
16
16
|
const withDefaultsHelperId = `${helperPrefix}/with-defaults`;
|
|
17
17
|
|
|
@@ -177,7 +177,7 @@ function transformDefineComponent(root, propsName, macros, s, autoReturnFunction
|
|
|
177
177
|
if (root.params[0].type === "Identifier") {
|
|
178
178
|
getWalkedIds(root, propsName).forEach((id) => props[id] = null);
|
|
179
179
|
prependFunctionalNode(root, s, `const ${propsName} = ${(0, __vue_macros_common.importHelperFn)(s, 0, "useFullProps", void 0, "vue-jsx-vapor")}()`);
|
|
180
|
-
s.overwrite(root.params[0].start, root.params[0].end, root.params.length > 1 ? `${__vue_macros_common.HELPER_PREFIX}props` : "");
|
|
180
|
+
s.overwrite(root.params[0].start, root.params[0].end, root.params.length > 1 ? `${__vue_macros_common.HELPER_PREFIX}props` : root.start === root.params[0].start ? "()" : "");
|
|
181
181
|
} else if (root.params[0].type === "ObjectPattern") {
|
|
182
182
|
const restructuredProps = root.params[0];
|
|
183
183
|
for (const prop of restructuredProps.properties) {
|
|
@@ -387,7 +387,9 @@ function toCssVarId(name, prefix = "") {
|
|
|
387
387
|
//#region src/core/index.ts
|
|
388
388
|
function transformJsxMacros(code, id, importMap, options) {
|
|
389
389
|
const s = new __vue_macros_common.MagicStringAST(code);
|
|
390
|
-
const
|
|
390
|
+
const lang = (0, __vue_macros_common.getLang)(id);
|
|
391
|
+
if (lang === "dts") return;
|
|
392
|
+
const ast = (0, __vue_macros_common.babelParse)(s.original, lang);
|
|
391
393
|
const rootMap = getRootMap(ast, s, options);
|
|
392
394
|
let defineStyleIndex = 0;
|
|
393
395
|
for (const [root, macros] of rootMap) {
|
|
@@ -10,7 +10,7 @@ var with_defaults_default = "function resolveDefaultProps(paths) {\n const resu
|
|
|
10
10
|
|
|
11
11
|
//#endregion
|
|
12
12
|
//#region src/core/helper/index.ts
|
|
13
|
-
const helperPrefix = "vue-jsx-vapor/macros";
|
|
13
|
+
const helperPrefix = "/vue-jsx-vapor/macros";
|
|
14
14
|
const useModelHelperId = `${helperPrefix}/use-model`;
|
|
15
15
|
const withDefaultsHelperId = `${helperPrefix}/with-defaults`;
|
|
16
16
|
|
|
@@ -176,7 +176,7 @@ function transformDefineComponent(root, propsName, macros, s, autoReturnFunction
|
|
|
176
176
|
if (root.params[0].type === "Identifier") {
|
|
177
177
|
getWalkedIds(root, propsName).forEach((id) => props[id] = null);
|
|
178
178
|
prependFunctionalNode(root, s, `const ${propsName} = ${importHelperFn(s, 0, "useFullProps", void 0, "vue-jsx-vapor")}()`);
|
|
179
|
-
s.overwrite(root.params[0].start, root.params[0].end, root.params.length > 1 ? `${HELPER_PREFIX}props` : "");
|
|
179
|
+
s.overwrite(root.params[0].start, root.params[0].end, root.params.length > 1 ? `${HELPER_PREFIX}props` : root.start === root.params[0].start ? "()" : "");
|
|
180
180
|
} else if (root.params[0].type === "ObjectPattern") {
|
|
181
181
|
const restructuredProps = root.params[0];
|
|
182
182
|
for (const prop of restructuredProps.properties) {
|
|
@@ -386,7 +386,9 @@ function toCssVarId(name, prefix = "") {
|
|
|
386
386
|
//#region src/core/index.ts
|
|
387
387
|
function transformJsxMacros(code, id, importMap, options) {
|
|
388
388
|
const s = new MagicStringAST(code);
|
|
389
|
-
const
|
|
389
|
+
const lang = getLang(id);
|
|
390
|
+
if (lang === "dts") return;
|
|
391
|
+
const ast = babelParse(s.original, lang);
|
|
390
392
|
const rootMap = getRootMap(ast, s, options);
|
|
391
393
|
let defineStyleIndex = 0;
|
|
392
394
|
for (const [root, macros] of rootMap) {
|
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-CJ6kVBLh.cjs');
|
|
3
|
+
require('./raw-D-cvhDxp.cjs');
|
|
4
4
|
require('./options-BejTnOdM.cjs');
|
|
5
|
-
const require_src = require('./src-
|
|
5
|
+
const require_src = require('./src-sczI65zX.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,7 +1,7 @@
|
|
|
1
1
|
import { Options } from "./options-Egmm6BVJ.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as esbuild1 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) => esbuild1.Plugin;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { _default as default };
|
package/dist/esbuild.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./core-
|
|
2
|
-
import "./raw-
|
|
1
|
+
import "./core-IZ-lh7Ab.js";
|
|
2
|
+
import "./raw-BzMrHm2x.js";
|
|
3
3
|
import "./options-BWRkHmm5.js";
|
|
4
|
-
import { src_default } from "./src-
|
|
4
|
+
import { src_default } from "./src-COtQ0Dxh.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-CJ6kVBLh.cjs');
|
|
3
|
+
require('./raw-D-cvhDxp.cjs');
|
|
4
4
|
const require_options = require('./options-BejTnOdM.cjs');
|
|
5
|
-
const require_src = require('./src-
|
|
5
|
+
const require_src = require('./src-sczI65zX.cjs');
|
|
6
6
|
|
|
7
7
|
exports.default = require_src.src_default;
|
|
8
8
|
exports.resolveOptions = require_options.resolveOptions;
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./core-
|
|
2
|
-
import "./raw-
|
|
1
|
+
import "./core-IZ-lh7Ab.js";
|
|
2
|
+
import "./raw-BzMrHm2x.js";
|
|
3
3
|
import { resolveOptions } from "./options-BWRkHmm5.js";
|
|
4
|
-
import { src_default } from "./src-
|
|
4
|
+
import { src_default } from "./src-COtQ0Dxh.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-CJ6kVBLh.cjs');
|
|
4
|
+
require('./raw-D-cvhDxp.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-sczI65zX.cjs');
|
|
7
|
+
const require_vite = require('./vite-BPouBS8o.cjs');
|
|
8
|
+
const require_webpack = require('./webpack-4fI2h8AS.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,8 +1,8 @@
|
|
|
1
1
|
import { Options } from "./options-Egmm6BVJ.cjs";
|
|
2
|
-
import * as
|
|
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:
|
|
6
|
+
declare const _default: _nuxt_schema2.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_schema12 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_schema12.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
7
7
|
//#endregion
|
|
8
8
|
export { ModuleOptions, _default as default };
|
package/dist/nuxt.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "./core-
|
|
2
|
-
import "./raw-
|
|
1
|
+
import "./core-IZ-lh7Ab.js";
|
|
2
|
+
import "./raw-BzMrHm2x.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-COtQ0Dxh.js";
|
|
5
|
+
import { vite_default } from "./vite-C-w3oGdz.js";
|
|
6
|
+
import { webpack_default } from "./webpack-BiwlEwnr.js";
|
|
7
7
|
import { addVitePlugin, addWebpackPlugin, defineNuxtModule } from "@nuxt/kit";
|
|
8
8
|
import "@nuxt/schema";
|
|
9
9
|
|
|
@@ -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-IZ-lh7Ab.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";
|
|
@@ -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-CJ6kVBLh.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"));
|
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-CJ6kVBLh.cjs');
|
|
3
|
+
const require_raw = require('./raw-D-cvhDxp.cjs');
|
|
4
4
|
require('./options-BejTnOdM.cjs');
|
|
5
5
|
|
|
6
6
|
exports.default = require_raw.raw_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-CJ6kVBLh.cjs');
|
|
3
|
+
require('./raw-D-cvhDxp.cjs');
|
|
4
4
|
require('./options-BejTnOdM.cjs');
|
|
5
|
-
const require_src = require('./src-
|
|
5
|
+
const require_src = require('./src-sczI65zX.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,7 +1,7 @@
|
|
|
1
1
|
import { Options } from "./options-Egmm6BVJ.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as unplugin8 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) => unplugin8.RolldownPlugin<any> | unplugin8.RolldownPlugin<any>[];
|
|
6
6
|
//#endregion
|
|
7
7
|
export { _default as default };
|
package/dist/rolldown.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./core-
|
|
2
|
-
import "./raw-
|
|
1
|
+
import "./core-IZ-lh7Ab.js";
|
|
2
|
+
import "./raw-BzMrHm2x.js";
|
|
3
3
|
import "./options-BWRkHmm5.js";
|
|
4
|
-
import { src_default } from "./src-
|
|
4
|
+
import { src_default } from "./src-COtQ0Dxh.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-CJ6kVBLh.cjs');
|
|
3
|
+
require('./raw-D-cvhDxp.cjs');
|
|
4
4
|
require('./options-BejTnOdM.cjs');
|
|
5
|
-
const require_src = require('./src-
|
|
5
|
+
const require_src = require('./src-sczI65zX.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,7 +1,7 @@
|
|
|
1
1
|
import { Options } from "./options-Egmm6BVJ.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as unplugin4 from "unplugin";
|
|
3
3
|
|
|
4
4
|
//#region src/rollup.d.ts
|
|
5
|
-
declare const _default: (options?: Options | undefined) =>
|
|
5
|
+
declare const _default: (options?: Options | undefined) => unplugin4.RollupPlugin<any> | unplugin4.RollupPlugin<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 unplugin4 from "unplugin";
|
|
3
3
|
|
|
4
4
|
//#region src/rollup.d.ts
|
|
5
|
-
declare const _default: (options?: Options | undefined) =>
|
|
5
|
+
declare const _default: (options?: Options | undefined) => unplugin4.RollupPlugin<any> | unplugin4.RollupPlugin<any>[];
|
|
6
6
|
//#endregion
|
|
7
7
|
export { _default as default };
|
package/dist/rollup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./core-
|
|
2
|
-
import "./raw-
|
|
1
|
+
import "./core-IZ-lh7Ab.js";
|
|
2
|
+
import "./raw-BzMrHm2x.js";
|
|
3
3
|
import "./options-BWRkHmm5.js";
|
|
4
|
-
import { src_default } from "./src-
|
|
4
|
+
import { src_default } from "./src-COtQ0Dxh.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-CJ6kVBLh.cjs');
|
|
3
|
+
require('./raw-D-cvhDxp.cjs');
|
|
4
4
|
require('./options-BejTnOdM.cjs');
|
|
5
|
-
const require_src = require('./src-
|
|
5
|
+
const require_src = require('./src-sczI65zX.cjs');
|
|
6
6
|
|
|
7
7
|
//#region src/rspack.ts
|
|
8
8
|
var rspack_default = require_src.src_default.rspack;
|
package/dist/rspack.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./core-
|
|
2
|
-
import "./raw-
|
|
1
|
+
import "./core-IZ-lh7Ab.js";
|
|
2
|
+
import "./raw-BzMrHm2x.js";
|
|
3
3
|
import "./options-BWRkHmm5.js";
|
|
4
|
-
import { src_default } from "./src-
|
|
4
|
+
import { src_default } from "./src-COtQ0Dxh.js";
|
|
5
5
|
|
|
6
6
|
//#region src/rspack.ts
|
|
7
7
|
var rspack_default = src_default.rspack;
|
package/dist/vite.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
require('./core-
|
|
3
|
-
require('./raw-
|
|
2
|
+
require('./core-CJ6kVBLh.cjs');
|
|
3
|
+
require('./raw-D-cvhDxp.cjs');
|
|
4
4
|
require('./options-BejTnOdM.cjs');
|
|
5
|
-
require('./src-
|
|
6
|
-
const require_vite = require('./vite-
|
|
5
|
+
require('./src-sczI65zX.cjs');
|
|
6
|
+
const require_vite = require('./vite-BPouBS8o.cjs');
|
|
7
7
|
|
|
8
8
|
exports.default = require_vite.vite_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 vite13 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) => vite13.Plugin<any> | vite13.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 vite10 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) => vite10.Plugin<any> | vite10.Plugin<any>[];
|
|
6
6
|
//#endregion
|
|
7
7
|
export { _default as default };
|
package/dist/vite.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./core-
|
|
2
|
-
import "./raw-
|
|
1
|
+
import "./core-IZ-lh7Ab.js";
|
|
2
|
+
import "./raw-BzMrHm2x.js";
|
|
3
3
|
import "./options-BWRkHmm5.js";
|
|
4
|
-
import "./src-
|
|
5
|
-
import { vite_default } from "./vite-
|
|
4
|
+
import "./src-COtQ0Dxh.js";
|
|
5
|
+
import { vite_default } from "./vite-C-w3oGdz.js";
|
|
6
6
|
|
|
7
7
|
export { vite_default as default };
|
package/dist/volar.cjs
CHANGED
|
@@ -108,7 +108,7 @@ function transformJsxMacros(rootMap, options) {
|
|
|
108
108
|
if (!root?.body || Object.keys(macros).length === 1 && macros.defineStyle) continue;
|
|
109
109
|
const asyncModifier = root.modifiers?.find((modifier) => modifier.kind === ts.SyntaxKind.AsyncKeyword);
|
|
110
110
|
if (asyncModifier && macros.defineComponent) codes.replaceRange(asyncModifier.pos, asyncModifier.end);
|
|
111
|
-
const result =
|
|
111
|
+
const result = "({}) as typeof __ctx.render & { __ctx?: { props: typeof __ctx.props } & typeof __ctx.context }";
|
|
112
112
|
const propsType = root.parameters[0]?.type ? root.parameters[0].type.getText(ast) : "{}";
|
|
113
113
|
codes.replaceRange(root.parameters.pos, root.parameters.pos, ts.isArrowFunction(root) && root.parameters.pos === root.pos ? "(" : "", `__props: typeof __ctx.props & ${propsType}, `, `__context?: typeof __ctx.context, `, `__ctx = {} as Awaited<ReturnType<typeof __fn>>, `, `__fn = (${asyncModifier ? "async" : ""}(`);
|
|
114
114
|
if (ts.isArrowFunction(root)) codes.replaceRange(root.end, root.end, `))${root.pos === root.parameters.pos ? ")" : ""} => `, result);
|
|
@@ -134,9 +134,9 @@ function transformJsxMacros(rootMap, options) {
|
|
|
134
134
|
codes.replaceRange(node.expression.end, node.expression.end, `
|
|
135
135
|
return {} as {
|
|
136
136
|
props: {${props.join(", ")}},
|
|
137
|
-
context: ${root.parameters[1]?.type ? root.parameters[1].type.getText(ast) : "
|
|
137
|
+
context: ${root.parameters[1]?.type ? `${root.parameters[1].type.getText(ast)} & ` : ""}{
|
|
138
138
|
slots: ${macros.defineSlots ?? "{}"},
|
|
139
|
-
expose: (exposed: ${macros.defineExpose ?? "
|
|
139
|
+
expose: (exposed: ${macros.defineExpose ?? "Record<string, any>"}) => void,
|
|
140
140
|
attrs: Record<string, any>
|
|
141
141
|
},
|
|
142
142
|
render: typeof __render
|
package/dist/volar.js
CHANGED
|
@@ -106,7 +106,7 @@ function transformJsxMacros(rootMap, options) {
|
|
|
106
106
|
if (!root?.body || Object.keys(macros).length === 1 && macros.defineStyle) continue;
|
|
107
107
|
const asyncModifier = root.modifiers?.find((modifier) => modifier.kind === ts.SyntaxKind.AsyncKeyword);
|
|
108
108
|
if (asyncModifier && macros.defineComponent) codes.replaceRange(asyncModifier.pos, asyncModifier.end);
|
|
109
|
-
const result =
|
|
109
|
+
const result = "({}) as typeof __ctx.render & { __ctx?: { props: typeof __ctx.props } & typeof __ctx.context }";
|
|
110
110
|
const propsType = root.parameters[0]?.type ? root.parameters[0].type.getText(ast) : "{}";
|
|
111
111
|
codes.replaceRange(root.parameters.pos, root.parameters.pos, ts.isArrowFunction(root) && root.parameters.pos === root.pos ? "(" : "", `__props: typeof __ctx.props & ${propsType}, `, `__context?: typeof __ctx.context, `, `__ctx = {} as Awaited<ReturnType<typeof __fn>>, `, `__fn = (${asyncModifier ? "async" : ""}(`);
|
|
112
112
|
if (ts.isArrowFunction(root)) codes.replaceRange(root.end, root.end, `))${root.pos === root.parameters.pos ? ")" : ""} => `, result);
|
|
@@ -132,9 +132,9 @@ function transformJsxMacros(rootMap, options) {
|
|
|
132
132
|
codes.replaceRange(node.expression.end, node.expression.end, `
|
|
133
133
|
return {} as {
|
|
134
134
|
props: {${props.join(", ")}},
|
|
135
|
-
context: ${root.parameters[1]?.type ? root.parameters[1].type.getText(ast) : "
|
|
135
|
+
context: ${root.parameters[1]?.type ? `${root.parameters[1].type.getText(ast)} & ` : ""}{
|
|
136
136
|
slots: ${macros.defineSlots ?? "{}"},
|
|
137
|
-
expose: (exposed: ${macros.defineExpose ?? "
|
|
137
|
+
expose: (exposed: ${macros.defineExpose ?? "Record<string, any>"}) => void,
|
|
138
138
|
attrs: Record<string, any>
|
|
139
139
|
},
|
|
140
140
|
render: typeof __render
|
package/dist/webpack.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
require('./core-
|
|
3
|
-
require('./raw-
|
|
2
|
+
require('./core-CJ6kVBLh.cjs');
|
|
3
|
+
require('./raw-D-cvhDxp.cjs');
|
|
4
4
|
require('./options-BejTnOdM.cjs');
|
|
5
|
-
require('./src-
|
|
6
|
-
const require_webpack = require('./webpack-
|
|
5
|
+
require('./src-sczI65zX.cjs');
|
|
6
|
+
const require_webpack = require('./webpack-4fI2h8AS.cjs');
|
|
7
7
|
|
|
8
8
|
exports.default = require_webpack.webpack_default;
|
package/dist/webpack.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Options } from "./options-Egmm6BVJ.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as webpack11 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) => webpack11.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 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.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./core-
|
|
2
|
-
import "./raw-
|
|
1
|
+
import "./core-IZ-lh7Ab.js";
|
|
2
|
+
import "./raw-BzMrHm2x.js";
|
|
3
3
|
import "./options-BWRkHmm5.js";
|
|
4
|
-
import "./src-
|
|
5
|
-
import { webpack_default } from "./webpack-
|
|
4
|
+
import "./src-COtQ0Dxh.js";
|
|
5
|
+
import { webpack_default } from "./webpack-BiwlEwnr.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.6.
|
|
3
|
+
"version": "2.6.6",
|
|
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.
|
|
134
|
+
"@vue-macros/common": "^3.0.1",
|
|
135
135
|
"@vue/compiler-sfc": "3.6.0-alpha.2",
|
|
136
136
|
"hash-sum": "^2.0.0",
|
|
137
|
-
"ts-macro": "^0.3.
|
|
137
|
+
"ts-macro": "^0.3.6",
|
|
138
138
|
"unplugin": "^2.3.10"
|
|
139
139
|
},
|
|
140
140
|
"devDependencies": {
|
|
141
141
|
"@babel/types": "^7.28.4",
|
|
142
|
-
"@nuxt/kit": "^3.19.
|
|
143
|
-
"@nuxt/schema": "^3.19.
|
|
142
|
+
"@nuxt/kit": "^3.19.2",
|
|
143
|
+
"@nuxt/schema": "^3.19.2",
|
|
144
144
|
"@types/hash-sum": "^1.0.2",
|
|
145
|
-
"@vue-macros/test-utils": "^3.0.
|
|
145
|
+
"@vue-macros/test-utils": "^3.0.1",
|
|
146
146
|
"vue": "3.6.0-alpha.2"
|
|
147
147
|
},
|
|
148
148
|
"scripts": {
|