termcast 1.3.9 → 1.3.16

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 (559) hide show
  1. package/dist/action-utils.js +1 -1
  2. package/dist/action-utils.js.map +1 -1
  3. package/dist/apis/ai.js +1 -1
  4. package/dist/apis/ai.js.map +1 -1
  5. package/dist/apis/clipboard.js +2 -2
  6. package/dist/apis/clipboard.js.map +1 -1
  7. package/dist/apis/hud.d.ts +2 -2
  8. package/dist/apis/hud.d.ts.map +1 -1
  9. package/dist/apis/hud.js +5 -5
  10. package/dist/apis/hud.js.map +1 -1
  11. package/dist/apis/oauth.d.ts +1 -1
  12. package/dist/apis/oauth.d.ts.map +1 -1
  13. package/dist/apis/oauth.js +8 -8
  14. package/dist/apis/oauth.js.map +1 -1
  15. package/dist/apis/preferences.js +4 -4
  16. package/dist/apis/preferences.js.map +1 -1
  17. package/dist/apis/toast.d.ts +1 -5
  18. package/dist/apis/toast.d.ts.map +1 -1
  19. package/dist/apis/toast.js +26 -20
  20. package/dist/apis/toast.js.map +1 -1
  21. package/dist/build.d.ts +2 -0
  22. package/dist/build.d.ts.map +1 -1
  23. package/dist/build.js +9 -8
  24. package/dist/build.js.map +1 -1
  25. package/dist/cli.js +44 -2
  26. package/dist/cli.js.map +1 -1
  27. package/dist/colors.d.ts +8 -1
  28. package/dist/colors.d.ts.map +1 -1
  29. package/dist/colors.js +12 -0
  30. package/dist/colors.js.map +1 -1
  31. package/dist/compile.d.ts +30 -0
  32. package/dist/compile.d.ts.map +1 -0
  33. package/dist/compile.js +156 -0
  34. package/dist/compile.js.map +1 -0
  35. package/dist/components/actions.d.ts +2 -1
  36. package/dist/components/actions.d.ts.map +1 -1
  37. package/dist/components/actions.js +11 -8
  38. package/dist/components/actions.js.map +1 -1
  39. package/dist/components/alert.js +4 -4
  40. package/dist/components/alert.js.map +1 -1
  41. package/dist/components/command-arguments.d.ts +9 -0
  42. package/dist/components/command-arguments.d.ts.map +1 -0
  43. package/dist/components/command-arguments.js +21 -0
  44. package/dist/components/command-arguments.js.map +1 -0
  45. package/dist/components/detail.d.ts +3 -3
  46. package/dist/components/detail.d.ts.map +1 -1
  47. package/dist/components/detail.js +20 -42
  48. package/dist/components/detail.js.map +1 -1
  49. package/dist/components/dropdown.d.ts +2 -1
  50. package/dist/components/dropdown.d.ts.map +1 -1
  51. package/dist/components/dropdown.js +81 -25
  52. package/dist/components/dropdown.js.map +1 -1
  53. package/dist/components/extension-preferences.d.ts.map +1 -1
  54. package/dist/components/extension-preferences.js +23 -33
  55. package/dist/components/extension-preferences.js.map +1 -1
  56. package/dist/components/form/checkbox.d.ts.map +1 -1
  57. package/dist/components/form/checkbox.js +11 -4
  58. package/dist/components/form/checkbox.js.map +1 -1
  59. package/dist/components/form/date-picker.d.ts.map +1 -1
  60. package/dist/components/form/date-picker.js +18 -31
  61. package/dist/components/form/date-picker.js.map +1 -1
  62. package/dist/components/form/description.d.ts +2 -0
  63. package/dist/components/form/description.d.ts.map +1 -1
  64. package/dist/components/form/description.js +21 -3
  65. package/dist/components/form/description.js.map +1 -1
  66. package/dist/components/form/dropdown.d.ts.map +1 -1
  67. package/dist/components/form/dropdown.js +17 -32
  68. package/dist/components/form/dropdown.js.map +1 -1
  69. package/dist/components/form/file-autocomplete.d.ts +7 -4
  70. package/dist/components/form/file-autocomplete.d.ts.map +1 -1
  71. package/dist/components/form/file-autocomplete.js +56 -48
  72. package/dist/components/form/file-autocomplete.js.map +1 -1
  73. package/dist/components/form/file-picker.d.ts +5 -0
  74. package/dist/components/form/file-picker.d.ts.map +1 -1
  75. package/dist/components/form/file-picker.js +48 -51
  76. package/dist/components/form/file-picker.js.map +1 -1
  77. package/dist/components/form/form-end.js +1 -1
  78. package/dist/components/form/form-end.js.map +1 -1
  79. package/dist/components/form/form-ref.d.ts +43 -0
  80. package/dist/components/form/form-ref.d.ts.map +1 -0
  81. package/dist/components/form/form-ref.js +53 -0
  82. package/dist/components/form/form-ref.js.map +1 -0
  83. package/dist/components/form/index.d.ts +16 -0
  84. package/dist/components/form/index.d.ts.map +1 -1
  85. package/dist/components/form/index.js +90 -27
  86. package/dist/components/form/index.js.map +1 -1
  87. package/dist/components/form/password-field.d.ts.map +1 -1
  88. package/dist/components/form/password-field.js +33 -17
  89. package/dist/components/form/password-field.js.map +1 -1
  90. package/dist/components/form/separator.js +1 -1
  91. package/dist/components/form/separator.js.map +1 -1
  92. package/dist/components/form/tagpicker.d.ts +1 -1
  93. package/dist/components/form/tagpicker.d.ts.map +1 -1
  94. package/dist/components/form/text-area.d.ts.map +1 -1
  95. package/dist/components/form/text-area.js +33 -16
  96. package/dist/components/form/text-area.js.map +1 -1
  97. package/dist/components/form/text-field.d.ts.map +1 -1
  98. package/dist/components/form/text-field.js +38 -18
  99. package/dist/components/form/text-field.js.map +1 -1
  100. package/dist/components/form/use-form-navigation.d.ts +4 -0
  101. package/dist/components/form/use-form-navigation.d.ts.map +1 -1
  102. package/dist/components/form/use-form-navigation.js +35 -18
  103. package/dist/components/form/use-form-navigation.js.map +1 -1
  104. package/dist/components/form/with-left-border.d.ts.map +1 -1
  105. package/dist/components/form/with-left-border.js +3 -3
  106. package/dist/components/form/with-left-border.js.map +1 -1
  107. package/dist/components/icon.d.ts +3 -1
  108. package/dist/components/icon.d.ts.map +1 -1
  109. package/dist/components/icon.js +494 -469
  110. package/dist/components/icon.js.map +1 -1
  111. package/dist/components/image.js +1 -1
  112. package/dist/components/image.js.map +1 -1
  113. package/dist/components/list.d.ts +12 -8
  114. package/dist/components/list.d.ts.map +1 -1
  115. package/dist/components/list.js +172 -40
  116. package/dist/components/list.js.map +1 -1
  117. package/dist/components/loading-bar.js +2 -2
  118. package/dist/components/loading-bar.js.map +1 -1
  119. package/dist/components/menubar-extra.d.ts +1 -1
  120. package/dist/components/menubar-extra.d.ts.map +1 -1
  121. package/dist/components/menubar-extra.js +2 -2
  122. package/dist/components/menubar-extra.js.map +1 -1
  123. package/dist/descendants.d.ts.map +1 -1
  124. package/dist/descendants.js +8 -5
  125. package/dist/descendants.js.map +1 -1
  126. package/dist/e2e-node.d.ts +2 -0
  127. package/dist/e2e-node.d.ts.map +1 -1
  128. package/dist/e2e-node.js +14 -0
  129. package/dist/e2e-node.js.map +1 -1
  130. package/dist/examples/action-show-in-finder.js +3 -3
  131. package/dist/examples/action-show-in-finder.js.map +1 -1
  132. package/dist/examples/environment-test.js +4 -4
  133. package/dist/examples/environment-test.js.map +1 -1
  134. package/dist/examples/error-boundary.js +5 -5
  135. package/dist/examples/error-boundary.js.map +1 -1
  136. package/dist/examples/form-basic.d.ts.map +1 -1
  137. package/dist/examples/form-basic.js +6 -6
  138. package/dist/examples/form-basic.js.map +1 -1
  139. package/dist/examples/form-dropdown.js +3 -3
  140. package/dist/examples/form-dropdown.js.map +1 -1
  141. package/dist/examples/form-scroll.d.ts +2 -0
  142. package/dist/examples/form-scroll.d.ts.map +1 -0
  143. package/dist/examples/form-scroll.js +8 -0
  144. package/dist/examples/form-scroll.js.map +1 -0
  145. package/dist/examples/form-tagpicker.js +3 -3
  146. package/dist/examples/form-tagpicker.js.map +1 -1
  147. package/dist/examples/internal/descendants-filtering.js +10 -5
  148. package/dist/examples/internal/descendants-filtering.js.map +1 -1
  149. package/dist/examples/internal/descendants.js +13 -6
  150. package/dist/examples/internal/descendants.js.map +1 -1
  151. package/dist/examples/internal/rhf-custom-ref.d.ts +2 -0
  152. package/dist/examples/internal/rhf-custom-ref.d.ts.map +1 -0
  153. package/dist/examples/internal/rhf-custom-ref.js +67 -0
  154. package/dist/examples/internal/rhf-custom-ref.js.map +1 -0
  155. package/dist/examples/internal/scrollbox-demo.js +4 -8
  156. package/dist/examples/internal/scrollbox-demo.js.map +1 -1
  157. package/dist/examples/internal/scrollbox-with-descendants.d.ts +2 -0
  158. package/dist/examples/internal/scrollbox-with-descendants.d.ts.map +1 -0
  159. package/dist/examples/internal/scrollbox-with-descendants.js +63 -0
  160. package/dist/examples/internal/scrollbox-with-descendants.js.map +1 -0
  161. package/dist/examples/internal/simple-dialog.js +7 -7
  162. package/dist/examples/internal/simple-dialog.js.map +1 -1
  163. package/dist/examples/internal/simple-scrollbox.d.ts +2 -0
  164. package/dist/examples/internal/simple-scrollbox.d.ts.map +1 -0
  165. package/dist/examples/internal/simple-scrollbox.js +25 -0
  166. package/dist/examples/internal/simple-scrollbox.js.map +1 -0
  167. package/dist/examples/internal/text-stacking.js +4 -2
  168. package/dist/examples/internal/text-stacking.js.map +1 -1
  169. package/dist/examples/list-dropdown-default.js +3 -3
  170. package/dist/examples/list-dropdown-default.js.map +1 -1
  171. package/dist/examples/list-fetch-data.js +3 -3
  172. package/dist/examples/list-fetch-data.js.map +1 -1
  173. package/dist/examples/list-scrollbox.d.ts +2 -0
  174. package/dist/examples/list-scrollbox.d.ts.map +1 -0
  175. package/dist/examples/list-scrollbox.js +29 -0
  176. package/dist/examples/list-scrollbox.js.map +1 -0
  177. package/dist/examples/list-with-detail.js +2 -2
  178. package/dist/examples/list-with-detail.js.map +1 -1
  179. package/dist/examples/list-with-dropdown.js +2 -2
  180. package/dist/examples/list-with-dropdown.js.map +1 -1
  181. package/dist/examples/list-with-sections.js +6 -6
  182. package/dist/examples/list-with-sections.js.map +1 -1
  183. package/dist/examples/miscellaneous.js +14 -14
  184. package/dist/examples/miscellaneous.js.map +1 -1
  185. package/dist/examples/nested-navigation.js +9 -7
  186. package/dist/examples/nested-navigation.js.map +1 -1
  187. package/dist/examples/preferences-test.js +4 -4
  188. package/dist/examples/preferences-test.js.map +1 -1
  189. package/dist/examples/simple-dropdown.js +4 -4
  190. package/dist/examples/simple-dropdown.js.map +1 -1
  191. package/dist/examples/simple-file-picker.js +3 -3
  192. package/dist/examples/simple-file-picker.js.map +1 -1
  193. package/dist/examples/simple-grid.js +2 -2
  194. package/dist/examples/simple-grid.js.map +1 -1
  195. package/dist/examples/simple-hud.js +4 -4
  196. package/dist/examples/simple-hud.js.map +1 -1
  197. package/dist/examples/simple-list-search.js +21 -5
  198. package/dist/examples/simple-list-search.js.map +1 -1
  199. package/dist/examples/simple-list.js +4 -4
  200. package/dist/examples/simple-list.js.map +1 -1
  201. package/dist/examples/simple-navigation.js +9 -7
  202. package/dist/examples/simple-navigation.js.map +1 -1
  203. package/dist/examples/store.js +1 -1
  204. package/dist/examples/store.js.map +1 -1
  205. package/dist/examples/submodule-diff.d.ts +2 -0
  206. package/dist/examples/submodule-diff.d.ts.map +1 -0
  207. package/dist/examples/submodule-diff.js +99 -0
  208. package/dist/examples/submodule-diff.js.map +1 -0
  209. package/dist/examples/tanstack-demo.js +3 -3
  210. package/dist/examples/tanstack-demo.js.map +1 -1
  211. package/dist/examples/use-promise-demo.js +3 -3
  212. package/dist/examples/use-promise-demo.js.map +1 -1
  213. package/dist/extensions/dev.d.ts +8 -0
  214. package/dist/extensions/dev.d.ts.map +1 -1
  215. package/dist/extensions/dev.js +60 -35
  216. package/dist/extensions/dev.js.map +1 -1
  217. package/dist/extensions/home.d.ts.map +1 -1
  218. package/dist/extensions/home.js +22 -97
  219. package/dist/extensions/home.js.map +1 -1
  220. package/dist/extensions/store.js +2 -2
  221. package/dist/extensions/store.js.map +1 -1
  222. package/dist/globals.js +1 -1
  223. package/dist/globals.js.map +1 -1
  224. package/dist/hooks/index.d.ts +1 -1
  225. package/dist/hooks/index.d.ts.map +1 -1
  226. package/dist/hooks/index.js +1 -1
  227. package/dist/hooks/index.js.map +1 -1
  228. package/dist/hooks/use-action-panel.js +1 -1
  229. package/dist/hooks/use-action-panel.js.map +1 -1
  230. package/dist/hooks/use-unstable-ai.js +1 -1
  231. package/dist/hooks/use-unstable-ai.js.map +1 -1
  232. package/dist/index.d.ts +57 -55
  233. package/dist/index.d.ts.map +1 -1
  234. package/dist/index.js +42 -38
  235. package/dist/index.js.map +1 -1
  236. package/dist/internal/date-picker-widget.d.ts.map +1 -1
  237. package/dist/internal/date-picker-widget.js +56 -48
  238. package/dist/internal/date-picker-widget.js.map +1 -1
  239. package/dist/internal/dialog.d.ts +3 -3
  240. package/dist/internal/dialog.d.ts.map +1 -1
  241. package/dist/internal/dialog.js +10 -10
  242. package/dist/internal/dialog.js.map +1 -1
  243. package/dist/internal/error-handler.js +2 -2
  244. package/dist/internal/error-handler.js.map +1 -1
  245. package/dist/internal/focus-context.d.ts +1 -1
  246. package/dist/internal/focus-context.d.ts.map +1 -1
  247. package/dist/internal/navigation.d.ts +1 -1
  248. package/dist/internal/navigation.d.ts.map +1 -1
  249. package/dist/internal/navigation.js +2 -2
  250. package/dist/internal/navigation.js.map +1 -1
  251. package/dist/internal/providers.d.ts +2 -2
  252. package/dist/internal/providers.d.ts.map +1 -1
  253. package/dist/internal/providers.js +9 -9
  254. package/dist/internal/providers.js.map +1 -1
  255. package/dist/internal/scrollbox.d.ts +12 -0
  256. package/dist/internal/scrollbox.d.ts.map +1 -0
  257. package/dist/internal/scrollbox.js +34 -0
  258. package/dist/internal/scrollbox.js.map +1 -0
  259. package/dist/preload.js +1 -1
  260. package/dist/preload.js.map +1 -1
  261. package/dist/release.d.ts +11 -0
  262. package/dist/release.d.ts.map +1 -0
  263. package/dist/release.js +113 -0
  264. package/dist/release.js.map +1 -0
  265. package/dist/state.d.ts +1 -0
  266. package/dist/state.d.ts.map +1 -1
  267. package/dist/state.js +1 -0
  268. package/dist/state.js.map +1 -1
  269. package/dist/theme.d.ts +11 -8
  270. package/dist/theme.d.ts.map +1 -1
  271. package/dist/theme.js +31 -8
  272. package/dist/theme.js.map +1 -1
  273. package/dist/utils/run-command.d.ts +22 -0
  274. package/dist/utils/run-command.d.ts.map +1 -0
  275. package/dist/utils/run-command.js +127 -0
  276. package/dist/utils/run-command.js.map +1 -0
  277. package/dist/utils.d.ts +1 -1
  278. package/dist/utils.d.ts.map +1 -1
  279. package/dist/utils.js +6 -4
  280. package/dist/utils.js.map +1 -1
  281. package/package.json +13 -8
  282. package/src/apis/toast.tsx +38 -17
  283. package/src/build.tsx +5 -3
  284. package/src/cli.tsx +46 -0
  285. package/src/colors.tsx +22 -1
  286. package/src/compile.tsx +219 -0
  287. package/src/components/actions.tsx +7 -1
  288. package/src/components/command-arguments.tsx +81 -0
  289. package/src/components/detail.tsx +26 -58
  290. package/src/components/dropdown.tsx +108 -23
  291. package/src/components/extension-preferences.tsx +55 -35
  292. package/src/components/form/checkbox.tsx +13 -5
  293. package/src/components/form/date-picker.tsx +24 -29
  294. package/src/components/form/description.tsx +35 -7
  295. package/src/components/form/dropdown.tsx +16 -30
  296. package/src/components/form/file-autocomplete.tsx +87 -77
  297. package/src/components/form/file-picker.tsx +69 -57
  298. package/src/components/form/form-ref.tsx +68 -0
  299. package/src/components/form/index.tsx +152 -41
  300. package/src/components/form/password-field.tsx +35 -22
  301. package/src/components/form/text-area.tsx +78 -58
  302. package/src/components/form/text-field.tsx +82 -61
  303. package/src/components/form/use-form-navigation.tsx +43 -23
  304. package/src/components/form/with-left-border.tsx +2 -1
  305. package/src/components/icon.tsx +497 -469
  306. package/src/components/list.tsx +279 -112
  307. package/src/components/loading-bar.tsx +1 -1
  308. package/src/descendants.tsx +15 -5
  309. package/src/e2e-node.tsx +16 -0
  310. package/src/examples/action-show-in-finder.tsx +1 -1
  311. package/src/examples/environment-test.tsx +1 -1
  312. package/src/examples/error-boundary.tsx +1 -1
  313. package/src/examples/file-autocomplete.vitest.tsx +245 -0
  314. package/src/examples/form-basic.tsx +12 -12
  315. package/src/examples/form-basic.vitest.tsx +297 -671
  316. package/src/examples/form-dropdown.tsx +1 -1
  317. package/src/examples/form-dropdown.vitest.tsx +353 -221
  318. package/src/examples/form-scroll.tsx +56 -0
  319. package/src/examples/form-scroll.vitest.tsx +228 -0
  320. package/src/examples/form-tagpicker.tsx +1 -1
  321. package/src/examples/form-tagpicker.vitest.tsx +438 -193
  322. package/src/examples/internal/descendants-filtering.tsx +13 -5
  323. package/src/examples/internal/descendants.tsx +17 -5
  324. package/src/examples/internal/rhf-custom-ref.tsx +152 -0
  325. package/src/examples/internal/scrollbox-demo.tsx +15 -7
  326. package/src/examples/internal/scrollbox-with-descendants.tsx +94 -0
  327. package/src/examples/internal/simple-dialog.tsx +1 -1
  328. package/src/examples/internal/simple-scrollbox.tsx +58 -0
  329. package/src/examples/internal/simple-scrollbox.vitest.tsx +104 -0
  330. package/src/examples/internal/text-stacking.tsx +4 -2
  331. package/src/examples/list-dropdown-default.tsx +1 -1
  332. package/src/examples/list-dropdown-default.vitest.tsx +136 -71
  333. package/src/examples/list-fetch-data.tsx +1 -1
  334. package/src/examples/list-fetch-data.vitest.tsx +42 -33
  335. package/src/examples/list-scrollbox.tsx +46 -0
  336. package/src/examples/list-scrollbox.vitest.tsx +103 -0
  337. package/src/examples/list-with-detail.tsx +1 -1
  338. package/src/examples/list-with-detail.vitest.tsx +290 -294
  339. package/src/examples/list-with-dropdown.tsx +1 -1
  340. package/src/examples/list-with-dropdown.vitest.tsx +190 -150
  341. package/src/examples/list-with-sections.tsx +12 -1
  342. package/src/examples/list-with-sections.vitest.tsx +390 -218
  343. package/src/examples/miscellaneous.tsx +1 -1
  344. package/src/examples/nested-navigation.tsx +7 -5
  345. package/src/examples/preferences-test.tsx +1 -1
  346. package/src/examples/simple-dropdown.tsx +1 -1
  347. package/src/examples/simple-file-picker.tsx +1 -1
  348. package/src/examples/simple-file-picker.vitest.tsx +533 -127
  349. package/src/examples/simple-grid.tsx +1 -1
  350. package/src/examples/simple-grid.vitest.tsx +258 -234
  351. package/src/examples/simple-hud.tsx +1 -1
  352. package/src/examples/simple-list-search.tsx +42 -1
  353. package/src/examples/simple-list.tsx +1 -1
  354. package/src/examples/simple-navigation.tsx +7 -5
  355. package/src/examples/simple-navigation.vitest.tsx +434 -238
  356. package/src/examples/store.tsx +1 -1
  357. package/src/examples/store.vitest.tsx +31 -14
  358. package/src/examples/submodule-diff.tsx +153 -0
  359. package/src/examples/tanstack-demo.tsx +1 -1
  360. package/src/examples/use-promise-demo.tsx +1 -1
  361. package/src/extensions/dev.tsx +76 -38
  362. package/src/extensions/dev.vitest.tsx +220 -0
  363. package/src/extensions/home.tsx +20 -121
  364. package/src/globals.ts +1 -1
  365. package/src/index.tsx +12 -25
  366. package/src/internal/date-picker-widget.tsx +56 -46
  367. package/src/internal/dialog.tsx +6 -6
  368. package/src/internal/providers.tsx +1 -1
  369. package/src/internal/scrollbox.tsx +63 -0
  370. package/src/release.tsx +159 -0
  371. package/src/state.tsx +2 -0
  372. package/src/store-api/search.test.tsx +4 -13
  373. package/src/theme.tsx +33 -8
  374. package/src/utils/run-command.tsx +204 -0
  375. package/src/utils.tsx +6 -4
  376. package/dist/ai.d.ts +0 -104
  377. package/dist/ai.d.ts.map +0 -1
  378. package/dist/ai.js +0 -135
  379. package/dist/ai.js.map +0 -1
  380. package/dist/apis/cache.test.d.ts +0 -2
  381. package/dist/apis/cache.test.d.ts.map +0 -1
  382. package/dist/apis/cache.test.js +0 -246
  383. package/dist/apis/cache.test.js.map +0 -1
  384. package/dist/apis/localstorage.test.d.ts +0 -2
  385. package/dist/apis/localstorage.test.d.ts.map +0 -1
  386. package/dist/apis/localstorage.test.js +0 -131
  387. package/dist/apis/localstorage.test.js.map +0 -1
  388. package/dist/apis/toast.test.d.ts +0 -2
  389. package/dist/apis/toast.test.d.ts.map +0 -1
  390. package/dist/apis/toast.test.js +0 -67
  391. package/dist/apis/toast.test.js.map +0 -1
  392. package/dist/build.test.d.ts +0 -2
  393. package/dist/build.test.d.ts.map +0 -1
  394. package/dist/build.test.js +0 -73
  395. package/dist/build.test.js.map +0 -1
  396. package/dist/cache.d.ts +0 -32
  397. package/dist/cache.d.ts.map +0 -1
  398. package/dist/cache.js +0 -205
  399. package/dist/cache.js.map +0 -1
  400. package/dist/cache.test.d.ts +0 -2
  401. package/dist/cache.test.d.ts.map +0 -1
  402. package/dist/cache.test.js +0 -246
  403. package/dist/cache.test.js.map +0 -1
  404. package/dist/clipboard.d.ts +0 -36
  405. package/dist/clipboard.d.ts.map +0 -1
  406. package/dist/clipboard.js +0 -154
  407. package/dist/clipboard.js.map +0 -1
  408. package/dist/components/form/form-type-only.d.ts +0 -174
  409. package/dist/components/form/form-type-only.d.ts.map +0 -1
  410. package/dist/components/form/form-type-only.js +0 -2
  411. package/dist/components/form/form-type-only.js.map +0 -1
  412. package/dist/components/form/use-form-handling.d.ts +0 -4
  413. package/dist/components/form/use-form-handling.d.ts.map +0 -1
  414. package/dist/components/form/use-form-handling.js +0 -37
  415. package/dist/components/form/use-form-handling.js.map +0 -1
  416. package/dist/dev-ui.d.ts +0 -7
  417. package/dist/dev-ui.d.ts.map +0 -1
  418. package/dist/dev-ui.js +0 -118
  419. package/dist/dev-ui.js.map +0 -1
  420. package/dist/environment.d.ts +0 -63
  421. package/dist/environment.d.ts.map +0 -1
  422. package/dist/environment.js +0 -189
  423. package/dist/environment.js.map +0 -1
  424. package/dist/examples/datepicker.d.ts +0 -2
  425. package/dist/examples/datepicker.d.ts.map +0 -1
  426. package/dist/examples/datepicker.js +0 -344
  427. package/dist/examples/datepicker.js.map +0 -1
  428. package/dist/examples/form-basic-arrow-keys.vitest.d.ts +0 -2
  429. package/dist/examples/form-basic-arrow-keys.vitest.d.ts.map +0 -1
  430. package/dist/examples/form-basic-arrow-keys.vitest.js +0 -46
  431. package/dist/examples/form-basic-arrow-keys.vitest.js.map +0 -1
  432. package/dist/examples/form-basic.vitest.d.ts +0 -2
  433. package/dist/examples/form-basic.vitest.d.ts.map +0 -1
  434. package/dist/examples/form-basic.vitest.js +0 -995
  435. package/dist/examples/form-basic.vitest.js.map +0 -1
  436. package/dist/examples/form-dropdown-with-sections.d.ts +0 -2
  437. package/dist/examples/form-dropdown-with-sections.d.ts.map +0 -1
  438. package/dist/examples/form-dropdown-with-sections.js +0 -13
  439. package/dist/examples/form-dropdown-with-sections.js.map +0 -1
  440. package/dist/examples/form-dropdown-with-sections.vitest.d.ts +0 -2
  441. package/dist/examples/form-dropdown-with-sections.vitest.d.ts.map +0 -1
  442. package/dist/examples/form-dropdown-with-sections.vitest.js +0 -75
  443. package/dist/examples/form-dropdown-with-sections.vitest.js.map +0 -1
  444. package/dist/examples/form-dropdown.vitest.d.ts +0 -2
  445. package/dist/examples/form-dropdown.vitest.d.ts.map +0 -1
  446. package/dist/examples/form-dropdown.vitest.js +0 -722
  447. package/dist/examples/form-dropdown.vitest.js.map +0 -1
  448. package/dist/examples/form-multiselect-dropdown.d.ts +0 -2
  449. package/dist/examples/form-multiselect-dropdown.d.ts.map +0 -1
  450. package/dist/examples/form-multiselect-dropdown.js +0 -13
  451. package/dist/examples/form-multiselect-dropdown.js.map +0 -1
  452. package/dist/examples/form-tagpicker.vitest.d.ts +0 -2
  453. package/dist/examples/form-tagpicker.vitest.d.ts.map +0 -1
  454. package/dist/examples/form-tagpicker.vitest.js +0 -491
  455. package/dist/examples/form-tagpicker.vitest.js.map +0 -1
  456. package/dist/examples/internal/nested-boxes.d.ts +0 -2
  457. package/dist/examples/internal/nested-boxes.d.ts.map +0 -1
  458. package/dist/examples/internal/nested-boxes.js +0 -7
  459. package/dist/examples/internal/nested-boxes.js.map +0 -1
  460. package/dist/examples/internal/unicode-square-repro.d.ts +0 -2
  461. package/dist/examples/internal/unicode-square-repro.d.ts.map +0 -1
  462. package/dist/examples/internal/unicode-square-repro.js +0 -7
  463. package/dist/examples/internal/unicode-square-repro.js.map +0 -1
  464. package/dist/examples/list-dropdown-default.vitest.d.ts +0 -2
  465. package/dist/examples/list-dropdown-default.vitest.d.ts.map +0 -1
  466. package/dist/examples/list-dropdown-default.vitest.js +0 -164
  467. package/dist/examples/list-dropdown-default.vitest.js.map +0 -1
  468. package/dist/examples/list-fetch-data.vitest.d.ts +0 -2
  469. package/dist/examples/list-fetch-data.vitest.d.ts.map +0 -1
  470. package/dist/examples/list-fetch-data.vitest.js +0 -103
  471. package/dist/examples/list-fetch-data.vitest.js.map +0 -1
  472. package/dist/examples/list-filter-navigation.d.ts +0 -2
  473. package/dist/examples/list-filter-navigation.d.ts.map +0 -1
  474. package/dist/examples/list-filter-navigation.js +0 -8
  475. package/dist/examples/list-filter-navigation.js.map +0 -1
  476. package/dist/examples/list-with-detail.vitest.d.ts +0 -2
  477. package/dist/examples/list-with-detail.vitest.d.ts.map +0 -1
  478. package/dist/examples/list-with-detail.vitest.js +0 -438
  479. package/dist/examples/list-with-detail.vitest.js.map +0 -1
  480. package/dist/examples/list-with-dropdown.vitest.d.ts +0 -2
  481. package/dist/examples/list-with-dropdown.vitest.d.ts.map +0 -1
  482. package/dist/examples/list-with-dropdown.vitest.js +0 -297
  483. package/dist/examples/list-with-dropdown.vitest.js.map +0 -1
  484. package/dist/examples/list-with-sections.vitest.d.ts +0 -2
  485. package/dist/examples/list-with-sections.vitest.d.ts.map +0 -1
  486. package/dist/examples/list-with-sections.vitest.js +0 -441
  487. package/dist/examples/list-with-sections.vitest.js.map +0 -1
  488. package/dist/examples/simple-file-picker.vitest.d.ts +0 -2
  489. package/dist/examples/simple-file-picker.vitest.d.ts.map +0 -1
  490. package/dist/examples/simple-file-picker.vitest.js +0 -277
  491. package/dist/examples/simple-file-picker.vitest.js.map +0 -1
  492. package/dist/examples/simple-grid.vitest.d.ts +0 -2
  493. package/dist/examples/simple-grid.vitest.d.ts.map +0 -1
  494. package/dist/examples/simple-grid.vitest.js +0 -498
  495. package/dist/examples/simple-grid.vitest.js.map +0 -1
  496. package/dist/examples/simple-navigation.vitest.d.ts +0 -2
  497. package/dist/examples/simple-navigation.vitest.d.ts.map +0 -1
  498. package/dist/examples/simple-navigation.vitest.js +0 -522
  499. package/dist/examples/simple-navigation.vitest.js.map +0 -1
  500. package/dist/examples/store.vitest.d.ts +0 -2
  501. package/dist/examples/store.vitest.d.ts.map +0 -1
  502. package/dist/examples/store.vitest.js +0 -52
  503. package/dist/examples/store.vitest.js.map +0 -1
  504. package/dist/home-command.d.ts +0 -8
  505. package/dist/home-command.d.ts.map +0 -1
  506. package/dist/home-command.js +0 -181
  507. package/dist/home-command.js.map +0 -1
  508. package/dist/hooks/hooks.test.d.ts +0 -2
  509. package/dist/hooks/hooks.test.d.ts.map +0 -1
  510. package/dist/hooks/hooks.test.js +0 -37
  511. package/dist/hooks/hooks.test.js.map +0 -1
  512. package/dist/hover-repro.d.ts +0 -2
  513. package/dist/hover-repro.d.ts.map +0 -1
  514. package/dist/hover-repro.js +0 -20
  515. package/dist/hover-repro.js.map +0 -1
  516. package/dist/localstorage.d.ts +0 -13
  517. package/dist/localstorage.d.ts.map +0 -1
  518. package/dist/localstorage.js +0 -190
  519. package/dist/localstorage.js.map +0 -1
  520. package/dist/localstorage.test.d.ts +0 -2
  521. package/dist/localstorage.test.d.ts.map +0 -1
  522. package/dist/localstorage.test.js +0 -131
  523. package/dist/localstorage.test.js.map +0 -1
  524. package/dist/oauth.d.ts +0 -142
  525. package/dist/oauth.d.ts.map +0 -1
  526. package/dist/oauth.js +0 -551
  527. package/dist/oauth.js.map +0 -1
  528. package/dist/preferences.d.ts +0 -23
  529. package/dist/preferences.d.ts.map +0 -1
  530. package/dist/preferences.js +0 -105
  531. package/dist/preferences.js.map +0 -1
  532. package/dist/store-api/download.test.d.ts +0 -2
  533. package/dist/store-api/download.test.d.ts.map +0 -1
  534. package/dist/store-api/download.test.js +0 -36
  535. package/dist/store-api/download.test.js.map +0 -1
  536. package/dist/store-api/extension.test.d.ts +0 -2
  537. package/dist/store-api/extension.test.d.ts.map +0 -1
  538. package/dist/store-api/extension.test.js +0 -22
  539. package/dist/store-api/extension.test.js.map +0 -1
  540. package/dist/store-api/search.test.d.ts +0 -2
  541. package/dist/store-api/search.test.d.ts.map +0 -1
  542. package/dist/store-api/search.test.js +0 -45
  543. package/dist/store-api/search.test.js.map +0 -1
  544. package/dist/store.d.ts +0 -21
  545. package/dist/store.d.ts.map +0 -1
  546. package/dist/store.js +0 -84
  547. package/dist/store.js.map +0 -1
  548. package/dist/toast.d.ts +0 -44
  549. package/dist/toast.d.ts.map +0 -1
  550. package/dist/toast.js +0 -221
  551. package/dist/toast.js.map +0 -1
  552. package/dist/utils.test.d.ts +0 -2
  553. package/dist/utils.test.d.ts.map +0 -1
  554. package/dist/utils.test.js +0 -152
  555. package/dist/utils.test.js.map +0 -1
  556. package/dist/window.d.ts +0 -12
  557. package/dist/window.d.ts.map +0 -1
  558. package/dist/window.js +0 -48
  559. package/dist/window.js.map +0 -1
@@ -1,22 +1,23 @@
1
- // node-pty does not work in bun, so we use vitest to run this test
2
1
  import { test, expect, afterEach, beforeEach } from 'vitest'
3
- import { NodeTuiDriver } from 'termcast/src/e2e-node'
2
+ import { launchTerminal, Session } from 'tuistory/src'
4
3
 
5
- let driver: NodeTuiDriver
4
+ let session: Session
6
5
 
7
- beforeEach(() => {
8
- driver = new NodeTuiDriver('bun', ['src/examples/simple-grid.tsx'], {
6
+ beforeEach(async () => {
7
+ session = await launchTerminal({
8
+ command: 'bun',
9
+ args: ['src/examples/simple-grid.tsx'],
9
10
  cols: 70,
10
- rows: 50,
11
+ rows: 25,
11
12
  })
12
13
  })
13
14
 
14
15
  afterEach(() => {
15
- driver?.dispose()
16
+ session?.close()
16
17
  })
17
18
 
18
19
  test('grid navigation and display', async () => {
19
- const initialSnapshot = await driver.text({
20
+ const initialSnapshot = await session.text({
20
21
  waitFor: (text) => {
21
22
  // wait for grid to show up with all sections and items
22
23
  return (
@@ -32,14 +33,14 @@ test('grid navigation and display', async () => {
32
33
  expect(initialSnapshot).toMatchInlineSnapshot(`
33
34
  "
34
35
 
36
+
35
37
  Simple Grid Example ────────────────────────────────────────────
36
38
 
37
39
  Search items...
38
40
 
39
-
40
- Fruits
41
- ›Apple
42
- Banana
41
+ Fruits ▲
42
+ ›Apple █
43
+ Banana █
43
44
  Cherry
44
45
 
45
46
  Animals
@@ -50,30 +51,27 @@ test('grid navigation and display', async () => {
50
51
  Others
51
52
  House
52
53
  Car
53
- Rocket
54
- Star
55
- Moon
56
- Sun
54
+ Rocket
57
55
 
58
56
 
59
- ↵ select ↑↓ navigate ^k actions"
57
+ ↵ select ↑↓ navigate ^k actions"
60
58
  `)
61
59
 
62
60
  // Navigate down
63
- await driver.keys.down()
61
+ await session.press('down')
64
62
 
65
- const afterDownSnapshot = await driver.text()
63
+ const afterDownSnapshot = await session.text()
66
64
  expect(afterDownSnapshot).toMatchInlineSnapshot(`
67
65
  "
68
66
 
67
+
69
68
  Simple Grid Example ────────────────────────────────────────────
70
69
 
71
70
  Search items...
72
71
 
73
-
74
- Fruits
75
- Apple
76
- ›Banana
72
+ Fruits ▲
73
+ Apple █
74
+ ›Banana █
77
75
  Cherry
78
76
 
79
77
  Animals
@@ -84,31 +82,28 @@ test('grid navigation and display', async () => {
84
82
  Others
85
83
  House
86
84
  Car
87
- Rocket
88
- Star
89
- Moon
90
- Sun
85
+ Rocket
91
86
 
92
87
 
93
- ↵ select ↑↓ navigate ^k actions"
88
+ ↵ select ↑↓ navigate ^k actions"
94
89
  `)
95
90
 
96
91
  // Navigate right to Animals section
97
- await driver.keys.down()
98
- await driver.keys.down()
92
+ await session.press('down')
93
+ await session.press('down')
99
94
 
100
- const animalsSnapshot = await driver.text()
95
+ const animalsSnapshot = await session.text()
101
96
  expect(animalsSnapshot).toMatchInlineSnapshot(`
102
97
  "
103
98
 
99
+
104
100
  Simple Grid Example ────────────────────────────────────────────
105
101
 
106
102
  Search items...
107
103
 
108
-
109
- Fruits
110
- Apple
111
- Banana
104
+ Fruits ▲
105
+ Apple █
106
+ Banana █
112
107
  Cherry
113
108
 
114
109
  Animals
@@ -119,64 +114,60 @@ test('grid navigation and display', async () => {
119
114
  Others
120
115
  House
121
116
  Car
122
- Rocket
123
- Star
124
- Moon
125
- Sun
117
+ Rocket
126
118
 
127
119
 
128
- ↵ select ↑↓ navigate ^k actions"
120
+ ↵ select ↑↓ navigate ^k actions"
129
121
  `)
130
122
 
131
123
  // Open actions with ctrl+k
132
- await driver.keys.ctrlK()
124
+ await session.press(['ctrl', 'k'])
133
125
 
134
- const actionsSnapshot = await driver.text()
126
+ const actionsSnapshot = await session.text()
135
127
  expect(actionsSnapshot).toMatchInlineSnapshot(`
136
128
  "
137
129
 
138
- Simple Grid Example ────────────────────────────────────────────
139
-
140
- Search items...
141
-
142
-
143
- Fruits
144
- Apple
145
- Banana
146
- Cherry
147
-
148
-
149
- esc
150
-
151
- Search actions...
152
- ›Show Details
153
- Copy Emoji ⌃C
154
-
155
-
156
- ↵ select ↑↓ navigate
157
-
158
- Moon
159
- Sun
160
130
 
161
-
162
- ↵ select ↑↓ navigate ^k actions"
131
+ Simple Grid Example ────────────────────────────────────────────
132
+
133
+ Search items...
134
+
135
+ Fruits ▲
136
+ ┃ ┃
137
+ ┃ esc ┃
138
+ ┃ ┃
139
+ ┃ Search actions... ┃
140
+ ┃ ┃
141
+ ┃ ›Show Details ┃
142
+ ┃ Copy Emoji ⌃C ┃
143
+ ┃ ┃
144
+ ┃ ┃
145
+ ┃ ┃
146
+ ┃ ┃
147
+ ┃ ┃
148
+ ┃ ┃
149
+ ┃ ┃
150
+ ┃ ┃
151
+ ┃ ┃
152
+ ┃ ↵ select ↑↓ navigate ┃
153
+ ┃ ┃"
163
154
  `)
164
155
 
165
156
  // Close actions with escape
166
- await driver.keys.escape()
157
+ await session.press('esc')
167
158
 
168
- const afterEscapeSnapshot = await driver.text()
159
+ const afterEscapeSnapshot = await session.text()
169
160
  expect(afterEscapeSnapshot).toMatchInlineSnapshot(`
170
161
  "
171
162
 
163
+
172
164
  Simple Grid Example ────────────────────────────────────────────
173
165
 
174
166
  Search items...
175
167
 
176
-
177
- Fruits
178
- Apple
179
- Banana
168
+ Fruits ▲
169
+ Apple █
170
+ Banana █
180
171
  Cherry
181
172
 
182
173
  Animals
@@ -187,18 +178,15 @@ test('grid navigation and display', async () => {
187
178
  Others
188
179
  House
189
180
  Car
190
- Rocket
191
- Star
192
- Moon
193
- Sun
181
+ Rocket
194
182
 
195
183
 
196
- ↵ select ↑↓ navigate ^k actions"
184
+ ↵ select ↑↓ navigate ^k actions"
197
185
  `)
198
186
  }, 15000)
199
187
 
200
188
  test('grid search functionality', async () => {
201
- await driver.text({
189
+ await session.text({
202
190
  waitFor: (text) => {
203
191
  // wait for grid to show up
204
192
  return /Simple Grid Example/i.test(text)
@@ -206,9 +194,9 @@ test('grid search functionality', async () => {
206
194
  })
207
195
 
208
196
  // Search for "cat"
209
- await driver.keys.type('cat')
197
+ await session.type('cat')
210
198
 
211
- const searchCatSnapshot = await driver.text({
199
+ const searchCatSnapshot = await session.text({
212
200
  waitFor: (text) => {
213
201
  return /cat/i.test(text)
214
202
  },
@@ -216,23 +204,37 @@ test('grid search functionality', async () => {
216
204
  expect(searchCatSnapshot).toMatchInlineSnapshot(`
217
205
  "
218
206
 
207
+
219
208
  Simple Grid Example ────────────────────────────────────────────
220
209
 
221
210
  cat
222
211
 
212
+
223
213
  Cat
224
214
 
225
215
 
226
- ↵ select ↑↓ navigate ^k actions"
216
+
217
+
218
+
219
+
220
+
221
+
222
+
223
+
224
+
225
+
226
+
227
+
228
+ ↵ select ↑↓ navigate ^k actions"
227
229
  `)
228
230
 
229
231
  // Clear search and search for "space"
230
- await driver.keys.backspace()
231
- await driver.keys.backspace()
232
- await driver.keys.backspace()
233
- await driver.keys.type('space')
232
+ await session.press('backspace')
233
+ await session.press('backspace')
234
+ await session.press('backspace')
235
+ await session.type('space')
234
236
 
235
- const searchSpaceSnapshot = await driver.text({
237
+ const searchSpaceSnapshot = await session.text({
236
238
  waitFor: (text) => {
237
239
  return /space/i.test(text)
238
240
  },
@@ -240,38 +242,49 @@ test('grid search functionality', async () => {
240
242
  expect(searchSpaceSnapshot).toMatchInlineSnapshot(`
241
243
  "
242
244
 
245
+
243
246
  Simple Grid Example ────────────────────────────────────────────
244
247
 
245
248
  space
246
249
 
250
+
251
+
247
252
  Rocket
248
253
  Star
249
254
  Moon
250
255
  Sun
251
256
 
252
257
 
253
- ↵ select ↑↓ navigate ^k actions"
258
+
259
+
260
+
261
+
262
+
263
+
264
+
265
+
266
+ ↵ select ↑↓ navigate ^k actions"
254
267
  `)
255
268
 
256
269
  // Clear search completely
257
- await driver.keys.backspace()
258
- await driver.keys.backspace()
259
- await driver.keys.backspace()
260
- await driver.keys.backspace()
261
- await driver.keys.backspace()
270
+ await session.press('backspace')
271
+ await session.press('backspace')
272
+ await session.press('backspace')
273
+ await session.press('backspace')
274
+ await session.press('backspace')
262
275
 
263
- const clearedSearchSnapshot = await driver.text()
276
+ const clearedSearchSnapshot = await session.text()
264
277
  expect(clearedSearchSnapshot).toMatchInlineSnapshot(`
265
278
  "
266
279
 
280
+
267
281
  Simple Grid Example ────────────────────────────────────────────
268
282
 
269
283
  Search items...
270
284
 
271
-
272
- Fruits
273
- ›Apple
274
- Banana
285
+ Fruits ▲
286
+ ›Apple █
287
+ Banana █
275
288
  Cherry
276
289
 
277
290
  Animals
@@ -282,19 +295,16 @@ test('grid search functionality', async () => {
282
295
  Others
283
296
  House
284
297
  Car
285
- Rocket
286
- Star
287
- Moon
288
- Sun
298
+ Rocket
289
299
 
290
300
 
291
- ↵ select ↑↓ navigate ^k actions"
301
+ ↵ select ↑↓ navigate ^k actions"
292
302
  `)
293
303
 
294
304
  // Search for something that doesn't exist
295
- await driver.keys.type('xyz123')
305
+ await session.type('xyz123')
296
306
 
297
- const noResultsSnapshot = await driver.text({
307
+ const noResultsSnapshot = await session.text({
298
308
  waitFor: (text) => {
299
309
  return /xyz123/i.test(text)
300
310
  },
@@ -302,107 +312,120 @@ test('grid search functionality', async () => {
302
312
  expect(noResultsSnapshot).toMatchInlineSnapshot(`
303
313
  "
304
314
 
315
+
305
316
  Simple Grid Example ────────────────────────────────────────────
306
317
 
307
318
  xyz123
308
319
 
309
320
 
310
321
 
311
- ↵ select ↑↓ navigate ^k actions"
312
- `)
313
- }, 10000)
314
322
 
315
- test('grid item selection and actions', async () => {
316
- await driver.text({
317
- waitFor: (text) => {
318
- // wait for grid to show up
319
- return /Simple Grid Example/i.test(text)
320
- },
321
- })
322
323
 
323
- // Select first item and open actions
324
- await driver.keys.enter()
325
324
 
326
- const firstItemActionsSnapshot = await driver.text()
327
- expect(firstItemActionsSnapshot).toMatchInlineSnapshot(`
328
- "
329
325
 
330
- Simple Grid Example ────────────────────────────────────────────
331
-
332
- Search items...
333
326
 
334
327
 
335
- Fruits
336
- ›Apple
337
- Banana
338
- Cherry
339
328
 
340
329
 
341
- esc
342
330
 
343
- Search actions...
344
- ›Show Details
345
- Copy Emoji ⌃C
346
331
 
347
332
 
348
- ↵ select ↑↓ navigate
349
333
 
350
- Moon
351
- Sun
352
334
 
353
335
 
354
- ↵ select ↑↓ navigate ^k actions"
336
+ ↵ select ↑↓ navigate ^k actions"
355
337
  `)
338
+ }, 10000)
356
339
 
357
- // Navigate down in actions
358
- await driver.keys.down()
359
-
360
- const secondActionSnapshot = await driver.text()
361
- expect(secondActionSnapshot).toMatchInlineSnapshot(`
362
- "
363
-
364
- Simple Grid Example ────────────────────────────────────────────
365
-
366
- Search items...
367
-
368
-
369
- Fruits
370
- ›Apple
371
- Banana
372
- Cherry
340
+ test('grid item selection and actions', async () => {
341
+ await session.text({
342
+ waitFor: (text) => {
343
+ // wait for grid to show up
344
+ return /Simple Grid Example/i.test(text)
345
+ },
346
+ })
373
347
 
348
+ // Select first item and open actions
349
+ await session.press('enter')
374
350
 
375
- esc
351
+ const firstItemActionsSnapshot = await session.text()
352
+ expect(firstItemActionsSnapshot).toMatchInlineSnapshot(`
353
+ "
376
354
 
377
- Search actions...
378
- Show Details
379
- ›Copy Emoji ⌃C
380
355
 
356
+ Simple Grid Example ────────────────────────────────────────────
357
+
358
+ Search items...
359
+
360
+ Fruits ▲
361
+ ┃ ┃
362
+ ┃ esc ┃
363
+ ┃ ┃
364
+ ┃ Search actions... ┃
365
+ ┃ ┃
366
+ ┃ ›Show Details ┃
367
+ ┃ Copy Emoji ⌃C ┃
368
+ ┃ ┃
369
+ ┃ ┃
370
+ ┃ ┃
371
+ ┃ ┃
372
+ ┃ ┃
373
+ ┃ ┃
374
+ ┃ ┃
375
+ ┃ ┃
376
+ ┃ ┃
377
+ ┃ ↵ select ↑↓ navigate ┃
378
+ ┃ ┃"
379
+ `)
381
380
 
382
- select ↑↓ navigate
381
+ // Navigate down in actions
382
+ await session.press('down')
383
383
 
384
- Moon
385
- Sun
384
+ const secondActionSnapshot = await session.text()
385
+ expect(secondActionSnapshot).toMatchInlineSnapshot(`
386
+ "
386
387
 
387
388
 
388
- select ↑↓ navigate ^k actions"
389
+ Simple Grid Example ────────────────────────────────────────────
390
+
391
+ Search items...
392
+
393
+ Fruits ▲
394
+ ┃ ┃
395
+ ┃ esc ┃
396
+ ┃ ┃
397
+ ┃ Search actions... ┃
398
+ ┃ ┃
399
+ ┃ Show Details ┃
400
+ ┃ ›Copy Emoji ⌃C ┃
401
+ ┃ ┃
402
+ ┃ ┃
403
+ ┃ ┃
404
+ ┃ ┃
405
+ ┃ ┃
406
+ ┃ ┃
407
+ ┃ ┃
408
+ ┃ ┃
409
+ ┃ ┃
410
+ ┃ ↵ select ↑↓ navigate ┃
411
+ ┃ ┃"
389
412
  `)
390
413
 
391
414
  // Select "Copy Emoji" action
392
- await driver.keys.enter()
415
+ await session.press('enter')
393
416
 
394
- const afterCopySnapshot = await driver.text()
417
+ const afterCopySnapshot = await session.text()
395
418
  expect(afterCopySnapshot).toMatchInlineSnapshot(`
396
419
  "
397
420
 
421
+
398
422
  Simple Grid Example ────────────────────────────────────────────
399
423
 
400
424
  Search items...
401
425
 
402
-
403
- Fruits
404
- ›Apple
405
- Banana
426
+ Fruits ▲
427
+ ›Apple █
428
+ Banana █
406
429
  Cherry
407
430
 
408
431
  Animals
@@ -413,18 +436,15 @@ test('grid item selection and actions', async () => {
413
436
  Others
414
437
  House
415
438
  Car
416
- Rocket
417
- Star
418
- Moon
419
- Sun
439
+ Rocket
420
440
 
421
441
 
422
- ↵ select ↑↓ navigate ^k actions"
442
+ ↵ select ↑↓ navigate ^k actions"
423
443
  `)
424
444
  }, 10000)
425
445
 
426
446
  test('grid mouse interaction', async () => {
427
- await driver.text({
447
+ await session.text({
428
448
  waitFor: (text) => {
429
449
  // wait for grid to show up
430
450
  return /Simple Grid Example/i.test(text)
@@ -432,20 +452,20 @@ test('grid mouse interaction', async () => {
432
452
  })
433
453
 
434
454
  // Click on "Dog" item
435
- await driver.clickText('Dog')
455
+ await session.click('Dog', { first: true })
436
456
 
437
- const afterClickDogSnapshot = await driver.text()
457
+ const afterClickDogSnapshot = await session.text()
438
458
  expect(afterClickDogSnapshot).toMatchInlineSnapshot(`
439
459
  "
440
460
 
461
+
441
462
  Simple Grid Example ────────────────────────────────────────────
442
463
 
443
464
  Search items...
444
465
 
445
-
446
- Fruits
447
- Apple
448
- Banana
466
+ Fruits ▲
467
+ Apple █
468
+ Banana █
449
469
  Cherry
450
470
 
451
471
  Animals
@@ -456,80 +476,84 @@ test('grid mouse interaction', async () => {
456
476
  Others
457
477
  House
458
478
  Car
459
- Rocket
460
- Star
461
- Moon
462
- Sun
479
+ Rocket
463
480
 
464
481
 
465
- ↵ select ↑↓ navigate ^k actions"
482
+ ↵ select ↑↓ navigate ^k actions"
466
483
  `)
467
484
 
468
- // Click on "Star" item
469
- await driver.clickText('Star')
485
+ // Navigate down to make "Star" visible (it's below Rocket in Others section)
486
+ // Star is not visible with rows: 25 initially, so we need to scroll/navigate to it
487
+ await session.press('down') // Cat
488
+ await session.press('down') // Rabbit
489
+ await session.press('down') // House
490
+ await session.press('down') // Car
491
+ await session.press('down') // Rocket
492
+ await session.press('down') // Star (now visible)
470
493
 
471
- const afterClickStarSnapshot = await driver.text()
494
+ // Click on "Star" item (now visible after navigation)
495
+ await session.click('Star', { first: true })
496
+
497
+ const afterClickStarSnapshot = await session.text()
472
498
  expect(afterClickStarSnapshot).toMatchInlineSnapshot(`
473
499
  "
474
500
 
475
- Simple Grid Example ────────────────────────────────────────────
476
501
 
477
- Search items...
478
-
479
-
480
- Fruits
481
- Apple
482
- Banana
483
- Cherry
484
-
485
- Animals
486
- Dog
487
- Cat
488
- Rabbit
489
-
490
- Others
491
- House
492
- Car
493
- Rocket
494
- ›Star
495
- Moon
496
- Sun
497
-
498
-
499
- ↵ select ↑↓ navigate ^k actions"
502
+ Simple Grid Example ────────────────────────────────────────────
503
+
504
+ Search items...
505
+
506
+ Apple
507
+ ┃ ┃
508
+ ┃ esc ┃
509
+ ┃ ┃
510
+ ┃ Search actions... ┃
511
+ ┃ ┃
512
+ ┃ ›Show Details ┃
513
+ ┃ Copy Emoji ⌃C ┃
514
+ ┃ ┃
515
+ ┃ ┃
516
+ ┃ ┃
517
+ ┃ ┃
518
+ ┃ ┃
519
+ ┃ ┃
520
+ ┃ ┃
521
+ ┃ ┃
522
+ ┃ ┃
523
+ ┃ ↵ select ↑↓ navigate ┃
524
+ ┃ ┃"
500
525
  `)
501
526
 
502
527
  // Click on "Apple" to go back to first section
503
- await driver.clickText('Apple')
528
+ await session.click('Apple', { first: true })
504
529
 
505
- const afterClickAppleSnapshot = await driver.text()
530
+ const afterClickAppleSnapshot = await session.text()
506
531
  expect(afterClickAppleSnapshot).toMatchInlineSnapshot(`
507
532
  "
508
533
 
509
- Simple Grid Example ────────────────────────────────────────────
510
-
511
- Search items...
512
-
513
-
514
- Fruits
515
- ›Apple
516
- Banana
517
- Cherry
518
-
519
- Animals
520
- Dog
521
- Cat
522
- Rabbit
523
-
524
- Others
525
- House
526
- Car
527
- Rocket
528
- Star
529
- Moon
530
- Sun
531
-
532
534
 
533
- select ↑↓ navigate ^k actions"
535
+ Simple Grid Example ────────────────────────────────────────────
536
+
537
+ Search items...
538
+
539
+ Apple ▲
540
+ ┃ ┃
541
+ ┃ esc ┃
542
+ ┃ ┃
543
+ ┃ Search actions... ┃
544
+ ┃ ┃
545
+ ┃ ›Show Details ┃
546
+ ┃ Copy Emoji ⌃C ┃
547
+ ┃ ┃
548
+ ┃ ┃
549
+ ┃ ┃
550
+ ┃ ┃
551
+ ┃ ┃
552
+ ┃ ┃
553
+ ┃ ┃
554
+ ┃ ┃
555
+ ┃ ┃
556
+ ┃ ↵ select ↑↓ navigate ┃
557
+ ┃ ┃"
534
558
  `)
535
559
  }, 10000)