@elabs-ai/components-flow 5.0.0 → 5.1.0

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/README.md CHANGED
@@ -45,7 +45,7 @@ import { ThemeProvider } from "@elabs-ai/components-tokens";
45
45
 
46
46
  ## What's in it
47
47
 
48
- 34 exported components — including `Background`, `CanvasShell`, `Controls`, `DEFAULT_EDGE_TOKEN_RADIUS`, `DEFAULT_EDGE_WIDTH_RANGE`.
48
+ 40 exported components — including `Background`, `CanvasShell`, `ConnectionMode`, `Controls`, `DEFAULT_EDGE_TOKEN_RADIUS`.
49
49
 
50
50
  Don't guess the API — ask the CLI:
51
51
 
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode, SVGProps, CSSProperties, SVGAttributes, ComponentPropsWithoutRef } from 'react';
3
3
  import { Node, Edge, ReactFlowProps, FitViewOptions, NodeProps, EdgeProps, Position, NodeChange, MiniMapProps, PanelPosition } from '@xyflow/react';
4
- export { Background, Connection, Controls, Edge, EdgeProps, MiniMap, Node, NodeProps, Panel, Position, ReactFlow, ReactFlowProvider, addEdge, useEdgesState, useNodesState, useReactFlow } from '@xyflow/react';
4
+ export { Background, Connection, ConnectionMode, Controls, Edge, EdgeChange, EdgeLabelRenderer, EdgeProps, Handle, HandleProps, MarkerType, MiniMap, Node, NodeChange, NodeProps, NodeResizer, NodeToolbar, OnSelectionChangeParams, Panel, Position, ReactFlow, ReactFlowProvider, addEdge, getBezierPath, getSmoothStepPath, getStraightPath, useEdgesState, useNodesState, useReactFlow, useUpdateNodeInternals } from '@xyflow/react';
5
5
 
6
6
  interface CanvasShellProps<NodeType extends Node = Node, EdgeType extends Edge = Edge> extends ReactFlowProps<NodeType, EdgeType> {
7
7
  /** Render a branded dotted background grid. Defaults to true. */
package/dist/index.js CHANGED
@@ -164,14 +164,28 @@ import {
164
164
  useEdgesState,
165
165
  addEdge
166
166
  } from "@xyflow/react";
167
+ import {
168
+ ConnectionMode,
169
+ EdgeLabelRenderer,
170
+ Handle,
171
+ MarkerType,
172
+ NodeResizer,
173
+ NodeToolbar,
174
+ getBezierPath,
175
+ getSmoothStepPath,
176
+ getStraightPath,
177
+ useUpdateNodeInternals
178
+ } from "@xyflow/react";
167
179
  export {
168
180
  Background,
169
181
  CanvasShell,
182
+ ConnectionMode,
170
183
  Controls,
171
184
  DEFAULT_EDGE_TOKEN_RADIUS,
172
185
  DEFAULT_EDGE_WIDTH_RANGE,
173
186
  DEFAULT_LOOP_RADIUS,
174
187
  EdgeLabelPill,
188
+ EdgeLabelRenderer,
175
189
  FLOW_ALL_SIDE_HANDLES,
176
190
  FLOW_EDGE_FOCUS_CONTOUR_WIDTH,
177
191
  FLOW_EDGE_FOCUS_RING_WIDTH,
@@ -190,10 +204,14 @@ export {
190
204
  FlowSmartEdge,
191
205
  FlowWeightedEdge,
192
206
  HANDLE_SIDES,
207
+ Handle,
193
208
  HelperLines,
194
209
  InspectorPanel,
195
210
  Legend,
211
+ MarkerType,
196
212
  MiniMap,
213
+ NodeResizer,
214
+ NodeToolbar,
197
215
  Panel,
198
216
  Position,
199
217
  ReactFlow,
@@ -207,8 +225,11 @@ export {
207
225
  createEdgePathSampler,
208
226
  expandGroup,
209
227
  flattenEdgePath,
228
+ getBezierPath,
210
229
  getEdgeParams,
211
230
  getHelperLines,
231
+ getSmoothStepPath,
232
+ getStraightPath,
212
233
  groupNodes,
213
234
  handlePoint,
214
235
  isFlowGroupProxyEdge,
@@ -231,6 +252,7 @@ export {
231
252
  useHelperLines,
232
253
  useNodesState,
233
254
  useReactFlow,
255
+ useUpdateNodeInternals,
234
256
  withWeightedEdgeAria
235
257
  };
236
258
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * @elabs-ai/components-flow — branded React Flow (@xyflow/react) building blocks.\n *\n * Import the React Flow stylesheet once at the app root:\n * import \"@xyflow/react/dist/style.css\";\n */\nexport * from \"./canvas-shell\";\nexport * from \"./flow-handle\";\nexport * from \"./flow-node\";\nexport * from \"./flow-edge\";\n// The shared edge path + keyboard focus indicator every edge type draws through (#286).\nexport * from \"./flow-edge-path\";\nexport * from \"./flow-smart-edge\";\nexport * from \"./flow-floating-edge\";\nexport * from \"./flow-placeholder-node\";\nexport * from \"./flow-button-edge\";\nexport * from \"./flow-layout\";\nexport * from \"./helper-lines\";\nexport * from \"./flow-mini-map\";\nexport * from \"./inspector-panel\";\nexport * from \"./legend\";\nexport * from \"./zoom-controls\";\nexport * from \"./flow-group-node\";\nexport * from \"./use-flow-groups\";\n\n// Convenience re-exports so consumers can build flows without a direct dep.\nexport {\n Background,\n Controls,\n MiniMap,\n Panel,\n Position,\n ReactFlow,\n ReactFlowProvider,\n useReactFlow,\n useNodesState,\n useEdgesState,\n addEdge,\n} from \"@xyflow/react\";\nexport type { Node, Edge, Connection, NodeProps, EdgeProps } from \"@xyflow/react\";\n\n// FlowWeightedEdge — RM-043\nexport * from \"./flow-weighted-edge\";\n\n// FlowSelfLoopEdge — RM-044\nexport * from \"./flow-self-loop-edge\";\n\n// FlowEdgeTokens — RM-065 prerequisite\nexport * from \"./flow-edge-tokens\";\n\n// elkjs adapter — RM-067\nexport {\n layoutFlowElk,\n type FlowElkEngine,\n type FlowElkGraph,\n type FlowLayoutElkOptions,\n type FlowLayoutElkResult,\n} from \"./flow-layout/layout-flow-elk\";\nexport { pinBackbone, type FlowElkBackbone } from \"./flow-layout/backbone\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * @elabs-ai/components-flow — branded React Flow (@xyflow/react) building blocks.\n *\n * Import the React Flow stylesheet once at the app root:\n * import \"@xyflow/react/dist/style.css\";\n */\nexport * from \"./canvas-shell\";\nexport * from \"./flow-handle\";\nexport * from \"./flow-node\";\nexport * from \"./flow-edge\";\n// The shared edge path + keyboard focus indicator every edge type draws through (#286).\nexport * from \"./flow-edge-path\";\nexport * from \"./flow-smart-edge\";\nexport * from \"./flow-floating-edge\";\nexport * from \"./flow-placeholder-node\";\nexport * from \"./flow-button-edge\";\nexport * from \"./flow-layout\";\nexport * from \"./helper-lines\";\nexport * from \"./flow-mini-map\";\nexport * from \"./inspector-panel\";\nexport * from \"./legend\";\nexport * from \"./zoom-controls\";\nexport * from \"./flow-group-node\";\nexport * from \"./use-flow-groups\";\n\n// Convenience re-exports so consumers can build flows without a direct dep.\nexport {\n Background,\n Controls,\n MiniMap,\n Panel,\n Position,\n ReactFlow,\n ReactFlowProvider,\n useReactFlow,\n useNodesState,\n useEdgesState,\n addEdge,\n} from \"@xyflow/react\";\nexport type { Node, Edge, Connection, NodeProps, EdgeProps } from \"@xyflow/react\";\n\n// What a CUSTOM node or edge is built from — so a consumer (and a copy-own registry block)\n// can write its own node types against this package alone, without a second, direct\n// dependency on the engine that could drift from the version this package is built on.\n// See the `Flow/Custom Nodes` stories.\nexport {\n ConnectionMode,\n EdgeLabelRenderer,\n Handle,\n MarkerType,\n NodeResizer,\n NodeToolbar,\n getBezierPath,\n getSmoothStepPath,\n getStraightPath,\n useUpdateNodeInternals,\n} from \"@xyflow/react\";\nexport type { EdgeChange, HandleProps, NodeChange, OnSelectionChangeParams } from \"@xyflow/react\";\n\n// FlowWeightedEdge — RM-043\nexport * from \"./flow-weighted-edge\";\n\n// FlowSelfLoopEdge — RM-044\nexport * from \"./flow-self-loop-edge\";\n\n// FlowEdgeTokens — RM-065 prerequisite\nexport * from \"./flow-edge-tokens\";\n\n// elkjs adapter — RM-067\nexport {\n layoutFlowElk,\n type FlowElkEngine,\n type FlowElkGraph,\n type FlowLayoutElkOptions,\n type FlowLayoutElkResult,\n} from \"./flow-layout/layout-flow-elk\";\nexport { pinBackbone, type FlowElkBackbone } from \"./flow-layout/backbone\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAOP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elabs-ai/components-flow",
3
- "version": "5.0.0",
3
+ "version": "5.1.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -33,8 +33,8 @@
33
33
  "elkjs": "^0.12.0",
34
34
  "react": "^18.2.0 || ^19.0.0",
35
35
  "react-dom": "^18.2.0 || ^19.0.0",
36
- "@elabs-ai/components-tokens": "5.0.0",
37
- "@elabs-ai/components-ui": "5.0.0"
36
+ "@elabs-ai/components-tokens": "^5.1.0",
37
+ "@elabs-ai/components-ui": "^5.1.0"
38
38
  },
39
39
  "peerDependenciesMeta": {
40
40
  "elkjs": {
@@ -59,10 +59,10 @@
59
59
  "typescript": "^5.7.3",
60
60
  "vitest": "^3.0.2",
61
61
  "@elabs-ai/components-eslint-config": "0.1.0",
62
- "@elabs-ai/components-icons": "5.0.0",
63
- "@elabs-ai/components-tokens": "5.0.0",
62
+ "@elabs-ai/components-icons": "5.1.0",
63
+ "@elabs-ai/components-tokens": "5.1.0",
64
64
  "@elabs-ai/components-typescript-config": "0.1.0",
65
- "@elabs-ai/components-ui": "5.0.0"
65
+ "@elabs-ai/components-ui": "5.1.0"
66
66
  },
67
67
  "scripts": {
68
68
  "build": "tsup",
@@ -1,10 +1,11 @@
1
1
  /**
2
2
  * Custom nodes — how to write your OWN node type on the branded canvas.
3
3
  *
4
- * Nothing here is new package API. Every node below is a plain React component
5
- * registered in `nodeTypes`, built from React Flow's `Handle`/`NodeToolbar`/
6
- * `NodeResizer`, `@elabs-ai/components-ui` primitives and the three conventions
7
- * `FlowNode` itself follows. Copy the one closest to what you need.
4
+ * Every node below is a plain React component registered in `nodeTypes`, built from the
5
+ * engine parts this package re-exports (`Handle`, `NodeToolbar`, `NodeResizer` import them
6
+ * from `@elabs-ai/components-flow`, no direct engine dependency needed),
7
+ * `@elabs-ai/components-ui` primitives and the three conventions `FlowNode` itself follows.
8
+ * Copy the one closest to what you need.
8
9
  *
9
10
  * The three conventions (see `nodeCardClassName` / `handleClassName` below):
10
11
  *
@@ -31,7 +32,7 @@ import {
31
32
  type Edge,
32
33
  type Node,
33
34
  type NodeProps,
34
- } from "@xyflow/react";
35
+ } from "../index";
35
36
  import {
36
37
  Braces,
37
38
  Copy,
package/src/index.ts CHANGED
@@ -39,6 +39,24 @@ export {
39
39
  } from "@xyflow/react";
40
40
  export type { Node, Edge, Connection, NodeProps, EdgeProps } from "@xyflow/react";
41
41
 
42
+ // What a CUSTOM node or edge is built from — so a consumer (and a copy-own registry block)
43
+ // can write its own node types against this package alone, without a second, direct
44
+ // dependency on the engine that could drift from the version this package is built on.
45
+ // See the `Flow/Custom Nodes` stories.
46
+ export {
47
+ ConnectionMode,
48
+ EdgeLabelRenderer,
49
+ Handle,
50
+ MarkerType,
51
+ NodeResizer,
52
+ NodeToolbar,
53
+ getBezierPath,
54
+ getSmoothStepPath,
55
+ getStraightPath,
56
+ useUpdateNodeInternals,
57
+ } from "@xyflow/react";
58
+ export type { EdgeChange, HandleProps, NodeChange, OnSelectionChangeParams } from "@xyflow/react";
59
+
42
60
  // FlowWeightedEdge — RM-043
43
61
  export * from "./flow-weighted-edge";
44
62