{"id":13502,"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.","status":"active","version":"4.3.4","language":"javascript","source_language":"en","source_url":"https://github.com/iiif-commons/manifesto","tags":["javascript","IIIF","typescript"],"install":[{"cmd":"npm install manifesto.js","lang":"bash","label":"npm"},{"cmd":"yarn add manifesto.js","lang":"bash","label":"yarn"},{"cmd":"pnpm add manifesto.js","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"All primary IIIF classes and interfaces are exported as named exports, not default.","wrong":"import Manifest from 'manifesto.js';","symbol":"Manifest","correct":"import { Manifest } from 'manifesto.js';"},{"note":"The `Utils` object, containing methods like `parse`, is a named export. Ensure to use named imports for ESM environments.","wrong":"const Utils = require('manifesto.js').Utils;","symbol":"Utils","correct":"import { Utils } from 'manifesto.js';"},{"note":"Use the `IIIFResource` class for the base type, not an 'I' prefix interface unless specifically importing `IResource` type.","wrong":"import { IResource } from 'manifesto.js';","symbol":"IIIFResource","correct":"import { IIIFResource } from 'manifesto.js';"}],"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."},"warnings":[{"fix":"Replace calls to `resource.getDescription()` with `resource.getSummary()`.","message":"The `IIIFResource::getDescription()` method has been deprecated in favor of `IIIFResource::getSummary()` to align with IIIF Presentation v3 specification changes.","severity":"breaking","affected_versions":">=4.3.0"},{"fix":"Ensure your project's TypeScript version is 5.0 or newer, or adjust your `tsconfig.json` to be compatible.","message":"The library upgraded to TypeScript 5 in v4.2.21. Users with older TypeScript versions or specific build configurations might encounter compilation issues.","severity":"gotcha","affected_versions":">=4.2.21"},{"fix":"It is recommended to use a Node.js version officially supported and actively maintained, preferably Node.js 18 or 20, for optimal compatibility and security.","message":"While the `engines` field specifies Node.js `>=8.9.1`, recent CI/CD updates and dependency bumps indicate development and testing primarily target modern Node.js versions (e.g., Node 20). Using very old Node.js versions might lead to unexpected behavior or dependency conflicts.","severity":"gotcha","affected_versions":">=4.0.0"}],"env_vars":null,"search_vec":"'4.3.4':64 'activ':11 'addit':94 'adher':110 'align':86 'annot':103 'api':4,27,114 'applic':58 'backend':123 'browser':51 'bug':79 'bump':78 'class':34 'client':49 'client-sid':48 'comprehens':31,127 'continu':82 'cover':46 'current':60 'definit':130 'depend':77 'design':16 'develop':124,137 'differenti':106 'driven':75 'dual':117 'enabl':131 'enhanc':84 'environ':52 'evolv':88 'extract':41 'featur':83 'fix':80 'framework':25 'frequent':68 'frontend':121 'full':109 'iiif':2,21,44,89,96,112,140 'imag':23 'includ':100,107 'inform':42 'interact':18 'intern':22 'interoper':24 'javascript':139 'javascript/typescript':13 'key':105 'librari':15,66 'maintain':12 'manifest':45 'manifesto.js':1,6 'method':36 'minor':73 'node.js':57 'pars':38 'patch':71 'present':3,26,97,113 'provid':29 'receiv':67 'recent':93 'releas':74 'robust':9,132 'safe':136 'server':55 'server-sid':54 'set':32 'side':50,56 'specif':90,115 'stabl':61 'summari':101 'support':99 'travers':39 'type':129,135 'type-saf':134 'typescript':128,141 'typic':70 'updat':69 'util':5,14,118 'v3':98 'version':62 'workflow':138","created_at":"2026-04-20T01:54:50.208095+00:00","updated_at":"2026-04-20T01:54:50.208095+00:00","problems":[{"fix":"Ensure you are using named imports for ESM: `import { Utils } from 'manifesto.js';`","cause":"Attempting to access `Utils.parse` on a CommonJS `require`'d module object that doesn't correctly expose named exports directly on the default export, or incorrect destructuring in ESM.","error":"TypeError: Utils.parse is not a function"},{"fix":"Update your code to use `IIIFResource.getSummary()` instead of `IIIFResource.getDescription()`.","cause":"Attempting to use the deprecated `getDescription` method on an `IIIFResource` instance after upgrading to version 4.3.0 or later.","error":"Property 'getDescription' does not exist on type 'IIIFResource'. Did you mean 'getSummary'?"},{"fix":"Run `npm install manifesto.js` (or `yarn add manifesto.js`). Verify your TypeScript configuration if the issue persists after installation.","cause":"The package is not installed, or there's an issue with module resolution in your build environment (e.g., incorrect `tsconfig.json` paths or missing `types` in a library consuming it).","error":"Cannot find module 'manifesto.js' or its corresponding type declarations."}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":"https://manifesto.iiif.io","github":"https://github.com/iiif-commons/manifesto","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/manifesto.js","openapi_spec":null,"status_page":null,"smithery":null,"categories":["serialization","http-networking","web-framework"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-18","install_tag":null}}