@alepha/ui 0.27.0 → 0.27.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 (542) hide show
  1. package/README.md +56 -15
  2. package/dist/components/account/account-connections.d.ts.map +1 -1
  3. package/dist/components/account/account-connections.js +24 -13
  4. package/dist/components/account/account-connections.js.map +1 -1
  5. package/dist/components/account/account-delete-dialog.d.ts.map +1 -1
  6. package/dist/components/account/account-delete-dialog.js +12 -8
  7. package/dist/components/account/account-delete-dialog.js.map +1 -1
  8. package/dist/components/account/account-header.d.ts.map +1 -1
  9. package/dist/components/account/account-header.js +3 -1
  10. package/dist/components/account/account-header.js.map +1 -1
  11. package/dist/components/account/account-keys.d.ts.map +1 -1
  12. package/dist/components/account/account-keys.js +35 -21
  13. package/dist/components/account/account-keys.js.map +1 -1
  14. package/dist/components/account/account-mfa-dialog.d.ts +20 -0
  15. package/dist/components/account/account-mfa-dialog.d.ts.map +1 -0
  16. package/dist/components/account/account-mfa-dialog.js +149 -0
  17. package/dist/components/account/account-mfa-dialog.js.map +1 -0
  18. package/dist/components/account/account-password-dialog.d.ts.map +1 -1
  19. package/dist/components/account/account-password-dialog.js +15 -10
  20. package/dist/components/account/account-password-dialog.js.map +1 -1
  21. package/dist/components/account/account-profile.d.ts.map +1 -1
  22. package/dist/components/account/account-profile.js +25 -25
  23. package/dist/components/account/account-profile.js.map +1 -1
  24. package/dist/components/account/account-router.d.ts +76 -2
  25. package/dist/components/account/account-router.d.ts.map +1 -1
  26. package/dist/components/account/account-router.js +44 -4
  27. package/dist/components/account/account-router.js.map +1 -1
  28. package/dist/components/account/account-security.d.ts +11 -1
  29. package/dist/components/account/account-security.d.ts.map +1 -1
  30. package/dist/components/account/account-security.js +119 -32
  31. package/dist/components/account/account-security.js.map +1 -1
  32. package/dist/components/account/account-sessions.d.ts.map +1 -1
  33. package/dist/components/account/account-sessions.js +46 -24
  34. package/dist/components/account/account-sessions.js.map +1 -1
  35. package/dist/components/admin/admin-jobs-executions-panel.d.ts.map +1 -1
  36. package/dist/components/admin/admin-jobs-executions-panel.js +4 -9
  37. package/dist/components/admin/admin-jobs-executions-panel.js.map +1 -1
  38. package/dist/components/admin/admin-jobs-status-badge.d.ts.map +1 -1
  39. package/dist/components/admin/admin-jobs-status-badge.js +3 -3
  40. package/dist/components/admin/admin-jobs-status-badge.js.map +1 -1
  41. package/dist/components/admin/admin-jobs-status-labels.d.ts +26 -0
  42. package/dist/components/admin/admin-jobs-status-labels.d.ts.map +1 -0
  43. package/dist/components/admin/admin-jobs-status-labels.js +46 -0
  44. package/dist/components/admin/admin-jobs-status-labels.js.map +1 -0
  45. package/dist/components/admin/admin-layout.d.ts.map +1 -1
  46. package/dist/components/admin/admin-layout.js +5 -3
  47. package/dist/components/admin/admin-layout.js.map +1 -1
  48. package/dist/components/admin/admin-notifications-detail-tabs.d.ts +21 -0
  49. package/dist/components/admin/admin-notifications-detail-tabs.d.ts.map +1 -0
  50. package/dist/components/admin/admin-notifications-detail-tabs.js +122 -0
  51. package/dist/components/admin/admin-notifications-detail-tabs.js.map +1 -0
  52. package/dist/components/admin/admin-notifications-detail.d.ts +23 -0
  53. package/dist/components/admin/admin-notifications-detail.d.ts.map +1 -0
  54. package/dist/components/admin/admin-notifications-detail.js +48 -0
  55. package/dist/components/admin/admin-notifications-detail.js.map +1 -0
  56. package/dist/components/admin/admin-notifications-preview-body.d.ts +13 -0
  57. package/dist/components/admin/admin-notifications-preview-body.d.ts.map +1 -0
  58. package/dist/components/admin/admin-notifications-preview-body.js +64 -0
  59. package/dist/components/admin/admin-notifications-preview-body.js.map +1 -0
  60. package/dist/components/admin/admin-notifications-preview-tab.d.ts +24 -0
  61. package/dist/components/admin/admin-notifications-preview-tab.d.ts.map +1 -0
  62. package/dist/components/admin/admin-notifications-preview-tab.js +35 -0
  63. package/dist/components/admin/admin-notifications-preview-tab.js.map +1 -0
  64. package/dist/components/admin/admin-notifications-raw-tab.d.ts +18 -0
  65. package/dist/components/admin/admin-notifications-raw-tab.d.ts.map +1 -0
  66. package/dist/components/admin/admin-notifications-raw-tab.js +53 -0
  67. package/dist/components/admin/admin-notifications-raw-tab.js.map +1 -0
  68. package/dist/components/admin/admin-notifications-status-badge.d.ts +17 -0
  69. package/dist/components/admin/admin-notifications-status-badge.d.ts.map +1 -0
  70. package/dist/components/admin/admin-notifications-status-badge.js +32 -0
  71. package/dist/components/admin/admin-notifications-status-badge.js.map +1 -0
  72. package/dist/components/admin/admin-notifications-status-labels.d.ts +17 -0
  73. package/dist/components/admin/admin-notifications-status-labels.d.ts.map +1 -0
  74. package/dist/components/admin/admin-notifications-status-labels.js +33 -0
  75. package/dist/components/admin/admin-notifications-status-labels.js.map +1 -0
  76. package/dist/components/admin/admin-notifications-status-tones.d.ts +44 -0
  77. package/dist/components/admin/admin-notifications-status-tones.d.ts.map +1 -0
  78. package/dist/components/admin/admin-notifications-status-tones.js +64 -0
  79. package/dist/components/admin/admin-notifications-status-tones.js.map +1 -0
  80. package/dist/components/admin/admin-notifications-template-label.d.ts +16 -0
  81. package/dist/components/admin/admin-notifications-template-label.d.ts.map +1 -0
  82. package/dist/components/admin/admin-notifications-template-label.js +24 -0
  83. package/dist/components/admin/admin-notifications-template-label.js.map +1 -0
  84. package/dist/components/admin/admin-notifications.d.ts +13 -2
  85. package/dist/components/admin/admin-notifications.d.ts.map +1 -1
  86. package/dist/components/admin/admin-notifications.js +264 -29
  87. package/dist/components/admin/admin-notifications.js.map +1 -1
  88. package/dist/components/admin/admin-router.d.ts +29 -2
  89. package/dist/components/admin/admin-router.d.ts.map +1 -1
  90. package/dist/components/admin/admin-router.js +68 -8
  91. package/dist/components/admin/admin-router.js.map +1 -1
  92. package/dist/components/admin/admin-sessions.d.ts.map +1 -1
  93. package/dist/components/admin/admin-sessions.js +1 -1
  94. package/dist/components/admin/admin-sessions.js.map +1 -1
  95. package/dist/components/admin/admin-user-detail-security-tab.d.ts +12 -2
  96. package/dist/components/admin/admin-user-detail-security-tab.d.ts.map +1 -1
  97. package/dist/components/admin/admin-user-detail-security-tab.js +63 -44
  98. package/dist/components/admin/admin-user-detail-security-tab.js.map +1 -1
  99. package/dist/components/admin/admin-user-detail-sessions-tab.d.ts.map +1 -1
  100. package/dist/components/admin/admin-user-detail-sessions-tab.js +1 -1
  101. package/dist/components/admin/admin-user-detail-sessions-tab.js.map +1 -1
  102. package/dist/components/admin/admin-user-detail.d.ts.map +1 -1
  103. package/dist/components/admin/admin-user-detail.js +20 -15
  104. package/dist/components/admin/admin-user-detail.js.map +1 -1
  105. package/dist/components/admin/admin-users.js +1 -1
  106. package/dist/components/admin/admin-users.js.map +1 -1
  107. package/dist/components/admin/admin-workflows-executions-panel.d.ts.map +1 -1
  108. package/dist/components/admin/admin-workflows-executions-panel.js +4 -12
  109. package/dist/components/admin/admin-workflows-executions-panel.js.map +1 -1
  110. package/dist/components/admin/admin-workflows-status-badge.d.ts.map +1 -1
  111. package/dist/components/admin/admin-workflows-status-badge.js +3 -3
  112. package/dist/components/admin/admin-workflows-status-badge.js.map +1 -1
  113. package/dist/components/admin/admin-workflows-status-labels.d.ts +19 -0
  114. package/dist/components/admin/admin-workflows-status-labels.d.ts.map +1 -0
  115. package/dist/components/admin/admin-workflows-status-labels.js +48 -0
  116. package/dist/components/admin/admin-workflows-status-labels.js.map +1 -0
  117. package/dist/components/alepha-table/alepha-table.d.ts +6 -0
  118. package/dist/components/alepha-table/alepha-table.d.ts.map +1 -1
  119. package/dist/components/alepha-table/alepha-table.js +33 -5
  120. package/dist/components/alepha-table/alepha-table.js.map +1 -1
  121. package/dist/components/auth/auth-login.d.ts.map +1 -1
  122. package/dist/components/auth/auth-login.js +27 -17
  123. package/dist/components/auth/auth-login.js.map +1 -1
  124. package/dist/components/auth/auth-mfa-step.d.ts +25 -0
  125. package/dist/components/auth/auth-mfa-step.d.ts.map +1 -0
  126. package/dist/components/auth/auth-mfa-step.js +122 -0
  127. package/dist/components/auth/auth-mfa-step.js.map +1 -0
  128. package/dist/components/auth/auth-register.js +2 -2
  129. package/dist/components/auth/auth-register.js.map +1 -1
  130. package/dist/components/auth/auth-reset-password.js +2 -2
  131. package/dist/components/auth/auth-router.d.ts +20 -0
  132. package/dist/components/auth/auth-router.d.ts.map +1 -1
  133. package/dist/components/auth/provider-labels.d.ts.map +1 -1
  134. package/dist/components/auth/provider-labels.js +1 -0
  135. package/dist/components/auth/provider-labels.js.map +1 -1
  136. package/dist/components/control/control.d.ts +11 -2
  137. package/dist/components/control/control.d.ts.map +1 -1
  138. package/dist/components/control/control.js +7 -2
  139. package/dist/components/control/control.js.map +1 -1
  140. package/dist/components/control-array/control-array.d.ts.map +1 -1
  141. package/dist/components/control-array/control-array.js +55 -10
  142. package/dist/components/control-array/control-array.js.map +1 -1
  143. package/dist/components/control-number/control-number.d.ts +5 -0
  144. package/dist/components/control-number/control-number.d.ts.map +1 -1
  145. package/dist/components/control-number/control-number.js +1 -0
  146. package/dist/components/control-number/control-number.js.map +1 -1
  147. package/dist/components/control-object/control-object.d.ts +12 -1
  148. package/dist/components/control-object/control-object.d.ts.map +1 -1
  149. package/dist/components/control-object/control-object.js +2 -1
  150. package/dist/components/control-object/control-object.js.map +1 -1
  151. package/dist/components/control-password/control-password.d.ts.map +1 -1
  152. package/dist/components/control-password/control-password.js +1 -0
  153. package/dist/components/control-password/control-password.js.map +1 -1
  154. package/dist/components/detail/detail-layout.d.ts +6 -0
  155. package/dist/components/detail/detail-layout.d.ts.map +1 -1
  156. package/dist/components/detail/detail-layout.js +2 -1
  157. package/dist/components/detail/detail-layout.js.map +1 -1
  158. package/dist/components/email-body-frame/email-body-frame.d.ts +37 -0
  159. package/dist/components/email-body-frame/email-body-frame.d.ts.map +1 -0
  160. package/dist/components/email-body-frame/email-body-frame.js +44 -0
  161. package/dist/components/email-body-frame/email-body-frame.js.map +1 -0
  162. package/dist/components/markdown-view/diagram/DiagramLabel.d.ts +33 -0
  163. package/dist/components/markdown-view/diagram/DiagramLabel.d.ts.map +1 -0
  164. package/dist/components/markdown-view/diagram/{FlowchartDiagramLabel.js → DiagramLabel.js} +15 -6
  165. package/dist/components/markdown-view/diagram/DiagramLabel.js.map +1 -0
  166. package/dist/components/markdown-view/diagram/FlowchartDiagram.d.ts +0 -5
  167. package/dist/components/markdown-view/diagram/FlowchartDiagram.d.ts.map +1 -1
  168. package/dist/components/markdown-view/diagram/FlowchartDiagram.js +2 -6
  169. package/dist/components/markdown-view/diagram/FlowchartDiagram.js.map +1 -1
  170. package/dist/components/markdown-view/diagram/FlowchartDiagramCluster.js +1 -1
  171. package/dist/components/markdown-view/diagram/FlowchartDiagramCluster.js.map +1 -1
  172. package/dist/components/markdown-view/diagram/FlowchartDiagramEdge.d.ts.map +1 -1
  173. package/dist/components/markdown-view/diagram/FlowchartDiagramEdge.js +2 -3
  174. package/dist/components/markdown-view/diagram/FlowchartDiagramEdge.js.map +1 -1
  175. package/dist/components/markdown-view/diagram/FlowchartDiagramNode.d.ts.map +1 -1
  176. package/dist/components/markdown-view/diagram/FlowchartDiagramNode.js +2 -3
  177. package/dist/components/markdown-view/diagram/FlowchartDiagramNode.js.map +1 -1
  178. package/dist/components/markdown-view/diagram/MermaidFence.d.ts +20 -11
  179. package/dist/components/markdown-view/diagram/MermaidFence.d.ts.map +1 -1
  180. package/dist/components/markdown-view/diagram/MermaidFence.js +48 -13
  181. package/dist/components/markdown-view/diagram/MermaidFence.js.map +1 -1
  182. package/dist/components/markdown-view/diagram/SequenceDiagram.d.ts +50 -0
  183. package/dist/components/markdown-view/diagram/SequenceDiagram.d.ts.map +1 -0
  184. package/dist/components/markdown-view/diagram/SequenceDiagram.js +141 -0
  185. package/dist/components/markdown-view/diagram/SequenceDiagram.js.map +1 -0
  186. package/dist/components/markdown-view/diagram/SequenceDiagramFragment.d.ts +23 -0
  187. package/dist/components/markdown-view/diagram/SequenceDiagramFragment.d.ts.map +1 -0
  188. package/dist/components/markdown-view/diagram/SequenceDiagramFragment.js +101 -0
  189. package/dist/components/markdown-view/diagram/SequenceDiagramFragment.js.map +1 -0
  190. package/dist/components/markdown-view/diagram/SequenceDiagramMessage.d.ts +23 -0
  191. package/dist/components/markdown-view/diagram/SequenceDiagramMessage.d.ts.map +1 -0
  192. package/dist/components/markdown-view/diagram/SequenceDiagramMessage.js +77 -0
  193. package/dist/components/markdown-view/diagram/SequenceDiagramMessage.js.map +1 -0
  194. package/dist/components/markdown-view/diagram/SequenceDiagramNote.d.ts +16 -0
  195. package/dist/components/markdown-view/diagram/SequenceDiagramNote.d.ts.map +1 -0
  196. package/dist/components/markdown-view/diagram/SequenceDiagramNote.js +39 -0
  197. package/dist/components/markdown-view/diagram/SequenceDiagramNote.js.map +1 -0
  198. package/dist/components/markdown-view/diagram/SequenceDiagramParticipant.d.ts +20 -0
  199. package/dist/components/markdown-view/diagram/SequenceDiagramParticipant.d.ts.map +1 -0
  200. package/dist/components/markdown-view/diagram/SequenceDiagramParticipant.js +61 -0
  201. package/dist/components/markdown-view/diagram/SequenceDiagramParticipant.js.map +1 -0
  202. package/dist/components/markdown-view/diagram/SequenceDiagramParticipantActor.d.ts +27 -0
  203. package/dist/components/markdown-view/diagram/SequenceDiagramParticipantActor.d.ts.map +1 -0
  204. package/dist/components/markdown-view/diagram/SequenceDiagramParticipantActor.js +65 -0
  205. package/dist/components/markdown-view/diagram/SequenceDiagramParticipantActor.js.map +1 -0
  206. package/dist/components/markdown-view/diagram/layoutSequence.d.ts +155 -0
  207. package/dist/components/markdown-view/diagram/layoutSequence.d.ts.map +1 -0
  208. package/dist/components/markdown-view/diagram/layoutSequence.js +478 -0
  209. package/dist/components/markdown-view/diagram/layoutSequence.js.map +1 -0
  210. package/dist/components/markdown-view/diagram/sequenceModel.d.ts +132 -0
  211. package/dist/components/markdown-view/diagram/sequenceModel.d.ts.map +1 -0
  212. package/dist/components/markdown-view/diagram/sequenceModel.js +0 -0
  213. package/dist/components/markdown-view/diagram/sequenceParser.d.ts +32 -0
  214. package/dist/components/markdown-view/diagram/sequenceParser.d.ts.map +1 -0
  215. package/dist/components/markdown-view/diagram/sequenceParser.js +312 -0
  216. package/dist/components/markdown-view/diagram/sequenceParser.js.map +1 -0
  217. package/dist/components/markdown-view/markdown-view.css +65 -0
  218. package/dist/components/markdown-view/markdown-view.d.ts +18 -11
  219. package/dist/components/markdown-view/markdown-view.d.ts.map +1 -1
  220. package/dist/components/markdown-view/markdown-view.js +30 -16
  221. package/dist/components/markdown-view/markdown-view.js.map +1 -1
  222. package/dist/components/nav-shell/nav-page.d.ts +7 -0
  223. package/dist/components/nav-shell/nav-page.d.ts.map +1 -1
  224. package/dist/components/nav-shell/nav-page.js.map +1 -1
  225. package/dist/components/nav-shell/nav-tree-util.d.ts +64 -2
  226. package/dist/components/nav-shell/nav-tree-util.d.ts.map +1 -1
  227. package/dist/components/nav-shell/nav-tree-util.js +29 -6
  228. package/dist/components/nav-shell/nav-tree-util.js.map +1 -1
  229. package/dist/components/nav-shell/spotlight.d.ts +3 -2
  230. package/dist/components/nav-shell/spotlight.d.ts.map +1 -1
  231. package/dist/components/nav-shell/spotlight.js +9 -6
  232. package/dist/components/nav-shell/spotlight.js.map +1 -1
  233. package/dist/components/nav-shell/use-nav-breadcrumbs.d.ts.map +1 -1
  234. package/dist/components/nav-shell/use-nav-breadcrumbs.js +9 -2
  235. package/dist/components/nav-shell/use-nav-breadcrumbs.js.map +1 -1
  236. package/dist/components/nav-shell/use-nav-entries.d.ts +6 -0
  237. package/dist/components/nav-shell/use-nav-entries.d.ts.map +1 -1
  238. package/dist/components/nav-shell/use-nav-entries.js +8 -3
  239. package/dist/components/nav-shell/use-nav-entries.js.map +1 -1
  240. package/dist/components/nav-shell/use-nav-tree.d.ts.map +1 -1
  241. package/dist/components/nav-shell/use-nav-tree.js +1 -1
  242. package/dist/components/nav-shell/use-nav-tree.js.map +1 -1
  243. package/dist/components/ui/alert-dialog.d.ts +1 -1
  244. package/dist/components/ui/alert-dialog.d.ts.map +1 -1
  245. package/dist/components/ui/alert-dialog.js +1 -0
  246. package/dist/components/ui/alert-dialog.js.map +1 -1
  247. package/dist/components/ui/alert.d.ts +2 -2
  248. package/dist/components/ui/alert.d.ts.map +1 -1
  249. package/dist/components/ui/alert.js +1 -0
  250. package/dist/components/ui/alert.js.map +1 -1
  251. package/dist/components/ui/avatar.d.ts +2 -2
  252. package/dist/components/ui/avatar.d.ts.map +1 -1
  253. package/dist/components/ui/avatar.js +1 -0
  254. package/dist/components/ui/avatar.js.map +1 -1
  255. package/dist/components/ui/breadcrumb.d.ts +2 -2
  256. package/dist/components/ui/breadcrumb.d.ts.map +1 -1
  257. package/dist/components/ui/breadcrumb.js +1 -0
  258. package/dist/components/ui/breadcrumb.js.map +1 -1
  259. package/dist/components/ui/card.d.ts +2 -2
  260. package/dist/components/ui/card.d.ts.map +1 -1
  261. package/dist/components/ui/card.js +1 -0
  262. package/dist/components/ui/card.js.map +1 -1
  263. package/dist/components/ui/checkbox.js +1 -1
  264. package/dist/components/ui/checkbox.js.map +1 -1
  265. package/dist/components/ui/combobox.d.ts +1 -1
  266. package/dist/components/ui/combobox.d.ts.map +1 -1
  267. package/dist/components/ui/combobox.js.map +1 -1
  268. package/dist/components/ui/command.d.ts +2 -2
  269. package/dist/components/ui/command.d.ts.map +1 -1
  270. package/dist/components/ui/command.js +1 -0
  271. package/dist/components/ui/command.js.map +1 -1
  272. package/dist/components/ui/context-menu.d.ts +2 -2
  273. package/dist/components/ui/context-menu.d.ts.map +1 -1
  274. package/dist/components/ui/context-menu.js +1 -0
  275. package/dist/components/ui/context-menu.js.map +1 -1
  276. package/dist/components/ui/dialog.d.ts +1 -1
  277. package/dist/components/ui/dialog.d.ts.map +1 -1
  278. package/dist/components/ui/dialog.js +1 -0
  279. package/dist/components/ui/dialog.js.map +1 -1
  280. package/dist/components/ui/drawer.d.ts +1 -1
  281. package/dist/components/ui/drawer.d.ts.map +1 -1
  282. package/dist/components/ui/drawer.js.map +1 -1
  283. package/dist/components/ui/dropdown-menu.d.ts +2 -2
  284. package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
  285. package/dist/components/ui/dropdown-menu.js +1 -0
  286. package/dist/components/ui/dropdown-menu.js.map +1 -1
  287. package/dist/components/ui/empty.d.ts +1 -1
  288. package/dist/components/ui/empty.d.ts.map +1 -1
  289. package/dist/components/ui/empty.js.map +1 -1
  290. package/dist/components/ui/hover-card.d.ts +1 -1
  291. package/dist/components/ui/hover-card.js.map +1 -1
  292. package/dist/components/ui/input-group.d.ts +2 -2
  293. package/dist/components/ui/input-group.d.ts.map +1 -1
  294. package/dist/components/ui/input-group.js +1 -0
  295. package/dist/components/ui/input-group.js.map +1 -1
  296. package/dist/components/ui/input-otp.d.ts +1 -1
  297. package/dist/components/ui/input-otp.d.ts.map +1 -1
  298. package/dist/components/ui/input-otp.js.map +1 -1
  299. package/dist/components/ui/input.d.ts +1 -1
  300. package/dist/components/ui/input.d.ts.map +1 -1
  301. package/dist/components/ui/input.js +1 -0
  302. package/dist/components/ui/input.js.map +1 -1
  303. package/dist/components/ui/label.d.ts +1 -1
  304. package/dist/components/ui/label.d.ts.map +1 -1
  305. package/dist/components/ui/label.js +1 -0
  306. package/dist/components/ui/label.js.map +1 -1
  307. package/dist/components/ui/menubar.d.ts +2 -2
  308. package/dist/components/ui/menubar.d.ts.map +1 -1
  309. package/dist/components/ui/menubar.js +1 -0
  310. package/dist/components/ui/menubar.js.map +1 -1
  311. package/dist/components/ui/pagination.d.ts +1 -1
  312. package/dist/components/ui/pagination.d.ts.map +1 -1
  313. package/dist/components/ui/pagination.js +1 -0
  314. package/dist/components/ui/pagination.js.map +1 -1
  315. package/dist/components/ui/popover.d.ts +1 -1
  316. package/dist/components/ui/popover.d.ts.map +1 -1
  317. package/dist/components/ui/popover.js +1 -0
  318. package/dist/components/ui/popover.js.map +1 -1
  319. package/dist/components/ui/progress.d.ts +1 -1
  320. package/dist/components/ui/progress.d.ts.map +1 -1
  321. package/dist/components/ui/progress.js.map +1 -1
  322. package/dist/components/ui/segmented.d.ts +11 -0
  323. package/dist/components/ui/segmented.d.ts.map +1 -1
  324. package/dist/components/ui/segmented.js +6 -2
  325. package/dist/components/ui/segmented.js.map +1 -1
  326. package/dist/components/ui/select.d.ts +1 -1
  327. package/dist/components/ui/select.d.ts.map +1 -1
  328. package/dist/components/ui/select.js +1 -0
  329. package/dist/components/ui/select.js.map +1 -1
  330. package/dist/components/ui/sheet.d.ts +2 -2
  331. package/dist/components/ui/sheet.d.ts.map +1 -1
  332. package/dist/components/ui/sheet.js +1 -0
  333. package/dist/components/ui/sheet.js.map +1 -1
  334. package/dist/components/ui/switch.js +1 -1
  335. package/dist/components/ui/switch.js.map +1 -1
  336. package/dist/components/ui/table.d.ts +2 -2
  337. package/dist/components/ui/table.d.ts.map +1 -1
  338. package/dist/components/ui/table.js +1 -0
  339. package/dist/components/ui/table.js.map +1 -1
  340. package/dist/components/ui/tabs.d.ts +1 -1
  341. package/dist/components/ui/tabs.d.ts.map +1 -1
  342. package/dist/components/ui/tabs.js.map +1 -1
  343. package/dist/components/ui/textarea.d.ts +1 -1
  344. package/dist/components/ui/textarea.d.ts.map +1 -1
  345. package/dist/components/ui/textarea.js +1 -0
  346. package/dist/components/ui/textarea.js.map +1 -1
  347. package/dist/components/ui/tooltip.d.ts +1 -11
  348. package/dist/components/ui/tooltip.d.ts.map +1 -1
  349. package/dist/components/ui/tooltip.js +0 -10
  350. package/dist/components/ui/tooltip.js.map +1 -1
  351. package/dist/hooks/use-mobile.d.ts +1 -1
  352. package/dist/hooks/use-mobile.js +1 -1
  353. package/dist/hooks/use-mobile.js.map +1 -1
  354. package/dist/lib/i18n-fr.d.ts.map +1 -1
  355. package/dist/lib/i18n-fr.js +252 -2
  356. package/dist/lib/i18n-fr.js.map +1 -1
  357. package/package.json +5 -5
  358. package/src/components/account/__tests__/account-router.spec.ts +25 -0
  359. package/src/components/account/__tests__/account-security-mfa-gate.browser.spec.tsx +76 -0
  360. package/src/components/account/account-connections.tsx +50 -18
  361. package/src/components/account/account-delete-dialog.tsx +24 -9
  362. package/src/components/account/account-header.tsx +4 -1
  363. package/src/components/account/account-keys.tsx +73 -29
  364. package/src/components/account/account-mfa-dialog.tsx +233 -0
  365. package/src/components/account/account-password-dialog.tsx +42 -12
  366. package/src/components/account/account-profile.tsx +66 -25
  367. package/src/components/account/account-router.tsx +47 -6
  368. package/src/components/account/account-security.tsx +209 -22
  369. package/src/components/account/account-sessions.tsx +87 -22
  370. package/src/components/action-error-toaster/__tests__/action-error-toaster.browser.spec.tsx +114 -0
  371. package/src/components/admin/__tests__/admin-nav-i18n.browser.spec.tsx +152 -0
  372. package/src/components/admin/__tests__/admin-notifications-preview-body.browser.spec.tsx +128 -0
  373. package/src/components/admin/__tests__/admin-notifications-raw-tab.browser.spec.tsx +76 -0
  374. package/src/components/admin/__tests__/admin-notifications-status-badge.browser.spec.tsx +121 -0
  375. package/src/components/admin/__tests__/admin-router.spec.ts +27 -0
  376. package/src/components/admin/__tests__/admin-status-labels.browser.spec.tsx +152 -0
  377. package/src/components/admin/__tests__/admin-user-detail-security-tab.browser.spec.tsx +92 -0
  378. package/src/components/admin/admin-jobs-executions-panel.tsx +8 -11
  379. package/src/components/admin/admin-jobs-status-badge.tsx +4 -5
  380. package/src/components/admin/admin-jobs-status-labels.ts +46 -0
  381. package/src/components/admin/admin-layout.tsx +9 -3
  382. package/src/components/admin/admin-notifications-detail-tabs.tsx +167 -0
  383. package/src/components/admin/admin-notifications-detail.tsx +100 -0
  384. package/src/components/admin/admin-notifications-preview-body.tsx +104 -0
  385. package/src/components/admin/admin-notifications-preview-tab.tsx +55 -0
  386. package/src/components/admin/admin-notifications-raw-tab.tsx +76 -0
  387. package/src/components/admin/admin-notifications-status-badge.tsx +44 -0
  388. package/src/components/admin/admin-notifications-status-labels.ts +42 -0
  389. package/src/components/admin/admin-notifications-status-tones.ts +85 -0
  390. package/src/components/admin/admin-notifications-template-label.ts +22 -0
  391. package/src/components/admin/admin-notifications.tsx +398 -31
  392. package/src/components/admin/admin-router.tsx +65 -8
  393. package/src/components/admin/admin-sessions.tsx +10 -3
  394. package/src/components/admin/admin-user-detail-security-tab.tsx +70 -5
  395. package/src/components/admin/admin-user-detail-sessions-tab.tsx +10 -3
  396. package/src/components/admin/admin-user-detail.tsx +92 -23
  397. package/src/components/admin/admin-users.tsx +1 -1
  398. package/src/components/admin/admin-workflows-executions-panel.tsx +8 -16
  399. package/src/components/admin/admin-workflows-status-badge.tsx +4 -5
  400. package/src/components/admin/admin-workflows-status-labels.ts +51 -0
  401. package/src/components/alepha-table/__tests__/alepha-table-row-key.browser.spec.tsx +106 -0
  402. package/src/components/alepha-table/alepha-table.tsx +50 -10
  403. package/src/components/auth/auth-login.tsx +37 -18
  404. package/src/components/auth/auth-mfa-step.tsx +177 -0
  405. package/src/components/auth/auth-register.tsx +1 -1
  406. package/src/components/auth/provider-labels.ts +4 -0
  407. package/src/components/control/__tests__/control-autofocus.browser.spec.tsx +107 -0
  408. package/src/components/control/control.tsx +20 -5
  409. package/src/components/control-array/__tests__/control-array-child-change.browser.spec.tsx +90 -0
  410. package/src/components/control-array/control-array.tsx +85 -13
  411. package/src/components/control-number/control-number.tsx +7 -0
  412. package/src/components/control-object/__tests__/control-object-clear.browser.spec.tsx +100 -0
  413. package/src/components/control-object/control-object.tsx +21 -2
  414. package/src/components/control-password/control-password.tsx +2 -1
  415. package/src/components/detail/__tests__/detail-layout.browser.spec.tsx +36 -0
  416. package/src/components/detail/detail-layout.tsx +20 -1
  417. package/src/components/email-body-frame/__tests__/email-body-frame.browser.spec.tsx +52 -0
  418. package/src/components/email-body-frame/email-body-frame.tsx +81 -0
  419. package/src/components/markdown-view/__tests__/markdown-view-mermaid.browser.spec.tsx +65 -2
  420. package/src/components/markdown-view/diagram/{FlowchartDiagramLabel.tsx → DiagramLabel.tsx} +14 -4
  421. package/src/components/markdown-view/diagram/FlowchartDiagram.tsx +1 -6
  422. package/src/components/markdown-view/diagram/FlowchartDiagramCluster.tsx +1 -1
  423. package/src/components/markdown-view/diagram/FlowchartDiagramEdge.tsx +2 -3
  424. package/src/components/markdown-view/diagram/FlowchartDiagramNode.tsx +2 -3
  425. package/src/components/markdown-view/diagram/MermaidFence.tsx +65 -15
  426. package/src/components/markdown-view/diagram/SequenceDiagram.tsx +203 -0
  427. package/src/components/markdown-view/diagram/SequenceDiagramFragment.tsx +120 -0
  428. package/src/components/markdown-view/diagram/SequenceDiagramMessage.tsx +100 -0
  429. package/src/components/markdown-view/diagram/SequenceDiagramNote.tsx +46 -0
  430. package/src/components/markdown-view/diagram/SequenceDiagramParticipant.tsx +80 -0
  431. package/src/components/markdown-view/diagram/SequenceDiagramParticipantActor.tsx +74 -0
  432. package/src/components/markdown-view/diagram/__tests__/sequence-diagram.browser.spec.tsx +267 -0
  433. package/src/components/markdown-view/diagram/layoutSequence.spec.ts +535 -0
  434. package/src/components/markdown-view/diagram/layoutSequence.ts +764 -0
  435. package/src/components/markdown-view/diagram/sequenceModel.ts +141 -0
  436. package/src/components/markdown-view/diagram/sequenceParser.spec.ts +495 -0
  437. package/src/components/markdown-view/diagram/sequenceParser.ts +443 -0
  438. package/src/components/markdown-view/markdown-view.css +65 -0
  439. package/src/components/markdown-view/markdown-view.tsx +34 -16
  440. package/src/components/nav-shell/__tests__/nav-tree-util.spec.ts +107 -1
  441. package/src/components/nav-shell/nav-page.tsx +8 -0
  442. package/src/components/nav-shell/nav-tree-util.ts +95 -2
  443. package/src/components/nav-shell/spotlight.tsx +22 -8
  444. package/src/components/nav-shell/use-nav-breadcrumbs.ts +9 -2
  445. package/src/components/nav-shell/use-nav-entries.ts +18 -2
  446. package/src/components/nav-shell/use-nav-tree.ts +4 -1
  447. package/src/components/ui/alert-dialog.tsx +1 -1
  448. package/src/components/ui/alert.tsx +2 -2
  449. package/src/components/ui/avatar.tsx +3 -3
  450. package/src/components/ui/breadcrumb.tsx +3 -3
  451. package/src/components/ui/card.tsx +5 -5
  452. package/src/components/ui/checkbox.tsx +1 -1
  453. package/src/components/ui/combobox.tsx +8 -8
  454. package/src/components/ui/command.tsx +4 -4
  455. package/src/components/ui/context-menu.tsx +7 -7
  456. package/src/components/ui/dialog.tsx +1 -1
  457. package/src/components/ui/drawer.tsx +6 -6
  458. package/src/components/ui/dropdown-menu.tsx +8 -14
  459. package/src/components/ui/empty.tsx +3 -3
  460. package/src/components/ui/hover-card.tsx +1 -1
  461. package/src/components/ui/input-group.tsx +2 -2
  462. package/src/components/ui/input-otp.tsx +1 -1
  463. package/src/components/ui/input.tsx +1 -1
  464. package/src/components/ui/label.tsx +1 -1
  465. package/src/components/ui/menubar.tsx +9 -9
  466. package/src/components/ui/pagination.tsx +1 -1
  467. package/src/components/ui/popover.tsx +1 -1
  468. package/src/components/ui/progress.tsx +1 -1
  469. package/src/components/ui/segmented.tsx +28 -0
  470. package/src/components/ui/select.tsx +1 -1
  471. package/src/components/ui/sheet.tsx +4 -4
  472. package/src/components/ui/switch.tsx +1 -1
  473. package/src/components/ui/table.tsx +6 -9
  474. package/src/components/ui/tabs.tsx +1 -1
  475. package/src/components/ui/textarea.tsx +1 -1
  476. package/src/components/ui/tooltip.tsx +3 -11
  477. package/src/components/use-dialog/__tests__/use-dialog-providers.browser.spec.tsx +61 -0
  478. package/src/hooks/use-mobile.ts +1 -1
  479. package/src/lib/__tests__/i18n-fr.spec.ts +27 -5
  480. package/src/lib/i18n-fr.ts +308 -1
  481. package/dist/components/language-toggle/language-toggle.d.ts +0 -8
  482. package/dist/components/language-toggle/language-toggle.d.ts.map +0 -1
  483. package/dist/components/language-toggle/language-toggle.js +0 -49
  484. package/dist/components/language-toggle/language-toggle.js.map +0 -1
  485. package/dist/components/markdown-view/diagram/FlowchartDiagramLabel.d.ts +0 -23
  486. package/dist/components/markdown-view/diagram/FlowchartDiagramLabel.d.ts.map +0 -1
  487. package/dist/components/markdown-view/diagram/FlowchartDiagramLabel.js.map +0 -1
  488. package/dist/components/ui/accordion.d.ts +0 -7
  489. package/dist/components/ui/accordion.d.ts.map +0 -1
  490. package/dist/components/ui/accordion.js +0 -55
  491. package/dist/components/ui/accordion.js.map +0 -1
  492. package/dist/components/ui/aspect-ratio.d.ts +0 -5
  493. package/dist/components/ui/aspect-ratio.d.ts.map +0 -1
  494. package/dist/components/ui/aspect-ratio.js +0 -15
  495. package/dist/components/ui/aspect-ratio.js.map +0 -1
  496. package/dist/components/ui/carousel.d.ts +0 -29
  497. package/dist/components/ui/carousel.d.ts.map +0 -1
  498. package/dist/components/ui/carousel.js +0 -144
  499. package/dist/components/ui/carousel.js.map +0 -1
  500. package/dist/components/ui/collapsible.d.ts +0 -6
  501. package/dist/components/ui/collapsible.d.ts.map +0 -1
  502. package/dist/components/ui/collapsible.js +0 -26
  503. package/dist/components/ui/collapsible.js.map +0 -1
  504. package/dist/components/ui/direction.d.ts +0 -2
  505. package/dist/components/ui/direction.d.ts.map +0 -1
  506. package/dist/components/ui/direction.js +0 -3
  507. package/dist/components/ui/item.d.ts +0 -23
  508. package/dist/components/ui/item.d.ts.map +0 -1
  509. package/dist/components/ui/item.js +0 -122
  510. package/dist/components/ui/item.js.map +0 -1
  511. package/dist/components/ui/navigation-menu.d.ts +0 -12
  512. package/dist/components/ui/navigation-menu.d.ts.map +0 -1
  513. package/dist/components/ui/navigation-menu.js +0 -84
  514. package/dist/components/ui/navigation-menu.js.map +0 -1
  515. package/dist/components/ui/radio-group.d.ts +0 -6
  516. package/dist/components/ui/radio-group.d.ts.map +0 -1
  517. package/dist/components/ui/radio-group.js +0 -29
  518. package/dist/components/ui/radio-group.js.map +0 -1
  519. package/dist/components/ui/scroll-area.d.ts +0 -5
  520. package/dist/components/ui/scroll-area.d.ts.map +0 -1
  521. package/dist/components/ui/scroll-area.js +0 -38
  522. package/dist/components/ui/scroll-area.js.map +0 -1
  523. package/dist/components/ui/toggle-group.d.ts +0 -12
  524. package/dist/components/ui/toggle-group.d.ts.map +0 -1
  525. package/dist/components/ui/toggle-group.js +0 -60
  526. package/dist/components/ui/toggle-group.js.map +0 -1
  527. package/dist/components/ui/toggle.d.ts +0 -9
  528. package/dist/components/ui/toggle.d.ts.map +0 -1
  529. package/dist/components/ui/toggle.js +0 -38
  530. package/dist/components/ui/toggle.js.map +0 -1
  531. package/src/components/language-toggle/language-toggle.tsx +0 -66
  532. package/src/components/ui/accordion.tsx +0 -77
  533. package/src/components/ui/aspect-ratio.tsx +0 -22
  534. package/src/components/ui/carousel.tsx +0 -258
  535. package/src/components/ui/collapsible.tsx +0 -21
  536. package/src/components/ui/direction.tsx +0 -6
  537. package/src/components/ui/item.tsx +0 -200
  538. package/src/components/ui/navigation-menu.tsx +0 -170
  539. package/src/components/ui/radio-group.tsx +0 -37
  540. package/src/components/ui/scroll-area.tsx +0 -53
  541. package/src/components/ui/toggle-group.tsx +0 -93
  542. package/src/components/ui/toggle.tsx +0 -44
@@ -54,16 +54,79 @@ describe("MarkdownView - mermaid fences", () => {
54
54
  expect(container.querySelector("svg")).toBeNull();
55
55
  });
56
56
 
57
+ it("renders a sequenceDiagram fence as an svg", async () => {
58
+ const { container } = render(
59
+ <MarkdownView
60
+ content={fence("mermaid", "sequenceDiagram\n A ->> B: hello")}
61
+ />,
62
+ );
63
+
64
+ await waitFor(() => expect(container.querySelector("svg")).not.toBeNull());
65
+ expect(container.textContent).toContain("hello");
66
+ });
67
+
68
+ it("dispatches on the header, not on what happens to parse", async () => {
69
+ const { container } = render(
70
+ <MarkdownView
71
+ content={[
72
+ fence("mermaid", "flowchart LR\n A[Node] --> B"),
73
+ fence("mermaid", "sequenceDiagram\n A ->> B: msg"),
74
+ ].join("\n\n")}
75
+ />,
76
+ );
77
+
78
+ await waitFor(() =>
79
+ expect(container.querySelectorAll("svg")).toHaveLength(2),
80
+ );
81
+ // The flowchart scales into the column and has no scroll frame; the
82
+ // sequence diagram takes its natural width inside one.
83
+ expect(container.querySelectorAll('[role="region"]')).toHaveLength(1);
84
+ expect(container.textContent).toContain("Node");
85
+ expect(container.textContent).toContain("msg");
86
+ });
87
+
57
88
  it("falls back to the code block for a diagram type outside the subset", async () => {
58
89
  const { container } = render(
59
90
  <MarkdownView
60
- content={fence("mermaid", "sequenceDiagram\n A ->> B: hi")}
91
+ content={fence("mermaid", "classDiagram\n Animal <|-- Duck")}
92
+ />,
93
+ );
94
+
95
+ await waitFor(() => expect(container.querySelector("pre")).not.toBeNull());
96
+ expect(container.querySelector("svg")).toBeNull();
97
+ expect(container.textContent).toContain("classDiagram");
98
+ });
99
+
100
+ it("falls back to the code block for a refused sequence construct", async () => {
101
+ const { container } = render(
102
+ <MarkdownView
103
+ content={fence(
104
+ "mermaid",
105
+ "sequenceDiagram\n par both at once\n A ->> B: one\n end",
106
+ )}
61
107
  />,
62
108
  );
63
109
 
110
+ // `par` refuses rather than drawing its branches one under the other,
111
+ // which would assert an ordering that is false.
64
112
  await waitFor(() => expect(container.querySelector("pre")).not.toBeNull());
65
113
  expect(container.querySelector("svg")).toBeNull();
66
- expect(container.textContent).toContain("sequenceDiagram");
114
+ });
115
+
116
+ it("frames a sequence diagram so a wide one can be scrolled", async () => {
117
+ const { container } = render(
118
+ <MarkdownView
119
+ content={fence("mermaid", "sequenceDiagram\n A ->> B: hi")}
120
+ />,
121
+ );
122
+
123
+ await waitFor(() => expect(container.querySelector("svg")).not.toBeNull());
124
+ const frame = container.querySelector('[role="region"]');
125
+ // A scrollable region that cannot take focus cannot be scrolled from a
126
+ // keyboard, so whatever is past the fold is simply unreachable.
127
+ expect(frame?.getAttribute("tabindex")).toBe("0");
128
+ expect(frame?.getAttribute("aria-label")).toBeTruthy();
129
+ expect(frame?.className).toContain("alepha-diagram-scroll");
67
130
  });
68
131
 
69
132
  it("keeps the diagram source readable in the fallback", async () => {
@@ -2,10 +2,18 @@ import * as React from "react";
2
2
 
3
3
  void React;
4
4
 
5
- import { round } from "./FlowchartDiagram.tsx";
6
5
  import { DIAGRAM_LINE_HEIGHT } from "./textMetrics.ts";
7
6
 
8
- export interface FlowchartDiagramLabelProps {
7
+ /**
8
+ * Two decimals is plenty for a diagram and keeps the emitted attributes
9
+ * readable; a layout's raw coordinates carry a dozen.
10
+ *
11
+ * It lives here rather than in either emitter because both of them draw
12
+ * with it, the same way both measure with `textMetrics.ts`.
13
+ */
14
+ export const round = (value: number): number => Math.round(value * 100) / 100;
15
+
16
+ export interface DiagramLabelProps {
9
17
  /**
10
18
  * Already wrapped and capped by `measureLabel` - draw exactly these.
11
19
  */
@@ -17,7 +25,9 @@ export interface FlowchartDiagramLabelProps {
17
25
  }
18
26
 
19
27
  /**
20
- * A centred, multi-line label, one `tspan` per line.
28
+ * A centred, multi-line label, one `tspan` per line. Shared by both
29
+ * diagram pipelines: a flowchart node label and a sequence message label
30
+ * are the same drawing problem.
21
31
  *
22
32
  * The line box has to match `DIAGRAM_LINE_HEIGHT`, which is what
23
33
  * `measureLabel` sized the box with: text and box disagreeing is the
@@ -26,7 +36,7 @@ export interface FlowchartDiagramLabelProps {
26
36
  * `dominant-baseline` is not used: jsdom and older Safari disagree about it,
27
37
  * and shifting the first line by hand is arithmetic that works everywhere.
28
38
  */
29
- export const FlowchartDiagramLabel = (props: FlowchartDiagramLabelProps) => {
39
+ export const DiagramLabel = (props: DiagramLabelProps) => {
30
40
  const lineBox = props.fontSize * DIAGRAM_LINE_HEIGHT;
31
41
  // The stack is centred on `centerY`, then each line sits on its own
32
42
  // baseline. `0.36em` is the optical centre of a lowercase run.
@@ -4,6 +4,7 @@ void React;
4
4
 
5
5
  import { useId } from "react";
6
6
 
7
+ import { round } from "./DiagramLabel.tsx";
7
8
  import { FlowchartDiagramCluster } from "./FlowchartDiagramCluster.tsx";
8
9
  import { FlowchartDiagramEdge } from "./FlowchartDiagramEdge.tsx";
9
10
  import { FlowchartDiagramNode } from "./FlowchartDiagramNode.tsx";
@@ -128,9 +129,3 @@ export const FlowchartDiagram = (props: FlowchartDiagramProps) => {
128
129
  </svg>
129
130
  );
130
131
  };
131
-
132
- /**
133
- * Two decimals is plenty for a diagram and keeps the emitted attributes
134
- * readable; graphre's raw coordinates carry a dozen.
135
- */
136
- export const round = (value: number): number => Math.round(value * 100) / 100;
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
 
3
3
  void React;
4
4
 
5
- import { round } from "./FlowchartDiagram.tsx";
5
+ import { round } from "./DiagramLabel.tsx";
6
6
  import type { PositionedCluster } from "./layoutFlowchart.ts";
7
7
  import { DIAGRAM_FONT_SIZE } from "./textMetrics.ts";
8
8
 
@@ -2,8 +2,7 @@ import * as React from "react";
2
2
 
3
3
  void React;
4
4
 
5
- import { round } from "./FlowchartDiagram.tsx";
6
- import { FlowchartDiagramLabel } from "./FlowchartDiagramLabel.tsx";
5
+ import { DiagramLabel, round } from "./DiagramLabel.tsx";
7
6
  import type { PositionedEdge } from "./layoutFlowchart.ts";
8
7
 
9
8
  export interface FlowchartDiagramEdgeProps {
@@ -58,7 +57,7 @@ export const FlowchartDiagramEdge = (props: FlowchartDiagramEdgeProps) => {
58
57
  ry={4}
59
58
  fill="var(--background)"
60
59
  />
61
- <FlowchartDiagramLabel
60
+ <DiagramLabel
62
61
  lines={edge.label.lines}
63
62
  centerX={edge.label.x + edge.label.width / 2}
64
63
  centerY={edge.label.y + edge.label.height / 2}
@@ -2,8 +2,7 @@ import * as React from "react";
2
2
 
3
3
  void React;
4
4
 
5
- import { round } from "./FlowchartDiagram.tsx";
6
- import { FlowchartDiagramLabel } from "./FlowchartDiagramLabel.tsx";
5
+ import { DiagramLabel, round } from "./DiagramLabel.tsx";
7
6
  import type { PositionedNode } from "./layoutFlowchart.ts";
8
7
 
9
8
  export interface FlowchartDiagramNodeProps {
@@ -66,7 +65,7 @@ export const FlowchartDiagramNode = (props: FlowchartDiagramNodeProps) => {
66
65
  strokeWidth={1.25}
67
66
  />
68
67
  )}
69
- <FlowchartDiagramLabel
68
+ <DiagramLabel
70
69
  lines={node.lines}
71
70
  centerX={x + width / 2}
72
71
  centerY={y + height / 2}
@@ -7,6 +7,9 @@ import type { ReactNode } from "react";
7
7
  import { FlowchartDiagram } from "./FlowchartDiagram.tsx";
8
8
  import { parseFlowchart } from "./flowchartParser.ts";
9
9
  import { layoutFlowchart } from "./layoutFlowchart.ts";
10
+ import { layoutSequence } from "./layoutSequence.ts";
11
+ import { SequenceDiagram } from "./SequenceDiagram.tsx";
12
+ import { parseSequence } from "./sequenceParser.ts";
10
13
 
11
14
  export interface MermaidFenceProps {
12
15
  /**
@@ -14,31 +17,78 @@ export interface MermaidFenceProps {
14
17
  */
15
18
  source: string;
16
19
  /**
17
- * What to render when the source is not a flowchart we can draw. Always
18
- * the code block the fence would otherwise have produced.
20
+ * What to render when the source is not a diagram we can draw. Always the
21
+ * code block the fence would otherwise have produced.
19
22
  */
20
23
  fallback: ReactNode;
21
24
  }
22
25
 
23
26
  /**
24
- * The lazy chunk's entry point: parse, lay out, draw - or hand back the
25
- * fence untouched.
27
+ * The lazy chunk's entry point, and the dispatcher between the two
28
+ * pipelines: read the header, parse, lay out, draw - or hand back the fence
29
+ * untouched.
26
30
  *
27
- * This is the ONLY module that pulls in the parser, `graphre` and the
31
+ * This is the ONLY module that pulls in either parser, `graphre` and either
28
32
  * emitter, and it is imported through `lazy()` from `markdown-view.tsx`.
29
- * That is the epic's whole constraint: a document with no diagram must pay
30
- * nothing at all.
33
+ * That is the whole constraint the diagram layer lives under: a document
34
+ * with no diagram must pay nothing at all.
31
35
  *
32
- * **Failure is always the code block, silently.** Agents write invalid
33
- * mermaid, and a red error box in the middle of a folio is worse than a grey
34
- * fence. A parse failure, a graph past the cap, and a `sequenceDiagram` all
35
- * land here identically.
36
+ * **The two pipelines are parallel, not shared.** A flowchart ranks a node
37
+ * graph and needs a layout library; a sequence diagram has both axes
38
+ * decided by source order and needs none. Lifelines, ordered messages and
39
+ * fragment boxes have essentially nothing in common with nodes, edges and
40
+ * clusters, so one model type for both would make both halves worse. What
41
+ * they do share is the text metrics, the theming, the marker namespacing,
42
+ * the error boundary and the policy below.
43
+ *
44
+ * **Failure is always the code block, silently.** A parse failure, a
45
+ * refused construct, a diagram past its cap, and a `classDiagram` all land
46
+ * here identically. Agents write invalid mermaid, and a red error box in
47
+ * the middle of a folio is worse than a grey fence.
36
48
  */
37
49
  export const MermaidFence = (props: MermaidFenceProps) => {
38
- const model = parseFlowchart(props.source);
39
- const graph = model ? layoutFlowchart(model) : undefined;
40
- if (!graph) return <>{props.fallback}</>;
41
- return <FlowchartDiagram graph={graph} />;
50
+ const kind = diagramKind(props.source);
51
+
52
+ if (kind === "sequence") {
53
+ const model = parseSequence(props.source);
54
+ const diagram = model ? layoutSequence(model) : undefined;
55
+ return diagram ? (
56
+ <SequenceDiagram diagram={diagram} />
57
+ ) : (
58
+ <>{props.fallback}</>
59
+ );
60
+ }
61
+
62
+ if (kind === "flowchart") {
63
+ const model = parseFlowchart(props.source);
64
+ const graph = model ? layoutFlowchart(model) : undefined;
65
+ return graph ? <FlowchartDiagram graph={graph} /> : <>{props.fallback}</>;
66
+ }
67
+
68
+ return <>{props.fallback}</>;
69
+ };
70
+
71
+ /**
72
+ * Which pipeline a fence belongs to, from its header line.
73
+ *
74
+ * The header is the first line that is not YAML frontmatter, a
75
+ * `%%{init: …}%%` directive or a `%%` comment - mermaid allows all three
76
+ * above it. Both parsers check their own header again, because both are
77
+ * independently callable; this exists so an unsupported diagram type never
78
+ * enters a parser at all.
79
+ */
80
+ const diagramKind = (source: string): "sequence" | "flowchart" | undefined => {
81
+ const header = source
82
+ .replace(/^\s*---\r?\n[\s\S]*?\r?\n---\r?\n/, "")
83
+ .replace(/%%\{[\s\S]*?\}%%/g, "")
84
+ .split(/\r?\n/)
85
+ .map((line) => line.replace(/%%.*$/, "").trim())
86
+ .find(Boolean);
87
+
88
+ if (!header) return undefined;
89
+ if (/^sequenceDiagram\b/i.test(header)) return "sequence";
90
+ if (/^(?:flowchart|graph)\b/i.test(header)) return "flowchart";
91
+ return undefined;
42
92
  };
43
93
 
44
94
  // Default export as well, so the `lazy()` call site stays a bare
@@ -0,0 +1,203 @@
1
+ import * as React from "react";
2
+
3
+ void React;
4
+
5
+ import { useId } from "react";
6
+
7
+ import { round } from "./DiagramLabel.tsx";
8
+ import type { PositionedSequence } from "./layoutSequence.ts";
9
+ import { SequenceDiagramFragment } from "./SequenceDiagramFragment.tsx";
10
+ import { SequenceDiagramMessage } from "./SequenceDiagramMessage.tsx";
11
+ import { SequenceDiagramNote } from "./SequenceDiagramNote.tsx";
12
+ import { SequenceDiagramParticipant } from "./SequenceDiagramParticipant.tsx";
13
+ import { DIAGRAM_FONT_FAMILY } from "./textMetrics.ts";
14
+
15
+ export interface SequenceDiagramProps {
16
+ diagram: PositionedSequence;
17
+ /**
18
+ * Read out to assistive technology as the diagram's name.
19
+ */
20
+ title?: string;
21
+ }
22
+
23
+ /**
24
+ * Draw a laid-out sequence diagram as themed SVG.
25
+ *
26
+ * Everything the flowchart emitter settled applies here unchanged, and none
27
+ * of it is optional:
28
+ *
29
+ * ## React elements, not an HTML string
30
+ *
31
+ * `markdown-view.tsx` carries an explicit rule that no raw HTML is ever
32
+ * promoted to markup, because it renders one user's content to another.
33
+ * Emitting elements means labels are escaped by React itself and
34
+ * `dangerouslySetInnerHTML` never appears on this path.
35
+ *
36
+ * ## Theming is the point
37
+ *
38
+ * Colours come from `--primary`, `--border`, `--muted-foreground`, `--card`
39
+ * and `--muted` through `var(...)`, so dark mode works with no second
40
+ * palette and no theme prop. That is the thing mermaid can structurally
41
+ * never give us, and the whole reason drawing is our own code.
42
+ *
43
+ * ## The font is pinned, never inherited
44
+ *
45
+ * Folio view mode sets prose in Literata at 16.5px and lazy-loads it. The
46
+ * width table is generated against Inter at `DIAGRAM_FONT_SIZE`, so
47
+ * inheriting would make text and box disagree per surface and shift when
48
+ * the serif lands. `fontFamily` / `fontSize` are camelCase, not the
49
+ * hyphenated spelling: React renders the same SVG presentation attributes
50
+ * either way, but hyphenated logs `Invalid DOM property` on every render,
51
+ * from a component mounted on every markdown surface in the app.
52
+ *
53
+ * ## Unlike a flowchart, the width is natural rather than fitted
54
+ *
55
+ * A flowchart is roughly as tall as it is wide and scales into the prose
56
+ * column. A sequence diagram's width is driven by participant count with
57
+ * nothing to wrap, so scaling eight participants into a phone column puts
58
+ * the labels at around 5px with no way for the reader to recover. So the
59
+ * SVG takes its natural width and this component frames it in a scroll
60
+ * container, with the keyboard affordances that come with one.
61
+ */
62
+ export const SequenceDiagram = (props: SequenceDiagramProps) => {
63
+ const diagram = props.diagram;
64
+ // SVG marker ids are global to the DOCUMENT: two diagrams on one page
65
+ // with the same arrowhead id fight, and the loser's arrows vanish.
66
+ const scope = useId().replace(/[^\w-]/g, "");
67
+ const title = props.title ?? "Sequence diagram";
68
+
69
+ return (
70
+ <div
71
+ // `tabIndex` and `role` are the a11y requirement, not decoration: a
72
+ // scrollable region that cannot be focused cannot be scrolled from a
73
+ // keyboard at all, so the part of the diagram past the fold would be
74
+ // unreachable. The named region is what gives it an accessible name
75
+ // to announce when focus lands there.
76
+ //
77
+ // This reopens the "no interactivity" line the design drew, scoped to
78
+ // scrolling and nothing else. Pan, zoom and click-through stay out.
79
+ className="alepha-diagram-scroll my-4"
80
+ // A scrollable region is the documented exception to
81
+ // `no-noninteractive-tabindex`: WAI's own guidance is `tabindex="0"`
82
+ // plus a named `region`, because without focus the content past the
83
+ // fold cannot be reached by keyboard at all. The rule's allowlist
84
+ // covers `tabpanel` and not `region`, which is what it is flagging.
85
+ // oxlint-disable-next-line jsx-a11y/no-noninteractive-tabindex
86
+ tabIndex={0}
87
+ role="region"
88
+ aria-label={title}
89
+ >
90
+ <svg
91
+ role="img"
92
+ viewBox={`0 0 ${round(diagram.width)} ${round(diagram.height)}`}
93
+ width={round(diagram.width)}
94
+ height={round(diagram.height)}
95
+ className="block"
96
+ fontFamily={DIAGRAM_FONT_FAMILY}
97
+ fontSize={diagram.fontSize}
98
+ xmlns="http://www.w3.org/2000/svg"
99
+ >
100
+ <title>{title}</title>
101
+ <defs>
102
+ {/*
103
+ THREE head kinds, not one. Epic #5 shipped a single end marker,
104
+ which is exactly why `--o` and `--x` silently draw the same
105
+ arrowhead as `-->` in a flowchart. Here `->>`, `-x` and `-)` are
106
+ three different statements about a message and each gets its own.
107
+
108
+ `context-stroke` throughout, never `currentColor`: a marker lives
109
+ in `<defs>`, so `currentColor` resolves against the MARKER's
110
+ inherited colour rather than the referencing line's - the head
111
+ came out `--foreground` while its line was `--muted-foreground`,
112
+ and in a differently-themed container it was wrong outright.
113
+ */}
114
+ <marker
115
+ id={`${scope}-seq-arrow`}
116
+ markerWidth="9"
117
+ markerHeight="7"
118
+ refX="8.5"
119
+ refY="3.5"
120
+ orient="auto"
121
+ markerUnits="userSpaceOnUse"
122
+ >
123
+ <path d="M0,0 L9,3.5 L0,7 z" fill="context-stroke" />
124
+ </marker>
125
+ <marker
126
+ id={`${scope}-seq-open`}
127
+ markerWidth="10"
128
+ markerHeight="8"
129
+ refX="9"
130
+ refY="4"
131
+ orient="auto"
132
+ markerUnits="userSpaceOnUse"
133
+ >
134
+ {/* The async form: an open V rather than a filled head. */}
135
+ <path
136
+ d="M1,0.5 L9,4 L1,7.5"
137
+ fill="none"
138
+ stroke="context-stroke"
139
+ strokeWidth="1.3"
140
+ strokeLinecap="round"
141
+ strokeLinejoin="round"
142
+ />
143
+ </marker>
144
+ <marker
145
+ id={`${scope}-seq-cross`}
146
+ markerWidth="9"
147
+ markerHeight="9"
148
+ refX="8"
149
+ refY="4.5"
150
+ orient="auto"
151
+ markerUnits="userSpaceOnUse"
152
+ >
153
+ <path
154
+ d="M1.5,1.5 L7.5,7.5 M7.5,1.5 L1.5,7.5"
155
+ fill="none"
156
+ stroke="context-stroke"
157
+ strokeWidth="1.4"
158
+ strokeLinecap="round"
159
+ />
160
+ </marker>
161
+ </defs>
162
+
163
+ {/*
164
+ Order IS z-order in SVG. Fragment boxes go down first (they are
165
+ outlines, and the outermost is first in the list), then the
166
+ lifelines, then the messages, and notes last because a note is an
167
+ opaque box that has to cover the lifeline it sits on.
168
+ */}
169
+ {diagram.fragments.map((fragment, index) => (
170
+ <SequenceDiagramFragment
171
+ key={`${fragment.kind}@${fragment.depth}#${index}`}
172
+ fragment={fragment}
173
+ fontSize={diagram.fontSize}
174
+ />
175
+ ))}
176
+ {diagram.participants.map((participant) => (
177
+ <SequenceDiagramParticipant
178
+ key={participant.id}
179
+ participant={participant}
180
+ fontSize={diagram.fontSize}
181
+ />
182
+ ))}
183
+ {diagram.messages.map((message, index) => (
184
+ <SequenceDiagramMessage
185
+ key={`${message.from}->${message.to}#${index}`}
186
+ message={message}
187
+ scope={scope}
188
+ fontSize={diagram.fontSize}
189
+ />
190
+ ))}
191
+ {diagram.notes.map((note, index) => (
192
+ <SequenceDiagramNote
193
+ // Notes are positional and their text may legitimately repeat, so
194
+ // the index is the identity here.
195
+ key={`note#${index}`}
196
+ note={note}
197
+ fontSize={diagram.fontSize}
198
+ />
199
+ ))}
200
+ </svg>
201
+ </div>
202
+ );
203
+ };
@@ -0,0 +1,120 @@
1
+ import * as React from "react";
2
+
3
+ void React;
4
+
5
+ import { round } from "./DiagramLabel.tsx";
6
+ import type { PositionedFragment } from "./layoutSequence.ts";
7
+
8
+ export interface SequenceDiagramFragmentProps {
9
+ fragment: PositionedFragment;
10
+ fontSize: number;
11
+ }
12
+
13
+ /**
14
+ * The box around an `alt`, `opt` or `loop`, its corner tab, and a dashed
15
+ * divider at each `else`.
16
+ *
17
+ * ## Why fragments are drawn at all, when activation bars were cut
18
+ *
19
+ * Without them an `alt` block has two outcomes and both are bad: refuse the
20
+ * whole diagram, or draw the branches one under the other as though they
21
+ * all happen. The second is silently wrong output about a protocol, which
22
+ * is the one failure mode the design refuses to ship.
23
+ *
24
+ * The box is an outline with no fill, so it never hides a lifeline it
25
+ * spans and its z-order does not matter. Only the tab is filled, because
26
+ * it sits on top of the lifelines it crosses.
27
+ */
28
+ export const SequenceDiagramFragment = (
29
+ props: SequenceDiagramFragmentProps,
30
+ ) => {
31
+ const fragment = props.fragment;
32
+ const x = round(fragment.x);
33
+ const y = round(fragment.y);
34
+ const width = round(fragment.width);
35
+ const small = props.fontSize * 0.92;
36
+ const notch = 6;
37
+
38
+ return (
39
+ <g data-fragment={fragment.kind}>
40
+ <rect
41
+ x={x}
42
+ y={y}
43
+ width={width}
44
+ height={round(fragment.height)}
45
+ rx={4}
46
+ ry={4}
47
+ fill="none"
48
+ stroke="var(--border)"
49
+ strokeWidth={1.25}
50
+ />
51
+ {fragment.dividers.map((divider) => (
52
+ <g key={`${round(divider.y)}:${divider.label}`}>
53
+ <line
54
+ x1={x}
55
+ y1={round(divider.y)}
56
+ x2={round(fragment.x + fragment.width)}
57
+ y2={round(divider.y)}
58
+ stroke="var(--border)"
59
+ strokeWidth={1.25}
60
+ strokeDasharray="5 4"
61
+ />
62
+ {divider.label ? (
63
+ // BELOW the line, not above it. An `else` names the branch it
64
+ // OPENS, so a label sitting over the divider reads as the last
65
+ // word of the branch that just ended - which is the opposite of
66
+ // what the author wrote.
67
+ <text
68
+ x={round(fragment.x + 8)}
69
+ y={round(divider.y + small + 2)}
70
+ textAnchor="start"
71
+ fontSize={small}
72
+ fill="var(--muted-foreground)"
73
+ >
74
+ [{divider.label}]
75
+ </text>
76
+ ) : null}
77
+ </g>
78
+ ))}
79
+ {/*
80
+ A rectangle with its bottom-right corner cut, which is how UML draws
81
+ the fragment operator. One path rather than a rect plus a polygon,
82
+ so the outline is continuous.
83
+ */}
84
+ <path
85
+ d={[
86
+ `M${x},${y}`,
87
+ `L${round(fragment.x + fragment.tabWidth)},${y}`,
88
+ `L${round(fragment.x + fragment.tabWidth)},${round(fragment.y + fragment.tabHeight - notch)}`,
89
+ `L${round(fragment.x + fragment.tabWidth - notch)},${round(fragment.y + fragment.tabHeight)}`,
90
+ `L${x},${round(fragment.y + fragment.tabHeight)}`,
91
+ "z",
92
+ ].join(" ")}
93
+ fill="var(--muted)"
94
+ stroke="var(--border)"
95
+ strokeWidth={1.25}
96
+ />
97
+ <text
98
+ x={round(fragment.x + fragment.tabWidth / 2)}
99
+ y={round(fragment.y + fragment.tabHeight / 2 + props.fontSize * 0.36)}
100
+ textAnchor="middle"
101
+ fontSize={small}
102
+ fontWeight={600}
103
+ fill="var(--muted-foreground)"
104
+ >
105
+ {fragment.kind}
106
+ </text>
107
+ {fragment.label ? (
108
+ <text
109
+ x={round(fragment.x + fragment.tabWidth + 8)}
110
+ y={round(fragment.y + fragment.tabHeight / 2 + props.fontSize * 0.36)}
111
+ textAnchor="start"
112
+ fontSize={small}
113
+ fill="var(--muted-foreground)"
114
+ >
115
+ [{fragment.label}]
116
+ </text>
117
+ ) : null}
118
+ </g>
119
+ );
120
+ };