Crate figtok_tokens

Source

Modules§

regex
utils

Structs§

ShadowValue
Figma Token Studio provides Shadow token values as Objects (similarly to a composition token) However, unlike a composition token they have a predictable schema that we can build a struct from. ShadowValue stores these values as a Vec of ShadowLayer structs that can be either a drop shadow or an inner shadow.
TokenDefinition
A TokenDefinition stores the raw data of a token, with a generic property denoting the type of token (Standard, Shadow, Composition, etc.) Most tokens are expressed as Standard tokens - where the value is a simple String, although Shadow and Composition tokens require different serialization methods, and therefore we can impl get_value for each type.
TokenSet
A TokenSet stores a Vec of Token IDs, these Tokens are stored in the Figtok TokenStore and can therefore be accessed by iterating over the ids.

Enums§

ReplaceMethod
An enum used to define the two methods of serialization.
Token
The Token enum holds a TokenDefinition and provides an abstraction with getters for the properties of a Token (name, id, kind, value.)
TokenKind
Each individual token type, usually mapping 1:1 to a css property with the exception of Composition and Dimension

Traits§

TokenStore
TokenStore is a trait that defines a storage interface for managing, retrieving, and transforming design tokens.

Type Aliases§

Theme
Themes
TokenSets
Tokens