@vinaverse/react-native 0.1.0-alpha.5 → 0.1.0-alpha.6

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.
Files changed (48) hide show
  1. package/README.md +57 -1
  2. package/dist/ask.cjs +58 -0
  3. package/dist/ask.cjs.map +1 -0
  4. package/dist/ask.d.cts +25 -0
  5. package/dist/ask.d.ts +25 -0
  6. package/dist/ask.js +5 -0
  7. package/dist/ask.js.map +1 -0
  8. package/dist/chat.cjs +266 -0
  9. package/dist/chat.cjs.map +1 -0
  10. package/dist/chat.d.cts +449 -0
  11. package/dist/chat.d.ts +449 -0
  12. package/dist/chat.js +5 -0
  13. package/dist/chat.js.map +1 -0
  14. package/dist/chunk-643GOUTG.cjs +75 -0
  15. package/dist/chunk-643GOUTG.cjs.map +1 -0
  16. package/dist/chunk-H2Y2YW2Q.cjs +2651 -0
  17. package/dist/chunk-H2Y2YW2Q.cjs.map +1 -0
  18. package/dist/chunk-NJWRZ55G.js +254 -0
  19. package/dist/chunk-NJWRZ55G.js.map +1 -0
  20. package/dist/chunk-OGPMGGYS.cjs +261 -0
  21. package/dist/chunk-OGPMGGYS.cjs.map +1 -0
  22. package/dist/chunk-OWUKWVEZ.cjs +53 -0
  23. package/dist/chunk-OWUKWVEZ.cjs.map +1 -0
  24. package/dist/chunk-PRXHS57U.js +40 -0
  25. package/dist/chunk-PRXHS57U.js.map +1 -0
  26. package/dist/chunk-PYPO6F7L.cjs +44 -0
  27. package/dist/chunk-PYPO6F7L.cjs.map +1 -0
  28. package/dist/chunk-SF6LJTVJ.js +2567 -0
  29. package/dist/chunk-SF6LJTVJ.js.map +1 -0
  30. package/dist/chunk-WKRCCPSN.js +48 -0
  31. package/dist/chunk-WKRCCPSN.js.map +1 -0
  32. package/dist/chunk-Y7P7DDHD.js +73 -0
  33. package/dist/chunk-Y7P7DDHD.js.map +1 -0
  34. package/dist/index.cjs +264 -2998
  35. package/dist/index.cjs.map +1 -1
  36. package/dist/index.d.cts +10 -606
  37. package/dist/index.d.ts +10 -606
  38. package/dist/index.js +5 -2930
  39. package/dist/index.js.map +1 -1
  40. package/dist/launcher.cjs +79 -0
  41. package/dist/launcher.cjs.map +1 -0
  42. package/dist/launcher.d.cts +121 -0
  43. package/dist/launcher.d.ts +121 -0
  44. package/dist/launcher.js +6 -0
  45. package/dist/launcher.js.map +1 -0
  46. package/dist/theme-BhiEGv64.d.cts +35 -0
  47. package/dist/theme-BhiEGv64.d.ts +35 -0
  48. package/package.json +54 -9
@@ -0,0 +1,449 @@
1
+ export { AgentRuntimeProvider, GreetingStorage, UseAgentConversation, UseAgentLauncher, greetedKey, useAgentConversation, useAgentFeatures, useAgentLauncher, useAgentName, useAgentProfile, useAgentRuntime, useAgentStatus } from '@vinaverse/react/agent';
2
+ import * as react from 'react';
3
+ import { ComponentType, ReactElement, ReactNode, RefObject } from 'react';
4
+ import * as _vinaverse_client_conversation from '@vinaverse/client/conversation';
5
+ import { MessageItem, Welcome as Welcome$1, TimelineItem, CardItem, HeldCard, Question, ProposalOutcome, ConversationStore, SystemItem } from '@vinaverse/client/conversation';
6
+ import { ReadCard, AgentCardTarget, AgentKey, AgentPlace, AgentFailureReason, AgentRating } from '@vinaverse/client/agent';
7
+ import { ImageProps, StyleProp, ViewStyle } from 'react-native';
8
+ import { CopyOverrides } from '@vinaverse/react';
9
+ import { a as ThemeOverrides, C as ColorSchemeSetting } from './theme-BhiEGv64.cjs';
10
+ export { T as Theme, b as ThemeProvider, c as createTheme, t as themeProblems, u as useTheme } from './theme-BhiEGv64.cjs';
11
+ import '@vinaverse/tokens';
12
+
13
+ interface HeaderProps {
14
+ readonly name: string;
15
+ readonly avatarUrl: string | null;
16
+ /** While a person from the business replies: their role. */
17
+ readonly takeoverBy: string | null;
18
+ readonly Default: ComponentType<Omit<HeaderProps, 'Default'>>;
19
+ }
20
+ interface MessageBubbleProps {
21
+ readonly item: MessageItem;
22
+ /** The text to draw: the message's, or the streamed text so far. */
23
+ readonly text: string;
24
+ readonly Default: ComponentType<Omit<MessageBubbleProps, 'Default'>>;
25
+ }
26
+ interface ComposerProps {
27
+ readonly placeholder: string;
28
+ readonly responding: boolean;
29
+ readonly onSend: (text: string) => void;
30
+ readonly onStop: () => void;
31
+ readonly Default: ComponentType<Omit<ComposerProps, 'Default'>>;
32
+ }
33
+ interface EmptyStateProps {
34
+ readonly agentName: string;
35
+ /** The tenant's greeting and chips for the session's mode (`Session.welcome`), or null. */
36
+ readonly welcome: Welcome$1 | null;
37
+ /** Sends a chip's `message` as the person's own text. */
38
+ readonly onChip: (message: string) => void;
39
+ }
40
+ /** `components.CardGroup`: the cards one turn drew together with `group.layout: carousel`, in order. */
41
+ interface CardGroupProps {
42
+ readonly items: readonly CardItem[];
43
+ }
44
+ /** The props the kit gives its list: FlashList's, so FlashList or LegendList take them as they are. */
45
+ interface ListProps {
46
+ readonly data: readonly TimelineItem[];
47
+ readonly renderItem: (info: {
48
+ item: TimelineItem;
49
+ index: number;
50
+ }) => ReactElement | null;
51
+ readonly keyExtractor: (item: TimelineItem) => string;
52
+ readonly getItemType: (item: TimelineItem) => string;
53
+ readonly maintainVisibleContentPosition: {
54
+ readonly startRenderingFromBottom: boolean;
55
+ readonly autoscrollToBottomThreshold: number;
56
+ readonly animateAutoScrollToBottom: boolean;
57
+ };
58
+ readonly ListFooterComponent: ReactElement | null;
59
+ readonly ListEmptyComponent: ReactElement | null;
60
+ readonly keyboardShouldPersistTaps: 'handled';
61
+ readonly contentContainerStyle: object;
62
+ }
63
+ /** A failure the person needs a way out of: a turn that failed before any reply, or no session to talk to. */
64
+ interface FailureState {
65
+ /** `turn_failed`: a turn failed before any of its reply; `unavailable`: the backend gave no session, or none it could use. */
66
+ readonly kind: 'turn_failed' | 'unavailable';
67
+ /** Why: the turn's error `code` (`internal`, `timeout`, …), or the conversation's status (`unavailable`, `unauthorized`). */
68
+ readonly reason: string | null;
69
+ /** Try again, when it can be: the person's text again for a turn the server allows to retry, a new session otherwise. */
70
+ readonly retry: (() => void) | undefined;
71
+ /** The conversation, once a session named it: for your support records. */
72
+ readonly conversationId: string | null;
73
+ }
74
+ /** A slot for a failure (`components.Error`, `components.Unavailable`): the state, and the kit's own part to wrap. */
75
+ interface FailureProps {
76
+ readonly state: FailureState;
77
+ readonly Default: ComponentType<{
78
+ readonly state: FailureState;
79
+ }>;
80
+ }
81
+ /** One action on every failure, drawn as a button by the kit's own parts: a person is always the way out. */
82
+ interface FailureAction {
83
+ /** Default: the copy's `talkToPerson` ("Talk to a person"), in the person's language. */
84
+ readonly label?: string;
85
+ readonly onPress: (state: FailureState) => void;
86
+ }
87
+
88
+ declare function CardCarousel(props: CardGroupProps): react.JSX.Element;
89
+
90
+ declare function CardFrame(props: {
91
+ readonly label: string;
92
+ readonly restored?: boolean;
93
+ readonly children?: ReactNode;
94
+ readonly testID?: string;
95
+ }): react.JSX.Element;
96
+ /** A rating in millionths as the locale writes it, one decimal: 4.8, or 4,8 in Spanish and Portuguese. */
97
+ declare function ratingText(valuePpm: number, locale: string | undefined): string;
98
+ /** A photo the image policy allows: https, and from one of its hosts when it names them. */
99
+ declare function allowedImage(url: string | undefined, hosts: readonly string[] | undefined): string | null;
100
+
101
+ interface CardProps {
102
+ readonly card: HeldCard;
103
+ /** The card read once for drawing, every field checked (`readCard`): kind, target, photo, rating, price, group, links. */
104
+ readonly read: ReadCard | null;
105
+ /** A proposal being decided: draw its buttons busy. */
106
+ readonly busy: boolean;
107
+ /** Restored after a restart: draw it as it was, taking no answer or action. */
108
+ readonly restored: boolean;
109
+ /** The kit's own renderer for this kind, to wrap rather than rewrite. */
110
+ readonly Default: ComponentType<Omit<CardProps, 'Default'>>;
111
+ }
112
+
113
+ /** The kit's own renderer for a kind. */
114
+ declare function defaultCard(kind: string): ComponentType<Omit<CardProps, 'Default'>>;
115
+ declare const CardView: react.NamedExoticComponent<{
116
+ readonly item: CardItem;
117
+ }>;
118
+
119
+ declare function InfoCard(props: Omit<CardProps, 'Default'>): react.JSX.Element;
120
+ /** A card's actions: a link that passes the deep-link rule opens the tenant's page, any other goes to the session. */
121
+ declare function CardActions(props: Omit<CardProps, 'Default'>): react.JSX.Element | null;
122
+
123
+ declare function LinksCard(props: Omit<CardProps, 'Default'>): react.JSX.Element;
124
+
125
+ declare function ListingCard(props: Omit<CardProps, 'Default'>): react.JSX.Element;
126
+ /** The first letters of the first two words: "Bell's Barber Lounge" is "BB". */
127
+ declare function monogram(title: string): string;
128
+
129
+ declare function NextStepCard(props: Omit<CardProps, 'Default'>): react.JSX.Element;
130
+
131
+ /** A field's value as text, by its type (`text`, `list`, `time_range`, `address`, `money_cents`). */
132
+ declare function fieldText(type: string, value: unknown, locale: string | undefined, timeZone: string | undefined): string;
133
+ declare function ProposalCard(props: Omit<CardProps, 'Default'>): react.JSX.Element | null;
134
+
135
+ declare function QuestionCard(props: Omit<CardProps, 'Default'>): react.JSX.Element | null;
136
+ /** A recorded answer, in words. */
137
+ declare function answerText(question: Question, locale: string | undefined, otherLabel: string): string | null;
138
+
139
+ declare function TimeSlotsCard(props: Omit<CardProps, 'Default'>): react.JSX.Element;
140
+
141
+ declare const ActivityLine: react.NamedExoticComponent<object>;
142
+
143
+ type ProposalDecision = 'confirm' | 'decline';
144
+ /** What the kit asks of the tenant's app. Only `onProposal` and `onOpenLink` are needed for the cards that use them. */
145
+ interface ChatHandlers {
146
+ /**
147
+ * The person confirmed or declined a proposal: call your backend with the person's own token, then say what
148
+ * happened (`confirmed`, `declined`, `failed`, or `expired` when it had expired). The kit reports it to the session.
149
+ */
150
+ readonly onProposal?: (card: HeldCard, decision: ProposalDecision) => Promise<ProposalOutcome>;
151
+ /**
152
+ * Open a card's link in your app: a deep link that already passed the deep-link rule (route by the page it names),
153
+ * or a `links` card's https page (your in-app browser; without this handler the system opens it).
154
+ */
155
+ readonly onOpenLink?: (link: string, card: HeldCard) => void;
156
+ /** A card action without a link (`show_times`, …): sent to the session; this tells your app too. */
157
+ readonly onCardAction?: (card: HeldCard, action: string) => void;
158
+ /** A photo question: let the person pick one, upload it to your backend, and give back its `upload_ref`. */
159
+ readonly onPickPhoto?: (question: Question, card: HeldCard) => Promise<{
160
+ readonly upload_ref: string;
161
+ } | null>;
162
+ /**
163
+ * A way out on a failed turn and on "couldn't connect": a button with your label (default "Talk to a person"),
164
+ * drawn by the kit's own parts when no `components.Error` or `components.Unavailable` replaces them.
165
+ */
166
+ readonly failureAction?: FailureAction;
167
+ /** Development warnings: a theme that is hard to read, copy that says "assistant". */
168
+ readonly onWarning?: (message: string) => void;
169
+ /**
170
+ * The person tapped a card about something of yours (its `ref`: a professional, a space, a booking): open its page
171
+ * with your router. Without it, only the card's own actions open anything.
172
+ */
173
+ readonly onOpenTarget?: (target: AgentCardTarget, card: HeldCard) => void;
174
+ /** Card photos arrive: fetch them ahead with your image library (`Image.prefetch`), so the cards draw at once. */
175
+ readonly prefetchImage?: (url: string) => void;
176
+ /** Reads a line to a screen reader (a finished reply, the launcher's greeting). Default: the platform's. */
177
+ readonly announce?: (text: string) => void;
178
+ /** A chip was tapped (a welcome chip, a starter, the suggestion); its message is sent as the person's own. */
179
+ readonly onChip?: (chip: Chip) => void;
180
+ }
181
+ /** Which card photos are drawn, in what frame, and what stands in for one that is not. */
182
+ interface ImagePolicy {
183
+ /** Hosts a photo may come from (exact names); default any https host. */
184
+ readonly hosts?: readonly string[];
185
+ /** Width / height of a listing's photo frame. Default 1.6 (16:10). */
186
+ readonly aspectRatio?: number;
187
+ /** What stands in for a missing, refused or failed photo. Default the name's monogram. */
188
+ readonly Placeholder?: ComponentType<{
189
+ readonly title: string;
190
+ }>;
191
+ }
192
+ /** Parts a tenant can replace. Each gets the default's props and the default itself (`Default`), to wrap it. */
193
+ interface ChatSlots {
194
+ readonly Header?: ComponentType<HeaderProps>;
195
+ readonly MessageBubble?: ComponentType<MessageBubbleProps>;
196
+ readonly Composer?: ComponentType<ComposerProps>;
197
+ readonly EmptyState?: ComponentType<EmptyStateProps>;
198
+ readonly Image?: ComponentType<ImageProps>;
199
+ /** A list with FlashList's props (LegendList works). Default: FlashList. */
200
+ readonly ListComponent?: ComponentType<ListProps>;
201
+ /** A turn that failed before any reply: replaces the "Something went wrong." row. */
202
+ readonly Error?: ComponentType<FailureProps>;
203
+ /** No session to talk to: replaces the "Couldn't connect." banner. */
204
+ readonly Unavailable?: ComponentType<FailureProps>;
205
+ /**
206
+ * Draws a turn's cards that ask for a carousel (`group.layout: carousel`) in one row: the kit's `CardCarousel`, or
207
+ * yours. Without it they draw one under another. Opt-in, so an app that never draws a carousel does not ship one.
208
+ */
209
+ readonly CardGroup?: ComponentType<CardGroupProps>;
210
+ /** Card renderers by kind (`professional`, `proposal`, …). */
211
+ readonly cards?: Readonly<Partial<Record<string, ComponentType<CardProps>>>>;
212
+ }
213
+ interface ChatContextValue {
214
+ readonly store: ConversationStore;
215
+ readonly handlers: RefObject<ChatHandlers>;
216
+ readonly slots: ChatSlots;
217
+ readonly agentAvatar: string | undefined;
218
+ readonly timeZone: string | undefined;
219
+ /** The failure action's label when there is one (`label` undefined: the copy's); `onPress` is read from `handlers`. */
220
+ readonly failureAction: {
221
+ readonly label: string | undefined;
222
+ } | null;
223
+ /** Chips for an empty conversation when the session brings no welcome. */
224
+ readonly starters: readonly Chip[] | undefined;
225
+ readonly imagePolicy: ImagePolicy | undefined;
226
+ }
227
+ /** A tap target that sends `message` as the person's own text (a welcome chip, a starter, a suggestion). */
228
+ type Chip = Welcome$1['chips'][number];
229
+ /** The conversation, handlers and slots; only inside `VinaverseChat` (or `VinaverseChatProvider`). */
230
+ declare function useChat(): ChatContextValue;
231
+
232
+ interface VinaverseChatProps extends ChatHandlers {
233
+ /** The conversation (`createConversation`), created where it can outlive the screen. */
234
+ readonly conversation: ConversationStore;
235
+ /** The person's locale: the copy, dates, money and text direction (pass the same one to `getSession`). */
236
+ readonly locale?: string;
237
+ /** For dates and times on cards; default: the device's. */
238
+ readonly timeZone?: string;
239
+ readonly copy?: CopyOverrides;
240
+ readonly theme?: ThemeOverrides;
241
+ readonly colorScheme?: ColorSchemeSetting;
242
+ /** Parts to replace. Keep the object stable (module level, or memoized). */
243
+ readonly components?: ChatSlots;
244
+ /** The agent's picture, until the session carries one. */
245
+ readonly agentAvatar?: string;
246
+ /** Hide the header (a screen that draws its own); the disclosure stays. */
247
+ readonly hideHeader?: boolean;
248
+ /** iOS: the height above the keyboard that is not this view's (a navigation header). */
249
+ readonly keyboardVerticalOffset?: number;
250
+ /**
251
+ * How the composer stays above the keyboard. Default: `padding` on iOS, none on Android (the window resizes). An
252
+ * edge-to-edge Android app whose window does not resize passes `padding`; one that manages the keyboard itself
253
+ * (react-native-keyboard-controller) passes `none`.
254
+ */
255
+ readonly keyboardBehavior?: 'padding' | 'height' | 'position' | 'none';
256
+ readonly style?: StyleProp<ViewStyle>;
257
+ /** Chips for an empty conversation when the session brings no welcome (`Session.welcome` comes first). Keep stable. */
258
+ readonly starters?: readonly Chip[];
259
+ /** Which card photos are drawn, their frame, and what stands in for one that is not. Keep stable. */
260
+ readonly imagePolicy?: ImagePolicy;
261
+ /** One chip above the composer: a question about where the person now is (`AgentChat` offers it when they moved). */
262
+ readonly suggestion?: Chip | null;
263
+ /** Drawn under the composer, inside the kit's providers (`AgentChat`'s thumbs and footer). */
264
+ readonly footer?: ReactNode;
265
+ }
266
+ /** The providers alone, for a tenant composing its own layout from the exported parts. */
267
+ declare function VinaverseChatProvider(props: Omit<VinaverseChatProps, 'hideHeader' | 'keyboardVerticalOffset' | 'keyboardBehavior' | 'style' | 'suggestion' | 'footer'> & {
268
+ readonly children?: ReactNode;
269
+ }): ReactNode;
270
+ declare function VinaverseChat(props: VinaverseChatProps): ReactNode;
271
+
272
+ interface AgentEndedProps {
273
+ readonly onStartNew: () => void;
274
+ /** The API's code (`conversation_not_found`, `conversation_expired`), when it gave one. */
275
+ readonly code: string | null;
276
+ }
277
+ /** No agent here: switched off for this tenant, mode or person, or the backend refused the session. */
278
+ interface AgentUnavailableScreenProps {
279
+ /** Why: `off`, `auth`, `invalid_session`, … */
280
+ readonly reason: AgentFailureReason | null;
281
+ readonly code: string | null;
282
+ /** A person instead (the chat's `onContact`); absent when the app gave none. */
283
+ readonly onContact: (() => void) | undefined;
284
+ /** Ask again (after a sign-in, or the agent switched back on). */
285
+ readonly onRetry: () => void;
286
+ }
287
+ interface AgentUnreachableProps {
288
+ readonly onRetry: () => void;
289
+ /** Why: `network`, `server`, `rate_limited`, … */
290
+ readonly reason: AgentFailureReason | null;
291
+ }
292
+ /** A slot gets the kit's own part as `Default`, to wrap rather than rewrite. */
293
+ type Slot<P> = ComponentType<P & {
294
+ readonly Default: ComponentType<P>;
295
+ }>;
296
+ interface AgentFooterProps {
297
+ /** The newest whole reply's turn, to rate; null when there is none. */
298
+ readonly turnId: string | null;
299
+ readonly rating: AgentRating | undefined;
300
+ readonly onRate: (rating: AgentRating) => void;
301
+ readonly onOpenPrivacy: (() => void) | undefined;
302
+ }
303
+ interface AgentChatSlots extends ChatSlots {
304
+ readonly Ended?: Slot<AgentEndedProps>;
305
+ readonly Unreachable?: Slot<AgentUnreachableProps>;
306
+ /**
307
+ * The whole screen when there is no agent (off, or the session refused). Not `Unavailable`: that is the chat's own
308
+ * "couldn't connect" banner, still drawn for a session that drops.
309
+ */
310
+ readonly UnavailableScreen?: Slot<AgentUnavailableScreenProps>;
311
+ /** Under the composer; null hides it. Default: thumbs on the newest whole reply, and the privacy link. */
312
+ readonly Footer?: Slot<AgentFooterProps> | null;
313
+ }
314
+ interface AgentChatProps extends Omit<VinaverseChatProps, 'conversation' | 'components' | 'suggestion' | 'footer'> {
315
+ /** Whose conversation: one per person, mode, business and thread. */
316
+ readonly agentKey: AgentKey;
317
+ /** Where the person asks from, told to the agent as a session opens. */
318
+ readonly place?: AgentPlace | null;
319
+ readonly entryPoint?: string | null;
320
+ /** The question about this place, offered when the session was told another one (`moved`). */
321
+ readonly askAbout?: string | null;
322
+ /** A person: offered on a failed turn, "couldn't connect" and no agent. */
323
+ readonly onContact?: () => void;
324
+ readonly onOpenPrivacy?: () => void;
325
+ /** The agent's name until the session or the status gives one. */
326
+ readonly agentName?: string;
327
+ /**
328
+ * A first question for a flow that asks for itself (setting a business up): a chip the person taps, offered until they
329
+ * say anything. Never sent in their name: what the transcript shows as theirs, they typed or tapped.
330
+ */
331
+ readonly opener?: Chip | null;
332
+ readonly components?: AgentChatSlots;
333
+ }
334
+ declare function AgentChat(props: AgentChatProps): ReactNode;
335
+ /** The newest reply when it came whole (not cut off, not a refusal): the one to rate. */
336
+ declare function newestWholeReply(view: {
337
+ readonly items: readonly _vinaverse_client_conversation.TimelineItem[];
338
+ }): string | null;
339
+ /** The conversation is over: a new one starts only when the person asks. */
340
+ declare function DefaultEnded(props: AgentEndedProps): ReactNode;
341
+ /** No agent here: says so, and offers a person when the app has one. */
342
+ declare function DefaultUnavailableScreen(props: AgentUnavailableScreenProps): ReactNode;
343
+ /** The app's backend could not be reached, after its tries: try again. */
344
+ declare function DefaultUnreachable(props: AgentUnreachableProps): ReactNode;
345
+ /** Thumbs on the newest whole reply (thanks once given), and the privacy link. */
346
+ declare function AgentFooter(props: AgentFooterProps): ReactNode;
347
+
348
+ declare const Avatar: react.NamedExoticComponent<{
349
+ readonly name: string;
350
+ readonly uri: string | null;
351
+ readonly person?: boolean;
352
+ }>;
353
+
354
+ interface ButtonProps {
355
+ readonly label: string;
356
+ readonly onPress: () => void;
357
+ readonly variant?: 'primary' | 'secondary' | 'text';
358
+ readonly disabled?: boolean;
359
+ readonly busy?: boolean;
360
+ /** A role other than a button: `radio` and `checkbox` for choices. */
361
+ readonly role?: 'button' | 'radio' | 'checkbox' | 'link';
362
+ readonly selected?: boolean;
363
+ readonly hint?: string;
364
+ readonly children?: ReactNode;
365
+ readonly testID?: string;
366
+ }
367
+ declare const Button: react.NamedExoticComponent<ButtonProps>;
368
+
369
+ declare function DefaultHeader(props: Omit<HeaderProps, 'Default'>): react.JSX.Element;
370
+ declare const ChatHeader: react.NamedExoticComponent<object>;
371
+
372
+ declare const ChatSkeleton: react.NamedExoticComponent<object>;
373
+
374
+ declare function DefaultComposer(props: Omit<ComposerProps, 'Default'>): react.JSX.Element;
375
+ declare const Composer: react.NamedExoticComponent<{
376
+ readonly onError?: (error: unknown) => void;
377
+ }>;
378
+
379
+ declare const DisclosureBar: react.NamedExoticComponent<object>;
380
+
381
+ /** The tenant's failure action as a button, or nothing when there is none. */
382
+ declare function FailureActionButton(props: {
383
+ readonly state: FailureState;
384
+ }): ReactNode;
385
+
386
+ declare function DefaultBubble(props: Omit<MessageBubbleProps, 'Default'>): react.JSX.Element;
387
+ declare const MessageBubble: react.NamedExoticComponent<{
388
+ readonly item: MessageItem;
389
+ /** The first of a run from the same author: its label is shown. */
390
+ readonly showAuthor: boolean;
391
+ }>;
392
+ /** The reply streaming now: the only cell that re-renders as the text arrives. */
393
+ declare const StreamingBubble: react.NamedExoticComponent<{
394
+ readonly item: MessageItem;
395
+ readonly showAuthor: boolean;
396
+ }>;
397
+
398
+ /** Rows of one kind recycle together. */
399
+ declare function itemType(item: TimelineItem): string;
400
+ /**
401
+ * Runs of two or more consecutive cards with one carousel group (`group.layout: carousel`, the same `group.id`): by
402
+ * the first card's key, and the keys of the cards the run draws after it. A run equal to the previous one is the
403
+ * same array, so its row does not render again.
404
+ */
405
+ declare function carousels(items: readonly TimelineItem[], previous: ReadonlyMap<string, readonly CardItem[]>): {
406
+ runs: Map<string, readonly CardItem[]>;
407
+ inside: Set<string>;
408
+ };
409
+ declare const Row: react.NamedExoticComponent<{
410
+ readonly item: TimelineItem;
411
+ readonly showAuthor: boolean;
412
+ /** The carousel this card starts (`components.CardGroup`). */
413
+ readonly run?: readonly CardItem[] | undefined;
414
+ /** A card a carousel earlier in the list draws. */
415
+ readonly inside?: boolean;
416
+ }>;
417
+ declare const MessageList: react.NamedExoticComponent<object>;
418
+
419
+ declare const StatusBanner: react.NamedExoticComponent<object>;
420
+ /** The kit's own "Couldn't connect." banner: try again, and the tenant's failure action when there is one. */
421
+ declare function DefaultUnavailable(props: {
422
+ readonly state: FailureState;
423
+ }): ReactNode;
424
+
425
+ declare const SystemRow: react.NamedExoticComponent<{
426
+ readonly item: SystemItem;
427
+ }>;
428
+ /** The kit's own failed-turn row: "Something went wrong.", and the tenant's failure action when there is one. */
429
+ declare function DefaultTurnFailed(props: {
430
+ readonly state: FailureState;
431
+ }): ReactNode;
432
+
433
+ declare const Welcome: react.NamedExoticComponent<{
434
+ readonly welcome: Welcome$1;
435
+ readonly onChip: (message: string) => void;
436
+ }>;
437
+
438
+ /** The part of the conversation store the adapter drives. */
439
+ interface LifecycleTarget {
440
+ setForeground(foreground: boolean): void;
441
+ }
442
+ /** Tells the store when the app comes to the foreground or goes to the background (it pings only in the foreground). */
443
+ declare function useNativeLifecycle(store: LifecycleTarget): void;
444
+ /** Whether the person asked for reduced motion: animations and animated scrolling stay off. */
445
+ declare function useReducedMotion(): boolean;
446
+ /** Reads a line to a screen reader, without moving focus. */
447
+ declare function announce(text: string): void;
448
+
449
+ export { ActivityLine, AgentChat, type AgentChatProps, type AgentChatSlots, type AgentEndedProps, AgentFooter, type AgentFooterProps, type AgentUnavailableScreenProps, type AgentUnreachableProps, Avatar, Button, type ButtonProps, CardActions, CardCarousel, CardFrame, type CardGroupProps, type CardProps, CardView, type ChatHandlers, ChatHeader, ChatSkeleton, type ChatSlots, type Chip, ColorSchemeSetting, Composer, type ComposerProps, DefaultBubble, DefaultComposer, DefaultEnded, DefaultHeader, DefaultTurnFailed, DefaultUnavailable, DefaultUnavailableScreen, DefaultUnreachable, DisclosureBar, type EmptyStateProps, type FailureAction, FailureActionButton, type FailureProps, type FailureState, type HeaderProps, type ImagePolicy, InfoCard, type LifecycleTarget, LinksCard, type ListProps, ListingCard, MessageBubble, type MessageBubbleProps, MessageList, NextStepCard, ProposalCard, type ProposalDecision, QuestionCard, Row, StatusBanner, StreamingBubble, SystemRow, ThemeOverrides, TimeSlotsCard, VinaverseChat, type VinaverseChatProps, VinaverseChatProvider, Welcome, allowedImage, announce, answerText, carousels, defaultCard, fieldText, itemType, monogram, newestWholeReply, ratingText, useChat, useNativeLifecycle, useReducedMotion };