@graph-render/react 1.0.1 → 1.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/CHANGELOG.md CHANGED
@@ -1,58 +1,84 @@
1
+ ## @graph-render/react [1.1.0](https://github.com/oleksandr-zhynzher/graph-render/compare/@graph-render/react@1.0.2...@graph-render/react@1.1.0) (2026-05-09)
2
+
3
+ ### 🚀 Features
4
+
5
+ * **react:** add comprehensive package documentation ([853d7dd](https://github.com/oleksandr-zhynzher/graph-render/commit/853d7dd4e9045c9e7bf4f4ad34bac137fe451fd0))
6
+
7
+ ### 🐛 Bug Fixes
8
+
9
+ * **deps:** use wildcard version for Yarn 1 compatibility ([56bcdf4](https://github.com/oleksandr-zhynzher/graph-render/commit/56bcdf4a2eb2e906f4724ed03ac90114661d2cb6))
10
+ * **deps:** use workspace protocol for internal dependencies ([189789b](https://github.com/oleksandr-zhynzher/graph-render/commit/189789bfbbf790de62f715fa59a0a54b773cd118))
11
+
12
+
13
+ ### Dependencies
14
+
15
+ * **@graph-render/core:** upgraded to 1.1.1
16
+
17
+ ## @graph-render/react [1.0.2](https://github.com/oleksandr-zhynzher/graph-render/compare/@graph-render/react@1.0.1...@graph-render/react@1.0.2) (2026-03-27)
18
+
19
+ ### 🐛 Bug Fixes
20
+
21
+ - **core:** make failure and validation policies explicit ([9236ba2](https://github.com/oleksandr-zhynzher/graph-render/commit/9236ba2bd01d571e08ce2f80d941abdf3115f8b0))
22
+
23
+ ### Dependencies
24
+
25
+ - **@graph-render/core:** upgraded to 1.0.2
26
+ - **@graph-render/types:** upgraded to 1.0.2
27
+
1
28
  ## @graph-render/react [1.0.1](https://github.com/oleksandr-zhynzher/graph-render/compare/@graph-render/react@1.0.0...@graph-render/react@1.0.1) (2026-03-19)
2
29
 
3
30
  ### 🐛 Bug Fixes
4
31
 
5
- * **core:** harden config normalization and stability ([983e372](https://github.com/oleksandr-zhynzher/graph-render/commit/983e372b767f20c12f220ca2206eac87ab31887c))
6
- * **labels:** cap label work and render multiline defaults ([395c444](https://github.com/oleksandr-zhynzher/graph-render/commit/395c44417df8d9476023090668596f3ec0e68fcc))
7
- * **react:** avoid rendering stale graph state after failures ([9953bf4](https://github.com/oleksandr-zhynzher/graph-render/commit/9953bf4a4c27066fc2c6a45be452d0b3081e34cb))
8
- * **react:** fall back when SVG node measurement is unavailable ([74a5921](https://github.com/oleksandr-zhynzher/graph-render/commit/74a59216ede3708870d407ecc17a1ea55997d507))
9
- * **react:** handle async node expansion deterministically ([4c80feb](https://github.com/oleksandr-zhynzher/graph-render/commit/4c80febfb2032e17f304b7bf4fa8429976a057de))
32
+ - **core:** harden config normalization and stability ([983e372](https://github.com/oleksandr-zhynzher/graph-render/commit/983e372b767f20c12f220ca2206eac87ab31887c))
33
+ - **labels:** cap label work and render multiline defaults ([395c444](https://github.com/oleksandr-zhynzher/graph-render/commit/395c44417df8d9476023090668596f3ec0e68fcc))
34
+ - **react:** avoid rendering stale graph state after failures ([9953bf4](https://github.com/oleksandr-zhynzher/graph-render/commit/9953bf4a4c27066fc2c6a45be452d0b3081e34cb))
35
+ - **react:** fall back when SVG node measurement is unavailable ([74a5921](https://github.com/oleksandr-zhynzher/graph-render/commit/74a59216ede3708870d407ecc17a1ea55997d507))
36
+ - **react:** handle async node expansion deterministically ([4c80feb](https://github.com/oleksandr-zhynzher/graph-render/commit/4c80febfb2032e17f304b7bf4fa8429976a057de))
10
37
 
11
38
  ### ♻️ Code Refactoring
12
39
 
13
- * **react:** isolate collapse state management ([276360a](https://github.com/oleksandr-zhynzher/graph-render/commit/276360a6e0f420fc6342b04e62c474f62e938ce1))
14
-
40
+ - **react:** isolate collapse state management ([276360a](https://github.com/oleksandr-zhynzher/graph-render/commit/276360a6e0f420fc6342b04e62c474f62e938ce1))
15
41
 
16
42
  ### Dependencies
17
43
 
18
- * **@graph-render/core:** upgraded to 1.0.1
19
- * **@graph-render/types:** upgraded to 1.0.1
44
+ - **@graph-render/core:** upgraded to 1.0.1
45
+ - **@graph-render/types:** upgraded to 1.0.1
20
46
 
21
47
  ## @graph-render/react 1.0.0 (2026-03-17)
22
48
 
23
49
  ### 🚀 Features
24
50
 
25
- * **core:** add node measurement and auto sizing ([721a082](https://github.com/oleksandr-zhynzher/graph-render/commit/721a08206bf26b979f0e5de9e97cfcc34d562e1f))
26
- * **core:** improve edge routing and labels ([273bdcb](https://github.com/oleksandr-zhynzher/graph-render/commit/273bdcb4e30f47a2d9bd75428739ee03ff5cea10))
27
- * **graph:** pan viewport to follow node focused via arrow-key navigation ([c20edab](https://github.com/oleksandr-zhynzher/graph-render/commit/c20edab3fcf0904349f55a2c11fa7e32d92bdee0))
28
- * **react:** add marquee selection and focus navigation ([be7bf1a](https://github.com/oleksandr-zhynzher/graph-render/commit/be7bf1acc8442dd36c0d92f1a97fe13e9f368596))
29
- * **react:** add search filter and highlight APIs ([5881c82](https://github.com/oleksandr-zhynzher/graph-render/commit/5881c8239776835210f153f54f053f40195effe3))
30
- * **react:** add subtree collapse and filtered graph view ([95e8d64](https://github.com/oleksandr-zhynzher/graph-render/commit/95e8d641db4584fb4d749b9f0bb7b0d80b613b9b))
31
- * **react:** add viewport controls and touch zoom ([ac9f02f](https://github.com/oleksandr-zhynzher/graph-render/commit/ac9f02f3bfbfc1fe58fb10231600f38721b3d7b3))
32
- * **tournament:** comprehensive UI polish – white cards, winner accent, circular avatars, refined edges ([9e05a47](https://github.com/oleksandr-zhynzher/graph-render/commit/9e05a4789466be092f3d4436a19e3f14b69038d4))
51
+ - **core:** add node measurement and auto sizing ([721a082](https://github.com/oleksandr-zhynzher/graph-render/commit/721a08206bf26b979f0e5de9e97cfcc34d562e1f))
52
+ - **core:** improve edge routing and labels ([273bdcb](https://github.com/oleksandr-zhynzher/graph-render/commit/273bdcb4e30f47a2d9bd75428739ee03ff5cea10))
53
+ - **graph:** pan viewport to follow node focused via arrow-key navigation ([c20edab](https://github.com/oleksandr-zhynzher/graph-render/commit/c20edab3fcf0904349f55a2c11fa7e32d92bdee0))
54
+ - **react:** add marquee selection and focus navigation ([be7bf1a](https://github.com/oleksandr-zhynzher/graph-render/commit/be7bf1acc8442dd36c0d92f1a97fe13e9f368596))
55
+ - **react:** add search filter and highlight APIs ([5881c82](https://github.com/oleksandr-zhynzher/graph-render/commit/5881c8239776835210f153f54f053f40195effe3))
56
+ - **react:** add subtree collapse and filtered graph view ([95e8d64](https://github.com/oleksandr-zhynzher/graph-render/commit/95e8d641db4584fb4d749b9f0bb7b0d80b613b9b))
57
+ - **react:** add viewport controls and touch zoom ([ac9f02f](https://github.com/oleksandr-zhynzher/graph-render/commit/ac9f02f3bfbfc1fe58fb10231600f38721b3d7b3))
58
+ - **tournament:** comprehensive UI polish – white cards, winner accent, circular avatars, refined edges ([9e05a47](https://github.com/oleksandr-zhynzher/graph-render/commit/9e05a4789466be092f3d4436a19e3f14b69038d4))
33
59
 
34
60
  ### 🐛 Bug Fixes
35
61
 
36
- * **graph:** drag cursor never displayed 'grabbing' ([0153fdb](https://github.com/oleksandr-zhynzher/graph-render/commit/0153fdbedf07189b3df766e1640b9ac8bfea238d))
37
- * **graph:** marquee selection misses labeled edges whose path is inside the box ([f0b038e](https://github.com/oleksandr-zhynzher/graph-render/commit/f0b038e9f19b60c1bc5660ae5e560de755ad88c9))
38
- * **graph:** prevent full model recompute when config is an inline object ([27e2fa4](https://github.com/oleksandr-zhynzher/graph-render/commit/27e2fa40da3faa6e8a186963a74128700b82f17f))
39
- * **graph:** resolve stale-closure bug in updateViewport ([ef9bf63](https://github.com/oleksandr-zhynzher/graph-render/commit/ef9bf63fc03e97c595a2455e3981cb2db5e6a369))
40
- * **hover:** directed-edge hover incorrectly marked source node as 'in' ([b7777c9](https://github.com/oleksandr-zhynzher/graph-render/commit/b7777c94c42f508c1b25bd2a77221ae1a9c39609))
41
- * **labels:** eliminate hardcoded colors and two sources of truth in GraphLabels ([4becf71](https://github.com/oleksandr-zhynzher/graph-render/commit/4becf71d6125740e994546c1054e021166ce74d0)), closes [#eef1f6](https://github.com/oleksandr-zhynzher/graph-render/issues/eef1f6) [#d7dbe3](https://github.com/oleksandr-zhynzher/graph-render/issues/d7dbe3) [#3f434b](https://github.com/oleksandr-zhynzher/graph-render/issues/3f434b)
42
- * **labels:** guard column Map against floating-point position artifacts ([5a9991a](https://github.com/oleksandr-zhynzher/graph-render/commit/5a9991ac12d50e3218764431ba9f4c073ea39fb1))
43
- * **path:** guard traverseHighlightedPath against unbounded traversal ([256a89f](https://github.com/oleksandr-zhynzher/graph-render/commit/256a89f05e0a2e0d385fde10ccf2cafb69d47536))
44
- * **path:** remove tournament 'players' domain leak from generic path utility ([b4f24fe](https://github.com/oleksandr-zhynzher/graph-render/commit/b4f24fe603db24a0f80dce0336b1c89e50ad8f6d))
45
- * **search:** prevent infinite re-render loop from onSearchResultsChange ([3e826f7](https://github.com/oleksandr-zhynzher/graph-render/commit/3e826f721b24903c2e1f7fa5dc6e87d1cb4f92e9))
46
- * **types:** remove duplicate PathTraversalResult definition in pathHighlight.ts ([00360fe](https://github.com/oleksandr-zhynzher/graph-render/commit/00360fe687152ce1991c5265041d3dc072b601f9))
47
- * **types:** use Partial<Pick<...>> for intentionally-absent fields in DEFAULT_CONFIG ([64d027f](https://github.com/oleksandr-zhynzher/graph-render/commit/64d027f076a380a6bc5b748a97df39c932d3c068))
62
+ - **graph:** drag cursor never displayed 'grabbing' ([0153fdb](https://github.com/oleksandr-zhynzher/graph-render/commit/0153fdbedf07189b3df766e1640b9ac8bfea238d))
63
+ - **graph:** marquee selection misses labeled edges whose path is inside the box ([f0b038e](https://github.com/oleksandr-zhynzher/graph-render/commit/f0b038e9f19b60c1bc5660ae5e560de755ad88c9))
64
+ - **graph:** prevent full model recompute when config is an inline object ([27e2fa4](https://github.com/oleksandr-zhynzher/graph-render/commit/27e2fa40da3faa6e8a186963a74128700b82f17f))
65
+ - **graph:** resolve stale-closure bug in updateViewport ([ef9bf63](https://github.com/oleksandr-zhynzher/graph-render/commit/ef9bf63fc03e97c595a2455e3981cb2db5e6a369))
66
+ - **hover:** directed-edge hover incorrectly marked source node as 'in' ([b7777c9](https://github.com/oleksandr-zhynzher/graph-render/commit/b7777c94c42f508c1b25bd2a77221ae1a9c39609))
67
+ - **labels:** eliminate hardcoded colors and two sources of truth in GraphLabels ([4becf71](https://github.com/oleksandr-zhynzher/graph-render/commit/4becf71d6125740e994546c1054e021166ce74d0)), closes [#eef1f6](https://github.com/oleksandr-zhynzher/graph-render/issues/eef1f6) [#d7dbe3](https://github.com/oleksandr-zhynzher/graph-render/issues/d7dbe3) [#3f434b](https://github.com/oleksandr-zhynzher/graph-render/issues/3f434b)
68
+ - **labels:** guard column Map against floating-point position artifacts ([5a9991a](https://github.com/oleksandr-zhynzher/graph-render/commit/5a9991ac12d50e3218764431ba9f4c073ea39fb1))
69
+ - **path:** guard traverseHighlightedPath against unbounded traversal ([256a89f](https://github.com/oleksandr-zhynzher/graph-render/commit/256a89f05e0a2e0d385fde10ccf2cafb69d47536))
70
+ - **path:** remove tournament 'players' domain leak from generic path utility ([b4f24fe](https://github.com/oleksandr-zhynzher/graph-render/commit/b4f24fe603db24a0f80dce0336b1c89e50ad8f6d))
71
+ - **search:** prevent infinite re-render loop from onSearchResultsChange ([3e826f7](https://github.com/oleksandr-zhynzher/graph-render/commit/3e826f721b24903c2e1f7fa5dc6e87d1cb4f92e9))
72
+ - **types:** remove duplicate PathTraversalResult definition in pathHighlight.ts ([00360fe](https://github.com/oleksandr-zhynzher/graph-render/commit/00360fe687152ce1991c5265041d3dc072b601f9))
73
+ - **types:** use Partial<Pick<...>> for intentionally-absent fields in DEFAULT_CONFIG ([64d027f](https://github.com/oleksandr-zhynzher/graph-render/commit/64d027f076a380a6bc5b748a97df39c932d3c068))
48
74
 
49
75
  ### ⚡ Performance Improvements
50
76
 
51
- * **graph:** remove superfluous useMemo around primitive string expressions ([4804e6e](https://github.com/oleksandr-zhynzher/graph-render/commit/4804e6e387156325e47c4d8e869dcc348b8f65ea))
52
- * **graph:** use O(n) scan instead of O(n log n) sort in getNearestNodeInDirection ([c1d459d](https://github.com/oleksandr-zhynzher/graph-render/commit/c1d459dcea5afeecadc29a921eff52a55f77b4cb))
53
- * **graph:** wrap EdgePath with React.memo to skip re-render of unchanged edges ([7b2a801](https://github.com/oleksandr-zhynzher/graph-render/commit/7b2a801cb57208c08e4c5e4561c2f3520d537b18))
54
- * **search:** share outgoing adjacency map between descendant traversal and childNodeIdsByParent ([110e1d9](https://github.com/oleksandr-zhynzher/graph-render/commit/110e1d910f61ad14633e39cc6ffbb7ccd5b188c9))
77
+ - **graph:** remove superfluous useMemo around primitive string expressions ([4804e6e](https://github.com/oleksandr-zhynzher/graph-render/commit/4804e6e387156325e47c4d8e869dcc348b8f65ea))
78
+ - **graph:** use O(n) scan instead of O(n log n) sort in getNearestNodeInDirection ([c1d459d](https://github.com/oleksandr-zhynzher/graph-render/commit/c1d459dcea5afeecadc29a921eff52a55f77b4cb))
79
+ - **graph:** wrap EdgePath with React.memo to skip re-render of unchanged edges ([7b2a801](https://github.com/oleksandr-zhynzher/graph-render/commit/7b2a801cb57208c08e4c5e4561c2f3520d537b18))
80
+ - **search:** share outgoing adjacency map between descendant traversal and childNodeIdsByParent ([110e1d9](https://github.com/oleksandr-zhynzher/graph-render/commit/110e1d910f61ad14633e39cc6ffbb7ccd5b188c9))
55
81
 
56
82
  ### ♻️ Code Refactoring
57
83
 
58
- * **graph:** eliminate magic numbers in control-button layout ([5c0a3d2](https://github.com/oleksandr-zhynzher/graph-render/commit/5c0a3d2c9369e8c7af0c1bf0378e9b4e1b67bf5f))
84
+ - **graph:** eliminate magic numbers in control-button layout ([5c0a3d2](https://github.com/oleksandr-zhynzher/graph-render/commit/5c0a3d2c9369e8c7af0c1bf0378e9b4e1b67bf5f))
package/README.md CHANGED
@@ -0,0 +1,73 @@
1
+ # @graph-render/react
2
+
3
+ React components for interactive graph visualization.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @graph-render/react @graph-render/core
9
+ # or
10
+ yarn add @graph-render/react @graph-render/core
11
+ ```
12
+
13
+ ## Features
14
+
15
+ - React components for graph rendering
16
+ - Built-in graph interaction hooks (hover, collapse, search)
17
+ - Customizable node and edge rendering
18
+ - Viewport management
19
+ - TypeScript support
20
+ - Full SSR support
21
+
22
+ ## Usage
23
+
24
+ ```tsx
25
+ import { Graph } from '@graph-render/react';
26
+
27
+ function MyGraph() {
28
+ const graph = {
29
+ nodes: [
30
+ { id: '1', label: 'Node 1' },
31
+ { id: '2', label: 'Node 2' }
32
+ ],
33
+ edges: [
34
+ { source: '1', target: '2' }
35
+ ]
36
+ };
37
+
38
+ return (
39
+ <Graph
40
+ graph={graph}
41
+ layout="dag"
42
+ width={800}
43
+ height={600}
44
+ />
45
+ );
46
+ }
47
+ ```
48
+
49
+ ## API
50
+
51
+ ### Graph Component
52
+
53
+ Main component for rendering graphs.
54
+
55
+ **Props:**
56
+ - `graph` - Graph data structure
57
+ - `layout` - Layout algorithm ('dag', 'tree', 'force', 'radial', 'grid')
58
+ - `width` - Canvas width
59
+ - `height` - Canvas height
60
+ - `nodeRenderer` - Custom node renderer (optional)
61
+ - `edgeRenderer` - Custom edge renderer (optional)
62
+
63
+ ### Hooks
64
+
65
+ - `useGraphModel` - Graph data management
66
+ - `useGraphViewState` - Viewport state
67
+ - `useGraphHover` - Hover interaction
68
+ - `useGraphCollapse` - Node collapse/expand
69
+ - `useGraphSearchState` - Search functionality
70
+
71
+ ## License
72
+
73
+ MIT