termcast 1.3.32 → 1.3.34
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.d.ts.map +1 -1
- package/dist/action-utils.js +8 -0
- package/dist/action-utils.js.map +1 -1
- package/dist/apis/cache.d.ts +1 -2
- package/dist/apis/cache.d.ts.map +1 -1
- package/dist/apis/cache.js +138 -54
- package/dist/apis/cache.js.map +1 -1
- package/dist/apis/clipboard.d.ts.map +1 -1
- package/dist/apis/clipboard.js +4 -0
- package/dist/apis/clipboard.js.map +1 -1
- package/dist/apis/oauth.d.ts.map +1 -1
- package/dist/apis/oauth.js +31 -4
- package/dist/apis/oauth.js.map +1 -1
- package/dist/build.d.ts +0 -1
- package/dist/build.d.ts.map +1 -1
- package/dist/build.js +30 -51
- package/dist/build.js.map +1 -1
- package/dist/cli.js +31 -14
- package/dist/cli.js.map +1 -1
- package/dist/compile.d.ts.map +1 -1
- package/dist/compile.js +5 -1
- package/dist/compile.js.map +1 -1
- package/dist/components/actions.d.ts +14 -0
- package/dist/components/actions.d.ts.map +1 -1
- package/dist/components/actions.js +151 -59
- package/dist/components/actions.js.map +1 -1
- package/dist/components/alert.d.ts.map +1 -1
- package/dist/components/alert.js +6 -5
- package/dist/components/alert.js.map +1 -1
- package/dist/components/animation-tick.d.ts +1 -1
- package/dist/components/animation-tick.js +1 -1
- package/dist/components/animation-tick.js.map +1 -1
- package/dist/components/detail.d.ts +5 -31
- package/dist/components/detail.d.ts.map +1 -1
- package/dist/components/detail.js +36 -52
- 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 +50 -22
- package/dist/components/dropdown.js.map +1 -1
- package/dist/components/footer.d.ts.map +1 -1
- package/dist/components/footer.js +19 -18
- package/dist/components/footer.js.map +1 -1
- package/dist/components/form/checkbox.d.ts.map +1 -1
- package/dist/components/form/checkbox.js +12 -11
- package/dist/components/form/checkbox.js.map +1 -1
- package/dist/components/form/date-picker.d.ts.map +1 -1
- package/dist/components/form/date-picker.js +7 -22
- package/dist/components/form/date-picker.js.map +1 -1
- package/dist/components/form/description.d.ts +1 -1
- package/dist/components/form/description.d.ts.map +1 -1
- package/dist/components/form/description.js +6 -5
- package/dist/components/form/description.js.map +1 -1
- package/dist/components/form/dropdown.d.ts.map +1 -1
- package/dist/components/form/dropdown.js +53 -50
- package/dist/components/form/dropdown.js.map +1 -1
- package/dist/components/form/file-autocomplete.d.ts.map +1 -1
- package/dist/components/form/file-autocomplete.js +5 -4
- package/dist/components/form/file-autocomplete.js.map +1 -1
- package/dist/components/form/file-picker.d.ts.map +1 -1
- package/dist/components/form/file-picker.js +23 -22
- package/dist/components/form/file-picker.js.map +1 -1
- package/dist/components/form/form-end.d.ts.map +1 -1
- package/dist/components/form/form-end.js +6 -4
- package/dist/components/form/form-end.js.map +1 -1
- package/dist/components/form/form-field-wrapper.d.ts +15 -0
- package/dist/components/form/form-field-wrapper.d.ts.map +1 -0
- package/dist/components/form/form-field-wrapper.js +29 -0
- package/dist/components/form/form-field-wrapper.js.map +1 -0
- package/dist/components/form/index.d.ts.map +1 -1
- package/dist/components/form/index.js +31 -30
- package/dist/components/form/index.js.map +1 -1
- package/dist/components/form/password-field.d.ts.map +1 -1
- package/dist/components/form/password-field.js +7 -6
- package/dist/components/form/password-field.js.map +1 -1
- package/dist/components/form/separator.d.ts.map +1 -1
- package/dist/components/form/separator.js +3 -2
- package/dist/components/form/separator.js.map +1 -1
- package/dist/components/form/tagpicker.d.ts.map +1 -1
- package/dist/components/form/tagpicker.js +2 -1
- package/dist/components/form/tagpicker.js.map +1 -1
- package/dist/components/form/text-area.d.ts.map +1 -1
- package/dist/components/form/text-area.js +7 -6
- package/dist/components/form/text-area.js.map +1 -1
- package/dist/components/form/text-field.d.ts.map +1 -1
- package/dist/components/form/text-field.js +7 -6
- package/dist/components/form/text-field.js.map +1 -1
- package/dist/components/form/use-form-navigation.d.ts.map +1 -1
- package/dist/components/form/use-form-navigation.js +4 -4
- package/dist/components/form/use-form-navigation.js.map +1 -1
- package/dist/components/form/with-left-border.d.ts +15 -0
- package/dist/components/form/with-left-border.d.ts.map +1 -1
- package/dist/components/form/with-left-border.js +21 -9
- package/dist/components/form/with-left-border.js.map +1 -1
- package/dist/components/icon.d.ts +14 -0
- package/dist/components/icon.d.ts.map +1 -1
- package/dist/components/icon.js +60 -0
- package/dist/components/icon.js.map +1 -1
- package/dist/components/image.d.ts +47 -2
- package/dist/components/image.d.ts.map +1 -1
- package/dist/components/image.js +46 -7
- package/dist/components/image.js.map +1 -1
- package/dist/components/list.d.ts +5 -0
- package/dist/components/list.d.ts.map +1 -1
- package/dist/components/list.js +188 -132
- package/dist/components/list.js.map +1 -1
- package/dist/components/loading-bar.d.ts.map +1 -1
- package/dist/components/loading-bar.js +4 -3
- package/dist/components/loading-bar.js.map +1 -1
- package/dist/components/metadata.d.ts +70 -0
- package/dist/components/metadata.d.ts.map +1 -0
- package/dist/components/metadata.js +82 -0
- package/dist/components/metadata.js.map +1 -0
- package/dist/components/theme-picker.d.ts.map +1 -1
- package/dist/components/theme-picker.js +3 -2
- package/dist/components/theme-picker.js.map +1 -1
- package/dist/descendants-v2.d.ts +60 -0
- package/dist/descendants-v2.d.ts.map +1 -0
- package/dist/descendants-v2.js +144 -0
- package/dist/descendants-v2.js.map +1 -0
- package/dist/examples/actions-context.d.ts +2 -0
- package/dist/examples/actions-context.d.ts.map +1 -0
- package/dist/examples/actions-context.js +33 -0
- package/dist/examples/actions-context.js.map +1 -0
- package/dist/examples/form-basic.d.ts.map +1 -1
- package/dist/examples/form-basic.js +1 -1
- package/dist/examples/form-basic.js.map +1 -1
- package/dist/examples/form-dropdown.js +1 -1
- package/dist/examples/form-dropdown.js.map +1 -1
- package/dist/examples/internal/custom-action-renderables.d.ts +70 -0
- package/dist/examples/internal/custom-action-renderables.d.ts.map +1 -0
- package/dist/examples/internal/custom-action-renderables.js +163 -0
- package/dist/examples/internal/custom-action-renderables.js.map +1 -0
- package/dist/examples/internal/custom-dropdown.d.ts +99 -0
- package/dist/examples/internal/custom-dropdown.d.ts.map +1 -0
- package/dist/examples/internal/custom-dropdown.js +270 -0
- package/dist/examples/internal/custom-dropdown.js.map +1 -0
- package/dist/examples/internal/custom-renderable-form.d.ts +43 -0
- package/dist/examples/internal/custom-renderable-form.d.ts.map +1 -0
- package/dist/examples/internal/custom-renderable-form.js +284 -0
- package/dist/examples/internal/custom-renderable-form.js.map +1 -0
- package/dist/examples/internal/custom-renderable-list-default-search.d.ts +2 -0
- package/dist/examples/internal/custom-renderable-list-default-search.d.ts.map +1 -0
- package/dist/examples/internal/custom-renderable-list-default-search.js +16 -0
- package/dist/examples/internal/custom-renderable-list-default-search.js.map +1 -0
- package/dist/examples/internal/custom-renderable-list-v2-default-search.d.ts +2 -0
- package/dist/examples/internal/custom-renderable-list-v2-default-search.d.ts.map +1 -0
- package/dist/examples/internal/custom-renderable-list-v2-default-search.js +24 -0
- package/dist/examples/internal/custom-renderable-list-v2-default-search.js.map +1 -0
- package/dist/examples/internal/custom-renderable-list-v2.d.ts +189 -0
- package/dist/examples/internal/custom-renderable-list-v2.d.ts.map +1 -0
- package/dist/examples/internal/custom-renderable-list-v2.js +708 -0
- package/dist/examples/internal/custom-renderable-list-v2.js.map +1 -0
- package/dist/examples/internal/custom-renderable-list.d.ts +72 -0
- package/dist/examples/internal/custom-renderable-list.d.ts.map +1 -0
- package/dist/examples/internal/custom-renderable-list.js +544 -0
- package/dist/examples/internal/custom-renderable-list.js.map +1 -0
- package/dist/examples/internal/rhf-custom-ref.js +5 -4
- package/dist/examples/internal/rhf-custom-ref.js.map +1 -1
- package/dist/examples/internal/scrollbox-with-descendants.js +4 -2
- package/dist/examples/internal/scrollbox-with-descendants.js.map +1 -1
- package/dist/examples/list-controlled-search.d.ts +2 -0
- package/dist/examples/list-controlled-search.d.ts.map +1 -0
- package/dist/examples/list-controlled-search.js +12 -0
- package/dist/examples/list-controlled-search.js.map +1 -0
- package/dist/examples/list-detail-metadata.js +1 -1
- package/dist/examples/list-detail-metadata.js.map +1 -1
- package/dist/examples/simple-image-mask.d.ts +8 -0
- package/dist/examples/simple-image-mask.d.ts.map +1 -0
- package/dist/examples/simple-image-mask.js +12 -0
- package/dist/examples/simple-image-mask.js.map +1 -0
- package/dist/examples/toast-variations.js +1 -1
- package/dist/examples/toast-variations.js.map +1 -1
- package/dist/extensions/dev.d.ts.map +1 -1
- package/dist/extensions/dev.js +3 -2
- package/dist/extensions/dev.js.map +1 -1
- package/dist/extensions/react-refresh-init.d.ts.map +1 -1
- package/dist/extensions/react-refresh-init.js +4 -3
- package/dist/extensions/react-refresh-init.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- 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 +2 -1
- package/dist/internal/date-picker-widget.js.map +1 -1
- package/dist/internal/dialog.d.ts +6 -0
- package/dist/internal/dialog.d.ts.map +1 -1
- package/dist/internal/dialog.js +59 -18
- package/dist/internal/dialog.js.map +1 -1
- package/dist/internal/navigation.d.ts.map +1 -1
- package/dist/internal/navigation.js +8 -1
- package/dist/internal/navigation.js.map +1 -1
- package/dist/internal/offscreen.d.ts +3 -0
- package/dist/internal/offscreen.d.ts.map +1 -1
- package/dist/internal/offscreen.js +5 -0
- package/dist/internal/offscreen.js.map +1 -1
- package/dist/internal/providers.d.ts.map +1 -1
- package/dist/internal/providers.js +20 -3
- package/dist/internal/providers.js.map +1 -1
- package/dist/internal/scrollbox.d.ts.map +1 -1
- package/dist/internal/scrollbox.js +3 -2
- package/dist/internal/scrollbox.js.map +1 -1
- package/dist/logger.d.ts.map +1 -1
- package/dist/logger.js +4 -0
- package/dist/logger.js.map +1 -1
- package/dist/preload.js +5 -17
- package/dist/preload.js.map +1 -1
- package/dist/state.d.ts +4 -0
- package/dist/state.d.ts.map +1 -1
- package/dist/state.js +4 -0
- package/dist/state.js.map +1 -1
- package/dist/test-border-overlay.d.ts +2 -0
- package/dist/test-border-overlay.d.ts.map +1 -0
- package/dist/test-border-overlay.js +7 -0
- package/dist/test-border-overlay.js.map +1 -0
- package/dist/test-layout-2.d.ts +2 -0
- package/dist/test-layout-2.d.ts.map +1 -0
- package/dist/test-layout-2.js +5 -0
- package/dist/test-layout-2.js.map +1 -0
- package/dist/test-layout.d.ts +2 -0
- package/dist/test-layout.d.ts.map +1 -0
- package/dist/test-layout.js +7 -0
- package/dist/test-layout.js.map +1 -0
- package/dist/theme.d.ts +1 -2
- package/dist/theme.d.ts.map +1 -1
- package/dist/theme.js +5 -9
- package/dist/theme.js.map +1 -1
- package/dist/utils/run-command.d.ts +1 -1
- package/dist/utils/run-command.d.ts.map +1 -1
- package/dist/utils/run-command.js +27 -7
- package/dist/utils/run-command.js.map +1 -1
- package/dist/utils.d.ts +1 -0
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +44 -23
- package/dist/utils.js.map +1 -1
- package/dist/watcher.d.ts.map +1 -1
- package/dist/watcher.js +24 -4
- package/dist/watcher.js.map +1 -1
- package/package.json +14 -12
- package/src/action-utils.tsx +10 -0
- package/src/apis/cache.test.ts +35 -3
- package/src/apis/cache.tsx +184 -59
- package/src/apis/clipboard.tsx +5 -0
- package/src/apis/oauth.tsx +33 -4
- package/src/build.tsx +35 -58
- package/src/cli.tsx +156 -134
- package/src/compile.tsx +6 -3
- package/src/compile.vitest.tsx +33 -15
- package/src/components/actions.tsx +230 -99
- package/src/components/alert.tsx +11 -10
- package/src/components/animation-tick.tsx +1 -1
- package/src/components/detail.tsx +56 -151
- package/src/components/dropdown.tsx +70 -36
- package/src/components/footer.tsx +58 -33
- package/src/components/form/checkbox.tsx +30 -32
- package/src/components/form/date-picker.tsx +27 -47
- package/src/components/form/description.tsx +19 -18
- package/src/components/form/dropdown.tsx +95 -103
- package/src/components/form/file-autocomplete.tsx +9 -8
- package/src/components/form/file-picker.tsx +46 -46
- package/src/components/form/form-end.tsx +6 -4
- package/src/components/form/index.tsx +38 -48
- package/src/components/form/password-field.tsx +25 -27
- package/src/components/form/separator.tsx +3 -2
- package/src/components/form/tagpicker.tsx +2 -1
- package/src/components/form/text-area.tsx +25 -30
- package/src/components/form/text-field.tsx +25 -27
- package/src/components/form/use-form-navigation.tsx +4 -5
- package/src/components/form/with-left-border.tsx +48 -10
- package/src/components/icon.tsx +69 -0
- package/src/components/image.tsx +60 -7
- package/src/components/list.tsx +270 -202
- package/src/components/loading-bar.tsx +4 -3
- package/src/components/metadata.tsx +217 -0
- package/src/components/theme-picker.tsx +3 -2
- package/src/examples/actions-context.tsx +63 -0
- package/src/examples/actions-context.vitest.tsx +110 -0
- package/src/examples/actions-dialog-layout.vitest.tsx +2 -1
- package/src/examples/file-autocomplete.vitest.tsx +15 -15
- package/src/examples/form-basic.tsx +12 -0
- package/src/examples/form-basic.vitest.tsx +74 -74
- package/src/examples/form-dropdown.tsx +8 -0
- package/src/examples/form-dropdown.vitest.tsx +364 -421
- package/src/examples/form-tagpicker.vitest.tsx +56 -54
- package/src/examples/github.vitest.tsx +252 -0
- package/src/examples/internal/rhf-custom-ref.tsx +16 -15
- package/src/examples/internal/scrollbox-with-descendants.tsx +4 -2
- package/src/examples/internal/simple-dialog.tsx +1 -1
- package/src/examples/internal/simple-scrollbox.vitest.tsx +14 -9
- package/src/examples/list-controlled-search.tsx +28 -0
- package/src/examples/list-controlled-search.vitest.tsx +49 -0
- package/src/examples/list-detail-metadata.tsx +8 -5
- package/src/examples/list-detail-metadata.vitest.tsx +22 -22
- package/src/examples/list-dropdown-default.vitest.tsx +12 -12
- package/src/examples/list-scrollbox.vitest.tsx +52 -38
- package/src/examples/list-with-detail.vitest.tsx +45 -41
- package/src/examples/list-with-dropdown.vitest.tsx +5 -5
- package/src/examples/list-with-sections.vitest.tsx +65 -12
- package/src/examples/list-with-toast.vitest.tsx +4 -4
- package/src/examples/simple-file-picker.vitest.tsx +12 -12
- package/src/examples/simple-grid.vitest.tsx +53 -53
- package/src/examples/simple-image-mask.tsx +58 -0
- package/src/examples/simple-navigation.vitest.tsx +19 -19
- package/src/examples/store.vitest.tsx +1 -1
- package/src/examples/swift-extension.vitest.tsx +4 -2
- package/src/examples/synonyms.vitest.tsx +31 -9
- package/src/examples/toast-action.vitest.tsx +8 -8
- package/src/examples/toast-variations.tsx +1 -1
- package/src/examples/toast-variations.vitest.tsx +69 -134
- package/src/extensions/dev.tsx +3 -2
- package/src/extensions/dev.vitest.tsx +65 -28
- package/src/extensions/react-refresh-init.tsx +4 -3
- package/src/index.tsx +3 -1
- package/src/internal/date-picker-widget.tsx +2 -1
- package/src/internal/dialog.tsx +100 -28
- package/src/internal/navigation.tsx +8 -1
- package/src/internal/offscreen.tsx +10 -0
- package/src/internal/providers.tsx +34 -8
- package/src/internal/scrollbox.tsx +4 -2
- package/src/logger.tsx +4 -0
- package/src/preload.tsx +5 -17
- package/src/state.tsx +12 -0
- package/src/theme.tsx +6 -9
- package/src/utils/run-command.tsx +32 -8
- package/src/utils.tsx +58 -23
- package/src/watcher.tsx +26 -6
|
@@ -39,7 +39,7 @@ test('list with detail view display and navigation', async () => {
|
|
|
39
39
|
|
|
40
40
|
›bulbasaur #001
|
|
41
41
|
ivysaur #002 │ bulbasaur ▲
|
|
42
|
-
charmander #004 │
|
|
42
|
+
charmander #004 │ █
|
|
43
43
|
charmeleon #005 │ Illustration
|
|
44
44
|
squirtle #007 │
|
|
45
45
|
wartortle #008 │ Types
|
|
@@ -52,11 +52,11 @@ test('list with detail view display and navigation', async () => {
|
|
|
52
52
|
│ Abilities
|
|
53
53
|
│ - Chlorophyll
|
|
54
54
|
│ - Overgrow
|
|
55
|
-
│ ─────────────────────────────────
|
|
56
55
|
│
|
|
57
|
-
│ Types:
|
|
58
56
|
│
|
|
59
|
-
│
|
|
57
|
+
│ Types
|
|
58
|
+
│
|
|
59
|
+
│ Grass
|
|
60
60
|
↵ toggle ↑↓ navigate ^k action│ ─────────────────
|
|
61
61
|
detail │ ▼
|
|
62
62
|
|
|
@@ -78,7 +78,7 @@ test('list with detail view display and navigation', async () => {
|
|
|
78
78
|
|
|
79
79
|
bulbasaur #001
|
|
80
80
|
›ivysaur #002 │ ivysaur ▲
|
|
81
|
-
charmander #004 │
|
|
81
|
+
charmander #004 │ █
|
|
82
82
|
charmeleon #005 │ Illustration
|
|
83
83
|
squirtle #007 │
|
|
84
84
|
wartortle #008 │ Types
|
|
@@ -91,11 +91,11 @@ test('list with detail view display and navigation', async () => {
|
|
|
91
91
|
│ Abilities
|
|
92
92
|
│ - Chlorophyll
|
|
93
93
|
│ - Overgrow
|
|
94
|
-
│ ─────────────────────────────────
|
|
95
94
|
│
|
|
96
|
-
│ Types:
|
|
97
95
|
│
|
|
98
|
-
│
|
|
96
|
+
│ Types
|
|
97
|
+
│
|
|
98
|
+
│ Grass
|
|
99
99
|
↵ toggle ↑↓ navigate ^k action│ ─────────────────
|
|
100
100
|
detail │ ▼
|
|
101
101
|
|
|
@@ -128,11 +128,11 @@ test('list with detail view display and navigation', async () => {
|
|
|
128
128
|
│ Abilities
|
|
129
129
|
│ - Blaze
|
|
130
130
|
│ - Solar Power
|
|
131
|
-
│ ─────────────────────────────────
|
|
132
131
|
│
|
|
133
|
-
│ Types:
|
|
134
132
|
│
|
|
135
|
-
│
|
|
133
|
+
│ Types
|
|
134
|
+
│
|
|
135
|
+
│ Fire
|
|
136
136
|
↵ toggle ↑↓ navigate ^k action│ ─────────────────
|
|
137
137
|
detail │ ▼
|
|
138
138
|
|
|
@@ -142,17 +142,21 @@ test('list with detail view display and navigation', async () => {
|
|
|
142
142
|
await session.press(['ctrl', 'k'])
|
|
143
143
|
|
|
144
144
|
const actionsSnapshot = await session.text()
|
|
145
|
+
// Fast feedback loop: fail if list/detail content leaks under the actions dialog
|
|
146
|
+
expect(actionsSnapshot).toContain('Actions')
|
|
147
|
+
expect(actionsSnapshot).not.toContain('charmander #004')
|
|
148
|
+
expect(actionsSnapshot).not.toContain('Illustration')
|
|
145
149
|
expect(actionsSnapshot).toMatchInlineSnapshot(`
|
|
146
150
|
"
|
|
147
151
|
|
|
148
152
|
|
|
149
|
-
Pokemon List ─────────────────────────────────────────────────────────────
|
|
150
153
|
|
|
151
|
-
> Search Pokemon...
|
|
152
154
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
156
160
|
╭──────────────────────────────────────────────────────────────────────────╮
|
|
157
161
|
│ │
|
|
158
162
|
│ Actions esc │
|
|
@@ -164,14 +168,14 @@ test('list with detail view display and navigation', async () => {
|
|
|
164
168
|
│ │
|
|
165
169
|
│ Settings │
|
|
166
170
|
│ Change Theme... │
|
|
167
|
-
│
|
|
171
|
+
│ See Console Logs │
|
|
168
172
|
│ │
|
|
169
173
|
│ │
|
|
170
174
|
│ ↵ select ↑↓ navigate │
|
|
171
175
|
│ │
|
|
172
176
|
╰──────────────────────────────────────────────────────────────────────────╯
|
|
173
|
-
|
|
174
|
-
|
|
177
|
+
|
|
178
|
+
|
|
175
179
|
|
|
176
180
|
"
|
|
177
181
|
`)
|
|
@@ -248,11 +252,11 @@ test('list with detail view display and navigation', async () => {
|
|
|
248
252
|
│ Abilities
|
|
249
253
|
│ - Blaze
|
|
250
254
|
│ - Solar Power
|
|
251
|
-
│ ─────────────────────────────────
|
|
252
255
|
│
|
|
253
|
-
│ Types:
|
|
254
256
|
│
|
|
255
|
-
│
|
|
257
|
+
│ Types
|
|
258
|
+
│
|
|
259
|
+
│ Fire
|
|
256
260
|
↵ toggle ↑↓ navigate ^k action│ ─────────────────
|
|
257
261
|
detail │ ▼
|
|
258
262
|
|
|
@@ -297,11 +301,11 @@ test('list detail view search functionality', async () => {
|
|
|
297
301
|
│ Abilities
|
|
298
302
|
│ - Blaze
|
|
299
303
|
│ - Solar Power
|
|
300
|
-
│ ─────────────────────────────────
|
|
301
304
|
│
|
|
302
|
-
│ Types:
|
|
303
305
|
│
|
|
304
|
-
│
|
|
306
|
+
│ Types
|
|
307
|
+
│
|
|
308
|
+
│ Fire
|
|
305
309
|
↵ toggle ↑↓ navigate ^k action│ ─────────────────
|
|
306
310
|
detail │ ▼
|
|
307
311
|
|
|
@@ -343,11 +347,11 @@ test('list detail view search functionality', async () => {
|
|
|
343
347
|
│ Abilities
|
|
344
348
|
│ - Torrent
|
|
345
349
|
│ - Rain Dish
|
|
346
|
-
│ ─────────────────────────────────
|
|
347
350
|
│
|
|
348
|
-
│ Types:
|
|
349
351
|
│
|
|
350
|
-
│
|
|
352
|
+
│ Types
|
|
353
|
+
│
|
|
354
|
+
│ Water
|
|
351
355
|
↵ toggle ↑↓ navigate ^k action│ ─────────────────
|
|
352
356
|
detail │ ▼
|
|
353
357
|
|
|
@@ -380,11 +384,11 @@ test('list detail view search functionality', async () => {
|
|
|
380
384
|
│ Abilities
|
|
381
385
|
│ - Torrent
|
|
382
386
|
│ - Rain Dish
|
|
383
|
-
│ ─────────────────────────────────
|
|
384
387
|
│
|
|
385
|
-
│ Types:
|
|
386
388
|
│
|
|
387
|
-
│
|
|
389
|
+
│ Types
|
|
390
|
+
│
|
|
391
|
+
│ Water
|
|
388
392
|
↵ toggle ↑↓ navigate ^k action│ ─────────────────
|
|
389
393
|
detail │ ▼
|
|
390
394
|
|
|
@@ -416,7 +420,7 @@ test('list detail metadata rendering', async () => {
|
|
|
416
420
|
|
|
417
421
|
›bulbasaur #001
|
|
418
422
|
ivysaur #002 │ bulbasaur ▲
|
|
419
|
-
charmander #004 │
|
|
423
|
+
charmander #004 │ █
|
|
420
424
|
charmeleon #005 │ Illustration
|
|
421
425
|
squirtle #007 │
|
|
422
426
|
wartortle #008 │ Types
|
|
@@ -429,11 +433,11 @@ test('list detail metadata rendering', async () => {
|
|
|
429
433
|
│ Abilities
|
|
430
434
|
│ - Chlorophyll
|
|
431
435
|
│ - Overgrow
|
|
432
|
-
│ ─────────────────────────────────
|
|
433
436
|
│
|
|
434
|
-
│ Types:
|
|
435
437
|
│
|
|
436
|
-
│
|
|
438
|
+
│ Types
|
|
439
|
+
│
|
|
440
|
+
│ Grass
|
|
437
441
|
↵ toggle ↑↓ navigate ^k action│ ─────────────────
|
|
438
442
|
detail │ ▼
|
|
439
443
|
|
|
@@ -473,11 +477,11 @@ test('list detail metadata rendering', async () => {
|
|
|
473
477
|
│ Abilities
|
|
474
478
|
│ - Torrent
|
|
475
479
|
│ - Rain Dish
|
|
476
|
-
│ ─────────────────────────────────
|
|
477
480
|
│
|
|
478
|
-
│ Types:
|
|
479
481
|
│
|
|
480
|
-
│
|
|
482
|
+
│ Types
|
|
483
|
+
│
|
|
484
|
+
│ Water
|
|
481
485
|
↵ toggle ↑↓ navigate ^k action│ ─────────────────
|
|
482
486
|
detail │ ▼
|
|
483
487
|
|
|
@@ -532,6 +536,9 @@ test('list with detail layout consistency - short vs long detail content', async
|
|
|
532
536
|
Another Item │
|
|
533
537
|
│ This is short.
|
|
534
538
|
│
|
|
539
|
+
│
|
|
540
|
+
│
|
|
541
|
+
│
|
|
535
542
|
↑↓ navigate ^k actions │
|
|
536
543
|
|
|
537
544
|
|
|
@@ -542,9 +549,6 @@ test('list with detail layout consistency - short vs long detail content', async
|
|
|
542
549
|
|
|
543
550
|
|
|
544
551
|
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
552
|
"
|
|
549
553
|
`)
|
|
550
554
|
expect(longDetailSnapshot).toMatchInlineSnapshot(`
|
|
@@ -50,7 +50,7 @@ test('list with dropdown navigation', async () => {
|
|
|
50
50
|
Apple Juice Juice
|
|
51
51
|
|
|
52
52
|
|
|
53
|
-
↑↓ navigate ^k actions
|
|
53
|
+
↑↓ navigate ^p dropdown ^k actions
|
|
54
54
|
|
|
55
55
|
|
|
56
56
|
|
|
@@ -212,11 +212,11 @@ test('list with dropdown navigation', async () => {
|
|
|
212
212
|
Pinot Noir Wine
|
|
213
213
|
|
|
214
214
|
|
|
215
|
-
↑↓ navigate ^k actions
|
|
216
215
|
|
|
217
216
|
|
|
218
217
|
|
|
219
218
|
|
|
219
|
+
↑↓ navigate ^p dropdown ^k actions
|
|
220
220
|
|
|
221
221
|
|
|
222
222
|
|
|
@@ -308,7 +308,7 @@ test('list with dropdown search and filter', async () => {
|
|
|
308
308
|
│ ↵ select ↑↓ navigate │
|
|
309
309
|
│ │
|
|
310
310
|
╰────────────────────────────────────────────────────────────────╯
|
|
311
|
-
↑↓ navigate ^k actions
|
|
311
|
+
↑↓ navigate ^p dropdown ^k actions
|
|
312
312
|
|
|
313
313
|
|
|
314
314
|
|
|
@@ -336,11 +336,11 @@ test('list with dropdown search and filter', async () => {
|
|
|
336
336
|
Pinot Noir Wine
|
|
337
337
|
|
|
338
338
|
|
|
339
|
-
↑↓ navigate ^k actions
|
|
340
339
|
|
|
341
340
|
|
|
342
341
|
|
|
343
342
|
|
|
343
|
+
↑↓ navigate ^p dropdown ^k actions
|
|
344
344
|
|
|
345
345
|
|
|
346
346
|
|
|
@@ -371,12 +371,12 @@ test('list with dropdown search and filter', async () => {
|
|
|
371
371
|
›Pinot Noir Wine
|
|
372
372
|
|
|
373
373
|
|
|
374
|
-
↑↓ navigate ^k actions
|
|
375
374
|
|
|
376
375
|
|
|
377
376
|
|
|
378
377
|
|
|
379
378
|
|
|
379
|
+
↑↓ navigate ^p dropdown ^k actions
|
|
380
380
|
|
|
381
381
|
|
|
382
382
|
|
|
@@ -3,8 +3,10 @@ import { test, expect, afterEach, beforeEach } from 'vitest'
|
|
|
3
3
|
import { launchTerminal, Session } from 'tuistory/src'
|
|
4
4
|
|
|
5
5
|
let session: Session
|
|
6
|
+
let sessionStartMs = 0
|
|
6
7
|
|
|
7
8
|
beforeEach(async () => {
|
|
9
|
+
sessionStartMs = Date.now()
|
|
8
10
|
session = await launchTerminal({
|
|
9
11
|
command: 'bun',
|
|
10
12
|
args: ['src/examples/list-with-sections.tsx'],
|
|
@@ -17,6 +19,18 @@ afterEach(() => {
|
|
|
17
19
|
session?.close()
|
|
18
20
|
})
|
|
19
21
|
|
|
22
|
+
test('list startup shows first content near instantly', async () => {
|
|
23
|
+
await session.text({
|
|
24
|
+
waitFor: (text) => {
|
|
25
|
+
return /search items/i.test(text)
|
|
26
|
+
},
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
const loadTimeMs = Date.now() - sessionStartMs
|
|
30
|
+
// Allow more headroom in CI where machine speed varies
|
|
31
|
+
expect(loadTimeMs).toBeLessThan(1500)
|
|
32
|
+
}, 10000)
|
|
33
|
+
|
|
20
34
|
test('list with sections navigation', async () => {
|
|
21
35
|
await session.text({
|
|
22
36
|
waitFor: (text) => {
|
|
@@ -172,12 +186,12 @@ test('list with sections search functionality', async () => {
|
|
|
172
186
|
›Banana Yellow and nutritious Ripe
|
|
173
187
|
|
|
174
188
|
|
|
175
|
-
↵ view details ↑↓ navigate ^k actions
|
|
176
189
|
|
|
177
190
|
|
|
178
191
|
|
|
179
192
|
|
|
180
193
|
|
|
194
|
+
↵ view details ↑↓ navigate ^k actions
|
|
181
195
|
|
|
182
196
|
|
|
183
197
|
|
|
@@ -208,12 +222,12 @@ test('list with sections search functionality', async () => {
|
|
|
208
222
|
›Lettuce Green and fresh
|
|
209
223
|
|
|
210
224
|
|
|
211
|
-
↵ view details ↑↓ navigate ^k actions
|
|
212
225
|
|
|
213
226
|
|
|
214
227
|
|
|
215
228
|
|
|
216
229
|
|
|
230
|
+
↵ view details ↑↓ navigate ^k actions
|
|
217
231
|
|
|
218
232
|
|
|
219
233
|
|
|
@@ -271,12 +285,12 @@ test('list with sections search functionality', async () => {
|
|
|
271
285
|
›Bread Freshly baked Today [New]
|
|
272
286
|
|
|
273
287
|
|
|
274
|
-
↵ view details ↑↓ navigate ^k actions
|
|
275
288
|
|
|
276
289
|
|
|
277
290
|
|
|
278
291
|
|
|
279
292
|
|
|
293
|
+
↵ view details ↑↓ navigate ^k actions
|
|
280
294
|
|
|
281
295
|
|
|
282
296
|
|
|
@@ -417,11 +431,16 @@ test('list actions panel with ctrl+k', async () => {
|
|
|
417
431
|
await session.press(['ctrl', 'k'])
|
|
418
432
|
|
|
419
433
|
const afterCtrlKSnapshot = await session.text()
|
|
434
|
+
// Fast feedback loop: fail if list content leaks under the actions dialog.
|
|
435
|
+
expect(afterCtrlKSnapshot).toContain('Actions')
|
|
436
|
+
expect(afterCtrlKSnapshot).not.toContain('Search items...')
|
|
437
|
+
expect(afterCtrlKSnapshot).not.toContain('Apple Red and sweet')
|
|
438
|
+
expect(afterCtrlKSnapshot).not.toContain('Fruitsions')
|
|
420
439
|
expect(afterCtrlKSnapshot).toMatchInlineSnapshot(`
|
|
421
440
|
"
|
|
422
441
|
|
|
423
442
|
|
|
424
|
-
|
|
443
|
+
|
|
425
444
|
|
|
426
445
|
╭────────────────────────────────────────────────────────────────╮
|
|
427
446
|
│ │
|
|
@@ -434,7 +453,7 @@ test('list actions panel with ctrl+k', async () => {
|
|
|
434
453
|
│ │
|
|
435
454
|
│ Settings │
|
|
436
455
|
│ Change Theme... │
|
|
437
|
-
│
|
|
456
|
+
│ See Console Logs │
|
|
438
457
|
│ │
|
|
439
458
|
│ │
|
|
440
459
|
│ ↵ select ↑↓ navigate │
|
|
@@ -449,7 +468,7 @@ test('list actions panel with ctrl+k', async () => {
|
|
|
449
468
|
"
|
|
450
469
|
|
|
451
470
|
|
|
452
|
-
|
|
471
|
+
|
|
453
472
|
|
|
454
473
|
╭────────────────────────────────────────────────────────────────╮
|
|
455
474
|
│ │
|
|
@@ -462,7 +481,7 @@ test('list actions panel with ctrl+k', async () => {
|
|
|
462
481
|
│ │
|
|
463
482
|
│ Settings │
|
|
464
483
|
│ Change Theme... │
|
|
465
|
-
│
|
|
484
|
+
│ See Console Logs │
|
|
466
485
|
│ │
|
|
467
486
|
│ │
|
|
468
487
|
│ ↵ select ↑↓ navigate │
|
|
@@ -492,7 +511,7 @@ test('list actions panel with ctrl+k', async () => {
|
|
|
492
511
|
▼
|
|
493
512
|
|
|
494
513
|
|
|
495
|
-
|
|
514
|
+
✓ Added to Cart Apple has been added to your cart
|
|
496
515
|
|
|
497
516
|
"
|
|
498
517
|
`)
|
|
@@ -538,11 +557,11 @@ test('filtering selects first visible item and navigation works', async () => {
|
|
|
538
557
|
Carrot Orange and crunchy [Healthy]
|
|
539
558
|
|
|
540
559
|
|
|
541
|
-
↑↓ navigate ^k actions
|
|
542
560
|
|
|
543
561
|
|
|
544
562
|
|
|
545
563
|
|
|
564
|
+
↑↓ navigate ^k actions
|
|
546
565
|
|
|
547
566
|
|
|
548
567
|
|
|
@@ -566,11 +585,11 @@ test('filtering selects first visible item and navigation works', async () => {
|
|
|
566
585
|
›Carrot Orange and crunchy [Healthy]
|
|
567
586
|
|
|
568
587
|
|
|
569
|
-
↵ view details ↑↓ navigate ^k actions
|
|
570
588
|
|
|
571
589
|
|
|
572
590
|
|
|
573
591
|
|
|
592
|
+
↵ view details ↑↓ navigate ^k actions
|
|
574
593
|
|
|
575
594
|
|
|
576
595
|
|
|
@@ -594,11 +613,11 @@ test('filtering selects first visible item and navigation works', async () => {
|
|
|
594
613
|
Carrot Orange and crunchy [Healthy]
|
|
595
614
|
|
|
596
615
|
|
|
597
|
-
↑↓ navigate ^k actions
|
|
598
616
|
|
|
599
617
|
|
|
600
618
|
|
|
601
619
|
|
|
620
|
+
↑↓ navigate ^k actions
|
|
602
621
|
|
|
603
622
|
|
|
604
623
|
|
|
@@ -622,11 +641,11 @@ test('filtering selects first visible item and navigation works', async () => {
|
|
|
622
641
|
›Carrot Orange and crunchy [Healthy]
|
|
623
642
|
|
|
624
643
|
|
|
625
|
-
↵ view details ↑↓ navigate ^k actions
|
|
626
644
|
|
|
627
645
|
|
|
628
646
|
|
|
629
647
|
|
|
648
|
+
↵ view details ↑↓ navigate ^k actions
|
|
630
649
|
|
|
631
650
|
|
|
632
651
|
|
|
@@ -792,3 +811,37 @@ test('list scrollbox scrolling with sections', async () => {
|
|
|
792
811
|
"
|
|
793
812
|
`)
|
|
794
813
|
}, 15000)
|
|
814
|
+
|
|
815
|
+
test('search resets selection to first visible item without flash', async () => {
|
|
816
|
+
await session.text({
|
|
817
|
+
waitFor: (text) => {
|
|
818
|
+
return /search/i.test(text)
|
|
819
|
+
},
|
|
820
|
+
})
|
|
821
|
+
|
|
822
|
+
// Navigate down to select Grape (4th item, index 3)
|
|
823
|
+
await session.press('down')
|
|
824
|
+
await session.press('down')
|
|
825
|
+
await session.press('down')
|
|
826
|
+
|
|
827
|
+
const beforeSearch = await session.text()
|
|
828
|
+
expect(beforeSearch).toContain('›Grape')
|
|
829
|
+
|
|
830
|
+
// Type one char at a time and check each intermediate frame:
|
|
831
|
+
// After each keystroke, the › marker must be on the first visible match.
|
|
832
|
+
// A flash bug would show › on a stale item or missing entirely.
|
|
833
|
+
await session.press('l')
|
|
834
|
+
const afterL = await session.text()
|
|
835
|
+
// 'l' matches: Lettuce, Apple, Bell Pepper, … — first visible must be selected
|
|
836
|
+
expect(afterL).toMatch(/›\S/)
|
|
837
|
+
|
|
838
|
+
await session.press('e')
|
|
839
|
+
const afterLe = await session.text()
|
|
840
|
+
expect(afterLe).toMatch(/›\S/)
|
|
841
|
+
|
|
842
|
+
await session.press('t')
|
|
843
|
+
const afterLet = await session.text()
|
|
844
|
+
// Only "Lettuce" matches "let"
|
|
845
|
+
expect(afterLet).toContain('›Lettuce')
|
|
846
|
+
expect(afterLet).not.toContain('›Grape')
|
|
847
|
+
}, 10000)
|
|
@@ -39,8 +39,8 @@ test('list navigation works while toast is shown', async () => {
|
|
|
39
39
|
Fifth Item
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
✓ Selected First Item
|
|
43
42
|
|
|
43
|
+
✓ Selected First Item
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
|
|
@@ -67,8 +67,8 @@ test('list navigation works while toast is shown', async () => {
|
|
|
67
67
|
Fifth Item
|
|
68
68
|
|
|
69
69
|
|
|
70
|
-
✓ Selected Second Item
|
|
71
70
|
|
|
71
|
+
✓ Selected Second Item
|
|
72
72
|
|
|
73
73
|
|
|
74
74
|
|
|
@@ -95,8 +95,8 @@ test('list navigation works while toast is shown', async () => {
|
|
|
95
95
|
Fifth Item
|
|
96
96
|
|
|
97
97
|
|
|
98
|
-
✓ Selected Third Item
|
|
99
98
|
|
|
99
|
+
✓ Selected Third Item
|
|
100
100
|
|
|
101
101
|
|
|
102
102
|
|
|
@@ -123,8 +123,8 @@ test('list navigation works while toast is shown', async () => {
|
|
|
123
123
|
Fifth Item
|
|
124
124
|
|
|
125
125
|
|
|
126
|
-
✓ Selected Second Item
|
|
127
126
|
|
|
127
|
+
✓ Selected Second Item
|
|
128
128
|
|
|
129
129
|
|
|
130
130
|
|
|
@@ -38,17 +38,14 @@ test('file picker shows form fields', async () => {
|
|
|
38
38
|
│
|
|
39
39
|
◇ Select Files
|
|
40
40
|
│ Enter file path...
|
|
41
|
-
│
|
|
42
41
|
│ Choose one or more files to upload
|
|
43
42
|
│
|
|
44
43
|
◇ Select Folder
|
|
45
44
|
│ Enter file path...
|
|
46
|
-
│
|
|
47
45
|
│ Choose a folder for output
|
|
48
46
|
│
|
|
49
47
|
◇ Select Single File
|
|
50
48
|
│ Enter file path...
|
|
51
|
-
│
|
|
52
49
|
│ Choose exactly one file
|
|
53
50
|
│
|
|
54
51
|
└
|
|
@@ -74,6 +71,9 @@ test('file picker shows form fields', async () => {
|
|
|
74
71
|
|
|
75
72
|
|
|
76
73
|
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
77
|
|
|
78
78
|
|
|
79
79
|
|
|
@@ -108,7 +108,6 @@ test('typing opens autocomplete dialog with file list', async () => {
|
|
|
108
108
|
│
|
|
109
109
|
◇ Select Files
|
|
110
110
|
│ Enter file path...
|
|
111
|
-
│
|
|
112
111
|
│ Choose one or more files to upload
|
|
113
112
|
│
|
|
114
113
|
╭────────────────────────────────────────────────────────────────╮
|
|
@@ -119,8 +118,6 @@ test('typing opens autocomplete dialog with file list', async () => {
|
|
|
119
118
|
│ │
|
|
120
119
|
│ ↑↓ navigate ⏎/tab select esc close │
|
|
121
120
|
╰────────────────────────────────────────────────────────────────╯
|
|
122
|
-
│ Choose exactly one file
|
|
123
|
-
│
|
|
124
121
|
└
|
|
125
122
|
|
|
126
123
|
|
|
@@ -144,6 +141,9 @@ test('typing opens autocomplete dialog with file list', async () => {
|
|
|
144
141
|
|
|
145
142
|
|
|
146
143
|
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
147
|
|
|
148
148
|
|
|
149
149
|
|
|
@@ -186,17 +186,14 @@ test('escape closes autocomplete without going back', async () => {
|
|
|
186
186
|
│
|
|
187
187
|
◇ Select Files
|
|
188
188
|
│ Enter file path...
|
|
189
|
-
│
|
|
190
189
|
│ Choose one or more files to upload
|
|
191
190
|
│
|
|
192
191
|
◆ Select Folder
|
|
193
192
|
│ s
|
|
194
|
-
│
|
|
195
193
|
│ Choose a folder for output
|
|
196
194
|
│
|
|
197
195
|
◇ Select Single File
|
|
198
196
|
│ Enter file path...
|
|
199
|
-
│
|
|
200
197
|
│ Choose exactly one file
|
|
201
198
|
│
|
|
202
199
|
└
|
|
@@ -222,6 +219,9 @@ test('escape closes autocomplete without going back', async () => {
|
|
|
222
219
|
|
|
223
220
|
|
|
224
221
|
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
225
225
|
|
|
226
226
|
|
|
227
227
|
|
|
@@ -265,7 +265,6 @@ test('selecting first item with enter adds it to the list', async () => {
|
|
|
265
265
|
│
|
|
266
266
|
◇ Select Files
|
|
267
267
|
│ Enter file path...
|
|
268
|
-
│
|
|
269
268
|
│ Choose one or more files to upload
|
|
270
269
|
│
|
|
271
270
|
◆ Select Folder
|
|
@@ -273,12 +272,10 @@ test('selecting first item with enter adds it to the list', async () => {
|
|
|
273
272
|
│
|
|
274
273
|
│ Selected files:
|
|
275
274
|
│ • /Users/morse/Documents/GitHub/termcast/termcast/src
|
|
276
|
-
│
|
|
277
275
|
│ Choose a folder for output
|
|
278
276
|
│
|
|
279
277
|
◇ Select Single File
|
|
280
278
|
│ Enter file path...
|
|
281
|
-
│
|
|
282
279
|
│ Choose exactly one file
|
|
283
280
|
│
|
|
284
281
|
└
|
|
@@ -302,6 +299,9 @@ test('selecting first item with enter adds it to the list', async () => {
|
|
|
302
299
|
|
|
303
300
|
|
|
304
301
|
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
|
|
305
305
|
|
|
306
306
|
|
|
307
307
|
|