How aksem/libavoid-js works
libavoid-js exposes the Libavoid diagram-routing engine to JavaScript through browser and Node entry points. A consumer initializes the wrapper, then uses the bound Router and geometry/connector APIs to configure objects, process routing transactions, and inspect routes. The README documents both runtimes; typings and WebIDL identify the major API domains. Generated binding and WebAssembly internals were not sampled, so their runtime linkage is shown as unverified rather than asserted.
Main entry points: index.js Browser entry · index-node.mjs Node entry · common.js Shared loader · libavoid.js Web bindings
Components 13
JavaScript entrypoints
- Browser entry
src/index.js - Node entry
src/index-node.mjs - Shared loader
src/common.js
Wasm binding
- Web bindings
src/generated/libavoid.js - Node bindings
src/generated/libavoid.mjs - Routing engine
src/generated/libavoid.wasm
Routing API
- Router
webidl_definitions/libavoid/router.idl - Routing transaction
typings/libavoid.d.ts
Geometry and connections
- Points and polygons
webidl_definitions/libavoid/geometry.idl - Shapes and obstacles
webidl_definitions/libavoid/shape.idl - Endpoints and routes
webidl_definitions/libavoid/connector.idl - Junctions and pins
webidl_definitions/libavoid/junction.idl
Other components
- Library consumer
Connections 15
- Library consumer → Browser entry: imports for web
README.md - Library consumer → Node entry: imports for Node
README.md - Browser entry → Shared loader: creates wrapper
src/index.js - Node entry → Shared loader: creates wrapper
src/index-node.mjs - Browser entry → Web bindings: imports bindings
src/index.js - Node entry → Node bindings: imports bindings
src/index-node.mjs - Shared loader → Web bindings: initializes module
src/common.js - Web bindings → Routing engine: loads engine
- Node bindings → Routing engine: loads engine
- Library consumer → Router: configures routing
- Library consumer → Routing transaction: processes routes
typings/libavoid.d.ts - Library consumer → Points and polygons: creates geometry
- Library consumer → Shapes and obstacles: defines obstacles
- Library consumer → Endpoints and routes: sets endpoints
- Library consumer → Junctions and pins: creates connections