termcast 1.3.32 → 1.3.34

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 (327) hide show
  1. package/dist/action-utils.d.ts.map +1 -1
  2. package/dist/action-utils.js +8 -0
  3. package/dist/action-utils.js.map +1 -1
  4. package/dist/apis/cache.d.ts +1 -2
  5. package/dist/apis/cache.d.ts.map +1 -1
  6. package/dist/apis/cache.js +138 -54
  7. package/dist/apis/cache.js.map +1 -1
  8. package/dist/apis/clipboard.d.ts.map +1 -1
  9. package/dist/apis/clipboard.js +4 -0
  10. package/dist/apis/clipboard.js.map +1 -1
  11. package/dist/apis/oauth.d.ts.map +1 -1
  12. package/dist/apis/oauth.js +31 -4
  13. package/dist/apis/oauth.js.map +1 -1
  14. package/dist/build.d.ts +0 -1
  15. package/dist/build.d.ts.map +1 -1
  16. package/dist/build.js +30 -51
  17. package/dist/build.js.map +1 -1
  18. package/dist/cli.js +31 -14
  19. package/dist/cli.js.map +1 -1
  20. package/dist/compile.d.ts.map +1 -1
  21. package/dist/compile.js +5 -1
  22. package/dist/compile.js.map +1 -1
  23. package/dist/components/actions.d.ts +14 -0
  24. package/dist/components/actions.d.ts.map +1 -1
  25. package/dist/components/actions.js +151 -59
  26. package/dist/components/actions.js.map +1 -1
  27. package/dist/components/alert.d.ts.map +1 -1
  28. package/dist/components/alert.js +6 -5
  29. package/dist/components/alert.js.map +1 -1
  30. package/dist/components/animation-tick.d.ts +1 -1
  31. package/dist/components/animation-tick.js +1 -1
  32. package/dist/components/animation-tick.js.map +1 -1
  33. package/dist/components/detail.d.ts +5 -31
  34. package/dist/components/detail.d.ts.map +1 -1
  35. package/dist/components/detail.js +36 -52
  36. package/dist/components/detail.js.map +1 -1
  37. package/dist/components/dropdown.d.ts +1 -1
  38. package/dist/components/dropdown.d.ts.map +1 -1
  39. package/dist/components/dropdown.js +50 -22
  40. package/dist/components/dropdown.js.map +1 -1
  41. package/dist/components/footer.d.ts.map +1 -1
  42. package/dist/components/footer.js +19 -18
  43. package/dist/components/footer.js.map +1 -1
  44. package/dist/components/form/checkbox.d.ts.map +1 -1
  45. package/dist/components/form/checkbox.js +12 -11
  46. package/dist/components/form/checkbox.js.map +1 -1
  47. package/dist/components/form/date-picker.d.ts.map +1 -1
  48. package/dist/components/form/date-picker.js +7 -22
  49. package/dist/components/form/date-picker.js.map +1 -1
  50. package/dist/components/form/description.d.ts +1 -1
  51. package/dist/components/form/description.d.ts.map +1 -1
  52. package/dist/components/form/description.js +6 -5
  53. package/dist/components/form/description.js.map +1 -1
  54. package/dist/components/form/dropdown.d.ts.map +1 -1
  55. package/dist/components/form/dropdown.js +53 -50
  56. package/dist/components/form/dropdown.js.map +1 -1
  57. package/dist/components/form/file-autocomplete.d.ts.map +1 -1
  58. package/dist/components/form/file-autocomplete.js +5 -4
  59. package/dist/components/form/file-autocomplete.js.map +1 -1
  60. package/dist/components/form/file-picker.d.ts.map +1 -1
  61. package/dist/components/form/file-picker.js +23 -22
  62. package/dist/components/form/file-picker.js.map +1 -1
  63. package/dist/components/form/form-end.d.ts.map +1 -1
  64. package/dist/components/form/form-end.js +6 -4
  65. package/dist/components/form/form-end.js.map +1 -1
  66. package/dist/components/form/form-field-wrapper.d.ts +15 -0
  67. package/dist/components/form/form-field-wrapper.d.ts.map +1 -0
  68. package/dist/components/form/form-field-wrapper.js +29 -0
  69. package/dist/components/form/form-field-wrapper.js.map +1 -0
  70. package/dist/components/form/index.d.ts.map +1 -1
  71. package/dist/components/form/index.js +31 -30
  72. package/dist/components/form/index.js.map +1 -1
  73. package/dist/components/form/password-field.d.ts.map +1 -1
  74. package/dist/components/form/password-field.js +7 -6
  75. package/dist/components/form/password-field.js.map +1 -1
  76. package/dist/components/form/separator.d.ts.map +1 -1
  77. package/dist/components/form/separator.js +3 -2
  78. package/dist/components/form/separator.js.map +1 -1
  79. package/dist/components/form/tagpicker.d.ts.map +1 -1
  80. package/dist/components/form/tagpicker.js +2 -1
  81. package/dist/components/form/tagpicker.js.map +1 -1
  82. package/dist/components/form/text-area.d.ts.map +1 -1
  83. package/dist/components/form/text-area.js +7 -6
  84. package/dist/components/form/text-area.js.map +1 -1
  85. package/dist/components/form/text-field.d.ts.map +1 -1
  86. package/dist/components/form/text-field.js +7 -6
  87. package/dist/components/form/text-field.js.map +1 -1
  88. package/dist/components/form/use-form-navigation.d.ts.map +1 -1
  89. package/dist/components/form/use-form-navigation.js +4 -4
  90. package/dist/components/form/use-form-navigation.js.map +1 -1
  91. package/dist/components/form/with-left-border.d.ts +15 -0
  92. package/dist/components/form/with-left-border.d.ts.map +1 -1
  93. package/dist/components/form/with-left-border.js +21 -9
  94. package/dist/components/form/with-left-border.js.map +1 -1
  95. package/dist/components/icon.d.ts +14 -0
  96. package/dist/components/icon.d.ts.map +1 -1
  97. package/dist/components/icon.js +60 -0
  98. package/dist/components/icon.js.map +1 -1
  99. package/dist/components/image.d.ts +47 -2
  100. package/dist/components/image.d.ts.map +1 -1
  101. package/dist/components/image.js +46 -7
  102. package/dist/components/image.js.map +1 -1
  103. package/dist/components/list.d.ts +5 -0
  104. package/dist/components/list.d.ts.map +1 -1
  105. package/dist/components/list.js +188 -132
  106. package/dist/components/list.js.map +1 -1
  107. package/dist/components/loading-bar.d.ts.map +1 -1
  108. package/dist/components/loading-bar.js +4 -3
  109. package/dist/components/loading-bar.js.map +1 -1
  110. package/dist/components/metadata.d.ts +70 -0
  111. package/dist/components/metadata.d.ts.map +1 -0
  112. package/dist/components/metadata.js +82 -0
  113. package/dist/components/metadata.js.map +1 -0
  114. package/dist/components/theme-picker.d.ts.map +1 -1
  115. package/dist/components/theme-picker.js +3 -2
  116. package/dist/components/theme-picker.js.map +1 -1
  117. package/dist/descendants-v2.d.ts +60 -0
  118. package/dist/descendants-v2.d.ts.map +1 -0
  119. package/dist/descendants-v2.js +144 -0
  120. package/dist/descendants-v2.js.map +1 -0
  121. package/dist/examples/actions-context.d.ts +2 -0
  122. package/dist/examples/actions-context.d.ts.map +1 -0
  123. package/dist/examples/actions-context.js +33 -0
  124. package/dist/examples/actions-context.js.map +1 -0
  125. package/dist/examples/form-basic.d.ts.map +1 -1
  126. package/dist/examples/form-basic.js +1 -1
  127. package/dist/examples/form-basic.js.map +1 -1
  128. package/dist/examples/form-dropdown.js +1 -1
  129. package/dist/examples/form-dropdown.js.map +1 -1
  130. package/dist/examples/internal/custom-action-renderables.d.ts +70 -0
  131. package/dist/examples/internal/custom-action-renderables.d.ts.map +1 -0
  132. package/dist/examples/internal/custom-action-renderables.js +163 -0
  133. package/dist/examples/internal/custom-action-renderables.js.map +1 -0
  134. package/dist/examples/internal/custom-dropdown.d.ts +99 -0
  135. package/dist/examples/internal/custom-dropdown.d.ts.map +1 -0
  136. package/dist/examples/internal/custom-dropdown.js +270 -0
  137. package/dist/examples/internal/custom-dropdown.js.map +1 -0
  138. package/dist/examples/internal/custom-renderable-form.d.ts +43 -0
  139. package/dist/examples/internal/custom-renderable-form.d.ts.map +1 -0
  140. package/dist/examples/internal/custom-renderable-form.js +284 -0
  141. package/dist/examples/internal/custom-renderable-form.js.map +1 -0
  142. package/dist/examples/internal/custom-renderable-list-default-search.d.ts +2 -0
  143. package/dist/examples/internal/custom-renderable-list-default-search.d.ts.map +1 -0
  144. package/dist/examples/internal/custom-renderable-list-default-search.js +16 -0
  145. package/dist/examples/internal/custom-renderable-list-default-search.js.map +1 -0
  146. package/dist/examples/internal/custom-renderable-list-v2-default-search.d.ts +2 -0
  147. package/dist/examples/internal/custom-renderable-list-v2-default-search.d.ts.map +1 -0
  148. package/dist/examples/internal/custom-renderable-list-v2-default-search.js +24 -0
  149. package/dist/examples/internal/custom-renderable-list-v2-default-search.js.map +1 -0
  150. package/dist/examples/internal/custom-renderable-list-v2.d.ts +189 -0
  151. package/dist/examples/internal/custom-renderable-list-v2.d.ts.map +1 -0
  152. package/dist/examples/internal/custom-renderable-list-v2.js +708 -0
  153. package/dist/examples/internal/custom-renderable-list-v2.js.map +1 -0
  154. package/dist/examples/internal/custom-renderable-list.d.ts +72 -0
  155. package/dist/examples/internal/custom-renderable-list.d.ts.map +1 -0
  156. package/dist/examples/internal/custom-renderable-list.js +544 -0
  157. package/dist/examples/internal/custom-renderable-list.js.map +1 -0
  158. package/dist/examples/internal/rhf-custom-ref.js +5 -4
  159. package/dist/examples/internal/rhf-custom-ref.js.map +1 -1
  160. package/dist/examples/internal/scrollbox-with-descendants.js +4 -2
  161. package/dist/examples/internal/scrollbox-with-descendants.js.map +1 -1
  162. package/dist/examples/list-controlled-search.d.ts +2 -0
  163. package/dist/examples/list-controlled-search.d.ts.map +1 -0
  164. package/dist/examples/list-controlled-search.js +12 -0
  165. package/dist/examples/list-controlled-search.js.map +1 -0
  166. package/dist/examples/list-detail-metadata.js +1 -1
  167. package/dist/examples/list-detail-metadata.js.map +1 -1
  168. package/dist/examples/simple-image-mask.d.ts +8 -0
  169. package/dist/examples/simple-image-mask.d.ts.map +1 -0
  170. package/dist/examples/simple-image-mask.js +12 -0
  171. package/dist/examples/simple-image-mask.js.map +1 -0
  172. package/dist/examples/toast-variations.js +1 -1
  173. package/dist/examples/toast-variations.js.map +1 -1
  174. package/dist/extensions/dev.d.ts.map +1 -1
  175. package/dist/extensions/dev.js +3 -2
  176. package/dist/extensions/dev.js.map +1 -1
  177. package/dist/extensions/react-refresh-init.d.ts.map +1 -1
  178. package/dist/extensions/react-refresh-init.js +4 -3
  179. package/dist/extensions/react-refresh-init.js.map +1 -1
  180. package/dist/index.d.ts +3 -2
  181. package/dist/index.d.ts.map +1 -1
  182. package/dist/index.js +1 -1
  183. package/dist/index.js.map +1 -1
  184. package/dist/internal/date-picker-widget.d.ts.map +1 -1
  185. package/dist/internal/date-picker-widget.js +2 -1
  186. package/dist/internal/date-picker-widget.js.map +1 -1
  187. package/dist/internal/dialog.d.ts +6 -0
  188. package/dist/internal/dialog.d.ts.map +1 -1
  189. package/dist/internal/dialog.js +59 -18
  190. package/dist/internal/dialog.js.map +1 -1
  191. package/dist/internal/navigation.d.ts.map +1 -1
  192. package/dist/internal/navigation.js +8 -1
  193. package/dist/internal/navigation.js.map +1 -1
  194. package/dist/internal/offscreen.d.ts +3 -0
  195. package/dist/internal/offscreen.d.ts.map +1 -1
  196. package/dist/internal/offscreen.js +5 -0
  197. package/dist/internal/offscreen.js.map +1 -1
  198. package/dist/internal/providers.d.ts.map +1 -1
  199. package/dist/internal/providers.js +20 -3
  200. package/dist/internal/providers.js.map +1 -1
  201. package/dist/internal/scrollbox.d.ts.map +1 -1
  202. package/dist/internal/scrollbox.js +3 -2
  203. package/dist/internal/scrollbox.js.map +1 -1
  204. package/dist/logger.d.ts.map +1 -1
  205. package/dist/logger.js +4 -0
  206. package/dist/logger.js.map +1 -1
  207. package/dist/preload.js +5 -17
  208. package/dist/preload.js.map +1 -1
  209. package/dist/state.d.ts +4 -0
  210. package/dist/state.d.ts.map +1 -1
  211. package/dist/state.js +4 -0
  212. package/dist/state.js.map +1 -1
  213. package/dist/test-border-overlay.d.ts +2 -0
  214. package/dist/test-border-overlay.d.ts.map +1 -0
  215. package/dist/test-border-overlay.js +7 -0
  216. package/dist/test-border-overlay.js.map +1 -0
  217. package/dist/test-layout-2.d.ts +2 -0
  218. package/dist/test-layout-2.d.ts.map +1 -0
  219. package/dist/test-layout-2.js +5 -0
  220. package/dist/test-layout-2.js.map +1 -0
  221. package/dist/test-layout.d.ts +2 -0
  222. package/dist/test-layout.d.ts.map +1 -0
  223. package/dist/test-layout.js +7 -0
  224. package/dist/test-layout.js.map +1 -0
  225. package/dist/theme.d.ts +1 -2
  226. package/dist/theme.d.ts.map +1 -1
  227. package/dist/theme.js +5 -9
  228. package/dist/theme.js.map +1 -1
  229. package/dist/utils/run-command.d.ts +1 -1
  230. package/dist/utils/run-command.d.ts.map +1 -1
  231. package/dist/utils/run-command.js +27 -7
  232. package/dist/utils/run-command.js.map +1 -1
  233. package/dist/utils.d.ts +1 -0
  234. package/dist/utils.d.ts.map +1 -1
  235. package/dist/utils.js +44 -23
  236. package/dist/utils.js.map +1 -1
  237. package/dist/watcher.d.ts.map +1 -1
  238. package/dist/watcher.js +24 -4
  239. package/dist/watcher.js.map +1 -1
  240. package/package.json +14 -12
  241. package/src/action-utils.tsx +10 -0
  242. package/src/apis/cache.test.ts +35 -3
  243. package/src/apis/cache.tsx +184 -59
  244. package/src/apis/clipboard.tsx +5 -0
  245. package/src/apis/oauth.tsx +33 -4
  246. package/src/build.tsx +35 -58
  247. package/src/cli.tsx +156 -134
  248. package/src/compile.tsx +6 -3
  249. package/src/compile.vitest.tsx +33 -15
  250. package/src/components/actions.tsx +230 -99
  251. package/src/components/alert.tsx +11 -10
  252. package/src/components/animation-tick.tsx +1 -1
  253. package/src/components/detail.tsx +56 -151
  254. package/src/components/dropdown.tsx +70 -36
  255. package/src/components/footer.tsx +58 -33
  256. package/src/components/form/checkbox.tsx +30 -32
  257. package/src/components/form/date-picker.tsx +27 -47
  258. package/src/components/form/description.tsx +19 -18
  259. package/src/components/form/dropdown.tsx +95 -103
  260. package/src/components/form/file-autocomplete.tsx +9 -8
  261. package/src/components/form/file-picker.tsx +46 -46
  262. package/src/components/form/form-end.tsx +6 -4
  263. package/src/components/form/index.tsx +38 -48
  264. package/src/components/form/password-field.tsx +25 -27
  265. package/src/components/form/separator.tsx +3 -2
  266. package/src/components/form/tagpicker.tsx +2 -1
  267. package/src/components/form/text-area.tsx +25 -30
  268. package/src/components/form/text-field.tsx +25 -27
  269. package/src/components/form/use-form-navigation.tsx +4 -5
  270. package/src/components/form/with-left-border.tsx +48 -10
  271. package/src/components/icon.tsx +69 -0
  272. package/src/components/image.tsx +60 -7
  273. package/src/components/list.tsx +270 -202
  274. package/src/components/loading-bar.tsx +4 -3
  275. package/src/components/metadata.tsx +217 -0
  276. package/src/components/theme-picker.tsx +3 -2
  277. package/src/examples/actions-context.tsx +63 -0
  278. package/src/examples/actions-context.vitest.tsx +110 -0
  279. package/src/examples/actions-dialog-layout.vitest.tsx +2 -1
  280. package/src/examples/file-autocomplete.vitest.tsx +15 -15
  281. package/src/examples/form-basic.tsx +12 -0
  282. package/src/examples/form-basic.vitest.tsx +74 -74
  283. package/src/examples/form-dropdown.tsx +8 -0
  284. package/src/examples/form-dropdown.vitest.tsx +364 -421
  285. package/src/examples/form-tagpicker.vitest.tsx +56 -54
  286. package/src/examples/github.vitest.tsx +252 -0
  287. package/src/examples/internal/rhf-custom-ref.tsx +16 -15
  288. package/src/examples/internal/scrollbox-with-descendants.tsx +4 -2
  289. package/src/examples/internal/simple-dialog.tsx +1 -1
  290. package/src/examples/internal/simple-scrollbox.vitest.tsx +14 -9
  291. package/src/examples/list-controlled-search.tsx +28 -0
  292. package/src/examples/list-controlled-search.vitest.tsx +49 -0
  293. package/src/examples/list-detail-metadata.tsx +8 -5
  294. package/src/examples/list-detail-metadata.vitest.tsx +22 -22
  295. package/src/examples/list-dropdown-default.vitest.tsx +12 -12
  296. package/src/examples/list-scrollbox.vitest.tsx +52 -38
  297. package/src/examples/list-with-detail.vitest.tsx +45 -41
  298. package/src/examples/list-with-dropdown.vitest.tsx +5 -5
  299. package/src/examples/list-with-sections.vitest.tsx +65 -12
  300. package/src/examples/list-with-toast.vitest.tsx +4 -4
  301. package/src/examples/simple-file-picker.vitest.tsx +12 -12
  302. package/src/examples/simple-grid.vitest.tsx +53 -53
  303. package/src/examples/simple-image-mask.tsx +58 -0
  304. package/src/examples/simple-navigation.vitest.tsx +19 -19
  305. package/src/examples/store.vitest.tsx +1 -1
  306. package/src/examples/swift-extension.vitest.tsx +4 -2
  307. package/src/examples/synonyms.vitest.tsx +31 -9
  308. package/src/examples/toast-action.vitest.tsx +8 -8
  309. package/src/examples/toast-variations.tsx +1 -1
  310. package/src/examples/toast-variations.vitest.tsx +69 -134
  311. package/src/extensions/dev.tsx +3 -2
  312. package/src/extensions/dev.vitest.tsx +65 -28
  313. package/src/extensions/react-refresh-init.tsx +4 -3
  314. package/src/index.tsx +3 -1
  315. package/src/internal/date-picker-widget.tsx +2 -1
  316. package/src/internal/dialog.tsx +100 -28
  317. package/src/internal/navigation.tsx +8 -1
  318. package/src/internal/offscreen.tsx +10 -0
  319. package/src/internal/providers.tsx +34 -8
  320. package/src/internal/scrollbox.tsx +4 -2
  321. package/src/logger.tsx +4 -0
  322. package/src/preload.tsx +5 -17
  323. package/src/state.tsx +12 -0
  324. package/src/theme.tsx +6 -9
  325. package/src/utils/run-command.tsx +32 -8
  326. package/src/utils.tsx +58 -23
  327. package/src/watcher.tsx +26 -6
@@ -56,6 +56,7 @@ test('form tagpicker shows inline options', async () => {
56
56
  │ ○ Norway
57
57
  │ ○ Poland
58
58
 
59
+
59
60
 
60
61
 
61
62
 
@@ -77,7 +78,6 @@ test('form tagpicker shows inline options', async () => {
77
78
 
78
79
 
79
80
 
80
-
81
81
  "
82
82
  `)
83
83
 
@@ -113,6 +113,7 @@ test('form tagpicker shows inline options', async () => {
113
113
  │ ○ Norway
114
114
  │ ○ Poland
115
115
 
116
+
116
117
 
117
118
 
118
119
 
@@ -134,7 +135,6 @@ test('form tagpicker shows inline options', async () => {
134
135
 
135
136
 
136
137
 
137
-
138
138
  "
139
139
  `)
140
140
 
@@ -147,14 +147,14 @@ test('form tagpicker shows inline options', async () => {
147
147
 
148
148
 
149
149
 
150
- TagPicker Component Demo
150
+ TagPicker Component Demo
151
151
  │ Test tag picker with multiple selection support
152
152
 
153
- Favorite Sport
153
+ Favorite Sport
154
154
  │ Choose your favorite sport...
155
155
 
156
156
  │ ○ Basketball
157
- ○ Football
157
+ │› ○ Football
158
158
  │ ○ Tennis
159
159
  │ ○ Baseball
160
160
  │ ○ Golf
@@ -170,6 +170,7 @@ test('form tagpicker shows inline options', async () => {
170
170
  │ ○ Norway
171
171
  │ ○ Poland
172
172
 
173
+
173
174
 
174
175
 
175
176
 
@@ -191,7 +192,6 @@ test('form tagpicker shows inline options', async () => {
191
192
 
192
193
 
193
194
 
194
-
195
195
  "
196
196
  `)
197
197
 
@@ -207,17 +207,17 @@ test('form tagpicker shows inline options', async () => {
207
207
 
208
208
 
209
209
 
210
- TagPicker Component Demo
210
+ TagPicker Component Demo
211
211
  │ Test tag picker with multiple selection support
212
212
 
213
- Favorite Sport
213
+ Favorite Sport
214
214
  │ Choose your favorite sport...
215
215
 
216
- │ ○ Basketball
217
- │ ○ Football
218
- │ ○ Tennis
219
216
  │ ○ Baseball
220
217
  │ ○ Golf
218
+ │› ○ Swimming
219
+ │ ○ Cycling
220
+ │ ○ Running
221
221
 
222
222
  │ Select your favorite sport from the list
223
223
 
@@ -230,6 +230,7 @@ test('form tagpicker shows inline options', async () => {
230
230
  │ ○ Norway
231
231
  │ ○ Poland
232
232
 
233
+
233
234
 
234
235
 
235
236
 
@@ -251,7 +252,6 @@ test('form tagpicker shows inline options', async () => {
251
252
 
252
253
 
253
254
 
254
-
255
255
  "
256
256
  `)
257
257
 
@@ -264,17 +264,17 @@ test('form tagpicker shows inline options', async () => {
264
264
 
265
265
 
266
266
 
267
- TagPicker Component Demo
267
+ TagPicker Component Demo
268
268
  │ Test tag picker with multiple selection support
269
269
 
270
- Favorite Sport
271
- Choose your favorite sport...
270
+ Favorite Sport
271
+ Swimming
272
272
 
273
- │ ○ Basketball
274
- │ ○ Football
275
- │ ○ Tennis
276
273
  │ ○ Baseball
277
274
  │ ○ Golf
275
+ │› ● Swimming
276
+ │ ○ Cycling
277
+ │ ○ Running
278
278
 
279
279
  │ Select your favorite sport from the list
280
280
 
@@ -287,6 +287,7 @@ test('form tagpicker shows inline options', async () => {
287
287
  │ ○ Norway
288
288
  │ ○ Poland
289
289
 
290
+
290
291
 
291
292
 
292
293
 
@@ -308,7 +309,6 @@ test('form tagpicker shows inline options', async () => {
308
309
 
309
310
 
310
311
 
311
-
312
312
  "
313
313
  `)
314
314
  }, 15000)
@@ -352,6 +352,7 @@ test('form tagpicker keyboard navigation', async () => {
352
352
  │ ○ Norway
353
353
  │ ○ Poland
354
354
 
355
+
355
356
 
356
357
 
357
358
 
@@ -373,7 +374,6 @@ test('form tagpicker keyboard navigation', async () => {
373
374
 
374
375
 
375
376
 
376
-
377
377
  "
378
378
  `)
379
379
 
@@ -389,17 +389,17 @@ test('form tagpicker keyboard navigation', async () => {
389
389
 
390
390
 
391
391
 
392
- TagPicker Component Demo
392
+ TagPicker Component Demo
393
393
  │ Test tag picker with multiple selection support
394
394
 
395
- Favorite Sport
395
+ Favorite Sport
396
396
  │ Choose your favorite sport...
397
397
 
398
- │ ○ Basketball
399
- │ ○ Football
400
398
  │ ○ Tennis
401
399
  │ ○ Baseball
402
- ○ Golf
400
+ │› ○ Golf
401
+ │ ○ Swimming
402
+ │ ○ Cycling
403
403
 
404
404
  │ Select your favorite sport from the list
405
405
 
@@ -412,6 +412,7 @@ test('form tagpicker keyboard navigation', async () => {
412
412
  │ ○ Norway
413
413
  │ ○ Poland
414
414
 
415
+
415
416
 
416
417
 
417
418
 
@@ -433,7 +434,6 @@ test('form tagpicker keyboard navigation', async () => {
433
434
 
434
435
 
435
436
 
436
-
437
437
  "
438
438
  `)
439
439
 
@@ -446,17 +446,17 @@ test('form tagpicker keyboard navigation', async () => {
446
446
 
447
447
 
448
448
 
449
- TagPicker Component Demo
449
+ TagPicker Component Demo
450
450
  │ Test tag picker with multiple selection support
451
451
 
452
- Favorite Sport
452
+ Favorite Sport
453
453
  │ Choose your favorite sport...
454
454
 
455
- │ ○ Basketball
456
- │ ○ Football
457
- │ ○ Tennis
458
455
  │ ○ Baseball
459
456
  │ ○ Golf
457
+ │› ○ Swimming
458
+ │ ○ Cycling
459
+ │ ○ Running
460
460
 
461
461
  │ Select your favorite sport from the list
462
462
 
@@ -469,6 +469,7 @@ test('form tagpicker keyboard navigation', async () => {
469
469
  │ ○ Norway
470
470
  │ ○ Poland
471
471
 
472
+
472
473
 
473
474
 
474
475
 
@@ -490,7 +491,6 @@ test('form tagpicker keyboard navigation', async () => {
490
491
 
491
492
 
492
493
 
493
-
494
494
  "
495
495
  `)
496
496
 
@@ -503,17 +503,17 @@ test('form tagpicker keyboard navigation', async () => {
503
503
 
504
504
 
505
505
 
506
- TagPicker Component Demo
506
+ TagPicker Component Demo
507
507
  │ Test tag picker with multiple selection support
508
508
 
509
- Favorite Sport
509
+ Favorite Sport
510
510
  │ Choose your favorite sport...
511
511
 
512
- │ ○ Basketball
513
- │ ○ Football
514
512
  │ ○ Tennis
515
513
  │ ○ Baseball
516
- ○ Golf
514
+ │› ○ Golf
515
+ │ ○ Swimming
516
+ │ ○ Cycling
517
517
 
518
518
  │ Select your favorite sport from the list
519
519
 
@@ -526,6 +526,7 @@ test('form tagpicker keyboard navigation', async () => {
526
526
  │ ○ Norway
527
527
  │ ○ Poland
528
528
 
529
+
529
530
 
530
531
 
531
532
 
@@ -547,7 +548,6 @@ test('form tagpicker keyboard navigation', async () => {
547
548
 
548
549
 
549
550
 
550
-
551
551
  "
552
552
  `)
553
553
 
@@ -560,17 +560,17 @@ test('form tagpicker keyboard navigation', async () => {
560
560
 
561
561
 
562
562
 
563
- TagPicker Component Demo
563
+ TagPicker Component Demo
564
564
  │ Test tag picker with multiple selection support
565
565
 
566
- Favorite Sport
566
+ Favorite Sport
567
567
  │ Choose your favorite sport...
568
568
 
569
- │ ○ Basketball
570
- │ ○ Football
571
569
  │ ○ Tennis
572
570
  │ ○ Baseball
573
- ○ Golf
571
+ │› ○ Golf
572
+ │ ○ Swimming
573
+ │ ○ Cycling
574
574
 
575
575
  │ Select your favorite sport from the list
576
576
 
@@ -583,6 +583,7 @@ test('form tagpicker keyboard navigation', async () => {
583
583
  │ ○ Norway
584
584
  │ ○ Poland
585
585
 
586
+
586
587
 
587
588
 
588
589
 
@@ -604,7 +605,6 @@ test('form tagpicker keyboard navigation', async () => {
604
605
 
605
606
 
606
607
 
607
-
608
608
  "
609
609
  `)
610
610
  }, 15000)
@@ -648,6 +648,7 @@ test('form tagpicker with default value', async () => {
648
648
  │ ○ Norway
649
649
  │ ○ Poland
650
650
 
651
+
651
652
 
652
653
 
653
654
 
@@ -669,7 +670,6 @@ test('form tagpicker with default value', async () => {
669
670
 
670
671
 
671
672
 
672
-
673
673
  "
674
674
  `)
675
675
 
@@ -705,6 +705,7 @@ test('form tagpicker with default value', async () => {
705
705
  │ ○ Norway
706
706
  │ ○ Poland
707
707
 
708
+
708
709
 
709
710
 
710
711
 
@@ -726,12 +727,13 @@ test('form tagpicker with default value', async () => {
726
727
 
727
728
 
728
729
 
729
-
730
730
  "
731
731
  `)
732
732
 
733
- // Submit with alt+enter directly - no need to press esc first
734
- await session.press(['alt', 'enter'])
733
+ // Submit via action panel (ctrl+k then enter)
734
+ await session.press(['ctrl', 'k'])
735
+ await session.waitIdle()
736
+ await session.press('enter')
735
737
 
736
738
  const afterSubmitSnapshot = await session.text({
737
739
  waitFor: (text) => {
@@ -748,9 +750,9 @@ test('form tagpicker with default value', async () => {
748
750
  │ Test tag picker with multiple selection support
749
751
 
750
752
  ◆ Favorite Sport
751
- Choose your favorite sport...
753
+ Basketball
752
754
 
753
- │› Basketball
755
+ │› Basketball
754
756
  │ ○ Football
755
757
  │ ○ Tennis
756
758
  │ ○ Baseball
@@ -767,9 +769,12 @@ test('form tagpicker with default value', async () => {
767
769
  │ ○ Norway
768
770
  │ ○ Poland
769
771
 
772
+
770
773
  ▪ Submitted Data
771
774
  │ {
772
- │ "sports": [],
775
+ │ "sports": [
776
+ │ "basketball"
777
+ │ ],
773
778
  │ "countries": [
774
779
  │ "ger"
775
780
  │ ]
@@ -786,9 +791,6 @@ test('form tagpicker with default value', async () => {
786
791
 
787
792
 
788
793
 
789
-
790
-
791
-
792
794
  "
793
795
  `)
794
796
  }, 15000)
@@ -0,0 +1,252 @@
1
+ import { test, expect, beforeEach, afterEach, beforeAll } from 'vitest'
2
+ import { launchTerminal, Session } from 'tuistory/src'
3
+ import { spawnSync } from 'node:child_process'
4
+ import path from 'node:path'
5
+ import fs from 'node:fs'
6
+
7
+ const extensionDir = path.resolve(__dirname, '../../extensions/github')
8
+
9
+ // The extensions folder is gitignored, so this test only runs locally
10
+ const extensionExists = fs.existsSync(extensionDir)
11
+
12
+ // Install dependencies before running tests (only if extension exists locally)
13
+ beforeAll(() => {
14
+ if (!extensionExists) {
15
+ return // Extension folder doesn't exist (gitignored, not in CI)
16
+ }
17
+
18
+ // Skip if already installed
19
+ if (fs.existsSync(path.join(extensionDir, 'node_modules', '.bin'))) {
20
+ return
21
+ }
22
+
23
+ const result = spawnSync('npm', ['install'], {
24
+ cwd: extensionDir,
25
+ stdio: 'inherit',
26
+ timeout: 120000,
27
+ })
28
+
29
+ if (result.status !== 0 || result.signal) {
30
+ throw new Error(
31
+ `npm install failed: status=${result.status}, signal=${result.signal}`,
32
+ )
33
+ }
34
+ }, 180000)
35
+
36
+ let session: Session
37
+
38
+ beforeEach(async (ctx) => {
39
+ if (!extensionExists) {
40
+ ctx.skip()
41
+ return
42
+ }
43
+ session = await launchTerminal({
44
+ command: 'bun',
45
+ args: ['src/cli.tsx', 'dev', extensionDir],
46
+ cwd: path.resolve(__dirname, '../..'),
47
+ cols: 80,
48
+ rows: 30,
49
+ })
50
+ })
51
+
52
+ afterEach(() => {
53
+ session?.close()
54
+ })
55
+
56
+ test.skipIf(!extensionExists)('github extension shows command list on launch', async () => {
57
+ // Wait for command list to appear (extension has multiple commands)
58
+ // Don't match "Commands" alone - it falsely matches "Building 18 commands..." build log
59
+ const initialView = await session.text({
60
+ waitFor: (text) => /My Pull Requests|Search Repositories/i.test(text),
61
+ timeout: 30000,
62
+ })
63
+
64
+ expect(initialView).toContain('My Pull Requests')
65
+ expect(initialView).toContain('Search Repositories')
66
+ expect(initialView).toMatchInlineSnapshot(`
67
+ "
68
+
69
+
70
+ GitHub ───────────────────────────────────────────────────────────────────
71
+
72
+ > Search commands...
73
+
74
+ Commands
75
+ ›My Pull Requests List pull requests you created, participated in, or view
76
+ Search Pull Requests Search recent pull requests globally in all rep view
77
+ Create Pull Request Create a pull request in one of your GitHub repo view
78
+ My Issues List issues created by you, assigned to you or mentioning view
79
+ Search Issues Search recent issues globally in all repositories. view
80
+ Create Issue Create an issue in one of your GitHub repositories. view
81
+ Create Branch Create a branch in one of your GitHub repositories view
82
+ Search Repositories Search in your public or private repositories by view
83
+ My Latest Repositories List your repositories by latest updated view
84
+ My Starred Repositories List repositories you have starred view
85
+ Workflow Runs Manage workflow runs for a selected GitHub repository. view
86
+ Notifications List inbox notifications from all repositories or a se view
87
+ Search Discussions Search recent Discussions globally in all reposit view
88
+ My Discussions Show your Discussions view
89
+ My Projects Show your Projects view
90
+
91
+
92
+
93
+ ↵ run command ↑↓ navigate ^k actions powered by termcast
94
+
95
+
96
+
97
+ "
98
+ `)
99
+ }, 60000)
100
+
101
+ test.skipIf(!extensionExists)('github extension can navigate commands', async () => {
102
+ // Wait for command list
103
+ await session.text({
104
+ waitFor: (text) => /My Pull Requests|Search Repositories/i.test(text),
105
+ timeout: 30000,
106
+ })
107
+
108
+ await session.waitIdle()
109
+
110
+ // Navigate down
111
+ await session.press('down')
112
+ await session.press('down')
113
+
114
+ const afterNavigate = await session.text()
115
+ expect(afterNavigate).toMatchInlineSnapshot(`
116
+ "
117
+
118
+
119
+ GitHub ───────────────────────────────────────────────────────────────────
120
+
121
+ > Search commands...
122
+
123
+ Commands
124
+ My Pull Requests List pull requests you created, participated in, or view
125
+ Search Pull Requests Search recent pull requests globally in all rep view
126
+ ›Create Pull Request Create a pull request in one of your GitHub repo view
127
+ My Issues List issues created by you, assigned to you or mentioning view
128
+ Search Issues Search recent issues globally in all repositories. view
129
+ Create Issue Create an issue in one of your GitHub repositories. view
130
+ Create Branch Create a branch in one of your GitHub repositories view
131
+ Search Repositories Search in your public or private repositories by view
132
+ My Latest Repositories List your repositories by latest updated view
133
+ My Starred Repositories List repositories you have starred view
134
+ Workflow Runs Manage workflow runs for a selected GitHub repository. view
135
+ Notifications List inbox notifications from all repositories or a se view
136
+ Search Discussions Search recent Discussions globally in all reposit view
137
+ My Discussions Show your Discussions view
138
+ My Projects Show your Projects view
139
+
140
+
141
+
142
+ ↵ run command ↑↓ navigate ^k actions powered by termcast
143
+
144
+
145
+
146
+ "
147
+ `)
148
+ }, 60000)
149
+
150
+ test.skipIf(!extensionExists)('github extension can open actions panel', async () => {
151
+ // Wait for command list
152
+ await session.text({
153
+ waitFor: (text) => /My Pull Requests|Search Repositories/i.test(text),
154
+ timeout: 30000,
155
+ })
156
+
157
+ await session.waitIdle()
158
+
159
+ // Open actions panel with ctrl+k
160
+ await session.press(['ctrl', 'k'])
161
+
162
+ const actionsPanel = await session.text({
163
+ waitFor: (text) => /Actions|Open/i.test(text),
164
+ timeout: 5000,
165
+ })
166
+
167
+ expect(actionsPanel).toMatchInlineSnapshot(`
168
+ "
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+ ╭──────────────────────────────────────────────────────────────────────────╮
178
+ │ │
179
+ │ Actions esc │
180
+ │ │
181
+ │ > Search actions... │
182
+ │ │
183
+ │ ›Run Command █ │
184
+ │ Copy File Path █ │
185
+ │ Copy Command Info █ │
186
+ │ ▀ │
187
+ │ Settings │
188
+ │ Configure GitHub... ⌃⇧, │
189
+ │ Change Theme... │
190
+ │ │
191
+ │ ↵ select ↑↓ navigate │
192
+ │ │
193
+ ╰──────────────────────────────────────────────────────────────────────────╯
194
+
195
+
196
+
197
+
198
+ "
199
+ `)
200
+ }, 60000)
201
+
202
+ test.skipIf(!extensionExists)('github extension can search commands', async () => {
203
+ // Wait for command list
204
+ await session.text({
205
+ waitFor: (text) => /My Pull Requests|Search Repositories/i.test(text),
206
+ timeout: 30000,
207
+ })
208
+
209
+ await session.waitIdle()
210
+
211
+ // Type to filter commands
212
+ await session.type('workflow')
213
+
214
+ const filteredList = await session.text({
215
+ waitFor: (text) => /Workflow Runs/i.test(text) && !/My Pull Requests/i.test(text),
216
+ timeout: 5000,
217
+ })
218
+
219
+ expect(filteredList).toMatchInlineSnapshot(`
220
+ "
221
+
222
+
223
+ GitHub ───────────────────────────────────────────────────────────────────
224
+
225
+ > workflow
226
+
227
+ ›Workflow Runs Manage workflow runs for a selected GitHub repository. view
228
+
229
+
230
+
231
+
232
+
233
+
234
+
235
+ ↵ run command ↑↓ navigate ^k actions powered by termcast
236
+
237
+
238
+
239
+
240
+
241
+
242
+
243
+
244
+
245
+
246
+
247
+
248
+
249
+
250
+ "
251
+ `)
252
+ }, 60000)