@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,130 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useMemo, useState } from "react";
3
+ import { DeskCollectionResults, DeskCollections, DeskCollectionView, DeskItemView, DeskNoRecords, DeskRecordCrumbs, DeskRecordProblems, } from "./components/desk-records.js";
4
+ import { EmptyState, LinkButton, Spinner } from "./components/ui.js";
5
+ import { deviceLanguage, firstDayOfWeek, today as todayOf } from "./dates.js";
6
+ import { bestItems, fileSrc, itemResults, probeFile, RECORDS_BASE, readCollection, readDeskRecords, recordsAddressOf, recordsQuery, resultsOf, } from "./desk-records.js";
7
+ import { useLanguage, useWords } from "./i18n/index.js";
8
+ // The records' view of a desk's page (ADR-0117): what the desk's member made and what became
9
+ // of it, read from the files the desk keeps under `records/`, which the server that serves the
10
+ // pages serves beside them. The address says what is shown (ADR-0010): the collections, one
11
+ // collection with its items narrowed by status, one item, or a collection's results. Every
12
+ // file is read again each time its view is come to, so that what an agent just wrote is there.
13
+ /** The reader of a page in a browser: the page's own `fetch`, at the place the records are served. */
14
+ function ownReader() {
15
+ return { fetch: (path, init) => globalThis.fetch(path, init) };
16
+ }
17
+ export function DeskRecords(props) {
18
+ const words = useWords().desk.records;
19
+ const { tag } = useLanguage();
20
+ const { search, href, navigation } = props;
21
+ const address = recordsAddressOf(search);
22
+ const key = address.collection;
23
+ const given = props.reader;
24
+ const reader = useMemo(() => given ?? ownReader(), [given]);
25
+ const base = reader.base ?? RECORDS_BASE;
26
+ const at = (next) => {
27
+ const query = recordsQuery(next);
28
+ return query.length === 0 ? href : `${href}?${query}`;
29
+ };
30
+ const [overview, setOverview] = useState(undefined);
31
+ const [records, setRecords] = useState(undefined);
32
+ const [probed, setProbed] = useState(undefined);
33
+ // The collections, read each time the list is come to.
34
+ useEffect(() => {
35
+ if (key !== undefined) {
36
+ return;
37
+ }
38
+ const controller = new AbortController();
39
+ readDeskRecords(reader, controller.signal)
40
+ .then((read) => {
41
+ if (!controller.signal.aborted) {
42
+ setOverview(read);
43
+ }
44
+ })
45
+ .catch(() => undefined);
46
+ return () => controller.abort();
47
+ }, [reader, key]);
48
+ // One collection, read each time it is come to: its items, its uses and its metrics.
49
+ useEffect(() => {
50
+ if (key === undefined) {
51
+ return;
52
+ }
53
+ const controller = new AbortController();
54
+ setRecords((held) => (held?.key === key ? held : undefined));
55
+ readCollection(reader, key, controller.signal)
56
+ .then((read) => {
57
+ if (!controller.signal.aborted) {
58
+ setRecords(read);
59
+ }
60
+ })
61
+ .catch(() => undefined);
62
+ return () => controller.abort();
63
+ }, [reader, key]);
64
+ const held = records?.key === key ? records : undefined;
65
+ const item = address.item === undefined ? undefined : held?.items.find((one) => one.id === address.item);
66
+ const named = item?.files;
67
+ const itemId = item?.id;
68
+ // The files of the item shown: each asked of the server for what it is, by its first bytes.
69
+ useEffect(() => {
70
+ if (key === undefined || itemId === undefined || named === undefined || named.length === 0) {
71
+ return;
72
+ }
73
+ const of = `${key}/${itemId}`;
74
+ const controller = new AbortController();
75
+ Promise.all(named.map((file) => probeFile(reader, key, file.path, controller.signal)))
76
+ .then((states) => {
77
+ if (!controller.signal.aborted) {
78
+ setProbed({ of, states });
79
+ }
80
+ })
81
+ .catch(() => undefined);
82
+ return () => controller.abort();
83
+ }, [reader, key, itemId, named]);
84
+ const loading = (_jsx("div", { className: "sc-loading", children: _jsx(Spinner, { label: words.loading }) }));
85
+ if (key === undefined) {
86
+ if (overview === undefined) {
87
+ return loading;
88
+ }
89
+ if (overview.kind === "none") {
90
+ return _jsx(DeskNoRecords, {});
91
+ }
92
+ return (_jsxs("div", { className: "sc-desk-records", children: [_jsx(DeskRecordProblems, { problems: overview.problems }), _jsx(DeskCollections, { collections: overview.collections, collectionHref: (collection) => at({ collection }) })] }));
93
+ }
94
+ if (held === undefined) {
95
+ return loading;
96
+ }
97
+ const title = held.collection?.title ?? key;
98
+ if (!held.found) {
99
+ return (_jsxs("div", { className: "sc-desk-records", children: [_jsx(DeskRecordCrumbs, { steps: [{ label: words.crumb, href: at({}) }, { label: key }] }), _jsx(EmptyState, { title: words.noSuchCollection.title, body: words.noSuchCollection.body })] }));
100
+ }
101
+ if (address.item !== undefined) {
102
+ const states = probed?.of === `${key}/${address.item}` ? probed.states : undefined;
103
+ const files = (item?.files ?? []).map((file, index) => ({
104
+ label: file.label,
105
+ src: fileSrc(key, file.path, base),
106
+ state: states?.[index] ?? { kind: "reading" },
107
+ }));
108
+ return (_jsxs("div", { className: "sc-desk-records", children: [_jsx(DeskRecordCrumbs, { steps: [
109
+ { label: words.crumb, href: at({}) },
110
+ { label: title, href: at({ collection: key }) },
111
+ { label: item?.title ?? address.item },
112
+ ] }), _jsx(DeskRecordProblems, { problems: held.problems }), item === undefined ? (_jsx(EmptyState, { title: words.noSuchItem.title, body: words.noSuchItem.body })) : (_jsx(DeskItemView, { collectionKey: key, collection: held.collection, item: item, uses: held.uses.filter((use) => use.item === item.id), results: itemResults(held.collection, held.metrics, item.id), files: files, taskHref: props.taskHref, base: base }))] }));
113
+ }
114
+ const results = address.results === true;
115
+ const figured = (held.collection?.metrics ?? []).length > 0;
116
+ return (_jsxs("div", { className: "sc-desk-records", children: [_jsx(DeskRecordCrumbs, { steps: [{ label: words.crumb, href: at({}) }, { label: title }] }), _jsxs("div", { className: "sc-section-head", children: [_jsx("h2", { className: "sc-section-title", children: title }), figured && (_jsx(LinkButton, { href: at(results ? { collection: key } : { collection: key, results: true }), children: results ? words.showItems : words.showResults }))] }), held.collection?.description !== undefined && held.collection.description.length > 0 && (_jsx("p", { className: "sc-lead", children: held.collection.description })), _jsx(DeskRecordProblems, { problems: held.problems }), results ? (_jsx(DeskCollectionResults, { collection: held.collection, results: resultsOf({
117
+ collection: held.collection,
118
+ rows: held.metrics,
119
+ today: todayOf(),
120
+ firstDay: firstDayOfWeek(deviceLanguage(tag), props.weekStart),
121
+ }), best: bestItems({
122
+ collection: held.collection,
123
+ items: held.items,
124
+ rows: held.metrics,
125
+ by: address.by,
126
+ }), onBy: (by) => navigation.go(at({ collection: key, results: true, by })), itemHref: (id) => at({ collection: key, item: id }) })) : (_jsx(DeskCollectionView
127
+ // Keyed by how the items are narrowed, so that a list narrowed anew starts at its first page.
128
+ , { collectionKey: key, collection: held.collection, items: held.items, status: address.status, onStatus: (status) => navigation.go(at({ collection: key, status })), itemHref: (id) => at({ collection: key, item: id }), base: base }, address.status ?? ""))] }));
129
+ }
130
+ //# sourceMappingURL=desk-records-page.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"desk-records-page.js","sourceRoot":"","sources":["../src/desk-records-page.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,EACL,qBAAqB,EACrB,eAAe,EACf,kBAAkB,EAElB,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,KAAK,IAAI,OAAO,EAAE,MAAM,YAAY,CAAC;AAC9E,OAAO,EACL,SAAS,EAET,OAAO,EACP,WAAW,EACX,SAAS,EACT,YAAY,EAKZ,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,SAAS,GACV,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGxD,6FAA6F;AAC7F,+FAA+F;AAC/F,4FAA4F;AAC5F,2FAA2F;AAC3F,+FAA+F;AAE/F,sGAAsG;AACtG,SAAS,SAAS;IAChB,OAAO,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC;AACjE,CAAC;AAgBD,MAAM,UAAU,WAAW,CAAC,KAAuB;IACjD,MAAM,KAAK,GAAG,QAAQ,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,CAAC,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,EACnD,IAAI,EAAE,IAAI,IAPL,OAAO,CAAC,MAAM,IAAI,EAAE,CAQzB,CACH,IACG,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,247 @@
1
+ import { type RecordsCollection, type RecordsItem, type RecordsMetricRow, type RecordsUse } from "./records.js";
2
+ /** Where a desk's records are served, beside the pages' own files. */
3
+ export declare const RECORDS_BASE = "/records";
4
+ /** How many weeks a collection's results count back, this week among them. */
5
+ export declare const RECORD_WEEKS = 8;
6
+ /** How many items a collection's results name as those that did best. */
7
+ export declare const RECORD_BEST = 10;
8
+ /** The kinds of picture a preview may be, by the end of its name. */
9
+ export declare const RECORD_PREVIEW_KINDS: readonly ["png", "jpg", "jpeg", "gif", "webp", "avif"];
10
+ /** What reads the records: the page's own `fetch`, and where they are served. */
11
+ export interface RecordsReader {
12
+ readonly fetch: (path: string, init?: RequestInit) => Promise<Response>;
13
+ /** The path the records are served under; `RECORDS_BASE` where left out. */
14
+ readonly base?: string | undefined;
15
+ }
16
+ /** What is wrong with one file of the records, said in a line where it is shown. */
17
+ export interface RecordProblem {
18
+ /** The file, from the records' own folder: `ad-creatives/items.json`. */
19
+ readonly file: string;
20
+ /**
21
+ * `unreadable`: the file could not be had; `too_large`: it is over what the pages read;
22
+ * `not_json`: it is not JSON; `not_as_format`: it, or some of its entries, are not as the
23
+ * format says.
24
+ */
25
+ readonly kind: "unreadable" | "too_large" | "not_json" | "not_as_format";
26
+ /** Where in the file the first thing wrong is: `[3].madeOn`. */
27
+ readonly at?: string | undefined;
28
+ /** How many entries were left out, where the file is a list. */
29
+ readonly left?: number | undefined;
30
+ }
31
+ /** An item's status as a collection counts it: the status, and how many items have it. */
32
+ export interface StatusCount {
33
+ readonly key: string;
34
+ readonly label: string;
35
+ readonly count: number;
36
+ }
37
+ /** A collection as the list of collections shows it. */
38
+ export interface CollectionSummary {
39
+ readonly key: string;
40
+ readonly title: string;
41
+ readonly description: string | undefined;
42
+ /** How many items it holds. */
43
+ readonly items: number;
44
+ /** The items by status, in the collection's order; none where it names no statuses. */
45
+ readonly statuses: readonly StatusCount[];
46
+ /** The day its last item was made on, or nothing where it holds none. */
47
+ readonly lastMadeOn: string | undefined;
48
+ }
49
+ /** The items of a collection by status: one count for each status the collection names. */
50
+ export declare function statusCounts(collection: Pick<RecordsCollection, "statuses"> | undefined, items: readonly RecordsItem[]): readonly StatusCount[];
51
+ /** The latest day any of the items was made on. */
52
+ export declare function lastMadeOn(items: readonly RecordsItem[]): string | undefined;
53
+ /** What a desk keeps, as the first view of its page reads it. */
54
+ export type RecordsOverview =
55
+ /** No records are served here: the desk has none yet, or the server was not told of them. */
56
+ {
57
+ readonly kind: "none";
58
+ } | {
59
+ readonly kind: "read";
60
+ readonly collections: readonly CollectionSummary[];
61
+ readonly problems: readonly RecordProblem[];
62
+ };
63
+ /**
64
+ * The collections of a desk with what each holds: the index, then each collection's own file
65
+ * and its items, two requests a collection, `MAX_RECORD_COLLECTIONS` collections at most.
66
+ */
67
+ export declare function readDeskRecords(reader: RecordsReader, signal?: AbortSignal): Promise<RecordsOverview>;
68
+ /** One collection as its pages read it. */
69
+ export interface CollectionRecords {
70
+ readonly key: string;
71
+ /** What the collection is; nothing where its own file is missing or wrong. */
72
+ readonly collection: RecordsCollection | undefined;
73
+ /** What was made, the last made first. */
74
+ readonly items: readonly RecordsItem[];
75
+ /** Where an item was used, the last first; of items the collection holds. */
76
+ readonly uses: readonly RecordsUse[];
77
+ /** How an item did, by day; of items the collection holds. */
78
+ readonly metrics: readonly RecordsMetricRow[];
79
+ readonly problems: readonly RecordProblem[];
80
+ /** Whether anything of the collection was there to read. */
81
+ readonly found: boolean;
82
+ }
83
+ /**
84
+ * One collection: its own file and its items, and its uses and its metrics unless `items`
85
+ * alone is asked for. A file that is missing is nothing held; one that is wrong is named
86
+ * among the problems and the rest is read all the same.
87
+ */
88
+ export declare function readCollection(reader: RecordsReader, key: string, signal?: AbortSignal, only?: {
89
+ readonly items?: boolean;
90
+ }): Promise<CollectionRecords>;
91
+ /**
92
+ * A file of a collection as a path under its `files/`, or nothing where it is not one: no step
93
+ * up or out, no name that begins with a dot, nothing of an address about it. `files/` may lead
94
+ * the path or be left out.
95
+ */
96
+ export declare function filePath(path: string | undefined): string | undefined;
97
+ /** Where a file of a collection is read from, on the page's own origin; nothing for what is no file of it. */
98
+ export declare function fileSrc(key: string, path: string | undefined, base?: string): string | undefined;
99
+ /** A preview as a path under the collection's `files/`: a file of it that is a picture by the end of its name. */
100
+ export declare function previewPath(preview: string | undefined): string | undefined;
101
+ /** Where a preview is read from, on the page's own origin; nothing for what is no preview. */
102
+ export declare function previewSrc(key: string, preview: string | undefined, base?: string): string | undefined;
103
+ /** How a file of an item stands, as the server answered for it: what it is shown as. */
104
+ export type RecordFileState =
105
+ /** Not asked yet. */
106
+ {
107
+ readonly kind: "reading";
108
+ }
109
+ /** Shown in place, by the kind the server says it is. */
110
+ | {
111
+ readonly kind: "picture" | "video" | "sound";
112
+ }
113
+ /** A PDF: in a frame where the server's answer lets a page of its own origin frame it, else opened apart. */
114
+ | {
115
+ readonly kind: "pdf";
116
+ readonly framed: boolean;
117
+ }
118
+ /** Anything else: handed over as a download. */
119
+ | {
120
+ readonly kind: "other";
121
+ }
122
+ /** Kept with git LFS and not fetched on this machine: only its pointer is here. */
123
+ | {
124
+ readonly kind: "not_fetched";
125
+ readonly words: string | undefined;
126
+ }
127
+ /** The server would not give it, in its own words. */
128
+ | {
129
+ readonly kind: "refused";
130
+ readonly words: string | undefined;
131
+ }
132
+ /** No file of the collection, or the request failed. */
133
+ | {
134
+ readonly kind: "unreadable";
135
+ };
136
+ /** How many characters of the server's own words about a file are shown. */
137
+ export declare const RECORD_FILE_WORDS = 300;
138
+ /**
139
+ * How one file of an item stands: asked of the server for its first bytes alone, so that a
140
+ * film is not read to learn that it is one. The kind is the one the server says; a refusal is
141
+ * kept with the server's words; a file that is the pointer git LFS leaves is not fetched here.
142
+ */
143
+ export declare function probeFile(reader: RecordsReader, key: string, path: string, signal?: AbortSignal): Promise<RecordFileState>;
144
+ /** A link as a page may follow it: https, and nothing else. */
145
+ export declare function httpsLink(url: string | undefined): string | undefined;
146
+ /** What an item says for one of the collection's fields, as the field's kind has it read. */
147
+ export type FieldValue = {
148
+ readonly kind: "text";
149
+ readonly text: string;
150
+ } | {
151
+ readonly kind: "number";
152
+ readonly value: number;
153
+ } | {
154
+ readonly kind: "day";
155
+ readonly day: string;
156
+ } | {
157
+ readonly kind: "link";
158
+ readonly href: string;
159
+ };
160
+ /**
161
+ * An item's fields in the collection's order, each as its kind has it read. A value that is
162
+ * not of its field's kind is shown as the text it is: a link that is not https is words.
163
+ */
164
+ export declare function fieldsOf(collection: Pick<RecordsCollection, "fields"> | undefined, item: Pick<RecordsItem, "fields">): readonly {
165
+ readonly key: string;
166
+ readonly label: string;
167
+ readonly value: FieldValue;
168
+ }[];
169
+ type Metric = NonNullable<RecordsCollection["metrics"]>[number];
170
+ type Ratio = NonNullable<RecordsCollection["ratios"]>[number];
171
+ /** A metric's figure: what it is, and its total over the rows counted; nothing where no row has it. */
172
+ export interface MetricFigure {
173
+ readonly key: string;
174
+ readonly label: string;
175
+ readonly unit: Metric["unit"];
176
+ readonly total: number | undefined;
177
+ }
178
+ /** A ratio's figure: what it is, and its value; nothing where it cannot be worked out. */
179
+ export interface RatioFigure {
180
+ readonly key: string;
181
+ readonly label: string;
182
+ readonly as: Ratio["as"];
183
+ readonly value: number | undefined;
184
+ }
185
+ /** The figures of some rows: each of the collection's metrics and each of its ratios. */
186
+ export declare function figuresOfRows(collection: Pick<RecordsCollection, "metrics" | "ratios"> | undefined, rows: readonly RecordsMetricRow[]): {
187
+ readonly metrics: readonly MetricFigure[];
188
+ readonly ratios: readonly RatioFigure[];
189
+ };
190
+ /** How a collection did: its figures over everything, and by week over the last weeks. */
191
+ export interface CollectionResults {
192
+ readonly metrics: readonly MetricFigure[];
193
+ readonly ratios: readonly RatioFigure[];
194
+ /** The weeks counted, the oldest first, each with the metrics' figures of its days. */
195
+ readonly weeks: readonly {
196
+ readonly start: string;
197
+ readonly end: string;
198
+ readonly metrics: readonly MetricFigure[];
199
+ }[];
200
+ }
201
+ /** A collection's results from its rows: the whole, and `weeks` weeks back from the week of `today`. */
202
+ export declare function resultsOf(input: {
203
+ readonly collection: Pick<RecordsCollection, "metrics" | "ratios"> | undefined;
204
+ readonly rows: readonly RecordsMetricRow[];
205
+ readonly today: string;
206
+ /** The weekday a week begins on: 1 for Monday, 7 for Sunday. */
207
+ readonly firstDay?: number | undefined;
208
+ readonly weeks?: number | undefined;
209
+ }): CollectionResults;
210
+ /** The items that did best by one metric: the most first, `limit` at most, those with no row of it left out. */
211
+ export declare function bestItems(input: {
212
+ readonly collection: Pick<RecordsCollection, "metrics"> | undefined;
213
+ readonly items: readonly RecordsItem[];
214
+ readonly rows: readonly RecordsMetricRow[];
215
+ /** The metric's key; the collection's first where it names none of its own. */
216
+ readonly by: string | undefined;
217
+ readonly limit?: number | undefined;
218
+ }): {
219
+ readonly metric: Metric | undefined;
220
+ readonly items: readonly {
221
+ readonly item: RecordsItem;
222
+ readonly total: number;
223
+ }[];
224
+ };
225
+ /** How one item did: its rows by day, the last first, and its figures over all of them. */
226
+ export declare function itemResults(collection: Pick<RecordsCollection, "metrics" | "ratios"> | undefined, rows: readonly RecordsMetricRow[], itemId: string): {
227
+ readonly days: readonly RecordsMetricRow[];
228
+ readonly metrics: readonly MetricFigure[];
229
+ readonly ratios: readonly RatioFigure[];
230
+ };
231
+ /** What the address of the records' view says is shown: a collection, an item of it, or its results. */
232
+ export interface RecordsAddress {
233
+ readonly collection?: string | undefined;
234
+ readonly item?: string | undefined;
235
+ /** Whether the collection's results are shown in place of its items. */
236
+ readonly results?: boolean | undefined;
237
+ /** The status the items are narrowed to. */
238
+ readonly status?: string | undefined;
239
+ /** The metric the best items are ordered by. */
240
+ readonly by?: string | undefined;
241
+ }
242
+ /** What a query says of the records' view: only keys and ids that could be ones. */
243
+ export declare function recordsAddressOf(search: string): RecordsAddress;
244
+ /** The query of a place in the records' view, to put after the page's own address. */
245
+ export declare function recordsQuery(address: RecordsAddress): string;
246
+ export {};
247
+ //# sourceMappingURL=desk-records.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"desk-records.d.ts","sourceRoot":"","sources":["../src/desk-records.ts"],"names":[],"mappings":"AAEA,OAAO,EAQL,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,UAAU,EAMhB,MAAM,cAAc,CAAC;AAUtB,sEAAsE;AACtE,eAAO,MAAM,YAAY,aAAa,CAAC;AACvC,8EAA8E;AAC9E,eAAO,MAAM,YAAY,IAAI,CAAC;AAC9B,yEAAyE;AACzE,eAAO,MAAM,WAAW,KAAK,CAAC;AAC9B,qEAAqE;AACrE,eAAO,MAAM,oBAAoB,YAAI,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAU,CAAC;AAE3F,iFAAiF;AACjF,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IACxE,4EAA4E;IAC5E,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC;AAED,oFAAoF;AACpF,MAAM,WAAW,aAAa;IAC5B,yEAAyE;IACzE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,QAAQ,CAAC,IAAI,EAAE,YAAY,GAAG,WAAW,GAAG,UAAU,GAAG,eAAe,CAAC;IACzE,gEAAgE;IAChE,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,gEAAgE;IAChE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GA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