import { ComponentType } from 'react'; import { nanoid } from 'nanoid'; import { Options } from 'react-markdown'; import type { ReactMarkdownProps } from 'react-markdown/lib/complex-types'; import type { Content, Root } from 'hast'; import type { UserResponse } from 'stream-chat'; import type { DefaultStreamChatGenerics } from './types/types'; export declare const isOnlyEmojis: (text?: string) => boolean; declare type HNode = Content | Root; export declare const matchMarkdownLinks: (message: string) => (string | null)[]; export declare const messageCodeBlocks: (message: string) => RegExpMatchArray; export declare type MentionProps = ReactMarkdownProps & { /** * @deprecated will be removed in the next major release, transition to using `node.mentionedUser` instead */ mentioned_user: UserResponse; node: { /** * @deprecated will be removed in the next major release, transition to using `node.mentionedUser` instead */ mentioned_user: UserResponse; mentionedUser: UserResponse; }; }; export declare const markDownRenderers: RenderTextOptions['customMarkDownRenderers']; export declare const emojiMarkdownPlugin: () => (node: HNode) => import("hast-util-find-and-replace/lib").Node; export declare const mentionsMarkdownPlugin: (mentioned_users: UserResponse[]) => () => (tree: HNode) => HNode; export declare type RenderTextOptions = { customMarkDownRenderers?: Options['components'] & Partial<{ emoji: ComponentType; mention: ComponentType>; }>; }; export declare const renderText: (text?: string, mentionedUsers?: UserResponse[] | undefined, { customMarkDownRenderers }?: RenderTextOptions) => JSX.Element | null; export declare function escapeRegExp(text: string): string; /** * @deprecated will be removed in the next major release */ export declare const generateRandomId: typeof nanoid; export declare const getWholeChar: (str: string, i: number) => string; export {}; //# sourceMappingURL=utils.d.ts.map