mermaid 13.0.0-alpha.1 → 13.0.0-alpha.3

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 (329) hide show
  1. package/README.md +1 -1
  2. package/THIRD_PARTY_NOTICES +320 -0
  3. package/dist/api.d.ts +6 -0
  4. package/dist/api.js +58 -54
  5. package/dist/chunks/chunk-2G45NV5W.mjs +2 -0
  6. package/dist/chunks/chunk-2G45NV5W.mjs.map +1 -0
  7. package/dist/chunks/chunk-2MDKOWUQ.mjs +11 -0
  8. package/dist/chunks/chunk-2MDKOWUQ.mjs.map +1 -0
  9. package/dist/chunks/chunk-33QZBPQK.mjs +2 -0
  10. package/dist/chunks/chunk-33QZBPQK.mjs.map +1 -0
  11. package/dist/chunks/chunk-4DR73ZXX.mjs +6 -0
  12. package/dist/chunks/chunk-4DR73ZXX.mjs.map +1 -0
  13. package/dist/chunks/{chunk-MCN35FLZ.mjs → chunk-4XJZCOJ5.mjs} +3 -3
  14. package/dist/chunks/chunk-53XKVPPJ.mjs +2 -0
  15. package/dist/chunks/chunk-53XKVPPJ.mjs.map +1 -0
  16. package/dist/chunks/chunk-55IU7BZR.mjs +2 -0
  17. package/dist/chunks/chunk-55IU7BZR.mjs.map +1 -0
  18. package/dist/chunks/{chunk-H2OXJVDR.mjs → chunk-66W4K2AQ.mjs} +2 -2
  19. package/dist/chunks/chunk-7M5U2MEN.mjs +6 -0
  20. package/dist/chunks/chunk-7M5U2MEN.mjs.map +1 -0
  21. package/dist/chunks/chunk-7PKX7UKH.mjs +2 -0
  22. package/dist/chunks/chunk-7PKX7UKH.mjs.map +1 -0
  23. package/dist/chunks/chunk-7ZMEJOJJ.mjs +7 -0
  24. package/dist/chunks/chunk-7ZMEJOJJ.mjs.map +1 -0
  25. package/dist/chunks/chunk-AVHUPARR.mjs +3 -0
  26. package/dist/chunks/chunk-AVHUPARR.mjs.map +1 -0
  27. package/dist/chunks/chunk-AWBQHRRG.mjs +2 -0
  28. package/dist/chunks/chunk-AWBQHRRG.mjs.map +1 -0
  29. package/dist/chunks/chunk-B3YRDLFF.mjs +2 -0
  30. package/dist/chunks/chunk-B3YRDLFF.mjs.map +1 -0
  31. package/dist/chunks/chunk-BNYOSPTM.mjs +7 -0
  32. package/dist/chunks/chunk-BNYOSPTM.mjs.map +1 -0
  33. package/dist/chunks/chunk-CR7BS4ZT.mjs +2 -0
  34. package/dist/chunks/chunk-CR7BS4ZT.mjs.map +1 -0
  35. package/dist/chunks/chunk-D57VZ7SP.mjs +8 -0
  36. package/dist/chunks/chunk-D57VZ7SP.mjs.map +1 -0
  37. package/dist/chunks/chunk-DAWKCFB3.mjs +3 -0
  38. package/dist/chunks/chunk-DAWKCFB3.mjs.map +1 -0
  39. package/dist/chunks/{chunk-3RTA5CBW.mjs → chunk-DXRKQGX5.mjs} +2 -2
  40. package/dist/chunks/{chunk-VXHU4YGB.mjs → chunk-E6QAXEJ5.mjs} +2 -2
  41. package/dist/chunks/chunk-ECJELNAF.mjs +12 -0
  42. package/dist/chunks/chunk-ECJELNAF.mjs.map +1 -0
  43. package/dist/chunks/chunk-F4JMGHZK.mjs +2 -0
  44. package/dist/chunks/chunk-F4JMGHZK.mjs.map +1 -0
  45. package/dist/chunks/chunk-FSPKR3UC.mjs +6 -0
  46. package/dist/chunks/chunk-FSPKR3UC.mjs.map +1 -0
  47. package/dist/chunks/chunk-GAH5QBYB.mjs +6 -0
  48. package/dist/chunks/chunk-GAH5QBYB.mjs.map +1 -0
  49. package/dist/chunks/{chunk-UYRMWGUL.mjs → chunk-GBVNGTXG.mjs} +2 -2
  50. package/dist/chunks/{chunk-UYRMWGUL.mjs.map → chunk-GBVNGTXG.mjs.map} +1 -1
  51. package/dist/chunks/{chunk-TEM3V5TI.mjs → chunk-HVBYWS5S.mjs} +7 -7
  52. package/dist/chunks/chunk-HVBYWS5S.mjs.map +1 -0
  53. package/dist/chunks/chunk-I22UEOUC.mjs +9 -0
  54. package/dist/chunks/chunk-I22UEOUC.mjs.map +1 -0
  55. package/dist/chunks/chunk-IJ5P4GFV.mjs +2 -0
  56. package/dist/chunks/chunk-IJ5P4GFV.mjs.map +1 -0
  57. package/dist/chunks/chunk-IPLCT667.mjs +2 -0
  58. package/dist/chunks/chunk-IPLCT667.mjs.map +1 -0
  59. package/dist/chunks/{chunk-UVUAPY3L.mjs → chunk-IXOM253I.mjs} +2 -2
  60. package/dist/chunks/chunk-J6NFIU3A.mjs +5 -0
  61. package/dist/chunks/chunk-J6NFIU3A.mjs.map +1 -0
  62. package/dist/chunks/chunk-JDIMSSA6.mjs +6 -0
  63. package/dist/chunks/chunk-JDIMSSA6.mjs.map +1 -0
  64. package/dist/chunks/chunk-JDOD4XCT.mjs +2 -0
  65. package/dist/chunks/chunk-JDOD4XCT.mjs.map +1 -0
  66. package/dist/chunks/{chunk-D2SPINQ5.mjs → chunk-JYMLZQ2B.mjs} +2 -2
  67. package/dist/chunks/chunk-KJT4SRSJ.mjs +25 -0
  68. package/dist/chunks/chunk-KJT4SRSJ.mjs.map +1 -0
  69. package/dist/chunks/chunk-KX2OAC2D.mjs +5 -0
  70. package/dist/chunks/chunk-KX2OAC2D.mjs.map +1 -0
  71. package/dist/chunks/chunk-LKH6V7B5.mjs +2 -0
  72. package/dist/chunks/chunk-LKH6V7B5.mjs.map +1 -0
  73. package/dist/chunks/chunk-LQYFD6JY.mjs +10 -0
  74. package/dist/chunks/chunk-LQYFD6JY.mjs.map +1 -0
  75. package/dist/chunks/chunk-LXCHQLNA.mjs +2 -0
  76. package/dist/chunks/chunk-LXCHQLNA.mjs.map +1 -0
  77. package/dist/chunks/chunk-MBJJBXJZ.mjs +16 -0
  78. package/dist/chunks/chunk-MBJJBXJZ.mjs.map +1 -0
  79. package/dist/chunks/{chunk-S567NRAG.mjs → chunk-ODVGAOCZ.mjs} +2 -2
  80. package/dist/chunks/{chunk-S567NRAG.mjs.map → chunk-ODVGAOCZ.mjs.map} +1 -1
  81. package/dist/chunks/chunk-OKDL7PKZ.mjs +7 -0
  82. package/dist/chunks/chunk-OKDL7PKZ.mjs.map +1 -0
  83. package/dist/chunks/chunk-PVRCMZP4.mjs +6 -0
  84. package/dist/chunks/chunk-PVRCMZP4.mjs.map +1 -0
  85. package/dist/chunks/chunk-Q7W6MMRR.mjs +5 -0
  86. package/dist/chunks/chunk-Q7W6MMRR.mjs.map +1 -0
  87. package/dist/chunks/chunk-QYJEIDIR.mjs +6 -0
  88. package/dist/chunks/chunk-QYJEIDIR.mjs.map +1 -0
  89. package/dist/chunks/{chunk-VF2HPT64.mjs → chunk-SE5N425R.mjs} +2 -2
  90. package/dist/chunks/chunk-SYA7GVFH.mjs +7 -0
  91. package/dist/chunks/chunk-SYA7GVFH.mjs.map +1 -0
  92. package/dist/chunks/chunk-UN4MBN2V.mjs +5 -0
  93. package/dist/chunks/chunk-UN4MBN2V.mjs.map +1 -0
  94. package/dist/chunks/{chunk-DBYKR6N5.mjs → chunk-UWZJI5W3.mjs} +2 -2
  95. package/dist/chunks/chunk-V4K3YOUF.mjs +11 -0
  96. package/dist/chunks/chunk-V4K3YOUF.mjs.map +1 -0
  97. package/dist/chunks/chunk-VXHJOKOD.mjs +2 -0
  98. package/dist/chunks/chunk-VXHJOKOD.mjs.map +1 -0
  99. package/dist/chunks/chunk-X5LC6Z6E.mjs +6 -0
  100. package/dist/chunks/chunk-X5LC6Z6E.mjs.map +1 -0
  101. package/dist/chunks/chunk-YKQIHLV5.mjs +2 -0
  102. package/dist/chunks/chunk-YKQIHLV5.mjs.map +1 -0
  103. package/dist/chunks/chunk-YQGIJV4G.mjs +2 -0
  104. package/dist/chunks/chunk-YQGIJV4G.mjs.map +1 -0
  105. package/dist/chunks/chunk-ZOQOZJZV.mjs +2 -0
  106. package/dist/chunks/chunk-ZOQOZJZV.mjs.map +1 -0
  107. package/dist/chunks/chunk-ZPEZXPWQ.mjs +6 -0
  108. package/dist/chunks/chunk-ZPEZXPWQ.mjs.map +1 -0
  109. package/dist/chunks/core-layout-compass-index.mjs +2 -0
  110. package/dist/chunks/core-layout-compass-index.mjs.map +1 -0
  111. package/dist/chunks/core-layout-hops-index.mjs +2 -0
  112. package/dist/chunks/core-layout-hops-index.mjs.map +1 -0
  113. package/dist/chunks/core-layout-swimlane-index.mjs +2 -0
  114. package/dist/chunks/core-layout-swimlane-index.mjs.map +1 -0
  115. package/dist/chunks/core-layout-tree-index.mjs +2 -0
  116. package/dist/chunks/core-layout-tree-index.mjs.map +1 -0
  117. package/dist/chunks/core-theme-specs-base.mjs +1 -1
  118. package/dist/chunks/core-theme-specs-base.mjs.map +1 -1
  119. package/dist/chunks/core-theme-specs-dark.mjs +1 -1
  120. package/dist/chunks/core-theme-specs-dark.mjs.map +1 -1
  121. package/dist/chunks/core-theme-specs-default.mjs +1 -1
  122. package/dist/chunks/core-theme-specs-default.mjs.map +1 -1
  123. package/dist/chunks/core-theme-specs-forest.mjs +1 -1
  124. package/dist/chunks/core-theme-specs-forest.mjs.map +1 -1
  125. package/dist/chunks/core-theme-specs-neo-dark.mjs +1 -1
  126. package/dist/chunks/core-theme-specs-neo-dark.mjs.map +1 -1
  127. package/dist/chunks/core-theme-specs-neo.mjs +1 -1
  128. package/dist/chunks/core-theme-specs-neo.mjs.map +1 -1
  129. package/dist/chunks/core-theme-specs-neutral.mjs +1 -1
  130. package/dist/chunks/core-theme-specs-neutral.mjs.map +1 -1
  131. package/dist/chunks/core-theme-specs-redux-dark-color.mjs +1 -1
  132. package/dist/chunks/core-theme-specs-redux-dark-color.mjs.map +1 -1
  133. package/dist/chunks/core-theme-specs-redux-dark.mjs +1 -1
  134. package/dist/chunks/core-theme-specs-redux-dark.mjs.map +1 -1
  135. package/dist/chunks/diagram-agentflow-ascii.mjs +5 -0
  136. package/dist/chunks/diagram-agentflow-ascii.mjs.map +1 -0
  137. package/dist/chunks/diagram-agentflow-language.mjs +32 -0
  138. package/dist/chunks/diagram-agentflow-language.mjs.map +1 -0
  139. package/dist/chunks/diagram-agentflow.mjs +2 -0
  140. package/dist/chunks/diagram-agentflow.mjs.map +1 -0
  141. package/dist/chunks/diagram-architecture-language.mjs +23 -0
  142. package/dist/chunks/diagram-architecture-language.mjs.map +1 -0
  143. package/dist/chunks/diagram-architecture.mjs +2 -0
  144. package/dist/chunks/diagram-architecture.mjs.map +1 -0
  145. package/dist/chunks/diagram-block-ascii.mjs +4 -0
  146. package/dist/chunks/diagram-block-ascii.mjs.map +1 -0
  147. package/dist/chunks/diagram-block-language.mjs +14 -0
  148. package/dist/chunks/diagram-block-language.mjs.map +1 -0
  149. package/dist/chunks/diagram-block.mjs +2 -0
  150. package/dist/chunks/diagram-block.mjs.map +1 -0
  151. package/dist/chunks/diagram-c4-ascii.mjs +4 -0
  152. package/dist/chunks/diagram-c4-ascii.mjs.map +1 -0
  153. package/dist/chunks/diagram-c4-language.mjs +20 -0
  154. package/dist/chunks/diagram-c4-language.mjs.map +1 -0
  155. package/dist/chunks/diagram-c4.mjs +2 -0
  156. package/dist/chunks/diagram-c4.mjs.map +1 -0
  157. package/dist/chunks/diagram-class-language.mjs +9 -9
  158. package/dist/chunks/diagram-class-language.mjs.map +1 -1
  159. package/dist/chunks/diagram-class.mjs +1 -1
  160. package/dist/chunks/diagram-class.mjs.map +1 -1
  161. package/dist/chunks/diagram-cynefin-language.mjs +6 -0
  162. package/dist/chunks/diagram-cynefin-language.mjs.map +1 -0
  163. package/dist/chunks/diagram-cynefin.mjs +2 -0
  164. package/dist/chunks/diagram-cynefin.mjs.map +1 -0
  165. package/dist/chunks/diagram-er-ascii.mjs +3 -3
  166. package/dist/chunks/diagram-er-ascii.mjs.map +1 -1
  167. package/dist/chunks/diagram-er-language.mjs +1 -1
  168. package/dist/chunks/diagram-er-language.mjs.map +1 -1
  169. package/dist/chunks/diagram-er.mjs +1 -1
  170. package/dist/chunks/diagram-er.mjs.map +1 -1
  171. package/dist/chunks/diagram-eventmodeling-language.mjs +21 -0
  172. package/dist/chunks/diagram-eventmodeling-language.mjs.map +1 -0
  173. package/dist/chunks/diagram-eventmodeling.mjs +3 -0
  174. package/dist/chunks/diagram-eventmodeling.mjs.map +1 -0
  175. package/dist/chunks/diagram-flowchart-ascii.mjs +3 -3
  176. package/dist/chunks/diagram-flowchart-ascii.mjs.map +1 -1
  177. package/dist/chunks/diagram-flowchart-lanes.mjs +2 -0
  178. package/dist/chunks/diagram-flowchart-lanes.mjs.map +1 -0
  179. package/dist/chunks/diagram-flowchart-language.mjs +1 -1
  180. package/dist/chunks/diagram-flowchart-language.mjs.map +1 -1
  181. package/dist/chunks/diagram-flowchart.mjs +1 -1
  182. package/dist/chunks/diagram-flowchart.mjs.map +1 -1
  183. package/dist/chunks/diagram-gantt-language.mjs +12 -0
  184. package/dist/chunks/diagram-gantt-language.mjs.map +1 -0
  185. package/dist/chunks/diagram-gantt.mjs +2 -0
  186. package/dist/chunks/diagram-gantt.mjs.map +1 -0
  187. package/dist/chunks/diagram-gitgraph-language.mjs +22 -0
  188. package/dist/chunks/diagram-gitgraph-language.mjs.map +1 -0
  189. package/dist/chunks/diagram-gitgraph.mjs +3 -0
  190. package/dist/chunks/diagram-gitgraph.mjs.map +1 -0
  191. package/dist/chunks/diagram-info-ascii.mjs +2 -0
  192. package/dist/chunks/diagram-info-ascii.mjs.map +1 -0
  193. package/dist/chunks/diagram-info-language.mjs +4 -0
  194. package/dist/chunks/diagram-info-language.mjs.map +1 -0
  195. package/dist/chunks/diagram-info.mjs +2 -0
  196. package/dist/chunks/diagram-info.mjs.map +1 -0
  197. package/dist/chunks/diagram-ishikawa-ascii.mjs +4 -0
  198. package/dist/chunks/diagram-ishikawa-ascii.mjs.map +1 -0
  199. package/dist/chunks/diagram-ishikawa-language.mjs +13 -0
  200. package/dist/chunks/diagram-ishikawa-language.mjs.map +1 -0
  201. package/dist/chunks/diagram-ishikawa.mjs +2 -0
  202. package/dist/chunks/diagram-ishikawa.mjs.map +1 -0
  203. package/dist/chunks/diagram-journey-language.mjs +6 -6
  204. package/dist/chunks/diagram-journey-language.mjs.map +1 -1
  205. package/dist/chunks/diagram-journey.mjs +1 -1
  206. package/dist/chunks/diagram-journey.mjs.map +1 -1
  207. package/dist/chunks/diagram-kanban-ascii.mjs +4 -0
  208. package/dist/chunks/diagram-kanban-ascii.mjs.map +1 -0
  209. package/dist/chunks/diagram-kanban-language.mjs +20 -0
  210. package/dist/chunks/diagram-kanban-language.mjs.map +1 -0
  211. package/dist/chunks/diagram-kanban.mjs +2 -0
  212. package/dist/chunks/diagram-kanban.mjs.map +1 -0
  213. package/dist/chunks/diagram-mindmap-language.mjs +20 -0
  214. package/dist/chunks/diagram-mindmap-language.mjs.map +1 -0
  215. package/dist/chunks/diagram-mindmap.mjs +2 -0
  216. package/dist/chunks/diagram-mindmap.mjs.map +1 -0
  217. package/dist/chunks/diagram-packet-ascii.mjs +6 -0
  218. package/dist/chunks/diagram-packet-ascii.mjs.map +1 -0
  219. package/dist/chunks/diagram-packet-language.mjs +9 -0
  220. package/dist/chunks/diagram-packet-language.mjs.map +1 -0
  221. package/dist/chunks/diagram-packet.mjs +2 -0
  222. package/dist/chunks/diagram-packet.mjs.map +1 -0
  223. package/dist/chunks/diagram-pie-language.mjs +4 -4
  224. package/dist/chunks/diagram-pie-language.mjs.map +1 -1
  225. package/dist/chunks/diagram-pie.mjs +1 -1
  226. package/dist/chunks/diagram-pie.mjs.map +1 -1
  227. package/dist/chunks/diagram-quadrant-language.mjs +5 -5
  228. package/dist/chunks/diagram-quadrant-language.mjs.map +1 -1
  229. package/dist/chunks/diagram-quadrant.mjs +1 -1
  230. package/dist/chunks/diagram-quadrant.mjs.map +1 -1
  231. package/dist/chunks/diagram-radar-language.mjs +15 -0
  232. package/dist/chunks/diagram-radar-language.mjs.map +1 -0
  233. package/dist/chunks/diagram-radar.mjs +2 -0
  234. package/dist/chunks/diagram-radar.mjs.map +1 -0
  235. package/dist/chunks/diagram-railroad-ascii.mjs +2 -0
  236. package/dist/chunks/diagram-railroad-ascii.mjs.map +1 -0
  237. package/dist/chunks/diagram-railroad-language.mjs +18 -0
  238. package/dist/chunks/diagram-railroad-language.mjs.map +1 -0
  239. package/dist/chunks/diagram-railroad.mjs +2 -0
  240. package/dist/chunks/diagram-railroad.mjs.map +1 -0
  241. package/dist/chunks/diagram-requirement-ascii.mjs +5 -0
  242. package/dist/chunks/diagram-requirement-ascii.mjs.map +1 -0
  243. package/dist/chunks/diagram-requirement-language.mjs +25 -0
  244. package/dist/chunks/diagram-requirement-language.mjs.map +1 -0
  245. package/dist/chunks/diagram-requirement.mjs +2 -0
  246. package/dist/chunks/diagram-requirement.mjs.map +1 -0
  247. package/dist/chunks/diagram-sankey-language.mjs +14 -0
  248. package/dist/chunks/diagram-sankey-language.mjs.map +1 -0
  249. package/dist/chunks/diagram-sankey.mjs +2 -0
  250. package/dist/chunks/diagram-sankey.mjs.map +1 -0
  251. package/dist/chunks/diagram-sequence-ascii.mjs +3 -3
  252. package/dist/chunks/diagram-sequence-ascii.mjs.map +1 -1
  253. package/dist/chunks/diagram-sequence-language.mjs +1 -1
  254. package/dist/chunks/diagram-sequence-language.mjs.map +1 -1
  255. package/dist/chunks/diagram-sequence.mjs +1 -1
  256. package/dist/chunks/diagram-sequence.mjs.map +1 -1
  257. package/dist/chunks/diagram-state-language.mjs +1 -1
  258. package/dist/chunks/diagram-state-language.mjs.map +1 -1
  259. package/dist/chunks/diagram-state.mjs +3 -3
  260. package/dist/chunks/diagram-state.mjs.map +1 -1
  261. package/dist/chunks/diagram-timeline-language.mjs +1 -1
  262. package/dist/chunks/diagram-timeline-language.mjs.map +1 -1
  263. package/dist/chunks/diagram-timeline.mjs +1 -1
  264. package/dist/chunks/diagram-timeline.mjs.map +1 -1
  265. package/dist/chunks/diagram-treemap-language.mjs +23 -0
  266. package/dist/chunks/diagram-treemap-language.mjs.map +1 -0
  267. package/dist/chunks/diagram-treemap.mjs +2 -0
  268. package/dist/chunks/diagram-treemap.mjs.map +1 -0
  269. package/dist/chunks/diagram-treeview-ascii.mjs +4 -0
  270. package/dist/chunks/diagram-treeview-ascii.mjs.map +1 -0
  271. package/dist/chunks/diagram-treeview-language.mjs +10 -0
  272. package/dist/chunks/diagram-treeview-language.mjs.map +1 -0
  273. package/dist/chunks/diagram-treeview.mjs +2 -0
  274. package/dist/chunks/diagram-treeview.mjs.map +1 -0
  275. package/dist/chunks/diagram-usecase-ascii.mjs +5 -0
  276. package/dist/chunks/diagram-usecase-ascii.mjs.map +1 -0
  277. package/dist/chunks/diagram-usecase-language.mjs +17 -0
  278. package/dist/chunks/diagram-usecase-language.mjs.map +1 -0
  279. package/dist/chunks/diagram-usecase.mjs +3 -0
  280. package/dist/chunks/diagram-usecase.mjs.map +1 -0
  281. package/dist/chunks/diagram-venn-language.mjs +10 -0
  282. package/dist/chunks/diagram-venn-language.mjs.map +1 -0
  283. package/dist/chunks/diagram-venn.mjs +2 -0
  284. package/dist/chunks/diagram-venn.mjs.map +1 -0
  285. package/dist/chunks/diagram-wardley-language.mjs +17 -0
  286. package/dist/chunks/diagram-wardley-language.mjs.map +1 -0
  287. package/dist/chunks/diagram-wardley.mjs +2 -0
  288. package/dist/chunks/diagram-wardley.mjs.map +1 -0
  289. package/dist/chunks/diagram-xychart-language.mjs +13 -0
  290. package/dist/chunks/diagram-xychart-language.mjs.map +1 -0
  291. package/dist/chunks/diagram-xychart.mjs +2 -0
  292. package/dist/chunks/diagram-xychart.mjs.map +1 -0
  293. package/dist/chunks/mermaid-ascii.mjs +1 -1
  294. package/dist/config-snapshot.d.ts +10 -3
  295. package/dist/config-snapshot.js +31 -13
  296. package/dist/errors.d.ts +8 -1
  297. package/dist/errors.js +20 -0
  298. package/dist/generated/detectors.gen.js +28 -28
  299. package/dist/generated/registry.gen.js +207 -27
  300. package/dist/mermaid.esm.min.mjs +3 -7
  301. package/dist/mermaid.esm.min.mjs.map +1 -1
  302. package/dist/registry.d.ts +53 -11
  303. package/dist/registry.js +103 -36
  304. package/dist/version.d.ts +1 -1
  305. package/dist/version.js +1 -1
  306. package/package.json +34 -11
  307. package/dist/chunks/chunk-2I3H3N3U.mjs +0 -2
  308. package/dist/chunks/chunk-2I3H3N3U.mjs.map +0 -1
  309. package/dist/chunks/chunk-4EAMXXRE.mjs +0 -2
  310. package/dist/chunks/chunk-4EAMXXRE.mjs.map +0 -1
  311. package/dist/chunks/chunk-EWT4247V.mjs +0 -2
  312. package/dist/chunks/chunk-EWT4247V.mjs.map +0 -1
  313. package/dist/chunks/chunk-JWRERZWU.mjs +0 -20
  314. package/dist/chunks/chunk-JWRERZWU.mjs.map +0 -1
  315. package/dist/chunks/chunk-KI6PG6XD.mjs +0 -2
  316. package/dist/chunks/chunk-KI6PG6XD.mjs.map +0 -1
  317. package/dist/chunks/chunk-TEM3V5TI.mjs.map +0 -1
  318. package/dist/chunks/chunk-WAQR5J2G.mjs +0 -3
  319. package/dist/chunks/chunk-WAQR5J2G.mjs.map +0 -1
  320. package/dist/chunks/chunk-WY5VJHG2.mjs +0 -6
  321. package/dist/chunks/chunk-WY5VJHG2.mjs.map +0 -1
  322. /package/dist/chunks/{chunk-MCN35FLZ.mjs.map → chunk-4XJZCOJ5.mjs.map} +0 -0
  323. /package/dist/chunks/{chunk-H2OXJVDR.mjs.map → chunk-66W4K2AQ.mjs.map} +0 -0
  324. /package/dist/chunks/{chunk-3RTA5CBW.mjs.map → chunk-DXRKQGX5.mjs.map} +0 -0
  325. /package/dist/chunks/{chunk-VXHU4YGB.mjs.map → chunk-E6QAXEJ5.mjs.map} +0 -0
  326. /package/dist/chunks/{chunk-UVUAPY3L.mjs.map → chunk-IXOM253I.mjs.map} +0 -0
  327. /package/dist/chunks/{chunk-D2SPINQ5.mjs.map → chunk-JYMLZQ2B.mjs.map} +0 -0
  328. /package/dist/chunks/{chunk-VF2HPT64.mjs.map → chunk-SE5N425R.mjs.map} +0 -0
  329. /package/dist/chunks/{chunk-DBYKR6N5.mjs.map → chunk-UWZJI5W3.mjs.map} +0 -0
package/README.md CHANGED
@@ -20,7 +20,7 @@ const { text } = await mermaid.render('id', 'flowchart LR\n A --> B', { format:
20
20
 
21
21
  Every first-party diagram type is included. Bundlers split each type into its own chunk, so a page downloads only the types it renders.
22
22
 
23
- The size budget is in [`size-budget.json`](./size-budget.json): core, everything the `mermaid` entry loads before any diagram chunk, is at most 92 KB gzip, and core plus flowchart, as loaded for one flowchart render, at most 128 KB gzip.
23
+ The size budget is in [`size-budget.json`](./size-budget.json): core, everything the `mermaid` entry loads before any diagram chunk, is at most 96 KB gzip, and core plus flowchart, as loaded for one flowchart render, at most 128 KB gzip.
24
24
 
25
25
  ## Pick your diagrams
26
26
 
@@ -31,3 +31,323 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
31
31
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
32
32
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
33
33
  SOFTWARE.
34
+
35
+ Pele, in @mermaid-js/diagram-agentflow
36
+ --------------------------------------
37
+
38
+ The CDN build also bundles @mermaid-js/diagram-agentflow without its legal comments. That
39
+ package's parser/lexer.ts, parser/parser.ts, parser/base.ts, parser/statements.ts,
40
+ parser/model.ts, layout/prepare.ts, layout/shapes.ts, render/shapes.ts and render/edges.ts are
41
+ local copies of @mermaid-js/diagram-flowchart's lexer, parser, builder, shapes and edges (D446,
42
+ D467), which are ported from, or based on, Pele (https://github.com/obsidianmd/pele) at commit
43
+ 3a2f075 (release 1.13.0). Pele is used under the MIT License:
44
+
45
+ MIT License
46
+
47
+ Copyright (c) 2026 kepano
48
+
49
+ Permission is hereby granted, free of charge, to any person obtaining a copy
50
+ of this software and associated documentation files (the "Software"), to deal
51
+ in the Software without restriction, including without limitation the rights
52
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
53
+ copies of the Software, and to permit persons to whom the Software is
54
+ furnished to do so, subject to the following conditions:
55
+
56
+ The above copyright notice and this permission notice shall be included in all
57
+ copies or substantial portions of the Software.
58
+
59
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
60
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
61
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
62
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
63
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
64
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
65
+ SOFTWARE.
66
+
67
+ Pele, in @mermaid-js/diagram-block
68
+ ----------------------------------
69
+
70
+ The CDN build also bundles @mermaid-js/diagram-block without its legal comments. That
71
+ package's shapes/leaf.ts, shapes/draw.ts and render/arrowheads.ts are local copies of
72
+ @mermaid-js/diagram-flowchart's shapes and arrowheads (D446), which are ported from, or based
73
+ on, Pele (https://github.com/obsidianmd/pele) at commit 3a2f075 (release 1.13.0). Pele is used
74
+ under the MIT License:
75
+
76
+ MIT License
77
+
78
+ Copyright (c) 2026 kepano
79
+
80
+ Permission is hereby granted, free of charge, to any person obtaining a copy
81
+ of this software and associated documentation files (the "Software"), to deal
82
+ in the Software without restriction, including without limitation the rights
83
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
84
+ copies of the Software, and to permit persons to whom the Software is
85
+ furnished to do so, subject to the following conditions:
86
+
87
+ The above copyright notice and this permission notice shall be included in all
88
+ copies or substantial portions of the Software.
89
+
90
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
91
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
92
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
93
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
94
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
95
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
96
+ SOFTWARE.
97
+
98
+ Pele, in @mermaid-js/diagram-c4
99
+ -------------------------------
100
+
101
+ The CDN build also bundles @mermaid-js/diagram-c4 without its legal comments. That package's
102
+ layout/grid.ts, layout/layout.ts, layout/metrics.ts, layout/path.ts, layout/route.ts and
103
+ layout/shapes.ts are ported from Pele's C4 grid, relation router and label placement, and its
104
+ render/shapes.ts is a local copy of @mermaid-js/diagram-flowchart's shapes (D446), all ported
105
+ from, or based on, Pele (https://github.com/obsidianmd/pele) at commit 3a2f075 (release
106
+ 1.13.0). Pele is used under the MIT License:
107
+
108
+ MIT License
109
+
110
+ Copyright (c) 2026 kepano
111
+
112
+ Permission is hereby granted, free of charge, to any person obtaining a copy
113
+ of this software and associated documentation files (the "Software"), to deal
114
+ in the Software without restriction, including without limitation the rights
115
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
116
+ copies of the Software, and to permit persons to whom the Software is
117
+ furnished to do so, subject to the following conditions:
118
+
119
+ The above copyright notice and this permission notice shall be included in all
120
+ copies or substantial portions of the Software.
121
+
122
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
123
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
124
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
125
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
126
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
127
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
128
+ SOFTWARE.
129
+
130
+ d3-sankey
131
+ ---------
132
+
133
+ The CDN build (dist/mermaid.min.js, dist/mermaid.esm.min.mjs and its chunks) bundles
134
+ @mermaid-js/diagram-sankey without its legal comments. That package's layout/d3-sankey.ts
135
+ re-implements, step for step, d3-sankey's `sankey` layout and its four node aligns
136
+ (https://github.com/d3/d3-sankey, release 0.12.3). d3-sankey is used under the
137
+ BSD 3-Clause License:
138
+
139
+ Copyright 2015, Mike Bostock
140
+ All rights reserved.
141
+
142
+ Redistribution and use in source and binary forms, with or without modification,
143
+ are permitted provided that the following conditions are met:
144
+
145
+ * Redistributions of source code must retain the above copyright notice, this
146
+ list of conditions and the following disclaimer.
147
+
148
+ * Redistributions in binary form must reproduce the above copyright notice,
149
+ this list of conditions and the following disclaimer in the documentation
150
+ and/or other materials provided with the distribution.
151
+
152
+ * Neither the name of the author nor the names of contributors may be used to
153
+ endorse or promote products derived from this software without specific prior
154
+ written permission.
155
+
156
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
157
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
158
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
159
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
160
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
161
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
162
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
163
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
164
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
165
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
166
+
167
+ d3-array
168
+ --------
169
+
170
+ The same bundled file copies d3-array's `sum`, `min` and `max` with their semantics
171
+ (https://github.com/d3/d3-array, release 2.12.1). d3-array is used under the
172
+ BSD 3-Clause License:
173
+
174
+ Copyright 2010-2020 Mike Bostock
175
+ All rights reserved.
176
+
177
+ Redistribution and use in source and binary forms, with or without modification,
178
+ are permitted provided that the following conditions are met:
179
+
180
+ * Redistributions of source code must retain the above copyright notice, this
181
+ list of conditions and the following disclaimer.
182
+
183
+ * Redistributions in binary form must reproduce the above copyright notice,
184
+ this list of conditions and the following disclaimer in the documentation
185
+ and/or other materials provided with the distribution.
186
+
187
+ * Neither the name of the author nor the names of contributors may be used to
188
+ endorse or promote products derived from this software without specific prior
189
+ written permission.
190
+
191
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
192
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
193
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
194
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
195
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
196
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
197
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
198
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
199
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
200
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
201
+
202
+ d3-shape
203
+ --------
204
+
205
+ The bundled @mermaid-js/diagram-sankey's layout/layout.ts re-implements d3-shape's
206
+ `linkHorizontal` (https://github.com/d3/d3-shape, release 1.3.7). d3-shape is used under the
207
+ BSD 3-Clause License:
208
+
209
+ Copyright 2010-2015 Mike Bostock
210
+ All rights reserved.
211
+
212
+ Redistribution and use in source and binary forms, with or without modification,
213
+ are permitted provided that the following conditions are met:
214
+
215
+ * Redistributions of source code must retain the above copyright notice, this
216
+ list of conditions and the following disclaimer.
217
+
218
+ * Redistributions in binary form must reproduce the above copyright notice,
219
+ this list of conditions and the following disclaimer in the documentation
220
+ and/or other materials provided with the distribution.
221
+
222
+ * Neither the name of the author nor the names of contributors may be used to
223
+ endorse or promote products derived from this software without specific prior
224
+ written permission.
225
+
226
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
227
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
228
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
229
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
230
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
231
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
232
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
233
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
234
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
235
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
236
+
237
+ d3-hierarchy
238
+ ------------
239
+
240
+ The CDN build also bundles @mermaid-js/diagram-treemap without its legal comments. That
241
+ package's layout/tiles.ts and sum.ts re-implement, step for step, d3-hierarchy's `hierarchy`,
242
+ `sum`, `sort` and `treemap` with `treemapSquarify`, `treemapDice`, `treemapSlice` and
243
+ `treemapRound` (https://github.com/d3/d3-hierarchy, release 3.1.2). d3-hierarchy is used under
244
+ the ISC License:
245
+
246
+ ISC License
247
+
248
+ Copyright 2010-2021 Mike Bostock
249
+
250
+ Permission to use, copy, modify, and/or distribute this software for any purpose
251
+ with or without fee is hereby granted, provided that the above copyright notice
252
+ and this permission notice appear in all copies.
253
+
254
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
255
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
256
+ FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
257
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
258
+ OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
259
+ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
260
+ THIS SOFTWARE.
261
+
262
+ d3-format
263
+ ---------
264
+
265
+ The same package's format/d3-format.ts re-implements d3-format's `format` in its default
266
+ locale (https://github.com/d3/d3-format, release 3.1.2). d3-format is used under the ISC
267
+ License:
268
+
269
+ ISC License
270
+
271
+ Copyright 2010-2026 Mike Bostock
272
+
273
+ Permission to use, copy, modify, and/or distribute this software for any purpose
274
+ with or without fee is hereby granted, provided that the above copyright notice
275
+ and this permission notice appear in all copies.
276
+
277
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
278
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
279
+ FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
280
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
281
+ OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
282
+ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
283
+ THIS SOFTWARE.
284
+
285
+ venn.js
286
+ -------
287
+
288
+ The CDN build also bundles @mermaid-js/diagram-venn without its legal comments. That
289
+ package's solver (solver/circles.ts, fmin.ts, index.ts, normalize.ts, regions.ts and solve.ts)
290
+ is ported from venn.js's area-proportional circle layout, circle intersection areas, solution
291
+ normalising and scaling, text centres and region paths (https://github.com/upsetjs/venn.js,
292
+ release 2.0.0). venn.js is used under the MIT License:
293
+
294
+ MIT License
295
+
296
+ Copyright (c) 2013 Ben Frederickson
297
+ Copyright (c) 2021 Samuel Gratzl
298
+
299
+ Permission is hereby granted, free of charge, to any person obtaining a copy
300
+ of this software and associated documentation files (the "Software"), to deal
301
+ in the Software without restriction, including without limitation the rights
302
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
303
+ copies of the Software, and to permit persons to whom the Software is
304
+ furnished to do so, subject to the following conditions:
305
+
306
+ The above copyright notice and this permission notice shall be included in all
307
+ copies or substantial portions of the Software.
308
+
309
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
310
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
311
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
312
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
313
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
314
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
315
+ SOFTWARE.
316
+
317
+ fmin
318
+ ----
319
+
320
+ The same package's solver/fmin.ts is ported from fmin's `bisect`, `nelderMead` and
321
+ `conjugateGradient` with its Wolfe line search, as venn.js 2.0.0 bundles them
322
+ (https://github.com/benfred/fmin, release 0.0.4). fmin is used under the
323
+ BSD 3-Clause License:
324
+
325
+ BSD 3-Clause License
326
+
327
+ Copyright 2016, Ben Frederickson
328
+ All rights reserved.
329
+
330
+ Redistribution and use in source and binary forms, with or without modification,
331
+ are permitted provided that the following conditions are met:
332
+
333
+ * Redistributions of source code must retain the above copyright notice, this
334
+ list of conditions and the following disclaimer.
335
+
336
+ * Redistributions in binary form must reproduce the above copyright notice,
337
+ this list of conditions and the following disclaimer in the documentation
338
+ and/or other materials provided with the distribution.
339
+
340
+ * Neither the name of the author nor the names of contributors may be used to
341
+ endorse or promote products derived from this software without specific prior
342
+ written permission.
343
+
344
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
345
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
346
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
347
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
348
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
349
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
350
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
351
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
352
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
353
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package/dist/api.d.ts CHANGED
@@ -35,6 +35,12 @@ export interface RenderOptions {
35
35
  * element's width. SVG only: text output fits `ascii.maxWidth` columns instead (D84).
36
36
  */
37
37
  availableWidth?: number;
38
+ /**
39
+ * The instant the diagram treats as now (D270): gantt's `today` line and `today`-relative
40
+ * dates. Defaults to `Date.now()` at each call (D275). Not a config key: diagram text
41
+ * cannot set it.
42
+ */
43
+ now?: number | Date;
38
44
  }
39
45
  /** Options of an SVG render (`format` absent or `svg`). */
40
46
  export interface SvgRenderOptions extends RenderOptions {
package/dist/api.js CHANGED
@@ -15,33 +15,13 @@ import { createTheme, DEFAULT_THEME, loadedTheme, loadTheme, resolveThemeName, }
15
15
  import { stageEnd, stageStart } from '@mermaid-js/core/timing';
16
16
  import { defaultIdPrefix, directiveConfig, isPlain, mergeInto, optionsKey, Overlays, SiteConfigs, snapshot, } from "./config-snapshot.js";
17
17
  import { createDomAdapter } from "./dom.js";
18
- import { toMermaidError } from "./errors.js";
18
+ import { toMermaidError, toWarning } from "./errors.js";
19
19
  import { iconPackRegistry, packsUnsupported } from "./icon-packs.js";
20
20
  import { selectMeasurer } from "./measurer.js";
21
- import { builtIn, isElkName, Registry, } from "./registry.js";
21
+ import { builtIn, isElkName, LINE_HOPS, Registry, layoutName, } from "./registry.js";
22
22
  import { DiscoveryQueue, registerSeam } from "./seam.js";
23
23
  import { VERSION } from "./version.js";
24
24
  export { defaultIdPrefix } from "./config-snapshot.js";
25
- const WARNING_KEYS = ['path', 'source', 'feature', 'shapes', 'astIds'];
26
- /**
27
- * A copy of a warning with only the `Warning` keys (text output adds `feature`, `shapes`, `astIds`).
28
- * `LOOK_REMOVED` names the hand-drawn package here, core never names one (D153, as D173), and
29
- * only while no registered fragment declares `handDrawn` (the plugin's, or any that takes it).
30
- */
31
- const toWarning = (w, fragments) => {
32
- const out = {
33
- code: w.code,
34
- message: w.code === 'LOOK_REMOVED' && !fragments.some((f) => 'handDrawn' in f.keys)
35
- ? `${w.message} For handDrawn, register @mermaid-js/plugin-hand-drawn.`
36
- : w.message,
37
- };
38
- for (const k of WARNING_KEYS) {
39
- const v = w[k];
40
- if (v !== undefined)
41
- out[k] = Array.isArray(v) ? [...v] : v;
42
- }
43
- return out;
44
- };
45
25
  /** `render`'s third argument: v12's container element, or an options object (D80). */
46
26
  function renderOptions(arg) {
47
27
  if (!isPlain(arg) || typeof arg.nodeType === 'number')
@@ -66,9 +46,6 @@ class AnalysisCache {
66
46
  this.entries.clear();
67
47
  }
68
48
  }
69
- function layoutName(config) {
70
- return String(config.layout ?? 'layered');
71
- }
72
49
  function themeNames(config) {
73
50
  const choice = resolveThemeName(config.theme);
74
51
  return choice.dark ? [choice.name, choice.dark] : [choice.name];
@@ -79,10 +56,18 @@ function missingFor(registry, a, text = false) {
79
56
  const { config } = a.prepared;
80
57
  // Text output lays out with core's own `layered`, never a registered engine (D179).
81
58
  if (a.plugin.layoutKind === 'graph' && !text) {
82
- const name = layoutName(config);
83
- if (registry.layout(name).state === 'missing')
84
- missing.push({ kind: 'layout', name });
85
- }
59
+ const name = layoutName(config, a.plugin);
60
+ const { need } = registry.layout(name, a.plugin.layoutEngine);
61
+ if (need !== undefined)
62
+ missing.push({ kind: 'layout', name: need });
63
+ const [part, loaded] = registry.layoutPart(a.plugin, name);
64
+ if (part && !loaded)
65
+ missing.push({ kind: 'layout', name: part });
66
+ }
67
+ // D537: the line-hop chunk when the shared key turns hops on. An engine whose own `lineHops`
68
+ // defaults on (`swimlane`, ELK) carries the step, so loading it loads them.
69
+ if (!text && !registry.hops && config.lineHops)
70
+ missing.push({ kind: 'layout', name: LINE_HOPS });
86
71
  // Text output draws no colours, so it needs no theme (D82).
87
72
  for (const name of text ? [] : themeNames(config)) {
88
73
  if (!loadedTheme(name))
@@ -103,14 +88,13 @@ async function loadResources(registry, missing) {
103
88
  }));
104
89
  }
105
90
  /** The theme a draw paints with: the config's choice, or the default when it is not loaded. */
106
- function themeFor(config, s, warn, rules, idPrefix) {
91
+ function themeFor(config, s, warn, tables, idPrefix) {
107
92
  const choice = resolveThemeName(config.theme, warn);
108
93
  const spec = loadedTheme(choice.name) ?? loadedTheme(DEFAULT_THEME);
109
- const dark = choice.dark ? loadedTheme(choice.dark) : undefined;
110
94
  return createTheme(spec, {
111
95
  themeVariables: config.themeVariables,
112
- dark,
113
- ...(rules ? { rules } : {}),
96
+ dark: choice.dark ? loadedTheme(choice.dark) : undefined,
97
+ ...tables,
114
98
  cssVariables: s.options.output?.cssVariables,
115
99
  warn,
116
100
  idPrefix,
@@ -146,7 +130,7 @@ export function createMermaid(firstParty, firstPartyNames) {
146
130
  // Text output never runs a layout's hooks: no registered engine lays it out (D179).
147
131
  if (text || analysis.plugin.layoutKind !== 'graph')
148
132
  return hooks;
149
- const own = registry.layoutExtension(layoutName(analysis.prepared.config));
133
+ const own = registry.layoutExtension(layoutName(analysis.prepared.config, analysis.plugin));
150
134
  if (!own)
151
135
  return hooks;
152
136
  let runner = layoutRunners.get(own);
@@ -177,8 +161,11 @@ export function createMermaid(firstParty, firstPartyNames) {
177
161
  const overlays = new Overlays();
178
162
  // `core/ascii`'s cell measurer and width, loaded by the first text `prepare` (D87).
179
163
  let textBackend;
164
+ // A type may read its own section on top of its plugin's (`swimlane` over `flowchart`,
165
+ // D534): both are given, highest first.
180
166
  function sectionOf(detected, plugin) {
181
- return plugin?.id ?? detected.id;
167
+ const own = plugin?.configSection ?? plugin?.id ?? detected.id;
168
+ return detected.section && detected.section !== own ? [detected.section, own] : own;
182
169
  }
183
170
  // Detect, resolve config and parse with a loaded plugin (DESIGN §3 steps 1–4).
184
171
  function analyse(text, snap, plugin, detected, pre) {
@@ -212,6 +199,7 @@ export function createMermaid(firstParty, firstPartyNames) {
212
199
  plugin,
213
200
  prepared: { diagramType: detected.type, config, parse, warnings },
214
201
  ...(title !== undefined ? { title } : {}),
202
+ sources: [hit.site.site, front, ...directives],
215
203
  };
216
204
  }
217
205
  function detect(text, s) {
@@ -343,6 +331,10 @@ export function createMermaid(firstParty, firstPartyNames) {
343
331
  function contextFor(text, s, options, analysis, { units, measurer, width, text: textOnly }) {
344
332
  const { prepared, plugin } = analysis;
345
333
  const { config } = prepared;
334
+ // A usage error, as a bad `limits` option is: `+now` of a bad Date or a string is NaN.
335
+ const now = +(options?.now ?? Date.now());
336
+ if (!Number.isFinite(now))
337
+ throw new TypeError(`RenderOptions.now is no instant: ${String(options?.now)}`);
346
338
  const textOutput = units.id === 'cell';
347
339
  const warnings = [...skipped, ...prepared.warnings];
348
340
  const warn = (w) => void warnings.push(toWarning(w, registry.fragments()));
@@ -364,10 +356,10 @@ export function createMermaid(firstParty, firstPartyNames) {
364
356
  }
365
357
  for (const w of packsUnsupported(iconPacks, hooks.claims()))
366
358
  warn(w);
367
- let engine;
359
+ let engine, part;
368
360
  let elkName;
369
361
  if (plugin.layoutKind === 'graph') {
370
- const asked = layoutName(config);
362
+ const asked = layoutName(config, plugin);
371
363
  // D179: no other engine knows cells (ELK ignores `grid`), so the name only warns. Text
372
364
  // output never loads it, and gives no ELK_NOT_INSTALLED or LAYOUT_UNKNOWN for it.
373
365
  if (textOutput && !builtIn(asked)) {
@@ -381,7 +373,8 @@ export function createMermaid(firstParty, firstPartyNames) {
381
373
  const name = textOutput ? 'layered' : asked;
382
374
  const found = textOutput
383
375
  ? { engine: layered, state: 'ready' }
384
- : registry.layout(name);
376
+ : registry.layout(name, plugin.layoutEngine);
377
+ const using = `using the built-in ${found.standIn ?? 'layered'} engine`;
385
378
  // Only when ELK lays the graph out: with LAYOUT_UNKNOWN or ELK_NOT_INSTALLED, layered
386
379
  // draws every group, as that warning says.
387
380
  if (isElkName(name) && (found.state === 'ready' || found.state === 'missing'))
@@ -389,20 +382,25 @@ export function createMermaid(firstParty, firstPartyNames) {
389
382
  if (found.state === 'unknown') {
390
383
  warn({
391
384
  code: 'LAYOUT_UNKNOWN',
392
- message: `Unknown layout "${name}"; using the built-in layered engine.`,
385
+ message: `Unknown layout "${name}"; ${using}.`,
393
386
  });
394
387
  }
395
388
  else if (found.state === 'elk') {
396
389
  // D173: `mermaid` names the package; core never does (D153).
397
390
  warn({
398
391
  code: 'ELK_NOT_INSTALLED',
399
- message: `Layout "${name}" needs @mermaid-js/layout-elk, which is not registered; using the built-in layered engine.`,
392
+ message: `Layout "${name}" needs @mermaid-js/layout-elk, which is not registered; ${using}.`,
400
393
  });
401
394
  }
402
395
  engine = found.engine;
396
+ // The layout's part of the drawing (`layoutParts`), only when that layout lays it out:
397
+ // ready (a stand-in engine never is).
398
+ if (found.state === 'ready')
399
+ part = registry.layoutPart(plugin, name)[1];
403
400
  }
404
401
  // The theme reads the id prefix only for the gradient (D182), after ctx exists.
405
- const theme = themeFor(config, s, warn, registry.themeRules(), () => ctx.idPrefix);
402
+ const tables = { rules: registry.themeRules(), diagram: plugin.theme };
403
+ const theme = themeFor(config, s, warn, tables, () => ctx.idPrefix);
406
404
  let idPrefix;
407
405
  // Inline boxes (D177) are SVG only: text output shows every span as written, and warns
408
406
  // ASCII_DROPPED once per feature (D179). Glyphs (D293) are SVG only too, absent without an
@@ -423,7 +421,10 @@ export function createMermaid(firstParty, firstPartyNames) {
423
421
  version: VERSION,
424
422
  linkSchemes: s.options.linkSchemes,
425
423
  limits: s.limits,
424
+ now,
425
+ availableWidth: width,
426
426
  iconPacks: packs,
427
+ layoutPart: part,
427
428
  layout: (graph) => {
428
429
  if (!engine)
429
430
  throw new TypeError(`${plugin.id} has no graph layout`);
@@ -519,13 +520,16 @@ export function createMermaid(firstParty, firstPartyNames) {
519
520
  units: pxProfile,
520
521
  width: options?.availableWidth,
521
522
  });
523
+ // D537: the line-hop step, when its chunk is loaded and decides that this render hops.
524
+ const edges = registry.hops?.(analysis);
522
525
  const renderHooks = hooksFor(analysis);
523
526
  if (renderHooks.size === 0) {
524
- const drawn = drawDiagram(plugin, prepared.parse.model, ctx);
527
+ const drawn = drawDiagram(plugin, prepared.parse.model, ctx, undefined, edges);
525
528
  return { ...drawn, diagramType: prepared.diagramType, warnings };
526
529
  }
527
530
  const run = renderHooks.start(ctx, plugin.id);
528
- const drawn = drawDiagram(plugin, prepared.parse.model, ctx, { run, ast: prepared.parse.ast });
531
+ const hooked = { run, ast: prepared.parse.ast };
532
+ const drawn = drawDiagram(plugin, prepared.parse.model, ctx, hooked, edges);
529
533
  const result = { ...drawn, diagramType: prepared.diagramType, warnings };
530
534
  // The DOM adapter's afterMount entry point (DESIGN §12.2, §12.3); `run`/`mount` call it.
531
535
  if (run.mounts)
@@ -604,11 +608,22 @@ export function createMermaid(firstParty, firstPartyNames) {
604
608
  if (discovery.pending)
605
609
  await discovery.settle();
606
610
  const tasks = [];
611
+ const ascii = req.formats?.includes('ascii');
612
+ if (ascii)
613
+ tasks.push(import("./ascii.js").then((b) => void (textBackend = b)));
607
614
  for (const t of req.types ?? []) {
608
615
  tasks.push(registry.load(t).then((p) => {
609
616
  if (!p)
610
617
  throw new MermaidError('UNSUPPORTED_DIAGRAM', `Diagram type "${t}" is not supported.`);
618
+ // The plugin's own default engine (D284), or the type's (D534), comes with it.
619
+ const layout = registry.layoutOf(t) ?? p.layoutEngine?.default;
620
+ return Promise.all([layout, registry.layoutPart(p, layout)[0]].map((n) => n && registry.loadLayout(n)));
611
621
  }));
622
+ if (ascii)
623
+ tasks.push(registry.loadAscii(t).then((hook) => {
624
+ if (!hook)
625
+ throw new UnsupportedFormatError(t, 'ascii');
626
+ }));
612
627
  }
613
628
  for (const l of req.layouts ?? [])
614
629
  tasks.push(registry.loadLayout(l));
@@ -625,17 +640,6 @@ export function createMermaid(firstParty, firstPartyNames) {
625
640
  tasks.push(n.load());
626
641
  for (const name of req.iconPacks ?? [])
627
642
  tasks.push(iconPacks.load(name));
628
- if (req.formats?.includes('ascii')) {
629
- tasks.push(import("./ascii.js").then((b) => {
630
- textBackend = b;
631
- }));
632
- for (const t of req.types ?? []) {
633
- tasks.push(registry.loadAscii(t).then((hook) => {
634
- if (!hook)
635
- throw new UnsupportedFormatError(t, 'ascii');
636
- }));
637
- }
638
- }
639
643
  try {
640
644
  await Promise.all(tasks);
641
645
  }
@@ -0,0 +1,2 @@
1
+ function r(e){return e?.cssClass==="highlight"}export{r as a};
2
+ //# sourceMappingURL=chunk-2G45NV5W.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["node_modules/@mermaid-js/diagram-treeview/src/model.ts"],"sourcesContent":["/**\n * The treeView model (spec #518): what the parser (#572) produces and the layout (#573) and the\n * renderers read. Plain, frozen data in source order (R-ARCH-7). Shared contract of the treeView\n * tickets: change it only additively, and say so in the run notes\n * (`v13/docs/agents/runs/518/GAPS.md`).\n */\nimport type { AstId, Diagnostic, Range } from '@mermaid-js/core/parser-kit';\n\n/** One node (a row of the tree), as v12's DB stored it, and where it sits. */\nexport interface TreeViewNode {\n /**\n * The name as v12 converted it: quotes stripped, a bare name's trailing blanks cut (inner\n * runs kept), then a trailing `/` cut (`/` alone gives `''`).\n */\n readonly name: string;\n /** Whether the name ended with `/` (v12's `nodeType: 'directory'`, else `'file'`). */\n readonly directory: boolean;\n /** 0 for a node at the top; v12 hangs those under its virtual root `/`. */\n readonly depth: number;\n /**\n * v12's level: the length of the blank run before the name (a tab counts 1; after the box\n * pass four per depth), else 0. A node goes under the nearest earlier node with a smaller\n * level.\n */\n readonly level: number;\n /**\n * The `icon(…)` written for it, as v12's DB held it: the icon name (`folder`, `logos:react`),\n * `'none'` for `icon(none)` and `icon()`; absent with no `icon(…)`. Resolving it (built-ins,\n * `defaultIconPack`, `showIcons`, the maps) is the renderer's (`resolveIcon`).\n */\n readonly icon?: string;\n /** The class of its `:::name` (the last one written wins); absent with none. */\n readonly cssClass?: string;\n /** The text of its `## …` (the last one written wins), trimmed; absent when empty. */\n readonly description?: string;\n /** The nodes under it, in source order. */\n readonly children: readonly TreeViewNode[];\n /** `node:<dir>/<dir>/<name>`, `@2`, … for a repeat in one directory (D487). */\n readonly astId: AstId;\n /** From the name (the blanks before it off) to the end of its last annotation. */\n readonly range: Range;\n}\n\nexport interface TreeViewModel {\n /** The nodes at the top, in source order (v12's `getRoot().children`). */\n readonly roots: readonly TreeViewNode[];\n /** Every node in source order, which is the tree read depth first. */\n readonly nodes: readonly TreeViewNode[];\n /**\n * The in-text `title` if non-empty, else the front-matter `title`; absent when neither. Kept\n * and not drawn (D484, D218).\n */\n readonly title?: string;\n /** The AST id of the `title` statement the title comes from; absent for a front-matter title. */\n readonly titleAstId?: AstId;\n readonly accTitle: string;\n readonly accDescr: string;\n /** Warning diagnostics of the parse (also in `ParseResult.diagnostics`). */\n readonly warnings: readonly Diagnostic[];\n /**\n * The icons the nodes draw through the extensions' glyphs (`DiagramPlugin.icons`, D293):\n * every name `resolveIcon` gives a node under the parse's `treeView` options but the built-in\n * glyphs, in source order without repeats. Set by the plugin's `parse` (#575), which has the\n * config; absent from `parseTreeView` alone.\n */\n readonly glyphIcons?: readonly string[];\n}\n\n/**\n * Whether a node's row is highlighted: v12 split the class on blanks and looked for\n * `highlight`; the grammar's class is one name, so it is that name.\n */\nexport function highlighted(node: TreeViewNode | undefined): boolean {\n return node?.cssClass === 'highlight';\n}\n"],"mappings":"AAwEO,SAASA,EAAYC,EAAyC,CACnE,OAAOA,GAAM,WAAa,WAC5B","names":["highlighted","node"]}
@@ -0,0 +1,11 @@
1
+ import{m as a,s as u}from"./chunk-BNYOSPTM.mjs";function c(e,t){return t==="indented"?{text:`treeView-beta
2
+ x
3
+ ${e}
4
+ y
5
+ `,nodes:3,at:1}:t==="box-top"?{text:`treeView-beta
6
+ ${e}
7
+ \u2514\u2500\u2500 x
8
+ `,nodes:2,at:0}:{text:`treeView-beta
9
+ \u251C\u2500\u2500 ${e}
10
+ `,nodes:1,at:0}}function m(e,t,r,i){let{text:o,nodes:d,at:f}=c(e,i),s=u(o);if(s.diagnostics.length>0||s.model.nodes.length!==d)return!1;let n=s.model.nodes[f];return n!==void 0&&n.name===t&&n.directory===r&&n.depth===0&&n.children.length===(i==="box-top"?1:0)&&n.icon===void 0&&n.cssClass===void 0&&n.description===void 0}function p(e){return e!==""&&!/^\s|\s$|[^\S ]/u.test(e)&&!/^(?:title|acc|treeView)/i.test(e)&&!/:::|icon\(|["'#%&<─━│┃└┗├┣]/u.test(e)}function l(e,t,r,i){if(r!==""&&e.includes(r))return;let o=a(e,t);if(r===""&&p(o))return o;let d=`${r}${o}${r}`;return m(d,e,t,i)?d:void 0}export{l as a};
11
+ //# sourceMappingURL=chunk-2MDKOWUQ.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["node_modules/@mermaid-js/diagram-treeview/src/parser/written.ts"],"sourcesContent":["// cspell:words treeview\n/**\n * How a node's name is written so that it reads back (D487, D488): the one place both the\n * language facet's rename (`facet/names.ts`) and the text output (`ascii/names.ts`) ask. A\n * written form is taken only when the parser reads it, where it will stand, back to the name, as\n * a node of its own with no annotation. Where it stands is the line it is on:\n *\n * - `indented`: an indented line of its own between two nodes (the facet's rename);\n * - `box-top`: a box-drawn tree's line at column 0, a node at the top (the text output);\n * - `box-branch`: after a box branch, `├── ` (the text output).\n */\nimport type { TreeViewNode } from '../model.ts';\nimport { writtenName } from './convert.ts';\nimport { parseTreeView } from './parser.ts';\n\nexport type NameLine = 'indented' | 'box-top' | 'box-branch';\n\n/** A quote a name can be written in, or `''` for bare. */\nexport type NameQuote = '' | '\"' | \"'\";\n\n/** The text around a written form `w` on `line`, and the node it is, by index. */\nfunction around(w: string, line: NameLine): { text: string; nodes: number; at: number } {\n if (line === 'indented') return { text: `treeView-beta\\n x\\n ${w}\\n y\\n`, nodes: 3, at: 1 };\n // A box line under it, so that the box pass runs with no glyph in `w`.\n if (line === 'box-top') return { text: `treeView-beta\\n${w}\\n└── x\\n`, nodes: 2, at: 0 };\n return { text: `treeView-beta\\n├── ${w}\\n`, nodes: 1, at: 0 };\n}\n\n/** Whether `w`, on `line`, reads back as a node named `name` (a directory when `directory`). */\nexport function readsBack(w: string, name: string, directory: boolean, line: NameLine): boolean {\n const { text, nodes, at } = around(w, line);\n const r = parseTreeView(text);\n if (r.diagnostics.length > 0 || r.model.nodes.length !== nodes) return false;\n const n: TreeViewNode | undefined = r.model.nodes[at];\n return (\n n !== undefined &&\n n.name === name &&\n n.directory === directory &&\n n.depth === 0 &&\n n.children.length === (line === 'box-top' ? 1 : 0) &&\n n.icon === undefined &&\n n.cssClass === undefined &&\n n.description === undefined\n );\n}\n\n/**\n * Whether the bare form `w` surely reads back on any line without asking the parser, so a tree\n * of plain names is not parsed name by name. It mirrors the lexer: BARE_NAME starts with none\n * of `[ \\t\"']` and stops at a blank run before `:::`, `icon(` or `##` (`parser/lexer.ts`\n * `bareName`), and its trailing blanks are cut; the keyword terminals start `title`, `acc` or\n * `treeView-beta`; `%%` is a comment and `#name;` an entity (`ampEntities`); the view reads the\n * quotes in a tag (`<…>`); the box pass reads the box glyphs and skips the blanks after a\n * branch. A name with none of these is plainly bare; any other goes to the parser.\n */\nexport function plainlyBare(w: string): boolean {\n return (\n w !== '' &&\n !/^\\s|\\s$|[^\\S ]/u.test(w) &&\n !/^(?:title|acc|treeView)/i.test(w) &&\n !/:::|icon\\(|[\"'#%&<─━│┃└┗├┣]/u.test(w)\n );\n}\n\n/**\n * `name` (a directory's with its `/`) written bare (`quote` `''`) or in `quote`, if that form\n * reads back on `line`; undefined when it does not, or when the name holds that quote.\n */\nexport function nameForm(\n name: string,\n directory: boolean,\n quote: NameQuote,\n line: NameLine\n): string | undefined {\n if (quote !== '' && name.includes(quote)) return undefined;\n const bare = writtenName(name, directory);\n if (quote === '' && plainlyBare(bare)) return bare;\n const w = `${quote}${bare}${quote}`;\n return readsBack(w, name, directory, line) ? w : undefined;\n}\n"],"mappings":"gDAqBA,SAASA,EAAOC,EAAWC,EAA6D,CACtF,OAAIA,IAAS,WAAmB,CAAE,KAAM;AAAA;AAAA,IAAyBD,CAAC;AAAA;AAAA,EAAW,MAAO,EAAG,GAAI,CAAE,EAEzFC,IAAS,UAAkB,CAAE,KAAM;AAAA,EAAkBD,CAAC;AAAA;AAAA,EAAa,MAAO,EAAG,GAAI,CAAE,EAChF,CAAE,KAAM;AAAA,qBAAsBA,CAAC;AAAA,EAAM,MAAO,EAAG,GAAI,CAAE,CAC9D,CAGO,SAASE,EAAUF,EAAWG,EAAcC,EAAoBH,EAAyB,CAC9F,GAAM,CAAE,KAAAI,EAAM,MAAAC,EAAO,GAAAC,CAAG,EAAIR,EAAOC,EAAGC,CAAI,EACpCO,EAAIC,EAAcJ,CAAI,EAC5B,GAAIG,EAAE,YAAY,OAAS,GAAKA,EAAE,MAAM,MAAM,SAAWF,EAAO,MAAO,GACvE,IAAM,EAA8BE,EAAE,MAAM,MAAMD,CAAE,EACpD,OACE,IAAM,QACN,EAAE,OAASJ,GACX,EAAE,YAAcC,GAChB,EAAE,QAAU,GACZ,EAAE,SAAS,UAAYH,IAAS,UAAY,EAAI,IAChD,EAAE,OAAS,QACX,EAAE,WAAa,QACf,EAAE,cAAgB,MAEtB,CAWO,SAASS,EAAYV,EAAoB,CAC9C,OACEA,IAAM,IACN,CAAC,kBAAkB,KAAKA,CAAC,GACzB,CAAC,2BAA2B,KAAKA,CAAC,GAClC,CAAC,+BAA+B,KAAKA,CAAC,CAE1C,CAMO,SAASW,EACdR,EACAC,EACAQ,EACAX,EACoB,CACpB,GAAIW,IAAU,IAAMT,EAAK,SAASS,CAAK,EAAG,OAC1C,IAAMC,EAAOC,EAAYX,EAAMC,CAAS,EACxC,GAAIQ,IAAU,IAAMF,EAAYG,CAAI,EAAG,OAAOA,EAC9C,IAAMb,EAAI,GAAGY,CAAK,GAAGC,CAAI,GAAGD,CAAK,GACjC,OAAOV,EAAUF,EAAGG,EAAMC,EAAWH,CAAI,EAAID,EAAI,MACnD","names":["around","w","line","readsBack","name","directory","text","nodes","at","r","parseTreeView","plainlyBare","nameForm","quote","bare","writtenName"]}
@@ -0,0 +1,2 @@
1
+ function H(e,r){return e<=0?{px:r,py:0}:e===1?{px:0,py:r}:{px:r%e,py:Math.floor(r/e)}}function N(e,r,n){return r+(e>0?Math.min(n,e-r%e):n)}function k(e){let r=0,n=0;for(let o of e.children){if(o.space)continue;let y=o.w/o.span;y>r&&(r=y),o.h>n&&(n=o.h)}return{mW:r,mH:n}}function M(e,r,n,o){for(let y of e.children)y.w=r*y.span+o*(y.span-1),y.h=n}function z({node:e,max:r,sibling:n,padding:o}){let{mW:y,mH:t}=r,{mW:x,mH:s}=n,l=e.columns??-1,f=e.children,m=0;for(let a of f)m+=a.span;let c=l>0&&l<m?l:f.length,u=Math.ceil(m/c),b=c*(y+o)+o,G=u*(t+o)+o+e.band;if(b<x){b=x,G=s;let a=(x-c*o-o)/c,A=Math.max(0,(s-e.band-u*o-o)/u);for(let w of f)w.w=a,w.h=A}if(b<(e.w||0)){b=e.w||0;let a=l>0?Math.min(f.length,l):f.length,A=(b-a*o-o)/a;for(let w of f)w.w=A}e.w=b,e.h=G}function F(e){let r=[],n=[e];for(;n.length>0;){let o=n.pop();r.push(o);for(let y=o.children.length-1;y>=0;y--)n.push(o.children[y])}return r}function C(e,r,n){let o=new Map,y=[],t=(x,s)=>{if(x.children.length>0){let l=o.get(x)??0;if(l>=n)return;o.set(x,l+1)}x.w||(x.w=s.mW,x.h=s.mH),x.children.length>0&&y.push({node:x,sibling:s,next:0,second:!1,max:{mW:0,mH:0}})};for(e.w=0,t(e,{mW:0,mH:0});y.length>0;){let x=y[y.length-1],s=x.node.children;x.next<s.length?t(s[x.next++],x.second?x.max:{mW:0,mH:0}):x.second?(y.pop(),z({node:x.node,max:x.max,sibling:x.sibling,padding:r})):(x.max=k(x.node),M(x.node,x.max.mW,x.max.mH,r),x.second=!0,x.next=0)}}function E(e,r){e.x=0,e.y=0;for(let n of F(e)){if(n.children.length===0)continue;let o=n.columns??-1,y=[],t=0;for(let c of n.children){let{py:u}=H(o,t);c.h>(y[u]??0)&&(y[u]=c.h),t=N(o,t,c.span)}let x=[],s=0;for(let c=0;c<y.length;c++)y[c]!==void 0&&(x[c]=s,s+=y[c]+r);let l=()=>n.x?n.x+(-n.w/2||0):-r,f=l(),m=0;t=0;for(let c of n.children){let{py:u}=H(o,t);u!==m&&(m=u,f=l()),c.x=f+r+c.w/2,f=c.x+c.w/2;let b=y[u]??c.h;c.y=n.y-n.h/2+n.band+(x[u]??0)+b/2+r,t=N(o,t,c.span)}}}var v=["right","left","up","down"],P="point",D=e=>{let r=new Set;for(let n of e)switch(n){case"x":r.add("right"),r.add("left");break;case"y":r.add("up"),r.add("down");break;case"right":case"left":case"up":case"down":r.add(n);break;default:break}return r},O=e=>v.filter(r=>e.has(r)).join("|")||P,W=new Map([["right|left|up|down",({height:e,midpoint:r,padding:n,width:o})=>[{x:0,y:0},{x:r,y:0},{x:o/2,y:2*n},{x:o-r,y:0},{x:o,y:0},{x:o,y:-e/3},{x:o+2*n,y:-e/2},{x:o,y:-2*e/3},{x:o,y:-e},{x:o-r,y:-e},{x:o/2,y:-e-2*n},{x:r,y:-e},{x:0,y:-e},{x:0,y:-2*e/3},{x:-2*n,y:-e/2},{x:0,y:-e/3}]],["right|left|up",({height:e,midpoint:r,width:n})=>[{x:r,y:0},{x:n-r,y:0},{x:n,y:-e/2},{x:n-r,y:-e},{x:r,y:-e},{x:0,y:-e/2}]],["right|left|down",({height:e,midpoint:r,width:n})=>[{x:0,y:0},{x:r,y:-e},{x:n-r,y:-e},{x:n,y:0}]],["right|up|down",({height:e,midpoint:r,width:n})=>[{x:0,y:0},{x:n,y:-r},{x:n,y:-e+r},{x:0,y:-e}]],["left|up|down",({height:e,midpoint:r,width:n})=>[{x:n,y:0},{x:0,y:-r},{x:0,y:-e+r},{x:n,y:-e}]],["right|left",({height:e,midpoint:r,padding:n,width:o})=>[{x:r,y:0},{x:r,y:-n},{x:o-r,y:-n},{x:o-r,y:0},{x:o,y:-e/2},{x:o-r,y:-e},{x:o-r,y:-e+n},{x:r,y:-e+n},{x:r,y:-e},{x:0,y:-e/2}]],["up|down",({height:e,midpoint:r,padding:n,width:o})=>[{x:o/2,y:0},{x:0,y:-n},{x:r,y:-n},{x:r,y:-e+n},{x:0,y:-e+n},{x:o/2,y:-e},{x:o,y:-e+n},{x:o-r,y:-e+n},{x:o-r,y:-n},{x:o,y:-n}]],["right|up",({height:e,midpoint:r,width:n})=>[{x:0,y:0},{x:n,y:-r},{x:0,y:-e}]],["right|down",({height:e,width:r})=>[{x:0,y:0},{x:r,y:0},{x:0,y:-e}]],["left|up",({height:e,midpoint:r,width:n})=>[{x:n,y:0},{x:0,y:-r},{x:n,y:-e}]],["left|down",({height:e,width:r})=>[{x:r,y:0},{x:0,y:0},{x:r,y:-e}]],["right",({height:e,midpoint:r,padding:n,width:o})=>[{x:r,y:-n},{x:r,y:-n},{x:o-r,y:-n},{x:o-r,y:0},{x:o,y:-e/2},{x:o-r,y:-e},{x:o-r,y:-e+n},{x:r,y:-e+n},{x:r,y:-e+n}]],["left",({height:e,midpoint:r,padding:n,width:o})=>[{x:r,y:0},{x:r,y:-n},{x:o-r,y:-n},{x:o-r,y:-e+n},{x:r,y:-e+n},{x:r,y:-e},{x:0,y:-e/2}]],["up",({height:e,midpoint:r,padding:n,width:o})=>[{x:r,y:-n},{x:r,y:-e+n},{x:0,y:-e+n},{x:o/2,y:-e},{x:o,y:-e+n},{x:o-r,y:-e+n},{x:o-r,y:-n}]],["down",({height:e,midpoint:r,padding:n,width:o})=>[{x:o/2,y:0},{x:0,y:-n},{x:r,y:-n},{x:r,y:-e+n},{x:o-r,y:-e+n},{x:o-r,y:-n},{x:o,y:-n}]],[P,()=>[{x:0,y:0}]]]);function S(e,r,n){let o=r/2,y=e.height+4*o,t=y/2;return{height:y,midpoint:t,padding:o,width:n??e.width+2*t+2*o}}var i=(e,r,n,o)=>{let y=O(D(e));return(W.get(y)??W.get(P))(S(r,n.padding??0,o))};function R(e,r){let{width:n,height:o}=S(e,r);return{w:n,h:o}}function K({directions:e,label:r,padding:n,width:o}){let{height:y}=S(r,n,o);return i(e,r,{padding:n},o).map(t=>({x:t.x-o/2,y:t.y+y/2}))}export{H as a,N as b,C as c,E as d,D as e,R as f,K as g};
2
+ //# sourceMappingURL=chunk-33QZBPQK.mjs.map