@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/dist/index.d.cts CHANGED
@@ -309,6 +309,17 @@ declare class GigaPdfEngine {
309
309
  officeToModel(office: Uint8Array): GigaDocument | null;
310
310
  /** Lower an HTML string into the unified {@link GigaDocument} model. */
311
311
  htmlToModel(html: string): GigaDocument;
312
+ /**
313
+ * Lower a Markdown string into the unified {@link GigaDocument} model
314
+ * (CommonMark-ish: headings, lists, GFM tables, fenced code, emphasis/links).
315
+ */
316
+ mdToModel(md: string): GigaDocument;
317
+ /**
318
+ * Lower a CSV file (UTF-8 bytes, RFC 4180, auto-detected `,`/`;`/tab/`|`
319
+ * delimiter) into the unified {@link GigaDocument} model as a single editable
320
+ * table. Returns `null` if the bytes contain no parseable fields.
321
+ */
322
+ csvToModel(csv: Uint8Array): GigaDocument | null;
312
323
  /**
313
324
  * Apply a batch of {@link ModelOp} edits to a model and return the edited
314
325
  * model. Ops run in order; out-of-range addresses (and any op that can't be
package/dist/index.d.ts CHANGED
@@ -309,6 +309,17 @@ declare class GigaPdfEngine {
309
309
  officeToModel(office: Uint8Array): GigaDocument | null;
310
310
  /** Lower an HTML string into the unified {@link GigaDocument} model. */
311
311
  htmlToModel(html: string): GigaDocument;
312
+ /**
313
+ * Lower a Markdown string into the unified {@link GigaDocument} model
314
+ * (CommonMark-ish: headings, lists, GFM tables, fenced code, emphasis/links).
315
+ */
316
+ mdToModel(md: string): GigaDocument;
317
+ /**
318
+ * Lower a CSV file (UTF-8 bytes, RFC 4180, auto-detected `,`/`;`/tab/`|`
319
+ * delimiter) into the unified {@link GigaDocument} model as a single editable
320
+ * table. Returns `null` if the bytes contain no parseable fields.
321
+ */
322
+ csvToModel(csv: Uint8Array): GigaDocument | null;
312
323
  /**
313
324
  * Apply a batch of {@link ModelOp} edits to a model and return the edited
314
325
  * model. Ops run in order; out-of-range addresses (and any op that can't be
package/dist/index.js CHANGED
@@ -715,6 +715,27 @@ var GigaPdfEngine = class _GigaPdfEngine {
715
715
  (p, l) => JSON.parse(this._str((o) => this.ex.gp_model_from_html(p, l, o)))
716
716
  );
717
717
  }
718
+ /**
719
+ * Lower a Markdown string into the unified {@link GigaDocument} model
720
+ * (CommonMark-ish: headings, lists, GFM tables, fenced code, emphasis/links).
721
+ */
722
+ mdToModel(md) {
723
+ return this._withStr(
724
+ md,
725
+ (p, l) => JSON.parse(this._str((o) => this.ex.gp_model_from_md(p, l, o)))
726
+ );
727
+ }
728
+ /**
729
+ * Lower a CSV file (UTF-8 bytes, RFC 4180, auto-detected `,`/`;`/tab/`|`
730
+ * delimiter) into the unified {@link GigaDocument} model as a single editable
731
+ * table. Returns `null` if the bytes contain no parseable fields.
732
+ */
733
+ csvToModel(csv) {
734
+ return this._withBytes(
735
+ csv,
736
+ (p, l) => this._modelOrNull((o) => this.ex.gp_model_from_csv(p, l, o))
737
+ );
738
+ }
718
739
  /**
719
740
  * Apply a batch of {@link ModelOp} edits to a model and return the edited
720
741
  * model. Ops run in order; out-of-range addresses (and any op that can't be