@graphrefly/react
v0.0.1
Published
Reactive binding + presentation layer for GraphReFly (React). Currently a binding-core spike on top of @graphrefly/ts.
Readme
@graphrefly/react
Reactive binding + presentation layer for GraphReFly on React.
Status: lightweight React SDK. The original binding-core spike validated the single unverified assumption behind the workbench product vision: that a two-way reactive binding between GraphReFly graph nodes and React widgets works cleanly —
- input widget → boundary writable
statenode (reactive input, not imperative) - output widget ← boundary
derivednode (push-on-subscribe)
It builds on top of @graphrefly/ts (the engine); it never reimplements the substrate.
Framework node bindings and the framework-neutral boundary manifest are owned by
@graphrefly/ts focused subpaths. This package re-exports the React binding basics and
adds only React live topology hooks plus reference UI. Its package surface is intentionally
root-only until a focused optional subpath is reviewed for any heavy/product-shaped surface.
Public SDK Surface
useNodeValue(node)— re-export from@graphrefly/ts/adapters/react.useNodeInput(node)— re-export from@graphrefly/ts/adapters/react.useNodeRecord(keysNode, factory)— re-export from@graphrefly/ts/adapters/react;factorymust have stable identity.boundaryManifest(graph)— re-export from@graphrefly/ts/inspection/boundary.useBoundaryManifest(graph)— React hook that refreshes the manifest on topology changes.AutoPanel— small reference presentation over the binding primitives, with optional caller-supplied trusted widget catalog/resolver props plus local capability display/admission affordances over genericBoundaryCapabilityRefdata.TopologyFlowPanel— live DOM/SVG reference topology sidebar overgraph.describe().useA2UIBoundaryDataModel(graph)/useA2UIBoundaryDataModelUpdate(graph, opts)— fixed-schema A2UI data-model lowering for live boundary values. It preserves GraphReFly SENTINEL/null/non-JSON distinctions and leaves component trees/catalogs to trusted product UI code.boundaryManifestToA2UICapabilityDataModel(manifest, opts)/boundaryManifestToA2UICapabilityDataModelUpdate(manifest, opts)— separate fixed-schema A2UI capability projection over genericBoundaryCapabilityRefdata. Callers may add minimal status/admission facts; OAuth flows, provider registries, config forms, setup actions, and hard admission enforcement stay in product/Canvas/solution code.
Toolchain
Mirrors the graphrefly-ts family: mise + Node 24 + Corepack/pnpm + Biome.
mise trust && mise install # Node 24
corepack enable && pnpm install # or: mise run bootstrap
pnpm lint
pnpm typecheckNot here (lives in the product repo)
Canvas product state, widget-slot pinning, workspace placement, dataPath ownership,
reactive-layout ownership, measurement-provider policy, registry / app-store, fork +
one-click-config, BYOK/Nano wiring, OAuth/MCP connectors, relay/push, billing. This package
is the reusable React live hook/reference UI layer only; its widget and capability resolvers
are trusted React presentation hooks, its A2UI helpers are fixed-schema data-model lowering
only, and its topology panel is DOM-bound reference UI, not generic boundary metadata or a
pure GraphSpec → string renderer.
