termcast 1.3.9 → 1.3.10

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 (228) 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.js +3 -3
  18. package/dist/apis/toast.js.map +1 -1
  19. package/dist/build.js +6 -6
  20. package/dist/build.js.map +1 -1
  21. package/dist/cli.js +2 -2
  22. package/dist/cli.js.map +1 -1
  23. package/dist/components/actions.d.ts +1 -1
  24. package/dist/components/actions.d.ts.map +1 -1
  25. package/dist/components/actions.js +7 -7
  26. package/dist/components/actions.js.map +1 -1
  27. package/dist/components/alert.js +4 -4
  28. package/dist/components/alert.js.map +1 -1
  29. package/dist/components/detail.d.ts +2 -2
  30. package/dist/components/detail.d.ts.map +1 -1
  31. package/dist/components/detail.js +5 -5
  32. package/dist/components/detail.js.map +1 -1
  33. package/dist/components/dropdown.d.ts +1 -1
  34. package/dist/components/dropdown.d.ts.map +1 -1
  35. package/dist/components/dropdown.js +4 -4
  36. package/dist/components/dropdown.js.map +1 -1
  37. package/dist/components/extension-preferences.js +5 -5
  38. package/dist/components/extension-preferences.js.map +1 -1
  39. package/dist/components/form/checkbox.js +2 -2
  40. package/dist/components/form/checkbox.js.map +1 -1
  41. package/dist/components/form/date-picker.js +3 -3
  42. package/dist/components/form/date-picker.js.map +1 -1
  43. package/dist/components/form/description.js +1 -1
  44. package/dist/components/form/description.js.map +1 -1
  45. package/dist/components/form/dropdown.js +4 -4
  46. package/dist/components/form/dropdown.js.map +1 -1
  47. package/dist/components/form/file-autocomplete.js +2 -2
  48. package/dist/components/form/file-autocomplete.js.map +1 -1
  49. package/dist/components/form/file-picker.js +2 -2
  50. package/dist/components/form/file-picker.js.map +1 -1
  51. package/dist/components/form/form-end.js +1 -1
  52. package/dist/components/form/form-end.js.map +1 -1
  53. package/dist/components/form/index.js +5 -5
  54. package/dist/components/form/index.js.map +1 -1
  55. package/dist/components/form/password-field.js +1 -1
  56. package/dist/components/form/password-field.js.map +1 -1
  57. package/dist/components/form/separator.js +1 -1
  58. package/dist/components/form/separator.js.map +1 -1
  59. package/dist/components/form/tagpicker.d.ts +1 -1
  60. package/dist/components/form/tagpicker.d.ts.map +1 -1
  61. package/dist/components/form/text-area.js +1 -1
  62. package/dist/components/form/text-area.js.map +1 -1
  63. package/dist/components/form/text-field.js +1 -1
  64. package/dist/components/form/text-field.js.map +1 -1
  65. package/dist/components/form/with-left-border.js +1 -1
  66. package/dist/components/form/with-left-border.js.map +1 -1
  67. package/dist/components/image.js +1 -1
  68. package/dist/components/image.js.map +1 -1
  69. package/dist/components/list.d.ts +1 -1
  70. package/dist/components/list.d.ts.map +1 -1
  71. package/dist/components/list.js +7 -7
  72. package/dist/components/list.js.map +1 -1
  73. package/dist/components/loading-bar.js +1 -1
  74. package/dist/components/loading-bar.js.map +1 -1
  75. package/dist/components/menubar-extra.d.ts +1 -1
  76. package/dist/components/menubar-extra.d.ts.map +1 -1
  77. package/dist/components/menubar-extra.js +2 -2
  78. package/dist/components/menubar-extra.js.map +1 -1
  79. package/dist/e2e-node.d.ts +2 -0
  80. package/dist/e2e-node.d.ts.map +1 -1
  81. package/dist/e2e-node.js +14 -0
  82. package/dist/e2e-node.js.map +1 -1
  83. package/dist/examples/action-show-in-finder.js +2 -2
  84. package/dist/examples/action-show-in-finder.js.map +1 -1
  85. package/dist/examples/environment-test.js +3 -3
  86. package/dist/examples/environment-test.js.map +1 -1
  87. package/dist/examples/error-boundary.js +4 -4
  88. package/dist/examples/error-boundary.js.map +1 -1
  89. package/dist/examples/form-basic.js +4 -4
  90. package/dist/examples/form-basic.js.map +1 -1
  91. package/dist/examples/form-basic.vitest.js +103 -103
  92. package/dist/examples/form-basic.vitest.js.map +1 -1
  93. package/dist/examples/form-dropdown.js +2 -2
  94. package/dist/examples/form-dropdown.js.map +1 -1
  95. package/dist/examples/form-dropdown.vitest.js +1 -1
  96. package/dist/examples/form-dropdown.vitest.js.map +1 -1
  97. package/dist/examples/form-tagpicker.js +2 -2
  98. package/dist/examples/form-tagpicker.js.map +1 -1
  99. package/dist/examples/form-tagpicker.vitest.js +1 -1
  100. package/dist/examples/form-tagpicker.vitest.js.map +1 -1
  101. package/dist/examples/internal/descendants-filtering.js +2 -2
  102. package/dist/examples/internal/descendants-filtering.js.map +1 -1
  103. package/dist/examples/internal/descendants.js +3 -3
  104. package/dist/examples/internal/descendants.js.map +1 -1
  105. package/dist/examples/internal/scrollbox-demo.js +1 -1
  106. package/dist/examples/internal/scrollbox-demo.js.map +1 -1
  107. package/dist/examples/internal/simple-dialog.js +6 -6
  108. package/dist/examples/internal/simple-dialog.js.map +1 -1
  109. package/dist/examples/internal/simple-scrollbox.d.ts +2 -0
  110. package/dist/examples/internal/simple-scrollbox.d.ts.map +1 -0
  111. package/dist/examples/internal/simple-scrollbox.js +26 -0
  112. package/dist/examples/internal/simple-scrollbox.js.map +1 -0
  113. package/dist/examples/internal/simple-scrollbox.vitest.d.ts +2 -0
  114. package/dist/examples/internal/simple-scrollbox.vitest.d.ts.map +1 -0
  115. package/dist/examples/internal/simple-scrollbox.vitest.js +88 -0
  116. package/dist/examples/internal/simple-scrollbox.vitest.js.map +1 -0
  117. package/dist/examples/list-dropdown-default.js +2 -2
  118. package/dist/examples/list-dropdown-default.js.map +1 -1
  119. package/dist/examples/list-dropdown-default.vitest.js +1 -1
  120. package/dist/examples/list-dropdown-default.vitest.js.map +1 -1
  121. package/dist/examples/list-fetch-data.js +2 -2
  122. package/dist/examples/list-fetch-data.js.map +1 -1
  123. package/dist/examples/list-fetch-data.vitest.js +1 -1
  124. package/dist/examples/list-fetch-data.vitest.js.map +1 -1
  125. package/dist/examples/list-with-detail.js +1 -1
  126. package/dist/examples/list-with-detail.js.map +1 -1
  127. package/dist/examples/list-with-detail.vitest.js +1 -1
  128. package/dist/examples/list-with-detail.vitest.js.map +1 -1
  129. package/dist/examples/list-with-dropdown.js +1 -1
  130. package/dist/examples/list-with-dropdown.js.map +1 -1
  131. package/dist/examples/list-with-dropdown.vitest.js +1 -1
  132. package/dist/examples/list-with-dropdown.vitest.js.map +1 -1
  133. package/dist/examples/list-with-sections.js +3 -3
  134. package/dist/examples/list-with-sections.js.map +1 -1
  135. package/dist/examples/list-with-sections.vitest.js +1 -1
  136. package/dist/examples/list-with-sections.vitest.js.map +1 -1
  137. package/dist/examples/miscellaneous.js +13 -13
  138. package/dist/examples/miscellaneous.js.map +1 -1
  139. package/dist/examples/nested-navigation.js +5 -5
  140. package/dist/examples/nested-navigation.js.map +1 -1
  141. package/dist/examples/preferences-test.js +3 -3
  142. package/dist/examples/preferences-test.js.map +1 -1
  143. package/dist/examples/simple-dropdown.js +3 -3
  144. package/dist/examples/simple-dropdown.js.map +1 -1
  145. package/dist/examples/simple-file-picker.js +2 -2
  146. package/dist/examples/simple-file-picker.js.map +1 -1
  147. package/dist/examples/simple-file-picker.vitest.js +26 -26
  148. package/dist/examples/simple-file-picker.vitest.js.map +1 -1
  149. package/dist/examples/simple-grid.js +1 -1
  150. package/dist/examples/simple-grid.js.map +1 -1
  151. package/dist/examples/simple-grid.vitest.js +1 -1
  152. package/dist/examples/simple-grid.vitest.js.map +1 -1
  153. package/dist/examples/simple-hud.js +3 -3
  154. package/dist/examples/simple-hud.js.map +1 -1
  155. package/dist/examples/simple-list-search.js +20 -4
  156. package/dist/examples/simple-list-search.js.map +1 -1
  157. package/dist/examples/simple-list.js +3 -3
  158. package/dist/examples/simple-list.js.map +1 -1
  159. package/dist/examples/simple-navigation.js +5 -5
  160. package/dist/examples/simple-navigation.js.map +1 -1
  161. package/dist/examples/simple-navigation.vitest.js +1 -1
  162. package/dist/examples/simple-navigation.vitest.js.map +1 -1
  163. package/dist/examples/store.vitest.js +1 -5
  164. package/dist/examples/store.vitest.js.map +1 -1
  165. package/dist/examples/tanstack-demo.js +2 -2
  166. package/dist/examples/tanstack-demo.js.map +1 -1
  167. package/dist/examples/use-promise-demo.js +2 -2
  168. package/dist/examples/use-promise-demo.js.map +1 -1
  169. package/dist/extensions/dev.js +7 -7
  170. package/dist/extensions/dev.js.map +1 -1
  171. package/dist/extensions/home.js +8 -8
  172. package/dist/extensions/home.js.map +1 -1
  173. package/dist/extensions/store.js +2 -2
  174. package/dist/extensions/store.js.map +1 -1
  175. package/dist/globals.js +1 -1
  176. package/dist/globals.js.map +1 -1
  177. package/dist/hooks/index.d.ts +1 -1
  178. package/dist/hooks/index.d.ts.map +1 -1
  179. package/dist/hooks/index.js +1 -1
  180. package/dist/hooks/index.js.map +1 -1
  181. package/dist/hooks/use-action-panel.js +1 -1
  182. package/dist/hooks/use-action-panel.js.map +1 -1
  183. package/dist/hooks/use-unstable-ai.js +1 -1
  184. package/dist/hooks/use-unstable-ai.js.map +1 -1
  185. package/dist/index.d.ts +55 -55
  186. package/dist/index.d.ts.map +1 -1
  187. package/dist/index.js +38 -38
  188. package/dist/index.js.map +1 -1
  189. package/dist/internal/dialog.d.ts +3 -3
  190. package/dist/internal/dialog.d.ts.map +1 -1
  191. package/dist/internal/dialog.js +3 -3
  192. package/dist/internal/dialog.js.map +1 -1
  193. package/dist/internal/error-handler.js +2 -2
  194. package/dist/internal/error-handler.js.map +1 -1
  195. package/dist/internal/focus-context.d.ts +1 -1
  196. package/dist/internal/focus-context.d.ts.map +1 -1
  197. package/dist/internal/navigation.d.ts +1 -1
  198. package/dist/internal/navigation.d.ts.map +1 -1
  199. package/dist/internal/navigation.js +2 -2
  200. package/dist/internal/navigation.js.map +1 -1
  201. package/dist/internal/providers.d.ts +2 -2
  202. package/dist/internal/providers.d.ts.map +1 -1
  203. package/dist/internal/providers.js +9 -9
  204. package/dist/internal/providers.js.map +1 -1
  205. package/dist/internal/scrollbox.d.ts +11 -0
  206. package/dist/internal/scrollbox.d.ts.map +1 -0
  207. package/dist/internal/scrollbox.js +28 -0
  208. package/dist/internal/scrollbox.js.map +1 -0
  209. package/dist/preload.js +1 -1
  210. package/dist/preload.js.map +1 -1
  211. package/dist/utils.js +2 -2
  212. package/dist/utils.js.map +1 -1
  213. package/package.json +4 -2
  214. package/src/e2e-node.tsx +16 -0
  215. package/src/examples/form-basic.vitest.tsx +102 -102
  216. package/src/examples/internal/simple-scrollbox.tsx +55 -0
  217. package/src/examples/internal/simple-scrollbox.vitest.tsx +94 -0
  218. package/src/examples/nested-navigation.tsx +3 -3
  219. package/src/examples/simple-file-picker.vitest.tsx +25 -25
  220. package/src/examples/simple-list-search.tsx +41 -0
  221. package/src/examples/simple-navigation.tsx +3 -3
  222. package/src/examples/store.vitest.tsx +0 -4
  223. package/src/extensions/dev.tsx +2 -2
  224. package/src/extensions/home.tsx +3 -3
  225. package/src/index.tsx +6 -25
  226. package/src/internal/providers.tsx +1 -1
  227. package/src/internal/scrollbox.tsx +53 -0
  228. package/src/utils.tsx +2 -2
@@ -70,14 +70,14 @@ test('form basic navigation and input', async () => {
70
70
  ◇ Date of Birth
71
71
 
72
72
  │ ← 2025 →
73
- │ ← September
73
+ │ ← October
74
74
 
75
75
  │ Mo Tu We Th Fr Sa Su
76
- 1 2 3 4 5 6 7
77
- │ 8 9 10 11 12 13 14
78
- │ 15 16 17 18 19 20 21
79
- │ 22 23 24 25 26 27 28
80
- │ 29 30"
76
+ 1 2 3 4 5
77
+ 6 7 8 9 10 11 12
78
+ 13 14 15 16 17 18 19
79
+ 20 21 22 23 24 25 26
80
+ 27 28 29 30 31"
81
81
  `)
82
82
 
83
83
  // Type in username field
@@ -127,14 +127,14 @@ test('form basic navigation and input', async () => {
127
127
  ◇ Date of Birth
128
128
 
129
129
  │ ← 2025 →
130
- │ ← September
130
+ │ ← October
131
131
 
132
132
  │ Mo Tu We Th Fr Sa Su
133
- 1 2 3 4 5 6 7
134
- │ 8 9 10 11 12 13 14
135
- │ 15 16 17 18 19 20 21
136
- │ 22 23 24 25 26 27 28
137
- │ 29 30"
133
+ 1 2 3 4 5
134
+ 6 7 8 9 10 11 12
135
+ 13 14 15 16 17 18 19
136
+ 20 21 22 23 24 25 26
137
+ 27 28 29 30 31"
138
138
  `)
139
139
 
140
140
  // Tab to password field
@@ -185,14 +185,14 @@ test('form basic navigation and input', async () => {
185
185
  ◇ Date of Birth
186
186
 
187
187
  │ ← 2025 →
188
- │ ← September
188
+ │ ← October
189
189
 
190
190
  │ Mo Tu We Th Fr Sa Su
191
- 1 2 3 4 5 6 7
192
- │ 8 9 10 11 12 13 14
193
- │ 15 16 17 18 19 20 21
194
- │ 22 23 24 25 26 27 28
195
- │ 29 30"
191
+ 1 2 3 4 5
192
+ 6 7 8 9 10 11 12
193
+ 13 14 15 16 17 18 19
194
+ 20 21 22 23 24 25 26
195
+ 27 28 29 30 31"
196
196
  `)
197
197
 
198
198
  // Tab to biography field
@@ -243,14 +243,14 @@ test('form basic navigation and input', async () => {
243
243
  ◇ Date of Birth
244
244
 
245
245
  │ ← 2025 →
246
- │ ← September
246
+ │ ← October
247
247
 
248
248
  │ Mo Tu We Th Fr Sa Su
249
- 1 2 3 4 5 6 7
250
- │ 8 9 10 11 12 13 14
251
- │ 15 16 17 18 19 20 21
252
- │ 22 23 24 25 26 27 28
253
- │ 29 30"
249
+ 1 2 3 4 5
250
+ 6 7 8 9 10 11 12
251
+ 13 14 15 16 17 18 19
252
+ 20 21 22 23 24 25 26
253
+ 27 28 29 30 31"
254
254
  `)
255
255
 
256
256
  // Tab to newsletter checkbox and toggle it
@@ -301,14 +301,14 @@ test('form basic navigation and input', async () => {
301
301
  ◇ Date of Birth
302
302
 
303
303
  │ ← 2025 →
304
- │ ← September
304
+ │ ← October
305
305
 
306
306
  │ Mo Tu We Th Fr Sa Su
307
- 1 2 3 4 5 6 7
308
- │ 8 9 10 11 12 13 14
309
- │ 15 16 17 18 19 20 21
310
- │ 22 23 24 25 26 27 28
311
- │ 29 30"
307
+ 1 2 3 4 5
308
+ 6 7 8 9 10 11 12
309
+ 13 14 15 16 17 18 19
310
+ 20 21 22 23 24 25 26
311
+ 27 28 29 30 31"
312
312
  `)
313
313
 
314
314
  // Tab to country dropdown and select United States
@@ -359,14 +359,14 @@ test('form basic navigation and input', async () => {
359
359
  ◇ Date of Birth
360
360
 
361
361
  │ ← 2025 →
362
- │ ← September
362
+ │ ← October
363
363
 
364
364
  │ Mo Tu We Th Fr Sa Su
365
- 1 2 3 4 5 6 7
366
- │ 8 9 10 11 12 13 14
367
- │ 15 16 17 18 19 20 21
368
- │ 22 23 24 25 26 27 28
369
- │ 29 30"
365
+ 1 2 3 4 5
366
+ 6 7 8 9 10 11 12
367
+ 13 14 15 16 17 18 19
368
+ 20 21 22 23 24 25 26
369
+ 27 28 29 30 31"
370
370
  `)
371
371
 
372
372
  // Select United States
@@ -416,14 +416,14 @@ test('form basic navigation and input', async () => {
416
416
  ◇ Date of Birth
417
417
 
418
418
  │ ← 2025 →
419
- │ ← September
419
+ │ ← October
420
420
 
421
421
  │ Mo Tu We Th Fr Sa Su
422
- 1 2 3 4 5 6 7
423
- │ 8 9 10 11 12 13 14
424
- │ 15 16 17 18 19 20 21
425
- │ 22 23 24 25 26 27 28
426
- │ 29 30"
422
+ 1 2 3 4 5
423
+ 6 7 8 9 10 11 12
424
+ 13 14 15 16 17 18 19
425
+ 20 21 22 23 24 25 26
426
+ 27 28 29 30 31"
427
427
  `)
428
428
 
429
429
  // Tab to date picker
@@ -474,14 +474,14 @@ test('form basic navigation and input', async () => {
474
474
  ◆ Date of Birth
475
475
 
476
476
  │ ← 2025 →
477
- │ ← September
477
+ │ ← October
478
478
 
479
479
  │ Mo Tu We Th Fr Sa Su
480
- 1 2 3 4 5 6 7
481
- │ 8 9 10 11 12 13 14
482
- │ 15 16 17 18 19 20 21
483
- │ 22 23 24 25 26 27 28
484
- │ 29 30"
480
+ 1 2 3 4 5
481
+ 6 7 8 9 10 11 12
482
+ 13 14 15 16 17 18 19
483
+ 20 21 22 23 24 25 26
484
+ 27 28 29 30 31"
485
485
  `)
486
486
 
487
487
  // Submit form with Cmd+Enter
@@ -536,14 +536,14 @@ test('form basic navigation and input', async () => {
536
536
  ◆ Date of Birth
537
537
 
538
538
  │ ← 2025 →
539
- │ ← September
539
+ │ ← October
540
540
 
541
541
  │ Mo Tu We Th Fr Sa Su
542
- 1 2 3 4 5 6 7
543
- │ 8 9 10 11 12 13 14
544
- │ 15 16 17 18 19 20 21
545
- │ 22 23 24 25 26 27 28
546
- │ 29 30"
542
+ 1 2 3 4 5
543
+ 6 7 8 9 10 11 12
544
+ 13 14 15 16 17 18 19
545
+ 20 21 22 23 24 25 26
546
+ 27 28 29 30 31"
547
547
  `)
548
548
  }, 15000)
549
549
 
@@ -605,14 +605,14 @@ test('form navigation with shift+tab', async () => {
605
605
  ◇ Date of Birth
606
606
 
607
607
  │ ← 2025 →
608
- │ ← September
608
+ │ ← October
609
609
 
610
610
  │ Mo Tu We Th Fr Sa Su
611
- 1 2 3 4 5 6 7
612
- │ 8 9 10 11 12 13 14
613
- │ 15 16 17 18 19 20 21
614
- │ 22 23 24 25 26 27 28
615
- │ 29 30"
611
+ 1 2 3 4 5
612
+ 6 7 8 9 10 11 12
613
+ 13 14 15 16 17 18 19
614
+ 20 21 22 23 24 25 26
615
+ 27 28 29 30 31"
616
616
  `)
617
617
 
618
618
  // Navigate backwards with Shift+Tab
@@ -662,14 +662,14 @@ test('form navigation with shift+tab', async () => {
662
662
  ◇ Date of Birth
663
663
 
664
664
  │ ← 2025 →
665
- │ ← September
665
+ │ ← October
666
666
 
667
667
  │ Mo Tu We Th Fr Sa Su
668
- 1 2 3 4 5 6 7
669
- │ 8 9 10 11 12 13 14
670
- │ 15 16 17 18 19 20 21
671
- │ 22 23 24 25 26 27 28
672
- │ 29 30"
668
+ 1 2 3 4 5
669
+ 6 7 8 9 10 11 12
670
+ 13 14 15 16 17 18 19
671
+ 20 21 22 23 24 25 26
672
+ 27 28 29 30 31"
673
673
  `)
674
674
 
675
675
  // Go back to username field
@@ -719,14 +719,14 @@ test('form navigation with shift+tab', async () => {
719
719
  ◇ Date of Birth
720
720
 
721
721
  │ ← 2025 →
722
- │ ← September
722
+ │ ← October
723
723
 
724
724
  │ Mo Tu We Th Fr Sa Su
725
- 1 2 3 4 5 6 7
726
- │ 8 9 10 11 12 13 14
727
- │ 15 16 17 18 19 20 21
728
- │ 22 23 24 25 26 27 28
729
- │ 29 30"
725
+ 1 2 3 4 5
726
+ 6 7 8 9 10 11 12
727
+ 13 14 15 16 17 18 19
728
+ 20 21 22 23 24 25 26
729
+ 27 28 29 30 31"
730
730
  `)
731
731
 
732
732
  // Clear and type new username
@@ -777,14 +777,14 @@ test('form navigation with shift+tab', async () => {
777
777
  ◇ Date of Birth
778
778
 
779
779
  │ ← 2025 →
780
- │ ← September
780
+ │ ← October
781
781
 
782
782
  │ Mo Tu We Th Fr Sa Su
783
- 1 2 3 4 5 6 7
784
- │ 8 9 10 11 12 13 14
785
- │ 15 16 17 18 19 20 21
786
- │ 22 23 24 25 26 27 28
787
- │ 29 30"
783
+ 1 2 3 4 5
784
+ 6 7 8 9 10 11 12
785
+ 13 14 15 16 17 18 19
786
+ 20 21 22 23 24 25 26
787
+ 27 28 29 30 31"
788
788
  `)
789
789
  }, 10000)
790
790
 
@@ -850,14 +850,14 @@ test('form dropdown navigation', async () => {
850
850
  ◆ Date of Birth
851
851
 
852
852
  │ ← 2025 →
853
- │ ← September
853
+ │ ← October
854
854
 
855
855
  │ Mo Tu We Th Fr Sa Su
856
- 1 2 3 4 5 6 7
857
- │ 8 9 10 11 12 13 14
858
- │ 15 16 17 18 19 20 21
859
- │ 22 23 24 25 26 27 28
860
- │ 29 30"
856
+ 1 2 3 4 5
857
+ 6 7 8 9 10 11 12
858
+ 13 14 15 16 17 18 19
859
+ 20 21 22 23 24 25 26
860
+ 27 28 29 30 31"
861
861
  `)
862
862
 
863
863
  // Navigate down in dropdown
@@ -907,14 +907,14 @@ test('form dropdown navigation', async () => {
907
907
  ◆ Date of Birth
908
908
 
909
909
  │ ← 2025 →
910
- │ ← September
910
+ │ ← October
911
911
 
912
912
  │ Mo Tu We Th Fr Sa Su
913
- 1 2 3 4 5 6 7
914
- │ 8 9 10 11 12 13 14
915
- │ 15 16 17 18 19 20 21
916
- │ 22 23 24 25 26 27 28
917
- │ 29 30"
913
+ 1 2 3 4 5
914
+ 6 7 8 9 10 11 12
915
+ 13 14 15 16 17 18 19
916
+ 20 21 22 23 24 25 26
917
+ 27 28 29 30 31"
918
918
  `)
919
919
 
920
920
  // Navigate to Europe section
@@ -966,14 +966,14 @@ test('form dropdown navigation', async () => {
966
966
  ◆ Date of Birth
967
967
 
968
968
  │ ← 2025 →
969
- │ ← September
969
+ │ ← October
970
970
 
971
971
  │ Mo Tu We Th Fr Sa Su
972
- 1 2 3 4 5 6 7
973
- │ 8 9 10 11 12 13 14
974
- │ 15 16 17 18 19 20 21
975
- │ 22 23 24 25 26 27 28
976
- │ 29 30"
972
+ 1 2 3 4 5
973
+ 6 7 8 9 10 11 12
974
+ 13 14 15 16 17 18 19
975
+ 20 21 22 23 24 25 26
976
+ 27 28 29 30 31"
977
977
  `)
978
978
 
979
979
  // Select France
@@ -1023,13 +1023,13 @@ test('form dropdown navigation', async () => {
1023
1023
  ◆ Date of Birth
1024
1024
 
1025
1025
  │ ← 2025 →
1026
- │ ← September
1026
+ │ ← October
1027
1027
 
1028
1028
  │ Mo Tu We Th Fr Sa Su
1029
- 1 2 3 4 5 6 7
1030
- │ 8 9 10 11 12 13 14
1031
- │ 15 16 17 18 19 20 21
1032
- │ 22 23 24 25 26 27 28
1033
- │ 29 30"
1029
+ 1 2 3 4 5
1030
+ 6 7 8 9 10 11 12
1031
+ 13 14 15 16 17 18 19
1032
+ 20 21 22 23 24 25 26
1033
+ 27 28 29 30 31"
1034
1034
  `)
1035
1035
  }, 10000)
@@ -0,0 +1,55 @@
1
+ import React from 'react'
2
+ import { renderWithProviders } from 'termcast'
3
+ import { useKeyboard } from '@opentui/react'
4
+ import { fg, bold } from '@opentui/core'
5
+ import { ScrollBox } from 'termcast/src/internal/scrollbox'
6
+
7
+ function SimpleScrollBoxDemo(): any {
8
+ useKeyboard((evt) => {
9
+ if (evt.name === 'q' || evt.name === 'escape') {
10
+ process.exit(0)
11
+ }
12
+ })
13
+
14
+ const colors = [
15
+ '#e06c75',
16
+ '#98c379',
17
+ '#e5c07b',
18
+ '#61afef',
19
+ '#c678dd',
20
+ '#56b6c2',
21
+ '#abb2bf',
22
+ ]
23
+
24
+ return (
25
+ <box flexDirection="column" width="100%" height="100%">
26
+ <box padding={1} backgroundColor="#282c34">
27
+ <text>{bold(fg('#61afef')('Simple ScrollBox Demo'))}</text>
28
+ </box>
29
+
30
+ <ScrollBox focused flexGrow={1} flexShrink={1}>
31
+ {Array.from({ length: 30 }, (_, i) => (
32
+ <box
33
+ key={i}
34
+ padding={1}
35
+ backgroundColor={colors[i % colors.length]}
36
+ marginBottom={1}
37
+ >
38
+ <text fg="#282c34">
39
+ {bold(`Item ${i + 1}`)} - This is content for item number {i + 1}.
40
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit.
41
+ </text>
42
+ </box>
43
+ ))}
44
+ </ScrollBox>
45
+
46
+ <box padding={1} backgroundColor="#282c34">
47
+ <text fg="#abb2bf">Use mouse scroll or arrow keys | Press [q] to quit</text>
48
+ </box>
49
+ </box>
50
+ )
51
+ }
52
+
53
+ if (import.meta.main) {
54
+ renderWithProviders(<SimpleScrollBoxDemo />)
55
+ }
@@ -0,0 +1,94 @@
1
+ import { expect, test } from 'vitest'
2
+ import { NodeTuiDriver } from 'termcast/src/e2e-node'
3
+
4
+ test('simple scrollbox navigation and scrolling', async () => {
5
+ const driver = new NodeTuiDriver('bun', ['src/examples/internal/simple-scrollbox.tsx'])
6
+
7
+ await driver.text({
8
+ waitFor: (text) => text.includes('Simple ScrollBox Demo'),
9
+ })
10
+
11
+ const initialText = await driver.text()
12
+ expect(initialText).toMatchInlineSnapshot(`
13
+ "
14
+
15
+
16
+ Simple ScrollBox Demo
17
+
18
+
19
+ Item 1 - This is content for item number 1. Lorem ipsum dolor sit amet, cons
20
+
21
+
22
+
23
+ Item 2 - This is content for item number 2. Lorem ipsum dolor sit amet, cons
24
+
25
+
26
+
27
+ Item 3 - This is content for item number 3. Lorem ipsum dolor sit amet, cons
28
+
29
+
30
+
31
+ Item 4 - This is content for item number 4. Lorem ipsum dolor sit amet, cons
32
+
33
+
34
+
35
+ Item 5 - This is content for item number 5. Lorem ipsum dolor sit amet, cons"
36
+ `)
37
+
38
+ await driver.scrollDown(3)
39
+ const afterScrollDown = await driver.text()
40
+ expect(afterScrollDown).toMatchInlineSnapshot(`
41
+ "
42
+
43
+
44
+ Simple ScrollBox Demo
45
+
46
+
47
+
48
+
49
+ Item 2 - This is content for item number 2. Lorem ipsum dolor sit amet, cons
50
+
51
+
52
+
53
+ Item 3 - This is content for item number 3. Lorem ipsum dolor sit amet, cons
54
+
55
+
56
+
57
+ Item 4 - This is content for item number 4. Lorem ipsum dolor sit amet, cons
58
+
59
+
60
+
61
+ Item 5 - This is content for item number 5. Lorem ipsum dolor sit amet, cons"
62
+ `)
63
+
64
+ await driver.scrollUp(2)
65
+ const afterScrollUp = await driver.text()
66
+ expect(afterScrollUp).toMatchInlineSnapshot(`
67
+ "
68
+
69
+
70
+ Simple ScrollBox Demo
71
+
72
+ Item 1 - This is content for item number 1. Lorem ipsum dolor sit amet, cons
73
+
74
+
75
+
76
+ Item 2 - This is content for item number 2. Lorem ipsum dolor sit amet, cons
77
+
78
+
79
+
80
+ Item 3 - This is content for item number 3. Lorem ipsum dolor sit amet, cons
81
+
82
+
83
+
84
+ Item 4 - This is content for item number 4. Lorem ipsum dolor sit amet, cons
85
+
86
+
87
+
88
+ Item 5 - This is content for item number 5. Lorem ipsum dolor sit amet, cons"
89
+ `)
90
+
91
+ await driver.keys.escape()
92
+
93
+ driver.dispose()
94
+ }, 30000)
@@ -3,7 +3,7 @@ import { render } from '@opentui/react'
3
3
  import List from 'termcast'
4
4
  import { Action, ActionPanel } from 'termcast'
5
5
  import { useNavigation } from 'termcast/src/internal/navigation'
6
- import { Providers } from 'termcast/src/internal/providers'
6
+ import { TermcastProvider } from 'termcast/src/internal/providers'
7
7
 
8
8
  function ThirdLevel({ path }: { path: string[] }): any {
9
9
  const { pop } = useNavigation()
@@ -109,9 +109,9 @@ function FirstLevel(): any {
109
109
 
110
110
  function App(): any {
111
111
  return (
112
- <Providers>
112
+ <TermcastProvider>
113
113
  <FirstLevel />
114
- </Providers>
114
+ </TermcastProvider>
115
115
  )
116
116
  }
117
117
 
@@ -26,7 +26,7 @@ test('file picker with autocomplete', async () => {
26
26
  expect(initialSnapshot).toMatchInlineSnapshot(`
27
27
  "
28
28
 
29
- Your Name
29
+ Your Name
30
30
  │ John Doe
31
31
  ◇ Select Files
32
32
  │ Enter file path...
@@ -156,16 +156,16 @@ test('file picker with autocomplete', async () => {
156
156
  ◆ Select Folder
157
157
  │ /tmp/
158
158
  │ ┌─────────────────────────────────────────────────────────────┐
159
- │ │ 📁 bunx-501-@alignui
160
- SelectuSingle-Fileeya
161
- Enterbfile5path...elcontextprotocol
162
- Chooseuexactly@onecfile
163
- │ │ bunx-501-npkill@latest
164
- └ │ 📁 com.apple.launchd.D0VRoDoOHk
165
- │ 📁 com.apple.launchd.i00Yz9AggD
166
- node-compile-cache
167
- submitode↑↓inavigate───^k─actions─────────────────────────────┘
168
- 📁 powerlog"
159
+ │ │ 📁 bunx-501-create-tui@latest
160
+ SelectoSingleeFilenchd.dhqoLtU5Bo
161
+ Enternfilecpath...cache
162
+ Chooseoexactly one file
163
+ │ │ tmp-mount-4o6LgO
164
+ └ │ 📁 tmp-mount-oUF2pm
165
+ │ 📁 tmp-mount-qehfhV
166
+ tmp-mount-V0riCs
167
+ submitdob↑↓Pnavigatelog^k─actions─────────────────────────────┘
168
+ 📄 com.adobe.AdobeIPCBroker.ctrl-morse"
169
169
  `)
170
170
 
171
171
  // Test ~ home directory expansion
@@ -225,16 +225,16 @@ test('file picker keyboard navigation', async () => {
225
225
 
226
226
  ◇ Your Name
227
227
  │ John Doe
228
- Select Files
229
- │ Enter file path...
230
- │ Choose one or more files to upload
231
-
232
- ◆ Select Folder
228
+ Select Files
233
229
  │ .
234
230
  │ ┌─────────────────────────────────────────────────────────────┐
235
231
  │ │ 📁 .termcast-bundle │
236
- SelectgSinglerFile
232
+ SelectgFolderre
237
233
  │ Enter─file─path...────────────────────────────────────────────┘
234
+ │ Choose a folder for output
235
+
236
+ ◇ Select Single File
237
+ │ Enter file path...
238
238
  │ Choose exactly one file
239
239
 
240
240
 
@@ -252,12 +252,12 @@ test('file picker keyboard navigation', async () => {
252
252
 
253
253
  ◇ Your Name
254
254
  │ John Doe
255
- Select Files
256
- Enter file path...
255
+ Select Files
256
+ .
257
257
  │ Choose one or more files to upload
258
258
 
259
- Select Folder
260
- .
259
+ Select Folder
260
+ Enter file path...
261
261
  │ Choose a folder for output
262
262
 
263
263
  ◇ Select Single File
@@ -286,12 +286,12 @@ test('file picker keyboard navigation', async () => {
286
286
 
287
287
  ◇ Your Name
288
288
  │ John Doe
289
- Select Files
290
- Enter file path...
289
+ Select Files
290
+ .s
291
291
  │ Choose one or more files to upload
292
292
 
293
- Select Folder
294
- .s
293
+ Select Folder
294
+ Enter file path...
295
295
  │ Choose a folder for output
296
296
 
297
297
  ◇ Select Single File
@@ -39,6 +39,47 @@ const App: any = () => {
39
39
  keywords={['second', 'two', 'secondary']}
40
40
  id='item2'
41
41
  />
42
+ {Array.from({ length: 100 }).map((_, i) => (
43
+ <List.Item
44
+ key={`random${i + 1}`}
45
+ title={`Random Item #${i + 1}`}
46
+ subtitle={`This is randomly generated item ${i + 1}`}
47
+ keywords={[
48
+ `random`,
49
+ `${(i + 1) * 7}`,
50
+ `foo${(i % 5) + 1}`,
51
+ `bar${Math.floor(Math.random() * 50)}`,
52
+ ]}
53
+ id={`random-item-${i + 1}`}
54
+ actions={
55
+ i % 3 === 0 ? (
56
+ <ActionPanel>
57
+ <Action
58
+ title='Show Details'
59
+ onAction={() =>
60
+ push(
61
+ <Detail
62
+ markdown={dedent`
63
+ # Random Item #${i + 1}
64
+
65
+ This is a dynamically generated random item.
66
+
67
+ - **Index:** ${i + 1}
68
+ - **Random Keyword:** bar${Math.floor(Math.random() * 99)}
69
+ - **UUID:** random-item-${i + 1}
70
+
71
+ ---
72
+ _Fun fact: Number ${((i + 1) * 13) % 97} is "randomized"!_
73
+ `}
74
+ />,
75
+ )
76
+ }
77
+ />
78
+ </ActionPanel>
79
+ ) : undefined
80
+ }
81
+ />
82
+ ))}
42
83
  <List.Item
43
84
  title='Third Item'
44
85
  subtitle='This is the third item'
@@ -3,7 +3,7 @@ import { render } from '@opentui/react'
3
3
  import List from 'termcast'
4
4
  import { Action, ActionPanel } from 'termcast'
5
5
  import { useNavigation } from 'termcast/src/internal/navigation'
6
- import { Providers } from 'termcast/src/internal/providers'
6
+ import { TermcastProvider } from 'termcast/src/internal/providers'
7
7
 
8
8
  function DetailView({ title }: { title: string }): any {
9
9
  const { pop } = useNavigation()
@@ -80,9 +80,9 @@ function MainView(): any {
80
80
 
81
81
  function App(): any {
82
82
  return (
83
- <Providers>
83
+ <TermcastProvider>
84
84
  <MainView />
85
- </Providers>
85
+ </TermcastProvider>
86
86
  )
87
87
  }
88
88