termcast 1.5.0 → 1.7.0

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 (106) hide show
  1. package/dist/build.d.ts.map +1 -1
  2. package/dist/build.js +22 -5
  3. package/dist/build.js.map +1 -1
  4. package/dist/compile.d.ts.map +1 -1
  5. package/dist/compile.js +7 -1
  6. package/dist/compile.js.map +1 -1
  7. package/dist/components/bar-chart.d.ts.map +1 -1
  8. package/dist/components/bar-chart.js +14 -3
  9. package/dist/components/bar-chart.js.map +1 -1
  10. package/dist/components/bar-graph.d.ts +4 -4
  11. package/dist/components/bar-graph.d.ts.map +1 -1
  12. package/dist/components/bar-graph.js +23 -5
  13. package/dist/components/bar-graph.js.map +1 -1
  14. package/dist/components/candle-chart.d.ts +15 -0
  15. package/dist/components/candle-chart.d.ts.map +1 -1
  16. package/dist/components/candle-chart.js +41 -3
  17. package/dist/components/candle-chart.js.map +1 -1
  18. package/dist/components/chart-tooltip.d.ts +83 -0
  19. package/dist/components/chart-tooltip.d.ts.map +1 -0
  20. package/dist/components/chart-tooltip.js +127 -0
  21. package/dist/components/chart-tooltip.js.map +1 -0
  22. package/dist/components/dotted-line-graph.d.ts +11 -0
  23. package/dist/components/dotted-line-graph.d.ts.map +1 -1
  24. package/dist/components/dotted-line-graph.js +43 -2
  25. package/dist/components/dotted-line-graph.js.map +1 -1
  26. package/dist/components/graph.d.ts +11 -0
  27. package/dist/components/graph.d.ts.map +1 -1
  28. package/dist/components/graph.js +53 -4
  29. package/dist/components/graph.js.map +1 -1
  30. package/dist/components/horizontal-bar-graph.d.ts.map +1 -1
  31. package/dist/components/horizontal-bar-graph.js +16 -5
  32. package/dist/components/horizontal-bar-graph.js.map +1 -1
  33. package/dist/components/list.d.ts +7 -0
  34. package/dist/components/list.d.ts.map +1 -1
  35. package/dist/components/list.js +75 -14
  36. package/dist/components/list.js.map +1 -1
  37. package/dist/examples/chart-tooltips.d.ts +2 -0
  38. package/dist/examples/chart-tooltips.d.ts.map +1 -0
  39. package/dist/examples/chart-tooltips.js +16 -0
  40. package/dist/examples/chart-tooltips.js.map +1 -0
  41. package/dist/examples/list-detail-height-ratchet.d.ts +2 -0
  42. package/dist/examples/list-detail-height-ratchet.d.ts.map +1 -0
  43. package/dist/examples/list-detail-height-ratchet.js +26 -0
  44. package/dist/examples/list-detail-height-ratchet.js.map +1 -0
  45. package/dist/extensions/dev.d.ts.map +1 -1
  46. package/dist/extensions/dev.js +1 -0
  47. package/dist/extensions/dev.js.map +1 -1
  48. package/dist/globals.js +8 -0
  49. package/dist/globals.js.map +1 -1
  50. package/dist/package-json.d.ts +2 -0
  51. package/dist/package-json.d.ts.map +1 -1
  52. package/dist/package-json.js +20 -17
  53. package/dist/package-json.js.map +1 -1
  54. package/dist/profiler.d.ts +2 -0
  55. package/dist/profiler.d.ts.map +1 -0
  56. package/dist/profiler.js +390 -0
  57. package/dist/profiler.js.map +1 -0
  58. package/package.json +14 -15
  59. package/src/build.tsx +27 -5
  60. package/src/cli.tsx +0 -0
  61. package/src/compile.tsx +9 -1
  62. package/src/compile.vitest.tsx +8 -8
  63. package/src/components/bar-chart.tsx +23 -3
  64. package/src/components/bar-graph.tsx +32 -13
  65. package/src/components/candle-chart.tsx +63 -16
  66. package/src/components/chart-tooltip.tsx +191 -0
  67. package/src/components/dotted-line-graph.tsx +49 -3
  68. package/src/components/graph.tsx +76 -18
  69. package/src/components/horizontal-bar-graph.tsx +24 -4
  70. package/src/components/list.tsx +93 -20
  71. package/src/examples/action-shortcut.vitest.tsx +4 -4
  72. package/src/examples/actions-context.vitest.tsx +2 -2
  73. package/src/examples/bar-graph-weekly.vitest.tsx +97 -97
  74. package/src/examples/chart-tooltips.tsx +54 -0
  75. package/src/examples/form-basic.vitest.tsx +8 -8
  76. package/src/examples/github.vitest.tsx +19 -28
  77. package/src/examples/graph-bar-chart.vitest.tsx +40 -40
  78. package/src/examples/graph-polymarket.vitest.tsx +24 -24
  79. package/src/examples/graph-row.vitest.tsx +8 -8
  80. package/src/examples/graph-styles.vitest.tsx +65 -65
  81. package/src/examples/horizontal-bar-graph-weekly.vitest.tsx +52 -52
  82. package/src/examples/list-detail-height-ratchet.tsx +48 -0
  83. package/src/examples/list-detail-height-ratchet.vitest.tsx +161 -0
  84. package/src/examples/list-detail-metadata.vitest.tsx +49 -49
  85. package/src/examples/list-dropdown-default.vitest.tsx +27 -27
  86. package/src/examples/list-fetch-data.vitest.tsx +3 -3
  87. package/src/examples/list-item-accessories.vitest.tsx +2 -2
  88. package/src/examples/list-loading-empty-view.vitest.tsx +1 -1
  89. package/src/examples/list-no-actions.vitest.tsx +3 -3
  90. package/src/examples/list-scrollbox.vitest.tsx +6 -6
  91. package/src/examples/list-spacing-mode.vitest.tsx +3 -3
  92. package/src/examples/list-with-detail.vitest.tsx +11 -11
  93. package/src/examples/list-with-dropdown.vitest.tsx +7 -7
  94. package/src/examples/list-with-sections.vitest.tsx +32 -32
  95. package/src/examples/list-with-toast.vitest.tsx +4 -4
  96. package/src/examples/simple-candle-chart.vitest.tsx +63 -61
  97. package/src/examples/simple-grid.vitest.tsx +13 -13
  98. package/src/examples/simple-navigation.vitest.tsx +25 -25
  99. package/src/examples/simple-progress-bar.vitest.tsx +8 -8
  100. package/src/examples/swift-extension.vitest.tsx +3 -3
  101. package/src/examples/toast-action.vitest.tsx +4 -4
  102. package/src/extensions/dev.tsx +2 -1
  103. package/src/extensions/dev.vitest.tsx +17 -17
  104. package/src/globals.ts +9 -0
  105. package/src/package-json.tsx +24 -23
  106. package/src/profiler.tsx +487 -0
@@ -48,28 +48,28 @@ test('list detail metadata label renders short values in row layout (key: value)
48
48
 
49
49
  │ Status: Active
50
50
 
51
- ↑↓ navigate ^k actions :vim │ Website: example.com
52
-
53
-
54
-
55
-
56
-
57
-
58
-
59
-
60
-
61
-
62
-
63
-
64
-
65
-
66
-
67
-
68
-
69
-
70
-
71
-
72
-
51
+ │ Website: example.com
52
+
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+
61
+
62
+
63
+
64
+
65
+
66
+
67
+
68
+
69
+
70
+
71
+
72
+ ↑↓ navigate ^k actions │
73
73
 
74
74
  "
75
75
  `)
@@ -113,21 +113,21 @@ test('list detail metadata renders long values in column layout (key on one line
113
113
  │ Short: OK
114
114
 
115
115
  │ URL: example.com/very/
116
- ↑↓ navigate ^k actions :vim │ long/path
117
-
118
-
119
-
120
-
121
-
122
-
123
-
124
-
125
-
126
-
127
-
128
-
129
-
130
-
116
+ │ long/path
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+ ↑↓ navigate ^k actions │
131
131
 
132
132
  "
133
133
  `)
@@ -176,18 +176,18 @@ test('list detail metadata renders colored values and tag lists', async () => {
176
176
 
177
177
  │ ──────────────────────────────────
178
178
 
179
- ↑↓ navigate ^k actions :vim │ Repo: github.com/example
180
-
181
-
182
-
183
-
184
-
185
-
186
-
187
-
188
-
189
-
190
-
179
+ │ Repo: github.com/example
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+
188
+
189
+
190
+ ↑↓ navigate ^k actions │
191
191
 
192
192
  "
193
193
  `)
@@ -43,11 +43,11 @@ test('dropdown defaults to first item when no value is provided', async () => {
43
43
 
44
44
 
45
45
 
46
- ↵ show selected fruit ↑↓ navigate ^k actions ^p filter by categorpowered by termcast.app
47
46
 
48
47
 
49
48
 
50
49
 
50
+ ↵ show selected fruit ↑↓ navigate ^k actions ^p filter by categorpowered by termcast.app
51
51
 
52
52
 
53
53
 
@@ -77,20 +77,22 @@ test('dropdown opens and shows items', async () => {
77
77
 
78
78
 
79
79
  Dropdown Default Value Example ───────────────────────────────────────────────────────────────
80
+
81
+ > Search... Apple ▾
80
82
  ╭──────────────────────────────────────────────────────────────────────────╮
81
- > Search.│ │ Apple ▾
82
- │ Filter by category esc │
83
83
  ›First Ite│ │
84
- Second It│ > Select category...
84
+ Second It│ Filter by category esc
85
85
  Vegetable│ │
86
- Carrot Wi│ ›Apple
86
+ Carrot Wi│ > Select category...
87
+ │ │
88
+ │ ›Apple │
87
89
  │ Banana │
88
90
  │ Orange │
89
91
  │ Grape │
90
92
  │ │
91
- ↵ show se│ │mcast.app
92
- │ ↵ select ↑↓ navigate powered by termcast.app │
93
93
  │ │
94
+ │ ↵ select ↑↓ navigate powered by termcast.app │
95
+ ↵ show se│ │mcast.app
94
96
  ╰──────────────────────────────────────────────────────────────────────────╯
95
97
 
96
98
 
@@ -101,8 +103,6 @@ test('dropdown opens and shows items', async () => {
101
103
 
102
104
 
103
105
 
104
-
105
-
106
106
  "
107
107
  `)
108
108
 
@@ -114,20 +114,22 @@ test('dropdown opens and shows items', async () => {
114
114
 
115
115
 
116
116
  Dropdown Default Value Example ───────────────────────────────────────────────────────────────
117
+
118
+ > Search... Apple ▾
117
119
  ╭──────────────────────────────────────────────────────────────────────────╮
118
- > Search.│ │ Apple ▾
119
- │ Filter by category esc │
120
120
  ›First Ite│ │
121
- Second It│ > Select category...
121
+ Second It│ Filter by category esc
122
122
  Vegetable│ │
123
- Carrot Wi│ Apple
123
+ Carrot Wi│ > Select category...
124
+ │ │
125
+ │ Apple │
124
126
  │ ›Banana │
125
127
  │ Orange │
126
128
  │ Grape │
127
129
  │ │
128
- ↵ show se│ │mcast.app
129
- │ ↵ select ↑↓ navigate powered by termcast.app │
130
130
  │ │
131
+ │ ↵ select ↑↓ navigate powered by termcast.app │
132
+ ↵ show se│ │mcast.app
131
133
  ╰──────────────────────────────────────────────────────────────────────────╯
132
134
 
133
135
 
@@ -138,8 +140,6 @@ test('dropdown opens and shows items', async () => {
138
140
 
139
141
 
140
142
 
141
-
142
-
143
143
  "
144
144
  `)
145
145
 
@@ -162,11 +162,11 @@ test('dropdown opens and shows items', async () => {
162
162
 
163
163
 
164
164
 
165
- ↵ show selected fruit ↑↓ navigate ^k actions ^p filter by categorpowered by termcast.app
166
165
 
167
166
 
168
167
 
169
168
 
169
+ ↵ show selected fruit ↑↓ navigate ^k actions ^p filter by categorpowered by termcast.app
170
170
 
171
171
 
172
172
 
@@ -196,20 +196,22 @@ test('clicking dropdown opens it', async () => {
196
196
 
197
197
 
198
198
  Dropdown Default Value Example ───────────────────────────────────────────────────────────────
199
+
200
+ > Search... Apple ▾
199
201
  ╭──────────────────────────────────────────────────────────────────────────╮
200
- > Search.│ │ Apple ▾
201
- │ Filter by category esc │
202
202
  ›First Ite│ │
203
- Second It│ > Select category...
203
+ Second It│ Filter by category esc
204
204
  Vegetable│ │
205
- Carrot Wi│ ›Apple
205
+ Carrot Wi│ > Select category...
206
+ │ │
207
+ │ ›Apple │
206
208
  │ Banana │
207
209
  │ Orange │
208
210
  │ Grape │
209
211
  │ │
210
- ↵ show se│ │mcast.app
211
- │ ↵ select ↑↓ navigate powered by termcast.app │
212
212
  │ │
213
+ │ ↵ select ↑↓ navigate powered by termcast.app │
214
+ ↵ show se│ │mcast.app
213
215
  ╰──────────────────────────────────────────────────────────────────────────╯
214
216
 
215
217
 
@@ -220,8 +222,6 @@ test('clicking dropdown opens it', async () => {
220
222
 
221
223
 
222
224
 
223
-
224
-
225
225
  "
226
226
  `)
227
227
 
@@ -244,11 +244,11 @@ test('clicking dropdown opens it', async () => {
244
244
 
245
245
 
246
246
 
247
- ↵ show selected fruit ↑↓ navigate ^k actions ^p filter by categorpowered by termcast.app
248
247
 
249
248
 
250
249
 
251
250
 
251
+ ↵ show selected fruit ↑↓ navigate ^k actions ^p filter by categorpowered by termcast.app
252
252
 
253
253
 
254
254
 
@@ -48,8 +48,8 @@ test('list shows initial items after fetch', async () => {
48
48
 
49
49
 
50
50
 
51
- ↑↓ navigate ^k actions :vim
52
51
 
52
+ ↑↓ navigate ^k actions
53
53
 
54
54
 
55
55
 
@@ -81,8 +81,8 @@ test('list shows initial items after fetch', async () => {
81
81
 
82
82
 
83
83
 
84
- ↑↓ navigate ^k actions :vim
85
84
 
85
+ ↑↓ navigate ^k actions
86
86
 
87
87
 
88
88
 
@@ -113,8 +113,8 @@ test('list shows initial items after fetch', async () => {
113
113
 
114
114
 
115
115
 
116
- ↑↓ navigate ^k actions :vim
117
116
 
117
+ ↑↓ navigate ^k actions
118
118
 
119
119
 
120
120
 
@@ -46,7 +46,7 @@ test('shows all inline item features: icon, title, subtitle, text/tag/date acces
46
46
  ● All Colored red blue 1w
47
47
 
48
48
 
49
- ↑↓ navigate ^k actions :vim powered by termcast.app
49
+ ↑↓ navigate ^k actions powered by termcast.app
50
50
 
51
51
 
52
52
 
@@ -104,7 +104,7 @@ test('navigation through all item types', async () => {
104
104
  ● All Colored red blue 1w
105
105
 
106
106
 
107
- ↑↓ navigate ^k actions :vim powered by termcast.app
107
+ ↑↓ navigate ^k actions powered by termcast.app
108
108
 
109
109
 
110
110
 
@@ -43,7 +43,7 @@ test('empty view shows spinner when list is loading', async () => {
43
43
 
44
44
 
45
45
 
46
- ↑↓ navigate ^k actions :vim"
46
+ "
47
47
  `)
48
48
  expect(text).toMatch(/[·• ]\s*loading\.\.\./)
49
49
  }, 10000)
@@ -46,11 +46,11 @@ test('footer does not show stale action title from built-in actions', async () =
46
46
 
47
47
 
48
48
 
49
- ↑↓ navigate ^k actions :vim
50
49
 
51
50
 
52
51
 
53
52
 
53
+ ↑↓ navigate ^k actions
54
54
  "
55
55
  `)
56
56
  }, 30000)
@@ -74,6 +74,7 @@ test('ctrl+k opens built-in actions when item has no actions', async () => {
74
74
  expect(actionsPanel).toMatchInlineSnapshot(`
75
75
  "
76
76
 
77
+
77
78
  ╭────────────────────────────────────────────────────────────────╮
78
79
  │ │
79
80
  │ Actions esc │
@@ -91,7 +92,6 @@ test('ctrl+k opens built-in actions when item has no actions', async () => {
91
92
  │ │
92
93
  │ │
93
94
  │ │
94
- │ ↵ select ↑↓ navigate │
95
- │ │"
95
+ │ ↵ select ↑↓ navigate │"
96
96
  `)
97
97
  }, 30000)
@@ -90,12 +90,12 @@ test('list scrollbox auto-scrolls when navigating down', async () => {
90
90
 
91
91
  > Search items...
92
92
 
93
- Item 7 Description for item 7
94
- Item 8 Description for item 8
95
- ›▤ Item 9 Description for item 9
96
- Item 10 Description for item 10
97
- Item 11 Description for item 11
98
- Item 12 Description for item 12"
93
+ Item 1 Description for item 1
94
+ Item 2 Description for item 2
95
+ Item 3 Description for item 3
96
+ Item 4 Description for item 4
97
+ Item 5 Description for item 5
98
+ Item 6 Description for item 6"
99
99
  `)
100
100
 
101
101
  await session.press('up')
@@ -49,8 +49,8 @@ describe('spacingMode default', () => {
49
49
  ★ Favorites
50
50
 
51
51
 
52
- ↑↓ navigate ^k actions :vim
53
52
 
53
+ ↑↓ navigate ^k actions
54
54
  "
55
55
  `)
56
56
 
@@ -106,7 +106,7 @@ describe('spacingMode relaxed', () => {
106
106
  No Subtitle
107
107
 
108
108
 
109
- ↑↓ navigate ^k actions :vim
109
+ ↑↓ navigate ^k actions
110
110
 
111
111
  "
112
112
  `)
@@ -147,7 +147,7 @@ describe('spacingMode relaxed', () => {
147
147
  No Subtitle
148
148
 
149
149
 
150
- ↑↓ navigate ^k actions :vim
150
+ ↑↓ navigate ^k actions
151
151
 
152
152
  "
153
153
  `)
@@ -214,11 +214,11 @@ test('list with detail view display and navigation', async () => {
214
214
  wartortle #008 Water
215
215
 
216
216
 
217
- ↵ toggle detail ↑↓ navigate ^k actions :vim powered by termcast.app
218
217
 
219
218
 
220
219
 
221
220
 
221
+ ↵ toggle detail ↑↓ navigate ^k actions powered by termcast.app
222
222
 
223
223
 
224
224
 
@@ -573,15 +573,15 @@ test('list with detail layout consistency - short vs long detail content', async
573
573
 
574
574
 
575
575
 
576
- ↑↓ navigate ^k actions :vim
577
-
578
-
579
-
580
-
581
-
582
-
583
-
584
-
576
+
577
+
578
+
579
+
580
+
581
+
582
+
583
+
584
+ ↑↓ navigate ^k actions │
585
585
 
586
586
  "
587
587
  `)
@@ -609,7 +609,7 @@ test('list with detail layout consistency - short vs long detail content', async
609
609
  │ vertical overflow in the detail
610
610
  │ panel scrollbox.
611
611
  │ Section 3
612
- ↑↓ navigate ^k actions :vim │ ▼
612
+ ↑↓ navigate ^k actions │ ▼
613
613
 
614
614
  "
615
615
  `)
@@ -49,7 +49,7 @@ test('list with dropdown navigation', async () => {
49
49
  Apple Juice Juice
50
50
 
51
51
 
52
- ↑↓ navigate ^k actions ^p select drink type :vim
52
+ ↑↓ navigate ^k actions ^p select drink type
53
53
 
54
54
 
55
55
 
@@ -215,11 +215,11 @@ test('list with dropdown navigation', async () => {
215
215
 
216
216
 
217
217
 
218
- ↑↓ navigate ^k actions ^p select drink type :vim
219
218
 
220
219
 
221
220
 
222
221
 
222
+ ↑↓ navigate ^k actions ^p select drink type
223
223
 
224
224
 
225
225
 
@@ -263,9 +263,9 @@ test('small screen: dropdown accessory wastes vertical space', async () => {
263
263
  Sierra Nevada IPA Beer
264
264
  Chateau Margaux Wine
265
265
  Pinot Noir Wine
266
-
267
-
268
- ↑↓ navigate ^k actions ^p select drink type :vim"
266
+ Coca Cola Soda
267
+ Sprite Soda
268
+ Orange Juice Juice"
269
269
  `)
270
270
  } finally {
271
271
  smallSession.close()
@@ -382,11 +382,11 @@ test('list with dropdown search and filter', async () => {
382
382
 
383
383
 
384
384
 
385
- ↑↓ navigate ^k actions ^p select drink type :vim
386
385
 
387
386
 
388
387
 
389
388
 
389
+ ↑↓ navigate ^k actions ^p select drink type
390
390
 
391
391
 
392
392
 
@@ -418,11 +418,11 @@ test('list with dropdown search and filter', async () => {
418
418
 
419
419
 
420
420
 
421
- ↑↓ navigate ^k actions ^p select drink type :vim
422
421
 
423
422
 
424
423
 
425
424
 
425
+ ↑↓ navigate ^k actions ^p select drink type
426
426
 
427
427
 
428
428