@embedpdf/engine-core 3.0.0-next.12 → 3.0.0-next.14
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/{AbortError-8-9JAX1Y.js → AbortError-DwuHPK_I.js} +2 -2
- package/dist/{AbortError-8-9JAX1Y.js.map → AbortError-DwuHPK_I.js.map} +1 -1
- package/dist/{AbortError-CRSooKsk.cjs → AbortError-P0RU0Mgg.cjs} +4 -4
- package/dist/{AbortError-CRSooKsk.cjs.map → AbortError-P0RU0Mgg.cjs.map} +1 -1
- package/dist/{AnnotationListSnapshot-x6tKulNV.d.cts → AnnotationListSnapshot-D9R5n2Kf.d.cts} +1390 -176
- package/dist/{AnnotationListSnapshot-x6tKulNV.d.ts → AnnotationListSnapshot-D9R5n2Kf.d.ts} +1390 -176
- package/dist/{DocumentSecurityService-CK0pejAK.d.cts → DocumentSecurityService-CIx1MT0T.d.cts} +2 -2
- package/dist/{DocumentSecurityService-9MawYxP-.d.ts → DocumentSecurityService-Ca6EK3-3.d.ts} +2 -2
- package/dist/{Engine--0XF0UAK.d.cts → Engine-EWWHhEIi.d.ts} +179 -11
- package/dist/{Engine-Ds0ytbl6.d.ts → Engine-FNaAEjfb.d.cts} +179 -11
- package/dist/conformance.cjs +1441 -88
- package/dist/conformance.cjs.map +1 -1
- package/dist/conformance.d.cts +74 -3
- package/dist/conformance.d.ts +74 -3
- package/dist/conformance.js +1376 -25
- package/dist/conformance.js.map +1 -1
- package/dist/derive-BbsDk_Kz.cjs +880 -0
- package/dist/derive-BbsDk_Kz.cjs.map +1 -0
- package/dist/derive-DAFJolWu.js +647 -0
- package/dist/derive-DAFJolWu.js.map +1 -0
- package/dist/{PageInsertBlankInput-WKY0tr6S.js → format-Bbphf4zR.js} +95 -3
- package/dist/format-Bbphf4zR.js.map +1 -0
- package/dist/{PageInsertBlankInput-CzShuSJI.cjs → format-D_epWlob.cjs} +106 -2
- package/dist/format-D_epWlob.cjs.map +1 -0
- package/dist/index.cjs +137 -88
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -5
- package/dist/{resolver-D-jumvgM.cjs → resolver-CYVNV4hn.cjs} +216 -10
- package/dist/resolver-CYVNV4hn.cjs.map +1 -0
- package/dist/{resolver-CHG4waXL.js → resolver-inAVzsWt.js} +157 -11
- package/dist/resolver-inAVzsWt.js.map +1 -0
- package/dist/runtime.cjs +147 -98
- package/dist/runtime.cjs.map +1 -1
- package/dist/runtime.d.cts +216 -5
- package/dist/runtime.d.ts +216 -5
- package/dist/runtime.js +6 -6
- package/dist/{schemas-DOyVEPk7.js → schemas-CFQGvWiu.js} +551 -5
- package/dist/schemas-CFQGvWiu.js.map +1 -0
- package/dist/{schemas-RChsAMWw.cjs → schemas-D0g6tKa9.cjs} +829 -25
- package/dist/schemas-D0g6tKa9.cjs.map +1 -0
- package/dist/{builders-8Hl1AYNU.cjs → viewport-BWeNHZmb.cjs} +1522 -117
- package/dist/viewport-BWeNHZmb.cjs.map +1 -0
- package/dist/{builders-DOjcKDWQ.js → viewport-CvMcadfQ.js} +1386 -89
- package/dist/viewport-CvMcadfQ.js.map +1 -0
- package/dist/wire.cjs +252 -13
- package/dist/wire.cjs.map +1 -1
- package/dist/wire.d.cts +3147 -5
- package/dist/wire.d.ts +3147 -5
- package/dist/wire.js +207 -14
- package/dist/wire.js.map +1 -1
- package/package.json +1 -1
- package/dist/PageInsertBlankInput-CzShuSJI.cjs.map +0 -1
- package/dist/PageInsertBlankInput-WKY0tr6S.js.map +0 -1
- package/dist/builders-8Hl1AYNU.cjs.map +0 -1
- package/dist/builders-DOjcKDWQ.js.map +0 -1
- package/dist/fold-BfyxxwS6.js +0 -334
- package/dist/fold-BfyxxwS6.js.map +0 -1
- package/dist/fold-C7I5GpBz.cjs +0 -447
- package/dist/fold-C7I5GpBz.cjs.map +0 -1
- package/dist/resolver-CHG4waXL.js.map +0 -1
- package/dist/resolver-D-jumvgM.cjs.map +0 -1
- package/dist/schemas-DOyVEPk7.js.map +0 -1
- package/dist/schemas-RChsAMWw.cjs.map +0 -1
package/dist/{DocumentSecurityService-CK0pejAK.d.cts → DocumentSecurityService-CIx1MT0T.d.cts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ad as IdentityClaims, dd as PdfBits, id as DocCapability, iu as CollabTarget } from "./AnnotationListSnapshot-D9R5n2Kf.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-
|
|
363
|
+
//# sourceMappingURL=DocumentSecurityService-CIx1MT0T.d.cts.map
|
package/dist/{DocumentSecurityService-9MawYxP-.d.ts → DocumentSecurityService-Ca6EK3-3.d.ts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ad as IdentityClaims, dd as PdfBits, id as DocCapability, iu as CollabTarget } from "./AnnotationListSnapshot-D9R5n2Kf.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-
|
|
363
|
+
//# sourceMappingURL=DocumentSecurityService-Ca6EK3-3.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $
|
|
2
|
-
import { g as AbortablePromise, s as DocumentSecurityService } from "./DocumentSecurityService-
|
|
1
|
+
import { $a as FormFieldPatch, Au as SignaturePrepared, Bc as AnnotationAppearanceImagesResult, Bi as FormFieldDeleteResult, Ca as ChangeAnalysis, Ci as SearchRequest, Cr as RedactionApplyResult, Cu as SignatureAppearanceInput, Dr as PageInsertBlankSpec, Fo as AnnotationDeleteResult, Ga as FormSubmissionReceipt, Gc as AnnotationAppearanceRenderOptions, Gi as FormWidgetLinkResult, Gl as OpenInput, Hi as FormImportResult, Hr as PageNameResult, Io as AnnotationMoveResult, Ir as AnnotationFlattenResult, Is as AttachmentFileSource, Kd as DocumentActionsSnapshot, Kr as PageMoveResult, Lc as PdfSaveMode, Lo as AnnotationUpdateResult, Ls as EmbeddedFileItem, Nc as FontKey, Ns as AttachmentContent, Nu as SignatureSnapshot, Or as PageInsertResult, Pc as FontSpec, Po as AnnotationCreateResult, Ql as OpenOptions, Ra as FormEffect, Ri as FormDataExport, Rl as PageListSnapshot, Rs as EmbeddedFileRef, Su as SignatureAbortResult, Tu as SignatureCompleteResult, Ud as PdfRotation, Ui as FormRepairResult, Ur as PageNameInput, Uu as FormFieldRef, Va as FormEffectsResult, Vi as FormFieldUpdateResult, Vr as PageFlattenUsage, Wi as FormSetValueResult, Wl as MetadataPatch, Wr as PageRemoveNameInput, Wu as FormWidgetRef, Xa as FormFieldValue, Ya as FormDataFormat, Yc as PageImageHandle, Zc as PageImageOptions, _s as AttachmentDeleteResult, al as PageRenderOptions, ao as FormFieldDraft, cf as DocumentMetadata, cl as PageRenderViewport, fl as PageGeometrySnapshot, fo as FormSnapshot, fr as PdfMeasure, fu as BaseVersionInfo, gs as AttachmentCreateResult, jc as FontHandle, jn as PageScaleResult, jr as PageRotateResult, kr as PageDeleteResult, ku as SignaturePrepareInput, l as AnnotationPatch, n as AnnotationListSnapshotAllPages, o as AnnotationDraft, of as PageObjectNumber, pd as AnnotationRef, pu as DigestAlgorithm, qa as FormSubmissionRequest, qc as AnnotationAppearancesResult, t as AnnotationListPageSnapshot, tl as PageRaster, ur as PageMeasurementViewport, wi as SearchSlice, wr as RedactionApplyScope, wu as SignatureCompleteInput, xa as AnalyzeInput, xo as FormFieldDTO, xr as MetadataUpdateResult, yl as PageTextSnapshot, zc as AnnotationAppearanceImageOptions, zi as FormFieldCreateResult, zr as PageFlattenResult } from "./AnnotationListSnapshot-D9R5n2Kf.js";
|
|
2
|
+
import { g as AbortablePromise, s as DocumentSecurityService } from "./DocumentSecurityService-Ca6EK3-3.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
|
|
343
|
-
*
|
|
344
|
-
*
|
|
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>;
|
|
@@ -698,6 +792,15 @@ interface PieceInfoService {
|
|
|
698
792
|
clear(application: string): AbortablePromise<void>;
|
|
699
793
|
}
|
|
700
794
|
//#endregion
|
|
795
|
+
//#region src/engine/PageMeasureService.d.ts
|
|
796
|
+
interface PageMeasureService {
|
|
797
|
+
/** Viewports in drawing order. Last containing viewport wins, including foreign ones. */
|
|
798
|
+
viewports(): AbortablePromise<PageMeasurementViewport[]>;
|
|
799
|
+
/** Upsert/remove EmbedPDF's full-page calibration. Other producers' entries survive.
|
|
800
|
+
* Existing annotations retain their own scale snapshots. */
|
|
801
|
+
setScale(measure: PdfMeasure | null): AbortablePromise<void>;
|
|
802
|
+
}
|
|
803
|
+
//#endregion
|
|
701
804
|
//#region src/engine/PageHandle.d.ts
|
|
702
805
|
/**
|
|
703
806
|
* Page-scoped handle returned by `DocumentHandle.page(pageObjectNumber)`.
|
|
@@ -722,6 +825,7 @@ interface PageHandle {
|
|
|
722
825
|
* omits it until a cloud consumer ships (the `downloadLayer?` pattern).
|
|
723
826
|
*/
|
|
724
827
|
readonly pieceInfo?: PieceInfoService;
|
|
828
|
+
readonly measure?: PageMeasureService;
|
|
725
829
|
}
|
|
726
830
|
//#endregion
|
|
727
831
|
//#region src/events/DocumentEvent.d.ts
|
|
@@ -772,6 +876,9 @@ interface EventOrigin {
|
|
|
772
876
|
* provenance-aware features (undo, attribution toasts, camera etiquette).
|
|
773
877
|
*/
|
|
774
878
|
type DocumentEvent = ({
|
|
879
|
+
type: 'page.viewportsChanged';
|
|
880
|
+
origin: EventOrigin;
|
|
881
|
+
} & PageScaleResult) | ({
|
|
775
882
|
type: 'annotation.created';
|
|
776
883
|
pageObjectNumber: PageObjectNumber;
|
|
777
884
|
origin: EventOrigin;
|
|
@@ -866,6 +973,30 @@ type DocumentEvent = ({
|
|
|
866
973
|
type: 'redaction.applied';
|
|
867
974
|
origin: EventOrigin;
|
|
868
975
|
} & RedactionApplyResult) | {
|
|
976
|
+
/** A signing candidate was parked: the document is read-only until it completes or aborts. */
|
|
977
|
+
type: 'signature.prepared';
|
|
978
|
+
signingId: string;
|
|
979
|
+
field: FormFieldRef;
|
|
980
|
+
origin: EventOrigin;
|
|
981
|
+
} | ({
|
|
982
|
+
/** The sealed bytes are installed; `version` is what they became. */
|
|
983
|
+
type: 'signature.completed';
|
|
984
|
+
signingId: string;
|
|
985
|
+
origin: EventOrigin;
|
|
986
|
+
} & SignatureCompleteResult) | {
|
|
987
|
+
type: 'signature.aborted';
|
|
988
|
+
signingId: string;
|
|
989
|
+
origin: EventOrigin;
|
|
990
|
+
} | {
|
|
991
|
+
/**
|
|
992
|
+
* The session moved to a new saved version (a completed signature,
|
|
993
|
+
* here or in another session). Byte-level facts — revisions,
|
|
994
|
+
* coverage, digests, verdicts — must be re-read.
|
|
995
|
+
*/
|
|
996
|
+
type: 'document.versioned';
|
|
997
|
+
version: BaseVersionInfo;
|
|
998
|
+
origin: EventOrigin;
|
|
999
|
+
} | {
|
|
869
1000
|
/**
|
|
870
1001
|
* Cloud only: the live event stream fell too far behind to replay
|
|
871
1002
|
* (the server's SSE `full-refresh`) — state derived from earlier
|
|
@@ -936,6 +1067,13 @@ interface DocumentHandle {
|
|
|
936
1067
|
readonly attachments?: DocumentAttachmentsService;
|
|
937
1068
|
/** The document's interactive form (AcroForm): fields, values, interchange. */
|
|
938
1069
|
readonly forms: DocumentFormsService;
|
|
1070
|
+
/**
|
|
1071
|
+
* Font embedding and text layout settings of this document (session
|
|
1072
|
+
* state). Optional: the local engine implements it; engines that do not
|
|
1073
|
+
* lay text out in-process omit it — feature-detect with
|
|
1074
|
+
* `doc.fonts !== undefined`.
|
|
1075
|
+
*/
|
|
1076
|
+
readonly fonts?: DocumentFontSettings;
|
|
939
1077
|
/**
|
|
940
1078
|
* CATALOG-level `/PieceInfo` private application data (ISO 32000 §14.5)
|
|
941
1079
|
* — e.g. a stamp library's display name. Optional: the local engine
|
|
@@ -969,6 +1107,13 @@ interface DocumentHandle {
|
|
|
969
1107
|
* ship it — feature-detect with `doc.redaction !== undefined`.
|
|
970
1108
|
*/
|
|
971
1109
|
readonly redaction?: DocumentRedactionService;
|
|
1110
|
+
/**
|
|
1111
|
+
* Digital signatures: the read side (revisions, signed fields, the
|
|
1112
|
+
* protection they impose) and the two-phase signing protocol. Optional
|
|
1113
|
+
* while engines ship it — feature-detect with
|
|
1114
|
+
* `doc.signatures !== undefined`.
|
|
1115
|
+
*/
|
|
1116
|
+
readonly signatures?: DocumentSignaturesService;
|
|
972
1117
|
/**
|
|
973
1118
|
* The document's event stream — every confirmed mutation, exactly once,
|
|
974
1119
|
* identical shape on local and cloud engines (see `DocumentEvent`). The
|
|
@@ -984,13 +1129,29 @@ interface DocumentHandle {
|
|
|
984
1129
|
download(opts?: {
|
|
985
1130
|
mode?: PdfSaveMode;
|
|
986
1131
|
}): AbortablePromise<Uint8Array>;
|
|
1132
|
+
/**
|
|
1133
|
+
* Local Node engines only: write the document to a local file without
|
|
1134
|
+
* moving its bytes through JS. An untouched session (no unsaved edits,
|
|
1135
|
+
* incremental mode) is streamed out verbatim — for a signed document,
|
|
1136
|
+
* exactly as sealed. Absent on engines that cannot reach a filesystem.
|
|
1137
|
+
*/
|
|
1138
|
+
downloadToFile?(path: string, opts?: {
|
|
1139
|
+
mode?: PdfSaveMode;
|
|
1140
|
+
}): AbortablePromise<void>;
|
|
1141
|
+
/**
|
|
1142
|
+
* The saved version this session is on: SHA-256 and length of the
|
|
1143
|
+
* loaded bytes (for a layer session, of its base). Changes only when
|
|
1144
|
+
* a signature completes. Optional while engines ship it.
|
|
1145
|
+
*/
|
|
1146
|
+
version?(): AbortablePromise<BaseVersionInfo>;
|
|
987
1147
|
/**
|
|
988
1148
|
* Export JUST this document's LAYER as a self-contained artifact (the small
|
|
989
1149
|
* overlay diff over the immutable base) — re-openable later via
|
|
990
|
-
* `OpenInputLayerBytes` with `{ kind: 'artifact', bytes }`. Optional:
|
|
991
|
-
* local engine
|
|
992
|
-
*
|
|
993
|
-
*
|
|
1150
|
+
* `OpenInputLayerBytes` with `{ kind: 'artifact', bytes }`. Optional: the
|
|
1151
|
+
* local engine supports it for every session it opens as a layer (the
|
|
1152
|
+
* default `sessionKind`, and any `layerBytes` open); the cloud engine
|
|
1153
|
+
* manages layers server-side and omits it. Rejects on a session opened
|
|
1154
|
+
* with `sessionKind: 'plain'`.
|
|
994
1155
|
*/
|
|
995
1156
|
downloadLayer?(): AbortablePromise<Uint8Array>;
|
|
996
1157
|
close(): AbortablePromise<void>;
|
|
@@ -1038,6 +1199,13 @@ interface FontService {
|
|
|
1038
1199
|
clearFallbacks(): AbortablePromise<void>;
|
|
1039
1200
|
/** Unregister every font and reset the fallback chain. */
|
|
1040
1201
|
clear(): AbortablePromise<void>;
|
|
1202
|
+
/**
|
|
1203
|
+
* Assert that the application holds a licence permitting editing with a
|
|
1204
|
+
* preview-and-print font, so FreeText authoring and missing-glyph fallback
|
|
1205
|
+
* may use it. Resolves to the updated handle (`editingAuthorized: true`).
|
|
1206
|
+
* Rejects with `InvalidArg` for an unregistered key.
|
|
1207
|
+
*/
|
|
1208
|
+
authorizeEditing(font: FontHandle | FontKey): AbortablePromise<FontHandle>;
|
|
1041
1209
|
/** Currently registered fonts, in registration order. */
|
|
1042
1210
|
list(): readonly FontHandle[];
|
|
1043
1211
|
}
|
|
@@ -1105,5 +1273,5 @@ interface Engine {
|
|
|
1105
1273
|
*/
|
|
1106
1274
|
type EngineFactory = () => Engine;
|
|
1107
1275
|
//#endregion
|
|
1108
|
-
export {
|
|
1109
|
-
//# sourceMappingURL=Engine
|
|
1276
|
+
export { snapTileScale as A, DocumentActionsService as B, DocumentSignaturesService as C, EngineRenderPolicy as D, DocumentRenderService as E, DocumentFontSettings as F, FontEmbeddingPolicy as I, DocumentAttachmentsService as L, DocumentPagesService as M, DocumentFormsService as N, snapAppearanceScale as O, FormRepairOptions as P, DocumentAnnotationsService as R, MetadataService as S, CONTINUOUS_RENDER_POLICY as T, PieceInfoSnapshot as _, DocumentHandle as a, PageGeometryService as b, DocumentEventInit as c, PageHandle as d, PageMeasureService as f, PieceInfoPatchValue as g, PieceInfoPatch as h, DocumentCapabilities as i, DocumentRedactionService as j, snapFullPageViewport as k, DocumentEventType as l, PieceInfoEntry as m, EngineFactory as n, DocumentEventStream as o, PieceInfoService as p, FontService as r, DocumentEvent as s, Engine as t, EventOrigin as u, PageTextService as v, DocumentSearchService as w, PageAnnotationsService as x, PageRenderService as y, WeakAnnotationEditSession as z };
|
|
1277
|
+
//# sourceMappingURL=Engine-EWWHhEIi.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $
|
|
2
|
-
import { g as AbortablePromise, s as DocumentSecurityService } from "./DocumentSecurityService-
|
|
1
|
+
import { $a as FormFieldPatch, Au as SignaturePrepared, Bc as AnnotationAppearanceImagesResult, Bi as FormFieldDeleteResult, Ca as ChangeAnalysis, Ci as SearchRequest, Cr as RedactionApplyResult, Cu as SignatureAppearanceInput, Dr as PageInsertBlankSpec, Fo as AnnotationDeleteResult, Ga as FormSubmissionReceipt, Gc as AnnotationAppearanceRenderOptions, Gi as FormWidgetLinkResult, Gl as OpenInput, Hi as FormImportResult, Hr as PageNameResult, Io as AnnotationMoveResult, Ir as AnnotationFlattenResult, Is as AttachmentFileSource, Kd as DocumentActionsSnapshot, Kr as PageMoveResult, Lc as PdfSaveMode, Lo as AnnotationUpdateResult, Ls as EmbeddedFileItem, Nc as FontKey, Ns as AttachmentContent, Nu as SignatureSnapshot, Or as PageInsertResult, Pc as FontSpec, Po as AnnotationCreateResult, Ql as OpenOptions, Ra as FormEffect, Ri as FormDataExport, Rl as PageListSnapshot, Rs as EmbeddedFileRef, Su as SignatureAbortResult, Tu as SignatureCompleteResult, Ud as PdfRotation, Ui as FormRepairResult, Ur as PageNameInput, Uu as FormFieldRef, Va as FormEffectsResult, Vi as FormFieldUpdateResult, Vr as PageFlattenUsage, Wi as FormSetValueResult, Wl as MetadataPatch, Wr as PageRemoveNameInput, Wu as FormWidgetRef, Xa as FormFieldValue, Ya as FormDataFormat, Yc as PageImageHandle, Zc as PageImageOptions, _s as AttachmentDeleteResult, al as PageRenderOptions, ao as FormFieldDraft, cf as DocumentMetadata, cl as PageRenderViewport, fl as PageGeometrySnapshot, fo as FormSnapshot, fr as PdfMeasure, fu as BaseVersionInfo, gs as AttachmentCreateResult, jc as FontHandle, jn as PageScaleResult, jr as PageRotateResult, kr as PageDeleteResult, ku as SignaturePrepareInput, l as AnnotationPatch, n as AnnotationListSnapshotAllPages, o as AnnotationDraft, of as PageObjectNumber, pd as AnnotationRef, pu as DigestAlgorithm, qa as FormSubmissionRequest, qc as AnnotationAppearancesResult, t as AnnotationListPageSnapshot, tl as PageRaster, ur as PageMeasurementViewport, wi as SearchSlice, wr as RedactionApplyScope, wu as SignatureCompleteInput, xa as AnalyzeInput, xo as FormFieldDTO, xr as MetadataUpdateResult, yl as PageTextSnapshot, zc as AnnotationAppearanceImageOptions, zi as FormFieldCreateResult, zr as PageFlattenResult } from "./AnnotationListSnapshot-D9R5n2Kf.cjs";
|
|
2
|
+
import { g as AbortablePromise, s as DocumentSecurityService } from "./DocumentSecurityService-CIx1MT0T.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
|
|
343
|
-
*
|
|
344
|
-
*
|
|
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>;
|
|
@@ -698,6 +792,15 @@ interface PieceInfoService {
|
|
|
698
792
|
clear(application: string): AbortablePromise<void>;
|
|
699
793
|
}
|
|
700
794
|
//#endregion
|
|
795
|
+
//#region src/engine/PageMeasureService.d.ts
|
|
796
|
+
interface PageMeasureService {
|
|
797
|
+
/** Viewports in drawing order. Last containing viewport wins, including foreign ones. */
|
|
798
|
+
viewports(): AbortablePromise<PageMeasurementViewport[]>;
|
|
799
|
+
/** Upsert/remove EmbedPDF's full-page calibration. Other producers' entries survive.
|
|
800
|
+
* Existing annotations retain their own scale snapshots. */
|
|
801
|
+
setScale(measure: PdfMeasure | null): AbortablePromise<void>;
|
|
802
|
+
}
|
|
803
|
+
//#endregion
|
|
701
804
|
//#region src/engine/PageHandle.d.ts
|
|
702
805
|
/**
|
|
703
806
|
* Page-scoped handle returned by `DocumentHandle.page(pageObjectNumber)`.
|
|
@@ -722,6 +825,7 @@ interface PageHandle {
|
|
|
722
825
|
* omits it until a cloud consumer ships (the `downloadLayer?` pattern).
|
|
723
826
|
*/
|
|
724
827
|
readonly pieceInfo?: PieceInfoService;
|
|
828
|
+
readonly measure?: PageMeasureService;
|
|
725
829
|
}
|
|
726
830
|
//#endregion
|
|
727
831
|
//#region src/events/DocumentEvent.d.ts
|
|
@@ -772,6 +876,9 @@ interface EventOrigin {
|
|
|
772
876
|
* provenance-aware features (undo, attribution toasts, camera etiquette).
|
|
773
877
|
*/
|
|
774
878
|
type DocumentEvent = ({
|
|
879
|
+
type: 'page.viewportsChanged';
|
|
880
|
+
origin: EventOrigin;
|
|
881
|
+
} & PageScaleResult) | ({
|
|
775
882
|
type: 'annotation.created';
|
|
776
883
|
pageObjectNumber: PageObjectNumber;
|
|
777
884
|
origin: EventOrigin;
|
|
@@ -866,6 +973,30 @@ type DocumentEvent = ({
|
|
|
866
973
|
type: 'redaction.applied';
|
|
867
974
|
origin: EventOrigin;
|
|
868
975
|
} & RedactionApplyResult) | {
|
|
976
|
+
/** A signing candidate was parked: the document is read-only until it completes or aborts. */
|
|
977
|
+
type: 'signature.prepared';
|
|
978
|
+
signingId: string;
|
|
979
|
+
field: FormFieldRef;
|
|
980
|
+
origin: EventOrigin;
|
|
981
|
+
} | ({
|
|
982
|
+
/** The sealed bytes are installed; `version` is what they became. */
|
|
983
|
+
type: 'signature.completed';
|
|
984
|
+
signingId: string;
|
|
985
|
+
origin: EventOrigin;
|
|
986
|
+
} & SignatureCompleteResult) | {
|
|
987
|
+
type: 'signature.aborted';
|
|
988
|
+
signingId: string;
|
|
989
|
+
origin: EventOrigin;
|
|
990
|
+
} | {
|
|
991
|
+
/**
|
|
992
|
+
* The session moved to a new saved version (a completed signature,
|
|
993
|
+
* here or in another session). Byte-level facts — revisions,
|
|
994
|
+
* coverage, digests, verdicts — must be re-read.
|
|
995
|
+
*/
|
|
996
|
+
type: 'document.versioned';
|
|
997
|
+
version: BaseVersionInfo;
|
|
998
|
+
origin: EventOrigin;
|
|
999
|
+
} | {
|
|
869
1000
|
/**
|
|
870
1001
|
* Cloud only: the live event stream fell too far behind to replay
|
|
871
1002
|
* (the server's SSE `full-refresh`) — state derived from earlier
|
|
@@ -936,6 +1067,13 @@ interface DocumentHandle {
|
|
|
936
1067
|
readonly attachments?: DocumentAttachmentsService;
|
|
937
1068
|
/** The document's interactive form (AcroForm): fields, values, interchange. */
|
|
938
1069
|
readonly forms: DocumentFormsService;
|
|
1070
|
+
/**
|
|
1071
|
+
* Font embedding and text layout settings of this document (session
|
|
1072
|
+
* state). Optional: the local engine implements it; engines that do not
|
|
1073
|
+
* lay text out in-process omit it — feature-detect with
|
|
1074
|
+
* `doc.fonts !== undefined`.
|
|
1075
|
+
*/
|
|
1076
|
+
readonly fonts?: DocumentFontSettings;
|
|
939
1077
|
/**
|
|
940
1078
|
* CATALOG-level `/PieceInfo` private application data (ISO 32000 §14.5)
|
|
941
1079
|
* — e.g. a stamp library's display name. Optional: the local engine
|
|
@@ -969,6 +1107,13 @@ interface DocumentHandle {
|
|
|
969
1107
|
* ship it — feature-detect with `doc.redaction !== undefined`.
|
|
970
1108
|
*/
|
|
971
1109
|
readonly redaction?: DocumentRedactionService;
|
|
1110
|
+
/**
|
|
1111
|
+
* Digital signatures: the read side (revisions, signed fields, the
|
|
1112
|
+
* protection they impose) and the two-phase signing protocol. Optional
|
|
1113
|
+
* while engines ship it — feature-detect with
|
|
1114
|
+
* `doc.signatures !== undefined`.
|
|
1115
|
+
*/
|
|
1116
|
+
readonly signatures?: DocumentSignaturesService;
|
|
972
1117
|
/**
|
|
973
1118
|
* The document's event stream — every confirmed mutation, exactly once,
|
|
974
1119
|
* identical shape on local and cloud engines (see `DocumentEvent`). The
|
|
@@ -984,13 +1129,29 @@ interface DocumentHandle {
|
|
|
984
1129
|
download(opts?: {
|
|
985
1130
|
mode?: PdfSaveMode;
|
|
986
1131
|
}): AbortablePromise<Uint8Array>;
|
|
1132
|
+
/**
|
|
1133
|
+
* Local Node engines only: write the document to a local file without
|
|
1134
|
+
* moving its bytes through JS. An untouched session (no unsaved edits,
|
|
1135
|
+
* incremental mode) is streamed out verbatim — for a signed document,
|
|
1136
|
+
* exactly as sealed. Absent on engines that cannot reach a filesystem.
|
|
1137
|
+
*/
|
|
1138
|
+
downloadToFile?(path: string, opts?: {
|
|
1139
|
+
mode?: PdfSaveMode;
|
|
1140
|
+
}): AbortablePromise<void>;
|
|
1141
|
+
/**
|
|
1142
|
+
* The saved version this session is on: SHA-256 and length of the
|
|
1143
|
+
* loaded bytes (for a layer session, of its base). Changes only when
|
|
1144
|
+
* a signature completes. Optional while engines ship it.
|
|
1145
|
+
*/
|
|
1146
|
+
version?(): AbortablePromise<BaseVersionInfo>;
|
|
987
1147
|
/**
|
|
988
1148
|
* Export JUST this document's LAYER as a self-contained artifact (the small
|
|
989
1149
|
* overlay diff over the immutable base) — re-openable later via
|
|
990
|
-
* `OpenInputLayerBytes` with `{ kind: 'artifact', bytes }`. Optional:
|
|
991
|
-
* local engine
|
|
992
|
-
*
|
|
993
|
-
*
|
|
1150
|
+
* `OpenInputLayerBytes` with `{ kind: 'artifact', bytes }`. Optional: the
|
|
1151
|
+
* local engine supports it for every session it opens as a layer (the
|
|
1152
|
+
* default `sessionKind`, and any `layerBytes` open); the cloud engine
|
|
1153
|
+
* manages layers server-side and omits it. Rejects on a session opened
|
|
1154
|
+
* with `sessionKind: 'plain'`.
|
|
994
1155
|
*/
|
|
995
1156
|
downloadLayer?(): AbortablePromise<Uint8Array>;
|
|
996
1157
|
close(): AbortablePromise<void>;
|
|
@@ -1038,6 +1199,13 @@ interface FontService {
|
|
|
1038
1199
|
clearFallbacks(): AbortablePromise<void>;
|
|
1039
1200
|
/** Unregister every font and reset the fallback chain. */
|
|
1040
1201
|
clear(): AbortablePromise<void>;
|
|
1202
|
+
/**
|
|
1203
|
+
* Assert that the application holds a licence permitting editing with a
|
|
1204
|
+
* preview-and-print font, so FreeText authoring and missing-glyph fallback
|
|
1205
|
+
* may use it. Resolves to the updated handle (`editingAuthorized: true`).
|
|
1206
|
+
* Rejects with `InvalidArg` for an unregistered key.
|
|
1207
|
+
*/
|
|
1208
|
+
authorizeEditing(font: FontHandle | FontKey): AbortablePromise<FontHandle>;
|
|
1041
1209
|
/** Currently registered fonts, in registration order. */
|
|
1042
1210
|
list(): readonly FontHandle[];
|
|
1043
1211
|
}
|
|
@@ -1105,5 +1273,5 @@ interface Engine {
|
|
|
1105
1273
|
*/
|
|
1106
1274
|
type EngineFactory = () => Engine;
|
|
1107
1275
|
//#endregion
|
|
1108
|
-
export {
|
|
1109
|
-
//# sourceMappingURL=Engine-
|
|
1276
|
+
export { snapTileScale as A, DocumentActionsService as B, DocumentSignaturesService as C, EngineRenderPolicy as D, DocumentRenderService as E, DocumentFontSettings as F, FontEmbeddingPolicy as I, DocumentAttachmentsService as L, DocumentPagesService as M, DocumentFormsService as N, snapAppearanceScale as O, FormRepairOptions as P, DocumentAnnotationsService as R, MetadataService as S, CONTINUOUS_RENDER_POLICY as T, PieceInfoSnapshot as _, DocumentHandle as a, PageGeometryService as b, DocumentEventInit as c, PageHandle as d, PageMeasureService as f, PieceInfoPatchValue as g, PieceInfoPatch as h, DocumentCapabilities as i, DocumentRedactionService as j, snapFullPageViewport as k, DocumentEventType as l, PieceInfoEntry as m, EngineFactory as n, DocumentEventStream as o, PieceInfoService as p, FontService as r, DocumentEvent as s, Engine as t, EventOrigin as u, PageTextService as v, DocumentSearchService as w, PageAnnotationsService as x, PageRenderService as y, WeakAnnotationEditSession as z };
|
|
1277
|
+
//# sourceMappingURL=Engine-FNaAEjfb.d.cts.map
|