@statelyai/flow-react 0.5.0 → 0.6.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 +5 -3
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
<!-- description from package.json -->
|
|
4
4
|
|
|
5
|
-
Thin React adapter for `@statelyai/flow` and
|
|
5
|
+
Thin React adapter for `@statelyai/flow` with core and DOM re-exports.
|
|
6
6
|
|
|
7
7
|
## Philosophy
|
|
8
8
|
|
|
9
|
-
`@statelyai/flow-react` should be completely event-driven and composable. React should not hide a second flow model behind component internals; it should adapt the same `FlowInstance` that consumers can create, inspect, subscribe to, and trigger directly.
|
|
9
|
+
`@statelyai/flow-react` should be completely event-driven and composable. React should not hide a second flow model behind component internals; it should adapt the same `FlowInstance` that consumers can create, inspect, subscribe to, and trigger directly. It re-exports the lower layers so React consumers can install and import from one package.
|
|
10
10
|
|
|
11
11
|
The adapter abstracts over two lower layers:
|
|
12
12
|
|
|
@@ -54,11 +54,13 @@ Color mode is store data, not engine behavior. `@statelyai/flow-dom` exports sma
|
|
|
54
54
|
|
|
55
55
|
```tsx
|
|
56
56
|
import {
|
|
57
|
+
createEdge,
|
|
58
|
+
createGraph,
|
|
59
|
+
createNode,
|
|
57
60
|
StatelyFlow,
|
|
58
61
|
useFlow,
|
|
59
62
|
useFlowSelector,
|
|
60
63
|
} from "@statelyai/flow-react";
|
|
61
|
-
import { createEdge, createGraph, createNode } from "@statelyai/flow";
|
|
62
64
|
|
|
63
65
|
const graph = createGraph({
|
|
64
66
|
nodes: [
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import * as react4 from "react";
|
|
|
2
2
|
import { CSSProperties, HTMLAttributes, ReactNode, RefObject } from "react";
|
|
3
3
|
import { ResolvedFlowColorMode } from "@statelyai/flow-dom";
|
|
4
4
|
import { AnchorSpec, ConnectionEndedEvent, CreateFlowOptions, EdgePathData, FlowColorMode, FlowController, FlowEdge, FlowGraph, FlowInputMode, FlowNode, FlowProfile, FlowStoreContext, LayoutRequestedEvent, Point, Rect, Viewport, VisualPort } from "@statelyai/flow";
|
|
5
|
+
export * from "@statelyai/flow-dom";
|
|
5
6
|
|
|
6
7
|
//#region src/createFlowInstance.d.ts
|
|
7
8
|
type FlowSelector<T> = (context: FlowStoreContext) => T;
|
package/dist/esm/index.js
CHANGED
|
@@ -3,6 +3,7 @@ import { createContext, memo, useCallback, useContext, useEffect, useLayoutEffec
|
|
|
3
3
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { applyFlowColorMode, attachContainer, attachInput, attachViewportTransform, computeRenderableIds, createMeasurementObserver, getAttachedContainer, nodePositionStyle, renderableIdsEqual, resolveFlowColorMode, viewportStyle } from "@statelyai/flow-dom";
|
|
5
5
|
import { CONNECTION_PREVIEW_EDGE_ID, createConnectionPreviewGraph, createEntityChangeNotifier, createFlow, createFlowInputRuntime, getAnchorTransform, getAutoPanDelta, getMinimapProjection, getToolbarPlacement, nodeDepths, pathToSVG, profileModesForContext, viewportCenteredOn } from "@statelyai/flow";
|
|
6
|
+
export * from "@statelyai/flow-dom";
|
|
6
7
|
//#region src/createFlowInstance.ts
|
|
7
8
|
function createFlowInstance(options) {
|
|
8
9
|
const flow = createFlow({
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@statelyai/flow-react",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Thin React adapter for @statelyai/flow and
|
|
3
|
+
"version": "0.6.0",
|
|
4
|
+
"description": "Thin React adapter for @statelyai/flow with core and DOM re-exports.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"flow",
|
|
7
7
|
"diagram",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"license": "MIT",
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@statelyai/flow": "0.4.2",
|
|
35
|
-
"@statelyai/flow-dom": "3.0
|
|
35
|
+
"@statelyai/flow-dom": "3.1.0"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"react": "^18.2.0 || ^19.0.0",
|