UNPKG

6.3 kBTypeScriptView Raw
1import { TransformFunctionsInfo } from '../animation';
2import { CoreTypes } from '../../core-types';
3import { Color } from '../../color';
4import { CssProperty, CssAnimationProperty, ShorthandProperty, InheritedCssProperty } from '../core/properties';
5import { Style } from './style';
6import { Font, FontStyleType, FontWeightType, FontVariationSettingsType } from './font';
7import { Background } from './background';
8
9export namespace Length {
10 export function parse(text: string): CoreTypes.LengthType;
11 export function equals(a: CoreTypes.LengthType, b: CoreTypes.LengthType): boolean;
12 /**
13 * Converts Length unit to device pixels.
14 * @param length The Length to convert.
15 * @param auto Value to use for conversion of "auto". By default is Math.NaN.
16 */
17 export function toDevicePixels(length: CoreTypes.LengthType, auto?: number): number;
18 export function convertToString(length: CoreTypes.LengthType): string;
19}
20
21export namespace PercentLength {
22 export function parse(text: string): CoreTypes.PercentLengthType;
23 export function equals(a: CoreTypes.PercentLengthType, b: CoreTypes.PercentLengthType): boolean;
24 /**
25 * Converts PercentLengthType unit to device pixels.
26 * @param length The PercentLengthType to convert.
27 * @param auto Value to use for conversion of "auto". By default is Math.NaN.
28 * @param parentAvailableWidth Value to use as base when converting percent unit. By default is Math.NaN.
29 */
30 export function toDevicePixels(length: CoreTypes.PercentLengthType, auto?: number, parentAvailableWidth?: CoreTypes.px): number;
31 export function convertToString(length: CoreTypes.PercentLengthType): string;
32}
33
34export const zeroLength: CoreTypes.LengthType;
35
36export const rotateProperty: CssAnimationProperty<Style, number>;
37export const scaleXProperty: CssAnimationProperty<Style, number>;
38export const scaleYProperty: CssAnimationProperty<Style, number>;
39export const translateXProperty: CssAnimationProperty<Style, CoreTypes.dip>;
40export const translateYProperty: CssAnimationProperty<Style, CoreTypes.dip>;
41
42export function transformConverter(text: string): TransformFunctionsInfo;
43
44export const clipPathProperty: CssProperty<Style, string>;
45export const colorProperty: InheritedCssProperty<Style, Color>;
46
47export const backgroundProperty: ShorthandProperty<Style, string>;
48export const backgroundColorProperty: CssAnimationProperty<Style, Color>;
49export const backgroundImageProperty: CssProperty<Style, string>;
50export const backgroundRepeatProperty: CssProperty<Style, CoreTypes.BackgroundRepeatType>;
51export const backgroundSizeProperty: CssProperty<Style, string>;
52export const backgroundPositionProperty: CssProperty<Style, string>;
53
54export const borderColorProperty: ShorthandProperty<Style, string | Color>;
55export const borderTopColorProperty: CssProperty<Style, Color>;
56export const borderRightColorProperty: CssProperty<Style, Color>;
57export const borderBottomColorProperty: CssProperty<Style, Color>;
58export const borderLeftColorProperty: CssProperty<Style, Color>;
59
60export const borderWidthProperty: ShorthandProperty<Style, string | CoreTypes.LengthType>;
61export const borderTopWidthProperty: CssProperty<Style, CoreTypes.LengthType>;
62export const borderRightWidthProperty: CssProperty<Style, CoreTypes.LengthType>;
63export const borderBottomWidthProperty: CssProperty<Style, CoreTypes.LengthType>;
64export const borderLeftWidthProperty: CssProperty<Style, CoreTypes.LengthType>;
65
66export const borderRadiusProperty: ShorthandProperty<Style, string | CoreTypes.LengthType>;
67export const borderTopLeftRadiusProperty: CssProperty<Style, CoreTypes.LengthType>;
68export const borderTopRightRadiusProperty: CssProperty<Style, CoreTypes.LengthType>;
69export const borderBottomRightRadiusProperty: CssProperty<Style, CoreTypes.LengthType>;
70export const borderBottomLeftRadiusProperty: CssProperty<Style, CoreTypes.LengthType>;
71
72export const zIndexProperty: CssProperty<Style, number>;
73export const visibilityProperty: CssProperty<Style, CoreTypes.VisibilityType>;
74export const opacityProperty: CssAnimationProperty<Style, number>;
75
76export const minWidthProperty: CssProperty<Style, CoreTypes.dip | CoreTypes.LengthDipUnit | CoreTypes.LengthPxUnit>;
77export const minHeightProperty: CssProperty<Style, CoreTypes.dip | CoreTypes.LengthDipUnit | CoreTypes.LengthPxUnit>;
78export const widthProperty: CssAnimationProperty<Style, CoreTypes.PercentLengthType>;
79export const heightProperty: CssAnimationProperty<Style, CoreTypes.PercentLengthType>;
80export const lineHeightProperty: CssProperty<Style, number>;
81export const marginProperty: ShorthandProperty<Style, string | CoreTypes.PercentLengthType>;
82export const marginLeftProperty: CssProperty<Style, CoreTypes.PercentLengthType>;
83export const marginRightProperty: CssProperty<Style, CoreTypes.PercentLengthType>;
84export const marginTopProperty: CssProperty<Style, CoreTypes.PercentLengthType>;
85export const marginBottomProperty: CssProperty<Style, CoreTypes.PercentLengthType>;
86
87export const paddingProperty: ShorthandProperty<Style, string | CoreTypes.LengthType>;
88export const paddingLeftProperty: CssProperty<Style, CoreTypes.LengthType>;
89export const paddingRightProperty: CssProperty<Style, CoreTypes.LengthType>;
90export const paddingTopProperty: CssProperty<Style, CoreTypes.LengthType>;
91export const paddingBottomProperty: CssProperty<Style, CoreTypes.LengthType>;
92
93export const horizontalAlignmentProperty: CssProperty<Style, CoreTypes.HorizontalAlignmentType>;
94export const verticalAlignmentProperty: CssProperty<Style, CoreTypes.VerticalAlignmentType>;
95
96export const fontSizeProperty: InheritedCssProperty<Style, number>;
97export const fontFamilyProperty: InheritedCssProperty<Style, string>;
98export const fontStyleProperty: InheritedCssProperty<Style, FontStyleType>;
99export const fontWeightProperty: InheritedCssProperty<Style, FontWeightType>;
100
101export const backgroundInternalProperty: CssProperty<Style, Background>;
102export const fontInternalProperty: InheritedCssProperty<Style, Font>;
103export const fontScaleInternalProperty: InheritedCssProperty<Style, number>;
104export const fontVariationSettingsProperty: InheritedCssProperty<Style, FontVariationSettingsType[]>;
105
106export const androidElevationProperty: CssProperty<Style, number>;
107export const androidDynamicElevationOffsetProperty: CssProperty<Style, number>;