react-native-mcp-kit 4.2.0 → 4.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.
Files changed (239) hide show
  1. package/dist/babel/testIdPlugin/collectHooks.d.ts +13 -0
  2. package/dist/babel/testIdPlugin/collectHooks.d.ts.map +1 -0
  3. package/dist/babel/testIdPlugin/collectHooks.js +112 -0
  4. package/dist/babel/testIdPlugin/collectHooks.js.map +1 -0
  5. package/dist/babel/testIdPlugin/constants.d.ts +6 -0
  6. package/dist/babel/testIdPlugin/constants.d.ts.map +1 -0
  7. package/dist/babel/testIdPlugin/constants.js +49 -0
  8. package/dist/babel/testIdPlugin/constants.js.map +1 -0
  9. package/dist/babel/testIdPlugin/helpers.d.ts +7 -0
  10. package/dist/babel/testIdPlugin/helpers.d.ts.map +1 -0
  11. package/dist/babel/testIdPlugin/helpers.js +77 -0
  12. package/dist/babel/testIdPlugin/helpers.js.map +1 -0
  13. package/dist/babel/testIdPlugin/hocUnwrap.d.ts +4 -0
  14. package/dist/babel/testIdPlugin/hocUnwrap.d.ts.map +1 -0
  15. package/dist/babel/testIdPlugin/hocUnwrap.js +94 -0
  16. package/dist/babel/testIdPlugin/hocUnwrap.js.map +1 -0
  17. package/dist/babel/{testIdPlugin.d.ts → testIdPlugin/index.d.ts} +1 -1
  18. package/dist/babel/testIdPlugin/index.d.ts.map +1 -0
  19. package/dist/babel/testIdPlugin/index.js +205 -0
  20. package/dist/babel/testIdPlugin/index.js.map +1 -0
  21. package/dist/babel/testIdPlugin/inject.d.ts +7 -0
  22. package/dist/babel/testIdPlugin/inject.d.ts.map +1 -0
  23. package/dist/babel/testIdPlugin/inject.js +86 -0
  24. package/dist/babel/testIdPlugin/inject.js.map +1 -0
  25. package/dist/babel/testIdPlugin/types.d.ts +59 -0
  26. package/dist/babel/testIdPlugin/types.d.ts.map +1 -0
  27. package/dist/babel/testIdPlugin/types.js +3 -0
  28. package/dist/babel/testIdPlugin/types.js.map +1 -0
  29. package/dist/bin/ios-hid +0 -0
  30. package/dist/index.d.ts +1 -1
  31. package/dist/index.d.ts.map +1 -1
  32. package/dist/index.js +2 -1
  33. package/dist/index.js.map +1 -1
  34. package/dist/modules/fiberTree/hooks/extract.d.ts +6 -0
  35. package/dist/modules/fiberTree/hooks/extract.d.ts.map +1 -0
  36. package/dist/modules/fiberTree/hooks/extract.js +187 -0
  37. package/dist/modules/fiberTree/hooks/extract.js.map +1 -0
  38. package/dist/modules/fiberTree/hooks/flatten.d.ts +4 -0
  39. package/dist/modules/fiberTree/hooks/flatten.d.ts.map +1 -0
  40. package/dist/modules/fiberTree/hooks/flatten.js +81 -0
  41. package/dist/modules/fiberTree/hooks/flatten.js.map +1 -0
  42. package/dist/modules/fiberTree/hooks/index.d.ts +5 -0
  43. package/dist/modules/fiberTree/hooks/index.d.ts.map +1 -0
  44. package/dist/modules/fiberTree/hooks/index.js +10 -0
  45. package/dist/modules/fiberTree/hooks/index.js.map +1 -0
  46. package/dist/modules/fiberTree/hooks/options.d.ts +9 -0
  47. package/dist/modules/fiberTree/hooks/options.d.ts.map +1 -0
  48. package/dist/modules/fiberTree/hooks/options.js +27 -0
  49. package/dist/modules/fiberTree/hooks/options.js.map +1 -0
  50. package/dist/modules/fiberTree/hooks/patterns.d.ts +2 -0
  51. package/dist/modules/fiberTree/hooks/patterns.d.ts.map +1 -0
  52. package/dist/modules/fiberTree/hooks/patterns.js +26 -0
  53. package/dist/modules/fiberTree/hooks/patterns.js.map +1 -0
  54. package/dist/modules/fiberTree/hooks/shape.d.ts +3 -0
  55. package/dist/modules/fiberTree/hooks/shape.d.ts.map +1 -0
  56. package/dist/modules/fiberTree/hooks/shape.js +66 -0
  57. package/dist/modules/fiberTree/hooks/shape.js.map +1 -0
  58. package/dist/modules/fiberTree/hooks/slotCount.d.ts +2 -0
  59. package/dist/modules/fiberTree/hooks/slotCount.d.ts.map +1 -0
  60. package/dist/modules/fiberTree/hooks/slotCount.js +93 -0
  61. package/dist/modules/fiberTree/hooks/slotCount.js.map +1 -0
  62. package/dist/modules/fiberTree/{hooks.d.ts → hooks/types.d.ts} +1 -34
  63. package/dist/modules/fiberTree/hooks/types.d.ts.map +1 -0
  64. package/dist/modules/fiberTree/hooks/types.js +3 -0
  65. package/dist/modules/fiberTree/hooks/types.js.map +1 -0
  66. package/dist/modules/fiberTree/hooks/value.d.ts +2 -0
  67. package/dist/modules/fiberTree/hooks/value.d.ts.map +1 -0
  68. package/dist/modules/fiberTree/hooks/value.js +89 -0
  69. package/dist/modules/fiberTree/hooks/value.js.map +1 -0
  70. package/dist/modules/fiberTree/utils/constants.d.ts +8 -0
  71. package/dist/modules/fiberTree/utils/constants.d.ts.map +1 -0
  72. package/dist/modules/fiberTree/utils/constants.js +15 -0
  73. package/dist/modules/fiberTree/utils/constants.js.map +1 -0
  74. package/dist/modules/fiberTree/utils/index.d.ts +9 -0
  75. package/dist/modules/fiberTree/utils/index.d.ts.map +1 -0
  76. package/dist/modules/fiberTree/utils/index.js +34 -0
  77. package/dist/modules/fiberTree/utils/index.js.map +1 -0
  78. package/dist/modules/fiberTree/utils/match.d.ts +4 -0
  79. package/dist/modules/fiberTree/utils/match.d.ts.map +1 -0
  80. package/dist/modules/fiberTree/utils/match.js +169 -0
  81. package/dist/modules/fiberTree/utils/match.js.map +1 -0
  82. package/dist/modules/fiberTree/utils/naming.d.ts +4 -0
  83. package/dist/modules/fiberTree/utils/naming.d.ts.map +1 -0
  84. package/dist/modules/fiberTree/utils/naming.js +52 -0
  85. package/dist/modules/fiberTree/utils/naming.js.map +1 -0
  86. package/dist/modules/fiberTree/utils/native.d.ts +5 -0
  87. package/dist/modules/fiberTree/utils/native.d.ts.map +1 -0
  88. package/dist/modules/fiberTree/utils/native.js +101 -0
  89. package/dist/modules/fiberTree/utils/native.js.map +1 -0
  90. package/dist/modules/fiberTree/utils/projection.d.ts +9 -0
  91. package/dist/modules/fiberTree/utils/projection.d.ts.map +1 -0
  92. package/dist/modules/fiberTree/utils/projection.js +75 -0
  93. package/dist/modules/fiberTree/utils/projection.js.map +1 -0
  94. package/dist/modules/fiberTree/utils/root.d.ts +4 -0
  95. package/dist/modules/fiberTree/utils/root.d.ts.map +1 -0
  96. package/dist/modules/fiberTree/utils/root.js +30 -0
  97. package/dist/modules/fiberTree/utils/root.js.map +1 -0
  98. package/dist/modules/fiberTree/utils/screen.d.ts +10 -0
  99. package/dist/modules/fiberTree/utils/screen.d.ts.map +1 -0
  100. package/dist/modules/fiberTree/utils/screen.js +39 -0
  101. package/dist/modules/fiberTree/utils/screen.js.map +1 -0
  102. package/dist/modules/fiberTree/utils/serialize.d.ts +4 -0
  103. package/dist/modules/fiberTree/utils/serialize.d.ts.map +1 -0
  104. package/dist/modules/fiberTree/utils/serialize.js +102 -0
  105. package/dist/modules/fiberTree/utils/serialize.js.map +1 -0
  106. package/dist/modules/fiberTree/utils/traverse.d.ts +12 -0
  107. package/dist/modules/fiberTree/utils/traverse.d.ts.map +1 -0
  108. package/dist/modules/fiberTree/utils/traverse.js +107 -0
  109. package/dist/modules/fiberTree/utils/traverse.js.map +1 -0
  110. package/dist/server/dispatch.d.ts +15 -0
  111. package/dist/server/dispatch.d.ts.map +1 -0
  112. package/dist/server/dispatch.js +121 -0
  113. package/dist/server/dispatch.js.map +1 -0
  114. package/dist/server/helpers.d.ts +129 -0
  115. package/dist/server/helpers.d.ts.map +1 -0
  116. package/dist/server/helpers.js +250 -0
  117. package/dist/server/helpers.js.map +1 -0
  118. package/dist/server/host/deviceResolver/byClient.d.ts +5 -0
  119. package/dist/server/host/deviceResolver/byClient.d.ts.map +1 -0
  120. package/dist/server/host/deviceResolver/byClient.js +171 -0
  121. package/dist/server/host/deviceResolver/byClient.js.map +1 -0
  122. package/dist/server/host/deviceResolver/byId.d.ts +5 -0
  123. package/dist/server/host/deviceResolver/byId.d.ts.map +1 -0
  124. package/dist/server/host/deviceResolver/byId.js +81 -0
  125. package/dist/server/host/deviceResolver/byId.js.map +1 -0
  126. package/dist/server/host/deviceResolver/enrich.d.ts +5 -0
  127. package/dist/server/host/deviceResolver/enrich.d.ts.map +1 -0
  128. package/dist/server/host/deviceResolver/enrich.js +123 -0
  129. package/dist/server/host/deviceResolver/enrich.js.map +1 -0
  130. package/dist/server/host/deviceResolver/index.d.ts +13 -0
  131. package/dist/server/host/deviceResolver/index.d.ts.map +1 -0
  132. package/dist/server/host/deviceResolver/index.js +65 -0
  133. package/dist/server/host/deviceResolver/index.js.map +1 -0
  134. package/dist/server/host/deviceResolver/list.d.ts +10 -0
  135. package/dist/server/host/deviceResolver/list.d.ts.map +1 -0
  136. package/dist/server/host/deviceResolver/list.js +119 -0
  137. package/dist/server/host/deviceResolver/list.js.map +1 -0
  138. package/dist/server/host/deviceResolver/scan.d.ts +4 -0
  139. package/dist/server/host/deviceResolver/scan.d.ts.map +1 -0
  140. package/dist/server/host/deviceResolver/scan.js +102 -0
  141. package/dist/server/host/deviceResolver/scan.js.map +1 -0
  142. package/dist/server/host/{deviceResolver.d.ts → deviceResolver/types.d.ts} +1 -16
  143. package/dist/server/host/deviceResolver/types.d.ts.map +1 -0
  144. package/dist/server/host/deviceResolver/types.js +3 -0
  145. package/dist/server/host/deviceResolver/types.js.map +1 -0
  146. package/dist/server/host/tools/input/android.d.ts +15 -0
  147. package/dist/server/host/tools/input/android.d.ts.map +1 -0
  148. package/dist/server/host/tools/input/android.js +88 -0
  149. package/dist/server/host/tools/input/android.js.map +1 -0
  150. package/dist/server/host/tools/input/constants.d.ts +14 -0
  151. package/dist/server/host/tools/input/constants.d.ts.map +1 -0
  152. package/dist/server/host/tools/input/constants.js +41 -0
  153. package/dist/server/host/tools/input/constants.js.map +1 -0
  154. package/dist/server/host/tools/input/drag.d.ts +4 -0
  155. package/dist/server/host/tools/input/drag.d.ts.map +1 -0
  156. package/dist/server/host/tools/input/drag.js +76 -0
  157. package/dist/server/host/tools/input/drag.js.map +1 -0
  158. package/dist/server/host/tools/input/index.d.ts +8 -0
  159. package/dist/server/host/tools/input/index.d.ts.map +1 -0
  160. package/dist/server/host/tools/input/index.js +18 -0
  161. package/dist/server/host/tools/input/index.js.map +1 -0
  162. package/dist/server/host/tools/input/longPress.d.ts +4 -0
  163. package/dist/server/host/tools/input/longPress.d.ts.map +1 -0
  164. package/dist/server/host/tools/input/longPress.js +49 -0
  165. package/dist/server/host/tools/input/longPress.js.map +1 -0
  166. package/dist/server/host/tools/input/pressKey.d.ts +4 -0
  167. package/dist/server/host/tools/input/pressKey.d.ts.map +1 -0
  168. package/dist/server/host/tools/input/pressKey.js +42 -0
  169. package/dist/server/host/tools/input/pressKey.js.map +1 -0
  170. package/dist/server/host/tools/input/swipe.d.ts +4 -0
  171. package/dist/server/host/tools/input/swipe.d.ts.map +1 -0
  172. package/dist/server/host/tools/input/swipe.js +71 -0
  173. package/dist/server/host/tools/input/swipe.js.map +1 -0
  174. package/dist/server/host/tools/input/tap.d.ts +4 -0
  175. package/dist/server/host/tools/input/tap.d.ts.map +1 -0
  176. package/dist/server/host/tools/input/tap.js +49 -0
  177. package/dist/server/host/tools/input/tap.js.map +1 -0
  178. package/dist/server/host/tools/input/typeText.d.ts +4 -0
  179. package/dist/server/host/tools/input/typeText.d.ts.map +1 -0
  180. package/dist/server/host/tools/input/typeText.js +52 -0
  181. package/dist/server/host/tools/input/typeText.js.map +1 -0
  182. package/dist/server/host/tools/input/typeTextBatch.d.ts +4 -0
  183. package/dist/server/host/tools/input/typeTextBatch.d.ts.map +1 -0
  184. package/dist/server/host/tools/input/typeTextBatch.js +106 -0
  185. package/dist/server/host/tools/input/typeTextBatch.js.map +1 -0
  186. package/dist/server/instructions.d.ts +2 -0
  187. package/dist/server/instructions.d.ts.map +1 -0
  188. package/dist/server/instructions.js +89 -0
  189. package/dist/server/instructions.js.map +1 -0
  190. package/dist/server/mcpServer.d.ts +0 -12
  191. package/dist/server/mcpServer.d.ts.map +1 -1
  192. package/dist/server/mcpServer.js +26 -877
  193. package/dist/server/mcpServer.js.map +1 -1
  194. package/dist/server/predicate.d.ts +31 -0
  195. package/dist/server/predicate.d.ts.map +1 -0
  196. package/dist/server/predicate.js +104 -0
  197. package/dist/server/predicate.js.map +1 -0
  198. package/dist/server/tools/assert.d.ts +4 -0
  199. package/dist/server/tools/assert.d.ts.map +1 -0
  200. package/dist/server/tools/assert.js +103 -0
  201. package/dist/server/tools/assert.js.map +1 -0
  202. package/dist/server/tools/call.d.ts +4 -0
  203. package/dist/server/tools/call.d.ts.map +1 -0
  204. package/dist/server/tools/call.js +48 -0
  205. package/dist/server/tools/call.js.map +1 -0
  206. package/dist/server/tools/connectionStatus.d.ts +4 -0
  207. package/dist/server/tools/connectionStatus.d.ts.map +1 -0
  208. package/dist/server/tools/connectionStatus.js +41 -0
  209. package/dist/server/tools/connectionStatus.js.map +1 -0
  210. package/dist/server/tools/describeTool.d.ts +4 -0
  211. package/dist/server/tools/describeTool.d.ts.map +1 -0
  212. package/dist/server/tools/describeTool.js +149 -0
  213. package/dist/server/tools/describeTool.js.map +1 -0
  214. package/dist/server/tools/listTools.d.ts +4 -0
  215. package/dist/server/tools/listTools.d.ts.map +1 -0
  216. package/dist/server/tools/listTools.js +116 -0
  217. package/dist/server/tools/listTools.js.map +1 -0
  218. package/dist/server/tools/waitUntil.d.ts +4 -0
  219. package/dist/server/tools/waitUntil.d.ts.map +1 -0
  220. package/dist/server/tools/waitUntil.js +169 -0
  221. package/dist/server/tools/waitUntil.js.map +1 -0
  222. package/package.json +2 -2
  223. package/dist/babel/testIdPlugin.d.ts.map +0 -1
  224. package/dist/babel/testIdPlugin.js +0 -585
  225. package/dist/babel/testIdPlugin.js.map +0 -1
  226. package/dist/modules/fiberTree/hooks.d.ts.map +0 -1
  227. package/dist/modules/fiberTree/hooks.js +0 -550
  228. package/dist/modules/fiberTree/hooks.js.map +0 -1
  229. package/dist/modules/fiberTree/utils.d.ts +0 -39
  230. package/dist/modules/fiberTree/utils.d.ts.map +0 -1
  231. package/dist/modules/fiberTree/utils.js +0 -641
  232. package/dist/modules/fiberTree/utils.js.map +0 -1
  233. package/dist/server/host/deviceResolver.d.ts.map +0 -1
  234. package/dist/server/host/deviceResolver.js +0 -621
  235. package/dist/server/host/deviceResolver.js.map +0 -1
  236. package/dist/server/host/tools/input.d.ts +0 -10
  237. package/dist/server/host/tools/input.d.ts.map +0 -1
  238. package/dist/server/host/tools/input.js +0 -503
  239. package/dist/server/host/tools/input.js.map +0 -1
@@ -1,585 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = testIdPlugin;
4
- const DEFAULT_ATTR = 'data-mcp-id';
5
- const DEFAULT_EXCLUDE = [
6
- 'Fragment',
7
- 'React.Fragment',
8
- 'React.StrictMode',
9
- 'React.Suspense',
10
- 'StrictMode',
11
- 'Suspense',
12
- ];
13
- // Map of built-in React hook names → agent-friendly `kind` labels. Anything
14
- // matching the hook-name detector (`use` exact or `/^use[A-Z]/`) that is
15
- // NOT in this table is treated as "Custom".
16
- //
17
- // react-dom-only hooks (`useFormStatus`, `useFormState`) are intentionally
18
- // omitted — this library targets React Native, where neither exists.
19
- const HOOK_KIND = {
20
- use: 'Use',
21
- useActionState: 'ActionState',
22
- useCallback: 'Callback',
23
- useContext: 'Context',
24
- useDebugValue: 'DebugValue',
25
- useDeferredValue: 'DeferredValue',
26
- useEffect: 'Effect',
27
- useId: 'Id',
28
- useImperativeHandle: 'ImperativeHandle',
29
- useInsertionEffect: 'InsertionEffect',
30
- useLayoutEffect: 'LayoutEffect',
31
- useMemo: 'Memo',
32
- useOptimistic: 'Optimistic',
33
- useReducer: 'Reducer',
34
- useRef: 'Ref',
35
- useState: 'State',
36
- useSyncExternalStore: 'SyncExternalStore',
37
- useTransition: 'Transition',
38
- };
39
- // Hook-name detector. Accepts `use` exact (React 19's `use(promise|context)`)
40
- // AND the classic `use[A-Z]\w*` pattern.
41
- const HOOK_NAME_RE = /^use([A-Z]|$)/;
42
- // For the MemberExpression form (`X.use(...)`) we need to filter out
43
- // unrelated method calls — `database.use(middleware)`, `app.use(router)` etc.
44
- // Allow only object names that look like React-namespace bindings: literal
45
- // `React` / `react` and the common bundler-mangled forms (`_react`,
46
- // `_React2`, `_react3`, …). Same heuristic for any hook, but matters most
47
- // for bare `use` whose name is otherwise too generic to disambiguate.
48
- const REACT_NAMESPACE_RE = /^_?[Rr]eact\d*$/;
49
- // Cheap, conservative component detector: the binding name starts with a
50
- // capital letter and the function body mentions JSX somewhere. Covers
51
- // `function LoginForm() { return <View />; }` and
52
- // `const LoginForm = (props) => <View />;`. HOC-wrapped components
53
- // (memo / forwardRef / observer) are handled in `VariableDeclarator` by
54
- // unwrapping the call expression first via `findInnerFunctionBodyPath`.
55
- const isCapitalized = (name) => {
56
- return (!!name &&
57
- name.length > 0 &&
58
- name[0] === name[0]?.toUpperCase() &&
59
- name[0] !== name[0]?.toLowerCase());
60
- };
61
- // Strip the absolute path prefix (anything up to and including the project's
62
- // `/src/`) and drop the .ts/.tsx/.js/.jsx extension. Same shape components
63
- // use inside `data-mcp-id` so a hook's `mcpId` and a JSX element's
64
- // `data-mcp-id` look interchangeable to an agent reading them.
65
- const getShortFile = (filename) => {
66
- const file = filename ?? 'unknown';
67
- const relative = file.includes('/src/')
68
- ? (file.split('/src/').pop() ?? file)
69
- : (file.split('/').pop() ?? file);
70
- return relative.replace(/\.(tsx?|jsx?)$/, '');
71
- };
72
- /**
73
- * Walk a function body collecting hook-call metadata in source order. Names
74
- * come from the consuming binding:
75
- * const [count, setCount] = useState(0) → "count"
76
- * const memoValue = useMemo(...) → "memoValue"
77
- * useEffect(...) → "effect:<index>"
78
- * The `kind` is taken from HOOK_KIND for built-ins, or "Custom" for any
79
- * other identifier matching `/^use[A-Z]/`.
80
- */
81
- const collectHooksInBody = (body, t, shortFile, separator) => {
82
- const hooks = [];
83
- const anonCounters = {};
84
- body.traverse({
85
- CallExpression(callPath) {
86
- const callee = callPath.node.callee;
87
- // Three call shapes:
88
- // useState(x) — direct identifier
89
- // React.useState(x) — MemberExpression (compiled react libs)
90
- // _React2.useState(x) — MemberExpression (bundler-mangled)
91
- let hookIdent;
92
- let isMemberCall = false;
93
- let memberObject;
94
- if (t.isIdentifier(callee)) {
95
- hookIdent = callee.name;
96
- }
97
- else if (t.isMemberExpression(callee) &&
98
- !callee.computed &&
99
- t.isIdentifier(callee.property)) {
100
- hookIdent = callee.property.name;
101
- isMemberCall = true;
102
- if (t.isIdentifier(callee.object))
103
- memberObject = callee.object.name;
104
- }
105
- if (!hookIdent || !HOOK_NAME_RE.test(hookIdent))
106
- return;
107
- // For the `<obj>.use(...)` form, only accept calls with a React-like
108
- // namespace as the object — otherwise `database.use(middleware)` and
109
- // friends light up. `useXxx` member calls (`React.useState`) keep
110
- // working through the same gate since their property name is unique
111
- // enough on its own; the filter just prunes ambiguous bare `use`.
112
- if (isMemberCall && hookIdent === 'use' && !REACT_NAMESPACE_RE.test(memberObject ?? '')) {
113
- return;
114
- }
115
- const kind = HOOK_KIND[hookIdent] ?? 'Custom';
116
- // Resolve hook name from the consuming binding when possible.
117
- let hookName;
118
- const parent = callPath.parent;
119
- if (t.isVariableDeclarator(parent)) {
120
- const id = parent.id;
121
- if (t.isIdentifier(id)) {
122
- hookName = id.name;
123
- }
124
- else if (t.isArrayPattern(id)) {
125
- // const [value, setter] = useState(0) → pick the first binding
126
- const first = id.elements[0];
127
- if (first && t.isIdentifier(first)) {
128
- hookName = first.name;
129
- }
130
- }
131
- else if (t.isObjectPattern(id)) {
132
- // const { foo } = useCustomHook() — rare, name it after the first key
133
- const firstProp = id.properties[0];
134
- if (firstProp && t.isObjectProperty(firstProp) && t.isIdentifier(firstProp.key)) {
135
- hookName = firstProp.key.name;
136
- }
137
- }
138
- }
139
- if (!hookName) {
140
- // Naked hook call (typical for useEffect). Generate a positional name
141
- // keyed by the hook kind so "effect:0" / "effect:1" don't collide
142
- // with state hooks if user has multiple effects.
143
- const counterKey = kind.toLowerCase();
144
- const index = anonCounters[counterKey] ?? 0;
145
- anonCounters[counterKey] = index + 1;
146
- hookName = `${counterKey}:${index}`;
147
- }
148
- const entry = { hook: hookIdent, kind, name: hookName };
149
- const line = callPath.node.loc?.start.line;
150
- if (line) {
151
- entry.mcpId = `${hookName}${separator}${shortFile}${separator}${line}`;
152
- }
153
- if (kind === 'Custom' && !isMemberCall) {
154
- // Only attach a function reference for direct-identifier calls where
155
- // we can verify the binding is module-scoped (import / top-level
156
- // const/let/var/function). MemberExpression calls (React.useX) are
157
- // always built-in hooks anyway — kind ends up mapped, no expansion
158
- // needed. Local/parameter names would throw ReferenceError at the
159
- // injection site (which is module-level).
160
- const binding = callPath.scope.getBinding(hookIdent);
161
- if (binding && binding.scope.block.type === 'Program') {
162
- entry.fnIdent = hookIdent;
163
- }
164
- }
165
- hooks.push(entry);
166
- },
167
- Function(innerPath) {
168
- // Don't descend into nested functions — their hooks are not this
169
- // component's hooks. `useCallback(() => {...})` is still traversed
170
- // because the wrapper call is a call expression visited before we
171
- // skip into the body (we only skip the nested function's own
172
- // declaration/body traversal).
173
- innerPath.skip();
174
- },
175
- });
176
- return hooks;
177
- };
178
- const buildHooksArrayExpr = (hooks, t) => {
179
- return t.arrayExpression(hooks.map((h) => {
180
- const props = [
181
- t.objectProperty(t.identifier('name'), t.stringLiteral(h.name)),
182
- t.objectProperty(t.identifier('kind'), t.stringLiteral(h.kind)),
183
- t.objectProperty(t.identifier('hook'), t.stringLiteral(h.hook)),
184
- ];
185
- if (h.mcpId) {
186
- props.push(t.objectProperty(t.identifier('mcpId'), t.stringLiteral(h.mcpId)));
187
- }
188
- if (h.fnIdent) {
189
- // fn: useAuth (runtime reads .__mcp_hooks off this identifier)
190
- props.push(t.objectProperty(t.identifier('fn'), t.identifier(h.fnIdent)));
191
- }
192
- return t.objectExpression(props);
193
- }));
194
- };
195
- // Build:
196
- // try {
197
- // Object.defineProperty(Outer, '__mcp_hooks', {
198
- // configurable: true,
199
- // get: () => Inner.__mcp_hooks,
200
- // });
201
- // } catch {}
202
- // Used for the identifier-ref HOC case (`const Outer = memo(Inner)`) where
203
- // we can't statically collect hooks from the wrapped function. The getter
204
- // forwards to the inner binding's metadata at read time, sidestepping
205
- // declaration order, hoisting, scope, and custom-HOC return shape.
206
- //
207
- // The try/catch is mandatory: the HOC's return value is statically unknown
208
- // — it could be a primitive (number / string), `null`/`undefined`, or a
209
- // frozen / sealed object. Any of those make `Object.defineProperty` throw
210
- // `TypeError` in strict mode (which ES modules always are). A throw at
211
- // module-init kills the bundle. Swallowing here is harmless: the worst
212
- // outcome is metadata not being attached to that one binding, exactly as
213
- // if the plugin had skipped it.
214
- const buildHooksGetterStmt = (outer, inner, t) => {
215
- const defineCall = t.expressionStatement(t.callExpression(t.memberExpression(t.identifier('Object'), t.identifier('defineProperty')), [
216
- t.identifier(outer),
217
- t.stringLiteral('__mcp_hooks'),
218
- t.objectExpression([
219
- t.objectProperty(t.identifier('configurable'), t.booleanLiteral(true)),
220
- t.objectProperty(t.identifier('get'), t.arrowFunctionExpression([], t.memberExpression(t.identifier(inner), t.identifier('__mcp_hooks')))),
221
- ]),
222
- ]));
223
- // Optional-catch-binding (ES2019): `catch {}` — supported by Hermes.
224
- return t.tryStatement(t.blockStatement([defineCall]), t.catchClause(null, t.blockStatement([])));
225
- };
226
- // Build the `ComponentName.__mcp_hooks = [...]` statement, wrapped in a
227
- // `try { ... } catch {}` so a stale binding can't crash module-init. We
228
- // place these at the END of the program body — by the time they run, every
229
- // `var X = ...` in the file has been initialized. Without that placement,
230
- // react-compiler + react-native preset rewrite `const Foo = ...` to a
231
- // hoisted `var Foo = ...` whose binding is `undefined` until its source-line
232
- // is reached, and a worklets-extracted `var _worklet_..._init_data` slips
233
- // between our queued insertAfter target and the rebuilt declaration —
234
- // `Foo.__mcp_hooks = [...]` then runs against `undefined` and throws.
235
- const buildAssignmentStmt = (componentName, hooks, t) => {
236
- const assignment = t.expressionStatement(t.assignmentExpression('=', t.memberExpression(t.identifier(componentName), t.identifier('__mcp_hooks')), buildHooksArrayExpr(hooks, t)));
237
- return t.tryStatement(t.blockStatement([assignment]), t.catchClause(null, t.blockStatement([])));
238
- };
239
- // Queue a `ComponentName.__mcp_hooks = [...]` insertion for `Program:exit`.
240
- // Inserting during the main traversal is unsafe: react-refresh's babel
241
- // plugin replaces HOC-wrapped function expressions via `replaceWith`, which
242
- // re-traverses the rebuilt subtree and (in our experience) drops sibling
243
- // statements we'd inserted via `insertAfter` on the original declarator.
244
- // Deferring to `Program:exit` keeps our writes visible to the final output
245
- // without interfering with replaceWith semantics.
246
- const queueHooksAssignment = (state, statementPath, componentName, hooks) => {
247
- if (hooks.length === 0)
248
- return;
249
- const queue = (state.pendingInjects ??= []);
250
- queue.push({ hooks, kind: 'assignment', outer: componentName, statementPath });
251
- };
252
- const queueHooksGetter = (state, statementPath, outer, inner) => {
253
- const queue = (state.pendingInjects ??= []);
254
- queue.push({ inner, kind: 'getter', outer, statementPath });
255
- };
256
- // Heuristic: the function body must reference JSX. Otherwise it's just a
257
- // plain capitalized helper that happens to share the naming convention.
258
- const bodyUsesJSX = (bodyPath) => {
259
- let uses = false;
260
- bodyPath.traverse({
261
- JSXElement() {
262
- uses = true;
263
- },
264
- JSXFragment() {
265
- uses = true;
266
- },
267
- });
268
- return uses;
269
- };
270
- // Is this a candidate custom hook definition? Name matches `use[A-Z]...`
271
- // and the body contains at least one built-in or custom hook call. Matches
272
- // userland hooks AND library hook sources that happen to pass through our
273
- // babel transform (Metro runs plugins on node_modules by default).
274
- const isCustomHookName = (name) => {
275
- return !!name && /^use[A-Z]/.test(name);
276
- };
277
- // Recognize callee shapes that look like an HOC application without locking
278
- // to a hardcoded name list. Two shapes pass:
279
- // 1. `memo(fn)` / `forwardRef(fn)` / `withAuth(fn)` — bare Identifier callee.
280
- // 2. `React.memo(fn)` / `Mobx.observer(fn)` — MemberExpression where the
281
- // object identifier resolves to a module (import) binding. This rules
282
- // out `arr.map(fn)` and similar local-method calls, which would
283
- // otherwise produce harmless-but-noisy metadata on a non-component
284
- // binding. Property access on a deep chain (`a.b.c(fn)`) is rejected.
285
- const isLikelyHocCallee = (callPath, t) => {
286
- const callee = callPath.node.callee;
287
- if (t.isIdentifier(callee))
288
- return true;
289
- if (t.isMemberExpression(callee) &&
290
- !callee.computed &&
291
- t.isIdentifier(callee.property) &&
292
- t.isIdentifier(callee.object)) {
293
- const binding = callPath.scope.getBinding(callee.object.name);
294
- return !!binding && binding.kind === 'module';
295
- }
296
- return false;
297
- };
298
- // Walk down a CallExpression chain (`memo(forwardRef(...))`,
299
- // `withAuth(observer(...))`, etc.) to whatever the chain bottoms out at.
300
- // Returns null if no unwrap happened (the start was not a recognized HOC
301
- // chain). Each link must look like a plausible HOC application via
302
- // `isLikelyHocCallee`, so non-HOC calls that happen to take a function
303
- // argument (e.g. `arr.map(fn)`) don't trigger metadata attachment on the
304
- // outer binding.
305
- //
306
- // Transparently steps through `AssignmentExpression` and `SequenceExpression`
307
- // wrappers — react-refresh injects `_c = <fn>` and similar synthetic
308
- // expression wraps around the inner component during its `VariableDeclaration`
309
- // enter visitor (which runs before our `VariableDeclarator` visitor). Without
310
- // the step-through, our unwrap would dead-end at the AssignmentExpression
311
- // and miss the inner arrow / function expression entirely.
312
- const unwrapTransparentExpr = (path) => {
313
- let cur = path;
314
- // Bound the loop to defend against pathological ASTs.
315
- for (let i = 0; i < 8; i++) {
316
- if (cur.isAssignmentExpression() && cur.node.operator === '=') {
317
- cur = cur.get('right');
318
- continue;
319
- }
320
- if (cur.isSequenceExpression()) {
321
- const exprs = cur.get('expressions');
322
- if (exprs.length === 0)
323
- break;
324
- cur = exprs[exprs.length - 1];
325
- continue;
326
- }
327
- break;
328
- }
329
- return cur;
330
- };
331
- const unwrapHocChainToBottom = (startPath, t) => {
332
- let cur = unwrapTransparentExpr(startPath);
333
- let unwrapped = false;
334
- while (cur.isCallExpression() && cur.node.arguments.length > 0 && isLikelyHocCallee(cur, t)) {
335
- const arg0 = cur.get('arguments.0');
336
- if (!arg0.node)
337
- return null;
338
- cur = unwrapTransparentExpr(arg0);
339
- unwrapped = true;
340
- }
341
- return unwrapped ? cur : null;
342
- };
343
- // Two consumers of the unwrap walk:
344
- // 1. Inline-function case (`memo(() => <JSX />)`) — find the body so we can
345
- // collect hooks and attach metadata directly to the outer binding.
346
- // 2. Identifier-ref case (`memo(InnerFn)`) — record `{ outer, inner }` so a
347
- // deferred copy `Outer.__mcp_hooks = Inner.__mcp_hooks` can be emitted
348
- // at Program:exit. The inline case can't use the deferred copy approach
349
- // because there's no name to copy from.
350
- const findInnerFunctionBodyPath = (startPath, t) => {
351
- const bottom = unwrapHocChainToBottom(startPath, t);
352
- if (!bottom)
353
- return null;
354
- if (bottom.isArrowFunctionExpression() || bottom.isFunctionExpression()) {
355
- return bottom.get('body');
356
- }
357
- return null;
358
- };
359
- const findInnerIdentifier = (startPath, t) => {
360
- const bottom = unwrapHocChainToBottom(startPath, t);
361
- if (!bottom)
362
- return null;
363
- return bottom.isIdentifier() ? bottom : null;
364
- };
365
- const bodyCallsHook = (bodyPath, t) => {
366
- let hit = false;
367
- bodyPath.traverse({
368
- CallExpression(callPath) {
369
- if (hit)
370
- return;
371
- const callee = callPath.node.callee;
372
- if (t.isIdentifier(callee) && /^use[A-Z]/.test(callee.name)) {
373
- hit = true;
374
- return;
375
- }
376
- if (t.isMemberExpression(callee) &&
377
- !callee.computed &&
378
- t.isIdentifier(callee.property) &&
379
- /^use[A-Z]/.test(callee.property.name)) {
380
- hit = true;
381
- }
382
- },
383
- Function(innerPath) {
384
- innerPath.skip();
385
- },
386
- });
387
- return hit;
388
- };
389
- function testIdPlugin({ types: t }) {
390
- return {
391
- name: 'react-native-mcp-test-id',
392
- visitor: {
393
- // === Part 2: attach __mcp_hooks metadata. ===
394
- // Two candidate shapes per function declaration:
395
- // 1. Component — capitalized name + JSX in body (React component).
396
- // 2. Custom hook — name matches /^use[A-Z]/ + body contains hook calls.
397
- // The VariableDeclarator visitor below covers the
398
- // `const Foo = (...) => {...}` / `const useX = (...) => {...}` forms,
399
- // plus HOC-wrapped components: `const Foo = anyHoc((props) => <JSX />)`
400
- // and nested chains thereof.
401
- FunctionDeclaration(path, state) {
402
- const id = path.node.id;
403
- if (!id)
404
- return;
405
- const bodyPath = path.get('body');
406
- const pluginState = state;
407
- const opts = (state.opts ?? {});
408
- const separator = opts.separator ?? ':';
409
- const shortFile = getShortFile(state.filename);
410
- // Component: capitalized name + (JSX in body OR hook calls in body).
411
- // The hook-call branch covers components that legitimately return
412
- // null / non-JSX values — portal-like, context-only, or
413
- // imperative-handle wrappers. Under the Rules of Hooks, only
414
- // components and custom hooks may call hooks, so a capitalized
415
- // function that calls them is unambiguously a component.
416
- if (isCapitalized(id.name) && (bodyUsesJSX(bodyPath) || bodyCallsHook(bodyPath, t))) {
417
- const hooks = collectHooksInBody(bodyPath, t, shortFile, separator);
418
- queueHooksAssignment(pluginState, path, id.name, hooks);
419
- return;
420
- }
421
- // Custom hook: name matches use[A-Z] + body calls at least one hook.
422
- if (isCustomHookName(id.name) && bodyCallsHook(bodyPath, t)) {
423
- const hooks = collectHooksInBody(bodyPath, t, shortFile, separator);
424
- queueHooksAssignment(pluginState, path, id.name, hooks);
425
- }
426
- },
427
- // === Part 1: stamp data-mcp-id on capitalized JSX elements. ===
428
- JSXOpeningElement(path, state) {
429
- const opts = (state.opts ?? {});
430
- const attrName = opts.attr ?? DEFAULT_ATTR;
431
- const separator = opts.separator ?? ':';
432
- const exclude = opts.exclude ?? DEFAULT_EXCLUDE;
433
- const include = opts.include;
434
- const nameNode = path.node.name;
435
- let componentName;
436
- if (t.isJSXIdentifier(nameNode)) {
437
- componentName = nameNode.name;
438
- }
439
- else if (t.isJSXMemberExpression(nameNode)) {
440
- componentName = `${nameNode.object.name}.${nameNode.property.name}`;
441
- }
442
- else {
443
- return;
444
- }
445
- if (componentName[0] === componentName[0]?.toLowerCase())
446
- return;
447
- if (include && !include.includes(componentName))
448
- return;
449
- if (exclude.includes(componentName))
450
- return;
451
- const shortFile = getShortFile(state.filename);
452
- const line = path.node.loc?.start.line ?? 0;
453
- const generatedId = `${componentName}${separator}${shortFile}${separator}${line}`;
454
- const existingAttr = path.node.attributes.find((attr) => {
455
- return t.isJSXAttribute(attr) && t.isJSXIdentifier(attr.name, { name: attrName });
456
- });
457
- if (existingAttr && t.isJSXAttribute(existingAttr)) {
458
- if (t.isStringLiteral(existingAttr.value)) {
459
- const existing = existingAttr.value.value;
460
- existingAttr.value = t.stringLiteral(`${existing}${separator}${shortFile}${separator}${line}`);
461
- }
462
- return;
463
- }
464
- path.node.attributes.push(t.jsxAttribute(t.jsxIdentifier(attrName), t.stringLiteral(generatedId)));
465
- },
466
- // === Part 3: drain deferred-injection queue at module end. ===
467
- // Runs after all other plugins' visitors (in particular react-refresh's
468
- // replaceWith on HOC-wrapped components) have finished mutating the
469
- // tree. We dedupe by `outer` name to defend against multiple visitor
470
- // passes queuing the same component twice, then push every queued
471
- // statement onto the END of the Program body. End-of-body is the only
472
- // placement that's safe across react-compiler + worklets + unistyles:
473
- // earlier plugins can rewrite a `const Foo = ...` declaration into a
474
- // hoisted `var Foo = ...` and slip extracted helpers (`_worklet_..._init_data`,
475
- // memoization scaffolding) BEFORE Foo's source line, leaving an
476
- // insertAfter-target-position holding a stale `undefined` binding.
477
- Program: {
478
- exit(programPath, state) {
479
- const pluginState = state;
480
- const queue = pluginState.pendingInjects;
481
- if (!queue || queue.length === 0)
482
- return;
483
- const seen = new Set();
484
- for (const entry of queue) {
485
- if (seen.has(entry.outer))
486
- continue;
487
- seen.add(entry.outer);
488
- if (entry.kind === 'assignment') {
489
- programPath.pushContainer('body', buildAssignmentStmt(entry.outer, entry.hooks, t));
490
- }
491
- else {
492
- programPath.pushContainer('body', buildHooksGetterStmt(entry.outer, entry.inner, t));
493
- }
494
- }
495
- pluginState.pendingInjects = [];
496
- },
497
- },
498
- VariableDeclarator(path, state) {
499
- const id = path.node.id;
500
- if (!t.isIdentifier(id))
501
- return;
502
- let initNode = path.node.init;
503
- if (!initNode)
504
- return;
505
- const pluginState = state;
506
- // Unwrap TypeScript casts: `as Foo`, `as const`, `<Foo>x` (legacy
507
- // angle-bracket assertion), and `x satisfies Foo`. Without this,
508
- // `const Wrapped = memo(arrow) as { ... }` fails our HOC unwrap
509
- // because we'd see TSAsExpression instead of the inner CallExpression.
510
- // Pattern in the wild: 21vek's PageFlashListWithBanner /
511
- // ListProductRow / RangeFilter use `as` to attach generic call
512
- // signatures + displayName onto memo'd components.
513
- let initPathForUnwrap = path.get('init');
514
- for (let i = 0; i < 4; i++) {
515
- if (t.isTSAsExpression(initNode) ||
516
- t.isTSTypeAssertion(initNode) ||
517
- t.isTSSatisfiesExpression(initNode) ||
518
- t.isTSNonNullExpression(initNode)) {
519
- initPathForUnwrap = initPathForUnwrap.get('expression');
520
- initNode = initPathForUnwrap.node;
521
- continue;
522
- }
523
- break;
524
- }
525
- const init = initNode;
526
- // Resolve the function body to inspect. Three shapes:
527
- // const Foo = (props) => <JSX /> — direct arrow / fn
528
- // const Foo = memo((props) => <JSX />) — single-HOC wrap
529
- // const Foo = memo(forwardRef((p, r) => ...)) — nested HOC chain
530
- // For HOC wrappers, attaching `Foo.__mcp_hooks = [...]` on the outer
531
- // binding works because `memo()` / `forwardRef()` return plain JS
532
- // objects that React stores in `fiber.type` — the runtime read path
533
- // is identical to the bare-component case. The unwrap is name-
534
- // agnostic (any Identifier or import-namespaced MemberExpression
535
- // callee qualifies), so custom HOCs like `withAuth(...)` work too.
536
- let bodyPath = null;
537
- if (t.isArrowFunctionExpression(init) || t.isFunctionExpression(init)) {
538
- bodyPath = initPathForUnwrap.get('body');
539
- }
540
- else if (t.isCallExpression(init)) {
541
- bodyPath = findInnerFunctionBodyPath(initPathForUnwrap, t);
542
- // Identifier-ref HOC case: `const Foo = memo(InnerFn)`. The inner
543
- // arg is a name, not an inline function — so we can't statically
544
- // collect hooks here. Instead, install a getter on `Foo` that
545
- // forwards to `Inner.__mcp_hooks` at read time.
546
- if (!bodyPath && isCapitalized(id.name)) {
547
- const inner = findInnerIdentifier(initPathForUnwrap, t);
548
- if (inner && inner.scope.getBinding(inner.node.name)) {
549
- const stmt = path.getStatementParent();
550
- if (stmt) {
551
- queueHooksGetter(pluginState, stmt, id.name, inner.node.name);
552
- }
553
- }
554
- }
555
- }
556
- if (!bodyPath || !bodyPath.node)
557
- return;
558
- const opts = (state.opts ?? {});
559
- const separator = opts.separator ?? ':';
560
- const shortFile = getShortFile(state.filename);
561
- // Component: capitalized + (JSX in body OR hook calls). Same
562
- // rationale as FunctionDeclaration above — Rules of Hooks pin a
563
- // capitalized hook-calling function to "component", so JSX is
564
- // sufficient but not necessary (covers `return null` portals).
565
- if (isCapitalized(id.name) && (bodyUsesJSX(bodyPath) || bodyCallsHook(bodyPath, t))) {
566
- const hooks = collectHooksInBody(bodyPath, t, shortFile, separator);
567
- const statement = path.getStatementParent();
568
- if (!statement)
569
- return;
570
- queueHooksAssignment(pluginState, statement, id.name, hooks);
571
- return;
572
- }
573
- // Custom hook: use[A-Z] + body calls hooks.
574
- if (isCustomHookName(id.name) && bodyCallsHook(bodyPath, t)) {
575
- const hooks = collectHooksInBody(bodyPath, t, shortFile, separator);
576
- const statement = path.getStatementParent();
577
- if (!statement)
578
- return;
579
- queueHooksAssignment(pluginState, statement, id.name, hooks);
580
- }
581
- },
582
- },
583
- };
584
- }
585
- //# sourceMappingURL=testIdPlugin.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"testIdPlugin.js","sourceRoot":"","sources":["../../src/babel/testIdPlugin.ts"],"names":[],"mappings":";;AAghBA,+BAgNC;AAxrBD,MAAM,YAAY,GAAG,aAAa,CAAC;AAEnC,MAAM,eAAe,GAAG;IACtB,UAAU;IACV,gBAAgB;IAChB,kBAAkB;IAClB,gBAAgB;IAChB,YAAY;IACZ,UAAU;CACX,CAAC;AAEF,4EAA4E;AAC5E,yEAAyE;AACzE,4CAA4C;AAC5C,EAAE;AACF,2EAA2E;AAC3E,qEAAqE;AACrE,MAAM,SAAS,GAA2B;IACxC,GAAG,EAAE,KAAK;IACV,cAAc,EAAE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