@ethora/chat-component 26.7.5 → 26.7.6
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 +72 -16
- package/dist/ChatProfileModal-hxsWI8cx.js +2139 -0
- package/dist/FilePreviewModal-CwWnHsB1.js +736 -0
- package/dist/ManageDataModal-CDPXcC93.js +159 -0
- package/dist/MarkdownBody-DBJGraWM.js +16874 -0
- package/dist/SideDrawer-Dr_lkaOW.js +226 -0
- package/dist/UserProfileModal-Q_jhXpsX.js +568 -0
- package/dist/UserSettingsModal-OcAJao-d.js +50 -0
- package/dist/{VideoCallOverlay-C4M2I9oV.js → VideoCallOverlay-CC4sShdK.js} +9 -10
- package/dist/VisibilityModal-DkMhx_2k.js +132 -0
- package/dist/assets/icons.d.ts +30 -0
- package/dist/components/ContextMenu/ContextMenuComponents.d.ts +1 -3
- package/dist/components/EmojiPicker/LazyEmojiPicker.d.ts +3 -0
- package/dist/components/ExampleComponents/CustomMessage.d.ts +3 -3
- package/dist/components/Files/FilesList.d.ts +12 -0
- package/dist/components/Files/FilesPanel.d.ts +3 -0
- package/dist/components/Files/fileCategory.d.ts +13 -0
- package/dist/components/InputComponents/AttachmentPreview.d.ts +17 -0
- package/dist/components/InputComponents/MentionDropdown.d.ts +13 -0
- package/dist/components/InputComponents/MentionPickerModal.d.ts +19 -0
- package/dist/components/MainComponents/AttachmentList.d.ts +7 -0
- package/dist/components/MainComponents/ChatErrorBoundary.d.ts +53 -0
- package/dist/components/MainComponents/ChatErrorScreen.d.ts +24 -0
- package/dist/components/MainComponents/HeaderLogo.d.ts +18 -0
- package/dist/components/MainComponents/MediaMessage.d.ts +5 -0
- package/dist/components/MainComponents/MessageContainer.d.ts +2 -2
- package/dist/components/MainComponents/ReduxWrapper.d.ts +1 -2
- package/dist/components/MainComponents/SystemMessage.d.ts +1 -2
- package/dist/components/MenuRoom/MenuRoom.d.ts +1 -0
- package/dist/components/MessageBubble/CustomDivider.d.ts +3 -3
- package/dist/components/MessageBubble/Message.d.ts +2 -2
- package/dist/components/MessageBubble/MessageTranslate.d.ts +28 -10
- package/dist/components/MessageBubble/QuickReplies.d.ts +6 -5
- package/dist/components/Modals/ChatProfileModal/ChatProfileMemberRow.d.ts +18 -0
- package/dist/components/Modals/FilePreviewModal/FilePreviewModal.d.ts +17 -0
- package/dist/components/Modals/FilePreviewModal/ImageLightbox.d.ts +35 -0
- package/dist/components/Modals/FilePreviewModal/PdfView.d.ts +14 -3
- package/dist/components/Modals/NewChatModal/styledNewChatComponents.d.ts +12 -0
- package/dist/components/Modals/SettingsModals/Visibility/StyledComponents.d.ts +1 -1
- package/dist/components/Modals/SideDrawer/DrawerProfileParts.d.ts +13 -0
- package/dist/components/Modals/SideDrawer/SideDrawer.d.ts +44 -0
- package/dist/components/Modals/modalComponents.d.ts +6 -0
- package/dist/components/Modals/styledModalComponents.d.ts +14 -3
- package/dist/components/RoomComponents/ChatRoomItem.d.ts +0 -1
- package/dist/components/RoomComponents/OnlineUsersPopover.d.ts +0 -1
- package/dist/components/UsersList/StyledComponents.d.ts +5 -1
- package/dist/components/UsersList/UsersList.d.ts +23 -0
- package/dist/components/styled/Button.d.ts +11 -1
- package/dist/components/styled/ChatWrapperBox.d.ts +3 -1
- package/dist/components/styled/PdfMessage.d.ts +13 -0
- package/dist/components/styled/RoomListComponents/index.d.ts +22 -1
- package/dist/components/styled/SendInput.d.ts +19 -5
- package/dist/components/styled/StyledComponents.d.ts +1 -1
- package/dist/components/styled/StyledInputComponents/MediaComponents.d.ts +18 -0
- package/dist/components/styled/StyledInputComponents/StyledInputComponents.d.ts +21 -0
- package/dist/components/styled/TreadLabel.d.ts +2 -2
- package/dist/components/styled/UnsupportedType.d.ts +1 -1
- package/dist/examples/quiz/QuizDemo.d.ts +3 -0
- package/dist/examples/quiz/quizScript.d.ts +38 -0
- package/dist/examples/quiz/useDemoSession.d.ts +42 -0
- package/dist/examples/quiz/useQuizFlow.d.ts +47 -0
- package/dist/firebase-config.d.ts +2 -4
- package/dist/handleCopyClick-CpmPa6VI.js +32 -0
- package/dist/helpers/MarkdownBody.d.ts +7 -0
- package/dist/helpers/attachments.d.ts +33 -0
- package/dist/helpers/botMarkup.d.ts +30 -0
- package/dist/helpers/constants/MODAL_TYPES.d.ts +11 -7
- package/dist/helpers/ethoraLogger.d.ts +8 -0
- package/dist/helpers/fileKind.d.ts +17 -0
- package/dist/helpers/hiddenRooms.d.ts +1 -1
- package/dist/helpers/historyPreloadScheduler.d.ts +1 -0
- package/dist/helpers/lazyEmoji.d.ts +3 -0
- package/dist/helpers/localStorageUser.d.ts +1 -1
- package/dist/helpers/markdownSanitizeSchema.d.ts +3 -0
- package/dist/helpers/mentions.d.ts +63 -0
- package/dist/helpers/parseMessageBody.d.ts +12 -2
- package/dist/helpers/pdf/loadPdfjs.d.ts +64 -0
- package/dist/helpers/remarkLineBreaks.d.ts +42 -0
- package/dist/helpers/resolveMessageTranslation.d.ts +34 -0
- package/dist/helpers/roomImageGallery.d.ts +53 -0
- package/dist/helpers/secureFileUrl.d.ts +8 -0
- package/dist/helpers/sendFailureWatchdog.d.ts +62 -0
- package/dist/helpers/transformTranslatations.d.ts +1 -2
- package/dist/hooks/pushSubscriptionSweep.d.ts +41 -0
- package/dist/hooks/useChatWrapperInit.d.ts +1 -0
- package/dist/hooks/useFilesEndpointSupport.d.ts +9 -0
- package/dist/hooks/useInView.d.ts +17 -0
- package/dist/hooks/useMentionComposer.d.ts +45 -0
- package/dist/hooks/useMessageHeapState.d.ts +1 -1
- package/dist/hooks/useMessageTranslation.d.ts +4 -3
- package/dist/hooks/useModalDismiss.d.ts +27 -0
- package/dist/hooks/useMyFiles.d.ts +16 -0
- package/dist/hooks/usePdfThumbnail.d.ts +22 -0
- package/dist/hooks/useRoomMute.d.ts +19 -0
- package/dist/hooks/useRoomState.d.ts +1 -1
- package/dist/hooks/useSendMessage.d.ts +4 -3
- package/dist/hooks/useTypography.d.ts +1 -1
- package/dist/hooks/useUnreadMessagesCounter.d.ts +11 -2
- package/dist/index.esm-B-3fyDHY.js +28 -0
- package/dist/index.esm-CRM4VCRa.js +943 -0
- package/dist/index.esm-msbp26WN.js +3352 -0
- package/dist/index.esm2017-CL0mvq6y.js +1578 -0
- package/dist/main-B-8IhwaP.js +31837 -0
- package/dist/main.css +1 -1
- package/dist/main.d.ts +14 -0
- package/dist/main.js +21 -21
- package/dist/module-DGXkb0R_.js +2960 -0
- package/dist/native-CDi4YD_s.js +13 -0
- package/dist/networking/api-requests/files.api.d.ts +19 -0
- package/dist/networking/api-requests/rooms.api.d.ts +10 -2
- package/dist/networking/api-requests/translate.api.d.ts +15 -0
- package/dist/networking/api-requests/user.api.d.ts +2 -0
- package/dist/networking/sharedRequest.d.ts +4 -0
- package/dist/networking/xmpp/allRoomPresences.xmpp.d.ts +3 -1
- package/dist/networking/xmpp/createTimeoutPromise.xmpp.d.ts +14 -0
- package/dist/networking/xmpp/sendTextMessage.xmpp.d.ts +2 -1
- package/dist/networking/xmpp/sendTextMessageWithTranslateTag.xmpp.d.ts +2 -1
- package/dist/networking/xmppClient.d.ts +12 -3
- package/dist/pdf-B5b7qHu6.js +17130 -0
- package/dist/pdf.worker.min-COYn-gId.js +24385 -0
- package/dist/roomStore/index.d.ts +20 -0
- package/dist/roomStore/persistEncryption.d.ts +51 -0
- package/dist/roomStore/roomsSlice.d.ts +49 -6
- package/dist/styles/classNames.d.ts +35 -0
- package/dist/styles/motion.d.ts +44 -0
- package/dist/styles/tokens.d.ts +27 -0
- package/dist/testIds.d.ts +1 -1
- package/dist/types/models/attachment.model.d.ts +33 -0
- package/dist/types/models/config.model.d.ts +160 -19
- package/dist/types/models/file.model.d.ts +20 -0
- package/dist/types/models/message.model.d.ts +15 -6
- package/dist/types/models/room.model.d.ts +12 -2
- package/dist/types/types.d.ts +3 -1
- package/dist/utils/resendMessage.d.ts +22 -1
- package/dist/utils/translateModePolicy.d.ts +1 -0
- package/dist/wavesurfer.esm-D_a19qBW.js +952 -0
- package/package.json +22 -2
- package/dist/VideoCallOverlay-C4M2I9oV.js.map +0 -1
- package/dist/components/MainComponents/VirtualList.d.ts +0 -10
- package/dist/components/Modals/SettingsModals/BlockedUsers/BlockedUsersModal.d.ts +0 -6
- package/dist/components/Modals/SettingsModals/DocumentShares/DocumentSharesModal.d.ts +0 -6
- package/dist/components/Modals/SettingsModals/ManageDataModal/StyledComponents.d.ts +0 -0
- package/dist/components/Modals/SettingsModals/ProfileShares/ProfileShares.d.ts +0 -6
- package/dist/components/Modals/SettingsModals/Referrals/Referrals.d.ts +0 -6
- package/dist/hooks/useMessageQueue.d.ts +0 -4
- package/dist/main-DeiuFYsl.js +0 -55812
- package/dist/main-DeiuFYsl.js.map +0 -1
- package/dist/main.js.map +0 -1
- package/dist/networking/xmpp/getHistory.xmpp.d.ts +0 -3
- package/dist/networking/xmpp/listenerManager.d.ts +0 -17
- package/dist/utils/xmppMemoryMonitor.d.ts +0 -16
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export declare const MIN_SCALE = 1;
|
|
3
|
+
export declare const MAX_SCALE = 6;
|
|
4
|
+
/** What a double-click / double-tap jumps to from the fitted view. */
|
|
5
|
+
export declare const DOUBLE_TAP_SCALE = 2.5;
|
|
6
|
+
export interface ImageLightboxHandle {
|
|
7
|
+
zoomIn: () => void;
|
|
8
|
+
zoomOut: () => void;
|
|
9
|
+
reset: () => void;
|
|
10
|
+
}
|
|
11
|
+
interface ImageLightboxProps {
|
|
12
|
+
src: string;
|
|
13
|
+
alt: string;
|
|
14
|
+
/** Swipe (touch) navigation; also used to report gesture direction. */
|
|
15
|
+
onSwipeLeft?: () => void;
|
|
16
|
+
onSwipeRight?: () => void;
|
|
17
|
+
onError?: React.ReactEventHandler<HTMLImageElement>;
|
|
18
|
+
/** Reported on every scale change so the chrome can label its controls. */
|
|
19
|
+
onScaleChange?: (scale: number) => void;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* The zoom/pan surface of the media viewer.
|
|
23
|
+
*
|
|
24
|
+
* Zoom model: the `<img>` keeps `object-fit: contain`, so scale 1 is always
|
|
25
|
+
* "fitted to the viewport" whatever the image's aspect ratio, and everything
|
|
26
|
+
* above it is a CSS transform on top of that fit - no re-layout, no
|
|
27
|
+
* re-decode, and the fitted view is exactly what the viewer saw before this
|
|
28
|
+
* feature existed. Zooming is anchored on the pointer (or on the midpoint
|
|
29
|
+
* between two fingers), and the pan offset is clamped every time either the
|
|
30
|
+
* scale or the offset changes, using the image's natural aspect ratio
|
|
31
|
+
* against the viewport box, so the picture can never be dragged off screen:
|
|
32
|
+
* at scale 1 the only legal offset is (0, 0).
|
|
33
|
+
*/
|
|
34
|
+
declare const ImageLightbox: React.ForwardRefExoticComponent<ImageLightboxProps & React.RefAttributes<ImageLightboxHandle>>;
|
|
35
|
+
export default ImageLightbox;
|
|
@@ -1,4 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface PdfViewerProps {
|
|
3
|
+
pdfUrl: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* In-app PDF viewer.
|
|
7
|
+
*
|
|
8
|
+
* This used to be an iframe pointed at `mozilla.github.io/pdf.js/web/viewer.html`
|
|
9
|
+
* with the file URL in the query string, which meant every document a user
|
|
10
|
+
* opened was handed to a third-party host - and broke outright whenever that
|
|
11
|
+
* page changed or was unreachable. Rendering locally keeps the file URL
|
|
12
|
+
* inside the app and works offline-ish (the PDF itself still has to load).
|
|
13
|
+
*/
|
|
14
|
+
declare const PdfViewer: React.FC<PdfViewerProps>;
|
|
4
15
|
export default PdfViewer;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const ChatTypeGroup: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
2
|
+
export declare const ChatTypeIndicator: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
3
|
+
$index: number;
|
|
4
|
+
$count: number;
|
|
5
|
+
}>> & string;
|
|
6
|
+
export declare const ChatTypeOption: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
|
|
7
|
+
active: boolean;
|
|
8
|
+
}>> & string;
|
|
9
|
+
export declare const InlineUsersWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
10
|
+
$expanded: boolean;
|
|
11
|
+
}>> & string;
|
|
12
|
+
export declare const InlineUsersInner: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -4,5 +4,5 @@ export declare const Description: import('styled-components/dist/types').IStyled
|
|
|
4
4
|
export declare const RadioGroup: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
5
5
|
export declare const RadioLabel: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never>> & string;
|
|
6
6
|
export declare const RadioInput: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, {
|
|
7
|
-
radioColor?: string;
|
|
7
|
+
$radioColor?: string;
|
|
8
8
|
}>> & string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The identity block at the top of a profile-style drawer: avatar, then the
|
|
3
|
+
* name. It carries no section heading on purpose - it IS the heading for the
|
|
4
|
+
* panel, and a "Profile" label above a face reads as filler.
|
|
5
|
+
*
|
|
6
|
+
* Shared by the user profile and the room profile so the two panels open with
|
|
7
|
+
* the same shape.
|
|
8
|
+
*/
|
|
9
|
+
export declare const ProfileHero: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
10
|
+
export declare const ProfileHeroName: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
11
|
+
export declare const ProfileHeroSubtitle: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
12
|
+
/** Stack of full-width action buttons, one per row. */
|
|
13
|
+
export declare const ProfileActions: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
export declare const DrawerPanel: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
|
+
/** A labelled group: small caps heading, then a bordered card of rows. */
|
|
4
|
+
export declare const DrawerSection: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
|
|
5
|
+
export declare const DrawerSectionTitle: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, never>> & string;
|
|
6
|
+
/** The surface a section's rows sit on. */
|
|
7
|
+
export declare const DrawerCard: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
8
|
+
/** Padded block inside a card, for free-form content rather than a row list. */
|
|
9
|
+
export declare const DrawerCardBody: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
10
|
+
/** Section heading with a trailing control (e.g. "Files" ... "Show all"). */
|
|
11
|
+
export declare const SectionHeaderRow: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
12
|
+
/**
|
|
13
|
+
* Text-only affordance for "Show more" / "Show all". A real <button>, so it
|
|
14
|
+
* is reachable by keyboard and announced as a button - the panels used to
|
|
15
|
+
* fake this with a div carrying role="button" and hand-rolled key handling.
|
|
16
|
+
*/
|
|
17
|
+
export declare const ShowMoreButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
|
|
18
|
+
/** Hairline between two rows of the same card. */
|
|
19
|
+
export declare const DrawerRowDivider: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
20
|
+
export declare const DrawerLabel: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
21
|
+
export declare const DrawerHint: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
22
|
+
interface DrawerNavRowProps {
|
|
23
|
+
label: string;
|
|
24
|
+
hint?: string;
|
|
25
|
+
onClick: () => void;
|
|
26
|
+
}
|
|
27
|
+
/** One "opens another panel" row inside a `DrawerCard`. */
|
|
28
|
+
export declare const DrawerNavRow: FC<DrawerNavRowProps>;
|
|
29
|
+
export interface SideDrawerProps {
|
|
30
|
+
/** Heading text; also the dialog's accessible name. */
|
|
31
|
+
title: string;
|
|
32
|
+
/** Invoked by the back button and by Escape. */
|
|
33
|
+
onClose: () => void;
|
|
34
|
+
/** Controls in the header's trailing slot (edit, overflow menu, QR, ...). */
|
|
35
|
+
headerActions?: ReactNode;
|
|
36
|
+
/**
|
|
37
|
+
* Label for the leading button. Sub-panels step back to their parent, so
|
|
38
|
+
* they read as "Back"; a top-level panel reads as "Close".
|
|
39
|
+
*/
|
|
40
|
+
backLabel?: string;
|
|
41
|
+
children: ReactNode;
|
|
42
|
+
}
|
|
43
|
+
declare const SideDrawer: FC<SideDrawerProps>;
|
|
44
|
+
export default SideDrawer;
|
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
import { ButtonProps } from '../styled/Button';
|
|
2
|
-
export declare const ModalBackground: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').
|
|
2
|
+
export declare const ModalBackground: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
3
|
+
$anchorTop?: boolean;
|
|
4
|
+
$drawer?: boolean;
|
|
5
|
+
}>> & string;
|
|
3
6
|
export declare const CloseButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
|
|
4
|
-
export declare const ModalContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
|
|
7
|
+
export declare const ModalContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
8
|
+
ref?: import('react').Ref<HTMLDivElement>;
|
|
9
|
+
}>, never>, never>> & string;
|
|
5
10
|
export declare const ModalTitle: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, never>> & string;
|
|
11
|
+
/** Small uppercase-weight label above a field/list inside a modal - e.g. "Select Users (max 20)". */
|
|
12
|
+
export declare const ModalSectionLabel: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
13
|
+
/** 48px-min-height row used for members/blocked-users/etc. lists inside modals. */
|
|
14
|
+
export declare const ModalListRow: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
6
15
|
export declare const ModalDescription: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never>> & string;
|
|
7
16
|
export declare const GroupContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
8
|
-
export declare const ModalContainerFullScreen: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
|
|
17
|
+
export declare const ModalContainerFullScreen: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
18
|
+
ref?: import('react').Ref<HTMLDivElement>;
|
|
19
|
+
}>, never>, never>> & string;
|
|
9
20
|
export declare const HeaderContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<Omit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>, "ref"> & {
|
|
10
21
|
ref?: import('react').Ref<HTMLDivElement>;
|
|
11
22
|
}, never>> & string;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export declare const ScrollableContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
2
|
-
export declare const UserItem: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').
|
|
2
|
+
export declare const UserItem: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
3
|
+
$selected?: boolean;
|
|
4
|
+
}>> & string;
|
|
5
|
+
export declare const UserItemInfo: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
6
|
export declare const Checkbox: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>> & string;
|
|
4
7
|
export declare const Label: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
8
|
+
export declare const EmptyState: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -6,6 +6,29 @@ interface UsersListProps {
|
|
|
6
6
|
headerElement?: boolean;
|
|
7
7
|
style?: any;
|
|
8
8
|
filter?: RoomMember[];
|
|
9
|
+
/**
|
|
10
|
+
* When set, sources rows from this list instead of the global `usersSet`
|
|
11
|
+
* (e.g. the current room's members for the @-mention picker) rather than
|
|
12
|
+
* every user the client has ever seen.
|
|
13
|
+
*/
|
|
14
|
+
members?: RoomMember[];
|
|
15
|
+
/**
|
|
16
|
+
* Excludes one user (by bare-jid local part, or the raw id) from the list -
|
|
17
|
+
* used by the mention picker to hide the current reader from their own
|
|
18
|
+
* mention candidates.
|
|
19
|
+
*/
|
|
20
|
+
excludeUserId?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Single-select mode: a row click calls `onSingleSelect` immediately
|
|
23
|
+
* instead of toggling the multi-select checkbox array, and no checkbox is
|
|
24
|
+
* rendered. Used by MentionPickerModal, which reuses this windowed list
|
|
25
|
+
* for a "pick one person" flow instead of building a separate one.
|
|
26
|
+
*/
|
|
27
|
+
singleSelect?: boolean;
|
|
28
|
+
onSingleSelect?: (user: RoomMember) => void;
|
|
29
|
+
/** Overrides the default "Select Users (max 20)" heading - used by
|
|
30
|
+
* MentionPickerModal so the reused list reads as a mention picker. */
|
|
31
|
+
titleOverride?: string;
|
|
9
32
|
}
|
|
10
33
|
declare const UsersList: React.FC<UsersListProps>;
|
|
11
34
|
export default UsersList;
|
|
@@ -4,8 +4,18 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
4
4
|
EndIcon?: ReactElement;
|
|
5
5
|
StartIcon?: ReactElement;
|
|
6
6
|
loading?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated No-op. `CustomButton`'s styles never actually read this
|
|
9
|
+
* prop, so it has had no visual effect for as long as it's existed - many
|
|
10
|
+
* call sites pass it expecting the default (unstyled-looking) button they
|
|
11
|
+
* already get from `variant="default"`. Kept accepted here only so those
|
|
12
|
+
* call sites keep compiling/rendering exactly as before; implementing it
|
|
13
|
+
* for real would change their visuals. Use `variant` instead.
|
|
14
|
+
*/
|
|
7
15
|
unstyled?: boolean;
|
|
8
|
-
variant?: 'default' | 'filled' | 'outlined';
|
|
16
|
+
variant?: 'default' | 'filled' | 'outlined' | 'ghost';
|
|
17
|
+
/** Recolors the button around the danger token for destructive actions. Optional, defaults to the existing brand-blue styling. */
|
|
18
|
+
tone?: 'default' | 'danger';
|
|
9
19
|
children?: React.ReactNode;
|
|
10
20
|
}
|
|
11
21
|
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export declare const ChatWrapperBox: React.ForwardRefExoticComponent<Omit<import('styled-components').FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
3
|
+
export declare const ChatWrapperInnerBox: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface PdfMessageProps {
|
|
3
|
+
fileURL: string;
|
|
4
|
+
fileName: string;
|
|
5
|
+
mimetype?: string;
|
|
6
|
+
size?: string;
|
|
7
|
+
/** Server-side preview, when the storage produced one. Wins over pdf.js. */
|
|
8
|
+
locationPreview?: string;
|
|
9
|
+
/** Denser layout used when the message carries more than one file. */
|
|
10
|
+
compact?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare const PdfMessage: React.FC<PdfMessageProps>;
|
|
13
|
+
export default PdfMessage;
|
|
@@ -15,4 +15,25 @@ export declare const LastMessage: import('styled-components/dist/types').IStyled
|
|
|
15
15
|
export declare const UserCount: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
16
16
|
active: boolean;
|
|
17
17
|
}>> & string;
|
|
18
|
-
export declare const Divider: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').
|
|
18
|
+
export declare const Divider: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
19
|
+
$hidden?: boolean;
|
|
20
|
+
}>> & string;
|
|
21
|
+
export declare const AnimatedRow: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
22
|
+
$delay?: number;
|
|
23
|
+
$skipAnimation?: boolean;
|
|
24
|
+
}>> & string;
|
|
25
|
+
export declare const TabsContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
26
|
+
export declare const TabIndicator: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
27
|
+
$index: number;
|
|
28
|
+
$count: number;
|
|
29
|
+
}>> & string;
|
|
30
|
+
export declare const TabButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
|
|
31
|
+
active: boolean;
|
|
32
|
+
}>> & string;
|
|
33
|
+
export declare const TabContent: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
34
|
+
export declare const SkeletonRow: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
35
|
+
export declare const SkeletonAvatar: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
36
|
+
export declare const SkeletonLines: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
37
|
+
export declare const SkeletonLine: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
38
|
+
$width?: string;
|
|
39
|
+
}>> & string;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { IConfig } from '../../types/types';
|
|
2
|
+
import { IConfig, IMentionSpan } from '../../types/types';
|
|
3
3
|
export interface SendInputProps {
|
|
4
|
-
sendMessage: (message: string) => void | Promise<void>;
|
|
5
|
-
|
|
4
|
+
sendMessage: (message: string, mentions?: IMentionSpan[]) => void | Promise<void>;
|
|
5
|
+
/**
|
|
6
|
+
* Receives a `File[]` for picked attachments (one message, N files) and a
|
|
7
|
+
* `Blob` for voice notes. Single files still arrive as a one-element array.
|
|
8
|
+
*/
|
|
9
|
+
sendMedia: (data: File[] | File | Blob, type: string) => void | Promise<void>;
|
|
6
10
|
isLoading: boolean;
|
|
7
11
|
editMessage?: string;
|
|
8
12
|
config?: IConfig;
|
|
@@ -14,9 +18,19 @@ export interface SendInputProps {
|
|
|
14
18
|
inputHeight?: number;
|
|
15
19
|
showPreview?: boolean;
|
|
16
20
|
previewParser?: (text: string) => (string | JSX.Element)[];
|
|
17
|
-
onSendMessage?: (message: string) => void | Promise<void>;
|
|
18
|
-
onSendMedia?: (data:
|
|
21
|
+
onSendMessage?: (message: string, mentions?: IMentionSpan[]) => void | Promise<void>;
|
|
22
|
+
onSendMedia?: (data: File[] | File | Blob, type: string) => void | Promise<void>;
|
|
19
23
|
placeholderText?: string;
|
|
24
|
+
/** Disables the @-mention autocomplete (e.g. for a composer variant that
|
|
25
|
+
* doesn't want it). Defaults to enabled. */
|
|
26
|
+
disableMentions?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Disables per-room draft persistence. Set it on any SECOND composer
|
|
29
|
+
* that is mounted for the same room as the main one - the thread
|
|
30
|
+
* composer, for instance - since drafts are keyed by room JID and two
|
|
31
|
+
* live composers would otherwise overwrite each other's text.
|
|
32
|
+
*/
|
|
33
|
+
disableDrafts?: boolean;
|
|
20
34
|
}
|
|
21
35
|
declare const SendInput: React.FC<SendInputProps>;
|
|
22
36
|
export default SendInput;
|
|
@@ -45,7 +45,7 @@ export declare const StyledLoaderWrapper: import('styled-components/dist/types')
|
|
|
45
45
|
export declare const OrDelimiter: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
46
46
|
export declare const AlsoContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
47
47
|
export declare const AlsoCheckbox: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, {
|
|
48
|
-
accentColor: string;
|
|
48
|
+
$accentColor: string;
|
|
49
49
|
}>> & string;
|
|
50
50
|
export declare const Wrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
51
51
|
bgColor: string;
|
|
@@ -13,3 +13,21 @@ export declare const FileInformation: import('styled-components/dist/types').ISt
|
|
|
13
13
|
export declare const FileName: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
14
14
|
export declare const FileSizeContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
15
15
|
export declare const FileSize: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
16
|
+
/** Wraps every attachment of one message. Single-file messages keep the
|
|
17
|
+
* old, un-gapped look because there is nothing to separate them from. */
|
|
18
|
+
export declare const AttachmentStack: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
19
|
+
export declare const AttachmentGrid: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
20
|
+
$columns: number;
|
|
21
|
+
}>> & string;
|
|
22
|
+
export declare const AttachmentTile: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
|
|
23
|
+
export declare const PdfContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
|
|
24
|
+
$compact: boolean;
|
|
25
|
+
}>> & string;
|
|
26
|
+
export declare const PdfThumbnailFrame: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
27
|
+
$compact: boolean;
|
|
28
|
+
}>> & string;
|
|
29
|
+
/** 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", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
31
|
+
export declare const PdfInformation: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
32
|
+
export declare const PdfMetaRow: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
33
|
+
export declare const PdfBadge: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
export declare const InputContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
2
2
|
export declare const MessageInputContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
|
+
/**
|
|
4
|
+
* Anchors the composer's emoji picker above the input row, inside
|
|
5
|
+
* InputContainer's positioning context (the same one MentionDropdown uses).
|
|
6
|
+
* Sits one layer above that dropdown so the two can never fight for the
|
|
7
|
+
* same pixels if both were ever open at once.
|
|
8
|
+
*/
|
|
9
|
+
export declare const EmojiPickerPopover: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
10
|
+
/**
|
|
11
|
+
* Drop-target state for drag-and-drop attachments. Covers the whole drop
|
|
12
|
+
* zone (the message area when the host marks one, else the composer) and is
|
|
13
|
+
* pointer-events: none so it can never swallow the drop it is announcing.
|
|
14
|
+
* Motion comes from the shared primitives, which already opt out under
|
|
15
|
+
* prefers-reduced-motion.
|
|
16
|
+
*/
|
|
17
|
+
export declare const DropOverlay: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
18
|
+
export declare const DropTarget: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
19
|
export declare const MessageInput: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, {
|
|
4
20
|
$color?: string;
|
|
5
21
|
$colorBg?: string;
|
|
@@ -12,6 +28,11 @@ export declare const FilePreviewContainer: import('styled-components/dist/types'
|
|
|
12
28
|
export declare const FilePreview: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
13
29
|
export declare const ImagePreview: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, never>> & string;
|
|
14
30
|
export declare const VideoPreview: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, never>> & string;
|
|
31
|
+
/** 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", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, never>> & string;
|
|
33
|
+
export declare const FilePreviewName: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
34
|
+
/** Why a pick was rejected (too many files, file too large). */
|
|
35
|
+
export declare const AttachmentNotice: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
15
36
|
export declare const StyledInput: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, {
|
|
16
37
|
$colorBg?: string;
|
|
17
38
|
}>> & string;
|
|
@@ -7,8 +7,8 @@ interface DateLabelProps {
|
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
9
|
export declare const StyledDateLabel: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
10
|
-
primary?: string;
|
|
11
|
-
secondary?: string;
|
|
10
|
+
$primary?: string;
|
|
11
|
+
$secondary?: string;
|
|
12
12
|
}>> & string;
|
|
13
13
|
declare const TreadLabel: React.FC<DateLabelProps>;
|
|
14
14
|
export default TreadLabel;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shape of a scripted question flow, and a sample script.
|
|
3
|
+
*
|
|
4
|
+
* This is EXAMPLE code, not part of the SDK surface: the engine only knows
|
|
5
|
+
* about a message carrying `quickReplies` and about sending the tapped value
|
|
6
|
+
* back into the room. Everything below - the notion of a "step", the order
|
|
7
|
+
* they run in, where the answers pile up - belongs to whoever drives the
|
|
8
|
+
* flow, whether that is a bot on the server or a host page like this one.
|
|
9
|
+
*
|
|
10
|
+
* The step types mirror the node palette of the flow builders these widgets
|
|
11
|
+
* are usually compared against (Say / Single Input / Options / Yes-No /
|
|
12
|
+
* Rating), minus the branching nodes.
|
|
13
|
+
*/
|
|
14
|
+
export type QuizStepType = 'say' | 'input' | 'choice' | 'yesno' | 'rating';
|
|
15
|
+
export interface QuizOption {
|
|
16
|
+
name: string;
|
|
17
|
+
value: string;
|
|
18
|
+
}
|
|
19
|
+
export interface QuizStep {
|
|
20
|
+
/** Echoed back as `questionId` when one of this step's buttons is tapped. */
|
|
21
|
+
id: string;
|
|
22
|
+
type: QuizStepType;
|
|
23
|
+
/** What the bot says. */
|
|
24
|
+
text: string;
|
|
25
|
+
/** Short name for the closing summary. Falls back to `text`. */
|
|
26
|
+
label?: string;
|
|
27
|
+
/** Only for `choice`; `yesno` and `rating` synthesise their own. */
|
|
28
|
+
options?: QuizOption[];
|
|
29
|
+
}
|
|
30
|
+
/** Buttons a step offers. `say` and `input` steps offer none. */
|
|
31
|
+
export declare function optionsForStep(step: QuizStep): QuizOption[];
|
|
32
|
+
/**
|
|
33
|
+
* A six-question intake, written as an eye clinic's because that is the
|
|
34
|
+
* kind of site these flows land on. Deliberately mixes button steps with
|
|
35
|
+
* typed ones: a name and a contact detail cannot be picked from a list, and
|
|
36
|
+
* the two answer paths are the thing worth demonstrating.
|
|
37
|
+
*/
|
|
38
|
+
export declare const DEFAULT_QUIZ_SCRIPT: QuizStep[];
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A throwaway visitor + room, so the demo runs with no credentials.
|
|
3
|
+
*
|
|
4
|
+
* `POST /v2/widget/sessions` is the same endpoint the embeddable assistant
|
|
5
|
+
* uses to put an anonymous website visitor into a real MUC room: the server
|
|
6
|
+
* mints a visitor JID with a password and a room to talk in. Borrowing it
|
|
7
|
+
* here keeps this page open-and-run instead of "first go find a login" -
|
|
8
|
+
* and it is the only part of the demo that is demo-specific. A host
|
|
9
|
+
* embedding the chat normally already has a signed-in user.
|
|
10
|
+
*/
|
|
11
|
+
export interface DemoSession {
|
|
12
|
+
appId: string;
|
|
13
|
+
baseUrl: string;
|
|
14
|
+
roomJID: string;
|
|
15
|
+
user: {
|
|
16
|
+
_id: string;
|
|
17
|
+
appId: string;
|
|
18
|
+
username: string;
|
|
19
|
+
name: string;
|
|
20
|
+
walletAddress: string;
|
|
21
|
+
firstName: string;
|
|
22
|
+
lastName: string;
|
|
23
|
+
xmppUsername: string;
|
|
24
|
+
xmppPassword: string;
|
|
25
|
+
token: string;
|
|
26
|
+
refreshToken: string;
|
|
27
|
+
defaultWallet: {
|
|
28
|
+
walletAddress: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
xmppSettings: {
|
|
32
|
+
devServer: string;
|
|
33
|
+
host: string;
|
|
34
|
+
conference: string;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export declare function useDemoSession(): {
|
|
38
|
+
session: DemoSession;
|
|
39
|
+
connect: () => Promise<void>;
|
|
40
|
+
loading: boolean;
|
|
41
|
+
error: string;
|
|
42
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { QuizStep } from './quizScript';
|
|
2
|
+
/**
|
|
3
|
+
* Drives a scripted question flow on top of the engine's two primitives:
|
|
4
|
+
*
|
|
5
|
+
* 1. a bot message carrying `quickReplies` renders buttons under the
|
|
6
|
+
* bubble;
|
|
7
|
+
* 2. tapping one sends that button's value into the room as an ordinary
|
|
8
|
+
* message, and calls `config.eventHandlers.onQuickReply`.
|
|
9
|
+
*
|
|
10
|
+
* The flow itself lives here, in host code. In production the same script
|
|
11
|
+
* would run on the bot: it would send the questions over XMPP instead of
|
|
12
|
+
* this hook injecting them into the store, and nothing in the engine or in
|
|
13
|
+
* the bubble would change.
|
|
14
|
+
*
|
|
15
|
+
* Steps that ask for free text have no buttons, so their answer arrives as
|
|
16
|
+
* an ordinary typed message. We watch the room for the user's own new
|
|
17
|
+
* messages to catch those - see the subscription below.
|
|
18
|
+
*/
|
|
19
|
+
export interface QuizAnswer {
|
|
20
|
+
stepId: string;
|
|
21
|
+
question: string;
|
|
22
|
+
answer: string;
|
|
23
|
+
/** How the answer was given, which is the interesting half of the demo. */
|
|
24
|
+
via: 'button' | 'typed';
|
|
25
|
+
}
|
|
26
|
+
export interface QuizBotIdentity {
|
|
27
|
+
id: string;
|
|
28
|
+
name: string;
|
|
29
|
+
avatar?: string;
|
|
30
|
+
}
|
|
31
|
+
export declare function useQuizFlow(script: QuizStep[], bot: QuizBotIdentity): {
|
|
32
|
+
onQuickReply: (event: {
|
|
33
|
+
messageId: string;
|
|
34
|
+
questionId: string;
|
|
35
|
+
reply: {
|
|
36
|
+
value: string;
|
|
37
|
+
};
|
|
38
|
+
}) => void;
|
|
39
|
+
start: () => void;
|
|
40
|
+
answers: QuizAnswer[];
|
|
41
|
+
isRunning: boolean;
|
|
42
|
+
currentStep: QuizStep;
|
|
43
|
+
stepIndex: number;
|
|
44
|
+
roomJID: any;
|
|
45
|
+
/** True while the composer is standing in for this step's buttons. */
|
|
46
|
+
awaitingTypedAnswer: boolean;
|
|
47
|
+
};
|
|
@@ -8,7 +8,5 @@ export declare const defaultConfig: {
|
|
|
8
8
|
messagingSenderId: any;
|
|
9
9
|
appId: any;
|
|
10
10
|
};
|
|
11
|
-
export declare const getFirebaseApp: (customConfig?: any) => FirebaseApp | null
|
|
12
|
-
export declare const getFirebaseMessaging: (customConfig?: any) => Messaging | null
|
|
13
|
-
export declare const app: FirebaseApp;
|
|
14
|
-
export declare const messaging: Messaging;
|
|
11
|
+
export declare const getFirebaseApp: (customConfig?: any) => Promise<FirebaseApp | null>;
|
|
12
|
+
export declare const getFirebaseMessaging: (customConfig?: any) => Promise<Messaging | null>;
|