render/typst.ts stages each job as a self-contained bundle (<job>/.typst/ lib.typ + template + resolved.json) and roots Typst there, so artwork living outside the package is reachable and old jobs stay re-renderable. Paths are root-relative throughout -- Typst resolves a leading / against --root, not the filesystem. render/contrast.ts measures the region behind the text with sharp and forces a scrim on high variance even when mean luminance passes; verified with a checkerboard that scores 5.45:1 contrast yet stdev 119.9. render/preflight.ts checks TrimBox, embedded fonts, image dpi and structure, degrading to 'non installato' rather than failing when a tool is absent. E2E verified via jiti: TrimBox 297.0x420.0mm, font axes injected, bundle staged. 0 type errors.
47 lines
1.0 KiB
JSON
47 lines
1.0 KiB
JSON
{
|
|
"name": "pi-imgen",
|
|
"version": "0.1.0",
|
|
"description": "Genera locandine, loghi e immagini per eventi - pi extension (local, Apple Silicon)",
|
|
"keywords": [
|
|
"pi-package",
|
|
"pi-extension",
|
|
"image-generation",
|
|
"poster",
|
|
"typst"
|
|
],
|
|
"license": "MIT",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://git.sal.giize.com/mozempk/pi-imgen.git"
|
|
},
|
|
"pi": {
|
|
"extensions": [
|
|
"./extensions/imgen"
|
|
]
|
|
},
|
|
"type": "module",
|
|
"dependencies": {
|
|
"sharp": "^0.34.2"
|
|
},
|
|
"peerDependencies": {
|
|
"@earendil-works/pi-ai": "*",
|
|
"@earendil-works/pi-agent-core": "*",
|
|
"@earendil-works/pi-coding-agent": "*",
|
|
"@earendil-works/pi-tui": "*",
|
|
"typebox": "*"
|
|
},
|
|
"engines": {
|
|
"node": ">=20"
|
|
},
|
|
"scripts": {
|
|
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
"test": "tests/render-fixtures.sh",
|
|
"fonts": "scripts/fetch-fonts.sh",
|
|
"test:e2e": "node tests/e2e/render.mjs && node tests/e2e/contrast.mjs"
|
|
},
|
|
"devDependencies": {
|
|
"typescript": "^5.6.0",
|
|
"@types/node": "^20.14.0"
|
|
}
|
|
}
|