Skip to content

Commit 57e71e9

Browse files
kochizufanclaude
andcommitted
feat: implement v1.1.0 with image fetching and canvas tools
New features: - Add iiif-image-fetch tool for fetching actual IIIF image data - Automatic size constraints (max 1500px, 1M pixels) - Full IIIF Image API parameter support - Returns Base64-encoded image data - Add iiif-manifest-canvases tool for listing all canvases in a manifest - Filtering options (hasImage, hasAnnotation, labelPattern) - Optional metadata and thumbnail inclusion - Add iiif-canvas-info tool for detailed canvas information - Support for multiple images per canvas - Annotation details - Optional Image API info.json fetching Other changes: - Add esbuild bundling support for single-file distribution - Remove Windows-incompatible shebang from bundle - Remove test-echo tool and directory - Update version to 1.1.0 - Fix TypeScript type errors Bundle size: ~2.7MB (includes all dependencies) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 5f3dc7c commit 57e71e9

File tree

15 files changed

+1671
-1460
lines changed

15 files changed

+1671
-1460
lines changed

dist/index.d.ts

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,13 +532,58 @@ export declare class IIIFImageClient {
532532
format?: string;
533533
}): StructuredImageResult;
534534
getStructuredImageInfo(info: any): StructuredImageInfo;
535+
applyImageConstraints(width: number, height: number, maxDimension?: number, maxPixels?: number): {
536+
width: number;
537+
height: number;
538+
};
539+
fetchImageData(imageUrl: string, options?: {
540+
region?: string;
541+
size?: string;
542+
rotation?: string;
543+
quality?: string;
544+
format?: string;
545+
maxDimension?: number;
546+
maxPixels?: number;
547+
}): Promise<{
548+
uri: string;
549+
mimeType: string;
550+
blob: string;
551+
}>;
535552
}
536553
export declare class IIIFManifestClient {
537554
getManifest(manifestUrl: string): Promise<IIIFManifest>;
538555
private getFirstValue;
539556
private getMetadataValue;
540557
formatManifest(manifest: IIIFManifest, properties?: string[]): string;
541558
getStructuredManifest(manifest: IIIFManifest): StructuredManifestResult;
559+
getFirstLabel(label?: IIIFLabel): string;
560+
getCanvases(manifest: IIIFManifest, options?: {
561+
filter?: {
562+
hasImage?: boolean;
563+
hasAnnotation?: boolean;
564+
labelPattern?: string;
565+
};
566+
includeMetadata?: boolean;
567+
includeThumbnail?: boolean;
568+
}): Promise<Array<{
569+
id: string;
570+
label: string;
571+
width: number;
572+
height: number;
573+
images: string[];
574+
imageCount: number;
575+
thumbnail?: string;
576+
metadata?: Record<string, any>;
577+
annotationCount: number;
578+
annotationTypes: string[];
579+
}>>;
580+
getCanvasInfo(manifest: IIIFManifest, options?: {
581+
canvasId?: string;
582+
canvasIndex?: number;
583+
includeAnnotations?: boolean;
584+
includeImageInfo?: boolean;
585+
includeStructures?: boolean;
586+
}): Promise<any>;
542587
}
543588
export declare class IIIFCollectionClient {
544589
getCollection(collectionUrl: string): Promise<IIIFCollection>;

dist/index.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)