@vue-jsx-vapor/macros 2.3.0 → 2.3.1

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.
Files changed (80) hide show
  1. package/dist/api.cjs +6 -13
  2. package/dist/api.d.cts +8 -4
  3. package/dist/api.d.ts +8 -4
  4. package/dist/api.js +3 -14
  5. package/dist/astro.cjs +14 -18
  6. package/dist/astro.d.cts +4 -3
  7. package/dist/astro.d.ts +4 -3
  8. package/dist/astro.js +13 -17
  9. package/dist/chunk-BCwAaXi7.cjs +31 -0
  10. package/dist/core-B1Tt-ieP.cjs +438 -0
  11. package/dist/core-cHgZBgtA.js +377 -0
  12. package/dist/esbuild.cjs +12 -14
  13. package/dist/esbuild.d.cts +6 -5
  14. package/dist/esbuild.d.ts +6 -5
  15. package/dist/esbuild.js +9 -11
  16. package/dist/index.cjs +8 -12
  17. package/dist/index.d.cts +5 -5
  18. package/dist/index.d.ts +5 -5
  19. package/dist/index.js +6 -12
  20. package/dist/nuxt.cjs +23 -26
  21. package/dist/nuxt.d.cts +6 -5
  22. package/dist/nuxt.d.ts +6 -5
  23. package/dist/nuxt.js +19 -23
  24. package/dist/options-CNIhAQHD.cjs +27 -0
  25. package/dist/options-pbSvpKdV.js +20 -0
  26. package/dist/options.cjs +2 -5
  27. package/dist/options.d-B3WOiT_L.d.cts +26 -0
  28. package/dist/options.d-DtyRfe-9.d.ts +26 -0
  29. package/dist/options.d.cts +2 -23
  30. package/dist/options.d.ts +2 -23
  31. package/dist/options.js +3 -6
  32. package/dist/raw-3ZelnSQR.cjs +62 -0
  33. package/dist/raw-9SXDNxBH.js +55 -0
  34. package/dist/raw.cjs +5 -9
  35. package/dist/raw.d.cts +5 -4
  36. package/dist/raw.d.ts +5 -4
  37. package/dist/raw.js +5 -8
  38. package/dist/rolldown.cjs +12 -14
  39. package/dist/rolldown.d.cts +4 -3
  40. package/dist/rolldown.d.ts +4 -3
  41. package/dist/rolldown.js +9 -11
  42. package/dist/rollup.cjs +12 -14
  43. package/dist/rollup.d.cts +6 -5
  44. package/dist/rollup.d.ts +6 -5
  45. package/dist/rollup.js +9 -11
  46. package/dist/rspack.cjs +12 -14
  47. package/dist/rspack.d.cts +4 -3
  48. package/dist/rspack.d.ts +4 -3
  49. package/dist/rspack.js +9 -11
  50. package/dist/src-BfZoaRPY.js +9 -0
  51. package/dist/src-DwQLomPw.cjs +16 -0
  52. package/dist/vite-C5QxH0B9.cjs +13 -0
  53. package/dist/vite-DPLCEtsm.js +7 -0
  54. package/dist/vite.cjs +8 -12
  55. package/dist/vite.d.cts +6 -5
  56. package/dist/vite.d.ts +6 -5
  57. package/dist/vite.js +7 -10
  58. package/dist/volar.cjs +220 -371
  59. package/dist/volar.d.cts +5 -4
  60. package/dist/volar.d.ts +5 -4
  61. package/dist/volar.js +217 -369
  62. package/dist/webpack-1cYmRdvx.js +7 -0
  63. package/dist/webpack-B-EPKx0G.cjs +13 -0
  64. package/dist/webpack.cjs +8 -12
  65. package/dist/webpack.d.cts +6 -5
  66. package/dist/webpack.d.ts +6 -5
  67. package/dist/webpack.js +7 -10
  68. package/package.json +3 -3
  69. package/dist/chunk-53TNKVYD.cjs +0 -29
  70. package/dist/chunk-AUE5EAQA.js +0 -12
  71. package/dist/chunk-DANY2WQD.js +0 -29
  72. package/dist/chunk-E5WGUCGE.js +0 -68
  73. package/dist/chunk-HBVQYNJJ.js +0 -10
  74. package/dist/chunk-KUKYWPEK.cjs +0 -10
  75. package/dist/chunk-L26STXZK.cjs +0 -12
  76. package/dist/chunk-PWA6BBMQ.cjs +0 -10
  77. package/dist/chunk-SMWNQXL7.js +0 -585
  78. package/dist/chunk-UAWFIGPX.cjs +0 -68
  79. package/dist/chunk-ZQ4GVJKX.cjs +0 -585
  80. package/dist/chunk-ZXJQCFZZ.js +0 -10
package/dist/webpack.cjs CHANGED
@@ -1,12 +1,8 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
- var _chunkPWA6BBMQcjs = require('./chunk-PWA6BBMQ.cjs');
4
- require('./chunk-L26STXZK.cjs');
5
- require('./chunk-UAWFIGPX.cjs');
6
- require('./chunk-ZQ4GVJKX.cjs');
7
- require('./chunk-53TNKVYD.cjs');
8
-
9
-
10
- exports.default = _chunkPWA6BBMQcjs.webpack_default;
11
-
12
- module.exports = exports.default;
1
+ Object.defineProperty(exports, '__esModule', { value: true });
2
+ require('./core-B1Tt-ieP.cjs');
3
+ require('./raw-3ZelnSQR.cjs');
4
+ require('./options-CNIhAQHD.cjs');
5
+ require('./src-DwQLomPw.cjs');
6
+ const require_webpack = require('./webpack-B-EPKx0G.cjs');
7
+
8
+ exports.default = require_webpack.webpack_default
@@ -1,7 +1,8 @@
1
- import * as webpack from 'webpack';
2
- import { Options } from './options.cjs';
3
- import '@vue-macros/common';
1
+ import { Options } from "./options.d-B3WOiT_L.cjs";
2
+ import { WebpackPluginInstance } from "webpack";
4
3
 
5
- declare const _default: (options?: Options | undefined) => webpack.WebpackPluginInstance;
4
+ //#region src/webpack.d.ts
5
+ declare const _default: (options?: Options | undefined) => WebpackPluginInstance;
6
6
 
7
- export = _default;
7
+ //#endregion
8
+ export { _default as default };
package/dist/webpack.d.ts CHANGED
@@ -1,7 +1,8 @@
1
- import * as webpack from 'webpack';
2
- import { Options } from './options.js';
3
- import '@vue-macros/common';
1
+ import { Options } from "./options.d-DtyRfe-9.js";
2
+ import { WebpackPluginInstance } from "webpack";
4
3
 
5
- declare const _default: (options?: Options | undefined) => webpack.WebpackPluginInstance;
4
+ //#region src/webpack.d.ts
5
+ declare const _default: (options?: Options | undefined) => WebpackPluginInstance;
6
6
 
7
- export { _default as default };
7
+ //#endregion
8
+ export { _default as default };
package/dist/webpack.js CHANGED
@@ -1,10 +1,7 @@
1
- import {
2
- webpack_default
3
- } from "./chunk-HBVQYNJJ.js";
4
- import "./chunk-AUE5EAQA.js";
5
- import "./chunk-E5WGUCGE.js";
6
- import "./chunk-SMWNQXL7.js";
7
- import "./chunk-DANY2WQD.js";
8
- export {
9
- webpack_default as default
10
- };
1
+ import "./core-cHgZBgtA.js";
2
+ import "./raw-9SXDNxBH.js";
3
+ import "./options-pbSvpKdV.js";
4
+ import "./src-BfZoaRPY.js";
5
+ import { webpack_default } from "./webpack-1cYmRdvx.js";
6
+
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.0",
3
+ "version": "2.3.1",
4
4
  "description": "Macros for Vue JSX Vapor",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -183,7 +183,7 @@
183
183
  "vue": "https://pkg.pr.new/vue@b43f4f5"
184
184
  },
185
185
  "scripts": {
186
- "build": "tsup",
187
- "dev": "DEV=true tsup"
186
+ "build": "tsdown",
187
+ "dev": "DEV=true tsdown"
188
188
  }
189
189
  }
@@ -1,29 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/options.ts
2
-
3
-
4
-
5
-
6
- var _common = require('@vue-macros/common');
7
- function resolveOptions(options) {
8
- const version = options.version || 3.6;
9
- return {
10
- include: [_common.REGEX_SRC_FILE],
11
- exclude: [_common.REGEX_SETUP_SFC, _common.REGEX_NODE_MODULES],
12
- ...options,
13
- version,
14
- defineComponent: {
15
- alias: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _ => _.defineComponent, 'optionalAccess', _2 => _2.alias]), () => ( [
16
- "defineComponent",
17
- "defineVaporComponent"
18
- ]))
19
- },
20
- defineModel: { alias: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _3 => _3.defineModel, 'optionalAccess', _4 => _4.alias]), () => ( ["defineModel"])) },
21
- defineSlots: { alias: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _5 => _5.defineSlots, 'optionalAccess', _6 => _6.alias]), () => ( ["defineSlots"])) },
22
- defineExpose: { alias: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _7 => _7.defineExpose, 'optionalAccess', _8 => _8.alias]), () => ( ["defineExpose"])) },
23
- defineStyle: { alias: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _9 => _9.defineStyle, 'optionalAccess', _10 => _10.alias]), () => ( ["defineStyle"])) }
24
- };
25
- }
26
-
27
-
28
-
29
- exports.resolveOptions = resolveOptions;
@@ -1,12 +0,0 @@
1
- import {
2
- raw_default
3
- } from "./chunk-E5WGUCGE.js";
4
-
5
- // src/index.ts
6
- import { createUnplugin } from "unplugin";
7
- var unplugin = createUnplugin(raw_default);
8
- var index_default = unplugin;
9
-
10
- export {
11
- index_default
12
- };
@@ -1,29 +0,0 @@
1
- // src/options.ts
2
- import {
3
- REGEX_NODE_MODULES,
4
- REGEX_SETUP_SFC,
5
- REGEX_SRC_FILE
6
- } from "@vue-macros/common";
7
- function resolveOptions(options) {
8
- const version = options.version || 3.6;
9
- return {
10
- include: [REGEX_SRC_FILE],
11
- exclude: [REGEX_SETUP_SFC, REGEX_NODE_MODULES],
12
- ...options,
13
- version,
14
- defineComponent: {
15
- alias: options?.defineComponent?.alias ?? [
16
- "defineComponent",
17
- "defineVaporComponent"
18
- ]
19
- },
20
- defineModel: { alias: options?.defineModel?.alias ?? ["defineModel"] },
21
- defineSlots: { alias: options?.defineSlots?.alias ?? ["defineSlots"] },
22
- defineExpose: { alias: options?.defineExpose?.alias ?? ["defineExpose"] },
23
- defineStyle: { alias: options?.defineStyle?.alias ?? ["defineStyle"] }
24
- };
25
- }
26
-
27
- export {
28
- resolveOptions
29
- };
@@ -1,68 +0,0 @@
1
- import {
2
- helperPrefix,
3
- transformJsxMacros,
4
- useModelHelperId,
5
- use_model_default,
6
- withDefaultsHelperId,
7
- with_defaults_default
8
- } from "./chunk-SMWNQXL7.js";
9
- import {
10
- resolveOptions
11
- } from "./chunk-DANY2WQD.js";
12
-
13
- // src/raw.ts
14
- import { createFilter, normalizePath } from "@vue-macros/common";
15
-
16
- // src/core/style.ts
17
- import { compileStyleAsync } from "@vue/compiler-sfc";
18
- async function transformStyle(code, id, options) {
19
- const query = new URLSearchParams(id.split("?")[1]);
20
- const result = await compileStyleAsync({
21
- filename: id,
22
- id: `data-v-${query.get("scopeId")}`,
23
- isProd: options.isProduction,
24
- source: code,
25
- scoped: query.get("scoped") === "true"
26
- });
27
- return result.code;
28
- }
29
-
30
- // src/raw.ts
31
- var name = "@vue-jsx-vapor/macros";
32
- var plugin = (userOptions = {}) => {
33
- const options = resolveOptions(userOptions);
34
- const filter = createFilter(options);
35
- const importMap = /* @__PURE__ */ new Map();
36
- return {
37
- name,
38
- enforce: "pre",
39
- resolveId(id) {
40
- if (normalizePath(id).startsWith(helperPrefix)) return id;
41
- },
42
- loadInclude(id) {
43
- return normalizePath(id).startsWith(helperPrefix);
44
- },
45
- load(_id) {
46
- const id = normalizePath(_id);
47
- if (id === useModelHelperId) return use_model_default;
48
- else if (id === withDefaultsHelperId) return with_defaults_default;
49
- else if (importMap.get(id)) return importMap.get(id);
50
- },
51
- transformInclude(id) {
52
- if (importMap.get(id)) return true;
53
- return filter(id);
54
- },
55
- transform(code, id, opt) {
56
- if (opt?.ssr) {
57
- options.defineComponent.autoReturnFunction = true;
58
- }
59
- if (importMap.get(id)) return transformStyle(code, id, options);
60
- return transformJsxMacros(code, id, importMap, options);
61
- }
62
- };
63
- };
64
- var raw_default = plugin;
65
-
66
- export {
67
- raw_default
68
- };
@@ -1,10 +0,0 @@
1
- import {
2
- index_default
3
- } from "./chunk-AUE5EAQA.js";
4
-
5
- // src/webpack.ts
6
- var webpack_default = index_default.webpack;
7
-
8
- export {
9
- webpack_default
10
- };
@@ -1,10 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
- var _chunkL26STXZKcjs = require('./chunk-L26STXZK.cjs');
4
-
5
- // src/vite.ts
6
- var vite_default = _chunkL26STXZKcjs.index_default.vite;
7
-
8
-
9
-
10
- exports.vite_default = vite_default;
@@ -1,12 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
- var _chunkUAWFIGPXcjs = require('./chunk-UAWFIGPX.cjs');
4
-
5
- // src/index.ts
6
- var _unplugin = require('unplugin');
7
- var unplugin = _unplugin.createUnplugin.call(void 0, _chunkUAWFIGPXcjs.raw_default);
8
- var index_default = unplugin;
9
-
10
-
11
-
12
- exports.index_default = index_default;
@@ -1,10 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
- var _chunkL26STXZKcjs = require('./chunk-L26STXZK.cjs');
4
-
5
- // src/webpack.ts
6
- var webpack_default = _chunkL26STXZKcjs.index_default.webpack;
7
-
8
-
9
-
10
- exports.webpack_default = webpack_default;