termcast 1.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/action-utils.d.ts +25 -0
- package/dist/action-utils.d.ts.map +1 -0
- package/dist/action-utils.js +209 -0
- package/dist/action-utils.js.map +1 -0
- 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/ai.d.ts +104 -0
- package/dist/apis/ai.d.ts.map +1 -0
- package/dist/apis/ai.js +135 -0
- package/dist/apis/ai.js.map +1 -0
- package/dist/apis/cache.d.ts +84 -0
- package/dist/apis/cache.d.ts.map +1 -0
- package/dist/apis/cache.js +307 -0
- package/dist/apis/cache.js.map +1 -0
- package/dist/apis/cache.test.d.ts +2 -0
- package/dist/apis/cache.test.d.ts.map +1 -0
- package/dist/apis/cache.test.js +246 -0
- package/dist/apis/cache.test.js.map +1 -0
- package/dist/apis/clipboard.d.ts +36 -0
- package/dist/apis/clipboard.d.ts.map +1 -0
- package/dist/apis/clipboard.js +154 -0
- package/dist/apis/clipboard.js.map +1 -0
- package/dist/apis/environment.d.ts +63 -0
- package/dist/apis/environment.d.ts.map +1 -0
- package/dist/apis/environment.js +189 -0
- package/dist/apis/environment.js.map +1 -0
- package/dist/apis/hud.d.ts +7 -0
- package/dist/apis/hud.d.ts.map +1 -0
- package/dist/apis/hud.js +45 -0
- package/dist/apis/hud.js.map +1 -0
- package/dist/apis/localstorage.d.ts +13 -0
- package/dist/apis/localstorage.d.ts.map +1 -0
- package/dist/apis/localstorage.js +190 -0
- package/dist/apis/localstorage.js.map +1 -0
- package/dist/apis/localstorage.test.d.ts +2 -0
- package/dist/apis/localstorage.test.d.ts.map +1 -0
- package/dist/apis/localstorage.test.js +131 -0
- package/dist/apis/localstorage.test.js.map +1 -0
- package/dist/apis/oauth.d.ts +142 -0
- package/dist/apis/oauth.d.ts.map +1 -0
- package/dist/apis/oauth.js +551 -0
- package/dist/apis/oauth.js.map +1 -0
- package/dist/apis/preferences.d.ts +23 -0
- package/dist/apis/preferences.d.ts.map +1 -0
- package/dist/apis/preferences.js +105 -0
- package/dist/apis/preferences.js.map +1 -0
- package/dist/apis/toast.d.ts +81 -0
- package/dist/apis/toast.d.ts.map +1 -0
- package/dist/apis/toast.js +275 -0
- package/dist/apis/toast.js.map +1 -0
- package/dist/apis/toast.test.d.ts +2 -0
- package/dist/apis/toast.test.d.ts.map +1 -0
- package/dist/apis/toast.test.js +67 -0
- package/dist/apis/toast.test.js.map +1 -0
- package/dist/apis/window.d.ts +12 -0
- package/dist/apis/window.d.ts.map +1 -0
- package/dist/apis/window.js +47 -0
- package/dist/apis/window.js.map +1 -0
- package/dist/build.d.ts +15 -0
- package/dist/build.d.ts.map +1 -0
- package/dist/build.js +213 -0
- package/dist/build.js.map +1 -0
- package/dist/build.test.d.ts +2 -0
- package/dist/build.test.d.ts.map +1 -0
- package/dist/build.test.js +73 -0
- package/dist/build.test.js.map +1 -0
- 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/cache.test.d.ts +2 -0
- package/dist/cache.test.d.ts.map +1 -0
- package/dist/cache.test.js +246 -0
- package/dist/cache.test.js.map +1 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +278 -0
- package/dist/cli.js.map +1 -0
- 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/colors.d.ts +15 -0
- package/dist/colors.d.ts.map +1 -0
- package/dist/colors.js +13 -0
- package/dist/colors.js.map +1 -0
- package/dist/components/actions.d.ts +120 -0
- package/dist/components/actions.d.ts.map +1 -0
- package/dist/components/actions.js +371 -0
- package/dist/components/actions.js.map +1 -0
- package/dist/components/alert.d.ts +25 -0
- package/dist/components/alert.d.ts.map +1 -0
- package/dist/components/alert.js +99 -0
- package/dist/components/alert.js.map +1 -0
- package/dist/components/detail.d.ts +65 -0
- package/dist/components/detail.d.ts.map +1 -0
- package/dist/components/detail.js +147 -0
- package/dist/components/detail.js.map +1 -0
- package/dist/components/dropdown.d.ts +40 -0
- package/dist/components/dropdown.d.ts.map +1 -0
- package/dist/components/dropdown.js +202 -0
- package/dist/components/dropdown.js.map +1 -0
- package/dist/components/extension-preferences.d.ts +8 -0
- package/dist/components/extension-preferences.d.ts.map +1 -0
- package/dist/components/extension-preferences.js +139 -0
- package/dist/components/extension-preferences.js.map +1 -0
- package/dist/components/form/assign-components.d.ts +2 -0
- package/dist/components/form/assign-components.d.ts.map +1 -0
- package/dist/components/form/assign-components.js +22 -0
- package/dist/components/form/assign-components.js.map +1 -0
- package/dist/components/form/checkbox.d.ts +7 -0
- package/dist/components/form/checkbox.d.ts.map +1 -0
- package/dist/components/form/checkbox.js +46 -0
- package/dist/components/form/checkbox.js.map +1 -0
- package/dist/components/form/date-picker.d.ts +18 -0
- package/dist/components/form/date-picker.d.ts.map +1 -0
- package/dist/components/form/date-picker.js +69 -0
- package/dist/components/form/date-picker.js.map +1 -0
- package/dist/components/form/description.d.ts +7 -0
- package/dist/components/form/description.d.ts.map +1 -0
- package/dist/components/form/description.js +8 -0
- package/dist/components/form/description.js.map +1 -0
- package/dist/components/form/dropdown.d.ts +25 -0
- package/dist/components/form/dropdown.d.ts.map +1 -0
- package/dist/components/form/dropdown.js +286 -0
- package/dist/components/form/dropdown.js.map +1 -0
- package/dist/components/form/file-autocomplete.d.ts +12 -0
- package/dist/components/form/file-autocomplete.d.ts.map +1 -0
- package/dist/components/form/file-autocomplete.js +84 -0
- package/dist/components/form/file-autocomplete.js.map +1 -0
- package/dist/components/form/file-picker.d.ts +31 -0
- package/dist/components/form/file-picker.d.ts.map +1 -0
- package/dist/components/form/file-picker.js +113 -0
- package/dist/components/form/file-picker.js.map +1 -0
- package/dist/components/form/form-end.d.ts +2 -0
- package/dist/components/form/form-end.d.ts.map +1 -0
- package/dist/components/form/form-end.js +6 -0
- package/dist/components/form/form-end.js.map +1 -0
- 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 +46 -0
- package/dist/components/form/index.d.ts.map +1 -0
- package/dist/components/form/index.js +106 -0
- package/dist/components/form/index.js.map +1 -0
- package/dist/components/form/password-field.d.ts +7 -0
- package/dist/components/form/password-field.d.ts.map +1 -0
- package/dist/components/form/password-field.js +34 -0
- package/dist/components/form/password-field.js.map +1 -0
- package/dist/components/form/separator.d.ts +2 -0
- package/dist/components/form/separator.d.ts.map +1 -0
- package/dist/components/form/separator.js +8 -0
- package/dist/components/form/separator.js.map +1 -0
- package/dist/components/form/tagpicker.d.ts +134 -0
- package/dist/components/form/tagpicker.d.ts.map +1 -0
- package/dist/components/form/tagpicker.js +79 -0
- package/dist/components/form/tagpicker.js.map +1 -0
- package/dist/components/form/text-area.d.ts +8 -0
- package/dist/components/form/text-area.d.ts.map +1 -0
- package/dist/components/form/text-area.js +26 -0
- package/dist/components/form/text-area.js.map +1 -0
- package/dist/components/form/text-field.d.ts +7 -0
- package/dist/components/form/text-field.d.ts.map +1 -0
- package/dist/components/form/text-field.js +28 -0
- package/dist/components/form/text-field.js.map +1 -0
- package/dist/components/form/types.d.ts +43 -0
- package/dist/components/form/types.d.ts.map +1 -0
- package/dist/components/form/types.js +2 -0
- package/dist/components/form/types.js.map +1 -0
- 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/use-form-navigation.d.ts +8 -0
- package/dist/components/form/use-form-navigation.d.ts.map +1 -0
- package/dist/components/form/use-form-navigation.js +58 -0
- package/dist/components/form/use-form-navigation.js.map +1 -0
- package/dist/components/form/with-left-border.d.ts +17 -0
- package/dist/components/form/with-left-border.d.ts.map +1 -0
- package/dist/components/form/with-left-border.js +10 -0
- package/dist/components/form/with-left-border.js.map +1 -0
- package/dist/components/icon.d.ts +9 -0
- package/dist/components/icon.d.ts.map +1 -0
- package/dist/components/icon.js +485 -0
- package/dist/components/icon.js.map +1 -0
- package/dist/components/image.d.ts +19 -0
- package/dist/components/image.d.ts.map +1 -0
- package/dist/components/image.js +32 -0
- package/dist/components/image.js.map +1 -0
- package/dist/components/list.d.ts +234 -0
- package/dist/components/list.d.ts.map +1 -0
- package/dist/components/list.js +667 -0
- package/dist/components/list.js.map +1 -0
- package/dist/components/loading-bar.d.ts +8 -0
- package/dist/components/loading-bar.d.ts.map +1 -0
- package/dist/components/loading-bar.js +107 -0
- package/dist/components/loading-bar.js.map +1 -0
- package/dist/components/menubar-extra.d.ts +68 -0
- package/dist/components/menubar-extra.d.ts.map +1 -0
- package/dist/components/menubar-extra.js +39 -0
- package/dist/components/menubar-extra.js.map +1 -0
- package/dist/descendants.d.ts +25 -0
- package/dist/descendants.d.ts.map +1 -0
- package/dist/descendants.js +81 -0
- package/dist/descendants.js.map +1 -0
- 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/e2e-node.d.ts +63 -0
- package/dist/e2e-node.d.ts.map +1 -0
- package/dist/e2e-node.js +255 -0
- package/dist/e2e-node.js.map +1 -0
- package/dist/e2e.d.ts +39 -0
- package/dist/e2e.d.ts.map +1 -0
- package/dist/e2e.js +127 -0
- package/dist/e2e.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/action-show-in-finder.d.ts +2 -0
- package/dist/examples/action-show-in-finder.d.ts.map +1 -0
- package/dist/examples/action-show-in-finder.js +13 -0
- package/dist/examples/action-show-in-finder.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/environment-test.d.ts +2 -0
- package/dist/examples/environment-test.d.ts.map +1 -0
- package/dist/examples/environment-test.js +28 -0
- package/dist/examples/environment-test.js.map +1 -0
- package/dist/examples/error-boundary.d.ts +6 -0
- package/dist/examples/error-boundary.d.ts.map +1 -0
- package/dist/examples/error-boundary.js +67 -0
- package/dist/examples/error-boundary.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.d.ts +2 -0
- package/dist/examples/form-basic.d.ts.map +1 -0
- package/dist/examples/form-basic.js +21 -0
- package/dist/examples/form-basic.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 +995 -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.d.ts +2 -0
- package/dist/examples/form-dropdown.d.ts.map +1 -0
- package/dist/examples/form-dropdown.js +13 -0
- package/dist/examples/form-dropdown.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 +722 -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-tagpicker.d.ts +2 -0
- package/dist/examples/form-tagpicker.d.ts.map +1 -0
- package/dist/examples/form-tagpicker.js +13 -0
- package/dist/examples/form-tagpicker.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 +491 -0
- package/dist/examples/form-tagpicker.vitest.js.map +1 -0
- package/dist/examples/internal/descendants-filtering.d.ts +2 -0
- package/dist/examples/internal/descendants-filtering.d.ts.map +1 -0
- package/dist/examples/internal/descendants-filtering.js +144 -0
- package/dist/examples/internal/descendants-filtering.js.map +1 -0
- package/dist/examples/internal/descendants.d.ts +2 -0
- package/dist/examples/internal/descendants.d.ts.map +1 -0
- package/dist/examples/internal/descendants.js +134 -0
- package/dist/examples/internal/descendants.js.map +1 -0
- 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/scrollbox-demo.d.ts +2 -0
- package/dist/examples/internal/scrollbox-demo.d.ts.map +1 -0
- package/dist/examples/internal/scrollbox-demo.js +104 -0
- package/dist/examples/internal/scrollbox-demo.js.map +1 -0
- package/dist/examples/internal/simple-dialog.d.ts +2 -0
- package/dist/examples/internal/simple-dialog.d.ts.map +1 -0
- package/dist/examples/internal/simple-dialog.js +43 -0
- package/dist/examples/internal/simple-dialog.js.map +1 -0
- package/dist/examples/internal/text-stacking.d.ts +2 -0
- package/dist/examples/internal/text-stacking.d.ts.map +1 -0
- package/dist/examples/internal/text-stacking.js +53 -0
- package/dist/examples/internal/text-stacking.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-dropdown-default.d.ts +2 -0
- package/dist/examples/list-dropdown-default.d.ts.map +1 -0
- package/dist/examples/list-dropdown-default.js +14 -0
- package/dist/examples/list-dropdown-default.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 +164 -0
- package/dist/examples/list-dropdown-default.vitest.js.map +1 -0
- package/dist/examples/list-fetch-data.d.ts +2 -0
- package/dist/examples/list-fetch-data.d.ts.map +1 -0
- package/dist/examples/list-fetch-data.js +87 -0
- package/dist/examples/list-fetch-data.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 +103 -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-with-detail.d.ts +2 -0
- package/dist/examples/list-with-detail.d.ts.map +1 -0
- package/dist/examples/list-with-detail.js +94 -0
- package/dist/examples/list-with-detail.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 +438 -0
- package/dist/examples/list-with-detail.vitest.js.map +1 -0
- package/dist/examples/list-with-dropdown.d.ts +2 -0
- package/dist/examples/list-with-dropdown.d.ts.map +1 -0
- package/dist/examples/list-with-dropdown.js +43 -0
- package/dist/examples/list-with-dropdown.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 +297 -0
- package/dist/examples/list-with-dropdown.vitest.js.map +1 -0
- package/dist/examples/list-with-sections.d.ts +2 -0
- package/dist/examples/list-with-sections.d.ts.map +1 -0
- package/dist/examples/list-with-sections.js +67 -0
- package/dist/examples/list-with-sections.js.map +1 -0
- 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 +441 -0
- package/dist/examples/list-with-sections.vitest.js.map +1 -0
- package/dist/examples/miscellaneous.d.ts +2 -0
- package/dist/examples/miscellaneous.d.ts.map +1 -0
- package/dist/examples/miscellaneous.js +313 -0
- package/dist/examples/miscellaneous.js.map +1 -0
- package/dist/examples/nested-navigation.d.ts +2 -0
- package/dist/examples/nested-navigation.d.ts.map +1 -0
- package/dist/examples/nested-navigation.js +35 -0
- package/dist/examples/nested-navigation.js.map +1 -0
- package/dist/examples/preferences-test.d.ts +2 -0
- package/dist/examples/preferences-test.d.ts.map +1 -0
- package/dist/examples/preferences-test.js +43 -0
- package/dist/examples/preferences-test.js.map +1 -0
- package/dist/examples/simple-dropdown.d.ts +2 -0
- package/dist/examples/simple-dropdown.d.ts.map +1 -0
- package/dist/examples/simple-dropdown.js +15 -0
- package/dist/examples/simple-dropdown.js.map +1 -0
- package/dist/examples/simple-file-picker.d.ts +2 -0
- package/dist/examples/simple-file-picker.d.ts.map +1 -0
- package/dist/examples/simple-file-picker.js +21 -0
- package/dist/examples/simple-file-picker.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 +277 -0
- package/dist/examples/simple-file-picker.vitest.js.map +1 -0
- package/dist/examples/simple-grid.d.ts +2 -0
- package/dist/examples/simple-grid.d.ts.map +1 -0
- package/dist/examples/simple-grid.js +51 -0
- package/dist/examples/simple-grid.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 +498 -0
- package/dist/examples/simple-grid.vitest.js.map +1 -0
- package/dist/examples/simple-hud.d.ts +2 -0
- package/dist/examples/simple-hud.d.ts.map +1 -0
- package/dist/examples/simple-hud.js +18 -0
- package/dist/examples/simple-hud.js.map +1 -0
- package/dist/examples/simple-list-search.d.ts +2 -0
- package/dist/examples/simple-list-search.d.ts.map +1 -0
- package/dist/examples/simple-list-search.js +26 -0
- package/dist/examples/simple-list-search.js.map +1 -0
- package/dist/examples/simple-list.d.ts +2 -0
- package/dist/examples/simple-list.d.ts.map +1 -0
- package/dist/examples/simple-list.js +50 -0
- package/dist/examples/simple-list.js.map +1 -0
- package/dist/examples/simple-navigation.d.ts +2 -0
- package/dist/examples/simple-navigation.d.ts.map +1 -0
- package/dist/examples/simple-navigation.js +36 -0
- package/dist/examples/simple-navigation.js.map +1 -0
- 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 +522 -0
- package/dist/examples/simple-navigation.vitest.js.map +1 -0
- package/dist/examples/store.d.ts +2 -0
- package/dist/examples/store.d.ts.map +1 -0
- package/dist/examples/store.js +5 -0
- package/dist/examples/store.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 +52 -0
- package/dist/examples/store.vitest.js.map +1 -0
- package/dist/examples/tanstack-demo.d.ts +2 -0
- package/dist/examples/tanstack-demo.d.ts.map +1 -0
- package/dist/examples/tanstack-demo.js +51 -0
- package/dist/examples/tanstack-demo.js.map +1 -0
- package/dist/examples/use-promise-demo.d.ts +2 -0
- package/dist/examples/use-promise-demo.d.ts.map +1 -0
- package/dist/examples/use-promise-demo.js +45 -0
- package/dist/examples/use-promise-demo.js.map +1 -0
- package/dist/extensions/dev.d.ts +7 -0
- package/dist/extensions/dev.d.ts.map +1 -0
- package/dist/extensions/dev.js +124 -0
- package/dist/extensions/dev.js.map +1 -0
- package/dist/extensions/home.d.ts +8 -0
- package/dist/extensions/home.d.ts.map +1 -0
- package/dist/extensions/home.js +184 -0
- package/dist/extensions/home.js.map +1 -0
- package/dist/extensions/store.d.ts +6 -0
- package/dist/extensions/store.d.ts.map +1 -0
- package/dist/extensions/store.js +203 -0
- package/dist/extensions/store.js.map +1 -0
- package/dist/globals.d.ts +9 -0
- package/dist/globals.d.ts.map +1 -0
- package/dist/globals.js +21 -0
- package/dist/globals.js.map +1 -0
- 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/hooks/hooks.test.d.ts +2 -0
- package/dist/hooks/hooks.test.d.ts.map +1 -0
- package/dist/hooks/hooks.test.js +37 -0
- package/dist/hooks/hooks.test.js.map +1 -0
- package/dist/hooks/index.d.ts +6 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +6 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/use-action-panel.d.ts +16 -0
- package/dist/hooks/use-action-panel.d.ts.map +1 -0
- package/dist/hooks/use-action-panel.js +19 -0
- package/dist/hooks/use-action-panel.js.map +1 -0
- package/dist/hooks/use-id.d.ts +9 -0
- package/dist/hooks/use-id.d.ts.map +1 -0
- package/dist/hooks/use-id.js +17 -0
- package/dist/hooks/use-id.js.map +1 -0
- package/dist/hooks/use-unstable-ai.d.ts +9 -0
- package/dist/hooks/use-unstable-ai.d.ts.map +1 -0
- package/dist/hooks/use-unstable-ai.js +13 -0
- package/dist/hooks/use-unstable-ai.js.map +1 -0
- package/dist/hooks.d.ts +10 -0
- package/dist/hooks.d.ts.map +1 -0
- package/dist/hooks.js +20 -0
- package/dist/hooks.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 +58 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +71 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/date-picker-widget.d.ts +9 -0
- package/dist/internal/date-picker-widget.d.ts.map +1 -0
- package/dist/internal/date-picker-widget.js +380 -0
- package/dist/internal/date-picker-widget.js.map +1 -0
- package/dist/internal/dialog.d.ts +21 -0
- package/dist/internal/dialog.d.ts.map +1 -0
- package/dist/internal/dialog.js +122 -0
- package/dist/internal/dialog.js.map +1 -0
- package/dist/internal/error-handler.d.ts +2 -0
- package/dist/internal/error-handler.d.ts.map +1 -0
- package/dist/internal/error-handler.js +29 -0
- package/dist/internal/error-handler.js.map +1 -0
- package/dist/internal/focus-context.d.ts +10 -0
- package/dist/internal/focus-context.d.ts.map +1 -0
- package/dist/internal/focus-context.js +12 -0
- package/dist/internal/focus-context.js.map +1 -0
- package/dist/internal/navigation.d.ts +18 -0
- package/dist/internal/navigation.d.ts.map +1 -0
- package/dist/internal/navigation.js +83 -0
- package/dist/internal/navigation.js.map +1 -0
- package/dist/internal/providers.d.ts +8 -0
- package/dist/internal/providers.d.ts.map +1 -0
- package/dist/internal/providers.js +262 -0
- package/dist/internal/providers.js.map +1 -0
- 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/localstorage.test.d.ts +2 -0
- package/dist/localstorage.test.d.ts.map +1 -0
- package/dist/localstorage.test.js +131 -0
- package/dist/localstorage.test.js.map +1 -0
- package/dist/logger.d.ts +7 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +70 -0
- package/dist/logger.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/package-json.d.ts +84 -0
- package/dist/package-json.d.ts.map +1 -0
- package/dist/package-json.js +77 -0
- package/dist/package-json.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/preload.d.ts +2 -0
- package/dist/preload.d.ts.map +1 -0
- package/dist/preload.js +28 -0
- package/dist/preload.js.map +1 -0
- package/dist/state.d.ts +26 -0
- package/dist/state.d.ts.map +1 -0
- package/dist/state.js +18 -0
- package/dist/state.js.map +1 -0
- package/dist/store-api/download.d.ts +8 -0
- package/dist/store-api/download.d.ts.map +1 -0
- package/dist/store-api/download.js +37 -0
- package/dist/store-api/download.js.map +1 -0
- package/dist/store-api/download.test.d.ts +2 -0
- package/dist/store-api/download.test.d.ts.map +1 -0
- package/dist/store-api/download.test.js +36 -0
- package/dist/store-api/download.test.js.map +1 -0
- package/dist/store-api/extension.d.ts +87 -0
- package/dist/store-api/extension.d.ts.map +1 -0
- package/dist/store-api/extension.js +23 -0
- package/dist/store-api/extension.js.map +1 -0
- package/dist/store-api/extension.test.d.ts +2 -0
- package/dist/store-api/extension.test.d.ts.map +1 -0
- package/dist/store-api/extension.test.js +22 -0
- package/dist/store-api/extension.test.js.map +1 -0
- package/dist/store-api/search.d.ts +101 -0
- package/dist/store-api/search.d.ts.map +1 -0
- package/dist/store-api/search.js +29 -0
- package/dist/store-api/search.js.map +1 -0
- package/dist/store-api/search.test.d.ts +2 -0
- package/dist/store-api/search.test.d.ts.map +1 -0
- package/dist/store-api/search.test.js +45 -0
- package/dist/store-api/search.test.js.map +1 -0
- 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/theme.d.ts +20 -0
- package/dist/theme.d.ts.map +1 -0
- package/dist/theme.js +26 -0
- package/dist/theme.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 +11 -0
- package/dist/utils/file-system.d.ts.map +1 -0
- package/dist/utils/file-system.js +66 -0
- package/dist/utils/file-system.js.map +1 -0
- package/dist/utils.d.ts +234 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +473 -0
- package/dist/utils.js.map +1 -0
- package/dist/utils.test.d.ts +2 -0
- package/dist/utils.test.d.ts.map +1 -0
- package/dist/utils.test.js +152 -0
- package/dist/utils.test.js.map +1 -0
- 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 +56 -0
- package/src/action-utils.tsx +207 -0
- package/src/apis/ai.tsx +177 -0
- package/src/apis/cache.test.ts +311 -0
- package/src/apis/cache.tsx +394 -0
- package/src/apis/clipboard.tsx +200 -0
- package/src/apis/environment.tsx +239 -0
- package/src/apis/hud.tsx +86 -0
- package/src/apis/localstorage.test.ts +164 -0
- package/src/apis/localstorage.tsx +215 -0
- package/src/apis/oauth.tsx +744 -0
- package/src/apis/preferences.tsx +140 -0
- package/src/apis/toast.tsx +388 -0
- package/src/apis/window.tsx +61 -0
- package/src/build.test.tsx +78 -0
- package/src/build.tsx +273 -0
- package/src/cli.tsx +328 -0
- package/src/colors.tsx +15 -0
- package/src/components/actions.tsx +718 -0
- package/src/components/alert.tsx +205 -0
- package/src/components/detail.tsx +359 -0
- package/src/components/dropdown.tsx +438 -0
- package/src/components/extension-preferences.tsx +269 -0
- package/src/components/form/assign-components.tsx +22 -0
- package/src/components/form/checkbox.tsx +96 -0
- package/src/components/form/date-picker.tsx +125 -0
- package/src/components/form/description.tsx +30 -0
- package/src/components/form/dropdown.tsx +512 -0
- package/src/components/form/file-autocomplete.tsx +141 -0
- package/src/components/form/file-picker.tsx +233 -0
- package/src/components/form/form-end.tsx +6 -0
- package/src/components/form/index.tsx +242 -0
- package/src/components/form/password-field.tsx +87 -0
- package/src/components/form/separator.tsx +15 -0
- package/src/components/form/tagpicker.tsx +245 -0
- package/src/components/form/text-area.tsx +82 -0
- package/src/components/form/text-field.tsx +82 -0
- package/src/components/form/types.tsx +49 -0
- package/src/components/form/use-form-navigation.tsx +65 -0
- package/src/components/form/with-left-border.tsx +53 -0
- package/src/components/icon.tsx +496 -0
- package/src/components/image.tsx +54 -0
- package/src/components/list.tsx +1564 -0
- package/src/components/loading-bar.tsx +141 -0
- package/src/components/menubar-extra.tsx +181 -0
- package/src/descendants.tsx +134 -0
- package/src/e2e-node.tsx +303 -0
- package/src/e2e.tsx +147 -0
- package/src/examples/action-show-in-finder.tsx +80 -0
- package/src/examples/environment-test.tsx +50 -0
- package/src/examples/error-boundary.tsx +217 -0
- package/src/examples/form-basic.tsx +122 -0
- package/src/examples/form-basic.vitest.tsx +1035 -0
- package/src/examples/form-dropdown.tsx +102 -0
- package/src/examples/form-dropdown.vitest.tsx +758 -0
- package/src/examples/form-tagpicker.tsx +66 -0
- package/src/examples/form-tagpicker.vitest.tsx +523 -0
- package/src/examples/internal/descendants-filtering.tsx +223 -0
- package/src/examples/internal/descendants.tsx +208 -0
- package/src/examples/internal/scrollbox-demo.tsx +149 -0
- package/src/examples/internal/simple-dialog.tsx +124 -0
- package/src/examples/internal/text-stacking.tsx +90 -0
- package/src/examples/list-dropdown-default.tsx +69 -0
- package/src/examples/list-dropdown-default.vitest.tsx +187 -0
- package/src/examples/list-fetch-data.tsx +123 -0
- package/src/examples/list-fetch-data.vitest.tsx +110 -0
- package/src/examples/list-with-detail.tsx +161 -0
- package/src/examples/list-with-detail.vitest.tsx +468 -0
- package/src/examples/list-with-dropdown.tsx +97 -0
- package/src/examples/list-with-dropdown.vitest.tsx +324 -0
- package/src/examples/list-with-sections.tsx +196 -0
- package/src/examples/list-with-sections.vitest.tsx +479 -0
- package/src/examples/miscellaneous.tsx +780 -0
- package/src/examples/nested-navigation.tsx +118 -0
- package/src/examples/preferences-test.tsx +82 -0
- package/src/examples/simple-dropdown.tsx +95 -0
- package/src/examples/simple-file-picker.tsx +75 -0
- package/src/examples/simple-file-picker.vitest.tsx +306 -0
- package/src/examples/simple-grid.tsx +149 -0
- package/src/examples/simple-grid.vitest.tsx +535 -0
- package/src/examples/simple-hud.tsx +60 -0
- package/src/examples/simple-list-search.tsx +93 -0
- package/src/examples/simple-list.tsx +149 -0
- package/src/examples/simple-navigation.tsx +89 -0
- package/src/examples/simple-navigation.vitest.tsx +571 -0
- package/src/examples/store.tsx +4 -0
- package/src/examples/store.vitest.tsx +59 -0
- package/src/examples/tanstack-demo.tsx +104 -0
- package/src/examples/use-promise-demo.tsx +96 -0
- package/src/extensions/dev.tsx +215 -0
- package/src/extensions/home.tsx +332 -0
- package/src/extensions/store.tsx +375 -0
- package/src/globals.ts +34 -0
- package/src/hooks/index.tsx +8 -0
- package/src/hooks/use-action-panel.tsx +28 -0
- package/src/hooks/use-id.tsx +19 -0
- package/src/hooks/use-unstable-ai.tsx +15 -0
- package/src/hooks.tsx +22 -0
- package/src/index.tsx +240 -0
- package/src/internal/date-picker-widget.tsx +500 -0
- package/src/internal/dialog.tsx +202 -0
- package/src/internal/error-handler.tsx +32 -0
- package/src/internal/focus-context.tsx +23 -0
- package/src/internal/navigation.tsx +149 -0
- package/src/internal/providers.tsx +430 -0
- package/src/logger.tsx +84 -0
- package/src/package-json.tsx +197 -0
- package/src/preload.tsx +32 -0
- package/src/state.tsx +49 -0
- package/src/store-api/download.test.tsx +38 -0
- package/src/store-api/download.tsx +52 -0
- package/src/store-api/extension.test.tsx +24 -0
- package/src/store-api/extension.tsx +123 -0
- package/src/store-api/search.test.tsx +50 -0
- package/src/store-api/search.tsx +146 -0
- package/src/theme.tsx +31 -0
- package/src/utils/file-system.ts +87 -0
- package/src/utils.test.tsx +204 -0
- package/src/utils.tsx +657 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated Use `useAI` from `@raycast/utils`
|
|
3
|
+
*
|
|
4
|
+
* This hook was an unstable AI interface that has been deprecated.
|
|
5
|
+
* Users should use the `useAI` hook from `@raycast/utils` instead.
|
|
6
|
+
* This implementation returns undefined to match the Raycast API behavior.
|
|
7
|
+
*/
|
|
8
|
+
export declare const useUnstableAI: () => undefined;
|
|
9
|
+
//# sourceMappingURL=use-unstable-ai.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-unstable-ai.d.ts","sourceRoot":"","sources":["../../src/hooks/use-unstable-ai.tsx"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,QAAO,SAKhC,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { logger } from '@termcast/cli/src/logger';
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated Use `useAI` from `@raycast/utils`
|
|
4
|
+
*
|
|
5
|
+
* This hook was an unstable AI interface that has been deprecated.
|
|
6
|
+
* Users should use the `useAI` hook from `@raycast/utils` instead.
|
|
7
|
+
* This implementation returns undefined to match the Raycast API behavior.
|
|
8
|
+
*/
|
|
9
|
+
export const useUnstableAI = () => {
|
|
10
|
+
logger.warn('useUnstableAI is deprecated. Use useAI from @raycast/utils instead');
|
|
11
|
+
return undefined;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=use-unstable-ai.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-unstable-ai.js","sourceRoot":"","sources":["../../src/hooks/use-unstable-ai.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAA;AAEjD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,GAAc,EAAE;IAC3C,MAAM,CAAC,IAAI,CACT,oEAAoE,CACrE,CAAA;IACD,OAAO,SAAS,CAAA;AAClB,CAAC,CAAA"}
|
package/dist/hooks.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns a stable callback that always calls the latest version of the provided handler.
|
|
3
|
+
* This prevents unnecessary re-renders and effect re-runs while ensuring the callback
|
|
4
|
+
* always has access to the latest props and state.
|
|
5
|
+
*
|
|
6
|
+
* Useful for event handlers that need to be passed to effects with empty dependency arrays
|
|
7
|
+
* or memoized child components.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useEvent<T extends (...args: any[]) => any>(handler: T): T;
|
|
10
|
+
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../src/hooks.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAWzE"}
|
package/dist/hooks.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { useCallback, useLayoutEffect, useRef } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Returns a stable callback that always calls the latest version of the provided handler.
|
|
4
|
+
* This prevents unnecessary re-renders and effect re-runs while ensuring the callback
|
|
5
|
+
* always has access to the latest props and state.
|
|
6
|
+
*
|
|
7
|
+
* Useful for event handlers that need to be passed to effects with empty dependency arrays
|
|
8
|
+
* or memoized child components.
|
|
9
|
+
*/
|
|
10
|
+
export function useEvent(handler) {
|
|
11
|
+
const handlerRef = useRef(handler);
|
|
12
|
+
useLayoutEffect(() => {
|
|
13
|
+
handlerRef.current = handler;
|
|
14
|
+
});
|
|
15
|
+
return useCallback((...args) => {
|
|
16
|
+
const fn = handlerRef.current;
|
|
17
|
+
return fn(...args);
|
|
18
|
+
}, []);
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=hooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../src/hooks.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAE5D;;;;;;;GAOG;AACH,MAAM,UAAU,QAAQ,CAAoC,OAAU;IACpE,MAAM,UAAU,GAAG,MAAM,CAAI,OAAO,CAAC,CAAA;IAErC,eAAe,CAAC,GAAG,EAAE;QACnB,UAAU,CAAC,OAAO,GAAG,OAAO,CAAA;IAC9B,CAAC,CAAC,CAAA;IAEF,OAAO,WAAW,CAAC,CAAC,GAAG,IAAmB,EAAE,EAAE;QAC5C,MAAM,EAAE,GAAG,UAAU,CAAC,OAAO,CAAA;QAC7B,OAAO,EAAE,CAAC,GAAG,IAAI,CAAC,CAAA;IACpB,CAAC,EAAE,EAAE,CAAM,CAAA;AACb,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hover-repro.d.ts","sourceRoot":"","sources":["../src/hover-repro.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx } from '@opentui/react/jsx-runtime'
|
|
2
|
+
import { render } from '@opentui/react'
|
|
3
|
+
import { useState } from 'react'
|
|
4
|
+
function HoverExample() {
|
|
5
|
+
const [hovered, setHovered] = useState(false)
|
|
6
|
+
return _jsx('box', {
|
|
7
|
+
style: { padding: 2 },
|
|
8
|
+
children: _jsx('box', {
|
|
9
|
+
onMouseEnter: () => setHovered(true),
|
|
10
|
+
onMouseLeave: () => setHovered(false),
|
|
11
|
+
style: { padding: 1 },
|
|
12
|
+
children: _jsx('text', {
|
|
13
|
+
bg: hovered ? '#FF0000' : undefined,
|
|
14
|
+
children: 'Hover over me',
|
|
15
|
+
}),
|
|
16
|
+
}),
|
|
17
|
+
})
|
|
18
|
+
}
|
|
19
|
+
render(_jsx(HoverExample, {}))
|
|
20
|
+
//# sourceMappingURL=hover-repro.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hover-repro.js","sourceRoot":"","sources":["../src/hover-repro.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEhC,SAAS,YAAY;IACjB,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAU,KAAK,CAAC,CAAA;IAEtD,OAAO,CACH,cAAK,KAAK,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,YACtB,cACI,YAAY,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,EACpC,YAAY,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,EACrC,KAAK,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,YAErB,eAAM,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,8BAElC,GACL,GACJ,CACT,CAAA;AACL,CAAC;AAED,MAAM,CAAC,KAAC,YAAY,KAAG,CAAC,CAAA"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { LaunchType } from '@termcast/cli/src/apis/environment';
|
|
2
|
+
import './globals';
|
|
3
|
+
export { List, Grid } from '@termcast/cli/src/components/list';
|
|
4
|
+
export { List as default } from '@termcast/cli/src/components/list';
|
|
5
|
+
export type { ListProps, ItemProps as ListItemProps, SectionProps as ListSectionProps, DetailProps as ListDetailProps, MetadataProps as ListMetadataProps, DropdownProps as ListDropdownProps, DropdownItemProps as ListDropdownItemProps, DropdownSectionProps as ListDropdownSectionProps, ItemAccessory, Color as ListColor, GridProps, GridItemProps, GridSectionProps, GridInset, } from '@termcast/cli/src/components/list';
|
|
6
|
+
export { Dropdown } from '@termcast/cli/src/components/dropdown';
|
|
7
|
+
export type { DropdownProps, DropdownItemProps, DropdownSectionProps, } from '@termcast/cli/src/components/dropdown';
|
|
8
|
+
export { Action, ActionPanel, ActionStyle, } from '@termcast/cli/src/components/actions';
|
|
9
|
+
export type { ActionProps, ActionPanelProps, ActionPanelSectionProps, } from '@termcast/cli/src/components/actions';
|
|
10
|
+
export { Detail } from '@termcast/cli/src/components/detail';
|
|
11
|
+
export type { DetailProps, DetailPropsWithLoading, } from '@termcast/cli/src/components/detail';
|
|
12
|
+
export { Form, useFormContext, useFormSubmit, } from '@termcast/cli/src/components/form/index';
|
|
13
|
+
export { TextField } from '@termcast/cli/src/components/form/text-field';
|
|
14
|
+
export type { TextFieldProps, TextFieldRef, } from '@termcast/cli/src/components/form/text-field';
|
|
15
|
+
export { TextArea } from '@termcast/cli/src/components/form/text-area';
|
|
16
|
+
export type { TextAreaProps, TextAreaRef, } from '@termcast/cli/src/components/form/text-area';
|
|
17
|
+
export { PasswordField } from '@termcast/cli/src/components/form/password-field';
|
|
18
|
+
export type { PasswordFieldProps, PasswordFieldRef, } from '@termcast/cli/src/components/form/password-field';
|
|
19
|
+
export { Checkbox } from '@termcast/cli/src/components/form/checkbox';
|
|
20
|
+
export type { CheckboxProps, CheckboxRef, } from '@termcast/cli/src/components/form/checkbox';
|
|
21
|
+
export { Dropdown as FormDropdown } from '@termcast/cli/src/components/form/dropdown';
|
|
22
|
+
export type { DropdownProps as FormDropdownProps, DropdownItemProps as FormDropdownItemProps, DropdownSectionProps as FormDropdownSectionProps, DropdownRef as FormDropdownRef, } from '@termcast/cli/src/components/form/dropdown';
|
|
23
|
+
export type { FormProps, FormValues, FormValue, FormItemProps, FormItemRef, FormEvent, FormEventType, } from '@termcast/cli/src/components/form/types';
|
|
24
|
+
export { Icon, getIconEmoji, IconComponent, } from '@termcast/cli/src/components/icon';
|
|
25
|
+
export { Image, ImageMask } from '@termcast/cli/src/components/image';
|
|
26
|
+
export type { ImageProps, ImageSource, FileIcon, ImageLike, } from '@termcast/cli/src/components/image';
|
|
27
|
+
export { Alert, confirmAlert } from '@termcast/cli/src/components/alert';
|
|
28
|
+
export { MenuBarExtra } from '@termcast/cli/src/components/menubar-extra';
|
|
29
|
+
export type { MenuBarExtraProps, MenuBarExtraItemProps, MenuBarExtraSeparatorProps, MenuBarExtraSubmenuProps, MenuBarExtraSectionProps, MenuBarExtraActionEvent, } from '@termcast/cli/src/components/menubar-extra';
|
|
30
|
+
export { AI } from '@termcast/cli/src/apis/ai';
|
|
31
|
+
export { OAuth } from '@termcast/cli/src/apis/oauth';
|
|
32
|
+
export { Color } from '@termcast/cli/src/colors';
|
|
33
|
+
export { useNavigation, NavigationContainer, } from '@termcast/cli/src/internal/navigation';
|
|
34
|
+
export { useActionPanel, useId, useUnstableAI, } from '@termcast/cli/src/hooks/index';
|
|
35
|
+
export type { ActionPanelState } from '@termcast/cli/src/hooks/index';
|
|
36
|
+
export { InFocus, useIsInFocus } from '@termcast/cli/src/internal/focus-context';
|
|
37
|
+
export { Dialog, DialogProvider, useDialog, } from '@termcast/cli/src/internal/dialog';
|
|
38
|
+
export { Toast, showToast, showFailureToast, } from '@termcast/cli/src/apis/toast';
|
|
39
|
+
export { Clipboard, copyTextToClipboard, clearClipboard, pasteText, } from '@termcast/cli/src/apis/clipboard';
|
|
40
|
+
export { Cache } from '@termcast/cli/src/apis/cache';
|
|
41
|
+
export { LocalStorage } from '@termcast/cli/src/apis/localstorage';
|
|
42
|
+
export { copyToClipboard, openInBrowser, openFile, pasteContent, showInFinder, moveToTrash, } from '@termcast/cli/src/action-utils';
|
|
43
|
+
export { getApplications, getDefaultApplication, getFrontmostApplication, trash, open, captureException, } from '@termcast/cli/src/utils';
|
|
44
|
+
export { environment, getSelectedFinderItems, getSelectedText, } from '@termcast/cli/src/apis/environment';
|
|
45
|
+
export type { Environment, LaunchProps, } from '@termcast/cli/src/apis/environment';
|
|
46
|
+
export { LaunchType };
|
|
47
|
+
export { getPreferenceValues, openExtensionPreferences, openCommandPreferences, } from '@termcast/cli/src/apis/preferences';
|
|
48
|
+
export type { PreferenceValues } from '@termcast/cli/src/apis/preferences';
|
|
49
|
+
export type { CommonProps } from '@termcast/cli/src/utils';
|
|
50
|
+
export { Theme } from '@termcast/cli/src/theme';
|
|
51
|
+
export { logger } from '@termcast/cli/src/logger';
|
|
52
|
+
export { useStore } from '@termcast/cli/src/state';
|
|
53
|
+
export type { DialogPosition } from '@termcast/cli/src/state';
|
|
54
|
+
export { Providers } from '@termcast/cli/src/internal/providers';
|
|
55
|
+
export { renderWithProviders } from '@termcast/cli/src/utils';
|
|
56
|
+
export { closeMainWindow, PopToRootType } from '@termcast/cli/src/apis/window';
|
|
57
|
+
export { showHUD } from '@termcast/cli/src/apis/hud';
|
|
58
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAA;AAC/D,OAAO,WAAW,CAAA;AAKlB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,mCAAmC,CAAA;AAC9D,OAAO,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,mCAAmC,CAAA;AACnE,YAAY,EACV,SAAS,EACT,SAAS,IAAI,aAAa,EAC1B,YAAY,IAAI,gBAAgB,EAChC,WAAW,IAAI,eAAe,EAC9B,aAAa,IAAI,iBAAiB,EAClC,aAAa,IAAI,iBAAiB,EAClC,iBAAiB,IAAI,qBAAqB,EAC1C,oBAAoB,IAAI,wBAAwB,EAChD,aAAa,EACb,KAAK,IAAI,SAAS,EAClB,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,SAAS,GACV,MAAM,mCAAmC,CAAA;AAG1C,OAAO,EAAE,QAAQ,EAA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YAAY,EACZ,YAAY,EACZ,WAAW,GACZ,MAAM,gCAAgC,CAAA;AAEvC,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,uBAAuB,EACvB,KAAK,EACL,IAAI,EACJ,gBAAgB,GACjB,MAAM,yBAAyB,CAAA;AAGhC,OAAO,EACL,WAAW,EACX,sBAAsB,EACtB,eAAe,GAChB,MAAM,oCAAoC,CAAA;AAC3C,YAAY,EACV,WAAW,EACX,WAAW,GACZ,MAAM,oCAAoC,CAAA;AAE3C,OAAO,EAAE,UAAU,EAAE,CAAA;AAGrB,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,oCAAoC,CAAA;AAC3C,YAAY,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAA;AAG1E,YAAY,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAG1D,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AAG/C,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAA;AAGjD,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAClD,YAAY,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAG7D,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAGhE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAG7D,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAA;AAG9E,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// Import globals to set up global references
|
|
2
|
+
import { LaunchType } from '@termcast/cli/src/apis/environment';
|
|
3
|
+
import './globals';
|
|
4
|
+
// termcastApi will be set by the runtime when needed
|
|
5
|
+
// Core UI Components - Lists
|
|
6
|
+
export { List, Grid } from '@termcast/cli/src/components/list';
|
|
7
|
+
export { List as default } from '@termcast/cli/src/components/list';
|
|
8
|
+
// Core UI Components - Dropdowns
|
|
9
|
+
export { Dropdown } from '@termcast/cli/src/components/dropdown';
|
|
10
|
+
// Core UI Components - Actions
|
|
11
|
+
export { Action, ActionPanel, ActionStyle, } from '@termcast/cli/src/components/actions';
|
|
12
|
+
// Core UI Components - Detail
|
|
13
|
+
export { Detail } from '@termcast/cli/src/components/detail';
|
|
14
|
+
// Form Components
|
|
15
|
+
export { Form, useFormContext, useFormSubmit, } from '@termcast/cli/src/components/form/index';
|
|
16
|
+
export { TextField } from '@termcast/cli/src/components/form/text-field';
|
|
17
|
+
export { TextArea } from '@termcast/cli/src/components/form/text-area';
|
|
18
|
+
export { PasswordField } from '@termcast/cli/src/components/form/password-field';
|
|
19
|
+
export { Checkbox } from '@termcast/cli/src/components/form/checkbox';
|
|
20
|
+
export { Dropdown as FormDropdown } from '@termcast/cli/src/components/form/dropdown';
|
|
21
|
+
// Icons and Images
|
|
22
|
+
export { Icon, getIconEmoji, IconComponent, } from '@termcast/cli/src/components/icon';
|
|
23
|
+
export { Image, ImageMask } from '@termcast/cli/src/components/image';
|
|
24
|
+
// Alerts
|
|
25
|
+
export { Alert, confirmAlert } from '@termcast/cli/src/components/alert';
|
|
26
|
+
// MenuBar
|
|
27
|
+
export { MenuBarExtra } from '@termcast/cli/src/components/menubar-extra';
|
|
28
|
+
// AI
|
|
29
|
+
export { AI } from '@termcast/cli/src/apis/ai';
|
|
30
|
+
// OAuth
|
|
31
|
+
export { OAuth } from '@termcast/cli/src/apis/oauth';
|
|
32
|
+
// Colors
|
|
33
|
+
export { Color } from '@termcast/cli/src/colors';
|
|
34
|
+
// Navigation
|
|
35
|
+
export { useNavigation, NavigationContainer, } from '@termcast/cli/src/internal/navigation';
|
|
36
|
+
// Hooks
|
|
37
|
+
export { useActionPanel, useId, useUnstableAI, } from '@termcast/cli/src/hooks/index';
|
|
38
|
+
// Focus Context
|
|
39
|
+
export { InFocus, useIsInFocus } from '@termcast/cli/src/internal/focus-context';
|
|
40
|
+
// Dialog
|
|
41
|
+
export { Dialog, DialogProvider, useDialog, } from '@termcast/cli/src/internal/dialog';
|
|
42
|
+
// Toast
|
|
43
|
+
export { Toast, showToast, showFailureToast, } from '@termcast/cli/src/apis/toast';
|
|
44
|
+
// Clipboard
|
|
45
|
+
export { Clipboard, copyTextToClipboard, clearClipboard, pasteText, } from '@termcast/cli/src/apis/clipboard';
|
|
46
|
+
// Storage
|
|
47
|
+
export { Cache } from '@termcast/cli/src/apis/cache';
|
|
48
|
+
export { LocalStorage } from '@termcast/cli/src/apis/localstorage';
|
|
49
|
+
// Utilities
|
|
50
|
+
export { copyToClipboard, openInBrowser, openFile, pasteContent, showInFinder, moveToTrash, } from '@termcast/cli/src/action-utils';
|
|
51
|
+
export { getApplications, getDefaultApplication, getFrontmostApplication, trash, open, captureException, } from '@termcast/cli/src/utils';
|
|
52
|
+
// Environment
|
|
53
|
+
export { environment, getSelectedFinderItems, getSelectedText, } from '@termcast/cli/src/apis/environment';
|
|
54
|
+
export { LaunchType };
|
|
55
|
+
// Preferences
|
|
56
|
+
export { getPreferenceValues, openExtensionPreferences, openCommandPreferences, } from '@termcast/cli/src/apis/preferences';
|
|
57
|
+
// Theme
|
|
58
|
+
export { Theme } from '@termcast/cli/src/theme';
|
|
59
|
+
// Logger
|
|
60
|
+
export { logger } from '@termcast/cli/src/logger';
|
|
61
|
+
// State Management (internal use)
|
|
62
|
+
export { useStore } from '@termcast/cli/src/state';
|
|
63
|
+
// Providers (for app setup)
|
|
64
|
+
export { Providers } from '@termcast/cli/src/internal/providers';
|
|
65
|
+
// Helper function for rendering examples
|
|
66
|
+
export { renderWithProviders } from '@termcast/cli/src/utils';
|
|
67
|
+
// Window Management
|
|
68
|
+
export { closeMainWindow, PopToRootType } from '@termcast/cli/src/apis/window';
|
|
69
|
+
// HUD
|
|
70
|
+
export { showHUD } from '@termcast/cli/src/apis/hud';
|
|
71
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|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O,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AAE/C,SAAS;AACT,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAA;AAEjD,kCAAkC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAGlD,4BAA4B;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAEhE,yCAAyC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAE7D,oBAAoB;AACpB,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAA;AAE9E,MAAM;AACN,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function DatePickerWidget({ enableColors, initialValue, onChange, focused, onFirstRowUpKey, onLastRowDownKey, }: {
|
|
2
|
+
enableColors?: boolean;
|
|
3
|
+
initialValue?: Date;
|
|
4
|
+
onChange?: (date: Date) => void;
|
|
5
|
+
focused?: boolean;
|
|
6
|
+
onFirstRowUpKey?: () => void;
|
|
7
|
+
onLastRowDownKey?: () => void;
|
|
8
|
+
}): import("react").ReactNode;
|
|
9
|
+
//# sourceMappingURL=date-picker-widget.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-picker-widget.d.ts","sourceRoot":"","sources":["../../src/internal/date-picker-widget.tsx"],"names":[],"mappings":"AA+DA,wBAAgB,gBAAgB,CAAC,EAC/B,YAAmB,EACnB,YAAY,EACZ,QAAQ,EACR,OAAe,EACf,eAAe,EACf,gBAAgB,GACjB,EAAE;IACD,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,YAAY,CAAC,EAAE,IAAI,CAAA;IACnB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAA;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,eAAe,CAAC,EAAE,MAAM,IAAI,CAAA;IAC5B,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAA;CAC9B,6BAsaA"}
|
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@opentui/react/jsx-runtime";
|
|
2
|
+
import { useKeyboard } from '@opentui/react';
|
|
3
|
+
import { useMemo, useState, useRef } from 'react';
|
|
4
|
+
import Theme from '../theme';
|
|
5
|
+
const MONTHS = [
|
|
6
|
+
'January',
|
|
7
|
+
'February',
|
|
8
|
+
'March',
|
|
9
|
+
'April',
|
|
10
|
+
'May',
|
|
11
|
+
'June',
|
|
12
|
+
'July',
|
|
13
|
+
'August',
|
|
14
|
+
'September',
|
|
15
|
+
'October',
|
|
16
|
+
'November',
|
|
17
|
+
'December',
|
|
18
|
+
];
|
|
19
|
+
function daysInMonth(y, m) {
|
|
20
|
+
return new Date(y, m + 1, 0).getDate();
|
|
21
|
+
}
|
|
22
|
+
function startOfMonth(d) {
|
|
23
|
+
return new Date(d.getFullYear(), d.getMonth(), 1);
|
|
24
|
+
}
|
|
25
|
+
function sameDay(a, b) {
|
|
26
|
+
return (a.getFullYear() === b.getFullYear() &&
|
|
27
|
+
a.getMonth() === b.getMonth() &&
|
|
28
|
+
a.getDate() === b.getDate());
|
|
29
|
+
}
|
|
30
|
+
function addDays(d, delta) {
|
|
31
|
+
const nd = new Date(d);
|
|
32
|
+
nd.setDate(nd.getDate() + delta);
|
|
33
|
+
return nd;
|
|
34
|
+
}
|
|
35
|
+
function clampDay(y, m, day) {
|
|
36
|
+
return Math.min(day, daysInMonth(y, m));
|
|
37
|
+
}
|
|
38
|
+
function generateSixWeekGrid(viewDate, weekStartsOnMonday = true) {
|
|
39
|
+
// Strategy: 7x6 grid, include prev/next month days to fill 42 cells
|
|
40
|
+
const first = startOfMonth(viewDate);
|
|
41
|
+
const firstWeekday = first.getDay(); // 0=Sun..6=Sat
|
|
42
|
+
// For Monday start: Mon=0, Tue=1, ..., Sun=6
|
|
43
|
+
const offset = weekStartsOnMonday ? (firstWeekday + 6) % 7 : firstWeekday;
|
|
44
|
+
const grid = [];
|
|
45
|
+
const start = addDays(first, -offset);
|
|
46
|
+
for (let w = 0; w < 6; w++) {
|
|
47
|
+
const row = [];
|
|
48
|
+
for (let i = 0; i < 7; i++)
|
|
49
|
+
row.push(addDays(start, w * 7 + i));
|
|
50
|
+
grid.push(row);
|
|
51
|
+
}
|
|
52
|
+
return grid;
|
|
53
|
+
}
|
|
54
|
+
// ----- Component -----
|
|
55
|
+
export function DatePickerWidget({ enableColors = true, initialValue, onChange, focused = false, onFirstRowUpKey, onLastRowDownKey, }) {
|
|
56
|
+
const today = useMemo(() => new Date(), []);
|
|
57
|
+
const [focus, setFocus] = useState('grid'); // can be "year" | "month" | "grid"
|
|
58
|
+
const [selected, setSelected] = useState(initialValue || new Date()); // focused day
|
|
59
|
+
const [visible, setVisible] = useState(startOfMonth(initialValue || new Date())); // month being shown
|
|
60
|
+
const [searchQuery, setSearchQuery] = useState(''); // for type-to-search
|
|
61
|
+
const searchTimeoutRef = useRef(null);
|
|
62
|
+
// Recompute 7x6 grid for the visible month (Monday start)
|
|
63
|
+
const weeks = useMemo(() => generateSixWeekGrid(visible, true), [visible]);
|
|
64
|
+
// Keep visible month synced when selected day moves across months
|
|
65
|
+
function ensureVisibleFor(date) {
|
|
66
|
+
const m = new Date(date.getFullYear(), date.getMonth(), 1);
|
|
67
|
+
const keyA = visible.getFullYear() * 12 + visible.getMonth();
|
|
68
|
+
const keyB = m.getFullYear() * 12 + m.getMonth();
|
|
69
|
+
if (keyA !== keyB)
|
|
70
|
+
setVisible(m);
|
|
71
|
+
}
|
|
72
|
+
function changeMonth(delta) {
|
|
73
|
+
const y = visible.getFullYear();
|
|
74
|
+
const m = visible.getMonth() + delta;
|
|
75
|
+
const newY = y + Math.floor(m / 12);
|
|
76
|
+
const newM = ((m % 12) + 12) % 12;
|
|
77
|
+
const day = clampDay(newY, newM, selected.getDate());
|
|
78
|
+
const newSel = new Date(newY, newM, day);
|
|
79
|
+
setVisible(new Date(newY, newM, 1));
|
|
80
|
+
setSelected(newSel);
|
|
81
|
+
}
|
|
82
|
+
function changeYear(delta) {
|
|
83
|
+
const y = visible.getFullYear() + delta;
|
|
84
|
+
const m = visible.getMonth();
|
|
85
|
+
const day = clampDay(y, m, selected.getDate());
|
|
86
|
+
const newSel = new Date(y, m, day);
|
|
87
|
+
setVisible(new Date(y, m, 1));
|
|
88
|
+
setSelected(newSel);
|
|
89
|
+
}
|
|
90
|
+
// Generate years list for search
|
|
91
|
+
const years = useMemo(() => {
|
|
92
|
+
const yearList = [];
|
|
93
|
+
for (let y = 1800; y <= 2200; y++) {
|
|
94
|
+
yearList.push(y);
|
|
95
|
+
}
|
|
96
|
+
return yearList;
|
|
97
|
+
}, []);
|
|
98
|
+
// Search functionality
|
|
99
|
+
function searchYear(query) {
|
|
100
|
+
const matches = years.filter((y) => y.toString().startsWith(query));
|
|
101
|
+
if (matches.length > 0) {
|
|
102
|
+
const newY = matches[0];
|
|
103
|
+
const m = visible.getMonth();
|
|
104
|
+
const day = clampDay(newY, m, selected.getDate());
|
|
105
|
+
const newSel = new Date(newY, m, day);
|
|
106
|
+
setVisible(new Date(newY, m, 1));
|
|
107
|
+
setSelected(newSel);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
function searchMonth(query) {
|
|
111
|
+
// Search by month name or number
|
|
112
|
+
const lowerQuery = query.toLowerCase();
|
|
113
|
+
let monthIndex = -1;
|
|
114
|
+
// Try to match month name
|
|
115
|
+
for (let i = 0; i < MONTHS.length; i++) {
|
|
116
|
+
if (MONTHS[i].toLowerCase().startsWith(lowerQuery)) {
|
|
117
|
+
monthIndex = i;
|
|
118
|
+
break;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
// Try to match month number
|
|
122
|
+
if (monthIndex === -1) {
|
|
123
|
+
const num = parseInt(query);
|
|
124
|
+
if (!isNaN(num) && num >= 1 && num <= 12) {
|
|
125
|
+
monthIndex = num - 1;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
if (monthIndex !== -1) {
|
|
129
|
+
const y = visible.getFullYear();
|
|
130
|
+
const day = clampDay(y, monthIndex, selected.getDate());
|
|
131
|
+
const newSel = new Date(y, monthIndex, day);
|
|
132
|
+
setVisible(new Date(y, monthIndex, 1));
|
|
133
|
+
setSelected(newSel);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
function searchDay(query) {
|
|
137
|
+
const day = parseInt(query);
|
|
138
|
+
if (!isNaN(day) && day >= 1 && day <= 31) {
|
|
139
|
+
const y = visible.getFullYear();
|
|
140
|
+
const m = visible.getMonth();
|
|
141
|
+
const clampedDay = clampDay(y, m, day);
|
|
142
|
+
const newSel = new Date(y, m, clampedDay);
|
|
143
|
+
setSelected(newSel);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
// Keyboard interactions
|
|
147
|
+
useKeyboard((key) => {
|
|
148
|
+
// Ignore keyboard events if not focused
|
|
149
|
+
if (!focused)
|
|
150
|
+
return;
|
|
151
|
+
// Handle type-to-search
|
|
152
|
+
if (key.name.length === 1 && /[0-9a-zA-Z]/.test(key.name)) {
|
|
153
|
+
const newQuery = searchQuery + key.name;
|
|
154
|
+
setSearchQuery(newQuery);
|
|
155
|
+
// Clear previous timeout
|
|
156
|
+
if (searchTimeoutRef.current) {
|
|
157
|
+
clearTimeout(searchTimeoutRef.current);
|
|
158
|
+
}
|
|
159
|
+
// Perform search based on current focus
|
|
160
|
+
if (focus === 'year') {
|
|
161
|
+
searchYear(newQuery);
|
|
162
|
+
}
|
|
163
|
+
else if (focus === 'month') {
|
|
164
|
+
searchMonth(newQuery);
|
|
165
|
+
}
|
|
166
|
+
else if (focus === 'grid') {
|
|
167
|
+
searchDay(newQuery);
|
|
168
|
+
}
|
|
169
|
+
// Reset search query after 1 second
|
|
170
|
+
searchTimeoutRef.current = setTimeout(() => {
|
|
171
|
+
setSearchQuery('');
|
|
172
|
+
}, 1000);
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
switch (key.name) {
|
|
176
|
+
case 'left':
|
|
177
|
+
if (focus === 'grid') {
|
|
178
|
+
const next = addDays(selected, -1);
|
|
179
|
+
setSelected(next);
|
|
180
|
+
ensureVisibleFor(next);
|
|
181
|
+
}
|
|
182
|
+
else if (focus === 'month') {
|
|
183
|
+
changeMonth(-1);
|
|
184
|
+
}
|
|
185
|
+
else if (focus === 'year') {
|
|
186
|
+
changeYear(-1);
|
|
187
|
+
}
|
|
188
|
+
break;
|
|
189
|
+
case 'right':
|
|
190
|
+
if (focus === 'grid') {
|
|
191
|
+
const next = addDays(selected, +1);
|
|
192
|
+
setSelected(next);
|
|
193
|
+
ensureVisibleFor(next);
|
|
194
|
+
}
|
|
195
|
+
else if (focus === 'month') {
|
|
196
|
+
changeMonth(+1);
|
|
197
|
+
}
|
|
198
|
+
else if (focus === 'year') {
|
|
199
|
+
changeYear(+1);
|
|
200
|
+
}
|
|
201
|
+
break;
|
|
202
|
+
case 'up':
|
|
203
|
+
if (focus === 'grid') {
|
|
204
|
+
// Check if we're in the first row of the month
|
|
205
|
+
const firstDayOfMonth = new Date(selected.getFullYear(), selected.getMonth(), 1);
|
|
206
|
+
const daysDiff = selected.getDate() - 1;
|
|
207
|
+
if (daysDiff < 7) {
|
|
208
|
+
// Move focus to month
|
|
209
|
+
setFocus('month');
|
|
210
|
+
}
|
|
211
|
+
else {
|
|
212
|
+
const next = addDays(selected, -7);
|
|
213
|
+
setSelected(next);
|
|
214
|
+
ensureVisibleFor(next);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
else if (focus === 'month') {
|
|
218
|
+
// Move focus to year
|
|
219
|
+
setFocus('year');
|
|
220
|
+
}
|
|
221
|
+
else if (focus === 'year') {
|
|
222
|
+
// At top of widget, trigger callback or cycle to bottom
|
|
223
|
+
if (onFirstRowUpKey) {
|
|
224
|
+
onFirstRowUpKey();
|
|
225
|
+
}
|
|
226
|
+
else {
|
|
227
|
+
// Cycle to grid if no callback
|
|
228
|
+
setFocus('grid');
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
break;
|
|
232
|
+
case 'down':
|
|
233
|
+
if (focus === 'grid') {
|
|
234
|
+
// Check if we're in the last row of days
|
|
235
|
+
const daysInCurrentMonth = daysInMonth(selected.getFullYear(), selected.getMonth());
|
|
236
|
+
const remainingDays = daysInCurrentMonth - selected.getDate();
|
|
237
|
+
if (remainingDays < 7) {
|
|
238
|
+
// At bottom of grid, trigger callback or cycle to top
|
|
239
|
+
if (onLastRowDownKey) {
|
|
240
|
+
onLastRowDownKey();
|
|
241
|
+
}
|
|
242
|
+
else {
|
|
243
|
+
// Cycle to year if no callback
|
|
244
|
+
setFocus('year');
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
else {
|
|
248
|
+
const next = addDays(selected, +7);
|
|
249
|
+
setSelected(next);
|
|
250
|
+
ensureVisibleFor(next);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
else if (focus === 'year') {
|
|
254
|
+
// Move focus to month
|
|
255
|
+
setFocus('month');
|
|
256
|
+
}
|
|
257
|
+
else if (focus === 'month') {
|
|
258
|
+
// Move focus to grid
|
|
259
|
+
setFocus('grid');
|
|
260
|
+
}
|
|
261
|
+
break;
|
|
262
|
+
case 'tab':
|
|
263
|
+
if (key.shift) {
|
|
264
|
+
if (focus === 'year') {
|
|
265
|
+
// At top of widget, trigger callback or cycle to bottom
|
|
266
|
+
if (onFirstRowUpKey) {
|
|
267
|
+
onFirstRowUpKey();
|
|
268
|
+
}
|
|
269
|
+
else {
|
|
270
|
+
// Cycle to grid if no callback
|
|
271
|
+
setFocus('grid');
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
else {
|
|
275
|
+
// Shift+Tab: Move focus up (grid -> month -> year)
|
|
276
|
+
setFocus((f) => f === 'grid' ? 'month' : f === 'month' ? 'year' : 'year');
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
else {
|
|
280
|
+
if (focus === 'grid') {
|
|
281
|
+
// At bottom of widget, trigger callback or cycle to top
|
|
282
|
+
if (onLastRowDownKey) {
|
|
283
|
+
onLastRowDownKey();
|
|
284
|
+
}
|
|
285
|
+
else {
|
|
286
|
+
// Cycle to year if no callback
|
|
287
|
+
setFocus('year');
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
else {
|
|
291
|
+
// Tab: Move focus down (year -> month -> grid)
|
|
292
|
+
setFocus((f) => f === 'year' ? 'month' : f === 'month' ? 'grid' : 'grid');
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
break;
|
|
296
|
+
case 'return': // Enter key
|
|
297
|
+
if (focus === 'grid' && onChange) {
|
|
298
|
+
onChange(selected);
|
|
299
|
+
}
|
|
300
|
+
break;
|
|
301
|
+
default:
|
|
302
|
+
break;
|
|
303
|
+
}
|
|
304
|
+
});
|
|
305
|
+
const y = visible.getFullYear();
|
|
306
|
+
const m = visible.getMonth();
|
|
307
|
+
const headerWidth = 21; // Match form.md width (7 cols * 3 width)
|
|
308
|
+
const cellStyle = {
|
|
309
|
+
width: 3,
|
|
310
|
+
height: 1,
|
|
311
|
+
alignItems: 'center',
|
|
312
|
+
justifyContent: 'center',
|
|
313
|
+
};
|
|
314
|
+
// Only show days from current month
|
|
315
|
+
const filteredWeeks = weeks.map((row) => row.map((d) => (d.getMonth() === m ? d : null)));
|
|
316
|
+
// Week starts Monday: Mo Tu We Th Fr Sa Su
|
|
317
|
+
const weekdayHeaders = ['Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su'];
|
|
318
|
+
return (_jsxs("box", { style: {
|
|
319
|
+
flexDirection: 'column',
|
|
320
|
+
alignItems: 'flex-start',
|
|
321
|
+
padding: 1,
|
|
322
|
+
}, children: [_jsx("box", { style: {
|
|
323
|
+
width: headerWidth,
|
|
324
|
+
height: 1,
|
|
325
|
+
backgroundColor: enableColors && focus === 'year' ? Theme.primary : undefined,
|
|
326
|
+
marginBottom: 0,
|
|
327
|
+
}, onMouseDown: () => setFocus('year'), children: _jsxs("box", { style: {
|
|
328
|
+
flexDirection: 'row',
|
|
329
|
+
justifyContent: 'space-between',
|
|
330
|
+
alignItems: 'center',
|
|
331
|
+
width: headerWidth,
|
|
332
|
+
}, children: [_jsx("text", { fg: focus === 'year' ? Theme.text : Theme.textMuted, children: "\u2190" }), _jsx("text", { fg: focus === 'year' ? Theme.text : Theme.textMuted, children: String(y) }), _jsx("text", { fg: focus === 'year' ? Theme.text : Theme.textMuted, children: "\u2192" })] }) }), _jsx("box", { style: {
|
|
333
|
+
width: headerWidth,
|
|
334
|
+
height: 1,
|
|
335
|
+
backgroundColor: enableColors && focus === 'month' ? Theme.primary : undefined,
|
|
336
|
+
marginBottom: 1,
|
|
337
|
+
}, onMouseDown: () => setFocus('month'), children: _jsxs("box", { style: {
|
|
338
|
+
flexDirection: 'row',
|
|
339
|
+
justifyContent: 'space-between',
|
|
340
|
+
alignItems: 'center',
|
|
341
|
+
width: headerWidth,
|
|
342
|
+
}, children: [_jsx("text", { fg: focus === 'month' ? Theme.text : Theme.textMuted, children: "\u2190" }), _jsx("text", { fg: focus === 'month' ? Theme.text : Theme.textMuted, children: MONTHS[m] }), _jsx("text", { fg: focus === 'month' ? Theme.text : Theme.textMuted, children: "\u2192" })] }) }), _jsx("box", { style: {
|
|
343
|
+
flexDirection: 'row',
|
|
344
|
+
width: headerWidth,
|
|
345
|
+
justifyContent: 'space-between',
|
|
346
|
+
marginBottom: 0,
|
|
347
|
+
}, children: weekdayHeaders.map((wd, idx) => (_jsx("box", { style: cellStyle, children: _jsx("text", { fg: enableColors && (idx === 5 || idx === 6)
|
|
348
|
+
? Theme.error
|
|
349
|
+
: Theme.textMuted, children: wd }) }, wd))) }), _jsx("box", { style: { flexDirection: 'column', minHeight: 6 }, children: filteredWeeks.map((row, i) => {
|
|
350
|
+
// Skip empty rows
|
|
351
|
+
if (row.every((d) => d === null))
|
|
352
|
+
return null;
|
|
353
|
+
return (_jsx("box", { style: { flexDirection: 'row' }, children: row.map((d, j) => {
|
|
354
|
+
if (d === null) {
|
|
355
|
+
return (_jsx("box", { style: cellStyle, children: _jsx("text", { children: " " }) }, `${i}-${j}`));
|
|
356
|
+
}
|
|
357
|
+
const isSel = sameDay(d, selected);
|
|
358
|
+
const isToday = sameDay(d, today);
|
|
359
|
+
return (_jsx("box", { style: {
|
|
360
|
+
...cellStyle,
|
|
361
|
+
backgroundColor: enableColors && isSel && focus === 'grid'
|
|
362
|
+
? Theme.primary
|
|
363
|
+
: enableColors && isToday
|
|
364
|
+
? Theme.backgroundPanel
|
|
365
|
+
: undefined,
|
|
366
|
+
}, onMouseDown: () => {
|
|
367
|
+
setSelected(d);
|
|
368
|
+
setFocus('grid');
|
|
369
|
+
ensureVisibleFor(d);
|
|
370
|
+
}, children: _jsx("text", { fg: isSel && focus === 'grid'
|
|
371
|
+
? Theme.text
|
|
372
|
+
: enableColors && isToday
|
|
373
|
+
? Theme.accent
|
|
374
|
+
: enableColors && (j === 5 || j === 6)
|
|
375
|
+
? Theme.error
|
|
376
|
+
: Theme.text, children: String(d.getDate()).padStart(2, ' ') }) }, `${i}-${j}`));
|
|
377
|
+
}) }, i));
|
|
378
|
+
}) })] }));
|
|
379
|
+
}
|
|
380
|
+
//# sourceMappingURL=date-picker-widget.js.map
|