@revenuecat/purchases-ui-js
Version:
Web components for Paywalls. Powered by RevenueCat
141 lines (140 loc) • 3.26 kB
TypeScript
export type ColorMode = "light" | "dark";
export type ColorStop = {
color: string;
percent: number;
};
export type Color = {
type: "hex" | "alias" | "linear" | "radial";
value?: string;
degrees?: number;
points?: ColorStop[];
};
export type ColorType = {
dark?: Color;
light: Color;
};
export declare enum FontSizeTags {
body_s = "p",
body_m = "p",
body_l = "p",
body_xl = "p",
heading_xs = "h6",
heading_s = "h5",
heading_m = "h4",
heading_l = "h3",
heading_xl = "h2",
heading_xxl = "h1"
}
export declare enum FontWeights {
extra_light = 100,
thin = 200,
light = 300,
regular = 400,
medium = 500,
semibold = 600,
bold = 700,
extra_bold = 800,
black = 900
}
export declare enum FontSizes {
body_s = "13px",
body_m = "14px",
body_l = "15px",
body_xl = "16px",
heading_xs = "14px",
heading_s = "16px",
heading_m = "18px",
heading_l = "20px",
heading_xl = "26px",
heading_xxl = "32px"
}
export declare enum TextAlignments {
leading = "start",
center = "center",
trailing = "end"
}
export type SizeType = {
width: Size;
height: Size;
};
export type Size = FixedSize | RelativeSize;
export type FitTypes = "fit" | "fill";
type FixedSize = {
type: "fixed";
value: number;
};
type RelativeSize = {
type: FitTypes;
};
export type ShapeType = RectangleShape | PillShape;
export type RectangleShape = {
type: "rectangle";
corners: CornerRadiusType;
};
export type CircleShape = {
type: "circle";
};
type PillShape = {
type: "pill";
};
export type BorderType = {
color: ColorType;
width: number;
};
export type Spacing = {
top: number;
bottom: number;
leading: number;
trailing: number;
};
export type CornerRadiusType = {
bottom_leading: number;
bottom_trailing: number;
top_leading: number;
top_trailing: number;
};
export type DimensionType = VerticalAlignment | HorizontalAlignment | ZAlignment;
type VerticalAlignment = {
type: "vertical";
alignment: "top" | "center" | "bottom";
distribution?: Distribution;
};
type HorizontalAlignment = {
type: "horizontal";
alignment: "leading" | "center" | "trailing";
distribution?: Distribution;
};
export type AlignmentType = "top_leading" | "top" | "top_trailing" | "leading" | "center" | "trailing" | "bottom_leading" | "bottom" | "bottom_trailing";
export type ZAlignment = {
type: "zlayer";
alignment: AlignmentType;
distribution?: never;
};
type Distribution = "space_between" | "space_around" | "space_evenly" | "start" | "center" | "end";
export type ShadowType = {
x: number;
y: number;
radius: number;
color: ColorType;
};
export declare enum StackDirection {
vertical = "column",
horizontal = "row",
zlayer = "zstack"
}
export declare enum StackAlignment {
top = "flex-start",
leading = "flex-start",
center = "center",
bottom = "flex-end",
trailing = "flex-end"
}
export declare enum StackDistribution {
space_between = "space-between",
space_around = "space-around",
space_evenly = "space-evenly",
start = "flex-start",
center = "center",
end = "flex-end"
}
export {};