@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
@@ -36,6 +36,7 @@ const ControlPassword = (props) => {
36
36
  name: props.name,
37
37
  type: reveal ? "text" : "password",
38
38
  autoComplete: props.autoComplete ?? "current-password",
39
+ autoFocus: props.autoFocus,
39
40
  disabled: props.disabled,
40
41
  required: props.required,
41
42
  minLength: props.minLength,
@@ -1 +1 @@
1
- {"version":3,"file":"control-password.js","names":[],"sources":["../../../src/components/control-password/control-password.tsx"],"sourcesContent":["import {\n FormField,\n formFieldAriaProps,\n} from \"@alepha/ui/components/control-base/form-field\";\nimport type { IconComponent } from \"@alepha/ui/components/control-base/icon-hint\";\nimport { Button } from \"@alepha/ui/components/ui/button\";\nimport { Input } from \"@alepha/ui/components/ui/input\";\nimport { Eye, EyeOff } from \"lucide-react\";\nimport { type HTMLAttributes, useState } from \"react\";\n\nexport interface ControlPasswordProps {\n id?: string;\n name?: string;\n label?: string;\n description?: string;\n error?: string;\n required?: boolean;\n disabled?: boolean;\n autoComplete?: string;\n autoFocus?: boolean;\n minLength?: number;\n maxLength?: number;\n inputProps?: HTMLAttributes<HTMLElement>;\n icon?: IconComponent;\n value: string;\n onChange: (v: string) => void;\n}\n\n/**\n * Masked password field with a reveal toggle.\n *\n * Lives outside `Control` so a hand-built form — a dialog that is not driven by\n * a schema — gets the same field the schema path renders, rather than pairing a\n * bare `<Input type=\"password\">` with no way to check what was typed.\n */\nexport const ControlPassword = (props: ControlPasswordProps) => {\n const [reveal, setReveal] = useState(false);\n const Icon = props.icon;\n return (\n <FormField\n id={props.id}\n label={props.label}\n description={props.description}\n error={props.error}\n required={props.required}\n >\n <div className=\"relative\">\n {Icon && (\n <Icon className=\"text-muted-foreground pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2\" />\n )}\n <Input\n {...props.inputProps}\n {...formFieldAriaProps({\n id: props.id,\n error: props.error,\n description: props.description,\n })}\n id={props.id}\n name={props.name}\n type={reveal ? \"text\" : \"password\"}\n autoComplete={props.autoComplete ?? \"current-password\"}\n\n disabled={props.disabled}\n required={props.required}\n minLength={props.minLength}\n maxLength={props.maxLength}\n value={props.value}\n onChange={(e) => props.onChange(e.target.value)}\n className={[props.inputProps?.className, Icon ? \"pr-9 pl-9\" : \"pr-9\"]\n .filter(Boolean)\n .join(\" \")}\n />\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon\"\n disabled={props.disabled}\n onClick={() => setReveal((r) => !r)}\n aria-label={reveal ? \"Hide password\" : \"Show password\"}\n className=\"text-muted-foreground hover:text-foreground absolute top-1/2 right-1 size-7 -translate-y-1/2\"\n >\n {reveal ? <EyeOff className=\"size-4\" /> : <Eye className=\"size-4\" />}\n </Button>\n </div>\n </FormField>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;AAmCA,MAAa,mBAAmB,UAAgC;CAC9D,MAAM,CAAC,QAAQ,aAAa,SAAS,KAAK;CAC1C,MAAM,OAAO,MAAM;CACnB,OACE,oBAAC,WAAD;EACE,IAAI,MAAM;EACV,OAAO,MAAM;EACb,aAAa,MAAM;EACnB,OAAO,MAAM;EACb,UAAU,MAAM;EAEhB,UAAA,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA;IACG,QACC,oBAAC,MAAD,EAAM,WAAU,4FAA6F,CAAA;IAE/G,oBAAC,OAAD;KACE,GAAI,MAAM;KACV,GAAI,mBAAmB;MACrB,IAAI,MAAM;MACV,OAAO,MAAM;MACb,aAAa,MAAM;KACrB,CAAC;KACD,IAAI,MAAM;KACV,MAAM,MAAM;KACZ,MAAM,SAAS,SAAS;KACxB,cAAc,MAAM,gBAAgB;KAEpC,UAAU,MAAM;KAChB,UAAU,MAAM;KAChB,WAAW,MAAM;KACjB,WAAW,MAAM;KACjB,OAAO,MAAM;KACb,WAAW,MAAM,MAAM,SAAS,EAAE,OAAO,KAAK;KAC9C,WAAW,CAAC,MAAM,YAAY,WAAW,OAAO,cAAc,MAAM,CAAC,CAClE,OAAO,OAAO,CAAC,CACf,KAAK,GAAG;IACZ,CAAA;IACD,oBAAC,QAAD;KACE,MAAK;KACL,SAAQ;KACR,MAAK;KACL,UAAU,MAAM;KAChB,eAAe,WAAW,MAAM,CAAC,CAAC;KAClC,cAAY,SAAS,kBAAkB;KACvC,WAAU;KAET,UAAA,SAAS,oBAAC,QAAD,EAAQ,WAAU,SAAU,CAAA,IAAI,oBAAC,KAAD,EAAK,WAAU,SAAU,CAAA;IAC7D,CAAA;GACL;;CACI,CAAA;AAEf"}
1
+ {"version":3,"file":"control-password.js","names":[],"sources":["../../../src/components/control-password/control-password.tsx"],"sourcesContent":["import {\n FormField,\n formFieldAriaProps,\n} from \"@alepha/ui/components/control-base/form-field\";\nimport type { IconComponent } from \"@alepha/ui/components/control-base/icon-hint\";\nimport { Button } from \"@alepha/ui/components/ui/button\";\nimport { Input } from \"@alepha/ui/components/ui/input\";\nimport { Eye, EyeOff } from \"lucide-react\";\nimport { type HTMLAttributes, useState } from \"react\";\n\nexport interface ControlPasswordProps {\n id?: string;\n name?: string;\n label?: string;\n description?: string;\n error?: string;\n required?: boolean;\n disabled?: boolean;\n autoComplete?: string;\n autoFocus?: boolean;\n minLength?: number;\n maxLength?: number;\n inputProps?: HTMLAttributes<HTMLElement>;\n icon?: IconComponent;\n value: string;\n onChange: (v: string) => void;\n}\n\n/**\n * Masked password field with a reveal toggle.\n *\n * Lives outside `Control` so a hand-built form — a dialog that is not driven by\n * a schema — gets the same field the schema path renders, rather than pairing a\n * bare `<Input type=\"password\">` with no way to check what was typed.\n */\nexport const ControlPassword = (props: ControlPasswordProps) => {\n const [reveal, setReveal] = useState(false);\n const Icon = props.icon;\n return (\n <FormField\n id={props.id}\n label={props.label}\n description={props.description}\n error={props.error}\n required={props.required}\n >\n <div className=\"relative\">\n {Icon && (\n <Icon className=\"text-muted-foreground pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2\" />\n )}\n <Input\n {...props.inputProps}\n {...formFieldAriaProps({\n id: props.id,\n error: props.error,\n description: props.description,\n })}\n id={props.id}\n name={props.name}\n type={reveal ? \"text\" : \"password\"}\n autoComplete={props.autoComplete ?? \"current-password\"}\n // oxlint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={props.autoFocus}\n disabled={props.disabled}\n required={props.required}\n minLength={props.minLength}\n maxLength={props.maxLength}\n value={props.value}\n onChange={(e) => props.onChange(e.target.value)}\n className={[props.inputProps?.className, Icon ? \"pr-9 pl-9\" : \"pr-9\"]\n .filter(Boolean)\n .join(\" \")}\n />\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon\"\n disabled={props.disabled}\n onClick={() => setReveal((r) => !r)}\n aria-label={reveal ? \"Hide password\" : \"Show password\"}\n className=\"text-muted-foreground hover:text-foreground absolute top-1/2 right-1 size-7 -translate-y-1/2\"\n >\n {reveal ? <EyeOff className=\"size-4\" /> : <Eye className=\"size-4\" />}\n </Button>\n </div>\n </FormField>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;AAmCA,MAAa,mBAAmB,UAAgC;CAC9D,MAAM,CAAC,QAAQ,aAAa,SAAS,KAAK;CAC1C,MAAM,OAAO,MAAM;CACnB,OACE,oBAAC,WAAD;EACE,IAAI,MAAM;EACV,OAAO,MAAM;EACb,aAAa,MAAM;EACnB,OAAO,MAAM;EACb,UAAU,MAAM;EAEhB,UAAA,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA;IACG,QACC,oBAAC,MAAD,EAAM,WAAU,4FAA6F,CAAA;IAE/G,oBAAC,OAAD;KACE,GAAI,MAAM;KACV,GAAI,mBAAmB;MACrB,IAAI,MAAM;MACV,OAAO,MAAM;MACb,aAAa,MAAM;KACrB,CAAC;KACD,IAAI,MAAM;KACV,MAAM,MAAM;KACZ,MAAM,SAAS,SAAS;KACxB,cAAc,MAAM,gBAAgB;KAEpC,WAAW,MAAM;KACjB,UAAU,MAAM;KAChB,UAAU,MAAM;KAChB,WAAW,MAAM;KACjB,WAAW,MAAM;KACjB,OAAO,MAAM;KACb,WAAW,MAAM,MAAM,SAAS,EAAE,OAAO,KAAK;KAC9C,WAAW,CAAC,MAAM,YAAY,WAAW,OAAO,cAAc,MAAM,CAAC,CAClE,OAAO,OAAO,CAAC,CACf,KAAK,GAAG;IACZ,CAAA;IACD,oBAAC,QAAD;KACE,MAAK;KACL,SAAQ;KACR,MAAK;KACL,UAAU,MAAM;KAChB,eAAe,WAAW,MAAM,CAAC,CAAC;KAClC,cAAY,SAAS,kBAAkB;KACvC,WAAU;KAET,UAAA,SAAS,oBAAC,QAAD,EAAQ,WAAU,SAAU,CAAA,IAAI,oBAAC,KAAD,EAAK,WAAU,SAAU,CAAA;IAC7D,CAAA;GACL;;CACI,CAAA;AAEf"}
@@ -4,6 +4,12 @@ type IconType = ComponentType<SVGProps<SVGSVGElement>>;
4
4
  export interface DetailTab {
5
5
  value: string;
6
6
  label: React.ReactNode;
7
+ /**
8
+ * A trailing count. Passed through to `Segmented`, which colours it from
9
+ * the segment's own state — see {@link SegmentedOption.count} for why a
10
+ * count folded into `label` cannot be read on the active tab.
11
+ */
12
+ count?: React.ReactNode;
7
13
  /**
8
14
  * Rendered at `size-4` before the label. Passed as a component rather than
9
15
  * an element so callers hand over data — every detail page used to repeat
@@ -1 +1 @@
1
- {"version":3,"file":"detail-layout.d.ts","sourceRoot":"","sources":["../../../src/components/detail/detail-layout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAErD,KAAK,QAAQ,GAAG,aAAa,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC;AAEvD,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB;;;;OAIG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;CACjB;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,IAAI,EAAE,SAAS,EAAE,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,eAAO,MAAM,YAAY,UAAW,iBAAiB,sBAiFpD,CAAC"}
1
+ {"version":3,"file":"detail-layout.d.ts","sourceRoot":"","sources":["../../../src/components/detail/detail-layout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAErD,KAAK,QAAQ,GAAG,aAAa,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC;AAEvD,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB;;;;OAIG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB;;;;OAIG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;CACjB;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,IAAI,EAAE,SAAS,EAAE,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,eAAO,MAAM,YAAY,UAAW,iBAAiB,sBA8FpD,CAAC"}
@@ -68,6 +68,7 @@ const DetailLayout = (props) => {
68
68
  const Icon = entry.icon;
69
69
  return {
70
70
  value: entry.value,
71
+ count: entry.count,
71
72
  label: Icon ? /* @__PURE__ */ jsxs("span", {
72
73
  className: "inline-flex items-center gap-1.5",
73
74
  children: [/* @__PURE__ */ jsx(Icon, { className: "size-4" }), entry.label]
@@ -80,7 +81,7 @@ const DetailLayout = (props) => {
80
81
  className: "border-border bg-background hidden w-72 shrink-0 flex-col gap-4 overflow-auto border-r p-4 md:flex",
81
82
  children: props.aside
82
83
  }), /* @__PURE__ */ jsxs("div", {
83
- className: "flex min-h-0 flex-1 flex-col",
84
+ className: "flex min-h-0 min-w-0 flex-1 flex-col",
84
85
  children: [/* @__PURE__ */ jsxs("div", {
85
86
  className: "bg-background flex h-14 shrink-0 items-center gap-2 border-b px-4",
86
87
  children: [/* @__PURE__ */ jsx(Segmented, {
@@ -1 +1 @@
1
- {"version":3,"file":"detail-layout.js","names":[],"sources":["../../../src/components/detail/detail-layout.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport { Button } from \"@alepha/ui/components/ui/button\";\nimport { Segmented } from \"@alepha/ui/components/ui/segmented\";\nimport { Skeleton } from \"@alepha/ui/components/ui/skeleton\";\nimport { ArrowLeft } from \"lucide-react\";\nimport type { ComponentType, SVGProps } from \"react\";\n\ntype IconType = ComponentType<SVGProps<SVGSVGElement>>;\n\nexport interface DetailTab {\n value: string;\n label: React.ReactNode;\n /**\n * Rendered at `size-4` before the label. Passed as a component rather than\n * an element so callers hand over data — every detail page used to repeat\n * the same `inline-flex items-center gap-1.5` wrapper by hand.\n */\n icon?: IconType;\n}\n\nexport interface DetailNotFound {\n message: string;\n backLabel: string;\n onBack: () => void;\n}\n\nexport interface DetailLayoutProps {\n /**\n * The identity panel. Usually an {@link DetailAside}.\n */\n aside: React.ReactNode;\n tabs: DetailTab[];\n tab: string;\n onTabChange: (value: string) => void;\n /**\n * Buttons for the right end of the toolbar.\n *\n * Size them `lg`. `Segmented`'s size tokens are cut to match a `<Button>`\n * of the same token exactly, the tab selector on the left of this bar is\n * `lg`, and nothing here can size what a caller passes: a `sm` button\n * beside it is 28px against 36px, both centred in a 56px bar, and the two\n * ends of the toolbar stop lining up.\n */\n actions?: React.ReactNode;\n /**\n * Replaces the whole shell with a skeleton. Pass it only for the first load —\n * a refetch that blanks the page an operator is reading is a regression, so\n * a caller should gate this on \"loading **and** no data yet\".\n */\n loading?: boolean;\n /**\n * Replaces the whole shell with a message and a way back.\n */\n notFound?: DetailNotFound;\n children?: React.ReactNode;\n}\n\n/**\n * The shell every detail page shares: a full-height identity aside, and a\n * right column whose toolbar carries tab selection on the left and actions on\n * the right.\n *\n * It lived at `components/admin/admin-detail-layout` while admin pages were\n * its only consumers, and moved here when Lore's Epic page became the first\n * one outside admin. Nothing about it was ever admin-specific — it imports a\n * button, a segmented control and a skeleton — so the old name described the\n * callers rather than the component. There is deliberately **no re-export\n * left behind at the old path**: an alias nobody is forced to notice is an\n * alias nobody removes.\n *\n * It owns the chrome and nothing else. Data, forms and mutations stay in the\n * page that composes it, and each tab body is its own component that renders\n * what it is given — the split that keeps a detail page from growing into one\n * unreadable file.\n *\n * The aside is hidden below `md`. A phone gets the tabs full width rather than\n * a 288px column and a sliver of content; the same facts are reachable from\n * the tab bodies.\n *\n * ```tsx\n * const [tab, setTab] = useDetailTab<\"overview\" | \"stock\">(\"overview\");\n *\n * <DetailLayout\n * aside={<DetailAside title={product.name} rows={rows} />}\n * tabs={[{ value: \"overview\", label: \"Overview\", icon: Package }]}\n * tab={tab}\n * onTabChange={(v) => setTab(v as typeof tab)}\n * actions={<Button size=\"sm\">Publish</Button>}\n * >\n * {tab === \"overview\" && <OverviewTab product={product} />}\n * </DetailLayout>\n * ```\n *\n * Dialogs belong beside it, not inside `children` — they portal out anyway,\n * and nesting them in the tab body unmounts them on a tab switch.\n */\nexport const DetailLayout = (props: DetailLayoutProps) => {\n if (props.loading) {\n return (\n <div className=\"flex flex-col gap-4 p-6\">\n <Skeleton className=\"h-10 w-72\" />\n <Skeleton className=\"h-40 w-full\" />\n <Skeleton className=\"h-40 w-full\" />\n </div>\n );\n }\n\n if (props.notFound) {\n return (\n <div className=\"flex flex-col items-start gap-3 p-6\">\n <p className=\"text-muted-foreground text-sm\">\n {props.notFound.message}\n </p>\n <Button variant=\"outline\" onClick={props.notFound.onBack}>\n <ArrowLeft className=\"size-4\" />\n {props.notFound.backLabel}\n </Button>\n </div>\n );\n }\n\n const options = props.tabs.map((entry) => {\n const Icon = entry.icon;\n return {\n value: entry.value,\n label: Icon ? (\n <span className=\"inline-flex items-center gap-1.5\">\n <Icon className=\"size-4\" />\n {entry.label}\n </span>\n ) : (\n entry.label\n ),\n };\n });\n\n return (\n <div className=\"flex h-full min-h-0 flex-1 overflow-hidden\">\n {/* `p-4`, not `p-6`. The aside is a fixed 288px, so its padding comes\n straight out of the identity panel's width: at 24px a side the\n `DetailAside` card had 240px to fit a label, a value and sometimes\n a copy button, and read as undersized in a column that had room to\n spare. 16px gives it back 16px of card without letting the content\n touch the border. */}\n <aside className=\"border-border bg-background hidden w-72 shrink-0 flex-col gap-4 overflow-auto border-r p-4 md:flex\">\n {props.aside}\n </aside>\n\n <div className=\"flex min-h-0 flex-1 flex-col\">\n <div className=\"bg-background flex h-14 shrink-0 items-center gap-2 border-b px-4\">\n {/* `lg` (h-9), not the `sm` (h-7) this started on. The toolbar is\n `h-14`, so at 28px the control filled exactly half of it and\n read as a small thing floating in a tall bar.\n\n This does give up the pixel-for-pixel match with the toolbar's\n action buttons: all three consumers pass `size=\"sm\"`, so the\n two were the same 28px before and are 28 vs 36 now. The match\n only ever held because both happened to pick the same token,\n and `actions` is caller JSX this component cannot size, so any\n increase here breaks it. Both are centred in a 56px bar, which\n is why 8px of difference does not show. */}\n <Segmented\n size=\"lg\"\n options={options}\n value={props.tab}\n onChange={props.onTabChange}\n />\n {props.actions ? (\n <div className=\"ml-auto flex items-center gap-2\">\n {props.actions}\n </div>\n ) : null}\n </div>\n {props.children}\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmGA,MAAa,gBAAgB,UAA6B;CACxD,IAAI,MAAM,SACR,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA;GACE,oBAAC,UAAD,EAAU,WAAU,YAAa,CAAA;GACjC,oBAAC,UAAD,EAAU,WAAU,cAAe,CAAA;GACnC,oBAAC,UAAD,EAAU,WAAU,cAAe,CAAA;EAChC;;CAIT,IAAI,MAAM,UACR,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,oBAAC,KAAD;GAAG,WAAU;GACV,UAAA,MAAM,SAAS;EACf,CAAA,GACH,qBAAC,QAAD;GAAQ,SAAQ;GAAU,SAAS,MAAM,SAAS;GAAlD,UAAA,CACE,oBAAC,WAAD,EAAW,WAAU,SAAU,CAAA,GAC9B,MAAM,SAAS,SACV;EACL,CAAA,CAAA;;CAIT,MAAM,UAAU,MAAM,KAAK,KAAK,UAAU;EACxC,MAAM,OAAO,MAAM;EACnB,OAAO;GACL,OAAO,MAAM;GACb,OAAO,OACL,qBAAC,QAAD;IAAM,WAAU;IAAhB,UAAA,CACE,oBAAC,MAAD,EAAM,WAAU,SAAU,CAAA,GACzB,MAAM,KACH;GAEN,CAAA,IAAA,MAAM;EAEV;CACF,CAAC;CAED,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CAOE,oBAAC,SAAD;GAAO,WAAU;GACd,UAAA,MAAM;EACF,CAAA,GAEP,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,qBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CAYE,oBAAC,WAAD;KACE,MAAK;KACI;KACT,OAAO,MAAM;KACb,UAAU,MAAM;IACjB,CAAA,GACA,MAAM,UACL,oBAAC,OAAD;KAAK,WAAU;KACZ,UAAA,MAAM;IACJ,CAAA,IACH,IACD;GACJ,CAAA,GAAA,MAAM,QACJ;EACF,CAAA,CAAA;;AAET"}
1
+ {"version":3,"file":"detail-layout.js","names":[],"sources":["../../../src/components/detail/detail-layout.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport { Button } from \"@alepha/ui/components/ui/button\";\nimport { Segmented } from \"@alepha/ui/components/ui/segmented\";\nimport { Skeleton } from \"@alepha/ui/components/ui/skeleton\";\nimport { ArrowLeft } from \"lucide-react\";\nimport type { ComponentType, SVGProps } from \"react\";\n\ntype IconType = ComponentType<SVGProps<SVGSVGElement>>;\n\nexport interface DetailTab {\n value: string;\n label: React.ReactNode;\n /**\n * A trailing count. Passed through to `Segmented`, which colours it from\n * the segment's own state — see {@link SegmentedOption.count} for why a\n * count folded into `label` cannot be read on the active tab.\n */\n count?: React.ReactNode;\n /**\n * Rendered at `size-4` before the label. Passed as a component rather than\n * an element so callers hand over data — every detail page used to repeat\n * the same `inline-flex items-center gap-1.5` wrapper by hand.\n */\n icon?: IconType;\n}\n\nexport interface DetailNotFound {\n message: string;\n backLabel: string;\n onBack: () => void;\n}\n\nexport interface DetailLayoutProps {\n /**\n * The identity panel. Usually an {@link DetailAside}.\n */\n aside: React.ReactNode;\n tabs: DetailTab[];\n tab: string;\n onTabChange: (value: string) => void;\n /**\n * Buttons for the right end of the toolbar.\n *\n * Size them `lg`. `Segmented`'s size tokens are cut to match a `<Button>`\n * of the same token exactly, the tab selector on the left of this bar is\n * `lg`, and nothing here can size what a caller passes: a `sm` button\n * beside it is 28px against 36px, both centred in a 56px bar, and the two\n * ends of the toolbar stop lining up.\n */\n actions?: React.ReactNode;\n /**\n * Replaces the whole shell with a skeleton. Pass it only for the first load —\n * a refetch that blanks the page an operator is reading is a regression, so\n * a caller should gate this on \"loading **and** no data yet\".\n */\n loading?: boolean;\n /**\n * Replaces the whole shell with a message and a way back.\n */\n notFound?: DetailNotFound;\n children?: React.ReactNode;\n}\n\n/**\n * The shell every detail page shares: a full-height identity aside, and a\n * right column whose toolbar carries tab selection on the left and actions on\n * the right.\n *\n * It lived at `components/admin/admin-detail-layout` while admin pages were\n * its only consumers, and moved here when Lore's Epic page became the first\n * one outside admin. Nothing about it was ever admin-specific — it imports a\n * button, a segmented control and a skeleton — so the old name described the\n * callers rather than the component. There is deliberately **no re-export\n * left behind at the old path**: an alias nobody is forced to notice is an\n * alias nobody removes.\n *\n * It owns the chrome and nothing else. Data, forms and mutations stay in the\n * page that composes it, and each tab body is its own component that renders\n * what it is given — the split that keeps a detail page from growing into one\n * unreadable file.\n *\n * The aside is hidden below `md`. A phone gets the tabs full width rather than\n * a 288px column and a sliver of content; the same facts are reachable from\n * the tab bodies.\n *\n * ```tsx\n * const [tab, setTab] = useDetailTab<\"overview\" | \"stock\">(\"overview\");\n *\n * <DetailLayout\n * aside={<DetailAside title={product.name} rows={rows} />}\n * tabs={[{ value: \"overview\", label: \"Overview\", icon: Package }]}\n * tab={tab}\n * onTabChange={(v) => setTab(v as typeof tab)}\n * actions={<Button size=\"sm\">Publish</Button>}\n * >\n * {tab === \"overview\" && <OverviewTab product={product} />}\n * </DetailLayout>\n * ```\n *\n * Dialogs belong beside it, not inside `children` — they portal out anyway,\n * and nesting them in the tab body unmounts them on a tab switch.\n */\nexport const DetailLayout = (props: DetailLayoutProps) => {\n if (props.loading) {\n return (\n <div className=\"flex flex-col gap-4 p-6\">\n <Skeleton className=\"h-10 w-72\" />\n <Skeleton className=\"h-40 w-full\" />\n <Skeleton className=\"h-40 w-full\" />\n </div>\n );\n }\n\n if (props.notFound) {\n return (\n <div className=\"flex flex-col items-start gap-3 p-6\">\n <p className=\"text-muted-foreground text-sm\">\n {props.notFound.message}\n </p>\n <Button variant=\"outline\" onClick={props.notFound.onBack}>\n <ArrowLeft className=\"size-4\" />\n {props.notFound.backLabel}\n </Button>\n </div>\n );\n }\n\n const options = props.tabs.map((entry) => {\n const Icon = entry.icon;\n return {\n value: entry.value,\n count: entry.count,\n label: Icon ? (\n <span className=\"inline-flex items-center gap-1.5\">\n <Icon className=\"size-4\" />\n {entry.label}\n </span>\n ) : (\n entry.label\n ),\n };\n });\n\n return (\n <div className=\"flex h-full min-h-0 flex-1 overflow-hidden\">\n {/* `p-4`, not `p-6`. The aside is a fixed 288px, so its padding comes\n straight out of the identity panel's width: at 24px a side the\n `DetailAside` card had 240px to fit a label, a value and sometimes\n a copy button, and read as undersized in a column that had room to\n spare. 16px gives it back 16px of card without letting the content\n touch the border. */}\n <aside className=\"border-border bg-background hidden w-72 shrink-0 flex-col gap-4 overflow-auto border-r p-4 md:flex\">\n {props.aside}\n </aside>\n\n {/* `min-w-0` is not decoration, and it is the horizontal twin of the\n `min-h-0` beside it. This column is a flex item on the row's\n horizontal main axis, so `min-width: auto` resolves to its content's\n min-content width and it refuses to shrink below it. A tab body\n wider than the viewport (the Questline board is `w-max`) then\n stretches this column past the viewport instead of overflowing\n inside it: the body's own `overflow-auto` sees a box as wide as its\n content and never scrolls, and the row's `overflow-hidden` simply\n clips whatever is past the edge, with no scrollbar to reach it.\n Measured on a 1276px viewport with a 16-card questline: without it\n the column is 3160px and `scrollWidth === clientWidth`; with it the\n column is 988px and the body scrolls 2172px. */}\n <div className=\"flex min-h-0 min-w-0 flex-1 flex-col\">\n <div className=\"bg-background flex h-14 shrink-0 items-center gap-2 border-b px-4\">\n {/* `lg` (h-9), not the `sm` (h-7) this started on. The toolbar is\n `h-14`, so at 28px the control filled exactly half of it and\n read as a small thing floating in a tall bar.\n\n This does give up the pixel-for-pixel match with the toolbar's\n action buttons: all three consumers pass `size=\"sm\"`, so the\n two were the same 28px before and are 28 vs 36 now. The match\n only ever held because both happened to pick the same token,\n and `actions` is caller JSX this component cannot size, so any\n increase here breaks it. Both are centred in a 56px bar, which\n is why 8px of difference does not show. */}\n <Segmented\n size=\"lg\"\n options={options}\n value={props.tab}\n onChange={props.onTabChange}\n />\n {props.actions ? (\n <div className=\"ml-auto flex items-center gap-2\">\n {props.actions}\n </div>\n ) : null}\n </div>\n {props.children}\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyGA,MAAa,gBAAgB,UAA6B;CACxD,IAAI,MAAM,SACR,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA;GACE,oBAAC,UAAD,EAAU,WAAU,YAAa,CAAA;GACjC,oBAAC,UAAD,EAAU,WAAU,cAAe,CAAA;GACnC,oBAAC,UAAD,EAAU,WAAU,cAAe,CAAA;EAChC;;CAIT,IAAI,MAAM,UACR,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,oBAAC,KAAD;GAAG,WAAU;GACV,UAAA,MAAM,SAAS;EACf,CAAA,GACH,qBAAC,QAAD;GAAQ,SAAQ;GAAU,SAAS,MAAM,SAAS;GAAlD,UAAA,CACE,oBAAC,WAAD,EAAW,WAAU,SAAU,CAAA,GAC9B,MAAM,SAAS,SACV;EACL,CAAA,CAAA;;CAIT,MAAM,UAAU,MAAM,KAAK,KAAK,UAAU;EACxC,MAAM,OAAO,MAAM;EACnB,OAAO;GACL,OAAO,MAAM;GACb,OAAO,MAAM;GACb,OAAO,OACL,qBAAC,QAAD;IAAM,WAAU;IAAhB,UAAA,CACE,oBAAC,MAAD,EAAM,WAAU,SAAU,CAAA,GACzB,MAAM,KACH;GAEN,CAAA,IAAA,MAAM;EAEV;CACF,CAAC;CAED,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CAOE,oBAAC,SAAD;GAAO,WAAU;GACd,UAAA,MAAM;EACF,CAAA,GAcP,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,qBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CAYE,oBAAC,WAAD;KACE,MAAK;KACI;KACT,OAAO,MAAM;KACb,UAAU,MAAM;IACjB,CAAA,GACA,MAAM,UACL,oBAAC,OAAD;KAAK,WAAU;KACZ,UAAA,MAAM;IACJ,CAAA,IACH,IACD;GACJ,CAAA,GAAA,MAAM,QACJ;EACF,CAAA,CAAA;;AAET"}
@@ -0,0 +1,37 @@
1
+ import * as React from "react";
2
+ export interface EmailBodyFrameProps {
3
+ /**
4
+ * Raw email HTML. May be a full document (`<html dir="rtl">…`) or a bare
5
+ * fragment.
6
+ */
7
+ html: string;
8
+ /**
9
+ * Direction applied only when `html` is a bare fragment. A full document
10
+ * keeps whatever `dir` it declares for itself.
11
+ */
12
+ dir?: "ltr" | "rtl";
13
+ /**
14
+ * Inline style overrides, mainly for sizing.
15
+ */
16
+ style?: React.CSSProperties;
17
+ title?: string;
18
+ }
19
+ /**
20
+ * Render email HTML inside a sandboxed `<iframe srcDoc>`, so the email's own
21
+ * document stays scoped to the preview.
22
+ *
23
+ * ⚠️ **Never swap this for `dangerouslySetInnerHTML`.** The HTML fragment
24
+ * parser hoists a body's `<html>` / `<body>` attributes onto the real page,
25
+ * so an email carrying `dir="rtl"` flips the entire admin UI to RTL. An
26
+ * iframe gives it a document of its own.
27
+ *
28
+ * The sandbox is empty on purpose, and it does three jobs:
29
+ *
30
+ * - blocks scripts in a body nobody has reviewed,
31
+ * - keeps the email's CSS out of the admin's,
32
+ * - blocks top-level navigation, which is what makes the **live** one-click
33
+ * unsubscribe link the notification renderer mints inert. Clicking it in a
34
+ * preview would otherwise unsubscribe the recipient.
35
+ */
36
+ export declare const EmailBodyFrame: (props: EmailBodyFrameProps) => React.JSX.Element;
37
+ //# sourceMappingURL=email-body-frame.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"email-body-frame.d.ts","sourceRoot":"","sources":["../../../src/components/email-body-frame/email-body-frame.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IACpB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,cAAc,UAAW,mBAAmB,sBAuCxD,CAAC"}
@@ -0,0 +1,44 @@
1
+ import { useMemo } from "react";
2
+ import { jsx } from "react/jsx-runtime";
3
+ //#region src/components/email-body-frame/email-body-frame.tsx
4
+ /**
5
+ * Render email HTML inside a sandboxed `<iframe srcDoc>`, so the email's own
6
+ * document stays scoped to the preview.
7
+ *
8
+ * ⚠️ **Never swap this for `dangerouslySetInnerHTML`.** The HTML fragment
9
+ * parser hoists a body's `<html>` / `<body>` attributes onto the real page,
10
+ * so an email carrying `dir="rtl"` flips the entire admin UI to RTL. An
11
+ * iframe gives it a document of its own.
12
+ *
13
+ * The sandbox is empty on purpose, and it does three jobs:
14
+ *
15
+ * - blocks scripts in a body nobody has reviewed,
16
+ * - keeps the email's CSS out of the admin's,
17
+ * - blocks top-level navigation, which is what makes the **live** one-click
18
+ * unsubscribe link the notification renderer mints inert. Clicking it in a
19
+ * preview would otherwise unsubscribe the recipient.
20
+ */
21
+ const EmailBodyFrame = (props) => {
22
+ const dir = props.dir ?? "ltr";
23
+ const srcDoc = useMemo(() => {
24
+ const content = props.html ?? "";
25
+ if (/<html[\s>]/i.test(content)) return content;
26
+ return `<!DOCTYPE html><html dir="${dir}"><head><meta charset="utf-8"><base target="_blank"><style>html,body{margin:0}body{padding:24px 28px;font-family:-apple-system,system-ui,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:14px;color:#1b2540;line-height:1.5}</style></head><body dir="${dir}">${content}</body></html>`;
27
+ }, [props.html, dir]);
28
+ return /* @__PURE__ */ jsx("iframe", {
29
+ title: props.title ?? "Email preview",
30
+ srcDoc,
31
+ sandbox: "",
32
+ style: {
33
+ width: "100%",
34
+ height: "100%",
35
+ border: "none",
36
+ background: "#fff",
37
+ ...props.style
38
+ }
39
+ });
40
+ };
41
+ //#endregion
42
+ export { EmailBodyFrame };
43
+
44
+ //# sourceMappingURL=email-body-frame.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"email-body-frame.js","names":[],"sources":["../../../src/components/email-body-frame/email-body-frame.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport { useMemo } from \"react\";\n\nexport interface EmailBodyFrameProps {\n /**\n * Raw email HTML. May be a full document (`<html dir=\"rtl\">…`) or a bare\n * fragment.\n */\n html: string;\n /**\n * Direction applied only when `html` is a bare fragment. A full document\n * keeps whatever `dir` it declares for itself.\n */\n dir?: \"ltr\" | \"rtl\";\n /**\n * Inline style overrides, mainly for sizing.\n */\n style?: React.CSSProperties;\n title?: string;\n}\n\n/**\n * Render email HTML inside a sandboxed `<iframe srcDoc>`, so the email's own\n * document stays scoped to the preview.\n *\n * ⚠️ **Never swap this for `dangerouslySetInnerHTML`.** The HTML fragment\n * parser hoists a body's `<html>` / `<body>` attributes onto the real page,\n * so an email carrying `dir=\"rtl\"` flips the entire admin UI to RTL. An\n * iframe gives it a document of its own.\n *\n * The sandbox is empty on purpose, and it does three jobs:\n *\n * - blocks scripts in a body nobody has reviewed,\n * - keeps the email's CSS out of the admin's,\n * - blocks top-level navigation, which is what makes the **live** one-click\n * unsubscribe link the notification renderer mints inert. Clicking it in a\n * preview would otherwise unsubscribe the recipient.\n */\nexport const EmailBodyFrame = (props: EmailBodyFrameProps) => {\n const dir = props.dir ?? \"ltr\";\n\n const srcDoc = useMemo(() => {\n const content = props.html ?? \"\";\n // Already a complete document: render it untouched rather than nesting\n // <html> inside <html>. It sets its own direction.\n if (/<html[\\s>]/i.test(content)) {\n return content;\n }\n // A fragment gets a minimal document so it renders with the requested\n // direction and readable defaults, still fully isolated.\n return (\n `<!DOCTYPE html><html dir=\"${dir}\"><head><meta charset=\"utf-8\">` +\n `<base target=\"_blank\">` +\n \"<style>html,body{margin:0}body{padding:24px 28px;\" +\n \"font-family:-apple-system,system-ui,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;\" +\n \"font-size:14px;color:#1b2540;line-height:1.5}</style></head>\" +\n `<body dir=\"${dir}\">${content}</body></html>`\n );\n }, [props.html, dir]);\n\n return (\n <iframe\n title={props.title ?? \"Email preview\"}\n srcDoc={srcDoc}\n sandbox=\"\"\n style={{\n width: \"100%\",\n height: \"100%\",\n border: \"none\",\n // An email is authored against a white ground. Painting it with the\n // admin's surface colour would misrepresent what the recipient saw,\n // and in dark mode it would hide dark text entirely.\n background: \"#fff\",\n ...props.style,\n }}\n />\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAyCA,MAAa,kBAAkB,UAA+B;CAC5D,MAAM,MAAM,MAAM,OAAO;CAEzB,MAAM,SAAS,cAAc;EAC3B,MAAM,UAAU,MAAM,QAAQ;EAG9B,IAAI,cAAc,KAAK,OAAO,GAC5B,OAAO;EAIT,OACE,6BAA6B,IAAI,+PAKnB,IAAI,IAAI,QAAQ;CAElC,GAAG,CAAC,MAAM,MAAM,GAAG,CAAC;CAEpB,OACE,oBAAC,UAAD;EACE,OAAO,MAAM,SAAS;EACd;EACR,SAAQ;EACR,OAAO;GACL,OAAO;GACP,QAAQ;GACR,QAAQ;GAIR,YAAY;GACZ,GAAG,MAAM;EACX;CACD,CAAA;AAEL"}
@@ -0,0 +1,33 @@
1
+ import * as React from "react";
2
+ /**
3
+ * Two decimals is plenty for a diagram and keeps the emitted attributes
4
+ * readable; a layout's raw coordinates carry a dozen.
5
+ *
6
+ * It lives here rather than in either emitter because both of them draw
7
+ * with it, the same way both measure with `textMetrics.ts`.
8
+ */
9
+ export declare const round: (value: number) => number;
10
+ export interface DiagramLabelProps {
11
+ /**
12
+ * Already wrapped and capped by `measureLabel` - draw exactly these.
13
+ */
14
+ lines: string[];
15
+ centerX: number;
16
+ centerY: number;
17
+ fontSize: number;
18
+ fill: string;
19
+ }
20
+ /**
21
+ * A centred, multi-line label, one `tspan` per line. Shared by both
22
+ * diagram pipelines: a flowchart node label and a sequence message label
23
+ * are the same drawing problem.
24
+ *
25
+ * The line box has to match `DIAGRAM_LINE_HEIGHT`, which is what
26
+ * `measureLabel` sized the box with: text and box disagreeing is the
27
+ * failure mode this whole metrics path exists to avoid.
28
+ *
29
+ * `dominant-baseline` is not used: jsdom and older Safari disagree about it,
30
+ * and shifting the first line by hand is arithmetic that works everywhere.
31
+ */
32
+ export declare const DiagramLabel: (props: DiagramLabelProps) => React.JSX.Element;
33
+ //# sourceMappingURL=DiagramLabel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DiagramLabel.d.ts","sourceRoot":"","sources":["../../../../src/components/markdown-view/diagram/DiagramLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B;;;;;;GAMG;AACH,eAAO,MAAM,KAAK,UAAW,MAAM,KAAG,MAAuC,CAAC;AAE9E,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,YAAY,UAAW,iBAAiB,sBA6BpD,CAAC"}
@@ -1,10 +1,19 @@
1
1
  import { DIAGRAM_LINE_HEIGHT } from "./textMetrics.js";
2
- import { round } from "./FlowchartDiagram.js";
3
2
  import "react";
4
3
  import { jsx } from "react/jsx-runtime";
5
- //#region src/components/markdown-view/diagram/FlowchartDiagramLabel.tsx
4
+ //#region src/components/markdown-view/diagram/DiagramLabel.tsx
6
5
  /**
7
- * A centred, multi-line label, one `tspan` per line.
6
+ * Two decimals is plenty for a diagram and keeps the emitted attributes
7
+ * readable; a layout's raw coordinates carry a dozen.
8
+ *
9
+ * It lives here rather than in either emitter because both of them draw
10
+ * with it, the same way both measure with `textMetrics.ts`.
11
+ */
12
+ const round = (value) => Math.round(value * 100) / 100;
13
+ /**
14
+ * A centred, multi-line label, one `tspan` per line. Shared by both
15
+ * diagram pipelines: a flowchart node label and a sequence message label
16
+ * are the same drawing problem.
8
17
  *
9
18
  * The line box has to match `DIAGRAM_LINE_HEIGHT`, which is what
10
19
  * `measureLabel` sized the box with: text and box disagreeing is the
@@ -13,7 +22,7 @@ import { jsx } from "react/jsx-runtime";
13
22
  * `dominant-baseline` is not used: jsdom and older Safari disagree about it,
14
23
  * and shifting the first line by hand is arithmetic that works everywhere.
15
24
  */
16
- const FlowchartDiagramLabel = (props) => {
25
+ const DiagramLabel = (props) => {
17
26
  const lineBox = props.fontSize * DIAGRAM_LINE_HEIGHT;
18
27
  const firstBaseline = props.centerY - (props.lines.length - 1) * lineBox / 2 + props.fontSize * .36;
19
28
  return /* @__PURE__ */ jsx("text", {
@@ -29,6 +38,6 @@ const FlowchartDiagramLabel = (props) => {
29
38
  });
30
39
  };
31
40
  //#endregion
32
- export { FlowchartDiagramLabel };
41
+ export { DiagramLabel, round };
33
42
 
34
- //# sourceMappingURL=FlowchartDiagramLabel.js.map
43
+ //# sourceMappingURL=DiagramLabel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DiagramLabel.js","names":[],"sources":["../../../../src/components/markdown-view/diagram/DiagramLabel.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport { DIAGRAM_LINE_HEIGHT } from \"./textMetrics.ts\";\n\n/**\n * Two decimals is plenty for a diagram and keeps the emitted attributes\n * readable; a layout's raw coordinates carry a dozen.\n *\n * It lives here rather than in either emitter because both of them draw\n * with it, the same way both measure with `textMetrics.ts`.\n */\nexport const round = (value: number): number => Math.round(value * 100) / 100;\n\nexport interface DiagramLabelProps {\n /**\n * Already wrapped and capped by `measureLabel` - draw exactly these.\n */\n lines: string[];\n centerX: number;\n centerY: number;\n fontSize: number;\n fill: string;\n}\n\n/**\n * A centred, multi-line label, one `tspan` per line. Shared by both\n * diagram pipelines: a flowchart node label and a sequence message label\n * are the same drawing problem.\n *\n * The line box has to match `DIAGRAM_LINE_HEIGHT`, which is what\n * `measureLabel` sized the box with: text and box disagreeing is the\n * failure mode this whole metrics path exists to avoid.\n *\n * `dominant-baseline` is not used: jsdom and older Safari disagree about it,\n * and shifting the first line by hand is arithmetic that works everywhere.\n */\nexport const DiagramLabel = (props: DiagramLabelProps) => {\n const lineBox = props.fontSize * DIAGRAM_LINE_HEIGHT;\n // The stack is centred on `centerY`, then each line sits on its own\n // baseline. `0.36em` is the optical centre of a lowercase run.\n const firstBaseline =\n props.centerY -\n ((props.lines.length - 1) * lineBox) / 2 +\n props.fontSize * 0.36;\n\n return (\n <text\n x={round(props.centerX)}\n y={round(firstBaseline)}\n textAnchor=\"middle\"\n fill={props.fill}\n >\n {props.lines.map((line, index) => (\n <tspan\n // Lines are positional and may legitimately repeat, so the index\n // is the identity here.\n key={`${index}:${line}`}\n x={round(props.centerX)}\n dy={index === 0 ? 0 : round(lineBox)}\n >\n {line}\n </tspan>\n ))}\n </text>\n );\n};\n"],"mappings":";;;;;;;;;;;AAaA,MAAa,SAAS,UAA0B,KAAK,MAAM,QAAQ,GAAG,IAAI;;;;;;;;;;;;;AAyB1E,MAAa,gBAAgB,UAA6B;CACxD,MAAM,UAAU,MAAM,WAAW;CAGjC,MAAM,gBACJ,MAAM,WACJ,MAAM,MAAM,SAAS,KAAK,UAAW,IACvC,MAAM,WAAW;CAEnB,OACE,oBAAC,QAAD;EACE,GAAG,MAAM,MAAM,OAAO;EACtB,GAAG,MAAM,aAAa;EACtB,YAAW;EACX,MAAM,MAAM;EAEX,UAAA,MAAM,MAAM,KAAK,MAAM,UACtB,oBAAC,SAAD;GAIE,GAAG,MAAM,MAAM,OAAO;GACtB,IAAI,UAAU,IAAI,IAAI,MAAM,OAAO;GAElC,UAAA;EACI,GALA,GAAG,MAAM,GAAG,MAKZ,CACR;CACG,CAAA;AAEV"}
@@ -36,9 +36,4 @@ export interface FlowchartDiagramProps {
36
36
  * surface and shift when the serif arrives.
37
37
  */
38
38
  export declare const FlowchartDiagram: (props: FlowchartDiagramProps) => React.JSX.Element;
39
- /**
40
- * Two decimals is plenty for a diagram and keeps the emitted attributes
41
- * readable; graphre's raw coordinates carry a dozen.
42
- */
43
- export declare const round: (value: number) => number;
44
39
  //# sourceMappingURL=FlowchartDiagram.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FlowchartDiagram.d.ts","sourceRoot":"","sources":["../../../../src/components/markdown-view/diagram/FlowchartDiagram.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAG5D,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,eAAe,CAAC;IACvB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,gBAAgB,UAAW,qBAAqB,sBAiF5D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,KAAK,UAAW,MAAM,KAAG,MAAuC,CAAC"}
1
+ {"version":3,"file":"FlowchartDiagram.d.ts","sourceRoot":"","sources":["../../../../src/components/markdown-view/diagram/FlowchartDiagram.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAG5D,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,eAAe,CAAC;IACvB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,gBAAgB,UAAW,qBAAqB,sBAiF5D,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { DIAGRAM_FONT_FAMILY } from "./textMetrics.js";
2
+ import { round } from "./DiagramLabel.js";
2
3
  import { FlowchartDiagramCluster } from "./FlowchartDiagramCluster.js";
3
4
  import { FlowchartDiagramEdge } from "./FlowchartDiagramEdge.js";
4
5
  import { FlowchartDiagramNode } from "./FlowchartDiagramNode.js";
@@ -87,12 +88,7 @@ const FlowchartDiagram = (props) => {
87
88
  ]
88
89
  });
89
90
  };
90
- /**
91
- * Two decimals is plenty for a diagram and keeps the emitted attributes
92
- * readable; graphre's raw coordinates carry a dozen.
93
- */
94
- const round = (value) => Math.round(value * 100) / 100;
95
91
  //#endregion
96
- export { FlowchartDiagram, round };
92
+ export { FlowchartDiagram };
97
93
 
98
94
  //# sourceMappingURL=FlowchartDiagram.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FlowchartDiagram.js","names":[],"sources":["../../../../src/components/markdown-view/diagram/FlowchartDiagram.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport { useId } from \"react\";\n\nimport { FlowchartDiagramCluster } from \"./FlowchartDiagramCluster.tsx\";\nimport { FlowchartDiagramEdge } from \"./FlowchartDiagramEdge.tsx\";\nimport { FlowchartDiagramNode } from \"./FlowchartDiagramNode.tsx\";\nimport type { PositionedGraph } from \"./layoutFlowchart.ts\";\nimport { DIAGRAM_FONT_FAMILY } from \"./textMetrics.ts\";\n\nexport interface FlowchartDiagramProps {\n graph: PositionedGraph;\n /**\n * Read out to assistive technology as the diagram's name.\n */\n title?: string;\n}\n\n/**\n * Draw a laid-out flowchart as themed SVG.\n *\n * ## React elements, not an HTML string, and this is not negotiable\n *\n * `markdown-view.tsx` carries an explicit rule that no raw HTML is ever\n * promoted to markup, because it renders one user's content to another and\n * every raw tag would turn every markdown surface in every app into an\n * injection point. Emitting React elements means labels are escaped by React\n * itself and `dangerouslySetInnerHTML` never appears on this path. Read that\n * comment before \"optimising\" this into a string.\n *\n * ## Theming is the point\n *\n * Colours come from `--primary`, `--border`, `--muted-foreground`, `--card`\n * and `--muted` through `var(...)`, so dark mode works with no second\n * palette and no theme prop. That is the thing mermaid can structurally\n * never give us, and the whole reason drawing is our own code rather than a\n * cost.\n *\n * ## The font is pinned, never inherited\n *\n * Folio view mode and the quest description set prose in Literata at 16.5px,\n * lazy-loaded after first paint; every other surface is Inter. The width\n * table in `textMetrics.ts` is generated against Inter at\n * `DIAGRAM_FONT_SIZE`, so inheriting would make text and box disagree per\n * surface and shift when the serif arrives.\n */\nexport const FlowchartDiagram = (props: FlowchartDiagramProps) => {\n const graph = props.graph;\n // SVG marker ids are global to the document: two diagrams on one page with\n // the same arrowhead id fight, and the loser's arrows vanish.\n const scope = useId().replace(/[^\\w-]/g, \"\");\n\n return (\n <svg\n role=\"img\"\n viewBox={`0 0 ${round(graph.width)} ${round(graph.height)}`}\n // No `width`: the diagram scales to its container, and `max-width`\n // stops a two-node graph being blown up to the full column.\n style={{ maxWidth: `${round(graph.width)}px`, height: \"auto\" }}\n className=\"my-4 block w-full\"\n // camelCase, not `font-family` / `font-size`: React renders these as\n // the hyphenated SVG presentation attributes either way, but the\n // hyphenated spelling is an \"Invalid DOM property\" warning on every\n // render - noise in a component mounted on every markdown surface in\n // the app.\n fontFamily={DIAGRAM_FONT_FAMILY}\n fontSize={graph.fontSize}\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <title>{props.title ?? \"Flowchart diagram\"}</title>\n <defs>\n <marker\n id={`${scope}-arrow-end`}\n markerWidth=\"9\"\n markerHeight=\"7\"\n refX=\"8\"\n refY=\"3.5\"\n orient=\"auto\"\n markerUnits=\"userSpaceOnUse\"\n >\n {/*\n `context-stroke`, not `currentColor`. A marker lives in `<defs>`,\n so `currentColor` resolves against the MARKER's inherited colour,\n not the edge's - the arrowhead came out `--foreground` while its\n line was `--muted-foreground`, and in a differently-themed\n container it was the wrong colour outright.\n */}\n <path d=\"M0,0 L9,3.5 L0,7 z\" fill=\"context-stroke\" />\n </marker>\n <marker\n id={`${scope}-arrow-start`}\n markerWidth=\"9\"\n markerHeight=\"7\"\n refX=\"1\"\n refY=\"3.5\"\n orient=\"auto-start-reverse\"\n markerUnits=\"userSpaceOnUse\"\n >\n <path d=\"M0,0 L9,3.5 L0,7 z\" fill=\"context-stroke\" />\n </marker>\n </defs>\n\n {/*\n Order IS z-order in SVG, so clusters (sorted outermost first by the\n layout adapter) go down first, then edges, then nodes on top. No\n z-index anywhere, and nothing to keep in sync.\n */}\n {graph.clusters.map((cluster) => (\n <FlowchartDiagramCluster key={cluster.id} cluster={cluster} />\n ))}\n {graph.edges.map((edge, index) => (\n <FlowchartDiagramEdge\n key={`${edge.from}->${edge.to}#${index}`}\n edge={edge}\n scope={scope}\n fontSize={graph.fontSize}\n />\n ))}\n {graph.nodes.map((node) => (\n <FlowchartDiagramNode\n key={node.id}\n node={node}\n fontSize={graph.fontSize}\n />\n ))}\n </svg>\n );\n};\n\n/**\n * Two decimals is plenty for a diagram and keeps the emitted attributes\n * readable; graphre's raw coordinates carry a dozen.\n */\nexport const round = (value: number): number => Math.round(value * 100) / 100;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDA,MAAa,oBAAoB,UAAiC;CAChE,MAAM,QAAQ,MAAM;CAGpB,MAAM,QAAQ,MAAM,CAAC,CAAC,QAAQ,WAAW,EAAE;CAE3C,OACE,qBAAC,OAAD;EACE,MAAK;EACL,SAAS,OAAO,MAAM,MAAM,KAAK,EAAE,GAAG,MAAM,MAAM,MAAM;EAGxD,OAAO;GAAE,UAAU,GAAG,MAAM,MAAM,KAAK,EAAE;GAAK,QAAQ;EAAO;EAC7D,WAAU;EAMV,YAAY;EACZ,UAAU,MAAM;EAChB,OAAM;EAdR,UAAA;GAgBE,oBAAC,SAAD,EAAA,UAAQ,MAAM,SAAS,oBAA2B,CAAA;GAClD,qBAAC,QAAD,EAAA,UAAA,CACE,oBAAC,UAAD;IACE,IAAI,GAAG,MAAM;IACb,aAAY;IACZ,cAAa;IACb,MAAK;IACL,MAAK;IACL,QAAO;IACP,aAAY;IASZ,UAAA,oBAAC,QAAD;KAAM,GAAE;KAAqB,MAAK;IAAkB,CAAA;GAC9C,CAAA,GACR,oBAAC,UAAD;IACE,IAAI,GAAG,MAAM;IACb,aAAY;IACZ,cAAa;IACb,MAAK;IACL,MAAK;IACL,QAAO;IACP,aAAY;IAEZ,UAAA,oBAAC,QAAD;KAAM,GAAE;KAAqB,MAAK;IAAkB,CAAA;GAC9C,CAAA,CACJ,EAAA,CAAA;GAOL,MAAM,SAAS,KAAK,YACnB,oBAAC,yBAAD,EAAmD,QAAU,GAA/B,QAAQ,EAAuB,CAC9D;GACA,MAAM,MAAM,KAAK,MAAM,UACtB,oBAAC,sBAAD;IAEQ;IACC;IACP,UAAU,MAAM;GACjB,GAJM,GAAG,KAAK,KAAK,IAAI,KAAK,GAAG,GAAG,OAIlC,CACF;GACA,MAAM,MAAM,KAAK,SAChB,oBAAC,sBAAD;IAEQ;IACN,UAAU,MAAM;GACjB,GAHM,KAAK,EAGX,CACF;EACE;;AAET;;;;;AAMA,MAAa,SAAS,UAA0B,KAAK,MAAM,QAAQ,GAAG,IAAI"}
1
+ {"version":3,"file":"FlowchartDiagram.js","names":[],"sources":["../../../../src/components/markdown-view/diagram/FlowchartDiagram.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport { useId } from \"react\";\n\nimport { round } from \"./DiagramLabel.tsx\";\nimport { FlowchartDiagramCluster } from \"./FlowchartDiagramCluster.tsx\";\nimport { FlowchartDiagramEdge } from \"./FlowchartDiagramEdge.tsx\";\nimport { FlowchartDiagramNode } from \"./FlowchartDiagramNode.tsx\";\nimport type { PositionedGraph } from \"./layoutFlowchart.ts\";\nimport { DIAGRAM_FONT_FAMILY } from \"./textMetrics.ts\";\n\nexport interface FlowchartDiagramProps {\n graph: PositionedGraph;\n /**\n * Read out to assistive technology as the diagram's name.\n */\n title?: string;\n}\n\n/**\n * Draw a laid-out flowchart as themed SVG.\n *\n * ## React elements, not an HTML string, and this is not negotiable\n *\n * `markdown-view.tsx` carries an explicit rule that no raw HTML is ever\n * promoted to markup, because it renders one user's content to another and\n * every raw tag would turn every markdown surface in every app into an\n * injection point. Emitting React elements means labels are escaped by React\n * itself and `dangerouslySetInnerHTML` never appears on this path. Read that\n * comment before \"optimising\" this into a string.\n *\n * ## Theming is the point\n *\n * Colours come from `--primary`, `--border`, `--muted-foreground`, `--card`\n * and `--muted` through `var(...)`, so dark mode works with no second\n * palette and no theme prop. That is the thing mermaid can structurally\n * never give us, and the whole reason drawing is our own code rather than a\n * cost.\n *\n * ## The font is pinned, never inherited\n *\n * Folio view mode and the quest description set prose in Literata at 16.5px,\n * lazy-loaded after first paint; every other surface is Inter. The width\n * table in `textMetrics.ts` is generated against Inter at\n * `DIAGRAM_FONT_SIZE`, so inheriting would make text and box disagree per\n * surface and shift when the serif arrives.\n */\nexport const FlowchartDiagram = (props: FlowchartDiagramProps) => {\n const graph = props.graph;\n // SVG marker ids are global to the document: two diagrams on one page with\n // the same arrowhead id fight, and the loser's arrows vanish.\n const scope = useId().replace(/[^\\w-]/g, \"\");\n\n return (\n <svg\n role=\"img\"\n viewBox={`0 0 ${round(graph.width)} ${round(graph.height)}`}\n // No `width`: the diagram scales to its container, and `max-width`\n // stops a two-node graph being blown up to the full column.\n style={{ maxWidth: `${round(graph.width)}px`, height: \"auto\" }}\n className=\"my-4 block w-full\"\n // camelCase, not `font-family` / `font-size`: React renders these as\n // the hyphenated SVG presentation attributes either way, but the\n // hyphenated spelling is an \"Invalid DOM property\" warning on every\n // render - noise in a component mounted on every markdown surface in\n // the app.\n fontFamily={DIAGRAM_FONT_FAMILY}\n fontSize={graph.fontSize}\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <title>{props.title ?? \"Flowchart diagram\"}</title>\n <defs>\n <marker\n id={`${scope}-arrow-end`}\n markerWidth=\"9\"\n markerHeight=\"7\"\n refX=\"8\"\n refY=\"3.5\"\n orient=\"auto\"\n markerUnits=\"userSpaceOnUse\"\n >\n {/*\n `context-stroke`, not `currentColor`. A marker lives in `<defs>`,\n so `currentColor` resolves against the MARKER's inherited colour,\n not the edge's - the arrowhead came out `--foreground` while its\n line was `--muted-foreground`, and in a differently-themed\n container it was the wrong colour outright.\n */}\n <path d=\"M0,0 L9,3.5 L0,7 z\" fill=\"context-stroke\" />\n </marker>\n <marker\n id={`${scope}-arrow-start`}\n markerWidth=\"9\"\n markerHeight=\"7\"\n refX=\"1\"\n refY=\"3.5\"\n orient=\"auto-start-reverse\"\n markerUnits=\"userSpaceOnUse\"\n >\n <path d=\"M0,0 L9,3.5 L0,7 z\" fill=\"context-stroke\" />\n </marker>\n </defs>\n\n {/*\n Order IS z-order in SVG, so clusters (sorted outermost first by the\n layout adapter) go down first, then edges, then nodes on top. No\n z-index anywhere, and nothing to keep in sync.\n */}\n {graph.clusters.map((cluster) => (\n <FlowchartDiagramCluster key={cluster.id} cluster={cluster} />\n ))}\n {graph.edges.map((edge, index) => (\n <FlowchartDiagramEdge\n key={`${edge.from}->${edge.to}#${index}`}\n edge={edge}\n scope={scope}\n fontSize={graph.fontSize}\n />\n ))}\n {graph.nodes.map((node) => (\n <FlowchartDiagramNode\n key={node.id}\n node={node}\n fontSize={graph.fontSize}\n />\n ))}\n </svg>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiDA,MAAa,oBAAoB,UAAiC;CAChE,MAAM,QAAQ,MAAM;CAGpB,MAAM,QAAQ,MAAM,CAAC,CAAC,QAAQ,WAAW,EAAE;CAE3C,OACE,qBAAC,OAAD;EACE,MAAK;EACL,SAAS,OAAO,MAAM,MAAM,KAAK,EAAE,GAAG,MAAM,MAAM,MAAM;EAGxD,OAAO;GAAE,UAAU,GAAG,MAAM,MAAM,KAAK,EAAE;GAAK,QAAQ;EAAO;EAC7D,WAAU;EAMV,YAAY;EACZ,UAAU,MAAM;EAChB,OAAM;EAdR,UAAA;GAgBE,oBAAC,SAAD,EAAA,UAAQ,MAAM,SAAS,oBAA2B,CAAA;GAClD,qBAAC,QAAD,EAAA,UAAA,CACE,oBAAC,UAAD;IACE,IAAI,GAAG,MAAM;IACb,aAAY;IACZ,cAAa;IACb,MAAK;IACL,MAAK;IACL,QAAO;IACP,aAAY;IASZ,UAAA,oBAAC,QAAD;KAAM,GAAE;KAAqB,MAAK;IAAkB,CAAA;GAC9C,CAAA,GACR,oBAAC,UAAD;IACE,IAAI,GAAG,MAAM;IACb,aAAY;IACZ,cAAa;IACb,MAAK;IACL,MAAK;IACL,QAAO;IACP,aAAY;IAEZ,UAAA,oBAAC,QAAD;KAAM,GAAE;KAAqB,MAAK;IAAkB,CAAA;GAC9C,CAAA,CACJ,EAAA,CAAA;GAOL,MAAM,SAAS,KAAK,YACnB,oBAAC,yBAAD,EAAmD,QAAU,GAA/B,QAAQ,EAAuB,CAC9D;GACA,MAAM,MAAM,KAAK,MAAM,UACtB,oBAAC,sBAAD;IAEQ;IACC;IACP,UAAU,MAAM;GACjB,GAJM,GAAG,KAAK,KAAK,IAAI,KAAK,GAAG,GAAG,OAIlC,CACF;GACA,MAAM,MAAM,KAAK,SAChB,oBAAC,sBAAD;IAEQ;IACN,UAAU,MAAM;GACjB,GAHM,KAAK,EAGX,CACF;EACE;;AAET"}
@@ -1,5 +1,5 @@
1
1
  import "./textMetrics.js";
2
- import { round } from "./FlowchartDiagram.js";
2
+ import { round } from "./DiagramLabel.js";
3
3
  import "react";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
  //#region src/components/markdown-view/diagram/FlowchartDiagramCluster.tsx
@@ -1 +1 @@
1
- {"version":3,"file":"FlowchartDiagramCluster.js","names":[],"sources":["../../../../src/components/markdown-view/diagram/FlowchartDiagramCluster.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport { round } from \"./FlowchartDiagram.tsx\";\nimport type { PositionedCluster } from \"./layoutFlowchart.ts\";\nimport { DIAGRAM_FONT_SIZE } from \"./textMetrics.ts\";\n\nexport interface FlowchartDiagramClusterProps {\n cluster: PositionedCluster;\n}\n\n/**\n * One `subgraph` box, drawn behind its members.\n *\n * The fill alpha grows with nesting depth so an inner cluster reads as\n * inside its parent rather than beside it. `--muted` at a low alpha is dark\n * on light and light on dark, so one value works in both themes.\n */\nexport const FlowchartDiagramCluster = (\n props: FlowchartDiagramClusterProps,\n) => {\n const cluster = props.cluster;\n const x = round(cluster.x);\n const y = round(cluster.y);\n\n return (\n <g data-cluster={cluster.id}>\n <rect\n data-cluster={cluster.id}\n x={x}\n y={y}\n width={round(cluster.width)}\n height={round(cluster.height)}\n rx={8}\n ry={8}\n fill=\"var(--muted)\"\n fillOpacity={Math.min(0.35 + cluster.depth * 0.2, 0.8)}\n stroke=\"var(--border)\"\n strokeWidth={1}\n strokeDasharray=\"4 3\"\n />\n {/*\n Top-left, just inside the box, on the same baseline arithmetic the\n node labels use. A cluster title is a single line by construction:\n the parser never splits it.\n */}\n <text\n x={round(x + 10)}\n y={round(y + DIAGRAM_FONT_SIZE + 4)}\n fill=\"var(--muted-foreground)\"\n fontSize={DIAGRAM_FONT_SIZE * 0.9}\n fontWeight={500}\n >\n {cluster.label}\n </text>\n </g>\n );\n};\n"],"mappings":";;;;;;;;;;;;AAmBA,MAAa,2BACX,UACG;CACH,MAAM,UAAU,MAAM;CACtB,MAAM,IAAI,MAAM,QAAQ,CAAC;CACzB,MAAM,IAAI,MAAM,QAAQ,CAAC;CAEzB,OACE,qBAAC,KAAD;EAAG,gBAAc,QAAQ;EAAzB,UAAA,CACE,oBAAC,QAAD;GACE,gBAAc,QAAQ;GACnB;GACA;GACH,OAAO,MAAM,QAAQ,KAAK;GAC1B,QAAQ,MAAM,QAAQ,MAAM;GAC5B,IAAI;GACJ,IAAI;GACJ,MAAK;GACL,aAAa,KAAK,IAAI,MAAO,QAAQ,QAAQ,IAAK,EAAG;GACrD,QAAO;GACP,aAAa;GACb,iBAAgB;EACjB,CAAA,GAMD,oBAAC,QAAD;GACE,GAAG,MAAM,IAAI,EAAE;GACf,GAAG,MAAM,IAAA,KAAwB,CAAC;GAClC,MAAK;GACL,UAAA,KAA8B;GAC9B,YAAY;GAEX,UAAA,QAAQ;EACL,CAAA,CACL;;AAEP"}
1
+ {"version":3,"file":"FlowchartDiagramCluster.js","names":[],"sources":["../../../../src/components/markdown-view/diagram/FlowchartDiagramCluster.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport { round } from \"./DiagramLabel.tsx\";\nimport type { PositionedCluster } from \"./layoutFlowchart.ts\";\nimport { DIAGRAM_FONT_SIZE } from \"./textMetrics.ts\";\n\nexport interface FlowchartDiagramClusterProps {\n cluster: PositionedCluster;\n}\n\n/**\n * One `subgraph` box, drawn behind its members.\n *\n * The fill alpha grows with nesting depth so an inner cluster reads as\n * inside its parent rather than beside it. `--muted` at a low alpha is dark\n * on light and light on dark, so one value works in both themes.\n */\nexport const FlowchartDiagramCluster = (\n props: FlowchartDiagramClusterProps,\n) => {\n const cluster = props.cluster;\n const x = round(cluster.x);\n const y = round(cluster.y);\n\n return (\n <g data-cluster={cluster.id}>\n <rect\n data-cluster={cluster.id}\n x={x}\n y={y}\n width={round(cluster.width)}\n height={round(cluster.height)}\n rx={8}\n ry={8}\n fill=\"var(--muted)\"\n fillOpacity={Math.min(0.35 + cluster.depth * 0.2, 0.8)}\n stroke=\"var(--border)\"\n strokeWidth={1}\n strokeDasharray=\"4 3\"\n />\n {/*\n Top-left, just inside the box, on the same baseline arithmetic the\n node labels use. A cluster title is a single line by construction:\n the parser never splits it.\n */}\n <text\n x={round(x + 10)}\n y={round(y + DIAGRAM_FONT_SIZE + 4)}\n fill=\"var(--muted-foreground)\"\n fontSize={DIAGRAM_FONT_SIZE * 0.9}\n fontWeight={500}\n >\n {cluster.label}\n </text>\n </g>\n );\n};\n"],"mappings":";;;;;;;;;;;;AAmBA,MAAa,2BACX,UACG;CACH,MAAM,UAAU,MAAM;CACtB,MAAM,IAAI,MAAM,QAAQ,CAAC;CACzB,MAAM,IAAI,MAAM,QAAQ,CAAC;CAEzB,OACE,qBAAC,KAAD;EAAG,gBAAc,QAAQ;EAAzB,UAAA,CACE,oBAAC,QAAD;GACE,gBAAc,QAAQ;GACnB;GACA;GACH,OAAO,MAAM,QAAQ,KAAK;GAC1B,QAAQ,MAAM,QAAQ,MAAM;GAC5B,IAAI;GACJ,IAAI;GACJ,MAAK;GACL,aAAa,KAAK,IAAI,MAAO,QAAQ,QAAQ,IAAK,EAAG;GACrD,QAAO;GACP,aAAa;GACb,iBAAgB;EACjB,CAAA,GAMD,oBAAC,QAAD;GACE,GAAG,MAAM,IAAI,EAAE;GACf,GAAG,MAAM,IAAA,KAAwB,CAAC;GAClC,MAAK;GACL,UAAA,KAA8B;GAC9B,YAAY;GAEX,UAAA,QAAQ;EACL,CAAA,CACL;;AAEP"}
@@ -1 +1 @@
1
- {"version":3,"file":"FlowchartDiagramEdge.d.ts","sourceRoot":"","sources":["../../../../src/components/markdown-view/diagram/FlowchartDiagramEdge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,cAAc,CAAC;IACrB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,UAAW,yBAAyB,sBA+CpE,CAAC"}
1
+ {"version":3,"file":"FlowchartDiagramEdge.d.ts","sourceRoot":"","sources":["../../../../src/components/markdown-view/diagram/FlowchartDiagramEdge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,cAAc,CAAC;IACrB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,UAAW,yBAAyB,sBA+CpE,CAAC"}
@@ -1,5 +1,4 @@
1
- import { FlowchartDiagramLabel } from "./FlowchartDiagramLabel.js";
2
- import { round } from "./FlowchartDiagram.js";
1
+ import { DiagramLabel, round } from "./DiagramLabel.js";
3
2
  import "react";
4
3
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
5
4
  //#region src/components/markdown-view/diagram/FlowchartDiagramEdge.tsx
@@ -34,7 +33,7 @@ const FlowchartDiagramEdge = (props) => {
34
33
  rx: 4,
35
34
  ry: 4,
36
35
  fill: "var(--background)"
37
- }), /* @__PURE__ */ jsx(FlowchartDiagramLabel, {
36
+ }), /* @__PURE__ */ jsx(DiagramLabel, {
38
37
  lines: edge.label.lines,
39
38
  centerX: edge.label.x + edge.label.width / 2,
40
39
  centerY: edge.label.y + edge.label.height / 2,
@@ -1 +1 @@
1
- {"version":3,"file":"FlowchartDiagramEdge.js","names":[],"sources":["../../../../src/components/markdown-view/diagram/FlowchartDiagramEdge.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport { round } from \"./FlowchartDiagram.tsx\";\nimport { FlowchartDiagramLabel } from \"./FlowchartDiagramLabel.tsx\";\nimport type { PositionedEdge } from \"./layoutFlowchart.ts\";\n\nexport interface FlowchartDiagramEdgeProps {\n edge: PositionedEdge;\n /**\n * Instance-unique prefix for the arrowhead marker ids.\n */\n scope: string;\n fontSize: number;\n}\n\n/**\n * One routed edge, its arrowheads and its label chip.\n *\n * `currentColor` on the path is what makes the arrowhead markers match: a\n * marker inherits `currentColor` from the element that references it, so\n * one pair of markers serves every edge colour without a marker per style.\n */\nexport const FlowchartDiagramEdge = (props: FlowchartDiagramEdgeProps) => {\n const edge = props.edge;\n\n return (\n <g style={{ color: \"var(--muted-foreground)\" }}>\n <path\n data-edge={`${edge.from}->${edge.to}`}\n d={pathOf(edge.points)}\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={edge.style === \"thick\" ? 2.5 : 1.4}\n strokeDasharray={edge.style === \"dashed\" ? \"5 4\" : undefined}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n markerEnd={edge.arrowEnd ? `url(#${props.scope}-arrow-end)` : undefined}\n markerStart={\n edge.arrowStart ? `url(#${props.scope}-arrow-start)` : undefined\n }\n />\n {edge.label ? (\n <>\n {/*\n The chip is what stops the line running through the text. It is\n drawn in `--background` rather than `--card` so it reads as a\n hole in the edge rather than as a small node.\n */}\n <rect\n data-edge-label={`${edge.from}->${edge.to}`}\n x={round(edge.label.x)}\n y={round(edge.label.y)}\n width={round(edge.label.width)}\n height={round(edge.label.height)}\n rx={4}\n ry={4}\n fill=\"var(--background)\"\n />\n <FlowchartDiagramLabel\n lines={edge.label.lines}\n centerX={edge.label.x + edge.label.width / 2}\n centerY={edge.label.y + edge.label.height / 2}\n fontSize={props.fontSize * 0.92}\n fill=\"var(--muted-foreground)\"\n />\n </>\n ) : null}\n </g>\n );\n};\n\n/**\n * A rounded polyline through graphre's point list.\n *\n * Quadratic segments through the midpoints round every corner without any\n * curve fitting: each control point is the original vertex, so the line\n * still passes where the layout routed it.\n */\nconst pathOf = (points: Array<{ x: number; y: number }>): string => {\n const at = (index: number) =>\n `${round(points[index].x)},${round(points[index].y)}`;\n if (points.length === 2) return `M${at(0)} L${at(1)}`;\n\n let d = `M${at(0)}`;\n for (let i = 1; i < points.length - 1; i++) {\n const current = points[i];\n const next = points[i + 1];\n const midX = round((current.x + next.x) / 2);\n const midY = round((current.y + next.y) / 2);\n d += ` Q${round(current.x)},${round(current.y)} ${midX},${midY}`;\n }\n return `${d} L${at(points.length - 1)}`;\n};\n"],"mappings":";;;;;;;;;;;;AAwBA,MAAa,wBAAwB,UAAqC;CACxE,MAAM,OAAO,MAAM;CAEnB,OACE,qBAAC,KAAD;EAAG,OAAO,EAAE,OAAO,0BAA0B;EAA7C,UAAA,CACE,oBAAC,QAAD;GACE,aAAW,GAAG,KAAK,KAAK,IAAI,KAAK;GACjC,GAAG,OAAO,KAAK,MAAM;GACrB,MAAK;GACL,QAAO;GACP,aAAa,KAAK,UAAU,UAAU,MAAM;GAC5C,iBAAiB,KAAK,UAAU,WAAW,QAAQ,KAAA;GACnD,eAAc;GACd,gBAAe;GACf,WAAW,KAAK,WAAW,QAAQ,MAAM,MAAM,eAAe,KAAA;GAC9D,aACE,KAAK,aAAa,QAAQ,MAAM,MAAM,iBAAiB,KAAA;EAE1D,CAAA,GACA,KAAK,QACJ,qBAAA,YAAA,EAAA,UAAA,CAME,oBAAC,QAAD;GACE,mBAAiB,GAAG,KAAK,KAAK,IAAI,KAAK;GACvC,GAAG,MAAM,KAAK,MAAM,CAAC;GACrB,GAAG,MAAM,KAAK,MAAM,CAAC;GACrB,OAAO,MAAM,KAAK,MAAM,KAAK;GAC7B,QAAQ,MAAM,KAAK,MAAM,MAAM;GAC/B,IAAI;GACJ,IAAI;GACJ,MAAK;EACN,CAAA,GACD,oBAAC,uBAAD;GACE,OAAO,KAAK,MAAM;GAClB,SAAS,KAAK,MAAM,IAAI,KAAK,MAAM,QAAQ;GAC3C,SAAS,KAAK,MAAM,IAAI,KAAK,MAAM,SAAS;GAC5C,UAAU,MAAM,WAAW;GAC3B,MAAK;EACN,CAAA,CACD,EAAA,CAAA,IACA,IACH;;AAEP;;;;;;;;AASA,MAAM,UAAU,WAAoD;CAClE,MAAM,MAAM,UACV,GAAG,MAAM,OAAO,MAAM,CAAC,CAAC,EAAE,GAAG,MAAM,OAAO,MAAM,CAAC,CAAC;CACpD,IAAI,OAAO,WAAW,GAAG,OAAO,IAAI,GAAG,CAAC,EAAE,IAAI,GAAG,CAAC;CAElD,IAAI,IAAI,IAAI,GAAG,CAAC;CAChB,KAAK,IAAI,IAAI,GAAG,IAAI,OAAO,SAAS,GAAG,KAAK;EAC1C,MAAM,UAAU,OAAO;EACvB,MAAM,OAAO,OAAO,IAAI;EACxB,MAAM,OAAO,OAAO,QAAQ,IAAI,KAAK,KAAK,CAAC;EAC3C,MAAM,OAAO,OAAO,QAAQ,IAAI,KAAK,KAAK,CAAC;EAC3C,KAAK,KAAK,MAAM,QAAQ,CAAC,EAAE,GAAG,MAAM,QAAQ,CAAC,EAAE,GAAG,KAAK,GAAG;CAC5D;CACA,OAAO,GAAG,EAAE,IAAI,GAAG,OAAO,SAAS,CAAC;AACtC"}
1
+ {"version":3,"file":"FlowchartDiagramEdge.js","names":[],"sources":["../../../../src/components/markdown-view/diagram/FlowchartDiagramEdge.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport { DiagramLabel, round } from \"./DiagramLabel.tsx\";\nimport type { PositionedEdge } from \"./layoutFlowchart.ts\";\n\nexport interface FlowchartDiagramEdgeProps {\n edge: PositionedEdge;\n /**\n * Instance-unique prefix for the arrowhead marker ids.\n */\n scope: string;\n fontSize: number;\n}\n\n/**\n * One routed edge, its arrowheads and its label chip.\n *\n * `currentColor` on the path is what makes the arrowhead markers match: a\n * marker inherits `currentColor` from the element that references it, so\n * one pair of markers serves every edge colour without a marker per style.\n */\nexport const FlowchartDiagramEdge = (props: FlowchartDiagramEdgeProps) => {\n const edge = props.edge;\n\n return (\n <g style={{ color: \"var(--muted-foreground)\" }}>\n <path\n data-edge={`${edge.from}->${edge.to}`}\n d={pathOf(edge.points)}\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={edge.style === \"thick\" ? 2.5 : 1.4}\n strokeDasharray={edge.style === \"dashed\" ? \"5 4\" : undefined}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n markerEnd={edge.arrowEnd ? `url(#${props.scope}-arrow-end)` : undefined}\n markerStart={\n edge.arrowStart ? `url(#${props.scope}-arrow-start)` : undefined\n }\n />\n {edge.label ? (\n <>\n {/*\n The chip is what stops the line running through the text. It is\n drawn in `--background` rather than `--card` so it reads as a\n hole in the edge rather than as a small node.\n */}\n <rect\n data-edge-label={`${edge.from}->${edge.to}`}\n x={round(edge.label.x)}\n y={round(edge.label.y)}\n width={round(edge.label.width)}\n height={round(edge.label.height)}\n rx={4}\n ry={4}\n fill=\"var(--background)\"\n />\n <DiagramLabel\n lines={edge.label.lines}\n centerX={edge.label.x + edge.label.width / 2}\n centerY={edge.label.y + edge.label.height / 2}\n fontSize={props.fontSize * 0.92}\n fill=\"var(--muted-foreground)\"\n />\n </>\n ) : null}\n </g>\n );\n};\n\n/**\n * A rounded polyline through graphre's point list.\n *\n * Quadratic segments through the midpoints round every corner without any\n * curve fitting: each control point is the original vertex, so the line\n * still passes where the layout routed it.\n */\nconst pathOf = (points: Array<{ x: number; y: number }>): string => {\n const at = (index: number) =>\n `${round(points[index].x)},${round(points[index].y)}`;\n if (points.length === 2) return `M${at(0)} L${at(1)}`;\n\n let d = `M${at(0)}`;\n for (let i = 1; i < points.length - 1; i++) {\n const current = points[i];\n const next = points[i + 1];\n const midX = round((current.x + next.x) / 2);\n const midY = round((current.y + next.y) / 2);\n d += ` Q${round(current.x)},${round(current.y)} ${midX},${midY}`;\n }\n return `${d} L${at(points.length - 1)}`;\n};\n"],"mappings":";;;;;;;;;;;AAuBA,MAAa,wBAAwB,UAAqC;CACxE,MAAM,OAAO,MAAM;CAEnB,OACE,qBAAC,KAAD;EAAG,OAAO,EAAE,OAAO,0BAA0B;EAA7C,UAAA,CACE,oBAAC,QAAD;GACE,aAAW,GAAG,KAAK,KAAK,IAAI,KAAK;GACjC,GAAG,OAAO,KAAK,MAAM;GACrB,MAAK;GACL,QAAO;GACP,aAAa,KAAK,UAAU,UAAU,MAAM;GAC5C,iBAAiB,KAAK,UAAU,WAAW,QAAQ,KAAA;GACnD,eAAc;GACd,gBAAe;GACf,WAAW,KAAK,WAAW,QAAQ,MAAM,MAAM,eAAe,KAAA;GAC9D,aACE,KAAK,aAAa,QAAQ,MAAM,MAAM,iBAAiB,KAAA;EAE1D,CAAA,GACA,KAAK,QACJ,qBAAA,YAAA,EAAA,UAAA,CAME,oBAAC,QAAD;GACE,mBAAiB,GAAG,KAAK,KAAK,IAAI,KAAK;GACvC,GAAG,MAAM,KAAK,MAAM,CAAC;GACrB,GAAG,MAAM,KAAK,MAAM,CAAC;GACrB,OAAO,MAAM,KAAK,MAAM,KAAK;GAC7B,QAAQ,MAAM,KAAK,MAAM,MAAM;GAC/B,IAAI;GACJ,IAAI;GACJ,MAAK;EACN,CAAA,GACD,oBAAC,cAAD;GACE,OAAO,KAAK,MAAM;GAClB,SAAS,KAAK,MAAM,IAAI,KAAK,MAAM,QAAQ;GAC3C,SAAS,KAAK,MAAM,IAAI,KAAK,MAAM,SAAS;GAC5C,UAAU,MAAM,WAAW;GAC3B,MAAK;EACN,CAAA,CACD,EAAA,CAAA,IACA,IACH;;AAEP;;;;;;;;AASA,MAAM,UAAU,WAAoD;CAClE,MAAM,MAAM,UACV,GAAG,MAAM,OAAO,MAAM,CAAC,CAAC,EAAE,GAAG,MAAM,OAAO,MAAM,CAAC,CAAC;CACpD,IAAI,OAAO,WAAW,GAAG,OAAO,IAAI,GAAG,CAAC,EAAE,IAAI,GAAG,CAAC;CAElD,IAAI,IAAI,IAAI,GAAG,CAAC;CAChB,KAAK,IAAI,IAAI,GAAG,IAAI,OAAO,SAAS,GAAG,KAAK;EAC1C,MAAM,UAAU,OAAO;EACvB,MAAM,OAAO,OAAO,IAAI;EACxB,MAAM,OAAO,OAAO,QAAQ,IAAI,KAAK,KAAK,CAAC;EAC3C,MAAM,OAAO,OAAO,QAAQ,IAAI,KAAK,KAAK,CAAC;EAC3C,KAAK,KAAK,MAAM,QAAQ,CAAC,EAAE,GAAG,MAAM,QAAQ,CAAC,EAAE,GAAG,KAAK,GAAG;CAC5D;CACA,OAAO,GAAG,EAAE,IAAI,GAAG,OAAO,SAAS,CAAC;AACtC"}
@@ -1 +1 @@
1
- {"version":3,"file":"FlowchartDiagramNode.d.ts","sourceRoot":"","sources":["../../../../src/components/markdown-view/diagram/FlowchartDiagramNode.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,cAAc,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,UAAW,yBAAyB,sBAuDpE,CAAC"}
1
+ {"version":3,"file":"FlowchartDiagramNode.d.ts","sourceRoot":"","sources":["../../../../src/components/markdown-view/diagram/FlowchartDiagramNode.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,cAAc,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,UAAW,yBAAyB,sBAuDpE,CAAC"}
@@ -1,5 +1,4 @@
1
- import { FlowchartDiagramLabel } from "./FlowchartDiagramLabel.js";
2
- import { round } from "./FlowchartDiagram.js";
1
+ import { DiagramLabel, round } from "./DiagramLabel.js";
3
2
  import "react";
4
3
  import { jsx, jsxs } from "react/jsx-runtime";
5
4
  //#region src/components/markdown-view/diagram/FlowchartDiagramNode.tsx
@@ -48,7 +47,7 @@ const FlowchartDiagramNode = (props) => {
48
47
  fill: "var(--card)",
49
48
  stroke: "var(--border)",
50
49
  strokeWidth: 1.25
51
- }), /* @__PURE__ */ jsx(FlowchartDiagramLabel, {
50
+ }), /* @__PURE__ */ jsx(DiagramLabel, {
52
51
  lines: node.lines,
53
52
  centerX: x + width / 2,
54
53
  centerY: y + height / 2,
@@ -1 +1 @@
1
- {"version":3,"file":"FlowchartDiagramNode.js","names":[],"sources":["../../../../src/components/markdown-view/diagram/FlowchartDiagramNode.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport { round } from \"./FlowchartDiagram.tsx\";\nimport { FlowchartDiagramLabel } from \"./FlowchartDiagramLabel.tsx\";\nimport type { PositionedNode } from \"./layoutFlowchart.ts\";\n\nexport interface FlowchartDiagramNodeProps {\n node: PositionedNode;\n fontSize: number;\n}\n\n/**\n * One box and its label.\n *\n * The four shapes are drawn with four primitives rather than one `path`\n * each, so the SVG stays readable and a rounded rect is literally a rect\n * with an `rx`. Colours are CSS variables throughout: an element with no\n * class at all survives being extracted, and dark mode needs no second\n * palette.\n */\nexport const FlowchartDiagramNode = (props: FlowchartDiagramNodeProps) => {\n const node = props.node;\n const x = round(node.x);\n const y = round(node.y);\n const width = round(node.width);\n const height = round(node.height);\n\n return (\n <g data-node={node.id}>\n {node.shape === \"diamond\" ? (\n <polygon\n points={[\n `${round(x + width / 2)},${y}`,\n `${round(x + width)},${round(y + height / 2)}`,\n `${round(x + width / 2)},${round(y + height)}`,\n `${x},${round(y + height / 2)}`,\n ].join(\" \")}\n fill=\"var(--card)\"\n stroke=\"var(--border)\"\n strokeWidth={1.25}\n />\n ) : node.shape === \"circle\" ? (\n <ellipse\n cx={round(x + width / 2)}\n cy={round(y + height / 2)}\n rx={round(width / 2)}\n ry={round(height / 2)}\n fill=\"var(--card)\"\n stroke=\"var(--border)\"\n strokeWidth={1.25}\n />\n ) : (\n <rect\n x={x}\n y={y}\n width={width}\n height={height}\n // A \"rounded\" node is a stadium in mermaid, so the radius is half\n // the height rather than a fixed corner.\n rx={node.shape === \"rounded\" ? round(height / 2) : 5}\n ry={node.shape === \"rounded\" ? round(height / 2) : 5}\n fill=\"var(--card)\"\n stroke=\"var(--border)\"\n strokeWidth={1.25}\n />\n )}\n <FlowchartDiagramLabel\n lines={node.lines}\n centerX={x + width / 2}\n centerY={y + height / 2}\n fontSize={props.fontSize}\n fill=\"var(--card-foreground)\"\n />\n </g>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;AAsBA,MAAa,wBAAwB,UAAqC;CACxE,MAAM,OAAO,MAAM;CACnB,MAAM,IAAI,MAAM,KAAK,CAAC;CACtB,MAAM,IAAI,MAAM,KAAK,CAAC;CACtB,MAAM,QAAQ,MAAM,KAAK,KAAK;CAC9B,MAAM,SAAS,MAAM,KAAK,MAAM;CAEhC,OACE,qBAAC,KAAD;EAAG,aAAW,KAAK;EAAnB,UAAA,CACG,KAAK,UAAU,YACd,oBAAC,WAAD;GACE,QAAQ;IACN,GAAG,MAAM,IAAI,QAAQ,CAAC,EAAE,GAAG;IAC3B,GAAG,MAAM,IAAI,KAAK,EAAE,GAAG,MAAM,IAAI,SAAS,CAAC;IAC3C,GAAG,MAAM,IAAI,QAAQ,CAAC,EAAE,GAAG,MAAM,IAAI,MAAM;IAC3C,GAAG,EAAE,GAAG,MAAM,IAAI,SAAS,CAAC;GAC9B,CAAC,CAAC,KAAK,GAAG;GACV,MAAK;GACL,QAAO;GACP,aAAa;EACd,CAAA,IACC,KAAK,UAAU,WACjB,oBAAC,WAAD;GACE,IAAI,MAAM,IAAI,QAAQ,CAAC;GACvB,IAAI,MAAM,IAAI,SAAS,CAAC;GACxB,IAAI,MAAM,QAAQ,CAAC;GACnB,IAAI,MAAM,SAAS,CAAC;GACpB,MAAK;GACL,QAAO;GACP,aAAa;EACd,CAAA,IAED,oBAAC,QAAD;GACK;GACA;GACI;GACC;GAGR,IAAI,KAAK,UAAU,YAAY,MAAM,SAAS,CAAC,IAAI;GACnD,IAAI,KAAK,UAAU,YAAY,MAAM,SAAS,CAAC,IAAI;GACnD,MAAK;GACL,QAAO;GACP,aAAa;EACd,CAAA,GAEH,oBAAC,uBAAD;GACE,OAAO,KAAK;GACZ,SAAS,IAAI,QAAQ;GACrB,SAAS,IAAI,SAAS;GACtB,UAAU,MAAM;GAChB,MAAK;EACN,CAAA,CACA;;AAEP"}
1
+ {"version":3,"file":"FlowchartDiagramNode.js","names":[],"sources":["../../../../src/components/markdown-view/diagram/FlowchartDiagramNode.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport { DiagramLabel, round } from \"./DiagramLabel.tsx\";\nimport type { PositionedNode } from \"./layoutFlowchart.ts\";\n\nexport interface FlowchartDiagramNodeProps {\n node: PositionedNode;\n fontSize: number;\n}\n\n/**\n * One box and its label.\n *\n * The four shapes are drawn with four primitives rather than one `path`\n * each, so the SVG stays readable and a rounded rect is literally a rect\n * with an `rx`. Colours are CSS variables throughout: an element with no\n * class at all survives being extracted, and dark mode needs no second\n * palette.\n */\nexport const FlowchartDiagramNode = (props: FlowchartDiagramNodeProps) => {\n const node = props.node;\n const x = round(node.x);\n const y = round(node.y);\n const width = round(node.width);\n const height = round(node.height);\n\n return (\n <g data-node={node.id}>\n {node.shape === \"diamond\" ? (\n <polygon\n points={[\n `${round(x + width / 2)},${y}`,\n `${round(x + width)},${round(y + height / 2)}`,\n `${round(x + width / 2)},${round(y + height)}`,\n `${x},${round(y + height / 2)}`,\n ].join(\" \")}\n fill=\"var(--card)\"\n stroke=\"var(--border)\"\n strokeWidth={1.25}\n />\n ) : node.shape === \"circle\" ? (\n <ellipse\n cx={round(x + width / 2)}\n cy={round(y + height / 2)}\n rx={round(width / 2)}\n ry={round(height / 2)}\n fill=\"var(--card)\"\n stroke=\"var(--border)\"\n strokeWidth={1.25}\n />\n ) : (\n <rect\n x={x}\n y={y}\n width={width}\n height={height}\n // A \"rounded\" node is a stadium in mermaid, so the radius is half\n // the height rather than a fixed corner.\n rx={node.shape === \"rounded\" ? round(height / 2) : 5}\n ry={node.shape === \"rounded\" ? round(height / 2) : 5}\n fill=\"var(--card)\"\n stroke=\"var(--border)\"\n strokeWidth={1.25}\n />\n )}\n <DiagramLabel\n lines={node.lines}\n centerX={x + width / 2}\n centerY={y + height / 2}\n fontSize={props.fontSize}\n fill=\"var(--card-foreground)\"\n />\n </g>\n );\n};\n"],"mappings":";;;;;;;;;;;;;AAqBA,MAAa,wBAAwB,UAAqC;CACxE,MAAM,OAAO,MAAM;CACnB,MAAM,IAAI,MAAM,KAAK,CAAC;CACtB,MAAM,IAAI,MAAM,KAAK,CAAC;CACtB,MAAM,QAAQ,MAAM,KAAK,KAAK;CAC9B,MAAM,SAAS,MAAM,KAAK,MAAM;CAEhC,OACE,qBAAC,KAAD;EAAG,aAAW,KAAK;EAAnB,UAAA,CACG,KAAK,UAAU,YACd,oBAAC,WAAD;GACE,QAAQ;IACN,GAAG,MAAM,IAAI,QAAQ,CAAC,EAAE,GAAG;IAC3B,GAAG,MAAM,IAAI,KAAK,EAAE,GAAG,MAAM,IAAI,SAAS,CAAC;IAC3C,GAAG,MAAM,IAAI,QAAQ,CAAC,EAAE,GAAG,MAAM,IAAI,MAAM;IAC3C,GAAG,EAAE,GAAG,MAAM,IAAI,SAAS,CAAC;GAC9B,CAAC,CAAC,KAAK,GAAG;GACV,MAAK;GACL,QAAO;GACP,aAAa;EACd,CAAA,IACC,KAAK,UAAU,WACjB,oBAAC,WAAD;GACE,IAAI,MAAM,IAAI,QAAQ,CAAC;GACvB,IAAI,MAAM,IAAI,SAAS,CAAC;GACxB,IAAI,MAAM,QAAQ,CAAC;GACnB,IAAI,MAAM,SAAS,CAAC;GACpB,MAAK;GACL,QAAO;GACP,aAAa;EACd,CAAA,IAED,oBAAC,QAAD;GACK;GACA;GACI;GACC;GAGR,IAAI,KAAK,UAAU,YAAY,MAAM,SAAS,CAAC,IAAI;GACnD,IAAI,KAAK,UAAU,YAAY,MAAM,SAAS,CAAC,IAAI;GACnD,MAAK;GACL,QAAO;GACP,aAAa;EACd,CAAA,GAEH,oBAAC,cAAD;GACE,OAAO,KAAK;GACZ,SAAS,IAAI,QAAQ;GACrB,SAAS,IAAI,SAAS;GACtB,UAAU,MAAM;GAChB,MAAK;EACN,CAAA,CACA;;AAEP"}
@@ -6,24 +6,33 @@ export interface MermaidFenceProps {
6
6
  */
7
7
  source: string;
8
8
  /**
9
- * What to render when the source is not a flowchart we can draw. Always
10
- * the code block the fence would otherwise have produced.
9
+ * What to render when the source is not a diagram we can draw. Always the
10
+ * code block the fence would otherwise have produced.
11
11
  */
12
12
  fallback: ReactNode;
13
13
  }
14
14
  /**
15
- * The lazy chunk's entry point: parse, lay out, draw - or hand back the
16
- * fence untouched.
15
+ * The lazy chunk's entry point, and the dispatcher between the two
16
+ * pipelines: read the header, parse, lay out, draw - or hand back the fence
17
+ * untouched.
17
18
  *
18
- * This is the ONLY module that pulls in the parser, `graphre` and the
19
+ * This is the ONLY module that pulls in either parser, `graphre` and either
19
20
  * emitter, and it is imported through `lazy()` from `markdown-view.tsx`.
20
- * That is the epic's whole constraint: a document with no diagram must pay
21
- * nothing at all.
21
+ * That is the whole constraint the diagram layer lives under: a document
22
+ * with no diagram must pay nothing at all.
22
23
  *
23
- * **Failure is always the code block, silently.** Agents write invalid
24
- * mermaid, and a red error box in the middle of a folio is worse than a grey
25
- * fence. A parse failure, a graph past the cap, and a `sequenceDiagram` all
26
- * land here identically.
24
+ * **The two pipelines are parallel, not shared.** A flowchart ranks a node
25
+ * graph and needs a layout library; a sequence diagram has both axes
26
+ * decided by source order and needs none. Lifelines, ordered messages and
27
+ * fragment boxes have essentially nothing in common with nodes, edges and
28
+ * clusters, so one model type for both would make both halves worse. What
29
+ * they do share is the text metrics, the theming, the marker namespacing,
30
+ * the error boundary and the policy below.
31
+ *
32
+ * **Failure is always the code block, silently.** A parse failure, a
33
+ * refused construct, a diagram past its cap, and a `classDiagram` all land
34
+ * here identically. Agents write invalid mermaid, and a red error box in
35
+ * the middle of a folio is worse than a grey fence.
27
36
  */
28
37
  export declare const MermaidFence: (props: MermaidFenceProps) => React.JSX.Element;
29
38
  export default MermaidFence;
@@ -1 +1 @@
1
- {"version":3,"file":"MermaidFence.d.ts","sourceRoot":"","sources":["../../../../src/components/markdown-view/diagram/MermaidFence.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvC,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,YAAY,UAAW,iBAAiB,sBAKpD,CAAC;eAIa,YAAY"}
1
+ {"version":3,"file":"MermaidFence.d.ts","sourceRoot":"","sources":["../../../../src/components/markdown-view/diagram/MermaidFence.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AASvC,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,YAAY,UAAW,iBAAiB,sBAoBpD,CAAC;eA2Ba,YAAY"}