@sparkstudio/authentication-ui 1.0.3 → 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.cjs +59 -3212
- package/dist/index.css +1 -1
- package/dist/index.d.cts +17 -10
- package/dist/index.d.ts +17 -10
- package/dist/index.js +71 -3238
- package/package.json +6 -3
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
package/dist/index.css
CHANGED
package/dist/index.d.cts
CHANGED
|
@@ -1,21 +1,27 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
2
3
|
|
|
3
|
-
declare
|
|
4
|
+
declare function UserInfoCard(): react_jsx_runtime.JSX.Element;
|
|
4
5
|
|
|
5
6
|
interface AuthenticatorProviderProps {
|
|
6
7
|
googleClientId: string;
|
|
7
|
-
children:
|
|
8
|
+
children: ReactNode;
|
|
8
9
|
}
|
|
9
10
|
/**
|
|
10
11
|
* Public entrypoint for consumers:
|
|
11
12
|
* Wraps children with Google OAuth + User context.
|
|
12
13
|
*/
|
|
13
|
-
declare
|
|
14
|
+
declare function AuthenticatorProvider({ googleClientId, children, }: AuthenticatorProviderProps): react_jsx_runtime.JSX.Element;
|
|
14
15
|
|
|
15
16
|
interface LoginButtonProps {
|
|
16
17
|
onSuccess?: (tokenResponse: any) => void;
|
|
17
18
|
}
|
|
18
|
-
declare
|
|
19
|
+
declare function LoginButton({ onSuccess }: LoginButtonProps): react_jsx_runtime.JSX.Element;
|
|
20
|
+
|
|
21
|
+
interface AuthenticationTestButtonProps {
|
|
22
|
+
onSuccess?: (tokenResponse: any) => void;
|
|
23
|
+
}
|
|
24
|
+
declare function AuthenticationTestButton({ onSuccess }: AuthenticationTestButtonProps): react_jsx_runtime.JSX.Element;
|
|
19
25
|
|
|
20
26
|
/**
|
|
21
27
|
* Represents an Auto-generated model for UserDTO.
|
|
@@ -40,10 +46,11 @@ interface UserContextType {
|
|
|
40
46
|
setUser: (user: UserDTO | null) => void;
|
|
41
47
|
logout: () => Promise<void>;
|
|
42
48
|
}
|
|
43
|
-
|
|
44
|
-
children:
|
|
45
|
-
}
|
|
46
|
-
declare
|
|
49
|
+
interface UserProviderProps {
|
|
50
|
+
children: ReactNode;
|
|
51
|
+
}
|
|
52
|
+
declare function UserProvider({ children }: UserProviderProps): react_jsx_runtime.JSX.Element;
|
|
53
|
+
declare function useUser(): UserContextType;
|
|
47
54
|
|
|
48
55
|
type Guid = string;
|
|
49
56
|
declare const EMPTY_GUID: Guid;
|
|
@@ -100,4 +107,4 @@ declare class SparkStudioAuthenticationSDK {
|
|
|
100
107
|
constructor(baseUrl: string);
|
|
101
108
|
}
|
|
102
109
|
|
|
103
|
-
export { AuthenticatorProvider, type AuthenticatorProviderProps, EMPTY_GUID, type Guid, LoginButton, SparkStudioAuthenticationSDK, UserInfoCard, UserProvider, useUser };
|
|
110
|
+
export { AuthenticationTestButton, AuthenticatorProvider, type AuthenticatorProviderProps, EMPTY_GUID, type Guid, LoginButton, SparkStudioAuthenticationSDK, UserInfoCard, UserProvider, useUser };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,21 +1,27 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
2
3
|
|
|
3
|
-
declare
|
|
4
|
+
declare function UserInfoCard(): react_jsx_runtime.JSX.Element;
|
|
4
5
|
|
|
5
6
|
interface AuthenticatorProviderProps {
|
|
6
7
|
googleClientId: string;
|
|
7
|
-
children:
|
|
8
|
+
children: ReactNode;
|
|
8
9
|
}
|
|
9
10
|
/**
|
|
10
11
|
* Public entrypoint for consumers:
|
|
11
12
|
* Wraps children with Google OAuth + User context.
|
|
12
13
|
*/
|
|
13
|
-
declare
|
|
14
|
+
declare function AuthenticatorProvider({ googleClientId, children, }: AuthenticatorProviderProps): react_jsx_runtime.JSX.Element;
|
|
14
15
|
|
|
15
16
|
interface LoginButtonProps {
|
|
16
17
|
onSuccess?: (tokenResponse: any) => void;
|
|
17
18
|
}
|
|
18
|
-
declare
|
|
19
|
+
declare function LoginButton({ onSuccess }: LoginButtonProps): react_jsx_runtime.JSX.Element;
|
|
20
|
+
|
|
21
|
+
interface AuthenticationTestButtonProps {
|
|
22
|
+
onSuccess?: (tokenResponse: any) => void;
|
|
23
|
+
}
|
|
24
|
+
declare function AuthenticationTestButton({ onSuccess }: AuthenticationTestButtonProps): react_jsx_runtime.JSX.Element;
|
|
19
25
|
|
|
20
26
|
/**
|
|
21
27
|
* Represents an Auto-generated model for UserDTO.
|
|
@@ -40,10 +46,11 @@ interface UserContextType {
|
|
|
40
46
|
setUser: (user: UserDTO | null) => void;
|
|
41
47
|
logout: () => Promise<void>;
|
|
42
48
|
}
|
|
43
|
-
|
|
44
|
-
children:
|
|
45
|
-
}
|
|
46
|
-
declare
|
|
49
|
+
interface UserProviderProps {
|
|
50
|
+
children: ReactNode;
|
|
51
|
+
}
|
|
52
|
+
declare function UserProvider({ children }: UserProviderProps): react_jsx_runtime.JSX.Element;
|
|
53
|
+
declare function useUser(): UserContextType;
|
|
47
54
|
|
|
48
55
|
type Guid = string;
|
|
49
56
|
declare const EMPTY_GUID: Guid;
|
|
@@ -100,4 +107,4 @@ declare class SparkStudioAuthenticationSDK {
|
|
|
100
107
|
constructor(baseUrl: string);
|
|
101
108
|
}
|
|
102
109
|
|
|
103
|
-
export { AuthenticatorProvider, type AuthenticatorProviderProps, EMPTY_GUID, type Guid, LoginButton, SparkStudioAuthenticationSDK, UserInfoCard, UserProvider, useUser };
|
|
110
|
+
export { AuthenticationTestButton, AuthenticatorProvider, type AuthenticatorProviderProps, EMPTY_GUID, type Guid, LoginButton, SparkStudioAuthenticationSDK, UserInfoCard, UserProvider, useUser };
|