termcast 1.3.21 → 1.3.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (429) hide show
  1. package/dist/ai.d.ts +104 -0
  2. package/dist/ai.d.ts.map +1 -0
  3. package/dist/ai.js +135 -0
  4. package/dist/ai.js.map +1 -0
  5. package/dist/apis/browser-extension.d.ts +18 -0
  6. package/dist/apis/browser-extension.d.ts.map +1 -0
  7. package/dist/apis/browser-extension.js +14 -0
  8. package/dist/apis/browser-extension.js.map +1 -0
  9. package/dist/apis/localstorage.d.ts.map +1 -1
  10. package/dist/apis/localstorage.js +4 -7
  11. package/dist/apis/localstorage.js.map +1 -1
  12. package/dist/apis/oauth.d.ts.map +1 -1
  13. package/dist/apis/oauth.js +5 -1
  14. package/dist/apis/oauth.js.map +1 -1
  15. package/dist/apis/preferences.d.ts.map +1 -1
  16. package/dist/apis/preferences.js +38 -19
  17. package/dist/apis/preferences.js.map +1 -1
  18. package/dist/apis/toast.d.ts +5 -0
  19. package/dist/apis/toast.d.ts.map +1 -1
  20. package/dist/apis/toast.js +7 -43
  21. package/dist/apis/toast.js.map +1 -1
  22. package/dist/build.d.ts.map +1 -1
  23. package/dist/build.js +3 -1
  24. package/dist/build.js.map +1 -1
  25. package/dist/cache.d.ts +32 -0
  26. package/dist/cache.d.ts.map +1 -0
  27. package/dist/cache.js +205 -0
  28. package/dist/cache.js.map +1 -0
  29. package/dist/cli.d.ts.map +1 -1
  30. package/dist/cli.js +87 -41
  31. package/dist/cli.js.map +1 -1
  32. package/dist/clipboard.d.ts +36 -0
  33. package/dist/clipboard.d.ts.map +1 -0
  34. package/dist/clipboard.js +154 -0
  35. package/dist/clipboard.js.map +1 -0
  36. package/dist/compile.d.ts +2 -1
  37. package/dist/compile.d.ts.map +1 -1
  38. package/dist/compile.js +31 -12
  39. package/dist/compile.js.map +1 -1
  40. package/dist/components/actions.d.ts.map +1 -1
  41. package/dist/components/actions.js +56 -30
  42. package/dist/components/actions.js.map +1 -1
  43. package/dist/components/detail.d.ts.map +1 -1
  44. package/dist/components/detail.js +4 -0
  45. package/dist/components/detail.js.map +1 -1
  46. package/dist/components/dropdown.d.ts.map +1 -1
  47. package/dist/components/dropdown.js +38 -15
  48. package/dist/components/dropdown.js.map +1 -1
  49. package/dist/components/extension-preferences.d.ts.map +1 -1
  50. package/dist/components/extension-preferences.js +40 -13
  51. package/dist/components/extension-preferences.js.map +1 -1
  52. package/dist/components/form/checkbox.d.ts.map +1 -1
  53. package/dist/components/form/checkbox.js +5 -3
  54. package/dist/components/form/checkbox.js.map +1 -1
  55. package/dist/components/form/date-picker.d.ts.map +1 -1
  56. package/dist/components/form/date-picker.js +5 -3
  57. package/dist/components/form/date-picker.js.map +1 -1
  58. package/dist/components/form/description.d.ts.map +1 -1
  59. package/dist/components/form/description.js +2 -2
  60. package/dist/components/form/description.js.map +1 -1
  61. package/dist/components/form/dropdown.d.ts.map +1 -1
  62. package/dist/components/form/dropdown.js +84 -80
  63. package/dist/components/form/dropdown.js.map +1 -1
  64. package/dist/components/form/file-autocomplete.d.ts +3 -6
  65. package/dist/components/form/file-autocomplete.d.ts.map +1 -1
  66. package/dist/components/form/file-autocomplete.js +61 -66
  67. package/dist/components/form/file-autocomplete.js.map +1 -1
  68. package/dist/components/form/file-picker.d.ts.map +1 -1
  69. package/dist/components/form/file-picker.js +33 -30
  70. package/dist/components/form/file-picker.js.map +1 -1
  71. package/dist/components/form/form-end.d.ts.map +1 -1
  72. package/dist/components/form/form-end.js +21 -1
  73. package/dist/components/form/form-end.js.map +1 -1
  74. package/dist/components/form/form-type-only.d.ts +174 -0
  75. package/dist/components/form/form-type-only.d.ts.map +1 -0
  76. package/dist/components/form/form-type-only.js +2 -0
  77. package/dist/components/form/form-type-only.js.map +1 -0
  78. package/dist/components/form/index.d.ts +3 -1
  79. package/dist/components/form/index.d.ts.map +1 -1
  80. package/dist/components/form/index.js +104 -30
  81. package/dist/components/form/index.js.map +1 -1
  82. package/dist/components/form/password-field.d.ts.map +1 -1
  83. package/dist/components/form/password-field.js +5 -3
  84. package/dist/components/form/password-field.js.map +1 -1
  85. package/dist/components/form/text-area.d.ts.map +1 -1
  86. package/dist/components/form/text-area.js +5 -3
  87. package/dist/components/form/text-area.js.map +1 -1
  88. package/dist/components/form/text-field.d.ts.map +1 -1
  89. package/dist/components/form/text-field.js +6 -4
  90. package/dist/components/form/text-field.js.map +1 -1
  91. package/dist/components/form/types.d.ts +5 -0
  92. package/dist/components/form/types.d.ts.map +1 -1
  93. package/dist/components/form/use-form-handling.d.ts +4 -0
  94. package/dist/components/form/use-form-handling.d.ts.map +1 -0
  95. package/dist/components/form/use-form-handling.js +37 -0
  96. package/dist/components/form/use-form-handling.js.map +1 -0
  97. package/dist/components/form/with-left-border.d.ts +2 -1
  98. package/dist/components/form/with-left-border.d.ts.map +1 -1
  99. package/dist/components/form/with-left-border.js +27 -3
  100. package/dist/components/form/with-left-border.js.map +1 -1
  101. package/dist/components/icon.d.ts +1 -0
  102. package/dist/components/icon.d.ts.map +1 -1
  103. package/dist/components/icon.js +24 -8
  104. package/dist/components/icon.js.map +1 -1
  105. package/dist/components/list.d.ts +2 -2
  106. package/dist/components/list.d.ts.map +1 -1
  107. package/dist/components/list.js +155 -70
  108. package/dist/components/list.js.map +1 -1
  109. package/dist/components/loading-bar.d.ts.map +1 -1
  110. package/dist/components/loading-bar.js +2 -2
  111. package/dist/components/loading-bar.js.map +1 -1
  112. package/dist/components/loading-text.d.ts +8 -0
  113. package/dist/components/loading-text.d.ts.map +1 -0
  114. package/dist/components/loading-text.js +58 -0
  115. package/dist/components/loading-text.js.map +1 -0
  116. package/dist/descendants.js +1 -1
  117. package/dist/descendants.js.map +1 -1
  118. package/dist/dev-ui.d.ts +7 -0
  119. package/dist/dev-ui.d.ts.map +1 -0
  120. package/dist/dev-ui.js +118 -0
  121. package/dist/dev-ui.js.map +1 -0
  122. package/dist/environment.d.ts +63 -0
  123. package/dist/environment.d.ts.map +1 -0
  124. package/dist/environment.js +189 -0
  125. package/dist/environment.js.map +1 -0
  126. package/dist/examples/datepicker.d.ts +2 -0
  127. package/dist/examples/datepicker.d.ts.map +1 -0
  128. package/dist/examples/datepicker.js +344 -0
  129. package/dist/examples/datepicker.js.map +1 -0
  130. package/dist/examples/file-autocomplete.vitest.d.ts +2 -0
  131. package/dist/examples/file-autocomplete.vitest.d.ts.map +1 -0
  132. package/dist/examples/file-autocomplete.vitest.js +223 -0
  133. package/dist/examples/file-autocomplete.vitest.js.map +1 -0
  134. package/dist/examples/form-basic-arrow-keys.vitest.d.ts +2 -0
  135. package/dist/examples/form-basic-arrow-keys.vitest.d.ts.map +1 -0
  136. package/dist/examples/form-basic-arrow-keys.vitest.js +46 -0
  137. package/dist/examples/form-basic-arrow-keys.vitest.js.map +1 -0
  138. package/dist/examples/form-basic.vitest.d.ts +2 -0
  139. package/dist/examples/form-basic.vitest.d.ts.map +1 -0
  140. package/dist/examples/form-basic.vitest.js +630 -0
  141. package/dist/examples/form-basic.vitest.js.map +1 -0
  142. package/dist/examples/form-dropdown-with-sections.d.ts +2 -0
  143. package/dist/examples/form-dropdown-with-sections.d.ts.map +1 -0
  144. package/dist/examples/form-dropdown-with-sections.js +13 -0
  145. package/dist/examples/form-dropdown-with-sections.js.map +1 -0
  146. package/dist/examples/form-dropdown-with-sections.vitest.d.ts +2 -0
  147. package/dist/examples/form-dropdown-with-sections.vitest.d.ts.map +1 -0
  148. package/dist/examples/form-dropdown-with-sections.vitest.js +75 -0
  149. package/dist/examples/form-dropdown-with-sections.vitest.js.map +1 -0
  150. package/dist/examples/form-dropdown.vitest.d.ts +2 -0
  151. package/dist/examples/form-dropdown.vitest.d.ts.map +1 -0
  152. package/dist/examples/form-dropdown.vitest.js +854 -0
  153. package/dist/examples/form-dropdown.vitest.js.map +1 -0
  154. package/dist/examples/form-multiselect-dropdown.d.ts +2 -0
  155. package/dist/examples/form-multiselect-dropdown.d.ts.map +1 -0
  156. package/dist/examples/form-multiselect-dropdown.js +13 -0
  157. package/dist/examples/form-multiselect-dropdown.js.map +1 -0
  158. package/dist/examples/form-scroll.d.ts.map +1 -1
  159. package/dist/examples/form-scroll.js +7 -1
  160. package/dist/examples/form-scroll.js.map +1 -1
  161. package/dist/examples/form-scroll.vitest.d.ts +2 -0
  162. package/dist/examples/form-scroll.vitest.d.ts.map +1 -0
  163. package/dist/examples/form-scroll.vitest.js +211 -0
  164. package/dist/examples/form-scroll.vitest.js.map +1 -0
  165. package/dist/examples/form-tagpicker.vitest.d.ts +2 -0
  166. package/dist/examples/form-tagpicker.vitest.d.ts.map +1 -0
  167. package/dist/examples/form-tagpicker.vitest.js +736 -0
  168. package/dist/examples/form-tagpicker.vitest.js.map +1 -0
  169. package/dist/examples/internal/descendants-filtering.js +1 -1
  170. package/dist/examples/internal/descendants-filtering.js.map +1 -1
  171. package/dist/examples/internal/descendants.js +1 -1
  172. package/dist/examples/internal/descendants.js.map +1 -1
  173. package/dist/examples/internal/nested-boxes.d.ts +2 -0
  174. package/dist/examples/internal/nested-boxes.d.ts.map +1 -0
  175. package/dist/examples/internal/nested-boxes.js +7 -0
  176. package/dist/examples/internal/nested-boxes.js.map +1 -0
  177. package/dist/examples/internal/rhf-custom-ref.js +2 -2
  178. package/dist/examples/internal/rhf-custom-ref.js.map +1 -1
  179. package/dist/examples/internal/scrollbox-demo.js +3 -22
  180. package/dist/examples/internal/scrollbox-demo.js.map +1 -1
  181. package/dist/examples/internal/scrollbox-descendants.d.ts +2 -0
  182. package/dist/examples/internal/scrollbox-descendants.d.ts.map +1 -0
  183. package/dist/examples/internal/scrollbox-descendants.js +83 -0
  184. package/dist/examples/internal/scrollbox-descendants.js.map +1 -0
  185. package/dist/examples/internal/scrollbox-with-descendants.js +4 -8
  186. package/dist/examples/internal/scrollbox-with-descendants.js.map +1 -1
  187. package/dist/examples/internal/simple-scrollbox.vitest.d.ts +2 -0
  188. package/dist/examples/internal/simple-scrollbox.vitest.d.ts.map +1 -0
  189. package/dist/examples/internal/simple-scrollbox.vitest.js +96 -0
  190. package/dist/examples/internal/simple-scrollbox.vitest.js.map +1 -0
  191. package/dist/examples/internal/unicode-square-repro.d.ts +2 -0
  192. package/dist/examples/internal/unicode-square-repro.d.ts.map +1 -0
  193. package/dist/examples/internal/unicode-square-repro.js +7 -0
  194. package/dist/examples/internal/unicode-square-repro.js.map +1 -0
  195. package/dist/examples/list-detail-metadata.d.ts +2 -0
  196. package/dist/examples/list-detail-metadata.d.ts.map +1 -0
  197. package/dist/examples/list-detail-metadata.js +8 -0
  198. package/dist/examples/list-detail-metadata.js.map +1 -0
  199. package/dist/examples/list-dropdown-default.vitest.d.ts +2 -0
  200. package/dist/examples/list-dropdown-default.vitest.d.ts.map +1 -0
  201. package/dist/examples/list-dropdown-default.vitest.js +234 -0
  202. package/dist/examples/list-dropdown-default.vitest.js.map +1 -0
  203. package/dist/examples/list-fetch-data.vitest.d.ts +2 -0
  204. package/dist/examples/list-fetch-data.vitest.d.ts.map +1 -0
  205. package/dist/examples/list-fetch-data.vitest.js +111 -0
  206. package/dist/examples/list-fetch-data.vitest.js.map +1 -0
  207. package/dist/examples/list-filter-navigation.d.ts +2 -0
  208. package/dist/examples/list-filter-navigation.d.ts.map +1 -0
  209. package/dist/examples/list-filter-navigation.js +8 -0
  210. package/dist/examples/list-filter-navigation.js.map +1 -0
  211. package/dist/examples/list-scrollbox.vitest.d.ts +2 -0
  212. package/dist/examples/list-scrollbox.vitest.d.ts.map +1 -0
  213. package/dist/examples/list-scrollbox.vitest.js +93 -0
  214. package/dist/examples/list-scrollbox.vitest.js.map +1 -0
  215. package/dist/examples/list-with-detail-long.d.ts +2 -0
  216. package/dist/examples/list-with-detail-long.d.ts.map +1 -0
  217. package/dist/examples/list-with-detail-long.js +53 -0
  218. package/dist/examples/list-with-detail-long.js.map +1 -0
  219. package/dist/examples/list-with-detail.vitest.d.ts +2 -0
  220. package/dist/examples/list-with-detail.vitest.d.ts.map +1 -0
  221. package/dist/examples/list-with-detail.vitest.js +434 -0
  222. package/dist/examples/list-with-detail.vitest.js.map +1 -0
  223. package/dist/examples/list-with-dropdown.vitest.d.ts +2 -0
  224. package/dist/examples/list-with-dropdown.vitest.d.ts.map +1 -0
  225. package/dist/examples/list-with-dropdown.vitest.js +337 -0
  226. package/dist/examples/list-with-dropdown.vitest.js.map +1 -0
  227. package/dist/examples/list-with-sections.js +5 -1
  228. package/dist/examples/list-with-sections.js.map +1 -1
  229. package/dist/examples/list-with-sections.vitest.d.ts +2 -0
  230. package/dist/examples/list-with-sections.vitest.d.ts.map +1 -0
  231. package/dist/examples/list-with-sections.vitest.js +601 -0
  232. package/dist/examples/list-with-sections.vitest.js.map +1 -0
  233. package/dist/examples/scrollbox-vertical-centering.d.ts +6 -0
  234. package/dist/examples/scrollbox-vertical-centering.d.ts.map +1 -0
  235. package/dist/examples/scrollbox-vertical-centering.js +17 -0
  236. package/dist/examples/scrollbox-vertical-centering.js.map +1 -0
  237. package/dist/examples/simple-file-picker.vitest.d.ts +2 -0
  238. package/dist/examples/simple-file-picker.vitest.d.ts.map +1 -0
  239. package/dist/examples/simple-file-picker.vitest.js +678 -0
  240. package/dist/examples/simple-file-picker.vitest.js.map +1 -0
  241. package/dist/examples/simple-grid.vitest.d.ts +2 -0
  242. package/dist/examples/simple-grid.vitest.d.ts.map +1 -0
  243. package/dist/examples/simple-grid.vitest.js +521 -0
  244. package/dist/examples/simple-grid.vitest.js.map +1 -0
  245. package/dist/examples/simple-navigation.js +10 -4
  246. package/dist/examples/simple-navigation.js.map +1 -1
  247. package/dist/examples/simple-navigation.vitest.d.ts +2 -0
  248. package/dist/examples/simple-navigation.vitest.d.ts.map +1 -0
  249. package/dist/examples/simple-navigation.vitest.js +718 -0
  250. package/dist/examples/simple-navigation.vitest.js.map +1 -0
  251. package/dist/examples/store.vitest.d.ts +2 -0
  252. package/dist/examples/store.vitest.d.ts.map +1 -0
  253. package/dist/examples/store.vitest.js +69 -0
  254. package/dist/examples/store.vitest.js.map +1 -0
  255. package/dist/examples/toast-variations.d.ts +2 -0
  256. package/dist/examples/toast-variations.d.ts.map +1 -0
  257. package/dist/examples/toast-variations.js +122 -0
  258. package/dist/examples/toast-variations.js.map +1 -0
  259. package/dist/extensions/dev.d.ts +4 -2
  260. package/dist/extensions/dev.d.ts.map +1 -1
  261. package/dist/extensions/dev.js +61 -10
  262. package/dist/extensions/dev.js.map +1 -1
  263. package/dist/extensions/dev.vitest.d.ts +2 -0
  264. package/dist/extensions/dev.vitest.d.ts.map +1 -0
  265. package/dist/extensions/dev.vitest.js +197 -0
  266. package/dist/extensions/dev.vitest.js.map +1 -0
  267. package/dist/extensions/home.d.ts.map +1 -1
  268. package/dist/extensions/home.js +3 -0
  269. package/dist/extensions/home.js.map +1 -1
  270. package/dist/home-command.d.ts +8 -0
  271. package/dist/home-command.d.ts.map +1 -0
  272. package/dist/home-command.js +181 -0
  273. package/dist/home-command.js.map +1 -0
  274. package/dist/hover-repro.d.ts +2 -0
  275. package/dist/hover-repro.d.ts.map +1 -0
  276. package/dist/hover-repro.js +20 -0
  277. package/dist/hover-repro.js.map +1 -0
  278. package/dist/index.d.ts +1 -0
  279. package/dist/index.d.ts.map +1 -1
  280. package/dist/index.js +2 -0
  281. package/dist/index.js.map +1 -1
  282. package/dist/internal/dialog.d.ts +1 -0
  283. package/dist/internal/dialog.d.ts.map +1 -1
  284. package/dist/internal/dialog.js +27 -18
  285. package/dist/internal/dialog.js.map +1 -1
  286. package/dist/internal/navigation.d.ts +9 -1
  287. package/dist/internal/navigation.d.ts.map +1 -1
  288. package/dist/internal/navigation.js +5 -5
  289. package/dist/internal/navigation.js.map +1 -1
  290. package/dist/internal/offscreen.d.ts +6 -0
  291. package/dist/internal/offscreen.d.ts.map +1 -0
  292. package/dist/internal/offscreen.js +10 -0
  293. package/dist/internal/offscreen.js.map +1 -0
  294. package/dist/internal/providers.d.ts.map +1 -1
  295. package/dist/internal/providers.js +2 -2
  296. package/dist/internal/providers.js.map +1 -1
  297. package/dist/internal/scrollbox.d.ts +1 -10
  298. package/dist/internal/scrollbox.d.ts.map +1 -1
  299. package/dist/internal/scrollbox.js +2 -1
  300. package/dist/internal/scrollbox.js.map +1 -1
  301. package/dist/localstorage.d.ts +13 -0
  302. package/dist/localstorage.d.ts.map +1 -0
  303. package/dist/localstorage.js +190 -0
  304. package/dist/localstorage.js.map +1 -0
  305. package/dist/oauth.d.ts +142 -0
  306. package/dist/oauth.d.ts.map +1 -0
  307. package/dist/oauth.js +551 -0
  308. package/dist/oauth.js.map +1 -0
  309. package/dist/preferences.d.ts +23 -0
  310. package/dist/preferences.d.ts.map +1 -0
  311. package/dist/preferences.js +105 -0
  312. package/dist/preferences.js.map +1 -0
  313. package/dist/release.d.ts +1 -1
  314. package/dist/release.d.ts.map +1 -1
  315. package/dist/release.js +29 -33
  316. package/dist/release.js.map +1 -1
  317. package/dist/state.d.ts +2 -0
  318. package/dist/state.d.ts.map +1 -1
  319. package/dist/state.js +3 -0
  320. package/dist/state.js.map +1 -1
  321. package/dist/store.d.ts +21 -0
  322. package/dist/store.d.ts.map +1 -0
  323. package/dist/store.js +84 -0
  324. package/dist/store.js.map +1 -0
  325. package/dist/swift-loader.d.ts +3 -0
  326. package/dist/swift-loader.d.ts.map +1 -0
  327. package/dist/swift-loader.js +193 -0
  328. package/dist/swift-loader.js.map +1 -0
  329. package/dist/swift-runtime.d.ts +2 -0
  330. package/dist/swift-runtime.d.ts.map +1 -0
  331. package/dist/swift-runtime.js +27 -0
  332. package/dist/swift-runtime.js.map +1 -0
  333. package/dist/toast.d.ts +44 -0
  334. package/dist/toast.d.ts.map +1 -0
  335. package/dist/toast.js +221 -0
  336. package/dist/toast.js.map +1 -0
  337. package/dist/utils/file-system.d.ts +9 -0
  338. package/dist/utils/file-system.d.ts.map +1 -1
  339. package/dist/utils/file-system.js +49 -0
  340. package/dist/utils/file-system.js.map +1 -1
  341. package/dist/utils/run-command.d.ts +26 -1
  342. package/dist/utils/run-command.d.ts.map +1 -1
  343. package/dist/utils/run-command.js +53 -4
  344. package/dist/utils/run-command.js.map +1 -1
  345. package/dist/window.d.ts +12 -0
  346. package/dist/window.d.ts.map +1 -0
  347. package/dist/window.js +48 -0
  348. package/dist/window.js.map +1 -0
  349. package/package.json +12 -12
  350. package/src/apis/browser-extension.tsx +29 -0
  351. package/src/apis/localstorage.test.ts +14 -6
  352. package/src/apis/localstorage.tsx +8 -5
  353. package/src/apis/oauth.tsx +5 -1
  354. package/src/apis/preferences.tsx +48 -22
  355. package/src/apis/toast.tsx +37 -62
  356. package/src/build.test.tsx +52 -0
  357. package/src/build.tsx +3 -1
  358. package/src/cli.tsx +99 -48
  359. package/src/compile.tsx +32 -11
  360. package/src/components/actions.tsx +94 -32
  361. package/src/components/detail.tsx +4 -0
  362. package/src/components/dropdown.tsx +47 -14
  363. package/src/components/extension-preferences.tsx +44 -16
  364. package/src/components/form/checkbox.tsx +12 -6
  365. package/src/components/form/date-picker.tsx +12 -6
  366. package/src/components/form/description.tsx +7 -2
  367. package/src/components/form/dropdown.tsx +131 -119
  368. package/src/components/form/file-autocomplete.tsx +90 -108
  369. package/src/components/form/file-picker.tsx +54 -43
  370. package/src/components/form/form-end.tsx +23 -2
  371. package/src/components/form/index.tsx +168 -41
  372. package/src/components/form/password-field.tsx +12 -6
  373. package/src/components/form/text-area.tsx +13 -6
  374. package/src/components/form/text-field.tsx +13 -6
  375. package/src/components/form/types.tsx +6 -0
  376. package/src/components/form/with-left-border.tsx +41 -8
  377. package/src/components/icon.tsx +27 -8
  378. package/src/components/list.tsx +243 -101
  379. package/src/components/loading-bar.tsx +3 -2
  380. package/src/components/loading-text.tsx +79 -0
  381. package/src/descendants.tsx +1 -0
  382. package/src/examples/file-autocomplete.vitest.tsx +130 -125
  383. package/src/examples/form-basic.vitest.tsx +376 -176
  384. package/src/examples/form-dropdown.vitest.tsx +126 -126
  385. package/src/examples/form-scroll.tsx +2 -0
  386. package/src/examples/form-scroll.vitest.tsx +58 -58
  387. package/src/examples/form-tagpicker.vitest.tsx +99 -99
  388. package/src/examples/internal/descendants-filtering.tsx +1 -0
  389. package/src/examples/internal/descendants.tsx +1 -0
  390. package/src/examples/internal/rhf-custom-ref.tsx +2 -0
  391. package/src/examples/internal/scrollbox-demo.tsx +3 -27
  392. package/src/examples/internal/scrollbox-with-descendants.tsx +4 -7
  393. package/src/examples/internal/simple-scrollbox.vitest.tsx +7 -5
  394. package/src/examples/list-detail-metadata.tsx +49 -0
  395. package/src/examples/list-detail-metadata.vitest.tsx +88 -0
  396. package/src/examples/list-dropdown-default.vitest.tsx +51 -51
  397. package/src/examples/list-fetch-data.vitest.tsx +4 -4
  398. package/src/examples/list-scrollbox.vitest.tsx +73 -14
  399. package/src/examples/list-with-detail-long.tsx +70 -0
  400. package/src/examples/list-with-detail.vitest.tsx +191 -85
  401. package/src/examples/list-with-dropdown.vitest.tsx +53 -53
  402. package/src/examples/list-with-sections.tsx +1 -0
  403. package/src/examples/list-with-sections.vitest.tsx +221 -97
  404. package/src/examples/list-with-toast.vitest.tsx +16 -16
  405. package/src/examples/simple-file-picker.vitest.tsx +63 -469
  406. package/src/examples/simple-grid.vitest.tsx +238 -233
  407. package/src/examples/simple-navigation.tsx +15 -7
  408. package/src/examples/simple-navigation.vitest.tsx +130 -219
  409. package/src/examples/store.vitest.tsx +1 -1
  410. package/src/examples/swift-extension.vitest.tsx +148 -0
  411. package/src/examples/synonyms.vitest.tsx +159 -0
  412. package/src/examples/toast-variations.tsx +150 -0
  413. package/src/examples/toast-variations.vitest.tsx +370 -0
  414. package/src/extensions/dev.tsx +74 -7
  415. package/src/extensions/dev.vitest.tsx +102 -34
  416. package/src/extensions/home.tsx +6 -0
  417. package/src/index.tsx +3 -0
  418. package/src/internal/dialog.tsx +43 -30
  419. package/src/internal/navigation.tsx +3 -1
  420. package/src/internal/offscreen.tsx +15 -0
  421. package/src/internal/providers.tsx +4 -2
  422. package/src/internal/scrollbox.tsx +4 -8
  423. package/src/keyboard.test.tsx +69 -0
  424. package/src/release.tsx +32 -38
  425. package/src/state.tsx +7 -0
  426. package/src/swift-loader.tsx +239 -0
  427. package/src/swift-runtime.tsx +36 -0
  428. package/src/utils/file-system.ts +61 -0
  429. package/src/utils/run-command.tsx +82 -6
@@ -1,15 +1,12 @@
1
1
  import React from 'react';
2
2
  import { TextareaRenderable } from '@opentui/core';
3
- export interface FileAutocompleteProps {
3
+ export interface FileAutocompleteDialogProps {
4
4
  onSelect: (path: string) => void;
5
- visible: boolean;
6
- onVisibilityChange: (visible: boolean) => void;
5
+ onClose: () => void;
7
6
  inputRef: React.RefObject<TextareaRenderable | null>;
8
- anchorRef: React.RefObject<any>;
9
- searchTrigger: number;
10
7
  canChooseFiles?: boolean;
11
8
  canChooseDirectories?: boolean;
12
9
  initialDirectory?: string;
13
10
  }
14
- export declare const FileAutocomplete: ({ onSelect, visible, onVisibilityChange, inputRef, anchorRef, searchTrigger, canChooseFiles, canChooseDirectories, initialDirectory, }: FileAutocompleteProps) => any;
11
+ export declare const FileAutocompleteDialog: ({ onSelect, onClose, inputRef, canChooseFiles, canChooseDirectories, initialDirectory, }: FileAutocompleteDialogProps) => any;
15
12
  //# sourceMappingURL=file-autocomplete.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"file-autocomplete.d.ts","sourceRoot":"","sources":["../../../src/components/form/file-autocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAGvC,OAAO,EAAE,kBAAkB,EAAQ,MAAM,eAAe,CAAA;AASxD,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IAChC,OAAO,EAAE,OAAO,CAAA;IAChB,kBAAkB,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;IAC9C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,kBAAkB,GAAG,IAAI,CAAC,CAAA;IACpD,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,CAAA;IAC/B,aAAa,EAAE,MAAM,CAAA;IACrB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B;AAED,eAAO,MAAM,gBAAgB,GAAI,wIAU9B,qBAAqB,KAAG,GAoH1B,CAAA"}
1
+ {"version":3,"file":"file-autocomplete.d.ts","sourceRoot":"","sources":["../../../src/components/form/file-autocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAGvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAKlD,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IAChC,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,kBAAkB,GAAG,IAAI,CAAC,CAAA;IACpD,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B;AAgBD,eAAO,MAAM,sBAAsB,GAAI,0FAOpC,2BAA2B,KAAG,GA8FhC,CAAA"}
@@ -2,91 +2,86 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "@opentui/reac
2
2
  import { useState } from 'react';
3
3
  import { useQuery } from '@tanstack/react-query';
4
4
  import { Theme } from 'termcast/src/theme';
5
- import { RGBA } from '@opentui/core';
6
- import { searchFiles, parsePath } from '../../utils/file-system';
5
+ import { listAllFiles } from '../../utils/file-system';
7
6
  import { useKeyboard } from '@opentui/react';
8
7
  import { useIsInFocus } from 'termcast/src/internal/focus-context';
9
- const backgroundPanel = RGBA.fromHex(Theme.backgroundPanel);
10
- const primary = RGBA.fromHex(Theme.primary);
11
- const border = RGBA.fromHex(Theme.border);
12
- export const FileAutocomplete = ({ onSelect, visible, onVisibilityChange, inputRef, anchorRef, searchTrigger, canChooseFiles = true, canChooseDirectories = false, initialDirectory, }) => {
8
+ function fuzzyMatch(text, query) {
9
+ if (!query)
10
+ return true;
11
+ const lowerText = text.toLowerCase();
12
+ const lowerQuery = query.toLowerCase();
13
+ let queryIndex = 0;
14
+ for (let i = 0; i < lowerText.length && queryIndex < lowerQuery.length; i++) {
15
+ if (lowerText[i] === lowerQuery[queryIndex]) {
16
+ queryIndex++;
17
+ }
18
+ }
19
+ return queryIndex === lowerQuery.length;
20
+ }
21
+ export const FileAutocompleteDialog = ({ onSelect, onClose, inputRef, canChooseFiles = true, canChooseDirectories = false, initialDirectory, }) => {
13
22
  const [selectedIndex, setSelectedIndex] = useState(0);
23
+ const [filter, setFilter] = useState(() => inputRef.current?.plainText || '');
14
24
  const isInFocus = useIsInFocus();
15
- const inputValue = inputRef.current?.plainText || '';
16
- const defaultBasePath = initialDirectory || '.';
17
- const { basePath, prefix } = inputValue
18
- ? parsePath(inputValue)
19
- : { basePath: defaultBasePath, prefix: '' };
20
- const { data: items = [], isLoading: loading } = useQuery({
21
- queryKey: ['file-autocomplete', basePath, prefix, searchTrigger, canChooseFiles, canChooseDirectories],
25
+ const { data: allFiles = [], isLoading } = useQuery({
26
+ queryKey: ['file-list', initialDirectory, canChooseFiles, canChooseDirectories],
22
27
  queryFn: async () => {
23
- const results = await searchFiles(basePath, prefix);
24
- const filtered = results.filter((item) => {
25
- if (item.isDirectory)
26
- return true;
28
+ // Always include directories in the listing, filter afterwards
29
+ const files = await listAllFiles({
30
+ basePath: initialDirectory || '.',
31
+ maxDepth: 4,
32
+ maxFiles: 500,
33
+ includeDirectories: true,
34
+ });
35
+ // Filter based on canChooseFiles/canChooseDirectories
36
+ return files.filter((f) => {
37
+ const isDir = f.endsWith('/');
38
+ if (isDir) {
39
+ return canChooseDirectories;
40
+ }
27
41
  return canChooseFiles;
28
42
  });
29
- setSelectedIndex(0);
30
- return filtered;
31
43
  },
32
- enabled: visible,
33
44
  });
34
- const directoryOnlyMode = canChooseDirectories && !canChooseFiles;
45
+ // Filter files based on current input
46
+ const filteredFiles = allFiles.filter((file) => fuzzyMatch(file, filter));
47
+ const visibleFiles = filteredFiles.slice(0, 10);
35
48
  useKeyboard((evt) => {
36
- if (!visible || !isInFocus)
49
+ if (!isInFocus)
37
50
  return;
38
51
  if (evt.name === 'up') {
39
- setSelectedIndex((prev) => (prev > 0 ? prev - 1 : items.length - 1));
52
+ setSelectedIndex((prev) => (prev > 0 ? prev - 1 : visibleFiles.length - 1));
40
53
  }
41
54
  else if (evt.name === 'down') {
42
- setSelectedIndex((prev) => (prev < items.length - 1 ? prev + 1 : 0));
43
- }
44
- else if (evt.name === 'escape') {
45
- onVisibilityChange(false);
55
+ setSelectedIndex((prev) => (prev < visibleFiles.length - 1 ? prev + 1 : 0));
46
56
  }
47
- else if (evt.name === 'return') {
48
- if (items[selectedIndex]) {
49
- const value = inputRef.current?.plainText || '';
50
- const selectedItem = items[selectedIndex];
51
- const newValue = value.substring(0, value.lastIndexOf('/') + 1) + selectedItem.name;
52
- if (selectedItem.isDirectory) {
53
- const fullPath = newValue + '/';
54
- inputRef.current?.setText(fullPath);
55
- inputRef.current.cursorOffset = fullPath.length;
56
- }
57
- else {
58
- onSelect(newValue);
59
- onVisibilityChange(false);
60
- }
57
+ else if (evt.name === 'return' || evt.name === 'tab') {
58
+ const selected = visibleFiles[selectedIndex];
59
+ if (selected) {
60
+ const path = selected.endsWith('/') ? selected.slice(0, -1) : selected;
61
+ inputRef.current?.setText(path);
62
+ onSelect(path);
63
+ onClose();
61
64
  }
62
65
  }
63
- else if (evt.name === 'right') {
64
- if (items[selectedIndex]) {
65
- const value = inputRef.current?.plainText || '';
66
- const selectedItem = items[selectedIndex];
67
- const newValue = value.substring(0, value.lastIndexOf('/') + 1) + selectedItem.name;
68
- onSelect(newValue);
69
- onVisibilityChange(false);
66
+ else if (evt.name === 'backspace') {
67
+ if (filter.length > 0) {
68
+ const newFilter = filter.slice(0, -1);
69
+ setFilter(newFilter);
70
+ setSelectedIndex(0);
70
71
  }
71
72
  }
73
+ else if (evt.name && evt.name.length === 1 && !evt.ctrl && !evt.meta) {
74
+ // Single character input
75
+ const newFilter = filter + evt.name;
76
+ setFilter(newFilter);
77
+ setSelectedIndex(0);
78
+ }
72
79
  });
73
- if (!visible || items.length === 0)
74
- return null;
75
- const anchorElement = anchorRef.current;
76
- if (!anchorElement)
77
- return null;
78
- const maxVisible = 8;
79
- const visibleItems = items.slice(0, maxVisible);
80
- const displayHeight = visibleItems.length + 1;
81
- const contentWidth = anchorElement.width - 2;
82
- const hintText = directoryOnlyMode
83
- ? '↑↓ navigate ⏎ open folder → select folder esc close'
84
- : '↑↓ navigate ⏎ open/select → select esc close';
85
- return (_jsx("box", { position: 'absolute', top: anchorElement.y - displayHeight - 2, left: anchorElement.x, width: anchorElement.width, height: displayHeight + 2, zIndex: 1000, borderStyle: 'single', borderColor: border, backgroundColor: backgroundPanel, shouldFill: true, children: _jsx("box", { flexDirection: 'column', backgroundColor: backgroundPanel, shouldFill: true, children: loading ? (_jsx("text", { fg: Theme.textMuted, children: " Loading..." })) : (_jsxs(_Fragment, { children: [visibleItems.map((item, index) => {
86
- const icon = item.isDirectory ? '📁 ' : '📄 ';
87
- const text = ' ' + icon + item.name;
88
- const padded = text.padEnd(contentWidth, ' ');
89
- return (_jsx("text", { fg: index === selectedIndex ? Theme.background : Theme.text, bg: index === selectedIndex ? Theme.primary : Theme.backgroundPanel, children: padded }, item.path));
90
- }), _jsxs("text", { fg: Theme.textMuted, children: [" ", hintText] })] })) }) }));
80
+ const hintText = '↑↓ navigate ⏎/tab select esc close';
81
+ return (_jsxs("box", { flexDirection: 'column', paddingLeft: 1, paddingRight: 1, children: [_jsxs("box", { flexDirection: 'row', children: [_jsx("text", { fg: Theme.textMuted, children: "Filter: " }), _jsx("text", { fg: Theme.primary, children: filter || '(type to filter)' })] }), _jsx("box", { height: 1 }), isLoading ? (_jsx("text", { fg: Theme.textMuted, children: "Loading files..." })) : visibleFiles.length === 0 ? (_jsx("text", { fg: Theme.textMuted, children: "No files found" })) : (_jsx(_Fragment, { children: visibleFiles.map((file, index) => {
82
+ const isDir = file.endsWith('/');
83
+ const icon = isDir ? '📁 ' : '📄 ';
84
+ return (_jsxs("text", { fg: index === selectedIndex ? Theme.background : Theme.text, bg: index === selectedIndex ? Theme.primary : Theme.backgroundPanel, children: [' ', icon, file] }, file));
85
+ }) })), _jsx("box", { height: 1 }), _jsx("text", { fg: Theme.textMuted, children: hintText })] }));
91
86
  };
92
87
  //# sourceMappingURL=file-autocomplete.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"file-autocomplete.js","sourceRoot":"","sources":["../../../src/components/form/file-autocomplete.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC1C,OAAO,EAAsB,IAAI,EAAE,MAAM,eAAe,CAAA;AACxD,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAA;AAElE,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,eAAe,CAAC,CAAA;AAC3D,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;AAC3C,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;AAczC,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAC/B,QAAQ,EACR,OAAO,EACP,kBAAkB,EAClB,QAAQ,EACR,SAAS,EACT,aAAa,EACb,cAAc,GAAG,IAAI,EACrB,o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AElE,GAAG,EAAE,IAAI,EAAE,IAAI,KAJX,IAAI,CAKJ,CACR,CAAA;gBACH,CAAC,CAAC,GACD,CACJ,EACD,cAAK,MAAM,EAAE,CAAC,GAAI,EAClB,eAAM,EAAE,EAAE,KAAK,CAAC,SAAS,YAAG,QAAQ,GAAQ,IACxC,CACP,CAAA;AACH,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"file-picker.d.ts","sourceRoot":"","sources":["../../../src/components/form/file-picker.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAQpD,MAAM,WAAW,eAAgB,SAAQ,aAAa,CAAC,MAAM,EAAE,CAAC;IAC9D;;;OAGG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAA;IAChC;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B;AAED,MAAM,MAAM,aAAa,GAAG,WAAW,CAAA;AAuJvC,eAAO,MAAM,UAAU,GAAI,OAAO,eAAe,KAAG,GAgDnD,CAAA"}
1
+ {"version":3,"file":"file-picker.d.ts","sourceRoot":"","sources":["../../../src/components/form/file-picker.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAUpD,MAAM,WAAW,eAAgB,SAAQ,aAAa,CAAC,MAAM,EAAE,CAAC;IAC9D;;;OAGG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAA;IAChC;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B;AAED,MAAM,MAAM,aAAa,GAAG,WAAW,CAAA;AA8JvC,eAAO,MAAM,UAAU,GAAI,OAAO,eAAe,KAAG,GAkDnD,CAAA"}
@@ -6,14 +6,31 @@ import { useFormContext, Controller } from 'react-hook-form';
6
6
  import { useFocusContext, useFormFieldDescendant } from './index';
7
7
  import { useKeyboard } from '@opentui/react';
8
8
  import { useIsInFocus } from 'termcast/src/internal/focus-context';
9
- import { FileAutocomplete } from './file-autocomplete';
9
+ import { FileAutocompleteDialog } from './file-autocomplete';
10
10
  import { useFormNavigationHelpers } from './use-form-navigation';
11
- const FilePickerField = ({ field, fieldState, formState, props, isFocused, setFocusedField, }) => {
11
+ import { useDialog } from 'termcast/src/internal/dialog';
12
+ import { LoadingText } from 'termcast/src/components/loading-text';
13
+ const FilePickerField = ({ field, fieldState, formState, props, isFocused, setFocusedField, isFormLoading, }) => {
12
14
  const isInFocus = useIsInFocus();
13
- const [showAutocomplete, setShowAutocomplete] = React.useState(false);
14
- const [searchTrigger, setSearchTrigger] = React.useState(0);
15
15
  const inputRef = React.useRef(null);
16
- const anchorRef = React.useRef(null);
16
+ const dialog = useDialog();
17
+ const showAutocomplete = () => {
18
+ if (dialog.stack.length > 0)
19
+ return;
20
+ const handleSelect = (path) => {
21
+ const currentFiles = field.value || [];
22
+ const newFiles = props.allowMultipleSelection !== false ? [...currentFiles, path] : [path];
23
+ field.onChange(newFiles);
24
+ if (props.onChange) {
25
+ props.onChange(newFiles);
26
+ }
27
+ inputRef.current?.setText('');
28
+ dialog.clear();
29
+ };
30
+ dialog.push(_jsx(FileAutocompleteDialog, { onSelect: handleSelect, onClose: () => {
31
+ dialog.clear();
32
+ }, inputRef: inputRef, canChooseFiles: props.canChooseFiles, canChooseDirectories: props.canChooseDirectories, initialDirectory: props.initialDirectory }));
33
+ };
17
34
  // Handle Enter key and left arrow for removing last file
18
35
  useKeyboard((evt) => {
19
36
  if (!isFocused || !isInFocus)
@@ -33,12 +50,11 @@ const FilePickerField = ({ field, fieldState, formState, props, isFocused, setFo
33
50
  if (evt.name === 'return') {
34
51
  const inputValue = inputRef.current?.plainText || '';
35
52
  // If input is empty, show files in current directory
36
- if (!inputValue && !showAutocomplete) {
37
- setShowAutocomplete(true);
38
- setSearchTrigger((n) => n + 1);
53
+ if (!inputValue) {
54
+ showAutocomplete();
39
55
  }
40
- // If autocomplete is not visible and input has value, add the path
41
- else if (inputValue.trim() && !showAutocomplete) {
56
+ // If input has value, add the path directly
57
+ else if (inputValue.trim()) {
42
58
  const currentFiles = field.value || [];
43
59
  const newFiles = props.allowMultipleSelection !== false
44
60
  ? [...currentFiles, inputValue.trim()]
@@ -51,36 +67,23 @@ const FilePickerField = ({ field, fieldState, formState, props, isFocused, setFo
51
67
  }
52
68
  }
53
69
  });
54
- const handleSelectFile = (path) => {
55
- const currentFiles = field.value || [];
56
- const newFiles = props.allowMultipleSelection !== false ? [...currentFiles, path] : [path];
57
- field.onChange(newFiles);
58
- if (props.onChange) {
59
- props.onChange(newFiles);
60
- }
61
- inputRef.current?.setText('');
62
- setShowAutocomplete(false);
63
- };
64
70
  const selectedFiles = field.value || [];
65
- return (_jsxs("box", { flexDirection: 'column', children: [_jsx(WithLeftBorder, { withDiamond: true, isFocused: isFocused, children: _jsx("text", { fg: isFocused ? Theme.primary : Theme.text, onMouseDown: () => {
71
+ return (_jsxs("box", { flexDirection: 'column', children: [_jsx(WithLeftBorder, { withDiamond: true, isFocused: isFocused, isLoading: isFormLoading, children: _jsx("box", { onMouseDown: () => {
66
72
  setFocusedField(props.id);
67
- }, children: props.title || 'File Path' }) }), _jsx(WithLeftBorder, { isFocused: isFocused, children: _jsxs("box", { flexDirection: 'column', ref: anchorRef, children: [_jsx("textarea", { ref: inputRef, height: 1, keyBindings: [
73
+ }, children: _jsx(LoadingText, { isLoading: isFocused && isFormLoading, color: isFocused ? Theme.primary : Theme.text, children: props.title || 'File Path' }) }) }), _jsx(WithLeftBorder, { isFocused: isFocused, children: _jsxs("box", { flexDirection: 'column', children: [_jsx("textarea", { ref: inputRef, height: 1, wrapMode: 'none', keyBindings: [
68
74
  { name: 'return', action: 'submit' },
69
75
  { name: 'linefeed', action: 'submit' },
70
76
  ], initialValue: "", placeholder: props.placeholder || 'Enter file path...', focused: isFocused, onMouseDown: () => setFocusedField(props.id), onContentChange: () => {
71
77
  const value = inputRef.current?.plainText || '';
72
78
  if (value && isFocused) {
73
- setShowAutocomplete(true);
74
- setSearchTrigger((n) => n + 1);
75
- }
76
- else if (!value) {
77
- setShowAutocomplete(false);
79
+ showAutocomplete();
78
80
  }
79
- } }), selectedFiles.length > 0 && (_jsxs("box", { flexDirection: 'column', marginTop: 1, children: [_jsx("text", { fg: Theme.textMuted, children: "Selected files:" }), selectedFiles.map((file, index) => (_jsxs("text", { fg: Theme.text, children: ["\u2022 ", file] }, index)))] }))] }) }), (fieldState.error || props.error) && (_jsx(WithLeftBorder, { isFocused: isFocused, children: _jsx("text", { fg: Theme.error, children: fieldState.error?.message || props.error }) })), props.info && (_jsx(WithLeftBorder, { isFocused: isFocused, children: _jsx("text", { fg: Theme.textMuted, children: props.info }) })), _jsx(FileAutocomplete, { onSelect: handleSelectFile, visible: showAutocomplete, onVisibilityChange: setShowAutocomplete, inputRef: inputRef, anchorRef: anchorRef, searchTrigger: searchTrigger, canChooseFiles: props.canChooseFiles, canChooseDirectories: props.canChooseDirectories, initialDirectory: props.initialDirectory })] }));
81
+ } }), selectedFiles.length > 0 && (_jsxs("box", { flexDirection: 'column', marginTop: 1, children: [_jsx("text", { fg: Theme.textMuted, children: "Selected files:" }), selectedFiles.map((file, index) => (_jsxs("text", { fg: Theme.text, children: ["\u2022 ", file] }, index)))] }))] }) }), (fieldState.error || props.error) && (_jsx(WithLeftBorder, { isFocused: isFocused, children: _jsx("text", { fg: Theme.error, children: fieldState.error?.message || props.error }) })), props.info && (_jsx(WithLeftBorder, { isFocused: isFocused, children: _jsx("text", { fg: Theme.textMuted, children: props.info }) }))] }));
80
82
  };
81
83
  export const FilePicker = (props) => {
82
84
  const { control } = useFormContext();
83
- const { focusedField, setFocusedField } = useFocusContext();
85
+ const focusContext = useFocusContext();
86
+ const { focusedField, setFocusedField } = focusContext;
84
87
  const isFocused = focusedField === props.id;
85
88
  const isInFocus = useIsInFocus();
86
89
  const elementRef = useRef(null);
@@ -104,7 +107,7 @@ export const FilePicker = (props) => {
104
107
  }
105
108
  });
106
109
  return (_jsx(Controller, { name: props.id, control: control, defaultValue: props.defaultValue || props.value || [], render: (renderProps) => {
107
- return (_jsx("box", { ref: elementRef, flexDirection: 'column', children: _jsx(FilePickerField, { ...renderProps, props: props, isFocused: isFocused, setFocusedField: setFocusedField }) }));
110
+ return (_jsx("box", { ref: elementRef, flexDirection: 'column', children: _jsx(FilePickerField, { ...renderProps, props: props, isFocused: isFocused, setFocusedField: setFocusedField, isFormLoading: focusContext.isLoading }) }));
108
111
  } }));
109
112
  };
110
113
  //# sourceMappingURL=file-picker.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"file-picker.js","sourceRoot":"","sources":["../../../src/components/form/file-picker.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAE1C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAEnD,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5D,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAA;AAClE,OAAO,EAAE,gB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;YACvB,IAAI,GAAG,CAAC,KAAK,EAAE,CAAC;gBACd,kBAAkB,EAAE,CAAA;YACtB,CAAC;iBAAM,CAAC;gBACN,cAAc,EAAE,CAAA;YAClB,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAA;IAEF,OAAO,CACL,KAAC,UAAU,IACT,IAAI,EAAE,KAAK,CAAC,EAAE,EACd,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,KAAK,CAAC,YAAY,IAAI,KAAK,CAAC,KAAK,IAAI,EAAE,EACrD,MAAM,EAAE,CAAC,WAAW,EAAE,EAAE;YACtB,OAAO,CACL,cAAK,GAAG,EAAE,UAAU,EAAE,aAAa,EAAC,QAAQ,YAC1C,KAAC,eAAe,OACV,WAAW,EACf,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,EACpB,eAAe,EAAE,eAAe,EAChC,aAAa,EAAE,YAAY,CAAC,SAAS,GACrC,GACE,CACe,CAAA;QACzB,CAAC,GACD,CACH,CAAA;AACH,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"form-end.d.ts","sourceRoot":"","sources":["../../../src/components/form/form-end.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO,QAAO,GAE1B,CAAA"}
1
+ {"version":3,"file":"form-end.d.ts","sourceRoot":"","sources":["../../../src/components/form/form-end.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,OAAO,QAAO,GAsB1B,CAAA"}
@@ -1,6 +1,26 @@
1
1
  import { jsx as _jsx } from "@opentui/react/jsx-runtime";
2
+ import { useState, useLayoutEffect } from 'react';
2
3
  import { Theme } from 'termcast/src/theme';
4
+ import { useFocusContext, useFormScrollContext } from './index';
3
5
  export const FormEnd = () => {
4
- return _jsx("text", { fg: Theme.text, children: "\u2514" });
6
+ const { focusedField } = useFocusContext();
7
+ const scrollContext = useFormScrollContext();
8
+ const [isLastFieldFocused, setIsLastFieldFocused] = useState(false);
9
+ useLayoutEffect(() => {
10
+ if (!scrollContext || !focusedField) {
11
+ setIsLastFieldFocused(false);
12
+ return;
13
+ }
14
+ const descendants = Object.values(scrollContext.descendantsContext.map.current)
15
+ .filter((item) => item.index !== -1 && item.props?.id)
16
+ .sort((a, b) => a.index - b.index);
17
+ if (descendants.length === 0) {
18
+ setIsLastFieldFocused(false);
19
+ return;
20
+ }
21
+ const lastField = descendants[descendants.length - 1];
22
+ setIsLastFieldFocused(lastField.props?.id === focusedField);
23
+ }, [focusedField]);
24
+ return _jsx("text", { fg: isLastFieldFocused ? Theme.accent : Theme.text, children: "\u2514" });
5
25
  };
6
26
  //# sourceMappingURL=form-end.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"form-end.js","sourceRoot":"","sources":["../../../src/components/form/form-end.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAE1C,MAAM,CAAC,MAAM,OAAO,GAAG,GAAQ,EAAE;IAC/B,OAAO,eAAM,EAAE,EAAE,KAAK,CAAC,IAAI,uBAAU,CAAA;AACvC,CAAC,CAAA"}
1
+ {"version":3,"file":"form-end.js","sourceRoot":"","sources":["../../../src/components/form/form-end.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,OAAO,CAAA;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC1C,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAE/D,MAAM,CAAC,MAAM,OAAO,GAAG,GAAQ,EAAE;IAC/B,MAAM,EAAE,YAAY,EAAE,GAAG,eAAe,EAAE,CAAA;IAC1C,MAAM,aAAa,GAAG,oBAAoB,EAAE,CAAA;IAC5C,MAAM,CAAC,kBAAkB,EAAE,qBAAqB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;IAEnE,eAAe,CAAC,GAAG,EAAE;QACnB,IAAI,CAAC,aAAa,IAAI,CAAC,YAAY,EAAE,CAAC;YACpC,qBAAqB,CAAC,KAAK,CAAC,CAAA;YAC5B,OAAM;QACR,CAAC;QACD,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,kBAAkB,CAAC,GAAG,CAAC,OAAO,CAAC;aAC5E,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC;aACrD,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,CAAA;QACpC,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC7B,qBAAqB,CAAC,KAAK,CAAC,CAAA;YAC5B,OAAM;QACR,CAAC;QACD,MAAM,SAAS,GAAG,WAAW,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;QACrD,qBAAqB,CAAC,SAAS,CAAC,KAAK,EAAE,EAAE,KAAK,YAAY,CAAC,CAAA;IAC7D,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAA;IAElB,OAAO,eAAM,EAAE,EAAE,kBAAkB,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,uBAAU,CAAA;AAC3E,CAAC,CAAA"}
@@ -0,0 +1,174 @@
1
+ import React from 'react';
2
+ import { FormEvent, FormEventType, FormItemRef, FormValue_2, FormValues_2, FormProps_2, FormItemProps_2 } from './types';
3
+ import type { TextFieldProps, TextFieldRef } from './text-field';
4
+ import type { PasswordFieldProps, PasswordFieldRef } from './password-field';
5
+ import type { TextAreaProps, TextAreaRef } from './text-area';
6
+ import type { CheckboxProps, CheckboxRef } from './checkbox';
7
+ import type { DropdownProps, DropdownRef, DropdownItemProps, DropdownSectionProps } from './dropdown';
8
+ import type { DatePickerProps, DatePickerRef, DatePickerType as DatePickerEnum } from './date-picker';
9
+ import type { TagPickerType } from './tagpicker';
10
+ import type { DescriptionProps } from './description';
11
+ import type { FilePickerProps, FilePickerRef } from './file-picker';
12
+ interface LinkAccessoryProps {
13
+ text: string;
14
+ url: string;
15
+ }
16
+ export declare namespace Form {
17
+ type ItemProps<T extends FormValue_2> = FormItemProps_2<T>;
18
+ type Value = FormValue_2;
19
+ type Values = FormValues_2;
20
+ type Props = FormProps_2 & {
21
+ searchBarAccessory?: React.ReactElement<LinkAccessoryProps> | undefined | null;
22
+ };
23
+ type ItemReference = FormItemRef;
24
+ /**
25
+ * An interface describing event in callbacks {@link Form.Item.Props.onFocus} and {@link Form.Item.Props.onBlur}
26
+ */
27
+ type Event<T extends FormValue_2> = FormEvent<T>;
28
+ namespace Event {
29
+ /**
30
+ * Types of Form event {@link Form.Event}
31
+ * * `focus` - the type will be returned for the event of {@link Form.Item.Props.onFocus} callback
32
+ * * `blur` - the type will be returned for the event of {@link Form.Item.Props.onBlur} callback
33
+ */
34
+ type Type = FormEventType;
35
+ }
36
+ /**
37
+ * A Ref Type for the {@link Form.TextField}.
38
+ * Use refs to control your Form by calling `Form.TextField.focus()` or `Form.TextField.reset()` functions.
39
+ */
40
+ type TextField = TextFieldRef;
41
+ namespace TextField {
42
+ /**
43
+ * Props of the {@link Form.TextField} React component.
44
+ */
45
+ type Props = TextFieldProps;
46
+ }
47
+ /**
48
+ * A Ref Type for the {@link Form.PasswordField}.
49
+ * Use refs to control your Form by calling `Form.PasswordField.focus()` or `Form.PasswordField.reset()` functions.
50
+ */
51
+ type PasswordField = PasswordFieldRef;
52
+ namespace PasswordField {
53
+ /**
54
+ * Props of the {@link Form.PasswordField} React component.
55
+ */
56
+ type Props = PasswordFieldProps;
57
+ }
58
+ /**
59
+ * A Ref Type for the {@link Form.TextArea}.
60
+ * Use refs to control your Form by calling `Form.TextArea.focus()` or `Form.TextArea.reset()` functions.
61
+ */
62
+ type TextArea = TextAreaRef;
63
+ namespace TextArea {
64
+ /**
65
+ * Props of the {@link Form.TextArea} React component.
66
+ */
67
+ type Props = TextAreaProps;
68
+ }
69
+ /**
70
+ * A Ref Type for the {@link Form.Checkbox}.
71
+ * Use refs to control your Form by calling `Form.Checkbox.focus()` or `Form.Checkbox.reset()` functions.
72
+ */
73
+ type Checkbox = CheckboxRef;
74
+ namespace Checkbox {
75
+ /**
76
+ * Props of the {@link Form.Checkbox} React component.
77
+ */
78
+ type Props = CheckboxProps;
79
+ }
80
+ /**
81
+ * A Ref Type for the {@link Form.Dropdown}.
82
+ * Use refs to control your Form by calling `Form.Dropdown.focus()` or `Form.Dropdown.reset()` functions.
83
+ */
84
+ type Dropdown = DropdownRef;
85
+ namespace Dropdown {
86
+ /**
87
+ * Props of the {@link Form.Dropdown} React component.
88
+ */
89
+ type Props = DropdownProps;
90
+ namespace Item {
91
+ /**
92
+ * Props of the {@link Form.Dropdown.Item} React component.
93
+ */
94
+ type Props = DropdownItemProps;
95
+ }
96
+ namespace Section {
97
+ /**
98
+ * Props of the {@link Form.Dropdown.Section} React component.
99
+ */
100
+ type Props = DropdownSectionProps;
101
+ }
102
+ }
103
+ /**
104
+ * A Ref Type for the {@link Form.DatePicker}.
105
+ * Use refs to control your Form by calling `Form.DatePicker.focus()` or `Form.DatePicker.reset()` functions.
106
+ */
107
+ type DatePicker = DatePickerRef;
108
+ namespace DatePicker {
109
+ /**
110
+ * Props of the {@link Form.DatePicker} React component.
111
+ */
112
+ type Props = DatePickerProps;
113
+ /**
114
+ * The types of date components the user can pick with {@link Form.DatePicker}.
115
+ */
116
+ type Type = DatePickerEnum;
117
+ }
118
+ namespace TagPicker {
119
+ }
120
+ /**
121
+ * A Ref Type for the {@link Form.FilePicker}.
122
+ * Use refs to control your Form by calling `Form.FilePicker.focus()` or `Form.FilePicker.reset()` functions.
123
+ */
124
+ type FilePicker = FilePickerRef;
125
+ namespace FilePicker {
126
+ /**
127
+ * Props of the {@link Form.FilePicker} React component.
128
+ */
129
+ type Props = FilePickerProps;
130
+ }
131
+ namespace Separator {
132
+ /**
133
+ * Props of the {@link Form.Separator} React component.
134
+ */
135
+ interface Props {
136
+ }
137
+ }
138
+ namespace Description {
139
+ /**
140
+ * Props of the {@link Form.Description} React component.
141
+ */
142
+ type Props = DescriptionProps;
143
+ }
144
+ namespace LinkAccessory {
145
+ /**
146
+ * Props of the {@link Form.LinkAccessory} React component.
147
+ */
148
+ type Props = LinkAccessoryProps;
149
+ }
150
+ }
151
+ interface FormType {
152
+ (props: Form.Props): any;
153
+ TextField: React.ForwardRefExoticComponent<Form.TextField.Props & React.RefAttributes<Form.TextField>>;
154
+ PasswordField: React.ForwardRefExoticComponent<Form.PasswordField.Props & React.RefAttributes<Form.PasswordField>>;
155
+ TextArea: React.ForwardRefExoticComponent<Form.TextArea.Props & React.RefAttributes<Form.TextArea>>;
156
+ Checkbox: React.ForwardRefExoticComponent<Form.Checkbox.Props & React.RefAttributes<Form.Checkbox>>;
157
+ Dropdown: {
158
+ (props: Form.Dropdown.Props): any;
159
+ Item: (props: Form.Dropdown.Item.Props) => any;
160
+ Section: (props: Form.Dropdown.Section.Props) => any;
161
+ };
162
+ DatePicker: {
163
+ (props: Form.DatePicker.Props): any;
164
+ Type: typeof DatePickerEnum;
165
+ };
166
+ TagPicker: TagPickerType;
167
+ FilePicker: React.ForwardRefExoticComponent<Form.FilePicker.Props & React.RefAttributes<Form.FilePicker>>;
168
+ Separator: (props: Form.Separator.Props) => any;
169
+ Description: (props: Form.Description.Props) => any;
170
+ LinkAccessory: (props: Form.LinkAccessory.Props) => any;
171
+ }
172
+ export declare const Form: FormType;
173
+ export {};
174
+ //# sourceMappingURL=form-type-only.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form-type-only.d.ts","sourceRoot":"","sources":["../../../src/components/form/form-type-only.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAGH,SAAS,EACT,aAAa,EACb,WAAW,EACX,WAAW,EACX,YAAY,EACZ,WAAW,EAC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,CAAC,KAAK,GAAG,GAAG,CAAA;QACnC,IAAI,EAAE,OAAO,cAAc,CAAA;KAC9B,CAAA;IACD,SAAS,EAAE,aAAa,CAAA;IACxB,UAAU,EAAE,KAAK,CAAC,yBAAyB,CACvC,IAAI,CAAC,UAAU,CAAC,KAAK,GAAG,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,UAAU,CAAC,CAC/D,CAAA;IACD,SAAS,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,KAAK,GAAG,CAAA;IAC/C,WAAW,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK,KAAK,GAAG,CAAA;IACnD,aAAa,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,KAAK,KAAK,GAAG,CAAA;CAC1D;AAGD,MAAM,CAAC,OAAO,CAAC,MAAM,IAAI,EAAE,QAAQ,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=form-type-only.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form-type-only.js","sourceRoot":"","sources":["../../../src/components/form/form-type-only.tsx"],"names":[],"mappings":""}
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { ScrollBoxRenderable, BoxRenderable } from '@opentui/core';
3
3
  import { DescendantContextType } from 'termcast/src/descendants';
4
- import { FormValues, FormProps } from './types';
4
+ import { FormValues, FormProps, LinkAccessoryProps } from './types';
5
5
  export * from './types';
6
6
  export { useFormContext } from 'react-hook-form';
7
7
  interface FormFieldDescendant {
@@ -21,6 +21,7 @@ export declare const useFormScrollContext: () => FormScrollContextValue | null;
21
21
  interface FocusContextValue {
22
22
  focusedField: string | null;
23
23
  setFocusedField: (id: string | null) => void;
24
+ isLoading: boolean;
24
25
  }
25
26
  export declare const useFocusContext: () => FocusContextValue;
26
27
  interface FormSubmitContextValue {
@@ -57,6 +58,7 @@ interface FormType {
57
58
  FilePicker: (props: FilePickerProps) => any;
58
59
  Separator: () => any;
59
60
  Description: (props: DescriptionProps) => any;
61
+ LinkAccessory: (props: LinkAccessoryProps) => any;
60
62
  }
61
63
  export declare const Form: FormType;
62
64
  //# sourceMappingURL=index.d.ts.map