zombie-mermaid 2.2.1 → 2.2.2

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 (251) hide show
  1. package/LICENSE +1 -0
  2. package/README.md +7 -2
  3. package/dist/ascii.cjs +9 -9
  4. package/dist/ascii.cjs.map +1 -1
  5. package/dist/ascii.js +4069 -3969
  6. package/dist/ascii.js.map +1 -1
  7. package/dist/cli.js +7605 -7381
  8. package/dist/index.cjs +52 -52
  9. package/dist/index.cjs.map +1 -1
  10. package/dist/index.js +7613 -7459
  11. package/dist/index.js.map +1 -1
  12. package/dist/mcp.cjs +14142 -13717
  13. package/dist/mcp.cjs.map +1 -1
  14. package/dist/mcp.js +14142 -13717
  15. package/dist/mcp.js.map +1 -1
  16. package/package.json +27 -5
  17. package/packages/ascii-renderer/LICENSE +22 -0
  18. package/{src/ascii → packages/ascii-renderer/src}/class-diagram.ts +277 -57
  19. package/{src/ascii → packages/ascii-renderer/src}/er-diagram.ts +2 -2
  20. package/packages/ascii-renderer/src/flowchart.ts +94 -0
  21. package/{src/ascii → packages/ascii-renderer/src}/grid.ts +23 -0
  22. package/{src/ascii → packages/ascii-renderer/src}/index.ts +13 -84
  23. package/{src/ascii → packages/ascii-renderer/src}/registry.ts +23 -12
  24. package/{src/ascii → packages/ascii-renderer/src}/sequence.ts +55 -8
  25. package/{src/ascii → packages/ascii-renderer/src}/xychart.ts +6 -3
  26. package/packages/core/LICENSE +22 -0
  27. package/packages/core/src/click-directive.ts +106 -0
  28. package/packages/core/src/color-utils.ts +205 -0
  29. package/packages/core/src/diagram-type.ts +35 -0
  30. package/packages/core/src/direction-override.ts +46 -0
  31. package/packages/core/src/direction.ts +56 -0
  32. package/packages/core/src/index.ts +34 -0
  33. package/packages/core/src/init-directive.ts +248 -0
  34. package/packages/core/src/multiline-utils.ts +275 -0
  35. package/packages/core/src/statements.ts +197 -0
  36. package/packages/core/src/style-directives.ts +214 -0
  37. package/packages/core/src/text-metrics.ts +498 -0
  38. package/packages/core/src/theme.ts +696 -0
  39. package/packages/core/src/types.ts +670 -0
  40. package/packages/mcp/LICENSE +22 -0
  41. package/{src/mcp → packages/mcp/src}/server.ts +34 -2
  42. package/{src/mcp → packages/mcp/src}/tools/check-sequence-activations.ts +8 -5
  43. package/packages/mcp/src/tools/fix-sequence-activations.ts +77 -0
  44. package/{src/mcp → packages/mcp/src}/tools/render-ascii.ts +2 -2
  45. package/{src/mcp → packages/mcp/src}/tools/render-svg.ts +1 -1
  46. package/packages/mermaid-parser/LICENSE +22 -0
  47. package/{src → packages/mermaid-parser/src}/class/parser.ts +86 -8
  48. package/{src → packages/mermaid-parser/src}/er/parser.ts +59 -26
  49. package/packages/mermaid-parser/src/index.ts +48 -0
  50. package/{src → packages/mermaid-parser/src}/sequence/activation-check.ts +4 -3
  51. package/packages/mermaid-parser/src/sequence/activation-fix.ts +112 -0
  52. package/{src → packages/mermaid-parser/src}/sequence/parser.ts +74 -16
  53. package/{src → packages/mermaid-parser/src}/xychart/parser.ts +84 -6
  54. package/packages/svg-renderer/LICENSE +22 -0
  55. package/{src → packages/svg-renderer/src}/class/layout.ts +8 -4
  56. package/{src → packages/svg-renderer/src}/class/renderer.ts +7 -6
  57. package/packages/svg-renderer/src/edge-curves.ts +204 -0
  58. package/packages/svg-renderer/src/elk-instance.ts +292 -0
  59. package/{src → packages/svg-renderer/src}/er/layout.ts +6 -4
  60. package/{src → packages/svg-renderer/src}/er/renderer.ts +4 -4
  61. package/packages/svg-renderer/src/index.ts +58 -0
  62. package/packages/svg-renderer/src/layout-engine/constants.ts +19 -0
  63. package/packages/svg-renderer/src/layout-engine/edge-bundling.ts +379 -0
  64. package/packages/svg-renderer/src/layout-engine/elk-adapter-utils.ts +81 -0
  65. package/packages/svg-renderer/src/layout-engine/elk-graph-builder.ts +240 -0
  66. package/packages/svg-renderer/src/layout-engine/from-elk.ts +685 -0
  67. package/packages/svg-renderer/src/layout-engine/layer-alignment.ts +174 -0
  68. package/packages/svg-renderer/src/layout-engine/to-elk.ts +695 -0
  69. package/packages/svg-renderer/src/layout-engine.ts +74 -0
  70. package/packages/svg-renderer/src/layout.ts +8 -0
  71. package/packages/svg-renderer/src/renderer.ts +1485 -0
  72. package/packages/svg-renderer/src/resolve-colors.ts +339 -0
  73. package/{src → packages/svg-renderer/src}/sequence/layout.ts +2 -6
  74. package/{src → packages/svg-renderer/src}/sequence/renderer.ts +4 -4
  75. package/packages/svg-renderer/src/shape-clipping.ts +197 -0
  76. package/packages/svg-renderer/src/styles.ts +118 -0
  77. package/{src → packages/svg-renderer/src}/xychart/layout.ts +2 -2
  78. package/{src → packages/svg-renderer/src}/xychart/renderer.ts +6 -6
  79. package/src/__tests__/ascii-ansi.test.ts +6 -2
  80. package/src/__tests__/ascii-canvas-write.test.ts +2 -2
  81. package/src/__tests__/ascii-charset-border-junctions.test.ts +1 -1
  82. package/src/__tests__/ascii-cjk-width.test.ts +1 -1
  83. package/src/__tests__/ascii-class-box-occupancy.test.ts +147 -45
  84. package/src/__tests__/ascii-class-column-width-488-489.test.ts +1 -1
  85. package/src/__tests__/ascii-class-cross-level-jog-corruption.test.ts +187 -0
  86. package/src/__tests__/ascii-class-detour-label-routing-487.test.ts +1 -1
  87. package/src/__tests__/ascii-class-diagram-compartments.test.ts +1 -1
  88. package/src/__tests__/ascii-class-label-box-collision.test.ts +1 -1
  89. package/src/__tests__/ascii-class-label-row-collision-531.test.ts +1 -1
  90. package/src/__tests__/ascii-class-label-territory-row-awareness.test.ts +1 -1
  91. package/src/__tests__/ascii-class-padding.test.ts +1 -1
  92. package/src/__tests__/ascii-class-reciprocal-relationships-448.test.ts +86 -1
  93. package/src/__tests__/ascii-combining-mark-width.test.ts +2 -2
  94. package/src/__tests__/ascii-coords-overlay.test.ts +2 -2
  95. package/src/__tests__/ascii-decision-lr-box-start.test.ts +2 -2
  96. package/src/__tests__/ascii-display-width-unit.test.ts +1 -1
  97. package/src/__tests__/ascii-draw-arrows-coverage.test.ts +1 -1
  98. package/src/__tests__/ascii-draw-arrows-single-point-path.test.ts +12 -5
  99. package/src/__tests__/ascii-draw-bundles.test.ts +5 -5
  100. package/src/__tests__/ascii-edge-bundling-rank-violation-454.test.ts +1 -1
  101. package/src/__tests__/ascii-edge-bundling-routing.test.ts +9 -5
  102. package/src/__tests__/ascii-edge-cross-style-overlap.test.ts +10 -6
  103. package/src/__tests__/ascii-edge-ending-glyphs.test.ts +1 -1
  104. package/src/__tests__/ascii-edge-label-diagonal-fallback-418.test.ts +2 -2
  105. package/src/__tests__/ascii-edge-routing-fixes.test.ts +1 -1
  106. package/src/__tests__/ascii-edge-routing-single-point-path.test.ts +8 -4
  107. package/src/__tests__/ascii-edge-styles.test.ts +1 -1
  108. package/src/__tests__/ascii-emoji-cluster-width.test.ts +2 -2
  109. package/src/__tests__/ascii-er-box-occupancy.test.ts +1 -1
  110. package/src/__tests__/ascii-er-cardinality.test.ts +1 -1
  111. package/src/__tests__/ascii-er-corner-glyphs.test.ts +1 -1
  112. package/src/__tests__/ascii-er-jog-stray-line.test.ts +1 -1
  113. package/src/__tests__/ascii-er-label-padding.test.ts +1 -1
  114. package/src/__tests__/ascii-er-padding.test.ts +1 -1
  115. package/src/__tests__/ascii-er-relationship-label-corruption-350.test.ts +1 -1
  116. package/src/__tests__/ascii-er-relationship-overwrite.test.ts +1 -1
  117. package/src/__tests__/ascii-er-stray-connectors.test.ts +7 -4
  118. package/src/__tests__/ascii-er-unrelated-stem-separation-411.test.ts +1 -1
  119. package/src/__tests__/ascii-er-vertical-one-marker.test.ts +1 -1
  120. package/src/__tests__/ascii-grid-deep-chain.test.ts +4 -4
  121. package/src/__tests__/ascii-hyperlinks.test.ts +9 -6
  122. package/src/__tests__/ascii-label-line-terminal-fallback.test.ts +8 -4
  123. package/src/__tests__/ascii-lane-search.test.ts +1 -1
  124. package/src/__tests__/ascii-multibox-cjk-width.test.ts +1 -1
  125. package/src/__tests__/ascii-multiline.test.ts +6 -3
  126. package/src/__tests__/ascii-nested-subgraph-sibling-order-444.test.ts +8 -5
  127. package/src/__tests__/ascii-package-boundary.test.ts +47 -37
  128. package/src/__tests__/ascii-padding-edge-cases.test.ts +1 -1
  129. package/src/__tests__/ascii-parallel-edges-329.test.ts +8 -5
  130. package/src/__tests__/ascii-pathfinder-route-edge.test.ts +14 -4
  131. package/src/__tests__/ascii-reverse-direction-edges-629.test.ts +9 -5
  132. package/src/__tests__/ascii-sequence-alt-else-label.test.ts +1 -1
  133. package/src/__tests__/ascii-sequence-block-wall-clearance.test.ts +1 -1
  134. package/src/__tests__/ascii-sequence-box-group.test.ts +1 -1
  135. package/src/__tests__/ascii-sequence-cjk-width.test.ts +1 -1
  136. package/src/__tests__/ascii-sequence-create-destroy.test.ts +1 -1
  137. package/src/__tests__/ascii-sequence-form-invariants.test.ts +48 -50
  138. package/src/__tests__/ascii-sequence-mermaid-parity.test.ts +1 -1
  139. package/src/__tests__/ascii-sequence-notes.test.ts +1 -1
  140. package/src/__tests__/ascii-sequence-padding.test.ts +1 -1
  141. package/src/__tests__/ascii-sequence-self-arrow.test.ts +1 -1
  142. package/src/__tests__/ascii-shape-diamond.test.ts +3 -3
  143. package/src/__tests__/ascii-shape-rectangle.test.ts +5 -5
  144. package/src/__tests__/ascii-shape-rounded.test.ts +3 -3
  145. package/src/__tests__/ascii-shapes-circle.test.ts +3 -3
  146. package/src/__tests__/ascii-shapes-hexagon.test.ts +3 -3
  147. package/src/__tests__/ascii-shapes-special.test.ts +10 -5
  148. package/src/__tests__/ascii-shapes-stadium.test.ts +3 -3
  149. package/src/__tests__/ascii-shapes-state.test.ts +15 -5
  150. package/src/__tests__/ascii-state-bidirectional-label-swap-530.test.ts +1 -1
  151. package/src/__tests__/ascii-subgraph-bbox.test.ts +8 -4
  152. package/src/__tests__/ascii-subgraph-direction-honored-445.test.ts +1 -1
  153. package/src/__tests__/ascii-subgraph-label-border-clip.test.ts +88 -25
  154. package/src/__tests__/ascii-subgraph-later-edgeless-301.test.ts +8 -4
  155. package/src/__tests__/ascii-subgraph-title-padding.test.ts +1 -1
  156. package/src/__tests__/ascii-territory-unit.test.ts +2 -2
  157. package/src/__tests__/ascii-validate.test.ts +1 -1
  158. package/src/__tests__/ascii.test.ts +5 -2
  159. package/src/__tests__/box-color.test.ts +1 -1
  160. package/src/__tests__/class-arrow-directions.test.ts +1 -1
  161. package/src/__tests__/class-click-interactions.test.ts +3 -6
  162. package/src/__tests__/class-integration.test.ts +1 -1
  163. package/src/__tests__/class-notes.test.ts +3 -3
  164. package/src/__tests__/class-parser-error-messages.test.ts +162 -0
  165. package/src/__tests__/class-parser.test.ts +6 -6
  166. package/src/__tests__/class-styling.test.ts +2 -2
  167. package/src/__tests__/cli-render.test.ts +16 -1
  168. package/src/__tests__/direction-override.test.ts +1 -1
  169. package/src/__tests__/draw-lines.test.ts +2 -2
  170. package/src/__tests__/edge-cell-styles.test.ts +5 -2
  171. package/src/__tests__/elk-layout-cache.test.ts +6 -4
  172. package/src/__tests__/er-click-unsupported.test.ts +5 -8
  173. package/src/__tests__/er-parser-error-messages.test.ts +82 -0
  174. package/src/__tests__/er-parser.test.ts +3 -6
  175. package/src/__tests__/expanded-shapes.test.ts +1 -1
  176. package/src/__tests__/grid-occupancy.test.ts +1 -1
  177. package/src/__tests__/mcp-check-sequence-activations-tool.test.ts +1 -1
  178. package/src/__tests__/mcp-fix-sequence-activations-tool.test.ts +134 -0
  179. package/src/__tests__/mcp-render-ascii-tool.test.ts +5 -4
  180. package/src/__tests__/mcp-render-svg-theme-guard.test.ts +3 -3
  181. package/src/__tests__/mcp-render-svg-tool.test.ts +1 -1
  182. package/src/__tests__/mcp-server.test.ts +30 -1
  183. package/src/__tests__/multiline-labels.test.ts +29 -18
  184. package/src/__tests__/parser.test.ts +117 -5
  185. package/src/__tests__/pathfinder.test.ts +11 -4
  186. package/src/__tests__/render-options-overrides.test.ts +28 -21
  187. package/src/__tests__/render-options-per-type.test.ts +13 -9
  188. package/src/__tests__/resolve-colors.test.ts +1 -1
  189. package/src/__tests__/self-loop-edges.test.ts +112 -0
  190. package/src/__tests__/sequence-activation-check.test.ts +7 -8
  191. package/src/__tests__/sequence-activation-fix.test.ts +91 -0
  192. package/src/__tests__/sequence-layout.test.ts +4 -7
  193. package/src/__tests__/sequence-parser-syntax-errors.test.ts +179 -0
  194. package/src/__tests__/sequence-parser.test.ts +3 -6
  195. package/src/__tests__/statements.test.ts +53 -35
  196. package/src/__tests__/testdata/ascii/subgraph_direction_override.txt +21 -21
  197. package/src/__tests__/theme-palette-contrast.test.ts +84 -0
  198. package/src/__tests__/workspace-package-boundaries.test.ts +199 -25
  199. package/src/__tests__/xychart-ascii.test.ts +1 -1
  200. package/src/__tests__/xychart-colors.test.ts +3 -2
  201. package/src/__tests__/xychart-layout.test.ts +1 -1
  202. package/src/__tests__/xychart-parser-errors.test.ts +95 -0
  203. package/src/browser.ts +8 -2
  204. package/src/cli/mcp.ts +1 -1
  205. package/src/cli/render.ts +59 -25
  206. package/src/cli/web.ts +1 -1
  207. package/src/diagram-registry.ts +190 -25
  208. package/src/index.ts +34 -131
  209. package/src/parser.ts +102 -40
  210. /package/{src/ascii → packages/ascii-renderer/src}/ansi.ts +0 -0
  211. /package/{src/ascii → packages/ascii-renderer/src}/canvas.ts +0 -0
  212. /package/{src/ascii → packages/ascii-renderer/src}/converter.ts +0 -0
  213. /package/{src/ascii → packages/ascii-renderer/src}/coords.ts +0 -0
  214. /package/{src/ascii → packages/ascii-renderer/src}/display-width.ts +0 -0
  215. /package/{src/ascii → packages/ascii-renderer/src}/draw-arrows.ts +0 -0
  216. /package/{src/ascii → packages/ascii-renderer/src}/draw-boxes.ts +0 -0
  217. /package/{src/ascii → packages/ascii-renderer/src}/draw-bundles.ts +0 -0
  218. /package/{src/ascii → packages/ascii-renderer/src}/draw-lines.ts +0 -0
  219. /package/{src/ascii → packages/ascii-renderer/src}/draw-subgraphs.ts +0 -0
  220. /package/{src/ascii → packages/ascii-renderer/src}/draw.ts +0 -0
  221. /package/{src/ascii → packages/ascii-renderer/src}/edge-bundling.ts +0 -0
  222. /package/{src/ascii → packages/ascii-renderer/src}/edge-cell-styles.ts +0 -0
  223. /package/{src/ascii → packages/ascii-renderer/src}/edge-routing.ts +0 -0
  224. /package/{src/ascii → packages/ascii-renderer/src}/grid-occupancy.ts +0 -0
  225. /package/{src/ascii → packages/ascii-renderer/src}/hyperlinks.ts +0 -0
  226. /package/{src/ascii → packages/ascii-renderer/src}/lane-search.ts +0 -0
  227. /package/{src/ascii → packages/ascii-renderer/src}/multiline-utils.ts +0 -0
  228. /package/{src/ascii → packages/ascii-renderer/src}/pathfinder.ts +0 -0
  229. /package/{src/ascii → packages/ascii-renderer/src}/shapes/circle.ts +0 -0
  230. /package/{src/ascii → packages/ascii-renderer/src}/shapes/corners.ts +0 -0
  231. /package/{src/ascii → packages/ascii-renderer/src}/shapes/diamond.ts +0 -0
  232. /package/{src/ascii → packages/ascii-renderer/src}/shapes/hexagon.ts +0 -0
  233. /package/{src/ascii → packages/ascii-renderer/src}/shapes/index.ts +0 -0
  234. /package/{src/ascii → packages/ascii-renderer/src}/shapes/rectangle.ts +0 -0
  235. /package/{src/ascii → packages/ascii-renderer/src}/shapes/rounded.ts +0 -0
  236. /package/{src/ascii → packages/ascii-renderer/src}/shapes/special.ts +0 -0
  237. /package/{src/ascii → packages/ascii-renderer/src}/shapes/stadium.ts +0 -0
  238. /package/{src/ascii → packages/ascii-renderer/src}/shapes/state.ts +0 -0
  239. /package/{src/ascii → packages/ascii-renderer/src}/shapes/types.ts +0 -0
  240. /package/{src/ascii → packages/ascii-renderer/src}/territory.ts +0 -0
  241. /package/{src/ascii → packages/ascii-renderer/src}/types.ts +0 -0
  242. /package/{src/ascii → packages/ascii-renderer/src}/validate.ts +0 -0
  243. /package/{src/mcp → packages/mcp/src}/index.ts +0 -0
  244. /package/{src → packages/mermaid-parser/src}/class/format.ts +0 -0
  245. /package/{src → packages/mermaid-parser/src}/class/types.ts +0 -0
  246. /package/{src → packages/mermaid-parser/src}/er/types.ts +0 -0
  247. /package/{src → packages/mermaid-parser/src}/expanded-shapes.ts +0 -0
  248. /package/{src → packages/mermaid-parser/src}/sequence/box-color.ts +0 -0
  249. /package/{src → packages/mermaid-parser/src}/sequence/types.ts +0 -0
  250. /package/{src → packages/mermaid-parser/src}/xychart/colors.ts +0 -0
  251. /package/{src → packages/mermaid-parser/src}/xychart/types.ts +0 -0
@@ -26,7 +26,7 @@
26
26
  */
27
27
 
28
28
  import { describe, it, expect } from 'vitest'
29
- import { renderMermaidASCII } from '../ascii/index.ts'
29
+ import { renderMermaidASCII } from '@zombie-mermaid/ascii-renderer'
30
30
 
31
31
  const MVC_SOURCE = `classDiagram
32
32
  class Model {
@@ -82,3 +82,88 @@ describe('ASCII class diagram — reciprocal relationships (issue #448)', () =>
82
82
  expect(ascii).toContain('uses')
83
83
  })
84
84
  })
85
+
86
+ /**
87
+ * Regression test for issue #632 — a weekly form-judge audit comparing this
88
+ * repo's ASCII output against real mermaid.js SVG flagged the "Class:
89
+ * Relationship Labels" sample (samples-data.ts): `Teacher --> Course` and
90
+ * `Student --> Course` are two *distinct* pairs (not a reciprocal pair
91
+ * between the same two classes, which #448 above already covers) that both
92
+ * terminate at the same target, `Course`.
93
+ *
94
+ * Root cause: `pairGroups` (the #448 fix, keyed by the unordered
95
+ * `[from, to]` pair) only fans relationships between the exact same two
96
+ * classes — it never grouped these, so both anchored at Course's identical
97
+ * center column, collapsing their arrowheads onto the same cell. Since
98
+ * both relationships' single horizontal jog then also landed on the exact
99
+ * same row, the later-drawn label (in the separate label-drawing pass)
100
+ * blotted out most of the visible line, so `Student --> Course` looked
101
+ * like it terminated in blank space short of Course instead of reaching it.
102
+ *
103
+ * The fix (`relFromOffset`/`relToOffset` in `class-diagram.ts`) fans a
104
+ * relationship at whichever single end it shares with another
105
+ * relationship, even when the two relationships are between otherwise
106
+ * unrelated classes — scoped to a direct, adjacent-level convergence (see
107
+ * that code's comment for why a level-skipping relationship, which already
108
+ * needs the separate box-collision detour routing, is excluded).
109
+ */
110
+ describe('ASCII class diagram — relationships converging on a shared target from different sources (issue #632)', () => {
111
+ const STUDENT_COURSE_SOURCE = `classDiagram
112
+ class Teacher {
113
+ +String name
114
+ }
115
+ class Student {
116
+ +String name
117
+ }
118
+ class Course {
119
+ +String title
120
+ }
121
+ Teacher --> Course : teaches
122
+ Student --> Course : enrolled in`
123
+
124
+ it('renders both relationship labels', () => {
125
+ const ascii = renderMermaidASCII(STUDENT_COURSE_SOURCE, {
126
+ colorMode: 'none',
127
+ })
128
+ expect(ascii).toContain('teaches')
129
+ expect(ascii).toContain('enrolled in')
130
+ })
131
+
132
+ it('draws two distinct arrowheads into Course instead of collapsing both onto one shared cell', () => {
133
+ const ascii = renderMermaidASCII(STUDENT_COURSE_SOURCE, {
134
+ colorMode: 'none',
135
+ })
136
+ // Before the fix, both relationships anchored at the exact same
137
+ // column, so only a single '▼' was ever drawn for both of them
138
+ // combined — the `Student --> Course` connector had no arrowhead of
139
+ // its own at all.
140
+ const arrowCount = (ascii.match(/▼/g) ?? []).length
141
+ expect(arrowCount).toBe(2)
142
+ })
143
+
144
+ it('gives the two relationships distinct target columns, both landing on Course', () => {
145
+ const ascii = renderMermaidASCII(STUDENT_COURSE_SOURCE, {
146
+ colorMode: 'none',
147
+ })
148
+ const lines = ascii.split('\n')
149
+ const arrowCols = lines.flatMap((line) =>
150
+ [...line].map((ch, i) => (ch === '▼' ? i : -1)).filter((i) => i >= 0),
151
+ )
152
+ expect(arrowCols).toHaveLength(2)
153
+ expect(arrowCols[0]).not.toBe(arrowCols[1])
154
+
155
+ // Course's box must actually span both arrow columns — otherwise
156
+ // they've merely moved apart without both still landing on the target.
157
+ const courseRow = lines.findIndex((line) => line.includes('Course'))
158
+ expect(courseRow).toBeGreaterThan(0)
159
+ const boxRow = lines[courseRow - 1]!
160
+ const boxLeft = boxRow.indexOf('┌')
161
+ const boxRight = boxRow.indexOf('┐')
162
+ expect(boxLeft).toBeGreaterThanOrEqual(0)
163
+ expect(boxRight).toBeGreaterThan(boxLeft)
164
+ for (const col of arrowCols) {
165
+ expect(col).toBeGreaterThanOrEqual(boxLeft)
166
+ expect(col).toBeLessThanOrEqual(boxRight)
167
+ }
168
+ })
169
+ })
@@ -15,8 +15,8 @@
15
15
  * against an authority separate from the implementation under test.
16
16
  */
17
17
  import { describe, it, expect } from 'vitest'
18
- import { renderMermaidASCII } from '../ascii/index.ts'
19
- import { displayWidth } from '../ascii/display-width.ts'
18
+ import { renderMermaidASCII } from '@zombie-mermaid/ascii-renderer'
19
+ import { displayWidth } from '../../packages/ascii-renderer/src/display-width.ts'
20
20
  import {
21
21
  terminalDisplayWidth,
22
22
  assertUniformDisplayWidth,
@@ -1,6 +1,6 @@
1
1
  import { describe, it, expect } from 'vitest'
2
- import { addCoordsOverlay } from '../ascii/coords.ts'
3
- import { renderMermaidASCII } from '../ascii/index.ts'
2
+ import { addCoordsOverlay } from '../../packages/ascii-renderer/src/coords.ts'
3
+ import { renderMermaidASCII } from '@zombie-mermaid/ascii-renderer'
4
4
 
5
5
  describe('addCoordsOverlay', () => {
6
6
  it('prepends a two-row column ruler and a row-index gutter', () => {
@@ -13,8 +13,8 @@
13
13
  * true`), since ASCII mode skips box-start connectors entirely.
14
14
  */
15
15
  import { describe, it, expect } from 'vitest'
16
- import { renderMermaidASCII } from '../ascii/index.ts'
17
- import { findOrphanedJunctions } from '../ascii/validate.ts'
16
+ import { renderMermaidASCII } from '@zombie-mermaid/ascii-renderer'
17
+ import { findOrphanedJunctions } from '../../packages/ascii-renderer/src/validate.ts'
18
18
  import { readdirSync, readFileSync } from 'node:fs'
19
19
  import { join, dirname } from 'node:path'
20
20
  import { fileURLToPath } from 'node:url'
@@ -25,7 +25,7 @@ import {
25
25
  displayWidth,
26
26
  toDisplayCells,
27
27
  WIDE_CHAR_PLACEHOLDER,
28
- } from '../ascii/display-width.ts'
28
+ } from '../../packages/ascii-renderer/src/display-width.ts'
29
29
 
30
30
  const COMBINING_ACUTE = '́'
31
31
  const COMBINING_GRAVE = '̀'
@@ -4,7 +4,7 @@
4
4
  // ============================================================================
5
5
 
6
6
  import { describe, it, expect } from 'vitest'
7
- import { renderMermaidASCII } from '../ascii/index.ts'
7
+ import { renderMermaidASCII } from '@zombie-mermaid/ascii-renderer'
8
8
 
9
9
  describe('ASCII arrow drawing: no-arrow edges', () => {
10
10
  it('renders a solid no-arrow edge without an arrowhead in unicode mode', () => {
@@ -16,11 +16,18 @@
16
16
  * segment was drawn.
17
17
  */
18
18
  import { describe, it, expect } from 'vitest'
19
- import { drawArrow } from '../ascii/draw-arrows.ts'
20
- import { Down } from '../ascii/types.ts'
21
- import { mkCanvas, mkRoleCanvas } from '../ascii/canvas.ts'
22
- import type { AsciiEdge, AsciiGraph, AsciiNode } from '../ascii/types.ts'
23
- import { createGrid } from '../ascii/grid-occupancy.ts'
19
+ import { drawArrow } from '../../packages/ascii-renderer/src/draw-arrows.ts'
20
+ import { Down } from '../../packages/ascii-renderer/src/types.ts'
21
+ import {
22
+ mkCanvas,
23
+ mkRoleCanvas,
24
+ } from '../../packages/ascii-renderer/src/canvas.ts'
25
+ import type {
26
+ AsciiEdge,
27
+ AsciiGraph,
28
+ AsciiNode,
29
+ } from '../../packages/ascii-renderer/src/types.ts'
30
+ import { createGrid } from '../../packages/ascii-renderer/src/grid-occupancy.ts'
24
31
 
25
32
  function makeNode(name: string, x: number, y: number): AsciiNode {
26
33
  return {
@@ -16,14 +16,14 @@
16
16
  */
17
17
  import { describe, it, expect } from 'vitest'
18
18
  import { parseMermaid } from '../parser.ts'
19
- import { convertToAsciiGraph } from '../ascii/converter.ts'
20
- import { createMapping } from '../ascii/grid.ts'
19
+ import { convertToAsciiGraph } from '../../packages/ascii-renderer/src/converter.ts'
20
+ import { createMapping } from '../../packages/ascii-renderer/src/grid.ts'
21
21
  import type {
22
22
  AsciiConfig,
23
23
  AsciiGraph,
24
24
  EdgeBundle,
25
25
  GridCoord,
26
- } from '../ascii/types.ts'
26
+ } from '../../packages/ascii-renderer/src/types.ts'
27
27
  import {
28
28
  drawBundledEdgeSegment,
29
29
  drawBundleSharedPath,
@@ -32,8 +32,8 @@ import {
32
32
  drawBundledEdgeArrowhead,
33
33
  drawBundledEdgeArrowheadStart,
34
34
  drawJunctionCharacter,
35
- } from '../ascii/draw-bundles.ts'
36
- import { renderMermaidASCII } from '../ascii/index.ts'
35
+ } from '../../packages/ascii-renderer/src/draw-bundles.ts'
36
+ import { renderMermaidASCII } from '@zombie-mermaid/ascii-renderer'
37
37
 
38
38
  function buildGraph(src: string, useAscii = false): AsciiGraph {
39
39
  const config: AsciiConfig = {
@@ -21,7 +21,7 @@
21
21
  */
22
22
 
23
23
  import { describe, it, expect } from 'vitest'
24
- import { renderMermaidASCII } from '../ascii/index.ts'
24
+ import { renderMermaidASCII } from '@zombie-mermaid/ascii-renderer'
25
25
 
26
26
  describe('ASCII edge bundling — refuses to bundle a rank-violating edge (issue #454)', () => {
27
27
  it('gives a fan-in edge its own arrowhead when its source shares a rank with the target', () => {
@@ -16,14 +16,18 @@
16
16
  */
17
17
  import { describe, it, expect } from 'vitest'
18
18
  import { parseMermaid } from '../parser.ts'
19
- import { convertToAsciiGraph } from '../ascii/converter.ts'
20
- import { createMapping } from '../ascii/grid.ts'
19
+ import { convertToAsciiGraph } from '../../packages/ascii-renderer/src/converter.ts'
20
+ import { createMapping } from '../../packages/ascii-renderer/src/grid.ts'
21
21
  import {
22
22
  calculateJunctionPoint,
23
23
  routeBundledEdges,
24
- } from '../ascii/edge-bundling.ts'
25
- import { Middle } from '../ascii/types.ts'
26
- import type { AsciiConfig, AsciiGraph, EdgeBundle } from '../ascii/types.ts'
24
+ } from '../../packages/ascii-renderer/src/edge-bundling.ts'
25
+ import { Middle } from '../../packages/ascii-renderer/src/types.ts'
26
+ import type {
27
+ AsciiConfig,
28
+ AsciiGraph,
29
+ EdgeBundle,
30
+ } from '../../packages/ascii-renderer/src/types.ts'
27
31
 
28
32
  function buildGraph(src: string, graphDirection: 'TD' | 'LR'): AsciiGraph {
29
33
  const config: AsciiConfig = {
@@ -18,22 +18,26 @@
18
18
  */
19
19
  import { describe, it, expect } from 'vitest'
20
20
  import { parseMermaid } from '../parser.ts'
21
- import { convertToAsciiGraph } from '../ascii/converter.ts'
22
- import { createMapping } from '../ascii/grid.ts'
21
+ import { convertToAsciiGraph } from '../../packages/ascii-renderer/src/converter.ts'
22
+ import { createMapping } from '../../packages/ascii-renderer/src/grid.ts'
23
23
  import {
24
24
  isOccupied,
25
25
  pathCells,
26
26
  createGrid,
27
27
  cloneGrid,
28
28
  placeBlock,
29
- } from '../ascii/grid-occupancy.ts'
29
+ } from '../../packages/ascii-renderer/src/grid-occupancy.ts'
30
30
  import {
31
31
  createEdgeCellStyles,
32
32
  findStyleConflict,
33
33
  claimPathCells,
34
- } from '../ascii/edge-cell-styles.ts'
35
- import { renderMermaidASCII } from '../ascii/index.ts'
36
- import type { AsciiConfig, AsciiEdge, AsciiGraph } from '../ascii/types.ts'
34
+ } from '../../packages/ascii-renderer/src/edge-cell-styles.ts'
35
+ import { renderMermaidASCII } from '@zombie-mermaid/ascii-renderer'
36
+ import type {
37
+ AsciiConfig,
38
+ AsciiEdge,
39
+ AsciiGraph,
40
+ } from '../../packages/ascii-renderer/src/types.ts'
37
41
 
38
42
  const RETRY_LOOP_SOURCE = `graph TD
39
43
  A[Push Code] --> B{Tests Pass?}
@@ -10,7 +10,7 @@
10
10
  // ============================================================================
11
11
 
12
12
  import { describe, it, expect } from 'vitest'
13
- import { renderMermaidASCII } from '../ascii/index.ts'
13
+ import { renderMermaidASCII } from '@zombie-mermaid/ascii-renderer'
14
14
 
15
15
  describe('ASCII flowchart edges: --o circle-end / --x cross-end glyphs', () => {
16
16
  it('draws a circle glyph for --o in unicode mode', () => {
@@ -8,8 +8,8 @@
8
8
  * column (`┆thick`) instead of sitting on its own `┃` line.
9
9
  */
10
10
  import { describe, it, expect } from 'vitest'
11
- import { renderMermaidASCII } from '../ascii/index.ts'
12
- import { expandDiagonalSegments } from '../ascii/edge-routing.ts'
11
+ import { renderMermaidASCII } from '@zombie-mermaid/ascii-renderer'
12
+ import { expandDiagonalSegments } from '../../packages/ascii-renderer/src/edge-routing.ts'
13
13
 
14
14
  const ALL_EDGE_STYLES = `graph TD
15
15
  A[Source] -->|solid| B[Target 1]
@@ -5,7 +5,7 @@
5
5
  * drift. Repro diagrams are taken directly from the issue.
6
6
  */
7
7
  import { describe, it, expect } from 'vitest'
8
- import { renderMermaidASCII } from '../ascii/index.ts'
8
+ import { renderMermaidASCII } from '@zombie-mermaid/ascii-renderer'
9
9
 
10
10
  describe('issue #64: edge-routing crashes and layout bugs', () => {
11
11
  describe('bug 1: dense fan-in pathfinding blowup', () => {
@@ -15,10 +15,14 @@
15
15
  * zero-length line at that single point instead of indexing past the end.
16
16
  */
17
17
  import { describe, it, expect } from 'vitest'
18
- import { determineLabelLine } from '../ascii/edge-routing.ts'
19
- import { Down } from '../ascii/types.ts'
20
- import type { AsciiEdge, AsciiGraph, AsciiNode } from '../ascii/types.ts'
21
- import { createGrid } from '../ascii/grid-occupancy.ts'
18
+ import { determineLabelLine } from '../../packages/ascii-renderer/src/edge-routing.ts'
19
+ import { Down } from '../../packages/ascii-renderer/src/types.ts'
20
+ import type {
21
+ AsciiEdge,
22
+ AsciiGraph,
23
+ AsciiNode,
24
+ } from '../../packages/ascii-renderer/src/types.ts'
25
+ import { createGrid } from '../../packages/ascii-renderer/src/grid-occupancy.ts'
22
26
 
23
27
  function makeNode(name: string, x: number, y: number): AsciiNode {
24
28
  return {
@@ -3,7 +3,7 @@
3
3
  // ============================================================================
4
4
 
5
5
  import { describe, it, expect } from 'vitest'
6
- import { renderMermaidASCII } from '../ascii/index.ts'
6
+ import { renderMermaidASCII } from '@zombie-mermaid/ascii-renderer'
7
7
 
8
8
  describe('ASCII edge styles', () => {
9
9
  describe('solid edges (default)', () => {
@@ -21,8 +21,8 @@
21
21
  * against an authority separate from the implementation under test.
22
22
  */
23
23
  import { describe, it, expect } from 'vitest'
24
- import { renderMermaidASCII } from '../ascii/index.ts'
25
- import { displayWidth } from '../ascii/display-width.ts'
24
+ import { renderMermaidASCII } from '@zombie-mermaid/ascii-renderer'
25
+ import { displayWidth } from '../../packages/ascii-renderer/src/display-width.ts'
26
26
  import {
27
27
  terminalDisplayWidth,
28
28
  assertUniformDisplayWidth,
@@ -14,7 +14,7 @@
14
14
  // ============================================================================
15
15
 
16
16
  import { describe, it, expect } from 'vitest'
17
- import { renderMermaidASCII } from '../ascii/index.ts'
17
+ import { renderMermaidASCII } from '@zombie-mermaid/ascii-renderer'
18
18
  import {
19
19
  findBoxRect,
20
20
  findTextRect,
@@ -3,7 +3,7 @@
3
3
  // ============================================================================
4
4
 
5
5
  import { describe, it, expect } from 'vitest'
6
- import { renderMermaidASCII } from '../ascii/index.ts'
6
+ import { renderMermaidASCII } from '@zombie-mermaid/ascii-renderer'
7
7
 
8
8
  describe('ASCII ER crow-foot cardinality markers', () => {
9
9
  it('mirrors the zero-one marker orientation on the left side (regression)', () => {
@@ -28,7 +28,7 @@
28
28
  // ============================================================================
29
29
 
30
30
  import { describe, it, expect } from 'vitest'
31
- import { renderMermaidASCII } from '../ascii/index.ts'
31
+ import { renderMermaidASCII } from '@zombie-mermaid/ascii-renderer'
32
32
 
33
33
  describe('ASCII ER relationship routing draws a corner glyph at each turn (issue #414)', () => {
34
34
  it('draws corner glyphs at a same-row detour around an obstructing entity', () => {
@@ -26,7 +26,7 @@
26
26
  // ============================================================================
27
27
 
28
28
  import { describe, it, expect } from 'vitest'
29
- import { renderMermaidASCII } from '../ascii/index.ts'
29
+ import { renderMermaidASCII } from '@zombie-mermaid/ascii-renderer'
30
30
 
31
31
  /**
32
32
  * True when some row's only non-whitespace content is a doubled line/dash
@@ -10,7 +10,7 @@
10
10
  // ============================================================================
11
11
 
12
12
  import { describe, it, expect } from 'vitest'
13
- import { renderMermaidASCII } from '../ascii/index.ts'
13
+ import { renderMermaidASCII } from '@zombie-mermaid/ascii-renderer'
14
14
 
15
15
  const REPRO = `erDiagram
16
16
  CUSTOMER ||--o{ ORDER : places
@@ -11,7 +11,7 @@
11
11
  // ============================================================================
12
12
 
13
13
  import { describe, it, expect } from 'vitest'
14
- import { renderMermaidASCII } from '../ascii/index.ts'
14
+ import { renderMermaidASCII } from '@zombie-mermaid/ascii-renderer'
15
15
 
16
16
  // A single relationship with a short label — exercises the horizontal gap
17
17
  // between entities without the label itself becoming the binding constraint
@@ -24,7 +24,7 @@
24
24
  // ============================================================================
25
25
 
26
26
  import { describe, it, expect } from 'vitest'
27
- import { renderMermaidASCII } from '../ascii/index.ts'
27
+ import { renderMermaidASCII } from '@zombie-mermaid/ascii-renderer'
28
28
 
29
29
  /** Assert every one of `needles` appears verbatim, exactly once, in `text`. */
30
30
  function expectAllPresentOnce(text: string, needles: string[]): void {
@@ -21,7 +21,7 @@
21
21
  // ============================================================================
22
22
 
23
23
  import { describe, it, expect } from 'vitest'
24
- import { renderMermaidASCII } from '../ascii/index.ts'
24
+ import { renderMermaidASCII } from '@zombie-mermaid/ascii-renderer'
25
25
 
26
26
  describe('ASCII ER relationship draws do not overwrite existing text (issue #392)', () => {
27
27
  it('does not let a later vertical relationship line cut through an earlier label', () => {
@@ -7,10 +7,13 @@
7
7
  // ============================================================================
8
8
 
9
9
  import { describe, it, expect } from 'vitest'
10
- import { renderMermaidASCII } from '../ascii/index.ts'
11
- import { chooseFreeRow, isRowFree } from '../ascii/er-diagram.ts'
12
- import { mkCanvas, write } from '../ascii/canvas.ts'
13
- import type { Canvas } from '../ascii/types.ts'
10
+ import { renderMermaidASCII } from '@zombie-mermaid/ascii-renderer'
11
+ import {
12
+ chooseFreeRow,
13
+ isRowFree,
14
+ } from '../../packages/ascii-renderer/src/er-diagram.ts'
15
+ import { mkCanvas, write } from '../../packages/ascii-renderer/src/canvas.ts'
16
+ import type { Canvas } from '../../packages/ascii-renderer/src/types.ts'
14
17
 
15
18
  /** Mark every cell in row `y` across [xStart, xEnd] as occupied. */
16
19
  function occupyRow(canvas: Canvas, y: number, xStart: number, xEnd: number) {
@@ -12,7 +12,7 @@
12
12
  // ============================================================================
13
13
 
14
14
  import { describe, it, expect } from 'vitest'
15
- import { renderMermaidASCII } from '../ascii/index.ts'
15
+ import { renderMermaidASCII } from '@zombie-mermaid/ascii-renderer'
16
16
 
17
17
  describe('ASCII ER — unrelated relationship stems stay visually separated (issue #411)', () => {
18
18
  it('keeps CUSTOMER→ADDRESS and PRODUCT→LINE_ITEM stems at least one column apart', () => {
@@ -28,7 +28,7 @@
28
28
  // ============================================================================
29
29
 
30
30
  import { describe, it, expect } from 'vitest'
31
- import { renderMermaidASCII } from '../ascii/index.ts'
31
+ import { renderMermaidASCII } from '@zombie-mermaid/ascii-renderer'
32
32
 
33
33
  describe('ASCII ER vertical "one" cardinality marker (invisible-marker fix)', () => {
34
34
  it('renders a distinct tick for the upper entity\'s "one" marker, not the invisible line glyph', () => {
@@ -11,10 +11,10 @@
11
11
  */
12
12
  import { describe, it, expect } from 'vitest'
13
13
  import { parseMermaid } from '../parser.ts'
14
- import { convertToAsciiGraph } from '../ascii/converter.ts'
15
- import { createMapping } from '../ascii/grid.ts'
16
- import { renderMermaidASCII } from '../ascii/index.ts'
17
- import type { AsciiConfig } from '../ascii/types.ts'
14
+ import { convertToAsciiGraph } from '../../packages/ascii-renderer/src/converter.ts'
15
+ import { createMapping } from '../../packages/ascii-renderer/src/grid.ts'
16
+ import { renderMermaidASCII } from '@zombie-mermaid/ascii-renderer'
17
+ import type { AsciiConfig } from '../../packages/ascii-renderer/src/types.ts'
18
18
 
19
19
  function longChainSource(depth: number): string {
20
20
  const lines = ['flowchart TD']
@@ -10,7 +10,7 @@
10
10
  * can import samples-data.ts without tripping tsconfig's rootDir).
11
11
  */
12
12
  import { describe, it, expect } from 'vitest'
13
- import { renderMermaidASCII } from '../ascii/index.ts'
13
+ import { renderMermaidASCII } from '@zombie-mermaid/ascii-renderer'
14
14
  import {
15
15
  OSC8_CLOSE,
16
16
  OSC8_SEQUENCE,
@@ -20,13 +20,16 @@ import {
20
20
  LinkRunTracker,
21
21
  markBoxLabelLinks,
22
22
  mkLinkCanvas,
23
- } from '../ascii/hyperlinks.ts'
24
- import { colorizeLine, DEFAULT_ASCII_THEME } from '../ascii/ansi.ts'
25
- import { mkCanvas, write } from '../ascii/canvas.ts'
26
- import { addCoordsOverlay } from '../ascii/coords.ts'
23
+ } from '../../packages/ascii-renderer/src/hyperlinks.ts'
24
+ import {
25
+ colorizeLine,
26
+ DEFAULT_ASCII_THEME,
27
+ } from '../../packages/ascii-renderer/src/ansi.ts'
28
+ import { mkCanvas, write } from '../../packages/ascii-renderer/src/canvas.ts'
29
+ import { addCoordsOverlay } from '../../packages/ascii-renderer/src/coords.ts'
27
30
  import { runRender } from '../cli/render.ts'
28
31
  import { createMockStdout, renderArgs } from './cli-test-helpers.ts'
29
- import type { CharRole } from '../ascii/types.ts'
32
+ import type { CharRole } from '../../packages/ascii-renderer/src/types.ts'
30
33
 
31
34
  const OSC8_PREFIX = '\x1b]8;;'
32
35
 
@@ -36,10 +36,14 @@
36
36
  * some real diagram happens to hit this deep a fallback tier.
37
37
  */
38
38
  import { describe, it, expect } from 'vitest'
39
- import { determineLabelLine } from '../ascii/edge-routing.ts'
40
- import { Down, gridKey } from '../ascii/types.ts'
41
- import type { AsciiEdge, AsciiGraph, AsciiNode } from '../ascii/types.ts'
42
- import { createGrid } from '../ascii/grid-occupancy.ts'
39
+ import { determineLabelLine } from '../../packages/ascii-renderer/src/edge-routing.ts'
40
+ import { Down, gridKey } from '../../packages/ascii-renderer/src/types.ts'
41
+ import type {
42
+ AsciiEdge,
43
+ AsciiGraph,
44
+ AsciiNode,
45
+ } from '../../packages/ascii-renderer/src/types.ts'
46
+ import { createGrid } from '../../packages/ascii-renderer/src/grid-occupancy.ts'
43
47
 
44
48
  function makeNode(name: string, x: number, y: number): AsciiNode {
45
49
  return {
@@ -14,7 +14,7 @@
14
14
  // originals are kept here as reference implementations and the shared
15
15
  // function is required to agree with them on every generated input.
16
16
  import { describe, it, expect } from 'vitest'
17
- import { findFreeLane } from '../ascii/lane-search.ts'
17
+ import { findFreeLane } from '../../packages/ascii-renderer/src/lane-search.ts'
18
18
 
19
19
  describe('findFreeLane', () => {
20
20
  it('returns the preferred lane when it is free', () => {
@@ -19,7 +19,7 @@
19
19
  * — see the shared helper.
20
20
  */
21
21
  import { describe, it, expect } from 'vitest'
22
- import { renderMermaidASCII } from '../ascii/index.ts'
22
+ import { renderMermaidASCII } from '@zombie-mermaid/ascii-renderer'
23
23
  import {
24
24
  terminalDisplayWidth,
25
25
  assertUniformDisplayWidth,
@@ -1,10 +1,13 @@
1
1
  import { describe, it, expect } from 'vitest'
2
- import { renderMermaidASCII } from '../ascii/index.ts'
3
- import { mkCanvas, canvasToString } from '../ascii/canvas.ts'
2
+ import { renderMermaidASCII } from '@zombie-mermaid/ascii-renderer'
3
+ import {
4
+ mkCanvas,
5
+ canvasToString,
6
+ } from '../../packages/ascii-renderer/src/canvas.ts'
4
7
  import {
5
8
  drawMultilineTextCentered,
6
9
  drawMultilineTextLeft,
7
- } from '../ascii/multiline-utils.ts'
10
+ } from '../../packages/ascii-renderer/src/multiline-utils.ts'
8
11
 
9
12
  describe('ASCII multi-line labels', () => {
10
13
  describe('flowchart nodes', () => {
@@ -35,11 +35,14 @@
35
35
  */
36
36
  import { describe, it, expect } from 'vitest'
37
37
  import { parseMermaid } from '../parser.ts'
38
- import { convertToAsciiGraph } from '../ascii/converter.ts'
39
- import { createMapping } from '../ascii/grid.ts'
40
- import { renderMermaidASCII } from '../ascii/index.ts'
41
- import type { AsciiConfig, AsciiGraph } from '../ascii/types.ts'
42
- import { requireGridCoord } from '../ascii/types.ts'
38
+ import { convertToAsciiGraph } from '../../packages/ascii-renderer/src/converter.ts'
39
+ import { createMapping } from '../../packages/ascii-renderer/src/grid.ts'
40
+ import { renderMermaidASCII } from '@zombie-mermaid/ascii-renderer'
41
+ import type {
42
+ AsciiConfig,
43
+ AsciiGraph,
44
+ } from '../../packages/ascii-renderer/src/types.ts'
45
+ import { requireGridCoord } from '../../packages/ascii-renderer/src/types.ts'
43
46
 
44
47
  function layoutFlowchart(source: string): AsciiGraph {
45
48
  const parsed = parseMermaid(source)