A lightweight, reactive JavaScript library for embedding and controlling EIDOS visualizations in web applications. Built with Valtio for natural object mutations and AJV for comprehensive schema validation.
npm install @oceanum/eidos
import { embed } from "@oceanum/eidos";
// Define your EIDOS specification
const spec = {
id: "my-app",
name: "My Visualization",
root: {
id: "root",
nodeType: "world",
children: [],
},
data: [],
transforms: [],
};
// Embed in a container element
const container = document.getElementById("eidos-container");
const eidos = await embed(container, spec, (event) => {
console.log("Received event:", event);
});
// Mutate the spec naturally - changes propagate automatically
eidos.name = "Updated Visualization";
eidos.root.children.push({
id: "layer-1",
nodeType: "worldlayer",
layerType: "track",
});