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.
- package/dist/build.d.ts.map +1 -1
- package/dist/build.js +30 -12
- package/dist/build.js.map +1 -1
- package/dist/cli.js +0 -40
- package/dist/cli.js.map +1 -1
- package/dist/compile.d.ts.map +1 -1
- package/dist/compile.js +7 -1
- package/dist/compile.js.map +1 -1
- package/dist/components/bar-graph.d.ts +23 -8
- package/dist/components/bar-graph.d.ts.map +1 -1
- package/dist/components/bar-graph.js +84 -40
- package/dist/components/bar-graph.js.map +1 -1
- package/dist/components/dotted-line-graph.d.ts +86 -0
- package/dist/components/dotted-line-graph.d.ts.map +1 -0
- package/dist/components/dotted-line-graph.js +260 -0
- package/dist/components/dotted-line-graph.js.map +1 -0
- package/dist/components/extension-preferences.d.ts.map +1 -1
- package/dist/components/extension-preferences.js +1 -10
- package/dist/components/extension-preferences.js.map +1 -1
- package/dist/components/graph.d.ts.map +1 -1
- package/dist/components/graph.js +7 -1
- package/dist/components/graph.js.map +1 -1
- package/dist/components/histogram.d.ts +42 -0
- package/dist/components/histogram.d.ts.map +1 -0
- package/dist/components/histogram.js +115 -0
- package/dist/components/histogram.js.map +1 -0
- package/dist/components/horizontal-bar-graph.d.ts +47 -0
- package/dist/components/horizontal-bar-graph.d.ts.map +1 -0
- package/dist/components/horizontal-bar-graph.js +137 -0
- package/dist/components/horizontal-bar-graph.js.map +1 -0
- package/dist/components/list.d.ts +9 -0
- package/dist/components/list.d.ts.map +1 -1
- package/dist/components/list.js +84 -21
- package/dist/components/list.js.map +1 -1
- package/dist/examples/bar-graph-weekly.js +2 -2
- package/dist/examples/bar-graph-weekly.js.map +1 -1
- package/dist/examples/charts-showcase-barchart.d.ts +2 -0
- package/dist/examples/charts-showcase-barchart.d.ts.map +1 -0
- package/dist/examples/charts-showcase-barchart.js +10 -0
- package/dist/examples/charts-showcase-barchart.js.map +1 -0
- package/dist/examples/charts-showcase-bargraph.d.ts +2 -0
- package/dist/examples/charts-showcase-bargraph.d.ts.map +1 -0
- package/dist/examples/charts-showcase-bargraph.js +60 -0
- package/dist/examples/charts-showcase-bargraph.js.map +1 -0
- package/dist/examples/charts-showcase-candle.d.ts +2 -0
- package/dist/examples/charts-showcase-candle.d.ts.map +1 -0
- package/dist/examples/charts-showcase-candle.js +30 -0
- package/dist/examples/charts-showcase-candle.js.map +1 -0
- package/dist/examples/charts-showcase-graph.d.ts +2 -0
- package/dist/examples/charts-showcase-graph.d.ts.map +1 -0
- package/dist/examples/charts-showcase-graph.js +33 -0
- package/dist/examples/charts-showcase-graph.js.map +1 -0
- package/dist/examples/charts-showcase-heatmap.d.ts +2 -0
- package/dist/examples/charts-showcase-heatmap.d.ts.map +1 -0
- package/dist/examples/charts-showcase-heatmap.js +36 -0
- package/dist/examples/charts-showcase-heatmap.js.map +1 -0
- package/dist/examples/charts-showcase-mixed.d.ts +2 -0
- package/dist/examples/charts-showcase-mixed.d.ts.map +1 -0
- package/dist/examples/charts-showcase-mixed.js +30 -0
- package/dist/examples/charts-showcase-mixed.js.map +1 -0
- package/dist/examples/charts-showcase-progress.d.ts +2 -0
- package/dist/examples/charts-showcase-progress.d.ts.map +1 -0
- package/dist/examples/charts-showcase-progress.js +10 -0
- package/dist/examples/charts-showcase-progress.js.map +1 -0
- package/dist/examples/graph-multi-series.js +1 -1
- package/dist/examples/graph-multi-series.js.map +1 -1
- package/dist/examples/horizontal-bar-graph-weekly.d.ts +2 -0
- package/dist/examples/horizontal-bar-graph-weekly.d.ts.map +1 -0
- package/dist/examples/horizontal-bar-graph-weekly.js +67 -0
- package/dist/examples/horizontal-bar-graph-weekly.js.map +1 -0
- package/dist/examples/list-detail-height-ratchet.d.ts +2 -0
- package/dist/examples/list-detail-height-ratchet.d.ts.map +1 -0
- package/dist/examples/list-detail-height-ratchet.js +26 -0
- package/dist/examples/list-detail-height-ratchet.js.map +1 -0
- package/dist/examples/simple-dotted-line-graph.d.ts +2 -0
- package/dist/examples/simple-dotted-line-graph.d.ts.map +1 -0
- package/dist/examples/simple-dotted-line-graph.js +39 -0
- package/dist/examples/simple-dotted-line-graph.js.map +1 -0
- package/dist/examples/simple-histogram.d.ts +2 -0
- package/dist/examples/simple-histogram.d.ts.map +1 -0
- package/dist/examples/simple-histogram.js +47 -0
- package/dist/examples/simple-histogram.js.map +1 -0
- package/dist/extensions/dev.d.ts.map +1 -1
- package/dist/extensions/dev.js +1 -0
- package/dist/extensions/dev.js.map +1 -1
- package/dist/globals.js +8 -0
- package/dist/globals.js.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/package-json.d.ts +2 -0
- package/dist/package-json.d.ts.map +1 -1
- package/dist/package-json.js +20 -17
- package/dist/package-json.js.map +1 -1
- package/dist/platform/node/sqlite.d.ts +6 -5
- package/dist/platform/node/sqlite.d.ts.map +1 -1
- package/dist/platform/node/sqlite.js +30 -14
- package/dist/platform/node/sqlite.js.map +1 -1
- package/dist/profiler.d.ts +2 -0
- package/dist/profiler.d.ts.map +1 -0
- package/dist/profiler.js +390 -0
- package/dist/profiler.js.map +1 -0
- package/dist/theme.d.ts.map +1 -1
- package/dist/theme.js +11 -9
- package/dist/theme.js.map +1 -1
- package/dist/utils/run-command.d.ts.map +1 -1
- package/dist/utils/run-command.js +8 -19
- package/dist/utils/run-command.js.map +1 -1
- package/dist/utils.d.ts +1 -19
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +1 -100
- package/dist/utils.js.map +1 -1
- package/package.json +18 -21
- package/src/build.tsx +38 -15
- package/src/cli.tsx +3 -40
- package/src/compile.tsx +9 -1
- package/src/compile.vitest.tsx +8 -8
- package/src/components/bar-graph.tsx +217 -111
- package/src/components/dotted-line-graph.tsx +407 -0
- package/src/components/extension-preferences.tsx +2 -12
- package/src/components/graph.tsx +5 -1
- package/src/components/histogram.tsx +228 -0
- package/src/components/horizontal-bar-graph.tsx +279 -0
- package/src/components/list.tsx +112 -26
- package/src/examples/action-shortcut.vitest.tsx +20 -20
- package/src/examples/actions-context.vitest.tsx +2 -2
- package/src/examples/bar-graph-weekly.tsx +2 -2
- package/src/examples/bar-graph-weekly.vitest.tsx +103 -102
- package/src/examples/charts-showcase-bargraph.tsx +103 -0
- package/src/examples/detail-metadata-showcase.vitest.tsx +12 -12
- package/src/examples/form-basic.vitest.tsx +11 -11
- package/src/examples/form-dropdown.vitest.tsx +11 -11
- package/src/examples/form-scroll.vitest.tsx +1 -1
- package/src/examples/form-tagpicker.vitest.tsx +11 -11
- package/src/examples/github.vitest.tsx +22 -31
- package/src/examples/graph-bar-chart.vitest.tsx +36 -36
- package/src/examples/graph-multi-series.tsx +1 -1
- package/src/examples/graph-polymarket.vitest.tsx +24 -24
- package/src/examples/graph-row.vitest.tsx +14 -14
- package/src/examples/graph-styles.vitest.tsx +77 -77
- package/src/examples/horizontal-bar-graph-weekly.tsx +138 -0
- package/src/examples/horizontal-bar-graph-weekly.vitest.tsx +164 -0
- package/src/examples/list-detail-height-ratchet.tsx +48 -0
- package/src/examples/list-detail-height-ratchet.vitest.tsx +161 -0
- package/src/examples/list-detail-metadata.vitest.tsx +51 -51
- package/src/examples/list-dropdown-default.vitest.tsx +27 -27
- package/src/examples/list-fetch-data.vitest.tsx +3 -3
- package/src/examples/list-loading-empty-view.vitest.tsx +1 -1
- package/src/examples/list-no-actions.vitest.tsx +3 -3
- package/src/examples/list-scrollbox.vitest.tsx +6 -6
- package/src/examples/list-spacing-mode.vitest.tsx +1 -1
- package/src/examples/list-with-detail.vitest.tsx +55 -55
- package/src/examples/list-with-dropdown.vitest.tsx +6 -6
- package/src/examples/list-with-sections.vitest.tsx +20 -20
- package/src/examples/list-with-toast.vitest.tsx +4 -4
- package/src/examples/simple-candle-chart.vitest.tsx +61 -59
- package/src/examples/simple-dotted-line-graph.tsx +53 -0
- package/src/examples/simple-dotted-line-graph.vitest.tsx +62 -0
- package/src/examples/simple-grid.vitest.tsx +4 -4
- package/src/examples/simple-heatmap.vitest.tsx +9 -9
- package/src/examples/simple-histogram.tsx +90 -0
- package/src/examples/simple-navigation.vitest.tsx +25 -25
- package/src/examples/simple-progress-bar.vitest.tsx +7 -7
- package/src/examples/swift-extension.vitest.tsx +5 -5
- package/src/examples/toast-action.vitest.tsx +4 -4
- package/src/extensions/dev.tsx +2 -1
- package/src/extensions/dev.vitest.tsx +17 -17
- package/src/globals.ts +9 -0
- package/src/index.tsx +21 -0
- package/src/package-json.tsx +24 -23
- package/src/platform/node/sqlite.ts +29 -13
- package/src/profiler.tsx +487 -0
- package/src/theme.tsx +11 -10
- package/src/utils/run-command.tsx +10 -19
- package/src/utils.tsx +0 -163
- package/src/examples/store.tsx +0 -4
- package/src/examples/store.vitest.tsx +0 -78
- package/src/extensions/home.tsx +0 -227
- package/src/extensions/store.tsx +0 -375
|
@@ -46,11 +46,11 @@ test('navigation between main and detail views', async () => {
|
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
|
|
49
|
-
↵ open details ↑↓ navigate ^k actions :vim
|
|
50
49
|
|
|
51
50
|
|
|
52
51
|
|
|
53
52
|
|
|
53
|
+
↵ open details ↑↓ navigate ^k actions :vim
|
|
54
54
|
|
|
55
55
|
|
|
56
56
|
|
|
@@ -80,11 +80,11 @@ test('navigation between main and detail views', async () => {
|
|
|
80
80
|
|
|
81
81
|
|
|
82
82
|
|
|
83
|
-
↵ open details ↑↓ navigate ^k actions :vim
|
|
84
83
|
|
|
85
84
|
|
|
86
85
|
|
|
87
86
|
|
|
87
|
+
↵ open details ↑↓ navigate ^k actions :vim
|
|
88
88
|
|
|
89
89
|
|
|
90
90
|
|
|
@@ -111,18 +111,18 @@ test('navigation between main and detail views', async () => {
|
|
|
111
111
|
> Detail view - Press ESC to go back
|
|
112
112
|
|
|
113
113
|
Details
|
|
114
|
-
›This is the
|
|
114
|
+
›This is the deta... for Second Ite Press Enter t...navigate back
|
|
115
115
|
|
|
116
116
|
|
|
117
117
|
|
|
118
118
|
|
|
119
119
|
|
|
120
120
|
|
|
121
|
-
↵ go back ↑↓ navigate ^k actions :vim
|
|
122
121
|
|
|
123
122
|
|
|
124
123
|
|
|
125
124
|
|
|
125
|
+
↵ go back ↑↓ navigate ^k actions :vim
|
|
126
126
|
|
|
127
127
|
|
|
128
128
|
|
|
@@ -160,11 +160,11 @@ test('navigation between main and detail views', async () => {
|
|
|
160
160
|
|
|
161
161
|
|
|
162
162
|
|
|
163
|
-
↵ open details ↑↓ navigate ^k actions :vim
|
|
164
163
|
|
|
165
164
|
|
|
166
165
|
|
|
167
166
|
|
|
167
|
+
↵ open details ↑↓ navigate ^k actions :vim
|
|
168
168
|
|
|
169
169
|
|
|
170
170
|
|
|
@@ -194,11 +194,11 @@ test('navigation between main and detail views', async () => {
|
|
|
194
194
|
|
|
195
195
|
|
|
196
196
|
|
|
197
|
-
↵ open details ↑↓ navigate ^k actions :vim
|
|
198
197
|
|
|
199
198
|
|
|
200
199
|
|
|
201
200
|
|
|
201
|
+
↵ open details ↑↓ navigate ^k actions :vim
|
|
202
202
|
|
|
203
203
|
|
|
204
204
|
|
|
@@ -220,18 +220,18 @@ test('navigation between main and detail views', async () => {
|
|
|
220
220
|
> Detail view - Press ESC to go back
|
|
221
221
|
|
|
222
222
|
Details
|
|
223
|
-
›This is the
|
|
223
|
+
›This is the det...w for Third Ite Press Enter t... navigate back
|
|
224
224
|
|
|
225
225
|
|
|
226
226
|
|
|
227
227
|
|
|
228
228
|
|
|
229
229
|
|
|
230
|
-
↵ go back ↑↓ navigate ^k actions :vim
|
|
231
230
|
|
|
232
231
|
|
|
233
232
|
|
|
234
233
|
|
|
234
|
+
↵ go back ↑↓ navigate ^k actions :vim
|
|
235
235
|
|
|
236
236
|
|
|
237
237
|
|
|
@@ -266,11 +266,11 @@ test('navigation between main and detail views', async () => {
|
|
|
266
266
|
|
|
267
267
|
|
|
268
268
|
|
|
269
|
-
↵ open details ↑↓ navigate ^k actions :vim
|
|
270
269
|
|
|
271
270
|
|
|
272
271
|
|
|
273
272
|
|
|
273
|
+
↵ open details ↑↓ navigate ^k actions :vim
|
|
274
274
|
|
|
275
275
|
|
|
276
276
|
|
|
@@ -295,6 +295,8 @@ test('navigation with actions panel', async () => {
|
|
|
295
295
|
expect(actionsOpenSnapshot).toMatchInlineSnapshot(`
|
|
296
296
|
"
|
|
297
297
|
|
|
298
|
+
|
|
299
|
+
Navigation Example ─────────────────────────────────────────────
|
|
298
300
|
╭────────────────────────────────────────────────────────────────╮
|
|
299
301
|
│ │
|
|
300
302
|
│ Actions esc │
|
|
@@ -316,8 +318,6 @@ test('navigation with actions panel', async () => {
|
|
|
316
318
|
│ │
|
|
317
319
|
╰────────────────────────────────────────────────────────────────╯
|
|
318
320
|
|
|
319
|
-
|
|
320
|
-
|
|
321
321
|
"
|
|
322
322
|
`)
|
|
323
323
|
|
|
@@ -328,6 +328,8 @@ test('navigation with actions panel', async () => {
|
|
|
328
328
|
expect(secondActionSnapshot).toMatchInlineSnapshot(`
|
|
329
329
|
"
|
|
330
330
|
|
|
331
|
+
|
|
332
|
+
Navigation Example ─────────────────────────────────────────────
|
|
331
333
|
╭────────────────────────────────────────────────────────────────╮
|
|
332
334
|
│ │
|
|
333
335
|
│ Actions esc │
|
|
@@ -349,8 +351,6 @@ test('navigation with actions panel', async () => {
|
|
|
349
351
|
│ │
|
|
350
352
|
╰────────────────────────────────────────────────────────────────╯
|
|
351
353
|
|
|
352
|
-
|
|
353
|
-
|
|
354
354
|
"
|
|
355
355
|
`)
|
|
356
356
|
|
|
@@ -374,11 +374,11 @@ test('navigation with actions panel', async () => {
|
|
|
374
374
|
|
|
375
375
|
|
|
376
376
|
|
|
377
|
-
✓ Copied to Clipboard First Item
|
|
378
377
|
|
|
379
378
|
|
|
380
379
|
|
|
381
380
|
|
|
381
|
+
✓ Copied to Clipboard First Item
|
|
382
382
|
|
|
383
383
|
|
|
384
384
|
|
|
@@ -412,18 +412,18 @@ test('navigation with actions panel', async () => {
|
|
|
412
412
|
> Detail view - Press ESC to go back
|
|
413
413
|
|
|
414
414
|
Details
|
|
415
|
-
›This is the
|
|
415
|
+
›This is the deta... for Second Ite Press Enter t...navigate back
|
|
416
416
|
|
|
417
417
|
|
|
418
418
|
|
|
419
419
|
|
|
420
420
|
|
|
421
421
|
|
|
422
|
-
↵ go back ↑↓ navigate ^k actions :vim
|
|
423
422
|
|
|
424
423
|
|
|
425
424
|
|
|
426
425
|
|
|
426
|
+
↵ go back ↑↓ navigate ^k actions :vim
|
|
427
427
|
|
|
428
428
|
|
|
429
429
|
|
|
@@ -439,6 +439,8 @@ test('navigation with actions panel', async () => {
|
|
|
439
439
|
expect(detailActionsSnapshot).toMatchInlineSnapshot(`
|
|
440
440
|
"
|
|
441
441
|
|
|
442
|
+
|
|
443
|
+
Detail: Second Item ────────────────────────────────────────────
|
|
442
444
|
╭────────────────────────────────────────────────────────────────╮
|
|
443
445
|
│ │
|
|
444
446
|
│ Actions esc │
|
|
@@ -460,8 +462,6 @@ test('navigation with actions panel', async () => {
|
|
|
460
462
|
│ │
|
|
461
463
|
╰────────────────────────────────────────────────────────────────╯
|
|
462
464
|
|
|
463
|
-
|
|
464
|
-
|
|
465
465
|
"
|
|
466
466
|
`)
|
|
467
467
|
|
|
@@ -489,11 +489,11 @@ test('navigation with actions panel', async () => {
|
|
|
489
489
|
|
|
490
490
|
|
|
491
491
|
|
|
492
|
-
↵ open details ↑↓ navigate ^k actions :vim
|
|
493
492
|
|
|
494
493
|
|
|
495
494
|
|
|
496
495
|
|
|
496
|
+
↵ open details ↑↓ navigate ^k actions :vim
|
|
497
497
|
|
|
498
498
|
|
|
499
499
|
|
|
@@ -535,11 +535,11 @@ test('search functionality in main and detail views', async () => {
|
|
|
535
535
|
|
|
536
536
|
|
|
537
537
|
|
|
538
|
-
↵ open details ↑↓ navigate ^k actions :vim
|
|
539
538
|
|
|
540
539
|
|
|
541
540
|
|
|
542
541
|
|
|
542
|
+
↵ open details ↑↓ navigate ^k actions :vim
|
|
543
543
|
|
|
544
544
|
|
|
545
545
|
|
|
@@ -573,11 +573,11 @@ test('search functionality in main and detail views', async () => {
|
|
|
573
573
|
|
|
574
574
|
|
|
575
575
|
|
|
576
|
-
↵ open details ↑↓ navigate ^k actions :vim
|
|
577
576
|
|
|
578
577
|
|
|
579
578
|
|
|
580
579
|
|
|
580
|
+
↵ open details ↑↓ navigate ^k actions :vim
|
|
581
581
|
|
|
582
582
|
|
|
583
583
|
|
|
@@ -606,18 +606,18 @@ test('search functionality in main and detail views', async () => {
|
|
|
606
606
|
> Detail view - Press ESC to go back
|
|
607
607
|
|
|
608
608
|
Details
|
|
609
|
-
›This is the
|
|
609
|
+
›This is the det...w for First Ite Press Enter t... navigate back
|
|
610
610
|
|
|
611
611
|
|
|
612
612
|
|
|
613
613
|
|
|
614
614
|
|
|
615
615
|
|
|
616
|
-
↵ go back ↑↓ navigate ^k actions :vim
|
|
617
616
|
|
|
618
617
|
|
|
619
618
|
|
|
620
619
|
|
|
620
|
+
↵ go back ↑↓ navigate ^k actions :vim
|
|
621
621
|
|
|
622
622
|
|
|
623
623
|
|
|
@@ -650,11 +650,11 @@ test('search functionality in main and detail views', async () => {
|
|
|
650
650
|
|
|
651
651
|
|
|
652
652
|
|
|
653
|
-
↵ go back ↑↓ navigate ^k actions :vim
|
|
654
653
|
|
|
655
654
|
|
|
656
655
|
|
|
657
656
|
|
|
657
|
+
↵ go back ↑↓ navigate ^k actions :vim
|
|
658
658
|
|
|
659
659
|
|
|
660
660
|
|
|
@@ -687,11 +687,11 @@ test('search functionality in main and detail views', async () => {
|
|
|
687
687
|
|
|
688
688
|
|
|
689
689
|
|
|
690
|
-
↵ open details ↑↓ navigate ^k actions :vim
|
|
691
690
|
|
|
692
691
|
|
|
693
692
|
|
|
694
693
|
|
|
694
|
+
↵ open details ↑↓ navigate ^k actions :vim
|
|
695
695
|
|
|
696
696
|
|
|
697
697
|
|
|
@@ -43,15 +43,15 @@ test('progress bars render in detail metadata and update on selection', async ()
|
|
|
43
43
|
│ ▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ 7% used
|
|
44
44
|
│ Resets Feb 27, 1pm (Asia/Bangkok)
|
|
45
45
|
│
|
|
46
|
+
│
|
|
47
|
+
│
|
|
48
|
+
│
|
|
49
|
+
│
|
|
50
|
+
│
|
|
51
|
+
│
|
|
52
|
+
│
|
|
46
53
|
↑↓ navigate ^k actions :vim │
|
|
47
54
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
55
|
"
|
|
56
56
|
`)
|
|
57
57
|
|
|
@@ -82,7 +82,7 @@ afterEach(() => {
|
|
|
82
82
|
test.skipIf(isLinux)('swift extension dev mode shows command list', async () => {
|
|
83
83
|
// Wait for command list to appear
|
|
84
84
|
const commandList = await session.text({
|
|
85
|
-
waitFor: (text) => /Swift
|
|
85
|
+
waitFor: (text) => /Swift Lis/i.test(text),
|
|
86
86
|
timeout: 30000,
|
|
87
87
|
})
|
|
88
88
|
|
|
@@ -96,17 +96,17 @@ test.skipIf(isLinux)('swift extension dev mode shows command list', async () =>
|
|
|
96
96
|
|
|
97
97
|
Commands
|
|
98
98
|
›List Items Displays a simple list with some items view
|
|
99
|
-
Swift
|
|
99
|
+
Swift ListDisplays a list of item...ned by a Swift function view
|
|
100
100
|
|
|
101
101
|
|
|
102
102
|
|
|
103
103
|
|
|
104
104
|
|
|
105
|
-
↵ run command ↑↓ navigate ^k actions :vim
|
|
106
105
|
|
|
107
106
|
|
|
108
107
|
|
|
109
108
|
|
|
109
|
+
↵ run command ↑↓ navigate ^k actions :vim
|
|
110
110
|
|
|
111
111
|
|
|
112
112
|
|
|
@@ -119,7 +119,7 @@ test.skipIf(isLinux)('swift extension dev mode shows command list', async () =>
|
|
|
119
119
|
test.skipIf(isLinux)('swift extension runs Swift List command and shows items', async () => {
|
|
120
120
|
// Wait for command list to appear
|
|
121
121
|
await session.text({
|
|
122
|
-
waitFor: (text) => /Swift
|
|
122
|
+
waitFor: (text) => /Swift Lis/i.test(text),
|
|
123
123
|
timeout: 30000,
|
|
124
124
|
})
|
|
125
125
|
|
|
@@ -153,11 +153,11 @@ test.skipIf(isLinux)('swift extension runs Swift List command and shows items',
|
|
|
153
153
|
|
|
154
154
|
|
|
155
155
|
|
|
156
|
-
↑↓ navigate ^k actions :vim
|
|
157
156
|
|
|
158
157
|
|
|
159
158
|
|
|
160
159
|
|
|
160
|
+
↑↓ navigate ^k actions :vim
|
|
161
161
|
|
|
162
162
|
|
|
163
163
|
|
|
@@ -45,11 +45,11 @@ test('pressing enter triggers primary action on toast', async () => {
|
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
|
|
48
|
-
✓ File Deleted document.pdf was moved to trash Undo ctrl t
|
|
49
48
|
|
|
50
49
|
|
|
51
50
|
|
|
52
51
|
|
|
52
|
+
✓ File Deleted document.pdf was moved to trash Undo ctrl t
|
|
53
53
|
"
|
|
54
54
|
`)
|
|
55
55
|
|
|
@@ -78,11 +78,11 @@ test('pressing enter triggers primary action on toast', async () => {
|
|
|
78
78
|
|
|
79
79
|
|
|
80
80
|
|
|
81
|
-
✓ Undone File restored
|
|
82
81
|
|
|
83
82
|
|
|
84
83
|
|
|
85
84
|
|
|
85
|
+
✓ Undone File restored
|
|
86
86
|
"
|
|
87
87
|
`)
|
|
88
88
|
|
|
@@ -124,11 +124,11 @@ test('pressing escape hides the toast', async () => {
|
|
|
124
124
|
|
|
125
125
|
|
|
126
126
|
|
|
127
|
-
↵ show toast ↑↓ navigate ^k actions :vim
|
|
128
127
|
|
|
129
128
|
|
|
130
129
|
|
|
131
130
|
|
|
131
|
+
↵ show toast ↑↓ navigate ^k actions :vim
|
|
132
132
|
"
|
|
133
133
|
`)
|
|
134
134
|
|
|
@@ -238,11 +238,11 @@ test('form toast: pressing enter triggers primary action (navigation)', async ()
|
|
|
238
238
|
|
|
239
239
|
|
|
240
240
|
|
|
241
|
-
↑↓ navigate ^k actions :vim
|
|
242
241
|
|
|
243
242
|
|
|
244
243
|
|
|
245
244
|
|
|
245
|
+
↑↓ navigate ^k actions :vim
|
|
246
246
|
"
|
|
247
247
|
`)
|
|
248
248
|
}, 30000)
|
package/src/extensions/dev.tsx
CHANGED
|
@@ -59,13 +59,13 @@ test('dev command shows extension commands list', async () => {
|
|
|
59
59
|
|
|
60
60
|
Commands
|
|
61
61
|
›List Items Displays a simple list with some items view
|
|
62
|
-
Search
|
|
62
|
+
Search ItemsSearch and filter...h a list of items view
|
|
63
63
|
Google Oauth view
|
|
64
|
-
|
|
65
|
-
Show
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
usePr...e Dem Shows how to use...m @raycast/utils view
|
|
65
|
+
Show Stat Shows the current ...ate in JSON format view
|
|
66
|
+
With ...mentsDemonstrates com...ssword, dropdown) view
|
|
67
|
+
Quic...tionCopies current t...t showing a view no-view
|
|
68
|
+
Throw ErrorCommand that thro...rror at root scope view
|
|
69
69
|
"
|
|
70
70
|
`)
|
|
71
71
|
}, 30000)
|
|
@@ -93,15 +93,15 @@ test('selecting command with arguments shows arguments form', async () => {
|
|
|
93
93
|
|
|
94
94
|
> Search commands...
|
|
95
95
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
96
|
+
Commands
|
|
97
|
+
List Items Displays a simple list with some items view
|
|
98
|
+
Search ItemsSearch and filter...h a list of items view
|
|
99
|
+
Google Oauth view
|
|
100
|
+
usePr...e Dem Shows how to use...m @raycast/utils view
|
|
101
|
+
Show Stat Shows the current ...ate in JSON format view
|
|
102
|
+
›With ...mentsDemonstrates com...ssword, dropdown) view
|
|
103
|
+
Quic...tionCopies current t...t showing a view no-view
|
|
104
|
+
Throw ErrorCommand that thro...rror at root scope view
|
|
105
105
|
"
|
|
106
106
|
`)
|
|
107
107
|
|
|
@@ -217,7 +217,7 @@ test('can fill arguments and run command', async () => {
|
|
|
217
217
|
|
|
218
218
|
|
|
219
219
|
|
|
220
|
-
|
|
220
|
+
|
|
221
221
|
"
|
|
222
222
|
`)
|
|
223
223
|
}, 30000)
|
|
@@ -256,7 +256,7 @@ test('can run simple view command without arguments', async () => {
|
|
|
256
256
|
○ Fifth Item This is the fifth item
|
|
257
257
|
|
|
258
258
|
|
|
259
|
-
|
|
259
|
+
|
|
260
260
|
"
|
|
261
261
|
`)
|
|
262
262
|
}, 30000)
|
package/src/globals.ts
CHANGED
|
@@ -36,3 +36,12 @@ globalThis.termcastApi = termcastApi
|
|
|
36
36
|
globalThis.termcastOpentui = termcastOpentui
|
|
37
37
|
|
|
38
38
|
globalThis.logger = logger
|
|
39
|
+
|
|
40
|
+
// Install React component profiler when TERMCAST_REACT_PROFILE=1
|
|
41
|
+
// Captures performance.measure() entries from React 19.2+ dev reconciler
|
|
42
|
+
// and writes a .cpuprofile on exit. Analyze with: bunx profano ./tmp/react-profile-*.cpuprofile --sort self
|
|
43
|
+
if (process.env.TERMCAST_REACT_PROFILE === '1') {
|
|
44
|
+
import('./profiler').then((mod) => {
|
|
45
|
+
mod.installProfiler()
|
|
46
|
+
})
|
|
47
|
+
}
|
package/src/index.tsx
CHANGED
|
@@ -64,6 +64,13 @@ export type {
|
|
|
64
64
|
GraphVariant,
|
|
65
65
|
} from 'termcast/src/components/graph'
|
|
66
66
|
|
|
67
|
+
// Core UI Components - DottedLineGraph
|
|
68
|
+
export { DottedLineGraph } from 'termcast/src/components/dotted-line-graph'
|
|
69
|
+
export type {
|
|
70
|
+
DottedLineGraphProps,
|
|
71
|
+
DottedLineGraphSeriesProps,
|
|
72
|
+
} from 'termcast/src/components/dotted-line-graph'
|
|
73
|
+
|
|
67
74
|
// Core UI Components - Row
|
|
68
75
|
export { Row } from 'termcast/src/components/row'
|
|
69
76
|
export type { RowProps } from 'termcast/src/components/row'
|
|
@@ -86,6 +93,13 @@ export type {
|
|
|
86
93
|
BarGraphSeriesProps,
|
|
87
94
|
} from 'termcast/src/components/bar-graph'
|
|
88
95
|
|
|
96
|
+
// Core UI Components - HorizontalBarGraph
|
|
97
|
+
export { HorizontalBarGraph } from 'termcast/src/components/horizontal-bar-graph'
|
|
98
|
+
export type {
|
|
99
|
+
HorizontalBarGraphProps,
|
|
100
|
+
HorizontalBarGraphSeriesProps,
|
|
101
|
+
} from 'termcast/src/components/horizontal-bar-graph'
|
|
102
|
+
|
|
89
103
|
// Core UI Components - CandleChart
|
|
90
104
|
export { CandleChart } from 'termcast/src/components/candle-chart'
|
|
91
105
|
export type {
|
|
@@ -104,6 +118,13 @@ export type {
|
|
|
104
118
|
HeatmapCellChar,
|
|
105
119
|
} from 'termcast/src/components/heatmap'
|
|
106
120
|
|
|
121
|
+
// Core UI Components - Histogram
|
|
122
|
+
export { Histogram } from 'termcast/src/components/histogram'
|
|
123
|
+
export type {
|
|
124
|
+
HistogramProps,
|
|
125
|
+
HistogramItemProps,
|
|
126
|
+
} from 'termcast/src/components/histogram'
|
|
127
|
+
|
|
107
128
|
// Core UI Components - ProgressBar
|
|
108
129
|
export { ProgressBar } from 'termcast/src/components/progress-bar'
|
|
109
130
|
export type { ProgressBarProps } from 'termcast/src/components/progress-bar'
|
package/src/package-json.tsx
CHANGED
|
@@ -115,6 +115,8 @@ export function parsePackageJson({
|
|
|
115
115
|
interface CommandWithFile extends RaycastCommand {
|
|
116
116
|
filePath: string
|
|
117
117
|
exists: boolean
|
|
118
|
+
/** All candidate paths checked when resolving this command's file */
|
|
119
|
+
checkedPaths: string[]
|
|
118
120
|
}
|
|
119
121
|
|
|
120
122
|
interface CommandsWithFiles {
|
|
@@ -136,36 +138,34 @@ export function getCommandsWithFiles({
|
|
|
136
138
|
const commands: CommandWithFile[] = (packageJson.commands || []).map(
|
|
137
139
|
(command) => {
|
|
138
140
|
const possibleExtensions = ['.tsx', '.ts', '.jsx', '.js']
|
|
141
|
+
const dirs = [projectRoot, path.join(projectRoot, 'src')]
|
|
142
|
+
|
|
143
|
+
// Build ordered candidate list: all flat files first, then directory entries.
|
|
144
|
+
// This means src/{name}.tsx is preferred over root/{name}/index.tsx.
|
|
145
|
+
const checkedPaths: string[] = [
|
|
146
|
+
...dirs.flatMap((dir) => {
|
|
147
|
+
return possibleExtensions.map((ext) => {
|
|
148
|
+
return path.join(dir, `${command.name}${ext}`)
|
|
149
|
+
})
|
|
150
|
+
}),
|
|
151
|
+
...dirs.flatMap((dir) => {
|
|
152
|
+
return possibleExtensions.map((ext) => {
|
|
153
|
+
return path.join(dir, command.name, `index${ext}`)
|
|
154
|
+
})
|
|
155
|
+
}),
|
|
156
|
+
]
|
|
157
|
+
|
|
139
158
|
let filePath = ''
|
|
140
159
|
let exists = false
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
const candidatePath = path.join(projectRoot, `${command.name}${ext}`)
|
|
145
|
-
if (fs.existsSync(candidatePath)) {
|
|
146
|
-
filePath = candidatePath
|
|
160
|
+
for (const candidate of checkedPaths) {
|
|
161
|
+
if (fs.existsSync(candidate)) {
|
|
162
|
+
filePath = candidate
|
|
147
163
|
exists = true
|
|
148
164
|
break
|
|
149
165
|
}
|
|
150
166
|
}
|
|
151
167
|
|
|
152
|
-
// If not found,
|
|
153
|
-
if (!exists) {
|
|
154
|
-
for (const ext of possibleExtensions) {
|
|
155
|
-
const candidatePath = path.join(
|
|
156
|
-
projectRoot,
|
|
157
|
-
'src',
|
|
158
|
-
`${command.name}${ext}`,
|
|
159
|
-
)
|
|
160
|
-
if (fs.existsSync(candidatePath)) {
|
|
161
|
-
filePath = candidatePath
|
|
162
|
-
exists = true
|
|
163
|
-
break
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
// If still not found, default to "src/commandName.tsx"
|
|
168
|
+
// If not found, default to "src/commandName.tsx" for the fallback path
|
|
169
169
|
if (!filePath) {
|
|
170
170
|
filePath = path.join(projectRoot, 'src', `${command.name}.tsx`)
|
|
171
171
|
}
|
|
@@ -174,6 +174,7 @@ export function getCommandsWithFiles({
|
|
|
174
174
|
...command,
|
|
175
175
|
filePath,
|
|
176
176
|
exists,
|
|
177
|
+
checkedPaths,
|
|
177
178
|
}
|
|
178
179
|
},
|
|
179
180
|
)
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* SQLite Database for Node.js — uses
|
|
2
|
+
* SQLite Database for Node.js — uses the built-in node:sqlite module.
|
|
3
3
|
*
|
|
4
|
-
* Translates bun:sqlite constructor options ({ create, readwrite })
|
|
5
|
-
* to
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* Translates bun:sqlite constructor options ({ create, readwrite, readonly })
|
|
5
|
+
* to node:sqlite DatabaseSync options ({ readOnly }).
|
|
6
|
+
* Adds a transaction() polyfill since node:sqlite lacks a built-in one.
|
|
7
|
+
*
|
|
8
|
+
* Requires Node.js >= 22.13.0 (node:sqlite without --experimental-sqlite flag).
|
|
8
9
|
*/
|
|
9
10
|
|
|
10
|
-
import
|
|
11
|
+
import { DatabaseSync } from 'node:sqlite'
|
|
11
12
|
|
|
12
13
|
interface DatabaseOptions {
|
|
13
14
|
create?: boolean
|
|
@@ -16,16 +17,31 @@ interface DatabaseOptions {
|
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
function NodeDatabase(path: string, options?: DatabaseOptions) {
|
|
19
|
-
const
|
|
20
|
+
const readOnly = options?.readonly === true || options?.readwrite === false
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
const db = new DatabaseSync(path, {
|
|
23
|
+
readOnly,
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
// node:sqlite's DatabaseSync lacks a transaction() helper.
|
|
27
|
+
// Polyfill it to match better-sqlite3 / bun:sqlite behavior:
|
|
28
|
+
// transaction(fn) returns a new function that wraps fn in BEGIN/COMMIT/ROLLBACK.
|
|
29
|
+
const dbAny = db as any
|
|
30
|
+
dbAny.transaction = <T>(fn: () => T): (() => T) => {
|
|
31
|
+
return () => {
|
|
32
|
+
db.exec('BEGIN')
|
|
33
|
+
try {
|
|
34
|
+
const result = fn()
|
|
35
|
+
db.exec('COMMIT')
|
|
36
|
+
return result
|
|
37
|
+
} catch (e) {
|
|
38
|
+
db.exec('ROLLBACK')
|
|
39
|
+
throw e
|
|
40
|
+
}
|
|
41
|
+
}
|
|
26
42
|
}
|
|
27
43
|
|
|
28
|
-
return
|
|
44
|
+
return db
|
|
29
45
|
}
|
|
30
46
|
|
|
31
47
|
export const Database: new (path: string, options?: DatabaseOptions) => DatabaseInstance = NodeDatabase as any
|