@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/auto.mjs CHANGED
@@ -741,7 +741,7 @@ function withTagAliases(base, aliases) {
741
741
  function isReservedKey(registry, key) {
742
742
  return registry.keys.has(key) || registry.tagAliases.has(key);
743
743
  }
744
- 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;
744
+ 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;
745
745
  var init_reserved_key_registry = __esm({
746
746
  "src/utils/reserved-key-registry.ts"() {
747
747
  "use strict";
@@ -785,10 +785,6 @@ var init_reserved_key_registry = __esm({
785
785
  "description",
786
786
  "domain"
787
787
  ]);
788
- CLASS_REGISTRY = staticRegistry([
789
- "color",
790
- "description"
791
- ]);
792
788
  KANBAN_REGISTRY = staticRegistry([
793
789
  "color",
794
790
  "description",
@@ -864,7 +860,6 @@ var init_reserved_key_registry = __esm({
864
860
  "color",
865
861
  "description"
866
862
  ]);
867
- WIREFRAME_REGISTRY = staticRegistry([]);
868
863
  }
869
864
  });
870
865
 
@@ -4133,6 +4128,9 @@ var init_legend_layout = __esm({
4133
4128
  });
4134
4129
 
4135
4130
  // src/utils/legend-d3.ts
4131
+ function centerText(sel) {
4132
+ return sel.attr("dy", LEGEND_TEXT_DY);
4133
+ }
4136
4134
  function renderLegendD3(container, config, state, palette, isDark, callbacks, containerWidth) {
4137
4135
  const width = containerWidth ?? parseFloat(container.attr("width") || "800");
4138
4136
  let currentState = { ...state };
@@ -4215,21 +4213,21 @@ function renderCapsule(parent, capsule, palette, groupBg, pillBorder, _isDark, c
4215
4213
  const pill = capsule.pill;
4216
4214
  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);
4217
4215
  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);
4218
- 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);
4216
+ 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);
4219
4217
  if (capsule.gradient) {
4220
4218
  const gr = capsule.gradient;
4221
4219
  const gradId = `dgmo-legend-ramp-${capsule.groupName.toLowerCase().replace(/[^a-z0-9]+/g, "-")}`;
4222
4220
  const def = g.append("defs").append("linearGradient").attr("id", gradId);
4223
4221
  def.append("stop").attr("offset", "0%").attr("stop-color", mix(gr.hue, gr.base, 15));
4224
4222
  def.append("stop").attr("offset", "100%").attr("stop-color", gr.hue);
4225
- 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);
4223
+ 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);
4226
4224
  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})`);
4227
- 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);
4225
+ 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);
4228
4226
  }
4229
4227
  for (const entry of capsule.entries) {
4230
4228
  const entryG = g.append("g").attr("data-legend-entry", entry.value.toLowerCase()).attr("data-series-name", entry.value).style("cursor", "pointer");
4231
4229
  entryG.append("circle").attr("cx", entry.dotCx).attr("cy", entry.dotCy).attr("r", LEGEND_DOT_R).attr("fill", entry.color);
4232
- 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);
4230
+ 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);
4233
4231
  if (callbacks?.onEntryHover) {
4234
4232
  const groupName = capsule.groupName;
4235
4233
  const entryValue = entry.value;
@@ -4249,7 +4247,7 @@ function renderCapsule(parent, capsule, palette, groupBg, pillBorder, _isDark, c
4249
4247
  function renderPill(parent, pill, palette, groupBg, callbacks) {
4250
4248
  const g = parent.append("g").attr("transform", `translate(${pill.x},${pill.y})`).attr("data-legend-group", pill.groupName.toLowerCase()).style("cursor", "pointer");
4251
4249
  g.append("rect").attr("width", pill.width).attr("height", pill.height).attr("rx", pill.height / 2).attr("fill", groupBg);
4252
- 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);
4250
+ 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);
4253
4251
  if (callbacks?.onGroupToggle) {
4254
4252
  const cb = callbacks.onGroupToggle;
4255
4253
  const name = pill.groupName;
@@ -4272,7 +4270,7 @@ function renderControl(parent, ctrl, palette, _groupBg, pillBorder, _isDark, con
4272
4270
  textX = 8 + 14 + LEGEND_ENTRY_DOT_GAP + measureLegendText(ctrl.label, LEGEND_PILL_FONT_SIZE) / 2;
4273
4271
  }
4274
4272
  if (ctrl.label) {
4275
- 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);
4273
+ 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);
4276
4274
  }
4277
4275
  if (ctrl.children) {
4278
4276
  let cx = ctrl.width + 4;
@@ -4282,7 +4280,7 @@ function renderControl(parent, ctrl, palette, _groupBg, pillBorder, _isDark, con
4282
4280
  "fill",
4283
4281
  child.isActive ? palette.primary ?? palette.text : "none"
4284
4282
  ).attr("stroke", pillBorder).attr("stroke-width", 0.75);
4285
- 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);
4283
+ 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);
4286
4284
  const configCtrl2 = configControls?.find((c) => c.id === ctrl.id);
4287
4285
  const configChild = configCtrl2?.children?.find((c) => c.id === child.id);
4288
4286
  if (configChild?.onClick) {
@@ -4336,7 +4334,7 @@ function renderControlsGroup(parent, layout, palette, groupBg, pillBorder, callb
4336
4334
  } else {
4337
4335
  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);
4338
4336
  }
4339
- 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);
4337
+ 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);
4340
4338
  if (callbacks?.onControlsToggle && toggle) {
4341
4339
  const cb = callbacks.onControlsToggle;
4342
4340
  const id = tl.id;
@@ -4349,6 +4347,7 @@ function renderControlsGroup(parent, layout, palette, groupBg, pillBorder, callb
4349
4347
  }
4350
4348
  }
4351
4349
  }
4350
+ var LEGEND_TEXT_DY;
4352
4351
  var init_legend_d3 = __esm({
4353
4352
  "src/utils/legend-d3.ts"() {
4354
4353
  "use strict";
@@ -4356,6 +4355,7 @@ var init_legend_d3 = __esm({
4356
4355
  init_legend_layout();
4357
4356
  init_color_utils();
4358
4357
  init_fonts();
4358
+ LEGEND_TEXT_DY = "0.32em";
4359
4359
  }
4360
4360
  });
4361
4361
 
@@ -4606,7 +4606,6 @@ var init_arrows = __esm({
4606
4606
  var parser_exports = {};
4607
4607
  __export(parser_exports, {
4608
4608
  isSequenceBlock: () => isSequenceBlock,
4609
- isSequenceMessage: () => isSequenceMessage,
4610
4609
  isSequenceNote: () => isSequenceNote,
4611
4610
  isSequenceSection: () => isSequenceSection,
4612
4611
  looksLikeSequence: () => looksLikeSequence,
@@ -4622,9 +4621,6 @@ function isHardRemovedToken(remainder) {
4622
4621
  }
4623
4622
  return { removed: false };
4624
4623
  }
4625
- function isSequenceMessage(el) {
4626
- return el.kind === "message";
4627
- }
4628
4624
  function isSequenceBlock(el) {
4629
4625
  return el.kind === "block";
4630
4626
  }
@@ -16332,6 +16328,9 @@ function parseMap(content) {
16332
16328
  break;
16333
16329
  // ── Cosmetic `no-*` opt-outs: bare flags, idempotent (mirror `no-legend`,
16334
16330
  // no dup warning); each defaults the feature ON when absent. ──
16331
+ case "no-title":
16332
+ d.noTitle = true;
16333
+ break;
16335
16334
  case "no-legend":
16336
16335
  d.noLegend = true;
16337
16336
  break;
@@ -16353,6 +16352,9 @@ function parseMap(content) {
16353
16352
  case "no-colorize":
16354
16353
  d.noColorize = true;
16355
16354
  break;
16355
+ case "no-cluster-pois":
16356
+ d.noClusterPois = true;
16357
+ break;
16356
16358
  }
16357
16359
  }
16358
16360
  function handleTag(trimmed, line12) {
@@ -16654,13 +16656,15 @@ var init_parser12 = __esm({
16654
16656
  "locale",
16655
16657
  "active-tag",
16656
16658
  "caption",
16659
+ "no-title",
16657
16660
  "no-legend",
16658
16661
  "no-coastline",
16659
16662
  "no-relief",
16660
16663
  "no-context-labels",
16661
16664
  "no-region-labels",
16662
16665
  "no-poi-labels",
16663
- "no-colorize"
16666
+ "no-colorize",
16667
+ "no-cluster-pois"
16664
16668
  ]);
16665
16669
  }
16666
16670
  });
@@ -37370,18 +37374,10 @@ var init_layout11 = __esm({
37370
37374
  // src/pert/renderer.ts
37371
37375
  var renderer_exports11 = {};
37372
37376
  __export(renderer_exports11, {
37373
- PERT_LEGEND_PILL_HEIGHT: () => PERT_LEGEND_PILL_HEIGHT,
37374
- highlightPertCriticalPath: () => highlightPertCriticalPath,
37375
- highlightPertSet: () => highlightPertSet,
37376
37377
  measurePertAnalysisBlock: () => measurePertAnalysisBlock,
37377
- pertLegendBlockWidth: () => pertLegendBlockWidth,
37378
- pertLegendEntries: () => pertLegendEntries,
37379
- renderLegendBlock: () => renderLegendBlock,
37380
37378
  renderPert: () => renderPert,
37381
37379
  renderPertAnalysisBlock: () => renderPertAnalysisBlock,
37382
- renderPertForExport: () => renderPertForExport,
37383
- resetPertCriticalPath: () => resetPertCriticalPath,
37384
- resetPertHighlight: () => resetPertHighlight
37380
+ renderPertForExport: () => renderPertForExport
37385
37381
  });
37386
37382
  import * as d3Selection12 from "d3-selection";
37387
37383
  import * as d3Shape8 from "d3-shape";
@@ -37466,16 +37462,14 @@ function renderPert(container, resolved, layout, palette, isDark, options = {})
37466
37462
  const standaloneFieldLegendWidthForExport = layout.width;
37467
37463
  const analysisBlockHeight = analysisLayer.analysisHasContent ? CAPTION_TOP_GAP + analysisLayer.analysisRowHeight : 0;
37468
37464
  const fieldLegendBlockHeight = analysisLayer.fieldLegendStandalone ? CAPTION_TOP_GAP + fieldLegendHeightFor(standaloneFieldLegendWidthForExport) : 0;
37469
- const showTopLegend = options.showTopLegend ?? true;
37470
- const legendEntries = showTopLegend ? pertLegendEntries(resolved) : [];
37465
+ const showLegend = options.showLegend ?? true;
37471
37466
  const tagLegendActive = resolveActiveTagGroup(
37472
37467
  resolved.tagGroups,
37473
37468
  resolved.options.activeTag,
37474
37469
  options.activeTagOverride
37475
37470
  );
37476
- const showTagLegend = showTopLegend && resolved.tagGroups.length > 0;
37477
- const tagLegendBlockHeight = showTagLegend ? LEGEND_PILL_HEIGHT + LEGEND_BOTTOM_GAP : 0;
37478
- const legendBlockHeight = (legendEntries.length > 0 ? LEGEND_TOP_GAP + LEGEND_PILL_HEIGHT + LEGEND_BOTTOM_GAP : 0) + tagLegendBlockHeight;
37471
+ const showTagLegend = showLegend && resolved.tagGroups.length > 0;
37472
+ const legendBlockHeight = showTagLegend ? LEGEND_TOP_GAP + LEGEND_PILL_HEIGHT + LEGEND_BOTTOM_GAP : 0;
37479
37473
  const naturalChartWidth = layout.width + DIAGRAM_PADDING11 * 2;
37480
37474
  const minAnalysisRowW = analysisLayer.analysisHasContent ? analysisLayer.minContentWidth + 2 * DIAGRAM_PADDING11 : 0;
37481
37475
  const naturalWidth = Math.max(naturalChartWidth, minAnalysisRowW);
@@ -37498,8 +37492,7 @@ function renderPert(container, resolved, layout, palette, isDark, options = {})
37498
37492
  const sLegendTopGap = ctx.aesthetic(LEGEND_TOP_GAP);
37499
37493
  const sLegendBottomGap = ctx.aesthetic(LEGEND_BOTTOM_GAP);
37500
37494
  const sLegendPillHeight = ctx.structural(LEGEND_PILL_HEIGHT);
37501
- const sTagLegendBlockHeight = showTagLegend ? sLegendPillHeight + sLegendBottomGap : 0;
37502
- const sLegendBlockHeight = (legendEntries.length > 0 ? sLegendTopGap + sLegendPillHeight + sLegendBottomGap : 0) + sTagLegendBlockHeight;
37495
+ const sLegendBlockHeight = showTagLegend ? sLegendTopGap + sLegendPillHeight + sLegendBottomGap : 0;
37503
37496
  const sNodeRadius = ctx.structural(NODE_RADIUS2);
37504
37497
  const sNodeStrokeWidth = ctx.structural(NODE_STROKE_WIDTH10);
37505
37498
  const sNodeFontSize = ctx.text(NODE_FONT_SIZE4);
@@ -37531,17 +37524,8 @@ function renderPert(container, resolved, layout, palette, isDark, options = {})
37531
37524
  }
37532
37525
  const offsetX = Math.max(sDiagramPad, (svgW - layout.width) / 2);
37533
37526
  const offsetY = sDiagramPad + sTitleHeight + sLegendBlockHeight;
37534
- if (legendEntries.length > 0) {
37535
- renderLegendBlock(svg, legendEntries, {
37536
- x: 0,
37537
- y: sDiagramPad + sTitleHeight + sLegendTopGap,
37538
- width: svgW,
37539
- palette,
37540
- isDark
37541
- });
37542
- }
37543
37527
  if (showTagLegend) {
37544
- const tagLegendY = sDiagramPad + sTitleHeight + (legendEntries.length > 0 ? sLegendTopGap + sLegendPillHeight : sLegendTopGap);
37528
+ const tagLegendY = sDiagramPad + sTitleHeight + sLegendTopGap;
37545
37529
  renderTagLegendRow(svg, resolved, palette, isDark, {
37546
37530
  x: 0,
37547
37531
  y: tagLegendY,
@@ -37625,8 +37609,7 @@ function renderPertForExport(content, theme, palette, now) {
37625
37609
  }
37626
37610
  const captionBoxHeight = captionBullets.length > 0 ? captionBullets.length * CAPTION_LINE_HEIGHT + 2 * CAPTION_BOX_PADDING_Y + CAPTION_HEADER_BAND_HEIGHT : 0;
37627
37611
  const captionBlockHeight = captionBullets.length > 0 ? CAPTION_TOP_GAP + captionBoxHeight : 0;
37628
- const legendEntries = pertLegendEntries(resolved);
37629
- const legendBlockHeight = legendEntries.length > 0 ? LEGEND_TOP_GAP + LEGEND_PILL_HEIGHT + LEGEND_BOTTOM_GAP : 0;
37612
+ const legendBlockHeight = resolved.tagGroups.length > 0 ? LEGEND_TOP_GAP + LEGEND_PILL_HEIGHT + LEGEND_BOTTOM_GAP : 0;
37630
37613
  const exportWidth = layout.width + DIAGRAM_PADDING11 * 2;
37631
37614
  const exportHeight = layout.height + DIAGRAM_PADDING11 * 2 + titleHeight + legendBlockHeight + captionBlockHeight;
37632
37615
  const container = document.createElement("div");
@@ -38166,22 +38149,22 @@ function renderEdges2(root, resolved, layout, palette, collapsedSet, sc = {}) {
38166
38149
  if (srcGroup && tgtGroup && srcGroup === tgtGroup && collapsedSet.has(srcGroup)) {
38167
38150
  continue;
38168
38151
  }
38169
- const isCritical2 = criticalSet.has(e.source) && criticalSet.has(e.target);
38152
+ const isCritical = criticalSet.has(e.source) && criticalSet.has(e.target);
38170
38153
  let band;
38171
38154
  if (mcOn) {
38172
38155
  const sc2 = critById.get(e.source);
38173
38156
  const tc = critById.get(e.target);
38174
38157
  const minC = sc2 === null || tc === null || sc2 === void 0 || tc === void 0 ? null : Math.min(sc2, tc);
38175
38158
  band = criticalityBand(minC);
38176
- if (band === null && isCritical2) band = "red";
38159
+ if (band === null && isCritical) band = "red";
38177
38160
  } else {
38178
- band = isCritical2 ? "red" : null;
38161
+ band = isCritical ? "red" : null;
38179
38162
  }
38180
38163
  const path = lineGenerator6(e.points);
38181
38164
  if (!path) continue;
38182
38165
  const sESW = sc.edgeStrokeWidth ?? EDGE_STROKE_WIDTH10;
38183
38166
  const sELFS = sc.edgeLabelFontSize ?? 10;
38184
- 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 ?? "");
38167
+ 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 ?? "");
38185
38168
  const parsedEdge = edgeByKey.get(`${e.source}->${e.target}`);
38186
38169
  const labelText = parsedEdge ? formatEdgeLabel(parsedEdge) : null;
38187
38170
  if (labelText) {
@@ -38233,7 +38216,7 @@ function renderNodes2(root, _defs, resolved, layout, palette, isDark, sizing, on
38233
38216
  const r = byId.get(node.id);
38234
38217
  if (!r) continue;
38235
38218
  if (r.activity.groupId && collapsedSet.has(r.activity.groupId)) continue;
38236
- const isCritical2 = r.isCriticalPath;
38219
+ const isCritical = r.isCriticalPath;
38237
38220
  const isTbd = tbdSet.has(node.id);
38238
38221
  const dashArray = isTbd ? "4,3" : "none";
38239
38222
  const isTopMu = topMuIds.has(node.id);
@@ -38241,14 +38224,14 @@ function renderNodes2(root, _defs, resolved, layout, palette, isDark, sizing, on
38241
38224
  let band;
38242
38225
  if (mcOn) {
38243
38226
  band = criticalityBand(r.criticality);
38244
- if (band === null && isCritical2) band = "red";
38227
+ if (band === null && isCritical) band = "red";
38245
38228
  } else {
38246
- band = isCritical2 ? "red" : null;
38229
+ band = isCritical ? "red" : null;
38247
38230
  }
38248
38231
  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(
38249
38232
  "data-group-id",
38250
38233
  r.activity.groupId !== void 0 ? r.activity.groupId : ""
38251
- ).attr("data-critical-path", String(isCritical2)).attr("data-criticality-band", band ?? "").attr("data-duration-rank", isTopMu ? "top" : isBottomMu ? "bottom" : "");
38234
+ ).attr("data-critical-path", String(isCritical)).attr("data-criticality-band", band ?? "").attr("data-duration-rank", isTopMu ? "top" : isBottomMu ? "bottom" : "");
38252
38235
  if (r.activity.tags) {
38253
38236
  for (const [tagKey, tagValue] of Object.entries(r.activity.tags)) {
38254
38237
  g.attr(`data-tag-${tagKey}`, String(tagValue).toLowerCase());
@@ -38558,69 +38541,6 @@ function computeAnchorPinSet(resolved) {
38558
38541
  }
38559
38542
  return pinned;
38560
38543
  }
38561
- function isCritical(el, mcOn) {
38562
- if (mcOn) {
38563
- return HIGHLIGHT_BANDS.has(el.getAttribute("data-criticality-band") ?? "");
38564
- }
38565
- return el.getAttribute("data-critical-path") === "true";
38566
- }
38567
- function isInHighlightSet(el, kind, mcOn) {
38568
- if (kind === "critical") return isCritical(el, mcOn);
38569
- if (kind === "milestone") {
38570
- return el.getAttribute("data-milestone") === "true";
38571
- }
38572
- return el.hasAttribute("data-anchor");
38573
- }
38574
- function highlightPertSet(container, kind) {
38575
- const svg = container.querySelector("svg");
38576
- if (!svg) return;
38577
- const mcOn = Array.from(svg.querySelectorAll(".pert-edge")).some((e) => {
38578
- const b = e.getAttribute("data-criticality-band");
38579
- return b !== null && b !== "" && b !== "red";
38580
- });
38581
- const candidates = svg.querySelectorAll(
38582
- ".pert-node, .pert-edge, .pert-group-collapsed"
38583
- );
38584
- let anyMatch = false;
38585
- for (const el of candidates) {
38586
- if (isInHighlightSet(el, kind, mcOn)) {
38587
- anyMatch = true;
38588
- break;
38589
- }
38590
- }
38591
- if (!anyMatch) return;
38592
- svg.setAttribute("data-pert-highlight-active", kind);
38593
- for (const el of svg.querySelectorAll(".pert-node, .pert-edge")) {
38594
- el.setAttribute(
38595
- "opacity",
38596
- isInHighlightSet(el, kind, mcOn) ? "1" : String(FADE_OPACITY)
38597
- );
38598
- }
38599
- for (const el of svg.querySelectorAll(".pert-group")) {
38600
- const inSet = el.classList.contains("pert-group-collapsed") && isInHighlightSet(el, kind, mcOn);
38601
- el.setAttribute(
38602
- "opacity",
38603
- inSet ? "1" : String(FADE_OPACITY)
38604
- );
38605
- }
38606
- }
38607
- function highlightPertCriticalPath(container) {
38608
- highlightPertSet(container, "critical");
38609
- }
38610
- function resetPertHighlight(container) {
38611
- const svg = container.querySelector("svg");
38612
- if (!svg) return;
38613
- svg.removeAttribute("data-pert-highlight-active");
38614
- svg.removeAttribute("data-critical-path-active");
38615
- for (const el of svg.querySelectorAll(
38616
- ".pert-node, .pert-edge, .pert-group"
38617
- )) {
38618
- el.removeAttribute("opacity");
38619
- }
38620
- }
38621
- function resetPertCriticalPath(container) {
38622
- resetPertHighlight(container);
38623
- }
38624
38544
  function anchorAnnotationText(resolved) {
38625
38545
  const anchor = resolved.options.anchor;
38626
38546
  if (anchor === null) return null;
@@ -38673,70 +38593,6 @@ function renderCaptionBlock(svg, bullets, args) {
38673
38593
  if (i > 0) tspan.attr("dy", CAPTION_LINE_HEIGHT);
38674
38594
  });
38675
38595
  }
38676
- function pertLegendEntries(resolved) {
38677
- const entries = [];
38678
- if (resolved.activities.length > 0) {
38679
- entries.push({ kind: "critical", label: "Critical Path" });
38680
- }
38681
- if (resolved.options.anchor !== null) {
38682
- entries.push({ kind: "anchor", label: "Anchor" });
38683
- }
38684
- if (resolved.activities.some((a) => a.activity.isMilestone)) {
38685
- entries.push({ kind: "milestone", label: "Milestone" });
38686
- }
38687
- return entries;
38688
- }
38689
- function legendSwatchWidth(kind) {
38690
- if (kind === "critical") return LEGEND_DOT_R * 2;
38691
- if (kind === "anchor") return PIN_ICON_W;
38692
- return LEGEND_FONT_SIZE;
38693
- }
38694
- function legendPillWidth(entry) {
38695
- const labelW = measureLegendText(entry.label, LEGEND_FONT_SIZE);
38696
- return Math.ceil(
38697
- LEGEND_PILL_PADDING_X + legendSwatchWidth(entry.kind) + LEGEND_SWATCH_GAP + labelW + LEGEND_PILL_PADDING_X
38698
- );
38699
- }
38700
- function legendNaturalWidth(entries) {
38701
- if (entries.length === 0) return 0;
38702
- let total = 0;
38703
- for (const e of entries) total += legendPillWidth(e);
38704
- total += (entries.length - 1) * LEGEND_PILL_GAP;
38705
- return total;
38706
- }
38707
- function pertLegendBlockWidth(entries) {
38708
- return legendNaturalWidth(entries);
38709
- }
38710
- function renderLegendBlock(svg, entries, args) {
38711
- if (entries.length === 0) return;
38712
- const { x, y, width, palette, isDark } = args;
38713
- const groupBg = isDark ? mix(palette.surface, palette.bg, 50) : mix(palette.surface, palette.bg, 30);
38714
- const block = svg.append("g").attr("class", "pert-legend").attr("data-pert-legend", "");
38715
- const totalW = legendNaturalWidth(entries);
38716
- let pillX = x + (width - totalW) / 2;
38717
- for (const entry of entries) {
38718
- const pillW = legendPillWidth(entry);
38719
- const pill = block.append("g").attr("class", "pert-legend-entry").attr("data-legend-entry", entry.kind).attr("transform", `translate(${pillX}, ${y})`).style("cursor", "pointer");
38720
- 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);
38721
- const swatchW = legendSwatchWidth(entry.kind);
38722
- const swatchCx = LEGEND_PILL_PADDING_X + swatchW / 2;
38723
- const swatchCy = LEGEND_PILL_HEIGHT / 2;
38724
- if (entry.kind === "critical") {
38725
- pill.append("circle").attr("class", "pert-legend-swatch").attr("cx", swatchCx).attr("cy", swatchCy).attr("r", LEGEND_DOT_R).attr("fill", palette.colors.red);
38726
- } else if (entry.kind === "anchor") {
38727
- drawAnchorPin(
38728
- pill,
38729
- swatchCx - PIN_ICON_W / 2,
38730
- swatchCy,
38731
- palette.textMuted
38732
- );
38733
- } else {
38734
- 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");
38735
- }
38736
- 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);
38737
- pillX += pillW + LEGEND_PILL_GAP;
38738
- }
38739
- }
38740
38596
  function renderTagLegendRow(svg, resolved, palette, isDark, args) {
38741
38597
  if (resolved.tagGroups.length === 0) return;
38742
38598
  const { x, y, width, activeGroup, exportMode } = args;
@@ -39183,7 +39039,7 @@ function formatScurveDate(iso) {
39183
39039
  if (month < 0 || month > 11 || isNaN(day)) return iso;
39184
39040
  return `${SCURVE_MONTH_NAMES[month]} ${day}`;
39185
39041
  }
39186
- 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;
39042
+ 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;
39187
39043
  var init_renderer11 = __esm({
39188
39044
  "src/pert/renderer.ts"() {
39189
39045
  "use strict";
@@ -39212,15 +39068,10 @@ var init_renderer11 = __esm({
39212
39068
  CONTAINER_LABEL_FONT_SIZE3 = 13;
39213
39069
  CONTAINER_HEADER_HEIGHT3 = 28;
39214
39070
  COLLAPSE_BAR_HEIGHT7 = 6;
39215
- FADE_OPACITY = 0.15;
39216
39071
  DURATION_FADE_OPACITY = 0.55;
39217
39072
  PIN_ICON_W = 13;
39218
39073
  PIN_ICON_H = 13;
39219
39074
  LEGEND_PILL_HEIGHT = LEGEND_HEIGHT;
39220
- LEGEND_PILL_PADDING_X = 8;
39221
- LEGEND_PILL_GAP = 8;
39222
- LEGEND_SWATCH_GAP = LEGEND_ENTRY_DOT_GAP;
39223
- LEGEND_FONT_SIZE = LEGEND_PILL_FONT_SIZE;
39224
39075
  LEGEND_TOP_GAP = 12;
39225
39076
  LEGEND_BOTTOM_GAP = 12;
39226
39077
  FIELD_LEGEND_HEADER_BAND_HEIGHT = 26;
@@ -39257,7 +39108,6 @@ var init_renderer11 = __esm({
39257
39108
  ];
39258
39109
  lineGenerator6 = d3Shape8.line().x((d) => d.x).y((d) => d.y).curve(d3Shape8.curveBasis);
39259
39110
  FIELD_LEGEND_MIN_W = 220;
39260
- HIGHLIGHT_BANDS = /* @__PURE__ */ new Set(["red", "orange", "yellow"]);
39261
39111
  SUB_BULLET_INDENT = 20;
39262
39112
  CAPTION_HEADER_BAND_HEIGHT = CAPTION_LINE_HEIGHT + 8;
39263
39113
  TORNADO_TOP_N = 10;
@@ -39277,7 +39127,6 @@ var init_renderer11 = __esm({
39277
39127
  SCURVE_PLOT_PADDING_BOTTOM = 44;
39278
39128
  SCURVE_TICK_FONT_SIZE = 13;
39279
39129
  SCURVE_PERCENTILE_RADIUS = 4;
39280
- PERT_LEGEND_PILL_HEIGHT = LEGEND_PILL_HEIGHT;
39281
39130
  DAYS_PER_UNIT = {
39282
39131
  min: 1 / (60 * 24),
39283
39132
  h: 1 / 24,
@@ -40804,31 +40653,31 @@ function renderGantt(container, resolved, palette, isDark, options, exportDims)
40804
40653
  todayHoverG.on("mouseenter", () => {
40805
40654
  g.selectAll(".gantt-task").attr(
40806
40655
  "opacity",
40807
- FADE_OPACITY2
40656
+ FADE_OPACITY
40808
40657
  );
40809
40658
  g.selectAll(".gantt-milestone").attr(
40810
40659
  "opacity",
40811
- FADE_OPACITY2
40660
+ FADE_OPACITY
40812
40661
  );
40813
40662
  g.selectAll(
40814
40663
  ".gantt-group-bar, .gantt-group-summary"
40815
- ).attr("opacity", FADE_OPACITY2);
40816
- svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY2);
40817
- svg.selectAll(".gantt-task-label").attr("opacity", FADE_OPACITY2);
40818
- svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY2);
40664
+ ).attr("opacity", FADE_OPACITY);
40665
+ svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY);
40666
+ svg.selectAll(".gantt-task-label").attr("opacity", FADE_OPACITY);
40667
+ svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY);
40819
40668
  g.selectAll(
40820
40669
  ".gantt-lane-band, .gantt-lane-accent, .gantt-lane-band-group"
40821
- ).attr("opacity", FADE_OPACITY2);
40670
+ ).attr("opacity", FADE_OPACITY);
40822
40671
  g.selectAll(
40823
40672
  ".gantt-dep-arrow, .gantt-dep-arrowhead"
40824
- ).attr("opacity", FADE_OPACITY2);
40673
+ ).attr("opacity", FADE_OPACITY);
40825
40674
  g.selectAll(".gantt-era-group").attr(
40826
40675
  "opacity",
40827
- FADE_OPACITY2
40676
+ FADE_OPACITY
40828
40677
  );
40829
40678
  g.selectAll(".gantt-marker-group").attr(
40830
40679
  "opacity",
40831
- FADE_OPACITY2
40680
+ FADE_OPACITY
40832
40681
  );
40833
40682
  showGanttDateIndicators(
40834
40683
  g,
@@ -41060,28 +40909,28 @@ function applyCriticalPathHighlight(svg, chartG) {
41060
40909
  const el = d3Selection13.select(this);
41061
40910
  el.attr(
41062
40911
  "opacity",
41063
- el.attr("data-critical-path") === "true" ? 1 : FADE_OPACITY2
40912
+ el.attr("data-critical-path") === "true" ? 1 : FADE_OPACITY
41064
40913
  );
41065
40914
  });
41066
- chartG.selectAll(".gantt-milestone").attr("opacity", FADE_OPACITY2);
41067
- chartG.selectAll(".gantt-group-bar, .gantt-group-summary").attr("opacity", FADE_OPACITY2);
40915
+ chartG.selectAll(".gantt-milestone").attr("opacity", FADE_OPACITY);
40916
+ chartG.selectAll(".gantt-group-bar, .gantt-group-summary").attr("opacity", FADE_OPACITY);
41068
40917
  svg.selectAll(".gantt-task-label").each(function() {
41069
40918
  const el = d3Selection13.select(this);
41070
40919
  el.attr(
41071
40920
  "opacity",
41072
- el.attr("data-critical-path") === "true" ? 1 : FADE_OPACITY2
40921
+ el.attr("data-critical-path") === "true" ? 1 : FADE_OPACITY
41073
40922
  );
41074
40923
  });
41075
- svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY2);
41076
- svg.selectAll(".gantt-group-band-bg, .gantt-group-band-accent").attr("opacity", FADE_OPACITY2);
41077
- svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY2);
41078
- svg.selectAll(".gantt-lane-band-bg, .gantt-lane-band-accent").attr("opacity", FADE_OPACITY2);
41079
- chartG.selectAll(".gantt-lane-band, .gantt-lane-accent").attr("opacity", FADE_OPACITY2);
40924
+ svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY);
40925
+ svg.selectAll(".gantt-group-band-bg, .gantt-group-band-accent").attr("opacity", FADE_OPACITY);
40926
+ svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY);
40927
+ svg.selectAll(".gantt-lane-band-bg, .gantt-lane-band-accent").attr("opacity", FADE_OPACITY);
40928
+ chartG.selectAll(".gantt-lane-band, .gantt-lane-accent").attr("opacity", FADE_OPACITY);
41080
40929
  chartG.selectAll(".gantt-dep-arrow, .gantt-dep-arrowhead").each(function() {
41081
40930
  const el = d3Selection13.select(this);
41082
40931
  el.attr(
41083
40932
  "opacity",
41084
- el.attr("data-critical-path") === "true" ? 0.7 : FADE_OPACITY2
40933
+ el.attr("data-critical-path") === "true" ? 0.7 : FADE_OPACITY
41085
40934
  );
41086
40935
  });
41087
40936
  }
@@ -41260,27 +41109,27 @@ function renderTagLegend(svg, chartG, tagGroups, activeGroupName, chartLeftMargi
41260
41109
  const el = d3Selection13.select(this);
41261
41110
  el.attr(
41262
41111
  "opacity",
41263
- el.attr(`data-tag-${tagKey}`) === ev ? 1 : FADE_OPACITY2
41112
+ el.attr(`data-tag-${tagKey}`) === ev ? 1 : FADE_OPACITY
41264
41113
  );
41265
41114
  });
41266
- chartG.selectAll(".gantt-milestone").attr("opacity", FADE_OPACITY2);
41267
- chartG.selectAll(".gantt-group-bar, .gantt-group-summary").attr("opacity", FADE_OPACITY2);
41115
+ chartG.selectAll(".gantt-milestone").attr("opacity", FADE_OPACITY);
41116
+ chartG.selectAll(".gantt-group-bar, .gantt-group-summary").attr("opacity", FADE_OPACITY);
41268
41117
  svg.selectAll(".gantt-task-label").each(function() {
41269
41118
  const el = d3Selection13.select(this);
41270
41119
  el.attr(
41271
41120
  "opacity",
41272
- el.attr(`data-tag-${tagKey}`) === ev ? 1 : FADE_OPACITY2
41121
+ el.attr(`data-tag-${tagKey}`) === ev ? 1 : FADE_OPACITY
41273
41122
  );
41274
41123
  });
41275
- svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY2);
41124
+ svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY);
41276
41125
  svg.selectAll(".gantt-lane-header").each(function() {
41277
41126
  const el = d3Selection13.select(this);
41278
41127
  el.attr(
41279
41128
  "opacity",
41280
- el.attr(`data-tag-${tagKey}`) === ev ? 1 : FADE_OPACITY2
41129
+ el.attr(`data-tag-${tagKey}`) === ev ? 1 : FADE_OPACITY
41281
41130
  );
41282
41131
  });
41283
- chartG.selectAll(".gantt-lane-band, .gantt-lane-accent").attr("opacity", FADE_OPACITY2);
41132
+ chartG.selectAll(".gantt-lane-band, .gantt-lane-accent").attr("opacity", FADE_OPACITY);
41284
41133
  } else {
41285
41134
  if (criticalPathActive) {
41286
41135
  applyCriticalPathHighlight(svg, chartG);
@@ -41385,27 +41234,27 @@ function renderErasAndMarkers(g, svg, resolved, xScale, innerHeight, palette, er
41385
41234
  eraG.on("mouseenter", () => {
41386
41235
  g.selectAll(".gantt-task").attr(
41387
41236
  "opacity",
41388
- FADE_OPACITY2
41237
+ FADE_OPACITY
41389
41238
  );
41390
41239
  g.selectAll(".gantt-milestone").attr(
41391
41240
  "opacity",
41392
- FADE_OPACITY2
41241
+ FADE_OPACITY
41393
41242
  );
41394
41243
  g.selectAll(
41395
41244
  ".gantt-group-bar, .gantt-group-summary"
41396
- ).attr("opacity", FADE_OPACITY2);
41397
- svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY2);
41398
- svg.selectAll(".gantt-task-label").attr("opacity", FADE_OPACITY2);
41399
- svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY2);
41245
+ ).attr("opacity", FADE_OPACITY);
41246
+ svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY);
41247
+ svg.selectAll(".gantt-task-label").attr("opacity", FADE_OPACITY);
41248
+ svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY);
41400
41249
  g.selectAll(
41401
41250
  ".gantt-lane-band, .gantt-lane-accent, .gantt-lane-band-group"
41402
- ).attr("opacity", FADE_OPACITY2);
41251
+ ).attr("opacity", FADE_OPACITY);
41403
41252
  g.selectAll(
41404
41253
  ".gantt-dep-arrow, .gantt-dep-arrowhead"
41405
- ).attr("opacity", FADE_OPACITY2);
41254
+ ).attr("opacity", FADE_OPACITY);
41406
41255
  g.selectAll(".gantt-marker-group").attr(
41407
41256
  "opacity",
41408
- FADE_OPACITY2
41257
+ FADE_OPACITY
41409
41258
  );
41410
41259
  eraRect.attr("opacity", hoverEraOpacity);
41411
41260
  if (eraTruncated) eraLabel.text(era.label);
@@ -41463,31 +41312,31 @@ function renderErasAndMarkers(g, svg, resolved, xScale, innerHeight, palette, er
41463
41312
  markerG.on("mouseenter", () => {
41464
41313
  g.selectAll(".gantt-task").attr(
41465
41314
  "opacity",
41466
- FADE_OPACITY2
41315
+ FADE_OPACITY
41467
41316
  );
41468
41317
  g.selectAll(".gantt-milestone").attr(
41469
41318
  "opacity",
41470
- FADE_OPACITY2
41319
+ FADE_OPACITY
41471
41320
  );
41472
41321
  g.selectAll(
41473
41322
  ".gantt-group-bar, .gantt-group-summary"
41474
- ).attr("opacity", FADE_OPACITY2);
41475
- svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY2);
41476
- svg.selectAll(".gantt-task-label").attr("opacity", FADE_OPACITY2);
41477
- svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY2);
41323
+ ).attr("opacity", FADE_OPACITY);
41324
+ svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY);
41325
+ svg.selectAll(".gantt-task-label").attr("opacity", FADE_OPACITY);
41326
+ svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY);
41478
41327
  g.selectAll(
41479
41328
  ".gantt-lane-band, .gantt-lane-accent, .gantt-lane-band-group"
41480
- ).attr("opacity", FADE_OPACITY2);
41329
+ ).attr("opacity", FADE_OPACITY);
41481
41330
  g.selectAll(
41482
41331
  ".gantt-dep-arrow, .gantt-dep-arrowhead"
41483
- ).attr("opacity", FADE_OPACITY2);
41332
+ ).attr("opacity", FADE_OPACITY);
41484
41333
  g.selectAll(".gantt-era-group").attr(
41485
41334
  "opacity",
41486
- FADE_OPACITY2
41335
+ FADE_OPACITY
41487
41336
  );
41488
41337
  g.selectAll(".gantt-marker-group").attr(
41489
41338
  "opacity",
41490
- FADE_OPACITY2
41339
+ FADE_OPACITY
41491
41340
  );
41492
41341
  markerG.attr("opacity", 1);
41493
41342
  markerLine.attr("opacity", 0.8);
@@ -41563,7 +41412,7 @@ function renderSprintBands(g, svg, resolved, xScale, innerHeight, palette) {
41563
41412
  const id = el.attr("data-task-id");
41564
41413
  el.attr(
41565
41414
  "opacity",
41566
- id && overlappingTaskIds.has(id) ? 1 : FADE_OPACITY2
41415
+ id && overlappingTaskIds.has(id) ? 1 : FADE_OPACITY
41567
41416
  );
41568
41417
  });
41569
41418
  g.selectAll(".gantt-milestone").each(function() {
@@ -41571,7 +41420,7 @@ function renderSprintBands(g, svg, resolved, xScale, innerHeight, palette) {
41571
41420
  const id = el.attr("data-task-id");
41572
41421
  el.attr(
41573
41422
  "opacity",
41574
- id && overlappingTaskIds.has(id) ? 1 : FADE_OPACITY2
41423
+ id && overlappingTaskIds.has(id) ? 1 : FADE_OPACITY
41575
41424
  );
41576
41425
  });
41577
41426
  svg.selectAll(".gantt-task-label").each(function() {
@@ -41579,7 +41428,7 @@ function renderSprintBands(g, svg, resolved, xScale, innerHeight, palette) {
41579
41428
  const id = el.attr("data-task-id");
41580
41429
  el.attr(
41581
41430
  "opacity",
41582
- id && overlappingTaskIds.has(id) ? 1 : FADE_OPACITY2
41431
+ id && overlappingTaskIds.has(id) ? 1 : FADE_OPACITY
41583
41432
  );
41584
41433
  });
41585
41434
  g.selectAll(
@@ -41589,7 +41438,7 @@ function renderSprintBands(g, svg, resolved, xScale, innerHeight, palette) {
41589
41438
  const name = el.attr("data-group");
41590
41439
  el.attr(
41591
41440
  "opacity",
41592
- name && overlappingGroupNames.has(name) ? 1 : FADE_OPACITY2
41441
+ name && overlappingGroupNames.has(name) ? 1 : FADE_OPACITY
41593
41442
  );
41594
41443
  });
41595
41444
  svg.selectAll(".gantt-group-label").each(function() {
@@ -41597,19 +41446,19 @@ function renderSprintBands(g, svg, resolved, xScale, innerHeight, palette) {
41597
41446
  const name = el.attr("data-group");
41598
41447
  el.attr(
41599
41448
  "opacity",
41600
- name && overlappingGroupNames.has(name) ? 1 : FADE_OPACITY2
41449
+ name && overlappingGroupNames.has(name) ? 1 : FADE_OPACITY
41601
41450
  );
41602
41451
  });
41603
- svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY2);
41452
+ svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY);
41604
41453
  g.selectAll(
41605
41454
  ".gantt-lane-band, .gantt-lane-accent, .gantt-lane-band-group"
41606
- ).attr("opacity", FADE_OPACITY2);
41455
+ ).attr("opacity", FADE_OPACITY);
41607
41456
  g.selectAll(
41608
41457
  ".gantt-dep-arrow, .gantt-dep-arrowhead"
41609
- ).attr("opacity", FADE_OPACITY2);
41458
+ ).attr("opacity", FADE_OPACITY);
41610
41459
  g.selectAll(".gantt-marker-group").attr(
41611
41460
  "opacity",
41612
- FADE_OPACITY2
41461
+ FADE_OPACITY
41613
41462
  );
41614
41463
  sprintRect.attr("opacity", SPRINT_HOVER_OPACITY);
41615
41464
  const startVisible = rawSx >= chartMinX;
@@ -41678,20 +41527,20 @@ function highlightDeps(g, svg, taskId, resolved) {
41678
41527
  g.selectAll(".gantt-task").each(function() {
41679
41528
  const el = d3Selection13.select(this);
41680
41529
  const id = el.attr("data-task-id");
41681
- el.attr("opacity", id && related.has(id) ? 1 : FADE_OPACITY2);
41530
+ el.attr("opacity", id && related.has(id) ? 1 : FADE_OPACITY);
41682
41531
  });
41683
41532
  g.selectAll(".gantt-milestone").attr(
41684
41533
  "opacity",
41685
- FADE_OPACITY2
41534
+ FADE_OPACITY
41686
41535
  );
41687
41536
  g.selectAll(
41688
41537
  ".gantt-group-bar, .gantt-group-summary"
41689
- ).attr("opacity", FADE_OPACITY2);
41690
- svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY2);
41691
- svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY2);
41538
+ ).attr("opacity", FADE_OPACITY);
41539
+ svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY);
41540
+ svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY);
41692
41541
  g.selectAll(".gantt-lane-band, .gantt-lane-accent").attr(
41693
41542
  "opacity",
41694
- FADE_OPACITY2
41543
+ FADE_OPACITY
41695
41544
  );
41696
41545
  g.selectAll(
41697
41546
  ".gantt-dep-arrow, .gantt-dep-arrowhead"
@@ -41700,52 +41549,52 @@ function highlightDeps(g, svg, taskId, resolved) {
41700
41549
  const from = el.attr("data-dep-from");
41701
41550
  const to = el.attr("data-dep-to");
41702
41551
  const isRelated = from && related.has(from) || to && related.has(to);
41703
- el.attr("opacity", isRelated ? 0.5 : FADE_OPACITY2);
41552
+ el.attr("opacity", isRelated ? 0.5 : FADE_OPACITY);
41704
41553
  });
41705
41554
  g.selectAll(".gantt-marker-group").attr(
41706
41555
  "opacity",
41707
- FADE_OPACITY2
41556
+ FADE_OPACITY
41708
41557
  );
41709
41558
  }
41710
41559
  function highlightGroup(g, svg, groupName) {
41711
41560
  g.selectAll(".gantt-task").each(function() {
41712
41561
  const el = d3Selection13.select(this);
41713
- el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY2);
41562
+ el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY);
41714
41563
  });
41715
41564
  g.selectAll(".gantt-milestone").each(function() {
41716
41565
  const el = d3Selection13.select(this);
41717
- el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY2);
41566
+ el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY);
41718
41567
  });
41719
41568
  g.selectAll(
41720
41569
  ".gantt-group-bar, .gantt-group-summary"
41721
41570
  ).each(function() {
41722
41571
  const el = d3Selection13.select(this);
41723
- el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY2);
41572
+ el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY);
41724
41573
  });
41725
41574
  svg.selectAll(".gantt-group-label").each(function() {
41726
41575
  const el = d3Selection13.select(this);
41727
- el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY2);
41576
+ el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY);
41728
41577
  });
41729
41578
  svg.selectAll(".gantt-task-label").each(function() {
41730
41579
  const el = d3Selection13.select(this);
41731
- el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY2);
41580
+ el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY);
41732
41581
  });
41733
41582
  svg.selectAll(".gantt-group-band-bg, .gantt-group-band-accent").each(function() {
41734
41583
  const el = d3Selection13.select(this);
41735
41584
  el.attr(
41736
41585
  "opacity",
41737
- el.attr("data-group") === groupName ? 1 : FADE_OPACITY2
41586
+ el.attr("data-group") === groupName ? 1 : FADE_OPACITY
41738
41587
  );
41739
41588
  });
41740
- svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY2);
41741
- svg.selectAll(".gantt-lane-band-bg, .gantt-lane-band-accent").attr("opacity", FADE_OPACITY2);
41589
+ svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY);
41590
+ svg.selectAll(".gantt-lane-band-bg, .gantt-lane-band-accent").attr("opacity", FADE_OPACITY);
41742
41591
  g.selectAll(".gantt-lane-band, .gantt-lane-accent").attr(
41743
41592
  "opacity",
41744
- FADE_OPACITY2
41593
+ FADE_OPACITY
41745
41594
  );
41746
41595
  g.selectAll(".gantt-marker-group").attr(
41747
41596
  "opacity",
41748
- FADE_OPACITY2
41597
+ FADE_OPACITY
41749
41598
  );
41750
41599
  }
41751
41600
  function highlightLane(g, svg, tagKey, laneName) {
@@ -41753,105 +41602,105 @@ function highlightLane(g, svg, tagKey, laneName) {
41753
41602
  const laneValue = laneName.toLowerCase();
41754
41603
  g.selectAll(".gantt-task").each(function() {
41755
41604
  const el = d3Selection13.select(this);
41756
- el.attr("opacity", el.attr(tagAttr) === laneValue ? 1 : FADE_OPACITY2);
41605
+ el.attr("opacity", el.attr(tagAttr) === laneValue ? 1 : FADE_OPACITY);
41757
41606
  });
41758
41607
  g.selectAll(".gantt-milestone").each(function() {
41759
41608
  const el = d3Selection13.select(this);
41760
- el.attr("opacity", el.attr(tagAttr) === laneValue ? 1 : FADE_OPACITY2);
41609
+ el.attr("opacity", el.attr(tagAttr) === laneValue ? 1 : FADE_OPACITY);
41761
41610
  });
41762
41611
  svg.selectAll(".gantt-task-label").each(function() {
41763
41612
  const el = d3Selection13.select(this);
41764
- el.attr("opacity", el.attr(tagAttr) === laneValue ? 1 : FADE_OPACITY2);
41613
+ el.attr("opacity", el.attr(tagAttr) === laneValue ? 1 : FADE_OPACITY);
41765
41614
  });
41766
41615
  svg.selectAll(".gantt-lane-header").each(function() {
41767
41616
  const el = d3Selection13.select(this);
41768
- el.attr("opacity", el.attr("data-lane") === laneName ? 1 : FADE_OPACITY2);
41617
+ el.attr("opacity", el.attr("data-lane") === laneName ? 1 : FADE_OPACITY);
41769
41618
  });
41770
41619
  g.selectAll(".gantt-lane-band-group").each(function() {
41771
41620
  const el = d3Selection13.select(this);
41772
- el.attr("opacity", el.attr("data-lane") === laneName ? 1 : FADE_OPACITY2);
41621
+ el.attr("opacity", el.attr("data-lane") === laneName ? 1 : FADE_OPACITY);
41773
41622
  });
41774
41623
  svg.selectAll(".gantt-lane-band-bg, .gantt-lane-band-accent").each(function() {
41775
41624
  const el = d3Selection13.select(this);
41776
- el.attr("opacity", el.attr("data-lane") === laneName ? 1 : FADE_OPACITY2);
41625
+ el.attr("opacity", el.attr("data-lane") === laneName ? 1 : FADE_OPACITY);
41777
41626
  });
41778
41627
  g.selectAll(
41779
41628
  ".gantt-group-bar, .gantt-group-summary"
41780
- ).attr("opacity", FADE_OPACITY2);
41781
- svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY2);
41782
- svg.selectAll(".gantt-group-band-bg, .gantt-group-band-accent").attr("opacity", FADE_OPACITY2);
41629
+ ).attr("opacity", FADE_OPACITY);
41630
+ svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY);
41631
+ svg.selectAll(".gantt-group-band-bg, .gantt-group-band-accent").attr("opacity", FADE_OPACITY);
41783
41632
  g.selectAll(".gantt-marker-group").attr(
41784
41633
  "opacity",
41785
- FADE_OPACITY2
41634
+ FADE_OPACITY
41786
41635
  );
41787
41636
  }
41788
41637
  function highlightTask(g, svg, taskId) {
41789
41638
  g.selectAll(".gantt-task").each(function() {
41790
41639
  const el = d3Selection13.select(this);
41791
- el.attr("opacity", el.attr("data-task-id") === taskId ? 1 : FADE_OPACITY2);
41640
+ el.attr("opacity", el.attr("data-task-id") === taskId ? 1 : FADE_OPACITY);
41792
41641
  });
41793
41642
  g.selectAll(".gantt-milestone").attr(
41794
41643
  "opacity",
41795
- FADE_OPACITY2
41644
+ FADE_OPACITY
41796
41645
  );
41797
41646
  svg.selectAll(".gantt-task-label").each(function() {
41798
41647
  const el = d3Selection13.select(this);
41799
- el.attr("opacity", el.attr("data-task-id") === taskId ? 1 : FADE_OPACITY2);
41648
+ el.attr("opacity", el.attr("data-task-id") === taskId ? 1 : FADE_OPACITY);
41800
41649
  });
41801
41650
  g.selectAll(
41802
41651
  ".gantt-group-bar, .gantt-group-summary"
41803
- ).attr("opacity", FADE_OPACITY2);
41804
- svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY2);
41805
- svg.selectAll(".gantt-group-band-bg, .gantt-group-band-accent").attr("opacity", FADE_OPACITY2);
41806
- svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY2);
41807
- svg.selectAll(".gantt-lane-band-bg, .gantt-lane-band-accent").attr("opacity", FADE_OPACITY2);
41652
+ ).attr("opacity", FADE_OPACITY);
41653
+ svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY);
41654
+ svg.selectAll(".gantt-group-band-bg, .gantt-group-band-accent").attr("opacity", FADE_OPACITY);
41655
+ svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY);
41656
+ svg.selectAll(".gantt-lane-band-bg, .gantt-lane-band-accent").attr("opacity", FADE_OPACITY);
41808
41657
  g.selectAll(
41809
41658
  ".gantt-lane-band, .gantt-lane-accent, .gantt-lane-band-group"
41810
- ).attr("opacity", FADE_OPACITY2);
41659
+ ).attr("opacity", FADE_OPACITY);
41811
41660
  g.selectAll(
41812
41661
  ".gantt-dep-arrow, .gantt-dep-arrowhead"
41813
- ).attr("opacity", FADE_OPACITY2);
41662
+ ).attr("opacity", FADE_OPACITY);
41814
41663
  g.selectAll(".gantt-marker-group").attr(
41815
41664
  "opacity",
41816
- FADE_OPACITY2
41665
+ FADE_OPACITY
41817
41666
  );
41818
41667
  }
41819
41668
  function highlightMilestone(g, svg, taskId) {
41820
41669
  g.selectAll(".gantt-task").attr(
41821
41670
  "opacity",
41822
- FADE_OPACITY2
41671
+ FADE_OPACITY
41823
41672
  );
41824
41673
  g.selectAll(".gantt-milestone").each(function() {
41825
41674
  const el = d3Selection13.select(this);
41826
- el.attr("opacity", el.attr("data-task-id") === taskId ? 1 : FADE_OPACITY2);
41675
+ el.attr("opacity", el.attr("data-task-id") === taskId ? 1 : FADE_OPACITY);
41827
41676
  });
41828
41677
  svg.selectAll(".gantt-task-label").each(function() {
41829
41678
  const el = d3Selection13.select(this);
41830
- el.attr("opacity", el.attr("data-task-id") === taskId ? 1 : FADE_OPACITY2);
41679
+ el.attr("opacity", el.attr("data-task-id") === taskId ? 1 : FADE_OPACITY);
41831
41680
  });
41832
41681
  g.selectAll(
41833
41682
  ".gantt-group-bar, .gantt-group-summary"
41834
- ).attr("opacity", FADE_OPACITY2);
41835
- svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY2);
41836
- svg.selectAll(".gantt-group-band-bg, .gantt-group-band-accent").attr("opacity", FADE_OPACITY2);
41837
- svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY2);
41838
- svg.selectAll(".gantt-lane-band-bg, .gantt-lane-band-accent").attr("opacity", FADE_OPACITY2);
41683
+ ).attr("opacity", FADE_OPACITY);
41684
+ svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY);
41685
+ svg.selectAll(".gantt-group-band-bg, .gantt-group-band-accent").attr("opacity", FADE_OPACITY);
41686
+ svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY);
41687
+ svg.selectAll(".gantt-lane-band-bg, .gantt-lane-band-accent").attr("opacity", FADE_OPACITY);
41839
41688
  g.selectAll(
41840
41689
  ".gantt-lane-band, .gantt-lane-accent, .gantt-lane-band-group"
41841
- ).attr("opacity", FADE_OPACITY2);
41690
+ ).attr("opacity", FADE_OPACITY);
41842
41691
  g.selectAll(
41843
41692
  ".gantt-dep-arrow, .gantt-dep-arrowhead"
41844
- ).attr("opacity", FADE_OPACITY2);
41693
+ ).attr("opacity", FADE_OPACITY);
41845
41694
  g.selectAll(".gantt-marker-group").attr(
41846
41695
  "opacity",
41847
- FADE_OPACITY2
41696
+ FADE_OPACITY
41848
41697
  );
41849
41698
  }
41850
41699
  function highlightTaskLabel(svg, lineNumber) {
41851
41700
  const ln = String(lineNumber);
41852
41701
  svg.selectAll(".gantt-task-label").each(function() {
41853
41702
  const el = d3Selection13.select(this);
41854
- el.attr("opacity", el.attr("data-line-number") === ln ? 1 : FADE_OPACITY2);
41703
+ el.attr("opacity", el.attr("data-line-number") === ln ? 1 : FADE_OPACITY);
41855
41704
  });
41856
41705
  }
41857
41706
  function resetTaskLabels(svg) {
@@ -42125,7 +41974,7 @@ function renderTimeScaleHorizontal(g, scale, _innerWidth, innerHeight, textColor
42125
41974
  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);
42126
41975
  }
42127
41976
  }
42128
- 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;
41977
+ 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;
42129
41978
  var init_renderer12 = __esm({
42130
41979
  "src/gantt/renderer.ts"() {
42131
41980
  "use strict";
@@ -42166,7 +42015,7 @@ var init_renderer12 = __esm({
42166
42015
  SPRINT_BAND_OPACITY = 0.05;
42167
42016
  SPRINT_HOVER_OPACITY = 0.12;
42168
42017
  SPRINT_BOUNDARY_OPACITY = 0.3;
42169
- FADE_OPACITY2 = 0.1;
42018
+ FADE_OPACITY = 0.1;
42170
42019
  MONTH_ABBR2 = [
42171
42020
  "Jan",
42172
42021
  "Feb",
@@ -47492,7 +47341,8 @@ function layoutMap(resolved, data, size, opts) {
47492
47341
  palette.bg,
47493
47342
  mutedBasemap ? isDark ? MUTED_FOREIGN_DARK : MUTED_FOREIGN_LIGHT : isDark ? FOREIGN_TINT_DARK : FOREIGN_TINT_LIGHT
47494
47343
  );
47495
- const colorizeActive = resolved.directives.noColorize !== true && !hasRamp && resolved.tagGroups.length === 0;
47344
+ const hasDirectColor = resolved.regions.some((r) => r.color !== void 0);
47345
+ const colorizeActive = resolved.directives.noColorize !== true && !hasRamp && !hasDirectColor && resolved.tagGroups.length === 0;
47496
47346
  const colorByIso = /* @__PURE__ */ new Map();
47497
47347
  if (colorizeActive) {
47498
47348
  const adjacency = /* @__PURE__ */ new Map();
@@ -47588,16 +47438,17 @@ function layoutMap(resolved, data, size, opts) {
47588
47438
  };
47589
47439
  }
47590
47440
  }
47441
+ const shownTitle = resolved.directives.noTitle ? null : resolved.title;
47591
47442
  const TITLE_GAP2 = 16;
47592
47443
  let topPad = FIT_PAD;
47593
- if (resolved.title && resolved.pois.length > 0) {
47444
+ if (shownTitle && resolved.pois.length > 0) {
47594
47445
  const bannerBottom = (resolved.subtitle ? TITLE_Y + TITLE_FONT_SIZE : TITLE_Y) + TITLE_FONT_SIZE / 2;
47595
47446
  topPad = Math.max(FIT_PAD, bannerBottom + TITLE_GAP2);
47596
47447
  }
47597
47448
  const legendBand = mapLegendBand(legend, {
47598
47449
  width,
47599
47450
  mode: opts.legendMode ?? "preview",
47600
- hasTitle: Boolean(resolved.title),
47451
+ hasTitle: Boolean(shownTitle),
47601
47452
  hasSubtitle: Boolean(resolved.subtitle)
47602
47453
  });
47603
47454
  if (legendBand > topPad) topPad = legendBand;
@@ -48686,7 +48537,7 @@ function layoutMap(resolved, data, size, opts) {
48686
48537
  width,
48687
48538
  height,
48688
48539
  background: water,
48689
- title: resolved.title,
48540
+ title: shownTitle,
48690
48541
  ...resolved.subtitle !== void 0 && { subtitle: resolved.subtitle },
48691
48542
  ...resolved.caption !== void 0 && { caption: resolved.caption },
48692
48543
  regions,
@@ -49095,9 +48946,10 @@ function renderMap(container, resolved, data, palette, isDark, onClickItem, expo
49095
48946
  wireSync(lt, leg.lineNumber);
49096
48947
  }
49097
48948
  });
48949
+ const clusterUi = !exportDims && !resolved.directives.noClusterPois;
49098
48950
  const gSpider = svg.append("g").attr("class", "dgmo-map-spider");
49099
48951
  for (const cl of layout.clusters) {
49100
- if (!exportDims) {
48952
+ if (clusterUi) {
49101
48953
  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");
49102
48954
  }
49103
48955
  for (const leg of cl.legs) {
@@ -49189,13 +49041,18 @@ function renderMap(container, resolved, data, palette, isDark, onClickItem, expo
49189
49041
  }
49190
49042
  wireSync(t, lab.lineNumber);
49191
49043
  }
49192
- if (!exportDims && layout.clusters.length) {
49044
+ if (clusterUi && layout.clusters.length) {
49193
49045
  const gBadge = svg.append("g").attr("class", "dgmo-map-cluster-badges");
49194
49046
  for (const cl of layout.clusters) {
49195
49047
  const g = gBadge.append("g").attr("data-cluster", cl.id).style("opacity", 0).style("pointer-events", "none");
49196
49048
  const R = 9;
49197
49049
  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);
49198
49050
  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);
49051
+ const beadR = R + 2.5;
49052
+ for (const leg of cl.legs) {
49053
+ const a = Math.atan2(leg.y2 - cl.cy, leg.x2 - cl.cx);
49054
+ 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);
49055
+ }
49199
49056
  emitText(
49200
49057
  g,
49201
49058
  cl.cx,
@@ -52120,10 +51977,12 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
52120
51977
  isDark ? 15 : 20
52121
51978
  ) : isDark ? palette.surface : palette.bg;
52122
51979
  const strokeColor = groupTagColor || palette.textMuted;
52123
- const groupG = svg.append("g").attr("class", "group-box-wrapper").attr("data-group-toggle", "").attr("data-group-line", String(group.lineNumber)).attr("cursor", "pointer");
51980
+ 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");
52124
51981
  groupG.append("title").text("Click to collapse");
52125
- 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");
52126
- 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);
51982
+ 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");
51983
+ 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");
51984
+ 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");
51985
+ 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);
52127
51986
  }
52128
51987
  const lifelineStartY = lifelineStartY0;
52129
51988
  participants.forEach((participant) => {
@@ -52165,7 +52024,7 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
52165
52024
  const participantG = svg.select(
52166
52025
  `.participant[data-participant-id="${participant.id}"]`
52167
52026
  );
52168
- participantG.attr("data-group-toggle", "").attr("data-group-line", String(meta.lineNumber)).attr("cursor", "pointer");
52027
+ 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");
52169
52028
  participantG.append("title").text("Click to expand");
52170
52029
  const pFill = effectiveTagColor ? mix(
52171
52030
  effectiveTagColor,
@@ -54148,7 +54007,7 @@ function renderArcDiagram(container, parsed, palette, _isDark, onClickItem, expo
54148
54007
  neighbors2.get(link.source).add(link.target);
54149
54008
  neighbors2.get(link.target).add(link.source);
54150
54009
  }
54151
- const FADE_OPACITY3 = 0.1;
54010
+ const FADE_OPACITY2 = 0.1;
54152
54011
  function handleMouseEnter(hovered) {
54153
54012
  const connected = neighbors2.get(hovered);
54154
54013
  g.selectAll(".arc-link").each(function() {
@@ -54156,13 +54015,13 @@ function renderArcDiagram(container, parsed, palette, _isDark, onClickItem, expo
54156
54015
  const src = el.attr("data-source");
54157
54016
  const tgt = el.attr("data-target");
54158
54017
  const isRelated = src === hovered || tgt === hovered;
54159
- el.attr("stroke-opacity", isRelated ? 0.85 : FADE_OPACITY3);
54018
+ el.attr("stroke-opacity", isRelated ? 0.85 : FADE_OPACITY2);
54160
54019
  });
54161
54020
  g.selectAll(".arc-node").each(function() {
54162
54021
  const el = d3Selection23.select(this);
54163
54022
  const name = el.attr("data-node");
54164
54023
  const isRelated = name === hovered || connected.has(name);
54165
- el.attr("opacity", isRelated ? 1 : FADE_OPACITY3);
54024
+ el.attr("opacity", isRelated ? 1 : FADE_OPACITY2);
54166
54025
  });
54167
54026
  }
54168
54027
  function handleMouseLeave() {
@@ -54186,11 +54045,11 @@ function renderArcDiagram(container, parsed, palette, _isDark, onClickItem, expo
54186
54045
  g.selectAll(".arc-link").each(function() {
54187
54046
  const el = d3Selection23.select(this);
54188
54047
  const isRelated = members.has(el.attr("data-source")) || members.has(el.attr("data-target"));
54189
- el.attr("stroke-opacity", isRelated ? 0.85 : FADE_OPACITY3);
54048
+ el.attr("stroke-opacity", isRelated ? 0.85 : FADE_OPACITY2);
54190
54049
  });
54191
54050
  g.selectAll(".arc-node").each(function() {
54192
54051
  const el = d3Selection23.select(this);
54193
- el.attr("opacity", members.has(el.attr("data-node")) ? 1 : FADE_OPACITY3);
54052
+ el.attr("opacity", members.has(el.attr("data-node")) ? 1 : FADE_OPACITY2);
54194
54053
  });
54195
54054
  g.selectAll(".arc-group-band").each(function() {
54196
54055
  const el = d3Selection23.select(this);
@@ -54712,23 +54571,23 @@ function setupTimeline(container, parsed, palette, isDark, exportDims, activeTag
54712
54571
  };
54713
54572
  }
54714
54573
  function makeTimelineHoverHelpers() {
54715
- const FADE_OPACITY3 = 0.1;
54574
+ const FADE_OPACITY2 = 0.1;
54716
54575
  function fadeToGroup(g, groupName) {
54717
54576
  g.selectAll(".tl-event").each(function() {
54718
54577
  const el = d3Selection23.select(this);
54719
54578
  const evGroup = el.attr("data-group");
54720
- el.attr("opacity", evGroup === groupName ? 1 : FADE_OPACITY3);
54579
+ el.attr("opacity", evGroup === groupName ? 1 : FADE_OPACITY2);
54721
54580
  });
54722
54581
  g.selectAll(".tl-legend-item, .tl-lane-header").each(
54723
54582
  function() {
54724
54583
  const el = d3Selection23.select(this);
54725
54584
  const name = el.attr("data-group");
54726
- el.attr("opacity", name === groupName ? 1 : FADE_OPACITY3);
54585
+ el.attr("opacity", name === groupName ? 1 : FADE_OPACITY2);
54727
54586
  }
54728
54587
  );
54729
54588
  g.selectAll(".tl-marker").attr(
54730
54589
  "opacity",
54731
- FADE_OPACITY3
54590
+ FADE_OPACITY2
54732
54591
  );
54733
54592
  }
54734
54593
  function fadeToEra(g, eraStart, eraEnd) {
@@ -54738,40 +54597,40 @@ function makeTimelineHoverHelpers() {
54738
54597
  const endDate = el.attr("data-end-date");
54739
54598
  const evEnd = endDate ? parseFloat(endDate) : date;
54740
54599
  const inside = evEnd >= eraStart && date <= eraEnd;
54741
- el.attr("opacity", inside ? 1 : FADE_OPACITY3);
54600
+ el.attr("opacity", inside ? 1 : FADE_OPACITY2);
54742
54601
  });
54743
54602
  g.selectAll(".tl-legend-item, .tl-lane-header").attr(
54744
54603
  "opacity",
54745
- FADE_OPACITY3
54604
+ FADE_OPACITY2
54746
54605
  );
54747
54606
  g.selectAll(".tl-era").each(function() {
54748
54607
  const el = d3Selection23.select(this);
54749
54608
  const s = parseFloat(el.attr("data-era-start"));
54750
54609
  const e = parseFloat(el.attr("data-era-end"));
54751
54610
  const isSelf = s === eraStart && e === eraEnd;
54752
- el.attr("opacity", isSelf ? 1 : FADE_OPACITY3);
54611
+ el.attr("opacity", isSelf ? 1 : FADE_OPACITY2);
54753
54612
  });
54754
54613
  g.selectAll(".tl-marker").each(function() {
54755
54614
  const el = d3Selection23.select(this);
54756
54615
  const date = parseFloat(el.attr("data-marker-date"));
54757
54616
  const inside = date >= eraStart && date <= eraEnd;
54758
- el.attr("opacity", inside ? 1 : FADE_OPACITY3);
54617
+ el.attr("opacity", inside ? 1 : FADE_OPACITY2);
54759
54618
  });
54760
54619
  }
54761
54620
  function fadeToMarker(g, markerDate) {
54762
54621
  g.selectAll(".tl-event").attr(
54763
54622
  "opacity",
54764
- FADE_OPACITY3
54623
+ FADE_OPACITY2
54765
54624
  );
54766
- g.selectAll(".tl-era").attr("opacity", FADE_OPACITY3);
54625
+ g.selectAll(".tl-era").attr("opacity", FADE_OPACITY2);
54767
54626
  g.selectAll(".tl-legend-item, .tl-lane-header").attr(
54768
54627
  "opacity",
54769
- FADE_OPACITY3
54628
+ FADE_OPACITY2
54770
54629
  );
54771
54630
  g.selectAll(".tl-marker").each(function() {
54772
54631
  const el = d3Selection23.select(this);
54773
54632
  const date = parseFloat(el.attr("data-marker-date"));
54774
- el.attr("opacity", date === markerDate ? 1 : FADE_OPACITY3);
54633
+ el.attr("opacity", date === markerDate ? 1 : FADE_OPACITY2);
54775
54634
  });
54776
54635
  }
54777
54636
  function fadeReset(g) {
@@ -54785,15 +54644,15 @@ function makeTimelineHoverHelpers() {
54785
54644
  g.selectAll(".tl-event").each(function() {
54786
54645
  const el = d3Selection23.select(this);
54787
54646
  const val = el.attr(attrName);
54788
- el.attr("opacity", val === tagValue ? 1 : FADE_OPACITY3);
54647
+ el.attr("opacity", val === tagValue ? 1 : FADE_OPACITY2);
54789
54648
  });
54790
54649
  g.selectAll(".tl-legend-item, .tl-lane-header").attr(
54791
54650
  "opacity",
54792
- FADE_OPACITY3
54651
+ FADE_OPACITY2
54793
54652
  );
54794
54653
  g.selectAll(".tl-marker").attr(
54795
54654
  "opacity",
54796
- FADE_OPACITY3
54655
+ FADE_OPACITY2
54797
54656
  );
54798
54657
  g.selectAll(".tl-tag-legend-entry").each(function() {
54799
54658
  const el = d3Selection23.select(this);
@@ -54802,7 +54661,7 @@ function makeTimelineHoverHelpers() {
54802
54661
  const entryGroup = el.attr("data-tag-group");
54803
54662
  el.attr(
54804
54663
  "opacity",
54805
- entryGroup === tagKey && entryValue === tagValue ? 1 : FADE_OPACITY3
54664
+ entryGroup === tagKey && entryValue === tagValue ? 1 : FADE_OPACITY2
54806
54665
  );
54807
54666
  });
54808
54667
  }
@@ -54812,7 +54671,7 @@ function makeTimelineHoverHelpers() {
54812
54671
  }
54813
54672
  }
54814
54673
  return {
54815
- FADE_OPACITY: FADE_OPACITY3,
54674
+ FADE_OPACITY: FADE_OPACITY2,
54816
54675
  fadeToGroup,
54817
54676
  fadeToEra,
54818
54677
  fadeToMarker,
@@ -54824,7 +54683,7 @@ function makeTimelineHoverHelpers() {
54824
54683
  function renderTimelineTagLegendOverlay(container, parsed, palette, isDark, setup, hovers, onClickItem, exportDims, swimlaneTagGroup, activeTagGroup, onTagStateChange, viewMode, exportMode) {
54825
54684
  if (parsed.timelineTagGroups.length === 0) return;
54826
54685
  const { width, textColor, groupColorMap, solid } = setup;
54827
- const { FADE_OPACITY: FADE_OPACITY3, fadeReset, fadeToTagValue } = hovers;
54686
+ const { FADE_OPACITY: FADE_OPACITY2, fadeReset, fadeToTagValue } = hovers;
54828
54687
  const title = parsed.noTitle ? null : parsed.title;
54829
54688
  const { timelineEvents } = parsed;
54830
54689
  const LG_HEIGHT = LEGEND_HEIGHT;
@@ -54914,7 +54773,7 @@ function renderTimelineTagLegendOverlay(container, parsed, palette, isDark, setu
54914
54773
  const eg = el.attr("data-tag-group") ?? el.node()?.closest?.("[data-tag-group]")?.getAttribute("data-tag-group");
54915
54774
  el.attr(
54916
54775
  "opacity",
54917
- eg === tagKey && ev === tagVal ? 1 : FADE_OPACITY3
54776
+ eg === tagKey && ev === tagVal ? 1 : FADE_OPACITY2
54918
54777
  );
54919
54778
  });
54920
54779
  } else {
@@ -57673,6 +57532,9 @@ async function renderForExport(content, theme, palette, viewState, options) {
57673
57532
  const { renderSequenceDiagram: renderSequenceDiagram2 } = await Promise.resolve().then(() => (init_renderer20(), renderer_exports20));
57674
57533
  const seqParsed = parseSequenceDgmo2(content);
57675
57534
  if (seqParsed.error || seqParsed.participants.length === 0) return "";
57535
+ const collapsedSections = viewState?.cs ? new Set(viewState.cs) : void 0;
57536
+ const collapsedGroups = viewState?.cg ? new Set(viewState.cg.map(Number).filter((n) => Number.isFinite(n))) : void 0;
57537
+ const seqActiveTagGroup = viewState?.tag ?? options?.tagGroup;
57676
57538
  renderSequenceDiagram2(
57677
57539
  container,
57678
57540
  seqParsed,
@@ -57681,9 +57543,11 @@ async function renderForExport(content, theme, palette, viewState, options) {
57681
57543
  void 0,
57682
57544
  {
57683
57545
  exportWidth: EXPORT_WIDTH,
57684
- ...options?.tagGroup !== void 0 && {
57685
- activeTagGroup: options.tagGroup
57686
- }
57546
+ ...seqActiveTagGroup !== void 0 && {
57547
+ activeTagGroup: seqActiveTagGroup
57548
+ },
57549
+ ...collapsedSections !== void 0 && { collapsedSections },
57550
+ ...collapsedGroups !== void 0 && { collapsedGroups }
57687
57551
  }
57688
57552
  );
57689
57553
  } else if (parsed.type === "wordcloud") {
@@ -58634,6 +58498,7 @@ var DIRECTIVE_KEYWORDS = /* @__PURE__ */ new Set([
58634
58498
  "no-region-labels",
58635
58499
  "no-poi-labels",
58636
58500
  "no-colorize",
58501
+ "no-cluster-pois",
58637
58502
  "poi",
58638
58503
  "route",
58639
58504
  // Data charts
@@ -59303,7 +59168,7 @@ pre.dgmo, code.language-dgmo, pre > code.language-dgmo,
59303
59168
 
59304
59169
  // src/auto/index.ts
59305
59170
  init_safe_href();
59306
- var VERSION = "0.24.0";
59171
+ var VERSION = "0.25.1";
59307
59172
  var DEFAULTS = {
59308
59173
  theme: "auto",
59309
59174
  palette: "nord",