@hanzo/dev 4.0.1 → 4.1.0

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 (369) hide show
  1. package/LICENSE +21 -0
  2. package/dist/{BinaryViewer-qn8xfPZp.js → BinaryViewer-CmFUK4zZ.js} +2 -2
  3. package/dist/{ChatMarkdown-Cyujn3JJ.js → ChatMarkdown-nvEI7iCv.js} +4 -4
  4. package/dist/{DiffCommentAnnotation-BZu1TP6E.js → DiffCommentAnnotation-BPTN_2a6.js} +1 -1
  5. package/dist/{DiffFileTree-CcJ91zOM.js → DiffFileTree-B_br90vY.js} +2 -2
  6. package/dist/{DiffPanel-BXC88NMs.js → DiffPanel-V5R5TPuK.js} +5 -5
  7. package/dist/{ExpandedImageDialog-BZnGRBJR.js → ExpandedImageDialog-CAorLacL.js} +1 -1
  8. package/dist/{FileExplorerPane-vBJS6V75.js → FileExplorerPane-CeHulcPz.js} +1 -1
  9. package/dist/{FilePreviewPanel-jJHWsMzm.js → FilePreviewPanel-BVNLvWOc.js} +8 -8
  10. package/dist/{MermaidDiagram-paNwQY33.js → MermaidDiagram-CTolIzQD.js} +1 -1
  11. package/dist/{MermaidFilePreview-B9KxfnIN.js → MermaidFilePreview-CP2zP4FU.js} +1 -1
  12. package/dist/{MermaidViewer-CAEGpLyD.js → MermaidViewer-BDfYkS9E.js} +2 -2
  13. package/dist/{NotebookPreview-D01mMCpR.js → NotebookPreview-Cybs5uM0.js} +1 -1
  14. package/dist/{OfficeFilePreview-DWaRgfQU.js → OfficeFilePreview-7JsmSoKU.js} +1 -1
  15. package/dist/{OfficeViewer-BudrZbBA.js → OfficeViewer-CJoojlJK.js} +1 -1
  16. package/dist/{OpenInPicker-Dd3ifHa1.js → OpenInPicker-BIMWUxBP.js} +7 -7
  17. package/dist/{OpenXmlOfficeViewer-CXcKdq7k.js → OpenXmlOfficeViewer-C24Kj8DM.js} +1 -1
  18. package/dist/{PreviewImage-C4Ku4z7v.js → PreviewImage-oY5YnuTr.js} +1 -1
  19. package/dist/{PreviewImageContent-BwOB9Lyd.js → PreviewImageContent-n6eLzY99.js} +1 -1
  20. package/dist/{PullRequestCodeTab-BcwyMk7d.js → PullRequestCodeTab-Dv_0kVad.js} +7 -7
  21. package/dist/{PullRequestReviewAnnotation-BU5t_1fC.js → PullRequestReviewAnnotation-LeuwO-iH.js} +4 -4
  22. package/dist/builder/activity.d.ts +16 -0
  23. package/dist/builder/activity.js +51 -0
  24. package/dist/builder/address.d.ts +11 -0
  25. package/dist/builder/address.js +50 -0
  26. package/dist/builder/ago.d.ts +2 -0
  27. package/dist/builder/ago.js +18 -0
  28. package/dist/builder/api/agents.d.ts +139 -0
  29. package/dist/builder/api/agents.js +253 -0
  30. package/dist/builder/api/auto.d.ts +166 -0
  31. package/dist/builder/api/auto.js +300 -0
  32. package/dist/builder/api/billing.d.ts +263 -0
  33. package/dist/builder/api/billing.js +401 -0
  34. package/dist/builder/api/call.d.ts +53 -0
  35. package/dist/builder/api/call.js +123 -0
  36. package/dist/builder/api/capabilities.d.ts +14 -0
  37. package/dist/builder/api/capabilities.js +41 -0
  38. package/dist/builder/api/changes.d.ts +74 -0
  39. package/dist/builder/api/changes.js +75 -0
  40. package/dist/builder/api/chat.d.ts +12 -0
  41. package/dist/builder/api/chat.js +28 -0
  42. package/dist/builder/api/cli.d.ts +59 -0
  43. package/dist/builder/api/cli.js +133 -0
  44. package/dist/builder/api/codebases.d.ts +46 -0
  45. package/dist/builder/api/codebases.js +100 -0
  46. package/dist/builder/api/coding.d.ts +117 -0
  47. package/dist/builder/api/coding.js +222 -0
  48. package/dist/builder/api/connectors.d.ts +76 -0
  49. package/dist/builder/api/connectors.js +111 -0
  50. package/dist/builder/api/consent.d.ts +22 -0
  51. package/dist/builder/api/consent.js +28 -0
  52. package/dist/builder/api/conversations.d.ts +20 -0
  53. package/dist/builder/api/conversations.js +23 -0
  54. package/dist/builder/api/draft.d.ts +38 -0
  55. package/dist/builder/api/draft.js +87 -0
  56. package/dist/builder/api/environment.d.ts +55 -0
  57. package/dist/builder/api/environment.js +126 -0
  58. package/dist/builder/api/gallery.d.ts +32 -0
  59. package/dist/builder/api/gallery.js +85 -0
  60. package/dist/builder/api/git.d.ts +31 -0
  61. package/dist/builder/api/git.js +47 -0
  62. package/dist/builder/api/github.d.ts +176 -0
  63. package/dist/builder/api/github.js +271 -0
  64. package/dist/builder/api/keys.d.ts +35 -0
  65. package/dist/builder/api/keys.js +72 -0
  66. package/dist/builder/api/library.d.ts +116 -0
  67. package/dist/builder/api/library.js +214 -0
  68. package/dist/builder/api/limits.d.ts +69 -0
  69. package/dist/builder/api/limits.js +86 -0
  70. package/dist/builder/api/links.d.ts +51 -0
  71. package/dist/builder/api/links.js +75 -0
  72. package/dist/builder/api/machines.d.ts +122 -0
  73. package/dist/builder/api/machines.js +238 -0
  74. package/dist/builder/api/mcp.d.ts +10 -0
  75. package/dist/builder/api/mcp.js +47 -0
  76. package/dist/builder/api/members.d.ts +35 -0
  77. package/dist/builder/api/members.js +95 -0
  78. package/dist/builder/api/memory.d.ts +14 -0
  79. package/dist/builder/api/memory.js +35 -0
  80. package/dist/builder/api/models.d.ts +17 -0
  81. package/dist/builder/api/models.js +20 -0
  82. package/dist/builder/api/places.d.ts +32 -0
  83. package/dist/builder/api/places.js +29 -0
  84. package/dist/builder/api/platform.d.ts +68 -0
  85. package/dist/builder/api/platform.js +87 -0
  86. package/dist/builder/api/plugins.d.ts +42 -0
  87. package/dist/builder/api/plugins.js +175 -0
  88. package/dist/builder/api/pref.d.ts +77 -0
  89. package/dist/builder/api/pref.js +93 -0
  90. package/dist/builder/api/profile.d.ts +11 -0
  91. package/dist/builder/api/profile.js +41 -0
  92. package/dist/builder/api/projects.d.ts +99 -0
  93. package/dist/builder/api/projects.js +166 -0
  94. package/dist/builder/api/provider.d.ts +49 -0
  95. package/dist/builder/api/provider.js +96 -0
  96. package/dist/builder/api/sandbox.d.ts +90 -0
  97. package/dist/builder/api/sandbox.js +223 -0
  98. package/dist/builder/api/sessions.d.ts +123 -0
  99. package/dist/builder/api/sessions.js +255 -0
  100. package/dist/builder/api/skills.d.ts +82 -0
  101. package/dist/builder/api/skills.js +117 -0
  102. package/dist/builder/api/sse.d.ts +24 -0
  103. package/dist/builder/api/sse.js +68 -0
  104. package/dist/builder/api/studio.d.ts +59 -0
  105. package/dist/builder/api/studio.js +91 -0
  106. package/dist/builder/api/talk.d.ts +48 -0
  107. package/dist/builder/api/talk.js +81 -0
  108. package/dist/builder/api/tools.d.ts +34 -0
  109. package/dist/builder/api/tools.js +37 -0
  110. package/dist/builder/api/turn.d.ts +202 -0
  111. package/dist/builder/api/turn.js +772 -0
  112. package/dist/builder/api/verdict.d.ts +3 -0
  113. package/dist/builder/api/verdict.js +21 -0
  114. package/dist/builder/api/webhooks.d.ts +47 -0
  115. package/dist/builder/api/webhooks.js +82 -0
  116. package/dist/builder/api/work.d.ts +110 -0
  117. package/dist/builder/api/work.js +218 -0
  118. package/dist/builder/ask.d.ts +51 -0
  119. package/dist/builder/ask.js +147 -0
  120. package/dist/builder/automations.d.ts +33 -0
  121. package/dist/builder/automations.js +453 -0
  122. package/dist/builder/awake.d.ts +24 -0
  123. package/dist/builder/awake.js +68 -0
  124. package/dist/builder/back.d.ts +30 -0
  125. package/dist/builder/back.js +105 -0
  126. package/dist/builder/builder.d.ts +12 -0
  127. package/dist/builder/builder.js +162 -0
  128. package/dist/builder/carry.d.ts +48 -0
  129. package/dist/builder/carry.js +278 -0
  130. package/dist/builder/choice.d.ts +134 -0
  131. package/dist/builder/choice.js +152 -0
  132. package/dist/builder/claims.d.ts +13 -0
  133. package/dist/builder/claims.js +35 -0
  134. package/dist/builder/clipboard.d.ts +2 -0
  135. package/dist/builder/clipboard.js +10 -0
  136. package/dist/builder/customize/agents.d.ts +11 -0
  137. package/dist/builder/customize/agents.js +513 -0
  138. package/dist/builder/customize/connectors.d.ts +2 -0
  139. package/dist/builder/customize/connectors.js +319 -0
  140. package/dist/builder/customize/drafted.d.ts +4 -0
  141. package/dist/builder/customize/drafted.js +92 -0
  142. package/dist/builder/customize/index.d.ts +8 -0
  143. package/dist/builder/customize/index.js +127 -0
  144. package/dist/builder/customize/inventory.d.ts +14 -0
  145. package/dist/builder/customize/inventory.js +127 -0
  146. package/dist/builder/customize/load.d.ts +9 -0
  147. package/dist/builder/customize/load.js +22 -0
  148. package/dist/builder/customize/ocean.d.ts +41 -0
  149. package/dist/builder/customize/ocean.js +332 -0
  150. package/dist/builder/customize/plugins.d.ts +2 -0
  151. package/dist/builder/customize/plugins.js +136 -0
  152. package/dist/builder/customize/roles.d.ts +4 -0
  153. package/dist/builder/customize/roles.js +105 -0
  154. package/dist/builder/customize/say.d.ts +13 -0
  155. package/dist/builder/customize/say.js +32 -0
  156. package/dist/builder/customize/skills.d.ts +2 -0
  157. package/dist/builder/customize/skills.js +208 -0
  158. package/dist/builder/customize/ui.d.ts +152 -0
  159. package/dist/builder/customize/ui.js +208 -0
  160. package/dist/builder/data.d.ts +57 -0
  161. package/dist/builder/data.js +322 -0
  162. package/dist/builder/design.d.ts +140 -0
  163. package/dist/builder/design.js +175 -0
  164. package/dist/builder/desk.d.ts +48 -0
  165. package/dist/builder/desk.js +449 -0
  166. package/dist/builder/dev-mode.d.ts +43 -0
  167. package/dist/builder/dev-mode.js +120 -0
  168. package/dist/builder/door.d.ts +11 -0
  169. package/dist/builder/door.js +126 -0
  170. package/dist/builder/environment.d.ts +23 -0
  171. package/dist/builder/environment.js +193 -0
  172. package/dist/builder/files.d.ts +23 -0
  173. package/dist/builder/files.js +175 -0
  174. package/dist/builder/find.d.ts +7 -0
  175. package/dist/builder/find.js +80 -0
  176. package/dist/builder/foot.d.ts +30 -0
  177. package/dist/builder/foot.js +79 -0
  178. package/dist/builder/forge.d.ts +4 -0
  179. package/dist/builder/forge.js +570 -0
  180. package/dist/builder/gear.d.ts +60 -0
  181. package/dist/builder/gear.js +180 -0
  182. package/dist/builder/git.d.ts +21 -0
  183. package/dist/builder/git.js +118 -0
  184. package/dist/builder/gutter.d.ts +17 -0
  185. package/dist/builder/gutter.js +25 -0
  186. package/dist/builder/handoff.d.ts +8 -0
  187. package/dist/builder/handoff.js +22 -0
  188. package/dist/builder/host.d.ts +189 -0
  189. package/dist/builder/host.js +46 -0
  190. package/dist/builder/index.d.ts +108 -0
  191. package/dist/builder/index.js +99 -0
  192. package/dist/builder/landing.d.ts +34 -0
  193. package/dist/builder/landing.js +725 -0
  194. package/dist/builder/library.d.ts +21 -0
  195. package/dist/builder/library.js +526 -0
  196. package/dist/builder/local.d.ts +80 -0
  197. package/dist/builder/local.js +124 -0
  198. package/dist/builder/make.d.ts +10 -0
  199. package/dist/builder/make.js +120 -0
  200. package/dist/builder/markdown.d.ts +49 -0
  201. package/dist/builder/markdown.js +125 -0
  202. package/dist/builder/marks.d.ts +15 -0
  203. package/dist/builder/marks.js +18 -0
  204. package/dist/builder/merge.d.ts +223 -0
  205. package/dist/builder/merge.js +380 -0
  206. package/dist/builder/meter.d.ts +31 -0
  207. package/dist/builder/meter.js +54 -0
  208. package/dist/builder/mind.d.ts +107 -0
  209. package/dist/builder/mind.js +335 -0
  210. package/dist/builder/names.d.ts +40 -0
  211. package/dist/builder/names.js +189 -0
  212. package/dist/builder/nav.d.ts +28 -0
  213. package/dist/builder/nav.js +218 -0
  214. package/dist/builder/out.d.ts +16 -0
  215. package/dist/builder/out.js +24 -0
  216. package/dist/builder/page.d.ts +55 -0
  217. package/dist/builder/page.js +217 -0
  218. package/dist/builder/pane.d.ts +30 -0
  219. package/dist/builder/pane.js +21 -0
  220. package/dist/builder/panel.d.ts +101 -0
  221. package/dist/builder/panel.js +408 -0
  222. package/dist/builder/pdf.d.ts +139 -0
  223. package/dist/builder/pdf.js +847 -0
  224. package/dist/builder/pick.d.ts +10 -0
  225. package/dist/builder/pick.js +38 -0
  226. package/dist/builder/plain.d.ts +59 -0
  227. package/dist/builder/plain.js +209 -0
  228. package/dist/builder/plan.d.ts +63 -0
  229. package/dist/builder/plan.js +155 -0
  230. package/dist/builder/plans.d.ts +1 -0
  231. package/dist/builder/plans.js +157 -0
  232. package/dist/builder/plugin.d.ts +60 -0
  233. package/dist/builder/plugin.js +1 -0
  234. package/dist/builder/plugins/design.d.ts +8 -0
  235. package/dist/builder/plugins/design.js +71 -0
  236. package/dist/builder/plugins/index.d.ts +46 -0
  237. package/dist/builder/plugins/index.js +117 -0
  238. package/dist/builder/plugins/pdf.d.ts +18 -0
  239. package/dist/builder/plugins/pdf.js +83 -0
  240. package/dist/builder/plugins/project.d.ts +5 -0
  241. package/dist/builder/plugins/project.js +68 -0
  242. package/dist/builder/plugins/research.d.ts +24 -0
  243. package/dist/builder/plugins/research.js +147 -0
  244. package/dist/builder/plugins/sketch.d.ts +9 -0
  245. package/dist/builder/plugins/sketch.js +101 -0
  246. package/dist/builder/plugins/slides.d.ts +14 -0
  247. package/dist/builder/plugins/slides.js +55 -0
  248. package/dist/builder/plugins/template.d.ts +13 -0
  249. package/dist/builder/plugins/template.js +95 -0
  250. package/dist/builder/prefs.d.ts +29 -0
  251. package/dist/builder/prefs.js +91 -0
  252. package/dist/builder/preview-url.d.ts +47 -0
  253. package/dist/builder/preview-url.js +107 -0
  254. package/dist/builder/project.d.ts +18 -0
  255. package/dist/builder/project.js +591 -0
  256. package/dist/builder/prose.d.ts +4 -0
  257. package/dist/builder/prose.js +57 -0
  258. package/dist/builder/publish.d.ts +18 -0
  259. package/dist/builder/publish.js +141 -0
  260. package/dist/builder/question.d.ts +33 -0
  261. package/dist/builder/question.js +64 -0
  262. package/dist/builder/redesign.d.ts +32 -0
  263. package/dist/builder/redesign.js +117 -0
  264. package/dist/builder/removal.d.ts +71 -0
  265. package/dist/builder/removal.js +73 -0
  266. package/dist/builder/reply.d.ts +50 -0
  267. package/dist/builder/reply.js +196 -0
  268. package/dist/builder/roles.d.ts +10 -0
  269. package/dist/builder/roles.js +28 -0
  270. package/dist/builder/route.d.ts +85 -0
  271. package/dist/builder/route.js +126 -0
  272. package/dist/builder/run.d.ts +4 -0
  273. package/dist/builder/run.js +804 -0
  274. package/dist/builder/runmeta.d.ts +16 -0
  275. package/dist/builder/runmeta.js +69 -0
  276. package/dist/builder/say.d.ts +2 -0
  277. package/dist/builder/say.js +7 -0
  278. package/dist/builder/scheduled.d.ts +3 -0
  279. package/dist/builder/scheduled.js +328 -0
  280. package/dist/builder/section.d.ts +27 -0
  281. package/dist/builder/section.js +60 -0
  282. package/dist/builder/settings/account.d.ts +1 -0
  283. package/dist/builder/settings/account.js +111 -0
  284. package/dist/builder/settings/billing.d.ts +1 -0
  285. package/dist/builder/settings/billing.js +210 -0
  286. package/dist/builder/settings/capabilities.d.ts +1 -0
  287. package/dist/builder/settings/capabilities.js +66 -0
  288. package/dist/builder/settings/card.d.ts +31 -0
  289. package/dist/builder/settings/card.js +140 -0
  290. package/dist/builder/settings/code.d.ts +1 -0
  291. package/dist/builder/settings/code.js +70 -0
  292. package/dist/builder/settings/credits.d.ts +10 -0
  293. package/dist/builder/settings/credits.js +123 -0
  294. package/dist/builder/settings/environments.d.ts +1 -0
  295. package/dist/builder/settings/environments.js +60 -0
  296. package/dist/builder/settings/general.d.ts +1 -0
  297. package/dist/builder/settings/general.js +58 -0
  298. package/dist/builder/settings/index.d.ts +4 -0
  299. package/dist/builder/settings/index.js +25 -0
  300. package/dist/builder/settings/integrations.d.ts +8 -0
  301. package/dist/builder/settings/integrations.js +138 -0
  302. package/dist/builder/settings/keys.d.ts +1 -0
  303. package/dist/builder/settings/keys.js +114 -0
  304. package/dist/builder/settings/list.d.ts +10 -0
  305. package/dist/builder/settings/list.js +28 -0
  306. package/dist/builder/settings/machines.d.ts +4 -0
  307. package/dist/builder/settings/machines.js +243 -0
  308. package/dist/builder/settings/members.d.ts +1 -0
  309. package/dist/builder/settings/members.js +77 -0
  310. package/dist/builder/settings/memory.d.ts +1 -0
  311. package/dist/builder/settings/memory.js +62 -0
  312. package/dist/builder/settings/notifications.d.ts +1 -0
  313. package/dist/builder/settings/notifications.js +111 -0
  314. package/dist/builder/settings/plan.d.ts +17 -0
  315. package/dist/builder/settings/plan.js +131 -0
  316. package/dist/builder/settings/privacy.d.ts +1 -0
  317. package/dist/builder/settings/privacy.js +76 -0
  318. package/dist/builder/settings/sections.d.ts +16 -0
  319. package/dist/builder/settings/sections.js +34 -0
  320. package/dist/builder/settings/shared.d.ts +6 -0
  321. package/dist/builder/settings/shared.js +58 -0
  322. package/dist/builder/settings/ui.d.ts +50 -0
  323. package/dist/builder/settings/ui.js +53 -0
  324. package/dist/builder/settings/usage.d.ts +1 -0
  325. package/dist/builder/settings/usage.js +24 -0
  326. package/dist/builder/shared.d.ts +26 -0
  327. package/dist/builder/shared.js +15 -0
  328. package/dist/builder/shelf.d.ts +16 -0
  329. package/dist/builder/shelf.js +219 -0
  330. package/dist/builder/side.d.ts +40 -0
  331. package/dist/builder/side.js +208 -0
  332. package/dist/builder/site.d.ts +75 -0
  333. package/dist/builder/site.js +138 -0
  334. package/dist/builder/spend.d.ts +21 -0
  335. package/dist/builder/spend.js +80 -0
  336. package/dist/builder/standing.d.ts +36 -0
  337. package/dist/builder/standing.js +66 -0
  338. package/dist/builder/suggest.d.ts +238 -0
  339. package/dist/builder/suggest.js +463 -0
  340. package/dist/builder/suggestions.d.ts +49 -0
  341. package/dist/builder/suggestions.js +260 -0
  342. package/dist/builder/summary.d.ts +60 -0
  343. package/dist/builder/summary.js +81 -0
  344. package/dist/builder/sync.d.ts +1 -0
  345. package/dist/builder/sync.js +164 -0
  346. package/dist/builder/tabs.d.ts +85 -0
  347. package/dist/builder/tabs.js +288 -0
  348. package/dist/builder/talk.d.ts +5 -0
  349. package/dist/builder/talk.js +108 -0
  350. package/dist/builder/thread.d.ts +60 -0
  351. package/dist/builder/thread.js +302 -0
  352. package/dist/builder/tools.d.ts +22 -0
  353. package/dist/builder/tools.js +52 -0
  354. package/dist/builder/transcript.d.ts +47 -0
  355. package/dist/builder/transcript.js +108 -0
  356. package/dist/builder/voice.d.ts +8 -0
  357. package/dist/builder/voice.js +24 -0
  358. package/dist/{changedFileKind-DqgCCDUs.js → changedFileKind-D6QYvIez.js} +1 -1
  359. package/dist/core.js +1 -0
  360. package/dist/{decodeImagePreview-CesVZYP4.js → decodeImagePreview-DnfFEjhw.js} +1 -1
  361. package/dist/{embed-DYP-OUlb.js → embed-c030vUqM.js} +11 -11
  362. package/dist/index.d.ts +2 -0
  363. package/dist/index.js +2 -1
  364. package/dist/{micromark-util-decode-string-NQjVkmZH.js → micromark-util-decode-string-C-5AXkOV.js} +5 -3
  365. package/dist/{readBinaryPreview-D2X4Uahu.js → readBinaryPreview-BAQ4fFjm.js} +1 -1
  366. package/dist/{useTextFieldSpeech-CyOZZPrV.js → useTextFieldSpeech-COa9XcRx.js} +1 -1
  367. package/package.json +101 -11
  368. /package/{index.d.ts → dist/core.d.ts} +0 -0
  369. /package/{keymap.d.ts → dist/keymap.d.ts} +0 -0
@@ -0,0 +1,152 @@
1
+ import { type ReactNode } from 'react';
2
+ /** Which half of a tab: what there is to browse and add (first), or what the org already has. */
3
+ export type View = 'discover' | 'yours';
4
+ /** What the shell hands a tab: which half, the search, the Add dialog's state, and where to say how many are yours. */
5
+ export interface Pane {
6
+ view: View;
7
+ q: string;
8
+ adding: boolean;
9
+ onAdding: (open: boolean) => void;
10
+ onView: (v: View) => void;
11
+ onCount: (n: number) => void;
12
+ }
13
+ /** Tells the shell how many are yours, whenever that changes. */
14
+ export declare function useCount(n: number, onCount: (n: number) => void): void;
15
+ /** Whether a row answers a search: every word of it somewhere in the row's text. */
16
+ export { matches } from '../merge.ts';
17
+ /** Cards in as many columns as fit, one column on a phone. */
18
+ export declare function Grid({ children, label }: {
19
+ children: ReactNode;
20
+ label: string;
21
+ }): import("react").JSX.Element;
22
+ /** A square with the thing's picture, or its initial. */
23
+ export declare function Mark({ name, logo, icon, size }: {
24
+ name: string;
25
+ logo?: string;
26
+ icon?: ReactNode;
27
+ size?: number;
28
+ }): import("react").JSX.Element;
29
+ /**
30
+ * One card: what it is, a few lines about it, a quiet fact under them, and its
31
+ * action at the top right. Pressing the card opens it; the action is its own
32
+ * control beside that, never inside it.
33
+ */
34
+ export declare function Tile({ title, detail, meta, mark, action, onOpen, }: {
35
+ title: string;
36
+ detail?: string;
37
+ meta?: string;
38
+ mark?: ReactNode;
39
+ action?: ReactNode;
40
+ onOpen?: () => void;
41
+ }): import("react").JSX.Element;
42
+ /** The one card the shelf puts first, drawn larger. */
43
+ export declare function Featured({ title, detail, meta, mark, action, onOpen }: {
44
+ title: string;
45
+ detail: string;
46
+ meta: string;
47
+ mark: ReactNode;
48
+ action?: ReactNode;
49
+ onOpen: () => void;
50
+ }): import("react").JSX.Element;
51
+ /** A card's add control: Add (Use, for a template one is made from) while it is not yours, Added once it is. */
52
+ export declare function Add({ name, added, busy, onPress, use }: {
53
+ name: string;
54
+ added: boolean;
55
+ busy?: boolean;
56
+ onPress: () => void;
57
+ use?: boolean;
58
+ }): import("react").JSX.Element;
59
+ /**
60
+ * A dialog with a title, a close control and a body that scrolls inside the
61
+ * window; `full`, it is the whole screen on a phone. Opening a `<dialog>`
62
+ * focuses its first focusable element, so the dialog is that element
63
+ * (tabIndex -1, no ring): the close control wears the focus ring only once the
64
+ * keyboard moves to it.
65
+ */
66
+ export declare function Sheet({ title, open, onOpenChange, width, full, children }: {
67
+ title: string;
68
+ open: boolean;
69
+ onOpenChange: (o: boolean) => void;
70
+ width?: number;
71
+ full?: boolean;
72
+ children: ReactNode;
73
+ }): import("react").JSX.Element;
74
+ /** The quiet line for loading, a search that matched nothing, and signed-out. */
75
+ export declare function Soft({ children, action }: {
76
+ children: string;
77
+ action?: ReactNode;
78
+ }): import("react").JSX.Element;
79
+ /** A read that failed: what went wrong in plain words, and the one control that asks again. */
80
+ export declare function Failed({ error, onRetry }: {
81
+ error: unknown;
82
+ onRetry: () => void;
83
+ }): import("react").JSX.Element;
84
+ /** Nothing here yet: what this place holds, and the next step, as buttons. */
85
+ export declare function Empty({ title, detail, children }: {
86
+ title: string;
87
+ detail: string;
88
+ children?: ReactNode;
89
+ }): import("react").JSX.Element;
90
+ /** What a signed-out visitor is told, with the one control that signs them in. */
91
+ export declare function Visitor({ children }: {
92
+ children: string;
93
+ }): import("react").JSX.Element;
94
+ /** What the last action did, said once, where it was done. */
95
+ export declare function Line({ children }: {
96
+ children: string;
97
+ }): import("react").JSX.Element | null;
98
+ /** A small heading over a run of cards. */
99
+ export declare function Part({ title, detail, action, children }: {
100
+ title: string;
101
+ detail: string;
102
+ action?: ReactNode;
103
+ children?: ReactNode;
104
+ }): import("react").JSX.Element;
105
+ /** A labelled control, with a line under it when there is more to say. */
106
+ export declare function Field({ label, hint, children }: {
107
+ label: string;
108
+ hint?: string;
109
+ children: ReactNode;
110
+ }): import("react").JSX.Element;
111
+ /** Two or three choices side by side; the chosen one is filled. A count, when one is given, follows its label. Labels come already said. */
112
+ export declare function Choice<T extends string>({ value, options, onChange, label, }: {
113
+ value: T;
114
+ options: readonly {
115
+ id: T;
116
+ label: string;
117
+ count?: number;
118
+ }[];
119
+ onChange: (v: T) => void;
120
+ label: string;
121
+ }): import("react").JSX.Element;
122
+ /**
123
+ * Compact filter pills for long category lists (e.g., agent categories): shows one clean
124
+ * primary row on desktop (`maxVisibleDesktop`, default 6) and `mobileLimit` (default 4)
125
+ * on narrow screens, collapsing the rest behind a `+{n} more` / `Show less` toggle pill
126
+ * while keeping the active category always visible in the primary row.
127
+ */
128
+ export declare function FilterPills<T extends string>({ value, options, onChange, label, mobileLimit, maxVisibleDesktop, }: {
129
+ value: T;
130
+ options: readonly {
131
+ id: T;
132
+ label: string;
133
+ }[];
134
+ onChange: (v: T) => void;
135
+ label: string;
136
+ mobileLimit?: number;
137
+ maxVisibleDesktop?: number;
138
+ }): import("react").JSX.Element;
139
+ /** A date from Unix seconds, or ''. */
140
+ export declare const day: (s: number) => string;
141
+ export declare function TilesSkeleton({ label, count, withHero }: {
142
+ label: string;
143
+ count?: number;
144
+ withHero?: boolean;
145
+ }): import("react").JSX.Element;
146
+ export declare function RowsSkeleton({ label, count }: {
147
+ label: string;
148
+ count?: number;
149
+ }): import("react").JSX.Element;
150
+ export declare function MenuTrigger({ label }: {
151
+ label: string;
152
+ }): import("react").JSX.Element;
@@ -0,0 +1,208 @@
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * What every Customize tab is drawn from, so the four read as one page: a grid
4
+ * of cards that stacks on a phone, the card itself with its one action, the
5
+ * featured card, a dialog with a title and a scrolling body, a delete that asks
6
+ * first, the empty state that names the next step, a failure with its retry,
7
+ * and the quiet line for loading and signed-out.
8
+ *
9
+ * Their own words are the reader's language (@hanzo/i18n `t`); a title, a
10
+ * line or a label a tab hands them comes already said, since it may be a
11
+ * name or a description that is drawn as given.
12
+ */
13
+ import { SizableText, useMedia, XStack, YStack } from '@hanzo/gui';
14
+ import { useI18n } from '@hanzo/i18n/react';
15
+ import { Check, MoreHorizontal, Plus, X } from '@hanzogui/lucide-icons-2';
16
+ import { Button, Dialog, DialogContent, DialogTitle, Skeleton } from '@hanzo/ui';
17
+ import { useEffect, useId, useState } from 'react';
18
+ import { RING } from '../pane.js';
19
+ import { useHost } from '../host.js';
20
+ import { say } from './say.js';
21
+ /** Tells the shell how many are yours, whenever that changes. */
22
+ export function useCount(n, onCount) {
23
+ useEffect(() => onCount(n), [n, onCount]);
24
+ }
25
+ /** Whether a row answers a search: every word of it somewhere in the row's text. */
26
+ export { matches } from '../merge.js';
27
+ /** Cards in as many columns as fit, one column on a phone. */
28
+ export function Grid({ children, label }) {
29
+ return (_jsx(YStack, { role: "list", "aria-label": label, display: "grid", gridTemplateColumns: "repeat(auto-fill, minmax(min(100%, 290px), 1fr))", gap: "$3.5", width: "100%", children: children }));
30
+ }
31
+ /** A square with the thing's picture, or its initial. */
32
+ export function Mark({ name, logo, icon, size = 32 }) {
33
+ const [gone, setGone] = useState(false);
34
+ return (_jsx(YStack, { width: size, height: size, rounded: "$3", bg: "$raised", items: "center", justify: "center", shrink: 0, overflow: "hidden", "aria-hidden": true, children: logo && !gone ? (_jsx(YStack, { render: "img", ...{ src: logo, alt: '', onError: () => setGone(true) }, width: size, height: size, "$platform-web": { objectFit: 'contain' } })) : ((icon ?? (_jsx(SizableText, { size: "$3", color: "$ink", children: (name.trim().charAt(0) || '?').toUpperCase() })))) }));
35
+ }
36
+ /**
37
+ * One card: what it is, a few lines about it, a quiet fact under them, and its
38
+ * action at the top right. Pressing the card opens it; the action is its own
39
+ * control beside that, never inside it.
40
+ */
41
+ export function Tile({ title, detail, meta, mark, action, onOpen, }) {
42
+ const body = (_jsxs(_Fragment, { children: [mark, _jsxs(YStack, { flex: 1, minW: 0, gap: "$1", children: [_jsx(SizableText, { size: "$3", color: "$ink", numberOfLines: 1, children: title }), detail ? (_jsx(SizableText, { size: "$1", color: "$soft", numberOfLines: 3, children: detail })) : null, meta ? (_jsx(SizableText, { size: "$1", color: "$soft", numberOfLines: 1, opacity: 0.8, children: meta })) : null] })] }));
43
+ return (_jsxs(XStack, { role: "listitem", items: "flex-start", gap: "$2", p: "$3", minW: 0, rounded: "$4", borderWidth: 1, borderColor: "$borderColor", bg: "$panel", hoverStyle: onOpen ? { borderColor: '$edge' } : undefined, children: [onOpen ? (_jsx(XStack, { render: "button", "aria-label": title, onPress: onOpen, flex: 1, minW: 0, gap: "$3", items: "flex-start", cursor: "pointer", "$platform-web": { textAlign: 'start' }, focusVisibleStyle: RING, children: body })) : (_jsx(XStack, { flex: 1, minW: 0, gap: "$3", items: "flex-start", children: body })), action] }));
44
+ }
45
+ /** The one card the shelf puts first, drawn larger. */
46
+ export function Featured({ title, detail, meta, mark, action, onOpen }) {
47
+ const { t } = useI18n();
48
+ return (_jsxs(XStack, { items: "flex-start", gap: "$4", p: "$4", rounded: "$4", borderWidth: 1, borderColor: "$borderColor", bg: "$panel", flexWrap: "wrap", rowGap: "$3", children: [_jsxs(XStack, { render: "button", "aria-label": title, onPress: onOpen, flex: 1, minW: 220, gap: "$4", items: "flex-start", cursor: "pointer", "$platform-web": { textAlign: 'start' }, children: [mark, _jsxs(YStack, { flex: 1, minW: 0, gap: "$1.5", children: [_jsx(SizableText, { size: "$1", color: "$soft", fontWeight: "500", children: t('Featured') }), _jsx(SizableText, { size: "$6", color: "$ink", numberOfLines: 1, children: title }), _jsx(SizableText, { size: "$2", color: "$soft", numberOfLines: 3, children: detail }), _jsx(SizableText, { size: "$1", color: "$soft", numberOfLines: 1, children: meta })] })] }), action] }));
49
+ }
50
+ /** A card's add control: Add (Use, for a template one is made from) while it is not yours, Added once it is. */
51
+ export function Add({ name, added, busy, onPress, use = false }) {
52
+ const { t } = useI18n();
53
+ if (added) {
54
+ return (_jsxs(XStack, { "aria-label": t('{name} is added', { name }), gap: "$1", height: 32, items: "center", shrink: 0, children: [_jsx(Check, { size: 14 }), _jsx(SizableText, { size: "$1", color: "$soft", children: t('Added') })] }));
55
+ }
56
+ return (_jsxs(Button, { size: "sm", variant: "outline", "aria-label": use ? t('Use {name}', { name }) : t('Add {name}', { name }), disabled: busy, onPress: onPress, children: [_jsx(Plus, { size: 14 }), " ", use ? t('Use') : t('Add')] }));
57
+ }
58
+ /**
59
+ * A phone's whole screen, clear of the notch and the home bar: pinned to the
60
+ * viewport, since the `<dialog>` around it is inset by its padding and the
61
+ * page's scrollbar gutter, and out of @hanzo/ui's floating-card glass, which
62
+ * it draws on `[data-slot="dialog-content"]`.
63
+ */
64
+ const SCREEN = {
65
+ 'data-slot': 'dialog-screen',
66
+ position: 'fixed',
67
+ t: 0,
68
+ l: 0,
69
+ width: '100vw',
70
+ maxW: '100vw',
71
+ height: '100dvh',
72
+ maxH: '100dvh',
73
+ rounded: 0,
74
+ borderWidth: 0,
75
+ pt: 'max(16px, env(safe-area-inset-top))',
76
+ pr: 'max(16px, env(safe-area-inset-right))',
77
+ pb: 'max(16px, env(safe-area-inset-bottom))',
78
+ pl: 'max(16px, env(safe-area-inset-left))',
79
+ };
80
+ /**
81
+ * A dialog with a title, a close control and a body that scrolls inside the
82
+ * window; `full`, it is the whole screen on a phone. Opening a `<dialog>`
83
+ * focuses its first focusable element, so the dialog is that element
84
+ * (tabIndex -1, no ring): the close control wears the focus ring only once the
85
+ * keyboard moves to it.
86
+ */
87
+ export function Sheet({ title, open, onOpenChange, width = 560, full = false, children }) {
88
+ const { t } = useI18n();
89
+ const screen = full && !useMedia().sm;
90
+ return (_jsx(Dialog, { open: open, onOpenChange: onOpenChange, children: _jsxs(DialogContent, { maxW: width, showCloseButton: false, maxH: "88vh", gap: "$3", tabIndex: -1, focusVisibleStyle: { outlineWidth: 0 }, ...(screen ? SCREEN : null), children: [_jsxs(XStack, { items: "center", justify: "space-between", gap: "$2", children: [_jsx(DialogTitle, { numberOfLines: 1, flex: 1, children: title }), _jsx(XStack, { render: "button", "aria-label": t('Close'), onPress: () => onOpenChange(false), width: 32, height: 32, mr: -6, rounded: 999, items: "center", justify: "center", shrink: 0, cursor: "pointer", hoverStyle: { bg: '$hover' }, focusVisibleStyle: RING, "$max-sm": { width: 44, height: 44, mr: -12 }, children: _jsx(X, { size: 16 }) })] }), _jsx(YStack, { gap: "$3", overflow: "scroll", minH: 0, shrink: 1, children: children })] }) }));
91
+ }
92
+ /** The quiet line for loading, a search that matched nothing, and signed-out. */
93
+ export function Soft({ children, action }) {
94
+ return (_jsxs(YStack, { py: "$6", items: "center", gap: "$3", children: [_jsx(SizableText, { size: "$2", color: "$soft", text: "center", children: children }), action] }));
95
+ }
96
+ /** A read that failed: what went wrong in plain words, and the one control that asks again. */
97
+ export function Failed({ error, onRetry }) {
98
+ const { t } = useI18n();
99
+ return (_jsxs(YStack, { py: "$6", items: "center", gap: "$3", role: "alert", children: [_jsx(SizableText, { size: "$2", color: "$soft", text: "center", children: say(error, t) }), _jsx(Button, { size: "sm", variant: "outline", onPress: onRetry, children: t('Try again') })] }));
100
+ }
101
+ /** Nothing here yet: what this place holds, and the next step, as buttons. */
102
+ export function Empty({ title, detail, children }) {
103
+ return (_jsxs(YStack, { py: "$8", px: "$5", items: "center", gap: "$3", rounded: "$4", borderWidth: 1, borderColor: "var(--border-strong)", bg: "$panel", children: [_jsxs(YStack, { items: "center", gap: "$1.5", maxW: 420, children: [_jsx(SizableText, { size: "$4", fontWeight: "600", color: "$ink", text: "center", children: title }), detail ? (_jsx(SizableText, { size: "$2", color: "$soft", text: "center", children: detail })) : null] }), children ? (_jsx(XStack, { gap: "$2", flexWrap: "wrap", justify: "center", children: children })) : null] }));
104
+ }
105
+ /** What a signed-out visitor is told, with the one control that signs them in. */
106
+ export function Visitor({ children }) {
107
+ const { t } = useI18n();
108
+ const host = useHost();
109
+ return (_jsx(Soft, { action: _jsx(Button, { size: "sm", onPress: () => host.signIn?.(), children: t('Sign in') }), children: children }));
110
+ }
111
+ /** What the last action did, said once, where it was done. */
112
+ export function Line({ children }) {
113
+ if (!children)
114
+ return null;
115
+ return (_jsx(SizableText, { size: "$1", color: "$soft", role: "status", children: children }));
116
+ }
117
+ /** A small heading over a run of cards. */
118
+ export function Part({ title, detail, action, children }) {
119
+ return (_jsxs(YStack, { gap: "$2.5", render: "section", "aria-label": title, children: [_jsxs(XStack, { items: "center", gap: "$3", children: [_jsxs(YStack, { flex: 1, minW: 0, gap: "$0.5", children: [_jsx(SizableText, { render: "h2", size: "$4", color: "$ink", children: title }), detail ? (_jsx(SizableText, { size: "$2", color: "$soft", children: detail })) : null] }), action] }), children] }));
120
+ }
121
+ /** A labelled control, with a line under it when there is more to say. */
122
+ export function Field({ label, hint, children }) {
123
+ return (_jsxs(YStack, { gap: "$1.5", children: [_jsx(SizableText, { size: "$2", color: "$ink", children: label }), children, hint ? (_jsx(SizableText, { size: "$1", color: "$soft", children: hint })) : null] }));
124
+ }
125
+ /** Two or three choices side by side; the chosen one is filled. A count, when one is given, follows its label. Labels come already said. */
126
+ export function Choice({ value, options, onChange, label, }) {
127
+ const { t } = useI18n();
128
+ const groupId = useId();
129
+ return (_jsx(XStack, { role: "group", "aria-label": label, p: 2, gap: 2, rounded: "$3", borderWidth: 1, borderColor: "var(--border-strong)", bg: "$panel", self: "flex-start", shrink: 0, children: options.map((o, idx) => {
130
+ const active = o.id === value;
131
+ return (_jsxs(XStack, { id: `${groupId}-${idx}`, render: "button", "aria-pressed": active, "aria-label": o.count ? t('{label}, {count}', { label: o.label, count: o.count }) : o.label, onPress: () => onChange(o.id), onKeyDown: (e) => {
132
+ const step = e.key === 'ArrowRight' ? 1 : e.key === 'ArrowLeft' ? -1 : 0;
133
+ if (!step)
134
+ return;
135
+ e.preventDefault?.();
136
+ const nextIdx = (idx + step + options.length) % options.length;
137
+ const next = options[nextIdx];
138
+ if (!next)
139
+ return;
140
+ onChange(next.id);
141
+ queueMicrotask(() => document.getElementById(`${groupId}-${nextIdx}`)?.focus());
142
+ }, items: "center", gap: "$1.5", px: "$3", py: "$1", minH: 30, focusVisibleStyle: RING, children: [_jsx(SizableText, { size: "$2", fontWeight: active ? '500' : '400', color: active ? '$ink' : '$soft', children: o.label }), o.count ? (_jsx(SizableText, { size: "$1", color: "$soft", fontVariant: ['tabular-nums'], children: o.count })) : null] }, o.id));
143
+ }) }));
144
+ }
145
+ /**
146
+ * Compact filter pills for long category lists (e.g., agent categories): shows one clean
147
+ * primary row on desktop (`maxVisibleDesktop`, default 6) and `mobileLimit` (default 4)
148
+ * on narrow screens, collapsing the rest behind a `+{n} more` / `Show less` toggle pill
149
+ * while keeping the active category always visible in the primary row.
150
+ */
151
+ export function FilterPills({ value, options, onChange, label, mobileLimit = 4, maxVisibleDesktop = 6, }) {
152
+ const { t } = useI18n();
153
+ const wide = Boolean(useMedia().sm);
154
+ const groupId = useId();
155
+ const [expanded, setExpanded] = useState(false);
156
+ const limit = Math.max(1, wide ? maxVisibleDesktop : mobileLimit);
157
+ const hasOverflow = options.length > limit;
158
+ const compact = !expanded && hasOverflow;
159
+ const visible = compact
160
+ ? (() => {
161
+ const base = options.slice(0, limit);
162
+ if (base.some((o) => o.id === value))
163
+ return base;
164
+ const chosen = options.find((o) => o.id === value);
165
+ return chosen ? [...base.slice(0, Math.max(1, limit - 1)), chosen] : base;
166
+ })()
167
+ : options;
168
+ const hiddenCount = options.length - visible.length;
169
+ const moveFocus = (nextIdx) => {
170
+ const clamped = (nextIdx + visible.length) % visible.length;
171
+ queueMicrotask(() => document.getElementById(`${groupId}-pill-${clamped}`)?.focus());
172
+ };
173
+ return (_jsxs(XStack, { role: "group", "aria-label": label, flexWrap: "wrap", gap: "$1.5", rowGap: "$1.5", width: "100%", onKeyDown: ((e) => {
174
+ if (e.key === 'Escape' && expanded)
175
+ setExpanded(false);
176
+ }), children: [visible.map((o, idx) => {
177
+ const active = o.id === value;
178
+ return (_jsx(XStack, { id: `${groupId}-pill-${idx}`, render: "button", "aria-pressed": active, "aria-label": o.label, onPress: () => onChange(o.id), onKeyDown: ((e) => {
179
+ if (e.key === 'ArrowRight') {
180
+ e.preventDefault?.();
181
+ moveFocus(idx + 1);
182
+ }
183
+ else if (e.key === 'ArrowLeft') {
184
+ e.preventDefault?.();
185
+ moveFocus(idx - 1);
186
+ }
187
+ else if (e.key === 'Home') {
188
+ e.preventDefault?.();
189
+ moveFocus(0);
190
+ }
191
+ else if (e.key === 'End') {
192
+ e.preventDefault?.();
193
+ moveFocus(visible.length - 1);
194
+ }
195
+ }), items: "center", px: "$3", py: "$1", minH: 30, focusVisibleStyle: RING, children: _jsx(SizableText, { size: "$1", fontWeight: active ? '500' : '400', color: active ? '$background' : '$soft', children: o.label }) }, o.id));
196
+ }), hasOverflow ? (_jsx(XStack, { render: "button", "aria-expanded": expanded, "aria-label": expanded ? t('Show fewer categories') : t('Show {n} more categories', { n: hiddenCount }), onPress: () => setExpanded((e) => !e), items: "center", px: "$3", py: "$1", minH: 30, focusVisibleStyle: RING, children: _jsx(SizableText, { size: "$1", fontWeight: "500", color: "$ink", children: expanded ? t('Show less') : t('+{n} more', { n: hiddenCount }) }) })) : null] }));
197
+ }
198
+ /** A date from Unix seconds, or ''. */
199
+ export const day = (s) => (s ? new Date(s * 1000).toLocaleDateString(undefined, { year: 'numeric', month: 'short', day: 'numeric' }) : '');
200
+ export function TilesSkeleton({ label, count = 6, withHero = false }) {
201
+ return (_jsxs(YStack, { role: "status", "aria-busy": true, "aria-label": label, gap: "$3", width: "100%", children: [withHero ? (_jsxs(XStack, { items: "flex-start", gap: "$4", p: "$4", rounded: "$4", borderWidth: 1, borderColor: "$borderColor", bg: "$panel", children: [_jsx(Skeleton, { layout: "block", width: 48, height: 48, rounded: "$3", shrink: 0 }), _jsxs(YStack, { flex: 1, minW: 0, gap: "$2", children: [_jsx(Skeleton, { layout: "block", width: 64, height: 10, rounded: "$2" }), _jsx(Skeleton, { layout: "block", width: "42%", height: 18, rounded: "$2" }), _jsx(Skeleton, { layout: "block", width: "84%", height: 12, rounded: "$2" }), _jsx(Skeleton, { layout: "block", width: "32%", height: 10, rounded: "$2" })] })] })) : null, _jsx(Grid, { label: label, children: Array.from({ length: count }, (_, i) => (_jsxs(XStack, { items: "flex-start", gap: "$3", p: "$3", rounded: "$4", borderWidth: 1, borderColor: "$borderColor", bg: "$panel", children: [_jsx(Skeleton, { layout: "block", width: 32, height: 32, rounded: "$3", shrink: 0 }), _jsxs(YStack, { flex: 1, minW: 0, gap: "$1.5", children: [_jsx(Skeleton, { layout: "block", width: i % 2 === 0 ? '54%' : '44%', height: 14, rounded: "$2" }), _jsx(Skeleton, { layout: "block", width: "90%", height: 11, rounded: "$2" }), _jsx(Skeleton, { layout: "block", width: i % 2 === 0 ? '64%' : '72%', height: 11, rounded: "$2" })] })] }, i))) })] }));
202
+ }
203
+ export function RowsSkeleton({ label, count = 4 }) {
204
+ return (_jsx(YStack, { role: "status", "aria-busy": true, "aria-label": label, gap: "$2", width: "100%", children: Array.from({ length: count }, (_, i) => (_jsxs(XStack, { items: "center", gap: "$3", px: "$3", py: "$2.5", minH: 48, rounded: "$3", borderWidth: 1, borderColor: "$borderColor", bg: "$panel", children: [_jsxs(YStack, { flex: 1, minW: 0, gap: "$1.5", children: [_jsx(Skeleton, { layout: "block", width: i % 2 === 0 ? '38%' : '48%', height: 13, rounded: "$2" }), _jsx(Skeleton, { layout: "block", width: i % 2 === 0 ? '74%' : '62%', height: 10, rounded: "$2" })] }), _jsx(Skeleton, { layout: "block", width: 28, height: 14, rounded: "$2", shrink: 0 })] }, i))) }));
205
+ }
206
+ export function MenuTrigger({ label }) {
207
+ return (_jsx(XStack, { render: "button", "aria-label": label, width: 32, height: 32, items: "center", justify: "center", shrink: 0, focusVisibleStyle: RING, children: _jsx(MoreHorizontal, { size: 15, color: "$soft", "aria-hidden": true }) }));
208
+ }
@@ -0,0 +1,57 @@
1
+ import type { Target } from './api/call.ts';
2
+ import { type Place } from './api/places.ts';
3
+ import { type Project } from './api/projects.ts';
4
+ import { type Detail, type Event, type Session } from './api/sessions.ts';
5
+ export interface Read<T> {
6
+ value: T;
7
+ error: Error | null;
8
+ loading: boolean;
9
+ reload: () => void;
10
+ }
11
+ /** Run `load` whenever `key` changes (and on `reload`), keeping the last good value. */
12
+ export declare function useRead<T>(load: (() => Promise<T>) | null, initial: T, key: unknown[]): Read<T>;
13
+ /** How long a read is waited on before the screen says it is taking too long. */
14
+ export declare const WAIT = 15000;
15
+ /** A read that did not answer in time. Its message is ours, marked, so a screen drawing it through `t` says it in the reader's language. */
16
+ export declare class Slow extends Error {
17
+ constructor();
18
+ }
19
+ /**
20
+ * A read drawn at once from what this page last read under the same `key`, then
21
+ * read again behind it: stale while it revalidates, so moving between tabs is
22
+ * instant and a list never blanks to "reading" on the way back. A read that has
23
+ * not answered after `wait` ms is let go, as `Slow`. A null key reads nothing.
24
+ */
25
+ export declare function useCached<T>(key: string | null, load: (signal: AbortSignal) => Promise<T>, initial: T, wait?: number): Read<T>;
26
+ /**
27
+ * The org's conversations and coding runs, newest first, kept current by the
28
+ * org's own session stream: a status that moves moves its dot, and one started
29
+ * anywhere appears. A conversation's own coding runs are in its tree, not here:
30
+ * the platform lists roots.
31
+ */
32
+ export declare function useRecents(t: Target, signed: boolean): Read<Session[]>;
33
+ export declare function usePlaces(t: Target, signed: boolean): Read<Place[]>;
34
+ export declare function useProjects(t: Target, signed: boolean): Read<Project[]>;
35
+ /** A value kept in this browser, per key; storage that throws keeps it in memory. */
36
+ export declare function useKept<T>(key: string, initial: T): [T, (v: T) => void];
37
+ export interface RunState {
38
+ detail: Read<Detail | null>;
39
+ /**
40
+ * The run's record, as last read or pushed: status, branch, pull request.
41
+ * The coding service writes it; events are the narration, and any member of
42
+ * the org can append one, so a link or a branch is never taken from them.
43
+ */
44
+ record: Session | null;
45
+ /** Every turn, recorded and live, in order. */
46
+ events: Event[];
47
+ /** The run's status as last reported by the record or the feed. */
48
+ status: string;
49
+ /** Why the feed stopped, when it was refused. */
50
+ refused: string;
51
+ }
52
+ /**
53
+ * One run: the recorded detail, then the live feed added to it. A reconnect
54
+ * after a drop re-reads the detail — frames missed while dropped are only in
55
+ * the record. `id` null reads nothing.
56
+ */
57
+ export declare function useRun(t: Target, id: string | null): RunState;