@ikonai/sdk-react-ui 1.8.0 → 1.10.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/app/connection-state-renderer.d.ts +4 -4
- package/app/connection-state-renderer.spec.d.ts +1 -0
- package/app/ikon-app.d.ts +3 -3
- package/app/ikon-app.spec.d.ts +1 -0
- package/app/use-ikon-app.d.ts +6 -8
- package/app/use-ikon-debug.d.ts +1 -1
- package/auth/index.d.ts +1 -1
- package/auth/oauth-continuation.d.ts +15 -1
- package/index.d.ts +1 -1
- package/index.js +679 -630
- package/package.json +1 -1
- package/parallax-view.d.ts +2 -2
- package/renderer/index.d.ts +1 -1
- package/renderer/types.d.ts +12 -1
- package/renderer/ui-renderer.d.ts +2 -2
- package/surface.d.ts +2 -2
- package/theme/ikon-app.css +3 -1
|
@@ -2,6 +2,7 @@ import { ConnectionState, IkonClient } from '../../sdk/sdk/src/index.ts';
|
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { IkonUiRegistry } from '../ikon-ui-registry';
|
|
4
4
|
import { IkonUiStoreEntry } from '../surface';
|
|
5
|
+
import { DispatchActionOptions } from '../renderer';
|
|
5
6
|
/**
|
|
6
7
|
* Props passed to the renderConnected callback.
|
|
7
8
|
*/
|
|
@@ -9,7 +10,7 @@ export interface ConnectedRenderProps {
|
|
|
9
10
|
stores: ReadonlyMap<string, IkonUiStoreEntry>;
|
|
10
11
|
registry: IkonUiRegistry;
|
|
11
12
|
client: IkonClient | null;
|
|
12
|
-
onAction: (actionId: string, payload: unknown) => void;
|
|
13
|
+
onAction: (actionId: string, payload: unknown, options?: DispatchActionOptions) => void;
|
|
13
14
|
isReconnecting: boolean;
|
|
14
15
|
}
|
|
15
16
|
/**
|
|
@@ -27,7 +28,7 @@ export interface ConnectionStateRendererProps {
|
|
|
27
28
|
stores: ReadonlyMap<string, IkonUiStoreEntry> | undefined;
|
|
28
29
|
registry: IkonUiRegistry | null;
|
|
29
30
|
client: IkonClient | null;
|
|
30
|
-
onAction: (actionId: string, payload: unknown) => void;
|
|
31
|
+
onAction: (actionId: string, payload: unknown, options?: DispatchActionOptions) => void;
|
|
31
32
|
/**
|
|
32
33
|
* @deprecated The runtime no longer emits `'idle'`; this callback never fires. The
|
|
33
34
|
* prop stays for source-compatibility with apps that already pass it.
|
|
@@ -53,8 +54,7 @@ export interface ConnectionStateRendererProps {
|
|
|
53
54
|
*/
|
|
54
55
|
renderOffline: () => ReactNode;
|
|
55
56
|
/**
|
|
56
|
-
* Render when offline with an error message attached. Full-page replacement.
|
|
57
|
-
* Previously fired only for the dropped `'offlineError'` state; now fires when
|
|
57
|
+
* Render when offline with an error message attached. Full-page replacement. Fires when
|
|
58
58
|
* `connectionState === 'offline'` and `error` (or `client.lastError`) is set.
|
|
59
59
|
*/
|
|
60
60
|
renderError: (error: string | null) => ReactNode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/app/ikon-app.d.ts
CHANGED
|
@@ -48,8 +48,8 @@ export interface IkonAppProps extends UseIkonAppResult {
|
|
|
48
48
|
* />
|
|
49
49
|
* ```
|
|
50
50
|
*
|
|
51
|
-
* Debug keyboard shortcuts
|
|
52
|
-
*
|
|
53
|
-
*
|
|
51
|
+
* Debug keyboard shortcuts are wired up automatically when SDK debug mode is on (URL has
|
|
52
|
+
* `?ikon-debug=true`); `useIkonDebug` holds the map. No on-screen indicator is rendered for
|
|
53
|
+
* active overrides.
|
|
54
54
|
*/
|
|
55
55
|
export declare function IkonApp(props: IkonAppProps): ReactNode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/app/use-ikon-app.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ConnectionState, IkonClient, TimeoutConfig, WebRTCTrackMapInfo } from '../../sdk/sdk/src/index.ts';
|
|
2
2
|
import { RefObject } from 'react';
|
|
3
3
|
import { AuthConfig, LoginMethod } from '../auth/types';
|
|
4
|
+
import { DispatchActionOptions } from '../renderer';
|
|
4
5
|
import { IkonUiRegistry } from '../ikon-ui-registry';
|
|
5
6
|
import { IkonUi } from '../ikon-ui';
|
|
6
7
|
import { IkonUiStoreEntry } from '../surface';
|
|
@@ -37,13 +38,10 @@ export type IkonUiModuleRegistration = (registry: IkonUiRegistry) => void;
|
|
|
37
38
|
*/
|
|
38
39
|
export declare function mergeConnectParameters(urlParameters: Record<string, string>, appParameters?: Record<string, string>): Record<string, string>;
|
|
39
40
|
/**
|
|
40
|
-
* Who a session is for, as opposed to what it presents to prove it.
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
* renewal look like a different session, so a signed-in app tore its IkonClient down and rebuilt it
|
|
45
|
-
* every renewal period on a perfectly healthy network. Keying on the subject instead leaves only a
|
|
46
|
-
* genuine change of user — or of sign-in method — forcing a reconnect.
|
|
41
|
+
* Who a session is for, as opposed to what it presents to prove it. A browser access token is
|
|
42
|
+
* renewed every few minutes, and a renewal is the same person holding a fresher credential, so the
|
|
43
|
+
* connection is keyed on the subject: only a genuine change of user, or of sign-in method, forces
|
|
44
|
+
* a reconnect.
|
|
47
45
|
*
|
|
48
46
|
* A token whose subject cannot be read falls back to the token itself: two credentials nobody can
|
|
49
47
|
* identify must not be assumed to name the same person.
|
|
@@ -199,7 +197,7 @@ export interface UseIkonAppResult {
|
|
|
199
197
|
/**
|
|
200
198
|
* Action handler for UI interactions.
|
|
201
199
|
*/
|
|
202
|
-
onAction: (actionId: string, payload: unknown) => void;
|
|
200
|
+
onAction: (actionId: string, payload: unknown, options?: DispatchActionOptions) => void;
|
|
203
201
|
/**
|
|
204
202
|
* Whether the connection is ready to render UI.
|
|
205
203
|
*/
|
package/app/use-ikon-debug.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ export interface UseIkonDebugResult {
|
|
|
33
33
|
* `<IkonApp />` and want the same behavior.
|
|
34
34
|
*
|
|
35
35
|
* Shortcut map (all require Ctrl+Shift, `event.code`-based so layout-independent):
|
|
36
|
-
* - Digit1 → force `connecting` (an internal
|
|
36
|
+
* - Digit1 → force `connecting` (an internal timer flips isConnectingSlow to true so you can see both phases without a second shortcut)
|
|
37
37
|
* - Digit2 → force `connected`
|
|
38
38
|
* - Digit3 → force `reconnecting`
|
|
39
39
|
* - Digit4 → force `offline` (no error)
|
package/auth/index.d.ts
CHANGED
|
@@ -3,4 +3,4 @@ export { clearAuthSession, isSignedInBootLikely, loadAuthSession, saveAuthSessio
|
|
|
3
3
|
export { authenticateAnonymous, buildOAuthRedirectUrl, clearOAuthParams, describeAuthError, exchangeOAuthCode, getPasskeyAuthenticationOptions, getPasskeyRegistrationOptions, isPasskeySupported, parseOAuthCallback, parseOAuthCodeCallback, parseOAuthError, revokeSessionOnServer, sendLoginCode, verifyLoginCode, verifyPasskeyAuthentication, verifyPasskeyRegistration, type OAuthCallbackResult, type OAuthErrorResult, type SendLoginCodeOptions, type VerifyLoginCodeOptions, } 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';
|
|
6
|
-
export { OAUTH_CONTINUE_PARAM, captureOAuthContinuation, completeOAuthContinuation, hasPendingOAuthContinuation } from './oauth-continuation';
|
|
6
|
+
export { OAUTH_CONTINUE_PARAM, captureOAuthContinuation, completeOAuthContinuation, hasPendingOAuthContinuation, type OAuthContinuationOutcome } from './oauth-continuation';
|
|
@@ -23,6 +23,20 @@ export declare const OAUTH_CONTINUE_PARAM = "ikon-oauth";
|
|
|
23
23
|
*/
|
|
24
24
|
export declare function captureOAuthContinuation(): boolean;
|
|
25
25
|
export declare function hasPendingOAuthContinuation(): boolean;
|
|
26
|
+
export type OAuthContinuationOutcome =
|
|
27
|
+
/** The browser is on its way to the consent screen. */
|
|
28
|
+
{
|
|
29
|
+
status: 'handed-off';
|
|
30
|
+
}
|
|
31
|
+
/** The server said this person may not authorize here, and said why. Show it. */
|
|
32
|
+
| {
|
|
33
|
+
status: 'refused';
|
|
34
|
+
message: string;
|
|
35
|
+
}
|
|
36
|
+
/** Kept for a retry, or given up on — the pointer's own state says which. */
|
|
37
|
+
| {
|
|
38
|
+
status: 'pending';
|
|
39
|
+
};
|
|
26
40
|
/**
|
|
27
41
|
* Report the completed sign-in and hand the browser to the consent screen.
|
|
28
42
|
*
|
|
@@ -41,4 +55,4 @@ export declare function hasPendingOAuthContinuation(): boolean;
|
|
|
41
55
|
* keeps the pointer so a later attempt can succeed, while a refusal from the server clears it, because
|
|
42
56
|
* retrying a spent or expired authorization only traps the user in a flow that cannot finish.
|
|
43
57
|
*/
|
|
44
|
-
export declare function completeOAuthContinuation(token: string | null): Promise<
|
|
58
|
+
export declare function completeOAuthContinuation(token: string | null): Promise<OAuthContinuationOutcome>;
|
package/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export { useSiblingClient, type UseSiblingClientResult } from './media/use-sibli
|
|
|
11
11
|
export { useMicrophoneCapture, useCameraCapture, useScreenCapture, type UseMediaCaptureResult } from './media/use-media-capture';
|
|
12
12
|
export { IKON_UI_SHADERTOY_MODULE, IKON_UI_SHADERTOY_TYPE, createShadertoyRendererResolver, loadShadertoyModule, registerShadertoyModule } from './shadertoy/shadertoy-module';
|
|
13
13
|
export { UiRenderer, type UiRendererProps, UiComponentRegistry, createComponentLibrary, useUiStore, useUiNode, renderChildren } from './renderer';
|
|
14
|
-
export type { UiComponentRenderer, UiComponentLibrary, UiNode, UiRenderContext, UiComponentRendererProps, ParsedUiUpdate, UiSnapshot, UiFullSnapshot, UiDiffSnapshot, UiNodeDiff, TextDelta, UiNodeProps, UiUpdateType, UiStoreSnapshot } from './renderer';
|
|
14
|
+
export type { DispatchActionOptions, UiComponentRenderer, UiComponentLibrary, UiNode, UiRenderContext, UiComponentRendererProps, ParsedUiUpdate, UiSnapshot, UiFullSnapshot, UiDiffSnapshot, UiNodeDiff, TextDelta, UiNodeProps, UiUpdateType, UiStoreSnapshot } from './renderer';
|
|
15
15
|
export { UiStreamStore, type UiStylePayload } from '../sdk/sdk-ui/src/index.ts';
|
|
16
16
|
export { renderMotionLetters } from './shared/render-motion-letters';
|
|
17
17
|
export { type AuthConfig, type AuthContextValue, type AuthSession, type AuthState, type AuthUser, type LoginMethod, clearAuthSession, loadAuthSession, saveAuthSession, sessionToUser, authenticateAnonymous, buildOAuthRedirectUrl, clearOAuthParams, parseOAuthCallback, parseOAuthError, sendLoginCode, verifyLoginCode, type OAuthCallbackResult, type SendLoginCodeOptions, type VerifyLoginCodeOptions, AuthProvider, useAuth, useAuthOptional, type AuthProviderProps, useAuthGuard, type UseAuthGuardOptions, type UseAuthGuardResult, } from './auth';
|