WORK-066
ID:WORK-066Status:done

Media Slots Dimension

Priority:mediumComplexity:simpleMilestone:v0.9.0Source:SPEC-025
claude/file-naming-convention-LJdwR View source

Criteria completion

Criteria completion: 5 of 5 (100%) checked; tracking started on Apr 21, no incremental history yet0%25%50%75%100%Apr 21May 11

Tracking started Apr 21 — check back for trends.

Branches 3
claude/file-naming-convention-LJdwR current done
changeset-release/main doneclaude/align-sidenav-styling-4MuxV donemain done
History 2
  1. bbbb94c
    Created (done)by bjornolofandersson
  2. f2b3512
    Content editedby Claude
    Add {ID}-{slug}.md filename convention + migrate filenames subcommand

Summary

Add a media slots mapping to rune configs and the identity transform. Runes declare mediaSlots that map image ref names to media treatment types (portrait, cover, thumbnail, hero, icon). The transform emits data-media on image elements, enabling themes to style all media uniformly — circular portraits, full-width covers, small thumbnails — with ~5 CSS rules.

Acceptance Criteria

  • RuneConfig in packages/transform/src/types.ts gains mediaSlots?: Record<string, 'portrait' | 'cover' | 'thumbnail' | 'hero' | 'icon'>
  • Identity transform emits data-media on image/media elements whose ref maps to a media slot
  • Rune configs annotated per SPEC-025 Table 2: Character portrait → portrait, Recipe image → cover, Track artwork → thumbnail, Hero media → hero, etc.
  • refrakt inspect output shows data-media attributes on media elements
  • Unit tests verify media attribute emission

Approach

  1. Add mediaSlots to RuneConfig interface
  2. In the engine, when processing a structure entry or content element whose ref matches a key in mediaSlots, emit data-media with the mapped slot type
  3. Annotate rune configs per SPEC-025 Table 2

References

  • SPEC-025 (Universal Theming Dimensions — Media Slots, Table 2: Media Slots Map)