@repzo/widget-react-native 1.3.0 → 1.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.
- package/CHANGELOG.md +179 -0
- package/README.md +72 -16
- package/lib/commonjs/api/client.js +113 -0
- package/lib/commonjs/api/client.js.map +1 -1
- package/lib/commonjs/attachments/file-size.js +52 -0
- package/lib/commonjs/attachments/file-size.js.map +1 -0
- package/lib/commonjs/attachments/local-previews.js +40 -0
- package/lib/commonjs/attachments/local-previews.js.map +1 -0
- package/lib/commonjs/attachments/pickers.js +76 -28
- package/lib/commonjs/attachments/pickers.js.map +1 -1
- package/lib/commonjs/i18n.js +24 -3
- package/lib/commonjs/i18n.js.map +1 -1
- package/lib/commonjs/locales.js +13 -3
- package/lib/commonjs/locales.js.map +1 -1
- package/lib/commonjs/state/widget-store.js +486 -63
- package/lib/commonjs/state/widget-store.js.map +1 -1
- package/lib/commonjs/storage.js +3 -1
- package/lib/commonjs/storage.js.map +1 -1
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/ui/WidgetProvider.js +40 -16
- package/lib/commonjs/ui/WidgetProvider.js.map +1 -1
- package/lib/commonjs/ui/components/AttachmentChips.js +109 -40
- package/lib/commonjs/ui/components/AttachmentChips.js.map +1 -1
- package/lib/commonjs/ui/components/ConversationRow.js +65 -10
- package/lib/commonjs/ui/components/ConversationRow.js.map +1 -1
- package/lib/commonjs/ui/components/ImageViewer.js +231 -25
- package/lib/commonjs/ui/components/ImageViewer.js.map +1 -1
- package/lib/commonjs/ui/components/RatingCard.js +5 -2
- package/lib/commonjs/ui/components/RatingCard.js.map +1 -1
- package/lib/commonjs/ui/components/ZoomableImage.js +58 -10
- package/lib/commonjs/ui/components/ZoomableImage.js.map +1 -1
- package/lib/commonjs/ui/components/icons.js +22 -16
- package/lib/commonjs/ui/components/icons.js.map +1 -1
- package/lib/commonjs/ui/hooks/use-retained-state.js +39 -0
- package/lib/commonjs/ui/hooks/use-retained-state.js.map +1 -0
- package/lib/commonjs/ui/screens/chat/ChatView.js +666 -171
- package/lib/commonjs/ui/screens/chat/ChatView.js.map +1 -1
- package/lib/commonjs/ui/screens/chat/ChatView.styles.js +150 -3
- package/lib/commonjs/ui/screens/chat/ChatView.styles.js.map +1 -1
- package/lib/commonjs/ui/screens/conversations/ConversationsList.js +1 -0
- package/lib/commonjs/ui/screens/conversations/ConversationsList.js.map +1 -1
- package/lib/commonjs/ui/screens/home/HomeView.js +38 -55
- package/lib/commonjs/ui/screens/home/HomeView.js.map +1 -1
- package/lib/commonjs/ui/screens/home/HomeView.styles.js +36 -45
- package/lib/commonjs/ui/screens/home/HomeView.styles.js.map +1 -1
- package/lib/commonjs/ui/styles/theme.js +1 -0
- package/lib/commonjs/ui/styles/theme.js.map +1 -1
- package/lib/commonjs/ui/utils/conversations.js +17 -1
- package/lib/commonjs/ui/utils/conversations.js.map +1 -1
- package/lib/commonjs/ui/utils/html.js +13 -0
- package/lib/commonjs/ui/utils/html.js.map +1 -1
- package/lib/commonjs/ui/utils/image-load-queue.js +114 -0
- package/lib/commonjs/ui/utils/image-load-queue.js.map +1 -0
- package/lib/commonjs/ui/utils/inline-attachments.js +88 -0
- package/lib/commonjs/ui/utils/inline-attachments.js.map +1 -0
- package/lib/module/api/client.js +113 -0
- package/lib/module/api/client.js.map +1 -1
- package/lib/module/attachments/file-size.js +47 -0
- package/lib/module/attachments/file-size.js.map +1 -0
- package/lib/module/attachments/local-previews.js +33 -0
- package/lib/module/attachments/local-previews.js.map +1 -0
- package/lib/module/attachments/pickers.js +74 -27
- package/lib/module/attachments/pickers.js.map +1 -1
- package/lib/module/i18n.js +24 -3
- package/lib/module/i18n.js.map +1 -1
- package/lib/module/locales.js +13 -3
- package/lib/module/locales.js.map +1 -1
- package/lib/module/state/widget-store.js +488 -65
- package/lib/module/state/widget-store.js.map +1 -1
- package/lib/module/storage.js +2 -0
- package/lib/module/storage.js.map +1 -1
- package/lib/module/types.js.map +1 -1
- package/lib/module/ui/WidgetProvider.js +40 -16
- package/lib/module/ui/WidgetProvider.js.map +1 -1
- package/lib/module/ui/components/AttachmentChips.js +111 -42
- package/lib/module/ui/components/AttachmentChips.js.map +1 -1
- package/lib/module/ui/components/ConversationRow.js +65 -10
- package/lib/module/ui/components/ConversationRow.js.map +1 -1
- package/lib/module/ui/components/ImageViewer.js +233 -27
- package/lib/module/ui/components/ImageViewer.js.map +1 -1
- package/lib/module/ui/components/RatingCard.js +5 -2
- package/lib/module/ui/components/RatingCard.js.map +1 -1
- package/lib/module/ui/components/ZoomableImage.js +58 -10
- package/lib/module/ui/components/ZoomableImage.js.map +1 -1
- package/lib/module/ui/components/icons.js +21 -15
- package/lib/module/ui/components/icons.js.map +1 -1
- package/lib/module/ui/hooks/use-retained-state.js +34 -0
- package/lib/module/ui/hooks/use-retained-state.js.map +1 -0
- package/lib/module/ui/screens/chat/ChatView.js +672 -177
- package/lib/module/ui/screens/chat/ChatView.js.map +1 -1
- package/lib/module/ui/screens/chat/ChatView.styles.js +152 -4
- package/lib/module/ui/screens/chat/ChatView.styles.js.map +1 -1
- package/lib/module/ui/screens/conversations/ConversationsList.js +1 -0
- package/lib/module/ui/screens/conversations/ConversationsList.js.map +1 -1
- package/lib/module/ui/screens/home/HomeView.js +40 -57
- package/lib/module/ui/screens/home/HomeView.js.map +1 -1
- package/lib/module/ui/screens/home/HomeView.styles.js +36 -45
- package/lib/module/ui/screens/home/HomeView.styles.js.map +1 -1
- package/lib/module/ui/styles/theme.js +1 -0
- package/lib/module/ui/styles/theme.js.map +1 -1
- package/lib/module/ui/utils/conversations.js +15 -1
- package/lib/module/ui/utils/conversations.js.map +1 -1
- package/lib/module/ui/utils/html.js +12 -0
- package/lib/module/ui/utils/html.js.map +1 -1
- package/lib/module/ui/utils/image-load-queue.js +109 -0
- package/lib/module/ui/utils/image-load-queue.js.map +1 -0
- package/lib/module/ui/utils/inline-attachments.js +85 -0
- package/lib/module/ui/utils/inline-attachments.js.map +1 -0
- package/lib/typescript/commonjs/api/client.d.ts +35 -1
- package/lib/typescript/commonjs/api/client.d.ts.map +1 -1
- package/lib/typescript/commonjs/attachments/file-size.d.ts +15 -0
- package/lib/typescript/commonjs/attachments/file-size.d.ts.map +1 -0
- package/lib/typescript/commonjs/attachments/local-previews.d.ts +14 -0
- package/lib/typescript/commonjs/attachments/local-previews.d.ts.map +1 -0
- package/lib/typescript/commonjs/attachments/pickers.d.ts +35 -10
- package/lib/typescript/commonjs/attachments/pickers.d.ts.map +1 -1
- package/lib/typescript/commonjs/i18n.d.ts +13 -3
- package/lib/typescript/commonjs/i18n.d.ts.map +1 -1
- package/lib/typescript/commonjs/locales.d.ts.map +1 -1
- package/lib/typescript/commonjs/state/widget-store.d.ts +67 -4
- package/lib/typescript/commonjs/state/widget-store.d.ts.map +1 -1
- package/lib/typescript/commonjs/storage.d.ts +2 -0
- package/lib/typescript/commonjs/storage.d.ts.map +1 -1
- package/lib/typescript/commonjs/types.d.ts +58 -0
- package/lib/typescript/commonjs/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/WidgetProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/AttachmentChips.d.ts +13 -3
- package/lib/typescript/commonjs/ui/components/AttachmentChips.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ConversationRow.d.ts +15 -1
- package/lib/typescript/commonjs/ui/components/ConversationRow.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ImageViewer.d.ts +26 -6
- package/lib/typescript/commonjs/ui/components/ImageViewer.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/RatingCard.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ZoomableImage.d.ts +10 -1
- package/lib/typescript/commonjs/ui/components/ZoomableImage.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/icons.d.ts +2 -1
- package/lib/typescript/commonjs/ui/components/icons.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/use-retained-state.d.ts +11 -0
- package/lib/typescript/commonjs/ui/hooks/use-retained-state.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/chat/ChatView.d.ts +4 -4
- package/lib/typescript/commonjs/ui/screens/chat/ChatView.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/chat/ChatView.styles.d.ts +154 -2
- package/lib/typescript/commonjs/ui/screens/chat/ChatView.styles.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/chat/ChatView.types.d.ts +30 -1
- package/lib/typescript/commonjs/ui/screens/chat/ChatView.types.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/conversations/ConversationsList.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/conversations/ConversationsList.types.d.ts +2 -0
- package/lib/typescript/commonjs/ui/screens/conversations/ConversationsList.types.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/home/HomeView.d.ts +7 -5
- package/lib/typescript/commonjs/ui/screens/home/HomeView.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/home/HomeView.styles.d.ts +30 -35
- package/lib/typescript/commonjs/ui/screens/home/HomeView.styles.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/home/HomeView.types.d.ts +5 -6
- package/lib/typescript/commonjs/ui/screens/home/HomeView.types.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/styles/theme.d.ts +2 -0
- package/lib/typescript/commonjs/ui/styles/theme.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/conversations.d.ts +10 -2
- package/lib/typescript/commonjs/ui/utils/conversations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/html.d.ts +5 -0
- package/lib/typescript/commonjs/ui/utils/html.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/image-load-queue.d.ts +44 -0
- package/lib/typescript/commonjs/ui/utils/image-load-queue.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/utils/inline-attachments.d.ts +29 -0
- package/lib/typescript/commonjs/ui/utils/inline-attachments.d.ts.map +1 -0
- package/lib/typescript/module/api/client.d.ts +35 -1
- package/lib/typescript/module/api/client.d.ts.map +1 -1
- package/lib/typescript/module/attachments/file-size.d.ts +15 -0
- package/lib/typescript/module/attachments/file-size.d.ts.map +1 -0
- package/lib/typescript/module/attachments/local-previews.d.ts +14 -0
- package/lib/typescript/module/attachments/local-previews.d.ts.map +1 -0
- package/lib/typescript/module/attachments/pickers.d.ts +35 -10
- package/lib/typescript/module/attachments/pickers.d.ts.map +1 -1
- package/lib/typescript/module/i18n.d.ts +13 -3
- package/lib/typescript/module/i18n.d.ts.map +1 -1
- package/lib/typescript/module/locales.d.ts.map +1 -1
- package/lib/typescript/module/state/widget-store.d.ts +67 -4
- package/lib/typescript/module/state/widget-store.d.ts.map +1 -1
- package/lib/typescript/module/storage.d.ts +2 -0
- package/lib/typescript/module/storage.d.ts.map +1 -1
- package/lib/typescript/module/types.d.ts +58 -0
- package/lib/typescript/module/types.d.ts.map +1 -1
- package/lib/typescript/module/ui/WidgetProvider.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/AttachmentChips.d.ts +13 -3
- package/lib/typescript/module/ui/components/AttachmentChips.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ConversationRow.d.ts +15 -1
- package/lib/typescript/module/ui/components/ConversationRow.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ImageViewer.d.ts +26 -6
- package/lib/typescript/module/ui/components/ImageViewer.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/RatingCard.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ZoomableImage.d.ts +10 -1
- package/lib/typescript/module/ui/components/ZoomableImage.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/icons.d.ts +2 -1
- package/lib/typescript/module/ui/components/icons.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/use-retained-state.d.ts +11 -0
- package/lib/typescript/module/ui/hooks/use-retained-state.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/chat/ChatView.d.ts +4 -4
- package/lib/typescript/module/ui/screens/chat/ChatView.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/chat/ChatView.styles.d.ts +154 -2
- package/lib/typescript/module/ui/screens/chat/ChatView.styles.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/chat/ChatView.types.d.ts +30 -1
- package/lib/typescript/module/ui/screens/chat/ChatView.types.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/conversations/ConversationsList.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/conversations/ConversationsList.types.d.ts +2 -0
- package/lib/typescript/module/ui/screens/conversations/ConversationsList.types.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/home/HomeView.d.ts +7 -5
- package/lib/typescript/module/ui/screens/home/HomeView.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/home/HomeView.styles.d.ts +30 -35
- package/lib/typescript/module/ui/screens/home/HomeView.styles.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/home/HomeView.types.d.ts +5 -6
- package/lib/typescript/module/ui/screens/home/HomeView.types.d.ts.map +1 -1
- package/lib/typescript/module/ui/styles/theme.d.ts +2 -0
- package/lib/typescript/module/ui/styles/theme.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/conversations.d.ts +10 -2
- package/lib/typescript/module/ui/utils/conversations.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/html.d.ts +5 -0
- package/lib/typescript/module/ui/utils/html.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/image-load-queue.d.ts +44 -0
- package/lib/typescript/module/ui/utils/image-load-queue.d.ts.map +1 -0
- package/lib/typescript/module/ui/utils/inline-attachments.d.ts +29 -0
- package/lib/typescript/module/ui/utils/inline-attachments.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/api/client.ts +148 -2
- package/src/attachments/file-size.ts +42 -0
- package/src/attachments/local-previews.ts +32 -0
- package/src/attachments/pickers.ts +90 -30
- package/src/i18n.ts +24 -3
- package/src/locales.ts +13 -3
- package/src/state/widget-store.ts +519 -70
- package/src/storage.ts +2 -0
- package/src/types.ts +58 -0
- package/src/ui/WidgetProvider.tsx +50 -12
- package/src/ui/components/AttachmentChips.tsx +100 -29
- package/src/ui/components/ConversationRow.tsx +90 -9
- package/src/ui/components/ImageViewer.tsx +250 -28
- package/src/ui/components/RatingCard.tsx +5 -2
- package/src/ui/components/ZoomableImage.tsx +58 -5
- package/src/ui/components/icons.tsx +10 -12
- package/src/ui/hooks/use-retained-state.ts +35 -0
- package/src/ui/screens/chat/ChatView.styles.ts +151 -3
- package/src/ui/screens/chat/ChatView.tsx +760 -213
- package/src/ui/screens/chat/ChatView.types.ts +30 -1
- package/src/ui/screens/conversations/ConversationsList.tsx +1 -0
- package/src/ui/screens/conversations/ConversationsList.types.ts +2 -0
- package/src/ui/screens/home/HomeView.styles.ts +36 -45
- package/src/ui/screens/home/HomeView.tsx +54 -70
- package/src/ui/screens/home/HomeView.types.ts +5 -6
- package/src/ui/styles/theme.ts +6 -0
- package/src/ui/utils/conversations.ts +16 -2
- package/src/ui/utils/html.ts +26 -0
- package/src/ui/utils/image-load-queue.ts +108 -0
- package/src/ui/utils/inline-attachments.ts +71 -0
|
@@ -106,6 +106,59 @@ export declare const styles: {
|
|
|
106
106
|
paddingBottom: 8;
|
|
107
107
|
gap: 8;
|
|
108
108
|
};
|
|
109
|
+
threadContent: {
|
|
110
|
+
paddingHorizontal: 16;
|
|
111
|
+
paddingTop: 8;
|
|
112
|
+
paddingBottom: 16;
|
|
113
|
+
};
|
|
114
|
+
threadRow: {
|
|
115
|
+
gap: 8;
|
|
116
|
+
};
|
|
117
|
+
threadGap: {
|
|
118
|
+
height: 8;
|
|
119
|
+
};
|
|
120
|
+
threadTail: {
|
|
121
|
+
gap: 8;
|
|
122
|
+
};
|
|
123
|
+
threadTailInList: {
|
|
124
|
+
paddingTop: 8;
|
|
125
|
+
};
|
|
126
|
+
jumpToLatest: {
|
|
127
|
+
shadowColor: "#000000";
|
|
128
|
+
shadowOffset: {
|
|
129
|
+
readonly width: 0;
|
|
130
|
+
readonly height: 4;
|
|
131
|
+
};
|
|
132
|
+
shadowOpacity: 0.15;
|
|
133
|
+
shadowRadius: 12;
|
|
134
|
+
elevation: 6;
|
|
135
|
+
position: "absolute";
|
|
136
|
+
bottom: 12;
|
|
137
|
+
end: 16;
|
|
138
|
+
width: number;
|
|
139
|
+
height: number;
|
|
140
|
+
borderRadius: number;
|
|
141
|
+
alignItems: "center";
|
|
142
|
+
justifyContent: "center";
|
|
143
|
+
backgroundColor: "#ffffff";
|
|
144
|
+
borderWidth: number;
|
|
145
|
+
borderColor: "#e5e7eb";
|
|
146
|
+
};
|
|
147
|
+
jumpBadge: {
|
|
148
|
+
position: "absolute";
|
|
149
|
+
top: number;
|
|
150
|
+
end: number;
|
|
151
|
+
minWidth: number;
|
|
152
|
+
height: number;
|
|
153
|
+
paddingHorizontal: number;
|
|
154
|
+
borderRadius: 999;
|
|
155
|
+
alignItems: "center";
|
|
156
|
+
justifyContent: "center";
|
|
157
|
+
};
|
|
158
|
+
jumpBadgeText: {
|
|
159
|
+
fontSize: 10;
|
|
160
|
+
fontWeight: "700";
|
|
161
|
+
};
|
|
109
162
|
loadMore: {
|
|
110
163
|
alignSelf: "center";
|
|
111
164
|
paddingVertical: 8;
|
|
@@ -196,6 +249,9 @@ export declare const styles: {
|
|
|
196
249
|
attachments: {
|
|
197
250
|
gap: number;
|
|
198
251
|
};
|
|
252
|
+
inlineParts: {
|
|
253
|
+
gap: 8;
|
|
254
|
+
};
|
|
199
255
|
attachmentsSpaced: {
|
|
200
256
|
marginTop: 8;
|
|
201
257
|
};
|
|
@@ -203,10 +259,106 @@ export declare const styles: {
|
|
|
203
259
|
width: number;
|
|
204
260
|
height: number;
|
|
205
261
|
borderRadius: 10;
|
|
262
|
+
backgroundColor: string;
|
|
206
263
|
};
|
|
207
|
-
|
|
264
|
+
photoLoader: {
|
|
265
|
+
alignItems: "center";
|
|
266
|
+
justifyContent: "center";
|
|
267
|
+
position: "absolute";
|
|
268
|
+
left: 0;
|
|
269
|
+
right: 0;
|
|
270
|
+
top: 0;
|
|
271
|
+
bottom: 0;
|
|
272
|
+
};
|
|
273
|
+
photoLoaderBadge: {
|
|
274
|
+
width: number;
|
|
275
|
+
height: number;
|
|
276
|
+
borderRadius: number;
|
|
277
|
+
alignItems: "center";
|
|
278
|
+
justifyContent: "center";
|
|
279
|
+
backgroundColor: string;
|
|
280
|
+
};
|
|
281
|
+
album: {
|
|
282
|
+
width: number;
|
|
283
|
+
height: number;
|
|
284
|
+
borderRadius: 10;
|
|
285
|
+
overflow: "hidden";
|
|
286
|
+
gap: number;
|
|
287
|
+
};
|
|
288
|
+
albumRow: {
|
|
289
|
+
flexDirection: "row";
|
|
290
|
+
};
|
|
291
|
+
albumGrid: {
|
|
292
|
+
flexDirection: "row";
|
|
293
|
+
flexWrap: "wrap";
|
|
294
|
+
};
|
|
295
|
+
albumColumn: {
|
|
296
|
+
flex: number;
|
|
297
|
+
gap: number;
|
|
298
|
+
};
|
|
299
|
+
albumHalf: {
|
|
300
|
+
flex: number;
|
|
301
|
+
};
|
|
302
|
+
albumQuarter: {
|
|
303
|
+
width: number;
|
|
304
|
+
height: number;
|
|
305
|
+
};
|
|
306
|
+
albumTile: {
|
|
307
|
+
overflow: "hidden";
|
|
308
|
+
backgroundColor: string;
|
|
309
|
+
};
|
|
310
|
+
albumImage: {
|
|
311
|
+
width: "100%";
|
|
312
|
+
height: "100%";
|
|
313
|
+
};
|
|
314
|
+
albumFallback: {
|
|
315
|
+
alignItems: "center";
|
|
316
|
+
justifyContent: "center";
|
|
317
|
+
gap: 4;
|
|
318
|
+
padding: 8;
|
|
319
|
+
backgroundColor: "#f3f4f6";
|
|
320
|
+
position: "absolute";
|
|
321
|
+
left: 0;
|
|
322
|
+
right: 0;
|
|
323
|
+
top: 0;
|
|
324
|
+
bottom: 0;
|
|
325
|
+
};
|
|
326
|
+
albumFallbackType: {
|
|
327
|
+
color: "#6b7280";
|
|
328
|
+
fontSize: 12;
|
|
329
|
+
fontWeight: "700";
|
|
330
|
+
};
|
|
331
|
+
albumFallbackName: {
|
|
332
|
+
color: "#111827";
|
|
208
333
|
fontSize: 12;
|
|
209
|
-
|
|
334
|
+
textAlign: "center";
|
|
335
|
+
};
|
|
336
|
+
albumMore: {
|
|
337
|
+
alignItems: "center";
|
|
338
|
+
justifyContent: "center";
|
|
339
|
+
backgroundColor: string;
|
|
340
|
+
position: "absolute";
|
|
341
|
+
left: 0;
|
|
342
|
+
right: 0;
|
|
343
|
+
top: 0;
|
|
344
|
+
bottom: 0;
|
|
345
|
+
};
|
|
346
|
+
albumMoreText: {
|
|
347
|
+
color: "#ffffff";
|
|
348
|
+
fontSize: 22;
|
|
349
|
+
fontWeight: "700";
|
|
350
|
+
};
|
|
351
|
+
failedRow: {
|
|
352
|
+
flexDirection: "row";
|
|
353
|
+
alignItems: "center";
|
|
354
|
+
gap: number;
|
|
355
|
+
marginTop: number;
|
|
356
|
+
marginEnd: 4;
|
|
357
|
+
};
|
|
358
|
+
failedText: {
|
|
359
|
+
fontSize: number;
|
|
360
|
+
fontWeight: "600";
|
|
361
|
+
color: "#ef4444";
|
|
210
362
|
};
|
|
211
363
|
deletedBubble: {
|
|
212
364
|
maxWidth: "80%";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatView.styles.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/chat/ChatView.styles.ts"],"names":[],"mappings":"AAAA,kFAAkF;
|
|
1
|
+
{"version":3,"file":"ChatView.styles.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/chat/ChatView.styles.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAYlF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuiBjB,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { TeamAvatar } from '../../../types';
|
|
2
2
|
/** Props and label bundle for the chat thread. */
|
|
3
|
+
import type { UploadedFile } from '../../../api/client';
|
|
3
4
|
import type { DraftAttachment, PickResult } from '../../../attachments/pickers';
|
|
4
5
|
import type { AgentUiAction, AttachmentSource, ConversationRatingResult, Message, OutgoingAttachment } from '../../../types';
|
|
5
6
|
import type { AgentUiBlockLabels } from '../../components/AgentUiBlocks';
|
|
@@ -12,7 +13,17 @@ export interface ChatLabels {
|
|
|
12
13
|
loadEarlier: string;
|
|
13
14
|
emptyConversation: string;
|
|
14
15
|
messagePlaceholder: string;
|
|
16
|
+
/** Screen-reader label of the send button. */
|
|
17
|
+
send: string;
|
|
18
|
+
/** The button back to the newest message. */
|
|
19
|
+
jumpToLatest: string;
|
|
20
|
+
/** The same with `{count}` teammate replies that arrived while scrolled up. */
|
|
21
|
+
jumpToLatestNew: string;
|
|
22
|
+
/** Last tile of a photo album, with `{count}` photos behind its "+N". */
|
|
23
|
+
morePhotos: string;
|
|
15
24
|
failedToSend: string;
|
|
25
|
+
/** After `failedToSend` on a bubble that can be re-sent. */
|
|
26
|
+
tapToRetry: string;
|
|
16
27
|
thinking: string;
|
|
17
28
|
team: string;
|
|
18
29
|
statusOnline: string;
|
|
@@ -46,7 +57,10 @@ export interface ChatLabels {
|
|
|
46
57
|
/** Screen-reader label for a file card; keeps `{name}`. */
|
|
47
58
|
openAttachment: string;
|
|
48
59
|
}
|
|
49
|
-
/**
|
|
60
|
+
/**
|
|
61
|
+
* Composer attachment copy. Limits are already filled in; `remove`,
|
|
62
|
+
* `uploading` and `uploadFailed` keep `{name}`.
|
|
63
|
+
*/
|
|
50
64
|
export interface AttachLabels {
|
|
51
65
|
button: string;
|
|
52
66
|
photoLibrary: string;
|
|
@@ -59,6 +73,11 @@ export interface AttachLabels {
|
|
|
59
73
|
tooLargeTogether: string;
|
|
60
74
|
failed: string;
|
|
61
75
|
cameraDenied: string;
|
|
76
|
+
uploading: string;
|
|
77
|
+
uploadFailed: string;
|
|
78
|
+
uploadFailedNotice: string;
|
|
79
|
+
/** Under a file chip whose upload failed. */
|
|
80
|
+
retry: string;
|
|
62
81
|
}
|
|
63
82
|
export interface ChatViewProps {
|
|
64
83
|
messages: Message[];
|
|
@@ -88,8 +107,16 @@ export interface ChatViewProps {
|
|
|
88
107
|
attachmentSources?: AttachmentSource[];
|
|
89
108
|
/** Opens a picker and returns what fits beside `current`. Never rejects. */
|
|
90
109
|
onPickAttachments?: (source: AttachmentSource, current: DraftAttachment[]) => Promise<PickResult>;
|
|
110
|
+
/**
|
|
111
|
+
* Uploads a picked local file (`fileUri`) and resolves its upload token,
|
|
112
|
+
* with when it expires. Absent: such files go up when the message is sent
|
|
113
|
+
* instead.
|
|
114
|
+
*/
|
|
115
|
+
onUploadAttachment?: (draft: DraftAttachment, signal?: AbortSignal) => Promise<UploadedFile>;
|
|
91
116
|
/** Rejects when the send fails, so the composer can keep its attachments. */
|
|
92
117
|
onSendMessage: (body: string, attachments?: OutgoingAttachment[], action?: AgentUiAction) => Promise<void>;
|
|
118
|
+
/** Re-sends a failed bubble; rejects when it fails again. Absent: no retry. */
|
|
119
|
+
onRetryMessage?: (messageId: string) => Promise<void>;
|
|
93
120
|
onIdentifyVisitor?: (data: {
|
|
94
121
|
email?: string;
|
|
95
122
|
name?: string;
|
|
@@ -103,6 +130,8 @@ export interface ChatViewProps {
|
|
|
103
130
|
}) => Promise<ConversationRatingResult>;
|
|
104
131
|
/** The widget's default language — rating reasons fall back to it. */
|
|
105
132
|
defaultLocale?: string;
|
|
133
|
+
/** A message's photos share one album (default true; `boot({ photoAlbums })`). */
|
|
134
|
+
photoAlbums?: boolean;
|
|
106
135
|
onLoadMore: () => void;
|
|
107
136
|
onTyping: (isTyping: boolean) => void;
|
|
108
137
|
onBack: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatView.types.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/chat/ChatView.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,kDAAkD;AAElD,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAChF,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAChB,wBAAwB,EACxB,OAAO,EACP,kBAAkB,EACnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAElE,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,YAAY,EAAE,MAAM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AAM,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/F,sFAAsF;IACtF,kBAAkB,CAAC,EAAE,CACnB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,KACxD,OAAO,CAAC,wBAAwB,CAAC,CAAC;IACvC,sEAAsE;IACtE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kFAAkF;IAClF,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,QAAQ,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConversationsList.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/conversations/ConversationsList.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAYH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAExE,wBAAgB,iBAAiB,CAAC,EAChC,aAAa,EACb,oBAAoB,EACpB,KAAK,EACL,qBAAqB,EACrB,yBAAyB,EACzB,QAAQ,EACR,sBAAsB,EACtB,MAAM,EACN,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,OAAO,GACR,EAAE,sBAAsB,+
|
|
1
|
+
{"version":3,"file":"ConversationsList.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/conversations/ConversationsList.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAYH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAExE,wBAAgB,iBAAiB,CAAC,EAChC,aAAa,EACb,oBAAoB,EACpB,KAAK,EACL,qBAAqB,EACrB,yBAAyB,EACzB,QAAQ,EACR,sBAAsB,EACtB,MAAM,EACN,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,OAAO,GACR,EAAE,sBAAsB,+BA+GxB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** Props and label bundle for the Messages space. */
|
|
2
2
|
import type { Conversation } from '../../../types';
|
|
3
|
+
import type { LastMessageLabels } from '../../components/ConversationRow';
|
|
3
4
|
import type { RelativeTimeLabels } from '../../utils/conversations';
|
|
4
5
|
export interface ConversationsListLabels {
|
|
5
6
|
messages: string;
|
|
@@ -13,6 +14,7 @@ export interface ConversationsListLabels {
|
|
|
13
14
|
time: RelativeTimeLabels;
|
|
14
15
|
/** Template with a `{count}` token. */
|
|
15
16
|
unread: string;
|
|
17
|
+
lastMessage: LastMessageLabels;
|
|
16
18
|
}
|
|
17
19
|
export interface ConversationsListProps {
|
|
18
20
|
conversations: Conversation[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConversationsList.types.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/conversations/ConversationsList.types.ts"],"names":[],"mappings":"AAAA,qDAAqD;AAErD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,kBAAkB,CAAC;IACzB,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"ConversationsList.types.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/conversations/ConversationsList.types.ts"],"names":[],"mappings":"AAAA,qDAAqD;AAErD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,kBAAkB,CAAC;IACzB,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,iBAAiB,CAAC;CAChC;AAED,MAAM,WAAW,sBAAsB;IACrC,aAAa,EAAE,YAAY,EAAE,CAAC;IAC9B,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,qBAAqB,EAAE,OAAO,CAAC;IAC/B,yBAAyB,EAAE,OAAO,CAAC;IACnC,QAAQ,EAAE,OAAO,CAAC;IAClB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,MAAM,EAAE,uBAAuB,CAAC;IAChC,QAAQ,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACtC,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Home space — branded greeting header, the
|
|
3
|
-
*
|
|
2
|
+
* Home space — branded greeting header, the newest conversation in a "Recent
|
|
3
|
+
* message" card, the "start a conversation" card under it and a
|
|
4
|
+
* team/availability strip.
|
|
4
5
|
* Port of `client/src/widget/components/HomeView.tsx`.
|
|
5
6
|
*
|
|
6
7
|
* The header meets the white body on a straight seam, the same as the web
|
|
7
8
|
* widget. Whether that seam is a hard edge or the background washing out into
|
|
8
|
-
* white is the dashboard's `homeBackgroundFade` toggle, and the
|
|
9
|
-
*
|
|
9
|
+
* white is the dashboard's `homeBackgroundFade` toggle, and the first card (the
|
|
10
|
+
* recent message, or the start card when there is none) sits astride it either
|
|
11
|
+
* way: top over the brand background, bottom over white.
|
|
10
12
|
*
|
|
11
13
|
* Everything on this screen comes from the widget config or the conversations
|
|
12
14
|
* the visitor already has; nothing here assumes a field the backend does not
|
|
@@ -20,5 +22,5 @@ import type { HomeViewProps } from './HomeView.types';
|
|
|
20
22
|
* derive something legible from the background instead.
|
|
21
23
|
*/
|
|
22
24
|
export declare function resolveHeaderTextColor(config: WidgetConfig | null, fallbackColor: string): string;
|
|
23
|
-
export declare function HomeView({ config, color, visitorName, conversationCount,
|
|
25
|
+
export declare function HomeView({ config, color, visitorName, conversationCount, recentConversation, unreadByConversation, teamAgents, isOnline, offlineMessage, startConversationLabel, replyTimeLabel, allowNewConversations, showPreviousConversations, labels, onClose, onStartConversation, onOpenConversation, }: HomeViewProps): import("react").JSX.Element;
|
|
24
26
|
//# sourceMappingURL=HomeView.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HomeView.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/home/HomeView.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"HomeView.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/home/HomeView.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAcH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AA2BnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,CAQjG;AAED,wBAAgB,QAAQ,CAAC,EACvB,MAAM,EACN,KAAK,EACL,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,UAAU,EACV,QAAQ,EACR,cAAc,EACd,sBAAsB,EACtB,cAAc,EACd,qBAAqB,EACrB,yBAAyB,EACzB,MAAM,EACN,OAAO,EACP,mBAAmB,EACnB,kBAAkB,GACnB,EAAE,aAAa,+BAkMf"}
|
|
@@ -4,15 +4,16 @@
|
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* Header geometry in dp, measured off the web widget so the two surfaces line
|
|
7
|
-
* up: a tall header with the greeting pinned low, a
|
|
7
|
+
* up: a tall header with the greeting pinned low, a first card that overhangs
|
|
8
8
|
* the seam by a fixed amount rather than half its height, and a fade that is a
|
|
9
9
|
* straight white ramp over the bottom of the header, starting just under the
|
|
10
10
|
* heading.
|
|
11
11
|
*/
|
|
12
12
|
export declare const HEADER_MIN_HEIGHT = 228;
|
|
13
|
-
/** Between the greeting and whatever comes next: the seam, or the
|
|
13
|
+
/** Between the greeting and whatever comes next: the seam, or the first card. */
|
|
14
14
|
export declare const HEADER_BOTTOM_PADDING = 36;
|
|
15
|
-
|
|
15
|
+
/** How far the first card (recent message, else the start card) rides up over the seam. */
|
|
16
|
+
export declare const LEAD_CARD_LIFT = 28;
|
|
16
17
|
export declare const START_CARD_MIN_HEIGHT = 76;
|
|
17
18
|
export declare const HEADER_FADE_HEIGHT = 90;
|
|
18
19
|
export declare const CLOSE_BUTTON_SIZE = 28;
|
|
@@ -98,8 +99,33 @@ export declare const styles: {
|
|
|
98
99
|
lineHeight: number;
|
|
99
100
|
color: "#92400e";
|
|
100
101
|
};
|
|
101
|
-
|
|
102
|
+
leadCards: {
|
|
102
103
|
marginTop: number;
|
|
104
|
+
gap: 12;
|
|
105
|
+
};
|
|
106
|
+
recentCard: {
|
|
107
|
+
shadowColor: "#0f172a";
|
|
108
|
+
shadowOffset: {
|
|
109
|
+
readonly width: 0;
|
|
110
|
+
readonly height: 4;
|
|
111
|
+
};
|
|
112
|
+
shadowOpacity: 0.08;
|
|
113
|
+
shadowRadius: 14;
|
|
114
|
+
elevation: 3;
|
|
115
|
+
paddingTop: 16;
|
|
116
|
+
paddingBottom: 8;
|
|
117
|
+
borderRadius: 12;
|
|
118
|
+
borderWidth: number;
|
|
119
|
+
borderColor: "#e5e7eb";
|
|
120
|
+
backgroundColor: "#ffffff";
|
|
121
|
+
};
|
|
122
|
+
recentTitle: {
|
|
123
|
+
textAlign: "left" | "right";
|
|
124
|
+
paddingHorizontal: 20;
|
|
125
|
+
marginBottom: 4;
|
|
126
|
+
fontSize: 17;
|
|
127
|
+
fontWeight: "600";
|
|
128
|
+
color: "#1a1a1a";
|
|
103
129
|
};
|
|
104
130
|
startCard: {
|
|
105
131
|
shadowColor: "#0f172a";
|
|
@@ -147,37 +173,6 @@ export declare const styles: {
|
|
|
147
173
|
color: "#9ca3af";
|
|
148
174
|
marginTop: number;
|
|
149
175
|
};
|
|
150
|
-
recentHeader: {
|
|
151
|
-
flexDirection: "row";
|
|
152
|
-
alignItems: "center";
|
|
153
|
-
justifyContent: "space-between";
|
|
154
|
-
minHeight: number;
|
|
155
|
-
marginBottom: 8;
|
|
156
|
-
};
|
|
157
|
-
recentTitle: {
|
|
158
|
-
textAlign: "left" | "right";
|
|
159
|
-
fontSize: 12;
|
|
160
|
-
fontWeight: "700";
|
|
161
|
-
color: "#6b7280";
|
|
162
|
-
letterSpacing: number;
|
|
163
|
-
textTransform: "uppercase";
|
|
164
|
-
};
|
|
165
|
-
viewAllButton: {
|
|
166
|
-
minHeight: number;
|
|
167
|
-
paddingHorizontal: 4;
|
|
168
|
-
justifyContent: "center";
|
|
169
|
-
};
|
|
170
|
-
viewAllLabel: {
|
|
171
|
-
textAlign: "left" | "right";
|
|
172
|
-
fontSize: 13;
|
|
173
|
-
fontWeight: "600";
|
|
174
|
-
};
|
|
175
|
-
recentCard: {
|
|
176
|
-
overflow: "hidden";
|
|
177
|
-
};
|
|
178
|
-
recentDivider: {
|
|
179
|
-
marginStart: number;
|
|
180
|
-
};
|
|
181
176
|
spacer: {
|
|
182
177
|
flex: number;
|
|
183
178
|
minHeight: 16;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HomeView.styles.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/home/HomeView.styles.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"HomeView.styles.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/home/HomeView.styles.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,MAAM,CAAC;AACrC,iFAAiF;AACjF,eAAO,MAAM,qBAAqB,KAAK,CAAC;AACxC,2FAA2F;AAC3F,eAAO,MAAM,cAAc,KAAK,CAAC;AACjC,eAAO,MAAM,qBAAqB,KAAK,CAAC;AACxC,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,eAAO,MAAM,iBAAiB,KAAK,CAAC;AACpC,qFAAqF;AACrF,eAAO,MAAM,WAAW,KAAK,CAAC;AAC9B,eAAO,MAAM,cAAc,MAAM,CAAC;AAClC,eAAO,MAAM,eAAe,KAAK,CAAC;AAElC,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgNjB,CAAC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/** Props and label bundle for the Home space. */
|
|
2
2
|
import type { Conversation, WidgetConfig } from '../../../types';
|
|
3
|
+
import type { LastMessageLabels } from '../../components/ConversationRow';
|
|
3
4
|
import type { RelativeTimeLabels, TeamAgent } from '../../utils/conversations';
|
|
4
5
|
export interface HomeViewLabels {
|
|
5
6
|
close: string;
|
|
6
|
-
/**
|
|
7
|
-
viewPrevious: string;
|
|
8
|
-
viewAll: string;
|
|
7
|
+
/** Heading inside the "Recent message" card. */
|
|
9
8
|
recentTitle: string;
|
|
10
9
|
noConversations: string;
|
|
11
10
|
statusOnline: string;
|
|
@@ -15,14 +14,15 @@ export interface HomeViewLabels {
|
|
|
15
14
|
time: RelativeTimeLabels;
|
|
16
15
|
/** Template with a `{count}` token. */
|
|
17
16
|
unread: string;
|
|
17
|
+
lastMessage: LastMessageLabels;
|
|
18
18
|
}
|
|
19
19
|
export interface HomeViewProps {
|
|
20
20
|
config: WidgetConfig | null;
|
|
21
21
|
color: string;
|
|
22
22
|
visitorName?: string;
|
|
23
23
|
conversationCount: number;
|
|
24
|
-
/**
|
|
25
|
-
|
|
24
|
+
/** The newest conversation, picked by the provider; none before the first one. */
|
|
25
|
+
recentConversation?: Conversation;
|
|
26
26
|
unreadByConversation: Record<string, number>;
|
|
27
27
|
teamAgents: TeamAgent[];
|
|
28
28
|
isOnline: boolean;
|
|
@@ -34,7 +34,6 @@ export interface HomeViewProps {
|
|
|
34
34
|
labels: HomeViewLabels;
|
|
35
35
|
onClose: () => void;
|
|
36
36
|
onStartConversation: () => void;
|
|
37
|
-
onViewConversations: () => void;
|
|
38
37
|
onOpenConversation: (conversationId: string) => void;
|
|
39
38
|
}
|
|
40
39
|
//# sourceMappingURL=HomeView.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HomeView.types.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/home/HomeView.types.ts"],"names":[],"mappings":"AAAA,iDAAiD;AAEjD,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAE/E,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,
|
|
1
|
+
{"version":3,"file":"HomeView.types.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/home/HomeView.types.ts"],"names":[],"mappings":"AAAA,iDAAiD;AAEjD,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,KAAK,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAE/E,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,gDAAgD;IAChD,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,gEAAgE;IAChE,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,kBAAkB,CAAC;IACzB,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,iBAAiB,CAAC;CAChC;AAED,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,YAAY,GAAG,IAAI,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kFAAkF;IAClF,kBAAkB,CAAC,EAAE,YAAY,CAAC;IAClC,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7C,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,QAAQ,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,yBAAyB,EAAE,OAAO,CAAC;IACnC,MAAM,EAAE,cAAc,CAAC;IACvB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,kBAAkB,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,IAAI,CAAC;CACtD"}
|
|
@@ -62,6 +62,8 @@ export interface WidgetTheme {
|
|
|
62
62
|
allowNewConversations: boolean;
|
|
63
63
|
showPreviousConversations: boolean;
|
|
64
64
|
attachmentsEnabled: boolean;
|
|
65
|
+
/** The server's upload cap; null when it only takes files inline in the message. */
|
|
66
|
+
maxAttachmentBytes: number | null;
|
|
65
67
|
preChatEnabled: boolean;
|
|
66
68
|
}
|
|
67
69
|
export declare const DEFAULT_PRIMARY_COLOR = "#0d9488";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../../src/ui/styles/theme.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;CAkBV,CAAC;AAEX,eAAO,MAAM,MAAM;;;;;;CAMT,CAAC;AAEX,eAAO,MAAM,OAAO;;;;;;;CAOV,CAAC;AAEX,iEAAiE;AACjE,eAAO,MAAM,QAAQ;;;;;;;;;CASX,CAAC;AAEX,MAAM,WAAW,WAAW;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3B,QAAQ,EAAE,OAAO,CAAC;IAClB,4EAA4E;IAC5E,cAAc,CAAC,EAAE,MAAM,CAA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AG,IAAI,GAAG,WAAW,CAoBnE;AAED,kFAAkF;AAClF,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAI9D;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAYvE;AAED,wFAAwF;AACxF,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAMtE;AAED,kEAAkE;AAClE,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAM/D;AAED,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;CAeV,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Conversation selectors and formatting shared by the Home and Messages
|
|
3
|
-
* spaces
|
|
3
|
+
* spaces (and the store and chat thread, for message helpers), so they can
|
|
4
|
+
* never disagree about ordering or wording.
|
|
4
5
|
* Pure and free of React so they stay trivial to test.
|
|
5
6
|
*/
|
|
6
|
-
import type { Conversation } from '../../types';
|
|
7
|
+
import type { Conversation, Message } from '../../types';
|
|
7
8
|
export interface TeamAgent {
|
|
8
9
|
name: string | null;
|
|
9
10
|
avatar: string | null;
|
|
@@ -38,4 +39,11 @@ export declare function formatDayLabel(dateStr: string, locale: string, labels:
|
|
|
38
39
|
today: string;
|
|
39
40
|
yesterday: string;
|
|
40
41
|
}): string;
|
|
42
|
+
/** Optimistic visitor bubbles the server hasn't acknowledged (pending/failed). */
|
|
43
|
+
export declare function isLocalMessage(message: Message): boolean;
|
|
44
|
+
/**
|
|
45
|
+
* The visitor's own bubble that never reached the server. A `failed` status
|
|
46
|
+
* the server sets on any other message isn't something this device can re-send.
|
|
47
|
+
*/
|
|
48
|
+
export declare function canRetryMessage(message: Message): boolean;
|
|
41
49
|
//# sourceMappingURL=conversations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversations.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/conversations.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"conversations.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/conversations.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEzD,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAOD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,aAAa,EAAE,YAAY,EAAE,GAAG,YAAY,EAAE,CAE3E;AAED,wBAAgB,uBAAuB,CAAC,aAAa,EAAE,YAAY,EAAE,EAAE,KAAK,SAAI,GAAG,YAAY,EAAE,CAEhG;AAED,iFAAiF;AACjF,wBAAgB,cAAc,CAAC,aAAa,EAAE,YAAY,EAAE,EAAE,KAAK,SAAI,GAAG,SAAS,EAAE,CAepF;AAED,4EAA4E;AAC5E,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,kBAAkB,GAAG,MAAM,CActF;AAKD,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAQvE;AAED,yEAAyE;AACzE,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,MAAM,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAC3C,MAAM,CAmBR;AAED,kFAAkF;AAClF,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAExD;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAEzD"}
|
|
@@ -6,6 +6,11 @@
|
|
|
6
6
|
export declare function decodeEntities(text: string): string;
|
|
7
7
|
/** Block-level tags become newlines so paragraphs survive the strip. */
|
|
8
8
|
export declare function stripHtml(html: string): string;
|
|
9
|
+
/**
|
|
10
|
+
* Agent reply HTML → the Markdown subset `Markdown` draws: paragraphs, line
|
|
11
|
+
* breaks, lists, bold, italic, inline code and links. Other tags keep their text.
|
|
12
|
+
*/
|
|
13
|
+
export declare function htmlToMarkdown(html: string): string;
|
|
9
14
|
/** Single-line flattening used for campaign cards and list snippets. */
|
|
10
15
|
export declare function htmlToText(html: string): string;
|
|
11
16
|
//# sourceMappingURL=html.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/html.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAoBH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAInD;AAED,wEAAwE;AACxE,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAW9C;AAED,wEAAwE;AACxE,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAU/C"}
|
|
1
|
+
{"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/html.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAoBH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAInD;AAED,wEAAwE;AACxE,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAW9C;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAoBnD;AAED,wEAAwE;AACxE,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAU/C"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lets images load a few at a time, highest priority first. The chat runs its
|
|
3
|
+
* large images through it: Android holds a whole download in a memory pool
|
|
4
|
+
* capped at three quarters of the app's heap (192 MB on a 256 MB phone), so
|
|
5
|
+
* several 30–50 MB photos at once overflow it and every one of them fails.
|
|
6
|
+
*
|
|
7
|
+
* No `react-native` import on purpose: it stays testable in plain Node.
|
|
8
|
+
*/
|
|
9
|
+
export declare class ImageLoadQueue {
|
|
10
|
+
private readonly concurrency;
|
|
11
|
+
private readonly waiting;
|
|
12
|
+
private readonly loading;
|
|
13
|
+
private readonly done;
|
|
14
|
+
/** The images on screen; null until the list says, so all of them count. */
|
|
15
|
+
private onScreen;
|
|
16
|
+
private readonly listeners;
|
|
17
|
+
private scheduled;
|
|
18
|
+
constructor(concurrency: number);
|
|
19
|
+
/** Queues a mounted image; the returned cleanup gives up its place. */
|
|
20
|
+
add(key: string, priority: number): () => void;
|
|
21
|
+
/** Loaded or failed: it keeps showing, and the next image may start. */
|
|
22
|
+
finish(key: string): void;
|
|
23
|
+
canLoad: (key: string) => boolean;
|
|
24
|
+
subscribe: (listener: () => void) => (() => void);
|
|
25
|
+
/**
|
|
26
|
+
* The images now on screen. One that scrolls off before it has loaded
|
|
27
|
+
* gives up its place and waits, so it can't hold up the ones in view:
|
|
28
|
+
* Android detaches a row scrolled out of view, and a detached image never
|
|
29
|
+
* finishes loading. Only images on screen are started.
|
|
30
|
+
*/
|
|
31
|
+
setOnScreen(keys: Iterable<string>): void;
|
|
32
|
+
/** Scrolled out of the list before it loaded: it queues again if it comes back. */
|
|
33
|
+
private remove;
|
|
34
|
+
/**
|
|
35
|
+
* Hands out places once the render that mounted an image is done, so all
|
|
36
|
+
* the images mounted together are queued first, whatever order they
|
|
37
|
+
* mounted in.
|
|
38
|
+
*/
|
|
39
|
+
private schedule;
|
|
40
|
+
/** Starts what fits; true when anything started (listeners were told). */
|
|
41
|
+
private advance;
|
|
42
|
+
private notify;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=image-load-queue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-load-queue.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/image-load-queue.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,qBAAa,cAAc;IAUb,OAAO,CAAC,QAAQ,CAAC,WAAW;IARxC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA6B;IACrD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA6B;IACrD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAqB;IAC1C,4EAA4E;IAC5E,OAAO,CAAC,QAAQ,CAAoC;IACpD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAyB;IACnD,OAAO,CAAC,SAAS,CAAS;gBAEG,WAAW,EAAE,MAAM;IAEhD,uEAAuE;IACvE,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,IAAI;IAQ9C,wEAAwE;IACxE,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAMzB,OAAO,GAAI,KAAK,MAAM,KAAG,OAAO,CAAgD;IAEhF,SAAS,GAAI,UAAU,MAAM,IAAI,KAAG,CAAC,MAAM,IAAI,CAAC,CAK9C;IAEF;;;;;OAKG;IACH,WAAW,CAAC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,IAAI;IAYzC,mFAAmF;IACnF,OAAO,CAAC,MAAM;IAKd;;;;OAIG;IACH,OAAO,CAAC,QAAQ;IAShB,0EAA0E;IAC1E,OAAO,CAAC,OAAO;IAoBf,OAAO,CAAC,MAAM;CAGf"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent replies with images between their paragraphs. Workstation marks such
|
|
3
|
+
* images `inline` among the message's attachments and keeps an `<img>` for
|
|
4
|
+
* each in the HTML body, where the teammate put it. Same split as the web
|
|
5
|
+
* Messenger, so both show the text and images in the order they were written.
|
|
6
|
+
*/
|
|
7
|
+
import type { WidgetAttachment } from '../../types';
|
|
8
|
+
/** Markdown for the bubble to draw, or one attachment. */
|
|
9
|
+
export type MessagePart = {
|
|
10
|
+
text: string;
|
|
11
|
+
} | {
|
|
12
|
+
attachment: WidgetAttachment;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* The body and its inline images in order, plus the other attachments
|
|
16
|
+
* (`files`) that show after them. Null when nothing is inline: the bubble then
|
|
17
|
+
* shows the body, followed by every attachment.
|
|
18
|
+
*
|
|
19
|
+
* An `<img>` finds its attachment by the id in its URL. In a body whose
|
|
20
|
+
* images carry no ids, they take the attachments in order instead; in one
|
|
21
|
+
* that does, an image without an id (a logo, an emoji) isn't one of the files
|
|
22
|
+
* and takes nothing. One whose id names no remaining attachment (the same file
|
|
23
|
+
* twice) takes nothing either. Inline attachments with no `<img>` go at the end.
|
|
24
|
+
*/
|
|
25
|
+
export declare function splitInlineAttachments(body: string | null | undefined, attachments: WidgetAttachment[] | null | undefined): {
|
|
26
|
+
parts: MessagePart[];
|
|
27
|
+
files: WidgetAttachment[];
|
|
28
|
+
} | null;
|
|
29
|
+
//# sourceMappingURL=inline-attachments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inline-attachments.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/inline-attachments.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGpD,0DAA0D;AAC1D,MAAM,MAAM,WAAW,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,UAAU,EAAE,gBAAgB,CAAA;CAAE,CAAC;AAE9E;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC/B,WAAW,EAAE,gBAAgB,EAAE,GAAG,IAAI,GAAG,SAAS,GACjD;IAAE,KAAK,EAAE,WAAW,EAAE,CAAC;IAAC,KAAK,EAAE,gBAAgB,EAAE,CAAA;CAAE,GAAG,IAAI,CA8B5D"}
|