Reference
ts
import { applyDrawingEdit, toSvg } from '@adecore/drawing';
import { migrateDrawing, type DrawingDocument } from '@adecore/drawing/protocol';Limits and constants
| Name | Value | Explained in |
|---|---|---|
DRAWING_VERSION | 1 | Documents |
DRAWING_TEXT_SIZE_MIN | 12 | Documents |
DRAWING_TEXT_SIZE_MAX | 96 | Documents |
DRAWING_EDIT_LIMITS | { perEdit: 200, elements: 5000 } | Edits and rebasing |
DEFAULT_SVG_MARGIN | 32 | Paths and SVG |
LINE_HEIGHT | 1.25 | Text |
NOTE_PADDING | 16 | Text |
The element fields are on Documents and the SvgOptions on Paths and SVG.
Exports
Every name each entry point exports, read from its source. Anything not listed is internal and may change in any release.
@adecore/drawing
Edits, rebasing, geometry, paths, the SVG export, text and reading order.
@adecore/drawing/protocol
The schemas and types of a drawing, and migrateDrawing. Loads Zod and nothing else.