Skip to content

Settings

Controls how a run behaves. Changing a setting produces different output, never incorrect output: a different team reading the same library may set every one of these differently and each result is correct.

Authored in config/settings.yaml. Members are grouped by concern, and each concern carries its own directory.

PropertyTypeDefaultDescription
authorstringAuthor recorded in generated spec metadata
dataobjectSource acquisition and the directory holding fetched, computed, and authored data
specobjectThe generated spec — where it lands, how it is split, what it contains, how values are serialized
assetsobjectShared resources every code output points at: icons, images, generated CSS, fonts

data

PropertyTypeDefaultDescription
directorystringDirectory holding fetched downloads, computed caches, extracted assets, and authored inputs
sourcesobjectSources the workspace reads from, keyed by source name

data.sources.<name>

PropertyTypeDefaultDescription
keystring(required)Figma file key the source reads from
fetchstring[]Artifacts to download (e.g. file, variables, styles, icons)

spec

PropertyTypeDefaultDescription
directorystringDirectory the generated spec is written to
format'JSON' | 'YAML''JSON'Serialization format
keys'SAFE' | 'CAMEL' | 'SNAKE' | 'KEBAB' | 'PASCAL' | 'TRAIN''SAFE'Key casing style
layout'LAYOUT' | 'PARENT_CHILDREN' | 'BOTH''LAYOUT'Element hierarchy representation
tokens'TOKEN' | 'TOKEN_NAME' | 'TOKEN_FIGMA_EXTENSIONS' | 'FIGMA_NAME' | 'CUSTOM' | 'FIGMA_SYNTAX_WEB' | 'FIGMA_SYNTAX_IOS' | 'FIGMA_SYNTAX_ANDROID''TOKEN'Token reference output format
colorColorFormat'HEX'Color value output format
variantDepth1 | 2 | 3 | 99999999Maximum variant nesting depth (9999 = unlimited)
details'FULL' | 'LAYERED''LAYERED'Output detail level
collapsePrimitiveWrapperbooleanfalseStrip a root container that only wraps one child — a text/glyph leaf, or a slot — and promote the child to spec root
promotePrimitivesbooleanfalsePromote primitive layers in composed example content to instances of the design system’s own components
rolesbooleanfalseRead Figma Dev Mode annotations and emit anatomy.<element>.role and .actions — the on-switch for the role feature (ADR-067)
roleValidation'warn' | 'error''warn'Severity for unmet required role obligations, such as a control with no accessible-name source; error fails the transform (ADR-067)
invalidVariantsbooleanfalseInclude variants marked invalid
invalidCombinationsbooleantrueInclude invalidVariantCombinations list
emptyVariantsbooleanfalseInclude variants with no element overrides
defaultSlotContentbooleanfalsePro. Emit the component’s default slot content into Component.slotContentExamples. Ignored on the free tier
splitComponentsbooleantrueWrite one file per component rather than a single combined library file
splitConcernsbooleantrueWrite one file per concern (api, styling, variants)
useSubfoldersbooleantrueNest each component’s files in a subfolder named for the component

assets

PropertyTypeDefaultDescription
directorystringDirectory holding shared assets

Grouped by consumer rather than producer: icons, images, generated CSS, and fonts arrive from fetch, from generate, from transform, or from a process outside this tool — and every code output points at them, whatever the platform.

DEFAULT_SETTINGS

A runtime export from @directededges/specs-schema. Provides defaults for every setting that has one. Typed as ResolvedSettings — all defaulted properties are required:

const DEFAULT_SETTINGS: ResolvedSettings = {
spec: {
format: 'JSON',
keys: 'SAFE',
layout: 'LAYOUT',
tokens: 'TOKEN',
color: 'HEX',
variantDepth: 9999,
details: 'LAYERED',
collapsePrimitiveWrapper: false,
promotePrimitives: false,
roles: false,
roleValidation: 'warn',
invalidVariants: false,
invalidCombinations: true,
emptyVariants: false,
defaultSlotContent: false,
},
};

Directories, sources, and author carry no default: the consumer supplies them, and this package has no basis for choosing one. They stay optional on ResolvedSettings for exactly that reason.

The three split flags are different. Every downstream command — transform, analyze, render — reads the split layout, so the shape of generated output is not a per-consumer choice; leaving each consumer to pick its own default is how the same workspace ends up emitting two layouts. DEFAULT_SETTINGS carries them as true and they are required on ResolvedSettings.