This section provides detailed API documentation for both tsdraw packages. Currently, the API reference is mainly AI-generated, but when I have time, I’ll be writing it myself.Documentation Index
Fetch the complete documentation index at: https://docs.tsdraw.com/llms.txt
Use this file to discover all available pages before exploring further.
Packages
@tsdraw/core
The framework-agnostic drawing engine. Shapes, tools, viewport, document store, and rendering.
@tsdraw/react
React component layer. The Tsdraw component, props, toolbar, style panel, and hooks.
@tsdraw/core
| Module | Description |
|---|---|
| Editor | Central orchestrator — shapes, tools, viewport, undo/redo |
| Shapes | Shape types, DrawShape interface, style types |
| Tools | ToolManager, ToolDefinition, StateNode |
| Viewport | Camera position and zoom, coordinate conversion |
| Document store | Shape storage and ordering |
| Renderer | Canvas rendering, stroke rendering, fills |
@tsdraw/react
| Module | Description |
|---|---|
| Tsdraw component | The main React component |
| Props | TsdrawProps and all option types |
| Hooks | Canvas controller and internal hooks |