gantri-components 1.51.0 → 1.53.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.
@@ -1,5 +1,5 @@
1
- import { ImageProps, ImageSource, TransformationMode, TransformationQuality } from './image.types';
1
+ import { ImageProps, ImageSource, TransformationMode, TransformationQuality, TransformationType } from './image.types';
2
2
  import { Optional } from '../../types/common';
3
3
  export declare const extractSizePropertyValue: (prop: Optional<string | number>) => number | undefined;
4
- export declare const generateCloudinaryUrl: (source: ImageSource, imageName?: string | undefined, aspectRatio?: string | undefined, width?: Optional<number | string>, height?: Optional<number | string>, mode?: Optional<TransformationMode>, quality?: Optional<TransformationQuality>) => string;
5
- export declare const generateImages: (params: Partial<ImageProps>) => string | [Optional<string>, Optional<string>, Optional<string>];
4
+ export declare const generateCloudinaryUrl: (source: ImageSource, imageName?: string | undefined, aspectRatio?: string | undefined, width?: Optional<number | string>, height?: Optional<number | string>, mode?: Optional<TransformationMode>, quality?: Optional<TransformationQuality>, type?: Optional<TransformationType>) => string;
5
+ export declare const generateImages: (params: Partial<ImageProps>, type?: TransformationType) => string | [Optional<string>, Optional<string>, Optional<string>];
@@ -36,3 +36,4 @@ export interface StyledImageContainerProps extends Pick<ImageProps, 'aspectRatio
36
36
  }
37
37
  export interface StyledImageProps extends Pick<ImageProps, 'objectFit' | 'objectPosition'> {
38
38
  }
39
+ export declare type TransformationType = 'image' | 'video';
@@ -14,3 +14,4 @@ export * from './stack';
14
14
  export * from './text-area';
15
15
  export * from './text-field';
16
16
  export * from './typography';
17
+ export * from './video';
@@ -0,0 +1 @@
1
+ export * from './video';
@@ -0,0 +1,3 @@
1
+ import { FC, PropsWithChildren } from 'react';
2
+ import { VideoProps } from './video.types';
3
+ export declare const Video: FC<PropsWithChildren<VideoProps>>;
@@ -0,0 +1,3 @@
1
+ import { Transformations, VideoProps } from './video.types';
2
+ export declare const VideoPresets: Partial<VideoProps>;
3
+ export declare const TransformationPresets: Partial<Transformations>;
@@ -0,0 +1,3 @@
1
+ import { StyledImageContainerProps } from './video.types';
2
+ export declare const StyledImageContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, StyledImageContainerProps, never>;
3
+ export declare const StyledVideo: import("styled-components").StyledComponent<"video", import("styled-components").DefaultTheme, {}, never>;
@@ -0,0 +1,33 @@
1
+ import { Property } from 'csstype';
2
+ import { ResolutionAwareProp } from '../../types/resolution-aware-prop.type';
3
+ import { Color } from '../../styles';
4
+ import { Optional } from '../../types/common';
5
+ export interface VideoProps {
6
+ aspectRatio?: Optional<ResolutionAwareProp<string>>;
7
+ commonTransformations?: Optional<Transformations>;
8
+ fallbackColor?: Optional<Color>;
9
+ height?: Optional<ResolutionAwareProp<string | number>>;
10
+ immediateAvailable?: Optional<boolean>;
11
+ maxHeight?: Optional<ResolutionAwareProp<Property.MaxHeight>>;
12
+ maxWidth?: Optional<ResolutionAwareProp<Property.MinWidth>>;
13
+ minHeight?: Optional<ResolutionAwareProp<Property.MinHeight>>;
14
+ minWidth?: Optional<ResolutionAwareProp<Property.MinWidth>>;
15
+ mode?: Optional<ResolutionAwareProp<TransformationMode>>;
16
+ name: ResolutionAwareProp<string>;
17
+ quality?: Optional<TransformationQuality>;
18
+ showLoadingIndicator?: Optional<boolean>;
19
+ source?: Optional<ImageSource>;
20
+ transformations?: Optional<ResolutionAwareProp<Transformations>>;
21
+ width?: Optional<ResolutionAwareProp<string | number>>;
22
+ }
23
+ export interface Transformations {
24
+ aspectRatio?: Optional<string>;
25
+ height?: Optional<number>;
26
+ mode?: Optional<TransformationMode>;
27
+ width?: Optional<number>;
28
+ }
29
+ export declare type ImageSource = 'static' | 'dynamic' | 'absolute';
30
+ export declare type TransformationMode = 'scale' | 'limitFit' | 'limitFill' | 'limitPad' | 'fill' | 'fit' | 'crop' | 'pad' | 'imaggaCrop' | 'imaggaScale' | 'minimumFit' | 'minimumPad' | 'fillPad';
31
+ export declare type TransformationQuality = 'auto' | 'autoBest' | 'autoEco' | 'autoGood' | 'autoLow' | 'jpegmini' | 'jpegminiBest' | 'jpegminiHigh' | 'jpegminiMedium';
32
+ export interface StyledImageContainerProps extends Pick<VideoProps, 'aspectRatio' | 'width' | 'height' | 'fallbackColor' | 'maxWidth' | 'maxHeight' | 'minWidth' | 'minHeight'> {
33
+ }