@diagrammo/dgmo 0.25.0 → 0.25.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -16403,6 +16403,9 @@ function parseMap(content) {
16403
16403
  break;
16404
16404
  // ── Cosmetic `no-*` opt-outs: bare flags, idempotent (mirror `no-legend`,
16405
16405
  // no dup warning); each defaults the feature ON when absent. ──
16406
+ case "no-title":
16407
+ d.noTitle = true;
16408
+ break;
16406
16409
  case "no-legend":
16407
16410
  d.noLegend = true;
16408
16411
  break;
@@ -16424,6 +16427,9 @@ function parseMap(content) {
16424
16427
  case "no-colorize":
16425
16428
  d.noColorize = true;
16426
16429
  break;
16430
+ case "no-cluster-pois":
16431
+ d.noClusterPois = true;
16432
+ break;
16427
16433
  }
16428
16434
  }
16429
16435
  function handleTag(trimmed, line12) {
@@ -16725,13 +16731,15 @@ var init_parser12 = __esm({
16725
16731
  "locale",
16726
16732
  "active-tag",
16727
16733
  "caption",
16734
+ "no-title",
16728
16735
  "no-legend",
16729
16736
  "no-coastline",
16730
16737
  "no-relief",
16731
16738
  "no-context-labels",
16732
16739
  "no-region-labels",
16733
16740
  "no-poi-labels",
16734
- "no-colorize"
16741
+ "no-colorize",
16742
+ "no-cluster-pois"
16735
16743
  ]);
16736
16744
  }
16737
16745
  });
@@ -37441,18 +37449,10 @@ var init_layout11 = __esm({
37441
37449
  // src/pert/renderer.ts
37442
37450
  var renderer_exports11 = {};
37443
37451
  __export(renderer_exports11, {
37444
- PERT_LEGEND_PILL_HEIGHT: () => PERT_LEGEND_PILL_HEIGHT,
37445
- highlightPertCriticalPath: () => highlightPertCriticalPath,
37446
- highlightPertSet: () => highlightPertSet,
37447
37452
  measurePertAnalysisBlock: () => measurePertAnalysisBlock,
37448
- pertLegendBlockWidth: () => pertLegendBlockWidth,
37449
- pertLegendEntries: () => pertLegendEntries,
37450
- renderLegendBlock: () => renderLegendBlock,
37451
37453
  renderPert: () => renderPert,
37452
37454
  renderPertAnalysisBlock: () => renderPertAnalysisBlock,
37453
- renderPertForExport: () => renderPertForExport,
37454
- resetPertCriticalPath: () => resetPertCriticalPath,
37455
- resetPertHighlight: () => resetPertHighlight
37455
+ renderPertForExport: () => renderPertForExport
37456
37456
  });
37457
37457
  import * as d3Selection12 from "d3-selection";
37458
37458
  import * as d3Shape8 from "d3-shape";
@@ -37537,16 +37537,14 @@ function renderPert(container, resolved, layout, palette, isDark, options = {})
37537
37537
  const standaloneFieldLegendWidthForExport = layout.width;
37538
37538
  const analysisBlockHeight = analysisLayer.analysisHasContent ? CAPTION_TOP_GAP + analysisLayer.analysisRowHeight : 0;
37539
37539
  const fieldLegendBlockHeight = analysisLayer.fieldLegendStandalone ? CAPTION_TOP_GAP + fieldLegendHeightFor(standaloneFieldLegendWidthForExport) : 0;
37540
- const showTopLegend = options.showTopLegend ?? true;
37541
- const legendEntries = showTopLegend ? pertLegendEntries(resolved) : [];
37540
+ const showLegend = options.showLegend ?? true;
37542
37541
  const tagLegendActive = resolveActiveTagGroup(
37543
37542
  resolved.tagGroups,
37544
37543
  resolved.options.activeTag,
37545
37544
  options.activeTagOverride
37546
37545
  );
37547
- const showTagLegend = showTopLegend && resolved.tagGroups.length > 0;
37548
- const tagLegendBlockHeight = showTagLegend ? LEGEND_PILL_HEIGHT + LEGEND_BOTTOM_GAP : 0;
37549
- const legendBlockHeight = (legendEntries.length > 0 ? LEGEND_TOP_GAP + LEGEND_PILL_HEIGHT + LEGEND_BOTTOM_GAP : 0) + tagLegendBlockHeight;
37546
+ const showTagLegend = showLegend && resolved.tagGroups.length > 0;
37547
+ const legendBlockHeight = showTagLegend ? LEGEND_TOP_GAP + LEGEND_PILL_HEIGHT + LEGEND_BOTTOM_GAP : 0;
37550
37548
  const naturalChartWidth = layout.width + DIAGRAM_PADDING11 * 2;
37551
37549
  const minAnalysisRowW = analysisLayer.analysisHasContent ? analysisLayer.minContentWidth + 2 * DIAGRAM_PADDING11 : 0;
37552
37550
  const naturalWidth = Math.max(naturalChartWidth, minAnalysisRowW);
@@ -37569,8 +37567,7 @@ function renderPert(container, resolved, layout, palette, isDark, options = {})
37569
37567
  const sLegendTopGap = ctx.aesthetic(LEGEND_TOP_GAP);
37570
37568
  const sLegendBottomGap = ctx.aesthetic(LEGEND_BOTTOM_GAP);
37571
37569
  const sLegendPillHeight = ctx.structural(LEGEND_PILL_HEIGHT);
37572
- const sTagLegendBlockHeight = showTagLegend ? sLegendPillHeight + sLegendBottomGap : 0;
37573
- const sLegendBlockHeight = (legendEntries.length > 0 ? sLegendTopGap + sLegendPillHeight + sLegendBottomGap : 0) + sTagLegendBlockHeight;
37570
+ const sLegendBlockHeight = showTagLegend ? sLegendTopGap + sLegendPillHeight + sLegendBottomGap : 0;
37574
37571
  const sNodeRadius = ctx.structural(NODE_RADIUS2);
37575
37572
  const sNodeStrokeWidth = ctx.structural(NODE_STROKE_WIDTH10);
37576
37573
  const sNodeFontSize = ctx.text(NODE_FONT_SIZE4);
@@ -37602,17 +37599,8 @@ function renderPert(container, resolved, layout, palette, isDark, options = {})
37602
37599
  }
37603
37600
  const offsetX = Math.max(sDiagramPad, (svgW - layout.width) / 2);
37604
37601
  const offsetY = sDiagramPad + sTitleHeight + sLegendBlockHeight;
37605
- if (legendEntries.length > 0) {
37606
- renderLegendBlock(svg, legendEntries, {
37607
- x: 0,
37608
- y: sDiagramPad + sTitleHeight + sLegendTopGap,
37609
- width: svgW,
37610
- palette,
37611
- isDark
37612
- });
37613
- }
37614
37602
  if (showTagLegend) {
37615
- const tagLegendY = sDiagramPad + sTitleHeight + (legendEntries.length > 0 ? sLegendTopGap + sLegendPillHeight : sLegendTopGap);
37603
+ const tagLegendY = sDiagramPad + sTitleHeight + sLegendTopGap;
37616
37604
  renderTagLegendRow(svg, resolved, palette, isDark, {
37617
37605
  x: 0,
37618
37606
  y: tagLegendY,
@@ -37696,8 +37684,7 @@ function renderPertForExport(content, theme, palette, now) {
37696
37684
  }
37697
37685
  const captionBoxHeight = captionBullets.length > 0 ? captionBullets.length * CAPTION_LINE_HEIGHT + 2 * CAPTION_BOX_PADDING_Y + CAPTION_HEADER_BAND_HEIGHT : 0;
37698
37686
  const captionBlockHeight = captionBullets.length > 0 ? CAPTION_TOP_GAP + captionBoxHeight : 0;
37699
- const legendEntries = pertLegendEntries(resolved);
37700
- const legendBlockHeight = legendEntries.length > 0 ? LEGEND_TOP_GAP + LEGEND_PILL_HEIGHT + LEGEND_BOTTOM_GAP : 0;
37687
+ const legendBlockHeight = resolved.tagGroups.length > 0 ? LEGEND_TOP_GAP + LEGEND_PILL_HEIGHT + LEGEND_BOTTOM_GAP : 0;
37701
37688
  const exportWidth = layout.width + DIAGRAM_PADDING11 * 2;
37702
37689
  const exportHeight = layout.height + DIAGRAM_PADDING11 * 2 + titleHeight + legendBlockHeight + captionBlockHeight;
37703
37690
  const container = document.createElement("div");
@@ -38237,22 +38224,22 @@ function renderEdges2(root, resolved, layout, palette, collapsedSet, sc = {}) {
38237
38224
  if (srcGroup && tgtGroup && srcGroup === tgtGroup && collapsedSet.has(srcGroup)) {
38238
38225
  continue;
38239
38226
  }
38240
- const isCritical2 = criticalSet.has(e.source) && criticalSet.has(e.target);
38227
+ const isCritical = criticalSet.has(e.source) && criticalSet.has(e.target);
38241
38228
  let band;
38242
38229
  if (mcOn) {
38243
38230
  const sc2 = critById.get(e.source);
38244
38231
  const tc = critById.get(e.target);
38245
38232
  const minC = sc2 === null || tc === null || sc2 === void 0 || tc === void 0 ? null : Math.min(sc2, tc);
38246
38233
  band = criticalityBand(minC);
38247
- if (band === null && isCritical2) band = "red";
38234
+ if (band === null && isCritical) band = "red";
38248
38235
  } else {
38249
- band = isCritical2 ? "red" : null;
38236
+ band = isCritical ? "red" : null;
38250
38237
  }
38251
38238
  const path = lineGenerator6(e.points);
38252
38239
  if (!path) continue;
38253
38240
  const sESW = sc.edgeStrokeWidth ?? EDGE_STROKE_WIDTH10;
38254
38241
  const sELFS = sc.edgeLabelFontSize ?? 10;
38255
- layer.append("path").attr("class", "pert-edge").attr("d", path).attr("fill", "none").attr("stroke", bandColor(band, palette, palette.textMuted)).attr("stroke-width", sESW).attr("marker-end", `url(#${bandArrow(band)})`).attr("data-source", e.source).attr("data-target", e.target).attr("data-critical", String(isCritical2)).attr("data-critical-path", String(isCritical2)).attr("data-criticality-band", band ?? "");
38242
+ layer.append("path").attr("class", "pert-edge").attr("d", path).attr("fill", "none").attr("stroke", bandColor(band, palette, palette.textMuted)).attr("stroke-width", sESW).attr("marker-end", `url(#${bandArrow(band)})`).attr("data-source", e.source).attr("data-target", e.target).attr("data-critical", String(isCritical)).attr("data-critical-path", String(isCritical)).attr("data-criticality-band", band ?? "");
38256
38243
  const parsedEdge = edgeByKey.get(`${e.source}->${e.target}`);
38257
38244
  const labelText = parsedEdge ? formatEdgeLabel(parsedEdge) : null;
38258
38245
  if (labelText) {
@@ -38304,7 +38291,7 @@ function renderNodes2(root, _defs, resolved, layout, palette, isDark, sizing, on
38304
38291
  const r = byId.get(node.id);
38305
38292
  if (!r) continue;
38306
38293
  if (r.activity.groupId && collapsedSet.has(r.activity.groupId)) continue;
38307
- const isCritical2 = r.isCriticalPath;
38294
+ const isCritical = r.isCriticalPath;
38308
38295
  const isTbd = tbdSet.has(node.id);
38309
38296
  const dashArray = isTbd ? "4,3" : "none";
38310
38297
  const isTopMu = topMuIds.has(node.id);
@@ -38312,14 +38299,14 @@ function renderNodes2(root, _defs, resolved, layout, palette, isDark, sizing, on
38312
38299
  let band;
38313
38300
  if (mcOn) {
38314
38301
  band = criticalityBand(r.criticality);
38315
- if (band === null && isCritical2) band = "red";
38302
+ if (band === null && isCritical) band = "red";
38316
38303
  } else {
38317
- band = isCritical2 ? "red" : null;
38304
+ band = isCritical ? "red" : null;
38318
38305
  }
38319
38306
  const g = layer.append("g").attr("class", "pert-node").attr("transform", `translate(${node.x}, ${node.y})`).attr("data-activity-id", node.id).attr("data-line-number", String(r.activity.lineNumber)).attr(
38320
38307
  "data-group-id",
38321
38308
  r.activity.groupId !== void 0 ? r.activity.groupId : ""
38322
- ).attr("data-critical-path", String(isCritical2)).attr("data-criticality-band", band ?? "").attr("data-duration-rank", isTopMu ? "top" : isBottomMu ? "bottom" : "");
38309
+ ).attr("data-critical-path", String(isCritical)).attr("data-criticality-band", band ?? "").attr("data-duration-rank", isTopMu ? "top" : isBottomMu ? "bottom" : "");
38323
38310
  if (r.activity.tags) {
38324
38311
  for (const [tagKey, tagValue] of Object.entries(r.activity.tags)) {
38325
38312
  g.attr(`data-tag-${tagKey}`, String(tagValue).toLowerCase());
@@ -38629,69 +38616,6 @@ function computeAnchorPinSet(resolved) {
38629
38616
  }
38630
38617
  return pinned;
38631
38618
  }
38632
- function isCritical(el, mcOn) {
38633
- if (mcOn) {
38634
- return HIGHLIGHT_BANDS.has(el.getAttribute("data-criticality-band") ?? "");
38635
- }
38636
- return el.getAttribute("data-critical-path") === "true";
38637
- }
38638
- function isInHighlightSet(el, kind, mcOn) {
38639
- if (kind === "critical") return isCritical(el, mcOn);
38640
- if (kind === "milestone") {
38641
- return el.getAttribute("data-milestone") === "true";
38642
- }
38643
- return el.hasAttribute("data-anchor");
38644
- }
38645
- function highlightPertSet(container, kind) {
38646
- const svg = container.querySelector("svg");
38647
- if (!svg) return;
38648
- const mcOn = Array.from(svg.querySelectorAll(".pert-edge")).some((e) => {
38649
- const b = e.getAttribute("data-criticality-band");
38650
- return b !== null && b !== "" && b !== "red";
38651
- });
38652
- const candidates = svg.querySelectorAll(
38653
- ".pert-node, .pert-edge, .pert-group-collapsed"
38654
- );
38655
- let anyMatch = false;
38656
- for (const el of candidates) {
38657
- if (isInHighlightSet(el, kind, mcOn)) {
38658
- anyMatch = true;
38659
- break;
38660
- }
38661
- }
38662
- if (!anyMatch) return;
38663
- svg.setAttribute("data-pert-highlight-active", kind);
38664
- for (const el of svg.querySelectorAll(".pert-node, .pert-edge")) {
38665
- el.setAttribute(
38666
- "opacity",
38667
- isInHighlightSet(el, kind, mcOn) ? "1" : String(FADE_OPACITY)
38668
- );
38669
- }
38670
- for (const el of svg.querySelectorAll(".pert-group")) {
38671
- const inSet = el.classList.contains("pert-group-collapsed") && isInHighlightSet(el, kind, mcOn);
38672
- el.setAttribute(
38673
- "opacity",
38674
- inSet ? "1" : String(FADE_OPACITY)
38675
- );
38676
- }
38677
- }
38678
- function highlightPertCriticalPath(container) {
38679
- highlightPertSet(container, "critical");
38680
- }
38681
- function resetPertHighlight(container) {
38682
- const svg = container.querySelector("svg");
38683
- if (!svg) return;
38684
- svg.removeAttribute("data-pert-highlight-active");
38685
- svg.removeAttribute("data-critical-path-active");
38686
- for (const el of svg.querySelectorAll(
38687
- ".pert-node, .pert-edge, .pert-group"
38688
- )) {
38689
- el.removeAttribute("opacity");
38690
- }
38691
- }
38692
- function resetPertCriticalPath(container) {
38693
- resetPertHighlight(container);
38694
- }
38695
38619
  function anchorAnnotationText(resolved) {
38696
38620
  const anchor = resolved.options.anchor;
38697
38621
  if (anchor === null) return null;
@@ -38744,70 +38668,6 @@ function renderCaptionBlock(svg, bullets, args) {
38744
38668
  if (i > 0) tspan.attr("dy", CAPTION_LINE_HEIGHT);
38745
38669
  });
38746
38670
  }
38747
- function pertLegendEntries(resolved) {
38748
- const entries = [];
38749
- if (resolved.activities.length > 0) {
38750
- entries.push({ kind: "critical", label: "Critical Path" });
38751
- }
38752
- if (resolved.options.anchor !== null) {
38753
- entries.push({ kind: "anchor", label: "Anchor" });
38754
- }
38755
- if (resolved.activities.some((a) => a.activity.isMilestone)) {
38756
- entries.push({ kind: "milestone", label: "Milestone" });
38757
- }
38758
- return entries;
38759
- }
38760
- function legendSwatchWidth(kind) {
38761
- if (kind === "critical") return LEGEND_DOT_R * 2;
38762
- if (kind === "anchor") return PIN_ICON_W;
38763
- return LEGEND_FONT_SIZE;
38764
- }
38765
- function legendPillWidth(entry) {
38766
- const labelW = measureLegendText(entry.label, LEGEND_FONT_SIZE);
38767
- return Math.ceil(
38768
- LEGEND_PILL_PADDING_X + legendSwatchWidth(entry.kind) + LEGEND_SWATCH_GAP + labelW + LEGEND_PILL_PADDING_X
38769
- );
38770
- }
38771
- function legendNaturalWidth(entries) {
38772
- if (entries.length === 0) return 0;
38773
- let total = 0;
38774
- for (const e of entries) total += legendPillWidth(e);
38775
- total += (entries.length - 1) * LEGEND_PILL_GAP;
38776
- return total;
38777
- }
38778
- function pertLegendBlockWidth(entries) {
38779
- return legendNaturalWidth(entries);
38780
- }
38781
- function renderLegendBlock(svg, entries, args) {
38782
- if (entries.length === 0) return;
38783
- const { x, y, width, palette, isDark } = args;
38784
- const groupBg = isDark ? mix(palette.surface, palette.bg, 50) : mix(palette.surface, palette.bg, 30);
38785
- const block = svg.append("g").attr("class", "pert-legend").attr("data-pert-legend", "");
38786
- const totalW = legendNaturalWidth(entries);
38787
- let pillX = x + (width - totalW) / 2;
38788
- for (const entry of entries) {
38789
- const pillW = legendPillWidth(entry);
38790
- const pill = block.append("g").attr("class", "pert-legend-entry").attr("data-legend-entry", entry.kind).attr("transform", `translate(${pillX}, ${y})`).style("cursor", "pointer");
38791
- pill.append("rect").attr("class", "pert-legend-pill").attr("width", pillW).attr("height", LEGEND_PILL_HEIGHT).attr("rx", LEGEND_PILL_HEIGHT / 2).attr("ry", LEGEND_PILL_HEIGHT / 2).attr("fill", groupBg);
38792
- const swatchW = legendSwatchWidth(entry.kind);
38793
- const swatchCx = LEGEND_PILL_PADDING_X + swatchW / 2;
38794
- const swatchCy = LEGEND_PILL_HEIGHT / 2;
38795
- if (entry.kind === "critical") {
38796
- pill.append("circle").attr("class", "pert-legend-swatch").attr("cx", swatchCx).attr("cy", swatchCy).attr("r", LEGEND_DOT_R).attr("fill", palette.colors.red);
38797
- } else if (entry.kind === "anchor") {
38798
- drawAnchorPin(
38799
- pill,
38800
- swatchCx - PIN_ICON_W / 2,
38801
- swatchCy,
38802
- palette.textMuted
38803
- );
38804
- } else {
38805
- pill.append("text").attr("class", "pert-legend-swatch").attr("x", swatchCx).attr("y", swatchCy).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("font-family", FONT_FAMILY).attr("font-size", LEGEND_FONT_SIZE + 1).attr("fill", palette.textMuted).text("\u25C6");
38806
- }
38807
- pill.append("text").attr("class", "pert-legend-label").attr("x", LEGEND_PILL_PADDING_X + swatchW + LEGEND_SWATCH_GAP).attr("y", swatchCy).attr("dominant-baseline", "central").attr("font-family", FONT_FAMILY).attr("font-size", LEGEND_FONT_SIZE).attr("font-weight", 500).attr("fill", palette.textMuted).text(entry.label);
38808
- pillX += pillW + LEGEND_PILL_GAP;
38809
- }
38810
- }
38811
38671
  function renderTagLegendRow(svg, resolved, palette, isDark, args) {
38812
38672
  if (resolved.tagGroups.length === 0) return;
38813
38673
  const { x, y, width, activeGroup, exportMode } = args;
@@ -39254,7 +39114,7 @@ function formatScurveDate(iso) {
39254
39114
  if (month < 0 || month > 11 || isNaN(day)) return iso;
39255
39115
  return `${SCURVE_MONTH_NAMES[month]} ${day}`;
39256
39116
  }
39257
- var DIAGRAM_PADDING11, NODE_FONT_SIZE4, NODE_CELL_FONT_SIZE2, NODE_RADIUS2, NODE_STROKE_WIDTH10, NODE_TOP_ROW_HEIGHT, NODE_BOTTOM_ROW_HEIGHT, EDGE_STROKE_WIDTH10, ARROWHEAD_W4, ARROWHEAD_H4, CONTAINER_RADIUS3, CONTAINER_LABEL_FONT_SIZE3, CONTAINER_HEADER_HEIGHT3, COLLAPSE_BAR_HEIGHT7, FADE_OPACITY, DURATION_FADE_OPACITY, PIN_ICON_W, PIN_ICON_H, LEGEND_PILL_HEIGHT, LEGEND_PILL_PADDING_X, LEGEND_PILL_GAP, LEGEND_SWATCH_GAP, LEGEND_FONT_SIZE, LEGEND_TOP_GAP, LEGEND_BOTTOM_GAP, FIELD_LEGEND_HEADER_BAND_HEIGHT, FIELD_LEGEND_CELL_VPAD, FIELD_LEGEND_LABEL_FONT_SIZE, FIELD_LEGEND_DESC_FONT_SIZE, FIELD_LEGEND_DESC_LINE_HEIGHT, FIELD_LEGEND_LABEL_DESC_GAP, FIELD_LEGEND_CELLS, lineGenerator6, FIELD_LEGEND_MIN_W, HIGHLIGHT_BANDS, SUB_BULLET_INDENT, CAPTION_HEADER_BAND_HEIGHT, TORNADO_TOP_N, TORNADO_ROW_HEIGHT, TORNADO_NAME_COL_W, TORNADO_BAR_FONT_SIZE, TORNADO_BAR_HEIGHT, SUMMARY_MIN_W, SUMMARY_MAX_W, ANALYSIS_GAP, COL1_VSTACK_GAP, TORNADO_MIN_W, SCURVE_MIN_W, SCURVE_BOX_HEIGHT, SCURVE_PLOT_PADDING_X, SCURVE_PLOT_PADDING_RIGHT, SCURVE_PLOT_PADDING_BOTTOM, SCURVE_TICK_FONT_SIZE, SCURVE_PERCENTILE_RADIUS, PERT_LEGEND_PILL_HEIGHT, DAYS_PER_UNIT, SCURVE_MONTH_NAMES, UNIT_TO_DAYS_LOCAL2;
39117
+ var DIAGRAM_PADDING11, NODE_FONT_SIZE4, NODE_CELL_FONT_SIZE2, NODE_RADIUS2, NODE_STROKE_WIDTH10, NODE_TOP_ROW_HEIGHT, NODE_BOTTOM_ROW_HEIGHT, EDGE_STROKE_WIDTH10, ARROWHEAD_W4, ARROWHEAD_H4, CONTAINER_RADIUS3, CONTAINER_LABEL_FONT_SIZE3, CONTAINER_HEADER_HEIGHT3, COLLAPSE_BAR_HEIGHT7, DURATION_FADE_OPACITY, PIN_ICON_W, PIN_ICON_H, LEGEND_PILL_HEIGHT, LEGEND_TOP_GAP, LEGEND_BOTTOM_GAP, FIELD_LEGEND_HEADER_BAND_HEIGHT, FIELD_LEGEND_CELL_VPAD, FIELD_LEGEND_LABEL_FONT_SIZE, FIELD_LEGEND_DESC_FONT_SIZE, FIELD_LEGEND_DESC_LINE_HEIGHT, FIELD_LEGEND_LABEL_DESC_GAP, FIELD_LEGEND_CELLS, lineGenerator6, FIELD_LEGEND_MIN_W, SUB_BULLET_INDENT, CAPTION_HEADER_BAND_HEIGHT, TORNADO_TOP_N, TORNADO_ROW_HEIGHT, TORNADO_NAME_COL_W, TORNADO_BAR_FONT_SIZE, TORNADO_BAR_HEIGHT, SUMMARY_MIN_W, SUMMARY_MAX_W, ANALYSIS_GAP, COL1_VSTACK_GAP, TORNADO_MIN_W, SCURVE_MIN_W, SCURVE_BOX_HEIGHT, SCURVE_PLOT_PADDING_X, SCURVE_PLOT_PADDING_RIGHT, SCURVE_PLOT_PADDING_BOTTOM, SCURVE_TICK_FONT_SIZE, SCURVE_PERCENTILE_RADIUS, DAYS_PER_UNIT, SCURVE_MONTH_NAMES, UNIT_TO_DAYS_LOCAL2;
39258
39118
  var init_renderer11 = __esm({
39259
39119
  "src/pert/renderer.ts"() {
39260
39120
  "use strict";
@@ -39283,15 +39143,10 @@ var init_renderer11 = __esm({
39283
39143
  CONTAINER_LABEL_FONT_SIZE3 = 13;
39284
39144
  CONTAINER_HEADER_HEIGHT3 = 28;
39285
39145
  COLLAPSE_BAR_HEIGHT7 = 6;
39286
- FADE_OPACITY = 0.15;
39287
39146
  DURATION_FADE_OPACITY = 0.55;
39288
39147
  PIN_ICON_W = 13;
39289
39148
  PIN_ICON_H = 13;
39290
39149
  LEGEND_PILL_HEIGHT = LEGEND_HEIGHT;
39291
- LEGEND_PILL_PADDING_X = 8;
39292
- LEGEND_PILL_GAP = 8;
39293
- LEGEND_SWATCH_GAP = LEGEND_ENTRY_DOT_GAP;
39294
- LEGEND_FONT_SIZE = LEGEND_PILL_FONT_SIZE;
39295
39150
  LEGEND_TOP_GAP = 12;
39296
39151
  LEGEND_BOTTOM_GAP = 12;
39297
39152
  FIELD_LEGEND_HEADER_BAND_HEIGHT = 26;
@@ -39328,7 +39183,6 @@ var init_renderer11 = __esm({
39328
39183
  ];
39329
39184
  lineGenerator6 = d3Shape8.line().x((d) => d.x).y((d) => d.y).curve(d3Shape8.curveBasis);
39330
39185
  FIELD_LEGEND_MIN_W = 220;
39331
- HIGHLIGHT_BANDS = /* @__PURE__ */ new Set(["red", "orange", "yellow"]);
39332
39186
  SUB_BULLET_INDENT = 20;
39333
39187
  CAPTION_HEADER_BAND_HEIGHT = CAPTION_LINE_HEIGHT + 8;
39334
39188
  TORNADO_TOP_N = 10;
@@ -39348,7 +39202,6 @@ var init_renderer11 = __esm({
39348
39202
  SCURVE_PLOT_PADDING_BOTTOM = 44;
39349
39203
  SCURVE_TICK_FONT_SIZE = 13;
39350
39204
  SCURVE_PERCENTILE_RADIUS = 4;
39351
- PERT_LEGEND_PILL_HEIGHT = LEGEND_PILL_HEIGHT;
39352
39205
  DAYS_PER_UNIT = {
39353
39206
  min: 1 / (60 * 24),
39354
39207
  h: 1 / 24,
@@ -40875,31 +40728,31 @@ function renderGantt(container, resolved, palette, isDark, options, exportDims)
40875
40728
  todayHoverG.on("mouseenter", () => {
40876
40729
  g.selectAll(".gantt-task").attr(
40877
40730
  "opacity",
40878
- FADE_OPACITY2
40731
+ FADE_OPACITY
40879
40732
  );
40880
40733
  g.selectAll(".gantt-milestone").attr(
40881
40734
  "opacity",
40882
- FADE_OPACITY2
40735
+ FADE_OPACITY
40883
40736
  );
40884
40737
  g.selectAll(
40885
40738
  ".gantt-group-bar, .gantt-group-summary"
40886
- ).attr("opacity", FADE_OPACITY2);
40887
- svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY2);
40888
- svg.selectAll(".gantt-task-label").attr("opacity", FADE_OPACITY2);
40889
- svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY2);
40739
+ ).attr("opacity", FADE_OPACITY);
40740
+ svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY);
40741
+ svg.selectAll(".gantt-task-label").attr("opacity", FADE_OPACITY);
40742
+ svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY);
40890
40743
  g.selectAll(
40891
40744
  ".gantt-lane-band, .gantt-lane-accent, .gantt-lane-band-group"
40892
- ).attr("opacity", FADE_OPACITY2);
40745
+ ).attr("opacity", FADE_OPACITY);
40893
40746
  g.selectAll(
40894
40747
  ".gantt-dep-arrow, .gantt-dep-arrowhead"
40895
- ).attr("opacity", FADE_OPACITY2);
40748
+ ).attr("opacity", FADE_OPACITY);
40896
40749
  g.selectAll(".gantt-era-group").attr(
40897
40750
  "opacity",
40898
- FADE_OPACITY2
40751
+ FADE_OPACITY
40899
40752
  );
40900
40753
  g.selectAll(".gantt-marker-group").attr(
40901
40754
  "opacity",
40902
- FADE_OPACITY2
40755
+ FADE_OPACITY
40903
40756
  );
40904
40757
  showGanttDateIndicators(
40905
40758
  g,
@@ -41131,28 +40984,28 @@ function applyCriticalPathHighlight(svg, chartG) {
41131
40984
  const el = d3Selection13.select(this);
41132
40985
  el.attr(
41133
40986
  "opacity",
41134
- el.attr("data-critical-path") === "true" ? 1 : FADE_OPACITY2
40987
+ el.attr("data-critical-path") === "true" ? 1 : FADE_OPACITY
41135
40988
  );
41136
40989
  });
41137
- chartG.selectAll(".gantt-milestone").attr("opacity", FADE_OPACITY2);
41138
- chartG.selectAll(".gantt-group-bar, .gantt-group-summary").attr("opacity", FADE_OPACITY2);
40990
+ chartG.selectAll(".gantt-milestone").attr("opacity", FADE_OPACITY);
40991
+ chartG.selectAll(".gantt-group-bar, .gantt-group-summary").attr("opacity", FADE_OPACITY);
41139
40992
  svg.selectAll(".gantt-task-label").each(function() {
41140
40993
  const el = d3Selection13.select(this);
41141
40994
  el.attr(
41142
40995
  "opacity",
41143
- el.attr("data-critical-path") === "true" ? 1 : FADE_OPACITY2
40996
+ el.attr("data-critical-path") === "true" ? 1 : FADE_OPACITY
41144
40997
  );
41145
40998
  });
41146
- svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY2);
41147
- svg.selectAll(".gantt-group-band-bg, .gantt-group-band-accent").attr("opacity", FADE_OPACITY2);
41148
- svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY2);
41149
- svg.selectAll(".gantt-lane-band-bg, .gantt-lane-band-accent").attr("opacity", FADE_OPACITY2);
41150
- chartG.selectAll(".gantt-lane-band, .gantt-lane-accent").attr("opacity", FADE_OPACITY2);
40999
+ svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY);
41000
+ svg.selectAll(".gantt-group-band-bg, .gantt-group-band-accent").attr("opacity", FADE_OPACITY);
41001
+ svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY);
41002
+ svg.selectAll(".gantt-lane-band-bg, .gantt-lane-band-accent").attr("opacity", FADE_OPACITY);
41003
+ chartG.selectAll(".gantt-lane-band, .gantt-lane-accent").attr("opacity", FADE_OPACITY);
41151
41004
  chartG.selectAll(".gantt-dep-arrow, .gantt-dep-arrowhead").each(function() {
41152
41005
  const el = d3Selection13.select(this);
41153
41006
  el.attr(
41154
41007
  "opacity",
41155
- el.attr("data-critical-path") === "true" ? 0.7 : FADE_OPACITY2
41008
+ el.attr("data-critical-path") === "true" ? 0.7 : FADE_OPACITY
41156
41009
  );
41157
41010
  });
41158
41011
  }
@@ -41331,27 +41184,27 @@ function renderTagLegend(svg, chartG, tagGroups, activeGroupName, chartLeftMargi
41331
41184
  const el = d3Selection13.select(this);
41332
41185
  el.attr(
41333
41186
  "opacity",
41334
- el.attr(`data-tag-${tagKey}`) === ev ? 1 : FADE_OPACITY2
41187
+ el.attr(`data-tag-${tagKey}`) === ev ? 1 : FADE_OPACITY
41335
41188
  );
41336
41189
  });
41337
- chartG.selectAll(".gantt-milestone").attr("opacity", FADE_OPACITY2);
41338
- chartG.selectAll(".gantt-group-bar, .gantt-group-summary").attr("opacity", FADE_OPACITY2);
41190
+ chartG.selectAll(".gantt-milestone").attr("opacity", FADE_OPACITY);
41191
+ chartG.selectAll(".gantt-group-bar, .gantt-group-summary").attr("opacity", FADE_OPACITY);
41339
41192
  svg.selectAll(".gantt-task-label").each(function() {
41340
41193
  const el = d3Selection13.select(this);
41341
41194
  el.attr(
41342
41195
  "opacity",
41343
- el.attr(`data-tag-${tagKey}`) === ev ? 1 : FADE_OPACITY2
41196
+ el.attr(`data-tag-${tagKey}`) === ev ? 1 : FADE_OPACITY
41344
41197
  );
41345
41198
  });
41346
- svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY2);
41199
+ svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY);
41347
41200
  svg.selectAll(".gantt-lane-header").each(function() {
41348
41201
  const el = d3Selection13.select(this);
41349
41202
  el.attr(
41350
41203
  "opacity",
41351
- el.attr(`data-tag-${tagKey}`) === ev ? 1 : FADE_OPACITY2
41204
+ el.attr(`data-tag-${tagKey}`) === ev ? 1 : FADE_OPACITY
41352
41205
  );
41353
41206
  });
41354
- chartG.selectAll(".gantt-lane-band, .gantt-lane-accent").attr("opacity", FADE_OPACITY2);
41207
+ chartG.selectAll(".gantt-lane-band, .gantt-lane-accent").attr("opacity", FADE_OPACITY);
41355
41208
  } else {
41356
41209
  if (criticalPathActive) {
41357
41210
  applyCriticalPathHighlight(svg, chartG);
@@ -41456,27 +41309,27 @@ function renderErasAndMarkers(g, svg, resolved, xScale, innerHeight, palette, er
41456
41309
  eraG.on("mouseenter", () => {
41457
41310
  g.selectAll(".gantt-task").attr(
41458
41311
  "opacity",
41459
- FADE_OPACITY2
41312
+ FADE_OPACITY
41460
41313
  );
41461
41314
  g.selectAll(".gantt-milestone").attr(
41462
41315
  "opacity",
41463
- FADE_OPACITY2
41316
+ FADE_OPACITY
41464
41317
  );
41465
41318
  g.selectAll(
41466
41319
  ".gantt-group-bar, .gantt-group-summary"
41467
- ).attr("opacity", FADE_OPACITY2);
41468
- svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY2);
41469
- svg.selectAll(".gantt-task-label").attr("opacity", FADE_OPACITY2);
41470
- svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY2);
41320
+ ).attr("opacity", FADE_OPACITY);
41321
+ svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY);
41322
+ svg.selectAll(".gantt-task-label").attr("opacity", FADE_OPACITY);
41323
+ svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY);
41471
41324
  g.selectAll(
41472
41325
  ".gantt-lane-band, .gantt-lane-accent, .gantt-lane-band-group"
41473
- ).attr("opacity", FADE_OPACITY2);
41326
+ ).attr("opacity", FADE_OPACITY);
41474
41327
  g.selectAll(
41475
41328
  ".gantt-dep-arrow, .gantt-dep-arrowhead"
41476
- ).attr("opacity", FADE_OPACITY2);
41329
+ ).attr("opacity", FADE_OPACITY);
41477
41330
  g.selectAll(".gantt-marker-group").attr(
41478
41331
  "opacity",
41479
- FADE_OPACITY2
41332
+ FADE_OPACITY
41480
41333
  );
41481
41334
  eraRect.attr("opacity", hoverEraOpacity);
41482
41335
  if (eraTruncated) eraLabel.text(era.label);
@@ -41534,31 +41387,31 @@ function renderErasAndMarkers(g, svg, resolved, xScale, innerHeight, palette, er
41534
41387
  markerG.on("mouseenter", () => {
41535
41388
  g.selectAll(".gantt-task").attr(
41536
41389
  "opacity",
41537
- FADE_OPACITY2
41390
+ FADE_OPACITY
41538
41391
  );
41539
41392
  g.selectAll(".gantt-milestone").attr(
41540
41393
  "opacity",
41541
- FADE_OPACITY2
41394
+ FADE_OPACITY
41542
41395
  );
41543
41396
  g.selectAll(
41544
41397
  ".gantt-group-bar, .gantt-group-summary"
41545
- ).attr("opacity", FADE_OPACITY2);
41546
- svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY2);
41547
- svg.selectAll(".gantt-task-label").attr("opacity", FADE_OPACITY2);
41548
- svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY2);
41398
+ ).attr("opacity", FADE_OPACITY);
41399
+ svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY);
41400
+ svg.selectAll(".gantt-task-label").attr("opacity", FADE_OPACITY);
41401
+ svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY);
41549
41402
  g.selectAll(
41550
41403
  ".gantt-lane-band, .gantt-lane-accent, .gantt-lane-band-group"
41551
- ).attr("opacity", FADE_OPACITY2);
41404
+ ).attr("opacity", FADE_OPACITY);
41552
41405
  g.selectAll(
41553
41406
  ".gantt-dep-arrow, .gantt-dep-arrowhead"
41554
- ).attr("opacity", FADE_OPACITY2);
41407
+ ).attr("opacity", FADE_OPACITY);
41555
41408
  g.selectAll(".gantt-era-group").attr(
41556
41409
  "opacity",
41557
- FADE_OPACITY2
41410
+ FADE_OPACITY
41558
41411
  );
41559
41412
  g.selectAll(".gantt-marker-group").attr(
41560
41413
  "opacity",
41561
- FADE_OPACITY2
41414
+ FADE_OPACITY
41562
41415
  );
41563
41416
  markerG.attr("opacity", 1);
41564
41417
  markerLine.attr("opacity", 0.8);
@@ -41634,7 +41487,7 @@ function renderSprintBands(g, svg, resolved, xScale, innerHeight, palette) {
41634
41487
  const id = el.attr("data-task-id");
41635
41488
  el.attr(
41636
41489
  "opacity",
41637
- id && overlappingTaskIds.has(id) ? 1 : FADE_OPACITY2
41490
+ id && overlappingTaskIds.has(id) ? 1 : FADE_OPACITY
41638
41491
  );
41639
41492
  });
41640
41493
  g.selectAll(".gantt-milestone").each(function() {
@@ -41642,7 +41495,7 @@ function renderSprintBands(g, svg, resolved, xScale, innerHeight, palette) {
41642
41495
  const id = el.attr("data-task-id");
41643
41496
  el.attr(
41644
41497
  "opacity",
41645
- id && overlappingTaskIds.has(id) ? 1 : FADE_OPACITY2
41498
+ id && overlappingTaskIds.has(id) ? 1 : FADE_OPACITY
41646
41499
  );
41647
41500
  });
41648
41501
  svg.selectAll(".gantt-task-label").each(function() {
@@ -41650,7 +41503,7 @@ function renderSprintBands(g, svg, resolved, xScale, innerHeight, palette) {
41650
41503
  const id = el.attr("data-task-id");
41651
41504
  el.attr(
41652
41505
  "opacity",
41653
- id && overlappingTaskIds.has(id) ? 1 : FADE_OPACITY2
41506
+ id && overlappingTaskIds.has(id) ? 1 : FADE_OPACITY
41654
41507
  );
41655
41508
  });
41656
41509
  g.selectAll(
@@ -41660,7 +41513,7 @@ function renderSprintBands(g, svg, resolved, xScale, innerHeight, palette) {
41660
41513
  const name = el.attr("data-group");
41661
41514
  el.attr(
41662
41515
  "opacity",
41663
- name && overlappingGroupNames.has(name) ? 1 : FADE_OPACITY2
41516
+ name && overlappingGroupNames.has(name) ? 1 : FADE_OPACITY
41664
41517
  );
41665
41518
  });
41666
41519
  svg.selectAll(".gantt-group-label").each(function() {
@@ -41668,19 +41521,19 @@ function renderSprintBands(g, svg, resolved, xScale, innerHeight, palette) {
41668
41521
  const name = el.attr("data-group");
41669
41522
  el.attr(
41670
41523
  "opacity",
41671
- name && overlappingGroupNames.has(name) ? 1 : FADE_OPACITY2
41524
+ name && overlappingGroupNames.has(name) ? 1 : FADE_OPACITY
41672
41525
  );
41673
41526
  });
41674
- svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY2);
41527
+ svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY);
41675
41528
  g.selectAll(
41676
41529
  ".gantt-lane-band, .gantt-lane-accent, .gantt-lane-band-group"
41677
- ).attr("opacity", FADE_OPACITY2);
41530
+ ).attr("opacity", FADE_OPACITY);
41678
41531
  g.selectAll(
41679
41532
  ".gantt-dep-arrow, .gantt-dep-arrowhead"
41680
- ).attr("opacity", FADE_OPACITY2);
41533
+ ).attr("opacity", FADE_OPACITY);
41681
41534
  g.selectAll(".gantt-marker-group").attr(
41682
41535
  "opacity",
41683
- FADE_OPACITY2
41536
+ FADE_OPACITY
41684
41537
  );
41685
41538
  sprintRect.attr("opacity", SPRINT_HOVER_OPACITY);
41686
41539
  const startVisible = rawSx >= chartMinX;
@@ -41749,20 +41602,20 @@ function highlightDeps(g, svg, taskId, resolved) {
41749
41602
  g.selectAll(".gantt-task").each(function() {
41750
41603
  const el = d3Selection13.select(this);
41751
41604
  const id = el.attr("data-task-id");
41752
- el.attr("opacity", id && related.has(id) ? 1 : FADE_OPACITY2);
41605
+ el.attr("opacity", id && related.has(id) ? 1 : FADE_OPACITY);
41753
41606
  });
41754
41607
  g.selectAll(".gantt-milestone").attr(
41755
41608
  "opacity",
41756
- FADE_OPACITY2
41609
+ FADE_OPACITY
41757
41610
  );
41758
41611
  g.selectAll(
41759
41612
  ".gantt-group-bar, .gantt-group-summary"
41760
- ).attr("opacity", FADE_OPACITY2);
41761
- svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY2);
41762
- svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY2);
41613
+ ).attr("opacity", FADE_OPACITY);
41614
+ svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY);
41615
+ svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY);
41763
41616
  g.selectAll(".gantt-lane-band, .gantt-lane-accent").attr(
41764
41617
  "opacity",
41765
- FADE_OPACITY2
41618
+ FADE_OPACITY
41766
41619
  );
41767
41620
  g.selectAll(
41768
41621
  ".gantt-dep-arrow, .gantt-dep-arrowhead"
@@ -41771,52 +41624,52 @@ function highlightDeps(g, svg, taskId, resolved) {
41771
41624
  const from = el.attr("data-dep-from");
41772
41625
  const to = el.attr("data-dep-to");
41773
41626
  const isRelated = from && related.has(from) || to && related.has(to);
41774
- el.attr("opacity", isRelated ? 0.5 : FADE_OPACITY2);
41627
+ el.attr("opacity", isRelated ? 0.5 : FADE_OPACITY);
41775
41628
  });
41776
41629
  g.selectAll(".gantt-marker-group").attr(
41777
41630
  "opacity",
41778
- FADE_OPACITY2
41631
+ FADE_OPACITY
41779
41632
  );
41780
41633
  }
41781
41634
  function highlightGroup(g, svg, groupName) {
41782
41635
  g.selectAll(".gantt-task").each(function() {
41783
41636
  const el = d3Selection13.select(this);
41784
- el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY2);
41637
+ el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY);
41785
41638
  });
41786
41639
  g.selectAll(".gantt-milestone").each(function() {
41787
41640
  const el = d3Selection13.select(this);
41788
- el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY2);
41641
+ el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY);
41789
41642
  });
41790
41643
  g.selectAll(
41791
41644
  ".gantt-group-bar, .gantt-group-summary"
41792
41645
  ).each(function() {
41793
41646
  const el = d3Selection13.select(this);
41794
- el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY2);
41647
+ el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY);
41795
41648
  });
41796
41649
  svg.selectAll(".gantt-group-label").each(function() {
41797
41650
  const el = d3Selection13.select(this);
41798
- el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY2);
41651
+ el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY);
41799
41652
  });
41800
41653
  svg.selectAll(".gantt-task-label").each(function() {
41801
41654
  const el = d3Selection13.select(this);
41802
- el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY2);
41655
+ el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY);
41803
41656
  });
41804
41657
  svg.selectAll(".gantt-group-band-bg, .gantt-group-band-accent").each(function() {
41805
41658
  const el = d3Selection13.select(this);
41806
41659
  el.attr(
41807
41660
  "opacity",
41808
- el.attr("data-group") === groupName ? 1 : FADE_OPACITY2
41661
+ el.attr("data-group") === groupName ? 1 : FADE_OPACITY
41809
41662
  );
41810
41663
  });
41811
- svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY2);
41812
- svg.selectAll(".gantt-lane-band-bg, .gantt-lane-band-accent").attr("opacity", FADE_OPACITY2);
41664
+ svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY);
41665
+ svg.selectAll(".gantt-lane-band-bg, .gantt-lane-band-accent").attr("opacity", FADE_OPACITY);
41813
41666
  g.selectAll(".gantt-lane-band, .gantt-lane-accent").attr(
41814
41667
  "opacity",
41815
- FADE_OPACITY2
41668
+ FADE_OPACITY
41816
41669
  );
41817
41670
  g.selectAll(".gantt-marker-group").attr(
41818
41671
  "opacity",
41819
- FADE_OPACITY2
41672
+ FADE_OPACITY
41820
41673
  );
41821
41674
  }
41822
41675
  function highlightLane(g, svg, tagKey, laneName) {
@@ -41824,105 +41677,105 @@ function highlightLane(g, svg, tagKey, laneName) {
41824
41677
  const laneValue = laneName.toLowerCase();
41825
41678
  g.selectAll(".gantt-task").each(function() {
41826
41679
  const el = d3Selection13.select(this);
41827
- el.attr("opacity", el.attr(tagAttr) === laneValue ? 1 : FADE_OPACITY2);
41680
+ el.attr("opacity", el.attr(tagAttr) === laneValue ? 1 : FADE_OPACITY);
41828
41681
  });
41829
41682
  g.selectAll(".gantt-milestone").each(function() {
41830
41683
  const el = d3Selection13.select(this);
41831
- el.attr("opacity", el.attr(tagAttr) === laneValue ? 1 : FADE_OPACITY2);
41684
+ el.attr("opacity", el.attr(tagAttr) === laneValue ? 1 : FADE_OPACITY);
41832
41685
  });
41833
41686
  svg.selectAll(".gantt-task-label").each(function() {
41834
41687
  const el = d3Selection13.select(this);
41835
- el.attr("opacity", el.attr(tagAttr) === laneValue ? 1 : FADE_OPACITY2);
41688
+ el.attr("opacity", el.attr(tagAttr) === laneValue ? 1 : FADE_OPACITY);
41836
41689
  });
41837
41690
  svg.selectAll(".gantt-lane-header").each(function() {
41838
41691
  const el = d3Selection13.select(this);
41839
- el.attr("opacity", el.attr("data-lane") === laneName ? 1 : FADE_OPACITY2);
41692
+ el.attr("opacity", el.attr("data-lane") === laneName ? 1 : FADE_OPACITY);
41840
41693
  });
41841
41694
  g.selectAll(".gantt-lane-band-group").each(function() {
41842
41695
  const el = d3Selection13.select(this);
41843
- el.attr("opacity", el.attr("data-lane") === laneName ? 1 : FADE_OPACITY2);
41696
+ el.attr("opacity", el.attr("data-lane") === laneName ? 1 : FADE_OPACITY);
41844
41697
  });
41845
41698
  svg.selectAll(".gantt-lane-band-bg, .gantt-lane-band-accent").each(function() {
41846
41699
  const el = d3Selection13.select(this);
41847
- el.attr("opacity", el.attr("data-lane") === laneName ? 1 : FADE_OPACITY2);
41700
+ el.attr("opacity", el.attr("data-lane") === laneName ? 1 : FADE_OPACITY);
41848
41701
  });
41849
41702
  g.selectAll(
41850
41703
  ".gantt-group-bar, .gantt-group-summary"
41851
- ).attr("opacity", FADE_OPACITY2);
41852
- svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY2);
41853
- svg.selectAll(".gantt-group-band-bg, .gantt-group-band-accent").attr("opacity", FADE_OPACITY2);
41704
+ ).attr("opacity", FADE_OPACITY);
41705
+ svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY);
41706
+ svg.selectAll(".gantt-group-band-bg, .gantt-group-band-accent").attr("opacity", FADE_OPACITY);
41854
41707
  g.selectAll(".gantt-marker-group").attr(
41855
41708
  "opacity",
41856
- FADE_OPACITY2
41709
+ FADE_OPACITY
41857
41710
  );
41858
41711
  }
41859
41712
  function highlightTask(g, svg, taskId) {
41860
41713
  g.selectAll(".gantt-task").each(function() {
41861
41714
  const el = d3Selection13.select(this);
41862
- el.attr("opacity", el.attr("data-task-id") === taskId ? 1 : FADE_OPACITY2);
41715
+ el.attr("opacity", el.attr("data-task-id") === taskId ? 1 : FADE_OPACITY);
41863
41716
  });
41864
41717
  g.selectAll(".gantt-milestone").attr(
41865
41718
  "opacity",
41866
- FADE_OPACITY2
41719
+ FADE_OPACITY
41867
41720
  );
41868
41721
  svg.selectAll(".gantt-task-label").each(function() {
41869
41722
  const el = d3Selection13.select(this);
41870
- el.attr("opacity", el.attr("data-task-id") === taskId ? 1 : FADE_OPACITY2);
41723
+ el.attr("opacity", el.attr("data-task-id") === taskId ? 1 : FADE_OPACITY);
41871
41724
  });
41872
41725
  g.selectAll(
41873
41726
  ".gantt-group-bar, .gantt-group-summary"
41874
- ).attr("opacity", FADE_OPACITY2);
41875
- svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY2);
41876
- svg.selectAll(".gantt-group-band-bg, .gantt-group-band-accent").attr("opacity", FADE_OPACITY2);
41877
- svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY2);
41878
- svg.selectAll(".gantt-lane-band-bg, .gantt-lane-band-accent").attr("opacity", FADE_OPACITY2);
41727
+ ).attr("opacity", FADE_OPACITY);
41728
+ svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY);
41729
+ svg.selectAll(".gantt-group-band-bg, .gantt-group-band-accent").attr("opacity", FADE_OPACITY);
41730
+ svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY);
41731
+ svg.selectAll(".gantt-lane-band-bg, .gantt-lane-band-accent").attr("opacity", FADE_OPACITY);
41879
41732
  g.selectAll(
41880
41733
  ".gantt-lane-band, .gantt-lane-accent, .gantt-lane-band-group"
41881
- ).attr("opacity", FADE_OPACITY2);
41734
+ ).attr("opacity", FADE_OPACITY);
41882
41735
  g.selectAll(
41883
41736
  ".gantt-dep-arrow, .gantt-dep-arrowhead"
41884
- ).attr("opacity", FADE_OPACITY2);
41737
+ ).attr("opacity", FADE_OPACITY);
41885
41738
  g.selectAll(".gantt-marker-group").attr(
41886
41739
  "opacity",
41887
- FADE_OPACITY2
41740
+ FADE_OPACITY
41888
41741
  );
41889
41742
  }
41890
41743
  function highlightMilestone(g, svg, taskId) {
41891
41744
  g.selectAll(".gantt-task").attr(
41892
41745
  "opacity",
41893
- FADE_OPACITY2
41746
+ FADE_OPACITY
41894
41747
  );
41895
41748
  g.selectAll(".gantt-milestone").each(function() {
41896
41749
  const el = d3Selection13.select(this);
41897
- el.attr("opacity", el.attr("data-task-id") === taskId ? 1 : FADE_OPACITY2);
41750
+ el.attr("opacity", el.attr("data-task-id") === taskId ? 1 : FADE_OPACITY);
41898
41751
  });
41899
41752
  svg.selectAll(".gantt-task-label").each(function() {
41900
41753
  const el = d3Selection13.select(this);
41901
- el.attr("opacity", el.attr("data-task-id") === taskId ? 1 : FADE_OPACITY2);
41754
+ el.attr("opacity", el.attr("data-task-id") === taskId ? 1 : FADE_OPACITY);
41902
41755
  });
41903
41756
  g.selectAll(
41904
41757
  ".gantt-group-bar, .gantt-group-summary"
41905
- ).attr("opacity", FADE_OPACITY2);
41906
- svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY2);
41907
- svg.selectAll(".gantt-group-band-bg, .gantt-group-band-accent").attr("opacity", FADE_OPACITY2);
41908
- svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY2);
41909
- svg.selectAll(".gantt-lane-band-bg, .gantt-lane-band-accent").attr("opacity", FADE_OPACITY2);
41758
+ ).attr("opacity", FADE_OPACITY);
41759
+ svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY);
41760
+ svg.selectAll(".gantt-group-band-bg, .gantt-group-band-accent").attr("opacity", FADE_OPACITY);
41761
+ svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY);
41762
+ svg.selectAll(".gantt-lane-band-bg, .gantt-lane-band-accent").attr("opacity", FADE_OPACITY);
41910
41763
  g.selectAll(
41911
41764
  ".gantt-lane-band, .gantt-lane-accent, .gantt-lane-band-group"
41912
- ).attr("opacity", FADE_OPACITY2);
41765
+ ).attr("opacity", FADE_OPACITY);
41913
41766
  g.selectAll(
41914
41767
  ".gantt-dep-arrow, .gantt-dep-arrowhead"
41915
- ).attr("opacity", FADE_OPACITY2);
41768
+ ).attr("opacity", FADE_OPACITY);
41916
41769
  g.selectAll(".gantt-marker-group").attr(
41917
41770
  "opacity",
41918
- FADE_OPACITY2
41771
+ FADE_OPACITY
41919
41772
  );
41920
41773
  }
41921
41774
  function highlightTaskLabel(svg, lineNumber) {
41922
41775
  const ln = String(lineNumber);
41923
41776
  svg.selectAll(".gantt-task-label").each(function() {
41924
41777
  const el = d3Selection13.select(this);
41925
- el.attr("opacity", el.attr("data-line-number") === ln ? 1 : FADE_OPACITY2);
41778
+ el.attr("opacity", el.attr("data-line-number") === ln ? 1 : FADE_OPACITY);
41926
41779
  });
41927
41780
  }
41928
41781
  function resetTaskLabels(svg) {
@@ -42196,7 +42049,7 @@ function renderTimeScaleHorizontal(g, scale, _innerWidth, innerHeight, textColor
42196
42049
  g.append("text").attr("class", "gantt-scale-tick").attr("x", tick.pos).attr("y", innerHeight + tickLen + 12).attr("text-anchor", "middle").attr("font-size", "10px").attr("fill", textColor).attr("opacity", opacity).text(tick.label);
42197
42050
  }
42198
42051
  }
42199
- var BAR_H, ROW_GAP, GROUP_GAP2, MILESTONE_SIZE, MIN_LEFT_MARGIN, BOTTOM_MARGIN, RIGHT_MARGIN, CHAR_W2, LABEL_PAD2, LABEL_GAP, BAND_ACCENT_W, BAND_RADIUS, bandClipCounter, JS_DAY_TO_WEEKDAY2, ERA_COLORS, SPRINT_BAND_OPACITY, SPRINT_HOVER_OPACITY, SPRINT_BOUNDARY_OPACITY, FADE_OPACITY2, MONTH_ABBR2;
42052
+ var BAR_H, ROW_GAP, GROUP_GAP2, MILESTONE_SIZE, MIN_LEFT_MARGIN, BOTTOM_MARGIN, RIGHT_MARGIN, CHAR_W2, LABEL_PAD2, LABEL_GAP, BAND_ACCENT_W, BAND_RADIUS, bandClipCounter, JS_DAY_TO_WEEKDAY2, ERA_COLORS, SPRINT_BAND_OPACITY, SPRINT_HOVER_OPACITY, SPRINT_BOUNDARY_OPACITY, FADE_OPACITY, MONTH_ABBR2;
42200
42053
  var init_renderer12 = __esm({
42201
42054
  "src/gantt/renderer.ts"() {
42202
42055
  "use strict";
@@ -42237,7 +42090,7 @@ var init_renderer12 = __esm({
42237
42090
  SPRINT_BAND_OPACITY = 0.05;
42238
42091
  SPRINT_HOVER_OPACITY = 0.12;
42239
42092
  SPRINT_BOUNDARY_OPACITY = 0.3;
42240
- FADE_OPACITY2 = 0.1;
42093
+ FADE_OPACITY = 0.1;
42241
42094
  MONTH_ABBR2 = [
42242
42095
  "Jan",
42243
42096
  "Feb",
@@ -47563,7 +47416,8 @@ function layoutMap(resolved, data, size, opts) {
47563
47416
  palette.bg,
47564
47417
  mutedBasemap ? isDark ? MUTED_FOREIGN_DARK : MUTED_FOREIGN_LIGHT : isDark ? FOREIGN_TINT_DARK : FOREIGN_TINT_LIGHT
47565
47418
  );
47566
- const colorizeActive = resolved.directives.noColorize !== true && !hasRamp && resolved.tagGroups.length === 0;
47419
+ const hasDirectColor = resolved.regions.some((r) => r.color !== void 0);
47420
+ const colorizeActive = resolved.directives.noColorize !== true && !hasRamp && !hasDirectColor && resolved.tagGroups.length === 0;
47567
47421
  const colorByIso = /* @__PURE__ */ new Map();
47568
47422
  if (colorizeActive) {
47569
47423
  const adjacency = /* @__PURE__ */ new Map();
@@ -47659,16 +47513,17 @@ function layoutMap(resolved, data, size, opts) {
47659
47513
  };
47660
47514
  }
47661
47515
  }
47516
+ const shownTitle = resolved.directives.noTitle ? null : resolved.title;
47662
47517
  const TITLE_GAP2 = 16;
47663
47518
  let topPad = FIT_PAD;
47664
- if (resolved.title && resolved.pois.length > 0) {
47519
+ if (shownTitle && resolved.pois.length > 0) {
47665
47520
  const bannerBottom = (resolved.subtitle ? TITLE_Y + TITLE_FONT_SIZE : TITLE_Y) + TITLE_FONT_SIZE / 2;
47666
47521
  topPad = Math.max(FIT_PAD, bannerBottom + TITLE_GAP2);
47667
47522
  }
47668
47523
  const legendBand = mapLegendBand(legend, {
47669
47524
  width,
47670
47525
  mode: opts.legendMode ?? "preview",
47671
- hasTitle: Boolean(resolved.title),
47526
+ hasTitle: Boolean(shownTitle),
47672
47527
  hasSubtitle: Boolean(resolved.subtitle)
47673
47528
  });
47674
47529
  if (legendBand > topPad) topPad = legendBand;
@@ -48757,7 +48612,7 @@ function layoutMap(resolved, data, size, opts) {
48757
48612
  width,
48758
48613
  height,
48759
48614
  background: water,
48760
- title: resolved.title,
48615
+ title: shownTitle,
48761
48616
  ...resolved.subtitle !== void 0 && { subtitle: resolved.subtitle },
48762
48617
  ...resolved.caption !== void 0 && { caption: resolved.caption },
48763
48618
  regions,
@@ -49166,9 +49021,10 @@ function renderMap(container, resolved, data, palette, isDark, onClickItem, expo
49166
49021
  wireSync(lt, leg.lineNumber);
49167
49022
  }
49168
49023
  });
49024
+ const clusterUi = !exportDims && !resolved.directives.noClusterPois;
49169
49025
  const gSpider = svg.append("g").attr("class", "dgmo-map-spider");
49170
49026
  for (const cl of layout.clusters) {
49171
- if (!exportDims) {
49027
+ if (clusterUi) {
49172
49028
  gSpider.append("circle").attr("cx", cl.cx).attr("cy", cl.cy).attr("r", cl.hitR).attr("fill", "transparent").attr("data-cluster-hit", cl.id).style("cursor", "pointer");
49173
49029
  }
49174
49030
  for (const leg of cl.legs) {
@@ -49260,13 +49116,18 @@ function renderMap(container, resolved, data, palette, isDark, onClickItem, expo
49260
49116
  }
49261
49117
  wireSync(t, lab.lineNumber);
49262
49118
  }
49263
- if (!exportDims && layout.clusters.length) {
49119
+ if (clusterUi && layout.clusters.length) {
49264
49120
  const gBadge = svg.append("g").attr("class", "dgmo-map-cluster-badges");
49265
49121
  for (const cl of layout.clusters) {
49266
49122
  const g = gBadge.append("g").attr("data-cluster", cl.id).style("opacity", 0).style("pointer-events", "none");
49267
49123
  const R = 9;
49268
49124
  g.append("circle").attr("cx", cl.cx).attr("cy", cl.cy).attr("r", R).attr("fill", mix(palette.textMuted, palette.bg, 35)).attr("stroke", palette.textMuted).attr("stroke-width", 1);
49269
49125
  g.append("circle").attr("cx", cl.cx).attr("cy", cl.cy).attr("r", R + 2.5).attr("fill", "none").attr("stroke", palette.textMuted).attr("stroke-width", 1);
49126
+ const beadR = R + 2.5;
49127
+ for (const leg of cl.legs) {
49128
+ const a = Math.atan2(leg.y2 - cl.cy, leg.x2 - cl.cx);
49129
+ g.append("circle").attr("class", "dgmo-map-cluster-bead").attr("cx", cl.cx + beadR * Math.cos(a)).attr("cy", cl.cy + beadR * Math.sin(a)).attr("r", 1.8).attr("fill", leg.color).attr("stroke", palette.bg).attr("stroke-width", 0.5);
49130
+ }
49270
49131
  emitText(
49271
49132
  g,
49272
49133
  cl.cx,
@@ -52191,10 +52052,12 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
52191
52052
  isDark ? 15 : 20
52192
52053
  ) : isDark ? palette.surface : palette.bg;
52193
52054
  const strokeColor = groupTagColor || palette.textMuted;
52194
- const groupG = svg.append("g").attr("class", "group-box-wrapper").attr("data-group-toggle", "").attr("data-group-line", String(group.lineNumber)).attr("cursor", "pointer");
52055
+ const groupG = svg.append("g").attr("class", "group-box-wrapper").attr("data-group-toggle", "").attr("data-group-line", String(group.lineNumber)).attr("tabindex", "0").attr("role", "button").attr("aria-expanded", "true").attr("cursor", "pointer");
52195
52056
  groupG.append("title").text("Click to collapse");
52196
- groupG.append("rect").attr("x", minX).attr("y", boxY).attr("width", maxX - minX).attr("height", boxH).attr("rx", 6).attr("fill", fillColor).attr("stroke", strokeColor).attr("stroke-width", 1).attr("stroke-opacity", 0.5).attr("class", "group-box");
52197
- groupG.append("text").attr("x", minX + 8).attr("y", boxY + GROUP_LABEL_SIZE + 4).attr("fill", strokeColor).attr("font-size", GROUP_LABEL_SIZE).attr("font-weight", "bold").attr("opacity", 0.7).attr("class", "group-label").text(group.name);
52057
+ groupG.append("rect").attr("x", minX).attr("y", boxY).attr("width", maxX - minX).attr("height", boxH).attr("rx", 6).attr("fill", fillColor).attr("stroke", strokeColor).attr("stroke-width", 1).attr("stroke-opacity", 0.5).attr("pointer-events", "none").attr("class", "group-box");
52058
+ groupG.append("rect").attr("x", minX).attr("y", boxY).attr("width", maxX - minX).attr("height", participantStartY - boxY).attr("fill", "transparent").attr("class", "group-label-hit");
52059
+ groupG.append("text").attr("x", minX + 8).attr("y", boxY + GROUP_LABEL_SIZE + 4).attr("fill", strokeColor).attr("font-size", GROUP_LABEL_SIZE).attr("opacity", 0.7).attr("pointer-events", "none").attr("class", "group-chevron").text("\u25BE");
52060
+ groupG.append("text").attr("x", minX + 8 + GROUP_LABEL_SIZE + 2).attr("y", boxY + GROUP_LABEL_SIZE + 4).attr("fill", strokeColor).attr("font-size", GROUP_LABEL_SIZE).attr("font-weight", "bold").attr("opacity", 0.7).attr("pointer-events", "none").attr("class", "group-label").text(group.name);
52198
52061
  }
52199
52062
  const lifelineStartY = lifelineStartY0;
52200
52063
  participants.forEach((participant) => {
@@ -52236,7 +52099,7 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
52236
52099
  const participantG = svg.select(
52237
52100
  `.participant[data-participant-id="${participant.id}"]`
52238
52101
  );
52239
- participantG.attr("data-group-toggle", "").attr("data-group-line", String(meta.lineNumber)).attr("cursor", "pointer");
52102
+ participantG.attr("data-group-toggle", "").attr("data-group-line", String(meta.lineNumber)).attr("tabindex", "0").attr("role", "button").attr("aria-expanded", "false").attr("cursor", "pointer");
52240
52103
  participantG.append("title").text("Click to expand");
52241
52104
  const pFill = effectiveTagColor ? mix(
52242
52105
  effectiveTagColor,
@@ -54219,7 +54082,7 @@ function renderArcDiagram(container, parsed, palette, _isDark, onClickItem, expo
54219
54082
  neighbors2.get(link.source).add(link.target);
54220
54083
  neighbors2.get(link.target).add(link.source);
54221
54084
  }
54222
- const FADE_OPACITY3 = 0.1;
54085
+ const FADE_OPACITY2 = 0.1;
54223
54086
  function handleMouseEnter(hovered) {
54224
54087
  const connected = neighbors2.get(hovered);
54225
54088
  g.selectAll(".arc-link").each(function() {
@@ -54227,13 +54090,13 @@ function renderArcDiagram(container, parsed, palette, _isDark, onClickItem, expo
54227
54090
  const src = el.attr("data-source");
54228
54091
  const tgt = el.attr("data-target");
54229
54092
  const isRelated = src === hovered || tgt === hovered;
54230
- el.attr("stroke-opacity", isRelated ? 0.85 : FADE_OPACITY3);
54093
+ el.attr("stroke-opacity", isRelated ? 0.85 : FADE_OPACITY2);
54231
54094
  });
54232
54095
  g.selectAll(".arc-node").each(function() {
54233
54096
  const el = d3Selection23.select(this);
54234
54097
  const name = el.attr("data-node");
54235
54098
  const isRelated = name === hovered || connected.has(name);
54236
- el.attr("opacity", isRelated ? 1 : FADE_OPACITY3);
54099
+ el.attr("opacity", isRelated ? 1 : FADE_OPACITY2);
54237
54100
  });
54238
54101
  }
54239
54102
  function handleMouseLeave() {
@@ -54257,11 +54120,11 @@ function renderArcDiagram(container, parsed, palette, _isDark, onClickItem, expo
54257
54120
  g.selectAll(".arc-link").each(function() {
54258
54121
  const el = d3Selection23.select(this);
54259
54122
  const isRelated = members.has(el.attr("data-source")) || members.has(el.attr("data-target"));
54260
- el.attr("stroke-opacity", isRelated ? 0.85 : FADE_OPACITY3);
54123
+ el.attr("stroke-opacity", isRelated ? 0.85 : FADE_OPACITY2);
54261
54124
  });
54262
54125
  g.selectAll(".arc-node").each(function() {
54263
54126
  const el = d3Selection23.select(this);
54264
- el.attr("opacity", members.has(el.attr("data-node")) ? 1 : FADE_OPACITY3);
54127
+ el.attr("opacity", members.has(el.attr("data-node")) ? 1 : FADE_OPACITY2);
54265
54128
  });
54266
54129
  g.selectAll(".arc-group-band").each(function() {
54267
54130
  const el = d3Selection23.select(this);
@@ -54783,23 +54646,23 @@ function setupTimeline(container, parsed, palette, isDark, exportDims, activeTag
54783
54646
  };
54784
54647
  }
54785
54648
  function makeTimelineHoverHelpers() {
54786
- const FADE_OPACITY3 = 0.1;
54649
+ const FADE_OPACITY2 = 0.1;
54787
54650
  function fadeToGroup(g, groupName) {
54788
54651
  g.selectAll(".tl-event").each(function() {
54789
54652
  const el = d3Selection23.select(this);
54790
54653
  const evGroup = el.attr("data-group");
54791
- el.attr("opacity", evGroup === groupName ? 1 : FADE_OPACITY3);
54654
+ el.attr("opacity", evGroup === groupName ? 1 : FADE_OPACITY2);
54792
54655
  });
54793
54656
  g.selectAll(".tl-legend-item, .tl-lane-header").each(
54794
54657
  function() {
54795
54658
  const el = d3Selection23.select(this);
54796
54659
  const name = el.attr("data-group");
54797
- el.attr("opacity", name === groupName ? 1 : FADE_OPACITY3);
54660
+ el.attr("opacity", name === groupName ? 1 : FADE_OPACITY2);
54798
54661
  }
54799
54662
  );
54800
54663
  g.selectAll(".tl-marker").attr(
54801
54664
  "opacity",
54802
- FADE_OPACITY3
54665
+ FADE_OPACITY2
54803
54666
  );
54804
54667
  }
54805
54668
  function fadeToEra(g, eraStart, eraEnd) {
@@ -54809,40 +54672,40 @@ function makeTimelineHoverHelpers() {
54809
54672
  const endDate = el.attr("data-end-date");
54810
54673
  const evEnd = endDate ? parseFloat(endDate) : date;
54811
54674
  const inside = evEnd >= eraStart && date <= eraEnd;
54812
- el.attr("opacity", inside ? 1 : FADE_OPACITY3);
54675
+ el.attr("opacity", inside ? 1 : FADE_OPACITY2);
54813
54676
  });
54814
54677
  g.selectAll(".tl-legend-item, .tl-lane-header").attr(
54815
54678
  "opacity",
54816
- FADE_OPACITY3
54679
+ FADE_OPACITY2
54817
54680
  );
54818
54681
  g.selectAll(".tl-era").each(function() {
54819
54682
  const el = d3Selection23.select(this);
54820
54683
  const s = parseFloat(el.attr("data-era-start"));
54821
54684
  const e = parseFloat(el.attr("data-era-end"));
54822
54685
  const isSelf = s === eraStart && e === eraEnd;
54823
- el.attr("opacity", isSelf ? 1 : FADE_OPACITY3);
54686
+ el.attr("opacity", isSelf ? 1 : FADE_OPACITY2);
54824
54687
  });
54825
54688
  g.selectAll(".tl-marker").each(function() {
54826
54689
  const el = d3Selection23.select(this);
54827
54690
  const date = parseFloat(el.attr("data-marker-date"));
54828
54691
  const inside = date >= eraStart && date <= eraEnd;
54829
- el.attr("opacity", inside ? 1 : FADE_OPACITY3);
54692
+ el.attr("opacity", inside ? 1 : FADE_OPACITY2);
54830
54693
  });
54831
54694
  }
54832
54695
  function fadeToMarker(g, markerDate) {
54833
54696
  g.selectAll(".tl-event").attr(
54834
54697
  "opacity",
54835
- FADE_OPACITY3
54698
+ FADE_OPACITY2
54836
54699
  );
54837
- g.selectAll(".tl-era").attr("opacity", FADE_OPACITY3);
54700
+ g.selectAll(".tl-era").attr("opacity", FADE_OPACITY2);
54838
54701
  g.selectAll(".tl-legend-item, .tl-lane-header").attr(
54839
54702
  "opacity",
54840
- FADE_OPACITY3
54703
+ FADE_OPACITY2
54841
54704
  );
54842
54705
  g.selectAll(".tl-marker").each(function() {
54843
54706
  const el = d3Selection23.select(this);
54844
54707
  const date = parseFloat(el.attr("data-marker-date"));
54845
- el.attr("opacity", date === markerDate ? 1 : FADE_OPACITY3);
54708
+ el.attr("opacity", date === markerDate ? 1 : FADE_OPACITY2);
54846
54709
  });
54847
54710
  }
54848
54711
  function fadeReset(g) {
@@ -54856,15 +54719,15 @@ function makeTimelineHoverHelpers() {
54856
54719
  g.selectAll(".tl-event").each(function() {
54857
54720
  const el = d3Selection23.select(this);
54858
54721
  const val = el.attr(attrName);
54859
- el.attr("opacity", val === tagValue ? 1 : FADE_OPACITY3);
54722
+ el.attr("opacity", val === tagValue ? 1 : FADE_OPACITY2);
54860
54723
  });
54861
54724
  g.selectAll(".tl-legend-item, .tl-lane-header").attr(
54862
54725
  "opacity",
54863
- FADE_OPACITY3
54726
+ FADE_OPACITY2
54864
54727
  );
54865
54728
  g.selectAll(".tl-marker").attr(
54866
54729
  "opacity",
54867
- FADE_OPACITY3
54730
+ FADE_OPACITY2
54868
54731
  );
54869
54732
  g.selectAll(".tl-tag-legend-entry").each(function() {
54870
54733
  const el = d3Selection23.select(this);
@@ -54873,7 +54736,7 @@ function makeTimelineHoverHelpers() {
54873
54736
  const entryGroup = el.attr("data-tag-group");
54874
54737
  el.attr(
54875
54738
  "opacity",
54876
- entryGroup === tagKey && entryValue === tagValue ? 1 : FADE_OPACITY3
54739
+ entryGroup === tagKey && entryValue === tagValue ? 1 : FADE_OPACITY2
54877
54740
  );
54878
54741
  });
54879
54742
  }
@@ -54883,7 +54746,7 @@ function makeTimelineHoverHelpers() {
54883
54746
  }
54884
54747
  }
54885
54748
  return {
54886
- FADE_OPACITY: FADE_OPACITY3,
54749
+ FADE_OPACITY: FADE_OPACITY2,
54887
54750
  fadeToGroup,
54888
54751
  fadeToEra,
54889
54752
  fadeToMarker,
@@ -54895,7 +54758,7 @@ function makeTimelineHoverHelpers() {
54895
54758
  function renderTimelineTagLegendOverlay(container, parsed, palette, isDark, setup, hovers, onClickItem, exportDims, swimlaneTagGroup, activeTagGroup, onTagStateChange, viewMode, exportMode) {
54896
54759
  if (parsed.timelineTagGroups.length === 0) return;
54897
54760
  const { width, textColor, groupColorMap, solid } = setup;
54898
- const { FADE_OPACITY: FADE_OPACITY3, fadeReset, fadeToTagValue } = hovers;
54761
+ const { FADE_OPACITY: FADE_OPACITY2, fadeReset, fadeToTagValue } = hovers;
54899
54762
  const title = parsed.noTitle ? null : parsed.title;
54900
54763
  const { timelineEvents } = parsed;
54901
54764
  const LG_HEIGHT = LEGEND_HEIGHT;
@@ -54985,7 +54848,7 @@ function renderTimelineTagLegendOverlay(container, parsed, palette, isDark, setu
54985
54848
  const eg = el.attr("data-tag-group") ?? el.node()?.closest?.("[data-tag-group]")?.getAttribute("data-tag-group");
54986
54849
  el.attr(
54987
54850
  "opacity",
54988
- eg === tagKey && ev === tagVal ? 1 : FADE_OPACITY3
54851
+ eg === tagKey && ev === tagVal ? 1 : FADE_OPACITY2
54989
54852
  );
54990
54853
  });
54991
54854
  } else {
@@ -57744,6 +57607,9 @@ async function renderForExport(content, theme, palette, viewState, options) {
57744
57607
  const { renderSequenceDiagram: renderSequenceDiagram2 } = await Promise.resolve().then(() => (init_renderer20(), renderer_exports20));
57745
57608
  const seqParsed = parseSequenceDgmo2(content);
57746
57609
  if (seqParsed.error || seqParsed.participants.length === 0) return "";
57610
+ const collapsedSections = viewState?.cs ? new Set(viewState.cs) : void 0;
57611
+ const collapsedGroups = viewState?.cg ? new Set(viewState.cg.map(Number).filter((n) => Number.isFinite(n))) : void 0;
57612
+ const seqActiveTagGroup = viewState?.tag ?? options?.tagGroup;
57747
57613
  renderSequenceDiagram2(
57748
57614
  container,
57749
57615
  seqParsed,
@@ -57752,9 +57618,11 @@ async function renderForExport(content, theme, palette, viewState, options) {
57752
57618
  void 0,
57753
57619
  {
57754
57620
  exportWidth: EXPORT_WIDTH,
57755
- ...options?.tagGroup !== void 0 && {
57756
- activeTagGroup: options.tagGroup
57757
- }
57621
+ ...seqActiveTagGroup !== void 0 && {
57622
+ activeTagGroup: seqActiveTagGroup
57623
+ },
57624
+ ...collapsedSections !== void 0 && { collapsedSections },
57625
+ ...collapsedGroups !== void 0 && { collapsedGroups }
57758
57626
  }
57759
57627
  );
57760
57628
  } else if (parsed.type === "wordcloud") {
@@ -58816,8 +58684,17 @@ function normalizeSvgForEmbed(input) {
58816
58684
  const tight = computeBBox(svg);
58817
58685
  if (tight && tight.width > 0 && tight.height > 0) {
58818
58686
  const pad2 = 16;
58819
- const vb = `${tight.x - pad2} ${tight.y - pad2} ${tight.width + pad2 * 2} ${tight.height + pad2 * 2}`;
58820
- svg = svg.replace(/(<svg[^>]*?)viewBox="[^"]*"/, `$1viewBox="${vb}"`);
58687
+ const x = tight.x - pad2;
58688
+ const y = tight.y - pad2;
58689
+ const w = tight.width + pad2 * 2;
58690
+ const h = tight.height + pad2 * 2;
58691
+ const canvas = readViewBox(svg);
58692
+ const TOL = 2;
58693
+ const withinCanvas = !canvas || x >= canvas.x - TOL && y >= canvas.y - TOL && x + w <= canvas.x + canvas.width + TOL && y + h <= canvas.y + canvas.height + TOL;
58694
+ if (withinCanvas) {
58695
+ const vb = `${x} ${y} ${w} ${h}`;
58696
+ svg = svg.replace(/(<svg[^>]*?)viewBox="[^"]*"/, `$1viewBox="${vb}"`);
58697
+ }
58821
58698
  }
58822
58699
  svg = svg.replace(/(<svg[^>]*?) width="[^"]*"/g, "$1");
58823
58700
  svg = svg.replace(/(<svg[^>]*?) height="[^"]*"/g, "$1");
@@ -58836,6 +58713,14 @@ function getEmbedSvgViewBox(svg) {
58836
58713
  height: tight.height + pad2 * 2
58837
58714
  };
58838
58715
  }
58716
+ function readViewBox(svg) {
58717
+ const m = svg.match(/<svg[^>]*?\bviewBox="([^"]+)"/);
58718
+ if (!m) return null;
58719
+ const n = m[1].trim().split(/[\s,]+/).map(Number);
58720
+ if (n.length !== 4 || n.some((v) => !Number.isFinite(v)) || n[2] <= 0 || n[3] <= 0)
58721
+ return null;
58722
+ return { x: n[0], y: n[1], width: n[2], height: n[3] };
58723
+ }
58839
58724
  function computeBBox(svg) {
58840
58725
  const xs = [];
58841
58726
  const ys = [];