dauth-context-react 6.4.0 → 6.6.0
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 +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +297 -290
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +297 -290
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/DauthProfileModal.tsx +113 -291
- package/src/api/dauth.api.ts +54 -31
- package/src/api/interfaces/dauth.api.responses.ts +18 -0
- package/src/api/utils/config.ts +3 -9
- package/src/index.tsx +13 -0
- package/src/initialDauthState.ts +2 -0
- package/src/interfaces.ts +6 -6
- package/src/reducer/dauth.actions.ts +85 -28
- package/src/webauthn.ts +62 -32
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React$1 from 'react';
|
|
2
2
|
|
|
3
|
+
type ThemeMode = 'dark' | 'light' | 'system';
|
|
3
4
|
interface IDauthUser {
|
|
4
5
|
_id: string;
|
|
5
6
|
name: string;
|
|
@@ -8,6 +9,7 @@ interface IDauthUser {
|
|
|
8
9
|
email: string;
|
|
9
10
|
isVerified: boolean;
|
|
10
11
|
language: string;
|
|
12
|
+
theme: ThemeMode;
|
|
11
13
|
avatar: {
|
|
12
14
|
id: string;
|
|
13
15
|
url: string;
|
|
@@ -80,6 +82,7 @@ interface IDauthState {
|
|
|
80
82
|
registerPasskey: (name?: string) => Promise<IPasskeyCredential | null>;
|
|
81
83
|
deletePasskeyCredential: (credentialId: string) => Promise<boolean>;
|
|
82
84
|
uploadAvatar: (file: File) => Promise<boolean>;
|
|
85
|
+
loginWithPasskey: () => Promise<boolean>;
|
|
83
86
|
}
|
|
84
87
|
interface DauthProfileModalProps {
|
|
85
88
|
open: boolean;
|
|
@@ -105,4 +108,4 @@ declare function DauthProfileModal({ open, onClose, onAvatarUpload, }: DauthProf
|
|
|
105
108
|
declare const DauthProvider: React$1.FC<IDauthProviderProps>;
|
|
106
109
|
declare const useDauth: () => IDauthState;
|
|
107
110
|
|
|
108
|
-
export { DauthProfileModal, type DauthProfileModalProps, DauthProvider, type ICustomField, type IDauthAuthMethods, type IDauthProviderProps, type IFormField, type IModalTheme, type IPasskeyCredential, useDauth };
|
|
111
|
+
export { DauthProfileModal, type DauthProfileModalProps, DauthProvider, type ICustomField, type IDauthAuthMethods, type IDauthProviderProps, type IFormField, type IModalTheme, type IPasskeyCredential, type ThemeMode, useDauth };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React$1 from 'react';
|
|
2
2
|
|
|
3
|
+
type ThemeMode = 'dark' | 'light' | 'system';
|
|
3
4
|
interface IDauthUser {
|
|
4
5
|
_id: string;
|
|
5
6
|
name: string;
|
|
@@ -8,6 +9,7 @@ interface IDauthUser {
|
|
|
8
9
|
email: string;
|
|
9
10
|
isVerified: boolean;
|
|
10
11
|
language: string;
|
|
12
|
+
theme: ThemeMode;
|
|
11
13
|
avatar: {
|
|
12
14
|
id: string;
|
|
13
15
|
url: string;
|
|
@@ -80,6 +82,7 @@ interface IDauthState {
|
|
|
80
82
|
registerPasskey: (name?: string) => Promise<IPasskeyCredential | null>;
|
|
81
83
|
deletePasskeyCredential: (credentialId: string) => Promise<boolean>;
|
|
82
84
|
uploadAvatar: (file: File) => Promise<boolean>;
|
|
85
|
+
loginWithPasskey: () => Promise<boolean>;
|
|
83
86
|
}
|
|
84
87
|
interface DauthProfileModalProps {
|
|
85
88
|
open: boolean;
|
|
@@ -105,4 +108,4 @@ declare function DauthProfileModal({ open, onClose, onAvatarUpload, }: DauthProf
|
|
|
105
108
|
declare const DauthProvider: React$1.FC<IDauthProviderProps>;
|
|
106
109
|
declare const useDauth: () => IDauthState;
|
|
107
110
|
|
|
108
|
-
export { DauthProfileModal, type DauthProfileModalProps, DauthProvider, type ICustomField, type IDauthAuthMethods, type IDauthProviderProps, type IFormField, type IModalTheme, type IPasskeyCredential, useDauth };
|
|
111
|
+
export { DauthProfileModal, type DauthProfileModalProps, DauthProvider, type ICustomField, type IDauthAuthMethods, type IDauthProviderProps, type IFormField, type IModalTheme, type IPasskeyCredential, type ThemeMode, useDauth };
|