@qrcommunication/gigapdf-lib 0.61.0 → 0.63.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 CHANGED
@@ -4,6 +4,39 @@ All notable changes to `@qrcommunication/gigapdf-lib` are documented here.
4
4
  The format follows [Keep a Changelog](https://keepachangelog.com/) and the
5
5
  project adheres to [Semantic Versioning](https://semver.org/).
6
6
 
7
+ ## [0.63.0] - 2026-06-22
8
+
9
+ ### Changed
10
+
11
+ - **Added base-14 text references the standard font instead of embedding a
12
+ substitute** — `embed_font` now detects base-14 families (Helvetica/Arial,
13
+ Times, Courier, Symbol, ZapfDingbats — including Bold/Italic styles, via the new
14
+ `base14_postscript_name`) and registers a nude `/Type1` base-14 font (no
15
+ `FontFile`, WinAnsi encoding) rather than subsetting and embedding a Liberation
16
+ substitute. This mirrors the principle the form `/AP` regeneration already
17
+ applies. Adding text in a base-14 font now writes ~1 KB instead of ~57 KB per
18
+ font (≈50× smaller saved PDFs) while rendering identically (the rasteriser draws
19
+ base-14 natively). Custom (non-base-14) families are unchanged — still
20
+ subset + embedded. HTML rendering excludes base-14 from host font fetches.
21
+ Opt-in by family name: pass a base-14 PostScript/family name
22
+ (`'Helvetica'`, `'Times-Roman'`, `'Courier'`, …) to `embedFont` to reference
23
+ rather than embed.
24
+
25
+ ## [0.62.0] - 2026-06-22
26
+
27
+ ### Added
28
+
29
+ - **Markdown importer** — `mdToModel(md)` parses CommonMark-ish Markdown
30
+ (pure Rust, zero deps) into the unified editable model: ATX headings,
31
+ paragraphs, ordered/unordered nested lists, inline bold/italic/code/links with
32
+ backslash escapes, fenced code blocks, block quotes, thematic breaks, and GFM
33
+ pipe tables. ABI `gp_model_from_md`.
34
+ - **CSV importer** — `csvToModel(csv)` parses RFC 4180 CSV (quoted fields with
35
+ embedded delimiters/newlines, `""` escape, CRLF/CR/LF, UTF-8 BOM strip,
36
+ delimiter auto-detection among `,` `;` tab `|`) into a single table block
37
+ (header row bold + shaded). ABI `gp_model_from_csv`. Returns `null` for empty
38
+ input.
39
+
7
40
  ## [0.61.0] - 2026-06-22
8
41
 
9
42
  ### Fixed
package/dist/index.cjs CHANGED
@@ -737,6 +737,27 @@ var GigaPdfEngine = class _GigaPdfEngine {
737
737
  (p, l) => JSON.parse(this._str((o) => this.ex.gp_model_from_html(p, l, o)))
738
738
  );
739
739
  }
740
+ /**
741
+ * Lower a Markdown string into the unified {@link GigaDocument} model
742
+ * (CommonMark-ish: headings, lists, GFM tables, fenced code, emphasis/links).
743
+ */
744
+ mdToModel(md) {
745
+ return this._withStr(
746
+ md,
747
+ (p, l) => JSON.parse(this._str((o) => this.ex.gp_model_from_md(p, l, o)))
748
+ );
749
+ }
750
+ /**
751
+ * Lower a CSV file (UTF-8 bytes, RFC 4180, auto-detected `,`/`;`/tab/`|`
752
+ * delimiter) into the unified {@link GigaDocument} model as a single editable
753
+ * table. Returns `null` if the bytes contain no parseable fields.
754
+ */
755
+ csvToModel(csv) {
756
+ return this._withBytes(
757
+ csv,
758
+ (p, l) => this._modelOrNull((o) => this.ex.gp_model_from_csv(p, l, o))
759
+ );
760
+ }
740
761
  /**
741
762
  * Apply a batch of {@link ModelOp} edits to a model and return the edited
742
763
  * model. Ops run in order; out-of-range addresses (and any op that can't be