@webority/mobile-chat 0.19.1 → 0.88.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.
Files changed (29) hide show
  1. package/lib/typescript/commonjs/client.d.ts +2 -2
  2. package/lib/typescript/commonjs/components/ActionCard.d.ts +3 -3
  3. package/lib/typescript/commonjs/components/ChatComposer.d.ts +2 -2
  4. package/lib/typescript/commonjs/components/ChatConversationList.d.ts +5 -5
  5. package/lib/typescript/commonjs/components/ChatLauncher.d.ts +3 -3
  6. package/lib/typescript/commonjs/components/ChatMarkdown.d.ts +1 -1
  7. package/lib/typescript/commonjs/components/ChatMessage.d.ts +5 -5
  8. package/lib/typescript/commonjs/components/ChatScreen.d.ts +4 -4
  9. package/lib/typescript/commonjs/components/ChatThread.d.ts +4 -4
  10. package/lib/typescript/commonjs/components/ReplyRating.d.ts +3 -3
  11. package/lib/typescript/commonjs/index.d.ts +27 -27
  12. package/lib/typescript/commonjs/markdownParse.d.ts +10 -10
  13. package/lib/typescript/commonjs/types.d.ts +4 -4
  14. package/lib/typescript/commonjs/useChat.d.ts +2 -2
  15. package/lib/typescript/module/client.d.ts +2 -2
  16. package/lib/typescript/module/components/ActionCard.d.ts +3 -3
  17. package/lib/typescript/module/components/ChatComposer.d.ts +2 -2
  18. package/lib/typescript/module/components/ChatConversationList.d.ts +5 -5
  19. package/lib/typescript/module/components/ChatLauncher.d.ts +3 -3
  20. package/lib/typescript/module/components/ChatMarkdown.d.ts +1 -1
  21. package/lib/typescript/module/components/ChatMessage.d.ts +5 -5
  22. package/lib/typescript/module/components/ChatScreen.d.ts +4 -4
  23. package/lib/typescript/module/components/ChatThread.d.ts +4 -4
  24. package/lib/typescript/module/components/ReplyRating.d.ts +3 -3
  25. package/lib/typescript/module/index.d.ts +27 -27
  26. package/lib/typescript/module/markdownParse.d.ts +10 -10
  27. package/lib/typescript/module/types.d.ts +4 -4
  28. package/lib/typescript/module/useChat.d.ts +2 -2
  29. package/package.json +19 -6
@@ -1,4 +1,4 @@
1
- import type { ChatRatingInput, ChatStreamOptions, ChatTurnInput, ChatTurnResult, Conversation, ConversationSummary } from './types';
1
+ import type { ChatRatingInput, ChatStreamOptions, ChatTurnInput, ChatTurnResult, Conversation, ConversationSummary } from "./types";
2
2
  /** A failed chat request. `message` is written for the person and is safe to show as is. */
3
3
  export declare class ChatApiError extends Error {
4
4
  /**
@@ -15,7 +15,7 @@ export declare class ChatApiError extends Error {
15
15
  /** The axios config fields the chat client sets. */
16
16
  export interface ChatHttpRequestConfig {
17
17
  headers?: Record<string, string>;
18
- responseType?: 'text';
18
+ responseType?: "text";
19
19
  signal?: AbortSignal;
20
20
  onDownloadProgress?: (progress: unknown) => void;
21
21
  }
@@ -1,6 +1,6 @@
1
- import type React from 'react';
2
- import { type ChatLabels } from '../labels';
3
- import type { SupportAction, SupportActionTicket } from '../types';
1
+ import type React from "react";
2
+ import { type ChatLabels } from "../labels";
3
+ import type { SupportAction, SupportActionTicket } from "../types";
4
4
  export interface ActionCardProps {
5
5
  action: SupportAction;
6
6
  /**
@@ -1,5 +1,5 @@
1
- import type React from 'react';
2
- import { type ChatLabels } from '../labels';
1
+ import type React from "react";
2
+ import { type ChatLabels } from "../labels";
3
3
  export interface ChatComposerProps {
4
4
  /** Called with the trimmed question; the box clears once it is handed over. */
5
5
  onSubmit: (message: string) => unknown;
@@ -1,8 +1,8 @@
1
- import type React from 'react';
2
- import { type StyleProp, type ViewStyle } from 'react-native';
3
- import type { ChatClient } from '../client';
4
- import { type ChatLabels } from '../labels';
5
- import type { ConversationSummary } from '../types';
1
+ import type React from "react";
2
+ import { type StyleProp, type ViewStyle } from "react-native";
3
+ import type { ChatClient } from "../client";
4
+ import { type ChatLabels } from "../labels";
5
+ import type { ConversationSummary } from "../types";
6
6
  export interface ChatConversationListProps {
7
7
  client: ChatClient;
8
8
  /** E.g. go to the chat and call `chat.openConversation(conversation.publicId)`. */
@@ -1,9 +1,9 @@
1
- import type React from 'react';
2
- import { type ChatLabels } from '../labels';
1
+ import type React from "react";
2
+ import { type ChatLabels } from "../labels";
3
3
  export interface ChatLauncherProps {
4
4
  onPress: () => void;
5
5
  /** `end` (the default) or `start`: the bottom corner it sits in. */
6
- position?: 'end' | 'start';
6
+ position?: "end" | "start";
7
7
  /**
8
8
  * Distance above the bottom safe area, so it clears a tab bar or another floating control.
9
9
  * Defaults to the theme's floating action button offset.
@@ -1,4 +1,4 @@
1
- import type React from 'react';
1
+ import type React from "react";
2
2
  export interface ChatMarkdownProps<T = string> {
3
3
  /** The reply text, possibly still arriving. */
4
4
  text: string;
@@ -1,7 +1,7 @@
1
- import type React from 'react';
2
- import { type ChatLabels } from '../labels';
3
- import type { ChatRating, SupportActionTicket } from '../types';
4
- import type { ChatTurn } from '../useChat';
1
+ import type React from "react";
2
+ import { type ChatLabels } from "../labels";
3
+ import type { ChatRating, SupportActionTicket } from "../types";
4
+ import type { ChatTurn } from "../useChat";
5
5
  /** The props a thread passes to each of its turns. */
6
6
  export interface ChatReplyProps<T = string> {
7
7
  /** Shows the rating under a stored reply. */
@@ -32,7 +32,7 @@ export interface ChatMessageProps<T = string> extends ChatReplyProps<T> {
32
32
  * leading side. The answer is announced once, when it finishes arriving. Support actions show
33
33
  * under the answer, and the rating once the reply is stored.
34
34
  */
35
- declare function ChatMessageView<T = string>({ turn, onRate, resolveLink, onLinkPress, confirmAction, onViewTicket, renderReply, labels: labelOverrides, testID }: ChatMessageProps<T>): React.ReactElement;
35
+ declare function ChatMessageView<T = string>({ turn, onRate, resolveLink, onLinkPress, confirmAction, onViewTicket, renderReply, labels: labelOverrides, testID, }: ChatMessageProps<T>): React.ReactElement;
36
36
  export declare const ChatMessage: typeof ChatMessageView;
37
37
  export {};
38
38
  //# sourceMappingURL=ChatMessage.d.ts.map
@@ -1,7 +1,7 @@
1
- import type React from 'react';
2
- import type { UseChatResult } from '../useChat';
3
- import type { ChatReplyProps } from './ChatMessage';
4
- export interface ChatScreenProps<T = string> extends Omit<ChatReplyProps<T>, 'onRate'> {
1
+ import type React from "react";
2
+ import type { UseChatResult } from "../useChat";
3
+ import type { ChatReplyProps } from "./ChatMessage";
4
+ export interface ChatScreenProps<T = string> extends Omit<ChatReplyProps<T>, "onRate"> {
5
5
  /** The `useChat` result. */
6
6
  chat: UseChatResult;
7
7
  /** Header title. Defaults to the `panelTitle` label. */
@@ -1,7 +1,7 @@
1
- import type React from 'react';
2
- import { type StyleProp, type ViewStyle } from 'react-native';
3
- import type { ChatTurn } from '../useChat';
4
- import { type ChatReplyProps } from './ChatMessage';
1
+ import type React from "react";
2
+ import { type StyleProp, type ViewStyle } from "react-native";
3
+ import type { ChatTurn } from "../useChat";
4
+ import { type ChatReplyProps } from "./ChatMessage";
5
5
  export interface ChatThreadProps<T = string> extends ChatReplyProps<T> {
6
6
  turns: ChatTurn[];
7
7
  /** Shown before the first question. */
@@ -1,6 +1,6 @@
1
- import type React from 'react';
2
- import { type ChatLabels } from '../labels';
3
- import type { ChatRating } from '../types';
1
+ import type React from "react";
2
+ import { type ChatLabels } from "../labels";
3
+ import type { ChatRating } from "../types";
4
4
  export interface ReplyRatingProps {
5
5
  /** The rating already saved. */
6
6
  rating?: ChatRating | null;
@@ -1,28 +1,28 @@
1
- export type { ChatClient, ChatHttpClient, ChatHttpRequestConfig } from './client';
2
- export { ChatApiError, createChatClient } from './client';
3
- export type { ActionCardProps } from './components/ActionCard';
4
- export { ActionCard } from './components/ActionCard';
5
- export type { ChatComposerProps } from './components/ChatComposer';
6
- export { ChatComposer } from './components/ChatComposer';
7
- export type { ChatConversationListProps } from './components/ChatConversationList';
8
- export { ChatConversationList } from './components/ChatConversationList';
9
- export type { ChatLauncherProps } from './components/ChatLauncher';
10
- export { ChatLauncher } from './components/ChatLauncher';
11
- export type { ChatMarkdownProps } from './components/ChatMarkdown';
12
- export { ChatMarkdown } from './components/ChatMarkdown';
13
- export type { ChatMessageProps, ChatReplyProps } from './components/ChatMessage';
14
- export { ChatMessage } from './components/ChatMessage';
15
- export type { ChatScreenProps } from './components/ChatScreen';
16
- export { ChatScreen } from './components/ChatScreen';
17
- export type { ChatThreadProps } from './components/ChatThread';
18
- export { ChatThread } from './components/ChatThread';
19
- export type { ReplyRatingProps } from './components/ReplyRating';
20
- export { ReplyRating } from './components/ReplyRating';
21
- export type { ChatLabels } from './labels';
22
- export { DEFAULT_CHAT_LABELS } from './labels';
23
- export type { SseEvent, SseParser } from './sse';
24
- export { createSseParser } from './sse';
25
- export type { ChatRating, ChatRatingInput, ChatStreamEventName, ChatStreamOptions, ChatTurnInput, ChatTurnResult, Conversation, ConversationMessage, ConversationSummary, SupportAction, SupportActionTicket } from './types';
26
- export type { ChatTurn, ChatTurnError, UseChatOptions, UseChatResult } from './useChat';
27
- export { useChat } from './useChat';
1
+ export type { ChatClient, ChatHttpClient, ChatHttpRequestConfig } from "./client";
2
+ export { ChatApiError, createChatClient } from "./client";
3
+ export type { ActionCardProps } from "./components/ActionCard";
4
+ export { ActionCard } from "./components/ActionCard";
5
+ export type { ChatComposerProps } from "./components/ChatComposer";
6
+ export { ChatComposer } from "./components/ChatComposer";
7
+ export type { ChatConversationListProps } from "./components/ChatConversationList";
8
+ export { ChatConversationList } from "./components/ChatConversationList";
9
+ export type { ChatLauncherProps } from "./components/ChatLauncher";
10
+ export { ChatLauncher } from "./components/ChatLauncher";
11
+ export type { ChatMarkdownProps } from "./components/ChatMarkdown";
12
+ export { ChatMarkdown } from "./components/ChatMarkdown";
13
+ export type { ChatMessageProps, ChatReplyProps } from "./components/ChatMessage";
14
+ export { ChatMessage } from "./components/ChatMessage";
15
+ export type { ChatScreenProps } from "./components/ChatScreen";
16
+ export { ChatScreen } from "./components/ChatScreen";
17
+ export type { ChatThreadProps } from "./components/ChatThread";
18
+ export { ChatThread } from "./components/ChatThread";
19
+ export type { ReplyRatingProps } from "./components/ReplyRating";
20
+ export { ReplyRating } from "./components/ReplyRating";
21
+ export type { ChatLabels } from "./labels";
22
+ export { DEFAULT_CHAT_LABELS } from "./labels";
23
+ export type { SseEvent, SseParser } from "./sse";
24
+ export { createSseParser } from "./sse";
25
+ export type { ChatRating, ChatRatingInput, ChatStreamEventName, ChatStreamOptions, ChatTurnInput, ChatTurnResult, Conversation, ConversationMessage, ConversationSummary, SupportAction, SupportActionTicket, } from "./types";
26
+ export type { ChatTurn, ChatTurnError, UseChatOptions, UseChatResult } from "./useChat";
27
+ export { useChat } from "./useChat";
28
28
  //# sourceMappingURL=index.d.ts.map
@@ -1,38 +1,38 @@
1
1
  type BlockShape = {
2
- type: 'paragraph';
2
+ type: "paragraph";
3
3
  lines: string[];
4
4
  } | {
5
- type: 'heading';
5
+ type: "heading";
6
6
  text: string;
7
7
  } | {
8
- type: 'list';
8
+ type: "list";
9
9
  ordered: boolean;
10
10
  start: number;
11
11
  items: string[];
12
12
  } | {
13
- type: 'table';
13
+ type: "table";
14
14
  header: string[];
15
15
  rows: string[][];
16
16
  } | {
17
- type: 'code';
17
+ type: "code";
18
18
  text: string;
19
19
  } | {
20
- type: 'rule';
20
+ type: "rule";
21
21
  };
22
22
  export type MarkdownBlock = BlockShape & {
23
23
  key: number;
24
24
  };
25
25
  type InlineShape = {
26
- type: 'text';
26
+ type: "text";
27
27
  text: string;
28
28
  } | {
29
- type: 'code';
29
+ type: "code";
30
30
  text: string;
31
31
  } | {
32
- type: 'strong' | 'em';
32
+ type: "strong" | "em";
33
33
  children: InlineToken[];
34
34
  } | {
35
- type: 'link';
35
+ type: "link";
36
36
  href: string;
37
37
  children: InlineToken[];
38
38
  };
@@ -1,7 +1,7 @@
1
1
  /** An action the assistant prepared for the person to confirm. Nothing happens without the token. */
2
2
  export interface SupportAction {
3
3
  token: string;
4
- kind: 'RaiseTicket' | 'Reply' | 'Reopen';
4
+ kind: "RaiseTicket" | "Reply" | "Reopen";
5
5
  ticketId: string | null;
6
6
  ticketNumber: string | null;
7
7
  category: string | null;
@@ -22,7 +22,7 @@ export interface ChatTurnInput {
22
22
  /** Product-defined context about the screen, passed through as is. */
23
23
  pageContext?: unknown;
24
24
  }
25
- export type ChatStreamEventName = 'delta' | 'reset' | 'actions';
25
+ export type ChatStreamEventName = "delta" | "reset" | "actions";
26
26
  export interface ChatStreamOptions {
27
27
  /** Cancels the request. */
28
28
  signal?: AbortSignal;
@@ -50,7 +50,7 @@ export interface ConversationSummary {
50
50
  }
51
51
  export interface ConversationMessage {
52
52
  publicId: string;
53
- role: 'User' | 'Assistant';
53
+ role: "User" | "Assistant";
54
54
  content: string;
55
55
  /** The support actions offered with an assistant reply, as a JSON array. */
56
56
  actionsJson: string | null;
@@ -63,7 +63,7 @@ export interface Conversation {
63
63
  title: string | null;
64
64
  messages: ConversationMessage[];
65
65
  }
66
- export type ChatRating = 'Up' | 'Down';
66
+ export type ChatRating = "Up" | "Down";
67
67
  export interface ChatRatingInput {
68
68
  rating: ChatRating;
69
69
  note?: string | null;
@@ -1,5 +1,5 @@
1
- import type { ChatClient } from './client';
2
- import type { ChatRating, SupportAction } from './types';
1
+ import type { ChatClient } from "./client";
2
+ import type { ChatRating, SupportAction } from "./types";
3
3
  export interface ChatTurnError {
4
4
  code: string;
5
5
  /** Written for the person. */
@@ -1,4 +1,4 @@
1
- import type { ChatRatingInput, ChatStreamOptions, ChatTurnInput, ChatTurnResult, Conversation, ConversationSummary } from './types.js';
1
+ import type { ChatRatingInput, ChatStreamOptions, ChatTurnInput, ChatTurnResult, Conversation, ConversationSummary } from "./types.js";
2
2
  /** A failed chat request. `message` is written for the person and is safe to show as is. */
3
3
  export declare class ChatApiError extends Error {
4
4
  /**
@@ -15,7 +15,7 @@ export declare class ChatApiError extends Error {
15
15
  /** The axios config fields the chat client sets. */
16
16
  export interface ChatHttpRequestConfig {
17
17
  headers?: Record<string, string>;
18
- responseType?: 'text';
18
+ responseType?: "text";
19
19
  signal?: AbortSignal;
20
20
  onDownloadProgress?: (progress: unknown) => void;
21
21
  }
@@ -1,6 +1,6 @@
1
- import type React from 'react';
2
- import { type ChatLabels } from '../labels.js';
3
- import type { SupportAction, SupportActionTicket } from '../types.js';
1
+ import type React from "react";
2
+ import { type ChatLabels } from "../labels.js";
3
+ import type { SupportAction, SupportActionTicket } from "../types.js";
4
4
  export interface ActionCardProps {
5
5
  action: SupportAction;
6
6
  /**
@@ -1,5 +1,5 @@
1
- import type React from 'react';
2
- import { type ChatLabels } from '../labels.js';
1
+ import type React from "react";
2
+ import { type ChatLabels } from "../labels.js";
3
3
  export interface ChatComposerProps {
4
4
  /** Called with the trimmed question; the box clears once it is handed over. */
5
5
  onSubmit: (message: string) => unknown;
@@ -1,8 +1,8 @@
1
- import type React from 'react';
2
- import { type StyleProp, type ViewStyle } from 'react-native';
3
- import type { ChatClient } from '../client.js';
4
- import { type ChatLabels } from '../labels.js';
5
- import type { ConversationSummary } from '../types.js';
1
+ import type React from "react";
2
+ import { type StyleProp, type ViewStyle } from "react-native";
3
+ import type { ChatClient } from "../client.js";
4
+ import { type ChatLabels } from "../labels.js";
5
+ import type { ConversationSummary } from "../types.js";
6
6
  export interface ChatConversationListProps {
7
7
  client: ChatClient;
8
8
  /** E.g. go to the chat and call `chat.openConversation(conversation.publicId)`. */
@@ -1,9 +1,9 @@
1
- import type React from 'react';
2
- import { type ChatLabels } from '../labels.js';
1
+ import type React from "react";
2
+ import { type ChatLabels } from "../labels.js";
3
3
  export interface ChatLauncherProps {
4
4
  onPress: () => void;
5
5
  /** `end` (the default) or `start`: the bottom corner it sits in. */
6
- position?: 'end' | 'start';
6
+ position?: "end" | "start";
7
7
  /**
8
8
  * Distance above the bottom safe area, so it clears a tab bar or another floating control.
9
9
  * Defaults to the theme's floating action button offset.
@@ -1,4 +1,4 @@
1
- import type React from 'react';
1
+ import type React from "react";
2
2
  export interface ChatMarkdownProps<T = string> {
3
3
  /** The reply text, possibly still arriving. */
4
4
  text: string;
@@ -1,7 +1,7 @@
1
- import type React from 'react';
2
- import { type ChatLabels } from '../labels.js';
3
- import type { ChatRating, SupportActionTicket } from '../types.js';
4
- import type { ChatTurn } from '../useChat.js';
1
+ import type React from "react";
2
+ import { type ChatLabels } from "../labels.js";
3
+ import type { ChatRating, SupportActionTicket } from "../types.js";
4
+ import type { ChatTurn } from "../useChat.js";
5
5
  /** The props a thread passes to each of its turns. */
6
6
  export interface ChatReplyProps<T = string> {
7
7
  /** Shows the rating under a stored reply. */
@@ -32,7 +32,7 @@ export interface ChatMessageProps<T = string> extends ChatReplyProps<T> {
32
32
  * leading side. The answer is announced once, when it finishes arriving. Support actions show
33
33
  * under the answer, and the rating once the reply is stored.
34
34
  */
35
- declare function ChatMessageView<T = string>({ turn, onRate, resolveLink, onLinkPress, confirmAction, onViewTicket, renderReply, labels: labelOverrides, testID }: ChatMessageProps<T>): React.ReactElement;
35
+ declare function ChatMessageView<T = string>({ turn, onRate, resolveLink, onLinkPress, confirmAction, onViewTicket, renderReply, labels: labelOverrides, testID, }: ChatMessageProps<T>): React.ReactElement;
36
36
  export declare const ChatMessage: typeof ChatMessageView;
37
37
  export {};
38
38
  //# sourceMappingURL=ChatMessage.d.ts.map
@@ -1,7 +1,7 @@
1
- import type React from 'react';
2
- import type { UseChatResult } from '../useChat.js';
3
- import type { ChatReplyProps } from './ChatMessage.js';
4
- export interface ChatScreenProps<T = string> extends Omit<ChatReplyProps<T>, 'onRate'> {
1
+ import type React from "react";
2
+ import type { UseChatResult } from "../useChat.js";
3
+ import type { ChatReplyProps } from "./ChatMessage.js";
4
+ export interface ChatScreenProps<T = string> extends Omit<ChatReplyProps<T>, "onRate"> {
5
5
  /** The `useChat` result. */
6
6
  chat: UseChatResult;
7
7
  /** Header title. Defaults to the `panelTitle` label. */
@@ -1,7 +1,7 @@
1
- import type React from 'react';
2
- import { type StyleProp, type ViewStyle } from 'react-native';
3
- import type { ChatTurn } from '../useChat.js';
4
- import { type ChatReplyProps } from './ChatMessage.js';
1
+ import type React from "react";
2
+ import { type StyleProp, type ViewStyle } from "react-native";
3
+ import type { ChatTurn } from "../useChat.js";
4
+ import { type ChatReplyProps } from "./ChatMessage.js";
5
5
  export interface ChatThreadProps<T = string> extends ChatReplyProps<T> {
6
6
  turns: ChatTurn[];
7
7
  /** Shown before the first question. */
@@ -1,6 +1,6 @@
1
- import type React from 'react';
2
- import { type ChatLabels } from '../labels.js';
3
- import type { ChatRating } from '../types.js';
1
+ import type React from "react";
2
+ import { type ChatLabels } from "../labels.js";
3
+ import type { ChatRating } from "../types.js";
4
4
  export interface ReplyRatingProps {
5
5
  /** The rating already saved. */
6
6
  rating?: ChatRating | null;
@@ -1,28 +1,28 @@
1
- export type { ChatClient, ChatHttpClient, ChatHttpRequestConfig } from './client.js';
2
- export { ChatApiError, createChatClient } from './client.js';
3
- export type { ActionCardProps } from './components/ActionCard.js';
4
- export { ActionCard } from './components/ActionCard.js';
5
- export type { ChatComposerProps } from './components/ChatComposer.js';
6
- export { ChatComposer } from './components/ChatComposer.js';
7
- export type { ChatConversationListProps } from './components/ChatConversationList.js';
8
- export { ChatConversationList } from './components/ChatConversationList.js';
9
- export type { ChatLauncherProps } from './components/ChatLauncher.js';
10
- export { ChatLauncher } from './components/ChatLauncher.js';
11
- export type { ChatMarkdownProps } from './components/ChatMarkdown.js';
12
- export { ChatMarkdown } from './components/ChatMarkdown.js';
13
- export type { ChatMessageProps, ChatReplyProps } from './components/ChatMessage.js';
14
- export { ChatMessage } from './components/ChatMessage.js';
15
- export type { ChatScreenProps } from './components/ChatScreen.js';
16
- export { ChatScreen } from './components/ChatScreen.js';
17
- export type { ChatThreadProps } from './components/ChatThread.js';
18
- export { ChatThread } from './components/ChatThread.js';
19
- export type { ReplyRatingProps } from './components/ReplyRating.js';
20
- export { ReplyRating } from './components/ReplyRating.js';
21
- export type { ChatLabels } from './labels.js';
22
- export { DEFAULT_CHAT_LABELS } from './labels.js';
23
- export type { SseEvent, SseParser } from './sse.js';
24
- export { createSseParser } from './sse.js';
25
- export type { ChatRating, ChatRatingInput, ChatStreamEventName, ChatStreamOptions, ChatTurnInput, ChatTurnResult, Conversation, ConversationMessage, ConversationSummary, SupportAction, SupportActionTicket } from './types.js';
26
- export type { ChatTurn, ChatTurnError, UseChatOptions, UseChatResult } from './useChat.js';
27
- export { useChat } from './useChat.js';
1
+ export type { ChatClient, ChatHttpClient, ChatHttpRequestConfig } from "./client.js";
2
+ export { ChatApiError, createChatClient } from "./client.js";
3
+ export type { ActionCardProps } from "./components/ActionCard.js";
4
+ export { ActionCard } from "./components/ActionCard.js";
5
+ export type { ChatComposerProps } from "./components/ChatComposer.js";
6
+ export { ChatComposer } from "./components/ChatComposer.js";
7
+ export type { ChatConversationListProps } from "./components/ChatConversationList.js";
8
+ export { ChatConversationList } from "./components/ChatConversationList.js";
9
+ export type { ChatLauncherProps } from "./components/ChatLauncher.js";
10
+ export { ChatLauncher } from "./components/ChatLauncher.js";
11
+ export type { ChatMarkdownProps } from "./components/ChatMarkdown.js";
12
+ export { ChatMarkdown } from "./components/ChatMarkdown.js";
13
+ export type { ChatMessageProps, ChatReplyProps } from "./components/ChatMessage.js";
14
+ export { ChatMessage } from "./components/ChatMessage.js";
15
+ export type { ChatScreenProps } from "./components/ChatScreen.js";
16
+ export { ChatScreen } from "./components/ChatScreen.js";
17
+ export type { ChatThreadProps } from "./components/ChatThread.js";
18
+ export { ChatThread } from "./components/ChatThread.js";
19
+ export type { ReplyRatingProps } from "./components/ReplyRating.js";
20
+ export { ReplyRating } from "./components/ReplyRating.js";
21
+ export type { ChatLabels } from "./labels.js";
22
+ export { DEFAULT_CHAT_LABELS } from "./labels.js";
23
+ export type { SseEvent, SseParser } from "./sse.js";
24
+ export { createSseParser } from "./sse.js";
25
+ export type { ChatRating, ChatRatingInput, ChatStreamEventName, ChatStreamOptions, ChatTurnInput, ChatTurnResult, Conversation, ConversationMessage, ConversationSummary, SupportAction, SupportActionTicket, } from "./types.js";
26
+ export type { ChatTurn, ChatTurnError, UseChatOptions, UseChatResult } from "./useChat.js";
27
+ export { useChat } from "./useChat.js";
28
28
  //# sourceMappingURL=index.d.ts.map
@@ -1,38 +1,38 @@
1
1
  type BlockShape = {
2
- type: 'paragraph';
2
+ type: "paragraph";
3
3
  lines: string[];
4
4
  } | {
5
- type: 'heading';
5
+ type: "heading";
6
6
  text: string;
7
7
  } | {
8
- type: 'list';
8
+ type: "list";
9
9
  ordered: boolean;
10
10
  start: number;
11
11
  items: string[];
12
12
  } | {
13
- type: 'table';
13
+ type: "table";
14
14
  header: string[];
15
15
  rows: string[][];
16
16
  } | {
17
- type: 'code';
17
+ type: "code";
18
18
  text: string;
19
19
  } | {
20
- type: 'rule';
20
+ type: "rule";
21
21
  };
22
22
  export type MarkdownBlock = BlockShape & {
23
23
  key: number;
24
24
  };
25
25
  type InlineShape = {
26
- type: 'text';
26
+ type: "text";
27
27
  text: string;
28
28
  } | {
29
- type: 'code';
29
+ type: "code";
30
30
  text: string;
31
31
  } | {
32
- type: 'strong' | 'em';
32
+ type: "strong" | "em";
33
33
  children: InlineToken[];
34
34
  } | {
35
- type: 'link';
35
+ type: "link";
36
36
  href: string;
37
37
  children: InlineToken[];
38
38
  };
@@ -1,7 +1,7 @@
1
1
  /** An action the assistant prepared for the person to confirm. Nothing happens without the token. */
2
2
  export interface SupportAction {
3
3
  token: string;
4
- kind: 'RaiseTicket' | 'Reply' | 'Reopen';
4
+ kind: "RaiseTicket" | "Reply" | "Reopen";
5
5
  ticketId: string | null;
6
6
  ticketNumber: string | null;
7
7
  category: string | null;
@@ -22,7 +22,7 @@ export interface ChatTurnInput {
22
22
  /** Product-defined context about the screen, passed through as is. */
23
23
  pageContext?: unknown;
24
24
  }
25
- export type ChatStreamEventName = 'delta' | 'reset' | 'actions';
25
+ export type ChatStreamEventName = "delta" | "reset" | "actions";
26
26
  export interface ChatStreamOptions {
27
27
  /** Cancels the request. */
28
28
  signal?: AbortSignal;
@@ -50,7 +50,7 @@ export interface ConversationSummary {
50
50
  }
51
51
  export interface ConversationMessage {
52
52
  publicId: string;
53
- role: 'User' | 'Assistant';
53
+ role: "User" | "Assistant";
54
54
  content: string;
55
55
  /** The support actions offered with an assistant reply, as a JSON array. */
56
56
  actionsJson: string | null;
@@ -63,7 +63,7 @@ export interface Conversation {
63
63
  title: string | null;
64
64
  messages: ConversationMessage[];
65
65
  }
66
- export type ChatRating = 'Up' | 'Down';
66
+ export type ChatRating = "Up" | "Down";
67
67
  export interface ChatRatingInput {
68
68
  rating: ChatRating;
69
69
  note?: string | null;
@@ -1,5 +1,5 @@
1
- import type { ChatClient } from './client.js';
2
- import type { ChatRating, SupportAction } from './types.js';
1
+ import type { ChatClient } from "./client.js";
2
+ import type { ChatRating, SupportAction } from "./types.js";
3
3
  export interface ChatTurnError {
4
4
  code: string;
5
5
  /** Written for the person. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webority/mobile-chat",
3
- "version": "0.19.1",
3
+ "version": "0.88.0",
4
4
  "description": "AI assistant chat for Webority React Native apps: a streaming chat client, a store-agnostic chat hook, and the chat screen, thread, composer, past chats, reply rating and support action cards, built on @webority/mobile-ui.",
5
5
  "keywords": [
6
6
  "react-native",
@@ -46,8 +46,8 @@
46
46
  "react-native": ">=0.81.0",
47
47
  "react-native-keyboard-controller": ">=1.21.9",
48
48
  "react-native-safe-area-context": ">=5.4.0",
49
- "@webority/mobile-ui": "0.19.1",
50
- "@webority/mobile-core": "0.19.1"
49
+ "@webority/mobile-core": "0.88.0",
50
+ "@webority/mobile-ui": "0.88.0"
51
51
  },
52
52
  "peerDependenciesMeta": {},
53
53
  "publishConfig": {
@@ -81,11 +81,24 @@
81
81
  ]
82
82
  },
83
83
  "devDependencies": {
84
- "@webority/mobile-core": "0.19.1",
85
- "@webority/mobile-ui": "0.19.1"
84
+ "@react-native/metro-config": "0.86.3",
85
+ "@testing-library/react-native": "12.9.0",
86
+ "@types/react": "19.2.18",
87
+ "jest": "29.7.0",
88
+ "react": "19.2.8",
89
+ "react-native": "0.86.3",
90
+ "react-native-builder-bob": "0.43.0",
91
+ "react-native-keyboard-controller": "1.21.9",
92
+ "react-native-safe-area-context": "5.9.1",
93
+ "react-test-renderer": "19.2.8",
94
+ "rimraf": "6.1.3",
95
+ "typescript": "5.9.3",
96
+ "@webority/mobile-dev": "0.0.0",
97
+ "@webority/mobile-core": "0.88.0",
98
+ "@webority/mobile-ui": "0.88.0"
86
99
  },
87
100
  "scripts": {
88
- "build": "bob build && node ../../scripts/minify-lib.mjs",
101
+ "build": "bob build && node ../mobile-dev/scripts/minify-lib.mjs",
89
102
  "clean": "rimraf lib",
90
103
  "lint": "biome lint ./src",
91
104
  "lint:fix": "biome lint --write ./src",