termcast 1.3.10 → 1.3.18
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/apis/toast.d.ts +1 -5
- package/dist/apis/toast.d.ts.map +1 -1
- package/dist/apis/toast.js +23 -17
- package/dist/apis/toast.js.map +1 -1
- package/dist/build.d.ts +2 -0
- package/dist/build.d.ts.map +1 -1
- package/dist/build.js +4 -3
- package/dist/build.js.map +1 -1
- package/dist/cli.js +42 -0
- package/dist/cli.js.map +1 -1
- package/dist/colors.d.ts +8 -1
- package/dist/colors.d.ts.map +1 -1
- package/dist/colors.js +12 -0
- package/dist/colors.js.map +1 -1
- package/dist/compile.d.ts +30 -0
- package/dist/compile.d.ts.map +1 -0
- package/dist/compile.js +156 -0
- package/dist/compile.js.map +1 -0
- package/dist/components/actions.d.ts +1 -0
- package/dist/components/actions.d.ts.map +1 -1
- package/dist/components/actions.js +5 -2
- package/dist/components/actions.js.map +1 -1
- package/dist/components/command-arguments.d.ts +9 -0
- package/dist/components/command-arguments.d.ts.map +1 -0
- package/dist/components/command-arguments.js +21 -0
- package/dist/components/command-arguments.js.map +1 -0
- package/dist/components/detail.d.ts +1 -1
- package/dist/components/detail.d.ts.map +1 -1
- package/dist/components/detail.js +17 -39
- package/dist/components/detail.js.map +1 -1
- package/dist/components/dropdown.d.ts +1 -0
- package/dist/components/dropdown.d.ts.map +1 -1
- package/dist/components/dropdown.js +77 -21
- package/dist/components/dropdown.js.map +1 -1
- package/dist/components/extension-preferences.d.ts.map +1 -1
- package/dist/components/extension-preferences.js +19 -29
- package/dist/components/extension-preferences.js.map +1 -1
- package/dist/components/form/checkbox.d.ts.map +1 -1
- package/dist/components/form/checkbox.js +9 -2
- 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 +15 -28
- package/dist/components/form/date-picker.js.map +1 -1
- package/dist/components/form/description.d.ts +2 -0
- package/dist/components/form/description.d.ts.map +1 -1
- package/dist/components/form/description.js +20 -2
- 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 +13 -28
- package/dist/components/form/dropdown.js.map +1 -1
- package/dist/components/form/file-autocomplete.d.ts +7 -4
- package/dist/components/form/file-autocomplete.d.ts.map +1 -1
- package/dist/components/form/file-autocomplete.js +54 -46
- package/dist/components/form/file-autocomplete.js.map +1 -1
- package/dist/components/form/file-picker.d.ts +5 -0
- package/dist/components/form/file-picker.d.ts.map +1 -1
- package/dist/components/form/file-picker.js +46 -49
- package/dist/components/form/file-picker.js.map +1 -1
- package/dist/components/form/form-ref.d.ts +43 -0
- package/dist/components/form/form-ref.d.ts.map +1 -0
- package/dist/components/form/form-ref.js +53 -0
- package/dist/components/form/form-ref.js.map +1 -0
- package/dist/components/form/index.d.ts +16 -0
- package/dist/components/form/index.d.ts.map +1 -1
- package/dist/components/form/index.js +86 -23
- 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 +32 -16
- package/dist/components/form/password-field.js.map +1 -1
- package/dist/components/form/text-area.d.ts.map +1 -1
- package/dist/components/form/text-area.js +32 -15
- 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 +37 -17
- package/dist/components/form/text-field.js.map +1 -1
- package/dist/components/form/use-form-navigation.d.ts +4 -0
- package/dist/components/form/use-form-navigation.d.ts.map +1 -1
- package/dist/components/form/use-form-navigation.js +35 -18
- package/dist/components/form/use-form-navigation.js.map +1 -1
- package/dist/components/form/with-left-border.d.ts.map +1 -1
- package/dist/components/form/with-left-border.js +2 -2
- package/dist/components/form/with-left-border.js.map +1 -1
- package/dist/components/icon.d.ts +3 -1
- package/dist/components/icon.d.ts.map +1 -1
- package/dist/components/icon.js +494 -469
- package/dist/components/icon.js.map +1 -1
- package/dist/components/list.d.ts +11 -7
- package/dist/components/list.d.ts.map +1 -1
- package/dist/components/list.js +170 -38
- 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/descendants.d.ts.map +1 -1
- package/dist/descendants.js +8 -5
- package/dist/descendants.js.map +1 -1
- package/dist/examples/action-show-in-finder.js +1 -1
- package/dist/examples/action-show-in-finder.js.map +1 -1
- package/dist/examples/environment-test.js +1 -1
- package/dist/examples/environment-test.js.map +1 -1
- package/dist/examples/error-boundary.js +1 -1
- package/dist/examples/error-boundary.js.map +1 -1
- package/dist/examples/form-basic.d.ts.map +1 -1
- package/dist/examples/form-basic.js +2 -2
- 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/form-scroll.d.ts +2 -0
- package/dist/examples/form-scroll.d.ts.map +1 -0
- package/dist/examples/form-scroll.js +8 -0
- package/dist/examples/form-scroll.js.map +1 -0
- package/dist/examples/form-tagpicker.js +1 -1
- package/dist/examples/form-tagpicker.js.map +1 -1
- package/dist/examples/internal/descendants-filtering.js +8 -3
- package/dist/examples/internal/descendants-filtering.js.map +1 -1
- package/dist/examples/internal/descendants.js +10 -3
- package/dist/examples/internal/descendants.js.map +1 -1
- package/dist/examples/internal/rhf-custom-ref.d.ts +2 -0
- package/dist/examples/internal/rhf-custom-ref.d.ts.map +1 -0
- package/dist/examples/internal/rhf-custom-ref.js +67 -0
- package/dist/examples/internal/rhf-custom-ref.js.map +1 -0
- package/dist/examples/internal/scrollbox-demo.js +3 -7
- package/dist/examples/internal/scrollbox-demo.js.map +1 -1
- package/dist/examples/internal/scrollbox-with-descendants.d.ts +2 -0
- package/dist/examples/internal/scrollbox-with-descendants.d.ts.map +1 -0
- package/dist/examples/internal/scrollbox-with-descendants.js +63 -0
- package/dist/examples/internal/scrollbox-with-descendants.js.map +1 -0
- package/dist/examples/internal/simple-dialog.js +1 -1
- package/dist/examples/internal/simple-dialog.js.map +1 -1
- package/dist/examples/internal/simple-scrollbox.js +2 -3
- package/dist/examples/internal/simple-scrollbox.js.map +1 -1
- package/dist/examples/internal/text-stacking.js +4 -2
- package/dist/examples/internal/text-stacking.js.map +1 -1
- package/dist/examples/list-dropdown-default.js +1 -1
- package/dist/examples/list-dropdown-default.js.map +1 -1
- package/dist/examples/list-fetch-data.js +1 -1
- package/dist/examples/list-fetch-data.js.map +1 -1
- package/dist/examples/list-scrollbox.d.ts +2 -0
- package/dist/examples/list-scrollbox.d.ts.map +1 -0
- package/dist/examples/list-scrollbox.js +29 -0
- package/dist/examples/list-scrollbox.js.map +1 -0
- package/dist/examples/list-with-detail.js +1 -1
- package/dist/examples/list-with-detail.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-sections.js +3 -3
- package/dist/examples/list-with-sections.js.map +1 -1
- package/dist/examples/miscellaneous.js +1 -1
- package/dist/examples/miscellaneous.js.map +1 -1
- package/dist/examples/nested-navigation.js +4 -2
- package/dist/examples/nested-navigation.js.map +1 -1
- package/dist/examples/preferences-test.js +1 -1
- package/dist/examples/preferences-test.js.map +1 -1
- package/dist/examples/simple-dropdown.js +1 -1
- package/dist/examples/simple-dropdown.js.map +1 -1
- package/dist/examples/simple-file-picker.js +1 -1
- package/dist/examples/simple-file-picker.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-hud.js +1 -1
- package/dist/examples/simple-hud.js.map +1 -1
- package/dist/examples/simple-list-search.js +1 -1
- package/dist/examples/simple-list-search.js.map +1 -1
- package/dist/examples/simple-list.js +1 -1
- package/dist/examples/simple-list.js.map +1 -1
- package/dist/examples/simple-navigation.js +4 -2
- package/dist/examples/simple-navigation.js.map +1 -1
- package/dist/examples/store.js +1 -1
- package/dist/examples/store.js.map +1 -1
- package/dist/examples/submodule-diff.d.ts +2 -0
- package/dist/examples/submodule-diff.d.ts.map +1 -0
- package/dist/examples/submodule-diff.js +99 -0
- package/dist/examples/submodule-diff.js.map +1 -0
- package/dist/examples/tanstack-demo.js +1 -1
- package/dist/examples/tanstack-demo.js.map +1 -1
- package/dist/examples/use-promise-demo.js +1 -1
- package/dist/examples/use-promise-demo.js.map +1 -1
- package/dist/extensions/dev.d.ts +8 -0
- package/dist/extensions/dev.d.ts.map +1 -1
- package/dist/extensions/dev.js +53 -28
- package/dist/extensions/dev.js.map +1 -1
- package/dist/extensions/home.d.ts.map +1 -1
- package/dist/extensions/home.js +16 -91
- package/dist/extensions/home.js.map +1 -1
- package/dist/globals.js +1 -1
- package/dist/globals.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -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 +56 -48
- package/dist/internal/date-picker-widget.js.map +1 -1
- package/dist/internal/dialog.d.ts.map +1 -1
- package/dist/internal/dialog.js +7 -7
- package/dist/internal/dialog.js.map +1 -1
- package/dist/internal/scrollbox.d.ts +2 -1
- package/dist/internal/scrollbox.d.ts.map +1 -1
- package/dist/internal/scrollbox.js +13 -7
- package/dist/internal/scrollbox.js.map +1 -1
- package/dist/release.d.ts +11 -0
- package/dist/release.d.ts.map +1 -0
- package/dist/release.js +113 -0
- package/dist/release.js.map +1 -0
- package/dist/state.d.ts +1 -0
- package/dist/state.d.ts.map +1 -1
- package/dist/state.js +1 -0
- package/dist/state.js.map +1 -1
- package/dist/theme.d.ts +11 -8
- package/dist/theme.d.ts.map +1 -1
- package/dist/theme.js +31 -8
- package/dist/theme.js.map +1 -1
- package/dist/utils/run-command.d.ts +22 -0
- package/dist/utils/run-command.d.ts.map +1 -0
- package/dist/utils/run-command.js +127 -0
- package/dist/utils/run-command.js.map +1 -0
- package/dist/utils.d.ts +1 -1
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +5 -3
- package/dist/utils.js.map +1 -1
- package/package.json +10 -7
- package/src/apis/toast.tsx +38 -17
- package/src/build.tsx +5 -3
- package/src/cli.tsx +46 -0
- package/src/colors.tsx +22 -1
- package/src/compile.tsx +219 -0
- package/src/components/actions.tsx +7 -1
- package/src/components/command-arguments.tsx +81 -0
- package/src/components/detail.tsx +26 -58
- package/src/components/dropdown.tsx +108 -23
- package/src/components/extension-preferences.tsx +55 -35
- package/src/components/form/checkbox.tsx +13 -5
- package/src/components/form/date-picker.tsx +24 -29
- package/src/components/form/description.tsx +35 -7
- package/src/components/form/dropdown.tsx +16 -30
- package/src/components/form/file-autocomplete.tsx +87 -77
- package/src/components/form/file-picker.tsx +69 -57
- package/src/components/form/form-ref.tsx +68 -0
- package/src/components/form/index.tsx +152 -41
- package/src/components/form/password-field.tsx +35 -22
- package/src/components/form/text-area.tsx +78 -58
- package/src/components/form/text-field.tsx +82 -61
- package/src/components/form/use-form-navigation.tsx +43 -23
- package/src/components/form/with-left-border.tsx +2 -1
- package/src/components/icon.tsx +497 -469
- package/src/components/list.tsx +279 -112
- package/src/components/loading-bar.tsx +1 -1
- package/src/descendants.tsx +15 -5
- package/src/examples/action-show-in-finder.tsx +1 -1
- package/src/examples/environment-test.tsx +1 -1
- package/src/examples/error-boundary.tsx +1 -1
- package/src/examples/file-autocomplete.vitest.tsx +245 -0
- package/src/examples/form-basic.tsx +12 -12
- package/src/examples/form-basic.vitest.tsx +297 -671
- package/src/examples/form-dropdown.tsx +1 -1
- package/src/examples/form-dropdown.vitest.tsx +353 -221
- package/src/examples/form-scroll.tsx +56 -0
- package/src/examples/form-scroll.vitest.tsx +228 -0
- package/src/examples/form-tagpicker.tsx +1 -1
- package/src/examples/form-tagpicker.vitest.tsx +438 -193
- package/src/examples/internal/descendants-filtering.tsx +13 -5
- package/src/examples/internal/descendants.tsx +17 -5
- package/src/examples/internal/rhf-custom-ref.tsx +152 -0
- package/src/examples/internal/scrollbox-demo.tsx +15 -7
- package/src/examples/internal/scrollbox-with-descendants.tsx +94 -0
- package/src/examples/internal/simple-dialog.tsx +1 -1
- package/src/examples/internal/simple-scrollbox.tsx +8 -5
- package/src/examples/internal/simple-scrollbox.vitest.tsx +47 -37
- package/src/examples/internal/text-stacking.tsx +4 -2
- package/src/examples/list-dropdown-default.tsx +1 -1
- package/src/examples/list-dropdown-default.vitest.tsx +136 -71
- package/src/examples/list-fetch-data.tsx +1 -1
- package/src/examples/list-fetch-data.vitest.tsx +42 -33
- package/src/examples/list-scrollbox.tsx +46 -0
- package/src/examples/list-scrollbox.vitest.tsx +103 -0
- package/src/examples/list-with-detail.tsx +1 -1
- package/src/examples/list-with-detail.vitest.tsx +290 -294
- package/src/examples/list-with-dropdown.tsx +1 -1
- package/src/examples/list-with-dropdown.vitest.tsx +190 -150
- package/src/examples/list-with-sections.tsx +12 -1
- package/src/examples/list-with-sections.vitest.tsx +390 -218
- package/src/examples/miscellaneous.tsx +1 -1
- package/src/examples/nested-navigation.tsx +4 -2
- package/src/examples/preferences-test.tsx +1 -1
- package/src/examples/simple-dropdown.tsx +1 -1
- package/src/examples/simple-file-picker.tsx +1 -1
- package/src/examples/simple-file-picker.vitest.tsx +538 -132
- package/src/examples/simple-grid.tsx +1 -1
- package/src/examples/simple-grid.vitest.tsx +258 -234
- package/src/examples/simple-hud.tsx +1 -1
- package/src/examples/simple-list-search.tsx +1 -1
- package/src/examples/simple-list.tsx +1 -1
- package/src/examples/simple-navigation.tsx +4 -2
- package/src/examples/simple-navigation.vitest.tsx +434 -238
- package/src/examples/store.tsx +1 -1
- package/src/examples/store.vitest.tsx +31 -10
- package/src/examples/submodule-diff.tsx +153 -0
- package/src/examples/tanstack-demo.tsx +1 -1
- package/src/examples/use-promise-demo.tsx +1 -1
- package/src/extensions/dev.tsx +74 -36
- package/src/extensions/dev.vitest.tsx +220 -0
- package/src/extensions/home.tsx +17 -118
- package/src/globals.ts +1 -1
- package/src/index.tsx +7 -1
- package/src/internal/date-picker-widget.tsx +56 -46
- package/src/internal/dialog.tsx +6 -6
- package/src/internal/scrollbox.tsx +15 -5
- package/src/release.tsx +159 -0
- package/src/state.tsx +2 -0
- package/src/store-api/search.test.tsx +4 -13
- package/src/theme.tsx +33 -8
- package/src/utils/run-command.tsx +204 -0
- package/src/utils.tsx +5 -3
- package/dist/ai.d.ts +0 -104
- package/dist/ai.d.ts.map +0 -1
- package/dist/ai.js +0 -135
- package/dist/ai.js.map +0 -1
- package/dist/apis/cache.test.d.ts +0 -2
- package/dist/apis/cache.test.d.ts.map +0 -1
- package/dist/apis/cache.test.js +0 -246
- package/dist/apis/cache.test.js.map +0 -1
- package/dist/apis/localstorage.test.d.ts +0 -2
- package/dist/apis/localstorage.test.d.ts.map +0 -1
- package/dist/apis/localstorage.test.js +0 -131
- package/dist/apis/localstorage.test.js.map +0 -1
- package/dist/apis/toast.test.d.ts +0 -2
- package/dist/apis/toast.test.d.ts.map +0 -1
- package/dist/apis/toast.test.js +0 -67
- package/dist/apis/toast.test.js.map +0 -1
- package/dist/build.test.d.ts +0 -2
- package/dist/build.test.d.ts.map +0 -1
- package/dist/build.test.js +0 -73
- package/dist/build.test.js.map +0 -1
- package/dist/cache.d.ts +0 -32
- package/dist/cache.d.ts.map +0 -1
- package/dist/cache.js +0 -205
- package/dist/cache.js.map +0 -1
- package/dist/cache.test.d.ts +0 -2
- package/dist/cache.test.d.ts.map +0 -1
- package/dist/cache.test.js +0 -246
- package/dist/cache.test.js.map +0 -1
- package/dist/clipboard.d.ts +0 -36
- package/dist/clipboard.d.ts.map +0 -1
- package/dist/clipboard.js +0 -154
- package/dist/clipboard.js.map +0 -1
- package/dist/components/form/form-type-only.d.ts +0 -174
- package/dist/components/form/form-type-only.d.ts.map +0 -1
- package/dist/components/form/form-type-only.js +0 -2
- package/dist/components/form/form-type-only.js.map +0 -1
- package/dist/components/form/use-form-handling.d.ts +0 -4
- package/dist/components/form/use-form-handling.d.ts.map +0 -1
- package/dist/components/form/use-form-handling.js +0 -37
- package/dist/components/form/use-form-handling.js.map +0 -1
- package/dist/dev-ui.d.ts +0 -7
- package/dist/dev-ui.d.ts.map +0 -1
- package/dist/dev-ui.js +0 -118
- package/dist/dev-ui.js.map +0 -1
- package/dist/environment.d.ts +0 -63
- package/dist/environment.d.ts.map +0 -1
- package/dist/environment.js +0 -189
- package/dist/environment.js.map +0 -1
- package/dist/examples/datepicker.d.ts +0 -2
- package/dist/examples/datepicker.d.ts.map +0 -1
- package/dist/examples/datepicker.js +0 -344
- package/dist/examples/datepicker.js.map +0 -1
- package/dist/examples/form-basic-arrow-keys.vitest.d.ts +0 -2
- package/dist/examples/form-basic-arrow-keys.vitest.d.ts.map +0 -1
- package/dist/examples/form-basic-arrow-keys.vitest.js +0 -46
- package/dist/examples/form-basic-arrow-keys.vitest.js.map +0 -1
- package/dist/examples/form-basic.vitest.d.ts +0 -2
- package/dist/examples/form-basic.vitest.d.ts.map +0 -1
- package/dist/examples/form-basic.vitest.js +0 -995
- package/dist/examples/form-basic.vitest.js.map +0 -1
- package/dist/examples/form-dropdown-with-sections.d.ts +0 -2
- package/dist/examples/form-dropdown-with-sections.d.ts.map +0 -1
- package/dist/examples/form-dropdown-with-sections.js +0 -13
- package/dist/examples/form-dropdown-with-sections.js.map +0 -1
- package/dist/examples/form-dropdown-with-sections.vitest.d.ts +0 -2
- package/dist/examples/form-dropdown-with-sections.vitest.d.ts.map +0 -1
- package/dist/examples/form-dropdown-with-sections.vitest.js +0 -75
- package/dist/examples/form-dropdown-with-sections.vitest.js.map +0 -1
- package/dist/examples/form-dropdown.vitest.d.ts +0 -2
- package/dist/examples/form-dropdown.vitest.d.ts.map +0 -1
- package/dist/examples/form-dropdown.vitest.js +0 -722
- package/dist/examples/form-dropdown.vitest.js.map +0 -1
- package/dist/examples/form-multiselect-dropdown.d.ts +0 -2
- package/dist/examples/form-multiselect-dropdown.d.ts.map +0 -1
- package/dist/examples/form-multiselect-dropdown.js +0 -13
- package/dist/examples/form-multiselect-dropdown.js.map +0 -1
- package/dist/examples/form-tagpicker.vitest.d.ts +0 -2
- package/dist/examples/form-tagpicker.vitest.d.ts.map +0 -1
- package/dist/examples/form-tagpicker.vitest.js +0 -491
- package/dist/examples/form-tagpicker.vitest.js.map +0 -1
- package/dist/examples/internal/nested-boxes.d.ts +0 -2
- package/dist/examples/internal/nested-boxes.d.ts.map +0 -1
- package/dist/examples/internal/nested-boxes.js +0 -7
- package/dist/examples/internal/nested-boxes.js.map +0 -1
- package/dist/examples/internal/simple-scrollbox.vitest.d.ts +0 -2
- package/dist/examples/internal/simple-scrollbox.vitest.d.ts.map +0 -1
- package/dist/examples/internal/simple-scrollbox.vitest.js +0 -88
- package/dist/examples/internal/simple-scrollbox.vitest.js.map +0 -1
- package/dist/examples/internal/unicode-square-repro.d.ts +0 -2
- package/dist/examples/internal/unicode-square-repro.d.ts.map +0 -1
- package/dist/examples/internal/unicode-square-repro.js +0 -7
- package/dist/examples/internal/unicode-square-repro.js.map +0 -1
- package/dist/examples/list-dropdown-default.vitest.d.ts +0 -2
- package/dist/examples/list-dropdown-default.vitest.d.ts.map +0 -1
- package/dist/examples/list-dropdown-default.vitest.js +0 -164
- package/dist/examples/list-dropdown-default.vitest.js.map +0 -1
- package/dist/examples/list-fetch-data.vitest.d.ts +0 -2
- package/dist/examples/list-fetch-data.vitest.d.ts.map +0 -1
- package/dist/examples/list-fetch-data.vitest.js +0 -103
- package/dist/examples/list-fetch-data.vitest.js.map +0 -1
- package/dist/examples/list-filter-navigation.d.ts +0 -2
- package/dist/examples/list-filter-navigation.d.ts.map +0 -1
- package/dist/examples/list-filter-navigation.js +0 -8
- package/dist/examples/list-filter-navigation.js.map +0 -1
- package/dist/examples/list-with-detail.vitest.d.ts +0 -2
- package/dist/examples/list-with-detail.vitest.d.ts.map +0 -1
- package/dist/examples/list-with-detail.vitest.js +0 -438
- package/dist/examples/list-with-detail.vitest.js.map +0 -1
- package/dist/examples/list-with-dropdown.vitest.d.ts +0 -2
- package/dist/examples/list-with-dropdown.vitest.d.ts.map +0 -1
- package/dist/examples/list-with-dropdown.vitest.js +0 -297
- package/dist/examples/list-with-dropdown.vitest.js.map +0 -1
- package/dist/examples/list-with-sections.vitest.d.ts +0 -2
- package/dist/examples/list-with-sections.vitest.d.ts.map +0 -1
- package/dist/examples/list-with-sections.vitest.js +0 -441
- package/dist/examples/list-with-sections.vitest.js.map +0 -1
- package/dist/examples/simple-file-picker.vitest.d.ts +0 -2
- package/dist/examples/simple-file-picker.vitest.d.ts.map +0 -1
- package/dist/examples/simple-file-picker.vitest.js +0 -277
- package/dist/examples/simple-file-picker.vitest.js.map +0 -1
- package/dist/examples/simple-grid.vitest.d.ts +0 -2
- package/dist/examples/simple-grid.vitest.d.ts.map +0 -1
- package/dist/examples/simple-grid.vitest.js +0 -498
- package/dist/examples/simple-grid.vitest.js.map +0 -1
- package/dist/examples/simple-navigation.vitest.d.ts +0 -2
- package/dist/examples/simple-navigation.vitest.d.ts.map +0 -1
- package/dist/examples/simple-navigation.vitest.js +0 -522
- package/dist/examples/simple-navigation.vitest.js.map +0 -1
- package/dist/examples/store.vitest.d.ts +0 -2
- package/dist/examples/store.vitest.d.ts.map +0 -1
- package/dist/examples/store.vitest.js +0 -48
- package/dist/examples/store.vitest.js.map +0 -1
- package/dist/home-command.d.ts +0 -8
- package/dist/home-command.d.ts.map +0 -1
- package/dist/home-command.js +0 -181
- package/dist/home-command.js.map +0 -1
- package/dist/hooks/hooks.test.d.ts +0 -2
- package/dist/hooks/hooks.test.d.ts.map +0 -1
- package/dist/hooks/hooks.test.js +0 -37
- package/dist/hooks/hooks.test.js.map +0 -1
- package/dist/hover-repro.d.ts +0 -2
- package/dist/hover-repro.d.ts.map +0 -1
- package/dist/hover-repro.js +0 -20
- package/dist/hover-repro.js.map +0 -1
- package/dist/localstorage.d.ts +0 -13
- package/dist/localstorage.d.ts.map +0 -1
- package/dist/localstorage.js +0 -190
- package/dist/localstorage.js.map +0 -1
- package/dist/localstorage.test.d.ts +0 -2
- package/dist/localstorage.test.d.ts.map +0 -1
- package/dist/localstorage.test.js +0 -131
- package/dist/localstorage.test.js.map +0 -1
- package/dist/oauth.d.ts +0 -142
- package/dist/oauth.d.ts.map +0 -1
- package/dist/oauth.js +0 -551
- package/dist/oauth.js.map +0 -1
- package/dist/preferences.d.ts +0 -23
- package/dist/preferences.d.ts.map +0 -1
- package/dist/preferences.js +0 -105
- package/dist/preferences.js.map +0 -1
- package/dist/store-api/download.test.d.ts +0 -2
- package/dist/store-api/download.test.d.ts.map +0 -1
- package/dist/store-api/download.test.js +0 -36
- package/dist/store-api/download.test.js.map +0 -1
- package/dist/store-api/extension.test.d.ts +0 -2
- package/dist/store-api/extension.test.d.ts.map +0 -1
- package/dist/store-api/extension.test.js +0 -22
- package/dist/store-api/extension.test.js.map +0 -1
- package/dist/store-api/search.test.d.ts +0 -2
- package/dist/store-api/search.test.d.ts.map +0 -1
- package/dist/store-api/search.test.js +0 -45
- package/dist/store-api/search.test.js.map +0 -1
- package/dist/store.d.ts +0 -21
- package/dist/store.d.ts.map +0 -1
- package/dist/store.js +0 -84
- package/dist/store.js.map +0 -1
- package/dist/toast.d.ts +0 -44
- package/dist/toast.d.ts.map +0 -1
- package/dist/toast.js +0 -221
- package/dist/toast.js.map +0 -1
- package/dist/utils.test.d.ts +0 -2
- package/dist/utils.test.d.ts.map +0 -1
- package/dist/utils.test.js +0 -152
- package/dist/utils.test.js.map +0 -1
- package/dist/window.d.ts +0 -12
- package/dist/window.d.ts.map +0 -1
- package/dist/window.js +0 -48
- package/dist/window.js.map +0 -1
|
@@ -1,176 +1,168 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import { NodeTuiDriver } from 'termcast/src/e2e-node'
|
|
1
|
+
import { test, expect, afterEach, beforeEach } from 'vitest'
|
|
2
|
+
import { launchTerminal, Session } from 'tuistory/src'
|
|
4
3
|
|
|
5
|
-
let
|
|
4
|
+
let session: Session
|
|
6
5
|
|
|
7
|
-
beforeEach(() => {
|
|
8
|
-
|
|
6
|
+
beforeEach(async () => {
|
|
7
|
+
session = await launchTerminal({
|
|
8
|
+
command: 'bun',
|
|
9
|
+
args: ['src/examples/list-with-sections.tsx'],
|
|
9
10
|
cols: 70,
|
|
10
|
-
rows:
|
|
11
|
+
rows: 20,
|
|
11
12
|
})
|
|
12
13
|
})
|
|
13
14
|
|
|
14
15
|
afterEach(() => {
|
|
15
|
-
|
|
16
|
+
session?.close()
|
|
16
17
|
})
|
|
17
18
|
|
|
18
19
|
test('list with sections navigation', async () => {
|
|
19
|
-
await
|
|
20
|
+
await session.text({
|
|
20
21
|
waitFor: (text) => {
|
|
21
22
|
// wait for list to show up
|
|
22
23
|
return /search/i.test(text)
|
|
23
24
|
},
|
|
24
25
|
})
|
|
25
26
|
|
|
26
|
-
const initialSnapshot = await
|
|
27
|
+
const initialSnapshot = await session.text()
|
|
27
28
|
expect(initialSnapshot).toMatchInlineSnapshot(`
|
|
28
29
|
"
|
|
29
30
|
|
|
31
|
+
|
|
30
32
|
Simple List Example ────────────────────────────────────────────
|
|
31
33
|
|
|
32
34
|
Search items...
|
|
33
35
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
Lettuce Green and fresh
|
|
44
|
-
Bread Freshly baked Today [New]
|
|
36
|
+
Fruits ▲
|
|
37
|
+
›Apple Red and sweet Fresh [Popular] ▀
|
|
38
|
+
Banana Yellow and nutritious Ripe
|
|
39
|
+
Orange Citrus and juicy Fresh
|
|
40
|
+
Grape Sweet clusters [Seasonal]
|
|
41
|
+
Mango Tropical delight Imported
|
|
42
|
+
Pineapple Sweet and tangy
|
|
43
|
+
Strawberry Red and sweet [Popular]
|
|
44
|
+
▼
|
|
45
45
|
|
|
46
46
|
|
|
47
|
-
↵ select
|
|
47
|
+
↵ select ↑↓ navigate ^k actions"
|
|
48
48
|
`)
|
|
49
49
|
|
|
50
50
|
// Add small delay to ensure all items have registered
|
|
51
51
|
await new Promise((resolve) => setTimeout(resolve, 100))
|
|
52
52
|
|
|
53
|
-
await
|
|
53
|
+
await session.press('down')
|
|
54
54
|
|
|
55
|
-
const afterDownSnapshot = await
|
|
55
|
+
const afterDownSnapshot = await session.text()
|
|
56
56
|
expect(afterDownSnapshot).toMatchInlineSnapshot(`
|
|
57
57
|
"
|
|
58
58
|
|
|
59
|
+
|
|
59
60
|
Simple List Example ────────────────────────────────────────────
|
|
60
61
|
|
|
61
62
|
Search items...
|
|
62
63
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
Lettuce Green and fresh
|
|
73
|
-
Bread Freshly baked Today [New]
|
|
64
|
+
Fruits ▲
|
|
65
|
+
Apple Red and sweet Fresh [Popular] ▀
|
|
66
|
+
›Banana Yellow and nutritious Ripe
|
|
67
|
+
Orange Citrus and juicy Fresh
|
|
68
|
+
Grape Sweet clusters [Seasonal]
|
|
69
|
+
Mango Tropical delight Imported
|
|
70
|
+
Pineapple Sweet and tangy
|
|
71
|
+
Strawberry Red and sweet [Popular]
|
|
72
|
+
▼
|
|
74
73
|
|
|
75
74
|
|
|
76
|
-
↵ select
|
|
75
|
+
↵ select ↑↓ navigate ^k actions"
|
|
77
76
|
`)
|
|
78
77
|
|
|
79
|
-
await
|
|
78
|
+
await session.press('down')
|
|
80
79
|
|
|
81
|
-
const secondDownSnapshot = await
|
|
80
|
+
const secondDownSnapshot = await session.text()
|
|
82
81
|
expect(secondDownSnapshot).toMatchInlineSnapshot(`
|
|
83
82
|
"
|
|
84
83
|
|
|
84
|
+
|
|
85
85
|
Simple List Example ────────────────────────────────────────────
|
|
86
86
|
|
|
87
87
|
Search items...
|
|
88
88
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
Lettuce Green and fresh
|
|
99
|
-
Bread Freshly baked Today [New]
|
|
89
|
+
Fruits ▲
|
|
90
|
+
Apple Red and sweet Fresh [Popular] ▀
|
|
91
|
+
Banana Yellow and nutritious Ripe
|
|
92
|
+
›Orange Citrus and juicy Fresh
|
|
93
|
+
Grape Sweet clusters [Seasonal]
|
|
94
|
+
Mango Tropical delight Imported
|
|
95
|
+
Pineapple Sweet and tangy
|
|
96
|
+
Strawberry Red and sweet [Popular]
|
|
97
|
+
▼
|
|
100
98
|
|
|
101
99
|
|
|
102
|
-
↵ select
|
|
100
|
+
↵ select ↑↓ navigate ^k actions"
|
|
103
101
|
`)
|
|
104
102
|
|
|
105
|
-
await
|
|
103
|
+
await session.press('enter')
|
|
106
104
|
|
|
107
|
-
const afterEnterSnapshot = await
|
|
105
|
+
const afterEnterSnapshot = await session.text()
|
|
108
106
|
expect(afterEnterSnapshot).toMatchInlineSnapshot(`
|
|
109
107
|
"
|
|
110
108
|
|
|
111
109
|
|
|
110
|
+
Simple List Example ────────────────────────────────────────────
|
|
112
111
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
A crunchy orange vegetable rich in vitamins.
|
|
116
|
-
|
|
117
|
-
## Health Benefits
|
|
118
|
-
- Excellent source of beta carotene
|
|
119
|
-
- Improves eye health
|
|
120
|
-
- Boosts immune system
|
|
121
|
-
- Low in calories
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
112
|
+
Search items...
|
|
129
113
|
|
|
114
|
+
Fruits ▲
|
|
115
|
+
Apple Red and sweet Fresh [Popular] ▀
|
|
116
|
+
Banana Yellow and nutritious Ripe
|
|
117
|
+
›Orange Citrus and juicy Fresh
|
|
118
|
+
Grape Sweet clusters [Seasonal]
|
|
119
|
+
Mango Tropical delight Imported
|
|
120
|
+
Pineapple Sweet and tangy
|
|
121
|
+
Strawberry Red and sweet [Popular]
|
|
122
|
+
▼
|
|
130
123
|
|
|
131
124
|
|
|
132
|
-
|
|
125
|
+
↵ select ↑↓ navigate ^k actions"
|
|
133
126
|
`)
|
|
134
127
|
|
|
135
128
|
// Go back to list with Escape
|
|
136
|
-
await
|
|
129
|
+
await session.press('esc')
|
|
137
130
|
|
|
138
|
-
const afterEscapeSnapshot = await
|
|
131
|
+
const afterEscapeSnapshot = await session.text()
|
|
139
132
|
expect(afterEscapeSnapshot).toMatchInlineSnapshot(`
|
|
140
133
|
"
|
|
141
134
|
|
|
135
|
+
|
|
142
136
|
Simple List Example ────────────────────────────────────────────
|
|
143
137
|
|
|
144
138
|
Search items...
|
|
145
139
|
|
|
140
|
+
Fruits ▲
|
|
141
|
+
Apple Red and sweet Fresh [Popular] ▀
|
|
142
|
+
Banana Yellow and nutritious Ripe
|
|
143
|
+
›Orange Citrus and juicy Fresh
|
|
144
|
+
Grape Sweet clusters [Seasonal]
|
|
145
|
+
Mango Tropical delight Imported
|
|
146
|
+
Pineapple Sweet and tangy
|
|
147
|
+
Strawberry Red and sweet [Popular]
|
|
148
|
+
▼
|
|
146
149
|
|
|
147
|
-
Empty section should be hidden
|
|
148
150
|
|
|
149
|
-
|
|
150
|
-
›Apple Red and sweet Fresh [Popular]
|
|
151
|
-
Banana Yellow and nutritious Ripe
|
|
152
|
-
|
|
153
|
-
Vegetables
|
|
154
|
-
Carrot Orange and crunchy [Healthy]
|
|
155
|
-
Lettuce Green and fresh
|
|
156
|
-
Bread Freshly baked Today [New]
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
↵ select ↑↓ navigate ^k actions"
|
|
151
|
+
↵ select ↑↓ navigate ^k actions"
|
|
160
152
|
`)
|
|
161
153
|
})
|
|
162
154
|
|
|
163
155
|
test('list with sections search functionality', async () => {
|
|
164
|
-
await
|
|
156
|
+
await session.text({
|
|
165
157
|
waitFor: (text) => {
|
|
166
158
|
// wait for list to show up
|
|
167
159
|
return /search/i.test(text)
|
|
168
160
|
},
|
|
169
161
|
})
|
|
170
162
|
|
|
171
|
-
await
|
|
163
|
+
await session.type('ban')
|
|
172
164
|
|
|
173
|
-
const afterSearchBanSnapshot = await
|
|
165
|
+
const afterSearchBanSnapshot = await session.text({
|
|
174
166
|
waitFor: (text) => {
|
|
175
167
|
return /\bban\b/.test(text)
|
|
176
168
|
},
|
|
@@ -179,23 +171,32 @@ test('list with sections search functionality', async () => {
|
|
|
179
171
|
expect(afterSearchBanSnapshot).toMatchInlineSnapshot(`
|
|
180
172
|
"
|
|
181
173
|
|
|
174
|
+
|
|
182
175
|
Simple List Example ────────────────────────────────────────────
|
|
183
176
|
|
|
184
177
|
ban
|
|
185
178
|
|
|
186
|
-
Banana Yellow and nutritious
|
|
179
|
+
Banana Yellow and nutritious Ripe
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
187
183
|
|
|
188
184
|
|
|
189
|
-
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
↵ select ↑↓ navigate ^k actions"
|
|
190
191
|
`)
|
|
191
192
|
|
|
192
193
|
// Clear search and type "let" to search for Lettuce
|
|
193
|
-
await
|
|
194
|
-
await
|
|
195
|
-
await
|
|
196
|
-
await
|
|
194
|
+
await session.press('backspace')
|
|
195
|
+
await session.press('backspace')
|
|
196
|
+
await session.press('backspace')
|
|
197
|
+
await session.type('let')
|
|
197
198
|
|
|
198
|
-
const afterSearchLetSnapshot = await
|
|
199
|
+
const afterSearchLetSnapshot = await session.text({
|
|
199
200
|
waitFor: (text) => {
|
|
200
201
|
return /\blet\b/.test(text)
|
|
201
202
|
},
|
|
@@ -204,49 +205,57 @@ test('list with sections search functionality', async () => {
|
|
|
204
205
|
expect(afterSearchLetSnapshot).toMatchInlineSnapshot(`
|
|
205
206
|
"
|
|
206
207
|
|
|
208
|
+
|
|
207
209
|
Simple List Example ────────────────────────────────────────────
|
|
208
210
|
|
|
209
211
|
let
|
|
210
212
|
|
|
213
|
+
|
|
211
214
|
Lettuce Green and fresh
|
|
212
215
|
|
|
213
216
|
|
|
214
|
-
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
↵ select ↑↓ navigate ^k actions"
|
|
215
225
|
`)
|
|
216
226
|
|
|
217
227
|
// Clear search to show all items again
|
|
218
|
-
await
|
|
219
|
-
await
|
|
220
|
-
await
|
|
228
|
+
await session.press('backspace')
|
|
229
|
+
await session.press('backspace')
|
|
230
|
+
await session.press('backspace')
|
|
221
231
|
|
|
222
|
-
const afterClearSearchSnapshot = await
|
|
232
|
+
const afterClearSearchSnapshot = await session.text()
|
|
223
233
|
expect(afterClearSearchSnapshot).toMatchInlineSnapshot(`
|
|
224
234
|
"
|
|
225
235
|
|
|
236
|
+
|
|
226
237
|
Simple List Example ────────────────────────────────────────────
|
|
227
238
|
|
|
228
239
|
Search items...
|
|
229
240
|
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
Lettuce Green and fresh
|
|
240
|
-
Bread Freshly baked Today [New]
|
|
241
|
+
Fruits ▲
|
|
242
|
+
›Apple Red and sweet Fresh [Popular] ▀
|
|
243
|
+
Banana Yellow and nutritious Ripe
|
|
244
|
+
Orange Citrus and juicy Fresh
|
|
245
|
+
Grape Sweet clusters [Seasonal]
|
|
246
|
+
Mango Tropical delight Imported
|
|
247
|
+
Pineapple Sweet and tangy
|
|
248
|
+
Strawberry Red and sweet [Popular]
|
|
249
|
+
▼
|
|
241
250
|
|
|
242
251
|
|
|
243
|
-
↵ select
|
|
252
|
+
↵ select ↑↓ navigate ^k actions"
|
|
244
253
|
`)
|
|
245
254
|
|
|
246
255
|
// Search for "bread"
|
|
247
|
-
await
|
|
256
|
+
await session.type('bread')
|
|
248
257
|
|
|
249
|
-
const afterSearchBreadSnapshot = await
|
|
258
|
+
const afterSearchBreadSnapshot = await session.text({
|
|
250
259
|
waitFor: (text) => {
|
|
251
260
|
return /bread/i.test(text)
|
|
252
261
|
},
|
|
@@ -255,137 +264,142 @@ test('list with sections search functionality', async () => {
|
|
|
255
264
|
expect(afterSearchBreadSnapshot).toMatchInlineSnapshot(`
|
|
256
265
|
"
|
|
257
266
|
|
|
267
|
+
|
|
258
268
|
Simple List Example ────────────────────────────────────────────
|
|
259
269
|
|
|
260
270
|
bread
|
|
261
271
|
|
|
262
|
-
Bread Freshly baked Today [New]
|
|
263
272
|
|
|
264
273
|
|
|
265
|
-
|
|
266
|
-
`)
|
|
274
|
+
Bread Freshly baked Today [New]
|
|
267
275
|
|
|
268
|
-
// Select the bread item
|
|
269
|
-
await driver.keys.enter()
|
|
270
|
-
|
|
271
|
-
const afterSelectBreadSnapshot = await driver.text()
|
|
272
|
-
expect(afterSelectBreadSnapshot).toMatchInlineSnapshot(`
|
|
273
|
-
"
|
|
274
276
|
|
|
275
|
-
Simple List Example ────────────────────────────────────────────
|
|
276
277
|
|
|
277
|
-
bread
|
|
278
278
|
|
|
279
|
-
Bread Freshly baked Today [New]
|
|
280
279
|
|
|
281
280
|
|
|
282
|
-
↵ select ↑↓ navigate ^k actions
|
|
283
281
|
|
|
284
282
|
|
|
283
|
+
↵ select ↑↓ navigate ^k actions"
|
|
284
|
+
`)
|
|
285
285
|
|
|
286
|
-
|
|
286
|
+
// Select the bread item
|
|
287
|
+
await session.press('enter')
|
|
287
288
|
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
289
|
+
const afterSelectBreadSnapshot = await session.text()
|
|
290
|
+
expect(afterSelectBreadSnapshot).toMatchInlineSnapshot(`
|
|
291
|
+
"
|
|
291
292
|
|
|
292
293
|
|
|
293
|
-
|
|
294
|
+
Simple List Example ────────────────────────────────────────────
|
|
295
|
+
|
|
296
|
+
bread
|
|
297
|
+
|
|
298
|
+
┃ ┃
|
|
299
|
+
┃ esc ┃
|
|
300
|
+
┃ ┃
|
|
301
|
+
┃ Search actions... ┃
|
|
302
|
+
┃ ┃
|
|
303
|
+
┃ ›View Details ┃
|
|
304
|
+
┃ Add to Cart ┃
|
|
305
|
+
┃ ┃
|
|
306
|
+
┃ ┃
|
|
307
|
+
┃ ┃
|
|
308
|
+
┃ ┃
|
|
309
|
+
┃ ┃
|
|
310
|
+
┃ ┃
|
|
311
|
+
┃ ┃"
|
|
294
312
|
`)
|
|
295
313
|
}, 10000)
|
|
296
314
|
|
|
297
315
|
test('list click functionality', async () => {
|
|
298
|
-
await
|
|
316
|
+
await session.text({
|
|
299
317
|
waitFor: (text) => {
|
|
300
|
-
// wait for list to show up
|
|
301
318
|
return /search/i.test(text)
|
|
302
319
|
},
|
|
303
320
|
})
|
|
304
321
|
|
|
305
|
-
// Click on "
|
|
306
|
-
await
|
|
322
|
+
// Click on "Banana" item (visible in initial view)
|
|
323
|
+
await session.click('Banana', { first: true })
|
|
307
324
|
|
|
308
|
-
const
|
|
309
|
-
expect(
|
|
325
|
+
const afterClickBananaSnapshot = await session.text()
|
|
326
|
+
expect(afterClickBananaSnapshot).toMatchInlineSnapshot(`
|
|
310
327
|
"
|
|
311
328
|
|
|
329
|
+
|
|
312
330
|
Simple List Example ────────────────────────────────────────────
|
|
313
331
|
|
|
314
332
|
Search items...
|
|
315
333
|
|
|
334
|
+
Fruits ▲
|
|
335
|
+
Apple Red and sweet Fresh [Popular] ▀
|
|
336
|
+
›Banana Yellow and nutritious Ripe
|
|
337
|
+
Orange Citrus and juicy Fresh
|
|
338
|
+
Grape Sweet clusters [Seasonal]
|
|
339
|
+
Mango Tropical delight Imported
|
|
340
|
+
Pineapple Sweet and tangy
|
|
341
|
+
Strawberry Red and sweet [Popular]
|
|
342
|
+
▼
|
|
316
343
|
|
|
317
|
-
Empty section should be hidden
|
|
318
|
-
|
|
319
|
-
Fruits
|
|
320
|
-
Apple Red and sweet Fresh [Popular]
|
|
321
|
-
Banana Yellow and nutritious Ripe
|
|
322
344
|
|
|
323
|
-
|
|
324
|
-
Carrot Orange and crunchy [Healthy]
|
|
325
|
-
›Lettuce Green and fresh
|
|
326
|
-
Bread Freshly baked Today [New]
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
↵ select ↑↓ navigate ^k actions"
|
|
345
|
+
↵ select ↑↓ navigate ^k actions"
|
|
330
346
|
`)
|
|
331
347
|
|
|
332
348
|
// Click on "Apple" item
|
|
333
|
-
await
|
|
349
|
+
await session.click('Apple', { first: true })
|
|
334
350
|
|
|
335
|
-
const afterClickAppleSnapshot = await
|
|
351
|
+
const afterClickAppleSnapshot = await session.text()
|
|
336
352
|
expect(afterClickAppleSnapshot).toMatchInlineSnapshot(`
|
|
337
353
|
"
|
|
338
354
|
|
|
355
|
+
|
|
339
356
|
Simple List Example ────────────────────────────────────────────
|
|
340
357
|
|
|
341
358
|
Search items...
|
|
342
359
|
|
|
360
|
+
Fruits ▲
|
|
361
|
+
›Apple Red and sweet Fresh [Popular] ▀
|
|
362
|
+
Banana Yellow and nutritious Ripe
|
|
363
|
+
Orange Citrus and juicy Fresh
|
|
364
|
+
Grape Sweet clusters [Seasonal]
|
|
365
|
+
Mango Tropical delight Imported
|
|
366
|
+
Pineapple Sweet and tangy
|
|
367
|
+
Strawberry Red and sweet [Popular]
|
|
368
|
+
▼
|
|
343
369
|
|
|
344
|
-
Empty section should be hidden
|
|
345
370
|
|
|
346
|
-
|
|
347
|
-
›Apple Red and sweet Fresh [Popular]
|
|
348
|
-
Banana Yellow and nutritious Ripe
|
|
349
|
-
|
|
350
|
-
Vegetables
|
|
351
|
-
Carrot Orange and crunchy [Healthy]
|
|
352
|
-
Lettuce Green and fresh
|
|
353
|
-
Bread Freshly baked Today [New]
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
↵ select ↑↓ navigate ^k actions"
|
|
371
|
+
↵ select ↑↓ navigate ^k actions"
|
|
357
372
|
`)
|
|
358
373
|
|
|
359
|
-
// Click on
|
|
360
|
-
await
|
|
374
|
+
// Click on "Grape" item (visible in initial view)
|
|
375
|
+
await session.click('Grape', { first: true })
|
|
361
376
|
|
|
362
|
-
const
|
|
363
|
-
expect(
|
|
377
|
+
const afterClickGrapeSnapshot = await session.text()
|
|
378
|
+
expect(afterClickGrapeSnapshot).toMatchInlineSnapshot(`
|
|
364
379
|
"
|
|
365
380
|
|
|
381
|
+
|
|
366
382
|
Simple List Example ────────────────────────────────────────────
|
|
367
383
|
|
|
368
384
|
Search items...
|
|
369
385
|
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
Lettuce Green and fresh
|
|
380
|
-
›Bread Freshly baked Today [New]
|
|
386
|
+
Fruits ▲
|
|
387
|
+
Apple Red and sweet Fresh [Popular] ▀
|
|
388
|
+
Banana Yellow and nutritious Ripe
|
|
389
|
+
Orange Citrus and juicy Fresh
|
|
390
|
+
›Grape Sweet clusters [Seasonal]
|
|
391
|
+
Mango Tropical delight Imported
|
|
392
|
+
Pineapple Sweet and tangy
|
|
393
|
+
Strawberry Red and sweet [Popular]
|
|
394
|
+
▼
|
|
381
395
|
|
|
382
396
|
|
|
383
|
-
↵ select
|
|
397
|
+
↵ select ↑↓ navigate ^k actions"
|
|
384
398
|
`)
|
|
385
399
|
}, 10000)
|
|
386
400
|
|
|
387
401
|
test('list actions panel with ctrl+k', async () => {
|
|
388
|
-
await
|
|
402
|
+
await session.text({
|
|
389
403
|
waitFor: (text) => {
|
|
390
404
|
// wait for list to show up
|
|
391
405
|
return /search/i.test(text)
|
|
@@ -393,87 +407,245 @@ test('list actions panel with ctrl+k', async () => {
|
|
|
393
407
|
})
|
|
394
408
|
|
|
395
409
|
// Press ctrl+k to open actions panel
|
|
396
|
-
await
|
|
410
|
+
await session.press(['ctrl', 'k'])
|
|
397
411
|
|
|
398
|
-
const afterCtrlKSnapshot = await
|
|
412
|
+
const afterCtrlKSnapshot = await session.text()
|
|
399
413
|
expect(afterCtrlKSnapshot).toMatchInlineSnapshot(`
|
|
400
414
|
"
|
|
401
415
|
|
|
416
|
+
|
|
417
|
+
Simple List Example ────────────────────────────────────────────
|
|
418
|
+
|
|
419
|
+
Search items...
|
|
420
|
+
|
|
421
|
+
┃ ┃
|
|
422
|
+
┃ esc ┃
|
|
423
|
+
┃ ┃
|
|
424
|
+
┃ Search actions... ┃
|
|
425
|
+
┃ ┃
|
|
426
|
+
┃ ›View Details ┃
|
|
427
|
+
┃ Add to Cart ┃
|
|
428
|
+
┃ ┃
|
|
429
|
+
┃ ┃
|
|
430
|
+
┃ ┃
|
|
431
|
+
┃ ┃
|
|
432
|
+
┃ ┃
|
|
433
|
+
┃ ┃
|
|
434
|
+
┃ ┃"
|
|
435
|
+
`)
|
|
436
|
+
|
|
437
|
+
// Navigate down to second action
|
|
438
|
+
await session.press('down')
|
|
439
|
+
|
|
440
|
+
const afterDownInActionsSnapshot = await session.text()
|
|
441
|
+
expect(afterDownInActionsSnapshot).toMatchInlineSnapshot(`
|
|
442
|
+
"
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
Simple List Example ────────────────────────────────────────────
|
|
446
|
+
|
|
447
|
+
Search items...
|
|
448
|
+
|
|
449
|
+
┃ ┃
|
|
450
|
+
┃ esc ┃
|
|
451
|
+
┃ ┃
|
|
452
|
+
┃ Search actions... ┃
|
|
453
|
+
┃ ┃
|
|
454
|
+
┃ View Details ┃
|
|
455
|
+
┃ ›Add to Cart ┃
|
|
456
|
+
┃ ┃
|
|
457
|
+
┃ ┃
|
|
458
|
+
┃ ┃
|
|
459
|
+
┃ ┃
|
|
460
|
+
┃ ┃
|
|
461
|
+
┃ ┃
|
|
462
|
+
┃ ┃"
|
|
463
|
+
`)
|
|
464
|
+
|
|
465
|
+
// Trigger the second action (Add to Cart)
|
|
466
|
+
await session.press('enter')
|
|
467
|
+
|
|
468
|
+
const afterSelectSecondActionSnapshot = await session.text()
|
|
469
|
+
expect(afterSelectSecondActionSnapshot).toMatchInlineSnapshot(`
|
|
470
|
+
"
|
|
471
|
+
|
|
472
|
+
|
|
402
473
|
Simple List Example ────────────────────────────────────────────
|
|
403
474
|
|
|
404
475
|
Search items...
|
|
405
476
|
|
|
477
|
+
Fruits ▲
|
|
478
|
+
›Apple Red and sweet Fresh [Popular] ▀
|
|
479
|
+
Banana Yellow and nutritious Ripe
|
|
480
|
+
Orange Citrus and juicy Fresh
|
|
481
|
+
Grape Sweet clusters [Seasonal]
|
|
482
|
+
Mango Tropical delight Imported
|
|
483
|
+
Pineapple Sweet and tangy
|
|
484
|
+
Strawberry Red and sweet [Popular]
|
|
485
|
+
▼
|
|
486
|
+
|
|
487
|
+
|
|
488
|
+
↵ sel┌─────────────────────────────────────────────────────┐
|
|
489
|
+
│ ✓ Added to Cart - Apple has been added to your cart │
|
|
490
|
+
└─────────────────────────────────────────────────────┘"
|
|
491
|
+
`)
|
|
492
|
+
}, 10000)
|
|
493
|
+
|
|
494
|
+
test('empty sections should be hidden', async () => {
|
|
495
|
+
await session.text({
|
|
496
|
+
waitFor: (text) => {
|
|
497
|
+
return /search/i.test(text)
|
|
498
|
+
},
|
|
499
|
+
})
|
|
500
|
+
|
|
501
|
+
const snapshot = await session.text()
|
|
502
|
+
expect(snapshot).not.toContain('Empty section should be hidden')
|
|
503
|
+
}, 10000)
|
|
504
|
+
|
|
505
|
+
test('list scrollbox scrolling with sections', async () => {
|
|
506
|
+
await session.text({
|
|
507
|
+
waitFor: (text) => {
|
|
508
|
+
return /search/i.test(text)
|
|
509
|
+
},
|
|
510
|
+
})
|
|
511
|
+
|
|
512
|
+
const initialSnapshot = await session.text()
|
|
513
|
+
expect(initialSnapshot).toMatchInlineSnapshot(`
|
|
514
|
+
"
|
|
406
515
|
|
|
407
|
-
Empty section should be hidden
|
|
408
516
|
|
|
409
|
-
|
|
410
|
-
›Apple Red and sweet Fresh [Popular]
|
|
411
|
-
Banana Yellow and nutritious Ripe
|
|
517
|
+
Simple List Example ────────────────────────────────────────────
|
|
412
518
|
|
|
413
|
-
|
|
519
|
+
Search items...
|
|
414
520
|
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
521
|
+
Fruits ▲
|
|
522
|
+
›Apple Red and sweet Fresh [Popular] ▀
|
|
523
|
+
Banana Yellow and nutritious Ripe
|
|
524
|
+
Orange Citrus and juicy Fresh
|
|
525
|
+
Grape Sweet clusters [Seasonal]
|
|
526
|
+
Mango Tropical delight Imported
|
|
527
|
+
Pineapple Sweet and tangy
|
|
528
|
+
Strawberry Red and sweet [Popular]
|
|
529
|
+
▼
|
|
418
530
|
|
|
419
531
|
|
|
420
|
-
|
|
532
|
+
↵ select ↑↓ navigate ^k actions"
|
|
421
533
|
`)
|
|
422
534
|
|
|
423
|
-
// Navigate down
|
|
424
|
-
await
|
|
535
|
+
// Navigate down through Fruits section
|
|
536
|
+
await session.press('down') // Banana
|
|
537
|
+
await session.press('down') // Orange
|
|
538
|
+
await session.press('down') // Grape
|
|
539
|
+
await session.press('down') // Mango
|
|
540
|
+
await session.press('down') // Pineapple
|
|
541
|
+
await session.press('down') // Strawberry (last fruit)
|
|
425
542
|
|
|
426
|
-
const
|
|
427
|
-
expect(
|
|
543
|
+
const afterFruitsSnapshot = await session.text()
|
|
544
|
+
expect(afterFruitsSnapshot).toMatchInlineSnapshot(`
|
|
428
545
|
"
|
|
429
546
|
|
|
547
|
+
|
|
430
548
|
Simple List Example ────────────────────────────────────────────
|
|
431
549
|
|
|
432
550
|
Search items...
|
|
433
551
|
|
|
552
|
+
Fruits ▲
|
|
553
|
+
Apple Red and sweet Fresh [Popular] ▀
|
|
554
|
+
Banana Yellow and nutritious Ripe
|
|
555
|
+
Orange Citrus and juicy Fresh
|
|
556
|
+
Grape Sweet clusters [Seasonal]
|
|
557
|
+
Mango Tropical delight Imported
|
|
558
|
+
Pineapple Sweet and tangy
|
|
559
|
+
›Strawberry Red and sweet [Popular]
|
|
560
|
+
▼
|
|
561
|
+
|
|
562
|
+
|
|
563
|
+
↵ select ↑↓ navigate ^k actions"
|
|
564
|
+
`)
|
|
434
565
|
|
|
435
|
-
|
|
566
|
+
// Continue to Vegetables section
|
|
567
|
+
await session.press('down') // Carrot (first vegetable)
|
|
568
|
+
await session.press('down') // Lettuce
|
|
569
|
+
await session.press('down') // Broccoli
|
|
436
570
|
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
571
|
+
const afterVegetablesSnapshot = await session.text()
|
|
572
|
+
expect(afterVegetablesSnapshot).toMatchInlineSnapshot(`
|
|
573
|
+
"
|
|
440
574
|
|
|
441
|
-
esc
|
|
442
575
|
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
576
|
+
Simple List Example ────────────────────────────────────────────
|
|
577
|
+
|
|
578
|
+
Search items...
|
|
446
579
|
|
|
580
|
+
Grape Sweet clusters [Seasonal] ▲
|
|
581
|
+
Mango Tropical delight Imported
|
|
582
|
+
Pineapple Sweet and tangy
|
|
583
|
+
Strawberry Red and sweet [Popular] ▄
|
|
447
584
|
|
|
448
|
-
|
|
585
|
+
Vegetables
|
|
586
|
+
Carrot Orange and crunchy [Healthy]
|
|
587
|
+
Lettuce Green and fresh
|
|
588
|
+
›Broccoli Green florets [Healthy] ▼
|
|
589
|
+
|
|
590
|
+
|
|
591
|
+
↵ select ↑↓ navigate ^k actions"
|
|
449
592
|
`)
|
|
450
593
|
|
|
451
|
-
//
|
|
452
|
-
await
|
|
594
|
+
// Navigate to the last items
|
|
595
|
+
await session.press('down') // Spinach
|
|
596
|
+
await session.press('down') // Tomato
|
|
597
|
+
await session.press('down') // Cucumber
|
|
598
|
+
await session.press('down') // Bell Pepper
|
|
599
|
+
await session.press('down') // Bread (last item)
|
|
453
600
|
|
|
454
|
-
const
|
|
455
|
-
expect(
|
|
601
|
+
const afterLastItemSnapshot = await session.text()
|
|
602
|
+
expect(afterLastItemSnapshot).toMatchInlineSnapshot(`
|
|
456
603
|
"
|
|
457
604
|
|
|
605
|
+
|
|
458
606
|
Simple List Example ────────────────────────────────────────────
|
|
459
607
|
|
|
460
608
|
Search items...
|
|
461
609
|
|
|
610
|
+
Carrot Orange and crunchy [Healthy] ▲
|
|
611
|
+
Lettuce Green and fresh
|
|
612
|
+
Broccoli Green florets [Healthy]
|
|
613
|
+
Spinach Leafy greens Organic
|
|
614
|
+
Tomato Red and ripe
|
|
615
|
+
Cucumber Cool and crisp
|
|
616
|
+
Bell Pepper Colorful and crunchy [Fresh]
|
|
617
|
+
▄
|
|
618
|
+
›Bread Freshly baked Today [New] ▼
|
|
462
619
|
|
|
463
|
-
Empty section should be hidden
|
|
464
620
|
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
Banana Yellow and nutritious Ripe
|
|
621
|
+
↵ select ↑↓ navigate ^k actions"
|
|
622
|
+
`)
|
|
468
623
|
|
|
469
|
-
|
|
470
|
-
|
|
624
|
+
// Navigate back up to top
|
|
625
|
+
for (let i = 0; i < 15; i++) {
|
|
626
|
+
await session.press('up')
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
const afterScrollBackUpSnapshot = await session.text()
|
|
630
|
+
expect(afterScrollBackUpSnapshot).toMatchInlineSnapshot(`
|
|
631
|
+
"
|
|
632
|
+
|
|
633
|
+
|
|
634
|
+
Simple List Example ────────────────────────────────────────────
|
|
635
|
+
|
|
636
|
+
Search items...
|
|
637
|
+
|
|
638
|
+
Carrot Orange and crunchy [Healthy] ▲
|
|
471
639
|
Lettuce Green and fresh
|
|
472
|
-
|
|
640
|
+
Broccoli Green florets [Healthy]
|
|
641
|
+
Spinach Leafy greens Organic
|
|
642
|
+
Tomato Red and ripe
|
|
643
|
+
Cucumber Cool and crisp
|
|
644
|
+
Bell Pepper Colorful and crunchy [Fresh]
|
|
645
|
+
▄
|
|
646
|
+
›Bread Freshly baked Today [New] ▼
|
|
473
647
|
|
|
474
648
|
|
|
475
|
-
|
|
476
|
-
│ ✓ Added to Cart - Apple has been added to your cart │
|
|
477
|
-
└─────────────────────────────────────────────────────┘"
|
|
649
|
+
↵ select ↑↓ navigate ^k actions"
|
|
478
650
|
`)
|
|
479
|
-
},
|
|
651
|
+
}, 15000)
|