@embedpdf/engine-core 3.0.0-next.10 → 3.0.0-next.12
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/{AnnotationListSnapshot-DDxHpJQU.d.cts → AnnotationListSnapshot-x6tKulNV.d.cts} +461 -114
- package/dist/{AnnotationListSnapshot-DDxHpJQU.d.ts → AnnotationListSnapshot-x6tKulNV.d.ts} +461 -114
- package/dist/{DocumentSecurityService-o9aeTHwT.d.ts → DocumentSecurityService-9MawYxP-.d.ts} +2 -2
- package/dist/{DocumentSecurityService-BV4_YXkU.d.cts → DocumentSecurityService-CK0pejAK.d.cts} +2 -2
- package/dist/{Engine-DOoVem7_.d.ts → Engine--0XF0UAK.d.cts} +68 -3
- package/dist/{Engine-D9je6GdU.d.cts → Engine-Ds0ytbl6.d.ts} +68 -3
- package/dist/{builders-Cp_rlGob.cjs → builders-8Hl1AYNU.cjs} +44 -8
- package/dist/builders-8Hl1AYNU.cjs.map +1 -0
- package/dist/{builders-B_KufGJ9.js → builders-DOjcKDWQ.js} +39 -9
- package/dist/builders-DOjcKDWQ.js.map +1 -0
- package/dist/conformance.cjs +769 -101
- package/dist/conformance.cjs.map +1 -1
- package/dist/conformance.d.cts +56 -3
- package/dist/conformance.d.ts +56 -3
- package/dist/conformance.js +767 -102
- package/dist/conformance.js.map +1 -1
- package/dist/index.cjs +3 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/{resolver-DiPMTfcy.js → resolver-CHG4waXL.js} +2 -1
- package/dist/resolver-CHG4waXL.js.map +1 -0
- package/dist/{resolver-DAZWVoJL.cjs → resolver-D-jumvgM.cjs} +2 -1
- package/dist/resolver-D-jumvgM.cjs.map +1 -0
- package/dist/runtime.cjs +3 -2
- package/dist/runtime.d.cts +66 -5
- package/dist/runtime.d.ts +66 -5
- package/dist/runtime.js +3 -3
- package/dist/{schemas-DAnu8tuW.js → schemas-DOyVEPk7.js} +206 -84
- package/dist/schemas-DOyVEPk7.js.map +1 -0
- package/dist/{schemas-D1pxEv3t.cjs → schemas-RChsAMWw.cjs} +259 -83
- package/dist/schemas-RChsAMWw.cjs.map +1 -0
- package/dist/wire.cjs +65 -2
- package/dist/wire.cjs.map +1 -1
- package/dist/wire.d.cts +210 -8
- package/dist/wire.d.ts +210 -8
- package/dist/wire.js +54 -3
- package/dist/wire.js.map +1 -1
- package/package.json +1 -1
- package/dist/builders-B_KufGJ9.js.map +0 -1
- package/dist/builders-Cp_rlGob.cjs.map +0 -1
- package/dist/resolver-DAZWVoJL.cjs.map +0 -1
- package/dist/resolver-DiPMTfcy.js.map +0 -1
- package/dist/schemas-D1pxEv3t.cjs.map +0 -1
- package/dist/schemas-DAnu8tuW.js.map +0 -1
package/dist/{DocumentSecurityService-o9aeTHwT.d.ts → DocumentSecurityService-9MawYxP-.d.ts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ic as DocCapability, Lc as IdentityClaims, Uc as PdfBits, _c as CollabTarget } from "./AnnotationListSnapshot-x6tKulNV.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-9MawYxP-.d.ts.map
|
package/dist/{DocumentSecurityService-BV4_YXkU.d.cts → DocumentSecurityService-CK0pejAK.d.cts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ic as DocCapability, Lc as IdentityClaims, Uc as PdfBits, _c as CollabTarget } from "./AnnotationListSnapshot-x6tKulNV.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-CK0pejAK.d.cts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $
|
|
2
|
-
import { g as AbortablePromise, s as DocumentSecurityService } from "./DocumentSecurityService-
|
|
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";
|
|
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 {
|
|
@@ -139,6 +139,18 @@ interface DocumentFormsService {
|
|
|
139
139
|
* skipped and any landed state is finalized as one artifact/event/version.
|
|
140
140
|
*/
|
|
141
141
|
applyEffects?(effects: FormEffect[]): AbortablePromise<FormEffectsResult>;
|
|
142
|
+
/**
|
|
143
|
+
* Deliver a resolved form submission to the document's HOME. Present only
|
|
144
|
+
* where the document HAS a home that accepts submissions — the cloud
|
|
145
|
+
* engine when the deployment advertises the capability; the local engine
|
|
146
|
+
* truthfully lacks it (an in-process document has no home, and this
|
|
147
|
+
* contract is never a callback trampoline). Gated by `doc.forms.submit`
|
|
148
|
+
* (grant-minted; no PDF permission bit exists for submission), asserted
|
|
149
|
+
* at the home's boundary where enforcement is real. The home stores the
|
|
150
|
+
* dataset with the declared intent as metadata and derives WHO submitted
|
|
151
|
+
* from its own verified session — it never fetches the PDF's URL.
|
|
152
|
+
*/
|
|
153
|
+
submit?(request: FormSubmissionRequest): AbortablePromise<FormSubmissionReceipt>;
|
|
142
154
|
/**
|
|
143
155
|
* Serialize the form data for interchange. Defaults to `'xfdf'` (the
|
|
144
156
|
* XML sibling; UTF-8, friendliest to web pipelines) — pass `'fdf'` for
|
|
@@ -250,6 +262,25 @@ interface DocumentPagesService {
|
|
|
250
262
|
* recycled; surviving pages keep their identity and revisions.
|
|
251
263
|
*/
|
|
252
264
|
delete(pageObjectNumbers: PageObjectNumber[]): AbortablePromise<PageDeleteResult>;
|
|
265
|
+
/**
|
|
266
|
+
* Register `name` → page in the catalog's `/Names /Pages` tree (create,
|
|
267
|
+
* or replace what an existing key points at); with `replace`, drop that
|
|
268
|
+
* other key in the same job (rename). Named pages are LAYOUT — read them
|
|
269
|
+
* back from `list().namedPages` — so this is a page-structure mutation:
|
|
270
|
+
* `docVersion` + `layoutVersion` advance, per-page pins do not. Gated like
|
|
271
|
+
* `move` (`doc.pages.assemble`). Optional while transports ship;
|
|
272
|
+
* feature-detect with `pages.setName !== undefined`.
|
|
273
|
+
*
|
|
274
|
+
* Rejects with `InvalidArg` for an empty name and `NotFound` for a page
|
|
275
|
+
* that is not in the page tree (hidden templates included).
|
|
276
|
+
*/
|
|
277
|
+
setName?(input: PageNameInput): AbortablePromise<PageNameResult>;
|
|
278
|
+
/**
|
|
279
|
+
* Remove one `/Names /Pages` registration; the page itself is untouched.
|
|
280
|
+
* `NotFound` when no registration has that decoded key. Page DELETION
|
|
281
|
+
* removes registrations by itself — callers never need to pair the two.
|
|
282
|
+
*/
|
|
283
|
+
removeName?(input: PageRemoveNameInput): AbortablePromise<PageNameResult>;
|
|
253
284
|
/**
|
|
254
285
|
* Paint eligible annotation appearances into page content and remove only
|
|
255
286
|
* those annotations that were painted. This changes content and annotation
|
|
@@ -527,6 +558,30 @@ interface PageAnnotationsService {
|
|
|
527
558
|
* space, in `[0, count - refs.length]`.
|
|
528
559
|
*/
|
|
529
560
|
move(refs: AnnotationRef[], toIndex: number): AbortablePromise<AnnotationMoveResult>;
|
|
561
|
+
/**
|
|
562
|
+
* Flatten the given annotations of THIS page into its content —
|
|
563
|
+
* `pages.flatten` for a chosen set. Painted annotations are removed from
|
|
564
|
+
* the page; ones that are ineligible (hidden for `usage`, Popups, no
|
|
565
|
+
* usable appearance) stay and report `skipped`, so a caller can say
|
|
566
|
+
* "2 of 3 flattened". A content + annotation MUTATION of this page: its
|
|
567
|
+
* content and annotation pins advance, layout does not; a
|
|
568
|
+
* `annotations.flattened` event is published when anything was applied.
|
|
569
|
+
* Gated like `pages.flatten` (`doc.pages.modify` + `doc.annotate.modify`).
|
|
570
|
+
* `InvalidArg` for a ref on another page; `NotFound` for an unknown ref.
|
|
571
|
+
* Optional while transports ship — feature-detect.
|
|
572
|
+
*/
|
|
573
|
+
flatten?(refs: AnnotationRef[], usage?: PageFlattenUsage): AbortablePromise<AnnotationFlattenResult>;
|
|
574
|
+
/**
|
|
575
|
+
* Flatten the normal appearances of the given annotations of this page
|
|
576
|
+
* into a NEW single-page PDF sized to their union `/Rect` — vector,
|
|
577
|
+
* positions preserved, exactly as this page shows them. The same plan as
|
|
578
|
+
* `flatten` aimed at a fresh page; the source document is untouched. A
|
|
579
|
+
* derived READ that egresses content, so it is gated by `doc.download`
|
|
580
|
+
* like `pages.extract`. All-or-nothing: `InvalidArg` when any ref is not
|
|
581
|
+
* on this page, hidden, or has no appearance (a stamp silently missing a
|
|
582
|
+
* part would be worse than an error). Optional — feature-detect.
|
|
583
|
+
*/
|
|
584
|
+
exportAppearance?(refs: AnnotationRef[]): AbortablePromise<Uint8Array>;
|
|
530
585
|
}
|
|
531
586
|
//#endregion
|
|
532
587
|
//#region src/engine/PageGeometryService.d.ts
|
|
@@ -733,6 +788,9 @@ type DocumentEvent = ({
|
|
|
733
788
|
pageObjectNumber: PageObjectNumber;
|
|
734
789
|
origin: EventOrigin;
|
|
735
790
|
} & AnnotationMoveResult) | ({
|
|
791
|
+
type: 'annotations.flattened';
|
|
792
|
+
origin: EventOrigin;
|
|
793
|
+
} & AnnotationFlattenResult) | ({
|
|
736
794
|
type: 'pages.moved';
|
|
737
795
|
/** Locally: the moved block. Remotely the audit row only records the
|
|
738
796
|
* outcome, so this is the full new order — consumers should read
|
|
@@ -757,6 +815,13 @@ type DocumentEvent = ({
|
|
|
757
815
|
destIndex?: number;
|
|
758
816
|
origin: EventOrigin;
|
|
759
817
|
} & PageInsertResult) | ({
|
|
818
|
+
type: 'pages.named';
|
|
819
|
+
/** The decoded key that was registered, renamed, or removed. */
|
|
820
|
+
name: string;
|
|
821
|
+
/** The page it now points at; `null` when the registration was removed. */
|
|
822
|
+
pageObjectNumber: PageObjectNumber | null;
|
|
823
|
+
origin: EventOrigin;
|
|
824
|
+
} & PageNameResult) | ({
|
|
760
825
|
type: 'attachment.created';
|
|
761
826
|
origin: EventOrigin;
|
|
762
827
|
} & AttachmentCreateResult) | ({
|
|
@@ -1041,4 +1106,4 @@ interface Engine {
|
|
|
1041
1106
|
type EngineFactory = () => Engine;
|
|
1042
1107
|
//#endregion
|
|
1043
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 };
|
|
1044
|
-
//# sourceMappingURL=Engine
|
|
1109
|
+
//# sourceMappingURL=Engine--0XF0UAK.d.cts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $
|
|
2
|
-
import { g as AbortablePromise, s as DocumentSecurityService } from "./DocumentSecurityService-
|
|
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";
|
|
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 {
|
|
@@ -139,6 +139,18 @@ interface DocumentFormsService {
|
|
|
139
139
|
* skipped and any landed state is finalized as one artifact/event/version.
|
|
140
140
|
*/
|
|
141
141
|
applyEffects?(effects: FormEffect[]): AbortablePromise<FormEffectsResult>;
|
|
142
|
+
/**
|
|
143
|
+
* Deliver a resolved form submission to the document's HOME. Present only
|
|
144
|
+
* where the document HAS a home that accepts submissions — the cloud
|
|
145
|
+
* engine when the deployment advertises the capability; the local engine
|
|
146
|
+
* truthfully lacks it (an in-process document has no home, and this
|
|
147
|
+
* contract is never a callback trampoline). Gated by `doc.forms.submit`
|
|
148
|
+
* (grant-minted; no PDF permission bit exists for submission), asserted
|
|
149
|
+
* at the home's boundary where enforcement is real. The home stores the
|
|
150
|
+
* dataset with the declared intent as metadata and derives WHO submitted
|
|
151
|
+
* from its own verified session — it never fetches the PDF's URL.
|
|
152
|
+
*/
|
|
153
|
+
submit?(request: FormSubmissionRequest): AbortablePromise<FormSubmissionReceipt>;
|
|
142
154
|
/**
|
|
143
155
|
* Serialize the form data for interchange. Defaults to `'xfdf'` (the
|
|
144
156
|
* XML sibling; UTF-8, friendliest to web pipelines) — pass `'fdf'` for
|
|
@@ -250,6 +262,25 @@ interface DocumentPagesService {
|
|
|
250
262
|
* recycled; surviving pages keep their identity and revisions.
|
|
251
263
|
*/
|
|
252
264
|
delete(pageObjectNumbers: PageObjectNumber[]): AbortablePromise<PageDeleteResult>;
|
|
265
|
+
/**
|
|
266
|
+
* Register `name` → page in the catalog's `/Names /Pages` tree (create,
|
|
267
|
+
* or replace what an existing key points at); with `replace`, drop that
|
|
268
|
+
* other key in the same job (rename). Named pages are LAYOUT — read them
|
|
269
|
+
* back from `list().namedPages` — so this is a page-structure mutation:
|
|
270
|
+
* `docVersion` + `layoutVersion` advance, per-page pins do not. Gated like
|
|
271
|
+
* `move` (`doc.pages.assemble`). Optional while transports ship;
|
|
272
|
+
* feature-detect with `pages.setName !== undefined`.
|
|
273
|
+
*
|
|
274
|
+
* Rejects with `InvalidArg` for an empty name and `NotFound` for a page
|
|
275
|
+
* that is not in the page tree (hidden templates included).
|
|
276
|
+
*/
|
|
277
|
+
setName?(input: PageNameInput): AbortablePromise<PageNameResult>;
|
|
278
|
+
/**
|
|
279
|
+
* Remove one `/Names /Pages` registration; the page itself is untouched.
|
|
280
|
+
* `NotFound` when no registration has that decoded key. Page DELETION
|
|
281
|
+
* removes registrations by itself — callers never need to pair the two.
|
|
282
|
+
*/
|
|
283
|
+
removeName?(input: PageRemoveNameInput): AbortablePromise<PageNameResult>;
|
|
253
284
|
/**
|
|
254
285
|
* Paint eligible annotation appearances into page content and remove only
|
|
255
286
|
* those annotations that were painted. This changes content and annotation
|
|
@@ -527,6 +558,30 @@ interface PageAnnotationsService {
|
|
|
527
558
|
* space, in `[0, count - refs.length]`.
|
|
528
559
|
*/
|
|
529
560
|
move(refs: AnnotationRef[], toIndex: number): AbortablePromise<AnnotationMoveResult>;
|
|
561
|
+
/**
|
|
562
|
+
* Flatten the given annotations of THIS page into its content —
|
|
563
|
+
* `pages.flatten` for a chosen set. Painted annotations are removed from
|
|
564
|
+
* the page; ones that are ineligible (hidden for `usage`, Popups, no
|
|
565
|
+
* usable appearance) stay and report `skipped`, so a caller can say
|
|
566
|
+
* "2 of 3 flattened". A content + annotation MUTATION of this page: its
|
|
567
|
+
* content and annotation pins advance, layout does not; a
|
|
568
|
+
* `annotations.flattened` event is published when anything was applied.
|
|
569
|
+
* Gated like `pages.flatten` (`doc.pages.modify` + `doc.annotate.modify`).
|
|
570
|
+
* `InvalidArg` for a ref on another page; `NotFound` for an unknown ref.
|
|
571
|
+
* Optional while transports ship — feature-detect.
|
|
572
|
+
*/
|
|
573
|
+
flatten?(refs: AnnotationRef[], usage?: PageFlattenUsage): AbortablePromise<AnnotationFlattenResult>;
|
|
574
|
+
/**
|
|
575
|
+
* Flatten the normal appearances of the given annotations of this page
|
|
576
|
+
* into a NEW single-page PDF sized to their union `/Rect` — vector,
|
|
577
|
+
* positions preserved, exactly as this page shows them. The same plan as
|
|
578
|
+
* `flatten` aimed at a fresh page; the source document is untouched. A
|
|
579
|
+
* derived READ that egresses content, so it is gated by `doc.download`
|
|
580
|
+
* like `pages.extract`. All-or-nothing: `InvalidArg` when any ref is not
|
|
581
|
+
* on this page, hidden, or has no appearance (a stamp silently missing a
|
|
582
|
+
* part would be worse than an error). Optional — feature-detect.
|
|
583
|
+
*/
|
|
584
|
+
exportAppearance?(refs: AnnotationRef[]): AbortablePromise<Uint8Array>;
|
|
530
585
|
}
|
|
531
586
|
//#endregion
|
|
532
587
|
//#region src/engine/PageGeometryService.d.ts
|
|
@@ -733,6 +788,9 @@ type DocumentEvent = ({
|
|
|
733
788
|
pageObjectNumber: PageObjectNumber;
|
|
734
789
|
origin: EventOrigin;
|
|
735
790
|
} & AnnotationMoveResult) | ({
|
|
791
|
+
type: 'annotations.flattened';
|
|
792
|
+
origin: EventOrigin;
|
|
793
|
+
} & AnnotationFlattenResult) | ({
|
|
736
794
|
type: 'pages.moved';
|
|
737
795
|
/** Locally: the moved block. Remotely the audit row only records the
|
|
738
796
|
* outcome, so this is the full new order — consumers should read
|
|
@@ -757,6 +815,13 @@ type DocumentEvent = ({
|
|
|
757
815
|
destIndex?: number;
|
|
758
816
|
origin: EventOrigin;
|
|
759
817
|
} & PageInsertResult) | ({
|
|
818
|
+
type: 'pages.named';
|
|
819
|
+
/** The decoded key that was registered, renamed, or removed. */
|
|
820
|
+
name: string;
|
|
821
|
+
/** The page it now points at; `null` when the registration was removed. */
|
|
822
|
+
pageObjectNumber: PageObjectNumber | null;
|
|
823
|
+
origin: EventOrigin;
|
|
824
|
+
} & PageNameResult) | ({
|
|
760
825
|
type: 'attachment.created';
|
|
761
826
|
origin: EventOrigin;
|
|
762
827
|
} & AttachmentCreateResult) | ({
|
|
@@ -1041,4 +1106,4 @@ interface Engine {
|
|
|
1041
1106
|
type EngineFactory = () => Engine;
|
|
1042
1107
|
//#endregion
|
|
1043
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 };
|
|
1044
|
-
//# sourceMappingURL=Engine-
|
|
1109
|
+
//# sourceMappingURL=Engine-Ds0ytbl6.d.ts.map
|
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
const require_fold = require("./fold-C7I5GpBz.cjs");
|
|
2
2
|
const require_PageInsertBlankInput = require("./PageInsertBlankInput-CzShuSJI.cjs");
|
|
3
|
+
//#region src/dto/PdfAction.ts
|
|
4
|
+
/**
|
|
5
|
+
* The one Table-240 decode, shared by the reader, the schema's producers,
|
|
6
|
+
* and tests — so bit semantics cannot fork.
|
|
7
|
+
*/
|
|
8
|
+
const decodeSubmitFormFlags = (raw) => {
|
|
9
|
+
const bit = (n) => (raw & 1 << n - 1) !== 0;
|
|
10
|
+
const format = bit(9) ? "pdf" : bit(6) ? "xfdf" : bit(3) ? "html" : "fdf";
|
|
11
|
+
return {
|
|
12
|
+
raw,
|
|
13
|
+
exclude: bit(1),
|
|
14
|
+
includeNoValueFields: bit(2),
|
|
15
|
+
format,
|
|
16
|
+
method: bit(4) && (format === "html" || format === "pdf") ? "get" : "post",
|
|
17
|
+
submitCoordinates: bit(5),
|
|
18
|
+
includeAppendSaves: bit(7),
|
|
19
|
+
includeAnnotations: bit(8),
|
|
20
|
+
canonicalFormat: bit(10),
|
|
21
|
+
exclNonUserAnnots: bit(11),
|
|
22
|
+
exclFKey: bit(12),
|
|
23
|
+
embedForm: bit(14)
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
3
27
|
//#region src/dto/PageRender.ts
|
|
4
28
|
function createPageImageHandle(result, blobSource) {
|
|
5
29
|
return {
|
|
@@ -115,19 +139,25 @@ function isBlob(value) {
|
|
|
115
139
|
return typeof Blob !== "undefined" && value instanceof Blob;
|
|
116
140
|
}
|
|
117
141
|
/**
|
|
118
|
-
*
|
|
119
|
-
* when the view
|
|
142
|
+
* Copy a Uint8Array view into a fresh, exactly-sized ArrayBuffer the call
|
|
143
|
+
* owns. Always copies — even when the view spans its whole buffer — because
|
|
144
|
+
* the result may be transferred to a worker (detaching it), and the view is
|
|
145
|
+
* the caller's. Returning `view.buffer` here would let one transfer zero
|
|
146
|
+
* the caller's bytes (a stamp library's Uint8Array became single-use).
|
|
147
|
+
* Callers wanting a zero-copy hand-off need an explicit "give" form, as
|
|
148
|
+
* `pages.insert` has for bare ArrayBuffers; `BinarySource` has none.
|
|
120
149
|
*/
|
|
121
|
-
function
|
|
122
|
-
|
|
123
|
-
|
|
150
|
+
function toOwnedArrayBuffer(view) {
|
|
151
|
+
const copy = new ArrayBuffer(view.byteLength);
|
|
152
|
+
new Uint8Array(copy).set(view);
|
|
153
|
+
return copy;
|
|
124
154
|
}
|
|
125
155
|
/**
|
|
126
156
|
* Resolve any accepted `BinarySource` form into a `WireResource`.
|
|
127
157
|
* Async because Blob bytes can only be read asynchronously.
|
|
128
158
|
*/
|
|
129
159
|
async function resolveBinarySource(source) {
|
|
130
|
-
if (source instanceof Uint8Array) return { bytes:
|
|
160
|
+
if (source instanceof Uint8Array) return { bytes: toOwnedArrayBuffer(source) };
|
|
131
161
|
if (isBlob(source)) {
|
|
132
162
|
const blobName = blobFileName(source);
|
|
133
163
|
return {
|
|
@@ -138,7 +168,7 @@ async function resolveBinarySource(source) {
|
|
|
138
168
|
}
|
|
139
169
|
const { data, mimeType, name } = source;
|
|
140
170
|
const inner = data instanceof Uint8Array ? {
|
|
141
|
-
bytes:
|
|
171
|
+
bytes: toOwnedArrayBuffer(data),
|
|
142
172
|
mimeType: void 0,
|
|
143
173
|
name: void 0
|
|
144
174
|
} : {
|
|
@@ -1860,6 +1890,12 @@ Object.defineProperty(exports, "decodeStableIdKey", {
|
|
|
1860
1890
|
return decodeStableIdKey;
|
|
1861
1891
|
}
|
|
1862
1892
|
});
|
|
1893
|
+
Object.defineProperty(exports, "decodeSubmitFormFlags", {
|
|
1894
|
+
enumerable: true,
|
|
1895
|
+
get: function() {
|
|
1896
|
+
return decodeSubmitFormFlags;
|
|
1897
|
+
}
|
|
1898
|
+
});
|
|
1863
1899
|
Object.defineProperty(exports, "encodeFieldRefKey", {
|
|
1864
1900
|
enumerable: true,
|
|
1865
1901
|
get: function() {
|
|
@@ -2059,4 +2095,4 @@ Object.defineProperty(exports, "wordBefore", {
|
|
|
2059
2095
|
}
|
|
2060
2096
|
});
|
|
2061
2097
|
|
|
2062
|
-
//# sourceMappingURL=builders-
|
|
2098
|
+
//# sourceMappingURL=builders-8Hl1AYNU.cjs.map
|