/** * SVG Plugin * * Handles SVG code blocks and SVG image files in content script and DOCX export */ import { BasePlugin } from './base-plugin'; /** * AST node interface for SVG plugin */ interface AstNode { type: string; lang?: string; value?: string; url?: string; } export declare class SvgPlugin extends BasePlugin { private _currentNodeType; constructor(); /** * Extract content from AST node * Handles both SVG code blocks and SVG image files * @param node - AST node * @returns SVG content or URL, or null if not applicable */ extractContent(node: AstNode): string | null; /** * SVG uses inline rendering for images, block for code blocks * @returns True for inline rendering (images), false for block (code blocks) */ isInline(): boolean; /** * Check if content is a URL (for image nodes) * @param content - Extracted content * @returns True if content is a URL */ isUrl(content: string): boolean; /** * Fetch SVG content from URL * Uses DocumentService for unified file access across all platforms. * @param url - URL to fetch (http://, https://, file://, data:, or relative path) * @returns SVG content */ fetchContent(url: string): Promise; /** * Get AST node selector(s) for remark visit * SVG plugin handles both code blocks and image nodes * @returns Array of node types ['code', 'image'] */ get nodeSelector(): string[]; } export {};