Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/motion-rect-morph.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@astryxdesign/core': patch
---

[chore] Internal: the rect morph, one way for a touch presentation to grow out of a source rect and shrink back into it. `createRectMorph` presents an element along a path (`lerpPath`, `edgeGrowPath`) and dismisses it back on a copy or on itself, each continuing the other from the rect on screen. A motion a tap or a key starts plays a theme duration and easing; a gesture's release plays a spring from its velocity. Reduced Motion is left to the animator. `timedProgressCurve` joins the progress helpers. Not exported from the package entry point; no component uses it yet.

@vjeux
4 changes: 3 additions & 1 deletion docs/architecture/react-component-runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,9 @@ those contracts.
change and moves shifted content with a compositor-only translate played
through the shared rectangle morph (`architecture:layer-runtime` INV15;
`spec:AST-094` FR5) once Core has that morph; until then, the module plays
its own compositor translate. It never animates height. Its walk visits only
its own compositor translate. (Implementation gap: Core has the shared
rectangle morph, but the size-change glide still plays its own compositor
translate.) It never animates height. Its walk visits only
the changed element's ancestors up to the area and the element siblings on
either side at each of their levels, through `parentElement`,
`nextElementSibling` and `previousElementSibling`, descending only into an
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/motion/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ roles through `resolveMotion`.
| `bezier.ts` | Cubic-bézier timing functions (Core Animation's named curves). |
| `animator.ts` | Compositor animator: springs, coasts and any closed-form curve compiled to Web Animations, read back analytically. |
| `morphPath.ts` | The rect an element shows at each progress of a grow-out presentation: a straight line, a popover’s edge growth, and the curves that put it there. |
| `rectMorph.ts` | Grow out of a source rect and shrink back into it along a path: present and dismiss, each continuing the other from the rect on screen. |
| `progress.ts` | A spring's progress, one curve mapped from another (companions, clamped ranges), the velocity that continues a motion. |
| `presentation.ts` | Where each moving element is drawn relative to where the engine hit-tests it, reported by the animator while translate runs; read by the gesture host at touch-down. |
| `reducedMotionPlan.ts` | The animator's Reduce Motion planner: what one call becomes, a cross-fade whose travel lands while transparent or at once. |
Expand Down
2 changes: 2 additions & 0 deletions packages/core/src/motion/__tests__/motionBundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
*/

export {createMotionAnimator} from '../animator';
export {progressCurve} from '../progress';
export {createRectMorph, edgeGrowPath, lerpPath} from '../rectMorph';
export {solveSpring, toSpring} from '../spring';
export {registerSpringsTable, springs} from '../uikit/springs';
export {motionRoleOf} from '../roles';
Loading