termcast 1.3.10 → 1.3.18

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 (500) hide show
  1. package/dist/apis/toast.d.ts +1 -5
  2. package/dist/apis/toast.d.ts.map +1 -1
  3. package/dist/apis/toast.js +23 -17
  4. package/dist/apis/toast.js.map +1 -1
  5. package/dist/build.d.ts +2 -0
  6. package/dist/build.d.ts.map +1 -1
  7. package/dist/build.js +4 -3
  8. package/dist/build.js.map +1 -1
  9. package/dist/cli.js +42 -0
  10. package/dist/cli.js.map +1 -1
  11. package/dist/colors.d.ts +8 -1
  12. package/dist/colors.d.ts.map +1 -1
  13. package/dist/colors.js +12 -0
  14. package/dist/colors.js.map +1 -1
  15. package/dist/compile.d.ts +30 -0
  16. package/dist/compile.d.ts.map +1 -0
  17. package/dist/compile.js +156 -0
  18. package/dist/compile.js.map +1 -0
  19. package/dist/components/actions.d.ts +1 -0
  20. package/dist/components/actions.d.ts.map +1 -1
  21. package/dist/components/actions.js +5 -2
  22. package/dist/components/actions.js.map +1 -1
  23. package/dist/components/command-arguments.d.ts +9 -0
  24. package/dist/components/command-arguments.d.ts.map +1 -0
  25. package/dist/components/command-arguments.js +21 -0
  26. package/dist/components/command-arguments.js.map +1 -0
  27. package/dist/components/detail.d.ts +1 -1
  28. package/dist/components/detail.d.ts.map +1 -1
  29. package/dist/components/detail.js +17 -39
  30. package/dist/components/detail.js.map +1 -1
  31. package/dist/components/dropdown.d.ts +1 -0
  32. package/dist/components/dropdown.d.ts.map +1 -1
  33. package/dist/components/dropdown.js +77 -21
  34. package/dist/components/dropdown.js.map +1 -1
  35. package/dist/components/extension-preferences.d.ts.map +1 -1
  36. package/dist/components/extension-preferences.js +19 -29
  37. package/dist/components/extension-preferences.js.map +1 -1
  38. package/dist/components/form/checkbox.d.ts.map +1 -1
  39. package/dist/components/form/checkbox.js +9 -2
  40. package/dist/components/form/checkbox.js.map +1 -1
  41. package/dist/components/form/date-picker.d.ts.map +1 -1
  42. package/dist/components/form/date-picker.js +15 -28
  43. package/dist/components/form/date-picker.js.map +1 -1
  44. package/dist/components/form/description.d.ts +2 -0
  45. package/dist/components/form/description.d.ts.map +1 -1
  46. package/dist/components/form/description.js +20 -2
  47. package/dist/components/form/description.js.map +1 -1
  48. package/dist/components/form/dropdown.d.ts.map +1 -1
  49. package/dist/components/form/dropdown.js +13 -28
  50. package/dist/components/form/dropdown.js.map +1 -1
  51. package/dist/components/form/file-autocomplete.d.ts +7 -4
  52. package/dist/components/form/file-autocomplete.d.ts.map +1 -1
  53. package/dist/components/form/file-autocomplete.js +54 -46
  54. package/dist/components/form/file-autocomplete.js.map +1 -1
  55. package/dist/components/form/file-picker.d.ts +5 -0
  56. package/dist/components/form/file-picker.d.ts.map +1 -1
  57. package/dist/components/form/file-picker.js +46 -49
  58. package/dist/components/form/file-picker.js.map +1 -1
  59. package/dist/components/form/form-ref.d.ts +43 -0
  60. package/dist/components/form/form-ref.d.ts.map +1 -0
  61. package/dist/components/form/form-ref.js +53 -0
  62. package/dist/components/form/form-ref.js.map +1 -0
  63. package/dist/components/form/index.d.ts +16 -0
  64. package/dist/components/form/index.d.ts.map +1 -1
  65. package/dist/components/form/index.js +86 -23
  66. package/dist/components/form/index.js.map +1 -1
  67. package/dist/components/form/password-field.d.ts.map +1 -1
  68. package/dist/components/form/password-field.js +32 -16
  69. package/dist/components/form/password-field.js.map +1 -1
  70. package/dist/components/form/text-area.d.ts.map +1 -1
  71. package/dist/components/form/text-area.js +32 -15
  72. package/dist/components/form/text-area.js.map +1 -1
  73. package/dist/components/form/text-field.d.ts.map +1 -1
  74. package/dist/components/form/text-field.js +37 -17
  75. package/dist/components/form/text-field.js.map +1 -1
  76. package/dist/components/form/use-form-navigation.d.ts +4 -0
  77. package/dist/components/form/use-form-navigation.d.ts.map +1 -1
  78. package/dist/components/form/use-form-navigation.js +35 -18
  79. package/dist/components/form/use-form-navigation.js.map +1 -1
  80. package/dist/components/form/with-left-border.d.ts.map +1 -1
  81. package/dist/components/form/with-left-border.js +2 -2
  82. package/dist/components/form/with-left-border.js.map +1 -1
  83. package/dist/components/icon.d.ts +3 -1
  84. package/dist/components/icon.d.ts.map +1 -1
  85. package/dist/components/icon.js +494 -469
  86. package/dist/components/icon.js.map +1 -1
  87. package/dist/components/list.d.ts +11 -7
  88. package/dist/components/list.d.ts.map +1 -1
  89. package/dist/components/list.js +170 -38
  90. package/dist/components/list.js.map +1 -1
  91. package/dist/components/loading-bar.js +1 -1
  92. package/dist/components/loading-bar.js.map +1 -1
  93. package/dist/descendants.d.ts.map +1 -1
  94. package/dist/descendants.js +8 -5
  95. package/dist/descendants.js.map +1 -1
  96. package/dist/examples/action-show-in-finder.js +1 -1
  97. package/dist/examples/action-show-in-finder.js.map +1 -1
  98. package/dist/examples/environment-test.js +1 -1
  99. package/dist/examples/environment-test.js.map +1 -1
  100. package/dist/examples/error-boundary.js +1 -1
  101. package/dist/examples/error-boundary.js.map +1 -1
  102. package/dist/examples/form-basic.d.ts.map +1 -1
  103. package/dist/examples/form-basic.js +2 -2
  104. package/dist/examples/form-basic.js.map +1 -1
  105. package/dist/examples/form-dropdown.js +1 -1
  106. package/dist/examples/form-dropdown.js.map +1 -1
  107. package/dist/examples/form-scroll.d.ts +2 -0
  108. package/dist/examples/form-scroll.d.ts.map +1 -0
  109. package/dist/examples/form-scroll.js +8 -0
  110. package/dist/examples/form-scroll.js.map +1 -0
  111. package/dist/examples/form-tagpicker.js +1 -1
  112. package/dist/examples/form-tagpicker.js.map +1 -1
  113. package/dist/examples/internal/descendants-filtering.js +8 -3
  114. package/dist/examples/internal/descendants-filtering.js.map +1 -1
  115. package/dist/examples/internal/descendants.js +10 -3
  116. package/dist/examples/internal/descendants.js.map +1 -1
  117. package/dist/examples/internal/rhf-custom-ref.d.ts +2 -0
  118. package/dist/examples/internal/rhf-custom-ref.d.ts.map +1 -0
  119. package/dist/examples/internal/rhf-custom-ref.js +67 -0
  120. package/dist/examples/internal/rhf-custom-ref.js.map +1 -0
  121. package/dist/examples/internal/scrollbox-demo.js +3 -7
  122. package/dist/examples/internal/scrollbox-demo.js.map +1 -1
  123. package/dist/examples/internal/scrollbox-with-descendants.d.ts +2 -0
  124. package/dist/examples/internal/scrollbox-with-descendants.d.ts.map +1 -0
  125. package/dist/examples/internal/scrollbox-with-descendants.js +63 -0
  126. package/dist/examples/internal/scrollbox-with-descendants.js.map +1 -0
  127. package/dist/examples/internal/simple-dialog.js +1 -1
  128. package/dist/examples/internal/simple-dialog.js.map +1 -1
  129. package/dist/examples/internal/simple-scrollbox.js +2 -3
  130. package/dist/examples/internal/simple-scrollbox.js.map +1 -1
  131. package/dist/examples/internal/text-stacking.js +4 -2
  132. package/dist/examples/internal/text-stacking.js.map +1 -1
  133. package/dist/examples/list-dropdown-default.js +1 -1
  134. package/dist/examples/list-dropdown-default.js.map +1 -1
  135. package/dist/examples/list-fetch-data.js +1 -1
  136. package/dist/examples/list-fetch-data.js.map +1 -1
  137. package/dist/examples/list-scrollbox.d.ts +2 -0
  138. package/dist/examples/list-scrollbox.d.ts.map +1 -0
  139. package/dist/examples/list-scrollbox.js +29 -0
  140. package/dist/examples/list-scrollbox.js.map +1 -0
  141. package/dist/examples/list-with-detail.js +1 -1
  142. package/dist/examples/list-with-detail.js.map +1 -1
  143. package/dist/examples/list-with-dropdown.js +1 -1
  144. package/dist/examples/list-with-dropdown.js.map +1 -1
  145. package/dist/examples/list-with-sections.js +3 -3
  146. package/dist/examples/list-with-sections.js.map +1 -1
  147. package/dist/examples/miscellaneous.js +1 -1
  148. package/dist/examples/miscellaneous.js.map +1 -1
  149. package/dist/examples/nested-navigation.js +4 -2
  150. package/dist/examples/nested-navigation.js.map +1 -1
  151. package/dist/examples/preferences-test.js +1 -1
  152. package/dist/examples/preferences-test.js.map +1 -1
  153. package/dist/examples/simple-dropdown.js +1 -1
  154. package/dist/examples/simple-dropdown.js.map +1 -1
  155. package/dist/examples/simple-file-picker.js +1 -1
  156. package/dist/examples/simple-file-picker.js.map +1 -1
  157. package/dist/examples/simple-grid.js +1 -1
  158. package/dist/examples/simple-grid.js.map +1 -1
  159. package/dist/examples/simple-hud.js +1 -1
  160. package/dist/examples/simple-hud.js.map +1 -1
  161. package/dist/examples/simple-list-search.js +1 -1
  162. package/dist/examples/simple-list-search.js.map +1 -1
  163. package/dist/examples/simple-list.js +1 -1
  164. package/dist/examples/simple-list.js.map +1 -1
  165. package/dist/examples/simple-navigation.js +4 -2
  166. package/dist/examples/simple-navigation.js.map +1 -1
  167. package/dist/examples/store.js +1 -1
  168. package/dist/examples/store.js.map +1 -1
  169. package/dist/examples/submodule-diff.d.ts +2 -0
  170. package/dist/examples/submodule-diff.d.ts.map +1 -0
  171. package/dist/examples/submodule-diff.js +99 -0
  172. package/dist/examples/submodule-diff.js.map +1 -0
  173. package/dist/examples/tanstack-demo.js +1 -1
  174. package/dist/examples/tanstack-demo.js.map +1 -1
  175. package/dist/examples/use-promise-demo.js +1 -1
  176. package/dist/examples/use-promise-demo.js.map +1 -1
  177. package/dist/extensions/dev.d.ts +8 -0
  178. package/dist/extensions/dev.d.ts.map +1 -1
  179. package/dist/extensions/dev.js +53 -28
  180. package/dist/extensions/dev.js.map +1 -1
  181. package/dist/extensions/home.d.ts.map +1 -1
  182. package/dist/extensions/home.js +16 -91
  183. package/dist/extensions/home.js.map +1 -1
  184. package/dist/globals.js +1 -1
  185. package/dist/globals.js.map +1 -1
  186. package/dist/index.d.ts +3 -1
  187. package/dist/index.d.ts.map +1 -1
  188. package/dist/index.js +5 -1
  189. package/dist/index.js.map +1 -1
  190. package/dist/internal/date-picker-widget.d.ts.map +1 -1
  191. package/dist/internal/date-picker-widget.js +56 -48
  192. package/dist/internal/date-picker-widget.js.map +1 -1
  193. package/dist/internal/dialog.d.ts.map +1 -1
  194. package/dist/internal/dialog.js +7 -7
  195. package/dist/internal/dialog.js.map +1 -1
  196. package/dist/internal/scrollbox.d.ts +2 -1
  197. package/dist/internal/scrollbox.d.ts.map +1 -1
  198. package/dist/internal/scrollbox.js +13 -7
  199. package/dist/internal/scrollbox.js.map +1 -1
  200. package/dist/release.d.ts +11 -0
  201. package/dist/release.d.ts.map +1 -0
  202. package/dist/release.js +113 -0
  203. package/dist/release.js.map +1 -0
  204. package/dist/state.d.ts +1 -0
  205. package/dist/state.d.ts.map +1 -1
  206. package/dist/state.js +1 -0
  207. package/dist/state.js.map +1 -1
  208. package/dist/theme.d.ts +11 -8
  209. package/dist/theme.d.ts.map +1 -1
  210. package/dist/theme.js +31 -8
  211. package/dist/theme.js.map +1 -1
  212. package/dist/utils/run-command.d.ts +22 -0
  213. package/dist/utils/run-command.d.ts.map +1 -0
  214. package/dist/utils/run-command.js +127 -0
  215. package/dist/utils/run-command.js.map +1 -0
  216. package/dist/utils.d.ts +1 -1
  217. package/dist/utils.d.ts.map +1 -1
  218. package/dist/utils.js +5 -3
  219. package/dist/utils.js.map +1 -1
  220. package/package.json +10 -7
  221. package/src/apis/toast.tsx +38 -17
  222. package/src/build.tsx +5 -3
  223. package/src/cli.tsx +46 -0
  224. package/src/colors.tsx +22 -1
  225. package/src/compile.tsx +219 -0
  226. package/src/components/actions.tsx +7 -1
  227. package/src/components/command-arguments.tsx +81 -0
  228. package/src/components/detail.tsx +26 -58
  229. package/src/components/dropdown.tsx +108 -23
  230. package/src/components/extension-preferences.tsx +55 -35
  231. package/src/components/form/checkbox.tsx +13 -5
  232. package/src/components/form/date-picker.tsx +24 -29
  233. package/src/components/form/description.tsx +35 -7
  234. package/src/components/form/dropdown.tsx +16 -30
  235. package/src/components/form/file-autocomplete.tsx +87 -77
  236. package/src/components/form/file-picker.tsx +69 -57
  237. package/src/components/form/form-ref.tsx +68 -0
  238. package/src/components/form/index.tsx +152 -41
  239. package/src/components/form/password-field.tsx +35 -22
  240. package/src/components/form/text-area.tsx +78 -58
  241. package/src/components/form/text-field.tsx +82 -61
  242. package/src/components/form/use-form-navigation.tsx +43 -23
  243. package/src/components/form/with-left-border.tsx +2 -1
  244. package/src/components/icon.tsx +497 -469
  245. package/src/components/list.tsx +279 -112
  246. package/src/components/loading-bar.tsx +1 -1
  247. package/src/descendants.tsx +15 -5
  248. package/src/examples/action-show-in-finder.tsx +1 -1
  249. package/src/examples/environment-test.tsx +1 -1
  250. package/src/examples/error-boundary.tsx +1 -1
  251. package/src/examples/file-autocomplete.vitest.tsx +245 -0
  252. package/src/examples/form-basic.tsx +12 -12
  253. package/src/examples/form-basic.vitest.tsx +297 -671
  254. package/src/examples/form-dropdown.tsx +1 -1
  255. package/src/examples/form-dropdown.vitest.tsx +353 -221
  256. package/src/examples/form-scroll.tsx +56 -0
  257. package/src/examples/form-scroll.vitest.tsx +228 -0
  258. package/src/examples/form-tagpicker.tsx +1 -1
  259. package/src/examples/form-tagpicker.vitest.tsx +438 -193
  260. package/src/examples/internal/descendants-filtering.tsx +13 -5
  261. package/src/examples/internal/descendants.tsx +17 -5
  262. package/src/examples/internal/rhf-custom-ref.tsx +152 -0
  263. package/src/examples/internal/scrollbox-demo.tsx +15 -7
  264. package/src/examples/internal/scrollbox-with-descendants.tsx +94 -0
  265. package/src/examples/internal/simple-dialog.tsx +1 -1
  266. package/src/examples/internal/simple-scrollbox.tsx +8 -5
  267. package/src/examples/internal/simple-scrollbox.vitest.tsx +47 -37
  268. package/src/examples/internal/text-stacking.tsx +4 -2
  269. package/src/examples/list-dropdown-default.tsx +1 -1
  270. package/src/examples/list-dropdown-default.vitest.tsx +136 -71
  271. package/src/examples/list-fetch-data.tsx +1 -1
  272. package/src/examples/list-fetch-data.vitest.tsx +42 -33
  273. package/src/examples/list-scrollbox.tsx +46 -0
  274. package/src/examples/list-scrollbox.vitest.tsx +103 -0
  275. package/src/examples/list-with-detail.tsx +1 -1
  276. package/src/examples/list-with-detail.vitest.tsx +290 -294
  277. package/src/examples/list-with-dropdown.tsx +1 -1
  278. package/src/examples/list-with-dropdown.vitest.tsx +190 -150
  279. package/src/examples/list-with-sections.tsx +12 -1
  280. package/src/examples/list-with-sections.vitest.tsx +390 -218
  281. package/src/examples/miscellaneous.tsx +1 -1
  282. package/src/examples/nested-navigation.tsx +4 -2
  283. package/src/examples/preferences-test.tsx +1 -1
  284. package/src/examples/simple-dropdown.tsx +1 -1
  285. package/src/examples/simple-file-picker.tsx +1 -1
  286. package/src/examples/simple-file-picker.vitest.tsx +538 -132
  287. package/src/examples/simple-grid.tsx +1 -1
  288. package/src/examples/simple-grid.vitest.tsx +258 -234
  289. package/src/examples/simple-hud.tsx +1 -1
  290. package/src/examples/simple-list-search.tsx +1 -1
  291. package/src/examples/simple-list.tsx +1 -1
  292. package/src/examples/simple-navigation.tsx +4 -2
  293. package/src/examples/simple-navigation.vitest.tsx +434 -238
  294. package/src/examples/store.tsx +1 -1
  295. package/src/examples/store.vitest.tsx +31 -10
  296. package/src/examples/submodule-diff.tsx +153 -0
  297. package/src/examples/tanstack-demo.tsx +1 -1
  298. package/src/examples/use-promise-demo.tsx +1 -1
  299. package/src/extensions/dev.tsx +74 -36
  300. package/src/extensions/dev.vitest.tsx +220 -0
  301. package/src/extensions/home.tsx +17 -118
  302. package/src/globals.ts +1 -1
  303. package/src/index.tsx +7 -1
  304. package/src/internal/date-picker-widget.tsx +56 -46
  305. package/src/internal/dialog.tsx +6 -6
  306. package/src/internal/scrollbox.tsx +15 -5
  307. package/src/release.tsx +159 -0
  308. package/src/state.tsx +2 -0
  309. package/src/store-api/search.test.tsx +4 -13
  310. package/src/theme.tsx +33 -8
  311. package/src/utils/run-command.tsx +204 -0
  312. package/src/utils.tsx +5 -3
  313. package/dist/ai.d.ts +0 -104
  314. package/dist/ai.d.ts.map +0 -1
  315. package/dist/ai.js +0 -135
  316. package/dist/ai.js.map +0 -1
  317. package/dist/apis/cache.test.d.ts +0 -2
  318. package/dist/apis/cache.test.d.ts.map +0 -1
  319. package/dist/apis/cache.test.js +0 -246
  320. package/dist/apis/cache.test.js.map +0 -1
  321. package/dist/apis/localstorage.test.d.ts +0 -2
  322. package/dist/apis/localstorage.test.d.ts.map +0 -1
  323. package/dist/apis/localstorage.test.js +0 -131
  324. package/dist/apis/localstorage.test.js.map +0 -1
  325. package/dist/apis/toast.test.d.ts +0 -2
  326. package/dist/apis/toast.test.d.ts.map +0 -1
  327. package/dist/apis/toast.test.js +0 -67
  328. package/dist/apis/toast.test.js.map +0 -1
  329. package/dist/build.test.d.ts +0 -2
  330. package/dist/build.test.d.ts.map +0 -1
  331. package/dist/build.test.js +0 -73
  332. package/dist/build.test.js.map +0 -1
  333. package/dist/cache.d.ts +0 -32
  334. package/dist/cache.d.ts.map +0 -1
  335. package/dist/cache.js +0 -205
  336. package/dist/cache.js.map +0 -1
  337. package/dist/cache.test.d.ts +0 -2
  338. package/dist/cache.test.d.ts.map +0 -1
  339. package/dist/cache.test.js +0 -246
  340. package/dist/cache.test.js.map +0 -1
  341. package/dist/clipboard.d.ts +0 -36
  342. package/dist/clipboard.d.ts.map +0 -1
  343. package/dist/clipboard.js +0 -154
  344. package/dist/clipboard.js.map +0 -1
  345. package/dist/components/form/form-type-only.d.ts +0 -174
  346. package/dist/components/form/form-type-only.d.ts.map +0 -1
  347. package/dist/components/form/form-type-only.js +0 -2
  348. package/dist/components/form/form-type-only.js.map +0 -1
  349. package/dist/components/form/use-form-handling.d.ts +0 -4
  350. package/dist/components/form/use-form-handling.d.ts.map +0 -1
  351. package/dist/components/form/use-form-handling.js +0 -37
  352. package/dist/components/form/use-form-handling.js.map +0 -1
  353. package/dist/dev-ui.d.ts +0 -7
  354. package/dist/dev-ui.d.ts.map +0 -1
  355. package/dist/dev-ui.js +0 -118
  356. package/dist/dev-ui.js.map +0 -1
  357. package/dist/environment.d.ts +0 -63
  358. package/dist/environment.d.ts.map +0 -1
  359. package/dist/environment.js +0 -189
  360. package/dist/environment.js.map +0 -1
  361. package/dist/examples/datepicker.d.ts +0 -2
  362. package/dist/examples/datepicker.d.ts.map +0 -1
  363. package/dist/examples/datepicker.js +0 -344
  364. package/dist/examples/datepicker.js.map +0 -1
  365. package/dist/examples/form-basic-arrow-keys.vitest.d.ts +0 -2
  366. package/dist/examples/form-basic-arrow-keys.vitest.d.ts.map +0 -1
  367. package/dist/examples/form-basic-arrow-keys.vitest.js +0 -46
  368. package/dist/examples/form-basic-arrow-keys.vitest.js.map +0 -1
  369. package/dist/examples/form-basic.vitest.d.ts +0 -2
  370. package/dist/examples/form-basic.vitest.d.ts.map +0 -1
  371. package/dist/examples/form-basic.vitest.js +0 -995
  372. package/dist/examples/form-basic.vitest.js.map +0 -1
  373. package/dist/examples/form-dropdown-with-sections.d.ts +0 -2
  374. package/dist/examples/form-dropdown-with-sections.d.ts.map +0 -1
  375. package/dist/examples/form-dropdown-with-sections.js +0 -13
  376. package/dist/examples/form-dropdown-with-sections.js.map +0 -1
  377. package/dist/examples/form-dropdown-with-sections.vitest.d.ts +0 -2
  378. package/dist/examples/form-dropdown-with-sections.vitest.d.ts.map +0 -1
  379. package/dist/examples/form-dropdown-with-sections.vitest.js +0 -75
  380. package/dist/examples/form-dropdown-with-sections.vitest.js.map +0 -1
  381. package/dist/examples/form-dropdown.vitest.d.ts +0 -2
  382. package/dist/examples/form-dropdown.vitest.d.ts.map +0 -1
  383. package/dist/examples/form-dropdown.vitest.js +0 -722
  384. package/dist/examples/form-dropdown.vitest.js.map +0 -1
  385. package/dist/examples/form-multiselect-dropdown.d.ts +0 -2
  386. package/dist/examples/form-multiselect-dropdown.d.ts.map +0 -1
  387. package/dist/examples/form-multiselect-dropdown.js +0 -13
  388. package/dist/examples/form-multiselect-dropdown.js.map +0 -1
  389. package/dist/examples/form-tagpicker.vitest.d.ts +0 -2
  390. package/dist/examples/form-tagpicker.vitest.d.ts.map +0 -1
  391. package/dist/examples/form-tagpicker.vitest.js +0 -491
  392. package/dist/examples/form-tagpicker.vitest.js.map +0 -1
  393. package/dist/examples/internal/nested-boxes.d.ts +0 -2
  394. package/dist/examples/internal/nested-boxes.d.ts.map +0 -1
  395. package/dist/examples/internal/nested-boxes.js +0 -7
  396. package/dist/examples/internal/nested-boxes.js.map +0 -1
  397. package/dist/examples/internal/simple-scrollbox.vitest.d.ts +0 -2
  398. package/dist/examples/internal/simple-scrollbox.vitest.d.ts.map +0 -1
  399. package/dist/examples/internal/simple-scrollbox.vitest.js +0 -88
  400. package/dist/examples/internal/simple-scrollbox.vitest.js.map +0 -1
  401. package/dist/examples/internal/unicode-square-repro.d.ts +0 -2
  402. package/dist/examples/internal/unicode-square-repro.d.ts.map +0 -1
  403. package/dist/examples/internal/unicode-square-repro.js +0 -7
  404. package/dist/examples/internal/unicode-square-repro.js.map +0 -1
  405. package/dist/examples/list-dropdown-default.vitest.d.ts +0 -2
  406. package/dist/examples/list-dropdown-default.vitest.d.ts.map +0 -1
  407. package/dist/examples/list-dropdown-default.vitest.js +0 -164
  408. package/dist/examples/list-dropdown-default.vitest.js.map +0 -1
  409. package/dist/examples/list-fetch-data.vitest.d.ts +0 -2
  410. package/dist/examples/list-fetch-data.vitest.d.ts.map +0 -1
  411. package/dist/examples/list-fetch-data.vitest.js +0 -103
  412. package/dist/examples/list-fetch-data.vitest.js.map +0 -1
  413. package/dist/examples/list-filter-navigation.d.ts +0 -2
  414. package/dist/examples/list-filter-navigation.d.ts.map +0 -1
  415. package/dist/examples/list-filter-navigation.js +0 -8
  416. package/dist/examples/list-filter-navigation.js.map +0 -1
  417. package/dist/examples/list-with-detail.vitest.d.ts +0 -2
  418. package/dist/examples/list-with-detail.vitest.d.ts.map +0 -1
  419. package/dist/examples/list-with-detail.vitest.js +0 -438
  420. package/dist/examples/list-with-detail.vitest.js.map +0 -1
  421. package/dist/examples/list-with-dropdown.vitest.d.ts +0 -2
  422. package/dist/examples/list-with-dropdown.vitest.d.ts.map +0 -1
  423. package/dist/examples/list-with-dropdown.vitest.js +0 -297
  424. package/dist/examples/list-with-dropdown.vitest.js.map +0 -1
  425. package/dist/examples/list-with-sections.vitest.d.ts +0 -2
  426. package/dist/examples/list-with-sections.vitest.d.ts.map +0 -1
  427. package/dist/examples/list-with-sections.vitest.js +0 -441
  428. package/dist/examples/list-with-sections.vitest.js.map +0 -1
  429. package/dist/examples/simple-file-picker.vitest.d.ts +0 -2
  430. package/dist/examples/simple-file-picker.vitest.d.ts.map +0 -1
  431. package/dist/examples/simple-file-picker.vitest.js +0 -277
  432. package/dist/examples/simple-file-picker.vitest.js.map +0 -1
  433. package/dist/examples/simple-grid.vitest.d.ts +0 -2
  434. package/dist/examples/simple-grid.vitest.d.ts.map +0 -1
  435. package/dist/examples/simple-grid.vitest.js +0 -498
  436. package/dist/examples/simple-grid.vitest.js.map +0 -1
  437. package/dist/examples/simple-navigation.vitest.d.ts +0 -2
  438. package/dist/examples/simple-navigation.vitest.d.ts.map +0 -1
  439. package/dist/examples/simple-navigation.vitest.js +0 -522
  440. package/dist/examples/simple-navigation.vitest.js.map +0 -1
  441. package/dist/examples/store.vitest.d.ts +0 -2
  442. package/dist/examples/store.vitest.d.ts.map +0 -1
  443. package/dist/examples/store.vitest.js +0 -48
  444. package/dist/examples/store.vitest.js.map +0 -1
  445. package/dist/home-command.d.ts +0 -8
  446. package/dist/home-command.d.ts.map +0 -1
  447. package/dist/home-command.js +0 -181
  448. package/dist/home-command.js.map +0 -1
  449. package/dist/hooks/hooks.test.d.ts +0 -2
  450. package/dist/hooks/hooks.test.d.ts.map +0 -1
  451. package/dist/hooks/hooks.test.js +0 -37
  452. package/dist/hooks/hooks.test.js.map +0 -1
  453. package/dist/hover-repro.d.ts +0 -2
  454. package/dist/hover-repro.d.ts.map +0 -1
  455. package/dist/hover-repro.js +0 -20
  456. package/dist/hover-repro.js.map +0 -1
  457. package/dist/localstorage.d.ts +0 -13
  458. package/dist/localstorage.d.ts.map +0 -1
  459. package/dist/localstorage.js +0 -190
  460. package/dist/localstorage.js.map +0 -1
  461. package/dist/localstorage.test.d.ts +0 -2
  462. package/dist/localstorage.test.d.ts.map +0 -1
  463. package/dist/localstorage.test.js +0 -131
  464. package/dist/localstorage.test.js.map +0 -1
  465. package/dist/oauth.d.ts +0 -142
  466. package/dist/oauth.d.ts.map +0 -1
  467. package/dist/oauth.js +0 -551
  468. package/dist/oauth.js.map +0 -1
  469. package/dist/preferences.d.ts +0 -23
  470. package/dist/preferences.d.ts.map +0 -1
  471. package/dist/preferences.js +0 -105
  472. package/dist/preferences.js.map +0 -1
  473. package/dist/store-api/download.test.d.ts +0 -2
  474. package/dist/store-api/download.test.d.ts.map +0 -1
  475. package/dist/store-api/download.test.js +0 -36
  476. package/dist/store-api/download.test.js.map +0 -1
  477. package/dist/store-api/extension.test.d.ts +0 -2
  478. package/dist/store-api/extension.test.d.ts.map +0 -1
  479. package/dist/store-api/extension.test.js +0 -22
  480. package/dist/store-api/extension.test.js.map +0 -1
  481. package/dist/store-api/search.test.d.ts +0 -2
  482. package/dist/store-api/search.test.d.ts.map +0 -1
  483. package/dist/store-api/search.test.js +0 -45
  484. package/dist/store-api/search.test.js.map +0 -1
  485. package/dist/store.d.ts +0 -21
  486. package/dist/store.d.ts.map +0 -1
  487. package/dist/store.js +0 -84
  488. package/dist/store.js.map +0 -1
  489. package/dist/toast.d.ts +0 -44
  490. package/dist/toast.d.ts.map +0 -1
  491. package/dist/toast.js +0 -221
  492. package/dist/toast.js.map +0 -1
  493. package/dist/utils.test.d.ts +0 -2
  494. package/dist/utils.test.d.ts.map +0 -1
  495. package/dist/utils.test.js +0 -152
  496. package/dist/utils.test.js.map +0 -1
  497. package/dist/window.d.ts +0 -12
  498. package/dist/window.d.ts.map +0 -1
  499. package/dist/window.js +0 -48
  500. package/dist/window.js.map +0 -1
@@ -1,40 +1,52 @@
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/form-dropdown.tsx'], {
6
+ beforeEach(async () => {
7
+ session = await launchTerminal({
8
+ command: 'bun',
9
+ args: ['src/examples/form-dropdown.tsx'],
9
10
  cols: 70,
10
11
  rows: 50,
11
12
  })
12
13
  })
13
14
 
14
15
  afterEach(() => {
15
- driver?.dispose()
16
+ session?.close()
16
17
  })
17
18
 
18
19
  test('form dropdown shows inline options', async () => {
19
- await driver.text({
20
+ const initialSnapshot = await session.text({
20
21
  waitFor: (text) => {
21
- // wait for form to show up
22
- return /Dropdown Component Demo/i.test(text)
22
+ return (
23
+ /Dropdown Component Demo/i.test(text) &&
24
+ text.includes('Programming Languages') &&
25
+ text.includes('TypeScript') &&
26
+ text.includes('Editor Theme') &&
27
+ text.includes('Task Priority') &&
28
+ text.includes('Critical') &&
29
+ text.includes('↵ submit')
30
+ )
23
31
  },
24
32
  })
25
-
26
- const initialSnapshot = await driver.text()
27
33
  expect(initialSnapshot).toMatchInlineSnapshot(`
28
34
  "
29
35
 
30
- Dropdown Component Demo
31
- │ Test dropdown with sections, multiple selection, and more featu
32
-
33
- ◆ Programming Languages
36
+
37
+
38
+
39
+
40
+
41
+ ■ Dropdown Component Demo
42
+ ┃ Test dropdown with sections, multiple selection, and more
43
+ ┃ features
44
+
45
+ ◇ Programming Languages
34
46
  │ TypeScript, Rust
35
47
 
36
48
  │ Frontend
37
- │› ● TypeScript
49
+ ● TypeScript
38
50
  │ ○ JavaScript
39
51
  │ ○ React
40
52
  │ ○ Vue
@@ -63,24 +75,33 @@ test('form dropdown shows inline options', async () => {
63
75
 
64
76
 
65
77
 
66
- ↵ submit ↑↓ navigate ^k actions"
78
+
79
+
80
+
81
+
82
+ ctrl ↵ submit ↑↓ navigate ^k actions"
67
83
  `)
68
84
 
69
- // Toggle TypeScript selection by pressing space
70
- await driver.keys.space()
85
+ await session.press('space')
71
86
 
72
- const afterToggleTypeScriptSnapshot = await driver.text()
87
+ const afterToggleTypeScriptSnapshot = await session.text()
73
88
  expect(afterToggleTypeScriptSnapshot).toMatchInlineSnapshot(`
74
89
  "
75
90
 
76
- Dropdown Component Demo
77
- │ Test dropdown with sections, multiple selection, and more featu
78
-
79
- ◆ Programming Languages
80
- │ Rust
91
+
92
+
93
+
94
+
95
+
96
+ ■ Dropdown Component Demo
97
+ ┃ Test dropdown with sections, multiple selection, and more
98
+ ┃ features
99
+
100
+ ◇ Programming Languages
101
+ │ TypeScript, Rust
81
102
 
82
103
  │ Frontend
83
- │› TypeScript
104
+ │ ● TypeScript
84
105
  │ ○ JavaScript
85
106
  │ ○ React
86
107
  │ ○ Vue
@@ -109,25 +130,34 @@ test('form dropdown shows inline options', async () => {
109
130
 
110
131
 
111
132
 
112
- ↵ submit ↑↓ navigate ^k actions"
133
+
134
+
135
+
136
+
137
+ ctrl ↵ submit ↑↓ navigate ^k actions"
113
138
  `)
114
139
 
115
- // Navigate down
116
- await driver.keys.down()
140
+ await session.press('down')
117
141
 
118
- const afterDownSnapshot = await driver.text()
142
+ const afterDownSnapshot = await session.text()
119
143
  expect(afterDownSnapshot).toMatchInlineSnapshot(`
120
144
  "
121
145
 
122
- Dropdown Component Demo
123
- │ Test dropdown with sections, multiple selection, and more featu
124
-
125
- ◆ Programming Languages
126
- │ Rust
146
+
147
+
148
+
149
+
150
+
151
+ ■ Dropdown Component Demo
152
+ ┃ Test dropdown with sections, multiple selection, and more
153
+ ┃ features
154
+
155
+ ◇ Programming Languages
156
+ │ TypeScript, Rust
127
157
 
128
158
  │ Frontend
129
- TypeScript
130
- │› ○ JavaScript
159
+ TypeScript
160
+ ○ JavaScript
131
161
  │ ○ React
132
162
  │ ○ Vue
133
163
  │ ↑↓ to see more options
@@ -155,31 +185,39 @@ test('form dropdown shows inline options', async () => {
155
185
 
156
186
 
157
187
 
158
- ↵ submit ↑↓ navigate ^k actions"
188
+
189
+
190
+
191
+
192
+ ctrl ↵ submit ↑↓ navigate ^k actions"
159
193
  `)
160
194
 
161
- // Navigate down to see pagination
162
- await driver.keys.down()
163
- await driver.keys.down()
164
- await driver.keys.down()
165
- await driver.keys.down()
195
+ await session.press('down')
196
+ await session.press('down')
197
+ await session.press('down')
198
+ await session.press('down')
166
199
 
167
- const afterMultipleDownSnapshot = await driver.text()
200
+ const afterMultipleDownSnapshot = await session.text()
168
201
  expect(afterMultipleDownSnapshot).toMatchInlineSnapshot(`
169
202
  "
170
203
 
171
- Dropdown Component Demo
172
- │ Test dropdown with sections, multiple selection, and more featu
173
-
174
- ◆ Programming Languages
175
- │ Rust
204
+
205
+
206
+
207
+
208
+
209
+ ■ Dropdown Component Demo
210
+ ┃ Test dropdown with sections, multiple selection, and more
211
+ ┃ features
212
+
213
+ ◇ Programming Languages
214
+ │ TypeScript, Rust
176
215
 
177
216
  │ Frontend
217
+ │ ● TypeScript
218
+ │ ○ JavaScript
178
219
  │ ○ React
179
220
  │ ○ Vue
180
- │ ○ Svelte
181
- │ Backend
182
- │› ○ Node.js
183
221
  │ ↑↓ to see more options
184
222
 
185
223
  │ Choose your preferred programming languages
@@ -205,28 +243,36 @@ test('form dropdown shows inline options', async () => {
205
243
 
206
244
 
207
245
 
208
- ↵ submit ↑↓ navigate ^k actions"
246
+
247
+
248
+
249
+
250
+ ctrl ↵ submit ↑↓ navigate ^k actions"
209
251
  `)
210
252
 
211
- // Select an item
212
- await driver.keys.enter()
253
+ await session.press('enter')
213
254
 
214
- const afterSelectSnapshot = await driver.text()
255
+ const afterSelectSnapshot = await session.text()
215
256
  expect(afterSelectSnapshot).toMatchInlineSnapshot(`
216
257
  "
217
258
 
218
- Dropdown Component Demo
219
- │ Test dropdown with sections, multiple selection, and more featu
220
-
221
- ◆ Programming Languages
222
- │ Rust, Node.js
259
+
260
+
261
+
262
+
263
+
264
+ ■ Dropdown Component Demo
265
+ ┃ Test dropdown with sections, multiple selection, and more
266
+ ┃ features
267
+
268
+ ◇ Programming Languages
269
+ │ TypeScript, Rust
223
270
 
224
271
  │ Frontend
272
+ │ ● TypeScript
273
+ │ ○ JavaScript
225
274
  │ ○ React
226
275
  │ ○ Vue
227
- │ ○ Svelte
228
- │ Backend
229
- │› ● Node.js
230
276
  │ ↑↓ to see more options
231
277
 
232
278
  │ Choose your preferred programming languages
@@ -252,33 +298,41 @@ test('form dropdown shows inline options', async () => {
252
298
 
253
299
 
254
300
 
255
- ↵ submit ↑↓ navigate ^k actions"
301
+
302
+
303
+
304
+
305
+ ctrl ↵ submit ↑↓ navigate ^k actions"
256
306
  `)
257
307
  }, 10000)
258
308
 
259
309
  test('form dropdown keyboard navigation', async () => {
260
- await driver.text({
310
+ await session.text({
261
311
  waitFor: (text) => {
262
- // wait for form to show up
263
312
  return /Dropdown Component Demo/i.test(text)
264
313
  },
265
314
  })
266
315
 
267
- // Toggle TypeScript selection by pressing space
268
- await driver.keys.space()
316
+ await session.press('space')
269
317
 
270
- const afterToggleSnapshot = await driver.text()
318
+ const afterToggleSnapshot = await session.text()
271
319
  expect(afterToggleSnapshot).toMatchInlineSnapshot(`
272
320
  "
273
321
 
274
- Dropdown Component Demo
275
- │ Test dropdown with sections, multiple selection, and more featu
276
-
277
- ◆ Programming Languages
278
- │ Rust
322
+
323
+
324
+
325
+
326
+
327
+ ■ Dropdown Component Demo
328
+ ┃ Test dropdown with sections, multiple selection, and more
329
+ ┃ features
330
+
331
+ ◇ Programming Languages
332
+ │ TypeScript, Rust
279
333
 
280
334
  │ Frontend
281
- │› TypeScript
335
+ │ ● TypeScript
282
336
  │ ○ JavaScript
283
337
  │ ○ React
284
338
  │ ○ Vue
@@ -307,30 +361,39 @@ test('form dropdown keyboard navigation', async () => {
307
361
 
308
362
 
309
363
 
310
- ↵ submit ↑↓ navigate ^k actions"
364
+
365
+
366
+
367
+
368
+ ctrl ↵ submit ↑↓ navigate ^k actions"
311
369
  `)
312
370
 
313
- // Navigate to last visible item
314
- await driver.keys.down()
315
- await driver.keys.down()
316
- await driver.keys.down()
317
- await driver.keys.down()
371
+ await session.press('down')
372
+ await session.press('down')
373
+ await session.press('down')
374
+ await session.press('down')
318
375
 
319
- const lastVisibleSnapshot = await driver.text()
376
+ const lastVisibleSnapshot = await session.text()
320
377
  expect(lastVisibleSnapshot).toMatchInlineSnapshot(`
321
378
  "
322
379
 
323
- Dropdown Component Demo
324
- │ Test dropdown with sections, multiple selection, and more featu
325
-
326
- ◆ Programming Languages
327
- │ Rust
380
+
381
+
382
+
383
+
384
+
385
+ ■ Dropdown Component Demo
386
+ ┃ Test dropdown with sections, multiple selection, and more
387
+ ┃ features
388
+
389
+ ◇ Programming Languages
390
+ │ TypeScript, Rust
328
391
 
329
392
  │ Frontend
393
+ │ ● TypeScript
330
394
  │ ○ JavaScript
331
395
  │ ○ React
332
396
  │ ○ Vue
333
- │› ○ Svelte
334
397
  │ ↑↓ to see more options
335
398
 
336
399
  │ Choose your preferred programming languages
@@ -356,28 +419,36 @@ test('form dropdown keyboard navigation', async () => {
356
419
 
357
420
 
358
421
 
359
- ↵ submit ↑↓ navigate ^k actions"
422
+
423
+
424
+
425
+
426
+ ctrl ↵ submit ↑↓ navigate ^k actions"
360
427
  `)
361
428
 
362
- // Navigate to next page
363
- await driver.keys.down()
429
+ await session.press('down')
364
430
 
365
- const nextPageSnapshot = await driver.text()
431
+ const nextPageSnapshot = await session.text()
366
432
  expect(nextPageSnapshot).toMatchInlineSnapshot(`
367
433
  "
368
434
 
369
- Dropdown Component Demo
370
- │ Test dropdown with sections, multiple selection, and more featu
371
-
372
- ◆ Programming Languages
373
- │ Rust
435
+
436
+
437
+
438
+
439
+
440
+ ■ Dropdown Component Demo
441
+ ┃ Test dropdown with sections, multiple selection, and more
442
+ ┃ features
443
+
444
+ ◇ Programming Languages
445
+ │ TypeScript, Rust
374
446
 
375
447
  │ Frontend
448
+ │ ● TypeScript
449
+ │ ○ JavaScript
376
450
  │ ○ React
377
451
  │ ○ Vue
378
- │ ○ Svelte
379
- │ Backend
380
- │› ○ Node.js
381
452
  │ ↑↓ to see more options
382
453
 
383
454
  │ Choose your preferred programming languages
@@ -403,28 +474,36 @@ test('form dropdown keyboard navigation', async () => {
403
474
 
404
475
 
405
476
 
406
- ↵ submit ↑↓ navigate ^k actions"
477
+
478
+
479
+
480
+
481
+ ctrl ↵ submit ↑↓ navigate ^k actions"
407
482
  `)
408
483
 
409
- // Go back up
410
- await driver.keys.up()
484
+ await session.press('up')
411
485
 
412
- const backToPreviousPageSnapshot = await driver.text()
486
+ const backToPreviousPageSnapshot = await session.text()
413
487
  expect(backToPreviousPageSnapshot).toMatchInlineSnapshot(`
414
488
  "
415
489
 
416
- Dropdown Component Demo
417
- │ Test dropdown with sections, multiple selection, and more featu
418
-
419
- ◆ Programming Languages
420
- │ Rust
490
+
491
+
492
+
493
+
494
+
495
+ ■ Dropdown Component Demo
496
+ ┃ Test dropdown with sections, multiple selection, and more
497
+ ┃ features
498
+
499
+ ◇ Programming Languages
500
+ │ TypeScript, Rust
421
501
 
422
502
  │ Frontend
503
+ │ ● TypeScript
504
+ │ ○ JavaScript
423
505
  │ ○ React
424
506
  │ ○ Vue
425
- │› ○ Svelte
426
- │ Backend
427
- │ ○ Node.js
428
507
  │ ↑↓ to see more options
429
508
 
430
509
  │ Choose your preferred programming languages
@@ -450,28 +529,36 @@ test('form dropdown keyboard navigation', async () => {
450
529
 
451
530
 
452
531
 
453
- ↵ submit ↑↓ navigate ^k actions"
532
+
533
+
534
+
535
+
536
+ ctrl ↵ submit ↑↓ navigate ^k actions"
454
537
  `)
455
538
 
456
- // Escape doesn't close anything since dropdown is always inline
457
- await driver.keys.escape()
539
+ await session.press('esc')
458
540
 
459
- const afterEscapeSnapshot = await driver.text()
541
+ const afterEscapeSnapshot = await session.text()
460
542
  expect(afterEscapeSnapshot).toMatchInlineSnapshot(`
461
543
  "
462
544
 
463
- Dropdown Component Demo
464
- │ Test dropdown with sections, multiple selection, and more featu
465
-
466
- ◆ Programming Languages
467
- │ Rust
545
+
546
+
547
+
548
+
549
+
550
+ ■ Dropdown Component Demo
551
+ ┃ Test dropdown with sections, multiple selection, and more
552
+ ┃ features
553
+
554
+ ◇ Programming Languages
555
+ │ TypeScript, Rust
468
556
 
469
557
  │ Frontend
558
+ │ ● TypeScript
559
+ │ ○ JavaScript
470
560
  │ ○ React
471
561
  │ ○ Vue
472
- │› ○ Svelte
473
- │ Backend
474
- │ ○ Node.js
475
562
  │ ↑↓ to see more options
476
563
 
477
564
  │ Choose your preferred programming languages
@@ -497,44 +584,52 @@ test('form dropdown keyboard navigation', async () => {
497
584
 
498
585
 
499
586
 
500
- ↵ submit ↑↓ navigate ^k actions"
587
+
588
+
589
+
590
+
591
+ ctrl ↵ submit ↑↓ navigate ^k actions"
501
592
  `)
502
593
  }, 10000)
503
594
 
504
595
  test('form dropdown with default value', async () => {
505
- await driver.text({
596
+ await session.text({
506
597
  waitFor: (text) => {
507
- // wait for form to show up
508
598
  return /Dropdown Component Demo/i.test(text)
509
599
  },
510
600
  })
511
601
 
512
- // Navigate to second dropdown
513
- await driver.keys.tab()
602
+ await session.press('tab')
514
603
 
515
- const secondDropdownFocusedSnapshot = await driver.text()
604
+ const secondDropdownFocusedSnapshot = await session.text()
516
605
  expect(secondDropdownFocusedSnapshot).toMatchInlineSnapshot(`
517
606
  "
518
607
 
519
- Dropdown Component Demo
520
- │ Test dropdown with sections, multiple selection, and more featu
521
-
522
- ◇ Programming Languages
523
- │ TypeScript, Rust
524
-
525
- Frontend
526
- ● TypeScript
527
- │ ○ JavaScript
528
- │ ○ React
529
- │ ○ Vue
530
- │ ↑↓ to see more options
531
-
532
- │ Choose your preferred programming languages
608
+
609
+
610
+
611
+
612
+
613
+ ▪ Dropdown Component Demo
614
+ Test dropdown with sections, multiple selection, and more
615
+ features
533
616
 
534
- Editor Theme
617
+ Programming Languages
618
+ ┃ TypeScript, Rust
619
+
620
+ ┃ Frontend
621
+ ┃› ● TypeScript
622
+ ┃ ○ JavaScript
623
+ ┃ ○ React
624
+ ┃ ○ Vue
625
+ ┃ ↑↓ to see more options
626
+
627
+ ┃ Choose your preferred programming languages
628
+
629
+ ◇ Editor Theme
535
630
  │ Dracula
536
631
 
537
- │› ○ Monokai
632
+ ○ Monokai
538
633
  │ ● Dracula
539
634
  │ ○ One Dark
540
635
  │ ○ Nord
@@ -552,36 +647,45 @@ test('form dropdown with default value', async () => {
552
647
 
553
648
 
554
649
 
555
- ↵ submit ↑↓ navigate ^k actions"
650
+
651
+
652
+
653
+
654
+ ctrl ↵ submit ↑↓ navigate ^k actions"
556
655
  `)
557
656
 
558
- // Toggle Monokai selection by pressing space
559
- await driver.keys.space()
657
+ await session.press('space')
560
658
 
561
- const afterToggleMonokaiSnapshot = await driver.text()
659
+ const afterToggleMonokaiSnapshot = await session.text()
562
660
  expect(afterToggleMonokaiSnapshot).toMatchInlineSnapshot(`
563
661
  "
564
662
 
565
- Dropdown Component Demo
566
- │ Test dropdown with sections, multiple selection, and more featu
567
-
568
- ◇ Programming Languages
569
- │ TypeScript, Rust
570
-
571
- Frontend
572
- ● TypeScript
573
- │ ○ JavaScript
574
- │ ○ React
575
- │ ○ Vue
576
- │ ↑↓ to see more options
577
-
578
- │ Choose your preferred programming languages
663
+
664
+
665
+
666
+
667
+
668
+ ▪ Dropdown Component Demo
669
+ Test dropdown with sections, multiple selection, and more
670
+ features
579
671
 
580
- Editor Theme
581
- Monokai
672
+ Programming Languages
673
+ Rust
674
+
675
+ ┃ Frontend
676
+ ┃› ○ TypeScript
677
+ ┃ ○ JavaScript
678
+ ┃ ○ React
679
+ ┃ ○ Vue
680
+ ┃ ↑↓ to see more options
681
+
682
+ ┃ Choose your preferred programming languages
683
+
684
+ ◇ Editor Theme
685
+ │ Dracula
582
686
 
583
- │› Monokai
584
- Dracula
687
+ │ ○ Monokai
688
+ Dracula
585
689
  │ ○ One Dark
586
690
  │ ○ Nord
587
691
  │ ↑↓ to see more options
@@ -598,14 +702,17 @@ test('form dropdown with default value', async () => {
598
702
 
599
703
 
600
704
 
601
- ↵ submit ↑↓ navigate ^k actions"
705
+
706
+
707
+
708
+
709
+ ctrl ↵ submit ↑↓ navigate ^k actions"
602
710
  `)
603
711
 
604
- // Submit form
605
- await driver.keys.escape()
606
- await driver.keys.cmdEnter()
712
+ await session.press('esc')
713
+ await session.press(['alt', 'enter'])
607
714
 
608
- const afterSubmitSnapshot = await driver.text({
715
+ const afterSubmitSnapshot = await session.text({
609
716
  waitFor: (text) => {
610
717
  return /Submitted Data/i.test(text)
611
718
  },
@@ -613,26 +720,28 @@ test('form dropdown with default value', async () => {
613
720
  expect(afterSubmitSnapshot).toMatchInlineSnapshot(`
614
721
  "
615
722
 
616
- Dropdown Component Demo
617
- Test dropdown with sections, multiple selection, and more featu
618
-
619
- Programming Languages
620
- TypeScript, Rust
621
-
622
- Frontend
623
- │ ● TypeScript
624
- ○ JavaScript
625
- │ ○ React
626
- Vue
627
- ↑↓ to see more options
628
-
629
- Choose your preferred programming languages
630
-
631
- Editor Theme
632
- │ Monokai
723
+
724
+ Dropdown Component Demo █
725
+ Test dropdown with sections, multiple selection, and more █
726
+ features █
727
+
728
+ ◆ Programming Languages █
729
+ Rust, TypeScript █
730
+ ┃ █
731
+ Frontend █
732
+ ┃› ● TypeScript █
733
+ JavaScript █
734
+ React █
735
+ ┃ ○ Vue █
736
+ ↑↓ to see more options █
737
+ ┃ █
738
+ Choose your preferred programming languages
739
+
740
+ ◇ Editor Theme
741
+ │ Dracula
633
742
 
634
- │› Monokai
635
- Dracula
743
+ │ ○ Monokai
744
+ Dracula
636
745
  │ ○ One Dark
637
746
  │ ○ Nord
638
747
  │ ↑↓ to see more options
@@ -646,39 +755,51 @@ test('form dropdown with default value', async () => {
646
755
  │ ○ High
647
756
  │ ○ Medium
648
757
  │ ○ Low
649
-
650
-
651
-
652
- ↵ submit ↑↓ navigate ^k actions"
758
+ ▪ Submitted Data
759
+ │ {
760
+ │ "languages": [
761
+ "rust",
762
+ │ "typescript"
763
+ │ ],
764
+ │ "theme": "dracula",
765
+ │ "priority": ""
766
+ │ }
767
+
768
+
769
+ ctrl ↵ submit ↑↓ navigate ^k actions"
653
770
  `)
654
771
  }, 10000)
655
772
 
656
773
  test('selecting second-to-last visible item should not scroll', async () => {
657
- await driver.text({
774
+ await session.text({
658
775
  waitFor: (text) => {
659
- // wait for form to show up
660
776
  return /Dropdown Component Demo/i.test(text)
661
777
  },
662
778
  })
663
779
 
664
- // Navigate down twice to get to Green (second-to-last visible item)
665
- await driver.keys.down()
666
- await driver.keys.down()
780
+ await session.press('down')
781
+ await session.press('down')
667
782
 
668
- const beforeSelectSnapshot = await driver.text()
783
+ const beforeSelectSnapshot = await session.text()
669
784
  expect(beforeSelectSnapshot).toMatchInlineSnapshot(`
670
785
  "
671
786
 
672
- Dropdown Component Demo
673
- │ Test dropdown with sections, multiple selection, and more featu
674
-
675
- ◆ Programming Languages
787
+
788
+
789
+
790
+
791
+
792
+ ■ Dropdown Component Demo
793
+ ┃ Test dropdown with sections, multiple selection, and more
794
+ ┃ features
795
+
796
+ ◇ Programming Languages
676
797
  │ TypeScript, Rust
677
798
 
678
799
  │ Frontend
679
800
  │ ● TypeScript
680
801
  │ ○ JavaScript
681
- │› ○ React
802
+ ○ React
682
803
  │ ○ Vue
683
804
  │ ↑↓ to see more options
684
805
 
@@ -705,26 +826,35 @@ test('selecting second-to-last visible item should not scroll', async () => {
705
826
 
706
827
 
707
828
 
708
- ↵ submit ↑↓ navigate ^k actions"
829
+
830
+
831
+
832
+
833
+ ctrl ↵ submit ↑↓ navigate ^k actions"
709
834
  `)
710
835
 
711
- // Press Enter to select Green
712
- await driver.keys.enter()
836
+ await session.press('enter')
713
837
 
714
- const afterSelectSnapshot = await driver.text()
838
+ const afterSelectSnapshot = await session.text()
715
839
  expect(afterSelectSnapshot).toMatchInlineSnapshot(`
716
840
  "
717
841
 
718
- Dropdown Component Demo
719
- │ Test dropdown with sections, multiple selection, and more featu
720
-
721
- ◆ Programming Languages
722
- │ TypeScript, Rust, React
842
+
843
+
844
+
845
+
846
+
847
+ ■ Dropdown Component Demo
848
+ ┃ Test dropdown with sections, multiple selection, and more
849
+ ┃ features
850
+
851
+ ◇ Programming Languages
852
+ │ TypeScript, Rust
723
853
 
724
854
  │ Frontend
725
855
  │ ● TypeScript
726
856
  │ ○ JavaScript
727
- │› React
857
+ │ ○ React
728
858
  │ ○ Vue
729
859
  │ ↑↓ to see more options
730
860
 
@@ -751,8 +881,10 @@ test('selecting second-to-last visible item should not scroll', async () => {
751
881
 
752
882
 
753
883
 
754
- ↵ submit ↑↓ navigate ^k actions"
755
- `)
756
884
 
757
- // The window should NOT have scrolled - should still show Red, Blue, Green, Yellow
885
+
886
+
887
+
888
+ ctrl ↵ submit ↑↓ navigate ^k actions"
889
+ `)
758
890
  }, 10000)