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,719 +0,0 @@
1
- import "./src-D_hsMyeP.mjs";
2
- import { n as e } from "./chunk-Y2CYZVJY-i11wjrBe.mjs";
3
- import { H as t, K as n, U as r, a as i, c as a, s as o, v as s, w as c, x as l, y as u } from "./chunk-DU6HZSFF-BEQZSmUu.mjs";
4
- import { p as d } from "./chunk-75Z2AOVW-Dz0Sko9Y.mjs";
5
- import { t as f } from "./chunk-CLGD4ZFX-DBkwyMMv.mjs";
6
- import { t as p } from "./rough.esm-DXYGHN3m.mjs";
7
- //#region node_modules/mermaid/dist/chunks/mermaid.core/ishikawaDiagram-5VMMS53U.mjs
8
- var m = (function() {
9
- var t = /* @__PURE__ */ e(function(e, t, n, r) {
10
- for (n ||= {}, r = e.length; r--; n[e[r]] = t);
11
- return n;
12
- }, "o"), n = [1, 4], r = [1, 14], i = [1, 12], a = [1, 13], o = [
13
- 6,
14
- 7,
15
- 8
16
- ], s = [1, 20], c = [1, 18], l = [1, 19], u = [
17
- 6,
18
- 7,
19
- 11
20
- ], d = [
21
- 1,
22
- 6,
23
- 13,
24
- 14
25
- ], f = [1, 23], p = [1, 24], m = [
26
- 1,
27
- 6,
28
- 7,
29
- 11,
30
- 13,
31
- 14
32
- ], h = {
33
- trace: /* @__PURE__ */ e(function() {}, "trace"),
34
- yy: {},
35
- symbols_: {
36
- error: 2,
37
- start: 3,
38
- ishikawa: 4,
39
- spaceLines: 5,
40
- SPACELINE: 6,
41
- NL: 7,
42
- ISHIKAWA: 8,
43
- document: 9,
44
- stop: 10,
45
- EOF: 11,
46
- statement: 12,
47
- SPACELIST: 13,
48
- TEXT: 14,
49
- $accept: 0,
50
- $end: 1
51
- },
52
- terminals_: {
53
- 2: "error",
54
- 6: "SPACELINE",
55
- 7: "NL",
56
- 8: "ISHIKAWA",
57
- 11: "EOF",
58
- 13: "SPACELIST",
59
- 14: "TEXT"
60
- },
61
- productions_: [
62
- 0,
63
- [3, 1],
64
- [3, 2],
65
- [5, 1],
66
- [5, 2],
67
- [5, 2],
68
- [4, 2],
69
- [4, 3],
70
- [10, 1],
71
- [10, 1],
72
- [10, 1],
73
- [10, 2],
74
- [10, 2],
75
- [9, 3],
76
- [9, 2],
77
- [12, 2],
78
- [12, 1],
79
- [12, 1],
80
- [12, 1]
81
- ],
82
- performAction: /* @__PURE__ */ e(function(e, t, n, r, i, a, o) {
83
- var s = a.length - 1;
84
- switch (i) {
85
- case 6:
86
- case 7: return r;
87
- case 15:
88
- r.addNode(a[s - 1].length, a[s].trim());
89
- break;
90
- case 16: r.addNode(0, a[s].trim());
91
- }
92
- }, "anonymous"),
93
- table: [
94
- {
95
- 3: 1,
96
- 4: 2,
97
- 5: 3,
98
- 6: [1, 5],
99
- 8: n
100
- },
101
- { 1: [3] },
102
- { 1: [2, 1] },
103
- {
104
- 4: 6,
105
- 6: [1, 7],
106
- 7: [1, 8],
107
- 8: n
108
- },
109
- {
110
- 6: r,
111
- 7: [1, 10],
112
- 9: 9,
113
- 12: 11,
114
- 13: i,
115
- 14: a
116
- },
117
- t(o, [2, 3]),
118
- { 1: [2, 2] },
119
- t(o, [2, 4]),
120
- t(o, [2, 5]),
121
- {
122
- 1: [2, 6],
123
- 6: r,
124
- 12: 15,
125
- 13: i,
126
- 14: a
127
- },
128
- {
129
- 6: r,
130
- 9: 16,
131
- 12: 11,
132
- 13: i,
133
- 14: a
134
- },
135
- {
136
- 6: s,
137
- 7: c,
138
- 10: 17,
139
- 11: l
140
- },
141
- t(u, [2, 18], { 14: [1, 21] }),
142
- t(u, [2, 16]),
143
- t(u, [2, 17]),
144
- {
145
- 6: s,
146
- 7: c,
147
- 10: 22,
148
- 11: l
149
- },
150
- {
151
- 1: [2, 7],
152
- 6: r,
153
- 12: 15,
154
- 13: i,
155
- 14: a
156
- },
157
- t(d, [2, 14], {
158
- 7: f,
159
- 11: p
160
- }),
161
- t(m, [2, 8]),
162
- t(m, [2, 9]),
163
- t(m, [2, 10]),
164
- t(u, [2, 15]),
165
- t(d, [2, 13], {
166
- 7: f,
167
- 11: p
168
- }),
169
- t(m, [2, 11]),
170
- t(m, [2, 12])
171
- ],
172
- defaultActions: {
173
- 2: [2, 1],
174
- 6: [2, 2]
175
- },
176
- parseError: /* @__PURE__ */ e(function(e, t) {
177
- if (t.recoverable) this.trace(e);
178
- else {
179
- var n = Error(e);
180
- throw n.hash = t, n;
181
- }
182
- }, "parseError"),
183
- parse: /* @__PURE__ */ e(function(t) {
184
- var n = this, r = [0], i = [], a = [null], o = [], s = this.table, c = "", l = 0, u = 0, d = 0, f = 2, p = 1, m = o.slice.call(arguments, 1), h = Object.create(this.lexer), g = { yy: {} };
185
- for (var _ in this.yy) Object.prototype.hasOwnProperty.call(this.yy, _) && (g.yy[_] = this.yy[_]);
186
- h.setInput(t, g.yy), g.yy.lexer = h, g.yy.parser = this, h.yylloc === void 0 && (h.yylloc = {});
187
- var v = h.yylloc;
188
- o.push(v);
189
- var y = h.options && h.options.ranges;
190
- this.parseError = typeof g.yy.parseError == "function" ? g.yy.parseError : Object.getPrototypeOf(this).parseError;
191
- function b(e) {
192
- r.length -= 2 * e, a.length -= e, o.length -= e;
193
- }
194
- e(b, "popStack");
195
- function x() {
196
- var e = i.pop() || h.lex() || p;
197
- return typeof e != "number" && (e instanceof Array && (i = e, e = i.pop()), e = n.symbols_[e] || e), e;
198
- }
199
- e(x, "lex");
200
- for (var S, C, w, T, E, D = {}, O, k, A, j;;) {
201
- if (w = r[r.length - 1], this.defaultActions[w] ? T = this.defaultActions[w] : (S ??= x(), T = s[w] && s[w][S]), T === void 0 || !T.length || !T[0]) {
202
- var M = "";
203
- for (O in j = [], s[w]) this.terminals_[O] && O > f && j.push("'" + this.terminals_[O] + "'");
204
- M = h.showPosition ? "Parse error on line " + (l + 1) + ":\n" + h.showPosition() + "\nExpecting " + j.join(", ") + ", got '" + (this.terminals_[S] || S) + "'" : "Parse error on line " + (l + 1) + ": Unexpected " + (S == p ? "end of input" : "'" + (this.terminals_[S] || S) + "'"), this.parseError(M, {
205
- text: h.match,
206
- token: this.terminals_[S] || S,
207
- line: h.yylineno,
208
- loc: v,
209
- expected: j
210
- });
211
- }
212
- if (T[0] instanceof Array && T.length > 1) throw Error("Parse Error: multiple actions possible at state: " + w + ", token: " + S);
213
- switch (T[0]) {
214
- case 1:
215
- r.push(S), a.push(h.yytext), o.push(h.yylloc), r.push(T[1]), S = null, C ? (S = C, C = null) : (u = h.yyleng, c = h.yytext, l = h.yylineno, v = h.yylloc, d > 0 && d--);
216
- break;
217
- case 2:
218
- if (k = this.productions_[T[1]][1], D.$ = a[a.length - k], D._$ = {
219
- first_line: o[o.length - (k || 1)].first_line,
220
- last_line: o[o.length - 1].last_line,
221
- first_column: o[o.length - (k || 1)].first_column,
222
- last_column: o[o.length - 1].last_column
223
- }, y && (D._$.range = [o[o.length - (k || 1)].range[0], o[o.length - 1].range[1]]), E = this.performAction.apply(D, [
224
- c,
225
- u,
226
- l,
227
- g.yy,
228
- T[1],
229
- a,
230
- o
231
- ].concat(m)), E !== void 0) return E;
232
- k && (r = r.slice(0, -1 * k * 2), a = a.slice(0, -1 * k), o = o.slice(0, -1 * k)), r.push(this.productions_[T[1]][0]), a.push(D.$), o.push(D._$), A = s[r[r.length - 2]][r[r.length - 1]], r.push(A);
233
- break;
234
- case 3: return !0;
235
- }
236
- }
237
- return !0;
238
- }, "parse")
239
- };
240
- h.lexer = /* @__PURE__ */ (function() {
241
- return {
242
- EOF: 1,
243
- parseError: /* @__PURE__ */ e(function(e, t) {
244
- if (this.yy.parser) this.yy.parser.parseError(e, t);
245
- else throw Error(e);
246
- }, "parseError"),
247
- setInput: /* @__PURE__ */ e(function(e, t) {
248
- return this.yy = t || this.yy || {}, this._input = e, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
249
- first_line: 1,
250
- first_column: 0,
251
- last_line: 1,
252
- last_column: 0
253
- }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
254
- }, "setInput"),
255
- input: /* @__PURE__ */ e(function() {
256
- var e = this._input[0];
257
- return this.yytext += e, this.yyleng++, this.offset++, this.match += e, this.matched += e, e.match(/(?:\r\n?|\n).*/g) ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), e;
258
- }, "input"),
259
- unput: /* @__PURE__ */ e(function(e) {
260
- var t = e.length, n = e.split(/(?:\r\n?|\n)/g);
261
- this._input = e + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - t), this.offset -= t;
262
- var r = this.match.split(/(?:\r\n?|\n)/g);
263
- this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), n.length - 1 && (this.yylineno -= n.length - 1);
264
- var i = this.yylloc.range;
265
- return this.yylloc = {
266
- first_line: this.yylloc.first_line,
267
- last_line: this.yylineno + 1,
268
- first_column: this.yylloc.first_column,
269
- last_column: n ? (n.length === r.length ? this.yylloc.first_column : 0) + r[r.length - n.length].length - n[0].length : this.yylloc.first_column - t
270
- }, this.options.ranges && (this.yylloc.range = [i[0], i[0] + this.yyleng - t]), this.yyleng = this.yytext.length, this;
271
- }, "unput"),
272
- more: /* @__PURE__ */ e(function() {
273
- return this._more = !0, this;
274
- }, "more"),
275
- reject: /* @__PURE__ */ e(function() {
276
- if (this.options.backtrack_lexer) this._backtrack = !0;
277
- else return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), {
278
- text: "",
279
- token: null,
280
- line: this.yylineno
281
- });
282
- return this;
283
- }, "reject"),
284
- less: /* @__PURE__ */ e(function(e) {
285
- this.unput(this.match.slice(e));
286
- }, "less"),
287
- pastInput: /* @__PURE__ */ e(function() {
288
- var e = this.matched.substr(0, this.matched.length - this.match.length);
289
- return (e.length > 20 ? "..." : "") + e.substr(-20).replace(/\n/g, "");
290
- }, "pastInput"),
291
- upcomingInput: /* @__PURE__ */ e(function() {
292
- var e = this.match;
293
- return e.length < 20 && (e += this._input.substr(0, 20 - e.length)), (e.substr(0, 20) + (e.length > 20 ? "..." : "")).replace(/\n/g, "");
294
- }, "upcomingInput"),
295
- showPosition: /* @__PURE__ */ e(function() {
296
- var e = this.pastInput(), t = Array(e.length + 1).join("-");
297
- return e + this.upcomingInput() + "\n" + t + "^";
298
- }, "showPosition"),
299
- test_match: /* @__PURE__ */ e(function(e, t) {
300
- var n, r, i;
301
- if (this.options.backtrack_lexer && (i = {
302
- yylineno: this.yylineno,
303
- yylloc: {
304
- first_line: this.yylloc.first_line,
305
- last_line: this.last_line,
306
- first_column: this.yylloc.first_column,
307
- last_column: this.yylloc.last_column
308
- },
309
- yytext: this.yytext,
310
- match: this.match,
311
- matches: this.matches,
312
- matched: this.matched,
313
- yyleng: this.yyleng,
314
- offset: this.offset,
315
- _more: this._more,
316
- _input: this._input,
317
- yy: this.yy,
318
- conditionStack: this.conditionStack.slice(0),
319
- done: this.done
320
- }, this.options.ranges && (i.yylloc.range = this.yylloc.range.slice(0))), r = e[0].match(/(?:\r\n?|\n).*/g), r && (this.yylineno += r.length), this.yylloc = {
321
- first_line: this.yylloc.last_line,
322
- last_line: this.yylineno + 1,
323
- first_column: this.yylloc.last_column,
324
- last_column: r ? r[r.length - 1].length - r[r.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + e[0].length
325
- }, this.yytext += e[0], this.match += e[0], this.matches = e, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(e[0].length), this.matched += e[0], n = this.performAction.call(this, this.yy, this, t, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), n) return n;
326
- if (this._backtrack) {
327
- for (var a in i) this[a] = i[a];
328
- return !1;
329
- }
330
- return !1;
331
- }, "test_match"),
332
- next: /* @__PURE__ */ e(function() {
333
- if (this.done) return this.EOF;
334
- this._input || (this.done = !0);
335
- var e, t, n, r;
336
- this._more || (this.yytext = "", this.match = "");
337
- for (var i = this._currentRules(), a = 0; a < i.length; a++) if (n = this._input.match(this.rules[i[a]]), n && (!t || n[0].length > t[0].length)) {
338
- if (t = n, r = a, this.options.backtrack_lexer) {
339
- if (e = this.test_match(n, i[a]), e !== !1) return e;
340
- if (this._backtrack) {
341
- t = !1;
342
- continue;
343
- }
344
- return !1;
345
- }
346
- if (!this.options.flex) break;
347
- }
348
- return t ? (e = this.test_match(t, i[r]), e !== !1 && e) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
349
- text: "",
350
- token: null,
351
- line: this.yylineno
352
- });
353
- }, "next"),
354
- lex: /* @__PURE__ */ e(function() {
355
- return this.next() || this.lex();
356
- }, "lex"),
357
- begin: /* @__PURE__ */ e(function(e) {
358
- this.conditionStack.push(e);
359
- }, "begin"),
360
- popState: /* @__PURE__ */ e(function() {
361
- return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
362
- }, "popState"),
363
- _currentRules: /* @__PURE__ */ e(function() {
364
- return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
365
- }, "_currentRules"),
366
- topState: /* @__PURE__ */ e(function(e) {
367
- return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL";
368
- }, "topState"),
369
- pushState: /* @__PURE__ */ e(function(e) {
370
- this.begin(e);
371
- }, "pushState"),
372
- stateStackSize: /* @__PURE__ */ e(function() {
373
- return this.conditionStack.length;
374
- }, "stateStackSize"),
375
- options: { "case-insensitive": !0 },
376
- performAction: /* @__PURE__ */ e(function(e, t, n, r) {
377
- switch (n) {
378
- case 0: return 6;
379
- case 1: return 8;
380
- case 2: return 8;
381
- case 3: return 6;
382
- case 4: return 7;
383
- case 5: return 13;
384
- case 6: return 14;
385
- case 7: return 11;
386
- }
387
- }, "anonymous"),
388
- rules: [
389
- /^(?:\s*%%.*)/i,
390
- /^(?:ishikawa-beta\b)/i,
391
- /^(?:ishikawa\b)/i,
392
- /^(?:[\s]+[\n])/i,
393
- /^(?:[\n]+)/i,
394
- /^(?:[\s]+)/i,
395
- /^(?:[^\n]+)/i,
396
- /^(?:$)/i
397
- ],
398
- conditions: { INITIAL: {
399
- rules: [
400
- 0,
401
- 1,
402
- 2,
403
- 3,
404
- 4,
405
- 5,
406
- 6,
407
- 7
408
- ],
409
- inclusive: !0
410
- } }
411
- };
412
- })();
413
- function g() {
414
- this.yy = {};
415
- }
416
- return e(g, "Parser"), g.prototype = h, h.Parser = g, new g();
417
- })();
418
- m.parser = m;
419
- var h = m, g = class {
420
- constructor() {
421
- this.stack = [], this.clear = this.clear.bind(this), this.addNode = this.addNode.bind(this), this.getRoot = this.getRoot.bind(this);
422
- }
423
- static {
424
- e(this, "IshikawaDB");
425
- }
426
- clear() {
427
- this.root = void 0, this.stack = [], this.baseLevel = void 0, i();
428
- }
429
- getRoot() {
430
- return this.root;
431
- }
432
- addNode(e, t) {
433
- let r = o.sanitizeText(t, l());
434
- if (!this.root) {
435
- this.root = {
436
- text: r,
437
- children: []
438
- }, this.stack = [{
439
- level: 0,
440
- node: this.root
441
- }], n(r);
442
- return;
443
- }
444
- this.baseLevel ??= e;
445
- let i = e - this.baseLevel + 1;
446
- for (i <= 0 && (i = 1); this.stack.length > 1 && this.stack[this.stack.length - 1].level >= i;) this.stack.pop();
447
- let a = this.stack[this.stack.length - 1].node, s = {
448
- text: r,
449
- children: []
450
- };
451
- a.children.push(s), this.stack.push({
452
- level: i,
453
- node: s
454
- });
455
- }
456
- getAccTitle() {
457
- return u();
458
- }
459
- setAccTitle(e) {
460
- r(e);
461
- }
462
- getAccDescription() {
463
- return s();
464
- }
465
- setAccDescription(e) {
466
- t(e);
467
- }
468
- getDiagramTitle() {
469
- return c();
470
- }
471
- setDiagramTitle(e) {
472
- n(e);
473
- }
474
- }, _ = 14, v = 250, y = 30, b = 60, x = 5, S = 82 * Math.PI / 180, C = Math.cos(S), w = Math.sin(S), T = /* @__PURE__ */ e((e, t, n) => {
475
- let r = e.node().getBBox(), i = r.width + t * 2, o = r.height + t * 2;
476
- a(e, o, i, n), e.attr("viewBox", `${r.x - t} ${r.y - t} ${i} ${o}`);
477
- }, "applyPaddedViewBox"), E = /* @__PURE__ */ e((e, t, n, r) => {
478
- let i = r.db.getRoot();
479
- if (!i) return;
480
- let a = l(), { look: o, handDrawnSeed: s, themeVariables: c } = a, u = d(a.fontSize)[0] ?? _, m = o === "handDrawn", h = i.children ?? [], g = a.ishikawa?.diagramPadding ?? 20, y = a.ishikawa?.useMaxWidth ?? !1, b = f(t), x = b.append("g").attr("class", "ishikawa"), S = m ? p.svg(b.node()) : void 0, C = S ? {
481
- roughSvg: S,
482
- seed: s ?? 0,
483
- lineColor: c?.lineColor ?? "#333",
484
- fillColor: c?.mainBkg ?? "#fff"
485
- } : void 0, w = `ishikawa-arrow-${t}`;
486
- m || x.append("defs").append("marker").attr("id", w).attr("viewBox", "0 0 10 10").attr("refX", 0).attr("refY", 5).attr("markerWidth", 6).attr("markerHeight", 6).attr("orient", "auto").append("path").attr("d", "M 10 0 L 0 5 L 10 10 Z").attr("class", "ishikawa-arrow");
487
- let E = 0, k = v, A = m ? void 0 : L(x, E, k, E, k, "ishikawa-spine");
488
- if (O(x, E, k, i.text, u, C), !h.length) {
489
- m && L(x, E, k, E, k, "ishikawa-spine", C), T(b, g, y);
490
- return;
491
- }
492
- E -= 20;
493
- let j = h.filter((e, t) => t % 2 == 0), N = h.filter((e, t) => t % 2 == 1), P = D(j), F = D(N), I = P.total + F.total, R = v, z = v;
494
- if (I > 0) {
495
- let e = v * 2, t = v * .3;
496
- R = Math.max(t, e * (P.total / I)), z = Math.max(t, e * (F.total / I));
497
- }
498
- let B = u * 2;
499
- R = Math.max(R, P.max * B), z = Math.max(z, F.max * B), k = Math.max(R, v), A && A.attr("y1", k).attr("y2", k), x.select(".ishikawa-head-group").attr("transform", `translate(0,${k})`);
500
- let V = Math.ceil(h.length / 2);
501
- for (let e = 0; e < V; e++) {
502
- let t = x.append("g").attr("class", "ishikawa-pair");
503
- for (let [n, r, i] of [[
504
- h[e * 2],
505
- -1,
506
- R
507
- ], [
508
- h[e * 2 + 1],
509
- 1,
510
- z
511
- ]]) n && M(t, n, E, k, r, i, u, C);
512
- E = t.selectAll("text").nodes().reduce((e, t) => Math.min(e, t.getBBox().x), Infinity);
513
- }
514
- if (m) L(x, E, k, 0, k, "ishikawa-spine", C);
515
- else {
516
- A.attr("x1", E);
517
- let e = `url(#${w})`;
518
- x.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start", e);
519
- }
520
- T(b, g, y);
521
- }, "draw"), D = /* @__PURE__ */ e((t) => {
522
- let n = /* @__PURE__ */ e((e) => e.children.reduce((e, t) => e + 1 + n(t), 0), "countDescendants");
523
- return t.reduce((e, t) => {
524
- let r = n(t);
525
- return e.total += r, e.max = Math.max(e.max, r), e;
526
- }, {
527
- total: 0,
528
- max: 0
529
- });
530
- }, "sideStats"), O = /* @__PURE__ */ e((e, t, n, r, i, a) => {
531
- let o = Math.max(6, Math.floor(110 / (i * .6))), s = e.append("g").attr("class", "ishikawa-head-group").attr("transform", `translate(${t},${n})`), c = F(s, P(r, o), 0, 0, "ishikawa-head-label", "start", i), l = c.node().getBBox(), u = Math.max(60, l.width + 6), d = Math.max(40, l.height * 2 + 40), f = `M 0 ${-d / 2} L 0 ${d / 2} Q ${u * 2.4} 0 0 ${-d / 2} Z`;
532
- if (a) {
533
- let e = a.roughSvg.path(f, {
534
- roughness: 1.5,
535
- seed: a.seed,
536
- fill: a.fillColor,
537
- fillStyle: "hachure",
538
- fillWeight: 2.5,
539
- hachureGap: 5,
540
- stroke: a.lineColor,
541
- strokeWidth: 2
542
- });
543
- s.insert(() => e, ":first-child").attr("class", "ishikawa-head");
544
- } else s.insert("path", ":first-child").attr("class", "ishikawa-head").attr("d", f);
545
- c.attr("transform", `translate(${(u - l.width) / 2 - l.x + 3},${-l.y - l.height / 2})`);
546
- }, "drawHead"), k = /* @__PURE__ */ e((t, n) => {
547
- let r = [], i = [], a = /* @__PURE__ */ e((e, t, o) => {
548
- let s = n === -1 ? [...e].reverse() : e;
549
- for (let e of s) {
550
- let n = r.length, s = e.children ?? [];
551
- r.push({
552
- depth: o,
553
- text: P(e.text, 15),
554
- parentIndex: t,
555
- childCount: s.length
556
- }), o % 2 == 0 ? (i.push(n), s.length && a(s, n, o + 1)) : (s.length && a(s, n, o + 1), i.push(n));
557
- }
558
- }, "walk");
559
- return a(t, -1, 2), {
560
- entries: r,
561
- yOrder: i
562
- };
563
- }, "flattenTree"), A = /* @__PURE__ */ e((e, t, n, r, i, a, o) => {
564
- let s = e.append("g").attr("class", "ishikawa-label-group"), c = F(s, t, n, r + 11 * i, "ishikawa-label cause", "middle", a).node().getBBox();
565
- if (o) {
566
- let e = o.roughSvg.rectangle(c.x - 20, c.y - 2, c.width + 40, c.height + 4, {
567
- roughness: 1.5,
568
- seed: o.seed,
569
- fill: o.fillColor,
570
- fillStyle: "hachure",
571
- fillWeight: 2.5,
572
- hachureGap: 5,
573
- stroke: o.lineColor,
574
- strokeWidth: 2
575
- });
576
- s.insert(() => e, ":first-child").attr("class", "ishikawa-label-box");
577
- } else s.insert("rect", ":first-child").attr("class", "ishikawa-label-box").attr("x", c.x - 20).attr("y", c.y - 2).attr("width", c.width + 40).attr("height", c.height + 4);
578
- }, "drawCauseLabel"), j = /* @__PURE__ */ e((e, t, n, r, i, a) => {
579
- let o = Math.sqrt(r * r + i * i);
580
- if (o === 0) return;
581
- let s = r / o, c = i / o, l = -c * 6, u = s * 6, d = t, f = n, p = `M ${d} ${f} L ${d - s * 6 * 2 + l} ${f - c * 6 * 2 + u} L ${d - s * 6 * 2 - l} ${f - c * 6 * 2 - u} Z`, m = a.roughSvg.path(p, {
582
- roughness: 1,
583
- seed: a.seed,
584
- fill: a.lineColor,
585
- fillStyle: "solid",
586
- stroke: a.lineColor,
587
- strokeWidth: 1
588
- });
589
- e.append(() => m);
590
- }, "drawArrowMarker"), M = /* @__PURE__ */ e((e, t, n, r, i, a, o, s) => {
591
- let c = t.children ?? [], l = a * (c.length ? 1 : .2), u = -C * l, d = w * l * i, f = n + u, p = r + d;
592
- if (L(e, n, r, f, p, "ishikawa-branch", s), s && j(e, n, r, n - f, r - p, s), A(e, t.text, f, p, i, o, s), !c.length) return;
593
- let { entries: m, yOrder: h } = k(c, i), g = m.length, _ = Array(g);
594
- for (let [e, t] of h.entries()) _[t] = r + d * ((e + 1) / (g + 1));
595
- let v = /* @__PURE__ */ new Map();
596
- v.set(-1, {
597
- x0: n,
598
- y0: r,
599
- x1: f,
600
- y1: p,
601
- childCount: c.length,
602
- childrenDrawn: 0
603
- });
604
- let S = -C, T = w * i, E = i < 0 ? "ishikawa-label up" : "ishikawa-label down";
605
- for (let [t, n] of m.entries()) {
606
- let r = _[t], i = v.get(n.parentIndex), a = e.append("g").attr("class", "ishikawa-sub-group"), c = 0, l = 0, u = 0;
607
- if (n.depth % 2 == 0) {
608
- let e = i.y1 - i.y0;
609
- c = I(i.x0, i.x1, e ? (r - i.y0) / e : .5), l = r, u = c - (n.childCount > 0 ? b + n.childCount * x : y), L(a, c, r, u, r, "ishikawa-sub-branch", s), s && j(a, c, r, 1, 0, s), F(a, n.text, u, r, "ishikawa-label align", "end", o);
610
- } else {
611
- let e = i.childrenDrawn++;
612
- c = I(i.x0, i.x1, (i.childCount - e) / (i.childCount + 1)), l = i.y0, u = c + S * ((r - l) / T), L(a, c, l, u, r, "ishikawa-sub-branch", s), s && j(a, c, l, c - u, l - r, s), F(a, n.text, u, r, E, "end", o);
613
- }
614
- n.childCount > 0 && v.set(t, {
615
- x0: c,
616
- y0: l,
617
- x1: u,
618
- y1: r,
619
- childCount: n.childCount,
620
- childrenDrawn: 0
621
- });
622
- }
623
- }, "drawBranch"), N = /* @__PURE__ */ e((e) => e.split(/<br\s*\/?>|\n/), "splitLines"), P = /* @__PURE__ */ e((e, t) => {
624
- if (e.length <= t) return e;
625
- let n = [];
626
- for (let r of e.split(/\s+/)) {
627
- let e = n.length - 1;
628
- e >= 0 && n[e].length + 1 + r.length <= t ? n[e] += " " + r : n.push(r);
629
- }
630
- return n.join("\n");
631
- }, "wrapText"), F = /* @__PURE__ */ e((e, t, n, r, i, a, o) => {
632
- let s = N(t), c = o * 1.05, l = e.append("text").attr("class", i).attr("text-anchor", a).attr("x", n).attr("y", r - (s.length - 1) * c / 2);
633
- for (let [e, t] of s.entries()) l.append("tspan").attr("x", n).attr("dy", e === 0 ? 0 : c).text(t);
634
- return l;
635
- }, "drawMultilineText"), I = /* @__PURE__ */ e((e, t, n) => e + (t - e) * n, "lerp"), L = /* @__PURE__ */ e((e, t, n, r, i, a, o) => {
636
- if (o) {
637
- let s = o.roughSvg.line(t, n, r, i, {
638
- roughness: 1.5,
639
- seed: o.seed,
640
- stroke: o.lineColor,
641
- strokeWidth: 2
642
- });
643
- e.append(() => s).attr("class", a);
644
- return;
645
- }
646
- return e.append("line").attr("class", a).attr("x1", t).attr("y1", n).attr("x2", r).attr("y2", i);
647
- }, "drawLine"), R = {
648
- parser: h,
649
- get db() {
650
- return new g();
651
- },
652
- renderer: { draw: E },
653
- styles: /* @__PURE__ */ e((e) => `
654
- .ishikawa .ishikawa-spine,
655
- .ishikawa .ishikawa-branch,
656
- .ishikawa .ishikawa-sub-branch {
657
- stroke: ${e.lineColor};
658
- stroke-width: 2;
659
- fill: none;
660
- }
661
-
662
- .ishikawa .ishikawa-sub-branch {
663
- stroke-width: 1;
664
- }
665
-
666
- .ishikawa .ishikawa-arrow {
667
- fill: ${e.lineColor};
668
- }
669
-
670
- .ishikawa .ishikawa-head {
671
- fill: ${e.mainBkg};
672
- stroke: ${e.lineColor};
673
- stroke-width: 2;
674
- }
675
-
676
- .ishikawa .ishikawa-label-box {
677
- fill: ${e.mainBkg};
678
- stroke: ${e.lineColor};
679
- stroke-width: 2;
680
- }
681
-
682
- .ishikawa text {
683
- font-family: ${e.fontFamily};
684
- font-size: ${e.fontSize};
685
- fill: ${e.textColor};
686
- }
687
-
688
- .ishikawa .ishikawa-head-label {
689
- font-weight: 600;
690
- text-anchor: middle;
691
- dominant-baseline: middle;
692
- font-size: 14px;
693
- }
694
-
695
- .ishikawa .ishikawa-label {
696
- text-anchor: end;
697
- }
698
-
699
- .ishikawa .ishikawa-label.cause {
700
- text-anchor: middle;
701
- dominant-baseline: middle;
702
- }
703
-
704
- .ishikawa .ishikawa-label.align {
705
- text-anchor: end;
706
- dominant-baseline: middle;
707
- }
708
-
709
- .ishikawa .ishikawa-label.up {
710
- dominant-baseline: baseline;
711
- }
712
-
713
- .ishikawa .ishikawa-label.down {
714
- dominant-baseline: hanging;
715
- }
716
- `, "getStyles")
717
- };
718
- //#endregion
719
- export { R as diagram };