@build-qube/papyra 0.5.0 → 0.7.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/tiff.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"tiff.js","sourceRoot":"","sources":["../src/tiff.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,GAET,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AA6DtC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,GAAG,IAAI,CAAC;AAE3C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,MAAiB;IAC9C,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;IACpC,OAAO,IAAI,SAAS,CAAC,MAAM,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;AAC9C,CAAC;AAED,qDAAqD;AACrD,MAAM,OAAO,SAAS;IACpB;;;OAGG;IACM,KAAK,CAAsB;IAC3B,OAAO,CAAkB;IAElC,kDAAkD;IAClD,YAAY,MAAuB;QACjC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YACpC,KAAK,EAAE,CAAC,CAAC,KAAK;YACd,MAAM,EAAE,CAAC,CAAC,MAAM;YAChB,GAAG,EAAE,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS;YACpE,WAAW,EAAE,CAAC,CAAC,WAA8B;YAC7C,aAAa,EAAE,CAAC,CAAC,aAAa;YAC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E;IAC5E,OAAO,IAAI,SAAS,CAAC,CAAC,MAAM,QAAQ,CAAC,KAAK,CAAC,CAAe,CAAC,CAAC;AAC9D,CAAC"}
package/dist/types.d.ts CHANGED
@@ -124,6 +124,21 @@ export interface StreamedPage<P extends PageBitmap = RenderedPage> {
124
124
  /** The rendered pixels. */
125
125
  readonly bitmap: P;
126
126
  }
127
+ /**
128
+ * One window of a page's render, in its output pixels: the corner's offset from the
129
+ * page's top-left and the window's size. For showing a page too large to render
130
+ * whole; see {@link PagedEngine.renderTile}.
131
+ */
132
+ export interface Tile {
133
+ /** Pixels from the page's left edge. */
134
+ readonly x: number;
135
+ /** Pixels from the page's top edge. */
136
+ readonly y: number;
137
+ /** Width in pixels, 1 to 65535. */
138
+ readonly width: number;
139
+ /** Height in pixels, 1 to 65535. */
140
+ readonly height: number;
141
+ }
127
142
  /** Page dimensions in PDF points (1/72 inch). */
128
143
  export interface PageSize {
129
144
  /** Width in points, with rotation and the crop box already applied. */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,iFAAiF;AACjF,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,WAAW,GAAG,eAAe,GAAG,IAAI,CAAC;AAE1E,4DAA4D;AAC5D,MAAM,WAAW,aAAa;IAC5B;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gDAAgD;IAChD,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,mEAAmE;IACnE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;;;;;;;;;;;OAeG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,6EAA6E;AAC7E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C,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,oEAAoE;IACpE,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,8DAA8D;IAC9D,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC;;;;;;OAMG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,qDAAqD;IACrD,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC;AAED,yFAAyF;AACzF,MAAM,WAAW,WAAW;IAC1B,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;;;;;;OASG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,2CAA2C;AAC3C,MAAM,WAAW,aAAc,SAAQ,YAAY;IACjD;;;;;OAKG;IACH,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1B,oCAAoC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oFAAoF;IACpF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0EAA0E;IAC1E,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,uFAAuF;AACvF,MAAM,WAAW,YAAY,CAAC,CAAC,SAAS,UAAU,GAAG,YAAY,CAC/D,SAAQ,SAAS,CAAC,CAAC,CAAC;IACpB;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;CAC1B"}
@@ -1,70 +1,11 @@
1
- import { type Sheet as NativeSheet, type Workbook as NativeWorkbook } from '@build-qube/papyra-native';
2
- import { CellWindow, type MergedRange } from './cells.js';
3
- import { type CellStyle, type SheetLayout } from './styles.js';
1
+ import { type Workbook, type WorkbookOptions } from './sheets.js';
4
2
  import type { PdfSource } from './types.js';
5
- /**
6
- * The container a workbook was read from.
7
- *
8
- * Macro-enabled and template variants read as their base format: an `.xlsm` is
9
- * `'xlsx'` here, because to a reader that is what it is.
10
- */
11
- export type WorkbookFormat = 'xlsx' | 'xlsb' | 'xls' | 'ods' | 'csv' | 'tsv';
12
- /** How to read a workbook. Everything is sniffed when left out. */
13
- export interface WorkbookOptions {
14
- /**
15
- * Skip sniffing. Only needed to read a file as TSV that was not named `.tsv` —
16
- * the binary formats identify themselves, and text is sniffed for its delimiter.
17
- * `'xlsm'` is accepted and reads as `'xlsx'`.
18
- */
19
- format?: WorkbookFormat | 'xlsm';
20
- /** CSV and TSV only: the delimiter, a single ASCII character such as `';'`. */
21
- delimiter?: string;
22
- /**
23
- * CSV and TSV only: a WHATWG encoding label, e.g. `'windows-1252'` or
24
- * `'shift_jis'`. Without one, a byte-order mark decides, then valid UTF-8, then a
25
- * statistical guess.
26
- */
27
- encoding?: string;
28
- /**
29
- * Cells to hold per sheet before truncating it to its first whole rows. Defaults
30
- * to 8 million — about 400 MB, which a browser tab survives. A sheet that hits it
31
- * reports {@link Sheet.truncated}.
32
- */
33
- maxCells?: number;
34
- }
35
- /** Whether a sheet shows in the application's tab bar. */
36
- export type SheetVisibility = 'visible' | 'hidden' | 'veryHidden';
37
- /** What a sheet holds. Only worksheets have cells worth showing. */
38
- export type SheetKind = 'worksheet' | 'chartsheet' | 'dialog' | 'macro' | 'vba';
39
- /** A sheet's entry in the workbook, known without reading its cells. */
40
- export interface SheetInfo {
41
- /** The name on the sheet's tab. CSV and TSV have one sheet, named `Sheet1`. */
42
- name: string;
43
- /** What the sheet holds. */
44
- kind: SheetKind;
45
- /**
46
- * `'hidden'` sheets can be unhidden by the user; `'veryHidden'` ones only by a
47
- * macro. A viewer usually lists the first and omits the second.
48
- */
49
- visibility: SheetVisibility;
50
- }
51
- /** Rows and columns to read, half-open like `Array.prototype.slice`. */
52
- export interface WindowRange {
53
- /** First row, 0-based. */
54
- rowStart: number;
55
- /** One past the last row. Clamped to the sheet. */
56
- rowEnd: number;
57
- /** First column. Defaults to 0. */
58
- colStart?: number;
59
- /** One past the last column. Defaults to every column. */
60
- colEnd?: number;
61
- }
62
3
  /**
63
4
  * Open a spreadsheet: Excel (`.xlsx`, `.xlsm`, `.xlsb`, `.xls`), OpenDocument
64
5
  * (`.ods`), or delimited text (`.csv`, `.tsv`).
65
6
  *
66
7
  * Parsing happens in Rust and off the JS thread, and only sheet names are read up
67
- * front: a sheet's cells are read the first time {@link Workbook.sheet} asks for it.
8
+ * front: a sheet's cells are read the first time `Workbook.sheet` asks for it.
68
9
  *
69
10
  * @example
70
11
  * ```ts
@@ -74,79 +15,7 @@ export interface WindowRange {
74
15
  * cells.text(0, 0); // 'Item'
75
16
  * ```
76
17
  *
77
- * @throws {@link EncryptedWorkbookError} when the workbook is password-protected.
18
+ * @throws `EncryptedWorkbookError` when the workbook is password-protected.
78
19
  */
79
20
  export declare function openWorkbook(source: PdfSource, options?: WorkbookOptions): Promise<Workbook>;
80
- /** An opened spreadsheet. Get one from {@link openWorkbook}. */
81
- export declare class Workbook {
82
- #private;
83
- /** The container actually read. */
84
- readonly format: WorkbookFormat;
85
- /** Every sheet in tab order, hidden ones included. */
86
- readonly sheets: readonly SheetInfo[];
87
- /**
88
- * CSV and TSV only: the encoding the text was decoded from, e.g.
89
- * `'windows-1252'`. Worth showing when it was guessed — a wrong guess reads as
90
- * mojibake, and {@link WorkbookOptions.encoding} is the fix.
91
- */
92
- readonly encoding: string | undefined;
93
- /** CSV and TSV only: the delimiter, given or sniffed. */
94
- readonly delimiter: string | undefined;
95
- /** @internal — construct via {@link openWorkbook}. */
96
- constructor(native: NativeWorkbook);
97
- /**
98
- * Read one sheet, by index or by name.
99
- *
100
- * The first call parses the sheet, off the JS thread; later calls for the same
101
- * sheet share that result.
102
- */
103
- sheet(which: number | string): Promise<Sheet>;
104
- }
105
- /**
106
- * One sheet, parsed and held in Rust. Read it a window at a time.
107
- *
108
- * Coordinates are the sheet's own and 0-based: row 0 is the row Excel labels 1, and
109
- * a sheet whose data starts at F10 still reports ten rows and six columns, so a grid
110
- * draws the data where its author put it.
111
- */
112
- export declare class Sheet {
113
- #private;
114
- /** The name on the sheet's tab. */
115
- readonly name: string;
116
- /** One past the last row holding a value or covered by a merge. */
117
- readonly rows: number;
118
- /**
119
- * The sheet held more cells than {@link WorkbookOptions.maxCells}, and this is
120
- * its first whole rows. Worth saying on screen: the rest of the file is not here.
121
- */
122
- readonly truncated: boolean;
123
- /** One past the last column holding a value or covered by a merge. */
124
- readonly cols: number;
125
- /**
126
- * Merged regions. The value lives in each one's top-left cell; the others are
127
- * empty. Always empty for `.xlsb` and `.ods`, which calamine does not read
128
- * merges from.
129
- */
130
- readonly merges: readonly MergedRange[];
131
- /**
132
- * The styles {@link CellWindow.style} indexes into, with the default at 0.
133
- * xlsx only: empty for every other format, whose cells all read as style 0.
134
- */
135
- readonly styles: readonly CellStyle[];
136
- /**
137
- * Column widths and row heights as the author set them. xlsx only; for anything
138
- * else a grid sizes columns itself.
139
- */
140
- readonly layout: SheetLayout | undefined;
141
- /** @internal — construct via {@link Workbook.sheet}. */
142
- constructor(native: NativeSheet);
143
- /**
144
- * Read a rectangle of cells, clamped to the sheet.
145
- *
146
- * Synchronous, because the sheet is already parsed and the cost is the size of
147
- * the window. Ask for what is on screen plus some overscan, not the whole sheet:
148
- * a screenful is a few thousand cells and well under a millisecond.
149
- */
150
- window(range: WindowRange): CellWindow;
151
- }
152
21
  //# sourceMappingURL=workbook.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"workbook.d.ts","sourceRoot":"","sources":["../src/workbook.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,KAAK,IAAI,WAAW,EACzB,KAAK,QAAQ,IAAI,cAAc,EAChC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,KAAK,WAAW,E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EACrB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,SAAS,EACjB,OAAO,GAAE,eAAoB,GAC5B,OAAO,CAAC,QAAQ,CAAC,CAEnB"}
package/dist/workbook.js CHANGED
@@ -1,14 +1,11 @@
1
- import { loadWorkbook, } from '@build-qube/papyra-native';
2
- import { CellWindow, toMergedRanges } from './cells.js';
3
- import { rethrowLoadError } from './errors.js';
4
- import { toBytes } from './source.js';
5
- import { toCellStyle, toSheetLayout, } from './styles.js';
1
+ import { loadWorkbook } from '@build-qube/papyra-native';
2
+ import { openWorkbookWith, } from './sheets.js';
6
3
  /**
7
4
  * Open a spreadsheet: Excel (`.xlsx`, `.xlsm`, `.xlsb`, `.xls`), OpenDocument
8
5
  * (`.ods`), or delimited text (`.csv`, `.tsv`).
9
6
  *
10
7
  * Parsing happens in Rust and off the JS thread, and only sheet names are read up
11
- * front: a sheet's cells are read the first time {@link Workbook.sheet} asks for it.
8
+ * front: a sheet's cells are read the first time `Workbook.sheet` asks for it.
12
9
  *
13
10
  * @example
14
11
  * ```ts
@@ -18,141 +15,9 @@ import { toCellStyle, toSheetLayout, } from './styles.js';
18
15
  * cells.text(0, 0); // 'Item'
19
16
  * ```
20
17
  *
21
- * @throws {@link EncryptedWorkbookError} when the workbook is password-protected.
18
+ * @throws `EncryptedWorkbookError` when the workbook is password-protected.
22
19
  */
23
- export async function openWorkbook(source, options = {}) {
24
- const bytes = await toBytes(source);
25
- const format = options.format ?? formatFromName(source);
26
- try {
27
- const native = await loadWorkbook(bytes, { ...options, format });
28
- return new Workbook(native);
29
- }
30
- catch (error) {
31
- rethrowLoadError(error);
32
- }
33
- }
34
- /**
35
- * A `File` named `.tsv` is TSV whatever its contents sniff as.
36
- *
37
- * Only that one extension is trusted. The binary formats announce themselves in
38
- * their first bytes, and a `.xls` downloaded from a web app is as often an HTML
39
- * table or a CSV as it is BIFF — believing the name would refuse a readable file.
40
- */
41
- function formatFromName(source) {
42
- const name = source.name;
43
- return typeof name === 'string' && /\.(tsv|tab)$/i.test(name)
44
- ? 'tsv'
45
- : undefined;
46
- }
47
- /** An opened spreadsheet. Get one from {@link openWorkbook}. */
48
- export class Workbook {
49
- /** The container actually read. */
50
- format;
51
- /** Every sheet in tab order, hidden ones included. */
52
- sheets;
53
- /**
54
- * CSV and TSV only: the encoding the text was decoded from, e.g.
55
- * `'windows-1252'`. Worth showing when it was guessed — a wrong guess reads as
56
- * mojibake, and {@link WorkbookOptions.encoding} is the fix.
57
- */
58
- encoding;
59
- /** CSV and TSV only: the delimiter, given or sniffed. */
60
- delimiter;
61
- #native;
62
- #sheets = new Map();
63
- /** @internal — construct via {@link openWorkbook}. */
64
- constructor(native) {
65
- this.#native = native;
66
- this.format = native.format;
67
- this.sheets = native.sheets.map((s) => ({
68
- name: s.name,
69
- kind: s.kind,
70
- visibility: s.visibility,
71
- }));
72
- this.encoding = native.encoding ?? undefined;
73
- this.delimiter = native.delimiter ?? undefined;
74
- }
75
- /**
76
- * Read one sheet, by index or by name.
77
- *
78
- * The first call parses the sheet, off the JS thread; later calls for the same
79
- * sheet share that result.
80
- */
81
- sheet(which) {
82
- const index = typeof which === 'number'
83
- ? which
84
- : this.sheets.findIndex((s) => s.name === which);
85
- if (!Number.isInteger(index) || index < 0 || index >= this.sheets.length) {
86
- return Promise.reject(new RangeError(`papyra: no sheet ${JSON.stringify(which)}`));
87
- }
88
- let sheet = this.#sheets.get(index);
89
- if (!sheet) {
90
- sheet = this.#native.sheet(index).then((native) => new Sheet(native));
91
- // A failed read is not cached, so a retry gets a fresh attempt.
92
- sheet.catch(() => this.#sheets.delete(index));
93
- this.#sheets.set(index, sheet);
94
- }
95
- return sheet;
96
- }
97
- }
98
- /**
99
- * One sheet, parsed and held in Rust. Read it a window at a time.
100
- *
101
- * Coordinates are the sheet's own and 0-based: row 0 is the row Excel labels 1, and
102
- * a sheet whose data starts at F10 still reports ten rows and six columns, so a grid
103
- * draws the data where its author put it.
104
- */
105
- export class Sheet {
106
- /** The name on the sheet's tab. */
107
- name;
108
- /** One past the last row holding a value or covered by a merge. */
109
- rows;
110
- /**
111
- * The sheet held more cells than {@link WorkbookOptions.maxCells}, and this is
112
- * its first whole rows. Worth saying on screen: the rest of the file is not here.
113
- */
114
- truncated;
115
- /** One past the last column holding a value or covered by a merge. */
116
- cols;
117
- /**
118
- * Merged regions. The value lives in each one's top-left cell; the others are
119
- * empty. Always empty for `.xlsb` and `.ods`, which calamine does not read
120
- * merges from.
121
- */
122
- merges;
123
- /**
124
- * The styles {@link CellWindow.style} indexes into, with the default at 0.
125
- * xlsx only: empty for every other format, whose cells all read as style 0.
126
- */
127
- styles;
128
- /**
129
- * Column widths and row heights as the author set them. xlsx only; for anything
130
- * else a grid sizes columns itself.
131
- */
132
- layout;
133
- #native;
134
- /** @internal — construct via {@link Workbook.sheet}. */
135
- constructor(native) {
136
- this.#native = native;
137
- this.name = native.name;
138
- this.rows = native.rows;
139
- this.truncated = native.truncated;
140
- this.cols = native.cols;
141
- this.merges = toMergedRanges(native.merges);
142
- this.styles = native.styles.map(toCellStyle);
143
- this.layout = native.layout ? toSheetLayout(native.layout) : undefined;
144
- }
145
- /**
146
- * Read a rectangle of cells, clamped to the sheet.
147
- *
148
- * Synchronous, because the sheet is already parsed and the cost is the size of
149
- * the window. Ask for what is on screen plus some overscan, not the whole sheet:
150
- * a screenful is a few thousand cells and well under a millisecond.
151
- */
152
- window(range) {
153
- // The bindings take u32s, which a negative overscan would wrap rather than clamp.
154
- const at = (n) => Math.max(0, Math.floor(n));
155
- return new CellWindow(this.#native.window(at(range.rowStart), at(range.rowEnd), at(range.colStart ?? 0), at(range.colEnd ?? this.cols)));
156
- }
20
+ export function openWorkbook(source, options = {}) {
21
+ return openWorkbookWith(loadWorkbook, source, options);
157
22
  }
158
23
  //# sourceMappingURL=workbook.js.map
@@ -1 +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,aAAa,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACzE,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,KAAkB;QACvB,kFAAkF;QAClF,MAAM,EAAE,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACrD,OAAO,IAAI,UAAU,CACnB,IAAI,CAAC,OAAO,CAAC,MAAM,CACjB,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,EAClB,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,EAChB,EAAE,CAAC,KAAK,CAAC,QAAQ,IAAI,CAAC,CAAC,EACvB,EAAE,CAAC,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC,IAAI,CAAC,CAC9B,CACF,CAAC;IACJ,CAAC;CACF"}
1
+ {"version":3,"file":"workbook.js","sourceRoot":"","sources":["../src/workbook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EACL,gBAAgB,GAGjB,MAAM,aAAa,CAAC;AAGrB;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,YAAY,CAC1B,MAAiB,EACjB,OAAO,GAAoB,EAAE;IAE7B,OAAO,gBAAgB,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AACzD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@build-qube/papyra",
3
- "version": "0.5.0",
3
+ "version": "0.7.0",
4
4
  "description": "Fast PDF rendering for Node and the browser, powered by Rust",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -52,14 +52,14 @@
52
52
  "test:integration": "bun test test/integration"
53
53
  },
54
54
  "dependencies": {
55
- "@build-qube/papyra-native": "0.5.0"
55
+ "@build-qube/papyra-native": "0.7.0"
56
56
  },
57
57
  "devDependencies": {
58
58
  "typescript": "^7.0.2",
59
59
  "@build-qube/papyra-office-native": "workspace:*"
60
60
  },
61
61
  "peerDependencies": {
62
- "@build-qube/papyra-office-native": "0.5.0"
62
+ "@build-qube/papyra-office-native": "0.7.0"
63
63
  },
64
64
  "peerDependenciesMeta": {
65
65
  "@build-qube/papyra-office-native": {