@justanarthur/modo-ui-ai 0.0.0-stage → 0.3.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 (343) hide show
  1. package/LICENSE +21 -0
  2. package/LICENSE.fluid-functionalism +21 -0
  3. package/README.md +105 -2
  4. package/blocks/conversation/agent-prompt/examples.mdx +44 -0
  5. package/blocks/conversation/agent-prompt/index.tsx +114 -0
  6. package/blocks/conversation/composer/draft.css +25 -0
  7. package/blocks/conversation/composer/draft.tsx +589 -0
  8. package/blocks/conversation/composer/examples.mdx +164 -0
  9. package/blocks/conversation/composer/file-preview-tile.tsx +59 -0
  10. package/blocks/conversation/composer/file-thumbnail.tsx +146 -0
  11. package/blocks/conversation/composer/index.tsx +651 -0
  12. package/blocks/conversation/composer/queued-row.tsx +102 -0
  13. package/blocks/conversation/composer/shared.ts +38 -0
  14. package/blocks/conversation/composer/suggestion-row.tsx +64 -0
  15. package/blocks/conversation/composer/use-composer-files.ts +142 -0
  16. package/blocks/conversation/composer/use-history-nav.ts +60 -0
  17. package/blocks/conversation/composer/use-message-queue.ts +108 -0
  18. package/blocks/conversation/composer/use-region-height.ts +34 -0
  19. package/blocks/conversation/failure-states/examples.mdx +58 -0
  20. package/blocks/conversation/failure-states/index.tsx +274 -0
  21. package/blocks/conversation/transcript/examples.mdx +43 -0
  22. package/blocks/conversation/transcript/index.tsx +206 -0
  23. package/blocks/conversation/transcript-search/examples.mdx +50 -0
  24. package/blocks/conversation/transcript-search/index.tsx +469 -0
  25. package/blocks/dialogs/command-palette/examples.mdx +50 -0
  26. package/blocks/dialogs/command-palette/index.tsx +239 -0
  27. package/blocks/dialogs/hook-dialog/examples.mdx +44 -0
  28. package/blocks/dialogs/hook-dialog/index.tsx +286 -0
  29. package/blocks/dialogs/mcp-server-dialog/examples.mdx +57 -0
  30. package/blocks/dialogs/mcp-server-dialog/index.tsx +415 -0
  31. package/blocks/dialogs/shortcuts-sheet/examples.mdx +36 -0
  32. package/blocks/dialogs/shortcuts-sheet/index.tsx +186 -0
  33. package/blocks/panes/artifacts-pane/examples.mdx +23 -0
  34. package/blocks/panes/artifacts-pane/index.tsx +82 -0
  35. package/blocks/panes/changes-pane/examples.mdx +23 -0
  36. package/blocks/panes/changes-pane/index.tsx +248 -0
  37. package/blocks/panes/file-pane/examples.mdx +13 -0
  38. package/blocks/panes/file-pane/index.tsx +102 -0
  39. package/blocks/panes/pr-pane/examples.mdx +13 -0
  40. package/blocks/panes/pr-pane/index.tsx +191 -0
  41. package/blocks/panes/side-pane/examples.mdx +58 -0
  42. package/blocks/panes/side-pane/index.tsx +187 -0
  43. package/blocks/panes/tasks-pane/examples.mdx +23 -0
  44. package/blocks/panes/tasks-pane/index.tsx +127 -0
  45. package/blocks/panes/terminal-pane/examples.mdx +13 -0
  46. package/blocks/panes/terminal-pane/index.tsx +99 -0
  47. package/blocks/panes/usage-pane/examples.mdx +23 -0
  48. package/blocks/panes/usage-pane/index.tsx +78 -0
  49. package/blocks/profiles/profile-onboarding/examples.mdx +80 -0
  50. package/blocks/profiles/profile-onboarding/index.tsx +580 -0
  51. package/blocks/profiles/profile-switcher/examples.mdx +29 -0
  52. package/blocks/profiles/profile-switcher/index.tsx +212 -0
  53. package/blocks/profiles/profile-usage/examples.mdx +41 -0
  54. package/blocks/profiles/profile-usage/index.tsx +141 -0
  55. package/blocks/sessions/inbox/examples.mdx +35 -0
  56. package/blocks/sessions/inbox/index.tsx +372 -0
  57. package/blocks/sessions/session-board/examples.mdx +34 -0
  58. package/blocks/sessions/session-board/index.tsx +570 -0
  59. package/blocks/sessions/session-sidebar/examples.mdx +93 -0
  60. package/blocks/sessions/session-sidebar/index.tsx +497 -0
  61. package/blocks/settings/extensions/examples.mdx +10 -0
  62. package/blocks/settings/extensions/index.tsx +72 -0
  63. package/blocks/settings/hooks/examples.mdx +16 -0
  64. package/blocks/settings/hooks/index.tsx +127 -0
  65. package/blocks/settings/mcp-servers/examples.mdx +26 -0
  66. package/blocks/settings/mcp-servers/index.tsx +204 -0
  67. package/blocks/settings/memory/examples.mdx +22 -0
  68. package/blocks/settings/memory/index.tsx +113 -0
  69. package/blocks/settings/notifications/examples.mdx +8 -0
  70. package/blocks/settings/notifications/index.tsx +63 -0
  71. package/blocks/settings/permission-rules/examples.mdx +37 -0
  72. package/blocks/settings/permission-rules/index.tsx +317 -0
  73. package/blocks/settings/plugin-catalog/examples.mdx +52 -0
  74. package/blocks/settings/plugin-catalog/index.tsx +407 -0
  75. package/blocks/settings/plugins/examples.mdx +10 -0
  76. package/blocks/settings/plugins/index.tsx +72 -0
  77. package/blocks/settings/settings-window/examples.mdx +40 -0
  78. package/blocks/settings/settings-window/index.tsx +188 -0
  79. package/blocks/settings/worktrees/examples.mdx +17 -0
  80. package/blocks/settings/worktrees/index.tsx +145 -0
  81. package/components/conversation/agent-run/examples.mdx +38 -0
  82. package/components/conversation/agent-run/index.tsx +83 -0
  83. package/components/conversation/chapter-nav/examples.mdx +30 -0
  84. package/components/conversation/chapter-nav/index.tsx +123 -0
  85. package/components/conversation/message/examples.mdx +53 -0
  86. package/components/conversation/message/index.tsx +130 -0
  87. package/components/conversation/message/working.tsx +102 -0
  88. package/components/conversation/reasoning/examples.mdx +32 -0
  89. package/components/conversation/reasoning/index.tsx +55 -0
  90. package/components/conversation/recap/examples.mdx +21 -0
  91. package/components/conversation/recap/index.tsx +67 -0
  92. package/components/conversation/todo-list/examples.mdx +32 -0
  93. package/components/conversation/todo-list/index.tsx +106 -0
  94. package/components/conversation/tool-call/examples.mdx +48 -0
  95. package/components/conversation/tool-call/index.tsx +142 -0
  96. package/components/conversation/work-summary/examples.mdx +50 -0
  97. package/components/conversation/work-summary/index.tsx +87 -0
  98. package/components/prompts/permission-request/examples.mdx +32 -0
  99. package/components/prompts/permission-request/index.tsx +74 -0
  100. package/components/prompts/plan-approval/examples.mdx +37 -0
  101. package/components/prompts/plan-approval/index.tsx +76 -0
  102. package/components/prompts/prompt-card/examples.mdx +31 -0
  103. package/components/prompts/prompt-card/index.tsx +82 -0
  104. package/components/prompts/question-prompt/examples.mdx +46 -0
  105. package/components/prompts/question-prompt/index.tsx +118 -0
  106. package/dist/blocks/conversation/agent-prompt/index.d.ts +7 -0
  107. package/dist/blocks/conversation/agent-prompt/index.js +13 -0
  108. package/dist/blocks/conversation/composer/index.d.ts +4 -0
  109. package/dist/blocks/conversation/composer/index.js +16 -0
  110. package/dist/blocks/conversation/failure-states/index.d.ts +4 -0
  111. package/dist/blocks/conversation/failure-states/index.js +8 -0
  112. package/dist/blocks/conversation/transcript/index.d.ts +50 -0
  113. package/dist/blocks/conversation/transcript/index.js +17 -0
  114. package/dist/blocks/conversation/transcript-search/index.d.ts +4 -0
  115. package/dist/blocks/conversation/transcript-search/index.js +11 -0
  116. package/dist/blocks/dialogs/command-palette/index.d.ts +5 -0
  117. package/dist/blocks/dialogs/command-palette/index.js +20 -0
  118. package/dist/blocks/dialogs/hook-dialog/index.d.ts +3 -0
  119. package/dist/blocks/dialogs/hook-dialog/index.js +12 -0
  120. package/dist/blocks/dialogs/mcp-server-dialog/index.d.ts +5 -0
  121. package/dist/blocks/dialogs/mcp-server-dialog/index.js +12 -0
  122. package/dist/blocks/dialogs/shortcuts-sheet/index.d.ts +2 -0
  123. package/dist/blocks/dialogs/shortcuts-sheet/index.js +11 -0
  124. package/dist/blocks/panes/artifacts-pane/index.d.ts +3 -0
  125. package/dist/blocks/panes/artifacts-pane/index.js +9 -0
  126. package/dist/blocks/panes/changes-pane/index.d.ts +3 -0
  127. package/dist/blocks/panes/changes-pane/index.js +9 -0
  128. package/dist/blocks/panes/file-pane/index.d.ts +3 -0
  129. package/dist/blocks/panes/file-pane/index.js +9 -0
  130. package/dist/blocks/panes/pr-pane/index.d.ts +3 -0
  131. package/dist/blocks/panes/pr-pane/index.js +10 -0
  132. package/dist/blocks/panes/side-pane/index.d.ts +5 -0
  133. package/dist/blocks/panes/side-pane/index.js +21 -0
  134. package/dist/blocks/panes/tasks-pane/index.d.ts +3 -0
  135. package/dist/blocks/panes/tasks-pane/index.js +10 -0
  136. package/dist/blocks/panes/terminal-pane/index.d.ts +3 -0
  137. package/dist/blocks/panes/terminal-pane/index.js +9 -0
  138. package/dist/blocks/panes/usage-pane/index.d.ts +4 -0
  139. package/dist/blocks/panes/usage-pane/index.js +11 -0
  140. package/dist/blocks/profiles/profile-onboarding/index.d.ts +4 -0
  141. package/dist/blocks/profiles/profile-onboarding/index.js +11 -0
  142. package/dist/blocks/profiles/profile-switcher/index.d.ts +4 -0
  143. package/dist/blocks/profiles/profile-switcher/index.js +12 -0
  144. package/dist/blocks/profiles/profile-usage/index.d.ts +4 -0
  145. package/dist/blocks/profiles/profile-usage/index.js +10 -0
  146. package/dist/blocks/sessions/inbox/index.d.ts +2 -0
  147. package/dist/blocks/sessions/inbox/index.js +11 -0
  148. package/dist/blocks/sessions/session-board/index.d.ts +4 -0
  149. package/dist/blocks/sessions/session-board/index.js +27 -0
  150. package/dist/blocks/sessions/session-sidebar/index.d.ts +5 -0
  151. package/dist/blocks/sessions/session-sidebar/index.js +15 -0
  152. package/dist/blocks/settings/extensions/index.d.ts +2 -0
  153. package/dist/blocks/settings/extensions/index.js +9 -0
  154. package/dist/blocks/settings/hooks/index.d.ts +4 -0
  155. package/dist/blocks/settings/hooks/index.js +9 -0
  156. package/dist/blocks/settings/mcp-servers/index.d.ts +4 -0
  157. package/dist/blocks/settings/mcp-servers/index.js +9 -0
  158. package/dist/blocks/settings/memory/index.d.ts +4 -0
  159. package/dist/blocks/settings/memory/index.js +8 -0
  160. package/dist/blocks/settings/notifications/index.d.ts +2 -0
  161. package/dist/blocks/settings/notifications/index.js +8 -0
  162. package/dist/blocks/settings/permission-rules/index.d.ts +3 -0
  163. package/dist/blocks/settings/permission-rules/index.js +10 -0
  164. package/dist/blocks/settings/plugin-catalog/index.d.ts +2 -0
  165. package/dist/blocks/settings/plugin-catalog/index.js +11 -0
  166. package/dist/blocks/settings/plugins/index.d.ts +4 -0
  167. package/dist/blocks/settings/plugins/index.js +9 -0
  168. package/dist/blocks/settings/settings-window/index.d.ts +4 -0
  169. package/dist/blocks/settings/settings-window/index.js +8 -0
  170. package/dist/blocks/settings/worktrees/index.d.ts +4 -0
  171. package/dist/blocks/settings/worktrees/index.js +9 -0
  172. package/dist/components/conversation/agent-run/index.d.ts +3 -0
  173. package/dist/components/conversation/agent-run/index.js +10 -0
  174. package/dist/components/conversation/chapter-nav/index.d.ts +2 -0
  175. package/dist/components/conversation/chapter-nav/index.js +11 -0
  176. package/dist/components/conversation/message/index.d.ts +2 -0
  177. package/dist/components/conversation/message/index.js +15 -0
  178. package/dist/components/conversation/reasoning/index.d.ts +2 -0
  179. package/dist/components/conversation/reasoning/index.js +8 -0
  180. package/dist/components/conversation/recap/index.d.ts +2 -0
  181. package/dist/components/conversation/recap/index.js +9 -0
  182. package/dist/components/conversation/todo-list/index.d.ts +2 -0
  183. package/dist/components/conversation/todo-list/index.js +9 -0
  184. package/dist/components/conversation/tool-call/index.d.ts +3 -0
  185. package/dist/components/conversation/tool-call/index.js +13 -0
  186. package/dist/components/conversation/work-summary/index.d.ts +2 -0
  187. package/dist/components/conversation/work-summary/index.js +10 -0
  188. package/dist/components/prompts/permission-request/index.d.ts +2 -0
  189. package/dist/components/prompts/permission-request/index.js +9 -0
  190. package/dist/components/prompts/plan-approval/index.d.ts +2 -0
  191. package/dist/components/prompts/plan-approval/index.js +9 -0
  192. package/dist/components/prompts/prompt-card/index.d.ts +3 -0
  193. package/dist/components/prompts/prompt-card/index.js +8 -0
  194. package/dist/components/prompts/question-prompt/index.d.ts +2 -0
  195. package/dist/components/prompts/question-prompt/index.js +9 -0
  196. package/dist/index.d.ts +50 -0
  197. package/dist/index.js +231 -0
  198. package/dist/lib/config-parts.d.ts +2 -0
  199. package/dist/lib/config-parts.js +16 -0
  200. package/dist/lib/icons.d.ts +2 -0
  201. package/dist/lib/icons.js +10 -0
  202. package/dist/lib/pace-bar.d.ts +11 -0
  203. package/dist/lib/pace-bar.js +6 -0
  204. package/dist/lib/pace.d.ts +4 -0
  205. package/dist/lib/pace.js +14 -0
  206. package/dist/lib/pane-parts.d.ts +25 -0
  207. package/dist/lib/pane-parts.js +11 -0
  208. package/dist/lib/row-trigger.d.ts +5 -0
  209. package/dist/lib/row-trigger.js +7 -0
  210. package/dist/lib/settings-parts.d.ts +70 -0
  211. package/dist/lib/settings-parts.js +24 -0
  212. package/dist/lib/side-pane-types.d.ts +2 -0
  213. package/dist/lib/side-pane-types.js +1 -0
  214. package/dist/lib/status-glyph.d.ts +8 -0
  215. package/dist/lib/status-glyph.js +12 -0
  216. package/dist/lib/types.d.ts +3 -0
  217. package/dist/lib/types.js +1 -0
  218. package/dist/shared/chunk-04a497rr.js +21 -0
  219. package/dist/shared/chunk-13yf0mza.d.ts +70 -0
  220. package/dist/shared/chunk-1hzrm8r5.d.ts +51 -0
  221. package/dist/shared/chunk-1qdwg7w5.d.ts +81 -0
  222. package/dist/shared/chunk-1yt061np.d.ts +64 -0
  223. package/dist/shared/chunk-218qabm5.js +250 -0
  224. package/dist/shared/chunk-2fk5aq60.js +313 -0
  225. package/dist/shared/chunk-3ps5h55t.d.ts +30 -0
  226. package/dist/shared/chunk-3yaftgh0.d.ts +28 -0
  227. package/dist/shared/chunk-4zvhpf2x.js +55 -0
  228. package/dist/shared/chunk-57hzzmjd.d.ts +67 -0
  229. package/dist/shared/chunk-58jh3mje.js +46 -0
  230. package/dist/shared/chunk-58qvny6a.d.ts +29 -0
  231. package/dist/shared/chunk-5fhkkn39.js +130 -0
  232. package/dist/shared/chunk-5hw0525a.d.ts +33 -0
  233. package/dist/shared/chunk-5meda998.js +238 -0
  234. package/dist/shared/chunk-5pqksw7z.js +91 -0
  235. package/dist/shared/chunk-6220dy5n.js +70 -0
  236. package/dist/shared/chunk-64bnh22t.d.ts +59 -0
  237. package/dist/shared/chunk-66sh633m.d.ts +60 -0
  238. package/dist/shared/chunk-6cmf27g3.d.ts +81 -0
  239. package/dist/shared/chunk-6kwk9vag.js +558 -0
  240. package/dist/shared/chunk-6rdwkymk.js +177 -0
  241. package/dist/shared/chunk-71j8qzvb.d.ts +57 -0
  242. package/dist/shared/chunk-74bvf3tw.d.ts +21 -0
  243. package/dist/shared/chunk-75zwypyr.d.ts +43 -0
  244. package/dist/shared/chunk-7mfer3tp.js +176 -0
  245. package/dist/shared/chunk-7rzjmcnh.d.ts +30 -0
  246. package/dist/shared/chunk-7zvb39cf.d.ts +26 -0
  247. package/dist/shared/chunk-8mecznyr.js +357 -0
  248. package/dist/shared/chunk-8pag6vmd.js +255 -0
  249. package/dist/shared/chunk-94grzz9f.js +187 -0
  250. package/dist/shared/chunk-9kw6m047.d.ts +32 -0
  251. package/dist/shared/chunk-at0jje23.d.ts +110 -0
  252. package/dist/shared/chunk-awd573h9.js +34 -0
  253. package/dist/shared/chunk-b171wjge.d.ts +25 -0
  254. package/dist/shared/chunk-b4dz15em.d.ts +36 -0
  255. package/dist/shared/chunk-b5ccp5de.js +35 -0
  256. package/dist/shared/chunk-bh2b5d1z.js +98 -0
  257. package/dist/shared/chunk-c36qvrwq.d.ts +30 -0
  258. package/dist/shared/chunk-c8wp058j.js +153 -0
  259. package/dist/shared/chunk-d2t72h4x.d.ts +35 -0
  260. package/dist/shared/chunk-dh3qy5fj.js +49 -0
  261. package/dist/shared/chunk-dxzrtvt9.d.ts +283 -0
  262. package/dist/shared/chunk-e46apgve.d.ts +40 -0
  263. package/dist/shared/chunk-ejtknc0w.js +21 -0
  264. package/dist/shared/chunk-eqajdxn8.js +82 -0
  265. package/dist/shared/chunk-fapc805j.js +130 -0
  266. package/dist/shared/chunk-fm1qyrae.d.ts +68 -0
  267. package/dist/shared/chunk-fqhcz6ss.d.ts +29 -0
  268. package/dist/shared/chunk-g88hweqh.d.ts +70 -0
  269. package/dist/shared/chunk-gb5ee5dw.d.ts +88 -0
  270. package/dist/shared/chunk-gewnsgza.js +61 -0
  271. package/dist/shared/chunk-hxjgey30.d.ts +36 -0
  272. package/dist/shared/chunk-jkkdq1mh.d.ts +213 -0
  273. package/dist/shared/chunk-jpq101w3.js +91 -0
  274. package/dist/shared/chunk-k3bv9k1v.d.ts +56 -0
  275. package/dist/shared/chunk-kreypnzp.d.ts +34 -0
  276. package/dist/shared/chunk-mnzw0bav.js +80 -0
  277. package/dist/shared/chunk-mrb3fp2f.d.ts +30 -0
  278. package/dist/shared/chunk-n1qq2wp9.js +6 -0
  279. package/dist/shared/chunk-n31qwnj2.js +1544 -0
  280. package/dist/shared/chunk-n4742y54.js +39 -0
  281. package/dist/shared/chunk-ndjvdkv7.d.ts +29 -0
  282. package/dist/shared/chunk-njf851p1.js +245 -0
  283. package/dist/shared/chunk-nk4578dr.js +73 -0
  284. package/dist/shared/chunk-nkbgg7bw.d.ts +24 -0
  285. package/dist/shared/chunk-nvh33x9x.js +488 -0
  286. package/dist/shared/chunk-paezqfg1.js +106 -0
  287. package/dist/shared/chunk-qemm9e3r.d.ts +21 -0
  288. package/dist/shared/chunk-qhxz1etk.js +96 -0
  289. package/dist/shared/chunk-qj5ev9ak.js +531 -0
  290. package/dist/shared/chunk-qnwggvjy.js +150 -0
  291. package/dist/shared/chunk-qt31n444.js +178 -0
  292. package/dist/shared/chunk-r5hz78pb.js +129 -0
  293. package/dist/shared/chunk-r6nb21kz.d.ts +102 -0
  294. package/dist/shared/chunk-rqrpvvz4.d.ts +107 -0
  295. package/dist/shared/chunk-s3r759ec.js +80 -0
  296. package/dist/shared/chunk-sdtjrw9w.d.ts +98 -0
  297. package/dist/shared/chunk-skg3m9m0.js +56 -0
  298. package/dist/shared/chunk-t21t9x7e.js +188 -0
  299. package/dist/shared/chunk-tc75ng2c.js +235 -0
  300. package/dist/shared/chunk-tkx1krwc.js +88 -0
  301. package/dist/shared/chunk-tprdqtb1.d.ts +30 -0
  302. package/dist/shared/chunk-tv9a1sek.js +137 -0
  303. package/dist/shared/chunk-tvbd27hg.d.ts +43 -0
  304. package/dist/shared/chunk-ty2ccknv.d.ts +54 -0
  305. package/dist/shared/chunk-v6yevw62.d.ts +28 -0
  306. package/dist/shared/chunk-v9q38p0x.js +258 -0
  307. package/dist/shared/chunk-vgh4f3sv.js +118 -0
  308. package/dist/shared/chunk-vjht1zn1.js +391 -0
  309. package/dist/shared/chunk-vsrkb0sp.d.ts +21 -0
  310. package/dist/shared/chunk-whsx7yp9.d.ts +37 -0
  311. package/dist/shared/chunk-wq9h37gy.js +86 -0
  312. package/dist/shared/chunk-x7az5x1y.d.ts +57 -0
  313. package/dist/shared/chunk-x9jf26yb.js +318 -0
  314. package/dist/shared/chunk-xbrrt07s.d.ts +23 -0
  315. package/dist/shared/chunk-xkchhs2z.js +129 -0
  316. package/dist/shared/chunk-xzfrskd7.js +202 -0
  317. package/dist/shared/chunk-y4cj4y54.js +423 -0
  318. package/dist/shared/chunk-y934at6m.js +7 -0
  319. package/dist/shared/chunk-zbpwhpjy.d.ts +75 -0
  320. package/dist/shared/chunk-zfhmbb7n.js +63 -0
  321. package/dist/shared/chunk-zk0t4vq5.js +71 -0
  322. package/dist/shared/chunk-znp9gna7.d.ts +23 -0
  323. package/dist/styles.css +467 -0
  324. package/index.ts +49 -0
  325. package/lib/config-parts.tsx +97 -0
  326. package/lib/icons.tsx +149 -0
  327. package/lib/pace-bar.tsx +24 -0
  328. package/lib/pace.ts +78 -0
  329. package/lib/pane-parts.tsx +76 -0
  330. package/lib/row-trigger.tsx +44 -0
  331. package/lib/settings-parts.tsx +232 -0
  332. package/lib/side-pane-types.ts +75 -0
  333. package/lib/status-glyph.tsx +25 -0
  334. package/lib/types.ts +204 -0
  335. package/mock/demo-reply.tsx +33 -0
  336. package/mock/demo-session.tsx +150 -0
  337. package/mock/mock-config.ts +173 -0
  338. package/mock/mock-extras.ts +288 -0
  339. package/mock/mock-panes.ts +190 -0
  340. package/mock/mock-settings.ts +92 -0
  341. package/mock/mock.ts +548 -0
  342. package/mock/screen-frame.tsx +49 -0
  343. package/package.json +114 -4
@@ -0,0 +1,88 @@
1
+ "use client";
2
+
3
+ import {
4
+ useIcon2
5
+ } from "./chunk-xkchhs2z.js";
6
+ import {
7
+ PaneSection2,
8
+ IconAction2
9
+ } from "./chunk-eqajdxn8.js";
10
+
11
+ // blocks/panes/terminal-pane/index.tsx
12
+ import { useSurface } from "@justanarthur/modo-ui";
13
+ import LogView from "@justanarthur/modo-ui/components/data-display/log-view";
14
+ import { SURFACE_BG } from "@justanarthur/modo-ui/lib/surface-classes";
15
+ import { cn } from "@justanarthur/modo-ui/lib/utils";
16
+ import { useRef, useState } from "react";
17
+ import { jsx, jsxs } from "react/jsx-runtime";
18
+ /*!
19
+ * Local addition: the side pane's Terminal — the session's shell in its
20
+ * folder, a prompt you type at rather than a form.
21
+ */
22
+ function PromptLine({ prompt, children }) {
23
+ return /* @__PURE__ */ jsxs("div", {
24
+ className: "flex min-w-0 gap-2",
25
+ children: [
26
+ /* @__PURE__ */ jsxs("span", {
27
+ className: "shrink-0 select-none text-muted-foreground",
28
+ children: [
29
+ prompt,
30
+ " $"
31
+ ]
32
+ }),
33
+ children
34
+ ]
35
+ });
36
+ }
37
+ function TerminalPane2({ shell, onRun }) {
38
+ const [history, setHistory] = useState(shell.history);
39
+ const [command, setCommand] = useState("");
40
+ const inputRef = useRef(null);
41
+ const level = Math.min(useSurface() + 1, 8);
42
+ const Clear = useIcon2("trash");
43
+ return /* @__PURE__ */ jsx(PaneSection2, {
44
+ title: shell.name,
45
+ meta: shell.cwd,
46
+ actions: /* @__PURE__ */ jsx(IconAction2, {
47
+ icon: Clear,
48
+ label: "Clear",
49
+ onClick: () => setHistory([])
50
+ }),
51
+ children: /* @__PURE__ */ jsxs("div", {
52
+ onClick: () => inputRef.current?.focus(),
53
+ className: cn("flex cursor-text flex-col gap-1 rounded-xl p-3 font-mono text-caption text-foreground", SURFACE_BG[level]),
54
+ children: [
55
+ /* @__PURE__ */ jsx(LogView, {
56
+ label: `${shell.name} output`,
57
+ prompt: "$ ",
58
+ lines: history.flatMap((entry) => [
59
+ `$ ${entry.command}`,
60
+ ...entry.output,
61
+ ...entry.exit ? [`\x1B[31mexit ${entry.exit}\x1B[0m`] : []
62
+ ]),
63
+ className: "-m-3 mb-0 rounded-b-none bg-transparent"
64
+ }),
65
+ /* @__PURE__ */ jsx(PromptLine, {
66
+ prompt: shell.prompt,
67
+ children: /* @__PURE__ */ jsx("input", {
68
+ ref: inputRef,
69
+ "aria-label": "Command",
70
+ spellCheck: false,
71
+ autoComplete: "off",
72
+ value: command,
73
+ onChange: (e) => setCommand(e.target.value),
74
+ onKeyDown: (e) => {
75
+ if (e.key !== "Enter" || !command.trim())
76
+ return;
77
+ setHistory((h) => [...h, { command, output: [] }]);
78
+ setCommand("");
79
+ onRun?.(command);
80
+ },
81
+ className: "min-w-0 flex-1 border-0 bg-transparent p-0 font-mono text-caption text-foreground caret-foreground outline-none"
82
+ })
83
+ })
84
+ ]
85
+ })
86
+ });
87
+ }
88
+ export { TerminalPane2 };
@@ -0,0 +1,30 @@
1
+ import { JSX as JSX_1kxb } from "react";
2
+ type TodoStatus2 = "pending" | "in_progress" | "completed";
3
+ interface TodoItem2 {
4
+ /** The step, in a few words. */
5
+ content: string;
6
+ /** Where it stands. */
7
+ status: TodoStatus2;
8
+ }
9
+ interface TodoListProps2 {
10
+ /** The plan, in order. */
11
+ items: TodoItem2[];
12
+ /** The header's label. Defaults to `'Tasks'`. */
13
+ title?: string;
14
+ /** Start with every step showing; folded, the header names the step in progress. Defaults to `true`. */
15
+ defaultOpen?: boolean;
16
+ }
17
+ type Element_12xgc = JSX_1kxb["Element"];
18
+ /**
19
+ * An AI's plan, pinned where you can see it: every step, done, in progress
20
+ * or still to come.
21
+ *
22
+ * Done steps take a check and the muted color, the step in progress the
23
+ * Spinner and medium weight, the steps to come an empty ring. The header
24
+ * counts the done steps; its chevron folds the list to that one row, which
25
+ * then names the step in progress.
26
+ *
27
+ * @example {@include ./examples.mdx}
28
+ */
29
+ declare function TodoList2({ items, title, defaultOpen }: TodoListProps2): Element_12xgc;
30
+ export { TodoStatus2, TodoItem2, TodoListProps2, TodoList2 };
@@ -0,0 +1,137 @@
1
+ "use client";
2
+
3
+ import {
4
+ useIcon2
5
+ } from "./chunk-xkchhs2z.js";
6
+ import {
7
+ Section2,
8
+ Group2,
9
+ Details2,
10
+ Row2,
11
+ Facts2,
12
+ CardCode2,
13
+ Mono2,
14
+ Footer2
15
+ } from "./chunk-5meda998.js";
16
+
17
+ // blocks/settings/hooks/index.tsx
18
+ import Button from "@justanarthur/modo-ui/components/actions/button";
19
+ import Badge from "@justanarthur/modo-ui/components/data-display/badge";
20
+ import { cn } from "@justanarthur/modo-ui/lib/utils";
21
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
22
+ /*!
23
+ * Local addition: the settings screen's hooks section — each hook's event
24
+ * and matcher, opening into its command, timeout and last run.
25
+ */
26
+ var key = (hook) => `${hook.event}-${hook.command}`;
27
+ function HookCard({
28
+ hook,
29
+ configDir,
30
+ onRun,
31
+ onEdit
32
+ }) {
33
+ const Play = useIcon2("play");
34
+ const facts = [
35
+ ["Event", hook.event],
36
+ ["Matcher", /* @__PURE__ */ jsx(Mono2, {
37
+ children: hook.matcher
38
+ }, "m")],
39
+ ["Timeout", `${hook.timeout ?? 60} s`]
40
+ ];
41
+ if (hook.lastRun) {
42
+ facts.push([
43
+ "Last run",
44
+ /* @__PURE__ */ jsxs("span", {
45
+ className: cn(hook.lastRun.exit !== 0 && "text-destructive"),
46
+ children: [
47
+ hook.lastRun.when,
48
+ " · exit ",
49
+ hook.lastRun.exit
50
+ ]
51
+ }, "r")
52
+ ]);
53
+ }
54
+ return /* @__PURE__ */ jsxs(Fragment, {
55
+ children: [
56
+ /* @__PURE__ */ jsx(CardCode2, {
57
+ language: "bash",
58
+ children: hook.command
59
+ }),
60
+ /* @__PURE__ */ jsx(Facts2, {
61
+ items: facts
62
+ }),
63
+ /* @__PURE__ */ jsxs(Footer2, {
64
+ source: hook.scope === "project" ? ".claude/settings.json" : `${configDir}/settings.json`,
65
+ children: [
66
+ /* @__PURE__ */ jsx(Button, {
67
+ size: "compact",
68
+ variant: "ghost",
69
+ leadingIcon: Play,
70
+ onClick: onRun,
71
+ children: "Run now"
72
+ }),
73
+ /* @__PURE__ */ jsx(Button, {
74
+ size: "compact",
75
+ variant: "ghost",
76
+ onClick: onEdit,
77
+ children: "Edit"
78
+ })
79
+ ]
80
+ })
81
+ ]
82
+ });
83
+ }
84
+ function Hooks2({ hooks, configDir, defaultOpen, onAdd, onRun, onEdit }) {
85
+ const Plus = useIcon2("plus");
86
+ return /* @__PURE__ */ jsx(Section2, {
87
+ title: "Hooks",
88
+ lead: "Commands the harness runs on session events, before and after tools. Project hooks come from the repo's .claude/settings.json.",
89
+ actions: /* @__PURE__ */ jsx(Button, {
90
+ size: "compact",
91
+ leadingIcon: Plus,
92
+ onClick: onAdd,
93
+ children: "Add hook"
94
+ }),
95
+ children: /* @__PURE__ */ jsx(Group2, {
96
+ title: "Hooks",
97
+ aside: /* @__PURE__ */ jsx("span", {
98
+ className: "tabular-nums",
99
+ children: hooks.length
100
+ }),
101
+ children: /* @__PURE__ */ jsx(Details2, {
102
+ label: "Hooks",
103
+ defaultOpen,
104
+ children: hooks.map((hook, i) => /* @__PURE__ */ jsx(Row2, {
105
+ value: key(hook),
106
+ index: i,
107
+ label: `${hook.event} · ${hook.matcher}`,
108
+ caption: /* @__PURE__ */ jsx("span", {
109
+ className: "font-mono",
110
+ children: hook.command
111
+ }),
112
+ meta: /* @__PURE__ */ jsxs(Fragment, {
113
+ children: [
114
+ hook.lastRun && hook.lastRun.exit !== 0 && /* @__PURE__ */ jsx(Badge, {
115
+ size: "compact",
116
+ variant: "dot",
117
+ color: "red",
118
+ children: "Failed"
119
+ }),
120
+ /* @__PURE__ */ jsx("span", {
121
+ className: "text-caption",
122
+ children: hook.scope
123
+ })
124
+ ]
125
+ }),
126
+ children: /* @__PURE__ */ jsx(HookCard, {
127
+ hook,
128
+ configDir,
129
+ onRun: () => onRun?.(hook),
130
+ onEdit: () => onEdit?.(hook)
131
+ })
132
+ }, key(hook)))
133
+ })
134
+ })
135
+ });
136
+ }
137
+ export { Hooks2 };
@@ -0,0 +1,43 @@
1
+ import { JSX as JSX_1kxb } from "react";
2
+ interface ChapterNavItem2 {
3
+ /** The id of its `ChapterNav.Break`. */
4
+ id: string;
5
+ /** The chapter's title. */
6
+ title: string;
7
+ /** A short line under the title: when it started, how many turns. */
8
+ detail?: string;
9
+ }
10
+ interface ChapterBreakProps2 {
11
+ /** The chapter's title, also its entry in the chapter list. */
12
+ title: string;
13
+ /** The anchor id the chapter list jumps to. */
14
+ id: string;
15
+ }
16
+ type Element_12xgc = JSX_1kxb["Element"];
17
+ /** A chapter break: a hairline with the chapter's title. */
18
+ declare function ChapterBreak2({ title, id }: ChapterBreakProps2): Element_12xgc;
19
+ interface ChapterNavProps2 {
20
+ /** The chapters, in order. */
21
+ chapters: ChapterNavItem2[];
22
+ /** The current chapter's id. Defaults to the last chapter. */
23
+ defaultValue?: string;
24
+ /** Called with a chapter id when one is picked. */
25
+ onValueChange?: (id: string) => void;
26
+ }
27
+ /**
28
+ * The chapters of a long conversation, one press away.
29
+ *
30
+ * A ghost icon button opens a Popover listing the chapters, numbered, each
31
+ * with a short line under its title; the current one is checked. Picking a
32
+ * chapter scrolls its `ChapterNav.Break` (a hairline with the title, placed
33
+ * in the conversation) to the top of the view.
34
+ *
35
+ * Statics:
36
+ * - `ChapterNav.Break` — the titled hairline a chapter starts with: `title`, `id`.
37
+ *
38
+ * @example {@include ./examples.mdx}
39
+ */
40
+ declare const ChapterNav2: (({ chapters, defaultValue, onValueChange }: ChapterNavProps2) => Element_12xgc) & {
41
+ Break: typeof ChapterBreak2;
42
+ };
43
+ export { ChapterNavItem2, ChapterBreakProps2, ChapterBreak2, ChapterNavProps2, ChapterNav2 };
@@ -0,0 +1,54 @@
1
+ import { PermissionRequest2 } from "./chunk-fqhcz6ss.js";
2
+ import { PlanApproval2 } from "./chunk-v6yevw62.js";
3
+ import { PromptCardProps2 } from "./chunk-5hw0525a.js";
4
+ import { QuestionPrompt2 } from "./chunk-d2t72h4x.js";
5
+ import { JSX as JSX_1kxb } from "react";
6
+ type AgentPromptProps2 = PromptCardProps2;
7
+ interface OfferProps2 {
8
+ /** The task, as a short title. */
9
+ title: string;
10
+ /** Why it could run on its own, in one line. */
11
+ brief?: string;
12
+ /** Called with where it should run. */
13
+ onChoose?: (where: "new-session" | "here") => void;
14
+ }
15
+ type Element_12xgc = JSX_1kxb["Element"];
16
+ declare function OfferPrompt({ title, brief, onChoose }: OfferProps2): Element_12xgc;
17
+ interface TaskProps2 {
18
+ /** The proposed task. */
19
+ title: string;
20
+ /** What it would do and what done looks like. */
21
+ brief: string;
22
+ /** The profile and place it would start in: `jobiflow · new worktree`. */
23
+ where?: string;
24
+ /** Called with the decision. */
25
+ onDecide?: (decision: "start" | "dismiss") => void;
26
+ }
27
+ declare function TaskPrompt({ title, brief, where, onDecide }: TaskProps2): Element_12xgc;
28
+ /**
29
+ * Everything the agent stops to ask you mid-turn, as one family of lifted
30
+ * cards under the transcript.
31
+ *
32
+ * The frame is the Prompt card, and the permission, question and plan
33
+ * prompts are the generic Permission request, Question prompt and Plan
34
+ * approval; the statics gather them under one name. What is specific to
35
+ * the AI app is the pair of session cards: where a task should run, and a
36
+ * task the agent proposes on its own.
37
+ *
38
+ * Statics:
39
+ * - `AgentPrompt.Permission` — Permission request: `tool`, `command`, `detail`, `rule`.
40
+ * - `AgentPrompt.Question` — Question prompt: `question`, `tag`, `options`, `multiSelect`.
41
+ * - `AgentPrompt.Plan` — Plan approval: the plan as children, `onDecide`.
42
+ * - `AgentPrompt.Offer` — the agent asks where a task should run: a new session or here (`title`, `brief`, `onChoose`).
43
+ * - `AgentPrompt.Task` — a task the agent proposes on its own: start it as a session, or dismiss it (`title`, `brief`, `where`, `onDecide`).
44
+ *
45
+ * @example {@include ./examples.mdx}
46
+ */
47
+ declare const AgentPrompt2: ((props: AgentPromptProps2) => Element_12xgc) & {
48
+ Permission: typeof PermissionRequest2;
49
+ Question: typeof QuestionPrompt2;
50
+ Plan: typeof PlanApproval2;
51
+ Offer: typeof OfferPrompt;
52
+ Task: typeof TaskPrompt;
53
+ };
54
+ export { AgentPromptProps2, OfferProps2, TaskProps2, AgentPrompt2 };
@@ -0,0 +1,28 @@
1
+ import { ReactNode } from "react";
2
+ import { JSX as JSX_1kxb } from "react";
3
+ type PlanDecision2 = "auto" | "review" | "keep-planning";
4
+ interface PlanApprovalProps2 {
5
+ /** The plan, as rendered markdown. */
6
+ children: ReactNode;
7
+ /** What is asked, in one line. Defaults to `'Ready to code? Here is the plan.'`. */
8
+ title?: ReactNode;
9
+ /** A chip after the title. Defaults to `'Plan mode'`. */
10
+ tag?: string;
11
+ /** The feedback field's placeholder. Defaults to `'Tell the agent what to change'`. */
12
+ placeholder?: string;
13
+ /** Called with the decision and any feedback. */
14
+ onDecide?: (decision: PlanDecision2, feedback: string) => void;
15
+ }
16
+ type Element_12xgc = JSX_1kxb["Element"];
17
+ /**
18
+ * A plan the agent wrote, waiting for your go-ahead.
19
+ *
20
+ * The plan reads as Prose in a scrolling frame that fades at its edges,
21
+ * with a feedback field under it. The decisions sit on the bottom row:
22
+ * keep planning with the feedback, approve and review each edit, or approve
23
+ * with edits accepted.
24
+ *
25
+ * @example {@include ./examples.mdx}
26
+ */
27
+ declare function PlanApproval2({ children, title, tag, placeholder, onDecide }: PlanApprovalProps2): Element_12xgc;
28
+ export { PlanDecision2, PlanApprovalProps2, PlanApproval2 };
@@ -0,0 +1,258 @@
1
+ "use client";
2
+
3
+ import {
4
+ useIcon2
5
+ } from "./chunk-xkchhs2z.js";
6
+
7
+ // blocks/conversation/failure-states/index.tsx
8
+ import { SurfaceProvider, useSurface } from "@justanarthur/modo-ui";
9
+ import Button from "@justanarthur/modo-ui/components/actions/button";
10
+ import LogView from "@justanarthur/modo-ui/components/data-display/log-view";
11
+ import Meter from "@justanarthur/modo-ui/components/feedback/meter";
12
+ import { Spinner } from "@justanarthur/modo-ui/components/feedback/progress";
13
+ import { useShape } from "@justanarthur/modo-ui/lib/shape-context";
14
+ import { SURFACE_BG } from "@justanarthur/modo-ui/lib/surface-classes";
15
+ import { cn } from "@justanarthur/modo-ui/lib/utils";
16
+ import { useState } from "react";
17
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
18
+ /*!
19
+ * Local addition: the AI app's error and degraded states in one block — the
20
+ * claude process crashed, the connection is coming back, a profile hit its
21
+ * limit, the machine is offline, a sign-in expired. Each is a banner over
22
+ * the transcript or a full empty state, with the one action that gets the
23
+ * session going again.
24
+ */
25
+ var ICON = {
26
+ "cli-crashed": { icon: "circle-x", tone: "text-status-error" },
27
+ "rate-limited": { icon: "gauge", tone: "text-status-warning" },
28
+ offline: { icon: "cloud", tone: "text-muted-foreground" },
29
+ "auth-expired": { icon: "key", tone: "text-status-warning" }
30
+ };
31
+ function FailureState2({
32
+ kind,
33
+ variant = "banner",
34
+ profile,
35
+ stderr = [],
36
+ exitCode,
37
+ attempt = 1,
38
+ maxAttempts = 5,
39
+ retryIn,
40
+ resetsIn,
41
+ alternatives = [],
42
+ onRestart,
43
+ onRetry,
44
+ onSwitchProfile,
45
+ onLogin,
46
+ onDismiss,
47
+ className
48
+ }) {
49
+ const [showLog, setShowLog] = useState(variant === "page");
50
+ const shape = useShape();
51
+ const level = Math.min(useSurface() + 1, 8);
52
+ const X = useIcon2("x");
53
+ const Retry = useIcon2("rotate-ccw");
54
+ const Terminal = useIcon2("terminal");
55
+ const Key = useIcon2("key");
56
+ const page = variant === "page";
57
+ const name = profile?.name ?? "this profile";
58
+ const copy = {
59
+ "cli-crashed": {
60
+ title: "claude stopped",
61
+ detail: `The process exited${exitCode === undefined ? "" : ` (${exitCode})`}. The transcript is kept; Restart picks the session up where it was.`
62
+ },
63
+ reconnecting: {
64
+ title: "Reconnecting…",
65
+ detail: `Attempt ${attempt} of ${maxAttempts}${retryIn ? ` · next in ${retryIn}` : ""}. Replies resume once it is back.`
66
+ },
67
+ "rate-limited": {
68
+ title: `${name} hit its limit`,
69
+ detail: `${resetsIn ? `It resets ${resetsIn}.` : "It resets soon."}${alternatives.length > 0 ? " Move the session to a profile with room, or wait." : ""}`
70
+ },
71
+ offline: {
72
+ title: "You are offline",
73
+ detail: "Sessions pause until the network is back; nothing you typed is lost."
74
+ },
75
+ "auth-expired": {
76
+ title: `${name} is signed out`,
77
+ detail: `The sign-in for ${profile?.configDir ?? "its config dir"} expired. Sign in again to keep going.`
78
+ }
79
+ };
80
+ const icon = kind === "reconnecting" ? /* @__PURE__ */ jsx(Spinner, {
81
+ className: page ? "size-5" : "size-4"
82
+ }) : /* @__PURE__ */ jsx(Glyph, {
83
+ icon: ICON[kind].icon,
84
+ className: ICON[kind].tone,
85
+ size: page ? 20 : 16
86
+ });
87
+ const actions = /* @__PURE__ */ jsxs(Fragment, {
88
+ children: [
89
+ kind === "cli-crashed" && !page && stderr.length > 0 && /* @__PURE__ */ jsx(Button, {
90
+ variant: "ghost",
91
+ size: "compact",
92
+ leadingIcon: Terminal,
93
+ active: showLog,
94
+ onClick: () => setShowLog(!showLog),
95
+ children: "Output"
96
+ }),
97
+ kind === "cli-crashed" && /* @__PURE__ */ jsx(Button, {
98
+ variant: page ? "primary" : "secondary",
99
+ size: "compact",
100
+ leadingIcon: Retry,
101
+ onClick: onRestart,
102
+ children: "Restart"
103
+ }),
104
+ (kind === "reconnecting" || kind === "offline") && /* @__PURE__ */ jsx(Button, {
105
+ variant: "secondary",
106
+ size: "compact",
107
+ onClick: onRetry,
108
+ children: "Retry now"
109
+ }),
110
+ kind === "rate-limited" && alternatives.slice(0, page ? 3 : 1).map((alt, i) => /* @__PURE__ */ jsxs(Button, {
111
+ variant: i === 0 ? "secondary" : "ghost",
112
+ size: "compact",
113
+ onClick: () => onSwitchProfile?.(alt.id),
114
+ children: [
115
+ "Continue in ",
116
+ alt.name
117
+ ]
118
+ }, alt.id)),
119
+ kind === "auth-expired" && /* @__PURE__ */ jsx(Button, {
120
+ variant: page ? "primary" : "secondary",
121
+ size: "compact",
122
+ leadingIcon: Key,
123
+ onClick: onLogin,
124
+ children: "Sign in again"
125
+ })
126
+ ]
127
+ });
128
+ const progress = kind === "reconnecting" && /* @__PURE__ */ jsx(Meter, {
129
+ variant: "line",
130
+ label: "Reconnect attempts",
131
+ value: attempt,
132
+ max: maxAttempts,
133
+ className: page ? "w-48" : "w-16"
134
+ });
135
+ const log = kind === "cli-crashed" && showLog && stderr.length > 0 && /* @__PURE__ */ jsx(LogView, {
136
+ label: "claude stderr",
137
+ lines: stderr,
138
+ prompt: "",
139
+ maxHeight: page ? 220 : 140,
140
+ wrap: true,
141
+ className: "w-full"
142
+ });
143
+ if (page)
144
+ return /* @__PURE__ */ jsxs("div", {
145
+ role: kind === "reconnecting" ? "status" : "alert",
146
+ className: cn("flex h-full w-full flex-col items-center justify-center gap-[var(--space-4)] p-[var(--space-6)]", className),
147
+ children: [
148
+ /* @__PURE__ */ jsxs("div", {
149
+ className: "flex max-w-md flex-col items-center gap-[var(--space-2)] text-center",
150
+ children: [
151
+ icon,
152
+ /* @__PURE__ */ jsx("h2", {
153
+ className: "m-0 text-title text-foreground",
154
+ children: copy[kind].title
155
+ }),
156
+ /* @__PURE__ */ jsx("p", {
157
+ className: "m-0 text-body text-muted-foreground",
158
+ children: copy[kind].detail
159
+ }),
160
+ kind === "rate-limited" && profile && /* @__PURE__ */ jsx(LimitMeters, {
161
+ profile
162
+ }),
163
+ progress
164
+ ]
165
+ }),
166
+ log && /* @__PURE__ */ jsx("div", {
167
+ className: "flex w-full max-w-xl",
168
+ children: log
169
+ }),
170
+ /* @__PURE__ */ jsx("div", {
171
+ className: "flex flex-wrap items-center justify-center gap-[var(--space-2)]",
172
+ children: actions
173
+ })
174
+ ]
175
+ });
176
+ return /* @__PURE__ */ jsx(SurfaceProvider, {
177
+ value: level,
178
+ children: /* @__PURE__ */ jsxs("div", {
179
+ role: kind === "reconnecting" ? "status" : "alert",
180
+ className: cn("flex flex-col gap-[var(--space-2)] border border-border p-[var(--space-2)] pl-[var(--space-3)]", SURFACE_BG[level], shape.container, className),
181
+ children: [
182
+ /* @__PURE__ */ jsxs("div", {
183
+ className: "flex items-center gap-[var(--space-3)]",
184
+ children: [
185
+ /* @__PURE__ */ jsx("span", {
186
+ className: "flex shrink-0",
187
+ children: icon
188
+ }),
189
+ /* @__PURE__ */ jsxs("div", {
190
+ className: "flex min-w-0 flex-1 flex-col",
191
+ children: [
192
+ /* @__PURE__ */ jsx("span", {
193
+ className: "truncate text-body weight-medium text-foreground",
194
+ children: copy[kind].title
195
+ }),
196
+ /* @__PURE__ */ jsx("span", {
197
+ className: "truncate text-caption text-muted-foreground",
198
+ children: copy[kind].detail
199
+ })
200
+ ]
201
+ }),
202
+ progress,
203
+ /* @__PURE__ */ jsxs("div", {
204
+ className: "flex shrink-0 items-center gap-[var(--space-1)]",
205
+ children: [
206
+ actions,
207
+ onDismiss && /* @__PURE__ */ jsx(Button, {
208
+ variant: "ghost",
209
+ size: "icon-compact",
210
+ "aria-label": "Dismiss",
211
+ onClick: onDismiss,
212
+ children: /* @__PURE__ */ jsx(X, {})
213
+ })
214
+ ]
215
+ })
216
+ ]
217
+ }),
218
+ log
219
+ ]
220
+ })
221
+ });
222
+ }
223
+ function Glyph({ icon, className, size }) {
224
+ const Icon = useIcon2(icon);
225
+ return /* @__PURE__ */ jsx(Icon, {
226
+ size,
227
+ strokeWidth: 1.5,
228
+ className
229
+ });
230
+ }
231
+ function LimitMeters({ profile }) {
232
+ return /* @__PURE__ */ jsx("div", {
233
+ className: "flex w-64 flex-col gap-[var(--space-1)] pt-[var(--space-2)]",
234
+ children: profile.limits.map((limit) => /* @__PURE__ */ jsxs("div", {
235
+ className: "flex items-center gap-[var(--space-2)] text-caption",
236
+ children: [
237
+ /* @__PURE__ */ jsx("span", {
238
+ className: "w-32 shrink-0 truncate text-left text-muted-foreground",
239
+ children: limit.label
240
+ }),
241
+ /* @__PURE__ */ jsx(Meter, {
242
+ variant: "line",
243
+ label: limit.label,
244
+ value: limit.value,
245
+ className: "flex-1"
246
+ }),
247
+ /* @__PURE__ */ jsxs("span", {
248
+ className: "w-10 shrink-0 text-right tabular-nums text-muted-foreground",
249
+ children: [
250
+ Math.round(limit.value * 100),
251
+ "%"
252
+ ]
253
+ })
254
+ ]
255
+ }, limit.label))
256
+ });
257
+ }
258
+ export { FailureState2 };