@zh-xx/antu 0.16.3 → 0.16.4
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/assets/viewer.html +47 -47
- package/bin/antu-mcp.mjs +66 -51
- package/bin/antu.mjs +7 -7
- package/embed/antu-embed.js +27561 -27494
- package/lib/chunks/{report-DzBBBsVD.mjs → report-DZy10Joi.mjs} +6 -6
- package/lib/html.mjs +5 -5
- package/lib/validate.mjs +5 -5
- package/package.json +1 -1
- package/server.json +2 -2
package/lib/html.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Antu 0.16.
|
|
1
|
+
// Antu 0.16.4
|
|
2
2
|
// Copyright (C) 2026 Ji Cheng
|
|
3
3
|
//
|
|
4
4
|
// Antu is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
// publish them, or sell them on any terms you like. This licence covers Antu's code in the page, and the notices in
|
|
13
13
|
// the page must stay with it.
|
|
14
14
|
//
|
|
15
|
-
// Corresponding Source of this version: https://github.com/zh-xx/Antu/tree/v0.16.
|
|
16
|
-
// The licence: https://github.com/zh-xx/Antu/blob/v0.16.
|
|
17
|
-
// Third-party notices: https://github.com/zh-xx/Antu/blob/v0.16.
|
|
15
|
+
// Corresponding Source of this version: https://github.com/zh-xx/Antu/tree/v0.16.4
|
|
16
|
+
// The licence: https://github.com/zh-xx/Antu/blob/v0.16.4/LICENSE
|
|
17
|
+
// Third-party notices: https://github.com/zh-xx/Antu/blob/v0.16.4/skills/antu/THIRD-PARTY-NOTICES.md
|
|
18
18
|
//
|
|
19
19
|
// === The licence of Antu ===
|
|
20
20
|
//
|
|
@@ -1422,4 +1422,4 @@
|
|
|
1422
1422
|
// SOFTWARE.
|
|
1423
1423
|
// ````
|
|
1424
1424
|
//
|
|
1425
|
-
import{a as e,n as t,o as n,s as r}from"./chunks/report-DzBBBsVD.mjs";import{readFileSync as i}from"node:fs";import{dirname as a,join as o,resolve as s}from"node:path";import{fileURLToPath as c}from"node:url";var l=`/*ANTU_SPEC*/null`;function u(e){return String(e).replace(/</g,`\\u003c`)}function d(e,t,{preset:n}={}){if(e.split(`/*ANTU_SPEC*/null`).length!==2)throw Error(`the viewer template does not hold exactly one ${l}`);let r=u(JSON.stringify(t)),i=n?`;window.__ANTU_PRESET__ = ${u(JSON.stringify(n))}`:``;return e.replace(l,()=>r+i)}s(a(c(import.meta.url)),`../..`);var f=s(a(c(import.meta.url)),`..`);o(f,`dist-engine/engine.js`),o(f,`dist-engine/engine.css`);function p(e){return String(e).replace(/[&<>"]/g,e=>({"&":`&`,"<":`<`,">":`>`,'"':`"`})[e])}function m(e,{preset:t,force:n=!1,quiet:r=!1}={}){{let n=p(e?.title||`Antu`);return d(i(o(f,`assets/viewer.html`),`utf8`),e,{preset:t}).replace(/<title>[^<]*<\/title>/,()=>`<title>${n} · Antu</title>`)}}var h=[`document`,`modern`,`legal`,`dark`],g={equity:{width:r.normal},control:{width:r.heavy},contract:{width:r.normal,dash:n.longDash},debt:{width:r.strong,dash:n.dashDot},guarantee:{width:r.normal,dash:n.dashed},kinship:{width:3.6,double:!0},employment:{width:r.normal,dash:n.dotted},agency:{width:r.strong,dash:`1 4`,round:!0},other:{width:r.hair,dash:`3 3`}},_={equity:{width:.85},control:{width:1.9},contract:{width:.85,dash:`5 3`},debt:{width:1.3,dash:`5 2 1.5 2`},guarantee:{width:.85,dash:`4 3`},kinship:{width:3.2,double:!0},employment:{width:.85,dash:n.dotted},agency:{width:1.3,dash:`1 4`,round:!0},other:{width:.6,dash:`3 3`}},v=(e,t)=>Object.fromEntries(Object.entries(e).map(([e,n])=>[e,{...n,stroke:t}])),y={neutral:{width:r.normal},positive:{width:r.strong},negative:{width:r.normal,dash:n.dashed}},b={main:{width:r.strong},plain:{width:r.normal},back:{width:r.normal,dash:n.dashed}},x={conclusion:{width:r.heavy},norm:{width:r.normal},element:{width:r.normal},fact:{width:r.hair},inference:{width:r.normal,dash:n.dotted},judgement:{width:r.strong}},S={for:{width:r.normal},against:{width:r.strong,dash:n.dashed},basis:{width:r.normal,dash:n.dotted}},C=(e,t)=>Object.fromEntries(Object.entries(e).map(([e,n])=>[e,{...n,...t[e]}])),w={document:{id:`document`,scheme:`light`,shadowRgb:`17, 17, 17`,chrome:{radius:2,capsule:2,chip:2,bg:`#ffffff`,bgPop:`#ffffff`,border:`1px solid #111111`,shadow:`none`,blur:`none`},labelKey:`theme.document`,font:{body:`"FangSong", "STFangsong", "FangSong_GB2312", "Songti SC", "SimSun", "Noto Serif CJK SC", "Source Han Serif SC", serif`,head:`"SimHei", "Heiti SC", "STHeiti", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif`},color:{ink:`#111111`,ink2:`#2b2b2b`,ink3:`#4d4d4d`,ink4:`#767676`,bg:`#ffffff`,canvas:`#ffffff`,frame:`#111111`,line:`#c9c9c9`,chip:`#f0f0f0`,side1:`#111111`,side2:`#555555`,axis:`#767676`,dots:`#e8ebef`,mini:`#cbd5e1`,miniGhost:`#eef1f5`,exportBg:`#ffffff`,labelBg:`rgba(255, 255, 255, 0.85)`},radius:{person:18,company:3,organization:3,government:3,other:3,pill:2,group:12},entity:{person:{stroke:`#111111`,fill:`#ffffff`,width:1.3},company:{stroke:`#111111`,fill:`#ffffff`,width:1.6},organization:{stroke:`#111111`,fill:`#ffffff`,width:1.3,dash:n.dashed},government:{stroke:`#111111`,fill:`#ffffff`,width:1.3},other:{stroke:`#555555`,fill:`#ffffff`,width:1.1,dash:n.dotted}},relation:v(_,`#767676`),camp:[{fill:`#ffffff`,stroke:`#111111`,text:`#111111`},{fill:`#ececec`,stroke:`#111111`,text:`#111111`},{fill:`#f7f7f7`,stroke:`#8a8a8a`,text:`#4d4d4d`}],group:{fill:`#f5f5f5`,stroke:`#8a8a8a`,title:`#111111`},campBox:{fill:`none`,stroke:`#111111`,width:.75,dash:`2 3`},flow:{outcome:C(y,{neutral:{stroke:`#111111`,fill:`#ffffff`},positive:{stroke:`#111111`,fill:`#ffffff`},negative:{stroke:`#111111`,fill:`#ececec`}}),start:{stroke:`#111111`,fill:`#e2e2e2`},state:{warn:{stroke:`#a16207`,fill:`#fef3c7`},stop:{stroke:`#b91c1c`,fill:`#fee2e2`},done:{stroke:`#15803d`,fill:`#dcfce7`}},note:{stroke:`none`,fill:`#f5f5f5`,fold:`#767676`},stage:{fill:`#f5f5f5`,stroke:`#8a8a8a`,title:`#111111`},stageLit:{fill:`#e2e2e2`,stroke:`#111111`,title:`#111111`},link:C(b,{main:{stroke:`#111111`},plain:{stroke:`#2b2b2b`},back:{stroke:`#4d4d4d`}})},justify:{node:C(x,{conclusion:{stroke:`#111111`,fill:`#ffffff`},norm:{stroke:`#111111`,fill:`#ececec`},element:{stroke:`#111111`,fill:`#ffffff`},fact:{stroke:`#111111`,fill:`#ffffff`},inference:{stroke:`#111111`,fill:`#ffffff`},judgement:{stroke:`#111111`,fill:`#ececec`}}),stance:C(S,{for:{stroke:`#2b2b2b`},against:{stroke:`#111111`},basis:{stroke:`#4d4d4d`}})},pill:{colored:!1,border:`#111111`}},modern:{id:`modern`,scheme:`light`,shadowRgb:`15, 23, 42`,chrome:{radius:14,capsule:999,chip:999,bg:`rgba(255, 255, 255, 0.78)`,bgPop:`rgba(255, 255, 255, 0.94)`,border:`1px solid rgba(15, 23, 42, 0.07)`,shadow:`0 4px 18px rgba(15, 23, 42, 0.10), 0 1px 2px rgba(15, 23, 42, 0.06)`,blur:`blur(16px) saturate(1.8)`},labelKey:`theme.modern`,font:{body:`system-ui, "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif`,head:`system-ui, "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif`},color:{ink:`#0f172a`,ink2:`#475569`,ink3:`#64748b`,ink4:`#94a3b8`,bg:`#fbfcfd`,canvas:`#fbfcfd`,frame:`#e2e8f0`,line:`#e8ebef`,chip:`#f1f4f8`,side1:`#475569`,side2:`#64748b`,axis:`#94a3b8`,dots:`#e8ebef`,mini:`#cbd5e1`,miniGhost:`#eef1f5`,exportBg:`#ffffff`,labelBg:`rgba(255, 255, 255, 0.85)`},radius:{person:14,company:8,organization:8,government:6,other:8,pill:12,group:12},entity:{person:{stroke:`#94a3b8`,fill:`#f1f5f9`,width:1},company:{stroke:`#334155`,fill:`#ffffff`,width:1.25},organization:{stroke:`#94a3b8`,fill:`#ffffff`,width:1,dash:n.dashed},government:{stroke:`#64748b`,fill:`#f8fafc`,width:1},other:{stroke:`#94a3b8`,fill:`#f8fafc`,width:.9,dash:n.dotted}},relation:v(g,`#475569`),camp:[{fill:`#f1f5f9`,stroke:`#94a3b8`,text:`#334155`},{fill:`#ffffff`,stroke:`#94a3b8`,text:`#334155`},{fill:`#f8fafc`,stroke:`#e2e8f0`,text:`#64748b`}],group:{fill:`#f8fafc`,stroke:`#e2e8f0`,title:`#475569`},campBox:{fill:`#f8fafc`,stroke:`#e2e8f0`,width:1},flow:{outcome:C(y,{neutral:{stroke:`#64748b`,fill:`#f8fafc`},positive:{stroke:`#334155`,fill:`#f1f5f9`},negative:{stroke:`#64748b`,fill:`#f1f5f9`}}),start:{stroke:`#334155`,fill:`#e2e8f0`},state:{warn:{stroke:`#b45309`,fill:`#fffbeb`},stop:{stroke:`#be123c`,fill:`#fff1f2`},done:{stroke:`#047857`,fill:`#ecfdf5`}},note:{stroke:`none`,fill:`#f1f5f9`,fold:`#94a3b8`},stage:{fill:`#f8fafc`,stroke:`#e2e8f0`,title:`#475569`},stageLit:{fill:`#f1f5f9`,stroke:`#64748b`,title:`#334155`},link:C(b,{main:{stroke:`#0f172a`},plain:{stroke:`#475569`},back:{stroke:`#64748b`}})},justify:{node:C(x,{conclusion:{stroke:`#0f172a`,fill:`#f1f5f9`},norm:{stroke:`#475569`,fill:`#e2e8f0`},element:{stroke:`#64748b`,fill:`#f8fafc`},fact:{stroke:`#94a3b8`,fill:`#ffffff`},inference:{stroke:`#64748b`,fill:`#f8fafc`},judgement:{stroke:`#334155`,fill:`#e2e8f0`}}),stance:C(S,{for:{stroke:`#475569`},against:{stroke:`#334155`},basis:{stroke:`#94a3b8`}})},pill:{colored:!1,border:`#cbd5e1`}},legal:{id:`legal`,scheme:`light`,shadowRgb:`19, 35, 63`,chrome:{radius:6,capsule:6,chip:4,bg:`#ffffff`,bgPop:`#ffffff`,border:`1px solid #c7d2e4`,shadow:`0 2px 10px rgba(19, 35, 63, 0.10)`,blur:`none`},labelKey:`theme.legal`,font:{body:`system-ui, "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif`,head:`system-ui, "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif`},color:{ink:`#13233f`,ink2:`#2d4366`,ink3:`#5b6f8f`,ink4:`#8aa0c4`,bg:`#ffffff`,canvas:`#ffffff`,frame:`#c7d2e4`,line:`#dbe3f0`,chip:`#eef3fb`,side1:`#1f3f7f`,side2:`#9a1b1b`,axis:`#8aa0c4`,dots:`#e8ebef`,mini:`#cbd5e1`,miniGhost:`#eef1f5`,exportBg:`#ffffff`,labelBg:`rgba(255, 255, 255, 0.85)`},radius:{person:14,company:3,organization:4,government:3,other:4,pill:4,group:6},entity:{person:{stroke:`#2f5aa8`,fill:`#eef3fb`,width:1},company:{stroke:`#1f3f7f`,fill:`#e3ecfa`,width:1.5},organization:{stroke:`#2f5aa8`,fill:`#f4f7fc`,width:1,dash:n.dashed},government:{stroke:`#13233f`,fill:`#eef3fb`,width:1.1},other:{stroke:`#8aa0c4`,fill:`#f8fafd`,width:.9,dash:n.dotted}},relation:{equity:{...g.equity,stroke:`#1f3f7f`},control:{...g.control,stroke:`#13233f`},contract:{...g.contract,stroke:`#5b6f8f`},debt:{...g.debt,stroke:`#9a1b1b`},guarantee:{...g.guarantee,stroke:`#2f5aa8`},kinship:{...g.kinship,stroke:`#4b3a8c`},employment:{...g.employment,stroke:`#1d6b6b`},agency:{...g.agency,stroke:`#1d6b6b`},other:{...g.other,stroke:`#8aa0c4`}},camp:[{fill:`#eaf0fb`,stroke:`#9fb6e0`,text:`#1f3f7f`},{fill:`#fbecec`,stroke:`#e3b4b4`,text:`#9a1b1b`},{fill:`#f4f7fc`,stroke:`#c7d2e4`,text:`#5b6f8f`}],group:{fill:`#f4f7fc`,stroke:`#c7d2e4`,title:`#2d4366`},campBox:{fill:`#f4f7fc`,stroke:`#c7d2e4`,width:1},flow:{outcome:C(y,{neutral:{stroke:`#2f5aa8`,fill:`#eef3fb`},positive:{stroke:`#1f3f7f`,fill:`#e3ecfa`},negative:{stroke:`#9a1b1b`,fill:`#fbecec`}}),start:{stroke:`#13233f`,fill:`#dbe5f5`},state:{warn:{stroke:`#a16207`,fill:`#fdf6e3`},stop:{stroke:`#9a1b1b`,fill:`#fbecec`},done:{stroke:`#1f6f43`,fill:`#e8f4ec`}},note:{stroke:`none`,fill:`#f4f7fc`,fold:`#8aa0c4`},stage:{fill:`#f4f7fc`,stroke:`#c7d2e4`,title:`#2d4366`},stageLit:{fill:`#eaf0fb`,stroke:`#1f3f7f`,title:`#1f3f7f`},link:C(b,{main:{stroke:`#13233f`},plain:{stroke:`#2d4366`},back:{stroke:`#5b6f8f`}})},justify:{node:C(x,{conclusion:{stroke:`#1f3f7f`,fill:`#e3ecfa`},norm:{stroke:`#4b3a8c`,fill:`#efecf8`},element:{stroke:`#2f5aa8`,fill:`#eef3fb`},fact:{stroke:`#8aa0c4`,fill:`#f8fafd`},inference:{stroke:`#1d6b6b`,fill:`#e8f4f4`},judgement:{stroke:`#13233f`,fill:`#dbe5f5`}}),stance:C(S,{for:{stroke:`#2d4366`},against:{stroke:`#9a1b1b`},basis:{stroke:`#4b3a8c`}})},pill:{colored:!0,border:`#c7d2e4`}},dark:{id:`dark`,scheme:`dark`,shadowRgb:`226, 232, 240`,chrome:{radius:14,capsule:999,chip:999,bg:`rgba(24, 29, 37, 0.82)`,bgPop:`rgba(28, 34, 43, 0.96)`,border:`1px solid rgba(255, 255, 255, 0.09)`,shadow:`0 4px 18px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(0, 0, 0, 0.3)`,blur:`blur(16px) saturate(1.4)`},labelKey:`theme.dark`,font:{body:`system-ui, "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif`,head:`system-ui, "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif`},color:{ink:`#e6ebf2`,ink2:`#b6c0cf`,ink3:`#8b97a9`,ink4:`#6b778a`,bg:`#14181f`,canvas:`#14181f`,frame:`#2a3240`,line:`#262d38`,chip:`#1e2530`,side1:`#9fb3d1`,side2:`#7f8aa0`,axis:`#6b778a`,dots:`#232a35`,mini:`#4a5568`,miniGhost:`#232a35`,exportBg:`#14181f`,labelBg:`rgba(20, 24, 31, 0.85)`},radius:{person:14,company:8,organization:8,government:6,other:8,pill:12,group:12},entity:{person:{stroke:`#8b97a9`,fill:`#1f2733`,width:1},company:{stroke:`#cbd5e1`,fill:`#1a2029`,width:1.25},organization:{stroke:`#8b97a9`,fill:`#161b22`,width:1,dash:n.dashed},government:{stroke:`#a3b0c4`,fill:`#1c2430`,width:1},other:{stroke:`#6b778a`,fill:`#171c24`,width:.9,dash:n.dotted}},relation:v(g,`#a3b0c4`),camp:[{fill:`#1f2733`,stroke:`#6b778a`,text:`#d3dbe7`},{fill:`#161b22`,stroke:`#6b778a`,text:`#d3dbe7`},{fill:`#1a2029`,stroke:`#2f3846`,text:`#8b97a9`}],group:{fill:`#1a2029`,stroke:`#2f3846`,title:`#b6c0cf`},campBox:{fill:`#1a2029`,stroke:`#2f3846`,width:1},flow:{outcome:C(y,{neutral:{stroke:`#8b97a9`,fill:`#1a2029`},positive:{stroke:`#d3dbe7`,fill:`#1f2733`},negative:{stroke:`#8b97a9`,fill:`#1f2733`}}),start:{stroke:`#d3dbe7`,fill:`#2a3240`},state:{warn:{stroke:`#e0a63a`,fill:`#2e2410`},stop:{stroke:`#f0707a`,fill:`#33161a`},done:{stroke:`#4cc38a`,fill:`#10281d`}},note:{stroke:`none`,fill:`#1f2733`,fold:`#6b778a`},stage:{fill:`#1a2029`,stroke:`#2f3846`,title:`#b6c0cf`},stageLit:{fill:`#232c3a`,stroke:`#8b97a9`,title:`#e6ebf2`},link:C(b,{main:{stroke:`#e6ebf2`},plain:{stroke:`#b6c0cf`},back:{stroke:`#8b97a9`}})},justify:{node:C(x,{conclusion:{stroke:`#e6ebf2`,fill:`#1f2733`},norm:{stroke:`#b6c0cf`,fill:`#2a3240`},element:{stroke:`#8b97a9`,fill:`#1a2029`},fact:{stroke:`#6b778a`,fill:`#161b22`},inference:{stroke:`#8b97a9`,fill:`#1a2029`},judgement:{stroke:`#cbd5e1`,fill:`#2a3240`}}),stance:C(S,{for:{stroke:`#b6c0cf`},against:{stroke:`#e6ebf2`},basis:{stroke:`#6b778a`}})},pill:{colored:!1,border:`#3a4455`}}},T=e=>Object.prototype.hasOwnProperty.call(w,e);function E(n,{kind:r,theme:i}={}){let a=e(n);if(a.length)throw Object.assign(Error(`antu: the spec is not valid (${a.length} problem(s)): ${a[0]}`),{errors:[...a]});let o=t(n,r);if(o)throw Error(`antu: ${o}`);if(i!==void 0&&!T(i))throw Error(`antu: the theme is one of ${h.join(`, `)}`);return m(n,{preset:r||i?{...r&&{defaultKind:r},...i&&{theme:i}}:void 0,quiet:!0})}export{E as renderHtml};
|
|
1425
|
+
import{a as e,n as t,o as n,s as r}from"./chunks/report-DZy10Joi.mjs";import{readFileSync as i}from"node:fs";import{dirname as a,join as o,resolve as s}from"node:path";import{fileURLToPath as c}from"node:url";var l=`/*ANTU_SPEC*/null`;function u(e){return String(e).replace(/</g,`\\u003c`)}function d(e,t,{preset:n}={}){if(e.split(`/*ANTU_SPEC*/null`).length!==2)throw Error(`the viewer template does not hold exactly one ${l}`);let r=u(JSON.stringify(t)),i=n?`;window.__ANTU_PRESET__ = ${u(JSON.stringify(n))}`:``;return e.replace(l,()=>r+i)}s(a(c(import.meta.url)),`../..`);var f=s(a(c(import.meta.url)),`..`);o(f,`dist-engine/engine.js`),o(f,`dist-engine/engine.css`);function p(e){return String(e).replace(/[&<>"]/g,e=>({"&":`&`,"<":`<`,">":`>`,'"':`"`})[e])}function m(e,{preset:t,force:n=!1,quiet:r=!1}={}){{let n=p(e?.title||`Antu`);return d(i(o(f,`assets/viewer.html`),`utf8`),e,{preset:t}).replace(/<title>[^<]*<\/title>/,()=>`<title>${n} · Antu</title>`)}}var h=[`document`,`modern`,`legal`,`dark`],g={equity:{width:r.normal},control:{width:r.heavy},contract:{width:r.normal,dash:n.longDash},debt:{width:r.strong,dash:n.dashDot},guarantee:{width:r.normal,dash:n.dashed},kinship:{width:3.6,double:!0},employment:{width:r.normal,dash:n.dotted},agency:{width:r.strong,dash:`1 4`,round:!0},other:{width:r.hair,dash:`3 3`}},_={equity:{width:.85},control:{width:1.9},contract:{width:.85,dash:`5 3`},debt:{width:1.3,dash:`5 2 1.5 2`},guarantee:{width:.85,dash:`4 3`},kinship:{width:3.2,double:!0},employment:{width:.85,dash:n.dotted},agency:{width:1.3,dash:`1 4`,round:!0},other:{width:.6,dash:`3 3`}},v=(e,t)=>Object.fromEntries(Object.entries(e).map(([e,n])=>[e,{...n,stroke:t}])),y={neutral:{width:r.normal},positive:{width:r.strong},negative:{width:r.normal,dash:n.dashed}},b={main:{width:r.strong},plain:{width:r.normal},back:{width:r.normal,dash:n.dashed}},x={conclusion:{width:r.heavy},norm:{width:r.normal},element:{width:r.normal},fact:{width:r.hair},inference:{width:r.normal,dash:n.dotted},judgement:{width:r.strong}},S={for:{width:r.normal},against:{width:r.strong,dash:n.dashed},basis:{width:r.normal,dash:n.dotted}},C=(e,t)=>Object.fromEntries(Object.entries(e).map(([e,n])=>[e,{...n,...t[e]}])),w={document:{id:`document`,scheme:`light`,shadowRgb:`17, 17, 17`,chrome:{radius:2,capsule:2,chip:2,bg:`#ffffff`,bgPop:`#ffffff`,border:`1px solid #111111`,shadow:`none`,blur:`none`},labelKey:`theme.document`,font:{body:`"FangSong", "STFangsong", "FangSong_GB2312", "Songti SC", "SimSun", "Noto Serif CJK SC", "Source Han Serif SC", serif`,head:`"SimHei", "Heiti SC", "STHeiti", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif`},color:{ink:`#111111`,ink2:`#2b2b2b`,ink3:`#4d4d4d`,ink4:`#767676`,bg:`#ffffff`,canvas:`#ffffff`,frame:`#111111`,line:`#c9c9c9`,chip:`#f0f0f0`,side1:`#111111`,side2:`#555555`,axis:`#767676`,dots:`#e8ebef`,mini:`#cbd5e1`,miniGhost:`#eef1f5`,exportBg:`#ffffff`,labelBg:`rgba(255, 255, 255, 0.85)`},radius:{person:18,company:3,organization:3,government:3,other:3,pill:2,group:12},entity:{person:{stroke:`#111111`,fill:`#ffffff`,width:1.3},company:{stroke:`#111111`,fill:`#ffffff`,width:1.6},organization:{stroke:`#111111`,fill:`#ffffff`,width:1.3,dash:n.dashed},government:{stroke:`#111111`,fill:`#ffffff`,width:1.3},other:{stroke:`#555555`,fill:`#ffffff`,width:1.1,dash:n.dotted}},relation:v(_,`#767676`),camp:[{fill:`#ffffff`,stroke:`#111111`,text:`#111111`},{fill:`#ececec`,stroke:`#111111`,text:`#111111`},{fill:`#f7f7f7`,stroke:`#8a8a8a`,text:`#4d4d4d`}],group:{fill:`#f5f5f5`,stroke:`#8a8a8a`,title:`#111111`},campBox:{fill:`none`,stroke:`#111111`,width:.75,dash:`2 3`},flow:{outcome:C(y,{neutral:{stroke:`#111111`,fill:`#ffffff`},positive:{stroke:`#111111`,fill:`#ffffff`},negative:{stroke:`#111111`,fill:`#ececec`}}),start:{stroke:`#111111`,fill:`#e2e2e2`},state:{warn:{stroke:`#a16207`,fill:`#fef3c7`},stop:{stroke:`#b91c1c`,fill:`#fee2e2`},done:{stroke:`#15803d`,fill:`#dcfce7`}},note:{stroke:`none`,fill:`#f5f5f5`,fold:`#767676`},stage:{fill:`#f5f5f5`,stroke:`#8a8a8a`,title:`#111111`},stageLit:{fill:`#e2e2e2`,stroke:`#111111`,title:`#111111`},link:C(b,{main:{stroke:`#111111`},plain:{stroke:`#2b2b2b`},back:{stroke:`#4d4d4d`}})},justify:{node:C(x,{conclusion:{stroke:`#111111`,fill:`#ffffff`},norm:{stroke:`#111111`,fill:`#ececec`},element:{stroke:`#111111`,fill:`#ffffff`},fact:{stroke:`#111111`,fill:`#ffffff`},inference:{stroke:`#111111`,fill:`#ffffff`},judgement:{stroke:`#111111`,fill:`#ececec`}}),stance:C(S,{for:{stroke:`#2b2b2b`},against:{stroke:`#111111`},basis:{stroke:`#4d4d4d`}})},pill:{colored:!1,border:`#111111`}},modern:{id:`modern`,scheme:`light`,shadowRgb:`15, 23, 42`,chrome:{radius:14,capsule:999,chip:999,bg:`rgba(255, 255, 255, 0.78)`,bgPop:`rgba(255, 255, 255, 0.94)`,border:`1px solid rgba(15, 23, 42, 0.07)`,shadow:`0 4px 18px rgba(15, 23, 42, 0.10), 0 1px 2px rgba(15, 23, 42, 0.06)`,blur:`blur(16px) saturate(1.8)`},labelKey:`theme.modern`,font:{body:`system-ui, "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif`,head:`system-ui, "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif`},color:{ink:`#0f172a`,ink2:`#475569`,ink3:`#64748b`,ink4:`#94a3b8`,bg:`#fbfcfd`,canvas:`#fbfcfd`,frame:`#e2e8f0`,line:`#e8ebef`,chip:`#f1f4f8`,side1:`#475569`,side2:`#64748b`,axis:`#94a3b8`,dots:`#e8ebef`,mini:`#cbd5e1`,miniGhost:`#eef1f5`,exportBg:`#ffffff`,labelBg:`rgba(255, 255, 255, 0.85)`},radius:{person:14,company:8,organization:8,government:6,other:8,pill:12,group:12},entity:{person:{stroke:`#94a3b8`,fill:`#f1f5f9`,width:1},company:{stroke:`#334155`,fill:`#ffffff`,width:1.25},organization:{stroke:`#94a3b8`,fill:`#ffffff`,width:1,dash:n.dashed},government:{stroke:`#64748b`,fill:`#f8fafc`,width:1},other:{stroke:`#94a3b8`,fill:`#f8fafc`,width:.9,dash:n.dotted}},relation:v(g,`#475569`),camp:[{fill:`#f1f5f9`,stroke:`#94a3b8`,text:`#334155`},{fill:`#ffffff`,stroke:`#94a3b8`,text:`#334155`},{fill:`#f8fafc`,stroke:`#e2e8f0`,text:`#64748b`}],group:{fill:`#f8fafc`,stroke:`#e2e8f0`,title:`#475569`},campBox:{fill:`#f8fafc`,stroke:`#e2e8f0`,width:1},flow:{outcome:C(y,{neutral:{stroke:`#64748b`,fill:`#f8fafc`},positive:{stroke:`#334155`,fill:`#f1f5f9`},negative:{stroke:`#64748b`,fill:`#f1f5f9`}}),start:{stroke:`#334155`,fill:`#e2e8f0`},state:{warn:{stroke:`#b45309`,fill:`#fffbeb`},stop:{stroke:`#be123c`,fill:`#fff1f2`},done:{stroke:`#047857`,fill:`#ecfdf5`}},note:{stroke:`none`,fill:`#f1f5f9`,fold:`#94a3b8`},stage:{fill:`#f8fafc`,stroke:`#e2e8f0`,title:`#475569`},stageLit:{fill:`#f1f5f9`,stroke:`#64748b`,title:`#334155`},link:C(b,{main:{stroke:`#0f172a`},plain:{stroke:`#475569`},back:{stroke:`#64748b`}})},justify:{node:C(x,{conclusion:{stroke:`#0f172a`,fill:`#f1f5f9`},norm:{stroke:`#475569`,fill:`#e2e8f0`},element:{stroke:`#64748b`,fill:`#f8fafc`},fact:{stroke:`#94a3b8`,fill:`#ffffff`},inference:{stroke:`#64748b`,fill:`#f8fafc`},judgement:{stroke:`#334155`,fill:`#e2e8f0`}}),stance:C(S,{for:{stroke:`#475569`},against:{stroke:`#334155`},basis:{stroke:`#94a3b8`}})},pill:{colored:!1,border:`#cbd5e1`}},legal:{id:`legal`,scheme:`light`,shadowRgb:`19, 35, 63`,chrome:{radius:6,capsule:6,chip:4,bg:`#ffffff`,bgPop:`#ffffff`,border:`1px solid #c7d2e4`,shadow:`0 2px 10px rgba(19, 35, 63, 0.10)`,blur:`none`},labelKey:`theme.legal`,font:{body:`system-ui, "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif`,head:`system-ui, "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif`},color:{ink:`#13233f`,ink2:`#2d4366`,ink3:`#5b6f8f`,ink4:`#8aa0c4`,bg:`#ffffff`,canvas:`#ffffff`,frame:`#c7d2e4`,line:`#dbe3f0`,chip:`#eef3fb`,side1:`#1f3f7f`,side2:`#9a1b1b`,axis:`#8aa0c4`,dots:`#e8ebef`,mini:`#cbd5e1`,miniGhost:`#eef1f5`,exportBg:`#ffffff`,labelBg:`rgba(255, 255, 255, 0.85)`},radius:{person:14,company:3,organization:4,government:3,other:4,pill:4,group:6},entity:{person:{stroke:`#2f5aa8`,fill:`#eef3fb`,width:1},company:{stroke:`#1f3f7f`,fill:`#e3ecfa`,width:1.5},organization:{stroke:`#2f5aa8`,fill:`#f4f7fc`,width:1,dash:n.dashed},government:{stroke:`#13233f`,fill:`#eef3fb`,width:1.1},other:{stroke:`#8aa0c4`,fill:`#f8fafd`,width:.9,dash:n.dotted}},relation:{equity:{...g.equity,stroke:`#1f3f7f`},control:{...g.control,stroke:`#13233f`},contract:{...g.contract,stroke:`#5b6f8f`},debt:{...g.debt,stroke:`#9a1b1b`},guarantee:{...g.guarantee,stroke:`#2f5aa8`},kinship:{...g.kinship,stroke:`#4b3a8c`},employment:{...g.employment,stroke:`#1d6b6b`},agency:{...g.agency,stroke:`#1d6b6b`},other:{...g.other,stroke:`#8aa0c4`}},camp:[{fill:`#eaf0fb`,stroke:`#9fb6e0`,text:`#1f3f7f`},{fill:`#fbecec`,stroke:`#e3b4b4`,text:`#9a1b1b`},{fill:`#f4f7fc`,stroke:`#c7d2e4`,text:`#5b6f8f`}],group:{fill:`#f4f7fc`,stroke:`#c7d2e4`,title:`#2d4366`},campBox:{fill:`#f4f7fc`,stroke:`#c7d2e4`,width:1},flow:{outcome:C(y,{neutral:{stroke:`#2f5aa8`,fill:`#eef3fb`},positive:{stroke:`#1f3f7f`,fill:`#e3ecfa`},negative:{stroke:`#9a1b1b`,fill:`#fbecec`}}),start:{stroke:`#13233f`,fill:`#dbe5f5`},state:{warn:{stroke:`#a16207`,fill:`#fdf6e3`},stop:{stroke:`#9a1b1b`,fill:`#fbecec`},done:{stroke:`#1f6f43`,fill:`#e8f4ec`}},note:{stroke:`none`,fill:`#f4f7fc`,fold:`#8aa0c4`},stage:{fill:`#f4f7fc`,stroke:`#c7d2e4`,title:`#2d4366`},stageLit:{fill:`#eaf0fb`,stroke:`#1f3f7f`,title:`#1f3f7f`},link:C(b,{main:{stroke:`#13233f`},plain:{stroke:`#2d4366`},back:{stroke:`#5b6f8f`}})},justify:{node:C(x,{conclusion:{stroke:`#1f3f7f`,fill:`#e3ecfa`},norm:{stroke:`#4b3a8c`,fill:`#efecf8`},element:{stroke:`#2f5aa8`,fill:`#eef3fb`},fact:{stroke:`#8aa0c4`,fill:`#f8fafd`},inference:{stroke:`#1d6b6b`,fill:`#e8f4f4`},judgement:{stroke:`#13233f`,fill:`#dbe5f5`}}),stance:C(S,{for:{stroke:`#2d4366`},against:{stroke:`#9a1b1b`},basis:{stroke:`#4b3a8c`}})},pill:{colored:!0,border:`#c7d2e4`}},dark:{id:`dark`,scheme:`dark`,shadowRgb:`226, 232, 240`,chrome:{radius:14,capsule:999,chip:999,bg:`rgba(24, 29, 37, 0.82)`,bgPop:`rgba(28, 34, 43, 0.96)`,border:`1px solid rgba(255, 255, 255, 0.09)`,shadow:`0 4px 18px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(0, 0, 0, 0.3)`,blur:`blur(16px) saturate(1.4)`},labelKey:`theme.dark`,font:{body:`system-ui, "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif`,head:`system-ui, "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif`},color:{ink:`#e6ebf2`,ink2:`#b6c0cf`,ink3:`#8b97a9`,ink4:`#6b778a`,bg:`#14181f`,canvas:`#14181f`,frame:`#2a3240`,line:`#262d38`,chip:`#1e2530`,side1:`#9fb3d1`,side2:`#7f8aa0`,axis:`#6b778a`,dots:`#232a35`,mini:`#4a5568`,miniGhost:`#232a35`,exportBg:`#14181f`,labelBg:`rgba(20, 24, 31, 0.85)`},radius:{person:14,company:8,organization:8,government:6,other:8,pill:12,group:12},entity:{person:{stroke:`#8b97a9`,fill:`#1f2733`,width:1},company:{stroke:`#cbd5e1`,fill:`#1a2029`,width:1.25},organization:{stroke:`#8b97a9`,fill:`#161b22`,width:1,dash:n.dashed},government:{stroke:`#a3b0c4`,fill:`#1c2430`,width:1},other:{stroke:`#6b778a`,fill:`#171c24`,width:.9,dash:n.dotted}},relation:v(g,`#a3b0c4`),camp:[{fill:`#1f2733`,stroke:`#6b778a`,text:`#d3dbe7`},{fill:`#161b22`,stroke:`#6b778a`,text:`#d3dbe7`},{fill:`#1a2029`,stroke:`#2f3846`,text:`#8b97a9`}],group:{fill:`#1a2029`,stroke:`#2f3846`,title:`#b6c0cf`},campBox:{fill:`#1a2029`,stroke:`#2f3846`,width:1},flow:{outcome:C(y,{neutral:{stroke:`#8b97a9`,fill:`#1a2029`},positive:{stroke:`#d3dbe7`,fill:`#1f2733`},negative:{stroke:`#8b97a9`,fill:`#1f2733`}}),start:{stroke:`#d3dbe7`,fill:`#2a3240`},state:{warn:{stroke:`#e0a63a`,fill:`#2e2410`},stop:{stroke:`#f0707a`,fill:`#33161a`},done:{stroke:`#4cc38a`,fill:`#10281d`}},note:{stroke:`none`,fill:`#1f2733`,fold:`#6b778a`},stage:{fill:`#1a2029`,stroke:`#2f3846`,title:`#b6c0cf`},stageLit:{fill:`#232c3a`,stroke:`#8b97a9`,title:`#e6ebf2`},link:C(b,{main:{stroke:`#e6ebf2`},plain:{stroke:`#b6c0cf`},back:{stroke:`#8b97a9`}})},justify:{node:C(x,{conclusion:{stroke:`#e6ebf2`,fill:`#1f2733`},norm:{stroke:`#b6c0cf`,fill:`#2a3240`},element:{stroke:`#8b97a9`,fill:`#1a2029`},fact:{stroke:`#6b778a`,fill:`#161b22`},inference:{stroke:`#8b97a9`,fill:`#1a2029`},judgement:{stroke:`#cbd5e1`,fill:`#2a3240`}}),stance:C(S,{for:{stroke:`#b6c0cf`},against:{stroke:`#e6ebf2`},basis:{stroke:`#6b778a`}})},pill:{colored:!1,border:`#3a4455`}}},T=e=>Object.prototype.hasOwnProperty.call(w,e);function E(n,{kind:r,theme:i}={}){let a=e(n);if(a.length)throw Object.assign(Error(`antu: the spec is not valid (${a.length} problem(s)): ${a[0]}`),{errors:[...a]});let o=t(n,r);if(o)throw Error(`antu: ${o}`);if(i!==void 0&&!T(i))throw Error(`antu: the theme is one of ${h.join(`, `)}`);return m(n,{preset:r||i?{...r&&{defaultKind:r},...i&&{theme:i}}:void 0,quiet:!0})}export{E as renderHtml};
|
package/lib/validate.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Antu 0.16.
|
|
1
|
+
// Antu 0.16.4
|
|
2
2
|
// Copyright (C) 2026 Ji Cheng
|
|
3
3
|
//
|
|
4
4
|
// Antu is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
// publish them, or sell them on any terms you like. This licence covers Antu's code in the page, and the notices in
|
|
13
13
|
// the page must stay with it.
|
|
14
14
|
//
|
|
15
|
-
// Corresponding Source of this version: https://github.com/zh-xx/Antu/tree/v0.16.
|
|
16
|
-
// The licence: https://github.com/zh-xx/Antu/blob/v0.16.
|
|
17
|
-
// Third-party notices: https://github.com/zh-xx/Antu/blob/v0.16.
|
|
15
|
+
// Corresponding Source of this version: https://github.com/zh-xx/Antu/tree/v0.16.4
|
|
16
|
+
// The licence: https://github.com/zh-xx/Antu/blob/v0.16.4/LICENSE
|
|
17
|
+
// Third-party notices: https://github.com/zh-xx/Antu/blob/v0.16.4/skills/antu/THIRD-PARTY-NOTICES.md
|
|
18
18
|
//
|
|
19
19
|
// === The licence of Antu ===
|
|
20
20
|
//
|
|
@@ -1422,4 +1422,4 @@
|
|
|
1422
1422
|
// SOFTWARE.
|
|
1423
1423
|
// ````
|
|
1424
1424
|
//
|
|
1425
|
-
import{a as e,c as t,d as n,f as r,i,l as a,n as o,r as s,t as c,u as l}from"./chunks/report-
|
|
1425
|
+
import{a as e,c as t,d as n,f as r,i,l as a,n as o,r as s,t as c,u as l}from"./chunks/report-DZy10Joi.mjs";function u(e,t){return{release:e,types:r().map(e=>e.type).filter(e=>!t||e===t).map(e=>({type:e,specVersion:l(e).specVersion,diagrams:a(e).map(({kind:e,version:t,status:n,since:r})=>({kind:e,version:t,status:n,since:r}))}))}}function d(e){if(typeof e!=`object`||!e||Array.isArray(e))return{spec:e,changes:[]};let t=structuredClone(e),n=typeof t.type==`string`?l(t.type)?.normalize:void 0;return{spec:t,changes:n?[...n(t)]:[]}}var f=`0.16.4`;function p(t){let n=e(t);return{ok:n.length===0,errors:[...n],notes:n.length?[]:[...i(t)]}}function m(t,{kind:n,orientation:r}={}){let i=e(t);if(i.length)return{ok:!1,reason:`the spec is not valid`,errors:[...i]};let a=o(t,n);if(a)return{ok:!1,reason:a};let l=s(t,{kind:n,orientation:r});return l.ok?{...l,text:c(l)}:l}function h(e){return d(e)}function g(e=`fact`){let t=l(e);return t?{ok:!0,text:t.describe()}:{ok:!1,reason:_(e)}}function _(e){return`no reference material for type "${e}" yet. Available: ${r().map(e=>`${e.type} (${t(e.labelKey)})`).join(`, `)||`(none)`}.`}function v(){return Object.fromEntries(r().map(({type:e})=>[e,n(e)]))}function y(){return u(f)}export{g as describe,v as kinds,m as layout,h as normalize,p as validate,y as versions};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zh-xx/antu",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.4",
|
|
4
4
|
"description": "Antu: legal diagrams (fact, procedure, relationship, justification) from JSON, as one offline HTML page. The command line, the MCP server, and the entries to embed a diagram in an application.",
|
|
5
5
|
"license": "AGPL-3.0-or-later",
|
|
6
6
|
"author": "Ji Cheng",
|
package/server.json
CHANGED
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
"url": "https://github.com/zh-xx/Antu",
|
|
7
7
|
"source": "github"
|
|
8
8
|
},
|
|
9
|
-
"version": "0.16.
|
|
9
|
+
"version": "0.16.4",
|
|
10
10
|
"packages": [
|
|
11
11
|
{
|
|
12
12
|
"registryType": "npm",
|
|
13
13
|
"identifier": "@zh-xx/antu",
|
|
14
|
-
"version": "0.16.
|
|
14
|
+
"version": "0.16.4",
|
|
15
15
|
"transport": {
|
|
16
16
|
"type": "stdio"
|
|
17
17
|
}
|