termcast 1.3.10 → 1.3.16
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,22 +1,23 @@
|
|
|
1
|
-
// node-pty does not work in bun, so we use vitest to run this test
|
|
2
1
|
import { test, expect, afterEach, beforeEach } from 'vitest'
|
|
3
|
-
import {
|
|
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/simple-navigation.tsx'],
|
|
9
10
|
cols: 70,
|
|
10
|
-
rows:
|
|
11
|
+
rows: 25,
|
|
11
12
|
})
|
|
12
13
|
})
|
|
13
14
|
|
|
14
15
|
afterEach(() => {
|
|
15
|
-
|
|
16
|
+
session?.close()
|
|
16
17
|
})
|
|
17
18
|
|
|
18
19
|
test('navigation between main and detail views', async () => {
|
|
19
|
-
await
|
|
20
|
+
await session.text({
|
|
20
21
|
waitFor: (text) => {
|
|
21
22
|
// wait for main view to show up
|
|
22
23
|
return /Navigation Example/i.test(text)
|
|
@@ -24,80 +25,105 @@ test('navigation between main and detail views', async () => {
|
|
|
24
25
|
})
|
|
25
26
|
|
|
26
27
|
// Small delay to ensure all items are rendered
|
|
27
|
-
await
|
|
28
|
+
await session.waitIdle()
|
|
28
29
|
|
|
29
|
-
const initialSnapshot = await
|
|
30
|
+
const initialSnapshot = await session.text()
|
|
30
31
|
|
|
31
32
|
expect(initialSnapshot).toMatchInlineSnapshot(`
|
|
32
33
|
"
|
|
33
34
|
|
|
35
|
+
|
|
34
36
|
Navigation Example ─────────────────────────────────────────────
|
|
35
37
|
|
|
36
38
|
Main view
|
|
37
39
|
|
|
38
|
-
|
|
39
40
|
Items
|
|
40
41
|
›First Item Navigate to first detail
|
|
41
42
|
Second Item Navigate to second detail
|
|
42
43
|
Third Item Navigate to third detail
|
|
43
44
|
|
|
44
45
|
|
|
45
|
-
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
↵ select ↑↓ navigate ^k actions"
|
|
46
57
|
`)
|
|
47
58
|
|
|
48
59
|
// Navigate to second item
|
|
49
|
-
await
|
|
60
|
+
await session.press('down')
|
|
50
61
|
|
|
51
|
-
const afterDownSnapshot = await
|
|
62
|
+
const afterDownSnapshot = await session.text()
|
|
52
63
|
expect(afterDownSnapshot).toMatchInlineSnapshot(`
|
|
53
64
|
"
|
|
54
65
|
|
|
66
|
+
|
|
55
67
|
Navigation Example ─────────────────────────────────────────────
|
|
56
68
|
|
|
57
69
|
Main view
|
|
58
70
|
|
|
59
|
-
|
|
60
71
|
Items
|
|
61
72
|
First Item Navigate to first detail
|
|
62
73
|
›Second Item Navigate to second detail
|
|
63
74
|
Third Item Navigate to third detail
|
|
64
75
|
|
|
65
76
|
|
|
66
|
-
↵ select ↑↓ navigate ^k actions"
|
|
67
|
-
`)
|
|
68
77
|
|
|
69
|
-
// Press Enter to open actions panel
|
|
70
|
-
await driver.keys.enter()
|
|
71
78
|
|
|
72
|
-
const actionsOpenSnapshot = await driver.text()
|
|
73
|
-
expect(actionsOpenSnapshot).toMatchInlineSnapshot(`
|
|
74
|
-
"
|
|
75
79
|
|
|
76
|
-
Navigation Example ─────────────────────────────────────────────
|
|
77
80
|
|
|
78
|
-
Main view
|
|
79
81
|
|
|
80
82
|
|
|
81
|
-
Items
|
|
82
|
-
First Item Navigate to first detail
|
|
83
|
-
›Second Item Navigate to second detail
|
|
84
|
-
Third Item Navigate to third detail
|
|
85
83
|
|
|
86
84
|
|
|
87
|
-
esc
|
|
88
85
|
|
|
89
|
-
Search actions...
|
|
90
|
-
›Open Details
|
|
91
|
-
Copy Title
|
|
92
86
|
|
|
87
|
+
↵ select ↑↓ navigate ^k actions"
|
|
88
|
+
`)
|
|
93
89
|
|
|
94
|
-
|
|
90
|
+
// Press Enter to open actions panel
|
|
91
|
+
await session.press('enter')
|
|
92
|
+
|
|
93
|
+
const actionsOpenSnapshot = await session.text()
|
|
94
|
+
expect(actionsOpenSnapshot).toMatchInlineSnapshot(`
|
|
95
|
+
"
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
Navigation Example ─────────────────────────────────────────────
|
|
99
|
+
|
|
100
|
+
Main view
|
|
101
|
+
|
|
102
|
+
Items
|
|
103
|
+
┃ ┃
|
|
104
|
+
┃ esc ┃
|
|
105
|
+
┃ ┃
|
|
106
|
+
┃ Search actions... ┃
|
|
107
|
+
┃ ┃
|
|
108
|
+
┃ ›Open Details ┃
|
|
109
|
+
┃ Copy Title ┃
|
|
110
|
+
┃ ┃
|
|
111
|
+
┃ ┃
|
|
112
|
+
┃ ┃
|
|
113
|
+
┃ ┃
|
|
114
|
+
┃ ┃
|
|
115
|
+
┃ ┃
|
|
116
|
+
┃ ┃
|
|
117
|
+
┃ ┃
|
|
118
|
+
┃ ┃
|
|
119
|
+
┃ ↵ select ↑↓ navigate ┃
|
|
120
|
+
┃ ┃"
|
|
95
121
|
`)
|
|
96
122
|
|
|
97
123
|
// Press Enter again to select "Open Details" action
|
|
98
|
-
await
|
|
124
|
+
await session.press('enter')
|
|
99
125
|
|
|
100
|
-
const detailViewSnapshot = await
|
|
126
|
+
const detailViewSnapshot = await session.text({
|
|
101
127
|
waitFor: (text) => {
|
|
102
128
|
// wait for detail view to show up
|
|
103
129
|
return /Detail: Second Item/i.test(text)
|
|
@@ -106,173 +132,237 @@ test('navigation between main and detail views', async () => {
|
|
|
106
132
|
expect(detailViewSnapshot).toMatchInlineSnapshot(`
|
|
107
133
|
"
|
|
108
134
|
|
|
135
|
+
|
|
109
136
|
Detail: Second Item ────────────────────────────────────────────
|
|
110
137
|
|
|
111
138
|
Detail view - Press ESC to go back
|
|
112
139
|
|
|
113
|
-
|
|
114
140
|
Details
|
|
115
|
-
›This is the detail view for Second Item Press Enter to go back
|
|
141
|
+
›This is the detail view for Second Item Press Enter to go back
|
|
142
|
+
|
|
116
143
|
|
|
117
144
|
|
|
118
|
-
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
↵ select ↑↓ navigate ^k actions"
|
|
119
157
|
`)
|
|
120
158
|
|
|
121
159
|
// Press ESC to go back to main view
|
|
122
|
-
await
|
|
160
|
+
await session.press('esc')
|
|
123
161
|
|
|
124
|
-
const backToMainSnapshot = await
|
|
162
|
+
const backToMainSnapshot = await session.text({
|
|
125
163
|
waitFor: (text) => {
|
|
126
164
|
// wait for main view to show up again
|
|
127
165
|
return /Navigation Example/i.test(text)
|
|
128
166
|
},
|
|
129
167
|
})
|
|
130
168
|
expect(backToMainSnapshot).toMatchInlineSnapshot(`
|
|
131
|
-
|
|
169
|
+
"
|
|
170
|
+
|
|
132
171
|
|
|
133
|
-
|
|
172
|
+
Navigation Example ─────────────────────────────────────────────
|
|
173
|
+
|
|
174
|
+
Main view
|
|
134
175
|
|
|
135
|
-
|
|
176
|
+
Items
|
|
177
|
+
›First Item Navigate to first detail
|
|
178
|
+
Second Item Navigate to second detail
|
|
179
|
+
Third Item Navigate to third detail
|
|
136
180
|
|
|
137
181
|
|
|
138
|
-
Items
|
|
139
|
-
›First Item Navigate to first detail
|
|
140
|
-
Second Item Navigate to second detail
|
|
141
|
-
Third Item Navigate to third detail
|
|
142
182
|
|
|
143
183
|
|
|
144
|
-
↵ select ↑↓ navigate ^k actions"
|
|
145
|
-
`)
|
|
146
184
|
|
|
147
|
-
// Navigate down to third item (we're back at first item after ESC)
|
|
148
|
-
await driver.keys.down()
|
|
149
|
-
await driver.keys.down()
|
|
150
185
|
|
|
151
|
-
const thirdItemSnapshot = await driver.text()
|
|
152
|
-
expect(thirdItemSnapshot).toMatchInlineSnapshot(`
|
|
153
|
-
"
|
|
154
186
|
|
|
155
|
-
Navigation Example ─────────────────────────────────────────────
|
|
156
187
|
|
|
157
|
-
Main view
|
|
158
188
|
|
|
159
189
|
|
|
160
|
-
Items
|
|
161
|
-
First Item Navigate to first detail
|
|
162
|
-
Second Item Navigate to second detail
|
|
163
|
-
›Third Item Navigate to third detail
|
|
164
190
|
|
|
165
191
|
|
|
166
|
-
|
|
167
|
-
|
|
192
|
+
↵ select ↑↓ navigate ^k actions"
|
|
193
|
+
`)
|
|
168
194
|
|
|
169
|
-
//
|
|
170
|
-
await
|
|
195
|
+
// Navigate down to third item (we're back at first item after ESC)
|
|
196
|
+
await session.press('down')
|
|
197
|
+
await session.press('down')
|
|
171
198
|
|
|
172
|
-
const
|
|
173
|
-
expect(
|
|
199
|
+
const thirdItemSnapshot = await session.text()
|
|
200
|
+
expect(thirdItemSnapshot).toMatchInlineSnapshot(`
|
|
174
201
|
"
|
|
175
202
|
|
|
203
|
+
|
|
176
204
|
Navigation Example ─────────────────────────────────────────────
|
|
177
205
|
|
|
178
206
|
Main view
|
|
179
207
|
|
|
180
|
-
|
|
181
208
|
Items
|
|
182
209
|
First Item Navigate to first detail
|
|
183
210
|
Second Item Navigate to second detail
|
|
184
211
|
›Third Item Navigate to third detail
|
|
185
212
|
|
|
186
213
|
|
|
187
|
-
esc
|
|
188
214
|
|
|
189
|
-
Search actions...
|
|
190
|
-
›Open Details
|
|
191
|
-
Copy Title
|
|
192
215
|
|
|
193
216
|
|
|
194
|
-
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
↵ select ↑↓ navigate ^k actions"
|
|
225
|
+
`)
|
|
226
|
+
|
|
227
|
+
// Open action panel for third item
|
|
228
|
+
await session.press('enter')
|
|
229
|
+
|
|
230
|
+
const thirdActionsSnapshot = await session.text()
|
|
231
|
+
expect(thirdActionsSnapshot).toMatchInlineSnapshot(`
|
|
232
|
+
"
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
Navigation Example ─────────────────────────────────────────────
|
|
236
|
+
|
|
237
|
+
Main view
|
|
238
|
+
|
|
239
|
+
Items
|
|
240
|
+
┃ ┃
|
|
241
|
+
┃ esc ┃
|
|
242
|
+
┃ ┃
|
|
243
|
+
┃ Search actions... ┃
|
|
244
|
+
┃ ┃
|
|
245
|
+
┃ ›Open Details ┃
|
|
246
|
+
┃ Copy Title ┃
|
|
247
|
+
┃ ┃
|
|
248
|
+
┃ ┃
|
|
249
|
+
┃ ┃
|
|
250
|
+
┃ ┃
|
|
251
|
+
┃ ┃
|
|
252
|
+
┃ ┃
|
|
253
|
+
┃ ┃
|
|
254
|
+
┃ ┃
|
|
255
|
+
┃ ┃
|
|
256
|
+
┃ ↵ select ↑↓ navigate ┃
|
|
257
|
+
┃ ┃"
|
|
195
258
|
`)
|
|
196
259
|
|
|
197
260
|
// Navigate to detail
|
|
198
|
-
await
|
|
261
|
+
await session.press('enter')
|
|
199
262
|
|
|
200
|
-
const thirdDetailSnapshot = await
|
|
263
|
+
const thirdDetailSnapshot = await session.text({
|
|
201
264
|
waitFor: (text) => {
|
|
202
265
|
return /Detail: Third Item/i.test(text)
|
|
203
266
|
},
|
|
204
267
|
})
|
|
205
268
|
expect(thirdDetailSnapshot).toMatchInlineSnapshot(`
|
|
206
|
-
|
|
269
|
+
"
|
|
207
270
|
|
|
208
|
-
Detail: Third Item ─────────────────────────────────────────────
|
|
209
271
|
|
|
210
|
-
|
|
272
|
+
Detail: Third Item ─────────────────────────────────────────────
|
|
211
273
|
|
|
274
|
+
Detail view - Press ESC to go back
|
|
212
275
|
|
|
213
|
-
|
|
214
|
-
|
|
276
|
+
Details
|
|
277
|
+
›This is the detail view for Third Item Press Enter to go back o
|
|
215
278
|
|
|
216
279
|
|
|
217
|
-
↵ select ↑↓ navigate ^k actions"
|
|
218
|
-
`)
|
|
219
280
|
|
|
220
|
-
// Use Enter to open actions and go back
|
|
221
|
-
await driver.keys.enter()
|
|
222
281
|
|
|
223
|
-
const thirdDetailActionsSnapshot = await driver.text()
|
|
224
|
-
expect(thirdDetailActionsSnapshot).toMatchInlineSnapshot(`
|
|
225
|
-
"
|
|
226
282
|
|
|
227
|
-
Detail: Third Item ─────────────────────────────────────────────
|
|
228
283
|
|
|
229
|
-
Detail view - Press ESC to go back
|
|
230
284
|
|
|
231
285
|
|
|
232
|
-
Details
|
|
233
|
-
›This is the detail view for Third Item Press Enter to go back or ES
|
|
234
286
|
|
|
235
287
|
|
|
236
|
-
↵ select ↑↓ navigate ^k actions
|
|
237
288
|
|
|
238
|
-
esc
|
|
239
289
|
|
|
240
|
-
Search actions...
|
|
241
|
-
›Go Back
|
|
242
|
-
Copy Title
|
|
243
290
|
|
|
244
291
|
|
|
245
|
-
|
|
292
|
+
↵ select ↑↓ navigate ^k actions"
|
|
293
|
+
`)
|
|
294
|
+
|
|
295
|
+
// Use Enter to open actions and go back
|
|
296
|
+
await session.press('enter')
|
|
297
|
+
|
|
298
|
+
const thirdDetailActionsSnapshot = await session.text()
|
|
299
|
+
expect(thirdDetailActionsSnapshot).toMatchInlineSnapshot(`
|
|
300
|
+
"
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
Detail: Third Item ─────────────────────────────────────────────
|
|
304
|
+
|
|
305
|
+
Detail view - Press ESC to go back
|
|
306
|
+
|
|
307
|
+
Details
|
|
308
|
+
┃ ┃
|
|
309
|
+
┃ esc ┃
|
|
310
|
+
┃ ┃
|
|
311
|
+
┃ Search actions... ┃
|
|
312
|
+
┃ ┃
|
|
313
|
+
┃ ›Go Back ┃
|
|
314
|
+
┃ Copy Title ┃
|
|
315
|
+
┃ ┃
|
|
316
|
+
┃ ┃
|
|
317
|
+
┃ ┃
|
|
318
|
+
┃ ┃
|
|
319
|
+
┃ ┃
|
|
320
|
+
┃ ┃
|
|
321
|
+
┃ ┃
|
|
322
|
+
┃ ┃
|
|
323
|
+
┃ ┃
|
|
324
|
+
┃ ↵ select ↑↓ navigate ┃
|
|
325
|
+
┃ ┃"
|
|
246
326
|
`)
|
|
247
327
|
|
|
248
328
|
// Select "Go Back" action
|
|
249
|
-
await
|
|
329
|
+
await session.press('enter')
|
|
250
330
|
|
|
251
|
-
const backFromThirdSnapshot = await
|
|
331
|
+
const backFromThirdSnapshot = await session.text({
|
|
252
332
|
waitFor: (text) => {
|
|
253
333
|
return /Navigation Example/i.test(text)
|
|
254
334
|
},
|
|
255
335
|
})
|
|
256
336
|
expect(backFromThirdSnapshot).toMatchInlineSnapshot(`
|
|
257
|
-
|
|
337
|
+
"
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
Navigation Example ─────────────────────────────────────────────
|
|
341
|
+
|
|
342
|
+
Main view
|
|
343
|
+
|
|
344
|
+
Items
|
|
345
|
+
›First Item Navigate to first detail
|
|
346
|
+
Second Item Navigate to second detail
|
|
347
|
+
Third Item Navigate to third detail
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
|
|
258
352
|
|
|
259
|
-
Navigation Example ─────────────────────────────────────────────
|
|
260
353
|
|
|
261
|
-
Main view
|
|
262
354
|
|
|
263
355
|
|
|
264
|
-
Items
|
|
265
|
-
›First Item Navigate to first detail
|
|
266
|
-
Second Item Navigate to second detail
|
|
267
|
-
Third Item Navigate to third detail
|
|
268
356
|
|
|
269
357
|
|
|
270
|
-
|
|
271
|
-
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
↵ select ↑↓ navigate ^k actions"
|
|
361
|
+
`)
|
|
272
362
|
}, 15000)
|
|
273
363
|
|
|
274
364
|
test('navigation with actions panel', async () => {
|
|
275
|
-
await
|
|
365
|
+
await session.text({
|
|
276
366
|
waitFor: (text) => {
|
|
277
367
|
// wait for main view to show up
|
|
278
368
|
return /Navigation Example/i.test(text)
|
|
@@ -280,89 +370,110 @@ test('navigation with actions panel', async () => {
|
|
|
280
370
|
})
|
|
281
371
|
|
|
282
372
|
// Open actions panel with ctrl+k
|
|
283
|
-
await
|
|
373
|
+
await session.press(['ctrl', 'k'])
|
|
284
374
|
|
|
285
|
-
const actionsOpenSnapshot = await
|
|
375
|
+
const actionsOpenSnapshot = await session.text()
|
|
286
376
|
expect(actionsOpenSnapshot).toMatchInlineSnapshot(`
|
|
287
377
|
"
|
|
288
378
|
|
|
289
|
-
Navigation Example ─────────────────────────────────────────────
|
|
290
|
-
|
|
291
|
-
Main view
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
Items
|
|
295
|
-
›First Item Navigate to first detail
|
|
296
|
-
Second Item Navigate to second detail
|
|
297
|
-
Third Item Navigate to third detail
|
|
298
379
|
|
|
380
|
+
Navigation Example ─────────────────────────────────────────────
|
|
381
|
+
|
|
382
|
+
Main view
|
|
383
|
+
|
|
384
|
+
Items
|
|
385
|
+
┃ ┃
|
|
386
|
+
┃ esc ┃
|
|
387
|
+
┃ ┃
|
|
388
|
+
┃ Search actions... ┃
|
|
389
|
+
┃ ┃
|
|
390
|
+
┃ ›Open Details ┃
|
|
391
|
+
┃ Copy Title ┃
|
|
392
|
+
┃ ┃
|
|
393
|
+
┃ ┃
|
|
394
|
+
┃ ┃
|
|
395
|
+
┃ ┃
|
|
396
|
+
┃ ┃
|
|
397
|
+
┃ ┃
|
|
398
|
+
┃ ┃
|
|
399
|
+
┃ ┃
|
|
400
|
+
┃ ┃
|
|
401
|
+
┃ ↵ select ↑↓ navigate ┃
|
|
402
|
+
┃ ┃"
|
|
403
|
+
`)
|
|
299
404
|
|
|
300
|
-
|
|
405
|
+
// Navigate down in actions panel
|
|
406
|
+
await session.press('down')
|
|
301
407
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
408
|
+
const secondActionSnapshot = await session.text()
|
|
409
|
+
expect(secondActionSnapshot).toMatchInlineSnapshot(`
|
|
410
|
+
"
|
|
305
411
|
|
|
306
412
|
|
|
307
|
-
|
|
413
|
+
Navigation Example ─────────────────────────────────────────────
|
|
414
|
+
|
|
415
|
+
Main view
|
|
416
|
+
|
|
417
|
+
Items
|
|
418
|
+
┃ ┃
|
|
419
|
+
┃ esc ┃
|
|
420
|
+
┃ ┃
|
|
421
|
+
┃ Search actions... ┃
|
|
422
|
+
┃ ┃
|
|
423
|
+
┃ Open Details ┃
|
|
424
|
+
┃ ›Copy Title ┃
|
|
425
|
+
┃ ┃
|
|
426
|
+
┃ ┃
|
|
427
|
+
┃ ┃
|
|
428
|
+
┃ ┃
|
|
429
|
+
┃ ┃
|
|
430
|
+
┃ ┃
|
|
431
|
+
┃ ┃
|
|
432
|
+
┃ ┃
|
|
433
|
+
┃ ┃
|
|
434
|
+
┃ ↵ select ↑↓ navigate ┃
|
|
435
|
+
┃ ┃"
|
|
308
436
|
`)
|
|
309
437
|
|
|
310
|
-
//
|
|
311
|
-
await
|
|
438
|
+
// Select the Copy Title action
|
|
439
|
+
await session.press('enter')
|
|
312
440
|
|
|
313
|
-
const
|
|
314
|
-
expect(
|
|
441
|
+
const afterCopySnapshot = await session.text()
|
|
442
|
+
expect(afterCopySnapshot).toMatchInlineSnapshot(`
|
|
315
443
|
"
|
|
316
444
|
|
|
445
|
+
|
|
317
446
|
Navigation Example ─────────────────────────────────────────────
|
|
318
447
|
|
|
319
448
|
Main view
|
|
320
449
|
|
|
321
|
-
|
|
322
450
|
Items
|
|
323
451
|
›First Item Navigate to first detail
|
|
324
452
|
Second Item Navigate to second detail
|
|
325
453
|
Third Item Navigate to third detail
|
|
326
454
|
|
|
327
455
|
|
|
328
|
-
esc
|
|
329
456
|
|
|
330
|
-
Search actions...
|
|
331
|
-
Open Details
|
|
332
|
-
›Copy Title
|
|
333
457
|
|
|
334
458
|
|
|
335
|
-
↵ select ↑↓ navigate"
|
|
336
|
-
`)
|
|
337
459
|
|
|
338
|
-
// Select the Copy Title action
|
|
339
|
-
await driver.keys.enter()
|
|
340
460
|
|
|
341
|
-
const afterCopySnapshot = await driver.text()
|
|
342
|
-
expect(afterCopySnapshot).toMatchInlineSnapshot(`
|
|
343
|
-
"
|
|
344
461
|
|
|
345
|
-
Navigation Example ─────────────────────────────────────────────
|
|
346
462
|
|
|
347
|
-
Main view
|
|
348
463
|
|
|
349
464
|
|
|
350
|
-
Items
|
|
351
|
-
›First Item Navigate to first detail
|
|
352
|
-
Second Item Navigate to second detail
|
|
353
|
-
Third Item Navigate to third detail
|
|
354
465
|
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
└────────────────────────────────────┘"
|
|
466
|
+
↵ select ↑↓ ┌────────────────────────────────────┐
|
|
467
|
+
│ ✓ Copied to Clipboard - First Item │
|
|
468
|
+
└────────────────────────────────────┘"
|
|
359
469
|
`)
|
|
360
470
|
|
|
361
471
|
// Navigate to second item and open its detail
|
|
362
|
-
await
|
|
363
|
-
await
|
|
472
|
+
await session.press('down')
|
|
473
|
+
await session.press('enter')
|
|
474
|
+
await session.press('enter')
|
|
364
475
|
|
|
365
|
-
const secondDetailSnapshot = await
|
|
476
|
+
const secondDetailSnapshot = await session.text({
|
|
366
477
|
waitFor: (text) => {
|
|
367
478
|
return /Detail: Second Item/i.test(text)
|
|
368
479
|
},
|
|
@@ -370,59 +481,69 @@ test('navigation with actions panel', async () => {
|
|
|
370
481
|
expect(secondDetailSnapshot).toMatchInlineSnapshot(`
|
|
371
482
|
"
|
|
372
483
|
|
|
373
|
-
Navigation Example ─────────────────────────────────────────────
|
|
374
484
|
|
|
375
|
-
|
|
485
|
+
Detail: Second Item ────────────────────────────────────────────
|
|
376
486
|
|
|
487
|
+
Detail view - Press ESC to go back
|
|
488
|
+
|
|
489
|
+
Details
|
|
490
|
+
›This is the detail view for Second Item Press Enter to go back
|
|
377
491
|
|
|
378
|
-
Items
|
|
379
|
-
First Item Navigate to first detail
|
|
380
|
-
›Second Item Navigate to second detail
|
|
381
|
-
Third Item Navigate to third detail
|
|
382
492
|
|
|
383
493
|
|
|
384
|
-
esc
|
|
385
494
|
|
|
386
|
-
Search actions...
|
|
387
|
-
›Open Details
|
|
388
|
-
Copy Title
|
|
389
495
|
|
|
390
496
|
|
|
391
|
-
↵ select ↑↓ navigate"
|
|
392
|
-
`)
|
|
393
497
|
|
|
394
|
-
// Open actions panel in detail view
|
|
395
|
-
await driver.keys.ctrlK()
|
|
396
498
|
|
|
397
|
-
const detailActionsSnapshot = await driver.text()
|
|
398
|
-
expect(detailActionsSnapshot).toMatchInlineSnapshot(`
|
|
399
|
-
"
|
|
400
499
|
|
|
401
|
-
Navigation Example ─────────────────────────────────────────────
|
|
402
500
|
|
|
403
|
-
Main view
|
|
404
501
|
|
|
405
502
|
|
|
406
|
-
Items
|
|
407
|
-
First Item Navigate to first detail
|
|
408
|
-
›Second Item Navigate to second detail
|
|
409
|
-
Third Item Navigate to third detail
|
|
410
503
|
|
|
411
504
|
|
|
412
|
-
|
|
505
|
+
↵ select ↑↓ ┌────────────────────────────────────┐
|
|
506
|
+
│ ✓ Copied to Clipboard - First Item │
|
|
507
|
+
└────────────────────────────────────┘"
|
|
508
|
+
`)
|
|
509
|
+
|
|
510
|
+
// Open actions panel in detail view
|
|
511
|
+
await session.press(['ctrl', 'k'])
|
|
413
512
|
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
513
|
+
const detailActionsSnapshot = await session.text()
|
|
514
|
+
expect(detailActionsSnapshot).toMatchInlineSnapshot(`
|
|
515
|
+
"
|
|
417
516
|
|
|
418
517
|
|
|
419
|
-
|
|
518
|
+
Detail: Second Item ────────────────────────────────────────────
|
|
519
|
+
|
|
520
|
+
Detail view - Press ESC to go back
|
|
521
|
+
|
|
522
|
+
Details
|
|
523
|
+
┃ ┃
|
|
524
|
+
┃ esc ┃
|
|
525
|
+
┃ ┃
|
|
526
|
+
┃ Search actions... ┃
|
|
527
|
+
┃ ┃
|
|
528
|
+
┃ ›Go Back ┃
|
|
529
|
+
┃ Copy Title ┃
|
|
530
|
+
┃ ┃
|
|
531
|
+
┃ ┃
|
|
532
|
+
┃ ┃
|
|
533
|
+
┃ ┃
|
|
534
|
+
┃ ┃
|
|
535
|
+
┃ ┃
|
|
536
|
+
┃ ┃
|
|
537
|
+
┃ ┃
|
|
538
|
+
┃ ┃
|
|
539
|
+
┃ ↵ select ↑↓ navigate ┃
|
|
540
|
+
┃ ┃"
|
|
420
541
|
`)
|
|
421
542
|
|
|
422
543
|
// Select Go Back action
|
|
423
|
-
await
|
|
544
|
+
await session.press('enter')
|
|
424
545
|
|
|
425
|
-
const backViaActionSnapshot = await
|
|
546
|
+
const backViaActionSnapshot = await session.text({
|
|
426
547
|
waitFor: (text) => {
|
|
427
548
|
return /Navigation Example/i.test(text)
|
|
428
549
|
},
|
|
@@ -430,21 +551,35 @@ test('navigation with actions panel', async () => {
|
|
|
430
551
|
expect(backViaActionSnapshot).toMatchInlineSnapshot(`
|
|
431
552
|
"
|
|
432
553
|
|
|
433
|
-
Detail: Second Item ────────────────────────────────────────────
|
|
434
554
|
|
|
435
|
-
|
|
555
|
+
Navigation Example ─────────────────────────────────────────────
|
|
556
|
+
|
|
557
|
+
Main view
|
|
558
|
+
|
|
559
|
+
Items
|
|
560
|
+
›First Item Navigate to first detail
|
|
561
|
+
Second Item Navigate to second detail
|
|
562
|
+
Third Item Navigate to third detail
|
|
563
|
+
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
|
|
567
|
+
|
|
568
|
+
|
|
569
|
+
|
|
436
570
|
|
|
437
571
|
|
|
438
|
-
Details
|
|
439
|
-
›This is the detail view for Second Item Press Enter to go back or E
|
|
440
572
|
|
|
441
573
|
|
|
442
|
-
|
|
574
|
+
|
|
575
|
+
↵ select ↑↓ ┌────────────────────────────────────┐
|
|
576
|
+
│ ✓ Copied to Clipboard - First Item │
|
|
577
|
+
└────────────────────────────────────┘"
|
|
443
578
|
`)
|
|
444
579
|
}, 15000)
|
|
445
580
|
|
|
446
581
|
test('search functionality in main and detail views', async () => {
|
|
447
|
-
await
|
|
582
|
+
await session.text({
|
|
448
583
|
waitFor: (text) => {
|
|
449
584
|
// wait for main view to show up
|
|
450
585
|
return /Main view/i.test(text)
|
|
@@ -452,9 +587,9 @@ test('search functionality in main and detail views', async () => {
|
|
|
452
587
|
})
|
|
453
588
|
|
|
454
589
|
// Type in search bar
|
|
455
|
-
await
|
|
590
|
+
await session.type('second')
|
|
456
591
|
|
|
457
|
-
const searchMainSnapshot = await
|
|
592
|
+
const searchMainSnapshot = await session.text({
|
|
458
593
|
waitFor: (text) => {
|
|
459
594
|
return /second/i.test(text)
|
|
460
595
|
},
|
|
@@ -462,6 +597,7 @@ test('search functionality in main and detail views', async () => {
|
|
|
462
597
|
expect(searchMainSnapshot).toMatchInlineSnapshot(`
|
|
463
598
|
"
|
|
464
599
|
|
|
600
|
+
|
|
465
601
|
Navigation Example ─────────────────────────────────────────────
|
|
466
602
|
|
|
467
603
|
second
|
|
@@ -469,103 +605,163 @@ test('search functionality in main and detail views', async () => {
|
|
|
469
605
|
Second Item Navigate to second detail
|
|
470
606
|
|
|
471
607
|
|
|
472
|
-
|
|
608
|
+
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
|
|
612
|
+
|
|
613
|
+
|
|
614
|
+
|
|
615
|
+
|
|
616
|
+
|
|
617
|
+
|
|
618
|
+
|
|
619
|
+
|
|
620
|
+
|
|
621
|
+
↵ select ↑↓ navigate ^k actions"
|
|
473
622
|
`)
|
|
474
623
|
|
|
475
624
|
// Clear search
|
|
476
|
-
await
|
|
477
|
-
await
|
|
478
|
-
await
|
|
479
|
-
await
|
|
480
|
-
await
|
|
481
|
-
await
|
|
482
|
-
|
|
483
|
-
const clearedSearchSnapshot = await
|
|
625
|
+
await session.press('backspace')
|
|
626
|
+
await session.press('backspace')
|
|
627
|
+
await session.press('backspace')
|
|
628
|
+
await session.press('backspace')
|
|
629
|
+
await session.press('backspace')
|
|
630
|
+
await session.press('backspace')
|
|
631
|
+
|
|
632
|
+
const clearedSearchSnapshot = await session.text()
|
|
484
633
|
expect(clearedSearchSnapshot).toMatchInlineSnapshot(`
|
|
485
|
-
|
|
634
|
+
"
|
|
635
|
+
|
|
636
|
+
|
|
637
|
+
Navigation Example ─────────────────────────────────────────────
|
|
638
|
+
|
|
639
|
+
Main view
|
|
640
|
+
|
|
641
|
+
Items
|
|
642
|
+
›First Item Navigate to first detail
|
|
643
|
+
Second Item Navigate to second detail
|
|
644
|
+
Third Item Navigate to third detail
|
|
486
645
|
|
|
487
|
-
Navigation Example ─────────────────────────────────────────────
|
|
488
646
|
|
|
489
|
-
Main view
|
|
490
647
|
|
|
491
648
|
|
|
492
|
-
Items
|
|
493
|
-
›First Item Navigate to first detail
|
|
494
|
-
Second Item Navigate to second detail
|
|
495
|
-
Third Item Navigate to third detail
|
|
496
649
|
|
|
497
650
|
|
|
498
|
-
|
|
499
|
-
|
|
651
|
+
|
|
652
|
+
|
|
653
|
+
|
|
654
|
+
|
|
655
|
+
|
|
656
|
+
|
|
657
|
+
↵ select ↑↓ navigate ^k actions"
|
|
658
|
+
`)
|
|
500
659
|
|
|
501
660
|
// Open actions for first item
|
|
502
|
-
await
|
|
661
|
+
await session.press('enter')
|
|
503
662
|
|
|
504
663
|
// Navigate to first item detail
|
|
505
|
-
await
|
|
664
|
+
await session.press('enter')
|
|
506
665
|
|
|
507
|
-
const firstDetailSnapshot = await
|
|
666
|
+
const firstDetailSnapshot = await session.text({
|
|
508
667
|
waitFor: (text) => {
|
|
509
668
|
return /Detail: First Item/i.test(text)
|
|
510
669
|
},
|
|
511
670
|
})
|
|
512
671
|
expect(firstDetailSnapshot).toMatchInlineSnapshot(`
|
|
513
|
-
|
|
672
|
+
"
|
|
673
|
+
|
|
674
|
+
|
|
675
|
+
Detail: First Item ─────────────────────────────────────────────
|
|
676
|
+
|
|
677
|
+
Detail view - Press ESC to go back
|
|
678
|
+
|
|
679
|
+
Details
|
|
680
|
+
›This is the detail view for First Item Press Enter to go back o
|
|
681
|
+
|
|
682
|
+
|
|
683
|
+
|
|
514
684
|
|
|
515
|
-
Detail: First Item ─────────────────────────────────────────────
|
|
516
685
|
|
|
517
|
-
Detail view - Press ESC to go back
|
|
518
686
|
|
|
519
687
|
|
|
520
|
-
Details
|
|
521
|
-
›This is the detail view for First Item Press Enter to go back or ES
|
|
522
688
|
|
|
523
689
|
|
|
524
|
-
|
|
525
|
-
|
|
690
|
+
|
|
691
|
+
|
|
692
|
+
|
|
693
|
+
|
|
694
|
+
|
|
695
|
+
↵ select ↑↓ navigate ^k actions"
|
|
696
|
+
`)
|
|
526
697
|
|
|
527
698
|
// Type in detail view search bar
|
|
528
|
-
await
|
|
699
|
+
await session.type('test')
|
|
529
700
|
|
|
530
|
-
const searchDetailSnapshot = await
|
|
701
|
+
const searchDetailSnapshot = await session.text({
|
|
531
702
|
waitFor: (text) => {
|
|
532
703
|
return /test/i.test(text)
|
|
533
704
|
},
|
|
534
705
|
})
|
|
535
706
|
expect(searchDetailSnapshot).toMatchInlineSnapshot(`
|
|
536
|
-
|
|
707
|
+
"
|
|
708
|
+
|
|
537
709
|
|
|
538
|
-
|
|
710
|
+
Detail: First Item ─────────────────────────────────────────────
|
|
539
711
|
|
|
540
|
-
|
|
712
|
+
test
|
|
541
713
|
|
|
542
714
|
|
|
543
715
|
|
|
544
|
-
|
|
545
|
-
|
|
716
|
+
|
|
717
|
+
|
|
718
|
+
|
|
719
|
+
|
|
720
|
+
|
|
721
|
+
|
|
722
|
+
|
|
723
|
+
|
|
724
|
+
|
|
725
|
+
|
|
726
|
+
|
|
727
|
+
|
|
728
|
+
|
|
729
|
+
|
|
730
|
+
↵ select ↑↓ navigate ^k actions"
|
|
731
|
+
`)
|
|
546
732
|
|
|
547
733
|
// Press ESC to go back
|
|
548
|
-
await
|
|
734
|
+
await session.press('esc')
|
|
549
735
|
|
|
550
|
-
const finalMainSnapshot = await
|
|
736
|
+
const finalMainSnapshot = await session.text({
|
|
551
737
|
waitFor: (text) => {
|
|
552
738
|
return /Navigation Example/i.test(text)
|
|
553
739
|
},
|
|
554
740
|
})
|
|
555
741
|
expect(finalMainSnapshot).toMatchInlineSnapshot(`
|
|
556
|
-
|
|
742
|
+
"
|
|
557
743
|
|
|
558
|
-
Navigation Example ─────────────────────────────────────────────
|
|
559
744
|
|
|
560
|
-
|
|
745
|
+
Navigation Example ─────────────────────────────────────────────
|
|
746
|
+
|
|
747
|
+
Main view
|
|
748
|
+
|
|
749
|
+
Items
|
|
750
|
+
›First Item Navigate to first detail
|
|
751
|
+
Second Item Navigate to second detail
|
|
752
|
+
Third Item Navigate to third detail
|
|
753
|
+
|
|
561
754
|
|
|
562
755
|
|
|
563
|
-
Items
|
|
564
|
-
›First Item Navigate to first detail
|
|
565
|
-
Second Item Navigate to second detail
|
|
566
|
-
Third Item Navigate to third detail
|
|
567
756
|
|
|
568
757
|
|
|
569
|
-
|
|
570
|
-
|
|
758
|
+
|
|
759
|
+
|
|
760
|
+
|
|
761
|
+
|
|
762
|
+
|
|
763
|
+
|
|
764
|
+
|
|
765
|
+
↵ select ↑↓ navigate ^k actions"
|
|
766
|
+
`)
|
|
571
767
|
}, 10000)
|