termcast 1.3.21 → 1.3.25
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/apis/toast.d.ts +5 -0
- package/dist/apis/toast.d.ts.map +1 -1
- package/dist/apis/toast.js +7 -43
- package/dist/apis/toast.js.map +1 -1
- package/dist/build.d.ts.map +1 -1
- package/dist/build.js +3 -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 +87 -41
- 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 +2 -1
- package/dist/compile.d.ts.map +1 -1
- package/dist/compile.js +31 -12
- 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 +104 -30
- package/dist/components/form/index.js.map +1 -1
- package/dist/components/form/password-field.d.ts.map +1 -1
- package/dist/components/form/password-field.js +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 +155 -70
- 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/examples/toast-variations.d.ts +2 -0
- package/dist/examples/toast-variations.d.ts.map +1 -0
- package/dist/examples/toast-variations.js +122 -0
- package/dist/examples/toast-variations.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/release.d.ts +1 -1
- package/dist/release.d.ts.map +1 -1
- package/dist/release.js +29 -33
- package/dist/release.js.map +1 -1
- 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 +26 -1
- package/dist/utils/run-command.d.ts.map +1 -1
- package/dist/utils/run-command.js +53 -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 +12 -12
- 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/apis/toast.tsx +37 -62
- package/src/build.test.tsx +52 -0
- package/src/build.tsx +3 -1
- package/src/cli.tsx +99 -48
- package/src/compile.tsx +32 -11
- 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 +168 -41
- 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 +243 -101
- 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 +191 -85
- 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 +221 -97
- package/src/examples/list-with-toast.vitest.tsx +16 -16
- package/src/examples/simple-file-picker.vitest.tsx +63 -469
- package/src/examples/simple-grid.vitest.tsx +238 -233
- package/src/examples/simple-navigation.tsx +15 -7
- package/src/examples/simple-navigation.vitest.tsx +130 -219
- 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/examples/toast-variations.tsx +150 -0
- package/src/examples/toast-variations.vitest.tsx +370 -0
- package/src/extensions/dev.tsx +74 -7
- package/src/extensions/dev.vitest.tsx +102 -34
- 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/release.tsx +32 -38
- 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 +82 -6
|
@@ -42,8 +42,8 @@ test('form tagpicker shows inline options', async () => {
|
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
■ TagPicker Component Demo
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
│ Test tag picker with multiple selection support
|
|
46
|
+
│
|
|
47
47
|
◇ Favorite Sport
|
|
48
48
|
│ Choose your favorite sport...
|
|
49
49
|
│
|
|
@@ -51,7 +51,7 @@ test('form tagpicker shows inline options', async () => {
|
|
|
51
51
|
│ ○ Football
|
|
52
52
|
│ ○ Tennis
|
|
53
53
|
│ ○ Baseball
|
|
54
|
-
│
|
|
54
|
+
│ ○ Golf
|
|
55
55
|
│
|
|
56
56
|
│ Select your favorite sport from the list
|
|
57
57
|
│
|
|
@@ -62,7 +62,8 @@ test('form tagpicker shows inline options', async () => {
|
|
|
62
62
|
│ ○ India
|
|
63
63
|
│ ○ Netherlands
|
|
64
64
|
│ ○ Norway
|
|
65
|
-
│
|
|
65
|
+
│ ○ Poland
|
|
66
|
+
│
|
|
66
67
|
└
|
|
67
68
|
|
|
68
69
|
|
|
@@ -75,8 +76,7 @@ test('form tagpicker shows inline options', async () => {
|
|
|
75
76
|
|
|
76
77
|
|
|
77
78
|
|
|
78
|
-
|
|
79
|
-
ctrl ↵ submit ↑↓ navigate ^k actions"
|
|
79
|
+
ctrl ↵ submit tab navigate ^k actions"
|
|
80
80
|
`)
|
|
81
81
|
|
|
82
82
|
await session.press('space')
|
|
@@ -97,8 +97,8 @@ test('form tagpicker shows inline options', async () => {
|
|
|
97
97
|
|
|
98
98
|
|
|
99
99
|
■ TagPicker Component Demo
|
|
100
|
-
|
|
101
|
-
|
|
100
|
+
│ Test tag picker with multiple selection support
|
|
101
|
+
│
|
|
102
102
|
◇ Favorite Sport
|
|
103
103
|
│ Choose your favorite sport...
|
|
104
104
|
│
|
|
@@ -106,7 +106,7 @@ test('form tagpicker shows inline options', async () => {
|
|
|
106
106
|
│ ○ Football
|
|
107
107
|
│ ○ Tennis
|
|
108
108
|
│ ○ Baseball
|
|
109
|
-
│
|
|
109
|
+
│ ○ Golf
|
|
110
110
|
│
|
|
111
111
|
│ Select your favorite sport from the list
|
|
112
112
|
│
|
|
@@ -117,7 +117,8 @@ test('form tagpicker shows inline options', async () => {
|
|
|
117
117
|
│ ○ India
|
|
118
118
|
│ ○ Netherlands
|
|
119
119
|
│ ○ Norway
|
|
120
|
-
│
|
|
120
|
+
│ ○ Poland
|
|
121
|
+
│
|
|
121
122
|
└
|
|
122
123
|
|
|
123
124
|
|
|
@@ -130,8 +131,7 @@ test('form tagpicker shows inline options', async () => {
|
|
|
130
131
|
|
|
131
132
|
|
|
132
133
|
|
|
133
|
-
|
|
134
|
-
ctrl ↵ submit ↑↓ navigate ^k actions"
|
|
134
|
+
ctrl ↵ submit tab navigate ^k actions"
|
|
135
135
|
`)
|
|
136
136
|
|
|
137
137
|
await session.press('down')
|
|
@@ -152,8 +152,8 @@ test('form tagpicker shows inline options', async () => {
|
|
|
152
152
|
|
|
153
153
|
|
|
154
154
|
■ TagPicker Component Demo
|
|
155
|
-
|
|
156
|
-
|
|
155
|
+
│ Test tag picker with multiple selection support
|
|
156
|
+
│
|
|
157
157
|
◇ Favorite Sport
|
|
158
158
|
│ Choose your favorite sport...
|
|
159
159
|
│
|
|
@@ -161,7 +161,7 @@ test('form tagpicker shows inline options', async () => {
|
|
|
161
161
|
│ ○ Football
|
|
162
162
|
│ ○ Tennis
|
|
163
163
|
│ ○ Baseball
|
|
164
|
-
│
|
|
164
|
+
│ ○ Golf
|
|
165
165
|
│
|
|
166
166
|
│ Select your favorite sport from the list
|
|
167
167
|
│
|
|
@@ -172,7 +172,8 @@ test('form tagpicker shows inline options', async () => {
|
|
|
172
172
|
│ ○ India
|
|
173
173
|
│ ○ Netherlands
|
|
174
174
|
│ ○ Norway
|
|
175
|
-
│
|
|
175
|
+
│ ○ Poland
|
|
176
|
+
│
|
|
176
177
|
└
|
|
177
178
|
|
|
178
179
|
|
|
@@ -185,8 +186,7 @@ test('form tagpicker shows inline options', async () => {
|
|
|
185
186
|
|
|
186
187
|
|
|
187
188
|
|
|
188
|
-
|
|
189
|
-
ctrl ↵ submit ↑↓ navigate ^k actions"
|
|
189
|
+
ctrl ↵ submit tab navigate ^k actions"
|
|
190
190
|
`)
|
|
191
191
|
|
|
192
192
|
await session.press('down')
|
|
@@ -210,8 +210,8 @@ test('form tagpicker shows inline options', async () => {
|
|
|
210
210
|
|
|
211
211
|
|
|
212
212
|
■ TagPicker Component Demo
|
|
213
|
-
|
|
214
|
-
|
|
213
|
+
│ Test tag picker with multiple selection support
|
|
214
|
+
│
|
|
215
215
|
◇ Favorite Sport
|
|
216
216
|
│ Choose your favorite sport...
|
|
217
217
|
│
|
|
@@ -219,7 +219,7 @@ test('form tagpicker shows inline options', async () => {
|
|
|
219
219
|
│ ○ Football
|
|
220
220
|
│ ○ Tennis
|
|
221
221
|
│ ○ Baseball
|
|
222
|
-
│
|
|
222
|
+
│ ○ Golf
|
|
223
223
|
│
|
|
224
224
|
│ Select your favorite sport from the list
|
|
225
225
|
│
|
|
@@ -230,7 +230,8 @@ test('form tagpicker shows inline options', async () => {
|
|
|
230
230
|
│ ○ India
|
|
231
231
|
│ ○ Netherlands
|
|
232
232
|
│ ○ Norway
|
|
233
|
-
│
|
|
233
|
+
│ ○ Poland
|
|
234
|
+
│
|
|
234
235
|
└
|
|
235
236
|
|
|
236
237
|
|
|
@@ -243,8 +244,7 @@ test('form tagpicker shows inline options', async () => {
|
|
|
243
244
|
|
|
244
245
|
|
|
245
246
|
|
|
246
|
-
|
|
247
|
-
ctrl ↵ submit ↑↓ navigate ^k actions"
|
|
247
|
+
ctrl ↵ submit tab navigate ^k actions"
|
|
248
248
|
`)
|
|
249
249
|
|
|
250
250
|
await session.press('enter')
|
|
@@ -265,8 +265,8 @@ test('form tagpicker shows inline options', async () => {
|
|
|
265
265
|
|
|
266
266
|
|
|
267
267
|
■ TagPicker Component Demo
|
|
268
|
-
|
|
269
|
-
|
|
268
|
+
│ Test tag picker with multiple selection support
|
|
269
|
+
│
|
|
270
270
|
◇ Favorite Sport
|
|
271
271
|
│ Choose your favorite sport...
|
|
272
272
|
│
|
|
@@ -274,7 +274,7 @@ test('form tagpicker shows inline options', async () => {
|
|
|
274
274
|
│ ○ Football
|
|
275
275
|
│ ○ Tennis
|
|
276
276
|
│ ○ Baseball
|
|
277
|
-
│
|
|
277
|
+
│ ○ Golf
|
|
278
278
|
│
|
|
279
279
|
│ Select your favorite sport from the list
|
|
280
280
|
│
|
|
@@ -285,7 +285,8 @@ test('form tagpicker shows inline options', async () => {
|
|
|
285
285
|
│ ○ India
|
|
286
286
|
│ ○ Netherlands
|
|
287
287
|
│ ○ Norway
|
|
288
|
-
│
|
|
288
|
+
│ ○ Poland
|
|
289
|
+
│
|
|
289
290
|
└
|
|
290
291
|
|
|
291
292
|
|
|
@@ -298,8 +299,7 @@ test('form tagpicker shows inline options', async () => {
|
|
|
298
299
|
|
|
299
300
|
|
|
300
301
|
|
|
301
|
-
|
|
302
|
-
ctrl ↵ submit ↑↓ navigate ^k actions"
|
|
302
|
+
ctrl ↵ submit tab navigate ^k actions"
|
|
303
303
|
`)
|
|
304
304
|
}, 15000)
|
|
305
305
|
|
|
@@ -328,8 +328,8 @@ test('form tagpicker keyboard navigation', async () => {
|
|
|
328
328
|
|
|
329
329
|
|
|
330
330
|
■ TagPicker Component Demo
|
|
331
|
-
|
|
332
|
-
|
|
331
|
+
│ Test tag picker with multiple selection support
|
|
332
|
+
│
|
|
333
333
|
◇ Favorite Sport
|
|
334
334
|
│ Choose your favorite sport...
|
|
335
335
|
│
|
|
@@ -337,7 +337,7 @@ test('form tagpicker keyboard navigation', async () => {
|
|
|
337
337
|
│ ○ Football
|
|
338
338
|
│ ○ Tennis
|
|
339
339
|
│ ○ Baseball
|
|
340
|
-
│
|
|
340
|
+
│ ○ Golf
|
|
341
341
|
│
|
|
342
342
|
│ Select your favorite sport from the list
|
|
343
343
|
│
|
|
@@ -348,7 +348,8 @@ test('form tagpicker keyboard navigation', async () => {
|
|
|
348
348
|
│ ○ India
|
|
349
349
|
│ ○ Netherlands
|
|
350
350
|
│ ○ Norway
|
|
351
|
-
│
|
|
351
|
+
│ ○ Poland
|
|
352
|
+
│
|
|
352
353
|
└
|
|
353
354
|
|
|
354
355
|
|
|
@@ -361,8 +362,7 @@ test('form tagpicker keyboard navigation', async () => {
|
|
|
361
362
|
|
|
362
363
|
|
|
363
364
|
|
|
364
|
-
|
|
365
|
-
ctrl ↵ submit ↑↓ navigate ^k actions"
|
|
365
|
+
ctrl ↵ submit tab navigate ^k actions"
|
|
366
366
|
`)
|
|
367
367
|
|
|
368
368
|
await session.press('down')
|
|
@@ -386,8 +386,8 @@ test('form tagpicker keyboard navigation', async () => {
|
|
|
386
386
|
|
|
387
387
|
|
|
388
388
|
■ TagPicker Component Demo
|
|
389
|
-
|
|
390
|
-
|
|
389
|
+
│ Test tag picker with multiple selection support
|
|
390
|
+
│
|
|
391
391
|
◇ Favorite Sport
|
|
392
392
|
│ Choose your favorite sport...
|
|
393
393
|
│
|
|
@@ -395,7 +395,7 @@ test('form tagpicker keyboard navigation', async () => {
|
|
|
395
395
|
│ ○ Football
|
|
396
396
|
│ ○ Tennis
|
|
397
397
|
│ ○ Baseball
|
|
398
|
-
│
|
|
398
|
+
│ ○ Golf
|
|
399
399
|
│
|
|
400
400
|
│ Select your favorite sport from the list
|
|
401
401
|
│
|
|
@@ -406,7 +406,8 @@ test('form tagpicker keyboard navigation', async () => {
|
|
|
406
406
|
│ ○ India
|
|
407
407
|
│ ○ Netherlands
|
|
408
408
|
│ ○ Norway
|
|
409
|
-
│
|
|
409
|
+
│ ○ Poland
|
|
410
|
+
│
|
|
410
411
|
└
|
|
411
412
|
|
|
412
413
|
|
|
@@ -419,8 +420,7 @@ test('form tagpicker keyboard navigation', async () => {
|
|
|
419
420
|
|
|
420
421
|
|
|
421
422
|
|
|
422
|
-
|
|
423
|
-
ctrl ↵ submit ↑↓ navigate ^k actions"
|
|
423
|
+
ctrl ↵ submit tab navigate ^k actions"
|
|
424
424
|
`)
|
|
425
425
|
|
|
426
426
|
await session.press('down')
|
|
@@ -441,8 +441,8 @@ test('form tagpicker keyboard navigation', async () => {
|
|
|
441
441
|
|
|
442
442
|
|
|
443
443
|
■ TagPicker Component Demo
|
|
444
|
-
|
|
445
|
-
|
|
444
|
+
│ Test tag picker with multiple selection support
|
|
445
|
+
│
|
|
446
446
|
◇ Favorite Sport
|
|
447
447
|
│ Choose your favorite sport...
|
|
448
448
|
│
|
|
@@ -450,7 +450,7 @@ test('form tagpicker keyboard navigation', async () => {
|
|
|
450
450
|
│ ○ Football
|
|
451
451
|
│ ○ Tennis
|
|
452
452
|
│ ○ Baseball
|
|
453
|
-
│
|
|
453
|
+
│ ○ Golf
|
|
454
454
|
│
|
|
455
455
|
│ Select your favorite sport from the list
|
|
456
456
|
│
|
|
@@ -461,7 +461,8 @@ test('form tagpicker keyboard navigation', async () => {
|
|
|
461
461
|
│ ○ India
|
|
462
462
|
│ ○ Netherlands
|
|
463
463
|
│ ○ Norway
|
|
464
|
-
│
|
|
464
|
+
│ ○ Poland
|
|
465
|
+
│
|
|
465
466
|
└
|
|
466
467
|
|
|
467
468
|
|
|
@@ -474,8 +475,7 @@ test('form tagpicker keyboard navigation', async () => {
|
|
|
474
475
|
|
|
475
476
|
|
|
476
477
|
|
|
477
|
-
|
|
478
|
-
ctrl ↵ submit ↑↓ navigate ^k actions"
|
|
478
|
+
ctrl ↵ submit tab navigate ^k actions"
|
|
479
479
|
`)
|
|
480
480
|
|
|
481
481
|
await session.press('up')
|
|
@@ -496,8 +496,8 @@ test('form tagpicker keyboard navigation', async () => {
|
|
|
496
496
|
|
|
497
497
|
|
|
498
498
|
■ TagPicker Component Demo
|
|
499
|
-
|
|
500
|
-
|
|
499
|
+
│ Test tag picker with multiple selection support
|
|
500
|
+
│
|
|
501
501
|
◇ Favorite Sport
|
|
502
502
|
│ Choose your favorite sport...
|
|
503
503
|
│
|
|
@@ -505,7 +505,7 @@ test('form tagpicker keyboard navigation', async () => {
|
|
|
505
505
|
│ ○ Football
|
|
506
506
|
│ ○ Tennis
|
|
507
507
|
│ ○ Baseball
|
|
508
|
-
│
|
|
508
|
+
│ ○ Golf
|
|
509
509
|
│
|
|
510
510
|
│ Select your favorite sport from the list
|
|
511
511
|
│
|
|
@@ -516,7 +516,8 @@ test('form tagpicker keyboard navigation', async () => {
|
|
|
516
516
|
│ ○ India
|
|
517
517
|
│ ○ Netherlands
|
|
518
518
|
│ ○ Norway
|
|
519
|
-
│
|
|
519
|
+
│ ○ Poland
|
|
520
|
+
│
|
|
520
521
|
└
|
|
521
522
|
|
|
522
523
|
|
|
@@ -529,8 +530,7 @@ test('form tagpicker keyboard navigation', async () => {
|
|
|
529
530
|
|
|
530
531
|
|
|
531
532
|
|
|
532
|
-
|
|
533
|
-
ctrl ↵ submit ↑↓ navigate ^k actions"
|
|
533
|
+
ctrl ↵ submit tab navigate ^k actions"
|
|
534
534
|
`)
|
|
535
535
|
|
|
536
536
|
await session.press('esc')
|
|
@@ -551,8 +551,8 @@ test('form tagpicker keyboard navigation', async () => {
|
|
|
551
551
|
|
|
552
552
|
|
|
553
553
|
■ TagPicker Component Demo
|
|
554
|
-
|
|
555
|
-
|
|
554
|
+
│ Test tag picker with multiple selection support
|
|
555
|
+
│
|
|
556
556
|
◇ Favorite Sport
|
|
557
557
|
│ Choose your favorite sport...
|
|
558
558
|
│
|
|
@@ -560,7 +560,7 @@ test('form tagpicker keyboard navigation', async () => {
|
|
|
560
560
|
│ ○ Football
|
|
561
561
|
│ ○ Tennis
|
|
562
562
|
│ ○ Baseball
|
|
563
|
-
│
|
|
563
|
+
│ ○ Golf
|
|
564
564
|
│
|
|
565
565
|
│ Select your favorite sport from the list
|
|
566
566
|
│
|
|
@@ -571,7 +571,8 @@ test('form tagpicker keyboard navigation', async () => {
|
|
|
571
571
|
│ ○ India
|
|
572
572
|
│ ○ Netherlands
|
|
573
573
|
│ ○ Norway
|
|
574
|
-
│
|
|
574
|
+
│ ○ Poland
|
|
575
|
+
│
|
|
575
576
|
└
|
|
576
577
|
|
|
577
578
|
|
|
@@ -584,8 +585,7 @@ test('form tagpicker keyboard navigation', async () => {
|
|
|
584
585
|
|
|
585
586
|
|
|
586
587
|
|
|
587
|
-
|
|
588
|
-
ctrl ↵ submit ↑↓ navigate ^k actions"
|
|
588
|
+
ctrl ↵ submit tab navigate ^k actions"
|
|
589
589
|
`)
|
|
590
590
|
}, 15000)
|
|
591
591
|
|
|
@@ -617,16 +617,16 @@ test('form tagpicker with default value', async () => {
|
|
|
617
617
|
│ Test tag picker with multiple selection support
|
|
618
618
|
│
|
|
619
619
|
◆ Favorite Sport
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
620
|
+
│ Choose your favorite sport...
|
|
621
|
+
│
|
|
622
|
+
│› ○ Basketball
|
|
623
|
+
│ ○ Football
|
|
624
|
+
│ ○ Tennis
|
|
625
|
+
│ ○ Baseball
|
|
626
|
+
│ ○ Golf
|
|
627
|
+
│
|
|
628
|
+
│ Select your favorite sport from the list
|
|
629
|
+
│
|
|
630
630
|
◇ Country
|
|
631
631
|
│ Germany
|
|
632
632
|
│
|
|
@@ -634,7 +634,8 @@ test('form tagpicker with default value', async () => {
|
|
|
634
634
|
│ ○ India
|
|
635
635
|
│ ○ Netherlands
|
|
636
636
|
│ ○ Norway
|
|
637
|
-
│
|
|
637
|
+
│ ○ Poland
|
|
638
|
+
│
|
|
638
639
|
└
|
|
639
640
|
|
|
640
641
|
|
|
@@ -647,8 +648,7 @@ test('form tagpicker with default value', async () => {
|
|
|
647
648
|
|
|
648
649
|
|
|
649
650
|
|
|
650
|
-
|
|
651
|
-
ctrl ↵ submit ↑↓ navigate ^k actions"
|
|
651
|
+
ctrl ↵ submit tab navigate ^k actions"
|
|
652
652
|
`)
|
|
653
653
|
|
|
654
654
|
await session.press('space')
|
|
@@ -672,16 +672,16 @@ test('form tagpicker with default value', async () => {
|
|
|
672
672
|
│ Test tag picker with multiple selection support
|
|
673
673
|
│
|
|
674
674
|
◆ Favorite Sport
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
675
|
+
│ Basketball
|
|
676
|
+
│
|
|
677
|
+
│› ● Basketball
|
|
678
|
+
│ ○ Football
|
|
679
|
+
│ ○ Tennis
|
|
680
|
+
│ ○ Baseball
|
|
681
|
+
│ ○ Golf
|
|
682
|
+
│
|
|
683
|
+
│ Select your favorite sport from the list
|
|
684
|
+
│
|
|
685
685
|
◇ Country
|
|
686
686
|
│ Germany
|
|
687
687
|
│
|
|
@@ -689,7 +689,8 @@ test('form tagpicker with default value', async () => {
|
|
|
689
689
|
│ ○ India
|
|
690
690
|
│ ○ Netherlands
|
|
691
691
|
│ ○ Norway
|
|
692
|
-
│
|
|
692
|
+
│ ○ Poland
|
|
693
|
+
│
|
|
693
694
|
└
|
|
694
695
|
|
|
695
696
|
|
|
@@ -702,8 +703,7 @@ test('form tagpicker with default value', async () => {
|
|
|
702
703
|
|
|
703
704
|
|
|
704
705
|
|
|
705
|
-
|
|
706
|
-
ctrl ↵ submit ↑↓ navigate ^k actions"
|
|
706
|
+
ctrl ↵ submit tab navigate ^k actions"
|
|
707
707
|
`)
|
|
708
708
|
|
|
709
709
|
await session.press('esc')
|
|
@@ -728,16 +728,16 @@ test('form tagpicker with default value', async () => {
|
|
|
728
728
|
│ Test tag picker with multiple selection support
|
|
729
729
|
│
|
|
730
730
|
◆ Favorite Sport
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
731
|
+
│ Choose your favorite sport...
|
|
732
|
+
│
|
|
733
|
+
│› ○ Basketball
|
|
734
|
+
│ ○ Football
|
|
735
|
+
│ ○ Tennis
|
|
736
|
+
│ ○ Baseball
|
|
737
|
+
│ ○ Golf
|
|
738
|
+
│
|
|
739
|
+
│ Select your favorite sport from the list
|
|
740
|
+
│
|
|
741
741
|
◇ Country
|
|
742
742
|
│ Germany
|
|
743
743
|
│
|
|
@@ -745,7 +745,7 @@ test('form tagpicker with default value', async () => {
|
|
|
745
745
|
│ ○ India
|
|
746
746
|
│ ○ Netherlands
|
|
747
747
|
│ ○ Norway
|
|
748
|
-
│
|
|
748
|
+
│ ○ Poland
|
|
749
749
|
│
|
|
750
750
|
▪ Submitted Data
|
|
751
751
|
│ {
|
|
@@ -755,6 +755,7 @@ test('form tagpicker with default value', async () => {
|
|
|
755
755
|
│ ]
|
|
756
756
|
│ }
|
|
757
757
|
│
|
|
758
|
+
└
|
|
758
759
|
|
|
759
760
|
|
|
760
761
|
|
|
@@ -762,7 +763,6 @@ test('form tagpicker with default value', async () => {
|
|
|
762
763
|
|
|
763
764
|
|
|
764
765
|
|
|
765
|
-
|
|
766
|
-
ctrl ↵ submit ↑↓ navigate ^k actions"
|
|
766
|
+
ctrl ↵ submit tab navigate ^k actions"
|
|
767
767
|
`)
|
|
768
768
|
}, 15000)
|
|
@@ -90,6 +90,7 @@ function RHFCustomRefExample() {
|
|
|
90
90
|
<textarea
|
|
91
91
|
ref={handleUsernameRef}
|
|
92
92
|
height={1}
|
|
93
|
+
wrapMode='none'
|
|
93
94
|
placeholder="Enter username..."
|
|
94
95
|
onContentChange={onUsernameChange}
|
|
95
96
|
onMouseDown={() => {
|
|
@@ -114,6 +115,7 @@ function RHFCustomRefExample() {
|
|
|
114
115
|
<textarea
|
|
115
116
|
ref={handleMessageRef}
|
|
116
117
|
height={2}
|
|
118
|
+
wrapMode='none'
|
|
117
119
|
placeholder="Enter message..."
|
|
118
120
|
onContentChange={onMessageChange}
|
|
119
121
|
onMouseDown={() => {
|
|
@@ -20,39 +20,15 @@ function ScrollBoxListDemo(): any {
|
|
|
20
20
|
const selectedItem = itemRefs.current.get(selectedIndex)
|
|
21
21
|
|
|
22
22
|
if (scrollBox && selectedItem) {
|
|
23
|
-
// Get the actual item height including padding and margins
|
|
24
|
-
const itemHeight = selectedItem.height
|
|
25
|
-
|
|
26
23
|
// Calculate item position in the content
|
|
27
|
-
// We need the absolute position of the item within the scrollable content
|
|
28
24
|
const itemRelativeTop = selectedItem.y - scrollBox.content.y
|
|
29
|
-
const itemRelativeBottom = itemRelativeTop + itemHeight
|
|
30
25
|
|
|
31
26
|
// Get viewport info
|
|
32
27
|
const viewportHeight = scrollBox.viewport.height
|
|
33
|
-
const currentScrollTop = scrollBox.scrollTop || 0
|
|
34
|
-
|
|
35
|
-
// Define safe zone with padding
|
|
36
|
-
const safePadding = 2
|
|
37
28
|
|
|
38
|
-
//
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
// Check if we need to scroll
|
|
43
|
-
if (itemVisibleTop < safePadding) {
|
|
44
|
-
// Item is too close to top or above viewport
|
|
45
|
-
const newScrollTop = Math.max(0, itemRelativeTop - safePadding)
|
|
46
|
-
scrollBox.scrollTo(newScrollTop)
|
|
47
|
-
} else if (itemVisibleBottom > viewportHeight - safePadding) {
|
|
48
|
-
// Item is too close to bottom or below viewport
|
|
49
|
-
// Calculate scroll position to show item at bottom with padding
|
|
50
|
-
const newScrollTop = Math.max(
|
|
51
|
-
0,
|
|
52
|
-
itemRelativeBottom - viewportHeight + safePadding,
|
|
53
|
-
)
|
|
54
|
-
scrollBox.scrollTo(newScrollTop)
|
|
55
|
-
}
|
|
29
|
+
// Scroll so the top of the item is centered in the viewport
|
|
30
|
+
const targetScrollTop = itemRelativeTop - viewportHeight / 2
|
|
31
|
+
scrollBox.scrollTo(Math.max(0, targetScrollTop))
|
|
56
32
|
}
|
|
57
33
|
}, 20) // Give enough time for layout
|
|
58
34
|
|
|
@@ -23,16 +23,13 @@ function ScrollboxWithDescendants() {
|
|
|
23
23
|
|
|
24
24
|
const contentY = scrollBox.content?.y || 0
|
|
25
25
|
const viewportHeight = scrollBox.viewport?.height || 10
|
|
26
|
-
const currentScrollTop = scrollBox.scrollTop || 0
|
|
27
26
|
|
|
27
|
+
// Calculate item position relative to content
|
|
28
28
|
const itemTop = elementRef.y - contentY
|
|
29
|
-
const itemBottom = itemTop + elementRef.height
|
|
30
29
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
scrollBox.scrollTo(itemBottom - viewportHeight)
|
|
35
|
-
}
|
|
30
|
+
// Scroll so the top of the item is centered in the viewport
|
|
31
|
+
const targetScrollTop = itemTop - viewportHeight / 2
|
|
32
|
+
scrollBox.scrollTo(Math.max(0, targetScrollTop))
|
|
36
33
|
}
|
|
37
34
|
|
|
38
35
|
const move = (direction: -1 | 1) => {
|
|
@@ -42,13 +42,16 @@ test('simple scrollbox navigation and scrolling', async () => {
|
|
|
42
42
|
await session.scrollDown(3)
|
|
43
43
|
|
|
44
44
|
const afterScrollDownSnapshot = await session.text()
|
|
45
|
+
expect(afterScrollDownSnapshot).not.toEqual(initialText)
|
|
45
46
|
expect(afterScrollDownSnapshot).toMatchInlineSnapshot(`
|
|
46
47
|
"
|
|
47
48
|
|
|
48
49
|
|
|
49
50
|
|
|
50
51
|
Simple ScrollBox Demo
|
|
51
|
-
|
|
52
|
+
Item 1 - This is content for item number 1. Lorem ipsum dolor sit amet, ▀
|
|
53
|
+
consectetur adipiscing elit.
|
|
54
|
+
|
|
52
55
|
|
|
53
56
|
|
|
54
57
|
Item 2 - This is content for item number 2. Lorem ipsum dolor sit amet,
|
|
@@ -62,8 +65,6 @@ test('simple scrollbox navigation and scrolling', async () => {
|
|
|
62
65
|
|
|
63
66
|
|
|
64
67
|
Item 4 - This is content for item number 4. Lorem ipsum dolor sit amet,
|
|
65
|
-
consectetur adipiscing elit.
|
|
66
|
-
|
|
67
68
|
|
|
68
69
|
Use mouse scroll or arrow keys | Press [q] to quit"
|
|
69
70
|
`)
|
|
@@ -72,13 +73,15 @@ test('simple scrollbox navigation and scrolling', async () => {
|
|
|
72
73
|
await session.scrollUp(2)
|
|
73
74
|
|
|
74
75
|
const afterScrollUpSnapshot = await session.text()
|
|
76
|
+
expect(afterScrollUpSnapshot).not.toEqual(afterScrollDownSnapshot)
|
|
75
77
|
expect(afterScrollUpSnapshot).toMatchInlineSnapshot(`
|
|
76
78
|
"
|
|
77
79
|
|
|
78
80
|
|
|
79
81
|
|
|
80
82
|
Simple ScrollBox Demo
|
|
81
|
-
|
|
83
|
+
▀
|
|
84
|
+
Item 1 - This is content for item number 1. Lorem ipsum dolor sit amet,
|
|
82
85
|
consectetur adipiscing elit.
|
|
83
86
|
|
|
84
87
|
|
|
@@ -93,7 +96,6 @@ test('simple scrollbox navigation and scrolling', async () => {
|
|
|
93
96
|
|
|
94
97
|
|
|
95
98
|
|
|
96
|
-
Item 4 - This is content for item number 4. Lorem ipsum dolor sit amet,
|
|
97
99
|
|
|
98
100
|
Use mouse scroll or arrow keys | Press [q] to quit"
|
|
99
101
|
`)
|