@semi-kit/hooks 1.1.8 → 1.1.9

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.
@@ -0,0 +1,16 @@
1
+ declare function useForwardInst<T>({
2
+ methods,
3
+ exposeTarget
4
+ }?: {
5
+ methods?: Record<string, any>;
6
+ exposeTarget?: boolean;
7
+ }): {
8
+ forwardInst: (el: any) => void;
9
+ targetInst: {
10
+ value: T | null;
11
+ };
12
+ } | {
13
+ forwardInst: (el: any) => void;
14
+ targetInst?: undefined;
15
+ };
16
+ export { useForwardInst };
@@ -0,0 +1 @@
1
+ import{getCurrentInstance}from"vue";function useForwardInst({methods:t,exposeTarget:n}={}){let r=getCurrentInstance(),i={value:null},a=e=>{if(n&&(i.value=e),r){if(e&&t)for(let n in t)n in e||(e[n]=t[n]);r.exposed=r.exposeProxy=e}};return n?{forwardInst:a,targetInst:i}:{forwardInst:a}}export{useForwardInst};
package/lib/index.d.mts CHANGED
@@ -1,2 +1,3 @@
1
+ import { useForwardInst } from "./forward-inst.mjs";
1
2
  import { useSortable } from "./sortable.mjs";
2
- export { useSortable };
3
+ export { useForwardInst, useSortable };
package/lib/index.mjs CHANGED
@@ -1 +1 @@
1
- import{useSortable}from"./sortable.mjs";export{useSortable};
1
+ import{useForwardInst}from"./forward-inst.mjs";import{useSortable}from"./sortable.mjs";export{useForwardInst,useSortable};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@semi-kit/hooks",
3
- "version": "1.1.8",
3
+ "version": "1.1.9",
4
4
  "description": "Commonly used Hooks collection",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -16,6 +16,7 @@
16
16
  "types": "./lib/index.d.mts",
17
17
  "exports": {
18
18
  ".": "./lib/index.mjs",
19
+ "./forward-inst": "./lib/forward-inst.mjs",
19
20
  "./sortable": "./lib/sortable.mjs",
20
21
  "./package.json": "./package.json"
21
22
  },
@@ -27,16 +28,18 @@
27
28
  "release": "npm publish"
28
29
  },
29
30
  "devDependencies": {
30
- "@types/node": "^24.10.1",
31
- "bumpp": "^10.3.1",
32
- "tsdown": "^0.16.4",
33
- "typescript": "^5.9.3",
34
- "sortablejs": "^1.15.6",
35
- "@types/sortablejs": "^1.15.9"
31
+ "@types/node": "catalog:",
32
+ "bumpp": "catalog:",
33
+ "tsdown": "catalog:",
34
+ "typescript": "catalog:",
35
+ "sortablejs": "catalog:",
36
+ "@types/sortablejs": "catalog:",
37
+ "vue": "catalog:"
36
38
  },
37
39
  "peerDependencies": {
38
40
  "sortablejs": "*",
39
- "@types/sortablejs": "*"
41
+ "@types/sortablejs": "*",
42
+ "vue": "*"
40
43
  },
41
44
  "peerDependenciesMeta": {
42
45
  "sortablejs": {
@@ -44,6 +47,9 @@
44
47
  },
45
48
  "@types/sortablejs": {
46
49
  "optional": true
50
+ },
51
+ "vue": {
52
+ "optional": true
47
53
  }
48
54
  }
49
55
  }