@stencil-hq/wslab
v0.1.0
Published
Slab web driver — SlabElement base class, DOM painter, and Rust-kernel WASM glue for generated web components
Maintainers
Readme
@stencil-hq/wslab
The slab web driver: the SlabElement custom-element base class, the DOM
Painter, and the Rust-kernel WASM binding glue plus sidecar. Components
generated by slab gen wc import this package and subclass SlabElement;
layout, animation, and interaction all run in the shared Rust kernel compiled
to WASM.
Most users never install this directly — the compiler CLI
@stencil-hq/slab emits
components that depend on it:
bunx @stencil-hq/slab gen wc doc.slab -o dist --tag my-doc<script type="module" src="./dist/doc.js"></script>
<my-doc style="display:block;width:800px;height:600px"></my-doc>Set attributes/properties for document params; listen for CustomEvents for
signals. Keep the emitted runtime and slab_kernel_bg.wasm sidecar next to the
generated module when deploying.
Direct use
import { SlabElement } from '@stencil-hq/wslab';Exports: SlabElement, Painter, param/color coercion helpers, and the types
generated components rely on (SceneNode, SignalDef, SlabSignalDetail, …).
Ships both compiled JS (dist/) and TypeScript source; Bun resolves the
source directly via the bun export condition.
