termcast 1.4.1 → 1.6.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 (180) hide show
  1. package/dist/build.d.ts.map +1 -1
  2. package/dist/build.js +30 -12
  3. package/dist/build.js.map +1 -1
  4. package/dist/cli.js +0 -40
  5. package/dist/cli.js.map +1 -1
  6. package/dist/compile.d.ts.map +1 -1
  7. package/dist/compile.js +7 -1
  8. package/dist/compile.js.map +1 -1
  9. package/dist/components/bar-graph.d.ts +23 -8
  10. package/dist/components/bar-graph.d.ts.map +1 -1
  11. package/dist/components/bar-graph.js +84 -40
  12. package/dist/components/bar-graph.js.map +1 -1
  13. package/dist/components/dotted-line-graph.d.ts +86 -0
  14. package/dist/components/dotted-line-graph.d.ts.map +1 -0
  15. package/dist/components/dotted-line-graph.js +260 -0
  16. package/dist/components/dotted-line-graph.js.map +1 -0
  17. package/dist/components/extension-preferences.d.ts.map +1 -1
  18. package/dist/components/extension-preferences.js +1 -10
  19. package/dist/components/extension-preferences.js.map +1 -1
  20. package/dist/components/graph.d.ts.map +1 -1
  21. package/dist/components/graph.js +7 -1
  22. package/dist/components/graph.js.map +1 -1
  23. package/dist/components/histogram.d.ts +42 -0
  24. package/dist/components/histogram.d.ts.map +1 -0
  25. package/dist/components/histogram.js +115 -0
  26. package/dist/components/histogram.js.map +1 -0
  27. package/dist/components/horizontal-bar-graph.d.ts +47 -0
  28. package/dist/components/horizontal-bar-graph.d.ts.map +1 -0
  29. package/dist/components/horizontal-bar-graph.js +137 -0
  30. package/dist/components/horizontal-bar-graph.js.map +1 -0
  31. package/dist/components/list.d.ts +9 -0
  32. package/dist/components/list.d.ts.map +1 -1
  33. package/dist/components/list.js +84 -21
  34. package/dist/components/list.js.map +1 -1
  35. package/dist/examples/bar-graph-weekly.js +2 -2
  36. package/dist/examples/bar-graph-weekly.js.map +1 -1
  37. package/dist/examples/charts-showcase-barchart.d.ts +2 -0
  38. package/dist/examples/charts-showcase-barchart.d.ts.map +1 -0
  39. package/dist/examples/charts-showcase-barchart.js +10 -0
  40. package/dist/examples/charts-showcase-barchart.js.map +1 -0
  41. package/dist/examples/charts-showcase-bargraph.d.ts +2 -0
  42. package/dist/examples/charts-showcase-bargraph.d.ts.map +1 -0
  43. package/dist/examples/charts-showcase-bargraph.js +60 -0
  44. package/dist/examples/charts-showcase-bargraph.js.map +1 -0
  45. package/dist/examples/charts-showcase-candle.d.ts +2 -0
  46. package/dist/examples/charts-showcase-candle.d.ts.map +1 -0
  47. package/dist/examples/charts-showcase-candle.js +30 -0
  48. package/dist/examples/charts-showcase-candle.js.map +1 -0
  49. package/dist/examples/charts-showcase-graph.d.ts +2 -0
  50. package/dist/examples/charts-showcase-graph.d.ts.map +1 -0
  51. package/dist/examples/charts-showcase-graph.js +33 -0
  52. package/dist/examples/charts-showcase-graph.js.map +1 -0
  53. package/dist/examples/charts-showcase-heatmap.d.ts +2 -0
  54. package/dist/examples/charts-showcase-heatmap.d.ts.map +1 -0
  55. package/dist/examples/charts-showcase-heatmap.js +36 -0
  56. package/dist/examples/charts-showcase-heatmap.js.map +1 -0
  57. package/dist/examples/charts-showcase-mixed.d.ts +2 -0
  58. package/dist/examples/charts-showcase-mixed.d.ts.map +1 -0
  59. package/dist/examples/charts-showcase-mixed.js +30 -0
  60. package/dist/examples/charts-showcase-mixed.js.map +1 -0
  61. package/dist/examples/charts-showcase-progress.d.ts +2 -0
  62. package/dist/examples/charts-showcase-progress.d.ts.map +1 -0
  63. package/dist/examples/charts-showcase-progress.js +10 -0
  64. package/dist/examples/charts-showcase-progress.js.map +1 -0
  65. package/dist/examples/graph-multi-series.js +1 -1
  66. package/dist/examples/graph-multi-series.js.map +1 -1
  67. package/dist/examples/horizontal-bar-graph-weekly.d.ts +2 -0
  68. package/dist/examples/horizontal-bar-graph-weekly.d.ts.map +1 -0
  69. package/dist/examples/horizontal-bar-graph-weekly.js +67 -0
  70. package/dist/examples/horizontal-bar-graph-weekly.js.map +1 -0
  71. package/dist/examples/list-detail-height-ratchet.d.ts +2 -0
  72. package/dist/examples/list-detail-height-ratchet.d.ts.map +1 -0
  73. package/dist/examples/list-detail-height-ratchet.js +26 -0
  74. package/dist/examples/list-detail-height-ratchet.js.map +1 -0
  75. package/dist/examples/simple-dotted-line-graph.d.ts +2 -0
  76. package/dist/examples/simple-dotted-line-graph.d.ts.map +1 -0
  77. package/dist/examples/simple-dotted-line-graph.js +39 -0
  78. package/dist/examples/simple-dotted-line-graph.js.map +1 -0
  79. package/dist/examples/simple-histogram.d.ts +2 -0
  80. package/dist/examples/simple-histogram.d.ts.map +1 -0
  81. package/dist/examples/simple-histogram.js +47 -0
  82. package/dist/examples/simple-histogram.js.map +1 -0
  83. package/dist/extensions/dev.d.ts.map +1 -1
  84. package/dist/extensions/dev.js +1 -0
  85. package/dist/extensions/dev.js.map +1 -1
  86. package/dist/globals.js +8 -0
  87. package/dist/globals.js.map +1 -1
  88. package/dist/index.d.ts +6 -0
  89. package/dist/index.d.ts.map +1 -1
  90. package/dist/index.js +6 -0
  91. package/dist/index.js.map +1 -1
  92. package/dist/package-json.d.ts +2 -0
  93. package/dist/package-json.d.ts.map +1 -1
  94. package/dist/package-json.js +20 -17
  95. package/dist/package-json.js.map +1 -1
  96. package/dist/platform/node/sqlite.d.ts +6 -5
  97. package/dist/platform/node/sqlite.d.ts.map +1 -1
  98. package/dist/platform/node/sqlite.js +30 -14
  99. package/dist/platform/node/sqlite.js.map +1 -1
  100. package/dist/profiler.d.ts +2 -0
  101. package/dist/profiler.d.ts.map +1 -0
  102. package/dist/profiler.js +390 -0
  103. package/dist/profiler.js.map +1 -0
  104. package/dist/theme.d.ts.map +1 -1
  105. package/dist/theme.js +11 -9
  106. package/dist/theme.js.map +1 -1
  107. package/dist/utils/run-command.d.ts.map +1 -1
  108. package/dist/utils/run-command.js +8 -19
  109. package/dist/utils/run-command.js.map +1 -1
  110. package/dist/utils.d.ts +1 -19
  111. package/dist/utils.d.ts.map +1 -1
  112. package/dist/utils.js +1 -100
  113. package/dist/utils.js.map +1 -1
  114. package/package.json +18 -21
  115. package/src/build.tsx +38 -15
  116. package/src/cli.tsx +3 -40
  117. package/src/compile.tsx +9 -1
  118. package/src/compile.vitest.tsx +8 -8
  119. package/src/components/bar-graph.tsx +217 -111
  120. package/src/components/dotted-line-graph.tsx +407 -0
  121. package/src/components/extension-preferences.tsx +2 -12
  122. package/src/components/graph.tsx +5 -1
  123. package/src/components/histogram.tsx +228 -0
  124. package/src/components/horizontal-bar-graph.tsx +279 -0
  125. package/src/components/list.tsx +112 -26
  126. package/src/examples/action-shortcut.vitest.tsx +20 -20
  127. package/src/examples/actions-context.vitest.tsx +2 -2
  128. package/src/examples/bar-graph-weekly.tsx +2 -2
  129. package/src/examples/bar-graph-weekly.vitest.tsx +103 -102
  130. package/src/examples/charts-showcase-bargraph.tsx +103 -0
  131. package/src/examples/detail-metadata-showcase.vitest.tsx +12 -12
  132. package/src/examples/form-basic.vitest.tsx +11 -11
  133. package/src/examples/form-dropdown.vitest.tsx +11 -11
  134. package/src/examples/form-scroll.vitest.tsx +1 -1
  135. package/src/examples/form-tagpicker.vitest.tsx +11 -11
  136. package/src/examples/github.vitest.tsx +22 -31
  137. package/src/examples/graph-bar-chart.vitest.tsx +36 -36
  138. package/src/examples/graph-multi-series.tsx +1 -1
  139. package/src/examples/graph-polymarket.vitest.tsx +24 -24
  140. package/src/examples/graph-row.vitest.tsx +14 -14
  141. package/src/examples/graph-styles.vitest.tsx +77 -77
  142. package/src/examples/horizontal-bar-graph-weekly.tsx +138 -0
  143. package/src/examples/horizontal-bar-graph-weekly.vitest.tsx +164 -0
  144. package/src/examples/list-detail-height-ratchet.tsx +48 -0
  145. package/src/examples/list-detail-height-ratchet.vitest.tsx +161 -0
  146. package/src/examples/list-detail-metadata.vitest.tsx +51 -51
  147. package/src/examples/list-dropdown-default.vitest.tsx +27 -27
  148. package/src/examples/list-fetch-data.vitest.tsx +3 -3
  149. package/src/examples/list-loading-empty-view.vitest.tsx +1 -1
  150. package/src/examples/list-no-actions.vitest.tsx +3 -3
  151. package/src/examples/list-scrollbox.vitest.tsx +6 -6
  152. package/src/examples/list-spacing-mode.vitest.tsx +1 -1
  153. package/src/examples/list-with-detail.vitest.tsx +55 -55
  154. package/src/examples/list-with-dropdown.vitest.tsx +6 -6
  155. package/src/examples/list-with-sections.vitest.tsx +20 -20
  156. package/src/examples/list-with-toast.vitest.tsx +4 -4
  157. package/src/examples/simple-candle-chart.vitest.tsx +61 -59
  158. package/src/examples/simple-dotted-line-graph.tsx +53 -0
  159. package/src/examples/simple-dotted-line-graph.vitest.tsx +62 -0
  160. package/src/examples/simple-grid.vitest.tsx +4 -4
  161. package/src/examples/simple-heatmap.vitest.tsx +9 -9
  162. package/src/examples/simple-histogram.tsx +90 -0
  163. package/src/examples/simple-navigation.vitest.tsx +25 -25
  164. package/src/examples/simple-progress-bar.vitest.tsx +7 -7
  165. package/src/examples/swift-extension.vitest.tsx +5 -5
  166. package/src/examples/toast-action.vitest.tsx +4 -4
  167. package/src/extensions/dev.tsx +2 -1
  168. package/src/extensions/dev.vitest.tsx +17 -17
  169. package/src/globals.ts +9 -0
  170. package/src/index.tsx +21 -0
  171. package/src/package-json.tsx +24 -23
  172. package/src/platform/node/sqlite.ts +29 -13
  173. package/src/profiler.tsx +487 -0
  174. package/src/theme.tsx +11 -10
  175. package/src/utils/run-command.tsx +10 -19
  176. package/src/utils.tsx +0 -163
  177. package/src/examples/store.tsx +0 -4
  178. package/src/examples/store.vitest.tsx +0 -78
  179. package/src/extensions/home.tsx +0 -227
  180. package/src/extensions/store.tsx +0 -375
@@ -39,27 +39,27 @@ test('candle chart renders in list detail with axes', async () => {
39
39
  > Search markets...
40
40
 
41
41
  Watchlist │ $74,678│ │
42
- ›BTC Bitcoin │ │ ▌▌▖│
43
- ETH Ethereum │ │ ▌│▘▌▖│
44
- SOL Solana │ $70,438│ │ │ ▌ │▘▘▌
45
- XRP XRP │ │ ▖▖▖▖ ▌▌ ▖▖▌ ▌││
46
- DOGE Dogecoin │ │ ▌││▌▖▖ ▖▖│││▌▘▌▌│ ▘▘▘▌
47
- BNB BNB │ $66,197│▖▖ │▌ ▘▘▘▌▖▖▌▘▌▖▌▌▌ ▘▘
42
+ ›BTC Bitcoin $67,641 -0.2% │ │ ▌▌▖│
43
+ ETH Ethereum $1,971 -0.3% │ │ ▌│▘▌▖│
44
+ SOL Solana $83.31 -0.4% │ $70,438│ │ │ ▌ │▘▘▌
45
+ XRP XRP $1.36 -0.4% │ │ ▖▖▖▖ ▌▌ ▖▖▌ ▌││
46
+ DOGE Dogecoin $0.0901 -0.5% │ │ ▌││▌▖▖ ▖▖│││▌▘▌▌│ ▘▘▘▌
47
+ BNB BNB $622 -0.3% │ $66,197│▖▖ │▌ ▘▘▘▌▖▖▌▘▌▖▌▌▌ ▘▘
48
48
  │ ││▌▖ │▌▘ ▘▘▌▌ ▘▘▘▘
49
49
  Mixed Components │ │ │▌▌▘▘ ▘▘
50
- BTC - Candles Real BTC/USD hourly candles │ $61,957│ ││
51
- ETH - Candle + Line Candles plus closing line │ 12d 8d 4d Now
52
- SOL - Candle + Volume Candles plus volume spli
53
- BTC vs ETH Side-by-side crypto leaders │ Price: $67,641
54
- DOGE - Candle + Line Low-priced asset formatti
50
+ BTC - CandlesReal BTC/US...rly candles $67,641 │ $61,957│ ││
51
+ ETH - C...e + LineCandles p...sing line $1,971 │ 12d 8d 4d Now
52
+ SOL - Ca... + Volum Candles ...me split $83.31
53
+ BTC vs ETH Side-by-side crypto leaders $67,641 │ Price: $67,641
54
+ DOGE - ...e + LineLow-pric...ormatting $0.0901
55
55
  │ Change: -0.2%
56
56
 
57
57
  │ Category: Store of Value
58
58
 
59
59
  │ ────────────────────────────────────────────
60
60
 
61
- ↵ open detail ↑↓ navigate ^k actions :vi │ BTC-USD Hourly OHLC
62
-
61
+ │ BTC-USD Hourly OHLC
62
+ ↵ open detail ↑↓ navigate ^k actions :vi │
63
63
 
64
64
  "
65
65
  `)
@@ -128,7 +128,7 @@ test('candle + line overlay (mixed components)', async () => {
128
128
  }
129
129
 
130
130
  const text = await session.text({
131
- waitFor: (t) => t.includes('›ETH - Candle + Line') && t.includes('closing line'),
131
+ waitFor: (t) => t.includes('›ETH') && t.includes('Line') && t.includes('Price: $1,971'),
132
132
  timeout: 10000,
133
133
  })
134
134
 
@@ -141,19 +141,19 @@ test('candle + line overlay (mixed components)', async () => {
141
141
  > Search markets...
142
142
 
143
143
  Watchlist │ $2,220│ │
144
- BTC Bitcoin │ │ │ ▌▌▖▖
145
- ETH Ethereum │ $2,073│ ▖▖▖ │ ▖▖ ▖▌▘▘▌▖▖▖
146
- SOL Solana │ │ │▌│▘▌▌▌ ▖▖ ▌▘▌││▌│ │││▌
147
- XRP XRP │ │ │▌▘ │ ▌▖ ▖▌▘▌▖▌ ▌▌▘▘ ▌▌▘▘
148
- DOGE Dogecoin │ $1,927│▖▖ ▖▌ │▘▌▖▌ │││ │
149
- BNB BNB │ │▘▘▌▖▌▘│ ▘▘
144
+ BTC Bitcoin $67,641 -0.2% │ │ │ ▌▌▖▖
145
+ ETH Ethereum $1,971 -0.3% │ $2,073│ ▖▖▖ │ ▖▖ ▖▌▘▘▌▖▖▖
146
+ SOL Solana $83.31 -0.4% │ │ │▌│▘▌▌▌ ▖▖ ▌▘▌││▌│ │││▌
147
+ XRP XRP $1.36 -0.4% │ │ │▌▘ │ ▌▖ ▖▌▘▌▖▌ ▌▌▘▘ ▌▌▘▘
148
+ DOGE Dogecoin $0.0901 -0.5% │ $1,927│▖▖ ▖▌ │▘▌▖▌ │││ │
149
+ BNB BNB $622 -0.3% │ │▘▘▌▖▌▘│ ▘▘
150
150
  │ $1,780│ ▘▘
151
151
  Mixed Components │ 12d 8d 4d Now
152
- BTC - Candles Real BTC/USD hourly candles
153
- ›ETH - Candle + Line Candles plus closing line │ $2,197│ ⢠⣆⣠⡀
154
- SOL - Candle + Volume Candles plus volume spli │ │ ⣴⣤⣤ ⣀ ⢠⣀ ⢠⣿⣿⣿⣷⣶⣦⡀
155
- BTC vs ETH Side-by-side crypto leaders │ $1,997│ ⢰⣿⣿⣿⣿⣿⣇ ⣠⣷⣴⣄⣀⢸⣿⣶⣠⣤⣼⣿⣿⣿⣿⣿⣿⣧⣤⣤⣤
156
- DOGE - Candle + Line Low-priced asset formatti │ │⣶⡄ ⣦⣾⣿⣿⣿⣿⣿⣿⣶⣶⢠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
152
+ BTC - CandlesReal BTC/US...rly candles $67,641
153
+ ›ETH - C...e + LineCandles p...sing line $1,971 │ $2,197│ ⢠⣆⣠⡀
154
+ SOL - Ca... + Volum Candles ...me split $83.31 │ │ ⣴⣤⣤ ⣀ ⢠⣀ ⢠⣿⣿⣿⣷⣶⣦⡀
155
+ BTC vs ETH Side-by-side crypto leaders $67,641 │ $1,997│ ⢰⣿⣿⣿⣿⣿⣇ ⣠⣷⣴⣄⣀⢸⣿⣶⣠⣤⣼⣿⣿⣿⣿⣿⣿⣧⣤⣤⣤
156
+ DOGE - ...e + LineLow-pric...ormatting $0.0901 │ │⣶⡄ ⣦⣾⣿⣿⣿⣿⣿⣿⣶⣶⢠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
157
157
  │ $1,797│⣿⣿⣷⣦⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
158
158
  │ 12d 8d 4d Now
159
159
 
@@ -166,7 +166,8 @@ test('candle + line overlay (mixed components)', async () => {
166
166
  "
167
167
  `)
168
168
 
169
- expect(text).toContain('Candle + Line')
169
+ expect(text).toContain('›ETH')
170
+ expect(text).toContain('Line')
170
171
  }, 30000)
171
172
 
172
173
  test('candle + volume bar chart (mixed components)', async () => {
@@ -177,7 +178,7 @@ test('candle + volume bar chart (mixed components)', async () => {
177
178
  }
178
179
 
179
180
  const text = await session.text({
180
- waitFor: (t) => t.includes('›SOL - Candle + Volume') && t.includes('half'),
181
+ waitFor: (t) => t.includes('›SOL') && t.includes('Second half'),
181
182
  timeout: 10000,
182
183
  })
183
184
 
@@ -190,32 +191,33 @@ test('candle + volume bar chart (mixed components)', async () => {
190
191
  > Search markets...
191
192
 
192
193
  Watchlist │ $95.03│ ││
193
- BTC Bitcoin │ │ │ │ ▖▖▖▖
194
- ETH Ethereum │ $88.26│ ▌▌▖ ││ │ ▖▖ ▌▘▘▘▌▌▌│
195
- SOL Solana │ │ ▖▌│▘▌▌▌ │▌▌▖▖▌▘▌▖▌▘ ▘▌│││
196
- XRP XRP │ │ │▌ │ ▌▖│ ▌▘▘▘▌▌ ▘▘││ ▘▘▘▌
197
- DOGE Dogecoin │ $81.48│▖▖ ▌▘ │▘▌▌▘ │
198
- BNB BNB │ │▘▘▌▖▌▘ ▘▘
194
+ BTC Bitcoin $67,641 -0.2% │ │ │ │ ▖▖▖▖
195
+ ETH Ethereum $1,971 -0.3% │ $88.26│ ▌▌▖ ││ │ ▖▖ ▌▘▘▘▌▌▌│
196
+ SOL Solana $83.31 -0.4% │ │ ▖▌│▘▌▌▌ │▌▌▖▖▌▘▌▖▌▘ ▘▌│││
197
+ XRP XRP $1.36 -0.4% │ │ │▌ │ ▌▖│ ▌▘▘▘▌▌ ▘▘││ ▘▘▘▌
198
+ DOGE Dogecoin $0.0901 -0.5% │ $81.48│▖▖ ▌▘ │▘▌▌▘ │
199
+ BNB BNB $622 -0.3% │ │▘▘▌▖▌▘ ▘▘
199
200
  │ $74.71│ ▘▘│
200
201
  Mixed Components │ 12d 8d 4d Now
201
- BTC - Candles Real BTC/USD hourly candles
202
- ETH - Candle + Line Candles plus closing line │ ┌Second half: 95.3%┐
203
- ›SOL - Candle + Volume Candles plus volume spli
204
- BTC vs ETH Side-by-side crypto leaders
205
- DOGE - Candle + Line Low-priced asset formatti │ ────────────────────────────────────────────
202
+ BTC - CandlesReal BTC/US...rly candles $67,641
203
+ ETH - C...e + LineCandles p...sing line $1,971 │ ┌Second half: 95.3%┐
204
+ ›SOL - Ca... + Volum Candles ...me split $83.31
205
+ BTC vs ETH Side-by-side crypto leaders $67,641
206
+ DOGE - ...e + LineLow-pric...ormatting $0.0901 │ ────────────────────────────────────────────
206
207
 
207
208
  │ Price: $83.31
208
209
 
209
- ↵ open detail ↑↓ navigate ^k actions :vi │ Change: -0.4%
210
-
211
-
212
-
213
-
210
+ │ Change: -0.4%
211
+
212
+
213
+
214
+ ↵ open detail ↑↓ navigate ^k actions :vi │
214
215
 
215
216
  "
216
217
  `)
217
218
 
218
- expect(text).toContain('Candle + Volume')
219
+ expect(text).toContain('›SOL')
220
+ expect(text).toContain('Second half')
219
221
  }, 30000)
220
222
 
221
223
  test('side-by-side candle charts in Row', async () => {
@@ -239,28 +241,28 @@ test('side-by-side candle charts in Row', async () => {
239
241
  > Search markets...
240
242
 
241
243
  Watchlist │ $74,678│ ││ $2,220│ │
242
- BTC Bitcoin │ │ ▌▌ │ │ ││
243
- ETH Ethereum │ │ │ │ ▌▘▌ │ ▖▖│ │ ▌▌▖
244
- SOL Solana │ │ ▖▖ ││▌ ▌│ │ ▌▘▌ ││││▌│▌
245
- XRP XRP │ $68,318│ ▌▘▌ ││▌▘▘ ▘▘ $2,000│ ▌│▌ ▌▌▌▌▌ ▘▘
246
- DOGE Dogecoin │ │▖ ▌│▌▖▌▘▘│ ││ ▌ ▘▌▌│││
247
- BNB BNB │ │▌▌▘ ▘▘ │▌▖▌ ││
244
+ BTC Bitcoin $67,641 -0.2% │ │ ▌▌ │ │ ││
245
+ ETH Ethereum $1,971 -0.3% │ │ │ │ ▌▘▌ │ ▖▖│ │ ▌▌▖
246
+ SOL Solana $83.31 -0.4% │ │ ▖▖ ││▌ ▌│ │ ▌▘▌ ││││▌│▌
247
+ XRP XRP $1.36 -0.4% │ $68,318│ ▌▘▌ ││▌▘▘ ▘▘ $2,000│ ▌│▌ ▌▌▌▌▌ ▘▘
248
+ DOGE Dogecoin $0.0901 -0.5% │ │▖ ▌│▌▖▌▘▘│ ││ ▌ ▘▌▌│││
249
+ BNB BNB $622 -0.3% │ │▌▌▘ ▘▘ │▌▖▌ ││
248
250
  │ $61,957│ │ │ $1,780│││
249
251
  Mixed Components │ 30d Now 30d Now
250
- BTC - Candles Real BTC/USD hourly candles
251
- ETH - Candle + Line Candles plus closing line │ ────────────────────────────────────────────
252
- SOL - Candle + Volume Candles plus volume spli
253
- ›BTC vs ETH Side-by-side crypto leaders │ Price: $67,641
254
- DOGE - Candle + Line Low-priced asset formatti
252
+ BTC - CandlesReal BTC/US...rly candles $67,641
253
+ ETH - C...e + LineCandles p...sing line $1,971 │ ────────────────────────────────────────────
254
+ SOL - Ca... + Volum Candles ...me split $83.31
255
+ ›BTC vs ETH Side-by-side crypto leaders $67,641 │ Price: $67,641
256
+ DOGE - ...e + LineLow-pric...ormatting $0.0901
255
257
  │ Change: -0.2%
256
258
 
257
259
 
260
+
261
+
262
+
263
+
258
264
  ↵ open detail ↑↓ navigate ^k actions :vi │
259
265
 
260
-
261
-
262
-
263
-
264
266
  "
265
267
  `)
266
268
 
@@ -0,0 +1,53 @@
1
+ // Example: DottedLineGraph showing metric dashboard lines without box borders.
2
+
3
+ import { Color, DottedLineGraph, Markdown } from 'termcast'
4
+ import { renderWithProviders } from '../utils'
5
+
6
+ const minutes = Array.from({ length: 60 }, (_, index) => {
7
+ if (index < 25) return 18
8
+ if (index < 35) return 74 + (index % 3) * 4
9
+ if (index < 57) return 20
10
+ return 66
11
+ })
12
+
13
+ const memory = Array.from({ length: 60 }, (_, index) => {
14
+ if (index < 24) return 34
15
+ if (index < 40) return 58 + (index % 5) * 3
16
+ return 36
17
+ })
18
+
19
+ const requests2xx = Array.from({ length: 60 }, (_, index) => {
20
+ if (index < 42) return 52
21
+ if (index < 56) return 43
22
+ return 63
23
+ })
24
+
25
+ const requests5xx = Array.from({ length: 60 }, (_, index) => {
26
+ if (index < 12) return 24
27
+ if (index < 45) return 30
28
+ return 28
29
+ })
30
+
31
+ function SimpleDottedLineGraph() {
32
+ return (
33
+ <>
34
+ <Markdown content="## Dotted metrics" />
35
+ <Markdown content="Metric-style dotted lines with braille subcell movement." />
36
+ <DottedLineGraph
37
+ height={12}
38
+ xLabels={['7:28 AM', '7:43 AM', '7:58 AM', '8:13 AM', '8:28 AM']}
39
+ yRange={[0, 100]}
40
+ yTicks={4}
41
+ yFormat={(value) => `${value.toFixed(0)}%`}
42
+ dotSpacing={4}
43
+ >
44
+ <DottedLineGraph.Series data={minutes} color={Color.Blue} title="CPU" />
45
+ <DottedLineGraph.Series data={memory} color={Color.Purple} title="Memory" />
46
+ <DottedLineGraph.Series data={requests2xx} color={Color.Green} title="2xx" />
47
+ <DottedLineGraph.Series data={requests5xx} color={Color.Red} title="5xx" />
48
+ </DottedLineGraph>
49
+ </>
50
+ )
51
+ }
52
+
53
+ void renderWithProviders(<SimpleDottedLineGraph />)
@@ -0,0 +1,62 @@
1
+ import { test, expect, afterEach, beforeEach } from 'vitest'
2
+ import { launchTerminal, Session } from 'tuistory/src'
3
+
4
+ let session: Session
5
+
6
+ beforeEach(async () => {
7
+ session = await launchTerminal({
8
+ command: 'bun',
9
+ args: ['src/examples/simple-dotted-line-graph.tsx'],
10
+ cols: 90,
11
+ rows: 28,
12
+ })
13
+ })
14
+
15
+ afterEach(() => {
16
+ session?.close()
17
+ })
18
+
19
+ test('dotted line graph renders metric lines and legend', async () => {
20
+ const text = await session.text({
21
+ waitFor: (text) => {
22
+ return text.includes('Dotted metrics') && text.includes('CPU') && text.includes('│')
23
+ },
24
+ timeout: 10000,
25
+ })
26
+
27
+ expect(text).toMatchInlineSnapshot(`
28
+ "
29
+
30
+
31
+ Dotted metrics
32
+ Metric-style dotted lines with braille subcell movement.
33
+ 100%│
34
+
35
+ │ ⠄⠈⢀ ⠄⠈⢀ ⠠⠈⢀ ⠠
36
+ │ ⠠ ⠁ ⠁ ⠠ ⠁ ⠁⠰ ⠄
37
+ 67%│ ⠈⠊ ⠠ ⠂⠁ ⠂ ⠠⠐ ⠁ ⠂ ⠄⠐ ⠁⠐ ⠐ ⡃⠃⠘
38
+ │⡀⢀⢀ ⡀⢀ ⡀⡀⢀ ⡀⢀⢀ ⡀⢀⢀ ⡀⢀ ⡀⡀⢀ ⡀⢀⢀ ⡀⢀⢁⠈⡁⢀ ⡀⡀⢀ ⡁⢀⢀ ⡀⢀⠂⡁⡀⢀ ⡀⡐⢀ ⡀ ⠁⢀
39
+ │ ⠁⠈ ⠐ ⠂ ⢄⢀ ⡀⢀ ⡀⡀⢀ ⡀⡀⢀ ⡀⢀⢀ ⡈ ⡀
40
+ 33%│⡀⢀⢀ ⡀⢀ ⡀⡀⢀ ⡀⢀⢀ ⡀⢀⢀ ⡀⢀ ⡀⡀⢀ ⡀⢀⢀ ⡀⢈ ⠁ ⠐ ⠰ ⠄⠠⠠ ⠄⠠ ⠄⠄⠠ ⠄⠄⠠ ⠄⠠⠠ ⠄⠠⡀⠄⠄⠠
41
+ │ ⠐⠐ ⠂⠐ ⠂⠂⠐ ⠂⠐⠐ ⠂⠐⠐⠁⠂⠐ ⠂⠂⠐ ⠂⠐⠐ ⠂⠐⠐⠂⠂⠐ ⠂⠂⠐ ⠂⠐⠐ ⠂⠠ ⠄⠄⠠ ⠄⠄⠠ ⠄⠠⠠ ⠄⢠ ⠄⠄⠠
42
+ │⡁⢈⢈ ⡁⢈ ⡁⡁⢈ ⡁⢈⢈ ⡁⢀⢀ ⡀⢀ ⡀⡀⢀ ⡀⢀⢀ ⡀⢀⢈ ⠆⠄⠠ ⠄⠄⠠ ⠄⠠⠠ ⠄⠠ ⠄⠄⠠ ⠄⠄⠠ ⠄⠠⠠ ⠄⠠
43
+
44
+ 0%│
45
+ 7:28 AM 7:43 AM 7:58 AM 8:13 AM 8:28 AM
46
+ ● CPU ● Memory ● 2xx ● 5xx
47
+
48
+
49
+
50
+
51
+
52
+
53
+
54
+
55
+
56
+ "
57
+ `)
58
+ expect(text).toContain('Dotted metrics')
59
+ expect(text).toContain('CPU')
60
+ expect(text).toContain('8:28 AM')
61
+ expect(text).toMatch(/[\u2800-\u28FF]/)
62
+ }, 30000)
@@ -228,7 +228,7 @@ test('grid search functionality', async () => {
228
228
  🚀 Rocket
229
229
  ⭐ Star
230
230
  🌙 Moon
231
- Sun
231
+ ☀️ Sun
232
232
 
233
233
 
234
234
  ↵ show details ↑↓ navigate ^k actions :vim
@@ -268,7 +268,7 @@ test('grid search functionality', async () => {
268
268
  🚀 Rocket
269
269
  ⭐ Star
270
270
  🌙 Moon
271
- Sun
271
+ ☀️ Sun
272
272
 
273
273
 
274
274
  ↵ show details ↑↓ navigate ^k actions :vim
@@ -342,7 +342,7 @@ test('grid search functionality', async () => {
342
342
  🚀 Rocket
343
343
  ⭐ Star
344
344
  🌙 Moon
345
- Sun
345
+ ☀️ Sun
346
346
 
347
347
 
348
348
  ↵ show details ↑↓ navigate ^k actions :vim
@@ -535,7 +535,7 @@ test('grid mouse interaction', async () => {
535
535
  🚀 Rocket
536
536
  ›⭐ Star
537
537
  🌙 Moon
538
- Sun
538
+ ☀️ Sun
539
539
 
540
540
 
541
541
 
@@ -36,12 +36,12 @@ test('renders calendar heatmaps with various color combinations', async () => {
36
36
  Calendar Heatmap Color Showcase
37
37
 
38
38
 
39
+ Each heatmap demonstrates a different color combination.
40
+ Data has a late-fall gap to show that empty weeks are skipped.
41
+ Last heatmap renders multi-year data to verify width truncation.
39
42
 
40
-
41
-
42
-
43
-
44
-
43
+ Long history — 5 years of daily data in purple. Months that don't fit the
44
+ terminal width are truncated from the left.
45
45
 
46
46
  May Jun Jul Aug Sep Oct Nov
47
47
  ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼
@@ -53,8 +53,8 @@ test('renders calendar heatmaps with various color combinations', async () => {
53
53
  ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼
54
54
  Less ◼ ◼ ■ ■ More
55
55
 
56
-
57
-
56
+ Journal — summer + winter entries in green, with a fall gap between the two
57
+ ranges.
58
58
 
59
59
  Jun Jul Aug Sep Jan Feb
60
60
  ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼
@@ -66,14 +66,14 @@ test('renders calendar heatmaps with various color combinations', async () => {
66
66
  ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼
67
67
  Less ◼ ◼ ■ ■ More
68
68
 
69
-
70
-
69
+ Recent activity — last 150 days in red, showing the sine-wave pattern clearly.
71
70
 
72
71
  Se Oct Nov Dec Jan Feb
73
72
  ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼ ◼
74
73
  ■ ◼ ◼ ◼ ■ ■ ■ ◼ ◼ ◼ ■ ■ ◼ ◼ ◼ ■ ■ ■ ◼ ◼ ■ Mon
75
74
  ■ ◼ ◼ ◼ ■ ■ ■ ◼ ◼ ■ ■ ■ ◼ ◼ ◼ ■ ■ ◼ ◼ ◼ ■
76
75
  ■ ■ ◼ ◼ ◼ ■ ■ ■ ◼ ◼ ■ ■ ■ ◼ ◼ ◼ ■ ■ ◼ ◼ ◼ ■ Wed
76
+ ■ ■ ◼ ◼ ◼ ■ ■ ◼ ◼ ◼ ■ ■ ■ ◼ ◼ ◼ ■ ■ ◼ ◼ ◼ ■
77
77
 
78
78
 
79
79
  esc go back ^k actions powered by termcast.app
@@ -0,0 +1,90 @@
1
+ // Example: Histogram component showing action distribution from an AI coding session.
2
+ // Replicates the horizontal distribution table with colored dots, counts, percentages,
3
+ // and bar visualization.
4
+
5
+ import React from 'react'
6
+ import { List, Histogram, Color } from 'termcast'
7
+ import { renderWithProviders } from '../utils'
8
+
9
+ // ── Data ─────────────────────────────────────────────────────────────
10
+
11
+ interface SessionData {
12
+ title: string
13
+ subtitle: string
14
+ actions: Array<{ label: string; value: number; color?: Color.ColorLike }>
15
+ }
16
+
17
+ const sessions: SessionData[] = [
18
+ {
19
+ title: 'Session: refactor(dataset)',
20
+ subtitle: '257 steps · 47m 12s wall · 5.4M tokens',
21
+ actions: [
22
+ { label: 'user', value: 5, color: Color.Orange },
23
+ { label: 'think', value: 13, color: Color.SecondaryText },
24
+ { label: 'read', value: 44, color: '#00CCCC' },
25
+ { label: 'edit', value: 108, color: Color.Purple },
26
+ { label: 'bash', value: 64, color: Color.Yellow },
27
+ { label: 'write', value: 17, color: Color.Green },
28
+ { label: 'grep/glob', value: 6, color: Color.Blue },
29
+ ],
30
+ },
31
+ {
32
+ title: 'Session: add dark mode',
33
+ subtitle: '89 steps · 12m 30s wall · 1.2M tokens',
34
+ actions: [
35
+ { label: 'user', value: 8 },
36
+ { label: 'think', value: 20 },
37
+ { label: 'read', value: 15 },
38
+ { label: 'edit', value: 30 },
39
+ { label: 'bash', value: 12 },
40
+ { label: 'write', value: 4 },
41
+ ],
42
+ },
43
+ {
44
+ title: 'Session: fix auth bug',
45
+ subtitle: '42 steps · 5m 18s wall · 800K tokens',
46
+ actions: [
47
+ { label: 'think', value: 10 },
48
+ { label: 'read', value: 8 },
49
+ { label: 'edit', value: 15 },
50
+ { label: 'bash', value: 7 },
51
+ { label: 'grep/glob', value: 2 },
52
+ ],
53
+ },
54
+ ]
55
+
56
+ // ── Component ────────────────────────────────────────────────────────
57
+
58
+ function HistogramExample() {
59
+ return (
60
+ <List navigationTitle="Histogram Showcase" isShowingDetail={true}>
61
+ {sessions.map((session) => (
62
+ <List.Item
63
+ key={session.title}
64
+ title={session.title}
65
+ subtitle={session.subtitle}
66
+ detail={
67
+ <List.Item.Detail
68
+ metadata={
69
+ <List.Item.Detail.Metadata>
70
+ <Histogram maxBarWidth={30}>
71
+ {session.actions.map((action) => (
72
+ <Histogram.Item
73
+ key={action.label}
74
+ label={action.label}
75
+ value={action.value}
76
+ color={action.color}
77
+ />
78
+ ))}
79
+ </Histogram>
80
+ </List.Item.Detail.Metadata>
81
+ }
82
+ />
83
+ }
84
+ />
85
+ ))}
86
+ </List>
87
+ )
88
+ }
89
+
90
+ renderWithProviders(<HistogramExample />)