@mgamadeus/ddd-admin-ui 0.1.0-rc.6 → 0.2.1

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 (572) hide show
  1. package/.claude/skills/ddd-admin-ui-specialist/SKILL.md +56 -2
  2. package/CHANGELOG.md +243 -1
  3. package/README.md +266 -26
  4. package/STANDARDS.md +173 -2
  5. package/dist/components.css +27 -3
  6. package/dist/data/DeltaText.d.ts +29 -0
  7. package/dist/data/DeltaText.d.ts.map +1 -0
  8. package/dist/data/DeltaText.js +36 -0
  9. package/dist/data/DeltaText.js.map +1 -0
  10. package/dist/data/MetricGrid.d.ts +15 -0
  11. package/dist/data/MetricGrid.d.ts.map +1 -0
  12. package/dist/data/MetricGrid.js +17 -0
  13. package/dist/data/MetricGrid.js.map +1 -0
  14. package/dist/data/MetricTile.d.ts +32 -0
  15. package/dist/data/MetricTile.d.ts.map +1 -0
  16. package/dist/data/MetricTile.js +13 -0
  17. package/dist/data/MetricTile.js.map +1 -0
  18. package/dist/data/NoteList.d.ts +19 -0
  19. package/dist/data/NoteList.d.ts.map +1 -0
  20. package/dist/data/NoteList.js +23 -0
  21. package/dist/data/NoteList.js.map +1 -0
  22. package/dist/data/delta.d.ts +40 -0
  23. package/dist/data/delta.d.ts.map +1 -0
  24. package/dist/data/delta.js +40 -0
  25. package/dist/data/delta.js.map +1 -0
  26. package/dist/data/index.d.ts +6 -0
  27. package/dist/data/index.d.ts.map +1 -0
  28. package/dist/data/index.js +7 -0
  29. package/dist/data/index.js.map +1 -0
  30. package/dist/design-studio/contract.d.ts +162 -0
  31. package/dist/design-studio/contract.d.ts.map +1 -0
  32. package/dist/design-studio/contract.js +2 -0
  33. package/dist/design-studio/contract.js.map +1 -0
  34. package/dist/design-studio/index.d.ts +45 -0
  35. package/dist/design-studio/index.d.ts.map +1 -0
  36. package/dist/design-studio/index.js +47 -0
  37. package/dist/design-studio/index.js.map +1 -0
  38. package/dist/form/ColorValueField.d.ts +37 -0
  39. package/dist/form/ColorValueField.d.ts.map +1 -0
  40. package/dist/form/ColorValueField.js +74 -0
  41. package/dist/form/ColorValueField.js.map +1 -0
  42. package/dist/form/FormDialog.d.ts +1 -0
  43. package/dist/form/FormDialog.d.ts.map +1 -1
  44. package/dist/form/FormDialog.js +3 -1
  45. package/dist/form/FormDialog.js.map +1 -1
  46. package/dist/form/FormDrawer.d.ts +12 -1
  47. package/dist/form/FormDrawer.d.ts.map +1 -1
  48. package/dist/form/FormDrawer.js +9 -2
  49. package/dist/form/FormDrawer.js.map +1 -1
  50. package/dist/form/index.d.ts +2 -0
  51. package/dist/form/index.d.ts.map +1 -1
  52. package/dist/form/index.js +2 -0
  53. package/dist/form/index.js.map +1 -1
  54. package/dist/glass/QuickFilterPills.d.ts +7 -0
  55. package/dist/glass/QuickFilterPills.d.ts.map +1 -1
  56. package/dist/glass/QuickFilterPills.js +4 -3
  57. package/dist/glass/QuickFilterPills.js.map +1 -1
  58. package/dist/i18n/format.d.ts +3 -2
  59. package/dist/i18n/format.d.ts.map +1 -1
  60. package/dist/i18n/format.js +3 -2
  61. package/dist/i18n/format.js.map +1 -1
  62. package/dist/i18n/formatLocale.d.ts +8 -0
  63. package/dist/i18n/formatLocale.d.ts.map +1 -0
  64. package/dist/i18n/formatLocale.js +10 -0
  65. package/dist/i18n/formatLocale.js.map +1 -0
  66. package/dist/i18n/hints.json +498 -1
  67. package/dist/i18n/index.d.ts +1 -0
  68. package/dist/i18n/index.d.ts.map +1 -1
  69. package/dist/i18n/index.js +1 -0
  70. package/dist/i18n/index.js.map +1 -1
  71. package/dist/i18n-keys.json +4444 -351
  72. package/dist/list/ActionsHeaderText.d.ts +5 -0
  73. package/dist/list/ActionsHeaderText.d.ts.map +1 -0
  74. package/dist/list/ActionsHeaderText.js +9 -0
  75. package/dist/list/ActionsHeaderText.js.map +1 -0
  76. package/dist/list/Combobox.d.ts +11 -1
  77. package/dist/list/Combobox.d.ts.map +1 -1
  78. package/dist/list/Combobox.js +10 -7
  79. package/dist/list/Combobox.js.map +1 -1
  80. package/dist/list/EntityListBody.d.ts +9 -1
  81. package/dist/list/EntityListBody.d.ts.map +1 -1
  82. package/dist/list/EntityListBody.js +5 -3
  83. package/dist/list/EntityListBody.js.map +1 -1
  84. package/dist/list/EntityListBulkBar.d.ts +45 -3
  85. package/dist/list/EntityListBulkBar.d.ts.map +1 -1
  86. package/dist/list/EntityListBulkBar.js +31 -5
  87. package/dist/list/EntityListBulkBar.js.map +1 -1
  88. package/dist/list/EntityListEmpty.d.ts +9 -3
  89. package/dist/list/EntityListEmpty.d.ts.map +1 -1
  90. package/dist/list/EntityListEmpty.js +3 -3
  91. package/dist/list/EntityListEmpty.js.map +1 -1
  92. package/dist/list/EntityListTable.d.ts +3 -2
  93. package/dist/list/EntityListTable.d.ts.map +1 -1
  94. package/dist/list/EntityListTable.js +12 -8
  95. package/dist/list/EntityListTable.js.map +1 -1
  96. package/dist/list/EntityListToolbar.d.ts +30 -0
  97. package/dist/list/EntityListToolbar.d.ts.map +1 -1
  98. package/dist/list/EntityListToolbar.js +18 -4
  99. package/dist/list/EntityListToolbar.js.map +1 -1
  100. package/dist/list/EntityListViewToggle.d.ts +4 -1
  101. package/dist/list/EntityListViewToggle.d.ts.map +1 -1
  102. package/dist/list/EntityListViewToggle.js +15 -4
  103. package/dist/list/EntityListViewToggle.js.map +1 -1
  104. package/dist/list/cells.d.ts +10 -2
  105. package/dist/list/cells.d.ts.map +1 -1
  106. package/dist/list/cells.js +15 -6
  107. package/dist/list/cells.js.map +1 -1
  108. package/dist/list/columns.d.ts +85 -0
  109. package/dist/list/columns.d.ts.map +1 -0
  110. package/dist/list/columns.js +88 -0
  111. package/dist/list/columns.js.map +1 -0
  112. package/dist/list/filters.d.ts +19 -1
  113. package/dist/list/filters.d.ts.map +1 -1
  114. package/dist/list/filters.js +47 -3
  115. package/dist/list/filters.js.map +1 -1
  116. package/dist/list/index.d.ts +6 -0
  117. package/dist/list/index.d.ts.map +1 -1
  118. package/dist/list/index.js +3 -0
  119. package/dist/list/index.js.map +1 -1
  120. package/dist/logic/browser/normalizeImage.d.ts +69 -0
  121. package/dist/logic/browser/normalizeImage.d.ts.map +1 -0
  122. package/dist/logic/browser/normalizeImage.js +147 -0
  123. package/dist/logic/browser/normalizeImage.js.map +1 -0
  124. package/dist/logic/index.d.ts +25 -2
  125. package/dist/logic/index.d.ts.map +1 -1
  126. package/dist/logic/index.js +15 -1
  127. package/dist/logic/index.js.map +1 -1
  128. package/dist/logic/pure/colorValue.d.ts +22 -0
  129. package/dist/logic/pure/colorValue.d.ts.map +1 -0
  130. package/dist/logic/pure/colorValue.js +34 -0
  131. package/dist/logic/pure/colorValue.js.map +1 -0
  132. package/dist/logic/pure/confirm.d.ts +1 -0
  133. package/dist/logic/pure/confirm.d.ts.map +1 -1
  134. package/dist/logic/pure/confirm.js.map +1 -1
  135. package/dist/logic/pure/dateRangePresets.d.ts +33 -0
  136. package/dist/logic/pure/dateRangePresets.d.ts.map +1 -0
  137. package/dist/logic/pure/dateRangePresets.js +41 -0
  138. package/dist/logic/pure/dateRangePresets.js.map +1 -0
  139. package/dist/logic/pure/format.d.ts +3 -3
  140. package/dist/logic/pure/format.d.ts.map +1 -1
  141. package/dist/logic/pure/format.js +13 -12
  142. package/dist/logic/pure/format.js.map +1 -1
  143. package/dist/logic/pure/imageCrop.d.ts +99 -0
  144. package/dist/logic/pure/imageCrop.d.ts.map +1 -0
  145. package/dist/logic/pure/imageCrop.js +198 -0
  146. package/dist/logic/pure/imageCrop.js.map +1 -0
  147. package/dist/logic/pure/injectedApi.d.ts +83 -0
  148. package/dist/logic/pure/injectedApi.d.ts.map +1 -0
  149. package/dist/logic/pure/injectedApi.js +87 -0
  150. package/dist/logic/pure/injectedApi.js.map +1 -0
  151. package/dist/logic/pure/listTracks.d.ts +14 -2
  152. package/dist/logic/pure/listTracks.d.ts.map +1 -1
  153. package/dist/logic/pure/listTracks.js +15 -4
  154. package/dist/logic/pure/listTracks.js.map +1 -1
  155. package/dist/logic/pure/locales.d.ts +22 -0
  156. package/dist/logic/pure/locales.d.ts.map +1 -1
  157. package/dist/logic/pure/locales.js +43 -0
  158. package/dist/logic/pure/locales.js.map +1 -1
  159. package/dist/logic/pure/navigation.d.ts +159 -0
  160. package/dist/logic/pure/navigation.d.ts.map +1 -0
  161. package/dist/logic/pure/navigation.js +158 -0
  162. package/dist/logic/pure/navigation.js.map +1 -0
  163. package/dist/logic/pure/runSequential.d.ts +42 -0
  164. package/dist/logic/pure/runSequential.d.ts.map +1 -1
  165. package/dist/logic/pure/runSequential.js +65 -13
  166. package/dist/logic/pure/runSequential.js.map +1 -1
  167. package/dist/logic/pure/textLimits.d.ts +18 -0
  168. package/dist/logic/pure/textLimits.d.ts.map +1 -0
  169. package/dist/logic/pure/textLimits.js +14 -0
  170. package/dist/logic/pure/textLimits.js.map +1 -0
  171. package/dist/logic/react/textLimits.d.ts +8 -0
  172. package/dist/logic/react/textLimits.d.ts.map +1 -0
  173. package/dist/logic/react/textLimits.js +9 -0
  174. package/dist/logic/react/textLimits.js.map +1 -0
  175. package/dist/logic/react/useEntityTranslations.d.ts +16 -1
  176. package/dist/logic/react/useEntityTranslations.d.ts.map +1 -1
  177. package/dist/logic/react/useEntityTranslations.js +18 -4
  178. package/dist/logic/react/useEntityTranslations.js.map +1 -1
  179. package/dist/logic/react/useMediaQuery.d.ts +14 -0
  180. package/dist/logic/react/useMediaQuery.d.ts.map +1 -0
  181. package/dist/logic/react/useMediaQuery.js +24 -0
  182. package/dist/logic/react/useMediaQuery.js.map +1 -0
  183. package/dist/logic/react/useMemoryUrlState.d.ts +13 -0
  184. package/dist/logic/react/useMemoryUrlState.d.ts.map +1 -0
  185. package/dist/logic/react/useMemoryUrlState.js +41 -0
  186. package/dist/logic/react/useMemoryUrlState.js.map +1 -0
  187. package/dist/logic/react/useOptimisticRowPatches.d.ts +16 -0
  188. package/dist/logic/react/useOptimisticRowPatches.d.ts.map +1 -0
  189. package/dist/logic/react/useOptimisticRowPatches.js +39 -0
  190. package/dist/logic/react/useOptimisticRowPatches.js.map +1 -0
  191. package/dist/markdown/MarkdownEditor.d.ts +36 -0
  192. package/dist/markdown/MarkdownEditor.d.ts.map +1 -0
  193. package/dist/markdown/MarkdownEditor.js +36 -0
  194. package/dist/markdown/MarkdownEditor.js.map +1 -0
  195. package/dist/markdown/MarkdownPreview.d.ts +15 -0
  196. package/dist/markdown/MarkdownPreview.d.ts.map +1 -0
  197. package/dist/markdown/MarkdownPreview.js +17 -0
  198. package/dist/markdown/MarkdownPreview.js.map +1 -0
  199. package/dist/markdown/index.d.ts +7 -0
  200. package/dist/markdown/index.d.ts.map +1 -0
  201. package/dist/markdown/index.js +9 -0
  202. package/dist/markdown/index.js.map +1 -0
  203. package/dist/markdown/loadMarkdownLibrary.d.ts +28 -0
  204. package/dist/markdown/loadMarkdownLibrary.d.ts.map +1 -0
  205. package/dist/markdown/loadMarkdownLibrary.js +40 -0
  206. package/dist/markdown/loadMarkdownLibrary.js.map +1 -0
  207. package/dist/markdown/markdownPipeline.d.ts +20 -0
  208. package/dist/markdown/markdownPipeline.d.ts.map +1 -0
  209. package/dist/markdown/markdownPipeline.js +50 -0
  210. package/dist/markdown/markdownPipeline.js.map +1 -0
  211. package/dist/markdown/renderMarkdownEditor.d.ts +18 -0
  212. package/dist/markdown/renderMarkdownEditor.d.ts.map +1 -0
  213. package/dist/markdown/renderMarkdownEditor.js +14 -0
  214. package/dist/markdown/renderMarkdownEditor.js.map +1 -0
  215. package/dist/markdown/useMarkdownLibrary.d.ts +24 -0
  216. package/dist/markdown/useMarkdownLibrary.d.ts.map +1 -0
  217. package/dist/markdown/useMarkdownLibrary.js +47 -0
  218. package/dist/markdown/useMarkdownLibrary.js.map +1 -0
  219. package/dist/media/ImageCropDialog.d.ts +48 -0
  220. package/dist/media/ImageCropDialog.d.ts.map +1 -0
  221. package/dist/media/ImageCropDialog.js +203 -0
  222. package/dist/media/ImageCropDialog.js.map +1 -0
  223. package/dist/media/MediaItemField.d.ts.map +1 -1
  224. package/dist/media/MediaItemField.js +3 -1
  225. package/dist/media/MediaItemField.js.map +1 -1
  226. package/dist/media/MediaItemPickerDialog.d.ts +1 -0
  227. package/dist/media/MediaItemPickerDialog.d.ts.map +1 -1
  228. package/dist/media/MediaItemPickerDialog.js +3 -1
  229. package/dist/media/MediaItemPickerDialog.js.map +1 -1
  230. package/dist/media/index.d.ts +2 -0
  231. package/dist/media/index.d.ts.map +1 -1
  232. package/dist/media/index.js +2 -0
  233. package/dist/media/index.js.map +1 -1
  234. package/dist/next/index.d.ts +1 -0
  235. package/dist/next/index.d.ts.map +1 -1
  236. package/dist/next/index.js +1 -0
  237. package/dist/next/index.js.map +1 -1
  238. package/dist/next/useNextPathname.d.ts +7 -0
  239. package/dist/next/useNextPathname.d.ts.map +1 -0
  240. package/dist/next/useNextPathname.js +9 -0
  241. package/dist/next/useNextPathname.js.map +1 -0
  242. package/dist/page/DetailHeader.d.ts.map +1 -1
  243. package/dist/page/DetailHeader.js +3 -1
  244. package/dist/page/DetailHeader.js.map +1 -1
  245. package/dist/page/MaintenanceActionCard.d.ts +29 -0
  246. package/dist/page/MaintenanceActionCard.d.ts.map +1 -0
  247. package/dist/page/MaintenanceActionCard.js +21 -0
  248. package/dist/page/MaintenanceActionCard.js.map +1 -0
  249. package/dist/page/PageHeader.d.ts.map +1 -1
  250. package/dist/page/PageHeader.js +3 -1
  251. package/dist/page/PageHeader.js.map +1 -1
  252. package/dist/page/RouteError.d.ts +26 -0
  253. package/dist/page/RouteError.d.ts.map +1 -0
  254. package/dist/page/RouteError.js +35 -0
  255. package/dist/page/RouteError.js.map +1 -0
  256. package/dist/page/RouteLoading.d.ts +16 -0
  257. package/dist/page/RouteLoading.d.ts.map +1 -0
  258. package/dist/page/RouteLoading.js +17 -0
  259. package/dist/page/RouteLoading.js.map +1 -0
  260. package/dist/page/SectionHeader.d.ts.map +1 -1
  261. package/dist/page/SectionHeader.js +3 -1
  262. package/dist/page/SectionHeader.js.map +1 -1
  263. package/dist/page/index.d.ts +6 -0
  264. package/dist/page/index.d.ts.map +1 -1
  265. package/dist/page/index.js +5 -0
  266. package/dist/page/index.js.map +1 -1
  267. package/dist/primitives/alert.d.ts +1 -1
  268. package/dist/primitives/badge.d.ts +1 -1
  269. package/dist/primitives/confirmDialogView.d.ts +1 -0
  270. package/dist/primitives/confirmDialogView.d.ts.map +1 -1
  271. package/dist/primitives/confirmDialogView.js +3 -1
  272. package/dist/primitives/confirmDialogView.js.map +1 -1
  273. package/dist/primitives/descriptionContent.d.ts +8 -0
  274. package/dist/primitives/descriptionContent.d.ts.map +1 -0
  275. package/dist/primitives/descriptionContent.js +7 -0
  276. package/dist/primitives/descriptionContent.js.map +1 -0
  277. package/dist/primitives/index.d.ts +1 -0
  278. package/dist/primitives/index.d.ts.map +1 -1
  279. package/dist/primitives/index.js +1 -0
  280. package/dist/primitives/index.js.map +1 -1
  281. package/dist/primitives/pathname.d.ts +22 -0
  282. package/dist/primitives/pathname.d.ts.map +1 -0
  283. package/dist/primitives/pathname.js +23 -0
  284. package/dist/primitives/pathname.js.map +1 -0
  285. package/dist/primitives/segmented-control.d.ts +37 -3
  286. package/dist/primitives/segmented-control.d.ts.map +1 -1
  287. package/dist/primitives/segmented-control.js +45 -10
  288. package/dist/primitives/segmented-control.js.map +1 -1
  289. package/dist/provider/AdminUiProvider.d.ts +2 -2
  290. package/dist/provider/AdminUiProvider.d.ts.map +1 -1
  291. package/dist/provider/AdminUiProvider.js +14 -3
  292. package/dist/provider/AdminUiProvider.js.map +1 -1
  293. package/dist/provider/index.d.ts +1 -1
  294. package/dist/provider/index.d.ts.map +1 -1
  295. package/dist/provider/types.d.ts +19 -0
  296. package/dist/provider/types.d.ts.map +1 -1
  297. package/dist/scripts/check-contrast.mjs +353 -0
  298. package/dist/shell/AccountMenu.d.ts +51 -0
  299. package/dist/shell/AccountMenu.d.ts.map +1 -0
  300. package/dist/shell/AccountMenu.js +34 -0
  301. package/dist/shell/AccountMenu.js.map +1 -0
  302. package/dist/shell/AppShell.d.ts +68 -0
  303. package/dist/shell/AppShell.d.ts.map +1 -0
  304. package/dist/shell/AppShell.js +56 -0
  305. package/dist/shell/AppShell.js.map +1 -0
  306. package/dist/shell/LanguageMenu.d.ts +36 -0
  307. package/dist/shell/LanguageMenu.d.ts.map +1 -0
  308. package/dist/shell/LanguageMenu.js +33 -0
  309. package/dist/shell/LanguageMenu.js.map +1 -0
  310. package/dist/shell/NavItemMarks.d.ts +21 -0
  311. package/dist/shell/NavItemMarks.d.ts.map +1 -0
  312. package/dist/shell/NavItemMarks.js +30 -0
  313. package/dist/shell/NavItemMarks.js.map +1 -0
  314. package/dist/shell/ShellBreadcrumbs.d.ts +26 -0
  315. package/dist/shell/ShellBreadcrumbs.d.ts.map +1 -0
  316. package/dist/shell/ShellBreadcrumbs.js +78 -0
  317. package/dist/shell/ShellBreadcrumbs.js.map +1 -0
  318. package/dist/shell/ShellDocumentTitle.d.ts +27 -0
  319. package/dist/shell/ShellDocumentTitle.d.ts.map +1 -0
  320. package/dist/shell/ShellDocumentTitle.js +50 -0
  321. package/dist/shell/ShellDocumentTitle.js.map +1 -0
  322. package/dist/shell/ShellMobileMenu.d.ts +33 -0
  323. package/dist/shell/ShellMobileMenu.d.ts.map +1 -0
  324. package/dist/shell/ShellMobileMenu.js +33 -0
  325. package/dist/shell/ShellMobileMenu.js.map +1 -0
  326. package/dist/shell/ShellNavLink.d.ts +18 -0
  327. package/dist/shell/ShellNavLink.d.ts.map +1 -0
  328. package/dist/shell/ShellNavLink.js +16 -0
  329. package/dist/shell/ShellNavLink.js.map +1 -0
  330. package/dist/shell/ShellNavList.d.ts +18 -0
  331. package/dist/shell/ShellNavList.d.ts.map +1 -0
  332. package/dist/shell/ShellNavList.js +45 -0
  333. package/dist/shell/ShellNavList.js.map +1 -0
  334. package/dist/shell/ShellNavRail.d.ts +11 -0
  335. package/dist/shell/ShellNavRail.d.ts.map +1 -0
  336. package/dist/shell/ShellNavRail.js +97 -0
  337. package/dist/shell/ShellNavRail.js.map +1 -0
  338. package/dist/shell/ShellSidebar.d.ts +32 -0
  339. package/dist/shell/ShellSidebar.d.ts.map +1 -0
  340. package/dist/shell/ShellSidebar.js +29 -0
  341. package/dist/shell/ShellSidebar.js.map +1 -0
  342. package/dist/shell/ShellTopBar.d.ts +23 -0
  343. package/dist/shell/ShellTopBar.d.ts.map +1 -0
  344. package/dist/shell/ShellTopBar.js +25 -0
  345. package/dist/shell/ShellTopBar.js.map +1 -0
  346. package/dist/shell/index.d.ts +28 -0
  347. package/dist/shell/index.d.ts.map +1 -0
  348. package/dist/shell/index.js +19 -0
  349. package/dist/shell/index.js.map +1 -0
  350. package/dist/shell/navClasses.d.ts +12 -0
  351. package/dist/shell/navClasses.d.ts.map +1 -0
  352. package/dist/shell/navClasses.js +14 -0
  353. package/dist/shell/navClasses.js.map +1 -0
  354. package/dist/shell/shellContext.d.ts +30 -0
  355. package/dist/shell/shellContext.d.ts.map +1 -0
  356. package/dist/shell/shellContext.js +7 -0
  357. package/dist/shell/shellContext.js.map +1 -0
  358. package/dist/shell/useShellShortcut.d.ts +12 -0
  359. package/dist/shell/useShellShortcut.d.ts.map +1 -0
  360. package/dist/shell/useShellShortcut.js +42 -0
  361. package/dist/shell/useShellShortcut.js.map +1 -0
  362. package/dist/shell/useSidebarCollapsed.d.ts +10 -0
  363. package/dist/shell/useSidebarCollapsed.d.ts.map +1 -0
  364. package/dist/shell/useSidebarCollapsed.js +49 -0
  365. package/dist/shell/useSidebarCollapsed.js.map +1 -0
  366. package/dist/shell-background/ShaderBackground.d.ts +27 -0
  367. package/dist/shell-background/ShaderBackground.d.ts.map +1 -0
  368. package/dist/shell-background/ShaderBackground.js +92 -0
  369. package/dist/shell-background/ShaderBackground.js.map +1 -0
  370. package/dist/shell-background/ShaderCanvas.d.ts +16 -0
  371. package/dist/shell-background/ShaderCanvas.d.ts.map +1 -0
  372. package/dist/shell-background/ShaderCanvas.js +197 -0
  373. package/dist/shell-background/ShaderCanvas.js.map +1 -0
  374. package/dist/shell-background/index.d.ts +5 -0
  375. package/dist/shell-background/index.d.ts.map +1 -0
  376. package/dist/shell-background/index.js +5 -0
  377. package/dist/shell-background/index.js.map +1 -0
  378. package/dist/shell-background/shader.d.ts +81 -0
  379. package/dist/shell-background/shader.d.ts.map +1 -0
  380. package/dist/shell-background/shader.js +194 -0
  381. package/dist/shell-background/shader.js.map +1 -0
  382. package/dist/showcase/Showcase.d.ts +12 -2
  383. package/dist/showcase/Showcase.d.ts.map +1 -1
  384. package/dist/showcase/Showcase.js +24 -6
  385. package/dist/showcase/Showcase.js.map +1 -1
  386. package/dist/showcase/coverage.d.ts.map +1 -1
  387. package/dist/showcase/coverage.js +55 -4
  388. package/dist/showcase/coverage.js.map +1 -1
  389. package/dist/showcase/fixtures.d.ts +9 -0
  390. package/dist/showcase/fixtures.d.ts.map +1 -0
  391. package/dist/showcase/fixtures.js +268 -0
  392. package/dist/showcase/fixtures.js.map +1 -0
  393. package/dist/showcase/index.d.ts +2 -0
  394. package/dist/showcase/index.d.ts.map +1 -1
  395. package/dist/showcase/index.js +1 -0
  396. package/dist/showcase/index.js.map +1 -1
  397. package/dist/showcase/sections/DataShowcase.d.ts +3 -0
  398. package/dist/showcase/sections/DataShowcase.d.ts.map +1 -0
  399. package/dist/showcase/sections/DataShowcase.js +15 -0
  400. package/dist/showcase/sections/DataShowcase.js.map +1 -0
  401. package/dist/showcase/sections/FormAdditionsShowcase.d.ts +3 -0
  402. package/dist/showcase/sections/FormAdditionsShowcase.d.ts.map +1 -0
  403. package/dist/showcase/sections/FormAdditionsShowcase.js +15 -0
  404. package/dist/showcase/sections/FormAdditionsShowcase.js.map +1 -0
  405. package/dist/showcase/sections/FormShowcase.d.ts.map +1 -1
  406. package/dist/showcase/sections/FormShowcase.js +2 -1
  407. package/dist/showcase/sections/FormShowcase.js.map +1 -1
  408. package/dist/showcase/sections/ListAdditionsShowcase.d.ts +3 -0
  409. package/dist/showcase/sections/ListAdditionsShowcase.d.ts.map +1 -0
  410. package/dist/showcase/sections/ListAdditionsShowcase.js +61 -0
  411. package/dist/showcase/sections/ListAdditionsShowcase.js.map +1 -0
  412. package/dist/showcase/sections/ListShowcase.d.ts.map +1 -1
  413. package/dist/showcase/sections/ListShowcase.js +2 -1
  414. package/dist/showcase/sections/ListShowcase.js.map +1 -1
  415. package/dist/showcase/sections/MarkdownShowcase.d.ts +21 -0
  416. package/dist/showcase/sections/MarkdownShowcase.d.ts.map +1 -0
  417. package/dist/showcase/sections/MarkdownShowcase.js +28 -0
  418. package/dist/showcase/sections/MarkdownShowcase.js.map +1 -0
  419. package/dist/showcase/sections/MediaCropShowcase.d.ts +3 -0
  420. package/dist/showcase/sections/MediaCropShowcase.d.ts.map +1 -0
  421. package/dist/showcase/sections/MediaCropShowcase.js +56 -0
  422. package/dist/showcase/sections/MediaCropShowcase.js.map +1 -0
  423. package/dist/showcase/sections/MediaShowcase.d.ts.map +1 -1
  424. package/dist/showcase/sections/MediaShowcase.js +2 -1
  425. package/dist/showcase/sections/MediaShowcase.js.map +1 -1
  426. package/dist/showcase/sections/PageAdditionsShowcase.d.ts +3 -0
  427. package/dist/showcase/sections/PageAdditionsShowcase.d.ts.map +1 -0
  428. package/dist/showcase/sections/PageAdditionsShowcase.js +7 -0
  429. package/dist/showcase/sections/PageAdditionsShowcase.js.map +1 -0
  430. package/dist/showcase/sections/PageShowcase.d.ts.map +1 -1
  431. package/dist/showcase/sections/PageShowcase.js +4 -3
  432. package/dist/showcase/sections/PageShowcase.js.map +1 -1
  433. package/dist/showcase/sections/PrimitivesAdditionsShowcase.d.ts +3 -0
  434. package/dist/showcase/sections/PrimitivesAdditionsShowcase.d.ts.map +1 -0
  435. package/dist/showcase/sections/PrimitivesAdditionsShowcase.js +20 -0
  436. package/dist/showcase/sections/PrimitivesAdditionsShowcase.js.map +1 -0
  437. package/dist/showcase/sections/PrimitivesShowcase.d.ts.map +1 -1
  438. package/dist/showcase/sections/PrimitivesShowcase.js +3 -2
  439. package/dist/showcase/sections/PrimitivesShowcase.js.map +1 -1
  440. package/dist/showcase/sections/ShellShowcase.d.ts +3 -0
  441. package/dist/showcase/sections/ShellShowcase.d.ts.map +1 -0
  442. package/dist/showcase/sections/ShellShowcase.js +71 -0
  443. package/dist/showcase/sections/ShellShowcase.js.map +1 -0
  444. package/dist/showcase/sections/TranslationsShowcase.d.ts +2 -0
  445. package/dist/showcase/sections/TranslationsShowcase.d.ts.map +1 -1
  446. package/dist/showcase/sections/TranslationsShowcase.js +5 -1
  447. package/dist/showcase/sections/TranslationsShowcase.js.map +1 -1
  448. package/dist/showcase/sections/WorkersShowcase.d.ts +3 -0
  449. package/dist/showcase/sections/WorkersShowcase.d.ts.map +1 -0
  450. package/dist/showcase/sections/WorkersShowcase.js +15 -0
  451. package/dist/showcase/sections/WorkersShowcase.js.map +1 -0
  452. package/dist/tokens.json +276 -5
  453. package/dist/translations/AppTranslationKeyDrawer.d.ts +14 -0
  454. package/dist/translations/AppTranslationKeyDrawer.d.ts.map +1 -0
  455. package/dist/translations/AppTranslationKeyDrawer.js +197 -0
  456. package/dist/translations/AppTranslationKeyDrawer.js.map +1 -0
  457. package/dist/translations/AppTranslationsScreen.d.ts +25 -0
  458. package/dist/translations/AppTranslationsScreen.d.ts.map +1 -0
  459. package/dist/translations/AppTranslationsScreen.js +139 -0
  460. package/dist/translations/AppTranslationsScreen.js.map +1 -0
  461. package/dist/translations/ConfigImportCards.d.ts +26 -0
  462. package/dist/translations/ConfigImportCards.d.ts.map +1 -0
  463. package/dist/translations/ConfigImportCards.js +59 -0
  464. package/dist/translations/ConfigImportCards.js.map +1 -0
  465. package/dist/translations/LanguagesScreen.d.ts +20 -0
  466. package/dist/translations/LanguagesScreen.d.ts.map +1 -0
  467. package/dist/translations/LanguagesScreen.js +110 -0
  468. package/dist/translations/LanguagesScreen.js.map +1 -0
  469. package/dist/translations/LocalesScreen.d.ts +22 -0
  470. package/dist/translations/LocalesScreen.d.ts.map +1 -0
  471. package/dist/translations/LocalesScreen.js +92 -0
  472. package/dist/translations/LocalesScreen.js.map +1 -0
  473. package/dist/translations/TranslatableField.d.ts +13 -2
  474. package/dist/translations/TranslatableField.d.ts.map +1 -1
  475. package/dist/translations/TranslatableField.js +23 -5
  476. package/dist/translations/TranslatableField.js.map +1 -1
  477. package/dist/translations/TranslatableInput.d.ts.map +1 -1
  478. package/dist/translations/TranslatableInput.js +4 -1
  479. package/dist/translations/TranslatableInput.js.map +1 -1
  480. package/dist/translations/TranslatableMarkdown.d.ts +2 -0
  481. package/dist/translations/TranslatableMarkdown.d.ts.map +1 -1
  482. package/dist/translations/TranslatableMarkdown.js +12 -7
  483. package/dist/translations/TranslatableMarkdown.js.map +1 -1
  484. package/dist/translations/TranslationCompleteness.d.ts +11 -0
  485. package/dist/translations/TranslationCompleteness.d.ts.map +1 -0
  486. package/dist/translations/TranslationCompleteness.js +73 -0
  487. package/dist/translations/TranslationCompleteness.js.map +1 -0
  488. package/dist/translations/adminFormat.d.ts +27 -0
  489. package/dist/translations/adminFormat.d.ts.map +1 -0
  490. package/dist/translations/adminFormat.js +39 -0
  491. package/dist/translations/adminFormat.js.map +1 -0
  492. package/dist/translations/adminTypes.d.ts +136 -0
  493. package/dist/translations/adminTypes.d.ts.map +1 -0
  494. package/dist/translations/adminTypes.js +9 -0
  495. package/dist/translations/adminTypes.js.map +1 -0
  496. package/dist/translations/api.d.ts +225 -0
  497. package/dist/translations/api.d.ts.map +1 -0
  498. package/dist/translations/api.js +132 -0
  499. package/dist/translations/api.js.map +1 -0
  500. package/dist/translations/focusOverLimit.d.ts +7 -0
  501. package/dist/translations/focusOverLimit.d.ts.map +1 -0
  502. package/dist/translations/focusOverLimit.js +23 -0
  503. package/dist/translations/focusOverLimit.js.map +1 -0
  504. package/dist/translations/index.d.ts +22 -0
  505. package/dist/translations/index.d.ts.map +1 -1
  506. package/dist/translations/index.js +13 -0
  507. package/dist/translations/index.js.map +1 -1
  508. package/dist/translations/useContentLocales.d.ts +17 -0
  509. package/dist/translations/useContentLocales.d.ts.map +1 -0
  510. package/dist/translations/useContentLocales.js +33 -0
  511. package/dist/translations/useContentLocales.js.map +1 -0
  512. package/dist/translations/useEntityTranslator.d.ts +34 -0
  513. package/dist/translations/useEntityTranslator.d.ts.map +1 -0
  514. package/dist/translations/useEntityTranslator.js +49 -0
  515. package/dist/translations/useEntityTranslator.js.map +1 -0
  516. package/dist/workers/WorkerRestartButton.d.ts +19 -0
  517. package/dist/workers/WorkerRestartButton.d.ts.map +1 -0
  518. package/dist/workers/WorkerRestartButton.js +59 -0
  519. package/dist/workers/WorkerRestartButton.js.map +1 -0
  520. package/dist/workers/WorkerTransportScreen.d.ts +24 -0
  521. package/dist/workers/WorkerTransportScreen.d.ts.map +1 -0
  522. package/dist/workers/WorkerTransportScreen.js +121 -0
  523. package/dist/workers/WorkerTransportScreen.js.map +1 -0
  524. package/dist/workers/WorkersOverviewScreen.d.ts +30 -0
  525. package/dist/workers/WorkersOverviewScreen.d.ts.map +1 -0
  526. package/dist/workers/WorkersOverviewScreen.js +61 -0
  527. package/dist/workers/WorkersOverviewScreen.js.map +1 -0
  528. package/dist/workers/api.d.ts +113 -0
  529. package/dist/workers/api.d.ts.map +1 -0
  530. package/dist/workers/api.js +73 -0
  531. package/dist/workers/api.js.map +1 -0
  532. package/dist/workers/charts.d.ts +94 -0
  533. package/dist/workers/charts.d.ts.map +1 -0
  534. package/dist/workers/charts.js +238 -0
  535. package/dist/workers/charts.js.map +1 -0
  536. package/dist/workers/format.d.ts +96 -0
  537. package/dist/workers/format.d.ts.map +1 -0
  538. package/dist/workers/format.js +231 -0
  539. package/dist/workers/format.js.map +1 -0
  540. package/dist/workers/history.d.ts +20 -0
  541. package/dist/workers/history.d.ts.map +1 -0
  542. package/dist/workers/history.js +84 -0
  543. package/dist/workers/history.js.map +1 -0
  544. package/dist/workers/index.d.ts +24 -0
  545. package/dist/workers/index.d.ts.map +1 -0
  546. package/dist/workers/index.js +19 -0
  547. package/dist/workers/index.js.map +1 -0
  548. package/dist/workers/overview.d.ts +72 -0
  549. package/dist/workers/overview.d.ts.map +1 -0
  550. package/dist/workers/overview.js +323 -0
  551. package/dist/workers/overview.js.map +1 -0
  552. package/dist/workers/status.d.ts +11 -0
  553. package/dist/workers/status.d.ts.map +1 -0
  554. package/dist/workers/status.js +106 -0
  555. package/dist/workers/status.js.map +1 -0
  556. package/dist/workers/transport.d.ts +78 -0
  557. package/dist/workers/transport.d.ts.map +1 -0
  558. package/dist/workers/transport.js +407 -0
  559. package/dist/workers/transport.js.map +1 -0
  560. package/dist/workers/types.d.ts +234 -0
  561. package/dist/workers/types.d.ts.map +1 -0
  562. package/dist/workers/types.js +8 -0
  563. package/dist/workers/types.js.map +1 -0
  564. package/dist/workers/useWorkersWindow.d.ts +12 -0
  565. package/dist/workers/useWorkersWindow.d.ts.map +1 -0
  566. package/dist/workers/useWorkersWindow.js +38 -0
  567. package/dist/workers/useWorkersWindow.js.map +1 -0
  568. package/dist/workers/window.d.ts +30 -0
  569. package/dist/workers/window.d.ts.map +1 -0
  570. package/dist/workers/window.js +39 -0
  571. package/dist/workers/window.js.map +1 -0
  572. package/package.json +39 -4
@@ -0,0 +1,231 @@
1
+ import { parseDddDateTimeMs } from '@mgamadeus/ddd-web/contract';
2
+ import { m, translateText } from "../i18n/store.js";
3
+ import { uiDateTimeFormat, uiNumberFormat } from "../i18n/format.js";
4
+ const EMPTY_POINTS = [];
5
+ /** The points of one named sequence; none when the payload lacks it. */
6
+ export const sequencePoints = (sequences, name) => sequences?.elements?.find(sequence => sequence.name === name)?.elements ?? EMPTY_POINTS;
7
+ /** A sequence point's time (ISO 8601 with `Z`, or a DDD date-time) in ms; null when it cannot be read. */
8
+ const pointMs = (value) => {
9
+ if (!value)
10
+ return null;
11
+ const iso = Date.parse(value);
12
+ return Number.isNaN(iso) ? parseDddDateTimeMs(value) : iso;
13
+ };
14
+ /** Zips named series (every sequence of one response shares its steps) into rows keyed by the step's start. */
15
+ export const zipSeries = (series) => {
16
+ const rows = new Map();
17
+ for (const [key, points] of Object.entries(series)) {
18
+ for (const point of points) {
19
+ const ms = pointMs(point.x);
20
+ if (ms === null)
21
+ continue;
22
+ const row = rows.get(ms) ?? { ms };
23
+ row[key] = point.y ?? null;
24
+ rows.set(ms, row);
25
+ }
26
+ }
27
+ return [...rows.values()].sort((left, right) => left.ms - right.ms);
28
+ };
29
+ export const sumOf = (points) => points.reduce((total, point) => total + (point.y ?? 0), 0);
30
+ export const maxOf = (points) => points.reduce((highest, point) => Math.max(highest, point.y ?? 0), 0);
31
+ /** Whether any row has a positive value under one of the keys. */
32
+ export const hasAnyValue = (rows, keys) => rows.some(row => keys.some(key => (row[key] ?? 0) > 0));
33
+ /** `handled` includes the failed messages: succeeded = handled − failed, so stacked bars add up to handled. */
34
+ export const succeededPoints = (handled, failed) => handled.map((point, index) => ({
35
+ x: point.x,
36
+ y: point.y === null || point.y === undefined ? null : Math.max(point.y - (failed[index]?.y ?? 0), 0),
37
+ }));
38
+ /** A count in the UI locale; `—` without a value. */
39
+ export const formatCount = (value) => value === null || value === undefined ? '—' : uiNumberFormat().format(value);
40
+ /** `850 ms`, `4.2 s`, `1 min 46 s`, `2 h 5 min`; `—` without a value. */
41
+ export const formatDurationMs = (value) => {
42
+ if (value === null || value === undefined)
43
+ return '—';
44
+ if (value < 1000)
45
+ return `${Math.round(value)} ms`;
46
+ const seconds = value / 1000;
47
+ if (seconds < 60)
48
+ return `${seconds < 10 ? seconds.toFixed(1) : Math.round(seconds)} s`;
49
+ const minutes = Math.floor(seconds / 60);
50
+ if (minutes < 60) {
51
+ const rest = Math.round(seconds - minutes * 60);
52
+ return rest > 0 ? `${minutes} min ${rest} s` : `${minutes} min`;
53
+ }
54
+ const hours = Math.floor(minutes / 60);
55
+ const restMinutes = minutes - hours * 60;
56
+ return restMinutes > 0 ? `${hours} h ${restMinutes} min` : `${hours} h`;
57
+ };
58
+ /** A compact axis label for milliseconds (`850ms`, `4s`, `1.5m`, `2h`). */
59
+ export const formatDurationTick = (value) => {
60
+ const compact = (amount) => (amount < 10 && !Number.isInteger(amount) ? amount.toFixed(1) : String(Math.round(amount)));
61
+ if (value < 1000)
62
+ return `${Math.round(value)}ms`;
63
+ if (value < 60_000 || (value < 120_000 && value % 60_000 !== 0))
64
+ return `${compact(value / 1000)}s`;
65
+ if (value < 3_600_000)
66
+ return `${compact(Math.round(value / 6000) / 10)}m`;
67
+ return `${compact(Math.round(value / 360_000) / 10)}h`;
68
+ };
69
+ /** `63 MB` (binary megabytes, as PHP reports memory); `—` without a value. */
70
+ export const formatBytes = (value) => {
71
+ if (value === null || value === undefined)
72
+ return '—';
73
+ const megabytes = value / (1024 * 1024);
74
+ return `${megabytes < 10 ? megabytes.toFixed(1) : Math.round(megabytes)} MB`;
75
+ };
76
+ /** The pod part that tells replicas apart (`worker-x-769459868d-dg82v` → `769459868d-dg82v`). */
77
+ export const shortHost = (hostName) => hostName ? hostName.split('-').slice(-2).join('-') : translateText('unknown host');
78
+ /** The class name without its namespace. */
79
+ export const shortClassName = (className) => className ? (className.split('\\').pop() ?? className) : '';
80
+ const ONE_DAY_MS = 24 * 60 * 60 * 1000;
81
+ const tickTimeFormat = () => uiDateTimeFormat({ hour: '2-digit', minute: '2-digit' });
82
+ const tickDayFormat = () => uiDateTimeFormat({ month: 'short', day: 'numeric' });
83
+ const tickDayTimeFormat = () => uiDateTimeFormat({ month: 'short', day: 'numeric', hour: '2-digit', minute: '2-digit' });
84
+ /** Axis tick of a step: the time of day up to a day's window, the date beyond. */
85
+ export const formatBucketTick = (ms, windowMs) => (windowMs <= ONE_DAY_MS ? tickTimeFormat() : tickDayFormat()).format(new Date(ms));
86
+ /** A step in a tooltip: its start and end (`Nov 10, 16:35 – 16:40`). */
87
+ export const formatBucketRange = (ms, stepSeconds) => `${tickDayTimeFormat().format(new Date(ms))} – ${tickTimeFormat().format(new Date(ms + stepSeconds * 1000))}`;
88
+ /** A date-time of the backend (entity `Y-m-d H:i:s` UTC or ISO 8601) in ms; null when absent or unreadable. */
89
+ export const parseWorkersTime = (value) => value && /[TZ+]/.test(value.slice(10)) ? pointMs(value) : parseDddDateTimeMs(value);
90
+ /** A backend date-time as a clock time with seconds (`4:43:35 PM`); null when absent. */
91
+ export const formatClockTime = (value) => {
92
+ const ms = parseWorkersTime(value);
93
+ return ms === null ? null : uiDateTimeFormat({ timeStyle: 'medium' }).format(new Date(ms));
94
+ };
95
+ /** Transport states, most urgent first (the table's order). */
96
+ export const TRANSPORT_STATE_ORDER = ['NOT_CONSUMED', 'STUCK', 'UNDEFINED', 'BACKLOG', 'WORKING', 'IDLE'];
97
+ /** States that need someone to look. */
98
+ export const isAttentionState = (state) => state === 'NOT_CONSUMED' || state === 'STUCK' || state === 'UNDEFINED' || state === 'BACKLOG';
99
+ const stateRank = (state) => {
100
+ const index = TRANSPORT_STATE_ORDER.indexOf(state ?? '');
101
+ return index === -1 ? TRANSPORT_STATE_ORDER.length : index;
102
+ };
103
+ /** By state severity, then the busier transport (processes, waiting), then the name. */
104
+ export const sortTransports = (transports) => [...transports].sort((left, right) => stateRank(left.state) - stateRank(right.state) ||
105
+ (right.liveProcessCount ?? 0) - (left.liveProcessCount ?? 0) ||
106
+ (right.waiting ?? 0) - (left.waiting ?? 0) ||
107
+ (left.transport ?? '').localeCompare(right.transport ?? ''));
108
+ /** The English label of a queue that could not be counted (`waiting` null is "unknown", never 0); translate it. */
109
+ export const waitingStateLabel = (waitingState) => {
110
+ if (waitingState === 'QUEUE_NOT_SET_UP')
111
+ return m('Queue not set up');
112
+ if (waitingState === 'UNKNOWN')
113
+ return m('Unknown', { context: 'queue-count-state' });
114
+ return m('Not counted');
115
+ };
116
+ /** The context of `waitingStateLabel`'s texts, for `t(label, …)`. */
117
+ export const waitingStateContext = (waitingState) => waitingState === 'UNKNOWN' ? { context: 'queue-count-state' } : undefined;
118
+ /** The inferred stop reason in words ("probably …": Messenger stops without telling why). */
119
+ export const STOP_REASON_LABELS = {
120
+ MESSAGE_LIMIT: m('Probably message limit'),
121
+ TIME_LIMIT: m('Probably time limit'),
122
+ MEMORY_LIMIT: m('Probably memory limit'),
123
+ FAILURE_LIMIT: m('Probably failure limit'),
124
+ RESTART_REQUESTED: m('Restart requested'),
125
+ SIGNAL: m('Received a signal'),
126
+ OTHER: m('Other', { context: 'stop-reason' }),
127
+ LOST: m('Lost (no stop reported)'),
128
+ };
129
+ /** The translated stop reason; null without one. */
130
+ export const stopReasonLabel = (stopReason) => {
131
+ if (!stopReason)
132
+ return null;
133
+ const label = STOP_REASON_LABELS[stopReason];
134
+ if (!label)
135
+ return stopReason;
136
+ return translateText(label, stopReason === 'OTHER' ? { context: 'stop-reason' } : undefined);
137
+ };
138
+ /** Where a message was dispatched from: the route of the request or the console command. */
139
+ export const dispatchOrigin = (run) => run.dispatchedFromRoute ?? run.dispatchedFromCommand ?? null;
140
+ /** The window of `windowSeconds` out of the throughput windows (300 / 900 / 3600 / 86400 s). */
141
+ export const throughputWindowOf = (windows, windowSeconds) => {
142
+ const found = windows?.elements?.find(entry => entry.windowSeconds === windowSeconds);
143
+ return {
144
+ handled: found?.handledCount ?? 0,
145
+ failed: found?.failedCount ?? 0,
146
+ minutes: windowSeconds / 60,
147
+ workerMinutes: (found?.workerSeconds ?? 0) / 60,
148
+ };
149
+ };
150
+ /** Messages one worker finished per minute it ran; null when no worker ran in the window. */
151
+ export const perWorkerMinute = (count) => count.workerMinutes > 0 ? count.handled / count.workerMinutes : null;
152
+ /** Milliseconds until the queue is empty at the rate of a window; null when nothing finished in it. */
153
+ export const drainMs = (waiting, window) => {
154
+ const perMinute = window.handled / window.minutes;
155
+ return perMinute > 0 ? (waiting / perMinute) * 60_000 : null;
156
+ };
157
+ /** Named categorical slots of the per-transport charts before the rest folds into "Other". */
158
+ export const NAMED_TRANSPORT_SLOTS = 7;
159
+ /**
160
+ * The categorical colours of the per-transport charts: the colour roles of the host contract (`tokens.json`), so a
161
+ * host's theme applies; "Other" is the input role.
162
+ */
163
+ export const TRANSPORT_SERIES_COLORS = [
164
+ 'var(--primary)',
165
+ 'var(--info)',
166
+ 'var(--warning)',
167
+ 'var(--success)',
168
+ 'var(--brand)',
169
+ 'var(--muted-foreground)',
170
+ 'var(--brand-emphasis)',
171
+ ];
172
+ export const OTHER_SERIES_COLOR = 'var(--input)';
173
+ const sumPoints = (pointLists) => (pointLists[0] ?? []).map((point, index) => ({
174
+ x: point.x,
175
+ y: pointLists.reduce((total, points) => total + (points[index]?.y ?? 0), 0),
176
+ }));
177
+ /**
178
+ * The transports with any activity in the window, the busiest first (peak processes), the first seven by name and
179
+ * colour, the rest summed into one "Other" entry (labelled by `otherLabel(count)`). A transport keeps its colour across
180
+ * the charts of one window.
181
+ */
182
+ export const rankTransports = (histories, otherLabel) => {
183
+ const ranked = histories
184
+ .map(history => ({
185
+ transport: history.transport ?? '',
186
+ processes: sequencePoints(history.sequences, 'processes'),
187
+ processStarts: sequencePoints(history.sequences, 'processStarts'),
188
+ waiting: sequencePoints(history.sequences, 'waiting'),
189
+ handled: sequencePoints(history.sequences, 'handled'),
190
+ }))
191
+ .map(entry => ({ ...entry, peak: maxOf(entry.processes) }))
192
+ .filter(entry => entry.peak > 0 || maxOf(entry.processStarts) > 0 || maxOf(entry.waiting) > 0 || maxOf(entry.handled) > 0)
193
+ .sort((left, right) => right.peak - left.peak || left.transport.localeCompare(right.transport));
194
+ const folds = ranked.length > NAMED_TRANSPORT_SLOTS + 1;
195
+ const named = folds ? ranked.slice(0, NAMED_TRANSPORT_SLOTS) : ranked;
196
+ const rest = folds ? ranked.slice(NAMED_TRANSPORT_SLOTS) : [];
197
+ const result = named.map((entry, index) => ({
198
+ key: `s${index}`,
199
+ label: entry.transport,
200
+ color: TRANSPORT_SERIES_COLORS[index % TRANSPORT_SERIES_COLORS.length] ?? OTHER_SERIES_COLOR,
201
+ processes: entry.processes,
202
+ processStarts: entry.processStarts,
203
+ waiting: entry.waiting,
204
+ handled: entry.handled,
205
+ }));
206
+ if (rest.length > 0) {
207
+ result.push({
208
+ key: 'other',
209
+ label: otherLabel(rest.length),
210
+ color: OTHER_SERIES_COLOR,
211
+ processes: sumPoints(rest.map(entry => entry.processes)),
212
+ processStarts: sumPoints(rest.map(entry => entry.processStarts)),
213
+ waiting: sumPoints(rest.map(entry => entry.waiting)),
214
+ handled: sumPoints(rest.map(entry => entry.handled)),
215
+ });
216
+ }
217
+ return result;
218
+ };
219
+ /** A maximum that dwarfs the typical average (20×) wants a logarithmic axis, else the average is a flat line. */
220
+ export const wantsLogScale = (rows, averageKey, maximumKey) => {
221
+ const averages = rows
222
+ .map(row => row[averageKey])
223
+ .filter((value) => value !== null && value !== undefined && value > 0)
224
+ .sort((left, right) => left - right);
225
+ if (averages.length === 0)
226
+ return false;
227
+ const median = averages[Math.floor(averages.length / 2)] ?? 0;
228
+ const highest = rows.reduce((top, row) => Math.max(top, row[maximumKey] ?? 0), 0);
229
+ return highest > median * 20;
230
+ };
231
+ //# sourceMappingURL=format.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format.js","sourceRoot":"","sources":["../../src/workers/format.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEjE,OAAO,EAAE,CAAC,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAWrE,MAAM,YAAY,GAAoB,EAAE,CAAC;AAEzC,wEAAwE;AACxE,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,SAA6C,EAAE,IAAwB,EAAmB,EAAE,CACzH,SAAS,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,KAAK,IAAI,CAAC,EAAE,QAAQ,IAAI,YAAY,CAAC;AAK1F,0GAA0G;AAC1G,MAAM,OAAO,GAAG,CAAC,KAAgC,EAAiB,EAAE;IAClE,IAAI,CAAC,KAAK;QAAE,O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KAAK,CAAC,OAAO,CAAC,CAAC;YACpD,OAAO,EAAE,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;SACrD,CAAC,CAAC;IACL,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF,iHAAiH;AACjH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,IAAyB,EAAE,UAAkB,EAAE,UAAkB,EAAW,EAAE;IAC1G,MAAM,QAAQ,GAAG,IAAI;SAClB,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;SAC3B,MAAM,CAAC,CAAC,KAAK,EAAmB,EAAE,CAAC,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,GAAG,CAAC,CAAC;SACtF,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC;IACvC,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IACxC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAC9D,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAClF,OAAO,OAAO,GAAG,MAAM,GAAG,EAAE,CAAC;AAC/B,CAAC,CAAC"}
@@ -0,0 +1,20 @@
1
+ import type { WorkersApi } from './api.js';
2
+ import { type WorkersWindow, type WorkersWindowPreset } from './window.js';
3
+ export interface WorkersWindowSwitchProps {
4
+ value: WorkersWindowPreset;
5
+ onChange: (preset: WorkersWindowPreset) => void;
6
+ }
7
+ /** The window of the workers charts (1 hour to 14 days). A change loads the charts again: arrows move, Enter selects. */
8
+ export declare const WorkersWindowSwitch: ({ value, onChange }: WorkersWindowSwitchProps) => import("react").JSX.Element;
9
+ export interface WorkersHistoryChartsProps {
10
+ api: WorkersApi;
11
+ /** The window (`useWorkersWindow`): it slides every minute while the tab is visible, which refreshes the history. */
12
+ window: WorkersWindow;
13
+ }
14
+ /**
15
+ * The history of every transport over the window (`GET /history`): how many workers of which kind ran when (stacked
16
+ * processes per transport, process starts below on the same time axis), messages waiting and finished per transport,
17
+ * and the queue and throughput of every transport together (the backend's totals, never a client sum).
18
+ */
19
+ export declare const WorkersHistoryCharts: ({ api, window: workersWindow }: WorkersHistoryChartsProps) => import("react").JSX.Element;
20
+ //# sourceMappingURL=history.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../../src/workers/history.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAG3C,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,mBAAmB,EAAwB,MAAM,aAAa,CAAC;AAEjG,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,mBAAmB,CAAC;IAC3B,QAAQ,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAC;CACjD;AAED,yHAAyH;AACzH,eAAO,MAAM,mBAAmB,GAAI,qBAAqB,wBAAwB,gCAYhF,CAAC;AAEF,MAAM,WAAW,yBAAyB;IACxC,GAAG,EAAE,UAAU,CAAC;IAChB,qHAAqH;IACrH,MAAM,EAAE,aAAa,CAAC;CACvB;AAED;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAAI,gCAAgC,yBAAyB,gCAkI7F,CAAC"}
@@ -0,0 +1,84 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useMemo } from 'react';
4
+ import { m } from "../i18n/store.js";
5
+ import { useTranslate } from "../i18n/useTranslate.js";
6
+ import { CardGrid } from "../page/PageLayout.js";
7
+ import { StatusCallout } from "../page/StatusCallout.js";
8
+ import { SegmentedControl } from "../primitives/segmented-control.js";
9
+ import { ChartBody, WorkerChartCard, WorkerTimeChart } from "./charts.js";
10
+ import { hasAnyValue, rankTransports, sequencePoints, succeededPoints, sumOf, zipSeries } from "./format.js";
11
+ import { workersWindowOptions } from "./window.js";
12
+ /** The window of the workers charts (1 hour to 14 days). A change loads the charts again: arrows move, Enter selects. */
13
+ export const WorkersWindowSwitch = ({ value, onChange }) => {
14
+ const { t } = useTranslate();
15
+ return (_jsx(SegmentedControl, { "aria-label": m('Time window'), activation: "manual", value: value, onValueChange: onChange,
16
+ // counted labels ("6 hours") are translated here
17
+ options: workersWindowOptions(t).map(option => ({ ...option, translate: false })) }));
18
+ };
19
+ /**
20
+ * The history of every transport over the window (`GET /history`): how many workers of which kind ran when (stacked
21
+ * processes per transport, process starts below on the same time axis), messages waiting and finished per transport,
22
+ * and the queue and throughput of every transport together (the backend's totals, never a client sum).
23
+ */
24
+ export const WorkersHistoryCharts = ({ api, window: workersWindow }) => {
25
+ const { t } = useTranslate();
26
+ const query = api.useHistoryQuery({ from: workersWindow.from, to: workersWindow.to, stepSeconds: workersWindow.stepSeconds });
27
+ // keep the previous window drawn while the next one loads
28
+ const history = query.currentData?.workersHistory ?? query.data?.workersHistory;
29
+ const stepSeconds = history?.stepSeconds ?? workersWindow.stepSeconds;
30
+ const isRefreshing = query.isFetching && !query.isLoading;
31
+ const charts = useMemo(() => {
32
+ const ranked = rankTransports(history?.transports?.elements ?? [], count => t('Other (%count%)', { replacements: { count } }));
33
+ const legend = ranked.map(entry => ({ key: entry.key, label: entry.label, color: entry.color }));
34
+ const stacked = (stackId, kind) => ranked.map(entry => ({ key: entry.key, label: entry.label, color: entry.color, kind, stackId, curve: 'step' }));
35
+ const rowsOf = (pick) => zipSeries(Object.fromEntries(ranked.map(entry => [entry.key, pick(entry)])));
36
+ const totals = history?.totals?.sequences;
37
+ const handled = sequencePoints(totals, 'handled');
38
+ const failed = sequencePoints(totals, 'failed');
39
+ const workerRows = rowsOf(entry => entry.processes);
40
+ return {
41
+ ranked,
42
+ legend,
43
+ workerRows,
44
+ workerSeries: stacked('workers', 'area'),
45
+ startRows: rowsOf(entry => entry.processStarts),
46
+ startSeries: stacked('starts', 'bar'),
47
+ waitingRows: rowsOf(entry => entry.waiting),
48
+ waitingSeries: stacked('waiting', 'area'),
49
+ handledRows: rowsOf(entry => entry.handled),
50
+ handledSeries: stacked('handled', 'bar'),
51
+ queueRows: zipSeries({ waiting: sequencePoints(totals, 'waiting'), inFlight: sequencePoints(totals, 'inFlight') }),
52
+ throughputRows: zipSeries({ succeeded: succeededPoints(handled, failed), failed }),
53
+ totalStarts: sumOf(sequencePoints(totals, 'processStarts')),
54
+ peakTotal: Math.max(0, ...sequencePoints(totals, 'processes').map(point => point.y ?? 0)),
55
+ };
56
+ }, [history, t]);
57
+ if (query.isError && !history) {
58
+ return _jsx(StatusCallout, { tone: "destructive", title: t('The worker history could not be loaded.') });
59
+ }
60
+ const keys = charts.ranked.map(entry => entry.key);
61
+ const common = { windowMs: workersWindow.windowMs, stepSeconds };
62
+ const waitingLabel = t('Waiting', { context: 'chart-series' });
63
+ const inWorkLabel = t('In work', { context: 'chart-series' });
64
+ const succeededLabel = t('Succeeded', { context: 'chart-series' });
65
+ const failedLabel = t('Failed', { context: 'chart-series' });
66
+ return (_jsxs("div", { className: "space-y-4", children: [_jsxs(WorkerChartCard, { title: t('Workers over time'), description: history
67
+ ? t('Live processes per transport; at most %peak% at once. A process counts from the moment its worker registers: container start and image pull are not visible.', {
68
+ replacements: { peak: charts.peakTotal },
69
+ })
70
+ : t('Live processes per transport.'), legend: charts.legend, children: [_jsx(ChartBody, { height: 240, isLoading: !history, isEmpty: !hasAnyValue(charts.workerRows, keys), emptyMessage: t('No worker process ran in this window'), isRefreshing: isRefreshing, children: _jsx(WorkerTimeChart, { rows: charts.workerRows, series: charts.workerSeries, height: 240, showTotal: true, ariaLabel: t('Live worker processes per transport over the window'), ...common }) }), _jsxs("div", { className: "space-y-1.5 border-t pt-3", children: [_jsx("p", { className: "text-xs text-muted-foreground", children: t('{count, plural, one {# process start in this window, per transport} other {# process starts in this window, per transport}}', { count: charts.totalStarts }) }), _jsx(ChartBody, { height: 110, isLoading: !history, isEmpty: !hasAnyValue(charts.startRows, keys), emptyMessage: t('No process started in this window'), isRefreshing: isRefreshing, children: _jsx(WorkerTimeChart, { rows: charts.startRows, series: charts.startSeries, height: 110, showTotal: true, ariaLabel: t('Worker process starts per transport over the window'), ...common }) })] })] }), _jsxs(CardGrid, { children: [_jsx(WorkerChartCard, { title: t('Messages waiting per transport'), description: t('The queue of every transport, stacked (highest sample per step).'), legend: charts.legend, children: _jsx(ChartBody, { height: 200, isLoading: !history, isEmpty: !hasAnyValue(charts.waitingRows, keys), emptyMessage: t('No message waited in this window'), isRefreshing: isRefreshing, children: _jsx(WorkerTimeChart, { rows: charts.waitingRows, series: charts.waitingSeries, height: 200, showTotal: true, ariaLabel: t('Messages waiting per transport over the window'), ...common }) }) }), _jsx(WorkerChartCard, { title: t('Messages finished per transport'), description: t('Finished messages per step and transport, failed ones included.'), legend: charts.legend, children: _jsx(ChartBody, { height: 200, isLoading: !history, isEmpty: !hasAnyValue(charts.handledRows, keys), emptyMessage: t('No message finished in this window'), isRefreshing: isRefreshing, children: _jsx(WorkerTimeChart, { rows: charts.handledRows, series: charts.handledSeries, height: 200, showTotal: true, ariaLabel: t('Finished messages per transport over the window'), ...common }) }) }), _jsx(WorkerChartCard, { title: t('Queue, all transports'), description: t('Messages waiting and in work, every transport together (highest sample per step).'), legend: [
71
+ { key: 'waiting', label: waitingLabel, color: 'var(--warning)' },
72
+ { key: 'inFlight', label: inWorkLabel, color: 'var(--primary)', shape: 'line' },
73
+ ], children: _jsx(ChartBody, { height: 200, isLoading: !history, isEmpty: !hasAnyValue(charts.queueRows, ['waiting', 'inFlight']), emptyMessage: t('No message waited or was in work'), isRefreshing: isRefreshing, children: _jsx(WorkerTimeChart, { rows: charts.queueRows, series: [
74
+ { key: 'waiting', label: waitingLabel, color: 'var(--warning)', kind: 'area', curve: 'step' },
75
+ { key: 'inFlight', label: inWorkLabel, color: 'var(--primary)', kind: 'line', curve: 'step' },
76
+ ], height: 200, ariaLabel: t('Messages waiting and in work over the window'), ...common }) }) }), _jsx(WorkerChartCard, { title: t('Throughput, all transports'), description: t('Finished messages per step, every transport together.'), legend: [
77
+ { key: 'succeeded', label: succeededLabel, color: 'var(--success)' },
78
+ { key: 'failed', label: failedLabel, color: 'var(--destructive)' },
79
+ ], children: _jsx(ChartBody, { height: 200, isLoading: !history, isEmpty: !hasAnyValue(charts.throughputRows, ['succeeded', 'failed']), emptyMessage: t('No message finished in this window'), isRefreshing: isRefreshing, children: _jsx(WorkerTimeChart, { rows: charts.throughputRows, series: [
80
+ { key: 'succeeded', label: succeededLabel, color: 'var(--success)', kind: 'bar', stackId: 'throughput' },
81
+ { key: 'failed', label: failedLabel, color: 'var(--destructive)', kind: 'bar', stackId: 'throughput' },
82
+ ], height: 200, showTotal: true, ariaLabel: t('Succeeded and failed messages over the window'), ...common }) }) })] })] }));
83
+ };
84
+ //# sourceMappingURL=history.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"history.js","sourceRoot":"","sources":["../../src/workers/history.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAE,CAAC,EAAE,MAAM,kBAAkB,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAwB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA2B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAqC,CAAC;AAEvE,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EAAE,YAAY,EAAE;oCACxG,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,oBAAoB,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE;iCACvG,EACD,MAAM,EAAE,GAAG,EACX,SAAS,QACT,SAAS,EAAE,CAAC,CAAC,+CAA+C,CAAC,KACzD,MAAM,GACV,GACQ,GACI,IACT,IACP,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,24 @@
1
+ export { buildWorkersRequests, createStaticWorkersApi, createWorkersApi, WORKERS_TAG, workersEndpointDefinitions } from './api.js';
2
+ export type { CreateWorkersApiOptions, StaticWorkersData, WorkersApi } from './api.js';
3
+ export type * from './types.js';
4
+ export { WorkersOverviewScreen } from './WorkersOverviewScreen.js';
5
+ export type { WorkersOverviewScreenProps } from './WorkersOverviewScreen.js';
6
+ export { WorkerTransportScreen } from './WorkerTransportScreen.js';
7
+ export type { WorkerTransportScreenProps } from './WorkerTransportScreen.js';
8
+ export { WorkerKpiTiles, WorkerKpiTilesSkeleton, WorkerLoopsCard, WorkerProcessRange, WorkersLivePanel, WorkersThroughputTable, WorkerTransportsTable, } from './overview.js';
9
+ export type { WorkerProcessRangeProps, WorkersLivePanelProps, WorkersThroughputTableProps, WorkerTransportHref, WorkerTransportsTableProps, WorkerTransportTab, } from './overview.js';
10
+ export { WorkersHistoryCharts, WorkersWindowSwitch } from './history.js';
11
+ export type { WorkersHistoryChartsProps, WorkersWindowSwitchProps } from './history.js';
12
+ export { toWorkerProcessFilter, toWorkerRunOutcomeFilter, WORKER_PROCESS_FILTERS, WORKER_RUN_OUTCOME_FILTERS, WorkerMessageClassesTable, WorkerMessageRunsTab, WorkerProcessesTab, WorkerProcessesTable, WorkerProcessTimeline, workerProcessFilterString, workerRunOutcomeFilterString, WorkerTransportCharts, } from './transport.js';
13
+ export type { WorkerMessageRunsTabProps, WorkerProcessesTableProps, WorkerProcessesTabProps, WorkerProcessFilter, WorkerRunOutcomeFilter, WorkerTransportChartsProps, } from './transport.js';
14
+ export { WorkerRestartButton } from './WorkerRestartButton.js';
15
+ export type { WorkerRestartButtonProps } from './WorkerRestartButton.js';
16
+ export { ChartBody, ChartLegend, niceTicks, WorkerChartCard, WorkerSparkline, WorkerTimeChart } from './charts.js';
17
+ export type { ChartBodyProps, ChartLegendItem, WorkerChartCardProps, WorkerChartReferenceLine, WorkerChartSeries, WorkerSparklineProps, WorkerTimeChartProps, } from './charts.js';
18
+ export { toWorkerMessageOutcome, toWorkerProcessState, toWorkerTransportState, WORKER_MESSAGE_OUTCOME, WORKER_PROCESS_STATE, WORKER_TRANSPORT_STATE, } from './status.js';
19
+ export { dispatchOrigin, drainMs, formatBytes, formatClockTime, formatCount, formatDurationMs, formatDurationTick, isAttentionState, parseWorkersTime, perWorkerMinute, rankTransports, sequencePoints, shortClassName, shortHost, sortTransports, stopReasonLabel, succeededPoints, throughputWindowOf, TRANSPORT_STATE_ORDER, zipSeries, } from './format.js';
20
+ export type { ChartRow, RankedTransport, WorkersWindowCount } from './format.js';
21
+ export { DEFAULT_WORKERS_WINDOW, resolveWorkersWindow, toWorkersWindowPreset, WORKERS_HISTORY_POLL_MS, WORKERS_LIST_POLL_MS, WORKERS_OVERVIEW_POLL_MS, WORKERS_WINDOW_PRESETS, } from './window.js';
22
+ export type { WorkersWindow, WorkersWindowPreset } from './window.js';
23
+ export { usePageVisible, useRefreshWhileVisible, useWorkersWindow } from './useWorkersWindow.js';
24
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/workers/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,WAAW,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAC;AACnI,YAAY,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;A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pB,wBAAwB,EACxB,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,EACtB,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,cAAc,EACd,OAAO,EACP,WAAW,EACX,eAAe,EACf,WAAW,EACX,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,cAAc,EACd,cAAc,EACd,SAAS,EACT,cAAc,EACd,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,qBAAqB,EACrB,SAAS,GACV,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,QAAQ,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjF,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,qBAAqB,EACrB,uBAAuB,EACvB,oBAAoB,EACpB,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,19 @@
1
+ // The workers entry: the screens of Core's worker monitoring (`WorkersControllerTrait`) on the host's RTK Query api
2
+ // (`createWorkersApi`), their parts, the payload types, the status maps and the pure helpers. Charts are SVG, no peer.
3
+ // API
4
+ export { buildWorkersRequests, createStaticWorkersApi, createWorkersApi, WORKERS_TAG, workersEndpointDefinitions } from "./api.js";
5
+ // Screens
6
+ export { WorkersOverviewScreen } from "./WorkersOverviewScreen.js";
7
+ export { WorkerTransportScreen } from "./WorkerTransportScreen.js";
8
+ // Parts
9
+ export { WorkerKpiTiles, WorkerKpiTilesSkeleton, WorkerLoopsCard, WorkerProcessRange, WorkersLivePanel, WorkersThroughputTable, WorkerTransportsTable, } from "./overview.js";
10
+ export { WorkersHistoryCharts, WorkersWindowSwitch } from "./history.js";
11
+ export { toWorkerProcessFilter, toWorkerRunOutcomeFilter, WORKER_PROCESS_FILTERS, WORKER_RUN_OUTCOME_FILTERS, WorkerMessageClassesTable, WorkerMessageRunsTab, WorkerProcessesTab, WorkerProcessesTable, WorkerProcessTimeline, workerProcessFilterString, workerRunOutcomeFilterString, WorkerTransportCharts, } from "./transport.js";
12
+ export { WorkerRestartButton } from "./WorkerRestartButton.js";
13
+ export { ChartBody, ChartLegend, niceTicks, WorkerChartCard, WorkerSparkline, WorkerTimeChart } from "./charts.js";
14
+ // Status maps and helpers
15
+ export { toWorkerMessageOutcome, toWorkerProcessState, toWorkerTransportState, WORKER_MESSAGE_OUTCOME, WORKER_PROCESS_STATE, WORKER_TRANSPORT_STATE, } from "./status.js";
16
+ export { dispatchOrigin, drainMs, formatBytes, formatClockTime, formatCount, formatDurationMs, formatDurationTick, isAttentionState, parseWorkersTime, perWorkerMinute, rankTransports, sequencePoints, shortClassName, shortHost, sortTransports, stopReasonLabel, succeededPoints, throughputWindowOf, TRANSPORT_STATE_ORDER, zipSeries, } from "./format.js";
17
+ export { DEFAULT_WORKERS_WINDOW, resolveWorkersWindow, toWorkersWindowPreset, WORKERS_HISTORY_POLL_MS, WORKERS_LIST_POLL_MS, WORKERS_OVERVIEW_POLL_MS, WORKERS_WINDOW_PRESETS, } from "./window.js";
18
+ export { usePageVisible, useRefreshWhileVisible, useWorkersWindow } from "./useWorkersWindow.js";
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/workers/index.ts"],"names":[],"mappings":"AAAA,oHAAoH;AACpH,uHAAuH;AAEvH,MAAM;AACN,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,WAAW,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAC;AAInI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,aAAa,CAAC;AAErB,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,72 @@
1
+ import type { WorkersApi } from './api.js';
2
+ import type { WorkerLoopDefinition, WorkerProcess, WorkersOverview, WorkersTotals, WorkerTransportOverview } from './types.js';
3
+ /** The tab of a transport page a link opens. */
4
+ export type WorkerTransportTab = 'overview' | 'runs' | 'processes';
5
+ /** The link of a transport's page (`/maintenance/workers/<transport>?tab=processes`). */
6
+ export type WorkerTransportHref = (transport: string, tab?: WorkerTransportTab) => string;
7
+ /** Placeholders of the tiles while the overview loads. */
8
+ export declare const WorkerKpiTilesSkeleton: () => import("react").JSX.Element;
9
+ /**
10
+ * The totals as tiles: what runs now and what happened in the last hour, with the hour as a sparkline. While the
11
+ * monitoring is off, nothing is measured: the measured tiles say "not measured" instead of a 0.
12
+ */
13
+ export declare const WorkerKpiTiles: ({ overview }: {
14
+ overview: WorkersOverview;
15
+ }) => import("react").JSX.Element;
16
+ export interface WorkersLivePanelProps {
17
+ transports: readonly WorkerTransportOverview[];
18
+ /** The live processes of every transport (`workersOverview.processes`). */
19
+ processes: readonly WorkerProcess[];
20
+ /** "Now" of the durations: the overview's `generatedAt`. */
21
+ nowMs: number;
22
+ /** False while the monitoring is off: only the queue counts exist then. */
23
+ showProcesses?: boolean;
24
+ transportHref: WorkerTransportHref;
25
+ }
26
+ /**
27
+ * The live section: every transport with a worker running, a message in work, a message waiting or a queue that could
28
+ * not be counted, as three labelled numbers (workers against the configured range, in work, waiting) and its live
29
+ * processes below. Idle transports with an empty queue fold into one line.
30
+ */
31
+ export declare const WorkersLivePanel: ({ transports, processes, nowMs, showProcesses, transportHref }: WorkersLivePanelProps) => import("react").JSX.Element;
32
+ export interface WorkersThroughputTableProps {
33
+ transports: readonly WorkerTransportOverview[];
34
+ totals: WorkersTotals | undefined;
35
+ transportHref: WorkerTransportHref;
36
+ }
37
+ /**
38
+ * Throughput per transport: waiting and in work now, the messages finished in the last 5 and 15 minutes, the last hour
39
+ * and the last 24 hours with their rates, and what one worker finished per minute it ran. The first row is every
40
+ * transport together (counted by the backend); a transport without a message in 24 hours and an empty queue is left out.
41
+ */
42
+ export declare const WorkersThroughputTable: ({ transports, totals, transportHref }: WorkersThroughputTableProps) => import("react").JSX.Element;
43
+ export interface WorkerProcessRangeProps {
44
+ live: number;
45
+ min: number | null | undefined;
46
+ max: number | null | undefined;
47
+ isAutoscaled: boolean;
48
+ }
49
+ /** Processes now against the definition's range: the count, `min–max`, a bar filled to now with a tick at `min`. */
50
+ export declare const WorkerProcessRange: ({ live, min, max, isAutoscaled }: WorkerProcessRangeProps) => import("react").JSX.Element;
51
+ export interface WorkerTransportsTableProps {
52
+ api: WorkersApi;
53
+ transports: readonly WorkerTransportOverview[];
54
+ /** Seconds the counts and averages cover (`recentWindowSeconds`, 900). */
55
+ recentWindowSeconds?: number;
56
+ isLoading?: boolean;
57
+ error?: string;
58
+ monitoringEnabled: boolean;
59
+ isSearchActive?: boolean;
60
+ onClearSearch?: () => void;
61
+ transportHref: WorkerTransportHref;
62
+ }
63
+ /**
64
+ * One row per transport, in the order given (sort with `sortTransports`): state badge, queue, processes against the
65
+ * definition, the recent counts and averages, the last hour of handled messages, the restart request.
66
+ */
67
+ export declare const WorkerTransportsTable: ({ api, transports, recentWindowSeconds, isLoading, error, monitoringEnabled, isSearchActive, onClearSearch, transportHref, }: WorkerTransportsTableProps) => import("react").JSX.Element;
68
+ /** The loops of the worker list (console commands in a loop): listed, not monitored. Nothing without loops. */
69
+ export declare const WorkerLoopsCard: ({ loops }: {
70
+ loops: readonly WorkerLoopDefinition[];
71
+ }) => import("react").JSX.Element | null;
72
+ //# sourceMappingURL=overview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"overview.d.ts","sourceRoot":"","sources":["../../src/workers/overview.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;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