/** * IIIF (International Image Interoperability Framework) Type Definitions * * Supports IIIF Presentation API v2.x manifests and Image API v2.x */ export interface IIIFManifest { '@context': string; '@id': string; '@type': 'sc:Manifest'; label: string; description?: string; attribution?: string; license?: string; logo?: string; thumbnail?: string | IIIFThumbnail; metadata?: IIIFMetadata[]; sequences: IIIFSequence[]; structures?: IIIFRange[]; } export interface IIIFThumbnail { '@id': string; '@type'?: string; service?: IIIFImageService; } export interface IIIFMetadata { label: string; value: string | string[]; } export interface IIIFSequence { '@id': string; '@type': 'sc:Sequence'; label?: string; viewingDirection?: 'left-to-right' | 'right-to-left' | 'top-to-bottom' | 'bottom-to-top'; viewingHint?: string; canvases: IIIFCanvas[]; } export interface IIIFCanvas { '@id': string; '@type': 'sc:Canvas'; label: string; height: number; width: number; thumbnail?: string | IIIFThumbnail; images: IIIFAnnotation[]; } export interface IIIFAnnotation { '@id': string; '@type': 'oa:Annotation'; motivation: string; resource: IIIFResource; on: string; } export interface IIIFResource { '@id': string; '@type': string; format: string; height: number; width: number; service?: IIIFImageService; } export interface IIIFImageService { '@context': string; '@id': string; profile: string; } export interface IIIFRange { '@id': string; '@type': 'sc:Range'; label: string; canvases?: string[]; ranges?: string[]; } export type IIIFRegion = 'full' | 'square' | `${number},${number},${number},${number}` | `pct:${number},${number},${number},${number}`; export type IIIFSize = 'full' | 'max' | `${number},` | `,${number}` | `pct:${number}` | `${number},${number}` | `!${number},${number}`; export type IIIFRotation = '0' | '90' | '180' | '270' | `!${number}` | `${number}`; export type IIIFQuality = 'default' | 'color' | 'gray' | 'bitonal'; export type IIIFFormat = 'jpg' | 'png' | 'gif' | 'webp' | 'tif'; export interface IIIFImageParams { baseUrl: string; region?: IIIFRegion; size?: IIIFSize; rotation?: IIIFRotation; quality?: IIIFQuality; format?: IIIFFormat; } export interface ParsedManifest { id: string; label: string; description?: string; attribution?: string; license?: string; thumbnailUrl?: string; metadata: Record; totalCanvases: number; canvases: ParsedCanvas[]; } export interface ParsedCanvas { id: string; label: string; width: number; height: number; thumbnailUrl?: string; imageServiceUrl?: string; imageUrl?: string; } export declare const KNOWN_IIIF_PROVIDERS: { readonly slv: { readonly name: "State Library Victoria"; readonly manifestPattern: "https://rosetta.slv.vic.gov.au/delivery/iiif/presentation/2.1/{id}/manifest"; readonly imagePattern: "https://rosetta.slv.vic.gov.au:2083/iiif/2/{id}/{region}/{size}/{rotation}/{quality}.{format}"; }; readonly nla: { readonly name: "National Library of Australia"; readonly manifestPattern: "https://nla.gov.au/nla.obj-{id}/manifest"; readonly imagePattern: "https://nla.gov.au/nla.obj-{id}/image"; }; readonly bodleian: { readonly name: "Bodleian Libraries, Oxford"; readonly manifestPattern: "https://iiif.bodleian.ox.ac.uk/iiif/manifest/{id}.json"; readonly imagePattern: "https://iiif.bodleian.ox.ac.uk/iiif/image/{id}"; }; }; //# sourceMappingURL=types.d.ts.map