diff --git a/.changeset/input-hold-entrance-end.md b/.changeset/input-hold-entrance-end.md new file mode 100644 index 0000000000000..142a5a2323f52 --- /dev/null +++ b/.changeset/input-hold-entrance-end.md @@ -0,0 +1,7 @@ +--- +'@astryxdesign/core': patch +--- + +[fix] Layer: under a finger, a tap or a pan outside a menu acts from the first frame the page draws after the menu's entrance ends, even when the page's timers run late. The input hold no longer covers the page until those timers run. + +@vjeux diff --git a/docs/architecture/layer-runtime.md b/docs/architecture/layer-runtime.md index 33e46f3d56393..82ba5c97df449 100644 --- a/docs/architecture/layer-runtime.md +++ b/docs/architecture/layer-runtime.md @@ -690,7 +690,10 @@ layers use Layer rendering without joining Escape/platform dismissal. shared input hold, `holdInput` (`Layer/inputHold.ts`), that keeps input away from a layer while its presentation runs under a finger. Layers that enter through CSS (Dialog, Drawer, MobileNav, DropdownMenu) take it through `holdEntranceInput` - (`Layer/holdEntranceInput.ts`). While a layer presents (`spec:AST-094` + (`Layer/holdEntranceInput.ts`). A presenting hold ends where its entrance + ends on screen. The motion animator publishes each run's curve end through + `motion/curveEnds.ts`, and the hold judges a press against it + (`spec:AST-094` FR35). While a layer presents (`spec:AST-094` FR35), the hold takes pointer input only: a shield catches taps and presses, a pinch still zooms the page, and keys and assistive technology stay live. While a layer dismisses, the hold also makes the layer's content inert. A diff --git a/packages/core/src/DropdownMenu/__tests__/DropdownMenuEntranceHold.interaction.browser.spec.ts b/packages/core/src/DropdownMenu/__tests__/DropdownMenuEntranceHold.interaction.browser.spec.ts index 30b53d01beff8..ed1c74654e1a1 100644 --- a/packages/core/src/DropdownMenu/__tests__/DropdownMenuEntranceHold.interaction.browser.spec.ts +++ b/packages/core/src/DropdownMenu/__tests__/DropdownMenuEntranceHold.interaction.browser.spec.ts @@ -342,6 +342,154 @@ test('after a finger opens the menu, a mouse that moves onto another row while t expect(await readPicked(page)).toEqual(['Duplicate']); }); +/** + * Holds the page's timer callbacks that come due until `releaseLateTimers`, + * as a busy main thread leaves them, while frames keep running. Install it + * before the story loads, so the page's own timers go through it. + */ +async function installLateTimers(page: Page) { + await page.addInitScript(() => { + const realTimeout = window.setTimeout.bind(window); + const queue: (() => void)[] = []; + const late = {isHolding: false, queue}; + (window as unknown as {__lateTimers: typeof late}).__lateTimers = late; + window.setTimeout = (( + handler: TimerHandler, + ms?: number, + ...args: unknown[] + ) => + realTimeout(() => { + const run = () => { + if (typeof handler === 'function') { + handler(...args); + } + }; + if (late.isHolding) { + queue.push(run); + } else { + run(); + } + }, ms)) as typeof window.setTimeout; + }); +} + +const holdLateTimers = async (page: Page) => + page.evaluate(() => { + ( + window as unknown as {__lateTimers: {isHolding: boolean}} + ).__lateTimers.isHolding = true; + }); + +const releaseLateTimers = async (page: Page) => + page.evaluate(() => { + const late = ( + window as unknown as { + __lateTimers: {isHolding: boolean; queue: (() => void)[]}; + } + ).__lateTimers; + late.isHolding = false; + for (const run of late.queue.splice(0)) { + run(); + } + }); + +/** + * Waits until the menu's surface draws the same box for three frames in a + * row: the entrance is at rest on screen, whatever its timers do. + */ +async function untilDrawnAtRest(page: Page, layer: Locator) { + const surface = layer.locator('> *').first(); + let last = ''; + let still = 0; + for (let frame = 0; frame < 600 && still < 3; frame++) { + await frames(page, 1); + const box = await boxOf(surface); + const now = [box.x, box.y, box.width, box.height] + .map(value => value.toFixed(1)) + .join(','); + still = now === last ? still + 1 : 0; + last = now; + } + if (still < 3) { + throw new Error('the menu never came to rest'); + } +} + +test("once the menu is drawn at rest, a tap outside dismisses it while the page's timers run late: the hold ends with the frame that draws the entrance's end (spec:AST-094 FR35)", async ({ + page, +}) => { + await installLateTimers(page); + await openStory(page, storybook(), 'core-dropdownmenu--default'); + const driver = await touchDriver(page); + const trigger = page.getByRole('button', {name: 'Actions'}); + const box = await boxOf(trigger); + await driver.tap({ + x: Math.round(box.x + box.width / 2), + y: Math.round(box.y + box.height / 2), + }); + await expect(trigger).toHaveAttribute('aria-expanded', 'true'); + const layer = menuLayer(page); + await untilEntering(page, layer); + // From inside the entrance, no timer callback runs until the end of the + // test, as on a main thread busy with other work. + await holdLateTimers(page); + await untilDrawnAtRest(page, layer); + const viewport = page.viewportSize() ?? {width: 402, height: 714}; + await driver.tap({x: 20, y: viewport.height - 20}); + await expect(trigger).toHaveAttribute('aria-expanded', 'false', { + timeout: 2000, + }); + await releaseLateTimers(page); +}); + +test("once the menu is drawn at rest, a pan outside scrolls the page while the page's timers run late (spec:AST-094 FR35)", async ({ + page, + browserName, +}) => { + test.skip( + browserName !== 'chromium', + 'a scripted touch scrolls the page only through Chromium\u2019s input pipeline', + ); + await installLateTimers(page); + await openStory(page, storybook(), 'core-dropdownmenu--default'); + // A page taller than the screen, so a pan can scroll it. + await page.evaluate(() => { + const tall = document.createElement('div'); + Object.assign(tall.style, { + position: 'absolute', + top: '0', + left: '0', + width: '1px', + height: '4000px', + }); + document.body.append(tall); + }); + const driver = await touchDriver(page); + const trigger = page.getByRole('button', {name: 'Actions'}); + const box = await boxOf(trigger); + await driver.tap({ + x: Math.round(box.x + box.width / 2), + y: Math.round(box.y + box.height / 2), + }); + await expect(trigger).toHaveAttribute('aria-expanded', 'true'); + const layer = menuLayer(page); + await untilEntering(page, layer); + await holdLateTimers(page); + await untilDrawnAtRest(page, layer); + const viewport = page.viewportSize() ?? {width: 402, height: 714}; + const start = {x: 20, y: viewport.height - 40}; + const finger = await driver.press(start); + for (let step = 1; step <= 10; step++) { + await finger.move({x: start.x, y: start.y - 20 * step}); + await frames(page, 1); + } + await finger.lift(); + await expect + .poll(async () => page.evaluate(() => window.scrollY), {timeout: 2000}) + .toBeGreaterThan(0); + await releaseLateTimers(page); +}); + test.describe('under a desktop mouse', () => { test.use({ isMobile: false, diff --git a/packages/core/src/Layer/inputHold.test.tsx b/packages/core/src/Layer/inputHold.test.tsx index f676dd435e6b7..39c816645ea3e 100644 --- a/packages/core/src/Layer/inputHold.test.tsx +++ b/packages/core/src/Layer/inputHold.test.tsx @@ -13,6 +13,7 @@ import {act} from '@testing-library/react'; import {GestureHost} from '../gestures/GestureHost'; import {layerRootProps} from '../privateAttributes/layerRoot.stylex'; import {subscribeInput} from '../utils/inputStream'; +import {realmValue, sharedKey} from '../utils/sharedRealm'; import { holdInput, holdsTouch, @@ -382,6 +383,237 @@ describe("holdInput decides by each event's pointer (spec:AST-094 FR35)", () => pointer(document.body, 'pointerup', 'mouse'); }); + /** + * The animator's shared curve ends (motion/curveEnds.ts), read by its key + * as another copy of Core would. + */ + const curveEndsByKey = () => + realmValue( + sharedKey('motion/curve-ends/curve-ends', 1), + () => new WeakMap(), + ); + + /** + * Gives `layer` the running animations `entrances` lists. A case moves an + * entrance's end by setting its `endTime`. + */ + function entering( + layer: Element, + entrances: {startTime: number | null; endTime: number}[], + ) { + const animations = entrances.map(({startTime, endTime}) => { + const animation = { + startTime, + endTime, + playbackRate: 1, + ready: Promise.resolve(), + effect: {getComputedTiming: () => ({endTime: animation.endTime})}, + }; + return animation; + }); + Object.defineProperty(layer, 'getAnimations', { + configurable: true, + value: () => animations, + }); + return animations; + } + + /** + * The Web Animations API that the entrance's end marker uses, faked on + * `clock`. `finishMarkers` runs each marker whose end the clock has reached, + * as the frame at that time would. + */ + function fakeMarkers(clock: {time: number}) { + interface Marker { + effect: {timing: {delay: number}}; + startTime: number | null; + onfinish: (() => void) | null; + } + const markers: Marker[] = []; + vi.stubGlobal( + 'KeyframeEffect', + class { + constructor( + readonly target: null, + readonly frames: null, + readonly timing: {delay: number}, + ) {} + }, + ); + vi.stubGlobal( + 'Animation', + class { + startTime: number | null = null; + onfinish: (() => void) | null = null; + constructor(readonly effect: {timing: {delay: number}}) {} + play() { + markers.push(this); + } + }, + ); + const timeline = { + get currentTime() { + return clock.time; + }, + }; + Object.defineProperty(document, 'timeline', { + configurable: true, + value: timeline, + }); + const finishMarkers = () => { + for (const marker of [...markers]) { + const end = (marker.startTime ?? Infinity) + marker.effect.timing.delay; + if (clock.time >= end) { + markers.splice(markers.indexOf(marker), 1); + marker.onfinish?.(); + } + } + }; + const restore = () => { + vi.unstubAllGlobals(); + delete (document as {timeline?: unknown}).timeline; + }; + return {finishMarkers, restore}; + } + + /** Lets the hold's readiness promises settle. */ + const settle = async () => { + for (let index = 0; index < 4; index += 1) { + await Promise.resolve(); + } + }; + + it("keeps a presenting hold past its entrance's first end when the entrance moves its end later, and ends it in the frame that reaches the new end (spec:AST-094 FR35)", async () => { + const clock = clockAt(0); + const {finishMarkers, restore} = fakeMarkers(clock); + try { + const {layer} = mountLayer(); + const [entrance] = entering(layer, [{startTime: 0, endTime: 300}]); + hold(layer); + await settle(); + // A retarget moves the entrance's end later, before its first end. + entrance.endTime = 500; + clock.time = 300; + finishMarkers(); + const below = recorder(); + const during = pointer(below.button, 'pointerdown', 'touch', 1, 1, 350); + expect(during.defaultPrevented).toBe(true); + expect(below.reached).toEqual([]); + pointer(below.button, 'pointerup', 'touch', 1, 0, 360); + clock.time = 500; + finishMarkers(); + expect(layer.querySelector('[aria-hidden="true"]')).toBeNull(); + } finally { + restore(); + } + }); + + it('ends no later hold on the layer with the end marker of an entrance that a close cancelled: a marker ends only the hold it was armed for (spec:AST-094 FR35)', async () => { + const clock = clockAt(0); + const {finishMarkers, restore} = fakeMarkers(clock); + try { + const {layer} = mountLayer(); + entering(layer, [{startTime: 0, endTime: 300}]); + let cancel = () => {}; + releases.push( + holdInput(layer, { + until: new Promise(resolve => { + cancel = resolve; + }), + scope: 'viewport', + }), + ); + await settle(); + // A close during the entrance cancels it. Its hold ends, and the shield + // goes with it. + clock.time = 100; + cancel(); + await settle(); + expect(layer.querySelector('[aria-hidden="true"]')).toBeNull(); + // The menu opens again, with an entrance from 150 to 450. + clock.time = 150; + entering(layer, [{startTime: 150, endTime: 450}]); + hold(layer); + await settle(); + // The first entrance's marker comes due while the new one runs. + clock.time = 300; + finishMarkers(); + const below = recorder(); + const during = pointer(below.button, 'pointerdown', 'touch', 1, 1, 320); + expect(during.defaultPrevented).toBe(true); + expect(below.reached).toEqual([]); + } finally { + restore(); + } + }); + + it("ends a presenting hold at a press stamped after the layer's entrance ended on screen, though the hold's own release has not run: the press reaches the page (spec:AST-094 FR35)", () => { + clockAt(1000); + const {layer} = mountLayer(); + // An entrance from 0 to 300 on the page's clock; the hold's release waits + // on a promise a busy main thread has not settled. + entering(layer, [{startTime: 0, endTime: 300}]); + hold(layer); + const below = recorder(); + // While it enters, a press is held. + const during = pointer(below.button, 'pointerdown', 'touch', 1, 1, 200); + expect(during.defaultPrevented).toBe(true); + expect(below.reached).toEqual([]); + pointer(below.button, 'pointerup', 'touch', 1, 0, 210); + // After it, a press is the page's, and the shield is gone. + const after = pointer(below.button, 'pointerdown', 'touch', 2, 1, 400); + expect(after.defaultPrevented).toBe(false); + expect(below.reached).toContain('pointerdown'); + expect(layer.querySelector('[aria-hidden="true"]')).toBeNull(); + }); + + it("reads an animator run's entrance end from the animator's curve end, not from the end-value tail its effect plays on past it (spec:AST-094 FR35)", () => { + clockAt(1000); + const {layer} = mountLayer(); + // An animator run: its effect ends a minute after its curve. + const [run] = entering(layer, [{startTime: 0, endTime: 60_300}]); + curveEndsByKey().set(run, 300); + hold(layer); + const below = recorder(); + const after = pointer(below.button, 'pointerdown', 'touch', 1, 1, 400); + expect(after.defaultPrevented).toBe(false); + expect(below.reached).toContain('pointerdown'); + }); + + it("ends a presenting hold on an animator handle at a press stamped after the handle's curves end, with no animation left on the layer (spec:AST-094 FR35)", () => { + clockAt(1000); + const {layer} = mountLayer(); + const handle = {finished: new Promise(() => {})}; + curveEndsByKey().set(handle, 300); + releases.push(holdInput(layer, {until: handle, scope: 'viewport'})); + const below = recorder(); + const after = pointer(below.button, 'pointerdown', 'touch', 1, 1, 400); + expect(after.defaultPrevented).toBe(false); + expect(below.reached).toContain('pointerdown'); + }); + + it('keeps a presenting hold at a press while the entrance on the layer has not started: the browser has not given its start (spec:AST-094 FR35)', () => { + clockAt(1000); + const {layer} = mountLayer(); + entering(layer, [{startTime: null, endTime: 300}]); + hold(layer); + const below = recorder(); + const after = pointer(below.button, 'pointerdown', 'touch', 1, 1, 400); + expect(after.defaultPrevented).toBe(true); + expect(below.reached).toEqual([]); + }); + + it('keeps a presenting hold at a press while an animation on the layer has no end it can read: its release decides (spec:AST-094 FR35)', () => { + clockAt(1000); + const {layer} = mountLayer(); + entering(layer, [{startTime: 0, endTime: Infinity}]); + hold(layer); + const below = recorder(); + const after = pointer(below.button, 'pointerdown', 'touch', 1, 1, 400); + expect(after.defaultPrevented).toBe(true); + expect(below.reached).toEqual([]); + }); + /** A button that records every event that reaches it. */ function recorder(parent: Element = document.body) { const button = document.createElement('button'); diff --git a/packages/core/src/Layer/inputHold.ts b/packages/core/src/Layer/inputHold.ts index 46b019b0903ee..8e8096d4139bc 100644 --- a/packages/core/src/Layer/inputHold.ts +++ b/packages/core/src/Layer/inputHold.ts @@ -5,7 +5,8 @@ /** * @file inputHold.ts * @input A layer root, what ends its hold (a promise or an animator handle), - * and the hold's scope + * the hold's scope, and when the entrance on the layer ends on screen (its + * animations, with the curve ends the motion animator shares) * @output holdInput, holdsTouch, isInHeldLayer, isInputShield, LATE_PRESS_MS * and LATE_RELEASE_FRAMES: input held away from a layer while it presents * or dismisses, or while it dismisses with focus kept inside @@ -32,6 +33,7 @@ import {timeOn} from '../utils/inputAge'; import {isDocument, isElement, isHTMLElement, isNode} from '../utils/nodeType'; import {observeMutations} from '../utils/sharedMutationObserver'; import {realmValue, sharedKey} from '../utils/sharedRealm'; +import {curveEnds} from '../motion/curveEnds'; import {FOCUSABLE_SELECTOR} from '../hooks/focusableSelector'; import { hasLayerRootWithin, @@ -88,6 +90,12 @@ interface HeldLayer { * last heard it, until its press ends. */ pressOpenings: Set; + /** + * The layer's presenting holds (`'viewport'` and `'surface'`): each + * one's end, which takes the time its presentation ended, and what it + * waits on. A copy of Core without them leaves this unset. + */ + presentations?: Map<(endedAt?: number) => void, InputHoldEnd>; } /** A document while any of its layers is held. */ @@ -540,7 +548,7 @@ export function holdInput( const clock = layer.ownerDocument.defaultView?.performance; const from = clock?.now() ?? 0; let isReleased = false; - const release = () => { + const endHold = (endedAt?: number) => { if (isReleased) { return; } @@ -549,9 +557,10 @@ export function holdInput( if (current == null) { return; } + current.presentations?.delete(endHold); pressHolds .get(layer.ownerDocument) - ?.ended({layer, scope, from, to: clock?.now() ?? from}); + ?.ended({layer, scope, from, to: endedAt ?? clock?.now() ?? from}); if (scope === 'viewport') { current.viewport -= 1; } else if (scope === 'surface') { @@ -576,11 +585,139 @@ export function holdInput( stopHolding(layer); } }; + if (scope !== 'layer') { + (state.presentations ??= new Map()).set(endHold, until); + armEntranceEnd(layer, endHold, until); + } + const release = () => { + endHold(); + }; const end = 'finished' in until ? until.finished : until; void Promise.resolve(end).then(release, release); return release; } +/** + * When the entrance on `layer` ends on screen: the latest end of the + * animations on it and in it. An animator run ends where its curve ends, not + * at the end of the held tail after it. Null while none runs, or while any + * one has no end that can be read: one not started yet, one that repeats + * without end (a spinner in the menu), or one played backward. Then the hold + * waits for its own release. + */ +function entranceEndOf(layer: Element): number | null { + const animations = + typeof layer.getAnimations === 'function' + ? layer.getAnimations({subtree: true}) + : []; + let latest: number | null = null; + for (const animation of animations) { + // An animation the browser has not started yet has not begun to enter. + const end = + animation.startTime == null + ? null + : (curveEnds.get(animation) ?? scheduledEndOf(animation)); + if (end == null) { + return null; + } + latest = latest == null ? end : Math.max(latest, end); + } + return latest; +} + +/** Where an animation's effect ends on its timeline, when it plays forward. */ +function scheduledEndOf(animation: Animation): number | null { + const start = animation.startTime; + const end = animation.effect?.getComputedTiming().endTime; + if (start == null || end == null || animation.playbackRate !== 1) { + return null; + } + const at = Number(start) + Number(end); + return Number.isFinite(at) ? at : null; +} + +/** + * Ends each presenting hold in `doc` whose entrance ended on screen before + * `time`. A press then is not the entrance's, though the hold's own release + * has not run: a busy main thread runs a release late. + */ +function endEnteredPresentations(doc: Document, time: number): void { + for (const layer of liveLayers(doc)) { + const presentations = held.get(layer)?.presentations; + if (presentations == null || presentations.size === 0) { + continue; + } + for (const [endHold, until] of [...presentations]) { + // A hold on an animator handle ends with its curves, whether or not an + // animation is still on the layer. + const end = + (typeof until === 'object' ? curveEnds.get(until) : undefined) ?? + entranceEndOf(layer); + if (end != null && time >= end) { + endHold(end); + } + } + } +} + +/** + * Ends a presenting hold in the first frame past its entrance's end, though + * the page's timers run late and the hold's release with them. A marker + * animation with no target waits out the entrance in its delay, so it asks + * for no frame before that end. Each look reads the end again: a retargeted + * entrance moves it. A marker ends only the hold it was armed for. + */ +function armEntranceEnd( + layer: Element, + endHold: (endedAt?: number) => void, + until: InputHoldEnd, +): void { + const timeline = layer.ownerDocument.timeline; + if ( + timeline == null || + typeof layer.getAnimations !== 'function' || + typeof Animation !== 'function' || + typeof KeyframeEffect !== 'function' + ) { + return; + } + const look = () => { + if (held.get(layer)?.presentations?.has(endHold) !== true) { + return; + } + const end = + (typeof until === 'object' ? curveEnds.get(until) : undefined) ?? + entranceEndOf(layer); + const now = timeline.currentTime; + if (end == null || typeof now !== 'number') { + return; + } + if (now >= end) { + endHold(end); + return; + } + try { + const marker = new Animation( + new KeyframeEffect(null, null, {delay: end - now, duration: 0}), + timeline, + ); + marker.onfinish = look; + marker.play(); + // Started now, not at the next commit, so it ends on the entrance's + // clock. + marker.startTime = now; + } catch { + // An engine without a full Web Animations API: a press ends the hold. + } + }; + // The entrance's start times are known once its animations are ready. A + // cancelled entrance rejects, and its hold's own release ends the hold. + const ready = layer + .getAnimations({subtree: true}) + .map(async animation => animation.ready); + void Promise.all(ready).then(look, () => {}); +} + /** The keys a dismissing layer that keeps focus lets through. */ const KEPT_INSIDE_KEYS: ReadonlySet = new Set(['Tab']); @@ -1114,6 +1251,9 @@ function createPressHold(doc: Document): PressHold | null { const onPointer = (event: Event): boolean => { const {pointerId, pointerType, type} = event as PointerEvent; const time = timeOfInput(event); + if (type === 'pointerdown') { + endEnteredPresentations(doc, time); + } noteInputAt(time); if ( HELD_POINTERS.has(pointerType) && @@ -1175,6 +1315,9 @@ function createPressHold(doc: Document): PressHold | null { const onTouch = (event: Event): boolean => { const {changedTouches, touches: down, type} = event as TouchEvent; const time = timeOfInput(event); + if (type === 'touchstart') { + endEnteredPresentations(doc, time); + } noteInputAt(time); const changed = Array.from(changedTouches); if (type === 'touchstart') { diff --git a/packages/core/src/motion/animator.ts b/packages/core/src/motion/animator.ts index 80e0f950d1591..6ef4691920c13 100644 --- a/packages/core/src/motion/animator.ts +++ b/packages/core/src/motion/animator.ts @@ -205,6 +205,7 @@ import { import {planReducedMotion, type ReducedMotionView} from './reducedMotionPlan'; import {reducesMotion} from '../privateAttributes/reducedMotion.stylex'; import {devWarn} from '../utils/devWarning'; +import {curveEnds} from './curveEnds'; declare const process: {readonly env: {readonly NODE_ENV?: string}}; @@ -2300,6 +2301,7 @@ export function createMotionEngine( releaseIdentity(channel); flushReleases(); }; + curveEnds.set(animation, end); retireTimers.set(channel, setTimeout(retire, Math.max(0, end - now()))); if (requestFrame != null) { // Frames start looking a frame before the end, so the frame that @@ -3356,6 +3358,16 @@ export function createMotionEngine( ), ), }; + if (!settlesWithLanding && end > time) { + // Read from the start the browser gives: a block before the first frame + // moves it later. + void handle.started.then( + start => { + curveEnds.set(handle, start + (end - time)); + }, + () => {}, + ); + } return handle; }; diff --git a/packages/core/src/motion/curveEnds.ts b/packages/core/src/motion/curveEnds.ts new file mode 100644 index 0000000000000..cb40ac9eea971 --- /dev/null +++ b/packages/core/src/motion/curveEnds.ts @@ -0,0 +1,23 @@ +// Copyright (c) Meta Platforms, Inc. and affiliates. + +/** + * @file curveEnds.ts + * @input An animator animation or handle, and when its curves end + * @output curveEnds: when each one's curves end, on the motion clock + * @position The motion animator (animator.ts) writes it as it plays a run; + * the input hold (Layer/inputHold.ts) reads it to end a touch entrance's + * hold on screen. A module of its own, so the hold reads it without + * pulling in the animator. + */ + +import {sharedWeakMap} from '../utils/sharedRealm'; + +/** + * When each running animator animation's curve ends, and when each handle's + * curves end once its start is known. An animation's effect runs on past that + * end, holding the end value, so its own timing does not tell. + */ +export const curveEnds = sharedWeakMap( + 'motion/curve-ends/curve-ends', + 1, +); diff --git a/scripts/snap-paging-bundle.test.mjs b/scripts/snap-paging-bundle.test.mjs index 5f16fb39a28df..7d81fde786063 100644 --- a/scripts/snap-paging-bundle.test.mjs +++ b/scripts/snap-paging-bundle.test.mjs @@ -33,7 +33,7 @@ const PAGER_CODE = new RegExp( 'hooks/usePager\\.ts', 'SnapPaging/SnapPaging\\.ts', 'gestures/', - 'motion/(animator|paging|presentation|projection|reducedMotionPlan|resolveMotion|resolveSnapPoint|roleValue|rubberBand|spring|themeTempo)\\.ts', + 'motion/(animator|curveEnds|paging|presentation|projection|reducedMotionPlan|resolveMotion|resolveSnapPoint|roleValue|rubberBand|spring|themeTempo)\\.ts', 'motion/uikit/(gestures|paging|scroll)\\.ts', 'Layer/inputHold\\.ts', // primaryClick and isApplePlatform are the press controller's too.