@plteam/chat-ui
Version:
CUI Kit is a free and open-source library for creating AI assistant chat interfaces, built with React, Material UI, and TypeScript
23 lines (22 loc) • 1.1 kB
JavaScript
export class ChatViewConstants {
static TEXT_BLOCK_HEIGHT = 56;
static TEXT_BLOCK_BOTTOM_MARGIN = 8;
static SCROLL_ID = 'chatScrollingBlockId';
static DIALOGUE_ROOT_ID = 'chatRootBlockId';
static MESSAGE_ROW_PADDING_TOP = 8;
static MESSAGE_ROW_PADDING_BOTTOM = 32;
static INPUT_BUTTON_SIZE = 43;
static TEXT_FIELD_ROW_ID = 'chatTextFieldRowId';
static MESSAGE_BOX_ID = 'chatMessageBoxId';
static SIDE_CONTAINER_LARGE = 260;
static MARKDOWN_IMAGE_CLASSNAME = 'chatImageGalleryClass';
static MAX_ATTACHMENTS_IN_MESSAGE = 20;
static MAX_ATTACHMENT_SIZE = 2 * 1024 * 1024 * 1024; // 2 GB;
static TEXT_SMOOTH_ANIMATION_DURATION_MS = 500;
// Delay between consecutive elements in a fade-in batch, so a burst reads as a gentle
// top-to-bottom wave instead of everything at once.
static TEXT_SMOOTH_STAGGER_STEP_MS = 50;
// Upper bound on the cumulative stagger, so a large batch starts almost simultaneously
// rather than crawling in over a long, glitchy wave.
static TEXT_SMOOTH_STAGGER_MAX_MS = 150;
}