@railtownai/railtracks-visualizer 0.0.38 → 0.0.39

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/cjs/index.js CHANGED
@@ -14488,24 +14488,16 @@ const Edge = ({ id, sourceX, sourceY, targetX, targetY, sourcePosition, targetPo
14488
14488
  const [isHovered, setIsHovered] = React.useState(false);
14489
14489
  const { theme } = useTheme();
14490
14490
  const themeColors = theme.colors;
14491
- // Function to determine stroke color based on edge state and theme
14491
+ // Function to determine stroke color based on edge status and theme
14492
14492
  const getStrokeColor = ()=>{
14493
- const state = data?.details?.state;
14494
14493
  const status = data?.details?.status;
14495
- const output = data?.details?.output;
14494
+ data?.details?.output;
14496
14495
  // Check for error indicators
14497
- const hasError = state === "Error" || status === "Error" || typeof output === "string" && output.includes("ERROR:");
14496
+ const hasError = status === "Failed";
14498
14497
  if (hasError) {
14499
14498
  return themeColors.destructive;
14500
14499
  }
14501
- switch(state){
14502
- case "Open":
14503
- return themeColors.mutedForeground;
14504
- case "Completed":
14505
- return themeColors.mutedForeground;
14506
- default:
14507
- return themeColors.mutedForeground;
14508
- }
14500
+ return themeColors.mutedForeground;
14509
14501
  };
14510
14502
  const [edgePath] = React.useMemo(()=>{
14511
14503
  return getSmoothStepPath({
@@ -20707,8 +20699,6 @@ const AgenticFlowVisualizer = ({ flowData: propFlowData, width = "100dvw", heigh
20707
20699
  minWidth: "800px",
20708
20700
  minHeight: "600px",
20709
20701
  boxSizing: "border-box",
20710
- border: `1px solid ${themeColors.border}`,
20711
- borderRadius: "8px",
20712
20702
  overflow: "hidden",
20713
20703
  position: "relative",
20714
20704
  background: themeColors.background
@@ -20860,6 +20850,7 @@ const AgenticFlowVisualizer = ({ flowData: propFlowData, width = "100dvw", heigh
20860
20850
  }, /*#__PURE__*/ React.createElement(Background, {
20861
20851
  variant: BackgroundVariant.Dots,
20862
20852
  color: themeColors.mutedBorder,
20853
+ bgColor: themeColors.background,
20863
20854
  size: 3
20864
20855
  })), /*#__PURE__*/ React.createElement("style", null, `
20865
20856
  .react-flow__edge-label {
@@ -24565,7 +24556,9 @@ var ScrollDownButton = SelectScrollDownButton$1;
24565
24556
  var Separator = SelectSeparator$1;
24566
24557
 
24567
24558
  const Select = Root2;
24568
- const SelectValue = Value;
24559
+ const SelectValue = styled(Value)`
24560
+ font-family: inherit;
24561
+ `;
24569
24562
  const SelectTrigger = styled(Trigger)`
24570
24563
  display: flex;
24571
24564
  height: 2.5rem;
@@ -24595,6 +24588,7 @@ const SelectTrigger = styled(Trigger)`
24595
24588
  }
24596
24589
 
24597
24590
  &[data-placeholder] {
24591
+ font-family: inherit;
24598
24592
  color: ${(props)=>props.$theme.colors.mutedForeground};
24599
24593
  }
24600
24594
  `;
package/dist/esm/index.js CHANGED
@@ -14468,24 +14468,16 @@ const Edge = ({ id, sourceX, sourceY, targetX, targetY, sourcePosition, targetPo
14468
14468
  const [isHovered, setIsHovered] = useState(false);
14469
14469
  const { theme } = useTheme();
14470
14470
  const themeColors = theme.colors;
14471
- // Function to determine stroke color based on edge state and theme
14471
+ // Function to determine stroke color based on edge status and theme
14472
14472
  const getStrokeColor = ()=>{
14473
- const state = data?.details?.state;
14474
14473
  const status = data?.details?.status;
14475
- const output = data?.details?.output;
14474
+ data?.details?.output;
14476
14475
  // Check for error indicators
14477
- const hasError = state === "Error" || status === "Error" || typeof output === "string" && output.includes("ERROR:");
14476
+ const hasError = status === "Failed";
14478
14477
  if (hasError) {
14479
14478
  return themeColors.destructive;
14480
14479
  }
14481
- switch(state){
14482
- case "Open":
14483
- return themeColors.mutedForeground;
14484
- case "Completed":
14485
- return themeColors.mutedForeground;
14486
- default:
14487
- return themeColors.mutedForeground;
14488
- }
14480
+ return themeColors.mutedForeground;
14489
14481
  };
14490
14482
  const [edgePath] = useMemo(()=>{
14491
14483
  return getSmoothStepPath({
@@ -20687,8 +20679,6 @@ const AgenticFlowVisualizer = ({ flowData: propFlowData, width = "100dvw", heigh
20687
20679
  minWidth: "800px",
20688
20680
  minHeight: "600px",
20689
20681
  boxSizing: "border-box",
20690
- border: `1px solid ${themeColors.border}`,
20691
- borderRadius: "8px",
20692
20682
  overflow: "hidden",
20693
20683
  position: "relative",
20694
20684
  background: themeColors.background
@@ -20840,6 +20830,7 @@ const AgenticFlowVisualizer = ({ flowData: propFlowData, width = "100dvw", heigh
20840
20830
  }, /*#__PURE__*/ React__default.createElement(Background, {
20841
20831
  variant: BackgroundVariant.Dots,
20842
20832
  color: themeColors.mutedBorder,
20833
+ bgColor: themeColors.background,
20843
20834
  size: 3
20844
20835
  })), /*#__PURE__*/ React__default.createElement("style", null, `
20845
20836
  .react-flow__edge-label {
@@ -24545,7 +24536,9 @@ var ScrollDownButton = SelectScrollDownButton$1;
24545
24536
  var Separator = SelectSeparator$1;
24546
24537
 
24547
24538
  const Select = Root2;
24548
- const SelectValue = Value;
24539
+ const SelectValue = styled(Value)`
24540
+ font-family: inherit;
24541
+ `;
24549
24542
  const SelectTrigger = styled(Trigger)`
24550
24543
  display: flex;
24551
24544
  height: 2.5rem;
@@ -24575,6 +24568,7 @@ const SelectTrigger = styled(Trigger)`
24575
24568
  }
24576
24569
 
24577
24570
  &[data-placeholder] {
24571
+ font-family: inherit;
24578
24572
  color: ${(props)=>props.$theme.colors.mutedForeground};
24579
24573
  }
24580
24574
  `;
@@ -1,4 +1,5 @@
1
1
  import React from "react";
2
+ import { AgentRunEdgeDetails } from "../dto";
2
3
  interface EdgeProps {
3
4
  id: string;
4
5
  sourceX: number;
@@ -16,7 +17,7 @@ interface EdgeProps {
16
17
  target?: string;
17
18
  step?: number;
18
19
  time?: number;
19
- details?: any;
20
+ details?: AgentRunEdgeDetails;
20
21
  };
21
22
  clientToSvgCoords?: (clientX: number, clientY: number) => {
22
23
  x: number;
@@ -2,7 +2,9 @@ import * as React from "react";
2
2
  import * as SelectPrimitive from "@radix-ui/react-select";
3
3
  declare const Select: React.FC<SelectPrimitive.SelectProps>;
4
4
  declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
5
- declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
5
+ declare const SelectValue: import("@emotion/styled").StyledComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement> & {
6
+ theme?: import("@emotion/react").Theme;
7
+ }, {}, {}>;
6
8
  declare const SelectTriggerWithRef: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
7
9
  declare const SelectScrollUpButtonWithRef: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
10
  declare const SelectScrollDownButtonWithRef: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@railtownai/railtracks-visualizer",
3
- "version": "0.0.38",
3
+ "version": "0.0.39",
4
4
  "license": "MIT",
5
5
  "author": "Railtown AI",
6
6
  "description": "A visualizer for Railtracks agentic flows",