@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.
- package/LICENSE +21 -21
- package/README.md +35 -16
- package/dist/astro.d.ts +8 -10
- package/dist/astro.js +14 -0
- package/dist/esbuild.d.ts +7 -8
- package/dist/esbuild.js +8 -0
- package/dist/farm.d.ts +8 -0
- package/dist/farm.js +8 -0
- package/dist/index.d.ts +8 -8
- package/dist/index.js +3 -0
- package/dist/nuxt.d.ts +7 -8
- package/dist/nuxt.js +20 -0
- package/dist/rolldown.d.ts +8 -0
- package/dist/rolldown.js +8 -0
- package/dist/rollup.d.ts +7 -8
- package/dist/rollup.js +8 -0
- package/dist/rspack.d.ts +5 -6
- package/dist/rspack.js +8 -0
- package/dist/src-CI8-WIu4.js +354 -0
- package/dist/types-CFmCIAvs.d.ts +51 -0
- package/dist/types-u_Hr5uXA.d.ts +1 -0
- package/dist/types.d.ts +3 -30
- package/dist/types.js +0 -0
- package/dist/vite-Dyi1m2wg.js +8 -0
- package/dist/vite.d.ts +7 -8
- package/dist/vite.js +4 -0
- package/dist/webpack-CFfuQfGw.js +8 -0
- package/dist/webpack.d.ts +7 -8
- package/dist/webpack.js +4 -0
- package/package.json +67 -53
- package/dist/astro.cjs +0 -22
- package/dist/astro.d.cts +0 -13
- package/dist/astro.d.mts +0 -13
- package/dist/astro.mjs +0 -20
- package/dist/esbuild.cjs +0 -13
- package/dist/esbuild.d.cts +0 -9
- package/dist/esbuild.d.mts +0 -9
- package/dist/esbuild.mjs +0 -11
- package/dist/index.cjs +0 -228
- package/dist/index.d.cts +0 -9
- package/dist/index.d.mts +0 -9
- package/dist/index.mjs +0 -221
- package/dist/nuxt.cjs +0 -35
- package/dist/nuxt.d.cts +0 -9
- package/dist/nuxt.d.mts +0 -9
- package/dist/nuxt.mjs +0 -33
- package/dist/rollup.cjs +0 -13
- package/dist/rollup.d.cts +0 -9
- package/dist/rollup.d.mts +0 -9
- package/dist/rollup.mjs +0 -11
- package/dist/rspack.cjs +0 -13
- package/dist/rspack.d.cts +0 -8
- package/dist/rspack.d.mts +0 -8
- package/dist/rspack.mjs +0 -11
- package/dist/types.cjs +0 -2
- package/dist/types.d.cts +0 -30
- package/dist/types.d.mts +0 -30
- package/dist/types.mjs +0 -1
- package/dist/vite.cjs +0 -13
- package/dist/vite.d.cts +0 -9
- package/dist/vite.d.mts +0 -9
- package/dist/vite.mjs +0 -11
- package/dist/webpack.cjs +0 -13
- package/dist/webpack.d.cts +0 -9
- package/dist/webpack.d.mts +0 -9
- 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
|
-
#
|
|
1
|
+
# @vue.ts/complex-types
|
|
2
2
|
|
|
3
|
-
[](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
|
|
13
|
-
$ yarn add -D
|
|
14
|
-
$ pnpm add -D
|
|
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 "
|
|
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 "
|
|
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("
|
|
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("
|
|
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: ["
|
|
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("
|
|
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
|
-
"
|
|
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("
|
|
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("
|
|
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("
|
|
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 "
|
|
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
|
|
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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import
|
|
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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
//#region src/esbuild.d.ts
|
|
6
|
+
declare const _default: (options?: Options | undefined) => esbuild0.Plugin;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { _default as default };
|
package/dist/esbuild.js
ADDED
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
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
package/dist/nuxt.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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 };
|
package/dist/rolldown.js
ADDED
package/dist/rollup.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
package/dist/rspack.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Options } from
|
|
2
|
-
import
|
|
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