cozy-iiif 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -14,7 +14,9 @@ A developer-friendly collection of abstractions and utilities built on top of th
14
14
 
15
15
  ## Installation
16
16
 
17
- Todo...
17
+ ```bash
18
+ npm install cozy-iiif
19
+ ```
18
20
 
19
21
  ## Basic Usage
20
22
 
@@ -1,5 +1,5 @@
1
1
  import { Canvas } from '@iiif/presentation-3';
2
2
  import { CozyImageResource } from '../types';
3
- export declare const getThumbnailURL: (canvas: Canvas, images?: CozyImageResource[]) => (minSize?: number) => string;
3
+ export declare const getThumbnailURL: (canvas: Canvas, images?: CozyImageResource[]) => (minSize?: number) => string | undefined;
4
4
  export declare const normalizeServiceUrl: (url: string) => string;
5
5
  export declare const getImages: (canvas: Canvas) => CozyImageResource[];
@@ -5,8 +5,8 @@ export declare const isImageService: (data: any) => data is ImageService;
5
5
  export declare const parseImageService: (service: Service) => {
6
6
  majorVersion: number;
7
7
  profileLevel: number;
8
- };
8
+ } | undefined;
9
9
  export declare const getImageURLFromService: (service: ImageService2 | ImageService3, width: number, height: number) => string;
10
- export declare const getRegionURLFromService: (service: ImageService2 | ImageService3, bounds: Bounds, minSize: number) => string;
10
+ export declare const getRegionURLFromService: (service: ImageService2 | ImageService3, bounds: Bounds, minSize: number) => string | undefined;
11
11
  export declare const getRegionURL: (image: CozyImageResource) => (bounds: Bounds, minSize?: number) => string | undefined;
12
12
  export {};
@@ -1,6 +1,6 @@
1
1
  import { InternationalString } from '@iiif/presentation-3';
2
2
  import { CozyMetadata } from '../types';
3
3
  export declare const getPropertyValue: <T extends unknown = any>(data: any, name: string) => T;
4
- export declare const getStringValue: (propertyValue: string | InternationalString, locale?: string) => string;
5
- export declare const getLabel: (data: any) => (locale?: string) => string;
4
+ export declare const getStringValue: (propertyValue: string | InternationalString, locale?: string) => string | undefined;
5
+ export declare const getLabel: (data: any) => (locale?: string) => string | undefined;
6
6
  export declare const getMetadata: (data: any) => (locale?: string) => CozyMetadata[];