@xenolithengine/graph-vue

Vue adapter for XenolithGraph — component.
1,343 10
Install
npm install @xenolithengine/graph-vue
Latest Version:0.7.0-beta.9
Vue:3
License:MIT
Last Updated:Oct 22, 2026
Links: GitHub  ·  npm
Maintainer: strelok2010

@xenolithengine/graph-vue

BETA MIT

Vue 3 adapter for XenolithGraph — <XenolithGraph> component + composables.

Beta — public API in STABLE-API.md is 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).

Install

pnpm add @xenolithengine/graph-vue pixi.js

Peer deps: vue@^3.4.0, pixi.js@^8.6.0. WebGL/client-only.

Usage

<script setup lang="ts">
import { XenolithGraph, XenolithControls, XenolithMiniMap } from '@xenolithengine/graph-vue'
import savedGraph from './graph.json'

const onReady = (editor) => editor.fitView()
</script>

<template>
  <XenolithGraph
    :graph="savedGraph"
    :minimap="true"
    @ready="onReady"
    @node-click="({ nodeId }) => console.log(nodeId)"
  >
    <XenolithControls position="bottom-left" />
    <XenolithMiniMap position="bottom-right" />
  </XenolithGraph>
</template>

What's exported

  • <XenolithGraph> — Vue 3 component (props: theme, graph, zoomBounds, minimap, disableGrid, snap, resizeToWindow, fitOnLoad, isValidConnection; typed object-form emits — camelCase versions of every editor event plus ready, payloads visible to vue-tsc/Volar)
  • In-editor panels: <XenolithPanel>, <XenolithButton>, <XenolithControls>, <XenolithMiniMap>
  • Composables: useEditor, useEditorOrNull, useEditorReady, useEditorEvent, useXenolithGraph (headless mount), useNodes, useEdges, useSelection, useViewport, useGraphJSON, useUndoRedo, useNodesState (controlled state — commit-time mirror + one-undo-step setNodes / setEdges)
  • XenolithEditorKey — Vue injection key (for hand-rolled provide/inject)
  • Custom widgets: vueWidget, WidgetProps

Docs

MIT © XenolithEngine

Related Packages

@rozie-ui/rete-vue

Idiomatic Vue node-based flow/graph editor wrapping Rete.js v2 — one Rozie sourc...

2,316 1
@lc-bmp/approval-flow

审批流视图组件库 - 审批流程时间线、审批操作弹窗,支持跨模块复用

1,709
@stonecrop/node-editor

Node editor UI for Stonecrop

23,381 13

Version History

Pre-releases (9)
Version Released Vue License
0.7.0-beta.9 ^3.4.0 MIT
0.7.0-beta.8 ^3.4.0 MIT
0.7.0-beta.7 ^3.4.0 MIT
0.7.0-beta.6 ^3.4.0 MIT
0.7.0-beta.5 ^3.4.0 MIT