@vlrc-fe/hooks 1.0.0 → 1.0.2
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.
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/useModalState.d.ts +13 -0
- package/dist/useModalState.d.ts.map +1 -0
- package/package.json +2 -2
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type ModalState = {
|
|
2
|
+
load: boolean;
|
|
3
|
+
open: boolean;
|
|
4
|
+
};
|
|
5
|
+
export type UseModalStateOptions = {
|
|
6
|
+
destroyDelay?: number;
|
|
7
|
+
};
|
|
8
|
+
export declare function useModalState<const T extends ReadonlyArray<string>>(keyList: T, options?: UseModalStateOptions): {
|
|
9
|
+
modal: Record<T[number], ModalState>;
|
|
10
|
+
openModal: (name: T[number]) => void;
|
|
11
|
+
closeModal: (name: T[number]) => void;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=useModalState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useModalState.d.ts","sourceRoot":"","sources":["../src/useModalState.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,UAAU,GAAG;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC;AAE1D,MAAM,MAAM,oBAAoB,GAAG;IACjC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,wBAAgB,aAAa,CAAC,KAAK,CAAC,CAAC,SAAS,aAAa,CAAC,MAAM,CAAC,EACjE,OAAO,EAAE,CAAC,EACV,OAAO,CAAC,EAAE,oBAAoB,GAoGzB;IACH,KAAK,EAAE,MAAM,YAAM,UAAU,CAAC,CAAC;IAC/B,SAAS,EAAE,CAAC,IAAI,WAAK,KAAK,IAAI,CAAC;IAC/B,UAAU,EAAE,CAAC,IAAI,WAAK,KAAK,IAAI,CAAC;CACjC,CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vlrc-fe/hooks",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Reusable PlatformCore React hooks.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"access": "public"
|
|
32
32
|
},
|
|
33
33
|
"scripts": {
|
|
34
|
-
"build": "tsc -p tsconfig.json
|
|
34
|
+
"build": "vite build && tsc -p tsconfig.json",
|
|
35
35
|
"lint": "eslint ."
|
|
36
36
|
}
|
|
37
37
|
}
|