Colors in the styleguide.
Components in the styleguide.
Pixel density used in styleguide's designs.
This value is used to obtain actual length from the unit length for a density.
The unit of length specific to the styleguide's type. e.g., "px" for web styleguides.
Optional
linkedName of the styleguide.
Optional
parentParent of the styleguide.
Optional
remPreferences to specify rem usage in the styleguide (web styleguides only).
Spacing sections (with spacing tokens) defined in the styleguide.
The unit of font sizes.
Text styles in the styleguide.
Type of the styleguide, one of "web", "android", "ios", "macos", "base"
Variable collections in the styleguide.
Static
ALLOWED_Static
TYPEFinds the best match for a text style in the styleguide or in the parent styleguides (if useLinkedStyleguides is true)
Text style to find a match for
Whether to search in parent styleguides (defaults to true)
The found text style or undefined if not found
Finds any color in the styleguide or in the parent styleguides (if useLinkedStyleguides is true) whose hex and alpha values are equal to values
Object containing hex and alpha values
Whether to search in parent styleguides (defaults to true)
The found color or undefined if not found
Finds any color in the styleguide or in the parent styleguides (if useLinkedStyleguides is true) whose name is equal to name
Name of the color to find
Whether to search in parent styleguides (defaults to true)
The found color or undefined if not found
Finds any color in the styleguide or in the parent styleguides (if useLinkedStyleguides is true) whose sourceId equals to sourceId
Source ID of the color to find
Whether to search in parent styleguides (defaults to true)
The found color or undefined if not found
Finds any color in the styleguide or in the parent styleguides (if useLinkedStyleguides is true) which is equal to color
Color to find
Whether to search in parent styleguides (defaults to true)
The found color or undefined if not found
Finds any component in the styleguide or in the parent styleguides (if useLinkedStyleguides is true) whose name equals to name
Name of the component to find
Whether to search in parent styleguides (defaults to true)
The found component or undefined if not found
Finds any component in the styleguide or in the parent styleguides (if useLinkedStyleguides is true) whose sourceId equals to sourceId
Source ID of the component to find
Whether to search in parent styleguides (defaults to true)
The found component or undefined if not found
Finds any color variable in the styleguide or in the parent styleguides (if useLinkedStyleguides is true) which is equal to color
Color to find
Whether to search in parent styleguides (defaults to true)
The found color or undefined if not found
Finds any spacing token in the styleguide or in the parent styleguides (if useLinkedStyleguides is true) whose name is equal to name
Name of the spacing token to find
Whether to search in parent styleguides (defaults to true)
The found spacing token or undefined if not found
Finds any spacing token in the styleguide or in the parent styleguides (if useLinkedStyleguides is true) whose value is equal to value
Value of the spacing token to find
Whether to search in parent styleguides (defaults to true)
The found spacing token or undefined if not found
Finds any text style in the styleguide or in the parent styleguides (if useLinkedStyleguides is true) whose name is equal to name
Name of the text style to find
Whether to search in parent styleguides (defaults to true)
The found text style or undefined if not found
Finds any text style in the styleguide or in the parent styleguides (if useLinkedStyleguides is true) which is equal to textStyle
Text style to find
Whether to search in parent styleguides (defaults to true)
The found text style or undefined if not found
Protected
Static
componentConvert component sections to components
Protected
Static
componentConvert component section to components
Protected
Static
findFind spacing token by field sections
Protected
Static
fontStatic
fromCreates a Styleguide instance from a JSON string
JSON string representing a styleguide
A new Styleguide instance
Protected
Static
getGet density divisor based on density
Protected
Static
getGet dimension suffix based on density and project type
Protected
Static
getProtected
Static
setSet scaled font size for text styles
Protected
Static
variableConvert variable collections to colors
An interface to represent a Zeplin styleguide.