@cristianormazabal/triton-core 0.1.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 (283) hide show
  1. package/dist/contracts/anchors.d.ts +150 -0
  2. package/dist/contracts/anchors.d.ts.map +1 -0
  3. package/dist/contracts/crosslink.d.ts +171 -0
  4. package/dist/contracts/crosslink.d.ts.map +1 -0
  5. package/dist/contracts/diagram.d.ts +107 -0
  6. package/dist/contracts/diagram.d.ts.map +1 -0
  7. package/dist/contracts/index.d.ts +29 -0
  8. package/dist/contracts/index.d.ts.map +1 -0
  9. package/dist/contracts/overlay.d.ts +98 -0
  10. package/dist/contracts/overlay.d.ts.map +1 -0
  11. package/dist/contracts/primitives.d.ts +42 -0
  12. package/dist/contracts/primitives.d.ts.map +1 -0
  13. package/dist/contracts/renderer.d.ts +21 -0
  14. package/dist/contracts/renderer.d.ts.map +1 -0
  15. package/dist/contracts/result.d.ts +32 -0
  16. package/dist/contracts/result.d.ts.map +1 -0
  17. package/dist/contracts/routing.d.ts +60 -0
  18. package/dist/contracts/routing.d.ts.map +1 -0
  19. package/dist/contracts/scene.d.ts +114 -0
  20. package/dist/contracts/scene.d.ts.map +1 -0
  21. package/dist/contracts/theme.d.ts +113 -0
  22. package/dist/contracts/theme.d.ts.map +1 -0
  23. package/dist/crosslink/engine2.d.ts +40 -0
  24. package/dist/crosslink/engine2.d.ts.map +1 -0
  25. package/dist/crosslink/engine3.d.ts +36 -0
  26. package/dist/crosslink/engine3.d.ts.map +1 -0
  27. package/dist/crosslink/index.d.ts +5 -0
  28. package/dist/crosslink/index.d.ts.map +1 -0
  29. package/dist/crosslink/render.d.ts +22 -0
  30. package/dist/crosslink/render.d.ts.map +1 -0
  31. package/dist/crosslink/resolve.d.ts +26 -0
  32. package/dist/crosslink/resolve.d.ts.map +1 -0
  33. package/dist/diagrams/architecture/index.d.ts +5 -0
  34. package/dist/diagrams/architecture/index.d.ts.map +1 -0
  35. package/dist/diagrams/architecture/ir.d.ts +29 -0
  36. package/dist/diagrams/architecture/ir.d.ts.map +1 -0
  37. package/dist/diagrams/architecture/layout.d.ts +11 -0
  38. package/dist/diagrams/architecture/layout.d.ts.map +1 -0
  39. package/dist/diagrams/block/index.d.ts +5 -0
  40. package/dist/diagrams/block/index.d.ts.map +1 -0
  41. package/dist/diagrams/block/ir.d.ts +22 -0
  42. package/dist/diagrams/block/ir.d.ts.map +1 -0
  43. package/dist/diagrams/block/layout.d.ts +12 -0
  44. package/dist/diagrams/block/layout.d.ts.map +1 -0
  45. package/dist/diagrams/c4/index.d.ts +5 -0
  46. package/dist/diagrams/c4/index.d.ts.map +1 -0
  47. package/dist/diagrams/c4/ir.d.ts +33 -0
  48. package/dist/diagrams/c4/ir.d.ts.map +1 -0
  49. package/dist/diagrams/c4/layout.d.ts +12 -0
  50. package/dist/diagrams/c4/layout.d.ts.map +1 -0
  51. package/dist/diagrams/class/index.d.ts +5 -0
  52. package/dist/diagrams/class/index.d.ts.map +1 -0
  53. package/dist/diagrams/class/ir.d.ts +32 -0
  54. package/dist/diagrams/class/ir.d.ts.map +1 -0
  55. package/dist/diagrams/class/layout.d.ts +13 -0
  56. package/dist/diagrams/class/layout.d.ts.map +1 -0
  57. package/dist/diagrams/ds/graph/graph.d.ts +39 -0
  58. package/dist/diagrams/ds/graph/graph.d.ts.map +1 -0
  59. package/dist/diagrams/ds/hashmap/hashmap.d.ts +39 -0
  60. package/dist/diagrams/ds/hashmap/hashmap.d.ts.map +1 -0
  61. package/dist/diagrams/ds/matrix/matrix.d.ts +33 -0
  62. package/dist/diagrams/ds/matrix/matrix.d.ts.map +1 -0
  63. package/dist/diagrams/ds/queue/cqueue.d.ts +31 -0
  64. package/dist/diagrams/ds/queue/cqueue.d.ts.map +1 -0
  65. package/dist/diagrams/ds/queue/deque.d.ts +24 -0
  66. package/dist/diagrams/ds/queue/deque.d.ts.map +1 -0
  67. package/dist/diagrams/ds/queue/pqueue.d.ts +29 -0
  68. package/dist/diagrams/ds/queue/pqueue.d.ts.map +1 -0
  69. package/dist/diagrams/ds/queue/queue.d.ts +27 -0
  70. package/dist/diagrams/ds/queue/queue.d.ts.map +1 -0
  71. package/dist/diagrams/ds/queue/shared.d.ts +35 -0
  72. package/dist/diagrams/ds/queue/shared.d.ts.map +1 -0
  73. package/dist/diagrams/ds/stack/stack.d.ts +28 -0
  74. package/dist/diagrams/ds/stack/stack.d.ts.map +1 -0
  75. package/dist/diagrams/ds/struct/array.d.ts +28 -0
  76. package/dist/diagrams/ds/struct/array.d.ts.map +1 -0
  77. package/dist/diagrams/ds/struct/linkedlist.d.ts +21 -0
  78. package/dist/diagrams/ds/struct/linkedlist.d.ts.map +1 -0
  79. package/dist/diagrams/ds/struct/memory.d.ts +44 -0
  80. package/dist/diagrams/ds/struct/memory.d.ts.map +1 -0
  81. package/dist/diagrams/ds/struct/page.d.ts +25 -0
  82. package/dist/diagrams/ds/struct/page.d.ts.map +1 -0
  83. package/dist/diagrams/ds/struct/shared.d.ts +9 -0
  84. package/dist/diagrams/ds/struct/shared.d.ts.map +1 -0
  85. package/dist/diagrams/ds/tree/avl.d.ts +14 -0
  86. package/dist/diagrams/ds/tree/avl.d.ts.map +1 -0
  87. package/dist/diagrams/ds/tree/btree.d.ts +12 -0
  88. package/dist/diagrams/ds/tree/btree.d.ts.map +1 -0
  89. package/dist/diagrams/ds/tree/build.d.ts +34 -0
  90. package/dist/diagrams/ds/tree/build.d.ts.map +1 -0
  91. package/dist/diagrams/ds/tree/heap.d.ts +12 -0
  92. package/dist/diagrams/ds/tree/heap.d.ts.map +1 -0
  93. package/dist/diagrams/ds/tree/index.d.ts +5 -0
  94. package/dist/diagrams/ds/tree/index.d.ts.map +1 -0
  95. package/dist/diagrams/ds/tree/ir.d.ts +29 -0
  96. package/dist/diagrams/ds/tree/ir.d.ts.map +1 -0
  97. package/dist/diagrams/ds/tree/layout.d.ts +13 -0
  98. package/dist/diagrams/ds/tree/layout.d.ts.map +1 -0
  99. package/dist/diagrams/ds/tree/plan.d.ts +11 -0
  100. package/dist/diagrams/ds/tree/plan.d.ts.map +1 -0
  101. package/dist/diagrams/ds/tree/radix.d.ts +12 -0
  102. package/dist/diagrams/ds/tree/radix.d.ts.map +1 -0
  103. package/dist/diagrams/ds/tree/rbtree.d.ts +12 -0
  104. package/dist/diagrams/ds/tree/rbtree.d.ts.map +1 -0
  105. package/dist/diagrams/ds/tree/segtree.d.ts +12 -0
  106. package/dist/diagrams/ds/tree/segtree.d.ts.map +1 -0
  107. package/dist/diagrams/ds/trie/trie.d.ts +17 -0
  108. package/dist/diagrams/ds/trie/trie.d.ts.map +1 -0
  109. package/dist/diagrams/ds/unionfind/unionfind.d.ts +34 -0
  110. package/dist/diagrams/ds/unionfind/unionfind.d.ts.map +1 -0
  111. package/dist/diagrams/er/index.d.ts +5 -0
  112. package/dist/diagrams/er/index.d.ts.map +1 -0
  113. package/dist/diagrams/er/ir.d.ts +28 -0
  114. package/dist/diagrams/er/ir.d.ts.map +1 -0
  115. package/dist/diagrams/er/layout.d.ts +12 -0
  116. package/dist/diagrams/er/layout.d.ts.map +1 -0
  117. package/dist/diagrams/flowchart/index.d.ts +5 -0
  118. package/dist/diagrams/flowchart/index.d.ts.map +1 -0
  119. package/dist/diagrams/flowchart/ir.d.ts +38 -0
  120. package/dist/diagrams/flowchart/ir.d.ts.map +1 -0
  121. package/dist/diagrams/flowchart/layout.d.ts +5 -0
  122. package/dist/diagrams/flowchart/layout.d.ts.map +1 -0
  123. package/dist/diagrams/gantt/index.d.ts +5 -0
  124. package/dist/diagrams/gantt/index.d.ts.map +1 -0
  125. package/dist/diagrams/gantt/ir.d.ts +25 -0
  126. package/dist/diagrams/gantt/ir.d.ts.map +1 -0
  127. package/dist/diagrams/gantt/layout.d.ts +12 -0
  128. package/dist/diagrams/gantt/layout.d.ts.map +1 -0
  129. package/dist/diagrams/gitgraph/index.d.ts +5 -0
  130. package/dist/diagrams/gitgraph/index.d.ts.map +1 -0
  131. package/dist/diagrams/gitgraph/ir.d.ts +31 -0
  132. package/dist/diagrams/gitgraph/ir.d.ts.map +1 -0
  133. package/dist/diagrams/gitgraph/layout.d.ts +12 -0
  134. package/dist/diagrams/gitgraph/layout.d.ts.map +1 -0
  135. package/dist/diagrams/journey/index.d.ts +5 -0
  136. package/dist/diagrams/journey/index.d.ts.map +1 -0
  137. package/dist/diagrams/journey/ir.d.ts +20 -0
  138. package/dist/diagrams/journey/ir.d.ts.map +1 -0
  139. package/dist/diagrams/journey/layout.d.ts +13 -0
  140. package/dist/diagrams/journey/layout.d.ts.map +1 -0
  141. package/dist/diagrams/kanban/index.d.ts +5 -0
  142. package/dist/diagrams/kanban/index.d.ts.map +1 -0
  143. package/dist/diagrams/kanban/ir.d.ts +18 -0
  144. package/dist/diagrams/kanban/ir.d.ts.map +1 -0
  145. package/dist/diagrams/kanban/layout.d.ts +12 -0
  146. package/dist/diagrams/kanban/layout.d.ts.map +1 -0
  147. package/dist/diagrams/mindmap/index.d.ts +5 -0
  148. package/dist/diagrams/mindmap/index.d.ts.map +1 -0
  149. package/dist/diagrams/mindmap/ir.d.ts +15 -0
  150. package/dist/diagrams/mindmap/ir.d.ts.map +1 -0
  151. package/dist/diagrams/mindmap/layout.d.ts +12 -0
  152. package/dist/diagrams/mindmap/layout.d.ts.map +1 -0
  153. package/dist/diagrams/packet/index.d.ts +5 -0
  154. package/dist/diagrams/packet/index.d.ts.map +1 -0
  155. package/dist/diagrams/packet/ir.d.ts +15 -0
  156. package/dist/diagrams/packet/ir.d.ts.map +1 -0
  157. package/dist/diagrams/packet/layout.d.ts +12 -0
  158. package/dist/diagrams/packet/layout.d.ts.map +1 -0
  159. package/dist/diagrams/pie/index.d.ts +5 -0
  160. package/dist/diagrams/pie/index.d.ts.map +1 -0
  161. package/dist/diagrams/pie/ir.d.ts +16 -0
  162. package/dist/diagrams/pie/ir.d.ts.map +1 -0
  163. package/dist/diagrams/pie/layout.d.ts +12 -0
  164. package/dist/diagrams/pie/layout.d.ts.map +1 -0
  165. package/dist/diagrams/poster/index.d.ts +5 -0
  166. package/dist/diagrams/poster/index.d.ts.map +1 -0
  167. package/dist/diagrams/poster/ir.d.ts +46 -0
  168. package/dist/diagrams/poster/ir.d.ts.map +1 -0
  169. package/dist/diagrams/poster/layout.d.ts +8 -0
  170. package/dist/diagrams/poster/layout.d.ts.map +1 -0
  171. package/dist/diagrams/quadrant/index.d.ts +5 -0
  172. package/dist/diagrams/quadrant/index.d.ts.map +1 -0
  173. package/dist/diagrams/quadrant/ir.d.ts +23 -0
  174. package/dist/diagrams/quadrant/ir.d.ts.map +1 -0
  175. package/dist/diagrams/quadrant/layout.d.ts +12 -0
  176. package/dist/diagrams/quadrant/layout.d.ts.map +1 -0
  177. package/dist/diagrams/radar/index.d.ts +5 -0
  178. package/dist/diagrams/radar/index.d.ts.map +1 -0
  179. package/dist/diagrams/radar/ir.d.ts +22 -0
  180. package/dist/diagrams/radar/ir.d.ts.map +1 -0
  181. package/dist/diagrams/radar/layout.d.ts +12 -0
  182. package/dist/diagrams/radar/layout.d.ts.map +1 -0
  183. package/dist/diagrams/requirement/index.d.ts +5 -0
  184. package/dist/diagrams/requirement/index.d.ts.map +1 -0
  185. package/dist/diagrams/requirement/ir.d.ts +25 -0
  186. package/dist/diagrams/requirement/ir.d.ts.map +1 -0
  187. package/dist/diagrams/requirement/layout.d.ts +12 -0
  188. package/dist/diagrams/requirement/layout.d.ts.map +1 -0
  189. package/dist/diagrams/sankey/index.d.ts +5 -0
  190. package/dist/diagrams/sankey/index.d.ts.map +1 -0
  191. package/dist/diagrams/sankey/ir.d.ts +15 -0
  192. package/dist/diagrams/sankey/ir.d.ts.map +1 -0
  193. package/dist/diagrams/sankey/layout.d.ts +12 -0
  194. package/dist/diagrams/sankey/layout.d.ts.map +1 -0
  195. package/dist/diagrams/sequence/index.d.ts +5 -0
  196. package/dist/diagrams/sequence/index.d.ts.map +1 -0
  197. package/dist/diagrams/sequence/ir.d.ts +47 -0
  198. package/dist/diagrams/sequence/ir.d.ts.map +1 -0
  199. package/dist/diagrams/sequence/layout.d.ts +13 -0
  200. package/dist/diagrams/sequence/layout.d.ts.map +1 -0
  201. package/dist/diagrams/state/index.d.ts +5 -0
  202. package/dist/diagrams/state/index.d.ts.map +1 -0
  203. package/dist/diagrams/state/ir.d.ts +28 -0
  204. package/dist/diagrams/state/ir.d.ts.map +1 -0
  205. package/dist/diagrams/state/layout.d.ts +12 -0
  206. package/dist/diagrams/state/layout.d.ts.map +1 -0
  207. package/dist/diagrams/timeline/index.d.ts +7 -0
  208. package/dist/diagrams/timeline/index.d.ts.map +1 -0
  209. package/dist/diagrams/timeline/ir.d.ts +47 -0
  210. package/dist/diagrams/timeline/ir.d.ts.map +1 -0
  211. package/dist/diagrams/timeline/layout.d.ts +5 -0
  212. package/dist/diagrams/timeline/layout.d.ts.map +1 -0
  213. package/dist/diagrams/timeline/numbered.d.ts +16 -0
  214. package/dist/diagrams/timeline/numbered.d.ts.map +1 -0
  215. package/dist/diagrams/timeline/roadmap.d.ts +18 -0
  216. package/dist/diagrams/timeline/roadmap.d.ts.map +1 -0
  217. package/dist/diagrams/timeline/serpentine.d.ts +20 -0
  218. package/dist/diagrams/timeline/serpentine.d.ts.map +1 -0
  219. package/dist/diagrams/timeline/shared.d.ts +37 -0
  220. package/dist/diagrams/timeline/shared.d.ts.map +1 -0
  221. package/dist/diagrams/timeline/timeline-columns.d.ts +19 -0
  222. package/dist/diagrams/timeline/timeline-columns.d.ts.map +1 -0
  223. package/dist/diagrams/timeline/vertical-spine.d.ts +21 -0
  224. package/dist/diagrams/timeline/vertical-spine.d.ts.map +1 -0
  225. package/dist/diagrams/topology/topology.d.ts +47 -0
  226. package/dist/diagrams/topology/topology.d.ts.map +1 -0
  227. package/dist/diagrams/xychart/index.d.ts +5 -0
  228. package/dist/diagrams/xychart/index.d.ts.map +1 -0
  229. package/dist/diagrams/xychart/ir.d.ts +21 -0
  230. package/dist/diagrams/xychart/ir.d.ts.map +1 -0
  231. package/dist/diagrams/xychart/layout.d.ts +12 -0
  232. package/dist/diagrams/xychart/layout.d.ts.map +1 -0
  233. package/dist/frontend/detect.d.ts +7 -0
  234. package/dist/frontend/detect.d.ts.map +1 -0
  235. package/dist/frontend/index.d.ts +44 -0
  236. package/dist/frontend/index.d.ts.map +1 -0
  237. package/dist/frontend/registry.d.ts +21 -0
  238. package/dist/frontend/registry.d.ts.map +1 -0
  239. package/dist/graph/connect.d.ts +39 -0
  240. package/dist/graph/connect.d.ts.map +1 -0
  241. package/dist/graph/layered.d.ts +43 -0
  242. package/dist/graph/layered.d.ts.map +1 -0
  243. package/dist/graph/tree.d.ts +41 -0
  244. package/dist/graph/tree.d.ts.map +1 -0
  245. package/dist/index.d.ts +9 -0
  246. package/dist/index.d.ts.map +1 -0
  247. package/dist/index.js +41345 -0
  248. package/dist/index.js.map +7 -0
  249. package/dist/overlay/apply.d.ts +15 -0
  250. package/dist/overlay/apply.d.ts.map +1 -0
  251. package/dist/overlay/compiler.d.ts +10 -0
  252. package/dist/overlay/compiler.d.ts.map +1 -0
  253. package/dist/overlay/layout.d.ts +16 -0
  254. package/dist/overlay/layout.d.ts.map +1 -0
  255. package/dist/palette/categorical.d.ts +15 -0
  256. package/dist/palette/categorical.d.ts.map +1 -0
  257. package/dist/render/registry.d.ts +15 -0
  258. package/dist/render/registry.d.ts.map +1 -0
  259. package/dist/render/svg.d.ts +11 -0
  260. package/dist/render/svg.d.ts.map +1 -0
  261. package/dist/routing/registry.d.ts +16 -0
  262. package/dist/routing/registry.d.ts.map +1 -0
  263. package/dist/routing/router.d.ts +10 -0
  264. package/dist/routing/router.d.ts.map +1 -0
  265. package/dist/scene/build.d.ts +45 -0
  266. package/dist/scene/build.d.ts.map +1 -0
  267. package/dist/scene/strip.d.ts +39 -0
  268. package/dist/scene/strip.d.ts.map +1 -0
  269. package/dist/style/cost.d.ts +35 -0
  270. package/dist/style/cost.d.ts.map +1 -0
  271. package/dist/text/metrics.d.ts +19 -0
  272. package/dist/text/metrics.d.ts.map +1 -0
  273. package/dist/text/wrap.d.ts +21 -0
  274. package/dist/text/wrap.d.ts.map +1 -0
  275. package/dist/theme/preset.d.ts +29 -0
  276. package/dist/theme/preset.d.ts.map +1 -0
  277. package/dist/theme/resolver.d.ts +7 -0
  278. package/dist/theme/resolver.d.ts.map +1 -0
  279. package/dist/time/dates.d.ts +72 -0
  280. package/dist/time/dates.d.ts.map +1 -0
  281. package/dist/util/round.d.ts +12 -0
  282. package/dist/util/round.d.ts.map +1 -0
  283. package/package.json +42 -0
@@ -0,0 +1,33 @@
1
+ import type { BaseIR } from '../../contracts/index.js';
2
+ export type C4Kind = 'person' | 'person_ext' | 'system' | 'system_ext' | 'container' | 'container_ext' | 'component' | 'db';
3
+ export interface C4Node {
4
+ readonly id: string;
5
+ readonly label: string;
6
+ readonly descr?: string;
7
+ readonly kind: C4Kind;
8
+ }
9
+ export interface C4Boundary {
10
+ readonly id: string;
11
+ readonly label: string;
12
+ readonly depth: number;
13
+ /** All descendant node ids (flattened). */
14
+ readonly nodeIds: readonly string[];
15
+ }
16
+ export interface C4Rel {
17
+ readonly from: string;
18
+ readonly to: string;
19
+ readonly label?: string;
20
+ readonly tech?: string;
21
+ readonly ext: boolean;
22
+ }
23
+ export interface C4Document extends BaseIR {
24
+ readonly metadata: {
25
+ readonly title?: string;
26
+ readonly theme?: string;
27
+ readonly [key: string]: string | undefined;
28
+ };
29
+ readonly nodes: readonly C4Node[];
30
+ readonly boundaries: readonly C4Boundary[];
31
+ readonly rels: readonly C4Rel[];
32
+ }
33
+ //# sourceMappingURL=ir.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ir.d.ts","sourceRoot":"","sources":["../../../../../src/diagrams/c4/ir.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAEvD,MAAM,MAAM,MAAM,GAAG,QAAQ,GAAG,YAAY,GAAG,QAAQ,GAAG,YAAY,GAAG,WAAW,GAAG,eAAe,GAAG,WAAW,GAAG,IAAI,CAAC;AAE5H,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,2CAA2C;IAC3C,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC;AAED,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,UAAW,SAAQ,MAAM;IACxC,QAAQ,CAAC,QAAQ,EAAE;QAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC;IACpH,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,UAAU,EAAE,SAAS,UAAU,EAAE,CAAC;IAC3C,QAAQ,CAAC,IAAI,EAAE,SAAS,KAAK,EAAE,CAAC;CACjC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @file diagrams/c4/layout.ts — C4 context/container diagram.
3
+ *
4
+ * Nodes (Person/System, optionally _Ext) place via the shared layered kernel;
5
+ * boundaries draw as labeled dashed containers around their descendant nodes
6
+ * (outer first). Relationships are arrows with label + optional technology.
7
+ */
8
+ import type { C4Document } from './ir.js';
9
+ import type { LayoutResult } from '../../contracts/index.js';
10
+ import type { ResolvedTheme } from '../../contracts/index.js';
11
+ export declare function layoutC4(ir: C4Document, theme: ResolvedTheme): LayoutResult;
12
+ //# sourceMappingURL=layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../../../src/diagrams/c4/layout.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAU,MAAM,SAAS,CAAC;AAClD,OAAO,KAAK,EAAuB,YAAY,EAAQ,MAAM,0BAA0B,CAAC;AACxF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAY9D,wBAAgB,QAAQ,CAAC,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,aAAa,GAAG,YAAY,CA4F3E"}
@@ -0,0 +1,5 @@
1
+ import type { DiagramModule } from '../../contracts/index.js';
2
+ import type { ClassDocument } from './ir.js';
3
+ export type { ClassDocument, ClassBox, ClassMember, ClassRelation } from './ir.js';
4
+ export declare const classDiagram: DiagramModule<ClassDocument>;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/diagrams/class/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAgB,MAAM,0BAA0B,CAAC;AAC5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAK7C,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAEnF,eAAO,MAAM,YAAY,EAAE,aAAa,CAAC,aAAa,CAYrD,CAAC"}
@@ -0,0 +1,32 @@
1
+ import type { BaseIR } from '../../contracts/index.js';
2
+ export interface ClassMember {
3
+ readonly text: string;
4
+ readonly isMethod: boolean;
5
+ }
6
+ export interface ClassBox {
7
+ readonly name: string;
8
+ readonly stereotype?: string;
9
+ readonly attributes: readonly ClassMember[];
10
+ readonly methods: readonly ClassMember[];
11
+ }
12
+ export type RelEnd = 'none' | 'triangle' | 'diamondF' | 'diamondO' | 'arrow';
13
+ export interface ClassRelation {
14
+ readonly left: string;
15
+ readonly right: string;
16
+ readonly leftHead: RelEnd;
17
+ readonly rightHead: RelEnd;
18
+ readonly dashed: boolean;
19
+ readonly label?: string;
20
+ readonly leftCard?: string;
21
+ readonly rightCard?: string;
22
+ }
23
+ export interface ClassDocument extends BaseIR {
24
+ readonly metadata: {
25
+ readonly title?: string;
26
+ readonly theme?: string;
27
+ readonly [key: string]: string | undefined;
28
+ };
29
+ readonly classes: readonly ClassBox[];
30
+ readonly relations: readonly ClassRelation[];
31
+ }
32
+ //# sourceMappingURL=ir.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ir.d.ts","sourceRoot":"","sources":["../../../../../src/diagrams/class/ir.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAEvD,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,UAAU,EAAE,SAAS,WAAW,EAAE,CAAC;IAC5C,QAAQ,CAAC,OAAO,EAAE,SAAS,WAAW,EAAE,CAAC;CAC1C;AAED,MAAM,MAAM,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,CAAC;AAE7E,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,aAAc,SAAQ,MAAM;IAC3C,QAAQ,CAAC,QAAQ,EAAE;QAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC;IACpH,QAAQ,CAAC,OAAO,EAAE,SAAS,QAAQ,EAAE,CAAC;IACtC,QAAQ,CAAC,SAAS,EAAE,SAAS,aAAa,EAAE,CAAC;CAC9C"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @file diagrams/class/layout.ts — UML class diagram.
3
+ *
4
+ * Classes render as three-compartment boxes (name/stereotype, attributes,
5
+ * methods); placement uses the shared layered kernel (inheritance points up).
6
+ * Relationships draw as straight connectors clipped to box borders with
7
+ * UML end markers (triangle / diamond / arrow) plus cardinality + labels.
8
+ */
9
+ import type { ClassDocument } from './ir.js';
10
+ import type { LayoutResult } from '../../contracts/index.js';
11
+ import type { ResolvedTheme } from '../../contracts/index.js';
12
+ export declare function layoutClass(ir: ClassDocument, theme: ResolvedTheme): LayoutResult;
13
+ //# sourceMappingURL=layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../../../src/diagrams/class/layout.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAoB,MAAM,SAAS,CAAC;AAC/D,OAAO,KAAK,EAAuB,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAQ9D,wBAAgB,WAAW,CAAC,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,GAAG,YAAY,CAsFjF"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * @file diagrams/ds/graph/graph.ts — Generic node/edge graph.
3
+ *
4
+ * A clean, themeable node-link graph (directed or undirected) built on the
5
+ * shared layered placement kernel (graph/layered). Nodes are rounded boxes,
6
+ * edges are straight connectors clipped to node borders; in directed mode each
7
+ * edge carries an arrowhead, in undirected mode it does not.
8
+ *
9
+ * ⚠️ Header keyword is `nodegraph` (alias `dsgraph`) — NOT `graph`, because
10
+ * Mermaid's flowchart already owns `graph` (`graph TD`). Using a distinct token
11
+ * keeps flowchart detection intact.
12
+ *
13
+ * Value-driven mini-syntax:
14
+ * nodegraph
15
+ * directed // or `undirected` (the default)
16
+ * title Dependency graph
17
+ * node A : Parser // optional explicit label
18
+ * A -> B : calls // edge with optional `: label`
19
+ * B -- C // edges may use -> or --
20
+ */
21
+ import type { DiagramModule, ResolvedTheme, LayoutResult, BaseIR } from '../../../contracts/index.js';
22
+ export interface GNode {
23
+ id: string;
24
+ label: string;
25
+ }
26
+ export interface GEdge {
27
+ from: string;
28
+ to: string;
29
+ label?: string;
30
+ }
31
+ export interface GraphDoc extends BaseIR {
32
+ title?: string;
33
+ directed: boolean;
34
+ nodes: GNode[];
35
+ edges: GEdge[];
36
+ }
37
+ export declare function layoutGraph(doc: GraphDoc, theme: ResolvedTheme): LayoutResult;
38
+ export declare const graph: DiagramModule<GraphDoc>;
39
+ //# sourceMappingURL=graph.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../../../../../src/diagrams/ds/graph/graph.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EACV,aAAa,EAAE,aAAa,EAAE,YAAY,EAAiD,MAAM,EAClG,MAAM,6BAA6B,CAAC;AAQrC,MAAM,WAAW,KAAK;IAAG,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;CAAE;AACrD,MAAM,WAAW,KAAK;IAAG,IAAI,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CAAE;AAEpE,MAAM,WAAW,QAAS,SAAQ,MAAM;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,KAAK,EAAE,CAAC;IACf,KAAK,EAAE,KAAK,EAAE,CAAC;CAChB;AAsCD,wBAAgB,WAAW,CAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,GAAG,YAAY,CAwD7E;AAED,eAAO,MAAM,KAAK,EAAE,aAAa,CAAC,QAAQ,CAUzC,CAAC"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * @file diagrams/ds/hashmap/hashmap.ts — Hash map with separate chaining.
3
+ *
4
+ * A vertical strip of buckets indexed 0..n-1. Each non-empty bucket points
5
+ * right to a chain of key→value entries (a singly linked list), reusing the
6
+ * slot/pointer kernel idiom from the linked-list struct. Empty buckets show
7
+ * just their index.
8
+ *
9
+ * Value-driven mini-syntax:
10
+ * hashmap
11
+ * title users
12
+ * buckets 5
13
+ * bucket 0: alice->1, bob->2 // two chained entries
14
+ * bucket 2: carol->3
15
+ * bucket 4: dave->4
16
+ *
17
+ * Entry separators: `,` between entries; `->`, `=>`, `:` or `=` between
18
+ * key and value.
19
+ */
20
+ import type { DiagramModule, ResolvedTheme, LayoutResult } from '../../../contracts/index.js';
21
+ export interface HashEntry {
22
+ key: string;
23
+ value: string;
24
+ }
25
+ export interface HashChain {
26
+ index: number;
27
+ entries: HashEntry[];
28
+ }
29
+ export interface HashmapDoc {
30
+ title?: string;
31
+ buckets: number;
32
+ chains: HashChain[];
33
+ }
34
+ export declare function layoutHashmap(doc: HashmapDoc, theme: ResolvedTheme): LayoutResult;
35
+ export declare const hashmap: DiagramModule<HashmapDoc & {
36
+ version: string;
37
+ metadata: Record<string, unknown>;
38
+ }>;
39
+ //# sourceMappingURL=hashmap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hashmap.d.ts","sourceRoot":"","sources":["../../../../../../src/diagrams/ds/hashmap/hashmap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EACV,aAAa,EAAE,aAAa,EAAE,YAAY,EAC3C,MAAM,6BAA6B,CAAC;AAMrC,MAAM,WAAW,SAAS;IAAG,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;CAAE;AAC1D,MAAM,WAAW,SAAS;IAAG,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,SAAS,EAAE,CAAC;CAAE;AAEnE,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,SAAS,EAAE,CAAC;CACrB;AA+BD,wBAAgB,aAAa,CAAC,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,aAAa,GAAG,YAAY,CAgEjF;AAED,eAAO,MAAM,OAAO,EAAE,aAAa,CAAC,UAAU,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CAUtG,CAAC"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * @file diagrams/ds/matrix/matrix.ts — 2D grid (rows × cols) with indices.
3
+ *
4
+ * A grid of equal cells built by stacking horizontal cell strips — one per
5
+ * row — and labelling the column indices across the top and the row indices
6
+ * down the left. Ragged rows are padded with blanks so the grid stays
7
+ * rectangular.
8
+ *
9
+ * Value-driven mini-syntax:
10
+ * matrix
11
+ * title weights
12
+ * row 1 2 3 4
13
+ * row 5 6 7 8
14
+ * row 9 10 11 12
15
+ *
16
+ * matrix 3x4 // empty 3-row, 4-column grid
17
+ * matrix // `noindex` hides the row/column index labels
18
+ * noindex
19
+ * row a b
20
+ * row c d
21
+ */
22
+ import type { DiagramModule, ResolvedTheme, LayoutResult } from '../../../contracts/index.js';
23
+ export interface MatrixDoc {
24
+ title?: string;
25
+ rows: string[][];
26
+ showIndex: boolean;
27
+ }
28
+ export declare function layoutMatrix(doc: MatrixDoc, theme: ResolvedTheme): LayoutResult;
29
+ export declare const matrix: DiagramModule<MatrixDoc & {
30
+ version: string;
31
+ metadata: Record<string, unknown>;
32
+ }>;
33
+ //# sourceMappingURL=matrix.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"matrix.d.ts","sourceRoot":"","sources":["../../../../../../src/diagrams/ds/matrix/matrix.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EACV,aAAa,EAAE,aAAa,EAAE,YAAY,EAC3C,MAAM,6BAA6B,CAAC;AAKrC,MAAM,WAAW,SAAS;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;CACpB;AA0BD,wBAAgB,YAAY,CAAC,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,aAAa,GAAG,YAAY,CAiD/E;AAED,eAAO,MAAM,MAAM,EAAE,aAAa,CAAC,SAAS,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CAUpG,CAAC"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * @file diagrams/queue/cqueue.ts — Circular (ring-buffer) queue.
3
+ *
4
+ * Same horizontal strip as the linear queue, but a curved wrap-around arrow
5
+ * arcs over the strip from the REAR cell back to the FRONT cell — the modular
6
+ * (ring) continuity. `front`/`rear` markers sit beneath their cells and may
7
+ * wrap independently. This is the strip-plus-wrap rendering (not a true radial
8
+ * ring): the intended look of the reference's top-right panel.
9
+ *
10
+ * Value-driven mini-syntax:
11
+ * cqueue
12
+ * title ring buffer
13
+ * capacity 6
14
+ * cells _ B C D _ _ // `_` (or `.`) is an empty slot
15
+ * front 1
16
+ * rear 3
17
+ */
18
+ import type { DiagramModule, ResolvedTheme, LayoutResult } from '../../../contracts/index.js';
19
+ export interface CQueueDoc {
20
+ title?: string;
21
+ capacity: number;
22
+ cells: (string | null)[];
23
+ front?: number;
24
+ rear?: number;
25
+ }
26
+ export declare function layoutCQueue(doc: CQueueDoc, theme: ResolvedTheme): LayoutResult;
27
+ export declare const cqueue: DiagramModule<CQueueDoc & {
28
+ version: string;
29
+ metadata: Record<string, unknown>;
30
+ }>;
31
+ //# sourceMappingURL=cqueue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cqueue.d.ts","sourceRoot":"","sources":["../../../../../../src/diagrams/ds/queue/cqueue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EACV,aAAa,EAAE,aAAa,EAAE,YAAY,EAC3C,MAAM,6BAA6B,CAAC;AAOrC,MAAM,WAAW,SAAS;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAwCD,wBAAgB,YAAY,CAAC,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,aAAa,GAAG,YAAY,CA4D/E;AAED,eAAO,MAAM,MAAM,EAAE,aAAa,CAAC,SAAS,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CAUpG,CAAC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @file diagrams/queue/deque.ts — Double-ended queue (deque).
3
+ *
4
+ * A horizontal cell strip with a double-headed arrow at BOTH ends: insert and
5
+ * remove are legal at the front (left) and the rear (right). `front`/`rear`
6
+ * markers sit beneath the end cells.
7
+ *
8
+ * Value-driven mini-syntax:
9
+ * deque A B C D
10
+ * deque
11
+ * title work-stealing deque
12
+ * cells A B C D
13
+ */
14
+ import type { DiagramModule, ResolvedTheme, LayoutResult } from '../../../contracts/index.js';
15
+ export interface DequeDoc {
16
+ title?: string;
17
+ cells: string[];
18
+ }
19
+ export declare function layoutDeque(doc: DequeDoc, theme: ResolvedTheme): LayoutResult;
20
+ export declare const deque: DiagramModule<DequeDoc & {
21
+ version: string;
22
+ metadata: Record<string, unknown>;
23
+ }>;
24
+ //# sourceMappingURL=deque.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deque.d.ts","sourceRoot":"","sources":["../../../../../../src/diagrams/ds/queue/deque.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EACV,aAAa,EAAE,aAAa,EAAE,YAAY,EAC3C,MAAM,6BAA6B,CAAC;AAOrC,MAAM,WAAW,QAAQ;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAcD,wBAAgB,WAAW,CAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,GAAG,YAAY,CAwD7E;AAED,eAAO,MAAM,KAAK,EAAE,aAAa,CAAC,QAAQ,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CAUlG,CAAC"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * @file diagrams/queue/pqueue.ts — Priority queue.
3
+ *
4
+ * A VERTICAL stack of cells ordered by priority (highest at the top). Each cell
5
+ * is shaded by its priority — a deterministic tint of the theme's primary
6
+ * accent (strongest at the top) — and shows its priority value on the right.
7
+ *
8
+ * Value-driven mini-syntax:
9
+ * pqueue
10
+ * title scheduler
11
+ * item Deploy 9
12
+ * item Build 5
13
+ * item Lint 2
14
+ */
15
+ import type { DiagramModule, ResolvedTheme, LayoutResult } from '../../../contracts/index.js';
16
+ export interface PQItem {
17
+ label: string;
18
+ priority: number;
19
+ }
20
+ export interface PQueueDoc {
21
+ title?: string;
22
+ items: PQItem[];
23
+ }
24
+ export declare function layoutPQueue(doc: PQueueDoc, theme: ResolvedTheme): LayoutResult;
25
+ export declare const pqueue: DiagramModule<PQueueDoc & {
26
+ version: string;
27
+ metadata: Record<string, unknown>;
28
+ }>;
29
+ //# sourceMappingURL=pqueue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pqueue.d.ts","sourceRoot":"","sources":["../../../../../../src/diagrams/ds/queue/pqueue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EACV,aAAa,EAAE,aAAa,EAAE,YAAY,EAC3C,MAAM,6BAA6B,CAAC;AAMrC,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,SAAS;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AA6CD,wBAAgB,YAAY,CAAC,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,aAAa,GAAG,YAAY,CA0D/E;AAED,eAAO,MAAM,MAAM,EAAE,aAAa,CAAC,SAAS,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CAUpG,CAAC"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @file diagrams/queue/queue.ts — Linear (FIFO) queue.
3
+ *
4
+ * A horizontal cell strip. Items enter at the REAR (right) via an `enqueue`
5
+ * arrow and leave at the FRONT (left) via a `dequeue` arrow. `front`/`rear`
6
+ * pointers sit beneath the filled cells; a `capacity` larger than the filled
7
+ * count shows trailing empty slots.
8
+ *
9
+ * Value-driven mini-syntax:
10
+ * queue A B C // three filled cells
11
+ * queue
12
+ * title task queue
13
+ * cells A B C
14
+ * capacity 5 // 2 trailing empty slots
15
+ */
16
+ import type { DiagramModule, ResolvedTheme, LayoutResult } from '../../../contracts/index.js';
17
+ export interface QueueDoc {
18
+ title?: string;
19
+ cells: string[];
20
+ capacity?: number;
21
+ }
22
+ export declare function layoutQueue(doc: QueueDoc, theme: ResolvedTheme): LayoutResult;
23
+ export declare const queue: DiagramModule<QueueDoc & {
24
+ version: string;
25
+ metadata: Record<string, unknown>;
26
+ }>;
27
+ //# sourceMappingURL=queue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["../../../../../../src/diagrams/ds/queue/queue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EACV,aAAa,EAAE,aAAa,EAAE,YAAY,EAC3C,MAAM,6BAA6B,CAAC;AAOrC,MAAM,WAAW,QAAQ;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAiBD,wBAAgB,WAAW,CAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,GAAG,YAAY,CA2D7E;AAED,eAAO,MAAM,KAAK,EAAE,aAAa,CAAC,QAAQ,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CAUlG,CAAC"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * @file diagrams/queue/shared.ts — Shared helpers for the queue family.
3
+ *
4
+ * Queue variants (linear, circular, deque, priority) are cell-strip diagrams
5
+ * built on the same kernel (`scene/strip.buildStrip`). They share: two
6
+ * fixed-direction arrowhead markers (forward + reverse, so a deque can draw a
7
+ * double-headed arrow without relying on the renderer-specific
8
+ * `auto-start-reverse` orientation), and a `front`/`rear` pointer-below-cell
9
+ * helper. Pure + deterministic — geometry is a function of inputs only.
10
+ */
11
+ import type { SceneElement, ResolvedTheme, Rect } from '../../../contracts/index.js';
12
+ import type { Pen } from '../../../scene/build.js';
13
+ export { lines } from '../struct/shared.js';
14
+ /** Forward arrowhead (apex along travel direction) — use as `markerEnd`. */
15
+ export declare const ARROW_FWD = "queue-arrow-fwd";
16
+ /** Reverse arrowhead (apex against travel direction) — use as `markerStart`. */
17
+ export declare const ARROW_REV = "queue-arrow-rev";
18
+ /**
19
+ * Both arrowhead markers in the given colour.
20
+ * `ARROW_FWD` points in the path's travel direction (markerEnd); `ARROW_REV`
21
+ * points opposite it (markerStart) so a single straight segment can carry two
22
+ * outward-pointing heads — the deque case.
23
+ */
24
+ export declare function arrowDefs(color: string): string;
25
+ /**
26
+ * A labelled pointer beneath a strip cell: a short vertical arrow rising into
27
+ * the cell's bottom edge with the name below it. Mirrors `array.ts` pointers.
28
+ * `stack` shifts the label down a row so two pointers on the same cell (e.g.
29
+ * front == rear on a one-element queue) do not collide.
30
+ */
31
+ export declare function pointerBelow(p: Pen, theme: ResolvedTheme, slot: Rect, name: string, color: string, stack?: number): {
32
+ elements: SceneElement[];
33
+ bottom: number;
34
+ };
35
+ //# sourceMappingURL=shared.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../../../src/diagrams/ds/queue/shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AACrF,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAGnD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,4EAA4E;AAC5E,eAAO,MAAM,SAAS,oBAAoB,CAAC;AAC3C,gFAAgF;AAChF,eAAO,MAAM,SAAS,oBAAoB,CAAC;AAE3C;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAO/C;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,CAAC,EAAE,GAAG,EACN,KAAK,EAAE,aAAa,EACpB,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,KAAK,SAAI,GACR;IAAE,QAAQ,EAAE,YAAY,EAAE,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAa9C"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * @file diagrams/ds/stack/stack.ts — LIFO stack (vertical cell strip + top marker).
3
+ *
4
+ * A vertical run of cells. The most-recently-pushed item sits at the TOP
5
+ * (smallest y); push and pop both happen at the top. A `top` pointer points
6
+ * into the top-of-stack cell from the left; a `capacity` larger than the
7
+ * filled count shows empty slots above the top (the stack grows upward).
8
+ *
9
+ * Value-driven mini-syntax:
10
+ * stack A B C D // push order; D is on top
11
+ * stack
12
+ * title call stack
13
+ * cells main parse layout // layout is on top
14
+ * capacity 6 // 3 empty slots above
15
+ */
16
+ import type { DiagramModule, ResolvedTheme, LayoutResult } from '../../../contracts/index.js';
17
+ export interface StackDoc {
18
+ title?: string;
19
+ /** Push order — the last element is the top of the stack. */
20
+ cells: string[];
21
+ capacity?: number;
22
+ }
23
+ export declare function layoutStack(doc: StackDoc, theme: ResolvedTheme): LayoutResult;
24
+ export declare const stack: DiagramModule<StackDoc & {
25
+ version: string;
26
+ metadata: Record<string, unknown>;
27
+ }>;
28
+ //# sourceMappingURL=stack.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stack.d.ts","sourceRoot":"","sources":["../../../../../../src/diagrams/ds/stack/stack.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EACV,aAAa,EAAE,aAAa,EAAE,YAAY,EAC3C,MAAM,6BAA6B,CAAC;AAOrC,MAAM,WAAW,QAAQ;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6DAA6D;IAC7D,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAiBD,wBAAgB,WAAW,CAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,GAAG,YAAY,CA0D7E;AAED,eAAO,MAAM,KAAK,EAAE,aAAa,CAAC,QAAQ,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CAUlG,CAAC"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * @file diagrams/struct/array.ts — Contiguous array (cell strip + pointers).
3
+ *
4
+ * Value-driven mini-syntax:
5
+ * array 5 8 13 21 34 // cells on the header line, or:
6
+ * array
7
+ * title nums
8
+ * cells 5 8 13 21 34
9
+ * index // show the index row
10
+ * ptr i -> 2 // a named pointer into cell 2
11
+ */
12
+ import type { DiagramModule, ResolvedTheme, LayoutResult } from '../../../contracts/index.js';
13
+ interface ArrayDoc {
14
+ title?: string;
15
+ cells: string[];
16
+ index: boolean;
17
+ ptrs: {
18
+ name: string;
19
+ idx: number;
20
+ }[];
21
+ }
22
+ export declare function layoutArray(doc: ArrayDoc, theme: ResolvedTheme): LayoutResult;
23
+ export declare const array: DiagramModule<ArrayDoc & {
24
+ version: string;
25
+ metadata: Record<string, unknown>;
26
+ }>;
27
+ export {};
28
+ //# sourceMappingURL=array.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../../../../../src/diagrams/ds/struct/array.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EACV,aAAa,EAAE,aAAa,EAAE,YAAY,EAC3C,MAAM,6BAA6B,CAAC;AAOrC,UAAU,QAAQ;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CACvC;AAsBD,wBAAgB,WAAW,CAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,GAAG,YAAY,CA6C7E;AAED,eAAO,MAAM,KAAK,EAAE,aAAa,CAAC,QAAQ,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CAUlG,CAAC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @file diagrams/struct/linkedlist.ts — Singly linked list (slot + pointer).
3
+ *
4
+ * Value-driven:
5
+ * linkedlist 3 7 9 // head -> [3|·] -> [7|·] -> [9|/] (null)
6
+ * linkedlist
7
+ * title queue
8
+ * 3 7 9
9
+ */
10
+ import type { DiagramModule, ResolvedTheme, LayoutResult } from '../../../contracts/index.js';
11
+ interface ListDoc {
12
+ title?: string;
13
+ values: string[];
14
+ }
15
+ export declare function layoutList(doc: ListDoc, theme: ResolvedTheme): LayoutResult;
16
+ export declare const linkedlist: DiagramModule<ListDoc & {
17
+ version: string;
18
+ metadata: Record<string, unknown>;
19
+ }>;
20
+ export {};
21
+ //# sourceMappingURL=linkedlist.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linkedlist.d.ts","sourceRoot":"","sources":["../../../../../../src/diagrams/ds/struct/linkedlist.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,aAAa,EAAE,aAAa,EAAE,YAAY,EAC3C,MAAM,6BAA6B,CAAC;AAMrC,UAAU,OAAO;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAeD,wBAAgB,UAAU,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,aAAa,GAAG,YAAY,CA4D3E;AAED,eAAO,MAAM,UAAU,EAAE,aAAa,CAAC,OAAO,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CAUtG,CAAC"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * @file diagrams/struct/memory.ts — Memory regions with cross-region pointers.
3
+ *
4
+ * Value-driven mini-syntax:
5
+ * memory
6
+ * title Stack -> Heap
7
+ * region STACK
8
+ * var p -> obj // a slot holding a reference
9
+ * region HEAP
10
+ * object obj : Point : x=1, y=2
11
+ *
12
+ * Exercises connectSlots across region boundaries (the slot-aware pointer).
13
+ */
14
+ import type { DiagramModule, ResolvedTheme, LayoutResult } from '../../../contracts/index.js';
15
+ interface VarItem {
16
+ kind: 'var';
17
+ name: string;
18
+ target?: string;
19
+ }
20
+ interface ObjItem {
21
+ kind: 'object';
22
+ id: string;
23
+ title: string;
24
+ fields: {
25
+ k: string;
26
+ v: string;
27
+ }[];
28
+ }
29
+ type Item = VarItem | ObjItem;
30
+ interface Region {
31
+ name: string;
32
+ items: Item[];
33
+ }
34
+ interface MemoryDoc {
35
+ title?: string;
36
+ regions: Region[];
37
+ }
38
+ export declare function layoutMemory(doc: MemoryDoc, theme: ResolvedTheme): LayoutResult;
39
+ export declare const memory: DiagramModule<MemoryDoc & {
40
+ version: string;
41
+ metadata: Record<string, unknown>;
42
+ }>;
43
+ export {};
44
+ //# sourceMappingURL=memory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../../../../../src/diagrams/ds/struct/memory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EACV,aAAa,EAAE,aAAa,EAAE,YAAY,EAC3C,MAAM,6BAA6B,CAAC;AAOrC,UAAU,OAAO;IAAG,IAAI,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAAE;AACjE,UAAU,OAAO;IAAG,IAAI,EAAE,QAAQ,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAAE;AACpG,KAAK,IAAI,GAAG,OAAO,GAAG,OAAO,CAAC;AAC9B,UAAU,MAAM;IAAG,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,IAAI,EAAE,CAAC;CAAE;AACjD,UAAU,SAAS;IAAG,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAC;CAAE;AA+B1D,wBAAgB,YAAY,CAAC,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,aAAa,GAAG,YAAY,CAsF/E;AAED,eAAO,MAAM,MAAM,EAAE,aAAa,CAAC,SAAS,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CAUpG,CAAC"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @file diagrams/struct/page.ts — Slotted page (storage layout).
3
+ *
4
+ * Value-driven:
5
+ * page
6
+ * title heap page
7
+ * slots 4
8
+ * tuples (10,Ann) (40,Bob) (50,Cy)
9
+ *
10
+ * Line pointers (slots) indirect to tuples — the classic slotted-page layout
11
+ * that lets tuples move without invalidating their slot ids.
12
+ */
13
+ import type { DiagramModule, ResolvedTheme, LayoutResult } from '../../../contracts/index.js';
14
+ interface PageDoc {
15
+ title?: string;
16
+ slots?: number;
17
+ tuples: string[];
18
+ }
19
+ export declare function layoutPage(doc: PageDoc, theme: ResolvedTheme): LayoutResult;
20
+ export declare const page: DiagramModule<PageDoc & {
21
+ version: string;
22
+ metadata: Record<string, unknown>;
23
+ }>;
24
+ export {};
25
+ //# sourceMappingURL=page.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../../src/diagrams/ds/struct/page.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EACV,aAAa,EAAE,aAAa,EAAE,YAAY,EAC3C,MAAM,6BAA6B,CAAC;AAMrC,UAAU,OAAO;IAAG,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAC;CAAE;AAgBvE,wBAAgB,UAAU,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,aAAa,GAAG,YAAY,CA2D3E;AAED,eAAO,MAAM,IAAI,EAAE,aAAa,CAAC,OAAO,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CAUhG,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @file diagrams/struct/shared.ts — Shared helpers for the strip/memory family.
3
+ */
4
+ export declare const ARROW_ID = "struct-arrow";
5
+ /** A small filled arrowhead marker def in the given colour. */
6
+ export declare function arrowDef(color: string): string;
7
+ /** Tokens on the keyword line and directive lines, trimmed and split. */
8
+ export declare function lines(input: string): string[];
9
+ //# sourceMappingURL=shared.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../../../src/diagrams/ds/struct/shared.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,QAAQ,iBAAiB,CAAC;AAEvC,+DAA+D;AAC/D,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED,yEAAyE;AACzE,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAE7C"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @file diagrams/tree/avl.ts — AVL-tree front-end over the tree engine.
3
+ *
4
+ * Value-driven: the source is a list of integers (`avl insert 50 30 70 …`); the
5
+ * builder performs real BST insertion with AVL rotations and emits one circle
6
+ * node per key with its balance-factor badge. The structure is always valid by
7
+ * construction — you cannot author an unbalanced AVL tree.
8
+ */
9
+ import type { DiagramModule } from '../../../contracts/index.js';
10
+ import type { TreeDocument } from './ir.js';
11
+ /** Build a valid AVL tree IR from the integers in the source. */
12
+ export declare function buildAvl(input: string): TreeDocument;
13
+ export declare const avl: DiagramModule<TreeDocument>;
14
+ //# sourceMappingURL=avl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"avl.d.ts","sourceRoot":"","sources":["../../../../../../src/diagrams/ds/tree/avl.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAA+B,MAAM,6BAA6B,CAAC;AAC9F,OAAO,KAAK,EAAE,YAAY,EAAY,MAAM,SAAS,CAAC;AAsCtD,iEAAiE;AACjE,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY,CAkBpD;AAED,eAAO,MAAM,GAAG,EAAE,aAAa,CAAC,YAAY,CAU3C,CAAC"}