import type { ComponentType, JSX, ReactNode } from 'react'; import type { Options } from 'react-markdown'; import type { UserResponse } from 'stream-chat'; import type { PluggableList } from 'unified'; import type { MentionProps } from './componentRenderers/Mention'; import type { RenderTextMentionEntity } from './rehypePlugins'; export type RenderTextPluginConfigurator = (defaultPlugins: PluggableList) => PluggableList; type IntrinsicElementTagName = keyof JSX.IntrinsicElements & string; export declare const defaultAllowedTagNames: Array; export declare const markDownRenderers: RenderTextOptions['customMarkDownRenderers']; export type RenderTextOptions = { allowedTagNames?: Array; customMarkDownRenderers?: Options['components'] & Partial<{ emoji: ComponentType; mention: ComponentType; }>; getRehypePlugins?: RenderTextPluginConfigurator; getRemarkPlugins?: RenderTextPluginConfigurator; /** * Additive mention metadata for rendered message text. * * Prefer this over the deprecated `mentionedUsers` argument. Use it whenever * the message contains mention kinds beyond direct-user mentions * (for example `@channel`, `@here`, roles, or user groups) and `renderText` * needs the exact mention entities that should be highlighted in the rendered * markdown output. */ messageMentionEntities?: RenderTextMentionEntity[]; }; export type RenderTextFunction = (text?: string, /** * @deprecated Pass mention metadata through `options.messageMentionEntities` * instead. This argument only supports direct-user mentions. Will be removed in next major version. */ mentionedUsers?: UserResponse[], options?: RenderTextOptions) => ReactNode; export declare function renderText(text?: string, /** * @deprecated Pass mention metadata through `options.messageMentionEntities` * instead. This argument only supports direct-user mentions. */ mentionedUsers?: UserResponse[], { allowedTagNames, customMarkDownRenderers, getRehypePlugins, getRemarkPlugins, messageMentionEntities, }?: RenderTextOptions): import("react/jsx-runtime").JSX.Element | null; export {}; //# sourceMappingURL=renderText.d.ts.map