ivue 1.1.6 → 1.1.7

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.
@@ -1,5 +1,7 @@
1
1
  <script setup lang="ts">
2
2
  import { useMouse } from './functions/useMouse';
3
+
4
+ import { useDark } from '@vueuse/core';
3
5
  import { ivue, iuse, iref, type UseComposable } from 'ivue';
4
6
 
5
7
  /**
@@ -29,6 +31,8 @@ class Counter {
29
31
  sum: this.sum,
30
32
  total: this.total
31
33
  } = iuse(useMouse()));
34
+ const dark = iuse(useDark());
35
+ dark.value
32
36
  }
33
37
  }
34
38
 
package/docs/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "eslint-plugin-import": "^2.29.1",
19
19
  "eslint-plugin-vue": "^9.14.1",
20
20
  "execa": "^8.0.0",
21
- "ivue": "^1.1.5",
21
+ "ivue": "^1.1.6",
22
22
  "typescript": "^4.5.4",
23
23
  "vite-plugin-dynamic-import": "^1.5.0",
24
24
  "vite-tsconfig-paths": "^4.3.2",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ivue",
3
- "version": "1.1.6",
3
+ "version": "1.1.7",
4
4
  "description": "Infinite Vue – Class Based Architecture for Vue 3",
5
5
  "type": "module",
6
6
  "exports": {
package/src/ivue.ts CHANGED
@@ -41,13 +41,16 @@ export type IVueRefs<T = any> = {
41
41
  /**
42
42
  * Unwraps the returned Refs of composable method T to a reactive type definition.
43
43
  */
44
- export type UseComposableReturn<T extends Record<string, Ref | any>> = {
45
- [K in keyof T]: T[K] extends Ref | DemiRef // Handle Ref
46
- ? T[K]['value'] extends Ref | DemiRef // Handle Double Wrapped Ref: Most often a Ref that is inside a Computed Ref
47
- ? T[K]['value']['value'] // Return doubly wrapped internal value
48
- : T[K]['value'] // Handle Standard Ref or Computed Ref
49
- : T[K] // Handle non Ref property or method
50
- };
44
+ export type UseComposableReturn<T extends Record<string, Ref | any>> =
45
+ T extends Ref | DemiRef
46
+ ? T['value']
47
+ : {
48
+ [K in keyof T]: T[K] extends Ref | DemiRef // Handle Ref
49
+ ? T[K]['value'] extends Ref | DemiRef // Handle Double Wrapped Ref: Most often a Ref that is inside a Computed Ref
50
+ ? T[K]['value']['value'] // Return doubly wrapped internal value
51
+ : T[K]['value'] // Handle Standard Ref or Computed Ref
52
+ : T[K]; // Handle non Ref property or method
53
+ };
51
54
 
52
55
  export type UseComposable<T extends (...args: any[]) => any> =
53
56
  UseComposableReturn<ReturnType<T>>;