@diagrammo/dgmo 0.75.0 → 0.77.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 (120) hide show
  1. package/dist/advanced.d.ts +181 -12
  2. package/dist/advanced.js +267 -60
  3. package/dist/block.css +20 -3
  4. package/dist/block.d.ts +12 -4
  5. package/dist/block.js +35 -18
  6. package/dist/{chart-meta-lP8Rl19E.d.ts → chart-meta-Cf_jkApJ.d.ts} +2 -2
  7. package/dist/chart-meta.d.ts +3 -3
  8. package/dist/chart-meta.js +6 -6
  9. package/dist/{charts-d3-SQEVMIAM.js → charts-d3-HMEMHSSW.js} +5 -5
  10. package/dist/{chunk-E3BJVEMZ.js → chunk-2MTM4E6M.js} +2 -2
  11. package/dist/{chunk-UBW53CNS.js → chunk-3E4YB6TY.js} +2 -2
  12. package/dist/{chunk-IFC3JXCT.js → chunk-3O7ZYVJV.js} +2 -2
  13. package/dist/{chunk-Q6BAFS7I.js → chunk-43AJKH2U.js} +3 -3
  14. package/dist/{chunk-2NRIGEHZ.js → chunk-46KVXDUJ.js} +10 -3
  15. package/dist/chunk-53SEVJQM.js +9 -0
  16. package/dist/{chunk-UTTRJ6KN.js → chunk-5ZD4DDG7.js} +4 -4
  17. package/dist/{chunk-AFR6GWXD.js → chunk-6BVAW7KI.js} +4 -4
  18. package/dist/{chunk-CLQJAGWL.js → chunk-6IN4F4RH.js} +4 -4
  19. package/dist/{chunk-76IBFEYW.js → chunk-6ZZKEYBS.js} +4 -4
  20. package/dist/{chunk-QUYYL3LP.js → chunk-7CXW6EGX.js} +5 -5
  21. package/dist/chunk-7IATMZSA.js +72 -0
  22. package/dist/{chunk-HOIAQ3P2.js → chunk-B52RL5VV.js} +2 -2
  23. package/dist/{chunk-IGQW7TKM.js → chunk-BH3BQICT.js} +5 -5
  24. package/dist/{chunk-3LJNQ6LR.js → chunk-CF3I5SOG.js} +5 -5
  25. package/dist/{chunk-ZMKCG3FT.js → chunk-CHOK7NCJ.js} +6 -6
  26. package/dist/{chunk-U74EGVOA.js → chunk-CIWFL2LM.js} +4 -4
  27. package/dist/{chunk-OUJG73YJ.js → chunk-CYMYZYLI.js} +5 -5
  28. package/dist/{chunk-BCB24FG7.js → chunk-D3B6YEZK.js} +3 -3
  29. package/dist/{chunk-XHROEQ23.js → chunk-DSXWJAOA.js} +4 -4
  30. package/dist/{chunk-RT7ACF77.js → chunk-EGY3TS62.js} +6 -6
  31. package/dist/{chunk-CQKD6GOC.js → chunk-EUVUOPRC.js} +4 -4
  32. package/dist/{chunk-TDHD3HNO.js → chunk-F4X5NVKY.js} +37 -16
  33. package/dist/{chunk-7G4XMHDB.js → chunk-FF7LRT5L.js} +4 -4
  34. package/dist/{chunk-6DYZ2JM6.js → chunk-FR5EVD2X.js} +206 -32
  35. package/dist/{chunk-R5JPMW2F.js → chunk-FTTB64OJ.js} +5 -5
  36. package/dist/{chunk-U7AO6FRL.js → chunk-H7BYMIVK.js} +312 -118
  37. package/dist/{chunk-M3IVOGZE.js → chunk-HDLRRY3N.js} +61 -55
  38. package/dist/{chunk-F4CPZRG2.js → chunk-J76YDS4V.js} +2 -2
  39. package/dist/{chunk-SUA56ZSB.js → chunk-LTTZX6RD.js} +6 -2
  40. package/dist/{chunk-7EZ5AKBK.js → chunk-LYJ53DBK.js} +8 -6
  41. package/dist/{chunk-JQ575OAK.js → chunk-MZEGUDTA.js} +2 -2
  42. package/dist/{chunk-IHUOYDLN.js → chunk-N5NQIZ56.js} +5 -5
  43. package/dist/{chunk-GE5RO4BS.js → chunk-N6MZSBOL.js} +5 -1
  44. package/dist/{chunk-DU3OIBQE.js → chunk-NWNSXHA5.js} +6 -2
  45. package/dist/{chunk-32MOGTKT.js → chunk-OO2L2LWV.js} +4 -4
  46. package/dist/{chunk-XCAEHWQB.js → chunk-OZOHREFQ.js} +3 -3
  47. package/dist/{chunk-DSH7NJ2G.js → chunk-QBM5BURJ.js} +4 -4
  48. package/dist/{chunk-YVDBBWEP.js → chunk-QXMHBIQG.js} +4 -4
  49. package/dist/{chunk-UWYZIGCB.js → chunk-RGW26UAR.js} +2 -2
  50. package/dist/{chunk-QI4Q5ZZH.js → chunk-RV5A3EGI.js} +4 -4
  51. package/dist/{chunk-HGFKDSKZ.js → chunk-SI3PYDL4.js} +4 -4
  52. package/dist/{chunk-CAPR5DET.js → chunk-SSEAULA5.js} +2 -2
  53. package/dist/{chunk-AYM472K3.js → chunk-SWUQJ5VR.js} +3 -3
  54. package/dist/{chunk-HFCKU73Y.js → chunk-TI4YUUW6.js} +3 -3
  55. package/dist/{chunk-LYLRNAX2.js → chunk-TKIPK5P6.js} +3 -3
  56. package/dist/{chunk-QT5UMFPE.js → chunk-U4DS2ODO.js} +3 -3
  57. package/dist/{chunk-XFLLYY3V.js → chunk-UBDVAHGK.js} +36 -52
  58. package/dist/{chunk-JL7BDLC6.js → chunk-UH5YTZN7.js} +4 -4
  59. package/dist/{chunk-GEURKGZS.js → chunk-V4NHFY22.js} +4 -4
  60. package/dist/{chunk-4SXHMFFP.js → chunk-VRPV6QXR.js} +23 -12
  61. package/dist/{chunk-BFTRW24X.js → chunk-WHWUVDYK.js} +65 -24
  62. package/dist/{chunk-U5B3TUEW.js → chunk-XCFIAGT7.js} +2 -2
  63. package/dist/{chunk-COCMMQXW.js → chunk-XFXJXLK7.js} +2 -2
  64. package/dist/{chunk-YDA46XHI.js → chunk-XPBJVSRY.js} +2 -2
  65. package/dist/{chunk-VV6HZQ5K.js → chunk-YM5RMLFO.js} +2 -2
  66. package/dist/{d3--y67plmW.d.ts → d3-BiaJtaSw.d.ts} +1 -1
  67. package/dist/{dgmo-router-KYNLRE7S.js → dgmo-router-A3LIHT6H.js} +7 -7
  68. package/dist/{dgmo-router-CY5j16Pl.d.ts → dgmo-router-BwXHZ_P3.d.ts} +1 -1
  69. package/dist/{dimensions-NLQ64ED5.js → dimensions-OFF4GRFL.js} +4 -4
  70. package/dist/{flowchart-parser-LY5GGQL2.js → flowchart-parser-NVBP3C5D.js} +2 -2
  71. package/dist/{flowchart-renderer-RIJ5FZKO.js → flowchart-renderer-BBJUPORB.js} +6 -6
  72. package/dist/index.d.ts +7 -7
  73. package/dist/index.js +14 -14
  74. package/dist/{layout-UJ62RQQ3.js → layout-2OJ25STS.js} +2 -2
  75. package/dist/{layout-DAYQ46PS.js → layout-Y2V3LYV7.js} +3 -3
  76. package/dist/{parser-LUOINP6H.js → parser-QYAIFXLP.js} +3 -3
  77. package/dist/{parser-L7RXUKYN.js → parser-WVE6SKB7.js} +2 -2
  78. package/dist/{parser-JYIZEKAS.js → parser-ZYAFHXKQ.js} +2 -2
  79. package/dist/{renderer-FUJNSC5X.js → renderer-2ANDPQWC.js} +3 -3
  80. package/dist/{renderer-UYZSP7MF.js → renderer-2LDT4TUX.js} +5 -5
  81. package/dist/{renderer-4EWGZLJ6.js → renderer-2NYQDW37.js} +3 -3
  82. package/dist/{renderer-LBNVKVO3.js → renderer-2RIIIO34.js} +5 -5
  83. package/dist/{renderer-PKRKLOYR.js → renderer-3HFU3DTO.js} +5 -5
  84. package/dist/{renderer-UUP6OX6F.js → renderer-4BF6ILP6.js} +5 -5
  85. package/dist/{renderer-MUW4G2N6.js → renderer-5E2AH5TO.js} +7 -7
  86. package/dist/{renderer-DKW273R7.js → renderer-62SLWRYF.js} +6 -5
  87. package/dist/{renderer-WDSBFDQ2.js → renderer-ANJUDBOS.js} +6 -6
  88. package/dist/{renderer-OTHBTGBN.js → renderer-CVWQD442.js} +3 -3
  89. package/dist/{renderer-GJDVPXI3.js → renderer-D6GJ6EVK.js} +6 -6
  90. package/dist/{renderer-KMOGGMM7.js → renderer-DNFV2IQI.js} +5 -5
  91. package/dist/{renderer-UYYBJ7OB.js → renderer-EDVCGIQO.js} +10 -10
  92. package/dist/{renderer-73QHYZ2Q.js → renderer-EFQSMHID.js} +6 -6
  93. package/dist/{renderer-EP4GRCDX.js → renderer-FTX67CYZ.js} +3 -3
  94. package/dist/{renderer-GF6S5ZX6.js → renderer-G2DPKJAN.js} +5 -5
  95. package/dist/{renderer-QAMOXOZ2.js → renderer-GHBF5PRH.js} +3 -3
  96. package/dist/{renderer-5W3HWIUL.js → renderer-GZLRX764.js} +5 -5
  97. package/dist/{renderer-CO5O5VR5.js → renderer-H2HYLFN3.js} +3 -3
  98. package/dist/{renderer-JMJ7Q5OC.js → renderer-IR5655M7.js} +5 -5
  99. package/dist/{renderer-4PNVGHVA.js → renderer-L237AOOZ.js} +3 -3
  100. package/dist/{renderer-A2YWSBPY.js → renderer-LSJWYGOL.js} +7 -7
  101. package/dist/{renderer-PR3KLNST.js → renderer-LWXDMZOV.js} +5 -5
  102. package/dist/{renderer-3FB56573.js → renderer-MYSVPERC.js} +5 -5
  103. package/dist/{renderer-FGGDZZFQ.js → renderer-OL5QSZPC.js} +6 -6
  104. package/dist/{renderer-XBL6CLN2.js → renderer-P26HH3NA.js} +5 -5
  105. package/dist/{renderer-D7N7PPB7.js → renderer-R5HIRN2M.js} +3 -3
  106. package/dist/{renderer-BUEFD2IF.js → renderer-RNFECJ5D.js} +5 -5
  107. package/dist/{renderer-F24V3RD3.js → renderer-RPZVNCTF.js} +5 -5
  108. package/dist/{renderer-PIEPRK6M.js → renderer-SDNWZDUY.js} +5 -5
  109. package/dist/{renderer-RUHC6D3B.js → renderer-UKHH4UWV.js} +5 -5
  110. package/dist/{renderer-CGOPX4HW.js → renderer-VF7X66SL.js} +5 -5
  111. package/dist/{renderer-ZAJ5353N.js → renderer-Y3Y7PEUS.js} +3 -3
  112. package/dist/{renderer-radial-MZP3SVTZ.js → renderer-radial-QNGCGKZP.js} +5 -5
  113. package/dist/{state-renderer-454ADT7E.js → state-renderer-ELWDRXD6.js} +7 -7
  114. package/dist/{tag-groups-DrHT2tEc.d.ts → tag-groups-BAtkq0b_.d.ts} +39 -1
  115. package/dist/{themes-GWhsabnx.d.ts → themes-DpsyRSO7.d.ts} +2 -2
  116. package/docs/language-reference.md +3 -3
  117. package/gallery/fixtures/sketch.dgmo +1 -1
  118. package/package.json +5 -4
  119. package/dist/chunk-PDKUANDZ.js +0 -35
  120. package/dist/chunk-UTCPNJND.js +0 -7
package/dist/block.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { M as MapDataSource } from './d3--y67plmW.js';
2
- import './tag-groups-DrHT2tEc.js';
1
+ import { M as MapDataSource } from './d3-BiaJtaSw.js';
2
+ import './tag-groups-BAtkq0b_.js';
3
3
 
4
4
  /**
5
5
  * Canonical stylesheet for the standard DGMO embed block (BL-114).
@@ -9,10 +9,18 @@ import './tag-groups-DrHT2tEc.js';
9
9
  * consumers, and the `BLOCK_CSS` string export for embedders that inject a
10
10
  * `<style>` tag.
11
11
  *
12
- * Dark mode keys off `[data-theme="dark"]`. Hosts with a different signal
13
- * (`html.dark`, `body.theme-dark`) rewrite the selector at their build step —
12
+ * Dark mode keys off BOTH `[data-theme="dark"]` (Starlight, Docusaurus) and
13
+ * `html.dark` (Tailwind, next-themes, VitePress), because those two cover
14
+ * essentially every host and picking one silently left the other half of the
15
+ * ecosystem with a diagram that never toggled. A host on a third signal
16
+ * (`body.theme-dark`) still rewrites the selector at its build step —
14
17
  * fumadocs-dgmo/nextra-dgmo's build-css.mjs is the reference adapter.
15
18
  *
19
+ * 🔴 Keep the two conventions in SEPARATE rule blocks. `auto/styles.ts`
20
+ * re-scopes the `[data-theme="dark"]` rules onto `.dgmo-theme-dark` with a
21
+ * regex that swallows everything up to the `{`, so folding them into one
22
+ * multi-selector rule would drag `html.dark` into the re-scoped copy too.
23
+ *
16
24
  * The `.dgmo-tok-*` role colors mirror LIGHT_ROLE_STYLES (light) and
17
25
  * NORD_ROLE_STYLES (dark) from editor/highlight-api.ts. A parity test
18
26
  * (tests/block.test.ts) guards against drift — update both when either
package/dist/block.js CHANGED
@@ -4,30 +4,30 @@ import {
4
4
  } from "./chunk-D3K4U3ZM.js";
5
5
  import {
6
6
  render
7
- } from "./chunk-M3IVOGZE.js";
7
+ } from "./chunk-HDLRRY3N.js";
8
8
  import {
9
9
  docsLink,
10
10
  renderErrorCard
11
- } from "./chunk-XCAEHWQB.js";
11
+ } from "./chunk-OZOHREFQ.js";
12
12
  import "./chunk-EOYPX6SF.js";
13
- import "./chunk-JL7BDLC6.js";
13
+ import "./chunk-UH5YTZN7.js";
14
14
  import "./chunk-L65WI4HO.js";
15
- import "./chunk-YVDBBWEP.js";
15
+ import "./chunk-QXMHBIQG.js";
16
16
  import "./chunk-YRYKTYMQ.js";
17
17
  import "./chunk-24YPR5EH.js";
18
- import "./chunk-UBW53CNS.js";
18
+ import "./chunk-3E4YB6TY.js";
19
19
  import "./chunk-MG3DE3VO.js";
20
20
  import "./chunk-RU2HHHYA.js";
21
21
  import "./chunk-DEW62ON3.js";
22
- import "./chunk-QT5UMFPE.js";
23
- import "./chunk-4SXHMFFP.js";
24
- import "./chunk-UTCPNJND.js";
22
+ import "./chunk-U4DS2ODO.js";
23
+ import "./chunk-VRPV6QXR.js";
24
+ import "./chunk-53SEVJQM.js";
25
25
  import "./chunk-YT5ICQ4R.js";
26
26
  import "./chunk-MTGGOCND.js";
27
27
  import {
28
28
  encodeDiagramUrl
29
29
  } from "./chunk-U7VO6JAA.js";
30
- import "./chunk-R5JPMW2F.js";
30
+ import "./chunk-FTTB64OJ.js";
31
31
  import "./chunk-SH4PPRU7.js";
32
32
  import "./chunk-A2RUBBVT.js";
33
33
  import "./chunk-5PFNUDXR.js";
@@ -51,8 +51,8 @@ import {
51
51
  } from "./chunk-WFA6IULY.js";
52
52
  import "./chunk-BWJLLNUX.js";
53
53
  import "./chunk-KRTLS3G6.js";
54
- import "./chunk-TDHD3HNO.js";
55
- import "./chunk-RT7ACF77.js";
54
+ import "./chunk-F4X5NVKY.js";
55
+ import "./chunk-EGY3TS62.js";
56
56
  import "./chunk-W7UBPARG.js";
57
57
  import "./chunk-S5P5Z5Y5.js";
58
58
  import "./chunk-QQJUTGQH.js";
@@ -66,7 +66,7 @@ import "./chunk-UCZBRGJN.js";
66
66
  import "./chunk-7BMX2M3F.js";
67
67
  import "./chunk-3SP6G4LN.js";
68
68
  import "./chunk-ZM27UI5O.js";
69
- import "./chunk-2NRIGEHZ.js";
69
+ import "./chunk-46KVXDUJ.js";
70
70
  import "./chunk-TPN7RJOM.js";
71
71
  import "./chunk-EQW6HOP4.js";
72
72
  import {
@@ -74,11 +74,11 @@ import {
74
74
  } from "./chunk-DAOFNU6J.js";
75
75
  import "./chunk-7NSNE52V.js";
76
76
  import "./chunk-C3Z4DX3V.js";
77
- import "./chunk-DU3OIBQE.js";
77
+ import "./chunk-NWNSXHA5.js";
78
78
  import "./chunk-7TF3QOOD.js";
79
79
  import "./chunk-M5JT2AU7.js";
80
80
  import "./chunk-NXMESY4J.js";
81
- import "./chunk-SUA56ZSB.js";
81
+ import "./chunk-LTTZX6RD.js";
82
82
  import "./chunk-ICVIJLBA.js";
83
83
  import "./chunk-76NHL5UG.js";
84
84
  import "./chunk-E6PNTYRK.js";
@@ -572,10 +572,21 @@ function escapeAttr(s) {
572
572
  // src/embed/css.ts
573
573
  var BLOCK_CSS = `
574
574
  /* @diagrammo/dgmo block \u2014 standard embed chrome.
575
- * Override the [data-theme="dark"] selectors if your site uses .dark or
576
- * another color-mode convention. */
575
+ * Dark mode is keyed on a data-theme="dark" attribute (Starlight, Docusaurus)
576
+ * AND an html.dark class (Tailwind, next-themes, VitePress), so all of those
577
+ * work as shipped. Add your own selector if your site marks dark a third way.
578
+ *
579
+ * No selector is spelled in bracket form anywhere in these comments on
580
+ * purpose: the adapters that re-key the attribute rules onto another host's
581
+ * signal match that exact substring, and a mention inside a comment would be
582
+ * swallowed into a rule they then emit as garbage. */
577
583
 
578
- /* === Color-mode visibility (dual-render) === */
584
+ /* === Color-mode visibility (dual-render) ===
585
+ * The dark wrapper also carries the "hidden" ATTRIBUTE, so a page that never
586
+ * loaded this stylesheet shows the light diagram rather than both of them.
587
+ * Every rule below is author-origin and therefore still overrides it.
588
+ * Keep the two host conventions in separate rule blocks \u2014 the adapters
589
+ * rewrite by literal replace and a folded rule would half-rewrite. */
579
590
  .dgmo-dark {
580
591
  display: none;
581
592
  }
@@ -585,6 +596,12 @@ var BLOCK_CSS = `
585
596
  [data-theme="dark"] .dgmo-dark {
586
597
  display: block;
587
598
  }
599
+ html.dark .dgmo-light {
600
+ display: none;
601
+ }
602
+ html.dark .dgmo-dark {
603
+ display: block;
604
+ }
588
605
 
589
606
  /* === Diagram sizing ===
590
607
  * SVGs are emitted with viewBox only (no fixed width/height). Force them to
@@ -1068,7 +1085,7 @@ async function renderDgmoBlock(source, options = {}) {
1068
1085
  renderTheme("dark")
1069
1086
  ]);
1070
1087
  const background = opts.background === "auto" ? defaultEmbedBackground(chartType) : opts.background;
1071
- svgsHtml = `<div class="${escapeAttr(innerClasses(opts, "dgmo-light"))}" data-dgmo-bg="${escapeAttr(palette.light.bg)}">${normalizeSvgForEmbed(light, { background })}</div><div class="${escapeAttr(innerClasses(opts, "dgmo-dark"))}" data-dgmo-bg="${escapeAttr(palette.dark.bg)}">${normalizeSvgForEmbed(dark, { background })}</div>`;
1088
+ svgsHtml = `<div class="${escapeAttr(innerClasses(opts, "dgmo-light"))}" data-dgmo-bg="${escapeAttr(palette.light.bg)}">${normalizeSvgForEmbed(light, { background })}</div><div class="${escapeAttr(innerClasses(opts, "dgmo-dark"))}" data-dgmo-bg="${escapeAttr(palette.dark.bg)}" hidden>${normalizeSvgForEmbed(dark, { background })}</div>`;
1072
1089
  } else {
1073
1090
  const svg = await renderTheme(opts.colorMode);
1074
1091
  const background = opts.background === "auto" ? defaultEmbedBackground(chartType) : opts.background;
@@ -1,5 +1,5 @@
1
- import './dgmo-router-CY5j16Pl.js';
2
- import { a as PaletteColors, T as TagGroup, D as DgmoError } from './tag-groups-DrHT2tEc.js';
1
+ import './dgmo-router-BwXHZ_P3.js';
2
+ import { a as PaletteColors, T as TagGroup, D as DgmoError } from './tag-groups-BAtkq0b_.js';
3
3
 
4
4
  /** Convert hex (#RRGGBB or #RGB) to { h, s, l } with h in degrees, s/l as percentages. */
5
5
  declare function hexToHSL(hex: string): {
@@ -1,3 +1,3 @@
1
- export { C as ChartTypeId, a as ChartTypeMeta, c as chartTypes, f as getAvailablePalettes, g as getPalette, l as parseDgmoChartType } from './dgmo-router-CY5j16Pl.js';
2
- export { A as ALL_CHART_TYPES, O as OrgNode, P as ParsedOrg, l as hexToHSLString, o as normalizePertSourceForShare, p as parseFirstLine, q as parseOrg, r as parseRaci, s as resolveOrgImports } from './chart-meta-lP8Rl19E.js';
3
- export { C as CompactViewState, h as DecodedDiagramUrl, i as EncodeDiagramUrlOptions, j as EncodeDiagramUrlResult, a as PaletteColors, l as decodeDiagramUrl, m as decodeViewState, n as encodeDiagramUrl, o as encodeViewState } from './tag-groups-DrHT2tEc.js';
1
+ export { C as ChartTypeId, a as ChartTypeMeta, c as chartTypes, f as getAvailablePalettes, g as getPalette, l as parseDgmoChartType } from './dgmo-router-BwXHZ_P3.js';
2
+ export { A as ALL_CHART_TYPES, O as OrgNode, P as ParsedOrg, l as hexToHSLString, o as normalizePertSourceForShare, p as parseFirstLine, q as parseOrg, r as parseRaci, s as resolveOrgImports } from './chart-meta-Cf_jkApJ.js';
3
+ export { C as CompactViewState, h as DecodedDiagramUrl, i as EncodeDiagramUrlOptions, j as EncodeDiagramUrlResult, a as PaletteColors, l as decodeDiagramUrl, m as decodeViewState, n as encodeDiagramUrl, o as encodeViewState } from './tag-groups-BAtkq0b_.js';
@@ -10,7 +10,7 @@ import {
10
10
  } from "./chunk-U7VO6JAA.js";
11
11
  import {
12
12
  parseDgmoChartType
13
- } from "./chunk-R5JPMW2F.js";
13
+ } from "./chunk-FTTB64OJ.js";
14
14
  import "./chunk-SH4PPRU7.js";
15
15
  import "./chunk-A2RUBBVT.js";
16
16
  import "./chunk-5PFNUDXR.js";
@@ -33,8 +33,8 @@ import "./chunk-Z7KVOVE4.js";
33
33
  import "./chunk-WFA6IULY.js";
34
34
  import "./chunk-BWJLLNUX.js";
35
35
  import "./chunk-KRTLS3G6.js";
36
- import "./chunk-TDHD3HNO.js";
37
- import "./chunk-RT7ACF77.js";
36
+ import "./chunk-F4X5NVKY.js";
37
+ import "./chunk-EGY3TS62.js";
38
38
  import "./chunk-W7UBPARG.js";
39
39
  import "./chunk-S5P5Z5Y5.js";
40
40
  import "./chunk-QQJUTGQH.js";
@@ -48,17 +48,17 @@ import "./chunk-UCZBRGJN.js";
48
48
  import "./chunk-7BMX2M3F.js";
49
49
  import "./chunk-3SP6G4LN.js";
50
50
  import "./chunk-ZM27UI5O.js";
51
- import "./chunk-2NRIGEHZ.js";
51
+ import "./chunk-46KVXDUJ.js";
52
52
  import "./chunk-TPN7RJOM.js";
53
53
  import "./chunk-EQW6HOP4.js";
54
54
  import "./chunk-DAOFNU6J.js";
55
55
  import "./chunk-7NSNE52V.js";
56
56
  import "./chunk-C3Z4DX3V.js";
57
- import "./chunk-DU3OIBQE.js";
57
+ import "./chunk-NWNSXHA5.js";
58
58
  import "./chunk-7TF3QOOD.js";
59
59
  import "./chunk-M5JT2AU7.js";
60
60
  import "./chunk-NXMESY4J.js";
61
- import "./chunk-SUA56ZSB.js";
61
+ import "./chunk-LTTZX6RD.js";
62
62
  import "./chunk-ICVIJLBA.js";
63
63
  import "./chunk-76NHL5UG.js";
64
64
  import "./chunk-E6PNTYRK.js";
@@ -2,14 +2,14 @@ import {
2
2
  D3_DATA_CHART_TYPES,
3
3
  renderDataChartD3,
4
4
  supportsD3DataChart
5
- } from "./chunk-JL7BDLC6.js";
5
+ } from "./chunk-UH5YTZN7.js";
6
6
  import "./chunk-L65WI4HO.js";
7
- import "./chunk-UBW53CNS.js";
7
+ import "./chunk-3E4YB6TY.js";
8
8
  import "./chunk-MG3DE3VO.js";
9
9
  import "./chunk-RU2HHHYA.js";
10
10
  import "./chunk-DEW62ON3.js";
11
- import "./chunk-4SXHMFFP.js";
12
- import "./chunk-UTCPNJND.js";
11
+ import "./chunk-VRPV6QXR.js";
12
+ import "./chunk-53SEVJQM.js";
13
13
  import "./chunk-YT5ICQ4R.js";
14
14
  import "./chunk-MTGGOCND.js";
15
15
  import "./chunk-M526IKKH.js";
@@ -26,4 +26,4 @@ export {
26
26
  renderDataChartD3,
27
27
  supportsD3DataChart
28
28
  };
29
- //# sourceMappingURL=charts-d3-SQEVMIAM.js.map
29
+ //# sourceMappingURL=charts-d3-HMEMHSSW.js.map
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-WGC42WJU.js";
8
8
  import {
9
9
  FONT_FAMILY
10
- } from "./chunk-UTCPNJND.js";
10
+ } from "./chunk-53SEVJQM.js";
11
11
  import {
12
12
  DAY_MS,
13
13
  applyOrdinalTemplate,
@@ -1026,4 +1026,4 @@ export {
1026
1026
  renderCountdown,
1027
1027
  renderCountdownForExport
1028
1028
  };
1029
- //# sourceMappingURL=chunk-E3BJVEMZ.js.map
1029
+ //# sourceMappingURL=chunk-2MTM4E6M.js.map
@@ -8,7 +8,7 @@ import {
8
8
  } from "./chunk-DEW62ON3.js";
9
9
  import {
10
10
  FONT_FAMILY
11
- } from "./chunk-UTCPNJND.js";
11
+ } from "./chunk-53SEVJQM.js";
12
12
  import {
13
13
  getSeriesColors
14
14
  } from "./chunk-GLREDNBA.js";
@@ -130,4 +130,4 @@ export {
130
130
  createExportContainer,
131
131
  finalizeSvgExport
132
132
  };
133
- //# sourceMappingURL=chunk-UBW53CNS.js.map
133
+ //# sourceMappingURL=chunk-3E4YB6TY.js.map
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-DEW62ON3.js";
6
6
  import {
7
7
  FONT_FAMILY
8
- } from "./chunk-UTCPNJND.js";
8
+ } from "./chunk-53SEVJQM.js";
9
9
  import {
10
10
  getSeriesColors,
11
11
  mix
@@ -443,4 +443,4 @@ export {
443
443
  renderVersionControl,
444
444
  renderVersionControlForExport
445
445
  };
446
- //# sourceMappingURL=chunk-IFC3JXCT.js.map
446
+ //# sourceMappingURL=chunk-3O7ZYVJV.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  renderIntegratedLegend
3
- } from "./chunk-QT5UMFPE.js";
3
+ } from "./chunk-U4DS2ODO.js";
4
4
  import {
5
5
  FONT_FAMILY
6
- } from "./chunk-UTCPNJND.js";
6
+ } from "./chunk-53SEVJQM.js";
7
7
  import {
8
8
  getFigure,
9
9
  getPartGeom,
@@ -346,4 +346,4 @@ export {
346
346
  renderBody,
347
347
  renderBodyForExport
348
348
  };
349
- //# sourceMappingURL=chunk-Q6BAFS7I.js.map
349
+ //# sourceMappingURL=chunk-43AJKH2U.js.map
@@ -942,6 +942,7 @@ function stripNodeDecorations(name) {
942
942
  }
943
943
  function extractSymbols(docText) {
944
944
  const entities = [];
945
+ const seen = /* @__PURE__ */ new Set();
945
946
  let inMetadata = true;
946
947
  let inTagGroup = false;
947
948
  for (const rawLine of docText.split("\n")) {
@@ -976,7 +977,10 @@ function extractSymbols(docText) {
976
977
  const m = COMPONENT_RE.exec(line);
977
978
  if (m) {
978
979
  const name = stripNodeDecorations((m[1] ?? m[2] ?? "").trim());
979
- if (name && !entities.includes(name)) entities.push(name);
980
+ if (name && !seen.has(name)) {
981
+ seen.add(name);
982
+ entities.push(name);
983
+ }
980
984
  }
981
985
  } else {
982
986
  if (inTagGroup) continue;
@@ -991,7 +995,10 @@ function extractSymbols(docText) {
991
995
  const m = COMPONENT_RE.exec(line);
992
996
  if (m) {
993
997
  const name = stripNodeDecorations((m[1] ?? m[2] ?? "").trim());
994
- if (name && !entities.includes(name)) entities.push(name);
998
+ if (name && !seen.has(name)) {
999
+ seen.add(name);
1000
+ entities.push(name);
1001
+ }
995
1002
  }
996
1003
  }
997
1004
  }
@@ -1004,4 +1011,4 @@ export {
1004
1011
  parseInfra,
1005
1012
  extractSymbols
1006
1013
  };
1007
- //# sourceMappingURL=chunk-2NRIGEHZ.js.map
1014
+ //# sourceMappingURL=chunk-46KVXDUJ.js.map
@@ -0,0 +1,9 @@
1
+ // src/fonts.ts
2
+ var FONT_FAMILY = "Inter, system-ui, Avenir, Helvetica, Arial, sans-serif";
3
+ var DEFAULT_FONT_NAME = "Inter";
4
+
5
+ export {
6
+ FONT_FAMILY,
7
+ DEFAULT_FONT_NAME
8
+ };
9
+ //# sourceMappingURL=chunk-53SEVJQM.js.map
@@ -8,14 +8,14 @@ import {
8
8
  } from "./chunk-DEW62ON3.js";
9
9
  import {
10
10
  renderIntegratedLegend
11
- } from "./chunk-QT5UMFPE.js";
11
+ } from "./chunk-U4DS2ODO.js";
12
12
  import {
13
13
  getLegendExtent,
14
14
  getMaxLegendReservedHeight
15
- } from "./chunk-4SXHMFFP.js";
15
+ } from "./chunk-VRPV6QXR.js";
16
16
  import {
17
17
  FONT_FAMILY
18
- } from "./chunk-UTCPNJND.js";
18
+ } from "./chunk-53SEVJQM.js";
19
19
  import {
20
20
  LEGEND_GROUP_GAP
21
21
  } from "./chunk-YT5ICQ4R.js";
@@ -397,4 +397,4 @@ export {
397
397
  renderBlock,
398
398
  authoredCollapsedIds
399
399
  };
400
- //# sourceMappingURL=chunk-UTTRJ6KN.js.map
400
+ //# sourceMappingURL=chunk-5ZD4DDG7.js.map
@@ -16,15 +16,15 @@ import {
16
16
  } from "./chunk-DEW62ON3.js";
17
17
  import {
18
18
  renderIntegratedLegend
19
- } from "./chunk-QT5UMFPE.js";
19
+ } from "./chunk-U4DS2ODO.js";
20
20
  import {
21
21
  controlsGroupCapsuleWidth,
22
22
  getLegendExtent,
23
23
  getMaxLegendReservedHeight
24
- } from "./chunk-4SXHMFFP.js";
24
+ } from "./chunk-VRPV6QXR.js";
25
25
  import {
26
26
  FONT_FAMILY
27
- } from "./chunk-UTCPNJND.js";
27
+ } from "./chunk-53SEVJQM.js";
28
28
  import {
29
29
  LEGEND_CAPSULE_PAD,
30
30
  LEGEND_DOT_R,
@@ -2152,4 +2152,4 @@ export {
2152
2152
  renderGantt,
2153
2153
  buildTagLaneRowList
2154
2154
  };
2155
- //# sourceMappingURL=chunk-AFR6GWXD.js.map
2155
+ //# sourceMappingURL=chunk-6BVAW7KI.js.map
@@ -20,14 +20,14 @@ import {
20
20
  } from "./chunk-DEW62ON3.js";
21
21
  import {
22
22
  renderIntegratedLegend
23
- } from "./chunk-QT5UMFPE.js";
23
+ } from "./chunk-U4DS2ODO.js";
24
24
  import {
25
25
  getLegendExtent,
26
26
  getMaxLegendReservedHeight
27
- } from "./chunk-4SXHMFFP.js";
27
+ } from "./chunk-VRPV6QXR.js";
28
28
  import {
29
29
  FONT_FAMILY
30
- } from "./chunk-UTCPNJND.js";
30
+ } from "./chunk-53SEVJQM.js";
31
31
  import {
32
32
  legendChromeColors
33
33
  } from "./chunk-YT5ICQ4R.js";
@@ -2074,4 +2074,4 @@ export {
2074
2074
  renderSequenceDiagram,
2075
2075
  buildNoteMessageMap
2076
2076
  };
2077
- //# sourceMappingURL=chunk-CLQJAGWL.js.map
2077
+ //# sourceMappingURL=chunk-6IN4F4RH.js.map
@@ -22,14 +22,14 @@ import {
22
22
  } from "./chunk-DEW62ON3.js";
23
23
  import {
24
24
  renderIntegratedLegend
25
- } from "./chunk-QT5UMFPE.js";
25
+ } from "./chunk-U4DS2ODO.js";
26
26
  import {
27
27
  getLegendExtent,
28
28
  getMaxLegendReservedHeight
29
- } from "./chunk-4SXHMFFP.js";
29
+ } from "./chunk-VRPV6QXR.js";
30
30
  import {
31
31
  FONT_FAMILY
32
- } from "./chunk-UTCPNJND.js";
32
+ } from "./chunk-53SEVJQM.js";
33
33
  import {
34
34
  LEGEND_GROUP_GAP
35
35
  } from "./chunk-YT5ICQ4R.js";
@@ -317,4 +317,4 @@ export {
317
317
  renderFamilyForExport,
318
318
  renderFamily
319
319
  };
320
- //# sourceMappingURL=chunk-76IBFEYW.js.map
320
+ //# sourceMappingURL=chunk-6ZZKEYBS.js.map
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  edgeSplinePath,
3
3
  fitDiagramToCanvas
4
- } from "./chunk-PDKUANDZ.js";
4
+ } from "./chunk-7IATMZSA.js";
5
5
  import {
6
6
  layoutGraph
7
- } from "./chunk-GE5RO4BS.js";
7
+ } from "./chunk-N6MZSBOL.js";
8
8
  import {
9
9
  appendArrowheadMarkers
10
10
  } from "./chunk-LP7EC4MI.js";
@@ -33,13 +33,13 @@ import {
33
33
  } from "./chunk-DEW62ON3.js";
34
34
  import {
35
35
  FONT_FAMILY
36
- } from "./chunk-UTCPNJND.js";
36
+ } from "./chunk-53SEVJQM.js";
37
37
  import {
38
38
  measureText
39
39
  } from "./chunk-MTGGOCND.js";
40
40
  import {
41
41
  parseFlowchart
42
- } from "./chunk-DU3OIBQE.js";
42
+ } from "./chunk-NWNSXHA5.js";
43
43
  import {
44
44
  fillModeFromOptions
45
45
  } from "./chunk-M5OOAP65.js";
@@ -586,4 +586,4 @@ export {
586
586
  renderFlowchart,
587
587
  renderFlowchartForExport
588
588
  };
589
- //# sourceMappingURL=chunk-QUYYL3LP.js.map
589
+ //# sourceMappingURL=chunk-7CXW6EGX.js.map
@@ -0,0 +1,72 @@
1
+ // src/utils/fit-canvas.ts
2
+ function fitDiagramToCanvas(p) {
3
+ const scaleX = (p.width - p.padding * 2) / p.diagramW;
4
+ let scale;
5
+ let canvasHeight;
6
+ if (p.exportMode) {
7
+ scale = Math.min(p.maxScale, scaleX);
8
+ canvasHeight = p.titleHeight + p.diagramH * scale + p.padding * 2;
9
+ } else {
10
+ const availH = p.height - p.titleHeight;
11
+ const scaleY = (availH - p.padding * 2) / p.diagramH;
12
+ scale = Math.min(p.maxScale, scaleX, scaleY);
13
+ canvasHeight = p.height;
14
+ }
15
+ const scaledW = p.diagramW * scale;
16
+ return {
17
+ scale,
18
+ offsetX: (p.width - scaledW) / 2,
19
+ offsetY: p.titleHeight + p.padding,
20
+ canvasHeight
21
+ };
22
+ }
23
+
24
+ // src/graph/edge-spline.ts
25
+ import * as d3Shape from "d3-shape";
26
+ var lineGenerator = d3Shape.line().x((d) => d.x).y((d) => d.y).curve(d3Shape.curveBasis);
27
+ function edgeSplinePath(points) {
28
+ return lineGenerator(points);
29
+ }
30
+ function selfLoopArcPath(points) {
31
+ if (points.length < 3) return null;
32
+ const p0 = points[0];
33
+ const p3 = points[points.length - 1];
34
+ const chordX = p3.x - p0.x;
35
+ const chordY = p3.y - p0.y;
36
+ const chordLen = Math.hypot(chordX, chordY);
37
+ if (chordLen === 0) return null;
38
+ let apex = points[Math.floor(points.length / 2)];
39
+ let farthest = -1;
40
+ for (let i = 1; i < points.length - 1; i++) {
41
+ const pt = points[i];
42
+ const away = Math.abs((pt.x - p0.x) * chordY - (pt.y - p0.y) * chordX) / chordLen;
43
+ if (away > farthest) {
44
+ farthest = away;
45
+ apex = pt;
46
+ }
47
+ }
48
+ let ux = apex.x - (p0.x + p3.x) / 2;
49
+ let uy = apex.y - (p0.y + p3.y) / 2;
50
+ const uLen = Math.hypot(ux, uy);
51
+ if (uLen === 0) return null;
52
+ ux /= uLen;
53
+ uy /= uLen;
54
+ const a1 = points[1];
55
+ const a2 = points[points.length - 2];
56
+ const needX = (8 * apex.x - p0.x - p3.x) / 3;
57
+ const needY = (8 * apex.y - p0.y - p3.y) / 3;
58
+ const t = Math.abs(ux) >= Math.abs(uy) ? (needX - (a1.x + a2.x)) / (2 * ux) : (needY - (a1.y + a2.y)) / (2 * uy);
59
+ if (!Number.isFinite(t)) return null;
60
+ const c1x = a1.x + ux * t;
61
+ const c1y = a1.y + uy * t;
62
+ const c2x = a2.x + ux * t;
63
+ const c2y = a2.y + uy * t;
64
+ return `M${p0.x},${p0.y}C${c1x},${c1y},${c2x},${c2y},${p3.x},${p3.y}`;
65
+ }
66
+
67
+ export {
68
+ fitDiagramToCanvas,
69
+ edgeSplinePath,
70
+ selfLoopArcPath
71
+ };
72
+ //# sourceMappingURL=chunk-7IATMZSA.js.map
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk-DEW62ON3.js";
15
15
  import {
16
16
  FONT_FAMILY
17
- } from "./chunk-UTCPNJND.js";
17
+ } from "./chunk-53SEVJQM.js";
18
18
  import {
19
19
  CHAR_WIDTH_RATIO,
20
20
  measureText
@@ -296,4 +296,4 @@ export {
296
296
  renderRing,
297
297
  renderRingForExport
298
298
  };
299
- //# sourceMappingURL=chunk-HOIAQ3P2.js.map
299
+ //# sourceMappingURL=chunk-B52RL5VV.js.map
@@ -28,14 +28,14 @@ import {
28
28
  } from "./chunk-DEW62ON3.js";
29
29
  import {
30
30
  renderIntegratedLegend
31
- } from "./chunk-QT5UMFPE.js";
31
+ } from "./chunk-U4DS2ODO.js";
32
32
  import {
33
33
  getLegendExtent,
34
34
  getMaxLegendReservedHeight
35
- } from "./chunk-4SXHMFFP.js";
35
+ } from "./chunk-VRPV6QXR.js";
36
36
  import {
37
37
  FONT_FAMILY
38
- } from "./chunk-UTCPNJND.js";
38
+ } from "./chunk-53SEVJQM.js";
39
39
  import {
40
40
  LEGEND_CAPSULE_PAD,
41
41
  LEGEND_DOT_R,
@@ -54,7 +54,7 @@ import {
54
54
  } from "./chunk-MTGGOCND.js";
55
55
  import {
56
56
  parseInfra
57
- } from "./chunk-2NRIGEHZ.js";
57
+ } from "./chunk-46KVXDUJ.js";
58
58
  import {
59
59
  preprocessDescriptionLine
60
60
  } from "./chunk-IYULMRBE.js";
@@ -1613,4 +1613,4 @@ export {
1613
1613
  renderInfra,
1614
1614
  parseAndLayoutInfra
1615
1615
  };
1616
- //# sourceMappingURL=chunk-IGQW7TKM.js.map
1616
+ //# sourceMappingURL=chunk-BH3BQICT.js.map
@@ -16,7 +16,7 @@ import {
16
16
  } from "./chunk-FJ57274M.js";
17
17
  import {
18
18
  formatDateLabel
19
- } from "./chunk-YVDBBWEP.js";
19
+ } from "./chunk-QXMHBIQG.js";
20
20
  import {
21
21
  layoutInlineHeader
22
22
  } from "./chunk-MG3DE3VO.js";
@@ -27,13 +27,13 @@ import {
27
27
  } from "./chunk-DEW62ON3.js";
28
28
  import {
29
29
  renderIntegratedLegend
30
- } from "./chunk-QT5UMFPE.js";
30
+ } from "./chunk-U4DS2ODO.js";
31
31
  import {
32
32
  getLegendExtent
33
- } from "./chunk-4SXHMFFP.js";
33
+ } from "./chunk-VRPV6QXR.js";
34
34
  import {
35
35
  FONT_FAMILY
36
- } from "./chunk-UTCPNJND.js";
36
+ } from "./chunk-53SEVJQM.js";
37
37
  import {
38
38
  CHAR_WIDTH_RATIO,
39
39
  wrapTextToWidth
@@ -1161,4 +1161,4 @@ export {
1161
1161
  focusEventLine,
1162
1162
  renderEventLineForExport
1163
1163
  };
1164
- //# sourceMappingURL=chunk-3LJNQ6LR.js.map
1164
+ //# sourceMappingURL=chunk-CF3I5SOG.js.map