/** * Plugin Content Script Utilities * Handles content script specific logic for plugins (HTML generation, remark integration) */ import type { BasePlugin } from './base-plugin'; import type { TranslateFunction, EscapeHtmlFunction, AsyncTaskQueueManager, ASTNode, PluginRenderer } from '../types/index'; /** * Create async placeholder element HTML (before rendering) * @param id - Placeholder element ID * @param pluginType - Plugin type identifier * @param isInline - Whether to render inline or block * @param translate - Translation function * @param sourceHash - Content hash for DOM diff matching * @returns Placeholder HTML */ export declare function createPlaceholderElement(id: string, pluginType: string, isInline: boolean, translate: TranslateFunction, sourceHash?: string): string; /** * Create error HTML * @param errorMessage - Localized error message * @returns Error HTML */ export declare function createErrorHTML(errorMessage: string): string; /** * Visit function type from unist-util-visit */ type VisitFn = (tree: unknown, nodeType: string, visitor: (node: ASTNode, index: number | undefined, parent: { children?: unknown[]; } | undefined) => void) => void; /** * Create remark plugin function for a plugin * @param plugin - Plugin instance * @param renderer - Renderer instance * @param asyncTask - Async task creator * @param translate - Translation function * @param escapeHtml - HTML escape function * @param visit - unist-util-visit function * @returns Remark plugin function */ export declare function createRemarkPlugin(plugin: BasePlugin, renderer: PluginRenderer, asyncTask: AsyncTaskQueueManager['asyncTask'], translate: TranslateFunction, escapeHtml: EscapeHtmlFunction, visit: VisitFn): () => (tree: unknown) => void; export {};