WORK-195
Setting up your dashboard 0 entities found · 6/29 branches scanned
ID:WORK-195Status:done

Update TintTokens / TintDefinition types

Replace TintTokenSet with TintTokens, rename five field names to match the token contract (background → bg, primary → text, secondary → muted, accent → primary, surface unchanged), and replace the three-valued mode field on TintDefinition with lockMode?: 'light' | 'dark'. Add extends?: string for tint variants. Pure type-surface work; downstream items wire up the merge logic, engine emit, and CSS bridge.

Priority:highComplexity:smallMilestone:v0.14.0Source:SPEC-053

Criteria completion

Criteria completion: 3 of 7 (43%) checked; history from May 18 to May 180%25%50%75%100%May 18May 18
Branches 2
History 4
  1. c1d4f32
    • ☑ `TintTokens` interface exported from `packages/transform/src/types.ts` with the six aligned field names (`bg`, `surface`, `text`, `muted`, `primary`, `border`)
    • ☑ `TintDefinition` updated: `mode` removed, `lockMode?: 'light' | 'dark'` added, `extends?: string` added
    • ☑ JSDoc on every renamed field clearly states the target `--rf-color-*` token
    by bjornolofandersson
  2. 7c7dd33
    Content editedby Claude
    v0.14.0 Chunk 5: SPEC-053 tint vocabulary alignment (WORK-195-199)
  3. 3b92415
    Created (ready)by bjornolofandersson
  4. 0d5a42c
    Content editedby Claude
    plan: add SPEC-053 tint shape alignment work items (WORK-195 to 199)

Acceptance Criteria

  • TintTokens interface exported from packages/transform/src/types.ts with the six aligned field names (bg, surface, text, muted, primary, border)
  • TintTokenSet removed; downstream imports updated (renamed to TintTokens in the index export too)
  • TintDefinition updated: mode removed, lockMode?: 'light' | 'dark' added, extends?: string added
  • SiteConfig.tints in packages/types/src/theme.ts documents the TintDefinition shape via JSDoc; kept as Record<string, Record<string, unknown>> at the @refrakt-md/types level to avoid a cross-package type dependency (the actual TintDefinition lives in @refrakt-md/transform). Validated at config-load time downstream.
  • RefraktConfig.tints (the deprecated flat-shape field) removed entirely — per SPEC-053 decision. config-normalize no longer mirrors tints between flat and per-site shapes; only sites.<name>.tints / site.tints is accepted.
  • JSDoc on every renamed field clearly states the target --rf-color-* token
  • Build passes; full repo test suite (2429 tests + 10 new tint-extends tests) green

Approach

Single type-rename PR. Mechanical change to packages/transform/src/types.ts and the corresponding import in packages/types/src/theme.ts.

Build will break immediately in packages/lumina/src/config.ts and any plugin that defines tints — that's expected and gets fixed in WORK-198. Order matters: this type-only PR lands first, then the engine/CSS/config updates land together.

Dependencies

None (or minimal — does not require SPEC-048 to be implemented). Independent of the rest of the SPEC-048 chain; can start in parallel.

References

  • SPEC-053 — full rationale for each rename and the mode → lockMode simplification
  • packages/transform/src/types.ts — file being edited
  • packages/types/src/theme.ts — file being edited