You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat(sdk): expose edgeTemplates prop for custom edge renderers (WB-220)
* feat(demo): custom edge example via edgeTemplates (WB-220)
* fix(demo): reflect selection/hover state in custom DashedEdge (WB-220)
The demo custom edge painted a fixed stroke, so it didn't highlight on
select/hover like the built-in edges — a misleading reference. Delegate
styling to the SDK's exported useLabelEdgeHover (the same hook LabelEdge
uses), keeping only strokeDasharray on top. Selected/hover now match the
built-in edge while the edge stays visually dashed.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* docs(sdk): document customizing edge selection (WB-220)
* docs(sdk): address review findings on edgeTemplates (WB-220)
* docs(sdk): clarify edge-types naming in DiagramContainer (WB-220)
Rename the vague `resolvedEdgeTypes` local to `baseEdgeTypes` and correct
the comment: the value is the built-in `labelEdge` renderer plus app-wide
`edgeTemplates` from <WorkflowBuilder.Root>, which the per-mount `edgeTypes`
prop overrides — not plugin- or ELK-injected edges.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* docs(sdk): refine edgeTemplates docs, trim changeset
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Piotr Blaszczyk <piotr.blaszczyk@synergycodes.com>
feat: add `edgeTemplates` prop on `<WorkflowBuilder.Root>` for custom edge renderers. Pass a `{ [edgeType]: Component }` map of components taking ReactFlow's `EdgeProps`; edges whose `type` matches a key render with your component, and unregistered types fall back to the built-in `labelEdge`. Also exports the `WorkflowBuilderEdgeTemplates` type.
|`nodeTypes`|`PaletteItemOrGroup[]`| Node type definitions. Appear in the palette and drive validation. **Must be a stable reference** — declare at module scope or memoize. |
95
-
|`nodeTemplates`|`WorkflowBuilderNodeTemplates`| Per-node-type custom renderers. Map of `data.type` → React component, overriding the default node renderer for that type. **Stable reference required** (same as `nodeTypes`). |
96
-
|`diagramTemplates`|`TemplateModel[]`| Diagram templates available in the template selector. **Stable reference required** (same as `nodeTypes`). |
|`nodeTypes`|`PaletteItemOrGroup[]`| Node type definitions. Appear in the palette and drive validation. **Must be a stable reference** — declare at module scope or memoize. |
95
+
|`nodeTemplates`|`WorkflowBuilderNodeTemplates`| Per-node-type custom renderers. Map of `data.type` → React component, overriding the default node renderer for that type. **Stable reference required** (same as `nodeTypes`). |
96
+
|`edgeTemplates`|`WorkflowBuilderEdgeTemplates`| Per-edge-type custom renderers. Map of `edge.type` → React component taking ReactFlow `EdgeProps`, overriding the built-in `labelEdge`. Unregistered types fall back to the default edge. **Stable reference required** (same as `nodeTypes`). |
97
+
|`diagramTemplates`|`TemplateModel[]`| Diagram templates available in the template selector. **Stable reference required** (same as `nodeTypes`). |
0 commit comments