Flow canvas: mark streaming edges with a marching dash
A port with `stream` set publishes repeatedly during one execution, and until now nothing on the canvas said so. `deriveEdges` carries the flag from the producing `MessageSpec` onto the edge, `LiveEdge` turns it into an `edge-stream` class, and the class draws a dashed stroke whose offset marches toward the target. The pulse still lands on top: both animations share one declaration when a value arrives on a streaming edge. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HTsT1isxUjw5gtkJk8WhuA
This commit is contained in:
@@ -71,6 +71,32 @@
|
||||
stroke-width: var(--xy-edge-stroke-width);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* An output that publishes repeatedly during one run reads as a march rather
|
||||
* than a line. Only the dash offset moves, so the pulse above still shows
|
||||
* through on the same path: it recolours and widens the dashes as they go.
|
||||
* A loop rather than a one-shot, so none of the `--duration-*` tokens fit —
|
||||
* the literal is one dash period per step, slow enough to read as direction.
|
||||
*/
|
||||
.react-flow__edge-path.edge-stream {
|
||||
stroke-dasharray: 6 4;
|
||||
animation: edge-march 700ms linear infinite;
|
||||
}
|
||||
|
||||
/* Both at once: one `animation` declaration has to carry both, or the
|
||||
cascade keeps whichever rule came last and drops the other. */
|
||||
.react-flow__edge-path.edge-stream.edge-live {
|
||||
animation:
|
||||
edge-pulse var(--duration-pulse) var(--ease-emphasized),
|
||||
edge-march 700ms linear infinite;
|
||||
}
|
||||
|
||||
@keyframes edge-march {
|
||||
to {
|
||||
stroke-dashoffset: -10;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* A node that just published something says so, once, and settles. */
|
||||
|
||||
Reference in New Issue
Block a user