Skip to content

Resolve authored theme token overrides - #68

Merged
artiphishle merged 21 commits into
mainfrom
adm13/theme-token-resolution
Aug 12, 2026
Merged

Resolve authored theme token overrides#68
artiphishle merged 21 commits into
mainfrom
adm13/theme-token-resolution

Conversation

@artiphishle

@artiphishle artiphishle commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Summary

ADM-13 Surface owner phase for canonical authored theme tokens from @ankhorage/contracts.

This PR:

  • updates Surface to consume @ankhorage/contracts@^7.2.0
  • resolves canonical ThemeConfig.tokens overrides into runtime spacing, radii, typography and shadow tokens
  • preserves Surface defaults for omitted authored values
  • validates invalid numeric, heading and font-weight values explicitly
  • keeps reserved zero tokens canonical
  • keeps module-derived font-family state out of persisted theme source
  • fixes nested default-token mutation so one resolved font theme cannot leak into later themes
  • adds focused merge/inheritance, validation and font-isolation regression tests
  • refreshes generated Paradox documentation deterministically with @ankhorage/paradox@^0.1.21

Token policy

  • spacing, radii, typography size and shadow families may accept authored extension token names
  • typography weight slots remain the canonical Surface slots
  • heading slots remain canonical levels
  • numeric tokens must be finite and non-negative; typography dimensions must be positive
  • spacing.none and radii.none remain zero

Validation

Dedicated ADM-13 refresh gate:

  • install / lock refresh
  • build
  • lint
  • format check
  • Knip
  • 125 tests
  • typecheck
  • Paradox docs generation
  • explicit generated-doc guard for /home/runner/ and /Users/
  • changeset status

Generated artifacts were then formatted with the repository's canonical Prettier configuration. Both temporary helper workflows removed themselves and are absent from the final diff.

Final normal PR CI on head 48868d3951e21bd69595c110c13186fb053a5feb passes frozen install, build, lint, format check, Knip, tests, typecheck and changeset validation.

Release

Minor release: @ankhorage/surface@2.2.0.

Downstream ZORA/Studio work must wait for this Surface release; no downstream compatibility workaround belongs in this PR.

@artiphishle
artiphishle marked this pull request as ready for review August 12, 2026 03:32
@artiphishle
artiphishle merged commit 517dab0 into main Aug 12, 2026
1 check passed
@artiphishle
artiphishle deleted the adm13/theme-token-resolution branch August 12, 2026 04:00
@artiphishle artiphishle self-assigned this Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant