Skip to content

Latest commit

 

History

History
195 lines (144 loc) · 9.12 KB

extension.md

File metadata and controls

195 lines (144 loc) · 9.12 KB

Extension

Kind: global interface

extension.layer(context, selectedLayer) ⇒ String | CodeObject

Generates string or code object from the selected layer.

Kind: instance method of Extension

Param Type
context Context
selectedLayer Layer

extension.screen(context, selectedVersion, selectedScreen) ⇒ String | CodeObject

Generates string or code object from the selected version of a screen.

Kind: instance method of Extension

Param Type
context Context
selectedVersion Version
selectedScreen Screen

extension.component(context, selectedVersion, selectedComponent) ⇒ String | CodeObject

Generates string or code object from the selected version of a component, currently limited to the latest version.

Kind: instance method of Extension

Param Type
context Context
selectedVersion Version
selectedComponent Component

extension.colors(context) ⇒ String | CodeObject

Generates string or code object from colors in a project or styleguide.

Kind: instance method of Extension

Param Type
context Context

extension.textStyles(context) ⇒ String | CodeObject

Generates string or code object from text styles in a project or styleguide.

Kind: instance method of Extension

Param Type
context Context

extension.spacing(context) ⇒ String | CodeObject

Generates string or code object from spacing in a project or styleguide.

Kind: instance method of Extension

Param Type
context Context

extension.exportColors(context) ⇒ CodeExportObject | Array<CodeExportObject>

Generates code export objects from colors in a project or styleguide.

Kind: instance method of Extension

Param Type
context Context

extension.exportTextStyles(context) ⇒ CodeExportObject | Array<CodeExportObject>

Generates code export objects from text styles in a project or styleguide.

Kind: instance method of Extension

Param Type
context Context

extension.exportSpacing(context) ⇒ CodeExportObject | Array<CodeExportObject>

Generates code export objects from spacing in a project or styleguide.

Kind: instance method of Extension

Param Type
context Context

extension.styleguideColors(context, colors) ⇒ String | CodeObject

DEPRECATED - See Extension.colors.
Generates string or code object from Styleguide colors.

Kind: instance method of Extension

Param Type
context Context
colors Array<Color>

extension.styleguideTextStyles(context, textStyles) ⇒ String | CodeObject

DEPRECATED - See Extension.textStyles.
Generates string or code object from Styleguide text styles.

Kind: instance method of Extension

Param Type
context Context
textStyles Array<TextStyle>

extension.comment(context, text) ⇒ String

DEPRECATED - Generates comment string from the text, in extension's target language, displayed alongside of Styleguide colors and text styles.

Kind: instance method of Extension

Returns: String - Generated comment from the text, in extension's target language.

Param Type
context Context
text String

extension.exportStyleguideColors(context, colors) ⇒ CodeExportObject | Array<CodeExportObject>

DEPRECATED - See Extension.exportColors.
Generates code export objects from Styleguide colors.

Kind: instance method of Extension

Param Type
context Context
colors Array<Color>

extension.exportStyleguideTextStyles(context, textStyles) ⇒ CodeExportObject | Array<CodeExportObject>

DEPRECATED - See Extension.exportTextStyles.
Generates code export objects from Styleguide text styles.

Kind: instance method of Extension

Param Type
context Context
textStyles Array<TextStyle>

CodeObject : Object

Kind: global typedef

Properties

Name Type Description
code String Generated snippet.
language String Language for the generated snippet, e.g. javascript, swift.

CodeExportObject : Object

Kind: global typedef

Properties

Name Type Description
code String Content of the file.
language String Language for the generated snippet, e.g. javascript, swift.
filename String Name of the file.