Kind: global interface
- Project
- .type :
String
- .name :
String
- .textStyles :
Array<TextStyle>
- .colors :
Array<Color>
- .spacingSections :
Array<SpacingSection>
- .components :
Array<Component>
- .density :
String
- .densityDivisor :
Number
- .lengthUnit :
String
- .textLengthUnit :
String
- .linkedStyleguide :
Styleguide?
- .remPreferences :
RemPreferences?
- .findTextStyleByName(name, useLinkedStyleguides = true) ⇒
TextStyle
- .findTextStyleEqual(textStyle, useLinkedStyleguides = true) ⇒
TextStyle
- .findBestConformingTextStyle(textStyle, useLinkedStyleguides = true) ⇒
TextStyle
- .findColorByName(name, useLinkedStyleguides = true) ⇒
Color
- .findColorEqual(color, useLinkedStyleguides = true) ⇒
Color
- .findColorByHexAndAlpha(values, useLinkedStyleguides = true) ⇒
Color
- .findSpacingTokenByValue(value, useLinkedStyleguides = true) ⇒
SpacingToken?
- .findSpacingTokenByName(name, useLinkedStyleguides = true) ⇒
SpacingToken?
- .findComponentByName(name, useLinkedStyleguides = true) ⇒
Component?
- .findComponentBySourceId(sourceId, useLinkedStyleguides = true) ⇒
Component?
- .type :
Type of the project, web
, android
, ios
or osx
.
Kind: instance property of Project
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
Pixel density of the project.
Kind: instance property of Project
Divisor corresponding to the density, used to obtain actual values from unit values.
Kind: instance property of Project
Length unit of the project, based on the type, e.g. px
for Web, pt
for iOS.
Kind: instance property of Project
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 . |