diff --git a/.changeset/build-stylex-cross-file-consts.md b/.changeset/build-stylex-cross-file-consts.md
new file mode 100644
index 0000000000000..736b20da4327d
--- /dev/null
+++ b/.changeset/build-stylex-cross-file-consts.md
@@ -0,0 +1,7 @@
+---
+'@astryxdesign/build': patch
+---
+
+[fix] `astryxStylex` resolves `defineConsts` values read from another file. With the `{stylexOptions}` form (the one Storybook uses), a file that read only constants from a `.stylex.ts` module lost that import once StyleX compiled it, so the constants never reached the CSS: a constant used as a media-query key failed the build ("Invalid empty selector") and one used as a value shipped as a custom property nothing declares. In either form, a constant defined on the other side of the layer split, or in an Astryx package (compiled with the library class-name prefix) and read from an app file (compiled with its own), stayed unresolved.
+
+@vjeux
diff --git a/.changeset/click-guard.md b/.changeset/click-guard.md
new file mode 100644
index 0000000000000..7376b26fef796
--- /dev/null
+++ b/.changeset/click-guard.md
@@ -0,0 +1,7 @@
+---
+'@astryxdesign/core': patch
+---
+
+[chore] Internal: the gesture recognizers and the menu press model share one guard for the browser's click after a gesture that already acted, swallowing it for 400ms or until the next press. Keyboard and assistive-technology clicks (`detail` 0) always pass.
+
+@vjeux
diff --git a/.changeset/gesture-arena-moving-cancel.md b/.changeset/gesture-arena-moving-cancel.md
new file mode 100644
index 0000000000000..5b7e52cad131a
--- /dev/null
+++ b/.changeset/gesture-arena-moving-cancel.md
@@ -0,0 +1,7 @@
+---
+'@astryxdesign/core': patch
+---
+
+[chore] Internal: a gesture that cancels itself on a finger's move (a long press dragged past its tolerance) keeps that finger claimed until it lifts, so the page never takes the drag over midway; a resting finger is still given back when its gesture is cancelled. Not exported from the package entry point.
+
+@vjeux
diff --git a/.changeset/gesture-browser-negotiation.md b/.changeset/gesture-browser-negotiation.md
new file mode 100644
index 0000000000000..1930e34496d7e
--- /dev/null
+++ b/.changeset/gesture-browser-negotiation.md
@@ -0,0 +1,7 @@
+---
+'@astryxdesign/core': patch
+---
+
+[chore] Internal: touch-action derivation, the native scroll probe and haptics for the gesture system. Not exported from the package entry point.
+
+@vjeux
diff --git a/.changeset/gesture-hook-fixes.md b/.changeset/gesture-hook-fixes.md
new file mode 100644
index 0000000000000..87f08a0948e31
--- /dev/null
+++ b/.changeset/gesture-hook-fixes.md
@@ -0,0 +1,7 @@
+---
+'@astryxdesign/core': patch
+---
+
+[chore] Internal: the gesture hooks call nothing back after unmount; `usePressTracker` brakes with the host by default and keeps one tracker, so an option change or a new ref never drops a press in progress; the recognizer's arena plumbing is `protected`. Not exported from the package entry point.
+
+@vjeux
diff --git a/.changeset/gesture-host-fixes.md b/.changeset/gesture-host-fixes.md
new file mode 100644
index 0000000000000..2fc0915c974a6
--- /dev/null
+++ b/.changeset/gesture-host-fixes.md
@@ -0,0 +1,7 @@
+---
+'@astryxdesign/core': patch
+---
+
+[chore] Internal: gesture host fixes from review. A page scroll under a still finger keeps the press and its click; watchers and touches nothing can claim get passive listeners only; a claimed pen holds only its own stylus touches; an element's own `touch-action` is never widened; slotted content scrolls with its shadow-tree scroller. Not exported from the package entry point.
+
+@vjeux
diff --git a/.changeset/gesture-host-owner.md b/.changeset/gesture-host-owner.md
new file mode 100644
index 0000000000000..9ff3bb2d7aded
--- /dev/null
+++ b/.changeset/gesture-host-owner.md
@@ -0,0 +1,7 @@
+---
+'@astryxdesign/core': patch
+---
+
+[chore] Internal: the gesture host becomes the one document-level touch owner: the finger count, touch gates, and a kept press for continuous-tracking controls, whose element gets `touch-action: manipulation` where the pointer is coarse. A scroll lock's page hold and the finger-scroll watch keep their own listeners and ask the host only about the touches it owns. A second finger fails a one-finger pan that has not claimed, so the page can pinch. A scroll-edge pan holds a lone finger from the first move that pulls away from an edge every scroller under it is at, so those moves are cancelled before it begins; with a second finger anywhere on the screen the page keeps its pinch. Where the primary pointer is fine, the host attaches nothing and registers no listener, following the pointer when it changes; a recognizer that reads each event's pointer itself opts out with `perEventPointer`, and a press tracker with it paints a finger's press feedback only, with no control event and no mouse or pen press. A press tracker whose hold acts (a stepper's hold-repeat) can bring a selection lock for its presses, as a recognizer can. Internal, for the touch components that adopt them; not exported from the package entry point.
+
+@vjeux
diff --git a/.changeset/gesture-host.md b/.changeset/gesture-host.md
new file mode 100644
index 0000000000000..eb9f2fec42db2
--- /dev/null
+++ b/.changeset/gesture-host.md
@@ -0,0 +1,7 @@
+---
+'@astryxdesign/core': patch
+---
+
+[chore] Internal: the gesture system's DOM host (claims, click suppression, the browser's takeover, the pointer behind a contact). Not exported from the package entry point.
+
+@vjeux
diff --git a/.changeset/gesture-pan.md b/.changeset/gesture-pan.md
index 12eb02fc42391..908da1b367575 100644
--- a/.changeset/gesture-pan.md
+++ b/.changeset/gesture-pan.md
@@ -2,6 +2,6 @@
'@astryxdesign/core': patch
---
-[chore] Internal: the pan gesture recognizer, with UIKit's measured hysteresis and velocity filter. Not exported from the package entry point; no component uses it yet.
+[chore] Internal: the pan gesture recognizer, with UIKit's measured hysteresis and velocity filter. Not exported from the package entry point.
@vjeux
diff --git a/.changeset/gesture-press-tracking.md b/.changeset/gesture-press-tracking.md
new file mode 100644
index 0000000000000..1c66836c74243
--- /dev/null
+++ b/.changeset/gesture-press-tracking.md
@@ -0,0 +1,7 @@
+---
+'@astryxdesign/core': patch
+---
+
+[chore] Internal: UIControl press tracking with control and cell profiles and the gesture hooks, with every press painter writing `data-astryx-press` through one internal writer in `utils/pressFeedback.ts`. Not exported from the package entry point.
+
+@vjeux
diff --git a/.changeset/gesture-readme.md b/.changeset/gesture-readme.md
new file mode 100644
index 0000000000000..9a6293b811b68
--- /dev/null
+++ b/.changeset/gesture-readme.md
@@ -0,0 +1,7 @@
+---
+'@astryxdesign/core': patch
+---
+
+[chore] Internal: the gesture system's README for component authors, with its browser proof in Chromium and WebKit.
+
+@vjeux
diff --git a/.changeset/gesture-recognizer-core.md b/.changeset/gesture-recognizer-core.md
index 0b0bfc389235f..28caef0d5579c 100644
--- a/.changeset/gesture-recognizer-core.md
+++ b/.changeset/gesture-recognizer-core.md
@@ -2,6 +2,6 @@
'@astryxdesign/core': patch
---
-[chore] Internal: the gesture recognizer core for touch presentations: UIKit's recognizer state machine and the arena that settles which recognizer owns a touch. Not exported from the package entry point; no component uses it yet.
+[chore] Internal: the gesture recognizer core for touch presentations: UIKit's recognizer state machine and the arena that settles which recognizer owns a touch. Not exported from the package entry point.
@vjeux
diff --git a/.changeset/gesture-recognizer-fixes.md b/.changeset/gesture-recognizer-fixes.md
new file mode 100644
index 0000000000000..9e6754a78d733
--- /dev/null
+++ b/.changeset/gesture-recognizer-fixes.md
@@ -0,0 +1,7 @@
+---
+'@astryxdesign/core': patch
+---
+
+[chore] Internal: gesture recognizer and arena fixes from review; a pan claims nothing before it begins at 10 pt; one velocity tracker for every gesture (`spec:AST-100`: UIKit's measured blend, a scrolling surface's release through the pan's `scrollVelocity()`, and FR2's release rules). Not exported from the package entry point.
+
+@vjeux
diff --git a/.changeset/gesture-swipe-pinch-rotation-edge-hover.md b/.changeset/gesture-swipe-pinch-rotation-edge-hover.md
new file mode 100644
index 0000000000000..ffeadde679ef5
--- /dev/null
+++ b/.changeset/gesture-swipe-pinch-rotation-edge-hover.md
@@ -0,0 +1,7 @@
+---
+'@astryxdesign/core': patch
+---
+
+[chore] Internal: swipe, pinch, rotation, screen-edge pan and hover gesture recognizers. Not exported from the package entry point.
+
+@vjeux
diff --git a/.changeset/gesture-tap-long-press.md b/.changeset/gesture-tap-long-press.md
index 9ef786da65842..f1efef8d29014 100644
--- a/.changeset/gesture-tap-long-press.md
+++ b/.changeset/gesture-tap-long-press.md
@@ -2,6 +2,6 @@
'@astryxdesign/core': patch
---
-[chore] Internal: tap and long-press gesture recognizers with UIKit's measured thresholds. Not exported from the package entry point; no component uses them yet.
+[chore] Internal: tap and long-press gesture recognizers with UIKit's measured thresholds. Not exported from the package entry point.
@vjeux
diff --git a/.changeset/gesture-watcher.md b/.changeset/gesture-watcher.md
new file mode 100644
index 0000000000000..bec7cd286e49d
--- /dev/null
+++ b/.changeset/gesture-watcher.md
@@ -0,0 +1,7 @@
+---
+'@astryxdesign/core': patch
+---
+
+[chore] Internal: a recognizer created with `claimsTouches: false` is a watcher: passive listeners only, simultaneous with every recognizer, and it follows a touch the browser takes for a scroll to the lift. Not exported from the package entry point.
+
+@vjeux
diff --git a/.changeset/gestures-every-pointer.md b/.changeset/gestures-every-pointer.md
new file mode 100644
index 0000000000000..87e2940ff80b7
--- /dev/null
+++ b/.changeset/gestures-every-pointer.md
@@ -0,0 +1,7 @@
+---
+'@astryxdesign/core': patch
+---
+
+[chore] Internal: gestures attach for every pointer, a mouse, a pen and a finger alike (AST-094 FR43). Under a fine primary pointer an element that uses a gesture keeps one passive `pointerdown` listener (a recognizer that claims a moving finger also keeps its blocking `touchmove`), and the page's listeners last only a press. A right click or a ctrl-click on macOS starts no press. A mouse or pen drag that a recognizer claims takes no text selection from then on, anywhere on the page, and a finger is read once where the browser sends Touch Events without exposing `ontouchstart`. A press tracker takes a mouse press as a press, painting at once with no scroll brake. The screen-edge pan stays off under a mouse, a trackpad and a pen unless its caller allows one, and `perEventPointer` is accepted and does nothing. Not exported from the package entry point.
+
+@vjeux
diff --git a/.changeset/input-stream.md b/.changeset/input-stream.md
new file mode 100644
index 0000000000000..61c8b2d52ed22
--- /dev/null
+++ b/.changeset/input-stream.md
@@ -0,0 +1,7 @@
+---
+'@astryxdesign/core': patch
+---
+
+[fix] The touch press feedback and the gesture recognizers now listen on the window's capture phase through one shared input stream: one passive listener per event type for both. An app's own capture-phase `stopPropagation` at the document no longer starves them, and a page of pressables registers no listener that can hold a scroll.
+
+@vjeux
diff --git a/.changeset/list-has-animated-changes.md b/.changeset/list-has-animated-changes.md
new file mode 100644
index 0000000000000..1ca1bb48ed9e1
--- /dev/null
+++ b/.changeset/list-has-animated-changes.md
@@ -0,0 +1,7 @@
+---
+'@astryxdesign/core': patch
+---
+
+[feat] `List` gains `hasAnimatedChanges`. Under a finger (a coarse primary pointer, iOS and Android alike), when rows are inserted, removed or reordered, the rows that stay slide to their new places and new rows fade in once the rows sliding past have cleared them, on the spring an iOS table uses. A row that crosses rows moving the other way (a reorder) rides above them with the surface color behind it, as an iOS table's opaque cell does. A removed row collapses in place (a swiped one with its action showing) while the rows below slide up into its gap, as a deleted iOS table cell does. Page content after the list takes its new place by layout at once; nothing moves it. With reduced motion on, nothing travels: rows cross-fade into place. Off by default; with a mouse nothing moves.
+
+@vjeux
diff --git a/.changeset/list-reorder-mode-hint.md b/.changeset/list-reorder-mode-hint.md
new file mode 100644
index 0000000000000..a5dad52a05089
--- /dev/null
+++ b/.changeset/list-reorder-mode-hint.md
@@ -0,0 +1,7 @@
+---
+'@astryxdesign/core': patch
+---
+
+[feat] While a reorderable `List` row is in reorder mode, a hint anchored to its handle, in the keyboard hint's layer and theme roles, shows the moves and Done. Each is a button that does what its key does and leaves the focus on the handle, so a row can be reordered by taps alone: the handle, the moves, then Done.
+
+@vjeux
diff --git a/.changeset/list-reorderable.md b/.changeset/list-reorderable.md
new file mode 100644
index 0000000000000..0f3ce5e5ece0c
--- /dev/null
+++ b/.changeset/list-reorderable.md
@@ -0,0 +1,7 @@
+---
+'@astryxdesign/core': patch
+---
+
+[feat] `createReorderable({onReorder, isReorderable})` makes a collection's reorder behavior, and `List` takes it as `reorderable`: each `ListItem` with an `itemKey` gets a reorder handle at its end, and each committed move calls `onReorder({key, to})` once, with the row's key and its index after the move. On a touch screen a finger held still on a handle picks up its row the way an iOS table's reorder control does (a flick on it still scrolls): the row stays in its place, dimmed, while a copy of it follows the finger and an accent line marks where it would land; the other rows stay still, the page scrolls near the edges, and on release the rows rearrange, gliding to their new places. A mouse drags a handle at once with the same copy and line, and rows take their places without motion; a cancelled drag puts everything back at once. Without a drag, a click, Space or Enter on a handle turns on reorder mode for its row: each arrow key moves it a place at once, announced with its place and neighbours, and Escape or another activation ends the mode, keeping the moves. The object's `start(key)` enters the same mode from the app's own UI, such as a row's context menu. A List without `reorderable` loads none of the reorder code.
+
+@vjeux
diff --git a/.changeset/list-row-press-compositor.md b/.changeset/list-row-press-compositor.md
new file mode 100644
index 0000000000000..96014ef632b3e
--- /dev/null
+++ b/.changeset/list-row-press-compositor.md
@@ -0,0 +1,7 @@
+---
+'@astryxdesign/core': patch
+---
+
+[fix] A list row's touch press release keeps fading while the page runs script. `ListItem`, `Item` and `TreeList` rows used to stay fully pressed after the finger lifted until the main thread was free, and every frame of the fade repainted the row; the release now runs on the compositor, with the same color, clock and curve as before. Under a finger, while a row is pressed and through its release, the press paints on the row's `::before` and the row is its own stacking context; at rest nothing of it applies, so a row's own `::before` decoration and its children's stacking are as they were. During a press the layer is the row's `::before`, so a caller's decoration there takes the layer's box and paint for that time (a page stylesheet keeps the properties it sets); decoration that should stay through a press belongs on a child element. With a mouse or trackpad the row is unchanged: no layer and no new stacking context.
+
+@vjeux
diff --git a/.changeset/list-touch-hit-area.md b/.changeset/list-touch-hit-area.md
new file mode 100644
index 0000000000000..eee89371d2ed5
--- /dev/null
+++ b/.changeset/list-touch-hit-area.md
@@ -0,0 +1,7 @@
+---
+'@astryxdesign/core': patch
+---
+
+[feat] Under a finger (a coarse primary pointer), an interactive `List` row's hit target grows toward 44px where its neighbors leave room: the shared touch hit area measures each row and stops at half the gap to the nearest neighboring row or control. Rows look and lay out exactly as before, and a mouse is unchanged. Under a finger a list row's `::after` is that invisible layer, so decorate a row with a child instead.
+
+@vjeux
diff --git a/.changeset/long-press-one-source.md b/.changeset/long-press-one-source.md
new file mode 100644
index 0000000000000..7ed429a480cb9
--- /dev/null
+++ b/.changeset/long-press-one-source.md
@@ -0,0 +1,7 @@
+---
+'@astryxdesign/core': patch
+---
+
+[fix] `useLongPress` (ContextMenu's long press, and the held finger that opens a menu from its trigger) now cancels when the finger travels more than 10px from where it landed, measured as a distance, as UIKit's long press does. Before, it allowed 10px on each axis, so a diagonal drift of up to about 14px kept the press. Its duration and tolerance now come from the same source as the long-press gesture recognizer.
+
+@vjeux
diff --git a/.changeset/presented-hit-testing.md b/.changeset/presented-hit-testing.md
new file mode 100644
index 0000000000000..e27c857277aad
--- /dev/null
+++ b/.changeset/presented-hit-testing.md
@@ -0,0 +1,7 @@
+---
+'@astryxdesign/core': patch
+---
+
+[chore] On iOS, a touch on an element the compositor animator is moving reaches what is drawn: the animator reports each moving element's offset from its layout box, and the gesture host sends the touch, press bounds and the tap's click there instead of to the layout position iOS WebKit hit-tests.
+
+@vjeux
diff --git a/.changeset/reduced-motion-record.md b/.changeset/reduced-motion-record.md
new file mode 100644
index 0000000000000..2ec44f4c1f9c8
--- /dev/null
+++ b/.changeset/reduced-motion-record.md
@@ -0,0 +1,7 @@
+---
+'@astryxdesign/core': patch
+---
+
+[chore] Internal: Reduce Motion for the touch presentations follows design:reduced-motion beyond the animator too. `reducedMotionFade()` gives code beside the animator the animator's own fade (an opacity-only 200 ms cross-fade on a coarse pointer or after a touch release, at once on any other pointer), `animator.reducedMotion()` reports which form a change takes for feedback that plays no fade of its own, and `reducedMotion.stylex.ts` holds the fade's constants for StyleX transitions. The fade's length is not a theme motion role. Not exported from the package entry point.
+
+@vjeux
diff --git a/.changeset/reorder-values.md b/.changeset/reorder-values.md
new file mode 100644
index 0000000000000..6b953cbcdaa46
--- /dev/null
+++ b/.changeset/reorder-values.md
@@ -0,0 +1,7 @@
+---
+'@astryxdesign/core': patch
+---
+
+[chore] Internal: a table's reorder values in the UIKit constants table (the reorder control's claim and the edge autoscroll steps, measured on iOS 26.2) and the reorder model that applies them (the drop position a drag proposes, the rows a drag can pass, the autoscroll step). Not exported from the package entry point; no component uses them yet.
+
+@vjeux
diff --git a/.changeset/reorderable-attach.md b/.changeset/reorderable-attach.md
new file mode 100644
index 0000000000000..593bc61a92603
--- /dev/null
+++ b/.changeset/reorderable-attach.md
@@ -0,0 +1,7 @@
+---
+'@astryxdesign/core': patch
+---
+
+[feat] `createReorderable` takes `positions()` for a layout such as a grid or a fanned hand: one slot centre per item, so a drag follows the pointer on both axes, drops the item on the slot nearest its centre, and settles it on that slot's centre, and reorder mode's arrow keys and hint follow the layout's rows and columns (Left and Right along a row, all four in a grid, a row and a column in the announcement). Its new `attach(container, {items})` reorders plain elements with no collection component: each item's handle becomes reorder mode's toggle, named after its item and in the Tab order (a rejected or keyless item's handle is hidden), the container gets the drag and reorder mode with their announcements through the shared announcement channel, following the primary pointer as it turns coarse or fine, and `detach()` removes everything it added.
+
+@vjeux
diff --git a/.changeset/touch-selection-lock-gestures.md b/.changeset/touch-selection-lock-gestures.md
new file mode 100644
index 0000000000000..d1f3ab7c2b7fc
--- /dev/null
+++ b/.changeset/touch-selection-lock-gestures.md
@@ -0,0 +1,7 @@
+---
+'@astryxdesign/core': patch
+---
+
+[chore] Internal: the gesture host applies a recognizer's own `selectionLock` to that recognizer's contact and imports no lock itself; a long press brings one only when it has a hold (a `minimumPressDuration` above 0), and `selectionLock: null` opts out. Not exported from the package entry point.
+
+@vjeux
diff --git a/.changeset/touch-selection-lock.md b/.changeset/touch-selection-lock.md
new file mode 100644
index 0000000000000..e5285afc1f8ad
--- /dev/null
+++ b/.changeset/touch-selection-lock.md
@@ -0,0 +1,7 @@
+---
+'@astryxdesign/core': patch
+---
+
+[fix] Where the primary pointer is fine (a mouse, a trackpad, a touchscreen laptop, a desktop pen tablet), the press feedback controller no longer registers a touch listener: it reads the primary pointer at the first finger or pen press and keeps its `touchcancel` listener only while that pointer is coarse.
+
+@vjeux
diff --git a/.changeset/tree-list-expand-motion.md b/.changeset/tree-list-expand-motion.md
new file mode 100644
index 0000000000000..ac62d494f4e7f
--- /dev/null
+++ b/.changeset/tree-list-expand-motion.md
@@ -0,0 +1,8 @@
+---
+'@astryxdesign/core': patch
+'@astryxdesign/cli': patch
+---
+
+[feat] Under a finger (a coarse primary pointer, iOS and Android alike), a `TreeList` row's children slide out from under it as it expands, with the rows below moving down alongside and the chevron turning, and slide back under it as it collapses, as in an iOS outline list. They used to appear and vanish in a single frame. The motion runs on the compositor and keeps going while the page runs script; with reduced motion on, it cross-fades instead of moving. Trees driven by a mouse are unchanged.
+
+@vjeux
diff --git a/.changeset/uikit-constants-table.md b/.changeset/uikit-constants-table.md
index 01fd41a182b0b..2c063cdb50bc7 100644
--- a/.changeset/uikit-constants-table.md
+++ b/.changeset/uikit-constants-table.md
@@ -2,6 +2,6 @@
'@astryxdesign/core': patch
---
-[chore] Internal: the UIKit constants table for touch presentations (springs, scroll physics, timing curves and navigation values), each value with its source and a checked list of the simulator measurements still owed. Not exported from the package entry point; no component reads it yet.
+[chore] Internal: the UIKit constants table for touch presentations (springs, scroll physics, timing curves and navigation values), each value with its source and a checked list of the simulator measurements still owed. Not exported from the package entry point.
@vjeux
diff --git a/.changeset/uikit-motion-animator-pseudo-element.md b/.changeset/uikit-motion-animator-pseudo-element.md
new file mode 100644
index 0000000000000..7ccb10bab35da
--- /dev/null
+++ b/.changeset/uikit-motion-animator-pseudo-element.md
@@ -0,0 +1,7 @@
+---
+'@astryxdesign/core': patch
+---
+
+[chore] Internal: the touch presentations' animator drives a pseudo-element such as a dialog's ::backdrop: a static filling animation holds its value after a curve ends and after `set`, a custom property on its host promotes it, and a Reduce Motion dip borrows and hands back the pseudo-element's own opacity. Not exported from the package entry point.
+
+@vjeux
diff --git a/.changeset/uikit-motion-animator.md b/.changeset/uikit-motion-animator.md
index d489e3022e6db..6b23ce1985186 100644
--- a/.changeset/uikit-motion-animator.md
+++ b/.changeset/uikit-motion-animator.md
@@ -2,6 +2,6 @@
'@astryxdesign/core': patch
---
-[chore] Internal: a compositor animator for touch presentations. It plays UIKit's springs, and scroll coasts (built by a separate coast module, so a surface that never coasts does not carry them; `decay` plays momentum, and sends a spring back from past an edge through the Reduce Motion policy: a cross-fade on a coarse pointer or after a touch release, at once elsewhere) as Web Animations on translate, rotate, scale and opacity, so they keep running while JavaScript is busy, and reads values and velocities back from the curves for interruption, retargeting and Reduce Motion cross-fades. Not exported from the package entry point; no component uses it yet.
+[chore] Internal: a compositor animator for touch presentations. It plays UIKit's springs, and scroll coasts (built by a separate coast module, so a surface that never coasts does not carry them; `decay` plays momentum, and sends a spring back from past an edge through the Reduce Motion policy: a cross-fade on a coarse pointer or after a touch release, at once elsewhere) as Web Animations on translate, rotate, scale and opacity, so they keep running while JavaScript is busy, and reads values and velocities back from the curves for interruption, retargeting and Reduce Motion cross-fades. Not exported from the package entry point.
@vjeux
diff --git a/.changeset/uikit-motion-math.md b/.changeset/uikit-motion-math.md
index 7af3d73a92a98..cbb9399568857 100644
--- a/.changeset/uikit-motion-math.md
+++ b/.changeset/uikit-motion-math.md
@@ -2,6 +2,6 @@
'@astryxdesign/core': patch
---
-[chore] Internal: the spring, decay, rubber-band and projection math of UIKit for touch presentations, as pure functions checked against an independent integration and against values read from UIKit. Not exported from the package entry point; no component uses it yet.
+[chore] Internal: the spring, decay, rubber-band and projection math of UIKit for touch presentations, as pure functions checked against an independent integration and against values read from UIKit. Not exported from the package entry point.
@vjeux
diff --git a/.changeset/uikit-motion-use-animator.md b/.changeset/uikit-motion-use-animator.md
new file mode 100644
index 0000000000000..b234a4e987752
--- /dev/null
+++ b/.changeset/uikit-motion-use-animator.md
@@ -0,0 +1,7 @@
+---
+'@astryxdesign/core': patch
+---
+
+[chore] Internal: useAnimator, a React wrapper around the touch presentations' animator that never re-renders per frame, and browser proofs on the interaction harness that the animator's motion keeps running through a blocked main thread in Chromium and WebKit. Not exported from the package entry point.
+
+@vjeux
diff --git a/.changeset/use-finger-scroll.md b/.changeset/use-finger-scroll.md
new file mode 100644
index 0000000000000..e48f0b171df03
--- /dev/null
+++ b/.changeset/use-finger-scroll.md
@@ -0,0 +1,7 @@
+---
+'@astryxdesign/core': patch
+---
+
+[chore] Internal: `useFingerScroll(scroller)` tells a finger's scroll from the program's, and the gestures README gains a guide to migrating a raw-touch drag onto the recognizers. Internal to the touch components: not exported from the package entry point or the gestures barrel.
+
+@vjeux
diff --git a/apps/storybook/stories/List.stories.tsx b/apps/storybook/stories/List.stories.tsx
index 881f53db5430d..9927f1e4b89e2 100644
--- a/apps/storybook/stories/List.stories.tsx
+++ b/apps/storybook/stories/List.stories.tsx
@@ -7,10 +7,11 @@
* @position Storybook demonstrations for List consumers
*/
-import {useState} from 'react';
+import {useMemo, useState} from 'react';
import * as stylex from '@stylexjs/stylex';
import type {Meta, StoryObj} from '@storybook/react';
import {List, ListItem} from '@astryxdesign/core/List';
+import {createReorderable} from '@astryxdesign/core/reorderable';
import {Avatar} from '@astryxdesign/core/Avatar';
import {Badge} from '@astryxdesign/core/Badge';
import {Card} from '@astryxdesign/core/Card';
@@ -18,6 +19,8 @@ import {Icon} from '@astryxdesign/core/Icon';
import {Switch} from '@astryxdesign/core/Switch';
import {Heading, Text} from '@astryxdesign/core/Text';
import {VStack} from '@astryxdesign/core/Layout';
+import {Button} from '@astryxdesign/core/Button';
+import {ContextMenu} from '@astryxdesign/core/ContextMenu';
import {
Cog6ToothIcon,
BellIcon,
@@ -408,3 +411,289 @@ export const HeaderInFlexParent: Story = {
},
},
};
+
+function AnimatedChangesDemo() {
+ const [rows, setRows] = useState([
+ 'Inbox',
+ 'Sent',
+ 'Drafts',
+ 'Archive',
+ 'Spam',
+ ]);
+ const [next, setNext] = useState(1);
+ return (
+
+
+ {rows.map(label => (
+ {}} />
+ ))}
+
+
+ );
+}
+
+export const AnimatedChanges: Story = {
+ render: () => ,
+ parameters: {
+ docs: {
+ description: {
+ story:
+ 'With `hasAnimatedChanges`, under a finger, ' +
+ 'rows that stay slide to their new places and new rows fade in ' +
+ 'once the rows sliding past have cleared them, on UIKit’s table ' +
+ 'update spring; a row crossing rows that move the other way ' +
+ 'rides above them with the surface color behind it.',
+ },
+ },
+ },
+};
+
+function AnimatedChangesSwipeDemo() {
+ const [rows, setRows] = useState(['Inbox', 'Sent', 'Drafts', 'Archive']);
+ return (
+
+ {rows.map(label => (
+ {}}
+ swipeActions={{
+ trailing: [
+ {
+ label: 'Delete',
+ variant: 'destructive',
+ hasRemoval: true,
+ onActivate: () =>
+ setRows(current => current.filter(row => row !== label)),
+ },
+ ],
+ }}
+ />
+ ))}
+
+ );
+}
+
+export const AnimatedChangesSwipe: Story = {
+ render: () => ,
+ parameters: {
+ docs: {
+ description: {
+ story:
+ 'With `hasAnimatedChanges`, a row swiped away with a removal ' +
+ 'action collapses in place, its action showing, while the rows ' +
+ 'below slide up into its gap on UIKit’s table update spring.',
+ },
+ },
+ },
+};
+
+function moveKey(
+ rows: ReadonlyArray,
+ key: unknown,
+ to: number,
+): string[] {
+ const next = rows.filter(row => row !== key);
+ next.splice(to, 0, key as string);
+ return next;
+}
+
+function ReorderDemo({
+ initial,
+ pinned = [],
+ edge,
+}: {
+ initial: ReadonlyArray;
+ pinned?: ReadonlyArray;
+ edge?: 'padded' | 'flush';
+}) {
+ const [rows, setRows] = useState(initial);
+ // Each move onReorder reports, counted on the list for the browser proofs:
+ // one per drop and per reorder mode move, none per cancel (spec:AST-103
+ // FR3).
+ const [moves, setMoves] = useState(0);
+ return (
+ {
+ setMoves(count => count + 1);
+ setRows(current => moveKey(current, key, to));
+ },
+ isReorderable: key => !pinned.includes(key as string),
+ })}>
+ {rows.map(label => (
+
+ ))}
+
+ );
+}
+
+export const Reorderable: Story = {
+ render: () => (
+
+ ),
+ parameters: {
+ docs: {
+ description: {
+ story:
+ 'With `reorderable` (from `createReorderable`), each row with an ' +
+ '`itemKey` gets a reorder handle. On a touch screen, hold a handle ' +
+ 'for a moment, then drag: the row dims in place, a copy follows ' +
+ 'your finger and a line marks where it will land, and the rows ' +
+ 'rearrange on release. A mouse drags a handle at once, the same ' +
+ 'way. Or activate a handle (click it, or press Space ' +
+ 'or Enter) to turn on reorder mode for its row: each arrow key, or ' +
+ 'each move in the hint below the handle, moves it a place, and ' +
+ 'Escape or Done ends the mode.',
+ },
+ },
+ },
+};
+
+export const ReorderFlush: Story = {
+ render: () => (
+
+ ),
+ parameters: {
+ docs: {
+ description: {
+ story:
+ 'With `edge="flush"` the rows have no side padding, so each ' +
+ "reorder handle ends at the row's edge, inside the list.",
+ },
+ },
+ },
+};
+
+export const ReorderWithPinnedRows: Story = {
+ render: () => (
+
+ ),
+ parameters: {
+ docs: {
+ description: {
+ story:
+ 'A row the object’s `isReorderable` rejects has no handle. At an ' +
+ 'end of the list it also bounds the others (nothing drops above ' +
+ 'Favorites); in the middle, other rows move past it.',
+ },
+ },
+ },
+};
+
+function ReorderFromYourUIDemo() {
+ const [rows, setRows] = useState([
+ 'Inbox',
+ 'Sent',
+ 'Drafts',
+ 'Archive',
+ 'Spam',
+ 'Trash',
+ ]);
+ const [selected, setSelected] = useState('Sent');
+ const reorderable = useMemo(
+ () =>
+ createReorderable({
+ onReorder: ({key, to}) => setRows(current => moveKey(current, key, to)),
+ }),
+ [],
+ );
+ return (
+
+ reorderable.start(selected)}
+ />
+ reorderable.start(selected),
+ },
+ ]}>
+
+ {rows.map(label => (
+ setSelected(label)}
+ />
+ ))}
+
+
+
+ );
+}
+
+export const ReorderFromYourUI: Story = {
+ render: () => ,
+ parameters: {
+ docs: {
+ description: {
+ story:
+ 'The object’s `start(key)` turns on reorder mode for a row from ' +
+ 'your own UI, here a button and the list’s context menu: the ' +
+ 'focus moves to the row’s handle, and its arrow keys, hint and ' +
+ 'Done work as they do from the handle.',
+ },
+ },
+ },
+};
+
+export const ReorderLongList: Story = {
+ render: () => (
+ `Item ${index + 1}`)}
+ />
+ ),
+ parameters: {
+ docs: {
+ description: {
+ story:
+ 'Dragging a row near the top or bottom of the screen scrolls the ' +
+ 'page, faster the further past the edge the row goes.',
+ },
+ },
+ },
+};
diff --git a/apps/storybook/stories/ReorderableAttach.stories.tsx b/apps/storybook/stories/ReorderableAttach.stories.tsx
new file mode 100644
index 0000000000000..e45ed56362014
--- /dev/null
+++ b/apps/storybook/stories/ReorderableAttach.stories.tsx
@@ -0,0 +1,373 @@
+// Copyright (c) Meta Platforms, Inc. and affiliates.
+
+/**
+ * @file ReorderableAttach.stories.tsx
+ * @input createReorderable and plain elements laid out by the story
+ * @output createReorderable's attach on plain elements with positions()
+ * @position Storybook demonstrations for createReorderable consumers
+ */
+
+import {useEffect, useMemo, useRef, useState} from 'react';
+import * as stylex from '@stylexjs/stylex';
+import type {Meta, StoryObj} from '@storybook/react';
+import {createReorderable} from '@astryxdesign/core/reorderable';
+import {colorVars, radiusVars} from '@astryxdesign/core/theme/tokens.stylex';
+
+const meta: Meta = {
+ title: 'Core/createReorderable',
+ parameters: {layout: 'centered'},
+};
+
+export default meta;
+type Story = StoryObj;
+
+/** Each card's slot: the centre of a 72 x 96 card, 88 px apart in a row. */
+const ROW = [0, 1, 2, 3, 4].map(index => ({
+ x: 44 + index * 88,
+ y: 56,
+ angle: 0,
+}));
+
+/**
+ * A fanned hand: five slots on an arc of radius 160 around (220, 230), 12°
+ * apart, each card turned to its slot's angle.
+ */
+const FAN = [-24, -12, 0, 12, 24].map(angle => {
+ const radians = (angle * Math.PI) / 180;
+ return {
+ x: Math.round(220 + 160 * Math.sin(radians)),
+ y: Math.round(230 - 160 * Math.cos(radians)),
+ angle,
+ };
+});
+
+function moveKey(
+ keys: ReadonlyArray,
+ key: unknown,
+ to: number,
+): string[] {
+ const next = keys.filter(each => each !== key);
+ next.splice(to, 0, key as string);
+ return next;
+}
+
+const styles = stylex.create({
+ dialog: {
+ padding: 24,
+ borderWidth: 1,
+ borderStyle: 'solid',
+ borderColor: colorVars['--color-border'],
+ borderRadius: radiusVars['--radius-container'],
+ backgroundColor: colorVars['--color-background-surface'],
+ color: colorVars['--color-text-primary'],
+ },
+ table: {
+ position: 'relative',
+ inlineSize: 88 * 5,
+ blockSize: 112,
+ },
+ fanTable: {
+ blockSize: 160,
+ },
+ // Laid out by CSS, not by positions(): the measured layout decides.
+ wrapTable: {
+ display: 'flex',
+ flexWrap: 'wrap',
+ gap: 16,
+ inlineSize: 72 * 3 + 16 * 2,
+ blockSize: 'auto',
+ },
+ flowCard: {
+ position: 'relative',
+ },
+ rows: {
+ display: 'flex',
+ flexDirection: 'column',
+ inlineSize: 280,
+ margin: 0,
+ padding: 0,
+ },
+ row: {
+ position: 'relative',
+ display: 'flex',
+ alignItems: 'center',
+ blockSize: 44,
+ paddingInlineStart: 40,
+ borderBlockEndWidth: 1,
+ borderBlockEndStyle: 'solid',
+ borderBlockEndColor: colorVars['--color-border'],
+ color: colorVars['--color-text-primary'],
+ },
+ card: {
+ position: 'absolute',
+ boxSizing: 'border-box',
+ inlineSize: 72,
+ blockSize: 96,
+ display: 'flex',
+ flexDirection: 'column',
+ alignItems: 'center',
+ justifyContent: 'center',
+ borderRadius: radiusVars['--radius-container'],
+ borderWidth: 1,
+ borderStyle: 'solid',
+ borderColor: colorVars['--color-border'],
+ backgroundColor: colorVars['--color-background-card'],
+ color: colorVars['--color-text-primary'],
+ fontSize: 24,
+ },
+ slot: (x: number, y: number, angle: number) => ({
+ insetInlineStart: x - 36,
+ top: y - 48,
+ rotate: `${angle}deg`,
+ }),
+ // At the card's top-left corner, the part of each card a fanned hand
+ // leaves showing.
+ grip: {
+ position: 'absolute',
+ top: 4,
+ insetInlineStart: 4,
+ inlineSize: 28,
+ blockSize: 20,
+ borderRadius: 4,
+ color: colorVars['--color-icon-secondary'],
+ fontSize: 14,
+ lineHeight: '20px',
+ textAlign: 'center',
+ cursor: 'grab',
+ },
+});
+
+/**
+ * Plain elements, laid out by the app, reordered through
+ * `reorderable.attach`: each card's grip is its handle, and `positions()`
+ * gives each card's slot (spec:AST-103 FR1, FR4b).
+ */
+function AttachedCards({
+ slots,
+ rendersAnew = false,
+}: {
+ /** Each card's slot; without it, the cards wrap and are measured. */
+ slots?: ReadonlyArray<{x: number; y: number; angle: number}>;
+ /** Each move renders every card anew: new elements, the same keys. */
+ rendersAnew?: boolean;
+}) {
+ const tableRef = useRef(null);
+ const [cards, setCards] = useState(['A', 'K', 'Q', 'J', '10']);
+ const [moves, setMoves] = useState(0);
+ const reorderable = useMemo(
+ () =>
+ createReorderable({
+ onReorder: ({key, to}) => {
+ setMoves(count => count + 1);
+ setCards(current => moveKey(current, key, to));
+ },
+ positions: slots == null ? undefined : () => slots,
+ }),
+ [slots],
+ );
+ // External system: the attached reorder on the table's plain elements,
+ // detached on unmount.
+ useEffect(() => {
+ const table = tableRef.current;
+ if (table == null) {
+ return undefined;
+ }
+ const {detach} = reorderable.attach(table, {
+ items: () =>
+ Array.from(table.querySelectorAll('[data-card]')).map(
+ element => ({
+ key: element.dataset.card,
+ element,
+ handle:
+ element.querySelector('[data-grip]') ?? element,
+ }),
+ ),
+ });
+ return detach;
+ }, [reorderable]);
+ return (
+
+ {cards.map((card, index) => (
+
+ {card}
+
+ ⋮⋮
+
+
+ ))}
+
+ );
+}
+
+export const AttachedCardsInARow: Story = {
+ render: () => ,
+ parameters: {
+ docs: {
+ description: {
+ story:
+ 'Plain elements reorder through `reorderable.attach(container, ' +
+ '{items})`, with no collection component: each card’s grip is its ' +
+ 'handle, and `positions()` gives each card’s slot. Drag a grip (on ' +
+ 'a touch screen, hold it first), or activate it and use the arrow ' +
+ 'keys.',
+ },
+ },
+ },
+};
+
+export const AttachedCardsInAFan: Story = {
+ render: () => ,
+ parameters: {
+ docs: {
+ description: {
+ story:
+ 'A fanned hand: `positions()` gives each card a slot on an arc, and ' +
+ 'a dragged card drops on the slot whose centre is nearest its own.',
+ },
+ },
+ },
+};
+
+export const AttachedCardsRenderedAnew: Story = {
+ render: () => ,
+ parameters: {
+ docs: {
+ description: {
+ story:
+ 'An app that renders every card anew on each move (new elements, ' +
+ 'the same keys): reorder mode and the focus stay on the moved ' +
+ 'card’s grip.',
+ },
+ },
+ },
+};
+
+export const AttachedCardsWrapping: Story = {
+ render: () => ,
+ parameters: {
+ docs: {
+ description: {
+ story:
+ 'Cards that wrap by CSS, with no `positions()`: their measured ' +
+ 'places are the slots a drag drops on, and the arrow keys follow ' +
+ 'their rows and columns.',
+ },
+ },
+ },
+};
+
+/** A column of plain rows reordered through attach, with no positions(). */
+function AttachedRows() {
+ const listRef = useRef(null);
+ const [rows, setRows] = useState(['Inbox', 'Sent', 'Drafts', 'Archive']);
+ const [moves, setMoves] = useState(0);
+ const reorderable = useMemo(
+ () =>
+ createReorderable({
+ onReorder: ({key, to}) => {
+ setMoves(count => count + 1);
+ setRows(current => moveKey(current, key, to));
+ },
+ }),
+ [],
+ );
+ // External system: the attached reorder on the list's plain rows,
+ // detached on unmount.
+ useEffect(() => {
+ const list = listRef.current;
+ if (list == null) {
+ return undefined;
+ }
+ const {detach} = reorderable.attach(list, {
+ items: () =>
+ Array.from(list.querySelectorAll('[data-row]')).map(
+ element => ({
+ key: element.dataset.row,
+ element,
+ handle:
+ element.querySelector('[data-grip]') ?? element,
+ }),
+ ),
+ });
+ return detach;
+ }, [reorderable]);
+ return (
+