@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.css CHANGED
@@ -1,3 +1,3 @@
1
- @import "/node_modules/@sparkstudio/common-ui/dist/index.css";
1
+ @import "/node_modules/@sparkstudio/accounts-ui/dist/index.css";
2
2
 
3
3
  /*# sourceMappingURL=index.css.map */
package/dist/index.d.cts CHANGED
@@ -1,21 +1,27 @@
1
- import React from 'react';
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
2
3
 
3
- declare const UserInfoCard: React.FC;
4
+ declare function UserInfoCard(): react_jsx_runtime.JSX.Element;
4
5
 
5
6
  interface AuthenticatorProviderProps {
6
7
  googleClientId: string;
7
- children: React.ReactNode;
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 const AuthenticatorProvider: React.FC<AuthenticatorProviderProps>;
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 const LoginButton: React.FC<LoginButtonProps>;
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
- declare const UserProvider: React.FC<{
44
- children: React.ReactNode;
45
- }>;
46
- declare const useUser: () => UserContextType;
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 React from 'react';
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
2
3
 
3
- declare const UserInfoCard: React.FC;
4
+ declare function UserInfoCard(): react_jsx_runtime.JSX.Element;
4
5
 
5
6
  interface AuthenticatorProviderProps {
6
7
  googleClientId: string;
7
- children: React.ReactNode;
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 const AuthenticatorProvider: React.FC<AuthenticatorProviderProps>;
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 const LoginButton: React.FC<LoginButtonProps>;
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
- declare const UserProvider: React.FC<{
44
- children: React.ReactNode;
45
- }>;
46
- declare const useUser: () => UserContextType;
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 };