import type { CSSProperties } from 'react'; /** 含 on* 事件处理器(onerror、onload 等) */ export declare const DANGEROUS_EVENT_HANDLER_PATTERN: RegExp; /** 非法 / 危险 URL 降级为纯文本时的展示样式 */ export declare const UNSAFE_URL_PLAIN_TEXT_STYLE: CSSProperties; export declare const DANGEROUS_URL_SCHEMES: readonly ["javascript:", "vbscript:"]; export declare const hasDangerousEventHandlers: (value: string) => boolean; export declare const hasDangerousUrlScheme: (value: string) => boolean; /** 字符串是否形如 HTML 片段(非法 URL,如 ``) */ export declare const looksLikeHtmlSnippet: (value: string) => boolean; /** * URL / 属性值是否应降级为纯文本展示(非法 HTML URL 或含事件处理器)。 */ export declare const shouldRenderUrlAsPlainText: (url: string) => boolean; /** 将 hast element 序列化为原始 HTML 字符串(用于纯文本降级展示) */ export declare const serializeHastElement: (node: { tagName: string; properties?: Record; children?: Array<{ type: string; value?: string; tagName?: string; }>; }) => string; /** hast 元素是否应整体降级为纯文本(而非仅剥离危险属性) */ export declare const shouldElementRenderAsPlainText: (node: { type?: string; tagName?: string; properties?: Record; }) => boolean;