stream-chat-react
Version:
React components to create chat conversations or livestream style chat
24 lines (23 loc) • 1.19 kB
TypeScript
import type { ReactNode } from 'react';
import type { Attachment, SharedLocationResponse } from 'stream-chat';
import type { ATTACHMENT_GROUPS_ORDER, AttachmentProps } from './Attachment';
export declare const SUPPORTED_VIDEO_FORMATS: string[];
export type AttachmentComponentType = (typeof ATTACHMENT_GROUPS_ORDER)[number];
export type GroupedRenderedAttachment = Record<AttachmentComponentType, ReactNode[]>;
export type GalleryAttachment = {
images: Attachment[];
type: 'gallery';
};
export type RenderAttachmentProps = Omit<AttachmentProps, 'attachments'> & {
attachment: Attachment;
};
export type RenderGalleryProps = Omit<AttachmentProps, 'attachments'> & {
attachment: GalleryAttachment;
};
export type GeolocationContainerProps = Omit<AttachmentProps, 'attachments'> & {
location: SharedLocationResponse;
};
export declare const isGalleryAttachmentType: (attachment: Attachment | GalleryAttachment) => attachment is GalleryAttachment;
export declare const isSvgAttachment: (attachment: Attachment) => boolean;
export declare const divMod: (num: number, divisor: number) => number[];
export declare const displayDuration: (totalSeconds?: number) => string;