@jasy/pdf 1.0.0-beta.5 → 1.0.0-beta.6
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
CHANGED
|
@@ -142,7 +142,7 @@ verify all of it:
|
|
|
142
142
|
- **PDF/A-3, matched not approximated.** The conformance graph is hand-built and **passes veraPDF**, the
|
|
143
143
|
official ISO 19005 validator.
|
|
144
144
|
- **Byte-exact round-trips.** Generate and parse are inverses: `generate → parse → regenerate` reproduces
|
|
145
|
-
the identical XML. Over
|
|
145
|
+
the identical XML. Over 2,400 tests hold the line across the workspace.
|
|
146
146
|
- **Schematron, local.** The official EN-16931 + XRechnung rules run via saxon-js (the real XSLT, in pure
|
|
147
147
|
JS) - no Java, no upload.
|
|
148
148
|
- **Vectors, not bitmaps.** `Image("logo.svg")` keeps a logo a VECTOR - our own SVG reader and our own
|
|
@@ -166,13 +166,14 @@ verify all of it:
|
|
|
166
166
|
| **[@jasy/cli](https://npmx.dev/@jasy/cli)** | the `jasy` terminal: read · validate · export, headless **and** interactive |
|
|
167
167
|
| **[@jasy/pdf](https://npmx.dev/@jasy/pdf)** | the declarative, Flutter-style PDF layout engine that powers them |
|
|
168
168
|
| **[@jasy/vue](https://npmx.dev/@jasy/vue)** | author PDFs as Vue components - and render them in the browser |
|
|
169
|
+
| **[@jasy/react](https://npmx.dev/@jasy/react)** | author PDFs as React components - and render them in the browser |
|
|
169
170
|
| **[@jasy/nuxt](https://npmx.dev/@jasy/nuxt)** | the Nuxt module: zero-config PDFs, client **or** server |
|
|
170
171
|
|
|
171
172
|
---
|
|
172
173
|
|
|
173
174
|
## Why you can trust it
|
|
174
175
|
|
|
175
|
-
- **Over
|
|
176
|
+
- **Over 2,400 tests, green** across the workspace (over 1,700 in the engine alone). The generator and the parser
|
|
176
177
|
are **byte-exact inverses**: `generate → parse → regenerate` reproduces the identical XML. Nothing is
|
|
177
178
|
silently lost.
|
|
178
179
|
- **The same rules the authorities use** - the official KoSIT EN-16931 + XRechnung Schematron, and the
|
package/dist/api/structure.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export interface CustomSize {
|
|
|
21
21
|
export declare function mm(width: number, height: number): CustomSize;
|
|
22
22
|
/** A page size: a named `PageSize`/string (`"A4"`, `"letter"`, any case), or a `CustomSize`. */
|
|
23
23
|
export type PageSizeInput = PageSize | string | CustomSize;
|
|
24
|
-
export interface PageOptions extends StackOptions {
|
|
24
|
+
export interface PageOptions extends Pick<StackOptions, "gap" | "justify" | "align"> {
|
|
25
25
|
/** Page size (default A4). */
|
|
26
26
|
size?: PageSizeInput;
|
|
27
27
|
orientation?: "portrait" | "landscape";
|
|
@@ -8,7 +8,7 @@ import { RegionElement } from "./region-element.js";
|
|
|
8
8
|
export class FlowWithoutRegionError extends Error {
|
|
9
9
|
constructor() {
|
|
10
10
|
super("@jasy/pdf: a Flow's template holds no Region, so the content has nowhere to go. Put at least " +
|
|
11
|
-
"one Region in the template (in @jasy/vue: the #page slot).");
|
|
11
|
+
"one Region in the template (in @jasy/vue: the #page slot; in @jasy/react: the page prop).");
|
|
12
12
|
this.name = "FlowWithoutRegionError";
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -4,7 +4,8 @@ import { SizedPDFElement } from "../pdf-element.js";
|
|
|
4
4
|
export class RegionOutsideFlowError extends Error {
|
|
5
5
|
constructor() {
|
|
6
6
|
super("@jasy/pdf: a Region only means something in a Flow's template - it marks where the content " +
|
|
7
|
-
"flows. Put it in the template (in @jasy/vue: the #page slot
|
|
7
|
+
"flows. Put it in the template (in @jasy/vue: the #page slot; in @jasy/react: the page prop), not " +
|
|
8
|
+
"in the content or anywhere else.");
|
|
8
9
|
this.name = "RegionOutsideFlowError";
|
|
9
10
|
}
|
|
10
11
|
}
|
package/package.json
CHANGED
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jasy/pdf",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.0.0-beta.6",
|
|
4
|
+
"description": "Create PDFs in TypeScript: declarative, component-based layout with real pagination, in Node or the browser. Its own engine - no headless browser, no Java. Powers ZUGFeRD / XRechnung e-invoices.",
|
|
5
5
|
"keywords": [
|
|
6
|
+
"accessibility",
|
|
7
|
+
"browser",
|
|
6
8
|
"declarative",
|
|
7
9
|
"e-invoice",
|
|
8
10
|
"factur-x",
|
|
9
11
|
"invoice",
|
|
10
12
|
"layout",
|
|
13
|
+
"nodejs",
|
|
11
14
|
"pagination",
|
|
12
15
|
"pdf",
|
|
13
16
|
"pdf-a",
|
|
14
17
|
"pdf-generation",
|
|
18
|
+
"pdf-generator",
|
|
19
|
+
"pdf-ua",
|
|
15
20
|
"typescript",
|
|
16
21
|
"xrechnung",
|
|
17
22
|
"zugferd"
|
|
@@ -62,6 +67,8 @@
|
|
|
62
67
|
"cli": "pnpm --filter @jasy/cli dev",
|
|
63
68
|
"cli:watch": "pnpm --filter @jasy/cli watch",
|
|
64
69
|
"play": "pnpm --filter @jasy/playground play",
|
|
70
|
+
"play:vue": "pnpm --filter @jasy/vue play",
|
|
71
|
+
"play:react": "pnpm --filter @jasy/react play",
|
|
65
72
|
"test": "vitest",
|
|
66
73
|
"test:coverage": "vitest --coverage",
|
|
67
74
|
"build": "tsc && node scripts/fix-dts-ext.mjs && pnpm run copy-assets",
|