Primitives / Motion
Presence: let content leave
Holds mount-transition state for an exit animation. phase moves
shown → hiding → hidden: Hide starts the timed hiding phase, and the
Hidden fact it schedules carries its generation, so a Show in between wins
and the late fact is ignored. isVisible(model) reads whether content renders
(shown or mid-exit); the view keeps drawing while it does. The timeout Command
is the owner of the exit's end; there is no transitionend timer beside it.
Under reduced motion the same Hidden is sent at once. A placement starts
hidden: send Show (or its show helper) to draw the content.
A parent starts and undoes the exit through the placement's helpers, never by
building the child's Messages: a dismiss button sends the parent's own
Dismissed({ id }), and its update runs placed.helpers.hide(id)(model)
(show(id) brings the row back; a single placement takes no key).
While it exits the content should take no click, Tab or focus: draw it with
Presence.behavior,
which writes data-presence and inert from the phase, and let FocusRecovery
move focus off it in the frame it turns inert.
Reduced motion is a service
Whether motion should be reduced is read when a transition starts, not sniffed
once. Provide Motion.live (the user's prefers-reduced-motion) through the
assembly's resources, or Motion.reduced and Motion.full in a test or for a
setting the application owns. Under reduced motion Presence exits at once
and Tween and Spring jump to to, through the same Messages, so the Model
sees the same transitions. With no service provided, motion is full.
Motion.reducedMotion is the Effect the bundles read, for a transition of your
own.
Failure
A non-positive or non-finite duration, stiffness, or damping is rejected at
placement. A stopped stream is empty; Finished still rests the value exactly.