import type { DisplayObject } from '../../display-objects'; import type { IElement } from '../../dom'; import type { CSSStyleValue } from '../cssom'; import { CSSUnitValue } from '../cssom'; export declare function parseDimension(unitRegExp: RegExp, string: string): CSSStyleValue | undefined; /** * * @see https://developer.mozilla.org/zh-CN/docs/Web/CSS/length * length with only absolute unit, eg. 1px */ export declare const parseLength: { (...args: any[]): any; cache: Map; }; /** * * @see https://developer.mozilla.org/zh-CN/docs/Web/CSS/percentage */ export declare const parserPercentage: { (...args: any[]): any; cache: Map; }; /** * length with absolute or relative unit, * eg. 1px, 0.7em, 50%, calc(100% - 200px); * * @see https://developer.mozilla.org/zh-CN/docs/Web/CSS/length-percentage */ export declare const parseLengthOrPercentage: (css: string) => CSSUnitValue; export declare const parseAngle: { (...args: any[]): any; cache: Map; }; /** * merge CSSUnitValue * * @example * 10px + 20px = 30px * 10deg + 10rad * 10% + 20% = 30% */ export declare function mergeDimensions(left: CSSUnitValue, right: CSSUnitValue, target: IElement, nonNegative?: boolean, index?: number): [number, number, (value: number) => string]; export declare function convertAngleUnit(value: CSSUnitValue): number; export declare function parseDimensionArrayFormat(string: string | number | (string | number)[], size: number): number[]; export declare function parseDimensionArray(string: string | (string | number)[]): CSSUnitValue[]; export declare function convertPercentUnit(valueWithUnit: CSSUnitValue, vec3Index: number, target: DisplayObject): number; //# sourceMappingURL=dimension.d.ts.map