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,780 @@
|
|
|
1
|
+
import React, { useState } from 'react'
|
|
2
|
+
import { List } from 'termcast'
|
|
3
|
+
import { Action, ActionPanel } from 'termcast'
|
|
4
|
+
|
|
5
|
+
import { Clipboard } from 'termcast'
|
|
6
|
+
import { logger } from 'termcast'
|
|
7
|
+
import { Form } from 'termcast'
|
|
8
|
+
import { useNavigation } from 'termcast/src/internal/navigation'
|
|
9
|
+
import { environment } from 'termcast'
|
|
10
|
+
import {
|
|
11
|
+
renderWithProviders,
|
|
12
|
+
getApplications,
|
|
13
|
+
getDefaultApplication,
|
|
14
|
+
getFrontmostApplication,
|
|
15
|
+
showInFinder,
|
|
16
|
+
trash,
|
|
17
|
+
open,
|
|
18
|
+
captureException,
|
|
19
|
+
getPreferenceValues,
|
|
20
|
+
openExtensionPreferences,
|
|
21
|
+
openCommandPreferences,
|
|
22
|
+
closeMainWindow,
|
|
23
|
+
PopToRootType,
|
|
24
|
+
} from 'termcast'
|
|
25
|
+
import { confirmAlert, Alert } from 'termcast'
|
|
26
|
+
import { showToast, Toast, showHUD } from 'termcast'
|
|
27
|
+
import { Detail } from 'termcast'
|
|
28
|
+
import dedent from 'string-dedent'
|
|
29
|
+
|
|
30
|
+
function DetailExample(): any {
|
|
31
|
+
return (
|
|
32
|
+
<Detail
|
|
33
|
+
markdown={dedent`
|
|
34
|
+
# Simple Detail View
|
|
35
|
+
|
|
36
|
+
This is a basic **Detail** component showing markdown content.
|
|
37
|
+
|
|
38
|
+
- Item 1
|
|
39
|
+
- Item 2
|
|
40
|
+
- Item 3
|
|
41
|
+
`}
|
|
42
|
+
/>
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function FormExample(): any {
|
|
47
|
+
const handleFormSubmit = async (values: any) => {
|
|
48
|
+
await showToast({
|
|
49
|
+
style: Toast.Style.Success,
|
|
50
|
+
title: 'Form Submitted',
|
|
51
|
+
message: `Name: ${values.name || 'Not provided'}`,
|
|
52
|
+
})
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return (
|
|
56
|
+
<Form
|
|
57
|
+
actions={
|
|
58
|
+
<ActionPanel>
|
|
59
|
+
<Action.SubmitForm title='Submit' onSubmit={handleFormSubmit} />
|
|
60
|
+
</ActionPanel>
|
|
61
|
+
}
|
|
62
|
+
>
|
|
63
|
+
<Form.TextField
|
|
64
|
+
id='name'
|
|
65
|
+
title='Your Name'
|
|
66
|
+
placeholder='Enter your name'
|
|
67
|
+
info='This is just a demo form'
|
|
68
|
+
/>
|
|
69
|
+
</Form>
|
|
70
|
+
)
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function MiscellaneousExample(): any {
|
|
74
|
+
const [animatedToast, setAnimatedToast] = useState<Toast | null>(null)
|
|
75
|
+
const { push } = useNavigation()
|
|
76
|
+
|
|
77
|
+
const handleShowSuccessToast = async () => {
|
|
78
|
+
await showToast({
|
|
79
|
+
style: Toast.Style.Success,
|
|
80
|
+
title: 'Operation completed',
|
|
81
|
+
message: 'Your files have been uploaded',
|
|
82
|
+
})
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const handleShowErrorToast = async () => {
|
|
86
|
+
await showToast({
|
|
87
|
+
style: Toast.Style.Failure,
|
|
88
|
+
title: 'Operation failed',
|
|
89
|
+
message: 'Failed to upload files',
|
|
90
|
+
})
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const handleShowAnimatedToast = async () => {
|
|
94
|
+
const toast = await showToast({
|
|
95
|
+
style: Toast.Style.Animated,
|
|
96
|
+
title: 'Processing...',
|
|
97
|
+
message: 'Please wait while we process your request',
|
|
98
|
+
})
|
|
99
|
+
setAnimatedToast(toast)
|
|
100
|
+
|
|
101
|
+
setTimeout(() => {
|
|
102
|
+
toast.style = Toast.Style.Success
|
|
103
|
+
toast.title = 'Processing complete'
|
|
104
|
+
toast.message = 'Your request has been processed successfully'
|
|
105
|
+
setAnimatedToast(null)
|
|
106
|
+
}, 3000)
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
const handleShowToastWithActions = async () => {
|
|
110
|
+
await showToast({
|
|
111
|
+
style: Toast.Style.Success,
|
|
112
|
+
title: 'File uploaded',
|
|
113
|
+
message: 'document.pdf',
|
|
114
|
+
primaryAction: {
|
|
115
|
+
title: 'Open',
|
|
116
|
+
onAction: (toast) => {
|
|
117
|
+
toast.hide()
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
secondaryAction: {
|
|
121
|
+
title: 'Copy Path',
|
|
122
|
+
onAction: (toast) => {
|
|
123
|
+
toast.hide()
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
})
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
const handleCompleteAnimatedToast = () => {
|
|
130
|
+
if (animatedToast) {
|
|
131
|
+
animatedToast.style = Toast.Style.Success
|
|
132
|
+
animatedToast.title = 'Task completed'
|
|
133
|
+
animatedToast.message = 'All operations finished successfully'
|
|
134
|
+
setAnimatedToast(null)
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
const handleFailAnimatedToast = () => {
|
|
139
|
+
if (animatedToast) {
|
|
140
|
+
animatedToast.style = Toast.Style.Failure
|
|
141
|
+
animatedToast.title = 'Task failed'
|
|
142
|
+
animatedToast.message = 'An error occurred during processing'
|
|
143
|
+
setAnimatedToast(null)
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
const handleShowAlert = async () => {
|
|
148
|
+
const confirmed = await confirmAlert({
|
|
149
|
+
title: 'Delete Item?',
|
|
150
|
+
message: 'This action cannot be undone.',
|
|
151
|
+
primaryAction: {
|
|
152
|
+
title: 'Delete',
|
|
153
|
+
style: Alert.ActionStyle.Destructive,
|
|
154
|
+
onAction: () => {},
|
|
155
|
+
},
|
|
156
|
+
dismissAction: {
|
|
157
|
+
title: 'Cancel',
|
|
158
|
+
style: Alert.ActionStyle.Cancel,
|
|
159
|
+
},
|
|
160
|
+
})
|
|
161
|
+
|
|
162
|
+
if (confirmed) {
|
|
163
|
+
await showToast({
|
|
164
|
+
style: Toast.Style.Success,
|
|
165
|
+
title: 'Item deleted',
|
|
166
|
+
})
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
const handleShowRememberAlert = async () => {
|
|
171
|
+
const confirmed = await confirmAlert({
|
|
172
|
+
title: 'Enable notifications?',
|
|
173
|
+
message: "We'll send you important updates about your account.",
|
|
174
|
+
primaryAction: {
|
|
175
|
+
title: 'Enable',
|
|
176
|
+
style: Alert.ActionStyle.Default,
|
|
177
|
+
},
|
|
178
|
+
dismissAction: {
|
|
179
|
+
title: 'Not now',
|
|
180
|
+
style: Alert.ActionStyle.Cancel,
|
|
181
|
+
},
|
|
182
|
+
rememberUserChoice: true,
|
|
183
|
+
})
|
|
184
|
+
|
|
185
|
+
if (confirmed) {
|
|
186
|
+
await showToast({
|
|
187
|
+
style: Toast.Style.Success,
|
|
188
|
+
title: 'Notifications enabled',
|
|
189
|
+
})
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
return (
|
|
194
|
+
<List>
|
|
195
|
+
<List.Section title='Toast Examples'>
|
|
196
|
+
<List.Item
|
|
197
|
+
title='Show Success Toast'
|
|
198
|
+
subtitle='Display a success message'
|
|
199
|
+
actions={
|
|
200
|
+
<ActionPanel>
|
|
201
|
+
<Action title='Show Toast' onAction={handleShowSuccessToast} />
|
|
202
|
+
</ActionPanel>
|
|
203
|
+
}
|
|
204
|
+
/>
|
|
205
|
+
|
|
206
|
+
<List.Item
|
|
207
|
+
title='Show Error Toast'
|
|
208
|
+
subtitle='Display an error message'
|
|
209
|
+
actions={
|
|
210
|
+
<ActionPanel>
|
|
211
|
+
<Action title='Show Toast' onAction={handleShowErrorToast} />
|
|
212
|
+
</ActionPanel>
|
|
213
|
+
}
|
|
214
|
+
/>
|
|
215
|
+
|
|
216
|
+
<List.Item
|
|
217
|
+
title='Show Animated Toast'
|
|
218
|
+
subtitle='Display a loading toast that can be updated'
|
|
219
|
+
actions={
|
|
220
|
+
<ActionPanel>
|
|
221
|
+
<Action title='Show Toast' onAction={handleShowAnimatedToast} />
|
|
222
|
+
{animatedToast && (
|
|
223
|
+
<>
|
|
224
|
+
<Action
|
|
225
|
+
title='Complete Task'
|
|
226
|
+
onAction={handleCompleteAnimatedToast}
|
|
227
|
+
/>
|
|
228
|
+
<Action
|
|
229
|
+
title='Fail Task'
|
|
230
|
+
onAction={handleFailAnimatedToast}
|
|
231
|
+
/>
|
|
232
|
+
</>
|
|
233
|
+
)}
|
|
234
|
+
</ActionPanel>
|
|
235
|
+
}
|
|
236
|
+
/>
|
|
237
|
+
|
|
238
|
+
<List.Item
|
|
239
|
+
title='Show Toast with Actions'
|
|
240
|
+
subtitle='Display a toast with interactive buttons'
|
|
241
|
+
actions={
|
|
242
|
+
<ActionPanel>
|
|
243
|
+
<Action
|
|
244
|
+
title='Show Toast'
|
|
245
|
+
onAction={handleShowToastWithActions}
|
|
246
|
+
/>
|
|
247
|
+
</ActionPanel>
|
|
248
|
+
}
|
|
249
|
+
/>
|
|
250
|
+
|
|
251
|
+
<List.Item
|
|
252
|
+
title='Show HUD'
|
|
253
|
+
subtitle='Display a compact HUD message'
|
|
254
|
+
actions={
|
|
255
|
+
<ActionPanel>
|
|
256
|
+
<Action
|
|
257
|
+
title='Show HUD'
|
|
258
|
+
onAction={async () => {
|
|
259
|
+
await showHUD('Operation completed successfully!')
|
|
260
|
+
}}
|
|
261
|
+
/>
|
|
262
|
+
</ActionPanel>
|
|
263
|
+
}
|
|
264
|
+
/>
|
|
265
|
+
</List.Section>
|
|
266
|
+
|
|
267
|
+
<List.Section title='Alert Examples'>
|
|
268
|
+
<List.Item
|
|
269
|
+
title='Show Confirm Alert'
|
|
270
|
+
subtitle='Display a confirmation dialog'
|
|
271
|
+
actions={
|
|
272
|
+
<ActionPanel>
|
|
273
|
+
<Action title='Show Alert' onAction={handleShowAlert} />
|
|
274
|
+
</ActionPanel>
|
|
275
|
+
}
|
|
276
|
+
/>
|
|
277
|
+
|
|
278
|
+
<List.Item
|
|
279
|
+
title='Show Alert with Remember Choice'
|
|
280
|
+
subtitle="Alert that remembers user's decision"
|
|
281
|
+
actions={
|
|
282
|
+
<ActionPanel>
|
|
283
|
+
<Action title='Show Alert' onAction={handleShowRememberAlert} />
|
|
284
|
+
</ActionPanel>
|
|
285
|
+
}
|
|
286
|
+
/>
|
|
287
|
+
</List.Section>
|
|
288
|
+
|
|
289
|
+
<List.Section title='Clipboard Examples'>
|
|
290
|
+
<List.Item
|
|
291
|
+
title='Copy Text to Clipboard'
|
|
292
|
+
subtitle='Copy a sample text to clipboard'
|
|
293
|
+
actions={
|
|
294
|
+
<ActionPanel>
|
|
295
|
+
<Action
|
|
296
|
+
title='Copy Text'
|
|
297
|
+
onAction={async () => {
|
|
298
|
+
await Clipboard.copy('Hello from Termcast!')
|
|
299
|
+
await showToast({
|
|
300
|
+
style: Toast.Style.Success,
|
|
301
|
+
title: 'Copied to clipboard',
|
|
302
|
+
message: 'Hello from Termcast!',
|
|
303
|
+
})
|
|
304
|
+
}}
|
|
305
|
+
/>
|
|
306
|
+
</ActionPanel>
|
|
307
|
+
}
|
|
308
|
+
/>
|
|
309
|
+
|
|
310
|
+
<List.Item
|
|
311
|
+
title='Copy Concealed Text'
|
|
312
|
+
subtitle='Copy sensitive data without showing in history'
|
|
313
|
+
actions={
|
|
314
|
+
<ActionPanel>
|
|
315
|
+
<Action
|
|
316
|
+
title='Copy Secret'
|
|
317
|
+
onAction={async () => {
|
|
318
|
+
await Clipboard.copy('SecretPassword123', {
|
|
319
|
+
concealed: true,
|
|
320
|
+
})
|
|
321
|
+
await showToast({
|
|
322
|
+
style: Toast.Style.Success,
|
|
323
|
+
title: 'Copied securely',
|
|
324
|
+
message: 'Password copied (concealed)',
|
|
325
|
+
})
|
|
326
|
+
}}
|
|
327
|
+
/>
|
|
328
|
+
</ActionPanel>
|
|
329
|
+
}
|
|
330
|
+
/>
|
|
331
|
+
|
|
332
|
+
<List.Item
|
|
333
|
+
title='Read from Clipboard'
|
|
334
|
+
subtitle='Read the current clipboard content'
|
|
335
|
+
actions={
|
|
336
|
+
<ActionPanel>
|
|
337
|
+
<Action
|
|
338
|
+
title='Read Clipboard'
|
|
339
|
+
onAction={async () => {
|
|
340
|
+
const text = await Clipboard.readText()
|
|
341
|
+
await showToast({
|
|
342
|
+
style: Toast.Style.Success,
|
|
343
|
+
title: 'Clipboard content',
|
|
344
|
+
message: text || '(empty)',
|
|
345
|
+
})
|
|
346
|
+
}}
|
|
347
|
+
/>
|
|
348
|
+
</ActionPanel>
|
|
349
|
+
}
|
|
350
|
+
/>
|
|
351
|
+
|
|
352
|
+
<List.Item
|
|
353
|
+
title='Clear Clipboard'
|
|
354
|
+
subtitle='Clear the clipboard content'
|
|
355
|
+
actions={
|
|
356
|
+
<ActionPanel>
|
|
357
|
+
<Action
|
|
358
|
+
title='Clear'
|
|
359
|
+
onAction={async () => {
|
|
360
|
+
await Clipboard.clear()
|
|
361
|
+
await showToast({
|
|
362
|
+
style: Toast.Style.Success,
|
|
363
|
+
title: 'Clipboard cleared',
|
|
364
|
+
})
|
|
365
|
+
}}
|
|
366
|
+
/>
|
|
367
|
+
</ActionPanel>
|
|
368
|
+
}
|
|
369
|
+
/>
|
|
370
|
+
|
|
371
|
+
<List.Item
|
|
372
|
+
title='Paste Text'
|
|
373
|
+
subtitle='Paste text to the frontmost application'
|
|
374
|
+
actions={
|
|
375
|
+
<ActionPanel>
|
|
376
|
+
<Action
|
|
377
|
+
title='Paste'
|
|
378
|
+
onAction={async () => {
|
|
379
|
+
await Clipboard.paste('Pasted from Termcast!')
|
|
380
|
+
await showToast({
|
|
381
|
+
style: Toast.Style.Success,
|
|
382
|
+
title: 'Text pasted',
|
|
383
|
+
})
|
|
384
|
+
}}
|
|
385
|
+
/>
|
|
386
|
+
</ActionPanel>
|
|
387
|
+
}
|
|
388
|
+
/>
|
|
389
|
+
|
|
390
|
+
<List.Item
|
|
391
|
+
title='Copy File to Clipboard'
|
|
392
|
+
subtitle='Copy a file (package.json) to clipboard'
|
|
393
|
+
actions={
|
|
394
|
+
<ActionPanel>
|
|
395
|
+
<Action
|
|
396
|
+
title='Copy File'
|
|
397
|
+
onAction={async () => {
|
|
398
|
+
try {
|
|
399
|
+
await Clipboard.copy({
|
|
400
|
+
file: 'package.json',
|
|
401
|
+
})
|
|
402
|
+
await showToast({
|
|
403
|
+
style: Toast.Style.Success,
|
|
404
|
+
title: 'File copied',
|
|
405
|
+
message: 'package.json',
|
|
406
|
+
})
|
|
407
|
+
} catch (error) {
|
|
408
|
+
await showToast({
|
|
409
|
+
style: Toast.Style.Failure,
|
|
410
|
+
title: 'Failed to copy file',
|
|
411
|
+
message: String(error),
|
|
412
|
+
})
|
|
413
|
+
}
|
|
414
|
+
}}
|
|
415
|
+
/>
|
|
416
|
+
</ActionPanel>
|
|
417
|
+
}
|
|
418
|
+
/>
|
|
419
|
+
|
|
420
|
+
<List.Item
|
|
421
|
+
title='Read Full Clipboard'
|
|
422
|
+
subtitle='Read text and file from clipboard'
|
|
423
|
+
actions={
|
|
424
|
+
<ActionPanel>
|
|
425
|
+
<Action
|
|
426
|
+
title='Read All'
|
|
427
|
+
onAction={async () => {
|
|
428
|
+
const { text, file } = await Clipboard.read()
|
|
429
|
+
await showToast({
|
|
430
|
+
style: Toast.Style.Success,
|
|
431
|
+
title: 'Clipboard content',
|
|
432
|
+
message: file
|
|
433
|
+
? `File: ${file}`
|
|
434
|
+
: `Text: ${text?.slice(0, 50) || '(empty)'}`,
|
|
435
|
+
})
|
|
436
|
+
}}
|
|
437
|
+
/>
|
|
438
|
+
</ActionPanel>
|
|
439
|
+
}
|
|
440
|
+
/>
|
|
441
|
+
</List.Section>
|
|
442
|
+
|
|
443
|
+
<List.Section title='Form Examples'>
|
|
444
|
+
<List.Item
|
|
445
|
+
title='Show Simple Form'
|
|
446
|
+
subtitle='Display a form with text field'
|
|
447
|
+
actions={
|
|
448
|
+
<ActionPanel>
|
|
449
|
+
<Action
|
|
450
|
+
title='Open Form'
|
|
451
|
+
onAction={() => push(<FormExample />)}
|
|
452
|
+
/>
|
|
453
|
+
</ActionPanel>
|
|
454
|
+
}
|
|
455
|
+
/>
|
|
456
|
+
|
|
457
|
+
<List.Item
|
|
458
|
+
title='Show Detail View'
|
|
459
|
+
subtitle='Display a markdown detail view'
|
|
460
|
+
actions={
|
|
461
|
+
<ActionPanel>
|
|
462
|
+
<Action
|
|
463
|
+
title='Open Detail'
|
|
464
|
+
onAction={() => push(<DetailExample />)}
|
|
465
|
+
/>
|
|
466
|
+
</ActionPanel>
|
|
467
|
+
}
|
|
468
|
+
/>
|
|
469
|
+
</List.Section>
|
|
470
|
+
|
|
471
|
+
<List.Section title='Environment'>
|
|
472
|
+
<List.Item
|
|
473
|
+
title='Show Environment Info'
|
|
474
|
+
subtitle={`Theme: ${environment.appearance}, Dev mode: ${environment.isDevelopment}`}
|
|
475
|
+
actions={
|
|
476
|
+
<ActionPanel>
|
|
477
|
+
<Action
|
|
478
|
+
title='Show Info'
|
|
479
|
+
onAction={async () => {
|
|
480
|
+
await showToast({
|
|
481
|
+
style: Toast.Style.Success,
|
|
482
|
+
title: 'Environment',
|
|
483
|
+
message: `Extension: ${environment.extensionName}, Raycast: ${environment.raycastVersion}`,
|
|
484
|
+
})
|
|
485
|
+
}}
|
|
486
|
+
/>
|
|
487
|
+
</ActionPanel>
|
|
488
|
+
}
|
|
489
|
+
/>
|
|
490
|
+
</List.Section>
|
|
491
|
+
|
|
492
|
+
<List.Section title='Preferences'>
|
|
493
|
+
<List.Item
|
|
494
|
+
title='Get Preference Values'
|
|
495
|
+
subtitle='Access preference values for the current command'
|
|
496
|
+
actions={
|
|
497
|
+
<ActionPanel>
|
|
498
|
+
<Action
|
|
499
|
+
title='Get Preferences'
|
|
500
|
+
onAction={async () => {
|
|
501
|
+
const preferences = getPreferenceValues()
|
|
502
|
+
await showToast({
|
|
503
|
+
style: Toast.Style.Success,
|
|
504
|
+
title: 'Preferences',
|
|
505
|
+
message:
|
|
506
|
+
Object.keys(preferences).length > 0
|
|
507
|
+
? JSON.stringify(preferences)
|
|
508
|
+
: 'No preferences configured',
|
|
509
|
+
})
|
|
510
|
+
}}
|
|
511
|
+
/>
|
|
512
|
+
</ActionPanel>
|
|
513
|
+
}
|
|
514
|
+
/>
|
|
515
|
+
|
|
516
|
+
<List.Item
|
|
517
|
+
title='Open Extension Preferences'
|
|
518
|
+
subtitle='Open preferences for the current extension'
|
|
519
|
+
actions={
|
|
520
|
+
<ActionPanel>
|
|
521
|
+
<Action
|
|
522
|
+
title='Open Preferences'
|
|
523
|
+
onAction={async () => {
|
|
524
|
+
try {
|
|
525
|
+
await openExtensionPreferences()
|
|
526
|
+
} catch (error) {
|
|
527
|
+
await showToast({
|
|
528
|
+
style: Toast.Style.Failure,
|
|
529
|
+
title: 'Error',
|
|
530
|
+
message: String(error),
|
|
531
|
+
})
|
|
532
|
+
}
|
|
533
|
+
}}
|
|
534
|
+
/>
|
|
535
|
+
</ActionPanel>
|
|
536
|
+
}
|
|
537
|
+
/>
|
|
538
|
+
|
|
539
|
+
<List.Item
|
|
540
|
+
title='Open Command Preferences'
|
|
541
|
+
subtitle='Open preferences for the current command'
|
|
542
|
+
actions={
|
|
543
|
+
<ActionPanel>
|
|
544
|
+
<Action
|
|
545
|
+
title='Open Preferences'
|
|
546
|
+
onAction={async () => {
|
|
547
|
+
try {
|
|
548
|
+
await openCommandPreferences()
|
|
549
|
+
} catch (error) {
|
|
550
|
+
await showToast({
|
|
551
|
+
style: Toast.Style.Failure,
|
|
552
|
+
title: 'Error',
|
|
553
|
+
message: String(error),
|
|
554
|
+
})
|
|
555
|
+
}
|
|
556
|
+
}}
|
|
557
|
+
/>
|
|
558
|
+
</ActionPanel>
|
|
559
|
+
}
|
|
560
|
+
/>
|
|
561
|
+
</List.Section>
|
|
562
|
+
|
|
563
|
+
<List.Section title='System Utilities'>
|
|
564
|
+
<List.Item
|
|
565
|
+
title='Get All Applications'
|
|
566
|
+
subtitle='List all installed applications'
|
|
567
|
+
actions={
|
|
568
|
+
<ActionPanel>
|
|
569
|
+
<Action
|
|
570
|
+
title='Get Apps'
|
|
571
|
+
onAction={async () => {
|
|
572
|
+
const apps = await getApplications()
|
|
573
|
+
await showToast({
|
|
574
|
+
style: Toast.Style.Success,
|
|
575
|
+
title: 'Applications found',
|
|
576
|
+
message: `${apps.length} apps: ${apps.map((a) => a.name).join(', ')}`,
|
|
577
|
+
})
|
|
578
|
+
}}
|
|
579
|
+
/>
|
|
580
|
+
</ActionPanel>
|
|
581
|
+
}
|
|
582
|
+
/>
|
|
583
|
+
|
|
584
|
+
<List.Item
|
|
585
|
+
title='Get Default Application'
|
|
586
|
+
subtitle='Get default app for a file'
|
|
587
|
+
actions={
|
|
588
|
+
<ActionPanel>
|
|
589
|
+
<Action
|
|
590
|
+
title='Get Default'
|
|
591
|
+
onAction={async () => {
|
|
592
|
+
const app = await getDefaultApplication('/Users/test.txt')
|
|
593
|
+
await showToast({
|
|
594
|
+
style: Toast.Style.Success,
|
|
595
|
+
title: 'Default app',
|
|
596
|
+
message: app.name,
|
|
597
|
+
})
|
|
598
|
+
}}
|
|
599
|
+
/>
|
|
600
|
+
</ActionPanel>
|
|
601
|
+
}
|
|
602
|
+
/>
|
|
603
|
+
|
|
604
|
+
<List.Item
|
|
605
|
+
title='Get Frontmost Application'
|
|
606
|
+
subtitle='Get currently active app'
|
|
607
|
+
actions={
|
|
608
|
+
<ActionPanel>
|
|
609
|
+
<Action
|
|
610
|
+
title='Get Frontmost'
|
|
611
|
+
onAction={async () => {
|
|
612
|
+
const app = await getFrontmostApplication()
|
|
613
|
+
await showToast({
|
|
614
|
+
style: Toast.Style.Success,
|
|
615
|
+
title: 'Frontmost app',
|
|
616
|
+
message: app.name,
|
|
617
|
+
})
|
|
618
|
+
}}
|
|
619
|
+
/>
|
|
620
|
+
</ActionPanel>
|
|
621
|
+
}
|
|
622
|
+
/>
|
|
623
|
+
|
|
624
|
+
<List.Item
|
|
625
|
+
title='Show in Finder'
|
|
626
|
+
subtitle='Reveal a file in Finder'
|
|
627
|
+
actions={
|
|
628
|
+
<ActionPanel>
|
|
629
|
+
<Action
|
|
630
|
+
title='Show File'
|
|
631
|
+
onAction={async () => {
|
|
632
|
+
await showInFinder('package.json')
|
|
633
|
+
await showToast({
|
|
634
|
+
style: Toast.Style.Success,
|
|
635
|
+
title: 'Opened in Finder',
|
|
636
|
+
})
|
|
637
|
+
}}
|
|
638
|
+
/>
|
|
639
|
+
</ActionPanel>
|
|
640
|
+
}
|
|
641
|
+
/>
|
|
642
|
+
|
|
643
|
+
<List.Item
|
|
644
|
+
title='Show in Finder (Action Component)'
|
|
645
|
+
subtitle='Use Action.ShowInFinder to reveal package.json'
|
|
646
|
+
actions={
|
|
647
|
+
<ActionPanel>
|
|
648
|
+
<Action.ShowInFinder
|
|
649
|
+
path='package.json'
|
|
650
|
+
title='Reveal in Finder'
|
|
651
|
+
icon='📁'
|
|
652
|
+
shortcut={{
|
|
653
|
+
modifiers: ['cmd', 'shift'],
|
|
654
|
+
key: 'r',
|
|
655
|
+
}}
|
|
656
|
+
onShow={(path) => {
|
|
657
|
+
logger.log(`Showing ${path} in Finder`)
|
|
658
|
+
}}
|
|
659
|
+
/>
|
|
660
|
+
</ActionPanel>
|
|
661
|
+
}
|
|
662
|
+
/>
|
|
663
|
+
|
|
664
|
+
<List.Item
|
|
665
|
+
title='Move to Trash'
|
|
666
|
+
subtitle='Move a file to trash'
|
|
667
|
+
actions={
|
|
668
|
+
<ActionPanel>
|
|
669
|
+
<Action
|
|
670
|
+
title='Trash File'
|
|
671
|
+
onAction={async () => {
|
|
672
|
+
await trash('/tmp/test.txt')
|
|
673
|
+
await showToast({
|
|
674
|
+
style: Toast.Style.Success,
|
|
675
|
+
title: 'Moved to trash',
|
|
676
|
+
})
|
|
677
|
+
}}
|
|
678
|
+
/>
|
|
679
|
+
</ActionPanel>
|
|
680
|
+
}
|
|
681
|
+
/>
|
|
682
|
+
|
|
683
|
+
<List.Item
|
|
684
|
+
title='Open File or URL'
|
|
685
|
+
subtitle='Open with default or specific app'
|
|
686
|
+
actions={
|
|
687
|
+
<ActionPanel>
|
|
688
|
+
<Action
|
|
689
|
+
title='Open URL'
|
|
690
|
+
onAction={async () => {
|
|
691
|
+
await open('https://raycast.com')
|
|
692
|
+
await showToast({
|
|
693
|
+
style: Toast.Style.Success,
|
|
694
|
+
title: 'Opening URL',
|
|
695
|
+
})
|
|
696
|
+
}}
|
|
697
|
+
/>
|
|
698
|
+
</ActionPanel>
|
|
699
|
+
}
|
|
700
|
+
/>
|
|
701
|
+
|
|
702
|
+
<List.Item
|
|
703
|
+
title='Capture Exception'
|
|
704
|
+
subtitle='Test error reporting'
|
|
705
|
+
actions={
|
|
706
|
+
<ActionPanel>
|
|
707
|
+
<Action
|
|
708
|
+
title='Throw Error'
|
|
709
|
+
onAction={() => {
|
|
710
|
+
try {
|
|
711
|
+
throw new Error('Test exception')
|
|
712
|
+
} catch (e) {
|
|
713
|
+
captureException(e)
|
|
714
|
+
showToast({
|
|
715
|
+
style: Toast.Style.Failure,
|
|
716
|
+
title: 'Exception captured',
|
|
717
|
+
})
|
|
718
|
+
}
|
|
719
|
+
}}
|
|
720
|
+
/>
|
|
721
|
+
</ActionPanel>
|
|
722
|
+
}
|
|
723
|
+
/>
|
|
724
|
+
</List.Section>
|
|
725
|
+
|
|
726
|
+
<List.Section title='Window Management'>
|
|
727
|
+
<List.Item
|
|
728
|
+
title='Close Main Window'
|
|
729
|
+
subtitle='Close window and switch to previous app'
|
|
730
|
+
actions={
|
|
731
|
+
<ActionPanel>
|
|
732
|
+
<Action
|
|
733
|
+
title='Close Window'
|
|
734
|
+
onAction={async () => {
|
|
735
|
+
await closeMainWindow()
|
|
736
|
+
}}
|
|
737
|
+
/>
|
|
738
|
+
</ActionPanel>
|
|
739
|
+
}
|
|
740
|
+
/>
|
|
741
|
+
|
|
742
|
+
<List.Item
|
|
743
|
+
title='Close Window with Clear Search'
|
|
744
|
+
subtitle='Close and clear root search'
|
|
745
|
+
actions={
|
|
746
|
+
<ActionPanel>
|
|
747
|
+
<Action
|
|
748
|
+
title='Close & Clear'
|
|
749
|
+
onAction={async () => {
|
|
750
|
+
await closeMainWindow({
|
|
751
|
+
clearRootSearch: true,
|
|
752
|
+
})
|
|
753
|
+
}}
|
|
754
|
+
/>
|
|
755
|
+
</ActionPanel>
|
|
756
|
+
}
|
|
757
|
+
/>
|
|
758
|
+
|
|
759
|
+
<List.Item
|
|
760
|
+
title='Close Window (Suspended)'
|
|
761
|
+
subtitle='Close without popping to root'
|
|
762
|
+
actions={
|
|
763
|
+
<ActionPanel>
|
|
764
|
+
<Action
|
|
765
|
+
title='Close Suspended'
|
|
766
|
+
onAction={async () => {
|
|
767
|
+
await closeMainWindow({
|
|
768
|
+
popToRootType: PopToRootType.Suspended,
|
|
769
|
+
})
|
|
770
|
+
}}
|
|
771
|
+
/>
|
|
772
|
+
</ActionPanel>
|
|
773
|
+
}
|
|
774
|
+
/>
|
|
775
|
+
</List.Section>
|
|
776
|
+
</List>
|
|
777
|
+
)
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
renderWithProviders(<MiscellaneousExample />)
|