This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
npm run build # Compile TypeScript to JavaScript
npm run build:watch # Watch mode for developmentnpm run test:all # Run all type tests
npm run test:types # Test type definitions only
npm run test:compatibility # Test compatibility
npm run test:example # Test example filenpm install # Install dependencies
tsc --noEmit # Type check without emitting filesThis is a TypeScript type definitions library for PPT Editor elements. The codebase follows a modular structure:
src/enums/- Enumeration types for shape paths, element types, and constantssrc/base/- Core base types (gradients, shadows, borders, links, common properties)src/elements/- PPT element type definitions (text, image, shape, line, chart, table, LaTeX, video, audio)src/animation/- Animation type definitions and configurationssrc/slide/- Slide-level types (slide structure, backgrounds, themes, templates)
- All PPT elements extend from base element interfaces with common properties (id, width, height, left, top, rotate, etc.)
- Each element type (
PPTTextElement,PPTImageElement, etc.) has specific properties relevant to its function - The main
PPTElementtype is a union of all element types - Slides contain arrays of elements and maintain theme/template relationships
The library uses ESM modules with .js extensions in imports. The main index.ts provides:
- Direct exports from all modules (
export * from './module/index.js') - Namespace exports for grouped imports (e.g.,
Elements,Enums,Base)
- All element types include a discriminator field
typefrom theElementTypesenum - Optional properties are clearly marked throughout the definitions
- Complex types like gradients and animations have well-defined structures