@xenolithengine/graph-adapter-core
v0.7.0-beta.3
Published
Framework-agnostic binding for XenolithGraph — mount, reactive props, events. Foundation for the Web Component and React/Vue/Svelte/Solid adapters.
Maintainers
Readme
@xenolithengine/graph-adapter-core
Framework-agnostic binding for XenolithGraph — mount, reactive props, events. Foundation for the Web Component and React / Vue / Svelte / Solid / Angular adapters.
Beta — public API in
STABLE-API.mdis the surface we plan to freeze, but it is NOT frozen yet — breaking changes can land at any point before v1.0. If you adopt now, pin an exact version.
Part of XenolithGraph — an AI-native, embeddable node-graph editor for the web with its own visual design language (Xen).
Most application hosts should use @xenolithengine/graph-editor (vanilla) or one of the framework adapters. This package is the primitive every adapter is built on; reach for it only if you're writing a new adapter.
Install
pnpm add @xenolithengine/graph-adapter-corePeer dependency: pixi.js@^8.6.0.
Usage
import { createEditorBinding } from '@xenolithengine/graph-adapter-core'
const binding = await createEditorBinding('#graph', {
theme: 'xen',
graph: someGraphJson,
fitOnLoad: true,
})
const off = binding.on('node:click', (p) => console.log('clicked', p))
binding.setProps({ theme: 'liquid-glass' }) // diffed; only changed refs touch the editor
// later
off()
binding.destroy()What's exported
createEditorBinding(target, props)— async; resolves to anEditorBindingEditorBinding—{ editor, on, setProps, destroy }XenolithProps— the canonical props shape consumed by every adapterapplyProps,EditorLike— for hand-rolled reconciliationEDITOR_EVENT_NAMES— the canonical event-name list every adapter derives its idiomatic surface from
Docs
- Full guide
- API reference — every method exposed by
XenolithEditor - GitHub
MIT © XenolithEngine
