gantt-lib 0.141.1 → 0.141.2

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.mjs CHANGED
@@ -6025,7 +6025,7 @@ var DragGuideLines = ({
6025
6025
  var DragGuideLines_default = DragGuideLines;
6026
6026
 
6027
6027
  // src/components/DependencyLines/DependencyLines.tsx
6028
- import React6, { useMemo as useMemo6, useState as useState3 } from "react";
6028
+ import React6, { useId, useMemo as useMemo6, useState as useState3 } from "react";
6029
6029
  import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
6030
6030
  function isTaskHidden(taskId, collapsedParentIds, taskMap) {
6031
6031
  const task = taskMap.get(taskId);
@@ -6076,6 +6076,8 @@ var DependencyLines = React6.memo(({
6076
6076
  onDependencyClick,
6077
6077
  horizontalWindow
6078
6078
  }) => {
6079
+ const markerPrefix = `gantt-dependency-${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
6080
+ const markerId = (kind) => `${markerPrefix}-${kind}`;
6079
6081
  const [hoveredLineId, setHoveredLineId] = useState3(null);
6080
6082
  const tasksForPositions = allTasks ?? tasks;
6081
6083
  const { taskPositions, taskIndices, hiddenTaskIds } = useMemo6(() => {
@@ -6260,7 +6262,7 @@ var DependencyLines = React6.memo(({
6260
6262
  /* @__PURE__ */ jsx7(
6261
6263
  "marker",
6262
6264
  {
6263
- id: "arrowhead",
6265
+ id: markerId("arrowhead"),
6264
6266
  markerWidth: "8",
6265
6267
  markerHeight: "6",
6266
6268
  markerUnits: "userSpaceOnUse",
@@ -6279,7 +6281,7 @@ var DependencyLines = React6.memo(({
6279
6281
  /* @__PURE__ */ jsx7(
6280
6282
  "marker",
6281
6283
  {
6282
- id: "arrowhead-cycle",
6284
+ id: markerId("arrowhead-cycle"),
6283
6285
  markerWidth: "8",
6284
6286
  markerHeight: "6",
6285
6287
  markerUnits: "userSpaceOnUse",
@@ -6298,7 +6300,7 @@ var DependencyLines = React6.memo(({
6298
6300
  /* @__PURE__ */ jsx7(
6299
6301
  "marker",
6300
6302
  {
6301
- id: "arrowhead-selected",
6303
+ id: markerId("arrowhead-selected"),
6302
6304
  markerWidth: "8",
6303
6305
  markerHeight: "6",
6304
6306
  markerUnits: "userSpaceOnUse",
@@ -6317,7 +6319,7 @@ var DependencyLines = React6.memo(({
6317
6319
  /* @__PURE__ */ jsx7(
6318
6320
  "marker",
6319
6321
  {
6320
- id: "arrowhead-hover",
6322
+ id: markerId("arrowhead-hover"),
6321
6323
  markerWidth: "8",
6322
6324
  markerHeight: "6",
6323
6325
  markerUnits: "userSpaceOnUse",
@@ -6336,7 +6338,7 @@ var DependencyLines = React6.memo(({
6336
6338
  /* @__PURE__ */ jsx7(
6337
6339
  "marker",
6338
6340
  {
6339
- id: "arrowhead-critical",
6341
+ id: markerId("arrowhead-critical"),
6340
6342
  markerWidth: "8",
6341
6343
  markerHeight: "6",
6342
6344
  markerUnits: "userSpaceOnUse",
@@ -6362,10 +6364,11 @@ var DependencyLines = React6.memo(({
6362
6364
  else if (isCritical) pathClassName += " gantt-dependency-critical";
6363
6365
  if (isVirtual && !isSelected) pathClassName += " gantt-dependency-virtual";
6364
6366
  let markerEnd;
6365
- if (isSelected) markerEnd = "url(#arrowhead-selected)";
6366
- else if (hasCycle) markerEnd = "url(#arrowhead-cycle)";
6367
- else if (isCritical) markerEnd = "url(#arrowhead-critical)";
6368
- else markerEnd = "url(#arrowhead)";
6367
+ if (isHovered) markerEnd = `url(#${markerId("arrowhead-hover")})`;
6368
+ else if (isSelected) markerEnd = `url(#${markerId("arrowhead-selected")})`;
6369
+ else if (hasCycle) markerEnd = `url(#${markerId("arrowhead-cycle")})`;
6370
+ else if (isCritical) markerEnd = `url(#${markerId("arrowhead-critical")})`;
6371
+ else markerEnd = `url(#${markerId("arrowhead")})`;
6369
6372
  const lagColor = isSelected ? "#ef4444" : hasCycle ? "var(--gantt-dependency-cycle-color, #ef4444)" : isCritical ? "var(--gantt-critical-path-color, #dc2626)" : "var(--gantt-dependency-line-color, #666666)";
6370
6373
  return /* @__PURE__ */ jsxs5(React6.Fragment, { children: [
6371
6374
  /* @__PURE__ */ jsxs5(