@skillcdn/console 0.5.0 → 0.5.2

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 (490) hide show
  1. package/README.md +87 -12
  2. package/SKILLCDN.md +3 -3
  3. package/dist/agent-page.d.ts.map +1 -1
  4. package/dist/agent-page.js +7 -6
  5. package/dist/agent-page.js.map +1 -1
  6. package/dist/api.d.ts +9 -7
  7. package/dist/api.d.ts.map +1 -1
  8. package/dist/api.js +8 -6
  9. package/dist/api.js.map +1 -1
  10. package/dist/charts.d.ts +103 -0
  11. package/dist/charts.d.ts.map +1 -0
  12. package/dist/charts.js +182 -0
  13. package/dist/charts.js.map +1 -0
  14. package/dist/cli/cli.d.ts +58 -2
  15. package/dist/cli/cli.d.ts.map +1 -1
  16. package/dist/cli/cli.js +1742 -472
  17. package/dist/cli/cli.js.map +1 -1
  18. package/dist/cli/command-words.d.ts +20 -0
  19. package/dist/cli/command-words.d.ts.map +1 -0
  20. package/dist/cli/command-words.js +51 -0
  21. package/dist/cli/command-words.js.map +1 -0
  22. package/dist/cli/credentials.d.ts +54 -5
  23. package/dist/cli/credentials.d.ts.map +1 -1
  24. package/dist/cli/credentials.js +126 -20
  25. package/dist/cli/credentials.js.map +1 -1
  26. package/dist/cli/directory.d.ts +19 -4
  27. package/dist/cli/directory.d.ts.map +1 -1
  28. package/dist/cli/directory.js +16 -8
  29. package/dist/cli/directory.js.map +1 -1
  30. package/dist/cli/format.d.ts +70 -9
  31. package/dist/cli/format.d.ts.map +1 -1
  32. package/dist/cli/format.js +267 -40
  33. package/dist/cli/format.js.map +1 -1
  34. package/dist/cli/help.d.ts +13 -4
  35. package/dist/cli/help.d.ts.map +1 -1
  36. package/dist/cli/help.js +101 -58
  37. package/dist/cli/help.js.map +1 -1
  38. package/dist/cli/machine-check.d.ts +36 -0
  39. package/dist/cli/machine-check.d.ts.map +1 -0
  40. package/dist/cli/machine-check.js +151 -0
  41. package/dist/cli/machine-check.js.map +1 -0
  42. package/dist/cli/main.js +76 -2
  43. package/dist/cli/main.js.map +1 -1
  44. package/dist/cli/pack.d.ts +69 -60
  45. package/dist/cli/pack.d.ts.map +1 -1
  46. package/dist/cli/pack.js +241 -270
  47. package/dist/cli/pack.js.map +1 -1
  48. package/dist/cli/plugin-check.d.ts +42 -0
  49. package/dist/cli/plugin-check.d.ts.map +1 -1
  50. package/dist/cli/plugin-check.js +221 -36
  51. package/dist/cli/plugin-check.js.map +1 -1
  52. package/dist/cli/plugin-cli.d.ts +6 -1
  53. package/dist/cli/plugin-cli.d.ts.map +1 -1
  54. package/dist/cli/plugin-cli.js +21 -4
  55. package/dist/cli/plugin-cli.js.map +1 -1
  56. package/dist/cli/plugin-main.js +1 -0
  57. package/dist/cli/plugin-main.js.map +1 -1
  58. package/dist/cli/runner-host.d.ts +7 -0
  59. package/dist/cli/runner-host.d.ts.map +1 -1
  60. package/dist/cli/runner-host.js +2 -0
  61. package/dist/cli/runner-host.js.map +1 -1
  62. package/dist/cli/secret-notes.d.ts +8 -0
  63. package/dist/cli/secret-notes.d.ts.map +1 -0
  64. package/dist/cli/secret-notes.js +48 -0
  65. package/dist/cli/secret-notes.js.map +1 -0
  66. package/dist/cli/serve.d.ts +33 -1
  67. package/dist/cli/serve.d.ts.map +1 -1
  68. package/dist/cli/serve.js +252 -3
  69. package/dist/cli/serve.js.map +1 -1
  70. package/dist/client.d.ts +54 -9
  71. package/dist/client.d.ts.map +1 -1
  72. package/dist/client.js +77 -80
  73. package/dist/client.js.map +1 -1
  74. package/dist/components/agent-page.d.ts +164 -8
  75. package/dist/components/agent-page.d.ts.map +1 -1
  76. package/dist/components/agent-page.js +588 -151
  77. package/dist/components/agent-page.js.map +1 -1
  78. package/dist/components/agents.d.ts.map +1 -1
  79. package/dist/components/agents.js +1 -1
  80. package/dist/components/agents.js.map +1 -1
  81. package/dist/components/board.d.ts.map +1 -1
  82. package/dist/components/board.js +3 -2
  83. package/dist/components/board.js.map +1 -1
  84. package/dist/components/categories.js +1 -1
  85. package/dist/components/categories.js.map +1 -1
  86. package/dist/components/charts.d.ts +157 -0
  87. package/dist/components/charts.d.ts.map +1 -0
  88. package/dist/components/charts.js +182 -0
  89. package/dist/components/charts.js.map +1 -0
  90. package/dist/components/decision-list.d.ts.map +1 -1
  91. package/dist/components/decision-list.js +1 -1
  92. package/dist/components/decision-list.js.map +1 -1
  93. package/dist/components/desk-records.d.ts +102 -0
  94. package/dist/components/desk-records.d.ts.map +1 -0
  95. package/dist/components/desk-records.js +221 -0
  96. package/dist/components/desk-records.js.map +1 -0
  97. package/dist/components/desk.d.ts +85 -0
  98. package/dist/components/desk.d.ts.map +1 -0
  99. package/dist/components/desk.js +135 -0
  100. package/dist/components/desk.js.map +1 -0
  101. package/dist/components/event-feed.d.ts.map +1 -1
  102. package/dist/components/event-feed.js +7 -3
  103. package/dist/components/event-feed.js.map +1 -1
  104. package/dist/components/goals.d.ts +2 -0
  105. package/dist/components/goals.d.ts.map +1 -1
  106. package/dist/components/goals.js +1 -1
  107. package/dist/components/goals.js.map +1 -1
  108. package/dist/components/home.d.ts.map +1 -1
  109. package/dist/components/home.js +14 -6
  110. package/dist/components/home.js.map +1 -1
  111. package/dist/components/icon.d.ts +31 -0
  112. package/dist/components/icon.d.ts.map +1 -0
  113. package/dist/components/icon.js +169 -0
  114. package/dist/components/icon.js.map +1 -0
  115. package/dist/components/markdown.d.ts +6 -0
  116. package/dist/components/markdown.d.ts.map +1 -1
  117. package/dist/components/markdown.js +10 -2
  118. package/dist/components/markdown.js.map +1 -1
  119. package/dist/components/people.js +1 -1
  120. package/dist/components/people.js.map +1 -1
  121. package/dist/components/plugin-frame.d.ts.map +1 -1
  122. package/dist/components/plugin-frame.js +7 -0
  123. package/dist/components/plugin-frame.js.map +1 -1
  124. package/dist/components/plugin-settings.d.ts.map +1 -1
  125. package/dist/components/plugin-settings.js +54 -3
  126. package/dist/components/plugin-settings.js.map +1 -1
  127. package/dist/components/projects.d.ts +17 -4
  128. package/dist/components/projects.d.ts.map +1 -1
  129. package/dist/components/projects.js +51 -12
  130. package/dist/components/projects.js.map +1 -1
  131. package/dist/components/rules.d.ts +8 -10
  132. package/dist/components/rules.d.ts.map +1 -1
  133. package/dist/components/rules.js +35 -13
  134. package/dist/components/rules.js.map +1 -1
  135. package/dist/components/sessions.d.ts.map +1 -1
  136. package/dist/components/sessions.js +3 -2
  137. package/dist/components/sessions.js.map +1 -1
  138. package/dist/components/setup.d.ts +9 -3
  139. package/dist/components/setup.d.ts.map +1 -1
  140. package/dist/components/setup.js +12 -6
  141. package/dist/components/setup.js.map +1 -1
  142. package/dist/components/shell.d.ts.map +1 -1
  143. package/dist/components/shell.js +3 -2
  144. package/dist/components/shell.js.map +1 -1
  145. package/dist/components/tokens.js +1 -1
  146. package/dist/components/tokens.js.map +1 -1
  147. package/dist/components/ui.d.ts +5 -2
  148. package/dist/components/ui.d.ts.map +1 -1
  149. package/dist/components/ui.js +10 -7
  150. package/dist/components/ui.js.map +1 -1
  151. package/dist/connect-page.js +1 -1
  152. package/dist/connect-page.js.map +1 -1
  153. package/dist/console.css +1172 -106
  154. package/dist/console.d.ts +5 -0
  155. package/dist/console.d.ts.map +1 -1
  156. package/dist/console.js +52 -39
  157. package/dist/console.js.map +1 -1
  158. package/dist/data.d.ts.map +1 -1
  159. package/dist/data.js +32 -33
  160. package/dist/data.js.map +1 -1
  161. package/dist/desk-page.d.ts +38 -0
  162. package/dist/desk-page.d.ts.map +1 -0
  163. package/dist/desk-page.js +184 -0
  164. package/dist/desk-page.js.map +1 -0
  165. package/dist/desk-records-page.d.ts +18 -0
  166. package/dist/desk-records-page.d.ts.map +1 -0
  167. package/dist/desk-records-page.js +130 -0
  168. package/dist/desk-records-page.js.map +1 -0
  169. package/dist/desk-records.d.ts +247 -0
  170. package/dist/desk-records.d.ts.map +1 -0
  171. package/dist/desk-records.js +543 -0
  172. package/dist/desk-records.js.map +1 -0
  173. package/dist/desk.d.ts +122 -0
  174. package/dist/desk.d.ts.map +1 -0
  175. package/dist/desk.js +211 -0
  176. package/dist/desk.js.map +1 -0
  177. package/dist/feed-stream.d.ts +39 -0
  178. package/dist/feed-stream.d.ts.map +1 -0
  179. package/dist/feed-stream.js +117 -0
  180. package/dist/feed-stream.js.map +1 -0
  181. package/dist/home-tiles.d.ts +19 -3
  182. package/dist/home-tiles.d.ts.map +1 -1
  183. package/dist/home-tiles.js +147 -42
  184. package/dist/home-tiles.js.map +1 -1
  185. package/dist/i18n/en.d.ts +228 -6
  186. package/dist/i18n/en.d.ts.map +1 -1
  187. package/dist/i18n/en.js +309 -9
  188. package/dist/i18n/en.js.map +1 -1
  189. package/dist/i18n/ko.d.ts.map +1 -1
  190. package/dist/i18n/ko.js +366 -85
  191. package/dist/i18n/ko.js.map +1 -1
  192. package/dist/i18n/particles.d.ts +7 -0
  193. package/dist/i18n/particles.d.ts.map +1 -0
  194. package/dist/i18n/particles.js +72 -0
  195. package/dist/i18n/particles.js.map +1 -0
  196. package/dist/icons/glyphs.d.ts +605 -0
  197. package/dist/icons/glyphs.d.ts.map +1 -0
  198. package/dist/icons/glyphs.js +104 -0
  199. package/dist/icons/glyphs.js.map +1 -0
  200. package/dist/icons/index.d.ts +59 -0
  201. package/dist/icons/index.d.ts.map +1 -0
  202. package/dist/icons/index.js +157 -0
  203. package/dist/icons/index.js.map +1 -0
  204. package/dist/index.d.ts +9 -0
  205. package/dist/index.d.ts.map +1 -1
  206. package/dist/index.js +9 -0
  207. package/dist/index.js.map +1 -1
  208. package/dist/limits.d.ts +20 -0
  209. package/dist/limits.d.ts.map +1 -1
  210. package/dist/limits.js +20 -0
  211. package/dist/limits.js.map +1 -1
  212. package/dist/marks.d.ts +9 -0
  213. package/dist/marks.d.ts.map +1 -1
  214. package/dist/marks.js +9 -0
  215. package/dist/marks.js.map +1 -1
  216. package/dist/onboarding.d.ts +6 -0
  217. package/dist/onboarding.d.ts.map +1 -1
  218. package/dist/onboarding.js +5 -5
  219. package/dist/onboarding.js.map +1 -1
  220. package/dist/plugin/context.d.ts +42 -11
  221. package/dist/plugin/context.d.ts.map +1 -1
  222. package/dist/plugin/limits.d.ts +2 -0
  223. package/dist/plugin/limits.d.ts.map +1 -1
  224. package/dist/plugin/limits.js +2 -0
  225. package/dist/plugin/limits.js.map +1 -1
  226. package/dist/plugin/manifest.d.ts +13 -0
  227. package/dist/plugin/manifest.d.ts.map +1 -1
  228. package/dist/plugin/manifest.js +30 -3
  229. package/dist/plugin/manifest.js.map +1 -1
  230. package/dist/plugin/rest-schemas.d.ts +55 -0
  231. package/dist/plugin/rest-schemas.d.ts.map +1 -1
  232. package/dist/plugin/rest-schemas.js +37 -0
  233. package/dist/plugin/rest-schemas.js.map +1 -1
  234. package/dist/plugin/sandbox.d.ts.map +1 -1
  235. package/dist/plugin/sandbox.js +4 -1
  236. package/dist/plugin/sandbox.js.map +1 -1
  237. package/dist/plugin/testing.d.ts +6 -2
  238. package/dist/plugin/testing.d.ts.map +1 -1
  239. package/dist/plugin/testing.js +52 -10
  240. package/dist/plugin/testing.js.map +1 -1
  241. package/dist/plugin/web.d.ts +3 -0
  242. package/dist/plugin/web.d.ts.map +1 -1
  243. package/dist/plugin/web.js +5 -1
  244. package/dist/plugin/web.js.map +1 -1
  245. package/dist/plugin.d.ts +1 -1
  246. package/dist/plugin.d.ts.map +1 -1
  247. package/dist/plugin.js +1 -1
  248. package/dist/plugin.js.map +1 -1
  249. package/dist/records.d.ts +283 -0
  250. package/dist/records.d.ts.map +1 -0
  251. package/dist/records.js +543 -0
  252. package/dist/records.js.map +1 -0
  253. package/dist/routes.d.ts +3 -1
  254. package/dist/routes.d.ts.map +1 -1
  255. package/dist/routes.js +3 -1
  256. package/dist/routes.js.map +1 -1
  257. package/dist/rules.d.ts +30 -11
  258. package/dist/rules.d.ts.map +1 -1
  259. package/dist/rules.js +98 -45
  260. package/dist/rules.js.map +1 -1
  261. package/dist/runner/acp.d.ts +1 -1
  262. package/dist/runner/acp.d.ts.map +1 -1
  263. package/dist/runner/acp.js +32 -21
  264. package/dist/runner/acp.js.map +1 -1
  265. package/dist/runner/awake.d.ts +35 -0
  266. package/dist/runner/awake.d.ts.map +1 -0
  267. package/dist/runner/awake.js +95 -0
  268. package/dist/runner/awake.js.map +1 -0
  269. package/dist/runner/claude.d.ts +1 -1
  270. package/dist/runner/claude.d.ts.map +1 -1
  271. package/dist/runner/claude.js +100 -18
  272. package/dist/runner/claude.js.map +1 -1
  273. package/dist/runner/codex.d.ts +1 -1
  274. package/dist/runner/codex.d.ts.map +1 -1
  275. package/dist/runner/codex.js +20 -17
  276. package/dist/runner/codex.js.map +1 -1
  277. package/dist/runner/config.d.ts +5 -0
  278. package/dist/runner/config.d.ts.map +1 -1
  279. package/dist/runner/config.js +9 -0
  280. package/dist/runner/config.js.map +1 -1
  281. package/dist/runner/desk.d.ts +43 -2
  282. package/dist/runner/desk.d.ts.map +1 -1
  283. package/dist/runner/desk.js +168 -13
  284. package/dist/runner/desk.js.map +1 -1
  285. package/dist/runner/process.d.ts.map +1 -1
  286. package/dist/runner/process.js +11 -4
  287. package/dist/runner/process.js.map +1 -1
  288. package/dist/runner/redact.d.ts +39 -4
  289. package/dist/runner/redact.d.ts.map +1 -1
  290. package/dist/runner/redact.js +81 -5
  291. package/dist/runner/redact.js.map +1 -1
  292. package/dist/runner/runner.d.ts +28 -3
  293. package/dist/runner/runner.d.ts.map +1 -1
  294. package/dist/runner/runner.js +371 -54
  295. package/dist/runner/runner.js.map +1 -1
  296. package/dist/runner/slack.d.ts.map +1 -1
  297. package/dist/runner/slack.js +10 -4
  298. package/dist/runner/slack.js.map +1 -1
  299. package/dist/runner/task-scheduler.d.ts +20 -0
  300. package/dist/runner/task-scheduler.d.ts.map +1 -1
  301. package/dist/runner/task-scheduler.js +34 -4
  302. package/dist/runner/task-scheduler.js.map +1 -1
  303. package/dist/runner/types.d.ts +51 -1
  304. package/dist/runner/types.d.ts.map +1 -1
  305. package/dist/runner/types.js +26 -0
  306. package/dist/runner/types.js.map +1 -1
  307. package/dist/runner.d.ts +6 -6
  308. package/dist/runner.d.ts.map +1 -1
  309. package/dist/runner.js +5 -5
  310. package/dist/runner.js.map +1 -1
  311. package/dist/schemas.d.ts +603 -6
  312. package/dist/schemas.d.ts.map +1 -1
  313. package/dist/schemas.js +156 -20
  314. package/dist/schemas.js.map +1 -1
  315. package/dist/services.d.ts +22 -5
  316. package/dist/services.d.ts.map +1 -1
  317. package/dist/services.js +41 -17
  318. package/dist/services.js.map +1 -1
  319. package/dist/setup-guide.d.ts +17 -4
  320. package/dist/setup-guide.d.ts.map +1 -1
  321. package/dist/setup-guide.js +48 -41
  322. package/dist/setup-guide.js.map +1 -1
  323. package/dist/tokens.d.ts.map +1 -1
  324. package/dist/tokens.js +5 -1
  325. package/dist/tokens.js.map +1 -1
  326. package/dist/vocabulary.d.ts +21 -3
  327. package/dist/vocabulary.d.ts.map +1 -1
  328. package/dist/vocabulary.js +19 -3
  329. package/dist/vocabulary.js.map +1 -1
  330. package/docs/specs/cli.md +73 -44
  331. package/docs/specs/plugins.md +40 -22
  332. package/docs/specs/records.md +113 -0
  333. package/docs/specs/rest.md +30 -21
  334. package/docs/specs/runner.md +46 -22
  335. package/package.json +11 -2
  336. package/skills/building-a-console/SKILL.md +4 -4
  337. package/skills/building-a-plugin/SKILL.md +6 -6
  338. package/skills/deploying-a-console/SKILL.md +4 -4
  339. package/skills/deploying-a-console/references/resources.md +41 -4
  340. package/skills/deploying-a-console/references/running-it-again.md +3 -2
  341. package/skills/keeping-a-desk/SKILL.md +133 -0
  342. package/skills/keeping-a-desk/collections.md +96 -0
  343. package/skills/planning-the-board/SKILL.md +14 -18
  344. package/skills/planning-the-board/references/a-task.md +2 -2
  345. package/skills/planning-the-board/references/project-rules.md +13 -14
  346. package/skills/planning-the-board/references/setting-up.md +15 -13
  347. package/skills/running-an-agent/SKILL.md +47 -56
  348. package/skills/working-the-board/SKILL.md +63 -44
  349. package/skills/working-the-board/references/terms.md +9 -5
  350. package/skills/working-the-board/references/the-pack.md +12 -10
  351. package/skills/working-the-board/references/the-sentence.md +2 -2
  352. package/src/agent-page.tsx +16 -2
  353. package/src/api.ts +109 -3
  354. package/src/charts.ts +250 -0
  355. package/src/cli/cli.ts +2226 -580
  356. package/src/cli/command-words.ts +56 -0
  357. package/src/cli/credentials.ts +181 -20
  358. package/src/cli/directory.ts +28 -10
  359. package/src/cli/format.ts +332 -49
  360. package/src/cli/help.ts +113 -57
  361. package/src/cli/machine-check.ts +223 -0
  362. package/src/cli/main.ts +72 -2
  363. package/src/cli/pack.ts +333 -372
  364. package/src/cli/plugin-check.ts +275 -34
  365. package/src/cli/plugin-cli.ts +28 -4
  366. package/src/cli/plugin-main.ts +1 -0
  367. package/src/cli/runner-host.ts +8 -0
  368. package/src/cli/secret-notes.ts +63 -0
  369. package/src/cli/serve.ts +295 -2
  370. package/src/client.ts +215 -177
  371. package/src/components/agent-page.tsx +1044 -281
  372. package/src/components/agents.tsx +9 -5
  373. package/src/components/board.tsx +3 -15
  374. package/src/components/categories.tsx +2 -2
  375. package/src/components/charts.tsx +680 -0
  376. package/src/components/decision-list.tsx +11 -7
  377. package/src/components/desk-records.tsx +724 -0
  378. package/src/components/desk.tsx +471 -0
  379. package/src/components/event-feed.tsx +12 -3
  380. package/src/components/goals.tsx +33 -25
  381. package/src/components/home.tsx +42 -6
  382. package/src/components/icon.tsx +337 -0
  383. package/src/components/markdown.tsx +22 -2
  384. package/src/components/people.tsx +1 -1
  385. package/src/components/plugin-frame.tsx +7 -0
  386. package/src/components/plugin-settings.tsx +171 -12
  387. package/src/components/projects.tsx +68 -17
  388. package/src/components/rules.tsx +94 -34
  389. package/src/components/sessions.tsx +2 -13
  390. package/src/components/setup.tsx +20 -5
  391. package/src/components/shell.tsx +3 -20
  392. package/src/components/tokens.tsx +1 -1
  393. package/src/components/ui.tsx +16 -8
  394. package/src/connect-page.tsx +1 -1
  395. package/src/console.tsx +104 -62
  396. package/src/data.ts +37 -34
  397. package/src/desk-page.tsx +332 -0
  398. package/src/desk-records-page.tsx +256 -0
  399. package/src/desk-records.ts +808 -0
  400. package/src/desk.ts +329 -0
  401. package/src/feed-stream.ts +144 -0
  402. package/src/home-tiles.ts +170 -46
  403. package/src/i18n/en.ts +323 -11
  404. package/src/i18n/ko.ts +378 -87
  405. package/src/i18n/particles.ts +79 -0
  406. package/src/icons/glyphs.ts +112 -0
  407. package/src/icons/index.ts +195 -0
  408. package/src/index.ts +125 -0
  409. package/src/limits.ts +20 -0
  410. package/src/marks.ts +12 -0
  411. package/src/onboarding.ts +14 -6
  412. package/src/plugin/context.ts +55 -12
  413. package/src/plugin/limits.ts +2 -0
  414. package/src/plugin/manifest.ts +38 -2
  415. package/src/plugin/rest-schemas.ts +41 -0
  416. package/src/plugin/sandbox.ts +4 -1
  417. package/src/plugin/testing.ts +63 -12
  418. package/src/plugin/web.ts +9 -2
  419. package/src/plugin.ts +2 -0
  420. package/src/records.ts +702 -0
  421. package/src/routes.ts +3 -1
  422. package/src/rules.ts +108 -47
  423. package/src/runner/acp.ts +49 -30
  424. package/src/runner/awake.ts +135 -0
  425. package/src/runner/claude.ts +131 -26
  426. package/src/runner/codex.ts +37 -26
  427. package/src/runner/config.ts +9 -0
  428. package/src/runner/desk.ts +200 -15
  429. package/src/runner/process.ts +11 -4
  430. package/src/runner/redact.ts +92 -6
  431. package/src/runner/runner.ts +457 -56
  432. package/src/runner/slack.ts +10 -4
  433. package/src/runner/task-scheduler.ts +36 -4
  434. package/src/runner/types.ts +67 -1
  435. package/src/runner.ts +27 -2
  436. package/src/schemas.ts +177 -18
  437. package/src/services.ts +55 -16
  438. package/src/setup-guide.ts +49 -40
  439. package/src/styles/README.md +16 -5
  440. package/src/styles/base.css +17 -0
  441. package/src/styles/console.css +10 -0
  442. package/src/styles/drawn-by-pages.json +1 -1
  443. package/src/styles/pages/agents.css +103 -1
  444. package/src/styles/pages/board.css +0 -10
  445. package/src/styles/pages/calendar.css +1 -1
  446. package/src/styles/pages/connect.css +0 -10
  447. package/src/styles/pages/decisions.css +3 -1
  448. package/src/styles/pages/desk.css +126 -0
  449. package/src/styles/pages/documents.css +5 -0
  450. package/src/styles/pages/feed.css +5 -2
  451. package/src/styles/pages/home.css +5 -0
  452. package/src/styles/pages/roadmap.css +2 -2
  453. package/src/styles/pages/settings.css +11 -0
  454. package/src/styles/pages/task.css +0 -20
  455. package/src/styles/pages/thread.css +1 -1
  456. package/src/styles/parts/bars.css +80 -0
  457. package/src/styles/parts/calendar.css +1 -1
  458. package/src/styles/parts/callout.css +1 -0
  459. package/src/styles/parts/chart.css +173 -0
  460. package/src/styles/parts/detail.css +22 -0
  461. package/src/styles/parts/empty.css +2 -0
  462. package/src/styles/parts/eyebrow.css +1 -1
  463. package/src/styles/parts/facts.css +1 -1
  464. package/src/styles/parts/figures.css +65 -0
  465. package/src/styles/parts/form.css +2 -1
  466. package/src/styles/parts/icon.css +191 -0
  467. package/src/styles/parts/input.css +14 -4
  468. package/src/styles/parts/legend.css +48 -0
  469. package/src/styles/parts/mark.css +36 -0
  470. package/src/styles/parts/menu.css +1 -7
  471. package/src/styles/parts/page.css +1 -1
  472. package/src/styles/parts/panel.css +10 -0
  473. package/src/styles/parts/person.css +5 -2
  474. package/src/styles/parts/progress.css +5 -2
  475. package/src/styles/parts/rows.css +1 -0
  476. package/src/styles/parts/series.css +32 -0
  477. package/src/styles/parts/settings.css +5 -0
  478. package/src/styles/parts/share.css +25 -0
  479. package/src/styles/parts/spark.css +23 -0
  480. package/src/styles/parts/stat.css +69 -0
  481. package/src/styles/tokens.css +31 -10
  482. package/src/tokens.ts +5 -1
  483. package/src/vocabulary.ts +25 -3
  484. package/template/desk-web/README.md +8 -0
  485. package/template/desk-web/index.html +13 -0
  486. package/template/desk-web/package.json +25 -0
  487. package/template/desk-web/src/main.tsx +24 -0
  488. package/template/desk-web/src/page.tsx +51 -0
  489. package/template/desk-web/tsconfig.json +16 -0
  490. package/template/desk-web/vite.config.ts +15 -0
@@ -0,0 +1,102 @@
1
+ import { type CollectionResults, type CollectionSummary, type MetricFigure, type RatioFigure, type RecordFileState, type RecordProblem } from "../desk-records.js";
2
+ import { type Messages } from "../i18n/index.js";
3
+ import type { RecordsCollection, RecordsItem, RecordsMetricRow, RecordsUse } from "../records.js";
4
+ /** A metric's figure as words: its number in its unit, or that there is none. */
5
+ export declare function metricWords(figure: Pick<MetricFigure, "unit"> & {
6
+ readonly total: number | undefined;
7
+ }, tag: string, words: Messages["desk"]["records"]): string;
8
+ /** A ratio's figure as words: a share of a hundred or a plain number, or that there is none. */
9
+ export declare function ratioWords(figure: Pick<RatioFigure, "as" | "value">, tag: string, words: Messages["desk"]["records"]): string;
10
+ /** What is wrong with the records' files, a line each, over what could be read. */
11
+ export declare function DeskRecordProblems(props: {
12
+ readonly problems: readonly RecordProblem[];
13
+ }): import("react").JSX.Element | null;
14
+ /** Where no records are served: what a record is, and where the first comes from. */
15
+ export declare function DeskNoRecords(): import("react").JSX.Element;
16
+ /** The way down to where the records' view is: the records, a collection, an item. */
17
+ export declare function DeskRecordCrumbs(props: {
18
+ /** Each step by its name; all but the last with where it is. */
19
+ readonly steps: readonly {
20
+ readonly label: string;
21
+ readonly href?: string | undefined;
22
+ }[];
23
+ }): import("react").JSX.Element;
24
+ export interface DeskCollectionsProps {
25
+ readonly collections: readonly CollectionSummary[];
26
+ readonly collectionHref: (key: string) => string;
27
+ }
28
+ /** The collections a desk keeps: a row each, with how many items it holds by status and when the last was made. */
29
+ export declare function DeskCollections(props: DeskCollectionsProps): import("react").JSX.Element;
30
+ export interface DeskCollectionViewProps {
31
+ /** The collection's key, by which its files are read. */
32
+ readonly collectionKey: string;
33
+ readonly collection: RecordsCollection | undefined;
34
+ /** The collection's items, the last made first. */
35
+ readonly items: readonly RecordsItem[];
36
+ /** The status the items are narrowed to, by its key. */
37
+ readonly status?: string | undefined;
38
+ readonly onStatus: (status: string | undefined) => void;
39
+ readonly itemHref: (id: string) => string;
40
+ /** Where the records are served; the usual place where left out. */
41
+ readonly base?: string | undefined;
42
+ }
43
+ /**
44
+ * One collection: its items narrowed by status, as cards where any of them has a preview and
45
+ * as rows where none has, each with its title, its status, the day it was made and its fields.
46
+ */
47
+ export declare function DeskCollectionView(props: DeskCollectionViewProps): import("react").JSX.Element;
48
+ /** One file of an item as its page shows it: what it is called, where it is read, and how it stands. */
49
+ export interface DeskFile {
50
+ readonly label: string;
51
+ /** Where the file is read from, on the page's own origin; nothing where it is no file of the collection. */
52
+ readonly src: string | undefined;
53
+ readonly state: RecordFileState;
54
+ }
55
+ export interface DeskItemViewProps {
56
+ readonly collectionKey: string;
57
+ readonly collection: RecordsCollection | undefined;
58
+ readonly item: RecordsItem;
59
+ /** Where the item was used, the last first. */
60
+ readonly uses: readonly RecordsUse[];
61
+ /** How the item did: its rows by day, the last first, and its figures over all of them. */
62
+ readonly results: {
63
+ readonly days: readonly RecordsMetricRow[];
64
+ readonly metrics: readonly MetricFigure[];
65
+ readonly ratios: readonly RatioFigure[];
66
+ };
67
+ /** The item's files, each as the server answered for it. */
68
+ readonly files: readonly DeskFile[];
69
+ /** Where a task of the board is, for an item that names one. */
70
+ readonly taskHref: (projectKey: string, taskNumber: number) => string;
71
+ readonly base?: string | undefined;
72
+ }
73
+ /**
74
+ * One item, what it is before what it holds: its preview and its note, how it did as figures
75
+ * with the run each came by, where it was used, its files, and last its figures day by day,
76
+ * to be read exactly; beside them what it says of itself: the day it was made, its status, its
77
+ * fields, its links, and the task it names, where it names one.
78
+ */
79
+ export declare function DeskItemView(props: DeskItemViewProps): import("react").JSX.Element;
80
+ export interface DeskCollectionResultsProps {
81
+ readonly collection: RecordsCollection | undefined;
82
+ readonly results: CollectionResults;
83
+ /** The items that did best by the metric picked, the most first. */
84
+ readonly best: {
85
+ readonly metric: NonNullable<RecordsCollection["metrics"]>[number] | undefined;
86
+ readonly items: readonly {
87
+ readonly item: RecordsItem;
88
+ readonly total: number;
89
+ }[];
90
+ };
91
+ readonly onBy: (metric: string) => void;
92
+ readonly itemHref: (id: string) => string;
93
+ }
94
+ /**
95
+ * How a collection did, the figures that matter first: each metric's total and each ratio over
96
+ * everything, a number each with the run it came by; then one metric, the one the person
97
+ * picks, looked at closer: by week as one chart on its own scale, and the items that did best
98
+ * by it as bars. No figure stands twice: the weeks' exact figures are the chart's own, said to
99
+ * the pointer and, as a table, to a reader who cannot see it.
100
+ */
101
+ export declare function DeskCollectionResults(props: DeskCollectionResultsProps): import("react").JSX.Element;
102
+ //# sourceMappingURL=desk-records.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"desk-records.d.ts","sourceRoot":"","sources":["../../src/components/desk-records.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EAItB,KAAK,YAAY,EAEjB,KAAK,WAAW,EAEhB,KAAK,eAAe,EACpB,KAAK,aAAa,EAEnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,KAAK,QAAQ,EAAyB,MAAM,kBAAkB,CAAC;AACxE,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAkBlG,iFAAiF;AACjF,wBAAgB,WAAW,CACzB,MAAM,EAAE,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,GAAG;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,EAC3E,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,GACjC,MAAM,CASR;AAED,gGAAgG;AAChG,wBAAgB,UAAU,CACxB,MAAM,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,GAAG,OAAO,CAAC,EACzC,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,GACjC,MAAM,CAOR;AAED,mFAAmF;AACnF,wBAAgB,kBAAkB,CAAC,KAAK,EAAE;IAAE,QAAQ,CAAC,QAAQ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C/E,QAAQ,CAAC,KAAK,EAAE,SAAS;YAAE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;YAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;SAAE,EAAE,CAAC;KACnF,CAAC;IACF,QAAQ,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,QAAQ,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,CAAC;CAC3C;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,+BAgGtE"}
@@ -0,0 +1,221 @@
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from "react";
3
+ import { fieldsOf, httpsLink, previewSrc, RECORDS_BASE, statusCounts, } from "../desk-records.js";
4
+ import { useLanguage, useWords } from "../i18n/index.js";
5
+ import { BarList, Chart, FigureTable, Stat, Stats } from "./charts.js";
6
+ import { weekStartLabel } from "./desk.js";
7
+ import { ShowMore, usePaged } from "./paged.js";
8
+ import { Badge, Callout, Day, EmptyState } from "./ui.js";
9
+ // The records' views of a desk's pages (ADR-0117): the collections a desk keeps, one collection
10
+ // with its items, one item with its files, where it was used and how it did, and a collection's
11
+ // results. Each takes what was read as props and nothing from the network, and is built from
12
+ // the console's parts alone, the figures from the charts (ADR-0123). Everything a record says was written by an agent and is shown as
13
+ // text; a link is followed only where it is https and opens apart; a file is shown by the kind
14
+ // the server says it is, and nothing an agent wrote is ever a page.
15
+ /** A number as a language writes one, with no more than `digits` after its point. */
16
+ function amount(value, tag, digits = 2) {
17
+ return value.toLocaleString(tag, { maximumFractionDigits: digits });
18
+ }
19
+ /** A metric's figure as words: its number in its unit, or that there is none. */
20
+ export function metricWords(figure, tag, words) {
21
+ if (figure.total === undefined) {
22
+ return words.noValue;
23
+ }
24
+ return figure.unit === "percent"
25
+ ? words.percent(amount(figure.total, tag, 1))
26
+ : figure.unit === "seconds"
27
+ ? words.seconds(amount(figure.total, tag, 1))
28
+ : amount(figure.total, tag);
29
+ }
30
+ /** A ratio's figure as words: a share of a hundred or a plain number, or that there is none. */
31
+ export function ratioWords(figure, tag, words) {
32
+ if (figure.value === undefined) {
33
+ return words.noValue;
34
+ }
35
+ return figure.as === "percent"
36
+ ? words.percent(amount(figure.value * 100, tag))
37
+ : amount(figure.value, tag);
38
+ }
39
+ /** What is wrong with the records' files, a line each, over what could be read. */
40
+ export function DeskRecordProblems(props) {
41
+ const words = useWords().desk.records.problems;
42
+ if (props.problems.length === 0) {
43
+ return null;
44
+ }
45
+ return (_jsxs(Callout, { tone: "warning", title: words.title, children: [props.problems.map((problem) => (_jsxs("p", { children: [problem.kind === "unreadable"
46
+ ? words.unreadable(problem.file)
47
+ : problem.kind === "too_large"
48
+ ? words.tooLarge(problem.file)
49
+ : problem.kind === "not_json"
50
+ ? words.notJson(problem.file)
51
+ : words.notAsFormat(problem.file, problem.at ?? ""), problem.left !== undefined && _jsxs(_Fragment, { children: [" ", words.left(problem.left)] })] }, `${problem.file} ${problem.kind}`))), _jsx("p", { children: words.check })] }));
52
+ }
53
+ /** Where no records are served: what a record is, and where the first comes from. */
54
+ export function DeskNoRecords() {
55
+ const words = useWords().desk.records;
56
+ return _jsx(EmptyState, { title: words.none.title, body: words.none.body });
57
+ }
58
+ /** The way down to where the records' view is: the records, a collection, an item. */
59
+ export function DeskRecordCrumbs(props) {
60
+ const words = useWords().desk.records;
61
+ return (_jsx("nav", { className: "sc-doc-crumbs", "aria-label": words.crumb, children: props.steps.map((step, index) => (_jsxs("span", { children: [index > 0 && (_jsx("span", { className: "sc-crumb-separator", "aria-hidden": "true", children: "/" })), step.href === undefined ? step.label : _jsx("a", { href: step.href, children: step.label })] }, `${step.href ?? ""} ${step.label}`))) }));
62
+ }
63
+ /** The items of a collection counted by status, as badges. */
64
+ function StatusCounts(props) {
65
+ return (_jsx(_Fragment, { children: props.counts
66
+ .filter((status) => status.count > 0)
67
+ .map((status) => (_jsxs(Badge, { kind: "count", children: [status.label, " ", status.count] }, status.key))) }));
68
+ }
69
+ /** The collections a desk keeps: a row each, with how many items it holds by status and when the last was made. */
70
+ export function DeskCollections(props) {
71
+ const words = useWords().desk.records;
72
+ if (props.collections.length === 0) {
73
+ return _jsx("p", { className: "sc-muted", children: words.noCollections });
74
+ }
75
+ return (_jsx("ul", { className: "sc-task-rows", "aria-label": words.collections, children: props.collections.map((collection) => (_jsxs("li", { className: "sc-task-row", children: [_jsx("a", { className: "sc-task-row-title", href: props.collectionHref(collection.key), children: collection.title }), collection.description !== undefined && collection.description.length > 0 && (_jsx("span", { className: "sc-task-row-project", children: collection.description })), _jsxs("span", { className: "sc-task-row-meta", children: [_jsx(StatusCounts, { counts: collection.statuses }), _jsx("span", { className: "sc-muted", children: words.items(collection.items) }), collection.lastMadeOn !== undefined && (_jsxs("span", { className: "sc-muted", children: [words.lastMade, " ", _jsx(Day, { day: collection.lastMadeOn })] }))] })] }, collection.key))) }));
76
+ }
77
+ /** An item's status as a badge: its label where the collection names the status, the word itself where it does not. */
78
+ function StatusBadge(props) {
79
+ if (props.status === undefined) {
80
+ return null;
81
+ }
82
+ const named = props.collection?.statuses?.find((status) => status.key === props.status);
83
+ return _jsx(Badge, { kind: "state", children: named?.label ?? props.status });
84
+ }
85
+ /** What an item says for one field, as its kind has it shown. */
86
+ function FieldWords(props) {
87
+ const { tag } = useLanguage();
88
+ const { value } = props;
89
+ if (value.kind === "day") {
90
+ return _jsx(Day, { day: value.day });
91
+ }
92
+ if (value.kind === "link") {
93
+ return (_jsx("a", { href: value.href, target: "_blank", rel: "noopener noreferrer", children: value.href }));
94
+ }
95
+ return value.kind === "number" ? amount(value.value, tag) : value.text;
96
+ }
97
+ /** A preview, where the file is there: taken out of the page again where it will not load. */
98
+ function Preview(props) {
99
+ const [failed, setFailed] = useState(false);
100
+ return failed ? null : (_jsx("img", { className: props.className, src: props.src, alt: props.alt, loading: "lazy", decoding: "async", onError: () => setFailed(true) }));
101
+ }
102
+ /**
103
+ * One collection: its items narrowed by status, as cards where any of them has a preview and
104
+ * as rows where none has, each with its title, its status, the day it was made and its fields.
105
+ */
106
+ export function DeskCollectionView(props) {
107
+ const words = useWords().desk.records;
108
+ const { collection, items } = props;
109
+ const base = props.base ?? RECORDS_BASE;
110
+ const counts = statusCounts(collection, items);
111
+ const narrowed = props.status === undefined ? items : items.filter((item) => item.status === props.status);
112
+ const { shown, rest, more } = usePaged(narrowed);
113
+ const pictured = items.some((item) => previewSrc(props.collectionKey, item.preview, base) !== undefined);
114
+ return (_jsxs(_Fragment, { children: [counts.length > 0 && (_jsxs("div", { className: "sc-filters", children: [_jsxs("label", { className: "sc-field sc-field-inline", children: [_jsx("span", { className: "sc-visually-hidden", children: words.narrow }), _jsxs("select", { className: "sc-input", value: props.status ?? "", onChange: (event) => props.onStatus(event.target.value === "" ? undefined : event.target.value), children: [_jsx("option", { value: "", children: words.everyStatus }), counts.map((status) => (_jsxs("option", { value: status.key, children: [status.label, " (", status.count, ")"] }, status.key)))] })] }), _jsx("span", { className: "sc-filters-count sc-muted", children: words.shown(narrowed.length, items.length) })] })), narrowed.length === 0 ? (_jsx("p", { className: "sc-muted", children: items.length === 0 ? words.noItems : words.noneOfStatus })) : pictured ? (_jsx("ul", { className: "sc-desk-cards", "aria-label": words.showItems, children: shown.map((item) => {
115
+ const src = previewSrc(props.collectionKey, item.preview, base);
116
+ const fields = fieldsOf(collection, item);
117
+ return (_jsxs("li", { className: "sc-panel sc-desk-card", children: [src !== undefined && _jsx(Preview, { className: "sc-desk-card-picture", src: src, alt: "" }), _jsx("a", { className: "sc-task-row-title", href: props.itemHref(item.id), children: item.title }), _jsxs("div", { className: "sc-task-badges", children: [_jsx(StatusBadge, { collection: collection, status: item.status }), _jsx(Day, { day: item.madeOn })] }), fields.length > 0 && (_jsx("dl", { className: "sc-facts-row", children: fields.map((field) => (_jsxs("div", { children: [_jsx("dt", { children: field.label }), _jsx("dd", { children: _jsx(FieldWords, { value: field.value }) })] }, field.key))) }))] }, item.id));
118
+ }) })) : (_jsx("ul", { className: "sc-task-rows", "aria-label": words.showItems, children: shown.map((item) => (_jsxs("li", { className: "sc-task-row", children: [_jsx("a", { className: "sc-task-row-title", href: props.itemHref(item.id), children: item.title }), _jsx("span", { className: "sc-task-row-project", children: fieldsOf(collection, item).map((field, index) => (_jsxs("span", { children: [index > 0 && " · ", field.label, ": ", _jsx(FieldWords, { value: field.value })] }, field.key))) }), _jsxs("span", { className: "sc-task-row-meta", children: [_jsx(StatusBadge, { collection: collection, status: item.status }), _jsx(Day, { day: item.madeOn })] })] }, item.id))) })), _jsx(ShowMore, { rest: rest, onMore: more })] }));
119
+ }
120
+ /** A file of an item: shown in place where its kind can be, handed over where it cannot, or said to be missing. */
121
+ function FileRow(props) {
122
+ const words = useWords().desk.records;
123
+ const { label, src, state } = props.file;
124
+ const shown = src !== undefined &&
125
+ (state.kind === "picture" ||
126
+ state.kind === "video" ||
127
+ state.kind === "sound" ||
128
+ state.kind === "pdf" ||
129
+ state.kind === "other");
130
+ return (_jsxs("li", { children: [_jsx("span", { children: label }), state.kind === "reading" && _jsx("span", { className: "sc-muted", children: words.reading }), state.kind === "not_fetched" && _jsx("span", { className: "sc-muted", children: words.notFetched }), state.kind === "refused" && _jsx("span", { className: "sc-muted", children: words.refused }), state.kind === "unreadable" && _jsx("span", { className: "sc-muted", children: words.unreadable }), (state.kind === "not_fetched" || state.kind === "refused") && state.words !== undefined && (_jsx("span", { className: "sc-muted", children: state.words })), shown && state.kind === "pdf" && (_jsx("a", { href: src, target: "_blank", rel: "noopener noreferrer", children: words.open })), shown && (_jsx("a", { href: src, download: true, children: words.download })), shown && state.kind === "picture" && (_jsx("img", { className: "sc-desk-file-media", src: src, alt: label, loading: "lazy", decoding: "async" })), shown && state.kind === "video" && (_jsx("video", { className: "sc-desk-file-media", src: src, controls: true, preload: "metadata" })), shown && state.kind === "sound" && (_jsx("audio", { className: "sc-desk-file-media", src: src, controls: true, preload: "none" })), shown && state.kind === "pdf" && state.framed && (_jsx("div", { className: "sc-plugin-frame-box sc-desk-file-frame", children: _jsx("iframe", { className: "sc-plugin-frame", src: src, title: label, loading: "lazy" }) }))] }));
131
+ }
132
+ /**
133
+ * One item, what it is before what it holds: its preview and its note, how it did as figures
134
+ * with the run each came by, where it was used, its files, and last its figures day by day,
135
+ * to be read exactly; beside them what it says of itself: the day it was made, its status, its
136
+ * fields, its links, and the task it names, where it names one.
137
+ */
138
+ export function DeskItemView(props) {
139
+ const words = useWords().desk.records;
140
+ const { tag } = useLanguage();
141
+ const { collection, item, uses, results, files } = props;
142
+ const src = previewSrc(props.collectionKey, item.preview, props.base ?? RECORDS_BASE);
143
+ const fields = fieldsOf(collection, item);
144
+ const links = (item.links ?? []).flatMap((link) => {
145
+ const href = httpsLink(link.url);
146
+ return href === undefined ? [] : [{ label: link.label, href }];
147
+ });
148
+ const metrics = collection?.metrics ?? [];
149
+ const days = usePaged(results.days);
150
+ // The run each metric came by, day by day, the latest last.
151
+ const trends = Object.fromEntries(metrics.map((metric) => [
152
+ metric.key,
153
+ results.days.map((row) => row.values[metric.key]).reverse(),
154
+ ]));
155
+ return (_jsxs("div", { className: "sc-desk-item", children: [_jsxs("header", { className: "sc-task-header", children: [_jsx("h2", { className: "sc-task-title", children: item.title }), _jsx("div", { className: "sc-task-badges", children: _jsx(StatusBadge, { collection: collection, status: item.status }) })] }), _jsxs("div", { className: "sc-task-body", children: [_jsxs("div", { className: "sc-task-main", children: [src !== undefined && _jsx(Preview, { className: "sc-desk-item-picture", src: src, alt: "" }), item.note !== undefined && item.note.length > 0 && (_jsxs("section", { className: "sc-task-section", "aria-label": words.note, children: [_jsx("h3", { className: "sc-section-title", children: words.note }), _jsx("p", { className: "sc-desk-words", children: item.note })] })), metrics.length > 0 && (_jsxs("section", { className: "sc-task-section", "aria-label": words.results, children: [_jsx("h3", { className: "sc-section-title", children: words.results }), results.days.length === 0 ? (_jsx("p", { className: "sc-muted", children: words.noRows })) : (_jsx(Figures, { label: words.results, metrics: results.metrics, ratios: results.ratios, trends: trends }))] })), _jsxs("section", { className: "sc-task-section", "aria-label": words.uses, children: [_jsxs("h3", { className: "sc-section-title", children: [words.uses, " ", _jsx("span", { className: "sc-column-count", children: uses.length })] }), uses.length === 0 ? (_jsx("p", { className: "sc-muted", children: words.noUses })) : (_jsx("ul", { className: "sc-link-list", children: uses.map((use) => (_jsxs("li", { children: [_jsx(Day, { day: use.on }), _jsx("span", { children: use.where }), use.note !== undefined && use.note.length > 0 && (_jsx("span", { className: "sc-muted", children: use.note }))] }, `${use.on} ${use.where} ${use.note ?? ""}`))) }))] }), files.length > 0 && (_jsxs("section", { className: "sc-task-section", "aria-label": words.files, children: [_jsx("h3", { className: "sc-section-title", children: words.files }), _jsx("ul", { className: "sc-link-list", children: files.map((file) => (_jsx(FileRow, { file: file }, `${file.src ?? ""} ${file.label}`))) })] })), metrics.length > 0 && results.days.length > 0 && (_jsxs("section", { className: "sc-task-section", "aria-label": words.byDay, children: [_jsx("h3", { className: "sc-section-title", children: words.byDay }), _jsx(FigureTable, { caption: words.byDay, language: tag, columns: [words.day, ...metrics.map((metric) => metric.label)], rows: days.shown.map((row) => ({
156
+ id: row.on,
157
+ label: _jsx(Day, { day: row.on }),
158
+ values: metrics.map((metric) => {
159
+ const total = row.values[metric.key];
160
+ return total === undefined
161
+ ? undefined
162
+ : metricWords({ unit: metric.unit, total }, tag, words);
163
+ }),
164
+ })) }), _jsx(ShowMore, { rest: days.rest, onMore: days.more })] }))] }), _jsxs("aside", { className: "sc-task-aside", "aria-label": words.about, children: [_jsxs("dl", { className: "sc-facts", children: [_jsxs("div", { children: [_jsx("dt", { children: words.madeOn }), _jsx("dd", { children: _jsx(Day, { day: item.madeOn }) })] }), fields.map((field) => (_jsxs("div", { children: [_jsx("dt", { children: field.label }), _jsx("dd", { children: _jsx(FieldWords, { value: field.value }) })] }, field.key))), item.task !== undefined && (_jsxs("div", { children: [_jsx("dt", { children: words.task }), _jsx("dd", { children: _jsx("a", { href: props.taskHref(item.task.project, item.task.number), children: words.taskOf(item.task.project, item.task.number) }) })] }))] }), links.length > 0 && (_jsxs("section", { className: "sc-task-section", "aria-label": words.links, children: [_jsx("h3", { className: "sc-section-title", children: words.links }), _jsx("ul", { className: "sc-link-list", children: links.map((link) => (_jsx("li", { children: _jsx("a", { href: link.href, target: "_blank", rel: "noopener noreferrer", children: link.label }) }, link.href))) })] }))] })] })] }));
165
+ }
166
+ /**
167
+ * The figures of some rows: each metric's total and each ratio, a number under its name, and
168
+ * the run each metric came by, where it is one: two amounts or more.
169
+ */
170
+ function Figures(props) {
171
+ const words = useWords().desk.records;
172
+ const { tag } = useLanguage();
173
+ /** A metric's run, where it has amounts enough to be one: a single amount is the figure itself. */
174
+ const runOf = (key) => {
175
+ const run = props.trends?.[key];
176
+ return run !== undefined && run.filter((value) => value !== undefined).length > 1
177
+ ? run
178
+ : undefined;
179
+ };
180
+ return (_jsxs(Stats, { label: props.label, children: [props.metrics.map((metric) => (_jsx(Stat, { label: metric.label, value: metricWords(metric, tag, words), trend: runOf(metric.key) }, metric.key))), props.ratios.map((ratio) => (_jsx(Stat, { label: ratio.label, value: ratioWords(ratio, tag, words) }, `ratio ${ratio.key}`)))] }));
181
+ }
182
+ /**
183
+ * How a collection did, the figures that matter first: each metric's total and each ratio over
184
+ * everything, a number each with the run it came by; then one metric, the one the person
185
+ * picks, looked at closer: by week as one chart on its own scale, and the items that did best
186
+ * by it as bars. No figure stands twice: the weeks' exact figures are the chart's own, said to
187
+ * the pointer and, as a table, to a reader who cannot see it.
188
+ */
189
+ export function DeskCollectionResults(props) {
190
+ const words = useWords().desk.records;
191
+ const { tag } = useLanguage();
192
+ const { collection, results, best } = props;
193
+ const metrics = collection?.metrics ?? [];
194
+ const picked = best.metric;
195
+ if (metrics.length === 0 || picked === undefined) {
196
+ return _jsx("p", { className: "sc-muted", children: words.noMetrics });
197
+ }
198
+ if (results.metrics.every((metric) => metric.total === undefined)) {
199
+ // Nothing recorded yet: what would fill the view, and no axis drawn over nothing.
200
+ return _jsx(EmptyState, { title: words.noFigures.title, body: words.noFigures.body });
201
+ }
202
+ /** A metric's totals by week, the latest last; nothing for a week with no row of it. */
203
+ const byWeek = (key) => results.weeks.map((week) => week.metrics.find((metric) => metric.key === key)?.total);
204
+ return (_jsxs("div", { className: "sc-desk-figures", children: [_jsxs("section", { className: "sc-task-section", "aria-label": words.inAll, children: [_jsx("h3", { className: "sc-section-title", children: words.inAll }), _jsx(Figures, { label: words.inAll, metrics: results.metrics, ratios: results.ratios, trends: Object.fromEntries(metrics.map((metric) => [metric.key, byWeek(metric.key)])) })] }), _jsxs("section", { className: "sc-task-section", "aria-label": picked.label, children: [metrics.length > 1 ? (_jsx("div", { className: "sc-filters", children: _jsxs("label", { className: "sc-field sc-field-inline", children: [_jsx("span", { className: "sc-visually-hidden", children: words.bestBy }), _jsx("select", { className: "sc-input", value: picked.key, onChange: (event) => props.onBy(event.target.value), children: metrics.map((metric) => (_jsxs("option", { value: metric.key, children: [words.bestBy, " ", metric.label] }, metric.key))) })] }) })) : (_jsx("h3", { className: "sc-section-title", children: picked.label })), _jsxs("div", { className: "sc-desk-pair", children: [_jsxs("section", { className: "sc-panel", "aria-label": words.byWeek, children: [_jsx("h4", { className: "sc-section-title", children: words.byWeek }), _jsx(Chart, { title: `${picked.label} · ${words.byWeek}`,
205
+ // What is counted in a week stands as a column; a share, which is followed
206
+ // from week to week, as a line.
207
+ kind: picked.unit === "percent" ? "line" : "columns", language: tag, points: results.weeks.map((week) => weekStartLabel(week.start, tag)), series: [{ name: picked.label, values: byWeek(picked.key) }],
208
+ // A count is written as the language writes a number, short on the scale; a
209
+ // share and a time carry their unit.
210
+ format: picked.unit === "percent" || picked.unit === "seconds"
211
+ ? (value) => metricWords({ unit: picked.unit, total: value }, tag, words)
212
+ : undefined, empty: words.noRows })] }), _jsxs("section", { className: "sc-panel", "aria-label": words.best, children: [_jsx("h4", { className: "sc-section-title", children: words.best }), best.items.length === 0 ? (_jsx("p", { className: "sc-muted", children: words.noRows })) : (_jsx(BarList, { label: words.best, ranked: true, language: tag, rows: best.items.map(({ item, total }) => ({
213
+ id: item.id,
214
+ label: item.title,
215
+ href: props.itemHref(item.id),
216
+ note: item.status === undefined ? undefined : (_jsx(StatusBadge, { collection: collection, status: item.status })),
217
+ value: total,
218
+ words: metricWords({ unit: picked.unit, total }, tag, words),
219
+ })) }))] })] })] })] }));
220
+ }
221
+ //# sourceMappingURL=desk-records.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"desk-records.js","sourceRoot":"","sources":["../../src/components/desk-records.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAkB,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAIL,QAAQ,EACR,SAAS,EAET,UAAU,EAEV,YAAY,EAGZ,YAAY,GACb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAiB,WAAW,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAExE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1D,gGAAgG;AAChG,gGAAgG;AAChG,6FAA6F;AAC7F,sIAAsI;AACtI,+FAA+F;AAC/F,oEAAoE;AAEpE,qFAAqF;AACrF,SAAS,MAAM,CAAC,KAAa,EAAE,GAAW,EAAE,MAAM,GAAG,CAAC;IACpD,OAAO,KAAK,CAAC,cAAc,CAAC,GAAG,EAAE,EAAE,qBAAqB,EAAE,MAAM,EAAE,CAAC,CAAC;AACtE,CAAC;AAED,iFAAiF;AACjF,MAAM,UAAU,WAAW,CACzB,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,GAAG,EAAE,KAAK,CAAC;yCAC7D,CAAC,CAAC,GACH,CACH,IACO,IACN,IACE,IACN,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,85 @@
1
+ import { type RestWorkBrief } from "../api.js";
2
+ import { type DeskFigures, type DeskRun, type DeskTask } from "../desk.js";
3
+ /**
4
+ * The views of a desk's page, in the order its tabs stand: the records the desk keeps, then the
5
+ * member's work on the board, what stands there now, its figures and its archive.
6
+ */
7
+ export declare const DESK_VIEWS: readonly ["records", "now", "figures", "archive"];
8
+ export type DeskView = (typeof DESK_VIEWS)[number];
9
+ /** The tabs of a desk: one per view, the current one marked. */
10
+ export declare function DeskViews(props: {
11
+ readonly view: DeskView;
12
+ readonly viewHref: (view: DeskView) => string;
13
+ }): import("react").JSX.Element;
14
+ /**
15
+ * A week as a figure names it: from its first day to its last, without the year, which eight
16
+ * weeks in a row would say eight times.
17
+ */
18
+ export declare function weekLabel(start: string, end: string, language?: string): string;
19
+ /**
20
+ * A week as a point of a chart names it: by its first day, short enough to stand under a
21
+ * column. The table beside the chart, or the heading over it, says that the points are weeks.
22
+ */
23
+ export declare function weekStartLabel(start: string, language?: string): string;
24
+ export interface DeskStandingProps {
25
+ /** The open tasks the person works on, the sooner due first, as the plate answers them. */
26
+ readonly tasks: readonly DeskTask[];
27
+ /** The decisions that wait for the person's answer. */
28
+ readonly decisions: RestWorkBrief["decisions"];
29
+ /** The person's runs that are open. */
30
+ readonly runs: readonly DeskRun[];
31
+ /** The day to count due days from; the browser's today when left out. */
32
+ readonly today?: string | undefined;
33
+ readonly taskHref: (projectKey: string, taskNumber: number) => string;
34
+ readonly decisionHref: (projectKey: string, decisionId: string) => string;
35
+ }
36
+ /**
37
+ * What stands on the board now, what holds something up first: the decisions that wait for
38
+ * the person, since a run waits on each; then the runs that are open; then the open tasks by state.
39
+ */
40
+ export declare function DeskStanding(props: DeskStandingProps): import("react").JSX.Element;
41
+ export interface DeskFiguresViewProps {
42
+ readonly figures: DeskFigures;
43
+ /**
44
+ * Where a project had more than a visit reads: how many tasks and runs of each were counted,
45
+ * said under the figures so that nobody reads them as the whole.
46
+ */
47
+ readonly partial?: {
48
+ readonly tasks: number;
49
+ readonly runs: number;
50
+ } | undefined;
51
+ }
52
+ /**
53
+ * The figures of the weeks counted, the few that matter first: how many tasks were done and
54
+ * how the runs ended, a number each; then what was done week by week, as one chart; then the
55
+ * same by project and by category, each as bars with its figure in words beside it. Where
56
+ * nothing was closed in those weeks the view says what would be counted, and draws no axis.
57
+ */
58
+ export declare function DeskFiguresView(props: DeskFiguresViewProps): import("react").JSX.Element;
59
+ export interface DeskArchiveProps {
60
+ /** The tasks the person worked on that are done, dropped or put away, the last closed first. */
61
+ readonly tasks: readonly DeskTask[];
62
+ /** The person's runs that ended, the last ended first. */
63
+ readonly runs: readonly DeskRun[];
64
+ /** The words the lists were found by; none for everything. */
65
+ readonly query?: string | undefined;
66
+ readonly busy?: boolean | undefined;
67
+ readonly onSearch: (words: string) => void;
68
+ /** Whether the console has more than was read, and the way to read the next page of it. */
69
+ readonly more?: boolean | undefined;
70
+ readonly onMore?: (() => void) | undefined;
71
+ readonly taskHref: (projectKey: string, taskNumber: number) => string;
72
+ }
73
+ /** The archive: the person's closed tasks and ended runs, found by words, a page at a time. */
74
+ export declare function DeskArchive(props: DeskArchiveProps): import("react").JSX.Element;
75
+ export interface DeskWordsProps {
76
+ /** The console's origin, which the words name for the agent to connect to. */
77
+ readonly origin: string;
78
+ }
79
+ /**
80
+ * A desk of a person's own, on the Agents page (ADR-0121, ADR-0122): a title, one line, and
81
+ * what to tell an agent, copied whole as the words for connecting an agent are above it.
82
+ * Nothing stands after the block: what follows the install is the command's to say.
83
+ */
84
+ export declare function DeskWords(props: DeskWordsProps): import("react").JSX.Element;
85
+ //# sourceMappingURL=desk.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"desk.d.ts","sourceRoot":"","sources":["../../src/components/desk.tsx"],"names":[],"mappings":"AACA,OAAO,EAAqB,KAAK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