wavedrom/wavedrom.github.io
Acerca de
Editor de diagramas de temporización digitales
Diseño y multimediaCrecimiento de estrellas medido
- in 24h
- 0
- in 7 days
- -2
- in 15 days
- -1
- in 1 month
- +3
Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.
README.md
OriginalWaveDrom Website & Editor
Source of wavedrom.com: documentation site, ecosystem directory, and the
real-time WaveDrom Editor (web + desktop) for digital timing diagrams (signal), register &
bitfield maps (reg) and logic schematics (assign), powered by
WaveDrom and
WaveJSON.
| Editor | wavedrom.com/editor.html (installable PWA, works offline) |
| Tutorials | Timing · Registers · Schematics |
| Ecosystem | wavedrom.com/ecosystem.html |
| Desktop app | GitHub Releases — Windows, macOS, Linux |
| Command line | wavedrom npm package: npx wavedrom -i diagram.json5 > diagram.svg |
Desktop App
Download the package for your platform from the latest release:
| Platform | Package |
|---|---|
| Windows x64 | wavedrom-editor-v<version>-win-x64.zip |
| macOS Apple Silicon | wavedrom-editor-v<version>-osx-arm64.zip |
| macOS Intel | wavedrom-editor-v<version>-osx-x64.zip |
| Linux x64 | wavedrom-editor-v<version>-linux-x64.tar.gz |
| Linux arm64 | wavedrom-editor-v<version>-linux-arm64.tar.gz |
The apps are not signed by Apple / Microsoft, so the operating system warns on first launch:
- macOS reports "wavedrom-editor is damaged and can't be opened". Unzip, move the app to
/Applications, then remove the download quarantine flag once:xattr -dr com.apple.quarantine /Applications/wavedrom-editor.app - Windows SmartScreen: More info → Run anyway.
- Linux: extract and run
./wavedrom-editorinside the extracted folder.
Using the Editor
- Edit WaveJSON on one side, see the diagram live on the other. Drag the divider to resize, click its handle to rotate the layout.
- Menu (bottom right): Load / Save (
Ctrl+O/Ctrl+S), Export SVG / PNG, Expand URL, theme. - Share a diagram as a link:
editor.html?<url-encoded WaveJSON>(Expand URL copies it). Opening a link does not overwrite your saved diagram until you edit it. - WaveJSON is a JavaScript expression: besides plain JSON5-style objects you can generate
diagrams with code. A small set of lodash helpers is available as
_:
The result must be pure data;{signal: _.range(4).map(i => ({name: 'd' + i, wave: _.repeat('01', i + 1)}))}window,documentandWaveDromare not available.
Security model
WaveJSON from links or files is untrusted code. The editor never evaluates it in the page (web) or in a Node.js-enabled frame (desktop): it runs in a Web Worker inside a sandboxed iframe with an opaque origin, no network and no Node.js APIs, limited to 3 s per evaluation (infinite loops are stopped). The returned SVG is rebuilt from an allowlist. Rationale, architecture and test results: docs/sandbox.md.
Development
Requires Node.js 22+.
npm install
npm run build # generate static HTML, CSS and JS bundles
npm run serve # local preview at http://localhost:4173 (PORT=… to change)
npm test # ESLint + Mocha unit tests
| Script | Purpose |
|---|---|
npm run build:dev |
unminified bundles with inline source maps |
npm run coverage |
tests with c8 coverage report |
npm run ecosystem:collect |
refresh data/ecosystem.json metadata |
npm run build:wde |
build the desktop app packages (see below) |
Repository layout
| Path | Contents |
|---|---|
lib/pages/ |
page generators (landing, editor-page, tutorial*, ecosystem, privacy) |
lib/layout.js, lib/styles.js, lib/samples.js |
shared layout, site CSS, WaveJSON samples |
lib/runtime/ |
browser code: site.js, editor.js, sandbox (sandbox.js, wd-worker.js, wavejson.js, safe-svg.js), ga4.js |
bin/ |
build.js (pages + esbuild bundles), serve.js, collect-ecosystem.js |
test/ |
Mocha tests |
schema/, data/, content/ |
WaveJSON JSON schema, ecosystem data, glossary |
WaveDromEditor/package.json |
NW.js manifest of the desktop app |
docs/ |
design notes |
*.html, assets/, skins/, wavedrom.min.js, service-worker.js |
generated / published site (GitHub Pages serves the repository root) |
Generated files are committed: run npm run build before committing source changes.
Updating the WaveDrom engine
npm run build copies wavedrom.min.js and skins/*.js from node_modules/wavedrom/ and
bundles the editor sandbox worker from the same package. After bumping wavedrom (or onml):
npm install
npm run build
npm test
Building the Desktop App
The desktop app is the same editor.html, packaged with NW.js:
npm run build:wde # ./build-wde.sh
./build-wde.sh --stage-only # only stage the app into src/, no NW.js download
build-wde.sh runs npm run build, stages the app into src/, fetches the packaging script
from drom/simple-nwjs-app and writes the packages
listed above to build/. NW.js runtimes are cached in cache/ and verified against the official
SHA-256 checksums. The NW.js and app versions are set on its last line:
bash build.sh --name wavedrom-editor --nwversion v0.121.0 --version v<version>
Releasing
- Bump the version in
package.json,WaveDromEditor/package.json,lib/layout.js(footer),service-worker.js(CACHE_NAME) andbuild-wde.sh(--version, optionally--nwversion). - Build, test and commit:
npm run build:wde npm test git commit -am "v<version>" git push origin master - Smoke-test the packages (web editor, desktop app on each OS).
- Tag and publish to GitHub Releases
with
gh; keep the macOS / Windows first-launch notes from Desktop App in the release notes:git tag v<version> && git push origin v<version> gh release create v<version> \ build/wavedrom-editor-v<version>-*.tar.gz \ build/wavedrom-editor-v<version>-*.zip \ --title "v<version>" \ --notes-file TMP_RELEASE_NOTES.md
Community
Questions, discussions and bug reports: WaveDrom User Group or GitHub Issues.
License
Explorar proyectos relacionados
Cargando…