@vue-jsx-vapor/macros 1.7.0

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 (66) hide show
  1. package/LICENSE +21 -0
  2. package/dist/api.cjs +14 -0
  3. package/dist/api.d.cts +40 -0
  4. package/dist/api.d.ts +40 -0
  5. package/dist/api.js +14 -0
  6. package/dist/astro.cjs +22 -0
  7. package/dist/astro.d.cts +11 -0
  8. package/dist/astro.d.ts +11 -0
  9. package/dist/astro.js +20 -0
  10. package/dist/chunk-6JTF6MNY.cjs +567 -0
  11. package/dist/chunk-7SOTCEEO.js +10 -0
  12. package/dist/chunk-IXJAH75Q.js +12 -0
  13. package/dist/chunk-KDEA57GU.js +567 -0
  14. package/dist/chunk-LYT252SL.cjs +65 -0
  15. package/dist/chunk-PCD5JI3K.js +10 -0
  16. package/dist/chunk-UCG5RA54.js +65 -0
  17. package/dist/chunk-UZ426MO6.cjs +32 -0
  18. package/dist/chunk-XA5RNEAB.cjs +10 -0
  19. package/dist/chunk-Y4BCVHJT.cjs +12 -0
  20. package/dist/chunk-ZWDLDNLL.cjs +10 -0
  21. package/dist/chunk-ZXRSELD6.js +32 -0
  22. package/dist/esbuild.cjs +14 -0
  23. package/dist/esbuild.d.cts +7 -0
  24. package/dist/esbuild.d.ts +7 -0
  25. package/dist/esbuild.js +12 -0
  26. package/dist/index.cjs +12 -0
  27. package/dist/index.d.cts +8 -0
  28. package/dist/index.d.ts +8 -0
  29. package/dist/index.js +12 -0
  30. package/dist/nuxt.cjs +29 -0
  31. package/dist/nuxt.d.cts +9 -0
  32. package/dist/nuxt.d.ts +9 -0
  33. package/dist/nuxt.js +27 -0
  34. package/dist/options.cjs +6 -0
  35. package/dist/options.d.cts +24 -0
  36. package/dist/options.d.ts +24 -0
  37. package/dist/options.js +6 -0
  38. package/dist/raw.cjs +10 -0
  39. package/dist/raw.d.cts +7 -0
  40. package/dist/raw.d.ts +7 -0
  41. package/dist/raw.js +8 -0
  42. package/dist/rolldown.cjs +14 -0
  43. package/dist/rolldown.d.cts +6 -0
  44. package/dist/rolldown.d.ts +6 -0
  45. package/dist/rolldown.js +12 -0
  46. package/dist/rollup.cjs +14 -0
  47. package/dist/rollup.d.cts +7 -0
  48. package/dist/rollup.d.ts +7 -0
  49. package/dist/rollup.js +12 -0
  50. package/dist/rspack.cjs +14 -0
  51. package/dist/rspack.d.cts +6 -0
  52. package/dist/rspack.d.ts +6 -0
  53. package/dist/rspack.js +12 -0
  54. package/dist/vite.cjs +12 -0
  55. package/dist/vite.d.cts +7 -0
  56. package/dist/vite.d.ts +7 -0
  57. package/dist/vite.js +10 -0
  58. package/dist/volar.cjs +394 -0
  59. package/dist/volar.d.cts +7 -0
  60. package/dist/volar.d.ts +7 -0
  61. package/dist/volar.js +392 -0
  62. package/dist/webpack.cjs +12 -0
  63. package/dist/webpack.d.cts +7 -0
  64. package/dist/webpack.d.ts +7 -0
  65. package/dist/webpack.js +10 -0
  66. package/package.json +191 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 zhiyuanzmj <https://github.com/zhiyuanzmj>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dist/api.cjs ADDED
@@ -0,0 +1,14 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+
6
+
7
+ var _chunk6JTF6MNYcjs = require('./chunk-6JTF6MNY.cjs');
8
+
9
+
10
+
11
+
12
+
13
+
14
+ exports.getMacroExpression = _chunk6JTF6MNYcjs.getMacroExpression; exports.getParamsStart = _chunk6JTF6MNYcjs.getParamsStart; exports.isFunctionalNode = _chunk6JTF6MNYcjs.isFunctionalNode; exports.restructure = _chunk6JTF6MNYcjs.restructure; exports.transformJsxMacros = _chunk6JTF6MNYcjs.transformJsxMacros;
package/dist/api.d.cts ADDED
@@ -0,0 +1,40 @@
1
+ import { MagicString, CodeTransform } from '@vue-macros/common';
2
+ import { OptionsResolved } from './options.cjs';
3
+ import { FunctionDeclaration, FunctionExpression, ArrowFunctionExpression, CallExpression, Node } from '@babel/types';
4
+
5
+ type Options = {
6
+ withDefaultsFrom?: string;
7
+ generateRestProps?: (restPropsName: string, index: number, list: Prop[]) => string | undefined;
8
+ };
9
+ type Prop = {
10
+ path: string;
11
+ name: string;
12
+ value: string;
13
+ defaultValue?: string;
14
+ isRest?: boolean;
15
+ isRequired?: boolean;
16
+ };
17
+ declare function restructure(s: MagicString, node: FunctionalNode, options?: Options): Prop[];
18
+
19
+ type FunctionalNode = FunctionDeclaration | FunctionExpression | ArrowFunctionExpression;
20
+ type DefineStyle = {
21
+ expression: CallExpression;
22
+ isDeclaration: boolean;
23
+ lang: string;
24
+ };
25
+ type RootMapValue = {
26
+ defineComponent?: CallExpression;
27
+ defineModel?: {
28
+ expression: CallExpression;
29
+ isRequired: boolean;
30
+ }[];
31
+ defineSlots?: CallExpression;
32
+ defineExpose?: CallExpression;
33
+ defineStyle?: DefineStyle[];
34
+ };
35
+ declare function transformJsxMacros(code: string, id: string, importMap: Map<string, string>, options: OptionsResolved): CodeTransform | undefined;
36
+ declare function isFunctionalNode(node?: Node | null): node is FunctionalNode;
37
+ declare function getMacroExpression(node: Node, options: OptionsResolved): CallExpression | undefined;
38
+ declare function getParamsStart(node: FunctionalNode, code: string): number;
39
+
40
+ export { type DefineStyle, type FunctionalNode, type RootMapValue, getMacroExpression, getParamsStart, isFunctionalNode, restructure, transformJsxMacros };
package/dist/api.d.ts ADDED
@@ -0,0 +1,40 @@
1
+ import { MagicString, CodeTransform } from '@vue-macros/common';
2
+ import { OptionsResolved } from './options.js';
3
+ import { FunctionDeclaration, FunctionExpression, ArrowFunctionExpression, CallExpression, Node } from '@babel/types';
4
+
5
+ type Options = {
6
+ withDefaultsFrom?: string;
7
+ generateRestProps?: (restPropsName: string, index: number, list: Prop[]) => string | undefined;
8
+ };
9
+ type Prop = {
10
+ path: string;
11
+ name: string;
12
+ value: string;
13
+ defaultValue?: string;
14
+ isRest?: boolean;
15
+ isRequired?: boolean;
16
+ };
17
+ declare function restructure(s: MagicString, node: FunctionalNode, options?: Options): Prop[];
18
+
19
+ type FunctionalNode = FunctionDeclaration | FunctionExpression | ArrowFunctionExpression;
20
+ type DefineStyle = {
21
+ expression: CallExpression;
22
+ isDeclaration: boolean;
23
+ lang: string;
24
+ };
25
+ type RootMapValue = {
26
+ defineComponent?: CallExpression;
27
+ defineModel?: {
28
+ expression: CallExpression;
29
+ isRequired: boolean;
30
+ }[];
31
+ defineSlots?: CallExpression;
32
+ defineExpose?: CallExpression;
33
+ defineStyle?: DefineStyle[];
34
+ };
35
+ declare function transformJsxMacros(code: string, id: string, importMap: Map<string, string>, options: OptionsResolved): CodeTransform | undefined;
36
+ declare function isFunctionalNode(node?: Node | null): node is FunctionalNode;
37
+ declare function getMacroExpression(node: Node, options: OptionsResolved): CallExpression | undefined;
38
+ declare function getParamsStart(node: FunctionalNode, code: string): number;
39
+
40
+ export { type DefineStyle, type FunctionalNode, type RootMapValue, getMacroExpression, getParamsStart, isFunctionalNode, restructure, transformJsxMacros };
package/dist/api.js ADDED
@@ -0,0 +1,14 @@
1
+ import {
2
+ getMacroExpression,
3
+ getParamsStart,
4
+ isFunctionalNode,
5
+ restructure,
6
+ transformJsxMacros
7
+ } from "./chunk-KDEA57GU.js";
8
+ export {
9
+ getMacroExpression,
10
+ getParamsStart,
11
+ isFunctionalNode,
12
+ restructure,
13
+ transformJsxMacros
14
+ };
package/dist/astro.cjs ADDED
@@ -0,0 +1,22 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkY4BCVHJTcjs = require('./chunk-Y4BCVHJT.cjs');
4
+ require('./chunk-LYT252SL.cjs');
5
+ require('./chunk-6JTF6MNY.cjs');
6
+ require('./chunk-UZ426MO6.cjs');
7
+
8
+ // src/astro.ts
9
+ var astro_default = (options) => ({
10
+ name: "unplugin-vue-jsx-vapor",
11
+ hooks: {
12
+ "astro:config:setup": (astro) => {
13
+ astro.config.vite.plugins ||= [];
14
+ astro.config.vite.plugins.push(_chunkY4BCVHJTcjs.index_default.vite(options));
15
+ }
16
+ }
17
+ });
18
+
19
+
20
+ exports.default = astro_default;
21
+
22
+ module.exports = exports.default;
@@ -0,0 +1,11 @@
1
+ import { Options } from './options.cjs';
2
+ import '@vue-macros/common';
3
+
4
+ declare const _default: (options: Options) => {
5
+ name: string;
6
+ hooks: {
7
+ 'astro:config:setup': (astro: any) => void;
8
+ };
9
+ };
10
+
11
+ export = _default;
@@ -0,0 +1,11 @@
1
+ import { Options } from './options.js';
2
+ import '@vue-macros/common';
3
+
4
+ declare const _default: (options: Options) => {
5
+ name: string;
6
+ hooks: {
7
+ 'astro:config:setup': (astro: any) => void;
8
+ };
9
+ };
10
+
11
+ export { _default as default };
package/dist/astro.js ADDED
@@ -0,0 +1,20 @@
1
+ import {
2
+ index_default
3
+ } from "./chunk-IXJAH75Q.js";
4
+ import "./chunk-UCG5RA54.js";
5
+ import "./chunk-KDEA57GU.js";
6
+ import "./chunk-ZXRSELD6.js";
7
+
8
+ // src/astro.ts
9
+ var astro_default = (options) => ({
10
+ name: "unplugin-vue-jsx-vapor",
11
+ hooks: {
12
+ "astro:config:setup": (astro) => {
13
+ astro.config.vite.plugins ||= [];
14
+ astro.config.vite.plugins.push(index_default.vite(options));
15
+ }
16
+ }
17
+ });
18
+ export {
19
+ astro_default as default
20
+ };