termcast 1.3.48 → 1.3.49
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.
- package/dist/build.d.ts.map +1 -1
- package/dist/build.js +12 -0
- package/dist/build.js.map +1 -1
- package/dist/cli.js +5 -40
- package/dist/cli.js.map +1 -1
- package/dist/colors.d.ts +7 -7
- package/dist/colors.js +7 -7
- package/dist/compile.d.ts +6 -1
- package/dist/compile.d.ts.map +1 -1
- package/dist/compile.js +45 -26
- package/dist/compile.js.map +1 -1
- package/dist/components/actions.js +1 -1
- package/dist/components/actions.js.map +1 -1
- package/dist/components/bar-chart.d.ts +38 -0
- package/dist/components/bar-chart.d.ts.map +1 -0
- package/dist/components/bar-chart.js +158 -0
- package/dist/components/bar-chart.js.map +1 -0
- package/dist/components/bar-graph.d.ts +41 -0
- package/dist/components/bar-graph.d.ts.map +1 -0
- package/dist/components/bar-graph.js +95 -0
- package/dist/components/bar-graph.js.map +1 -0
- package/dist/components/detail.d.ts.map +1 -1
- package/dist/components/detail.js +5 -7
- package/dist/components/detail.js.map +1 -1
- package/dist/components/footer.d.ts.map +1 -1
- package/dist/components/footer.js +8 -9
- package/dist/components/footer.js.map +1 -1
- package/dist/components/form/date-picker.d.ts.map +1 -1
- package/dist/components/form/date-picker.js +7 -1
- package/dist/components/form/date-picker.js.map +1 -1
- package/dist/components/form/dropdown.d.ts.map +1 -1
- package/dist/components/form/dropdown.js +10 -2
- package/dist/components/form/dropdown.js.map +1 -1
- package/dist/components/form/index.d.ts.map +1 -1
- package/dist/components/form/index.js +4 -5
- package/dist/components/form/index.js.map +1 -1
- package/dist/components/form/use-form-navigation.d.ts.map +1 -1
- package/dist/components/form/use-form-navigation.js +6 -0
- package/dist/components/form/use-form-navigation.js.map +1 -1
- package/dist/components/graph.d.ts +111 -0
- package/dist/components/graph.d.ts.map +1 -0
- package/dist/components/graph.js +392 -0
- package/dist/components/graph.js.map +1 -0
- package/dist/components/icon.js +5 -5
- package/dist/components/icon.js.map +1 -1
- package/dist/components/list.d.ts +53 -5
- package/dist/components/list.d.ts.map +1 -1
- package/dist/components/list.js +125 -71
- package/dist/components/list.js.map +1 -1
- package/dist/components/loading-bar.js +3 -3
- package/dist/components/loading-bar.js.map +1 -1
- package/dist/components/loading-text.d.ts +1 -1
- package/dist/components/loading-text.d.ts.map +1 -1
- package/dist/components/loading-text.js +3 -1
- package/dist/components/loading-text.js.map +1 -1
- package/dist/components/metadata.js +2 -2
- package/dist/components/metadata.js.map +1 -1
- package/dist/components/row.d.ts +10 -0
- package/dist/components/row.d.ts.map +1 -0
- package/dist/components/row.js +12 -0
- package/dist/components/row.js.map +1 -0
- package/dist/components/table.d.ts +57 -0
- package/dist/components/table.d.ts.map +1 -0
- package/dist/components/table.js +365 -0
- package/dist/components/table.js.map +1 -0
- package/dist/descendants.js +13 -13
- package/dist/descendants.js.map +1 -1
- package/dist/examples/bar-graph-weekly.d.ts +2 -0
- package/dist/examples/bar-graph-weekly.d.ts.map +1 -0
- package/dist/examples/bar-graph-weekly.js +95 -0
- package/dist/examples/bar-graph-weekly.js.map +1 -0
- package/dist/examples/components-weird-places.d.ts +2 -0
- package/dist/examples/components-weird-places.d.ts.map +1 -0
- package/dist/examples/components-weird-places.js +46 -0
- package/dist/examples/components-weird-places.js.map +1 -0
- package/dist/examples/graph-bar-chart.d.ts +2 -0
- package/dist/examples/graph-bar-chart.d.ts.map +1 -0
- package/dist/examples/graph-bar-chart.js +270 -0
- package/dist/examples/graph-bar-chart.js.map +1 -0
- package/dist/examples/graph-multi-series.d.ts +2 -0
- package/dist/examples/graph-multi-series.d.ts.map +1 -0
- package/dist/examples/graph-multi-series.js +23 -0
- package/dist/examples/graph-multi-series.js.map +1 -0
- package/dist/examples/graph-polymarket.d.ts +2 -0
- package/dist/examples/graph-polymarket.d.ts.map +1 -0
- package/dist/examples/graph-polymarket.js +109 -0
- package/dist/examples/graph-polymarket.js.map +1 -0
- package/dist/examples/graph-row.d.ts +2 -0
- package/dist/examples/graph-row.d.ts.map +1 -0
- package/dist/examples/graph-row.js +226 -0
- package/dist/examples/graph-row.js.map +1 -0
- package/dist/examples/graph-styles.d.ts +2 -0
- package/dist/examples/graph-styles.d.ts.map +1 -0
- package/dist/examples/graph-styles.js +316 -0
- package/dist/examples/graph-styles.js.map +1 -0
- package/dist/examples/list-accessory-table.d.ts +2 -0
- package/dist/examples/list-accessory-table.d.ts.map +1 -0
- package/dist/examples/list-accessory-table.js +46 -0
- package/dist/examples/list-accessory-table.js.map +1 -0
- package/dist/examples/list-item-accessories.d.ts +2 -0
- package/dist/examples/list-item-accessories.d.ts.map +1 -0
- package/dist/examples/list-item-accessories.js +27 -0
- package/dist/examples/list-item-accessories.js.map +1 -0
- package/dist/examples/list-no-actions.d.ts +2 -0
- package/dist/examples/list-no-actions.d.ts.map +1 -0
- package/dist/examples/list-no-actions.js +7 -0
- package/dist/examples/list-no-actions.js.map +1 -0
- package/dist/examples/simple-detail-table.d.ts +2 -0
- package/dist/examples/simple-detail-table.d.ts.map +1 -0
- package/dist/examples/simple-detail-table.js +45 -0
- package/dist/examples/simple-detail-table.js.map +1 -0
- package/dist/examples/simple-graph.d.ts +2 -0
- package/dist/examples/simple-graph.d.ts.map +1 -0
- package/dist/examples/simple-graph.js +32 -0
- package/dist/examples/simple-graph.js.map +1 -0
- package/dist/examples/simple-table-wrap.d.ts +2 -0
- package/dist/examples/simple-table-wrap.d.ts.map +1 -0
- package/dist/examples/simple-table-wrap.js +37 -0
- package/dist/examples/simple-table-wrap.js.map +1 -0
- package/dist/examples/table-edge-cases.d.ts +2 -0
- package/dist/examples/table-edge-cases.d.ts.map +1 -0
- package/dist/examples/table-edge-cases.js +70 -0
- package/dist/examples/table-edge-cases.js.map +1 -0
- package/dist/examples/table-flex-grow.d.ts +2 -0
- package/dist/examples/table-flex-grow.d.ts.map +1 -0
- package/dist/examples/table-flex-grow.js +18 -0
- package/dist/examples/table-flex-grow.js.map +1 -0
- package/dist/extensions/dev.d.ts.map +1 -1
- package/dist/extensions/dev.js +5 -1
- package/dist/extensions/dev.js.map +1 -1
- package/dist/globals.d.ts +1 -0
- package/dist/globals.d.ts.map +1 -1
- package/dist/globals.js +2 -0
- package/dist/globals.js.map +1 -1
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/internal/date-picker-widget.d.ts.map +1 -1
- package/dist/internal/date-picker-widget.js +4 -0
- package/dist/internal/date-picker-widget.js.map +1 -1
- package/dist/internal/providers.d.ts.map +1 -1
- package/dist/internal/providers.js +1 -3
- package/dist/internal/providers.js.map +1 -1
- package/dist/markdown-utils.d.ts +22 -1
- package/dist/markdown-utils.d.ts.map +1 -1
- package/dist/markdown-utils.js +66 -1
- package/dist/markdown-utils.js.map +1 -1
- package/dist/opentui.d.ts +4 -0
- package/dist/opentui.d.ts.map +1 -0
- package/dist/opentui.js +3 -0
- package/dist/opentui.js.map +1 -0
- package/dist/release.d.ts +2 -1
- package/dist/release.d.ts.map +1 -1
- package/dist/release.js +2 -1
- package/dist/release.js.map +1 -1
- package/dist/state.d.ts +1 -0
- package/dist/state.d.ts.map +1 -1
- package/dist/state.js +1 -1
- package/dist/state.js.map +1 -1
- package/dist/theme.d.ts +1 -0
- package/dist/theme.d.ts.map +1 -1
- package/dist/theme.js +13 -0
- package/dist/theme.js.map +1 -1
- package/dist/themes/nerv.json +227 -0
- package/dist/themes/termcast.json +72 -71
- package/dist/themes.d.ts +2 -1
- package/dist/themes.d.ts.map +1 -1
- package/dist/themes.js +7 -5
- package/dist/themes.js.map +1 -1
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +3 -0
- package/dist/utils.js.map +1 -1
- package/package.json +12 -4
- package/src/build.tsx +13 -0
- package/src/cli.tsx +5 -49
- package/src/colors.tsx +7 -7
- package/src/compile.tsx +52 -29
- package/src/components/actions.tsx +1 -1
- package/src/components/bar-chart.tsx +271 -0
- package/src/components/bar-graph.tsx +214 -0
- package/src/components/detail.tsx +7 -8
- package/src/components/footer.tsx +14 -15
- package/src/components/form/date-picker.tsx +9 -0
- package/src/components/form/dropdown.tsx +13 -3
- package/src/components/form/index.tsx +4 -6
- package/src/components/form/use-form-navigation.tsx +6 -0
- package/src/components/graph.tsx +506 -0
- package/src/components/icon.tsx +5 -5
- package/src/components/list.tsx +210 -102
- package/src/components/loading-bar.tsx +3 -3
- package/src/components/loading-text.tsx +4 -2
- package/src/components/metadata.tsx +2 -2
- package/src/components/row.tsx +31 -0
- package/src/components/table.tsx +511 -0
- package/src/descendants.tsx +13 -13
- package/src/examples/action-shortcut.vitest.tsx +1 -1
- package/src/examples/actions-context.vitest.tsx +1 -1
- package/src/examples/bar-graph-weekly.tsx +264 -0
- package/src/examples/bar-graph-weekly.vitest.tsx +275 -0
- package/src/examples/detail-metadata-showcase.vitest.tsx +8 -8
- package/src/examples/form-basic.vitest.tsx +239 -0
- package/src/examples/form-dropdown.vitest.tsx +29 -29
- package/src/examples/form-tagpicker.vitest.tsx +27 -27
- package/src/examples/github.vitest.tsx +4 -4
- package/src/examples/graph-bar-chart.tsx +408 -0
- package/src/examples/graph-bar-chart.vitest.tsx +283 -0
- package/src/examples/graph-multi-series.tsx +36 -0
- package/src/examples/graph-multi-series.vitest.tsx +89 -0
- package/src/examples/graph-polymarket.tsx +182 -0
- package/src/examples/graph-polymarket.vitest.tsx +130 -0
- package/src/examples/graph-row.tsx +347 -0
- package/src/examples/graph-row.vitest.tsx +295 -0
- package/src/examples/graph-styles.tsx +457 -0
- package/src/examples/graph-styles.vitest.tsx +322 -0
- package/src/examples/list-accessory-table.tsx +77 -0
- package/src/examples/list-detail-metadata.vitest.tsx +21 -21
- package/src/examples/list-dropdown-default.vitest.tsx +12 -12
- package/src/examples/list-item-accessories.tsx +106 -0
- package/src/examples/list-item-accessories.vitest.tsx +115 -0
- package/src/examples/list-no-actions.tsx +18 -0
- package/src/examples/list-no-actions.vitest.tsx +97 -0
- package/src/examples/list-spacing-mode.vitest.tsx +6 -6
- package/src/examples/list-with-detail.vitest.tsx +92 -92
- package/src/examples/list-with-dropdown.vitest.tsx +49 -6
- package/src/examples/list-with-sections.vitest.tsx +61 -56
- package/src/examples/simple-detail-markdown.vitest.tsx +21 -17
- package/src/examples/simple-detail-table.tsx +65 -0
- package/src/examples/simple-detail-table.vitest.tsx +200 -0
- package/src/examples/simple-graph.tsx +51 -0
- package/src/examples/simple-graph.vitest.tsx +124 -0
- package/src/examples/simple-grid.vitest.tsx +3 -3
- package/src/examples/simple-list-search.vitest.tsx +65 -0
- package/src/examples/simple-navigation.vitest.tsx +3 -3
- package/src/examples/simple-table-wrap.tsx +55 -0
- package/src/examples/simple-table-wrap.vitest.tsx +91 -0
- package/src/examples/store.vitest.tsx +1 -1
- package/src/examples/table-edge-cases.tsx +72 -0
- package/src/examples/table-edge-cases.vitest.tsx +307 -0
- package/src/examples/table-flex-grow.tsx +53 -0
- package/src/examples/table-flex-grow.vitest.tsx +124 -0
- package/src/extensions/dev.tsx +7 -1
- package/src/globals.ts +3 -0
- package/src/index.tsx +31 -0
- package/src/internal/date-picker-widget.tsx +4 -0
- package/src/internal/providers.tsx +1 -4
- package/src/markdown-utils.tsx +82 -1
- package/src/opentui.tsx +5 -0
- package/src/release.tsx +3 -0
- package/src/state.tsx +2 -1
- package/src/theme.tsx +14 -0
- package/src/themes/nerv.json +231 -0
- package/src/themes/termcast.json +75 -71
- package/src/themes.ts +8 -5
- package/src/utils.tsx +4 -0
|
@@ -49,13 +49,13 @@ test('list with sections navigation', async () => {
|
|
|
49
49
|
> Search items...
|
|
50
50
|
|
|
51
51
|
Fruits
|
|
52
|
-
›Apple Red and sweet
|
|
52
|
+
›Apple Red and sweet Fresh Popular
|
|
53
53
|
Banana Yellow and nutritious Ripe
|
|
54
54
|
Orange Citrus and juicy Fresh
|
|
55
|
-
Grape Sweet clusters
|
|
55
|
+
Grape Sweet clusters Seasonal
|
|
56
56
|
Mango Tropical delight Imported
|
|
57
57
|
Pineapple Sweet and tangy
|
|
58
|
-
Strawberry Red and sweet
|
|
58
|
+
Strawberry Red and sweet Popular
|
|
59
59
|
|
|
60
60
|
|
|
61
61
|
|
|
@@ -82,13 +82,13 @@ test('list with sections navigation', async () => {
|
|
|
82
82
|
> Search items...
|
|
83
83
|
|
|
84
84
|
Fruits
|
|
85
|
-
Apple Red and sweet
|
|
85
|
+
Apple Red and sweet Fresh Popular
|
|
86
86
|
›Banana Yellow and nutritious Ripe
|
|
87
87
|
Orange Citrus and juicy Fresh
|
|
88
|
-
Grape Sweet clusters
|
|
88
|
+
Grape Sweet clusters Seasonal
|
|
89
89
|
Mango Tropical delight Imported
|
|
90
90
|
Pineapple Sweet and tangy
|
|
91
|
-
Strawberry Red and sweet
|
|
91
|
+
Strawberry Red and sweet Popular
|
|
92
92
|
|
|
93
93
|
|
|
94
94
|
|
|
@@ -109,13 +109,13 @@ test('list with sections navigation', async () => {
|
|
|
109
109
|
> Search items...
|
|
110
110
|
|
|
111
111
|
Fruits
|
|
112
|
-
Apple Red and sweet
|
|
112
|
+
Apple Red and sweet Fresh Popular
|
|
113
113
|
Banana Yellow and nutritious Ripe
|
|
114
114
|
›Orange Citrus and juicy Fresh
|
|
115
|
-
Grape Sweet clusters
|
|
115
|
+
Grape Sweet clusters Seasonal
|
|
116
116
|
Mango Tropical delight Imported
|
|
117
117
|
Pineapple Sweet and tangy
|
|
118
|
-
Strawberry Red and sweet
|
|
118
|
+
Strawberry Red and sweet Popular
|
|
119
119
|
|
|
120
120
|
|
|
121
121
|
|
|
@@ -140,13 +140,13 @@ test('list with sections navigation', async () => {
|
|
|
140
140
|
> Search items...
|
|
141
141
|
|
|
142
142
|
Fruits
|
|
143
|
-
Apple Red and sweet
|
|
143
|
+
Apple Red and sweet Fresh Popular
|
|
144
144
|
Banana Yellow and nutritious Ripe
|
|
145
145
|
›Orange Citrus and juicy Fresh
|
|
146
|
-
Grape Sweet clusters
|
|
146
|
+
Grape Sweet clusters Seasonal
|
|
147
147
|
Mango Tropical delight Imported
|
|
148
148
|
Pineapple Sweet and tangy
|
|
149
|
-
Strawberry Red and sweet
|
|
149
|
+
Strawberry Red and sweet Popular
|
|
150
150
|
|
|
151
151
|
|
|
152
152
|
|
|
@@ -250,13 +250,13 @@ test('list with sections search functionality', async () => {
|
|
|
250
250
|
> Search items...
|
|
251
251
|
|
|
252
252
|
Fruits
|
|
253
|
-
›Apple Red and sweet
|
|
253
|
+
›Apple Red and sweet Fresh Popular
|
|
254
254
|
Banana Yellow and nutritious Ripe
|
|
255
255
|
Orange Citrus and juicy Fresh
|
|
256
|
-
Grape Sweet clusters
|
|
256
|
+
Grape Sweet clusters Seasonal
|
|
257
257
|
Mango Tropical delight Imported
|
|
258
258
|
Pineapple Sweet and tangy
|
|
259
|
-
Strawberry Red and sweet
|
|
259
|
+
Strawberry Red and sweet Popular
|
|
260
260
|
|
|
261
261
|
|
|
262
262
|
|
|
@@ -282,7 +282,7 @@ test('list with sections search functionality', async () => {
|
|
|
282
282
|
|
|
283
283
|
> bread
|
|
284
284
|
|
|
285
|
-
›Bread Freshly baked
|
|
285
|
+
›Bread Freshly baked Today New
|
|
286
286
|
|
|
287
287
|
|
|
288
288
|
|
|
@@ -321,7 +321,7 @@ test('list with sections search functionality', async () => {
|
|
|
321
321
|
|
|
322
322
|
|
|
323
323
|
|
|
324
|
-
esc go back
|
|
324
|
+
esc go back ^k actions
|
|
325
325
|
|
|
326
326
|
"
|
|
327
327
|
`)
|
|
@@ -347,13 +347,13 @@ test('list click functionality', async () => {
|
|
|
347
347
|
> Search items...
|
|
348
348
|
|
|
349
349
|
Fruits
|
|
350
|
-
Apple Red and sweet
|
|
350
|
+
Apple Red and sweet Fresh Popular
|
|
351
351
|
›Banana Yellow and nutritious Ripe
|
|
352
352
|
Orange Citrus and juicy Fresh
|
|
353
|
-
Grape Sweet clusters
|
|
353
|
+
Grape Sweet clusters Seasonal
|
|
354
354
|
Mango Tropical delight Imported
|
|
355
355
|
Pineapple Sweet and tangy
|
|
356
|
-
Strawberry Red and sweet
|
|
356
|
+
Strawberry Red and sweet Popular
|
|
357
357
|
|
|
358
358
|
|
|
359
359
|
|
|
@@ -375,13 +375,13 @@ test('list click functionality', async () => {
|
|
|
375
375
|
> Search items...
|
|
376
376
|
|
|
377
377
|
Fruits
|
|
378
|
-
›Apple Red and sweet
|
|
378
|
+
›Apple Red and sweet Fresh Popular
|
|
379
379
|
Banana Yellow and nutritious Ripe
|
|
380
380
|
Orange Citrus and juicy Fresh
|
|
381
|
-
Grape Sweet clusters
|
|
381
|
+
Grape Sweet clusters Seasonal
|
|
382
382
|
Mango Tropical delight Imported
|
|
383
383
|
Pineapple Sweet and tangy
|
|
384
|
-
Strawberry Red and sweet
|
|
384
|
+
Strawberry Red and sweet Popular
|
|
385
385
|
|
|
386
386
|
|
|
387
387
|
|
|
@@ -403,13 +403,13 @@ test('list click functionality', async () => {
|
|
|
403
403
|
> Search items...
|
|
404
404
|
|
|
405
405
|
Fruits
|
|
406
|
-
Apple Red and sweet
|
|
406
|
+
Apple Red and sweet Fresh Popular
|
|
407
407
|
Banana Yellow and nutritious Ripe
|
|
408
408
|
Orange Citrus and juicy Fresh
|
|
409
|
-
›Grape Sweet clusters
|
|
409
|
+
›Grape Sweet clusters Seasonal
|
|
410
410
|
Mango Tropical delight Imported
|
|
411
411
|
Pineapple Sweet and tangy
|
|
412
|
-
Strawberry Red and sweet
|
|
412
|
+
Strawberry Red and sweet Popular
|
|
413
413
|
|
|
414
414
|
|
|
415
415
|
|
|
@@ -430,7 +430,12 @@ test('list actions panel with ctrl+k', async () => {
|
|
|
430
430
|
// Press ctrl+k to open actions panel
|
|
431
431
|
await session.press(['ctrl', 'k'])
|
|
432
432
|
|
|
433
|
-
const afterCtrlKSnapshot = await session.text(
|
|
433
|
+
const afterCtrlKSnapshot = await session.text({
|
|
434
|
+
waitFor: (text) => {
|
|
435
|
+
return /Actions/.test(text)
|
|
436
|
+
},
|
|
437
|
+
timeout: 5000,
|
|
438
|
+
})
|
|
434
439
|
// Fast feedback loop: fail if list content leaks under the actions dialog.
|
|
435
440
|
expect(afterCtrlKSnapshot).toContain('Actions')
|
|
436
441
|
expect(afterCtrlKSnapshot).not.toContain('Search items...')
|
|
@@ -451,7 +456,7 @@ test('list actions panel with ctrl+k', async () => {
|
|
|
451
456
|
│ │
|
|
452
457
|
│ Settings │
|
|
453
458
|
│ Change Theme... │
|
|
454
|
-
│
|
|
459
|
+
│ Toggle Console Logs │
|
|
455
460
|
│ │
|
|
456
461
|
│ │
|
|
457
462
|
│ │
|
|
@@ -479,7 +484,7 @@ test('list actions panel with ctrl+k', async () => {
|
|
|
479
484
|
│ │
|
|
480
485
|
│ Settings │
|
|
481
486
|
│ Change Theme... │
|
|
482
|
-
│
|
|
487
|
+
│ Toggle Console Logs │
|
|
483
488
|
│ │
|
|
484
489
|
│ │
|
|
485
490
|
│ │
|
|
@@ -501,13 +506,13 @@ test('list actions panel with ctrl+k', async () => {
|
|
|
501
506
|
> Search items...
|
|
502
507
|
|
|
503
508
|
Fruits
|
|
504
|
-
›Apple Red and sweet
|
|
509
|
+
›Apple Red and sweet Fresh Popular
|
|
505
510
|
Banana Yellow and nutritious Ripe
|
|
506
511
|
Orange Citrus and juicy Fresh
|
|
507
|
-
Grape Sweet clusters
|
|
512
|
+
Grape Sweet clusters Seasonal
|
|
508
513
|
Mango Tropical delight Imported
|
|
509
514
|
Pineapple Sweet and tangy
|
|
510
|
-
Strawberry Red and sweet
|
|
515
|
+
Strawberry Red and sweet Popular
|
|
511
516
|
|
|
512
517
|
|
|
513
518
|
|
|
@@ -554,7 +559,7 @@ test('filtering selects first visible item and navigation works', async () => {
|
|
|
554
559
|
> ora
|
|
555
560
|
|
|
556
561
|
›Orange Citrus and juicy Fresh
|
|
557
|
-
Carrot Orange and crunchy
|
|
562
|
+
Carrot Orange and crunchy Healthy
|
|
558
563
|
|
|
559
564
|
|
|
560
565
|
|
|
@@ -582,7 +587,7 @@ test('filtering selects first visible item and navigation works', async () => {
|
|
|
582
587
|
> ora
|
|
583
588
|
|
|
584
589
|
Orange Citrus and juicy Fresh
|
|
585
|
-
›Carrot Orange and crunchy
|
|
590
|
+
›Carrot Orange and crunchy Healthy
|
|
586
591
|
|
|
587
592
|
|
|
588
593
|
|
|
@@ -610,7 +615,7 @@ test('filtering selects first visible item and navigation works', async () => {
|
|
|
610
615
|
> ora
|
|
611
616
|
|
|
612
617
|
Orange Citrus and juicy Fresh
|
|
613
|
-
›Carrot Orange and crunchy
|
|
618
|
+
›Carrot Orange and crunchy Healthy
|
|
614
619
|
|
|
615
620
|
|
|
616
621
|
|
|
@@ -638,7 +643,7 @@ test('filtering selects first visible item and navigation works', async () => {
|
|
|
638
643
|
> ora
|
|
639
644
|
|
|
640
645
|
Orange Citrus and juicy Fresh
|
|
641
|
-
›Carrot Orange and crunchy
|
|
646
|
+
›Carrot Orange and crunchy Healthy
|
|
642
647
|
|
|
643
648
|
|
|
644
649
|
|
|
@@ -674,13 +679,13 @@ test('list scrollbox scrolling with sections', async () => {
|
|
|
674
679
|
> Search items...
|
|
675
680
|
|
|
676
681
|
Fruits
|
|
677
|
-
›Apple Red and sweet
|
|
682
|
+
›Apple Red and sweet Fresh Popular
|
|
678
683
|
Banana Yellow and nutritious Ripe
|
|
679
684
|
Orange Citrus and juicy Fresh
|
|
680
|
-
Grape Sweet clusters
|
|
685
|
+
Grape Sweet clusters Seasonal
|
|
681
686
|
Mango Tropical delight Imported
|
|
682
687
|
Pineapple Sweet and tangy
|
|
683
|
-
Strawberry Red and sweet
|
|
688
|
+
Strawberry Red and sweet Popular
|
|
684
689
|
|
|
685
690
|
|
|
686
691
|
|
|
@@ -707,13 +712,13 @@ test('list scrollbox scrolling with sections', async () => {
|
|
|
707
712
|
> Search items...
|
|
708
713
|
|
|
709
714
|
Fruits
|
|
710
|
-
Apple Red and sweet
|
|
715
|
+
Apple Red and sweet Fresh Popular
|
|
711
716
|
Banana Yellow and nutritious Ripe
|
|
712
717
|
Orange Citrus and juicy Fresh
|
|
713
|
-
Grape Sweet clusters
|
|
718
|
+
Grape Sweet clusters Seasonal
|
|
714
719
|
Mango Tropical delight Imported
|
|
715
720
|
Pineapple Sweet and tangy
|
|
716
|
-
›Strawberry Red and sweet
|
|
721
|
+
›Strawberry Red and sweet Popular
|
|
717
722
|
|
|
718
723
|
|
|
719
724
|
|
|
@@ -736,15 +741,15 @@ test('list scrollbox scrolling with sections', async () => {
|
|
|
736
741
|
|
|
737
742
|
> Search items...
|
|
738
743
|
|
|
739
|
-
Carrot Orange and crunchy
|
|
744
|
+
Carrot Orange and crunchy Healthy
|
|
740
745
|
Lettuce Green and fresh
|
|
741
|
-
›Broccoli Green florets
|
|
746
|
+
›Broccoli Green florets Healthy
|
|
742
747
|
Spinach Leafy greens Organic
|
|
743
748
|
Tomato Red and ripe
|
|
744
749
|
Cucumber Cool and crisp
|
|
745
|
-
Bell Pepper Colorful and crunchy
|
|
750
|
+
Bell Pepper Colorful and crunchy Fresh
|
|
746
751
|
|
|
747
|
-
Bread Freshly baked
|
|
752
|
+
Bread Freshly baked Today New
|
|
748
753
|
|
|
749
754
|
|
|
750
755
|
↑↓ navigate ^k actions
|
|
@@ -768,15 +773,15 @@ test('list scrollbox scrolling with sections', async () => {
|
|
|
768
773
|
|
|
769
774
|
> Search items...
|
|
770
775
|
|
|
771
|
-
Carrot Orange and crunchy
|
|
776
|
+
Carrot Orange and crunchy Healthy
|
|
772
777
|
Lettuce Green and fresh
|
|
773
|
-
Broccoli Green florets
|
|
778
|
+
Broccoli Green florets Healthy
|
|
774
779
|
Spinach Leafy greens Organic
|
|
775
780
|
Tomato Red and ripe
|
|
776
781
|
Cucumber Cool and crisp
|
|
777
|
-
Bell Pepper Colorful and crunchy
|
|
782
|
+
Bell Pepper Colorful and crunchy Fresh
|
|
778
783
|
|
|
779
|
-
›Bread Freshly baked
|
|
784
|
+
›Bread Freshly baked Today New
|
|
780
785
|
|
|
781
786
|
|
|
782
787
|
↵ view details ↑↓ navigate ^k actions
|
|
@@ -799,13 +804,13 @@ test('list scrollbox scrolling with sections', async () => {
|
|
|
799
804
|
> Search items...
|
|
800
805
|
|
|
801
806
|
Fruits
|
|
802
|
-
›Apple Red and sweet
|
|
807
|
+
›Apple Red and sweet Fresh Popular
|
|
803
808
|
Banana Yellow and nutritious Ripe
|
|
804
809
|
Orange Citrus and juicy Fresh
|
|
805
|
-
Grape Sweet clusters
|
|
810
|
+
Grape Sweet clusters Seasonal
|
|
806
811
|
Mango Tropical delight Imported
|
|
807
812
|
Pineapple Sweet and tangy
|
|
808
|
-
Strawberry Red and sweet
|
|
813
|
+
Strawberry Red and sweet Popular
|
|
809
814
|
|
|
810
815
|
|
|
811
816
|
|
|
@@ -873,13 +878,13 @@ test('list does not wrap at top boundary', async () => {
|
|
|
873
878
|
> Search items...
|
|
874
879
|
|
|
875
880
|
Fruits
|
|
876
|
-
›Apple Red and sweet
|
|
881
|
+
›Apple Red and sweet Fresh Popular
|
|
877
882
|
Banana Yellow and nutritious Ripe
|
|
878
883
|
Orange Citrus and juicy Fresh
|
|
879
|
-
Grape Sweet clusters
|
|
884
|
+
Grape Sweet clusters Seasonal
|
|
880
885
|
Mango Tropical delight Imported
|
|
881
886
|
Pineapple Sweet and tangy
|
|
882
|
-
Strawberry Red and sweet
|
|
887
|
+
Strawberry Red and sweet Popular
|
|
883
888
|
|
|
884
889
|
|
|
885
890
|
|
|
@@ -4,11 +4,15 @@ import { launchTerminal, Session } from 'tuistory/src'
|
|
|
4
4
|
let session: Session
|
|
5
5
|
|
|
6
6
|
beforeEach(async () => {
|
|
7
|
+
const dbSuffix = `simple-detail-markdown-${process.pid}-${Date.now()}`
|
|
7
8
|
session = await launchTerminal({
|
|
8
9
|
command: 'bun',
|
|
9
10
|
args: ['src/examples/simple-detail-markdown.tsx'],
|
|
10
11
|
cols: 80,
|
|
11
12
|
rows: 70,
|
|
13
|
+
env: {
|
|
14
|
+
TERMCAST_DB_SUFFIX: dbSuffix,
|
|
15
|
+
},
|
|
12
16
|
})
|
|
13
17
|
})
|
|
14
18
|
|
|
@@ -30,7 +34,7 @@ test('detail renders markdown with headings, lists, links, tables, code and diag
|
|
|
30
34
|
|
|
31
35
|
█
|
|
32
36
|
█
|
|
33
|
-
Architecture Overview
|
|
37
|
+
Architecture Overview ▀
|
|
34
38
|
|
|
35
39
|
This document describes the system architecture.
|
|
36
40
|
|
|
@@ -55,17 +59,11 @@ test('detail renders markdown with headings, lists, links, tables, code and diag
|
|
|
55
59
|
|
|
56
60
|
Configuration Table
|
|
57
61
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
│Port │5432 │Database port number │
|
|
64
|
-
│───────────│───────────│───────────────────────│
|
|
65
|
-
│SSL │false │Enable TLS encryption │
|
|
66
|
-
│───────────│───────────│───────────────────────│
|
|
67
|
-
│Pool Size │10 │Max connections │
|
|
68
|
-
└───────────┴───────────┴───────────────────────┘
|
|
62
|
+
Setting Default Description
|
|
63
|
+
Host localhost Database host address
|
|
64
|
+
Port 5432 Database port number
|
|
65
|
+
SSL false Enable TLS encryption
|
|
66
|
+
Pool Size 10 Max connections
|
|
69
67
|
|
|
70
68
|
Flow Diagram
|
|
71
69
|
|
|
@@ -91,9 +89,15 @@ test('detail renders markdown with headings, lists, links, tables, code and diag
|
|
|
91
89
|
|
|
92
90
|
Code Example
|
|
93
91
|
|
|
92
|
+
interface Config {
|
|
93
|
+
host: string
|
|
94
|
+
port: number
|
|
95
|
+
ssl: boolean
|
|
96
|
+
}
|
|
97
|
+
|
|
94
98
|
|
|
95
99
|
|
|
96
|
-
esc go back
|
|
100
|
+
esc go back ^k actions powered by termcast.app
|
|
97
101
|
|
|
98
102
|
"
|
|
99
103
|
`)
|
|
@@ -127,15 +131,15 @@ test('links have distinct cyan color from bold/heading text', async () => {
|
|
|
127
131
|
timeout: 10000,
|
|
128
132
|
})
|
|
129
133
|
|
|
130
|
-
// Links should be
|
|
134
|
+
// Links should be green (#2bbd50)
|
|
131
135
|
const linkText = await session.text({
|
|
132
|
-
only: { foreground: '#
|
|
136
|
+
only: { foreground: '#2bbd50' },
|
|
133
137
|
timeout: 5000,
|
|
134
138
|
})
|
|
135
139
|
|
|
136
|
-
// Bold/heading text should be primary
|
|
140
|
+
// Bold/heading text should be primary orange from nerv theme (#e89500)
|
|
137
141
|
const boldText = await session.text({
|
|
138
|
-
only: { foreground: '#
|
|
142
|
+
only: { foreground: '#e89500' },
|
|
139
143
|
timeout: 5000,
|
|
140
144
|
})
|
|
141
145
|
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// Example: Detail view with markdown tables rendered by our custom TableRenderable.
|
|
2
|
+
// Shows borderless tables with header background and alternating row stripes
|
|
3
|
+
// instead of ASCII box-drawing borders.
|
|
4
|
+
// Also demonstrates two tables side by side using the Row component.
|
|
5
|
+
|
|
6
|
+
import { Detail } from 'termcast'
|
|
7
|
+
import { TextAttributes } from '@opentui/core'
|
|
8
|
+
import { renderWithProviders } from '../utils'
|
|
9
|
+
import { Table } from 'termcast/src/components/table'
|
|
10
|
+
|
|
11
|
+
import { Row } from 'termcast/src/components/row'
|
|
12
|
+
|
|
13
|
+
const markdown = `# Server Status
|
|
14
|
+
|
|
15
|
+
## Active Services
|
|
16
|
+
|
|
17
|
+
| Service | Status | Uptime | Memory |
|
|
18
|
+
|-------------|---------|----------|--------|
|
|
19
|
+
| API Gateway | Running | 14d 3h | 256MB |
|
|
20
|
+
| Auth Server | Running | 14d 3h | 128MB |
|
|
21
|
+
| Worker Pool | Running | 7d 12h | 512MB |
|
|
22
|
+
| Cache Layer | Stopped | - | 0MB |
|
|
23
|
+
|
|
24
|
+
## Configuration
|
|
25
|
+
|
|
26
|
+
| Key | Value | Description |
|
|
27
|
+
|------------------|----------------|--------------------------------|
|
|
28
|
+
| max_connections | 1000 | Maximum concurrent connections |
|
|
29
|
+
| timeout_ms | 5000 | Request timeout in ms |
|
|
30
|
+
| retry_count | 3 | Number of retry attempts |
|
|
31
|
+
| log_level | info | Logging verbosity |
|
|
32
|
+
| region | us-east-1 | Deployment region |
|
|
33
|
+
|
|
34
|
+
The system is operating normally.
|
|
35
|
+
`
|
|
36
|
+
|
|
37
|
+
function SimpleDetailTable() {
|
|
38
|
+
return (
|
|
39
|
+
<Detail
|
|
40
|
+
markdown={markdown}
|
|
41
|
+
metadata={
|
|
42
|
+
<Row paddingTop={1}>
|
|
43
|
+
<Table
|
|
44
|
+
headers={['Region', 'Latency']}
|
|
45
|
+
rows={[
|
|
46
|
+
['us-east-1', '**12ms**'],
|
|
47
|
+
['eu-west-1', '*45ms*'],
|
|
48
|
+
['ap-south-1', '`89ms`'],
|
|
49
|
+
]}
|
|
50
|
+
/>
|
|
51
|
+
<Table
|
|
52
|
+
headers={['Endpoint', 'RPS']}
|
|
53
|
+
rows={[
|
|
54
|
+
['[/api/auth](https://example.com)', '**1200**'],
|
|
55
|
+
['/api/data', '~~3400~~'],
|
|
56
|
+
['/api/health', '500'],
|
|
57
|
+
]}
|
|
58
|
+
/>
|
|
59
|
+
</Row>
|
|
60
|
+
}
|
|
61
|
+
/>
|
|
62
|
+
)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
renderWithProviders(<SimpleDetailTable />)
|