1 | import type { CompositionStyleObject } from "./css.types";
|
2 | interface Token<T> {
|
3 | value: T;
|
4 | description?: string;
|
5 | }
|
6 | interface Recursive<T> {
|
7 | [key: string]: Recursive<T> | T;
|
8 | }
|
9 | type TextStyleProperty = "fontSize" | "fontSizeAdjust" | "fontVariationSettings" | "fontVariantPosition" | "fontVariantCaps" | "fontVariantNumeric" | "fontVariantAlternates" | "fontVariantLigatures" | "fontFamily" | "fontWeight" | "fontSynthesis" | "fontStyle" | "fontVariant" | "lineHeight" | "letterSpacing" | "textDecoration" | "textTransform" | "textIndent" | "textDecorationColor" | "textDecorationLine" | "textDecorationStyle" | "textEmphasisColor" | "textEmphasisPosition" | "textEmphasisStyle" | "hyphenateCharacter" | "textOrientation" | "textOverflow" | "textRendering";
|
10 | export type TextStyle = CompositionStyleObject<TextStyleProperty>;
|
11 | export type TextStyles = Recursive<Token<TextStyle>>;
|
12 | type LogicalPlacement = "Inline" | "Block" | "InlineStart" | "InlineEnd" | "BlockStart" | "BlockEnd";
|
13 | type PhysicalPlacement = "Top" | "Right" | "Bottom" | "Left";
|
14 | type Placement = PhysicalPlacement | LogicalPlacement;
|
15 | type Radius = `Top${"Right" | "Left"}` | `Bottom${"Right" | "Left"}` | `Start${"Start" | "End"}` | `End${"Start" | "End"}`;
|
16 | type LayerStyleProperty = "background" | "bg" | "backgroundColor" | "bgColor" | "backgroundImage" | "bgImage" | "content" | "borderRadius" | "border" | "borderWidth" | "borderColor" | "borderStyle" | "boxShadow" | "boxShadowColor" | "filter" | "backdropFilter" | "transform" | "cursor" | "color" | "opacity" | "backgroundBlendMode" | "backgroundAttachment" | "backgroundClip" | "backgroundOrigin" | "backgroundPosition" | "backgroundRepeat" | "backgroundSize" | `border${Placement}` | `border${Placement}Width` | "borderRadius" | `border${Radius}Radius` | `border${Placement}Color` | `border${Placement}Style` | "padding" | "position" | "zIndex" | `padding${Placement}` | "height" | "width" | "minHeight" | "minWidth" | "maxHeight" | "maxWidth" | `margin${Placement}` | "inset" | `inset${LogicalPlacement}` | Lowercase<PhysicalPlacement> | "outline" | "outlineColor" | "outlineStyle" | "outlineWidth" | "outlineOffset";
|
17 | export type LayerStyle = CompositionStyleObject<LayerStyleProperty>;
|
18 | export type LayerStyles = Recursive<Token<LayerStyle>>;
|
19 | type AnimationStyleProperty = "animation" | "animationComposition" | "animationDelay" | "animationDirection" | "animationDuration" | "animationFillMode" | "animationIterationCount" | "animationName" | "animationPlayState" | "animationTimingFunction" | "animationRange" | "animationRangeStart" | "animationRangeEnd" | "animationTimeline" | "transformOrigin";
|
20 | export type AnimationStyle = CompositionStyleObject<AnimationStyleProperty>;
|
21 | export type AnimationStyles = Recursive<Token<AnimationStyle>>;
|
22 | export interface CompositionStyles {
|
23 | textStyles: TextStyles;
|
24 | layerStyles: LayerStyles;
|
25 | animationStyles: AnimationStyles;
|
26 | }
|
27 | export {};
|