/**
* Markdown → safe HTML for chat message rendering (widget).
*
* Uses markdown-it (CommonMark + linkify) then an allowlist sanitize —
* keep in sync with inbox ChatMessageMarkdown / sanitize-html allowlist.
*/
import type { ContentType } from "../types";
/** Allow http(s), mailto, and relative / in-page hrefs; block javascript: etc. */
export declare function isSafeHref(href: string): boolean;
/**
* Open a message-body link. The shadow host uses `pointer-events: none` so the
* closed bubble doesn't block the page; native `` navigation is unreliable
* in that setup, while Preact button handlers still work.
*/
export declare function openMessageLink(href: string): void;
/**
* Convert stored message content to safe HTML for bubble rendering.
*/
export declare function renderRichMessage(text: string, contentType?: ContentType): string;
/** Plain-text preview for channel list (strips widgets + HTML). */
export declare function plainTextMessagePreview(content: string, maxLength?: number): string;