@ikonai/sdk-react-ui 1.4.0 → 1.5.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-context.spec.d.ts +1 -0
- package/auth/storage.d.ts +16 -0
- package/base/focus-hint-scroll.spec.d.ts +1 -0
- package/index.d.ts +3 -0
- package/index.js +758 -575
- package/media/use-media-capture.d.ts +21 -0
- package/media/use-media-capture.spec.d.ts +1 -0
- package/media/use-sibling-client.d.ts +21 -0
- package/media/use-sibling-client.spec.d.ts +1 -0
- package/media/video-stream-view.d.ts +40 -0
- package/media/video-stream-view.spec.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/auth/storage.d.ts
CHANGED
|
@@ -4,6 +4,13 @@ import { AuthSession, AuthUser, RefreshableSession } from './types';
|
|
|
4
4
|
* Returns true when the token is expired or cannot be decoded.
|
|
5
5
|
*/
|
|
6
6
|
export declare function isTokenExpired(token: string): boolean;
|
|
7
|
+
/**
|
|
8
|
+
* When a JWT dies, as an ISO timestamp, or undefined when it names no expiry or cannot be read.
|
|
9
|
+
*
|
|
10
|
+
* Short-lived tokens are renewed ahead of expiry, which needs the moment rather than the yes/no
|
|
11
|
+
* {@link isTokenExpired} answers.
|
|
12
|
+
*/
|
|
13
|
+
export declare function tokenExpiresAt(token: string): string | undefined;
|
|
7
14
|
/**
|
|
8
15
|
* Save the authenticated user session to localStorage.
|
|
9
16
|
*/
|
|
@@ -13,6 +20,15 @@ export declare function saveAuthSession(session: AuthSession): void;
|
|
|
13
20
|
* Returns null if no session exists or if the session has expired.
|
|
14
21
|
*/
|
|
15
22
|
export declare function loadAuthSession(): AuthSession | null;
|
|
23
|
+
/**
|
|
24
|
+
* Whether the stored session is a dev auto-login whose token has simply aged out.
|
|
25
|
+
*
|
|
26
|
+
* A logout REMOVES the record; expiry leaves it in place with a dead token. Telling those apart is
|
|
27
|
+
* what lets auto-login fire again an hour into a run without firing again after someone has
|
|
28
|
+
* deliberately signed out. Reads without clearing, so it has to be asked before
|
|
29
|
+
* {@link loadAuthSession}, which drops an expired record on sight.
|
|
30
|
+
*/
|
|
31
|
+
export declare function hasExpiredDevSession(): boolean;
|
|
16
32
|
/**
|
|
17
33
|
* Record that this browser has a refresh cookie behind the given sign-in. Replaces the stored
|
|
18
34
|
* session rather than joining it: the two describe the same thing, and a leftover token record
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/index.d.ts
CHANGED
|
@@ -6,6 +6,9 @@ export { useIkonStyles, type IkonUiStyleSource } from './use-ikon-styles';
|
|
|
6
6
|
export { useIkonUiStores } from './use-ikon-ui-stores';
|
|
7
7
|
export { IKON_UI_BASE_MODULE, createBaseResolvers, loadBaseModule, registerBaseModule } from './base/base-module';
|
|
8
8
|
export { IKON_UI_MEDIA_MODULE, IKON_UI_VIDEO_CANVAS_TYPE, IKON_UI_VIDEO_URL_PLAYER_TYPE, createMediaResolvers, loadMediaModule, registerMediaModule } from './media/media-module';
|
|
9
|
+
export { VideoStreamView, type VideoStreamViewProps, type VideoStreamPlayback } from './media/video-stream-view';
|
|
10
|
+
export { useSiblingClient, type UseSiblingClientResult } from './media/use-sibling-client';
|
|
11
|
+
export { useMicrophoneCapture, useCameraCapture, useScreenCapture, type UseMediaCaptureResult } from './media/use-media-capture';
|
|
9
12
|
export { IKON_UI_SHADERTOY_MODULE, IKON_UI_SHADERTOY_TYPE, createShadertoyRendererResolver, loadShadertoyModule, registerShadertoyModule } from './shadertoy/shadertoy-module';
|
|
10
13
|
export { UiRenderer, type UiRendererProps, UiComponentRegistry, createComponentLibrary, useUiStore, useUiNode, renderChildren } from './renderer';
|
|
11
14
|
export type { UiComponentRenderer, UiComponentLibrary, UiNode, UiRenderContext, UiComponentRendererProps, ParsedUiUpdate, UiSnapshot, UiFullSnapshot, UiDiffSnapshot, UiNodeDiff, TextDelta, UiNodeProps, UiUpdateType, UiStoreSnapshot } from './renderer';
|