@vue.ts/complex-types 0.5.0 → 1.0.0-beta.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 (66) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +35 -16
  3. package/dist/astro.d.ts +8 -10
  4. package/dist/astro.js +14 -0
  5. package/dist/esbuild.d.ts +7 -8
  6. package/dist/esbuild.js +8 -0
  7. package/dist/farm.d.ts +8 -0
  8. package/dist/farm.js +8 -0
  9. package/dist/index.d.ts +8 -8
  10. package/dist/index.js +3 -0
  11. package/dist/nuxt.d.ts +7 -8
  12. package/dist/nuxt.js +20 -0
  13. package/dist/rolldown.d.ts +8 -0
  14. package/dist/rolldown.js +8 -0
  15. package/dist/rollup.d.ts +7 -8
  16. package/dist/rollup.js +8 -0
  17. package/dist/rspack.d.ts +5 -6
  18. package/dist/rspack.js +8 -0
  19. package/dist/src-CI8-WIu4.js +354 -0
  20. package/dist/types-CFmCIAvs.d.ts +51 -0
  21. package/dist/types-u_Hr5uXA.d.ts +1 -0
  22. package/dist/types.d.ts +3 -30
  23. package/dist/types.js +0 -0
  24. package/dist/vite-Dyi1m2wg.js +8 -0
  25. package/dist/vite.d.ts +7 -8
  26. package/dist/vite.js +4 -0
  27. package/dist/webpack-CFfuQfGw.js +8 -0
  28. package/dist/webpack.d.ts +7 -8
  29. package/dist/webpack.js +4 -0
  30. package/package.json +67 -53
  31. package/dist/astro.cjs +0 -22
  32. package/dist/astro.d.cts +0 -13
  33. package/dist/astro.d.mts +0 -13
  34. package/dist/astro.mjs +0 -20
  35. package/dist/esbuild.cjs +0 -13
  36. package/dist/esbuild.d.cts +0 -9
  37. package/dist/esbuild.d.mts +0 -9
  38. package/dist/esbuild.mjs +0 -11
  39. package/dist/index.cjs +0 -228
  40. package/dist/index.d.cts +0 -9
  41. package/dist/index.d.mts +0 -9
  42. package/dist/index.mjs +0 -221
  43. package/dist/nuxt.cjs +0 -35
  44. package/dist/nuxt.d.cts +0 -9
  45. package/dist/nuxt.d.mts +0 -9
  46. package/dist/nuxt.mjs +0 -33
  47. package/dist/rollup.cjs +0 -13
  48. package/dist/rollup.d.cts +0 -9
  49. package/dist/rollup.d.mts +0 -9
  50. package/dist/rollup.mjs +0 -11
  51. package/dist/rspack.cjs +0 -13
  52. package/dist/rspack.d.cts +0 -8
  53. package/dist/rspack.d.mts +0 -8
  54. package/dist/rspack.mjs +0 -11
  55. package/dist/types.cjs +0 -2
  56. package/dist/types.d.cts +0 -30
  57. package/dist/types.d.mts +0 -30
  58. package/dist/types.mjs +0 -1
  59. package/dist/vite.cjs +0 -13
  60. package/dist/vite.d.cts +0 -9
  61. package/dist/vite.d.mts +0 -9
  62. package/dist/vite.mjs +0 -11
  63. package/dist/webpack.cjs +0 -13
  64. package/dist/webpack.d.cts +0 -9
  65. package/dist/webpack.d.mts +0 -9
  66. package/dist/webpack.mjs +0 -11
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2022 Ray <https://github.com/so1ve>
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.
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Ray <https://github.com/so1ve>
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/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # unplugin-vue-complex-types
1
+ # @vue.ts/complex-types
2
2
 
3
- [![NPM version](https://img.shields.io/npm/v/unplugin-vue-complex-types?color=a1b858&label=)](https://www.npmjs.com/package/unplugin-vue-complex-types)
3
+ [![NPM version](https://img.shields.io/npm/v/@vue.ts/complex-types?color=a1b858&label=)](https://www.npmjs.com/package/@vue.ts/complex-types)
4
4
 
5
5
  Use [`@vue/language-core`](https://github.com/vuejs/language-tools/tree/master/packages/language-core) to support complex types for Vue Macros.
6
6
 
@@ -9,9 +9,9 @@ For example: fixes https://github.com/vuejs/core/issues/8286.
9
9
  ## 📦 Installation
10
10
 
11
11
  ```bash
12
- $ npm install -D unplugin-vue-complex-types
13
- $ yarn add -D unplugin-vue-complex-types
14
- $ pnpm add -D unplugin-vue-complex-types
12
+ $ npm install -D @vue.ts/complex-types
13
+ $ yarn add -D @vue.ts/complex-types
14
+ $ pnpm add -D @vue.ts/complex-types
15
15
  ```
16
16
 
17
17
  ## TODOs
@@ -25,7 +25,7 @@ $ pnpm add -D unplugin-vue-complex-types
25
25
 
26
26
  ```ts
27
27
  // vite.config.ts
28
- import VueComplexTypes from "unplugin-vue-complex-types/vite";
28
+ import VueComplexTypes from "@vue.ts/complex-types/vite";
29
29
 
30
30
  export default defineConfig({
31
31
  plugins: [
@@ -38,12 +38,31 @@ export default defineConfig({
38
38
 
39
39
  <br></details>
40
40
 
41
+ <details>
42
+ <summary>Rolldown</summary><br>
43
+
44
+ ```ts
45
+ // rolldown.config.js
46
+ import VueComplexTypes from "@vue.ts/complex-types/rolldown";
47
+
48
+ export default {
49
+ plugins: [
50
+ VueComplexTypes({
51
+ /* options */
52
+ }),
53
+ // other plugins
54
+ ],
55
+ };
56
+ ```
57
+
58
+ <br></details>
59
+
41
60
  <details>
42
61
  <summary>Rollup</summary><br>
43
62
 
44
63
  ```ts
45
64
  // rollup.config.js
46
- import VueComplexTypes from "unplugin-vue-complex-types/rollup";
65
+ import VueComplexTypes from "@vue.ts/complex-types/rollup";
47
66
 
48
67
  export default {
49
68
  plugins: [
@@ -65,7 +84,7 @@ export default {
65
84
  module.exports = {
66
85
  /* ... */
67
86
  plugins: [
68
- require("unplugin-vue-complex-types/webpack")({
87
+ require("@vue.ts/complex-types/webpack")({
69
88
  /* options */
70
89
  }),
71
90
  ],
@@ -82,7 +101,7 @@ module.exports = {
82
101
  module.exports = {
83
102
  /* ... */
84
103
  plugins: [
85
- require("unplugin-vue-complex-types/rspack")({
104
+ require("@vue.ts/complex-types/rspack")({
86
105
  /* options */
87
106
  }),
88
107
  ],
@@ -97,7 +116,7 @@ module.exports = {
97
116
  ```ts
98
117
  // nuxt.config.ts
99
118
  export default defineNuxtConfig({
100
- modules: ["unplugin-vue-complex-types/nuxt"],
119
+ modules: ["@vue.ts/complex-types/nuxt"],
101
120
  complexTypes: {
102
121
  /* options */
103
122
  },
@@ -114,7 +133,7 @@ export default defineNuxtConfig({
114
133
  module.exports = {
115
134
  configureWebpack: {
116
135
  plugins: [
117
- require("unplugin-vue-complex-types/webpack")({
136
+ require("@vue.ts/complex-types/webpack")({
118
137
  /* options */
119
138
  }),
120
139
  ],
@@ -132,7 +151,7 @@ module.exports = {
132
151
  module.exports = {
133
152
  vitePlugins: [
134
153
  [
135
- "unplugin-vue-complex-types/vite",
154
+ "@vue.ts/complex-types/vite",
136
155
  {
137
156
  /* options */
138
157
  },
@@ -143,12 +162,12 @@ module.exports = {
143
162
 
144
163
  ```ts
145
164
  // quasar.conf.js [Webpack]
146
- const VueComplexTypesPlugin = require("unplugin-vue-complex-types/webpack");
165
+ const VueComplexTypesPlugin = require("@vue.ts/complex-types/webpack");
147
166
 
148
167
  module.exports = {
149
168
  build: {
150
169
  chainWebpack(chain) {
151
- chain.plugin("unplugin-vue-complex-types").use(
170
+ chain.plugin("@vue.ts/complex-types").use(
152
171
  VueComplexTypesPlugin({
153
172
  /* options */
154
173
  }),
@@ -170,7 +189,7 @@ import { build } from "esbuild";
170
189
  build({
171
190
  /* ... */
172
191
  plugins: [
173
- require("unplugin-vue-complex-types/esbuild")({
192
+ require("@vue.ts/complex-types/esbuild")({
174
193
  /* options */
175
194
  }),
176
195
  ],
@@ -184,7 +203,7 @@ build({
184
203
 
185
204
  ```ts
186
205
  // astro.config.mjs
187
- import VueComplexTypes from "unplugin-vue-complex-types/astro";
206
+ import VueComplexTypes from "@vue.ts/complex-types/astro";
188
207
 
189
208
  export default defineConfig({
190
209
  integrations: [
package/dist/astro.d.ts CHANGED
@@ -1,13 +1,11 @@
1
- import { Options } from './types.js';
2
- import '@vue.ts/common';
3
- import 'magic-string';
4
- import 'typescript';
1
+ import { Options } from "./types-CFmCIAvs.js";
5
2
 
3
+ //#region src/astro.d.ts
6
4
  declare const _default: (options: Options) => {
7
- name: string;
8
- hooks: {
9
- "astro:config:setup": (astro: any) => Promise<void>;
10
- };
5
+ name: string;
6
+ hooks: {
7
+ "astro:config:setup": (astro: any) => Promise<void>;
8
+ };
11
9
  };
12
-
13
- export { _default as default };
10
+ //#endregion
11
+ export { _default as default };
package/dist/astro.js ADDED
@@ -0,0 +1,14 @@
1
+ import { unpluginFactory } from "./src-CI8-WIu4.js";
2
+ import { createVitePlugin } from "unplugin";
3
+
4
+ //#region src/astro.ts
5
+ var astro_default = (options) => ({
6
+ name: "@vue.ts/complex-types",
7
+ hooks: { "astro:config:setup": async (astro) => {
8
+ astro.config.vite.plugins ??= [];
9
+ astro.config.vite.plugins.push(createVitePlugin(unpluginFactory)(options));
10
+ } }
11
+ });
12
+
13
+ //#endregion
14
+ export { astro_default as default };
package/dist/esbuild.d.ts CHANGED
@@ -1,9 +1,8 @@
1
- import * as unplugin from 'unplugin';
2
- import { Options } from './types.js';
3
- import '@vue.ts/common';
4
- import 'magic-string';
5
- import 'typescript';
1
+ import { Options } from "./types-CFmCIAvs.js";
2
+ import "./types-u_Hr5uXA.js";
3
+ import * as esbuild0 from "esbuild";
6
4
 
7
- declare const _default: (options?: Options | undefined) => unplugin.EsbuildPlugin;
8
-
9
- export { _default as default };
5
+ //#region src/esbuild.d.ts
6
+ declare const _default: (options?: Options | undefined) => esbuild0.Plugin;
7
+ //#endregion
8
+ export { _default as default };
@@ -0,0 +1,8 @@
1
+ import { unpluginFactory } from "./src-CI8-WIu4.js";
2
+ import { createEsbuildPlugin } from "unplugin";
3
+
4
+ //#region src/esbuild.ts
5
+ var esbuild_default = createEsbuildPlugin(unpluginFactory);
6
+
7
+ //#endregion
8
+ export { esbuild_default as default };
package/dist/farm.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ import { Options } from "./types-CFmCIAvs.js";
2
+ import "./types-u_Hr5uXA.js";
3
+ import * as _farmfe_core0 from "@farmfe/core";
4
+
5
+ //#region src/farm.d.ts
6
+ declare const _default: (options?: Options | undefined) => _farmfe_core0.JsPlugin;
7
+ //#endregion
8
+ export { _default as default };
package/dist/farm.js ADDED
@@ -0,0 +1,8 @@
1
+ import { unpluginFactory } from "./src-CI8-WIu4.js";
2
+ import { createFarmPlugin } from "unplugin";
3
+
4
+ //#region src/farm.ts
5
+ var farm_default = createFarmPlugin(unpluginFactory);
6
+
7
+ //#endregion
8
+ export { farm_default as default };
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import * as unplugin from 'unplugin';
2
- import { Options } from './types.js';
3
- import '@vue.ts/common';
4
- import 'magic-string';
5
- import 'typescript';
1
+ import { Options } from "./types-CFmCIAvs.js";
2
+ import * as unplugin0 from "unplugin";
3
+ import { UnpluginFactory } from "unplugin";
6
4
 
7
- declare const _default: unplugin.UnpluginInstance<Options | undefined, boolean>;
8
-
9
- export { _default as default };
5
+ //#region src/index.d.ts
6
+ declare const unpluginFactory: UnpluginFactory<Options | undefined>;
7
+ declare const unplugin: unplugin0.UnpluginInstance<Options | undefined, boolean>;
8
+ //#endregion
9
+ export { unplugin as default, unplugin, unpluginFactory };
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+ import { src_default, unplugin, unpluginFactory } from "./src-CI8-WIu4.js";
2
+
3
+ export { src_default as default, unplugin, unpluginFactory };
package/dist/nuxt.d.ts CHANGED
@@ -1,9 +1,8 @@
1
- import { ModuleDefinition } from '@nuxt/schema';
2
- import { Options } from './types.js';
3
- import '@vue.ts/common';
4
- import 'magic-string';
5
- import 'typescript';
1
+ import { Options } from "./types-CFmCIAvs.js";
2
+ import "./types-u_Hr5uXA.js";
3
+ import * as _nuxt_schema0 from "@nuxt/schema";
6
4
 
7
- declare const _default: ModuleDefinition<Options>;
8
-
9
- export { _default as default };
5
+ //#region src/nuxt.d.ts
6
+ declare const _default: _nuxt_schema0.NuxtModule<Options, Options, false>;
7
+ //#endregion
8
+ export { _default as default };
package/dist/nuxt.js ADDED
@@ -0,0 +1,20 @@
1
+ import "./src-CI8-WIu4.js";
2
+ import { vite_default } from "./vite-Dyi1m2wg.js";
3
+ import { webpack_default } from "./webpack-CFfuQfGw.js";
4
+ import { addVitePlugin, addWebpackPlugin, defineNuxtModule } from "@nuxt/kit";
5
+
6
+ //#region src/nuxt.ts
7
+ var nuxt_default = defineNuxtModule({
8
+ meta: {
9
+ name: "@vue.ts/complex-types",
10
+ configKey: "complexTypes"
11
+ },
12
+ defaults: {},
13
+ setup(options, _nuxt) {
14
+ addVitePlugin(() => vite_default(options));
15
+ addWebpackPlugin(() => webpack_default(options));
16
+ }
17
+ });
18
+
19
+ //#endregion
20
+ export { nuxt_default as default };
@@ -0,0 +1,8 @@
1
+ import { Options } from "./types-CFmCIAvs.js";
2
+ import "./types-u_Hr5uXA.js";
3
+ import * as rolldown0 from "rolldown";
4
+
5
+ //#region src/rolldown.d.ts
6
+ declare const _default: (options?: Options | undefined) => rolldown0.Plugin<any> | rolldown0.Plugin<any>[];
7
+ //#endregion
8
+ export { _default as default };
@@ -0,0 +1,8 @@
1
+ import { unpluginFactory } from "./src-CI8-WIu4.js";
2
+ import { createRolldownPlugin } from "unplugin";
3
+
4
+ //#region src/rolldown.ts
5
+ var rolldown_default = createRolldownPlugin(unpluginFactory);
6
+
7
+ //#endregion
8
+ export { rolldown_default as default };
package/dist/rollup.d.ts CHANGED
@@ -1,9 +1,8 @@
1
- import * as rollup from 'rollup';
2
- import { Options } from './types.js';
3
- import '@vue.ts/common';
4
- import 'magic-string';
5
- import 'typescript';
1
+ import { Options } from "./types-CFmCIAvs.js";
2
+ import "./types-u_Hr5uXA.js";
3
+ import * as rollup0 from "rollup";
6
4
 
7
- declare const _default: (options?: Options | undefined) => rollup.Plugin<any> | rollup.Plugin<any>[];
8
-
9
- export { _default as default };
5
+ //#region src/rollup.d.ts
6
+ declare const _default: (options?: Options | undefined) => rollup0.Plugin<any> | rollup0.Plugin<any>[];
7
+ //#endregion
8
+ export { _default as default };
package/dist/rollup.js ADDED
@@ -0,0 +1,8 @@
1
+ import { unpluginFactory } from "./src-CI8-WIu4.js";
2
+ import { createRollupPlugin } from "unplugin";
3
+
4
+ //#region src/rollup.ts
5
+ var rollup_default = createRollupPlugin(unpluginFactory);
6
+
7
+ //#endregion
8
+ export { rollup_default as default };
package/dist/rspack.d.ts CHANGED
@@ -1,8 +1,7 @@
1
- import { Options } from './types.js';
2
- import '@vue.ts/common';
3
- import 'magic-string';
4
- import 'typescript';
1
+ import { Options } from "./types-CFmCIAvs.js";
2
+ import "./types-u_Hr5uXA.js";
5
3
 
4
+ //#region src/rspack.d.ts
6
5
  declare const _default: (options?: Options | undefined) => RspackPluginInstance;
7
-
8
- export { _default as default };
6
+ //#endregion
7
+ export { _default as default };
package/dist/rspack.js ADDED
@@ -0,0 +1,8 @@
1
+ import { unpluginFactory } from "./src-CI8-WIu4.js";
2
+ import { createRspackPlugin } from "unplugin";
3
+
4
+ //#region src/rspack.ts
5
+ var rspack_default = createRspackPlugin(unpluginFactory);
6
+
7
+ //#endregion
8
+ export { rspack_default as default };