execbro 2.1.2 → 2.3.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.
- package/README.md +4 -3
- package/build/__tests__/integration/text-input.test.d.ts +2 -0
- package/build/__tests__/integration/text-input.test.d.ts.map +1 -0
- package/build/__tests__/integration/text-input.test.js +181 -0
- package/build/__tests__/integration/text-input.test.js.map +1 -0
- package/build/__tests__/unit/focusedInputTools.test.js +19 -6
- package/build/__tests__/unit/focusedInputTools.test.js.map +1 -1
- package/build/__tests__/unit/inputTarget.test.d.ts +2 -0
- package/build/__tests__/unit/inputTarget.test.d.ts.map +1 -0
- package/build/__tests__/unit/inputTarget.test.js +144 -0
- package/build/__tests__/unit/inputTarget.test.js.map +1 -0
- package/build/__tests__/unit/inputTargetTools.test.d.ts +2 -0
- package/build/__tests__/unit/inputTargetTools.test.d.ts.map +1 -0
- package/build/__tests__/unit/inputTargetTools.test.js +46 -0
- package/build/__tests__/unit/inputTargetTools.test.js.map +1 -0
- package/build/__tests__/unit/inputTextTool.test.d.ts +2 -0
- package/build/__tests__/unit/inputTextTool.test.d.ts.map +1 -0
- package/build/__tests__/unit/inputTextTool.test.js +120 -0
- package/build/__tests__/unit/inputTextTool.test.js.map +1 -0
- package/build/__tests__/unit/keyboardMetrics.test.d.ts +2 -0
- package/build/__tests__/unit/keyboardMetrics.test.d.ts.map +1 -0
- package/build/__tests__/unit/keyboardMetrics.test.js +58 -0
- package/build/__tests__/unit/keyboardMetrics.test.js.map +1 -0
- package/build/__tests__/unit/keyboardRaise.test.d.ts +2 -0
- package/build/__tests__/unit/keyboardRaise.test.d.ts.map +1 -0
- package/build/__tests__/unit/keyboardRaise.test.js +74 -0
- package/build/__tests__/unit/keyboardRaise.test.js.map +1 -0
- package/build/__tests__/unit/nativeInputValue.test.d.ts +2 -0
- package/build/__tests__/unit/nativeInputValue.test.d.ts.map +1 -0
- package/build/__tests__/unit/nativeInputValue.test.js +67 -0
- package/build/__tests__/unit/nativeInputValue.test.js.map +1 -0
- package/build/__tests__/unit/screenSpace.test.d.ts +2 -0
- package/build/__tests__/unit/screenSpace.test.d.ts.map +1 -0
- package/build/__tests__/unit/screenSpace.test.js +58 -0
- package/build/__tests__/unit/screenSpace.test.js.map +1 -0
- package/build/__tests__/unit/screenStateInputValue.test.d.ts +2 -0
- package/build/__tests__/unit/screenStateInputValue.test.d.ts.map +1 -0
- package/build/__tests__/unit/screenStateInputValue.test.js +49 -0
- package/build/__tests__/unit/screenStateInputValue.test.js.map +1 -0
- package/build/__tests__/unit/screenStateKeyboard.test.d.ts +2 -0
- package/build/__tests__/unit/screenStateKeyboard.test.d.ts.map +1 -0
- package/build/__tests__/unit/screenStateKeyboard.test.js +99 -0
- package/build/__tests__/unit/screenStateKeyboard.test.js.map +1 -0
- package/build/__tests__/unit/textEntry.test.d.ts +2 -0
- package/build/__tests__/unit/textEntry.test.d.ts.map +1 -0
- package/build/__tests__/unit/textEntry.test.js +291 -0
- package/build/__tests__/unit/textEntry.test.js.map +1 -0
- package/build/__tests__/unit/visibility.test.js +21 -0
- package/build/__tests__/unit/visibility.test.js.map +1 -1
- package/build/core/focusedInputTools.d.ts.map +1 -1
- package/build/core/focusedInputTools.js +13 -35
- package/build/core/focusedInputTools.js.map +1 -1
- package/build/core/guides.d.ts.map +1 -1
- package/build/core/guides.js +18 -4
- package/build/core/guides.js.map +1 -1
- package/build/core/index.d.ts +1 -1
- package/build/core/index.d.ts.map +1 -1
- package/build/core/index.js +1 -1
- package/build/core/index.js.map +1 -1
- package/build/core/injected/visibility.d.ts +14 -1
- package/build/core/injected/visibility.d.ts.map +1 -1
- package/build/core/injected/visibility.js +28 -4
- package/build/core/injected/visibility.js.map +1 -1
- package/build/core/injectedFilters.d.ts +31 -0
- package/build/core/injectedFilters.d.ts.map +1 -0
- package/build/core/injectedFilters.js +31 -0
- package/build/core/injectedFilters.js.map +1 -0
- package/build/core/inputTarget.d.ts +85 -0
- package/build/core/inputTarget.d.ts.map +1 -0
- package/build/core/inputTarget.js +364 -0
- package/build/core/inputTarget.js.map +1 -0
- package/build/core/inputTargetTools.d.ts +12 -0
- package/build/core/inputTargetTools.d.ts.map +1 -0
- package/build/core/inputTargetTools.js +26 -0
- package/build/core/inputTargetTools.js.map +1 -0
- package/build/core/inspector.d.ts +6 -0
- package/build/core/inspector.d.ts.map +1 -1
- package/build/core/inspector.js +200 -36
- package/build/core/inspector.js.map +1 -1
- package/build/core/ios.d.ts.map +1 -1
- package/build/core/ios.js +7 -1
- package/build/core/ios.js.map +1 -1
- package/build/core/keyboardMetrics.d.ts +11 -0
- package/build/core/keyboardMetrics.d.ts.map +1 -0
- package/build/core/keyboardMetrics.js +40 -0
- package/build/core/keyboardMetrics.js.map +1 -0
- package/build/core/keyboardRaise.d.ts +22 -0
- package/build/core/keyboardRaise.d.ts.map +1 -0
- package/build/core/keyboardRaise.js +74 -0
- package/build/core/keyboardRaise.js.map +1 -0
- package/build/core/nativeInputValue.d.ts +48 -0
- package/build/core/nativeInputValue.d.ts.map +1 -0
- package/build/core/nativeInputValue.js +113 -0
- package/build/core/nativeInputValue.js.map +1 -0
- package/build/core/pressables.d.ts +0 -32
- package/build/core/pressables.d.ts.map +1 -1
- package/build/core/pressables.js +5 -1061
- package/build/core/pressables.js.map +1 -1
- package/build/core/screenLayout.d.ts +3 -0
- package/build/core/screenLayout.d.ts.map +1 -1
- package/build/core/screenLayout.js +32 -0
- package/build/core/screenLayout.js.map +1 -1
- package/build/core/screenSpace.d.ts +75 -0
- package/build/core/screenSpace.d.ts.map +1 -0
- package/build/core/screenSpace.js +84 -0
- package/build/core/screenSpace.js.map +1 -0
- package/build/core/screenSpaceDevice.d.ts +15 -0
- package/build/core/screenSpaceDevice.d.ts.map +1 -0
- package/build/core/screenSpaceDevice.js +24 -0
- package/build/core/screenSpaceDevice.js.map +1 -0
- package/build/core/screenState.d.ts +39 -0
- package/build/core/screenState.d.ts.map +1 -1
- package/build/core/screenState.js +200 -16
- package/build/core/screenState.js.map +1 -1
- package/build/core/textEntry.d.ts +75 -0
- package/build/core/textEntry.d.ts.map +1 -0
- package/build/core/textEntry.js +252 -0
- package/build/core/textEntry.js.map +1 -0
- package/build/tools/componentTools.d.ts.map +1 -1
- package/build/tools/componentTools.js +63 -188
- package/build/tools/componentTools.js.map +1 -1
- package/build/tools/interactionTools.d.ts +13 -0
- package/build/tools/interactionTools.d.ts.map +1 -1
- package/build/tools/interactionTools.js +112 -2
- package/build/tools/interactionTools.js.map +1 -1
- package/build/tools/screenshotTools.d.ts.map +1 -1
- package/build/tools/screenshotTools.js +37 -72
- package/build/tools/screenshotTools.js.map +1 -1
- package/package.json +1 -1
- package/tools.json +10 -4
- package/build/__tests__/unit/focusedInput.test.d.ts +0 -2
- package/build/__tests__/unit/focusedInput.test.d.ts.map +0 -1
- package/build/__tests__/unit/focusedInput.test.js +0 -58
- package/build/__tests__/unit/focusedInput.test.js.map +0 -1
- package/build/core/focusedInput.d.ts +0 -27
- package/build/core/focusedInput.d.ts.map +0 -1
- package/build/core/focusedInput.js +0 -110
- package/build/core/focusedInput.js.map +0 -1
package/build/core/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,QAAQ;AACR,cAAc,YAAY,CAAC;AAE3B,8BAA8B;AAC9B,OAAO,EACL,2BAA2B,EAC3B,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,EAClB,sBAAsB,EACtB,mBAAmB,EACnB,kBAAkB,EAClB,aAAa,EACb,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACvB,wBAAwB,EACxB,qBAAqB,EACrB,4BAA4B,EAC5B,uBAAuB,EACvB,2BAA2B,EAC3B,uBAAuB,EACvB,qBAAqB,EACrB,cAAc;AACd,0BAA0B;AAC1B,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB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MAAM,mBAAmB,CAAC;AAEtD,kGAAkG;AAClG,OAAO,EACL,QAAQ,EACR,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,sBAAsB,CAAC;AAG9B,WAAW;AACX,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,SAAS;AACT,6BAA6B;AAC7B,gBAAgB,EAChB,eAAe,EACf,sBAAsB,EACtB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,QAAQ;AACR,cAAc,YAAY,CAAC;AAE3B,8BAA8B;AAC9B,OAAO,EACL,2BAA2B,EAC3B,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,EAClB,sBAAsB,EACtB,mBAAmB,EACnB,kBAAkB,EAClB,aAAa,EACb,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACvB,wBAAwB,EACxB,qBAAqB,EACrB,4BAA4B,EAC5B,uBAAuB,EACvB,2BAA2B,EAC3B,uBAAuB,EACvB,qBAAqB,EACrB,cAAc;AACd,0BAA0B;AAC1B,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB;AACnB,+CAA+C;AAC/C,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAE9B,QAAQ;AACR,OAAO,EACL,UAAU,EACV,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,EACtB,qBAAqB,EACrB,wBAAwB,EACxB,uBAAuB,EACvB,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,YAAY,CAAC;AAEpB,OAAO;AACP,OAAO,EACL,SAAS,EACT,cAAc,EACd,UAAU,EACV,OAAO,EACP,U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EAChB,YAAY,EACZ,cAAc,EACd,eAAe,EACf,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAGtB,YAAY;AACZ,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,gBAAgB,CAAC;AAExB,MAAM;AACN,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,UAAU,CAAC;AAGlB,wDAAwD;AACxD,OAAO,EACL,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,wBAAwB,CAAC;AAGhC,+BAA+B;AAC/B,OAAO,EACL,YAAY,EACZ,aAAa,EACb,mBAAmB,EACnB,sBAAsB,EACtB,UAAU,EACV,uBAAuB,EACvB,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAOrB,WAAW;AACX,OAAO,EACL,sBAAsB,EACtB,qBAAqB,EACrB,eAAe,EACf,cAAc,GACf,MAAM,eAAe,CAAC;AAEvB,yCAAyC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAG9D,eAAe;AACf,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -12,7 +12,20 @@
|
|
|
12
12
|
* props (aria-hidden, display:none, etc.).
|
|
13
13
|
*/
|
|
14
14
|
export declare function isHiddenNavigationScene(name: string | null, props: any): boolean;
|
|
15
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* A single style object that makes its subtree invisible.
|
|
17
|
+
*
|
|
18
|
+
* `opacity: 0` matters because a closed react-navigation drawer leaves its scrim
|
|
19
|
+
* mounted full-screen: it surfaced as a tappable `<Overlay />` covering the middle of
|
|
20
|
+
* every screen. Only a literal numeric 0 counts — an Animated opacity is a node object,
|
|
21
|
+
* and treating that as 0 would prune whole subtrees mid-animation.
|
|
22
|
+
*/
|
|
23
|
+
export declare function isHiddenStyle(s: any): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* JS source defining the visibility helpers for injection into an IIFE expression.
|
|
26
|
+
* `isHiddenStyle` must be emitted too — `isHiddenNavigationScene` calls it, and a missing
|
|
27
|
+
* definition would throw inside Hermes rather than fail here.
|
|
28
|
+
*/
|
|
16
29
|
export declare const VISIBILITY_HELPERS_JS: string;
|
|
17
30
|
/** Native-presented sheets whose measureInWindow geometry is untrustworthy. `openMarkers`
|
|
18
31
|
* are host component names that appear only while the sheet is actually presented. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visibility.d.ts","sourceRoot":"","sources":["../../../src/core/injected/visibility.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,KAAK,EAAE,GAAG,GAAG,OAAO,CAmBhF;AAED,
|
|
1
|
+
{"version":3,"file":"visibility.d.ts","sourceRoot":"","sources":["../../../src/core/injected/visibility.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,KAAK,EAAE,GAAG,GAAG,OAAO,CAmBhF;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,GAAG,GAAG,OAAO,CAK7C;AAED;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,QAGtB,CAAC;AAEb;uFACuF;AACvF,eAAO,MAAM,qBAAqB,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,EAAE,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,EAE9F,CAAC;AAEF,6FAA6F;AAC7F,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAQpG;AAED,2FAA2F;AAC3F,eAAO,MAAM,0BAA0B,QAAgE,CAAC"}
|
|
@@ -34,18 +34,42 @@ export function isHiddenNavigationScene(name, props) {
|
|
|
34
34
|
if (props.importantForAccessibility === "no-hide-descendants")
|
|
35
35
|
return true;
|
|
36
36
|
var s = props.style;
|
|
37
|
-
if (s && !Array.isArray(s) && s
|
|
37
|
+
if (s && !Array.isArray(s) && isHiddenStyle(s))
|
|
38
38
|
return true;
|
|
39
39
|
if (Array.isArray(s)) {
|
|
40
40
|
for (var i = 0; i < s.length; i++) {
|
|
41
|
-
if (s[i] && s[i]
|
|
41
|
+
if (s[i] && isHiddenStyle(s[i]))
|
|
42
42
|
return true;
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
return false;
|
|
46
46
|
}
|
|
47
|
-
/**
|
|
48
|
-
|
|
47
|
+
/**
|
|
48
|
+
* A single style object that makes its subtree invisible.
|
|
49
|
+
*
|
|
50
|
+
* `opacity: 0` matters because a closed react-navigation drawer leaves its scrim
|
|
51
|
+
* mounted full-screen: it surfaced as a tappable `<Overlay />` covering the middle of
|
|
52
|
+
* every screen. Only a literal numeric 0 counts — an Animated opacity is a node object,
|
|
53
|
+
* and treating that as 0 would prune whole subtrees mid-animation.
|
|
54
|
+
*/
|
|
55
|
+
export function isHiddenStyle(s) {
|
|
56
|
+
if (!s)
|
|
57
|
+
return false;
|
|
58
|
+
if (s.display === "none")
|
|
59
|
+
return true;
|
|
60
|
+
if (typeof s.opacity === "number" && s.opacity === 0)
|
|
61
|
+
return true;
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* JS source defining the visibility helpers for injection into an IIFE expression.
|
|
66
|
+
* `isHiddenStyle` must be emitted too — `isHiddenNavigationScene` calls it, and a missing
|
|
67
|
+
* definition would throw inside Hermes rather than fail here.
|
|
68
|
+
*/
|
|
69
|
+
export const VISIBILITY_HELPERS_JS = [
|
|
70
|
+
`var isHiddenStyle = ${isHiddenStyle.toString()};`,
|
|
71
|
+
`var isHiddenNavigationScene = ${isHiddenNavigationScene.toString()};`
|
|
72
|
+
].join("\n");
|
|
49
73
|
/** Native-presented sheets whose measureInWindow geometry is untrustworthy. `openMarkers`
|
|
50
74
|
* are host component names that appear only while the sheet is actually presented. */
|
|
51
75
|
export const NATIVE_SHEET_REGISTRY = [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visibility.js","sourceRoot":"","sources":["../../../src/core/injected/visibility.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,uFAAuF;AACvF,4EAA4E;AAE5E;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,uBAAuB,CAAC,IAAmB,EAAE,KAAU;IACnE,IAAI,CAAC,KAAK;QAAE,OAAO,KAAK,CAAC;IACzB,IAAI,IAAI,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,KAAK,KAAK,IAAI,KAAK,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IAC7E,IAAI,IAAI,KAAK,WAAW,IAAI,KAAK,CAAC,OAAO,KAAK,KAAK;QAAE,OAAO,IAAI,CAAC;IACjE,IAAI,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,WAAW,IAAI,IAAI,KAAK,aAAa,EAAE,CAAC;QACtE,IAAI,KAAK,CAAC,aAAa,KAAK,CAAC;YAAE,OAAO,IAAI,CAAC;QAC3C,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,IAAI,CAAC;IACxC,CAAC;IACD,IAAI,KAAK,CAAC,aAAa,CAAC,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAC/C,IAAI,KAAK,CAAC,2BAA2B,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAC5D,IAAI,KAAK,CAAC,yBAAyB,KAAK,qBAAqB;QAAE,OAAO,IAAI,CAAC;IAC3E,IAAI,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC;IACpB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"visibility.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AC;IACL,CAAC;IACD,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,2FAA2F;AAC3F,MAAM,CAAC,MAAM,0BAA0B,GAAG,qBAAqB,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Component-name filters shared by every injected fiber walker.
|
|
3
|
+
*
|
|
4
|
+
* These decide which fiber gets to name an element. They MUST be identical
|
|
5
|
+
* across walkers: an agent reads a component name out of get_screen_state and
|
|
6
|
+
* then passes it straight back as an input_text/tap target. If screenState
|
|
7
|
+
* filtered `TextAncestorContext` but the input resolver did not, screenState
|
|
8
|
+
* would print `<InputField />` while the resolver answered to
|
|
9
|
+
* `TextAncestorContext` — and the name the agent could see would be the one
|
|
10
|
+
* name that did not work.
|
|
11
|
+
*
|
|
12
|
+
* Exported as SOURCE STRINGS because they are interpolated into template
|
|
13
|
+
* literals that Hermes compiles, not used as TS RegExp objects. These are
|
|
14
|
+
* ordinary TS strings, so `\\(` here is the value `\(` — which is what must
|
|
15
|
+
* reach the device. (Inside screenState's template literal the same character
|
|
16
|
+
* has to be written `\\(`; the doubling there is template escaping, not part
|
|
17
|
+
* of the pattern.)
|
|
18
|
+
*/
|
|
19
|
+
/** Internal/framework wrappers that must never be reported as an element's name. */
|
|
20
|
+
export declare const RN_PRIMITIVES_SRC = "/^(Animated\\(.*|withAnimated.*|AnimatedComponent.*|ForwardRef.*|memo\\(.*|Context\\.Consumer|Context\\.Provider|ScrollViewContext(Base)?|VirtualizedListContext(Resetter)?|TextInputContext|KeyboardAvoidingViewContext|RCT.*|RNS.*|RNC.*|ViewManagerAdapter_.*|VirtualizedList.*|CellRenderer.*|FrameSizeProvider.*|MaybeScreenContainer|MaybeScreen|Navigation.*|Screen$|ScreenStack|ScreenContainer|ScreenContentWrapper|SceneView|DelayedFreeze|Freeze|Suspender|DebugContainer|StaticContainer|SafeAreaProvider.*|SafeAreaFrameContext|SafeAreaInsetsContext|ExpoRoot|ExpoRootComponent|GestureHandler.*|NativeViewGestureHandler|GestureDetector|PanGestureHandler|Reanimated.*|BottomTabNavigator|TabLayout|RouteNode|Route$|KeyboardProvider|PortalProviderComponent|BottomSheetModalProviderWrapper|ThemeContext|ThemeProvider|TextAncestorContext|PressabilityDebugView|TouchableHighlightImpl|StatusBarOverlay|BottomSheetHostingContainerComponent|BottomSheetGestureHandlersProvider|BottomSheetBackdropContainerComponent|BottomSheetContainerComponent|BottomSheetDraggableViewComponent|BottomSheetHandleContainerComponent|BottomSheetBackgroundContainerComponent|DebuggingOverlay|InspectorDeferred|Inspector|InspectorOverlay|InspectorPanel|StyleInspector|BoxInspector|BoxContainer|ElementBox|BorderBox|InspectorPanelButton)$/";
|
|
21
|
+
/** Names too generic to identify anything — keep climbing past these.
|
|
22
|
+
*
|
|
23
|
+
* Scroll/list containers belong here: they are layout, not identity. Without them a
|
|
24
|
+
* climb out of a plain `<Pressable>` inside a `<ScrollView>` stopped on the scroll
|
|
25
|
+
* container, so every button on such a screen was reported as `<ScrollView />`
|
|
26
|
+
* ("Submit", "Cancel", "Отправить" all came back with that tag). Callers that find
|
|
27
|
+
* nothing meaningful above a pressable must fall back to naming the pressable itself
|
|
28
|
+
* rather than climbing further — the next non-generic ancestor is typically the whole
|
|
29
|
+
* screen component, which is a worse answer than "Pressable". */
|
|
30
|
+
export declare const GENERIC_COMPONENT_SRC = "/^(View|TouchableOpacity|TouchableHighlight|TouchableWithoutFeedback|Pressable|TouchableNativeFeedback|Text|RCTView|RCTText|ScrollView|FlatList|SectionList|VirtualizedList|KeyboardAvoidingView|SafeAreaView|Unknown)$/";
|
|
31
|
+
//# sourceMappingURL=injectedFilters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"injectedFilters.d.ts","sourceRoot":"","sources":["../../src/core/injectedFilters.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,oFAAoF;AACpF,eAAO,MAAM,iBAAiB,4xCAC+vC,CAAC;AAE9xC;;;;;;;;kEAQkE;AAClE,eAAO,MAAM,qBAAqB,6NAC4L,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Component-name filters shared by every injected fiber walker.
|
|
3
|
+
*
|
|
4
|
+
* These decide which fiber gets to name an element. They MUST be identical
|
|
5
|
+
* across walkers: an agent reads a component name out of get_screen_state and
|
|
6
|
+
* then passes it straight back as an input_text/tap target. If screenState
|
|
7
|
+
* filtered `TextAncestorContext` but the input resolver did not, screenState
|
|
8
|
+
* would print `<InputField />` while the resolver answered to
|
|
9
|
+
* `TextAncestorContext` — and the name the agent could see would be the one
|
|
10
|
+
* name that did not work.
|
|
11
|
+
*
|
|
12
|
+
* Exported as SOURCE STRINGS because they are interpolated into template
|
|
13
|
+
* literals that Hermes compiles, not used as TS RegExp objects. These are
|
|
14
|
+
* ordinary TS strings, so `\\(` here is the value `\(` — which is what must
|
|
15
|
+
* reach the device. (Inside screenState's template literal the same character
|
|
16
|
+
* has to be written `\\(`; the doubling there is template escaping, not part
|
|
17
|
+
* of the pattern.)
|
|
18
|
+
*/
|
|
19
|
+
/** Internal/framework wrappers that must never be reported as an element's name. */
|
|
20
|
+
export const RN_PRIMITIVES_SRC = "/^(Animated\\(.*|withAnimated.*|AnimatedComponent.*|ForwardRef.*|memo\\(.*|Context\\.Consumer|Context\\.Provider|ScrollViewContext(Base)?|VirtualizedListContext(Resetter)?|TextInputContext|KeyboardAvoidingViewContext|RCT.*|RNS.*|RNC.*|ViewManagerAdapter_.*|VirtualizedList.*|CellRenderer.*|FrameSizeProvider.*|MaybeScreenContainer|MaybeScreen|Navigation.*|Screen$|ScreenStack|ScreenContainer|ScreenContentWrapper|SceneView|DelayedFreeze|Freeze|Suspender|DebugContainer|StaticContainer|SafeAreaProvider.*|SafeAreaFrameContext|SafeAreaInsetsContext|ExpoRoot|ExpoRootComponent|GestureHandler.*|NativeViewGestureHandler|GestureDetector|PanGestureHandler|Reanimated.*|BottomTabNavigator|TabLayout|RouteNode|Route$|KeyboardProvider|PortalProviderComponent|BottomSheetModalProviderWrapper|ThemeContext|ThemeProvider|TextAncestorContext|PressabilityDebugView|TouchableHighlightImpl|StatusBarOverlay|BottomSheetHostingContainerComponent|BottomSheetGestureHandlersProvider|BottomSheetBackdropContainerComponent|BottomSheetContainerComponent|BottomSheetDraggableViewComponent|BottomSheetHandleContainerComponent|BottomSheetBackgroundContainerComponent|DebuggingOverlay|InspectorDeferred|Inspector|InspectorOverlay|InspectorPanel|StyleInspector|BoxInspector|BoxContainer|ElementBox|BorderBox|InspectorPanelButton)$/";
|
|
21
|
+
/** Names too generic to identify anything — keep climbing past these.
|
|
22
|
+
*
|
|
23
|
+
* Scroll/list containers belong here: they are layout, not identity. Without them a
|
|
24
|
+
* climb out of a plain `<Pressable>` inside a `<ScrollView>` stopped on the scroll
|
|
25
|
+
* container, so every button on such a screen was reported as `<ScrollView />`
|
|
26
|
+
* ("Submit", "Cancel", "Отправить" all came back with that tag). Callers that find
|
|
27
|
+
* nothing meaningful above a pressable must fall back to naming the pressable itself
|
|
28
|
+
* rather than climbing further — the next non-generic ancestor is typically the whole
|
|
29
|
+
* screen component, which is a worse answer than "Pressable". */
|
|
30
|
+
export const GENERIC_COMPONENT_SRC = "/^(View|TouchableOpacity|TouchableHighlight|TouchableWithoutFeedback|Pressable|TouchableNativeFeedback|Text|RCTView|RCTText|ScrollView|FlatList|SectionList|VirtualizedList|KeyboardAvoidingView|SafeAreaView|Unknown)$/";
|
|
31
|
+
//# sourceMappingURL=injectedFilters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"injectedFilters.js","sourceRoot":"","sources":["../../src/core/injectedFilters.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,oFAAoF;AACpF,MAAM,CAAC,MAAM,iBAAiB,GAC1B,yxCAAyxC,CAAC;AAE9xC;;;;;;;;kEAQkE;AAClE,MAAM,CAAC,MAAM,qBAAqB,GAC9B,0NAA0N,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The single fiber resolver for text inputs.
|
|
3
|
+
*
|
|
4
|
+
* Replaces the three copy-pasted walkers that lived in focusedInput.ts and
|
|
5
|
+
* fixes both of their blind spots — each of which made the tools report
|
|
6
|
+
* "no focused TextInput" while a field WAS focused:
|
|
7
|
+
*
|
|
8
|
+
* 1. They took roots[0] and stopped, hiding inputs mounted under a second
|
|
9
|
+
* fiber root (modal and portal roots).
|
|
10
|
+
* 2. They read stateNode.canonical.publicInstance unconditionally, which is
|
|
11
|
+
* Fabric-only. Paper exposes the instance as stateNode itself.
|
|
12
|
+
*
|
|
13
|
+
* The emitted source is compiled by Hermes, not tsc: no async/await, and no
|
|
14
|
+
* require() beyond the injected __eb_require. Non-ASCII in embedded literals is
|
|
15
|
+
* escaped server-side by executeInApp, so values go in via JSON.stringify.
|
|
16
|
+
*/
|
|
17
|
+
export type InputQuery = {
|
|
18
|
+
testID?: string;
|
|
19
|
+
component?: string;
|
|
20
|
+
/** Matches the input's value, placeholder, accessibilityLabel or visible field label. */
|
|
21
|
+
textMatch?: string;
|
|
22
|
+
/** Zero-based choice among matches. Required when a target matches more than one input. */
|
|
23
|
+
index?: number;
|
|
24
|
+
};
|
|
25
|
+
/** What an agent needs to tell two inputs apart and target the right one. */
|
|
26
|
+
export type InputCandidate = {
|
|
27
|
+
index: number;
|
|
28
|
+
component: string | null;
|
|
29
|
+
label: string | null;
|
|
30
|
+
placeholder: string | null;
|
|
31
|
+
value: string | null;
|
|
32
|
+
testID: string | null;
|
|
33
|
+
};
|
|
34
|
+
export type InputOp = {
|
|
35
|
+
kind: "find";
|
|
36
|
+
} | {
|
|
37
|
+
kind: "focus";
|
|
38
|
+
} | {
|
|
39
|
+
kind: "read";
|
|
40
|
+
} | {
|
|
41
|
+
kind: "setValue";
|
|
42
|
+
value: string;
|
|
43
|
+
}
|
|
44
|
+
/** Writes native text directly, for a field with no handler to drive. */
|
|
45
|
+
| {
|
|
46
|
+
kind: "setNative";
|
|
47
|
+
value: string;
|
|
48
|
+
} | {
|
|
49
|
+
kind: "clear";
|
|
50
|
+
} | {
|
|
51
|
+
kind: "blur";
|
|
52
|
+
};
|
|
53
|
+
export type InputFound = {
|
|
54
|
+
found: true;
|
|
55
|
+
focused: boolean;
|
|
56
|
+
nativeTag: number | null;
|
|
57
|
+
value: string | null;
|
|
58
|
+
/** The resolved field's testID, so a native read-back can find the same one. */
|
|
59
|
+
testID: string | null;
|
|
60
|
+
/**
|
|
61
|
+
* True when the field's value prop mirrors its text — the only way to read
|
|
62
|
+
* it back from JS, and therefore the only way a write can be verified.
|
|
63
|
+
*/
|
|
64
|
+
controlled: boolean;
|
|
65
|
+
hasOnChangeText: boolean;
|
|
66
|
+
ok: boolean;
|
|
67
|
+
via?: string;
|
|
68
|
+
};
|
|
69
|
+
export type InputMissing = {
|
|
70
|
+
found: false;
|
|
71
|
+
reason: string;
|
|
72
|
+
/** True when the target matched several inputs and none was chosen. */
|
|
73
|
+
ambiguous?: boolean;
|
|
74
|
+
candidates?: InputCandidate[];
|
|
75
|
+
/**
|
|
76
|
+
* How many inputs exist in total. The candidate list is capped, and a cap
|
|
77
|
+
* that is not reported reads as "this is everything" — which is how a
|
|
78
|
+
* caller concludes the field it wants is absent when it is simply beyond
|
|
79
|
+
* the cut.
|
|
80
|
+
*/
|
|
81
|
+
totalInputs?: number;
|
|
82
|
+
};
|
|
83
|
+
export type InputResult = InputFound | InputMissing;
|
|
84
|
+
export declare function buildInputExpression(op: InputOp, query?: InputQuery): string;
|
|
85
|
+
//# sourceMappingURL=inputTarget.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inputTarget.d.ts","sourceRoot":"","sources":["../../src/core/inputTarget.ts"],"names":[],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AAe,EAAE,OAAO,CAAC;IACzB,EAAE,EAAE,OAAO,CAAC;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACvB,KAAK,EAAE,KAAK,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,uEAAuE;IACvE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,cAAc,EAAE,CAAC;IAC9B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,YAAY,CAAC;AA4RpD,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,UAAU,GAAG,MAAM,CA4E5E"}
|
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The single fiber resolver for text inputs.
|
|
3
|
+
*
|
|
4
|
+
* Replaces the three copy-pasted walkers that lived in focusedInput.ts and
|
|
5
|
+
* fixes both of their blind spots — each of which made the tools report
|
|
6
|
+
* "no focused TextInput" while a field WAS focused:
|
|
7
|
+
*
|
|
8
|
+
* 1. They took roots[0] and stopped, hiding inputs mounted under a second
|
|
9
|
+
* fiber root (modal and portal roots).
|
|
10
|
+
* 2. They read stateNode.canonical.publicInstance unconditionally, which is
|
|
11
|
+
* Fabric-only. Paper exposes the instance as stateNode itself.
|
|
12
|
+
*
|
|
13
|
+
* The emitted source is compiled by Hermes, not tsc: no async/await, and no
|
|
14
|
+
* require() beyond the injected __eb_require. Non-ASCII in embedded literals is
|
|
15
|
+
* escaped server-side by executeInApp, so values go in via JSON.stringify.
|
|
16
|
+
*/
|
|
17
|
+
import { RN_PRIMITIVES_SRC, GENERIC_COMPONENT_SRC } from "./injectedFilters.js";
|
|
18
|
+
const HOST_INPUT_TYPES = `["RCTSinglelineTextInputView","RCTMultilineTextInputView","AndroidTextInput"]`;
|
|
19
|
+
const NO_FOCUS_REASON = "no focused TextInput. Pass testID (or component) so this tool can focus a field itself, " +
|
|
20
|
+
"or tap the field first. A tap reporting success does not guarantee React focus.";
|
|
21
|
+
/** Collects every root, defines the shape-tolerant helpers, resolves __eb_host. */
|
|
22
|
+
function prelude(query) {
|
|
23
|
+
const wantTestID = query?.testID != null ? JSON.stringify(query.testID) : "null";
|
|
24
|
+
const wantComponent = query?.component != null ? JSON.stringify(query.component) : "null";
|
|
25
|
+
const wantText = query?.textMatch != null ? JSON.stringify(query.textMatch) : "null";
|
|
26
|
+
return `
|
|
27
|
+
var hook = global.__REACT_DEVTOOLS_GLOBAL_HOOK__;
|
|
28
|
+
if (!hook) return { found: false, reason: "no devtools hook" };
|
|
29
|
+
|
|
30
|
+
var allRoots = [];
|
|
31
|
+
var rendererIds = Array.from(hook.renderers.keys());
|
|
32
|
+
for (var ri = 0; ri < rendererIds.length; ri++) {
|
|
33
|
+
var rs = Array.from(hook.getFiberRoots(rendererIds[ri]) || []);
|
|
34
|
+
for (var rj = 0; rj < rs.length; rj++) allRoots.push(rs[rj]);
|
|
35
|
+
}
|
|
36
|
+
if (allRoots.length === 0) return { found: false, reason: "no fiber roots" };
|
|
37
|
+
|
|
38
|
+
var HOSTS = ${HOST_INPUT_TYPES};
|
|
39
|
+
var wantTestID = ${wantTestID};
|
|
40
|
+
var wantComponent = ${wantComponent};
|
|
41
|
+
var wantText = ${wantText};
|
|
42
|
+
|
|
43
|
+
function __eb_name(t) { return typeof t === "string" ? t : (t && (t.displayName || t.name)) || null; }
|
|
44
|
+
|
|
45
|
+
function __eb_pub(f) {
|
|
46
|
+
var sn = f && f.stateNode;
|
|
47
|
+
if (!sn) return null;
|
|
48
|
+
if (sn.canonical && sn.canonical.publicInstance) return sn.canonical.publicInstance;
|
|
49
|
+
if (sn.canonical) return sn.canonical;
|
|
50
|
+
return sn;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
var RN_PRIMITIVES = ${RN_PRIMITIVES_SRC};
|
|
54
|
+
var GENERIC_COMPONENT = ${GENERIC_COMPONENT_SRC};
|
|
55
|
+
|
|
56
|
+
// The fiber whose onChangeText we call and whose value we read: the INNERMOST
|
|
57
|
+
// composite carrying it. Host fibers are skipped — props are spread down to
|
|
58
|
+
// them, so the host's onChangeText is the same function reached one level up,
|
|
59
|
+
// but only the composite is a documented RN contract of (text: string).
|
|
60
|
+
function __eb_owner(hostFiber) {
|
|
61
|
+
for (var p = hostFiber; p; p = p.return) {
|
|
62
|
+
if (typeof p.type === "string") continue;
|
|
63
|
+
if (p.memoizedProps && typeof p.memoizedProps.onChangeText === "function") return p;
|
|
64
|
+
}
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// A field's descriptive props. An input with NO onChangeText has no owner
|
|
69
|
+
// composite at all, so reading placeholder/value from the owner alone makes
|
|
70
|
+
// handler-less fields invisible to textMatch and blank in candidate lists.
|
|
71
|
+
function __eb_props(hostFiber) {
|
|
72
|
+
var o = __eb_owner(hostFiber);
|
|
73
|
+
return (o && o.memoizedProps) || hostFiber.memoizedProps || {};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// The field wrapper — the OUTERMOST ancestor still carrying onChangeText.
|
|
77
|
+
//
|
|
78
|
+
// A generic capped climb cannot find this. Measured on a real form: the
|
|
79
|
+
// wrapper (FormInput) sits 10 levels above the host behind four plain Views,
|
|
80
|
+
// so a 4-composite budget is spent on Views long before reaching it, and
|
|
81
|
+
// every input resolves to nothing. get_screen_state only names it because it
|
|
82
|
+
// matches that fiber directly. onChangeText is the signal that separates a
|
|
83
|
+
// field's own wrapper from the layout Views around it.
|
|
84
|
+
function __eb_fieldFiber(hostFiber) {
|
|
85
|
+
var best = null;
|
|
86
|
+
var p = hostFiber;
|
|
87
|
+
var d = 0;
|
|
88
|
+
while (p && d < 30) {
|
|
89
|
+
if (typeof p.type !== "string" && p.memoizedProps &&
|
|
90
|
+
typeof p.memoizedProps.onChangeText === "function") {
|
|
91
|
+
var n = __eb_name(p.type);
|
|
92
|
+
if (n && !RN_PRIMITIVES.test(n) && !GENERIC_COMPONENT.test(n)) best = p;
|
|
93
|
+
}
|
|
94
|
+
p = p.return;
|
|
95
|
+
d++;
|
|
96
|
+
}
|
|
97
|
+
return best;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// testID at the host or its controlling owner ONLY — never an arbitrary
|
|
101
|
+
// ancestor. Climbing freely picks up a ScrollView's internal nativeID: on a
|
|
102
|
+
// 7-field form every input answered to testID "7", so one target matched
|
|
103
|
+
// them all. nativeID is accepted only as a fallback on those same two fibers.
|
|
104
|
+
function __eb_testIDOf(hostFiber) {
|
|
105
|
+
var owner = __eb_owner(hostFiber);
|
|
106
|
+
var scope = owner && owner !== hostFiber ? [hostFiber, owner] : [hostFiber];
|
|
107
|
+
var s;
|
|
108
|
+
for (s = 0; s < scope.length; s++) {
|
|
109
|
+
var mp = scope[s].memoizedProps;
|
|
110
|
+
if (mp && mp.testID) return mp.testID;
|
|
111
|
+
}
|
|
112
|
+
for (s = 0; s < scope.length; s++) {
|
|
113
|
+
var mp2 = scope[s].memoizedProps;
|
|
114
|
+
if (mp2 && mp2.nativeID) return mp2.nativeID;
|
|
115
|
+
}
|
|
116
|
+
return null;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// The authored component name. Prefer the field wrapper; fall back to the
|
|
120
|
+
// capped composite climb get_screen_state uses for inputs that have no
|
|
121
|
+
// wrapper of their own. The filters matter either way — without them every
|
|
122
|
+
// input reports "TextAncestorContext", which names nothing and matches all.
|
|
123
|
+
function __eb_componentFiber(hostFiber) {
|
|
124
|
+
var field = __eb_fieldFiber(hostFiber);
|
|
125
|
+
if (field) return field;
|
|
126
|
+
var an = hostFiber.return;
|
|
127
|
+
var composites = 0;
|
|
128
|
+
var dep = 0;
|
|
129
|
+
while (an && dep < 12 && composites < 4) {
|
|
130
|
+
if (typeof an.type !== "string" && an.type !== null) {
|
|
131
|
+
var n = __eb_name(an.type);
|
|
132
|
+
if (n) {
|
|
133
|
+
composites++;
|
|
134
|
+
if (!RN_PRIMITIVES.test(n) && !GENERIC_COMPONENT.test(n)) return an;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
an = an.return;
|
|
138
|
+
dep++;
|
|
139
|
+
}
|
|
140
|
+
return null;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function __eb_componentOf(hostFiber) {
|
|
144
|
+
var cf = __eb_componentFiber(hostFiber);
|
|
145
|
+
return cf ? __eb_name(cf.type) : null;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// The field's visible label — the text the wrapper renders beside the input
|
|
149
|
+
// ("First Name"), which is how a human identifies a field and how
|
|
150
|
+
// get_screen_state prints it. Host input subtrees are skipped so a field's
|
|
151
|
+
// own value never becomes its label.
|
|
152
|
+
function __eb_labelOf(hostFiber) {
|
|
153
|
+
var cf = __eb_componentFiber(hostFiber);
|
|
154
|
+
if (!cf) return null;
|
|
155
|
+
var parts = [];
|
|
156
|
+
(function collect(f, d) {
|
|
157
|
+
if (!f || d > 14 || parts.length >= 4) return;
|
|
158
|
+
// Never descend into an input: a field's own value must not become its label.
|
|
159
|
+
if (HOSTS.indexOf(__eb_name(f.type)) !== -1) return;
|
|
160
|
+
var mp = f.memoizedProps;
|
|
161
|
+
if (mp && typeof mp.children === "string" && mp.children.trim().length > 0) {
|
|
162
|
+
// Take the outermost fiber of a text branch and stop. A single label
|
|
163
|
+
// repeats down its Text -> RCTText chain, which otherwise renders as
|
|
164
|
+
// "Title Title Title *".
|
|
165
|
+
parts.push(mp.children.trim());
|
|
166
|
+
if (f.sibling) collect(f.sibling, d);
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
if (f.child) collect(f.child, d + 1);
|
|
170
|
+
if (f.sibling) collect(f.sibling, d);
|
|
171
|
+
})(cf.child, 0);
|
|
172
|
+
return parts.length ? parts.join(" ").slice(0, 80) : null;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
function __eb_describe(hostFiber, idx) {
|
|
176
|
+
var op = __eb_props(hostFiber);
|
|
177
|
+
return {
|
|
178
|
+
index: idx,
|
|
179
|
+
component: __eb_componentOf(hostFiber),
|
|
180
|
+
label: __eb_labelOf(hostFiber),
|
|
181
|
+
placeholder: op.placeholder != null ? String(op.placeholder) : null,
|
|
182
|
+
value: op.value != null ? String(op.value) : null,
|
|
183
|
+
testID: __eb_testIDOf(hostFiber)
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
var __eb_inputs = [];
|
|
188
|
+
for (var k = 0; k < allRoots.length; k++) {
|
|
189
|
+
(function walk(f, depth) {
|
|
190
|
+
if (!f || depth > 600) return;
|
|
191
|
+
if (HOSTS.indexOf(__eb_name(f.type)) !== -1) __eb_inputs.push(f);
|
|
192
|
+
if (f.child) walk(f.child, depth + 1);
|
|
193
|
+
if (f.sibling) walk(f.sibling, depth);
|
|
194
|
+
})(allRoots[k].current, 0);
|
|
195
|
+
}
|
|
196
|
+
if (__eb_inputs.length === 0) return { found: false, reason: "no TextInput found on screen" };
|
|
197
|
+
|
|
198
|
+
// EVERY match is collected. Taking the first silently is how a form gets the
|
|
199
|
+
// right text written into the wrong field and still verifies clean — the
|
|
200
|
+
// exact class of confident-but-wrong result this tool exists to remove.
|
|
201
|
+
var __eb_matches = [];
|
|
202
|
+
var i;
|
|
203
|
+
if (wantTestID !== null) {
|
|
204
|
+
for (i = 0; i < __eb_inputs.length; i++) {
|
|
205
|
+
if (__eb_testIDOf(__eb_inputs[i]) === wantTestID) __eb_matches.push(__eb_inputs[i]);
|
|
206
|
+
}
|
|
207
|
+
} else if (wantComponent !== null) {
|
|
208
|
+
var wc = String(wantComponent).toLowerCase();
|
|
209
|
+
for (i = 0; i < __eb_inputs.length; i++) {
|
|
210
|
+
var cn = __eb_componentOf(__eb_inputs[i]);
|
|
211
|
+
if (cn && cn.toLowerCase().indexOf(wc) !== -1) __eb_matches.push(__eb_inputs[i]);
|
|
212
|
+
}
|
|
213
|
+
} else if (wantText !== null) {
|
|
214
|
+
var wt = String(wantText).toLowerCase();
|
|
215
|
+
for (i = 0; i < __eb_inputs.length; i++) {
|
|
216
|
+
var mp3 = __eb_props(__eb_inputs[i]);
|
|
217
|
+
var hay = String(
|
|
218
|
+
(mp3.value || "") + " " + (mp3.placeholder || "") + " " +
|
|
219
|
+
(mp3.accessibilityLabel || "") + " " + (__eb_labelOf(__eb_inputs[i]) || "")
|
|
220
|
+
).toLowerCase();
|
|
221
|
+
if (hay.indexOf(wt) !== -1) __eb_matches.push(__eb_inputs[i]);
|
|
222
|
+
}
|
|
223
|
+
} else {
|
|
224
|
+
for (i = 0; i < __eb_inputs.length; i++) {
|
|
225
|
+
var pf = __eb_pub(__eb_inputs[i]);
|
|
226
|
+
if (pf && pf.isFocused && pf.isFocused()) __eb_matches.push(__eb_inputs[i]);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
var targeted = (wantTestID !== null || wantComponent !== null || wantText !== null);
|
|
231
|
+
|
|
232
|
+
if (__eb_matches.length === 0) {
|
|
233
|
+
var candidates = [];
|
|
234
|
+
for (var c = 0; c < __eb_inputs.length && candidates.length < 12; c++) {
|
|
235
|
+
candidates.push(__eb_describe(__eb_inputs[c], c));
|
|
236
|
+
}
|
|
237
|
+
return {
|
|
238
|
+
found: false,
|
|
239
|
+
reason: targeted
|
|
240
|
+
? ("no TextInput matched that target (" + __eb_inputs.length + " input(s) mounted)")
|
|
241
|
+
: ${JSON.stringify(NO_FOCUS_REASON)},
|
|
242
|
+
candidates: candidates,
|
|
243
|
+
totalInputs: __eb_inputs.length
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
var __eb_index = ${typeof query?.index === "number" ? String(query.index) : "null"};
|
|
248
|
+
if (__eb_index !== null) {
|
|
249
|
+
if (__eb_index < 0 || __eb_index >= __eb_matches.length) {
|
|
250
|
+
return {
|
|
251
|
+
found: false,
|
|
252
|
+
reason: "index " + __eb_index + " is out of range — " + __eb_matches.length + " input(s) matched",
|
|
253
|
+
candidates: __eb_matches.map(__eb_describe),
|
|
254
|
+
totalInputs: __eb_inputs.length
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
} else if (__eb_matches.length > 1) {
|
|
258
|
+
return {
|
|
259
|
+
found: false,
|
|
260
|
+
ambiguous: true,
|
|
261
|
+
reason: __eb_matches.length + " inputs match this target — pass index to choose one, or target more precisely",
|
|
262
|
+
candidates: __eb_matches.map(__eb_describe),
|
|
263
|
+
totalInputs: __eb_inputs.length
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
var __eb_host = __eb_matches[__eb_index === null ? 0 : __eb_index];
|
|
268
|
+
|
|
269
|
+
var __eb_ownerFiber = __eb_owner(__eb_host);
|
|
270
|
+
var __eb_pubi = __eb_pub(__eb_host);
|
|
271
|
+
// Controlled means the value prop MIRRORS the field's text — the only way to
|
|
272
|
+
// read a field back from JS. RN does not reflect native text into fiber props
|
|
273
|
+
// for uncontrolled inputs (verified on device: the host's text prop stays
|
|
274
|
+
// undefined after typing, though mostRecentEventCount increments; an
|
|
275
|
+
// uncontrolled field
|
|
276
|
+
// cannot be verified this way no matter which write path put the text there.
|
|
277
|
+
var __eb_controlled = !!(__eb_ownerFiber &&
|
|
278
|
+
typeof __eb_ownerFiber.memoizedProps.value === "string");
|
|
279
|
+
var __eb_value = __eb_controlled
|
|
280
|
+
? String(__eb_ownerFiber.memoizedProps.value) : null;
|
|
281
|
+
var __eb_focused = !!(__eb_pubi && __eb_pubi.isFocused && __eb_pubi.isFocused());
|
|
282
|
+
var __eb_tag = __eb_pubi && __eb_pubi.__nativeTag != null ? __eb_pubi.__nativeTag : null;
|
|
283
|
+
`;
|
|
284
|
+
}
|
|
285
|
+
/** The always-present fields of a found result. */
|
|
286
|
+
const BASE = `
|
|
287
|
+
found: true,
|
|
288
|
+
focused: __eb_focused,
|
|
289
|
+
nativeTag: __eb_tag,
|
|
290
|
+
value: __eb_value,
|
|
291
|
+
testID: __eb_testIDOf(__eb_host),
|
|
292
|
+
controlled: __eb_controlled,
|
|
293
|
+
hasOnChangeText: !!__eb_ownerFiber`;
|
|
294
|
+
export function buildInputExpression(op, query) {
|
|
295
|
+
let action;
|
|
296
|
+
switch (op.kind) {
|
|
297
|
+
case "find":
|
|
298
|
+
case "read":
|
|
299
|
+
action = `
|
|
300
|
+
return { ${BASE}, ok: true };`;
|
|
301
|
+
break;
|
|
302
|
+
case "focus":
|
|
303
|
+
action = `
|
|
304
|
+
if (__eb_pubi && typeof __eb_pubi.focus === "function") {
|
|
305
|
+
__eb_pubi.focus();
|
|
306
|
+
return { ${BASE}, focused: true, ok: true, via: "publicInstance.focus" };
|
|
307
|
+
}
|
|
308
|
+
return { ${BASE}, ok: false, via: "input exposes no focus() method" };`;
|
|
309
|
+
break;
|
|
310
|
+
case "blur":
|
|
311
|
+
action = `
|
|
312
|
+
if (__eb_pubi && typeof __eb_pubi.blur === "function") {
|
|
313
|
+
__eb_pubi.blur();
|
|
314
|
+
return { ${BASE}, focused: false, ok: true, via: "publicInstance.blur" };
|
|
315
|
+
}
|
|
316
|
+
return { ${BASE}, ok: false, via: "input exposes no blur() method" };`;
|
|
317
|
+
break;
|
|
318
|
+
case "setValue":
|
|
319
|
+
action = `
|
|
320
|
+
var next = ${JSON.stringify(op.value)};
|
|
321
|
+
if (__eb_ownerFiber) {
|
|
322
|
+
__eb_ownerFiber.memoizedProps.onChangeText(next);
|
|
323
|
+
return { ${BASE}, value: next, ok: true, via: "onChangeText" };
|
|
324
|
+
}
|
|
325
|
+
return { ${BASE}, ok: false, via: "no onChangeText (uncontrolled input)" };`;
|
|
326
|
+
break;
|
|
327
|
+
case "setNative":
|
|
328
|
+
// Sets the native text, then fires onChangeText if the field has
|
|
329
|
+
// one. Both halves matter: without the first the field shows
|
|
330
|
+
// nothing, without the second the app never receives the text —
|
|
331
|
+
// and a field that displays text the app does not have is the
|
|
332
|
+
// "looks right, isn't" failure this tool exists to remove.
|
|
333
|
+
action = `
|
|
334
|
+
var nv = ${JSON.stringify(op.value)};
|
|
335
|
+
if (!__eb_pubi || typeof __eb_pubi.setNativeProps !== "function") {
|
|
336
|
+
return { ${BASE}, ok: false, via: "input exposes no setNativeProps" };
|
|
337
|
+
}
|
|
338
|
+
__eb_pubi.setNativeProps({ text: nv });
|
|
339
|
+
if (__eb_ownerFiber) {
|
|
340
|
+
__eb_ownerFiber.memoizedProps.onChangeText(nv);
|
|
341
|
+
return { ${BASE}, value: __eb_controlled ? nv : __eb_value, ok: true, via: "setNativeProps+onChangeText" };
|
|
342
|
+
}
|
|
343
|
+
return { ${BASE}, ok: true, via: "setNativeProps" };`;
|
|
344
|
+
break;
|
|
345
|
+
case "clear":
|
|
346
|
+
// Only a controlled field can be cleared through its handler. On an
|
|
347
|
+
// uncontrolled one that handler may be a no-op (or may not drive the
|
|
348
|
+
// text at all), so calling it clears nothing while reporting success.
|
|
349
|
+
action = `
|
|
350
|
+
if (__eb_controlled) {
|
|
351
|
+
__eb_ownerFiber.memoizedProps.onChangeText("");
|
|
352
|
+
return { ${BASE}, value: "", ok: true, via: "onChangeText" };
|
|
353
|
+
}
|
|
354
|
+
if (__eb_pubi && typeof __eb_pubi.clear === "function") {
|
|
355
|
+
__eb_pubi.clear();
|
|
356
|
+
return { ${BASE}, value: null, ok: true, via: "publicInstance.clear" };
|
|
357
|
+
}
|
|
358
|
+
return { ${BASE}, ok: false, via: "input exposes no clear() method" };`;
|
|
359
|
+
break;
|
|
360
|
+
}
|
|
361
|
+
return `(() => {${prelude(query)}${action}
|
|
362
|
+
})()`;
|
|
363
|
+
}
|
|
364
|
+
//# sourceMappingURL=inputTarget.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inputTarget.js","sourceRoot":"","sources":["../../src/core/inputTarget.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAqBH,OAAO,EAAE,iBAAiB,EAAE,qBAAqB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