import type { CustomElement } from '..'; export type HighlightTextJson = { highlight?: boolean; text: string; }[] | null; export interface HighlightTextProps { /** 自定义样式表 */ css?: string; /** 自定义类名 */ class?: string; /** 内容 */ text?: string; /** 需要高亮的内容 */ highlight?: string | (HighlightRule | string)[]; /** RegExp flag */ flag?: HighlightRule['flag']; /** 额外需要高亮的内容 */ extra?: string; children?: string; /** 高亮颜色 * @default '#5794ff' * @since 2.12.2 **/ highlightColor?: string; } interface HighlightRule { /** 需要高亮的内容 */ highlight: string; /** RegExp flag */ flag?: 'g' | 'i' | 'm' | 'u' | 'y'; } export interface Highlight { /** 命中高亮 */ hit?: boolean; /** 内容 */ text: string; } declare function HighlightText(props: HighlightTextProps): import("solid-js").JSX.Element; declare namespace HighlightText { var registry: () => void; } export type HighlightTextElement = CustomElement; export default HighlightText;