@bakers-build/addon-bakers-ui 0.0.0-stage → 0.1.0-next.38

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 (407) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +4 -2
  3. package/dist/src/Agent/launch.d.ts +25 -0
  4. package/dist/src/Agent/launch.js +56 -0
  5. package/dist/src/Component/badge/index.d.ts +11 -0
  6. package/dist/src/Component/badge/index.js +10 -0
  7. package/dist/src/Component/bar-chart/index.d.ts +16 -0
  8. package/dist/src/Component/bar-chart/index.js +63 -0
  9. package/dist/src/Component/card/index.d.ts +16 -0
  10. package/dist/src/Component/card/index.js +39 -0
  11. package/dist/src/Component/divider/index.d.ts +7 -0
  12. package/dist/src/Component/divider/index.js +13 -0
  13. package/dist/src/Component/footer-actions/index.d.ts +58 -0
  14. package/dist/src/Component/footer-actions/index.js +113 -0
  15. package/dist/src/Component/heat-map/index.d.ts +21 -0
  16. package/dist/src/Component/heat-map/index.js +86 -0
  17. package/dist/src/Component/key-value/index.d.ts +18 -0
  18. package/dist/src/Component/key-value/index.js +30 -0
  19. package/dist/src/Component/list-chrome/index.d.ts +22 -0
  20. package/dist/src/Component/list-chrome/index.js +69 -0
  21. package/dist/src/Component/markdown/index.d.ts +103 -0
  22. package/dist/src/Component/markdown/index.js +204 -0
  23. package/dist/src/Component/section-list/index.d.ts +247 -0
  24. package/dist/src/Component/section-list/index.js +232 -0
  25. package/dist/src/Component/stats-panel/index.d.ts +61 -0
  26. package/dist/src/Component/stats-panel/index.js +112 -0
  27. package/dist/src/Component/team-member-workload-list/index.d.ts +9 -0
  28. package/dist/src/Component/team-member-workload-list/index.js +31 -0
  29. package/dist/src/Component/top-tabs/index.d.ts +17 -0
  30. package/dist/src/Component/top-tabs/index.js +15 -0
  31. package/dist/src/Component/work-ticket-list/index.d.ts +19 -0
  32. package/dist/src/Component/work-ticket-list/index.js +14 -0
  33. package/dist/src/Component/workload-summary/index.d.ts +3 -0
  34. package/dist/src/Component/workload-summary/index.js +12 -0
  35. package/dist/src/Data/session-store.d.ts +17 -0
  36. package/dist/src/Data/session-store.js +93 -0
  37. package/dist/src/Entity/collection.d.ts +297 -0
  38. package/dist/src/Entity/collection.js +399 -0
  39. package/dist/src/Entity/conductor/Data/conductors.d.ts +457 -0
  40. package/dist/src/Entity/conductor/Data/conductors.js +524 -0
  41. package/dist/src/Entity/conductor/Data/detail.d.ts +39 -0
  42. package/dist/src/Entity/conductor/Data/detail.js +69 -0
  43. package/dist/src/Entity/conductor/Data/liveness.d.ts +11 -0
  44. package/dist/src/Entity/conductor/Data/liveness.js +21 -0
  45. package/dist/src/Entity/conductor/Data/log-block.d.ts +18 -0
  46. package/dist/src/Entity/conductor/Data/log-block.js +32 -0
  47. package/dist/src/Entity/conductor/Data/log-tail.d.ts +25 -0
  48. package/dist/src/Entity/conductor/Data/log-tail.js +133 -0
  49. package/dist/src/Entity/conductor/Data/own-conductor.d.ts +34 -0
  50. package/dist/src/Entity/conductor/Data/own-conductor.js +97 -0
  51. package/dist/src/Entity/conductor/Data/own-rows.d.ts +59 -0
  52. package/dist/src/Entity/conductor/Data/own-rows.js +87 -0
  53. package/dist/src/Entity/conductor/Data/process.d.ts +125 -0
  54. package/dist/src/Entity/conductor/Data/process.js +166 -0
  55. package/dist/src/Entity/conductor/Screen/conductor-log.d.ts +36 -0
  56. package/dist/src/Entity/conductor/Screen/conductor-log.js +46 -0
  57. package/dist/src/Entity/conductor/Screen/conductor-overview.d.ts +40 -0
  58. package/dist/src/Entity/conductor/Screen/conductor-overview.js +61 -0
  59. package/dist/src/Entity/conductor/Screen/conductor-runs.d.ts +90 -0
  60. package/dist/src/Entity/conductor/Screen/conductor-runs.js +128 -0
  61. package/dist/src/Entity/conductor/Screen/conductors.d.ts +152 -0
  62. package/dist/src/Entity/conductor/Screen/conductors.js +262 -0
  63. package/dist/src/Entity/conductor/Screen/project-conductors.d.ts +146 -0
  64. package/dist/src/Entity/conductor/Screen/project-conductors.js +262 -0
  65. package/dist/src/Entity/cycle.d.ts +18 -0
  66. package/dist/src/Entity/cycle.js +30 -0
  67. package/dist/src/Entity/project/Data/project.d.ts +16 -0
  68. package/dist/src/Entity/project/Data/project.js +28 -0
  69. package/dist/src/Entity/project/Data/projects.d.ts +144 -0
  70. package/dist/src/Entity/project/Data/projects.js +198 -0
  71. package/dist/src/Entity/project/Data/with-tickets.d.ts +25 -0
  72. package/dist/src/Entity/project/Data/with-tickets.js +40 -0
  73. package/dist/src/Entity/project/Data/workload.d.ts +16 -0
  74. package/dist/src/Entity/project/Data/workload.js +63 -0
  75. package/dist/src/Entity/project/Screen/project-overview.d.ts +34 -0
  76. package/dist/src/Entity/project/Screen/project-overview.js +76 -0
  77. package/dist/src/Entity/project/Screen/project-picker.d.ts +69 -0
  78. package/dist/src/Entity/project/Screen/project-picker.js +179 -0
  79. package/dist/src/Entity/project/Screen/projects-screen.d.ts +50 -0
  80. package/dist/src/Entity/project/Screen/projects-screen.js +123 -0
  81. package/dist/src/Entity/run/Component/run-detail/index.d.ts +33 -0
  82. package/dist/src/Entity/run/Component/run-detail/index.js +264 -0
  83. package/dist/src/Entity/run/Data/active-run.d.ts +15 -0
  84. package/dist/src/Entity/run/Data/active-run.js +23 -0
  85. package/dist/src/Entity/run/Data/query.d.ts +50 -0
  86. package/dist/src/Entity/run/Data/query.js +88 -0
  87. package/dist/src/Entity/run/Data/runs.d.ts +363 -0
  88. package/dist/src/Entity/run/Data/runs.js +366 -0
  89. package/dist/src/Entity/run/Data/status.d.ts +12 -0
  90. package/dist/src/Entity/run/Data/status.js +40 -0
  91. package/dist/src/Entity/run/Form/edit.d.ts +29 -0
  92. package/dist/src/Entity/run/Form/edit.js +23 -0
  93. package/dist/src/Entity/run/Screen/edit-run-form.d.ts +26 -0
  94. package/dist/src/Entity/run/Screen/edit-run-form.js +117 -0
  95. package/dist/src/Entity/run/Screen/run-detail.d.ts +66 -0
  96. package/dist/src/Entity/run/Screen/run-detail.js +112 -0
  97. package/dist/src/Entity/run/Screen/runs.d.ts +85 -0
  98. package/dist/src/Entity/run/Screen/runs.js +148 -0
  99. package/dist/src/Entity/run/Screen/user-runs.d.ts +80 -0
  100. package/dist/src/Entity/run/Screen/user-runs.js +112 -0
  101. package/dist/src/Entity/team/Data/members.d.ts +30 -0
  102. package/dist/src/Entity/team/Data/members.js +83 -0
  103. package/dist/src/Entity/team/Data/projects.d.ts +3 -0
  104. package/dist/src/Entity/team/Data/projects.js +23 -0
  105. package/dist/src/Entity/team/Data/team.d.ts +22 -0
  106. package/dist/src/Entity/team/Data/team.js +38 -0
  107. package/dist/src/Entity/team/Data/teams.d.ts +223 -0
  108. package/dist/src/Entity/team/Data/teams.js +268 -0
  109. package/dist/src/Entity/team/Data/workload.d.ts +25 -0
  110. package/dist/src/Entity/team/Data/workload.js +60 -0
  111. package/dist/src/Entity/team/Screen/team-member-work.d.ts +41 -0
  112. package/dist/src/Entity/team/Screen/team-member-work.js +56 -0
  113. package/dist/src/Entity/team/Screen/team-users.d.ts +63 -0
  114. package/dist/src/Entity/team/Screen/team-users.js +210 -0
  115. package/dist/src/Entity/team/Screen/team-work.d.ts +39 -0
  116. package/dist/src/Entity/team/Screen/team-work.js +112 -0
  117. package/dist/src/Entity/team/Screen/teams-screen.d.ts +110 -0
  118. package/dist/src/Entity/team/Screen/teams-screen.js +264 -0
  119. package/dist/src/Entity/term/Data/terms.d.ts +16 -0
  120. package/dist/src/Entity/term/Data/terms.js +14 -0
  121. package/dist/src/Entity/ticket/Component/comment-item/index.d.ts +37 -0
  122. package/dist/src/Entity/ticket/Component/comment-item/index.js +50 -0
  123. package/dist/src/Entity/ticket/Component/create-form/index.d.ts +28 -0
  124. package/dist/src/Entity/ticket/Component/create-form/index.js +74 -0
  125. package/dist/src/Entity/ticket/Component/demo-statistics.d.ts +14 -0
  126. package/dist/src/Entity/ticket/Component/demo-statistics.js +88 -0
  127. package/dist/src/Entity/ticket/Component/edit-form/index.d.ts +38 -0
  128. package/dist/src/Entity/ticket/Component/edit-form/index.js +121 -0
  129. package/dist/src/Entity/ticket/Component/react-statistics.d.ts +14 -0
  130. package/dist/src/Entity/ticket/Component/react-statistics.js +23 -0
  131. package/dist/src/Entity/ticket/Component/sections/index.d.ts +7 -0
  132. package/dist/src/Entity/ticket/Component/sections/index.js +64 -0
  133. package/dist/src/Entity/ticket/Component/ticket-content/index.d.ts +54 -0
  134. package/dist/src/Entity/ticket/Component/ticket-content/index.js +479 -0
  135. package/dist/src/Entity/ticket/Component/ticket-content/model.d.ts +59 -0
  136. package/dist/src/Entity/ticket/Component/ticket-content/model.js +509 -0
  137. package/dist/src/Entity/ticket/Component/ticket-detail/index.d.ts +294 -0
  138. package/dist/src/Entity/ticket/Component/ticket-detail/index.js +1093 -0
  139. package/dist/src/Entity/ticket/Component/ticket-teaser/index.d.ts +51 -0
  140. package/dist/src/Entity/ticket/Component/ticket-teaser/index.js +130 -0
  141. package/dist/src/Entity/ticket/Data/addons.d.ts +53 -0
  142. package/dist/src/Entity/ticket/Data/addons.js +35 -0
  143. package/dist/src/Entity/ticket/Data/detail.d.ts +47 -0
  144. package/dist/src/Entity/ticket/Data/detail.js +61 -0
  145. package/dist/src/Entity/ticket/Data/input.d.ts +7 -0
  146. package/dist/src/Entity/ticket/Data/input.js +8 -0
  147. package/dist/src/Entity/ticket/Data/parents-all.d.ts +14 -0
  148. package/dist/src/Entity/ticket/Data/parents-all.js +44 -0
  149. package/dist/src/Entity/ticket/Data/parents.d.ts +39 -0
  150. package/dist/src/Entity/ticket/Data/parents.js +122 -0
  151. package/dist/src/Entity/ticket/Data/projects-search.d.ts +35 -0
  152. package/dist/src/Entity/ticket/Data/projects-search.js +61 -0
  153. package/dist/src/Entity/ticket/Data/query.d.ts +95 -0
  154. package/dist/src/Entity/ticket/Data/query.js +171 -0
  155. package/dist/src/Entity/ticket/Data/store.d.ts +20 -0
  156. package/dist/src/Entity/ticket/Data/store.js +144 -0
  157. package/dist/src/Entity/ticket/Data/tickets.d.ts +368 -0
  158. package/dist/src/Entity/ticket/Data/tickets.js +419 -0
  159. package/dist/src/Entity/ticket/Data/url.d.ts +16 -0
  160. package/dist/src/Entity/ticket/Data/url.js +20 -0
  161. package/dist/src/Entity/ticket/Data/workflow.d.ts +9 -0
  162. package/dist/src/Entity/ticket/Data/workflow.js +18 -0
  163. package/dist/src/Entity/ticket/Data/workload.d.ts +13 -0
  164. package/dist/src/Entity/ticket/Data/workload.js +9 -0
  165. package/dist/src/Entity/ticket/Data/write.d.ts +51 -0
  166. package/dist/src/Entity/ticket/Data/write.js +115 -0
  167. package/dist/src/Entity/ticket/Form/addon-action.d.ts +37 -0
  168. package/dist/src/Entity/ticket/Form/addon-action.js +80 -0
  169. package/dist/src/Entity/ticket/Form/create-data.d.ts +75 -0
  170. package/dist/src/Entity/ticket/Form/create-data.js +208 -0
  171. package/dist/src/Entity/ticket/Form/create.d.ts +219 -0
  172. package/dist/src/Entity/ticket/Form/create.js +190 -0
  173. package/dist/src/Entity/ticket/Form/edit-data.d.ts +13 -0
  174. package/dist/src/Entity/ticket/Form/edit-data.js +68 -0
  175. package/dist/src/Entity/ticket/Form/edit-parent-source.d.ts +8 -0
  176. package/dist/src/Entity/ticket/Form/edit-parent-source.js +23 -0
  177. package/dist/src/Entity/ticket/Form/edit.d.ts +184 -0
  178. package/dist/src/Entity/ticket/Form/edit.js +288 -0
  179. package/dist/src/Entity/ticket/Form/keys.d.ts +7 -0
  180. package/dist/src/Entity/ticket/Form/keys.js +7 -0
  181. package/dist/src/Entity/ticket/Form/my-work-parent-source.d.ts +11 -0
  182. package/dist/src/Entity/ticket/Form/my-work-parent-source.js +41 -0
  183. package/dist/src/Entity/ticket/Form/parent-filter.d.ts +36 -0
  184. package/dist/src/Entity/ticket/Form/parent-filter.js +37 -0
  185. package/dist/src/Entity/ticket/Form/parent-source.d.ts +27 -0
  186. package/dist/src/Entity/ticket/Form/parent-source.js +56 -0
  187. package/dist/src/Entity/ticket/Form/project-filter.d.ts +36 -0
  188. package/dist/src/Entity/ticket/Form/project-filter.js +36 -0
  189. package/dist/src/Entity/ticket/Form/project-source.d.ts +20 -0
  190. package/dist/src/Entity/ticket/Form/project-source.js +40 -0
  191. package/dist/src/Entity/ticket/Form/reviewer-options.d.ts +10 -0
  192. package/dist/src/Entity/ticket/Form/reviewer-options.js +48 -0
  193. package/dist/src/Entity/ticket/Form/who-filter.d.ts +41 -0
  194. package/dist/src/Entity/ticket/Form/who-filter.js +33 -0
  195. package/dist/src/Entity/ticket/Form/who-source.d.ts +18 -0
  196. package/dist/src/Entity/ticket/Form/who-source.js +38 -0
  197. package/dist/src/Entity/ticket/Screen/conductor-tickets.d.ts +91 -0
  198. package/dist/src/Entity/ticket/Screen/conductor-tickets.js +135 -0
  199. package/dist/src/Entity/ticket/Screen/create-ticket-form.d.ts +132 -0
  200. package/dist/src/Entity/ticket/Screen/create-ticket-form.js +616 -0
  201. package/dist/src/Entity/ticket/Screen/edit-assignment-form.d.ts +93 -0
  202. package/dist/src/Entity/ticket/Screen/edit-assignment-form.js +335 -0
  203. package/dist/src/Entity/ticket/Screen/my-work-parent-filter-form.d.ts +30 -0
  204. package/dist/src/Entity/ticket/Screen/my-work-parent-filter-form.js +161 -0
  205. package/dist/src/Entity/ticket/Screen/my-work.d.ts +62 -0
  206. package/dist/src/Entity/ticket/Screen/my-work.js +189 -0
  207. package/dist/src/Entity/ticket/Screen/parent-filter-form.d.ts +46 -0
  208. package/dist/src/Entity/ticket/Screen/parent-filter-form.js +203 -0
  209. package/dist/src/Entity/ticket/Screen/project-filter-form.d.ts +30 -0
  210. package/dist/src/Entity/ticket/Screen/project-filter-form.js +173 -0
  211. package/dist/src/Entity/ticket/Screen/ticket-addons.d.ts +94 -0
  212. package/dist/src/Entity/ticket/Screen/ticket-addons.js +492 -0
  213. package/dist/src/Entity/ticket/Screen/ticket-agents.d.ts +134 -0
  214. package/dist/src/Entity/ticket/Screen/ticket-agents.js +253 -0
  215. package/dist/src/Entity/ticket/Screen/ticket-comments.d.ts +26 -0
  216. package/dist/src/Entity/ticket/Screen/ticket-comments.js +26 -0
  217. package/dist/src/Entity/ticket/Screen/ticket-content-screen.d.ts +94 -0
  218. package/dist/src/Entity/ticket/Screen/ticket-content-screen.js +468 -0
  219. package/dist/src/Entity/ticket/Screen/ticket-detail.d.ts +33 -0
  220. package/dist/src/Entity/ticket/Screen/ticket-detail.js +49 -0
  221. package/dist/src/Entity/ticket/Screen/ticket-filter-bar.d.ts +29 -0
  222. package/dist/src/Entity/ticket/Screen/ticket-filter-bar.js +122 -0
  223. package/dist/src/Entity/ticket/Screen/ticket-planning.d.ts +26 -0
  224. package/dist/src/Entity/ticket/Screen/ticket-planning.js +29 -0
  225. package/dist/src/Entity/ticket/Screen/ticket-react-markdown.d.ts +30 -0
  226. package/dist/src/Entity/ticket/Screen/ticket-react-markdown.js +109 -0
  227. package/dist/src/Entity/ticket/Screen/ticket-react.d.ts +41 -0
  228. package/dist/src/Entity/ticket/Screen/ticket-react.js +136 -0
  229. package/dist/src/Entity/ticket/Screen/ticket-related.d.ts +59 -0
  230. package/dist/src/Entity/ticket/Screen/ticket-related.js +220 -0
  231. package/dist/src/Entity/ticket/Screen/ticket-runs.d.ts +55 -0
  232. package/dist/src/Entity/ticket/Screen/ticket-runs.js +231 -0
  233. package/dist/src/Entity/ticket/Screen/ticket-search.d.ts +44 -0
  234. package/dist/src/Entity/ticket/Screen/ticket-search.js +97 -0
  235. package/dist/src/Entity/ticket/Screen/tickets.d.ts +218 -0
  236. package/dist/src/Entity/ticket/Screen/tickets.js +582 -0
  237. package/dist/src/Entity/ticket/Screen/user-tickets.d.ts +107 -0
  238. package/dist/src/Entity/ticket/Screen/user-tickets.js +136 -0
  239. package/dist/src/Entity/ticket/Screen/who-filter-form.d.ts +50 -0
  240. package/dist/src/Entity/ticket/Screen/who-filter-form.js +191 -0
  241. package/dist/src/Entity/ticket-template/Data/templates.d.ts +26 -0
  242. package/dist/src/Entity/ticket-template/Data/templates.js +62 -0
  243. package/dist/src/Entity/transport.d.ts +60 -0
  244. package/dist/src/Entity/transport.js +50 -0
  245. package/dist/src/Entity/user/Data/member-context.d.ts +4 -0
  246. package/dist/src/Entity/user/Data/member-context.js +39 -0
  247. package/dist/src/Entity/user/Data/users.d.ts +135 -0
  248. package/dist/src/Entity/user/Data/users.js +174 -0
  249. package/dist/src/Entity/user/Screen/member-overview.d.ts +48 -0
  250. package/dist/src/Entity/user/Screen/member-overview.js +63 -0
  251. package/dist/src/Entity/user/Screen/users.d.ts +41 -0
  252. package/dist/src/Entity/user/Screen/users.js +106 -0
  253. package/dist/src/Entity/workspace/Data/members.d.ts +8 -0
  254. package/dist/src/Entity/workspace/Data/members.js +50 -0
  255. package/dist/src/Entity/workspace/Data/workspaces.d.ts +20 -0
  256. package/dist/src/Entity/workspace/Data/workspaces.js +20 -0
  257. package/dist/src/Entity/workspace/Screen/workspace-picker.d.ts +34 -0
  258. package/dist/src/Entity/workspace/Screen/workspace-picker.js +163 -0
  259. package/dist/src/Extension/load.d.ts +10 -0
  260. package/dist/src/Extension/load.js +21 -0
  261. package/dist/src/Extension/store.d.ts +7 -0
  262. package/dist/src/Extension/store.js +19 -0
  263. package/dist/src/Form/field.d.ts +101 -0
  264. package/dist/src/Form/field.js +28 -0
  265. package/dist/src/Form/form.d.ts +53 -0
  266. package/dist/src/Form/form.js +194 -0
  267. package/dist/src/Form/index.d.ts +3 -0
  268. package/dist/src/Form/index.js +5 -0
  269. package/dist/src/Form/keys.d.ts +25 -0
  270. package/dist/src/Form/keys.js +112 -0
  271. package/dist/src/Kernel/braid.d.ts +4 -0
  272. package/dist/src/Kernel/braid.js +10 -0
  273. package/dist/src/Kernel/chrome.d.ts +359 -0
  274. package/dist/src/Kernel/chrome.js +581 -0
  275. package/dist/src/Kernel/clipboard.d.ts +30 -0
  276. package/dist/src/Kernel/clipboard.js +51 -0
  277. package/dist/src/Kernel/contribution-guard.d.ts +4 -0
  278. package/dist/src/Kernel/contribution-guard.js +48 -0
  279. package/dist/src/Kernel/key-input.d.ts +50 -0
  280. package/dist/src/Kernel/key-input.js +155 -0
  281. package/dist/src/Kernel/mount.d.ts +186 -0
  282. package/dist/src/Kernel/mount.js +398 -0
  283. package/dist/src/Kernel/pipe.d.ts +6 -0
  284. package/dist/src/Kernel/pipe.js +70 -0
  285. package/dist/src/Kernel/regions.d.ts +64 -0
  286. package/dist/src/Kernel/regions.js +328 -0
  287. package/dist/src/Kernel/renderer.d.ts +25 -0
  288. package/dist/src/Kernel/renderer.js +142 -0
  289. package/dist/src/Kernel/splash.d.ts +35 -0
  290. package/dist/src/Kernel/splash.js +89 -0
  291. package/dist/src/Kernel/tui-kernel.d.ts +2 -0
  292. package/dist/src/Kernel/tui-kernel.js +614 -0
  293. package/dist/src/Routing/context.d.ts +46 -0
  294. package/dist/src/Routing/context.js +70 -0
  295. package/dist/src/Routing/registry.d.ts +21 -0
  296. package/dist/src/Routing/registry.js +158 -0
  297. package/dist/src/Routing/route.d.ts +46 -0
  298. package/dist/src/Routing/route.js +1 -0
  299. package/dist/src/Routing/router.d.ts +49 -0
  300. package/dist/src/Routing/router.js +127 -0
  301. package/dist/src/Routing/routes.d.ts +24 -0
  302. package/dist/src/Routing/routes.js +129 -0
  303. package/dist/src/Routing/tabs.d.ts +3 -0
  304. package/dist/src/Routing/tabs.js +57 -0
  305. package/dist/src/Screen/async-modal-screen.d.ts +26 -0
  306. package/dist/src/Screen/async-modal-screen.js +44 -0
  307. package/dist/src/Screen/async-screen.d.ts +102 -0
  308. package/dist/src/Screen/async-screen.js +266 -0
  309. package/dist/src/Screen/empty-overview.d.ts +9 -0
  310. package/dist/src/Screen/empty-overview.js +14 -0
  311. package/dist/src/Screen/full-screen.d.ts +1 -0
  312. package/dist/src/Screen/full-screen.js +3 -0
  313. package/dist/src/Screen/list-screen.d.ts +208 -0
  314. package/dist/src/Screen/list-screen.js +290 -0
  315. package/dist/src/Screen/modal-screen.d.ts +6 -0
  316. package/dist/src/Screen/modal-screen.js +2 -0
  317. package/dist/src/Screen/row-action.d.ts +17 -0
  318. package/dist/src/Screen/row-action.js +37 -0
  319. package/dist/src/Screen/screen.d.ts +258 -0
  320. package/dist/src/Screen/screen.js +34 -0
  321. package/dist/src/Statistics/client.d.ts +65 -0
  322. package/dist/src/Statistics/client.js +197 -0
  323. package/dist/src/Statistics/comparison-chart.d.ts +7 -0
  324. package/dist/src/Statistics/comparison-chart.js +525 -0
  325. package/dist/src/Statistics/dashboard.d.ts +93 -0
  326. package/dist/src/Statistics/dashboard.js +206 -0
  327. package/dist/src/Statistics/figures.d.ts +18 -0
  328. package/dist/src/Statistics/figures.js +162 -0
  329. package/dist/src/Statistics/member-stats.d.ts +58 -0
  330. package/dist/src/Statistics/member-stats.js +152 -0
  331. package/dist/src/Statistics/presentation.d.ts +8 -0
  332. package/dist/src/Statistics/presentation.js +36 -0
  333. package/dist/src/Statistics/screen.d.ts +49 -0
  334. package/dist/src/Statistics/screen.js +206 -0
  335. package/dist/src/Widget/action.d.ts +3 -0
  336. package/dist/src/Widget/action.js +9 -0
  337. package/dist/src/Widget/autocomplete.d.ts +3 -0
  338. package/dist/src/Widget/autocomplete.js +152 -0
  339. package/dist/src/Widget/chrome.d.ts +38 -0
  340. package/dist/src/Widget/chrome.js +60 -0
  341. package/dist/src/Widget/index.d.ts +5 -0
  342. package/dist/src/Widget/index.js +13 -0
  343. package/dist/src/Widget/multiselect.d.ts +3 -0
  344. package/dist/src/Widget/multiselect.js +40 -0
  345. package/dist/src/Widget/option-source.d.ts +69 -0
  346. package/dist/src/Widget/option-source.js +111 -0
  347. package/dist/src/Widget/render.d.ts +57 -0
  348. package/dist/src/Widget/render.js +149 -0
  349. package/dist/src/Widget/select.d.ts +3 -0
  350. package/dist/src/Widget/select.js +26 -0
  351. package/dist/src/Widget/text.d.ts +3 -0
  352. package/dist/src/Widget/text.js +112 -0
  353. package/dist/src/Widget/textarea.d.ts +45 -0
  354. package/dist/src/Widget/textarea.js +111 -0
  355. package/dist/src/Widget/types.d.ts +122 -0
  356. package/dist/src/Widget/types.js +21 -0
  357. package/dist/src/index.d.ts +6 -0
  358. package/dist/src/index.js +10 -0
  359. package/dist/src/launcher.d.ts +103 -0
  360. package/dist/src/launcher.js +74 -0
  361. package/dist/src/lib/clipboard.d.ts +41 -0
  362. package/dist/src/lib/clipboard.js +65 -0
  363. package/dist/src/lib/cursor.d.ts +31 -0
  364. package/dist/src/lib/cursor.js +45 -0
  365. package/dist/src/lib/format.d.ts +32 -0
  366. package/dist/src/lib/format.js +99 -0
  367. package/dist/src/lib/hyperlink.d.ts +58 -0
  368. package/dist/src/lib/hyperlink.js +104 -0
  369. package/dist/src/lib/input-trace.d.ts +48 -0
  370. package/dist/src/lib/input-trace.js +47 -0
  371. package/dist/src/lib/jsonapi-error.d.ts +7 -0
  372. package/dist/src/lib/jsonapi-error.js +43 -0
  373. package/dist/src/lib/key-vocabulary.d.ts +19 -0
  374. package/dist/src/lib/key-vocabulary.js +25 -0
  375. package/dist/src/lib/markdown.d.ts +53 -0
  376. package/dist/src/lib/markdown.js +522 -0
  377. package/dist/src/lib/refresh-signal.d.ts +56 -0
  378. package/dist/src/lib/refresh-signal.js +85 -0
  379. package/dist/src/lib/repo-url.d.ts +12 -0
  380. package/dist/src/lib/repo-url.js +64 -0
  381. package/dist/src/lib/scroll.d.ts +1 -0
  382. package/dist/src/lib/scroll.js +16 -0
  383. package/dist/src/lib/theme.d.ts +59 -0
  384. package/dist/src/lib/theme.js +63 -0
  385. package/dist/src/lib/version.d.ts +5 -0
  386. package/dist/src/lib/version.js +46 -0
  387. package/dist/src/lib/vnode.d.ts +273 -0
  388. package/dist/src/lib/vnode.js +555 -0
  389. package/dist/src/lib/width-table.d.ts +4 -0
  390. package/dist/src/lib/width-table.js +147 -0
  391. package/dist/src/lib/width.d.ts +85 -0
  392. package/dist/src/lib/width.js +358 -0
  393. package/dist/src/plugin.d.ts +13 -0
  394. package/dist/src/plugin.js +91 -0
  395. package/dist/src/preset.d.ts +2 -0
  396. package/dist/src/preset.js +7 -0
  397. package/dist/src/react-experiment.d.ts +1 -0
  398. package/dist/src/react-experiment.js +7 -0
  399. package/dist/src/react-preset.d.ts +3 -0
  400. package/dist/src/react-preset.js +5 -0
  401. package/dist/src/route.d.ts +11 -0
  402. package/dist/src/route.js +249 -0
  403. package/dist/src/types.d.ts +372 -0
  404. package/dist/src/types.js +1 -0
  405. package/dist/src/ui.d.ts +19 -0
  406. package/dist/src/ui.js +15 -0
  407. package/package.json +33 -4
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 keytec GmbH
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,5 @@
1
- # Temporary Holding Version
1
+ # @bakers-build/addon-bakers-ui
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ bakers.build TUI: interactive terminal UI (dashboard, projects, tickets) as a dropsh `tui` renderer plugin.
4
+
5
+ Part of the bakers.build CLI. Install the meta package `@bakers-build/bakers` to get the `bakers` CLI with all addons. Source: https://git.key-tec.de/bakers-build/bakers-build (bakers-cli/).
@@ -0,0 +1,25 @@
1
+ import type { CreateFormPayload } from '../Entity/ticket/Form/create.js';
2
+ import type { TuiAgentService } from '../types.js';
3
+ /** The launch intent passed to {@link TuiAgentService.launch}. */
4
+ export type CreateLaunch = Parameters<TuiAgentService['launch']>[0];
5
+ /**
6
+ * Build the `ticket:create` launch intent for a project. The prompt is a pure
7
+ * pointer to WORKFLOW.md (the pre-filled form is passed via
8
+ * `$BB_NEW_TICKET_INPUT`); `BB_ID` is never inherited (a create must not be
9
+ * bound to a claimed ticket).
10
+ */
11
+ export declare function buildCreateLaunch(opts: {
12
+ project: string;
13
+ cwd: string;
14
+ specPath?: string | undefined;
15
+ workflow?: string | undefined;
16
+ createPrompt?: string | undefined;
17
+ label?: string | undefined;
18
+ }): CreateLaunch;
19
+ /**
20
+ * A short human label for the agent list: the ticket's title, else the
21
+ * description's first line (both capped to 40 incl. the ellipsis), else
22
+ * "New <workflow>". BB-236 AC-8: it builds the `label` `buildCreateLaunch`
23
+ * takes, so it belongs to the module that builds the launch intent.
24
+ */
25
+ export declare function shortName(payload: CreateFormPayload): string;
@@ -0,0 +1,56 @@
1
+ // Ticket-create launch request (AC-3). Pressing `n` starts an embedded agent
2
+ // that runs the bakers.build `ticket:create` workflow. This module is pure: it builds
3
+ // the launch intent (prompt + env) the TUI hands to the injected agent host
4
+ // (`services.agents.launch`); the host (herdr) owns transport + layout. No
5
+ // node-pty / @xterm, no session object.
6
+ const CREATE_PROMPT = 'Read the repository\'s WORKFLOW.md and follow its "Create ticket" section to ' +
7
+ 'create a new bakers.build ticket. Do not start work on the new ticket.';
8
+ /**
9
+ * Build the `ticket:create` launch intent for a project. The prompt is a pure
10
+ * pointer to WORKFLOW.md (the pre-filled form is passed via
11
+ * `$BB_NEW_TICKET_INPUT`); `BB_ID` is never inherited (a create must not be
12
+ * bound to a claimed ticket).
13
+ */
14
+ export function buildCreateLaunch(opts) {
15
+ const env = {
16
+ ...process.env,
17
+ TERM: 'xterm-256color',
18
+ BB_PROJECT: opts.project,
19
+ };
20
+ delete env.BB_ID;
21
+ if (opts.specPath)
22
+ env.BB_NEW_TICKET_INPUT = opts.specPath;
23
+ if (opts.workflow)
24
+ env.BB_WORKFLOW = opts.workflow;
25
+ return {
26
+ group: opts.project,
27
+ cwd: opts.cwd,
28
+ prompt: opts.createPrompt?.trim() || CREATE_PROMPT,
29
+ env,
30
+ isNew: true,
31
+ ...(opts.label !== undefined ? { label: opts.label } : {}),
32
+ };
33
+ }
34
+ /**
35
+ * A short human label for the agent list: the ticket's title, else the
36
+ * description's first line (both capped to 40 incl. the ellipsis), else
37
+ * "New <workflow>". BB-236 AC-8: it builds the `label` `buildCreateLaunch`
38
+ * takes, so it belongs to the module that builds the launch intent.
39
+ */
40
+ export function shortName(payload) {
41
+ // BB-309 D9: the title is what the operator NAMED the ticket, so it is the
42
+ // better tab label; the description's first line stays the fallback for a
43
+ // payload that has no title yet. This touches the launch intent's `label`
44
+ // ONLY — never `prompt`, never `env`, which is what AC-6 pins.
45
+ const cap = (line) => line.length > 40 ? `${line.slice(0, 39)}…` : line;
46
+ const title = payload.title.trim();
47
+ if (title)
48
+ return cap(title);
49
+ const firstLine = payload.description
50
+ .split('\n')
51
+ .map((l) => l.trim())
52
+ .find((l) => l.length > 0);
53
+ if (firstLine)
54
+ return cap(firstLine);
55
+ return `New ${payload.workflow?.label ?? 'ticket'}`;
56
+ }
@@ -0,0 +1,11 @@
1
+ import type { RGBA, VNode } from '@opentui/core';
2
+ export type BadgeVariant = 'default' | 'success' | 'warning' | 'error' | 'info' | 'secondary';
3
+ /** The unbordered badge — the only form the TUI draws. */
4
+ export interface BadgeProps {
5
+ id: string;
6
+ label: string;
7
+ variant?: BadgeVariant;
8
+ color?: RGBA;
9
+ bold?: boolean;
10
+ }
11
+ export declare const Badge: ({ id, label, variant, color, bold, }: BadgeProps) => VNode;
@@ -0,0 +1,10 @@
1
+ import { FOREGROUND, FOREGROUND_HIGHLIGHT } from '../../lib/theme.js';
2
+ import { BOLD, paragraphNode, plainRun } from '../../lib/vnode.js';
3
+ // Every status variant shares the highlight slot: the palette names roles, not
4
+ // hues (`lib/theme.ts`).
5
+ const variantColor = (variant) => variant === 'secondary' ? FOREGROUND : FOREGROUND_HIGHLIGHT;
6
+ export const Badge = ({ id, label, variant = 'default', color, bold = false, }) => paragraphNode({
7
+ id,
8
+ runs: [plainRun(label, bold ? BOLD : 0)],
9
+ fg: color ?? variantColor(variant),
10
+ });
@@ -0,0 +1,16 @@
1
+ import { type RGBA, type VNode } from '@opentui/core';
2
+ export interface BarChartItem {
3
+ label: string;
4
+ value: number;
5
+ color?: RGBA;
6
+ }
7
+ /** The horizontal chart — the only direction the TUI draws. */
8
+ export interface BarChartProps {
9
+ id: string;
10
+ data: readonly BarChartItem[];
11
+ width?: number;
12
+ showValues?: boolean;
13
+ title?: string;
14
+ maxValue?: number;
15
+ }
16
+ export declare const BarChart: ({ id, data, width, showValues, title, maxValue: suppliedMax, }: BarChartProps) => VNode;
@@ -0,0 +1,63 @@
1
+ import { BoxRenderable, h } from '@opentui/core';
2
+ import { FOREGROUND, FOREGROUND_HIGHLIGHT } from '../../lib/theme.js';
3
+ import { BOLD, DIM, paragraphNode, plainRun } from '../../lib/vnode.js';
4
+ const BAR_CHAR = '█';
5
+ const EMPTY_CHAR = '░';
6
+ const pad = (str, length) => {
7
+ if (str.length >= length) {
8
+ return str.slice(0, length);
9
+ }
10
+ return str.padEnd(length);
11
+ };
12
+ const padStart = (str, length) => {
13
+ if (str.length >= length) {
14
+ return str.slice(0, length);
15
+ }
16
+ return ' '.repeat(length - str.length) + str;
17
+ };
18
+ export const BarChart = ({ id, data, width = 30, showValues = true, title, maxValue: suppliedMax, }) => {
19
+ if (data.length === 0)
20
+ return paragraphNode({
21
+ id,
22
+ runs: [plainRun('No data', DIM)],
23
+ fg: FOREGROUND,
24
+ });
25
+ const maxValue = suppliedMax ?? Math.max(...data.map((d) => d.value));
26
+ const maxLabelLen = Math.max(...data.map((d) => d.label.length));
27
+ const maxValLen = Math.max(...data.map((d) => String(d.value).length));
28
+ const barWidth = width - maxLabelLen - maxValLen - 3;
29
+ return h(BoxRenderable, { id, flexDirection: 'column' }, ...(title
30
+ ? [
31
+ paragraphNode({
32
+ id: `${id}-title`,
33
+ runs: [plainRun(title, BOLD)],
34
+ fg: FOREGROUND_HIGHLIGHT,
35
+ }),
36
+ ]
37
+ : []),
38
+ // One bar per data item, in the caller's order.
39
+ ...data.map((item, index) => {
40
+ const row = `${id}-${index}`;
41
+ const filled = maxValue === 0
42
+ ? 0
43
+ : Math.round((item.value / maxValue) * Math.max(1, barWidth));
44
+ const empty = Math.max(0, barWidth - filled);
45
+ return h(BoxRenderable, { id: row, flexDirection: 'row', gap: 1 }, paragraphNode({
46
+ id: `${row}-label`,
47
+ runs: [plainRun(pad(item.label, maxLabelLen))],
48
+ fg: FOREGROUND,
49
+ }), paragraphNode({
50
+ id: `${row}-bar`,
51
+ runs: [plainRun(BAR_CHAR.repeat(filled) + EMPTY_CHAR.repeat(empty))],
52
+ fg: item.color ?? FOREGROUND_HIGHLIGHT,
53
+ }), ...(showValues
54
+ ? [
55
+ paragraphNode({
56
+ id: `${row}-value`,
57
+ runs: [plainRun(padStart(String(item.value), maxValLen), DIM)],
58
+ fg: FOREGROUND,
59
+ }),
60
+ ]
61
+ : []));
62
+ }));
63
+ };
@@ -0,0 +1,16 @@
1
+ import { type RGBA, type VNode } from '@opentui/core';
2
+ export type BorderStyle = 'single' | 'double' | 'rounded' | 'heavy';
3
+ export interface CardProps {
4
+ /** Entity-derived; the card's parts derive their ids from it. */
5
+ id: string;
6
+ title?: string;
7
+ subtitle?: string;
8
+ children: readonly VNode[];
9
+ borderColor?: RGBA;
10
+ width?: number | `${number}%`;
11
+ onMouseDown?: () => void;
12
+ borderStyle?: BorderStyle;
13
+ paddingX?: number;
14
+ paddingY?: number;
15
+ }
16
+ export declare const Card: ({ id, title, subtitle, children, borderColor, width, onMouseDown, borderStyle, paddingX, paddingY, }: CardProps) => VNode;
@@ -0,0 +1,39 @@
1
+ import { BoxRenderable, h } from '@opentui/core';
2
+ import { BORDER, FOREGROUND } from '../../lib/theme.js';
3
+ import { BOLD, DIM, paragraphNode, plainRun, pressHandler, } from '../../lib/vnode.js';
4
+ export const Card = ({ id, title, subtitle, children, borderColor, width, onMouseDown, borderStyle = 'rounded', paddingX = 1, paddingY = 0, }) => {
5
+ const heading = [];
6
+ if (title)
7
+ heading.push(paragraphNode({
8
+ id: `${id}-title`,
9
+ runs: [plainRun(title, BOLD)],
10
+ fg: FOREGROUND,
11
+ }));
12
+ if (subtitle)
13
+ heading.push(paragraphNode({
14
+ id: `${id}-subtitle`,
15
+ runs: [plainRun(subtitle, DIM)],
16
+ fg: FOREGROUND,
17
+ }));
18
+ return h(BoxRenderable, {
19
+ id,
20
+ flexDirection: 'column',
21
+ border: true,
22
+ borderStyle,
23
+ borderColor: borderColor ?? BORDER,
24
+ width: width ?? 'auto',
25
+ paddingLeft: paddingX,
26
+ paddingRight: paddingX,
27
+ paddingTop: paddingY,
28
+ paddingBottom: paddingY,
29
+ onMouseDown: pressHandler(onMouseDown),
30
+ }, ...(heading.length > 0
31
+ ? [
32
+ h(BoxRenderable, {
33
+ id: `${id}-heading`,
34
+ flexDirection: 'column',
35
+ paddingBottom: 1,
36
+ }, ...heading),
37
+ ]
38
+ : []), h(BoxRenderable, { id: `${id}-content`, flexDirection: 'column' }, ...children));
39
+ };
@@ -0,0 +1,7 @@
1
+ import { type RGBA, type VNode } from '@opentui/core';
2
+ export interface DividerProps {
3
+ id: string;
4
+ color?: RGBA;
5
+ }
6
+ /** The horizontal, unlabelled rule — the only shape the TUI draws. */
7
+ export declare const Divider: ({ id, color }: DividerProps) => VNode;
@@ -0,0 +1,13 @@
1
+ import { BoxRenderable, h } from '@opentui/core';
2
+ import { BORDER } from '../../lib/theme.js';
3
+ // One array for every divider: `border` re-applies Yoga borders when it is
4
+ // handed a different value, and a patch restates it on every draw.
5
+ const TOP = ['top'];
6
+ /** The horizontal, unlabelled rule — the only shape the TUI draws. */
7
+ export const Divider = ({ id, color }) => h(BoxRenderable, { id, flexDirection: 'row' }, h(BoxRenderable, {
8
+ id: `${id}-rule`,
9
+ flexGrow: 1,
10
+ borderStyle: 'single',
11
+ borderColor: color ?? BORDER,
12
+ border: TOP,
13
+ }));
@@ -0,0 +1,58 @@
1
+ import { type VNode } from '@opentui/core';
2
+ /**
3
+ * One footer action — the atomic chip screens publish.
4
+ * Rendered as `key` ({@link FOREGROUND_ACTIVE} fg) plus optional muted `:Label`.
5
+ */
6
+ export interface ActionItem {
7
+ /** Stable id — nodes are `${id}-key` / `${id}-sfx`. */
8
+ id: string;
9
+ /** Active key glyph, e.g. `e`, `Tab`, `→`. */
10
+ key: string;
11
+ /**
12
+ * Plain label without a colon (`edit`, `next`). Title-cased and prefixed
13
+ * with `:` at render time. Omit for a bare key (`Enter`).
14
+ */
15
+ label?: string;
16
+ }
17
+ /** Build an {@link ActionItem} — the usual screen-side constructor. */
18
+ export declare const actionItem: (id: string, key: string, label?: string) => ActionItem;
19
+ /** Legacy ladder string for assertions (`n new · e edit`). */
20
+ export declare const formatActionLadder: (items: readonly ActionItem[] | undefined) => string;
21
+ /** Box-drawing pipe — sits optically higher than ASCII `|`. */
22
+ export declare const footerSep: (id: string) => VNode;
23
+ /**
24
+ * Render one action-item as FOREGROUND_ACTIVE-fg key + optional muted `:Label`.
25
+ * Also used by the kernel basics row (`Esc:back`, `q:quit`).
26
+ */
27
+ export declare const renderActionItem: (item: Pick<ActionItem, "id" | "key" | "label"> & {
28
+ suffix?: string;
29
+ }) => VNode[];
30
+ /**
31
+ * Low-level chip used by kernel basics that already pass a ready `:suffix`
32
+ * (e.g. `:quit`). Screen actions prefer {@link actionItem}.
33
+ */
34
+ export declare const footerKey: (id: string, key: string, suffix?: string) => VNode[];
35
+ /**
36
+ * A segment inside {@link withActionPipes}: an {@link ActionItem}, or already
37
+ * rendered nodes (plain text, {@link footerKey} chips, …).
38
+ */
39
+ export type ActionSegment = ActionItem | readonly VNode[];
40
+ /**
41
+ * Wrapper that inserts `│` between segments — action-items or prebuilt node
42
+ * groups. Callers never place separators by hand.
43
+ */
44
+ export declare const withActionPipes: (sepIdPrefix: string, segments: readonly ActionSegment[]) => VNode[];
45
+ /** Pipe-joined chips from an action-item list (thin wrapper over {@link withActionPipes}). */
46
+ export declare const footerActionChips: (items: readonly ActionItem[], sepIdPrefix?: string) => VNode[];
47
+ /**
48
+ * Full screen-actions row: lead pad + piped action-items + width pad.
49
+ * Returns `null` when `items` is empty — caller omits the row.
50
+ */
51
+ export declare const footerActions: (id: string, items: readonly ActionItem[], width: number) => VNode | null;
52
+ /** @deprecated Use {@link footerActions}. */
53
+ export declare const footerActionsRow: (id: string, items: readonly ActionItem[], width: number) => VNode | null;
54
+ /**
55
+ * Parse a legacy ladder string (`n new · e edit`) into action-items.
56
+ * Prefer publishing {@link ActionItem} arrays from screens directly.
57
+ */
58
+ export declare const parseFooterLadder: (ladder: string, idPrefix?: string) => ActionItem[];
@@ -0,0 +1,113 @@
1
+ // BB-375 — footer actions: action-item chips + withActionPipes (│ between them).
2
+ // No footer fill — chips sit on the terminal default (same as header).
3
+ import { BoxRenderable, h } from '@opentui/core';
4
+ import { BORDER, FOREGROUND_ACTIVE, textNode } from '../../lib/vnode.js';
5
+ /** Build an {@link ActionItem} — the usual screen-side constructor. */
6
+ export const actionItem = (id, key, label) => (label === undefined ? { id, key } : { id, key, label });
7
+ /** Legacy ladder string for assertions (`n new · e edit`). */
8
+ export const formatActionLadder = (items) => (items ?? [])
9
+ .map((item) => item.label !== undefined ? `${item.key} ${item.label}` : item.key)
10
+ .join(' · ');
11
+ /** Box-drawing pipe — sits optically higher than ASCII `|`. */
12
+ export const footerSep = (id) => textNode({ id, content: ' │ ', fg: BORDER });
13
+ /** First letter upper for labels (`edit` → `Edit`). */
14
+ const titleCase = (label) => label.length === 0 ? label : label.charAt(0).toUpperCase() + label.slice(1);
15
+ /**
16
+ * Render one action-item as FOREGROUND_ACTIVE-fg key + optional muted `:Label`.
17
+ * Also used by the kernel basics row (`Esc:back`, `q:quit`).
18
+ */
19
+ export const renderActionItem = (item) => {
20
+ const suffix = item.suffix ??
21
+ (item.label !== undefined ? `:${titleCase(item.label)}` : undefined);
22
+ const nodes = [
23
+ textNode({
24
+ id: `${item.id}-key`,
25
+ content: item.key,
26
+ fg: FOREGROUND_ACTIVE,
27
+ bold: true,
28
+ }),
29
+ ];
30
+ if (suffix !== undefined) {
31
+ nodes.push(textNode({
32
+ id: `${item.id}-sfx`,
33
+ content: suffix,
34
+ fg: BORDER,
35
+ }));
36
+ }
37
+ return nodes;
38
+ };
39
+ /**
40
+ * Low-level chip used by kernel basics that already pass a ready `:suffix`
41
+ * (e.g. `:quit`). Screen actions prefer {@link actionItem}.
42
+ */
43
+ export const footerKey = (id, key, suffix) => suffix === undefined
44
+ ? renderActionItem({ id, key })
45
+ : renderActionItem({ id, key, suffix });
46
+ const isActionItem = (segment) => !Array.isArray(segment);
47
+ /**
48
+ * Wrapper that inserts `│` between segments — action-items or prebuilt node
49
+ * groups. Callers never place separators by hand.
50
+ */
51
+ export const withActionPipes = (sepIdPrefix, segments) => {
52
+ const parts = [];
53
+ let placed = 0;
54
+ for (const segment of segments) {
55
+ const nodes = isActionItem(segment)
56
+ ? renderActionItem(segment)
57
+ : [...segment];
58
+ if (nodes.length === 0)
59
+ continue;
60
+ if (placed > 0)
61
+ parts.push(footerSep(`${sepIdPrefix}-${placed}`));
62
+ parts.push(...nodes);
63
+ placed += 1;
64
+ }
65
+ return parts;
66
+ };
67
+ /** Pipe-joined chips from an action-item list (thin wrapper over {@link withActionPipes}). */
68
+ export const footerActionChips = (items, sepIdPrefix = 'footer-actions-sep') => withActionPipes(sepIdPrefix, items);
69
+ /**
70
+ * Full screen-actions row: lead pad + piped action-items + width pad.
71
+ * Returns `null` when `items` is empty — caller omits the row.
72
+ */
73
+ export const footerActions = (id, items, width) => {
74
+ if (items.length === 0)
75
+ return null;
76
+ return h(BoxRenderable, {
77
+ id,
78
+ flexDirection: 'row',
79
+ height: 1,
80
+ flexShrink: 0,
81
+ width: '100%',
82
+ }, textNode({
83
+ id: `${id}-lead`,
84
+ content: ' ',
85
+ }), ...withActionPipes(`${id}-sep`, items), textNode({
86
+ id: `${id}-pad`,
87
+ content: ' '.repeat(width),
88
+ }));
89
+ };
90
+ /** @deprecated Use {@link footerActions}. */
91
+ export const footerActionsRow = footerActions;
92
+ /**
93
+ * Parse a legacy ladder string (`n new · e edit`) into action-items.
94
+ * Prefer publishing {@link ActionItem} arrays from screens directly.
95
+ */
96
+ export const parseFooterLadder = (ladder, idPrefix = 'footer-action') => {
97
+ const segments = ladder
98
+ .split(/\s·\s/)
99
+ .map((s) => s.trim())
100
+ .filter((s) => s !== '');
101
+ const items = [];
102
+ for (const [i, seg] of segments.entries()) {
103
+ const m = /^(\S+)(?:\s+(.+))?$/.exec(seg);
104
+ if (m === null)
105
+ continue;
106
+ const key = m[1];
107
+ if (key === undefined)
108
+ continue;
109
+ const label = m[2];
110
+ items.push(actionItem(`${idPrefix}-${i}`, key, label));
111
+ }
112
+ return items;
113
+ };
@@ -0,0 +1,21 @@
1
+ import { type RGBA, type VNode } from '@opentui/core';
2
+ export interface HeatMapProps {
3
+ id: string;
4
+ data: number[][];
5
+ rowLabels?: string[];
6
+ colLabels?: string[];
7
+ cellLabels?: string[][];
8
+ /** Low to high; indexed palette slots only. */
9
+ colorScale?: readonly RGBA[];
10
+ cellWidth?: number;
11
+ showValues?: boolean;
12
+ showLegend?: boolean;
13
+ minValue?: number;
14
+ maxValue?: number;
15
+ }
16
+ /**
17
+ * Low → high intensity as three palette slots, so the scale follows the
18
+ * operator's terminal theme like every other colour the cockpit paints.
19
+ */
20
+ export declare const HEAT_SCALE: readonly RGBA[];
21
+ export declare const HeatMap: ({ id, data, rowLabels, colLabels, cellLabels, colorScale, cellWidth, showValues, showLegend, minValue, maxValue, }: HeatMapProps) => VNode;
@@ -0,0 +1,86 @@
1
+ import { BoxRenderable, h } from '@opentui/core';
2
+ import { FOREGROUND, FOREGROUND_ACTIVE, FOREGROUND_HIGHLIGHT, } from '../../lib/theme.js';
3
+ import { DIM, paragraphNode, plainRun, } from '../../lib/vnode.js';
4
+ /**
5
+ * Low → high intensity as three palette slots, so the scale follows the
6
+ * operator's terminal theme like every other colour the cockpit paints.
7
+ */
8
+ export const HEAT_SCALE = [
9
+ FOREGROUND,
10
+ FOREGROUND_HIGHLIGHT,
11
+ FOREGROUND_ACTIVE,
12
+ ];
13
+ const SHADE_CHARS = [' ', '░', '▒', '▓', '█'];
14
+ const getColorForValue = (value, min, max, scale) => {
15
+ if (max === min)
16
+ return scale[Math.floor(scale.length / 2)] ?? FOREGROUND;
17
+ const t = (value - min) / (max - min);
18
+ const index = Math.min(scale.length - 1, Math.max(0, Math.round(t * (scale.length - 1))));
19
+ return scale[index] ?? scale[0] ?? FOREGROUND;
20
+ };
21
+ const getShadeForValue = (value, min, max) => {
22
+ if (max === min)
23
+ return SHADE_CHARS[2] ?? '▒';
24
+ const t = (value - min) / (max - min);
25
+ const index = Math.min(SHADE_CHARS.length - 1, Math.max(0, Math.round(t * (SHADE_CHARS.length - 1))));
26
+ return SHADE_CHARS[index] ?? SHADE_CHARS[0] ?? ' ';
27
+ };
28
+ const padCenter = (value, width) => {
29
+ if (value.length >= width)
30
+ return value;
31
+ const total = width - value.length;
32
+ const left = Math.floor(total / 2);
33
+ return ' '.repeat(left) + value + ' '.repeat(total - left);
34
+ };
35
+ const padStart = (value, width) => value.length >= width ? value.slice(0, width) : value.padStart(width);
36
+ /** One grid row as one text: the cells touch, so their runs are the row. */
37
+ const gridRow = (id, runs) => paragraphNode({
38
+ id,
39
+ runs,
40
+ fg: FOREGROUND,
41
+ wrapMode: 'none',
42
+ flexShrink: 0,
43
+ });
44
+ export const HeatMap = ({ id, data, rowLabels, colLabels, cellLabels, colorScale = HEAT_SCALE, cellWidth = 5, showValues = false, showLegend = true, minValue, maxValue, }) => {
45
+ const firstRow = data[0];
46
+ if (data.length === 0 || !firstRow || firstRow.length === 0)
47
+ return paragraphNode({
48
+ id,
49
+ runs: [plainRun('No data', DIM)],
50
+ fg: FOREGROUND,
51
+ });
52
+ const numCols = firstRow.length;
53
+ const allValues = data.flat();
54
+ const min = minValue ?? Math.min(...allValues);
55
+ const max = maxValue ?? Math.max(...allValues);
56
+ const rowLabelWidth = rowLabels
57
+ ? Math.max(...rowLabels.map((label) => label.length)) + 1
58
+ : 0;
59
+ const rows = [];
60
+ if (colLabels)
61
+ rows.push(gridRow(`${id}-columns`, [
62
+ ...(rowLabelWidth > 0
63
+ ? [plainRun(' '.repeat(rowLabelWidth + 1), DIM, FOREGROUND)]
64
+ : []),
65
+ ...Array.from({ length: numCols }, (_, column) => plainRun(padCenter(colLabels[column] ?? String(column), cellWidth), DIM, FOREGROUND)),
66
+ ]));
67
+ data.forEach((row, rowIndex) => {
68
+ rows.push(gridRow(`${id}-row-${rowIndex}`, [
69
+ ...(rowLabels
70
+ ? [
71
+ plainRun(`${padStart(rowLabels[rowIndex] ?? String(rowIndex), rowLabelWidth)} `, DIM, FOREGROUND),
72
+ ]
73
+ : []),
74
+ ...row.map((value, column) => plainRun(showValues
75
+ ? padCenter(cellLabels?.[rowIndex]?.[column] ?? String(Math.round(value)), cellWidth)
76
+ : getShadeForValue(value, min, max).repeat(cellWidth), 0, getColorForValue(value, min, max, colorScale))),
77
+ ]));
78
+ });
79
+ if (showLegend)
80
+ rows.push(h(BoxRenderable, { id: `${id}-legend`, flexDirection: 'row', marginTop: 1 }, gridRow(`${id}-legend-scale`, [
81
+ plainRun('Low ', DIM, FOREGROUND),
82
+ ...colorScale.map((colour) => plainRun('█ ', 0, colour)),
83
+ plainRun('High', DIM, FOREGROUND),
84
+ ])));
85
+ return h(BoxRenderable, { id, flexDirection: 'column' }, ...rows);
86
+ };
@@ -0,0 +1,18 @@
1
+ import { type RGBA, type VNode } from '@opentui/core';
2
+ export interface KeyValueItem {
3
+ key: string;
4
+ value: string;
5
+ /** Drawn underlined — the value is a link the click acts on. */
6
+ underline?: boolean;
7
+ color?: RGBA;
8
+ onMouseDown?: () => void;
9
+ }
10
+ export interface KeyValueProps {
11
+ id: string;
12
+ items: readonly KeyValueItem[];
13
+ keyWidth?: number;
14
+ separator?: string;
15
+ keyColor?: RGBA;
16
+ valueColor?: RGBA;
17
+ }
18
+ export declare const KeyValue: ({ id, items, keyWidth, separator, keyColor, valueColor, }: KeyValueProps) => VNode;
@@ -0,0 +1,30 @@
1
+ import { BoxRenderable, h } from '@opentui/core';
2
+ import { FOREGROUND } from '../../lib/theme.js';
3
+ import { paragraphNode, plainRun, UNDERLINE } from '../../lib/vnode.js';
4
+ export const KeyValue = ({ id, items, keyWidth, separator = ':', keyColor, valueColor, }) => {
5
+ const resolvedKeyWidth = keyWidth ?? Math.max(0, ...items.map((item) => item.key.length)) + 1;
6
+ const resolvedKeyColor = keyColor ?? FOREGROUND;
7
+ const resolvedValueColor = valueColor ?? FOREGROUND;
8
+ return h(BoxRenderable, { id, flexDirection: 'column', width: '100%' },
9
+ // A fixed list per owner, rebuilt whole from the model on every draw, so
10
+ // the position is a sound key for its rows.
11
+ ...items.map((item, index) => {
12
+ const row = `${id}-${index}`;
13
+ return h(BoxRenderable, { id: row, flexDirection: 'row', gap: 1, width: '100%' }, paragraphNode({
14
+ id: `${row}-key`,
15
+ runs: [plainRun(item.key.padEnd(resolvedKeyWidth, ' '))],
16
+ fg: resolvedKeyColor,
17
+ }), paragraphNode({
18
+ id: `${row}-separator`,
19
+ runs: [plainRun(separator)],
20
+ fg: resolvedKeyColor,
21
+ }), paragraphNode({
22
+ id: `${row}-value`,
23
+ runs: [plainRun(item.value, item.underline ? UNDERLINE : 0)],
24
+ fg: item.color ?? resolvedValueColor,
25
+ flexGrow: 1,
26
+ flexShrink: 1,
27
+ onMouseDown: item.onMouseDown,
28
+ }));
29
+ }));
30
+ };
@@ -0,0 +1,22 @@
1
+ import { type VNode } from '@opentui/core';
2
+ /** One filter/action badge in the strip above a list table. */
3
+ export interface ListFilterBadge {
4
+ /** Stable id suffix — node id is `${stripId}-${id}`. */
5
+ id: string;
6
+ /**
7
+ * Shortcut plus a space plus the idle caption, e.g. `/ search` or `x closed`.
8
+ * The first space-delimited token is the shortcut rendered before an active value.
9
+ */
10
+ label: string;
11
+ /**
12
+ * Active caption rendered after the shortcut (e.g. `closed: hidden`, `who: cw`).
13
+ * Undefined or empty keeps the badge idle: {@link label} only, idle palette.
14
+ */
15
+ value?: string;
16
+ }
17
+ /**
18
+ * Rounded filter chips in a row (idle outline + active FOREGROUND_ACTIVE fg).
19
+ * Each badge is its own `borderStyle: 'rounded'` box — the panel border language.
20
+ * Horizontal inset matches the body ScrollBox frame padding (BB-375).
21
+ */
22
+ export declare const filterBadgeStrip: (id: string, badges: readonly ListFilterBadge[]) => VNode;