@aiderdesk/aiderdesk 0.87.0 → 0.89.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 (223) hide show
  1. package/out/renderer/assets/2DXBBFLN-DhlZjS3f.js +666 -0
  2. package/out/renderer/assets/46IJ22JX-C1e8pvI2.js +853 -0
  3. package/out/renderer/assets/4TTDE5I4-Bea_IXhu.js +501 -0
  4. package/out/renderer/assets/4UF3HTLV-CVqcE2iq.js +29 -0
  5. package/out/renderer/assets/5THPTBWS-2mBFupjU.js +21 -0
  6. package/out/renderer/assets/7WLXJQOR-C8MM6Bra.js +23 -0
  7. package/out/renderer/assets/AAXQQPKT-BVbjBycX.js +1130 -0
  8. package/out/renderer/assets/AKE5O7KZ-Dr4O6i9X.js +184 -0
  9. package/out/renderer/assets/{AgentSettings-Cp7VI6CM.js → AgentSettings-ByYnHHTv.js} +710 -255
  10. package/out/renderer/assets/BNMLP6AG-CHDGj3j_.js +804 -0
  11. package/out/renderer/assets/DKTLEL5E-Dj3316cp.js +42 -0
  12. package/out/renderer/assets/DR6PKOQU-C6a3Tq7K.js +301 -0
  13. package/out/renderer/assets/E4RJ7UJB-BQWgl9gv.js +441 -0
  14. package/out/renderer/assets/ELSXBIJH-CVPK3kX4.js +39 -0
  15. package/out/renderer/assets/ERTIBQVS-71_Ru0iJ.js +182 -0
  16. package/out/renderer/assets/F653G4FO-Dj2Ang6n.js +1497 -0
  17. package/out/renderer/assets/FKCDD66M-DCrQTwBi.js +205 -0
  18. package/out/renderer/assets/FP7KDXVC-DKVnH-En.js +221 -0
  19. package/out/renderer/assets/FT5I3RHX-hlTJy7Nw.js +243 -0
  20. package/out/renderer/assets/FTXIJQGB-BX14b7pN.js +13 -0
  21. package/out/renderer/assets/G3MDBVQH-qZ3yfAIw.js +25 -0
  22. package/out/renderer/assets/GY35JXOZ-cSi0MdIc.js +168 -0
  23. package/out/renderer/assets/H5EEJPP2-bpYW0xE8.js +353 -0
  24. package/out/renderer/assets/HWDLEDTA-uLGgs5fE.js +982 -0
  25. package/out/renderer/assets/{InfoIcon-DesJ60KC.js → InfoIcon-DI4teJbi.js} +1 -1
  26. package/out/renderer/assets/JZWSX6AR-B0pkfB2b.js +67 -0
  27. package/out/renderer/assets/KQOEJWJY-EQFQbIDt.js +84 -0
  28. package/out/renderer/assets/KS3BB3KE-DclWHpbY.js +138 -0
  29. package/out/renderer/assets/KXJRRZHI-CHoCRoQ4.js +502 -0
  30. package/out/renderer/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  31. package/out/renderer/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  32. package/out/renderer/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  33. package/out/renderer/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  34. package/out/renderer/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  35. package/out/renderer/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  36. package/out/renderer/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  37. package/out/renderer/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  38. package/out/renderer/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  39. package/out/renderer/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  40. package/out/renderer/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  41. package/out/renderer/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  42. package/out/renderer/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  43. package/out/renderer/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  44. package/out/renderer/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  45. package/out/renderer/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  46. package/out/renderer/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  47. package/out/renderer/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  48. package/out/renderer/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  49. package/out/renderer/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  50. package/out/renderer/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  51. package/out/renderer/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  52. package/out/renderer/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  53. package/out/renderer/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  54. package/out/renderer/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  55. package/out/renderer/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  56. package/out/renderer/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  57. package/out/renderer/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  58. package/out/renderer/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  59. package/out/renderer/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  60. package/out/renderer/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  61. package/out/renderer/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  62. package/out/renderer/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  63. package/out/renderer/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  64. package/out/renderer/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  65. package/out/renderer/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  66. package/out/renderer/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  67. package/out/renderer/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  68. package/out/renderer/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  69. package/out/renderer/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  70. package/out/renderer/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  71. package/out/renderer/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  72. package/out/renderer/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  73. package/out/renderer/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  74. package/out/renderer/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  75. package/out/renderer/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  76. package/out/renderer/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  77. package/out/renderer/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  78. package/out/renderer/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  79. package/out/renderer/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  80. package/out/renderer/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  81. package/out/renderer/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  82. package/out/renderer/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  83. package/out/renderer/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  84. package/out/renderer/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  85. package/out/renderer/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  86. package/out/renderer/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  87. package/out/renderer/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  88. package/out/renderer/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  89. package/out/renderer/assets/MFVI5XKI-TmPyVySZ.js +10 -0
  90. package/out/renderer/assets/MWY2J62P-BlVjis68.js +1102 -0
  91. package/out/renderer/assets/MXGNCBL2-HvKcixVr.js +216 -0
  92. package/out/renderer/assets/N6DAJLIZ-B0JHSPS3.js +120 -0
  93. package/out/renderer/assets/NU5M23IW-CWgVJ5o_.js +116 -0
  94. package/out/renderer/assets/NV4XNBIS-uOSoaYKk.js +1221 -0
  95. package/out/renderer/assets/OGLU4SIR-CiNpshB1.js +289 -0
  96. package/out/renderer/assets/OUNS5N76-C6p0zhvm.js +1064 -0
  97. package/out/renderer/assets/{Onboarding-B2h7iatR.js → Onboarding-Ct6-CF4Z.js} +4 -4
  98. package/out/renderer/assets/PU4ISKXV-BQc-2oYa.js +515 -0
  99. package/out/renderer/assets/PUZGS23X-Bf89SCAj.js +21 -0
  100. package/out/renderer/assets/{ProviderHeader-BvigqAWX.js → ProviderHeader-Buje398H.js} +2 -2
  101. package/out/renderer/assets/Q3IYVLG5-DbP4qs2C.js +500 -0
  102. package/out/renderer/assets/QYHQDLKZ-dANs6SeT.js +983 -0
  103. package/out/renderer/assets/RVARI57O-DMrXgtoB.js +10 -0
  104. package/out/renderer/assets/RZSVICHU-CeuX_9H4.js +263 -0
  105. package/out/renderer/assets/{SettingsPage-CBonY1bv.js → SettingsPage-CLpPKXG1.js} +978 -848
  106. package/out/renderer/assets/UEXXS2NB-Bmbum3yG.js +25 -0
  107. package/out/renderer/assets/UHTQJXKL-C2OuiQBx.js +134 -0
  108. package/out/renderer/assets/URA2L2QI-DJ2BF8fn.js +201 -0
  109. package/out/renderer/assets/UXCHDUKG-B6wMZRAn.js +173 -0
  110. package/out/renderer/assets/{UsageDashboard-DFgckoeT.js → UsageDashboard-ORnsHGxF.js} +9130 -6449
  111. package/out/renderer/assets/VKNV3BUX-BMK4lviM.js +277 -0
  112. package/out/renderer/assets/VMV7XPHP-CzHnUaWh.js +127 -0
  113. package/out/renderer/assets/WEVWDWVA-BYWYeLxq.js +57 -0
  114. package/out/renderer/assets/XRRJ35LF-DaeQ2kbN.js +119 -0
  115. package/out/renderer/assets/YFKBLVVN-DsXlM7HO.js +990 -0
  116. package/out/renderer/assets/YHRE5QGZ-nB9z3NP1.js +697 -0
  117. package/out/renderer/assets/ZF3OVT4B-Ctn5OOBd.js +420 -0
  118. package/out/renderer/assets/{index-BFhJk8dv.js → index-BCaQe4ny.js} +2 -2
  119. package/out/renderer/assets/{index-Dk4pOCFt.js → index-BD-JYQGT.js} +5 -5
  120. package/out/renderer/assets/{index-bNFXvWqr.js → index-BGR4ZXWZ.js} +2 -2
  121. package/out/renderer/assets/{index-BP0q4HOE.js → index-BZBhErKV.js} +2 -2
  122. package/out/renderer/assets/{index-x_iC3w5N.js → index-BcWszklu.js} +1 -1
  123. package/out/renderer/assets/{index-C8TOzJWw.js → index-BpNNugm2.js} +4 -4
  124. package/out/renderer/assets/{index-uAJ0Zw9K.js → index-BrgyIQaN.js} +2 -2
  125. package/out/renderer/assets/{index-CuQvDzzr.js → index-Bt1dN7k_.js} +1 -1
  126. package/out/renderer/assets/{index-BZmjwrvJ.js → index-Bxu6rqm3.js} +1 -1
  127. package/out/renderer/assets/{index-tNlkrDYM.js → index-C6mXHxX3.js} +1 -1
  128. package/out/renderer/assets/{index-Z71oMk_m.js → index-CCbq90uE.js} +1 -1
  129. package/out/renderer/assets/{index-DE2koGci.js → index-CCm3UXZP.js} +2 -2
  130. package/out/renderer/assets/{index-DKNYbwcH.js → index-CNkiGtsK.js} +3 -3
  131. package/out/renderer/assets/{index-D_o1aMFn.css → index-CWfnJXNI.css} +130 -0
  132. package/out/renderer/assets/{index-47ZLfCU8.js → index-Cc-He418.js} +72999 -82151
  133. package/out/renderer/assets/{index-Dx6kKrXY.js → index-Crdzxx6k.js} +19 -15
  134. package/out/renderer/assets/{index-B_PkNLqT.js → index-D30k3y98.js} +1 -1
  135. package/out/renderer/assets/{index-CasrGDb0.js → index-DAWoHfjM.js} +2 -2
  136. package/out/renderer/assets/{index-D-rE7YVD.js → index-DG5AIC6J.js} +3 -3
  137. package/out/renderer/assets/{index-BzOM6AUj.js → index-DSBgCNMv.js} +2 -2
  138. package/out/renderer/assets/{index-C1I2Idqy.js → index-DeRKeskE.js} +5 -5
  139. package/out/renderer/assets/{index-Bh4xfAPL.js → index-DgQEgdew.js} +2 -2
  140. package/out/renderer/assets/{index-BKmr7UTW.js → index-Dgdp4i2K.js} +1 -1
  141. package/out/renderer/assets/{index-Bbv79qeB.js → index-DnNK6R2g.js} +2 -2
  142. package/out/renderer/assets/{index-CiIr--kg.js → index-DrNutodm.js} +2 -2
  143. package/out/renderer/assets/{index-B2jZTTYL.js → index-FS3mY8Ct.js} +1 -1
  144. package/out/renderer/assets/{index-DvSWnCZD.js → index-KId2jLzt.js} +2 -2
  145. package/out/renderer/assets/{index-DWZF-uSf.js → index-PyRCX6hq.js} +5 -5
  146. package/out/renderer/assets/{index-J-dLn6uq.js → index-U8nE80jx.js} +2 -2
  147. package/out/renderer/assets/{index-cO9XeYPQ.js → index-Vw8jKJU_.js} +5 -5
  148. package/out/renderer/assets/{index-B9bf5T9j.js → index-_a6zbU-0.js} +1 -1
  149. package/out/renderer/assets/{index-CenYyetH.js → index-dsqlqRSG.js} +5 -5
  150. package/out/renderer/assets/{index-D4dhIRp1.js → index-rQL1hwaP.js} +5 -5
  151. package/out/renderer/assets/{jsx-dev-runtime-CtvYhMha.js → jsx-dev-runtime-Bwt8d4vP.js} +1 -1
  152. package/out/renderer/index.html +2 -2
  153. package/out/resources/prompts/system-prompt.hbs +11 -0
  154. package/out/resources/skills/extension-creator/SKILL.md +20 -1
  155. package/out/resources/skills/extension-creator/references/event-types.md +5 -3
  156. package/out/resources/skills/extension-creator/references/extension-interface.md +62 -1
  157. package/out/resources/skills/extension-creator/references/external-agent-providers.md +90 -0
  158. package/out/runner.js +2016 -615
  159. package/package.json +3 -3
  160. package/out/renderer/assets/abnfDiagram-N423BO3Z-DV7pjob8.js +0 -118
  161. package/out/renderer/assets/arc-C2NyJjKR.js +0 -131
  162. package/out/renderer/assets/architectureDiagram-T3A2C74G-BmG8PHmc.js +0 -8829
  163. package/out/renderer/assets/band-zXq5o_Ib.js +0 -77
  164. package/out/renderer/assets/blockDiagram-VBNYF7ZC-CJndPtzf.js +0 -3824
  165. package/out/renderer/assets/c4Diagram-5PPSVZJV-B9DY2Hnr.js +0 -2482
  166. package/out/renderer/assets/channel-CCPkBLnh.js +0 -7
  167. package/out/renderer/assets/chunk-2GRJ4B5K-Bt46bDfT.js +0 -116
  168. package/out/renderer/assets/chunk-2Q5K7J3B-DkQwfKC2.js +0 -19
  169. package/out/renderer/assets/chunk-5RXB4S5H-CFNEWvlR.js +0 -1988
  170. package/out/renderer/assets/chunk-5VM5RSS4-BNeZg_6d.js +0 -19
  171. package/out/renderer/assets/chunk-6Q2QTUOP-BU5gT8Us.js +0 -860
  172. package/out/renderer/assets/chunk-GF5L2VYU-BNML5JwJ.js +0 -2026
  173. package/out/renderer/assets/chunk-JWPE2WC7-Dvih3ku3.js +0 -16
  174. package/out/renderer/assets/chunk-KBJHAD2P-CMgAbRkQ.js +0 -24
  175. package/out/renderer/assets/chunk-RYQCIY6F-CAJ6Qldz.js +0 -474
  176. package/out/renderer/assets/chunk-XXDRQBXY-BDZJ-WFV.js +0 -13
  177. package/out/renderer/assets/classDiagram-JCYQIIEL-BJCilkUQ.js +0 -23
  178. package/out/renderer/assets/classDiagram-v2-OCEON4UE-BJCilkUQ.js +0 -23
  179. package/out/renderer/assets/cose-bilkent-JH36ORCC-D6MsqBP5.js +0 -4942
  180. package/out/renderer/assets/cynefin-VYW2F7L2-3kPlVPG0.js +0 -32093
  181. package/out/renderer/assets/cynefinDiagram-MW4NZA55-6BlkJqWN.js +0 -453
  182. package/out/renderer/assets/cytoscape.esm-Bx_1tVW-.js +0 -30332
  183. package/out/renderer/assets/dagre-VZM6K2ZE-Chj1W0as.js +0 -522
  184. package/out/renderer/assets/defaultLocale-B2RvLBDe.js +0 -206
  185. package/out/renderer/assets/diagram-7IWD3JNH-CHFj7vIm.js +0 -488
  186. package/out/renderer/assets/diagram-B4RE2ZJO-BqOMO30m.js +0 -632
  187. package/out/renderer/assets/diagram-LBJQPF4R-CkiuQM5K.js +0 -212
  188. package/out/renderer/assets/diagram-Q27KOJAE-WVbpb4Iq.js +0 -857
  189. package/out/renderer/assets/diagram-UB23O5K3-B9Q0wQI3.js +0 -311
  190. package/out/renderer/assets/ebnfDiagram-BXEA7PRR-BUhf1ZxU.js +0 -138
  191. package/out/renderer/assets/erDiagram-JOGREHBK-DGxWkssI.js +0 -1238
  192. package/out/renderer/assets/flowDiagram-UKHOOZJN-D3ul5aGG.js +0 -2348
  193. package/out/renderer/assets/ganttDiagram-PKOTCBZU-BD3VbhAZ.js +0 -2782
  194. package/out/renderer/assets/gitGraphDiagram-DS77QQ5N-x-7NMw7v.js +0 -1373
  195. package/out/renderer/assets/graph-BDbmSegI.js +0 -1308
  196. package/out/renderer/assets/infoDiagram-6WML65LV-BMwbA6CU.js +0 -31
  197. package/out/renderer/assets/init-CTO7spbL.js +0 -35
  198. package/out/renderer/assets/ishikawaDiagram-WSZJBQD7-Bx90Gz0s.js +0 -967
  199. package/out/renderer/assets/journeyDiagram-NVQOT4AX-Dh4pUAU5.js +0 -1255
  200. package/out/renderer/assets/kanban-definition-27J2QSJJ-BZ_lX-ko.js +0 -1052
  201. package/out/renderer/assets/katex-oVG3DVWa.js +0 -14499
  202. package/out/renderer/assets/layout-oaOUFeBM.js +0 -2326
  203. package/out/renderer/assets/linear-B2eGZpM_.js +0 -361
  204. package/out/renderer/assets/map-BijQCI9U.js +0 -299
  205. package/out/renderer/assets/mindmap-definition-FAOFIHXS-BeWZh5qg.js +0 -1153
  206. package/out/renderer/assets/ordinal-BD3Y6v77.js +0 -77
  207. package/out/renderer/assets/pegDiagram-VL7TDLO6-BA6NzzN6.js +0 -126
  208. package/out/renderer/assets/pieDiagram-7S7Q4E2Y-KJmT5t-P.js +0 -316
  209. package/out/renderer/assets/quadrantDiagram-CIZ2JOQS-BdFz_bQU.js +0 -1343
  210. package/out/renderer/assets/railroadDiagram-AXF67PYL-CbH2ZZ1S.js +0 -92
  211. package/out/renderer/assets/requirementDiagram-LRYGKXZP-BZXG5Vgf.js +0 -1204
  212. package/out/renderer/assets/sankeyDiagram-W5VNT64P-CV1Upv22.js +0 -1274
  213. package/out/renderer/assets/sequenceDiagram-SI44F4Z6-Csbi3ivi.js +0 -4514
  214. package/out/renderer/assets/sizeCapture-X5ZJPWSS-CaN4k1d3.js +0 -62
  215. package/out/renderer/assets/stateDiagram-OKZ733FA-DSo1KeOQ.js +0 -452
  216. package/out/renderer/assets/stateDiagram-v2-UEYNNEHI-BhXw89HT.js +0 -22
  217. package/out/renderer/assets/swimlanes-SLNWSIFB-p3GZ-wkU.js +0 -8557
  218. package/out/renderer/assets/swimlanesDiagram-ULZ7WXOC-DGBdyiqy.js +0 -20
  219. package/out/renderer/assets/time-4LaKa9ym.js +0 -985
  220. package/out/renderer/assets/timeline-definition-Z64GVDOM-DfY8hG5p.js +0 -1596
  221. package/out/renderer/assets/vennDiagram-T6HMQDX7-wp87GaTi.js +0 -2515
  222. package/out/renderer/assets/wardleyDiagram-T6FBY63Y-DNrC2vOI.js +0 -975
  223. package/out/renderer/assets/xychartDiagram-ELKLHX3M-Bn8J2SKt.js +0 -1943
@@ -1,975 +0,0 @@
1
- import { p as populateCommonDb } from "./chunk-JWPE2WC7-Dvih3ku3.js";
2
- import { u as setAccDescription, v as getAccDescription, W as getDiagramTitle, V as setDiagramTitle, w as getAccTitle, x as setAccTitle, _ as __name, ao as getThemeVariables3, a3 as getConfig, a5 as cleanAndMerge, A as log, a8 as selectSvgElement, B as configureSvgSize, X as clear, y as getConfig2 } from "./index-47ZLfCU8.js";
3
- import { p as parse } from "./cynefin-VYW2F7L2-3kPlVPG0.js";
4
- var toPercent = /* @__PURE__ */ __name((value, context) => {
5
- const normalized = value <= 1 ? value * 100 : value;
6
- if (normalized < 0 || normalized > 100) {
7
- throw new Error(
8
- `${context} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${value}`
9
- );
10
- }
11
- return normalized;
12
- }, "toPercent");
13
- var toCoordinates = /* @__PURE__ */ __name((visibility, evolution, context) => {
14
- return {
15
- x: toPercent(evolution, `${context} evolution`),
16
- y: toPercent(visibility, `${context} visibility`)
17
- };
18
- }, "toCoordinates");
19
- var getFlowFromPort = /* @__PURE__ */ __name((port) => {
20
- if (!port) {
21
- return void 0;
22
- }
23
- if (port === "+<>") {
24
- return "bidirectional";
25
- }
26
- if (port === "+<") {
27
- return "backward";
28
- }
29
- if (port === "+>") {
30
- return "forward";
31
- }
32
- return void 0;
33
- }, "getFlowFromPort");
34
- var extractFlowFromArrow = /* @__PURE__ */ __name((arrow) => {
35
- if (!arrow?.startsWith("+")) {
36
- return {};
37
- }
38
- const labelMatch = /^\+'([^']*)'/.exec(arrow);
39
- const flowLabel = labelMatch?.[1];
40
- if (arrow.includes("<>")) {
41
- return { flow: "bidirectional", label: flowLabel };
42
- }
43
- if (arrow.includes("<")) {
44
- return { flow: "backward", label: flowLabel };
45
- }
46
- if (arrow.includes(">")) {
47
- return { flow: "forward", label: flowLabel };
48
- }
49
- return { label: flowLabel };
50
- }, "extractFlowFromArrow");
51
- var populateDb = /* @__PURE__ */ __name((ast, db) => {
52
- populateCommonDb(ast, db);
53
- if (ast.size) {
54
- db.setSize(ast.size.width, ast.size.height);
55
- }
56
- if (ast.evolution) {
57
- const stages = ast.evolution.stages.map((stage) => {
58
- if (stage.secondName) {
59
- return `${stage.name.trim()} / ${stage.secondName.trim()}`;
60
- }
61
- return stage.name.trim();
62
- });
63
- const stageBoundaries = ast.evolution.stages.filter((stage) => stage.boundary !== void 0).map((stage) => stage.boundary);
64
- db.updateAxes({ stages, stageBoundaries });
65
- }
66
- ast.anchors.forEach((anchor) => {
67
- const coords = toCoordinates(anchor.visibility, anchor.evolution, `Anchor "${anchor.name}"`);
68
- db.addNode(anchor.name, anchor.name, coords.x, coords.y, "anchor");
69
- });
70
- ast.components.forEach((component) => {
71
- const coords = toCoordinates(
72
- component.visibility,
73
- component.evolution,
74
- `Component "${component.name}"`
75
- );
76
- const labelOffsetX = component.label ? (component.label.negX ? -1 : 1) * component.label.offsetX : void 0;
77
- const labelOffsetY = component.label ? (component.label.negY ? -1 : 1) * component.label.offsetY : void 0;
78
- const sourceStrategy = component.decorator?.strategy;
79
- db.addNode(
80
- component.name,
81
- component.name,
82
- coords.x,
83
- coords.y,
84
- "component",
85
- labelOffsetX,
86
- labelOffsetY,
87
- component.inertia,
88
- sourceStrategy
89
- );
90
- });
91
- ast.notes.forEach((note) => {
92
- const coords = toCoordinates(note.visibility, note.evolution, `Note "${note.text}"`);
93
- db.addNote(note.text, coords.x, coords.y);
94
- });
95
- ast.pipelines.forEach((pipeline) => {
96
- const parentNode = db.getNode(pipeline.parent);
97
- if (!parentNode || typeof parentNode.y !== "number") {
98
- throw new Error(
99
- `Pipeline "${pipeline.parent}" must reference an existing component with coordinates.`
100
- );
101
- }
102
- const parentY = parentNode.y;
103
- db.startPipeline(pipeline.parent);
104
- pipeline.components.forEach((component) => {
105
- const componentId = `${pipeline.parent}_${component.name}`;
106
- const labelOffsetX = component.label ? (component.label.negX ? -1 : 1) * component.label.offsetX : void 0;
107
- const labelOffsetY = component.label ? (component.label.negY ? -1 : 1) * component.label.offsetY : void 0;
108
- const x = toPercent(component.evolution, `Pipeline component "${component.name}" evolution`);
109
- db.addNode(
110
- componentId,
111
- component.name,
112
- x,
113
- parentY,
114
- "pipeline-component",
115
- labelOffsetX,
116
- labelOffsetY
117
- );
118
- db.addPipelineComponent(pipeline.parent, componentId);
119
- });
120
- });
121
- ast.links.forEach((link) => {
122
- const isDashed = !!link.arrow && (link.arrow.includes("-.->") || link.arrow.includes(".-."));
123
- let flow = getFlowFromPort(link.fromPort) ?? getFlowFromPort(link.toPort);
124
- const { flow: arrowFlow, label: flowLabel } = extractFlowFromArrow(link.arrow);
125
- if (!flow && arrowFlow) {
126
- flow = arrowFlow;
127
- }
128
- const annotation = link.linkLabel;
129
- const label = flowLabel ?? annotation;
130
- db.addLink(db.resolveNodeId(link.from), db.resolveNodeId(link.to), isDashed, label, flow);
131
- });
132
- ast.evolves.forEach((evolve) => {
133
- const node = db.getNode(evolve.component);
134
- if (node?.y !== void 0) {
135
- const target = toPercent(evolve.target, `Evolve target for "${evolve.component}"`);
136
- db.addTrend(evolve.component, target, node.y);
137
- }
138
- });
139
- if (ast.annotations.length > 0) {
140
- const annotationsBox = ast.annotations[0];
141
- const coords = toCoordinates(annotationsBox.x, annotationsBox.y, "Annotations box");
142
- db.setAnnotationsBox(coords.x, coords.y);
143
- }
144
- ast.annotation.forEach((annotation) => {
145
- const coords = toCoordinates(annotation.x, annotation.y, `Annotation ${annotation.number}`);
146
- db.addAnnotation(annotation.number, [{ x: coords.x, y: coords.y }], annotation.text);
147
- });
148
- ast.accelerators.forEach((accelerator) => {
149
- const coords = toCoordinates(accelerator.x, accelerator.y, `Accelerator "${accelerator.name}"`);
150
- db.addAccelerator(accelerator.name, coords.x, coords.y);
151
- });
152
- ast.deaccelerators.forEach((deaccelerator) => {
153
- const coords = toCoordinates(
154
- deaccelerator.x,
155
- deaccelerator.y,
156
- `Deaccelerator "${deaccelerator.name}"`
157
- );
158
- db.addDeaccelerator(deaccelerator.name, coords.x, coords.y);
159
- });
160
- }, "populateDb");
161
- var parser = {
162
- parser: {
163
- // @ts-expect-error - WardleyDB is not assignable to DiagramDB
164
- yy: void 0
165
- },
166
- parse: /* @__PURE__ */ __name(async (input) => {
167
- const ast = await parse("wardley", input);
168
- log.debug(ast);
169
- const db = parser.parser?.yy;
170
- if (!db || typeof db.addNode !== "function") {
171
- throw new Error(
172
- "parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues."
173
- );
174
- }
175
- populateDb(ast, db);
176
- }, "parse")
177
- };
178
- var WardleyBuilder = class {
179
- constructor() {
180
- this.nodes = /* @__PURE__ */ new Map();
181
- this.links = [];
182
- this.trends = /* @__PURE__ */ new Map();
183
- this.pipelines = /* @__PURE__ */ new Map();
184
- this.annotations = [];
185
- this.notes = [];
186
- this.accelerators = [];
187
- this.deaccelerators = [];
188
- this.axes = {};
189
- }
190
- static {
191
- __name(this, "WardleyBuilder");
192
- }
193
- addNode(node) {
194
- const existing = this.nodes.get(node.id) ?? { id: node.id, label: node.label };
195
- const merged = {
196
- ...existing,
197
- ...node,
198
- className: node.className ?? existing.className,
199
- labelOffsetX: node.labelOffsetX ?? existing.labelOffsetX,
200
- labelOffsetY: node.labelOffsetY ?? existing.labelOffsetY
201
- };
202
- this.nodes.set(node.id, merged);
203
- }
204
- addLink(link) {
205
- this.links.push(link);
206
- }
207
- addTrend(trend) {
208
- this.trends.set(trend.nodeId, trend);
209
- }
210
- startPipeline(nodeId) {
211
- this.pipelines.set(nodeId, { nodeId, componentIds: [] });
212
- const node = this.nodes.get(nodeId);
213
- if (node) {
214
- node.isPipelineParent = true;
215
- }
216
- }
217
- addPipelineComponent(pipelineNodeId, componentId) {
218
- const pipeline = this.pipelines.get(pipelineNodeId);
219
- if (pipeline) {
220
- pipeline.componentIds.push(componentId);
221
- }
222
- const node = this.nodes.get(componentId);
223
- if (node) {
224
- node.inPipeline = true;
225
- }
226
- }
227
- addAnnotation(annotation) {
228
- this.annotations.push(annotation);
229
- }
230
- addNote(note) {
231
- this.notes.push(note);
232
- }
233
- addAccelerator(accelerator) {
234
- this.accelerators.push(accelerator);
235
- }
236
- addDeaccelerator(deaccelerator) {
237
- this.deaccelerators.push(deaccelerator);
238
- }
239
- setAnnotationsBox(x, y) {
240
- this.annotationsBox = { x, y };
241
- }
242
- setAxes(partial) {
243
- this.axes = {
244
- ...this.axes,
245
- ...partial
246
- };
247
- }
248
- setSize(width, height) {
249
- this.size = { width, height };
250
- }
251
- getNode(id) {
252
- return this.nodes.get(id);
253
- }
254
- /**
255
- * Resolve a name to a node ID. Tries exact ID match first,
256
- * then falls back to finding a node whose label matches the name
257
- * (handles pipeline components which have synthetic IDs like "Parent_Child").
258
- */
259
- resolveNodeId(name) {
260
- if (this.nodes.has(name)) {
261
- return name;
262
- }
263
- for (const [id, node] of this.nodes) {
264
- if (node.label === name) {
265
- return id;
266
- }
267
- }
268
- return name;
269
- }
270
- build() {
271
- const nodes = [];
272
- for (const node of this.nodes.values()) {
273
- if (typeof node.x !== "number" || typeof node.y !== "number") {
274
- throw new Error(`Node "${node.label}" is missing coordinates`);
275
- }
276
- nodes.push(node);
277
- }
278
- return {
279
- nodes,
280
- links: [...this.links],
281
- trends: [...this.trends.values()],
282
- pipelines: [...this.pipelines.values()],
283
- annotations: [...this.annotations],
284
- notes: [...this.notes],
285
- accelerators: [...this.accelerators],
286
- deaccelerators: [...this.deaccelerators],
287
- annotationsBox: this.annotationsBox,
288
- axes: { ...this.axes },
289
- size: this.size
290
- };
291
- }
292
- clear() {
293
- this.nodes.clear();
294
- this.links = [];
295
- this.trends.clear();
296
- this.pipelines.clear();
297
- this.annotations = [];
298
- this.notes = [];
299
- this.accelerators = [];
300
- this.deaccelerators = [];
301
- this.annotationsBox = void 0;
302
- this.axes = {};
303
- this.size = void 0;
304
- }
305
- };
306
- var builder = new WardleyBuilder();
307
- function getConfig3() {
308
- return getConfig2()["wardley-beta"];
309
- }
310
- __name(getConfig3, "getConfig");
311
- function addNode(id, label, x, y, className, labelOffsetX, labelOffsetY, inertia, sourceStrategy) {
312
- builder.addNode({
313
- id,
314
- label,
315
- x,
316
- y,
317
- className,
318
- labelOffsetX,
319
- labelOffsetY,
320
- inertia,
321
- sourceStrategy
322
- });
323
- }
324
- __name(addNode, "addNode");
325
- function addLink(sourceId, targetId, dashed = false, label, flow) {
326
- builder.addLink({
327
- source: sourceId,
328
- target: targetId,
329
- dashed,
330
- label,
331
- flow
332
- });
333
- }
334
- __name(addLink, "addLink");
335
- function addTrend(nodeId, targetX, targetY) {
336
- builder.addTrend({ nodeId, targetX, targetY });
337
- }
338
- __name(addTrend, "addTrend");
339
- function addAnnotation(number, coordinates, text) {
340
- builder.addAnnotation({
341
- number,
342
- coordinates,
343
- text
344
- });
345
- }
346
- __name(addAnnotation, "addAnnotation");
347
- function addNote(text, x, y) {
348
- builder.addNote({
349
- text,
350
- x,
351
- y
352
- });
353
- }
354
- __name(addNote, "addNote");
355
- function addAccelerator(name, x, y) {
356
- builder.addAccelerator({
357
- name,
358
- x,
359
- y
360
- });
361
- }
362
- __name(addAccelerator, "addAccelerator");
363
- function addDeaccelerator(name, x, y) {
364
- builder.addDeaccelerator({
365
- name,
366
- x,
367
- y
368
- });
369
- }
370
- __name(addDeaccelerator, "addDeaccelerator");
371
- function setAnnotationsBox(x, y) {
372
- builder.setAnnotationsBox(x, y);
373
- }
374
- __name(setAnnotationsBox, "setAnnotationsBox");
375
- function setSize(width, height) {
376
- builder.setSize(width, height);
377
- }
378
- __name(setSize, "setSize");
379
- function startPipeline(nodeId) {
380
- builder.startPipeline(nodeId);
381
- }
382
- __name(startPipeline, "startPipeline");
383
- function addPipelineComponent(pipelineNodeId, componentId) {
384
- builder.addPipelineComponent(pipelineNodeId, componentId);
385
- }
386
- __name(addPipelineComponent, "addPipelineComponent");
387
- function updateAxes(partial) {
388
- builder.setAxes(partial);
389
- }
390
- __name(updateAxes, "updateAxes");
391
- function getNode(id) {
392
- return builder.getNode(id);
393
- }
394
- __name(getNode, "getNode");
395
- function resolveNodeId(name) {
396
- return builder.resolveNodeId(name);
397
- }
398
- __name(resolveNodeId, "resolveNodeId");
399
- function getWardleyData() {
400
- return builder.build();
401
- }
402
- __name(getWardleyData, "getWardleyData");
403
- function clear2() {
404
- builder.clear();
405
- clear();
406
- }
407
- __name(clear2, "clear");
408
- var wardleyDb_default = {
409
- getConfig: getConfig3,
410
- addNode,
411
- addLink,
412
- addTrend,
413
- addAnnotation,
414
- addNote,
415
- addAccelerator,
416
- addDeaccelerator,
417
- setAnnotationsBox,
418
- setSize,
419
- startPipeline,
420
- addPipelineComponent,
421
- updateAxes,
422
- getNode,
423
- resolveNodeId,
424
- getWardleyData,
425
- clear: clear2,
426
- setAccTitle,
427
- getAccTitle,
428
- setDiagramTitle,
429
- getDiagramTitle,
430
- getAccDescription,
431
- setAccDescription
432
- };
433
- var DEFAULT_STAGES = ["Genesis", "Custom Built", "Product", "Commodity"];
434
- var getTheme = /* @__PURE__ */ __name(() => {
435
- const { themeVariables } = getConfig2();
436
- return {
437
- backgroundColor: themeVariables.wardley?.backgroundColor ?? themeVariables.background ?? "#fff",
438
- axisColor: themeVariables.wardley?.axisColor ?? "#000",
439
- axisTextColor: themeVariables.wardley?.axisTextColor ?? themeVariables.primaryTextColor ?? "#222",
440
- gridColor: themeVariables.wardley?.gridColor ?? "rgba(100, 100, 100, 0.2)",
441
- componentFill: themeVariables.wardley?.componentFill ?? "#fff",
442
- componentStroke: themeVariables.wardley?.componentStroke ?? "#000",
443
- componentLabelColor: themeVariables.wardley?.componentLabelColor ?? themeVariables.primaryTextColor ?? "#222",
444
- linkStroke: themeVariables.wardley?.linkStroke ?? "#000",
445
- evolutionStroke: themeVariables.wardley?.evolutionStroke ?? "#dc3545",
446
- annotationStroke: themeVariables.wardley?.annotationStroke ?? "#000",
447
- annotationTextColor: themeVariables.wardley?.annotationTextColor ?? themeVariables.primaryTextColor ?? "#222",
448
- annotationFill: themeVariables.wardley?.annotationFill ?? themeVariables.background ?? "#fff"
449
- };
450
- }, "getTheme");
451
- var getConfigValues = /* @__PURE__ */ __name(() => {
452
- const wardleyConfig = getConfig2()["wardley-beta"];
453
- return {
454
- width: wardleyConfig?.width ?? 900,
455
- height: wardleyConfig?.height ?? 600,
456
- padding: wardleyConfig?.padding ?? 48,
457
- nodeRadius: wardleyConfig?.nodeRadius ?? 6,
458
- nodeLabelOffset: wardleyConfig?.nodeLabelOffset ?? 8,
459
- axisFontSize: wardleyConfig?.axisFontSize ?? 12,
460
- labelFontSize: wardleyConfig?.labelFontSize ?? 10,
461
- showGrid: wardleyConfig?.showGrid ?? false,
462
- useMaxWidth: wardleyConfig?.useMaxWidth ?? true
463
- };
464
- }, "getConfigValues");
465
- var draw = /* @__PURE__ */ __name((text, id, _version, diagObj) => {
466
- log.debug("Rendering Wardley map\n" + text);
467
- const configValues = getConfigValues();
468
- const theme = getTheme();
469
- const squareSize = configValues.nodeRadius * 1.6;
470
- const db = diagObj.db;
471
- const data = db.getWardleyData();
472
- const title = db.getDiagramTitle();
473
- const width = data.size?.width ?? configValues.width;
474
- const height = data.size?.height ?? configValues.height;
475
- const svg = selectSvgElement(id);
476
- svg.selectAll("*").remove();
477
- configureSvgSize(svg, height, width, configValues.useMaxWidth);
478
- svg.attr("viewBox", `0 0 ${width} ${height}`);
479
- const root = svg.append("g").attr("class", "wardley-map");
480
- const defs = svg.append("defs");
481
- defs.append("marker").attr("id", `arrow-${id}`).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerWidth", 6).attr("markerHeight", 6).attr("orient", "auto-start-reverse").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("fill", theme.evolutionStroke).attr("stroke", "none");
482
- defs.append("marker").attr("id", `link-arrow-end-${id}`).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerWidth", 5).attr("markerHeight", 5).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("fill", theme.linkStroke).attr("stroke", "none");
483
- defs.append("marker").attr("id", `link-arrow-start-${id}`).attr("viewBox", "0 0 10 10").attr("refX", 1).attr("refY", 5).attr("markerWidth", 5).attr("markerHeight", 5).attr("orient", "auto").append("path").attr("d", "M 10 0 L 0 5 L 10 10 z").attr("fill", theme.linkStroke).attr("stroke", "none");
484
- root.append("rect").attr("class", "wardley-background").attr("width", width).attr("height", height).attr("fill", theme.backgroundColor);
485
- const chartWidth = width - configValues.padding * 2;
486
- const chartHeight = height - configValues.padding * 2;
487
- if (title) {
488
- root.append("text").attr("class", "wardley-title").attr("x", width / 2).attr("y", configValues.padding / 2).attr("fill", theme.axisTextColor).attr("font-size", configValues.axisFontSize * 1.05).attr("font-weight", "bold").attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(title);
489
- }
490
- const projectX = /* @__PURE__ */ __name((value) => configValues.padding + value / 100 * chartWidth, "projectX");
491
- const projectY = /* @__PURE__ */ __name((value) => height - configValues.padding - value / 100 * chartHeight, "projectY");
492
- const axisGroup = root.append("g").attr("class", "wardley-axes");
493
- axisGroup.append("line").attr("x1", configValues.padding).attr("x2", width - configValues.padding).attr("y1", height - configValues.padding).attr("y2", height - configValues.padding).attr("stroke", theme.axisColor).attr("stroke-width", 1);
494
- axisGroup.append("line").attr("x1", configValues.padding).attr("x2", configValues.padding).attr("y1", configValues.padding).attr("y2", height - configValues.padding).attr("stroke", theme.axisColor).attr("stroke-width", 1);
495
- const xLabel = data.axes.xLabel ?? "Evolution";
496
- const yLabel = data.axes.yLabel ?? "Visibility";
497
- axisGroup.append("text").attr("class", "wardley-axis-label wardley-axis-label-x").attr("x", configValues.padding + chartWidth / 2).attr("y", height - configValues.padding / 4).attr("fill", theme.axisTextColor).attr("font-size", configValues.axisFontSize).attr("font-weight", "bold").attr("text-anchor", "middle").text(xLabel);
498
- axisGroup.append("text").attr("class", "wardley-axis-label wardley-axis-label-y").attr("x", configValues.padding / 3).attr("y", configValues.padding + chartHeight / 2).attr("fill", theme.axisTextColor).attr("font-size", configValues.axisFontSize).attr("font-weight", "bold").attr("text-anchor", "middle").attr(
499
- "transform",
500
- `rotate(-90 ${configValues.padding / 3} ${configValues.padding + chartHeight / 2})`
501
- ).text(yLabel);
502
- const stages = data.axes.stages && data.axes.stages.length > 0 ? data.axes.stages : DEFAULT_STAGES;
503
- if (stages.length > 0) {
504
- const stageGroup = root.append("g").attr("class", "wardley-stages");
505
- const boundaries = data.axes.stageBoundaries;
506
- const stagePositions = [];
507
- if (boundaries && boundaries.length === stages.length) {
508
- let prevBoundary = 0;
509
- boundaries.forEach((boundary) => {
510
- stagePositions.push({ start: prevBoundary, end: boundary });
511
- prevBoundary = boundary;
512
- });
513
- } else {
514
- const stageWidth = 1 / stages.length;
515
- stages.forEach((_, index) => {
516
- stagePositions.push({
517
- start: index * stageWidth,
518
- end: (index + 1) * stageWidth
519
- });
520
- });
521
- }
522
- stages.forEach((stage, index) => {
523
- const pos = stagePositions[index];
524
- const startX = configValues.padding + pos.start * chartWidth;
525
- const endX = configValues.padding + pos.end * chartWidth;
526
- const centerX = (startX + endX) / 2;
527
- if (index > 0) {
528
- stageGroup.append("line").attr("x1", startX).attr("x2", startX).attr("y1", configValues.padding).attr("y2", height - configValues.padding).attr("stroke", "#000").attr("stroke-width", 1).attr("stroke-dasharray", "5 5").attr("opacity", 0.8);
529
- }
530
- stageGroup.append("text").attr("class", "wardley-stage-label").attr("x", centerX).attr("y", height - configValues.padding / 1.5).attr("fill", theme.axisTextColor).attr("font-size", configValues.axisFontSize - 2).attr("text-anchor", "middle").text(stage);
531
- });
532
- }
533
- if (configValues.showGrid) {
534
- const gridGroup = root.append("g").attr("class", "wardley-grid");
535
- for (let i = 1; i < 4; i++) {
536
- const ratio = i / 4;
537
- const x = configValues.padding + chartWidth * ratio;
538
- gridGroup.append("line").attr("x1", x).attr("x2", x).attr("y1", configValues.padding).attr("y2", height - configValues.padding).attr("stroke", theme.gridColor).attr("stroke-dasharray", "2 6");
539
- gridGroup.append("line").attr("x1", configValues.padding).attr("x2", width - configValues.padding).attr("y1", height - configValues.padding - chartHeight * ratio).attr("y2", height - configValues.padding - chartHeight * ratio).attr("stroke", theme.gridColor).attr("stroke-dasharray", "2 6");
540
- }
541
- }
542
- const positions = /* @__PURE__ */ new Map();
543
- data.nodes.forEach((node) => {
544
- positions.set(node.id, {
545
- x: projectX(node.x),
546
- y: projectY(node.y),
547
- node
548
- });
549
- });
550
- if (data.pipelines.length > 0) {
551
- const pipelineGroup = root.append("g").attr("class", "wardley-pipelines");
552
- const pipelineLinksGroup = root.append("g").attr("class", "wardley-pipeline-links");
553
- data.pipelines.forEach((pipeline) => {
554
- if (pipeline.componentIds.length === 0) {
555
- return;
556
- }
557
- const sortedComponents = pipeline.componentIds.map((id2) => ({ id: id2, pos: positions.get(id2), node: data.nodes.find((n) => n.id === id2) })).filter((c) => c.pos && c.node).sort((a, b) => a.node.x - b.node.x);
558
- for (let i = 0; i < sortedComponents.length - 1; i++) {
559
- const current = sortedComponents[i];
560
- const next = sortedComponents[i + 1];
561
- pipelineLinksGroup.append("line").attr("class", "wardley-pipeline-evolution-link").attr("x1", current.pos.x).attr("y1", current.pos.y).attr("x2", next.pos.x).attr("y2", next.pos.y).attr("stroke", theme.linkStroke).attr("stroke-width", 1).attr("stroke-dasharray", "4 4");
562
- }
563
- let minX = Infinity;
564
- let maxX = -Infinity;
565
- let y = 0;
566
- pipeline.componentIds.forEach((componentId) => {
567
- const pos = positions.get(componentId);
568
- if (pos) {
569
- minX = Math.min(minX, pos.x);
570
- maxX = Math.max(maxX, pos.x);
571
- y = pos.y;
572
- }
573
- });
574
- if (minX !== Infinity && maxX !== -Infinity) {
575
- const padding = 15;
576
- const height2 = configValues.nodeRadius * 4;
577
- const boxTop = y - height2 / 2;
578
- const parentPos = positions.get(pipeline.nodeId);
579
- if (parentPos) {
580
- const centerX = (minX + maxX) / 2;
581
- parentPos.x = centerX;
582
- parentPos.y = boxTop - squareSize / 6;
583
- }
584
- pipelineGroup.append("rect").attr("class", "wardley-pipeline-box").attr("x", minX - padding).attr("y", boxTop).attr("width", maxX - minX + padding * 2).attr("height", height2).attr("fill", "none").attr("stroke", theme.axisColor).attr("stroke-width", 1.5).attr("rx", 4).attr("ry", 4);
585
- }
586
- });
587
- }
588
- const linksGroup = root.append("g").attr("class", "wardley-links");
589
- const pipelineMap = /* @__PURE__ */ new Map();
590
- data.pipelines.forEach((pipeline) => {
591
- pipelineMap.set(pipeline.nodeId, new Set(pipeline.componentIds));
592
- });
593
- const validLinks = data.links.filter((link) => {
594
- if (!positions.has(link.source) || !positions.has(link.target)) {
595
- return false;
596
- }
597
- const pipelineComponents = pipelineMap.get(link.target);
598
- if (pipelineComponents?.has(link.source)) {
599
- return false;
600
- }
601
- return true;
602
- });
603
- linksGroup.selectAll("line").data(validLinks).enter().append("line").attr("class", (link) => `wardley-link${link.dashed ? " wardley-link--dashed" : ""}`).attr("x1", (link) => {
604
- const sourcePos = positions.get(link.source);
605
- const targetPos = positions.get(link.target);
606
- const sourceNode = data.nodes.find((n) => n.id === link.source);
607
- const radius = sourceNode.isPipelineParent ? squareSize / Math.sqrt(2) : configValues.nodeRadius;
608
- const dx = targetPos.x - sourcePos.x;
609
- const dy = targetPos.y - sourcePos.y;
610
- const distance = Math.sqrt(dx * dx + dy * dy);
611
- return sourcePos.x + dx / distance * radius;
612
- }).attr("y1", (link) => {
613
- const sourcePos = positions.get(link.source);
614
- const targetPos = positions.get(link.target);
615
- const sourceNode = data.nodes.find((n) => n.id === link.source);
616
- const radius = sourceNode.isPipelineParent ? squareSize / Math.sqrt(2) : configValues.nodeRadius;
617
- const dx = targetPos.x - sourcePos.x;
618
- const dy = targetPos.y - sourcePos.y;
619
- const distance = Math.sqrt(dx * dx + dy * dy);
620
- return sourcePos.y + dy / distance * radius;
621
- }).attr("x2", (link) => {
622
- const sourcePos = positions.get(link.source);
623
- const targetPos = positions.get(link.target);
624
- const targetNode = data.nodes.find((n) => n.id === link.target);
625
- const radius = targetNode.isPipelineParent ? squareSize / Math.sqrt(2) : configValues.nodeRadius;
626
- const dx = sourcePos.x - targetPos.x;
627
- const dy = sourcePos.y - targetPos.y;
628
- const distance = Math.sqrt(dx * dx + dy * dy);
629
- return targetPos.x + dx / distance * radius;
630
- }).attr("y2", (link) => {
631
- const sourcePos = positions.get(link.source);
632
- const targetPos = positions.get(link.target);
633
- const targetNode = data.nodes.find((n) => n.id === link.target);
634
- const radius = targetNode.isPipelineParent ? squareSize / Math.sqrt(2) : configValues.nodeRadius;
635
- const dx = sourcePos.x - targetPos.x;
636
- const dy = sourcePos.y - targetPos.y;
637
- const distance = Math.sqrt(dx * dx + dy * dy);
638
- return targetPos.y + dy / distance * radius;
639
- }).attr("stroke", theme.linkStroke).attr("stroke-width", 1).attr("stroke-dasharray", (link) => link.dashed ? "6 6" : null).attr("marker-end", (link) => {
640
- if (link.flow === "forward" || link.flow === "bidirectional") {
641
- return `url(#link-arrow-end-${id})`;
642
- }
643
- return null;
644
- }).attr("marker-start", (link) => {
645
- if (link.flow === "backward" || link.flow === "bidirectional") {
646
- return `url(#link-arrow-start-${id})`;
647
- }
648
- return null;
649
- });
650
- linksGroup.selectAll("text").data(validLinks.filter((link) => link.label)).enter().append("text").attr("class", "wardley-link-label").attr("x", (link) => {
651
- const sourcePos = positions.get(link.source);
652
- const targetPos = positions.get(link.target);
653
- const midX = (sourcePos.x + targetPos.x) / 2;
654
- const dy = targetPos.y - sourcePos.y;
655
- const dx = targetPos.x - sourcePos.x;
656
- const distance = Math.sqrt(dx * dx + dy * dy);
657
- const offset = 8;
658
- const perpX = dy / distance;
659
- return midX + perpX * offset;
660
- }).attr("y", (link) => {
661
- const sourcePos = positions.get(link.source);
662
- const targetPos = positions.get(link.target);
663
- const midY = (sourcePos.y + targetPos.y) / 2;
664
- const dx = targetPos.x - sourcePos.x;
665
- const dy = targetPos.y - sourcePos.y;
666
- const distance = Math.sqrt(dx * dx + dy * dy);
667
- const offset = 8;
668
- const perpY = -dx / distance;
669
- return midY + perpY * offset;
670
- }).attr("fill", theme.axisTextColor).attr("font-size", configValues.labelFontSize).attr("text-anchor", "middle").attr("dominant-baseline", "middle").attr("transform", (link) => {
671
- const sourcePos = positions.get(link.source);
672
- const targetPos = positions.get(link.target);
673
- const midX = (sourcePos.x + targetPos.x) / 2;
674
- const midY = (sourcePos.y + targetPos.y) / 2;
675
- const dx = targetPos.x - sourcePos.x;
676
- const dy = targetPos.y - sourcePos.y;
677
- const distance = Math.sqrt(dx * dx + dy * dy);
678
- const offset = 8;
679
- const perpX = dy / distance;
680
- const perpY = -dx / distance;
681
- const labelX = midX + perpX * offset;
682
- const labelY = midY + perpY * offset;
683
- let angle = Math.atan2(dy, dx) * 180 / Math.PI;
684
- if (angle > 90 || angle < -90) {
685
- angle += 180;
686
- }
687
- return `rotate(${angle} ${labelX} ${labelY})`;
688
- }).text((link) => link.label);
689
- const trendGroup = root.append("g").attr("class", "wardley-trends");
690
- const trendsWithPositions = data.trends.map((trend) => {
691
- const origin = positions.get(trend.nodeId);
692
- if (!origin) {
693
- return null;
694
- }
695
- const targetX = projectX(trend.targetX);
696
- const targetY = projectY(trend.targetY);
697
- const dx = targetX - origin.x;
698
- const dy = targetY - origin.y;
699
- const distance = Math.sqrt(dx * dx + dy * dy);
700
- const shortenBy = configValues.nodeRadius + 2;
701
- const adjustedX2 = distance > shortenBy ? targetX - dx / distance * shortenBy : targetX;
702
- const adjustedY2 = distance > shortenBy ? targetY - dy / distance * shortenBy : targetY;
703
- return {
704
- origin,
705
- targetX,
706
- targetY,
707
- adjustedX2,
708
- adjustedY2
709
- };
710
- }).filter((trend) => trend !== null);
711
- trendGroup.selectAll("line").data(trendsWithPositions).enter().append("line").attr("class", "wardley-trend").attr("x1", (trend) => trend.origin.x).attr("y1", (trend) => trend.origin.y).attr("x2", (trend) => trend.adjustedX2).attr("y2", (trend) => trend.adjustedY2).attr("stroke", theme.evolutionStroke).attr("stroke-width", 1).attr("stroke-dasharray", "4 4").attr("marker-end", `url(#arrow-${id})`);
712
- const nodesGroup = root.append("g").attr("class", "wardley-nodes");
713
- const nodeEnter = nodesGroup.selectAll("g").data(data.nodes).enter().append("g").attr(
714
- "class",
715
- (node) => ["wardley-node", node.className ? `wardley-node--${node.className}` : ""].filter(Boolean).join(" ")
716
- );
717
- nodeEnter.filter((node) => node.sourceStrategy === "outsource").append("circle").attr("class", "wardley-outsource-overlay").attr("cx", (node) => positions.get(node.id).x).attr("cy", (node) => positions.get(node.id).y).attr("r", configValues.nodeRadius * 2).attr("fill", "#666").attr("stroke", theme.componentStroke).attr("stroke-width", 1);
718
- nodeEnter.filter((node) => node.sourceStrategy === "buy").append("circle").attr("class", "wardley-buy-overlay").attr("cx", (node) => positions.get(node.id).x).attr("cy", (node) => positions.get(node.id).y).attr("r", configValues.nodeRadius * 2).attr("fill", "#ccc").attr("stroke", theme.componentStroke).attr("stroke-width", 1);
719
- nodeEnter.filter((node) => node.sourceStrategy === "build").append("circle").attr("class", "wardley-build-overlay").attr("cx", (node) => positions.get(node.id).x).attr("cy", (node) => positions.get(node.id).y).attr("r", configValues.nodeRadius * 2).attr("fill", "#eee").attr("stroke", "#000").attr("stroke-width", 1);
720
- const marketNodes = nodeEnter.filter((node) => node.sourceStrategy === "market");
721
- marketNodes.append("circle").attr("class", "wardley-market-overlay").attr("cx", (node) => positions.get(node.id).x).attr("cy", (node) => positions.get(node.id).y).attr("r", configValues.nodeRadius * 2).attr("fill", "white").attr("stroke", theme.componentStroke).attr("stroke-width", 1);
722
- nodeEnter.filter(
723
- (node) => !node.isPipelineParent && node.sourceStrategy !== "market" && node.className !== "anchor"
724
- ).append("circle").attr("cx", (node) => positions.get(node.id).x).attr("cy", (node) => positions.get(node.id).y).attr("r", configValues.nodeRadius).attr("fill", theme.componentFill).attr("stroke", theme.componentStroke).attr("stroke-width", 1);
725
- const smallCircleRadius = configValues.nodeRadius * 0.7;
726
- const triangleRadius = configValues.nodeRadius * 1.2;
727
- marketNodes.append("line").attr("class", "wardley-market-line").attr("x1", (node) => positions.get(node.id).x).attr("y1", (node) => positions.get(node.id).y - triangleRadius).attr("x2", (node) => positions.get(node.id).x - triangleRadius * Math.cos(Math.PI / 6)).attr("y2", (node) => positions.get(node.id).y + triangleRadius * Math.sin(Math.PI / 6)).attr("stroke", theme.componentStroke).attr("stroke-width", 1);
728
- marketNodes.append("line").attr("class", "wardley-market-line").attr("x1", (node) => positions.get(node.id).x - triangleRadius * Math.cos(Math.PI / 6)).attr("y1", (node) => positions.get(node.id).y + triangleRadius * Math.sin(Math.PI / 6)).attr("x2", (node) => positions.get(node.id).x + triangleRadius * Math.cos(Math.PI / 6)).attr("y2", (node) => positions.get(node.id).y + triangleRadius * Math.sin(Math.PI / 6)).attr("stroke", theme.componentStroke).attr("stroke-width", 1);
729
- marketNodes.append("line").attr("class", "wardley-market-line").attr("x1", (node) => positions.get(node.id).x + triangleRadius * Math.cos(Math.PI / 6)).attr("y1", (node) => positions.get(node.id).y + triangleRadius * Math.sin(Math.PI / 6)).attr("x2", (node) => positions.get(node.id).x).attr("y2", (node) => positions.get(node.id).y - triangleRadius).attr("stroke", theme.componentStroke).attr("stroke-width", 1);
730
- marketNodes.append("circle").attr("class", "wardley-market-dot").attr("cx", (node) => positions.get(node.id).x).attr("cy", (node) => positions.get(node.id).y - triangleRadius).attr("r", smallCircleRadius).attr("fill", "white").attr("stroke", theme.componentStroke).attr("stroke-width", 2);
731
- marketNodes.append("circle").attr("class", "wardley-market-dot").attr("cx", (node) => positions.get(node.id).x - triangleRadius * Math.cos(Math.PI / 6)).attr("cy", (node) => positions.get(node.id).y + triangleRadius * Math.sin(Math.PI / 6)).attr("r", smallCircleRadius).attr("fill", "white").attr("stroke", theme.componentStroke).attr("stroke-width", 2);
732
- marketNodes.append("circle").attr("class", "wardley-market-dot").attr("cx", (node) => positions.get(node.id).x + triangleRadius * Math.cos(Math.PI / 6)).attr("cy", (node) => positions.get(node.id).y + triangleRadius * Math.sin(Math.PI / 6)).attr("r", smallCircleRadius).attr("fill", "white").attr("stroke", theme.componentStroke).attr("stroke-width", 2);
733
- nodeEnter.filter((node) => node.isPipelineParent === true).append("rect").attr("x", (node) => positions.get(node.id).x - squareSize / 2).attr("y", (node) => positions.get(node.id).y - squareSize / 2).attr("width", squareSize).attr("height", squareSize).attr("fill", theme.componentFill).attr("stroke", theme.componentStroke).attr("stroke-width", 1);
734
- nodeEnter.filter((node) => node.inertia === true).append("line").attr("class", "wardley-inertia").attr("x1", (node) => {
735
- const pos = positions.get(node.id);
736
- let offset = node.isPipelineParent ? squareSize / 2 + 15 : configValues.nodeRadius + 15;
737
- if (node.sourceStrategy) {
738
- offset += configValues.nodeRadius + 10;
739
- }
740
- return pos.x + offset;
741
- }).attr("y1", (node) => {
742
- const pos = positions.get(node.id);
743
- const lineHeight = node.isPipelineParent ? squareSize : configValues.nodeRadius * 2;
744
- return pos.y - lineHeight / 2;
745
- }).attr("x2", (node) => {
746
- const pos = positions.get(node.id);
747
- let offset = node.isPipelineParent ? squareSize / 2 + 15 : configValues.nodeRadius + 15;
748
- if (node.sourceStrategy) {
749
- offset += configValues.nodeRadius + 10;
750
- }
751
- return pos.x + offset;
752
- }).attr("y2", (node) => {
753
- const pos = positions.get(node.id);
754
- const lineHeight = node.isPipelineParent ? squareSize : configValues.nodeRadius * 2;
755
- return pos.y + lineHeight / 2;
756
- }).attr("stroke", theme.componentStroke).attr("stroke-width", 6);
757
- nodeEnter.append("text").attr("x", (node) => {
758
- const pos = positions.get(node.id);
759
- if (node.className === "anchor") {
760
- return node.labelOffsetX !== void 0 ? pos.x + node.labelOffsetX : pos.x;
761
- }
762
- let defaultOffset = configValues.nodeLabelOffset;
763
- if (node.sourceStrategy && node.labelOffsetX === void 0) {
764
- defaultOffset += 10;
765
- }
766
- const customOffset = node.labelOffsetX ?? defaultOffset;
767
- return pos.x + customOffset;
768
- }).attr("y", (node) => {
769
- const pos = positions.get(node.id);
770
- if (node.className === "anchor") {
771
- return node.labelOffsetY !== void 0 ? pos.y + node.labelOffsetY : pos.y - 3;
772
- }
773
- let defaultOffset = -configValues.nodeLabelOffset;
774
- if (node.sourceStrategy && node.labelOffsetY === void 0) {
775
- defaultOffset -= 10;
776
- }
777
- const customOffset = node.labelOffsetY ?? defaultOffset;
778
- return pos.y + customOffset;
779
- }).attr("class", "wardley-node-label").attr("fill", (node) => {
780
- if (node.className === "evolved") {
781
- return theme.evolutionStroke;
782
- }
783
- if (node.className === "anchor") {
784
- return "#000";
785
- }
786
- return theme.componentLabelColor;
787
- }).attr("font-size", configValues.labelFontSize).attr("font-weight", (node) => node.className === "anchor" ? "bold" : "normal").attr("text-anchor", (node) => node.className === "anchor" ? "middle" : "start").attr("dominant-baseline", (node) => node.className === "anchor" ? "middle" : "auto").text((node) => node.label);
788
- if (data.annotations.length > 0) {
789
- const annotationsGroup = root.append("g").attr("class", "wardley-annotations");
790
- data.annotations.forEach((annotation) => {
791
- const projectedCoords = annotation.coordinates.map((coord) => ({
792
- x: projectX(coord.x),
793
- y: projectY(coord.y)
794
- }));
795
- if (projectedCoords.length > 1) {
796
- for (let i = 0; i < projectedCoords.length - 1; i++) {
797
- annotationsGroup.append("line").attr("class", "wardley-annotation-line").attr("x1", projectedCoords[i].x).attr("y1", projectedCoords[i].y).attr("x2", projectedCoords[i + 1].x).attr("y2", projectedCoords[i + 1].y).attr("stroke", theme.axisColor).attr("stroke-width", 1.5).attr("stroke-dasharray", "4 4");
798
- }
799
- }
800
- projectedCoords.forEach((coord) => {
801
- const annotationNode = annotationsGroup.append("g").attr("class", "wardley-annotation");
802
- annotationNode.append("circle").attr("cx", coord.x).attr("cy", coord.y).attr("r", 10).attr("fill", "white").attr("stroke", theme.axisColor).attr("stroke-width", 1.5);
803
- annotationNode.append("text").attr("x", coord.x).attr("y", coord.y).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("font-size", 10).attr("fill", theme.axisTextColor).attr("font-weight", "bold").text(annotation.number);
804
- });
805
- });
806
- if (data.annotationsBox) {
807
- let boxX = projectX(data.annotationsBox.x);
808
- let boxY = projectY(data.annotationsBox.y);
809
- const padding = 10;
810
- const lineHeight = 16;
811
- const fontSize = 11;
812
- const textBoxGroup = annotationsGroup.append("g").attr("class", "wardley-annotations-box");
813
- const sortedAnnotations = [...data.annotations].filter((a) => a.text).sort((a, b) => a.number - b.number);
814
- const textElements = [];
815
- sortedAnnotations.forEach((annotation, idx) => {
816
- const text2 = textBoxGroup.append("text").attr("x", boxX + padding).attr("y", boxY + padding + (idx + 1) * lineHeight).attr("font-size", fontSize).attr("fill", theme.axisTextColor).attr("text-anchor", "start").attr("dominant-baseline", "middle").text(`${annotation.number}. ${annotation.text}`);
817
- textElements.push(text2);
818
- });
819
- if (textElements.length > 0) {
820
- let maxWidth = 0;
821
- let maxHeight = 0;
822
- textElements.forEach((text2) => {
823
- const textNode = text2.node();
824
- const textWidth = textNode.getComputedTextLength();
825
- maxWidth = Math.max(maxWidth, textWidth);
826
- const bbox = textNode.getBBox();
827
- maxHeight = Math.max(maxHeight, bbox.height);
828
- });
829
- const boxWidth = maxWidth + padding * 2 + 105;
830
- const boxHeight = sortedAnnotations.length * lineHeight + padding * 2 + maxHeight / 2;
831
- const minX = configValues.padding;
832
- const maxX = width - configValues.padding - boxWidth;
833
- const minY = configValues.padding;
834
- const maxY = height - configValues.padding - boxHeight;
835
- boxX = Math.max(minX, Math.min(boxX, maxX));
836
- boxY = Math.max(minY, Math.min(boxY, maxY));
837
- textElements.forEach((text2, idx) => {
838
- text2.attr("x", boxX + padding).attr("y", boxY + padding + (idx + 1) * lineHeight);
839
- });
840
- textBoxGroup.insert("rect", "text").attr("x", boxX).attr("y", boxY).attr("width", boxWidth).attr("height", boxHeight).attr("fill", "white").attr("stroke", theme.axisColor).attr("stroke-width", 1.5).attr("rx", 4).attr("ry", 4);
841
- }
842
- }
843
- }
844
- if (data.notes.length > 0) {
845
- const notesGroup = root.append("g").attr("class", "wardley-notes");
846
- data.notes.forEach((note) => {
847
- const noteX = projectX(note.x);
848
- const noteY = projectY(note.y);
849
- notesGroup.append("text").attr("x", noteX).attr("y", noteY).attr("text-anchor", "start").attr("font-size", 11).attr("fill", theme.axisTextColor).attr("font-weight", "bold").text(note.text);
850
- });
851
- }
852
- if (data.accelerators.length > 0) {
853
- const acceleratorsGroup = root.append("g").attr("class", "wardley-accelerators");
854
- data.accelerators.forEach((accelerator) => {
855
- const accX = projectX(accelerator.x);
856
- const accY = projectY(accelerator.y);
857
- const arrowWidth = 60;
858
- const arrowHeight = 30;
859
- const arrowHeadWidth = 20;
860
- const arrowPath = `
861
- M ${accX} ${accY - arrowHeight / 2}
862
- L ${accX + arrowWidth - arrowHeadWidth} ${accY - arrowHeight / 2}
863
- L ${accX + arrowWidth - arrowHeadWidth} ${accY - arrowHeight / 2 - 8}
864
- L ${accX + arrowWidth} ${accY}
865
- L ${accX + arrowWidth - arrowHeadWidth} ${accY + arrowHeight / 2 + 8}
866
- L ${accX + arrowWidth - arrowHeadWidth} ${accY + arrowHeight / 2}
867
- L ${accX} ${accY + arrowHeight / 2}
868
- Z
869
- `;
870
- acceleratorsGroup.append("path").attr("d", arrowPath).attr("fill", "white").attr("stroke", theme.componentStroke).attr("stroke-width", 1);
871
- acceleratorsGroup.append("text").attr("x", accX + arrowWidth / 2).attr("y", accY + arrowHeight / 2 + 15).attr("text-anchor", "middle").attr("font-size", 10).attr("fill", theme.axisTextColor).attr("font-weight", "bold").text(accelerator.name);
872
- });
873
- }
874
- if (data.deaccelerators.length > 0) {
875
- const deacceleratorsGroup = root.append("g").attr("class", "wardley-deaccelerators");
876
- data.deaccelerators.forEach((deaccelerator) => {
877
- const decX = projectX(deaccelerator.x);
878
- const decY = projectY(deaccelerator.y);
879
- const arrowWidth = 60;
880
- const arrowHeight = 30;
881
- const arrowHeadWidth = 20;
882
- const arrowPath = `
883
- M ${decX + arrowWidth} ${decY - arrowHeight / 2}
884
- L ${decX + arrowHeadWidth} ${decY - arrowHeight / 2}
885
- L ${decX + arrowHeadWidth} ${decY - arrowHeight / 2 - 8}
886
- L ${decX} ${decY}
887
- L ${decX + arrowHeadWidth} ${decY + arrowHeight / 2 + 8}
888
- L ${decX + arrowHeadWidth} ${decY + arrowHeight / 2}
889
- L ${decX + arrowWidth} ${decY + arrowHeight / 2}
890
- Z
891
- `;
892
- deacceleratorsGroup.append("path").attr("d", arrowPath).attr("fill", "white").attr("stroke", theme.componentStroke).attr("stroke-width", 1);
893
- deacceleratorsGroup.append("text").attr("x", decX + arrowWidth / 2).attr("y", decY + arrowHeight / 2 + 15).attr("text-anchor", "middle").attr("font-size", 10).attr("fill", theme.axisTextColor).attr("font-weight", "bold").text(deaccelerator.name);
894
- });
895
- }
896
- }, "draw");
897
- var wardleyRenderer_default = {
898
- draw
899
- };
900
- var styles = /* @__PURE__ */ __name(({
901
- wardley
902
- } = {}) => {
903
- const defaultThemeVariables = getThemeVariables3();
904
- const currentConfig = getConfig();
905
- const themeVariables = cleanAndMerge(defaultThemeVariables, currentConfig.themeVariables);
906
- const w = cleanAndMerge(themeVariables.wardley, wardley);
907
- return `
908
- .wardley-background {
909
- fill: ${w.backgroundColor};
910
- }
911
- .wardley-axes line, .wardley-axes path {
912
- stroke: ${w.axisColor};
913
- }
914
- .wardley-axis-label {
915
- fill: ${w.axisTextColor};
916
- }
917
- .wardley-stage-label {
918
- fill: ${w.axisTextColor};
919
- }
920
- .wardley-grid line {
921
- stroke: ${w.gridColor};
922
- }
923
- .wardley-node circle {
924
- fill: ${w.componentFill};
925
- stroke: ${w.componentStroke};
926
- }
927
- .wardley-node-label {
928
- fill: ${w.componentLabelColor};
929
- }
930
- .wardley-link {
931
- stroke: ${w.linkStroke};
932
- }
933
- .wardley-link--dashed {
934
- stroke-dasharray: 4 4;
935
- }
936
- .wardley-link-label {
937
- fill: ${w.axisTextColor};
938
- }
939
- .wardley-trend line {
940
- stroke: ${w.evolutionStroke};
941
- }
942
- .wardley-annotation-line {
943
- stroke: ${w.annotationStroke};
944
- }
945
- .wardley-annotation circle {
946
- fill: ${w.annotationFill};
947
- stroke: ${w.annotationStroke};
948
- }
949
- .wardley-annotation text {
950
- fill: ${w.annotationTextColor};
951
- }
952
- .wardley-annotations-box rect {
953
- fill: ${w.annotationFill};
954
- stroke: ${w.annotationStroke};
955
- }
956
- .wardley-annotations-box text {
957
- fill: ${w.annotationTextColor};
958
- }
959
- .wardley-pipeline-box {
960
- stroke: ${w.componentStroke};
961
- }
962
- .wardley-notes text {
963
- fill: ${w.axisTextColor};
964
- }
965
- `;
966
- }, "styles");
967
- var diagram = {
968
- parser,
969
- db: wardleyDb_default,
970
- renderer: wardleyRenderer_default,
971
- styles
972
- };
973
- export {
974
- diagram
975
- };