### Install Dependencies Source: https://github.com/sdruckerfig/node-pptx-png/blob/main/README.md Installs the necessary packages for the project. ```bash npm install ``` -------------------------------- ### Install node-pptx-png Source: https://github.com/sdruckerfig/node-pptx-png/blob/main/README.md Install the core package using npm. ```bash npm install node-pptx-png ``` -------------------------------- ### Install Sharp for PNG Optimization Source: https://github.com/sdruckerfig/node-pptx-png/blob/main/README.md Install the `sharp` package to enable advanced PNG optimization for smaller file sizes. ```bash npm install sharp ``` -------------------------------- ### Install build tools on Ubuntu/Debian Source: https://github.com/sdruckerfig/node-pptx-png/blob/main/README.md Prerequisites for skia-canvas on Ubuntu/Debian. ```bash sudo apt-get install build-essential libfontconfig1-dev ``` -------------------------------- ### Install pkg-config on macOS Source: https://github.com/sdruckerfig/node-pptx-png/blob/main/README.md Prerequisite for skia-canvas on macOS. ```bash brew install pkg-config ``` -------------------------------- ### Core Module Public API - IPptxImageRenderer Source: https://github.com/sdruckerfig/node-pptx-png/blob/main/IMPLEMENTATION_PLAN.md Defines the public interface for the PPTX to Image conversion library. Use this interface to render entire presentations, individual slides, or to get the total number of slides in a PPTX file. ```typescript interface IPptxImageRenderer { renderPresentation(input: Buffer | string, options?: PptxRenderOptions): Promise; renderSlide(input: Buffer | string, slideIndex: number, options?: PptxRenderOptions): Promise; getSlideCount(input: Buffer | string): Promise; } ``` -------------------------------- ### PptxImageRenderer Constructor Source: https://github.com/sdruckerfig/node-pptx-png/blob/main/README.md Initializes a new instance of the PptxImageRenderer. You can optionally configure the logging level. ```APIDOC ## PptxImageRenderer Constructor ### Description Initializes a new instance of the PptxImageRenderer. You can optionally configure the logging level. ### Signature ```typescript new PptxImageRenderer(options?: { logLevel?: 'debug' | 'info' | 'warn' | 'error' | 'silent' }) ``` ``` -------------------------------- ### PPTX Conversion with Options Source: https://github.com/sdruckerfig/node-pptx-png/blob/main/README.md Render specific slides of a PPTX file with custom options like scale and format. Initialize the renderer with logging options. ```typescript import { PptxImageRenderer } from 'node-pptx-png'; const renderer = new PptxImageRenderer({ logLevel: 'info' }); const result = await renderer.renderPresentation('./presentation.pptx', { scale: 0.5, // Scale factor (0.5 = half size) format: 'png', // Output format slideNumbers: [1, 2, 3], // Optional: render only specific slides }); ``` -------------------------------- ### Run Tests Source: https://github.com/sdruckerfig/node-pptx-png/blob/main/README.md Executes the project's test suite to ensure functionality. ```bash npm test ``` -------------------------------- ### Build Project Source: https://github.com/sdruckerfig/node-pptx-png/blob/main/README.md Compiles the project's TypeScript code into JavaScript. ```bash npm run build ``` -------------------------------- ### Node-PPTX Dependencies with Sharp Source: https://github.com/sdruckerfig/node-pptx-png/blob/main/PLAN-PNG-OPTIMIZATION.md Defines the project's dependencies, including skia-canvas and Sharp as an optional peer dependency. This configuration allows for optional image optimization via Sharp. ```json { "dependencies": { "skia-canvas": "^3.0.8" }, "peerDependencies": { "sharp": ">=0.32.0" }, "peerDependenciesMeta": { "sharp": { "optional": true } }, "devDependencies": { "sharp": "^0.33.0" } } ``` -------------------------------- ### Render Test Presentation Source: https://github.com/sdruckerfig/node-pptx-png/blob/main/README.md Renders a specified PowerPoint file to PNG images using a TypeScript script. Requires the path to the input .pptx file and the output directory. ```bash npx ts-node scripts/render-pptx.ts ./test.pptx ./output ``` -------------------------------- ### PngOptimizer Optimize Method with Palette Fallback Source: https://github.com/sdruckerfig/node-pptx-png/blob/main/PLAN-PNG-OPTIMIZATION.md Optimizes a canvas to a PNG buffer using Sharp, with a fallback mechanism for palette mode. If palette mode fails due to color complexity, it reverts to standard PNG compression. ```typescript async optimize(canvas: Canvas, options: PngOptimizationOptions): Promise { if (!this.sharp) { return canvas.toBuffer('png'); } const sharpInstance = canvas.toSharp(); if (options.palette) { try { return await sharpInstance.png({ palette: true, colors: options.colors ?? 256, quality: options.quality ?? 90, dither: options.dither ?? 1.0, compressionLevel: options.compressionLevel ?? 9, }).toBuffer(); } catch { // Fallback to non-palette compression for color-rich images return await sharpInstance.png({ compressionLevel: options.compressionLevel ?? 9, adaptiveFiltering: options.adaptiveFiltering ?? true, }).toBuffer(); } } return await sharpInstance.png({ compressionLevel: options.compressionLevel ?? 6, adaptiveFiltering: options.adaptiveFiltering ?? true, }).toBuffer(); } ``` -------------------------------- ### PNG Optimization Presets Source: https://github.com/sdruckerfig/node-pptx-png/blob/main/README.md Predefined settings for optimizing PNG output size. These presets offer different trade-offs between file size reduction and processing time. ```APIDOC ## PNG Optimization Presets ### Description Predefined settings for optimizing PNG output size. | Preset | Size Reduction | Description | |---|---|---| | `'none'` | 0% | No optimization (fastest) | | `'fast'` | ~1-2% | Quick lossless compression | | `'balanced'` | ~2-3% | Lossless with adaptive filtering | | `'maximum'` | ~2-3% | Best lossless compression | | `'web'` | **60-70%** | Palette quantization (may affect photo quality) | ``` -------------------------------- ### Development Dependencies Source: https://github.com/sdruckerfig/node-pptx-png/blob/main/IMPLEMENTATION_PLAN.md Lists the npm packages necessary for development, including TypeScript, testing frameworks (Vitest), linters (ESLint), and code formatters (Prettier). ```json { "typescript": "^5.3.0", "@types/node": "^20.0.0", "vitest": "^1.0.0", "eslint": "^8.55.0", "@typescript-eslint/parser": "^6.0.0", "@typescript-eslint/eslint-plugin": "^6.0.0", "prettier": "^3.1.0" } ``` -------------------------------- ### Revised Project Structure Source: https://github.com/sdruckerfig/node-pptx-png/blob/main/IMPLEMENTATION_PLAN.md The project is organized into 'src' for source code, 'test' for testing infrastructure and fixtures, and configuration files. New modules are integrated into the 'src' directory under 'core', 'rendering', 'geometry', 'theme', and 'text'. ```treeview pptimg/ ├── src/ │ ├── index.ts │ ├── types/ │ │ ├── index.ts │ │ ├── options.ts │ │ ├── results.ts │ │ ├── theme.ts │ │ ├── geometry.ts │ │ └── elements.ts │ │ │ ├── core/ │ │ ├── PptxImageRenderer.ts │ │ ├── PptxParser.ts │ │ ├── UnitConverter.ts │ │ └── PlaceholderResolver.ts # NEW │ │ │ ├── rendering/ │ │ ├── SlideRenderer.ts │ │ ├── ShapeRenderer.ts │ │ ├── TextRenderer.ts │ │ ├── ImageRenderer.ts │ │ ├── FillRenderer.ts │ │ ├── StrokeRenderer.ts │ │ ├── ChartRenderer.ts │ │ ├── BackgroundRenderer.ts │ │ ├── ConnectionShapeRenderer.ts # NEW │ │ ├── GroupShapeRenderer.ts # NEW │ │ └── AlternateContentRenderer.ts # NEW │ │ │ ├── geometry/ │ │ ├── PresetGeometryCalculator.ts │ │ ├── CustomGeometryParser.ts # NEW │ │ ├── PathBuilder.ts │ │ └── TransformCalculator.ts │ │ │ ├── theme/ │ │ ├── ThemeResolver.ts │ │ ├── ColorResolver.ts │ │ ├── FontResolver.ts │ │ └── FontSubstitution.ts # NEW │ │ │ ├── text/ │ │ ├── TextLayoutEngine.ts # NEW │ │ ├── WordWrapper.ts # NEW │ │ └── BulletFormatter.ts # NEW │ │ │ ├── parsers/ │ │ ├── SlideParser.ts │ │ ├── ShapeParser.ts │ │ ├── TextParser.ts │ │ ├── ChartParser.ts │ │ └── RelationshipParser.ts │ │ │ └── utils/ │ ├── ColorUtils.ts │ ├── XmlUtils.ts │ └── Logger.ts │ ├── test/ │ ├── visual/ # NEW │ │ ├── baselines/ │ │ ├── comparisons/ │ │ └── tolerance.config.ts │ ├── integration/ │ ├── unit/ │ └── fixtures/ │ ├── shapes-basic.pptx │ ├── shapes-preset-all.pptx │ ├── text-formatting.pptx │ ├── gradients.pptx │ ├── images-embedded.pptx │ ├── theme-colors.pptx │ ├── charts-basic.pptx │ ├── smartart-org-chart.pptx │ ├── connectors.pptx │ ├── groups-nested.pptx │ ├── transforms-rotation.pptx │ └── placeholder-inheritance.pptx │ ├── package.json ├── tsconfig.json ├── vitest.config.ts ├── .eslintrc.js ├── .prettierrc ├── README.md └── CLAUDE.md ``` -------------------------------- ### Production Dependencies Source: https://github.com/sdruckerfig/node-pptx-png/blob/main/IMPLEMENTATION_PLAN.md Lists the essential npm packages required for the production build of the node-pptx-png project, including libraries for ZIP handling, XML parsing, and canvas rendering. ```json { "jszip": "^3.10.1", "fast-xml-parser": "^4.3.0", "canvas": "^2.11.2" } ``` -------------------------------- ### PPTX to PNG with Balanced PNG Optimization Source: https://github.com/sdruckerfig/node-pptx-png/blob/main/README.md Render a PPTX file with PNG optimization set to the 'balanced' preset for lossless compression with adaptive filtering (around 2-3% smaller). ```typescript // Or use other presets const result2 = await renderer.renderPresentation('./presentation.pptx', { pngOptimization: 'balanced' // ~2-3% smaller, lossless }); ``` -------------------------------- ### Basic PPTX to PNG Conversion Source: https://github.com/sdruckerfig/node-pptx-png/blob/main/README.md Render all slides of a PPTX file to PNG images and save them to disk. Requires `fs` for file operations. ```typescript import { PptxImageRenderer } from 'node-pptx-png'; import * as fs from 'fs'; const renderer = new PptxImageRenderer(); // Render all slides const result = await renderer.renderPresentation('./presentation.pptx', { format: 'png', scale: 1.0 }); for (const slide of result.slides) { if (slide.imageData) { fs.writeFileSync(`slide-${slide.slideNumber}.png`, slide.imageData); } } ``` -------------------------------- ### RenderOptions Source: https://github.com/sdruckerfig/node-pptx-png/blob/main/README.md Configuration options for rendering a presentation. These options allow customization of the output size, format, and selection of slides. ```APIDOC ## RenderOptions ### Description Configuration options for rendering a presentation. ### Properties - `scale` (number) - Optional - Default: `1.0` - Scale factor for output size. - `format` (string) - Optional - Default: `'png'` - Output format. Currently only supports 'png'. - `slideNumbers` (number[]) - Optional - Default: all slides - An array of slide numbers (1-based) to render. - `pngOptimization` (string | object) - Optional - Default: `'none'` - PNG optimization preset or custom options. See PNG Optimization Presets for details. ``` -------------------------------- ### PPTX to PNG with Web-Optimized PNGs Source: https://github.com/sdruckerfig/node-pptx-png/blob/main/README.md Render a PPTX file with PNG optimization set to the 'web' preset for significant file size reduction (60-70%). ```typescript import { PptxImageRenderer } from 'node-pptx-png'; const renderer = new PptxImageRenderer(); // Use the 'web' preset for maximum compression (60-70% smaller) const result = await renderer.renderPresentation('./presentation.pptx', { pngOptimization: 'web' }); ``` -------------------------------- ### Render PPTX from Buffer Source: https://github.com/sdruckerfig/node-pptx-png/blob/main/README.md Render a PPTX presentation directly from a Buffer object, useful when the PPTX file is not available as a file path. ```typescript import { PptxImageRenderer } from 'node-pptx-png'; import * as fs from 'fs'; const pptxBuffer = fs.readFileSync('./presentation.pptx'); const renderer = new PptxImageRenderer(); const result = await renderer.renderPresentation(pptxBuffer); ``` -------------------------------- ### PPTX to PNG with Custom PNG Optimization Source: https://github.com/sdruckerfig/node-pptx-png/blob/main/README.md Render a PPTX file with custom PNG optimization options, allowing fine-grained control over compression level, filtering, and color palette. ```typescript // Or use custom options const result3 = await renderer.renderPresentation('./presentation.pptx', { pngOptimization: { compressionLevel: 9, adaptiveFiltering: true, palette: true, colors: 128, quality: 80 } }); ``` -------------------------------- ### Default Render Options Source: https://github.com/sdruckerfig/node-pptx-png/blob/main/IMPLEMENTATION_PLAN.md Specifies the default configuration options for rendering PowerPoint presentations, including dimensions, format, and JPEG quality. ```typescript const DEFAULT_OPTIONS: Required = { width: 1920, height: undefined, // Auto-calculated format: 'png', jpegQuality: 90, backgroundColor: undefined, }; ``` -------------------------------- ### PngOptimizer Utility Type Definitions Source: https://github.com/sdruckerfig/node-pptx-png/blob/main/PLAN-PNG-OPTIMIZATION.md Defines presets and options for PNG optimization within the PngOptimizer utility. Presets offer predefined optimization configurations. ```typescript import type { Canvas } from 'skia-canvas'; export type PngOptimizationPreset = 'none' | 'fast' | 'balanced' | 'maximum' | 'web'; export interface PngOptimizationOptions { /** PNG compression level (0-9). 0=fastest, 9=smallest. Default: 6 */ compressionLevel?: number; /** Use adaptive row filtering. Default: true */ adaptiveFiltering?: boolean; /** Convert to indexed/palette PNG. Default: false */ palette?: boolean; /** Max colors for palette mode (2-256). Default: 256 */ colors?: number; /** Quality for palette quantization (1-100). Default: 90 */ quality?: number; /** Floyd-Steinberg dithering (0.0-1.0). Default: 1.0 */ dither?: number; /** Strip metadata. Default: true */ stripMetadata?: boolean; } const PNG_PRESETS: Record = { none: {}, fast: { compressionLevel: 4, adaptiveFiltering: false }, balanced: { compressionLevel: 6, adaptiveFiltering: true }, maximum: { compressionLevel: 9, adaptiveFiltering: true }, web: { compressionLevel: 9, adaptiveFiltering: true, palette: true, colors: 256, quality: 85, dither: 1.0 } }; ``` -------------------------------- ### renderPresentation Source: https://github.com/sdruckerfig/node-pptx-png/blob/main/README.md Renders all slides or a specified subset of slides from a PPTX presentation into PNG images. The input can be a file path or a Buffer. Options can control the output scale, format, and specific slides to render. ```APIDOC ## renderPresentation ### Description Renders all slides (or specified slides) in a presentation. ### Parameters - `input` (Buffer | string) - Required - File path or buffer containing PPTX data - `options` (RenderOptions) - Optional - Optional rendering options ### Returns - `Promise` - A promise that resolves with the rendering results, including image data for each slide. ``` -------------------------------- ### IPptxImageRenderer Interface Source: https://github.com/sdruckerfig/node-pptx-png/blob/main/IMPLEMENTATION_PLAN.md The main interface for interacting with the PPTX to Image Converter library. It provides methods to render entire presentations, individual slides, and to retrieve the total number of slides in a presentation. ```APIDOC ## IPptxImageRenderer Interface ### Description Provides methods for rendering PowerPoint presentations and slides into image formats. ### Methods #### `renderPresentation(input: Buffer | string, options?: PptxRenderOptions): Promise` - **Description**: Renders an entire PPTX presentation into a collection of images, one for each slide. - **Parameters**: - `input` (Buffer | string): The PPTX file content as a Buffer or a file path as a string. - `options` (PptxRenderOptions, optional): Rendering options to customize the output. - **Returns**: A Promise that resolves to `PresentationRenderResult`, containing an array of rendered slide images. #### `renderSlide(input: Buffer | string, slideIndex: number, options?: PptxRenderOptions): Promise` - **Description**: Renders a specific slide from a PPTX presentation into an image. - **Parameters**: - `input` (Buffer | string): The PPTX file content as a Buffer or a file path as a string. - `slideIndex` (number): The zero-based index of the slide to render. - `options` (PptxRenderOptions, optional): Rendering options to customize the output. - **Returns**: A Promise that resolves to `SlideRenderResult`, containing the rendered image for the specified slide. #### `getSlideCount(input: Buffer | string): Promise` - **Description**: Retrieves the total number of slides in a PPTX presentation without rendering them. - **Parameters**: - `input` (Buffer | string): The PPTX file content as a Buffer or a file path as a string. - **Returns**: A Promise that resolves to a number representing the total count of slides. ``` -------------------------------- ### PptxParser Class Source: https://github.com/sdruckerfig/node-pptx-png/blob/main/IMPLEMENTATION_PLAN.md Provides methods to open, parse, and extract data from PPTX files. Supports retrieving presentation details, slides, layouts, masters, themes, and media. ```typescript class PptxParser { private zip: JSZip; async open(input: Buffer | string): Promise; async getPresentation(): Promise; async getSlide(index: number): Promise; async getSlideLayout(layoutId: string): Promise; async getSlideMaster(masterId: string): Promise; async getTheme(): Promise; async getMedia(relationshipId: string): Promise; close(): void; } ``` -------------------------------- ### Sharp PNG Options Interface Source: https://github.com/sdruckerfig/node-pptx-png/blob/main/PLAN-PNG-OPTIMIZATION.md Defines the available options for PNG optimization when using the Sharp library. These options control compression, filtering, palette usage, and dithering. ```typescript interface SharpPngOptions { compressionLevel?: number; // 0-9, default 6 adaptiveFiltering?: boolean; // default false palette?: boolean; // default false colors?: number; // 2-256, default 256 (NOT paletteColors) quality?: number; // 1-100, only with palette mode dither?: number; // 0.0-1.0, Floyd-Steinberg dithering progressive?: boolean; // Adam7 interlacing } ``` -------------------------------- ### PptxRenderOptions Interface Source: https://github.com/sdruckerfig/node-pptx-png/blob/main/IMPLEMENTATION_PLAN.md Defines options for rendering a presentation or slide. Specify target dimensions, image format, JPEG quality, and background color. ```typescript interface PptxRenderOptions { width?: number; // Target width in pixels (default: 1920) height?: number; // Target height (auto-calculated if omitted) format?: ImageFormat; // Output format (default: 'png') jpegQuality?: number; // JPEG quality 1-100 (default: 90) backgroundColor?: string; // Override background color } type ImageFormat = 'png' | 'jpeg'; ``` -------------------------------- ### Update PptxRenderOptions Interface Source: https://github.com/sdruckerfig/node-pptx-png/blob/main/PLAN-PNG-OPTIMIZATION.md Extends the PptxRenderOptions interface to include PNG optimization settings, allowing users to specify presets or custom options for PNG output. ```typescript export type PngOptimizationPreset = 'none' | 'fast' | 'balanced' | 'maximum' | 'web'; export interface PngOptimizationOptions { compressionLevel?: number; adaptiveFiltering?: boolean; palette?: boolean; colors?: number; quality?: number; dither?: number; stripMetadata?: boolean; } // In PptxRenderOptions: pngOptimization?: PngOptimizationPreset | PngOptimizationOptions; ``` -------------------------------- ### Integrate PngOptimizer in SlideRenderer Source: https://github.com/sdruckerfig/node-pptx-png/blob/main/PLAN-PNG-OPTIMIZATION.md Modify the exportCanvas method to conditionally use PngOptimizer based on configuration. This ensures PNG optimization is applied when enabled and falls back to standard canvas export otherwise. ```typescript private async exportCanvas(canvas: Canvas): Promise { if (this.options.format === 'jpeg') { return canvas.toBuffer('jpeg', { quality: this.options.jpegQuality / 100 }); } // Use PNG optimization if configured if (this.pngOptimizer && this.options.pngOptimization !== 'none') { return this.pngOptimizer.optimize(canvas, this.options.pngOptimization); } return canvas.toBuffer('png'); } ``` -------------------------------- ### Gradient Rendering Functions Source: https://github.com/sdruckerfig/node-pptx-png/blob/main/IMPLEMENTATION_PLAN.md Functions for rendering linear and radial gradients on a canvas. Requires a rendering context, bounding box, angle (for linear), center (for radial), and an array of gradient stops. ```typescript interface GradientStop { position: number; // 0-100% color: string; // Resolved RGBA } function renderLinearGradient(ctx: CanvasRenderingContext2D, bounds: Rect, angle: number, stops: GradientStop[]): void; function renderRadialGradient(ctx: CanvasRenderingContext2D, bounds: Rect, center: Point, stops: GradientStop[]): void; ``` -------------------------------- ### PresentationRenderResult Interface Source: https://github.com/sdruckerfig/node-pptx-png/blob/main/IMPLEMENTATION_PLAN.md Aggregates the results of rendering an entire presentation. Contains an array of slide results, total slides, and overall success metrics. ```typescript interface PresentationRenderResult { slides: SlideRenderResult[]; totalSlides: number; successfulSlides: number; allSuccessful: boolean; } ``` -------------------------------- ### SlideRenderResult Interface Source: https://github.com/sdruckerfig/node-pptx-png/blob/main/IMPLEMENTATION_PLAN.md Represents the result of rendering a single slide. Includes slide index, image data, dimensions, and success status. ```typescript interface SlideRenderResult { slideIndex: number; slideNumber: number; // 1-based for display imageData: Buffer; // PNG/JPEG bytes width: number; height: number; success: boolean; errorMessage?: string; } ``` -------------------------------- ### getSlideCount Source: https://github.com/sdruckerfig/node-pptx-png/blob/main/README.md Retrieves the total number of slides present in a PPTX presentation. The input can be a file path or a Buffer. ```APIDOC ## getSlideCount ### Description Gets the number of slides in a presentation. ### Parameters - `input` (Buffer | string) - Required - File path or buffer containing PPTX data ### Returns - `Promise` - A promise that resolves with the total number of slides in the presentation. ``` -------------------------------- ### UnitConverter Constants and Functions Source: https://github.com/sdruckerfig/node-pptx-png/blob/main/IMPLEMENTATION_PLAN.md Provides constants for ECMA-376 units and function signatures for converting between different units like EMU, pixels, points, and angles. ```typescript const EMU_PER_INCH = 914400; const EMU_PER_POINT = 12700; const EMU_PER_CM = 360000; const ANGLE_UNIT = 60000; // 60,000ths of a degree function emuToPixels(emu: number, dpi: number): number; function pointsToEmu(points: number): number; function emuToPoints(emu: number): number; function angleToRadians(angle: number): number; function fontSizeToPoints(fontSize: number): number; // hundredths of a point ``` -------------------------------- ### Type Check Project Source: https://github.com/sdruckerfig/node-pptx-png/blob/main/README.md Performs static type checking on the TypeScript code without emitting JavaScript files. ```bash npx tsc --noEmit ``` -------------------------------- ### SlideRenderContext Interface Source: https://github.com/sdruckerfig/node-pptx-png/blob/main/IMPLEMENTATION_PLAN.md Context object used during slide rendering. It holds the canvas, 2D rendering context, theme information, slide dimensions, target dimensions, and scaling factors. ```typescript interface SlideRenderContext { canvas: Canvas; ctx: CanvasRenderingContext2D; theme: ResolvedTheme; slideWidth: number; // EMU slideHeight: number; // EMU targetWidth: number; // pixels targetHeight: number; // pixels scaleX: number; // slideWidth → targetWidth scaleY: number; // slideHeight → targetHeight } ``` -------------------------------- ### Text Body Structure Source: https://github.com/sdruckerfig/node-pptx-png/blob/main/IMPLEMENTATION_PLAN.md Defines the hierarchical structure of text within a PowerPoint presentation, detailing properties for body, paragraphs, runs, and text content. ```plaintext txBody ├── bodyPr (body properties: anchor, margins) └── p[] (paragraphs) ├── pPr (paragraph properties: alignment, spacing) └── r[] (runs) ├── rPr (run properties: font, size, color) └── t (text content) ``` -------------------------------- ### RenderError Interface Source: https://github.com/sdruckerfig/node-pptx-png/blob/main/IMPLEMENTATION_PLAN.md Defines the structure for reporting rendering errors, including the error level, slide index, element type, message, and optional stack trace. ```typescript interface RenderError { level: 'presentation' | 'slide' | 'element'; slideIndex?: number; elementType?: string; message: string; stack?: string; } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.