termcast 1.3.19 → 1.3.24
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/ai.d.ts +104 -0
- package/dist/ai.d.ts.map +1 -0
- package/dist/ai.js +135 -0
- package/dist/ai.js.map +1 -0
- package/dist/apis/browser-extension.d.ts +18 -0
- package/dist/apis/browser-extension.d.ts.map +1 -0
- package/dist/apis/browser-extension.js +14 -0
- package/dist/apis/browser-extension.js.map +1 -0
- package/dist/apis/localstorage.d.ts.map +1 -1
- package/dist/apis/localstorage.js +4 -7
- package/dist/apis/localstorage.js.map +1 -1
- package/dist/apis/oauth.d.ts.map +1 -1
- package/dist/apis/oauth.js +5 -1
- package/dist/apis/oauth.js.map +1 -1
- package/dist/apis/preferences.d.ts.map +1 -1
- package/dist/apis/preferences.js +38 -19
- package/dist/apis/preferences.js.map +1 -1
- package/dist/build.d.ts.map +1 -1
- package/dist/build.js +2 -1
- package/dist/build.js.map +1 -1
- package/dist/cache.d.ts +32 -0
- package/dist/cache.d.ts.map +1 -0
- package/dist/cache.js +205 -0
- package/dist/cache.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +69 -33
- package/dist/cli.js.map +1 -1
- package/dist/clipboard.d.ts +36 -0
- package/dist/clipboard.d.ts.map +1 -0
- package/dist/clipboard.js +154 -0
- package/dist/clipboard.js.map +1 -0
- package/dist/compile.d.ts.map +1 -1
- package/dist/compile.js +24 -6
- package/dist/compile.js.map +1 -1
- package/dist/components/actions.d.ts.map +1 -1
- package/dist/components/actions.js +56 -30
- package/dist/components/actions.js.map +1 -1
- package/dist/components/detail.d.ts.map +1 -1
- package/dist/components/detail.js +4 -0
- package/dist/components/detail.js.map +1 -1
- package/dist/components/dropdown.d.ts.map +1 -1
- package/dist/components/dropdown.js +38 -15
- package/dist/components/dropdown.js.map +1 -1
- package/dist/components/extension-preferences.d.ts.map +1 -1
- package/dist/components/extension-preferences.js +40 -13
- 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 +5 -3
- 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 +5 -3
- package/dist/components/form/date-picker.js.map +1 -1
- package/dist/components/form/description.d.ts.map +1 -1
- package/dist/components/form/description.js +2 -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 +84 -80
- package/dist/components/form/dropdown.js.map +1 -1
- package/dist/components/form/file-autocomplete.d.ts +3 -6
- package/dist/components/form/file-autocomplete.d.ts.map +1 -1
- package/dist/components/form/file-autocomplete.js +61 -66
- package/dist/components/form/file-autocomplete.js.map +1 -1
- package/dist/components/form/file-picker.d.ts.map +1 -1
- package/dist/components/form/file-picker.js +33 -30
- package/dist/components/form/file-picker.js.map +1 -1
- package/dist/components/form/form-end.d.ts.map +1 -1
- package/dist/components/form/form-end.js +21 -1
- package/dist/components/form/form-end.js.map +1 -1
- package/dist/components/form/form-type-only.d.ts +174 -0
- package/dist/components/form/form-type-only.d.ts.map +1 -0
- package/dist/components/form/form-type-only.js +2 -0
- package/dist/components/form/form-type-only.js.map +1 -0
- package/dist/components/form/index.d.ts +3 -1
- package/dist/components/form/index.d.ts.map +1 -1
- package/dist/components/form/index.js +100 -28
- 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 +5 -3
- 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 +5 -3
- 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 +6 -4
- package/dist/components/form/text-field.js.map +1 -1
- package/dist/components/form/types.d.ts +5 -0
- package/dist/components/form/types.d.ts.map +1 -1
- package/dist/components/form/use-form-handling.d.ts +4 -0
- package/dist/components/form/use-form-handling.d.ts.map +1 -0
- package/dist/components/form/use-form-handling.js +37 -0
- package/dist/components/form/use-form-handling.js.map +1 -0
- package/dist/components/form/with-left-border.d.ts +2 -1
- package/dist/components/form/with-left-border.d.ts.map +1 -1
- package/dist/components/form/with-left-border.js +27 -3
- package/dist/components/form/with-left-border.js.map +1 -1
- package/dist/components/icon.d.ts +1 -0
- package/dist/components/icon.d.ts.map +1 -1
- package/dist/components/icon.js +24 -8
- package/dist/components/icon.js.map +1 -1
- package/dist/components/list.d.ts +2 -2
- package/dist/components/list.d.ts.map +1 -1
- package/dist/components/list.js +140 -62
- package/dist/components/list.js.map +1 -1
- package/dist/components/loading-bar.d.ts.map +1 -1
- package/dist/components/loading-bar.js +2 -2
- package/dist/components/loading-bar.js.map +1 -1
- package/dist/components/loading-text.d.ts +8 -0
- package/dist/components/loading-text.d.ts.map +1 -0
- package/dist/components/loading-text.js +58 -0
- package/dist/components/loading-text.js.map +1 -0
- package/dist/descendants.js +1 -1
- package/dist/descendants.js.map +1 -1
- package/dist/dev-ui.d.ts +7 -0
- package/dist/dev-ui.d.ts.map +1 -0
- package/dist/dev-ui.js +118 -0
- package/dist/dev-ui.js.map +1 -0
- package/dist/environment.d.ts +63 -0
- package/dist/environment.d.ts.map +1 -0
- package/dist/environment.js +189 -0
- package/dist/environment.js.map +1 -0
- package/dist/examples/datepicker.d.ts +2 -0
- package/dist/examples/datepicker.d.ts.map +1 -0
- package/dist/examples/datepicker.js +344 -0
- package/dist/examples/datepicker.js.map +1 -0
- package/dist/examples/file-autocomplete.vitest.d.ts +2 -0
- package/dist/examples/file-autocomplete.vitest.d.ts.map +1 -0
- package/dist/examples/file-autocomplete.vitest.js +223 -0
- package/dist/examples/file-autocomplete.vitest.js.map +1 -0
- package/dist/examples/form-basic-arrow-keys.vitest.d.ts +2 -0
- package/dist/examples/form-basic-arrow-keys.vitest.d.ts.map +1 -0
- package/dist/examples/form-basic-arrow-keys.vitest.js +46 -0
- package/dist/examples/form-basic-arrow-keys.vitest.js.map +1 -0
- package/dist/examples/form-basic.vitest.d.ts +2 -0
- package/dist/examples/form-basic.vitest.d.ts.map +1 -0
- package/dist/examples/form-basic.vitest.js +630 -0
- package/dist/examples/form-basic.vitest.js.map +1 -0
- package/dist/examples/form-dropdown-with-sections.d.ts +2 -0
- package/dist/examples/form-dropdown-with-sections.d.ts.map +1 -0
- package/dist/examples/form-dropdown-with-sections.js +13 -0
- package/dist/examples/form-dropdown-with-sections.js.map +1 -0
- package/dist/examples/form-dropdown-with-sections.vitest.d.ts +2 -0
- package/dist/examples/form-dropdown-with-sections.vitest.d.ts.map +1 -0
- package/dist/examples/form-dropdown-with-sections.vitest.js +75 -0
- package/dist/examples/form-dropdown-with-sections.vitest.js.map +1 -0
- package/dist/examples/form-dropdown.vitest.d.ts +2 -0
- package/dist/examples/form-dropdown.vitest.d.ts.map +1 -0
- package/dist/examples/form-dropdown.vitest.js +854 -0
- package/dist/examples/form-dropdown.vitest.js.map +1 -0
- package/dist/examples/form-multiselect-dropdown.d.ts +2 -0
- package/dist/examples/form-multiselect-dropdown.d.ts.map +1 -0
- package/dist/examples/form-multiselect-dropdown.js +13 -0
- package/dist/examples/form-multiselect-dropdown.js.map +1 -0
- package/dist/examples/form-scroll.d.ts.map +1 -1
- package/dist/examples/form-scroll.js +7 -1
- package/dist/examples/form-scroll.js.map +1 -1
- package/dist/examples/form-scroll.vitest.d.ts +2 -0
- package/dist/examples/form-scroll.vitest.d.ts.map +1 -0
- package/dist/examples/form-scroll.vitest.js +211 -0
- package/dist/examples/form-scroll.vitest.js.map +1 -0
- package/dist/examples/form-tagpicker.vitest.d.ts +2 -0
- package/dist/examples/form-tagpicker.vitest.d.ts.map +1 -0
- package/dist/examples/form-tagpicker.vitest.js +736 -0
- package/dist/examples/form-tagpicker.vitest.js.map +1 -0
- package/dist/examples/internal/descendants-filtering.js +1 -1
- package/dist/examples/internal/descendants-filtering.js.map +1 -1
- package/dist/examples/internal/descendants.js +1 -1
- package/dist/examples/internal/descendants.js.map +1 -1
- package/dist/examples/internal/nested-boxes.d.ts +2 -0
- package/dist/examples/internal/nested-boxes.d.ts.map +1 -0
- package/dist/examples/internal/nested-boxes.js +7 -0
- package/dist/examples/internal/nested-boxes.js.map +1 -0
- package/dist/examples/internal/rhf-custom-ref.js +2 -2
- package/dist/examples/internal/rhf-custom-ref.js.map +1 -1
- package/dist/examples/internal/scrollbox-demo.js +3 -22
- package/dist/examples/internal/scrollbox-demo.js.map +1 -1
- package/dist/examples/internal/scrollbox-descendants.d.ts +2 -0
- package/dist/examples/internal/scrollbox-descendants.d.ts.map +1 -0
- package/dist/examples/internal/scrollbox-descendants.js +83 -0
- package/dist/examples/internal/scrollbox-descendants.js.map +1 -0
- package/dist/examples/internal/scrollbox-with-descendants.js +4 -8
- package/dist/examples/internal/scrollbox-with-descendants.js.map +1 -1
- package/dist/examples/internal/simple-scrollbox.vitest.d.ts +2 -0
- package/dist/examples/internal/simple-scrollbox.vitest.d.ts.map +1 -0
- package/dist/examples/internal/simple-scrollbox.vitest.js +96 -0
- package/dist/examples/internal/simple-scrollbox.vitest.js.map +1 -0
- package/dist/examples/internal/unicode-square-repro.d.ts +2 -0
- package/dist/examples/internal/unicode-square-repro.d.ts.map +1 -0
- package/dist/examples/internal/unicode-square-repro.js +7 -0
- package/dist/examples/internal/unicode-square-repro.js.map +1 -0
- package/dist/examples/list-detail-metadata.d.ts +2 -0
- package/dist/examples/list-detail-metadata.d.ts.map +1 -0
- package/dist/examples/list-detail-metadata.js +8 -0
- package/dist/examples/list-detail-metadata.js.map +1 -0
- package/dist/examples/list-dropdown-default.vitest.d.ts +2 -0
- package/dist/examples/list-dropdown-default.vitest.d.ts.map +1 -0
- package/dist/examples/list-dropdown-default.vitest.js +234 -0
- package/dist/examples/list-dropdown-default.vitest.js.map +1 -0
- package/dist/examples/list-fetch-data.vitest.d.ts +2 -0
- package/dist/examples/list-fetch-data.vitest.d.ts.map +1 -0
- package/dist/examples/list-fetch-data.vitest.js +111 -0
- package/dist/examples/list-fetch-data.vitest.js.map +1 -0
- package/dist/examples/list-filter-navigation.d.ts +2 -0
- package/dist/examples/list-filter-navigation.d.ts.map +1 -0
- package/dist/examples/list-filter-navigation.js +8 -0
- package/dist/examples/list-filter-navigation.js.map +1 -0
- package/dist/examples/list-scrollbox.vitest.d.ts +2 -0
- package/dist/examples/list-scrollbox.vitest.d.ts.map +1 -0
- package/dist/examples/list-scrollbox.vitest.js +93 -0
- package/dist/examples/list-scrollbox.vitest.js.map +1 -0
- package/dist/examples/list-with-detail-long.d.ts +2 -0
- package/dist/examples/list-with-detail-long.d.ts.map +1 -0
- package/dist/examples/list-with-detail-long.js +53 -0
- package/dist/examples/list-with-detail-long.js.map +1 -0
- package/dist/examples/list-with-detail.vitest.d.ts +2 -0
- package/dist/examples/list-with-detail.vitest.d.ts.map +1 -0
- package/dist/examples/list-with-detail.vitest.js +434 -0
- package/dist/examples/list-with-detail.vitest.js.map +1 -0
- package/dist/examples/list-with-dropdown.vitest.d.ts +2 -0
- package/dist/examples/list-with-dropdown.vitest.d.ts.map +1 -0
- package/dist/examples/list-with-dropdown.vitest.js +337 -0
- package/dist/examples/list-with-dropdown.vitest.js.map +1 -0
- package/dist/examples/list-with-sections.js +5 -1
- package/dist/examples/list-with-sections.js.map +1 -1
- package/dist/examples/list-with-sections.vitest.d.ts +2 -0
- package/dist/examples/list-with-sections.vitest.d.ts.map +1 -0
- package/dist/examples/list-with-sections.vitest.js +601 -0
- package/dist/examples/list-with-sections.vitest.js.map +1 -0
- package/dist/examples/scrollbox-vertical-centering.d.ts +6 -0
- package/dist/examples/scrollbox-vertical-centering.d.ts.map +1 -0
- package/dist/examples/scrollbox-vertical-centering.js +17 -0
- package/dist/examples/scrollbox-vertical-centering.js.map +1 -0
- package/dist/examples/simple-file-picker.vitest.d.ts +2 -0
- package/dist/examples/simple-file-picker.vitest.d.ts.map +1 -0
- package/dist/examples/simple-file-picker.vitest.js +678 -0
- package/dist/examples/simple-file-picker.vitest.js.map +1 -0
- package/dist/examples/simple-grid.vitest.d.ts +2 -0
- package/dist/examples/simple-grid.vitest.d.ts.map +1 -0
- package/dist/examples/simple-grid.vitest.js +521 -0
- package/dist/examples/simple-grid.vitest.js.map +1 -0
- package/dist/examples/simple-navigation.js +10 -4
- package/dist/examples/simple-navigation.js.map +1 -1
- package/dist/examples/simple-navigation.vitest.d.ts +2 -0
- package/dist/examples/simple-navigation.vitest.d.ts.map +1 -0
- package/dist/examples/simple-navigation.vitest.js +718 -0
- package/dist/examples/simple-navigation.vitest.js.map +1 -0
- package/dist/examples/store.vitest.d.ts +2 -0
- package/dist/examples/store.vitest.d.ts.map +1 -0
- package/dist/examples/store.vitest.js +69 -0
- package/dist/examples/store.vitest.js.map +1 -0
- package/dist/extensions/dev.d.ts +4 -2
- package/dist/extensions/dev.d.ts.map +1 -1
- package/dist/extensions/dev.js +61 -10
- package/dist/extensions/dev.js.map +1 -1
- package/dist/extensions/dev.vitest.d.ts +2 -0
- package/dist/extensions/dev.vitest.d.ts.map +1 -0
- package/dist/extensions/dev.vitest.js +197 -0
- package/dist/extensions/dev.vitest.js.map +1 -0
- package/dist/extensions/home.d.ts.map +1 -1
- package/dist/extensions/home.js +3 -0
- package/dist/extensions/home.js.map +1 -1
- package/dist/home-command.d.ts +8 -0
- package/dist/home-command.d.ts.map +1 -0
- package/dist/home-command.js +181 -0
- package/dist/home-command.js.map +1 -0
- package/dist/hover-repro.d.ts +2 -0
- package/dist/hover-repro.d.ts.map +1 -0
- package/dist/hover-repro.js +20 -0
- package/dist/hover-repro.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/internal/dialog.d.ts +1 -0
- package/dist/internal/dialog.d.ts.map +1 -1
- package/dist/internal/dialog.js +27 -18
- package/dist/internal/dialog.js.map +1 -1
- package/dist/internal/navigation.d.ts +9 -1
- package/dist/internal/navigation.d.ts.map +1 -1
- package/dist/internal/navigation.js +5 -5
- package/dist/internal/navigation.js.map +1 -1
- package/dist/internal/offscreen.d.ts +6 -0
- package/dist/internal/offscreen.d.ts.map +1 -0
- package/dist/internal/offscreen.js +10 -0
- package/dist/internal/offscreen.js.map +1 -0
- package/dist/internal/providers.d.ts.map +1 -1
- package/dist/internal/providers.js +2 -2
- package/dist/internal/providers.js.map +1 -1
- package/dist/internal/scrollbox.d.ts +1 -10
- package/dist/internal/scrollbox.d.ts.map +1 -1
- package/dist/internal/scrollbox.js +2 -1
- package/dist/internal/scrollbox.js.map +1 -1
- package/dist/localstorage.d.ts +13 -0
- package/dist/localstorage.d.ts.map +1 -0
- package/dist/localstorage.js +190 -0
- package/dist/localstorage.js.map +1 -0
- package/dist/oauth.d.ts +142 -0
- package/dist/oauth.d.ts.map +1 -0
- package/dist/oauth.js +551 -0
- package/dist/oauth.js.map +1 -0
- package/dist/preferences.d.ts +23 -0
- package/dist/preferences.d.ts.map +1 -0
- package/dist/preferences.js +105 -0
- package/dist/preferences.js.map +1 -0
- package/dist/state.d.ts +2 -0
- package/dist/state.d.ts.map +1 -1
- package/dist/state.js +3 -0
- package/dist/state.js.map +1 -1
- package/dist/store.d.ts +21 -0
- package/dist/store.d.ts.map +1 -0
- package/dist/store.js +84 -0
- package/dist/store.js.map +1 -0
- package/dist/swift-loader.d.ts +3 -0
- package/dist/swift-loader.d.ts.map +1 -0
- package/dist/swift-loader.js +193 -0
- package/dist/swift-loader.js.map +1 -0
- package/dist/swift-runtime.d.ts +2 -0
- package/dist/swift-runtime.d.ts.map +1 -0
- package/dist/swift-runtime.js +27 -0
- package/dist/swift-runtime.js.map +1 -0
- package/dist/toast.d.ts +44 -0
- package/dist/toast.d.ts.map +1 -0
- package/dist/toast.js +221 -0
- package/dist/toast.js.map +1 -0
- package/dist/utils/file-system.d.ts +9 -0
- package/dist/utils/file-system.d.ts.map +1 -1
- package/dist/utils/file-system.js +49 -0
- package/dist/utils/file-system.js.map +1 -1
- package/dist/utils/run-command.d.ts +25 -1
- package/dist/utils/run-command.d.ts.map +1 -1
- package/dist/utils/run-command.js +47 -4
- package/dist/utils/run-command.js.map +1 -1
- package/dist/window.d.ts +12 -0
- package/dist/window.d.ts.map +1 -0
- package/dist/window.js +48 -0
- package/dist/window.js.map +1 -0
- package/package.json +13 -11
- package/src/apis/browser-extension.tsx +29 -0
- package/src/apis/localstorage.test.ts +14 -6
- package/src/apis/localstorage.tsx +8 -5
- package/src/apis/oauth.tsx +5 -1
- package/src/apis/preferences.tsx +48 -22
- package/src/build.test.tsx +52 -0
- package/src/build.tsx +2 -1
- package/src/cli.tsx +80 -39
- package/src/compile.tsx +24 -6
- package/src/components/actions.tsx +94 -32
- package/src/components/detail.tsx +4 -0
- package/src/components/dropdown.tsx +47 -14
- package/src/components/extension-preferences.tsx +44 -16
- package/src/components/form/checkbox.tsx +12 -6
- package/src/components/form/date-picker.tsx +12 -6
- package/src/components/form/description.tsx +7 -2
- package/src/components/form/dropdown.tsx +131 -119
- package/src/components/form/file-autocomplete.tsx +90 -108
- package/src/components/form/file-picker.tsx +54 -43
- package/src/components/form/form-end.tsx +23 -2
- package/src/components/form/index.tsx +152 -34
- package/src/components/form/password-field.tsx +12 -6
- package/src/components/form/text-area.tsx +13 -6
- package/src/components/form/text-field.tsx +13 -6
- package/src/components/form/types.tsx +6 -0
- package/src/components/form/with-left-border.tsx +41 -8
- package/src/components/icon.tsx +27 -8
- package/src/components/list.tsx +193 -74
- package/src/components/loading-bar.tsx +3 -2
- package/src/components/loading-text.tsx +79 -0
- package/src/descendants.tsx +1 -0
- package/src/examples/file-autocomplete.vitest.tsx +130 -125
- package/src/examples/form-basic.vitest.tsx +376 -176
- package/src/examples/form-dropdown.vitest.tsx +126 -126
- package/src/examples/form-scroll.tsx +2 -0
- package/src/examples/form-scroll.vitest.tsx +58 -58
- package/src/examples/form-tagpicker.vitest.tsx +99 -99
- package/src/examples/internal/descendants-filtering.tsx +1 -0
- package/src/examples/internal/descendants.tsx +1 -0
- package/src/examples/internal/rhf-custom-ref.tsx +2 -0
- package/src/examples/internal/scrollbox-demo.tsx +3 -27
- package/src/examples/internal/scrollbox-with-descendants.tsx +4 -7
- package/src/examples/internal/simple-scrollbox.vitest.tsx +7 -5
- package/src/examples/list-detail-metadata.tsx +49 -0
- package/src/examples/list-detail-metadata.vitest.tsx +88 -0
- package/src/examples/list-dropdown-default.vitest.tsx +51 -51
- package/src/examples/list-fetch-data.vitest.tsx +4 -4
- package/src/examples/list-scrollbox.vitest.tsx +73 -14
- package/src/examples/list-with-detail-long.tsx +70 -0
- package/src/examples/list-with-detail.vitest.tsx +198 -92
- package/src/examples/list-with-dropdown.vitest.tsx +53 -53
- package/src/examples/list-with-sections.tsx +1 -0
- package/src/examples/list-with-sections.vitest.tsx +213 -89
- package/src/examples/list-with-toast.vitest.tsx +4 -4
- package/src/examples/simple-file-picker.vitest.tsx +61 -471
- package/src/examples/simple-grid.vitest.tsx +238 -233
- package/src/examples/simple-navigation.tsx +15 -7
- package/src/examples/simple-navigation.vitest.tsx +121 -210
- package/src/examples/store.vitest.tsx +1 -1
- package/src/examples/swift-extension.vitest.tsx +148 -0
- package/src/examples/synonyms.vitest.tsx +159 -0
- package/src/extensions/dev.tsx +74 -7
- package/src/extensions/dev.vitest.tsx +97 -31
- package/src/extensions/home.tsx +6 -0
- package/src/index.tsx +3 -0
- package/src/internal/dialog.tsx +43 -30
- package/src/internal/navigation.tsx +3 -1
- package/src/internal/offscreen.tsx +15 -0
- package/src/internal/providers.tsx +4 -2
- package/src/internal/scrollbox.tsx +4 -8
- package/src/keyboard.test.tsx +69 -0
- package/src/state.tsx +7 -0
- package/src/swift-loader.tsx +239 -0
- package/src/swift-runtime.tsx +36 -0
- package/src/utils/file-system.ts +61 -0
- package/src/utils/run-command.tsx +75 -6
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { test, expect, afterEach, beforeEach } from 'vitest'
|
|
2
|
+
|
|
2
3
|
import { launchTerminal, Session } from 'tuistory/src'
|
|
3
4
|
|
|
4
5
|
let session: Session
|
|
@@ -44,9 +45,12 @@ test('list with sections navigation', async () => {
|
|
|
44
45
|
▼
|
|
45
46
|
|
|
46
47
|
|
|
47
|
-
↵
|
|
48
|
+
↵ view details ↑↓ navigate ^k actions"
|
|
48
49
|
`)
|
|
49
50
|
|
|
51
|
+
// Verify first action title is shown in footer when item has actions (Apple has "View Details")
|
|
52
|
+
expect(initialSnapshot.toLowerCase()).toContain('↵ view details')
|
|
53
|
+
|
|
50
54
|
// Add small delay to ensure all items have registered
|
|
51
55
|
await new Promise((resolve) => setTimeout(resolve, 100))
|
|
52
56
|
|
|
@@ -72,7 +76,7 @@ test('list with sections navigation', async () => {
|
|
|
72
76
|
▼
|
|
73
77
|
|
|
74
78
|
|
|
75
|
-
↵
|
|
79
|
+
↵ view details ↑↓ navigate ^k actions"
|
|
76
80
|
`)
|
|
77
81
|
|
|
78
82
|
await session.press('down')
|
|
@@ -97,9 +101,12 @@ test('list with sections navigation', async () => {
|
|
|
97
101
|
▼
|
|
98
102
|
|
|
99
103
|
|
|
100
|
-
|
|
104
|
+
↑↓ navigate ^k actions"
|
|
101
105
|
`)
|
|
102
106
|
|
|
107
|
+
// Verify footer doesn't show action when item has no actions (Orange has no actions)
|
|
108
|
+
expect(secondDownSnapshot.toLowerCase()).not.toContain('↵ view details')
|
|
109
|
+
|
|
103
110
|
await session.press('enter')
|
|
104
111
|
|
|
105
112
|
const afterEnterSnapshot = await session.text()
|
|
@@ -122,7 +129,7 @@ test('list with sections navigation', async () => {
|
|
|
122
129
|
▼
|
|
123
130
|
|
|
124
131
|
|
|
125
|
-
|
|
132
|
+
↑↓ navigate ^k actions"
|
|
126
133
|
`)
|
|
127
134
|
|
|
128
135
|
// Go back to list with Escape
|
|
@@ -148,7 +155,7 @@ test('list with sections navigation', async () => {
|
|
|
148
155
|
▼
|
|
149
156
|
|
|
150
157
|
|
|
151
|
-
|
|
158
|
+
↑↓ navigate ^k actions"
|
|
152
159
|
`)
|
|
153
160
|
})
|
|
154
161
|
|
|
@@ -172,11 +179,11 @@ test('list with sections search functionality', async () => {
|
|
|
172
179
|
"
|
|
173
180
|
|
|
174
181
|
|
|
175
|
-
|
|
182
|
+
Simple List Example ────────────────────────────────────────────
|
|
176
183
|
|
|
177
|
-
|
|
184
|
+
ban
|
|
178
185
|
|
|
179
|
-
Banana Yellow and nutritious Ripe
|
|
186
|
+
›Banana Yellow and nutritious Ripe
|
|
180
187
|
|
|
181
188
|
|
|
182
189
|
|
|
@@ -187,7 +194,7 @@ test('list with sections search functionality', async () => {
|
|
|
187
194
|
|
|
188
195
|
|
|
189
196
|
|
|
190
|
-
|
|
197
|
+
↵ view details ↑↓ navigate ^k actions"
|
|
191
198
|
`)
|
|
192
199
|
|
|
193
200
|
// Clear search and type "let" to search for Lettuce
|
|
@@ -210,7 +217,6 @@ test('list with sections search functionality', async () => {
|
|
|
210
217
|
|
|
211
218
|
let
|
|
212
219
|
|
|
213
|
-
|
|
214
220
|
Lettuce Green and fresh
|
|
215
221
|
|
|
216
222
|
|
|
@@ -221,7 +227,8 @@ test('list with sections search functionality', async () => {
|
|
|
221
227
|
|
|
222
228
|
|
|
223
229
|
|
|
224
|
-
|
|
230
|
+
|
|
231
|
+
↵ view details ↑↓ navigate ^k actions"
|
|
225
232
|
`)
|
|
226
233
|
|
|
227
234
|
// Clear search to show all items again
|
|
@@ -249,7 +256,7 @@ test('list with sections search functionality', async () => {
|
|
|
249
256
|
▼
|
|
250
257
|
|
|
251
258
|
|
|
252
|
-
↵
|
|
259
|
+
↵ view details ↑↓ navigate ^k actions"
|
|
253
260
|
`)
|
|
254
261
|
|
|
255
262
|
// Search for "bread"
|
|
@@ -269,9 +276,9 @@ test('list with sections search functionality', async () => {
|
|
|
269
276
|
|
|
270
277
|
bread
|
|
271
278
|
|
|
279
|
+
Bread Freshly baked Today [New]
|
|
272
280
|
|
|
273
281
|
|
|
274
|
-
Bread Freshly baked Today [New]
|
|
275
282
|
|
|
276
283
|
|
|
277
284
|
|
|
@@ -280,7 +287,7 @@ test('list with sections search functionality', async () => {
|
|
|
280
287
|
|
|
281
288
|
|
|
282
289
|
|
|
283
|
-
↵
|
|
290
|
+
↵ view details ↑↓ navigate ^k actions"
|
|
284
291
|
`)
|
|
285
292
|
|
|
286
293
|
// Select the bread item
|
|
@@ -291,24 +298,22 @@ test('list with sections search functionality', async () => {
|
|
|
291
298
|
"
|
|
292
299
|
|
|
293
300
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
┃ ┃
|
|
311
|
-
┃ ┃"
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
Banana
|
|
304
|
+
|
|
305
|
+
A yellow tropical fruit that's nutritious and energy-rich.
|
|
306
|
+
|
|
307
|
+
Benefits
|
|
308
|
+
- High in potassium
|
|
309
|
+
- Natural energy booster
|
|
310
|
+
- Aids digestion
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
esc go back"
|
|
312
317
|
`)
|
|
313
318
|
}, 10000)
|
|
314
319
|
|
|
@@ -342,7 +347,7 @@ test('list click functionality', async () => {
|
|
|
342
347
|
▼
|
|
343
348
|
|
|
344
349
|
|
|
345
|
-
↵
|
|
350
|
+
↵ view details ↑↓ navigate ^k actions"
|
|
346
351
|
`)
|
|
347
352
|
|
|
348
353
|
// Click on "Apple" item
|
|
@@ -368,7 +373,7 @@ test('list click functionality', async () => {
|
|
|
368
373
|
▼
|
|
369
374
|
|
|
370
375
|
|
|
371
|
-
↵
|
|
376
|
+
↵ view details ↑↓ navigate ^k actions"
|
|
372
377
|
`)
|
|
373
378
|
|
|
374
379
|
// Click on "Grape" item (visible in initial view)
|
|
@@ -394,7 +399,7 @@ test('list click functionality', async () => {
|
|
|
394
399
|
▼
|
|
395
400
|
|
|
396
401
|
|
|
397
|
-
|
|
402
|
+
↑↓ navigate ^k actions"
|
|
398
403
|
`)
|
|
399
404
|
}, 10000)
|
|
400
405
|
|
|
@@ -414,24 +419,24 @@ test('list actions panel with ctrl+k', async () => {
|
|
|
414
419
|
"
|
|
415
420
|
|
|
416
421
|
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
422
|
+
Simple List Example ────────────────────────────────────────────
|
|
423
|
+
|
|
424
|
+
Search items...
|
|
425
|
+
|
|
426
|
+
Fruits ▲
|
|
427
|
+
›┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
428
|
+
┃
|
|
429
|
+
┃ esc
|
|
430
|
+
┃
|
|
431
|
+
┃ Search actions...
|
|
432
|
+
┃
|
|
433
|
+
┃ ›View Details
|
|
434
|
+
┃ Add to Cart
|
|
435
|
+
┃
|
|
436
|
+
┃
|
|
437
|
+
┃
|
|
438
|
+
┃
|
|
439
|
+
┃"
|
|
435
440
|
`)
|
|
436
441
|
|
|
437
442
|
// Navigate down to second action
|
|
@@ -442,24 +447,24 @@ test('list actions panel with ctrl+k', async () => {
|
|
|
442
447
|
"
|
|
443
448
|
|
|
444
449
|
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
450
|
+
Simple List Example ────────────────────────────────────────────
|
|
451
|
+
|
|
452
|
+
Search items...
|
|
453
|
+
|
|
454
|
+
Fruits ▲
|
|
455
|
+
›┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
456
|
+
┃
|
|
457
|
+
┃ esc
|
|
458
|
+
┃
|
|
459
|
+
┃ Search actions...
|
|
460
|
+
┃
|
|
461
|
+
┃ View Details
|
|
462
|
+
┃ ›Add to Cart
|
|
463
|
+
┃
|
|
464
|
+
┃
|
|
465
|
+
┃
|
|
466
|
+
┃
|
|
467
|
+
┃"
|
|
463
468
|
`)
|
|
464
469
|
|
|
465
470
|
// Trigger the second action (Add to Cart)
|
|
@@ -485,7 +490,7 @@ test('list actions panel with ctrl+k', async () => {
|
|
|
485
490
|
▼
|
|
486
491
|
|
|
487
492
|
|
|
488
|
-
↵
|
|
493
|
+
↵ vie┌─────────────────────────────────────────────────────┐
|
|
489
494
|
│ ✓ Added to Cart - Apple has been added to your cart │
|
|
490
495
|
└─────────────────────────────────────────────────────┘"
|
|
491
496
|
`)
|
|
@@ -502,6 +507,125 @@ test('empty sections should be hidden', async () => {
|
|
|
502
507
|
expect(snapshot).not.toContain('Empty section should be hidden')
|
|
503
508
|
}, 10000)
|
|
504
509
|
|
|
510
|
+
test('filtering selects first visible item and navigation works', async () => {
|
|
511
|
+
await session.text({
|
|
512
|
+
waitFor: (text) => {
|
|
513
|
+
return /search/i.test(text)
|
|
514
|
+
},
|
|
515
|
+
})
|
|
516
|
+
|
|
517
|
+
// Type "ora" which filters to Orange and Carrot (has "orange" keyword)
|
|
518
|
+
await session.type('ora')
|
|
519
|
+
|
|
520
|
+
await new Promise((resolve) => setTimeout(resolve, 100))
|
|
521
|
+
|
|
522
|
+
const afterFilterSnapshot = await session.text({
|
|
523
|
+
waitFor: (text) => {
|
|
524
|
+
return /ora/.test(text) && /Orange/.test(text)
|
|
525
|
+
},
|
|
526
|
+
})
|
|
527
|
+
// TODO: first visible item should be selected immediately, pending flushSync support
|
|
528
|
+
expect(afterFilterSnapshot).toMatchInlineSnapshot(`
|
|
529
|
+
"
|
|
530
|
+
|
|
531
|
+
|
|
532
|
+
Simple List Example ────────────────────────────────────────────
|
|
533
|
+
|
|
534
|
+
ora
|
|
535
|
+
|
|
536
|
+
Orange Citrus and juicy Fresh
|
|
537
|
+
Carrot Orange and crunchy [Healthy]
|
|
538
|
+
|
|
539
|
+
|
|
540
|
+
|
|
541
|
+
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
|
|
545
|
+
|
|
546
|
+
|
|
547
|
+
↵ view details ↑↓ navigate ^k actions"
|
|
548
|
+
`)
|
|
549
|
+
|
|
550
|
+
// Press down - move function corrects invalid selection to first visible, then moves
|
|
551
|
+
await session.press('down')
|
|
552
|
+
|
|
553
|
+
const afterDownSnapshot = await session.text()
|
|
554
|
+
expect(afterDownSnapshot).toMatchInlineSnapshot(`
|
|
555
|
+
"
|
|
556
|
+
|
|
557
|
+
|
|
558
|
+
Simple List Example ────────────────────────────────────────────
|
|
559
|
+
|
|
560
|
+
ora
|
|
561
|
+
|
|
562
|
+
›Orange Citrus and juicy Fresh
|
|
563
|
+
Carrot Orange and crunchy [Healthy]
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
|
|
567
|
+
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+
↑↓ navigate ^k actions"
|
|
574
|
+
`)
|
|
575
|
+
|
|
576
|
+
// Press down again
|
|
577
|
+
await session.press('down')
|
|
578
|
+
|
|
579
|
+
const afterSecondDownSnapshot = await session.text()
|
|
580
|
+
expect(afterSecondDownSnapshot).toMatchInlineSnapshot(`
|
|
581
|
+
"
|
|
582
|
+
|
|
583
|
+
|
|
584
|
+
Simple List Example ────────────────────────────────────────────
|
|
585
|
+
|
|
586
|
+
ora
|
|
587
|
+
|
|
588
|
+
Orange Citrus and juicy Fresh
|
|
589
|
+
›Carrot Orange and crunchy [Healthy]
|
|
590
|
+
|
|
591
|
+
|
|
592
|
+
|
|
593
|
+
|
|
594
|
+
|
|
595
|
+
|
|
596
|
+
|
|
597
|
+
|
|
598
|
+
|
|
599
|
+
↵ view details ↑↓ navigate ^k actions"
|
|
600
|
+
`)
|
|
601
|
+
|
|
602
|
+
// Press down to wrap back
|
|
603
|
+
await session.press('down')
|
|
604
|
+
|
|
605
|
+
const afterWrapSnapshot = await session.text()
|
|
606
|
+
expect(afterWrapSnapshot).toMatchInlineSnapshot(`
|
|
607
|
+
"
|
|
608
|
+
|
|
609
|
+
|
|
610
|
+
Simple List Example ────────────────────────────────────────────
|
|
611
|
+
|
|
612
|
+
ora
|
|
613
|
+
|
|
614
|
+
›Orange Citrus and juicy Fresh
|
|
615
|
+
Carrot Orange and crunchy [Healthy]
|
|
616
|
+
|
|
617
|
+
|
|
618
|
+
|
|
619
|
+
|
|
620
|
+
|
|
621
|
+
|
|
622
|
+
|
|
623
|
+
|
|
624
|
+
|
|
625
|
+
↑↓ navigate ^k actions"
|
|
626
|
+
`)
|
|
627
|
+
}, 10000)
|
|
628
|
+
|
|
505
629
|
test('list scrollbox scrolling with sections', async () => {
|
|
506
630
|
await session.text({
|
|
507
631
|
waitFor: (text) => {
|
|
@@ -529,7 +653,7 @@ test('list scrollbox scrolling with sections', async () => {
|
|
|
529
653
|
▼
|
|
530
654
|
|
|
531
655
|
|
|
532
|
-
↵
|
|
656
|
+
↵ view details ↑↓ navigate ^k actions"
|
|
533
657
|
`)
|
|
534
658
|
|
|
535
659
|
// Navigate down through Fruits section
|
|
@@ -549,18 +673,18 @@ test('list scrollbox scrolling with sections', async () => {
|
|
|
549
673
|
|
|
550
674
|
Search items...
|
|
551
675
|
|
|
552
|
-
|
|
553
|
-
Apple Red and sweet Fresh [Popular] ▀
|
|
554
|
-
Banana Yellow and nutritious Ripe
|
|
555
|
-
Orange Citrus and juicy Fresh
|
|
676
|
+
Orange Citrus and juicy Fresh ▲
|
|
556
677
|
Grape Sweet clusters [Seasonal]
|
|
557
678
|
Mango Tropical delight Imported
|
|
558
|
-
Pineapple Sweet and tangy
|
|
679
|
+
Pineapple Sweet and tangy ▀
|
|
559
680
|
›Strawberry Red and sweet [Popular]
|
|
560
|
-
▼
|
|
561
681
|
|
|
682
|
+
Vegetables
|
|
683
|
+
Carrot Orange and crunchy [Healthy]
|
|
684
|
+
Lettuce Green and fresh ▼
|
|
562
685
|
|
|
563
|
-
|
|
686
|
+
|
|
687
|
+
↑↓ navigate ^k actions"
|
|
564
688
|
`)
|
|
565
689
|
|
|
566
690
|
// Continue to Vegetables section
|
|
@@ -577,18 +701,18 @@ test('list scrollbox scrolling with sections', async () => {
|
|
|
577
701
|
|
|
578
702
|
Search items...
|
|
579
703
|
|
|
580
|
-
|
|
581
|
-
Mango Tropical delight Imported
|
|
582
|
-
Pineapple Sweet and tangy
|
|
583
|
-
Strawberry Red and sweet [Popular] ▄
|
|
584
|
-
|
|
704
|
+
▲
|
|
585
705
|
Vegetables
|
|
586
706
|
Carrot Orange and crunchy [Healthy]
|
|
587
707
|
Lettuce Green and fresh
|
|
588
|
-
›Broccoli Green florets [Healthy]
|
|
708
|
+
›Broccoli Green florets [Healthy]
|
|
709
|
+
Spinach Leafy greens Organic
|
|
710
|
+
Tomato Red and ripe ▀
|
|
711
|
+
Cucumber Cool and crisp
|
|
712
|
+
Bell Pepper Colorful and crunchy [Fresh] ▼
|
|
589
713
|
|
|
590
714
|
|
|
591
|
-
|
|
715
|
+
↑↓ navigate ^k actions"
|
|
592
716
|
`)
|
|
593
717
|
|
|
594
718
|
// Navigate to the last items
|
|
@@ -618,7 +742,7 @@ test('list scrollbox scrolling with sections', async () => {
|
|
|
618
742
|
›Bread Freshly baked Today [New] ▼
|
|
619
743
|
|
|
620
744
|
|
|
621
|
-
↵
|
|
745
|
+
↵ view details ↑↓ navigate ^k actions"
|
|
622
746
|
`)
|
|
623
747
|
|
|
624
748
|
// Navigate back up to top
|
|
@@ -646,6 +770,6 @@ test('list scrollbox scrolling with sections', async () => {
|
|
|
646
770
|
›Bread Freshly baked Today [New] ▼
|
|
647
771
|
|
|
648
772
|
|
|
649
|
-
↵
|
|
773
|
+
↵ view details ↑↓ navigate ^k actions"
|
|
650
774
|
`)
|
|
651
775
|
}, 15000)
|
|
@@ -43,7 +43,7 @@ test('list navigation works while toast is shown', async () => {
|
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
↑↓ navigate ^k a┌─────────────────────────┐
|
|
47
47
|
│ ✓ Selected - First Item │
|
|
48
48
|
└─────────────────────────┘"
|
|
49
49
|
`)
|
|
@@ -71,7 +71,7 @@ test('list navigation works while toast is shown', async () => {
|
|
|
71
71
|
|
|
72
72
|
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
↑↓ navigate ^k ┌──────────────────────────┐
|
|
75
75
|
│ ✓ Selected - Second Item │
|
|
76
76
|
└──────────────────────────┘"
|
|
77
77
|
`)
|
|
@@ -99,7 +99,7 @@ test('list navigation works while toast is shown', async () => {
|
|
|
99
99
|
|
|
100
100
|
|
|
101
101
|
|
|
102
|
-
|
|
102
|
+
↑↓ navigate ^k a┌─────────────────────────┐
|
|
103
103
|
│ ✓ Selected - Third Item │
|
|
104
104
|
└─────────────────────────┘"
|
|
105
105
|
`)
|
|
@@ -127,7 +127,7 @@ test('list navigation works while toast is shown', async () => {
|
|
|
127
127
|
|
|
128
128
|
|
|
129
129
|
|
|
130
|
-
|
|
130
|
+
↑↓ navigate ^k ┌──────────────────────────┐
|
|
131
131
|
│ ✓ Selected - Second Item │
|
|
132
132
|
└──────────────────────────┘"
|
|
133
133
|
`)
|