pretext-pdf 0.3.1 → 0.4.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/CHANGELOG.md +333 -306
- package/dist/assets.d.ts +1 -1
- package/dist/assets.d.ts.map +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/fonts.d.ts +1 -1
- package/dist/fonts.d.ts.map +1 -1
- package/dist/index.js +3 -12
- package/dist/index.js.map +1 -1
- package/dist/render.d.ts +1 -1
- package/dist/render.d.ts.map +1 -1
- package/dist/render.js +1 -1
- package/dist/render.js.map +1 -1
- package/dist/types.d.ts +2 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +100 -103
package/package.json
CHANGED
|
@@ -1,103 +1,100 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "pretext-pdf",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Declarative JSON → PDF generation with professional typography. Built on pretext's precision text layout engine.",
|
|
5
|
-
"keywords": ["pdf", "pdf-generation", "pretext", "typography", "invoice", "report", "document", "typescript", "nodejs", "type-safe", "forms", "rtl", "hyphenation"],
|
|
6
|
-
"author": "Himanshu Jain <himanshu@antigravity.dev>",
|
|
7
|
-
"license": "MIT",
|
|
8
|
-
"homepage": "https://github.com/Himaan1998Y/pretext-pdf#readme",
|
|
9
|
-
"bugs": {
|
|
10
|
-
"url": "https://github.com/Himaan1998Y/pretext-pdf/issues"
|
|
11
|
-
},
|
|
12
|
-
"repository": {
|
|
13
|
-
"type": "git",
|
|
14
|
-
"url": "https://github.com/Himaan1998Y/pretext-pdf.git"
|
|
15
|
-
},
|
|
16
|
-
"engines": {
|
|
17
|
-
"node": ">=18.0.0"
|
|
18
|
-
},
|
|
19
|
-
"sideEffects": false,
|
|
20
|
-
"type": "module",
|
|
21
|
-
"main": "./dist/index.js",
|
|
22
|
-
"types": "./dist/index.d.ts",
|
|
23
|
-
"files": ["dist/", "README.md", "LICENSE", "CHANGELOG.md"],
|
|
24
|
-
"exports": {
|
|
25
|
-
".": {
|
|
26
|
-
"import": "./dist/index.js",
|
|
27
|
-
"types": "./dist/index.d.ts"
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
"scripts": {
|
|
31
|
-
"build": "tsc",
|
|
32
|
-
"test:unit": "tsx --test test/validate.test.ts test/builder.test.ts test/rich-text.test.ts",
|
|
33
|
-
"test:validate": "tsx --test test/validate.test.ts test/builder.test.ts",
|
|
34
|
-
"test:e2e": "tsx --test test/e2e.test.ts",
|
|
35
|
-
"test:phases": "tsx --test test/phase-7a.test.ts test/phase-7b.test.ts test/phase-7c.test.ts test/phase-7d-toc.test.ts test/phase-7e-svg.test.ts test/phase-7f-rtl.test.ts test/phase-7g.test.ts test/phase-7-integration.test.ts test/phase-8g-hyperlinks.test.ts test/phase-8h-inline-formatting.test.ts test/phase-8a-annotations.test.ts test/phase-8c-assembly.test.ts test/phase-8f-metadata.test.ts test/phase-8e-signatures.test.ts test/phase-8b-forms.test.ts test/phase-8d-callout.test.ts",
|
|
36
|
-
"test:phase-7": "tsx --test test/phase-7a.test.ts test/phase-7b.test.ts test/phase-7c.test.ts test/phase-7d-toc.test.ts test/phase-7e-svg.test.ts test/phase-7f-rtl.test.ts test/phase-7g.test.ts test/phase-7-integration.test.ts",
|
|
37
|
-
"test:phase-8": "tsx --test test/phase-8g-hyperlinks.test.ts test/phase-8h-inline-formatting.test.ts test/phase-8a-annotations.test.ts test/phase-8c-assembly.test.ts test/phase-8b-forms.test.ts test/phase-8d-callout.test.ts test/phase-8e-signatures.test.ts test/phase-8f-metadata.test.ts",
|
|
38
|
-
"test:8d": "tsx --test test/phase-8d-callout.test.ts",
|
|
39
|
-
"test:8f": "tsx --test test/phase-8f-metadata.test.ts",
|
|
40
|
-
"test:8e": "tsx --test test/phase-8e-signatures.test.ts",
|
|
41
|
-
"test:8b": "tsx --test test/phase-8b-forms.test.ts",
|
|
42
|
-
"test": "
|
|
43
|
-
"test
|
|
44
|
-
"test:
|
|
45
|
-
"test:visual
|
|
46
|
-
"
|
|
47
|
-
"example
|
|
48
|
-
"example:
|
|
49
|
-
"example:
|
|
50
|
-
"example:
|
|
51
|
-
"example:
|
|
52
|
-
"example:
|
|
53
|
-
"example:
|
|
54
|
-
"example:
|
|
55
|
-
"example:
|
|
56
|
-
"example:
|
|
57
|
-
"example:
|
|
58
|
-
"example:
|
|
59
|
-
"example:showcase-
|
|
60
|
-
"example:showcase-
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
"@
|
|
67
|
-
"@
|
|
68
|
-
"@
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
"@napi-rs/canvas": "^0.1.57"
|
|
78
|
-
},
|
|
79
|
-
"peerDependenciesMeta": {
|
|
80
|
-
"@napi-rs/canvas": {
|
|
81
|
-
"optional": true
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
"@
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
"
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
"pngjs": "^7.0.0"
|
|
102
|
-
}
|
|
103
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "pretext-pdf",
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "Declarative JSON → PDF generation with professional typography. Built on pretext's precision text layout engine.",
|
|
5
|
+
"keywords": ["pdf", "pdf-generation", "pretext", "typography", "invoice", "report", "document", "typescript", "nodejs", "type-safe", "forms", "rtl", "hyphenation"],
|
|
6
|
+
"author": "Himanshu Jain <himanshu@antigravity.dev>",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"homepage": "https://github.com/Himaan1998Y/pretext-pdf#readme",
|
|
9
|
+
"bugs": {
|
|
10
|
+
"url": "https://github.com/Himaan1998Y/pretext-pdf/issues"
|
|
11
|
+
},
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "https://github.com/Himaan1998Y/pretext-pdf.git"
|
|
15
|
+
},
|
|
16
|
+
"engines": {
|
|
17
|
+
"node": ">=18.0.0"
|
|
18
|
+
},
|
|
19
|
+
"sideEffects": false,
|
|
20
|
+
"type": "module",
|
|
21
|
+
"main": "./dist/index.js",
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"files": ["dist/", "README.md", "LICENSE", "CHANGELOG.md"],
|
|
24
|
+
"exports": {
|
|
25
|
+
".": {
|
|
26
|
+
"import": "./dist/index.js",
|
|
27
|
+
"types": "./dist/index.d.ts"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"scripts": {
|
|
31
|
+
"build": "tsc",
|
|
32
|
+
"test:unit": "tsx --test test/validate.test.ts test/builder.test.ts test/rich-text.test.ts",
|
|
33
|
+
"test:validate": "tsx --test test/validate.test.ts test/builder.test.ts",
|
|
34
|
+
"test:e2e": "tsx --test test/e2e.test.ts",
|
|
35
|
+
"test:phases": "tsx --test test/phase-7a.test.ts test/phase-7b.test.ts test/phase-7c.test.ts test/phase-7d-toc.test.ts test/phase-7e-svg.test.ts test/phase-7f-rtl.test.ts test/phase-7g.test.ts test/phase-7-integration.test.ts test/phase-8g-hyperlinks.test.ts test/phase-8h-inline-formatting.test.ts test/phase-8a-annotations.test.ts test/phase-8c-assembly.test.ts test/phase-8f-metadata.test.ts test/phase-8e-signatures.test.ts test/phase-8b-forms.test.ts test/phase-8d-callout.test.ts",
|
|
36
|
+
"test:phase-7": "tsx --test test/phase-7a.test.ts test/phase-7b.test.ts test/phase-7c.test.ts test/phase-7d-toc.test.ts test/phase-7e-svg.test.ts test/phase-7f-rtl.test.ts test/phase-7g.test.ts test/phase-7-integration.test.ts",
|
|
37
|
+
"test:phase-8": "tsx --test test/phase-8g-hyperlinks.test.ts test/phase-8h-inline-formatting.test.ts test/phase-8a-annotations.test.ts test/phase-8c-assembly.test.ts test/phase-8b-forms.test.ts test/phase-8d-callout.test.ts test/phase-8e-signatures.test.ts test/phase-8f-metadata.test.ts",
|
|
38
|
+
"test:8d": "tsx --test test/phase-8d-callout.test.ts",
|
|
39
|
+
"test:8f": "tsx --test test/phase-8f-metadata.test.ts",
|
|
40
|
+
"test:8e": "tsx --test test/phase-8e-signatures.test.ts",
|
|
41
|
+
"test:8b": "tsx --test test/phase-8b-forms.test.ts",
|
|
42
|
+
"test:contract": "tsx --test test/pretext-api-contract.test.ts",
|
|
43
|
+
"test": "npm run test:contract && npm run test:unit && npm run test:validate && npm run test:e2e && npm run test:phases",
|
|
44
|
+
"test:rich": "tsx --test test/rich-text.test.ts",
|
|
45
|
+
"test:visual": "tsx --test test/visual/visual.test.ts",
|
|
46
|
+
"test:visual:update": "cross-env UPDATE_BASELINES=1 tsx test/visual/visual.test.ts",
|
|
47
|
+
"example": "tsx examples/invoice.ts",
|
|
48
|
+
"example:watermark": "tsx examples/phase7-watermark.ts",
|
|
49
|
+
"example:bookmarks": "tsx examples/phase7-bookmarks.ts",
|
|
50
|
+
"example:toc": "tsx examples/phase7-toc.ts",
|
|
51
|
+
"example:rtl": "tsx examples/phase7-rtl.ts",
|
|
52
|
+
"example:encryption": "tsx examples/phase7-encryption.ts",
|
|
53
|
+
"example:hyperlinks": "tsx examples/phase8-hyperlinks.ts",
|
|
54
|
+
"example:annotations": "tsx examples/phase8-annotations.ts",
|
|
55
|
+
"example:assembly": "tsx examples/phase8-assembly.ts",
|
|
56
|
+
"example:inline": "tsx examples/phase8-inline.ts",
|
|
57
|
+
"example:forms": "tsx examples/phase8-forms.ts",
|
|
58
|
+
"example:callout": "tsx examples/phase8-callout.ts",
|
|
59
|
+
"example:showcase-invoice": "tsx examples/showcase-invoice.ts",
|
|
60
|
+
"example:showcase-report": "tsx examples/showcase-report.ts",
|
|
61
|
+
"example:showcase-resume": "tsx examples/showcase-resume.ts",
|
|
62
|
+
"screenshots": "npm run example:showcase-invoice && npm run example:showcase-report && npm run example:showcase-resume && node scripts/screenshot.cjs",
|
|
63
|
+
"typecheck": "tsc --noEmit"
|
|
64
|
+
},
|
|
65
|
+
"dependencies": {
|
|
66
|
+
"@cantoo/pdf-lib": "^2.6.5",
|
|
67
|
+
"@chenglou/pretext": "0.0.3",
|
|
68
|
+
"@fontsource-variable/inter": "^5.2.8",
|
|
69
|
+
"@fontsource/inter": "^5.0.0",
|
|
70
|
+
"@pdf-lib/fontkit": "^1.1.1",
|
|
71
|
+
"bidi-js": "^1.0.3",
|
|
72
|
+
"hyphenation.en-us": "^0.2.1",
|
|
73
|
+
"hypher": "^0.2.5",
|
|
74
|
+
"subset-font": "^2.5.0"
|
|
75
|
+
},
|
|
76
|
+
"peerDependencies": {
|
|
77
|
+
"@napi-rs/canvas": "^0.1.57"
|
|
78
|
+
},
|
|
79
|
+
"peerDependenciesMeta": {
|
|
80
|
+
"@napi-rs/canvas": {
|
|
81
|
+
"optional": true
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"devDependencies": {
|
|
85
|
+
"@cantoo/pdf-lib": "^2.6.5",
|
|
86
|
+
"@types/node": "^22.0.0",
|
|
87
|
+
"@types/pixelmatch": "^5.2.6",
|
|
88
|
+
"@types/pngjs": "^6.0.5",
|
|
89
|
+
"cross-env": "^10.1.0",
|
|
90
|
+
"pdfjs-dist": "^5.6.205",
|
|
91
|
+
"ts-node": "^10.9.2",
|
|
92
|
+
"tsx": "^4.7.0",
|
|
93
|
+
"typescript": "^5.5.0"
|
|
94
|
+
},
|
|
95
|
+
"optionalDependencies": {
|
|
96
|
+
"@napi-rs/canvas": "^0.1.57",
|
|
97
|
+
"pixelmatch": "^7.1.0",
|
|
98
|
+
"pngjs": "^7.0.0"
|
|
99
|
+
}
|
|
100
|
+
}
|