docmedown 0.1.7 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (304) hide show
  1. package/LICENSE +201 -21
  2. package/README.md +86 -37
  3. package/dist/architecture-7GRP2DOG-B8Xs9IfY.mjs +2 -0
  4. package/dist/architecture-7GRP2DOG-Vdsw7WC7.js +1 -0
  5. package/dist/cli.js +672 -1294
  6. package/dist/cynefin-OW5HDTMX-DU6kwwck.js +1 -0
  7. package/dist/cynefin-OW5HDTMX-F0P2M_lQ.mjs +2 -0
  8. package/dist/docmedown-compiler.js +228 -0
  9. package/dist/docmedown-mermaid.js +3588 -0
  10. package/dist/docmedown.cjs +7264 -80
  11. package/dist/docmedown.iife.js +7624 -424
  12. package/dist/docmedown.mjs +15531 -15009
  13. package/dist/docmedown.web.js +7628 -0
  14. package/dist/eventmodeling-NTZA5JFV-D58ICByZ.js +1 -0
  15. package/dist/eventmodeling-NTZA5JFV-SxxTo5cJ.mjs +2 -0
  16. package/dist/gitGraph-4MIJSDKK-C_R2a4aQ.mjs +2 -0
  17. package/dist/gitGraph-4MIJSDKK-CdMj8HJ8.js +1 -0
  18. package/dist/info-A6RAGUB7-CG4UBCfn.js +1 -0
  19. package/dist/info-A6RAGUB7-DmjQlHTj.mjs +2 -0
  20. package/dist/mermaid-BvOI3ZSW.js +3334 -0
  21. package/dist/mermaid-Cx9uSfoz.mjs +116948 -0
  22. package/dist/packet-AYTQ26CC-CMuoEJn0.js +1 -0
  23. package/dist/packet-AYTQ26CC-tdMo_iPL.mjs +2 -0
  24. package/dist/pie-WAS4IAKB-C1hjX8y0.js +1 -0
  25. package/dist/pie-WAS4IAKB-DG2Bio1G.mjs +2 -0
  26. package/dist/prism-CeBRmKvl.js +2 -0
  27. package/dist/prism-CummdiZX.mjs +1588 -0
  28. package/dist/radar-RG4KPBEZ-DHxYOB0f.mjs +2 -0
  29. package/dist/radar-RG4KPBEZ-Dvyo3gdA.js +1 -0
  30. package/dist/railroad-74A4TZTK-1sb9Z_QQ.js +1 -0
  31. package/dist/railroad-74A4TZTK-CwztrSkE.mjs +2 -0
  32. package/dist/railroad-abnf-HS5TGJTU-4264fZjH.js +1 -0
  33. package/dist/railroad-abnf-HS5TGJTU-BKCsR9iC.mjs +2 -0
  34. package/dist/railroad-ebnf-LZEXJU2U-BXErl5kO.js +1 -0
  35. package/dist/railroad-ebnf-LZEXJU2U-DzDOfuxK.mjs +2 -0
  36. package/dist/railroad-peg-WCYAUIDC-B6gNHamV.mjs +2 -0
  37. package/dist/railroad-peg-WCYAUIDC-D7pSwRGa.js +1 -0
  38. package/dist/rolldown-runtime-B0aSnxlc.mjs +20 -0
  39. package/dist/rolldown-runtime-DF3sbh8G.js +1 -0
  40. package/dist/svelte-compiler-loader-Deqbdbvf.js +1 -0
  41. package/dist/svelte-compiler-loader-DtYQgEKV.mjs +50 -0
  42. package/dist/svelte-runtime-Brc440dp.js +5 -0
  43. package/dist/svelte-runtime-CgCk_bw1.mjs +40 -0
  44. package/dist/treeView-Q6P3EWNA-DArM8kFH.mjs +2 -0
  45. package/dist/treeView-Q6P3EWNA-JstiGzov.js +1 -0
  46. package/dist/treemap-WGGIJYW6-CMIcmEVN.mjs +2 -0
  47. package/dist/treemap-WGGIJYW6-Dq6fFckz.js +1 -0
  48. package/dist/ts-compiler-BMDmcNn5.mjs +93 -0
  49. package/dist/ts-compiler-U7pTMJjY.js +3 -0
  50. package/dist/types/runtime/bridges/dynamic-component.d.ts +43 -0
  51. package/dist/types/runtime/bridges/element-bridge.d.ts +24 -0
  52. package/dist/types/runtime/bridges/index.d.ts +3 -0
  53. package/dist/types/runtime/bridges/react-bridge.d.ts +35 -0
  54. package/dist/types/runtime/compiler-cache.d.ts +18 -0
  55. package/dist/types/runtime/config-schema.d.ts +2 -0
  56. package/dist/types/runtime/favicons.d.ts +28 -0
  57. package/dist/types/runtime/loader/local-loader.d.ts +13 -0
  58. package/dist/types/runtime/markdown/component-body.d.ts +7 -0
  59. package/dist/types/runtime/markdown/escape.d.ts +1 -0
  60. package/dist/types/runtime/markdown/highlighter.d.ts +32 -6
  61. package/dist/types/runtime/markdown/katex.d.ts +5 -0
  62. package/dist/types/runtime/markdown/mermaid-engine.d.ts +1 -0
  63. package/dist/types/runtime/markdown/mermaid-loader.d.ts +19 -0
  64. package/dist/types/runtime/markdown/mermaid.d.ts +6 -0
  65. package/dist/types/runtime/markdown/tables.d.ts +68 -0
  66. package/dist/types/runtime/media.d.ts +30 -0
  67. package/dist/types/runtime/motion.d.ts +134 -0
  68. package/dist/types/runtime/offline-export.d.ts +9 -2
  69. package/dist/types/runtime/router.d.ts +40 -2
  70. package/dist/types/runtime/splash.d.ts +90 -0
  71. package/dist/types/runtime/svelte-compiler-engine.d.ts +1 -0
  72. package/dist/types/runtime/svelte-compiler-loader.d.ts +14 -0
  73. package/dist/types/runtime/svelte-runtime.d.ts +29 -0
  74. package/dist/types/runtime/svelte-tag.d.ts +7 -0
  75. package/dist/types/runtime/ts-compiler.d.ts +24 -0
  76. package/dist/types/runtime/types.d.ts +1 -0
  77. package/dist/types/ui/doc-context.svelte.d.ts +198 -0
  78. package/dist/types/ui/index.d.ts +33 -0
  79. package/dist/types/ui/registry.d.ts +52 -0
  80. package/dist/types/ui/theme.svelte.d.ts +32 -0
  81. package/dist/wardley-WFR3VGLG-BK9BA6h6.mjs +2 -0
  82. package/dist/wardley-WFR3VGLG-Cbs7W-dU.js +1 -0
  83. package/package.json +61 -48
  84. package/schemas/docs.schema.json +186 -181
  85. package/templates/.dmd/CounterWidget.svelte +29 -0
  86. package/templates/README.md +2 -2
  87. package/templates/favicon.svg +12 -0
  88. package/templates/favicons/favicon-book.svg +11 -0
  89. package/templates/favicons/favicon-markdown.svg +11 -0
  90. package/templates/favicons/favicon-minimal.svg +15 -0
  91. package/templates/favicons/favicon-terminal.svg +14 -0
  92. package/templates/favicons/favicon.svg +12 -0
  93. package/templates/guides/custom-components.md +82 -22
  94. package/templates/index.html +6 -3
  95. package/dist/abnfDiagram-VCTEODGH-CtQBp0Qv.mjs +0 -89
  96. package/dist/abnfDiagram-VCTEODGH-mccrzlD_.js +0 -1
  97. package/dist/arc-DgPKXEdT.mjs +0 -82
  98. package/dist/arc-n7TW7Bis.js +0 -1
  99. package/dist/architecture-7GRP2DOG-B7myQ46f.js +0 -1
  100. package/dist/architecture-7GRP2DOG-Cxj1ussQ.mjs +0 -3
  101. package/dist/architectureDiagram-5GKGNRK7-BdTCu5T3.js +0 -36
  102. package/dist/architectureDiagram-5GKGNRK7-CkgZa-G1.mjs +0 -4154
  103. package/dist/array-CApNbSU9.mjs +0 -6
  104. package/dist/array-DZSRzHA_.js +0 -1
  105. package/dist/blockDiagram-I7D4REHJ-CSYvpxQw.js +0 -129
  106. package/dist/blockDiagram-I7D4REHJ-CYngfPD9.mjs +0 -1922
  107. package/dist/c4Diagram-7LVT6UL2-B-sz5MUK.js +0 -38
  108. package/dist/c4Diagram-7LVT6UL2-DEzxFf2b.mjs +0 -3010
  109. package/dist/channel-LgHproiI.mjs +0 -5
  110. package/dist/channel-yqu0m4cl.js +0 -1
  111. package/dist/chunk-2E4U76K2-BOyeRQsI.js +0 -1
  112. package/dist/chunk-2E4U76K2-CoTrgtfg.mjs +0 -348
  113. package/dist/chunk-2Q5K7J3B-D4EgYPOq.mjs +0 -15
  114. package/dist/chunk-2Q5K7J3B-DhjCNjaM.js +0 -1
  115. package/dist/chunk-4HAMMTFA-GFyfmcSO.js +0 -62
  116. package/dist/chunk-4HAMMTFA-VgWPe1ng.mjs +0 -4188
  117. package/dist/chunk-5VM5RSS4-GINalzIv.js +0 -15
  118. package/dist/chunk-5VM5RSS4-TqxtqrwE.mjs +0 -5
  119. package/dist/chunk-75Z2AOVW-DYouz5MZ.js +0 -2
  120. package/dist/chunk-75Z2AOVW-Dz0Sko9Y.mjs +0 -1330
  121. package/dist/chunk-CLGD4ZFX-C5J-e2io.js +0 -1
  122. package/dist/chunk-CLGD4ZFX-DBkwyMMv.mjs +0 -14
  123. package/dist/chunk-DU6HZSFF-BEQZSmUu.mjs +0 -3836
  124. package/dist/chunk-DU6HZSFF-CWc5ewtb.js +0 -127
  125. package/dist/chunk-F27PBJKO-8jvY_jJK.js +0 -1
  126. package/dist/chunk-F27PBJKO-DFH3sRZG.mjs +0 -61
  127. package/dist/chunk-FOHPRMQF-LRqOLsSw.mjs +0 -21456
  128. package/dist/chunk-FOHPRMQF-tmTlwTeH.js +0 -161
  129. package/dist/chunk-GMAD6QVW-BZeZ4fdb.mjs +0 -1863
  130. package/dist/chunk-GMAD6QVW-DEQiTa0c.js +0 -72
  131. package/dist/chunk-GVQU2GXP-B1D3J05J.mjs +0 -37
  132. package/dist/chunk-GVQU2GXP-CdJIWN41.js +0 -1
  133. package/dist/chunk-IMKFNOWR-BmZb9U1f.mjs +0 -2042
  134. package/dist/chunk-IMKFNOWR-CPJsszGN.js +0 -231
  135. package/dist/chunk-JWPE2WC7-DIKiF5cm.mjs +0 -8
  136. package/dist/chunk-JWPE2WC7-p1fYVdYc.js +0 -1
  137. package/dist/chunk-L3NEJ4N5-TzDiVs78.js +0 -1
  138. package/dist/chunk-L3NEJ4N5-lal8wUID.mjs +0 -245
  139. package/dist/chunk-LNGE3PJU-BQX75wkM.js +0 -34
  140. package/dist/chunk-LNGE3PJU-DJ9JuXV6.mjs +0 -1521
  141. package/dist/chunk-OSK3NFVY-9AWK88m1.mjs +0 -672
  142. package/dist/chunk-OSK3NFVY-CHzvVe8m.js +0 -10
  143. package/dist/chunk-P2QGCYS3-6q3AXPt5.mjs +0 -67
  144. package/dist/chunk-P2QGCYS3-DKZzpRQW.js +0 -1
  145. package/dist/chunk-POPQ4Y6H-Dd7J9tx3.mjs +0 -26
  146. package/dist/chunk-POPQ4Y6H-T5C7wpjf.js +0 -1
  147. package/dist/chunk-PWAF6VOD-BYG76tEe.mjs +0 -275
  148. package/dist/chunk-PWAF6VOD-DxZLuCEw.js +0 -1
  149. package/dist/chunk-SHT3W25Y-B2Wes8jn.mjs +0 -4183
  150. package/dist/chunk-SHT3W25Y-BQjHSn5K.js +0 -168
  151. package/dist/chunk-SVP7TREG-BFMd615E.js +0 -88
  152. package/dist/chunk-SVP7TREG-CynckzeF.mjs +0 -490
  153. package/dist/chunk-TICWLB2K-BfCuoR1V.mjs +0 -3357
  154. package/dist/chunk-TICWLB2K-agcyBfUp.js +0 -206
  155. package/dist/chunk-TLUHSLCS-CUrWaKDG.mjs +0 -59
  156. package/dist/chunk-TLUHSLCS-Drx_a7am.js +0 -1
  157. package/dist/chunk-XXDRQBXY-AAk1-Cyg.js +0 -1
  158. package/dist/chunk-XXDRQBXY-DpR8eYzz.mjs +0 -9
  159. package/dist/chunk-Y2CYZVJY-CnmLqFtv.js +0 -1
  160. package/dist/chunk-Y2CYZVJY-i11wjrBe.mjs +0 -12
  161. package/dist/classDiagram-ZZMXUADV-B7IN9zcX.js +0 -1
  162. package/dist/classDiagram-ZZMXUADV-tcy6gxSB.mjs +0 -30
  163. package/dist/classDiagram-v2-VYDZK3BY-B7IN9zcX.js +0 -1
  164. package/dist/classDiagram-v2-VYDZK3BY-D5wM6Acp.mjs +0 -30
  165. package/dist/cose-bilkent-JH36ORCC-DBUPO3qJ.js +0 -1
  166. package/dist/cose-bilkent-JH36ORCC-Slpx4WIt.mjs +0 -2253
  167. package/dist/cynefin-OW5HDTMX--QVnfGi1.mjs +0 -3
  168. package/dist/cynefin-OW5HDTMX-lNKysi7S.js +0 -1
  169. package/dist/cynefinDiagram-5FMLGOSQ-CsFONYqx.js +0 -62
  170. package/dist/cynefinDiagram-5FMLGOSQ-DsrxYBcg.mjs +0 -355
  171. package/dist/cytoscape.esm-C5TvPYYm.mjs +0 -18148
  172. package/dist/cytoscape.esm-CBmWJr5M.js +0 -321
  173. package/dist/dagre-CZ6P9L_h.js +0 -1
  174. package/dist/dagre-GXQ25YYZ-CQszk-7P.js +0 -4
  175. package/dist/dagre-GXQ25YYZ-ecYByRSn.mjs +0 -425
  176. package/dist/dagre-J_1oH0eY.mjs +0 -1934
  177. package/dist/defaultLocale-N-0uLSyg.mjs +0 -198
  178. package/dist/defaultLocale-ybN1Vtvg.js +0 -1
  179. package/dist/diagram-S7CK7UJ4-CTMvxX__.js +0 -30
  180. package/dist/diagram-S7CK7UJ4-DxCghfa-.mjs +0 -301
  181. package/dist/diagram-UQ7AKVKN-1viEkqlG.js +0 -41
  182. package/dist/diagram-UQ7AKVKN-BA7Z_oB7.mjs +0 -214
  183. package/dist/diagram-VSXAHHWV-DgVT19mq.js +0 -3
  184. package/dist/diagram-VSXAHHWV-Dtqo03M5.mjs +0 -432
  185. package/dist/diagram-VX7I27RA-CNw0pOX_.js +0 -24
  186. package/dist/diagram-VX7I27RA-GMPRt8Zh.mjs +0 -527
  187. package/dist/diagram-Z3DM3KII-C6XdQK_Q.mjs +0 -134
  188. package/dist/diagram-Z3DM3KII-CPkBr3FT.js +0 -24
  189. package/dist/dist-CXWJafG_.js +0 -1
  190. package/dist/dist-DNdLIC8h.mjs +0 -59
  191. package/dist/ebnfDiagram-PWID7BFC-CseVsyL3.js +0 -1
  192. package/dist/ebnfDiagram-PWID7BFC-D_dBDXWC.mjs +0 -100
  193. package/dist/erDiagram-RLTQ6QDP-DFwfQTRS.js +0 -99
  194. package/dist/erDiagram-RLTQ6QDP-DP7ddGMH.mjs +0 -1966
  195. package/dist/eventmodeling-NTZA5JFV-CzxVg0l5.js +0 -1
  196. package/dist/eventmodeling-NTZA5JFV-Djsy__5n.mjs +0 -3
  197. package/dist/flowDiagram-HODETNUW-7hSJfI3W.js +0 -1
  198. package/dist/flowDiagram-HODETNUW-Dqu5Lr19.mjs +0 -17
  199. package/dist/ganttDiagram-EL5Y4UJY-KNL3tzTD.mjs +0 -3072
  200. package/dist/ganttDiagram-EL5Y4UJY-aiLqNWgi.js +0 -292
  201. package/dist/gitGraph-4MIJSDKK-DnElfqX7.js +0 -1
  202. package/dist/gitGraph-4MIJSDKK-xuKJBT2e.mjs +0 -3
  203. package/dist/gitGraphDiagram-WWUBYQGX-D4gSo_-e.js +0 -106
  204. package/dist/gitGraphDiagram-WWUBYQGX-Dooss5fG.mjs +0 -733
  205. package/dist/graphlib-BaETKKSa.js +0 -1
  206. package/dist/graphlib-XW-Jr8pF.mjs +0 -1267
  207. package/dist/info-A6RAGUB7-ClYskpn6.mjs +0 -3
  208. package/dist/info-A6RAGUB7-DDvvt-fW.js +0 -1
  209. package/dist/infoDiagram-27XIBGKW-B2-y2mdQ.mjs +0 -20
  210. package/dist/infoDiagram-27XIBGKW-DYQ9NzfL.js +0 -2
  211. package/dist/init-BJdqMO10.js +0 -1
  212. package/dist/init-CsQUQz36.mjs +0 -13
  213. package/dist/ishikawaDiagram-5VMMS53U-ULIhoYO5.js +0 -70
  214. package/dist/ishikawaDiagram-5VMMS53U-xAArNh-1.mjs +0 -719
  215. package/dist/journeyDiagram-3NMN7TZE-BBMYNZRL.js +0 -139
  216. package/dist/journeyDiagram-3NMN7TZE-BH-uKqP7.mjs +0 -884
  217. package/dist/kanban-definition-UXKFOSKX-Be49llXr.mjs +0 -976
  218. package/dist/kanban-definition-UXKFOSKX-CDL5yJkq.js +0 -89
  219. package/dist/line-BEwhHSLl.js +0 -1
  220. package/dist/line-CiXRog8O.mjs +0 -34
  221. package/dist/linear-75tfjrny.js +0 -1
  222. package/dist/linear-Ncx_RuON.mjs +0 -288
  223. package/dist/mermaid-parser.core-BBApyu_y.js +0 -6
  224. package/dist/mermaid-parser.core-BRHibdUE.mjs +0 -638
  225. package/dist/mindmap-definition-YA3MSWOX-Chy7XP_5.mjs +0 -1006
  226. package/dist/mindmap-definition-YA3MSWOX-DOda-fkL.js +0 -96
  227. package/dist/ordinal-B1BNQwUR.mjs +0 -65
  228. package/dist/ordinal-B9aFWmF9.js +0 -1
  229. package/dist/packet-AYTQ26CC-CorIy9Ul.js +0 -1
  230. package/dist/packet-AYTQ26CC-DWH8gXJK.mjs +0 -3
  231. package/dist/path-CnWkkRiY.mjs +0 -84
  232. package/dist/path-DIS6ck99.js +0 -1
  233. package/dist/pegDiagram-XKGWAZYB-Cdw6MeON.js +0 -1
  234. package/dist/pegDiagram-XKGWAZYB-uNfxRaq1.mjs +0 -94
  235. package/dist/pie-WAS4IAKB-Cn5eK-5P.mjs +0 -3
  236. package/dist/pie-WAS4IAKB-D84xrSoY.js +0 -1
  237. package/dist/pieDiagram-E7YTZNPT-Bd6mvpJw.js +0 -39
  238. package/dist/pieDiagram-E7YTZNPT-Cczo96a2.mjs +0 -203
  239. package/dist/quadrantDiagram-AXDQQJYC-BPfgvMsS.js +0 -7
  240. package/dist/quadrantDiagram-AXDQQJYC-eqRNtVRl.mjs +0 -2001
  241. package/dist/radar-RG4KPBEZ-DvkxGdO6.mjs +0 -3
  242. package/dist/radar-RG4KPBEZ-R2sQOLL9.js +0 -1
  243. package/dist/railroad-74A4TZTK-BOZIf6ts.js +0 -1
  244. package/dist/railroad-74A4TZTK-CrQzn8Nm.mjs +0 -3
  245. package/dist/railroad-abnf-HS5TGJTU-BZYetxLz.mjs +0 -3
  246. package/dist/railroad-abnf-HS5TGJTU-CXU1aC4B.js +0 -1
  247. package/dist/railroad-ebnf-LZEXJU2U-D29kI3YW.js +0 -1
  248. package/dist/railroad-ebnf-LZEXJU2U-qgzTOmN6.mjs +0 -3
  249. package/dist/railroad-peg-WCYAUIDC-Bjs9Ws3P.mjs +0 -3
  250. package/dist/railroad-peg-WCYAUIDC-CXviP0hz.js +0 -1
  251. package/dist/railroadDiagram-O6MQD6OU-58kvwt7H.mjs +0 -76
  252. package/dist/railroadDiagram-O6MQD6OU-CKY3uzTc.js +0 -1
  253. package/dist/requirementDiagram-BXWQKSXE-0hZ04Q6h.js +0 -84
  254. package/dist/requirementDiagram-BXWQKSXE-CS673B5n.mjs +0 -2224
  255. package/dist/rough.esm-ChRLLRha.js +0 -1
  256. package/dist/rough.esm-DXYGHN3m.mjs +0 -1361
  257. package/dist/sankeyDiagram-P5KCCOFB-D1D6HfAM.mjs +0 -972
  258. package/dist/sankeyDiagram-P5KCCOFB-ciJb9Zr8.js +0 -40
  259. package/dist/sequenceDiagram-WJ2MYXX4-BXEznuI6.js +0 -162
  260. package/dist/sequenceDiagram-WJ2MYXX4-CI1VT8AG.mjs +0 -4156
  261. package/dist/sizeCapture-INFHLROL-BihkCH-7.js +0 -1
  262. package/dist/sizeCapture-INFHLROL-BmxqyOLj.mjs +0 -46
  263. package/dist/src-B4mN2BMl.js +0 -1
  264. package/dist/src-D_hsMyeP.mjs +0 -2154
  265. package/dist/stateDiagram-D77RDMKH-BQrSs72W.mjs +0 -220
  266. package/dist/stateDiagram-D77RDMKH-D2PtkW2U.js +0 -1
  267. package/dist/stateDiagram-v2-MP3YSRHH-CCbvNfk-.mjs +0 -30
  268. package/dist/stateDiagram-v2-MP3YSRHH-Dq1QuPeN.js +0 -1
  269. package/dist/swimlanes-42K2YHIH-CA316NPm.mjs +0 -4979
  270. package/dist/swimlanes-42K2YHIH-DlggBCTy.js +0 -1
  271. package/dist/swimlanesDiagram-VR7AAH4N-BV9PEIoG.js +0 -8
  272. package/dist/swimlanesDiagram-VR7AAH4N-BfrOCfdf.mjs +0 -31
  273. package/dist/timeline-definition-24CTP7MA-Bkd8rWNJ.js +0 -120
  274. package/dist/timeline-definition-24CTP7MA-BvkqNYt1.mjs +0 -1069
  275. package/dist/treeView-Q6P3EWNA-Aof3Cp1M.mjs +0 -3
  276. package/dist/treeView-Q6P3EWNA-BTzvdwbb.js +0 -1
  277. package/dist/treemap-WGGIJYW6-BNXGg99p.mjs +0 -3
  278. package/dist/treemap-WGGIJYW6-DfR4P2Hh.js +0 -1
  279. package/dist/types/runtime/app.d.ts +0 -9
  280. package/dist/types/runtime/components/AppearanceMenu.d.ts +0 -2
  281. package/dist/types/runtime/components/Builtins.d.ts +0 -44
  282. package/dist/types/runtime/components/Content.d.ts +0 -2
  283. package/dist/types/runtime/components/DmdRegistry.d.ts +0 -19
  284. package/dist/types/runtime/components/Layout.d.ts +0 -2
  285. package/dist/types/runtime/components/MermaidDiagram.d.ts +0 -16
  286. package/dist/types/runtime/components/Navbar.d.ts +0 -2
  287. package/dist/types/runtime/components/OfflineDownloadButton.d.ts +0 -2
  288. package/dist/types/runtime/components/OfflineNotice.d.ts +0 -6
  289. package/dist/types/runtime/components/Sidebar.d.ts +0 -2
  290. package/dist/types/runtime/components/TableOfContents.d.ts +0 -8
  291. package/dist/types/runtime/index.d.ts +0 -8
  292. package/dist/types/runtime/markdown/renderer.d.ts +0 -7
  293. package/dist/types/runtime/provider/DocProvider.d.ts +0 -40
  294. package/dist/types/runtime/provider/ThemeProvider.d.ts +0 -25
  295. package/dist/types/runtime/search/SearchModal.d.ts +0 -11
  296. package/dist/vennDiagram-4TSXK5OY-BOUFXjso.js +0 -34
  297. package/dist/vennDiagram-4TSXK5OY-CeOg3-hU.mjs +0 -1880
  298. package/dist/wardley-WFR3VGLG-BOYcSLd1.mjs +0 -3
  299. package/dist/wardley-WFR3VGLG-DWDqJSgm.js +0 -1
  300. package/dist/wardleyDiagram-VM6X3IG4-BhWgMjFr.js +0 -78
  301. package/dist/wardleyDiagram-VM6X3IG4-C31KoRmF.mjs +0 -645
  302. package/dist/xychartDiagram-S5SC5T6Z-1yU8zz6I.js +0 -7
  303. package/dist/xychartDiagram-S5SC5T6Z-BK7upFom.mjs +0 -2210
  304. package/templates/.dmd/components.js +0 -25
@@ -1,214 +0,0 @@
1
- import { m as e } from "./src-D_hsMyeP.mjs";
2
- import { n as t } from "./chunk-Y2CYZVJY-i11wjrBe.mjs";
3
- import { D as n, H as r, K as i, U as a, a as o, b as s, c, f as l, v as u, w as d, y as f } from "./chunk-DU6HZSFF-BEQZSmUu.mjs";
4
- import { i as p } from "./chunk-75Z2AOVW-Dz0Sko9Y.mjs";
5
- import { t as m } from "./chunk-CLGD4ZFX-DBkwyMMv.mjs";
6
- import { n as h } from "./mermaid-parser.core-BRHibdUE.mjs";
7
- import { t as g } from "./chunk-JWPE2WC7-DIKiF5cm.mjs";
8
- //#region node_modules/mermaid/dist/chunks/mermaid.core/diagram-UQ7AKVKN.mjs
9
- var _ = {
10
- showLegend: !0,
11
- ticks: 5,
12
- max: null,
13
- min: 0,
14
- graticule: "circle"
15
- }, v = 32, y = {
16
- axes: [],
17
- curves: [],
18
- options: _
19
- }, b = structuredClone(y), x = l.radar, S = /* @__PURE__ */ t(() => p({
20
- ...x,
21
- ...s().radar
22
- }), "getConfig"), C = /* @__PURE__ */ t(() => b.axes, "getAxes"), w = /* @__PURE__ */ t(() => b.curves, "getCurves"), T = /* @__PURE__ */ t(() => b.options, "getOptions"), E = /* @__PURE__ */ t((e) => {
23
- b.axes = e.map((e) => ({
24
- name: e.name,
25
- label: e.label ?? e.name
26
- }));
27
- }, "setAxes"), D = /* @__PURE__ */ t((e) => {
28
- b.curves = e.map((e) => ({
29
- name: e.name,
30
- label: e.label ?? e.name,
31
- entries: O(e.entries)
32
- }));
33
- }, "setCurves"), O = /* @__PURE__ */ t((e) => {
34
- if (e[0].axis == null) return e.map((e) => e.value);
35
- let t = C();
36
- if (t.length === 0) throw Error("Axes must be populated before curves for reference entries");
37
- return t.map((t) => {
38
- let n = e.find((e) => e.axis?.$refText === t.name);
39
- if (n === void 0) throw Error("Missing entry for axis " + t.label);
40
- return n.value;
41
- });
42
- }, "computeCurveEntries"), k = {
43
- getAxes: C,
44
- getCurves: w,
45
- getOptions: T,
46
- setAxes: E,
47
- setCurves: D,
48
- setOptions: /* @__PURE__ */ t((t) => {
49
- let n = t.reduce((e, t) => (e[t.name] = t, e), {});
50
- b.options = {
51
- showLegend: n.showLegend?.value ?? _.showLegend,
52
- ticks: n.ticks?.value ?? _.ticks,
53
- max: n.max?.value ?? _.max,
54
- min: n.min?.value ?? _.min,
55
- graticule: n.graticule?.value ?? _.graticule
56
- }, b.options.ticks > v && (e.warn(`Radar diagram ticks (${b.options.ticks}) exceeds maximum allowed (${v}). Using ${v} instead.`), b.options.ticks = v);
57
- }, "setOptions"),
58
- getConfig: S,
59
- clear: /* @__PURE__ */ t(() => {
60
- o(), b = structuredClone(y);
61
- }, "clear"),
62
- setAccTitle: a,
63
- getAccTitle: f,
64
- setDiagramTitle: i,
65
- getDiagramTitle: d,
66
- getAccDescription: u,
67
- setAccDescription: r
68
- }, A = /* @__PURE__ */ t((e) => {
69
- g(e, k);
70
- let { axes: t, curves: n, options: r } = e;
71
- k.setAxes(t), k.setCurves(n), k.setOptions(r);
72
- }, "populate"), j = { parse: /* @__PURE__ */ t(async (t) => {
73
- let n = await h("radar", t);
74
- e.debug(n), A(n);
75
- }, "parse") }, M = /* @__PURE__ */ t((e, t, n, r) => {
76
- let i = r.db, a = i.getAxes(), o = i.getCurves(), s = i.getOptions(), c = i.getConfig(), l = i.getDiagramTitle(), u = N(m(t), c), d = s.max ?? Math.max(...o.map((e) => Math.max(...e.entries))), f = s.min, p = Math.min(c.width, c.height) / 2;
77
- P(u, a, p, s.ticks, s.graticule), F(u, a, p, c), I(u, a, o, f, d, s.graticule, c), z(u, o, s.showLegend, c), u.append("text").attr("class", "radarTitle").text(l).attr("x", 0).attr("y", -c.height / 2 - c.marginTop);
78
- }, "draw"), N = /* @__PURE__ */ t((e, t) => {
79
- let n = t.width + t.marginLeft + t.marginRight, r = t.height + t.marginTop + t.marginBottom, i = {
80
- x: t.marginLeft + t.width / 2,
81
- y: t.marginTop + t.height / 2
82
- };
83
- return c(e, r, n, t.useMaxWidth ?? !0), e.attr("viewBox", `0 0 ${n} ${r}`).attr("overflow", "visible"), e.append("g").attr("transform", `translate(${i.x}, ${i.y})`);
84
- }, "drawFrame"), P = /* @__PURE__ */ t((e, t, n, r, i) => {
85
- if (i === "circle") for (let t = 0; t < r; t++) {
86
- let i = n * (t + 1) / r;
87
- e.append("circle").attr("r", i).attr("class", "radarGraticule");
88
- }
89
- else if (i === "polygon") {
90
- let i = t.length;
91
- for (let a = 0; a < r; a++) {
92
- let o = n * (a + 1) / r, s = t.map((e, t) => {
93
- let n = 2 * t * Math.PI / i - Math.PI / 2;
94
- return `${o * Math.cos(n)},${o * Math.sin(n)}`;
95
- }).join(" ");
96
- e.append("polygon").attr("points", s).attr("class", "radarGraticule");
97
- }
98
- }
99
- }, "drawGraticule"), F = /* @__PURE__ */ t((e, t, n, r) => {
100
- let i = t.length;
101
- for (let a = 0; a < i; a++) {
102
- let o = t[a].label, s = 2 * a * Math.PI / i - Math.PI / 2, c = Math.cos(s), l = Math.sin(s);
103
- e.append("line").attr("x1", 0).attr("y1", 0).attr("x2", n * r.axisScaleFactor * c).attr("y2", n * r.axisScaleFactor * l).attr("class", "radarAxisLine");
104
- let u = c > .01 ? "start" : c < -.01 ? "end" : "middle", d = l > .01 ? "hanging" : l < -.01 ? "auto" : "central";
105
- e.append("text").text(o).attr("x", n * r.axisLabelFactor * c + 4 * c).attr("y", n * r.axisLabelFactor * l + 4 * l).attr("text-anchor", u).attr("dominant-baseline", d).attr("class", "radarAxisLabel");
106
- }
107
- }, "drawAxes");
108
- function I(e, t, n, r, i, a, o) {
109
- let s = t.length, c = Math.min(o.width, o.height) / 2;
110
- n.forEach((t, n) => {
111
- if (t.entries.length !== s) return;
112
- let l = t.entries.map((e, t) => {
113
- let n = 2 * Math.PI * t / s - Math.PI / 2, a = L(e, r, i, c);
114
- return {
115
- x: a * Math.cos(n),
116
- y: a * Math.sin(n)
117
- };
118
- });
119
- a === "circle" ? e.append("path").attr("d", R(l, o.curveTension)).attr("class", `radarCurve-${n}`) : a === "polygon" && e.append("polygon").attr("points", l.map((e) => `${e.x},${e.y}`).join(" ")).attr("class", `radarCurve-${n}`);
120
- });
121
- }
122
- t(I, "drawCurves");
123
- function L(e, t, n, r) {
124
- return r * (Math.min(Math.max(e, t), n) - t) / (n - t);
125
- }
126
- t(L, "relativeRadius");
127
- function R(e, t) {
128
- let n = e.length, r = `M${e[0].x},${e[0].y}`;
129
- for (let i = 0; i < n; i++) {
130
- let a = e[(i - 1 + n) % n], o = e[i], s = e[(i + 1) % n], c = e[(i + 2) % n], l = {
131
- x: o.x + (s.x - a.x) * t,
132
- y: o.y + (s.y - a.y) * t
133
- }, u = {
134
- x: s.x - (c.x - o.x) * t,
135
- y: s.y - (c.y - o.y) * t
136
- };
137
- r += ` C${l.x},${l.y} ${u.x},${u.y} ${s.x},${s.y}`;
138
- }
139
- return `${r} Z`;
140
- }
141
- t(R, "closedRoundCurve");
142
- function z(e, t, n, r) {
143
- if (!n) return;
144
- let i = (r.width / 2 + r.marginRight) * 3 / 4, a = -(r.height / 2 + r.marginTop) * 3 / 4;
145
- t.forEach((t, n) => {
146
- let r = e.append("g").attr("transform", `translate(${i}, ${a + n * 20})`);
147
- r.append("rect").attr("width", 12).attr("height", 12).attr("class", `radarLegendBox-${n}`), r.append("text").attr("x", 16).attr("y", 0).attr("class", "radarLegendText").text(t.label);
148
- });
149
- }
150
- t(z, "drawLegend");
151
- var B = { draw: M }, V = /* @__PURE__ */ t((e, t) => {
152
- let n = "";
153
- for (let r = 0; r < e.THEME_COLOR_LIMIT; r++) {
154
- let i = e[`cScale${r}`];
155
- n += `
156
- .radarCurve-${r} {
157
- color: ${i};
158
- fill: ${i};
159
- fill-opacity: ${t.curveOpacity};
160
- stroke: ${i};
161
- stroke-width: ${t.curveStrokeWidth};
162
- }
163
- .radarLegendBox-${r} {
164
- fill: ${i};
165
- fill-opacity: ${t.curveOpacity};
166
- stroke: ${i};
167
- }
168
- `;
169
- }
170
- return n;
171
- }, "genIndexStyles"), H = /* @__PURE__ */ t((e) => {
172
- let t = n(), r = s(), i = p(t, r.themeVariables);
173
- return {
174
- themeVariables: i,
175
- radarOptions: p(i.radar, e)
176
- };
177
- }, "buildRadarStyleOptions"), U = {
178
- parser: j,
179
- db: k,
180
- renderer: B,
181
- styles: /* @__PURE__ */ t(({ radar: e } = {}) => {
182
- let { themeVariables: t, radarOptions: n } = H(e);
183
- return `
184
- .radarTitle {
185
- font-size: ${t.fontSize};
186
- color: ${t.titleColor};
187
- dominant-baseline: hanging;
188
- text-anchor: middle;
189
- }
190
- .radarAxisLine {
191
- stroke: ${n.axisColor};
192
- stroke-width: ${n.axisStrokeWidth};
193
- }
194
- .radarAxisLabel {
195
- font-size: ${n.axisLabelFontSize}px;
196
- color: ${n.axisColor};
197
- }
198
- .radarGraticule {
199
- fill: ${n.graticuleColor};
200
- fill-opacity: ${n.graticuleOpacity};
201
- stroke: ${n.graticuleColor};
202
- stroke-width: ${n.graticuleStrokeWidth};
203
- }
204
- .radarLegendText {
205
- text-anchor: start;
206
- font-size: ${n.legendFontSize}px;
207
- dominant-baseline: hanging;
208
- }
209
- ${V(t, n)}
210
- `;
211
- }, "styles")
212
- };
213
- //#endregion
214
- export { U as diagram };
@@ -1,3 +0,0 @@
1
- const e=require("./src-B4mN2BMl.js"),t=require("./chunk-Y2CYZVJY-CnmLqFtv.js"),n=require("./chunk-DU6HZSFF-CWc5ewtb.js"),r=require("./chunk-75Z2AOVW-DYouz5MZ.js"),i=require("./chunk-FOHPRMQF-tmTlwTeH.js"),a=require("./mermaid-parser.core-BBApyu_y.js"),o=require("./chunk-JWPE2WC7-p1fYVdYc.js");var s=`position frame`,c=`frame positioned`,l=`position relation`,u=`relation positioned`,d=t.n(function(t){e.m.debug(`options str`,t)},`setOptions`),f=t.n(function(){return{}},`getOptions`),p=t.n(function(){m(),n.a()},`clear`);function m(){_={}}t.n(m,`reset`);var h=n.f.eventmodeling,g=t.n(()=>r.i({...h,...n.b().eventmodeling}),`getConfig`),_={};function v(){let t=S,{ast:n}=_,r=x();if(!n)throw Error(`No data for EventModel`);return n.frames.forEach((i,a)=>{let o=k(i,n.dataEntities,r);t=G(t,{$kind:s,index:a,frame:i,textProps:o});let c;I(i)?(e.m.debug(`source frame`,i.sourceFrames),c=n.frames.filter(e=>i.sourceFrames.some(t=>t.$refText===e.name)),c.forEach(e=>{t=G(t,{$kind:l,index:a,frame:i,sourceFrame:e})})):t=G(t,{$kind:l,index:a,frame:i})}),t={...t,sortedSwimlanesArray:N(t.swimlanes)},t}t.n(v,`getState`);function y(e){_.ast=e}t.n(y,`setAst`);var b={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:`bold`,boxTextPadding:10,swimlaneTextFontWeight:`bold`,labelUiAutomation:`UI/Automation`,labelUiAutomationPrefix:`UI/A: `,labelCommandReadModel:`Command/Read Model`,labelCommandReadModelPrefix:`C/RM: `,labelEvents:`Events`,labelEventsPrefix:`Stream: `};function x(){return b}t.n(x,`getDiagramProps`);var S={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function C(e){let t=e.split(`.`);if(t.length===2)return t[0]}t.n(C,`extractNamespace`);function w(e){let t=e.split(`.`);return t.length===2?t[1]:e}t.n(w,`extractName`);function T(e,t){if(!(!t||t.length===0))return Object.values(e).find(e=>e.namespace===t)}t.n(T,`findSwimlaneByNamespace`);function E(e,t,n){return Math.max(t,...Object.keys(e).filter(e=>{let r=Number.parseInt(e);return r>t&&r<n}).map(e=>Number.parseInt(e)))+1}t.n(E,`findNextAvailableIndex`);function D(e,t){let n=C(e.entityIdentifier),r=T(t,n);switch(e.modelEntityType){case`ui`:case`pcr`:case`processor`:return r?{index:r.index,label:r.namespace||b.labelUiAutomation}:n?{index:E(t,0,100),label:b.labelUiAutomationPrefix+n}:{index:0,label:b.labelUiAutomation};case`rmo`:case`readmodel`:case`cmd`:case`command`:return r?{index:r.index,label:r.namespace||b.labelCommandReadModel}:n?{index:E(t,100,200),label:b.labelCommandReadModelPrefix+n}:{index:100,label:b.labelCommandReadModel};default:return r?{index:r.index,label:r.namespace||b.labelEvents}:n?{index:E(t,200,300),label:b.labelEventsPrefix+n}:{index:200,label:b.labelEvents}}}t.n(D,`calculateSwimlaneProps`);function O(e){let{themeVariables:t}=n.b();switch(e.modelEntityType){case`ui`:return{fill:t.emUiFill??`white`,stroke:t.emUiStroke??`#dbdada`};case`pcr`:case`processor`:return{fill:t.emProcessorFill??`#edb3f6`,stroke:t.emProcessorStroke??`#b88cbf`};case`rmo`:case`readmodel`:return{fill:t.emReadModelFill??`#d3f1a2`,stroke:t.emReadModelStroke??`#a3b732`};case`cmd`:case`command`:return{fill:t.emCommandFill??`#bcd6fe`,stroke:t.emCommandStroke??`#679ac3`};case`evt`:case`event`:return{fill:t.emEventFill??`#ffb778`,stroke:t.emEventStroke??`#c19a0f`};default:return{fill:`red`,stroke:`black`}}}t.n(O,`calculateEntityVisualProps`);function k(t,i,a){let o=n.b(),s=n.z(w(t.entityIdentifier)??``,o),c,l={fontSize:16,fontWeight:700,fontFamily:`"trebuchet ms", verdana, arial, sans-serif`,joinWith:`<br/>`},u=`<b>${r._(s,a.textMaxWidth,l)}</b>`;if(t.dataInlineValue&&(c=t.dataInlineValue,c=c.substring(c.indexOf(`{`)+1),c=c.substring(0,c.lastIndexOf(`}`)-1),c=n.z(c,o),c=r._(c,a.textMaxWidth,l),c=c.replaceAll(` `,`&nbsp;`)),t.dataReference){let e=i.find(e=>e.name===t.dataReference?.$refText);e&&(c=e.dataBlockValue,c=c.substring(c.indexOf(`{
2
- `)+2),c=c.substring(0,c.lastIndexOf(`}`)-1),c=n.z(c,o),c=r._(c,a.textMaxWidth,l),c=c.replaceAll(` `,`&nbsp;`),c+=`<br/>`)}let d=c!==void 0;d&&(u+=`<br/><br/><code style="text-align: left; display: block;max-width:${a.textMaxWidth}px">${c}</code>`);let f={fontSize:l.fontSize,fontWeight:l.fontWeight,fontFamily:l.fontFamily},p=r.t(u,f),m=d?p.width/3:p.width,h={content:u,width:m,height:p.height};return e.m.debug(`[${t.name}] ${t.entityIdentifier} text`,h),h}t.n(k,`calculateTextProps`);function A(e,t){let n=t,r=O(n.frame),i={width:n.textProps.width+2*b.boxTextPadding,height:n.textProps.height+2*b.boxTextPadding};return[{$kind:c,frame:n.frame,index:n.index,visual:r,dimension:i,textProps:n.textProps}]}t.n(A,`decidePositionFrame`);function j(e,t,n){return t===void 0?b.contentStartX:t.index===e.index&&e.r?e.r+b.boxPadding:n===void 0?b.contentStartX:n.r-b.boxOverlap+b.boxPadding}t.n(j,`calculateX`);function M(e,t){let n=[...e.map(e=>e.r),t];return Math.max(...n)}t.n(M,`calculateMaxRight`);function N(e){return Object.values(e).sort((e,t)=>e.index-t.index)}t.n(N,`sortedSwimlanesArray`);function P(e,t){let n=t,r=D(n.frame,e.swimlanes),i;i=r.index in e.swimlanes?e.swimlanes[r.index]:{index:r.index,label:r.label,r:0,y:r.index*b.swimlaneMinHeight+b.swimlaneGap,height:b.swimlaneMinHeight,maxHeight:b.swimlaneMinHeight};let a=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,o=e.previousSwimlaneNumber===void 0?void 0:e.swimlanes[e.previousSwimlaneNumber],s={width:Math.max(b.boxMinWidth,Math.min(b.boxMaxWidth,n.dimension.width))+2*b.boxPadding,height:Math.max(b.boxMinHeight,Math.min(b.boxMaxHeight,n.dimension.height))+2*b.boxPadding},c=j(i,o,a),l=c+s.width+b.boxPadding,u=M(Object.values(e.swimlanes),l);i.r=c+s.width,i.maxHeight=Math.max(i.maxHeight,s.height),i.height=Math.max(b.swimlaneMinHeight,i.maxHeight)+2*b.swimlanePadding;let d={x:c,y:b.swimlanePadding+i.y,r:l,dimension:s,leftSibling:!1,swimlane:i,visual:n.visual,text:n.textProps.content,frame:n.frame,index:n.index},f={...e,boxes:[...e.boxes,d],swimlanes:{...e.swimlanes,[`${i.index}`]:i},previousSwimlaneNumber:r.index,previousFrame:n.frame,maxR:u},p=N(f.swimlanes);p.length>0&&(p[0].y=0);for(let e=1;e<p.length;e++){let t=p[e],n=p[e-1];t.y=n.y+n.height+b.swimlaneGap}return f}t.n(P,`evolveFramePositioned`);function F(e,t){return e===0&&t.sourceFrames.length===0}t.n(F,`isFirstFrame`);function I(e){return e.sourceFrames!==void 0&&e.sourceFrames!==null&&e.sourceFrames.length>0}t.n(I,`hasSourceFrame`);function L(e,t){if(t!=null)return e.find(e=>e.frame.name===t.name)}t.n(L,`findBoxByFrame`);function R(e,t,n){if(!(n<0))for(let r=n;r>=0;r--){let n=e[r];if(n.swimlane.index!==t)return n}}t.n(R,`findBoxByLineIndex`);function z(e,t){let n=t;if(i.T(n.frame)||F(n.index,n.frame))return[];let r=L(e.boxes,n.frame);if(r===void 0)throw Error(`Target box not found for frame ${n.frame.name}`);let a;return a=n.sourceFrame?L(e.boxes,n.sourceFrame):R(e.boxes,r.swimlane.index,n.index-1),a===void 0?[]:[{$kind:u,frame:n.frame,index:n.index,sourceBox:a,targetBox:r}]}t.n(z,`decidePositionRelation`);function B(e,t){let n=t,r={visual:{fill:`none`,stroke:`#000`},source:{x:n.sourceBox.x,y:n.sourceBox.y},target:{x:n.targetBox.x,y:n.targetBox.y},sourceBox:n.sourceBox,targetBox:n.targetBox};return{...e,relations:[...e.relations,r]}}t.n(B,`evolveRelationPositioned`);var V={[s]:A,[l]:z},H={[c]:P,[u]:B};function U(t,n){let r=V[n.$kind];if(r==null)return[];let i=r(t,n);return e.m.debug(`decided events`,i),i}t.n(U,`decide`);function W(t,n){let r=n.reduce((e,t)=>{let n=H[t.$kind];return n==null?e:n(e,t)},t);return e.m.debug(`evolve events`,{state:t,newState:r,events:n}),r}t.n(W,`evolve`);function G(e,t){return W(e,U(e,t))}t.n(G,`dispatch`);var K={getConfig:g,setOptions:d,getOptions:f,clear:p,setAccTitle:n.U,getAccTitle:n.y,getAccDescription:n.v,setAccDescription:n.H,setDiagramTitle:n.K,getDiagramTitle:n.w,setAst:y,getDiagramProps:x,getState:v},q={parse:t.n(async t=>{let n=await a.n(`eventmodeling`,t);e.m.debug(n),K.setAst(n),o.t(n,K)},`parse`)},J=n.x()?.eventmodeling;function Y(e,t){return n=>{let r=n.swimlane.y+t.swimlanePadding,i=e.append(`g`).attr(`class`,`em-box`);i.append(`rect`).attr(`x`,n.x).attr(`y`,r).attr(`rx`,`3`).attr(`width`,n.dimension.width).attr(`height`,n.dimension.height).attr(`stroke`,n.visual.stroke).attr(`fill`,n.visual.fill),i.append(`foreignObject`).attr(`x`,n.x+t.boxPadding).attr(`y`,r+10).attr(`width`,n.dimension.width-2*t.boxPadding).attr(`height`,n.dimension.height-2*t.boxPadding).append(`xhtml:div`).style(`display`,`table`).style(`height`,`100%`).style(`width`,`100%`).append(`span`).style(`display`,`table-cell`).style(`text-align`,`center`).style(`vertical-align`,`middle`).html(n.text)}}t.n(Y,`renderD3Box`);function X(e,t){return e>t}t.n(X,`dirUpwards`);function Z(t,n,r,i){return a=>{let o=a.sourceBox.swimlane.y+n.swimlanePadding,s=a.targetBox.swimlane.y+n.swimlanePadding,c=X(o,s),l=a.sourceBox.x+a.sourceBox.dimension.width*2/3,u=a.targetBox.x+a.targetBox.dimension.width/3,d,f;e.m.debug(`rendering relation up=${c} for `,{sourceBox:a.sourceBox,targetBox:a.targetBox}),c?(d=o,f=s+a.targetBox.dimension.height):(d=o+a.sourceBox.dimension.height,f=s);let p=i.emRelationStroke??a.visual.stroke;t.append(`path`).attr(`class`,`em-relation`).attr(`fill`,a.visual.fill).attr(`stroke`,p).attr(`stroke-width`,`1`).attr(`marker-end`,`url(#${r})`).attr(`d`,`M${l} ${d} L${u} ${f}`)}}t.n(Z,`renderD3Relation`);function Q(e,t,n,r){return i=>{let a=e.append(`g`).attr(`class`,`em-swimlane`),o=r.emSwimlaneBackgroundOdd??`rgb(250,250,250)`,s=r.emSwimlaneBackgroundStroke??`rgb(240,240,240)`;a.append(`rect`).attr(`x`,0).attr(`y`,i.y).attr(`rx`,`3`).attr(`width`,t+n.swimlanePadding).attr(`height`,i.height).attr(`fill`,o).attr(`stroke`,s),a.append(`text`).attr(`font-weight`,n.swimlaneTextFontWeight).attr(`x`,30).attr(`y`,i.y+30).text(i.label)}}t.n(Q,`renderD3Swimlane`);var $={parser:q,db:K,renderer:{draw:t.n(function(t,r,i,a){if(e.m.debug(`in eventmodeling renderer`,t+`
3
- `,`id:`,r,i),!J)throw Error(`EventModeling config not found`);let o=a.db,{themeVariables:s,eventmodeling:c}=n.x(),l=e.p(`[id="${r}"]`),u=o.getDiagramProps(),d=o.getState(),f=`em-arrowhead-${r}`,p=s.emArrowhead??`#000000`;d.sortedSwimlanesArray.forEach(Q(l,d.maxR,u,s)),d.boxes.forEach(Y(l,u)),d.relations.forEach(Z(l,u,f,s)),l.append(`defs`).append(`marker`).attr(`id`,f).attr(`markerWidth`,`10`).attr(`markerHeight`,`7`).attr(`refX`,`10`).attr(`refY`,`3.5`).attr(`orient`,`auto`).append(`polygon`).attr(`points`,`0 0, 10 3.5, 0 7`).attr(`fill`,p),n.Y(void 0,l,c?.padding??30,c?.useMaxWidth)},`draw`)},styles:t.n(e=>``,`getStyles`)};exports.diagram=$;
@@ -1,432 +0,0 @@
1
- import { m as e, p as t } from "./src-D_hsMyeP.mjs";
2
- import { n } from "./chunk-Y2CYZVJY-i11wjrBe.mjs";
3
- import { H as r, K as i, U as a, Y as o, a as s, b as c, f as l, v as u, w as d, x as f, y as p, z as m } from "./chunk-DU6HZSFF-BEQZSmUu.mjs";
4
- import { _ as h, i as g, t as ee } from "./chunk-75Z2AOVW-Dz0Sko9Y.mjs";
5
- import { T as te } from "./chunk-FOHPRMQF-LRqOLsSw.mjs";
6
- import { n as ne } from "./mermaid-parser.core-BRHibdUE.mjs";
7
- import { t as re } from "./chunk-JWPE2WC7-DIKiF5cm.mjs";
8
- //#region node_modules/mermaid/dist/chunks/mermaid.core/diagram-VSXAHHWV.mjs
9
- var _ = "position frame", v = "frame positioned", y = "position relation", b = "relation positioned", ie = /* @__PURE__ */ n(function(t) {
10
- e.debug("options str", t);
11
- }, "setOptions"), ae = /* @__PURE__ */ n(function() {
12
- return {};
13
- }, "getOptions"), oe = /* @__PURE__ */ n(function() {
14
- x(), s();
15
- }, "clear");
16
- function x() {
17
- S = {};
18
- }
19
- n(x, "reset");
20
- var se = l.eventmodeling, ce = /* @__PURE__ */ n(() => g({
21
- ...se,
22
- ...c().eventmodeling
23
- }), "getConfig"), S = {};
24
- function C() {
25
- let t = le, { ast: n } = S, r = E();
26
- if (!n) throw Error("No data for EventModel");
27
- return n.frames.forEach((i, a) => {
28
- let o = N(i, n.dataEntities, r);
29
- t = q(t, {
30
- $kind: _,
31
- index: a,
32
- frame: i,
33
- textProps: o
34
- });
35
- let s;
36
- B(i) ? (e.debug("source frame", i.sourceFrames), s = n.frames.filter((e) => i.sourceFrames.some((t) => t.$refText === e.name)), s.forEach((e) => {
37
- t = q(t, {
38
- $kind: y,
39
- index: a,
40
- frame: i,
41
- sourceFrame: e
42
- });
43
- })) : t = q(t, {
44
- $kind: y,
45
- index: a,
46
- frame: i
47
- });
48
- }), t = {
49
- ...t,
50
- sortedSwimlanesArray: L(t.swimlanes)
51
- }, t;
52
- }
53
- n(C, "getState");
54
- function w(e) {
55
- S.ast = e;
56
- }
57
- n(w, "setAst");
58
- var T = {
59
- swimlaneMinHeight: 70,
60
- swimlanePadding: 15,
61
- swimlaneGap: 10,
62
- boxPadding: 10,
63
- boxOverlap: 90,
64
- boxDefaultY: 0,
65
- boxMinWidth: 80,
66
- boxMaxWidth: 450,
67
- boxMinHeight: 80,
68
- boxMaxHeight: 750,
69
- contentStartX: 250,
70
- textMaxWidth: 430,
71
- boxTextFontWeight: "bold",
72
- boxTextPadding: 10,
73
- swimlaneTextFontWeight: "bold",
74
- labelUiAutomation: "UI/Automation",
75
- labelUiAutomationPrefix: "UI/A: ",
76
- labelCommandReadModel: "Command/Read Model",
77
- labelCommandReadModelPrefix: "C/RM: ",
78
- labelEvents: "Events",
79
- labelEventsPrefix: "Stream: "
80
- };
81
- function E() {
82
- return T;
83
- }
84
- n(E, "getDiagramProps");
85
- var le = {
86
- boxes: [],
87
- swimlanes: {},
88
- relations: [],
89
- maxR: 0,
90
- sortedSwimlanesArray: []
91
- };
92
- function D(e) {
93
- let t = e.split(".");
94
- if (t.length === 2) return t[0];
95
- }
96
- n(D, "extractNamespace");
97
- function O(e) {
98
- let t = e.split(".");
99
- return t.length === 2 ? t[1] : e;
100
- }
101
- n(O, "extractName");
102
- function k(e, t) {
103
- if (!(!t || t.length === 0)) return Object.values(e).find((e) => e.namespace === t);
104
- }
105
- n(k, "findSwimlaneByNamespace");
106
- function A(e, t, n) {
107
- return Math.max(t, ...Object.keys(e).filter((e) => {
108
- let r = Number.parseInt(e);
109
- return r > t && r < n;
110
- }).map((e) => Number.parseInt(e))) + 1;
111
- }
112
- n(A, "findNextAvailableIndex");
113
- function j(e, t) {
114
- let n = D(e.entityIdentifier), r = k(t, n);
115
- switch (e.modelEntityType) {
116
- case "ui":
117
- case "pcr":
118
- case "processor": return r ? {
119
- index: r.index,
120
- label: r.namespace || T.labelUiAutomation
121
- } : n ? {
122
- index: A(t, 0, 100),
123
- label: T.labelUiAutomationPrefix + n
124
- } : {
125
- index: 0,
126
- label: T.labelUiAutomation
127
- };
128
- case "rmo":
129
- case "readmodel":
130
- case "cmd":
131
- case "command": return r ? {
132
- index: r.index,
133
- label: r.namespace || T.labelCommandReadModel
134
- } : n ? {
135
- index: A(t, 100, 200),
136
- label: T.labelCommandReadModelPrefix + n
137
- } : {
138
- index: 100,
139
- label: T.labelCommandReadModel
140
- };
141
- default: return r ? {
142
- index: r.index,
143
- label: r.namespace || T.labelEvents
144
- } : n ? {
145
- index: A(t, 200, 300),
146
- label: T.labelEventsPrefix + n
147
- } : {
148
- index: 200,
149
- label: T.labelEvents
150
- };
151
- }
152
- }
153
- n(j, "calculateSwimlaneProps");
154
- function M(e) {
155
- let { themeVariables: t } = c();
156
- switch (e.modelEntityType) {
157
- case "ui": return {
158
- fill: t.emUiFill ?? "white",
159
- stroke: t.emUiStroke ?? "#dbdada"
160
- };
161
- case "pcr":
162
- case "processor": return {
163
- fill: t.emProcessorFill ?? "#edb3f6",
164
- stroke: t.emProcessorStroke ?? "#b88cbf"
165
- };
166
- case "rmo":
167
- case "readmodel": return {
168
- fill: t.emReadModelFill ?? "#d3f1a2",
169
- stroke: t.emReadModelStroke ?? "#a3b732"
170
- };
171
- case "cmd":
172
- case "command": return {
173
- fill: t.emCommandFill ?? "#bcd6fe",
174
- stroke: t.emCommandStroke ?? "#679ac3"
175
- };
176
- case "evt":
177
- case "event": return {
178
- fill: t.emEventFill ?? "#ffb778",
179
- stroke: t.emEventStroke ?? "#c19a0f"
180
- };
181
- default: return {
182
- fill: "red",
183
- stroke: "black"
184
- };
185
- }
186
- }
187
- n(M, "calculateEntityVisualProps");
188
- function N(t, n, r) {
189
- let i = c(), a = m(O(t.entityIdentifier) ?? "", i), o, s = {
190
- fontSize: 16,
191
- fontWeight: 700,
192
- fontFamily: "\"trebuchet ms\", verdana, arial, sans-serif",
193
- joinWith: "<br/>"
194
- }, l = `<b>${h(a, r.textMaxWidth, s)}</b>`;
195
- if (t.dataInlineValue && (o = t.dataInlineValue, o = o.substring(o.indexOf("{") + 1), o = o.substring(0, o.lastIndexOf("}") - 1), o = m(o, i), o = h(o, r.textMaxWidth, s), o = o.replaceAll(" ", "&nbsp;")), t.dataReference) {
196
- let e = n.find((e) => e.name === t.dataReference?.$refText);
197
- e && (o = e.dataBlockValue, o = o.substring(o.indexOf("{\n") + 2), o = o.substring(0, o.lastIndexOf("}") - 1), o = m(o, i), o = h(o, r.textMaxWidth, s), o = o.replaceAll(" ", "&nbsp;"), o += "<br/>");
198
- }
199
- let u = o !== void 0;
200
- u && (l += `<br/><br/><code style="text-align: left; display: block;max-width:${r.textMaxWidth}px">${o}</code>`);
201
- let d = {
202
- fontSize: s.fontSize,
203
- fontWeight: s.fontWeight,
204
- fontFamily: s.fontFamily
205
- }, f = ee(l, d), p = u ? f.width / 3 : f.width, g = {
206
- content: l,
207
- width: p,
208
- height: f.height
209
- };
210
- return e.debug(`[${t.name}] ${t.entityIdentifier} text`, g), g;
211
- }
212
- n(N, "calculateTextProps");
213
- function P(e, t) {
214
- let n = t, r = M(n.frame), i = {
215
- width: n.textProps.width + 2 * T.boxTextPadding,
216
- height: n.textProps.height + 2 * T.boxTextPadding
217
- };
218
- return [{
219
- $kind: v,
220
- frame: n.frame,
221
- index: n.index,
222
- visual: r,
223
- dimension: i,
224
- textProps: n.textProps
225
- }];
226
- }
227
- n(P, "decidePositionFrame");
228
- function F(e, t, n) {
229
- return t === void 0 ? T.contentStartX : t.index === e.index && e.r ? e.r + T.boxPadding : n === void 0 ? T.contentStartX : n.r - T.boxOverlap + T.boxPadding;
230
- }
231
- n(F, "calculateX");
232
- function I(e, t) {
233
- let n = [...e.map((e) => e.r), t];
234
- return Math.max(...n);
235
- }
236
- n(I, "calculateMaxRight");
237
- function L(e) {
238
- return Object.values(e).sort((e, t) => e.index - t.index);
239
- }
240
- n(L, "sortedSwimlanesArray");
241
- function R(e, t) {
242
- let n = t, r = j(n.frame, e.swimlanes), i;
243
- i = r.index in e.swimlanes ? e.swimlanes[r.index] : {
244
- index: r.index,
245
- label: r.label,
246
- r: 0,
247
- y: r.index * T.swimlaneMinHeight + T.swimlaneGap,
248
- height: T.swimlaneMinHeight,
249
- maxHeight: T.swimlaneMinHeight
250
- };
251
- let a = e.boxes.length > 0 ? e.boxes[e.boxes.length - 1] : void 0, o = e.previousSwimlaneNumber === void 0 ? void 0 : e.swimlanes[e.previousSwimlaneNumber], s = {
252
- width: Math.max(T.boxMinWidth, Math.min(T.boxMaxWidth, n.dimension.width)) + 2 * T.boxPadding,
253
- height: Math.max(T.boxMinHeight, Math.min(T.boxMaxHeight, n.dimension.height)) + 2 * T.boxPadding
254
- }, c = F(i, o, a), l = c + s.width + T.boxPadding, u = I(Object.values(e.swimlanes), l);
255
- i.r = c + s.width, i.maxHeight = Math.max(i.maxHeight, s.height), i.height = Math.max(T.swimlaneMinHeight, i.maxHeight) + 2 * T.swimlanePadding;
256
- let d = {
257
- x: c,
258
- y: T.swimlanePadding + i.y,
259
- r: l,
260
- dimension: s,
261
- leftSibling: !1,
262
- swimlane: i,
263
- visual: n.visual,
264
- text: n.textProps.content,
265
- frame: n.frame,
266
- index: n.index
267
- }, f = {
268
- ...e,
269
- boxes: [...e.boxes, d],
270
- swimlanes: {
271
- ...e.swimlanes,
272
- [`${i.index}`]: i
273
- },
274
- previousSwimlaneNumber: r.index,
275
- previousFrame: n.frame,
276
- maxR: u
277
- }, p = L(f.swimlanes);
278
- p.length > 0 && (p[0].y = 0);
279
- for (let e = 1; e < p.length; e++) {
280
- let t = p[e], n = p[e - 1];
281
- t.y = n.y + n.height + T.swimlaneGap;
282
- }
283
- return f;
284
- }
285
- n(R, "evolveFramePositioned");
286
- function z(e, t) {
287
- return e === 0 && t.sourceFrames.length === 0;
288
- }
289
- n(z, "isFirstFrame");
290
- function B(e) {
291
- return e.sourceFrames !== void 0 && e.sourceFrames !== null && e.sourceFrames.length > 0;
292
- }
293
- n(B, "hasSourceFrame");
294
- function V(e, t) {
295
- if (t != null) return e.find((e) => e.frame.name === t.name);
296
- }
297
- n(V, "findBoxByFrame");
298
- function H(e, t, n) {
299
- if (!(n < 0)) for (let r = n; r >= 0; r--) {
300
- let n = e[r];
301
- if (n.swimlane.index !== t) return n;
302
- }
303
- }
304
- n(H, "findBoxByLineIndex");
305
- function U(e, t) {
306
- let n = t;
307
- if (te(n.frame) || z(n.index, n.frame)) return [];
308
- let r = V(e.boxes, n.frame);
309
- if (r === void 0) throw Error(`Target box not found for frame ${n.frame.name}`);
310
- let i;
311
- return i = n.sourceFrame ? V(e.boxes, n.sourceFrame) : H(e.boxes, r.swimlane.index, n.index - 1), i === void 0 ? [] : [{
312
- $kind: b,
313
- frame: n.frame,
314
- index: n.index,
315
- sourceBox: i,
316
- targetBox: r
317
- }];
318
- }
319
- n(U, "decidePositionRelation");
320
- function W(e, t) {
321
- let n = t, r = {
322
- visual: {
323
- fill: "none",
324
- stroke: "#000"
325
- },
326
- source: {
327
- x: n.sourceBox.x,
328
- y: n.sourceBox.y
329
- },
330
- target: {
331
- x: n.targetBox.x,
332
- y: n.targetBox.y
333
- },
334
- sourceBox: n.sourceBox,
335
- targetBox: n.targetBox
336
- };
337
- return {
338
- ...e,
339
- relations: [...e.relations, r]
340
- };
341
- }
342
- n(W, "evolveRelationPositioned");
343
- var ue = {
344
- [_]: P,
345
- [y]: U
346
- }, de = {
347
- [v]: R,
348
- [b]: W
349
- };
350
- function G(t, n) {
351
- let r = ue[n.$kind];
352
- if (r == null) return [];
353
- let i = r(t, n);
354
- return e.debug("decided events", i), i;
355
- }
356
- n(G, "decide");
357
- function K(t, n) {
358
- let r = n.reduce((e, t) => {
359
- let n = de[t.$kind];
360
- return n == null ? e : n(e, t);
361
- }, t);
362
- return e.debug("evolve events", {
363
- state: t,
364
- newState: r,
365
- events: n
366
- }), r;
367
- }
368
- n(K, "evolve");
369
- function q(e, t) {
370
- return K(e, G(e, t));
371
- }
372
- n(q, "dispatch");
373
- var J = {
374
- getConfig: ce,
375
- setOptions: ie,
376
- getOptions: ae,
377
- clear: oe,
378
- setAccTitle: a,
379
- getAccTitle: p,
380
- getAccDescription: u,
381
- setAccDescription: r,
382
- setDiagramTitle: i,
383
- getDiagramTitle: d,
384
- setAst: w,
385
- getDiagramProps: E,
386
- getState: C
387
- }, fe = { parse: /* @__PURE__ */ n(async (t) => {
388
- let n = await ne("eventmodeling", t);
389
- e.debug(n), J.setAst(n), re(n, J);
390
- }, "parse") }, Y = f()?.eventmodeling;
391
- function X(e, t) {
392
- return (n) => {
393
- let r = n.swimlane.y + t.swimlanePadding, i = e.append("g").attr("class", "em-box");
394
- i.append("rect").attr("x", n.x).attr("y", r).attr("rx", "3").attr("width", n.dimension.width).attr("height", n.dimension.height).attr("stroke", n.visual.stroke).attr("fill", n.visual.fill), i.append("foreignObject").attr("x", n.x + t.boxPadding).attr("y", r + 10).attr("width", n.dimension.width - 2 * t.boxPadding).attr("height", n.dimension.height - 2 * t.boxPadding).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%").append("span").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").html(n.text);
395
- };
396
- }
397
- n(X, "renderD3Box");
398
- function Z(e, t) {
399
- return e > t;
400
- }
401
- n(Z, "dirUpwards");
402
- function Q(t, n, r, i) {
403
- return (a) => {
404
- let o = a.sourceBox.swimlane.y + n.swimlanePadding, s = a.targetBox.swimlane.y + n.swimlanePadding, c = Z(o, s), l = a.sourceBox.x + a.sourceBox.dimension.width * 2 / 3, u = a.targetBox.x + a.targetBox.dimension.width / 3, d, f;
405
- e.debug(`rendering relation up=${c} for `, {
406
- sourceBox: a.sourceBox,
407
- targetBox: a.targetBox
408
- }), c ? (d = o, f = s + a.targetBox.dimension.height) : (d = o + a.sourceBox.dimension.height, f = s);
409
- let p = i.emRelationStroke ?? a.visual.stroke;
410
- t.append("path").attr("class", "em-relation").attr("fill", a.visual.fill).attr("stroke", p).attr("stroke-width", "1").attr("marker-end", `url(#${r})`).attr("d", `M${l} ${d} L${u} ${f}`);
411
- };
412
- }
413
- n(Q, "renderD3Relation");
414
- function $(e, t, n, r) {
415
- return (i) => {
416
- let a = e.append("g").attr("class", "em-swimlane"), o = r.emSwimlaneBackgroundOdd ?? "rgb(250,250,250)", s = r.emSwimlaneBackgroundStroke ?? "rgb(240,240,240)";
417
- a.append("rect").attr("x", 0).attr("y", i.y).attr("rx", "3").attr("width", t + n.swimlanePadding).attr("height", i.height).attr("fill", o).attr("stroke", s), a.append("text").attr("font-weight", n.swimlaneTextFontWeight).attr("x", 30).attr("y", i.y + 30).text(i.label);
418
- };
419
- }
420
- n($, "renderD3Swimlane");
421
- var pe = {
422
- parser: fe,
423
- db: J,
424
- renderer: { draw: /* @__PURE__ */ n(function(n, r, i, a) {
425
- if (e.debug("in eventmodeling renderer", n + "\n", "id:", r, i), !Y) throw Error("EventModeling config not found");
426
- let s = a.db, { themeVariables: c, eventmodeling: l } = f(), u = t(`[id="${r}"]`), d = s.getDiagramProps(), p = s.getState(), m = `em-arrowhead-${r}`, h = c.emArrowhead ?? "#000000";
427
- p.sortedSwimlanesArray.forEach($(u, p.maxR, d, c)), p.boxes.forEach(X(u, d)), p.relations.forEach(Q(u, d, m, c)), u.append("defs").append("marker").attr("id", m).attr("markerWidth", "10").attr("markerHeight", "7").attr("refX", "10").attr("refY", "3.5").attr("orient", "auto").append("polygon").attr("points", "0 0, 10 3.5, 0 7").attr("fill", h), o(void 0, u, l?.padding ?? 30, l?.useMaxWidth);
428
- }, "draw") },
429
- styles: /* @__PURE__ */ n((e) => "", "getStyles")
430
- };
431
- //#endregion
432
- export { pe as diagram };