ID:WORK-066Status:donePriority:mediumComplexity:simpleMilestone:v0.9.0
Media Slots Dimension
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
RuneConfiginpackages/transform/src/types.tsgainsmediaSlots?: Record<string, 'portrait' | 'cover' | 'thumbnail' | 'hero' | 'icon'>- Identity transform emits
data-mediaon 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 inspectoutput showsdata-mediaattributes on media elements- Unit tests verify media attribute emission
Approach
- Add
mediaSlotstoRuneConfiginterface - In the engine, when processing a structure entry or content element whose ref matches a key in
mediaSlots, emitdata-mediawith the mapped slot type - Annotate rune configs per SPEC-025 Table 2
References
- SPEC-025 (Universal Theming Dimensions — Media Slots, Table 2: Media Slots Map)