msvg-schema
v0.1.1
Published
JSON Schemas, TypeScript types, and validation for msvg (MotionSVG) animation packages
Maintainers
Readme
msvg-schema
TypeScript types, JSON Schemas, and validators for msvg (MotionSVG) animation packages. Zero dependencies. This is the package that makes msvg animations safe for both humans and AI agents to edit: every motion file is structured JSON that validates before it runs.
Install
npm install msvg-schemaUse
import { validatePackage, isValidEasing, easings, durations } from "msvg-schema";
const { valid, issues } = validatePackage({ config, targets, timelines, states });
if (!valid) {
// each issue: { severity: "error" | "warning", code, path, message, suggestion? }
}Granular validators are exported too: validateManifest, validateTargets, validateTimelines, validateStates, validateAccessibility — plus the full type definitions for every file in a package and the easings / durations design tokens.
For command-line validation of a package folder, use msvg-cli:
npx -p msvg-cli msvg validate path/to/animationMore
- Package format — every file explained
- Spec — the normative reference
- Runtime:
msvg-core
MIT © ariadng
