{"library":"manifesto.js","title":"Manifesto.js (IIIF Presentation API Utility)","description":"manifesto.js is a robust and actively maintained JavaScript/TypeScript utility library designed for interacting with the IIIF (International Image Interoperability Framework) Presentation API. It provides a comprehensive set of classes and methods for parsing, traversing, and extracting information from IIIF manifests, covering both client-side browser environments and server-side Node.js applications. The current stable version is 4.3.4. The library receives frequent updates, typically patch and minor releases, driven by dependency bumps, bug fixes, and continuous feature enhancements to align with evolving IIIF specifications, such as recent additions for IIIF Presentation v3 support including `summary` and annotations. Its key differentiators include its full adherence to IIIF Presentation API specifications, its dual utility for both frontend and backend development, and its comprehensive TypeScript type definitions, enabling robust and type-safe development workflows.","language":"javascript","status":"active","last_verified":"Sun Apr 19","install":{"commands":["npm install manifesto.js"],"cli":null},"imports":["import { Manifest } from 'manifesto.js';","import { Utils } from 'manifesto.js';","import { IIIFResource } from 'manifesto.js';"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { Manifest, Utils, IIIFResource } from 'manifesto.js';\n\nasync function loadAndProcessManifest(manifestUri: string): Promise<void> {\n    try {\n        const response = await fetch(manifestUri);\n        if (!response.ok) {\n            throw new Error(`Failed to fetch manifest: ${response.statusText}`);\n        }\n        const manifestJson = await response.json();\n\n        // Parse the manifest using Manifesto.Utils.parse\n        const manifest: Manifest = Utils.parse(manifestJson);\n\n        console.log(`Manifest Title: ${manifest.getLabel().getValue()}`);\n        console.log(`Manifest Summary: ${manifest.getSummary().getValue()}`);\n\n        const firstCanvas = manifest.getSequences()[0]?.getCanvases()[0];\n        if (firstCanvas) {\n            console.log(`First Canvas ID: ${firstCanvas.id}`);\n            console.log(`First Canvas Label: ${firstCanvas.getLabel().getValue()}`);\n        } else {\n            console.log(\"No canvases found in the first sequence.\");\n        }\n\n    } catch (error) {\n        console.error(\"Error processing manifest:\", error);\n    }\n}\n\n// Example usage with a public IIIF manifest\nconst exampleManifestUri = \"https://iiif.bodleian.ox.ac.uk/iiif/manifest/5b3513b6-9964-469b-813c-3965682245b0.json\";\nloadAndProcessManifest(exampleManifestUri);","lang":"typescript","description":"This quickstart demonstrates how to fetch, parse, and extract basic information (title, summary, first canvas details) from a IIIF manifest using manifesto.js.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}