feat(design): System.motion.* token catalog (0.0.17-alpha01)
Chunk 0.C from the YallaClient refactor plan — partial implementation of ADR-021. Ships the motion token catalog as a sub-namespace of the design module. Haptic bridging is deferred to a focused follow-up PR.
What's in
- `MotionScheme` with four nested token families:
- `Duration` (instant/quick/standard/slow/contemplative) typed as `kotlin.time.Duration`
- `Easing` (standard/emphasized/entrance/exit) returning Compose `Easing`
- `Spring` (bouncy/gentle/snappy/stiff) returning `SpringSpec`
- `Stagger` (list/grid/cards) as `Duration`
- `standardMotionScheme()` factory with ADR-aligned values
- `LocalMotionScheme` CompositionLocal — default-valued so previews work outside YallaTheme
- YallaTheme gains `motionScheme` parameter; `System.motion` accessor
Intentional scope carve-outs
- `HapticController` expect/actual: deferred to a focused PR. It's the first platform bridge in `design`, and the Android (`HapticFeedbackConstants` + `VibrationEffect.Composition`) vs iOS (`UIImpactFeedbackGenerator` + `CHHapticEngine`) paths both warrant review isolation.
- Shared-element transition helpers: ADR-021 explicit non-goal.
Version
0.0.16-alpha01 → 0.0.17-alpha01. Stacked behind #10 and #12 in terms of version numbers; whichever merges first shifts the rebase. Klib baseline regenerated via `./gradlew :design:apiDump`.
Test plan
-
`./gradlew :design:compileKotlinMetadata` — green -
`./gradlew :design:apiCheck` — green (baseline updated) -
YallaClient consumer adoption when signature-moments work lands (Phase 1 login + Wave 5 ride)
CI
Commit carries `[skip ci]`.