react-native-ai-debugger 1.6.16 → 1.8.1
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 +8 -1
- package/build/__tests__/unit/exec.test.d.ts +2 -0
- package/build/__tests__/unit/exec.test.d.ts.map +1 -0
- package/build/__tests__/unit/exec.test.js +54 -0
- package/build/__tests__/unit/exec.test.js.map +1 -0
- package/build/__tests__/unit/focusedInput.test.d.ts +2 -0
- package/build/__tests__/unit/focusedInput.test.d.ts.map +1 -0
- package/build/__tests__/unit/focusedInput.test.js +58 -0
- package/build/__tests__/unit/focusedInput.test.js.map +1 -0
- package/build/__tests__/unit/focusedInputTools.test.d.ts +2 -0
- package/build/__tests__/unit/focusedInputTools.test.d.ts.map +1 -0
- package/build/__tests__/unit/focusedInputTools.test.js +79 -0
- package/build/__tests__/unit/focusedInputTools.test.js.map +1 -0
- package/build/__tests__/unit/tap.test.js +46 -0
- package/build/__tests__/unit/tap.test.js.map +1 -1
- package/build/core/android.d.ts +3 -3
- package/build/core/android.d.ts.map +1 -1
- package/build/core/android.js +21 -14
- package/build/core/android.js.map +1 -1
- package/build/core/appDetection.d.ts +7 -0
- package/build/core/appDetection.d.ts.map +1 -1
- package/build/core/appDetection.js +38 -17
- package/build/core/appDetection.js.map +1 -1
- package/build/core/componentSearch.d.ts +38 -0
- package/build/core/componentSearch.d.ts.map +1 -0
- package/build/core/componentSearch.js +419 -0
- package/build/core/componentSearch.js.map +1 -0
- package/build/core/componentTree.d.ts +12 -0
- package/build/core/componentTree.d.ts.map +1 -0
- package/build/core/componentTree.js +275 -0
- package/build/core/componentTree.js.map +1 -0
- package/build/core/connection.d.ts +1 -0
- package/build/core/connection.d.ts.map +1 -1
- package/build/core/connection.js +99 -89
- package/build/core/connection.js.map +1 -1
- package/build/core/debugGlobals.d.ts +5 -0
- package/build/core/debugGlobals.d.ts.map +1 -0
- package/build/core/debugGlobals.js +300 -0
- package/build/core/debugGlobals.js.map +1 -0
- package/build/core/errors.d.ts +14 -0
- package/build/core/errors.d.ts.map +1 -0
- package/build/core/errors.js +17 -0
- package/build/core/errors.js.map +1 -0
- package/build/core/exec.d.ts +22 -0
- package/build/core/exec.d.ts.map +1 -0
- package/build/core/exec.js +54 -0
- package/build/core/exec.js.map +1 -0
- package/build/core/executor.d.ts +7 -204
- package/build/core/executor.d.ts.map +1 -1
- package/build/core/executor.js +10 -4103
- package/build/core/executor.js.map +1 -1
- package/build/core/focusedInput.d.ts +27 -0
- package/build/core/focusedInput.d.ts.map +1 -0
- package/build/core/focusedInput.js +110 -0
- package/build/core/focusedInput.js.map +1 -0
- package/build/core/focusedInputTools.d.ts +21 -0
- package/build/core/focusedInputTools.d.ts.map +1 -0
- package/build/core/focusedInputTools.js +51 -0
- package/build/core/focusedInputTools.js.map +1 -0
- package/build/core/guides.d.ts.map +1 -1
- package/build/core/guides.js +15 -2
- package/build/core/guides.js.map +1 -1
- package/build/core/index.d.ts +4 -3
- package/build/core/index.d.ts.map +1 -1
- package/build/core/index.js +4 -3
- package/build/core/index.js.map +1 -1
- package/build/core/inspector.d.ts +50 -0
- package/build/core/inspector.d.ts.map +1 -0
- package/build/core/inspector.js +604 -0
- package/build/core/inspector.js.map +1 -0
- package/build/core/ios.d.ts +8 -0
- package/build/core/ios.d.ts.map +1 -1
- package/build/core/ios.js +142 -2
- package/build/core/ios.js.map +1 -1
- package/build/core/jsExecute.d.ts +27 -0
- package/build/core/jsExecute.d.ts.map +1 -0
- package/build/core/jsExecute.js +453 -0
- package/build/core/jsExecute.js.map +1 -0
- package/build/core/ocr.d.ts +13 -0
- package/build/core/ocr.d.ts.map +1 -1
- package/build/core/ocr.js +37 -15
- package/build/core/ocr.js.map +1 -1
- package/build/core/posthog.d.ts.map +1 -1
- package/build/core/posthog.js +7 -1
- package/build/core/posthog.js.map +1 -1
- package/build/core/pressables.d.ts +44 -0
- package/build/core/pressables.d.ts.map +1 -0
- package/build/core/pressables.js +1480 -0
- package/build/core/pressables.js.map +1 -0
- package/build/core/register.d.ts +8 -0
- package/build/core/register.d.ts.map +1 -0
- package/build/core/register.js +216 -0
- package/build/core/register.js.map +1 -0
- package/build/core/screenLayout.d.ts +52 -0
- package/build/core/screenLayout.d.ts.map +1 -0
- package/build/core/screenLayout.js +828 -0
- package/build/core/screenLayout.js.map +1 -0
- package/build/core/toolHelpers.d.ts +24 -0
- package/build/core/toolHelpers.d.ts.map +1 -0
- package/build/core/toolHelpers.js +118 -0
- package/build/core/toolHelpers.js.map +1 -0
- package/build/core/types.d.ts +11 -6
- package/build/core/types.d.ts.map +1 -1
- package/build/index.d.ts +2 -4
- package/build/index.d.ts.map +1 -1
- package/build/index.js +37 -4313
- package/build/index.js.map +1 -1
- package/build/pro/tap.d.ts +51 -5
- package/build/pro/tap.d.ts.map +1 -1
- package/build/pro/tap.js +457 -54
- package/build/pro/tap.js.map +1 -1
- package/build/tools/accountTools.d.ts +2 -0
- package/build/tools/accountTools.d.ts.map +1 -1
- package/build/tools/accountTools.js +5 -0
- package/build/tools/accountTools.js.map +1 -1
- package/build/tools/bundleTools.d.ts +3 -0
- package/build/tools/bundleTools.d.ts.map +1 -0
- package/build/tools/bundleTools.js +368 -0
- package/build/tools/bundleTools.js.map +1 -0
- package/build/tools/componentTools.d.ts +3 -0
- package/build/tools/componentTools.d.ts.map +1 -0
- package/build/tools/componentTools.js +639 -0
- package/build/tools/componentTools.js.map +1 -0
- package/build/tools/connectionTools.d.ts +3 -0
- package/build/tools/connectionTools.d.ts.map +1 -0
- package/build/tools/connectionTools.js +564 -0
- package/build/tools/connectionTools.js.map +1 -0
- package/build/tools/deviceTools.d.ts +3 -0
- package/build/tools/deviceTools.d.ts.map +1 -0
- package/build/tools/deviceTools.js +296 -0
- package/build/tools/deviceTools.js.map +1 -0
- package/build/tools/executionTools.d.ts +3 -0
- package/build/tools/executionTools.d.ts.map +1 -0
- package/build/tools/executionTools.js +173 -0
- package/build/tools/executionTools.js.map +1 -0
- package/build/tools/interactionTools.d.ts +3 -0
- package/build/tools/interactionTools.d.ts.map +1 -0
- package/build/tools/interactionTools.js +414 -0
- package/build/tools/interactionTools.js.map +1 -0
- package/build/tools/logTools.d.ts +3 -0
- package/build/tools/logTools.d.ts.map +1 -0
- package/build/tools/logTools.js +371 -0
- package/build/tools/logTools.js.map +1 -0
- package/build/tools/metaTools.d.ts +7 -0
- package/build/tools/metaTools.d.ts.map +1 -0
- package/build/tools/metaTools.js +205 -0
- package/build/tools/metaTools.js.map +1 -0
- package/build/tools/networkTools.d.ts +3 -0
- package/build/tools/networkTools.d.ts.map +1 -0
- package/build/tools/networkTools.js +478 -0
- package/build/tools/networkTools.js.map +1 -0
- package/build/tools/reduxTools.d.ts +3 -0
- package/build/tools/reduxTools.d.ts.map +1 -0
- package/build/tools/reduxTools.js +83 -0
- package/build/tools/reduxTools.js.map +1 -0
- package/build/tools/screenshotTools.d.ts +3 -0
- package/build/tools/screenshotTools.d.ts.map +1 -0
- package/build/tools/screenshotTools.js +606 -0
- package/build/tools/screenshotTools.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { exec } from "node:child_process";
|
|
2
|
+
/**
|
|
3
|
+
* Drop-in replacement for `promisify(exec)` that accepts an AbortSignal.
|
|
4
|
+
* On abort, the child gets SIGTERM and then SIGKILL after 500ms — the
|
|
5
|
+
* escalation matters for ADB calls like `uiautomator dump` whose device-side
|
|
6
|
+
* process is independent of the host ADB process and may not exit on SIGTERM.
|
|
7
|
+
*/
|
|
8
|
+
export function execAsync(cmd, opts = {}) {
|
|
9
|
+
const { signal, ...execOpts } = opts;
|
|
10
|
+
return new Promise((resolve, reject) => {
|
|
11
|
+
const child = exec(cmd, execOpts, (err, stdout, stderr) => {
|
|
12
|
+
if (err)
|
|
13
|
+
reject(err);
|
|
14
|
+
else
|
|
15
|
+
resolve({ stdout: stdout.toString(), stderr: stderr.toString() });
|
|
16
|
+
});
|
|
17
|
+
const kill = () => {
|
|
18
|
+
try {
|
|
19
|
+
child.kill("SIGTERM");
|
|
20
|
+
}
|
|
21
|
+
catch { /* already dead */ }
|
|
22
|
+
setTimeout(() => {
|
|
23
|
+
try {
|
|
24
|
+
child.kill("SIGKILL");
|
|
25
|
+
}
|
|
26
|
+
catch { /* already dead */ }
|
|
27
|
+
}, 500).unref();
|
|
28
|
+
};
|
|
29
|
+
if (signal) {
|
|
30
|
+
if (signal.aborted) {
|
|
31
|
+
kill();
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
signal.addEventListener("abort", kill, { once: true });
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Race an async operation against a timeout, with cancellation. The inner
|
|
40
|
+
* factory receives an AbortSignal it can pass into execAsync, fetch, etc.
|
|
41
|
+
* On timeout, the signal aborts so in-flight subprocesses get killed instead
|
|
42
|
+
* of running on past the strategy cap.
|
|
43
|
+
*/
|
|
44
|
+
export function withCancelableTimeout(make, ms, label) {
|
|
45
|
+
const ctrl = new AbortController();
|
|
46
|
+
const timer = setTimeout(() => ctrl.abort(), ms);
|
|
47
|
+
return make(ctrl.signal).then((val) => { clearTimeout(timer); return val; }, (err) => {
|
|
48
|
+
clearTimeout(timer);
|
|
49
|
+
if (ctrl.signal.aborted)
|
|
50
|
+
throw new Error(`${label} timed out after ${ms}ms`);
|
|
51
|
+
throw err;
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=exec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exec.js","sourceRoot":"","sources":["../../src/core/exec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAe,MAAM,oBAAoB,CAAC;AAMvD;;;;;GAKG;AACH,MAAM,UAAU,SAAS,CACrB,GAAW,EACX,OAAyB,EAAE;IAE3B,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,GAAG,IAAI,CAAC;IACrC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACnC,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE;YACtD,IAAI,GAAG;gBAAE,MAAM,CAAC,GAAG,CAAC,CAAC;;gBAChB,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QAC3E,CAAC,CAAC,CAAC;QACH,MAAM,IAAI,GAAG,GAAG,EAAE;YACd,IAAI,CAAC;gBAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YAAC,CAAC;YAAC,MAAM,CAAC,CAAC,kBAAkB,CAAC,CAAC;YAC3D,UAAU,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC;oBAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;gBAAC,CAAC;gBAAC,MAAM,CAAC,CAAC,kBAAkB,CAAC,CAAC;YAC/D,CAAC,EAAE,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC;QACpB,CAAC,CAAC;QACF,IAAI,MAAM,EAAE,CAAC;YACT,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;gBACjB,IAAI,EAAE,CAAC;gBACP,OAAO;YACX,CAAC;YACD,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QAC3D,CAAC;IACL,CAAC,CAAC,CAAC;AACP,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB,CACjC,IAAyC,EACzC,EAAU,EACV,KAAa;IAEb,MAAM,IAAI,GAAG,IAAI,eAAe,EAAE,CAAC;IACnC,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;IACjD,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CACzB,CAAC,GAAG,EAAE,EAAE,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,EAC7C,CAAC,GAAG,EAAE,EAAE;QACJ,YAAY,CAAC,KAAK,CAAC,CAAC;QACpB,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO;YAAE,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,oBAAoB,EAAE,IAAI,CAAC,CAAC;QAC7E,MAAM,GAAG,CAAC;IACd,CAAC,CACJ,CAAC;AACN,CAAC"}
|
package/build/core/executor.d.ts
CHANGED
|
@@ -1,205 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
* Check if a string contains emoji or other problematic Unicode characters
|
|
9
|
-
* Hermes has issues with certain UTF-16 surrogate pairs (like emoji)
|
|
10
|
-
*/
|
|
11
|
-
export declare function containsProblematicUnicode(str: string): boolean;
|
|
12
|
-
/**
|
|
13
|
-
* Strip leading comments from an expression
|
|
14
|
-
* Users often start with // comments which break the (return expr) wrapping
|
|
15
|
-
*/
|
|
16
|
-
export declare function stripLeadingComments(expression: string): string;
|
|
17
|
-
/**
|
|
18
|
-
* Validate and preprocess an expression before execution
|
|
19
|
-
* Returns cleaned expression or error with helpful message
|
|
20
|
-
*/
|
|
21
|
-
export declare function validateAndPreprocessExpression(expression: string): ExpressionValidation;
|
|
22
|
-
export declare function executeInApp(expression: string, awaitPromise?: boolean, options?: ExecuteOptions, device?: string): Promise<ExecutionResult>;
|
|
23
|
-
export declare function listDebugGlobals(device?: string): Promise<ExecutionResult>;
|
|
24
|
-
export declare function inspectGlobal(objectName: string, device?: string): Promise<ExecutionResult>;
|
|
25
|
-
export declare function reloadApp(device?: string): Promise<ExecutionResult>;
|
|
26
|
-
interface ScreenElement {
|
|
27
|
-
component: string;
|
|
28
|
-
path: string;
|
|
29
|
-
depth: number;
|
|
30
|
-
frame?: {
|
|
31
|
-
x: number;
|
|
32
|
-
y: number;
|
|
33
|
-
width: number;
|
|
34
|
-
height: number;
|
|
35
|
-
};
|
|
36
|
-
layout?: Record<string, unknown>;
|
|
37
|
-
text?: string;
|
|
38
|
-
identifiers?: Record<string, string>;
|
|
39
|
-
parentIndex?: number;
|
|
40
|
-
originalIndex?: number;
|
|
41
|
-
}
|
|
42
|
-
export declare function formatScreenLayoutTree(elements: ScreenElement[], extended?: boolean, offScreen?: {
|
|
43
|
-
offScreenBelow?: string[];
|
|
44
|
-
offScreenAbove?: string[];
|
|
45
|
-
}): string;
|
|
46
|
-
/**
|
|
47
|
-
* Get the React component tree from the running app.
|
|
48
|
-
* This traverses the fiber tree to extract component hierarchy with names.
|
|
49
|
-
*/
|
|
50
|
-
export declare function getComponentTree(options?: {
|
|
51
|
-
maxDepth?: number;
|
|
52
|
-
includeProps?: boolean;
|
|
53
|
-
includeStyles?: boolean;
|
|
54
|
-
hideInternals?: boolean;
|
|
55
|
-
format?: "json" | "tonl";
|
|
56
|
-
structureOnly?: boolean;
|
|
57
|
-
focusedOnly?: boolean;
|
|
58
|
-
device?: string;
|
|
59
|
-
}): Promise<ExecutionResult>;
|
|
60
|
-
/**
|
|
61
|
-
* Get layout data for visible components on the current screen.
|
|
62
|
-
* Uses measureInWindow to get actual screen positions and filters
|
|
63
|
-
* to only components within the viewport.
|
|
64
|
-
*
|
|
65
|
-
* Two-step approach (same as inspectAtPoint):
|
|
66
|
-
* Step 1: Walk fiber tree, dispatch measureInWindow on host components
|
|
67
|
-
* Step 2: After 300ms, read measurements, filter by viewport, build results
|
|
68
|
-
*/
|
|
69
|
-
export declare function getScreenLayout(options?: {
|
|
70
|
-
extended?: boolean;
|
|
71
|
-
summary?: boolean;
|
|
72
|
-
device?: string;
|
|
73
|
-
raw?: boolean;
|
|
74
|
-
}): Promise<ExecutionResult & {
|
|
75
|
-
parsedElements?: ScreenElement[];
|
|
76
|
-
viewport?: {
|
|
77
|
-
width: number;
|
|
78
|
-
height: number;
|
|
79
|
-
};
|
|
80
|
-
offScreenBelow?: string[];
|
|
81
|
-
offScreenAbove?: string[];
|
|
82
|
-
}>;
|
|
83
|
-
interface PressableElement {
|
|
84
|
-
component: string;
|
|
85
|
-
path: string;
|
|
86
|
-
center: {
|
|
87
|
-
x: number;
|
|
88
|
-
y: number;
|
|
89
|
-
};
|
|
90
|
-
frame: {
|
|
91
|
-
x: number;
|
|
92
|
-
y: number;
|
|
93
|
-
width: number;
|
|
94
|
-
height: number;
|
|
95
|
-
};
|
|
96
|
-
text: string;
|
|
97
|
-
testID: string | null;
|
|
98
|
-
accessibilityLabel: string | null;
|
|
99
|
-
hasLabel: boolean;
|
|
100
|
-
isInput: boolean;
|
|
101
|
-
isWrapper?: boolean;
|
|
102
|
-
intent?: string;
|
|
103
|
-
nearbyText?: string;
|
|
104
|
-
}
|
|
105
|
-
export declare function getPressableElements(options?: {
|
|
106
|
-
device?: string;
|
|
107
|
-
}): Promise<ExecutionResult & {
|
|
108
|
-
parsedElements?: PressableElement[];
|
|
109
|
-
}>;
|
|
110
|
-
/**
|
|
111
|
-
* Enrich screen layout data with tap-ready pixel coordinates for bundling with screenshots.
|
|
112
|
-
* Converts points/dp frame coordinates to pixels using the device pixel ratio,
|
|
113
|
-
* computes center-point tapX/tapY for each element.
|
|
114
|
-
*
|
|
115
|
-
* @param pixelRatio - device pixel ratio (e.g., 3 for @3x iPhone)
|
|
116
|
-
* @param screenshotScaleFactor - if the screenshot image was scaled down, this factor adjusts coordinates
|
|
117
|
-
* @param device - optional target device name
|
|
118
|
-
* @returns formatted tree string with pixel coordinates, or null if unavailable
|
|
119
|
-
*/
|
|
120
|
-
export declare function enrichScreenshotWithLayout(pixelRatio: number, screenshotScaleFactor: number, device?: string, safeAreaTopPoints?: number): Promise<string | null>;
|
|
121
|
-
/**
|
|
122
|
-
* Inspect a specific component by name, returning its props, state, and layout.
|
|
123
|
-
*/
|
|
124
|
-
export declare function inspectComponent(componentName: string, options?: {
|
|
125
|
-
index?: number;
|
|
126
|
-
includeState?: boolean;
|
|
127
|
-
includeChildren?: boolean;
|
|
128
|
-
childrenDepth?: number;
|
|
129
|
-
shortPath?: boolean;
|
|
130
|
-
simplifyHooks?: boolean;
|
|
131
|
-
device?: string;
|
|
132
|
-
}): Promise<ExecutionResult>;
|
|
133
|
-
/**
|
|
134
|
-
* Find all components matching a name pattern and return summary info.
|
|
135
|
-
*/
|
|
136
|
-
export declare function findComponents(pattern: string, options?: {
|
|
137
|
-
maxResults?: number;
|
|
138
|
-
includeLayout?: boolean;
|
|
139
|
-
shortPath?: boolean;
|
|
140
|
-
summary?: boolean;
|
|
141
|
-
format?: "json" | "tonl";
|
|
142
|
-
device?: string;
|
|
143
|
-
}): Promise<ExecutionResult>;
|
|
144
|
-
/**
|
|
145
|
-
* Find a pressable element in the React fiber tree and invoke its onPress handler.
|
|
146
|
-
* Matches by text content, testID, or component name.
|
|
147
|
-
*/
|
|
148
|
-
export declare function pressElement(options: {
|
|
149
|
-
text?: string;
|
|
150
|
-
testID?: string;
|
|
151
|
-
component?: string;
|
|
152
|
-
index?: number;
|
|
153
|
-
maxTraversalDepth?: number;
|
|
154
|
-
device?: string;
|
|
155
|
-
}): Promise<ExecutionResult>;
|
|
156
|
-
/**
|
|
157
|
-
* Toggle the Element Inspector via DevSettings native module.
|
|
158
|
-
* This enables the inspector overlay programmatically.
|
|
159
|
-
*/
|
|
160
|
-
export declare function toggleElementInspector(device?: string): Promise<ExecutionResult>;
|
|
161
|
-
/**
|
|
162
|
-
* Check if the Element Inspector overlay is currently active.
|
|
163
|
-
*/
|
|
164
|
-
export declare function isInspectorActive(device?: string): Promise<boolean>;
|
|
165
|
-
/**
|
|
166
|
-
* Get the currently selected element from the Element Inspector overlay.
|
|
167
|
-
* This reads the InspectorPanel component's props to get the hierarchy, frame, and style.
|
|
168
|
-
* Requires the Element Inspector to be enabled and an element to be selected.
|
|
169
|
-
*/
|
|
170
|
-
export declare function getInspectorSelection(device?: string): Promise<ExecutionResult>;
|
|
171
|
-
/**
|
|
172
|
-
* Resolve the component at (x, y) using RN's built-in Element Inspector.
|
|
173
|
-
*
|
|
174
|
-
* Strategy: programmatically toggle the inspector overlay on (if needed),
|
|
175
|
-
* then call InspectorOverlay.props.onTouchPoint(x, y) directly — bypassing
|
|
176
|
-
* the broken adb-tap → PanResponder route on Bridgeless / new-arch RN.
|
|
177
|
-
* This populates InspectorPanel with RN's full curated hierarchy, the
|
|
178
|
-
* inspected element's frame, and per-component style data (margin, padding,
|
|
179
|
-
* border, layout) — exactly what the on-device overlay shows.
|
|
180
|
-
*
|
|
181
|
-
* Returns the rich hierarchy with style merged from each entry's
|
|
182
|
-
* getInspectorData(...).props.style, plus the inspected frame and style.
|
|
183
|
-
*
|
|
184
|
-
* Auto-hides the overlay after capture so subsequent screenshots stay clean.
|
|
185
|
-
*/
|
|
186
|
-
export declare function getInspectorSelectionAtPoint(x: number, y: number, device?: string): Promise<ExecutionResult>;
|
|
187
|
-
/**
|
|
188
|
-
* Inspect the React component at a specific (x, y) coordinate.
|
|
189
|
-
*
|
|
190
|
-
* Works on both Paper and Fabric (New Architecture). Uses a two-step approach
|
|
191
|
-
* because measureInWindow callbacks fire in a future native event loop tick
|
|
192
|
-
* (not microtasks), so awaitPromise cannot be used to collect them:
|
|
193
|
-
*
|
|
194
|
-
* Step 1 — dispatch: walk the fiber tree, call measureInWindow on each host
|
|
195
|
-
* component, store fiber refs and results in app globals.
|
|
196
|
-
* Step 2 — resolve (after 300ms): read the globals, hit-test against target
|
|
197
|
-
* coordinates, return the innermost matching React component.
|
|
198
|
-
*/
|
|
199
|
-
export declare function inspectAtPoint(x: number, y: number, options?: {
|
|
200
|
-
includeProps?: boolean;
|
|
201
|
-
includeFrame?: boolean;
|
|
202
|
-
device?: string;
|
|
203
|
-
}): Promise<ExecutionResult>;
|
|
204
|
-
export {};
|
|
1
|
+
export * from "./jsExecute.js";
|
|
2
|
+
export * from "./debugGlobals.js";
|
|
3
|
+
export * from "./componentTree.js";
|
|
4
|
+
export * from "./screenLayout.js";
|
|
5
|
+
export * from "./pressables.js";
|
|
6
|
+
export * from "./componentSearch.js";
|
|
7
|
+
export * from "./inspector.js";
|
|
205
8
|
//# sourceMappingURL=executor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../src/core/executor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../src/core/executor.ts"],"names":[],"mappings":"AAGA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC"}
|