Install annot-core
@ingcreators/annot-core is the SVG annotation format + storage
types layer. Install it directly when you’re building a new host
(another editor, a Vim plugin, an extension for a different
browser) and want to consume the format without a renderer.
Install
Section titled “Install”npm install @ingcreators/annot-coreThe root export is DOM-free by construction — you can
import from it inside a Node script, a Cloudflare Worker, or a
Web Worker without pulling in document / window.
What’s in the root
Section titled “What’s in the root”import { type ElementTree, type ImageRecord, type StorageProvider, parseAnnotationSvg, serializeAnnotationSvg, DATA_ANNOT_VERSION,} from "@ingcreators/annot-core";- Format primitives —
parseAnnotationSvg/serializeAnnotationSvg+ thedata-annot-versionattribute constants - Storage types —
ImageRecord,FolderRecord,StorageProvider - ElementTree — canonical screen-capture model + serializers
- traversal helpers (
@ingcreators/annot-core/element-tree)
- traversal helpers (
- Pure utilities — id generation, dasharray helpers, ZIP building, default colour constants
Editor primitives (Tier B)
Section titled “Editor primitives (Tier B)”import { rectForBoundingBox, arrowBetween, textAt,} from "@ingcreators/annot-core/editor";The /editor subpath holds jsdom-friendly element-takers — no
real-browser dependencies, but they manipulate Element instances.
Safe to use in tests that boot happy-dom or jsdom.
What’s not here
Section titled “What’s not here”If you want a working annotated PNG out of an ImageRecord,
install @ingcreators/annot-annotator. Core is
the format + types layer; the renderer ships separately so you can
pick a target (browser canvas, Node resvg-js, your own
implementation).