API reference
Modules
Section titled “Modules”createAnnotator— factory for the headless annotator.- Playwright fixture —
the
test.extend({ annotator })surface. - Annotation DSL — typed JSON vocabulary
(
rect/circle/arrow/text/callout/raw) shared by the annotator, the Playwright fixture, and the MCP server. Recommended starting point for new code. - Encode pipeline —
format: "smart"+saveSizePresetfor PNG-8 / JPEG / resize. Optional on the annotator, the Playwright fixture, and every MCP tool that emits an image. Typically halves the output bytes for UI screenshots. - SVG helpers — low-level fragment
builders (
rectForBoundingBox,arrowBetween,textAt). Useful when the DSL doesn’t cover what you need; otherwise prefer the DSL.
Stability commitments
Section titled “Stability commitments”The published packages — annot-core, annot-annotator,
annot-playwright, the living-product-docs trio — follow
semver. Pre-1.0, minor bumps may include
breaking changes; we’ll call them out in the CHANGELOG
of the affected package.
Once any package reaches 1.0.0 it follows strict semver:
breaking changes go to a major version.
How to consume
Section titled “How to consume”// Highest leverage — drop into your Playwright suite.import { test, expect, rectForBoundingBox } from "@ingcreators/annot-playwright";
// Headless renderer — Node CLI, build pipeline, custom CI.import { createAnnotator } from "@ingcreators/annot-annotator";
// Format primitives — building a new host.import { type ImageRecord, parseAnnotationSvg } from "@ingcreators/annot-core";