Summary
@usemotif/core defines borderWidths and letterSpacings as token scales, and several style props resolve against them — but the default @usemotif/tokens theme provides no values for either. A $token reference for those props therefore cannot resolve against the shipped defaults.
Details
- Schema declares both scales:
packages/core/src/types.ts:54 (letterSpacings?: TokenScale<…>), :57 (borderWidths?: TokenScale<…>), and the TokenScaleName union at :124 / :127.
- Style props are bound to them in
packages/core/src/style-props.ts:
borderWidth, borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth → scale borderWidths (lines 140-145)
letterSpacing → scale letterSpacings (line 160)
packages/tokens/src/themes.ts (the shipped light + dark themes) defines colors and the other scales but neither borderWidths nor letterSpacings (grep -n "letterSpacings\|borderWidths" packages/tokens/src/themes.ts → no matches).
Impact
<Box borderWidth="$borderWidths.thin" /> or letterSpacing="$letterSpacings.tight" has nothing to resolve against for any project on the default token set. Authors must hand-add the scales or fall back to raw values — undercutting the "adopt Motif with zero token authoring" promise.
Suggested fix
- Add default
borderWidths (e.g. none / hairline / thin / thick) and letterSpacings (e.g. tighter / tight / normal / wide) scales to the light + dark themes in packages/tokens/src/themes.ts.
packages/tokens/src/validation/m3.ts already synthesizes a letterSpacings map for Material-3 validation — reconcile the key names so the two agree.
Summary
@usemotif/coredefinesborderWidthsandletterSpacingsas token scales, and several style props resolve against them — but the default@usemotif/tokenstheme provides no values for either. A$tokenreference for those props therefore cannot resolve against the shipped defaults.Details
packages/core/src/types.ts:54(letterSpacings?: TokenScale<…>),:57(borderWidths?: TokenScale<…>), and theTokenScaleNameunion at:124/:127.packages/core/src/style-props.ts:borderWidth,borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth→ scaleborderWidths(lines 140-145)letterSpacing→ scaleletterSpacings(line 160)packages/tokens/src/themes.ts(the shipped light + dark themes) definescolorsand the other scales but neitherborderWidthsnorletterSpacings(grep -n "letterSpacings\|borderWidths" packages/tokens/src/themes.ts→ no matches).Impact
<Box borderWidth="$borderWidths.thin" />orletterSpacing="$letterSpacings.tight"has nothing to resolve against for any project on the default token set. Authors must hand-add the scales or fall back to raw values — undercutting the "adopt Motif with zero token authoring" promise.Suggested fix
borderWidths(e.g.none/hairline/thin/thick) andletterSpacings(e.g.tighter/tight/normal/wide) scales to the light + dark themes inpackages/tokens/src/themes.ts.packages/tokens/src/validation/m3.tsalready synthesizes aletterSpacingsmap for Material-3 validation — reconcile the key names so the two agree.