WORK-470
ID:WORK-470Status:done

Carousel canonical token + shared DOM contract

Graduate carousel into the canonical pool and define the shared track/item DOM contract every adopting rune emits. Per SPEC-100 Phase A.1–A.2 and ADR-018.

Priority:highComplexity:simpleMilestone:v0.26.0Source:SPEC-100
claude/spec-100-carousel-layout-mode View source

Criteria completion

Criteria completion: 3 of 3 (100%) checked; tracking started on Jun 25, no incremental history yet0%25%50%75%100%Jun 25Jul 11

Tracking started Jun 25 — check back for trends.

Branches 3
claude/spec-100-carousel-layout-mode current done
main donechangeset-release/main doneclaude/v0.26.0-milestone-2vuxi9 ready
History 3
  1. 8058ef6
    Created (done)by bjornolofandersson
  2. 0f8d138
    Content editedby Claude
    WORK-470: carousel canonical token + shared DOM contract
  3. 17d2678
    Content editedby Claude
    v0.26.0: accept ADR-018 + SPEC-099/100/108, break down into 15 work item

Scope

  • Add carousel to the canonical layout const (WORK-466) so adopting runes import one token.
  • Define and document the shared carousel DOM contract that layout="carousel" implies:
    • host element carrying data-layout="carousel" (already the engine's layout-modifier output);
    • a track container [data-name="items"] and item elements [data-name="item"]reuse gallery's existing tokens verbatim (the lightbox also queries [data-name="item"], so keeping the names leaves gallery byte-stable).
  • Document the contract once alongside the canonical token (rune-authoring) so every adopting rune emits the same shape; note the :scope > query expectation for adopters.

Acceptance Criteria

  • carousel is added to the canonical layout const and importable by adopting runes.
  • A documented shared carousel DOM contract exists: host data-layout="carousel" + track [data-name="items"] + items [data-name="item"] (gallery's tokens reused unchanged).
  • The contract is documented once in rune-authoring, including the scoped-query expectation.

Dependencies

  • WORK-466 — the canonical const must exist before carousel is added to it.

References

  • Spec: SPEC-100 Phase A.1–A.2 + Design notes (keep items/item). Decision: ADR-018 (graduation rule).
  • packages/runes/src/tags/gallery.ts, packages/runes/src/config.ts (Gallery).

Resolution

Completed: 2026-06-25

Branch: claude/spec-100-carousel-layout-mode

What was done

  • packages/runes/src/layout-vocabulary.ts — added LAYOUT.carousel to the canonical pool; documented the carousel DOM/behavior contract (host data-layout="carousel", track data-name="items", items data-name="item", block-agnostic behavior on [data-layout="carousel"]).
  • packages/runes/test/layout-vocabulary.test.ts — seed-set assertion now expects carousel.
  • site/content/extend/rune-authoring/patterns.md — new "The carousel contract" subsection documenting the shape, the zero-behavior-code adoption model, and the :scope > query expectation.

Notes

  • Token + contract only — gallery keeps its inline layout values for now (it migrates onto the const/contract in WORK-472). The behavior dispatch (WORK-471) and the lift-out-of-gallery (WORK-472) build on this.