@stacksjs/stx
Version:
A performant UI Framework. Powered by Bun.
17 lines • 928 B
TypeScript
import type { EnhancedImgProps, ResponsiveVariantSet, TsImagesConfig, ProcessedImageResult, } from '../../types';
/**
* Generate responsive image variants using ts-images
*/
export declare function generateResponsiveVariants(src: string, options: Partial<EnhancedImgProps>, config: TsImagesConfig): Promise<ResponsiveVariantSet | null>;
/**
* Generate srcset string from variants
*/
export declare function generateSrcset(variants: ProcessedImageResult['variants'], type?: 'width' | 'dpr'): string;
/**
* Generate art direction sources for <picture> element
*/
export declare function generateArtDirectionSources(src: string, artDirection: NonNullable<EnhancedImgProps['artDirection']>, config: TsImagesConfig): Promise<Array<{ media: string; srcset: string; type: string }>>;
/**
* Default responsive breakpoints
*/
export declare const DEFAULT_RESPONSIVE_WIDTHS: readonly [320, 480, 640, 768, 1024, 1280, 1536, 1920];