@msqd/lydia 0.0.0-stage → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (378) hide show
  1. package/LICENSE +373 -0
  2. package/README.md +151 -2
  3. package/THIRD_PARTY_NOTICES.md +29 -0
  4. package/dist/Components/Badges/Badge.d.ts +20 -0
  5. package/dist/Components/Badges/Badge.js +33 -0
  6. package/dist/Components/Badges/index.d.ts +1 -0
  7. package/dist/Components/Badges/index.js +4 -0
  8. package/dist/Components/Buttons/Button.d.ts +8 -0
  9. package/dist/Components/Buttons/Button.js +30 -0
  10. package/dist/Components/Buttons/ButtonGroup.d.ts +13 -0
  11. package/dist/Components/Buttons/ButtonGroup.js +61 -0
  12. package/dist/Components/Buttons/index.d.ts +2 -0
  13. package/dist/Components/Buttons/index.js +6 -0
  14. package/dist/Components/Cards/Card.d.ts +38 -0
  15. package/dist/Components/Cards/Card.js +31 -0
  16. package/dist/Components/Cards/StatCard.d.ts +14 -0
  17. package/dist/Components/Cards/StatCard.js +27 -0
  18. package/dist/Components/Cards/index.d.ts +2 -0
  19. package/dist/Components/Cards/index.js +7 -0
  20. package/dist/Components/Charts/Components/ThinBarChart.d.ts +35 -0
  21. package/dist/Components/Charts/Components/ThinBarChart.js +41 -0
  22. package/dist/Components/Charts/Components/WideBarChart.d.ts +48 -0
  23. package/dist/Components/Charts/Components/WideBarChart.js +50 -0
  24. package/dist/Components/Charts/Components/index.d.ts +2 -0
  25. package/dist/Components/Charts/Components/index.js +6 -0
  26. package/dist/Components/Charts/Hooks/index.d.ts +2 -0
  27. package/dist/Components/Charts/Hooks/index.js +7 -0
  28. package/dist/Components/Charts/Hooks/useChartDimensions.d.ts +24 -0
  29. package/dist/Components/Charts/Hooks/useChartDimensions.js +42 -0
  30. package/dist/Components/Charts/Hooks/useThemeColors.d.ts +10 -0
  31. package/dist/Components/Charts/Hooks/useThemeColors.js +51 -0
  32. package/dist/Components/Charts/SummaryPerformancesChart.d.ts +7 -0
  33. package/dist/Components/Charts/SummaryPerformancesChart.js +93 -0
  34. package/dist/Components/Charts/SummaryRateChart.d.ts +9 -0
  35. package/dist/Components/Charts/SummaryRateChart.js +81 -0
  36. package/dist/Components/Charts/TransactionsChart.d.ts +6 -0
  37. package/dist/Components/Charts/TransactionsChart.js +70 -0
  38. package/dist/Components/Charts/Utils/ChartBarCalculator.d.ts +48 -0
  39. package/dist/Components/Charts/Utils/ChartBarCalculator.js +66 -0
  40. package/dist/Components/Charts/Utils/ChartColors.d.ts +13 -0
  41. package/dist/Components/Charts/Utils/ChartColors.js +10 -0
  42. package/dist/Components/Charts/Utils/ChartTooltipFormatter.d.ts +43 -0
  43. package/dist/Components/Charts/Utils/ChartTooltipFormatter.js +57 -0
  44. package/dist/Components/Charts/Utils/ReactEChartsCore.d.ts +4 -0
  45. package/dist/Components/Charts/Utils/ReactEChartsCore.js +5 -0
  46. package/dist/Components/Charts/Utils/ThemeColor.d.ts +21 -0
  47. package/dist/Components/Charts/Utils/ThemeColor.js +54 -0
  48. package/dist/Components/Charts/Utils/TimeFormatter.d.ts +9 -0
  49. package/dist/Components/Charts/Utils/TimeFormatter.js +25 -0
  50. package/dist/Components/Charts/Utils/escapeTooltipHtml.d.ts +6 -0
  51. package/dist/Components/Charts/Utils/escapeTooltipHtml.js +5 -0
  52. package/dist/Components/Charts/Utils/index.d.ts +5 -0
  53. package/dist/Components/Charts/Utils/index.js +14 -0
  54. package/dist/Components/Charts/index.d.ts +6 -0
  55. package/dist/Components/Charts/index.js +29 -0
  56. package/dist/Components/Colors/Colors.d.ts +19 -0
  57. package/dist/Components/Colors/Colors.js +154 -0
  58. package/dist/Components/Colors/index.d.ts +1 -0
  59. package/dist/Components/Colors/index.js +4 -0
  60. package/dist/Components/DataTable/DataTable.d.ts +86 -0
  61. package/dist/Components/DataTable/DataTable.js +122 -0
  62. package/dist/Components/DataTable/Paginator.d.ts +41 -0
  63. package/dist/Components/DataTable/Paginator.js +122 -0
  64. package/dist/Components/DataTable/ProportionBar.d.ts +48 -0
  65. package/dist/Components/DataTable/ProportionBar.js +20 -0
  66. package/dist/Components/DataTable/index.d.ts +3 -0
  67. package/dist/Components/DataTable/index.js +9 -0
  68. package/dist/Components/Dialog/Dialog.d.ts +49 -0
  69. package/dist/Components/Dialog/Dialog.js +83 -0
  70. package/dist/Components/Dialog/Drawer.d.ts +45 -0
  71. package/dist/Components/Dialog/Drawer.js +120 -0
  72. package/dist/Components/Dialog/index.d.ts +3 -0
  73. package/dist/Components/Dialog/index.js +12 -0
  74. package/dist/Components/Dialog/modal.types.d.ts +47 -0
  75. package/dist/Components/Dialog/modal.types.js +8 -0
  76. package/dist/Components/Facets/FacetCount.d.ts +11 -0
  77. package/dist/Components/Facets/FacetCount.js +8 -0
  78. package/dist/Components/Facets/FacetCountsCaption.d.ts +16 -0
  79. package/dist/Components/Facets/FacetCountsCaption.js +14 -0
  80. package/dist/Components/Facets/FacetInnerLightButton.d.ts +10 -0
  81. package/dist/Components/Facets/FacetInnerLightButton.js +17 -0
  82. package/dist/Components/Facets/FacetLabel.d.ts +13 -0
  83. package/dist/Components/Facets/FacetLabel.js +15 -0
  84. package/dist/Components/Facets/FacetList.d.ts +40 -0
  85. package/dist/Components/Facets/FacetList.js +37 -0
  86. package/dist/Components/Facets/FacetListCard.d.ts +38 -0
  87. package/dist/Components/Facets/FacetListCard.js +47 -0
  88. package/dist/Components/Facets/FacetResetLink.d.ts +13 -0
  89. package/dist/Components/Facets/FacetResetLink.js +23 -0
  90. package/dist/Components/Facets/Variants/DateRangeFacet.d.ts +47 -0
  91. package/dist/Components/Facets/Variants/DateRangeFacet.js +51 -0
  92. package/dist/Components/Facets/Variants/MultipleChoiceFacet.d.ts +67 -0
  93. package/dist/Components/Facets/Variants/MultipleChoiceFacet.js +200 -0
  94. package/dist/Components/Facets/Variants/PerformanceFacet.d.ts +61 -0
  95. package/dist/Components/Facets/Variants/PerformanceFacet.js +77 -0
  96. package/dist/Components/Facets/Variants/SingleChoiceFacet.d.ts +56 -0
  97. package/dist/Components/Facets/Variants/SingleChoiceFacet.js +54 -0
  98. package/dist/Components/Facets/Variants/index.d.ts +8 -0
  99. package/dist/Components/Facets/Variants/index.js +10 -0
  100. package/dist/Components/Facets/Variants/nestedValues.d.ts +33 -0
  101. package/dist/Components/Facets/Variants/nestedValues.js +87 -0
  102. package/dist/Components/Facets/index.d.ts +15 -0
  103. package/dist/Components/Facets/index.js +27 -0
  104. package/dist/Components/Formatter/BodyNotice.d.ts +9 -0
  105. package/dist/Components/Formatter/BodyNotice.js +21 -0
  106. package/dist/Components/Formatter/CodeFormatter.d.ts +47 -0
  107. package/dist/Components/Formatter/CodeFormatter.js +47 -0
  108. package/dist/Components/Formatter/HeadersDisplay.d.ts +9 -0
  109. package/dist/Components/Formatter/HeadersDisplay.js +18 -0
  110. package/dist/Components/Formatter/JsonTreeView.d.ts +27 -0
  111. package/dist/Components/Formatter/JsonTreeView.js +145 -0
  112. package/dist/Components/Formatter/PerformanceMetrics.d.ts +27 -0
  113. package/dist/Components/Formatter/PerformanceMetrics.js +29 -0
  114. package/dist/Components/Formatter/SyntaxHighlighter.d.ts +11 -0
  115. package/dist/Components/Formatter/SyntaxHighlighter.js +16 -0
  116. package/dist/Components/Formatter/VirtualizedCodeView.d.ts +24 -0
  117. package/dist/Components/Formatter/VirtualizedCodeView.js +47 -0
  118. package/dist/Components/Formatter/bodyLimits.d.ts +6 -0
  119. package/dist/Components/Formatter/bodyLimits.js +6 -0
  120. package/dist/Components/Formatter/index.d.ts +8 -0
  121. package/dist/Components/Formatter/index.js +16 -0
  122. package/dist/Components/Formatter/syntaxTheme.d.ts +8 -0
  123. package/dist/Components/Formatter/syntaxTheme.js +15 -0
  124. package/dist/Components/Formatter/useCodeHighlighting.d.ts +15 -0
  125. package/dist/Components/Formatter/useCodeHighlighting.js +47 -0
  126. package/dist/Components/Formatter/useVirtualization.d.ts +29 -0
  127. package/dist/Components/Formatter/useVirtualization.js +18 -0
  128. package/dist/Components/Inputs/Checkbox/Checkbox.d.ts +6 -0
  129. package/dist/Components/Inputs/Checkbox/Checkbox.js +75 -0
  130. package/dist/Components/Inputs/Checkbox/index.d.ts +1 -0
  131. package/dist/Components/Inputs/Checkbox/index.js +4 -0
  132. package/dist/Components/Inputs/DateRangeSelector/DateRangeSelector.d.ts +48 -0
  133. package/dist/Components/Inputs/DateRangeSelector/DateRangeSelector.js +71 -0
  134. package/dist/Components/Inputs/DateRangeSelector/index.d.ts +1 -0
  135. package/dist/Components/Inputs/DateRangeSelector/index.js +4 -0
  136. package/dist/Components/Inputs/Field/Field.d.ts +19 -0
  137. package/dist/Components/Inputs/Field/Field.js +35 -0
  138. package/dist/Components/Inputs/Field/index.d.ts +2 -0
  139. package/dist/Components/Inputs/Field/index.js +7 -0
  140. package/dist/Components/Inputs/Field/useField.d.ts +33 -0
  141. package/dist/Components/Inputs/Field/useField.js +36 -0
  142. package/dist/Components/Inputs/Input/Input.d.ts +85 -0
  143. package/dist/Components/Inputs/Input/Input.js +146 -0
  144. package/dist/Components/Inputs/Input/index.d.ts +1 -0
  145. package/dist/Components/Inputs/Input/index.js +4 -0
  146. package/dist/Components/Inputs/InputAddon/InputAddon.d.ts +21 -0
  147. package/dist/Components/Inputs/InputAddon/InputAddon.js +18 -0
  148. package/dist/Components/Inputs/InputAddon/index.d.ts +1 -0
  149. package/dist/Components/Inputs/InputAddon/index.js +4 -0
  150. package/dist/Components/Inputs/InputButton/InputButton.d.ts +21 -0
  151. package/dist/Components/Inputs/InputButton/InputButton.js +29 -0
  152. package/dist/Components/Inputs/InputButton/index.d.ts +1 -0
  153. package/dist/Components/Inputs/InputButton/index.js +4 -0
  154. package/dist/Components/Inputs/InputIcon/InputIcon.d.ts +20 -0
  155. package/dist/Components/Inputs/InputIcon/InputIcon.js +16 -0
  156. package/dist/Components/Inputs/InputIcon/index.d.ts +1 -0
  157. package/dist/Components/Inputs/InputIcon/index.js +4 -0
  158. package/dist/Components/Inputs/KeyboardShortcut/KeyboardShortcut.d.ts +12 -0
  159. package/dist/Components/Inputs/KeyboardShortcut/KeyboardShortcut.js +18 -0
  160. package/dist/Components/Inputs/KeyboardShortcut/index.d.ts +1 -0
  161. package/dist/Components/Inputs/KeyboardShortcut/index.js +4 -0
  162. package/dist/Components/Inputs/Radio/Radio.d.ts +3 -0
  163. package/dist/Components/Inputs/Radio/Radio.js +59 -0
  164. package/dist/Components/Inputs/Radio/index.d.ts +1 -0
  165. package/dist/Components/Inputs/Radio/index.js +4 -0
  166. package/dist/Components/Inputs/SearchInput/SearchInput.d.ts +9 -0
  167. package/dist/Components/Inputs/SearchInput/SearchInput.js +48 -0
  168. package/dist/Components/Inputs/SearchInput/index.d.ts +2 -0
  169. package/dist/Components/Inputs/SearchInput/index.js +4 -0
  170. package/dist/Components/Inputs/Sliders/RangeSlider.d.ts +40 -0
  171. package/dist/Components/Inputs/Sliders/RangeSlider.js +160 -0
  172. package/dist/Components/Inputs/Sliders/index.d.ts +2 -0
  173. package/dist/Components/Inputs/Sliders/index.js +4 -0
  174. package/dist/Components/Inputs/Textarea/Textarea.d.ts +56 -0
  175. package/dist/Components/Inputs/Textarea/Textarea.js +79 -0
  176. package/dist/Components/Inputs/Textarea/index.d.ts +1 -0
  177. package/dist/Components/Inputs/Textarea/index.js +4 -0
  178. package/dist/Components/Inputs/choiceInput.d.ts +12 -0
  179. package/dist/Components/Inputs/choiceInput.js +8 -0
  180. package/dist/Components/Inputs/index.d.ts +11 -0
  181. package/dist/Components/Inputs/index.js +24 -0
  182. package/dist/Components/Layouts/DefaultLayout.d.ts +30 -0
  183. package/dist/Components/Layouts/DefaultLayout.js +25 -0
  184. package/dist/Components/Layouts/index.d.ts +2 -0
  185. package/dist/Components/Layouts/index.js +4 -0
  186. package/dist/Components/NavBar/Assets/defaultAvatar.d.ts +4 -0
  187. package/dist/Components/NavBar/Assets/defaultAvatar.js +28 -0
  188. package/dist/Components/NavBar/Assets/index.d.ts +2 -0
  189. package/dist/Components/NavBar/Assets/index.js +4 -0
  190. package/dist/Components/NavBar/NavBar.d.ts +58 -0
  191. package/dist/Components/NavBar/NavBar.js +141 -0
  192. package/dist/Components/NavBar/index.d.ts +1 -0
  193. package/dist/Components/NavBar/index.js +5 -0
  194. package/dist/Components/Tabs/Tabs.d.ts +24 -0
  195. package/dist/Components/Tabs/Tabs.js +69 -0
  196. package/dist/Components/Tabs/index.d.ts +2 -0
  197. package/dist/Components/Tabs/index.js +5 -0
  198. package/dist/Components/Toast/Toast.d.ts +28 -0
  199. package/dist/Components/Toast/Toast.js +128 -0
  200. package/dist/Components/Toast/ToastContainer.d.ts +29 -0
  201. package/dist/Components/Toast/ToastContainer.js +28 -0
  202. package/dist/Components/Toast/ToastContext.d.ts +103 -0
  203. package/dist/Components/Toast/ToastContext.js +124 -0
  204. package/dist/Components/Toast/index.d.ts +3 -0
  205. package/dist/Components/Toast/index.js +13 -0
  206. package/dist/Components/Typography/HeadingLevel.d.ts +28 -0
  207. package/dist/Components/Typography/HeadingLevel.js +20 -0
  208. package/dist/Components/Typography/Paragraphs.d.ts +8 -0
  209. package/dist/Components/Typography/Paragraphs.js +6 -0
  210. package/dist/Components/Typography/Section.d.ts +8 -0
  211. package/dist/Components/Typography/Section.js +6 -0
  212. package/dist/Components/Typography/Titles.d.ts +31 -0
  213. package/dist/Components/Typography/Titles.js +14 -0
  214. package/dist/Components/Typography/index.d.ts +4 -0
  215. package/dist/Components/Typography/index.js +17 -0
  216. package/dist/Components/Utilities/Foldable.d.ts +42 -0
  217. package/dist/Components/Utilities/Foldable.js +39 -0
  218. package/dist/Components/Utilities/index.d.ts +2 -0
  219. package/dist/Components/Utilities/index.js +6 -0
  220. package/dist/Components/Utilities/useClickOutside.d.ts +21 -0
  221. package/dist/Components/Utilities/useClickOutside.js +23 -0
  222. package/dist/Components/index.d.ts +16 -0
  223. package/dist/Components/index.js +158 -0
  224. package/dist/Elements/Http/CacheBadge.d.ts +13 -0
  225. package/dist/Elements/Http/CacheBadge.js +34 -0
  226. package/dist/Elements/Http/CacheIndicator.d.ts +17 -0
  227. package/dist/Elements/Http/CacheIndicator.js +47 -0
  228. package/dist/Elements/Http/RequestMethodBadge.d.ts +5 -0
  229. package/dist/Elements/Http/RequestMethodBadge.js +13 -0
  230. package/dist/Elements/Http/ResponseStatusBadge.d.ts +19 -0
  231. package/dist/Elements/Http/ResponseStatusBadge.js +20 -0
  232. package/dist/Elements/Http/index.d.ts +4 -0
  233. package/dist/Elements/Http/index.js +10 -0
  234. package/dist/Elements/System/CircuitBreakerStatus.d.ts +11 -0
  235. package/dist/Elements/System/CircuitBreakerStatus.js +98 -0
  236. package/dist/Elements/System/EndpointNode.d.ts +10 -0
  237. package/dist/Elements/System/EndpointNode.js +19 -0
  238. package/dist/Elements/System/EntrypointNode.d.ts +9 -0
  239. package/dist/Elements/System/EntrypointNode.js +17 -0
  240. package/dist/Elements/System/NetworkEdges.d.ts +37 -0
  241. package/dist/Elements/System/NetworkEdges.js +52 -0
  242. package/dist/Elements/System/NetworkMap.d.ts +33 -0
  243. package/dist/Elements/System/NetworkMap.js +121 -0
  244. package/dist/Elements/System/NetworkNode.d.ts +29 -0
  245. package/dist/Elements/System/NetworkNode.js +31 -0
  246. package/dist/Elements/System/ProxyNode.d.ts +8 -0
  247. package/dist/Elements/System/ProxyNode.js +10 -0
  248. package/dist/Elements/System/index.d.ts +9 -0
  249. package/dist/Elements/System/index.js +17 -0
  250. package/dist/Elements/Tpdex/TpdexBadge.d.ts +26 -0
  251. package/dist/Elements/Tpdex/TpdexBadge.js +36 -0
  252. package/dist/Elements/Tpdex/index.d.ts +4 -0
  253. package/dist/Elements/Tpdex/index.js +8 -0
  254. package/dist/Elements/Transactions/TransactionFiltersCard.d.ts +41 -0
  255. package/dist/Elements/Transactions/TransactionFiltersCard.js +121 -0
  256. package/dist/Elements/Transactions/TransactionsExplorerSidebar.d.ts +37 -0
  257. package/dist/Elements/Transactions/TransactionsExplorerSidebar.js +154 -0
  258. package/dist/Elements/Transactions/TransactionsFiltersSidebar.d.ts +22 -0
  259. package/dist/Elements/Transactions/TransactionsFiltersSidebar.js +39 -0
  260. package/dist/Elements/Transactions/index.d.ts +13 -0
  261. package/dist/Elements/Transactions/index.js +9 -0
  262. package/dist/Elements/index.d.ts +18 -0
  263. package/dist/Elements/index.js +38 -0
  264. package/dist/Models/Filters/active.d.ts +12 -0
  265. package/dist/Models/Filters/active.js +10 -0
  266. package/dist/Models/Filters/dates.d.ts +8 -0
  267. package/dist/Models/Filters/dates.js +16 -0
  268. package/dist/Models/Filters/index.d.ts +4 -0
  269. package/dist/Models/Filters/index.js +13 -0
  270. package/dist/Models/Filters/read.d.ts +9 -0
  271. package/dist/Models/Filters/read.js +22 -0
  272. package/dist/Models/Filters/types.d.ts +50 -0
  273. package/dist/Models/Filters/types.js +1 -0
  274. package/dist/Models/Http/body.d.ts +7 -0
  275. package/dist/Models/Http/body.js +6 -0
  276. package/dist/Models/Http/contentDisposition.d.ts +7 -0
  277. package/dist/Models/Http/contentDisposition.js +51 -0
  278. package/dist/Models/Http/dataUrl.d.ts +12 -0
  279. package/dist/Models/Http/dataUrl.js +21 -0
  280. package/dist/Models/Http/headers.d.ts +18 -0
  281. package/dist/Models/Http/headers.js +7 -0
  282. package/dist/Models/Http/index.d.ts +2 -0
  283. package/dist/Models/Http/index.js +6 -0
  284. package/dist/Models/Http/percent.d.ts +5 -0
  285. package/dist/Models/Http/percent.js +17 -0
  286. package/dist/Models/Http/requestTarget.d.ts +11 -0
  287. package/dist/Models/Http/requestTarget.js +7 -0
  288. package/dist/Models/System/index.d.ts +1 -0
  289. package/dist/Models/System/index.js +7 -0
  290. package/dist/Models/System/types.d.ts +20 -0
  291. package/dist/Models/System/types.js +48 -0
  292. package/dist/Models/Tpdex.d.ts +36 -0
  293. package/dist/Models/Tpdex.js +38 -0
  294. package/dist/Models/Transactions/Overview.d.ts +19 -0
  295. package/dist/Models/Transactions/Overview.js +1 -0
  296. package/dist/Models/Transactions/encoding.d.ts +49 -0
  297. package/dist/Models/Transactions/encoding.js +26 -0
  298. package/dist/Models/Transactions/endpoints.d.ts +15 -0
  299. package/dist/Models/Transactions/endpoints.js +21 -0
  300. package/dist/Models/Transactions/facets.d.ts +25 -0
  301. package/dist/Models/Transactions/facets.js +40 -0
  302. package/dist/Models/Transactions/filtering.d.ts +20 -0
  303. package/dist/Models/Transactions/filtering.js +34 -0
  304. package/dist/Models/Transactions/treeDepth.d.ts +2 -0
  305. package/dist/Models/Transactions/treeDepth.js +4 -0
  306. package/dist/Models/Transactions/types.d.ts +58 -0
  307. package/dist/Models/Transactions/types.js +1 -0
  308. package/dist/Models/index.d.ts +10 -0
  309. package/dist/Models/index.js +46 -0
  310. package/dist/Pages/Alerts/AlertsPage.d.ts +18 -0
  311. package/dist/Pages/Alerts/AlertsPage.js +104 -0
  312. package/dist/Pages/Alerts/index.d.ts +1 -0
  313. package/dist/Pages/Alerts/index.js +4 -0
  314. package/dist/Pages/Explorer/ExplorerPage.d.ts +6 -0
  315. package/dist/Pages/Explorer/ExplorerPage.js +55 -0
  316. package/dist/Pages/Explorer/index.d.ts +1 -0
  317. package/dist/Pages/Explorer/index.js +4 -0
  318. package/dist/Pages/Overview/OverviewPage.d.ts +11 -0
  319. package/dist/Pages/Overview/OverviewPage.js +10 -0
  320. package/dist/Pages/Overview/Sections/Components/TransactionsHistoryView.d.ts +7 -0
  321. package/dist/Pages/Overview/Sections/Components/TransactionsHistoryView.js +32 -0
  322. package/dist/Pages/Overview/Sections/Components/index.d.ts +1 -0
  323. package/dist/Pages/Overview/Sections/Components/index.js +4 -0
  324. package/dist/Pages/Overview/Sections/HistorySection.d.ts +18 -0
  325. package/dist/Pages/Overview/Sections/HistorySection.js +21 -0
  326. package/dist/Pages/Overview/Sections/SummarySection.d.ts +44 -0
  327. package/dist/Pages/Overview/Sections/SummarySection.js +127 -0
  328. package/dist/Pages/Overview/index.d.ts +4 -0
  329. package/dist/Pages/Overview/index.js +8 -0
  330. package/dist/Pages/SystemPage/SystemPage.d.ts +8 -0
  331. package/dist/Pages/SystemPage/SystemPage.js +16 -0
  332. package/dist/Pages/SystemPage/index.d.ts +1 -0
  333. package/dist/Pages/SystemPage/index.js +4 -0
  334. package/dist/Pages/Transactions/Detail/Components/DownloadButton.d.ts +33 -0
  335. package/dist/Pages/Transactions/Detail/Components/DownloadButton.js +62 -0
  336. package/dist/Pages/Transactions/Detail/Components/TransactionMessage.d.ts +16 -0
  337. package/dist/Pages/Transactions/Detail/Components/TransactionMessage.js +44 -0
  338. package/dist/Pages/Transactions/Detail/Components/TransactionMetadata.d.ts +21 -0
  339. package/dist/Pages/Transactions/Detail/Components/TransactionMetadata.js +127 -0
  340. package/dist/Pages/Transactions/Detail/Components/index.d.ts +6 -0
  341. package/dist/Pages/Transactions/Detail/Components/index.js +8 -0
  342. package/dist/Pages/Transactions/Detail/TransactionsDetailPage.d.ts +8 -0
  343. package/dist/Pages/Transactions/Detail/TransactionsDetailPage.js +15 -0
  344. package/dist/Pages/Transactions/Detail/Utils/BodyPreview.d.ts +15 -0
  345. package/dist/Pages/Transactions/Detail/Utils/BodyPreview.js +30 -0
  346. package/dist/Pages/Transactions/Detail/Utils/ContentRenderer.d.ts +28 -0
  347. package/dist/Pages/Transactions/Detail/Utils/ContentRenderer.js +115 -0
  348. package/dist/Pages/Transactions/Detail/Utils/index.d.ts +4 -0
  349. package/dist/Pages/Transactions/Detail/Utils/index.js +9 -0
  350. package/dist/Pages/Transactions/Detail/index.d.ts +4 -0
  351. package/dist/Pages/Transactions/Detail/index.js +8 -0
  352. package/dist/Pages/Transactions/List/TransactionsListPage.d.ts +80 -0
  353. package/dist/Pages/Transactions/List/TransactionsListPage.js +220 -0
  354. package/dist/Pages/Transactions/List/index.d.ts +4 -0
  355. package/dist/Pages/Transactions/List/index.js +6 -0
  356. package/dist/Pages/Transactions/List/useClientSideTransactions.d.ts +38 -0
  357. package/dist/Pages/Transactions/List/useClientSideTransactions.js +32 -0
  358. package/dist/Pages/Transactions/index.d.ts +4 -0
  359. package/dist/Pages/Transactions/index.js +6 -0
  360. package/dist/Pages/index.d.ts +5 -0
  361. package/dist/Pages/index.js +18 -0
  362. package/dist/Settings.d.ts +13 -0
  363. package/dist/Settings.js +16 -0
  364. package/dist/css/Components/Formatter/prism.css +79 -0
  365. package/dist/css/Components/Inputs/Input/Input.css +73 -0
  366. package/dist/css/Components/Inputs/Sliders/RangeSliderStyles.css +92 -0
  367. package/dist/css/components.css +6 -0
  368. package/dist/css/fonts/Lato-Bold.woff2 +0 -0
  369. package/dist/css/fonts/Lato-BoldItalic.woff2 +0 -0
  370. package/dist/css/fonts/Lato-Italic.woff2 +0 -0
  371. package/dist/css/fonts/Lato-Regular.woff2 +0 -0
  372. package/dist/css/fonts/OFL.txt +93 -0
  373. package/dist/css/theme.css +109 -0
  374. package/dist/index.d.ts +4 -0
  375. package/dist/index.js +250 -0
  376. package/dist/logo.svg +1 -0
  377. package/dist/styles/styles.css +1 -0
  378. package/package.json +367 -3
@@ -0,0 +1,34 @@
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import { Badge as n } from "../../Components/Badges/Badge.js";
3
+ import "react";
4
+ import { twMerge as u } from "tailwind-merge";
5
+ function C({ cacheStatus: r, cached: t, className: l, ...o }) {
6
+ if (!r && (t === void 0 || t === !1))
7
+ return null;
8
+ let e, s, a;
9
+ if (r)
10
+ switch (r) {
11
+ case "hit":
12
+ e = "HIT", s = "success", a = "Cache HIT";
13
+ break;
14
+ case "miss":
15
+ e = "MISS", s = "default", a = "Cache MISS";
16
+ break;
17
+ case "stale":
18
+ e = "STALE", s = "warning", a = "Cache STALE";
19
+ break;
20
+ case "bypass":
21
+ e = "BYPASS", s = "blue", a = "Cache BYPASS";
22
+ break;
23
+ default:
24
+ e = "UNKNOWN", s = "default", a = "Cache status unknown";
25
+ }
26
+ else if (t)
27
+ e = "HIT", s = "success", a = "Cached";
28
+ else
29
+ return null;
30
+ return /* @__PURE__ */ i(n, { color: s, className: u("font-mono", l), title: a, ...o, children: e });
31
+ }
32
+ export {
33
+ C as CacheBadge
34
+ };
@@ -0,0 +1,17 @@
1
+ import { type ComponentProps } from "react";
2
+ export interface CacheIndicatorProps extends ComponentProps<"span"> {
3
+ /** Cache status from the server */
4
+ cacheStatus?: "hit" | "miss" | "stale" | "bypass";
5
+ /** Whether the request was cached (legacy support) */
6
+ cached?: boolean;
7
+ /** Size of the indicator */
8
+ size?: "xs" | "sm" | "base" | "lg";
9
+ }
10
+ /**
11
+ * CacheIndicator component that displays cache status using icons.
12
+ * - No icon for cache miss (default behavior)
13
+ * - Green database icon for cache hit
14
+ * - Red crossed-out database icon for cache bypass
15
+ * - Yellow database icon for stale cache
16
+ */
17
+ export declare function CacheIndicator({ cacheStatus, cached, size, className, ...props }: CacheIndicatorProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,47 @@
1
+ import { jsxs as f, jsx as c } from "react/jsx-runtime";
2
+ import { XMarkIcon as u } from "@heroicons/react/20/solid";
3
+ import { CircleStackIcon as d } from "@heroicons/react/24/outline";
4
+ import "react";
5
+ import { twMerge as a } from "tailwind-merge";
6
+ function g({ cacheStatus: r, cached: l, size: i = "xs", className: m, ...h }) {
7
+ let e = null;
8
+ if (r ? e = r : l === !0 ? e = "hit" : l === !1 && (e = "miss"), !e || e === "miss")
9
+ return null;
10
+ let s, t, n = !1;
11
+ switch (e) {
12
+ case "hit":
13
+ s = "text-success-600", t = "Cache HIT - Response served from cache";
14
+ break;
15
+ case "stale":
16
+ s = "text-warning-600", t = "Cache STALE - Served stale content while revalidating";
17
+ break;
18
+ case "bypass":
19
+ s = "text-danger-600", t = "Cache BYPASS - Cache was intentionally bypassed", n = !0;
20
+ break;
21
+ default:
22
+ return null;
23
+ }
24
+ const o = {
25
+ xs: "h-3 w-3",
26
+ sm: "h-3.5 w-3.5",
27
+ base: "h-4 w-4",
28
+ lg: "h-5 w-5"
29
+ };
30
+ return /* @__PURE__ */ f(
31
+ "span",
32
+ {
33
+ className: a("inline-flex items-center cursor-help relative", m),
34
+ title: t,
35
+ role: "img",
36
+ "aria-label": t,
37
+ ...h,
38
+ children: [
39
+ /* @__PURE__ */ c(d, { className: a(o[i], s), "aria-hidden": "true" }),
40
+ n && /* @__PURE__ */ c(u, { className: a("absolute inset-0", o[i], s), "aria-hidden": "true" })
41
+ ]
42
+ }
43
+ );
44
+ }
45
+ export {
46
+ g as CacheIndicator
47
+ };
@@ -0,0 +1,5 @@
1
+ import type { FC } from "react";
2
+ export interface RequestMethodBadgeProps {
3
+ method: string;
4
+ }
5
+ export declare const RequestMethodBadge: FC<RequestMethodBadgeProps>;
@@ -0,0 +1,13 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { Badge as r } from "../../Components/Badges/Badge.js";
3
+ const t = {
4
+ GET: "green",
5
+ DELETE: "red",
6
+ PUT: "yellow",
7
+ POST: "orange",
8
+ PATCH: "purple",
9
+ OPTIONS: "blue"
10
+ }, a = ({ method: e }) => /* @__PURE__ */ o(r, { "data-testid": `method-badge-${e}`, color: t[e], children: e });
11
+ export {
12
+ a as RequestMethodBadge
13
+ };
@@ -0,0 +1,19 @@
1
+ import type { FC } from "react";
2
+ export interface ResponseStatusBadgeProps {
3
+ statusCode: number;
4
+ /**
5
+ * Whether to spell the reason phrase out beside the code.
6
+ *
7
+ * On by default, so nothing that renders this today changes. Turn it off
8
+ * where the badge appears once per row of a list: the colour already says
9
+ * the class and the number already says the code, so "Internal Server Error"
10
+ * spelled out on every row of a kind is the same words repeated down the
11
+ * page, and it costs the width a consumer would rather give to whatever
12
+ * identifies the row.
13
+ *
14
+ * Keep it on where there is one of them — a detail panel — since that is
15
+ * where a reader may genuinely not know what 422 means.
16
+ */
17
+ showReason?: boolean;
18
+ }
19
+ export declare const ResponseStatusBadge: FC<ResponseStatusBadgeProps>;
@@ -0,0 +1,20 @@
1
+ import { jsx as i, jsxs as t, Fragment as c } from "react/jsx-runtime";
2
+ import { Badge as f } from "../../Components/Badges/Badge.js";
3
+ import { getReasonPhrase as g } from "http-status-codes";
4
+ const o = (r) => r >= 200 && r < 300 ? "success" : r >= 300 && r < 400 ? "blue" : r >= 400 && r < 500 ? "warning" : r >= 500 && r < 600 ? "danger" : r >= 600 ? "purple" : "default", m = (r) => {
5
+ try {
6
+ return g(r);
7
+ } catch {
8
+ return "Unknown";
9
+ }
10
+ }, u = ({ statusCode: r, showReason: n = !0 }) => {
11
+ const e = o(r);
12
+ return /* @__PURE__ */ i(f, { "data-testid": `status-badge-${r}`, color: e, children: n ? /* @__PURE__ */ t(c, { children: [
13
+ r,
14
+ " ",
15
+ m(r)
16
+ ] }) : r });
17
+ };
18
+ export {
19
+ u as ResponseStatusBadge
20
+ };
@@ -0,0 +1,4 @@
1
+ export { RequestMethodBadge, type RequestMethodBadgeProps } from "./RequestMethodBadge.js";
2
+ export { ResponseStatusBadge, type ResponseStatusBadgeProps } from "./ResponseStatusBadge.js";
3
+ export { CacheBadge, type CacheBadgeProps } from "./CacheBadge.js";
4
+ export { CacheIndicator, type CacheIndicatorProps } from "./CacheIndicator.js";
@@ -0,0 +1,10 @@
1
+ import { RequestMethodBadge as r } from "./RequestMethodBadge.js";
2
+ import { ResponseStatusBadge as a } from "./ResponseStatusBadge.js";
3
+ import { CacheBadge as p } from "./CacheBadge.js";
4
+ import { CacheIndicator as m } from "./CacheIndicator.js";
5
+ export {
6
+ p as CacheBadge,
7
+ m as CacheIndicator,
8
+ r as RequestMethodBadge,
9
+ a as ResponseStatusBadge
10
+ };
@@ -0,0 +1,11 @@
1
+ import { type CircuitBreakerState } from "../../Models/System/index.js";
2
+ export interface CircuitBreakerStatusProps {
3
+ circuitBreaker: {
4
+ status: CircuitBreakerState;
5
+ failureRate: number;
6
+ };
7
+ compact?: boolean;
8
+ editable?: boolean;
9
+ onChange?: (status: CircuitBreakerState) => void;
10
+ }
11
+ export declare function CircuitBreakerStatus({ circuitBreaker, compact, editable, onChange, }: CircuitBreakerStatusProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,98 @@
1
+ import { jsxs as e, jsx as r } from "react/jsx-runtime";
2
+ import { ChevronDownIcon as p, CheckIcon as h } from "@heroicons/react/20/solid";
3
+ import { useClickOutside as y } from "../../Components/Utilities/useClickOutside.js";
4
+ import { useState as g } from "react";
5
+ import { circuitBreakerStatusMap as i } from "../../Models/System/types.js";
6
+ import { Badge as o } from "../../Components/Badges/Badge.js";
7
+ function j({
8
+ circuitBreaker: s,
9
+ compact: f = !1,
10
+ editable: d = !1,
11
+ onChange: b
12
+ }) {
13
+ const [c, n] = g(!1), x = y({ onClickOutside: () => n(!1), enabled: c }), t = i[s.status], m = (l) => {
14
+ n(!1), b?.(l);
15
+ };
16
+ return f ? d ? /* @__PURE__ */ e("div", { ref: x, className: "relative", children: [
17
+ /* @__PURE__ */ e(
18
+ "button",
19
+ {
20
+ onClick: () => n(!c),
21
+ className: "flex items-center space-x-1 bg-white border border-gray-200 rounded px-1.5 py-0.5 hover:bg-gray-50 transition-colors cursor-pointer",
22
+ children: [
23
+ /* @__PURE__ */ r(o, { color: t.color, className: "text-xs px-1 py-0", children: t.icon }),
24
+ /* @__PURE__ */ e("span", { className: "text-xs text-gray-600", children: [
25
+ s.failureRate.toFixed(1),
26
+ "%"
27
+ ] }),
28
+ /* @__PURE__ */ r(p, { className: "w-3 h-3 text-gray-400" })
29
+ ]
30
+ }
31
+ ),
32
+ c && /* @__PURE__ */ r("div", { className: "absolute top-full mt-1 left-0 z-50 w-36 bg-white border border-gray-200 rounded overflow-hidden", children: Object.entries(i).map(([l, a]) => /* @__PURE__ */ e(
33
+ "button",
34
+ {
35
+ onClick: () => m(l),
36
+ className: `w-full flex items-center justify-between px-2 py-1.5 text-xs hover:bg-gray-50 transition-colors cursor-pointer ${l === s.status ? "bg-gray-50" : ""} ${Object.keys(i).indexOf(l) > 0 ? "border-t border-gray-100" : ""}`,
37
+ children: [
38
+ /* @__PURE__ */ e("div", { className: "flex items-center space-x-2", children: [
39
+ /* @__PURE__ */ r(o, { color: a.color, className: "text-xs px-1 py-0", children: a.icon }),
40
+ /* @__PURE__ */ r("span", { className: "text-gray-700", children: a.label })
41
+ ] }),
42
+ l === s.status && /* @__PURE__ */ r(h, { className: "w-3 h-3 text-gray-600" })
43
+ ]
44
+ },
45
+ l
46
+ )) })
47
+ ] }) : /* @__PURE__ */ e("div", { className: "flex items-center space-x-1", children: [
48
+ /* @__PURE__ */ r(o, { color: t.color, className: "text-xs px-1 py-0", children: t.icon }),
49
+ /* @__PURE__ */ e("span", { className: "text-xs text-gray-600", children: [
50
+ s.failureRate.toFixed(1),
51
+ "%"
52
+ ] })
53
+ ] }) : /* @__PURE__ */ e("div", { className: "space-y-1", children: [
54
+ /* @__PURE__ */ e("div", { className: "flex items-center space-x-2", children: [
55
+ /* @__PURE__ */ r("span", { className: "text-sm font-medium text-gray-700", children: "Circuit Breaker" }),
56
+ d ? /* @__PURE__ */ e("div", { ref: x, className: "relative", children: [
57
+ /* @__PURE__ */ e("button", { onClick: () => n(!c), className: "flex items-center space-x-1 cursor-pointer", children: [
58
+ /* @__PURE__ */ e(o, { color: t.color, children: [
59
+ t.icon,
60
+ " ",
61
+ t.label
62
+ ] }),
63
+ /* @__PURE__ */ r(p, { className: "w-4 h-4 text-gray-400" })
64
+ ] }),
65
+ c && /* @__PURE__ */ r("div", { className: "absolute top-full mt-1 left-0 z-50 w-36 bg-white border border-gray-200 rounded overflow-hidden", children: Object.entries(i).map(([l, a]) => /* @__PURE__ */ e(
66
+ "button",
67
+ {
68
+ onClick: () => m(l),
69
+ className: `w-full flex items-center justify-between px-2 py-1.5 text-xs hover:bg-gray-50 transition-colors cursor-pointer ${l === s.status ? "bg-gray-50" : ""} ${Object.keys(i).indexOf(l) > 0 ? "border-t border-gray-100" : ""}`,
70
+ children: [
71
+ /* @__PURE__ */ e("div", { className: "flex items-center space-x-2", children: [
72
+ /* @__PURE__ */ r(o, { color: a.color, className: "text-xs px-1 py-0", children: a.icon }),
73
+ /* @__PURE__ */ r("span", { className: "text-gray-700", children: a.label })
74
+ ] }),
75
+ l === s.status && /* @__PURE__ */ r(h, { className: "w-3 h-3 text-gray-600" })
76
+ ]
77
+ },
78
+ l
79
+ )) })
80
+ ] }) : /* @__PURE__ */ e(o, { color: t.color, children: [
81
+ t.icon,
82
+ " ",
83
+ t.label
84
+ ] })
85
+ ] }),
86
+ /* @__PURE__ */ e("div", { className: "text-xs text-gray-500", children: [
87
+ /* @__PURE__ */ r("div", { children: t.description }),
88
+ /* @__PURE__ */ e("div", { children: [
89
+ "Failure rate: ",
90
+ s.failureRate.toFixed(1),
91
+ "%"
92
+ ] })
93
+ ] })
94
+ ] });
95
+ }
96
+ export {
97
+ j as CircuitBreakerStatus
98
+ };
@@ -0,0 +1,10 @@
1
+ import { type HealthStatus } from "../../Models/System/index.js";
2
+ export interface EndpointNodeProps {
3
+ endpoint: {
4
+ id: string;
5
+ name: string;
6
+ url: string;
7
+ health: HealthStatus;
8
+ };
9
+ }
10
+ export declare function EndpointNode({ endpoint }: EndpointNodeProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,19 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { NetworkNode as r, NetworkNodeDetail as l } from "./NetworkNode.js";
3
+ import { healthStatusMap as a } from "../../Models/System/types.js";
4
+ import { Badge as h } from "../../Components/Badges/Badge.js";
5
+ function f({ endpoint: o }) {
6
+ const e = a[o.health];
7
+ return /* @__PURE__ */ t(
8
+ r,
9
+ {
10
+ tone: "green",
11
+ title: o.name,
12
+ action: /* @__PURE__ */ t(h, { color: e.color, className: "text-xs px-1 py-0", children: o.health }),
13
+ children: /* @__PURE__ */ t(l, { children: o.url })
14
+ }
15
+ );
16
+ }
17
+ export {
18
+ f as EndpointNode
19
+ };
@@ -0,0 +1,9 @@
1
+ export interface EntrypointNodeProps {
2
+ entrypoint: {
3
+ id: string;
4
+ name: string;
5
+ port: number;
6
+ path: string;
7
+ };
8
+ }
9
+ export declare function EntrypointNode({ entrypoint }: EntrypointNodeProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,17 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { NetworkNode as r, NetworkNodeDetail as t } from "./NetworkNode.js";
3
+ import { Badge as i } from "../../Components/Badges/Badge.js";
4
+ function c({ entrypoint: e }) {
5
+ return /* @__PURE__ */ o(
6
+ r,
7
+ {
8
+ tone: "blue",
9
+ title: e.name,
10
+ action: /* @__PURE__ */ o(i, { color: "blue", className: "text-xs px-1 py-0", children: e.port }),
11
+ children: /* @__PURE__ */ o(t, { children: e.path })
12
+ }
13
+ );
14
+ }
15
+ export {
16
+ c as EntrypointNode
17
+ };
@@ -0,0 +1,37 @@
1
+ import type { CircuitBreakerState } from "../../Models/System/index.js";
2
+ export interface NetworkEdgesProps {
3
+ connections: Array<{
4
+ from: string;
5
+ to: string;
6
+ type: "entrypoint-proxy" | "proxy-endpoint";
7
+ circuitBreaker?: {
8
+ status: CircuitBreakerState;
9
+ failureRate: number;
10
+ };
11
+ }>;
12
+ positions: {
13
+ entrypoints: Array<{
14
+ id: string;
15
+ x: number;
16
+ y: number;
17
+ width: number;
18
+ height: number;
19
+ }>;
20
+ proxies: Array<{
21
+ id: string;
22
+ x: number;
23
+ y: number;
24
+ width: number;
25
+ height: number;
26
+ }>;
27
+ endpoints: Array<{
28
+ id: string;
29
+ x: number;
30
+ y: number;
31
+ width: number;
32
+ height: number;
33
+ }>;
34
+ };
35
+ onCircuitBreakerChange?: (from: string, to: string, status: CircuitBreakerState) => void;
36
+ }
37
+ export declare function NetworkEdges({ connections, positions, onCircuitBreakerChange }: NetworkEdgesProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,52 @@
1
+ import { jsxs as h, jsx as e } from "react/jsx-runtime";
2
+ import { CircuitBreakerStatus as w } from "./CircuitBreakerStatus.js";
3
+ function v({ connections: m, positions: a, onCircuitBreakerChange: c }) {
4
+ const u = [...a.entrypoints, ...a.proxies, ...a.endpoints], d = (r) => u.find((t) => t.id === r);
5
+ return /* @__PURE__ */ h("svg", { className: "absolute inset-0 pointer-events-none", style: { zIndex: 1, overflow: "visible" }, children: [
6
+ /* @__PURE__ */ e("defs", { children: /* @__PURE__ */ e(
7
+ "marker",
8
+ {
9
+ id: "arrowhead",
10
+ markerWidth: "12",
11
+ markerHeight: "8",
12
+ refX: "11",
13
+ refY: "4",
14
+ orient: "auto",
15
+ markerUnits: "strokeWidth",
16
+ children: /* @__PURE__ */ e("polygon", { points: "0 0, 12 4, 0 8", fill: "#6366f1" })
17
+ }
18
+ ) }),
19
+ m.map((r) => {
20
+ const t = d(r.from), o = d(r.to);
21
+ if (!t || !o)
22
+ return console.warn(`Missing node for connection: ${r.from} -> ${r.to}`), null;
23
+ const s = t.x + t.width, n = t.y + t.height / 2, i = o.x, l = o.y + o.height / 2, f = Math.abs(i - s) * 0.5, k = s + f, p = i - f, g = `M ${s} ${n} C ${k} ${n}, ${p} ${l}, ${i} ${l}`;
24
+ return /* @__PURE__ */ h("g", { children: [
25
+ /* @__PURE__ */ e("path", { d: g, stroke: "#6366f1", strokeWidth: "2", fill: "none", markerEnd: "url(#arrowhead)", opacity: "0.8" }),
26
+ r.circuitBreaker && /* @__PURE__ */ e(
27
+ "foreignObject",
28
+ {
29
+ x: (s + i) / 2 - 50,
30
+ y: (n + l) / 2 - 12,
31
+ width: "100",
32
+ height: "24",
33
+ className: "pointer-events-auto",
34
+ style: { overflow: "visible" },
35
+ children: /* @__PURE__ */ e(
36
+ w,
37
+ {
38
+ circuitBreaker: r.circuitBreaker,
39
+ compact: !0,
40
+ editable: !0,
41
+ onChange: ($) => c?.(r.from, r.to, $)
42
+ }
43
+ )
44
+ }
45
+ )
46
+ ] }, `${r.from}-${r.to}`);
47
+ })
48
+ ] });
49
+ }
50
+ export {
51
+ v as NetworkEdges
52
+ };
@@ -0,0 +1,33 @@
1
+ import type { CircuitBreakerState } from "../../Models/System/index.js";
2
+ import { type EndpointNodeProps } from "./EndpointNode.js";
3
+ import { type EntrypointNodeProps } from "./EntrypointNode.js";
4
+ import { type ProxyNodeProps } from "./ProxyNode.js";
5
+ export type NetworkEntrypoint = EntrypointNodeProps["entrypoint"];
6
+ export type NetworkProxy = ProxyNodeProps["proxy"];
7
+ export type NetworkEndpoint = EndpointNodeProps["endpoint"];
8
+ export type NetworkConnection = {
9
+ from: string;
10
+ to: string;
11
+ type: "entrypoint-proxy";
12
+ } | {
13
+ from: string;
14
+ to: string;
15
+ type: "proxy-endpoint";
16
+ circuitBreaker: {
17
+ status: CircuitBreakerState;
18
+ failureRate: number;
19
+ };
20
+ };
21
+ /** Network topology: the nodes and connections rendered by the map. */
22
+ export interface NetworkTopology {
23
+ entrypoints: NetworkEntrypoint[];
24
+ proxies: NetworkProxy[];
25
+ endpoints: NetworkEndpoint[];
26
+ connections: NetworkConnection[];
27
+ }
28
+ export interface NetworkMapProps {
29
+ /** The topology to render. */
30
+ topology: NetworkTopology;
31
+ className?: string;
32
+ }
33
+ export declare function NetworkMap({ topology, className }: NetworkMapProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,121 @@
1
+ import { jsx as o, jsxs as N } from "react/jsx-runtime";
2
+ import { useState as b, useMemo as w } from "react";
3
+ import { EndpointNode as B } from "./EndpointNode.js";
4
+ import { EntrypointNode as P } from "./EntrypointNode.js";
5
+ import { NetworkEdges as W } from "./NetworkEdges.js";
6
+ import { ProxyNode as k } from "./ProxyNode.js";
7
+ import { Card as C } from "../../Components/Cards/Card.js";
8
+ function E(c, m) {
9
+ const g = (c - 60) / 3, n = Math.min(220, g - 20), r = 70, l = 25, p = 30 + 20, t = m.entrypoints.map((a, s) => ({
10
+ id: a.id,
11
+ x: 30,
12
+ y: p + s * (r + l),
13
+ width: n,
14
+ height: r
15
+ })), d = m.proxies.map((a, s) => {
16
+ const f = m.connections.filter((i) => i.to === a.id && i.type === "entrypoint-proxy").map((i) => t.find((h) => h.id === i.from)).filter(Boolean), x = f.length > 0 ? f.reduce((i, h) => i + h.y + h.height / 2, 0) / f.length - r / 2 : p + s * (r + l * 3);
17
+ return {
18
+ id: a.id,
19
+ x: 30 + g,
20
+ y: Math.max(p, x),
21
+ // Ensure it doesn't go above header
22
+ width: n,
23
+ height: r
24
+ };
25
+ }), e = m.endpoints.map((a, s) => {
26
+ const f = m.connections.filter((i) => i.to === a.id && i.type === "proxy-endpoint").map((i) => d.find((h) => h.id === i.from)).filter(Boolean), x = f.length > 0 ? f.reduce((i, h) => i + h.y + h.height / 2, 0) / f.length - r / 2 : p + s * (r + l);
27
+ return {
28
+ id: a.id,
29
+ x: 30 + g * 2,
30
+ y: Math.max(p, x),
31
+ // Ensure it doesn't go above header
32
+ width: n,
33
+ height: r
34
+ };
35
+ });
36
+ return {
37
+ entrypoints: t,
38
+ proxies: d,
39
+ endpoints: e
40
+ };
41
+ }
42
+ function z({ topology: c, className: m = "" }) {
43
+ const [y, v] = b(c.connections), g = 1200, n = w(() => E(g, c), [c]), r = w(
44
+ () => Math.max(
45
+ ...n.entrypoints.map((t) => t.y + t.height),
46
+ ...n.proxies.map((t) => t.y + t.height),
47
+ ...n.endpoints.map((t) => t.y + t.height)
48
+ ) + 50,
49
+ [n]
50
+ ), l = 30, u = (g - l * 2) / 3, p = (t, d, e) => {
51
+ v(
52
+ (a) => a.map((s) => s.from === t && s.to === d && s.type === "proxy-endpoint" ? { ...s, circuitBreaker: { ...s.circuitBreaker, status: e } } : s)
53
+ );
54
+ };
55
+ return /* @__PURE__ */ o(C, { className: `p-6 ${m} overflow-visible`, children: /* @__PURE__ */ o(
56
+ "div",
57
+ {
58
+ className: "relative w-full overflow-x-auto overflow-y-visible",
59
+ style: { minHeight: r, paddingBottom: "120px" },
60
+ children: /* @__PURE__ */ N("div", { className: "relative", style: { minWidth: 800, width: "100%", minHeight: r }, children: [
61
+ /* @__PURE__ */ o("div", { className: "absolute top-2 text-sm font-semibold text-gray-700", style: { left: l }, children: "Entrypoints" }),
62
+ /* @__PURE__ */ o("div", { className: "absolute top-2 text-sm font-semibold text-gray-700", style: { left: l + u }, children: "Proxies" }),
63
+ /* @__PURE__ */ o(
64
+ "div",
65
+ {
66
+ className: "absolute top-2 text-sm font-semibold text-gray-700",
67
+ style: { left: l + u * 2 },
68
+ children: "Endpoints"
69
+ }
70
+ ),
71
+ c.entrypoints.map((t, d) => {
72
+ const e = n.entrypoints[d];
73
+ return /* @__PURE__ */ o(
74
+ "div",
75
+ {
76
+ className: "absolute",
77
+ style: { left: e.x, top: e.y, width: e.width, height: e.height },
78
+ children: /* @__PURE__ */ o(P, { entrypoint: t })
79
+ },
80
+ t.id
81
+ );
82
+ }),
83
+ c.proxies.map((t, d) => {
84
+ const e = n.proxies[d];
85
+ return /* @__PURE__ */ o(
86
+ "div",
87
+ {
88
+ className: "absolute",
89
+ style: { left: e.x, top: e.y, width: e.width, height: e.height },
90
+ children: /* @__PURE__ */ o(k, { proxy: t })
91
+ },
92
+ t.id
93
+ );
94
+ }),
95
+ c.endpoints.map((t, d) => {
96
+ const e = n.endpoints[d];
97
+ return /* @__PURE__ */ o(
98
+ "div",
99
+ {
100
+ className: "absolute",
101
+ style: { left: e.x, top: e.y, width: e.width, height: e.height },
102
+ children: /* @__PURE__ */ o(B, { endpoint: t })
103
+ },
104
+ t.id
105
+ );
106
+ }),
107
+ /* @__PURE__ */ o(
108
+ W,
109
+ {
110
+ connections: y,
111
+ positions: n,
112
+ onCircuitBreakerChange: p
113
+ }
114
+ )
115
+ ] })
116
+ }
117
+ ) });
118
+ }
119
+ export {
120
+ z as NetworkMap
121
+ };
@@ -0,0 +1,29 @@
1
+ import type { ComponentProps, ReactNode } from "react";
2
+ /** Tones a node can take. Written out rather than composed, because Tailwind scans for whole class names. */
3
+ declare const toneClassName: {
4
+ readonly blue: "bg-blue-50 border-blue-200";
5
+ readonly green: "bg-green-50 border-green-200";
6
+ readonly purple: "bg-purple-50 border-purple-200";
7
+ };
8
+ export interface NetworkNodeProps extends ComponentProps<"div"> {
9
+ /** Which kind of node this is. Carries the tone only; the map's legend carries the meaning. */
10
+ tone: keyof typeof toneClassName;
11
+ /** Name of the node, truncated rather than wrapped, since a node has a fixed height */
12
+ title: string;
13
+ /** Optional element on the title row, such as a health or port badge */
14
+ action?: ReactNode;
15
+ /** Body of the node, under the title row */
16
+ children?: ReactNode;
17
+ }
18
+ /**
19
+ * Shell every node in the network map is drawn in.
20
+ *
21
+ * The three node kinds differ in what they show, not in how they are framed, and the frame is one
22
+ * design decision: box, border, radius, height and title row. It lived in three copies that had to
23
+ * be changed together and nothing said so.
24
+ */
25
+ export declare function NetworkNode({ tone, title, action, children, className, ...props }: NetworkNodeProps): import("react/jsx-runtime").JSX.Element;
26
+ /** A node's secondary line: a URL or a path, monospaced and truncated. */
27
+ export type NetworkNodeDetailProps = ComponentProps<"div">;
28
+ export declare function NetworkNodeDetail({ className, children, ...props }: NetworkNodeDetailProps): import("react/jsx-runtime").JSX.Element;
29
+ export {};
@@ -0,0 +1,31 @@
1
+ import { jsxs as o, jsx as n } from "react/jsx-runtime";
2
+ import { Subheading as a } from "../../Components/Typography/HeadingLevel.js";
3
+ import { twMerge as l } from "tailwind-merge";
4
+ const d = {
5
+ blue: "bg-blue-50 border-blue-200",
6
+ green: "bg-green-50 border-green-200",
7
+ purple: "bg-purple-50 border-purple-200"
8
+ };
9
+ function f({ tone: e, title: r, action: t, children: s, className: i, ...u }) {
10
+ return /* @__PURE__ */ o(
11
+ "div",
12
+ {
13
+ className: l("border rounded-lg p-3 h-full flex flex-col justify-center", d[e], i),
14
+ ...u,
15
+ children: [
16
+ /* @__PURE__ */ o("div", { className: "flex items-center justify-between mb-1", children: [
17
+ /* @__PURE__ */ n(a, { className: "font-semibold text-gray-900 text-sm truncate", children: r }),
18
+ t
19
+ ] }),
20
+ s
21
+ ]
22
+ }
23
+ );
24
+ }
25
+ function g({ className: e, children: r, ...t }) {
26
+ return /* @__PURE__ */ n("div", { className: l("text-xs text-gray-600 font-mono truncate", e), ...t, children: r });
27
+ }
28
+ export {
29
+ f as NetworkNode,
30
+ g as NetworkNodeDetail
31
+ };