gantri-components 2.201.0 → 2.203.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.
|
@@ -9,7 +9,7 @@ import { Optional } from '../../types/common';
|
|
|
9
9
|
*/
|
|
10
10
|
export declare const detectImageSource: (url: string | undefined) => ImageSource;
|
|
11
11
|
export declare const extractSizePropertyValue: (prop: Optional<ImageDimension>) => Optional<ImageDimension>;
|
|
12
|
-
export declare const generateCloudinaryUrl: (source: ImageSource, imageName?: string, aspectRatio?: AspectRatio, width?: Optional<ImageDimension>, height?: Optional<ImageDimension>, mode?: Optional<TransformationMode>, quality?: Optional<TransformationQuality>, dpr?: Optional<Dpr>, type?: Optional<TransformationType>, gravity?: Optional<IGravity>, sharpen?: Optional<number | boolean>, hasExplicitTransformations?: boolean) => string;
|
|
12
|
+
export declare const generateCloudinaryUrl: (source: ImageSource, imageName?: string, aspectRatio?: AspectRatio, width?: Optional<ImageDimension>, height?: Optional<ImageDimension>, mode?: Optional<TransformationMode>, quality?: Optional<TransformationQuality>, dpr?: Optional<Dpr>, type?: Optional<TransformationType>, gravity?: Optional<IGravity>, sharpen?: Optional<number | boolean>, hasExplicitTransformations?: boolean, format?: ImageProps['format']) => string;
|
|
13
13
|
export declare const generateImages: (params: Partial<ImageProps>, type?: TransformationType) => string | ResolutionAwarePropBase<string>;
|
|
14
14
|
/** Converts transformation variant shorthand to full transformations. */
|
|
15
15
|
export declare const getVariantTransformation: (transformationsVariant: Optional<ImageTransformationsVariant>) => ResolutionAwarePropBase<Transformations> | null;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Property } from 'csstype';
|
|
2
2
|
import { CSSProperties, ReactEventHandler } from 'react';
|
|
3
3
|
import { IGravity } from '@cloudinary/url-gen/qualifiers/gravity/GravityQualifier';
|
|
4
|
+
import { FormatQualifier } from '@cloudinary/transformation-builder-sdk/qualifiers/format/FormatQualifier';
|
|
5
|
+
import { ImageFormatType, VideoFormatType } from '@cloudinary/transformation-builder-sdk/types/types';
|
|
4
6
|
import { ResolutionAwareProp } from '../../types/resolution-aware-prop.type';
|
|
5
7
|
import { Color } from '../../styles';
|
|
6
8
|
import { Optional } from '../../types/common';
|
|
@@ -22,6 +24,7 @@ export interface ImageProps {
|
|
|
22
24
|
fallbackColor?: Optional<Color>;
|
|
23
25
|
fetchImmediately?: boolean;
|
|
24
26
|
fetchPriority?: 'high' | 'low' | 'auto';
|
|
27
|
+
format?: FormatQualifier | ImageFormatType | VideoFormatType | string;
|
|
25
28
|
height?: Optional<ResolutionAwareProp<ImageDimension>>;
|
|
26
29
|
immediateAvailable?: Optional<boolean>;
|
|
27
30
|
maxHeight?: Optional<ResolutionAwareProp<Property.MaxHeight>>;
|
|
@@ -76,7 +79,7 @@ export interface Transformations {
|
|
|
76
79
|
sharpen?: number | boolean;
|
|
77
80
|
width?: ImageDimension;
|
|
78
81
|
}
|
|
79
|
-
export type ImageSource = 'static' | 'dynamic' | 'absolute';
|
|
82
|
+
export type ImageSource = 'static' | 'dynamic' | 'absolute' | 'video-frame';
|
|
80
83
|
export type TransformationMode = 'scale' | 'limitFit' | 'limitFill' | 'limitPad' | 'fill' | 'fit' | 'crop' | 'pad' | 'imaggaCrop' | 'imaggaScale' | 'minimumFit' | 'minimumPad' | 'fillPad';
|
|
81
84
|
export type TransformationQuality = 'auto' | 'autoBest' | 'autoEco' | 'autoGood' | 'autoLow' | 'jpegmini' | 'jpegminiBest' | 'jpegminiHigh' | 'jpegminiMedium';
|
|
82
85
|
export interface StyledImageContainerProps extends Pick<ImageProps, 'containerAspectRatio' | 'width' | 'height' | 'fallbackColor' | 'maxWidth' | 'maxHeight' | 'minWidth' | 'minHeight'> {
|