@webority/mobile-chat 0.0.0-stage → 0.4.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 (71) hide show
  1. package/LICENSE.txt +9 -0
  2. package/README.md +146 -2
  3. package/lib/commonjs/client.js +1 -0
  4. package/lib/commonjs/components/ActionCard.js +1 -0
  5. package/lib/commonjs/components/ChatComposer.js +1 -0
  6. package/lib/commonjs/components/ChatConversationList.js +1 -0
  7. package/lib/commonjs/components/ChatLauncher.js +1 -0
  8. package/lib/commonjs/components/ChatMarkdown.js +1 -0
  9. package/lib/commonjs/components/ChatMessage.js +1 -0
  10. package/lib/commonjs/components/ChatScreen.js +1 -0
  11. package/lib/commonjs/components/ChatThread.js +1 -0
  12. package/lib/commonjs/components/ReplyRating.js +1 -0
  13. package/lib/commonjs/index.js +1 -0
  14. package/lib/commonjs/labels.js +1 -0
  15. package/lib/commonjs/markdownParse.js +1 -0
  16. package/lib/commonjs/package.json +1 -0
  17. package/lib/commonjs/sse.js +1 -0
  18. package/lib/commonjs/types.js +1 -0
  19. package/lib/commonjs/useChat.js +1 -0
  20. package/lib/module/client.js +1 -0
  21. package/lib/module/components/ActionCard.js +1 -0
  22. package/lib/module/components/ChatComposer.js +1 -0
  23. package/lib/module/components/ChatConversationList.js +1 -0
  24. package/lib/module/components/ChatLauncher.js +1 -0
  25. package/lib/module/components/ChatMarkdown.js +1 -0
  26. package/lib/module/components/ChatMessage.js +1 -0
  27. package/lib/module/components/ChatScreen.js +1 -0
  28. package/lib/module/components/ChatThread.js +1 -0
  29. package/lib/module/components/ReplyRating.js +1 -0
  30. package/lib/module/index.js +1 -0
  31. package/lib/module/labels.js +1 -0
  32. package/lib/module/markdownParse.js +1 -0
  33. package/lib/module/package.json +1 -0
  34. package/lib/module/sse.js +1 -0
  35. package/lib/module/types.js +1 -0
  36. package/lib/module/useChat.js +1 -0
  37. package/lib/typescript/commonjs/client.d.ts +73 -0
  38. package/lib/typescript/commonjs/components/ActionCard.d.ts +23 -0
  39. package/lib/typescript/commonjs/components/ChatComposer.d.ts +20 -0
  40. package/lib/typescript/commonjs/components/ChatConversationList.d.ts +23 -0
  41. package/lib/typescript/commonjs/components/ChatLauncher.d.ts +22 -0
  42. package/lib/typescript/commonjs/components/ChatMarkdown.d.ts +23 -0
  43. package/lib/typescript/commonjs/components/ChatMessage.d.ts +35 -0
  44. package/lib/typescript/commonjs/components/ChatScreen.d.ts +30 -0
  45. package/lib/typescript/commonjs/components/ChatThread.d.ts +17 -0
  46. package/lib/typescript/commonjs/components/ReplyRating.d.ts +19 -0
  47. package/lib/typescript/commonjs/index.d.ts +28 -0
  48. package/lib/typescript/commonjs/labels.d.ts +63 -0
  49. package/lib/typescript/commonjs/markdownParse.d.ts +59 -0
  50. package/lib/typescript/commonjs/package.json +1 -0
  51. package/lib/typescript/commonjs/sse.d.ts +23 -0
  52. package/lib/typescript/commonjs/types.d.ts +71 -0
  53. package/lib/typescript/commonjs/useChat.d.ts +63 -0
  54. package/lib/typescript/module/client.d.ts +73 -0
  55. package/lib/typescript/module/components/ActionCard.d.ts +23 -0
  56. package/lib/typescript/module/components/ChatComposer.d.ts +20 -0
  57. package/lib/typescript/module/components/ChatConversationList.d.ts +23 -0
  58. package/lib/typescript/module/components/ChatLauncher.d.ts +22 -0
  59. package/lib/typescript/module/components/ChatMarkdown.d.ts +23 -0
  60. package/lib/typescript/module/components/ChatMessage.d.ts +35 -0
  61. package/lib/typescript/module/components/ChatScreen.d.ts +30 -0
  62. package/lib/typescript/module/components/ChatThread.d.ts +17 -0
  63. package/lib/typescript/module/components/ReplyRating.d.ts +19 -0
  64. package/lib/typescript/module/index.d.ts +28 -0
  65. package/lib/typescript/module/labels.d.ts +63 -0
  66. package/lib/typescript/module/markdownParse.d.ts +59 -0
  67. package/lib/typescript/module/package.json +1 -0
  68. package/lib/typescript/module/sse.d.ts +23 -0
  69. package/lib/typescript/module/types.d.ts +71 -0
  70. package/lib/typescript/module/useChat.d.ts +63 -0
  71. package/package.json +93 -4
@@ -0,0 +1,35 @@
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
+ /** The props a thread passes to each of its turns. */
6
+ export interface ChatReplyProps<T = string> {
7
+ /** Shows the rating under a stored reply. */
8
+ onRate?: (turnId: string, rating: ChatRating, note?: string) => Promise<unknown>;
9
+ /** Maps a reply link to what it opens; see `ChatMarkdown`. */
10
+ resolveLink?: (href: string) => T | null | undefined;
11
+ /** Opens what `resolveLink` returned. */
12
+ onLinkPress?: (target: T) => void;
13
+ /** Shows support action cards; see `ActionCard`. */
14
+ confirmAction?: (token: string) => Promise<SupportActionTicket>;
15
+ onViewTicket?: (ticket: SupportActionTicket) => void;
16
+ /**
17
+ * Draws the assistant's answer in place of `ChatMarkdown` (charts, maths). The question, action
18
+ * cards, rating and layout stay the library's.
19
+ */
20
+ renderReply?: (turn: ChatTurn, state: {
21
+ streaming: boolean;
22
+ }) => React.ReactNode;
23
+ labels?: Partial<ChatLabels>;
24
+ }
25
+ export interface ChatMessageProps<T = string> extends ChatReplyProps<T> {
26
+ turn: ChatTurn;
27
+ testID?: string;
28
+ }
29
+ /**
30
+ * One turn: the person's question on the right, the assistant's answer on the left. The answer is
31
+ * a polite live region, so a screen reader reads it as it settles. Support actions show under the
32
+ * answer, and the rating once the reply is stored.
33
+ */
34
+ export declare function ChatMessage<T = string>({ turn, onRate, resolveLink, onLinkPress, confirmAction, onViewTicket, renderReply, labels: labelOverrides, testID }: ChatMessageProps<T>): React.ReactElement;
35
+ //# sourceMappingURL=ChatMessage.d.ts.map
@@ -0,0 +1,30 @@
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
+ /** The `useChat` result. */
6
+ chat: UseChatResult;
7
+ /** Header title. Defaults to the `panelTitle` label. */
8
+ title?: string;
9
+ /** Extra header controls before New chat, e.g. an "All chats" button. */
10
+ headerActions?: React.ReactNode;
11
+ /** Shown before the first question, in place of the default title and text. */
12
+ empty?: React.ReactNode;
13
+ /** The footnote under the question box. Defaults to the `disclaimer` label; null hides it. */
14
+ disclaimer?: string | null;
15
+ /** The server's message limit. Default 4000. */
16
+ maxLength?: number;
17
+ /** Show the questions left once this many or fewer remain. Default 10. */
18
+ allowanceThreshold?: number;
19
+ /** Offer ratings under stored replies. Default true. */
20
+ rating?: boolean;
21
+ testID?: string;
22
+ }
23
+ /**
24
+ * The whole chat for one screen of the app's navigator: a header with New chat, the
25
+ * conversation, the questions left today, the question box and the AI disclaimer. The question
26
+ * box rises with the keyboard. Place it in a stack screen (or a full-height sheet) and keep the
27
+ * `useChat` call above the navigator, so the conversation survives leaving the screen.
28
+ */
29
+ export declare function ChatScreen<T = string>({ chat, title, headerActions, empty, disclaimer, maxLength, allowanceThreshold, rating, testID, ...reply }: ChatScreenProps<T>): React.ReactElement;
30
+ //# sourceMappingURL=ChatScreen.d.ts.map
@@ -0,0 +1,17 @@
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
+ export interface ChatThreadProps<T = string> extends ChatReplyProps<T> {
6
+ turns: ChatTurn[];
7
+ /** Shown before the first question. */
8
+ empty?: React.ReactNode;
9
+ style?: StyleProp<ViewStyle>;
10
+ testID?: string;
11
+ }
12
+ /**
13
+ * The conversation, oldest first, in a scroll view that follows the newest text while an answer
14
+ * streams and when a question is added.
15
+ */
16
+ export declare function ChatThread<T = string>({ turns, empty, style, testID, ...reply }: ChatThreadProps<T>): React.ReactElement;
17
+ //# sourceMappingURL=ChatThread.d.ts.map
@@ -0,0 +1,19 @@
1
+ import type React from 'react';
2
+ import { type ChatLabels } from '../labels.js';
3
+ import type { ChatRating } from '../types.js';
4
+ export interface ReplyRatingProps {
5
+ /** The rating already saved. */
6
+ rating?: ChatRating | null;
7
+ /** Saves a rating; rejects on failure. */
8
+ onRate: (rating: ChatRating, note?: string) => Promise<unknown>;
9
+ /** The server's note limit. Default 1000. */
10
+ noteMaxLength?: number;
11
+ labels?: Partial<ChatLabels>;
12
+ testID?: string;
13
+ }
14
+ /**
15
+ * Helpful and Not helpful under one reply. Either saves at once; Not helpful then offers an
16
+ * optional note, saved with the same rating. Either choice can be changed.
17
+ */
18
+ export declare const ReplyRating: React.FC<ReplyRatingProps>;
19
+ //# sourceMappingURL=ReplyRating.d.ts.map
@@ -0,0 +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';
28
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,63 @@
1
+ export interface ChatLabels {
2
+ launcher: string;
3
+ panelTitle: string;
4
+ newChat: string;
5
+ close: string;
6
+ thread: string;
7
+ you: string;
8
+ assistant: string;
9
+ thinking: string;
10
+ emptyTitle: string;
11
+ emptyText: string;
12
+ composer: string;
13
+ placeholder: string;
14
+ send: string;
15
+ composerHint: string;
16
+ allowance: (count: number) => string;
17
+ disclaimer: string;
18
+ loadingConversation: string;
19
+ rateUp: string;
20
+ rateDown: string;
21
+ rated: string;
22
+ ratingNote: string;
23
+ ratingNoteHint: string;
24
+ ratingNoteSend: string;
25
+ ratingNoteSkip: string;
26
+ ratingFailed: string;
27
+ actionRaiseTicket: string;
28
+ actionReply: (ticketNumber: string) => string;
29
+ actionReopen: (ticketNumber: string) => string;
30
+ actionNote: string;
31
+ actionConfirm: string;
32
+ actionDismiss: string;
33
+ actionDismissed: string;
34
+ actionExpired: string;
35
+ actionFailed: string;
36
+ actionDoneRaiseTicket: (ticketNumber: string) => string;
37
+ actionDoneReply: (ticketNumber: string) => string;
38
+ actionDoneReopen: (ticketNumber: string) => string;
39
+ viewTicket: string;
40
+ conversations: string;
41
+ conversationsEmptyTitle: string;
42
+ conversationsEmptyText: string;
43
+ untitled: string;
44
+ deleteConversation: string;
45
+ deleteConfirmTitle: string;
46
+ deleteConfirmMessage: string;
47
+ deleteConfirm: string;
48
+ deleteFailed: string;
49
+ cancel: string;
50
+ loadMore: string;
51
+ loadFailed: string;
52
+ retry: string;
53
+ }
54
+ /**
55
+ * Every word the chat components show, in English, with the same keys as the web assistant's
56
+ * labels, so a product passes one label set to both. Pass a `labels` object with any subset to a
57
+ * component to change its wording; the rest keep these defaults. The few that take a value are
58
+ * functions. `composerHint` describes a hardware keyboard's Enter key and is not shown on a phone.
59
+ */
60
+ export declare const DEFAULT_CHAT_LABELS: Readonly<ChatLabels>;
61
+ /** The defaults with a component's `labels` laid over them. */
62
+ export declare const mergeLabels: (labels?: Partial<ChatLabels>) => ChatLabels;
63
+ //# sourceMappingURL=labels.d.ts.map
@@ -0,0 +1,59 @@
1
+ type BlockShape = {
2
+ type: 'paragraph';
3
+ lines: string[];
4
+ } | {
5
+ type: 'heading';
6
+ text: string;
7
+ } | {
8
+ type: 'list';
9
+ ordered: boolean;
10
+ start: number;
11
+ items: string[];
12
+ } | {
13
+ type: 'table';
14
+ header: string[];
15
+ rows: string[][];
16
+ } | {
17
+ type: 'code';
18
+ text: string;
19
+ } | {
20
+ type: 'rule';
21
+ };
22
+ export type MarkdownBlock = BlockShape & {
23
+ key: number;
24
+ };
25
+ type InlineShape = {
26
+ type: 'text';
27
+ text: string;
28
+ } | {
29
+ type: 'code';
30
+ text: string;
31
+ } | {
32
+ type: 'strong' | 'em';
33
+ children: InlineToken[];
34
+ } | {
35
+ type: 'link';
36
+ href: string;
37
+ children: InlineToken[];
38
+ };
39
+ export type InlineToken = InlineShape & {
40
+ key: number;
41
+ };
42
+ /**
43
+ * Splits reply text into blocks: paragraphs, headings, bullet and numbered lists, simple tables,
44
+ * code blocks and rules. Each block's `key` is its position, so text arriving at the end of a
45
+ * streaming reply updates the last block in place and never remounts the ones before it.
46
+ */
47
+ export declare const parseBlocks: (text: string | null | undefined) => MarkdownBlock[];
48
+ /**
49
+ * Reads bold (`**` or `__`), italics (`*` or `_`), inline code and `[label](href)` links. A marker
50
+ * with no partner yet (a reply still streaming) shows as the characters typed.
51
+ */
52
+ export declare const parseInline: (text: string) => InlineToken[];
53
+ /**
54
+ * What a reply link opens, or null when it may not open anything. Only `scheme:kind/id` hrefs
55
+ * reach `resolveLink`; a web address never does, so a reply cannot send the person off the app.
56
+ */
57
+ export declare const linkTarget: <T>(href: string, resolveLink: ((href: string) => T | null | undefined) | undefined) => T | null;
58
+ export {};
59
+ //# sourceMappingURL=markdownParse.d.ts.map
@@ -0,0 +1 @@
1
+ {"type":"module"}
@@ -0,0 +1,23 @@
1
+ export interface SseEvent {
2
+ /** The `event:` field, or "message" when the block names none. */
3
+ name: string;
4
+ /** The `data:` lines joined by newlines and parsed as JSON. */
5
+ data: unknown;
6
+ }
7
+ export interface SseParser {
8
+ push: (text: string) => void;
9
+ end: () => void;
10
+ }
11
+ /**
12
+ * An incremental reader for a `text/event-stream` body that arrives in pieces. Each `push` takes
13
+ * the next piece of text; only complete events (ended by a blank line) are handed on, and the
14
+ * incomplete tail waits for the next piece. `end` flushes a final event the stream closed
15
+ * without a blank line after.
16
+ *
17
+ * Line endings may be `\n`, `\r\n` or `\r`, and a `\r\n` pair may be split across two pieces.
18
+ * Comment lines (`:`), `id` and `retry` are ignored. A block whose data is not JSON is reported
19
+ * as an `error` event with the code `invalid-response`, so a caller ends the turn instead of
20
+ * hanging on it.
21
+ */
22
+ export declare const createSseParser: (onEvent: (event: SseEvent) => void) => SseParser;
23
+ //# sourceMappingURL=sse.d.ts.map
@@ -0,0 +1,71 @@
1
+ /** An action the assistant prepared for the person to confirm. Nothing happens without the token. */
2
+ export interface SupportAction {
3
+ token: string;
4
+ kind: 'RaiseTicket' | 'Reply' | 'Reopen';
5
+ ticketId: string | null;
6
+ ticketNumber: string | null;
7
+ category: string | null;
8
+ subject: string | null;
9
+ body: string | null;
10
+ expiresDateTimeUtc: string;
11
+ }
12
+ /** The ticket a confirmed support action raised, replied on or reopened. */
13
+ export interface SupportActionTicket {
14
+ id: string;
15
+ number: string;
16
+ }
17
+ export interface ChatTurnInput {
18
+ /** The person's question. */
19
+ message: string;
20
+ /** The conversation to continue; left out or null to start one. */
21
+ conversationId?: string | null;
22
+ /** Product-defined context about the screen, passed through as is. */
23
+ pageContext?: unknown;
24
+ }
25
+ export type ChatStreamEventName = 'delta' | 'reset' | 'actions';
26
+ export interface ChatStreamOptions {
27
+ /** Cancels the request. */
28
+ signal?: AbortSignal;
29
+ /**
30
+ * Called for each event before the end of the turn: `delta { text }` to append, `reset {}` to
31
+ * discard what was shown, `actions { actions }` for support cards.
32
+ */
33
+ onEvent?: (name: ChatStreamEventName, data: unknown) => void;
34
+ }
35
+ /** The `done` event: the turn's outcome of record. */
36
+ export interface ChatTurnResult {
37
+ conversationId: string;
38
+ /** The stored reply's id, for rating; null when storing failed. */
39
+ messageId: string | null;
40
+ /** The reply of record. It replaces whatever was streamed. */
41
+ reply: string;
42
+ /** Null when the person has no daily limit. */
43
+ messagesLeftToday: number | null;
44
+ }
45
+ export interface ConversationSummary {
46
+ publicId: string;
47
+ title: string | null;
48
+ createdDateTimeUtc: string;
49
+ lastMessageDateTimeUtc: string;
50
+ }
51
+ export interface ConversationMessage {
52
+ publicId: string;
53
+ role: 'User' | 'Assistant';
54
+ content: string;
55
+ /** The support actions offered with an assistant reply, as a JSON array. */
56
+ actionsJson: string | null;
57
+ rating: ChatRating | null;
58
+ ratingNote: string | null;
59
+ createdDateTimeUtc: string;
60
+ }
61
+ export interface Conversation {
62
+ publicId: string;
63
+ title: string | null;
64
+ messages: ConversationMessage[];
65
+ }
66
+ export type ChatRating = 'Up' | 'Down';
67
+ export interface ChatRatingInput {
68
+ rating: ChatRating;
69
+ note?: string | null;
70
+ }
71
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,63 @@
1
+ import type { ChatClient } from './client.js';
2
+ import type { ChatRating, SupportAction } from './types.js';
3
+ export interface ChatTurnError {
4
+ code: string;
5
+ /** Written for the person. */
6
+ message: string;
7
+ resetsAtUtc: string | null;
8
+ }
9
+ /** One question and its answer. */
10
+ export interface ChatTurn {
11
+ /** Local key; for a reopened conversation, the stored message's id. */
12
+ id: string;
13
+ question: string;
14
+ /** What is shown: the streamed text, then the reply of record. */
15
+ answer: string;
16
+ streaming: boolean;
17
+ error: ChatTurnError | null;
18
+ actions: SupportAction[];
19
+ /** The stored reply's id; rating needs it. */
20
+ messageId: string | null;
21
+ rating: ChatRating | null;
22
+ ratingNote: string | null;
23
+ }
24
+ export interface UseChatOptions {
25
+ /** From `createChatClient`. */
26
+ client: ChatClient;
27
+ /** Sent with each question; read at the moment of sending. */
28
+ pageContext?: unknown;
29
+ }
30
+ export interface UseChatResult {
31
+ /** Oldest first. */
32
+ turns: ChatTurn[];
33
+ /** The conversation being continued, or null. */
34
+ conversationId: string | null;
35
+ /** From the last answer or `refreshAllowance()`; null with no daily limit. */
36
+ messagesLeftToday: number | null;
37
+ /** An answer is arriving. */
38
+ streaming: boolean;
39
+ /** `openConversation` is loading. */
40
+ loading: boolean;
41
+ /** `openConversation` failed. */
42
+ loadError: ChatTurnError | null;
43
+ /** Asks a question. Ignored while an answer is still arriving. */
44
+ submit: (message: string) => Promise<void>;
45
+ /** Replaces the thread with a stored conversation. */
46
+ openConversation: (id: string) => Promise<void>;
47
+ /** Clears the thread; the next question starts a conversation. */
48
+ newConversation: () => void;
49
+ /** Saves a rating, shown at once; a failed save puts the old one back and rejects. */
50
+ rate: (turnId: string, rating: ChatRating, note?: string) => Promise<void>;
51
+ /** Reads the questions left today. */
52
+ refreshAllowance: () => Promise<void>;
53
+ /** Clears everything, for sign-out or an account switch. */
54
+ reset: () => void;
55
+ }
56
+ /**
57
+ * The chat's state and actions, with no store of its own: it lives in the component that calls
58
+ * it. Call `reset()` when the signed-in person or account changes so nothing of one person's chat
59
+ * shows to the next. An answer still streaming is cancelled on `reset`, `newConversation`,
60
+ * `openConversation` and unmount.
61
+ */
62
+ export declare const useChat: ({ client, pageContext }: UseChatOptions) => UseChatResult;
63
+ //# sourceMappingURL=useChat.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,95 @@
1
1
  {
2
2
  "name": "@webority/mobile-chat",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.4.0",
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
+ "keywords": [
6
+ "react-native",
7
+ "chat",
8
+ "assistant",
9
+ "ai",
10
+ "streaming",
11
+ "webority"
12
+ ],
13
+ "homepage": "https://www.webority.com",
14
+ "license": "SEE LICENSE IN LICENSE.txt",
15
+ "author": {
16
+ "name": "Webority Technologies",
17
+ "email": "contact@webority.com",
18
+ "url": "https://www.webority.com"
19
+ },
20
+ "exports": {
21
+ ".": {
22
+ "import": {
23
+ "types": "./lib/typescript/module/index.d.ts",
24
+ "default": "./lib/module/index.js"
25
+ },
26
+ "require": {
27
+ "types": "./lib/typescript/commonjs/index.d.ts",
28
+ "default": "./lib/commonjs/index.js"
29
+ }
30
+ },
31
+ "./package.json": "./package.json"
32
+ },
33
+ "main": "./lib/commonjs/index.js",
34
+ "module": "./lib/module/index.js",
35
+ "react-native": "./lib/module/index.js",
36
+ "types": "./lib/typescript/commonjs/index.d.ts",
37
+ "files": [
38
+ "lib",
39
+ "!**/__tests__",
40
+ "!**/*.test.*",
41
+ "!**/*.spec.*",
42
+ "!**/*.map"
43
+ ],
44
+ "scripts": {
45
+ "build": "bob build && node ../../scripts/minify-lib.mjs",
46
+ "clean": "rimraf lib",
47
+ "lint": "biome lint ./src",
48
+ "lint:fix": "biome lint --write ./src",
49
+ "test": "jest",
50
+ "typecheck": "tsc --noEmit"
51
+ },
52
+ "peerDependencies": {
53
+ "@webority/mobile-core": ">=0.4.0 <0.5.0",
54
+ "@webority/mobile-ui": ">=0.4.0 <0.5.0",
55
+ "react": "^19.1.0",
56
+ "react-native": ">=0.81.0",
57
+ "react-native-keyboard-controller": ">=1.21.9",
58
+ "react-native-safe-area-context": ">=5.4.0"
59
+ },
60
+ "peerDependenciesMeta": {},
61
+ "publishConfig": {
62
+ "access": "public",
63
+ "registry": "https://registry.npmjs.org/"
64
+ },
65
+ "react-native-builder-bob": {
66
+ "source": "src",
67
+ "output": "lib",
68
+ "targets": [
69
+ [
70
+ "commonjs",
71
+ {
72
+ "esm": true,
73
+ "sourceMaps": false
74
+ }
75
+ ],
76
+ [
77
+ "module",
78
+ {
79
+ "esm": true,
80
+ "sourceMaps": false
81
+ }
82
+ ],
83
+ [
84
+ "typescript",
85
+ {
86
+ "project": "tsconfig.build.json"
87
+ }
88
+ ]
89
+ ]
90
+ },
91
+ "devDependencies": {
92
+ "@webority/mobile-core": "file:../core",
93
+ "@webority/mobile-ui": "file:../ui"
94
+ }
95
+ }