/** * Layout templates and styling for memory card rendering * Optimized for LLM vision input with high-contrast, readable design */ import type { Frame } from "../frames/types.js"; export interface CardDimensions { width: number; height: number; padding: number; lineHeight: number; } export interface ColorScheme { background: string; text: string; heading: string; accent: string; muted: string; warning: string; error: string; diffAddition: string; diffDeletion: string; diffUnchanged: string; diffContext: string; } export interface FontConfig { family: string; sizeTitle: number; sizeHeading: number; sizeBody: number; sizeSmall: number; } /** * Default card dimensions optimized for vision models * Based on research: ~800px wide for good token compression */ export declare const DEFAULT_DIMENSIONS: CardDimensions; /** * High-contrast dark theme color scheme * Optimized for readability in vision models */ export declare const DARK_COLOR_SCHEME: ColorScheme; /** * Monospace font configuration for technical content */ export declare const MONOSPACE_FONT: FontConfig; /** * Maximum text lengths to prevent overflow */ export declare const TEXT_LIMITS: { summaryCaption: number; referencePoint: number; nextAction: number; blockerItem: number; maxBlockers: number; maxKeywords: number; }; /** * Truncate text with ellipsis if it exceeds max length */ export declare function truncateText(text: string, maxLength: number): string; /** * Wrap text to fit within a given width * Returns array of lines */ export declare function wrapText(text: string, maxWidth: number, charWidth: number): string[]; /** * Calculate dynamic card height based on content */ export declare function calculateCardHeight(frame: Frame, dimensions: CardDimensions): number;