@embedpdf/engine-core 3.0.0-next.12 → 3.0.0-next.13

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.
Files changed (59) hide show
  1. package/dist/{AbortError-CRSooKsk.cjs → AbortError-Cq2igpZ6.cjs} +2 -2
  2. package/dist/{AbortError-CRSooKsk.cjs.map → AbortError-Cq2igpZ6.cjs.map} +1 -1
  3. package/dist/{AbortError-8-9JAX1Y.js → AbortError-DHqPBnYc.js} +2 -2
  4. package/dist/{AbortError-8-9JAX1Y.js.map → AbortError-DHqPBnYc.js.map} +1 -1
  5. package/dist/{AnnotationListSnapshot-x6tKulNV.d.cts → AnnotationListSnapshot-D3mFut1e.d.cts} +1155 -171
  6. package/dist/{AnnotationListSnapshot-x6tKulNV.d.ts → AnnotationListSnapshot-D3mFut1e.d.ts} +1155 -171
  7. package/dist/{DocumentSecurityService-CK0pejAK.d.cts → DocumentSecurityService-ClTZc0zO.d.cts} +2 -2
  8. package/dist/{DocumentSecurityService-9MawYxP-.d.ts → DocumentSecurityService-_JRjqvoI.d.ts} +2 -2
  9. package/dist/{Engine-Ds0ytbl6.d.ts → Engine-Bx0NOfmd.d.cts} +166 -11
  10. package/dist/{Engine--0XF0UAK.d.cts → Engine-DxtpCYcP.d.ts} +166 -11
  11. package/dist/{PageInsertBlankInput-CzShuSJI.cjs → PageInsertBlankInput-CqXBmFhN.cjs} +37 -2
  12. package/dist/PageInsertBlankInput-CqXBmFhN.cjs.map +1 -0
  13. package/dist/{PageInsertBlankInput-WKY0tr6S.js → PageInsertBlankInput-cHq9-i-z.js} +37 -2
  14. package/dist/PageInsertBlankInput-cHq9-i-z.js.map +1 -0
  15. package/dist/{builders-8Hl1AYNU.cjs → builders-Bqm8yTpi.cjs} +1470 -4
  16. package/dist/builders-Bqm8yTpi.cjs.map +1 -0
  17. package/dist/{builders-DOjcKDWQ.js → builders-Dqo2X-dt.js} +1351 -5
  18. package/dist/builders-Dqo2X-dt.js.map +1 -0
  19. package/dist/conformance.cjs +1079 -13
  20. package/dist/conformance.cjs.map +1 -1
  21. package/dist/conformance.d.cts +70 -3
  22. package/dist/conformance.d.ts +70 -3
  23. package/dist/conformance.js +1079 -14
  24. package/dist/conformance.js.map +1 -1
  25. package/dist/{fold-C7I5GpBz.cjs → fold-2V29cxCV.cjs} +2 -2
  26. package/dist/{fold-C7I5GpBz.cjs.map → fold-2V29cxCV.cjs.map} +1 -1
  27. package/dist/{fold-BfyxxwS6.js → fold-CdEJTBTn.js} +2 -2
  28. package/dist/{fold-BfyxxwS6.js.map → fold-CdEJTBTn.js.map} +1 -1
  29. package/dist/index.cjs +33 -4
  30. package/dist/index.d.cts +2 -2
  31. package/dist/index.d.ts +2 -2
  32. package/dist/index.js +5 -5
  33. package/dist/{resolver-D-jumvgM.cjs → resolver-CYVNV4hn.cjs} +216 -10
  34. package/dist/resolver-CYVNV4hn.cjs.map +1 -0
  35. package/dist/{resolver-CHG4waXL.js → resolver-inAVzsWt.js} +157 -11
  36. package/dist/resolver-inAVzsWt.js.map +1 -0
  37. package/dist/runtime.cjs +34 -5
  38. package/dist/runtime.d.cts +192 -5
  39. package/dist/runtime.d.ts +192 -5
  40. package/dist/runtime.js +6 -6
  41. package/dist/{schemas-DOyVEPk7.js → schemas-BLARNCgx.js} +420 -4
  42. package/dist/schemas-BLARNCgx.js.map +1 -0
  43. package/dist/{schemas-RChsAMWw.cjs → schemas-DIqFMmrC.cjs} +581 -3
  44. package/dist/schemas-DIqFMmrC.cjs.map +1 -0
  45. package/dist/wire.cjs +228 -12
  46. package/dist/wire.cjs.map +1 -1
  47. package/dist/wire.d.cts +415 -4
  48. package/dist/wire.d.ts +415 -4
  49. package/dist/wire.js +199 -13
  50. package/dist/wire.js.map +1 -1
  51. package/package.json +1 -1
  52. package/dist/PageInsertBlankInput-CzShuSJI.cjs.map +0 -1
  53. package/dist/PageInsertBlankInput-WKY0tr6S.js.map +0 -1
  54. package/dist/builders-8Hl1AYNU.cjs.map +0 -1
  55. package/dist/builders-DOjcKDWQ.js.map +0 -1
  56. package/dist/resolver-CHG4waXL.js.map +0 -1
  57. package/dist/resolver-D-jumvgM.cjs.map +0 -1
  58. package/dist/schemas-DOyVEPk7.js.map +0 -1
  59. package/dist/schemas-RChsAMWw.cjs.map +0 -1
@@ -1,4 +1,4 @@
1
- import { Ic as DocCapability, Lc as IdentityClaims, Uc as PdfBits, _c as CollabTarget } from "./AnnotationListSnapshot-x6tKulNV.cjs";
1
+ import { Su as PdfBits, gu as IdentityClaims, hl as CollabTarget, hu as DocCapability } from "./AnnotationListSnapshot-D3mFut1e.cjs";
2
2
  //#region src/promise/AbortablePromise.d.ts
3
3
  type AbortableExecutor<T, P> = (resolve: (value: T | PromiseLike<T>) => void, reject: (reason: unknown) => void, progress: (p: P) => void, signal: AbortSignal) => void;
4
4
  /**
@@ -360,4 +360,4 @@ interface DocumentSecurityService {
360
360
  }
361
361
  //#endregion
362
362
  export { DocumentEncryptionState as a, DocumentSecurityState as c, PdfPermissionAdvisory as d, PdfPermissionInfo as f, AbortablePromise as g, AbortableExecutor as h, DocumentAccessReason as i, DocumentUnlockInput as l, passwordPromptFromState as m, CdnAdapter as n, DocumentOpenMode as o, PasswordPrompt as p, DocumentAccessInfo as r, DocumentSecurityService as s, CdnAccessInfo as t, DocumentUnlockResult as u };
363
- //# sourceMappingURL=DocumentSecurityService-CK0pejAK.d.cts.map
363
+ //# sourceMappingURL=DocumentSecurityService-ClTZc0zO.d.cts.map
@@ -1,4 +1,4 @@
1
- import { Ic as DocCapability, Lc as IdentityClaims, Uc as PdfBits, _c as CollabTarget } from "./AnnotationListSnapshot-x6tKulNV.js";
1
+ import { Su as PdfBits, gu as IdentityClaims, hl as CollabTarget, hu as DocCapability } from "./AnnotationListSnapshot-D3mFut1e.js";
2
2
  //#region src/promise/AbortablePromise.d.ts
3
3
  type AbortableExecutor<T, P> = (resolve: (value: T | PromiseLike<T>) => void, reject: (reason: unknown) => void, progress: (p: P) => void, signal: AbortSignal) => void;
4
4
  /**
@@ -360,4 +360,4 @@ interface DocumentSecurityService {
360
360
  }
361
361
  //#endregion
362
362
  export { DocumentEncryptionState as a, DocumentSecurityState as c, PdfPermissionAdvisory as d, PdfPermissionInfo as f, AbortablePromise as g, AbortableExecutor as h, DocumentAccessReason as i, DocumentUnlockInput as l, passwordPromptFromState as m, CdnAdapter as n, DocumentOpenMode as o, PasswordPrompt as p, DocumentAccessInfo as r, DocumentSecurityService as s, CdnAccessInfo as t, DocumentUnlockResult as u };
363
- //# sourceMappingURL=DocumentSecurityService-9MawYxP-.d.ts.map
363
+ //# sourceMappingURL=DocumentSecurityService-_JRjqvoI.d.ts.map
@@ -1,5 +1,5 @@
1
- import { $i as FormFieldRef, $n as PageNameResult, $r as FormImportResult, Bi as FormFieldDTO, Bl as DocumentMetadata, Bn as PageDeleteResult, Fn as RedactionApplyScope, Fr as SearchSlice, Gc as AnnotationRef, Go as PdfSaveMode, Ha as AttachmentDeleteResult, Hn as PageRotateResult, Ho as FontKey, Jo as AnnotationAppearanceImageOptions, Mn as MetadataUpdateResult, Ms as PageTextSnapshot, Pn as RedactionApplyResult, Pr as SearchRequest, Qn as PageFlattenUsage, Qr as FormFieldUpdateResult, Rl as PageObjectNumber, Rn as PageInsertBlankSpec, Ts as PageGeometrySnapshot, Uo as FontSpec, Va as AttachmentCreateResult, Vo as FontHandle, Xn as PageFlattenResult, Xr as FormFieldCreateResult, Yo as AnnotationAppearanceImagesResult, Yr as FormDataExport, Zr as FormFieldDeleteResult, Zs as PageListSnapshot, aa as AnnotationMoveResult, co as EmbeddedFileItem, cs as PageImageHandle, dc as OpenOptions, ea as FormWidgetRef, ei as FormRepairResult, er as PageNameInput, es as AnnotationAppearanceRenderOptions, fi as FormSubmissionRequest, hi as FormFieldValue, ia as AnnotationDeleteResult, ic as OpenInput, io as AttachmentContent, ji as FormSnapshot, l as AnnotationPatch, lo as EmbeddedFileRef, mi as FormDataFormat, ms as PageRaster, n as AnnotationListSnapshotAllPages, ni as FormWidgetLinkResult, ns as AnnotationAppearancesResult, o as AnnotationDraft, oa as AnnotationUpdateResult, oi as FormEffectsResult, qn as AnnotationFlattenResult, ra as AnnotationCreateResult, rc as MetadataPatch, ri as FormEffect, rr as PageMoveResult, so as AttachmentFileSource, t as AnnotationListPageSnapshot, ti as FormSetValueResult, tr as PageRemoveNameInput, ui as FormSubmissionReceipt, us as PageImageOptions, vi as FormFieldPatch, vs as PageRenderOptions, wi as FormFieldDraft, wl as DocumentActionsSnapshot, xl as PdfRotation, xs as PageRenderViewport, zn as PageInsertResult } from "./AnnotationListSnapshot-x6tKulNV.js";
2
- import { g as AbortablePromise, s as DocumentSecurityService } from "./DocumentSecurityService-9MawYxP-.js";
1
+ import { $n as PageNameResult, $r as FormImportResult, Ac as PageTextSnapshot, Bl as SignaturePrepareInput, Bn as PageDeleteResult, Ca as FormSnapshot, Cc as PageGeometrySnapshot, Cl as BaseVersionInfo, Do as AttachmentCreateResult, Fl as SignatureCompleteInput, Fn as RedactionApplyScope, Fr as SearchSlice, Ga as AnnotationCreateResult, Gs as FontSpec, Hn as PageRotateResult, Hs as FontHandle, Il as SignatureCompleteResult, Ja as AnnotationUpdateResult, Jo as EmbeddedFileItem, Js as PdfSaveMode, Ka as AnnotationDeleteResult, Ma as FormFieldDTO, Mi as AnalyzeInput, Mn as MetadataUpdateResult, Nl as SignatureAbortResult, Oo as AttachmentDeleteResult, Pi as ChangeAnalysis, Pl as SignatureAppearanceInput, Pn as RedactionApplyResult, Pr as SearchRequest, Qi as FormEffectsResult, Qn as PageFlattenUsage, Qr as FormFieldUpdateResult, Rn as PageInsertBlankSpec, Vl as SignaturePrepared, Wl as SignatureSnapshot, Wo as AttachmentContent, Ws as FontKey, Xn as PageFlattenResult, Xr as FormFieldCreateResult, Xs as AnnotationAppearanceImageOptions, Yc as PageListSnapshot, Yi as FormEffect, Yo as EmbeddedFileRef, Yr as FormDataExport, Zr as FormFieldDeleteResult, Zs as AnnotationAppearanceImagesResult, _d as PageObjectNumber, cc as PageImageOptions, ed as PdfRotation, ei as FormRepairResult, er as PageNameInput, eu as FormFieldRef, fc as PageRaster, ga as FormFieldDraft, gc as PageRenderOptions, ia as FormSubmissionRequest, ic as AnnotationAppearancesResult, l as AnnotationPatch, ll as OpenOptions, n as AnnotationListSnapshotAllPages, na as FormSubmissionReceipt, nc as AnnotationAppearanceRenderOptions, ni as FormWidgetLinkResult, nl as OpenInput, o as AnnotationDraft, oa as FormDataFormat, oc as PageImageHandle, qa as AnnotationMoveResult, qn as AnnotationFlattenResult, qo as AttachmentFileSource, rd as DocumentActionsSnapshot, rr as PageMoveResult, sa as FormFieldValue, t as AnnotationListPageSnapshot, ti as FormSetValueResult, tl as MetadataPatch, tr as PageRemoveNameInput, tu as FormWidgetRef, ua as FormFieldPatch, wl as DigestAlgorithm, wu as AnnotationRef, yc as PageRenderViewport, yd as DocumentMetadata, zn as PageInsertResult } from "./AnnotationListSnapshot-D3mFut1e.cjs";
2
+ import { g as AbortablePromise, s as DocumentSecurityService } from "./DocumentSecurityService-ClTZc0zO.cjs";
3
3
  //#region src/engine/DocumentActionsService.d.ts
4
4
  /** Lazy, catalog-owned PDF action read. This API extracts; it never executes. */
5
5
  interface DocumentActionsService {
@@ -83,6 +83,31 @@ interface DocumentAttachmentsService {
83
83
  delete?(ref: EmbeddedFileRef): AbortablePromise<AttachmentDeleteResult>;
84
84
  }
85
85
  //#endregion
86
+ //#region src/engine/DocumentFontSettings.d.ts
87
+ /**
88
+ * How much of a registered font's program the appearances authored in this
89
+ * document carry. `default` subsets annotation text (FreeText, redaction
90
+ * labels) and embeds form-field text whole; `subset` and `full` apply to
91
+ * both. A font whose licence forbids subsetting is embedded whole under
92
+ * every policy; programs already in the document are never re-embedded.
93
+ */
94
+ type FontEmbeddingPolicy = 'default' | 'subset' | 'full';
95
+ /**
96
+ * Per-document font and text-layout settings: session state of this
97
+ * document handle, never written to the file, applied to appearances
98
+ * generated after the call. Local engine only (`doc.fonts` is undefined on
99
+ * engines that do not lay text out in-process).
100
+ */
101
+ interface DocumentFontSettings {
102
+ setEmbeddingPolicy(policy: FontEmbeddingPolicy): AbortablePromise<void>;
103
+ /**
104
+ * Latin typographic features (kerning, ligatures) when shaping rich text.
105
+ * Off by default: Acrobat's appearances show plain advance widths and no
106
+ * ligatures, and parity with what Acrobat draws wins.
107
+ */
108
+ setTypographicFeatures(enabled: boolean): AbortablePromise<void>;
109
+ }
110
+ //#endregion
86
111
  //#region src/engine/DocumentFormsService.d.ts
87
112
  /** Options for {@link DocumentFormsService.repair}. */
88
113
  interface FormRepairOptions {
@@ -181,6 +206,14 @@ interface DocumentFormsService {
181
206
  * `form.fieldUpdated`.
182
207
  */
183
208
  updateField(ref: FormFieldRef, patch: FormFieldPatch): AbortablePromise<FormFieldUpdateResult>;
209
+ /**
210
+ * Draw a PDF page into every widget of an UNSIGNED signature field — the
211
+ * visual "sign" of a viewer that has no signer. The field's value stays
212
+ * empty and nothing is sealed; a signed field is refused. Gated by
213
+ * `doc.forms.fill`. Emits `form.fieldUpdated`. Absent on engines that
214
+ * cannot draw appearances.
215
+ */
216
+ setSignatureAppearance?(ref: FormFieldRef, appearance: SignatureAppearanceInput): AbortablePromise<FormFieldUpdateResult>;
184
217
  /**
185
218
  * Delete a terminal field and cascade: every widget is removed from its
186
219
  * page, the field leaves the tree, and empty ancestors are pruned.
@@ -339,9 +372,12 @@ interface DocumentPagesService {
339
372
  * rewrites THIS LAYER's bytes only. The immutable base document still
340
373
  * contains the original content — byte-perfect original recovery is a
341
374
  * feature of the storage model, not a leak. Redacted content becomes truly
342
- * unrecoverable only in what leaves the system: a layer download/export, or
343
- * a local document saved after apply. Surfaces that promise "permanent
344
- * removal" must scope that promise to the exported artifact.
375
+ * unrecoverable only in a full-rewrite export after apply. Callers MUST select
376
+ * `download({ mode: 'rewrite' })` (or the corresponding file/cloud save mode)
377
+ * before sharing the redacted PDF. The default incremental download preserves
378
+ * the original content in prior revisions; apply does not change that default.
379
+ * Surfaces that promise "permanent removal" must scope that promise to the
380
+ * full-rewrite exported artifact.
345
381
  *
346
382
  * Applying is irreversible within the layer (no undo). Emits a
347
383
  * `redaction.applied` document event; content-scope raster invalidation and
@@ -488,6 +524,64 @@ interface DocumentSearchService {
488
524
  query(request: SearchRequest): AbortablePromise<SearchSlice>;
489
525
  }
490
526
  //#endregion
527
+ //#region src/engine/DocumentSignaturesService.d.ts
528
+ /**
529
+ * Digital signatures on the document: the read side (what is signed, what
530
+ * it seals, what it forbids) and the two-phase signing protocol. The
531
+ * engine does the PDF job — candidate file, digest, sealing — and never
532
+ * holds a key; the CMS comes from the caller (`@embedpdf/core-signature`
533
+ * builds one from a raw signer, or a signing service returns it).
534
+ *
535
+ * Every read here describes the bytes the document was loaded from
536
+ * (for a layer document: base + the delta it was opened with). Unsaved
537
+ * edits are not part of any revision until `prepare` snapshots them.
538
+ *
539
+ * Reads ride `doc.forms.read`; `revisionBytes` rides `doc.download`;
540
+ * `prepare`/`complete`/`abort` ride `doc.sign`, a certification
541
+ * additionally `doc.sign.certify`.
542
+ */
543
+ interface DocumentSignaturesService {
544
+ /** Revisions, every signature field with its signed state, and the protection in force. */
545
+ list(): AbortablePromise<SignatureSnapshot>;
546
+ /** The DER `/Contents` of a signed field (exactly `contentsSize` bytes, padding stripped). `NotFound` for an unsigned field. */
547
+ contents(field: FormFieldRef): AbortablePromise<Uint8Array>;
548
+ /**
549
+ * Hash the signed field's `/ByteRange` with `algorithm`, straight from
550
+ * the loaded bytes. What a CMS verifier compares its message digest to.
551
+ */
552
+ digest(field: FormFieldRef, algorithm: DigestAlgorithm): AbortablePromise<Uint8Array>;
553
+ /** The exact bytes of revision `revisionIndex` (`[0, end)`): what a signature over it signed. */
554
+ revisionBytes(revisionIndex: number): AbortablePromise<Uint8Array>;
555
+ /**
556
+ * What changed after a signature (or after any revision), judged
557
+ * revision by revision against the restrictions in force: every object
558
+ * whose cross-reference mapping moved, with its value and every
559
+ * reference to it in both revisions, and the rule that explains each —
560
+ * or the reference no rule explains. `until: 'working-copy'` snapshots
561
+ * unsaved edits as one more revision first. A truncated value is never
562
+ * permitted; a broken chain is `indeterminate`.
563
+ */
564
+ analyze(input: AnalyzeInput): AbortablePromise<ChangeAnalysis>;
565
+ /**
566
+ * Build the candidate (unsaved edits become their own revision, the
567
+ * signature lands in a fresh update over it), seal it, and return the
568
+ * digest to sign. The live document is untouched and read-only until
569
+ * `complete` or `abort` (`SigningPending`). Refusals are
570
+ * `SignatureRefused` with the reason in the message.
571
+ */
572
+ prepare(input: SignaturePrepareInput): AbortablePromise<SignaturePrepared>;
573
+ /**
574
+ * Write the CMS into the candidate and install the sealed bytes as the
575
+ * document's new version. `expectedVersion` must be what `prepare`
576
+ * returned (`SigningVersionMismatch` otherwise). Idempotent: a replay
577
+ * with the same CMS answers `already-completed`. Emits
578
+ * `signature.completed` and `document.versioned`.
579
+ */
580
+ complete(input: SignatureCompleteInput): AbortablePromise<SignatureCompleteResult>;
581
+ /** Discard a pending candidate. */
582
+ abort(signingId: string): AbortablePromise<SignatureAbortResult>;
583
+ }
584
+ //#endregion
491
585
  //#region src/engine/MetadataService.d.ts
492
586
  interface MetadataService {
493
587
  read(): AbortablePromise<DocumentMetadata>;
@@ -866,6 +960,30 @@ type DocumentEvent = ({
866
960
  type: 'redaction.applied';
867
961
  origin: EventOrigin;
868
962
  } & RedactionApplyResult) | {
963
+ /** A signing candidate was parked: the document is read-only until it completes or aborts. */
964
+ type: 'signature.prepared';
965
+ signingId: string;
966
+ field: FormFieldRef;
967
+ origin: EventOrigin;
968
+ } | ({
969
+ /** The sealed bytes are installed; `version` is what they became. */
970
+ type: 'signature.completed';
971
+ signingId: string;
972
+ origin: EventOrigin;
973
+ } & SignatureCompleteResult) | {
974
+ type: 'signature.aborted';
975
+ signingId: string;
976
+ origin: EventOrigin;
977
+ } | {
978
+ /**
979
+ * The session moved to a new saved version (a completed signature,
980
+ * here or in another session). Byte-level facts — revisions,
981
+ * coverage, digests, verdicts — must be re-read.
982
+ */
983
+ type: 'document.versioned';
984
+ version: BaseVersionInfo;
985
+ origin: EventOrigin;
986
+ } | {
869
987
  /**
870
988
  * Cloud only: the live event stream fell too far behind to replay
871
989
  * (the server's SSE `full-refresh`) — state derived from earlier
@@ -936,6 +1054,13 @@ interface DocumentHandle {
936
1054
  readonly attachments?: DocumentAttachmentsService;
937
1055
  /** The document's interactive form (AcroForm): fields, values, interchange. */
938
1056
  readonly forms: DocumentFormsService;
1057
+ /**
1058
+ * Font embedding and text layout settings of this document (session
1059
+ * state). Optional: the local engine implements it; engines that do not
1060
+ * lay text out in-process omit it — feature-detect with
1061
+ * `doc.fonts !== undefined`.
1062
+ */
1063
+ readonly fonts?: DocumentFontSettings;
939
1064
  /**
940
1065
  * CATALOG-level `/PieceInfo` private application data (ISO 32000 §14.5)
941
1066
  * — e.g. a stamp library's display name. Optional: the local engine
@@ -969,6 +1094,13 @@ interface DocumentHandle {
969
1094
  * ship it — feature-detect with `doc.redaction !== undefined`.
970
1095
  */
971
1096
  readonly redaction?: DocumentRedactionService;
1097
+ /**
1098
+ * Digital signatures: the read side (revisions, signed fields, the
1099
+ * protection they impose) and the two-phase signing protocol. Optional
1100
+ * while engines ship it — feature-detect with
1101
+ * `doc.signatures !== undefined`.
1102
+ */
1103
+ readonly signatures?: DocumentSignaturesService;
972
1104
  /**
973
1105
  * The document's event stream — every confirmed mutation, exactly once,
974
1106
  * identical shape on local and cloud engines (see `DocumentEvent`). The
@@ -984,13 +1116,29 @@ interface DocumentHandle {
984
1116
  download(opts?: {
985
1117
  mode?: PdfSaveMode;
986
1118
  }): AbortablePromise<Uint8Array>;
1119
+ /**
1120
+ * Local Node engines only: write the document to a local file without
1121
+ * moving its bytes through JS. An untouched session (no unsaved edits,
1122
+ * incremental mode) is streamed out verbatim — for a signed document,
1123
+ * exactly as sealed. Absent on engines that cannot reach a filesystem.
1124
+ */
1125
+ downloadToFile?(path: string, opts?: {
1126
+ mode?: PdfSaveMode;
1127
+ }): AbortablePromise<void>;
1128
+ /**
1129
+ * The saved version this session is on: SHA-256 and length of the
1130
+ * loaded bytes (for a layer session, of its base). Changes only when
1131
+ * a signature completes. Optional while engines ship it.
1132
+ */
1133
+ version?(): AbortablePromise<BaseVersionInfo>;
987
1134
  /**
988
1135
  * Export JUST this document's LAYER as a self-contained artifact (the small
989
1136
  * overlay diff over the immutable base) — re-openable later via
990
- * `OpenInputLayerBytes` with `{ kind: 'artifact', bytes }`. Optional: only the
991
- * local engine, opened WITH a layer (`layerBytes`), supports it; the cloud
992
- * engine manages layers server-side and omits it. Rejects if the document was
993
- * opened without a layer.
1137
+ * `OpenInputLayerBytes` with `{ kind: 'artifact', bytes }`. Optional: the
1138
+ * local engine supports it for every session it opens as a layer (the
1139
+ * default `sessionKind`, and any `layerBytes` open); the cloud engine
1140
+ * manages layers server-side and omits it. Rejects on a session opened
1141
+ * with `sessionKind: 'plain'`.
994
1142
  */
995
1143
  downloadLayer?(): AbortablePromise<Uint8Array>;
996
1144
  close(): AbortablePromise<void>;
@@ -1038,6 +1186,13 @@ interface FontService {
1038
1186
  clearFallbacks(): AbortablePromise<void>;
1039
1187
  /** Unregister every font and reset the fallback chain. */
1040
1188
  clear(): AbortablePromise<void>;
1189
+ /**
1190
+ * Assert that the application holds a licence permitting editing with a
1191
+ * preview-and-print font, so FreeText authoring and missing-glyph fallback
1192
+ * may use it. Resolves to the updated handle (`editingAuthorized: true`).
1193
+ * Rejects with `InvalidArg` for an unregistered key.
1194
+ */
1195
+ authorizeEditing(font: FontHandle | FontKey): AbortablePromise<FontHandle>;
1041
1196
  /** Currently registered fonts, in registration order. */
1042
1197
  list(): readonly FontHandle[];
1043
1198
  }
@@ -1105,5 +1260,5 @@ interface Engine {
1105
1260
  */
1106
1261
  type EngineFactory = () => Engine;
1107
1262
  //#endregion
1108
- export { DocumentPagesService as A, CONTINUOUS_RENDER_POLICY as C, snapFullPageViewport as D, snapAppearanceScale as E, WeakAnnotationEditSession as F, DocumentActionsService as I, FormRepairOptions as M, DocumentAttachmentsService as N, snapTileScale as O, DocumentAnnotationsService as P, DocumentSearchService as S, EngineRenderPolicy as T, PageTextService as _, DocumentHandle as a, PageAnnotationsService as b, DocumentEventInit as c, PageHandle as d, PieceInfoService as f, PieceInfoSnapshot as g, PieceInfoPatchValue as h, DocumentCapabilities as i, DocumentFormsService as j, DocumentRedactionService as k, DocumentEventType as l, PieceInfoPatch as m, EngineFactory as n, DocumentEventStream as o, PieceInfoEntry as p, FontService as r, DocumentEvent as s, Engine as t, EventOrigin as u, PageRenderService as v, DocumentRenderService as w, MetadataService as x, PageGeometryService as y };
1109
- //# sourceMappingURL=Engine-Ds0ytbl6.d.ts.map
1263
+ export { DocumentRedactionService as A, DocumentSearchService as C, snapAppearanceScale as D, EngineRenderPolicy as E, FontEmbeddingPolicy as F, DocumentAttachmentsService as I, DocumentAnnotationsService as L, DocumentFormsService as M, FormRepairOptions as N, snapFullPageViewport as O, DocumentFontSettings as P, WeakAnnotationEditSession as R, DocumentSignaturesService as S, DocumentRenderService as T, PageTextService as _, DocumentHandle as a, PageAnnotationsService as b, DocumentEventInit as c, PageHandle as d, PieceInfoService as f, PieceInfoSnapshot as g, PieceInfoPatchValue as h, DocumentCapabilities as i, DocumentPagesService as j, snapTileScale as k, DocumentEventType as l, PieceInfoPatch as m, EngineFactory as n, DocumentEventStream as o, PieceInfoEntry as p, FontService as r, DocumentEvent as s, Engine as t, EventOrigin as u, PageRenderService as v, CONTINUOUS_RENDER_POLICY as w, MetadataService as x, PageGeometryService as y, DocumentActionsService as z };
1264
+ //# sourceMappingURL=Engine-Bx0NOfmd.d.cts.map
@@ -1,5 +1,5 @@
1
- import { $i as FormFieldRef, $n as PageNameResult, $r as FormImportResult, Bi as FormFieldDTO, Bl as DocumentMetadata, Bn as PageDeleteResult, Fn as RedactionApplyScope, Fr as SearchSlice, Gc as AnnotationRef, Go as PdfSaveMode, Ha as AttachmentDeleteResult, Hn as PageRotateResult, Ho as FontKey, Jo as AnnotationAppearanceImageOptions, Mn as MetadataUpdateResult, Ms as PageTextSnapshot, Pn as RedactionApplyResult, Pr as SearchRequest, Qn as PageFlattenUsage, Qr as FormFieldUpdateResult, Rl as PageObjectNumber, Rn as PageInsertBlankSpec, Ts as PageGeometrySnapshot, Uo as FontSpec, Va as AttachmentCreateResult, Vo as FontHandle, Xn as PageFlattenResult, Xr as FormFieldCreateResult, Yo as AnnotationAppearanceImagesResult, Yr as FormDataExport, Zr as FormFieldDeleteResult, Zs as PageListSnapshot, aa as AnnotationMoveResult, co as EmbeddedFileItem, cs as PageImageHandle, dc as OpenOptions, ea as FormWidgetRef, ei as FormRepairResult, er as PageNameInput, es as AnnotationAppearanceRenderOptions, fi as FormSubmissionRequest, hi as FormFieldValue, ia as AnnotationDeleteResult, ic as OpenInput, io as AttachmentContent, ji as FormSnapshot, l as AnnotationPatch, lo as EmbeddedFileRef, mi as FormDataFormat, ms as PageRaster, n as AnnotationListSnapshotAllPages, ni as FormWidgetLinkResult, ns as AnnotationAppearancesResult, o as AnnotationDraft, oa as AnnotationUpdateResult, oi as FormEffectsResult, qn as AnnotationFlattenResult, ra as AnnotationCreateResult, rc as MetadataPatch, ri as FormEffect, rr as PageMoveResult, so as AttachmentFileSource, t as AnnotationListPageSnapshot, ti as FormSetValueResult, tr as PageRemoveNameInput, ui as FormSubmissionReceipt, us as PageImageOptions, vi as FormFieldPatch, vs as PageRenderOptions, wi as FormFieldDraft, wl as DocumentActionsSnapshot, xl as PdfRotation, xs as PageRenderViewport, zn as PageInsertResult } from "./AnnotationListSnapshot-x6tKulNV.cjs";
2
- import { g as AbortablePromise, s as DocumentSecurityService } from "./DocumentSecurityService-CK0pejAK.cjs";
1
+ import { $n as PageNameResult, $r as FormImportResult, Ac as PageTextSnapshot, Bl as SignaturePrepareInput, Bn as PageDeleteResult, Ca as FormSnapshot, Cc as PageGeometrySnapshot, Cl as BaseVersionInfo, Do as AttachmentCreateResult, Fl as SignatureCompleteInput, Fn as RedactionApplyScope, Fr as SearchSlice, Ga as AnnotationCreateResult, Gs as FontSpec, Hn as PageRotateResult, Hs as FontHandle, Il as SignatureCompleteResult, Ja as AnnotationUpdateResult, Jo as EmbeddedFileItem, Js as PdfSaveMode, Ka as AnnotationDeleteResult, Ma as FormFieldDTO, Mi as AnalyzeInput, Mn as MetadataUpdateResult, Nl as SignatureAbortResult, Oo as AttachmentDeleteResult, Pi as ChangeAnalysis, Pl as SignatureAppearanceInput, Pn as RedactionApplyResult, Pr as SearchRequest, Qi as FormEffectsResult, Qn as PageFlattenUsage, Qr as FormFieldUpdateResult, Rn as PageInsertBlankSpec, Vl as SignaturePrepared, Wl as SignatureSnapshot, Wo as AttachmentContent, Ws as FontKey, Xn as PageFlattenResult, Xr as FormFieldCreateResult, Xs as AnnotationAppearanceImageOptions, Yc as PageListSnapshot, Yi as FormEffect, Yo as EmbeddedFileRef, Yr as FormDataExport, Zr as FormFieldDeleteResult, Zs as AnnotationAppearanceImagesResult, _d as PageObjectNumber, cc as PageImageOptions, ed as PdfRotation, ei as FormRepairResult, er as PageNameInput, eu as FormFieldRef, fc as PageRaster, ga as FormFieldDraft, gc as PageRenderOptions, ia as FormSubmissionRequest, ic as AnnotationAppearancesResult, l as AnnotationPatch, ll as OpenOptions, n as AnnotationListSnapshotAllPages, na as FormSubmissionReceipt, nc as AnnotationAppearanceRenderOptions, ni as FormWidgetLinkResult, nl as OpenInput, o as AnnotationDraft, oa as FormDataFormat, oc as PageImageHandle, qa as AnnotationMoveResult, qn as AnnotationFlattenResult, qo as AttachmentFileSource, rd as DocumentActionsSnapshot, rr as PageMoveResult, sa as FormFieldValue, t as AnnotationListPageSnapshot, ti as FormSetValueResult, tl as MetadataPatch, tr as PageRemoveNameInput, tu as FormWidgetRef, ua as FormFieldPatch, wl as DigestAlgorithm, wu as AnnotationRef, yc as PageRenderViewport, yd as DocumentMetadata, zn as PageInsertResult } from "./AnnotationListSnapshot-D3mFut1e.js";
2
+ import { g as AbortablePromise, s as DocumentSecurityService } from "./DocumentSecurityService-_JRjqvoI.js";
3
3
  //#region src/engine/DocumentActionsService.d.ts
4
4
  /** Lazy, catalog-owned PDF action read. This API extracts; it never executes. */
5
5
  interface DocumentActionsService {
@@ -83,6 +83,31 @@ interface DocumentAttachmentsService {
83
83
  delete?(ref: EmbeddedFileRef): AbortablePromise<AttachmentDeleteResult>;
84
84
  }
85
85
  //#endregion
86
+ //#region src/engine/DocumentFontSettings.d.ts
87
+ /**
88
+ * How much of a registered font's program the appearances authored in this
89
+ * document carry. `default` subsets annotation text (FreeText, redaction
90
+ * labels) and embeds form-field text whole; `subset` and `full` apply to
91
+ * both. A font whose licence forbids subsetting is embedded whole under
92
+ * every policy; programs already in the document are never re-embedded.
93
+ */
94
+ type FontEmbeddingPolicy = 'default' | 'subset' | 'full';
95
+ /**
96
+ * Per-document font and text-layout settings: session state of this
97
+ * document handle, never written to the file, applied to appearances
98
+ * generated after the call. Local engine only (`doc.fonts` is undefined on
99
+ * engines that do not lay text out in-process).
100
+ */
101
+ interface DocumentFontSettings {
102
+ setEmbeddingPolicy(policy: FontEmbeddingPolicy): AbortablePromise<void>;
103
+ /**
104
+ * Latin typographic features (kerning, ligatures) when shaping rich text.
105
+ * Off by default: Acrobat's appearances show plain advance widths and no
106
+ * ligatures, and parity with what Acrobat draws wins.
107
+ */
108
+ setTypographicFeatures(enabled: boolean): AbortablePromise<void>;
109
+ }
110
+ //#endregion
86
111
  //#region src/engine/DocumentFormsService.d.ts
87
112
  /** Options for {@link DocumentFormsService.repair}. */
88
113
  interface FormRepairOptions {
@@ -181,6 +206,14 @@ interface DocumentFormsService {
181
206
  * `form.fieldUpdated`.
182
207
  */
183
208
  updateField(ref: FormFieldRef, patch: FormFieldPatch): AbortablePromise<FormFieldUpdateResult>;
209
+ /**
210
+ * Draw a PDF page into every widget of an UNSIGNED signature field — the
211
+ * visual "sign" of a viewer that has no signer. The field's value stays
212
+ * empty and nothing is sealed; a signed field is refused. Gated by
213
+ * `doc.forms.fill`. Emits `form.fieldUpdated`. Absent on engines that
214
+ * cannot draw appearances.
215
+ */
216
+ setSignatureAppearance?(ref: FormFieldRef, appearance: SignatureAppearanceInput): AbortablePromise<FormFieldUpdateResult>;
184
217
  /**
185
218
  * Delete a terminal field and cascade: every widget is removed from its
186
219
  * page, the field leaves the tree, and empty ancestors are pruned.
@@ -339,9 +372,12 @@ interface DocumentPagesService {
339
372
  * rewrites THIS LAYER's bytes only. The immutable base document still
340
373
  * contains the original content — byte-perfect original recovery is a
341
374
  * feature of the storage model, not a leak. Redacted content becomes truly
342
- * unrecoverable only in what leaves the system: a layer download/export, or
343
- * a local document saved after apply. Surfaces that promise "permanent
344
- * removal" must scope that promise to the exported artifact.
375
+ * unrecoverable only in a full-rewrite export after apply. Callers MUST select
376
+ * `download({ mode: 'rewrite' })` (or the corresponding file/cloud save mode)
377
+ * before sharing the redacted PDF. The default incremental download preserves
378
+ * the original content in prior revisions; apply does not change that default.
379
+ * Surfaces that promise "permanent removal" must scope that promise to the
380
+ * full-rewrite exported artifact.
345
381
  *
346
382
  * Applying is irreversible within the layer (no undo). Emits a
347
383
  * `redaction.applied` document event; content-scope raster invalidation and
@@ -488,6 +524,64 @@ interface DocumentSearchService {
488
524
  query(request: SearchRequest): AbortablePromise<SearchSlice>;
489
525
  }
490
526
  //#endregion
527
+ //#region src/engine/DocumentSignaturesService.d.ts
528
+ /**
529
+ * Digital signatures on the document: the read side (what is signed, what
530
+ * it seals, what it forbids) and the two-phase signing protocol. The
531
+ * engine does the PDF job — candidate file, digest, sealing — and never
532
+ * holds a key; the CMS comes from the caller (`@embedpdf/core-signature`
533
+ * builds one from a raw signer, or a signing service returns it).
534
+ *
535
+ * Every read here describes the bytes the document was loaded from
536
+ * (for a layer document: base + the delta it was opened with). Unsaved
537
+ * edits are not part of any revision until `prepare` snapshots them.
538
+ *
539
+ * Reads ride `doc.forms.read`; `revisionBytes` rides `doc.download`;
540
+ * `prepare`/`complete`/`abort` ride `doc.sign`, a certification
541
+ * additionally `doc.sign.certify`.
542
+ */
543
+ interface DocumentSignaturesService {
544
+ /** Revisions, every signature field with its signed state, and the protection in force. */
545
+ list(): AbortablePromise<SignatureSnapshot>;
546
+ /** The DER `/Contents` of a signed field (exactly `contentsSize` bytes, padding stripped). `NotFound` for an unsigned field. */
547
+ contents(field: FormFieldRef): AbortablePromise<Uint8Array>;
548
+ /**
549
+ * Hash the signed field's `/ByteRange` with `algorithm`, straight from
550
+ * the loaded bytes. What a CMS verifier compares its message digest to.
551
+ */
552
+ digest(field: FormFieldRef, algorithm: DigestAlgorithm): AbortablePromise<Uint8Array>;
553
+ /** The exact bytes of revision `revisionIndex` (`[0, end)`): what a signature over it signed. */
554
+ revisionBytes(revisionIndex: number): AbortablePromise<Uint8Array>;
555
+ /**
556
+ * What changed after a signature (or after any revision), judged
557
+ * revision by revision against the restrictions in force: every object
558
+ * whose cross-reference mapping moved, with its value and every
559
+ * reference to it in both revisions, and the rule that explains each —
560
+ * or the reference no rule explains. `until: 'working-copy'` snapshots
561
+ * unsaved edits as one more revision first. A truncated value is never
562
+ * permitted; a broken chain is `indeterminate`.
563
+ */
564
+ analyze(input: AnalyzeInput): AbortablePromise<ChangeAnalysis>;
565
+ /**
566
+ * Build the candidate (unsaved edits become their own revision, the
567
+ * signature lands in a fresh update over it), seal it, and return the
568
+ * digest to sign. The live document is untouched and read-only until
569
+ * `complete` or `abort` (`SigningPending`). Refusals are
570
+ * `SignatureRefused` with the reason in the message.
571
+ */
572
+ prepare(input: SignaturePrepareInput): AbortablePromise<SignaturePrepared>;
573
+ /**
574
+ * Write the CMS into the candidate and install the sealed bytes as the
575
+ * document's new version. `expectedVersion` must be what `prepare`
576
+ * returned (`SigningVersionMismatch` otherwise). Idempotent: a replay
577
+ * with the same CMS answers `already-completed`. Emits
578
+ * `signature.completed` and `document.versioned`.
579
+ */
580
+ complete(input: SignatureCompleteInput): AbortablePromise<SignatureCompleteResult>;
581
+ /** Discard a pending candidate. */
582
+ abort(signingId: string): AbortablePromise<SignatureAbortResult>;
583
+ }
584
+ //#endregion
491
585
  //#region src/engine/MetadataService.d.ts
492
586
  interface MetadataService {
493
587
  read(): AbortablePromise<DocumentMetadata>;
@@ -866,6 +960,30 @@ type DocumentEvent = ({
866
960
  type: 'redaction.applied';
867
961
  origin: EventOrigin;
868
962
  } & RedactionApplyResult) | {
963
+ /** A signing candidate was parked: the document is read-only until it completes or aborts. */
964
+ type: 'signature.prepared';
965
+ signingId: string;
966
+ field: FormFieldRef;
967
+ origin: EventOrigin;
968
+ } | ({
969
+ /** The sealed bytes are installed; `version` is what they became. */
970
+ type: 'signature.completed';
971
+ signingId: string;
972
+ origin: EventOrigin;
973
+ } & SignatureCompleteResult) | {
974
+ type: 'signature.aborted';
975
+ signingId: string;
976
+ origin: EventOrigin;
977
+ } | {
978
+ /**
979
+ * The session moved to a new saved version (a completed signature,
980
+ * here or in another session). Byte-level facts — revisions,
981
+ * coverage, digests, verdicts — must be re-read.
982
+ */
983
+ type: 'document.versioned';
984
+ version: BaseVersionInfo;
985
+ origin: EventOrigin;
986
+ } | {
869
987
  /**
870
988
  * Cloud only: the live event stream fell too far behind to replay
871
989
  * (the server's SSE `full-refresh`) — state derived from earlier
@@ -936,6 +1054,13 @@ interface DocumentHandle {
936
1054
  readonly attachments?: DocumentAttachmentsService;
937
1055
  /** The document's interactive form (AcroForm): fields, values, interchange. */
938
1056
  readonly forms: DocumentFormsService;
1057
+ /**
1058
+ * Font embedding and text layout settings of this document (session
1059
+ * state). Optional: the local engine implements it; engines that do not
1060
+ * lay text out in-process omit it — feature-detect with
1061
+ * `doc.fonts !== undefined`.
1062
+ */
1063
+ readonly fonts?: DocumentFontSettings;
939
1064
  /**
940
1065
  * CATALOG-level `/PieceInfo` private application data (ISO 32000 §14.5)
941
1066
  * — e.g. a stamp library's display name. Optional: the local engine
@@ -969,6 +1094,13 @@ interface DocumentHandle {
969
1094
  * ship it — feature-detect with `doc.redaction !== undefined`.
970
1095
  */
971
1096
  readonly redaction?: DocumentRedactionService;
1097
+ /**
1098
+ * Digital signatures: the read side (revisions, signed fields, the
1099
+ * protection they impose) and the two-phase signing protocol. Optional
1100
+ * while engines ship it — feature-detect with
1101
+ * `doc.signatures !== undefined`.
1102
+ */
1103
+ readonly signatures?: DocumentSignaturesService;
972
1104
  /**
973
1105
  * The document's event stream — every confirmed mutation, exactly once,
974
1106
  * identical shape on local and cloud engines (see `DocumentEvent`). The
@@ -984,13 +1116,29 @@ interface DocumentHandle {
984
1116
  download(opts?: {
985
1117
  mode?: PdfSaveMode;
986
1118
  }): AbortablePromise<Uint8Array>;
1119
+ /**
1120
+ * Local Node engines only: write the document to a local file without
1121
+ * moving its bytes through JS. An untouched session (no unsaved edits,
1122
+ * incremental mode) is streamed out verbatim — for a signed document,
1123
+ * exactly as sealed. Absent on engines that cannot reach a filesystem.
1124
+ */
1125
+ downloadToFile?(path: string, opts?: {
1126
+ mode?: PdfSaveMode;
1127
+ }): AbortablePromise<void>;
1128
+ /**
1129
+ * The saved version this session is on: SHA-256 and length of the
1130
+ * loaded bytes (for a layer session, of its base). Changes only when
1131
+ * a signature completes. Optional while engines ship it.
1132
+ */
1133
+ version?(): AbortablePromise<BaseVersionInfo>;
987
1134
  /**
988
1135
  * Export JUST this document's LAYER as a self-contained artifact (the small
989
1136
  * overlay diff over the immutable base) — re-openable later via
990
- * `OpenInputLayerBytes` with `{ kind: 'artifact', bytes }`. Optional: only the
991
- * local engine, opened WITH a layer (`layerBytes`), supports it; the cloud
992
- * engine manages layers server-side and omits it. Rejects if the document was
993
- * opened without a layer.
1137
+ * `OpenInputLayerBytes` with `{ kind: 'artifact', bytes }`. Optional: the
1138
+ * local engine supports it for every session it opens as a layer (the
1139
+ * default `sessionKind`, and any `layerBytes` open); the cloud engine
1140
+ * manages layers server-side and omits it. Rejects on a session opened
1141
+ * with `sessionKind: 'plain'`.
994
1142
  */
995
1143
  downloadLayer?(): AbortablePromise<Uint8Array>;
996
1144
  close(): AbortablePromise<void>;
@@ -1038,6 +1186,13 @@ interface FontService {
1038
1186
  clearFallbacks(): AbortablePromise<void>;
1039
1187
  /** Unregister every font and reset the fallback chain. */
1040
1188
  clear(): AbortablePromise<void>;
1189
+ /**
1190
+ * Assert that the application holds a licence permitting editing with a
1191
+ * preview-and-print font, so FreeText authoring and missing-glyph fallback
1192
+ * may use it. Resolves to the updated handle (`editingAuthorized: true`).
1193
+ * Rejects with `InvalidArg` for an unregistered key.
1194
+ */
1195
+ authorizeEditing(font: FontHandle | FontKey): AbortablePromise<FontHandle>;
1041
1196
  /** Currently registered fonts, in registration order. */
1042
1197
  list(): readonly FontHandle[];
1043
1198
  }
@@ -1105,5 +1260,5 @@ interface Engine {
1105
1260
  */
1106
1261
  type EngineFactory = () => Engine;
1107
1262
  //#endregion
1108
- export { DocumentPagesService as A, CONTINUOUS_RENDER_POLICY as C, snapFullPageViewport as D, snapAppearanceScale as E, WeakAnnotationEditSession as F, DocumentActionsService as I, FormRepairOptions as M, DocumentAttachmentsService as N, snapTileScale as O, DocumentAnnotationsService as P, DocumentSearchService as S, EngineRenderPolicy as T, PageTextService as _, DocumentHandle as a, PageAnnotationsService as b, DocumentEventInit as c, PageHandle as d, PieceInfoService as f, PieceInfoSnapshot as g, PieceInfoPatchValue as h, DocumentCapabilities as i, DocumentFormsService as j, DocumentRedactionService as k, DocumentEventType as l, PieceInfoPatch as m, EngineFactory as n, DocumentEventStream as o, PieceInfoEntry as p, FontService as r, DocumentEvent as s, Engine as t, EventOrigin as u, PageRenderService as v, DocumentRenderService as w, MetadataService as x, PageGeometryService as y };
1109
- //# sourceMappingURL=Engine--0XF0UAK.d.cts.map
1263
+ export { DocumentRedactionService as A, DocumentSearchService as C, snapAppearanceScale as D, EngineRenderPolicy as E, FontEmbeddingPolicy as F, DocumentAttachmentsService as I, DocumentAnnotationsService as L, DocumentFormsService as M, FormRepairOptions as N, snapFullPageViewport as O, DocumentFontSettings as P, WeakAnnotationEditSession as R, DocumentSignaturesService as S, DocumentRenderService as T, PageTextService as _, DocumentHandle as a, PageAnnotationsService as b, DocumentEventInit as c, PageHandle as d, PieceInfoService as f, PieceInfoSnapshot as g, PieceInfoPatchValue as h, DocumentCapabilities as i, DocumentPagesService as j, snapTileScale as k, DocumentEventType as l, PieceInfoPatch as m, EngineFactory as n, DocumentEventStream as o, PieceInfoEntry as p, FontService as r, DocumentEvent as s, Engine as t, EventOrigin as u, PageRenderService as v, CONTINUOUS_RENDER_POLICY as w, MetadataService as x, PageGeometryService as y, DocumentActionsService as z };
1264
+ //# sourceMappingURL=Engine-DxtpCYcP.d.ts.map
@@ -70,7 +70,42 @@ const EngineErrorCode = {
70
70
  * at all) and `NotFound` (a well-formed page/annotation/etc. simply
71
71
  * doesn't exist).
72
72
  */
73
- MalformedPdf: "MalformedPdf"
73
+ MalformedPdf: "MalformedPdf",
74
+ /**
75
+ * A signing candidate is parked on this session: every mutation is
76
+ * refused until `signatures.complete` or `signatures.abort`.
77
+ */
78
+ SigningPending: "SigningPending",
79
+ /** The candidate's TTL elapsed; prepare again. */
80
+ SigningExpired: "SigningExpired",
81
+ /**
82
+ * `complete` presented a version the candidate was not built on (the
83
+ * document or the layer moved since `prepare`). The CMS cannot be
84
+ * reused: it signs a digest of bytes that will never be the head.
85
+ * Prepare again on the current version.
86
+ */
87
+ SigningVersionMismatch: "SigningVersionMismatch",
88
+ /**
89
+ * The engine refused to author the signature: the field is signed,
90
+ * read-only, or locked by an earlier signature; a certification is
91
+ * requested after a signature exists; the seed value requires what the
92
+ * engine does not implement; the request is inconsistent. The message
93
+ * names the reason.
94
+ */
95
+ SignatureRefused: "SignatureRefused",
96
+ /**
97
+ * A signature already in the document forbids this change (a
98
+ * certification's permission, a FieldMDP or `/Lock`, or the approval
99
+ * baseline). The message names the signature and the restriction. The
100
+ * engine option `signedDocumentPolicy: 'permit'` disables the guard.
101
+ */
102
+ ProtectedDocument: "ProtectedDocument",
103
+ /**
104
+ * The layer is built on a base version that is no longer the
105
+ * document's head (another signing completed); it can be read and
106
+ * edited but not signed from.
107
+ */
108
+ StaleBase: "StaleBase"
74
109
  };
75
110
  //#endregion
76
111
  //#region src/annotation/subtype.ts
@@ -411,4 +446,4 @@ Object.defineProperty(exports, "subtypeFromCode", {
411
446
  }
412
447
  });
413
448
 
414
- //# sourceMappingURL=PageInsertBlankInput-CzShuSJI.cjs.map
449
+ //# sourceMappingURL=PageInsertBlankInput-CqXBmFhN.cjs.map