@diagrammo/dgmo 0.15.1 → 0.17.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 (122) hide show
  1. package/README.md +9 -9
  2. package/dist/advanced.cjs +612 -734
  3. package/dist/advanced.d.cts +42 -36
  4. package/dist/advanced.d.ts +42 -36
  5. package/dist/advanced.js +612 -733
  6. package/dist/auto.cjs +508 -620
  7. package/dist/auto.js +105 -105
  8. package/dist/auto.mjs +508 -620
  9. package/dist/cli.cjs +144 -144
  10. package/dist/editor.cjs +8 -9
  11. package/dist/editor.js +8 -9
  12. package/dist/highlight.cjs +8 -9
  13. package/dist/highlight.js +8 -9
  14. package/dist/index.cjs +497 -608
  15. package/dist/index.js +497 -608
  16. package/dist/internal.cjs +612 -734
  17. package/dist/internal.d.cts +42 -36
  18. package/dist/internal.d.ts +42 -36
  19. package/dist/internal.js +612 -733
  20. package/dist/pert.d.cts +2 -2
  21. package/dist/pert.d.ts +2 -2
  22. package/docs/language-reference.md +97 -84
  23. package/docs/migration-sequence-color-to-tags.md +1 -1
  24. package/gallery/fixtures/area.dgmo +3 -3
  25. package/gallery/fixtures/bar-stacked.dgmo +5 -5
  26. package/gallery/fixtures/boxes-and-lines.dgmo +2 -2
  27. package/gallery/fixtures/c4-full.dgmo +8 -8
  28. package/gallery/fixtures/class-full.dgmo +2 -2
  29. package/gallery/fixtures/doughnut.dgmo +6 -6
  30. package/gallery/fixtures/flowchart-colors.dgmo +3 -3
  31. package/gallery/fixtures/function.dgmo +3 -3
  32. package/gallery/fixtures/gantt-full.dgmo +9 -9
  33. package/gallery/fixtures/gantt.dgmo +7 -7
  34. package/gallery/fixtures/infra-full.dgmo +6 -6
  35. package/gallery/fixtures/infra.dgmo +2 -2
  36. package/gallery/fixtures/kanban.dgmo +9 -9
  37. package/gallery/fixtures/line.dgmo +2 -2
  38. package/gallery/fixtures/multi-line.dgmo +3 -3
  39. package/gallery/fixtures/org-full.dgmo +6 -6
  40. package/gallery/fixtures/quadrant.dgmo +2 -2
  41. package/gallery/fixtures/sankey.dgmo +9 -9
  42. package/gallery/fixtures/scatter.dgmo +3 -3
  43. package/gallery/fixtures/sequence-tags-protocols.dgmo +11 -11
  44. package/gallery/fixtures/sequence-tags.dgmo +10 -10
  45. package/gallery/fixtures/sequence.dgmo +4 -4
  46. package/gallery/fixtures/sitemap-full.dgmo +7 -7
  47. package/gallery/fixtures/slope.dgmo +5 -5
  48. package/gallery/fixtures/spr-eras.dgmo +9 -9
  49. package/gallery/fixtures/timeline.dgmo +3 -3
  50. package/gallery/fixtures/venn.dgmo +3 -3
  51. package/package.json +7 -3
  52. package/src/advanced.ts +0 -1
  53. package/src/auto/index.ts +2 -2
  54. package/src/boxes-and-lines/layout.ts +1 -2
  55. package/src/boxes-and-lines/renderer.ts +5 -1
  56. package/src/c4/parser.ts +2 -2
  57. package/src/c4/renderer.ts +15 -8
  58. package/src/chart.ts +18 -9
  59. package/src/class/parser.ts +8 -7
  60. package/src/class/renderer.ts +17 -6
  61. package/src/cli.ts +8 -8
  62. package/src/completion.ts +14 -17
  63. package/src/cycle/parser.ts +15 -1
  64. package/src/cycle/renderer.ts +6 -3
  65. package/src/d3.ts +88 -49
  66. package/src/diagnostics.ts +20 -0
  67. package/src/echarts.ts +28 -11
  68. package/src/editor/dgmo.grammar +1 -3
  69. package/src/editor/dgmo.grammar.d.ts +1 -1
  70. package/src/editor/dgmo.grammar.js +8 -8
  71. package/src/editor/dgmo.grammar.terms.js +11 -12
  72. package/src/editor/highlight-api.ts +0 -1
  73. package/src/editor/highlight.ts +0 -1
  74. package/src/er/parser.ts +19 -12
  75. package/src/er/renderer.ts +19 -7
  76. package/src/gantt/parser.ts +1 -1
  77. package/src/gantt/renderer.ts +7 -4
  78. package/src/graph/flowchart-parser.ts +18 -84
  79. package/src/graph/flowchart-renderer.ts +6 -8
  80. package/src/graph/layout.ts +0 -2
  81. package/src/graph/state-parser.ts +17 -62
  82. package/src/graph/state-renderer.ts +3 -8
  83. package/src/infra/parser.ts +21 -11
  84. package/src/infra/renderer.ts +8 -6
  85. package/src/journey-map/parser.ts +11 -4
  86. package/src/journey-map/renderer.ts +3 -1
  87. package/src/kanban/parser.ts +11 -7
  88. package/src/kanban/renderer.ts +3 -1
  89. package/src/mindmap/parser.ts +4 -5
  90. package/src/mindmap/renderer.ts +2 -1
  91. package/src/org/parser.ts +3 -3
  92. package/src/org/renderer.ts +4 -3
  93. package/src/pert/analyzer.ts +10 -10
  94. package/src/pert/layout.ts +1 -1
  95. package/src/pert/parser.ts +8 -8
  96. package/src/pert/renderer.ts +7 -2
  97. package/src/pert/types.ts +1 -1
  98. package/src/pyramid/parser.ts +13 -1
  99. package/src/raci/parser.ts +42 -12
  100. package/src/raci/renderer.ts +2 -1
  101. package/src/raci/types.ts +4 -3
  102. package/src/ring/parser.ts +13 -1
  103. package/src/sequence/parser.ts +81 -23
  104. package/src/sequence/participant-inference.ts +18 -181
  105. package/src/sequence/renderer.ts +48 -137
  106. package/src/sitemap/layout.ts +0 -2
  107. package/src/sitemap/parser.ts +12 -38
  108. package/src/sitemap/renderer.ts +13 -13
  109. package/src/sitemap/types.ts +0 -1
  110. package/src/tech-radar/parser.ts +2 -2
  111. package/src/tech-radar/renderer.ts +5 -3
  112. package/src/tech-radar/types.ts +2 -0
  113. package/src/utils/arrows.ts +3 -28
  114. package/src/utils/extract-alias.ts +1 -1
  115. package/src/utils/inline-markdown.ts +1 -1
  116. package/src/utils/legend-d3.ts +12 -6
  117. package/src/utils/legend-layout.ts +1 -1
  118. package/src/utils/legend-types.ts +1 -1
  119. package/src/utils/parsing.ts +64 -35
  120. package/src/utils/tag-groups.ts +98 -18
  121. package/src/utils/time-ticks.ts +1 -1
  122. package/src/wireframe/parser.ts +3 -3
package/src/d3.ts CHANGED
@@ -205,6 +205,7 @@ import {
205
205
  normalizeNumericToken,
206
206
  parseFirstLine,
207
207
  parsePipeMetadata,
208
+ peelTrailingColorName,
208
209
  MULTIPLE_PIPE_ERROR,
209
210
  } from './utils/parsing';
210
211
  import {
@@ -495,7 +496,7 @@ export function parseVisualization(
495
496
  result.diagnostics.push(makeDgmoError(line, message, 'warning'));
496
497
  };
497
498
 
498
- if (!content || !content.trim()) {
499
+ if (!content?.trim()) {
499
500
  return fail(0, 'Empty content');
500
501
  }
501
502
 
@@ -593,8 +594,12 @@ export function parseVisualization(
593
594
  currentTimelineTagGroup = null;
594
595
  }
595
596
 
596
- // [Group] container headers for arc diagram node grouping and timeline eras
597
- const groupMatch = line.match(/^\[(.+?)\](?:\s*\(([^)]+)\))?\s*$/);
597
+ // [Group] container headers for arc / timeline (§1.5 trailing-token):
598
+ // `[Group]` — no color
599
+ // `[Group] color` — trailing-token color (recognized palette word)
600
+ const groupMatch = line.match(
601
+ /^\[(.+?)\](?:\s+(red|orange|yellow|green|blue|purple|teal|cyan|gray|black|white))?\s*$/
602
+ );
598
603
  if (groupMatch) {
599
604
  if (result.type === 'arc') {
600
605
  const name = groupMatch[1].trim();
@@ -649,10 +654,11 @@ export function parseVisualization(
649
654
  currentTimelineGroup = null;
650
655
  }
651
656
 
652
- // Arc link line: source -> target(color) weight
657
+ // Arc link line (§1.5 trailing-token):
658
+ // `source -> target [color] [weight]` — color before weight
653
659
  if (result.type === 'arc') {
654
660
  const linkMatch = line.match(
655
- /^(.+?)\s*->\s*(.+?)(?:\(([^)]+)\))?\s*(?:\s+(-?[\d,_]+(?:\.[\d]+)?))?$/
661
+ /^(.+?)\s*->\s*(.+?)(?:\s+(red|orange|yellow|green|blue|purple|teal|cyan|gray|black|white))?(?:\s+(-?[\d,_]+(?:\.[\d]+)?))?$/
656
662
  );
657
663
  if (linkMatch) {
658
664
  const source = linkMatch[1].trim();
@@ -698,8 +704,12 @@ export function parseVisualization(
698
704
  // fall through to process this line normally
699
705
  } else {
700
706
  if (line.startsWith('//')) continue;
707
+ // Timeline era block entry (\u00a71.5 trailing-token):
708
+ // `<start> -> <end> Label` (no color)
709
+ // `<start> -> <end> Label color` (trailing color word)
710
+ // Color (group 4) must be a recognized lowercase palette word.
701
711
  const eraEntryMatch = line.match(
702
- /^(\d{4}(?:-\d{2})?(?:-\d{2}(?: \d{2}:\d{2})?)?)\s*(?:->|\u2013>)\s*(\d{4}(?:-\d{2})?(?:-\d{2}(?: \d{2}:\d{2})?)?)\s+(.+?)(?:\s*\(([^)]+)\))?\s*$/
712
+ /^(\d{4}(?:-\d{2})?(?:-\d{2}(?: \d{2}:\d{2})?)?)\s*(?:->|\u2013>)\s*(\d{4}(?:-\d{2})?(?:-\d{2}(?: \d{2}:\d{2})?)?)\s+(.+?)(?:\s+(red|orange|yellow|green|blue|purple|teal|cyan|gray|black|white))?\s*$/
703
713
  );
704
714
  if (eraEntryMatch) {
705
715
  const colorAnnotation = eraEntryMatch[4]?.trim() || null;
@@ -731,8 +741,9 @@ export function parseVisualization(
731
741
  // fall through to process this line normally
732
742
  } else {
733
743
  if (line.startsWith('//')) continue;
744
+ // Timeline marker block entry (§1.5 trailing-token).
734
745
  const markerEntryMatch = line.match(
735
- /^(\d{4}(?:-\d{2})?(?:-\d{2}(?: \d{2}:\d{2})?)?)\s+(.+?)(?:\s*\(([^)]+)\))?\s*$/
746
+ /^(\d{4}(?:-\d{2})?(?:-\d{2}(?: \d{2}:\d{2})?)?)\s+(.+?)(?:\s+(red|orange|yellow|green|blue|purple|teal|cyan|gray|black|white))?\s*$/
736
747
  );
737
748
  if (markerEntryMatch) {
738
749
  const colorAnnotation = markerEntryMatch[3]?.trim() || null;
@@ -772,9 +783,11 @@ export function parseVisualization(
772
783
  continue;
773
784
  }
774
785
 
775
- // Timeline era lines (inline): era YYYY->YYYY Label (color)
786
+ // Timeline era lines, inline (\u00a71.5 trailing-token):
787
+ // `era YYYY->YYYY Label` \u2014 no color
788
+ // `era YYYY->YYYY Label color` \u2014 trailing-token color (recognized palette word)
776
789
  const eraMatch = line.match(
777
- /^era\s+(\d{4}(?:-\d{2})?(?:-\d{2}(?: \d{2}:\d{2})?)?)\s*(?:->|\u2013>)\s*(\d{4}(?:-\d{2})?(?:-\d{2}(?: \d{2}:\d{2})?)?)\s+(.+?)(?:\s*\(([^)]+)\))?\s*$/
790
+ /^era\s+(\d{4}(?:-\d{2})?(?:-\d{2}(?: \d{2}:\d{2})?)?)\s*(?:->|\u2013>)\s*(\d{4}(?:-\d{2})?(?:-\d{2}(?: \d{2}:\d{2})?)?)\s+(.+?)(?:\s+(red|orange|yellow|green|blue|purple|teal|cyan|gray|black|white))?\s*$/
778
791
  );
779
792
  if (eraMatch) {
780
793
  const colorAnnotation = eraMatch[4]?.trim() || null;
@@ -795,9 +808,11 @@ export function parseVisualization(
795
808
  continue;
796
809
  }
797
810
 
798
- // Timeline marker lines (inline): marker YYYY Label (color)
811
+ // Timeline marker lines, inline (§1.5 trailing-token):
812
+ // `marker YYYY Label` — no color
813
+ // `marker YYYY Label color` — trailing-token color
799
814
  const markerMatch = line.match(
800
- /^marker\s+(\d{4}(?:-\d{2})?(?:-\d{2}(?: \d{2}:\d{2})?)?)\s+(.+?)(?:\s*\(([^)]+)\))?\s*$/
815
+ /^marker\s+(\d{4}(?:-\d{2})?(?:-\d{2}(?: \d{2}:\d{2})?)?)\s+(.+?)(?:\s+(red|orange|yellow|green|blue|purple|teal|cyan|gray|black|white))?\s*$/
801
816
  );
802
817
  if (markerMatch) {
803
818
  const colorAnnotation = markerMatch[3]?.trim() || null;
@@ -959,19 +974,20 @@ export function parseVisualization(
959
974
  }
960
975
  }
961
976
 
962
- // Set declaration: "Name(color) as <alias>" / "Name as <alias>" / "Name(color)" / "Name"
963
- // Legacy "Name(color) alias <token>" emits E_VENN_ALIAS_KEYWORD_REMOVED.
977
+ // Set declaration (§1.5 universal trailing-token):
978
+ // `Name` / `Name color` / `Name as <alias>` / `Name color as <alias>`
979
+ // Legacy `Name color alias <token>` emits E_VENN_ALIAS_KEYWORD_REMOVED.
964
980
  // Only attempt set parsing if the line wasn't a bare-keyword option (handled above).
965
981
  if (!/^(solid-fill|no-name|no-value|no-percent|no-title)$/i.test(line)) {
966
982
  // Detect legacy `alias` keyword first — graceful degradation parses
967
983
  // the rest of the line so the set still appears.
968
- const legacyAliasMatch = line.match(
969
- /^([^(:]+?)(?:\(([^)]+)\))?\s+alias\s+(\S+)\s*$/i
970
- );
984
+ const legacyAliasMatch = line.match(/^(.+?)\s+alias\s+(\S+)\s*$/i);
971
985
  if (legacyAliasMatch) {
972
- const name = legacyAliasMatch[1].trim();
973
- const colorName = legacyAliasMatch[2]?.trim() ?? null;
974
- const aliasToken = legacyAliasMatch[3].trim();
986
+ const nameWithMaybeColor = legacyAliasMatch[1].trim();
987
+ const aliasToken = legacyAliasMatch[2].trim();
988
+ // Split off trailing-token color from the name region.
989
+ const { label: name, colorName } =
990
+ peelTrailingColorName(nameWithMaybeColor);
975
991
  let color: string | null = null;
976
992
  if (colorName) {
977
993
  color =
@@ -995,11 +1011,14 @@ export function parseVisualization(
995
1011
  }
996
1012
 
997
1013
  const setDeclMatch = line.match(
998
- /^([^(:]+?)(?:\(([^)]+)\))?(?:\s+as\s+([A-Za-z][A-Za-z0-9_]{0,11}))?\s*$/i
1014
+ /^(.+?)(?:\s+as\s+([A-Za-z][A-Za-z0-9_]{0,11}))?\s*$/i
999
1015
  );
1000
1016
  if (setDeclMatch) {
1001
- const name = setDeclMatch[1].trim();
1002
- const colorName = setDeclMatch[2]?.trim() ?? null;
1017
+ const nameWithMaybeColor = setDeclMatch[1].trim();
1018
+ const alias = setDeclMatch[2]?.trim() ?? null;
1019
+ // Split off trailing-token color from the name region (before `as`).
1020
+ const { label: name, colorName } =
1021
+ peelTrailingColorName(nameWithMaybeColor);
1003
1022
  let color: string | null = null;
1004
1023
  if (colorName) {
1005
1024
  color =
@@ -1010,7 +1029,6 @@ export function parseVisualization(
1010
1029
  palette
1011
1030
  ) ?? null;
1012
1031
  }
1013
- const alias = setDeclMatch[3]?.trim() ?? null;
1014
1032
  result.vennSets.push({ name, alias, color, lineNumber });
1015
1033
  continue;
1016
1034
  }
@@ -1057,19 +1075,20 @@ export function parseVisualization(
1057
1075
  continue;
1058
1076
  }
1059
1077
 
1060
- // Quadrant position labels: top-right Label (color)
1078
+ // Quadrant position labels (§1.5 trailing-token):
1079
+ // `top-right Label` — no color
1080
+ // `top-right Label color` — trailing-token color (recognized palette word)
1061
1081
  const quadrantLabelRe =
1062
1082
  /^(top-right|top-left|bottom-left|bottom-right)\s+(.+)/i;
1063
1083
  const quadrantMatch = line.match(quadrantLabelRe);
1064
1084
  if (quadrantMatch) {
1065
1085
  const position = quadrantMatch[1].toLowerCase();
1066
1086
  const labelPart = quadrantMatch[2].trim();
1067
- // Check for color annotation: "Label (color)" or "Label(color)"
1068
- const labelColorMatch = labelPart.match(/^(.+?)\s*\(([^)]+)\)\s*$/);
1069
- const text = labelColorMatch ? labelColorMatch[1].trim() : labelPart;
1070
- const color = labelColorMatch
1087
+ // Peel trailing recognized color word from the label.
1088
+ const { label: text, colorName } = peelTrailingColorName(labelPart);
1089
+ const color = colorName
1071
1090
  ? (resolveColorWithDiagnostic(
1072
- labelColorMatch[2].trim(),
1091
+ colorName,
1073
1092
  lineNumber,
1074
1093
  result.diagnostics,
1075
1094
  palette
@@ -1325,12 +1344,12 @@ export function parseVisualization(
1325
1344
  continue;
1326
1345
  }
1327
1346
 
1328
- // Color annotation: `Label (color)` → extract color
1329
- const colorMatch = joinedLabel.match(/^(.+?)\(([^)]+)\)\s*$/);
1330
- const labelPart = colorMatch ? colorMatch[1].trim() : joinedLabel;
1331
- const colorPart = colorMatch
1347
+ // Color annotation (§1.5 trailing-token): `Label color` → split.
1348
+ const { label: labelPart, colorName: colorWord } =
1349
+ peelTrailingColorName(joinedLabel);
1350
+ const colorPart = colorWord
1332
1351
  ? (resolveColorWithDiagnostic(
1333
- colorMatch[2].trim(),
1352
+ colorWord,
1334
1353
  lineNumber,
1335
1354
  result.diagnostics,
1336
1355
  palette
@@ -3885,7 +3904,8 @@ function renderTimelineTagLegendOverlay(
3885
3904
  onTagStateChange:
3886
3905
  | ((activeTagGroup: string | null, swimlaneTagGroup: string | null) => void)
3887
3906
  | undefined,
3888
- viewMode: boolean | undefined
3907
+ viewMode: boolean | undefined,
3908
+ exportMode?: boolean
3889
3909
  ): void {
3890
3910
  if (parsed.timelineTagGroups.length === 0) return;
3891
3911
 
@@ -4038,7 +4058,7 @@ function renderTimelineTagLegendOverlay(
4038
4058
  const centralConfig: LegendConfig = {
4039
4059
  groups: centralGroups,
4040
4060
  position: { placement: 'top-center', titleRelation: 'below-title' },
4041
- mode: 'fixed',
4061
+ mode: exportMode ? 'export' : 'preview',
4042
4062
  capsulePillAddonWidth: iconAddon,
4043
4063
  };
4044
4064
  const centralState: LegendState = { activeGroup: centralActive };
@@ -4087,8 +4107,7 @@ function renderTimelineTagLegendOverlay(
4087
4107
  groupEl.attr('data-tag-group', groupKey);
4088
4108
  if (isActive && !viewMode) {
4089
4109
  const isSwimActive =
4090
- currentSwimlaneGroup != null &&
4091
- currentSwimlaneGroup.toLowerCase() === groupKey;
4110
+ currentSwimlaneGroup?.toLowerCase() === groupKey;
4092
4111
  const pillWidth =
4093
4112
  measureLegendText(groupName, LG_PILL_FONT_SIZE) + LG_PILL_PAD;
4094
4113
  const pillXOff = LG_CAPSULE_PAD;
@@ -5517,7 +5536,8 @@ export function renderTimeline(
5517
5536
  activeTagGroup: string | null,
5518
5537
  swimlaneTagGroup: string | null
5519
5538
  ) => void,
5520
- viewMode?: boolean
5539
+ viewMode?: boolean,
5540
+ exportMode?: boolean
5521
5541
  ): void {
5522
5542
  const setup = setupTimeline(
5523
5543
  container,
@@ -5599,7 +5619,8 @@ export function renderTimeline(
5599
5619
  swimlaneTagGroup,
5600
5620
  activeTagGroup,
5601
5621
  onTagStateChange,
5602
- viewMode
5622
+ viewMode,
5623
+ exportMode
5603
5624
  );
5604
5625
  }
5605
5626
 
@@ -7512,8 +7533,10 @@ export async function renderForExport(
7512
7533
  c4System?: string;
7513
7534
  c4Container?: string;
7514
7535
  tagGroup?: string;
7536
+ exportMode?: boolean;
7515
7537
  }
7516
7538
  ): Promise<string> {
7539
+ const exportMode = options?.exportMode ?? false;
7517
7540
  // Flowchart and org chart use their own parser pipelines — intercept before parseVisualization()
7518
7541
  const { parseDgmoChartType } = await import('./dgmo-router');
7519
7542
  const detectedType = parseDgmoChartType(content);
@@ -7567,7 +7590,9 @@ export async function renderForExport(
7567
7590
  undefined,
7568
7591
  { width: exportWidth, height: exportHeight },
7569
7592
  activeTagGroup,
7570
- hiddenAttributes
7593
+ hiddenAttributes,
7594
+ undefined,
7595
+ exportMode
7571
7596
  );
7572
7597
  return finalizeSvgExport(container, theme, effectivePalette);
7573
7598
  }
@@ -7621,7 +7646,8 @@ export async function renderForExport(
7621
7646
  undefined,
7622
7647
  { width: exportWidth, height: exportHeight },
7623
7648
  activeTagGroup,
7624
- hiddenAttributes
7649
+ hiddenAttributes,
7650
+ exportMode
7625
7651
  );
7626
7652
  return finalizeSvgExport(container, theme, effectivePalette);
7627
7653
  }
@@ -7650,6 +7676,7 @@ export async function renderForExport(
7650
7676
  collapsedLanes: viewState?.cl ? new Set(viewState.cl) : undefined,
7651
7677
  collapsedColumns: viewState?.cc ? new Set(viewState.cc) : undefined,
7652
7678
  compactMeta: viewState?.cm,
7679
+ exportMode,
7653
7680
  });
7654
7681
  return finalizeSvgExport(container, theme, effectivePalette);
7655
7682
  }
@@ -7677,7 +7704,9 @@ export async function renderForExport(
7677
7704
  effectivePalette,
7678
7705
  theme === 'dark',
7679
7706
  undefined,
7680
- { width: exportWidth, height: exportHeight }
7707
+ { width: exportWidth, height: exportHeight },
7708
+ undefined,
7709
+ exportMode
7681
7710
  );
7682
7711
  return finalizeSvgExport(container, theme, effectivePalette);
7683
7712
  }
@@ -7711,7 +7740,8 @@ export async function renderForExport(
7711
7740
  erParsed.options['active-tag'],
7712
7741
  viewState?.tag ?? options?.tagGroup
7713
7742
  ),
7714
- viewState?.sem
7743
+ viewState?.sem,
7744
+ exportMode
7715
7745
  );
7716
7746
  return finalizeSvgExport(container, theme, effectivePalette);
7717
7747
  }
@@ -7751,6 +7781,7 @@ export async function renderForExport(
7751
7781
  exportDims: { width: exportWidth, height: exportHeight },
7752
7782
  activeTagGroup: viewState?.tag ?? options?.tagGroup,
7753
7783
  hiddenTagValues: blHiddenTagValues,
7784
+ exportMode,
7754
7785
  }
7755
7786
  );
7756
7787
  return finalizeSvgExport(container, theme, effectivePalette);
@@ -7810,7 +7841,7 @@ export async function renderForExport(
7810
7841
  undefined,
7811
7842
  hideDescriptions,
7812
7843
  colorByDepth ? null : activeTagGroup,
7813
- colorByDepth ? { colorByDepth: true } : undefined
7844
+ colorByDepth ? { colorByDepth: true, exportMode } : { exportMode }
7814
7845
  );
7815
7846
  return finalizeSvgExport(container, theme, effectivePalette);
7816
7847
  }
@@ -7912,7 +7943,8 @@ export async function renderForExport(
7912
7943
  c4Parsed.tagGroups,
7913
7944
  c4Parsed.options['active-tag'],
7914
7945
  viewState?.tag ?? options?.tagGroup
7915
- )
7946
+ ),
7947
+ exportMode
7916
7948
  );
7917
7949
  return finalizeSvgExport(container, theme, effectivePalette);
7918
7950
  }
@@ -8079,6 +8111,7 @@ export async function renderForExport(
8079
8111
  resolved.options.activeTag ?? undefined,
8080
8112
  viewState?.tag ?? options?.tagGroup
8081
8113
  ),
8114
+ exportMode,
8082
8115
  },
8083
8116
  { width: EXPORT_W, height: EXPORT_H }
8084
8117
  );
@@ -8126,7 +8159,8 @@ export async function renderForExport(
8126
8159
  effectivePalette,
8127
8160
  theme === 'dark',
8128
8161
  { width: RADAR_EXPORT_W, height: RADAR_EXPORT_H },
8129
- viewState
8162
+ viewState,
8163
+ exportMode
8130
8164
  );
8131
8165
  return finalizeSvgExport(container, theme, effectivePalette);
8132
8166
  }
@@ -8153,6 +8187,7 @@ export async function renderForExport(
8153
8187
  );
8154
8188
  renderJourneyMap(container, jmParsed, effectivePalette, theme === 'dark', {
8155
8189
  exportDims: { width: jmLayout.totalWidth, height: jmLayout.totalHeight },
8190
+ exportMode,
8156
8191
  });
8157
8192
  return finalizeSvgExport(container, theme, effectivePalette);
8158
8193
  }
@@ -8172,7 +8207,8 @@ export async function renderForExport(
8172
8207
  effectivePalette,
8173
8208
  theme === 'dark',
8174
8209
  { width: EXPORT_WIDTH, height: EXPORT_HEIGHT },
8175
- viewState
8210
+ viewState,
8211
+ exportMode
8176
8212
  );
8177
8213
  return finalizeSvgExport(container, theme, effectivePalette);
8178
8214
  }
@@ -8311,7 +8347,10 @@ export async function renderForExport(
8311
8347
  undefined,
8312
8348
  viewState?.tag ?? options?.tagGroup
8313
8349
  ),
8314
- viewState?.swim
8350
+ viewState?.swim,
8351
+ undefined,
8352
+ undefined,
8353
+ exportMode
8315
8354
  );
8316
8355
  } else if (parsed.type === 'venn') {
8317
8356
  renderVenn(container, parsed, effectivePalette, isDark, undefined, dims);
@@ -121,6 +121,14 @@ export const NAME_DIAGNOSTIC_CODES = {
121
121
  * unnecessary; the diagnostic directs users to the new syntax.
122
122
  */
123
123
  AKA_REMOVED: 'E_AKA_REMOVED',
124
+ /**
125
+ * Error: a removed sequence participant-type keyword was used in
126
+ * an `is a X` declaration. The 0.16.0 trim retained only
127
+ * `actor`/`database`/`cache`/`queue`; `service`/`frontend`/
128
+ * `networking`/`gateway`/`external` no longer carry semantic
129
+ * weight and emit this error so users drop the override.
130
+ */
131
+ PARTICIPANT_TYPE_REMOVED: 'E_PARTICIPANT_TYPE_REMOVED',
124
132
  } as const;
125
133
 
126
134
  /**
@@ -152,6 +160,18 @@ export function akaRemovedMessage(): string {
152
160
  return `'aka' is no longer supported — use the participant name directly`;
153
161
  }
154
162
 
163
+ /**
164
+ * Canonical message for `E_PARTICIPANT_TYPE_REMOVED`. Emitted when a
165
+ * sequence participant declaration uses a removed type keyword
166
+ * (`service`, `frontend`, `networking`, `gateway`, `external`).
167
+ */
168
+ export function participantTypeRemovedMessage(type: string): string {
169
+ return (
170
+ `'${type}' is no longer supported — drop 'is a ${type}'; ` +
171
+ `the participant renders as the default rectangle`
172
+ );
173
+ }
174
+
155
175
  // ============================================================
156
176
  // Universal Alias Syntax diagnostic codes (TD-18)
157
177
  // ============================================================
package/src/echarts.ts CHANGED
@@ -367,12 +367,15 @@ export function parseExtendedChart(
367
367
  }
368
368
 
369
369
  // [Category] container header with optional color: [Category Name] or [Category Name](color)
370
- const categoryMatch = trimmed.match(/^\[(.+?)\](?:\s*\(([^)]+)\))?\s*$/);
370
+ // Category brackets with optional trailing-token color (§1.5):
371
+ // `[Name]` or `[Name] color`. Per universal rule, color is a bare token.
372
+ const categoryMatch = trimmed.match(/^\[(.+?)\](?:\s+(\S+))?\s*$/);
371
373
  if (categoryMatch) {
372
374
  const catName = categoryMatch[1].trim();
373
- const catColor = categoryMatch[2]
375
+ const rawCatColor = categoryMatch[2]?.trim();
376
+ const catColor = rawCatColor
374
377
  ? (resolveColorWithDiagnostic(
375
- categoryMatch[2].trim(),
378
+ rawCatColor,
376
379
  lineNumber,
377
380
  result.diagnostics,
378
381
  palette
@@ -388,9 +391,14 @@ export function parseExtendedChart(
388
391
  continue;
389
392
  }
390
393
 
391
- // Sankey/chord link syntax: Source -> Target Value (directed) or Source -- Target Value (undirected)
394
+ // Sankey/chord link syntax (§1.5 universal trailing-token):
395
+ // `Source -> Target value` (directed, no link color)
396
+ // `Source -> Target value linkColor` (directed, trailing-token link color)
397
+ // `Source -- Target value` (undirected)
398
+ // Link color (if present) must be a recognized lowercase palette word.
399
+ // Source/target labels still accept trailing-token color via extractColor.
392
400
  const arrowMatch = trimmed.match(
393
- /^(.+?)\s*(->|--)\s*(.+?)\s+(-?[\d,_]+(?:\.[\d]+)?)\s*(?:\(([^)]+)\))?\s*$/
401
+ /^(.+?)\s*(->|--)\s*(.+?)\s+(-?[\d,_]+(?:\.[\d]+)?)(?:\s+(red|orange|yellow|green|blue|purple|teal|cyan|gray|black|white))?\s*$/
394
402
  );
395
403
  if (arrowMatch) {
396
404
  const [, rawSource, arrow, rawTarget, rawVal, rawLinkColor] = arrowMatch;
@@ -441,16 +449,25 @@ export function parseExtendedChart(
441
449
  sankeyStack.pop();
442
450
  }
443
451
  if (sankeyStack.length > 0) {
444
- // Parse "TargetName value (linkColor)" or "TargetName(nodeColor) value (linkColor)"
445
- // Strip trailing (color) annotation before parseDataRowValues it can't handle it
452
+ // Indented sankey child (§1.5 trailing-token):
453
+ // `TargetName value` link, no link color
454
+ // `TargetName value linkColor` — link with link color
455
+ // `TargetName nodeColor value` — node-colored child
456
+ // `TargetName nodeColor value linkColor` — both
457
+ // Strategy: peel a trailing recognized color word (after the value)
458
+ // first, then run parseDataRowValues on the remainder. Trailing
459
+ // tokens that aren't recognized colors stay in the data row.
446
460
  const valColorMatch = trimmed.match(
447
- /(-?[\d,_]+(?:\.[\d]+)?)\s*\(([^)]+)\)\s*$/
461
+ /(-?[\d,_]+(?:\.[\d]+)?)\s+(red|orange|yellow|green|blue|purple|teal|cyan|gray|black|white)\s*$/
448
462
  );
449
463
  const strippedLine = valColorMatch
450
- ? trimmed.replace(/\s*\([^)]+\)\s*$/, '')
464
+ ? trimmed.replace(
465
+ /\s+(red|orange|yellow|green|blue|purple|teal|cyan|gray|black|white)\s*$/,
466
+ ''
467
+ )
451
468
  : trimmed;
452
469
  const dataRow = parseDataRowValues(strippedLine);
453
- if (dataRow && dataRow.values.length === 1) {
470
+ if (dataRow?.values.length === 1) {
454
471
  const source = sankeyStack.at(-1)!.name;
455
472
  const linkColor = valColorMatch?.[2]
456
473
  ? resolveColorWithDiagnostic(
@@ -728,7 +745,7 @@ export function parseExtendedChart(
728
745
 
729
746
  // Funnel / generic data point: "Label value"
730
747
  const dataRow = parseDataRowValues(trimmed);
731
- if (dataRow && dataRow.values.length === 1) {
748
+ if (dataRow?.values.length === 1) {
732
749
  const { label: rawLabel, color: pointColor } = extractColor(
733
750
  dataRow.label,
734
751
  palette
@@ -8,7 +8,6 @@ contentPart {
8
8
  SectionMarker |
9
9
  Url |
10
10
  OpenBracket | CloseBracket | OpenParen | CloseParen | OpenAngle | CloseAngle |
11
- ColorAnnotation |
12
11
  Pipe | Colon | Comma | Plus | Dash | Tilde | Star | Question |
13
12
  ChartType |
14
13
  TagKeyword | DirectiveKeyword | ControlKeyword | ModifierKeyword |
@@ -38,7 +37,6 @@ contentPart {
38
37
 
39
38
  SectionMarker { "==" }
40
39
  Url { "http" "s"? "://" ![ \t\n|,)\]>]+ }
41
- ColorAnnotation { "(" $[a-z\-]+ ")" }
42
40
 
43
41
  Pipe { "|" }
44
42
  Colon { ":" }
@@ -66,7 +64,7 @@ contentPart {
66
64
 
67
65
  @precedence {
68
66
  Comment, SyncArrow, AsyncArrow,
69
- Duration, DateLiteral, Percentage, Number, SectionMarker, Url, ColorAnnotation,
67
+ Duration, DateLiteral, Percentage, Number, SectionMarker, Url,
70
68
  Pipe, Colon, Comma, Plus, Dash, Tilde, Star, Question,
71
69
  OpenBracket, CloseBracket, OpenParen, CloseParen, OpenAngle, CloseAngle,
72
70
  QuotedString, Identifier, Punct
@@ -1,2 +1,2 @@
1
- import { LRParser } from '@lezer/lr';
1
+ import type { LRParser } from '@lezer/lr';
2
2
  export declare const parser: LRParser;
@@ -3,16 +3,16 @@ import {LRParser} from "@lezer/lr"
3
3
  import {specializeKeyword} from "./tokens"
4
4
  export const parser = LRParser.deserialize({
5
5
  version: 14,
6
- states: "!WQVQPOOOOQO'#DV'#DVOOQO'#DQ'#DQO%cQPO'#CdOOQO'#DP'#DPQVQPOOOOQO-E7O-E7OOOQO,59O,59OOOQO-E6}-E6}",
7
- stateData: "&X~OwOS~OPPOQPORPOSPOTPOVSOXPOYPOZPO[PO]PO^PO_PO`POaPObPOcPOdPOePOfPOgPOhPOiPOjPOkPOlPOmPOnPOoPOpPOqPOrPOxSO~OPPOQPORPOSPOTPOXPOYPOZPO[PO]PO^PO_PO`POaPObPOcPOdPOePOfPOgPOhPOiPOjPOkPOlPOmPOnPOoPOpPOqPOrPO~OxVO~P#`OVXYZ[]^_`ghijklmnoabcdefpqrk~",
8
- goto: "!czPPPPPPPP{PPPPPPPPPPPPPPPPPPPPPPPPPP!P!VPPPP!^TSOTQTORWTSROTRURVQORT",
9
- nodeNames: "⚠ ChartType TagKeyword DirectiveKeyword ControlKeyword ModifierKeyword Document Comment ContentLine SyncArrow AsyncArrow Duration DateLiteral Percentage Number SectionMarker Url OpenBracket CloseBracket OpenParen CloseParen OpenAngle CloseAngle ColorAnnotation Pipe Colon Comma Plus Dash Tilde Star Question QuotedString Identifier Punct",
10
- maxTerm: 41,
6
+ states: "!WQVQPOOOOQO'#DU'#DUOOQO'#DP'#DPO%]QPO'#CdOOQO'#DO'#DOQVQPOOOOQO-E6}-E6}OOQO,59O,59OOOQO-E6|-E6|",
7
+ stateData: "&Q~OvOS~OPPOQPORPOSPOTPOVSOXPOYPOZPO[PO]PO^PO_PO`POaPObPOcPOdPOePOfPOgPOhPOiPOjPOkPOlPOmPOnPOoPOpPOqPOwSO~OPPOQPORPOSPOTPOXPOYPOZPO[PO]PO^PO_PO`POaPObPOcPOdPOePOfPOgPOhPOiPOjPOkPOlPOmPOnPOoPOpPOqPO~OwVO~P#]OVXYZ[]^_`ghijklmnabcdefopqk~",
8
+ goto: "!byPPPPPPPPzPPPPPPPPPPPPPPPPPPPPPPPPP!O!UPPPP!]TSOTQTORWTSROTRURVQORT",
9
+ nodeNames: "⚠ ChartType TagKeyword DirectiveKeyword ControlKeyword ModifierKeyword Document Comment ContentLine SyncArrow AsyncArrow Duration DateLiteral Percentage Number SectionMarker Url OpenBracket CloseBracket OpenParen CloseParen OpenAngle CloseAngle Pipe Colon Comma Plus Dash Tilde Star Question QuotedString Identifier Punct",
10
+ maxTerm: 40,
11
11
  skippedNodes: [0],
12
12
  repeatNodeCount: 2,
13
- tokenData: "=_~RzOX#uXY#zYZ$VZp#upq#zqr#urs$[st#uux#uxy%eyz&Tz{&[{|&c|}&j}!O&q!O!P#u!P!Q'Q!Q!['q![!]0d!]!^#u!^!_0k!_!`0r!`!a1P!a!b1W!b!c#u!c!}1_!}#O4e#O#P#u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W`p~qr1|st1|vw1|wx1|{|1|}!O3Q!O!P1|!P!Q1|!Q![1|![!]9X!_!`1|!a!b1|!b!c1|!c!}1|#R#S1|#T#o1|~<aOg~q~~<hPl~q~!`!a<k~<pOY~~<sP;=`<%l#u",
14
14
  tokenizers: [0],
15
15
  topRules: {"Document":[0,6]},
16
- specialized: [{term: 33, get: (value, stack) => (specializeKeyword(value, stack) << 1), external: specializeKeyword}],
17
- tokenPrec: 210
16
+ specialized: [{term: 32, get: (value, stack) => (specializeKeyword(value, stack) << 1), external: specializeKeyword}],
17
+ tokenPrec: 204
18
18
  })
@@ -22,15 +22,14 @@ export const
22
22
  CloseParen = 20,
23
23
  OpenAngle = 21,
24
24
  CloseAngle = 22,
25
- ColorAnnotation = 23,
26
- Pipe = 24,
27
- Colon = 25,
28
- Comma = 26,
29
- Plus = 27,
30
- Dash = 28,
31
- Tilde = 29,
32
- Star = 30,
33
- Question = 31,
34
- QuotedString = 32,
35
- Identifier = 33,
36
- Punct = 34
25
+ Pipe = 23,
26
+ Colon = 24,
27
+ Comma = 25,
28
+ Plus = 26,
29
+ Dash = 27,
30
+ Tilde = 28,
31
+ Star = 29,
32
+ Question = 30,
33
+ QuotedString = 31,
34
+ Identifier = 32,
35
+ Punct = 33
@@ -46,7 +46,6 @@ const NODE_TO_ROLE: Record<string, string> = {
46
46
  Percentage: 'number',
47
47
  SectionMarker: 'heading',
48
48
  Url: 'url',
49
- ColorAnnotation: 'colorAnnotation',
50
49
  OpenBracket: 'bracket',
51
50
  CloseBracket: 'bracket',
52
51
  OpenParen: 'bracket',
@@ -23,7 +23,6 @@ export const dgmoHighlighting: NodePropSource = styleTags({
23
23
  OpenAngle: t.angleBracket,
24
24
  CloseAngle: t.angleBracket,
25
25
  Url: t.url,
26
- ColorAnnotation: t.atom,
27
26
  Pipe: t.separator,
28
27
  Colon: t.separator,
29
28
  Plus: t.separator,