A canvas for intent and information.
Elenweave is a client-only canvas engine for building interactive workspaces— graphs, navigation, HTML nodes, theming, events, and portable export.
Core primitives
Elenweave is built around four primitives: a multi-board workspace, a low-level graph model, a renderer/controller view, and a navigator for camera + selection.
Creates, renames, switches, and exports boards. Handles moving nodes across graphs.
- Create / rename / delete boards
- Active graph navigation layer
- Import/export workspace JSON
Low-level board model with ordering helpers, edges, serialization, and placement nudges.
- Add/update/remove nodes + edges
- Ordering helpers (before/after/index)
- Hydrate/serialize for persistence
Canvas renderer and interaction controller: selection, link mode, context menu.
- Drag, resize, link, edit text
- DOM-backed HTML nodes
- Export Graph/Workspace + PNG
Two-tier navigation: zoom/pan + selection traversal with keyboard bindings and optional UI.
- Directional selection (neighbors first)
- Fit / focus / center actions
- Optional skeuomorphic nav UI
Quick Start
Copy, paste, and you have a workspace, a view, and a graph with nodes and an edge.
npm i elenweave
https://cdn.jsdelivr.net/npm/elenweave@0.1.0/dist/elenweave.iife.min.js
import { ElenweaveWorkspace, ElenweaveView } from 'elenweave';
import 'elenweave/styles.css';
const workspace = new ElenweaveWorkspace();
const view = new ElenweaveView({
canvas: document.querySelector('#bp'),
workspace
});
const boardId = workspace.createGraph('Board 01');
workspace.setActiveGraph(boardId);
const a = view.addNode({ text: 'Start', x: 120, y: 120 });
const b = view.addNode({ text: 'Next', x: 420, y: 200 });
view.addEdge(a, b);
npm i elenweave or use the CDN build
·
Workspace manages multiple boards and the active board. Graph is the board model. View renders and controls a canvas. Navigator adds camera + selection traversal.
Guides
Browse the surface by focus area: primitives, capabilities, themes, components, and events.
Foundations for data, rendering, interaction, and navigation across boards.
Multi-board workspaces, context menus, HTML overlays, and portable export.
Preset themes and token overrides for both canvas and HTML overlays.
DOM-backed nodes for custom UI, charts, and data-rich widgets.
Subscribe to graph lifecycle, selection, input, and context actions.
Themes & interaction defaults
Presets: blueprint, light, dark. Override individual tokens when you
need.
Interaction defaults are tuned for drag, resize, link, edit, and navigation.
Pick a preset and override specific values (bg, nodeStroke, edge, selection).
options.themeName and options.theme.
const view = new ElenweaveView({
canvas,
workspace,
options: {
themeName: 'dark',
theme: {
bg: '#061526',
nodeStroke: '#6fe7ff',
edge: '#78dbff',
selection: '#41ffb4'
}
}
});
Shift+drag to link, or toggle Link Mode. Edges can have color, label, and pulse.
Arrow keys for directional selection, Tab for cycle, plus zoom/fit/focus actions.
Double-click built-in HTML text nodes to edit. Changes persist to node.text.
HTML components inside nodes
HTML nodes render in a DOM overlay so they can receive clicks and input. Use data attributes to control dragging, selection targets, and link anchors.
Register a component by name. Then spawn nodes with type: "html" and component.
data-ew-drag: constrain dragging to a handledata-ew-select: element that selects node on pointer downdata-ew-link: start linking from a specific anchor
view.registerComponent('OptionPicker', {
loader: () => import('./components/option-picker.js')
});
view.addNode({
type: 'html',
component: 'OptionPicker',
x: 200, y: 140, w: 320, h: 160,
props: { title: 'Route', options: ['A', 'B'] },
data: { choice: 'A' }
});
OptionPicker, MultiChoice, TextInput, SliderInput, DateTimeInput.
LineChart, AreaChart, BarChart, ScatterChart, HeatmapChart, RadarChart, SparklineChart.
ImageViewer, VideoPlayer, AudioPlayer, MediaBatchInspector.
DatasetProfiler, FeatureDriftMonitor, AudioForensics.
CodeDependencyExplorer, DataLineageGraph, PipelineOrchestrator, GitLogHistory.
Events, notifications, and export
Elenweave is event-driven. Integrate with external state by subscribing to changes, and persist using Graph/Workspace exports (plus PNG snapshots).
Track board lifecycle and movement across graphs.
graph:created,graph:active,graph:deletednode:movedacross boards
Listen for selection, input changes, and context menu actions.
selection,edge:selectionnode:input,contextmenu:action
Persist via exportGraph/exportWorkspace.
- GraphJson and WorkspaceJson shapes
- PNG export returns a data URL