Skip to main content

Module token

Module token 

Source
Expand description

Token block and token AST types.

Structs§

FilterLiteral
A filter token literal: an ordered list of filter operations, applied in source order. At least one op is required (enforced at resolution).
FilterOp
A single filter operation: a kind plus an optional amount. The amount is a unitless number whose meaning depends on the kind (e.g. fraction for grayscale, degrees for hue-rotate); None means “use the op’s default”.
GradientLiteral
A gradient token literal: either linear (angle + stops) or radial (center + radius + stops).
GradientStopRef
A single gradient stop: an offset in 0..1 and a reference to a color token.
MaskLiteral
A mask token literal: a single spatial coverage shape plus a feather and an invert flag.
ShadowLayerRef
A single shadow layer: x/y offsets and blur radius (pixels) plus a reference to a color token. A layer with nonzero dx/dy is a drop shadow; a layer with dx=dy=0 and a blur is an outer glow.
ShadowLiteral
A shadow token literal: an ordered list of shadow layers (e.g. a drop shadow plus an outer glow). At least one layer is required (enforced at resolution).
Token
A single design token within a tokens block.
TokenBlock
The top-level tokens block with its required format attribute.

Enums§

FilterKind
The color/image filter operations, applied in source order.
GradientKind
Whether a gradient token is linear or radial.
MaskShape
The spatial coverage shape of a mask token.
TokenLiteral
A literal value held by a token definition.
TokenType
The five v0 token types, plus an extensibility variant for unknown types.
TokenValue
The value of a token — either an inline literal or an alias to another token.