react-native-tapline 1.4.0 → 1.6.0

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.
Files changed (77) hide show
  1. package/TaplineNative.podspec +3 -1
  2. package/dist/actions.d.ts +75 -2
  3. package/dist/actions.js +333 -25
  4. package/dist/actions.js.map +1 -1
  5. package/dist/alerts.d.ts +2 -0
  6. package/dist/alerts.js +5 -0
  7. package/dist/alerts.js.map +1 -1
  8. package/dist/anim.d.ts +25 -0
  9. package/dist/anim.js +311 -0
  10. package/dist/anim.js.map +1 -0
  11. package/dist/appinfo.d.ts +12 -0
  12. package/dist/appinfo.js +78 -0
  13. package/dist/appinfo.js.map +1 -0
  14. package/dist/checks.d.ts +43 -1
  15. package/dist/checks.js +17 -5
  16. package/dist/checks.js.map +1 -1
  17. package/dist/client.d.ts +2 -0
  18. package/dist/client.js +28 -2
  19. package/dist/client.js.map +1 -1
  20. package/dist/commands.js +28 -0
  21. package/dist/commands.js.map +1 -1
  22. package/dist/glass.d.ts +3 -0
  23. package/dist/glass.js +81 -0
  24. package/dist/glass.js.map +1 -0
  25. package/dist/glassclip.d.ts +18 -0
  26. package/dist/glassclip.js +69 -0
  27. package/dist/glassclip.js.map +1 -0
  28. package/dist/guard.d.ts +17 -0
  29. package/dist/guard.js +44 -0
  30. package/dist/guard.js.map +1 -0
  31. package/dist/idle.d.ts +43 -0
  32. package/dist/idle.js +379 -0
  33. package/dist/idle.js.map +1 -0
  34. package/dist/index.d.ts +8 -0
  35. package/dist/index.js +6 -1
  36. package/dist/index.js.map +1 -1
  37. package/dist/inspect.d.ts +18 -1
  38. package/dist/inspect.js +48 -8
  39. package/dist/inspect.js.map +1 -1
  40. package/dist/loading.d.ts +17 -0
  41. package/dist/loading.js +96 -0
  42. package/dist/loading.js.map +1 -0
  43. package/dist/locale.js +1 -1
  44. package/dist/locale.js.map +1 -1
  45. package/dist/media.d.ts +71 -0
  46. package/dist/media.js +516 -0
  47. package/dist/media.js.map +1 -0
  48. package/dist/methods.js +14 -1
  49. package/dist/methods.js.map +1 -1
  50. package/dist/move.d.ts +40 -0
  51. package/dist/move.js +125 -0
  52. package/dist/move.js.map +1 -0
  53. package/dist/native.d.ts +5 -0
  54. package/dist/native.js.map +1 -1
  55. package/dist/network.d.ts +4 -0
  56. package/dist/network.js +49 -1
  57. package/dist/network.js.map +1 -1
  58. package/dist/place.d.ts +23 -0
  59. package/dist/place.js +66 -0
  60. package/dist/place.js.map +1 -0
  61. package/dist/placekey.d.ts +29 -0
  62. package/dist/placekey.js +134 -0
  63. package/dist/placekey.js.map +1 -0
  64. package/dist/routetree.d.ts +27 -0
  65. package/dist/routetree.js +216 -0
  66. package/dist/routetree.js.map +1 -0
  67. package/dist/types.d.ts +28 -2
  68. package/dist/types.js +5 -1
  69. package/dist/types.js.map +1 -1
  70. package/dist/uxcheck.d.ts +57 -0
  71. package/dist/uxcheck.js +222 -0
  72. package/dist/uxcheck.js.map +1 -0
  73. package/dist/wait.d.ts +5 -0
  74. package/dist/wait.js +34 -3
  75. package/dist/wait.js.map +1 -1
  76. package/ios/TaplineNativeModule.swift +61 -0
  77. package/package.json +1 -1
@@ -5,7 +5,9 @@ Pod::Spec.new do |s|
5
5
  s.license = { :type => 'MIT' }
6
6
  s.author = 'Tapline'
7
7
  s.homepage = 'https://github.com/tapline/tapline'
8
- s.platforms = { :ios => '16.4' }
8
+ # 15.1 is the floor of Expo SDK 55 and React Native 0.83. CocoaPods skips a pod that needs a newer iOS than the
9
+ # app, silently, so a higher number here left SDK 55 apps without the module (found by the native CI job).
10
+ s.platforms = { :ios => '15.1' }
9
11
  s.source = { :git => '' }
10
12
  s.static_framework = true
11
13
  s.dependency 'ExpoModulesCore'
package/dist/actions.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { type Entry, type Snapshot } from './inspect';
2
2
  import { type ElementSource } from './source';
3
3
  import { type AuditType } from './checks';
4
+ import { type UxAction, type UxCheckName, type UxKind } from './uxcheck';
4
5
  import { type Fiber } from './fiber';
5
6
  import { type Frame, type LogEntry, type TaplineElement } from './types';
6
7
  export { tree } from './inspect';
@@ -21,6 +22,8 @@ export interface SettleOutcome {
21
22
  export declare function settle(): Promise<number>;
22
23
  /** Like `settle`, and says when the wait ended at the cap: spread it into an action's result. */
23
24
  export declare function settleOutcome(): Promise<SettleOutcome>;
25
+ /** An action is starting: only requests begun from now on count as its own. */
26
+ export declare function beginAction(): void;
24
27
  type ParsedTarget = {
25
28
  kind: 'ref';
26
29
  ref: string;
@@ -59,8 +62,12 @@ export declare function labelOf(info: {
59
62
  }): string;
60
63
  /** What the caller means to do; a point target then picks only an element that does it. */
61
64
  type ActionHint = 'press' | 'longPress' | 'toggle' | 'scroll' | 'type';
62
- /** Resolve a protocol target to exactly one element, or throw not_found / ambiguous. */
63
- export declare function resolveTarget(raw: unknown, hint?: ActionHint): Promise<Resolved>;
65
+ /**
66
+ * Resolve a protocol target to exactly one element, or throw not_found / ambiguous. A target that isn't there while the screen
67
+ * is loading (a request in flight, a spinner) is waited for up to the settle cap before `not_found` is answered (AGENT-TOOLS
68
+ * 1.13 §18.7); the answer after the wait is made from the screen as it is then, so its closest matches are unchanged.
69
+ */
70
+ export declare function resolveTarget(raw: unknown, hint?: ActionHint, glassOnly?: boolean, loadingWait?: boolean): Promise<Resolved>;
64
71
  /** The nearest listed element at or above a host fiber, for naming what covers a target. */
65
72
  export declare function describeHit(snapshot: Snapshot, hit: Fiber, actor?: Entry): string;
66
73
  /** `back`: what the back button or gesture does, on the focused screen; with a sheet open, closes the sheet. */
@@ -69,6 +76,16 @@ export declare function back(rawParams: unknown): Promise<{
69
76
  closed?: 'sheet';
70
77
  dryRun?: true;
71
78
  } & SettleOutcome>;
79
+ /** What happened to a double tap's second tap, and how long after the first it came. */
80
+ export type PressSecond = {
81
+ done: true;
82
+ afterMs: number;
83
+ threw?: string;
84
+ } | {
85
+ done: false;
86
+ reason: string;
87
+ afterMs: number;
88
+ };
72
89
  /**
73
90
  * What `press` and `longPress` answer: the element, `closedKeyboard: true` when the keyboard was
74
91
  * closed first, and `forced` (the reason word) when `force` let through what the checks refuse.
@@ -86,7 +103,22 @@ export type PressResult = {
86
103
  x: number;
87
104
  y: number;
88
105
  };
106
+ /** With `again`: the second tap of a double tap. */
107
+ second?: PressSecond;
108
+ /** Whose handler took the touch, and its message if it threw (AGENT-TOOLS 1.13 §3). Absent on a dry run. */
109
+ handler?: HandlerFacts;
110
+ /** Requests that began during the action. Absent on a dry run. */
111
+ startedRequests?: number;
89
112
  } & SettleOutcome;
113
+ /** An own handler (`threw`: its message), or an ancestor's (`element`: that ancestor) that took the touch. */
114
+ export type HandlerFacts = {
115
+ kind: 'own';
116
+ threw?: string;
117
+ } | {
118
+ kind: 'parent';
119
+ element: TaplineElement;
120
+ threw?: string;
121
+ };
90
122
  export declare function press(params: unknown): Promise<PressResult>;
91
123
  export declare function longPress(params: unknown): Promise<PressResult>;
92
124
  /** What the SDK asks of the keyboard and the focused input; replaceable so tests need no native side. */
@@ -142,6 +174,28 @@ export type ScrollResult = {
142
174
  dryRun?: true;
143
175
  } & SettleOutcome;
144
176
  export declare function scroll(rawParams: unknown): Promise<ScrollResult>;
177
+ interface ScrollState {
178
+ /** The real content offset; negative at rest when the system adds an inset. */
179
+ offset: {
180
+ x: number;
181
+ y: number;
182
+ };
183
+ /** The furthest offset a scrollTo can reach. */
184
+ max: {
185
+ x: number;
186
+ y: number;
187
+ };
188
+ visible: {
189
+ x: number;
190
+ y: number;
191
+ };
192
+ }
193
+ /**
194
+ * The scroll view's real offset, from where its content container sits inside it. On the new
195
+ * architecture `measureInWindow` includes the content offset, so scroll frame minus content frame
196
+ * is the offset. Null when either can't be measured (old architecture, nothing laid out).
197
+ */
198
+ export declare function measureScrollState(entry: Entry): Promise<ScrollState | null>;
145
199
  export declare function toggle(rawParams: unknown): Promise<{
146
200
  element: TaplineElement;
147
201
  value: boolean;
@@ -190,6 +244,25 @@ export declare function audit(rawParams: unknown): Promise<{
190
244
  issues: AuditIssue[];
191
245
  checked: AuditType[];
192
246
  }>;
247
+ export interface UxIssue {
248
+ kind: UxKind;
249
+ element: TaplineElement | null;
250
+ where?: AuditWhere;
251
+ problem: string;
252
+ basis: string;
253
+ at?: {
254
+ file: string;
255
+ line: number;
256
+ direct: boolean;
257
+ };
258
+ }
259
+ /** `ux_check {wayBack?, earlier?}` (AGENT-TOOLS 1.12 §17.3): the screen against the usability basics. */
260
+ export declare function uxCheck(rawParams: unknown): Promise<{
261
+ issues: UxIssue[];
262
+ checked: UxCheckName[];
263
+ choices: number;
264
+ actions: UxAction[];
265
+ }>;
193
266
  export declare function getLogs(rawParams: unknown): Promise<{
194
267
  entries: LogEntry[];
195
268
  }>;