termcast 1.3.50 → 1.3.51

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 (164) hide show
  1. package/dist/apis/environment.d.ts +1 -0
  2. package/dist/apis/environment.d.ts.map +1 -1
  3. package/dist/apis/environment.js +5 -0
  4. package/dist/apis/environment.js.map +1 -1
  5. package/dist/app.d.ts +33 -0
  6. package/dist/app.d.ts.map +1 -0
  7. package/dist/app.js +1125 -0
  8. package/dist/app.js.map +1 -0
  9. package/dist/cli.js +80 -0
  10. package/dist/cli.js.map +1 -1
  11. package/dist/components/detail.d.ts.map +1 -1
  12. package/dist/components/detail.js +20 -17
  13. package/dist/components/detail.js.map +1 -1
  14. package/dist/components/dropdown.d.ts.map +1 -1
  15. package/dist/components/dropdown.js +3 -2
  16. package/dist/components/dropdown.js.map +1 -1
  17. package/dist/components/footer.d.ts +6 -0
  18. package/dist/components/footer.d.ts.map +1 -1
  19. package/dist/components/footer.js +15 -6
  20. package/dist/components/footer.js.map +1 -1
  21. package/dist/components/form/checkbox.d.ts.map +1 -1
  22. package/dist/components/form/checkbox.js +1 -13
  23. package/dist/components/form/checkbox.js.map +1 -1
  24. package/dist/components/form/date-picker.js +2 -2
  25. package/dist/components/form/date-picker.js.map +1 -1
  26. package/dist/components/form/description.js +1 -1
  27. package/dist/components/form/description.js.map +1 -1
  28. package/dist/components/form/dropdown.d.ts.map +1 -1
  29. package/dist/components/form/dropdown.js +19 -3
  30. package/dist/components/form/dropdown.js.map +1 -1
  31. package/dist/components/form/file-picker.d.ts.map +1 -1
  32. package/dist/components/form/file-picker.js +22 -4
  33. package/dist/components/form/file-picker.js.map +1 -1
  34. package/dist/components/form/index.d.ts +3 -1
  35. package/dist/components/form/index.d.ts.map +1 -1
  36. package/dist/components/form/index.js +6 -4
  37. package/dist/components/form/index.js.map +1 -1
  38. package/dist/components/form/password-field.js +3 -3
  39. package/dist/components/form/password-field.js.map +1 -1
  40. package/dist/components/form/text-area.d.ts.map +1 -1
  41. package/dist/components/form/text-area.js +29 -6
  42. package/dist/components/form/text-area.js.map +1 -1
  43. package/dist/components/form/text-field.js +3 -3
  44. package/dist/components/form/text-field.js.map +1 -1
  45. package/dist/components/heatmap.d.ts +80 -0
  46. package/dist/components/heatmap.d.ts.map +1 -0
  47. package/dist/components/heatmap.js +405 -0
  48. package/dist/components/heatmap.js.map +1 -0
  49. package/dist/components/list.d.ts +2 -0
  50. package/dist/components/list.d.ts.map +1 -1
  51. package/dist/components/list.js +80 -52
  52. package/dist/components/list.js.map +1 -1
  53. package/dist/components/markdown.d.ts +7 -0
  54. package/dist/components/markdown.d.ts.map +1 -0
  55. package/dist/components/markdown.js +19 -0
  56. package/dist/components/markdown.js.map +1 -0
  57. package/dist/components/metadata.d.ts.map +1 -1
  58. package/dist/components/metadata.js +4 -1
  59. package/dist/components/metadata.js.map +1 -1
  60. package/dist/components/progress-bar.d.ts +37 -0
  61. package/dist/components/progress-bar.d.ts.map +1 -0
  62. package/dist/components/progress-bar.js +34 -0
  63. package/dist/components/progress-bar.js.map +1 -0
  64. package/dist/components/table.d.ts +3 -2
  65. package/dist/components/table.d.ts.map +1 -1
  66. package/dist/components/table.js +78 -63
  67. package/dist/components/table.js.map +1 -1
  68. package/dist/diagram-parser.d.ts +17 -3
  69. package/dist/diagram-parser.d.ts.map +1 -1
  70. package/dist/diagram-parser.js +17 -3
  71. package/dist/diagram-parser.js.map +1 -1
  72. package/dist/examples/list-slot.d.ts +2 -0
  73. package/dist/examples/list-slot.d.ts.map +1 -0
  74. package/dist/examples/list-slot.js +14 -0
  75. package/dist/examples/list-slot.js.map +1 -0
  76. package/dist/examples/list-with-dropdown.js +2 -4
  77. package/dist/examples/list-with-dropdown.js.map +1 -1
  78. package/dist/examples/simple-heatmap.d.ts +2 -0
  79. package/dist/examples/simple-heatmap.d.ts.map +1 -0
  80. package/dist/examples/simple-heatmap.js +37 -0
  81. package/dist/examples/simple-heatmap.js.map +1 -0
  82. package/dist/examples/simple-progress-bar.d.ts +2 -0
  83. package/dist/examples/simple-progress-bar.d.ts.map +1 -0
  84. package/dist/examples/simple-progress-bar.js +36 -0
  85. package/dist/examples/simple-progress-bar.js.map +1 -0
  86. package/dist/index.d.ts +6 -0
  87. package/dist/index.d.ts.map +1 -1
  88. package/dist/index.js +6 -0
  89. package/dist/index.js.map +1 -1
  90. package/dist/internal/date-picker-widget.d.ts.map +1 -1
  91. package/dist/internal/date-picker-widget.js +5 -4
  92. package/dist/internal/date-picker-widget.js.map +1 -1
  93. package/dist/internal/navigation.d.ts.map +1 -1
  94. package/dist/internal/navigation.js +7 -2
  95. package/dist/internal/navigation.js.map +1 -1
  96. package/dist/internal/providers.d.ts.map +1 -1
  97. package/dist/internal/providers.js +42 -4
  98. package/dist/internal/providers.js.map +1 -1
  99. package/dist/logger.js +6 -1
  100. package/dist/logger.js.map +1 -1
  101. package/dist/state.d.ts +2 -0
  102. package/dist/state.d.ts.map +1 -1
  103. package/dist/state.js +31 -2
  104. package/dist/state.js.map +1 -1
  105. package/dist/theme.d.ts +1 -0
  106. package/dist/theme.d.ts.map +1 -1
  107. package/dist/theme.js +23 -1
  108. package/dist/theme.js.map +1 -1
  109. package/dist/utils.d.ts.map +1 -1
  110. package/dist/utils.js +6 -1
  111. package/dist/utils.js.map +1 -1
  112. package/package.json +3 -3
  113. package/src/apis/environment.tsx +6 -0
  114. package/src/app.tsx +1487 -0
  115. package/src/assets/default-app-icon.png +0 -0
  116. package/src/cli.tsx +105 -0
  117. package/src/components/detail.tsx +32 -22
  118. package/src/components/dropdown.tsx +3 -2
  119. package/src/components/footer.tsx +37 -7
  120. package/src/components/form/checkbox.tsx +2 -17
  121. package/src/components/form/date-picker.tsx +2 -2
  122. package/src/components/form/description.tsx +1 -1
  123. package/src/components/form/dropdown.tsx +22 -3
  124. package/src/components/form/file-picker.tsx +33 -10
  125. package/src/components/form/index.tsx +10 -6
  126. package/src/components/form/password-field.tsx +3 -3
  127. package/src/components/form/text-area.tsx +31 -6
  128. package/src/components/form/text-field.tsx +3 -3
  129. package/src/components/heatmap.tsx +584 -0
  130. package/src/components/list.tsx +135 -72
  131. package/src/components/markdown.tsx +30 -0
  132. package/src/components/metadata.tsx +9 -2
  133. package/src/components/progress-bar.tsx +112 -0
  134. package/src/components/table.tsx +88 -71
  135. package/src/diagram-parser.tsx +17 -3
  136. package/src/examples/bar-graph-weekly.vitest.tsx +4 -4
  137. package/src/examples/detail-metadata-showcase.vitest.tsx +12 -12
  138. package/src/examples/form-basic.vitest.tsx +117 -16
  139. package/src/examples/graph-bar-chart.vitest.tsx +2 -2
  140. package/src/examples/graph-row.vitest.tsx +10 -10
  141. package/src/examples/internal/descendants-rerender.vitest.tsx +94 -46
  142. package/src/examples/internal/simple-scrollbox.vitest.tsx +38 -14
  143. package/src/examples/list-dropdown-default.vitest.tsx +78 -58
  144. package/src/examples/list-slot.tsx +38 -0
  145. package/src/examples/list-with-detail.vitest.tsx +8 -8
  146. package/src/examples/list-with-dropdown.tsx +2 -2
  147. package/src/examples/list-with-dropdown.vitest.tsx +16 -16
  148. package/src/examples/list-with-sections.vitest.tsx +45 -32
  149. package/src/examples/simple-detail-table.vitest.tsx +2 -2
  150. package/src/examples/simple-file-picker.vitest.tsx +1 -1
  151. package/src/examples/simple-grid.vitest.tsx +27 -53
  152. package/src/examples/simple-heatmap.tsx +63 -0
  153. package/src/examples/simple-heatmap.vitest.tsx +88 -0
  154. package/src/examples/simple-progress-bar.tsx +82 -0
  155. package/src/examples/simple-progress-bar.vitest.tsx +72 -0
  156. package/src/examples/table-edge-cases.vitest.tsx +1 -1
  157. package/src/index.tsx +19 -0
  158. package/src/internal/date-picker-widget.tsx +23 -12
  159. package/src/internal/navigation.tsx +7 -2
  160. package/src/internal/providers.tsx +48 -3
  161. package/src/logger.tsx +6 -1
  162. package/src/state.tsx +38 -2
  163. package/src/theme.tsx +26 -2
  164. package/src/utils.tsx +6 -1
@@ -30,17 +30,29 @@ test(
30
30
  [1] Banana (without hook, renders: 8)
31
31
  [2] Cherry (without hook, renders: 9)
32
32
 
33
- ┌──────────────────────────────────────────────────────────────────────────┐
34
-
35
- │ Render Counts:
36
- │ parent: 1
37
- │ parentWithHook: 0
38
- │ independentChild: 0
39
- │ independentChildWithHook: 0
40
- │ descendantItem: 3
41
- │ descendantItemWithHook: 0
42
-
43
- └──────────────────────────────────────────────────────────────────────────┘
33
+ ┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
34
+
35
+ │ Render Counts:
36
+ │ parent: 1
37
+ │ parentWithHook: 0
38
+ │ independentChild: 0
39
+ │ independentChildWithHook: 0
40
+ │ descendantItem: 3
41
+ │ descendantItemWithHook: 0
42
+
43
+ └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
44
+
45
+
46
+
47
+
48
+
49
+
50
+
51
+
52
+
53
+
54
+
55
+
44
56
 
45
57
 
46
58
  "
@@ -75,17 +87,29 @@ test(
75
87
  [1] Banana (without hook, renders: 8)
76
88
  [2] Cherry (without hook, renders: 9)
77
89
 
78
- ┌──────────────────────────────────────────────────────────────────────────┐
79
-
80
- │ Render Counts:
81
- │ parent: 0
82
- │ parentWithHook: 1
83
- │ independentChild: 0
84
- │ independentChildWithHook: 0
85
- │ descendantItem: 3
86
- │ descendantItemWithHook: 0
87
-
88
- └──────────────────────────────────────────────────────────────────────────┘
90
+ ┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
91
+
92
+ │ Render Counts:
93
+ │ parent: 0
94
+ │ parentWithHook: 1
95
+ │ independentChild: 0
96
+ │ independentChildWithHook: 0
97
+ │ descendantItem: 3
98
+ │ descendantItemWithHook: 0
99
+
100
+ └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
89
113
 
90
114
  "
91
115
  `)
@@ -115,26 +139,38 @@ test(
115
139
  "
116
140
 
117
141
 
118
- Items:i3:|i[a]padde|t[d]ideleteh|h[r] reset counts
119
-
142
+ Scenario: independent-child-with-hook
143
+ Items: 3 | [a] add | [d] delete | [r] reset counts
120
144
 
121
145
  Parent without hook - renders: 2
122
146
  Independent child with hook - renders: 3, items: 3
123
- [0]eApplen(withoutwhook,trenders:r7)ders: 2
147
+ Independent child without hook - renders: 2
148
+ [0] Apple (without hook, renders: 7)
124
149
  [1] Banana (without hook, renders: 8)
125
150
  [2] Cherry (without hook, renders: 9)
126
151
 
152
+ ┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
153
+ │ │
154
+ │ Render Counts: │
155
+ │ parent: 1 │
156
+ │ parentWithHook: 0 │
157
+ │ independentChild: 1 │
158
+ │ independentChildWithHook: 1 │
159
+ │ descendantItem: 3 │
160
+ │ descendantItemWithHook: 0 │
161
+ │ │
162
+ └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+
172
+
127
173
 
128
- ┌──────────────────────────────────────────────────────────────────────────┐
129
- │ │
130
- │ Reparent:u1ts: │
131
- │ parentWithHook: 0 │
132
- │ independentChild: 1 │
133
- │ independentChildWithHook: 1 │
134
- │ descendantItem: 3 │
135
- │ descendantItemWithHook: 0 │
136
- │ │
137
- └──────────────────────────────────────────────────────────────────────────┘
138
174
 
139
175
  "
140
176
  `)
@@ -172,17 +208,29 @@ test(
172
208
  [1] Banana (with hook, renders: 8, total: 3)
173
209
  [2] Cherry (with hook, renders: 9, total: 3)
174
210
 
175
- ┌──────────────────────────────────────────────────────────────────────────┐
176
-
177
- │ Render Counts:
178
- │ parent: 1
179
- │ parentWithHook: 0
180
- │ independentChild: 0
181
- │ independentChildWithHook: 0
182
- │ descendantItem: 0
183
- │ descendantItemWithHook: 3
184
-
185
- └──────────────────────────────────────────────────────────────────────────┘
211
+ ┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
212
+
213
+ │ Render Counts:
214
+ │ parent: 1
215
+ │ parentWithHook: 0
216
+ │ independentChild: 0
217
+ │ independentChildWithHook: 0
218
+ │ descendantItem: 0
219
+ │ descendantItemWithHook: 3
220
+
221
+ └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
222
+
223
+
224
+
225
+
226
+
227
+
228
+
229
+
230
+
231
+
232
+
233
+
186
234
 
187
235
 
188
236
  "
@@ -23,20 +23,32 @@ test('simple scrollbox navigation and scrolling', async () => {
23
23
 
24
24
 
25
25
  Simple ScrollBox Demo
26
-
27
- Item 1 - This is content for item number 1. Lorem ipsum dolor sit amet,
28
- consectetur adipiscing elit.
26
+
27
+ Item 1 - This is content for item number 1. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
29
28
 
30
29
 
31
30
 
32
- Item 2 - This is content for item number 2. Lorem ipsum dolor sit amet,
33
- consectetur adipiscing elit.
31
+ Item 2 - This is content for item number 2. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
34
32
 
35
33
 
36
34
 
37
- Item 3 - This is content for item number 3. Lorem ipsum dolor sit amet,
38
- consectetur adipiscing elit.
35
+ Item 3 - This is content for item number 3. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
36
+
37
+
38
+
39
+ Item 4 - This is content for item number 4. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
40
+
41
+
42
+
43
+ Item 5 - This is content for item number 5. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
44
+
45
+
46
+
47
+ Item 6 - This is content for item number 6. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
48
+
49
+
39
50
 
51
+ Item 7 - This is content for item number 7. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
40
52
 
41
53
 
42
54
 
@@ -59,22 +71,34 @@ test('simple scrollbox navigation and scrolling', async () => {
59
71
 
60
72
 
61
73
  Simple ScrollBox Demo
62
- Item 1 - This is content for item number 1. Lorem ipsum dolor sit amet,
63
- consectetur adipiscing elit.
74
+ Item 1 - This is content for item number 1. Lorem ipsum dolor sit amet, consectetur adipiscing elit. ▄
64
75
 
65
76
 
66
77
 
67
- Item 2 - This is content for item number 2. Lorem ipsum dolor sit amet,
68
- consectetur adipiscing elit.
78
+ Item 2 - This is content for item number 2. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
69
79
 
70
80
 
71
81
 
72
- Item 3 - This is content for item number 3. Lorem ipsum dolor sit amet,
73
- consectetur adipiscing elit.
82
+ Item 3 - This is content for item number 3. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
83
+
84
+
85
+
86
+ Item 4 - This is content for item number 4. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
87
+
88
+
89
+
90
+ Item 5 - This is content for item number 5. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
91
+
92
+
93
+
94
+ Item 6 - This is content for item number 6. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
95
+
96
+
97
+
98
+ Item 7 - This is content for item number 7. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
74
99
 
75
100
 
76
101
 
77
- Item 4 - This is content for item number 4. Lorem ipsum dolor sit amet,
78
102
 
79
103
  Use mouse scroll or arrow keys | Press [q] to quit
80
104
 
@@ -7,7 +7,7 @@ beforeEach(async () => {
7
7
  session = await launchTerminal({
8
8
  command: 'bun',
9
9
  args: ['src/examples/list-dropdown-default.tsx'],
10
- cols: 80,
10
+ cols: 100,
11
11
  rows: 30,
12
12
  })
13
13
  })
@@ -31,9 +31,9 @@ test('dropdown defaults to first item when no value is provided', async () => {
31
31
  "
32
32
 
33
33
 
34
- Dropdown Default Value Example ───────────────────────────────────────────
34
+ Dropdown Default Value Example ───────────────────────────────────────────────────────────────
35
35
 
36
- > Search... Apple ▾
36
+ > Search... Apple ▾
37
37
 
38
38
  ›First Item This list has a dropdown
39
39
  Second Item The dropdown should default to first item
@@ -43,7 +43,7 @@ test('dropdown defaults to first item when no value is provided', async () => {
43
43
 
44
44
 
45
45
 
46
- ↵ show selected fruit ↑↓ navigate ^p dropdown powered by termcast.app
46
+ ↵ show selected fruit ↑↓ navigate ^k actions ^p filter by categorpowered by termcast.app
47
47
 
48
48
 
49
49
 
@@ -76,22 +76,22 @@ test('dropdown opens and shows items', async () => {
76
76
  "
77
77
 
78
78
 
79
- Dropdown Default Value Example ───────────────────────────────────────────
80
- ╭──────────────────────────────────────────────────────────────────────────╮
81
-
82
- │ Filter by category esc │
83
- │ │
84
- │ > Select category... │
85
- │ │
86
- │ ›Apple │
87
- │ Banana │
88
- │ Orange │
89
- │ Grape │
90
- │ │
91
- │ │
92
- │ ↵ select ↑↓ navigate powered by termcast.app │
93
- │ │
94
- ╰──────────────────────────────────────────────────────────────────────────╯
79
+ Dropdown Default Value Example ───────────────────────────────────────────────────────────────
80
+ ╭──────────────────────────────────────────────────────────────────────────╮
81
+ > Search.│ Apple ▾
82
+ │ Filter by category esc │
83
+ ›First Ite│ │
84
+ Second It│ > Select category... │
85
+ Vegetable│ │
86
+ Carrot Wi│ ›Apple │
87
+ │ Banana │
88
+ │ Orange │
89
+ │ Grape │
90
+ │ │
91
+ ↵ show se│ │mcast.app
92
+ │ ↵ select ↑↓ navigate powered by termcast.app │
93
+ │ │
94
+ ╰──────────────────────────────────────────────────────────────────────────╯
95
95
 
96
96
 
97
97
 
@@ -113,22 +113,22 @@ test('dropdown opens and shows items', async () => {
113
113
  "
114
114
 
115
115
 
116
- Dropdown Default Value Example ───────────────────────────────────────────
117
- ╭──────────────────────────────────────────────────────────────────────────╮
118
-
119
- │ Filter by category esc │
120
- │ │
121
- │ > Select category... │
122
- │ │
123
- │ Apple │
124
- │ ›Banana │
125
- │ Orange │
126
- │ Grape │
127
- │ │
128
- │ │
129
- │ ↵ select ↑↓ navigate powered by termcast.app │
130
- │ │
131
- ╰──────────────────────────────────────────────────────────────────────────╯
116
+ Dropdown Default Value Example ───────────────────────────────────────────────────────────────
117
+ ╭──────────────────────────────────────────────────────────────────────────╮
118
+ > Search.│ Apple ▾
119
+ │ Filter by category esc │
120
+ ›First Ite│ │
121
+ Second It│ > Select category... │
122
+ Vegetable│ │
123
+ Carrot Wi│ Apple │
124
+ │ ›Banana │
125
+ │ Orange │
126
+ │ Grape │
127
+ │ │
128
+ ↵ show se│ │mcast.app
129
+ │ ↵ select ↑↓ navigate powered by termcast.app │
130
+ │ │
131
+ ╰──────────────────────────────────────────────────────────────────────────╯
132
132
 
133
133
 
134
134
 
@@ -150,9 +150,9 @@ test('dropdown opens and shows items', async () => {
150
150
  "
151
151
 
152
152
 
153
- Dropdown Default Value Example ───────────────────────────────────────────
153
+ Dropdown Default Value Example ───────────────────────────────────────────────────────────────
154
154
 
155
- > Search... Banana ▾
155
+ > Search... Banana ▾
156
156
 
157
157
  ›First Item This list has a dropdown
158
158
  Second Item The dropdown should default to first item
@@ -162,7 +162,7 @@ test('dropdown opens and shows items', async () => {
162
162
 
163
163
 
164
164
 
165
- ↵ show selected fruit ↑↓ navigate ^p dropdown powered by termcast.app
165
+ ↵ show selected fruit ↑↓ navigate ^k actions ^p filter by categorpowered by termcast.app
166
166
 
167
167
 
168
168
 
@@ -195,22 +195,22 @@ test('clicking dropdown opens it', async () => {
195
195
  "
196
196
 
197
197
 
198
- Dropdown Default Value Example ───────────────────────────────────────────
199
- ╭──────────────────────────────────────────────────────────────────────────╮
200
-
201
- │ Filter by category esc │
202
- │ │
203
- │ > Select category... │
204
- │ │
205
- │ ›Apple │
206
- │ Banana │
207
- │ Orange │
208
- │ Grape │
209
- │ │
210
- │ │
211
- │ ↵ select ↑↓ navigate powered by termcast.app │
212
- │ │
213
- ╰──────────────────────────────────────────────────────────────────────────╯
198
+ Dropdown Default Value Example ───────────────────────────────────────────────────────────────
199
+ ╭──────────────────────────────────────────────────────────────────────────╮
200
+ > Search.│ Apple ▾
201
+ │ Filter by category esc │
202
+ ›First Ite│ │
203
+ Second It│ > Select category... │
204
+ Vegetable│ │
205
+ Carrot Wi│ ›Apple │
206
+ │ Banana │
207
+ │ Orange │
208
+ │ Grape │
209
+ │ │
210
+ ↵ show se│ │mcast.app
211
+ │ ↵ select ↑↓ navigate powered by termcast.app │
212
+ │ │
213
+ ╰──────────────────────────────────────────────────────────────────────────╯
214
214
 
215
215
 
216
216
 
@@ -232,9 +232,9 @@ test('clicking dropdown opens it', async () => {
232
232
  "
233
233
 
234
234
 
235
- Dropdown Default Value Example ───────────────────────────────────────────
235
+ Dropdown Default Value Example ───────────────────────────────────────────────────────────────
236
236
 
237
- > Search... Orange ▾
237
+ > Search... Orange ▾
238
238
 
239
239
  ›First Item This list has a dropdown
240
240
  Second Item The dropdown should default to first item
@@ -244,7 +244,7 @@ test('clicking dropdown opens it', async () => {
244
244
 
245
245
 
246
246
 
247
- ↵ show selected fruit ↑↓ navigate ^p dropdown powered by termcast.app
247
+ ↵ show selected fruit ↑↓ navigate ^k actions ^p filter by categorpowered by termcast.app
248
248
 
249
249
 
250
250
 
@@ -262,3 +262,23 @@ test('clicking dropdown opens it', async () => {
262
262
  "
263
263
  `)
264
264
  }, 10000)
265
+
266
+ test('clicking footer dropdown hint opens dropdown', async () => {
267
+ await session.text({
268
+ waitFor: (text) => {
269
+ return /Dropdown Default Value Example/i.test(text)
270
+ },
271
+ })
272
+
273
+ const beforeClick = await session.text()
274
+ expect(beforeClick).toContain('^p')
275
+
276
+ await session.click('^p', { first: true })
277
+
278
+ const afterClick = await session.text({
279
+ waitFor: (text) => {
280
+ return /Filter by category/i.test(text)
281
+ },
282
+ })
283
+ expect(afterClick).toContain('Filter by category')
284
+ }, 10000)
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Example: List with logo prop on the title bar, no dropdown.
3
+ * Logo appears on the right edge after the separator line.
4
+ */
5
+ import React from 'react'
6
+ import { List, ActionPanel, Action, renderWithProviders, Color } from 'termcast'
7
+
8
+ function ListSlotExample() {
9
+ const items = [
10
+ { id: '1', title: 'Dashboard', subtitle: 'Main overview' },
11
+ { id: '2', title: 'Settings', subtitle: 'Preferences' },
12
+ { id: '3', title: 'Profile', subtitle: 'Account info' },
13
+ { id: '4', title: 'Notifications', subtitle: 'Alerts' },
14
+ { id: '5', title: 'Analytics', subtitle: 'Usage stats' },
15
+ ]
16
+
17
+ return (
18
+ <List
19
+ logo={<text fg={Color.Orange}>◆ Acme</text>}
20
+ >
21
+ {items.map((item) => (
22
+ <List.Item
23
+ key={item.id}
24
+ id={item.id}
25
+ title={item.title}
26
+ subtitle={item.subtitle}
27
+ actions={
28
+ <ActionPanel>
29
+ <Action title="Open" onAction={() => {}} />
30
+ </ActionPanel>
31
+ }
32
+ />
33
+ ))}
34
+ </List>
35
+ )
36
+ }
37
+
38
+ renderWithProviders(<ListSlotExample />)
@@ -573,16 +573,16 @@ test('list with detail layout consistency - short vs long detail content', async
573
573
 
574
574
 
575
575
 
576
-
577
-
578
-
579
-
580
-
581
-
582
-
583
-
584
576
  ↑↓ navigate ^k actions │
585
577
 
578
+
579
+
580
+
581
+
582
+
583
+
584
+
585
+
586
586
  "
587
587
  `)
588
588
  expect(longDetailSnapshot).toMatchInlineSnapshot(`
@@ -1,5 +1,5 @@
1
1
  import React, { useState, ReactElement } from 'react'
2
- import { List, renderWithProviders } from 'termcast'
2
+ import { List, renderWithProviders, Color } from 'termcast'
3
3
  import type { DropdownProps } from 'termcast/src/components/list'
4
4
 
5
5
  function DrinkDropdown(props: {
@@ -73,7 +73,7 @@ function ListWithDropdownExample() {
73
73
  return (
74
74
  <List
75
75
  navigationTitle='Search Beers'
76
- // searchBarPlaceholder="Search your favorite drink"
76
+ logo={<text fg={Color.Orange}>◆ Acme</text>}
77
77
  searchBarAccessory={
78
78
  (
79
79
  <DrinkDropdown