@ethora/chat-component 26.9.8 → 26.10.3
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/README.md +2 -1
- package/dist/{ChatProfileModal-3UH0H5Ec.js → ChatProfileModal-D73ioMj9.js} +44 -44
- package/dist/FilePreviewModal-BeGa8s4u.js +1763 -0
- package/dist/{ManageDataModal-BblTuE9g.js → ManageDataModal-DxhvKwLo.js} +17 -17
- package/dist/{MarkdownBody-RMEx8yW2.js → MarkdownBody-fzjy9KUP.js} +1 -1
- package/dist/{MessageSearchModal-CrYR2EH8.js → MessageSearchModal-3I0b3Nut.js} +40 -40
- package/dist/{PublicChatsModal-Bi5r4mrV.js → PublicChatsModal-Dzwl63q-.js} +19 -19
- package/dist/{SideDrawer-CDAoobvX.js → SideDrawer-BPebE2tZ.js} +37 -37
- package/dist/{UserProfileModal-4Frgvam-.js → UserProfileModal-BS5FZdJb.js} +10 -10
- package/dist/{UserSettingsModal-C-mb-9cb.js → UserSettingsModal-pBqmF_r2.js} +5 -5
- package/dist/{VideoCallOverlay-92dFLb9U.js → VideoCallOverlay-PIg8Z5Xr.js} +3824 -3708
- package/dist/{VisibilityModal-zIAV6dAP.js → VisibilityModal-CnBRSRQ9.js} +11 -11
- package/dist/api.config.d.ts +0 -23
- package/dist/assets/icons.d.ts +2 -3
- package/dist/components/ContextMenu/ContextMenuComponents.d.ts +24 -8
- package/dist/components/ExampleComponents/CustomMessage.d.ts +27 -9
- package/dist/components/Files/fileCategory.d.ts +4 -2
- package/dist/components/MainComponents/AlbumGrid.d.ts +22 -0
- package/dist/components/MainComponents/AttachmentList.d.ts +6 -6
- package/dist/components/MainComponents/ChooseChatMessage.d.ts +12 -4
- package/dist/components/MainComponents/EditWrapper.d.ts +12 -4
- package/dist/components/MainComponents/ImageUnavailable.d.ts +21 -0
- package/dist/components/MainComponents/MediaUploadOverlay.d.ts +31 -0
- package/dist/components/MainComponents/MessageContainer.d.ts +3 -0
- package/dist/components/MainComponents/MessageList.d.ts +2 -1
- package/dist/components/MainComponents/SystemMessage.d.ts +3 -1
- package/dist/components/MessageBubble/CustomDivider.d.ts +3 -1
- package/dist/components/MessageBubble/MediaCaption.d.ts +9 -0
- package/dist/components/MessageBubble/MessageAvatarPhoto.d.ts +17 -0
- package/dist/components/MessageBubble/MessageReaction.d.ts +6 -0
- package/dist/components/MessageBubble/MessageReply.d.ts +3 -1
- package/dist/components/MessageBubble/QuickReplies.d.ts +2 -0
- package/dist/components/Modals/FilePreviewModal/FilePreviewModal.d.ts +8 -10
- package/dist/components/Modals/FilePreviewModal/ImageLightbox.d.ts +4 -0
- package/dist/components/Modals/FilePreviewModal/PdfView.d.ts +4 -0
- package/dist/components/Modals/FilePreviewModal/ViewerChrome.d.ts +100 -0
- package/dist/components/Modals/MessageSearchModal/MessageHitResults.d.ts +3 -1
- package/dist/components/Modals/ModalReportChat/ModalReportChat.d.ts +3 -1
- package/dist/components/Modals/NewChatModal/styledNewChatComponents.d.ts +15 -5
- package/dist/components/Modals/SettingsModals/SharedStyledComponents.d.ts +27 -15
- package/dist/components/Modals/SettingsModals/Visibility/StyledComponents.d.ts +18 -6
- package/dist/components/Modals/SideDrawer/DrawerProfileParts.d.ts +27 -9
- package/dist/components/Modals/SideDrawer/SideDrawer.d.ts +39 -13
- package/dist/components/Modals/motionVariants.d.ts +8 -10
- package/dist/components/Modals/styledModalComponents.d.ts +53 -25
- package/dist/components/Notification/index.d.ts +3 -1
- package/dist/components/RoomComponents/LastMessageItem.d.ts +2 -0
- package/dist/components/RoomComponents/styled/LastMessageMedia.d.ts +19 -0
- package/dist/components/RoomComponents/styled/LastTextMessage.d.ts +2 -2
- package/dist/components/RoomComponents/styled/StyledRoomComponents.d.ts +29 -8
- package/dist/components/UsersList/StyledComponents.d.ts +18 -6
- package/dist/components/VideoCalls/VideoCallSession.d.ts +13 -0
- package/dist/components/styled/ChatWrapperBox.d.ts +9 -2
- package/dist/components/styled/DateLabel.d.ts +3 -1
- package/dist/components/styled/FileCard.d.ts +20 -0
- package/dist/components/styled/Loader.d.ts +3 -1
- package/dist/components/styled/MediaModal.d.ts +6 -2
- package/dist/components/styled/MediaSurface.d.ts +56 -0
- package/dist/components/styled/MessageImage.d.ts +9 -10
- package/dist/components/styled/NewMessageLabel.d.ts +3 -1
- package/dist/components/styled/RoomListComponents/index.d.ts +66 -22
- package/dist/components/styled/SendInput.d.ts +12 -2
- package/dist/components/styled/StyledComponents.d.ts +199 -41
- package/dist/components/styled/StyledInputComponents/MediaComponents.d.ts +78 -24
- package/dist/components/styled/StyledInputComponents/StyledInputComponents.d.ts +60 -22
- package/dist/components/styled/StyledInputComponents/VideoComponents.d.ts +18 -6
- package/dist/components/styled/TreadLabel.d.ts +3 -1
- package/dist/components/styled/UnsupportedType.d.ts +1 -0
- package/dist/components/styled/VideoMessage.d.ts +13 -6
- package/dist/e2ee/callKey.d.ts +32 -0
- package/dist/e2ee/fileEnvelope.d.ts +16 -5
- package/dist/e2ee/omemo.d.ts +18 -0
- package/dist/firebase-messaging-sw.js +20 -3
- package/dist/{handleCopyClick-BtXos0AJ.js → handleCopyClick-vPvh9hOU.js} +1 -1
- package/dist/helpers/albumLayout.d.ts +53 -0
- package/dist/helpers/attachments.d.ts +22 -1
- package/dist/helpers/avatarImageCache.d.ts +9 -0
- package/dist/helpers/caption.d.ts +63 -0
- package/dist/helpers/composerFocus.d.ts +22 -0
- package/dist/helpers/createMainMessageForThread.d.ts +1 -1
- package/dist/helpers/downloadFile.d.ts +19 -0
- package/dist/helpers/fileKind.d.ts +17 -0
- package/dist/helpers/lastMessagePreview.d.ts +55 -0
- package/dist/helpers/mapWithConcurrency.d.ts +8 -0
- package/dist/helpers/mediaBox.d.ts +110 -0
- package/dist/helpers/mediaBubble.d.ts +67 -0
- package/dist/helpers/mediaLabel.d.ts +10 -0
- package/dist/helpers/mediaSendRetry.d.ts +25 -0
- package/dist/helpers/messageRuns.d.ts +10 -0
- package/dist/helpers/receiptState.d.ts +48 -0
- package/dist/helpers/repairFilenameEncoding.d.ts +11 -0
- package/dist/helpers/roomImageGallery.d.ts +34 -0
- package/dist/helpers/safeUrl.d.ts +15 -0
- package/dist/helpers/secureFileUrl.d.ts +4 -1
- package/dist/helpers/textareaFit.d.ts +31 -0
- package/dist/helpers/timestamp.d.ts +7 -0
- package/dist/helpers/userEntry.d.ts +14 -0
- package/dist/helpers/viewerSender.d.ts +47 -0
- package/dist/hooks/useAvatarImage.d.ts +21 -0
- package/dist/hooks/useIsMobileViewport.d.ts +5 -0
- package/dist/hooks/useMediaProbe.d.ts +41 -0
- package/dist/hooks/usePaneWidthVar.d.ts +11 -0
- package/dist/hooks/usePdfThumbnail.d.ts +0 -1
- package/dist/hooks/usePrefersReducedMotion.d.ts +2 -0
- package/dist/hooks/useRoomInitialization.d.ts +2 -2
- package/dist/hooks/useRoomUrl.d.ts +2 -2
- package/dist/hooks/useSendMessage.d.ts +4 -1
- package/dist/{main-BnLtessp.js → main-CghdNDlB.js} +20803 -16260
- package/dist/main.js +10 -10
- package/dist/networking/api-requests/auth.api.d.ts +13 -5
- package/dist/networking/api-requests/user.api.d.ts +4 -4
- package/dist/networking/callKeyStanza.d.ts +7 -0
- package/dist/networking/deliveryReceiptBatcher.d.ts +53 -0
- package/dist/networking/displayedMarkerThrottle.d.ts +29 -0
- package/dist/networking/receiptsPolicy.d.ts +32 -0
- package/dist/networking/stanzaHandlers.d.ts +4 -2
- package/dist/networking/xmpp/sendDisplayedMarker.xmpp.d.ts +2 -0
- package/dist/networking/xmpp/sendMediaMessage.xmpp.d.ts +8 -0
- package/dist/networking/xmpp/sendReceivedReceipt.xmpp.d.ts +2 -0
- package/dist/networking/xmppClient.d.ts +5 -0
- package/dist/roomStore/callSlice.d.ts +6 -1
- package/dist/roomStore/index.d.ts +10 -0
- package/dist/roomStore/roomsSlice.d.ts +22 -3
- package/dist/styles/motion.d.ts +22 -2
- package/dist/types/models/attachment.model.d.ts +19 -0
- package/dist/types/models/config.model.d.ts +56 -2
- package/dist/types/models/customComponents.model.d.ts +2 -0
- package/dist/types/models/message.model.d.ts +9 -0
- package/dist/types/models/modal.model.d.ts +19 -0
- package/dist/types/models/room.model.d.ts +17 -0
- package/dist/types/models/xmpp.model.d.ts +3 -0
- package/dist/utils/messageNotificationContent.d.ts +34 -0
- package/dist/version.d.ts +1 -1
- package/package.json +8 -7
- package/public/firebase-messaging-sw.js +20 -3
- package/dist/FilePreviewModal-Cgj1iHry.js +0 -743
- package/dist/components/RoomComponents/styled/LastAudioMessage.d.ts +0 -6
- package/dist/components/RoomComponents/styled/LastMessageFile.d.ts +0 -6
- package/dist/components/RoomComponents/styled/LastMessagePhoto.d.ts +0 -6
- package/dist/components/RoomComponents/styled/LastMessageVideo.d.ts +0 -6
|
@@ -1,33 +1,87 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export declare const
|
|
9
|
-
|
|
10
|
-
export declare const
|
|
11
|
-
export declare const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Loading spinner rules shared by the media loading states. The spinner is
|
|
4
|
+
* a fixed-pixel circle with `flex: none`, so a flex parent (the upload scrim,
|
|
5
|
+
* a tiny album tile) cannot squash it into an oval. Whether it is drawn at
|
|
6
|
+
* all is decided by a container query on the box it sits in, see below.
|
|
7
|
+
*/
|
|
8
|
+
export declare const MEDIA_SPINNER_PX = 24;
|
|
9
|
+
/** Boxes smaller than this (on either side) get the shimmer only, no spinner. */
|
|
10
|
+
export declare const MEDIA_SPINNER_MIN_BOX_PX = 48;
|
|
11
|
+
export declare const MediaLoadingSkeleton: React.FC<{
|
|
12
|
+
$width?: number;
|
|
13
|
+
$height?: number;
|
|
14
|
+
}>;
|
|
15
|
+
/** Standalone spinner for a loading overlay. Hidden inside boxes under the min size. */
|
|
16
|
+
export declare const MediaSpinner: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
|
|
17
|
+
style?: React.CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
18
|
+
}> & string;
|
|
19
|
+
export declare const Container: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
20
|
+
style?: React.CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
21
|
+
}> & string;
|
|
22
|
+
export declare const FullScreenImage: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "style"> & {
|
|
23
|
+
style?: React.CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
24
|
+
}> & string;
|
|
25
|
+
export declare const ModalContent: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
26
|
+
style?: React.CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
27
|
+
}> & string;
|
|
28
|
+
export declare const ButtonContainer: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
29
|
+
style?: React.CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
30
|
+
}> & string;
|
|
31
|
+
export declare const IconButton: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "style"> & {
|
|
32
|
+
style?: React.CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
33
|
+
}> & string;
|
|
34
|
+
export declare const UnsupportedContainer: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "style"> & {
|
|
35
|
+
style?: React.CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
36
|
+
}> & string;
|
|
37
|
+
export declare const BackgroundFile: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
38
|
+
style?: React.CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
39
|
+
}> & string;
|
|
40
|
+
export declare const FileInformation: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
41
|
+
style?: React.CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
42
|
+
}> & string;
|
|
43
|
+
export declare const FileName: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
|
|
44
|
+
style?: React.CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
45
|
+
}> & string;
|
|
46
|
+
export declare const FileSizeContainer: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
47
|
+
style?: React.CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
48
|
+
}> & string;
|
|
49
|
+
export declare const FileSize: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
|
|
50
|
+
style?: React.CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
51
|
+
}> & string;
|
|
16
52
|
/** Wraps every attachment of one message. Single-file messages keep the
|
|
17
53
|
* old, un-gapped look because there is nothing to separate them from. */
|
|
18
|
-
export declare const AttachmentStack: import('styled-components/dist/types').IStyledComponentBase<"web",
|
|
19
|
-
|
|
54
|
+
export declare const AttachmentStack: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
55
|
+
style?: React.CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
56
|
+
}> & string;
|
|
57
|
+
export declare const AttachmentGrid: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
58
|
+
style?: React.CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
59
|
+
}, {
|
|
20
60
|
$columns: number;
|
|
21
61
|
}>> & string;
|
|
22
|
-
export declare const AttachmentTile: import('styled-components/dist/types').IStyledComponentBase<"web",
|
|
23
|
-
|
|
62
|
+
export declare const AttachmentTile: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "style"> & {
|
|
63
|
+
style?: React.CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
64
|
+
}> & string;
|
|
65
|
+
export declare const PdfContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "style"> & {
|
|
66
|
+
style?: React.CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
67
|
+
}, {
|
|
24
68
|
$compact: boolean;
|
|
25
69
|
}>> & string;
|
|
26
|
-
export declare const PdfThumbnailFrame: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').
|
|
70
|
+
export declare const PdfThumbnailFrame: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
71
|
+
style?: React.CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
72
|
+
}, {
|
|
27
73
|
$compact: boolean;
|
|
28
74
|
}>> & string;
|
|
29
75
|
/** Sits on the thumbnail while pdf.js parses so the row does not pop in. */
|
|
30
|
-
export declare const PdfThumbnailSkeleton: import('styled-components/dist/types').IStyledComponentBase<"web",
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
export declare const
|
|
76
|
+
export declare const PdfThumbnailSkeleton: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
77
|
+
style?: React.CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
78
|
+
}> & string;
|
|
79
|
+
export declare const PdfInformation: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
80
|
+
style?: React.CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
81
|
+
}> & string;
|
|
82
|
+
export declare const PdfMetaRow: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
83
|
+
style?: React.CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
84
|
+
}> & string;
|
|
85
|
+
export declare const PdfBadge: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
|
|
86
|
+
style?: React.CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
87
|
+
}> & string;
|
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
export declare const InputContainer: import('styled-components/dist/types').IStyledComponentBase<"web",
|
|
2
|
-
|
|
1
|
+
export declare const InputContainer: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
2
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
3
|
+
}> & string;
|
|
4
|
+
export declare const MessageInputContainer: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
5
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
6
|
+
}> & string;
|
|
3
7
|
/**
|
|
4
8
|
* Anchors the composer's emoji picker above the input row, inside
|
|
5
9
|
* InputContainer's positioning context (the same one MentionDropdown uses).
|
|
6
10
|
* Sits one layer above that dropdown so the two can never fight for the
|
|
7
11
|
* same pixels if both were ever open at once.
|
|
8
12
|
*/
|
|
9
|
-
export declare const EmojiPickerPopover: import('styled-components/dist/types').IStyledComponentBase<"web",
|
|
13
|
+
export declare const EmojiPickerPopover: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
14
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
15
|
+
}> & string;
|
|
10
16
|
/**
|
|
11
17
|
* Drop-target state for drag-and-drop attachments. Covers the whole drop
|
|
12
18
|
* zone (the message area when the host marks one, else the composer) and is
|
|
@@ -14,36 +20,68 @@ export declare const EmojiPickerPopover: import('styled-components/dist/types').
|
|
|
14
20
|
* Motion comes from the shared primitives, which already opt out under
|
|
15
21
|
* prefers-reduced-motion.
|
|
16
22
|
*/
|
|
17
|
-
export declare const DropOverlay: import('styled-components/dist/types').IStyledComponentBase<"web",
|
|
18
|
-
|
|
19
|
-
|
|
23
|
+
export declare const DropOverlay: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
24
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
25
|
+
}> & string;
|
|
26
|
+
export declare const DropTarget: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
27
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
28
|
+
}> & string;
|
|
29
|
+
export declare const MessageInput: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "style"> & {
|
|
30
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
31
|
+
}, {
|
|
20
32
|
$color?: string;
|
|
21
33
|
$colorBg?: string;
|
|
22
34
|
}>> & string;
|
|
23
|
-
export declare const HiddenFileInput: import('styled-components/dist/types').IStyledComponentBase<"web",
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
export declare const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
export declare const
|
|
30
|
-
|
|
35
|
+
export declare const HiddenFileInput: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "style"> & {
|
|
36
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
37
|
+
}> & string;
|
|
38
|
+
export declare const Timer: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
39
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
40
|
+
}> & string;
|
|
41
|
+
export declare const WaveformContainer: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').CanvasHTMLAttributes<HTMLCanvasElement>, HTMLCanvasElement>, "style"> & {
|
|
42
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
43
|
+
}> & string;
|
|
44
|
+
export declare const RecordContainer: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
45
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
46
|
+
}> & string;
|
|
47
|
+
export declare const FilePreviewContainer: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
48
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
49
|
+
}> & string;
|
|
50
|
+
export declare const FilePreview: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
51
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
52
|
+
}> & string;
|
|
53
|
+
export declare const ImagePreview: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "style"> & {
|
|
54
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
55
|
+
}> & string;
|
|
56
|
+
export declare const VideoPreview: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, "style"> & {
|
|
57
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
58
|
+
}> & string;
|
|
31
59
|
/** First page of a picked PDF, before it is sent. Fills the whole tile. */
|
|
32
|
-
export declare const DocumentPreview: import('styled-components/dist/types').IStyledComponentBase<"web",
|
|
33
|
-
|
|
60
|
+
export declare const DocumentPreview: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "style"> & {
|
|
61
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
62
|
+
}> & string;
|
|
63
|
+
export declare const FilePreviewName: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
|
|
64
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
65
|
+
}> & string;
|
|
34
66
|
/** Why a pick was rejected (too many files, file too large). */
|
|
35
|
-
export declare const AttachmentNotice: import('styled-components/dist/types').IStyledComponentBase<"web",
|
|
36
|
-
|
|
67
|
+
export declare const AttachmentNotice: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
68
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
69
|
+
}> & string;
|
|
70
|
+
export declare const StyledInput: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "style"> & {
|
|
71
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
72
|
+
}, {
|
|
37
73
|
$colorBg?: string;
|
|
38
74
|
}>> & string;
|
|
39
|
-
export declare const TextareaWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').
|
|
40
|
-
|
|
75
|
+
export declare const TextareaWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
76
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
77
|
+
}, {
|
|
41
78
|
$color?: string;
|
|
42
79
|
$isFocused?: boolean;
|
|
43
80
|
$colorBg?: string;
|
|
44
81
|
}>> & string;
|
|
45
|
-
export declare const TextareaInput: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').
|
|
46
|
-
|
|
82
|
+
export declare const TextareaInput: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "style"> & {
|
|
83
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
84
|
+
}, {
|
|
47
85
|
$color?: string;
|
|
48
86
|
$colorBg?: string;
|
|
49
87
|
}>> & string;
|
|
@@ -1,6 +1,18 @@
|
|
|
1
|
-
export declare const Container: import('styled-components/dist/types').IStyledComponentBase<"web",
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare const
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
export declare const Container: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
2
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
3
|
+
}> & string;
|
|
4
|
+
export declare const FullScreenVideo: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, "style"> & {
|
|
5
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
6
|
+
}> & string;
|
|
7
|
+
export declare const FixedSizeVideo: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, "style"> & {
|
|
8
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
9
|
+
}> & string;
|
|
10
|
+
export declare const ModalContent: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
11
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
12
|
+
}> & string;
|
|
13
|
+
export declare const ButtonContainer: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
14
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
15
|
+
}> & string;
|
|
16
|
+
export declare const IconButton: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "style"> & {
|
|
17
|
+
style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
18
|
+
}> & string;
|
|
@@ -6,7 +6,9 @@ interface DateLabelProps {
|
|
|
6
6
|
secondary?: string;
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
export declare const StyledDateLabel: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').
|
|
9
|
+
export declare const StyledDateLabel: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
10
|
+
style?: React.CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
11
|
+
}, {
|
|
10
12
|
$primary?: string;
|
|
11
13
|
$secondary?: string;
|
|
12
14
|
}>> & string;
|
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
/** Full-size player used by the preview modal. Kept here with the bubble video. */
|
|
3
|
+
export declare const FullScreenVideo: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, "style"> & {
|
|
4
|
+
style?: React.CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars;
|
|
5
|
+
}> & string;
|
|
2
6
|
interface CustomMessageVideoProps {
|
|
3
7
|
fileName: string;
|
|
4
8
|
fileURL: string;
|
|
5
9
|
mimetype: string;
|
|
10
|
+
/** Length in seconds, when the attachment recorded one. */
|
|
11
|
+
duration?: string;
|
|
12
|
+
width?: number;
|
|
13
|
+
height?: number;
|
|
6
14
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export declare const IconButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
|
|
15
|
+
/**
|
|
16
|
+
* A single video in a bubble: the first frame with a glass play button and,
|
|
17
|
+
* when known, a duration chip. A click opens the preview modal, which holds
|
|
18
|
+
* the controls.
|
|
19
|
+
*/
|
|
13
20
|
declare const CustomMessageVideo: React.FC<CustomMessageVideoProps>;
|
|
14
21
|
export default CustomMessageVideo;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Element } from 'ltx';
|
|
2
|
+
/** Namespace of the <call-key> signal element carried inside the SCE envelope. */
|
|
3
|
+
export declare const NS_CALL_E2EE = "ethora:call:e2ee:0";
|
|
4
|
+
/**
|
|
5
|
+
* A fresh 256-bit media key for one call, as a base64 string. A new key per
|
|
6
|
+
* call gives forward secrecy between calls: a key recovered from one call
|
|
7
|
+
* cannot open the next. The string is fed verbatim to both peers'
|
|
8
|
+
* `ExternalE2EEKeyProvider.setKey`, which HKDFs it into the frame key.
|
|
9
|
+
*/
|
|
10
|
+
export declare function generateCallKey(): string;
|
|
11
|
+
/** The <call-key> element that rides inside the OMEMO SCE envelope. */
|
|
12
|
+
export declare function callKeyElement(callId: string, key: string): Element;
|
|
13
|
+
/**
|
|
14
|
+
* Hands `key` to every member of `roomJid`, end-to-end encrypted via OMEMO so
|
|
15
|
+
* the server never sees it.
|
|
16
|
+
*
|
|
17
|
+
* Returns false (a no-op) unless E2EE is enabled for the app AND the backend
|
|
18
|
+
* marked the room `e2ee`, or when no member has published an OMEMO device yet
|
|
19
|
+
* (in which case the caller falls back to a non-E2EE call rather than
|
|
20
|
+
* failing). Returns true once the encrypted key is on its way to at least one
|
|
21
|
+
* recipient device.
|
|
22
|
+
*/
|
|
23
|
+
export declare function distributeCallKey(roomJid: string, callId: string, key: string): Promise<boolean>;
|
|
24
|
+
/**
|
|
25
|
+
* Reads a decrypted <call-key> off a stanza the OMEMO seam has already
|
|
26
|
+
* rewritten in place (so the element sits as an ordinary child). Returns
|
|
27
|
+
* undefined when the stanza is not a call-key signal.
|
|
28
|
+
*/
|
|
29
|
+
export declare function parseCallKey(stanza: Element): {
|
|
30
|
+
callId: string;
|
|
31
|
+
key: string;
|
|
32
|
+
} | undefined;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IMentionSpan } from '../types/types';
|
|
1
2
|
/** What the server must not learn, and the receiver needs to render. */
|
|
2
3
|
export interface FileEnvelopeMeta {
|
|
3
4
|
mimetype: string;
|
|
@@ -37,12 +38,22 @@ export declare function openSealedFile(ciphertext: Uint8Array, keyMaterial: stri
|
|
|
37
38
|
meta: FileEnvelopeMeta;
|
|
38
39
|
bytes: Uint8Array;
|
|
39
40
|
};
|
|
41
|
+
/** What a sealed media <body> carries besides the keys. */
|
|
42
|
+
export interface SealedMediaPayload {
|
|
43
|
+
keys: string[];
|
|
44
|
+
/** The text typed with the files. Sealed here, never on <data>. */
|
|
45
|
+
caption?: string;
|
|
46
|
+
captionMentions?: IMentionSpan[];
|
|
47
|
+
}
|
|
40
48
|
/**
|
|
41
|
-
* Pull the attachment keys out of a
|
|
49
|
+
* Pull the attachment keys (and the caption, when there is one) out of a
|
|
50
|
+
* decrypted media <body>.
|
|
42
51
|
*
|
|
43
|
-
* The sender put `{v:1,keys:[...]}` there instead of
|
|
44
|
-
* "media" (see sendMediaMessage). Returns undefined for
|
|
45
|
-
* an ordinary media message - or one from a build that
|
|
46
|
-
* falls through untouched.
|
|
52
|
+
* The sender put `{v:1,keys:[...],caption?,captionMentions?}` there instead of
|
|
53
|
+
* the usual literal "media" (see sendMediaMessage). Returns undefined for
|
|
54
|
+
* anything else, so an ordinary media message - or one from a build that
|
|
55
|
+
* predates sealing - falls through untouched.
|
|
47
56
|
*/
|
|
57
|
+
export declare function parseSealedMediaPayload(body?: string): SealedMediaPayload | undefined;
|
|
58
|
+
/** The attachment keys out of a sealed media <body>; see parseSealedMediaPayload. */
|
|
48
59
|
export declare function parseSealedMediaBody(body?: string): string[] | undefined;
|
package/dist/e2ee/omemo.d.ts
CHANGED
|
@@ -105,6 +105,24 @@ export declare class Omemo {
|
|
|
105
105
|
* the room's echo by it.
|
|
106
106
|
*/
|
|
107
107
|
encryptGroupMessage(roomJid: string, members: string[], content: Element[], id: string, cleartext?: Element[]): Promise<Element>;
|
|
108
|
+
/**
|
|
109
|
+
* Sends an ephemeral, end-to-end encrypted control signal to a room's
|
|
110
|
+
* members. Same OMEMO envelope as `encryptGroupMessage`, but it is NOT a
|
|
111
|
+
* chat message: no fallback <body>, no <store> hint, and MAM/carbons are
|
|
112
|
+
* asked to drop it (`no-store` / `no-permanent-store` / `no-copy`).
|
|
113
|
+
*
|
|
114
|
+
* The use case is handing a LiveKit call's media key to the other
|
|
115
|
+
* participants without the server - or anyone relaying the stanza - ever
|
|
116
|
+
* seeing it. The payload rides inside the SCE envelope exactly like a
|
|
117
|
+
* message body would, so the server observes ciphertext only.
|
|
118
|
+
*
|
|
119
|
+
* Returns true when at least one recipient device was reachable (so the
|
|
120
|
+
* caller knows the key actually went out), false when nobody in the room
|
|
121
|
+
* has published an OMEMO device yet. Unlike `encryptGroupMessage` it does
|
|
122
|
+
* not throw on an empty recipient set: a call simply falls back to plaintext
|
|
123
|
+
* media rather than failing, and the caller decides what to surface.
|
|
124
|
+
*/
|
|
125
|
+
sendGroupSignal(roomJid: string, members: string[], content: Element[], id: string): Promise<boolean>;
|
|
108
126
|
/**
|
|
109
127
|
* Empty OMEMO message: completes a session the peer started. It targets one
|
|
110
128
|
* device, so it goes straight to that member's real JID rather than through
|
|
@@ -151,8 +151,25 @@ async function checkAssetAvailability(url) {
|
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
+
// `<appId>_<userId>` (24-hex ids, or an appId and a uuid) is a machine id,
|
|
155
|
+
// never something to put in a notification title.
|
|
156
|
+
const OPAQUE_ID_RE =
|
|
157
|
+
/^(?:[0-9a-f]{24}(?:_[0-9a-f]{24})?|[a-z0-9]+_(?:[0-9a-f]{24}|[0-9a-f-]{36})(?:_[0-9a-z-]+)*)$/i;
|
|
158
|
+
|
|
159
|
+
function isOpaqueId(value) {
|
|
160
|
+
const text = String(value || '').trim();
|
|
161
|
+
return !!text && OPAQUE_ID_RE.test(text.split('@')[0]);
|
|
162
|
+
}
|
|
163
|
+
|
|
154
164
|
function pickTitle(raw = {}, data = {}, notification = {}) {
|
|
155
|
-
|
|
165
|
+
const title = notification.title || raw.title || data.title || '';
|
|
166
|
+
return title && !isOpaqueId(title) ? title : 'New Message';
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// One notification per chat: a newer message in the same room replaces it.
|
|
170
|
+
function roomTag(data = {}) {
|
|
171
|
+
const jid = String(data.jid || '').split('@')[0];
|
|
172
|
+
return jid ? `ethora-room-${jid}` : '';
|
|
156
173
|
}
|
|
157
174
|
|
|
158
175
|
function pickBody(raw = {}, data = {}, notification = {}) {
|
|
@@ -449,8 +466,8 @@ async function handlePush(raw = {}, source = 'push') {
|
|
|
449
466
|
icon,
|
|
450
467
|
badge,
|
|
451
468
|
image,
|
|
452
|
-
tag: isCall ? `call:${callId || dedupKey}` : dedupKey,
|
|
453
|
-
renotify: isCall,
|
|
469
|
+
tag: isCall ? `call:${callId || dedupKey}` : roomTag(data) || dedupKey,
|
|
470
|
+
renotify: isCall || !!roomTag(data),
|
|
454
471
|
requireInteraction: isCall,
|
|
455
472
|
// Spread the ORIGINAL payload first so the click handler's isCallPush()
|
|
456
473
|
// sees the full call fields (callId/callToken/kind/room); our routing
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Geometry for a multi-media album bubble. Pure data so the grid component
|
|
3
|
+
* stays a dumb renderer and the layout rules can be tested without a DOM.
|
|
4
|
+
*
|
|
5
|
+
* 1 item full width, 4:3
|
|
6
|
+
* 2 items side by side, square cells
|
|
7
|
+
* 3 items one large cell on the left, two stacked on the right
|
|
8
|
+
* 4 items 2 x 2
|
|
9
|
+
* 5+ items 2 x 2 showing the first four, the last cell carries "+N"
|
|
10
|
+
*/
|
|
11
|
+
/** Gap between neighbouring tiles. */
|
|
12
|
+
export declare const ALBUM_GAP_PX = 3;
|
|
13
|
+
/** Radius of a tile corner that sits on the bubble's own corner. */
|
|
14
|
+
export declare const ALBUM_OUTER_RADIUS_PX = 12;
|
|
15
|
+
/** Radius of every other tile corner, the ones that face a neighbour. */
|
|
16
|
+
export declare const ALBUM_INNER_RADIUS_PX = 3;
|
|
17
|
+
export interface AlbumCellPlacement {
|
|
18
|
+
/** CSS `grid-column` value. */
|
|
19
|
+
column: string;
|
|
20
|
+
/** CSS `grid-row` value. */
|
|
21
|
+
row: string;
|
|
22
|
+
}
|
|
23
|
+
export interface AlbumLayout {
|
|
24
|
+
kind: 'full' | 'pair' | 'hero' | 'quad';
|
|
25
|
+
/** Number of tiles actually drawn. */
|
|
26
|
+
visible: number;
|
|
27
|
+
/** Items folded into the "+N" overlay on the last visible tile. */
|
|
28
|
+
hidden: number;
|
|
29
|
+
/** CSS `grid-template-columns`. */
|
|
30
|
+
columns: string;
|
|
31
|
+
/** CSS `grid-template-rows`. */
|
|
32
|
+
rows: string;
|
|
33
|
+
/** CSS `aspect-ratio` of the whole grid. */
|
|
34
|
+
aspectRatio: string;
|
|
35
|
+
/** One entry per visible tile, in order. */
|
|
36
|
+
placements: AlbumCellPlacement[];
|
|
37
|
+
}
|
|
38
|
+
/** Layout for `count` media tiles. Counts below 1 are treated as 1. */
|
|
39
|
+
export declare const getAlbumLayout: (count: number) => AlbumLayout;
|
|
40
|
+
/**
|
|
41
|
+
* Which corners of one tile lie on the bubble's outer edge. Only those get
|
|
42
|
+
* the large radius; corners that face a neighbour get the small inner one.
|
|
43
|
+
*/
|
|
44
|
+
export interface TileCorners {
|
|
45
|
+
topLeft: boolean;
|
|
46
|
+
topRight: boolean;
|
|
47
|
+
bottomRight: boolean;
|
|
48
|
+
bottomLeft: boolean;
|
|
49
|
+
}
|
|
50
|
+
/** Outer-corner flags for the tile at `position` (0-based) of `layout`. */
|
|
51
|
+
export declare const getTileCorners: (layout: AlbumLayout, position: number) => TileCorners;
|
|
52
|
+
/** CSS `border-radius` shorthand (TL TR BR BL) for one tile. */
|
|
53
|
+
export declare const getTileBorderRadius: (layout: AlbumLayout, position: number) => string;
|
|
@@ -28,6 +28,27 @@ export declare const serializeAttachments: (attachments: IAttachment[]) => strin
|
|
|
28
28
|
* predates this feature - and every message from a client that does not
|
|
29
29
|
* speak it - takes the second path.
|
|
30
30
|
*/
|
|
31
|
-
export declare const getMessageAttachments: (message?: Pick<IMessage, "attachments" | "location" | "locationPreview" | "mimetype" | "originalName" | "fileName" | "size">
|
|
31
|
+
export declare const getMessageAttachments: (message?: (Pick<IMessage, "attachments" | "location" | "locationPreview" | "mimetype" | "originalName" | "fileName" | "size"> & {
|
|
32
|
+
duration?: unknown;
|
|
33
|
+
mediaDuration?: unknown;
|
|
34
|
+
}) | null) => IAttachment[];
|
|
35
|
+
/**
|
|
36
|
+
* True when the message carries a file: flagged `isMediafile`, or (older
|
|
37
|
+
* senders that never set the flag) with a real file URL or attachment. The
|
|
38
|
+
* one test every surface uses for "is this a media bubble".
|
|
39
|
+
*/
|
|
40
|
+
export declare const isMediaMessage: (message?: (Partial<Pick<IMessage, "isDeleted" | "isMediafile" | "attachments">> & {
|
|
41
|
+
location?: unknown;
|
|
42
|
+
mimetype?: unknown;
|
|
43
|
+
originalName?: unknown;
|
|
44
|
+
fileName?: unknown;
|
|
45
|
+
locationPreview?: unknown;
|
|
46
|
+
}) | null) => boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Maps one object from POST /files/ `results` to the attachment a sent
|
|
49
|
+
* message carries. Field names here follow the API's own spelling
|
|
50
|
+
* (`originalname`, `filename`), not the wire attribute names.
|
|
51
|
+
*/
|
|
52
|
+
export declare const toUploadedAttachment: (raw: any) => IAttachment;
|
|
32
53
|
/** Name to show for an attachment, with the URL tail as the last resort. */
|
|
33
54
|
export declare const getAttachmentName: (attachment: IAttachment) => string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const FAILED_TTL_MS = 60000;
|
|
2
|
+
export declare const avatarIdentity: (url: string) => string;
|
|
3
|
+
/** The URL that already loaded for this file (any token), if any. */
|
|
4
|
+
export declare const getLoadedAvatarUrl: (url: string) => string | undefined;
|
|
5
|
+
export declare const markAvatarLoaded: (url: string) => void;
|
|
6
|
+
export declare const markAvatarFailed: (url: string) => void;
|
|
7
|
+
export declare const hasAvatarFailed: (url: string) => boolean;
|
|
8
|
+
/** Test helper. */
|
|
9
|
+
export declare const resetAvatarCache: () => void;
|