@nonphoto/sanity-image 3.1.0 → 3.2.0
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/dist/index.d.ts +1 -34
- package/package.json +1 -1
- package/src/index.ts +0 -1
- package/src/metadata.ts +0 -35
package/dist/index.d.ts
CHANGED
|
@@ -13,39 +13,6 @@ interface SanityImageObject {
|
|
|
13
13
|
}
|
|
14
14
|
declare function isSanityImageObject(x: any): x is SanityImageObject;
|
|
15
15
|
|
|
16
|
-
interface SanityImagePaletteSwatch {
|
|
17
|
-
_type?: "sanity.imagePaletteSwatch" | null;
|
|
18
|
-
background?: string | null;
|
|
19
|
-
foreground?: string | null;
|
|
20
|
-
population?: number | null;
|
|
21
|
-
title?: string | null;
|
|
22
|
-
}
|
|
23
|
-
interface SanityImagePalette {
|
|
24
|
-
_type?: "sanity.imagePalette" | null;
|
|
25
|
-
darkMuted?: SanityImagePaletteSwatch | null;
|
|
26
|
-
darkVibrant?: SanityImagePaletteSwatch | null;
|
|
27
|
-
dominant?: SanityImagePaletteSwatch | null;
|
|
28
|
-
lightMuted?: SanityImagePaletteSwatch | null;
|
|
29
|
-
lightVibrant?: SanityImagePaletteSwatch | null;
|
|
30
|
-
muted?: SanityImagePaletteSwatch | null;
|
|
31
|
-
vibrant?: SanityImagePaletteSwatch | null;
|
|
32
|
-
}
|
|
33
|
-
interface SanityImageDimensions {
|
|
34
|
-
_type?: "sanity.imageDimensions" | null;
|
|
35
|
-
aspectRatio?: number | null;
|
|
36
|
-
width?: number | null;
|
|
37
|
-
height?: number | null;
|
|
38
|
-
}
|
|
39
|
-
interface SanityImageMetadata {
|
|
40
|
-
_type: "sanity.imageMetadata";
|
|
41
|
-
blurHash?: string | null;
|
|
42
|
-
dimensions?: SanityImageDimensions | null;
|
|
43
|
-
hasAlpha?: boolean | null;
|
|
44
|
-
isOpaque?: boolean | null;
|
|
45
|
-
lqip?: string | null;
|
|
46
|
-
palette?: SanityImagePalette | null;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
16
|
type ImageFormat = "jpg" | "pjpg" | "png" | "webp";
|
|
50
17
|
type FitMode = "clip" | "crop" | "fill" | "fillmax" | "max" | "scale" | "min";
|
|
51
18
|
type CropMode = "top" | "bottom" | "left" | "right" | "center" | "focalpoint" | "entropy";
|
|
@@ -109,4 +76,4 @@ interface SanityClientLike {
|
|
|
109
76
|
declare function sanityImageUrl(client: SanityClientLike, image: SanityImageAssetStub, params?: SanityImageParams): string;
|
|
110
77
|
declare function sanityImageSrcset(client: SanityClientLike, image: SanityImageAssetStub, params?: Omit<SanityImageParams, "width">, widths?: number[]): string;
|
|
111
78
|
|
|
112
|
-
export { type AutoMode, type CropMode, type Dpr, type FitMode, type ImageFormat, type Orientation, type SanityClientLike, type SanityImageAssetLike, type SanityImageAssetStub, type
|
|
79
|
+
export { type AutoMode, type CropMode, type Dpr, type FitMode, type ImageFormat, type Orientation, type SanityClientLike, type SanityImageAssetLike, type SanityImageAssetStub, type SanityImageObject, type SanityImageParams, type SanityImageSource, type SanityReference, defaultSrcsetWidths, isSanityImageAssetLike, isSanityImageObject, isSanityReference, parseSanityImageAssetId, sanityImageAssetId, sanityImageAssetStub, sanityImageParamsToSearchParamEntries, sanityImageSrcset, sanityImageUrl };
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
package/src/metadata.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
export interface SanityImagePaletteSwatch {
|
|
2
|
-
_type?: "sanity.imagePaletteSwatch" | null;
|
|
3
|
-
background?: string | null;
|
|
4
|
-
foreground?: string | null;
|
|
5
|
-
population?: number | null;
|
|
6
|
-
title?: string | null;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export interface SanityImagePalette {
|
|
10
|
-
_type?: "sanity.imagePalette" | null;
|
|
11
|
-
darkMuted?: SanityImagePaletteSwatch | null;
|
|
12
|
-
darkVibrant?: SanityImagePaletteSwatch | null;
|
|
13
|
-
dominant?: SanityImagePaletteSwatch | null;
|
|
14
|
-
lightMuted?: SanityImagePaletteSwatch | null;
|
|
15
|
-
lightVibrant?: SanityImagePaletteSwatch | null;
|
|
16
|
-
muted?: SanityImagePaletteSwatch | null;
|
|
17
|
-
vibrant?: SanityImagePaletteSwatch | null;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export interface SanityImageDimensions {
|
|
21
|
-
_type?: "sanity.imageDimensions" | null;
|
|
22
|
-
aspectRatio?: number | null;
|
|
23
|
-
width?: number | null;
|
|
24
|
-
height?: number | null;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface SanityImageMetadata {
|
|
28
|
-
_type: "sanity.imageMetadata";
|
|
29
|
-
blurHash?: string | null;
|
|
30
|
-
dimensions?: SanityImageDimensions | null;
|
|
31
|
-
hasAlpha?: boolean | null;
|
|
32
|
-
isOpaque?: boolean | null;
|
|
33
|
-
lqip?: string | null;
|
|
34
|
-
palette?: SanityImagePalette | null;
|
|
35
|
-
}
|