@flux-lang/typesetter 0.1.12 → 0.1.14
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 +39 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# @flux-lang/typesetter
|
|
2
|
+
|
|
3
|
+
1) **What this package is**
|
|
4
|
+
Typesetting backends for Flux HTML rendering (PDF generation).
|
|
5
|
+
|
|
6
|
+
2) **When you use it**
|
|
7
|
+
Use it when you need to turn HTML/CSS output into a PDF snapshot.
|
|
8
|
+
|
|
9
|
+
3) **Install**
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pnpm add @flux-lang/typesetter
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
4) **Basic usage**
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { createTypesetterBackend } from "@flux-lang/typesetter";
|
|
19
|
+
|
|
20
|
+
const typesetter = createTypesetterBackend();
|
|
21
|
+
const pdf = await typesetter.pdf("<main>Hello</main>", "body { font: 16px sans; }");
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
5) **Reference**
|
|
25
|
+
- **Entry point**: `createTypesetterBackend` (returns a backend with `pdf()` and optional `paginate()`)
|
|
26
|
+
- **Backends**: Playwright by default; optional PrinceXML or Antenna House if available.
|
|
27
|
+
|
|
28
|
+
6) **How it relates to IR/runtime**
|
|
29
|
+
It consumes HTML/CSS output (typically from `@flux-lang/render-html`) and does not operate on IR directly.
|
|
30
|
+
|
|
31
|
+
7) **Gotchas & troubleshooting**
|
|
32
|
+
- Playwright is required for the default backend and must be installed in your environment.
|
|
33
|
+
|
|
34
|
+
8) **Versioning / compatibility notes**
|
|
35
|
+
TBD / Not yet implemented.
|
|
36
|
+
|
|
37
|
+
9) **Links**
|
|
38
|
+
- Root Flux manual: [`../../README.md`](../../README.md)
|
|
39
|
+
- Source: [`src/`](src/)
|