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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"android.js","sourceRoot":"","sources":["../../../../../src/server/host/tools/input/android.ts"],"names":[],"mappings":";;;AACA,+DAAuF;AAEvF,2CAA4E;AAE5E,8EAA8E;AAC9E,+EAA+E;AAC/E,8EAA8E;AAC9E,uCAAuC;AACvC,4CAA4C;AAC5C,MAAM,YAAY,GAAG,cAAc,CAAC;AAEpC,MAAM,kBAAkB,GAAG,CAAC,IAAY,EAAU,EAAE;IAClD,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACzC,OAAO,MAAM,CAAC,OAAO,CAAC,8BAA8B,EAAE,MAAM,CAAC,CAAC;AAChE,CAAC,CAAC;AAEF,MAAM,WAAW,GAAG,KAAK,EACvB,MAAc,EACd,IAAuB,EACvB,MAAqB,EACrB,MAAc,EAC0B,EAAE;IAC1C,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,EAAE;YAC1E,SAAS,EAAE,4BAAgB;SAC5B,CAAC,CAAC;QACH,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,OAAO,EAAE,KAAK,EAAE,WAAW,MAAM,oBAAoB,4BAAgB,IAAI,EAAE,CAAC;QAC9E,CAAC;QACD,IAAI,IAAI,CAAC,QAAQ,KAAK,CAAC,EAAE,CAAC;YACxB,OAAO;gBACL,KAAK,EAAE,mBAAmB,MAAM,iBAAiB,I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;QACb,OAAO,OAAO,CAAC,OAAO,CAAC;YACrB,KAAK,EAAE,gBAAgB,GAAG,iBAAiB,qBAAS,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG;SACnE,CAAC,CAAC;IACL,CAAC;IACD,OAAO,WAAW,CAAC,MAAM,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;AACxE,CAAC,CAAC;AAZW,QAAA,eAAe,mBAY1B"}
@@ -0,0 +1,14 @@
1
+ export declare const INPUT_TIMEOUT_MS = 5000;
2
+ export declare const SWIPE_DURATION_DEFAULT_MS = 300;
3
+ export declare const SWIPE_DURATION_MIN_MS = 50;
4
+ export declare const SWIPE_DURATION_MAX_MS = 5000;
5
+ export declare const LONG_PRESS_DURATION_DEFAULT_MS = 700;
6
+ export declare const DRAG_HOLD_DEFAULT_MS = 500;
7
+ export declare const DRAG_MOVE_DEFAULT_MS = 400;
8
+ export declare const BATCH_FOCUS_DELAY_DEFAULT_MS = 200;
9
+ export declare const BATCH_FOCUS_DELAY_MAX_MS = 5000;
10
+ export declare const ANDROID_KEYCODES: Record<string, string>;
11
+ export declare const KEY_NAMES: string[];
12
+ export declare const clampSwipeDuration: (value: unknown) => number;
13
+ export declare const clampLongPressDuration: (value: unknown) => number;
14
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/server/host/tools/input/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,OAAQ,CAAC;AAEtC,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAC7C,eAAO,MAAM,qBAAqB,KAAK,CAAC;AACxC,eAAO,MAAM,qBAAqB,OAAQ,CAAC;AAE3C,eAAO,MAAM,8BAA8B,MAAM,CAAC;AAElD,eAAO,MAAM,oBAAoB,MAAM,CAAC;AACxC,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAExC,eAAO,MAAM,4BAA4B,MAAM,CAAC;AAChD,eAAO,MAAM,wBAAwB,OAAQ,CAAC;AAE9C,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAYnD,CAAC;AAEF,eAAO,MAAM,SAAS,UAAuC,CAAC;AAE9D,eAAO,MAAM,kBAAkB,UAAW,OAAO,KAAG,MAKnD,CAAC;AAEF,eAAO,MAAM,sBAAsB,UAAW,OAAO,KAAG,MAKvD,CAAC"}
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.clampLongPressDuration = exports.clampSwipeDuration = exports.KEY_NAMES = exports.ANDROID_KEYCODES = exports.BATCH_FOCUS_DELAY_MAX_MS = exports.BATCH_FOCUS_DELAY_DEFAULT_MS = exports.DRAG_MOVE_DEFAULT_MS = exports.DRAG_HOLD_DEFAULT_MS = exports.LONG_PRESS_DURATION_DEFAULT_MS = exports.SWIPE_DURATION_MAX_MS = exports.SWIPE_DURATION_MIN_MS = exports.SWIPE_DURATION_DEFAULT_MS = exports.INPUT_TIMEOUT_MS = void 0;
4
+ exports.INPUT_TIMEOUT_MS = 5_000;
5
+ exports.SWIPE_DURATION_DEFAULT_MS = 300;
6
+ exports.SWIPE_DURATION_MIN_MS = 50;
7
+ exports.SWIPE_DURATION_MAX_MS = 5_000;
8
+ exports.LONG_PRESS_DURATION_DEFAULT_MS = 700;
9
+ exports.DRAG_HOLD_DEFAULT_MS = 500;
10
+ exports.DRAG_MOVE_DEFAULT_MS = 400;
11
+ exports.BATCH_FOCUS_DELAY_DEFAULT_MS = 200;
12
+ exports.BATCH_FOCUS_DELAY_MAX_MS = 5_000;
13
+ exports.ANDROID_KEYCODES = {
14
+ back: 'KEYCODE_BACK',
15
+ backspace: 'KEYCODE_DEL',
16
+ enter: 'KEYCODE_ENTER',
17
+ escape: 'KEYCODE_ESCAPE',
18
+ home: 'KEYCODE_HOME',
19
+ menu: 'KEYCODE_MENU',
20
+ power: 'KEYCODE_POWER',
21
+ space: 'KEYCODE_SPACE',
22
+ tab: 'KEYCODE_TAB',
23
+ volume_down: 'KEYCODE_VOLUME_DOWN',
24
+ volume_up: 'KEYCODE_VOLUME_UP',
25
+ };
26
+ exports.KEY_NAMES = Object.keys(exports.ANDROID_KEYCODES).sort();
27
+ const clampSwipeDuration = (value) => {
28
+ if (typeof value !== 'number' || !Number.isFinite(value) || value <= 0) {
29
+ return exports.SWIPE_DURATION_DEFAULT_MS;
30
+ }
31
+ return Math.max(exports.SWIPE_DURATION_MIN_MS, Math.min(exports.SWIPE_DURATION_MAX_MS, Math.floor(value)));
32
+ };
33
+ exports.clampSwipeDuration = clampSwipeDuration;
34
+ const clampLongPressDuration = (value) => {
35
+ if (typeof value !== 'number' || !Number.isFinite(value) || value <= 0) {
36
+ return exports.LONG_PRESS_DURATION_DEFAULT_MS;
37
+ }
38
+ return Math.max(exports.SWIPE_DURATION_MIN_MS, Math.min(exports.SWIPE_DURATION_MAX_MS, Math.floor(value)));
39
+ };
40
+ exports.clampLongPressDuration = clampLongPressDuration;
41
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../src/server/host/tools/input/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG,KAAK,CAAC;AAEzB,QAAA,yBAAyB,GAAG,GAAG,CAAC;AAChC,QAAA,qBAAqB,GAAG,EAAE,CAAC;AAC3B,QAAA,qBAAqB,GAAG,KAAK,CAAC;AAE9B,QAAA,8BAA8B,GAAG,GAAG,CAAC;AAErC,QAAA,oBAAoB,GAAG,GAAG,CAAC;AAC3B,QAAA,oBAAoB,GAAG,GAAG,CAAC;AAE3B,QAAA,4BAA4B,GAAG,GAAG,CAAC;AACnC,QAAA,wBAAwB,GAAG,KAAK,CAAC;AAEjC,QAAA,gBAAgB,GAA2B;IACtD,IAAI,EAAE,cAAc;IACpB,SAAS,EAAE,aAAa;IACxB,KAAK,EAAE,eAAe;IACtB,MAAM,EAAE,gBAAgB;IACxB,IAAI,EAAE,cAAc;IACpB,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,eAAe;IACtB,KAAK,EAAE,eAAe;IACtB,GAAG,EAAE,aAAa;IAClB,WAAW,EAAE,qBAAqB;IAClC,SAAS,EAAE,mBAAmB;CAC/B,CAAC;AAEW,QAAA,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,wBAAgB,CAAC,CAAC,IAAI,EAAE,CAAC;AAEvD,MAAM,kBAAkB,GAAG,CAAC,KAAc,EAAU,EAAE;IAC3D,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,EAAE,CAAC;QACvE,OAAO,iCAAyB,CAAC;IACnC,CAAC;IACD,OAAO,IAAI,CAAC,GAAG,CAAC,6BAAqB,EAAE,IAAI,CAAC,GAAG,CAAC,6BAAqB,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAC7F,CAAC,CAAC;AALW,QAAA,kBAAkB,sBAK7B;AAEK,MAAM,sBAAsB,GAAG,CAAC,KAAc,EAAU,EAAE;IAC/D,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,EAAE,CAAC;QACvE,OAAO,sCAA8B,CAAC;IACxC,CAAC;IACD,OAAO,IAAI,CAAC,GAAG,CAAC,6BAAqB,EAAE,IAAI,CAAC,GAAG,CAAC,6BAAqB,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAC7F,CAAC,CAAC;AALW,QAAA,sBAAsB,0BAKjC"}
@@ -0,0 +1,4 @@
1
+ import { type ProcessRunner } from '../../../../server/host/processRunner';
2
+ import { type HostToolHandler } from '../../../../server/host/types';
3
+ export declare const dragTool: (runner: ProcessRunner) => HostToolHandler;
4
+ //# sourceMappingURL=drag.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drag.d.ts","sourceRoot":"","sources":["../../../../../src/server/host/tools/input/drag.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAY3D,eAAO,MAAM,QAAQ,WAAY,aAAa,KAAG,eAgFhD,CAAC"}
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.dragTool = void 0;
4
+ const deviceResolver_1 = require("../../../../server/host/deviceResolver");
5
+ const helpers_1 = require("../../../../server/host/helpers");
6
+ const iosInput_1 = require("../../../../server/host/iosInput");
7
+ const android_1 = require("./android");
8
+ const constants_1 = require("./constants");
9
+ const dragTool = (runner) => {
10
+ return {
11
+ description: 'Primary way to deliver a hold-then-drag gesture — swipe-to-delete, drag-to-reorder, pull-to-refresh-with-hold. Total gesture time = holdMs + durationMs (both platforms emit a single slow swipe — the hold is simulated by lingering near the start, not a true stop-then-move pause). When precise hold timing matters (e.g. iOS haptic long-press triggers), test + tune holdMs empirically.',
12
+ handler: async (args, ctx) => {
13
+ const resolved = await (0, deviceResolver_1.resolveDevice)(ctx, (0, helpers_1.parseResolveOptions)(args), runner);
14
+ if (!resolved.ok) {
15
+ return { error: resolved.error };
16
+ }
17
+ const x1 = (0, helpers_1.parseCoord)(args.x1, 'x1');
18
+ if (!x1.ok)
19
+ return { error: x1.error };
20
+ const y1 = (0, helpers_1.parseCoord)(args.y1, 'y1');
21
+ if (!y1.ok)
22
+ return { error: y1.error };
23
+ const x2 = (0, helpers_1.parseCoord)(args.x2, 'x2');
24
+ if (!x2.ok)
25
+ return { error: x2.error };
26
+ const y2 = (0, helpers_1.parseCoord)(args.y2, 'y2');
27
+ if (!y2.ok)
28
+ return { error: y2.error };
29
+ const holdMs = typeof args.holdMs === 'number' && Number.isFinite(args.holdMs) && args.holdMs >= 0
30
+ ? Math.min(constants_1.SWIPE_DURATION_MAX_MS, Math.floor(args.holdMs))
31
+ : constants_1.DRAG_HOLD_DEFAULT_MS;
32
+ const moveMs = (0, constants_1.clampSwipeDuration)(args.durationMs ?? constants_1.DRAG_MOVE_DEFAULT_MS);
33
+ const total = Math.min(constants_1.SWIPE_DURATION_MAX_MS, holdMs + moveMs);
34
+ const result = resolved.device.platform === 'ios'
35
+ ? await (0, iosInput_1.swipeIos)(resolved.device.nativeId, x1.value, y1.value, x2.value, y2.value, total, runner)
36
+ : await (0, android_1.swipeAndroid)(resolved.device.nativeId, x1.value, y1.value, x2.value, y2.value, total, runner);
37
+ if ('error' in result) {
38
+ return { error: result.error };
39
+ }
40
+ return {
41
+ device: resolved.device,
42
+ dragged: true,
43
+ from: { x: x1.value, y: y1.value },
44
+ holdMs,
45
+ moveMs,
46
+ to: { x: x2.value, y: y2.value },
47
+ totalMs: total,
48
+ };
49
+ },
50
+ inputSchema: {
51
+ durationMs: {
52
+ default: constants_1.DRAG_MOVE_DEFAULT_MS,
53
+ description: 'Move portion in milliseconds.',
54
+ maximum: constants_1.SWIPE_DURATION_MAX_MS,
55
+ minimum: constants_1.SWIPE_DURATION_MIN_MS,
56
+ type: 'number',
57
+ },
58
+ holdMs: {
59
+ default: constants_1.DRAG_HOLD_DEFAULT_MS,
60
+ description: 'Hold time near start before the motion. 0 to skip hold.',
61
+ maximum: constants_1.SWIPE_DURATION_MAX_MS,
62
+ minimum: 0,
63
+ type: 'number',
64
+ },
65
+ platform: helpers_1.PLATFORM_ARG_SCHEMA,
66
+ x1: { description: 'Start x pixel coordinate.', minimum: 0, type: 'number' },
67
+ x2: { description: 'End x pixel coordinate.', minimum: 0, type: 'number' },
68
+ y1: { description: 'Start y pixel coordinate.', minimum: 0, type: 'number' },
69
+ y2: { description: 'End y pixel coordinate.', minimum: 0, type: 'number' },
70
+ ...helpers_1.NATIVE_ID_SCHEMA,
71
+ },
72
+ timeout: constants_1.INPUT_TIMEOUT_MS + constants_1.SWIPE_DURATION_MAX_MS,
73
+ };
74
+ };
75
+ exports.dragTool = dragTool;
76
+ //# sourceMappingURL=drag.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drag.js","sourceRoot":"","sources":["../../../../../src/server/host/tools/input/drag.ts"],"names":[],"mappings":";;;AAAA,iEAA6D;AAC7D,mDAK+B;AAC/B,qDAAkD;AAIlD,uCAAyC;AACzC,2CAOqB;AAEd,MAAM,QAAQ,GAAG,CAAC,MAAqB,EAAmB,EAAE;IACjE,OAAO;QACL,WAAW,EACT,iYAAiY;QACnY,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;YAC3B,MAAM,QAAQ,GAAG,MAAM,IAAA,8BAAa,EAAC,GAAG,EAAE,IAAA,6BAAmB,EAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC;YAC7E,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;gBACjB,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAC;YACnC,CAAC;YACD,MAAM,EAAE,GAAG,IAAA,oBAAU,EAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;YACrC,IAAI,CAAC,EAAE,CAAC,EAAE;gBAAE,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC;YACvC,MAAM,EAAE,GAAG,IAAA,oBAAU,EAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;YACrC,IAAI,CAAC,EAAE,CAAC,EAAE;gBAAE,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC;YACvC,MAAM,EAAE,GAAG,IAAA,oBAAU,EAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;YACrC,IAAI,CAAC,EAAE,CAAC,EAAE;gBAAE,OAAO,EAAE,KAAK,EAAE,EAAE,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AC,CAAC;AAhFW,QAAA,QAAQ,YAgFnB"}
@@ -0,0 +1,8 @@
1
+ export { dragTool } from './drag';
2
+ export { longPressTool } from './longPress';
3
+ export { pressKeyTool } from './pressKey';
4
+ export { swipeTool } from './swipe';
5
+ export { tapTool } from './tap';
6
+ export { typeTextTool } from './typeText';
7
+ export { typeTextBatchTool } from './typeTextBatch';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/server/host/tools/input/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.typeTextBatchTool = exports.typeTextTool = exports.tapTool = exports.swipeTool = exports.pressKeyTool = exports.longPressTool = exports.dragTool = void 0;
4
+ var drag_1 = require("./drag");
5
+ Object.defineProperty(exports, "dragTool", { enumerable: true, get: function () { return drag_1.dragTool; } });
6
+ var longPress_1 = require("./longPress");
7
+ Object.defineProperty(exports, "longPressTool", { enumerable: true, get: function () { return longPress_1.longPressTool; } });
8
+ var pressKey_1 = require("./pressKey");
9
+ Object.defineProperty(exports, "pressKeyTool", { enumerable: true, get: function () { return pressKey_1.pressKeyTool; } });
10
+ var swipe_1 = require("./swipe");
11
+ Object.defineProperty(exports, "swipeTool", { enumerable: true, get: function () { return swipe_1.swipeTool; } });
12
+ var tap_1 = require("./tap");
13
+ Object.defineProperty(exports, "tapTool", { enumerable: true, get: function () { return tap_1.tapTool; } });
14
+ var typeText_1 = require("./typeText");
15
+ Object.defineProperty(exports, "typeTextTool", { enumerable: true, get: function () { return typeText_1.typeTextTool; } });
16
+ var typeTextBatch_1 = require("./typeTextBatch");
17
+ Object.defineProperty(exports, "typeTextBatchTool", { enumerable: true, get: function () { return typeTextBatch_1.typeTextBatchTool; } });
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/server/host/tools/input/index.ts"],"names":[],"mappings":";;;AAAA,+BAAkC;AAAzB,gGAAA,QAAQ,OAAA;AACjB,yCAA4C;AAAnC,0GAAA,aAAa,OAAA;AACtB,uCAA0C;AAAjC,wGAAA,YAAY,OAAA;AACrB,iCAAoC;AAA3B,kGAAA,SAAS,OAAA;AAClB,6BAAgC;AAAvB,8FAAA,OAAO,OAAA;AAChB,uCAA0C;AAAjC,wGAAA,YAAY,OAAA;AACrB,iDAAoD;AAA3C,kHAAA,iBAAiB,OAAA"}
@@ -0,0 +1,4 @@
1
+ import { type ProcessRunner } from '../../../../server/host/processRunner';
2
+ import { type HostToolHandler } from '../../../../server/host/types';
3
+ export declare const longPressTool: (runner: ProcessRunner) => HostToolHandler;
4
+ //# sourceMappingURL=longPress.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"longPress.d.ts","sourceRoot":"","sources":["../../../../../src/server/host/tools/input/longPress.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAW3D,eAAO,MAAM,aAAa,WAAY,aAAa,KAAG,eAsDrD,CAAC"}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.longPressTool = void 0;
4
+ const deviceResolver_1 = require("../../../../server/host/deviceResolver");
5
+ const helpers_1 = require("../../../../server/host/helpers");
6
+ const iosInput_1 = require("../../../../server/host/iosInput");
7
+ const android_1 = require("./android");
8
+ const constants_1 = require("./constants");
9
+ const longPressTool = (runner) => {
10
+ return {
11
+ description: 'Primary way to deliver a long-press: hold a touch at (x, y) for durationMs through the OS gesture pipeline. Default 700ms — above the RN Pressable long-press threshold (~500ms) with margin. Internally a zero-distance swipe kept alive for the full duration on both platforms.',
12
+ handler: async (args, ctx) => {
13
+ const resolved = await (0, deviceResolver_1.resolveDevice)(ctx, (0, helpers_1.parseResolveOptions)(args), runner);
14
+ if (!resolved.ok) {
15
+ return { error: resolved.error };
16
+ }
17
+ const x = (0, helpers_1.parseCoord)(args.x, 'x');
18
+ if (!x.ok)
19
+ return { error: x.error };
20
+ const y = (0, helpers_1.parseCoord)(args.y, 'y');
21
+ if (!y.ok)
22
+ return { error: y.error };
23
+ const durationMs = (0, constants_1.clampLongPressDuration)(args.durationMs);
24
+ const result = resolved.device.platform === 'ios'
25
+ ? await (0, iosInput_1.swipeIos)(resolved.device.nativeId, x.value, y.value, x.value, y.value, durationMs, runner)
26
+ : await (0, android_1.swipeAndroid)(resolved.device.nativeId, x.value, y.value, x.value, y.value, durationMs, runner);
27
+ if ('error' in result) {
28
+ return { error: result.error };
29
+ }
30
+ return { device: resolved.device, durationMs, longPressed: true, x: x.value, y: y.value };
31
+ },
32
+ inputSchema: {
33
+ durationMs: {
34
+ default: constants_1.LONG_PRESS_DURATION_DEFAULT_MS,
35
+ description: 'Hold duration in milliseconds.',
36
+ maximum: constants_1.SWIPE_DURATION_MAX_MS,
37
+ minimum: constants_1.SWIPE_DURATION_MIN_MS,
38
+ type: 'number',
39
+ },
40
+ platform: helpers_1.PLATFORM_ARG_SCHEMA,
41
+ x: { description: 'Absolute x pixel coordinate.', minimum: 0, type: 'number' },
42
+ y: { description: 'Absolute y pixel coordinate.', minimum: 0, type: 'number' },
43
+ ...helpers_1.NATIVE_ID_SCHEMA,
44
+ },
45
+ timeout: constants_1.INPUT_TIMEOUT_MS + constants_1.SWIPE_DURATION_MAX_MS,
46
+ };
47
+ };
48
+ exports.longPressTool = longPressTool;
49
+ //# sourceMappingURL=longPress.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"longPress.js","sourceRoot":"","sources":["../../../../../src/server/host/tools/input/longPress.ts"],"names":[],"mappings":";;;AAAA,iEAA6D;AAC7D,mDAK+B;AAC/B,qDAAkD;AAIlD,uCAAyC;AACzC,2CAMqB;AAEd,MAAM,aAAa,GAAG,CAAC,MAAqB,EAAmB,EAAE;IACtE,OAAO;QACL,WAAW,EACT,oRAAoR;QACtR,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;YAC3B,MAAM,QAAQ,GAAG,MAAM,IAAA,8BAAa,EAAC,GAAG,EAAE,IAAA,6BAAmB,EAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC;YAC7E,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;gBACjB,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAC;YACnC,CAAC;YACD,MAAM,CAAC,GAAG,IAAA,oBAAU,EAAC,IAAI,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;YAClC,IAAI,CAAC,CAAC,CAAC,EAAE;gBAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC;YACrC,MAAM,CAAC,GAAG,IAAA,oBAAU,EAAC,IAAI,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;YAClC,IAAI,CAAC,CAAC,CAAC,EAAE;gBAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC;YACrC,MAAM,UAAU,GAAG,IAAA,kCAAsB,EAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YAC3D,MAAM,MAAM,GACV,QAAQ,CAAC,MAAM,CAAC,QAAQ,KAAK,KAAK;gBAChC,CAAC,CAAC,MAA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{ type ProcessRunner } from '../../../../server/host/processRunner';
2
+ import { type HostToolHandler } from '../../../../server/host/types';
3
+ export declare const pressKeyTool: (runner: ProcessRunner) => HostToolHandler;
4
+ //# sourceMappingURL=pressKey.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pressKey.d.ts","sourceRoot":"","sources":["../../../../../src/server/host/tools/input/pressKey.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAK3D,eAAO,MAAM,YAAY,WAAY,aAAa,KAAG,eAgCpD,CAAC"}
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.pressKeyTool = void 0;
4
+ const deviceResolver_1 = require("../../../../server/host/deviceResolver");
5
+ const helpers_1 = require("../../../../server/host/helpers");
6
+ const iosInput_1 = require("../../../../server/host/iosInput");
7
+ const android_1 = require("./android");
8
+ const constants_1 = require("./constants");
9
+ const pressKeyTool = (runner) => {
10
+ return {
11
+ description: `Primary way to press a hardware / semantic key — routes through the OS so native handlers (back, home, volume, etc.) fire. Accepted: ${constants_1.KEY_NAMES.join(', ')}. iOS lacks back / menu / power / volume_up / volume_down.`,
12
+ handler: async (args, ctx) => {
13
+ const resolved = await (0, deviceResolver_1.resolveDevice)(ctx, (0, helpers_1.parseResolveOptions)(args), runner);
14
+ if (!resolved.ok) {
15
+ return { error: resolved.error };
16
+ }
17
+ const key = (0, helpers_1.parseStringArg)(args.key);
18
+ if (!key) {
19
+ return { error: `'key' is required. Supported: ${constants_1.KEY_NAMES.join(', ')}.` };
20
+ }
21
+ const result = resolved.device.platform === 'ios'
22
+ ? await (0, iosInput_1.pressKeyIos)(resolved.device.nativeId, key, runner)
23
+ : await (0, android_1.pressKeyAndroid)(resolved.device.nativeId, key, runner);
24
+ if ('error' in result) {
25
+ return { error: result.error };
26
+ }
27
+ return { device: resolved.device, key, pressed: true };
28
+ },
29
+ inputSchema: {
30
+ key: {
31
+ description: `Semantic key name. Mapped to the target platform's native key code internally. Supported: ${constants_1.KEY_NAMES.join(', ')}.`,
32
+ enum: constants_1.KEY_NAMES,
33
+ type: 'string',
34
+ },
35
+ platform: helpers_1.PLATFORM_ARG_SCHEMA,
36
+ ...helpers_1.NATIVE_ID_SCHEMA,
37
+ },
38
+ timeout: constants_1.INPUT_TIMEOUT_MS,
39
+ };
40
+ };
41
+ exports.pressKeyTool = pressKeyTool;
42
+ //# sourceMappingURL=pressKey.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pressKey.js","sourceRoot":"","sources":["../../../../../src/server/host/tools/input/pressKey.ts"],"names":[],"mappings":";;;AAAA,iEAA6D;AAC7D,mDAK+B;AAC/B,qDAAqD;AAIrD,uCAA4C;AAC5C,2CAA0D;AAEnD,MAAM,YAAY,GAAG,CAAC,MAAqB,EAAmB,EAAE;IACrE,OAAO;QACL,WAAW,EAAE,wIAAwI,qBAAS,CAAC,IAAI,CAAC,IAAI,CAAC,4DAA4D;QACrO,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;YAC3B,MAAM,QAAQ,GAAG,MAAM,IAAA,8BAAa,EAAC,GAAG,EAAE,IAAA,6BAAmB,EAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC;YAC7E,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;gBACjB,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAC;YACnC,CAAC;YACD,MAAM,GAAG,GAAG,IAAA,wBAAc,EAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACrC,IAAI,CAAC,GAAG,EAAE,CAAC;gBACT,OAAO,EAAE,KAAK,EAAE,iCAAiC,qBAAS,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;YAC7E,CAAC;YACD,MAAM,MAAM,GACV,QAAQ,CAAC,MAAM,CAAC,QAAQ,KAAK,KAAK;gBAChC,CAAC,CAAC,MAAM,IAAA,sBAAW,EAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,GAAG,EAAE,MAAM,CAAC;gBAC1D,CAAC,CAAC,MAAM,IAAA,yBAAe,EAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;YACnE,IAAI,OAAO,IAAI,MAAM,EAAE,CAAC;gBACtB,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC;YACjC,CAAC;YACD,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;QACzD,CAAC;QACD,WAAW,EAAE;YACX,GAAG,EAAE;gBACH,WAAW,EAAE,6FAA6F,qBAAS,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG;gBACjI,IAAI,EAAE,qBAAS;gBACf,IAAI,EAAE,QAAQ;aACf;YACD,QAAQ,EAAE,6BAAmB;YAC7B,GAAG,0BAAgB;SACpB;QACD,OAAO,EAAE,4BAAgB;KAC1B,CAAC;AACJ,CAAC,CAAC;AAhCW,QAAA,YAAY,gBAgCvB"}
@@ -0,0 +1,4 @@
1
+ import { type ProcessRunner } from '../../../../server/host/processRunner';
2
+ import { type HostToolHandler } from '../../../../server/host/types';
3
+ export declare const swipeTool: (runner: ProcessRunner) => HostToolHandler;
4
+ //# sourceMappingURL=swipe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"swipe.d.ts","sourceRoot":"","sources":["../../../../../src/server/host/tools/input/swipe.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAW3D,eAAO,MAAM,SAAS,WAAY,aAAa,KAAG,eA0EjD,CAAC"}
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.swipeTool = void 0;
4
+ const deviceResolver_1 = require("../../../../server/host/deviceResolver");
5
+ const helpers_1 = require("../../../../server/host/helpers");
6
+ const iosInput_1 = require("../../../../server/host/iosInput");
7
+ const android_1 = require("./android");
8
+ const constants_1 = require("./constants");
9
+ const swipeTool = (runner) => {
10
+ return {
11
+ description: 'Primary way to deliver a swipe / scroll gesture, from (x1, y1) to (x2, y2) in physical pixels. Runs through the OS gesture pipeline — Pan responders, scroll momentum, and gesture handlers all behave as under a finger. durationMs default 300, clamped 50..5000.',
12
+ handler: async (args, ctx) => {
13
+ const resolved = await (0, deviceResolver_1.resolveDevice)(ctx, (0, helpers_1.parseResolveOptions)(args), runner);
14
+ if (!resolved.ok) {
15
+ return { error: resolved.error };
16
+ }
17
+ const x1 = (0, helpers_1.parseCoord)(args.x1, 'x1');
18
+ if (!x1.ok)
19
+ return { error: x1.error };
20
+ const y1 = (0, helpers_1.parseCoord)(args.y1, 'y1');
21
+ if (!y1.ok)
22
+ return { error: y1.error };
23
+ const x2 = (0, helpers_1.parseCoord)(args.x2, 'x2');
24
+ if (!x2.ok)
25
+ return { error: x2.error };
26
+ const y2 = (0, helpers_1.parseCoord)(args.y2, 'y2');
27
+ if (!y2.ok)
28
+ return { error: y2.error };
29
+ const durationMs = (0, constants_1.clampSwipeDuration)(args.durationMs);
30
+ const result = resolved.device.platform === 'ios'
31
+ ? await (0, iosInput_1.swipeIos)(resolved.device.nativeId, x1.value, y1.value, x2.value, y2.value, durationMs, runner)
32
+ : await (0, android_1.swipeAndroid)(resolved.device.nativeId, x1.value, y1.value, x2.value, y2.value, durationMs, runner);
33
+ if ('error' in result) {
34
+ return { error: result.error };
35
+ }
36
+ return {
37
+ device: resolved.device,
38
+ durationMs,
39
+ from: { x: x1.value, y: y1.value },
40
+ swiped: true,
41
+ to: { x: x2.value, y: y2.value },
42
+ };
43
+ },
44
+ inputSchema: {
45
+ durationMs: {
46
+ default: constants_1.SWIPE_DURATION_DEFAULT_MS,
47
+ description: 'Total swipe duration in milliseconds.',
48
+ maximum: constants_1.SWIPE_DURATION_MAX_MS,
49
+ minimum: constants_1.SWIPE_DURATION_MIN_MS,
50
+ type: 'number',
51
+ },
52
+ platform: helpers_1.PLATFORM_ARG_SCHEMA,
53
+ x1: {
54
+ description: 'Start x pixel coordinate (top-left origin).',
55
+ minimum: 0,
56
+ type: 'number',
57
+ },
58
+ x2: { description: 'End x pixel coordinate (top-left origin).', minimum: 0, type: 'number' },
59
+ y1: {
60
+ description: 'Start y pixel coordinate (top-left origin).',
61
+ minimum: 0,
62
+ type: 'number',
63
+ },
64
+ y2: { description: 'End y pixel coordinate (top-left origin).', minimum: 0, type: 'number' },
65
+ ...helpers_1.NATIVE_ID_SCHEMA,
66
+ },
67
+ timeout: constants_1.INPUT_TIMEOUT_MS + constants_1.SWIPE_DURATION_MAX_MS,
68
+ };
69
+ };
70
+ exports.swipeTool = swipeTool;
71
+ //# sourceMappingURL=swipe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"swipe.js","sourceRoot":"","sources":["../../../../../src/server/host/tools/input/swipe.ts"],"names":[],"mappings":";;;AAAA,iEAA6D;AAC7D,mDAK+B;AAC/B,qDAAkD;AAIlD,uCAAyC;AACzC,2CAMqB;AAEd,MAAM,SAAS,GAAG,CAAC,MAAqB,EAAmB,EAAE;IAClE,OAAO;QACL,WAAW,EACT,qQAAqQ;QACvQ,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;YAC3B,MAAM,QAAQ,GAAG,MAAM,IAAA,8BAAa,EAAC,GAAG,EAAE,IAAA,6BAAmB,EAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC;YAC7E,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;gBACjB,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAC;YACnC,CAAC;YACD,MAAM,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ner';
2
+ import { type HostToolHandler } from '../../../../server/host/types';
3
+ export declare const tapTool: (runner: ProcessRunner) => HostToolHandler;
4
+ //# sourceMappingURL=tap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tap.d.ts","sourceRoot":"","sources":["../../../../../src/server/host/tools/input/tap.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAK3D,eAAO,MAAM,OAAO,WAAY,aAAa,KAAG,eAsC/C,CAAC"}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.tapTool = void 0;
4
+ const deviceResolver_1 = require("../../../../server/host/deviceResolver");
5
+ const helpers_1 = require("../../../../server/host/helpers");
6
+ const iosInput_1 = require("../../../../server/host/iosInput");
7
+ const android_1 = require("./android");
8
+ const constants_1 = require("./constants");
9
+ const tapTool = (runner) => {
10
+ return {
11
+ description: 'Primary way to deliver a tap to the app, at physical-pixel (x, y). Runs through the real OS gesture pipeline so Pressable feedback, gesture responders, and hit-test all fire. For a fiber-targeted tap without copying bounds by hand, prefer host__tap_fiber.',
12
+ handler: async (args, ctx) => {
13
+ const resolved = await (0, deviceResolver_1.resolveDevice)(ctx, (0, helpers_1.parseResolveOptions)(args), runner);
14
+ if (!resolved.ok) {
15
+ return { error: resolved.error };
16
+ }
17
+ const x = (0, helpers_1.parseCoord)(args.x, 'x');
18
+ if (!x.ok)
19
+ return { error: x.error };
20
+ const y = (0, helpers_1.parseCoord)(args.y, 'y');
21
+ if (!y.ok)
22
+ return { error: y.error };
23
+ const result = resolved.device.platform === 'ios'
24
+ ? await (0, iosInput_1.tapIos)(resolved.device.nativeId, x.value, y.value, runner)
25
+ : await (0, android_1.tapAndroid)(resolved.device.nativeId, x.value, y.value, runner);
26
+ if ('error' in result) {
27
+ return { error: result.error };
28
+ }
29
+ return { device: resolved.device, tapped: true, x: x.value, y: y.value };
30
+ },
31
+ inputSchema: {
32
+ platform: helpers_1.PLATFORM_ARG_SCHEMA,
33
+ x: {
34
+ description: 'Absolute x pixel coordinate (top-left origin).',
35
+ minimum: 0,
36
+ type: 'number',
37
+ },
38
+ y: {
39
+ description: 'Absolute y pixel coordinate (top-left origin).',
40
+ minimum: 0,
41
+ type: 'number',
42
+ },
43
+ ...helpers_1.NATIVE_ID_SCHEMA,
44
+ },
45
+ timeout: constants_1.INPUT_TIMEOUT_MS,
46
+ };
47
+ };
48
+ exports.tapTool = tapTool;
49
+ //# sourceMappingURL=tap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tap.js","sourceRoot":"","sources":["../../../../../src/server/host/tools/input/tap.ts"],"names":[],"mappings":";;;AAAA,iEAA6D;AAC7D,mDAK+B;AAC/B,qDAAgD;AAIhD,uCAAuC;AACvC,2CAA+C;AAExC,MAAM,OAAO,GAAG,CAAC,MAAqB,EAAmB,EAAE;IAChE,OAAO;QACL,WAAW,EACT,iQAAiQ;QACnQ,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;YAC3B,MAAM,QAAQ,GAAG,MAAM,IAAA,8BAAa,EAAC,GAAG,EAAE,IAAA,6BAAmB,EAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC;YAC7E,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;gBACjB,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAC;YACnC,CAAC;YACD,MAAM,CAAC,GAAG,IAAA,oBAAU,EAAC,IAAI,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;YAClC,IAAI,CAAC,CAAC,CAAC,EAAE;gBAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC;YACrC,MAAM,CAAC,GAAG,IAAA,oBAAU,EAAC,IAAI,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;YAClC,IAAI,CAAC,CAAC,CAAC,EAAE;gBAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC;YACrC,MAAM,MAAM,GACV,QAAQ,CAAC,MAAM,CAAC,QAAQ,KAAK,KAAK;gBAChC,CAAC,CAAC,MAAM,IAAA,iBAAM,EAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC;gBAClE,CAAC,CAAC,MAAM,IAAA,oBAAU,EAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;YAC3E,IAAI,OAAO,IAAI,MAAM,EAAE,CAAC;gBACtB,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC;YACjC,CAAC;YACD,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC;QAC3E,CAAC;QACD,WAAW,EAAE;YACX,QAAQ,EAAE,6BAAmB;YAC7B,CAAC,EAAE;gBACD,WAAW,EAAE,gDAAgD;gBAC7D,OAAO,EAAE,CAAC;gBACV,IAAI,EAAE,QAAQ;aACf;YACD,CAAC,EAAE;gBACD,WAAW,EAAE,gDAAgD;gBAC7D,OAAO,EAAE,CAAC;gBACV,IAAI,EAAE,QAAQ;aACf;YACD,GAAG,0BAAgB;SACpB;QACD,OAAO,EAAE,4BAAgB;KAC1B,CAAC;AACJ,CAAC,CAAC;AAtCW,QAAA,OAAO,WAsClB"}
@@ -0,0 +1,4 @@
1
+ import { type ProcessRunner } from '../../../../server/host/processRunner';
2
+ import { type HostToolHandler } from '../../../../server/host/types';
3
+ export declare const typeTextTool: (runner: ProcessRunner) => HostToolHandler;
4
+ //# sourceMappingURL=typeText.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typeText.d.ts","sourceRoot":"","sources":["../../../../../src/server/host/tools/input/typeText.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAK3D,eAAO,MAAM,YAAY,WAAY,aAAa,KAAG,eA4CpD,CAAC"}
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.typeTextTool = void 0;
4
+ const deviceResolver_1 = require("../../../../server/host/deviceResolver");
5
+ const helpers_1 = require("../../../../server/host/helpers");
6
+ const iosInput_1 = require("../../../../server/host/iosInput");
7
+ const android_1 = require("./android");
8
+ const constants_1 = require("./constants");
9
+ const typeTextTool = (runner) => {
10
+ return {
11
+ description: "Primary way to type into the currently focused text input — replaces existing content (select-all then paste). submit:true presses ENTER after typing. iOS: unicode via clipboard paste, keyboard-layout immune. Android: ASCII only (adb input text limitation); for non-Latin scripts fall back to fiber_tree__call on the input's onChangeText.",
12
+ handler: async (args, ctx) => {
13
+ const resolved = await (0, deviceResolver_1.resolveDevice)(ctx, (0, helpers_1.parseResolveOptions)(args), runner);
14
+ if (!resolved.ok) {
15
+ return { error: resolved.error };
16
+ }
17
+ const text = typeof args.text === 'string' ? args.text : undefined;
18
+ if (text === undefined) {
19
+ return { error: "'text' is required and must be a string" };
20
+ }
21
+ const submit = args.submit === true;
22
+ const result = resolved.device.platform === 'ios'
23
+ ? await (0, iosInput_1.typeTextIos)(resolved.device.nativeId, text, submit, runner)
24
+ : await (0, android_1.typeTextAndroid)(resolved.device.nativeId, text, submit, runner);
25
+ if ('error' in result) {
26
+ return { error: result.error };
27
+ }
28
+ return {
29
+ device: resolved.device,
30
+ length: text.length,
31
+ submitted: submit,
32
+ typed: true,
33
+ };
34
+ },
35
+ inputSchema: {
36
+ platform: helpers_1.PLATFORM_ARG_SCHEMA,
37
+ submit: {
38
+ default: false,
39
+ description: 'Press ENTER after typing (e.g. to submit a search).',
40
+ type: 'boolean',
41
+ },
42
+ text: {
43
+ description: 'Text to type into the currently focused input field. Whitespace and shell metacharacters are escaped automatically.',
44
+ type: 'string',
45
+ },
46
+ ...helpers_1.NATIVE_ID_SCHEMA,
47
+ },
48
+ timeout: constants_1.INPUT_TIMEOUT_MS,
49
+ };
50
+ };
51
+ exports.typeTextTool = typeTextTool;
52
+ //# sourceMappingURL=typeText.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typeText.js","sourceRoot":"","sources":["../../../../../src/server/host/tools/input/typeText.ts"],"names":[],"mappings":";;;AAAA,iEAA6D;AAC7D,mDAAmG;AACnG,qDAAqD;AAIrD,uCAA4C;AAC5C,2CAA+C;AAExC,MAAM,YAAY,GAAG,CAAC,MAAqB,EAAmB,EAAE;IACrE,OAAO;QACL,WAAW,EACT,oVAAoV;QACtV,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;YAC3B,MAAM,QAAQ,GAAG,MAAM,IAAA,8BAAa,EAAC,GAAG,EAAE,IAAA,6BAAmB,EAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC;YAC7E,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;gBACjB,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAC;YACnC,CAAC;YACD,MAAM,IAAI,GAAG,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;YACnE,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;gBACvB,OAAO,EAAE,KAAK,EAAE,yCAAyC,EAAE,CAAC;YAC9D,CAAC;YACD,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC;YACpC,MAAM,MAAM,GACV,QAAQ,CAAC,MAAM,CAAC,QAAQ,KAAK,KAAK;gBAChC,CAAC,CAAC,MAAM,IAAA,sBAAW,EAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC;gBACnE,CAAC,CAAC,MAAM,IAAA,yBAAe,EAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;YAC5E,IAAI,OAAO,IAAI,MAAM,EAAE,CAAC;gBACtB,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC;YACjC,CAAC;YACD,OAAO;gBACL,MAAM,EAAE,QAAQ,CAAC,MAAM;gBACvB,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,SAAS,EAAE,MAAM;gBACjB,KAAK,EAAE,IAAI;aACZ,CAAC;QACJ,CAAC;QACD,WAAW,EAAE;YACX,QAAQ,EAAE,6BAAmB;YAC7B,MAAM,EAAE;gBACN,OAAO,EAAE,KAAK;gBACd,WAAW,EAAE,qDAAqD;gBAClE,IAAI,EAAE,SAAS;aAChB;YACD,IAAI,EAAE;gBACJ,WAAW,EACT,qHAAqH;gBACvH,IAAI,EAAE,QAAQ;aACf;YACD,GAAG,0BAAgB;SACpB;QACD,OAAO,EAAE,4BAAgB;KAC1B,CAAC;AACJ,CAAC,CAAC;AA5CW,QAAA,YAAY,gBA4CvB"}
@@ -0,0 +1,4 @@
1
+ import { type ProcessRunner } from '../../../../server/host/processRunner';
2
+ import { type HostToolHandler } from '../../../../server/host/types';
3
+ export declare const typeTextBatchTool: (runner: ProcessRunner) => HostToolHandler;
4
+ //# sourceMappingURL=typeTextBatch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typeTextBatch.d.ts","sourceRoot":"","sources":["../../../../../src/server/host/tools/input/typeTextBatch.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAgB3D,eAAO,MAAM,iBAAiB,WAAY,aAAa,KAAG,eAyGzD,CAAC"}