@vibephoto/photometa
v1.0.0
Published
PhotoMeta edit-state TypeScript interfaces, JSON Schema, and AJV validator.
Maintainers
Readme
@vibephoto/photometa
TypeScript interfaces, JSON Schema, and AJV validator for PhotoMeta non-destructive photo edits.
Install
npm i @vibephoto/photometa ajv ajv-formats
# or
pnpm add @vibephoto/photometa ajv ajv-formatsUsage
import { validateEdit, PhotoMetaJSONSchema } from "@vibephoto/photometa";
import type { PhotoMetaEdit } from "@vibephoto/photometa";
const edit: PhotoMetaEdit = {
photometaVersion: "1.0",
image: { id: "IMG1", fileName: "photo.jpg", dimensions: { width: 4032, height: 3024 } }
};
const res = validateEdit(edit);
if (!res.ok) {
console.error(res.errors);
}Exports
PhotoMetaEditTypeScript interfacesPhotoMetaJSONSchemaJSON Schema (Draft-07)validateEdit()AJV helper
Scripts
npm run build— builds ESM + CJS + types viatsupnpm test— runs unit tests viavitest
License
MIT
