ivue 1.1.19 → 1.1.21

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 (84) hide show
  1. package/README.md +13 -8
  2. package/coverage/clover.xml +174 -160
  3. package/coverage/coverage-final.json +1 -1
  4. package/coverage/index.html +18 -18
  5. package/coverage/{index.ts.html → ivue.ts.html} +221 -32
  6. package/dist/index.es.js +18 -18
  7. package/dist/index.umd.js +1 -1
  8. package/dist/src/ivue.d.ts +19 -13
  9. package/docs/docs/.vitepress/config.ts +10 -4
  10. package/docs/docs/.vitepress/dist/404.html +3 -3
  11. package/docs/docs/.vitepress/dist/api/ivue.html +7 -7
  12. package/docs/docs/.vitepress/dist/api/propsWithDefaults.html +7 -7
  13. package/docs/docs/.vitepress/dist/assets/{api_ivue.md.CZqok1oO.js → api_ivue.md.DyFbv52x.js} +1 -1
  14. package/docs/docs/.vitepress/dist/assets/{api_ivue.md.CZqok1oO.lean.js → api_ivue.md.DyFbv52x.lean.js} +1 -1
  15. package/docs/docs/.vitepress/dist/assets/{api_propsWithDefaults.md.DEcLH0d7.lean.js → api_propsWithDefaults.md.C6C7ZBZl.js} +1 -1
  16. package/docs/docs/.vitepress/dist/assets/{api_propsWithDefaults.md.DEcLH0d7.js → api_propsWithDefaults.md.C6C7ZBZl.lean.js} +1 -1
  17. package/docs/docs/.vitepress/dist/assets/{app.B0XSXAbt.js → app.CQ7kL6_f.js} +1 -1
  18. package/docs/docs/.vitepress/dist/assets/chunks/@localSearchIndexroot.DPHmCl-3.js +1 -0
  19. package/docs/docs/.vitepress/dist/assets/chunks/{Button.vue_vue_type_script_setup_true_lang.CPdVloYP.js → Button.vue_vue_type_script_setup_true_lang.Bynntqk6.js} +1 -1
  20. package/docs/docs/.vitepress/dist/assets/chunks/{VPLocalSearchBox.Cy60THbt.js → VPLocalSearchBox.hM-bvSJA.js} +1 -1
  21. package/docs/docs/.vitepress/dist/assets/chunks/framework.CvEKxEoK.js +1 -0
  22. package/docs/docs/.vitepress/dist/assets/chunks/index.es.BJUrCfJB.js +1 -0
  23. package/docs/docs/.vitepress/dist/assets/chunks/{theme.CU9x1gi1.js → theme.BQo6cm_A.js} +2 -2
  24. package/docs/docs/.vitepress/dist/assets/index.md.D-9TpgnJ.js +1 -0
  25. package/docs/docs/.vitepress/dist/assets/index.md.D-9TpgnJ.lean.js +1 -0
  26. package/docs/docs/.vitepress/dist/assets/{pages_advanced-usage.md.BdjYKyP7.js → pages_advanced-usage.md.DsU0E8Oi.js} +1 -1
  27. package/docs/docs/.vitepress/dist/assets/{pages_advanced-usage.md.BdjYKyP7.lean.js → pages_advanced-usage.md.DsU0E8Oi.lean.js} +1 -1
  28. package/docs/docs/.vitepress/dist/assets/pages_api.md.CElVfYwg.js +1 -0
  29. package/docs/docs/.vitepress/dist/assets/pages_api.md.CElVfYwg.lean.js +1 -0
  30. package/docs/docs/.vitepress/dist/assets/{pages_browse-code.md.BTo1NnoD.js → pages_browse-code.md.DhMpWRNv.js} +34 -27
  31. package/docs/docs/.vitepress/dist/assets/{pages_browse-code.md.BTo1NnoD.lean.js → pages_browse-code.md.DhMpWRNv.lean.js} +1 -1
  32. package/docs/docs/.vitepress/dist/assets/{pages_getting-started.md.pKbgyjOJ.js → pages_getting-started.md.CRguJKe8.js} +35 -28
  33. package/docs/docs/.vitepress/dist/assets/{pages_getting-started.md.pKbgyjOJ.lean.js → pages_getting-started.md.CRguJKe8.lean.js} +1 -1
  34. package/docs/docs/.vitepress/dist/assets/{pages_guidelines.md.e9uCeWU_.lean.js → pages_guidelines.md.yUFCB7mz.js} +19 -13
  35. package/docs/docs/.vitepress/dist/assets/{pages_guidelines.md.e9uCeWU_.js → pages_guidelines.md.yUFCB7mz.lean.js} +19 -13
  36. package/docs/docs/.vitepress/dist/assets/{pages_how-it-works.md.DjBxE3iI.lean.js → pages_how-it-works.md.DDKhyGlo.js} +35 -28
  37. package/docs/docs/.vitepress/dist/assets/{pages_how-it-works.md.DjBxE3iI.js → pages_how-it-works.md.DDKhyGlo.lean.js} +35 -28
  38. package/docs/docs/.vitepress/dist/assets/{pages_how-its-made.md.DGeFDBuv.js → pages_how-its-made.md.CCol99CD.js} +1 -1
  39. package/docs/docs/.vitepress/dist/assets/{pages_how-its-made.md.DGeFDBuv.lean.js → pages_how-its-made.md.CCol99CD.lean.js} +1 -1
  40. package/docs/docs/.vitepress/dist/assets/pages_introduction.md.CCkiQtfX.js +1 -0
  41. package/docs/docs/.vitepress/dist/assets/pages_introduction.md.CCkiQtfX.lean.js +1 -0
  42. package/docs/docs/.vitepress/dist/assets/{pages_usage.md.CdQ0bAt8.js → pages_usage.md.EDa7wXde.js} +82 -32
  43. package/docs/docs/.vitepress/dist/assets/{pages_usage.md.CdQ0bAt8.lean.js → pages_usage.md.EDa7wXde.lean.js} +82 -32
  44. package/docs/docs/.vitepress/dist/assets/{style.Fgx7OB_D.css → style.Dtxde_a0.css} +1 -1
  45. package/docs/docs/.vitepress/dist/hashmap.json +1 -1
  46. package/docs/docs/.vitepress/dist/index.html +9 -9
  47. package/docs/docs/.vitepress/dist/pages/advanced-usage.html +7 -7
  48. package/docs/docs/.vitepress/dist/pages/api.html +9 -9
  49. package/docs/docs/.vitepress/dist/pages/browse-code.html +40 -33
  50. package/docs/docs/.vitepress/dist/pages/getting-started.html +41 -34
  51. package/docs/docs/.vitepress/dist/pages/guidelines.html +25 -19
  52. package/docs/docs/.vitepress/dist/pages/how-it-works.html +41 -34
  53. package/docs/docs/.vitepress/dist/pages/how-its-made.html +7 -7
  54. package/docs/docs/.vitepress/dist/pages/introduction.html +9 -9
  55. package/docs/docs/.vitepress/dist/pages/usage.html +88 -38
  56. package/docs/docs/.vitepress/theme/main.css +1 -1
  57. package/docs/docs/components/guidelines/CounterExternalRefsDetailed.vue +5 -5
  58. package/docs/docs/components/usage/CounterComposables.vue +10 -2
  59. package/docs/docs/components/usage/CounterComposablesDestructuring.vue +3 -3
  60. package/docs/docs/components/usage/CounterComposablesIvueDestructuring.vue +36 -0
  61. package/docs/docs/components/usage/CounterExternalRefs.vue +3 -3
  62. package/docs/docs/components/usage/classes/CustomMouse.ts +18 -0
  63. package/docs/docs/components/usage/functions/useCustomMouse.ts +31 -0
  64. package/docs/docs/index.md +37 -17
  65. package/docs/docs/pages/api.md +13 -13
  66. package/docs/docs/pages/guidelines.md +12 -6
  67. package/docs/docs/pages/how-it-works.md +24 -10
  68. package/docs/docs/pages/how-its-made.md +1 -1
  69. package/docs/docs/pages/introduction.md +10 -3
  70. package/docs/docs/pages/usage.md +24 -2
  71. package/docs/package.json +1 -1
  72. package/package.json +1 -1
  73. package/src/__tests__/ivue.vitest.spec.ts +22 -21
  74. package/src/ivue.ts +30 -17
  75. package/docs/docs/.vitepress/dist/assets/chunks/@localSearchIndexroot.c4Gx9TYS.js +0 -1
  76. package/docs/docs/.vitepress/dist/assets/chunks/framework.DwpdbuZp.js +0 -1
  77. package/docs/docs/.vitepress/dist/assets/chunks/index.es.Dhu93bg7.js +0 -1
  78. package/docs/docs/.vitepress/dist/assets/index.md.CLB_U8aI.js +0 -1
  79. package/docs/docs/.vitepress/dist/assets/index.md.CLB_U8aI.lean.js +0 -1
  80. package/docs/docs/.vitepress/dist/assets/pages_api.md.-RSHq6PR.js +0 -7
  81. package/docs/docs/.vitepress/dist/assets/pages_api.md.-RSHq6PR.lean.js +0 -7
  82. package/docs/docs/.vitepress/dist/assets/pages_introduction.md.BdBoAz6L.js +0 -1
  83. package/docs/docs/.vitepress/dist/assets/pages_introduction.md.BdBoAz6L.lean.js +0 -1
  84. package/docs/docs/components/usage/functions/useMouse.ts +0 -26
@@ -3,7 +3,7 @@
3
3
  <html lang="en">
4
4
 
5
5
  <head>
6
- <title>Code coverage report for index.ts</title>
6
+ <title>Code coverage report for ivue.ts</title>
7
7
  <meta charset="utf-8" />
8
8
  <link rel="stylesheet" href="prettify.css" />
9
9
  <link rel="stylesheet" href="base.css" />
@@ -19,34 +19,34 @@
19
19
  <body>
20
20
  <div class='wrapper'>
21
21
  <div class='pad1'>
22
- <h1><a href="index.html">All files</a> index.ts</h1>
22
+ <h1><a href="index.html">All files</a> ivue.ts</h1>
23
23
  <div class='clearfix'>
24
24
 
25
25
  <div class='fl pad1y space-right2'>
26
- <span class="strong">100% </span>
26
+ <span class="strong">94.25% </span>
27
27
  <span class="quiet">Statements</span>
28
- <span class='fraction'>160/160</span>
28
+ <span class='fraction'>164/174</span>
29
29
  </div>
30
30
 
31
31
 
32
32
  <div class='fl pad1y space-right2'>
33
33
  <span class="strong">100% </span>
34
34
  <span class="quiet">Branches</span>
35
- <span class='fraction'>71/71</span>
35
+ <span class='fraction'>72/72</span>
36
36
  </div>
37
37
 
38
38
 
39
39
  <div class='fl pad1y space-right2'>
40
- <span class="strong">100% </span>
40
+ <span class="strong">91.66% </span>
41
41
  <span class="quiet">Functions</span>
42
- <span class='fraction'>10/10</span>
42
+ <span class='fraction'>11/12</span>
43
43
  </div>
44
44
 
45
45
 
46
46
  <div class='fl pad1y space-right2'>
47
- <span class="strong">100% </span>
47
+ <span class="strong">94.25% </span>
48
48
  <span class="quiet">Lines</span>
49
- <span class='fraction'>160/160</span>
49
+ <span class='fraction'>164/174</span>
50
50
  </div>
51
51
 
52
52
 
@@ -519,7 +519,70 @@
519
519
  <a name='L454'></a><a href='#L454'>454</a>
520
520
  <a name='L455'></a><a href='#L455'>455</a>
521
521
  <a name='L456'></a><a href='#L456'>456</a>
522
- <a name='L457'></a><a href='#L457'>457</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
522
+ <a name='L457'></a><a href='#L457'>457</a>
523
+ <a name='L458'></a><a href='#L458'>458</a>
524
+ <a name='L459'></a><a href='#L459'>459</a>
525
+ <a name='L460'></a><a href='#L460'>460</a>
526
+ <a name='L461'></a><a href='#L461'>461</a>
527
+ <a name='L462'></a><a href='#L462'>462</a>
528
+ <a name='L463'></a><a href='#L463'>463</a>
529
+ <a name='L464'></a><a href='#L464'>464</a>
530
+ <a name='L465'></a><a href='#L465'>465</a>
531
+ <a name='L466'></a><a href='#L466'>466</a>
532
+ <a name='L467'></a><a href='#L467'>467</a>
533
+ <a name='L468'></a><a href='#L468'>468</a>
534
+ <a name='L469'></a><a href='#L469'>469</a>
535
+ <a name='L470'></a><a href='#L470'>470</a>
536
+ <a name='L471'></a><a href='#L471'>471</a>
537
+ <a name='L472'></a><a href='#L472'>472</a>
538
+ <a name='L473'></a><a href='#L473'>473</a>
539
+ <a name='L474'></a><a href='#L474'>474</a>
540
+ <a name='L475'></a><a href='#L475'>475</a>
541
+ <a name='L476'></a><a href='#L476'>476</a>
542
+ <a name='L477'></a><a href='#L477'>477</a>
543
+ <a name='L478'></a><a href='#L478'>478</a>
544
+ <a name='L479'></a><a href='#L479'>479</a>
545
+ <a name='L480'></a><a href='#L480'>480</a>
546
+ <a name='L481'></a><a href='#L481'>481</a>
547
+ <a name='L482'></a><a href='#L482'>482</a>
548
+ <a name='L483'></a><a href='#L483'>483</a>
549
+ <a name='L484'></a><a href='#L484'>484</a>
550
+ <a name='L485'></a><a href='#L485'>485</a>
551
+ <a name='L486'></a><a href='#L486'>486</a>
552
+ <a name='L487'></a><a href='#L487'>487</a>
553
+ <a name='L488'></a><a href='#L488'>488</a>
554
+ <a name='L489'></a><a href='#L489'>489</a>
555
+ <a name='L490'></a><a href='#L490'>490</a>
556
+ <a name='L491'></a><a href='#L491'>491</a>
557
+ <a name='L492'></a><a href='#L492'>492</a>
558
+ <a name='L493'></a><a href='#L493'>493</a>
559
+ <a name='L494'></a><a href='#L494'>494</a>
560
+ <a name='L495'></a><a href='#L495'>495</a>
561
+ <a name='L496'></a><a href='#L496'>496</a>
562
+ <a name='L497'></a><a href='#L497'>497</a>
563
+ <a name='L498'></a><a href='#L498'>498</a>
564
+ <a name='L499'></a><a href='#L499'>499</a>
565
+ <a name='L500'></a><a href='#L500'>500</a>
566
+ <a name='L501'></a><a href='#L501'>501</a>
567
+ <a name='L502'></a><a href='#L502'>502</a>
568
+ <a name='L503'></a><a href='#L503'>503</a>
569
+ <a name='L504'></a><a href='#L504'>504</a>
570
+ <a name='L505'></a><a href='#L505'>505</a>
571
+ <a name='L506'></a><a href='#L506'>506</a>
572
+ <a name='L507'></a><a href='#L507'>507</a>
573
+ <a name='L508'></a><a href='#L508'>508</a>
574
+ <a name='L509'></a><a href='#L509'>509</a>
575
+ <a name='L510'></a><a href='#L510'>510</a>
576
+ <a name='L511'></a><a href='#L511'>511</a>
577
+ <a name='L512'></a><a href='#L512'>512</a>
578
+ <a name='L513'></a><a href='#L513'>513</a>
579
+ <a name='L514'></a><a href='#L514'>514</a>
580
+ <a name='L515'></a><a href='#L515'>515</a>
581
+ <a name='L516'></a><a href='#L516'>516</a>
582
+ <a name='L517'></a><a href='#L517'>517</a>
583
+ <a name='L518'></a><a href='#L518'>518</a>
584
+ <a name='L519'></a><a href='#L519'>519</a>
585
+ <a name='L520'></a><a href='#L520'>520</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
523
586
  <span class="cline-any cline-neutral">&nbsp;</span>
524
587
  <span class="cline-any cline-neutral">&nbsp;</span>
525
588
  <span class="cline-any cline-yes">1x</span>
@@ -655,6 +718,35 @@
655
718
  <span class="cline-any cline-neutral">&nbsp;</span>
656
719
  <span class="cline-any cline-neutral">&nbsp;</span>
657
720
  <span class="cline-any cline-neutral">&nbsp;</span>
721
+ <span class="cline-any cline-neutral">&nbsp;</span>
722
+ <span class="cline-any cline-neutral">&nbsp;</span>
723
+ <span class="cline-any cline-neutral">&nbsp;</span>
724
+ <span class="cline-any cline-neutral">&nbsp;</span>
725
+ <span class="cline-any cline-neutral">&nbsp;</span>
726
+ <span class="cline-any cline-neutral">&nbsp;</span>
727
+ <span class="cline-any cline-neutral">&nbsp;</span>
728
+ <span class="cline-any cline-neutral">&nbsp;</span>
729
+ <span class="cline-any cline-neutral">&nbsp;</span>
730
+ <span class="cline-any cline-neutral">&nbsp;</span>
731
+ <span class="cline-any cline-neutral">&nbsp;</span>
732
+ <span class="cline-any cline-neutral">&nbsp;</span>
733
+ <span class="cline-any cline-neutral">&nbsp;</span>
734
+ <span class="cline-any cline-neutral">&nbsp;</span>
735
+ <span class="cline-any cline-neutral">&nbsp;</span>
736
+ <span class="cline-any cline-neutral">&nbsp;</span>
737
+ <span class="cline-any cline-neutral">&nbsp;</span>
738
+ <span class="cline-any cline-neutral">&nbsp;</span>
739
+ <span class="cline-any cline-neutral">&nbsp;</span>
740
+ <span class="cline-any cline-neutral">&nbsp;</span>
741
+ <span class="cline-any cline-neutral">&nbsp;</span>
742
+ <span class="cline-any cline-neutral">&nbsp;</span>
743
+ <span class="cline-any cline-neutral">&nbsp;</span>
744
+ <span class="cline-any cline-neutral">&nbsp;</span>
745
+ <span class="cline-any cline-neutral">&nbsp;</span>
746
+ <span class="cline-any cline-neutral">&nbsp;</span>
747
+ <span class="cline-any cline-neutral">&nbsp;</span>
748
+ <span class="cline-any cline-neutral">&nbsp;</span>
749
+ <span class="cline-any cline-neutral">&nbsp;</span>
658
750
  <span class="cline-any cline-yes">1x</span>
659
751
  <span class="cline-any cline-neutral">&nbsp;</span>
660
752
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -809,6 +901,39 @@
809
901
  <span class="cline-any cline-neutral">&nbsp;</span>
810
902
  <span class="cline-any cline-neutral">&nbsp;</span>
811
903
  <span class="cline-any cline-neutral">&nbsp;</span>
904
+ <span class="cline-any cline-yes">1x</span>
905
+ <span class="cline-any cline-yes">162x</span>
906
+ <span class="cline-any cline-yes">162x</span>
907
+ <span class="cline-any cline-neutral">&nbsp;</span>
908
+ <span class="cline-any cline-neutral">&nbsp;</span>
909
+ <span class="cline-any cline-neutral">&nbsp;</span>
910
+ <span class="cline-any cline-neutral">&nbsp;</span>
911
+ <span class="cline-any cline-neutral">&nbsp;</span>
912
+ <span class="cline-any cline-neutral">&nbsp;</span>
913
+ <span class="cline-any cline-neutral">&nbsp;</span>
914
+ <span class="cline-any cline-neutral">&nbsp;</span>
915
+ <span class="cline-any cline-neutral">&nbsp;</span>
916
+ <span class="cline-any cline-neutral">&nbsp;</span>
917
+ <span class="cline-any cline-neutral">&nbsp;</span>
918
+ <span class="cline-any cline-neutral">&nbsp;</span>
919
+ <span class="cline-any cline-yes">1x</span>
920
+ <span class="cline-any cline-no">&nbsp;</span>
921
+ <span class="cline-any cline-no">&nbsp;</span>
922
+ <span class="cline-any cline-no">&nbsp;</span>
923
+ <span class="cline-any cline-no">&nbsp;</span>
924
+ <span class="cline-any cline-no">&nbsp;</span>
925
+ <span class="cline-any cline-no">&nbsp;</span>
926
+ <span class="cline-any cline-no">&nbsp;</span>
927
+ <span class="cline-any cline-no">&nbsp;</span>
928
+ <span class="cline-any cline-no">&nbsp;</span>
929
+ <span class="cline-any cline-no">&nbsp;</span>
930
+ <span class="cline-any cline-neutral">&nbsp;</span>
931
+ <span class="cline-any cline-neutral">&nbsp;</span>
932
+ <span class="cline-any cline-neutral">&nbsp;</span>
933
+ <span class="cline-any cline-neutral">&nbsp;</span>
934
+ <span class="cline-any cline-neutral">&nbsp;</span>
935
+ <span class="cline-any cline-neutral">&nbsp;</span>
936
+ <span class="cline-any cline-neutral">&nbsp;</span>
812
937
  <span class="cline-any cline-neutral">&nbsp;</span>
813
938
  <span class="cline-any cline-neutral">&nbsp;</span>
814
939
  <span class="cline-any cline-yes">1x</span>
@@ -878,8 +1003,6 @@
878
1003
  <span class="cline-any cline-neutral">&nbsp;</span>
879
1004
  <span class="cline-any cline-yes">34x</span>
880
1005
  <span class="cline-any cline-yes">34x</span>
881
- <span class="cline-any cline-neutral">&nbsp;</span>
882
- <span class="cline-any cline-yes">40x</span>
883
1006
  <span class="cline-any cline-yes">4x</span>
884
1007
  <span class="cline-any cline-neutral">&nbsp;</span>
885
1008
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -975,10 +1098,14 @@
975
1098
  <span class="cline-any cline-yes">8x</span>
976
1099
  <span class="cline-any cline-yes">1x</span>
977
1100
  <span class="cline-any cline-yes">1x</span>
1101
+ <span class="cline-any cline-neutral">&nbsp;</span>
1102
+ <span class="cline-any cline-neutral">&nbsp;</span>
1103
+ <span class="cline-any cline-yes">1x</span>
978
1104
  <span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">/* eslint-disable @typescript-eslint/ban-types */
979
1105
  /* eslint-disable @typescript-eslint/no-explicit-any */
980
1106
  import type { ComputedRef, ExtractPropTypes, Ref, ToRef } from 'vue';
981
- import { UnwrapRef, computed, reactive, toRef } from 'vue';
1107
+ import { UnwrapRef, computed, reactive, ref, toRef } from 'vue';
1108
+ import type { Ref as DemiRef } from 'vue-demi';
982
1109
  &nbsp;
983
1110
  /** Types */
984
1111
  /**
@@ -998,26 +1125,43 @@ export interface ExtendWithToRefs&lt;T extends AnyClass&gt; {
998
1125
  */
999
1126
  export type IVueToRefsFn&lt;T extends AnyClass&gt; = (
1000
1127
  props?: (keyof InstanceType&lt;T&gt;)[]
1001
- ) =&gt; IVueToRefsFnReturn&lt;InstanceType&lt;T&gt;&gt;;
1128
+ ) =&gt; IVueRefs&lt;InstanceType&lt;T&gt;&gt;;
1002
1129
  &nbsp;
1003
1130
  /**
1004
1131
  * Converts a class properties to a composable .value Refs using ToRef vue type,
1005
1132
  * also knows NOT to convert functions to .value Refs but to leave them as is.
1006
1133
  */
1007
- export type IVueToRefsFnReturn&lt;T = any&gt; = {
1134
+ export type IVueRefs&lt;T = any&gt; = {
1008
1135
  [K in keyof T]: T[K] extends Function ? T[K] : ToRef&lt;T[K]&gt;;
1009
1136
  };
1010
1137
  &nbsp;
1011
1138
  /**
1012
- * Unwraps the returned Refs of composable method T to a reactive type definition.
1139
+ * Unwraps Ref Recursively, helps resolve fully the bare value types of any type T
1140
+ * because sometimes the Refs are returned as they are with `.value` from computeds,
1141
+ * thus inferring nested ComputedRef&lt;ComputedRef&lt;ComputedRef&lt;Ref&gt;&gt;&gt; types, which
1142
+ * are difficult to fully resolve to bare values without this utility.
1143
+ * Also support Vue 3 Demi for vue-use library support.
1013
1144
  */
1014
- export type UnwrapComposable&lt;T extends (...args: any[]) =&gt; any&gt; = {
1015
- [K in keyof ReturnType&lt;T&gt;]: UnwrapRef&lt;ReturnType&lt;T&gt;&gt;[K] extends Function
1016
- ? UnwrapRef&lt;ReturnType&lt;T&gt;&gt;[K] // Handle function
1017
- : UnwrapRef&lt;ReturnType&lt;T&gt;&gt;[K] extends Ref
1018
- ? UnwrapRef&lt;ReturnType&lt;T&gt;&gt;[K]['value']
1019
- : UnwrapRef&lt;ReturnType&lt;T&gt;&gt;[K]; // Handle property
1020
- };
1145
+ export type UnwrapRefRecursively&lt;T = any&gt; = T extends Ref | DemiRef
1146
+ ? UnwrapRefRecursively&lt;T['value']&gt;
1147
+ : T;
1148
+ &nbsp;
1149
+ /**
1150
+ * Helper type for UseComposable.
1151
+ */
1152
+ export type UnwrapComposableReturn&lt;T&gt; = T extends Ref | DemiRef
1153
+ ? UnwrapRefRecursively&lt;T&gt;
1154
+ : {
1155
+ [K in keyof T]: T[K] extends Ref | DemiRef
1156
+ ? UnwrapRefRecursively&lt;T[K]&gt;
1157
+ : T[K];
1158
+ };
1159
+ &nbsp;
1160
+ /**
1161
+ * Fully unwraps to bare value types any Vue 3 composable return definition type.
1162
+ */
1163
+ export type UseComposable&lt;T extends (...args: any[]) =&gt; any&gt; =
1164
+ UnwrapComposableReturn&lt;ReturnType&lt;T&gt;&gt;;
1021
1165
  &nbsp;
1022
1166
  /**
1023
1167
  * Extracts object defined emit types by converting them to a plain interface
@@ -1044,6 +1188,9 @@ export type ExtendSlots&lt;T&gt; = PrefixKeys&lt;T, 'before--'&gt; &amp;
1044
1188
  PrefixKeys&lt;T, 'after--'&gt;;
1045
1189
  &nbsp;
1046
1190
  /** Helper Types. */
1191
+ /**
1192
+ * Any JavaScript class of any type.
1193
+ */
1047
1194
  export type AnyClass = abstract new (...args: any[]) =&gt; any;
1048
1195
  &nbsp;
1049
1196
  /**
@@ -1071,7 +1218,15 @@ export type PrefixKeys&lt;T, P extends string | undefined = undefined&gt; = {
1071
1218
  };
1072
1219
  &nbsp;
1073
1220
  /**
1074
- * Get Interface's property's function arguments Parmeters&lt;F&gt; parameter by key K
1221
+ * Get Interface's property's function arguments Parmeters&lt;F&gt;
1222
+ */
1223
+ export type IFnParameters&lt;
1224
+ T extends Record&lt;any, any&gt;,
1225
+ K extends string
1226
+ &gt; = Parameters&lt;Required&lt;Pick&lt;T, K&gt;&gt;[K]&gt;;
1227
+ &nbsp;
1228
+ /**
1229
+ * Get Interface's [T] property's [P] function arguments Parmeters&lt;F&gt; parameter by key [K]
1075
1230
  */
1076
1231
  export type IFnParameter&lt;
1077
1232
  T extends Record&lt;any, any&gt;,
@@ -1114,7 +1269,7 @@ export type ValueOf&lt;T extends Record&lt;any, any&gt;, K&gt; = T[K];
1114
1269
  export const descriptorsMap = new Map();
1115
1270
  &nbsp;
1116
1271
  /**
1117
- * Get descriptors of an entire class prototype chain as a Map.
1272
+ * Get descriptors of an entire class prototype ancestors chain as a Map.
1118
1273
  * Completely emulates JavaScript class inheritance chain for getters and setters.
1119
1274
  *
1120
1275
  * @param className
@@ -1149,7 +1304,7 @@ export function getAllClassDescriptors(className: AnyClass): Descriptors {
1149
1304
  }
1150
1305
  }
1151
1306
  );
1152
- /** Walk up the prototype chain. */
1307
+ /** Walk up the prototype ancestors chain. */
1153
1308
  prototype = Object.getPrototypeOf(prototype);
1154
1309
  }
1155
1310
  &nbsp;
@@ -1231,7 +1386,7 @@ export function ivue&lt;T extends AnyClass&gt;(
1231
1386
  export const propsMap: Map&lt;object, Set&lt;string&gt; | any&gt; = new Map();
1232
1387
  &nbsp;
1233
1388
  /**
1234
- * Get properties of an entire class prototype chain as a Map.
1389
+ * Get properties of an entire class prototype ancestors chain as a Map.
1235
1390
  */
1236
1391
  export function getAllClassProperties(obj: object): Set&lt;string&gt; {
1237
1392
  /* Retrieve props from cache */
@@ -1259,6 +1414,39 @@ export function getAllClassProperties(obj: object): Set&lt;string&gt; {
1259
1414
  return allProps;
1260
1415
  }
1261
1416
  &nbsp;
1417
+ /**
1418
+ * `iref()` is an alias for Vue ref() function but returns an unwrapped type without the .value
1419
+ * `iref()` does not alter the behavior of ref(), but simply transforms the type to an unwrapped raw value.
1420
+ * @param val T
1421
+ * @returns {UnwrapRef&lt;T&gt;}
1422
+ */
1423
+ export function iref&lt;T&gt;(val?: T): UnwrapRef&lt;T&gt; {
1424
+ return ref(val) as unknown as UnwrapRef&lt;T&gt;;
1425
+ }
1426
+ &nbsp;
1427
+ /**
1428
+ * Two modes of operation:
1429
+ * 1. `iuse()` converts the types of a Composable / Ref to pure raw type definition.
1430
+ * Returns for all properties of an object an unwrapped raw type definition,
1431
+ * unwraps direct Refs &amp; ComputedRefs as well.
1432
+ *
1433
+ * 2. If AnyClass is supplied into `iuse(AnyClass, ...args)` and that class's ...args,
1434
+ * it returns a 'ivue(AnyClass, ...args).toRefs()` object for all properties but casts
1435
+ * their types as raw (no-Ref) types to fit with reactive() structure of the
1436
+ * ivue wrapper class context.
1437
+ */
1438
+ export <span class="fstat-no" title="function not covered" >function iuse&lt;T extends AnyClass | Object&gt;(</span>
1439
+ <span class="cstat-no" title="statement not covered" > val?: T,</span>
1440
+ <span class="cstat-no" title="statement not covered" > ...args: InferredArgs&lt;T&gt;</span>
1441
+ <span class="cstat-no" title="statement not covered" >): T extends AnyClass ? InstanceType&lt;T&gt; : UnwrapComposableReturn&lt;T&gt; {</span>
1442
+ <span class="cstat-no" title="statement not covered" > return isClass(val)</span>
1443
+ <span class="cstat-no" title="statement not covered" > ? ivue(</span>
1444
+ <span class="cstat-no" title="statement not covered" > val as T extends AnyClass ? T : any,</span>
1445
+ <span class="cstat-no" title="statement not covered" > ...(args as InferredArgs&lt;T&gt;)</span>
1446
+ <span class="cstat-no" title="statement not covered" > ).toRefs()</span>
1447
+ <span class="cstat-no" title="statement not covered" > : (val as unknown as UnwrapComposableReturn&lt;T&gt;);</span>
1448
+ <span class="cstat-no" title="statement not covered" >}</span>
1449
+ &nbsp;
1262
1450
  /**
1263
1451
  * Convert reactive ivue class to Vue 3 refs.
1264
1452
  *
@@ -1274,7 +1462,7 @@ export function ivueToRefs&lt;T extends AnyClass&gt;(
1274
1462
  ): ExtendWithToRefs&lt;T&gt;['toRefs'] {
1275
1463
  return function (
1276
1464
  props?: (keyof InstanceType&lt;T&gt;)[]
1277
- ): IVueToRefsFnReturn&lt;InstanceType&lt;T&gt;&gt; {
1465
+ ): IVueRefs&lt;InstanceType&lt;T&gt;&gt; {
1278
1466
  /** Resulting refs store. */
1279
1467
  const result: Record&lt;string | number | symbol, any&gt; = {};
1280
1468
  &nbsp;
@@ -1334,15 +1522,13 @@ export function ivueToRefs&lt;T extends AnyClass&gt;(
1334
1522
  /** Convert simple reactive prop to a Ref. */
1335
1523
  result[prop] = toRef(vue, prop);
1336
1524
  }
1337
- /** Delete prop from props as it was already processed. */
1338
- allProps?.delete(prop as string);
1339
1525
  });
1340
1526
  &nbsp;
1341
1527
  /** Memory optimization. */
1342
1528
  allProps = null;
1343
1529
  }
1344
1530
  &nbsp;
1345
- return result as IVueToRefsFnReturn&lt;InstanceType&lt;T&gt;&gt;;
1531
+ return result as IVueRefs&lt;InstanceType&lt;T&gt;&gt;;
1346
1532
  };
1347
1533
  }
1348
1534
  &nbsp;
@@ -1431,6 +1617,9 @@ export function propsWithDefaults&lt;T extends VuePropsObject&gt;(
1431
1617
  }
1432
1618
  return typedProps as VuePropsWithDefaults&lt;T&gt;;
1433
1619
  }
1620
+ &nbsp;
1621
+ /** Necessary ivue.ts to be treated as a module. */
1622
+ export {};
1434
1623
  &nbsp;</pre></td></tr></table></pre>
1435
1624
 
1436
1625
  <div class='push'></div><!-- for sticky footer -->
@@ -1438,7 +1627,7 @@ export function propsWithDefaults&lt;T extends VuePropsObject&gt;(
1438
1627
  <div class='footer quiet pad2 space-top1 center small'>
1439
1628
  Code coverage generated by
1440
1629
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
1441
- at 2024-08-13T00:42:34.338Z
1630
+ at 2024-08-19T00:40:48.849Z
1442
1631
  </div>
1443
1632
  <script src="prettify.js"></script>
1444
1633
  <script>
package/dist/index.es.js CHANGED
@@ -1,6 +1,6 @@
1
- import { reactive as y, computed as g, ref as O, toRef as d } from "vue";
1
+ import { reactive as O, computed as g, ref as h, toRef as d } from "vue";
2
2
  const l = /* @__PURE__ */ new Map();
3
- function h(e) {
3
+ function j(e) {
4
4
  if (l.has(e))
5
5
  return l.get(e);
6
6
  const r = /* @__PURE__ */ new Map();
@@ -12,18 +12,18 @@ function h(e) {
12
12
  }), t = Object.getPrototypeOf(t);
13
13
  return l.set(e, r), r;
14
14
  }
15
- function v(e, ...r) {
15
+ function w(e, ...r) {
16
16
  var n, f;
17
- const t = h(e), i = t != null && t.size ? {} : null, s = y(new e(...r));
17
+ const t = j(e), i = t != null && t.size ? {} : null, s = O(new e(...r));
18
18
  for (const [c, o] of t)
19
19
  ((n = e == null ? void 0 : e.ivue) == null ? void 0 : n[c]) !== !1 && Object.defineProperty(s, c, { get: o.get ? () => {
20
20
  var u, a;
21
21
  return c in i ? i[c] : i[c] = g({ get: (u = o.get) == null ? void 0 : u.bind(s), set: (a = o.set) == null ? void 0 : a.bind(s) });
22
22
  } : void 0, set: (f = o.set) == null ? void 0 : f.bind(s), enumerable: !1 });
23
- return Object.defineProperty(s, "toRefs", { get: () => w(s, t, i), enumerable: !1 }), "init" in s && s.init(), s;
23
+ return Object.defineProperty(s, "toRefs", { get: () => m(s, t, i), enumerable: !1 }), "init" in s && s.init(), s;
24
24
  }
25
25
  const p = /* @__PURE__ */ new Map();
26
- function j(e) {
26
+ function P(e) {
27
27
  if (p.has(e.constructor))
28
28
  return p.get(e.constructor);
29
29
  const r = e.constructor, t = /* @__PURE__ */ new Set();
@@ -35,12 +35,12 @@ function j(e) {
35
35
  return p.set(r, t), t;
36
36
  }
37
37
  function M(e) {
38
- return O(e);
38
+ return h(e);
39
39
  }
40
- function A(e) {
41
- return e;
40
+ function A(e, ...r) {
41
+ return y(e) ? w(e, ...r).toRefs() : e;
42
42
  }
43
- function w(e, r, t) {
43
+ function m(e, r, t) {
44
44
  return function(i) {
45
45
  var n, f;
46
46
  const s = {};
@@ -58,7 +58,7 @@ function w(e, r, t) {
58
58
  typeof e[o] == "function" ? s[o] = e[o].bind(e) : s[o] = d(e, o);
59
59
  }
60
60
  else {
61
- let c = new Set(j(e));
61
+ let c = new Set(P(e));
62
62
  r.forEach((o, u) => {
63
63
  var a, b;
64
64
  s[u] = u in t ? t[u] : t[u] = g({ get: (a = o.get) == null ? void 0 : a.bind(e), set: (b = o.set) == null ? void 0 : b.bind(e) }), c == null || c.delete(u);
@@ -69,24 +69,24 @@ function w(e, r, t) {
69
69
  return s;
70
70
  };
71
71
  }
72
- function P(e) {
72
+ function y(e) {
73
73
  var r;
74
74
  return typeof e == "function" && !!e.prototype && !((r = Object.getOwnPropertyDescriptor(e, "prototype")) != null && r.writable);
75
75
  }
76
76
  function D(e, r) {
77
77
  for (const t in r)
78
- typeof (e == null ? void 0 : e[t]) == "object" && (e == null ? void 0 : e[t]) !== null || P(e == null ? void 0 : e[t]) ? r[t].default = () => e == null ? void 0 : e[t] : r[t].default = e == null ? void 0 : e[t];
78
+ typeof (e == null ? void 0 : e[t]) == "object" && (e == null ? void 0 : e[t]) !== null || y(e == null ? void 0 : e[t]) ? r[t].default = () => e == null ? void 0 : e[t] : r[t].default = e == null ? void 0 : e[t];
79
79
  return r;
80
80
  }
81
81
  export {
82
82
  l as descriptorsMap,
83
- h as getAllClassDescriptors,
84
- j as getAllClassProperties,
83
+ j as getAllClassDescriptors,
84
+ P as getAllClassProperties,
85
85
  M as iref,
86
- P as isClass,
86
+ y as isClass,
87
87
  A as iuse,
88
- v as ivue,
89
- w as ivueToRefs,
88
+ w as ivue,
89
+ m as ivueToRefs,
90
90
  p as propsMap,
91
91
  D as propsWithDefaults
92
92
  };
package/dist/index.umd.js CHANGED
@@ -1 +1 @@
1
- (function(s,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],l):l((s=typeof globalThis<"u"?globalThis:s||self).ivue={},s.Vue)})(this,function(s,l){"use strict";const d=new Map;function b(t){if(d.has(t))return d.get(t);const r=new Map;let e=t.prototype;for(;e.constructor!==Object;)Object.entries(Object.getOwnPropertyDescriptors(e)).forEach(([c,o])=>{const i=r.get(c);i!==o&&(o!=null&&o.get||o!=null&&o.set)&&(i!=null&&i.get&&(o.get=i==null?void 0:i.get),i!=null&&i.set&&(o.set=i==null?void 0:i.set),r.set(c,o))}),e=Object.getPrototypeOf(e);return d.set(t,r),r}const g=new Map;function y(t){if(g.has(t.constructor))return g.get(t.constructor);const r=t.constructor,e=new Set;do Object.getOwnPropertyNames(t).forEach(c=>{["caller","callee","arguments","constructor"].includes(c)||e.add(c)}),t=Object.getPrototypeOf(t);while(t.constructor!==Object);return g.set(r,e),e}function O(t,r,e){return function(c){var i,p;const o={};if(Array.isArray(c)&&c.length)for(let u=0;u<c.length;u++){const n=c[u];if(r.has(n))if(n in e)o[n]=e[n];else{const f=r.get(n);o[n]=e[n]=l.computed({get:(i=f==null?void 0:f.get)==null?void 0:i.bind(t),set:(p=f==null?void 0:f.set)==null?void 0:p.bind(t)})}else typeof t[n]=="function"?o[n]=t[n].bind(t):o[n]=l.toRef(t,n)}else{let u=new Set(y(t));r.forEach((n,f)=>{var a,j;o[f]=f in e?e[f]:e[f]=l.computed({get:(a=n.get)==null?void 0:a.bind(t),set:(j=n.set)==null?void 0:j.bind(t)}),u==null||u.delete(f)}),u.forEach(n=>{typeof t[n]=="function"?o[n]=t[n].bind(t):o[n]=l.toRef(t,n)}),u=null}return o}}function h(t){var r;return typeof t=="function"&&!!t.prototype&&!((r=Object.getOwnPropertyDescriptor(t,"prototype"))!=null&&r.writable)}s.descriptorsMap=d,s.getAllClassDescriptors=b,s.getAllClassProperties=y,s.iref=function(t){return l.ref(t)},s.isClass=h,s.iuse=function(t){return t},s.ivue=function(t,...r){var i,p;const e=b(t),c=e!=null&&e.size?{}:null,o=l.reactive(new t(...r));for(const[u,n]of e)((i=t==null?void 0:t.ivue)==null?void 0:i[u])!==!1&&Object.defineProperty(o,u,{get:n.get?()=>{var f,a;return u in c?c[u]:c[u]=l.computed({get:(f=n.get)==null?void 0:f.bind(o),set:(a=n.set)==null?void 0:a.bind(o)})}:void 0,set:(p=n.set)==null?void 0:p.bind(o),enumerable:!1});return Object.defineProperty(o,"toRefs",{get:()=>O(o,e,c),enumerable:!1}),"init"in o&&o.init(),o},s.ivueToRefs=O,s.propsMap=g,s.propsWithDefaults=function(t,r){for(const e in r)typeof(t==null?void 0:t[e])=="object"&&(t==null?void 0:t[e])!==null||h(t==null?void 0:t[e])?r[e].default=()=>t==null?void 0:t[e]:r[e].default=t==null?void 0:t[e];return r},Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})});
1
+ (function(i,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],l):l((i=typeof globalThis<"u"?globalThis:i||self).ivue={},i.Vue)})(this,function(i,l){"use strict";const d=new Map;function y(t){if(d.has(t))return d.get(t);const r=new Map;let e=t.prototype;for(;e.constructor!==Object;)Object.entries(Object.getOwnPropertyDescriptors(e)).forEach(([c,o])=>{const s=r.get(c);s!==o&&(o!=null&&o.get||o!=null&&o.set)&&(s!=null&&s.get&&(o.get=s==null?void 0:s.get),s!=null&&s.set&&(o.set=s==null?void 0:s.set),r.set(c,o))}),e=Object.getPrototypeOf(e);return d.set(t,r),r}function O(t,...r){var s,p;const e=y(t),c=e!=null&&e.size?{}:null,o=l.reactive(new t(...r));for(const[u,n]of e)((s=t==null?void 0:t.ivue)==null?void 0:s[u])!==!1&&Object.defineProperty(o,u,{get:n.get?()=>{var f,a;return u in c?c[u]:c[u]=l.computed({get:(f=n.get)==null?void 0:f.bind(o),set:(a=n.set)==null?void 0:a.bind(o)})}:void 0,set:(p=n.set)==null?void 0:p.bind(o),enumerable:!1});return Object.defineProperty(o,"toRefs",{get:()=>j(o,e,c),enumerable:!1}),"init"in o&&o.init(),o}const g=new Map;function h(t){if(g.has(t.constructor))return g.get(t.constructor);const r=t.constructor,e=new Set;do Object.getOwnPropertyNames(t).forEach(c=>{["caller","callee","arguments","constructor"].includes(c)||e.add(c)}),t=Object.getPrototypeOf(t);while(t.constructor!==Object);return g.set(r,e),e}function j(t,r,e){return function(c){var s,p;const o={};if(Array.isArray(c)&&c.length)for(let u=0;u<c.length;u++){const n=c[u];if(r.has(n))if(n in e)o[n]=e[n];else{const f=r.get(n);o[n]=e[n]=l.computed({get:(s=f==null?void 0:f.get)==null?void 0:s.bind(t),set:(p=f==null?void 0:f.set)==null?void 0:p.bind(t)})}else typeof t[n]=="function"?o[n]=t[n].bind(t):o[n]=l.toRef(t,n)}else{let u=new Set(h(t));r.forEach((n,f)=>{var a,w;o[f]=f in e?e[f]:e[f]=l.computed({get:(a=n.get)==null?void 0:a.bind(t),set:(w=n.set)==null?void 0:w.bind(t)}),u==null||u.delete(f)}),u.forEach(n=>{typeof t[n]=="function"?o[n]=t[n].bind(t):o[n]=l.toRef(t,n)}),u=null}return o}}function b(t){var r;return typeof t=="function"&&!!t.prototype&&!((r=Object.getOwnPropertyDescriptor(t,"prototype"))!=null&&r.writable)}i.descriptorsMap=d,i.getAllClassDescriptors=y,i.getAllClassProperties=h,i.iref=function(t){return l.ref(t)},i.isClass=b,i.iuse=function(t,...r){return b(t)?O(t,...r).toRefs():t},i.ivue=O,i.ivueToRefs=j,i.propsMap=g,i.propsWithDefaults=function(t,r){for(const e in r)typeof(t==null?void 0:t[e])=="object"&&(t==null?void 0:t[e])!==null||b(t==null?void 0:t[e])?r[e].default=()=>t==null?void 0:t[e]:r[e].default=t==null?void 0:t[e];return r},Object.defineProperty(i,Symbol.toStringTag,{value:"Module"})});
@@ -24,7 +24,7 @@ export declare type IVueRefs<T = any> = {
24
24
  [K in keyof T]: T[K] extends Function ? T[K] : ToRef<T[K]>;
25
25
  };
26
26
  /**
27
- * Unwraps Refs Recursively, helps resolve fully the bare value types of any type T
27
+ * Unwraps Ref Recursively, helps resolve fully the bare value types of any type T
28
28
  * because sometimes the Refs are returned as they are with `.value` from computeds,
29
29
  * thus inferring nested ComputedRef<ComputedRef<ComputedRef<Ref>>> types, which
30
30
  * are difficult to fully resolve to bare values without this utility.
@@ -34,13 +34,13 @@ export declare type UnwrapRefRecursively<T = any> = T extends Ref | DemiRef ? Un
34
34
  /**
35
35
  * Helper type for UseComposable.
36
36
  */
37
- export declare type UnwrapComposable<T> = T extends Ref | DemiRef ? UnwrapRefRecursively<T> : {
37
+ export declare type UnwrapComposableReturn<T> = T extends Ref | DemiRef ? UnwrapRefRecursively<T> : {
38
38
  [K in keyof T]: T[K] extends Ref | DemiRef ? UnwrapRefRecursively<T[K]> : T[K];
39
39
  };
40
40
  /**
41
41
  * Fully unwraps to bare value types any Vue 3 composable return definition type.
42
42
  */
43
- export declare type UseComposable<T extends (...args: any[]) => any> = UnwrapComposable<ReturnType<T>>;
43
+ export declare type UseComposable<T extends (...args: any[]) => any> = UnwrapComposableReturn<ReturnType<T>>;
44
44
  /**
45
45
  * Extracts object defined emit types by converting them to a plain interface
46
46
  */
@@ -113,7 +113,7 @@ export declare type ValueOf<T extends Record<any, any>, K> = T[K];
113
113
  */
114
114
  export declare const descriptorsMap: Map<any, any>;
115
115
  /**
116
- * Get descriptors of an entire class prototype chain as a Map.
116
+ * Get descriptors of an entire class prototype ancestors chain as a Map.
117
117
  * Completely emulates JavaScript class inheritance chain for getters and setters.
118
118
  *
119
119
  * @param className
@@ -147,22 +147,28 @@ export declare function ivue<T extends AnyClass>(className: T, ...args: Inferred
147
147
  */
148
148
  export declare const propsMap: Map<object, Set<string> | any>;
149
149
  /**
150
- * Get properties of an entire class prototype chain as a Map.
150
+ * Get properties of an entire class prototype ancestors chain as a Map.
151
151
  */
152
152
  export declare function getAllClassProperties(obj: object): Set<string>;
153
153
  /**
154
- * `iref` is an unwrapped type alias for Vue ref() function.
155
- * `iref` does not alter the behavior of ref(), but simply
156
- * transforms the type to an unwrapped ref value.
157
- * @param val
158
- * @returns
154
+ * `iref()` is an alias for Vue ref() function but returns an unwrapped type without the .value
155
+ * `iref()` does not alter the behavior of ref(), but simply transforms the type to an unwrapped raw value.
156
+ * @param val T
157
+ * @returns {UnwrapRef<T>}
159
158
  */
160
159
  export declare function iref<T>(val?: T): UnwrapRef<T>;
161
160
  /**
162
- * `iuse` stands for composable.
163
- * Returns unwrapped composable type definition without the Refs.
161
+ * Two modes of operation:
162
+ * 1. `iuse()` converts the types of a Composable / Ref to pure raw type definition.
163
+ * Returns for all properties of an object an unwrapped raw type definition,
164
+ * unwraps direct Refs & ComputedRefs as well.
165
+ *
166
+ * 2. If AnyClass is supplied into `iuse(AnyClass, ...args)` and that class's ...args,
167
+ * it returns a 'ivue(AnyClass, ...args).toRefs()` object for all properties but casts
168
+ * their types as raw (no-Ref) types to fit with reactive() structure of the
169
+ * ivue wrapper class context.
164
170
  */
165
- export declare function iuse<T extends Object>(val?: T): UnwrapComposable<T>;
171
+ export declare function iuse<T extends AnyClass | Object>(val?: T, ...args: InferredArgs<T>): T extends AnyClass ? InstanceType<T> : UnwrapComposableReturn<T>;
166
172
  /**
167
173
  * Convert reactive ivue class to Vue 3 refs.
168
174
  *
@@ -46,6 +46,14 @@ export default defineConfig({
46
46
  text: 'Using Lifecycle Hooks',
47
47
  link: '/pages/usage#using-lifecycle-hooks',
48
48
  },
49
+ {
50
+ text: 'Using Pinia Store',
51
+ link: '/pages/usage#using-pinia-store',
52
+ },
53
+ {
54
+ text: 'Using Quasar Framework',
55
+ link: '/pages/usage#using-quasar-framework',
56
+ },
49
57
  ],
50
58
  },
51
59
 
@@ -126,13 +134,11 @@ export default defineConfig({
126
134
  { text: 'UseComposable', link: '/pages/api#UseComposable' },
127
135
  ],
128
136
  },
129
-
137
+
130
138
  {
131
139
  collapsed: false,
132
140
  text: 'Source Code',
133
- items: [
134
- { text: 'Browse Code', link: '/pages/browse-code' },
135
- ],
141
+ items: [{ text: 'Browse Code', link: '/pages/browse-code' }],
136
142
  },
137
143
  ],
138
144
  },