termcast 1.3.9 → 1.3.10
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/action-utils.js +1 -1
- package/dist/action-utils.js.map +1 -1
- package/dist/apis/ai.js +1 -1
- package/dist/apis/ai.js.map +1 -1
- package/dist/apis/clipboard.js +2 -2
- package/dist/apis/clipboard.js.map +1 -1
- package/dist/apis/hud.d.ts +2 -2
- package/dist/apis/hud.d.ts.map +1 -1
- package/dist/apis/hud.js +5 -5
- package/dist/apis/hud.js.map +1 -1
- package/dist/apis/oauth.d.ts +1 -1
- package/dist/apis/oauth.d.ts.map +1 -1
- package/dist/apis/oauth.js +8 -8
- package/dist/apis/oauth.js.map +1 -1
- package/dist/apis/preferences.js +4 -4
- package/dist/apis/preferences.js.map +1 -1
- package/dist/apis/toast.js +3 -3
- package/dist/apis/toast.js.map +1 -1
- package/dist/build.js +6 -6
- package/dist/build.js.map +1 -1
- package/dist/cli.js +2 -2
- package/dist/cli.js.map +1 -1
- package/dist/components/actions.d.ts +1 -1
- package/dist/components/actions.d.ts.map +1 -1
- package/dist/components/actions.js +7 -7
- package/dist/components/actions.js.map +1 -1
- package/dist/components/alert.js +4 -4
- package/dist/components/alert.js.map +1 -1
- package/dist/components/detail.d.ts +2 -2
- package/dist/components/detail.d.ts.map +1 -1
- package/dist/components/detail.js +5 -5
- package/dist/components/detail.js.map +1 -1
- package/dist/components/dropdown.d.ts +1 -1
- package/dist/components/dropdown.d.ts.map +1 -1
- package/dist/components/dropdown.js +4 -4
- package/dist/components/dropdown.js.map +1 -1
- package/dist/components/extension-preferences.js +5 -5
- package/dist/components/extension-preferences.js.map +1 -1
- package/dist/components/form/checkbox.js +2 -2
- package/dist/components/form/checkbox.js.map +1 -1
- package/dist/components/form/date-picker.js +3 -3
- package/dist/components/form/date-picker.js.map +1 -1
- package/dist/components/form/description.js +1 -1
- package/dist/components/form/description.js.map +1 -1
- package/dist/components/form/dropdown.js +4 -4
- package/dist/components/form/dropdown.js.map +1 -1
- package/dist/components/form/file-autocomplete.js +2 -2
- package/dist/components/form/file-autocomplete.js.map +1 -1
- package/dist/components/form/file-picker.js +2 -2
- package/dist/components/form/file-picker.js.map +1 -1
- package/dist/components/form/form-end.js +1 -1
- package/dist/components/form/form-end.js.map +1 -1
- package/dist/components/form/index.js +5 -5
- package/dist/components/form/index.js.map +1 -1
- package/dist/components/form/password-field.js +1 -1
- package/dist/components/form/password-field.js.map +1 -1
- package/dist/components/form/separator.js +1 -1
- package/dist/components/form/separator.js.map +1 -1
- package/dist/components/form/tagpicker.d.ts +1 -1
- package/dist/components/form/tagpicker.d.ts.map +1 -1
- package/dist/components/form/text-area.js +1 -1
- package/dist/components/form/text-area.js.map +1 -1
- package/dist/components/form/text-field.js +1 -1
- package/dist/components/form/text-field.js.map +1 -1
- package/dist/components/form/with-left-border.js +1 -1
- package/dist/components/form/with-left-border.js.map +1 -1
- package/dist/components/image.js +1 -1
- package/dist/components/image.js.map +1 -1
- package/dist/components/list.d.ts +1 -1
- package/dist/components/list.d.ts.map +1 -1
- package/dist/components/list.js +7 -7
- package/dist/components/list.js.map +1 -1
- package/dist/components/loading-bar.js +1 -1
- package/dist/components/loading-bar.js.map +1 -1
- package/dist/components/menubar-extra.d.ts +1 -1
- package/dist/components/menubar-extra.d.ts.map +1 -1
- package/dist/components/menubar-extra.js +2 -2
- package/dist/components/menubar-extra.js.map +1 -1
- package/dist/e2e-node.d.ts +2 -0
- package/dist/e2e-node.d.ts.map +1 -1
- package/dist/e2e-node.js +14 -0
- package/dist/e2e-node.js.map +1 -1
- package/dist/examples/action-show-in-finder.js +2 -2
- package/dist/examples/action-show-in-finder.js.map +1 -1
- package/dist/examples/environment-test.js +3 -3
- package/dist/examples/environment-test.js.map +1 -1
- package/dist/examples/error-boundary.js +4 -4
- package/dist/examples/error-boundary.js.map +1 -1
- package/dist/examples/form-basic.js +4 -4
- package/dist/examples/form-basic.js.map +1 -1
- package/dist/examples/form-basic.vitest.js +103 -103
- package/dist/examples/form-basic.vitest.js.map +1 -1
- package/dist/examples/form-dropdown.js +2 -2
- package/dist/examples/form-dropdown.js.map +1 -1
- package/dist/examples/form-dropdown.vitest.js +1 -1
- package/dist/examples/form-dropdown.vitest.js.map +1 -1
- package/dist/examples/form-tagpicker.js +2 -2
- package/dist/examples/form-tagpicker.js.map +1 -1
- package/dist/examples/form-tagpicker.vitest.js +1 -1
- package/dist/examples/form-tagpicker.vitest.js.map +1 -1
- package/dist/examples/internal/descendants-filtering.js +2 -2
- package/dist/examples/internal/descendants-filtering.js.map +1 -1
- package/dist/examples/internal/descendants.js +3 -3
- package/dist/examples/internal/descendants.js.map +1 -1
- package/dist/examples/internal/scrollbox-demo.js +1 -1
- package/dist/examples/internal/scrollbox-demo.js.map +1 -1
- package/dist/examples/internal/simple-dialog.js +6 -6
- package/dist/examples/internal/simple-dialog.js.map +1 -1
- package/dist/examples/internal/simple-scrollbox.d.ts +2 -0
- package/dist/examples/internal/simple-scrollbox.d.ts.map +1 -0
- package/dist/examples/internal/simple-scrollbox.js +26 -0
- package/dist/examples/internal/simple-scrollbox.js.map +1 -0
- package/dist/examples/internal/simple-scrollbox.vitest.d.ts +2 -0
- package/dist/examples/internal/simple-scrollbox.vitest.d.ts.map +1 -0
- package/dist/examples/internal/simple-scrollbox.vitest.js +88 -0
- package/dist/examples/internal/simple-scrollbox.vitest.js.map +1 -0
- package/dist/examples/list-dropdown-default.js +2 -2
- package/dist/examples/list-dropdown-default.js.map +1 -1
- package/dist/examples/list-dropdown-default.vitest.js +1 -1
- package/dist/examples/list-dropdown-default.vitest.js.map +1 -1
- package/dist/examples/list-fetch-data.js +2 -2
- package/dist/examples/list-fetch-data.js.map +1 -1
- package/dist/examples/list-fetch-data.vitest.js +1 -1
- package/dist/examples/list-fetch-data.vitest.js.map +1 -1
- package/dist/examples/list-with-detail.js +1 -1
- package/dist/examples/list-with-detail.js.map +1 -1
- package/dist/examples/list-with-detail.vitest.js +1 -1
- package/dist/examples/list-with-detail.vitest.js.map +1 -1
- package/dist/examples/list-with-dropdown.js +1 -1
- package/dist/examples/list-with-dropdown.js.map +1 -1
- package/dist/examples/list-with-dropdown.vitest.js +1 -1
- package/dist/examples/list-with-dropdown.vitest.js.map +1 -1
- package/dist/examples/list-with-sections.js +3 -3
- package/dist/examples/list-with-sections.js.map +1 -1
- package/dist/examples/list-with-sections.vitest.js +1 -1
- package/dist/examples/list-with-sections.vitest.js.map +1 -1
- package/dist/examples/miscellaneous.js +13 -13
- package/dist/examples/miscellaneous.js.map +1 -1
- package/dist/examples/nested-navigation.js +5 -5
- package/dist/examples/nested-navigation.js.map +1 -1
- package/dist/examples/preferences-test.js +3 -3
- package/dist/examples/preferences-test.js.map +1 -1
- package/dist/examples/simple-dropdown.js +3 -3
- package/dist/examples/simple-dropdown.js.map +1 -1
- package/dist/examples/simple-file-picker.js +2 -2
- package/dist/examples/simple-file-picker.js.map +1 -1
- package/dist/examples/simple-file-picker.vitest.js +26 -26
- package/dist/examples/simple-file-picker.vitest.js.map +1 -1
- package/dist/examples/simple-grid.js +1 -1
- package/dist/examples/simple-grid.js.map +1 -1
- package/dist/examples/simple-grid.vitest.js +1 -1
- package/dist/examples/simple-grid.vitest.js.map +1 -1
- package/dist/examples/simple-hud.js +3 -3
- package/dist/examples/simple-hud.js.map +1 -1
- package/dist/examples/simple-list-search.js +20 -4
- package/dist/examples/simple-list-search.js.map +1 -1
- package/dist/examples/simple-list.js +3 -3
- package/dist/examples/simple-list.js.map +1 -1
- package/dist/examples/simple-navigation.js +5 -5
- package/dist/examples/simple-navigation.js.map +1 -1
- package/dist/examples/simple-navigation.vitest.js +1 -1
- package/dist/examples/simple-navigation.vitest.js.map +1 -1
- package/dist/examples/store.vitest.js +1 -5
- package/dist/examples/store.vitest.js.map +1 -1
- package/dist/examples/tanstack-demo.js +2 -2
- package/dist/examples/tanstack-demo.js.map +1 -1
- package/dist/examples/use-promise-demo.js +2 -2
- package/dist/examples/use-promise-demo.js.map +1 -1
- package/dist/extensions/dev.js +7 -7
- package/dist/extensions/dev.js.map +1 -1
- package/dist/extensions/home.js +8 -8
- package/dist/extensions/home.js.map +1 -1
- package/dist/extensions/store.js +2 -2
- package/dist/extensions/store.js.map +1 -1
- package/dist/globals.js +1 -1
- package/dist/globals.js.map +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/use-action-panel.js +1 -1
- package/dist/hooks/use-action-panel.js.map +1 -1
- package/dist/hooks/use-unstable-ai.js +1 -1
- package/dist/hooks/use-unstable-ai.js.map +1 -1
- package/dist/index.d.ts +55 -55
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +38 -38
- package/dist/index.js.map +1 -1
- package/dist/internal/dialog.d.ts +3 -3
- package/dist/internal/dialog.d.ts.map +1 -1
- package/dist/internal/dialog.js +3 -3
- package/dist/internal/dialog.js.map +1 -1
- package/dist/internal/error-handler.js +2 -2
- package/dist/internal/error-handler.js.map +1 -1
- package/dist/internal/focus-context.d.ts +1 -1
- package/dist/internal/focus-context.d.ts.map +1 -1
- package/dist/internal/navigation.d.ts +1 -1
- package/dist/internal/navigation.d.ts.map +1 -1
- package/dist/internal/navigation.js +2 -2
- package/dist/internal/navigation.js.map +1 -1
- package/dist/internal/providers.d.ts +2 -2
- package/dist/internal/providers.d.ts.map +1 -1
- package/dist/internal/providers.js +9 -9
- package/dist/internal/providers.js.map +1 -1
- package/dist/internal/scrollbox.d.ts +11 -0
- package/dist/internal/scrollbox.d.ts.map +1 -0
- package/dist/internal/scrollbox.js +28 -0
- package/dist/internal/scrollbox.js.map +1 -0
- package/dist/preload.js +1 -1
- package/dist/preload.js.map +1 -1
- package/dist/utils.js +2 -2
- package/dist/utils.js.map +1 -1
- package/package.json +4 -2
- package/src/e2e-node.tsx +16 -0
- package/src/examples/form-basic.vitest.tsx +102 -102
- package/src/examples/internal/simple-scrollbox.tsx +55 -0
- package/src/examples/internal/simple-scrollbox.vitest.tsx +94 -0
- package/src/examples/nested-navigation.tsx +3 -3
- package/src/examples/simple-file-picker.vitest.tsx +25 -25
- package/src/examples/simple-list-search.tsx +41 -0
- package/src/examples/simple-navigation.tsx +3 -3
- package/src/examples/store.vitest.tsx +0 -4
- package/src/extensions/dev.tsx +2 -2
- package/src/extensions/home.tsx +3 -3
- package/src/index.tsx +6 -25
- package/src/internal/providers.tsx +1 -1
- package/src/internal/scrollbox.tsx +53 -0
- package/src/utils.tsx +2 -2
|
@@ -70,14 +70,14 @@ test('form basic navigation and input', async () => {
|
|
|
70
70
|
◇ Date of Birth
|
|
71
71
|
│
|
|
72
72
|
│ ← 2025 →
|
|
73
|
-
│ ←
|
|
73
|
+
│ ← October →
|
|
74
74
|
│
|
|
75
75
|
│ Mo Tu We Th Fr Sa Su
|
|
76
|
-
│
|
|
77
|
-
│ 8 9 10 11 12
|
|
78
|
-
│ 15 16 17 18 19
|
|
79
|
-
│ 22 23 24 25 26
|
|
80
|
-
│ 29 30"
|
|
76
|
+
│ 1 2 3 4 5
|
|
77
|
+
│ 6 7 8 9 10 11 12
|
|
78
|
+
│ 13 14 15 16 17 18 19
|
|
79
|
+
│ 20 21 22 23 24 25 26
|
|
80
|
+
│ 27 28 29 30 31"
|
|
81
81
|
`)
|
|
82
82
|
|
|
83
83
|
// Type in username field
|
|
@@ -127,14 +127,14 @@ test('form basic navigation and input', async () => {
|
|
|
127
127
|
◇ Date of Birth
|
|
128
128
|
│
|
|
129
129
|
│ ← 2025 →
|
|
130
|
-
│ ←
|
|
130
|
+
│ ← October →
|
|
131
131
|
│
|
|
132
132
|
│ Mo Tu We Th Fr Sa Su
|
|
133
|
-
│
|
|
134
|
-
│ 8 9 10 11 12
|
|
135
|
-
│ 15 16 17 18 19
|
|
136
|
-
│ 22 23 24 25 26
|
|
137
|
-
│ 29 30"
|
|
133
|
+
│ 1 2 3 4 5
|
|
134
|
+
│ 6 7 8 9 10 11 12
|
|
135
|
+
│ 13 14 15 16 17 18 19
|
|
136
|
+
│ 20 21 22 23 24 25 26
|
|
137
|
+
│ 27 28 29 30 31"
|
|
138
138
|
`)
|
|
139
139
|
|
|
140
140
|
// Tab to password field
|
|
@@ -185,14 +185,14 @@ test('form basic navigation and input', async () => {
|
|
|
185
185
|
◇ Date of Birth
|
|
186
186
|
│
|
|
187
187
|
│ ← 2025 →
|
|
188
|
-
│ ←
|
|
188
|
+
│ ← October →
|
|
189
189
|
│
|
|
190
190
|
│ Mo Tu We Th Fr Sa Su
|
|
191
|
-
│
|
|
192
|
-
│ 8 9 10 11 12
|
|
193
|
-
│ 15 16 17 18 19
|
|
194
|
-
│ 22 23 24 25 26
|
|
195
|
-
│ 29 30"
|
|
191
|
+
│ 1 2 3 4 5
|
|
192
|
+
│ 6 7 8 9 10 11 12
|
|
193
|
+
│ 13 14 15 16 17 18 19
|
|
194
|
+
│ 20 21 22 23 24 25 26
|
|
195
|
+
│ 27 28 29 30 31"
|
|
196
196
|
`)
|
|
197
197
|
|
|
198
198
|
// Tab to biography field
|
|
@@ -243,14 +243,14 @@ test('form basic navigation and input', async () => {
|
|
|
243
243
|
◇ Date of Birth
|
|
244
244
|
│
|
|
245
245
|
│ ← 2025 →
|
|
246
|
-
│ ←
|
|
246
|
+
│ ← October →
|
|
247
247
|
│
|
|
248
248
|
│ Mo Tu We Th Fr Sa Su
|
|
249
|
-
│
|
|
250
|
-
│ 8 9 10 11 12
|
|
251
|
-
│ 15 16 17 18 19
|
|
252
|
-
│ 22 23 24 25 26
|
|
253
|
-
│ 29 30"
|
|
249
|
+
│ 1 2 3 4 5
|
|
250
|
+
│ 6 7 8 9 10 11 12
|
|
251
|
+
│ 13 14 15 16 17 18 19
|
|
252
|
+
│ 20 21 22 23 24 25 26
|
|
253
|
+
│ 27 28 29 30 31"
|
|
254
254
|
`)
|
|
255
255
|
|
|
256
256
|
// Tab to newsletter checkbox and toggle it
|
|
@@ -301,14 +301,14 @@ test('form basic navigation and input', async () => {
|
|
|
301
301
|
◇ Date of Birth
|
|
302
302
|
│
|
|
303
303
|
│ ← 2025 →
|
|
304
|
-
│ ←
|
|
304
|
+
│ ← October →
|
|
305
305
|
│
|
|
306
306
|
│ Mo Tu We Th Fr Sa Su
|
|
307
|
-
│
|
|
308
|
-
│ 8 9 10 11 12
|
|
309
|
-
│ 15 16 17 18 19
|
|
310
|
-
│ 22 23 24 25 26
|
|
311
|
-
│ 29 30"
|
|
307
|
+
│ 1 2 3 4 5
|
|
308
|
+
│ 6 7 8 9 10 11 12
|
|
309
|
+
│ 13 14 15 16 17 18 19
|
|
310
|
+
│ 20 21 22 23 24 25 26
|
|
311
|
+
│ 27 28 29 30 31"
|
|
312
312
|
`)
|
|
313
313
|
|
|
314
314
|
// Tab to country dropdown and select United States
|
|
@@ -359,14 +359,14 @@ test('form basic navigation and input', async () => {
|
|
|
359
359
|
◇ Date of Birth
|
|
360
360
|
│
|
|
361
361
|
│ ← 2025 →
|
|
362
|
-
│ ←
|
|
362
|
+
│ ← October →
|
|
363
363
|
│
|
|
364
364
|
│ Mo Tu We Th Fr Sa Su
|
|
365
|
-
│
|
|
366
|
-
│ 8 9 10 11 12
|
|
367
|
-
│ 15 16 17 18 19
|
|
368
|
-
│ 22 23 24 25 26
|
|
369
|
-
│ 29 30"
|
|
365
|
+
│ 1 2 3 4 5
|
|
366
|
+
│ 6 7 8 9 10 11 12
|
|
367
|
+
│ 13 14 15 16 17 18 19
|
|
368
|
+
│ 20 21 22 23 24 25 26
|
|
369
|
+
│ 27 28 29 30 31"
|
|
370
370
|
`)
|
|
371
371
|
|
|
372
372
|
// Select United States
|
|
@@ -416,14 +416,14 @@ test('form basic navigation and input', async () => {
|
|
|
416
416
|
◇ Date of Birth
|
|
417
417
|
│
|
|
418
418
|
│ ← 2025 →
|
|
419
|
-
│ ←
|
|
419
|
+
│ ← October →
|
|
420
420
|
│
|
|
421
421
|
│ Mo Tu We Th Fr Sa Su
|
|
422
|
-
│
|
|
423
|
-
│ 8 9 10 11 12
|
|
424
|
-
│ 15 16 17 18 19
|
|
425
|
-
│ 22 23 24 25 26
|
|
426
|
-
│ 29 30"
|
|
422
|
+
│ 1 2 3 4 5
|
|
423
|
+
│ 6 7 8 9 10 11 12
|
|
424
|
+
│ 13 14 15 16 17 18 19
|
|
425
|
+
│ 20 21 22 23 24 25 26
|
|
426
|
+
│ 27 28 29 30 31"
|
|
427
427
|
`)
|
|
428
428
|
|
|
429
429
|
// Tab to date picker
|
|
@@ -474,14 +474,14 @@ test('form basic navigation and input', async () => {
|
|
|
474
474
|
◆ Date of Birth
|
|
475
475
|
│
|
|
476
476
|
│ ← 2025 →
|
|
477
|
-
│ ←
|
|
477
|
+
│ ← October →
|
|
478
478
|
│
|
|
479
479
|
│ Mo Tu We Th Fr Sa Su
|
|
480
|
-
│
|
|
481
|
-
│ 8 9 10 11 12
|
|
482
|
-
│ 15 16 17 18 19
|
|
483
|
-
│ 22 23 24 25 26
|
|
484
|
-
│ 29 30"
|
|
480
|
+
│ 1 2 3 4 5
|
|
481
|
+
│ 6 7 8 9 10 11 12
|
|
482
|
+
│ 13 14 15 16 17 18 19
|
|
483
|
+
│ 20 21 22 23 24 25 26
|
|
484
|
+
│ 27 28 29 30 31"
|
|
485
485
|
`)
|
|
486
486
|
|
|
487
487
|
// Submit form with Cmd+Enter
|
|
@@ -536,14 +536,14 @@ test('form basic navigation and input', async () => {
|
|
|
536
536
|
◆ Date of Birth
|
|
537
537
|
│
|
|
538
538
|
│ ← 2025 →
|
|
539
|
-
│ ←
|
|
539
|
+
│ ← October →
|
|
540
540
|
│
|
|
541
541
|
│ Mo Tu We Th Fr Sa Su
|
|
542
|
-
│
|
|
543
|
-
│ 8 9 10 11 12
|
|
544
|
-
│ 15 16 17 18 19
|
|
545
|
-
│ 22 23 24 25 26
|
|
546
|
-
│ 29 30"
|
|
542
|
+
│ 1 2 3 4 5
|
|
543
|
+
│ 6 7 8 9 10 11 12
|
|
544
|
+
│ 13 14 15 16 17 18 19
|
|
545
|
+
│ 20 21 22 23 24 25 26
|
|
546
|
+
│ 27 28 29 30 31"
|
|
547
547
|
`)
|
|
548
548
|
}, 15000)
|
|
549
549
|
|
|
@@ -605,14 +605,14 @@ test('form navigation with shift+tab', async () => {
|
|
|
605
605
|
◇ Date of Birth
|
|
606
606
|
│
|
|
607
607
|
│ ← 2025 →
|
|
608
|
-
│ ←
|
|
608
|
+
│ ← October →
|
|
609
609
|
│
|
|
610
610
|
│ Mo Tu We Th Fr Sa Su
|
|
611
|
-
│
|
|
612
|
-
│ 8 9 10 11 12
|
|
613
|
-
│ 15 16 17 18 19
|
|
614
|
-
│ 22 23 24 25 26
|
|
615
|
-
│ 29 30"
|
|
611
|
+
│ 1 2 3 4 5
|
|
612
|
+
│ 6 7 8 9 10 11 12
|
|
613
|
+
│ 13 14 15 16 17 18 19
|
|
614
|
+
│ 20 21 22 23 24 25 26
|
|
615
|
+
│ 27 28 29 30 31"
|
|
616
616
|
`)
|
|
617
617
|
|
|
618
618
|
// Navigate backwards with Shift+Tab
|
|
@@ -662,14 +662,14 @@ test('form navigation with shift+tab', async () => {
|
|
|
662
662
|
◇ Date of Birth
|
|
663
663
|
│
|
|
664
664
|
│ ← 2025 →
|
|
665
|
-
│ ←
|
|
665
|
+
│ ← October →
|
|
666
666
|
│
|
|
667
667
|
│ Mo Tu We Th Fr Sa Su
|
|
668
|
-
│
|
|
669
|
-
│ 8 9 10 11 12
|
|
670
|
-
│ 15 16 17 18 19
|
|
671
|
-
│ 22 23 24 25 26
|
|
672
|
-
│ 29 30"
|
|
668
|
+
│ 1 2 3 4 5
|
|
669
|
+
│ 6 7 8 9 10 11 12
|
|
670
|
+
│ 13 14 15 16 17 18 19
|
|
671
|
+
│ 20 21 22 23 24 25 26
|
|
672
|
+
│ 27 28 29 30 31"
|
|
673
673
|
`)
|
|
674
674
|
|
|
675
675
|
// Go back to username field
|
|
@@ -719,14 +719,14 @@ test('form navigation with shift+tab', async () => {
|
|
|
719
719
|
◇ Date of Birth
|
|
720
720
|
│
|
|
721
721
|
│ ← 2025 →
|
|
722
|
-
│ ←
|
|
722
|
+
│ ← October →
|
|
723
723
|
│
|
|
724
724
|
│ Mo Tu We Th Fr Sa Su
|
|
725
|
-
│
|
|
726
|
-
│ 8 9 10 11 12
|
|
727
|
-
│ 15 16 17 18 19
|
|
728
|
-
│ 22 23 24 25 26
|
|
729
|
-
│ 29 30"
|
|
725
|
+
│ 1 2 3 4 5
|
|
726
|
+
│ 6 7 8 9 10 11 12
|
|
727
|
+
│ 13 14 15 16 17 18 19
|
|
728
|
+
│ 20 21 22 23 24 25 26
|
|
729
|
+
│ 27 28 29 30 31"
|
|
730
730
|
`)
|
|
731
731
|
|
|
732
732
|
// Clear and type new username
|
|
@@ -777,14 +777,14 @@ test('form navigation with shift+tab', async () => {
|
|
|
777
777
|
◇ Date of Birth
|
|
778
778
|
│
|
|
779
779
|
│ ← 2025 →
|
|
780
|
-
│ ←
|
|
780
|
+
│ ← October →
|
|
781
781
|
│
|
|
782
782
|
│ Mo Tu We Th Fr Sa Su
|
|
783
|
-
│
|
|
784
|
-
│ 8 9 10 11 12
|
|
785
|
-
│ 15 16 17 18 19
|
|
786
|
-
│ 22 23 24 25 26
|
|
787
|
-
│ 29 30"
|
|
783
|
+
│ 1 2 3 4 5
|
|
784
|
+
│ 6 7 8 9 10 11 12
|
|
785
|
+
│ 13 14 15 16 17 18 19
|
|
786
|
+
│ 20 21 22 23 24 25 26
|
|
787
|
+
│ 27 28 29 30 31"
|
|
788
788
|
`)
|
|
789
789
|
}, 10000)
|
|
790
790
|
|
|
@@ -850,14 +850,14 @@ test('form dropdown navigation', async () => {
|
|
|
850
850
|
◆ Date of Birth
|
|
851
851
|
│
|
|
852
852
|
│ ← 2025 →
|
|
853
|
-
│ ←
|
|
853
|
+
│ ← October →
|
|
854
854
|
│
|
|
855
855
|
│ Mo Tu We Th Fr Sa Su
|
|
856
|
-
│
|
|
857
|
-
│ 8 9 10 11 12
|
|
858
|
-
│ 15 16 17 18 19
|
|
859
|
-
│ 22 23 24 25 26
|
|
860
|
-
│ 29 30"
|
|
856
|
+
│ 1 2 3 4 5
|
|
857
|
+
│ 6 7 8 9 10 11 12
|
|
858
|
+
│ 13 14 15 16 17 18 19
|
|
859
|
+
│ 20 21 22 23 24 25 26
|
|
860
|
+
│ 27 28 29 30 31"
|
|
861
861
|
`)
|
|
862
862
|
|
|
863
863
|
// Navigate down in dropdown
|
|
@@ -907,14 +907,14 @@ test('form dropdown navigation', async () => {
|
|
|
907
907
|
◆ Date of Birth
|
|
908
908
|
│
|
|
909
909
|
│ ← 2025 →
|
|
910
|
-
│ ←
|
|
910
|
+
│ ← October →
|
|
911
911
|
│
|
|
912
912
|
│ Mo Tu We Th Fr Sa Su
|
|
913
|
-
│
|
|
914
|
-
│ 8 9 10 11 12
|
|
915
|
-
│ 15 16 17 18 19
|
|
916
|
-
│ 22 23 24 25 26
|
|
917
|
-
│ 29 30"
|
|
913
|
+
│ 1 2 3 4 5
|
|
914
|
+
│ 6 7 8 9 10 11 12
|
|
915
|
+
│ 13 14 15 16 17 18 19
|
|
916
|
+
│ 20 21 22 23 24 25 26
|
|
917
|
+
│ 27 28 29 30 31"
|
|
918
918
|
`)
|
|
919
919
|
|
|
920
920
|
// Navigate to Europe section
|
|
@@ -966,14 +966,14 @@ test('form dropdown navigation', async () => {
|
|
|
966
966
|
◆ Date of Birth
|
|
967
967
|
│
|
|
968
968
|
│ ← 2025 →
|
|
969
|
-
│ ←
|
|
969
|
+
│ ← October →
|
|
970
970
|
│
|
|
971
971
|
│ Mo Tu We Th Fr Sa Su
|
|
972
|
-
│
|
|
973
|
-
│ 8 9 10 11 12
|
|
974
|
-
│ 15 16 17 18 19
|
|
975
|
-
│ 22 23 24 25 26
|
|
976
|
-
│ 29 30"
|
|
972
|
+
│ 1 2 3 4 5
|
|
973
|
+
│ 6 7 8 9 10 11 12
|
|
974
|
+
│ 13 14 15 16 17 18 19
|
|
975
|
+
│ 20 21 22 23 24 25 26
|
|
976
|
+
│ 27 28 29 30 31"
|
|
977
977
|
`)
|
|
978
978
|
|
|
979
979
|
// Select France
|
|
@@ -1023,13 +1023,13 @@ test('form dropdown navigation', async () => {
|
|
|
1023
1023
|
◆ Date of Birth
|
|
1024
1024
|
│
|
|
1025
1025
|
│ ← 2025 →
|
|
1026
|
-
│ ←
|
|
1026
|
+
│ ← October →
|
|
1027
1027
|
│
|
|
1028
1028
|
│ Mo Tu We Th Fr Sa Su
|
|
1029
|
-
│
|
|
1030
|
-
│ 8 9 10 11 12
|
|
1031
|
-
│ 15 16 17 18 19
|
|
1032
|
-
│ 22 23 24 25 26
|
|
1033
|
-
│ 29 30"
|
|
1029
|
+
│ 1 2 3 4 5
|
|
1030
|
+
│ 6 7 8 9 10 11 12
|
|
1031
|
+
│ 13 14 15 16 17 18 19
|
|
1032
|
+
│ 20 21 22 23 24 25 26
|
|
1033
|
+
│ 27 28 29 30 31"
|
|
1034
1034
|
`)
|
|
1035
1035
|
}, 10000)
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { renderWithProviders } from 'termcast'
|
|
3
|
+
import { useKeyboard } from '@opentui/react'
|
|
4
|
+
import { fg, bold } from '@opentui/core'
|
|
5
|
+
import { ScrollBox } from 'termcast/src/internal/scrollbox'
|
|
6
|
+
|
|
7
|
+
function SimpleScrollBoxDemo(): any {
|
|
8
|
+
useKeyboard((evt) => {
|
|
9
|
+
if (evt.name === 'q' || evt.name === 'escape') {
|
|
10
|
+
process.exit(0)
|
|
11
|
+
}
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
const colors = [
|
|
15
|
+
'#e06c75',
|
|
16
|
+
'#98c379',
|
|
17
|
+
'#e5c07b',
|
|
18
|
+
'#61afef',
|
|
19
|
+
'#c678dd',
|
|
20
|
+
'#56b6c2',
|
|
21
|
+
'#abb2bf',
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<box flexDirection="column" width="100%" height="100%">
|
|
26
|
+
<box padding={1} backgroundColor="#282c34">
|
|
27
|
+
<text>{bold(fg('#61afef')('Simple ScrollBox Demo'))}</text>
|
|
28
|
+
</box>
|
|
29
|
+
|
|
30
|
+
<ScrollBox focused flexGrow={1} flexShrink={1}>
|
|
31
|
+
{Array.from({ length: 30 }, (_, i) => (
|
|
32
|
+
<box
|
|
33
|
+
key={i}
|
|
34
|
+
padding={1}
|
|
35
|
+
backgroundColor={colors[i % colors.length]}
|
|
36
|
+
marginBottom={1}
|
|
37
|
+
>
|
|
38
|
+
<text fg="#282c34">
|
|
39
|
+
{bold(`Item ${i + 1}`)} - This is content for item number {i + 1}.
|
|
40
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
|
41
|
+
</text>
|
|
42
|
+
</box>
|
|
43
|
+
))}
|
|
44
|
+
</ScrollBox>
|
|
45
|
+
|
|
46
|
+
<box padding={1} backgroundColor="#282c34">
|
|
47
|
+
<text fg="#abb2bf">Use mouse scroll or arrow keys | Press [q] to quit</text>
|
|
48
|
+
</box>
|
|
49
|
+
</box>
|
|
50
|
+
)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (import.meta.main) {
|
|
54
|
+
renderWithProviders(<SimpleScrollBoxDemo />)
|
|
55
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { expect, test } from 'vitest'
|
|
2
|
+
import { NodeTuiDriver } from 'termcast/src/e2e-node'
|
|
3
|
+
|
|
4
|
+
test('simple scrollbox navigation and scrolling', async () => {
|
|
5
|
+
const driver = new NodeTuiDriver('bun', ['src/examples/internal/simple-scrollbox.tsx'])
|
|
6
|
+
|
|
7
|
+
await driver.text({
|
|
8
|
+
waitFor: (text) => text.includes('Simple ScrollBox Demo'),
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
const initialText = await driver.text()
|
|
12
|
+
expect(initialText).toMatchInlineSnapshot(`
|
|
13
|
+
"
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
Simple ScrollBox Demo
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
Item 1 - This is content for item number 1. Lorem ipsum dolor sit amet, cons
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
Item 2 - This is content for item number 2. Lorem ipsum dolor sit amet, cons
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
Item 3 - This is content for item number 3. Lorem ipsum dolor sit amet, cons
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
Item 4 - This is content for item number 4. Lorem ipsum dolor sit amet, cons
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
Item 5 - This is content for item number 5. Lorem ipsum dolor sit amet, cons"
|
|
36
|
+
`)
|
|
37
|
+
|
|
38
|
+
await driver.scrollDown(3)
|
|
39
|
+
const afterScrollDown = await driver.text()
|
|
40
|
+
expect(afterScrollDown).toMatchInlineSnapshot(`
|
|
41
|
+
"
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
Simple ScrollBox Demo
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
Item 2 - This is content for item number 2. Lorem ipsum dolor sit amet, cons
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
Item 3 - This is content for item number 3. Lorem ipsum dolor sit amet, cons
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
Item 4 - This is content for item number 4. Lorem ipsum dolor sit amet, cons
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
Item 5 - This is content for item number 5. Lorem ipsum dolor sit amet, cons"
|
|
62
|
+
`)
|
|
63
|
+
|
|
64
|
+
await driver.scrollUp(2)
|
|
65
|
+
const afterScrollUp = await driver.text()
|
|
66
|
+
expect(afterScrollUp).toMatchInlineSnapshot(`
|
|
67
|
+
"
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
Simple ScrollBox Demo
|
|
71
|
+
|
|
72
|
+
Item 1 - This is content for item number 1. Lorem ipsum dolor sit amet, cons
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
Item 2 - This is content for item number 2. Lorem ipsum dolor sit amet, cons
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
Item 3 - This is content for item number 3. Lorem ipsum dolor sit amet, cons
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
Item 4 - This is content for item number 4. Lorem ipsum dolor sit amet, cons
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
Item 5 - This is content for item number 5. Lorem ipsum dolor sit amet, cons"
|
|
89
|
+
`)
|
|
90
|
+
|
|
91
|
+
await driver.keys.escape()
|
|
92
|
+
|
|
93
|
+
driver.dispose()
|
|
94
|
+
}, 30000)
|
|
@@ -3,7 +3,7 @@ import { render } from '@opentui/react'
|
|
|
3
3
|
import List from 'termcast'
|
|
4
4
|
import { Action, ActionPanel } from 'termcast'
|
|
5
5
|
import { useNavigation } from 'termcast/src/internal/navigation'
|
|
6
|
-
import {
|
|
6
|
+
import { TermcastProvider } from 'termcast/src/internal/providers'
|
|
7
7
|
|
|
8
8
|
function ThirdLevel({ path }: { path: string[] }): any {
|
|
9
9
|
const { pop } = useNavigation()
|
|
@@ -109,9 +109,9 @@ function FirstLevel(): any {
|
|
|
109
109
|
|
|
110
110
|
function App(): any {
|
|
111
111
|
return (
|
|
112
|
-
<
|
|
112
|
+
<TermcastProvider>
|
|
113
113
|
<FirstLevel />
|
|
114
|
-
</
|
|
114
|
+
</TermcastProvider>
|
|
115
115
|
)
|
|
116
116
|
}
|
|
117
117
|
|
|
@@ -26,7 +26,7 @@ test('file picker with autocomplete', async () => {
|
|
|
26
26
|
expect(initialSnapshot).toMatchInlineSnapshot(`
|
|
27
27
|
"
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
◇ Your Name
|
|
30
30
|
│ John Doe
|
|
31
31
|
◇ Select Files
|
|
32
32
|
│ Enter file path...
|
|
@@ -156,16 +156,16 @@ test('file picker with autocomplete', async () => {
|
|
|
156
156
|
◆ Select Folder
|
|
157
157
|
│ /tmp/
|
|
158
158
|
│ ┌─────────────────────────────────────────────────────────────┐
|
|
159
|
-
│ │ 📁 bunx-501
|
|
160
|
-
◇
|
|
161
|
-
│
|
|
162
|
-
│
|
|
163
|
-
│ │
|
|
164
|
-
└ │ 📁
|
|
165
|
-
│ 📁
|
|
166
|
-
│
|
|
167
|
-
↵
|
|
168
|
-
|
|
159
|
+
│ │ 📁 bunx-501-create-tui@latest │
|
|
160
|
+
◇ SelectoSingleeFilenchd.dhqoLtU5Bo │
|
|
161
|
+
│ Enternfilecpath...cache │
|
|
162
|
+
│ Chooseoexactly one file │
|
|
163
|
+
│ │ tmp-mount-4o6LgO │
|
|
164
|
+
└ │ 📁 tmp-mount-oUF2pm │
|
|
165
|
+
│ 📁 tmp-mount-qehfhV │
|
|
166
|
+
│ tmp-mount-V0riCs │
|
|
167
|
+
↵ submitdob↑↓Pnavigatelog^k─actions─────────────────────────────┘
|
|
168
|
+
📄 com.adobe.AdobeIPCBroker.ctrl-morse"
|
|
169
169
|
`)
|
|
170
170
|
|
|
171
171
|
// Test ~ home directory expansion
|
|
@@ -225,16 +225,16 @@ test('file picker keyboard navigation', async () => {
|
|
|
225
225
|
|
|
226
226
|
◇ Your Name
|
|
227
227
|
│ John Doe
|
|
228
|
-
|
|
229
|
-
│ Enter file path...
|
|
230
|
-
│ Choose one or more files to upload
|
|
231
|
-
│
|
|
232
|
-
◆ Select Folder
|
|
228
|
+
◆ Select Files
|
|
233
229
|
│ .
|
|
234
230
|
│ ┌─────────────────────────────────────────────────────────────┐
|
|
235
231
|
│ │ 📁 .termcast-bundle │
|
|
236
|
-
◇
|
|
232
|
+
◇ SelectgFolderre │
|
|
237
233
|
│ Enter─file─path...────────────────────────────────────────────┘
|
|
234
|
+
│ Choose a folder for output
|
|
235
|
+
│
|
|
236
|
+
◇ Select Single File
|
|
237
|
+
│ Enter file path...
|
|
238
238
|
│ Choose exactly one file
|
|
239
239
|
│
|
|
240
240
|
└
|
|
@@ -252,12 +252,12 @@ test('file picker keyboard navigation', async () => {
|
|
|
252
252
|
|
|
253
253
|
◇ Your Name
|
|
254
254
|
│ John Doe
|
|
255
|
-
|
|
256
|
-
│
|
|
255
|
+
◆ Select Files
|
|
256
|
+
│ .
|
|
257
257
|
│ Choose one or more files to upload
|
|
258
258
|
│
|
|
259
|
-
|
|
260
|
-
│
|
|
259
|
+
◇ Select Folder
|
|
260
|
+
│ Enter file path...
|
|
261
261
|
│ Choose a folder for output
|
|
262
262
|
│
|
|
263
263
|
◇ Select Single File
|
|
@@ -286,12 +286,12 @@ test('file picker keyboard navigation', async () => {
|
|
|
286
286
|
|
|
287
287
|
◇ Your Name
|
|
288
288
|
│ John Doe
|
|
289
|
-
|
|
290
|
-
│
|
|
289
|
+
◆ Select Files
|
|
290
|
+
│ .s
|
|
291
291
|
│ Choose one or more files to upload
|
|
292
292
|
│
|
|
293
|
-
|
|
294
|
-
│
|
|
293
|
+
◇ Select Folder
|
|
294
|
+
│ Enter file path...
|
|
295
295
|
│ Choose a folder for output
|
|
296
296
|
│
|
|
297
297
|
◇ Select Single File
|
|
@@ -39,6 +39,47 @@ const App: any = () => {
|
|
|
39
39
|
keywords={['second', 'two', 'secondary']}
|
|
40
40
|
id='item2'
|
|
41
41
|
/>
|
|
42
|
+
{Array.from({ length: 100 }).map((_, i) => (
|
|
43
|
+
<List.Item
|
|
44
|
+
key={`random${i + 1}`}
|
|
45
|
+
title={`Random Item #${i + 1}`}
|
|
46
|
+
subtitle={`This is randomly generated item ${i + 1}`}
|
|
47
|
+
keywords={[
|
|
48
|
+
`random`,
|
|
49
|
+
`${(i + 1) * 7}`,
|
|
50
|
+
`foo${(i % 5) + 1}`,
|
|
51
|
+
`bar${Math.floor(Math.random() * 50)}`,
|
|
52
|
+
]}
|
|
53
|
+
id={`random-item-${i + 1}`}
|
|
54
|
+
actions={
|
|
55
|
+
i % 3 === 0 ? (
|
|
56
|
+
<ActionPanel>
|
|
57
|
+
<Action
|
|
58
|
+
title='Show Details'
|
|
59
|
+
onAction={() =>
|
|
60
|
+
push(
|
|
61
|
+
<Detail
|
|
62
|
+
markdown={dedent`
|
|
63
|
+
# Random Item #${i + 1}
|
|
64
|
+
|
|
65
|
+
This is a dynamically generated random item.
|
|
66
|
+
|
|
67
|
+
- **Index:** ${i + 1}
|
|
68
|
+
- **Random Keyword:** bar${Math.floor(Math.random() * 99)}
|
|
69
|
+
- **UUID:** random-item-${i + 1}
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
_Fun fact: Number ${((i + 1) * 13) % 97} is "randomized"!_
|
|
73
|
+
`}
|
|
74
|
+
/>,
|
|
75
|
+
)
|
|
76
|
+
}
|
|
77
|
+
/>
|
|
78
|
+
</ActionPanel>
|
|
79
|
+
) : undefined
|
|
80
|
+
}
|
|
81
|
+
/>
|
|
82
|
+
))}
|
|
42
83
|
<List.Item
|
|
43
84
|
title='Third Item'
|
|
44
85
|
subtitle='This is the third item'
|
|
@@ -3,7 +3,7 @@ import { render } from '@opentui/react'
|
|
|
3
3
|
import List from 'termcast'
|
|
4
4
|
import { Action, ActionPanel } from 'termcast'
|
|
5
5
|
import { useNavigation } from 'termcast/src/internal/navigation'
|
|
6
|
-
import {
|
|
6
|
+
import { TermcastProvider } from 'termcast/src/internal/providers'
|
|
7
7
|
|
|
8
8
|
function DetailView({ title }: { title: string }): any {
|
|
9
9
|
const { pop } = useNavigation()
|
|
@@ -80,9 +80,9 @@ function MainView(): any {
|
|
|
80
80
|
|
|
81
81
|
function App(): any {
|
|
82
82
|
return (
|
|
83
|
-
<
|
|
83
|
+
<TermcastProvider>
|
|
84
84
|
<MainView />
|
|
85
|
-
</
|
|
85
|
+
</TermcastProvider>
|
|
86
86
|
)
|
|
87
87
|
}
|
|
88
88
|
|