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.
Files changed (699) hide show
  1. package/dist/action-utils.d.ts +25 -0
  2. package/dist/action-utils.d.ts.map +1 -0
  3. package/dist/action-utils.js +209 -0
  4. package/dist/action-utils.js.map +1 -0
  5. package/dist/ai.d.ts +104 -0
  6. package/dist/ai.d.ts.map +1 -0
  7. package/dist/ai.js +135 -0
  8. package/dist/ai.js.map +1 -0
  9. package/dist/apis/ai.d.ts +104 -0
  10. package/dist/apis/ai.d.ts.map +1 -0
  11. package/dist/apis/ai.js +135 -0
  12. package/dist/apis/ai.js.map +1 -0
  13. package/dist/apis/cache.d.ts +84 -0
  14. package/dist/apis/cache.d.ts.map +1 -0
  15. package/dist/apis/cache.js +307 -0
  16. package/dist/apis/cache.js.map +1 -0
  17. package/dist/apis/cache.test.d.ts +2 -0
  18. package/dist/apis/cache.test.d.ts.map +1 -0
  19. package/dist/apis/cache.test.js +246 -0
  20. package/dist/apis/cache.test.js.map +1 -0
  21. package/dist/apis/clipboard.d.ts +36 -0
  22. package/dist/apis/clipboard.d.ts.map +1 -0
  23. package/dist/apis/clipboard.js +154 -0
  24. package/dist/apis/clipboard.js.map +1 -0
  25. package/dist/apis/environment.d.ts +63 -0
  26. package/dist/apis/environment.d.ts.map +1 -0
  27. package/dist/apis/environment.js +189 -0
  28. package/dist/apis/environment.js.map +1 -0
  29. package/dist/apis/hud.d.ts +7 -0
  30. package/dist/apis/hud.d.ts.map +1 -0
  31. package/dist/apis/hud.js +45 -0
  32. package/dist/apis/hud.js.map +1 -0
  33. package/dist/apis/localstorage.d.ts +13 -0
  34. package/dist/apis/localstorage.d.ts.map +1 -0
  35. package/dist/apis/localstorage.js +190 -0
  36. package/dist/apis/localstorage.js.map +1 -0
  37. package/dist/apis/localstorage.test.d.ts +2 -0
  38. package/dist/apis/localstorage.test.d.ts.map +1 -0
  39. package/dist/apis/localstorage.test.js +131 -0
  40. package/dist/apis/localstorage.test.js.map +1 -0
  41. package/dist/apis/oauth.d.ts +142 -0
  42. package/dist/apis/oauth.d.ts.map +1 -0
  43. package/dist/apis/oauth.js +551 -0
  44. package/dist/apis/oauth.js.map +1 -0
  45. package/dist/apis/preferences.d.ts +23 -0
  46. package/dist/apis/preferences.d.ts.map +1 -0
  47. package/dist/apis/preferences.js +105 -0
  48. package/dist/apis/preferences.js.map +1 -0
  49. package/dist/apis/toast.d.ts +81 -0
  50. package/dist/apis/toast.d.ts.map +1 -0
  51. package/dist/apis/toast.js +275 -0
  52. package/dist/apis/toast.js.map +1 -0
  53. package/dist/apis/toast.test.d.ts +2 -0
  54. package/dist/apis/toast.test.d.ts.map +1 -0
  55. package/dist/apis/toast.test.js +67 -0
  56. package/dist/apis/toast.test.js.map +1 -0
  57. package/dist/apis/window.d.ts +12 -0
  58. package/dist/apis/window.d.ts.map +1 -0
  59. package/dist/apis/window.js +47 -0
  60. package/dist/apis/window.js.map +1 -0
  61. package/dist/build.d.ts +15 -0
  62. package/dist/build.d.ts.map +1 -0
  63. package/dist/build.js +213 -0
  64. package/dist/build.js.map +1 -0
  65. package/dist/build.test.d.ts +2 -0
  66. package/dist/build.test.d.ts.map +1 -0
  67. package/dist/build.test.js +73 -0
  68. package/dist/build.test.js.map +1 -0
  69. package/dist/cache.d.ts +32 -0
  70. package/dist/cache.d.ts.map +1 -0
  71. package/dist/cache.js +205 -0
  72. package/dist/cache.js.map +1 -0
  73. package/dist/cache.test.d.ts +2 -0
  74. package/dist/cache.test.d.ts.map +1 -0
  75. package/dist/cache.test.js +246 -0
  76. package/dist/cache.test.js.map +1 -0
  77. package/dist/cli.d.ts +2 -0
  78. package/dist/cli.d.ts.map +1 -0
  79. package/dist/cli.js +278 -0
  80. package/dist/cli.js.map +1 -0
  81. package/dist/clipboard.d.ts +36 -0
  82. package/dist/clipboard.d.ts.map +1 -0
  83. package/dist/clipboard.js +154 -0
  84. package/dist/clipboard.js.map +1 -0
  85. package/dist/colors.d.ts +15 -0
  86. package/dist/colors.d.ts.map +1 -0
  87. package/dist/colors.js +13 -0
  88. package/dist/colors.js.map +1 -0
  89. package/dist/components/actions.d.ts +120 -0
  90. package/dist/components/actions.d.ts.map +1 -0
  91. package/dist/components/actions.js +371 -0
  92. package/dist/components/actions.js.map +1 -0
  93. package/dist/components/alert.d.ts +25 -0
  94. package/dist/components/alert.d.ts.map +1 -0
  95. package/dist/components/alert.js +99 -0
  96. package/dist/components/alert.js.map +1 -0
  97. package/dist/components/detail.d.ts +65 -0
  98. package/dist/components/detail.d.ts.map +1 -0
  99. package/dist/components/detail.js +147 -0
  100. package/dist/components/detail.js.map +1 -0
  101. package/dist/components/dropdown.d.ts +40 -0
  102. package/dist/components/dropdown.d.ts.map +1 -0
  103. package/dist/components/dropdown.js +202 -0
  104. package/dist/components/dropdown.js.map +1 -0
  105. package/dist/components/extension-preferences.d.ts +8 -0
  106. package/dist/components/extension-preferences.d.ts.map +1 -0
  107. package/dist/components/extension-preferences.js +139 -0
  108. package/dist/components/extension-preferences.js.map +1 -0
  109. package/dist/components/form/assign-components.d.ts +2 -0
  110. package/dist/components/form/assign-components.d.ts.map +1 -0
  111. package/dist/components/form/assign-components.js +22 -0
  112. package/dist/components/form/assign-components.js.map +1 -0
  113. package/dist/components/form/checkbox.d.ts +7 -0
  114. package/dist/components/form/checkbox.d.ts.map +1 -0
  115. package/dist/components/form/checkbox.js +46 -0
  116. package/dist/components/form/checkbox.js.map +1 -0
  117. package/dist/components/form/date-picker.d.ts +18 -0
  118. package/dist/components/form/date-picker.d.ts.map +1 -0
  119. package/dist/components/form/date-picker.js +69 -0
  120. package/dist/components/form/date-picker.js.map +1 -0
  121. package/dist/components/form/description.d.ts +7 -0
  122. package/dist/components/form/description.d.ts.map +1 -0
  123. package/dist/components/form/description.js +8 -0
  124. package/dist/components/form/description.js.map +1 -0
  125. package/dist/components/form/dropdown.d.ts +25 -0
  126. package/dist/components/form/dropdown.d.ts.map +1 -0
  127. package/dist/components/form/dropdown.js +286 -0
  128. package/dist/components/form/dropdown.js.map +1 -0
  129. package/dist/components/form/file-autocomplete.d.ts +12 -0
  130. package/dist/components/form/file-autocomplete.d.ts.map +1 -0
  131. package/dist/components/form/file-autocomplete.js +84 -0
  132. package/dist/components/form/file-autocomplete.js.map +1 -0
  133. package/dist/components/form/file-picker.d.ts +31 -0
  134. package/dist/components/form/file-picker.d.ts.map +1 -0
  135. package/dist/components/form/file-picker.js +113 -0
  136. package/dist/components/form/file-picker.js.map +1 -0
  137. package/dist/components/form/form-end.d.ts +2 -0
  138. package/dist/components/form/form-end.d.ts.map +1 -0
  139. package/dist/components/form/form-end.js +6 -0
  140. package/dist/components/form/form-end.js.map +1 -0
  141. package/dist/components/form/form-type-only.d.ts +174 -0
  142. package/dist/components/form/form-type-only.d.ts.map +1 -0
  143. package/dist/components/form/form-type-only.js +2 -0
  144. package/dist/components/form/form-type-only.js.map +1 -0
  145. package/dist/components/form/index.d.ts +46 -0
  146. package/dist/components/form/index.d.ts.map +1 -0
  147. package/dist/components/form/index.js +106 -0
  148. package/dist/components/form/index.js.map +1 -0
  149. package/dist/components/form/password-field.d.ts +7 -0
  150. package/dist/components/form/password-field.d.ts.map +1 -0
  151. package/dist/components/form/password-field.js +34 -0
  152. package/dist/components/form/password-field.js.map +1 -0
  153. package/dist/components/form/separator.d.ts +2 -0
  154. package/dist/components/form/separator.d.ts.map +1 -0
  155. package/dist/components/form/separator.js +8 -0
  156. package/dist/components/form/separator.js.map +1 -0
  157. package/dist/components/form/tagpicker.d.ts +134 -0
  158. package/dist/components/form/tagpicker.d.ts.map +1 -0
  159. package/dist/components/form/tagpicker.js +79 -0
  160. package/dist/components/form/tagpicker.js.map +1 -0
  161. package/dist/components/form/text-area.d.ts +8 -0
  162. package/dist/components/form/text-area.d.ts.map +1 -0
  163. package/dist/components/form/text-area.js +26 -0
  164. package/dist/components/form/text-area.js.map +1 -0
  165. package/dist/components/form/text-field.d.ts +7 -0
  166. package/dist/components/form/text-field.d.ts.map +1 -0
  167. package/dist/components/form/text-field.js +28 -0
  168. package/dist/components/form/text-field.js.map +1 -0
  169. package/dist/components/form/types.d.ts +43 -0
  170. package/dist/components/form/types.d.ts.map +1 -0
  171. package/dist/components/form/types.js +2 -0
  172. package/dist/components/form/types.js.map +1 -0
  173. package/dist/components/form/use-form-handling.d.ts +4 -0
  174. package/dist/components/form/use-form-handling.d.ts.map +1 -0
  175. package/dist/components/form/use-form-handling.js +37 -0
  176. package/dist/components/form/use-form-handling.js.map +1 -0
  177. package/dist/components/form/use-form-navigation.d.ts +8 -0
  178. package/dist/components/form/use-form-navigation.d.ts.map +1 -0
  179. package/dist/components/form/use-form-navigation.js +58 -0
  180. package/dist/components/form/use-form-navigation.js.map +1 -0
  181. package/dist/components/form/with-left-border.d.ts +17 -0
  182. package/dist/components/form/with-left-border.d.ts.map +1 -0
  183. package/dist/components/form/with-left-border.js +10 -0
  184. package/dist/components/form/with-left-border.js.map +1 -0
  185. package/dist/components/icon.d.ts +9 -0
  186. package/dist/components/icon.d.ts.map +1 -0
  187. package/dist/components/icon.js +485 -0
  188. package/dist/components/icon.js.map +1 -0
  189. package/dist/components/image.d.ts +19 -0
  190. package/dist/components/image.d.ts.map +1 -0
  191. package/dist/components/image.js +32 -0
  192. package/dist/components/image.js.map +1 -0
  193. package/dist/components/list.d.ts +234 -0
  194. package/dist/components/list.d.ts.map +1 -0
  195. package/dist/components/list.js +667 -0
  196. package/dist/components/list.js.map +1 -0
  197. package/dist/components/loading-bar.d.ts +8 -0
  198. package/dist/components/loading-bar.d.ts.map +1 -0
  199. package/dist/components/loading-bar.js +107 -0
  200. package/dist/components/loading-bar.js.map +1 -0
  201. package/dist/components/menubar-extra.d.ts +68 -0
  202. package/dist/components/menubar-extra.d.ts.map +1 -0
  203. package/dist/components/menubar-extra.js +39 -0
  204. package/dist/components/menubar-extra.js.map +1 -0
  205. package/dist/descendants.d.ts +25 -0
  206. package/dist/descendants.d.ts.map +1 -0
  207. package/dist/descendants.js +81 -0
  208. package/dist/descendants.js.map +1 -0
  209. package/dist/dev-ui.d.ts +7 -0
  210. package/dist/dev-ui.d.ts.map +1 -0
  211. package/dist/dev-ui.js +118 -0
  212. package/dist/dev-ui.js.map +1 -0
  213. package/dist/e2e-node.d.ts +63 -0
  214. package/dist/e2e-node.d.ts.map +1 -0
  215. package/dist/e2e-node.js +255 -0
  216. package/dist/e2e-node.js.map +1 -0
  217. package/dist/e2e.d.ts +39 -0
  218. package/dist/e2e.d.ts.map +1 -0
  219. package/dist/e2e.js +127 -0
  220. package/dist/e2e.js.map +1 -0
  221. package/dist/environment.d.ts +63 -0
  222. package/dist/environment.d.ts.map +1 -0
  223. package/dist/environment.js +189 -0
  224. package/dist/environment.js.map +1 -0
  225. package/dist/examples/action-show-in-finder.d.ts +2 -0
  226. package/dist/examples/action-show-in-finder.d.ts.map +1 -0
  227. package/dist/examples/action-show-in-finder.js +13 -0
  228. package/dist/examples/action-show-in-finder.js.map +1 -0
  229. package/dist/examples/datepicker.d.ts +2 -0
  230. package/dist/examples/datepicker.d.ts.map +1 -0
  231. package/dist/examples/datepicker.js +344 -0
  232. package/dist/examples/datepicker.js.map +1 -0
  233. package/dist/examples/environment-test.d.ts +2 -0
  234. package/dist/examples/environment-test.d.ts.map +1 -0
  235. package/dist/examples/environment-test.js +28 -0
  236. package/dist/examples/environment-test.js.map +1 -0
  237. package/dist/examples/error-boundary.d.ts +6 -0
  238. package/dist/examples/error-boundary.d.ts.map +1 -0
  239. package/dist/examples/error-boundary.js +67 -0
  240. package/dist/examples/error-boundary.js.map +1 -0
  241. package/dist/examples/form-basic-arrow-keys.vitest.d.ts +2 -0
  242. package/dist/examples/form-basic-arrow-keys.vitest.d.ts.map +1 -0
  243. package/dist/examples/form-basic-arrow-keys.vitest.js +46 -0
  244. package/dist/examples/form-basic-arrow-keys.vitest.js.map +1 -0
  245. package/dist/examples/form-basic.d.ts +2 -0
  246. package/dist/examples/form-basic.d.ts.map +1 -0
  247. package/dist/examples/form-basic.js +21 -0
  248. package/dist/examples/form-basic.js.map +1 -0
  249. package/dist/examples/form-basic.vitest.d.ts +2 -0
  250. package/dist/examples/form-basic.vitest.d.ts.map +1 -0
  251. package/dist/examples/form-basic.vitest.js +995 -0
  252. package/dist/examples/form-basic.vitest.js.map +1 -0
  253. package/dist/examples/form-dropdown-with-sections.d.ts +2 -0
  254. package/dist/examples/form-dropdown-with-sections.d.ts.map +1 -0
  255. package/dist/examples/form-dropdown-with-sections.js +13 -0
  256. package/dist/examples/form-dropdown-with-sections.js.map +1 -0
  257. package/dist/examples/form-dropdown-with-sections.vitest.d.ts +2 -0
  258. package/dist/examples/form-dropdown-with-sections.vitest.d.ts.map +1 -0
  259. package/dist/examples/form-dropdown-with-sections.vitest.js +75 -0
  260. package/dist/examples/form-dropdown-with-sections.vitest.js.map +1 -0
  261. package/dist/examples/form-dropdown.d.ts +2 -0
  262. package/dist/examples/form-dropdown.d.ts.map +1 -0
  263. package/dist/examples/form-dropdown.js +13 -0
  264. package/dist/examples/form-dropdown.js.map +1 -0
  265. package/dist/examples/form-dropdown.vitest.d.ts +2 -0
  266. package/dist/examples/form-dropdown.vitest.d.ts.map +1 -0
  267. package/dist/examples/form-dropdown.vitest.js +722 -0
  268. package/dist/examples/form-dropdown.vitest.js.map +1 -0
  269. package/dist/examples/form-multiselect-dropdown.d.ts +2 -0
  270. package/dist/examples/form-multiselect-dropdown.d.ts.map +1 -0
  271. package/dist/examples/form-multiselect-dropdown.js +13 -0
  272. package/dist/examples/form-multiselect-dropdown.js.map +1 -0
  273. package/dist/examples/form-tagpicker.d.ts +2 -0
  274. package/dist/examples/form-tagpicker.d.ts.map +1 -0
  275. package/dist/examples/form-tagpicker.js +13 -0
  276. package/dist/examples/form-tagpicker.js.map +1 -0
  277. package/dist/examples/form-tagpicker.vitest.d.ts +2 -0
  278. package/dist/examples/form-tagpicker.vitest.d.ts.map +1 -0
  279. package/dist/examples/form-tagpicker.vitest.js +491 -0
  280. package/dist/examples/form-tagpicker.vitest.js.map +1 -0
  281. package/dist/examples/internal/descendants-filtering.d.ts +2 -0
  282. package/dist/examples/internal/descendants-filtering.d.ts.map +1 -0
  283. package/dist/examples/internal/descendants-filtering.js +144 -0
  284. package/dist/examples/internal/descendants-filtering.js.map +1 -0
  285. package/dist/examples/internal/descendants.d.ts +2 -0
  286. package/dist/examples/internal/descendants.d.ts.map +1 -0
  287. package/dist/examples/internal/descendants.js +134 -0
  288. package/dist/examples/internal/descendants.js.map +1 -0
  289. package/dist/examples/internal/nested-boxes.d.ts +2 -0
  290. package/dist/examples/internal/nested-boxes.d.ts.map +1 -0
  291. package/dist/examples/internal/nested-boxes.js +7 -0
  292. package/dist/examples/internal/nested-boxes.js.map +1 -0
  293. package/dist/examples/internal/scrollbox-demo.d.ts +2 -0
  294. package/dist/examples/internal/scrollbox-demo.d.ts.map +1 -0
  295. package/dist/examples/internal/scrollbox-demo.js +104 -0
  296. package/dist/examples/internal/scrollbox-demo.js.map +1 -0
  297. package/dist/examples/internal/simple-dialog.d.ts +2 -0
  298. package/dist/examples/internal/simple-dialog.d.ts.map +1 -0
  299. package/dist/examples/internal/simple-dialog.js +43 -0
  300. package/dist/examples/internal/simple-dialog.js.map +1 -0
  301. package/dist/examples/internal/text-stacking.d.ts +2 -0
  302. package/dist/examples/internal/text-stacking.d.ts.map +1 -0
  303. package/dist/examples/internal/text-stacking.js +53 -0
  304. package/dist/examples/internal/text-stacking.js.map +1 -0
  305. package/dist/examples/internal/unicode-square-repro.d.ts +2 -0
  306. package/dist/examples/internal/unicode-square-repro.d.ts.map +1 -0
  307. package/dist/examples/internal/unicode-square-repro.js +7 -0
  308. package/dist/examples/internal/unicode-square-repro.js.map +1 -0
  309. package/dist/examples/list-dropdown-default.d.ts +2 -0
  310. package/dist/examples/list-dropdown-default.d.ts.map +1 -0
  311. package/dist/examples/list-dropdown-default.js +14 -0
  312. package/dist/examples/list-dropdown-default.js.map +1 -0
  313. package/dist/examples/list-dropdown-default.vitest.d.ts +2 -0
  314. package/dist/examples/list-dropdown-default.vitest.d.ts.map +1 -0
  315. package/dist/examples/list-dropdown-default.vitest.js +164 -0
  316. package/dist/examples/list-dropdown-default.vitest.js.map +1 -0
  317. package/dist/examples/list-fetch-data.d.ts +2 -0
  318. package/dist/examples/list-fetch-data.d.ts.map +1 -0
  319. package/dist/examples/list-fetch-data.js +87 -0
  320. package/dist/examples/list-fetch-data.js.map +1 -0
  321. package/dist/examples/list-fetch-data.vitest.d.ts +2 -0
  322. package/dist/examples/list-fetch-data.vitest.d.ts.map +1 -0
  323. package/dist/examples/list-fetch-data.vitest.js +103 -0
  324. package/dist/examples/list-fetch-data.vitest.js.map +1 -0
  325. package/dist/examples/list-filter-navigation.d.ts +2 -0
  326. package/dist/examples/list-filter-navigation.d.ts.map +1 -0
  327. package/dist/examples/list-filter-navigation.js +8 -0
  328. package/dist/examples/list-filter-navigation.js.map +1 -0
  329. package/dist/examples/list-with-detail.d.ts +2 -0
  330. package/dist/examples/list-with-detail.d.ts.map +1 -0
  331. package/dist/examples/list-with-detail.js +94 -0
  332. package/dist/examples/list-with-detail.js.map +1 -0
  333. package/dist/examples/list-with-detail.vitest.d.ts +2 -0
  334. package/dist/examples/list-with-detail.vitest.d.ts.map +1 -0
  335. package/dist/examples/list-with-detail.vitest.js +438 -0
  336. package/dist/examples/list-with-detail.vitest.js.map +1 -0
  337. package/dist/examples/list-with-dropdown.d.ts +2 -0
  338. package/dist/examples/list-with-dropdown.d.ts.map +1 -0
  339. package/dist/examples/list-with-dropdown.js +43 -0
  340. package/dist/examples/list-with-dropdown.js.map +1 -0
  341. package/dist/examples/list-with-dropdown.vitest.d.ts +2 -0
  342. package/dist/examples/list-with-dropdown.vitest.d.ts.map +1 -0
  343. package/dist/examples/list-with-dropdown.vitest.js +297 -0
  344. package/dist/examples/list-with-dropdown.vitest.js.map +1 -0
  345. package/dist/examples/list-with-sections.d.ts +2 -0
  346. package/dist/examples/list-with-sections.d.ts.map +1 -0
  347. package/dist/examples/list-with-sections.js +67 -0
  348. package/dist/examples/list-with-sections.js.map +1 -0
  349. package/dist/examples/list-with-sections.vitest.d.ts +2 -0
  350. package/dist/examples/list-with-sections.vitest.d.ts.map +1 -0
  351. package/dist/examples/list-with-sections.vitest.js +441 -0
  352. package/dist/examples/list-with-sections.vitest.js.map +1 -0
  353. package/dist/examples/miscellaneous.d.ts +2 -0
  354. package/dist/examples/miscellaneous.d.ts.map +1 -0
  355. package/dist/examples/miscellaneous.js +313 -0
  356. package/dist/examples/miscellaneous.js.map +1 -0
  357. package/dist/examples/nested-navigation.d.ts +2 -0
  358. package/dist/examples/nested-navigation.d.ts.map +1 -0
  359. package/dist/examples/nested-navigation.js +35 -0
  360. package/dist/examples/nested-navigation.js.map +1 -0
  361. package/dist/examples/preferences-test.d.ts +2 -0
  362. package/dist/examples/preferences-test.d.ts.map +1 -0
  363. package/dist/examples/preferences-test.js +43 -0
  364. package/dist/examples/preferences-test.js.map +1 -0
  365. package/dist/examples/simple-dropdown.d.ts +2 -0
  366. package/dist/examples/simple-dropdown.d.ts.map +1 -0
  367. package/dist/examples/simple-dropdown.js +15 -0
  368. package/dist/examples/simple-dropdown.js.map +1 -0
  369. package/dist/examples/simple-file-picker.d.ts +2 -0
  370. package/dist/examples/simple-file-picker.d.ts.map +1 -0
  371. package/dist/examples/simple-file-picker.js +21 -0
  372. package/dist/examples/simple-file-picker.js.map +1 -0
  373. package/dist/examples/simple-file-picker.vitest.d.ts +2 -0
  374. package/dist/examples/simple-file-picker.vitest.d.ts.map +1 -0
  375. package/dist/examples/simple-file-picker.vitest.js +277 -0
  376. package/dist/examples/simple-file-picker.vitest.js.map +1 -0
  377. package/dist/examples/simple-grid.d.ts +2 -0
  378. package/dist/examples/simple-grid.d.ts.map +1 -0
  379. package/dist/examples/simple-grid.js +51 -0
  380. package/dist/examples/simple-grid.js.map +1 -0
  381. package/dist/examples/simple-grid.vitest.d.ts +2 -0
  382. package/dist/examples/simple-grid.vitest.d.ts.map +1 -0
  383. package/dist/examples/simple-grid.vitest.js +498 -0
  384. package/dist/examples/simple-grid.vitest.js.map +1 -0
  385. package/dist/examples/simple-hud.d.ts +2 -0
  386. package/dist/examples/simple-hud.d.ts.map +1 -0
  387. package/dist/examples/simple-hud.js +18 -0
  388. package/dist/examples/simple-hud.js.map +1 -0
  389. package/dist/examples/simple-list-search.d.ts +2 -0
  390. package/dist/examples/simple-list-search.d.ts.map +1 -0
  391. package/dist/examples/simple-list-search.js +26 -0
  392. package/dist/examples/simple-list-search.js.map +1 -0
  393. package/dist/examples/simple-list.d.ts +2 -0
  394. package/dist/examples/simple-list.d.ts.map +1 -0
  395. package/dist/examples/simple-list.js +50 -0
  396. package/dist/examples/simple-list.js.map +1 -0
  397. package/dist/examples/simple-navigation.d.ts +2 -0
  398. package/dist/examples/simple-navigation.d.ts.map +1 -0
  399. package/dist/examples/simple-navigation.js +36 -0
  400. package/dist/examples/simple-navigation.js.map +1 -0
  401. package/dist/examples/simple-navigation.vitest.d.ts +2 -0
  402. package/dist/examples/simple-navigation.vitest.d.ts.map +1 -0
  403. package/dist/examples/simple-navigation.vitest.js +522 -0
  404. package/dist/examples/simple-navigation.vitest.js.map +1 -0
  405. package/dist/examples/store.d.ts +2 -0
  406. package/dist/examples/store.d.ts.map +1 -0
  407. package/dist/examples/store.js +5 -0
  408. package/dist/examples/store.js.map +1 -0
  409. package/dist/examples/store.vitest.d.ts +2 -0
  410. package/dist/examples/store.vitest.d.ts.map +1 -0
  411. package/dist/examples/store.vitest.js +52 -0
  412. package/dist/examples/store.vitest.js.map +1 -0
  413. package/dist/examples/tanstack-demo.d.ts +2 -0
  414. package/dist/examples/tanstack-demo.d.ts.map +1 -0
  415. package/dist/examples/tanstack-demo.js +51 -0
  416. package/dist/examples/tanstack-demo.js.map +1 -0
  417. package/dist/examples/use-promise-demo.d.ts +2 -0
  418. package/dist/examples/use-promise-demo.d.ts.map +1 -0
  419. package/dist/examples/use-promise-demo.js +45 -0
  420. package/dist/examples/use-promise-demo.js.map +1 -0
  421. package/dist/extensions/dev.d.ts +7 -0
  422. package/dist/extensions/dev.d.ts.map +1 -0
  423. package/dist/extensions/dev.js +124 -0
  424. package/dist/extensions/dev.js.map +1 -0
  425. package/dist/extensions/home.d.ts +8 -0
  426. package/dist/extensions/home.d.ts.map +1 -0
  427. package/dist/extensions/home.js +184 -0
  428. package/dist/extensions/home.js.map +1 -0
  429. package/dist/extensions/store.d.ts +6 -0
  430. package/dist/extensions/store.d.ts.map +1 -0
  431. package/dist/extensions/store.js +203 -0
  432. package/dist/extensions/store.js.map +1 -0
  433. package/dist/globals.d.ts +9 -0
  434. package/dist/globals.d.ts.map +1 -0
  435. package/dist/globals.js +21 -0
  436. package/dist/globals.js.map +1 -0
  437. package/dist/home-command.d.ts +8 -0
  438. package/dist/home-command.d.ts.map +1 -0
  439. package/dist/home-command.js +181 -0
  440. package/dist/home-command.js.map +1 -0
  441. package/dist/hooks/hooks.test.d.ts +2 -0
  442. package/dist/hooks/hooks.test.d.ts.map +1 -0
  443. package/dist/hooks/hooks.test.js +37 -0
  444. package/dist/hooks/hooks.test.js.map +1 -0
  445. package/dist/hooks/index.d.ts +6 -0
  446. package/dist/hooks/index.d.ts.map +1 -0
  447. package/dist/hooks/index.js +6 -0
  448. package/dist/hooks/index.js.map +1 -0
  449. package/dist/hooks/use-action-panel.d.ts +16 -0
  450. package/dist/hooks/use-action-panel.d.ts.map +1 -0
  451. package/dist/hooks/use-action-panel.js +19 -0
  452. package/dist/hooks/use-action-panel.js.map +1 -0
  453. package/dist/hooks/use-id.d.ts +9 -0
  454. package/dist/hooks/use-id.d.ts.map +1 -0
  455. package/dist/hooks/use-id.js +17 -0
  456. package/dist/hooks/use-id.js.map +1 -0
  457. package/dist/hooks/use-unstable-ai.d.ts +9 -0
  458. package/dist/hooks/use-unstable-ai.d.ts.map +1 -0
  459. package/dist/hooks/use-unstable-ai.js +13 -0
  460. package/dist/hooks/use-unstable-ai.js.map +1 -0
  461. package/dist/hooks.d.ts +10 -0
  462. package/dist/hooks.d.ts.map +1 -0
  463. package/dist/hooks.js +20 -0
  464. package/dist/hooks.js.map +1 -0
  465. package/dist/hover-repro.d.ts +2 -0
  466. package/dist/hover-repro.d.ts.map +1 -0
  467. package/dist/hover-repro.js +20 -0
  468. package/dist/hover-repro.js.map +1 -0
  469. package/dist/index.d.ts +58 -0
  470. package/dist/index.d.ts.map +1 -0
  471. package/dist/index.js +71 -0
  472. package/dist/index.js.map +1 -0
  473. package/dist/internal/date-picker-widget.d.ts +9 -0
  474. package/dist/internal/date-picker-widget.d.ts.map +1 -0
  475. package/dist/internal/date-picker-widget.js +380 -0
  476. package/dist/internal/date-picker-widget.js.map +1 -0
  477. package/dist/internal/dialog.d.ts +21 -0
  478. package/dist/internal/dialog.d.ts.map +1 -0
  479. package/dist/internal/dialog.js +122 -0
  480. package/dist/internal/dialog.js.map +1 -0
  481. package/dist/internal/error-handler.d.ts +2 -0
  482. package/dist/internal/error-handler.d.ts.map +1 -0
  483. package/dist/internal/error-handler.js +29 -0
  484. package/dist/internal/error-handler.js.map +1 -0
  485. package/dist/internal/focus-context.d.ts +10 -0
  486. package/dist/internal/focus-context.d.ts.map +1 -0
  487. package/dist/internal/focus-context.js +12 -0
  488. package/dist/internal/focus-context.js.map +1 -0
  489. package/dist/internal/navigation.d.ts +18 -0
  490. package/dist/internal/navigation.d.ts.map +1 -0
  491. package/dist/internal/navigation.js +83 -0
  492. package/dist/internal/navigation.js.map +1 -0
  493. package/dist/internal/providers.d.ts +8 -0
  494. package/dist/internal/providers.d.ts.map +1 -0
  495. package/dist/internal/providers.js +262 -0
  496. package/dist/internal/providers.js.map +1 -0
  497. package/dist/localstorage.d.ts +13 -0
  498. package/dist/localstorage.d.ts.map +1 -0
  499. package/dist/localstorage.js +190 -0
  500. package/dist/localstorage.js.map +1 -0
  501. package/dist/localstorage.test.d.ts +2 -0
  502. package/dist/localstorage.test.d.ts.map +1 -0
  503. package/dist/localstorage.test.js +131 -0
  504. package/dist/localstorage.test.js.map +1 -0
  505. package/dist/logger.d.ts +7 -0
  506. package/dist/logger.d.ts.map +1 -0
  507. package/dist/logger.js +70 -0
  508. package/dist/logger.js.map +1 -0
  509. package/dist/oauth.d.ts +142 -0
  510. package/dist/oauth.d.ts.map +1 -0
  511. package/dist/oauth.js +551 -0
  512. package/dist/oauth.js.map +1 -0
  513. package/dist/package-json.d.ts +84 -0
  514. package/dist/package-json.d.ts.map +1 -0
  515. package/dist/package-json.js +77 -0
  516. package/dist/package-json.js.map +1 -0
  517. package/dist/preferences.d.ts +23 -0
  518. package/dist/preferences.d.ts.map +1 -0
  519. package/dist/preferences.js +105 -0
  520. package/dist/preferences.js.map +1 -0
  521. package/dist/preload.d.ts +2 -0
  522. package/dist/preload.d.ts.map +1 -0
  523. package/dist/preload.js +28 -0
  524. package/dist/preload.js.map +1 -0
  525. package/dist/state.d.ts +26 -0
  526. package/dist/state.d.ts.map +1 -0
  527. package/dist/state.js +18 -0
  528. package/dist/state.js.map +1 -0
  529. package/dist/store-api/download.d.ts +8 -0
  530. package/dist/store-api/download.d.ts.map +1 -0
  531. package/dist/store-api/download.js +37 -0
  532. package/dist/store-api/download.js.map +1 -0
  533. package/dist/store-api/download.test.d.ts +2 -0
  534. package/dist/store-api/download.test.d.ts.map +1 -0
  535. package/dist/store-api/download.test.js +36 -0
  536. package/dist/store-api/download.test.js.map +1 -0
  537. package/dist/store-api/extension.d.ts +87 -0
  538. package/dist/store-api/extension.d.ts.map +1 -0
  539. package/dist/store-api/extension.js +23 -0
  540. package/dist/store-api/extension.js.map +1 -0
  541. package/dist/store-api/extension.test.d.ts +2 -0
  542. package/dist/store-api/extension.test.d.ts.map +1 -0
  543. package/dist/store-api/extension.test.js +22 -0
  544. package/dist/store-api/extension.test.js.map +1 -0
  545. package/dist/store-api/search.d.ts +101 -0
  546. package/dist/store-api/search.d.ts.map +1 -0
  547. package/dist/store-api/search.js +29 -0
  548. package/dist/store-api/search.js.map +1 -0
  549. package/dist/store-api/search.test.d.ts +2 -0
  550. package/dist/store-api/search.test.d.ts.map +1 -0
  551. package/dist/store-api/search.test.js +45 -0
  552. package/dist/store-api/search.test.js.map +1 -0
  553. package/dist/store.d.ts +21 -0
  554. package/dist/store.d.ts.map +1 -0
  555. package/dist/store.js +84 -0
  556. package/dist/store.js.map +1 -0
  557. package/dist/theme.d.ts +20 -0
  558. package/dist/theme.d.ts.map +1 -0
  559. package/dist/theme.js +26 -0
  560. package/dist/theme.js.map +1 -0
  561. package/dist/toast.d.ts +44 -0
  562. package/dist/toast.d.ts.map +1 -0
  563. package/dist/toast.js +221 -0
  564. package/dist/toast.js.map +1 -0
  565. package/dist/utils/file-system.d.ts +11 -0
  566. package/dist/utils/file-system.d.ts.map +1 -0
  567. package/dist/utils/file-system.js +66 -0
  568. package/dist/utils/file-system.js.map +1 -0
  569. package/dist/utils.d.ts +234 -0
  570. package/dist/utils.d.ts.map +1 -0
  571. package/dist/utils.js +473 -0
  572. package/dist/utils.js.map +1 -0
  573. package/dist/utils.test.d.ts +2 -0
  574. package/dist/utils.test.d.ts.map +1 -0
  575. package/dist/utils.test.js +152 -0
  576. package/dist/utils.test.js.map +1 -0
  577. package/dist/window.d.ts +12 -0
  578. package/dist/window.d.ts.map +1 -0
  579. package/dist/window.js +48 -0
  580. package/dist/window.js.map +1 -0
  581. package/package.json +56 -0
  582. package/src/action-utils.tsx +207 -0
  583. package/src/apis/ai.tsx +177 -0
  584. package/src/apis/cache.test.ts +311 -0
  585. package/src/apis/cache.tsx +394 -0
  586. package/src/apis/clipboard.tsx +200 -0
  587. package/src/apis/environment.tsx +239 -0
  588. package/src/apis/hud.tsx +86 -0
  589. package/src/apis/localstorage.test.ts +164 -0
  590. package/src/apis/localstorage.tsx +215 -0
  591. package/src/apis/oauth.tsx +744 -0
  592. package/src/apis/preferences.tsx +140 -0
  593. package/src/apis/toast.tsx +388 -0
  594. package/src/apis/window.tsx +61 -0
  595. package/src/build.test.tsx +78 -0
  596. package/src/build.tsx +273 -0
  597. package/src/cli.tsx +328 -0
  598. package/src/colors.tsx +15 -0
  599. package/src/components/actions.tsx +718 -0
  600. package/src/components/alert.tsx +205 -0
  601. package/src/components/detail.tsx +359 -0
  602. package/src/components/dropdown.tsx +438 -0
  603. package/src/components/extension-preferences.tsx +269 -0
  604. package/src/components/form/assign-components.tsx +22 -0
  605. package/src/components/form/checkbox.tsx +96 -0
  606. package/src/components/form/date-picker.tsx +125 -0
  607. package/src/components/form/description.tsx +30 -0
  608. package/src/components/form/dropdown.tsx +512 -0
  609. package/src/components/form/file-autocomplete.tsx +141 -0
  610. package/src/components/form/file-picker.tsx +233 -0
  611. package/src/components/form/form-end.tsx +6 -0
  612. package/src/components/form/index.tsx +242 -0
  613. package/src/components/form/password-field.tsx +87 -0
  614. package/src/components/form/separator.tsx +15 -0
  615. package/src/components/form/tagpicker.tsx +245 -0
  616. package/src/components/form/text-area.tsx +82 -0
  617. package/src/components/form/text-field.tsx +82 -0
  618. package/src/components/form/types.tsx +49 -0
  619. package/src/components/form/use-form-navigation.tsx +65 -0
  620. package/src/components/form/with-left-border.tsx +53 -0
  621. package/src/components/icon.tsx +496 -0
  622. package/src/components/image.tsx +54 -0
  623. package/src/components/list.tsx +1564 -0
  624. package/src/components/loading-bar.tsx +141 -0
  625. package/src/components/menubar-extra.tsx +181 -0
  626. package/src/descendants.tsx +134 -0
  627. package/src/e2e-node.tsx +303 -0
  628. package/src/e2e.tsx +147 -0
  629. package/src/examples/action-show-in-finder.tsx +80 -0
  630. package/src/examples/environment-test.tsx +50 -0
  631. package/src/examples/error-boundary.tsx +217 -0
  632. package/src/examples/form-basic.tsx +122 -0
  633. package/src/examples/form-basic.vitest.tsx +1035 -0
  634. package/src/examples/form-dropdown.tsx +102 -0
  635. package/src/examples/form-dropdown.vitest.tsx +758 -0
  636. package/src/examples/form-tagpicker.tsx +66 -0
  637. package/src/examples/form-tagpicker.vitest.tsx +523 -0
  638. package/src/examples/internal/descendants-filtering.tsx +223 -0
  639. package/src/examples/internal/descendants.tsx +208 -0
  640. package/src/examples/internal/scrollbox-demo.tsx +149 -0
  641. package/src/examples/internal/simple-dialog.tsx +124 -0
  642. package/src/examples/internal/text-stacking.tsx +90 -0
  643. package/src/examples/list-dropdown-default.tsx +69 -0
  644. package/src/examples/list-dropdown-default.vitest.tsx +187 -0
  645. package/src/examples/list-fetch-data.tsx +123 -0
  646. package/src/examples/list-fetch-data.vitest.tsx +110 -0
  647. package/src/examples/list-with-detail.tsx +161 -0
  648. package/src/examples/list-with-detail.vitest.tsx +468 -0
  649. package/src/examples/list-with-dropdown.tsx +97 -0
  650. package/src/examples/list-with-dropdown.vitest.tsx +324 -0
  651. package/src/examples/list-with-sections.tsx +196 -0
  652. package/src/examples/list-with-sections.vitest.tsx +479 -0
  653. package/src/examples/miscellaneous.tsx +780 -0
  654. package/src/examples/nested-navigation.tsx +118 -0
  655. package/src/examples/preferences-test.tsx +82 -0
  656. package/src/examples/simple-dropdown.tsx +95 -0
  657. package/src/examples/simple-file-picker.tsx +75 -0
  658. package/src/examples/simple-file-picker.vitest.tsx +306 -0
  659. package/src/examples/simple-grid.tsx +149 -0
  660. package/src/examples/simple-grid.vitest.tsx +535 -0
  661. package/src/examples/simple-hud.tsx +60 -0
  662. package/src/examples/simple-list-search.tsx +93 -0
  663. package/src/examples/simple-list.tsx +149 -0
  664. package/src/examples/simple-navigation.tsx +89 -0
  665. package/src/examples/simple-navigation.vitest.tsx +571 -0
  666. package/src/examples/store.tsx +4 -0
  667. package/src/examples/store.vitest.tsx +59 -0
  668. package/src/examples/tanstack-demo.tsx +104 -0
  669. package/src/examples/use-promise-demo.tsx +96 -0
  670. package/src/extensions/dev.tsx +215 -0
  671. package/src/extensions/home.tsx +332 -0
  672. package/src/extensions/store.tsx +375 -0
  673. package/src/globals.ts +34 -0
  674. package/src/hooks/index.tsx +8 -0
  675. package/src/hooks/use-action-panel.tsx +28 -0
  676. package/src/hooks/use-id.tsx +19 -0
  677. package/src/hooks/use-unstable-ai.tsx +15 -0
  678. package/src/hooks.tsx +22 -0
  679. package/src/index.tsx +240 -0
  680. package/src/internal/date-picker-widget.tsx +500 -0
  681. package/src/internal/dialog.tsx +202 -0
  682. package/src/internal/error-handler.tsx +32 -0
  683. package/src/internal/focus-context.tsx +23 -0
  684. package/src/internal/navigation.tsx +149 -0
  685. package/src/internal/providers.tsx +430 -0
  686. package/src/logger.tsx +84 -0
  687. package/src/package-json.tsx +197 -0
  688. package/src/preload.tsx +32 -0
  689. package/src/state.tsx +49 -0
  690. package/src/store-api/download.test.tsx +38 -0
  691. package/src/store-api/download.tsx +52 -0
  692. package/src/store-api/extension.test.tsx +24 -0
  693. package/src/store-api/extension.tsx +123 -0
  694. package/src/store-api/search.test.tsx +50 -0
  695. package/src/store-api/search.tsx +146 -0
  696. package/src/theme.tsx +31 -0
  697. package/src/utils/file-system.ts +87 -0
  698. package/src/utils.test.tsx +204 -0
  699. package/src/utils.tsx +657 -0
@@ -0,0 +1,313 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "@opentui/react/jsx-runtime";
2
+ import { useState } from 'react';
3
+ import { List } from '@termcast/cli';
4
+ import { Action, ActionPanel } from '@termcast/cli';
5
+ import { Clipboard } from '@termcast/cli';
6
+ import { logger } from '@termcast/cli';
7
+ import { Form } from '@termcast/cli';
8
+ import { useNavigation } from '@termcast/cli/src/internal/navigation';
9
+ import { environment } from '@termcast/cli';
10
+ import { renderWithProviders, getApplications, getDefaultApplication, getFrontmostApplication, showInFinder, trash, open, captureException, getPreferenceValues, openExtensionPreferences, openCommandPreferences, closeMainWindow, PopToRootType, } from '@termcast/cli';
11
+ import { confirmAlert, Alert } from '@termcast/cli';
12
+ import { showToast, Toast, showHUD } from '@termcast/cli';
13
+ import { Detail } from '@termcast/cli';
14
+ import dedent from 'string-dedent';
15
+ function DetailExample() {
16
+ return (_jsx(Detail, { markdown: dedent `
17
+ # Simple Detail View
18
+
19
+ This is a basic **Detail** component showing markdown content.
20
+
21
+ - Item 1
22
+ - Item 2
23
+ - Item 3
24
+ ` }));
25
+ }
26
+ function FormExample() {
27
+ const handleFormSubmit = async (values) => {
28
+ await showToast({
29
+ style: Toast.Style.Success,
30
+ title: 'Form Submitted',
31
+ message: `Name: ${values.name || 'Not provided'}`,
32
+ });
33
+ };
34
+ return (_jsx(Form, { actions: _jsx(ActionPanel, { children: _jsx(Action.SubmitForm, { title: 'Submit', onSubmit: handleFormSubmit }) }), children: _jsx(Form.TextField, { id: 'name', title: 'Your Name', placeholder: 'Enter your name', info: 'This is just a demo form' }) }));
35
+ }
36
+ function MiscellaneousExample() {
37
+ const [animatedToast, setAnimatedToast] = useState(null);
38
+ const { push } = useNavigation();
39
+ const handleShowSuccessToast = async () => {
40
+ await showToast({
41
+ style: Toast.Style.Success,
42
+ title: 'Operation completed',
43
+ message: 'Your files have been uploaded',
44
+ });
45
+ };
46
+ const handleShowErrorToast = async () => {
47
+ await showToast({
48
+ style: Toast.Style.Failure,
49
+ title: 'Operation failed',
50
+ message: 'Failed to upload files',
51
+ });
52
+ };
53
+ const handleShowAnimatedToast = async () => {
54
+ const toast = await showToast({
55
+ style: Toast.Style.Animated,
56
+ title: 'Processing...',
57
+ message: 'Please wait while we process your request',
58
+ });
59
+ setAnimatedToast(toast);
60
+ setTimeout(() => {
61
+ toast.style = Toast.Style.Success;
62
+ toast.title = 'Processing complete';
63
+ toast.message = 'Your request has been processed successfully';
64
+ setAnimatedToast(null);
65
+ }, 3000);
66
+ };
67
+ const handleShowToastWithActions = async () => {
68
+ await showToast({
69
+ style: Toast.Style.Success,
70
+ title: 'File uploaded',
71
+ message: 'document.pdf',
72
+ primaryAction: {
73
+ title: 'Open',
74
+ onAction: (toast) => {
75
+ toast.hide();
76
+ },
77
+ },
78
+ secondaryAction: {
79
+ title: 'Copy Path',
80
+ onAction: (toast) => {
81
+ toast.hide();
82
+ },
83
+ },
84
+ });
85
+ };
86
+ const handleCompleteAnimatedToast = () => {
87
+ if (animatedToast) {
88
+ animatedToast.style = Toast.Style.Success;
89
+ animatedToast.title = 'Task completed';
90
+ animatedToast.message = 'All operations finished successfully';
91
+ setAnimatedToast(null);
92
+ }
93
+ };
94
+ const handleFailAnimatedToast = () => {
95
+ if (animatedToast) {
96
+ animatedToast.style = Toast.Style.Failure;
97
+ animatedToast.title = 'Task failed';
98
+ animatedToast.message = 'An error occurred during processing';
99
+ setAnimatedToast(null);
100
+ }
101
+ };
102
+ const handleShowAlert = async () => {
103
+ const confirmed = await confirmAlert({
104
+ title: 'Delete Item?',
105
+ message: 'This action cannot be undone.',
106
+ primaryAction: {
107
+ title: 'Delete',
108
+ style: Alert.ActionStyle.Destructive,
109
+ onAction: () => { },
110
+ },
111
+ dismissAction: {
112
+ title: 'Cancel',
113
+ style: Alert.ActionStyle.Cancel,
114
+ },
115
+ });
116
+ if (confirmed) {
117
+ await showToast({
118
+ style: Toast.Style.Success,
119
+ title: 'Item deleted',
120
+ });
121
+ }
122
+ };
123
+ const handleShowRememberAlert = async () => {
124
+ const confirmed = await confirmAlert({
125
+ title: 'Enable notifications?',
126
+ message: "We'll send you important updates about your account.",
127
+ primaryAction: {
128
+ title: 'Enable',
129
+ style: Alert.ActionStyle.Default,
130
+ },
131
+ dismissAction: {
132
+ title: 'Not now',
133
+ style: Alert.ActionStyle.Cancel,
134
+ },
135
+ rememberUserChoice: true,
136
+ });
137
+ if (confirmed) {
138
+ await showToast({
139
+ style: Toast.Style.Success,
140
+ title: 'Notifications enabled',
141
+ });
142
+ }
143
+ };
144
+ return (_jsxs(List, { children: [_jsxs(List.Section, { title: 'Toast Examples', children: [_jsx(List.Item, { title: 'Show Success Toast', subtitle: 'Display a success message', actions: _jsx(ActionPanel, { children: _jsx(Action, { title: 'Show Toast', onAction: handleShowSuccessToast }) }) }), _jsx(List.Item, { title: 'Show Error Toast', subtitle: 'Display an error message', actions: _jsx(ActionPanel, { children: _jsx(Action, { title: 'Show Toast', onAction: handleShowErrorToast }) }) }), _jsx(List.Item, { title: 'Show Animated Toast', subtitle: 'Display a loading toast that can be updated', actions: _jsxs(ActionPanel, { children: [_jsx(Action, { title: 'Show Toast', onAction: handleShowAnimatedToast }), animatedToast && (_jsxs(_Fragment, { children: [_jsx(Action, { title: 'Complete Task', onAction: handleCompleteAnimatedToast }), _jsx(Action, { title: 'Fail Task', onAction: handleFailAnimatedToast })] }))] }) }), _jsx(List.Item, { title: 'Show Toast with Actions', subtitle: 'Display a toast with interactive buttons', actions: _jsx(ActionPanel, { children: _jsx(Action, { title: 'Show Toast', onAction: handleShowToastWithActions }) }) }), _jsx(List.Item, { title: 'Show HUD', subtitle: 'Display a compact HUD message', actions: _jsx(ActionPanel, { children: _jsx(Action, { title: 'Show HUD', onAction: async () => {
145
+ await showHUD('Operation completed successfully!');
146
+ } }) }) })] }), _jsxs(List.Section, { title: 'Alert Examples', children: [_jsx(List.Item, { title: 'Show Confirm Alert', subtitle: 'Display a confirmation dialog', actions: _jsx(ActionPanel, { children: _jsx(Action, { title: 'Show Alert', onAction: handleShowAlert }) }) }), _jsx(List.Item, { title: 'Show Alert with Remember Choice', subtitle: "Alert that remembers user's decision", actions: _jsx(ActionPanel, { children: _jsx(Action, { title: 'Show Alert', onAction: handleShowRememberAlert }) }) })] }), _jsxs(List.Section, { title: 'Clipboard Examples', children: [_jsx(List.Item, { title: 'Copy Text to Clipboard', subtitle: 'Copy a sample text to clipboard', actions: _jsx(ActionPanel, { children: _jsx(Action, { title: 'Copy Text', onAction: async () => {
147
+ await Clipboard.copy('Hello from Termcast!');
148
+ await showToast({
149
+ style: Toast.Style.Success,
150
+ title: 'Copied to clipboard',
151
+ message: 'Hello from Termcast!',
152
+ });
153
+ } }) }) }), _jsx(List.Item, { title: 'Copy Concealed Text', subtitle: 'Copy sensitive data without showing in history', actions: _jsx(ActionPanel, { children: _jsx(Action, { title: 'Copy Secret', onAction: async () => {
154
+ await Clipboard.copy('SecretPassword123', {
155
+ concealed: true,
156
+ });
157
+ await showToast({
158
+ style: Toast.Style.Success,
159
+ title: 'Copied securely',
160
+ message: 'Password copied (concealed)',
161
+ });
162
+ } }) }) }), _jsx(List.Item, { title: 'Read from Clipboard', subtitle: 'Read the current clipboard content', actions: _jsx(ActionPanel, { children: _jsx(Action, { title: 'Read Clipboard', onAction: async () => {
163
+ const text = await Clipboard.readText();
164
+ await showToast({
165
+ style: Toast.Style.Success,
166
+ title: 'Clipboard content',
167
+ message: text || '(empty)',
168
+ });
169
+ } }) }) }), _jsx(List.Item, { title: 'Clear Clipboard', subtitle: 'Clear the clipboard content', actions: _jsx(ActionPanel, { children: _jsx(Action, { title: 'Clear', onAction: async () => {
170
+ await Clipboard.clear();
171
+ await showToast({
172
+ style: Toast.Style.Success,
173
+ title: 'Clipboard cleared',
174
+ });
175
+ } }) }) }), _jsx(List.Item, { title: 'Paste Text', subtitle: 'Paste text to the frontmost application', actions: _jsx(ActionPanel, { children: _jsx(Action, { title: 'Paste', onAction: async () => {
176
+ await Clipboard.paste('Pasted from Termcast!');
177
+ await showToast({
178
+ style: Toast.Style.Success,
179
+ title: 'Text pasted',
180
+ });
181
+ } }) }) }), _jsx(List.Item, { title: 'Copy File to Clipboard', subtitle: 'Copy a file (package.json) to clipboard', actions: _jsx(ActionPanel, { children: _jsx(Action, { title: 'Copy File', onAction: async () => {
182
+ try {
183
+ await Clipboard.copy({
184
+ file: 'package.json',
185
+ });
186
+ await showToast({
187
+ style: Toast.Style.Success,
188
+ title: 'File copied',
189
+ message: 'package.json',
190
+ });
191
+ }
192
+ catch (error) {
193
+ await showToast({
194
+ style: Toast.Style.Failure,
195
+ title: 'Failed to copy file',
196
+ message: String(error),
197
+ });
198
+ }
199
+ } }) }) }), _jsx(List.Item, { title: 'Read Full Clipboard', subtitle: 'Read text and file from clipboard', actions: _jsx(ActionPanel, { children: _jsx(Action, { title: 'Read All', onAction: async () => {
200
+ const { text, file } = await Clipboard.read();
201
+ await showToast({
202
+ style: Toast.Style.Success,
203
+ title: 'Clipboard content',
204
+ message: file
205
+ ? `File: ${file}`
206
+ : `Text: ${text?.slice(0, 50) || '(empty)'}`,
207
+ });
208
+ } }) }) })] }), _jsxs(List.Section, { title: 'Form Examples', children: [_jsx(List.Item, { title: 'Show Simple Form', subtitle: 'Display a form with text field', actions: _jsx(ActionPanel, { children: _jsx(Action, { title: 'Open Form', onAction: () => push(_jsx(FormExample, {})) }) }) }), _jsx(List.Item, { title: 'Show Detail View', subtitle: 'Display a markdown detail view', actions: _jsx(ActionPanel, { children: _jsx(Action, { title: 'Open Detail', onAction: () => push(_jsx(DetailExample, {})) }) }) })] }), _jsx(List.Section, { title: 'Environment', children: _jsx(List.Item, { title: 'Show Environment Info', subtitle: `Theme: ${environment.appearance}, Dev mode: ${environment.isDevelopment}`, actions: _jsx(ActionPanel, { children: _jsx(Action, { title: 'Show Info', onAction: async () => {
209
+ await showToast({
210
+ style: Toast.Style.Success,
211
+ title: 'Environment',
212
+ message: `Extension: ${environment.extensionName}, Raycast: ${environment.raycastVersion}`,
213
+ });
214
+ } }) }) }) }), _jsxs(List.Section, { title: 'Preferences', children: [_jsx(List.Item, { title: 'Get Preference Values', subtitle: 'Access preference values for the current command', actions: _jsx(ActionPanel, { children: _jsx(Action, { title: 'Get Preferences', onAction: async () => {
215
+ const preferences = getPreferenceValues();
216
+ await showToast({
217
+ style: Toast.Style.Success,
218
+ title: 'Preferences',
219
+ message: Object.keys(preferences).length > 0
220
+ ? JSON.stringify(preferences)
221
+ : 'No preferences configured',
222
+ });
223
+ } }) }) }), _jsx(List.Item, { title: 'Open Extension Preferences', subtitle: 'Open preferences for the current extension', actions: _jsx(ActionPanel, { children: _jsx(Action, { title: 'Open Preferences', onAction: async () => {
224
+ try {
225
+ await openExtensionPreferences();
226
+ }
227
+ catch (error) {
228
+ await showToast({
229
+ style: Toast.Style.Failure,
230
+ title: 'Error',
231
+ message: String(error),
232
+ });
233
+ }
234
+ } }) }) }), _jsx(List.Item, { title: 'Open Command Preferences', subtitle: 'Open preferences for the current command', actions: _jsx(ActionPanel, { children: _jsx(Action, { title: 'Open Preferences', onAction: async () => {
235
+ try {
236
+ await openCommandPreferences();
237
+ }
238
+ catch (error) {
239
+ await showToast({
240
+ style: Toast.Style.Failure,
241
+ title: 'Error',
242
+ message: String(error),
243
+ });
244
+ }
245
+ } }) }) })] }), _jsxs(List.Section, { title: 'System Utilities', children: [_jsx(List.Item, { title: 'Get All Applications', subtitle: 'List all installed applications', actions: _jsx(ActionPanel, { children: _jsx(Action, { title: 'Get Apps', onAction: async () => {
246
+ const apps = await getApplications();
247
+ await showToast({
248
+ style: Toast.Style.Success,
249
+ title: 'Applications found',
250
+ message: `${apps.length} apps: ${apps.map((a) => a.name).join(', ')}`,
251
+ });
252
+ } }) }) }), _jsx(List.Item, { title: 'Get Default Application', subtitle: 'Get default app for a file', actions: _jsx(ActionPanel, { children: _jsx(Action, { title: 'Get Default', onAction: async () => {
253
+ const app = await getDefaultApplication('/Users/test.txt');
254
+ await showToast({
255
+ style: Toast.Style.Success,
256
+ title: 'Default app',
257
+ message: app.name,
258
+ });
259
+ } }) }) }), _jsx(List.Item, { title: 'Get Frontmost Application', subtitle: 'Get currently active app', actions: _jsx(ActionPanel, { children: _jsx(Action, { title: 'Get Frontmost', onAction: async () => {
260
+ const app = await getFrontmostApplication();
261
+ await showToast({
262
+ style: Toast.Style.Success,
263
+ title: 'Frontmost app',
264
+ message: app.name,
265
+ });
266
+ } }) }) }), _jsx(List.Item, { title: 'Show in Finder', subtitle: 'Reveal a file in Finder', actions: _jsx(ActionPanel, { children: _jsx(Action, { title: 'Show File', onAction: async () => {
267
+ await showInFinder('package.json');
268
+ await showToast({
269
+ style: Toast.Style.Success,
270
+ title: 'Opened in Finder',
271
+ });
272
+ } }) }) }), _jsx(List.Item, { title: 'Show in Finder (Action Component)', subtitle: 'Use Action.ShowInFinder to reveal package.json', actions: _jsx(ActionPanel, { children: _jsx(Action.ShowInFinder, { path: 'package.json', title: 'Reveal in Finder', icon: '\uD83D\uDCC1', shortcut: {
273
+ modifiers: ['cmd', 'shift'],
274
+ key: 'r',
275
+ }, onShow: (path) => {
276
+ logger.log(`Showing ${path} in Finder`);
277
+ } }) }) }), _jsx(List.Item, { title: 'Move to Trash', subtitle: 'Move a file to trash', actions: _jsx(ActionPanel, { children: _jsx(Action, { title: 'Trash File', onAction: async () => {
278
+ await trash('/tmp/test.txt');
279
+ await showToast({
280
+ style: Toast.Style.Success,
281
+ title: 'Moved to trash',
282
+ });
283
+ } }) }) }), _jsx(List.Item, { title: 'Open File or URL', subtitle: 'Open with default or specific app', actions: _jsx(ActionPanel, { children: _jsx(Action, { title: 'Open URL', onAction: async () => {
284
+ await open('https://raycast.com');
285
+ await showToast({
286
+ style: Toast.Style.Success,
287
+ title: 'Opening URL',
288
+ });
289
+ } }) }) }), _jsx(List.Item, { title: 'Capture Exception', subtitle: 'Test error reporting', actions: _jsx(ActionPanel, { children: _jsx(Action, { title: 'Throw Error', onAction: () => {
290
+ try {
291
+ throw new Error('Test exception');
292
+ }
293
+ catch (e) {
294
+ captureException(e);
295
+ showToast({
296
+ style: Toast.Style.Failure,
297
+ title: 'Exception captured',
298
+ });
299
+ }
300
+ } }) }) })] }), _jsxs(List.Section, { title: 'Window Management', children: [_jsx(List.Item, { title: 'Close Main Window', subtitle: 'Close window and switch to previous app', actions: _jsx(ActionPanel, { children: _jsx(Action, { title: 'Close Window', onAction: async () => {
301
+ await closeMainWindow();
302
+ } }) }) }), _jsx(List.Item, { title: 'Close Window with Clear Search', subtitle: 'Close and clear root search', actions: _jsx(ActionPanel, { children: _jsx(Action, { title: 'Close & Clear', onAction: async () => {
303
+ await closeMainWindow({
304
+ clearRootSearch: true,
305
+ });
306
+ } }) }) }), _jsx(List.Item, { title: 'Close Window (Suspended)', subtitle: 'Close without popping to root', actions: _jsx(ActionPanel, { children: _jsx(Action, { title: 'Close Suspended', onAction: async () => {
307
+ await closeMainWindow({
308
+ popToRootType: PopToRootType.Suspended,
309
+ });
310
+ } }) }) })] })] }));
311
+ }
312
+ renderWithProviders(_jsx(MiscellaneousExample, {}));
313
+ //# sourceMappingURL=miscellaneous.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"miscellaneous.js","sourceRoot":"","sources":["../../src/examples/miscellaneous.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACpC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAEnD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAA;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,uBAAuB,EACvB,YAAY,EACZ,KAAK,EACL,IAAI,EACJ,gBAAgB,EAChB,mBAAmB,EACnB,wBAAwB,EACxB,sBAAsB,EACtB,eAAe,EACf,aAAa,GACd,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACtC,OAAO,MAAM,MAAM,eAAe,CAAA;AAElC,SAAS,aAAa;IACpB,OAAO,CACL,KAAC,MAAM,IACL,QAAQ,EAAE,MAAM,CAAA;;;;;;;;OAQf,GACD,CACH,CAAA;AACH,CAAC;AAED,SAAS,WAAW;IAClB,MAAM,gBAAgB,GAAG,KAAK,EAAE,MAAW,EAAE,EAAE;QAC7C,MAAM,SAAS,CAAC;YACd,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,OAAO;YAC1B,KAA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,CAAC,SAAS;qCACvC,CAAC,CAAA;gCACJ,CAAC,GACD,GACU,GAEhB,IACW,IACV,CACR,CAAA;AACH,CAAC;AAED,mBAAmB,CAAC,KAAC,oBAAoB,KAAG,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=nested-navigation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nested-navigation.d.ts","sourceRoot":"","sources":["../../src/examples/nested-navigation.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,35 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@opentui/react/jsx-runtime";
2
+ import { render } from '@opentui/react';
3
+ import List from '@termcast/cli';
4
+ import { Action, ActionPanel } from '@termcast/cli';
5
+ import { useNavigation } from '@termcast/cli/src/internal/navigation';
6
+ import { Providers } from '@termcast/cli/src/internal/providers';
7
+ function ThirdLevel({ path }) {
8
+ const { pop } = useNavigation();
9
+ const fullPath = path.join(' > ');
10
+ return (_jsx(List, { searchBarPlaceholder: 'Third level - Press ESC to go back', navigationTitle: fullPath, children: _jsx(List.Section, { title: 'Final Level', children: _jsx(List.Item, { id: 'info', title: "You've reached the deepest level", subtitle: `Path: ${fullPath}`, actions: _jsxs(ActionPanel, { children: [_jsx(Action, { title: '\u2190 Go Back', onAction: () => pop() }), _jsx(Action.CopyToClipboard, { content: fullPath, title: 'Copy Path' })] }) }) }) }));
11
+ }
12
+ function SecondLevel({ category }) {
13
+ const { push, pop } = useNavigation();
14
+ const items = ['Item A', 'Item B', 'Item C'];
15
+ return (_jsx(List, { searchBarPlaceholder: 'Second level - Press ESC to go back', navigationTitle: category, children: _jsx(List.Section, { title: `${category} Items`, children: items.map((item) => (_jsx(List.Item, { id: `item-${item}`, title: item, subtitle: `View details for ${item}`, actions: _jsxs(ActionPanel, { children: [_jsx(Action, { title: 'View Details', onAction: () => {
16
+ push(_jsx(ThirdLevel, { path: [category, item] }), () => console.log(`Popped from ${item}`));
17
+ } }), _jsx(Action, { title: '\u2190 Back', onAction: () => pop() })] }) }))) }) }));
18
+ }
19
+ function FirstLevel() {
20
+ const { push } = useNavigation();
21
+ const categories = [
22
+ { id: 'docs', title: 'Documents', icon: '📄' },
23
+ { id: 'images', title: 'Images', icon: '🖼️' },
24
+ { id: 'videos', title: 'Videos', icon: '🎥' },
25
+ { id: 'music', title: 'Music', icon: '🎵' },
26
+ ];
27
+ return (_jsx(List, { searchBarPlaceholder: 'Search categories', navigationTitle: 'Nested Navigation Demo', children: _jsx(List.Section, { title: 'Categories', children: categories.map((cat) => (_jsx(List.Item, { id: cat.id, title: `${cat.icon} ${cat.title}`, subtitle: `Browse ${cat.title.toLowerCase()}`, actions: _jsx(ActionPanel, { children: _jsx(Action, { title: 'Open Category', onAction: () => {
28
+ push(_jsx(SecondLevel, { category: cat.title }), () => console.log(`Popped from ${cat.title}`));
29
+ } }) }) }))) }) }));
30
+ }
31
+ function App() {
32
+ return (_jsx(Providers, { children: _jsx(FirstLevel, {}) }));
33
+ }
34
+ render(_jsx(App, {}));
35
+ //# sourceMappingURL=nested-navigation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nested-navigation.js","sourceRoot":"","sources":["../../src/examples/nested-navigation.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AACvC,OAAO,IAAI,MAAM,eAAe,CAAA;AAChC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAA;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAEhE,SAAS,UAAU,CAAC,EAAE,IAAI,EAAsB;IAC9C,MAAM,EAAE,GAAG,EAAE,GAAG,aAAa,EAAE,CAAA;IAC/B,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IAEjC,OAAO,CACL,KAAC,IAAI,IACH,oBAAoB,EAAC,oC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,GAAG,EAAE,CAC9C,OAAO,CAAC,GAAG,CAAC,eAAe,GAAG,CAAC,KAAK,EAAE,CAAC,CACxC,CAAA;wBACH,CAAC,GACD,GACU,GAEhB,CACH,CAAC,GACW,GACV,CACR,CAAA;AACH,CAAC;AAED,SAAS,GAAG;IACV,OAAO,CACL,KAAC,SAAS,cACR,KAAC,UAAU,KAAG,GACJ,CACb,CAAA;AACH,CAAC;AAED,MAAM,CAAC,KAAC,GAAG,KAAG,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=preferences-test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preferences-test.d.ts","sourceRoot":"","sources":["../../src/examples/preferences-test.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,43 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@opentui/react/jsx-runtime";
2
+ import { List, Action, ActionPanel, showToast, Toast } from '@termcast/cli';
3
+ import { getPreferenceValues, openExtensionPreferences, openCommandPreferences, } from '@termcast/cli';
4
+ import { renderWithProviders } from '@termcast/cli';
5
+ function PreferencesTestExample() {
6
+ const handleGetPreferences = () => {
7
+ const prefs = getPreferenceValues();
8
+ showToast({
9
+ style: Toast.Style.Success,
10
+ title: 'Current Preferences',
11
+ message: Object.keys(prefs).length > 0
12
+ ? JSON.stringify(prefs, null, 2)
13
+ : 'No preferences set',
14
+ });
15
+ };
16
+ const handleOpenExtensionPrefs = async () => {
17
+ try {
18
+ await openExtensionPreferences();
19
+ }
20
+ catch (error) {
21
+ showToast({
22
+ style: Toast.Style.Failure,
23
+ title: 'Error',
24
+ message: String(error),
25
+ });
26
+ }
27
+ };
28
+ const handleOpenCommandPrefs = async () => {
29
+ try {
30
+ await openCommandPreferences();
31
+ }
32
+ catch (error) {
33
+ showToast({
34
+ style: Toast.Style.Failure,
35
+ title: 'Error',
36
+ message: String(error),
37
+ });
38
+ }
39
+ };
40
+ return (_jsxs(List, { navigationTitle: 'Preferences Test', children: [_jsx(List.Item, { title: 'Get Current Preferences', subtitle: 'Shows current preference values', actions: _jsx(ActionPanel, { children: _jsx(Action, { title: 'Get Preferences', onAction: handleGetPreferences }) }) }), _jsx(List.Item, { title: 'Open Extension Preferences', subtitle: 'Opens the extension preferences form', actions: _jsx(ActionPanel, { children: _jsx(Action, { title: 'Open', onAction: handleOpenExtensionPrefs }) }) }), _jsx(List.Item, { title: 'Open Command Preferences', subtitle: 'Opens the command preferences form', actions: _jsx(ActionPanel, { children: _jsx(Action, { title: 'Open', onAction: handleOpenCommandPrefs }) }) })] }));
41
+ }
42
+ renderWithProviders(_jsx(PreferencesTestExample, {}));
43
+ //# sourceMappingURL=preferences-test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preferences-test.js","sourceRoot":"","sources":["../../src/examples/preferences-test.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAC3E,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AAEnD,SAAS,sBAAsB;IAC7B,MAAM,oBAAoB,GAAG,GAAG,EAAE;QAChC,MAAM,KAAK,GAAG,mBAAmB,EAAE,CAAA;QACnC,SAAS,CAAC;YACR,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,OAAO;YAC1B,KAAK,EAAE,qBAAqB;YAC5B,OAAO,EACL,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC;gBAC3B,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;gBAChC,CAAC,CAAC,oBAAoB;SAC3B,CAAC,CAAA;IACJ,CAAC,CAAA;IAED,MAAM,wBAAwB,GAAG,KAAK,IAAI,EAAE;QAC1C,IAAI,CAAC;Y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ACG,CACR,CAAA;AACH,CAAC;AAED,mBAAmB,CAAC,KAAC,sBAAsB,KAAG,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=simple-dropdown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simple-dropdown.d.ts","sourceRoot":"","sources":["../../src/examples/simple-dropdown.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@opentui/react/jsx-runtime";
2
+ import { renderWithProviders } from '@termcast/cli';
3
+ import { Dropdown } from '@termcast/cli';
4
+ import { logger } from '@termcast/cli';
5
+ import { useState } from 'react';
6
+ const App = () => {
7
+ const [selectedValue, setSelectedValue] = useState('one');
8
+ const handleChange = (newValue) => {
9
+ logger.log('Dropdown value changed to:', newValue);
10
+ setSelectedValue(newValue);
11
+ };
12
+ return (_jsxs(Dropdown, { tooltip: 'Select Drink Type', onChange: handleChange, value: selectedValue, placeholder: 'Search drinks...', filtering: true, storeValue: true, children: [_jsxs(Dropdown.Section, { title: 'Alcoholic Beverages', children: [_jsx(Dropdown.Item, { value: 'beer', title: 'Beer', icon: '\uD83C\uDF7A', keywords: ['lager', 'ale', 'stout'], label: '\u2303B' }), _jsx(Dropdown.Item, { value: 'wine', title: 'Wine', icon: '\uD83C\uDF77', keywords: ['red', 'white', 'rose'], label: '\u2303W' }), _jsx(Dropdown.Item, { value: 'whiskey', title: 'Whiskey', icon: '\uD83E\uDD43', keywords: ['scotch', 'bourbon', 'rye'], label: '\u2318W' })] }), _jsxs(Dropdown.Section, { title: 'Non-Alcoholic', children: [_jsx(Dropdown.Item, { value: 'coffee', title: 'Coffee', icon: '\u2615', keywords: ['espresso', 'latte', 'cappuccino'], label: '\u2303C' }), _jsx(Dropdown.Item, { value: 'tea', title: 'Tea', icon: '\uD83C\uDF75', keywords: ['green', 'black', 'herbal'], label: '\u2303T' }), _jsx(Dropdown.Item, { value: 'juice', title: 'Juice', icon: '\uD83E\uDDC3', keywords: ['orange', 'apple', 'grape'] }), _jsx(Dropdown.Item, { value: 'water', title: 'Water', icon: '\uD83D\uDCA7', keywords: ['sparkling', 'still', 'mineral'] })] }), _jsxs(Dropdown.Section, { title: 'Soft Drinks', children: [_jsx(Dropdown.Item, { value: 'cola', title: 'Cola', icon: '\uD83E\uDD64', keywords: ['coke', 'pepsi', 'soda'], label: '\u2303O' }), _jsx(Dropdown.Item, { value: 'lemonade', title: 'Lemonade', icon: '\uD83C\uDF4B', keywords: ['lemon', 'citrus', 'sweet'] })] })] }));
13
+ };
14
+ renderWithProviders(_jsx(App, {}));
15
+ //# sourceMappingURL=simple-dropdown.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simple-dropdown.js","sourceRoot":"","sources":["../../src/examples/simple-dropdown.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEhC,MAAM,GAAG,GAAQ,GAAG,EAAE;IACpB,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAS,KAAK,CAAC,CAAA;IAEjE,MAAM,YAAY,GAAG,CAAC,QAAgB,EAAE,EAAE;QACxC,MAAM,CAAC,GAAG,CAAC,4BAA4B,EAAE,QAAQ,CAAC,CAAA;QAClD,gBAAgB,CAAC,QAAQ,CAAC,CAAA;IAC5B,CAAC,CAAA;IAED,OAAO,CACL,MAAC,QAAQ,IACP,OAAO,EAAC,mBAAmB,EAC3B,QAAQ,EAAE,YAAY,EACtB,KAAK,EAAE,aAAa,EACpB,WAAW,EAAC,kBAAkB,EAC9B,SAAS,QACT,UAAU,mBAEV,MAAC,QAAQ,CAAC,OAAO,IAAC,KAAK,EAAC,qBAAqB,aAC3C,KA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EACb,KAAK,EAAC,OAAO,EACb,IAAI,EAAC,cAAI,EACT,QAAQ,EAAE,CAAC,WAAW,EAAE,OAAO,EAAE,SAAS,CAAC,GAC3C,IACe,EAEnB,MAAC,QAAQ,CAAC,OAAO,IAAC,KAAK,EAAC,aAAa,aACnC,KAAC,QAAQ,CAAC,IAAI,IACZ,KAAK,EAAC,MAAM,EACZ,KAAK,EAAC,MAAM,EACZ,IAAI,EAAC,cAAI,EACT,QAAQ,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,EACnC,KAAK,EAAC,SAAI,GACV,EACF,KAAC,QAAQ,CAAC,IAAI,IACZ,KAAK,EAAC,UAAU,EAChB,KAAK,EAAC,UAAU,EAChB,IAAI,EAAC,cAAI,EACT,QAAQ,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,GACtC,IACe,IACV,CACZ,CAAA;AACH,CAAC,CAAA;AAED,mBAAmB,CAAC,KAAC,GAAG,KAAG,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=simple-file-picker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simple-file-picker.d.ts","sourceRoot":"","sources":["../../src/examples/simple-file-picker.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,21 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@opentui/react/jsx-runtime";
2
+ import { Form, Action, ActionPanel } from '@termcast/cli';
3
+ import { showToast, Toast } from '@termcast/cli';
4
+ import { useState } from 'react';
5
+ import { renderWithProviders } from '../utils';
6
+ const SimpleFilePicker = () => {
7
+ const [submittedFiles, setSubmittedFiles] = useState([]);
8
+ return (_jsxs(Form, { actions: _jsx(ActionPanel, { children: _jsx(Action.SubmitForm, { title: 'Submit Files', onSubmit: (values) => {
9
+ const files = values.files;
10
+ setSubmittedFiles(files);
11
+ showToast({
12
+ style: Toast.Style.Success,
13
+ title: 'Files Selected',
14
+ message: files.length > 0
15
+ ? `Selected ${files.length} file(s)`
16
+ : 'No files selected',
17
+ });
18
+ } }) }), children: [_jsx(Form.TextField, { id: 'name', title: 'Your Name', placeholder: 'Enter your name', defaultValue: 'John Doe' }), _jsx(Form.FilePicker, { id: 'files', title: 'Select Files', info: 'Choose one or more files to upload', allowMultipleSelection: true, canChooseFiles: true, canChooseDirectories: false }), _jsx(Form.FilePicker, { id: 'folder', title: 'Select Folder', info: 'Choose a folder for output', allowMultipleSelection: false, canChooseFiles: false, canChooseDirectories: true }), _jsx(Form.FilePicker, { id: 'singleFile', title: 'Select Single File', info: 'Choose exactly one file', allowMultipleSelection: false, canChooseFiles: true, canChooseDirectories: false }), submittedFiles.length > 0 && (_jsx(Form.Description, { title: 'Last Submitted Files', text: submittedFiles.join('\n') }))] }));
19
+ };
20
+ renderWithProviders(_jsx(SimpleFilePicker, {}));
21
+ //# sourceMappingURL=simple-file-picker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simple-file-picker.js","sourceRoot":"","sources":["../../src/examples/simple-file-picker.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AACzD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAE9C,MAAM,gBAAgB,GAAG,GAAG,EAAE;IAC5B,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAW,EAAE,CAAC,CAAA;IAElE,OAAO,CACL,MAAC,IAAI,IACH,OAAO,EACL,KAAC,WAAW,cACV,KAAC,MAAM,CAAC,UAAU,IAChB,KAAK,EAAC,cAAc,EACpB,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE;oBACnB,MAAM,KAAK,GAAG,MAAM,CAAC,KAAiB,CAAA;oBACtC,iBAAiB,C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,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=simple-file-picker.vitest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simple-file-picker.vitest.d.ts","sourceRoot":"","sources":["../../src/examples/simple-file-picker.vitest.tsx"],"names":[],"mappings":""}