xobuilder-extractor
Version:
> **A sophisticated web application that converts HTML and CSS to JSON layout through an intelligent multi-step flow process with AI validation.**
14 lines (13 loc) • 1.3 kB
TypeScript
import { AdditionalProperties } from '../../../application/use-case/get-styles.use-case';
/**
* ================ ANALYTIC IMAGE PROPERTIES ================
* Handle properties:
* 1. Với styles, lấy những style có trong styles field, ngoại trừ 1 số trường hợp conflix với image properties bên dưới
* 2. Với imageSize, full nếu width 100% và không có max-width (hoặc max-width = 100%), custom nếu width hoặc max-width != 100%
* 3. Với imageWidth, nếu imageSize là custom thì lấy width cho case này (available cho 3 devices)
* 4. Với imageRatio, original (mặc định), square (aspect-ratio = 1/1), custom (có aspect-ratio khác 1/1)
* 5. Với imageHeight, nếu imageRatio là custom, lấy height hoặc tính từ aspect-ratio (available cho 3 devices)
* 6. Với imageObjectFit, nếu imageRatio là custom, lấy object-fit từ CSS
* 7. Với image chỉ có with (width, min-width, max-width) mà không có height (height, min-height, max-height) hoặc ngược lại thì tính toán height hoặc width bị thiếu từ dimension của ảnh (aspect-ratio)
*/
export declare const imageAEP: (cssText: string, additionProperties?: AdditionalProperties) => Promise<import('../../../domains/entities/style.entity').ResultStyles>;