import { type Nip94Tags } from "."; export declare enum FragmentType { /** * Plain test fragment */ Text = "text", /** * Link to external site */ Link = "link", /** * @ mention of a nostr entity */ Mention = "mention", /** * Lightning invoice */ Invoice = "invoice", /** * Image or Video link (http/https) */ Media = "media", /** * Cashu token */ Cashu = "cashu", /** * Hashtag topic link */ Hashtag = "hashtag", /** * Custom emoji link */ CustomEmoji = "custom_emoji", /** * Highlighted text (handled externally) */ HighlightedText = "highlighted_text", /** * Code block (```) */ CodeBlock = "code_block", /** * Inline code (`) */ InlineCode = "inline_code", /** * Blossom url */ BlossomBlob = "blossom", /** * Magnet torrent link */ MagnetLink = "magnet" } export interface ParsedFragment { type: FragmentType; /** * The raw fragment content string */ content: string; /** * Media mime type for "media" fragments */ mimeType?: string; /** * Code language or spoken language */ language?: string; /** * Opaque object based on the fragment type */ data?: object; } export type Fragment = string | ParsedFragment; export declare function parseIMeta(tags: Array>): Record | undefined; export declare function transformText(body: string, tags: Array>): ParsedFragment[]; //# sourceMappingURL=text.d.ts.map