@zh-xx/antu 0.10.0 → 0.11.0
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 +8 -0
- package/assets/viewer.html +55 -55
- package/bin/antu-mcp.mjs +58 -58
- package/bin/antu.mjs +55 -55
- package/embed/antu-embed.d.ts +84 -0
- package/embed/antu-embed.js +80836 -0
- package/examples/fact/gym-membership-face-scan.en.json +14 -14
- package/examples/fact/gym-membership-face-scan.zh-CN.json +14 -14
- package/examples/raw//357/274/2102031/357/274/211/347/244/272/346/260/221/345/210/2352/345/217/267-/345/201/245/350/272/253/346/210/277/345/210/267/350/204/270/345/205/245/345/234/272/346/241/210-/344/270/200/345/256/241.md +1 -1
- package/lib/chunks/report-BV3j2cS_.mjs +1462 -0
- package/lib/html.d.ts +9 -0
- package/lib/html.mjs +1425 -0
- package/lib/validate.d.ts +29 -0
- package/lib/validate.mjs +1425 -0
- package/package.json +17 -2
- package/server.json +2 -2
package/lib/html.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Declarations of `@zh-xx/antu/html` (tools/api/html.mjs). The contract is in spec/embed.md;
|
|
2
|
+
// test/embed.test.mjs checks that every function the module exports is declared here and nothing else.
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The self-contained page of a diagram (what `antu render` writes), as a string.
|
|
6
|
+
* `kind`: the kind it opens in (the reader can still switch); `theme`: the page is fixed to it.
|
|
7
|
+
* Throws when the spec is not valid (the problems are in `error.errors`), or `kind` or `theme` is not one.
|
|
8
|
+
*/
|
|
9
|
+
export function renderHtml(spec: unknown, options?: { kind?: string; theme?: 'document' | 'modern' | 'legal' }): string
|