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 +3 -1
- package/dist/core/canvas.d.ts +1 -1
- package/dist/core/image-service.d.ts +2 -2
- package/dist/core/resource.d.ts +2 -2
- package/dist/index.js +773 -17
- package/dist/level-0/fetch-image-info.d.ts +3 -0
- package/dist/level-0/index.js +184 -4
- package/dist/{src/core/resource.js → resource-DS2brz47.js} +7 -7
- package/dist/types.d.ts +1 -1
- package/package.json +3 -3
- package/src/Cozy.ts +2 -2
- package/src/core/canvas.ts +4 -3
- package/src/core/image-service.ts +7 -4
- package/src/core/resource.ts +4 -4
- package/src/level-0/crop-region.ts +6 -5
- package/src/level-0/fetch-image-info.ts +11 -0
- package/src/level-0/get-thumbnail.ts +5 -4
- package/src/types.ts +1 -1
- package/tsconfig.json +7 -8
- package/vite.config.ts +0 -5
- package/dist/src/Cozy.js +0 -133
- package/dist/src/core/canvas.js +0 -63
- package/dist/src/core/image-service.js +0 -36
- package/dist/src/level-0/crop-region.js +0 -59
- package/dist/src/level-0/get-thumbnail.js +0 -57
- package/dist/src/level-0/throttled-loader.js +0 -33
package/README.md
CHANGED
package/dist/core/canvas.d.ts
CHANGED
@@ -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 {};
|
package/dist/core/resource.d.ts
CHANGED
@@ -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[];
|