@ikonai/sdk-react-ui 1.0.16 → 1.0.18

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/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  export { ConnectionStateRenderer, type ConnectedRenderProps, type ConnectionStateRendererProps } from './connection-state-renderer';
2
- export { useIkonApp, type IkonUiModuleRegistration, type LocalServerConfig, type UseIkonAppOptions, type UseIkonAppResult } from './use-ikon-app';
2
+ export { useIkonApp, type IkonUiModuleRegistration, type UseIkonAppOptions, type UseIkonAppResult } from './use-ikon-app';
@@ -1,4 +1,4 @@
1
- import { AudioConfig, ConnectionState, IkonClient, MediaSessionConfig, TimeoutConfig, VideoConfig } from '../../../sdk/src/index.ts';
1
+ import { ConnectionState, IkonClient, TimeoutConfig } from '../../../sdk/src/index.ts';
2
2
  import { RefObject } from 'react';
3
3
  import { AuthConfig, LoginMethod } from '../auth/types';
4
4
  import { IkonUiRegistry } from '../ikon-ui-registry';
@@ -18,14 +18,6 @@ declare global {
18
18
  };
19
19
  }
20
20
  }
21
- /**
22
- * Configuration for local server mode.
23
- */
24
- export interface LocalServerConfig {
25
- enabled: boolean;
26
- host?: string;
27
- port?: number;
28
- }
29
21
  /**
30
22
  * Module registration function type.
31
23
  */
@@ -40,52 +32,24 @@ export interface UseIkonAppOptions {
40
32
  */
41
33
  authConfig?: AuthConfig | null;
42
34
  /**
43
- * Local server configuration. If not provided, cloud mode is assumed.
44
- */
45
- localServer?: LocalServerConfig;
46
- /**
47
- * UI modules to register. Simpler alternative to registerModules callback.
35
+ * UI modules to register.
48
36
  * @example
49
37
  * modules: [registerRadixModule]
50
38
  */
51
39
  modules?: IkonUiModuleRegistration[];
52
- /**
53
- * Register additional UI modules before loading.
54
- * Use this for advanced scenarios; for simple cases prefer `modules`.
55
- */
56
- registerModules?: (registry: IkonUiRegistry) => void;
57
- /**
58
- * Callback when connected and joined.
59
- */
60
- onJoined?: (sessionId: string | undefined) => void;
61
- /**
62
- * Callback when connection state changes.
63
- */
64
- onConnectionStateChange?: (state: ConnectionState) => void;
65
- /**
66
- * Callback when an error occurs.
67
- */
68
- onError?: (error: Error) => void;
69
40
  /**
70
41
  * Timeout configuration passed to IkonClient.
71
42
  * If not provided, SDK defaults are used.
72
43
  */
73
44
  timeouts?: TimeoutConfig;
74
45
  /**
75
- * Audio playback configuration passed to IkonClient.
76
- * If not provided, SDK defaults are used.
77
- */
78
- audio?: AudioConfig;
79
- /**
80
- * Video playback configuration passed to IkonClient.
81
- * If not provided, SDK defaults are used.
46
+ * Enable background audio playback on both desktop and mobile. Default: false
82
47
  */
83
- video?: VideoConfig;
48
+ backgroundAudio?: boolean;
84
49
  /**
85
- * Media Session metadata for OS-level media controls (lock screen, notifications).
86
- * Shared across audio and video playback.
50
+ * Enable WebRTC for audio and video transport. Default: false
87
51
  */
88
- mediaSession?: MediaSessionConfig;
52
+ webRtc?: boolean;
89
53
  }
90
54
  /**
91
55
  * Result returned by the useIkonApp hook.
@@ -131,6 +95,18 @@ export interface UseIkonAppResult {
131
95
  * Whether the connection is ready to render UI.
132
96
  */
133
97
  isReady: boolean;
98
+ /**
99
+ * WebRTC audio MediaStream (when WebRTC enabled and connected).
100
+ */
101
+ webRtcAudioStream: MediaStream | null;
102
+ /**
103
+ * WebRTC video MediaStream (when WebRTC enabled and connected).
104
+ */
105
+ webRtcVideoStream: MediaStream | null;
106
+ /**
107
+ * WebRTC screen share MediaStream (when WebRTC enabled and connected).
108
+ */
109
+ webRtcScreenStream: MediaStream | null;
134
110
  }
135
111
  /**
136
112
  * High-level hook that manages the entire Ikon connection lifecycle.
package/index.d.ts CHANGED
@@ -12,6 +12,6 @@ export type { UiComponentRenderer, UiComponentLibrary, UiNode, UiRenderContext,
12
12
  export { UiStreamStore, type UiStylePayload } from '../../sdk-ui/src/index.ts';
13
13
  export { renderMotionLetters } from './shared/render-motion-letters';
14
14
  export { type AuthConfig, type AuthContextValue, type AuthSession, type AuthState, type AuthUser, type LoginMethod, clearAuthSession, loadAuthSession, saveAuthSession, sessionToUser, authenticateAnonymous, buildOAuthRedirectUrl, clearOAuthParams, parseOAuthCallback, parseOAuthError, sendMagicLink, type OAuthCallbackResult, type SendMagicLinkOptions, AuthProvider, useAuth, useAuthOptional, type AuthProviderProps, useAuthGuard, type UseAuthGuardOptions, type UseAuthGuardResult, } from './auth';
15
- export { ConnectionStateRenderer, type ConnectedRenderProps, type ConnectionStateRendererProps, useIkonApp, type IkonUiModuleRegistration, type LocalServerConfig, type UseIkonAppOptions, type UseIkonAppResult, } from './app';
15
+ export { ConnectionStateRenderer, type ConnectedRenderProps, type ConnectionStateRendererProps, useIkonApp, type IkonUiModuleRegistration, type UseIkonAppOptions, type UseIkonAppResult, } from './app';
16
16
  export { useLazyFont, useToasts, type Toast } from './hooks';
17
17
  export { I18nProvider, useI18n, type I18nContextValue, type I18nProviderProps } from './i18n';