Skip to content

Automate browser based workflows with AI

4.7 KB
Raw Blame
.react-flow__panel.top.center {
  margin: 0;
  top: 2rem;
  width: calc(100% - 3rem);
}

.react-flow__panel.top.right {
  margin: 0;
  top: 7.75rem;
  right: 1.5rem;
}

.react-flow__node-regular {
  @apply bg-slate-elevation3;
}

@keyframes skBlockHighlightFlash {
  0%,
  60% {
    box-shadow:
      0 0 0 2px var(--skyvern-gold, #facc15),
      0 0 24px rgba(234, 179, 8, 0.45);
  }
  100% {
    box-shadow: none;
  }
}

/* Class set by useWorkflowGraphState's highlightBlock (COPILOT_BLOCK_HIGHLIGHT_CLASS).
   Deliberately not `.selected` — that flag also tracks the editor's sidebar
   selection, so keying off it flashed on every normal node click. */
.react-flow__node.sk-copilot-block-highlight
  > div
  > .rounded-lg.transition-shadow,
.react-flow__node.sk-copilot-block-highlight
  > div
  > div
  > .rounded-lg.transition-shadow {
  animation: skBlockHighlightFlash 1.4s ease-out forwards;
  border-radius: 8px;
}

/* Smooth transitions for node position and size changes */
.react-flow__node {
  transition: transform 0.2s ease-out;
}

/* Smooth transitions for edge position updates */
.react-flow__edge path,
.react-flow__edge-path {
  transition: d 0.2s ease-out;
}

.react-flow__edge text,
.react-flow__edge-text {
  transition: transform 0.2s ease-out;
}

/*
 * Initial load animation phases:
 * 1. "pre-layout" - nodes/edges are hidden (opacity: 0) while Dagre computes positions
 * 2. "initial-load" - nodes/edges fade in at their final positions (opacity transition only)
 * 3. "ready" (no class) - normal operation with position transitions
 *
 * The fade-in duration (300ms) is coupled with the setTimeout in FlowRenderer.tsx (350ms).
 */

/* Before layout completes, hide everything */
.react-flow--pre-layout .react-flow__node {
  opacity: 0;
}

.react-flow--pre-layout .react-flow__edge path,
.react-flow--pre-layout .react-flow__edge-path {
  opacity: 0;
}

.react-flow--pre-layout .react-flow__edge text,
.react-flow--pre-layout .react-flow__edge-text {
  opacity: 0;
}

/* During initial load, override position transitions with opacity fade-in */
.react-flow--initial-load .react-flow__node {
  transition: opacity 0.3s ease-in;
}

.react-flow--initial-load .react-flow__edge path,
.react-flow--initial-load .react-flow__edge-path {
  transition: opacity 0.3s ease-in;
}

.react-flow--initial-load .react-flow__edge text,
.react-flow--initial-load .react-flow__edge-text {
  transition: opacity 0.3s ease-in;
}

.react-flow__handle-top {
  top: 3px;
}

.react-flow__handle-bottom {
  bottom: 3px;
}

.react-flow__attribution {
  background-color: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  border-radius: 4px;
  color: hsl(var(--muted-foreground));
}

/* TooltipTrigger wraps each ControlButton in a <div> that defaults to
   display:block. Without flex, the div's hit area can diverge from the
   button's visual bounds — the clickable region shifts upward and overlaps
   the preceding button's tooltip zone. */
.react-flow__controls > div {
  display: flex;
}

.dark .react-flow__attribution {
  background-color: hsl(var(--slate-elevation-2));
  color: hsl(var(--foreground));
}

html:not(.dark) .workflow-editor-shell .workflow-editor-tip {
  background-color: rgb(248 250 252);
  border: 1px solid rgb(226 232 240);
  color: rgb(71 85 105);
}

html:not(.dark) .workflow-editor-shell .workflow-editor-tip-icon {
  background-color: rgb(226 232 240);
  color: rgb(51 65 85);
}

html:not(.dark) .workflow-editor-shell .workflow-editor-tip code {
  color: rgb(15 23 42);
}

/* Restore xyflow's between-button divider when a ControlButton is wrapped in a
   <TooltipTrigger asChild> div, since the wrapper makes the button :last-child
   of its parent and xyflow's default `:last-child { border-bottom: none }` zeros
   the divider. We re-assert the border on every wrapped button, then drop it on
   the actual last wrapper to preserve the trailing-edge no-border behavior. */
.react-flow__controls > div .react-flow__controls-button {
  border-bottom: 1px solid
    var(
      --xy-controls-button-border-color,
      var(--xy-controls-button-border-color-default)
    );
}

.react-flow__controls > div:last-child .react-flow__controls-button {
  border-bottom: none;
}

/* Map xyflow's hover tokens to the editor's low-emphasis icon-button
   vocabulary (cf. BlockConfigSidebar/WorkflowComparisonPanel close buttons):
   muted icon at rest, elevated-but-not-pure-white on hover, with bg shifting
   to --muted instead of xyflow's near-white default. */
.react-flow__controls .react-flow__controls-button {
  --xy-controls-button-background-color: hsl(var(--slate-elevation-3));
  --xy-controls-button-color: hsl(var(--muted-foreground));
  --xy-controls-button-background-color-hover: hsl(var(--muted));
  --xy-controls-button-color-hover: hsl(var(--foreground));
}