@sme.up/ketchup2 2.7.0 → 2.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (288) hide show
  1. package/dist/abnfDiagram-VCTEODGH-DwAVRNNu.js +89 -0
  2. package/dist/{arc-CVbkjF8U.js → arc-DXfwi1YX.js} +8 -6
  3. package/dist/architecture-7GRP2DOG-BsytjMto.js +3 -0
  4. package/dist/{architectureDiagram-3BPJPVTR-B6VZAtZU.js → architectureDiagram-5GKGNRK7-N1aPr2hw.js} +636 -540
  5. package/dist/assets/svg/functions.svg +1 -0
  6. package/dist/basic-components/autocomplete/autocomplete.d.ts.map +1 -1
  7. package/dist/basic-components/button-list/button-list-types.d.ts +2 -1
  8. package/dist/basic-components/button-list/button-list-types.d.ts.map +1 -1
  9. package/dist/basic-components/button-list/button-list.d.ts.map +1 -1
  10. package/dist/basic-components/cell/cell-types.d.ts +5 -0
  11. package/dist/basic-components/cell/cell-types.d.ts.map +1 -1
  12. package/dist/basic-components/cell/cell.d.ts.map +1 -1
  13. package/dist/basic-components/checkbox/checkbox-types.d.ts +5 -0
  14. package/dist/basic-components/checkbox/checkbox-types.d.ts.map +1 -1
  15. package/dist/basic-components/chips/chips-types.d.ts +15 -1
  16. package/dist/basic-components/chips/chips-types.d.ts.map +1 -1
  17. package/dist/basic-components/chips/chips.d.ts.map +1 -1
  18. package/dist/basic-components/chips-input/chips-input-types.d.ts +5 -0
  19. package/dist/basic-components/chips-input/chips-input-types.d.ts.map +1 -1
  20. package/dist/basic-components/chips-input/chips-input.d.ts.map +1 -1
  21. package/dist/basic-components/file-upload/file-upload-hook.d.ts.map +1 -1
  22. package/dist/basic-components/list/list.d.ts.map +1 -1
  23. package/dist/basic-components/multiple-autocomplete/multiple-autocomplete-types.d.ts +5 -0
  24. package/dist/basic-components/multiple-autocomplete/multiple-autocomplete-types.d.ts.map +1 -1
  25. package/dist/basic-components/multiple-autocomplete/multiple-autocomplete.d.ts.map +1 -1
  26. package/dist/basic-components/multiple-select/multiple-select-types.d.ts +5 -0
  27. package/dist/basic-components/multiple-select/multiple-select-types.d.ts.map +1 -1
  28. package/dist/basic-components/multiple-select/multiple-select.d.ts.map +1 -1
  29. package/dist/basic-components/select/select.d.ts.map +1 -1
  30. package/dist/blockDiagram-I7D4REHJ-Cu18ws5-.js +1922 -0
  31. package/dist/{c4Diagram-AAUBKEIU-CdT8VCbo.js → c4Diagram-7LVT6UL2-B-uBy_NE.js} +899 -850
  32. package/dist/{channel-C-LAmObA.js → channel-CuEby436.js} +1 -1
  33. package/dist/chunk-2E4U76K2-ComA5SPA.js +348 -0
  34. package/dist/{chunk-QZHKN3VN-lYfzaOt9.js → chunk-2Q5K7J3B-kzxEEeTu.js} +2 -2
  35. package/dist/{chunk-3OPIFGDE-Bs2mXISw.js → chunk-4HAMMTFA-CZgIgrp_.js} +1667 -1145
  36. package/dist/{chunk-FMBD7UC4-BURT0llY.js → chunk-5VM5RSS4-Cr17nBXp.js} +2 -2
  37. package/dist/{chunk-5ZQYHXKU-B_nOC8-n.js → chunk-75Z2AOVW-Drsj7a97.js} +106 -136
  38. package/dist/chunk-CLGD4ZFX-CLGio9rD.js +14 -0
  39. package/dist/{chunk-CSCIHK7Q-BEk3YcEH.js → chunk-DU6HZSFF-waeanndy.js} +1005 -768
  40. package/dist/{chunk-ND2GUHAM-Ca12h-m9.js → chunk-F27PBJKO-jIrOJO87.js} +18 -17
  41. package/dist/{chunk-NNHCCRGN-BB1q5NkR.js → chunk-FOHPRMQF-LRqOLsSw.js} +5518 -4708
  42. package/dist/{chunk-O5CBEL6O-DbWeP4Au.js → chunk-GMAD6QVW-D80II4AD.js} +486 -520
  43. package/dist/chunk-GVQU2GXP-DP3t_9Rl.js +37 -0
  44. package/dist/{chunk-AQP2D5EJ-vJ_pitKp.js → chunk-IMKFNOWR-8ItzAAcf.js} +336 -318
  45. package/dist/{chunk-4BX2VUAB-zglw1T4d.js → chunk-JWPE2WC7-Ccb0QaC8.js} +2 -2
  46. package/dist/chunk-L3NEJ4N5-qPot4t6M.js +245 -0
  47. package/dist/chunk-LNGE3PJU-CtYcu9x8.js +1521 -0
  48. package/dist/{chunk-KSCS5N6A-BemQomLE.js → chunk-OSK3NFVY-CQhPF3Mc.js} +310 -198
  49. package/dist/chunk-P2QGCYS3-BUeNZ170.js +67 -0
  50. package/dist/chunk-POPQ4Y6H-CU9oz17Z.js +26 -0
  51. package/dist/chunk-PWAF6VOD-D37VoZ8H.js +275 -0
  52. package/dist/{flowDiagram-I6XJVG4X-DnsxKD0w.js → chunk-SHT3W25Y-Cri27Jke.js} +581 -543
  53. package/dist/chunk-SVP7TREG-CyJlOPau.js +490 -0
  54. package/dist/{chunk-727SXJPM-CDeV7mmg.js → chunk-TICWLB2K-Cw2iT_VD.js} +191 -185
  55. package/dist/{chunk-LZXEDZCA-J9irjuVP.js → chunk-TLUHSLCS-BdsLNXjt.js} +35 -25
  56. package/dist/chunk-XXDRQBXY-C1ZEFXGu.js +9 -0
  57. package/dist/chunk-Y2CYZVJY-i11wjrBe.js +12 -0
  58. package/dist/classDiagram-ZZMXUADV-L32jCfMj.js +30 -0
  59. package/dist/classDiagram-v2-VYDZK3BY-BsnrDCgX.js +30 -0
  60. package/dist/components/activity-timeline/activity-timeline-types.d.ts +46 -0
  61. package/dist/components/activity-timeline/activity-timeline-types.d.ts.map +1 -0
  62. package/dist/components/activity-timeline/activity-timeline.d.ts +4 -0
  63. package/dist/components/activity-timeline/activity-timeline.d.ts.map +1 -0
  64. package/dist/components/app-bar/app-bar.d.ts.map +1 -1
  65. package/dist/components/breadcrumbs/breadcrumbs.d.ts.map +1 -1
  66. package/dist/components/chat/chat.d.ts.map +1 -1
  67. package/dist/components/data-table/assets/data-table-row-actions-collapsed.d.ts +12 -0
  68. package/dist/components/data-table/assets/data-table-row-actions-collapsed.d.ts.map +1 -0
  69. package/dist/components/data-table/assets/data-table-row-actions.d.ts +11 -0
  70. package/dist/components/data-table/assets/data-table-row-actions.d.ts.map +1 -0
  71. package/dist/components/data-table/data-table-types.d.ts +52 -1
  72. package/dist/components/data-table/data-table-types.d.ts.map +1 -1
  73. package/dist/components/data-table/data-table.d.ts.map +1 -1
  74. package/dist/components/data-table/header/Header.d.ts.map +1 -1
  75. package/dist/components/data-table/header/header-types.d.ts +7 -1
  76. package/dist/components/data-table/header/header-types.d.ts.map +1 -1
  77. package/dist/components/echarts/echarts-graph.d.ts.map +1 -1
  78. package/dist/components/scaffold/context/scaffold-provider.d.ts.map +1 -1
  79. package/dist/components/tab-bar/tab-bar-assets.d.ts +1 -0
  80. package/dist/components/tab-bar/tab-bar-assets.d.ts.map +1 -1
  81. package/dist/components/tab-bar/tab-bar.d.ts.map +1 -1
  82. package/dist/components/tooltip/tooltip.d.ts.map +1 -1
  83. package/dist/components/workflow-designer/workflow-designer-metadata-panel.d.ts +14 -0
  84. package/dist/components/workflow-designer/workflow-designer-metadata-panel.d.ts.map +1 -0
  85. package/dist/components/workflow-designer/workflow-designer-types.d.ts +40 -7
  86. package/dist/components/workflow-designer/workflow-designer-types.d.ts.map +1 -1
  87. package/dist/components/workflow-designer/workflow-designer-utils.d.ts +80 -1
  88. package/dist/components/workflow-designer/workflow-designer-utils.d.ts.map +1 -1
  89. package/dist/components/workflow-designer/workflow-designer-utils.test.d.ts +2 -0
  90. package/dist/components/workflow-designer/workflow-designer-utils.test.d.ts.map +1 -0
  91. package/dist/components/workflow-designer/workflow-designer.d.ts +4 -3
  92. package/dist/components/workflow-designer/workflow-designer.d.ts.map +1 -1
  93. package/dist/{cose-bilkent-S5V4N54A-BhA3VnPW.js → cose-bilkent-JH36ORCC-Qs_Z6zBZ.js} +87 -83
  94. package/dist/cynefin-OW5HDTMX-BJXlKro0.js +3 -0
  95. package/dist/cynefinDiagram-5FMLGOSQ-3Ha1hdlV.js +355 -0
  96. package/dist/{cytoscape.esm-BU21wl3m.js → cytoscape.esm-C5TvPYYm.js} +2749 -2701
  97. package/dist/{dagre-3-RnF0EK.js → dagre-D5csT9sx.js} +144 -146
  98. package/dist/dagre-GXQ25YYZ-Bg7xf6xn.js +425 -0
  99. package/dist/{defaultLocale-DnzPsei5.js → defaultLocale-N-0uLSyg.js} +1 -4
  100. package/dist/diagram-S7CK7UJ4-BuDHTdHA.js +301 -0
  101. package/dist/{diagram-2AECGRRQ-23vM90dy.js → diagram-UQ7AKVKN-uvzJGj43.js} +82 -81
  102. package/dist/{diagram-KO2AKTUF-BEnEQF6b.js → diagram-VSXAHHWV-CrQQCs-B.js} +66 -65
  103. package/dist/{diagram-OG6HWLK6-Cfbv6mIH.js → diagram-VX7I27RA-BNmG1sig.js} +92 -89
  104. package/dist/{diagram-LMA3HP47-OWxAHrmz.js → diagram-Z3DM3KII-B6BrLhP0.js} +21 -20
  105. package/dist/{dist-Btd8EZyy.js → dist-CsrMlyO_.js} +2 -3
  106. package/dist/ebnfDiagram-PWID7BFC-DMx8xAFO.js +100 -0
  107. package/dist/erDiagram-RLTQ6QDP-bkJ9nzVK.js +1966 -0
  108. package/dist/eventmodeling-NTZA5JFV-Cj-VH7yh.js +3 -0
  109. package/dist/flowDiagram-HODETNUW-BIvD7-ts.js +17 -0
  110. package/dist/functional-components/multiple-field/multiple-field-types.d.ts +2 -0
  111. package/dist/functional-components/multiple-field/multiple-field-types.d.ts.map +1 -1
  112. package/dist/functional-components/multiple-field/multiple-field.d.ts.map +1 -1
  113. package/dist/functional-components/row/row-types.d.ts +5 -0
  114. package/dist/functional-components/row/row-types.d.ts.map +1 -1
  115. package/dist/functional-components/row/row.d.ts.map +1 -1
  116. package/dist/functional-components/timeline-engine/components/gantt/gantt-assets.d.ts +3 -1
  117. package/dist/functional-components/timeline-engine/components/gantt/gantt-assets.d.ts.map +1 -1
  118. package/dist/functional-components/timeline-engine/timeline-engine-utils.d.ts.map +1 -1
  119. package/dist/functional-components/tree-picker/tree-picker-types.d.ts +42 -0
  120. package/dist/functional-components/tree-picker/tree-picker-types.d.ts.map +1 -0
  121. package/dist/functional-components/tree-picker/tree-picker.d.ts +3 -0
  122. package/dist/functional-components/tree-picker/tree-picker.d.ts.map +1 -0
  123. package/dist/{ganttDiagram-6RSMTGT7-CwbJqdwB.js → ganttDiagram-EL5Y4UJY-CL-ywzz_.js} +703 -710
  124. package/dist/gitGraph-4MIJSDKK-C9JGDovl.js +3 -0
  125. package/dist/{gitGraphDiagram-PVQCEYII-mL2WiT98.js → gitGraphDiagram-WWUBYQGX-aXhNDG6P.js} +156 -151
  126. package/dist/{graphlib-VMWSbyYi.js → graphlib-XW-Jr8pF.js} +5 -5
  127. package/dist/index.d.ts +4 -1
  128. package/dist/index.d.ts.map +1 -1
  129. package/dist/info-A6RAGUB7-CmZJKEaW.js +3 -0
  130. package/dist/infoDiagram-27XIBGKW-Je4heBlk.js +20 -0
  131. package/dist/{init-MwSGRDIl.js → init-CsQUQz36.js} +1 -3
  132. package/dist/{ishikawaDiagram-YF4QCWOH-DGOgWzve.js → ishikawaDiagram-5VMMS53U-DK7HlH95.js} +142 -141
  133. package/dist/{journeyDiagram-JHISSGLW-CHVTMdrq.js → journeyDiagram-3NMN7TZE-CpuYEKcB.js} +192 -191
  134. package/dist/{kanban-definition-UN3LZRKU-upKA3b5x.js → kanban-definition-UXKFOSKX-aK8uKmyY.js} +149 -146
  135. package/dist/{katex-D-2KeLwt.js → katex-CT2p8LXT.js} +1627 -1650
  136. package/dist/ketchup2.css +1 -1
  137. package/dist/ketchup2.es.js +34744 -32755
  138. package/dist/{line-DIhSUgmA.js → line-DTqYMLoX.js} +2 -2
  139. package/dist/{linear-DUAteVwl.js → linear-CXc5xaa6.js} +8 -9
  140. package/dist/locale/en/translation.json.d.ts +16 -0
  141. package/dist/locale/it/translation.json.d.ts +16 -0
  142. package/dist/mermaid-parser.core-BwVmI_Rq.js +638 -0
  143. package/dist/{mindmap-definition-RKZ34NQL-C3YkCJDi.js → mindmap-definition-YA3MSWOX-ZMYcmi9J.js} +170 -170
  144. package/dist/{ordinal-D_ZgubzR.js → ordinal-BubEveRk.js} +1 -1
  145. package/dist/packet-AYTQ26CC-B3tgRshR.js +3 -0
  146. package/dist/{path-DGNPZRdx.js → path-CnWkkRiY.js} +10 -11
  147. package/dist/pegDiagram-XKGWAZYB-DsfILwZN.js +94 -0
  148. package/dist/pie-WAS4IAKB-BRiI8kbI.js +3 -0
  149. package/dist/pieDiagram-E7YTZNPT-DcSLcLdd.js +203 -0
  150. package/dist/{quadrantDiagram-W4KKPZXB-C2oA-eGZ.js → quadrantDiagram-AXDQQJYC-DSx3teop.js} +300 -300
  151. package/dist/radar-RG4KPBEZ-ASOMQXFw.js +3 -0
  152. package/dist/railroad-74A4TZTK-oS840SLr.js +3 -0
  153. package/dist/railroad-abnf-HS5TGJTU-nnQAkZY2.js +3 -0
  154. package/dist/railroad-ebnf-LZEXJU2U-DBQIOba3.js +3 -0
  155. package/dist/railroad-peg-WCYAUIDC-fBPN2TVb.js +3 -0
  156. package/dist/railroadDiagram-O6MQD6OU-jOZRtNDi.js +76 -0
  157. package/dist/{requirementDiagram-4Y6WPE33-BEGryahw.js → requirementDiagram-BXWQKSXE-D14hkkez.js} +176 -173
  158. package/dist/{rough.esm-rcMoXTJj.js → rough.esm-DXYGHN3m.js} +60 -51
  159. package/dist/{sankeyDiagram-5OEKKPKP-VPzKV4zM.js → sankeyDiagram-P5KCCOFB-C0jmknYo.js} +123 -120
  160. package/dist/{sequenceDiagram-3UESZ5HK-Bc30_Cm2.js → sequenceDiagram-WJ2MYXX4-C00egnMz.js} +714 -722
  161. package/dist/sizeCapture-INFHLROL-CHXIsPO_.js +46 -0
  162. package/dist/{src-DjDATEq3.js → src-DQoflmwT.js} +499 -509
  163. package/dist/stateDiagram-D77RDMKH-YfzmviNY.js +220 -0
  164. package/dist/stateDiagram-v2-MP3YSRHH-B6Hzx8T0.js +30 -0
  165. package/dist/swimlanes-42K2YHIH-CJcMmxXf.js +4979 -0
  166. package/dist/swimlanesDiagram-VR7AAH4N-DirvhGBA.js +31 -0
  167. package/dist/{timeline-definition-PNZ67QCA-1z911Ume.js → timeline-definition-24CTP7MA-D2xfYuSV.js} +220 -219
  168. package/dist/treeView-Q6P3EWNA-BmvB2b-_.js +3 -0
  169. package/dist/treemap-WGGIJYW6-Cjjk75wA.js +3 -0
  170. package/dist/types/translation.d.ts +17 -1
  171. package/dist/types/translation.d.ts.map +1 -1
  172. package/dist/utils/data-structures.d.ts +2 -1
  173. package/dist/utils/data-structures.d.ts.map +1 -1
  174. package/dist/{v4-BK7K-jy_.js → v4-DIjJgmR0.js} +1 -1
  175. package/dist/{vennDiagram-CIIHVFJN-BiLcQ0SR.js → vennDiagram-4TSXK5OY-C4XLgus_.js} +332 -310
  176. package/dist/wardley-WFR3VGLG-BamDiE0x.js +3 -0
  177. package/dist/{wardleyDiagram-YWT4CUSO-Bq-BejOl.js → wardleyDiagram-VM6X3IG4-DFoKuS9s.js} +156 -155
  178. package/dist/{xychartDiagram-2RQKCTM6-B13zquXC.js → xychartDiagram-S5SC5T6Z-BzKKgVBe.js} +740 -574
  179. package/package.json +41 -38
  180. package/dist/arc-w3BipdfE.cjs +0 -1
  181. package/dist/architecture-7EHR7CIX-Bzeobe9Y.cjs +0 -1
  182. package/dist/architecture-7EHR7CIX-C8NPmR2w.js +0 -3
  183. package/dist/architectureDiagram-3BPJPVTR-DlnXl9d5.cjs +0 -36
  184. package/dist/array-DZSRzHA_.cjs +0 -1
  185. package/dist/blockDiagram-GPEHLZMM-BohmRoCC.js +0 -3157
  186. package/dist/blockDiagram-GPEHLZMM-rfyR2Ffl.cjs +0 -132
  187. package/dist/c4Diagram-AAUBKEIU-Du1vqJYZ.cjs +0 -10
  188. package/dist/channel-DJpMBAs-.cjs +0 -1
  189. package/dist/chunk-2J33WTMH-BMqA-riF.js +0 -25
  190. package/dist/chunk-2J33WTMH-BQs9SXq8.cjs +0 -1
  191. package/dist/chunk-3OPIFGDE-Bk_ByTBh.cjs +0 -62
  192. package/dist/chunk-4BX2VUAB-C8VW0QW0.cjs +0 -1
  193. package/dist/chunk-55IACEB6-CNxnI3nm.cjs +0 -1
  194. package/dist/chunk-55IACEB6-CmKDx-YO.js +0 -8
  195. package/dist/chunk-5ZQYHXKU-DMrStm4M.cjs +0 -2
  196. package/dist/chunk-727SXJPM-Dj8nsm0O.cjs +0 -206
  197. package/dist/chunk-AQP2D5EJ-CYuEYK6i.cjs +0 -231
  198. package/dist/chunk-BSJP7CBP-CSCICPww.cjs +0 -1
  199. package/dist/chunk-BSJP7CBP-YsQACkyC.js +0 -82
  200. package/dist/chunk-CSCIHK7Q-BAdl6GW-.cjs +0 -124
  201. package/dist/chunk-FMBD7UC4-BIKI8zae.cjs +0 -15
  202. package/dist/chunk-KSCS5N6A-DsN7gJEf.cjs +0 -10
  203. package/dist/chunk-L5ZTLDWV-BQCNoMVG.js +0 -32
  204. package/dist/chunk-L5ZTLDWV-BbLRyKcx.cjs +0 -1
  205. package/dist/chunk-LZXEDZCA-rjLYyX5U.cjs +0 -1
  206. package/dist/chunk-ND2GUHAM-1o9Sjy2_.cjs +0 -1
  207. package/dist/chunk-NNHCCRGN-qV8bfiMQ.cjs +0 -159
  208. package/dist/chunk-NZK2D7GU-CPxdSJTy.js +0 -67
  209. package/dist/chunk-NZK2D7GU-CRneGIrP.cjs +0 -1
  210. package/dist/chunk-O5CBEL6O-Cd4Z5Dy9.cjs +0 -70
  211. package/dist/chunk-QZHKN3VN-ZJ4hLUIw.cjs +0 -1
  212. package/dist/chunk-WU5MYG2G-DuCEb9G-.js +0 -9
  213. package/dist/chunk-WU5MYG2G-ExiaHFbF.cjs +0 -1
  214. package/dist/chunk-XPW4576I-BybfDrup.cjs +0 -32
  215. package/dist/chunk-XPW4576I-D3DQ47oC.js +0 -1146
  216. package/dist/classDiagram-4FO5ZUOK-CRX1QumH.js +0 -29
  217. package/dist/classDiagram-4FO5ZUOK-yTAlLFG2.cjs +0 -1
  218. package/dist/classDiagram-v2-Q7XG4LA2-oM01mYfB.js +0 -29
  219. package/dist/classDiagram-v2-Q7XG4LA2-yTAlLFG2.cjs +0 -1
  220. package/dist/cose-bilkent-S5V4N54A-D7fhWOP4.cjs +0 -1
  221. package/dist/cytoscape.esm-CElDUMAx.cjs +0 -321
  222. package/dist/dagre-B2BBwKNb.cjs +0 -1
  223. package/dist/dagre-BM42HDAG-DfpR5Mml.js +0 -297
  224. package/dist/dagre-BM42HDAG-kORxgFz_.cjs +0 -4
  225. package/dist/defaultLocale-u9yUoUmE.cjs +0 -1
  226. package/dist/diagram-2AECGRRQ-B0IEGKjr.cjs +0 -43
  227. package/dist/diagram-5GNKFQAL-BEY9x4us.js +0 -101
  228. package/dist/diagram-5GNKFQAL-vb6e35PR.cjs +0 -10
  229. package/dist/diagram-KO2AKTUF-9V_zu-2x.cjs +0 -3
  230. package/dist/diagram-LMA3HP47-BN_geiB9.cjs +0 -24
  231. package/dist/diagram-OG6HWLK6-6OnEK9-6.cjs +0 -24
  232. package/dist/dist-D8RD2QWc.cjs +0 -1
  233. package/dist/erDiagram-TEJ5UH35-6OEXIM6m.js +0 -1700
  234. package/dist/erDiagram-TEJ5UH35-CzsOt0l4.cjs +0 -85
  235. package/dist/eventmodeling-FCH6USID-Cued7Lz2.cjs +0 -1
  236. package/dist/eventmodeling-FCH6USID-mCB8hc7X.js +0 -3
  237. package/dist/flowDiagram-I6XJVG4X-DR1CMtZZ.cjs +0 -162
  238. package/dist/ganttDiagram-6RSMTGT7-C5t5_mjf.cjs +0 -292
  239. package/dist/gitGraph-WXDBUCRP-B23gOjfP.js +0 -3
  240. package/dist/gitGraph-WXDBUCRP-Bi-Y5dA7.cjs +0 -1
  241. package/dist/gitGraphDiagram-PVQCEYII-CLdgm7yJ.cjs +0 -106
  242. package/dist/graphlib-CkkG5MuS.cjs +0 -1
  243. package/dist/info-J43DQDTF-DC3N8SoX.js +0 -3
  244. package/dist/info-J43DQDTF-jRjlWVKj.cjs +0 -1
  245. package/dist/infoDiagram-5YYISTIA-BIM8xaiE.js +0 -19
  246. package/dist/infoDiagram-5YYISTIA-CbnHgs-I.cjs +0 -2
  247. package/dist/init-07zIhv_j.cjs +0 -1
  248. package/dist/ishikawaDiagram-YF4QCWOH-DAWMXD1l.cjs +0 -70
  249. package/dist/journeyDiagram-JHISSGLW-DfnmJPLn.cjs +0 -139
  250. package/dist/kanban-definition-UN3LZRKU-CbeoJJE7.cjs +0 -89
  251. package/dist/katex-CkiTumqg.cjs +0 -257
  252. package/dist/ketchup2.cjs.js +0 -485
  253. package/dist/line-CzwncDY3.cjs +0 -1
  254. package/dist/linear-1lpO_WlJ.cjs +0 -1
  255. package/dist/mermaid-parser.core-ADyJ_PY4.cjs +0 -3
  256. package/dist/mermaid-parser.core-D6xVjl2t.js +0 -373
  257. package/dist/mindmap-definition-RKZ34NQL-C8cZ7xN-.cjs +0 -96
  258. package/dist/ordinal-CUPR-p0T.cjs +0 -1
  259. package/dist/packet-YPE3B663-CGZxZ1Z0.cjs +0 -1
  260. package/dist/packet-YPE3B663-D2JW2EUF.js +0 -3
  261. package/dist/path-Kklx0M1v.cjs +0 -1
  262. package/dist/pie-LRSECV5Y-BHyd33ZA.js +0 -3
  263. package/dist/pie-LRSECV5Y-Ca_qbHEv.cjs +0 -1
  264. package/dist/pieDiagram-4H26LBE5-BvhguaHn.js +0 -165
  265. package/dist/pieDiagram-4H26LBE5-DpDrJBQK.cjs +0 -30
  266. package/dist/quadrantDiagram-W4KKPZXB-hWSN7YfD.cjs +0 -7
  267. package/dist/radar-GUYGQ44K-BpJWFTCm.js +0 -3
  268. package/dist/radar-GUYGQ44K-CYqWSxO_.cjs +0 -1
  269. package/dist/requirementDiagram-4Y6WPE33-GmjmsbiY.cjs +0 -84
  270. package/dist/rough.esm-r0QOSzHM.cjs +0 -1
  271. package/dist/sankeyDiagram-5OEKKPKP-DbGAx-Bm.cjs +0 -40
  272. package/dist/sequenceDiagram-3UESZ5HK-D85rpewi.cjs +0 -162
  273. package/dist/src-DEmZ9bFr.cjs +0 -1
  274. package/dist/stateDiagram-AJRCARHV-Bg4Y3HPa.cjs +0 -1
  275. package/dist/stateDiagram-AJRCARHV-wqjltbKb.js +0 -217
  276. package/dist/stateDiagram-v2-BHNVJYJU-Cgrf5tQC.js +0 -27
  277. package/dist/stateDiagram-v2-BHNVJYJU-D_Tzn4WM.cjs +0 -1
  278. package/dist/timeline-definition-PNZ67QCA-Dpu3hfhP.cjs +0 -120
  279. package/dist/treeView-BLDUP644-C9tQMbiq.js +0 -3
  280. package/dist/treeView-BLDUP644-DKh9BcaT.cjs +0 -1
  281. package/dist/treemap-LRROVOQU-2aferAph.cjs +0 -1
  282. package/dist/treemap-LRROVOQU-CBv3oGC3.js +0 -3
  283. package/dist/v4-Dyp-SQ1c.cjs +0 -1
  284. package/dist/vennDiagram-CIIHVFJN-BLBDqWTG.cjs +0 -34
  285. package/dist/wardley-L42UT6IY-CIM0_V5T.js +0 -3
  286. package/dist/wardley-L42UT6IY-DjjjOB8T.cjs +0 -1
  287. package/dist/wardleyDiagram-YWT4CUSO-dzyAWKiV.cjs +0 -78
  288. package/dist/xychartDiagram-2RQKCTM6-DA3O42Dk.cjs +0 -7
@@ -0,0 +1,490 @@
1
+ import { m as e } from "./src-DQoflmwT.js";
2
+ import { D as t, a as n, b as r, c as i, x as a, z as o } from "./chunk-DU6HZSFF-waeanndy.js";
3
+ import { n as s } from "./chunk-Y2CYZVJY-i11wjrBe.js";
4
+ import { t as c } from "./chunk-CLGD4ZFX-CLGio9rD.js";
5
+ //#region node_modules/mermaid/dist/chunks/mermaid.core/chunk-SVP7TREG.mjs
6
+ var l = "", u = "", d = "", f = [], p = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ s((e) => o(e, a()), "sanitizeText"), h = /* @__PURE__ */ s((e) => {
7
+ switch (e.type) {
8
+ case "terminal": return {
9
+ ...e,
10
+ value: m(e.value)
11
+ };
12
+ case "nonterminal": return {
13
+ ...e,
14
+ name: m(e.name)
15
+ };
16
+ case "sequence": return {
17
+ ...e,
18
+ elements: e.elements.map(h)
19
+ };
20
+ case "choice": return {
21
+ ...e,
22
+ alternatives: e.alternatives.map(h)
23
+ };
24
+ case "optional": return {
25
+ ...e,
26
+ element: h(e.element)
27
+ };
28
+ case "repetition": return {
29
+ ...e,
30
+ element: h(e.element),
31
+ separator: e.separator ? h(e.separator) : void 0
32
+ };
33
+ case "special": return {
34
+ ...e,
35
+ text: m(e.text)
36
+ };
37
+ }
38
+ }, "sanitizeAstNode"), g = /* @__PURE__ */ s(() => {
39
+ l = "", u = "", d = "", f.length = 0, p.clear(), n(), e.debug("[Railroad] Database cleared");
40
+ }, "clear"), _ = /* @__PURE__ */ s((t) => {
41
+ l = m(t), e.debug("[Railroad] Title set:", t);
42
+ }, "setTitle"), v = /* @__PURE__ */ s(() => l, "getTitle"), y = {
43
+ clear: g,
44
+ setTitle: _,
45
+ getTitle: v,
46
+ addRule: /* @__PURE__ */ s((t) => {
47
+ let n = {
48
+ ...t,
49
+ name: m(t.name),
50
+ definition: h(t.definition),
51
+ comment: t.comment ? m(t.comment) : void 0
52
+ };
53
+ e.debug("[Railroad] Adding rule:", n.name), p.has(n.name) && e.warn(`[Railroad] Rule '${n.name}' is already defined. Overwriting.`), f.push(n), p.set(n.name, n);
54
+ }, "addRule"),
55
+ getRules: /* @__PURE__ */ s(() => f, "getRules"),
56
+ getRule: /* @__PURE__ */ s((e) => p.get(e), "getRule"),
57
+ setAccTitle: /* @__PURE__ */ s((t) => {
58
+ u = m(t).replace(/^\s+/g, ""), e.debug("[Railroad] Accessibility title set:", t);
59
+ }, "setAccTitle"),
60
+ getAccTitle: /* @__PURE__ */ s(() => u, "getAccTitle"),
61
+ setAccDescription: /* @__PURE__ */ s((t) => {
62
+ d = m(t).replace(/\n\s+/g, "\n"), e.debug("[Railroad] Accessibility description set:", t);
63
+ }, "setAccDescription"),
64
+ getAccDescription: /* @__PURE__ */ s(() => d, "getAccDescription"),
65
+ setDiagramTitle: _,
66
+ getDiagramTitle: v
67
+ }, b = {
68
+ compactMode: !1,
69
+ padding: 10,
70
+ verticalSeparation: 8,
71
+ horizontalSeparation: 10,
72
+ arcRadius: 10,
73
+ fontSize: 14,
74
+ fontFamily: "monospace",
75
+ terminalFill: "#FFFFC0",
76
+ terminalStroke: "#000000",
77
+ terminalTextColor: "#000000",
78
+ nonTerminalFill: "#FFFFFF",
79
+ nonTerminalStroke: "#000000",
80
+ nonTerminalTextColor: "#000000",
81
+ lineColor: "#000000",
82
+ strokeWidth: 2,
83
+ markerFill: "#000000",
84
+ commentFill: "#E8E8E8",
85
+ commentStroke: "#888888",
86
+ commentTextColor: "#666666",
87
+ specialFill: "#F0E0FF",
88
+ specialStroke: "#8800CC",
89
+ ruleNameColor: "#000066",
90
+ showMarkers: !0,
91
+ markerRadius: 5
92
+ }, x = /^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i, S = /^[\w "',.-]+$/, C = /* @__PURE__ */ new Set([
93
+ "compactMode",
94
+ "padding",
95
+ "verticalSeparation",
96
+ "horizontalSeparation",
97
+ "arcRadius",
98
+ "fontSize",
99
+ "fontFamily",
100
+ "terminalFill",
101
+ "terminalStroke",
102
+ "terminalTextColor",
103
+ "nonTerminalFill",
104
+ "nonTerminalStroke",
105
+ "nonTerminalTextColor",
106
+ "lineColor",
107
+ "strokeWidth",
108
+ "markerFill",
109
+ "commentFill",
110
+ "commentStroke",
111
+ "commentTextColor",
112
+ "specialFill",
113
+ "specialStroke",
114
+ "ruleNameColor",
115
+ "showMarkers",
116
+ "markerRadius"
117
+ ]), w = /* @__PURE__ */ s((e) => e ? Object.keys(e).every((e) => e === "railroad" || C.has(e)) : !1, "isRailroadStyleOptions"), T = /* @__PURE__ */ s((e) => e ? "railroad" in e && e.railroad ? e.railroad : w(e) ? e : {} : {}, "extractRailroadOverrides"), E = /* @__PURE__ */ s((e) => {
118
+ if (!e || w(e)) return {};
119
+ let { railroad: t, svgId: n, theme: r, look: i, ...a } = e;
120
+ return a;
121
+ }, "extractThemeOverrides"), D = /* @__PURE__ */ s((e, t) => {
122
+ if (typeof e != "string") return t;
123
+ let n = e.trim();
124
+ return x.test(n) ? n : t;
125
+ }, "sanitizeColorValue"), O = /* @__PURE__ */ s((e, t) => {
126
+ if (typeof e != "string") return t;
127
+ let n = e.trim();
128
+ return S.test(n) ? n : t;
129
+ }, "sanitizeFontFamilyValue"), k = /* @__PURE__ */ s((e, t) => {
130
+ let n = typeof e == "number" ? e : typeof e == "string" ? Number.parseFloat(e) : NaN;
131
+ return Number.isFinite(n) && n >= 0 ? n : t;
132
+ }, "sanitizeNumberValue"), A = /* @__PURE__ */ s((e) => {
133
+ let t = typeof e == "number" ? e : typeof e == "string" ? Number.parseFloat(e) : NaN;
134
+ return Number.isFinite(t) && t > 0 ? t : void 0;
135
+ }, "parseThemeFontSize"), j = /* @__PURE__ */ s((e) => {
136
+ let t = O(e.fontFamily, b.fontFamily), n = A(e.fontSize) ?? b.fontSize;
137
+ return {
138
+ ...b,
139
+ fontFamily: t,
140
+ fontSize: n,
141
+ terminalFill: D(e.secondBkg ?? e.secondaryColor, b.terminalFill),
142
+ terminalStroke: D(e.secondaryBorderColor ?? e.lineColor, b.terminalStroke),
143
+ terminalTextColor: D(e.secondaryTextColor ?? e.textColor, b.terminalTextColor),
144
+ nonTerminalFill: D(e.mainBkg ?? e.background, b.nonTerminalFill),
145
+ nonTerminalStroke: D(e.primaryBorderColor ?? e.lineColor, b.nonTerminalStroke),
146
+ nonTerminalTextColor: D(e.primaryTextColor ?? e.textColor, b.nonTerminalTextColor),
147
+ lineColor: D(e.lineColor, b.lineColor),
148
+ markerFill: D(e.lineColor, b.markerFill),
149
+ commentFill: D(e.labelBackground ?? e.tertiaryColor, b.commentFill),
150
+ commentStroke: D(e.tertiaryBorderColor ?? e.lineColor, b.commentStroke),
151
+ commentTextColor: D(e.tertiaryTextColor ?? e.textColor, b.commentTextColor),
152
+ specialFill: D(e.tertiaryColor ?? e.secondaryColor, b.specialFill),
153
+ specialStroke: D(e.tertiaryBorderColor ?? e.secondaryBorderColor, b.specialStroke),
154
+ ruleNameColor: D(e.titleColor ?? e.textColor, b.ruleNameColor)
155
+ };
156
+ }, "buildThemeDefaults"), M = /* @__PURE__ */ s((e) => {
157
+ let n = r(), i = j({
158
+ ...t(),
159
+ ...n.themeVariables ?? {},
160
+ ...E(e)
161
+ }), a = {
162
+ ...n.railroad ?? {},
163
+ ...T(e)
164
+ };
165
+ return {
166
+ compactMode: a.compactMode ?? i.compactMode,
167
+ padding: k(a.padding, i.padding),
168
+ verticalSeparation: k(a.verticalSeparation, i.verticalSeparation),
169
+ horizontalSeparation: k(a.horizontalSeparation, i.horizontalSeparation),
170
+ arcRadius: k(a.arcRadius, i.arcRadius),
171
+ fontSize: k(a.fontSize, i.fontSize),
172
+ fontFamily: O(a.fontFamily, i.fontFamily),
173
+ terminalFill: D(a.terminalFill, i.terminalFill),
174
+ terminalStroke: D(a.terminalStroke, i.terminalStroke),
175
+ terminalTextColor: D(a.terminalTextColor, i.terminalTextColor),
176
+ nonTerminalFill: D(a.nonTerminalFill, i.nonTerminalFill),
177
+ nonTerminalStroke: D(a.nonTerminalStroke, i.nonTerminalStroke),
178
+ nonTerminalTextColor: D(a.nonTerminalTextColor, i.nonTerminalTextColor),
179
+ lineColor: D(a.lineColor, i.lineColor),
180
+ strokeWidth: k(a.strokeWidth, i.strokeWidth),
181
+ markerFill: D(a.markerFill, i.markerFill),
182
+ commentFill: D(a.commentFill, i.commentFill),
183
+ commentStroke: D(a.commentStroke, i.commentStroke),
184
+ commentTextColor: D(a.commentTextColor, i.commentTextColor),
185
+ specialFill: D(a.specialFill, i.specialFill),
186
+ specialStroke: D(a.specialStroke, i.specialStroke),
187
+ ruleNameColor: D(a.ruleNameColor, i.ruleNameColor),
188
+ showMarkers: a.showMarkers ?? i.showMarkers,
189
+ markerRadius: k(a.markerRadius, i.markerRadius)
190
+ };
191
+ }, "buildRailroadStyleOptions"), N = /* @__PURE__ */ s((e) => {
192
+ let { fontFamily: t, fontSize: n, terminalFill: r, terminalStroke: i, terminalTextColor: a, nonTerminalFill: o, nonTerminalStroke: s, nonTerminalTextColor: c, lineColor: l, strokeWidth: u, markerFill: d, commentFill: f, commentStroke: p, commentTextColor: m, specialFill: h, specialStroke: g, ruleNameColor: _ } = M(e);
193
+ return `
194
+ .railroad-diagram {
195
+ font-family: ${t};
196
+ font-size: ${n}px;
197
+ }
198
+
199
+ .railroad-terminal rect {
200
+ fill: ${r};
201
+ stroke: ${i};
202
+ stroke-width: ${u}px;
203
+ }
204
+
205
+ .railroad-terminal text {
206
+ fill: ${a};
207
+ font-family: ${t};
208
+ font-size: ${n}px;
209
+ text-anchor: middle;
210
+ dominant-baseline: middle;
211
+ }
212
+
213
+ .railroad-nonterminal rect {
214
+ fill: ${o};
215
+ stroke: ${s};
216
+ stroke-width: ${u}px;
217
+ }
218
+
219
+ .railroad-nonterminal text {
220
+ fill: ${c};
221
+ font-family: ${t};
222
+ font-size: ${n}px;
223
+ text-anchor: middle;
224
+ dominant-baseline: middle;
225
+ }
226
+
227
+ .railroad-line {
228
+ stroke: ${l};
229
+ stroke-width: ${u}px;
230
+ fill: none;
231
+ }
232
+
233
+ .railroad-start circle,
234
+ .railroad-end circle {
235
+ fill: ${d};
236
+ }
237
+
238
+ .railroad-comment ellipse {
239
+ fill: ${f};
240
+ stroke: ${p};
241
+ stroke-width: ${u}px;
242
+ }
243
+
244
+ .railroad-comment text {
245
+ fill: ${m};
246
+ font-style: italic;
247
+ font-family: ${t};
248
+ font-size: ${n}px;
249
+ text-anchor: middle;
250
+ dominant-baseline: middle;
251
+ }
252
+
253
+ .railroad-special rect {
254
+ fill: ${h};
255
+ stroke: ${g};
256
+ stroke-width: ${u}px;
257
+ stroke-dasharray: 5,3;
258
+ }
259
+
260
+ .railroad-special text {
261
+ fill: ${c};
262
+ font-family: ${t};
263
+ font-size: ${n}px;
264
+ text-anchor: middle;
265
+ dominant-baseline: middle;
266
+ }
267
+
268
+ .railroad-rule-name {
269
+ font-weight: bold;
270
+ fill: ${_};
271
+ font-family: ${t};
272
+ font-size: ${n}px;
273
+ }
274
+
275
+ .railroad-group {
276
+ /* Grouping container, no specific styles */
277
+ }
278
+ `;
279
+ }, "getStyles"), P = class {
280
+ constructor() {
281
+ this.d = "";
282
+ }
283
+ static {
284
+ s(this, "PathBuilder");
285
+ }
286
+ moveTo(e, t) {
287
+ return this.d += `M ${e} ${t} `, this;
288
+ }
289
+ lineTo(e, t) {
290
+ return this.d += `L ${e} ${t} `, this;
291
+ }
292
+ horizontalTo(e) {
293
+ return this.d += `H ${e} `, this;
294
+ }
295
+ verticalTo(e) {
296
+ return this.d += `V ${e} `, this;
297
+ }
298
+ arcTo(e, t, n, r, i, a, o) {
299
+ return this.d += `A ${e} ${t} ${n} ${+!!r} ${+!!i} ${a} ${o} `, this;
300
+ }
301
+ build() {
302
+ return this.d.trim();
303
+ }
304
+ }, F = class {
305
+ constructor(e, t = M()) {
306
+ this.textCache = /* @__PURE__ */ new Map(), this.svg = e, this.config = t;
307
+ }
308
+ static {
309
+ s(this, "RailroadRenderer");
310
+ }
311
+ measureText(e) {
312
+ if (this.textCache.has(e)) return this.textCache.get(e);
313
+ let t = this.svg.append("text").attr("font-family", this.config.fontFamily).attr("font-size", this.config.fontSize).text(e), n = t.node().getBBox(), r = {
314
+ width: n.width,
315
+ height: n.height
316
+ };
317
+ return t.remove(), this.textCache.set(e, r), r;
318
+ }
319
+ renderTerminal(e, t) {
320
+ let n = this.measureText(t), r = n.width + this.config.padding * 2, i = n.height + this.config.padding * 2, a = e.append("g").attr("class", "railroad-terminal");
321
+ return a.append("rect").attr("x", 0).attr("y", 0).attr("width", r).attr("height", i).attr("rx", 10).attr("ry", 10), a.append("text").attr("x", r / 2).attr("y", i / 2).text(t), {
322
+ element: a.node(),
323
+ dimensions: {
324
+ width: r,
325
+ height: i,
326
+ up: i / 2,
327
+ down: i / 2
328
+ }
329
+ };
330
+ }
331
+ renderNonTerminal(e, t) {
332
+ let n = this.measureText(t), r = n.width + this.config.padding * 2, i = n.height + this.config.padding * 2, a = e.append("g").attr("class", "railroad-nonterminal");
333
+ return a.append("rect").attr("x", 0).attr("y", 0).attr("width", r).attr("height", i), a.append("text").attr("x", r / 2).attr("y", i / 2).text(t), {
334
+ element: a.node(),
335
+ dimensions: {
336
+ width: r,
337
+ height: i,
338
+ up: i / 2,
339
+ down: i / 2
340
+ }
341
+ };
342
+ }
343
+ renderSequence(e, t) {
344
+ let n = t.map((t) => this.renderExpression(e, t)), r = 0, i = 0, a = 0;
345
+ for (let e of n) r += e.dimensions.width, i = Math.max(i, e.dimensions.up), a = Math.max(a, e.dimensions.down);
346
+ r += (n.length - 1) * this.config.horizontalSeparation;
347
+ let o = e.append("g").attr("class", "railroad-sequence"), s = 0;
348
+ for (let e = 0; e < n.length; e++) {
349
+ let t = n[e], r = i - t.dimensions.up;
350
+ if (o.node().appendChild(t.element).setAttribute("transform", `translate(${s}, ${r})`), e < n.length - 1) {
351
+ let e = s + t.dimensions.width, n = e + this.config.horizontalSeparation, r = i;
352
+ o.append("path").attr("class", "railroad-line").attr("d", new P().moveTo(e, r).lineTo(n, r).build());
353
+ }
354
+ s += t.dimensions.width + this.config.horizontalSeparation;
355
+ }
356
+ return {
357
+ element: o.node(),
358
+ dimensions: {
359
+ width: r,
360
+ height: i + a,
361
+ up: i,
362
+ down: a
363
+ }
364
+ };
365
+ }
366
+ renderChoice(e, t) {
367
+ let n = t.map((t) => this.renderExpression(e, t)), r = 0, i = 0;
368
+ for (let e of n) r = Math.max(r, e.dimensions.width), i += e.dimensions.height;
369
+ i += (n.length - 1) * this.config.verticalSeparation;
370
+ let a = this.config.arcRadius, o = a * 4, s = r + o, c = e.append("g").attr("class", "railroad-choice"), l = 0, u = i / 2;
371
+ for (let e of n) {
372
+ let t = l, n = t + e.dimensions.up, i = a * 2 + (r - e.dimensions.width) / 2;
373
+ c.node().appendChild(e.element).setAttribute("transform", `translate(${i}, ${t})`);
374
+ let o = new P(), d = n > u;
375
+ n === u ? o.moveTo(0, u).lineTo(i, n) : o.moveTo(0, u).arcTo(a, a, 0, !1, d, a, u + (d ? a : -a)).lineTo(a, n - (d ? a : -a)).arcTo(a, a, 0, !1, !d, a * 2, n).lineTo(i, n), c.append("path").attr("class", "railroad-line").attr("d", o.build());
376
+ let f = new P(), p = i + e.dimensions.width, m = s - a * 2;
377
+ n === u ? f.moveTo(p, n).lineTo(s, u) : f.moveTo(p, n).lineTo(m, n).arcTo(a, a, 0, !1, !d, s - a, n + (d ? -a : a)).lineTo(s - a, u + (d ? a : -a)).arcTo(a, a, 0, !1, d, s, u), c.append("path").attr("class", "railroad-line").attr("d", f.build()), l += e.dimensions.height + this.config.verticalSeparation;
378
+ }
379
+ return {
380
+ element: c.node(),
381
+ dimensions: {
382
+ width: s,
383
+ height: i,
384
+ up: u,
385
+ down: i - u
386
+ }
387
+ };
388
+ }
389
+ renderOptional(e, t) {
390
+ let n = this.renderExpression(e, t), r = this.config.arcRadius, i = r * 2, a = n.dimensions.width + r * 4, o = n.dimensions.height + i, s = e.append("g").attr("class", "railroad-optional"), c = r * 2, l = i;
391
+ s.node().appendChild(n.element).setAttribute("transform", `translate(${c}, ${l})`);
392
+ let u = l + n.dimensions.up, d = new P().moveTo(0, u).lineTo(r * 2, u);
393
+ s.append("path").attr("class", "railroad-line").attr("d", d.build());
394
+ let f = new P().moveTo(c + n.dimensions.width, u).lineTo(a, u);
395
+ s.append("path").attr("class", "railroad-line").attr("d", f.build());
396
+ let p = new P().moveTo(0, u).arcTo(r, r, 0, !1, !1, r, u - r).lineTo(r, r).arcTo(r, r, 0, !1, !0, r * 2, 0).lineTo(a - r * 2, 0).arcTo(r, r, 0, !1, !0, a - r, r).lineTo(a - r, u - r).arcTo(r, r, 0, !1, !1, a, u);
397
+ return s.append("path").attr("class", "railroad-line").attr("d", p.build()), {
398
+ element: s.node(),
399
+ dimensions: {
400
+ width: a,
401
+ height: o,
402
+ up: u,
403
+ down: o - u
404
+ }
405
+ };
406
+ }
407
+ renderRepetition(e, t, n) {
408
+ let r = this.renderExpression(e, t), i = this.config.arcRadius, a = i * 2, o = r.dimensions.width + i * 4, s = n === 0, c = r.dimensions.height + a + (s ? a : 0), l = e.append("g").attr("class", "railroad-repetition"), u = i * 2, d = s ? a : 0;
409
+ l.node().appendChild(r.element).setAttribute("transform", `translate(${u}, ${d})`);
410
+ let f = d + r.dimensions.up;
411
+ l.append("path").attr("class", "railroad-line").attr("d", new P().moveTo(0, f).lineTo(i * 2, f).build()), l.append("path").attr("class", "railroad-line").attr("d", new P().moveTo(u + r.dimensions.width, f).lineTo(o, f).build());
412
+ let p = d + r.dimensions.height + i, m = new P().moveTo(u + r.dimensions.width, f).arcTo(i, i, 0, !1, !0, u + r.dimensions.width + i, f + i).lineTo(u + r.dimensions.width + i, p).arcTo(i, i, 0, !1, !0, u + r.dimensions.width, p + i).lineTo(i * 2, p + i).arcTo(i, i, 0, !1, !0, i, p).lineTo(i, f + i).arcTo(i, i, 0, !1, !0, i * 2, f);
413
+ if (l.append("path").attr("class", "railroad-line").attr("d", m.build()), s) {
414
+ let e = new P().moveTo(0, f).arcTo(i, i, 0, !1, !1, i, f - i).lineTo(i, i).arcTo(i, i, 0, !1, !0, i * 2, 0).lineTo(o - i * 2, 0).arcTo(i, i, 0, !1, !0, o - i, i).lineTo(o - i, f - i).arcTo(i, i, 0, !1, !1, o, f);
415
+ l.append("path").attr("class", "railroad-line").attr("d", e.build());
416
+ }
417
+ return {
418
+ element: l.node(),
419
+ dimensions: {
420
+ width: o,
421
+ height: c,
422
+ up: f,
423
+ down: c - f
424
+ }
425
+ };
426
+ }
427
+ renderSpecial(e, t) {
428
+ let n = this.measureText("? " + t + " ?"), r = n.width + this.config.padding * 2, i = n.height + this.config.padding * 2, a = e.append("g").attr("class", "railroad-special");
429
+ return a.append("rect").attr("x", 0).attr("y", 0).attr("width", r).attr("height", i), a.append("text").attr("x", r / 2).attr("y", i / 2).text("? " + t + " ?"), {
430
+ element: a.node(),
431
+ dimensions: {
432
+ width: r,
433
+ height: i,
434
+ up: i / 2,
435
+ down: i / 2
436
+ }
437
+ };
438
+ }
439
+ renderExpression(e, t) {
440
+ switch (t.type) {
441
+ case "terminal": return this.renderTerminal(e, t.value);
442
+ case "nonterminal": return this.renderNonTerminal(e, t.name);
443
+ case "sequence": return this.renderSequence(e, t.elements);
444
+ case "choice": return this.renderChoice(e, t.alternatives);
445
+ case "optional": return this.renderOptional(e, t.element);
446
+ case "repetition": return this.renderRepetition(e, t.element, t.min);
447
+ case "special": return this.renderSpecial(e, t.text);
448
+ default: throw Error(`Unknown node type: ${t.type}`);
449
+ }
450
+ }
451
+ renderRule(e, t) {
452
+ let n = this.svg.append("g").attr("class", "railroad-rule").attr("transform", `translate(0, ${t})`), r = e.name + " =", i = this.measureText(r).width + 20, a = i + 20, o = n.append("g"), s = this.renderExpression(o, e.definition), c = Math.max(20, s.dimensions.up), l = c - s.dimensions.up;
453
+ return o.attr("transform", `translate(${a}, ${l})`), n.append("g").attr("class", "railroad-rule-name-group").append("text").attr("class", "railroad-rule-name").attr("x", 0).attr("y", c).text(r), n.append("g").attr("class", "railroad-start").append("circle").attr("cx", i).attr("cy", c).attr("r", this.config.markerRadius), n.append("g").attr("class", "railroad-end").append("circle").attr("cx", a + s.dimensions.width + 10).attr("cy", c).attr("r", this.config.markerRadius), n.append("path").attr("class", "railroad-line").attr("d", new P().moveTo(i + this.config.markerRadius, c).lineTo(a, c).build()), n.append("path").attr("class", "railroad-line").attr("d", new P().moveTo(a + s.dimensions.width, c).lineTo(a + s.dimensions.width + 10 - this.config.markerRadius, c).build()), {
454
+ height: Math.max(40, l + s.dimensions.height + this.config.padding * 2),
455
+ width: a + s.dimensions.width + 10 + this.config.markerRadius
456
+ };
457
+ }
458
+ renderDiagram(e) {
459
+ let t = this.config.padding, n = 0;
460
+ for (let r of e) {
461
+ let e = this.renderRule(r, t);
462
+ t += e.height + this.config.verticalSeparation, n = Math.max(n, e.width);
463
+ }
464
+ return {
465
+ width: n + this.config.padding * 2,
466
+ height: t + this.config.padding
467
+ };
468
+ }
469
+ }, I = /* @__PURE__ */ s((e, t, n) => {
470
+ i(e, t.height, t.width, n), e.attr("viewBox", `0 0 ${t.width} ${t.height}`);
471
+ }, "configureRailroadSvgSize"), L = { draw: /* @__PURE__ */ s((t, n, i) => {
472
+ e.debug("[Railroad] Rendering diagram\n" + t);
473
+ try {
474
+ let t = c(n);
475
+ t.attr("class", "railroad-diagram");
476
+ let i = r().railroad?.useMaxWidth ?? !0, a = y.getRules();
477
+ if (e.debug(`[Railroad] Rendering ${a.length} rules`), a.length === 0) {
478
+ e.warn("[Railroad] No rules to render"), I(t, {
479
+ height: 100,
480
+ width: 200
481
+ }, i);
482
+ return;
483
+ }
484
+ I(t, new F(t, M()).renderDiagram(a), i), e.debug("[Railroad] Render complete");
485
+ } catch (t) {
486
+ throw e.error("[Railroad] Render error:", t), t;
487
+ }
488
+ }, "draw") };
489
+ //#endregion
490
+ export { N as n, L as r, y as t };