ivue 1.1.4 → 1.1.6

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.
@@ -26,7 +26,9 @@ export declare type IVueRefs<T = any> = {
26
26
  * Unwraps the returned Refs of composable method T to a reactive type definition.
27
27
  */
28
28
  export declare type UseComposableReturn<T extends Record<string, Ref | any>> = {
29
- [K in keyof T]: T[K] extends Ref ? T[K]['value'] extends Ref ? T[K]['value']['value'] : T[K]['value'] : T[K];
29
+ [K in keyof T]: T[K] extends Ref ? T[K]['value'] extends Ref ? T[K]['value']['value'] : T[K]['value'] : T[K] extends {
30
+ value: any;
31
+ } ? T[K]['value'] : T[K];
30
32
  };
31
33
  export declare type UseComposable<T extends (...args: any[]) => any> = UseComposableReturn<ReturnType<T>>;
32
34
  /**
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.3",
21
+ "ivue": "^1.1.5",
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.4",
3
+ "version": "1.1.6",
4
4
  "description": "Infinite Vue – Class Based Architecture for Vue 3",
5
5
  "type": "module",
6
6
  "exports": {
@@ -23,7 +23,8 @@
23
23
  "release": "yarn build && yarn publish"
24
24
  },
25
25
  "peerDependencies": {
26
- "vue": "^3.0.0"
26
+ "vue": "^3.0.0",
27
+ "vue-demi": "^0.0.0"
27
28
  },
28
29
  "devDependencies": {
29
30
  "@cypress/vite-dev-server": "^5.0.2",
@@ -53,6 +54,7 @@
53
54
  "vite-tsconfig-paths": "^4.3.2",
54
55
  "vitest": "^2.0.5",
55
56
  "vue": "^3.2.45",
57
+ "vue-demi": "^0.14.10",
56
58
  "vue-router": "^4.1.6"
57
59
  },
58
60
  "repository": {
package/src/ivue.ts CHANGED
@@ -7,6 +7,7 @@ import type {
7
7
  ToRef,
8
8
  UnwrapNestedRefs,
9
9
  } from 'vue';
10
+ import type { Ref as DemiRef } from 'vue-demi';
10
11
  import { UnwrapRef, computed, reactive, ref, toRef } from 'vue';
11
12
 
12
13
  /** Types */
@@ -41,11 +42,11 @@ export type IVueRefs<T = any> = {
41
42
  * Unwraps the returned Refs of composable method T to a reactive type definition.
42
43
  */
43
44
  export type UseComposableReturn<T extends Record<string, Ref | any>> = {
44
- [K in keyof T]: T[K] extends Ref // Handle Ref
45
- ? T[K]['value'] extends Ref // Handle Double Wrapped Ref: Most often a Ref that is inside a Computed Ref
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
46
47
  ? T[K]['value']['value'] // Return doubly wrapped internal value
47
48
  : T[K]['value'] // Handle Standard Ref or Computed Ref
48
- : T[K]; // Handle non Ref property or method
49
+ : T[K] // Handle non Ref property or method
49
50
  };
50
51
 
51
52
  export type UseComposable<T extends (...args: any[]) => any> =