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
@@ -33,14 +33,14 @@ test('polymarket list with graph detail renders correctly', async () => {
33
33
  > Search markets...
34
34
 
35
35
  Trending Markets │ 100%│
36
- ›Bitcoin above $100k by EOY Crypto │ │ ⣠⣀
37
- ETH above $5k by Q2 2026 Crypto │ │ ⢠⣀ ⢀⣴⣷⡀ ⣰⣿⣿⣷⣀⣤⣴⣦⢀⣴
38
- Fed cuts rates below 4% Economics │ │⣠⣴⡀ ⢀ ⢠⣿⣿⣷⡀ ⣀⣤⣀⣀⣾⣿⣿⣿⣶⣴⣿⣿⣶⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
39
- S&P 500 reaches 6,000 Markets │ 50%│⣿⣿⣷⣄⢀⣴⣿⣿⣾⣿⣿⣿⣿⣷⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
40
- Presidential pardon for SBF Politics │ │⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
41
- AGI announced by major lab Tech │ │⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
42
- Solana flips Ethereum market cap Crypto │ 0%│⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
43
- US enters recession in 2026 Economics │ 30d 20d 10d Now
36
+ ›Bitcoin above $100k by EOY Crypto 72% │ │ ⣠⣀
37
+ ETH above $5k by Q2 2026 Crypto 38% │ │ ⢠⣀ ⢀⣴⣷⡀ ⣰⣿⣿⣷⣀⣤⣴⣦⢀⣴
38
+ Fed cuts rates below 4% Economics 61% │ │⣠⣴⡀ ⢀ ⢠⣿⣿⣷⡀ ⣀⣤⣀⣀⣾⣿⣿⣿⣶⣴⣿⣿⣶⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
39
+ S&P 500 reaches 6,000 Markets 55% │ 50%│⣿⣿⣷⣄⢀⣴⣿⣿⣾⣿⣿⣿⣿⣷⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
40
+ Presidential pardon for SBF Politics 8% │ │⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
41
+ AGI announced by major lab Tech 12% │ │⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
42
+ Solana flips Ethereum market cap Crypto 18% │ 0%│⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
43
+ US enters recession in 2026 Economics 28% │ 30d 20d 10d Now
44
44
 
45
45
  │ Odds: 72% Yes
46
46
 
@@ -50,10 +50,10 @@ test('polymarket list with graph detail renders correctly', async () => {
50
50
 
51
51
  │ ────────────────────────────────────────────
52
52
 
53
- ↵ buy yes ↑↓ navigate ^k actions :vim │ Probability (30d)
54
-
55
-
56
-
53
+ │ Probability (30d)
54
+
55
+
56
+ ↵ buy yes ↑↓ navigate ^k actions :vim │
57
57
 
58
58
  "
59
59
  `)
@@ -96,14 +96,14 @@ test('navigating to different market updates the graph', async () => {
96
96
  > Search markets...
97
97
 
98
98
  Trending Markets │ 100%│
99
- Bitcoin above $100k by EOY Crypto │ │
100
- ›ETH above $5k by Q2 2026 Crypto │ │ ⣀
101
- Fed cuts rates below 4% Economics │ │⣿⣿⣆ ⢀⡀ ⣀⣾⣶⣄ ⢀⣤⣦ ⢀⡀
102
- S&P 500 reaches 6,000 Markets │ 50%│⣿⣿⣿⣷⣴⣾⣿⣿⣿⣿⣿⣿⣿⣦⣤⣶⣷⣦⣤⣿⣿⣿⣷⣤⣀⣤⣤⣀⢀⣴⣿⣿⣧ ⣀⣀⡀ ⢀
103
- Presidential pardon for SBF Politics │ │⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣴⣿
104
- AGI announced by major lab Tech │ │⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
105
- Solana flips Ethereum market cap Crypto │ 0%│⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
106
- US enters recession in 2026 Economics │ 30d 20d 10d Now
99
+ Bitcoin above $100k by EOY Crypto 72% │ │
100
+ ›ETH above $5k by Q2 2026 Crypto 38% │ │ ⣀
101
+ Fed cuts rates below 4% Economics 61% │ │⣿⣿⣆ ⢀⡀ ⣀⣾⣶⣄ ⢀⣤⣦ ⢀⡀
102
+ S&P 500 reaches 6,000 Markets 55% │ 50%│⣿⣿⣿⣷⣴⣾⣿⣿⣿⣿⣿⣿⣿⣦⣤⣶⣷⣦⣤⣿⣿⣿⣷⣤⣀⣤⣤⣀⢀⣴⣿⣿⣧ ⣀⣀⡀ ⢀
103
+ Presidential pardon for SBF Politics 8% │ │⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣴⣿
104
+ AGI announced by major lab Tech 12% │ │⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
105
+ Solana flips Ethereum market cap Crypto 18% │ 0%│⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
106
+ US enters recession in 2026 Economics 28% │ 30d 20d 10d Now
107
107
 
108
108
  │ Odds: 38% Yes
109
109
 
@@ -113,10 +113,10 @@ test('navigating to different market updates the graph', async () => {
113
113
 
114
114
  │ ────────────────────────────────────────────
115
115
 
116
- ↵ buy yes ↑↓ navigate ^k actions :vim │ Probability (30d)
117
-
118
-
119
-
116
+ │ Probability (30d)
117
+
118
+
119
+ ↵ buy yes ↑↓ navigate ^k actions :vim │
120
120
 
121
121
  "
122
122
  `)
@@ -32,13 +32,13 @@ test('side detail shows two graphs in a row', async () => {
32
32
 
33
33
  > Search...
34
34
 
35
- ›CPU vs Memory Area + Filled side by side │
35
+ ›CPU vs Memory Area + Filled side by side │ CPU vs Memory
36
36
  Disk I/O Read vs Write operations │ █
37
37
  Revenue vs Expenses Striped comparison │ █
38
- Weather Station Temperature + Humidity │
39
- Mixed Variants Area left, Striped right │
40
- Sparse Data (Zeros) Filled vs Striped with zer
41
-
38
+ Weather Station Temperature + Humidity │ Area chart (left) shows CPU with high
39
+ Mixed Variants Area left, Striped right │ variance.
40
+ Sparse ... (Zeros)Filled vs St...h zero values Filled chart (right) shows memory steadily
41
+ climbing.
42
42
  │ █
43
43
  │ 100│ ⡀ 100│ █
44
44
  │ │ ⡄ ⣼⣷⡀ │ ▖▖▌▌ █
@@ -48,7 +48,7 @@ test('side detail shows two graphs in a row', async () => {
48
48
  │ 33│⣀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧ 33│▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌
49
49
  │ │⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ │▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌
50
50
  │ 0│⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ 0│▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌
51
- │ 0h 6h 12h 18h24h 0h 6h 12h 18h24h
51
+ │ 0h 6h 12h 18h 0h 6h 12h 18h
52
52
 
53
53
  │ ───────────────────────────────────────────
54
54
 
@@ -156,7 +156,7 @@ test('esc returns from detail to list', async () => {
156
156
  Revenue vs Expenses Striped comparison │ █
157
157
  Weather Station Temperature + Humidity │ Area chart (left) shows CPU with high █
158
158
  Mixed Variants Area left, Striped right │ variance. █
159
- Sparse Data (Zeros) Filled vs Striped with zer │ Filled chart (right) shows memory steadily █
159
+ Sparse ... (Zeros)Filled vs St...h zero values │ Filled chart (right) shows memory steadily █
160
160
  │ climbing. █
161
161
  │ █
162
162
  │ 100│ ⡀ 100│ █
@@ -167,7 +167,7 @@ test('esc returns from detail to list', async () => {
167
167
  │ 33│⣀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧ 33│▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌
168
168
  │ │⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ │▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌
169
169
  │ 0│⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ 0│▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌
170
- │ 0h 6h 12h 18h24h 0h 6h 12h 18h24h
170
+ │ 0h 6h 12h 18h 0h 6h 12h 18h
171
171
 
172
172
  │ ───────────────────────────────────────────
173
173
 
@@ -183,7 +183,7 @@ test('esc returns from detail to list', async () => {
183
183
  test('sparse data with zeros shows baseline', async () => {
184
184
  await session.text({
185
185
  waitFor: (text) => {
186
- return text.includes('Sparse Data')
186
+ return text.includes('Sparse ...')
187
187
  },
188
188
  timeout: 10000,
189
189
  })
@@ -195,7 +195,7 @@ test('sparse data with zeros shows baseline', async () => {
195
195
 
196
196
  const text = await session.text({
197
197
  waitFor: (text) => {
198
- return text.includes('›Sparse Data')
198
+ return text.includes('›Sparse ...')
199
199
  },
200
200
  timeout: 5000,
201
201
  })
@@ -213,7 +213,7 @@ test('sparse data with zeros shows baseline', async () => {
213
213
  Revenue vs Expenses Striped comparison │ █
214
214
  Weather Station Temperature + Humidity │ Data with many zero values should show a █
215
215
  Mixed Variants Area left, Striped right │ thin █
216
- ›Sparse Data (Zeros) Filled vs Striped with zer │ baseline line so bars are visible even at █
216
+ ›Sparse ... (Zeros)Filled vs St...h zero values │ baseline line so bars are visible even at █
217
217
  │ zero. █
218
218
  │ █
219
219
  │ 100│ ▖ 100│ ▖ █
@@ -224,7 +224,7 @@ test('sparse data with zeros shows baseline', async () => {
224
224
  │ 33│ ▖ ▌▌▌ ▌▌▖ ▌▌▌ 33│ ▖ ▌▌▌ ▌▌▖ ▌▌▌
225
225
  │ │ ▌▌▌▌▌▌▌▌▌▌ ▌▌▌ │ ▌▌▌▌▌▌▌▌▌▌ ▌▌▌
226
226
  │ 0│▖▌▌▌▌▌▌▌▌▌▌▌▖▌▌▌▖ 0│▖▌▌▌▌▌▌▌▌▌▌▌▖▌▌▌▖
227
- │ 0h 6h 12h 18h24h 0h 6h 12h 18h24h
227
+ │ 0h 6h 12h 18h 0h 6h 12h 18h
228
228
 
229
229
  │ ───────────────────────────────────────────
230
230
 
@@ -234,7 +234,7 @@ test('sparse data with zeros shows baseline', async () => {
234
234
  "
235
235
  `)
236
236
 
237
- expect(text).toContain('›Sparse Data')
237
+ expect(text).toContain('›Sparse ...')
238
238
  }, 30000)
239
239
 
240
240
  test('navigate to striped pair', async () => {
@@ -269,7 +269,7 @@ test('navigate to striped pair', async () => {
269
269
  ›Revenue vs Expenses Striped comparison │ █
270
270
  Weather Station Temperature + Humidity │ Revenue growing faster than expenses. █
271
271
  Mixed Variants Area left, Striped right │ Profit margin widening over the year. █
272
- Sparse Data (Zeros) Filled vs Striped with zer │ - Revenue: $10k** to **$75k █
272
+ Sparse ... (Zeros)Filled vs St...h zero values │ - Revenue: $10k** to **$75k █
273
273
  │ - Expenses: $8k** to **$45k
274
274
 
275
275
  │ 78│ ▖ 47│ ▖
@@ -19,7 +19,7 @@ afterEach(() => {
19
19
  test('area style renders braille characters', async () => {
20
20
  const text = await session.text({
21
21
  waitFor: (text) => {
22
- return text.includes('Area - Stock') && text.includes('│')
22
+ return /Area.*Price/i.test(text) && text.includes('│')
23
23
  },
24
24
  timeout: 10000,
25
25
  })
@@ -32,19 +32,19 @@ test('area style renders braille characters', async () => {
32
32
 
33
33
  > Search...
34
34
 
35
- ›Area - Stock Price Orange braille do │ 211│ ⣠ ▲
36
- Area - Multi Series CPU + Memory ove │ │ ⢀⣴⣦⣼⣿ █
37
- Area - Waves Purple + Magenta sine/c │ │ ⢠⣦⣄⣴⣿⣿⣿⣿⣿ █
38
- Area - Blue Revenue Single series, a │ 189│ ⢀⣴⣷⣦⣿⣿⣿⣿⣿⣿⣿⣿⣿ █
39
- Filled - Red Revenue Solid block gro │ │ ⣠⣀⢠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ▀
40
- Filled - Green Temp Daily temperatur │ │ ⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
41
- Filled - Yellow CPU High contrast on │ 167│ ⢀⣴⣿⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
42
- Filled - Magenta Waves Smooth curve │ │ ⣰⣤⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
43
- Striped - Purple/Orange Warm alterna │ │⢀⣴⡄⢰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
44
- Striped - Blue/Red High contrast str │ 145│⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
45
- Striped - Theme Default primary + ac │ 1 5 10 15 20
46
- Striped - Green/Yellow Nature-inspir
47
- Striped - Red/Magenta Warm gradient │ ─────────────────────────────────
35
+ ›Area - Stock PriceOrange ...lle dots │ 211│ ⣠ ▲
36
+ Area - ...i Series CPU + M...overlay │ │ ⢀⣴⣦⣼⣿ █
37
+ Area - Wave Purple + M...sine/cosine │ │ ⢠⣦⣄⣴⣿⣿⣿⣿⣿ █
38
+ Area - ... Revenu Single ...to range │ 189│ ⢀⣴⣷⣦⣿⣿⣿⣿⣿⣿⣿⣿⣿ █
39
+ Filled ... RevenueSolid b...th chart │ │ ⣠⣀⢠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ▀
40
+ Filled ...een Tem Daily t...re curve │ │ ⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
41
+ Filled ...llow CPUHigh co... on dark │ 167│ ⢀⣴⣿⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
42
+ Filled -...nta Wave Smooth... blocks │ │ ⣰⣤⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
43
+ Striped -...le/Orang Warm a...colors │ │⢀⣴⡄⢰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
44
+ Striped - Blue/Re High co... stripes │ 145│⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
45
+ Striped ...e Defaultprimar...o prop) │ 1 5 10 15 20
46
+ Striped - Green/Yello Natur...spired
47
+ Striped ...d/MagentaWarm g...nt feel │ ─────────────────────────────────
48
48
 
49
49
  │ Variant: area
50
50
  ↵ open detail ↑↓ navigate ^k act │ ▼
@@ -53,7 +53,7 @@ test('area style renders braille characters', async () => {
53
53
  `)
54
54
 
55
55
  expect(text).toMatch(/[\u2800-\u28FF]/)
56
- expect(text).toContain('Stock Price')
56
+ expect(text).toContain('Price')
57
57
  }, 30000)
58
58
 
59
59
  test('filled style renders block characters', async () => {
@@ -71,7 +71,7 @@ test('filled style renders block characters', async () => {
71
71
 
72
72
  const text = await session.text({
73
73
  waitFor: (text) => {
74
- return text.includes('›Filled - Red')
74
+ return /›Filled.*Revenue/i.test(text)
75
75
  },
76
76
  timeout: 5000,
77
77
  })
@@ -84,19 +84,19 @@ test('filled style renders block characters', async () => {
84
84
 
85
85
  > Search...
86
86
 
87
- Area - Stock Price Orange braille do │ Revenue Growth ▲
88
- Area - Multi Series CPU + Memory ove │ █
89
- Area - Waves Purple + Magenta sine/c
90
- Area - Blue Revenue Single series, a │ Quarterly revenue from $10k** to
91
- ›Filled - Red Revenue Solid block gro │ **$75k.
92
- Filled - Green Temp Daily temperatur │ Q1: $10k → Q2: $25k (+150%)
93
- Filled - Yellow CPU High contrast on │ Q2: $25k → Q3: $50k (+100%)
94
- Filled - Magenta Waves Smooth curve │ Q3: $50k → Q4: $75k (+50%)
95
- Striped - Purple/Orange Warm alterna
96
- Striped - Blue/Red High contrast str │ 78│ ▖
97
- Striped - Theme Default primary + ac │ │ ▖▌▖▌▌
98
- Striped - Green/Yellow Nature-inspir │ │ ▖▖▖▌▌▌▌▌▌
99
- Striped - Red/Magenta Warm gradient │ 54│ ▖▌▌▌▌▌▌▌▌▌▌
87
+ Area - Stock PriceOrange ...lle dots │ Revenue Growth ▲
88
+ Area - ...i Series CPU + M...overlay │ █
89
+ Area - Wave Purple + M...sine/cosine
90
+ Area - ... Revenu Single ...to range │ Quarterly revenue from $10k** to
91
+ ›Filled ... RevenueSolid b...th chart │ **$75k.
92
+ Filled ...een Tem Daily t...re curve │ Q1: $10k → Q2: $25k (+150%)
93
+ Filled ...llow CPUHigh co... on dark │ Q2: $25k → Q3: $50k (+100%)
94
+ Filled -...nta Wave Smooth... blocks │ Q3: $50k → Q4: $75k (+50%)
95
+ Striped -...le/Orang Warm a...colors
96
+ Striped - Blue/Re High co... stripes │ 78│ ▖
97
+ Striped ...e Defaultprimar...o prop) │ │ ▖▌▖▌▌
98
+ Striped - Green/Yello Natur...spired │ │ ▖▖▖▌▌▌▌▌▌
99
+ Striped ...d/MagentaWarm g...nt feel │ 54│ ▖▌▌▌▌▌▌▌▌▌▌
100
100
  │ │ ▖▖▖▌▌▌▌▌▌▌▌▌▌▌▌
101
101
  │ │ ▖ ▖▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌
102
102
  ↵ open detail ↑↓ navigate ^k act │ 31│ ▖▌▌▖▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌ ▼
@@ -105,7 +105,7 @@ test('filled style renders block characters', async () => {
105
105
  `)
106
106
 
107
107
  expect(text).toMatch(/[▌▘▖]/)
108
- expect(text).toContain('›Filled - Red')
108
+ expect(text).toContain('›Filled')
109
109
  }, 30000)
110
110
 
111
111
  test('striped style renders alternating columns', async () => {
@@ -123,7 +123,7 @@ test('striped style renders alternating columns', async () => {
123
123
 
124
124
  const text = await session.text({
125
125
  waitFor: (text) => {
126
- return text.includes('›Striped - Purple')
126
+ return /›Striped.*Warm/i.test(text)
127
127
  },
128
128
  timeout: 5000,
129
129
  })
@@ -136,19 +136,19 @@ test('striped style renders alternating columns', async () => {
136
136
 
137
137
  > Search...
138
138
 
139
- Area - Stock Price Orange braille do │ 211│ ▖ ▲
140
- Area - Multi Series CPU + Memory ove │ │ ▖▖▌▌ █
141
- Area - Waves Purple + Magenta sine/c │ │ ▖▖▖▌▌▌▌▌ █
142
- Area - Blue Revenue Single series, a │ 189│ ▖▖▌▖▌▌▌▌▌▌▌▌▌
143
- Filled - Red Revenue Solid block gro │ │ ▖▖▖▌▌▌▌▌▌▌▌▌▌▌▌▌
144
- Filled - Green Temp Daily temperatur │ │ ▖▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌
145
- Filled - Yellow CPU High contrast on │ 167│ ▖▖▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌
146
- Filled - Magenta Waves Smooth curve │ │ ▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌
147
- ›Striped - Purple/Orange Warm alterna │ │▖▌▖▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌
148
- Striped - Blue/Red High contrast str │ 145│▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌
149
- Striped - Theme Default primary + ac │ 1 5 10 15 20
150
- Striped - Green/Yellow Nature-inspir
151
- Striped - Red/Magenta Warm gradient │ ─────────────────────────────────
139
+ Area - Stock PriceOrange ...lle dots │ 211│ ▖ ▲
140
+ Area - ...i Series CPU + M...overlay │ │ ▖▖▌▌ █
141
+ Area - Wave Purple + M...sine/cosine │ │ ▖▖▖▌▌▌▌▌ █
142
+ Area - ... Revenu Single ...to range │ 189│ ▖▖▌▖▌▌▌▌▌▌▌▌▌
143
+ Filled ... RevenueSolid b...th chart │ │ ▖▖▖▌▌▌▌▌▌▌▌▌▌▌▌▌
144
+ Filled ...een Tem Daily t...re curve │ │ ▖▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌
145
+ Filled ...llow CPUHigh co... on dark │ 167│ ▖▖▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌
146
+ Filled -...nta Wave Smooth... blocks │ │ ▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌
147
+ ›Striped -...le/Orang Warm a...colors │ │▖▌▖▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌
148
+ Striped - Blue/Re High co... stripes │ 145│▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌
149
+ Striped ...e Defaultprimar...o prop) │ 1 5 10 15 20
150
+ Striped - Green/Yello Natur...spired
151
+ Striped ...d/MagentaWarm g...nt feel │ ─────────────────────────────────
152
152
 
153
153
  │ Even cols: Purple
154
154
  ↵ open detail ↑↓ navigate ^k act │ ▼
@@ -157,13 +157,13 @@ test('striped style renders alternating columns', async () => {
157
157
  `)
158
158
 
159
159
  expect(text).toMatch(/[▌▘▖]/)
160
- expect(text).toContain('›Striped - Purple')
160
+ expect(text).toContain('›Striped')
161
161
  }, 30000)
162
162
 
163
163
  test('markdown + metadata detail view in list', async () => {
164
164
  await session.text({
165
165
  waitFor: (text) => {
166
- return text.includes('Area - Multi') && text.includes('│')
166
+ return /Area.*Series/i.test(text) && text.includes('│')
167
167
  },
168
168
  timeout: 10000,
169
169
  })
@@ -173,7 +173,7 @@ test('markdown + metadata detail view in list', async () => {
173
173
 
174
174
  const text = await session.text({
175
175
  waitFor: (text) => {
176
- return text.includes('›Area - Multi') && text.includes('System Metrics')
176
+ return /›Area.*Series/i.test(text) && text.includes('System Metrics')
177
177
  },
178
178
  timeout: 5000,
179
179
  })
@@ -186,19 +186,19 @@ test('markdown + metadata detail view in list', async () => {
186
186
 
187
187
  > Search...
188
188
 
189
- Area - Stock Price Orange braille do │ System Metrics ▲
190
- ›Area - Multi Series CPU + Memory ove │ ▀
191
- Area - Waves Purple + Magenta sine/c
192
- Area - Blue Revenue Single series, a │ CPU usage (blue) vs memory usage (
193
- Filled - Red Revenue Solid block gro │ green) over 24 hours.
194
- Filled - Green Temp Daily temperatur │ - Peak CPU at 90% around 15h
195
- Filled - Yellow CPU High contrast on │ - Memory steadily climbing to 86%
196
- Filled - Magenta Waves Smooth curve │ - CPU has high variance, memory
197
- Striped - Purple/Orange Warm alterna is monotonic
198
- Striped - Blue/Red High contrast str
199
- Striped - Theme Default primary + ac │ 100│
200
- Striped - Green/Yellow Nature-inspir │ │ ⣠⣶⣧ ⣀⣠⣤⣶
201
- Striped - Red/Magenta Warm gradient │ 75│ ⢀⣴⣧ ⢀⣰⣿⣿⣿⣷⣾⣿⣿⣿⣿⣿
189
+ Area - Stock PriceOrange ...lle dots │ System Metrics ▲
190
+ ›Area - ...i Series CPU + M...overlay │ ▀
191
+ Area - Wave Purple + M...sine/cosine
192
+ Area - ... Revenu Single ...to range │ CPU usage (blue) vs memory usage (
193
+ Filled ... RevenueSolid b...th chart │ green) over 24 hours.
194
+ Filled ...een Tem Daily t...re curve │ - Peak CPU at 90% around 15h
195
+ Filled ...llow CPUHigh co... on dark │ - Memory steadily climbing to 86%
196
+ Filled -...nta Wave Smooth... blocks │ - CPU has high variance, memory
197
+ Striped -...le/Orang Warm a...colors is monotonic
198
+ Striped - Blue/Re High co... stripes
199
+ Striped ...e Defaultprimar...o prop) │ 100│
200
+ Striped - Green/Yello Natur...spired │ │ ⣠⣶⣧ ⣀⣠⣤⣶
201
+ Striped ...d/MagentaWarm g...nt feel │ 75│ ⢀⣴⣧ ⢀⣰⣿⣿⣿⣷⣾⣿⣿⣿⣿⣿
202
202
  │ │ ⢀⣾⣿⣿⣧⢀⣀⣤⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
203
203
  │ │ ⢀⣾⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
204
204
  ↵ open detail ↑↓ navigate ^k act │ 50│⣀⣀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ▼
@@ -213,7 +213,7 @@ test('markdown + metadata detail view in list', async () => {
213
213
  test('enter pushes full detail view with graph', async () => {
214
214
  await session.text({
215
215
  waitFor: (text) => {
216
- return text.includes('Area - Stock') && text.includes('│')
216
+ return /Area.*Price/i.test(text) && text.includes('│')
217
217
  },
218
218
  timeout: 10000,
219
219
  })
@@ -265,7 +265,7 @@ test('enter pushes full detail view with graph', async () => {
265
265
  test('esc returns from detail to list', async () => {
266
266
  await session.text({
267
267
  waitFor: (text) => {
268
- return text.includes('Area - Stock') && text.includes('│')
268
+ return /Area.*Price/i.test(text) && text.includes('│')
269
269
  },
270
270
  timeout: 10000,
271
271
  })
@@ -284,7 +284,7 @@ test('esc returns from detail to list', async () => {
284
284
 
285
285
  const text = await session.text({
286
286
  waitFor: (text) => {
287
- return text.includes('›Area - Stock Price') && text.includes('Graph Styles')
287
+ return /›Area.*Price/i.test(text) && text.includes('Graph Styles')
288
288
  },
289
289
  timeout: 5000,
290
290
  })
@@ -297,19 +297,19 @@ test('esc returns from detail to list', async () => {
297
297
 
298
298
  > Search...
299
299
 
300
- ›Area - Stock Price Orange braille do │ 211│ ⣠ ▲
301
- Area - Multi Series CPU + Memory ove │ │ ⢀⣴⣦⣼⣿ █
302
- Area - Waves Purple + Magenta sine/c │ │ ⢠⣦⣄⣴⣿⣿⣿⣿⣿ █
303
- Area - Blue Revenue Single series, a │ 189│ ⢀⣴⣷⣦⣿⣿⣿⣿⣿⣿⣿⣿⣿ █
304
- Filled - Red Revenue Solid block gro │ │ ⣠⣀⢠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ▀
305
- Filled - Green Temp Daily temperatur │ │ ⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
306
- Filled - Yellow CPU High contrast on │ 167│ ⢀⣴⣿⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
307
- Filled - Magenta Waves Smooth curve │ │ ⣰⣤⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
308
- Striped - Purple/Orange Warm alterna │ │⢀⣴⡄⢰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
309
- Striped - Blue/Red High contrast str │ 145│⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
310
- Striped - Theme Default primary + ac │ 1 5 10 15 20
311
- Striped - Green/Yellow Nature-inspir
312
- Striped - Red/Magenta Warm gradient │ ─────────────────────────────────
300
+ ›Area - Stock PriceOrange ...lle dots │ 211│ ⣠ ▲
301
+ Area - ...i Series CPU + M...overlay │ │ ⢀⣴⣦⣼⣿ █
302
+ Area - Wave Purple + M...sine/cosine │ │ ⢠⣦⣄⣴⣿⣿⣿⣿⣿ █
303
+ Area - ... Revenu Single ...to range │ 189│ ⢀⣴⣷⣦⣿⣿⣿⣿⣿⣿⣿⣿⣿ █
304
+ Filled ... RevenueSolid b...th chart │ │ ⣠⣀⢠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ▀
305
+ Filled ...een Tem Daily t...re curve │ │ ⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
306
+ Filled ...llow CPUHigh co... on dark │ 167│ ⢀⣴⣿⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
307
+ Filled -...nta Wave Smooth... blocks │ │ ⣰⣤⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
308
+ Striped -...le/Orang Warm a...colors │ │⢀⣴⡄⢰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
309
+ Striped - Blue/Re High co... stripes │ 145│⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
310
+ Striped ...e Defaultprimar...o prop) │ 1 5 10 15 20
311
+ Striped - Green/Yello Natur...spired
312
+ Striped ...d/MagentaWarm g...nt feel │ ─────────────────────────────────
313
313
 
314
314
  │ Variant: area
315
315
  ↵ open detail ↑↓ navigate ^k act │ ▼
@@ -317,6 +317,6 @@ test('esc returns from detail to list', async () => {
317
317
  "
318
318
  `)
319
319
 
320
- expect(text).toContain('›Area - Stock')
320
+ expect(text).toContain('›Area')
321
321
  expect(text).toContain('Graph Styles')
322
322
  }, 30000)
@@ -0,0 +1,138 @@
1
+ // Example: HorizontalBarGraph stacked horizontal rows with a compact right legend.
2
+
3
+ import React from 'react'
4
+ import { Action, ActionPanel, Detail, HorizontalBarGraph, List } from 'termcast'
5
+ import { useNavigation } from 'termcast/src/internal/navigation'
6
+ import { renderWithProviders } from '../utils'
7
+
8
+ const days = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
9
+
10
+ interface DataSet {
11
+ title: string
12
+ subtitle: string
13
+ labels: string[]
14
+ categoryTitle?: string
15
+ distributionTitle?: string
16
+ legendTitle?: string
17
+ series: Array<{ data: number[]; title: string }>
18
+ }
19
+
20
+ const dataSets: DataSet[] = [
21
+ {
22
+ title: 'Weekly Traffic',
23
+ subtitle: 'Direct / Organic / Referral across 6 days',
24
+ labels: days,
25
+ series: [
26
+ { data: [40, 30, 25, 15, 50, 40], title: 'Direct' },
27
+ { data: [30, 35, 15, 20, 35, 30], title: 'Organic' },
28
+ { data: [20, 25, 10, 10, 25, 20], title: 'Referral' },
29
+ ],
30
+ },
31
+ {
32
+ title: 'Revenue by Region',
33
+ subtitle: 'Americas / EMEA / APAC',
34
+ labels: days,
35
+ series: [
36
+ { data: [60, 45, 30, 55, 70, 50], title: 'Americas' },
37
+ { data: [25, 30, 20, 35, 25, 30], title: 'EMEA' },
38
+ { data: [15, 20, 10, 10, 20, 15], title: 'APAC' },
39
+ ],
40
+ },
41
+ {
42
+ title: 'Long Labels',
43
+ subtitle: 'The left label column truncates without stealing legend space',
44
+ labels: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday & Sunday'],
45
+ categoryTitle: 'day',
46
+ distributionTitle: 'traffic',
47
+ legendTitle: 'source',
48
+ series: [
49
+ { data: [40, 30, 25, 15, 50, 40], title: 'Views' },
50
+ { data: [20, 25, 10, 10, 25, 20], title: 'Clicks' },
51
+ ],
52
+ },
53
+ {
54
+ title: 'Many Series',
55
+ subtitle: 'Legend grows only as wide as its content needs',
56
+ labels: days,
57
+ series: Array.from({ length: 8 }, (_, i) => {
58
+ return {
59
+ data: [10 + i * 5, 15 + i * 3, 8 + i * 4, 12 + i * 2, 20 + i * 6, 5 + i * 7],
60
+ title: `Series ${i + 1}`,
61
+ }
62
+ }),
63
+ },
64
+ ]
65
+
66
+ function Chart({ item, height }: { item: DataSet; height: number }): any {
67
+ return (
68
+ <HorizontalBarGraph
69
+ labels={item.labels}
70
+ height={height}
71
+ categoryTitle={item.categoryTitle}
72
+ distributionTitle={item.distributionTitle}
73
+ legendTitle={item.legendTitle}
74
+ >
75
+ {item.series.map((series) => {
76
+ return <HorizontalBarGraph.Series key={series.title} data={series.data} title={series.title} />
77
+ })}
78
+ </HorizontalBarGraph>
79
+ )
80
+ }
81
+
82
+ function HorizontalBarGraphDetailView({ item }: { item: DataSet }): any {
83
+ const { pop } = useNavigation()
84
+
85
+ return (
86
+ <Detail
87
+ navigationTitle={item.title}
88
+ markdown={`# ${item.title}\n\n${item.subtitle}`}
89
+ metadata={
90
+ <Detail.Metadata>
91
+ <Chart item={item} height={12} />
92
+ </Detail.Metadata>
93
+ }
94
+ actions={
95
+ <ActionPanel>
96
+ <Action title="Go Back" onAction={() => { pop() }} />
97
+ </ActionPanel>
98
+ }
99
+ />
100
+ )
101
+ }
102
+
103
+ function HorizontalBarGraphWeeklyExample() {
104
+ const { push } = useNavigation()
105
+
106
+ return (
107
+ <List navigationTitle="HorizontalBarGraph Showcase" isShowingDetail={true}>
108
+ {dataSets.map((item) => {
109
+ return (
110
+ <List.Item
111
+ key={item.title}
112
+ title={item.title}
113
+ subtitle={item.subtitle}
114
+ detail={
115
+ <List.Item.Detail
116
+ metadata={
117
+ <List.Item.Detail.Metadata>
118
+ <Chart item={item} height={10} />
119
+ </List.Item.Detail.Metadata>
120
+ }
121
+ />
122
+ }
123
+ actions={
124
+ <ActionPanel>
125
+ <Action
126
+ title="Open Detail"
127
+ onAction={() => { push(<HorizontalBarGraphDetailView item={item} />) }}
128
+ />
129
+ </ActionPanel>
130
+ }
131
+ />
132
+ )
133
+ })}
134
+ </List>
135
+ )
136
+ }
137
+
138
+ void renderWithProviders(<HorizontalBarGraphWeeklyExample />)