@keepsnappy/appium-driver 0.1.0-alpha.22 → 0.1.0-alpha.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -63,9 +63,11 @@ await scrollCycles(t, {
63
63
  });
64
64
  ```
65
65
 
66
- `scrollList(t, { list, row, field, screen, above }, toward, { cache, hold })` is the one way the driver scrolls a list; every helper below sends its gesture through it. With `mustMove` (a to-top pass, the first fling of an end pass) the gesture is checked: one the device did not take (Android: no view-scrolled event; iOS: the held row's frame unchanged) is confirmed by the row ids inside the list's frame, sent once more and counted in the driver log's `defects`; a second one throws `GestureNotTaken`. Every list gesture is one touch, `FLING`, on both platforms: from 85 % of the list frame to 25 % (toward the end) or from 30 % to 90 % (toward the top), i.e. 60 % of the list, at least 250 dp (Android) or pt (iOS), held for 150 ms. Android sends it as a native UiAutomator fling over that span at the speed that makes it last 150 ms (density cached per driver), iOS as a 150 ms drag. A touch that would reach into the bottom system-gesture zone or past the window's top moves whole; its start stays at least 10 % of the list inside the list's frame, and a touch that still does not fit is cut and logs `clamped: true` and `travel`. An app takes a touch as a pan 19–60 ms after it lands, so a shorter touch can move nothing. `longScroll` is that gesture on a given rectangle. `flingUntilShown` stops when any part of the target shows: three gestures maximum, five toward the top on iOS. `scrollUntilShown` exposes the same capped look/move loop for custom checks. `waitCoasted` waits for two matching row frames 300 ms apart (up to 3000 ms); `holdBeforeScroll` captures a row before an iOS gesture so coast checks can reuse its handle.
66
+ `scrollList(t, { list, row, field, screen, above }, toward, { cache, hold })` is the one way the driver scrolls a list; every helper below sends its gesture through it. With `mustMove` (a to-top pass, the first fling of an end pass) the gesture is checked: one the device did not take (the held row's frame unchanged, both platforms) is confirmed by the row ids inside the list's frame, sent once more and counted in the driver log's `defects`; a second one throws `GestureNotTaken`. Every list gesture is one touch, `FLING`, on both platforms: from 85 % of the list frame to 25 % (toward the end) or from 30 % to 90 % (toward the top), i.e. 60 % of the list, at least 250 dp (Android) or pt (iOS), held for 150 ms. Android sends it as a native UiAutomator `mobile: swipeGesture` over that span at the speed that makes it last 150 ms (density cached per driver; a swipe answers when the finger lifts, a fling waits about 5 s for a scroll event), iOS as a 150 ms drag. A touch that would reach into the bottom system-gesture zone or past the window's top moves whole; its start stays at least 10 % of the list inside the list's frame, and a touch that still does not fit is cut and logs `clamped: true` and `travel`. An app takes a touch as a pan 19–60 ms after it lands, so a shorter touch can move nothing. `longScroll` is that gesture on a given rectangle. In a measured step `flingUntilShown` stops when any part of the target shows: three gestures maximum, five toward the top on iOS. `scrollUntilShown` exposes the same capped look/move loop for custom checks. `waitCoasted` waits for two matching row frames 300 ms apart (up to 3000 ms); `holdBeforeScroll` captures a row before an iOS gesture so coast checks can reuse its handle.
67
67
 
68
- `scrollToEnd` performs three long scrolls. Each page marker starts a 3000 ms load wait after coast stops (6000 ms Android, 10000 ms iOS); scrolls without a page marker pause 500 ms. Supply `beforePages` to permit exactly one additional fling when the loaded end was missed. `scrollCycles` repeats three end/top pairs, waiting for page markers only in cycle one and checking `lastPage` loaded in every cycle. `pageNumbers` preserves numeric page labels in command summaries; otherwise summaries use selector descriptions. Page sizes and seed data stay in the journey's page selectors. Options expose the counts and timeouts; their defaults are exported constants. `frameTimeoutMs` (20000) bounds the wait for the list frame to stop moving, `checkTimeoutMs` (20000) bounds a step check (`passChecked`, `endChecked`; in `scrollCycles` the top check reads `fling.checkTimeoutMs`), and `lookWindowMs` (1000) is the window in which a look after a gesture is retried. The `lookMs` field in the log stays the cumulative time spent looking.
68
+ `scrollToEnd` performs three long scrolls and no other: never a catch-up gesture. Each page marker starts a 3000 ms load wait after coast stops (6000 ms Android, 10000 ms iOS); scrolls without a page marker pause 500 ms. A page that has not landed fails the pass, or with `deferPages` is logged (`landed`) and left to navigation. `scrollCycles` repeats three end/top pairs, each step a fixed count of the measured gesture (3 toward the end, 2 toward the top), waiting for page markers only in cycle one; after each step a navigation pass finishes the way and the end check (`lastPage` loaded) and top check run.
69
+
70
+ Navigation passes (`navigate`, `Session.navigation`): getting somewhere — to the top, to the loaded end, a target into view — is not a measured gesture. A pass is wrapped in `nav` start/end markers, outside any measured step, and its list gestures are the navigation stroke (`NAV_STROKE`: a 100 ms slow move the app takes as a pan, then a 45 ms flick, one W3C actions call on both platforms). It ends when the target is found by lookup and the list's first and last rows are unchanged 300 ms apart, never on a frame test; two strokes that leave them as they were throw `NavigationStuck`. `flingUntilShown`, `scrollToTarget`, `Session.flingUntil` and `Session.scrollUntil` are navigation passes outside a step and send the measured gesture inside one. `pageNumbers` preserves numeric page labels in command summaries; otherwise summaries use selector descriptions. Page sizes and seed data stay in the journey's page selectors. Options expose the counts and timeouts; their defaults are exported constants. `frameTimeoutMs` (20000) bounds the wait for the list frame to stop moving, `checkTimeoutMs` (20000) bounds a step check (`passChecked`, `endChecked`; in `scrollCycles` the top check reads `fling.checkTimeoutMs`), and `lookWindowMs` (1000) is the window in which a look after a gesture is retried. The `lookMs` field in the log stays the cumulative time spent looking.
69
71
 
70
72
  `passChecked` and `endChecked` create step checks; share a `ListCache` with `flingUntilShown`/`scrollToEnd` for each visit to a list. `passChecked` permits one repair using only the original pass's remaining budget. `scoped: false` searches globally when row selectors are unique. `field: 'text' | 'description'` limits Android row lookups to the attribute the app uses. `rowAlternatives(from, to, format)` builds page-marker alternations from journey data; `rowAtOrBelow` checks whether a row has moved under a boundary. `t.frameOf` and `t.settledFrame` expose the existing stale-safe frame readers for custom mechanics.
71
73
 
@@ -9,6 +9,14 @@ export interface Point {
9
9
  /** Default scroll budget; the third gesture is logged as extra. */
10
10
  export declare const LONG_SCROLL_CAP = 3;
11
11
  export declare const LONG_SCROLL_PLANNED = 2;
12
+ /**
13
+ * The measured top step of `scrollCycles`: exactly `gestures` of them, sent without looking in between; the first row is looked
14
+ * for after them and a navigation pass finishes the way (F3, lab 10-29: one FLING never reaches the top of a TapIn-sized list,
15
+ * so the count was the same either way and the look cost 2–4 s a step).
16
+ */
17
+ export declare const TOP_STEP: {
18
+ readonly gestures: 2;
19
+ };
12
20
  /** Additional iOS gestures allowed when returning to the top. */
13
21
  export declare const IOS_TOP_EXTRA = 2;
14
22
  /**
@@ -27,6 +35,33 @@ export declare const FLING: {
27
35
  export declare const CLOSE_SWIPE_MS = 400;
28
36
  export declare const TAP_HOLD_MS = 100;
29
37
  export declare const BURST_GAP_MS = 45;
38
+ /**
39
+ * The navigation stroke: "take, then flick", for the passes that only get somewhere (return to top, go to the loaded end, bring a
40
+ * target into view) and never for a measured gesture. One touch in one W3C actions call: a slow first move over `slow` of the
41
+ * list's height in `slowMs`, which the app takes as a pan (it takes a touch 19–60 ms after it lands, up to 100 ms under load, so
42
+ * a touch that flicks at once is dropped by races: D1), then a fast move over the rest of the way in `fastMs`, so the release
43
+ * velocity is high and the list coasts about as far as the old 12 000 dp/s fling did. The span is 80 % of the list frame; its
44
+ * ends keep FLING's clearance (starts at least `startMargin` of the list inside its frame, ends above the bottom system zone).
45
+ * Navigation windows are keyed `nav:<list>` and never judged (ctl-arek-nav-scroll, D1 narrowed to measured gestures).
46
+ */
47
+ export declare const NAV_STROKE: {
48
+ readonly end: readonly [0.9, 0.1];
49
+ readonly top: readonly [0.2, 1];
50
+ readonly slow: 0.1;
51
+ readonly slowMs: 100;
52
+ readonly fastMs: 45;
53
+ readonly minTravel: 250;
54
+ /**
55
+ * The drag a pass turns round with after a stroke carried a mid-list target past the view: from `margin` to 1 − `margin` of
56
+ * the list in `moveMs`, held `holdMs` before release so the list keeps no speed (Android drops velocity samples older than
57
+ * 40 ms): it moves 60 % of the list, so no row can be skipped.
58
+ */
59
+ readonly precise: {
60
+ readonly margin: 0.2;
61
+ readonly moveMs: 600;
62
+ readonly holdMs: 150;
63
+ };
64
+ };
30
65
  /** A vertical touch in window units; `clamped` when the list left no room for its whole travel. */
31
66
  export interface Stroke {
32
67
  from: number;
@@ -34,11 +69,17 @@ export interface Stroke {
34
69
  travel: number;
35
70
  clamped: boolean;
36
71
  }
72
+ /** The navigation stroke's touch: `mid` is where the slow move ends and the flick starts. */
73
+ export interface NavStroke extends Stroke {
74
+ mid: number;
75
+ }
37
76
  /**
38
77
  * FLING's touch in list frame `r` toward `toward`, in window units of which `unit` make a dp (Android) or pt (iOS), between the
39
78
  * window's top and `safeBottom`. `start` replaces the frame's start fraction (a drawn row's centre).
40
79
  */
41
80
  export declare function flingStroke(r: Rect, toward: ScrollDirection, unit: number, safeBottom: number, start?: number): Stroke;
81
+ /** NAV_STROKE's touch in list frame `r` toward `toward`, laid like flingStroke's; the slow move is its first `slow` of the list. */
82
+ export declare function navStroke(r: Rect, toward: ScrollDirection, unit: number, safeBottom: number): NavStroke;
42
83
  /**
43
84
  * Closes a sheet between window points. Android uses native dragGesture; iOS uses a 400 ms drag. Logs commands only.
44
85
  * Does not consume readiness itself; use closeSwipeAt/From when readiness is pending.
@@ -1,6 +1,12 @@
1
1
  /** Default scroll budget; the third gesture is logged as extra. */
2
2
  export const LONG_SCROLL_CAP = 3;
3
3
  export const LONG_SCROLL_PLANNED = 2;
4
+ /**
5
+ * The measured top step of `scrollCycles`: exactly `gestures` of them, sent without looking in between; the first row is looked
6
+ * for after them and a navigation pass finishes the way (F3, lab 10-29: one FLING never reaches the top of a TapIn-sized list,
7
+ * so the count was the same either way and the look cost 2–4 s a step).
8
+ */
9
+ export const TOP_STEP = { gestures: LONG_SCROLL_PLANNED };
4
10
  /** Additional iOS gestures allowed when returning to the top. */
5
11
  export const IOS_TOP_EXTRA = 2;
6
12
  /**
@@ -20,13 +26,32 @@ export const CLOSE_SWIPE_MS = 400;
20
26
  export const TAP_HOLD_MS = 100;
21
27
  export const BURST_GAP_MS = 45;
22
28
  /**
23
- * FLING's touch in list frame `r` toward `toward`, in window units of which `unit` make a dp (Android) or pt (iOS), between the
24
- * window's top and `safeBottom`. `start` replaces the frame's start fraction (a drawn row's centre).
29
+ * The navigation stroke: "take, then flick", for the passes that only get somewhere (return to top, go to the loaded end, bring a
30
+ * target into view) and never for a measured gesture. One touch in one W3C actions call: a slow first move over `slow` of the
31
+ * list's height in `slowMs`, which the app takes as a pan (it takes a touch 19–60 ms after it lands, up to 100 ms under load, so
32
+ * a touch that flicks at once is dropped by races: D1), then a fast move over the rest of the way in `fastMs`, so the release
33
+ * velocity is high and the list coasts about as far as the old 12 000 dp/s fling did. The span is 80 % of the list frame; its
34
+ * ends keep FLING's clearance (starts at least `startMargin` of the list inside its frame, ends above the bottom system zone).
35
+ * Navigation windows are keyed `nav:<list>` and never judged (ctl-arek-nav-scroll, D1 narrowed to measured gestures).
25
36
  */
26
- export function flingStroke(r, toward, unit, safeBottom, start) {
27
- const [f, t] = FLING[toward];
28
- const travel = Math.round(Math.max(Math.abs(t - f) * r.height, FLING.minTravel * unit));
29
- const step = toward === 'end' ? -travel : travel;
37
+ export const NAV_STROKE = {
38
+ end: [0.9, 0.1],
39
+ top: [0.2, 1],
40
+ slow: 0.1,
41
+ slowMs: 100,
42
+ fastMs: 45,
43
+ minTravel: 250,
44
+ /**
45
+ * The drag a pass turns round with after a stroke carried a mid-list target past the view: from `margin` to 1 − `margin` of
46
+ * the list in `moveMs`, held `holdMs` before release so the list keeps no speed (Android drops velocity samples older than
47
+ * 40 ms): it moves 60 % of the list, so no row can be skipped.
48
+ */
49
+ precise: { margin: 0.2, moveMs: 600, holdMs: 150 },
50
+ };
51
+ /** A touch from fraction `f` to `t` of list frame `r`, kept above `safeBottom` and its start inside the frame; see flingStroke. */
52
+ function fit(r, f, t, minTravel, unit, safeBottom, start) {
53
+ const travel = Math.round(Math.max(Math.abs(t - f) * r.height, minTravel * unit));
54
+ const step = t > f ? travel : -travel;
30
55
  const clamp = (y) => Math.min(Math.max(y, 0), safeBottom);
31
56
  let from = Math.round(start ?? r.y + r.height * f);
32
57
  const below = Math.max(from, from + step) - safeBottom;
@@ -39,6 +64,21 @@ export function flingStroke(r, toward, unit, safeBottom, start) {
39
64
  const to = clamp(from + step);
40
65
  return { from, to, travel, clamped: Math.abs(to - from) < travel };
41
66
  }
67
+ /**
68
+ * FLING's touch in list frame `r` toward `toward`, in window units of which `unit` make a dp (Android) or pt (iOS), between the
69
+ * window's top and `safeBottom`. `start` replaces the frame's start fraction (a drawn row's centre).
70
+ */
71
+ export function flingStroke(r, toward, unit, safeBottom, start) {
72
+ const [f, t] = FLING[toward];
73
+ return fit(r, f, t, FLING.minTravel, unit, safeBottom, start);
74
+ }
75
+ /** NAV_STROKE's touch in list frame `r` toward `toward`, laid like flingStroke's; the slow move is its first `slow` of the list. */
76
+ export function navStroke(r, toward, unit, safeBottom) {
77
+ const [f, t] = NAV_STROKE[toward];
78
+ const s = fit(r, f, t, NAV_STROKE.minTravel, unit, safeBottom);
79
+ const slow = Math.min(Math.round(NAV_STROKE.slow * r.height), Math.floor(Math.abs(s.to - s.from) / 2));
80
+ return { ...s, mid: s.from + (s.to > s.from ? slow : -slow) };
81
+ }
42
82
  /**
43
83
  * Closes a sheet between window points. Android uses native dragGesture; iOS uses a 400 ms drag. Logs commands only.
44
84
  * Does not consume readiness itself; use closeSwipeAt/From when readiness is pending.
@@ -1 +1 @@
1
- {"version":3,"file":"gestures.js","sourceRoot":"","sources":["../../src/gestures.ts"],"names":[],"mappings":"AAMA,mEAAmE;AACnE,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC;AACjC,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC;AACrC,iEAAiE;AACjE,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC;AAC/B;;;;;GAKG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,GAAG,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;IACjB,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC;IACf,SAAS,EAAE,GAAG;IACd,SAAS,EAAE,GAAG;IACd,WAAW,EAAE,GAAG;CACR,CAAC;AACX,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAC;AAClC,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAC;AAC/B,MAA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,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE;oBACnH,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE;iBACrE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IACT,MAAM,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;AAC7D,CAAC"}
@@ -3,11 +3,11 @@ export { END_GC_DEFAULT, RUN_DEFAULTS, acceptAlert, activationLink, flushLink, g
3
3
  export { defineJourney, type JourneyContext, type JourneyFn, type JourneyModule } from './journey.js';
4
4
  export { ANDROID, IOS, PLATFORMS, platformOf, type Platform, type PlatformName } from './platform.js';
5
5
  export { androidLocators, childOf, describeSelector, id, idText, locator, text, toSelector, type Selector, type SelectorLike } from './selectors.js';
6
- export { FLUSH_END_RUN_FAILED, FLUSH_ERROR, FLUSH_OFF, FLUSH_NOT_ACKNOWLEDGED, FLUSH_RESEND_MS, FLUSH_UNREADABLE, FLUSH_WAIT_MS, type FlushEvidence, HOST_CLOCK_TRIPS, Session, sendMarkers, type ActionGc, type GestureDefect, type ClockTrip, type Condition, type Marker } from './session.js';
6
+ export { FLUSH_END_RUN_FAILED, FLUSH_ERROR, FLUSH_OFF, FLUSH_NOT_ACKNOWLEDGED, FLUSH_RESEND_MS, FLUSH_UNREADABLE, FLUSH_WAIT_MS, type FlushEvidence, HOST_CLOCK_TRIPS, NAV_EDGE_MS, NAV_STEP, Session, sendMarkers, type ActionGc, type GestureDefect, type ClockTrip, type Condition, type Marker } from './session.js';
7
7
  export { loadElements, parseTokensJs, plan, type PlannedRun } from './tokens.js';
8
8
  export { runDriver, DRIVER_OPTIONS, type IterationRecord, type RunDeps } from './run.js';
9
9
  export { loadJourneyModule, main } from './load.js';
10
10
  export { DRIVER_NAME, driverVersion, journeyVersion } from './version.js';
11
- export { closeSwipe, closeSwipeAt, closeSwipeFrom, tapAllAt, flingStroke, FLING, LONG_SCROLL_CAP, LONG_SCROLL_PLANNED, IOS_TOP_EXTRA, CLOSE_SWIPE_MS, TAP_HOLD_MS, BURST_GAP_MS, type ScrollDirection, type Point, type Stroke } from './gestures.js';
12
- export { rowAlternatives, rowAtOrBelow, scrollUntilShown, scrollCap, flingUntilShown, passChecked, scrollToEnd, endChecked, scrollCycles, scrollToTarget, END_SCROLLS, SCROLL_CYCLES, PAGE_PAUSE_MS, PAGE_WAIT_MS, PAGE_POLL_MS, PAGE_COAST_MAX_MS, PAGE_COAST_MAX_MS_IOS, LOOK_MS, LOOK_POLL_MS, CHECK_TIMEOUT_MS, TARGET_SETTLE_MS, type UntilShownOptions, type FlingUntilShownOptions, type ScrollToEndOptions, type EndCheckOptions, type PassCheckOptions, type ScrollCyclesOptions, type ScrollToTargetOptions } from './lists.js';
13
- export { scrollList, GestureNotTaken, longScroll, androidScreenScroll, scrollFromDrawnRow, waitCoasted, holdBeforeScroll, FLING_UNMOVED_MS, COAST_POLL_MS, COAST_MAX_MS, type ScrollSpec, type ScrollOptions, type ScrollResult, type RowField, type ListHandle, type RowHold, type ListCache } from './scroll.js';
11
+ export { closeSwipe, closeSwipeAt, closeSwipeFrom, tapAllAt, flingStroke, navStroke, FLING, NAV_STROKE, LONG_SCROLL_CAP, LONG_SCROLL_PLANNED, TOP_STEP, IOS_TOP_EXTRA, CLOSE_SWIPE_MS, TAP_HOLD_MS, BURST_GAP_MS, type ScrollDirection, type Point, type Stroke, type NavStroke } from './gestures.js';
12
+ export { rowAlternatives, rowAtOrBelow, scrollUntilShown, scrollCap, flingUntilShown, passChecked, scrollToEnd, endChecked, scrollCycles, scrollToTarget, navigate, END_SCROLLS, SCROLL_CYCLES, PAGE_PAUSE_MS, PAGE_WAIT_MS, PAGE_POLL_MS, PAGE_COAST_MAX_MS, PAGE_COAST_MAX_MS_IOS, LOOK_MS, LOOK_POLL_MS, CHECK_TIMEOUT_MS, TARGET_SETTLE_MS, NAV_MAX_MS, NAV_STUCK_STROKES, type NavigateOptions, type NavigateResult, type UntilShownOptions, type FlingUntilShownOptions, type ScrollToEndOptions, type EndCheckOptions, type PassCheckOptions, type ScrollCyclesOptions, type ScrollToTargetOptions } from './lists.js';
13
+ export { scrollList, GestureNotTaken, NavigationStuck, longScroll, androidScreenScroll, scrollFromDrawnRow, waitCoasted, holdBeforeScroll, COAST_POLL_MS, COAST_MAX_MS, type ScrollSpec, type ScrollOptions, type ScrollResult, type RowField, type ListHandle, type RowHold, type ListCache } from './scroll.js';
package/dist/src/index.js CHANGED
@@ -3,12 +3,12 @@ export { END_GC_DEFAULT, RUN_DEFAULTS, acceptAlert, activationLink, flushLink, g
3
3
  export { defineJourney } from './journey.js';
4
4
  export { ANDROID, IOS, PLATFORMS, platformOf } from './platform.js';
5
5
  export { androidLocators, childOf, describeSelector, id, idText, locator, text, toSelector } from './selectors.js';
6
- export { FLUSH_END_RUN_FAILED, FLUSH_ERROR, FLUSH_OFF, FLUSH_NOT_ACKNOWLEDGED, FLUSH_RESEND_MS, FLUSH_UNREADABLE, FLUSH_WAIT_MS, HOST_CLOCK_TRIPS, Session, sendMarkers } from './session.js';
6
+ export { FLUSH_END_RUN_FAILED, FLUSH_ERROR, FLUSH_OFF, FLUSH_NOT_ACKNOWLEDGED, FLUSH_RESEND_MS, FLUSH_UNREADABLE, FLUSH_WAIT_MS, HOST_CLOCK_TRIPS, NAV_EDGE_MS, NAV_STEP, Session, sendMarkers } from './session.js';
7
7
  export { loadElements, parseTokensJs, plan } from './tokens.js';
8
8
  export { runDriver, DRIVER_OPTIONS } from './run.js';
9
9
  export { loadJourneyModule, main } from './load.js';
10
10
  export { DRIVER_NAME, driverVersion, journeyVersion } from './version.js';
11
- export { closeSwipe, closeSwipeAt, closeSwipeFrom, tapAllAt, flingStroke, FLING, LONG_SCROLL_CAP, LONG_SCROLL_PLANNED, IOS_TOP_EXTRA, CLOSE_SWIPE_MS, TAP_HOLD_MS, BURST_GAP_MS } from './gestures.js';
12
- export { rowAlternatives, rowAtOrBelow, scrollUntilShown, scrollCap, flingUntilShown, passChecked, scrollToEnd, endChecked, scrollCycles, scrollToTarget, END_SCROLLS, SCROLL_CYCLES, PAGE_PAUSE_MS, PAGE_WAIT_MS, PAGE_POLL_MS, PAGE_COAST_MAX_MS, PAGE_COAST_MAX_MS_IOS, LOOK_MS, LOOK_POLL_MS, CHECK_TIMEOUT_MS, TARGET_SETTLE_MS } from './lists.js';
13
- export { scrollList, GestureNotTaken, longScroll, androidScreenScroll, scrollFromDrawnRow, waitCoasted, holdBeforeScroll, FLING_UNMOVED_MS, COAST_POLL_MS, COAST_MAX_MS } from './scroll.js';
11
+ export { closeSwipe, closeSwipeAt, closeSwipeFrom, tapAllAt, flingStroke, navStroke, FLING, NAV_STROKE, LONG_SCROLL_CAP, LONG_SCROLL_PLANNED, TOP_STEP, IOS_TOP_EXTRA, CLOSE_SWIPE_MS, TAP_HOLD_MS, BURST_GAP_MS } from './gestures.js';
12
+ export { rowAlternatives, rowAtOrBelow, scrollUntilShown, scrollCap, flingUntilShown, passChecked, scrollToEnd, endChecked, scrollCycles, scrollToTarget, navigate, END_SCROLLS, SCROLL_CYCLES, PAGE_PAUSE_MS, PAGE_WAIT_MS, PAGE_POLL_MS, PAGE_COAST_MAX_MS, PAGE_COAST_MAX_MS_IOS, LOOK_MS, LOOK_POLL_MS, CHECK_TIMEOUT_MS, TARGET_SETTLE_MS, NAV_MAX_MS, NAV_STUCK_STROKES } from './lists.js';
13
+ export { scrollList, GestureNotTaken, NavigationStuck, longScroll, androidScreenScroll, scrollFromDrawnRow, waitCoasted, holdBeforeScroll, COAST_POLL_MS, COAST_MAX_MS } from './scroll.js';
14
14
  //# sourceMapp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AY,EAAE,aAAa,EAAE,IAAI,EAAmB,MAAM,aAAa,CAAC;AACjF,OAAO,EAAE,SAAS,EAAE,cAAc,EAAsC,MAAM,UAAU,CAAC;AACzF,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,cAAc,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,mBAAmB,EAAE,QAAQ,EAAE,aAAa,EAAE,cAAc,EAAE,WAAW,EAAE,YAAY,EAAiE,MAAM,eAAe,CAAC;AACvS,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,gBAAgB,EAAE,SAAS,EAAE,eAAe,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,YAAY,EAAE,cAAc,EAAE,QAAQ,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,UAAU,EAAE,iBAAiB,EAA8N,MAAM,YAAY,CAAC;AAC9lB,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,eAAe,EAAE,UAAU,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,WAAW,EAAE,gBAAgB,EAAE,aAAa,EAAE,YAAY,EAAwH,MAAM,aAAa,CAAC"}
@@ -21,6 +21,10 @@ export declare const LOOK_POLL_MS = 100;
21
21
  export declare const CHECK_TIMEOUT_MS = 20000;
22
22
  /** Initial visibility wait before trying an indicator or fallback scroll. */
23
23
  export declare const TARGET_SETTLE_MS = 10000;
24
+ /** A navigation pass that still has not arrived after this long fails (it has no stroke count to end it). */
25
+ export declare const NAV_MAX_MS = 120000;
26
+ /** Two navigation strokes in a row that leave the first and last visible rows as they were stop the pass. */
27
+ export declare const NAV_STUCK_STROKES = 2;
24
28
  export interface UntilShownOptions {
25
29
  cmd: string;
26
30
  field: string;
@@ -34,6 +38,10 @@ export interface UntilShownOptions {
34
38
  extra?: () => Record<string, unknown>;
35
39
  lookWindowMs?: number;
36
40
  lookPollMs?: number;
41
+ /** Reaching `cap` without the target ends the loop with the log's `reached: false` instead of throwing `missing`. */
42
+ soft?: boolean;
43
+ /** Between blind moves, one look (no look window): a target already shown ends the blind moves (a sheet list at its top). */
44
+ lookBetweenBlind?: boolean;
37
45
  }
38
46
  export interface FlingUntilShownOptions {
39
47
  scoped?: boolean;
@@ -48,6 +56,8 @@ export interface FlingUntilShownOptions {
48
56
  coastMaxMs?: number;
49
57
  lookWindowMs?: number;
50
58
  lookPollMs?: number;
59
+ /** In a measured step: reaching `cap` without the target is not a failure; a navigation pass after the step finishes the way. */
60
+ soft?: boolean;
51
61
  }
52
62
  export interface ScrollToEndOptions {
53
63
  pages: readonly SelectorLike[];
@@ -64,6 +74,8 @@ export interface ScrollToEndOptions {
64
74
  coastMaxMs?: number;
65
75
  coastMaxMsIos?: number;
66
76
  frameTimeoutMs?: number;
77
+ /** A page that has not landed after its wait is logged, not an error: the caller's navigation pass fetches it (scrollCycles). */
78
+ deferPages?: boolean;
67
79
  }
68
80
  export interface EndCheckOptions {
69
81
  checkTimeoutMs?: number;
@@ -82,6 +94,35 @@ export interface ScrollCyclesOptions extends ScrollToEndOptions {
82
94
  stepName: (toward: ScrollDirection, cycle: number) => string;
83
95
  fling?: PassCheckOptions;
84
96
  }
97
+ export interface NavigateOptions {
98
+ /** The target is there, by element lookup: never by a frame test (an overlay can cover a row whose frame lies in the list). */
99
+ until: () => Promise<boolean>;
100
+ /** The list's rows: the first and last row inside the list are read on them, twice 300 ms apart, to tell a coast from a rest. */
101
+ row: SelectorLike;
102
+ field?: RowField;
103
+ scoped?: boolean;
104
+ cache?: ListCache;
105
+ /** Toward the end: after a stroke has come to rest, how long to wait for the target (a page) before the next stroke. */
106
+ pageWaitMs?: number;
107
+ /** Bound of the wait for the list to come to rest after a stroke (default PAGE_COAST_MAX_MS, iOS PAGE_COAST_MAX_MS_IOS). */
108
+ coastMaxMs?: number;
109
+ frameTimeoutMs?: number;
110
+ maxMs?: number;
111
+ /** Names the target in the log and in errors. */
112
+ label?: string;
113
+ /** Strokes needed here mean the measured gestures fell short: counted as the harness defect `navCatchUp`. */
114
+ catchUp?: boolean;
115
+ /**
116
+ * The target may sit mid-list, so a stroke can carry it past the view: stalled at the edge after the list moved, the pass turns
117
+ * round once with precise drags. Off for edge targets (the top, the loaded end, a page still to land): there the stall is stuck.
118
+ */
119
+ turnRound?: boolean;
120
+ }
121
+ export interface NavigateResult {
122
+ strokes: number;
123
+ arrived: boolean;
124
+ ms: number;
125
+ }
85
126
  export interface ScrollToTargetOptions {
86
127
  target: SelectorLike;
87
128
  row: SelectorLike;
@@ -98,17 +139,34 @@ export interface ScrollToTargetOptions {
98
139
  * begins at least lookWindowMs (1000) after it; lookPollMs defaults to 100. Optional settle runs before those looks.
99
140
  * Logs cmd with the gesture count under field, blind/cap, looks/lookMs, status, duration, optional extra and planned overrun.
100
141
  */
101
- export declare function scrollUntilShown(t: Session, { cmd, field, cap, blind, planned, settle, look: once, move, missing, extra, lookWindowMs, lookPollMs }: UntilShownOptions): Promise<number>;
142
+ export declare function scrollUntilShown(t: Session, { cmd, field, cap, blind, planned, settle, look: once, move, missing, extra, lookWindowMs, lookPollMs, soft, lookBetweenBlind }: UntilShownOptions): Promise<number>;
102
143
  /** Platform gesture budget: cap (3), plus iosTopExtra (2) only when returning to the top on iOS. No commands or logs. */
103
144
  export declare const scrollCap: (t: Session, toward: ScrollDirection, cap?: number, iosTopExtra?: number) => number;
104
145
  /**
105
- * Long-scrolls list toward a partly visible target; scoped defaults true. Refetches missing/stale list handles before
146
+ * Brings `target` of `list` into view toward `toward`. Outside a measured step it is a navigation pass (`navigate`: marked `nav`,
147
+ * the navigation stroke, no gesture cap: it ends on the target found by lookup and the rows at rest, and stops when two strokes
148
+ * leave the rows as they were; `blind`, `cap`, `planned`, `iosTopExtra` and `used` do not apply). Inside a step its gestures stay
149
+ * the measured gesture, as below, and nothing is marked `nav`.
150
+ *
151
+ * In a step it long-scrolls list toward a partly visible target; scoped defaults true. Refetches missing/stale list handles before
106
152
  * moving and rereads the frame before every gesture. A shared cache stores the settled frame, held iOS row and moves used.
107
153
  * Defaults: 3 gestures (5 to top on iOS), 2 planned, 20 s frameTimeoutMs, 3 s coast. used subtracts the prior pass budget.
108
- * A to-top gesture is checked (scrollList `mustMove`); its retry is a logged defect and does not use the budget.
154
+ * A to-top gesture is checked (scrollList `mustMove`); its retry is a logged defect and does not use the budget. With `soft`, the
155
+ * cap ends the loop quietly (`reached: false` in the log) where it would throw.
109
156
  * Logs fling-to-end/top with flings, blind/cap, looks/lookMs, extra, relists, settled, status and duration, including failures.
110
157
  */
111
- export declare function flingUntilShown(t: Session, list: SelectorLike, target: SelectorLike, toward: ScrollDirection, { scoped, blind, cache, row, used, cap, planned, iosTopExtra, frameTimeoutMs, coastMaxMs, lookWindowMs, lookPollMs }?: FlingUntilShownOptions): Promise<void>;
158
+ export declare function flingUntilShown(t: Session, list: SelectorLike, target: SelectorLike, toward: ScrollDirection, { scoped, blind, cache, row, used, cap, planned, iosTopExtra, frameTimeoutMs, coastMaxMs, lookWindowMs, lookPollMs, soft }?: FlingUntilShownOptions): Promise<void>;
159
+ /**
160
+ * A navigation pass: gets `list` toward its top or end until `until` finds the target, with the navigation stroke, between `nav`
161
+ * markers (`Session.navigation`; never inside a measured step). Before the pass and after each stroke it waits for the list to
162
+ * come to rest: its first and last row (`rowEdges`) read twice, 300 ms apart, are the same. The pass ends when the target is
163
+ * found by lookup with the list at rest; toward the end, a stroke that rests with no target waits `pageWaitMs` for one (a page
164
+ * lands only once the list rests at its loaded end) before the next. No frame test decides arrival. There is no stroke count: when
165
+ * two strokes in a row leave those rows as they were after the list had moved, the target was passed: the pass turns round once
166
+ * with `NAV_STROKE.precise` drags; when two strokes leave them as they were again (or the list never moved) it throws `NavigationStuck` (counted in `t.defects.navStuck`; the run
167
+ * is invalid), and `maxMs` bounds the pass in time. Logs `nav` with toward, strokes, arrived, status and ms, also on failure.
168
+ */
169
+ export declare function navigate(t: Session, list: SelectorLike, toward: ScrollDirection, { until, row, field, scoped, cache, pageWaitMs, coastMaxMs, frameTimeoutMs, maxMs, label, catchUp, turnRound }: NavigateOptions): Promise<NavigateResult>;
112
170
  /**
113
171
  * Creates a step check. On its first call only, a missing target triggers a re-scroll sharing cache.used; subsequent calls
114
172
  * only wait for visibility (checkTimeoutMs defaults 20000). Logs re-scrolled with toward plus the nested fling summary.
@@ -116,34 +174,41 @@ export declare function flingUntilShown(t: Session, list: SelectorLike, target:
116
174
  */
117
175
  export declare function passChecked(t: Session, list: SelectorLike, target: SelectorLike, toward: ScrollDirection, scoped: boolean, cache: ListCache, row?: SelectorLike, options?: PassCheckOptions): () => Promise<void>;
118
176
  /**
119
- * Performs scrolls (3) end gestures. A gesture with no page marker pauses pauseMs (500). Otherwise it waits for coast
120
- * (Android 6000 ms, iOS 10000), optionally adds one gesture if beforePages was not reached, then waits pageWaitMs (3000)
121
- * for the page's first loaded row, polling every pagePollMs (300). A page that has not landed by then while its beforePages
122
- * row is cut by (or touches) the list's bottom edge gets that one gesture instead, and a new wait; waitMs counts from the
123
- * last gesture's coast. scoped defaults true; field narrows Android lookups.
177
+ * Performs scrolls (3) end gestures, exactly that many and no other: a page that has not landed never gets a catch-up gesture
178
+ * here (a navigation pass outside the step fetches it). A gesture with no page marker pauses pauseMs (500). Otherwise it waits
179
+ * for coast (Android 6000 ms, iOS 10000), then waitMs (3000) for the page's first loaded row, polling every pagePollMs (300),
180
+ * counted from the coast. A page that has not landed by then fails the pass, or with `deferPages` is logged as not landed.
181
+ * scoped defaults true; field narrows Android lookups. `beforePages` is no longer read.
124
182
  * The pass is taken to start at the top, so its first gesture is checked (scrollList `mustMove`): one that moved nothing is
125
183
  * sent once more and counted in `t.defects`; `unmoved` is 1 then, and 2 when the retry moved nothing either (GestureNotTaken).
126
- * Logs fling-to-end: flings, supplied pageNumbers (or descriptions), coastMs, waitMs, per-page extra, unmoved, pauseMs, settled,
127
- * status and duration. Page checks do not require visibility. All limits and frameTimeoutMs (20000) are configurable.
184
+ * Logs fling-to-end: flings, supplied pageNumbers (or descriptions), coastMs, waitMs, landed (per page), unmoved, pauseMs,
185
+ * settled, status and duration. Page checks do not require visibility. All limits and frameTimeoutMs (20000) are configurable.
128
186
  */
129
- export declare function scrollToEnd(t: Session, list: SelectorLike, cache: ListCache, { pages, pageNumbers, beforePages, scoped, field, any, scrolls, pauseMs, pageWaitMs, pagePollMs, coastMaxMs, coastMaxMsIos, frameTimeoutMs }: ScrollToEndOptions): Promise<void>;
187
+ export declare function scrollToEnd(t: Session, list: SelectorLike, cache: ListCache, { pages, pageNumbers, scoped, field, any, scrolls, pauseMs, pageWaitMs, pagePollMs, coastMaxMs, coastMaxMsIos, frameTimeoutMs, deferPages }: ScrollToEndOptions): Promise<void>;
130
188
  /**
131
189
  * Creates an end-pass check requiring a loaded lastPage row, even off screen. Retries a stale lookup once, then polls
132
190
  * every 300 ms for up to 20000 ms. checkTimeoutMs, pagePollMs and scrolls override the defaults in errors. Logs commands only.
133
191
  */
134
192
  export declare function endChecked(t: Session, list: SelectorLike, lastPage: SelectorLike, scoped: boolean, field?: RowField, { checkTimeoutMs, pagePollMs, scrolls }?: EndCheckOptions): () => Promise<void>;
135
193
  /**
136
- * Runs cycles (3) end/top measured step pairs with names from stepName(toward, oneBasedCycle). Only cycle one waits for
137
- * page markers; every end check requires lastPage loaded. Shares frame/row cache and each top pass's budget with its
138
- * check. frameTimeoutMs feeds the end frame wait; checkTimeoutMs feeds its end check. fling configures top passes/checks. Logs step markers and nested helper summaries.
194
+ * Runs cycles (3) end/top measured step pairs with names from stepName(toward, oneBasedCycle). Each step sends exactly its
195
+ * planned controlled gestures, the same in every run: the end step `scrolls` (3) end gestures, the top step 2, the top one looking
196
+ * before the second (a gesture at the top drags a sheet) and stopping quietly short of the top. Nothing is checked inside a step.
197
+ * After each step's end marker a navigation pass (`navigate`, marked `nav`, evidence only) finishes the way: to the loaded end
198
+ * until a lastPage row is loaded (strokes needed there are counted as the harness defect `navCatchUp`), to the top until `first`
199
+ * shows; the pass ends on lookups and rows at rest, never on frames. Then the end check (lastPage loaded, checkTimeoutMs for the
200
+ * end check) and the top check (first shown). Only cycle one waits for page markers. Shares the frame/row cache across steps and
201
+ * passes. frameTimeoutMs feeds the end frame wait. `fling` configures the top step: its `cap` and `iosTopExtra` no longer widen
202
+ * it. Logs step markers, nav passes and nested helper summaries.
139
203
  */
140
204
  export declare function scrollCycles(t: Session, { list, first, lastPage, cycles, stepName, fling, ...options }: ScrollCyclesOptions): Promise<void>;
141
205
  /**
142
206
  * Waits settleMs (10000) for target, then taps an optional indicator and/or runs move until visible, at most cap (3)
143
- * times, coasting on row after each action. Logs cmd (scroll-to-target) with tapped, swipes, extra above planned (2),
144
- * status and duration. An initially visible target returns without a summary. missing customizes the failure message.
207
+ * times, coasting on row after each action. Outside a measured step this is a navigation pass: marked `nav`, and the list
208
+ * gestures `move` sends are the navigation stroke (the pass has no list to read rows on, so `cap` still ends it). Logs cmd
209
+ * (scroll-to-target) with tapped, swipes, extra above planned (2), status and duration. An initially visible target returns without a summary. missing customizes the failure message.
145
210
  */
146
- export declare function scrollToTarget(t: Session, { target, indicator, row, move, settleMs, cap, planned, cmd, missing }: ScrollToTargetOptions): Promise<void>;
211
+ export declare function scrollToTarget(t: Session, options: ScrollToTargetOptions): Promise<void>;
147
212
  /**
148
213
  * Builds a regex alternation from the inclusive from/to row numbers. The journey supplies row's formatting and regex
149
214
  * escaping; an empty range returns ''. No commands or logs.