@kubb/plugin-vue-query 5.0.0-beta.3 → 5.0.0-beta.31

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 (41) hide show
  1. package/README.md +26 -5
  2. package/dist/{components-qfOFRSoM.cjs → components-B6lPYyOP.cjs} +367 -381
  3. package/dist/components-B6lPYyOP.cjs.map +1 -0
  4. package/dist/{components-D1UhYFgY.js → components-BZqujNQv.js} +336 -380
  5. package/dist/components-BZqujNQv.js.map +1 -0
  6. package/dist/components.cjs +1 -1
  7. package/dist/components.d.ts +3 -67
  8. package/dist/components.js +1 -1
  9. package/dist/{generators-CbnIVBgY.js → generators-C-3isXzW.js} +158 -203
  10. package/dist/generators-C-3isXzW.js.map +1 -0
  11. package/dist/{generators-C4gs_P1i.cjs → generators-QHQkbNnm.cjs} +157 -202
  12. package/dist/generators-QHQkbNnm.cjs.map +1 -0
  13. package/dist/generators.cjs +1 -1
  14. package/dist/generators.d.ts +17 -1
  15. package/dist/generators.js +1 -1
  16. package/dist/index.cjs +136 -23
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/index.d.ts +29 -1
  19. package/dist/index.js +136 -23
  20. package/dist/index.js.map +1 -1
  21. package/dist/types-D-LjzI_Q.d.ts +270 -0
  22. package/extension.yaml +1273 -0
  23. package/package.json +16 -18
  24. package/src/components/InfiniteQuery.tsx +16 -48
  25. package/src/components/InfiniteQueryOptions.tsx +43 -58
  26. package/src/components/Mutation.tsx +33 -42
  27. package/src/components/Query.tsx +16 -49
  28. package/src/components/QueryKey.tsx +9 -61
  29. package/src/components/QueryOptions.tsx +20 -76
  30. package/src/generators/infiniteQueryGenerator.tsx +55 -63
  31. package/src/generators/mutationGenerator.tsx +50 -61
  32. package/src/generators/queryGenerator.tsx +52 -61
  33. package/src/plugin.ts +46 -30
  34. package/src/resolvers/resolverVueQuery.ts +61 -4
  35. package/src/types.ts +129 -53
  36. package/src/utils.ts +44 -25
  37. package/dist/components-D1UhYFgY.js.map +0 -1
  38. package/dist/components-qfOFRSoM.cjs.map +0 -1
  39. package/dist/generators-C4gs_P1i.cjs.map +0 -1
  40. package/dist/generators-CbnIVBgY.js.map +0 -1
  41. package/dist/types-nVDTfuS1.d.ts +0 -194
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <div align="center">
2
- <h1>Plugin Vue-Query</h1>
2
+ <h1>@kubb/plugin-vue-query</h1>
3
3
  <a href="https://kubb.dev" target="_blank" rel="noopener noreferrer">
4
4
  <img width="180" src="https://raw.githubusercontent.com/kubb-labs/kubb/main/assets/logo.png" alt="Kubb logo">
5
5
  </a>
@@ -11,9 +11,9 @@
11
11
  [![Sponsors][sponsors-src]][sponsors-href]
12
12
 
13
13
  <h4>
14
- <a href="https://codesandbox.io/s/github/kubb-labs/kubb/tree/main//examples/typescript" target="_blank">View Demo</a>
14
+ <a href="https://codesandbox.io/s/github/kubb-labs/plugins/tree/main/examples/vue-query" target="_blank">View Demo</a>
15
15
  <span> · </span>
16
- <a href="https://kubb.dev/" target="_blank">Documentation</a>
16
+ <a href="https://kubb.dev/plugins/vue-query" target="_blank">Documentation</a>
17
17
  <span> · </span>
18
18
  <a href="https://github.com/kubb-labs/kubb/issues/" target="_blank">Report Bug</a>
19
19
  <span> · </span>
@@ -21,11 +21,32 @@
21
21
  </h4>
22
22
  </div>
23
23
 
24
- Swagger integration for React-Query to generate all the different hooks based on an OpenAPI specification.
24
+ `@kubb/plugin-vue-query` generates TanStack Query composables from your OpenAPI specification. Each operation becomes a typed `useQuery`, `useMutation`, or `useInfiniteQuery` composable for Vue 3.
25
+
26
+ ## Features
27
+
28
+ - Generates `useQuery`, `useMutation`, `useInfiniteQuery`, and `queryOptions` composables
29
+ - Infers request, response, and error types from the spec
30
+ - Uses Vue 3 Composition API types, including `MaybeRef` and `MaybeRefOrGetter`
31
+ - Works with `@kubb/plugin-ts`, `@kubb/plugin-zod`, and `@kubb/plugin-client`
32
+
33
+ ## Installation
34
+
35
+ ```bash
36
+ bun add @kubb/plugin-vue-query
37
+ # or
38
+ pnpm add @kubb/plugin-vue-query
39
+ # or
40
+ npm install @kubb/plugin-vue-query
41
+ ```
42
+
43
+ ## Documentation
44
+
45
+ See the [full documentation](https://kubb.dev/plugins/vue-query) for configuration options and examples.
25
46
 
26
47
  ## Supporting Kubb
27
48
 
28
- Kubb uses an MIT-licensed open source project with its ongoing development made possible entirely by the support of Sponsors. If you would like to become a sponsor, please consider:
49
+ Kubb is an MIT-licensed open source project with its ongoing development made possible entirely by the support of Sponsors. If you would like to become a sponsor, please consider:
29
50
 
30
51
  - [Become a Sponsor on GitHub](https://github.com/sponsors/stijnvanhulle)
31
52