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
package/dist/window.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare enum PopToRootType {
|
|
2
|
+
Default = "default",
|
|
3
|
+
Immediate = "immediate",
|
|
4
|
+
Suspended = "suspended"
|
|
5
|
+
}
|
|
6
|
+
interface CloseMainWindowOptions {
|
|
7
|
+
clearRootSearch?: boolean;
|
|
8
|
+
popToRootType?: PopToRootType;
|
|
9
|
+
}
|
|
10
|
+
export declare function closeMainWindow({ clearRootSearch, popToRootType, }?: CloseMainWindowOptions): Promise<void>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=window.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"window.d.ts","sourceRoot":"","sources":["../src/window.tsx"],"names":[],"mappings":"AAGA,oBAAY,aAAa;IACvB,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,SAAS,cAAc;CACxB;AAED,UAAU,sBAAsB;IAC9B,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,aAAa,CAAC,EAAE,aAAa,CAAA;CAC9B;AAKD,wBAAsB,eAAe,CAAC,EACpC,eAAe,EACf,aAAqC,GACtC,GAAE,sBAA2B,GAAG,OAAO,CAAC,IAAI,CAAC,CA6C7C"}
|
package/dist/window.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export var PopToRootType;
|
|
2
|
+
(function (PopToRootType) {
|
|
3
|
+
PopToRootType["Default"] = "default";
|
|
4
|
+
PopToRootType["Immediate"] = "immediate";
|
|
5
|
+
PopToRootType["Suspended"] = "suspended";
|
|
6
|
+
})(PopToRootType || (PopToRootType = {}));
|
|
7
|
+
const overlayWindows = ['Raycast'];
|
|
8
|
+
// TODO does not do anything
|
|
9
|
+
export async function closeMainWindow({ clearRootSearch, popToRootType = PopToRootType.Default, } = {}) {
|
|
10
|
+
return;
|
|
11
|
+
// try {
|
|
12
|
+
// const currentPid = process.pid
|
|
13
|
+
// // On macOS, request accessibility permissions if needed
|
|
14
|
+
// if (process.platform === 'darwin') {
|
|
15
|
+
// windowManager.requestAccessibility()
|
|
16
|
+
// }
|
|
17
|
+
// // Get all windows
|
|
18
|
+
// const windows = windowManager.getWindows()
|
|
19
|
+
// // Find a window that's not the current process
|
|
20
|
+
// const previousWindow = windows.find((win) => {
|
|
21
|
+
// try {
|
|
22
|
+
// if (!win.isVisible) return false
|
|
23
|
+
// if (overlayWindows.includes(win.getTitle())) return false
|
|
24
|
+
// return win.processId !== currentPid
|
|
25
|
+
// } catch {
|
|
26
|
+
// return false
|
|
27
|
+
// }
|
|
28
|
+
// })
|
|
29
|
+
// if (previousWindow) {
|
|
30
|
+
// // Bring the previous window to focus
|
|
31
|
+
// previousWindow.bringToTop()
|
|
32
|
+
// logger.log(`Switched focus to window: ${previousWindow.getTitle()}`)
|
|
33
|
+
// } else {
|
|
34
|
+
// logger.log('No previous window found to focus')
|
|
35
|
+
// }
|
|
36
|
+
// // Minimize or hide the current window
|
|
37
|
+
// // const currentWindow = windowManager.getActiveWindow()
|
|
38
|
+
// // if (currentWindow) {
|
|
39
|
+
// // currentWindow.minimize()
|
|
40
|
+
// // }
|
|
41
|
+
// // TODO: Handle clearRootSearch behavior when main window functionality is implemented
|
|
42
|
+
// // TODO: Handle popToRootType behavior when navigation stack is implemented
|
|
43
|
+
// } catch (error) {
|
|
44
|
+
// logger.error('Failed to close main window:', error)
|
|
45
|
+
// throw error
|
|
46
|
+
// }
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=window.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"window.js","sourceRoot":"","sources":["../src/window.tsx"],"names":[],"mappings":"AAGA,MAAM,CAAN,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,oCAAmB,CAAA;IACnB,wCAAuB,CAAA;IACvB,wCAAuB,CAAA;AACzB,CAAC,EAJW,aAAa,KAAb,aAAa,QAIxB;AAOD,MAAM,cAAc,GAAG,CAAC,SAAS,CAAC,CAAA;AAElC,4BAA4B;AAC5B,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,EACpC,eAAe,EACf,aAAa,GAAG,aAAa,CAAC,OAAO,MACX,EAAE;IAC5B,OAAM;IACN,QAAQ;IACR,qCAAqC;IAErC,+DAA+D;IAC/D,2CAA2C;IAC3C,+CAA+C;IAC/C,QAAQ;IAER,yBAAyB;IACzB,iDAAiD;IAEjD,sDAAsD;IACtD,qDAAqD;IACrD,gBAAgB;IAChB,+CAA+C;IAC/C,wEAAwE;IAExE,kDAAkD;IAClD,oBAAoB;IACpB,2BAA2B;IAC3B,YAAY;IACZ,SAAS;IAET,4BAA4B;IAC5B,gDAAgD;IAChD,sCAAsC;IACtC,+EAA+E;IAC/E,eAAe;IACf,0DAA0D;IAC1D,QAAQ;IAER,6CAA6C;IAC7C,+DAA+D;IAC/D,8BAA8B;IAC9B,sCAAsC;IACtC,WAAW;IAEX,6FAA6F;IAC7F,kFAAkF;IAClF,oBAAoB;IACpB,0DAA0D;IAC1D,kBAAkB;IAClB,IAAI;AACN,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "termcast",
|
|
3
|
+
"version": "1.3.9",
|
|
4
|
+
"description": "Raycast for the terminal",
|
|
5
|
+
"repository": "https://github.com/remorses/termcast",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"build": "tsc && bun run binary",
|
|
8
|
+
"release": "cd .. && bun changeset version && /Users/morse/Documents/GitHub/changesets/packages/cli/bin.js publish # my own fork to support github releases",
|
|
9
|
+
"binary": "bun build ./src/cli.tsx --env-file=\"\" --compile --outfile bin",
|
|
10
|
+
"see-raycast-types": "zed node_modules/@raycast/api/types/index.d.ts",
|
|
11
|
+
"play": "bun src/cli.tsx",
|
|
12
|
+
"test": "bun test && bun e2e",
|
|
13
|
+
"e2e": "vitest --run"
|
|
14
|
+
},
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"default": "./src/index.tsx"
|
|
18
|
+
},
|
|
19
|
+
"./src/*": "./src/*.tsx"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"dist",
|
|
23
|
+
"src",
|
|
24
|
+
"esm"
|
|
25
|
+
],
|
|
26
|
+
"keywords": [],
|
|
27
|
+
"author": "Tommaso De Rossi, morse <beats.by.morse@gmail.com>",
|
|
28
|
+
"license": "",
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@opentui/core": "0.1.23",
|
|
31
|
+
"@opentui/react": "0.1.23",
|
|
32
|
+
"@tanstack/react-query": "^5.85.5",
|
|
33
|
+
"@tanstack/react-query-persist-client": "^5.85.5",
|
|
34
|
+
"cac": "^6.7.14",
|
|
35
|
+
"change-case": "^5.4.4",
|
|
36
|
+
"chokidar": "^4.0.3",
|
|
37
|
+
"google-auth-library": "^10.3.0",
|
|
38
|
+
"jszip": "^3.10.1",
|
|
39
|
+
"nanoid": "^5.1.5",
|
|
40
|
+
"node-pty": "^1.1.0-beta34",
|
|
41
|
+
"react": "^19.1.1",
|
|
42
|
+
"react-hook-form": "^7.62.0",
|
|
43
|
+
"string-dedent": "^3.0.2",
|
|
44
|
+
"zustand": "^5.0.8"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@types/bun": "^1.2.21",
|
|
48
|
+
"@types/node": "^24.3.0",
|
|
49
|
+
"@raycast/api": "^1.102.5",
|
|
50
|
+
"@raycast/utils": "^2.2.1",
|
|
51
|
+
"@xterm/addon-serialize": "^0.13.0",
|
|
52
|
+
"@xterm/headless": "^5.5.0",
|
|
53
|
+
"bun-pty": "^0.3.2",
|
|
54
|
+
"vitest": "^3.2.4"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import { exec } from 'child_process'
|
|
2
|
+
import { promisify } from 'util'
|
|
3
|
+
import { logger } from 'termcast/src/logger'
|
|
4
|
+
|
|
5
|
+
const execAsync = promisify(exec)
|
|
6
|
+
const platform = process.platform
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Execute command with input (for commands like pbcopy that need stdin)
|
|
10
|
+
*/
|
|
11
|
+
function execWithInput(command: string, input: string): Promise<void> {
|
|
12
|
+
return new Promise((resolve, reject) => {
|
|
13
|
+
const child = exec(command, (error) => {
|
|
14
|
+
if (error) {
|
|
15
|
+
reject(error)
|
|
16
|
+
} else {
|
|
17
|
+
resolve()
|
|
18
|
+
}
|
|
19
|
+
})
|
|
20
|
+
child.stdin?.write(input)
|
|
21
|
+
child.stdin?.end()
|
|
22
|
+
})
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Copy text to clipboard
|
|
27
|
+
*/
|
|
28
|
+
export async function copyToClipboard(
|
|
29
|
+
content: string | number,
|
|
30
|
+
concealed?: boolean,
|
|
31
|
+
): Promise<void> {
|
|
32
|
+
const text = String(content)
|
|
33
|
+
|
|
34
|
+
try {
|
|
35
|
+
if (platform === 'darwin') {
|
|
36
|
+
// macOS: use pbcopy
|
|
37
|
+
await execWithInput('pbcopy', text)
|
|
38
|
+
logger.log(`📋 Copied to clipboard: ${concealed ? '[CONCEALED]' : text}`)
|
|
39
|
+
} else if (platform === 'linux') {
|
|
40
|
+
// Linux: use xclip if available
|
|
41
|
+
await execWithInput('xclip -selection clipboard', text)
|
|
42
|
+
logger.log(`📋 Copied to clipboard: ${concealed ? '[CONCEALED]' : text}`)
|
|
43
|
+
} else if (platform === 'win32') {
|
|
44
|
+
// Windows: use clip
|
|
45
|
+
await execWithInput('clip', text)
|
|
46
|
+
logger.log(`📋 Copied to clipboard: ${concealed ? '[CONCEALED]' : text}`)
|
|
47
|
+
} else {
|
|
48
|
+
logger.log(
|
|
49
|
+
`📋 Copy to clipboard not supported on ${platform}: ${concealed ? '[CONCEALED]' : text}`,
|
|
50
|
+
)
|
|
51
|
+
}
|
|
52
|
+
} catch (error) {
|
|
53
|
+
logger.log(`📋 Failed to copy to clipboard: ${error}`)
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Open URL in the default browser
|
|
59
|
+
*/
|
|
60
|
+
export async function openInBrowser(url: string): Promise<void> {
|
|
61
|
+
try {
|
|
62
|
+
if (platform === 'darwin') {
|
|
63
|
+
// macOS: use open
|
|
64
|
+
await execAsync(`open "${url}"`)
|
|
65
|
+
logger.log(`🌐 Opened in browser: ${url}`)
|
|
66
|
+
} else if (platform === 'linux') {
|
|
67
|
+
// Linux: use xdg-open
|
|
68
|
+
await execAsync(`xdg-open "${url}"`)
|
|
69
|
+
logger.log(`🌐 Opened in browser: ${url}`)
|
|
70
|
+
} else if (platform === 'win32') {
|
|
71
|
+
// Windows: use start
|
|
72
|
+
await execAsync(`start "${url}"`)
|
|
73
|
+
logger.log(`🌐 Opened in browser: ${url}`)
|
|
74
|
+
} else {
|
|
75
|
+
logger.log(`🌐 Opening browser not supported on ${platform}: ${url}`)
|
|
76
|
+
}
|
|
77
|
+
} catch (error) {
|
|
78
|
+
logger.log(`🌐 Failed to open browser: ${error}`)
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Open a file or folder with a specific application
|
|
84
|
+
*/
|
|
85
|
+
export async function openFile(
|
|
86
|
+
target: string,
|
|
87
|
+
application?: string,
|
|
88
|
+
): Promise<void> {
|
|
89
|
+
try {
|
|
90
|
+
if (platform === 'darwin') {
|
|
91
|
+
// macOS: use open with optional application
|
|
92
|
+
if (application) {
|
|
93
|
+
await execAsync(`open -a "${application}" "${target}"`)
|
|
94
|
+
logger.log(`📂 Opened ${target} with ${application}`)
|
|
95
|
+
} else {
|
|
96
|
+
await execAsync(`open "${target}"`)
|
|
97
|
+
logger.log(`📂 Opened ${target}`)
|
|
98
|
+
}
|
|
99
|
+
} else if (platform === 'linux') {
|
|
100
|
+
// Linux: use xdg-open (doesn't support specific application)
|
|
101
|
+
await execAsync(`xdg-open "${target}"`)
|
|
102
|
+
logger.log(`📂 Opened ${target}`)
|
|
103
|
+
} else if (platform === 'win32') {
|
|
104
|
+
// Windows: use start
|
|
105
|
+
await execAsync(`start "" "${target}"`)
|
|
106
|
+
logger.log(`📂 Opened ${target}`)
|
|
107
|
+
} else {
|
|
108
|
+
logger.log(`📂 Opening files not supported on ${platform}: ${target}`)
|
|
109
|
+
}
|
|
110
|
+
} catch (error) {
|
|
111
|
+
logger.log(`📂 Failed to open file: ${error}`)
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Paste content (simulates paste action)
|
|
117
|
+
*/
|
|
118
|
+
export async function pasteContent(content: string | number): Promise<void> {
|
|
119
|
+
const text = String(content)
|
|
120
|
+
|
|
121
|
+
try {
|
|
122
|
+
if (platform === 'darwin') {
|
|
123
|
+
// macOS: First copy to clipboard, then simulate Cmd+V
|
|
124
|
+
await execWithInput('pbcopy', text)
|
|
125
|
+
// Note: Simulating keypress requires additional tools like osascript
|
|
126
|
+
await execAsync(
|
|
127
|
+
`osascript -e 'tell application "System Events" to keystroke "v" using command down'`,
|
|
128
|
+
)
|
|
129
|
+
logger.log(`📝 Pasted: ${text}`)
|
|
130
|
+
} else if (platform === 'linux') {
|
|
131
|
+
// Linux: Copy to clipboard with xclip
|
|
132
|
+
await execWithInput('xclip -selection clipboard', text)
|
|
133
|
+
// Simulating paste would require xdotool or similar
|
|
134
|
+
logger.log(`📝 Copied for paste: ${text}`)
|
|
135
|
+
} else if (platform === 'win32') {
|
|
136
|
+
// Windows: Copy to clipboard
|
|
137
|
+
await execWithInput('clip', text)
|
|
138
|
+
logger.log(`📝 Copied for paste: ${text}`)
|
|
139
|
+
} else {
|
|
140
|
+
logger.log(`📝 Paste not supported on ${platform}: ${text}`)
|
|
141
|
+
}
|
|
142
|
+
} catch (error) {
|
|
143
|
+
logger.log(`📝 Failed to paste: ${error}`)
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Show content in file manager (Finder on macOS, Explorer on Windows, etc.)
|
|
149
|
+
*/
|
|
150
|
+
export async function showInFinder(path: string): Promise<void> {
|
|
151
|
+
try {
|
|
152
|
+
if (platform === 'darwin') {
|
|
153
|
+
// macOS: use open -R to reveal in Finder
|
|
154
|
+
await execAsync(`open -R "${path}"`)
|
|
155
|
+
logger.log(`📁 Revealed in Finder: ${path}`)
|
|
156
|
+
} else if (platform === 'linux') {
|
|
157
|
+
// Linux: open containing directory
|
|
158
|
+
await execAsync(`xdg-open "$(dirname "${path}")"`)
|
|
159
|
+
logger.log(`📁 Opened containing folder: ${path}`)
|
|
160
|
+
} else if (platform === 'win32') {
|
|
161
|
+
// Windows: use explorer with /select
|
|
162
|
+
await execAsync(`explorer /select,"${path}"`)
|
|
163
|
+
logger.log(`📁 Revealed in Explorer: ${path}`)
|
|
164
|
+
} else {
|
|
165
|
+
logger.log(
|
|
166
|
+
`📁 Show in file manager not supported on ${platform}: ${path}`,
|
|
167
|
+
)
|
|
168
|
+
}
|
|
169
|
+
} catch (error) {
|
|
170
|
+
logger.log(`📁 Failed to show in file manager: ${error}`)
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Move file to trash
|
|
176
|
+
*/
|
|
177
|
+
export async function moveToTrash(path: string): Promise<void> {
|
|
178
|
+
try {
|
|
179
|
+
if (platform === 'darwin') {
|
|
180
|
+
// macOS: use osascript to move to trash
|
|
181
|
+
await execAsync(
|
|
182
|
+
`osascript -e 'tell application "Finder" to delete POSIX file "${path}"'`,
|
|
183
|
+
)
|
|
184
|
+
logger.log(`🗑️ Moved to trash: ${path}`)
|
|
185
|
+
} else if (platform === 'linux') {
|
|
186
|
+
// Linux: use gio trash if available, otherwise move to trash directory
|
|
187
|
+
try {
|
|
188
|
+
await execAsync(`gio trash "${path}"`)
|
|
189
|
+
} catch {
|
|
190
|
+
// Fallback to moving to trash directory
|
|
191
|
+
const trashDir = `${process.env.HOME}/.local/share/Trash/files`
|
|
192
|
+
await execAsync(`mkdir -p "${trashDir}" && mv "${path}" "${trashDir}/"`)
|
|
193
|
+
}
|
|
194
|
+
logger.log(`🗑️ Moved to trash: ${path}`)
|
|
195
|
+
} else if (platform === 'win32') {
|
|
196
|
+
// Windows: use PowerShell to move to recycle bin
|
|
197
|
+
await execAsync(
|
|
198
|
+
`powershell -command "Add-Type -AssemblyName Microsoft.VisualBasic; [Microsoft.VisualBasic.FileIO.FileSystem]::DeleteFile('${path}','OnlyErrorDialogs','SendToRecycleBin')"`,
|
|
199
|
+
)
|
|
200
|
+
logger.log(`🗑️ Moved to recycle bin: ${path}`)
|
|
201
|
+
} else {
|
|
202
|
+
logger.log(`🗑️ Move to trash not supported on ${platform}: ${path}`)
|
|
203
|
+
}
|
|
204
|
+
} catch (error) {
|
|
205
|
+
logger.log(`🗑️ Failed to move to trash: ${error}`)
|
|
206
|
+
}
|
|
207
|
+
}
|
package/src/apis/ai.tsx
ADDED
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI API - Interface for AI model interactions
|
|
3
|
+
*
|
|
4
|
+
* Raycast Docs: https://developers.raycast.com/api-reference/ai
|
|
5
|
+
*
|
|
6
|
+
* The AI namespace provides methods to interact with various AI models for
|
|
7
|
+
* generating text completions. It supports streaming responses and multiple
|
|
8
|
+
* model providers including OpenAI, Anthropic, Google, and others.
|
|
9
|
+
*
|
|
10
|
+
* Key features:
|
|
11
|
+
* - Stream text completions with AI.ask()
|
|
12
|
+
* - Support for multiple AI models via Model enum
|
|
13
|
+
* - Configurable creativity levels
|
|
14
|
+
* - Abort signal support for cancellation
|
|
15
|
+
* - Event-based streaming with "data" events
|
|
16
|
+
*
|
|
17
|
+
* Usage:
|
|
18
|
+
* const stream = AI.ask("Explain quantum computing")
|
|
19
|
+
* stream.on("data", (chunk) => console.log(chunk))
|
|
20
|
+
* const result = await stream
|
|
21
|
+
*
|
|
22
|
+
* Models include GPT-4, Claude, Gemini, Llama, Mistral, and many others.
|
|
23
|
+
* Creativity can be set from "none" to "maximum" or as a number 0-2.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
import { EventEmitter } from 'node:events'
|
|
27
|
+
import { logger } from 'termcast/src/logger'
|
|
28
|
+
|
|
29
|
+
export namespace AI {
|
|
30
|
+
export type Creativity =
|
|
31
|
+
| 'none'
|
|
32
|
+
| 'low'
|
|
33
|
+
| 'medium'
|
|
34
|
+
| 'high'
|
|
35
|
+
| 'maximum'
|
|
36
|
+
| number
|
|
37
|
+
|
|
38
|
+
export enum Model {
|
|
39
|
+
OpenAI_GPT4 = 'openai-gpt-4',
|
|
40
|
+
'OpenAI_GPT4-turbo' = 'openai-gpt-4-turbo',
|
|
41
|
+
'OpenAI_GPT4.1' = 'openai-gpt-4.1',
|
|
42
|
+
'OpenAI_GPT4.1-nano' = 'openai-gpt-4.1-nano',
|
|
43
|
+
'OpenAI_GPT4.1-mini' = 'openai-gpt-4.1-mini',
|
|
44
|
+
OpenAI_GPT4o = 'openai-gpt-4o',
|
|
45
|
+
'OpenAI_GPT4o-mini' = 'openai-gpt-4o-mini',
|
|
46
|
+
'OpenAI_o3-mini' = 'openai_o1-o3-mini',
|
|
47
|
+
'OpenAI_o4-mini' = 'openai_o1-o4-mini',
|
|
48
|
+
OpenAI_o1 = 'openai_o1-o1',
|
|
49
|
+
OpenAI_o3 = 'openai_o1-o3',
|
|
50
|
+
Anthropic_Claude_Haiku = 'anthropic-claude-haiku',
|
|
51
|
+
Anthropic_Claude_Opus = 'anthropic-claude-opus',
|
|
52
|
+
Anthropic_Claude_Sonnet = 'anthropic-claude-sonnet',
|
|
53
|
+
'Anthropic_Claude_Sonnet_3.7' = 'anthropic-claude-3-7-sonnet-latest',
|
|
54
|
+
Anthropic_Claude_4_Sonnet = 'anthropic-claude-sonnet-4',
|
|
55
|
+
Anthropic_Claude_4_Opus = 'anthropic-claude-opus-4',
|
|
56
|
+
Mistral_Nemo = 'mistral-nemo',
|
|
57
|
+
Mistral_Large = 'mistral-large',
|
|
58
|
+
Mistral_Medium = 'mistral-mistral-medium-latest',
|
|
59
|
+
Mistral_Small = 'mistral-small',
|
|
60
|
+
Mistral_Codestral = 'mistral-codestral',
|
|
61
|
+
'Llama3.3_70B' = 'groq-llama-3.3-70b-versatile',
|
|
62
|
+
'Llama3.1_8B' = 'llama3.1-8b',
|
|
63
|
+
'Llama3.1_405B' = 'llama3.1-405b',
|
|
64
|
+
'Llama4_Scout' = 'groq-meta-llama/llama-4-scout-17b-16e-instruct',
|
|
65
|
+
Perplexity_Sonar = 'perplexity-sonar',
|
|
66
|
+
Perplexity_Sonar_Pro = 'perplexity-sonar-pro',
|
|
67
|
+
Perplexity_Sonar_Reasoning = 'perplexity-sonar-reasoning',
|
|
68
|
+
Perplexity_Sonar_Reasoning_Pro = 'perplexity-sonar-reasoning-pro',
|
|
69
|
+
DeepSeek_R1 = 'together-deepseek-ai/DeepSeek-R1',
|
|
70
|
+
DeepSeek_V3 = 'together-deepseek-ai/DeepSeek-V3',
|
|
71
|
+
'DeepSeek_R1_Distill_Llama_3.3_70B' = 'groq-deepseek-r1-distill-llama-70b',
|
|
72
|
+
'Google_Gemini_2.0_Flash' = 'google-gemini-2.0-flash',
|
|
73
|
+
'Google_Gemini_2.0_Flash_Thinking' = 'google-gemini-2.0-flash-thinking',
|
|
74
|
+
'Google_Gemini_2.5_Flash' = 'google-gemini-2.5-flash',
|
|
75
|
+
'Google_Gemini_2.5_Pro' = 'google-gemini-2.5-pro',
|
|
76
|
+
xAI_Grok_2 = 'xai-grok-2-latest',
|
|
77
|
+
xAI_Grok_3 = 'xai-grok-3',
|
|
78
|
+
xAI_Grok_3_Mini = 'xai-grok-3-mini',
|
|
79
|
+
// Deprecated models
|
|
80
|
+
'OpenAI_GPT3.5-turbo-instruct' = 'openai-gpt-4o-mini',
|
|
81
|
+
Llama2_70B = 'llama2-70b',
|
|
82
|
+
Perplexity_Sonar_Medium_Online = 'perplexity-sonar',
|
|
83
|
+
Perplexity_Sonar_Small_Online = 'perplexity-sonar',
|
|
84
|
+
Codellama_70B_instruct = 'codellama-70b-instruct',
|
|
85
|
+
Perplexity_Llama3_Sonar_Large = 'perplexity-sonar',
|
|
86
|
+
Perplexity_Llama3_Sonar_Small = 'perplexity-sonar',
|
|
87
|
+
'OpenAI_GPT3.5-turbo' = 'openai-gpt-4o-mini',
|
|
88
|
+
'Llama3.1_70B' = 'groq-llama-3.3-70b-versatile',
|
|
89
|
+
'Perplexity_Llama3.1_Sonar_Huge' = 'perplexity-sonar-pro',
|
|
90
|
+
'Perplexity_Llama3.1_Sonar_Large' = 'perplexity-sonar',
|
|
91
|
+
'Perplexity_Llama3.1_Sonar_Small' = 'perplexity-sonar',
|
|
92
|
+
'Mistral_Large2' = 'mistral-large',
|
|
93
|
+
'Groq_DeepSeek_R1_Distill_Llama_3.3_70B' = 'groq-deepseek-r1-distill-llama-70b',
|
|
94
|
+
'Together_DeepSeek_R1' = 'together-deepseek-ai/DeepSeek-R1',
|
|
95
|
+
'MixtraL_8x7B' = 'mistral-nemo',
|
|
96
|
+
'Google_Gemini_1.5_Flash' = 'google-gemini-1.5-flash',
|
|
97
|
+
'Google_Gemini_1.5_Pro' = 'google-gemini-2.0-flash',
|
|
98
|
+
Mixtral_8x7B = 'mistral-nemo',
|
|
99
|
+
'Qwen_2.5_32B' = 'openai-gpt-4o-mini',
|
|
100
|
+
'OpenAI_o1-preview' = 'openai_o1-o1',
|
|
101
|
+
'OpenAI_o1-mini' = 'openai_o1-o1-mini',
|
|
102
|
+
Llama3_70B = 'llama3-70b',
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export type __DeprecatedModelUnion =
|
|
106
|
+
| 'openai-gpt-3.5-turbo-instruct'
|
|
107
|
+
| 'openai-gpt-3.5-turbo'
|
|
108
|
+
| 'openai-gpt-4'
|
|
109
|
+
| 'openai-gpt-4-turbo'
|
|
110
|
+
| 'anthropic-claude-haiku'
|
|
111
|
+
| 'anthropic-claude-opus'
|
|
112
|
+
| 'anthropic-claude-sonnet'
|
|
113
|
+
| 'perplexity-sonar-medium-online'
|
|
114
|
+
| 'perplexity-sonar-small-online'
|
|
115
|
+
| 'llama2-70b'
|
|
116
|
+
| 'mixtral-8x7b'
|
|
117
|
+
| 'codellama-70b-instruct'
|
|
118
|
+
| 'gpt-3.5-turbo'
|
|
119
|
+
| 'gpt-3.5-turbo-instruct'
|
|
120
|
+
| 'gpt-4'
|
|
121
|
+
| 'text-davinci-003'
|
|
122
|
+
|
|
123
|
+
export type AskOptions = {
|
|
124
|
+
creativity?: Creativity
|
|
125
|
+
model?: Model | __DeprecatedModelUnion
|
|
126
|
+
signal?: AbortSignal
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
interface AskStream extends Promise<string> {
|
|
130
|
+
on(event: 'data', listener: (chunk: string) => void): void
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export function ask(prompt: string, options?: AskOptions): AskStream {
|
|
134
|
+
logger.log('AI.ask called', { prompt, options })
|
|
135
|
+
|
|
136
|
+
const emitter = new EventEmitter()
|
|
137
|
+
let result = ''
|
|
138
|
+
|
|
139
|
+
// TODO: Implement real AI integration
|
|
140
|
+
// This is a simulated response - in production, this should:
|
|
141
|
+
// 1. Connect to actual AI providers (OpenAI, Anthropic, etc.)
|
|
142
|
+
// 2. Use the specified model from options.model
|
|
143
|
+
// 3. Apply creativity/temperature settings from options.creativity
|
|
144
|
+
// 4. Handle proper streaming from the AI service
|
|
145
|
+
const simulateResponse = async () => {
|
|
146
|
+
const response = `I understand you're asking: "${prompt}". As a simulated AI in termcast, I cannot provide real AI responses. To use AI functionality, you would need to integrate with an actual AI service provider.`
|
|
147
|
+
|
|
148
|
+
// TODO: Replace with real streaming from AI provider
|
|
149
|
+
// Emit response in chunks to simulate streaming
|
|
150
|
+
const words = response.split(' ')
|
|
151
|
+
for (const word of words) {
|
|
152
|
+
if (options?.signal?.aborted) {
|
|
153
|
+
break
|
|
154
|
+
}
|
|
155
|
+
const chunk = word + ' '
|
|
156
|
+
result += chunk
|
|
157
|
+
emitter.emit('data', chunk)
|
|
158
|
+
await new Promise((resolve) => setTimeout(resolve, 50))
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
return result.trim()
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
const promise = simulateResponse()
|
|
165
|
+
|
|
166
|
+
// Create an object that is both a Promise and has an `on` method
|
|
167
|
+
const stream: AskStream = Object.assign(promise, {
|
|
168
|
+
on: (event: string, listener: (chunk: string) => void) => {
|
|
169
|
+
if (event === 'data') {
|
|
170
|
+
emitter.on('data', listener)
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
})
|
|
174
|
+
|
|
175
|
+
return stream
|
|
176
|
+
}
|
|
177
|
+
}
|