@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
@@ -0,0 +1,443 @@
1
+ import type {
2
+ SequenceArrowHead,
3
+ SequenceFragment,
4
+ SequenceFragmentKind,
5
+ SequenceModel,
6
+ SequenceNote,
7
+ SequenceParticipant,
8
+ SequenceStep,
9
+ } from "./sequenceModel.ts";
10
+
11
+ /**
12
+ * Parse the text inside a ` ```mermaid ` fence into a `SequenceModel`.
13
+ *
14
+ * Pure string in, data out: no layout knowledge, no DOM, no React. The
15
+ * subset is mermaid's `sequenceDiagram` as agents actually write it -
16
+ * participants and actors, the eight arrow forms, notes, `autonumber`,
17
+ * self-messages, and the `alt` / `else` / `opt` / `loop` fragment boxes.
18
+ *
19
+ * **It never throws.** The caller's fallback is the original code block, so
20
+ * anything unreadable returns `undefined` and degrades to the grey fence.
21
+ *
22
+ * ## Refuse vs skip, and why the line is where it is
23
+ *
24
+ * The test is whether dropping the construct would LIE about the diagram.
25
+ *
26
+ * - `par`, `critical`, `break`, `create`, `destroy` **refuse the whole
27
+ * diagram**. Drawing `par` branches one under the other asserts an
28
+ * ordering that is false, and silently wrong output is worse than no
29
+ * output.
30
+ * - `rect`, `box`, `links`, `link`, `menu`, `style`, `activate` /
31
+ * `deactivate` are **skipped in silence**: decorative, or (for the
32
+ * activation pair) out of the v1 subset, and nothing semantic is lost.
33
+ *
34
+ * Structurally malformed input - an `end` with nothing open, a fragment
35
+ * never closed, an `else` outside an `alt`, a `Note over` naming a
36
+ * participant that appears nowhere - refuses the diagram too. Unlike the
37
+ * flowchart parser, a statement is NOT degraded on its own here: a lost
38
+ * message in the middle of a protocol is a wrong protocol.
39
+ */
40
+ export const parseSequence = (source: string): SequenceModel | undefined => {
41
+ try {
42
+ return parseChecked(source);
43
+ } catch {
44
+ // A parser bug, or a deliberate refusal, must cost the diagram and
45
+ // never the page it sits on.
46
+ return undefined;
47
+ }
48
+ };
49
+
50
+ const parseChecked = (source: string): SequenceModel | undefined => {
51
+ const statements = splitStatements(stripPreamble(source));
52
+ if (statements.length === 0) return undefined;
53
+ if (!/^sequenceDiagram\s*$/i.test(statements[0])) return undefined;
54
+
55
+ const state: ParseState = {
56
+ participants: new Map(),
57
+ steps: [],
58
+ fragments: [],
59
+ stack: [],
60
+ notes: [],
61
+ };
62
+
63
+ for (const statement of statements.slice(1)) {
64
+ readStatement(statement, state);
65
+ }
66
+
67
+ // A fragment left open is malformed: its box would have no bottom, and
68
+ // guessing one invents structure the author did not write.
69
+ if (state.stack.length > 0) return undefined;
70
+
71
+ // Notes do NOT declare participants - a note is an annotation, and one
72
+ // pinned to a name that appears nowhere else is a typo, not a lifeline.
73
+ // Resolved here rather than at the statement, because the participant may
74
+ // legitimately be declared by a LATER message.
75
+ for (const note of state.notes) {
76
+ for (const id of note.participants) {
77
+ if (!state.participants.has(id)) return undefined;
78
+ }
79
+ }
80
+
81
+ if (state.participants.size === 0 || state.steps.length === 0)
82
+ return undefined;
83
+
84
+ return {
85
+ participants: [...state.participants.values()],
86
+ steps: state.steps,
87
+ fragments: collectFragments(state),
88
+ ...(state.autonumber ? { autonumber: state.autonumber } : {}),
89
+ };
90
+ };
91
+
92
+ interface OpenFragment {
93
+ /**
94
+ * Undefined for a `rect` / `box` block, which is skipped but still has to
95
+ * consume its own `end` - without this the `end` would look like a
96
+ * dangling one and refuse the whole diagram.
97
+ */
98
+ fragment?: SequenceFragment;
99
+ kind: SequenceFragmentKind | "transparent";
100
+ }
101
+
102
+ interface ParseState {
103
+ participants: Map<string, SequenceParticipant>;
104
+ steps: SequenceStep[];
105
+ fragments: SequenceFragment[];
106
+ /**
107
+ * Open blocks, innermost last.
108
+ */
109
+ stack: OpenFragment[];
110
+ /**
111
+ * Every note, kept aside so its participants can be checked once the
112
+ * whole diagram has been read.
113
+ */
114
+ notes: SequenceNote[];
115
+ autonumber?: { start: number; step: number };
116
+ }
117
+
118
+ /**
119
+ * Blocks whose meaning cannot survive being drawn in the v1 subset. Hitting
120
+ * one refuses the whole diagram.
121
+ */
122
+ const REFUSED = /^(?:par|critical|break|create|destroy)\b/i;
123
+
124
+ /**
125
+ * Statements that carry decoration, grouping or interaction rather than
126
+ * protocol. `activate` / `deactivate` are here because activation bars are
127
+ * cut from v1 and dropping a bar loses nothing semantic.
128
+ *
129
+ * `rect` and `box` are NOT here: they open a block terminated by `end`, so
130
+ * they are pushed onto the stack as transparent and skipped there.
131
+ */
132
+ const SKIPPED =
133
+ /^(?:links?|menu|style|activate|deactivate|and|option|title|accTitle|accDescr|properties|details)\b/i;
134
+
135
+ const readStatement = (statement: string, state: ParseState): void => {
136
+ if (!statement) return;
137
+
138
+ if (/^end$/i.test(statement)) {
139
+ closeBlock(state);
140
+ return;
141
+ }
142
+ if (REFUSED.test(statement)) throw new Error("unsupported construct");
143
+ if (SKIPPED.test(statement)) return;
144
+
145
+ // `rect rgb(0,0,0)` and `box Aqua Group` are both blocks: skipping the
146
+ // opener alone would leave their `end` dangling.
147
+ if (/^(?:rect|box)\b/i.test(statement)) {
148
+ state.stack.push({ kind: "transparent" });
149
+ return;
150
+ }
151
+
152
+ const fragment = /^(alt|opt|loop)\b\s*(.*)$/i.exec(statement);
153
+ if (fragment) {
154
+ openFragment(
155
+ fragment[1].toLowerCase() as SequenceFragmentKind,
156
+ fragment[2].trim(),
157
+ state,
158
+ );
159
+ return;
160
+ }
161
+
162
+ const divider = /^else\b\s*(.*)$/i.exec(statement);
163
+ if (divider) {
164
+ addDivider(divider[1].trim(), state);
165
+ return;
166
+ }
167
+
168
+ const participant = /^(participant|actor)\s+(.+)$/i.exec(statement);
169
+ if (participant) {
170
+ declareParticipant(
171
+ participant[2].trim(),
172
+ participant[1].toLowerCase() === "actor",
173
+ state,
174
+ );
175
+ return;
176
+ }
177
+
178
+ const autonumber = /^autonumber\b\s*(.*)$/i.exec(statement);
179
+ if (autonumber) {
180
+ readAutonumber(autonumber[1].trim(), state);
181
+ return;
182
+ }
183
+
184
+ if (/^note\b/i.test(statement)) {
185
+ readNote(statement, state);
186
+ return;
187
+ }
188
+
189
+ readMessage(statement, state);
190
+ };
191
+
192
+ const openFragment = (
193
+ kind: SequenceFragmentKind,
194
+ label: string,
195
+ state: ParseState,
196
+ ): void => {
197
+ const fragment: SequenceFragment = {
198
+ kind,
199
+ label: unquote(label),
200
+ from: state.steps.length,
201
+ // Patched by `closeBlock`. A fragment that never gets one refuses the
202
+ // diagram, so this value is never read.
203
+ to: -1,
204
+ depth: state.stack.filter((open) => open.fragment).length,
205
+ dividers: [],
206
+ };
207
+ state.fragments.push(fragment);
208
+ state.stack.push({ fragment, kind });
209
+ };
210
+
211
+ const addDivider = (label: string, state: ParseState): void => {
212
+ const open = state.stack[state.stack.length - 1];
213
+ // `else` belongs to `alt` and nothing else. Inside an `opt` or a `loop`
214
+ // it is not a branch, it is a mistake.
215
+ if (!open?.fragment || open.kind !== "alt")
216
+ throw new Error("else outside an alt");
217
+ open.fragment.dividers.push({
218
+ at: state.steps.length,
219
+ label: unquote(label),
220
+ });
221
+ };
222
+
223
+ const closeBlock = (state: ParseState): void => {
224
+ const open = state.stack.pop();
225
+ // An `end` with nothing open means the author's nesting does not close,
226
+ // so every box below it would be drawn around the wrong rows.
227
+ if (!open) throw new Error("unbalanced end");
228
+ if (open.fragment) open.fragment.to = state.steps.length - 1;
229
+ };
230
+
231
+ /**
232
+ * Drop the fragments that turned out to enclose nothing, and the dividers
233
+ * that turned out to introduce nothing.
234
+ *
235
+ * An `alt X` immediately followed by `end` is not malformed, it just says
236
+ * nothing: a box around zero rows has no height and only clutters. Same for
237
+ * a trailing `else` with no messages under it.
238
+ *
239
+ * ⚠️ A divider at exactly `from` is KEPT, not dropped as empty. It means the
240
+ * first branch is the empty one, and dropping it would put every row of the
241
+ * `else` branch under the `alt`'s own label - a box asserting that messages
242
+ * happen in the branch that did not run. Drawn, it is a divider immediately
243
+ * under the label tab, which is what the author wrote.
244
+ */
245
+ const collectFragments = (state: ParseState): SequenceFragment[] =>
246
+ state.fragments
247
+ .filter((fragment) => fragment.to >= fragment.from)
248
+ .map((fragment) => ({
249
+ ...fragment,
250
+ dividers: fragment.dividers.filter(
251
+ (divider) => divider.at >= fragment.from && divider.at <= fragment.to,
252
+ ),
253
+ }));
254
+
255
+ /**
256
+ * `participant A`, `participant A as Alice`, `actor A as Alice`.
257
+ */
258
+ const declareParticipant = (
259
+ rest: string,
260
+ actor: boolean,
261
+ state: ParseState,
262
+ ): void => {
263
+ const alias = /^(.*?)\s+as\s+(.*)$/i.exec(rest);
264
+ const id = unquote((alias ? alias[1] : rest).trim());
265
+ if (!id) return;
266
+ const label = alias ? unquote(alias[2].trim()) : id;
267
+
268
+ const existing = state.participants.get(id);
269
+ if (existing) {
270
+ // A late `participant A as Alice` after an implicit declaration still
271
+ // names the lifeline; it just cannot move it, since column order is
272
+ // first appearance.
273
+ existing.lines = splitLabel(label);
274
+ existing.actor = actor;
275
+ return;
276
+ }
277
+ state.participants.set(id, { id, lines: splitLabel(label), actor });
278
+ };
279
+
280
+ /**
281
+ * A participant named by a message exists from that moment on, in the
282
+ * column position of its first appearance.
283
+ *
284
+ * Find-or-create, not a React hook: the `use` prefix it used to carry is
285
+ * reserved in a repo this full of React, and `react-hooks/rules-of-hooks`
286
+ * read it as one being called from a plain function.
287
+ */
288
+ const ensureParticipant = (id: string, state: ParseState): string => {
289
+ if (!state.participants.has(id))
290
+ state.participants.set(id, { id, lines: splitLabel(id), actor: false });
291
+ return id;
292
+ };
293
+
294
+ const readAutonumber = (rest: string, state: ParseState): void => {
295
+ if (/^off$/i.test(rest)) {
296
+ state.autonumber = undefined;
297
+ return;
298
+ }
299
+ const numbers = rest.split(/\s+/).filter(Boolean).map(Number);
300
+ const start = Number.isFinite(numbers[0]) ? numbers[0] : 1;
301
+ const step = Number.isFinite(numbers[1]) ? numbers[1] : 1;
302
+ state.autonumber = { start, step };
303
+ };
304
+
305
+ /**
306
+ * `Note left of A: text`, `Note right of A: text`, `Note over A: text`,
307
+ * `Note over A,B: text`.
308
+ */
309
+ const readNote = (statement: string, state: ParseState): void => {
310
+ const colon = statement.indexOf(":");
311
+ if (colon < 0) return;
312
+
313
+ const head = /^note\s+(left\s+of|right\s+of|over)\s+(.+)$/i.exec(
314
+ statement.slice(0, colon).trim(),
315
+ );
316
+ if (!head) return;
317
+
318
+ const placement = /^left/i.test(head[1])
319
+ ? "left"
320
+ : /^right/i.test(head[1])
321
+ ? "right"
322
+ : "over";
323
+ const ids = head[2]
324
+ .split(",")
325
+ .map((id) => unquote(id.trim()))
326
+ .filter(Boolean)
327
+ // `Note left of A,B` is not a thing; only `over` spans two lifelines.
328
+ .slice(0, placement === "over" ? 2 : 1);
329
+ if (ids.length === 0) return;
330
+
331
+ const note: SequenceNote = {
332
+ kind: "note",
333
+ placement,
334
+ participants: ids,
335
+ lines: splitLabel(statement.slice(colon + 1).trim()),
336
+ };
337
+ state.steps.push(note);
338
+ state.notes.push(note);
339
+ };
340
+
341
+ /**
342
+ * Every arrow form in the subset, as `(dashes)(head)(activation)`.
343
+ *
344
+ * `--` is the dashed line and `-` the solid one; `>>` must precede `>` in
345
+ * the alternation or `->>` reads as `->` followed by a stray `>`.
346
+ */
347
+ const ARROW = /(--?)(>>|>|x|\))([+-]?)/g;
348
+
349
+ const HEADS: Record<string, SequenceArrowHead> = {
350
+ ">>": "arrow",
351
+ ">": "none",
352
+ x: "cross",
353
+ ")": "open",
354
+ };
355
+
356
+ /**
357
+ * `A ->> B: label`.
358
+ *
359
+ * ## Split on the colon FIRST
360
+ *
361
+ * `A ->> B: label with -> inside` must not re-split on the arrow in its own
362
+ * label. The flowchart parser has exactly this bug for node labels, it
363
+ * fails silently, and the diagram still draws with the text cut in half.
364
+ * Here the label is everything after the first `:` and the arrow is only
365
+ * ever looked for on the left of it.
366
+ *
367
+ * ## Then take the first arrow that leaves two usable names
368
+ *
369
+ * A participant id may contain a hyphen (`my-service ->> db`), so the first
370
+ * regex hit is not always the arrow: `my-x ->> B` matches `-x` at
371
+ * `my-x`. Each candidate is therefore checked, and one that leaves a
372
+ * name with a space in it (`y ->> B`) is not the arrow.
373
+ */
374
+ const readMessage = (statement: string, state: ParseState): void => {
375
+ const colon = statement.indexOf(":");
376
+ if (colon < 0) return;
377
+ const head = statement.slice(0, colon);
378
+
379
+ ARROW.lastIndex = 0;
380
+ for (let match = ARROW.exec(head); match; match = ARROW.exec(head)) {
381
+ const from = head.slice(0, match.index).trim();
382
+ const to = head.slice(match.index + match[0].length).trim();
383
+ if (!isName(from) || !isName(to)) continue;
384
+
385
+ const sender = ensureParticipant(unquote(from), state);
386
+ const receiver = ensureParticipant(unquote(to), state);
387
+ state.steps.push({
388
+ kind: "message",
389
+ from: sender,
390
+ to: receiver,
391
+ lines: splitLabel(statement.slice(colon + 1).trim()),
392
+ line: match[1] === "--" ? "dashed" : "solid",
393
+ head: HEADS[match[2]],
394
+ self: sender === receiver,
395
+ });
396
+ return;
397
+ }
398
+ };
399
+
400
+ const isName = (value: string): boolean =>
401
+ value.length > 0 && !/\s/.test(value);
402
+
403
+ /**
404
+ * Split a label on `<br/>`, in every spelling mermaid accepts.
405
+ */
406
+ const splitLabel = (label: string): string[] => {
407
+ const lines = unquote(label)
408
+ .split(/<br\s*\/?>/i)
409
+ .map((line) => line.trim());
410
+ return lines.length > 0 ? lines : [""];
411
+ };
412
+
413
+ const unquote = (value: string): string => {
414
+ const trimmed = value.trim();
415
+ if (trimmed.length < 2) return trimmed;
416
+ const first = trimmed[0];
417
+ const last = trimmed[trimmed.length - 1];
418
+ if ((first === '"' || first === "`") && first === last)
419
+ return trimmed.slice(1, -1).trim();
420
+ return trimmed;
421
+ };
422
+
423
+ /**
424
+ * Drop the YAML frontmatter block and any `%%{init: …}%%` directives, both
425
+ * of which mermaid allows above the header line.
426
+ */
427
+ const stripPreamble = (source: string): string =>
428
+ source
429
+ .replace(/^\s*---\r?\n[\s\S]*?\r?\n---\r?\n/, "")
430
+ .replace(/%%\{[\s\S]*?\}%%/g, "");
431
+
432
+ /**
433
+ * One statement per line, `%%` comments dropped.
434
+ *
435
+ * Unlike the flowchart grammar there is no `;` terminator to worry about: a
436
+ * sequence diagram is line-oriented, and a `;` inside a message label is
437
+ * ordinary text.
438
+ */
439
+ const splitStatements = (source: string): string[] =>
440
+ source
441
+ .split(/\r?\n/)
442
+ .map((line) => line.replace(/%%.*$/, "").trim())
443
+ .filter(Boolean);
@@ -31,6 +31,30 @@
31
31
  color: var(--hljs-number);
32
32
  }
33
33
 
34
+ /*
35
+ * Object property names — `roles:`, `name:`, `scope:`.
36
+ *
37
+ * `.hljs-attr` was reachable only through `.hljs-tag .hljs-attr` above,
38
+ * which is an attribute inside an HTML tag. A BARE `hljs-attr`, which is
39
+ * what highlight.js emits for every key in a JS/TS object literal or a
40
+ * JSON document, matched no rule at all and fell through to `.hljs`'s
41
+ * plain foreground. The effect was a code block where the strings were
42
+ * coloured and every key was body text — subtle enough to read as "the
43
+ * theme is a bit washed out" rather than as a missing selector.
44
+ *
45
+ * `--hljs-builtin` (#79c0ff dark / #005cc5 light) is what GitHub uses for
46
+ * property names, and it is what the CodeMirror side already gives
47
+ * `tags.propertyName`, so the two faces agree.
48
+ *
49
+ * Specificity keeps the HTML case intact: `.hljs-tag .hljs-attr` is (0,2,0)
50
+ * against this rule's (0,1,0), so a tag attribute stays on `--hljs-number`
51
+ * no matter which rule comes last.
52
+ */
53
+ .hljs-attr,
54
+ .hljs-property {
55
+ color: var(--hljs-builtin);
56
+ }
57
+
34
58
  .hljs-string,
35
59
  .hljs-doctag,
36
60
  .hljs-regexp,
@@ -112,3 +136,44 @@
112
136
  --hljs-deletion: #67060c;
113
137
  --hljs-addition: #033a16;
114
138
  }
139
+
140
+ /**
141
+ * The scroll frame around a sequence diagram.
142
+ *
143
+ * A flowchart is roughly as tall as it is wide and scales into the prose
144
+ * column. A sequence diagram's width comes from its participant count with
145
+ * nothing to wrap, so scaling eight lifelines into a phone column puts the
146
+ * labels at around 5px with no way for the reader to recover. It scrolls
147
+ * instead, at its natural size.
148
+ *
149
+ * `overscroll-behavior-x: contain` is not a nicety: without it, swiping a
150
+ * wide diagram on touch swallows the page's own back-swipe.
151
+ *
152
+ * The fades are the classic four-layer scroll-shadow: two `local` covers
153
+ * painted in the page background scroll WITH the content and so sit over
154
+ * the shadows while the diagram is at that edge, and two `scroll` shadows
155
+ * stay pinned to the frame. The result is a fade on the overflowing side
156
+ * only, in pure CSS - without it a clipped diagram just looks truncated and
157
+ * nobody discovers it scrolls.
158
+ */
159
+ .alepha-diagram-scroll {
160
+ overflow-x: auto;
161
+ overscroll-behavior-x: contain;
162
+ background:
163
+ linear-gradient(to right, var(--background) 60%, transparent) left center /
164
+ 28px 100% no-repeat local,
165
+ linear-gradient(to left, var(--background) 60%, transparent) right center /
166
+ 28px 100% no-repeat local,
167
+ linear-gradient(
168
+ to right,
169
+ color-mix(in oklab, var(--foreground) 26%, transparent),
170
+ transparent
171
+ )
172
+ left center / 18px 100% no-repeat scroll,
173
+ linear-gradient(
174
+ to left,
175
+ color-mix(in oklab, var(--foreground) 26%, transparent),
176
+ transparent
177
+ )
178
+ right center / 18px 100% no-repeat scroll;
179
+ }
@@ -11,19 +11,25 @@ import remarkGfm from "remark-gfm";
11
11
  import { DiagramErrorBoundary } from "./diagram/DiagramErrorBoundary.tsx";
12
12
 
13
13
  /**
14
- * Parser + `graphre` + emitter, pulled in ONLY when a document actually
15
- * contains a mermaid fence.
14
+ * Both parsers, both layouts (`graphre` for the flowchart, arithmetic for
15
+ * the sequence diagram) and both emitters, pulled in ONLY when a document
16
+ * actually contains a mermaid fence.
16
17
  *
17
18
  * This is the constraint the whole diagram layer exists under: a document
18
- * with no diagram must pay nothing at all. One with a diagram pays roughly
19
- * 20-25 kB gzip once, then it is cached.
19
+ * with no diagram must pay nothing at all. One with a diagram pays one
20
+ * chunk once, then it is cached. Measured on 2026-08-28 with both diagram
21
+ * types in it: 64.5 kB raw, **22.2 kB gzip**, 19.4 kB brotli - against
22
+ * 17.95 kB gzip when it drew flowcharts only. If it ever passes ~26 kB,
23
+ * split the two pipelines into two chunks so a flowchart-only document
24
+ * stops paying for the sequence one.
20
25
  *
21
26
  * ⚠️ A lazy import a bundler decides to inline fails silently: the feature
22
27
  * still works and the cost moves into the entry chunk. After changing this,
23
- * build and confirm `graphre` is in a chunk of its own:
28
+ * build and confirm the diagram code is in a chunk of its own and the entry
29
+ * has none of it:
24
30
  *
25
31
  * yarn w lore build
26
- * grep -rl addBorderSegments apps/lore/dist/
32
+ * grep -rl 'addBorderSegments\|sequenceDiagram' apps/lore/dist/public/
27
33
  */
28
34
  const MermaidFence = lazy(() => import("./diagram/MermaidFence.tsx"));
29
35
 
@@ -44,23 +50,30 @@ export interface MarkdownViewProps {
44
50
  *
45
51
  * ## Diagrams
46
52
  *
47
- * A ` ```mermaid ` fence containing a **`flowchart`** is drawn as an SVG
48
- * diagram instead of a code block, themed from the app's own CSS variables
49
- * so dark mode needs no second palette. The renderer is in-house: only
50
- * layout is imported (`graphre`, dagre in TypeScript, ~15.5 kB gzip), and
51
- * the whole thing is one lazy chunk pulled in only when a document actually
52
- * contains a fence, so a document with no diagram pays nothing.
53
+ * A ` ```mermaid ` fence containing a **`flowchart`** or a
54
+ * **`sequenceDiagram`** is drawn as an SVG diagram instead of a code block,
55
+ * themed from the app's own CSS variables so dark mode needs no second
56
+ * palette. The renderer is in-house: only flowchart layout is imported
57
+ * (`graphre`, dagre in TypeScript, ~15.5 kB gzip), and the whole thing is
58
+ * one lazy chunk pulled in only when a document actually contains a fence,
59
+ * so a document with no diagram pays nothing.
53
60
  *
54
- * The drawn subset is `flowchart TD|TB|LR|RL|BT`; the four node shapes
61
+ * The flowchart subset is `flowchart TD|TB|LR|RL|BT`; the four node shapes
55
62
  * `[rect]` `(rounded)` `{diamond}` `((circle))`, with every other mermaid
56
63
  * bracket pair consumed and mapped onto them; edges `-->` `---` `-.->`
57
64
  * `==>` `<-->` with labels in both the `-->|text|` and `-- text -->` forms;
58
65
  * chains, `&` fans, `<br/>` line breaks and nested `subgraph`.
59
66
  *
67
+ * The sequence subset is participants and actors, the eight arrow forms,
68
+ * notes, `autonumber`, self-messages and the `alt` / `else` / `opt` /
69
+ * `loop` fragment boxes. Activation bars are ignored. A wide sequence
70
+ * diagram keeps its natural size in a scroll frame rather than shrinking
71
+ * into the prose column.
72
+ *
60
73
  * **Everything else degrades to the code block, silently.**
61
- * `sequenceDiagram`, `classDiagram`, `gantt` and mindmaps are not drawn,
62
- * `style` / `classDef` are ignored, and a parse failure or a graph past the
63
- * node cap renders the plain fence rather than an error. Agents write
74
+ * `classDiagram`, `gantt` and mindmaps are not drawn, `style` / `classDef`
75
+ * are ignored, and a parse failure, a refused construct or a diagram past
76
+ * its cap renders the plain fence rather than an error. Agents write
64
77
  * invalid mermaid, and a red box in the middle of a document is worse than
65
78
  * a grey fence. See `packages/@alepha/ui/DOC.md` for the full table.
66
79
  *
@@ -80,6 +93,11 @@ export interface MarkdownViewProps {
80
93
  export const MarkdownView = (props: MarkdownViewProps) => {
81
94
  return (
82
95
  <div
96
+ // `data-slot`, matching every other block here, so a host page can
97
+ // reach the prose root without a wrapper class. Lore's folio
98
+ // document uses it to make this inherit the reading size instead
99
+ // of the `text-sm` default below.
100
+ data-slot="markdown-view"
83
101
  className={`max-w-none text-sm leading-relaxed ${props.className ?? ""}`}
84
102
  >
85
103
  <ReactMarkdown