termcast 1.3.30 → 1.3.32

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 (294) hide show
  1. package/dist/apis/cache.d.ts.map +1 -1
  2. package/dist/apis/cache.js +4 -39
  3. package/dist/apis/cache.js.map +1 -1
  4. package/dist/apis/hud.d.ts.map +1 -1
  5. package/dist/apis/hud.js +13 -31
  6. package/dist/apis/hud.js.map +1 -1
  7. package/dist/apis/localstorage.d.ts.map +1 -1
  8. package/dist/apis/localstorage.js +3 -27
  9. package/dist/apis/localstorage.js.map +1 -1
  10. package/dist/apis/toast.d.ts +16 -43
  11. package/dist/apis/toast.d.ts.map +1 -1
  12. package/dist/apis/toast.js +78 -177
  13. package/dist/apis/toast.js.map +1 -1
  14. package/dist/build.d.ts +3 -1
  15. package/dist/build.d.ts.map +1 -1
  16. package/dist/build.js +52 -2
  17. package/dist/build.js.map +1 -1
  18. package/dist/cli.d.ts +1 -0
  19. package/dist/cli.d.ts.map +1 -1
  20. package/dist/cli.js +206 -25
  21. package/dist/cli.js.map +1 -1
  22. package/dist/colors.d.ts.map +1 -1
  23. package/dist/colors.js +1 -0
  24. package/dist/colors.js.map +1 -1
  25. package/dist/compile.d.ts +0 -1
  26. package/dist/compile.d.ts.map +1 -1
  27. package/dist/compile.js +18 -23
  28. package/dist/compile.js.map +1 -1
  29. package/dist/components/actions.d.ts.map +1 -1
  30. package/dist/components/actions.js +30 -15
  31. package/dist/components/actions.js.map +1 -1
  32. package/dist/components/animation-tick.d.ts +12 -0
  33. package/dist/components/animation-tick.d.ts.map +1 -0
  34. package/dist/components/animation-tick.js +63 -0
  35. package/dist/components/animation-tick.js.map +1 -0
  36. package/dist/components/detail.d.ts.map +1 -1
  37. package/dist/components/detail.js +10 -13
  38. package/dist/components/detail.js.map +1 -1
  39. package/dist/components/dropdown.d.ts +1 -0
  40. package/dist/components/dropdown.d.ts.map +1 -1
  41. package/dist/components/dropdown.js +27 -26
  42. package/dist/components/dropdown.js.map +1 -1
  43. package/dist/components/extension-preferences.d.ts.map +1 -1
  44. package/dist/components/extension-preferences.js +15 -10
  45. package/dist/components/extension-preferences.js.map +1 -1
  46. package/dist/components/footer.d.ts +13 -0
  47. package/dist/components/footer.d.ts.map +1 -0
  48. package/dist/components/footer.js +106 -0
  49. package/dist/components/footer.js.map +1 -0
  50. package/dist/components/form/file-autocomplete.d.ts +19 -4
  51. package/dist/components/form/file-autocomplete.d.ts.map +1 -1
  52. package/dist/components/form/file-autocomplete.js +56 -55
  53. package/dist/components/form/file-autocomplete.js.map +1 -1
  54. package/dist/components/form/file-picker.d.ts.map +1 -1
  55. package/dist/components/form/file-picker.js +26 -15
  56. package/dist/components/form/file-picker.js.map +1 -1
  57. package/dist/components/form/index.d.ts.map +1 -1
  58. package/dist/components/form/index.js +17 -15
  59. package/dist/components/form/index.js.map +1 -1
  60. package/dist/components/form/with-left-border.d.ts.map +1 -1
  61. package/dist/components/form/with-left-border.js +4 -12
  62. package/dist/components/form/with-left-border.js.map +1 -1
  63. package/dist/components/list.d.ts.map +1 -1
  64. package/dist/components/list.js +126 -86
  65. package/dist/components/list.js.map +1 -1
  66. package/dist/components/loading-bar.d.ts.map +1 -1
  67. package/dist/components/loading-bar.js +5 -22
  68. package/dist/components/loading-bar.js.map +1 -1
  69. package/dist/components/loading-text.d.ts.map +1 -1
  70. package/dist/components/loading-text.js +3 -22
  71. package/dist/components/loading-text.js.map +1 -1
  72. package/dist/components/theme-picker.d.ts +2 -0
  73. package/dist/components/theme-picker.d.ts.map +1 -0
  74. package/dist/components/theme-picker.js +37 -0
  75. package/dist/components/theme-picker.js.map +1 -0
  76. package/dist/descendants.d.ts +6 -0
  77. package/dist/descendants.d.ts.map +1 -1
  78. package/dist/descendants.js +74 -8
  79. package/dist/descendants.js.map +1 -1
  80. package/dist/examples/internal/descendants-rerender.d.ts +14 -0
  81. package/dist/examples/internal/descendants-rerender.d.ts.map +1 -0
  82. package/dist/examples/internal/descendants-rerender.js +145 -0
  83. package/dist/examples/internal/descendants-rerender.js.map +1 -0
  84. package/dist/examples/internal/simple-dialog.js +4 -1
  85. package/dist/examples/internal/simple-dialog.js.map +1 -1
  86. package/dist/examples/internal/simple-scrollbox.js +1 -1
  87. package/dist/examples/internal/simple-scrollbox.js.map +1 -1
  88. package/dist/examples/list-with-dropdown.js +1 -1
  89. package/dist/examples/list-with-dropdown.js.map +1 -1
  90. package/dist/examples/miscellaneous.js +1 -1
  91. package/dist/examples/miscellaneous.js.map +1 -1
  92. package/dist/examples/toast-action.d.ts +2 -0
  93. package/dist/examples/toast-action.d.ts.map +1 -0
  94. package/dist/examples/toast-action.js +76 -0
  95. package/dist/examples/toast-action.js.map +1 -0
  96. package/dist/examples/toast-variations.js +38 -36
  97. package/dist/examples/toast-variations.js.map +1 -1
  98. package/dist/extensions/dev.d.ts +1 -1
  99. package/dist/extensions/dev.d.ts.map +1 -1
  100. package/dist/extensions/dev.js +62 -30
  101. package/dist/extensions/dev.js.map +1 -1
  102. package/dist/extensions/home.d.ts.map +1 -1
  103. package/dist/extensions/home.js +4 -3
  104. package/dist/extensions/home.js.map +1 -1
  105. package/dist/extensions/react-refresh-init.d.ts +5 -0
  106. package/dist/extensions/react-refresh-init.d.ts.map +1 -0
  107. package/dist/extensions/react-refresh-init.js +52 -0
  108. package/dist/extensions/react-refresh-init.js.map +1 -0
  109. package/dist/internal/date-picker-widget.js +1 -1
  110. package/dist/internal/date-picker-widget.js.map +1 -1
  111. package/dist/internal/dialog.d.ts +8 -3
  112. package/dist/internal/dialog.d.ts.map +1 -1
  113. package/dist/internal/dialog.js +37 -53
  114. package/dist/internal/dialog.js.map +1 -1
  115. package/dist/internal/navigation.d.ts +1 -0
  116. package/dist/internal/navigation.d.ts.map +1 -1
  117. package/dist/internal/navigation.js +25 -1
  118. package/dist/internal/navigation.js.map +1 -1
  119. package/dist/internal/providers.d.ts.map +1 -1
  120. package/dist/internal/providers.js +9 -197
  121. package/dist/internal/providers.js.map +1 -1
  122. package/dist/internal/scrollbox.d.ts.map +1 -1
  123. package/dist/internal/scrollbox.js +1 -0
  124. package/dist/internal/scrollbox.js.map +1 -1
  125. package/dist/release.d.ts +1 -0
  126. package/dist/release.d.ts.map +1 -1
  127. package/dist/release.js +16 -9
  128. package/dist/release.js.map +1 -1
  129. package/dist/state.d.ts +27 -1
  130. package/dist/state.d.ts.map +1 -1
  131. package/dist/state.js +6 -0
  132. package/dist/state.js.map +1 -1
  133. package/dist/theme.d.ts +6 -19
  134. package/dist/theme.d.ts.map +1 -1
  135. package/dist/theme.js +76 -45
  136. package/dist/theme.js.map +1 -1
  137. package/dist/themes/aura.json +69 -0
  138. package/dist/themes/ayu.json +80 -0
  139. package/dist/themes/catppuccin-frappe.json +233 -0
  140. package/dist/themes/catppuccin-macchiato.json +233 -0
  141. package/dist/themes/catppuccin.json +112 -0
  142. package/dist/themes/cobalt2.json +228 -0
  143. package/dist/themes/cursor.json +249 -0
  144. package/dist/themes/dracula.json +219 -0
  145. package/dist/themes/everforest.json +241 -0
  146. package/dist/themes/flexoki.json +237 -0
  147. package/dist/themes/github-light.json +56 -0
  148. package/dist/themes/github.json +241 -0
  149. package/dist/themes/gruvbox.json +95 -0
  150. package/dist/themes/kanagawa.json +77 -0
  151. package/dist/themes/lucent-orng.json +227 -0
  152. package/dist/themes/material.json +235 -0
  153. package/dist/themes/matrix.json +77 -0
  154. package/dist/themes/mercury.json +245 -0
  155. package/dist/themes/monokai.json +221 -0
  156. package/dist/themes/nightowl.json +221 -0
  157. package/dist/themes/nord.json +223 -0
  158. package/dist/themes/one-dark.json +84 -0
  159. package/dist/themes/opencode-light.json +62 -0
  160. package/dist/themes/opencode.json +245 -0
  161. package/dist/themes/orng.json +245 -0
  162. package/dist/themes/palenight.json +222 -0
  163. package/dist/themes/rosepine.json +234 -0
  164. package/dist/themes/solarized.json +223 -0
  165. package/dist/themes/synthwave84.json +226 -0
  166. package/dist/themes/termcast.json +226 -0
  167. package/dist/themes/tokyonight.json +243 -0
  168. package/dist/themes/vercel.json +255 -0
  169. package/dist/themes/vesper.json +218 -0
  170. package/dist/themes/zenburn.json +223 -0
  171. package/dist/themes.d.ts +57 -0
  172. package/dist/themes.d.ts.map +1 -0
  173. package/dist/themes.js +181 -0
  174. package/dist/themes.js.map +1 -0
  175. package/dist/utils/run-command.d.ts +2 -1
  176. package/dist/utils/run-command.d.ts.map +1 -1
  177. package/dist/utils/run-command.js +20 -10
  178. package/dist/utils/run-command.js.map +1 -1
  179. package/dist/utils.d.ts +2 -1
  180. package/dist/utils.d.ts.map +1 -1
  181. package/dist/utils.js +90 -17
  182. package/dist/utils.js.map +1 -1
  183. package/dist/watcher.d.ts +3 -0
  184. package/dist/watcher.d.ts.map +1 -0
  185. package/dist/watcher.js +16 -0
  186. package/dist/watcher.js.map +1 -0
  187. package/package.json +16 -10
  188. package/src/apis/cache.tsx +5 -44
  189. package/src/apis/hud.tsx +17 -62
  190. package/src/apis/localstorage.tsx +3 -32
  191. package/src/apis/toast.tsx +91 -275
  192. package/src/build.test.tsx +10 -0
  193. package/src/build.tsx +61 -1
  194. package/src/cli.tsx +365 -103
  195. package/src/colors.tsx +1 -0
  196. package/src/compile.tsx +21 -29
  197. package/src/compile.vitest.tsx +300 -0
  198. package/src/components/actions.tsx +64 -45
  199. package/src/components/animation-tick.tsx +85 -0
  200. package/src/components/detail.tsx +31 -35
  201. package/src/components/dropdown.tsx +32 -21
  202. package/src/components/extension-preferences.tsx +14 -10
  203. package/src/components/footer.tsx +241 -0
  204. package/src/components/form/file-autocomplete.tsx +80 -60
  205. package/src/components/form/file-picker.tsx +37 -25
  206. package/src/components/form/index.tsx +45 -41
  207. package/src/components/form/with-left-border.tsx +4 -14
  208. package/src/components/list.tsx +181 -121
  209. package/src/components/loading-bar.tsx +5 -25
  210. package/src/components/loading-text.tsx +4 -23
  211. package/src/components/theme-picker.tsx +57 -0
  212. package/src/descendants.tsx +98 -9
  213. package/src/examples/actions-dialog-layout.vitest.tsx +112 -0
  214. package/src/examples/file-autocomplete.vitest.tsx +131 -122
  215. package/src/examples/form-basic.vitest.tsx +463 -644
  216. package/src/examples/form-dropdown.vitest.tsx +553 -571
  217. package/src/examples/form-scroll.vitest.tsx +112 -102
  218. package/src/examples/form-tagpicker.vitest.tsx +364 -338
  219. package/src/examples/internal/descendants-rerender.tsx +273 -0
  220. package/src/examples/internal/descendants-rerender.vitest.tsx +194 -0
  221. package/src/examples/internal/simple-dialog.tsx +4 -4
  222. package/src/examples/internal/simple-scrollbox.tsx +2 -2
  223. package/src/examples/internal/simple-scrollbox.vitest.tsx +43 -31
  224. package/src/examples/list-detail-metadata.vitest.tsx +34 -30
  225. package/src/examples/list-dropdown-default.vitest.tsx +84 -72
  226. package/src/examples/list-empty-view.vitest.tsx +93 -0
  227. package/src/examples/list-fetch-data.vitest.tsx +36 -30
  228. package/src/examples/list-scrollbox.vitest.tsx +59 -39
  229. package/src/examples/list-with-detail.vitest.tsx +339 -314
  230. package/src/examples/list-with-dropdown.tsx +1 -0
  231. package/src/examples/list-with-dropdown.vitest.tsx +176 -150
  232. package/src/examples/list-with-sections.vitest.tsx +289 -270
  233. package/src/examples/list-with-toast.vitest.tsx +44 -44
  234. package/src/examples/miscellaneous.tsx +10 -0
  235. package/src/examples/simple-file-picker.vitest.tsx +90 -86
  236. package/src/examples/simple-grid.vitest.tsx +275 -249
  237. package/src/examples/simple-navigation.vitest.tsx +192 -168
  238. package/src/examples/store.vitest.tsx +6 -4
  239. package/src/examples/swift-extension.vitest.tsx +31 -19
  240. package/src/examples/synonyms.vitest.tsx +93 -83
  241. package/src/examples/toast-action.tsx +160 -0
  242. package/src/examples/toast-action.vitest.tsx +404 -0
  243. package/src/examples/toast-variations.tsx +58 -57
  244. package/src/examples/toast-variations.vitest.tsx +186 -166
  245. package/src/extensions/dev.tsx +74 -33
  246. package/src/extensions/dev.vitest.tsx +162 -69
  247. package/src/extensions/home.tsx +5 -6
  248. package/src/extensions/react-refresh-init.tsx +59 -0
  249. package/src/internal/date-picker-widget.tsx +1 -1
  250. package/src/internal/dialog.tsx +59 -83
  251. package/src/internal/navigation.tsx +37 -4
  252. package/src/internal/providers.tsx +27 -315
  253. package/src/internal/scrollbox.tsx +1 -0
  254. package/src/release.tsx +16 -10
  255. package/src/state.tsx +36 -3
  256. package/src/theme.tsx +82 -51
  257. package/src/themes/aura.json +69 -0
  258. package/src/themes/ayu.json +80 -0
  259. package/src/themes/catppuccin-frappe.json +233 -0
  260. package/src/themes/catppuccin-macchiato.json +233 -0
  261. package/src/themes/catppuccin.json +112 -0
  262. package/src/themes/cobalt2.json +228 -0
  263. package/src/themes/cursor.json +249 -0
  264. package/src/themes/dracula.json +219 -0
  265. package/src/themes/everforest.json +241 -0
  266. package/src/themes/flexoki.json +237 -0
  267. package/src/themes/github-light.json +56 -0
  268. package/src/themes/github.json +241 -0
  269. package/src/themes/gruvbox.json +95 -0
  270. package/src/themes/kanagawa.json +77 -0
  271. package/src/themes/lucent-orng.json +227 -0
  272. package/src/themes/material.json +235 -0
  273. package/src/themes/matrix.json +77 -0
  274. package/src/themes/mercury.json +252 -0
  275. package/src/themes/monokai.json +221 -0
  276. package/src/themes/nightowl.json +221 -0
  277. package/src/themes/nord.json +223 -0
  278. package/src/themes/one-dark.json +84 -0
  279. package/src/themes/opencode-light.json +62 -0
  280. package/src/themes/opencode.json +245 -0
  281. package/src/themes/orng.json +245 -0
  282. package/src/themes/palenight.json +222 -0
  283. package/src/themes/rosepine.json +234 -0
  284. package/src/themes/solarized.json +223 -0
  285. package/src/themes/synthwave84.json +226 -0
  286. package/src/themes/termcast.json +227 -0
  287. package/src/themes/tokyonight.json +243 -0
  288. package/src/themes/vercel.json +255 -0
  289. package/src/themes/vesper.json +218 -0
  290. package/src/themes/zenburn.json +223 -0
  291. package/src/themes.ts +291 -0
  292. package/src/utils/run-command.tsx +23 -12
  293. package/src/utils.tsx +115 -18
  294. package/src/watcher.tsx +19 -0
@@ -30,22 +30,24 @@ test('list with sections navigation', async () => {
30
30
  "
31
31
 
32
32
 
33
- Simple List Example ────────────────────────────────────────────
33
+ Simple List Example ────────────────────────────────────────────
34
34
 
35
- Search items...
35
+ > Search items...
36
36
 
37
- Fruits ▲
38
- ›Apple Red and sweet Fresh [Popular] ▀
39
- Banana Yellow and nutritious Ripe
40
- Orange Citrus and juicy Fresh
41
- Grape Sweet clusters [Seasonal]
42
- Mango Tropical delight Imported
43
- Pineapple Sweet and tangy
44
- Strawberry Red and sweet [Popular]
45
-
37
+ Fruits ▲
38
+ ›Apple Red and sweet Fresh [Popular] ▀
39
+ Banana Yellow and nutritious Ripe
40
+ Orange Citrus and juicy Fresh
41
+ Grape Sweet clusters [Seasonal]
42
+ Mango Tropical delight Imported
43
+ Pineapple Sweet and tangy
44
+ Strawberry Red and sweet [Popular]
45
+
46
46
 
47
47
 
48
- ↵ view details ↑↓ navigate ^k actions"
48
+ ↵ view details ↑↓ navigate ^k actions
49
+
50
+ "
49
51
  `)
50
52
 
51
53
  // Verify first action title is shown in footer when item has actions (Apple has "View Details")
@@ -61,22 +63,24 @@ test('list with sections navigation', async () => {
61
63
  "
62
64
 
63
65
 
64
- Simple List Example ────────────────────────────────────────────
66
+ Simple List Example ────────────────────────────────────────────
65
67
 
66
- Search items...
68
+ > Search items...
67
69
 
68
- Fruits ▲
69
- Apple Red and sweet Fresh [Popular] ▀
70
- ›Banana Yellow and nutritious Ripe
71
- Orange Citrus and juicy Fresh
72
- Grape Sweet clusters [Seasonal]
73
- Mango Tropical delight Imported
74
- Pineapple Sweet and tangy
75
- Strawberry Red and sweet [Popular]
76
-
70
+ Fruits ▲
71
+ Apple Red and sweet Fresh [Popular] ▀
72
+ ›Banana Yellow and nutritious Ripe
73
+ Orange Citrus and juicy Fresh
74
+ Grape Sweet clusters [Seasonal]
75
+ Mango Tropical delight Imported
76
+ Pineapple Sweet and tangy
77
+ Strawberry Red and sweet [Popular]
78
+
77
79
 
78
80
 
79
- ↵ view details ↑↓ navigate ^k actions"
81
+ ↵ view details ↑↓ navigate ^k actions
82
+
83
+ "
80
84
  `)
81
85
 
82
86
  await session.press('down')
@@ -86,22 +90,24 @@ test('list with sections navigation', async () => {
86
90
  "
87
91
 
88
92
 
89
- Simple List Example ────────────────────────────────────────────
93
+ Simple List Example ────────────────────────────────────────────
90
94
 
91
- Search items...
95
+ > Search items...
92
96
 
93
- Fruits ▲
94
- Apple Red and sweet Fresh [Popular] ▀
95
- Banana Yellow and nutritious Ripe
96
- ›Orange Citrus and juicy Fresh
97
- Grape Sweet clusters [Seasonal]
98
- Mango Tropical delight Imported
99
- Pineapple Sweet and tangy
100
- Strawberry Red and sweet [Popular]
101
-
97
+ Fruits ▲
98
+ Apple Red and sweet Fresh [Popular] ▀
99
+ Banana Yellow and nutritious Ripe
100
+ ›Orange Citrus and juicy Fresh
101
+ Grape Sweet clusters [Seasonal]
102
+ Mango Tropical delight Imported
103
+ Pineapple Sweet and tangy
104
+ Strawberry Red and sweet [Popular]
105
+
102
106
 
103
107
 
104
- ↑↓ navigate ^k actions"
108
+ ↑↓ navigate ^k actions
109
+
110
+ "
105
111
  `)
106
112
 
107
113
  // Verify footer doesn't show action when item has no actions (Orange has no actions)
@@ -109,54 +115,34 @@ test('list with sections navigation', async () => {
109
115
 
110
116
  await session.press('enter')
111
117
 
118
+ // Enter on Orange does nothing since it has no primary action
112
119
  const afterEnterSnapshot = await session.text()
113
120
  expect(afterEnterSnapshot).toMatchInlineSnapshot(`
114
121
  "
115
122
 
116
123
 
117
- Simple List Example ────────────────────────────────────────────
118
-
119
- Search items...
124
+ Simple List Example ────────────────────────────────────────────
120
125
 
121
- Fruits ▲
122
- Apple Red and sweet Fresh [Popular] ▀
123
- Banana Yellow and nutritious Ripe
124
- ›Orange Citrus and juicy Fresh
125
- Grape Sweet clusters [Seasonal]
126
- Mango Tropical delight Imported
127
- Pineapple Sweet and tangy
128
- Strawberry Red and sweet [Popular]
129
-
126
+ > Search items...
130
127
 
128
+ Fruits ▲
129
+ Apple Red and sweet Fresh [Popular] ▀
130
+ Banana Yellow and nutritious Ripe
131
+ ›Orange Citrus and juicy Fresh
132
+ Grape Sweet clusters [Seasonal]
133
+ Mango Tropical delight Imported
134
+ Pineapple Sweet and tangy
135
+ Strawberry Red and sweet [Popular]
136
+
131
137
 
132
- ↑↓ navigate ^k actions"
133
- `)
134
138
 
135
- // Go back to list with Escape
136
- await session.press('esc')
139
+ ↑↓ navigate ^k actions
137
140
 
138
- const afterEscapeSnapshot = await session.text()
139
- expect(afterEscapeSnapshot).toMatchInlineSnapshot(`
140
141
  "
141
-
142
-
143
- Simple List Example ────────────────────────────────────────────
144
-
145
- Search items...
146
-
147
- Fruits ▲
148
- Apple Red and sweet Fresh [Popular] ▀
149
- Banana Yellow and nutritious Ripe
150
- ›Orange Citrus and juicy Fresh
151
- Grape Sweet clusters [Seasonal]
152
- Mango Tropical delight Imported
153
- Pineapple Sweet and tangy
154
- Strawberry Red and sweet [Popular]
155
-
156
-
157
-
158
- ↑↓ navigate ^k actions"
159
142
  `)
143
+
144
+ // Note: Not pressing escape since that would exit the app at root level
145
+ // and Orange item has no action to go back from anyway
160
146
  })
161
147
 
162
148
  test('list with sections search functionality', async () => {
@@ -179,12 +165,14 @@ test('list with sections search functionality', async () => {
179
165
  "
180
166
 
181
167
 
182
- Simple List Example ────────────────────────────────────────────
168
+ Simple List Example ────────────────────────────────────────────
169
+
170
+ > ban
183
171
 
184
- ban
172
+ ›Banana Yellow and nutritious Ripe
185
173
 
186
- ›Banana Yellow and nutritious Ripe
187
174
 
175
+ ↵ view details ↑↓ navigate ^k actions
188
176
 
189
177
 
190
178
 
@@ -194,7 +182,7 @@ test('list with sections search functionality', async () => {
194
182
 
195
183
 
196
184
 
197
- ↵ view details ↑↓ navigate ^k actions"
185
+ "
198
186
  `)
199
187
 
200
188
  // Clear search and type "let" to search for Lettuce
@@ -213,12 +201,14 @@ test('list with sections search functionality', async () => {
213
201
  "
214
202
 
215
203
 
216
- Simple List Example ────────────────────────────────────────────
204
+ Simple List Example ────────────────────────────────────────────
205
+
206
+ > let
217
207
 
218
- let
208
+ ›Lettuce Green and fresh
219
209
 
220
- Lettuce Green and fresh
221
210
 
211
+ ↵ view details ↑↓ navigate ^k actions
222
212
 
223
213
 
224
214
 
@@ -228,7 +218,7 @@ test('list with sections search functionality', async () => {
228
218
 
229
219
 
230
220
 
231
- ↵ view details ↑↓ navigate ^k actions"
221
+ "
232
222
  `)
233
223
 
234
224
  // Clear search to show all items again
@@ -241,22 +231,24 @@ test('list with sections search functionality', async () => {
241
231
  "
242
232
 
243
233
 
244
- Simple List Example ────────────────────────────────────────────
234
+ Simple List Example ────────────────────────────────────────────
235
+
236
+ > Search items...
245
237
 
246
- Search items...
238
+ Fruits ▲
239
+ ›Apple Red and sweet Fresh [Popular] ▀
240
+ Banana Yellow and nutritious Ripe
241
+ Orange Citrus and juicy Fresh
242
+ Grape Sweet clusters [Seasonal]
243
+ Mango Tropical delight Imported
244
+ Pineapple Sweet and tangy
245
+ Strawberry Red and sweet [Popular]
246
+
247
247
 
248
- Fruits ▲
249
- ›Apple Red and sweet Fresh [Popular] ▀
250
- Banana Yellow and nutritious Ripe
251
- Orange Citrus and juicy Fresh
252
- Grape Sweet clusters [Seasonal]
253
- Mango Tropical delight Imported
254
- Pineapple Sweet and tangy
255
- Strawberry Red and sweet [Popular]
256
-
257
248
 
249
+ ↵ view details ↑↓ navigate ^k actions
258
250
 
259
- ↵ view details ↑↓ navigate ^k actions"
251
+ "
260
252
  `)
261
253
 
262
254
  // Search for "bread"
@@ -272,13 +264,14 @@ test('list with sections search functionality', async () => {
272
264
  "
273
265
 
274
266
 
275
- Simple List Example ────────────────────────────────────────────
267
+ Simple List Example ────────────────────────────────────────────
276
268
 
277
- bread
269
+ > bread
278
270
 
279
- Bread Freshly baked Today [New]
271
+ Bread Freshly baked Today [New]
280
272
 
281
273
 
274
+ ↵ view details ↑↓ navigate ^k actions
282
275
 
283
276
 
284
277
 
@@ -287,7 +280,8 @@ test('list with sections search functionality', async () => {
287
280
 
288
281
 
289
282
 
290
- ↵ view details ↑↓ navigate ^k actions"
283
+
284
+ "
291
285
  `)
292
286
 
293
287
  // Select the bread item
@@ -300,20 +294,22 @@ test('list with sections search functionality', async () => {
300
294
 
301
295
 
302
296
 
303
- Banana
297
+ Bread
304
298
 
305
- A yellow tropical fruit that's nutritious and energy-rich.
299
+ Freshly baked bread from our bakery.
306
300
 
307
- Benefits
308
- - High in potassium
309
- - Natural energy booster
310
- - Aids digestion
301
+ Product Details
302
+ - Baked fresh daily
303
+ - Made with organic flour
304
+ - No preservatives
305
+ - Perfect for sandwiches or toast
311
306
 
312
307
 
308
+ esc go back
313
309
 
314
310
 
315
311
 
316
- esc go back"
312
+ "
317
313
  `)
318
314
  }, 10000)
319
315
 
@@ -332,22 +328,24 @@ test('list click functionality', async () => {
332
328
  "
333
329
 
334
330
 
335
- Simple List Example ────────────────────────────────────────────
331
+ Simple List Example ────────────────────────────────────────────
332
+
333
+ > Search items...
336
334
 
337
- Search items...
335
+ Fruits ▲
336
+ Apple Red and sweet Fresh [Popular] ▀
337
+ ›Banana Yellow and nutritious Ripe
338
+ Orange Citrus and juicy Fresh
339
+ Grape Sweet clusters [Seasonal]
340
+ Mango Tropical delight Imported
341
+ Pineapple Sweet and tangy
342
+ Strawberry Red and sweet [Popular]
343
+
338
344
 
339
- Fruits ▲
340
- Apple Red and sweet Fresh [Popular] ▀
341
- ›Banana Yellow and nutritious Ripe
342
- Orange Citrus and juicy Fresh
343
- Grape Sweet clusters [Seasonal]
344
- Mango Tropical delight Imported
345
- Pineapple Sweet and tangy
346
- Strawberry Red and sweet [Popular]
347
-
348
345
 
346
+ ↵ view details ↑↓ navigate ^k actions
349
347
 
350
- ↵ view details ↑↓ navigate ^k actions"
348
+ "
351
349
  `)
352
350
 
353
351
  // Click on "Apple" item
@@ -358,22 +356,24 @@ test('list click functionality', async () => {
358
356
  "
359
357
 
360
358
 
361
- Simple List Example ────────────────────────────────────────────
359
+ Simple List Example ────────────────────────────────────────────
360
+
361
+ > Search items...
362
362
 
363
- Search items...
363
+ Fruits ▲
364
+ ›Apple Red and sweet Fresh [Popular] ▀
365
+ Banana Yellow and nutritious Ripe
366
+ Orange Citrus and juicy Fresh
367
+ Grape Sweet clusters [Seasonal]
368
+ Mango Tropical delight Imported
369
+ Pineapple Sweet and tangy
370
+ Strawberry Red and sweet [Popular]
371
+
364
372
 
365
- Fruits ▲
366
- ›Apple Red and sweet Fresh [Popular] ▀
367
- Banana Yellow and nutritious Ripe
368
- Orange Citrus and juicy Fresh
369
- Grape Sweet clusters [Seasonal]
370
- Mango Tropical delight Imported
371
- Pineapple Sweet and tangy
372
- Strawberry Red and sweet [Popular]
373
-
374
373
 
374
+ ↵ view details ↑↓ navigate ^k actions
375
375
 
376
- ↵ view details ↑↓ navigate ^k actions"
376
+ "
377
377
  `)
378
378
 
379
379
  // Click on "Grape" item (visible in initial view)
@@ -384,22 +384,24 @@ test('list click functionality', async () => {
384
384
  "
385
385
 
386
386
 
387
- Simple List Example ────────────────────────────────────────────
387
+ Simple List Example ────────────────────────────────────────────
388
388
 
389
- Search items...
389
+ > Search items...
390
390
 
391
- Fruits ▲
392
- Apple Red and sweet Fresh [Popular] ▀
393
- Banana Yellow and nutritious Ripe
394
- Orange Citrus and juicy Fresh
395
- ›Grape Sweet clusters [Seasonal]
396
- Mango Tropical delight Imported
397
- Pineapple Sweet and tangy
398
- Strawberry Red and sweet [Popular]
399
-
391
+ Fruits ▲
392
+ Apple Red and sweet Fresh [Popular] ▀
393
+ Banana Yellow and nutritious Ripe
394
+ Orange Citrus and juicy Fresh
395
+ ›Grape Sweet clusters [Seasonal]
396
+ Mango Tropical delight Imported
397
+ Pineapple Sweet and tangy
398
+ Strawberry Red and sweet [Popular]
399
+
400
400
 
401
401
 
402
- ↑↓ navigate ^k actions"
402
+ ↑↓ navigate ^k actions
403
+
404
+ "
403
405
  `)
404
406
  }, 10000)
405
407
 
@@ -419,24 +421,24 @@ test('list actions panel with ctrl+k', async () => {
419
421
  "
420
422
 
421
423
 
422
- Simple List Example ────────────────────────────────────────────
423
-
424
- Search items...
425
-
426
- Fruits ▲
427
- ›┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
428
-
429
- ┃ esc
430
-
431
- Search actions...
432
-
433
- ┃ ›View Details
434
- Add to Cart
435
-
436
-
437
-
438
-
439
- "
424
+ Simple List Example ────────────────────────────────────────────
425
+
426
+ ╭────────────────────────────────────────────────────────────────╮
427
+ │ │
428
+ │ Actions esc │
429
+ │ │
430
+ │ > Search actions... │
431
+ │ │
432
+ │ ›View Details │
433
+ Add to Cart │
434
+ │ │
435
+ │ Settings │
436
+ Change Theme... │
437
+ │ │
438
+ │ │
439
+ │ │
440
+ │ ↵ select ↑↓ navigate │
441
+ │ │"
440
442
  `)
441
443
 
442
444
  // Navigate down to second action
@@ -447,24 +449,24 @@ test('list actions panel with ctrl+k', async () => {
447
449
  "
448
450
 
449
451
 
450
- Simple List Example ────────────────────────────────────────────
451
-
452
- Search items...
453
-
454
- Fruits ▲
455
- ›┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
456
-
457
- ┃ esc
458
-
459
- ┃ Search actions...
460
-
461
- View Details
462
- ┃ ›Add to Cart
463
-
464
-
465
-
466
-
467
- "
452
+ Simple List Example ────────────────────────────────────────────
453
+
454
+ ╭────────────────────────────────────────────────────────────────╮
455
+ │ │
456
+ │ Actions esc │
457
+ │ │
458
+ │ > Search actions... │
459
+ │ │
460
+ │ View Details │
461
+ │ ›Add to Cart │
462
+ │ │
463
+ Settings │
464
+ │ Change Theme... │
465
+ │ │
466
+ │ │
467
+ │ │
468
+ │ ↵ select ↑↓ navigate │
469
+ │ │"
468
470
  `)
469
471
 
470
472
  // Trigger the second action (Add to Cart)
@@ -475,24 +477,24 @@ test('list actions panel with ctrl+k', async () => {
475
477
  "
476
478
 
477
479
 
478
- Simple List Example ────────────────────────────────────────────
480
+ Simple List Example ────────────────────────────────────────────
481
+
482
+ > Search items...
479
483
 
480
- Search items...
484
+ Fruits ▲
485
+ ›Apple Red and sweet Fresh [Popular] ▀
486
+ Banana Yellow and nutritious Ripe
487
+ Orange Citrus and juicy Fresh
488
+ Grape Sweet clusters [Seasonal]
489
+ Mango Tropical delight Imported
490
+ Pineapple Sweet and tangy
491
+ Strawberry Red and sweet [Popular]
492
+
481
493
 
482
- Fruits ▲
483
- ›Apple Red and sweet Fresh [Popular] █
484
- Banana Yellow and nutritious Ripe █
485
- Orange Citrus and juicy Fresh █
486
- Grape Sweet clusters [Seasonal] █
487
- Mango Tropical delight Imported
488
- Pineapple Sweet and tangy
489
- Strawberry Red and sweet [Popular]
490
494
 
491
- Vegetables ▼
492
- ┌─────────────────────────────────────┐
493
- │ ✓ Added to Cart │
494
- │ Apple has been added to your cart │
495
- └─────────────────────────────────────┘"
495
+ ✓ Added to Cart Apple has been added to your cart
496
+
497
+ "
496
498
  `)
497
499
  }, 10000)
498
500
 
@@ -524,19 +526,19 @@ test('filtering selects first visible item and navigation works', async () => {
524
526
  return /ora/.test(text) && /Orange/.test(text)
525
527
  },
526
528
  })
527
- // TODO: first visible item should be selected immediately, pending flushSync support
528
529
  expect(afterFilterSnapshot).toMatchInlineSnapshot(`
529
530
  "
530
531
 
531
532
 
532
- Simple List Example ────────────────────────────────────────────
533
+ Simple List Example ────────────────────────────────────────────
533
534
 
534
- ora
535
+ > ora
535
536
 
536
- Orange Citrus and juicy Fresh
537
- Carrot Orange and crunchy [Healthy]
537
+ Orange Citrus and juicy Fresh
538
+ Carrot Orange and crunchy [Healthy]
538
539
 
539
540
 
541
+ ↑↓ navigate ^k actions
540
542
 
541
543
 
542
544
 
@@ -544,7 +546,8 @@ test('filtering selects first visible item and navigation works', async () => {
544
546
 
545
547
 
546
548
 
547
- ↵ view details ↑↓ navigate ^k actions"
549
+
550
+ "
548
551
  `)
549
552
 
550
553
  // Press down - move function corrects invalid selection to first visible, then moves
@@ -555,14 +558,15 @@ test('filtering selects first visible item and navigation works', async () => {
555
558
  "
556
559
 
557
560
 
558
- Simple List Example ────────────────────────────────────────────
561
+ Simple List Example ────────────────────────────────────────────
559
562
 
560
- ora
563
+ > ora
561
564
 
562
- Orange Citrus and juicy Fresh
563
- Carrot Orange and crunchy [Healthy]
565
+ Orange Citrus and juicy Fresh
566
+ Carrot Orange and crunchy [Healthy]
564
567
 
565
568
 
569
+ ↵ view details ↑↓ navigate ^k actions
566
570
 
567
571
 
568
572
 
@@ -570,7 +574,8 @@ test('filtering selects first visible item and navigation works', async () => {
570
574
 
571
575
 
572
576
 
573
- ↑↓ navigate ^k actions"
577
+
578
+ "
574
579
  `)
575
580
 
576
581
  // Press down again
@@ -581,13 +586,15 @@ test('filtering selects first visible item and navigation works', async () => {
581
586
  "
582
587
 
583
588
 
584
- Simple List Example ────────────────────────────────────────────
589
+ Simple List Example ────────────────────────────────────────────
590
+
591
+ > ora
585
592
 
586
- ora
593
+ ›Orange Citrus and juicy Fresh
594
+ Carrot Orange and crunchy [Healthy]
587
595
 
588
- Orange Citrus and juicy Fresh
589
- ›Carrot Orange and crunchy [Healthy]
590
596
 
597
+ ↑↓ navigate ^k actions
591
598
 
592
599
 
593
600
 
@@ -596,7 +603,7 @@ test('filtering selects first visible item and navigation works', async () => {
596
603
 
597
604
 
598
605
 
599
- ↵ view details ↑↓ navigate ^k actions"
606
+ "
600
607
  `)
601
608
 
602
609
  // Press down to wrap back
@@ -607,13 +614,15 @@ test('filtering selects first visible item and navigation works', async () => {
607
614
  "
608
615
 
609
616
 
610
- Simple List Example ────────────────────────────────────────────
617
+ Simple List Example ────────────────────────────────────────────
618
+
619
+ > ora
611
620
 
612
- ora
621
+ Orange Citrus and juicy Fresh
622
+ ›Carrot Orange and crunchy [Healthy]
613
623
 
614
- ›Orange Citrus and juicy Fresh
615
- Carrot Orange and crunchy [Healthy]
616
624
 
625
+ ↵ view details ↑↓ navigate ^k actions
617
626
 
618
627
 
619
628
 
@@ -622,7 +631,7 @@ test('filtering selects first visible item and navigation works', async () => {
622
631
 
623
632
 
624
633
 
625
- ↑↓ navigate ^k actions"
634
+ "
626
635
  `)
627
636
  }, 10000)
628
637
 
@@ -638,22 +647,24 @@ test('list scrollbox scrolling with sections', async () => {
638
647
  "
639
648
 
640
649
 
641
- Simple List Example ────────────────────────────────────────────
650
+ Simple List Example ────────────────────────────────────────────
651
+
652
+ > Search items...
642
653
 
643
- Search items...
654
+ Fruits ▲
655
+ ›Apple Red and sweet Fresh [Popular] ▀
656
+ Banana Yellow and nutritious Ripe
657
+ Orange Citrus and juicy Fresh
658
+ Grape Sweet clusters [Seasonal]
659
+ Mango Tropical delight Imported
660
+ Pineapple Sweet and tangy
661
+ Strawberry Red and sweet [Popular]
662
+
644
663
 
645
- Fruits ▲
646
- ›Apple Red and sweet Fresh [Popular] ▀
647
- Banana Yellow and nutritious Ripe
648
- Orange Citrus and juicy Fresh
649
- Grape Sweet clusters [Seasonal]
650
- Mango Tropical delight Imported
651
- Pineapple Sweet and tangy
652
- Strawberry Red and sweet [Popular]
653
-
654
664
 
665
+ ↵ view details ↑↓ navigate ^k actions
655
666
 
656
- ↵ view details ↑↓ navigate ^k actions"
667
+ "
657
668
  `)
658
669
 
659
670
  // Navigate down through Fruits section
@@ -669,22 +680,24 @@ test('list scrollbox scrolling with sections', async () => {
669
680
  "
670
681
 
671
682
 
672
- Simple List Example ────────────────────────────────────────────
683
+ Simple List Example ────────────────────────────────────────────
684
+
685
+ > Search items...
673
686
 
674
- Search items...
687
+ Orange Citrus and juicy Fresh ▲
688
+ Grape Sweet clusters [Seasonal]
689
+ Mango Tropical delight Imported
690
+ Pineapple Sweet and tangy ▀
691
+ ›Strawberry Red and sweet [Popular]
675
692
 
676
- Orange Citrus and juicy Fresh ▲
677
- Grape Sweet clusters [Seasonal]
678
- Mango Tropical delight Imported
679
- Pineapple Sweet and tangy ▀
680
- ›Strawberry Red and sweet [Popular]
693
+ Vegetables
694
+ Carrot Orange and crunchy [Healthy]
695
+ Lettuce Green and fresh ▼
681
696
 
682
- Vegetables
683
- Carrot Orange and crunchy [Healthy]
684
- Lettuce Green and fresh ▼
685
697
 
698
+ ↑↓ navigate ^k actions
686
699
 
687
- ↑↓ navigate ^k actions"
700
+ "
688
701
  `)
689
702
 
690
703
  // Continue to Vegetables section
@@ -697,22 +710,24 @@ test('list scrollbox scrolling with sections', async () => {
697
710
  "
698
711
 
699
712
 
700
- Simple List Example ────────────────────────────────────────────
713
+ Simple List Example ────────────────────────────────────────────
701
714
 
702
- Search items...
715
+ > Search items...
703
716
 
704
-
705
- Vegetables
706
- Carrot Orange and crunchy [Healthy]
707
- Lettuce Green and fresh
708
- ›Broccoli Green florets [Healthy]
709
- Spinach Leafy greens Organic
710
- Tomato Red and ripe ▀
711
- Cucumber Cool and crisp
712
- Bell Pepper Colorful and crunchy [Fresh] ▼
717
+
718
+ Vegetables
719
+ Carrot Orange and crunchy [Healthy]
720
+ Lettuce Green and fresh
721
+ ›Broccoli Green florets [Healthy]
722
+ Spinach Leafy greens Organic
723
+ Tomato Red and ripe ▀
724
+ Cucumber Cool and crisp
725
+ Bell Pepper Colorful and crunchy [Fresh] ▼
713
726
 
714
727
 
715
- ↑↓ navigate ^k actions"
728
+ ↑↓ navigate ^k actions
729
+
730
+ "
716
731
  `)
717
732
 
718
733
  // Navigate to the last items
@@ -727,22 +742,24 @@ test('list scrollbox scrolling with sections', async () => {
727
742
  "
728
743
 
729
744
 
730
- Simple List Example ────────────────────────────────────────────
745
+ Simple List Example ────────────────────────────────────────────
746
+
747
+ > Search items...
731
748
 
732
- Search items...
749
+ Carrot Orange and crunchy [Healthy] ▲
750
+ Lettuce Green and fresh
751
+ Broccoli Green florets [Healthy]
752
+ Spinach Leafy greens Organic
753
+ Tomato Red and ripe
754
+ Cucumber Cool and crisp
755
+ Bell Pepper Colorful and crunchy [Fresh]
756
+
757
+ ›Bread Freshly baked Today [New] ▼
733
758
 
734
- Carrot Orange and crunchy [Healthy] ▲
735
- Lettuce Green and fresh
736
- Broccoli Green florets [Healthy]
737
- Spinach Leafy greens Organic
738
- Tomato Red and ripe
739
- Cucumber Cool and crisp
740
- Bell Pepper Colorful and crunchy [Fresh]
741
-
742
- ›Bread Freshly baked Today [New] ▼
743
759
 
760
+ ↵ view details ↑↓ navigate ^k actions
744
761
 
745
- ↵ view details ↑↓ navigate ^k actions"
762
+ "
746
763
  `)
747
764
 
748
765
  // Navigate back up to top
@@ -755,21 +772,23 @@ test('list scrollbox scrolling with sections', async () => {
755
772
  "
756
773
 
757
774
 
758
- Simple List Example ────────────────────────────────────────────
775
+ Simple List Example ────────────────────────────────────────────
776
+
777
+ > Search items...
759
778
 
760
- Search items...
779
+ Carrot Orange and crunchy [Healthy] ▲
780
+ Lettuce Green and fresh
781
+ Broccoli Green florets [Healthy]
782
+ Spinach Leafy greens Organic
783
+ Tomato Red and ripe
784
+ Cucumber Cool and crisp
785
+ Bell Pepper Colorful and crunchy [Fresh]
786
+
787
+ ›Bread Freshly baked Today [New] ▼
761
788
 
762
- Carrot Orange and crunchy [Healthy] ▲
763
- Lettuce Green and fresh
764
- Broccoli Green florets [Healthy]
765
- Spinach Leafy greens Organic
766
- Tomato Red and ripe
767
- Cucumber Cool and crisp
768
- Bell Pepper Colorful and crunchy [Fresh]
769
-
770
- ›Bread Freshly baked Today [New] ▼
771
789
 
790
+ ↵ view details ↑↓ navigate ^k actions
772
791
 
773
- ↵ view details ↑↓ navigate ^k actions"
792
+ "
774
793
  `)
775
794
  }, 15000)