@diagrammo/dgmo 0.24.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
@@ -816,7 +816,7 @@ function withTagAliases(base, aliases) {
816
816
  function isReservedKey(registry, key) {
817
817
  return registry.keys.has(key) || registry.tagAliases.has(key);
818
818
  }
819
- var SEQUENCE_REGISTRY, INFRA_REGISTRY, MAP_REGISTRY, ORG_REGISTRY, C4_REGISTRY, ER_REGISTRY, CLASS_REGISTRY, KANBAN_REGISTRY, SITEMAP_REGISTRY, GANTT_REGISTRY, PERT_REGISTRY, BOXES_AND_LINES_REGISTRY, TIMELINE_REGISTRY, MINDMAP_REGISTRY, TECH_RADAR_REGISTRY, CYCLE_REGISTRY, JOURNEY_MAP_REGISTRY, PYRAMID_REGISTRY, RING_REGISTRY, RACI_REGISTRY, WIREFRAME_REGISTRY;
819
+ var SEQUENCE_REGISTRY, INFRA_REGISTRY, MAP_REGISTRY, ORG_REGISTRY, C4_REGISTRY, ER_REGISTRY, KANBAN_REGISTRY, SITEMAP_REGISTRY, GANTT_REGISTRY, PERT_REGISTRY, BOXES_AND_LINES_REGISTRY, TIMELINE_REGISTRY, MINDMAP_REGISTRY, TECH_RADAR_REGISTRY, CYCLE_REGISTRY, JOURNEY_MAP_REGISTRY, PYRAMID_REGISTRY, RING_REGISTRY, RACI_REGISTRY;
820
820
  var init_reserved_key_registry = __esm({
821
821
  "src/utils/reserved-key-registry.ts"() {
822
822
  "use strict";
@@ -860,10 +860,6 @@ var init_reserved_key_registry = __esm({
860
860
  "description",
861
861
  "domain"
862
862
  ]);
863
- CLASS_REGISTRY = staticRegistry([
864
- "color",
865
- "description"
866
- ]);
867
863
  KANBAN_REGISTRY = staticRegistry([
868
864
  "color",
869
865
  "description",
@@ -939,7 +935,6 @@ var init_reserved_key_registry = __esm({
939
935
  "color",
940
936
  "description"
941
937
  ]);
942
- WIREFRAME_REGISTRY = staticRegistry([]);
943
938
  }
944
939
  });
945
940
 
@@ -4208,6 +4203,9 @@ var init_legend_layout = __esm({
4208
4203
  });
4209
4204
 
4210
4205
  // src/utils/legend-d3.ts
4206
+ function centerText(sel) {
4207
+ return sel.attr("dy", LEGEND_TEXT_DY);
4208
+ }
4211
4209
  function renderLegendD3(container, config, state, palette, isDark, callbacks, containerWidth) {
4212
4210
  const width = containerWidth ?? parseFloat(container.attr("width") || "800");
4213
4211
  let currentState = { ...state };
@@ -4290,21 +4288,21 @@ function renderCapsule(parent, capsule, palette, groupBg, pillBorder, _isDark, c
4290
4288
  const pill = capsule.pill;
4291
4289
  g.append("rect").attr("x", pill.x).attr("y", pill.y).attr("width", pill.width).attr("height", pill.height).attr("rx", pill.height / 2).attr("fill", palette.bg);
4292
4290
  g.append("rect").attr("x", pill.x).attr("y", pill.y).attr("width", pill.width).attr("height", pill.height).attr("rx", pill.height / 2).attr("fill", "none").attr("stroke", pillBorder).attr("stroke-width", 0.75);
4293
- g.append("text").attr("x", pill.x + pill.width / 2).attr("y", LEGEND_HEIGHT / 2).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("font-size", LEGEND_PILL_FONT_SIZE).attr("font-weight", 500).attr("fill", palette.text).attr("pointer-events", "none").attr("font-family", FONT_FAMILY).text(capsule.groupName);
4291
+ g.append("text").attr("x", pill.x + pill.width / 2).attr("y", LEGEND_HEIGHT / 2).attr("text-anchor", "middle").call(centerText).attr("font-size", LEGEND_PILL_FONT_SIZE).attr("font-weight", 500).attr("fill", palette.text).attr("pointer-events", "none").attr("font-family", FONT_FAMILY).text(capsule.groupName);
4294
4292
  if (capsule.gradient) {
4295
4293
  const gr = capsule.gradient;
4296
4294
  const gradId = `dgmo-legend-ramp-${capsule.groupName.toLowerCase().replace(/[^a-z0-9]+/g, "-")}`;
4297
4295
  const def = g.append("defs").append("linearGradient").attr("id", gradId);
4298
4296
  def.append("stop").attr("offset", "0%").attr("stop-color", mix(gr.hue, gr.base, 15));
4299
4297
  def.append("stop").attr("offset", "100%").attr("stop-color", gr.hue);
4300
- g.append("text").attr("x", gr.minX).attr("y", gr.textY).attr("dominant-baseline", "central").attr("font-size", LEGEND_ENTRY_FONT_SIZE).attr("fill", palette.textMuted).attr("pointer-events", "none").attr("font-family", FONT_FAMILY).text(gr.minText);
4298
+ g.append("text").attr("x", gr.minX).attr("y", gr.textY).call(centerText).attr("font-size", LEGEND_ENTRY_FONT_SIZE).attr("fill", palette.textMuted).attr("pointer-events", "none").attr("font-family", FONT_FAMILY).text(gr.minText);
4301
4299
  g.append("rect").attr("class", "dgmo-legend-gradient-ramp").attr("data-ramp-min", gr.min).attr("data-ramp-max", gr.max).attr("x", gr.rampX).attr("y", gr.rampY).attr("width", gr.rampW).attr("height", gr.rampH).attr("rx", 2).attr("fill", `url(#${gradId})`);
4302
- g.append("text").attr("x", gr.maxX).attr("y", gr.textY).attr("dominant-baseline", "central").attr("font-size", LEGEND_ENTRY_FONT_SIZE).attr("fill", palette.textMuted).attr("pointer-events", "none").attr("font-family", FONT_FAMILY).text(gr.maxText);
4300
+ g.append("text").attr("x", gr.maxX).attr("y", gr.textY).call(centerText).attr("font-size", LEGEND_ENTRY_FONT_SIZE).attr("fill", palette.textMuted).attr("pointer-events", "none").attr("font-family", FONT_FAMILY).text(gr.maxText);
4303
4301
  }
4304
4302
  for (const entry of capsule.entries) {
4305
4303
  const entryG = g.append("g").attr("data-legend-entry", entry.value.toLowerCase()).attr("data-series-name", entry.value).style("cursor", "pointer");
4306
4304
  entryG.append("circle").attr("cx", entry.dotCx).attr("cy", entry.dotCy).attr("r", LEGEND_DOT_R).attr("fill", entry.color);
4307
- entryG.append("text").attr("x", entry.textX).attr("y", entry.textY).attr("dominant-baseline", "central").attr("font-size", LEGEND_ENTRY_FONT_SIZE).attr("fill", palette.textMuted).attr("font-family", FONT_FAMILY).text(entry.displayValue ?? entry.value);
4305
+ entryG.append("text").attr("x", entry.textX).attr("y", entry.textY).call(centerText).attr("font-size", LEGEND_ENTRY_FONT_SIZE).attr("fill", palette.textMuted).attr("font-family", FONT_FAMILY).text(entry.displayValue ?? entry.value);
4308
4306
  if (callbacks?.onEntryHover) {
4309
4307
  const groupName = capsule.groupName;
4310
4308
  const entryValue = entry.value;
@@ -4324,7 +4322,7 @@ function renderCapsule(parent, capsule, palette, groupBg, pillBorder, _isDark, c
4324
4322
  function renderPill(parent, pill, palette, groupBg, callbacks) {
4325
4323
  const g = parent.append("g").attr("transform", `translate(${pill.x},${pill.y})`).attr("data-legend-group", pill.groupName.toLowerCase()).style("cursor", "pointer");
4326
4324
  g.append("rect").attr("width", pill.width).attr("height", pill.height).attr("rx", pill.height / 2).attr("fill", groupBg);
4327
- g.append("text").attr("x", pill.width / 2).attr("y", pill.height / 2).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("font-size", LEGEND_PILL_FONT_SIZE).attr("font-weight", 500).attr("fill", palette.textMuted).attr("pointer-events", "none").attr("font-family", FONT_FAMILY).text(pill.groupName);
4325
+ g.append("text").attr("x", pill.width / 2).attr("y", pill.height / 2).attr("text-anchor", "middle").call(centerText).attr("font-size", LEGEND_PILL_FONT_SIZE).attr("font-weight", 500).attr("fill", palette.textMuted).attr("pointer-events", "none").attr("font-family", FONT_FAMILY).text(pill.groupName);
4328
4326
  if (callbacks?.onGroupToggle) {
4329
4327
  const cb = callbacks.onGroupToggle;
4330
4328
  const name = pill.groupName;
@@ -4347,7 +4345,7 @@ function renderControl(parent, ctrl, palette, _groupBg, pillBorder, _isDark, con
4347
4345
  textX = 8 + 14 + LEGEND_ENTRY_DOT_GAP + measureLegendText(ctrl.label, LEGEND_PILL_FONT_SIZE) / 2;
4348
4346
  }
4349
4347
  if (ctrl.label) {
4350
- g.append("text").attr("x", textX).attr("y", ctrl.height / 2).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("font-size", LEGEND_PILL_FONT_SIZE).attr("font-weight", 500).attr("fill", palette.textMuted).attr("pointer-events", "none").attr("font-family", FONT_FAMILY).text(ctrl.label);
4348
+ g.append("text").attr("x", textX).attr("y", ctrl.height / 2).attr("text-anchor", "middle").call(centerText).attr("font-size", LEGEND_PILL_FONT_SIZE).attr("font-weight", 500).attr("fill", palette.textMuted).attr("pointer-events", "none").attr("font-family", FONT_FAMILY).text(ctrl.label);
4351
4349
  }
4352
4350
  if (ctrl.children) {
4353
4351
  let cx = ctrl.width + 4;
@@ -4357,7 +4355,7 @@ function renderControl(parent, ctrl, palette, _groupBg, pillBorder, _isDark, con
4357
4355
  "fill",
4358
4356
  child.isActive ? palette.primary ?? palette.text : "none"
4359
4357
  ).attr("stroke", pillBorder).attr("stroke-width", 0.75);
4360
- childG.append("text").attr("x", child.width / 2).attr("y", ctrl.height / 2).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("font-size", LEGEND_ENTRY_FONT_SIZE).attr("fill", child.isActive ? palette.bg : palette.textMuted).attr("font-family", FONT_FAMILY).text(child.label);
4358
+ childG.append("text").attr("x", child.width / 2).attr("y", ctrl.height / 2).attr("text-anchor", "middle").call(centerText).attr("font-size", LEGEND_ENTRY_FONT_SIZE).attr("fill", child.isActive ? palette.bg : palette.textMuted).attr("font-family", FONT_FAMILY).text(child.label);
4361
4359
  const configCtrl2 = configControls?.find((c) => c.id === ctrl.id);
4362
4360
  const configChild = configCtrl2?.children?.find((c) => c.id === child.id);
4363
4361
  if (configChild?.onClick) {
@@ -4411,7 +4409,7 @@ function renderControlsGroup(parent, layout, palette, groupBg, pillBorder, callb
4411
4409
  } else {
4412
4410
  entryG.append("circle").attr("cx", tl.dotCx).attr("cy", tl.dotCy).attr("r", LEGEND_TOGGLE_DOT_R).attr("fill", "none").attr("stroke", palette.textMuted).attr("stroke-width", 1);
4413
4411
  }
4414
- entryG.append("text").attr("x", tl.textX).attr("y", tl.textY).attr("dominant-baseline", "central").attr("font-size", LEGEND_ENTRY_FONT_SIZE).attr("fill", palette.textMuted).attr("opacity", tl.active ? 1 : LEGEND_TOGGLE_OFF_OPACITY).attr("font-family", FONT_FAMILY).text(tl.label);
4412
+ entryG.append("text").attr("x", tl.textX).attr("y", tl.textY).call(centerText).attr("font-size", LEGEND_ENTRY_FONT_SIZE).attr("fill", palette.textMuted).attr("opacity", tl.active ? 1 : LEGEND_TOGGLE_OFF_OPACITY).attr("font-family", FONT_FAMILY).text(tl.label);
4415
4413
  if (callbacks?.onControlsToggle && toggle) {
4416
4414
  const cb = callbacks.onControlsToggle;
4417
4415
  const id = tl.id;
@@ -4424,6 +4422,7 @@ function renderControlsGroup(parent, layout, palette, groupBg, pillBorder, callb
4424
4422
  }
4425
4423
  }
4426
4424
  }
4425
+ var LEGEND_TEXT_DY;
4427
4426
  var init_legend_d3 = __esm({
4428
4427
  "src/utils/legend-d3.ts"() {
4429
4428
  "use strict";
@@ -4431,6 +4430,7 @@ var init_legend_d3 = __esm({
4431
4430
  init_legend_layout();
4432
4431
  init_color_utils();
4433
4432
  init_fonts();
4433
+ LEGEND_TEXT_DY = "0.32em";
4434
4434
  }
4435
4435
  });
4436
4436
 
@@ -4681,7 +4681,6 @@ var init_arrows = __esm({
4681
4681
  var parser_exports = {};
4682
4682
  __export(parser_exports, {
4683
4683
  isSequenceBlock: () => isSequenceBlock,
4684
- isSequenceMessage: () => isSequenceMessage,
4685
4684
  isSequenceNote: () => isSequenceNote,
4686
4685
  isSequenceSection: () => isSequenceSection,
4687
4686
  looksLikeSequence: () => looksLikeSequence,
@@ -4697,9 +4696,6 @@ function isHardRemovedToken(remainder) {
4697
4696
  }
4698
4697
  return { removed: false };
4699
4698
  }
4700
- function isSequenceMessage(el) {
4701
- return el.kind === "message";
4702
- }
4703
4699
  function isSequenceBlock(el) {
4704
4700
  return el.kind === "block";
4705
4701
  }
@@ -16407,6 +16403,9 @@ function parseMap(content) {
16407
16403
  break;
16408
16404
  // ── Cosmetic `no-*` opt-outs: bare flags, idempotent (mirror `no-legend`,
16409
16405
  // no dup warning); each defaults the feature ON when absent. ──
16406
+ case "no-title":
16407
+ d.noTitle = true;
16408
+ break;
16410
16409
  case "no-legend":
16411
16410
  d.noLegend = true;
16412
16411
  break;
@@ -16428,6 +16427,9 @@ function parseMap(content) {
16428
16427
  case "no-colorize":
16429
16428
  d.noColorize = true;
16430
16429
  break;
16430
+ case "no-cluster-pois":
16431
+ d.noClusterPois = true;
16432
+ break;
16431
16433
  }
16432
16434
  }
16433
16435
  function handleTag(trimmed, line12) {
@@ -16729,13 +16731,15 @@ var init_parser12 = __esm({
16729
16731
  "locale",
16730
16732
  "active-tag",
16731
16733
  "caption",
16734
+ "no-title",
16732
16735
  "no-legend",
16733
16736
  "no-coastline",
16734
16737
  "no-relief",
16735
16738
  "no-context-labels",
16736
16739
  "no-region-labels",
16737
16740
  "no-poi-labels",
16738
- "no-colorize"
16741
+ "no-colorize",
16742
+ "no-cluster-pois"
16739
16743
  ]);
16740
16744
  }
16741
16745
  });
@@ -37445,18 +37449,10 @@ var init_layout11 = __esm({
37445
37449
  // src/pert/renderer.ts
37446
37450
  var renderer_exports11 = {};
37447
37451
  __export(renderer_exports11, {
37448
- PERT_LEGEND_PILL_HEIGHT: () => PERT_LEGEND_PILL_HEIGHT,
37449
- highlightPertCriticalPath: () => highlightPertCriticalPath,
37450
- highlightPertSet: () => highlightPertSet,
37451
37452
  measurePertAnalysisBlock: () => measurePertAnalysisBlock,
37452
- pertLegendBlockWidth: () => pertLegendBlockWidth,
37453
- pertLegendEntries: () => pertLegendEntries,
37454
- renderLegendBlock: () => renderLegendBlock,
37455
37453
  renderPert: () => renderPert,
37456
37454
  renderPertAnalysisBlock: () => renderPertAnalysisBlock,
37457
- renderPertForExport: () => renderPertForExport,
37458
- resetPertCriticalPath: () => resetPertCriticalPath,
37459
- resetPertHighlight: () => resetPertHighlight
37455
+ renderPertForExport: () => renderPertForExport
37460
37456
  });
37461
37457
  import * as d3Selection12 from "d3-selection";
37462
37458
  import * as d3Shape8 from "d3-shape";
@@ -37541,16 +37537,14 @@ function renderPert(container, resolved, layout, palette, isDark, options = {})
37541
37537
  const standaloneFieldLegendWidthForExport = layout.width;
37542
37538
  const analysisBlockHeight = analysisLayer.analysisHasContent ? CAPTION_TOP_GAP + analysisLayer.analysisRowHeight : 0;
37543
37539
  const fieldLegendBlockHeight = analysisLayer.fieldLegendStandalone ? CAPTION_TOP_GAP + fieldLegendHeightFor(standaloneFieldLegendWidthForExport) : 0;
37544
- const showTopLegend = options.showTopLegend ?? true;
37545
- const legendEntries = showTopLegend ? pertLegendEntries(resolved) : [];
37540
+ const showLegend = options.showLegend ?? true;
37546
37541
  const tagLegendActive = resolveActiveTagGroup(
37547
37542
  resolved.tagGroups,
37548
37543
  resolved.options.activeTag,
37549
37544
  options.activeTagOverride
37550
37545
  );
37551
- const showTagLegend = showTopLegend && resolved.tagGroups.length > 0;
37552
- const tagLegendBlockHeight = showTagLegend ? LEGEND_PILL_HEIGHT + LEGEND_BOTTOM_GAP : 0;
37553
- 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;
37554
37548
  const naturalChartWidth = layout.width + DIAGRAM_PADDING11 * 2;
37555
37549
  const minAnalysisRowW = analysisLayer.analysisHasContent ? analysisLayer.minContentWidth + 2 * DIAGRAM_PADDING11 : 0;
37556
37550
  const naturalWidth = Math.max(naturalChartWidth, minAnalysisRowW);
@@ -37573,8 +37567,7 @@ function renderPert(container, resolved, layout, palette, isDark, options = {})
37573
37567
  const sLegendTopGap = ctx.aesthetic(LEGEND_TOP_GAP);
37574
37568
  const sLegendBottomGap = ctx.aesthetic(LEGEND_BOTTOM_GAP);
37575
37569
  const sLegendPillHeight = ctx.structural(LEGEND_PILL_HEIGHT);
37576
- const sTagLegendBlockHeight = showTagLegend ? sLegendPillHeight + sLegendBottomGap : 0;
37577
- const sLegendBlockHeight = (legendEntries.length > 0 ? sLegendTopGap + sLegendPillHeight + sLegendBottomGap : 0) + sTagLegendBlockHeight;
37570
+ const sLegendBlockHeight = showTagLegend ? sLegendTopGap + sLegendPillHeight + sLegendBottomGap : 0;
37578
37571
  const sNodeRadius = ctx.structural(NODE_RADIUS2);
37579
37572
  const sNodeStrokeWidth = ctx.structural(NODE_STROKE_WIDTH10);
37580
37573
  const sNodeFontSize = ctx.text(NODE_FONT_SIZE4);
@@ -37606,17 +37599,8 @@ function renderPert(container, resolved, layout, palette, isDark, options = {})
37606
37599
  }
37607
37600
  const offsetX = Math.max(sDiagramPad, (svgW - layout.width) / 2);
37608
37601
  const offsetY = sDiagramPad + sTitleHeight + sLegendBlockHeight;
37609
- if (legendEntries.length > 0) {
37610
- renderLegendBlock(svg, legendEntries, {
37611
- x: 0,
37612
- y: sDiagramPad + sTitleHeight + sLegendTopGap,
37613
- width: svgW,
37614
- palette,
37615
- isDark
37616
- });
37617
- }
37618
37602
  if (showTagLegend) {
37619
- const tagLegendY = sDiagramPad + sTitleHeight + (legendEntries.length > 0 ? sLegendTopGap + sLegendPillHeight : sLegendTopGap);
37603
+ const tagLegendY = sDiagramPad + sTitleHeight + sLegendTopGap;
37620
37604
  renderTagLegendRow(svg, resolved, palette, isDark, {
37621
37605
  x: 0,
37622
37606
  y: tagLegendY,
@@ -37700,8 +37684,7 @@ function renderPertForExport(content, theme, palette, now) {
37700
37684
  }
37701
37685
  const captionBoxHeight = captionBullets.length > 0 ? captionBullets.length * CAPTION_LINE_HEIGHT + 2 * CAPTION_BOX_PADDING_Y + CAPTION_HEADER_BAND_HEIGHT : 0;
37702
37686
  const captionBlockHeight = captionBullets.length > 0 ? CAPTION_TOP_GAP + captionBoxHeight : 0;
37703
- const legendEntries = pertLegendEntries(resolved);
37704
- 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;
37705
37688
  const exportWidth = layout.width + DIAGRAM_PADDING11 * 2;
37706
37689
  const exportHeight = layout.height + DIAGRAM_PADDING11 * 2 + titleHeight + legendBlockHeight + captionBlockHeight;
37707
37690
  const container = document.createElement("div");
@@ -38241,22 +38224,22 @@ function renderEdges2(root, resolved, layout, palette, collapsedSet, sc = {}) {
38241
38224
  if (srcGroup && tgtGroup && srcGroup === tgtGroup && collapsedSet.has(srcGroup)) {
38242
38225
  continue;
38243
38226
  }
38244
- const isCritical2 = criticalSet.has(e.source) && criticalSet.has(e.target);
38227
+ const isCritical = criticalSet.has(e.source) && criticalSet.has(e.target);
38245
38228
  let band;
38246
38229
  if (mcOn) {
38247
38230
  const sc2 = critById.get(e.source);
38248
38231
  const tc = critById.get(e.target);
38249
38232
  const minC = sc2 === null || tc === null || sc2 === void 0 || tc === void 0 ? null : Math.min(sc2, tc);
38250
38233
  band = criticalityBand(minC);
38251
- if (band === null && isCritical2) band = "red";
38234
+ if (band === null && isCritical) band = "red";
38252
38235
  } else {
38253
- band = isCritical2 ? "red" : null;
38236
+ band = isCritical ? "red" : null;
38254
38237
  }
38255
38238
  const path = lineGenerator6(e.points);
38256
38239
  if (!path) continue;
38257
38240
  const sESW = sc.edgeStrokeWidth ?? EDGE_STROKE_WIDTH10;
38258
38241
  const sELFS = sc.edgeLabelFontSize ?? 10;
38259
- 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 ?? "");
38260
38243
  const parsedEdge = edgeByKey.get(`${e.source}->${e.target}`);
38261
38244
  const labelText = parsedEdge ? formatEdgeLabel(parsedEdge) : null;
38262
38245
  if (labelText) {
@@ -38308,7 +38291,7 @@ function renderNodes2(root, _defs, resolved, layout, palette, isDark, sizing, on
38308
38291
  const r = byId.get(node.id);
38309
38292
  if (!r) continue;
38310
38293
  if (r.activity.groupId && collapsedSet.has(r.activity.groupId)) continue;
38311
- const isCritical2 = r.isCriticalPath;
38294
+ const isCritical = r.isCriticalPath;
38312
38295
  const isTbd = tbdSet.has(node.id);
38313
38296
  const dashArray = isTbd ? "4,3" : "none";
38314
38297
  const isTopMu = topMuIds.has(node.id);
@@ -38316,14 +38299,14 @@ function renderNodes2(root, _defs, resolved, layout, palette, isDark, sizing, on
38316
38299
  let band;
38317
38300
  if (mcOn) {
38318
38301
  band = criticalityBand(r.criticality);
38319
- if (band === null && isCritical2) band = "red";
38302
+ if (band === null && isCritical) band = "red";
38320
38303
  } else {
38321
- band = isCritical2 ? "red" : null;
38304
+ band = isCritical ? "red" : null;
38322
38305
  }
38323
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(
38324
38307
  "data-group-id",
38325
38308
  r.activity.groupId !== void 0 ? r.activity.groupId : ""
38326
- ).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" : "");
38327
38310
  if (r.activity.tags) {
38328
38311
  for (const [tagKey, tagValue] of Object.entries(r.activity.tags)) {
38329
38312
  g.attr(`data-tag-${tagKey}`, String(tagValue).toLowerCase());
@@ -38633,69 +38616,6 @@ function computeAnchorPinSet(resolved) {
38633
38616
  }
38634
38617
  return pinned;
38635
38618
  }
38636
- function isCritical(el, mcOn) {
38637
- if (mcOn) {
38638
- return HIGHLIGHT_BANDS.has(el.getAttribute("data-criticality-band") ?? "");
38639
- }
38640
- return el.getAttribute("data-critical-path") === "true";
38641
- }
38642
- function isInHighlightSet(el, kind, mcOn) {
38643
- if (kind === "critical") return isCritical(el, mcOn);
38644
- if (kind === "milestone") {
38645
- return el.getAttribute("data-milestone") === "true";
38646
- }
38647
- return el.hasAttribute("data-anchor");
38648
- }
38649
- function highlightPertSet(container, kind) {
38650
- const svg = container.querySelector("svg");
38651
- if (!svg) return;
38652
- const mcOn = Array.from(svg.querySelectorAll(".pert-edge")).some((e) => {
38653
- const b = e.getAttribute("data-criticality-band");
38654
- return b !== null && b !== "" && b !== "red";
38655
- });
38656
- const candidates = svg.querySelectorAll(
38657
- ".pert-node, .pert-edge, .pert-group-collapsed"
38658
- );
38659
- let anyMatch = false;
38660
- for (const el of candidates) {
38661
- if (isInHighlightSet(el, kind, mcOn)) {
38662
- anyMatch = true;
38663
- break;
38664
- }
38665
- }
38666
- if (!anyMatch) return;
38667
- svg.setAttribute("data-pert-highlight-active", kind);
38668
- for (const el of svg.querySelectorAll(".pert-node, .pert-edge")) {
38669
- el.setAttribute(
38670
- "opacity",
38671
- isInHighlightSet(el, kind, mcOn) ? "1" : String(FADE_OPACITY)
38672
- );
38673
- }
38674
- for (const el of svg.querySelectorAll(".pert-group")) {
38675
- const inSet = el.classList.contains("pert-group-collapsed") && isInHighlightSet(el, kind, mcOn);
38676
- el.setAttribute(
38677
- "opacity",
38678
- inSet ? "1" : String(FADE_OPACITY)
38679
- );
38680
- }
38681
- }
38682
- function highlightPertCriticalPath(container) {
38683
- highlightPertSet(container, "critical");
38684
- }
38685
- function resetPertHighlight(container) {
38686
- const svg = container.querySelector("svg");
38687
- if (!svg) return;
38688
- svg.removeAttribute("data-pert-highlight-active");
38689
- svg.removeAttribute("data-critical-path-active");
38690
- for (const el of svg.querySelectorAll(
38691
- ".pert-node, .pert-edge, .pert-group"
38692
- )) {
38693
- el.removeAttribute("opacity");
38694
- }
38695
- }
38696
- function resetPertCriticalPath(container) {
38697
- resetPertHighlight(container);
38698
- }
38699
38619
  function anchorAnnotationText(resolved) {
38700
38620
  const anchor = resolved.options.anchor;
38701
38621
  if (anchor === null) return null;
@@ -38748,70 +38668,6 @@ function renderCaptionBlock(svg, bullets, args) {
38748
38668
  if (i > 0) tspan.attr("dy", CAPTION_LINE_HEIGHT);
38749
38669
  });
38750
38670
  }
38751
- function pertLegendEntries(resolved) {
38752
- const entries = [];
38753
- if (resolved.activities.length > 0) {
38754
- entries.push({ kind: "critical", label: "Critical Path" });
38755
- }
38756
- if (resolved.options.anchor !== null) {
38757
- entries.push({ kind: "anchor", label: "Anchor" });
38758
- }
38759
- if (resolved.activities.some((a) => a.activity.isMilestone)) {
38760
- entries.push({ kind: "milestone", label: "Milestone" });
38761
- }
38762
- return entries;
38763
- }
38764
- function legendSwatchWidth(kind) {
38765
- if (kind === "critical") return LEGEND_DOT_R * 2;
38766
- if (kind === "anchor") return PIN_ICON_W;
38767
- return LEGEND_FONT_SIZE;
38768
- }
38769
- function legendPillWidth(entry) {
38770
- const labelW = measureLegendText(entry.label, LEGEND_FONT_SIZE);
38771
- return Math.ceil(
38772
- LEGEND_PILL_PADDING_X + legendSwatchWidth(entry.kind) + LEGEND_SWATCH_GAP + labelW + LEGEND_PILL_PADDING_X
38773
- );
38774
- }
38775
- function legendNaturalWidth(entries) {
38776
- if (entries.length === 0) return 0;
38777
- let total = 0;
38778
- for (const e of entries) total += legendPillWidth(e);
38779
- total += (entries.length - 1) * LEGEND_PILL_GAP;
38780
- return total;
38781
- }
38782
- function pertLegendBlockWidth(entries) {
38783
- return legendNaturalWidth(entries);
38784
- }
38785
- function renderLegendBlock(svg, entries, args) {
38786
- if (entries.length === 0) return;
38787
- const { x, y, width, palette, isDark } = args;
38788
- const groupBg = isDark ? mix(palette.surface, palette.bg, 50) : mix(palette.surface, palette.bg, 30);
38789
- const block = svg.append("g").attr("class", "pert-legend").attr("data-pert-legend", "");
38790
- const totalW = legendNaturalWidth(entries);
38791
- let pillX = x + (width - totalW) / 2;
38792
- for (const entry of entries) {
38793
- const pillW = legendPillWidth(entry);
38794
- const pill = block.append("g").attr("class", "pert-legend-entry").attr("data-legend-entry", entry.kind).attr("transform", `translate(${pillX}, ${y})`).style("cursor", "pointer");
38795
- 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);
38796
- const swatchW = legendSwatchWidth(entry.kind);
38797
- const swatchCx = LEGEND_PILL_PADDING_X + swatchW / 2;
38798
- const swatchCy = LEGEND_PILL_HEIGHT / 2;
38799
- if (entry.kind === "critical") {
38800
- pill.append("circle").attr("class", "pert-legend-swatch").attr("cx", swatchCx).attr("cy", swatchCy).attr("r", LEGEND_DOT_R).attr("fill", palette.colors.red);
38801
- } else if (entry.kind === "anchor") {
38802
- drawAnchorPin(
38803
- pill,
38804
- swatchCx - PIN_ICON_W / 2,
38805
- swatchCy,
38806
- palette.textMuted
38807
- );
38808
- } else {
38809
- 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");
38810
- }
38811
- 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);
38812
- pillX += pillW + LEGEND_PILL_GAP;
38813
- }
38814
- }
38815
38671
  function renderTagLegendRow(svg, resolved, palette, isDark, args) {
38816
38672
  if (resolved.tagGroups.length === 0) return;
38817
38673
  const { x, y, width, activeGroup, exportMode } = args;
@@ -39258,7 +39114,7 @@ function formatScurveDate(iso) {
39258
39114
  if (month < 0 || month > 11 || isNaN(day)) return iso;
39259
39115
  return `${SCURVE_MONTH_NAMES[month]} ${day}`;
39260
39116
  }
39261
- 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;
39262
39118
  var init_renderer11 = __esm({
39263
39119
  "src/pert/renderer.ts"() {
39264
39120
  "use strict";
@@ -39287,15 +39143,10 @@ var init_renderer11 = __esm({
39287
39143
  CONTAINER_LABEL_FONT_SIZE3 = 13;
39288
39144
  CONTAINER_HEADER_HEIGHT3 = 28;
39289
39145
  COLLAPSE_BAR_HEIGHT7 = 6;
39290
- FADE_OPACITY = 0.15;
39291
39146
  DURATION_FADE_OPACITY = 0.55;
39292
39147
  PIN_ICON_W = 13;
39293
39148
  PIN_ICON_H = 13;
39294
39149
  LEGEND_PILL_HEIGHT = LEGEND_HEIGHT;
39295
- LEGEND_PILL_PADDING_X = 8;
39296
- LEGEND_PILL_GAP = 8;
39297
- LEGEND_SWATCH_GAP = LEGEND_ENTRY_DOT_GAP;
39298
- LEGEND_FONT_SIZE = LEGEND_PILL_FONT_SIZE;
39299
39150
  LEGEND_TOP_GAP = 12;
39300
39151
  LEGEND_BOTTOM_GAP = 12;
39301
39152
  FIELD_LEGEND_HEADER_BAND_HEIGHT = 26;
@@ -39332,7 +39183,6 @@ var init_renderer11 = __esm({
39332
39183
  ];
39333
39184
  lineGenerator6 = d3Shape8.line().x((d) => d.x).y((d) => d.y).curve(d3Shape8.curveBasis);
39334
39185
  FIELD_LEGEND_MIN_W = 220;
39335
- HIGHLIGHT_BANDS = /* @__PURE__ */ new Set(["red", "orange", "yellow"]);
39336
39186
  SUB_BULLET_INDENT = 20;
39337
39187
  CAPTION_HEADER_BAND_HEIGHT = CAPTION_LINE_HEIGHT + 8;
39338
39188
  TORNADO_TOP_N = 10;
@@ -39352,7 +39202,6 @@ var init_renderer11 = __esm({
39352
39202
  SCURVE_PLOT_PADDING_BOTTOM = 44;
39353
39203
  SCURVE_TICK_FONT_SIZE = 13;
39354
39204
  SCURVE_PERCENTILE_RADIUS = 4;
39355
- PERT_LEGEND_PILL_HEIGHT = LEGEND_PILL_HEIGHT;
39356
39205
  DAYS_PER_UNIT = {
39357
39206
  min: 1 / (60 * 24),
39358
39207
  h: 1 / 24,
@@ -40879,31 +40728,31 @@ function renderGantt(container, resolved, palette, isDark, options, exportDims)
40879
40728
  todayHoverG.on("mouseenter", () => {
40880
40729
  g.selectAll(".gantt-task").attr(
40881
40730
  "opacity",
40882
- FADE_OPACITY2
40731
+ FADE_OPACITY
40883
40732
  );
40884
40733
  g.selectAll(".gantt-milestone").attr(
40885
40734
  "opacity",
40886
- FADE_OPACITY2
40735
+ FADE_OPACITY
40887
40736
  );
40888
40737
  g.selectAll(
40889
40738
  ".gantt-group-bar, .gantt-group-summary"
40890
- ).attr("opacity", FADE_OPACITY2);
40891
- svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY2);
40892
- svg.selectAll(".gantt-task-label").attr("opacity", FADE_OPACITY2);
40893
- 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);
40894
40743
  g.selectAll(
40895
40744
  ".gantt-lane-band, .gantt-lane-accent, .gantt-lane-band-group"
40896
- ).attr("opacity", FADE_OPACITY2);
40745
+ ).attr("opacity", FADE_OPACITY);
40897
40746
  g.selectAll(
40898
40747
  ".gantt-dep-arrow, .gantt-dep-arrowhead"
40899
- ).attr("opacity", FADE_OPACITY2);
40748
+ ).attr("opacity", FADE_OPACITY);
40900
40749
  g.selectAll(".gantt-era-group").attr(
40901
40750
  "opacity",
40902
- FADE_OPACITY2
40751
+ FADE_OPACITY
40903
40752
  );
40904
40753
  g.selectAll(".gantt-marker-group").attr(
40905
40754
  "opacity",
40906
- FADE_OPACITY2
40755
+ FADE_OPACITY
40907
40756
  );
40908
40757
  showGanttDateIndicators(
40909
40758
  g,
@@ -41135,28 +40984,28 @@ function applyCriticalPathHighlight(svg, chartG) {
41135
40984
  const el = d3Selection13.select(this);
41136
40985
  el.attr(
41137
40986
  "opacity",
41138
- el.attr("data-critical-path") === "true" ? 1 : FADE_OPACITY2
40987
+ el.attr("data-critical-path") === "true" ? 1 : FADE_OPACITY
41139
40988
  );
41140
40989
  });
41141
- chartG.selectAll(".gantt-milestone").attr("opacity", FADE_OPACITY2);
41142
- 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);
41143
40992
  svg.selectAll(".gantt-task-label").each(function() {
41144
40993
  const el = d3Selection13.select(this);
41145
40994
  el.attr(
41146
40995
  "opacity",
41147
- el.attr("data-critical-path") === "true" ? 1 : FADE_OPACITY2
40996
+ el.attr("data-critical-path") === "true" ? 1 : FADE_OPACITY
41148
40997
  );
41149
40998
  });
41150
- svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY2);
41151
- svg.selectAll(".gantt-group-band-bg, .gantt-group-band-accent").attr("opacity", FADE_OPACITY2);
41152
- svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY2);
41153
- svg.selectAll(".gantt-lane-band-bg, .gantt-lane-band-accent").attr("opacity", FADE_OPACITY2);
41154
- 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);
41155
41004
  chartG.selectAll(".gantt-dep-arrow, .gantt-dep-arrowhead").each(function() {
41156
41005
  const el = d3Selection13.select(this);
41157
41006
  el.attr(
41158
41007
  "opacity",
41159
- el.attr("data-critical-path") === "true" ? 0.7 : FADE_OPACITY2
41008
+ el.attr("data-critical-path") === "true" ? 0.7 : FADE_OPACITY
41160
41009
  );
41161
41010
  });
41162
41011
  }
@@ -41335,27 +41184,27 @@ function renderTagLegend(svg, chartG, tagGroups, activeGroupName, chartLeftMargi
41335
41184
  const el = d3Selection13.select(this);
41336
41185
  el.attr(
41337
41186
  "opacity",
41338
- el.attr(`data-tag-${tagKey}`) === ev ? 1 : FADE_OPACITY2
41187
+ el.attr(`data-tag-${tagKey}`) === ev ? 1 : FADE_OPACITY
41339
41188
  );
41340
41189
  });
41341
- chartG.selectAll(".gantt-milestone").attr("opacity", FADE_OPACITY2);
41342
- 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);
41343
41192
  svg.selectAll(".gantt-task-label").each(function() {
41344
41193
  const el = d3Selection13.select(this);
41345
41194
  el.attr(
41346
41195
  "opacity",
41347
- el.attr(`data-tag-${tagKey}`) === ev ? 1 : FADE_OPACITY2
41196
+ el.attr(`data-tag-${tagKey}`) === ev ? 1 : FADE_OPACITY
41348
41197
  );
41349
41198
  });
41350
- svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY2);
41199
+ svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY);
41351
41200
  svg.selectAll(".gantt-lane-header").each(function() {
41352
41201
  const el = d3Selection13.select(this);
41353
41202
  el.attr(
41354
41203
  "opacity",
41355
- el.attr(`data-tag-${tagKey}`) === ev ? 1 : FADE_OPACITY2
41204
+ el.attr(`data-tag-${tagKey}`) === ev ? 1 : FADE_OPACITY
41356
41205
  );
41357
41206
  });
41358
- 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);
41359
41208
  } else {
41360
41209
  if (criticalPathActive) {
41361
41210
  applyCriticalPathHighlight(svg, chartG);
@@ -41460,27 +41309,27 @@ function renderErasAndMarkers(g, svg, resolved, xScale, innerHeight, palette, er
41460
41309
  eraG.on("mouseenter", () => {
41461
41310
  g.selectAll(".gantt-task").attr(
41462
41311
  "opacity",
41463
- FADE_OPACITY2
41312
+ FADE_OPACITY
41464
41313
  );
41465
41314
  g.selectAll(".gantt-milestone").attr(
41466
41315
  "opacity",
41467
- FADE_OPACITY2
41316
+ FADE_OPACITY
41468
41317
  );
41469
41318
  g.selectAll(
41470
41319
  ".gantt-group-bar, .gantt-group-summary"
41471
- ).attr("opacity", FADE_OPACITY2);
41472
- svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY2);
41473
- svg.selectAll(".gantt-task-label").attr("opacity", FADE_OPACITY2);
41474
- 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);
41475
41324
  g.selectAll(
41476
41325
  ".gantt-lane-band, .gantt-lane-accent, .gantt-lane-band-group"
41477
- ).attr("opacity", FADE_OPACITY2);
41326
+ ).attr("opacity", FADE_OPACITY);
41478
41327
  g.selectAll(
41479
41328
  ".gantt-dep-arrow, .gantt-dep-arrowhead"
41480
- ).attr("opacity", FADE_OPACITY2);
41329
+ ).attr("opacity", FADE_OPACITY);
41481
41330
  g.selectAll(".gantt-marker-group").attr(
41482
41331
  "opacity",
41483
- FADE_OPACITY2
41332
+ FADE_OPACITY
41484
41333
  );
41485
41334
  eraRect.attr("opacity", hoverEraOpacity);
41486
41335
  if (eraTruncated) eraLabel.text(era.label);
@@ -41538,31 +41387,31 @@ function renderErasAndMarkers(g, svg, resolved, xScale, innerHeight, palette, er
41538
41387
  markerG.on("mouseenter", () => {
41539
41388
  g.selectAll(".gantt-task").attr(
41540
41389
  "opacity",
41541
- FADE_OPACITY2
41390
+ FADE_OPACITY
41542
41391
  );
41543
41392
  g.selectAll(".gantt-milestone").attr(
41544
41393
  "opacity",
41545
- FADE_OPACITY2
41394
+ FADE_OPACITY
41546
41395
  );
41547
41396
  g.selectAll(
41548
41397
  ".gantt-group-bar, .gantt-group-summary"
41549
- ).attr("opacity", FADE_OPACITY2);
41550
- svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY2);
41551
- svg.selectAll(".gantt-task-label").attr("opacity", FADE_OPACITY2);
41552
- 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);
41553
41402
  g.selectAll(
41554
41403
  ".gantt-lane-band, .gantt-lane-accent, .gantt-lane-band-group"
41555
- ).attr("opacity", FADE_OPACITY2);
41404
+ ).attr("opacity", FADE_OPACITY);
41556
41405
  g.selectAll(
41557
41406
  ".gantt-dep-arrow, .gantt-dep-arrowhead"
41558
- ).attr("opacity", FADE_OPACITY2);
41407
+ ).attr("opacity", FADE_OPACITY);
41559
41408
  g.selectAll(".gantt-era-group").attr(
41560
41409
  "opacity",
41561
- FADE_OPACITY2
41410
+ FADE_OPACITY
41562
41411
  );
41563
41412
  g.selectAll(".gantt-marker-group").attr(
41564
41413
  "opacity",
41565
- FADE_OPACITY2
41414
+ FADE_OPACITY
41566
41415
  );
41567
41416
  markerG.attr("opacity", 1);
41568
41417
  markerLine.attr("opacity", 0.8);
@@ -41638,7 +41487,7 @@ function renderSprintBands(g, svg, resolved, xScale, innerHeight, palette) {
41638
41487
  const id = el.attr("data-task-id");
41639
41488
  el.attr(
41640
41489
  "opacity",
41641
- id && overlappingTaskIds.has(id) ? 1 : FADE_OPACITY2
41490
+ id && overlappingTaskIds.has(id) ? 1 : FADE_OPACITY
41642
41491
  );
41643
41492
  });
41644
41493
  g.selectAll(".gantt-milestone").each(function() {
@@ -41646,7 +41495,7 @@ function renderSprintBands(g, svg, resolved, xScale, innerHeight, palette) {
41646
41495
  const id = el.attr("data-task-id");
41647
41496
  el.attr(
41648
41497
  "opacity",
41649
- id && overlappingTaskIds.has(id) ? 1 : FADE_OPACITY2
41498
+ id && overlappingTaskIds.has(id) ? 1 : FADE_OPACITY
41650
41499
  );
41651
41500
  });
41652
41501
  svg.selectAll(".gantt-task-label").each(function() {
@@ -41654,7 +41503,7 @@ function renderSprintBands(g, svg, resolved, xScale, innerHeight, palette) {
41654
41503
  const id = el.attr("data-task-id");
41655
41504
  el.attr(
41656
41505
  "opacity",
41657
- id && overlappingTaskIds.has(id) ? 1 : FADE_OPACITY2
41506
+ id && overlappingTaskIds.has(id) ? 1 : FADE_OPACITY
41658
41507
  );
41659
41508
  });
41660
41509
  g.selectAll(
@@ -41664,7 +41513,7 @@ function renderSprintBands(g, svg, resolved, xScale, innerHeight, palette) {
41664
41513
  const name = el.attr("data-group");
41665
41514
  el.attr(
41666
41515
  "opacity",
41667
- name && overlappingGroupNames.has(name) ? 1 : FADE_OPACITY2
41516
+ name && overlappingGroupNames.has(name) ? 1 : FADE_OPACITY
41668
41517
  );
41669
41518
  });
41670
41519
  svg.selectAll(".gantt-group-label").each(function() {
@@ -41672,19 +41521,19 @@ function renderSprintBands(g, svg, resolved, xScale, innerHeight, palette) {
41672
41521
  const name = el.attr("data-group");
41673
41522
  el.attr(
41674
41523
  "opacity",
41675
- name && overlappingGroupNames.has(name) ? 1 : FADE_OPACITY2
41524
+ name && overlappingGroupNames.has(name) ? 1 : FADE_OPACITY
41676
41525
  );
41677
41526
  });
41678
- svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY2);
41527
+ svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY);
41679
41528
  g.selectAll(
41680
41529
  ".gantt-lane-band, .gantt-lane-accent, .gantt-lane-band-group"
41681
- ).attr("opacity", FADE_OPACITY2);
41530
+ ).attr("opacity", FADE_OPACITY);
41682
41531
  g.selectAll(
41683
41532
  ".gantt-dep-arrow, .gantt-dep-arrowhead"
41684
- ).attr("opacity", FADE_OPACITY2);
41533
+ ).attr("opacity", FADE_OPACITY);
41685
41534
  g.selectAll(".gantt-marker-group").attr(
41686
41535
  "opacity",
41687
- FADE_OPACITY2
41536
+ FADE_OPACITY
41688
41537
  );
41689
41538
  sprintRect.attr("opacity", SPRINT_HOVER_OPACITY);
41690
41539
  const startVisible = rawSx >= chartMinX;
@@ -41753,20 +41602,20 @@ function highlightDeps(g, svg, taskId, resolved) {
41753
41602
  g.selectAll(".gantt-task").each(function() {
41754
41603
  const el = d3Selection13.select(this);
41755
41604
  const id = el.attr("data-task-id");
41756
- el.attr("opacity", id && related.has(id) ? 1 : FADE_OPACITY2);
41605
+ el.attr("opacity", id && related.has(id) ? 1 : FADE_OPACITY);
41757
41606
  });
41758
41607
  g.selectAll(".gantt-milestone").attr(
41759
41608
  "opacity",
41760
- FADE_OPACITY2
41609
+ FADE_OPACITY
41761
41610
  );
41762
41611
  g.selectAll(
41763
41612
  ".gantt-group-bar, .gantt-group-summary"
41764
- ).attr("opacity", FADE_OPACITY2);
41765
- svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY2);
41766
- 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);
41767
41616
  g.selectAll(".gantt-lane-band, .gantt-lane-accent").attr(
41768
41617
  "opacity",
41769
- FADE_OPACITY2
41618
+ FADE_OPACITY
41770
41619
  );
41771
41620
  g.selectAll(
41772
41621
  ".gantt-dep-arrow, .gantt-dep-arrowhead"
@@ -41775,52 +41624,52 @@ function highlightDeps(g, svg, taskId, resolved) {
41775
41624
  const from = el.attr("data-dep-from");
41776
41625
  const to = el.attr("data-dep-to");
41777
41626
  const isRelated = from && related.has(from) || to && related.has(to);
41778
- el.attr("opacity", isRelated ? 0.5 : FADE_OPACITY2);
41627
+ el.attr("opacity", isRelated ? 0.5 : FADE_OPACITY);
41779
41628
  });
41780
41629
  g.selectAll(".gantt-marker-group").attr(
41781
41630
  "opacity",
41782
- FADE_OPACITY2
41631
+ FADE_OPACITY
41783
41632
  );
41784
41633
  }
41785
41634
  function highlightGroup(g, svg, groupName) {
41786
41635
  g.selectAll(".gantt-task").each(function() {
41787
41636
  const el = d3Selection13.select(this);
41788
- el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY2);
41637
+ el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY);
41789
41638
  });
41790
41639
  g.selectAll(".gantt-milestone").each(function() {
41791
41640
  const el = d3Selection13.select(this);
41792
- el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY2);
41641
+ el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY);
41793
41642
  });
41794
41643
  g.selectAll(
41795
41644
  ".gantt-group-bar, .gantt-group-summary"
41796
41645
  ).each(function() {
41797
41646
  const el = d3Selection13.select(this);
41798
- el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY2);
41647
+ el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY);
41799
41648
  });
41800
41649
  svg.selectAll(".gantt-group-label").each(function() {
41801
41650
  const el = d3Selection13.select(this);
41802
- el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY2);
41651
+ el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY);
41803
41652
  });
41804
41653
  svg.selectAll(".gantt-task-label").each(function() {
41805
41654
  const el = d3Selection13.select(this);
41806
- el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY2);
41655
+ el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY);
41807
41656
  });
41808
41657
  svg.selectAll(".gantt-group-band-bg, .gantt-group-band-accent").each(function() {
41809
41658
  const el = d3Selection13.select(this);
41810
41659
  el.attr(
41811
41660
  "opacity",
41812
- el.attr("data-group") === groupName ? 1 : FADE_OPACITY2
41661
+ el.attr("data-group") === groupName ? 1 : FADE_OPACITY
41813
41662
  );
41814
41663
  });
41815
- svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY2);
41816
- 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);
41817
41666
  g.selectAll(".gantt-lane-band, .gantt-lane-accent").attr(
41818
41667
  "opacity",
41819
- FADE_OPACITY2
41668
+ FADE_OPACITY
41820
41669
  );
41821
41670
  g.selectAll(".gantt-marker-group").attr(
41822
41671
  "opacity",
41823
- FADE_OPACITY2
41672
+ FADE_OPACITY
41824
41673
  );
41825
41674
  }
41826
41675
  function highlightLane(g, svg, tagKey, laneName) {
@@ -41828,105 +41677,105 @@ function highlightLane(g, svg, tagKey, laneName) {
41828
41677
  const laneValue = laneName.toLowerCase();
41829
41678
  g.selectAll(".gantt-task").each(function() {
41830
41679
  const el = d3Selection13.select(this);
41831
- el.attr("opacity", el.attr(tagAttr) === laneValue ? 1 : FADE_OPACITY2);
41680
+ el.attr("opacity", el.attr(tagAttr) === laneValue ? 1 : FADE_OPACITY);
41832
41681
  });
41833
41682
  g.selectAll(".gantt-milestone").each(function() {
41834
41683
  const el = d3Selection13.select(this);
41835
- el.attr("opacity", el.attr(tagAttr) === laneValue ? 1 : FADE_OPACITY2);
41684
+ el.attr("opacity", el.attr(tagAttr) === laneValue ? 1 : FADE_OPACITY);
41836
41685
  });
41837
41686
  svg.selectAll(".gantt-task-label").each(function() {
41838
41687
  const el = d3Selection13.select(this);
41839
- el.attr("opacity", el.attr(tagAttr) === laneValue ? 1 : FADE_OPACITY2);
41688
+ el.attr("opacity", el.attr(tagAttr) === laneValue ? 1 : FADE_OPACITY);
41840
41689
  });
41841
41690
  svg.selectAll(".gantt-lane-header").each(function() {
41842
41691
  const el = d3Selection13.select(this);
41843
- el.attr("opacity", el.attr("data-lane") === laneName ? 1 : FADE_OPACITY2);
41692
+ el.attr("opacity", el.attr("data-lane") === laneName ? 1 : FADE_OPACITY);
41844
41693
  });
41845
41694
  g.selectAll(".gantt-lane-band-group").each(function() {
41846
41695
  const el = d3Selection13.select(this);
41847
- el.attr("opacity", el.attr("data-lane") === laneName ? 1 : FADE_OPACITY2);
41696
+ el.attr("opacity", el.attr("data-lane") === laneName ? 1 : FADE_OPACITY);
41848
41697
  });
41849
41698
  svg.selectAll(".gantt-lane-band-bg, .gantt-lane-band-accent").each(function() {
41850
41699
  const el = d3Selection13.select(this);
41851
- el.attr("opacity", el.attr("data-lane") === laneName ? 1 : FADE_OPACITY2);
41700
+ el.attr("opacity", el.attr("data-lane") === laneName ? 1 : FADE_OPACITY);
41852
41701
  });
41853
41702
  g.selectAll(
41854
41703
  ".gantt-group-bar, .gantt-group-summary"
41855
- ).attr("opacity", FADE_OPACITY2);
41856
- svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY2);
41857
- 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);
41858
41707
  g.selectAll(".gantt-marker-group").attr(
41859
41708
  "opacity",
41860
- FADE_OPACITY2
41709
+ FADE_OPACITY
41861
41710
  );
41862
41711
  }
41863
41712
  function highlightTask(g, svg, taskId) {
41864
41713
  g.selectAll(".gantt-task").each(function() {
41865
41714
  const el = d3Selection13.select(this);
41866
- 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);
41867
41716
  });
41868
41717
  g.selectAll(".gantt-milestone").attr(
41869
41718
  "opacity",
41870
- FADE_OPACITY2
41719
+ FADE_OPACITY
41871
41720
  );
41872
41721
  svg.selectAll(".gantt-task-label").each(function() {
41873
41722
  const el = d3Selection13.select(this);
41874
- 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);
41875
41724
  });
41876
41725
  g.selectAll(
41877
41726
  ".gantt-group-bar, .gantt-group-summary"
41878
- ).attr("opacity", FADE_OPACITY2);
41879
- svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY2);
41880
- svg.selectAll(".gantt-group-band-bg, .gantt-group-band-accent").attr("opacity", FADE_OPACITY2);
41881
- svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY2);
41882
- 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);
41883
41732
  g.selectAll(
41884
41733
  ".gantt-lane-band, .gantt-lane-accent, .gantt-lane-band-group"
41885
- ).attr("opacity", FADE_OPACITY2);
41734
+ ).attr("opacity", FADE_OPACITY);
41886
41735
  g.selectAll(
41887
41736
  ".gantt-dep-arrow, .gantt-dep-arrowhead"
41888
- ).attr("opacity", FADE_OPACITY2);
41737
+ ).attr("opacity", FADE_OPACITY);
41889
41738
  g.selectAll(".gantt-marker-group").attr(
41890
41739
  "opacity",
41891
- FADE_OPACITY2
41740
+ FADE_OPACITY
41892
41741
  );
41893
41742
  }
41894
41743
  function highlightMilestone(g, svg, taskId) {
41895
41744
  g.selectAll(".gantt-task").attr(
41896
41745
  "opacity",
41897
- FADE_OPACITY2
41746
+ FADE_OPACITY
41898
41747
  );
41899
41748
  g.selectAll(".gantt-milestone").each(function() {
41900
41749
  const el = d3Selection13.select(this);
41901
- 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);
41902
41751
  });
41903
41752
  svg.selectAll(".gantt-task-label").each(function() {
41904
41753
  const el = d3Selection13.select(this);
41905
- 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);
41906
41755
  });
41907
41756
  g.selectAll(
41908
41757
  ".gantt-group-bar, .gantt-group-summary"
41909
- ).attr("opacity", FADE_OPACITY2);
41910
- svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY2);
41911
- svg.selectAll(".gantt-group-band-bg, .gantt-group-band-accent").attr("opacity", FADE_OPACITY2);
41912
- svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY2);
41913
- 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);
41914
41763
  g.selectAll(
41915
41764
  ".gantt-lane-band, .gantt-lane-accent, .gantt-lane-band-group"
41916
- ).attr("opacity", FADE_OPACITY2);
41765
+ ).attr("opacity", FADE_OPACITY);
41917
41766
  g.selectAll(
41918
41767
  ".gantt-dep-arrow, .gantt-dep-arrowhead"
41919
- ).attr("opacity", FADE_OPACITY2);
41768
+ ).attr("opacity", FADE_OPACITY);
41920
41769
  g.selectAll(".gantt-marker-group").attr(
41921
41770
  "opacity",
41922
- FADE_OPACITY2
41771
+ FADE_OPACITY
41923
41772
  );
41924
41773
  }
41925
41774
  function highlightTaskLabel(svg, lineNumber) {
41926
41775
  const ln = String(lineNumber);
41927
41776
  svg.selectAll(".gantt-task-label").each(function() {
41928
41777
  const el = d3Selection13.select(this);
41929
- 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);
41930
41779
  });
41931
41780
  }
41932
41781
  function resetTaskLabels(svg) {
@@ -42200,7 +42049,7 @@ function renderTimeScaleHorizontal(g, scale, _innerWidth, innerHeight, textColor
42200
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);
42201
42050
  }
42202
42051
  }
42203
- 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;
42204
42053
  var init_renderer12 = __esm({
42205
42054
  "src/gantt/renderer.ts"() {
42206
42055
  "use strict";
@@ -42241,7 +42090,7 @@ var init_renderer12 = __esm({
42241
42090
  SPRINT_BAND_OPACITY = 0.05;
42242
42091
  SPRINT_HOVER_OPACITY = 0.12;
42243
42092
  SPRINT_BOUNDARY_OPACITY = 0.3;
42244
- FADE_OPACITY2 = 0.1;
42093
+ FADE_OPACITY = 0.1;
42245
42094
  MONTH_ABBR2 = [
42246
42095
  "Jan",
42247
42096
  "Feb",
@@ -47567,7 +47416,8 @@ function layoutMap(resolved, data, size, opts) {
47567
47416
  palette.bg,
47568
47417
  mutedBasemap ? isDark ? MUTED_FOREIGN_DARK : MUTED_FOREIGN_LIGHT : isDark ? FOREIGN_TINT_DARK : FOREIGN_TINT_LIGHT
47569
47418
  );
47570
- 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;
47571
47421
  const colorByIso = /* @__PURE__ */ new Map();
47572
47422
  if (colorizeActive) {
47573
47423
  const adjacency = /* @__PURE__ */ new Map();
@@ -47663,16 +47513,17 @@ function layoutMap(resolved, data, size, opts) {
47663
47513
  };
47664
47514
  }
47665
47515
  }
47516
+ const shownTitle = resolved.directives.noTitle ? null : resolved.title;
47666
47517
  const TITLE_GAP2 = 16;
47667
47518
  let topPad = FIT_PAD;
47668
- if (resolved.title && resolved.pois.length > 0) {
47519
+ if (shownTitle && resolved.pois.length > 0) {
47669
47520
  const bannerBottom = (resolved.subtitle ? TITLE_Y + TITLE_FONT_SIZE : TITLE_Y) + TITLE_FONT_SIZE / 2;
47670
47521
  topPad = Math.max(FIT_PAD, bannerBottom + TITLE_GAP2);
47671
47522
  }
47672
47523
  const legendBand = mapLegendBand(legend, {
47673
47524
  width,
47674
47525
  mode: opts.legendMode ?? "preview",
47675
- hasTitle: Boolean(resolved.title),
47526
+ hasTitle: Boolean(shownTitle),
47676
47527
  hasSubtitle: Boolean(resolved.subtitle)
47677
47528
  });
47678
47529
  if (legendBand > topPad) topPad = legendBand;
@@ -48761,7 +48612,7 @@ function layoutMap(resolved, data, size, opts) {
48761
48612
  width,
48762
48613
  height,
48763
48614
  background: water,
48764
- title: resolved.title,
48615
+ title: shownTitle,
48765
48616
  ...resolved.subtitle !== void 0 && { subtitle: resolved.subtitle },
48766
48617
  ...resolved.caption !== void 0 && { caption: resolved.caption },
48767
48618
  regions,
@@ -49170,9 +49021,10 @@ function renderMap(container, resolved, data, palette, isDark, onClickItem, expo
49170
49021
  wireSync(lt, leg.lineNumber);
49171
49022
  }
49172
49023
  });
49024
+ const clusterUi = !exportDims && !resolved.directives.noClusterPois;
49173
49025
  const gSpider = svg.append("g").attr("class", "dgmo-map-spider");
49174
49026
  for (const cl of layout.clusters) {
49175
- if (!exportDims) {
49027
+ if (clusterUi) {
49176
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");
49177
49029
  }
49178
49030
  for (const leg of cl.legs) {
@@ -49264,13 +49116,18 @@ function renderMap(container, resolved, data, palette, isDark, onClickItem, expo
49264
49116
  }
49265
49117
  wireSync(t, lab.lineNumber);
49266
49118
  }
49267
- if (!exportDims && layout.clusters.length) {
49119
+ if (clusterUi && layout.clusters.length) {
49268
49120
  const gBadge = svg.append("g").attr("class", "dgmo-map-cluster-badges");
49269
49121
  for (const cl of layout.clusters) {
49270
49122
  const g = gBadge.append("g").attr("data-cluster", cl.id).style("opacity", 0).style("pointer-events", "none");
49271
49123
  const R = 9;
49272
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);
49273
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
+ }
49274
49131
  emitText(
49275
49132
  g,
49276
49133
  cl.cx,
@@ -52195,10 +52052,12 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
52195
52052
  isDark ? 15 : 20
52196
52053
  ) : isDark ? palette.surface : palette.bg;
52197
52054
  const strokeColor = groupTagColor || palette.textMuted;
52198
- 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");
52199
52056
  groupG.append("title").text("Click to collapse");
52200
- 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");
52201
- 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);
52202
52061
  }
52203
52062
  const lifelineStartY = lifelineStartY0;
52204
52063
  participants.forEach((participant) => {
@@ -52240,7 +52099,7 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
52240
52099
  const participantG = svg.select(
52241
52100
  `.participant[data-participant-id="${participant.id}"]`
52242
52101
  );
52243
- 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");
52244
52103
  participantG.append("title").text("Click to expand");
52245
52104
  const pFill = effectiveTagColor ? mix(
52246
52105
  effectiveTagColor,
@@ -54223,7 +54082,7 @@ function renderArcDiagram(container, parsed, palette, _isDark, onClickItem, expo
54223
54082
  neighbors2.get(link.source).add(link.target);
54224
54083
  neighbors2.get(link.target).add(link.source);
54225
54084
  }
54226
- const FADE_OPACITY3 = 0.1;
54085
+ const FADE_OPACITY2 = 0.1;
54227
54086
  function handleMouseEnter(hovered) {
54228
54087
  const connected = neighbors2.get(hovered);
54229
54088
  g.selectAll(".arc-link").each(function() {
@@ -54231,13 +54090,13 @@ function renderArcDiagram(container, parsed, palette, _isDark, onClickItem, expo
54231
54090
  const src = el.attr("data-source");
54232
54091
  const tgt = el.attr("data-target");
54233
54092
  const isRelated = src === hovered || tgt === hovered;
54234
- el.attr("stroke-opacity", isRelated ? 0.85 : FADE_OPACITY3);
54093
+ el.attr("stroke-opacity", isRelated ? 0.85 : FADE_OPACITY2);
54235
54094
  });
54236
54095
  g.selectAll(".arc-node").each(function() {
54237
54096
  const el = d3Selection23.select(this);
54238
54097
  const name = el.attr("data-node");
54239
54098
  const isRelated = name === hovered || connected.has(name);
54240
- el.attr("opacity", isRelated ? 1 : FADE_OPACITY3);
54099
+ el.attr("opacity", isRelated ? 1 : FADE_OPACITY2);
54241
54100
  });
54242
54101
  }
54243
54102
  function handleMouseLeave() {
@@ -54261,11 +54120,11 @@ function renderArcDiagram(container, parsed, palette, _isDark, onClickItem, expo
54261
54120
  g.selectAll(".arc-link").each(function() {
54262
54121
  const el = d3Selection23.select(this);
54263
54122
  const isRelated = members.has(el.attr("data-source")) || members.has(el.attr("data-target"));
54264
- el.attr("stroke-opacity", isRelated ? 0.85 : FADE_OPACITY3);
54123
+ el.attr("stroke-opacity", isRelated ? 0.85 : FADE_OPACITY2);
54265
54124
  });
54266
54125
  g.selectAll(".arc-node").each(function() {
54267
54126
  const el = d3Selection23.select(this);
54268
- 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);
54269
54128
  });
54270
54129
  g.selectAll(".arc-group-band").each(function() {
54271
54130
  const el = d3Selection23.select(this);
@@ -54787,23 +54646,23 @@ function setupTimeline(container, parsed, palette, isDark, exportDims, activeTag
54787
54646
  };
54788
54647
  }
54789
54648
  function makeTimelineHoverHelpers() {
54790
- const FADE_OPACITY3 = 0.1;
54649
+ const FADE_OPACITY2 = 0.1;
54791
54650
  function fadeToGroup(g, groupName) {
54792
54651
  g.selectAll(".tl-event").each(function() {
54793
54652
  const el = d3Selection23.select(this);
54794
54653
  const evGroup = el.attr("data-group");
54795
- el.attr("opacity", evGroup === groupName ? 1 : FADE_OPACITY3);
54654
+ el.attr("opacity", evGroup === groupName ? 1 : FADE_OPACITY2);
54796
54655
  });
54797
54656
  g.selectAll(".tl-legend-item, .tl-lane-header").each(
54798
54657
  function() {
54799
54658
  const el = d3Selection23.select(this);
54800
54659
  const name = el.attr("data-group");
54801
- el.attr("opacity", name === groupName ? 1 : FADE_OPACITY3);
54660
+ el.attr("opacity", name === groupName ? 1 : FADE_OPACITY2);
54802
54661
  }
54803
54662
  );
54804
54663
  g.selectAll(".tl-marker").attr(
54805
54664
  "opacity",
54806
- FADE_OPACITY3
54665
+ FADE_OPACITY2
54807
54666
  );
54808
54667
  }
54809
54668
  function fadeToEra(g, eraStart, eraEnd) {
@@ -54813,40 +54672,40 @@ function makeTimelineHoverHelpers() {
54813
54672
  const endDate = el.attr("data-end-date");
54814
54673
  const evEnd = endDate ? parseFloat(endDate) : date;
54815
54674
  const inside = evEnd >= eraStart && date <= eraEnd;
54816
- el.attr("opacity", inside ? 1 : FADE_OPACITY3);
54675
+ el.attr("opacity", inside ? 1 : FADE_OPACITY2);
54817
54676
  });
54818
54677
  g.selectAll(".tl-legend-item, .tl-lane-header").attr(
54819
54678
  "opacity",
54820
- FADE_OPACITY3
54679
+ FADE_OPACITY2
54821
54680
  );
54822
54681
  g.selectAll(".tl-era").each(function() {
54823
54682
  const el = d3Selection23.select(this);
54824
54683
  const s = parseFloat(el.attr("data-era-start"));
54825
54684
  const e = parseFloat(el.attr("data-era-end"));
54826
54685
  const isSelf = s === eraStart && e === eraEnd;
54827
- el.attr("opacity", isSelf ? 1 : FADE_OPACITY3);
54686
+ el.attr("opacity", isSelf ? 1 : FADE_OPACITY2);
54828
54687
  });
54829
54688
  g.selectAll(".tl-marker").each(function() {
54830
54689
  const el = d3Selection23.select(this);
54831
54690
  const date = parseFloat(el.attr("data-marker-date"));
54832
54691
  const inside = date >= eraStart && date <= eraEnd;
54833
- el.attr("opacity", inside ? 1 : FADE_OPACITY3);
54692
+ el.attr("opacity", inside ? 1 : FADE_OPACITY2);
54834
54693
  });
54835
54694
  }
54836
54695
  function fadeToMarker(g, markerDate) {
54837
54696
  g.selectAll(".tl-event").attr(
54838
54697
  "opacity",
54839
- FADE_OPACITY3
54698
+ FADE_OPACITY2
54840
54699
  );
54841
- g.selectAll(".tl-era").attr("opacity", FADE_OPACITY3);
54700
+ g.selectAll(".tl-era").attr("opacity", FADE_OPACITY2);
54842
54701
  g.selectAll(".tl-legend-item, .tl-lane-header").attr(
54843
54702
  "opacity",
54844
- FADE_OPACITY3
54703
+ FADE_OPACITY2
54845
54704
  );
54846
54705
  g.selectAll(".tl-marker").each(function() {
54847
54706
  const el = d3Selection23.select(this);
54848
54707
  const date = parseFloat(el.attr("data-marker-date"));
54849
- el.attr("opacity", date === markerDate ? 1 : FADE_OPACITY3);
54708
+ el.attr("opacity", date === markerDate ? 1 : FADE_OPACITY2);
54850
54709
  });
54851
54710
  }
54852
54711
  function fadeReset(g) {
@@ -54860,15 +54719,15 @@ function makeTimelineHoverHelpers() {
54860
54719
  g.selectAll(".tl-event").each(function() {
54861
54720
  const el = d3Selection23.select(this);
54862
54721
  const val = el.attr(attrName);
54863
- el.attr("opacity", val === tagValue ? 1 : FADE_OPACITY3);
54722
+ el.attr("opacity", val === tagValue ? 1 : FADE_OPACITY2);
54864
54723
  });
54865
54724
  g.selectAll(".tl-legend-item, .tl-lane-header").attr(
54866
54725
  "opacity",
54867
- FADE_OPACITY3
54726
+ FADE_OPACITY2
54868
54727
  );
54869
54728
  g.selectAll(".tl-marker").attr(
54870
54729
  "opacity",
54871
- FADE_OPACITY3
54730
+ FADE_OPACITY2
54872
54731
  );
54873
54732
  g.selectAll(".tl-tag-legend-entry").each(function() {
54874
54733
  const el = d3Selection23.select(this);
@@ -54877,7 +54736,7 @@ function makeTimelineHoverHelpers() {
54877
54736
  const entryGroup = el.attr("data-tag-group");
54878
54737
  el.attr(
54879
54738
  "opacity",
54880
- entryGroup === tagKey && entryValue === tagValue ? 1 : FADE_OPACITY3
54739
+ entryGroup === tagKey && entryValue === tagValue ? 1 : FADE_OPACITY2
54881
54740
  );
54882
54741
  });
54883
54742
  }
@@ -54887,7 +54746,7 @@ function makeTimelineHoverHelpers() {
54887
54746
  }
54888
54747
  }
54889
54748
  return {
54890
- FADE_OPACITY: FADE_OPACITY3,
54749
+ FADE_OPACITY: FADE_OPACITY2,
54891
54750
  fadeToGroup,
54892
54751
  fadeToEra,
54893
54752
  fadeToMarker,
@@ -54899,7 +54758,7 @@ function makeTimelineHoverHelpers() {
54899
54758
  function renderTimelineTagLegendOverlay(container, parsed, palette, isDark, setup, hovers, onClickItem, exportDims, swimlaneTagGroup, activeTagGroup, onTagStateChange, viewMode, exportMode) {
54900
54759
  if (parsed.timelineTagGroups.length === 0) return;
54901
54760
  const { width, textColor, groupColorMap, solid } = setup;
54902
- const { FADE_OPACITY: FADE_OPACITY3, fadeReset, fadeToTagValue } = hovers;
54761
+ const { FADE_OPACITY: FADE_OPACITY2, fadeReset, fadeToTagValue } = hovers;
54903
54762
  const title = parsed.noTitle ? null : parsed.title;
54904
54763
  const { timelineEvents } = parsed;
54905
54764
  const LG_HEIGHT = LEGEND_HEIGHT;
@@ -54989,7 +54848,7 @@ function renderTimelineTagLegendOverlay(container, parsed, palette, isDark, setu
54989
54848
  const eg = el.attr("data-tag-group") ?? el.node()?.closest?.("[data-tag-group]")?.getAttribute("data-tag-group");
54990
54849
  el.attr(
54991
54850
  "opacity",
54992
- eg === tagKey && ev === tagVal ? 1 : FADE_OPACITY3
54851
+ eg === tagKey && ev === tagVal ? 1 : FADE_OPACITY2
54993
54852
  );
54994
54853
  });
54995
54854
  } else {
@@ -57748,6 +57607,9 @@ async function renderForExport(content, theme, palette, viewState, options) {
57748
57607
  const { renderSequenceDiagram: renderSequenceDiagram2 } = await Promise.resolve().then(() => (init_renderer20(), renderer_exports20));
57749
57608
  const seqParsed = parseSequenceDgmo2(content);
57750
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;
57751
57613
  renderSequenceDiagram2(
57752
57614
  container,
57753
57615
  seqParsed,
@@ -57756,9 +57618,11 @@ async function renderForExport(content, theme, palette, viewState, options) {
57756
57618
  void 0,
57757
57619
  {
57758
57620
  exportWidth: EXPORT_WIDTH,
57759
- ...options?.tagGroup !== void 0 && {
57760
- activeTagGroup: options.tagGroup
57761
- }
57621
+ ...seqActiveTagGroup !== void 0 && {
57622
+ activeTagGroup: seqActiveTagGroup
57623
+ },
57624
+ ...collapsedSections !== void 0 && { collapsedSections },
57625
+ ...collapsedGroups !== void 0 && { collapsedGroups }
57762
57626
  }
57763
57627
  );
57764
57628
  } else if (parsed.type === "wordcloud") {
@@ -58820,8 +58684,17 @@ function normalizeSvgForEmbed(input) {
58820
58684
  const tight = computeBBox(svg);
58821
58685
  if (tight && tight.width > 0 && tight.height > 0) {
58822
58686
  const pad2 = 16;
58823
- const vb = `${tight.x - pad2} ${tight.y - pad2} ${tight.width + pad2 * 2} ${tight.height + pad2 * 2}`;
58824
- 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
+ }
58825
58698
  }
58826
58699
  svg = svg.replace(/(<svg[^>]*?) width="[^"]*"/g, "$1");
58827
58700
  svg = svg.replace(/(<svg[^>]*?) height="[^"]*"/g, "$1");
@@ -58840,6 +58713,14 @@ function getEmbedSvgViewBox(svg) {
58840
58713
  height: tight.height + pad2 * 2
58841
58714
  };
58842
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
+ }
58843
58724
  function computeBBox(svg) {
58844
58725
  const xs = [];
58845
58726
  const ys = [];