scxmljs documentation
The package's front page is packages/scxmljs/README.md. Start with getting started.
Guides#
- Getting started: install, write a chart, run it, render it.
- Sandboxed or trusted: which entry point to import.
- Driving charts from the page:
send(),connect(),bind()anddata-scxml-*, and charts as markup (reflect,elementEvents). - Custom I/O processors and custom invokers: connect charts to the outside world.
- Playback and stepping: clocks,
PlaybackClock. - Testing charts:
VirtualClock,waitFor(), testing UI in happy-dom. - Node, Bun and servers.
- Large charts: which element, folding, windowing.
The elements#
<scxml-view>and<scxml-explorer>: attributes, properties, events, slots, keyboard, parts.- Theming: tokens, light and dark, parts.
- Custom UI and translations: strings, slots, your own drawing, your own explorer.
- Frameworks: React, Vue, Svelte, Angular, plain HTML.
Shipping#
- Bundling, CDNs and classic scripts, with the support table.
- Content-Security-Policy, including Trusted Types.
- Security: what the sandbox isolates, limits, reporting.
Reference#
- Conformance report: every W3C test, both data models (generated).
- Deviations from the specification.
- Measurements: startup, compile times, memory, throughput, rendering.
- Changelog and versioning.
API reference#
Online at scxmljs.tinyactors.dev/api. Generated from the
sources with TypeDoc; to build it locally, run mise run docs:api in the
repository and open docs/api/index.html. Every exported symbol is documented; CI fails on
missing documentation or broken {@link}s.
Examples#
The charts used in these pages are in examples/. Every code sample in the docs is
tested by mise run docs:test (see scripts/docs/doctest.ts), so the samples run as shown.