@zucker-framework/fe-permission 1.0.0 → 1.0.5
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.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -3,7 +3,7 @@ import React, { ReactNode } from 'react';
|
|
|
3
3
|
|
|
4
4
|
/** Configuration for the permission hook factory, requiring an auth store selector. */
|
|
5
5
|
interface UsePermissionConfig {
|
|
6
|
-
useAuthStore: <T>(selector: (state: AuthStore) => T) => T;
|
|
6
|
+
useAuthStore: <T>(selector: (state: Pick<AuthStore, 'permissions'>) => T) => T;
|
|
7
7
|
}
|
|
8
8
|
/** Create a React hook for checking user permissions against the auth store. */
|
|
9
9
|
declare function createUsePermission(config: UsePermissionConfig): () => {
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import React, { ReactNode } from 'react';
|
|
|
3
3
|
|
|
4
4
|
/** Configuration for the permission hook factory, requiring an auth store selector. */
|
|
5
5
|
interface UsePermissionConfig {
|
|
6
|
-
useAuthStore: <T>(selector: (state: AuthStore) => T) => T;
|
|
6
|
+
useAuthStore: <T>(selector: (state: Pick<AuthStore, 'permissions'>) => T) => T;
|
|
7
7
|
}
|
|
8
8
|
/** Create a React hook for checking user permissions against the auth store. */
|
|
9
9
|
declare function createUsePermission(config: UsePermissionConfig): () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zucker-framework/fe-permission",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.mjs",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"THIRD_PARTY_NOTICES"
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@zucker-framework/fe-auth": "1.0.
|
|
27
|
+
"@zucker-framework/fe-auth": "1.0.5"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"react": "^19.0.0"
|