@laminapdf/wasm 0.2.0-alpha.2 → 0.2.0-alpha.4

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.
@@ -32,7 +32,7 @@ export interface ProgressJs {
32
32
  */
33
33
  total?: number;
34
34
  /**
35
- * The phase (`parse`, `layout`, `extract`, `render`, `write`, `sign`).
35
+ * The phase (`parse`, `layout`, `extract`, `render`, `write`, `sign`, `model`).
36
36
  */
37
37
  phase: string;
38
38
  }
@@ -864,7 +864,8 @@ export class WasmPage {
864
864
  * The page's current 0-based index.
865
865
  *
866
866
  * # Errors
867
- * `unknown-page` when the page is gone; reading errors.
867
+ * `unknown-page` when the page is gone; `disposed` when its document is freed; reading
868
+ * errors.
868
869
  */
869
870
  index(): number;
870
871
  /**
@@ -890,7 +891,8 @@ export class WasmPageBuilder {
890
891
  [Symbol.dispose](): void;
891
892
  /**
892
893
  * Opens an artifact until the matching `endTag`: `kind` is `layout`, `page`, `pagination`
893
- * or `background`.
894
+ * or `background`, or a pagination artifact that says what it is: `header` (attached to the
895
+ * top edge), `footer` (the bottom) or `watermark`.
894
896
  *
895
897
  * # Errors
896
898
  * `invalid-argument` for another kind.
@@ -1075,7 +1077,8 @@ export class WasmSaveJob {
1075
1077
  * `{ state: "done", bytes, report }`.
1076
1078
  *
1077
1079
  * # Errors
1078
- * `cancelled`, `document-changed`, `job-finished`, or the save's own errors.
1080
+ * `cancelled`, `document-changed`, `job-finished`, `disposed` when the document is freed,
1081
+ * or the save's own errors.
1079
1082
  */
1080
1083
  step(budget: number): ({ state: "progress" } & ProgressJs) | { state: "done"; bytes: Uint8Array<ArrayBuffer>; report: SaveReportJs };
1081
1084
  }
@@ -1134,6 +1137,14 @@ export class WasmWarningCursor {
1134
1137
  remaining(): number;
1135
1138
  }
1136
1139
 
1140
+ export function __wbg_reset_state(): void;
1141
+
1142
+ /**
1143
+ * Whether the most recent allocation failed: after a trap, `true` means the module ran out of
1144
+ * memory.
1145
+ */
1146
+ export function allocationFailed(): boolean;
1147
+
1137
1148
  /**
1138
1149
  * Whether this module is the text module (fonts, `text`, `textBox`).
1139
1150
  */
@@ -1156,6 +1167,7 @@ export interface InitOutput {
1156
1167
  readonly __wbg_wasmsavejob_free: (a: number, b: number) => void;
1157
1168
  readonly __wbg_wasmsparsesource_free: (a: number, b: number) => void;
1158
1169
  readonly __wbg_wasmwarningcursor_free: (a: number, b: number) => void;
1170
+ readonly allocationFailed: () => number;
1159
1171
  readonly hasText: () => number;
1160
1172
  readonly version: () => [number, number];
1161
1173
  readonly wasmbuilder_attach: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: any) => [number, number];