@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.
- package/dist/react.cjs +159 -111
- package/dist/react.js +83 -35
- package/package.json +1 -1
- package/dist/ChatClient-DQPHdUHX.d.cts +0 -107
- package/dist/ChatClient-DtUKF-4c.d.ts +0 -107
- package/dist/constants.d.ts +0 -9
- package/dist/constants.d.ts.map +0 -1
- package/dist/core/ChatClient.d.ts +0 -96
- package/dist/core/ChatClient.d.ts.map +0 -1
- package/dist/core/EventEmitter.d.ts +0 -11
- package/dist/core/EventEmitter.d.ts.map +0 -1
- package/dist/core/MessageCache.d.ts +0 -18
- package/dist/core/MessageCache.d.ts.map +0 -1
- package/dist/core/OfflineQueue.d.ts +0 -19
- package/dist/core/OfflineQueue.d.ts.map +0 -1
- package/dist/element.d.cts +0 -2
- package/dist/element.d.ts +0 -2
- package/dist/element.d.ts.map +0 -1
- package/dist/embed/index.d.ts +0 -2
- package/dist/embed/index.d.ts.map +0 -1
- package/dist/factory.d.ts +0 -8
- package/dist/factory.d.ts.map +0 -1
- package/dist/iframe.d.cts +0 -17
- package/dist/iframe.d.ts +0 -15
- package/dist/iframe.d.ts.map +0 -1
- package/dist/index.d.cts +0 -166
- package/dist/index.d.ts +0 -8
- package/dist/index.d.ts.map +0 -1
- package/dist/react-components/ChatInput.d.ts +0 -16
- package/dist/react-components/ChatInput.d.ts.map +0 -1
- package/dist/react-components/ChatMessageItem.d.ts +0 -13
- package/dist/react-components/ChatMessageItem.d.ts.map +0 -1
- package/dist/react-components/ChatMessageList.d.ts +0 -15
- package/dist/react-components/ChatMessageList.d.ts.map +0 -1
- package/dist/react-components/ChatThread.d.ts +0 -12
- package/dist/react-components/ChatThread.d.ts.map +0 -1
- package/dist/react-components/ConversationList.d.ts +0 -13
- package/dist/react-components/ConversationList.d.ts.map +0 -1
- package/dist/react-components/EmojiPicker.d.ts +0 -8
- package/dist/react-components/EmojiPicker.d.ts.map +0 -1
- package/dist/react-components/index.d.ts +0 -8
- package/dist/react-components/index.d.ts.map +0 -1
- package/dist/react-components/theme.d.ts +0 -19
- package/dist/react-components/theme.d.ts.map +0 -1
- package/dist/react-components/utils.d.ts +0 -4
- package/dist/react-components/utils.d.ts.map +0 -1
- package/dist/react.d.cts +0 -145
- package/dist/react.d.ts +0 -72
- package/dist/react.d.ts.map +0 -1
- package/dist/shared/ChatController.d.ts +0 -65
- package/dist/shared/ChatController.d.ts.map +0 -1
- package/dist/shared/upload.d.ts +0 -3
- package/dist/shared/upload.d.ts.map +0 -1
- package/dist/support.d.ts +0 -99
- package/dist/support.d.ts.map +0 -1
- package/dist/transport/HttpTransport.d.ts +0 -20
- package/dist/transport/HttpTransport.d.ts.map +0 -1
- package/dist/transport/WebSocketTransport.d.ts +0 -78
- package/dist/transport/WebSocketTransport.d.ts.map +0 -1
- package/dist/types-COPVrm3K.d.cts +0 -256
- package/dist/types-COPVrm3K.d.ts +0 -256
- package/dist/types.d.ts +0 -271
- package/dist/types.d.ts.map +0 -1
- package/dist/umd.d.ts +0 -6
- package/dist/umd.d.ts.map +0 -1
- package/dist/version.d.ts +0 -2
- package/dist/version.d.ts.map +0 -1
- package/dist/widget/icons.d.ts +0 -8
- package/dist/widget/icons.d.ts.map +0 -1
- package/dist/widget/index.d.ts +0 -2
- package/dist/widget/index.d.ts.map +0 -1
- package/dist/widget/storage.d.ts +0 -5
- package/dist/widget/storage.d.ts.map +0 -1
- package/dist/widget/styles.d.ts +0 -3
- package/dist/widget/styles.d.ts.map +0 -1
package/dist/types-COPVrm3K.d.ts
DELETED
|
@@ -1,256 +0,0 @@
|
|
|
1
|
-
interface ChatConfig {
|
|
2
|
-
apiKey?: string;
|
|
3
|
-
embedToken?: string;
|
|
4
|
-
apiBaseUrl?: string;
|
|
5
|
-
wsUrl?: string;
|
|
6
|
-
applicationId?: string;
|
|
7
|
-
userId?: string;
|
|
8
|
-
sessionToken?: string;
|
|
9
|
-
getToken?: () => Promise<string | null>;
|
|
10
|
-
debug?: boolean;
|
|
11
|
-
reconnect?: {
|
|
12
|
-
maxRetries?: number;
|
|
13
|
-
baseDelay?: number;
|
|
14
|
-
maxDelay?: number;
|
|
15
|
-
};
|
|
16
|
-
messageCache?: {
|
|
17
|
-
maxMessages?: number;
|
|
18
|
-
maxConversations?: number;
|
|
19
|
-
};
|
|
20
|
-
offlineQueue?: boolean;
|
|
21
|
-
}
|
|
22
|
-
interface ApiResponse<T> {
|
|
23
|
-
data: T | null;
|
|
24
|
-
error: ApiError | null;
|
|
25
|
-
}
|
|
26
|
-
interface ApiError {
|
|
27
|
-
code: string;
|
|
28
|
-
message: string;
|
|
29
|
-
status: number;
|
|
30
|
-
details?: Record<string, unknown>;
|
|
31
|
-
}
|
|
32
|
-
interface Conversation {
|
|
33
|
-
id: string;
|
|
34
|
-
conversation_type: 'direct' | 'group' | 'broadcast' | 'ephemeral' | 'large_room' | 'support';
|
|
35
|
-
name?: string;
|
|
36
|
-
created_by?: string;
|
|
37
|
-
participant_count?: number;
|
|
38
|
-
last_message_at?: string;
|
|
39
|
-
unread_count?: number;
|
|
40
|
-
is_muted?: boolean;
|
|
41
|
-
last_message_preview?: string;
|
|
42
|
-
last_message_sender_id?: string;
|
|
43
|
-
counterparty_user_id?: string;
|
|
44
|
-
created_at: string;
|
|
45
|
-
participants?: Participant[];
|
|
46
|
-
}
|
|
47
|
-
interface Participant {
|
|
48
|
-
user_id: string;
|
|
49
|
-
role: string;
|
|
50
|
-
joined_at: string;
|
|
51
|
-
}
|
|
52
|
-
interface ChatMessage {
|
|
53
|
-
id: string;
|
|
54
|
-
content: string;
|
|
55
|
-
message_type: 'text' | 'image' | 'file' | 'system';
|
|
56
|
-
sender_id: string;
|
|
57
|
-
sender_type?: string;
|
|
58
|
-
sender_agent_model?: string;
|
|
59
|
-
attachments?: Attachment[];
|
|
60
|
-
reactions?: ReactionSummary[];
|
|
61
|
-
is_edited: boolean;
|
|
62
|
-
created_at: string;
|
|
63
|
-
}
|
|
64
|
-
interface ReactionSummary {
|
|
65
|
-
emoji: string;
|
|
66
|
-
count: number;
|
|
67
|
-
user_ids: string[];
|
|
68
|
-
}
|
|
69
|
-
interface Attachment {
|
|
70
|
-
file_id: string;
|
|
71
|
-
file_name: string;
|
|
72
|
-
file_size: number;
|
|
73
|
-
mime_type: string;
|
|
74
|
-
presigned_url?: string;
|
|
75
|
-
thumbnail_url?: string;
|
|
76
|
-
}
|
|
77
|
-
interface ReadStatus {
|
|
78
|
-
user_id: string;
|
|
79
|
-
last_read_at?: string;
|
|
80
|
-
}
|
|
81
|
-
interface ChatReaction {
|
|
82
|
-
id: string;
|
|
83
|
-
message_id: string;
|
|
84
|
-
user_id: string;
|
|
85
|
-
emoji: string;
|
|
86
|
-
action?: 'added' | 'removed';
|
|
87
|
-
timestamp?: string;
|
|
88
|
-
}
|
|
89
|
-
interface MessageEditedEvent {
|
|
90
|
-
id?: string;
|
|
91
|
-
message_id: string;
|
|
92
|
-
conversation_id: string;
|
|
93
|
-
content?: string;
|
|
94
|
-
new_content?: string;
|
|
95
|
-
editor_user_id?: string;
|
|
96
|
-
is_edited?: boolean;
|
|
97
|
-
updated_at?: string;
|
|
98
|
-
timestamp?: string;
|
|
99
|
-
}
|
|
100
|
-
interface ReactionEvent {
|
|
101
|
-
message_id: string;
|
|
102
|
-
conversation_id?: string;
|
|
103
|
-
user_id: string;
|
|
104
|
-
emoji: string;
|
|
105
|
-
action: 'added' | 'removed';
|
|
106
|
-
timestamp?: string;
|
|
107
|
-
}
|
|
108
|
-
interface PresenceMember {
|
|
109
|
-
user_id: string;
|
|
110
|
-
user_data?: unknown;
|
|
111
|
-
joined_at: string;
|
|
112
|
-
}
|
|
113
|
-
interface ChannelSettings {
|
|
114
|
-
publisher_user_ids?: string[];
|
|
115
|
-
linked_session_id?: string;
|
|
116
|
-
expires_at?: string;
|
|
117
|
-
max_participants?: number;
|
|
118
|
-
slow_mode_seconds?: number;
|
|
119
|
-
}
|
|
120
|
-
interface ChannelWithSettings {
|
|
121
|
-
id: string;
|
|
122
|
-
channel_type: string;
|
|
123
|
-
name?: string;
|
|
124
|
-
created_at: string;
|
|
125
|
-
linked_session_id?: string;
|
|
126
|
-
expires_at?: string;
|
|
127
|
-
participant_count: number;
|
|
128
|
-
}
|
|
129
|
-
interface CreateEphemeralChannelOptions {
|
|
130
|
-
linked_session_id: string;
|
|
131
|
-
name?: string;
|
|
132
|
-
ttl_minutes?: number;
|
|
133
|
-
}
|
|
134
|
-
interface CreateLargeRoomOptions {
|
|
135
|
-
name: string;
|
|
136
|
-
linked_session_id?: string;
|
|
137
|
-
max_participants?: number;
|
|
138
|
-
slow_mode_seconds?: number;
|
|
139
|
-
}
|
|
140
|
-
interface ChatEventMap {
|
|
141
|
-
connected: void;
|
|
142
|
-
disconnected: void;
|
|
143
|
-
reconnecting: {
|
|
144
|
-
attempt: number;
|
|
145
|
-
};
|
|
146
|
-
'message': {
|
|
147
|
-
message: ChatMessage;
|
|
148
|
-
conversationId: string;
|
|
149
|
-
};
|
|
150
|
-
'message:updated': {
|
|
151
|
-
message: ChatMessage;
|
|
152
|
-
conversationId: string;
|
|
153
|
-
update?: MessageEditedEvent;
|
|
154
|
-
};
|
|
155
|
-
'message:deleted': {
|
|
156
|
-
messageId: string;
|
|
157
|
-
conversationId: string;
|
|
158
|
-
};
|
|
159
|
-
'typing': {
|
|
160
|
-
userId: string;
|
|
161
|
-
conversationId: string;
|
|
162
|
-
};
|
|
163
|
-
'typing:stop': {
|
|
164
|
-
userId: string;
|
|
165
|
-
conversationId: string;
|
|
166
|
-
};
|
|
167
|
-
'presence:join': {
|
|
168
|
-
userId: string;
|
|
169
|
-
conversationId: string;
|
|
170
|
-
userData?: unknown;
|
|
171
|
-
};
|
|
172
|
-
'presence:leave': {
|
|
173
|
-
userId: string;
|
|
174
|
-
conversationId: string;
|
|
175
|
-
};
|
|
176
|
-
'presence:update': {
|
|
177
|
-
userId: string;
|
|
178
|
-
conversationId: string;
|
|
179
|
-
status: string;
|
|
180
|
-
userData?: unknown;
|
|
181
|
-
};
|
|
182
|
-
'presence:state': {
|
|
183
|
-
conversationId: string;
|
|
184
|
-
members: PresenceMember[];
|
|
185
|
-
};
|
|
186
|
-
'read': {
|
|
187
|
-
userId: string;
|
|
188
|
-
conversationId: string;
|
|
189
|
-
lastReadAt: string;
|
|
190
|
-
};
|
|
191
|
-
'reaction': {
|
|
192
|
-
reaction: ChatReaction;
|
|
193
|
-
conversationId: string;
|
|
194
|
-
action: 'added' | 'removed';
|
|
195
|
-
};
|
|
196
|
-
'room_upgraded': {
|
|
197
|
-
conversationId: string;
|
|
198
|
-
newType: 'large_room';
|
|
199
|
-
};
|
|
200
|
-
'delivery': {
|
|
201
|
-
messageId: string;
|
|
202
|
-
status: 'sent' | 'delivered' | 'read';
|
|
203
|
-
};
|
|
204
|
-
'inbox:update': {
|
|
205
|
-
conversationId: string;
|
|
206
|
-
messageId: string;
|
|
207
|
-
senderId: string;
|
|
208
|
-
preview: string;
|
|
209
|
-
};
|
|
210
|
-
'support:new': {
|
|
211
|
-
conversationId: string;
|
|
212
|
-
visitorName?: string;
|
|
213
|
-
};
|
|
214
|
-
'support:assigned': {
|
|
215
|
-
conversationId: string;
|
|
216
|
-
visitorName?: string;
|
|
217
|
-
visitorEmail?: string;
|
|
218
|
-
};
|
|
219
|
-
'error': {
|
|
220
|
-
code: string;
|
|
221
|
-
message: string;
|
|
222
|
-
};
|
|
223
|
-
}
|
|
224
|
-
type ConnectionStatus = 'disconnected' | 'connecting' | 'connected' | 'reconnecting';
|
|
225
|
-
interface SendMessageOptions {
|
|
226
|
-
content: string;
|
|
227
|
-
message_type?: 'text' | 'image' | 'file';
|
|
228
|
-
attachments?: Attachment[];
|
|
229
|
-
}
|
|
230
|
-
interface ListConversationsOptions {
|
|
231
|
-
page?: number;
|
|
232
|
-
per_page?: number;
|
|
233
|
-
conversation_type?: 'direct' | 'group' | 'broadcast' | 'ephemeral' | 'large_room' | 'support';
|
|
234
|
-
}
|
|
235
|
-
interface UnreadTotalResponse {
|
|
236
|
-
unread_conversations: number;
|
|
237
|
-
unread_messages: number;
|
|
238
|
-
}
|
|
239
|
-
interface GetMessagesOptions {
|
|
240
|
-
limit?: number;
|
|
241
|
-
before?: string;
|
|
242
|
-
after?: string;
|
|
243
|
-
}
|
|
244
|
-
interface CreateConversationOptions {
|
|
245
|
-
conversation_type?: 'direct' | 'group';
|
|
246
|
-
name?: string;
|
|
247
|
-
participant_ids: string[];
|
|
248
|
-
}
|
|
249
|
-
interface MessagesResponse {
|
|
250
|
-
messages: ChatMessage[];
|
|
251
|
-
has_more?: boolean;
|
|
252
|
-
oldest_id?: string;
|
|
253
|
-
newest_id?: string;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
export type { ApiResponse as A, ChatConfig as C, GetMessagesOptions as G, ListConversationsOptions as L, MessagesResponse as M, Participant as P, ReadStatus as R, SendMessageOptions as S, UnreadTotalResponse as U, ChatEventMap as a, ConnectionStatus as b, CreateConversationOptions as c, Conversation as d, ChatMessage as e, Attachment as f, ChannelSettings as g, ChannelWithSettings as h, CreateEphemeralChannelOptions as i, CreateLargeRoomOptions as j, ApiError as k, ChatReaction as l, MessageEditedEvent as m, PresenceMember as n, ReactionEvent as o, ReactionSummary as p };
|
package/dist/types.d.ts
DELETED
|
@@ -1,271 +0,0 @@
|
|
|
1
|
-
export interface ChatConfig {
|
|
2
|
-
apiKey?: string;
|
|
3
|
-
embedToken?: string;
|
|
4
|
-
apiBaseUrl?: string;
|
|
5
|
-
wsUrl?: string;
|
|
6
|
-
applicationId?: string;
|
|
7
|
-
userId?: string;
|
|
8
|
-
sessionToken?: string;
|
|
9
|
-
getToken?: () => Promise<string | null>;
|
|
10
|
-
debug?: boolean;
|
|
11
|
-
reconnect?: {
|
|
12
|
-
maxRetries?: number;
|
|
13
|
-
baseDelay?: number;
|
|
14
|
-
maxDelay?: number;
|
|
15
|
-
};
|
|
16
|
-
messageCache?: {
|
|
17
|
-
maxMessages?: number;
|
|
18
|
-
maxConversations?: number;
|
|
19
|
-
};
|
|
20
|
-
offlineQueue?: boolean;
|
|
21
|
-
}
|
|
22
|
-
export interface ApiResponse<T> {
|
|
23
|
-
data: T | null;
|
|
24
|
-
error: ApiError | null;
|
|
25
|
-
}
|
|
26
|
-
export interface ApiError {
|
|
27
|
-
code: string;
|
|
28
|
-
message: string;
|
|
29
|
-
status: number;
|
|
30
|
-
details?: Record<string, unknown>;
|
|
31
|
-
}
|
|
32
|
-
export interface Conversation {
|
|
33
|
-
id: string;
|
|
34
|
-
conversation_type: 'direct' | 'group' | 'broadcast' | 'ephemeral' | 'large_room' | 'support';
|
|
35
|
-
name?: string;
|
|
36
|
-
created_by?: string;
|
|
37
|
-
participant_count?: number;
|
|
38
|
-
last_message_at?: string;
|
|
39
|
-
unread_count?: number;
|
|
40
|
-
is_muted?: boolean;
|
|
41
|
-
last_message_preview?: string;
|
|
42
|
-
last_message_sender_id?: string;
|
|
43
|
-
counterparty_user_id?: string;
|
|
44
|
-
created_at: string;
|
|
45
|
-
participants?: Participant[];
|
|
46
|
-
}
|
|
47
|
-
export interface Participant {
|
|
48
|
-
user_id: string;
|
|
49
|
-
role: string;
|
|
50
|
-
joined_at: string;
|
|
51
|
-
}
|
|
52
|
-
export interface ChatMessage {
|
|
53
|
-
id: string;
|
|
54
|
-
content: string;
|
|
55
|
-
message_type: 'text' | 'image' | 'file' | 'system';
|
|
56
|
-
sender_id: string;
|
|
57
|
-
sender_type?: string;
|
|
58
|
-
sender_agent_model?: string;
|
|
59
|
-
attachments?: Attachment[];
|
|
60
|
-
reactions?: ReactionSummary[];
|
|
61
|
-
is_edited: boolean;
|
|
62
|
-
created_at: string;
|
|
63
|
-
}
|
|
64
|
-
export interface ReactionSummary {
|
|
65
|
-
emoji: string;
|
|
66
|
-
count: number;
|
|
67
|
-
user_ids: string[];
|
|
68
|
-
}
|
|
69
|
-
export interface Attachment {
|
|
70
|
-
file_id: string;
|
|
71
|
-
file_name: string;
|
|
72
|
-
file_size: number;
|
|
73
|
-
mime_type: string;
|
|
74
|
-
presigned_url?: string;
|
|
75
|
-
thumbnail_url?: string;
|
|
76
|
-
}
|
|
77
|
-
export interface ReadStatus {
|
|
78
|
-
user_id: string;
|
|
79
|
-
last_read_at?: string;
|
|
80
|
-
}
|
|
81
|
-
export interface ChatReaction {
|
|
82
|
-
id: string;
|
|
83
|
-
message_id: string;
|
|
84
|
-
user_id: string;
|
|
85
|
-
emoji: string;
|
|
86
|
-
action?: 'added' | 'removed';
|
|
87
|
-
timestamp?: string;
|
|
88
|
-
}
|
|
89
|
-
export interface MessageEditedEvent {
|
|
90
|
-
id?: string;
|
|
91
|
-
message_id: string;
|
|
92
|
-
conversation_id: string;
|
|
93
|
-
content?: string;
|
|
94
|
-
new_content?: string;
|
|
95
|
-
editor_user_id?: string;
|
|
96
|
-
is_edited?: boolean;
|
|
97
|
-
updated_at?: string;
|
|
98
|
-
timestamp?: string;
|
|
99
|
-
}
|
|
100
|
-
export interface ReactionEvent {
|
|
101
|
-
message_id: string;
|
|
102
|
-
conversation_id?: string;
|
|
103
|
-
user_id: string;
|
|
104
|
-
emoji: string;
|
|
105
|
-
action: 'added' | 'removed';
|
|
106
|
-
timestamp?: string;
|
|
107
|
-
}
|
|
108
|
-
export interface PresenceMember {
|
|
109
|
-
user_id: string;
|
|
110
|
-
user_data?: unknown;
|
|
111
|
-
joined_at: string;
|
|
112
|
-
}
|
|
113
|
-
export interface ChannelSettings {
|
|
114
|
-
publisher_user_ids?: string[];
|
|
115
|
-
linked_session_id?: string;
|
|
116
|
-
expires_at?: string;
|
|
117
|
-
max_participants?: number;
|
|
118
|
-
slow_mode_seconds?: number;
|
|
119
|
-
}
|
|
120
|
-
export interface ChannelWithSettings {
|
|
121
|
-
id: string;
|
|
122
|
-
channel_type: string;
|
|
123
|
-
name?: string;
|
|
124
|
-
created_at: string;
|
|
125
|
-
linked_session_id?: string;
|
|
126
|
-
expires_at?: string;
|
|
127
|
-
participant_count: number;
|
|
128
|
-
}
|
|
129
|
-
export interface CreateEphemeralChannelOptions {
|
|
130
|
-
linked_session_id: string;
|
|
131
|
-
name?: string;
|
|
132
|
-
ttl_minutes?: number;
|
|
133
|
-
}
|
|
134
|
-
export interface CreateLargeRoomOptions {
|
|
135
|
-
name: string;
|
|
136
|
-
linked_session_id?: string;
|
|
137
|
-
max_participants?: number;
|
|
138
|
-
slow_mode_seconds?: number;
|
|
139
|
-
}
|
|
140
|
-
export interface ChatEventMap {
|
|
141
|
-
connected: void;
|
|
142
|
-
disconnected: void;
|
|
143
|
-
reconnecting: {
|
|
144
|
-
attempt: number;
|
|
145
|
-
};
|
|
146
|
-
'message': {
|
|
147
|
-
message: ChatMessage;
|
|
148
|
-
conversationId: string;
|
|
149
|
-
};
|
|
150
|
-
'message:updated': {
|
|
151
|
-
message: ChatMessage;
|
|
152
|
-
conversationId: string;
|
|
153
|
-
update?: MessageEditedEvent;
|
|
154
|
-
};
|
|
155
|
-
'message:deleted': {
|
|
156
|
-
messageId: string;
|
|
157
|
-
conversationId: string;
|
|
158
|
-
};
|
|
159
|
-
'typing': {
|
|
160
|
-
userId: string;
|
|
161
|
-
conversationId: string;
|
|
162
|
-
};
|
|
163
|
-
'typing:stop': {
|
|
164
|
-
userId: string;
|
|
165
|
-
conversationId: string;
|
|
166
|
-
};
|
|
167
|
-
'presence:join': {
|
|
168
|
-
userId: string;
|
|
169
|
-
conversationId: string;
|
|
170
|
-
userData?: unknown;
|
|
171
|
-
};
|
|
172
|
-
'presence:leave': {
|
|
173
|
-
userId: string;
|
|
174
|
-
conversationId: string;
|
|
175
|
-
};
|
|
176
|
-
'presence:update': {
|
|
177
|
-
userId: string;
|
|
178
|
-
conversationId: string;
|
|
179
|
-
status: string;
|
|
180
|
-
userData?: unknown;
|
|
181
|
-
};
|
|
182
|
-
'presence:state': {
|
|
183
|
-
conversationId: string;
|
|
184
|
-
members: PresenceMember[];
|
|
185
|
-
};
|
|
186
|
-
'read': {
|
|
187
|
-
userId: string;
|
|
188
|
-
conversationId: string;
|
|
189
|
-
lastReadAt: string;
|
|
190
|
-
};
|
|
191
|
-
'reaction': {
|
|
192
|
-
reaction: ChatReaction;
|
|
193
|
-
conversationId: string;
|
|
194
|
-
action: 'added' | 'removed';
|
|
195
|
-
};
|
|
196
|
-
'room_upgraded': {
|
|
197
|
-
conversationId: string;
|
|
198
|
-
newType: 'large_room';
|
|
199
|
-
};
|
|
200
|
-
'delivery': {
|
|
201
|
-
messageId: string;
|
|
202
|
-
status: 'sent' | 'delivered' | 'read';
|
|
203
|
-
};
|
|
204
|
-
'inbox:update': {
|
|
205
|
-
conversationId: string;
|
|
206
|
-
messageId: string;
|
|
207
|
-
senderId: string;
|
|
208
|
-
preview: string;
|
|
209
|
-
};
|
|
210
|
-
'support:new': {
|
|
211
|
-
conversationId: string;
|
|
212
|
-
visitorName?: string;
|
|
213
|
-
};
|
|
214
|
-
'support:assigned': {
|
|
215
|
-
conversationId: string;
|
|
216
|
-
visitorName?: string;
|
|
217
|
-
visitorEmail?: string;
|
|
218
|
-
};
|
|
219
|
-
'error': {
|
|
220
|
-
code: string;
|
|
221
|
-
message: string;
|
|
222
|
-
};
|
|
223
|
-
}
|
|
224
|
-
export type ConnectionStatus = 'disconnected' | 'connecting' | 'connected' | 'reconnecting';
|
|
225
|
-
export interface SendMessageOptions {
|
|
226
|
-
content: string;
|
|
227
|
-
message_type?: 'text' | 'image' | 'file';
|
|
228
|
-
attachments?: Attachment[];
|
|
229
|
-
}
|
|
230
|
-
export interface ListConversationsOptions {
|
|
231
|
-
page?: number;
|
|
232
|
-
per_page?: number;
|
|
233
|
-
conversation_type?: 'direct' | 'group' | 'broadcast' | 'ephemeral' | 'large_room' | 'support';
|
|
234
|
-
}
|
|
235
|
-
export interface UnreadTotalResponse {
|
|
236
|
-
unread_conversations: number;
|
|
237
|
-
unread_messages: number;
|
|
238
|
-
}
|
|
239
|
-
export interface GetMessagesOptions {
|
|
240
|
-
limit?: number;
|
|
241
|
-
before?: string;
|
|
242
|
-
after?: string;
|
|
243
|
-
}
|
|
244
|
-
export interface CreateConversationOptions {
|
|
245
|
-
conversation_type?: 'direct' | 'group';
|
|
246
|
-
name?: string;
|
|
247
|
-
participant_ids: string[];
|
|
248
|
-
}
|
|
249
|
-
export interface MessagesResponse {
|
|
250
|
-
messages: ChatMessage[];
|
|
251
|
-
has_more?: boolean;
|
|
252
|
-
oldest_id?: string;
|
|
253
|
-
newest_id?: string;
|
|
254
|
-
}
|
|
255
|
-
export interface PresignedUploadResponse {
|
|
256
|
-
file_id: string;
|
|
257
|
-
upload_url: string;
|
|
258
|
-
completion_token: string;
|
|
259
|
-
expires_at: string;
|
|
260
|
-
method?: string;
|
|
261
|
-
}
|
|
262
|
-
export interface UploadCompleteResponse {
|
|
263
|
-
file_id: string;
|
|
264
|
-
filename: string;
|
|
265
|
-
size_bytes: number;
|
|
266
|
-
content_type: string;
|
|
267
|
-
url: string;
|
|
268
|
-
already_completed: boolean;
|
|
269
|
-
scan_queued: boolean;
|
|
270
|
-
}
|
|
271
|
-
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,UAAU;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACxC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE;QACV,UAAU,CAAC,EA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
package/dist/umd.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"umd.d.ts","sourceRoot":"","sources":["../src/umd.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,WAAW,CAAC;AAEnB,eAAO,MAAM,MAAM,sDAA2C,CAAC;AAC/D,eAAO,MAAM,OAAO,QAAwB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
package/dist/version.d.ts
DELETED
package/dist/version.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,UAAU,CAAC"}
|
package/dist/widget/icons.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/** Inline SVG icons for the support widget (no external dependencies). */
|
|
2
|
-
export declare const CHAT_BUBBLE_ICON = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\" width=\"28\" height=\"28\"><path d=\"M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H5.17L4 17.17V4h16v12z\"/><path d=\"M7 9h2v2H7zm4 0h2v2h-2zm4 0h2v2h-2z\"/></svg>";
|
|
3
|
-
export declare const CLOSE_ICON = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\" width=\"20\" height=\"20\"><path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"/></svg>";
|
|
4
|
-
export declare const SEND_ICON = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\" width=\"20\" height=\"20\"><path d=\"M2.01 21L23 12 2.01 3 2 10l15 2-15 2z\"/></svg>";
|
|
5
|
-
export declare const MINIMIZE_ICON = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\" width=\"20\" height=\"20\"><path d=\"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6z\"/></svg>";
|
|
6
|
-
export declare const ATTACH_ICON = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\" width=\"18\" height=\"18\"><path d=\"M16.5 6.5v9.25a4.75 4.75 0 1 1-9.5 0V5.75a3.25 3.25 0 1 1 6.5 0V14a1.75 1.75 0 1 1-3.5 0V6.5H8.5V14a3.25 3.25 0 1 0 6.5 0V5.75a4.75 4.75 0 1 0-9.5 0v10a6.25 6.25 0 1 0 12.5 0V6.5h-1.5Z\"/></svg>";
|
|
7
|
-
export declare const REACTION_ICON = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\" width=\"18\" height=\"18\"><path d=\"M12 22a10 10 0 1 1 10-10 10.01 10.01 0 0 1-10 10Zm0-18.5a8.5 8.5 0 1 0 8.5 8.5A8.51 8.51 0 0 0 12 3.5Zm-3 7a1.25 1.25 0 1 1 1.25-1.25A1.25 1.25 0 0 1 9 10.5Zm6 0a1.25 1.25 0 1 1 1.25-1.25A1.25 1.25 0 0 1 15 10.5Zm-3 6.25A5.22 5.22 0 0 1 7.58 14h1.71a3.5 3.5 0 0 0 5.42 0h1.71A5.22 5.22 0 0 1 12 16.75Z\"/></svg>";
|
|
8
|
-
//# sourceMappingURL=icons.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../src/widget/icons.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAE1E,eAAO,MAAM,gBAAgB,wRAA0Q,CAAC;AAExS,eAAO,MAAM,UAAU,+OAAmO,CAAC;AAE3P,eAAO,MAAM,SAAS,+KAAmK,CAAC;AAE1L,eAAO,MAAM,aAAa,uLAA2K,CAAC;AAEtM,eAAO,MAAM,WAAW,kUAAsT,CAAC;AAE/U,eAAO,MAAM,aAAa,ubAA2a,CAAC"}
|
package/dist/widget/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/widget/index.ts"],"names":[],"mappings":""}
|
package/dist/widget/storage.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/** localStorage wrapper for widget state persistence. */
|
|
2
|
-
export declare function getItem(key: string): string | null;
|
|
3
|
-
export declare function setItem(key: string, value: string): void;
|
|
4
|
-
export declare function removeItem(key: string): void;
|
|
5
|
-
//# sourceMappingURL=storage.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/widget/storage.ts"],"names":[],"mappings":"AAAA,yDAAyD;AAIzD,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAMlD;AAED,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAMxD;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAM5C"}
|
package/dist/widget/styles.d.ts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/** All CSS for the support widget, injected into Shadow DOM. */
|
|
2
|
-
export declare const WIDGET_STYLES = "\n:host {\n all: initial;\n --sm-primary: #2563eb;\n --sm-primary-hover: #1d4ed8;\n --sm-primary-disabled: #93c5fd;\n --sm-primary-text: #ffffff;\n --sm-badge-bg: #ef4444;\n --sm-bubble-left: auto;\n --sm-bubble-right: 20px;\n --sm-panel-left: auto;\n --sm-panel-right: 20px;\n --sm-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;\n font-family: var(--sm-font-family);\n font-size: 14px;\n line-height: 1.5;\n color: #111827;\n}\n\n* {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n\n.sm-bubble {\n position: fixed;\n bottom: 20px;\n left: var(--sm-bubble-left);\n right: var(--sm-bubble-right);\n width: 60px;\n height: 60px;\n border-radius: 999px;\n background: var(--sm-primary);\n color: var(--sm-primary-text);\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n box-shadow: 0 12px 30px rgba(15, 23, 42, 0.22);\n transition: transform 0.2s ease, box-shadow 0.2s ease;\n z-index: 999999;\n}\n\n.sm-bubble:hover {\n transform: translateY(-1px) scale(1.03);\n box-shadow: 0 18px 36px rgba(15, 23, 42, 0.28);\n}\n\n.sm-bubble .sm-badge {\n position: absolute;\n top: -4px;\n right: -4px;\n min-width: 20px;\n height: 20px;\n border-radius: 999px;\n background: var(--sm-badge-bg);\n color: #fff;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 6px;\n font-size: 11px;\n font-weight: 700;\n}\n\n.sm-panel {\n position: fixed;\n bottom: 90px;\n left: var(--sm-panel-left);\n right: var(--sm-panel-right);\n width: 380px;\n max-height: min(560px, calc(100vh - 110px));\n background: #ffffff;\n border-radius: 18px;\n box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);\n display: flex;\n flex-direction: column;\n overflow: hidden;\n z-index: 999998;\n animation: sm-slide-up 0.22s ease;\n}\n\n@keyframes sm-slide-up {\n from { opacity: 0; transform: translateY(14px); }\n to { opacity: 1; transform: translateY(0); }\n}\n\n.sm-panel.sm-hidden {\n display: none;\n}\n\n.sm-header {\n background: var(--sm-primary);\n color: var(--sm-primary-text);\n padding: 16px 18px;\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 16px;\n}\n\n.sm-header-copy {\n min-width: 0;\n}\n\n.sm-header-title {\n font-size: 16px;\n font-weight: 700;\n}\n\n.sm-header-status {\n display: flex;\n align-items: center;\n gap: 6px;\n margin-top: 4px;\n font-size: 12px;\n opacity: 0.92;\n}\n\n.sm-status-dot {\n width: 10px;\n height: 10px;\n border-radius: 999px;\n background: rgba(255, 255, 255, 0.65);\n}\n\n.sm-status-dot-online {\n background: #22c55e;\n box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);\n}\n\n.sm-status-dot-away {\n background: #cbd5e1;\n}\n\n.sm-header-subtitle {\n font-size: 12px;\n opacity: 0.82;\n margin-top: 6px;\n max-width: 250px;\n}\n\n.sm-header-actions {\n display: flex;\n gap: 6px;\n}\n\n.sm-header-btn {\n background: none;\n border: none;\n color: inherit;\n cursor: pointer;\n border-radius: 10px;\n padding: 6px;\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: 0.86;\n}\n\n.sm-header-btn:hover {\n opacity: 1;\n background: rgba(255, 255, 255, 0.12);\n}\n\n.sm-error {\n padding: 10px 14px;\n background: #fef2f2;\n border-bottom: 1px solid #fecaca;\n color: #b91c1c;\n font-size: 12px;\n}\n\n.sm-body {\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n}\n\n.sm-prechat {\n padding: 20px 18px 18px;\n display: flex;\n flex-direction: column;\n gap: 14px;\n}\n\n.sm-prechat-title {\n font-size: 18px;\n font-weight: 700;\n color: #111827;\n}\n\n.sm-prechat-desc {\n font-size: 13px;\n color: #6b7280;\n}\n\n.sm-field {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.sm-field label {\n font-size: 13px;\n font-weight: 600;\n color: #374151;\n}\n\n.sm-field input,\n.sm-field textarea,\n.sm-input {\n border: 1px solid #d1d5db;\n border-radius: 14px;\n padding: 10px 12px;\n font-size: 14px;\n font-family: inherit;\n color: #111827;\n outline: none;\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\n background: #fff;\n}\n\n.sm-field input:focus,\n.sm-field textarea:focus,\n.sm-input:focus {\n border-color: var(--sm-primary);\n box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);\n}\n\n.sm-field textarea {\n resize: vertical;\n min-height: 92px;\n}\n\n.sm-prechat-actions {\n display: flex;\n gap: 10px;\n align-items: center;\n}\n\n.sm-submit-btn,\n.sm-send-btn {\n border: none;\n cursor: pointer;\n background: var(--sm-primary);\n color: var(--sm-primary-text);\n transition: background 0.15s ease, opacity 0.15s ease;\n}\n\n.sm-submit-btn:hover,\n.sm-send-btn:hover {\n background: var(--sm-primary-hover);\n}\n\n.sm-submit-btn:disabled,\n.sm-send-btn:disabled {\n background: var(--sm-primary-disabled);\n cursor: not-allowed;\n}\n\n.sm-submit-btn {\n flex: 1;\n border-radius: 14px;\n padding: 12px;\n font-size: 14px;\n font-weight: 700;\n}\n\n.sm-chat-shell {\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n background: #f8fafc;\n}\n\n.sm-chat-shell.sm-dragging {\n background: rgba(37, 99, 235, 0.05);\n}\n\n.sm-messages {\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n padding: 16px;\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\n.sm-date-divider {\n align-self: center;\n font-size: 11px;\n font-weight: 600;\n color: #6b7280;\n background: rgba(148, 163, 184, 0.16);\n padding: 4px 10px;\n border-radius: 999px;\n}\n\n.sm-unread-divider {\n display: flex;\n align-items: center;\n gap: 12px;\n font-size: 11px;\n font-weight: 700;\n color: var(--sm-primary);\n text-transform: uppercase;\n letter-spacing: 0.04em;\n}\n\n.sm-unread-divider::before,\n.sm-unread-divider::after {\n content: '';\n flex: 1;\n height: 1px;\n background: rgba(37, 99, 235, 0.24);\n}\n\n.sm-msg {\n display: flex;\n flex-direction: column;\n gap: 6px;\n max-width: 84%;\n}\n\n.sm-msg-visitor {\n align-self: flex-end;\n}\n\n.sm-msg-rep {\n align-self: flex-start;\n}\n\n.sm-msg-system {\n align-self: center;\n max-width: 92%;\n}\n\n.sm-msg-row {\n display: flex;\n align-items: flex-end;\n gap: 8px;\n}\n\n.sm-msg-bubble {\n padding: 10px 12px;\n border-radius: 16px;\n line-height: 1.4;\n word-break: break-word;\n background: #f3f4f6;\n color: #111827;\n}\n\n.sm-msg-content {\n white-space: pre-wrap;\n}\n\n.sm-msg-visitor .sm-msg-bubble {\n background: var(--sm-primary);\n color: var(--sm-primary-text);\n border-bottom-right-radius: 6px;\n}\n\n.sm-msg-rep .sm-msg-bubble {\n border-bottom-left-radius: 6px;\n}\n\n.sm-msg-system .sm-msg-bubble {\n background: transparent;\n color: #94a3b8;\n font-size: 12px;\n text-align: center;\n padding: 2px 8px;\n}\n\n.sm-msg-action {\n border: 1px solid #e5e7eb;\n background: #ffffff;\n color: #6b7280;\n border-radius: 999px;\n width: 28px;\n height: 28px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n flex-shrink: 0;\n}\n\n.sm-msg-action:hover {\n color: var(--sm-primary);\n border-color: rgba(37, 99, 235, 0.24);\n}\n\n.sm-msg-time {\n font-size: 11px;\n color: #94a3b8;\n}\n\n.sm-msg-visitor .sm-msg-time {\n text-align: right;\n}\n\n.sm-reactions {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n}\n\n.sm-reaction-badge {\n border: 1px solid #e5e7eb;\n background: #ffffff;\n color: #374151;\n border-radius: 999px;\n padding: 4px 8px;\n font-size: 12px;\n cursor: pointer;\n}\n\n.sm-reaction-badge-active {\n border-color: rgba(37, 99, 235, 0.32);\n background: rgba(37, 99, 235, 0.08);\n color: var(--sm-primary);\n}\n\n.sm-reaction-picker {\n display: inline-flex;\n gap: 6px;\n padding: 6px;\n border-radius: 999px;\n border: 1px solid #e5e7eb;\n background: #ffffff;\n box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);\n}\n\n.sm-reaction-picker-btn {\n border: none;\n background: transparent;\n cursor: pointer;\n border-radius: 999px;\n width: 30px;\n height: 30px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-size: 17px;\n}\n\n.sm-attachment {\n display: block;\n margin-top: 8px;\n border-radius: 12px;\n max-width: 100%;\n}\n\n.sm-attachment-image,\n.sm-attachment-video {\n max-width: 260px;\n}\n\n.sm-attachment-audio {\n width: 100%;\n}\n\n.sm-attachment-link {\n color: inherit;\n text-decoration: underline;\n font-size: 13px;\n}\n\n.sm-typing {\n min-height: 22px;\n padding: 0 16px 10px;\n font-size: 12px;\n color: #6b7280;\n}\n\n.sm-typing-indicator {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n}\n\n.sm-typing-indicator span:nth-child(-n+3) {\n width: 6px;\n height: 6px;\n border-radius: 999px;\n background: #94a3b8;\n animation: sm-bounce 1.2s infinite ease-in-out;\n}\n\n.sm-typing-indicator span:nth-child(2) {\n animation-delay: 0.15s;\n}\n\n.sm-typing-indicator span:nth-child(3) {\n animation-delay: 0.3s;\n}\n\n@keyframes sm-bounce {\n 0%, 80%, 100% { transform: scale(0.85); opacity: 0.5; }\n 40% { transform: scale(1); opacity: 1; }\n}\n\n.sm-upload-list {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n padding: 0 16px 10px;\n}\n\n.sm-upload-chip {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n max-width: 100%;\n border-radius: 999px;\n border: 1px solid #e5e7eb;\n background: #ffffff;\n padding: 6px 10px;\n font-size: 12px;\n color: #374151;\n}\n\n.sm-upload-chip-error {\n border-color: #fecaca;\n background: #fef2f2;\n color: #b91c1c;\n}\n\n.sm-upload-name {\n max-width: 140px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.sm-upload-progress {\n color: #6b7280;\n}\n\n.sm-upload-chip-error .sm-upload-progress {\n color: inherit;\n}\n\n.sm-upload-remove {\n border: none;\n background: transparent;\n color: inherit;\n cursor: pointer;\n font-size: 14px;\n line-height: 1;\n}\n\n.sm-input-area {\n display: flex;\n align-items: flex-end;\n gap: 10px;\n padding: 12px 16px 16px;\n border-top: 1px solid #e5e7eb;\n background: #ffffff;\n}\n\n.sm-input {\n flex: 1;\n min-height: 44px;\n max-height: 100px;\n resize: none;\n overflow-y: auto;\n line-height: 1.4;\n}\n\n.sm-attach-btn {\n width: 42px;\n height: 42px;\n border-radius: 14px;\n border: 1px solid #d1d5db;\n background: #ffffff;\n color: #374151;\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.sm-attach-btn:hover {\n border-color: rgba(37, 99, 235, 0.28);\n color: var(--sm-primary);\n}\n\n.sm-send-btn {\n width: 42px;\n height: 42px;\n border-radius: 14px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.sm-footer {\n text-align: center;\n padding: 8px;\n font-size: 11px;\n color: #94a3b8;\n}\n\n.sm-footer a {\n color: #6b7280;\n text-decoration: none;\n}\n\n.sm-footer a:hover {\n text-decoration: underline;\n}\n\n@media (max-width: 440px) {\n .sm-panel {\n left: 0;\n right: 0;\n bottom: 0;\n width: 100%;\n max-height: 100vh;\n border-radius: 18px 18px 0 0;\n }\n}\n";
|
|
3
|
-
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/widget/styles.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAEhE,eAAO,MAAM,aAAa,6hWAwnBzB,CAAC"}
|