@ikonai/sdk-react-ui 0.0.42 → 1.0.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/auth/auth-service.d.ts +21 -0
- package/auth/index.d.ts +1 -1
- package/auth/types.d.ts +2 -1
- package/ikon-ui.d.ts +2 -1
- package/index.js +1603 -1155
- package/motion/motion-controller.d.ts +1 -0
- package/package.json +2 -1
- package/use-ikon-styles.d.ts +3 -1
package/auth/auth-service.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AuthenticationResponseJSON, PublicKeyCredentialCreationOptionsJSON, PublicKeyCredentialRequestOptionsJSON, RegistrationResponseJSON } from '@simplewebauthn/browser';
|
|
1
2
|
import { AuthSession, LoginMethod } from './types';
|
|
2
3
|
/**
|
|
3
4
|
* Result of parsing an OAuth callback from the URL.
|
|
@@ -41,3 +42,23 @@ export declare function clearOAuthParams(): void;
|
|
|
41
42
|
* Build an OAuth redirect URL for the given provider.
|
|
42
43
|
*/
|
|
43
44
|
export declare function buildOAuthRedirectUrl(provider: LoginMethod, spaceId: string, authUrl: string, returnUrl?: string): string;
|
|
45
|
+
/**
|
|
46
|
+
* Check if passkey/WebAuthn is supported in the current browser.
|
|
47
|
+
*/
|
|
48
|
+
export declare function isPasskeySupported(): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Get passkey registration options from the auth service.
|
|
51
|
+
*/
|
|
52
|
+
export declare function getPasskeyRegistrationOptions(authUrl: string): Promise<PublicKeyCredentialCreationOptionsJSON>;
|
|
53
|
+
/**
|
|
54
|
+
* Verify passkey registration with the auth service.
|
|
55
|
+
*/
|
|
56
|
+
export declare function verifyPasskeyRegistration(authUrl: string, response: RegistrationResponseJSON, name?: string): Promise<AuthSession>;
|
|
57
|
+
/**
|
|
58
|
+
* Get passkey authentication options from the auth service.
|
|
59
|
+
*/
|
|
60
|
+
export declare function getPasskeyAuthenticationOptions(authUrl: string, email?: string): Promise<PublicKeyCredentialRequestOptionsJSON>;
|
|
61
|
+
/**
|
|
62
|
+
* Verify passkey authentication with the auth service.
|
|
63
|
+
*/
|
|
64
|
+
export declare function verifyPasskeyAuthentication(authUrl: string, response: AuthenticationResponseJSON): Promise<AuthSession>;
|
package/auth/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type { AuthConfig, AuthContextValue, AuthSession, AuthState, AuthUser, LoginMethod } from './types';
|
|
2
2
|
export { clearAuthSession, loadAuthSession, saveAuthSession, sessionToUser } from './storage';
|
|
3
|
-
export { authenticateAnonymous, buildOAuthRedirectUrl, clearOAuthParams, parseOAuthCallback, parseOAuthError, sendMagicLink, type OAuthCallbackResult, type SendMagicLinkOptions } from './auth-service';
|
|
3
|
+
export { authenticateAnonymous, buildOAuthRedirectUrl, clearOAuthParams, getPasskeyAuthenticationOptions, getPasskeyRegistrationOptions, isPasskeySupported, parseOAuthCallback, parseOAuthError, sendMagicLink, verifyPasskeyAuthentication, verifyPasskeyRegistration, type OAuthCallbackResult, type SendMagicLinkOptions, } from './auth-service';
|
|
4
4
|
export { AuthProvider, useAuth, useAuthOptional, type AuthProviderProps } from './auth-context';
|
|
5
5
|
export { useAuthGuard, type UseAuthGuardOptions, type UseAuthGuardResult } from './use-auth-guard';
|
package/auth/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* All supported login methods.
|
|
3
3
|
*/
|
|
4
|
-
export type LoginMethod = 'google' | 'facebook' | 'apple' | 'microsoft' | 'linkedin' | 'github' | 'email' | 'guest';
|
|
4
|
+
export type LoginMethod = 'google' | 'facebook' | 'apple' | 'microsoft' | 'linkedin' | 'github' | 'email' | 'passkey' | 'guest';
|
|
5
5
|
/**
|
|
6
6
|
* Authenticated user information.
|
|
7
7
|
*/
|
|
@@ -46,4 +46,5 @@ export interface AuthContextValue {
|
|
|
46
46
|
login: (method: LoginMethod) => void;
|
|
47
47
|
logout: () => void;
|
|
48
48
|
getToken: () => string | null;
|
|
49
|
+
registerPasskey: (name?: string) => Promise<void>;
|
|
49
50
|
}
|
package/ikon-ui.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IkonClient } from '../../sdk/src/index.ts';
|
|
2
|
-
import { IkonUICore, IkonUiStreamListener, UiStyleListener, UiStylePayload } from '../../sdk-ui/src/index.ts';
|
|
2
|
+
import { IkonUICore, IkonUiStreamListener, UiStyleListener, UiStyleDeleteListener, UiStylePayload } from '../../sdk-ui/src/index.ts';
|
|
3
3
|
import { IkonUiStoreEntry } from './surface';
|
|
4
4
|
export interface IkonUIConfig {
|
|
5
5
|
client?: IkonClient | null;
|
|
@@ -19,6 +19,7 @@ export declare class IkonUi {
|
|
|
19
19
|
getUiStyles(): readonly UiStylePayload[];
|
|
20
20
|
subscribe(listener: IkonUiListener): () => void;
|
|
21
21
|
subscribeToStyles(listener: UiStyleListener): () => void;
|
|
22
|
+
subscribeToStyleDeletes(listener: UiStyleDeleteListener): () => void;
|
|
22
23
|
private handleUiStreamCleared;
|
|
23
24
|
private syncStreamSnapshot;
|
|
24
25
|
private syncAllStreams;
|