@zonks/wasm 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -5
- package/THIRD_PARTY_NOTICES.md +4 -4
- package/package.json +1 -1
- package/zonks_wasm.js +6 -6
- package/zonks_wasm_bg.wasm +0 -0
package/README.md
CHANGED
|
@@ -71,13 +71,9 @@ cargo xtask wasm build
|
|
|
71
71
|
node crates/zonks-wasm/npm/smoke.mjs [<new directory>]
|
|
72
72
|
```
|
|
73
73
|
|
|
74
|
-
The default build fails when the optimised module exceeds 9 MiB
|
|
75
|
-
(`MAX_MODULE` in `xtask/src/wasm.rs`; 8.45 MiB at 0.1.0).
|
|
76
|
-
|
|
77
74
|
## Fonts
|
|
78
75
|
|
|
79
|
-
By default the module bundles no fonts
|
|
80
|
-
with brotli, the cheapest transfer saving to serve). The build
|
|
76
|
+
By default the module bundles no fonts. The build reports the module size and
|
|
81
77
|
writes the fonts beside it, `target/wasm-pkg/fonts/`, to ship with the module:
|
|
82
78
|
the Liberation set (12 files, 3.9 MiB), then the Noto fallbacks (math,
|
|
83
79
|
symbols, emoji, a CJK subset: 6 files, 5.2 MiB) in the order the library's
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -14,7 +14,7 @@ The WebAssembly module `crates/zonks-wasm` builds (`target/wasm-pkg`) contains t
|
|
|
14
14
|
|
|
15
15
|
## PNG output of the command line
|
|
16
16
|
|
|
17
|
-
The `zonks` command line (crate `zonks-cli`, cargo feature `png`, on by default) rasterizes the rendered SVG with resvg 0.50.0 and usvg 0.50.0 (Apache-2.0 OR MIT, used under MIT), tiny-skia 0.12.0 and tiny-skia-path 0.12.0 (BSD-3-Clause), harfrust 0.15.0 (MIT), skrifa 0.49.0, read-fonts 0.46.0 and font-types 0.12.7 (MIT OR Apache-2.0), simplecss 0.2.2 and svgtypes 0.16.2 (Apache-2.0 OR MIT) and the PNG encoder png 0.18.1 (MIT OR Apache-2.0) with its compression crates; their remaining dependencies are MIT, Apache-2.0, BSD-2-Clause or Unicode-3.0 licensed. Beyond those, it contains Zlib `foldhash` 0.2.0 (through `read-fonts`). The library and
|
|
17
|
+
The `zonks` command line (crate `zonks-cli`, cargo feature `png`, on by default) rasterizes the rendered SVG with resvg 0.50.0 and usvg 0.50.0 (Apache-2.0 OR MIT, used under MIT), tiny-skia 0.12.0 and tiny-skia-path 0.12.0 (BSD-3-Clause), harfrust 0.15.0 (MIT), skrifa 0.49.0, read-fonts 0.46.0 and font-types 0.12.7 (MIT OR Apache-2.0), simplecss 0.2.2 and svgtypes 0.16.2 (Apache-2.0 OR MIT) and the PNG encoder png 0.18.1 (MIT OR Apache-2.0) with its compression crates; their remaining dependencies are MIT, Apache-2.0, BSD-2-Clause or Unicode-3.0 licensed. Beyond those, it contains Zlib `foldhash` 0.2.0 (through `read-fonts`). The library and WebAssembly build also use font-types 0.12.7 and foldhash 0.2.0 through their own shaping stack (harfrust 0.16.2 and read-fonts 0.47.0). Versions and checksums are recorded in Cargo.lock.
|
|
18
18
|
|
|
19
19
|
## Zonks Desktop
|
|
20
20
|
|
|
@@ -30,9 +30,9 @@ The executable uses the system webview (WebKitGTK and GTK on Linux, WebView2 on
|
|
|
30
30
|
|
|
31
31
|
## Assets derived from Mermaid 12.2.0 and its libraries
|
|
32
32
|
|
|
33
|
-
`crates/zonks/assets` holds data derived from the pinned Mermaid 12.2.0 sources (MIT) and the libraries it bundles: static CSS, markers, icons and palettes; each directory keeps the licenses it derives from: `MERMAID-LICENSE`, D3 (`mermaid-xychart/D3-*-LICENSE`, `mermaid-pie/D3-SHAPE-LICENSE` and `D3-PATH-LICENSE`, `mermaid-sankey/D3-SANKEY-LICENSE` (BSD), `mermaid-treemap/D3-HIERARCHY-LICENSE` (ISC)), Rough.js (`mermaid-flow-shapes/ROUGHJS-LICENSE`), venn.js (`mermaid-venn/VENN-JS-LICENSE`), Iconify utils (`mermaid-architecture/ICONIFY-UTILS-LICENSE`) and the formel MathML operator dictionary (`mathml-core/LICENSE`).
|
|
33
|
+
`crates/zonks/assets` holds data derived from the pinned Mermaid 12.2.0 sources (MIT) and the libraries it bundles: static CSS, markers, icons and palettes; each directory keeps the licenses it derives from: `MERMAID-LICENSE`, D3 (`mermaid-xychart/D3-*-LICENSE`, `mermaid-pie/D3-SHAPE-LICENSE` and `D3-PATH-LICENSE`, `mermaid-sankey/D3-SANKEY-LICENSE` (BSD), `mermaid-treemap/D3-HIERARCHY-LICENSE` (ISC)), Rough.js (`mermaid-flow-shapes/ROUGHJS-LICENSE`), venn.js (`mermaid-venn/VENN-JS-LICENSE`), Iconify utils (`mermaid-architecture/ICONIFY-UTILS-LICENSE`) and the formel MathML operator dictionary (`mathml-core/LICENSE`). The graph families' edge markers are zonks' own drawings (`crates/zonks/src/diagrams/graph/paint/marker_shapes.rs`), not derived from Mermaid's. The icon symbols and arrow markers the sequence and C4 renderers insert as static definitions (`crates/zonks/src/diagrams/sequence/svg_draw/defs.rs`, `crates/zonks/src/diagrams/c4/render/defs.rs`) are zonks' own drawings, not derived from Mermaid's.
|
|
34
34
|
|
|
35
|
-
The diagram renderers port parsing, layout and SVG construction from the corresponding Mermaid renderers; production code reads no reference output. `crates/zonks-svg/src/rough_rs` is rough-rs 0.1.0 (MIT, Copyright (c) 2026 Trần Quang Đãng; `rough_rs/LICENSE`), vendored and reduced to the generator surface `sketch` uses. `crates/zonks-svg/src/bezier.rs` ports the Bézier extrema, SVG arc conversion and arc lengths of kurbo 0.13.1 (MIT OR Apache-2.0, used under MIT, Copyright (c) 2018 Raph Levien; `bezier/KURBO-LICENSE`). `crates/zonks-katex` (the published fork `zonks-katex`) is katex-rs 0.3.0 (MIT, Copyright (c) 2025 katex-rs; `crates/zonks-katex/LICENSE`, from the upstream repository's `katex-rs-v0.3.0` tag, since the crates.io package omits it), the math labels' TeX parser and MathML builder, vendored with a nesting bound (`crates/zonks-katex/README-VENDORED.md`); it ports KaTeX (MIT, Copyright (c) 2013-2020 Khan Academy and other contributors; `crates/zonks-katex/KATEX-LICENSE`) and its data. Native dependencies (among them `libm` 0.2.16, MIT; `
|
|
35
|
+
The diagram renderers port parsing, layout and SVG construction from the corresponding Mermaid renderers; production code reads no reference output. `crates/zonks/src/diagrams/graph/measure/rough.rs` ports the node-shape drawing of Rough.js (MIT, Copyright (c) 2019 Preet Shihn; `rough/ROUGHJS-LICENSE`). The built-in architecture icons (`cloud`, `database`, `disk`, `server`, `internet`, `blank`, `unknown`) are zonks' own drawings. `crates/zonks/src/icons` and the icon names and markup of the diagrams follow Iconify utils (MIT, Copyright (c) 2021-PRESENT Vjacheslav Trushkin; `crates/zonks/src/icons/ICONIFY-UTILS-LICENSE`). `crates/zonks-svg/src/rough_rs` is rough-rs 0.1.0 (MIT, Copyright (c) 2026 Trần Quang Đãng; `rough_rs/LICENSE`), vendored and reduced to the generator surface `sketch` uses. `crates/zonks-svg/src/bezier.rs` ports the Bézier extrema, SVG arc conversion and arc lengths of kurbo 0.13.1 (MIT OR Apache-2.0, used under MIT, Copyright (c) 2018 Raph Levien; `bezier/KURBO-LICENSE`). `crates/zonks-katex` (the published fork `zonks-katex`) is katex-rs 0.3.0 (MIT, Copyright (c) 2025 katex-rs; `crates/zonks-katex/LICENSE`, from the upstream repository's `katex-rs-v0.3.0` tag, since the crates.io package omits it), the math labels' TeX parser and MathML builder, vendored with a nesting bound (`crates/zonks-katex/README-VENDORED.md`); it ports KaTeX (MIT, Copyright (c) 2013-2020 Khan Academy and other contributors; `crates/zonks-katex/KATEX-LICENSE`) and its data. Native dependencies (among them `libm` 0.2.16, MIT; `zmij` 1.0.23, MIT; `serde-saphyr` 2.2.0, MIT OR Apache-2.0) and their checksums are recorded in Cargo.lock. Beyond MIT, Apache-2.0, BSD and Unicode-3.0, the engine contains MPL-2.0 `cssparser` 0.38.0 and `dtoa-short` 0.3.5 (through `zonks-html`; unmodified, source on crates.io, https://www.mozilla.org/MPL/2.0/; the build also runs the MPL-2.0 procedural macro `cssparser-macros` 0.7.1) and the Zlib-licensed crates `slotmap` 1.1.1 (through `fontdb`) and `foldhash` 0.2.0 (through `read-fonts`).
|
|
36
36
|
|
|
37
37
|
## Test data
|
|
38
38
|
|
|
@@ -125,7 +125,7 @@ SOFTWARE.
|
|
|
125
125
|
|
|
126
126
|
## Mermaid themes and stylesheet functions
|
|
127
127
|
|
|
128
|
-
`crates/zonks/src/theme/themes` ports Mermaid's theme classes (`themes/theme-*.js`) and `crates/zonks/src/theme/stylesheet` its stylesheet (`styles.ts`, every diagram's styles provider and the helpers they use) to Rust; `crates/zonks/src/theme` keeps Mermaid's MIT license (`MERMAID-LICENSE`). `crates/zonks/src/config/keys.rs` holds Mermaid 12.2.0's `configKeys` and `getDiagramConfigKey`'s aliases; `crates/zonks/src/config` keeps the same license (`MERMAID-LICENSE`).
|
|
128
|
+
`crates/zonks/src/theme/themes` ports Mermaid's theme classes (`themes/theme-*.js`) and `crates/zonks/src/theme/stylesheet` its stylesheet (`styles.ts`, every diagram's styles provider and the helpers they use) to Rust; `crates/zonks/src/theme` keeps Mermaid's MIT license (`MERMAID-LICENSE`). `crates/zonks/src/config/keys.rs` holds Mermaid 12.2.0's `configKeys` and `getDiagramConfigKey`'s aliases; `crates/zonks/src/config/defaults.json`, zonks's default configuration, keeps the values of Mermaid 12.2.0's `defaultConfig`; `crates/zonks/src/config` keeps the same license (`MERMAID-LICENSE`).
|
|
129
129
|
|
|
130
130
|
## khroma 2.1.0
|
|
131
131
|
|
package/package.json
CHANGED
package/zonks_wasm.js
CHANGED
|
@@ -285,7 +285,7 @@ function __wbg_get_imports() {
|
|
|
285
285
|
const ret = Reflect.apply(arg0, arg1, arg2);
|
|
286
286
|
return ret;
|
|
287
287
|
}, arguments); },
|
|
288
|
-
|
|
288
|
+
__wbg_error_39442994c797f544: function(arg0, arg1) {
|
|
289
289
|
console.error(getStringFromWasm0(arg0, arg1));
|
|
290
290
|
},
|
|
291
291
|
__wbg_getOwnPropertyDescriptor_bde8c48ab22edbff: function() { return handleError(function (arg0, arg1) {
|
|
@@ -304,7 +304,7 @@ function __wbg_get_imports() {
|
|
|
304
304
|
const ret = Reflect.get(arg0, arg1 >>> 0);
|
|
305
305
|
return ret;
|
|
306
306
|
}, arguments); },
|
|
307
|
-
|
|
307
|
+
__wbg_isArray_3eeab2f25907125d: function() { return handleError(function (arg0) {
|
|
308
308
|
const ret = Array.isArray(arg0);
|
|
309
309
|
return ret;
|
|
310
310
|
}, arguments); },
|
|
@@ -316,14 +316,14 @@ function __wbg_get_imports() {
|
|
|
316
316
|
const ret = arg0.length;
|
|
317
317
|
return ret;
|
|
318
318
|
},
|
|
319
|
+
__wbg_new_2dcaf59cd3427b85: function() { return handleError(function (arg0) {
|
|
320
|
+
const ret = new Uint8Array(arg0);
|
|
321
|
+
return ret;
|
|
322
|
+
}, arguments); },
|
|
319
323
|
__wbg_new_37eb45aaf5eeb820: function() {
|
|
320
324
|
const ret = new Array();
|
|
321
325
|
return ret;
|
|
322
326
|
},
|
|
323
|
-
__wbg_new_4783550ccb846e03: function() { return handleError(function (arg0) {
|
|
324
|
-
const ret = new Uint8Array(arg0);
|
|
325
|
-
return ret;
|
|
326
|
-
}, arguments); },
|
|
327
327
|
__wbg_new_787b9fb330d55d78: function(arg0, arg1) {
|
|
328
328
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
329
329
|
return ret;
|
package/zonks_wasm_bg.wasm
CHANGED
|
Binary file
|