@repzo/widget-react-native 1.3.1 → 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 +137 -5
- package/README.md +64 -12
- package/lib/commonjs/api/client.js +96 -23
- 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 +20 -29
- package/lib/commonjs/attachments/pickers.js.map +1 -1
- package/lib/commonjs/i18n.js +22 -3
- package/lib/commonjs/i18n.js.map +1 -1
- package/lib/commonjs/locales.js +12 -3
- package/lib/commonjs/locales.js.map +1 -1
- package/lib/commonjs/state/widget-store.js +277 -30
- 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 +33 -13
- 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 +229 -24
- 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/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 +637 -164
- package/lib/commonjs/ui/screens/chat/ChatView.js.map +1 -1
- package/lib/commonjs/ui/screens/chat/ChatView.styles.js +138 -1
- 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/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 +96 -23
- 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 +15 -25
- package/lib/module/attachments/pickers.js.map +1 -1
- package/lib/module/i18n.js +22 -3
- package/lib/module/i18n.js.map +1 -1
- package/lib/module/locales.js +12 -3
- package/lib/module/locales.js.map +1 -1
- package/lib/module/state/widget-store.js +279 -32
- 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 +33 -13
- 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 +231 -26
- 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/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 +641 -168
- package/lib/module/ui/screens/chat/ChatView.js.map +1 -1
- package/lib/module/ui/screens/chat/ChatView.styles.js +140 -2
- 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/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 +12 -4
- 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 +15 -2
- package/lib/typescript/commonjs/attachments/pickers.d.ts.map +1 -1
- package/lib/typescript/commonjs/i18n.d.ts +12 -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 +40 -1
- 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 +41 -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/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 +144 -0
- 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 +26 -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/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 +12 -4
- 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 +15 -2
- package/lib/typescript/module/attachments/pickers.d.ts.map +1 -1
- package/lib/typescript/module/i18n.d.ts +12 -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 +40 -1
- 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 +41 -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/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 +144 -0
- 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 +26 -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/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 +116 -34
- package/src/attachments/file-size.ts +42 -0
- package/src/attachments/local-previews.ts +32 -0
- package/src/attachments/pickers.ts +23 -25
- package/src/i18n.ts +22 -3
- package/src/locales.ts +12 -3
- package/src/state/widget-store.ts +322 -50
- package/src/storage.ts +2 -0
- package/src/types.ts +41 -0
- package/src/ui/WidgetProvider.tsx +35 -8
- package/src/ui/components/AttachmentChips.tsx +100 -29
- package/src/ui/components/ConversationRow.tsx +90 -9
- package/src/ui/components/ImageViewer.tsx +242 -24
- package/src/ui/components/RatingCard.tsx +5 -2
- package/src/ui/components/ZoomableImage.tsx +58 -5
- package/src/ui/hooks/use-retained-state.ts +35 -0
- package/src/ui/screens/chat/ChatView.styles.ts +139 -1
- package/src/ui/screens/chat/ChatView.tsx +721 -197
- package/src/ui/screens/chat/ChatView.types.ts +26 -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/utils/html.ts +26 -0
- package/src/ui/utils/image-load-queue.ts +108 -0
- package/src/ui/utils/inline-attachments.ts +71 -0
|
@@ -1,16 +1,26 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Picked-but-unsent attachments above the composer: a thumbnail for images, a
|
|
3
3
|
* name + size card for everything else, each with its own remove button.
|
|
4
|
+
* A file that uploads ahead of the send shows a spinner until it's up, and
|
|
5
|
+
* turns into a retry button when the upload fails.
|
|
4
6
|
*/
|
|
5
7
|
import { type DraftAttachment } from '../../attachments/pickers';
|
|
6
8
|
interface AttachmentChipsProps {
|
|
7
9
|
attachments: DraftAttachment[];
|
|
8
10
|
/** While a send is in flight the chips are dimmed and can't be removed. */
|
|
9
11
|
disabled?: boolean;
|
|
10
|
-
/**
|
|
11
|
-
|
|
12
|
+
/** `remove`, `uploading` and `uploadFailed` keep their `{name}` placeholder; filled per chip. */
|
|
13
|
+
labels: {
|
|
14
|
+
remove: string;
|
|
15
|
+
uploading: string;
|
|
16
|
+
uploadFailed: string;
|
|
17
|
+
retry: string;
|
|
18
|
+
};
|
|
19
|
+
/** Removing a chip mid-upload cancels the upload. */
|
|
12
20
|
onRemove: (id: string) => void;
|
|
21
|
+
/** Starts a failed upload again. */
|
|
22
|
+
onRetry: (id: string) => void;
|
|
13
23
|
}
|
|
14
|
-
export declare function AttachmentChips({ attachments, disabled,
|
|
24
|
+
export declare function AttachmentChips({ attachments, disabled, labels, onRemove, onRetry, }: AttachmentChipsProps): import("react").JSX.Element;
|
|
15
25
|
export {};
|
|
16
26
|
//# sourceMappingURL=AttachmentChips.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttachmentChips.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/AttachmentChips.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"AttachmentChips.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/AttachmentChips.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,2BAA2B,CAAC;AAOnC,UAAU,oBAAoB;IAC5B,WAAW,EAAE,eAAe,EAAE,CAAC;IAC/B,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iGAAiG;IACjG,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IACnF,qDAAqD;IACrD,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,oCAAoC;IACpC,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/B;AAED,wBAAgB,eAAe,CAAC,EAC9B,WAAW,EACX,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,OAAO,GACR,EAAE,oBAAoB,+BAsFtB"}
|
|
@@ -5,6 +5,13 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type { Conversation } from '../../types';
|
|
7
7
|
import { type RelativeTimeLabels } from '../utils/conversations';
|
|
8
|
+
export interface LastMessageLabels {
|
|
9
|
+
/** Stand in for a newest message that had no words, only photos or other files. */
|
|
10
|
+
photo: string;
|
|
11
|
+
file: string;
|
|
12
|
+
/** Before the visitor's own newest message; keeps `{message}`. Empty: no prefix (`boot({ youPrefix: false })`). */
|
|
13
|
+
you: string;
|
|
14
|
+
}
|
|
8
15
|
interface ConversationRowProps {
|
|
9
16
|
conversation: Conversation;
|
|
10
17
|
color: string;
|
|
@@ -15,11 +22,18 @@ interface ConversationRowProps {
|
|
|
15
22
|
unreadCount?: number;
|
|
16
23
|
/** Template with a `{count}` token, for screen readers. */
|
|
17
24
|
unreadLabel?: string;
|
|
25
|
+
lastMessageLabels?: LastMessageLabels;
|
|
18
26
|
/** Messages runs full-bleed; Home insets it inside a card. */
|
|
19
27
|
horizontalPadding?: number;
|
|
28
|
+
/**
|
|
29
|
+
* `card` is Home's "Recent message" card: a smaller avatar, a regular-weight
|
|
30
|
+
* name with the time right after it, and no chevron. The words, unread state
|
|
31
|
+
* and screen-reader label are the list's.
|
|
32
|
+
*/
|
|
33
|
+
variant?: 'list' | 'card';
|
|
20
34
|
onPress: () => void;
|
|
21
35
|
}
|
|
22
|
-
export declare function ConversationRow({ conversation, color, fallbackName, timeLabels, unreadCount, unreadLabel, horizontalPadding, onPress, }: ConversationRowProps): import("react").JSX.Element;
|
|
36
|
+
export declare function ConversationRow({ conversation, color, fallbackName, timeLabels, unreadCount, unreadLabel, lastMessageLabels, horizontalPadding, variant, onPress, }: ConversationRowProps): import("react").JSX.Element;
|
|
23
37
|
/** Where a divider should start so it sits under the text, not the avatar. */
|
|
24
38
|
export declare function rowDividerInset(horizontalPadding?: number): number;
|
|
25
39
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConversationRow.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/ConversationRow.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,OAAO,EAAsB,KAAK,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"ConversationRow.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/ConversationRow.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,OAAO,EAAsB,KAAK,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAQrF,MAAM,WAAW,iBAAiB;IAChC,mFAAmF;IACnF,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,mHAAmH;IACnH,GAAG,EAAE,MAAM,CAAC;CACb;AAED,UAAU,oBAAoB;IAC5B,YAAY,EAAE,YAAY,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,0DAA0D;IAC1D,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,kBAAkB,CAAC;IAC/B,sEAAsE;IACtE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2DAA2D;IAC3D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,8DAA8D;IAC9D,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,wBAAgB,eAAe,CAAC,EAC9B,YAAY,EACZ,KAAK,EACL,YAAY,EACZ,UAAU,EACV,WAAe,EACf,WAAW,EACX,iBAAiB,EACjB,iBAA8B,EAC9B,OAAgB,EAChB,OAAO,GACR,EAAE,oBAAoB,+BAwEtB;AASD,8EAA8E;AAC9E,wBAAgB,eAAe,CAAC,iBAAiB,GAAE,MAAmB,GAAG,MAAM,CAE9E"}
|
|
@@ -1,23 +1,43 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Full-screen viewer for image attachments, so a tap on a photo the agent sent
|
|
3
3
|
* stays inside the messenger instead of bouncing to the browser. Pinch, drag
|
|
4
|
-
* and double-tap zoom work on iOS and Android (see ZoomableImage).
|
|
4
|
+
* and double-tap zoom work on iOS and Android (see ZoomableImage). With
|
|
5
|
+
* several photos in one message, a sideways swipe moves between them.
|
|
5
6
|
*/
|
|
6
7
|
export interface ImageViewerLabels {
|
|
7
8
|
close: string;
|
|
8
9
|
loadFailed: string;
|
|
9
10
|
openExternally: string;
|
|
11
|
+
/** Screen-reader position in a message's photos; keeps `{current}` and `{total}`. */
|
|
12
|
+
position: string;
|
|
13
|
+
}
|
|
14
|
+
export interface ViewerImage {
|
|
15
|
+
url: string;
|
|
16
|
+
name: string;
|
|
17
|
+
/**
|
|
18
|
+
* A download big enough to take its turn in the chat (Android's download
|
|
19
|
+
* pool, see `ImageLoadQueue`): it isn't fetched ahead of a swipe, only once
|
|
20
|
+
* it's the photo on screen.
|
|
21
|
+
*/
|
|
22
|
+
large?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Shown instead when `url` can't load: the stored copy behind a photo the
|
|
25
|
+
* visitor sent, whose copy on the phone the OS may have cleared.
|
|
26
|
+
*/
|
|
27
|
+
fallbackUrl?: string;
|
|
28
|
+
}
|
|
29
|
+
/** The photos of one message, opened at the one tapped. */
|
|
30
|
+
export interface ViewerGallery {
|
|
31
|
+
images: ViewerImage[];
|
|
32
|
+
index: number;
|
|
10
33
|
}
|
|
11
34
|
interface ImageViewerProps {
|
|
12
|
-
|
|
13
|
-
url: string;
|
|
14
|
-
name: string;
|
|
15
|
-
} | null;
|
|
35
|
+
gallery: ViewerGallery | null;
|
|
16
36
|
labels: ImageViewerLabels;
|
|
17
37
|
onClose: () => void;
|
|
18
38
|
/** Escape hatch when the image can't render here (e.g. unsupported format). */
|
|
19
39
|
onOpenExternally: (url: string) => void;
|
|
20
40
|
}
|
|
21
|
-
export declare function ImageViewer({
|
|
41
|
+
export declare function ImageViewer({ gallery, labels, onClose, onOpenExternally }: ImageViewerProps): import("react").JSX.Element;
|
|
22
42
|
export {};
|
|
23
43
|
//# sourceMappingURL=ImageViewer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageViewer.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/ImageViewer.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"ImageViewer.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/ImageViewer.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAyBH,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,qFAAqF;IACrF,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,2DAA2D;AAC3D,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;CACf;AAQD,UAAU,gBAAgB;IACxB,OAAO,EAAE,aAAa,GAAG,IAAI,CAAC;IAC9B,MAAM,EAAE,iBAAiB,CAAC;IAC1B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,+EAA+E;IAC/E,gBAAgB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC;AAED,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,gBAAgB,+BA0N3F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RatingCard.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/RatingCard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,KAAK,EAAE,wBAAwB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"RatingCard.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/RatingCard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,KAAK,EAAE,wBAAwB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAa1E,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,8DAA8D;IAC9D,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,wDAAwD;IACxD,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;CACjD;AAED,qDAAqD;AACrD,eAAO,MAAM,WAAW,GAAI,QAAQ,MAAM,GAAG,IAAI,YAAkC,CAAC;AASpF,uEAAuE;AACvE,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS;;;;;;SAOpF;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,KAAK,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,GAAG,MAAM,CAOnG;AAED,UAAU,eAAe;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,wCAAwC;IACxC,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,+DAA+D;IAC/D,OAAO,EAAE,KAAK,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,gBAAgB,CAAC;IACzB,MAAM,CAAC,EAAE,CACP,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;CACxC;AAED,wBAAgB,UAAU,CAAC,EACzB,QAAQ,EACR,aAAa,EACb,cAAc,EACd,aAAa,EACb,OAAO,EACP,OAAO,EACP,KAAK,EACL,MAAM,EACN,MAAM,GACP,EAAE,eAAe,+BAwJjB"}
|
|
@@ -35,11 +35,20 @@ export declare function zoomAround(start: ZoomView, scale: number, from: {
|
|
|
35
35
|
x: number;
|
|
36
36
|
y: number;
|
|
37
37
|
}): ZoomView;
|
|
38
|
-
|
|
38
|
+
/** A sideways drag at 1×, which the viewer turns into moving between photos. */
|
|
39
|
+
export interface SwipeHandlers {
|
|
40
|
+
/** Follows the finger: how far it has moved sideways, in px. */
|
|
41
|
+
move: (dx: number) => void;
|
|
42
|
+
/** The finger lifted (or a second one landed, with 0s). */
|
|
43
|
+
end: (dx: number, vx: number) => void;
|
|
44
|
+
}
|
|
45
|
+
export declare function ZoomableImage({ uri, accessibilityLabel, onLoad, onError, onSwipe, }: {
|
|
39
46
|
uri: string;
|
|
40
47
|
accessibilityLabel: string;
|
|
41
48
|
onLoad: () => void;
|
|
42
49
|
onError: () => void;
|
|
50
|
+
/** Absent: a drag at 1× leaves the image where it is. */
|
|
51
|
+
onSwipe?: SwipeHandlers;
|
|
43
52
|
}): import("react").JSX.Element;
|
|
44
53
|
export {};
|
|
45
54
|
//# sourceMappingURL=ZoomableImage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ZoomableImage.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/ZoomableImage.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAgBH,eAAO,MAAM,QAAQ,IAAI,CAAC;AAC1B,eAAO,MAAM,eAAe,MAAM,CAAC;AAKnC,mEAAmE;AACnE,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,UAAU,IAAI;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,sEAAsE;AACtE,wBAAgB,UAAU,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAI9D;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,GAAG,QAAQ,CAS5E;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE;IAAE,CAAC,EAAE,MAAM,CAA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,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,QAAQ,CAIjI;AAcD,gFAAgF;AAChF,MAAM,WAAW,aAAa;IAC5B,gEAAgE;IAChE,IAAI,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3B,2DAA2D;IAC3D,GAAG,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC;AAED,wBAAgB,aAAa,CAAC,EAC5B,GAAG,EACH,kBAAkB,EAClB,MAAM,EACN,OAAO,EACP,OAAO,GACR,EAAE;IACD,GAAG,EAAE,MAAM,CAAC;IACZ,kBAAkB,EAAE,MAAM,CAAC;IAC3B,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,yDAAyD;IACzD,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB,+BAgMA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `useState` that outlives its component. The thread is a FlatList, which
|
|
3
|
+
* unmounts rows far off screen; a form the visitor half filled in, or a
|
|
4
|
+
* rating comment, must still be there when they scroll back. Kept in memory
|
|
5
|
+
* for the session, by a key unique to the message.
|
|
6
|
+
*/
|
|
7
|
+
import { type Dispatch, type SetStateAction } from 'react';
|
|
8
|
+
export declare function useRetainedState<T>(key: string, initial: T): [T, Dispatch<SetStateAction<T>>];
|
|
9
|
+
/** Signing out forgets them: the next visitor on the phone starts clean. */
|
|
10
|
+
export declare function clearRetainedState(): void;
|
|
11
|
+
//# sourceMappingURL=use-retained-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-retained-state.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/use-retained-state.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAA+B,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAKxF,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAiB7F;AAED,4EAA4E;AAC5E,wBAAgB,kBAAkB,IAAI,IAAI,CAEzC"}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* Chat thread — message list, typing indicator and composer.
|
|
3
3
|
* Port of `client/src/widget/components/ChatView.tsx`.
|
|
4
4
|
*
|
|
5
|
-
* Mobile differences:
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* Mobile differences: the thread is an inverted list, so it opens on the
|
|
6
|
+
* newest message and older pages load as the visitor scrolls up, and the
|
|
7
|
+
* attach button only shows when the host app has a picker to open (see
|
|
8
8
|
* `attachments/pickers.ts`).
|
|
9
9
|
*/
|
|
10
10
|
import type { ChatViewProps } from './ChatView.types';
|
|
11
|
-
export declare function ChatView({ messages, loading, hasMoreMessages, agentTyping, color, agentName, agentAvatar, agentOnline, isOnline, teamName, teamAvatars, replyTimeLabel, locale, prefillText, offlineMessage, labels, attachmentSources, onPickAttachments, onSendMessage, onRetryMessage, onIdentifyVisitor, onRateConversation, defaultLocale, onLoadMore, onTyping, onBack, onClose, }: ChatViewProps): import("react").JSX.Element;
|
|
11
|
+
export declare function ChatView({ messages, loading, hasMoreMessages, agentTyping, color, agentName, agentAvatar, agentOnline, isOnline, teamName, teamAvatars, replyTimeLabel, locale, prefillText, offlineMessage, labels, attachmentSources, onPickAttachments, onUploadAttachment, onSendMessage, onRetryMessage, onIdentifyVisitor, onRateConversation, defaultLocale, photoAlbums, onLoadMore, onTyping, onBack, onClose, }: ChatViewProps): import("react").JSX.Element;
|
|
12
12
|
//# sourceMappingURL=ChatView.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatView.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/chat/ChatView.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"ChatView.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/chat/ChatView.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAmFH,OAAO,KAAK,EAAc,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAgElE,wBAAgB,QAAQ,CAAC,EACvB,QAAQ,EACR,OAAO,EACP,eAAe,EACf,WAAW,EACX,KAAK,EACL,SAAS,EACT,WAAW,EACX,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,WAAgB,EAChB,cAAc,EACd,MAAM,EACN,WAAW,EACX,cAAc,EACd,MAAM,EACN,iBAAsB,EACtB,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,WAAkB,EAClB,UAAU,EACV,QAAQ,EACR,MAAM,EACN,OAAO,GACR,EAAE,aAAa,+BA4uBf"}
|
|
@@ -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,6 +259,94 @@ export declare const styles: {
|
|
|
203
259
|
width: number;
|
|
204
260
|
height: number;
|
|
205
261
|
borderRadius: 10;
|
|
262
|
+
backgroundColor: string;
|
|
263
|
+
};
|
|
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";
|
|
333
|
+
fontSize: 12;
|
|
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";
|
|
206
350
|
};
|
|
207
351
|
failedRow: {
|
|
208
352
|
flexDirection: "row";
|
|
@@ -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,6 +13,14 @@ 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;
|
|
16
25
|
/** After `failedToSend` on a bubble that can be re-sent. */
|
|
17
26
|
tapToRetry: string;
|
|
@@ -48,7 +57,10 @@ export interface ChatLabels {
|
|
|
48
57
|
/** Screen-reader label for a file card; keeps `{name}`. */
|
|
49
58
|
openAttachment: string;
|
|
50
59
|
}
|
|
51
|
-
/**
|
|
60
|
+
/**
|
|
61
|
+
* Composer attachment copy. Limits are already filled in; `remove`,
|
|
62
|
+
* `uploading` and `uploadFailed` keep `{name}`.
|
|
63
|
+
*/
|
|
52
64
|
export interface AttachLabels {
|
|
53
65
|
button: string;
|
|
54
66
|
photoLibrary: string;
|
|
@@ -61,6 +73,11 @@ export interface AttachLabels {
|
|
|
61
73
|
tooLargeTogether: string;
|
|
62
74
|
failed: string;
|
|
63
75
|
cameraDenied: string;
|
|
76
|
+
uploading: string;
|
|
77
|
+
uploadFailed: string;
|
|
78
|
+
uploadFailedNotice: string;
|
|
79
|
+
/** Under a file chip whose upload failed. */
|
|
80
|
+
retry: string;
|
|
64
81
|
}
|
|
65
82
|
export interface ChatViewProps {
|
|
66
83
|
messages: Message[];
|
|
@@ -90,6 +107,12 @@ export interface ChatViewProps {
|
|
|
90
107
|
attachmentSources?: AttachmentSource[];
|
|
91
108
|
/** Opens a picker and returns what fits beside `current`. Never rejects. */
|
|
92
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>;
|
|
93
116
|
/** Rejects when the send fails, so the composer can keep its attachments. */
|
|
94
117
|
onSendMessage: (body: string, attachments?: OutgoingAttachment[], action?: AgentUiAction) => Promise<void>;
|
|
95
118
|
/** Re-sends a failed bubble; rejects when it fails again. Absent: no retry. */
|
|
@@ -107,6 +130,8 @@ export interface ChatViewProps {
|
|
|
107
130
|
}) => Promise<ConversationRatingResult>;
|
|
108
131
|
/** The widget's default language — rating reasons fall back to it. */
|
|
109
132
|
defaultLocale?: string;
|
|
133
|
+
/** A message's photos share one album (default true; `boot({ photoAlbums })`). */
|
|
134
|
+
photoAlbums?: boolean;
|
|
110
135
|
onLoadMore: () => void;
|
|
111
136
|
onTyping: (isTyping: boolean) => void;
|
|
112
137
|
onBack: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatView.types.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/chat/ChatView.types.ts"],"names":[],"mappings":"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C9B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,gDAAgD;IAChD,mBAAmB,EAAE,MAAM,CAAC;IAC5B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,4CAA4C;IAC5C,cAAc,EAAE,MAAM,CAAC;IACvB,yBAAyB,EAAE,MAAM,CAAC;IAClC,yBAAyB,EAAE,MAAM,CAAC;IAClC,MAAM,EAAE,kBAAkB,CAAC;IAC3B,MAAM,EAAE,gBAAgB,CAAC;IACzB,MAAM,EAAE,YAAY,CAAC;IACrB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,KAAK,EAAE,eAAe,CAAC;IACvB,2DAA2D;IAC3D,cAAc,EAAE,MAAM,CAAC;CACxB;AAED
|
|
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,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,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,iB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,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"}
|