@ateam-ai-mobile/ui 0.1.0 → 0.1.1
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.d.mts +79 -22
- package/dist/index.d.ts +79 -22
- package/dist/index.js +2075 -1420
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2072 -1416
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/AdasChatScreen.tsx +4 -0
- package/src/TenantPicker.tsx +131 -0
- package/src/chat/UIActionsRow.tsx +11 -6
- package/src/index.ts +14 -0
- package/src/plugin/EmbeddedPluginWebView.tsx +16 -10
- package/src/plugin/Plugin.tsx +8 -3
- package/src/plugin/WidgetHost.tsx +81 -0
- package/src/providers.ts +17 -0
- package/src/voice/VoiceCallSheet.tsx +330 -0
- package/src/voice/useVoiceCall.ts +200 -0
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { Message, JobProgress, UIAction } from '@ateam-ai-mobile/core';
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
2
|
+
import { Message, JobProgress, UIAction, TenantMembership } from '@ateam-ai-mobile/core';
|
|
3
|
+
import * as react from 'react';
|
|
4
|
+
import react__default from 'react';
|
|
5
5
|
import { PluginSurfaceMeta, PlatformPluginManifest } from '@ateam-ai-mobile/plugin-runtime';
|
|
6
6
|
import * as zustand from 'zustand';
|
|
7
7
|
|
|
@@ -18,15 +18,15 @@ interface AdasChatScreenProps {
|
|
|
18
18
|
}
|
|
19
19
|
declare function AdasChatScreen({ onCallStart, placeholder, footerAccessory, withLightbox, }: AdasChatScreenProps): react_jsx_runtime.JSX.Element;
|
|
20
20
|
|
|
21
|
-
interface Props$
|
|
21
|
+
interface Props$8 {
|
|
22
22
|
message: Message;
|
|
23
23
|
}
|
|
24
24
|
declare function DaySeparator({ date }: {
|
|
25
25
|
date: Date;
|
|
26
26
|
}): react_jsx_runtime.JSX.Element;
|
|
27
|
-
declare function MessageBubble({ message }: Props$
|
|
27
|
+
declare function MessageBubble({ message }: Props$8): react_jsx_runtime.JSX.Element;
|
|
28
28
|
|
|
29
|
-
interface Props$
|
|
29
|
+
interface Props$7 {
|
|
30
30
|
onSend: (text: string) => void;
|
|
31
31
|
onCallStart?: () => void;
|
|
32
32
|
loading: boolean;
|
|
@@ -35,16 +35,16 @@ interface Props$6 {
|
|
|
35
35
|
prefill?: string;
|
|
36
36
|
placeholder?: string;
|
|
37
37
|
}
|
|
38
|
-
declare function ChatInput({ onSend, onCallStart, loading, prefill, placeholder }: Props$
|
|
38
|
+
declare function ChatInput({ onSend, onCallStart, loading, prefill, placeholder }: Props$7): react_jsx_runtime.JSX.Element;
|
|
39
39
|
|
|
40
40
|
declare function TypingIndicator(): react_jsx_runtime.JSX.Element;
|
|
41
41
|
|
|
42
|
-
interface Props$
|
|
42
|
+
interface Props$6 {
|
|
43
43
|
progress: JobProgress;
|
|
44
44
|
}
|
|
45
|
-
declare function JobProgressBar({ progress }: Props$
|
|
45
|
+
declare function JobProgressBar({ progress }: Props$6): react_jsx_runtime.JSX.Element;
|
|
46
46
|
|
|
47
|
-
interface Props$
|
|
47
|
+
interface Props$5 {
|
|
48
48
|
columns: string[];
|
|
49
49
|
rows: any[][];
|
|
50
50
|
}
|
|
@@ -54,12 +54,12 @@ interface Props$4 {
|
|
|
54
54
|
* key:value rows inside the card. Built specifically for narrow phone
|
|
55
55
|
* screens where horizontal markdown tables become unreadable.
|
|
56
56
|
*/
|
|
57
|
-
declare function TableCardBlock({ columns, rows }: Props$
|
|
57
|
+
declare function TableCardBlock({ columns, rows }: Props$5): react_jsx_runtime.JSX.Element | null;
|
|
58
58
|
|
|
59
|
-
interface Props$
|
|
59
|
+
interface Props$4 {
|
|
60
60
|
actions: UIAction[];
|
|
61
61
|
}
|
|
62
|
-
declare function UIActionsRow({ actions }: Props$
|
|
62
|
+
declare function UIActionsRow({ actions }: Props$4): react_jsx_runtime.JSX.Element | null;
|
|
63
63
|
|
|
64
64
|
interface PluginRendererProps {
|
|
65
65
|
/** Full plugin ID, e.g. "mcp:connector-id:plugin-name" */
|
|
@@ -67,23 +67,39 @@ interface PluginRendererProps {
|
|
|
67
67
|
/** Plugin manifest (from API) */
|
|
68
68
|
manifest: any;
|
|
69
69
|
/** Shared command buffer from parent — captures commands before plugin mounts */
|
|
70
|
-
commandBufferRef?:
|
|
70
|
+
commandBufferRef?: react__default.MutableRefObject<any[]>;
|
|
71
71
|
/** Engine-supplied props from sys.focusUiPlugin(id, props) — forwarded to
|
|
72
72
|
* the plugin Component as `PluginProps.props`. */
|
|
73
73
|
props?: any;
|
|
74
74
|
}
|
|
75
75
|
declare function Plugin({ id, manifest, commandBufferRef, props: engineProps }: PluginRendererProps): react_jsx_runtime.JSX.Element;
|
|
76
76
|
|
|
77
|
-
interface Props$
|
|
77
|
+
interface Props$3 {
|
|
78
78
|
pluginId: string;
|
|
79
79
|
surface: PluginSurfaceMeta;
|
|
80
80
|
dismiss: () => void;
|
|
81
81
|
/** Engine-supplied props forwarded from sys.focusUiPlugin(id, props). */
|
|
82
82
|
props?: any;
|
|
83
83
|
}
|
|
84
|
-
declare function PluginSurface({ pluginId, surface, dismiss, props }: Props$
|
|
84
|
+
declare function PluginSurface({ pluginId, surface, dismiss, props }: Props$3): react_jsx_runtime.JSX.Element;
|
|
85
85
|
|
|
86
|
-
interface
|
|
86
|
+
interface WidgetHostState {
|
|
87
|
+
pluginId: string | null;
|
|
88
|
+
/** Engine/chip-supplied props forwarded to the plugin as PluginProps.props. */
|
|
89
|
+
props?: any;
|
|
90
|
+
open: (pluginId: string, props?: any) => void;
|
|
91
|
+
close: () => void;
|
|
92
|
+
}
|
|
93
|
+
declare const useWidgetHostStore: zustand.UseBoundStore<zustand.StoreApi<WidgetHostState>>;
|
|
94
|
+
/**
|
|
95
|
+
* Open a widget by plugin id. Host surfaces registered in the surface store
|
|
96
|
+
* take priority (they own their chrome); everything else is presented as a
|
|
97
|
+
* fullscreen PluginSurface by the mounted <WidgetHost />.
|
|
98
|
+
*/
|
|
99
|
+
declare function openWidget(pluginId: string, props?: any): void;
|
|
100
|
+
declare function WidgetHost(): react_jsx_runtime.JSX.Element | null;
|
|
101
|
+
|
|
102
|
+
interface Props$2 {
|
|
87
103
|
pluginId: string;
|
|
88
104
|
manifest: PlatformPluginManifest;
|
|
89
105
|
commandBufferRef?: React.MutableRefObject<any[]>;
|
|
@@ -93,7 +109,7 @@ interface Props$1 {
|
|
|
93
109
|
* existing web plugins work unmodified; the origin guards below make sure
|
|
94
110
|
* the JWT seeded into localStorage can never leave the trusted hosts.
|
|
95
111
|
*/
|
|
96
|
-
declare function EmbeddedPluginWebView({ pluginId, manifest, commandBufferRef }: Props$
|
|
112
|
+
declare function EmbeddedPluginWebView({ pluginId, manifest, commandBufferRef }: Props$2): react_jsx_runtime.JSX.Element;
|
|
97
113
|
|
|
98
114
|
/**
|
|
99
115
|
* PostMessage bridge between the React Native host and a plugin WebView.
|
|
@@ -107,7 +123,7 @@ declare function EmbeddedPluginWebView({ pluginId, manifest, commandBufferRef }:
|
|
|
107
123
|
declare function usePluginBridge(pluginId: string, connectorId?: string, commandBufferRef?: React.MutableRefObject<any[]>, wsRef?: {
|
|
108
124
|
current: WebSocket | null;
|
|
109
125
|
}): {
|
|
110
|
-
webViewRef:
|
|
126
|
+
webViewRef: react.RefObject<any>;
|
|
111
127
|
sendInit: () => void;
|
|
112
128
|
handleMessage: (event: {
|
|
113
129
|
nativeEvent: {
|
|
@@ -125,7 +141,7 @@ declare function usePluginBridge(pluginId: string, connectorId?: string, command
|
|
|
125
141
|
*/
|
|
126
142
|
declare function buildPluginBridgeJS(jwt: string, tenant: string): string;
|
|
127
143
|
|
|
128
|
-
interface Props {
|
|
144
|
+
interface Props$1 {
|
|
129
145
|
visible: boolean;
|
|
130
146
|
/** Display title shown in the top bar. */
|
|
131
147
|
title?: string;
|
|
@@ -133,7 +149,15 @@ interface Props {
|
|
|
133
149
|
bundleUrl?: string;
|
|
134
150
|
onClose: () => void;
|
|
135
151
|
}
|
|
136
|
-
declare function WidgetWebView({ visible, title, bundleUrl, onClose }: Props): react_jsx_runtime.JSX.Element;
|
|
152
|
+
declare function WidgetWebView({ visible, title, bundleUrl, onClose }: Props$1): react_jsx_runtime.JSX.Element;
|
|
153
|
+
|
|
154
|
+
interface TenantPickerProps {
|
|
155
|
+
/** Called with the picked tenant. Host mints a JWT for it and re-inits. */
|
|
156
|
+
onSelect: (tenant: TenantMembership) => void;
|
|
157
|
+
/** Highlight the active tenant. Defaults to the SDK config's tenant. */
|
|
158
|
+
currentTenantId?: string;
|
|
159
|
+
}
|
|
160
|
+
declare function TenantPicker({ onSelect, currentTenantId }: TenantPickerProps): react_jsx_runtime.JSX.Element;
|
|
137
161
|
|
|
138
162
|
declare function Lightbox(): react_jsx_runtime.JSX.Element | null;
|
|
139
163
|
|
|
@@ -144,6 +168,37 @@ interface LightboxState {
|
|
|
144
168
|
}
|
|
145
169
|
declare const useLightboxStore: zustand.UseBoundStore<zustand.StoreApi<LightboxState>>;
|
|
146
170
|
|
|
171
|
+
interface Props {
|
|
172
|
+
visible: boolean;
|
|
173
|
+
onClose: () => void;
|
|
174
|
+
}
|
|
175
|
+
declare function VoiceCallSheet({ visible, onClose }: Props): react_jsx_runtime.JSX.Element | null;
|
|
176
|
+
|
|
177
|
+
interface TranscriptEntry {
|
|
178
|
+
role: 'user' | 'ai' | 'tool';
|
|
179
|
+
text: string;
|
|
180
|
+
ts: number;
|
|
181
|
+
}
|
|
182
|
+
type CallState = 'idle' | 'connecting' | 'connected' | 'error';
|
|
183
|
+
declare function useVoiceCall(): {
|
|
184
|
+
callState: CallState;
|
|
185
|
+
sessionId: string | null;
|
|
186
|
+
error: string | null;
|
|
187
|
+
transcript: TranscriptEntry[];
|
|
188
|
+
aiPartial: string;
|
|
189
|
+
userPartial: string;
|
|
190
|
+
muted: boolean;
|
|
191
|
+
startCall: () => void;
|
|
192
|
+
stopCall: () => void;
|
|
193
|
+
toggleMute: () => void;
|
|
194
|
+
handleWebViewMessage: (event: any) => void;
|
|
195
|
+
getWebViewSource: () => {
|
|
196
|
+
uri: string;
|
|
197
|
+
};
|
|
198
|
+
webViewRef: react.RefObject<any>;
|
|
199
|
+
injectedTrackHook: string;
|
|
200
|
+
};
|
|
201
|
+
|
|
147
202
|
/**
|
|
148
203
|
* Host integration points for @ateam-ai-mobile/ui — same DI pattern as
|
|
149
204
|
* @ateam-ai-mobile/plugin-runtime's host.ts. Everything has a safe default; the host
|
|
@@ -162,5 +217,7 @@ interface UIActionRoute {
|
|
|
162
217
|
}
|
|
163
218
|
type UIActionNavigator = (route: UIActionRoute) => void;
|
|
164
219
|
declare function setUIActionNavigator(navigate: UIActionNavigator | null): void;
|
|
220
|
+
type ExtraHostsGetter = () => string[];
|
|
221
|
+
declare function setPluginWebViewExtraHosts(getter: ExtraHostsGetter | null): void;
|
|
165
222
|
|
|
166
|
-
export { AdasChatScreen, type AdasChatScreenProps, ChatInput, type ClipboardProvider, DaySeparator, EmbeddedPluginWebView, JobProgressBar, Lightbox, MessageBubble, Plugin, PluginSurface, TableCardBlock, TypingIndicator, type UIActionRoute, UIActionsRow, WidgetWebView, buildPluginBridgeJS, setClipboardProvider, setUIActionNavigator, useLightboxStore, usePluginBridge };
|
|
223
|
+
export { AdasChatScreen, type AdasChatScreenProps, type CallState, ChatInput, type ClipboardProvider, DaySeparator, EmbeddedPluginWebView, JobProgressBar, Lightbox, MessageBubble, Plugin, PluginSurface, TableCardBlock, TenantPicker, type TenantPickerProps, type TranscriptEntry, TypingIndicator, type UIActionRoute, UIActionsRow, VoiceCallSheet, WidgetHost, WidgetWebView, buildPluginBridgeJS, openWidget, setClipboardProvider, setPluginWebViewExtraHosts, setUIActionNavigator, useLightboxStore, usePluginBridge, useVoiceCall, useWidgetHostStore };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { Message, JobProgress, UIAction } from '@ateam-ai-mobile/core';
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
2
|
+
import { Message, JobProgress, UIAction, TenantMembership } from '@ateam-ai-mobile/core';
|
|
3
|
+
import * as react from 'react';
|
|
4
|
+
import react__default from 'react';
|
|
5
5
|
import { PluginSurfaceMeta, PlatformPluginManifest } from '@ateam-ai-mobile/plugin-runtime';
|
|
6
6
|
import * as zustand from 'zustand';
|
|
7
7
|
|
|
@@ -18,15 +18,15 @@ interface AdasChatScreenProps {
|
|
|
18
18
|
}
|
|
19
19
|
declare function AdasChatScreen({ onCallStart, placeholder, footerAccessory, withLightbox, }: AdasChatScreenProps): react_jsx_runtime.JSX.Element;
|
|
20
20
|
|
|
21
|
-
interface Props$
|
|
21
|
+
interface Props$8 {
|
|
22
22
|
message: Message;
|
|
23
23
|
}
|
|
24
24
|
declare function DaySeparator({ date }: {
|
|
25
25
|
date: Date;
|
|
26
26
|
}): react_jsx_runtime.JSX.Element;
|
|
27
|
-
declare function MessageBubble({ message }: Props$
|
|
27
|
+
declare function MessageBubble({ message }: Props$8): react_jsx_runtime.JSX.Element;
|
|
28
28
|
|
|
29
|
-
interface Props$
|
|
29
|
+
interface Props$7 {
|
|
30
30
|
onSend: (text: string) => void;
|
|
31
31
|
onCallStart?: () => void;
|
|
32
32
|
loading: boolean;
|
|
@@ -35,16 +35,16 @@ interface Props$6 {
|
|
|
35
35
|
prefill?: string;
|
|
36
36
|
placeholder?: string;
|
|
37
37
|
}
|
|
38
|
-
declare function ChatInput({ onSend, onCallStart, loading, prefill, placeholder }: Props$
|
|
38
|
+
declare function ChatInput({ onSend, onCallStart, loading, prefill, placeholder }: Props$7): react_jsx_runtime.JSX.Element;
|
|
39
39
|
|
|
40
40
|
declare function TypingIndicator(): react_jsx_runtime.JSX.Element;
|
|
41
41
|
|
|
42
|
-
interface Props$
|
|
42
|
+
interface Props$6 {
|
|
43
43
|
progress: JobProgress;
|
|
44
44
|
}
|
|
45
|
-
declare function JobProgressBar({ progress }: Props$
|
|
45
|
+
declare function JobProgressBar({ progress }: Props$6): react_jsx_runtime.JSX.Element;
|
|
46
46
|
|
|
47
|
-
interface Props$
|
|
47
|
+
interface Props$5 {
|
|
48
48
|
columns: string[];
|
|
49
49
|
rows: any[][];
|
|
50
50
|
}
|
|
@@ -54,12 +54,12 @@ interface Props$4 {
|
|
|
54
54
|
* key:value rows inside the card. Built specifically for narrow phone
|
|
55
55
|
* screens where horizontal markdown tables become unreadable.
|
|
56
56
|
*/
|
|
57
|
-
declare function TableCardBlock({ columns, rows }: Props$
|
|
57
|
+
declare function TableCardBlock({ columns, rows }: Props$5): react_jsx_runtime.JSX.Element | null;
|
|
58
58
|
|
|
59
|
-
interface Props$
|
|
59
|
+
interface Props$4 {
|
|
60
60
|
actions: UIAction[];
|
|
61
61
|
}
|
|
62
|
-
declare function UIActionsRow({ actions }: Props$
|
|
62
|
+
declare function UIActionsRow({ actions }: Props$4): react_jsx_runtime.JSX.Element | null;
|
|
63
63
|
|
|
64
64
|
interface PluginRendererProps {
|
|
65
65
|
/** Full plugin ID, e.g. "mcp:connector-id:plugin-name" */
|
|
@@ -67,23 +67,39 @@ interface PluginRendererProps {
|
|
|
67
67
|
/** Plugin manifest (from API) */
|
|
68
68
|
manifest: any;
|
|
69
69
|
/** Shared command buffer from parent — captures commands before plugin mounts */
|
|
70
|
-
commandBufferRef?:
|
|
70
|
+
commandBufferRef?: react__default.MutableRefObject<any[]>;
|
|
71
71
|
/** Engine-supplied props from sys.focusUiPlugin(id, props) — forwarded to
|
|
72
72
|
* the plugin Component as `PluginProps.props`. */
|
|
73
73
|
props?: any;
|
|
74
74
|
}
|
|
75
75
|
declare function Plugin({ id, manifest, commandBufferRef, props: engineProps }: PluginRendererProps): react_jsx_runtime.JSX.Element;
|
|
76
76
|
|
|
77
|
-
interface Props$
|
|
77
|
+
interface Props$3 {
|
|
78
78
|
pluginId: string;
|
|
79
79
|
surface: PluginSurfaceMeta;
|
|
80
80
|
dismiss: () => void;
|
|
81
81
|
/** Engine-supplied props forwarded from sys.focusUiPlugin(id, props). */
|
|
82
82
|
props?: any;
|
|
83
83
|
}
|
|
84
|
-
declare function PluginSurface({ pluginId, surface, dismiss, props }: Props$
|
|
84
|
+
declare function PluginSurface({ pluginId, surface, dismiss, props }: Props$3): react_jsx_runtime.JSX.Element;
|
|
85
85
|
|
|
86
|
-
interface
|
|
86
|
+
interface WidgetHostState {
|
|
87
|
+
pluginId: string | null;
|
|
88
|
+
/** Engine/chip-supplied props forwarded to the plugin as PluginProps.props. */
|
|
89
|
+
props?: any;
|
|
90
|
+
open: (pluginId: string, props?: any) => void;
|
|
91
|
+
close: () => void;
|
|
92
|
+
}
|
|
93
|
+
declare const useWidgetHostStore: zustand.UseBoundStore<zustand.StoreApi<WidgetHostState>>;
|
|
94
|
+
/**
|
|
95
|
+
* Open a widget by plugin id. Host surfaces registered in the surface store
|
|
96
|
+
* take priority (they own their chrome); everything else is presented as a
|
|
97
|
+
* fullscreen PluginSurface by the mounted <WidgetHost />.
|
|
98
|
+
*/
|
|
99
|
+
declare function openWidget(pluginId: string, props?: any): void;
|
|
100
|
+
declare function WidgetHost(): react_jsx_runtime.JSX.Element | null;
|
|
101
|
+
|
|
102
|
+
interface Props$2 {
|
|
87
103
|
pluginId: string;
|
|
88
104
|
manifest: PlatformPluginManifest;
|
|
89
105
|
commandBufferRef?: React.MutableRefObject<any[]>;
|
|
@@ -93,7 +109,7 @@ interface Props$1 {
|
|
|
93
109
|
* existing web plugins work unmodified; the origin guards below make sure
|
|
94
110
|
* the JWT seeded into localStorage can never leave the trusted hosts.
|
|
95
111
|
*/
|
|
96
|
-
declare function EmbeddedPluginWebView({ pluginId, manifest, commandBufferRef }: Props$
|
|
112
|
+
declare function EmbeddedPluginWebView({ pluginId, manifest, commandBufferRef }: Props$2): react_jsx_runtime.JSX.Element;
|
|
97
113
|
|
|
98
114
|
/**
|
|
99
115
|
* PostMessage bridge between the React Native host and a plugin WebView.
|
|
@@ -107,7 +123,7 @@ declare function EmbeddedPluginWebView({ pluginId, manifest, commandBufferRef }:
|
|
|
107
123
|
declare function usePluginBridge(pluginId: string, connectorId?: string, commandBufferRef?: React.MutableRefObject<any[]>, wsRef?: {
|
|
108
124
|
current: WebSocket | null;
|
|
109
125
|
}): {
|
|
110
|
-
webViewRef:
|
|
126
|
+
webViewRef: react.RefObject<any>;
|
|
111
127
|
sendInit: () => void;
|
|
112
128
|
handleMessage: (event: {
|
|
113
129
|
nativeEvent: {
|
|
@@ -125,7 +141,7 @@ declare function usePluginBridge(pluginId: string, connectorId?: string, command
|
|
|
125
141
|
*/
|
|
126
142
|
declare function buildPluginBridgeJS(jwt: string, tenant: string): string;
|
|
127
143
|
|
|
128
|
-
interface Props {
|
|
144
|
+
interface Props$1 {
|
|
129
145
|
visible: boolean;
|
|
130
146
|
/** Display title shown in the top bar. */
|
|
131
147
|
title?: string;
|
|
@@ -133,7 +149,15 @@ interface Props {
|
|
|
133
149
|
bundleUrl?: string;
|
|
134
150
|
onClose: () => void;
|
|
135
151
|
}
|
|
136
|
-
declare function WidgetWebView({ visible, title, bundleUrl, onClose }: Props): react_jsx_runtime.JSX.Element;
|
|
152
|
+
declare function WidgetWebView({ visible, title, bundleUrl, onClose }: Props$1): react_jsx_runtime.JSX.Element;
|
|
153
|
+
|
|
154
|
+
interface TenantPickerProps {
|
|
155
|
+
/** Called with the picked tenant. Host mints a JWT for it and re-inits. */
|
|
156
|
+
onSelect: (tenant: TenantMembership) => void;
|
|
157
|
+
/** Highlight the active tenant. Defaults to the SDK config's tenant. */
|
|
158
|
+
currentTenantId?: string;
|
|
159
|
+
}
|
|
160
|
+
declare function TenantPicker({ onSelect, currentTenantId }: TenantPickerProps): react_jsx_runtime.JSX.Element;
|
|
137
161
|
|
|
138
162
|
declare function Lightbox(): react_jsx_runtime.JSX.Element | null;
|
|
139
163
|
|
|
@@ -144,6 +168,37 @@ interface LightboxState {
|
|
|
144
168
|
}
|
|
145
169
|
declare const useLightboxStore: zustand.UseBoundStore<zustand.StoreApi<LightboxState>>;
|
|
146
170
|
|
|
171
|
+
interface Props {
|
|
172
|
+
visible: boolean;
|
|
173
|
+
onClose: () => void;
|
|
174
|
+
}
|
|
175
|
+
declare function VoiceCallSheet({ visible, onClose }: Props): react_jsx_runtime.JSX.Element | null;
|
|
176
|
+
|
|
177
|
+
interface TranscriptEntry {
|
|
178
|
+
role: 'user' | 'ai' | 'tool';
|
|
179
|
+
text: string;
|
|
180
|
+
ts: number;
|
|
181
|
+
}
|
|
182
|
+
type CallState = 'idle' | 'connecting' | 'connected' | 'error';
|
|
183
|
+
declare function useVoiceCall(): {
|
|
184
|
+
callState: CallState;
|
|
185
|
+
sessionId: string | null;
|
|
186
|
+
error: string | null;
|
|
187
|
+
transcript: TranscriptEntry[];
|
|
188
|
+
aiPartial: string;
|
|
189
|
+
userPartial: string;
|
|
190
|
+
muted: boolean;
|
|
191
|
+
startCall: () => void;
|
|
192
|
+
stopCall: () => void;
|
|
193
|
+
toggleMute: () => void;
|
|
194
|
+
handleWebViewMessage: (event: any) => void;
|
|
195
|
+
getWebViewSource: () => {
|
|
196
|
+
uri: string;
|
|
197
|
+
};
|
|
198
|
+
webViewRef: react.RefObject<any>;
|
|
199
|
+
injectedTrackHook: string;
|
|
200
|
+
};
|
|
201
|
+
|
|
147
202
|
/**
|
|
148
203
|
* Host integration points for @ateam-ai-mobile/ui — same DI pattern as
|
|
149
204
|
* @ateam-ai-mobile/plugin-runtime's host.ts. Everything has a safe default; the host
|
|
@@ -162,5 +217,7 @@ interface UIActionRoute {
|
|
|
162
217
|
}
|
|
163
218
|
type UIActionNavigator = (route: UIActionRoute) => void;
|
|
164
219
|
declare function setUIActionNavigator(navigate: UIActionNavigator | null): void;
|
|
220
|
+
type ExtraHostsGetter = () => string[];
|
|
221
|
+
declare function setPluginWebViewExtraHosts(getter: ExtraHostsGetter | null): void;
|
|
165
222
|
|
|
166
|
-
export { AdasChatScreen, type AdasChatScreenProps, ChatInput, type ClipboardProvider, DaySeparator, EmbeddedPluginWebView, JobProgressBar, Lightbox, MessageBubble, Plugin, PluginSurface, TableCardBlock, TypingIndicator, type UIActionRoute, UIActionsRow, WidgetWebView, buildPluginBridgeJS, setClipboardProvider, setUIActionNavigator, useLightboxStore, usePluginBridge };
|
|
223
|
+
export { AdasChatScreen, type AdasChatScreenProps, type CallState, ChatInput, type ClipboardProvider, DaySeparator, EmbeddedPluginWebView, JobProgressBar, Lightbox, MessageBubble, Plugin, PluginSurface, TableCardBlock, TenantPicker, type TenantPickerProps, type TranscriptEntry, TypingIndicator, type UIActionRoute, UIActionsRow, VoiceCallSheet, WidgetHost, WidgetWebView, buildPluginBridgeJS, openWidget, setClipboardProvider, setPluginWebViewExtraHosts, setUIActionNavigator, useLightboxStore, usePluginBridge, useVoiceCall, useWidgetHostStore };
|