Skip to content

Latest commit

 

History

History
232 lines (156 loc) · 10.4 KB

File metadata and controls

232 lines (156 loc) · 10.4 KB

Project

Kind: global interface

project.type : String

Type of the project, web, android, ios or osx.

Kind: instance property of Project

project.name : String

Name of the project.

Kind: instance property of Project

project.textStyles : Array<TextStyle>

Text styles in the project.

Kind: instance property of Project

project.colors : Array<Color>

Colors in the project.

Kind: instance property of Project

project.spacingSections : Array<SpacingSection>

Spacing sections in the project.

Kind: instance property of Project

project.components : Array<Component>

components in the project.

Kind: instance property of Project

project.density : String

Pixel density of the project.

Kind: instance property of Project

project.densityDivisor : Number

Divisor corresponding to the density, used to obtain actual values from unit values.

Kind: instance property of Project

project.lengthUnit : String

Length unit of the project, based on the type, e.g. px for Web, pt for iOS.

Kind: instance property of Project

project.textLengthUnit : String

Text length unit of the project, based on the type, e.g. dp for Android.

Kind: instance property of Project

project.linkedStyleguide : Styleguide?

Styleguide linked to the project.

Kind: instance property of Project

project.remPreferences : RemPreferences?

rem preferences of the project (web projects only). This property exists only if rem is enabled for the project.

Kind: instance property of Project

project.findTextStyleByName(name, useLinkedStyleguides = true) ⇒ TextStyle?

Finds text style in the project or in the linked styleguides (if useLinkedStyleguides is true) by name.

Kind: instance method of Project

Param Type Description
name String
useLinkedStyleguides Boolean Whether linked styleguides should be included in the search. Defaults to true.

project.findTextStyleEqual(textStyle, useLinkedStyleguides = true) ⇒ TextStyle?

Finds text style in the project or in the linked styleguides (if useLinkedStyleguides is true) equal to another text style.

Kind: instance method of Project

Param Type Description
textStyle TextStyle
useLinkedStyleguides Boolean Whether linked styleguides should be included in the search. Defaults to true.

project.findBestConformingTextStyle(textStyle, useLinkedStyleguides = true) ⇒ TextStyle?

Finds best conforming text style in the project or in the linked styleguides (if useLinkedStyleguides is true).

Kind: instance method of Project

Param Type Description
textStyle TextStyle
useLinkedStyleguides Boolean Whether linked styleguides should be included in the search. Defaults to true.

project.findColorByName(name, useLinkedStyleguides = true) ⇒ Color?

Finds color in the project or in the linked styleguides (if useLinkedStyleguides is true) by name.

Kind: instance method of Project

Param Type Description
name String
useLinkedStyleguides Boolean Whether linked styleguides should be included in the search. Defaults to true.

project.findColorEqual(color, useLinkedStyleguides = true) ⇒ Color?

Finds color in the project or in the linked styleguides (if useLinkedStyleguides is true) equal to another color.

Kind: instance method of Project

Param Type Description
color Color
useLinkedStyleguides Boolean Whether linked styleguides should be included in the search. Defaults to true.

project.findColorByHexAndAlpha(values, useLinkedStyleguides = true) ⇒ Color?

Finds color in the project or in the linked styleguides (if useLinkedStyleguides is true) by hex and alpha values.

Kind: instance method of Project

Param Type Description
values Object
values.hex String Hex string for RGB components of the color, e.g. rrggbb.
values.alpha String Alpha value of the color.
useLinkedStyleguides Boolean Whether linked styleguides should be included in the search. Defaults to true.

project.findSpacingTokenByValue(value, useLinkedStyleguides = true) ⇒ SpacingToken?

Finds spacing token in the project or in the linked styleguides (if useLinkedStyleguides is true) by value.

Kind: instance method of Project

Param Type Description
value Number
useLinkedStyleguides Boolean Whether linked styleguides should be included in the search. Defaults to true.

project.findSpacingTokenByName(name, useLinkedStyleguides = true) ⇒ SpacingToken?

Finds spacing token in the project or in the linked styleguides (if useLinkedStyleguides is true) by name.

Kind: instance method of Project

Param Type Description
name String
useLinkedStyleguides Boolean Whether linked styleguides should be included in the search. Defaults to true.

project.findComponentByName(name, useLinkedStyleguides = true) ⇒ Component?

Finds a component in the project or in the linked styleguides (if useLinkedStyleguides is true) by name.

Kind: instance method of Project

Param Type Description
name String
useLinkedStyleguides Boolean Whether linked styleguides should be included in the search. Defaults to true.

project.findComponentBySourceId(name, useLinkedStyleguides = true) ⇒ Component?

Finds a component in the project or in the linked styleguides (if useLinkedStyleguides is true) by id in the source design document.

Kind: instance method of Project

Param Type Description
name String
useLinkedStyleguides Boolean Whether linked styleguides should be included in the search. Defaults to true.