feat: port el-ui vessels — rename crates→vessels, add El source + manifests

This commit is contained in:
Will Anderson
2026-05-05 04:19:22 -05:00
parent b580a63540
commit faee6fdb25
145 changed files with 4050 additions and 12 deletions
+34
View File
@@ -0,0 +1,34 @@
// main.el el-graph vessel entry point.
//
// Re-exports all public functions from the sub-modules. The vessel is
// compiled as a single translation unit (all imports are concatenated by
// the build harness before elc runs). This file is the canonical import
// target for downstream consumers.
//
// Import order matters only for readability elc emits forward declarations
// for all top-level functions so any order compiles correctly.
import "node.el"
import "edge.el"
import "layout.el"
import "view.el"
import "canvas.el"
import "editor.el"
import "serializer.el"
// Smoke test
//
// Verifies the vessel initializes correctly. Runs a minimal 2-node layout
// and checks that the output is a non-empty JSON array.
//
// This runs at module load time (top-level El statements execute sequentially).
// Remove or gate behind an env flag if startup overhead matters.
println("[el-graph] v0.1.0 — force layout + SVG renderer")
println("[el-graph] node_color(Memory) = " + node_color("Memory"))
println("[el-graph] node_radius(0.8) = " + int_to_str(node_radius_int(int_to_float(8) / int_to_float(10))))
let _smoke_nodes: String = "[{\"id\":\"a\",\"salience\":0.8,\"node_type\":\"Memory\"},{\"id\":\"b\",\"salience\":0.5,\"node_type\":\"Entity\"}]"
let _smoke_edges: String = "[{\"source_id\":\"a\",\"target_id\":\"b\",\"weight\":1.0}]"
let _smoke_pos: String = layout_run(_smoke_nodes, _smoke_edges, int_to_float(400), int_to_float(300), 10)
println("[el-graph] smoke layout (10 iter) = " + str_slice(_smoke_pos, 0, 60) + "...")