/** * Viewer Utilities * * Handles viewing and downloading generated assets: * - Auto-open in browser (desktop) * - Download to local filesystem * - Environment-aware defaults (headless vs desktop) */ import type { UploadResult, ViewOptions } from "./storage/provider.js"; import { isHeadless, getDefaultViewOptions } from "./storage/provider.js"; export type { ViewOptions }; export { isHeadless, getDefaultViewOptions }; /** * Open a URL in the default browser * Works on macOS, Linux, and Windows */ export declare function openInBrowser(url: string): Promise; /** * Download a file from URL to local path */ export declare function downloadFile(url: string, localPath: string): Promise; /** * Get the best viewable URL from an upload result * Prefers signed URL for private buckets */ export declare function getViewableUrl(result: UploadResult): string | null; /** * Handle viewing/downloading after upload * Returns info about what was done */ export declare function handleUploadResult(result: UploadResult, options?: Partial): Promise<{ url: string | null; opened: boolean; downloaded: string | null; }>; /** * Parse CLI flags for view options * Supports: --open, --no-open, --download, --no-download, --output=path */ export declare function parseViewFlags(args: string[]): Partial; /** * Format upload result for display */ export declare function formatUploadResult(result: UploadResult, handleResult?: { opened: boolean; downloaded: string | null; }): string;