Open source
The core of this tool is published on GitHub under the MIT license, so that anyone who needs a diagram like this built from their own data can read it and use it.
See it on GitHub part-number-canvas-core
What is published
- Layout
- Placing the leader lines, splitting items left and right, wrapping (Japanese line-break rules, and keeping a number and its unit together), numbering the notes, and checking for crossed lines
- SVG rendering
- The renderer, and the check that looks for unsafe content before anything is exported
- Schema and validation
- The JSON Schema for the save format, with a validator compiled ahead of build time
- Small parts
- Grapheme-aware string handling, stripping characters XML cannot carry, a thin wrapper over the HarfBuzz WASM subsetter, a thin wrapper over IndexedDB, and storing the cookie choice
- Tests and fictional samples
- Unit tests for all of the above, plus sample documents in Japanese and English
What is not
This is not the whole application; only the parts useful elsewhere have been split out.
- The site and the editor screen
- Page structure, the wiring of the UI, design tokens — tied closely enough to this product that they would not be usable elsewhere as they stand
- Product-specific configuration
- The choice of fonts, the PWA settings, the icons
- Working notes
- The record of decisions and work in progress
Worth knowing before you use it
- Being an extract, it carries no
package.json. CONTRIBUTING.md in the repository says how to run it. - The bundled fonts and WASM all permit redistribution. The terms are on the licenses page.
- Every sample part number is invented and represents no real product.
Bugs and suggestions
Open a GitHub issue. Questions about using the tool are welcome there too, for now.