gantri-components 1.144.8 → 1.144.9
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.
|
@@ -2,6 +2,6 @@ import { IGravity } from '@cloudinary/url-gen/qualifiers/gravity/GravityQualifie
|
|
|
2
2
|
import { AspectRatio, Dpr, ImageDimension, ImageProps, ImageSource, TransformationMode, TransformationQuality, TransformationType } from './image.types';
|
|
3
3
|
import { ResolutionAwarePropBase } from '../../types/resolution-aware-prop.type';
|
|
4
4
|
import { Optional } from '../../types/common';
|
|
5
|
-
export declare const extractSizePropertyValue: (prop: Optional<
|
|
5
|
+
export declare const extractSizePropertyValue: (prop: Optional<ImageDimension>) => Optional<ImageDimension>;
|
|
6
6
|
export declare const generateCloudinaryUrl: (source: ImageSource, imageName?: string | undefined, aspectRatio?: AspectRatio | undefined, width?: Optional<ImageDimension>, height?: Optional<ImageDimension>, mode?: Optional<TransformationMode>, quality?: Optional<TransformationQuality>, dpr?: Optional<Dpr>, type?: Optional<TransformationType>, gravity?: Optional<IGravity>) => string;
|
|
7
7
|
export declare const generateImages: (params: Partial<ImageProps>, type?: TransformationType) => string | ResolutionAwarePropBase<string>;
|
|
@@ -4,8 +4,8 @@ import { IGravity } from '@cloudinary/url-gen/qualifiers/gravity/GravityQualifie
|
|
|
4
4
|
import { ResolutionAwareProp } from '../../types/resolution-aware-prop.type';
|
|
5
5
|
import { Color } from '../../styles';
|
|
6
6
|
import { Optional } from '../../types/common';
|
|
7
|
-
export declare type AspectRatio =
|
|
8
|
-
export declare type ImageDimension = `${string}px` | `${string}rem` | number;
|
|
7
|
+
export declare type AspectRatio = 'unset' | string | number;
|
|
8
|
+
export declare type ImageDimension = `${string}px` | `${string}rem` | number | 'unset';
|
|
9
9
|
export declare type Dpr = number | 'auto';
|
|
10
10
|
export declare type ImageTransformationsVariant = 'f' | 'h' | 'q' | 'ffh' | 'hff' | 'hhf';
|
|
11
11
|
export interface ImageProps {
|
|
@@ -15,7 +15,7 @@ export interface ImageProps {
|
|
|
15
15
|
* Defines the aspect ratio of the image container, if a transformation is not provided,
|
|
16
16
|
* the aspectRatio transformation will inherit from this value.
|
|
17
17
|
* */
|
|
18
|
-
containerAspectRatio?:
|
|
18
|
+
containerAspectRatio?: ResolutionAwareProp<AspectRatio>;
|
|
19
19
|
dpr?: Optional<Dpr>;
|
|
20
20
|
fallbackColor?: Optional<Color>;
|
|
21
21
|
fetchImmediately?: boolean;
|