@jasy/pdf 1.0.0-beta.5 → 1.0.0-beta.7

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 1,600 tests hold the line across the workspace.
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 1,600 tests, green** across the workspace (1,190 in the engine alone). The generator and the parser
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
@@ -3,6 +3,7 @@ export * from "./insets.js";
3
3
  export * from "./gradient.js";
4
4
  export * from "./font-url.js";
5
5
  export { FontFormatError } from "../utils/ttf-parser.js";
6
+ export { preloadStandardFonts } from "../utils/afm-parser.js";
6
7
  export { JpegFormatError } from "../utils/image-helper.js";
7
8
  export * from "./dimension.js";
8
9
  export * from "./text.js";
package/dist/api/index.js CHANGED
@@ -6,6 +6,7 @@ export * from "./insets.js";
6
6
  export * from "./gradient.js";
7
7
  export * from "./font-url.js";
8
8
  export { FontFormatError } from "../utils/ttf-parser.js";
9
+ export { preloadStandardFonts } from "../utils/afm-parser.js";
9
10
  export { JpegFormatError } from "../utils/image-helper.js";
10
11
  export * from "./dimension.js";
11
12
  export * from "./text.js";
@@ -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";
@@ -0,0 +1,4 @@
1
+ import type { StandardFontData } from "../utils/afm-parser.js";
2
+ /** [character code, glyph, ...]: which glyph each character draws, in every standard font. */
3
+ export declare const CHARS: number[];
4
+ export declare const FONTS: Record<string, StandardFontData>;