@scalemule/chat 0.0.7 → 0.0.8

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 (75) hide show
  1. package/dist/react.cjs +159 -111
  2. package/dist/react.js +83 -35
  3. package/package.json +1 -1
  4. package/dist/ChatClient-DQPHdUHX.d.cts +0 -107
  5. package/dist/ChatClient-DtUKF-4c.d.ts +0 -107
  6. package/dist/constants.d.ts +0 -9
  7. package/dist/constants.d.ts.map +0 -1
  8. package/dist/core/ChatClient.d.ts +0 -96
  9. package/dist/core/ChatClient.d.ts.map +0 -1
  10. package/dist/core/EventEmitter.d.ts +0 -11
  11. package/dist/core/EventEmitter.d.ts.map +0 -1
  12. package/dist/core/MessageCache.d.ts +0 -18
  13. package/dist/core/MessageCache.d.ts.map +0 -1
  14. package/dist/core/OfflineQueue.d.ts +0 -19
  15. package/dist/core/OfflineQueue.d.ts.map +0 -1
  16. package/dist/element.d.cts +0 -2
  17. package/dist/element.d.ts +0 -2
  18. package/dist/element.d.ts.map +0 -1
  19. package/dist/embed/index.d.ts +0 -2
  20. package/dist/embed/index.d.ts.map +0 -1
  21. package/dist/factory.d.ts +0 -8
  22. package/dist/factory.d.ts.map +0 -1
  23. package/dist/iframe.d.cts +0 -17
  24. package/dist/iframe.d.ts +0 -15
  25. package/dist/iframe.d.ts.map +0 -1
  26. package/dist/index.d.cts +0 -166
  27. package/dist/index.d.ts +0 -8
  28. package/dist/index.d.ts.map +0 -1
  29. package/dist/react-components/ChatInput.d.ts +0 -16
  30. package/dist/react-components/ChatInput.d.ts.map +0 -1
  31. package/dist/react-components/ChatMessageItem.d.ts +0 -13
  32. package/dist/react-components/ChatMessageItem.d.ts.map +0 -1
  33. package/dist/react-components/ChatMessageList.d.ts +0 -15
  34. package/dist/react-components/ChatMessageList.d.ts.map +0 -1
  35. package/dist/react-components/ChatThread.d.ts +0 -12
  36. package/dist/react-components/ChatThread.d.ts.map +0 -1
  37. package/dist/react-components/ConversationList.d.ts +0 -13
  38. package/dist/react-components/ConversationList.d.ts.map +0 -1
  39. package/dist/react-components/EmojiPicker.d.ts +0 -8
  40. package/dist/react-components/EmojiPicker.d.ts.map +0 -1
  41. package/dist/react-components/index.d.ts +0 -8
  42. package/dist/react-components/index.d.ts.map +0 -1
  43. package/dist/react-components/theme.d.ts +0 -19
  44. package/dist/react-components/theme.d.ts.map +0 -1
  45. package/dist/react-components/utils.d.ts +0 -4
  46. package/dist/react-components/utils.d.ts.map +0 -1
  47. package/dist/react.d.cts +0 -145
  48. package/dist/react.d.ts +0 -72
  49. package/dist/react.d.ts.map +0 -1
  50. package/dist/shared/ChatController.d.ts +0 -65
  51. package/dist/shared/ChatController.d.ts.map +0 -1
  52. package/dist/shared/upload.d.ts +0 -3
  53. package/dist/shared/upload.d.ts.map +0 -1
  54. package/dist/support.d.ts +0 -99
  55. package/dist/support.d.ts.map +0 -1
  56. package/dist/transport/HttpTransport.d.ts +0 -20
  57. package/dist/transport/HttpTransport.d.ts.map +0 -1
  58. package/dist/transport/WebSocketTransport.d.ts +0 -78
  59. package/dist/transport/WebSocketTransport.d.ts.map +0 -1
  60. package/dist/types-COPVrm3K.d.cts +0 -256
  61. package/dist/types-COPVrm3K.d.ts +0 -256
  62. package/dist/types.d.ts +0 -271
  63. package/dist/types.d.ts.map +0 -1
  64. package/dist/umd.d.ts +0 -6
  65. package/dist/umd.d.ts.map +0 -1
  66. package/dist/version.d.ts +0 -2
  67. package/dist/version.d.ts.map +0 -1
  68. package/dist/widget/icons.d.ts +0 -8
  69. package/dist/widget/icons.d.ts.map +0 -1
  70. package/dist/widget/index.d.ts +0 -2
  71. package/dist/widget/index.d.ts.map +0 -1
  72. package/dist/widget/storage.d.ts +0 -5
  73. package/dist/widget/storage.d.ts.map +0 -1
  74. package/dist/widget/styles.d.ts +0 -3
  75. package/dist/widget/styles.d.ts.map +0 -1
package/dist/index.d.cts DELETED
@@ -1,166 +0,0 @@
1
- import { C as ChatClient, E as EventEmitter } from './ChatClient-DQPHdUHX.cjs';
2
- import { f as Attachment, e as ChatMessage, R as ReadStatus, A as ApiResponse } from './types-COPVrm3K.cjs';
3
- export { k as ApiError, g as ChannelSettings, h as ChannelWithSettings, C as ChatConfig, a as ChatEventMap, l as ChatReaction, b as ConnectionStatus, d as Conversation, c as CreateConversationOptions, i as CreateEphemeralChannelOptions, j as CreateLargeRoomOptions, G as GetMessagesOptions, L as ListConversationsOptions, m as MessageEditedEvent, M as MessagesResponse, P as Participant, n as PresenceMember, o as ReactionEvent, p as ReactionSummary, S as SendMessageOptions, U as UnreadTotalResponse } from './types-COPVrm3K.cjs';
4
-
5
- /**
6
- * SupportClient — High-level client for the support chat widget.
7
- *
8
- * Handles visitor session lifecycle (create/restore/refresh) and exposes
9
- * the underlying ChatClient for real-time messaging.
10
- *
11
- * Usage:
12
- * ```ts
13
- * const support = new SupportClient({ apiKey: 'pb_...', apiBaseUrl: 'https://api.scalemule.com' });
14
- * await support.initVisitorSession({ name: 'Jane' });
15
- * const conversation = await support.startConversation('Hi, I need help!', { page_url: location.href });
16
- * support.chat.on('message', (msg) => console.log(msg));
17
- * ```
18
- */
19
-
20
- interface SupportConversation {
21
- id: string;
22
- conversation_id: string;
23
- status: string;
24
- visitor_name?: string;
25
- visitor_email?: string;
26
- visitor_page_url?: string;
27
- assigned_rep_id?: string;
28
- assigned_rep_name?: string;
29
- last_message_preview?: string;
30
- last_message_at?: string;
31
- created_at: string;
32
- existing?: boolean;
33
- }
34
- interface SupportWidgetPreChatField {
35
- key: string;
36
- label: string;
37
- type: string;
38
- required: boolean;
39
- }
40
- interface SupportWidgetConfig {
41
- title: string;
42
- subtitle: string;
43
- primary_color: string;
44
- position: 'left' | 'right';
45
- pre_chat_fields: SupportWidgetPreChatField[];
46
- business_hours: Record<string, unknown>;
47
- realtime_enabled: boolean;
48
- welcome_message: string;
49
- offline_message: string;
50
- reps_online: boolean;
51
- online_count: number;
52
- }
53
- interface SupportClientConfig {
54
- apiKey: string;
55
- apiBaseUrl?: string;
56
- wsUrl?: string;
57
- }
58
- declare class SupportClient {
59
- private chatClient;
60
- private apiKey;
61
- private apiBaseUrl;
62
- private wsUrl?;
63
- private storageKey;
64
- private anonymousId;
65
- private refreshToken;
66
- private accessToken;
67
- private tokenExpiresAt;
68
- private userId;
69
- private visitorName;
70
- private visitorEmail;
71
- constructor(config: SupportClientConfig);
72
- /** Create or restore a visitor session. Call before startConversation(). */
73
- initVisitorSession(info?: {
74
- name?: string;
75
- email?: string;
76
- }): Promise<void>;
77
- /** Start a new support conversation with the first message. */
78
- startConversation(message: string, meta?: {
79
- page_url?: string;
80
- attachments?: Attachment[];
81
- metadata?: Record<string, unknown>;
82
- }): Promise<SupportConversation>;
83
- /** Get the visitor's active/waiting support conversation, if any. */
84
- getActiveConversation(): Promise<SupportConversation | null>;
85
- /** Fetch widget configuration and live support availability. */
86
- getWidgetConfig(): Promise<SupportWidgetConfig>;
87
- /** Get the underlying ChatClient for messaging, events, typing indicators, etc. */
88
- get chat(): ChatClient;
89
- /** Whether a visitor session has been initialized. */
90
- get isInitialized(): boolean;
91
- connect(): void;
92
- disconnect(): void;
93
- /** The visitor's user ID (available after initVisitorSession). */
94
- get visitorUserId(): string | null;
95
- /** Clean up all resources. */
96
- destroy(): void;
97
- private initChatClient;
98
- private refreshAccessToken;
99
- private loadState;
100
- private saveState;
101
- }
102
-
103
- interface PresenceStateMember {
104
- userId: string;
105
- status: string;
106
- userData?: unknown;
107
- }
108
- interface ChatControllerInitOptions {
109
- realtime?: boolean;
110
- presence?: boolean;
111
- }
112
- interface ChatControllerState {
113
- conversationId: string;
114
- messages: ChatMessage[];
115
- readStatuses: ReadStatus[];
116
- typingUsers: string[];
117
- members: PresenceStateMember[];
118
- hasMore: boolean;
119
- isLoading: boolean;
120
- error: string | null;
121
- }
122
- interface ChatControllerEvents {
123
- state: ChatControllerState;
124
- ready: ChatControllerState;
125
- error: {
126
- message: string;
127
- };
128
- }
129
- declare class ChatController extends EventEmitter<ChatControllerEvents> {
130
- private readonly client;
131
- private readonly conversationId;
132
- private readonly typingTimers;
133
- private unsubscribers;
134
- private state;
135
- constructor(client: ChatClient, conversationId: string);
136
- getState(): ChatControllerState;
137
- init(options?: ChatControllerInitOptions): Promise<ChatControllerState>;
138
- loadMore(): Promise<void>;
139
- sendMessage(content: string, attachments?: Attachment[]): Promise<void>;
140
- stageOptimisticMessage(message: ChatMessage): ChatMessage;
141
- uploadAttachment(file: File | Blob, onProgress?: (percent: number) => void, signal?: AbortSignal): Promise<ApiResponse<Attachment>>;
142
- refreshAttachmentUrl(messageId: string, fileId: string): Promise<ApiResponse<{
143
- url: string;
144
- }>>;
145
- addReaction(messageId: string, emoji: string): Promise<void>;
146
- removeReaction(messageId: string, emoji: string): Promise<void>;
147
- reportMessage(messageId: string, reason: 'spam' | 'harassment' | 'hate' | 'violence' | 'other', description?: string): Promise<ApiResponse<{
148
- reported: boolean;
149
- }>>;
150
- muteConversation(mutedUntil?: string): Promise<ApiResponse<{
151
- muted: boolean;
152
- }>>;
153
- unmuteConversation(): Promise<ApiResponse<{
154
- muted: boolean;
155
- }>>;
156
- markRead(): Promise<void>;
157
- refreshReadStatus(): Promise<ReadStatus[]>;
158
- sendTyping(isTyping?: boolean): void;
159
- destroy(): void;
160
- private bindEvents;
161
- private patchState;
162
- }
163
-
164
- declare const CHAT_VERSION = "0.0.7";
165
-
166
- export { ApiResponse, Attachment, CHAT_VERSION, ChatClient, ChatController, type ChatControllerState, ChatMessage, ReadStatus, SupportClient, type SupportClientConfig, type SupportConversation, type SupportWidgetConfig, type SupportWidgetPreChatField };
package/dist/index.d.ts DELETED
@@ -1,8 +0,0 @@
1
- export { ChatClient } from './core/ChatClient';
2
- export { SupportClient } from './support';
3
- export { ChatController } from './shared/ChatController';
4
- export type { SupportConversation, SupportClientConfig, SupportWidgetConfig, SupportWidgetPreChatField, } from './support';
5
- export type { ChatControllerState } from './shared/ChatController';
6
- export { CHAT_VERSION } from './version';
7
- export type { ApiError, ApiResponse, Attachment, ChannelSettings, ChannelWithSettings, ChatConfig, ChatEventMap, ChatMessage, ChatReaction, ConnectionStatus, Conversation, CreateConversationOptions, CreateEphemeralChannelOptions, CreateLargeRoomOptions, GetMessagesOptions, ListConversationsOptions, MessageEditedEvent, MessagesResponse, Participant, PresenceMember, ReactionEvent, ReactionSummary, ReadStatus, SendMessageOptions, UnreadTotalResponse, } from './types';
8
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,YAAY,EACV,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,yBAAyB,GAC1B,MAAM,WAAW,CAAC;AACnB,YAAY,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,YAAY,EACV,QAAQ,EACR,WAAW,EACX,UAAU,EACV,eAAe,EACf,mBAAmB,EACnB,UAAU,EACV,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,yBAAyB,EACzB,6BAA6B,EAC7B,sBAAsB,EACtB,kBAAkB,EAClB,wBAAwB,EACxB,kBAAkB,EAClB,gBAAgB,EAChB,WAAW,EACX,cAAc,EACd,aAAa,EACb,eAAe,EACf,UAAU,EACV,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,SAAS,CAAC"}
@@ -1,16 +0,0 @@
1
- import React from 'react';
2
- import type { Attachment } from '../types';
3
- interface ChatInputProps {
4
- onSend: (content: string, attachments: Attachment[]) => void | Promise<void>;
5
- onTypingChange?: (isTyping: boolean) => void;
6
- onUploadAttachment?: (file: File | Blob, onProgress?: (percent: number) => void, signal?: AbortSignal) => Promise<{
7
- data: Attachment | null;
8
- error: {
9
- message: string;
10
- } | null;
11
- } | undefined>;
12
- placeholder?: string;
13
- }
14
- export declare function ChatInput({ onSend, onTypingChange, onUploadAttachment, placeholder, }: ChatInputProps): React.JSX.Element;
15
- export {};
16
- //# sourceMappingURL=ChatInput.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ChatInput.d.ts","sourceRoot":"","sources":["../../src/react-components/ChatInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAEzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,UAAU,cAAc;IACtB,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7E,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,kBAAkB,CAAC,EAAE,CACnB,IAAI,EAAE,IAAI,GAAG,IAAI,EACjB,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,EACtC,MAAM,CAAC,EAAE,WAAW,KACjB,OAAO,CAAC;QAAE,IAAI,EAAE,UAAU,GAAG,IAAI,CAAC;QAAC,KAAK,EAAE;YAAE,OAAO,EAAE,MAAM,CAAA;SAAE,GAAG,IAAI,CAAA;KAAE,GAAG,SAAS,CAAC,CAAC;IACzF,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAUD,wBAAgB,SAAS,CAAC,EACxB,MAAM,EACN,cAAc,EACd,kBAAkB,EAClB,WAAiC,GAClC,EAAE,cAAc,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAmOpC"}
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- import type { ChatMessage } from '../types';
3
- interface ChatMessageItemProps {
4
- message: ChatMessage;
5
- currentUserId?: string;
6
- onAddReaction?: (messageId: string, emoji: string) => void | Promise<void>;
7
- onRemoveReaction?: (messageId: string, emoji: string) => void | Promise<void>;
8
- onReport?: (messageId: string) => void | Promise<void>;
9
- highlight?: boolean;
10
- }
11
- export declare function ChatMessageItem({ message, currentUserId, onAddReaction, onRemoveReaction, onReport, highlight, }: ChatMessageItemProps): React.JSX.Element;
12
- export {};
13
- //# sourceMappingURL=ChatMessageItem.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ChatMessageItem.d.ts","sourceRoot":"","sources":["../../src/react-components/ChatMessageItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAEjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAI5C,UAAU,oBAAoB;IAC5B,OAAO,EAAE,WAAW,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3E,gBAAgB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9E,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvD,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAyFD,wBAAgB,eAAe,CAAC,EAC9B,OAAO,EACP,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,QAAQ,EACR,SAAiB,GAClB,EAAE,oBAAoB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA2H1C"}
@@ -1,15 +0,0 @@
1
- import React from 'react';
2
- import type { ChatMessage } from '../types';
3
- interface ChatMessageListProps {
4
- messages: ChatMessage[];
5
- currentUserId?: string;
6
- unreadSince?: string;
7
- scrollToUnreadOnMount?: boolean;
8
- onAddReaction?: (messageId: string, emoji: string) => void | Promise<void>;
9
- onRemoveReaction?: (messageId: string, emoji: string) => void | Promise<void>;
10
- onReport?: (messageId: string) => void | Promise<void>;
11
- emptyState?: React.ReactNode;
12
- }
13
- export declare function ChatMessageList({ messages, currentUserId, unreadSince, scrollToUnreadOnMount, onAddReaction, onRemoveReaction, onReport, emptyState, }: ChatMessageListProps): React.JSX.Element;
14
- export {};
15
- //# sourceMappingURL=ChatMessageList.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ChatMessageList.d.ts","sourceRoot":"","sources":["../../src/react-components/ChatMessageList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+C,MAAM,OAAO,CAAC;AAEpE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAI5C,UAAU,oBAAoB;IAC5B,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3E,gBAAgB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9E,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvD,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B;AAOD,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,aAAa,EACb,WAAW,EACX,qBAA4B,EAC5B,aAAa,EACb,gBAAgB,EAChB,QAAQ,EACR,UAAU,GACX,EAAE,oBAAoB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA2J1C"}
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import type { ChatTheme } from './theme';
3
- interface ChatThreadProps {
4
- conversationId: string;
5
- theme?: ChatTheme;
6
- currentUserId?: string;
7
- title?: string;
8
- subtitle?: string;
9
- }
10
- export declare function ChatThread({ conversationId, theme, currentUserId, title, subtitle, }: ChatThreadProps): React.JSX.Element;
11
- export {};
12
- //# sourceMappingURL=ChatThread.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ChatThread.d.ts","sourceRoot":"","sources":["../../src/react-components/ChatThread.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAMlD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGzC,UAAU,eAAe;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAUD,wBAAgB,UAAU,CAAC,EACzB,cAAc,EACd,KAAK,EACL,aAAa,EACb,KAAc,EACd,QAAQ,GACT,EAAE,eAAe,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAmJrC"}
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- import type { Conversation } from '../types';
3
- import type { ChatTheme } from './theme';
4
- interface ConversationListProps {
5
- conversationType?: Conversation['conversation_type'];
6
- selectedConversationId?: string | null;
7
- onSelect?: (conversation: Conversation) => void;
8
- theme?: ChatTheme;
9
- title?: string;
10
- }
11
- export declare function ConversationList({ conversationType, selectedConversationId, onSelect, theme, title, }: ConversationListProps): React.JSX.Element;
12
- export {};
13
- //# sourceMappingURL=ConversationList.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ConversationList.d.ts","sourceRoot":"","sources":["../../src/react-components/ConversationList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAGjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGzC,UAAU,qBAAqB;IAC7B,gBAAgB,CAAC,EAAE,YAAY,CAAC,mBAAmB,CAAC,CAAC;IACrD,sBAAsB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,QAAQ,CAAC,EAAE,CAAC,YAAY,EAAE,YAAY,KAAK,IAAI,CAAC;IAChD,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAUD,wBAAgB,gBAAgB,CAAC,EAC/B,gBAAgB,EAChB,sBAAsB,EACtB,QAAQ,EACR,KAAK,EACL,KAAuB,GACxB,EAAE,qBAAqB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA4J3C"}
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- interface EmojiPickerProps {
3
- onSelect: (emoji: string) => void;
4
- emojis?: string[];
5
- }
6
- export declare function EmojiPicker({ onSelect, emojis, }: EmojiPickerProps): React.JSX.Element;
7
- export {};
8
- //# sourceMappingURL=EmojiPicker.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EmojiPicker.d.ts","sourceRoot":"","sources":["../../src/react-components/EmojiPicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,gBAAgB;IACxB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,wBAAgB,WAAW,CAAC,EAC1B,QAAQ,EACR,MAAuB,GACxB,EAAE,gBAAgB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAkCtC"}
@@ -1,8 +0,0 @@
1
- export { ChatInput } from './ChatInput';
2
- export { ChatMessageItem } from './ChatMessageItem';
3
- export { ChatMessageList } from './ChatMessageList';
4
- export { ChatThread } from './ChatThread';
5
- export { ConversationList } from './ConversationList';
6
- export { EmojiPicker } from './EmojiPicker';
7
- export type { ChatTheme } from './theme';
8
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react-components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC"}
@@ -1,19 +0,0 @@
1
- import type { CSSProperties } from 'react';
2
- export interface ChatTheme {
3
- primary?: string;
4
- ownBubble?: string;
5
- ownText?: string;
6
- otherBubble?: string;
7
- otherText?: string;
8
- surface?: string;
9
- surfaceMuted?: string;
10
- borderColor?: string;
11
- textColor?: string;
12
- mutedText?: string;
13
- borderRadius?: number | string;
14
- fontFamily?: string;
15
- }
16
- type ThemeStyle = CSSProperties & Record<string, string | number | undefined>;
17
- export declare function themeToStyle(theme?: ChatTheme): ThemeStyle;
18
- export {};
19
- //# sourceMappingURL=theme.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/react-components/theme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,MAAM,WAAW,SAAS;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,KAAK,UAAU,GAAG,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,CAAC;AAE9E,wBAAgB,YAAY,CAAC,KAAK,CAAC,EAAE,SAAS,GAAG,UAAU,CAmB1D"}
@@ -1,4 +0,0 @@
1
- export declare function formatMessageTime(value?: string): string;
2
- export declare function formatDayLabel(value?: string): string;
3
- export declare function isSameDay(left?: string, right?: string): boolean;
4
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/react-components/utils.ts"],"names":[],"mappings":"AAWA,wBAAgB,iBAAiB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAGxD;AAED,wBAAgB,cAAc,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAGrD;AAED,wBAAgB,SAAS,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAUhE"}
package/dist/react.d.cts DELETED
@@ -1,145 +0,0 @@
1
- import { f as Attachment, e as ChatMessage, d as Conversation, C as ChatConfig, R as ReadStatus, S as SendMessageOptions, A as ApiResponse, b as ConnectionStatus } from './types-COPVrm3K.cjs';
2
- export { G as GetMessagesOptions, L as ListConversationsOptions, M as MessagesResponse, p as ReactionSummary, U as UnreadTotalResponse } from './types-COPVrm3K.cjs';
3
- import React, { ReactNode } from 'react';
4
- import { C as ChatClient } from './ChatClient-DQPHdUHX.cjs';
5
-
6
- interface ChatInputProps {
7
- onSend: (content: string, attachments: Attachment[]) => void | Promise<void>;
8
- onTypingChange?: (isTyping: boolean) => void;
9
- onUploadAttachment?: (file: File | Blob, onProgress?: (percent: number) => void, signal?: AbortSignal) => Promise<{
10
- data: Attachment | null;
11
- error: {
12
- message: string;
13
- } | null;
14
- } | undefined>;
15
- placeholder?: string;
16
- }
17
- declare function ChatInput({ onSend, onTypingChange, onUploadAttachment, placeholder, }: ChatInputProps): React.JSX.Element;
18
-
19
- interface ChatMessageItemProps {
20
- message: ChatMessage;
21
- currentUserId?: string;
22
- onAddReaction?: (messageId: string, emoji: string) => void | Promise<void>;
23
- onRemoveReaction?: (messageId: string, emoji: string) => void | Promise<void>;
24
- onReport?: (messageId: string) => void | Promise<void>;
25
- highlight?: boolean;
26
- }
27
- declare function ChatMessageItem({ message, currentUserId, onAddReaction, onRemoveReaction, onReport, highlight, }: ChatMessageItemProps): React.JSX.Element;
28
-
29
- interface ChatMessageListProps {
30
- messages: ChatMessage[];
31
- currentUserId?: string;
32
- unreadSince?: string;
33
- scrollToUnreadOnMount?: boolean;
34
- onAddReaction?: (messageId: string, emoji: string) => void | Promise<void>;
35
- onRemoveReaction?: (messageId: string, emoji: string) => void | Promise<void>;
36
- onReport?: (messageId: string) => void | Promise<void>;
37
- emptyState?: React.ReactNode;
38
- }
39
- declare function ChatMessageList({ messages, currentUserId, unreadSince, scrollToUnreadOnMount, onAddReaction, onRemoveReaction, onReport, emptyState, }: ChatMessageListProps): React.JSX.Element;
40
-
41
- interface ChatTheme {
42
- primary?: string;
43
- ownBubble?: string;
44
- ownText?: string;
45
- otherBubble?: string;
46
- otherText?: string;
47
- surface?: string;
48
- surfaceMuted?: string;
49
- borderColor?: string;
50
- textColor?: string;
51
- mutedText?: string;
52
- borderRadius?: number | string;
53
- fontFamily?: string;
54
- }
55
-
56
- interface ChatThreadProps {
57
- conversationId: string;
58
- theme?: ChatTheme;
59
- currentUserId?: string;
60
- title?: string;
61
- subtitle?: string;
62
- }
63
- declare function ChatThread({ conversationId, theme, currentUserId, title, subtitle, }: ChatThreadProps): React.JSX.Element;
64
-
65
- interface ConversationListProps {
66
- conversationType?: Conversation['conversation_type'];
67
- selectedConversationId?: string | null;
68
- onSelect?: (conversation: Conversation) => void;
69
- theme?: ChatTheme;
70
- title?: string;
71
- }
72
- declare function ConversationList({ conversationType, selectedConversationId, onSelect, theme, title, }: ConversationListProps): React.JSX.Element;
73
-
74
- interface EmojiPickerProps {
75
- onSelect: (emoji: string) => void;
76
- emojis?: string[];
77
- }
78
- declare function EmojiPicker({ onSelect, emojis, }: EmojiPickerProps): React.JSX.Element;
79
-
80
- interface ChatProviderProps {
81
- config: ChatConfig;
82
- children: ReactNode;
83
- }
84
- declare function ChatProvider({ config, children }: ChatProviderProps): React.JSX.Element;
85
- /** Direct access to the ChatClient instance for custom event subscriptions (e.g., support:new). */
86
- declare function useChatClient(): ChatClient;
87
- declare function useChatConfig(): ChatConfig;
88
- declare function useConnection(): {
89
- status: ConnectionStatus;
90
- connect: () => void;
91
- disconnect: () => void;
92
- };
93
- declare function useChat(conversationId?: string): {
94
- messages: ChatMessage[];
95
- readStatuses: ReadStatus[];
96
- isLoading: boolean;
97
- error: string | null;
98
- hasMore: boolean;
99
- sendMessage: (content: string, options?: Partial<SendMessageOptions>) => Promise<ApiResponse<ChatMessage> | undefined>;
100
- loadMore: () => Promise<void>;
101
- editMessage: (messageId: string, content: string) => Promise<ApiResponse<void>>;
102
- deleteMessage: (messageId: string) => Promise<ApiResponse<void>>;
103
- addReaction: (messageId: string, emoji: string) => Promise<ApiResponse<void>>;
104
- removeReaction: (messageId: string, emoji: string) => Promise<ApiResponse<void>>;
105
- uploadAttachment: (file: File | Blob, onProgress?: (percent: number) => void, signal?: AbortSignal) => Promise<ApiResponse<Attachment>>;
106
- refreshAttachmentUrl: (messageId: string, fileId: string) => Promise<ApiResponse<{
107
- url: string;
108
- }>>;
109
- reportMessage: (messageId: string, reason: "spam" | "harassment" | "hate" | "violence" | "other", description?: string) => Promise<ApiResponse<{
110
- reported: boolean;
111
- }>>;
112
- muteConversation: (mutedUntil?: string) => Promise<ApiResponse<{
113
- muted: boolean;
114
- }> | undefined>;
115
- unmuteConversation: () => Promise<ApiResponse<{
116
- muted: boolean;
117
- }> | undefined>;
118
- getReadStatus: () => Promise<ApiResponse<{
119
- statuses: ReadStatus[];
120
- }> | undefined>;
121
- markRead: () => Promise<void>;
122
- };
123
- declare function usePresence(conversationId?: string): {
124
- members: {
125
- userId: string;
126
- status: string;
127
- userData?: unknown;
128
- }[];
129
- };
130
- declare function useTyping(conversationId?: string): {
131
- typingUsers: string[];
132
- sendTyping: (isTyping?: boolean) => void;
133
- };
134
- declare function useConversations(options?: {
135
- conversationType?: string;
136
- }): {
137
- conversations: Conversation[];
138
- isLoading: boolean;
139
- refresh: () => Promise<void>;
140
- };
141
- declare function useUnreadCount(): {
142
- totalUnread: number;
143
- };
144
-
145
- export { ApiResponse, ChatClient, ChatConfig, ChatInput, ChatMessage, ChatMessageItem, ChatMessageList, ChatProvider, type ChatTheme, ChatThread, ConnectionStatus, Conversation, ConversationList, EmojiPicker, ReadStatus, SendMessageOptions, useChat, useChatClient, useChatConfig, useConnection, useConversations, usePresence, useTyping, useUnreadCount };
package/dist/react.d.ts DELETED
@@ -1,72 +0,0 @@
1
- import React, { type ReactNode } from 'react';
2
- import { ChatClient } from './core/ChatClient';
3
- import type { ChatConfig, ChatMessage, ConnectionStatus, Conversation, ApiResponse, ReadStatus, SendMessageOptions } from './types';
4
- interface ChatProviderProps {
5
- config: ChatConfig;
6
- children: ReactNode;
7
- }
8
- export declare function ChatProvider({ config, children }: ChatProviderProps): React.JSX.Element;
9
- /** Direct access to the ChatClient instance for custom event subscriptions (e.g., support:new). */
10
- export declare function useChatClient(): ChatClient;
11
- export declare function useChatConfig(): ChatConfig;
12
- export declare function useConnection(): {
13
- status: ConnectionStatus;
14
- connect: () => void;
15
- disconnect: () => void;
16
- };
17
- export declare function useChat(conversationId?: string): {
18
- messages: ChatMessage[];
19
- readStatuses: ReadStatus[];
20
- isLoading: boolean;
21
- error: string | null;
22
- hasMore: boolean;
23
- sendMessage: (content: string, options?: Partial<SendMessageOptions>) => Promise<ApiResponse<ChatMessage> | undefined>;
24
- loadMore: () => Promise<void>;
25
- editMessage: (messageId: string, content: string) => Promise<ApiResponse<void>>;
26
- deleteMessage: (messageId: string) => Promise<ApiResponse<void>>;
27
- addReaction: (messageId: string, emoji: string) => Promise<ApiResponse<void>>;
28
- removeReaction: (messageId: string, emoji: string) => Promise<ApiResponse<void>>;
29
- uploadAttachment: (file: File | Blob, onProgress?: (percent: number) => void, signal?: AbortSignal) => Promise<ApiResponse<import("./types").Attachment>>;
30
- refreshAttachmentUrl: (messageId: string, fileId: string) => Promise<ApiResponse<{
31
- url: string;
32
- }>>;
33
- reportMessage: (messageId: string, reason: "spam" | "harassment" | "hate" | "violence" | "other", description?: string) => Promise<ApiResponse<{
34
- reported: boolean;
35
- }>>;
36
- muteConversation: (mutedUntil?: string) => Promise<ApiResponse<{
37
- muted: boolean;
38
- }> | undefined>;
39
- unmuteConversation: () => Promise<ApiResponse<{
40
- muted: boolean;
41
- }> | undefined>;
42
- getReadStatus: () => Promise<ApiResponse<{
43
- statuses: ReadStatus[];
44
- }> | undefined>;
45
- markRead: () => Promise<void>;
46
- };
47
- export declare function usePresence(conversationId?: string): {
48
- members: {
49
- userId: string;
50
- status: string;
51
- userData?: unknown;
52
- }[];
53
- };
54
- export declare function useTyping(conversationId?: string): {
55
- typingUsers: string[];
56
- sendTyping: (isTyping?: boolean) => void;
57
- };
58
- export declare function useConversations(options?: {
59
- conversationType?: string;
60
- }): {
61
- conversations: Conversation[];
62
- isLoading: boolean;
63
- refresh: () => Promise<void>;
64
- };
65
- export declare function useUnreadCount(): {
66
- totalUnread: number;
67
- };
68
- export { ChatInput, ChatMessageItem, ChatMessageList, ChatThread, ConversationList, EmojiPicker, } from './react-components';
69
- export { ChatClient } from './core/ChatClient';
70
- export type { ChatConfig, ChatMessage, ConnectionStatus, Conversation, ApiResponse, SendMessageOptions, GetMessagesOptions, MessagesResponse, ReadStatus, ReactionSummary, UnreadTotalResponse, ListConversationsOptions, } from './types';
71
- export type { ChatTheme } from './react-components';
72
- //# sourceMappingURL=react.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../src/react.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAOZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,UAAU,EACV,kBAAkB,EAGnB,MAAM,SAAS,CAAC;AAmBjB,UAAU,iBAAiB;IACzB,MAAM,EAAE,UAAU,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,YAAY,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,iBAAiB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAUvF;AAID,mGAAmG;AACnG,wBAAgB,aAAa,IAAI,UAAU,CAE1C;AAED,wBAAgB,aAAa,IAAI,UAAU,CAE1C;AAID,wBAAgB,aAAa,IAAI;IAAE,MAAM,EAAE,gBAAgB,CAAC;IAAC,OAAO,EAAE,MAAM,IAAI,CAAC;IAAC,UAAU,EAAE,MAAM,IAAI,CAAA;CAAE,CAoBzG;AAED,wBAAgB,OAAO,CAAC,cAAc,CAAC,EAAE,MAAM;;;;;;2BAuH3B,MAAM,YAAY,OAAO,CAAC,kBAAkB,CAAC;;6BAkB3C,MAAM,WAAW,MAAM;+BAWvB,MAAM;6BAWN,MAAM,SAAS,MAAM;gCAWrB,MAAM,SAAS,MAAM;6BAW1B,IAAI,GAAG,IAAI,eAAe,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,WAAW,WAAW;sCAWpE,MAAM,UAAU,MAAM;;;+BAY3B,MAAM,UACT,MAAM,GAAG,YAAY,GAAG,MAAM,GAAG,UAAU,GAAG,OAAO,gBAC/C,MAAM;;;oCAYF,MAAM;;;;;;;;;;EAyD7B;AAED,wBAAgB,WAAW,CAAC,cAAc,CAAC,EAAE,MAAM;;gBAGrC,MAAM;gBAAU,MAAM;mBAAa,OAAO;;EAmEvD;AAED,wBAAgB,SAAS,CAAC,cAAc,CAAC,EAAE,MAAM;;;EAqDhD;AAID,wBAAgB,gBAAgB,CAAC,OAAO,CAAC,EAAE;IAAE,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAAE;;;;EA+CvE;AAID,wBAAgB,cAAc;;EAmC7B;AAED,OAAO,EACL,SAAS,EACT,eAAe,EACf,eAAe,EACf,UAAU,EACV,gBAAgB,EAChB,WAAW,GACZ,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,YAAY,EACV,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,UAAU,EACV,eAAe,EACf,mBAAmB,EACnB,wBAAwB,GACzB,MAAM,SAAS,CAAC;AACjB,YAAY,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC"}
@@ -1,65 +0,0 @@
1
- import { EventEmitter } from '../core/EventEmitter';
2
- import type { ChatClient } from '../core/ChatClient';
3
- import type { ChatMessage, ReadStatus, Attachment } from '../types';
4
- interface PresenceStateMember {
5
- userId: string;
6
- status: string;
7
- userData?: unknown;
8
- }
9
- interface ChatControllerInitOptions {
10
- realtime?: boolean;
11
- presence?: boolean;
12
- }
13
- export interface ChatControllerState {
14
- conversationId: string;
15
- messages: ChatMessage[];
16
- readStatuses: ReadStatus[];
17
- typingUsers: string[];
18
- members: PresenceStateMember[];
19
- hasMore: boolean;
20
- isLoading: boolean;
21
- error: string | null;
22
- }
23
- interface ChatControllerEvents {
24
- state: ChatControllerState;
25
- ready: ChatControllerState;
26
- error: {
27
- message: string;
28
- };
29
- }
30
- export declare class ChatController extends EventEmitter<ChatControllerEvents> {
31
- private readonly client;
32
- private readonly conversationId;
33
- private readonly typingTimers;
34
- private unsubscribers;
35
- private state;
36
- constructor(client: ChatClient, conversationId: string);
37
- getState(): ChatControllerState;
38
- init(options?: ChatControllerInitOptions): Promise<ChatControllerState>;
39
- loadMore(): Promise<void>;
40
- sendMessage(content: string, attachments?: Attachment[]): Promise<void>;
41
- stageOptimisticMessage(message: ChatMessage): ChatMessage;
42
- uploadAttachment(file: File | Blob, onProgress?: (percent: number) => void, signal?: AbortSignal): Promise<import("..").ApiResponse<Attachment>>;
43
- refreshAttachmentUrl(messageId: string, fileId: string): Promise<import("..").ApiResponse<{
44
- url: string;
45
- }>>;
46
- addReaction(messageId: string, emoji: string): Promise<void>;
47
- removeReaction(messageId: string, emoji: string): Promise<void>;
48
- reportMessage(messageId: string, reason: 'spam' | 'harassment' | 'hate' | 'violence' | 'other', description?: string): Promise<import("..").ApiResponse<{
49
- reported: boolean;
50
- }>>;
51
- muteConversation(mutedUntil?: string): Promise<import("..").ApiResponse<{
52
- muted: boolean;
53
- }>>;
54
- unmuteConversation(): Promise<import("..").ApiResponse<{
55
- muted: boolean;
56
- }>>;
57
- markRead(): Promise<void>;
58
- refreshReadStatus(): Promise<ReadStatus[]>;
59
- sendTyping(isTyping?: boolean): void;
60
- destroy(): void;
61
- private bindEvents;
62
- private patchState;
63
- }
64
- export {};
65
- //# sourceMappingURL=ChatController.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ChatController.d.ts","sourceRoot":"","sources":["../../src/shared/ChatController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEpE,UAAU,mBAAmB;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,UAAU,yBAAyB;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,mBAAmB;IAClC,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,YAAY,EAAE,UAAU,EAAE,CAAC;IAC3B,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,OAAO,EAAE,mBAAmB,EAAE,CAAC;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,UAAU,oBAAoB;IAC5B,KAAK,EAAE,mBAAmB,CAAC;IAC3B,KAAK,EAAE,mBAAmB,CAAC;IAC3B,KAAK,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CAC5B;AAED,qBAAa,cAAe,SAAQ,YAAY,CAAC,oBAAoB,CAAC;IACpE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAa;IACpC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAS;IACxC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAoD;IACjF,OAAO,CAAC,aAAa,CAAyB;IAC9C,OAAO,CAAC,KAAK,CAAsB;gBAEvB,MAAM,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM;IAgBtD,QAAQ,IAAI,mBAAmB;IAIzB,IAAI,CAAC,OAAO,GAAE,yBAA8B,GAAG,OAAO,CAAC,mBAAmB,CAAC;IA8C3E,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAezB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,GAAE,UAAU,EAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAmBjF,sBAAsB,CAAC,OAAO,EAAE,WAAW,GAAG,WAAW;IAQnD,gBAAgB,CACpB,IAAI,EAAE,IAAI,GAAG,IAAI,EACjB,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,EACtC,MAAM,CAAC,EAAE,WAAW;IAKhB,oBAAoB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;;;IAItD,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAO5D,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAO/D,aAAa,CACjB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,MAAM,GAAG,UAAU,GAAG,OAAO,EAC7D,WAAW,CAAC,EAAE,MAAM;;;IAKhB,gBAAgB,CAAC,UAAU,CAAC,EAAE,MAAM;;;IAIpC,kBAAkB;;;IAIlB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAIzB,iBAAiB,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;IAchD,UAAU,CAAC,QAAQ,UAAO,GAAG,IAAI;IAIjC,OAAO,IAAI,IAAI;IAaf,OAAO,CAAC,UAAU;IAwIlB,OAAO,CAAC,UAAU;CAQnB"}
@@ -1,3 +0,0 @@
1
- import type { ApiResponse } from '../types';
2
- export declare function uploadToPresignedUrl(url: string, file: Blob, onProgress?: (percent: number) => void, signal?: AbortSignal): Promise<ApiResponse<null>>;
3
- //# sourceMappingURL=upload.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../src/shared/upload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAkK5C,wBAAsB,oBAAoB,CACxC,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,IAAI,EACV,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,EACtC,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAkC5B"}