@qrcommunication/gigapdf-lib 0.61.0 → 0.62.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 +15 -0
- package/dist/index.cjs +21 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -1
- package/gigapdf.wasm +0 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,21 @@ 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.62.0] - 2026-06-22
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **Markdown importer** — `mdToModel(md)` parses CommonMark-ish Markdown
|
|
12
|
+
(pure Rust, zero deps) into the unified editable model: ATX headings,
|
|
13
|
+
paragraphs, ordered/unordered nested lists, inline bold/italic/code/links with
|
|
14
|
+
backslash escapes, fenced code blocks, block quotes, thematic breaks, and GFM
|
|
15
|
+
pipe tables. ABI `gp_model_from_md`.
|
|
16
|
+
- **CSV importer** — `csvToModel(csv)` parses RFC 4180 CSV (quoted fields with
|
|
17
|
+
embedded delimiters/newlines, `""` escape, CRLF/CR/LF, UTF-8 BOM strip,
|
|
18
|
+
delimiter auto-detection among `,` `;` tab `|`) into a single table block
|
|
19
|
+
(header row bold + shaded). ABI `gp_model_from_csv`. Returns `null` for empty
|
|
20
|
+
input.
|
|
21
|
+
|
|
7
22
|
## [0.61.0] - 2026-06-22
|
|
8
23
|
|
|
9
24
|
### 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
|