@industry-theme/principal-view-panels 0.12.95 → 0.12.96

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.
@@ -181719,15 +181719,23 @@ const GraphRendererInner = ({ configuration, nodes: propNodes, edges: propEdges,
181719
181719
  };
181720
181720
  function useCanvasToLegacy(canvas, library, spansCanvas, workflowSpanPattern) {
181721
181721
  return useMemo(() => {
181722
- var _a2, _b2, _c;
181722
+ var _a2, _b2, _c, _d, _e4, _f, _g;
181723
181723
  if (!canvas)
181724
181724
  return null;
181725
181725
  const { nodes, edges } = CanvasConverter.canvasToGraph(canvas);
181726
+ const canvasEdgeMap = new Map(((_a2 = canvas.edges) == null ? void 0 : _a2.map((e) => [e.id, e])) || []);
181727
+ for (const edge of edges) {
181728
+ const canvasEdge = canvasEdgeMap.get(edge.id);
181729
+ if (canvasEdge) {
181730
+ const edgeType = canvasEdge.edgeType || ((_b2 = canvasEdge.pv) == null ? void 0 : _b2.edgeType) || "default";
181731
+ edge.type = edgeType;
181732
+ }
181733
+ }
181726
181734
  const scopeColorMap = buildScopeColorMap(library);
181727
181735
  const spanColorMap = buildSpanColorMap(spansCanvas);
181728
181736
  const spanColor = resolveEventSpanColor(workflowSpanPattern, spanColorMap);
181729
181737
  for (const node2 of nodes) {
181730
- const otel = (_a2 = node2.data) == null ? void 0 : _a2.otel;
181738
+ const otel = (_c = node2.data) == null ? void 0 : _c.otel;
181731
181739
  const scope = otel == null ? void 0 : otel.scope;
181732
181740
  let nodeScopeColor;
181733
181741
  if (scope && scopeColorMap[scope]) {
@@ -181783,7 +181791,7 @@ function useCanvasToLegacy(canvas, library, spansCanvas, workflowSpanPattern) {
181783
181791
  const vv = node2.pv;
181784
181792
  const nodeType = (vv == null ? void 0 : vv.nodeType) || node2.type;
181785
181793
  if (!nodeTypes2[nodeType]) {
181786
- const fillColor = (vv == null ? void 0 : vv.fill) || (typeof node2.color === "string" ? node2.color : void 0) || ((_c = (_b2 = vv == null ? void 0 : vv.states) == null ? void 0 : _b2.idle) == null ? void 0 : _c.color);
181794
+ const fillColor = (vv == null ? void 0 : vv.fill) || (typeof node2.color === "string" ? node2.color : void 0) || ((_e4 = (_d = vv == null ? void 0 : vv.states) == null ? void 0 : _d.idle) == null ? void 0 : _e4.color);
181787
181795
  let nodeDescription = `${nodeType} node`;
181788
181796
  if (node2.type === "text" && "text" in node2) {
181789
181797
  const lines = node2.text.split("\n");
@@ -181805,8 +181813,9 @@ function useCanvasToLegacy(canvas, library, spansCanvas, workflowSpanPattern) {
181805
181813
  };
181806
181814
  }
181807
181815
  }
181808
- if (canvas.edgeTypes) {
181809
- for (const [id2, def] of Object.entries(canvas.edgeTypes)) {
181816
+ const canvasEdgeTypes = canvas.edgeTypes || ((_f = canvas.pv) == null ? void 0 : _f.edgeTypes);
181817
+ if (canvasEdgeTypes) {
181818
+ for (const [id2, def] of Object.entries(canvasEdgeTypes)) {
181810
181819
  edgeTypes2[id2] = {
181811
181820
  style: def.style || "solid",
181812
181821
  color: def.color,
@@ -181819,7 +181828,7 @@ function useCanvasToLegacy(canvas, library, spansCanvas, workflowSpanPattern) {
181819
181828
  }
181820
181829
  const allowedConnections = [];
181821
181830
  for (const edge of canvas.edges || []) {
181822
- const edgeType = edge.edgeType || "default";
181831
+ const edgeType = edge.edgeType || ((_g = edge.pv) == null ? void 0 : _g.edgeType) || "default";
181823
181832
  if (!edgeTypes2[edgeType]) {
181824
181833
  edgeTypes2[edgeType] = {
181825
181834
  style: "solid",