@vinaverse/react-native 0.1.0-alpha.12 → 0.1.0-alpha.13

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 (56) hide show
  1. package/README.md +16 -3
  2. package/dist/ask.cjs +10 -5
  3. package/dist/ask.d.cts +35 -5
  4. package/dist/ask.d.ts +35 -5
  5. package/dist/ask.js +3 -2
  6. package/dist/chat.cjs +69 -69
  7. package/dist/chat.d.cts +44 -8
  8. package/dist/chat.d.ts +44 -8
  9. package/dist/chat.js +3 -3
  10. package/dist/{chunk-XAG2P447.cjs → chunk-272ACDLI.cjs} +248 -104
  11. package/dist/chunk-272ACDLI.cjs.map +1 -0
  12. package/dist/{chunk-EFEXTVIT.js → chunk-35A77CNF.js} +11 -3
  13. package/dist/chunk-35A77CNF.js.map +1 -0
  14. package/dist/{chunk-NMKJ7LIJ.cjs → chunk-35T5QPMT.cjs} +31 -7
  15. package/dist/chunk-35T5QPMT.cjs.map +1 -0
  16. package/dist/{chunk-7KPCO443.js → chunk-GFD4T3IA.js} +28 -4
  17. package/dist/chunk-GFD4T3IA.js.map +1 -0
  18. package/dist/{chunk-2J2LIJLW.js → chunk-MCVW6TZD.js} +113 -33
  19. package/dist/chunk-MCVW6TZD.js.map +1 -0
  20. package/dist/{chunk-KSHDF3MG.js → chunk-QSMMC4RZ.js} +216 -74
  21. package/dist/chunk-QSMMC4RZ.js.map +1 -0
  22. package/dist/{chunk-POJP52GE.js → chunk-TY4TISCR.js} +4 -4
  23. package/dist/chunk-TY4TISCR.js.map +1 -0
  24. package/dist/{chunk-6QYDPGRS.cjs → chunk-UMCOOQT6.cjs} +11 -3
  25. package/dist/chunk-UMCOOQT6.cjs.map +1 -0
  26. package/dist/{chunk-MG32E4JI.cjs → chunk-VWAAUCE3.cjs} +11 -11
  27. package/dist/chunk-VWAAUCE3.cjs.map +1 -0
  28. package/dist/{chunk-4PXQ7DEY.cjs → chunk-YVCMKSJG.cjs} +140 -60
  29. package/dist/chunk-YVCMKSJG.cjs.map +1 -0
  30. package/dist/{context-gHCLFsJh.d.ts → context-B4ctXjm5.d.cts} +22 -1
  31. package/dist/{context-gHCLFsJh.d.cts → context-B4ctXjm5.d.ts} +22 -1
  32. package/dist/history.cjs +52 -48
  33. package/dist/history.cjs.map +1 -1
  34. package/dist/history.d.cts +12 -3
  35. package/dist/history.d.ts +12 -3
  36. package/dist/history.js +13 -9
  37. package/dist/history.js.map +1 -1
  38. package/dist/index.cjs +83 -78
  39. package/dist/index.cjs.map +1 -1
  40. package/dist/index.d.cts +3 -3
  41. package/dist/index.d.ts +3 -3
  42. package/dist/index.js +6 -5
  43. package/dist/index.js.map +1 -1
  44. package/dist/launcher.cjs +10 -10
  45. package/dist/launcher.js +2 -2
  46. package/package.json +7 -7
  47. package/dist/chunk-2J2LIJLW.js.map +0 -1
  48. package/dist/chunk-4PXQ7DEY.cjs.map +0 -1
  49. package/dist/chunk-6QYDPGRS.cjs.map +0 -1
  50. package/dist/chunk-7KPCO443.js.map +0 -1
  51. package/dist/chunk-EFEXTVIT.js.map +0 -1
  52. package/dist/chunk-KSHDF3MG.js.map +0 -1
  53. package/dist/chunk-MG32E4JI.cjs.map +0 -1
  54. package/dist/chunk-NMKJ7LIJ.cjs.map +0 -1
  55. package/dist/chunk-POJP52GE.js.map +0 -1
  56. package/dist/chunk-XAG2P447.cjs.map +0 -1
package/dist/chat.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  export { AgentRuntimeProvider, GreetingStorage, UseAgentConversation, UseAgentLauncher, forgetGreeting, greetedKey, useAgentConversation, useAgentFeatures, useAgentLauncher, useAgentName, useAgentProfile, useAgentRuntime, useAgentStatus, useAgentStatusState } from '@vinaverse/react/agent';
2
- import { b as CardProps, c as ChatHandlers, d as ChatSlots, g as Chip, I as ImagePolicy, H as HeaderProps, h as ComposerProps, j as FailureState, M as MessageBubbleProps } from './context-gHCLFsJh.js';
3
- export { C as CardCarousel, a as CardGroupProps, e as ChatStore, f as ChatWarning, E as EmptyStateProps, F as FailureAction, i as FailureProps, L as ListProps, P as ProposalDecision, u as useChat } from './context-gHCLFsJh.js';
2
+ import { b as CardProps, c as ChatHandlers, d as ChatSlots, g as Chip, I as ImagePolicy, H as HeaderProps, h as ComposerProps, j as FailureState, M as MessageBubbleProps } from './context-B4ctXjm5.js';
3
+ export { C as CardCarousel, a as CardGroupProps, e as ChatStore, f as ChatWarning, E as EmptyStateProps, F as FailureAction, i as FailureProps, L as ListProps, k as MessageTimeProps, P as ProposalDecision, u as useChat } from './context-B4ctXjm5.js';
4
4
  import * as react from 'react';
5
- import { ReactNode, ComponentType } from 'react';
5
+ import { ReactNode, ComponentType, ReactElement } from 'react';
6
6
  import * as _vinaverse_client_conversation from '@vinaverse/client/conversation';
7
7
  import { CardItem, Question, ConversationStore, MessageItem, TimelineItem, SystemItem, Welcome as Welcome$1 } from '@vinaverse/client/conversation';
8
- import { AgentKey, AgentPlace, AgentEntryPoint, AgentFailureReason, AgentRating } from '@vinaverse/client/agent';
8
+ import { AgentKey, AgentPlace, AgentPlacePreview, AgentEntryPoint, AgentEntry, AgentAnchorRef, AgentFailureReason, AgentRating } from '@vinaverse/client/agent';
9
9
  import { CopyOverrides } from '@vinaverse/react';
10
10
  import { StyleProp, ViewStyle } from 'react-native';
11
11
  import { a as ThemeOverrides, C as ColorSchemeSetting } from './theme-BhiEGv64.js';
@@ -80,8 +80,15 @@ interface VinaverseChatProps extends ChatHandlers {
80
80
  */
81
81
  readonly keyboardBehavior?: 'padding' | 'height' | 'position' | 'none';
82
82
  readonly style?: StyleProp<ViewStyle>;
83
+ /**
84
+ * The AI disclosure the app already holds for this conversation (its cache, or the open's answer): drawn from the
85
+ * first frame until the session's own arrives, in the same bar. Default: the kit's line.
86
+ */
87
+ readonly disclosure?: string;
83
88
  /** Chips for an empty conversation when the session brings no welcome (`Session.welcome` comes first). Keep stable. */
84
89
  readonly starters?: readonly Chip[];
90
+ /** False: the welcome's chips and the starters give way, its text stays (`AgentChat`: a question about an object leads). */
91
+ readonly welcomeChips?: boolean;
85
92
  /** Which card photos are drawn, their frame, and what stands in for one that is not. Keep stable. */
86
93
  readonly imagePolicy?: ImagePolicy;
87
94
  /** One chip above the composer: a question about where the person now is (`AgentChat` offers it when they moved). */
@@ -90,6 +97,19 @@ interface VinaverseChatProps extends ChatHandlers {
90
97
  readonly suggestionTestID?: string;
91
98
  /** Drawn under the composer, inside the kit's providers (`AgentChat`'s thumbs and footer). */
92
99
  readonly footer?: ReactNode;
100
+ /**
101
+ * When each message was sent: its time over the first message and over one after `gapMinutes` (default 10) of quiet,
102
+ * and the exact date and time in every message's screen-reader label, in `locale` and `timeZone`. `false` draws none.
103
+ * The line is the `MessageTime` slot. Default on.
104
+ */
105
+ readonly messageTimes?: boolean | {
106
+ readonly gapMinutes?: number;
107
+ };
108
+ /**
109
+ * Drawn as the conversation's first row, scrolling with it (`AgentChat`: the object asked about, until its verified
110
+ * card takes the same place). Keep it stable.
111
+ */
112
+ readonly listHeader?: ReactElement | null;
93
113
  }
94
114
  /** The providers alone, for a tenant composing its own layout from the exported parts. */
95
115
  declare function VinaverseChatProvider(props: Omit<VinaverseChatProps, 'hideHeader' | 'keyboardVerticalOffset' | 'keyboardBehavior' | 'style' | 'suggestion' | 'suggestionTestID' | 'footer'> & {
@@ -150,14 +170,28 @@ interface AgentChatSlots extends ChatSlots {
150
170
  /** Under the composer; null hides it. Default: thumbs on the newest whole reply, and the privacy link. */
151
171
  readonly Footer?: Slot<AgentFooterProps> | null;
152
172
  }
153
- interface AgentChatProps extends Omit<VinaverseChatProps, 'conversation' | 'components' | 'suggestion' | 'suggestionTestID' | 'footer'> {
173
+ interface AgentChatProps extends Omit<VinaverseChatProps, 'conversation' | 'components' | 'suggestion' | 'suggestionTestID' | 'footer' | 'listHeader' | 'welcomeChips'> {
154
174
  /** Whose conversation: one per person, mode, business and thread. */
155
175
  readonly agentKey: AgentKey;
156
- /** Where the person asks from, told to the agent as a session opens. */
157
- readonly place?: AgentPlace | null;
176
+ /**
177
+ * Where the person asks from, told to the agent as a session opens. Its `preview` (from `AskAboutRow`) is drawn as the
178
+ * conversation's first row, in a card's frame, until the agent's verified card of that object (an `anchor` card)
179
+ * arrives and takes its place; never sent.
180
+ */
181
+ readonly place?: (AgentPlace & {
182
+ readonly preview?: AgentPlacePreview;
183
+ }) | null;
158
184
  /** How the person came in: `launcher` and `ask` from the kit's parts, `deep_link`, or the app's own words. */
159
185
  readonly entryPoint?: AgentEntryPoint | null;
160
- /** The question about this place, offered when the session was told another one (`moved`). */
186
+ /** How the person came in, in the contract's words (`ask_about`); sent only with the runtime's `sendAnchor`. */
187
+ readonly entry?: AgentEntry | null;
188
+ /** The object the conversation is about (contracts#86); sent only with the runtime's `sendAnchor`. */
189
+ readonly anchor?: AgentAnchorRef | null;
190
+ /**
191
+ * The question about this place. At an object (`place.entity`), before the person says anything, it leads: a chip
192
+ * above the composer, the welcome's own chips giving way. Elsewhere it is offered when the session was told another
193
+ * place (`moved`).
194
+ */
161
195
  readonly askAbout?: string | null;
162
196
  /** A person: offered on a failed turn, "couldn't connect" and no agent. */
163
197
  readonly onContact?: () => void;
@@ -256,6 +290,8 @@ declare const Row: react.NamedExoticComponent<{
256
290
  readonly run?: readonly CardItem[] | undefined;
257
291
  /** A card a carousel earlier in the list draws. */
258
292
  readonly inside?: boolean;
293
+ /** The message starts a new stretch: its time is drawn over it (`messageTimes`). */
294
+ readonly time?: string | undefined;
259
295
  }>;
260
296
  declare const MessageList: react.NamedExoticComponent<object>;
261
297
 
package/dist/chat.js CHANGED
@@ -1,5 +1,5 @@
1
- export { AgentChat, AgentFooter, AgentRuntimeProvider, Composer, DefaultComposer, DefaultEnded, DefaultUnavailable, DefaultUnavailableScreen, DefaultUnreachable, StatusBanner, VinaverseChat, VinaverseChatProvider, forgetGreeting, greetedKey, newestWholeReply, useAgentConversation, useAgentFeatures, useAgentLauncher, useAgentName, useAgentProfile, useAgentRuntime, useAgentStatus, useAgentStatusState } from './chunk-2J2LIJLW.js';
2
- export { ActivityLine, Avatar, Button, CardActions, CardCarousel, CardFrame, CardView, ChatHeader, ChatSkeleton, DefaultBubble, DefaultHeader, DefaultTurnFailed, DisclosureBar, FailureActionButton, InfoCard, LinksCard, ListingCard, MessageBubble, MessageList, NextStepCard, ProposalCard, QuestionCard, Row, StreamingBubble, SystemRow, TimeSlotsCard, Welcome, allowedImage, answerText, carousels, defaultCard, fieldText, itemType, monogram, ratingText, useChat } from './chunk-KSHDF3MG.js';
3
- export { ThemeProvider, announce, createTheme, themeProblems, useNativeLifecycle, useReducedMotion, useTheme } from './chunk-EFEXTVIT.js';
1
+ export { AgentChat, AgentFooter, AgentRuntimeProvider, Composer, DefaultComposer, DefaultEnded, DefaultUnavailable, DefaultUnavailableScreen, DefaultUnreachable, StatusBanner, VinaverseChat, VinaverseChatProvider, forgetGreeting, greetedKey, newestWholeReply, useAgentConversation, useAgentFeatures, useAgentLauncher, useAgentName, useAgentProfile, useAgentRuntime, useAgentStatus, useAgentStatusState } from './chunk-MCVW6TZD.js';
2
+ export { ActivityLine, Avatar, Button, CardActions, CardCarousel, CardFrame, CardView, ChatHeader, ChatSkeleton, DefaultBubble, DefaultHeader, DefaultTurnFailed, DisclosureBar, FailureActionButton, InfoCard, LinksCard, ListingCard, MessageBubble, MessageList, NextStepCard, ProposalCard, QuestionCard, Row, StreamingBubble, SystemRow, TimeSlotsCard, Welcome, allowedImage, answerText, carousels, defaultCard, fieldText, itemType, monogram, ratingText, useChat } from './chunk-QSMMC4RZ.js';
3
+ export { ThemeProvider, announce, createTheme, themeProblems, useNativeLifecycle, useReducedMotion, useTheme } from './chunk-35A77CNF.js';
4
4
  //# sourceMappingURL=chat.js.map
5
5
  //# sourceMappingURL=chat.js.map