UNPKG

stream-chat-react

Version:

React components to create chat conversations or livestream style chat

29 lines 1.57 kB
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 = 'card' | 'gallery' | 'giphy' | 'image' | 'media' | 'audio' | 'voiceRecording' | 'file' | 'geolocation' | 'unsupported'; export type AttachmentContainerType = (typeof ATTACHMENT_GROUPS_ORDER)[number]; export type GroupedRenderedAttachment = Record<AttachmentContainerType, ReactNode[]>; export type GalleryAttachment = { items: Attachment[]; type: 'gallery'; }; export type RenderAttachmentProps = Omit<AttachmentProps, 'attachments'> & { attachment: Attachment; }; export type RenderGalleryProps = Omit<AttachmentProps, 'attachments'> & { attachment: GalleryAttachment; }; export type RenderMediaProps = Omit<AttachmentProps, 'attachments'> & { attachments: Attachment[]; }; 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; export declare function getCssDimensionsVariables(url: string): Record<string, number>; //# sourceMappingURL=utils.d.ts.map