@embedpdf/engine-core 3.0.0-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/LICENSE +192 -0
  2. package/README.md +24 -0
  3. package/dist/AbortError-ByBflvEl.cjs +38 -0
  4. package/dist/AbortError-ByBflvEl.cjs.map +1 -0
  5. package/dist/AbortError-CjSasIlL.js +27 -0
  6. package/dist/AbortError-CjSasIlL.js.map +1 -0
  7. package/dist/AnnotationListSnapshot-W0RCsyDE.d.cts +5043 -0
  8. package/dist/AnnotationListSnapshot-W0RCsyDE.d.ts +5043 -0
  9. package/dist/DocumentSecurityService-B-tULKNY.d.ts +332 -0
  10. package/dist/DocumentSecurityService-Df79fgpe.d.cts +332 -0
  11. package/dist/Engine-B7Oe7f5i.d.ts +1013 -0
  12. package/dist/Engine-D9loFZc1.d.cts +1013 -0
  13. package/dist/builders-BvikWRuO.cjs +1684 -0
  14. package/dist/builders-BvikWRuO.cjs.map +1 -0
  15. package/dist/builders-C548U47M.js +1367 -0
  16. package/dist/builders-C548U47M.js.map +1 -0
  17. package/dist/conformance.cjs +5414 -0
  18. package/dist/conformance.cjs.map +1 -0
  19. package/dist/conformance.d.cts +530 -0
  20. package/dist/conformance.d.ts +530 -0
  21. package/dist/conformance.js +5394 -0
  22. package/dist/conformance.js.map +1 -0
  23. package/dist/fold-CB4fAOOy.js +175 -0
  24. package/dist/fold-CB4fAOOy.js.map +1 -0
  25. package/dist/fold-IaMph3CO.cjs +216 -0
  26. package/dist/fold-IaMph3CO.cjs.map +1 -0
  27. package/dist/index.cjs +82 -0
  28. package/dist/index.d.cts +2 -0
  29. package/dist/index.d.ts +2 -0
  30. package/dist/index.js +5 -0
  31. package/dist/resolver-DAZWVoJL.cjs +434 -0
  32. package/dist/resolver-DAZWVoJL.cjs.map +1 -0
  33. package/dist/resolver-DiPMTfcy.js +363 -0
  34. package/dist/resolver-DiPMTfcy.js.map +1 -0
  35. package/dist/runtime.cjs +453 -0
  36. package/dist/runtime.cjs.map +1 -0
  37. package/dist/runtime.d.cts +1002 -0
  38. package/dist/runtime.d.ts +1002 -0
  39. package/dist/runtime.js +361 -0
  40. package/dist/runtime.js.map +1 -0
  41. package/dist/schemas-9OpSSeM6.js +2493 -0
  42. package/dist/schemas-9OpSSeM6.js.map +1 -0
  43. package/dist/schemas-B_1VyFsm.cjs +3608 -0
  44. package/dist/schemas-B_1VyFsm.cjs.map +1 -0
  45. package/dist/subtype-BvAzLCGC.js +196 -0
  46. package/dist/subtype-BvAzLCGC.js.map +1 -0
  47. package/dist/subtype-qejjVr6h.cjs +231 -0
  48. package/dist/subtype-qejjVr6h.cjs.map +1 -0
  49. package/dist/wire.cjs +1516 -0
  50. package/dist/wire.cjs.map +1 -0
  51. package/dist/wire.d.cts +1546 -0
  52. package/dist/wire.d.ts +1546 -0
  53. package/dist/wire.js +1280 -0
  54. package/dist/wire.js.map +1 -0
  55. package/package.json +74 -0
@@ -0,0 +1,1002 @@
1
+ import { $a as AnnotationIdentityQuality, $i as LayerScopes, $n as searchRectsForRange, $o as pdfQuadCorners, $r as ListBoxFieldDraft, $s as revisionTokensEqual, Aa as EmbeddedFileItem, Ac as PdfSize, Ai as AnnotationCreateResult, An as HighlightDraft, Ao as PageImageHandle, Ar as FormFieldDeleteResult, As as filterMatches, At as LineDraft, B as StampAnnotationDTO, Ba as BinarySource, Bc as PdfPageActions, Bi as changesAnnotationList, Bn as PageFlattenStatus, Bo as PageRenderOptions, Br as FormFieldDisplay, Bs as CollabEntity, Bt as PolygonPatch, C as RedactDraft, Ca as GeometryStyleDraftFields, Cc as InkList, Ci as ToggleFieldWidget, Cn as UnderlineAnnotationDTO, Co as AnnotationAppearancesQuery, Cr as SearchQuery, Cs as CollabTarget, Ct as LinkAnnotationDTO, Da as AttachmentFileBase, Dc as PdfQuad, Di as FormWidgetRef, Do as WeakAnnotationState, Dr as SearchSnippet, Ds as checkSetGroup, E as WidgetDraft, Ea as AttachmentContent, Ec as PdfPoint, Ei as FormFieldRef, Eo as UNKNOWN_WEAK_ANNOTATION_STATE, Er as SearchSliceBudget, Es as checkCollab, Fa as normalizeAnnotationPatch, Fc as PdfActionTree, Fi as AppearanceImpact, Fn as RedactionApplyScope, Fo as PageNetworkRenderFormat, Fr as FormWidgetLinkResult, Fs as validateScopeArray, Ft as PolylineAnnotationDTO, Ga as ANNOTATION_SUBTYPES, Gi as CacheDelta, Gn as PageRotateResult, Go as PageGeometryGlyph, Gr as FormFieldPatch, Gs as ParsedCollab, Gt as VertexPatchFields, H as StampFit, Ha as WireResource, Hc as DocumentMetadataTrapped, Hi as shiftsExistingAnnotationIndices, Hn as PageInsertResult, Ho as PageRenderTarget, Hr as FormFieldValue, Hs as DocCapability, Ht as PolygonDraft, Ia as BinaryMetadata, Ic as PdfActionType, Ii as AppearanceOutcome, In as RedactionApplyStatus, Io as PageRaster, Ir as FormEffect, Is as PDF_BITS, It as PolylineDraft, J as TextPatch, Ja as PDF_SUBTYPE_TO_CODE, Ji as PdfLinkTargetWritable, Jn as PageMoveResult, Jo as PageTextSnapshot, Jr as TextFieldPatch, Js as ParsedWildcard, Ka as AnnotationSubtype, Ki as MutationMeta, Kn as PageRotateInput, Ko as PageGeometryRun, Kr as ListBoxFieldPatch, Ks as ParsedScope, La as BinaryMimeType, Lc as PdfActionWarning, Li as appearanceImpactOf, Ln as PageFlattenInput, Lo as PageRenderBackground, Lr as FormEffectResult, Ls as decodePdfBits, M as FileAttachmentPatch, Ma as NormalizedDraft, Mc as DocumentActionsSnapshot, Mi as AnnotationMoveResult, Mn as MetadataUpdateResult, Mo as PageImageOptions, Mr as FormImportResult, Ms as MissingIdentity, N as FileAttachmentAnnotationDTO, Na as NormalizedPatch, Nc as NamedJavaScriptAction, Ni as AnnotationUpdateResult, Nn as RedactionApplyItemResult, No as PageImageResult, Nr as FormRepairResult, Ns as PermissionDenied, Oa as AttachmentFileInfo, Oc as PdfRect, Oi as decodeFieldRefKey, On as HighlightPatch, Oo as knownWeakAnnotationState, Or as FormDataExport, Os as expandRawScope, Ot as LinePatch, Pa as normalizeAnnotationDraft, Pc as PdfActionNode, Pi as AppearanceAction, Pn as RedactionApplyResult, Po as PageImageSource, Pr as FormSetValueResult, Ps as parseScope, Pt as PolylinePatch, Qa as AnnotationBase, Qi as LayerScopePlane, Qn as searchContentEpoch, Qo as pdfQuadBounds, Qr as FormFieldOptionInput, Qs as RevisionToken, R as StampPatch, Ra as sniffBinaryMetadata, Rc as PdfAnnotationActions, Ri as semanticEqual, Rn as PageFlattenItemResult, Ro as PageRenderEncodedFormat, Rr as FormEffectStatus, Rs as AnnotationActor, S as RedactAnnotationDTO, Sa as FilledStylePatchFields, Sc as CalloutLine, Si as TextFieldDTO, Sn as UnderlinePatch, So as AnnotationAppearanceRenderOptions, Sr as SearchMode, Ss as pdfPermissions, St as LinkPatch, T as WidgetAnnotationDTO, Ta as GeometryStylePatchFields, Tc as LinePoints, Ti as FormValueEntry, To as PageState, Tr as SearchSlice, Ts as checkCapability, U as StampWireDraft, Ua as WireResourceMap, Ui as AnnotationListMutationMeta, Un as PageDeleteResult, Uo as PageRenderViewport, Ur as CheckboxFieldPatch, Us as IdentityClaims, Ut as VertexAnnotationFields, V as StampDraft, Va as ResourceRef, Vc as DocumentMetadata, Vi as invalidatesWeakIndexRefs, Vn as PageFlattenUsage, Vo as PageRenderQuery, Vr as FormDataFormat, Vs as CollabFilter, Vt as PolygonAnnotationDTO, Wa as resolveBinarySource, Wi as RefetchReason, Wn as PageDeleteInput, Wo as createPageImageHandle, Wr as ComboBoxFieldPatch, Ws as ParsedCapability, Wt as VertexDraftFields, X as NoteIcon, Xa as subtypeFromCode, Xi as DocumentManifest, Xn as PageMoveInput, Xo as PdfQuadCorners, Xr as ComboBoxFieldDraft, Xs as AnnotationDraftBase, Xt as SquareAnnotationDTO, Y as TextAnnotationDTO, Ya as PdfAnnotationSubtypeCode, Yi as PdfDestination, Yn as PageStructureCache, Yo as PdfOriginSize, Yr as CheckboxFieldDraft, Ys as PdfBits, Yt as SquarePatch, Z as TextDraft, Za as AnnotationPatchBase, Zi as ManifestPage, Zn as canonicalSearchQuery, Zo as normalizePdfRect, Zr as FormFieldDraft, Zs as AnnotationRef, Zt as SquareDraft, _a as ColorStyleDraftFields, _c as Rotation, _i as FormFieldOrigin, _n as SquigglyAnnotationDTO, _o as AnnotationAppearanceImagesResult, _r as SEARCH_FOLD_VERSION, _s as OpenOptions, aa as AnnotationKindModule, ac as BlendMode, ai as WidgetAppearance, an as ShapeDraftFields, ao as SerializedEngineError, ar as SearchQueryValidation, as as pdfRectWidth, b as UnsupportedAnnotationDTO, ba as FilledStyleDraftFields, bc as StrikeoutIntent, bi as RadioFieldDTO, bo as AnnotationAppearanceMode, br as toOriginalRange, bs as collab, c as AnnotationKind, ca as PatchOfKind, cc as FreeTextFont, ci as WidgetStyleFields, co as EngineErrorCode, cr as matchRegex, cs as PageLayout, ct as FreeTextAnnotationDTO, d as AnnotationSubtypeOfKind, da as AttachmentsCache, dc as LineEnding, di as ComboBoxFieldDTO, dn as StrikeoutAnnotationDTO, do as FontSpec, dr as foldOptionsFor, ds as OpenInput, ea as AnnotationRelationKind, ec as PageObjectNumber, ei as RadioFieldDraft, eo as AnnotationStableId, er as SEARCH_SNIPPET_CONTEXT, es as pdfQuadFromCorners, fa as normalizeAttachmentFileSource, fc as LineEndings, fi as FormFieldBase, fn as StrikeoutDraft, fo as DEFAULT_PDF_SAVE_MODE, fr as matchLiteral, fs as OpenInputById, ga as WireAttachmentFile, gc as Rect, gi as FormFieldOption, gn as SquigglyPatch, go as AnnotationAppearanceImageOptions, gr as FoldedText, gs as OpenInputToken, ha as FileAttachmentWireDraft, hc as Point, hi as FormFieldFlags, ho as AnnotationAppearanceImage, hr as FoldOptions, hs as OpenInputLayerSource, ht as InkDraft, i as AnnotationDTO, ia as refKey, ic as AnnotationReplyType, ii as FormSnapshot, in as ShapeAnnotationFields, io as EngineErrorOptions, ir as SearchQueryIssue, is as pdfRectToOriginSize, ja as EmbeddedFileRef, jc as ActionReadBudget, ji as AnnotationDeleteResult, jn as MetadataCache, jo as PageImageObjectUrl, jr as FormFieldUpdateResult, js as InvalidScope, ka as AttachmentFileSource, kc as PdfRotation, ki as encodeFieldRefKey, kn as HighlightAnnotationDTO, ko as PageImageBlobSource, kr as FormFieldCreateResult, ks as expandedCapabilities, kt as LineAnnotationDTO, l as AnnotationPatch, la as AttachmentCreateResult, lc as FreeTextIntent, li as WidgetStylePatchFields, lo as FontHandle, lr as validateSearchQuery, ls as PageRotation, lt as FreeTextDraft, m as WireAnnotationPatch, ma as FileAttachmentIcon, mc as PdfRectDifferences, mi as FormFieldFamily, mo as CachePins, mr as wordBefore, ms as OpenInputLayerBytes, mt as InkAnnotationDTO, n as AnnotationListSnapshotAllPages, na as buildThreads, nc as AnnotationBorderStyle, ni as WidgetPlacement, nn as CircleAnnotationDTO, no as encodeStableIdKey, nr as matchPageText, ns as pdfRectHeight, nt as CaretAnnotationDTO, o as AnnotationDraft, oa as DTOOfKind, oc as CaretIntent, on as ShapePatchFields, oo as deserializeError, or as SearchRegexIssue, os as PageListSnapshot, p as WireAnnotationDraft, pa as FileAttachmentDraft, pc as NO_ANNOTATION_FLAGS, pi as FormFieldDTO, po as PdfSaveMode, pr as wordAt, ps as OpenInputBytes, pt as InkPatch, qa as PDF_CODE_TO_SUBTYPE, qi as PdfLinkTarget, qn as PageMoveCache, qo as PageGeometrySnapshot, qr as RadioFieldPatch, qs as ParsedVirtual, ra as classifyRelation, rc as AnnotationFlags, ri as FormKind, rn as CircleDraft, ro as EngineError, rr as SEARCH_REGEX_MAX_LENGTH, rs as pdfRectSize, rt as CaretDraft, sa as DraftOfKind, sc as Color, si as WidgetStyleDraftFields, so as serializeError, sr as SearchRegexValidation, ss as PageBoxes, st as FreeTextPatch, t as AnnotationListPageSnapshot, ta as AnnotationThread, tc as isValidPageObjectNumber, ti as TextFieldDraft, tn as CirclePatch, to as decodeStableIdKey, tr as buildSnippet, ts as pdfRectFromOriginSize, tt as CaretPatch, ua as AttachmentDeleteResult, uc as InkIntent, ui as CheckboxFieldDTO, un as StrikeoutPatch, uo as FontKey, ur as validateSearchRegex, us as MetadataPatch, v as UnsupportedPatch, va as ColorStyleFields, vc as Size, vi as ListBoxFieldDTO, vn as SquigglyDraft, vo as AnnotationAppearanceManifest, vr as SearchMatchRange, vs as TokenSource, w as WidgetPatch, wa as GeometryStyleFields, wc as InkStroke, wi as UnknownFieldDTO, wn as UnderlineDraft, wo as AnnotationAppearancesResult, wr as SearchRequest, ws as checkAnyCapability, wt as LinkDraft, x as RedactPatch, xa as FilledStyleFields, xc as TextAlignment, xi as SignatureFieldDTO, xo as AnnotationAppearanceRaster, xr as SearchMatch, xs as materializePdfPermissions, y as UnsupportedDraft, ya as ColorStylePatchFields, yc as StandardFont, yi as PushButtonFieldDTO, yo as AnnotationAppearanceManifestEntry, yr as foldText, ys as caps, z as StampWirePatch, za as BinaryPayload, zc as PdfFieldActions, zi as AnnotationMutationKind, zn as PageFlattenResult, zo as PageRenderFormat, zr as FormEffectsResult, zs as CollabAction } from "./AnnotationListSnapshot-W0RCsyDE.cjs";
2
+ import { a as DocumentEncryptionState, c as DocumentSecurityState, d as PdfPermissionAdvisory, f as PdfPermissionInfo, g as AbortablePromise, h as AbortableExecutor, i as DocumentAccessReason, l as DocumentUnlockInput, m as passwordPromptFromState, n as CdnAdapter, o as DocumentOpenMode, p as PasswordPrompt, r as DocumentAccessInfo, s as DocumentSecurityService, t as CdnAccessInfo, u as DocumentUnlockResult } from "./DocumentSecurityService-Df79fgpe.cjs";
3
+ import { A as DocumentPagesService, C as CONTINUOUS_RENDER_POLICY, D as snapFullPageViewport, E as snapAppearanceScale, F as WeakAnnotationEditSession, I as DocumentActionsService, M as FormRepairOptions, N as DocumentAttachmentsService, O as snapTileScale, P as DocumentAnnotationsService, S as DocumentSearchService, T as EngineRenderPolicy, _ as PageTextService, a as DocumentHandle, b as PageAnnotationsService, c as DocumentEventInit, d as PageHandle, f as PieceInfoService, g as PieceInfoSnapshot, h as PieceInfoPatchValue, i as DocumentCapabilities, j as DocumentFormsService, k as DocumentRedactionService, l as DocumentEventType, m as PieceInfoPatch, n as EngineFactory, o as DocumentEventStream, p as PieceInfoEntry, r as FontService, s as DocumentEvent, t as Engine, u as EventOrigin, v as PageRenderService, w as DocumentRenderService, x as MetadataService, y as PageGeometryService } from "./Engine-D9loFZc1.cjs";
4
+ //#region src/promise/AbortError.d.ts
5
+ declare class AbortError extends Error {
6
+ readonly name = "AbortError";
7
+ readonly reason: unknown;
8
+ constructor(reason?: unknown);
9
+ }
10
+ declare function isAbortError(value: unknown): value is AbortError;
11
+ //#endregion
12
+ //#region src/wire/worker-protocol.d.ts
13
+ /**
14
+ * Wire protocol used between an Engine-side queue and any Worker host
15
+ * (browser Web Worker, Node worker_thread, inline). Cloud HTTP traffic
16
+ * uses a different envelope; this is purely the worker boundary.
17
+ *
18
+ * Identical between @embedpdf/engine and @cloudpdf/server because
19
+ * the WorkerHost dispatch logic is the same on both sides — only the
20
+ * underlying PdfRuntimeModule (WASM vs native) differs.
21
+ */
22
+ type WorkerJobId = number;
23
+ interface OpenFatMemoryWorkerRequest {
24
+ kind: 'open.fatMem';
25
+ jobId: WorkerJobId;
26
+ docId: string;
27
+ bytes: ArrayBuffer;
28
+ password: string | null;
29
+ }
30
+ type LayerOpenSource = {
31
+ kind: 'fresh';
32
+ } | {
33
+ kind: 'raw-delta';
34
+ bytes: ArrayBuffer;
35
+ } | {
36
+ kind: 'artifact';
37
+ bytes: ArrayBuffer;
38
+ } | {
39
+ kind: 'artifact-file';
40
+ path: string;
41
+ };
42
+ interface OpenLayerMemoryBaseWorkerRequest {
43
+ kind: 'open.layerMemBase';
44
+ jobId: WorkerJobId;
45
+ docId: string;
46
+ /**
47
+ * Omit for a handle whose docId already uniquely identifies the layer
48
+ * session. Cloud layer sessions supply a real layer name when multiple
49
+ * layer views must live under one docId.
50
+ */
51
+ layerName?: string;
52
+ baseKey: string;
53
+ baseBytes: ArrayBuffer;
54
+ layer: LayerOpenSource;
55
+ password: string | null;
56
+ }
57
+ interface OpenLayerFileBaseWorkerRequest {
58
+ kind: 'open.layerFileBase';
59
+ jobId: WorkerJobId;
60
+ docId: string;
61
+ /**
62
+ * Omit for the base-view session. Supplying a name opens a separate
63
+ * layer session under the same docId.
64
+ */
65
+ layerName?: string;
66
+ baseKey: string;
67
+ basePath: string;
68
+ layer: LayerOpenSource;
69
+ password: string | null;
70
+ }
71
+ type OpenWorkerRequest = OpenFatMemoryWorkerRequest | OpenLayerMemoryBaseWorkerRequest | OpenLayerFileBaseWorkerRequest;
72
+ interface MetadataReadWorkerRequest {
73
+ kind: 'metadata.read';
74
+ jobId: WorkerJobId;
75
+ docId: string;
76
+ layerName?: string;
77
+ }
78
+ interface MetadataUpdateWorkerRequest {
79
+ kind: 'metadata.update';
80
+ jobId: WorkerJobId;
81
+ docId: string;
82
+ layerName?: string;
83
+ patch: MetadataPatch;
84
+ artifactPath?: string;
85
+ }
86
+ interface ActionsReadWorkerRequest {
87
+ kind: 'actions.read';
88
+ jobId: WorkerJobId;
89
+ docId: string;
90
+ layerName?: string;
91
+ }
92
+ interface AnnotationsListRawAllWorkerRequest {
93
+ kind: 'annotations.listRawAll';
94
+ jobId: WorkerJobId;
95
+ docId: string;
96
+ layerName?: string;
97
+ }
98
+ interface AnnotationsListRawPageWorkerRequest {
99
+ kind: 'annotations.listRawPage';
100
+ jobId: WorkerJobId;
101
+ docId: string;
102
+ layerName?: string;
103
+ pageObjectNumber: PageObjectNumber;
104
+ }
105
+ interface AnnotationsListFullPageWorkerRequest {
106
+ kind: 'annotations.listFullPage';
107
+ jobId: WorkerJobId;
108
+ docId: string;
109
+ layerName?: string;
110
+ pageObjectNumber: PageObjectNumber;
111
+ }
112
+ /**
113
+ * Batch-render every annotation appearance stream on a page. Acquires a
114
+ * `pagePtr`, iterates `/Annots`, and renders each annotation's `/AP` via
115
+ * `EPDF_RenderAnnotBitmap` into its own raster. Read-only; gated on the
116
+ * render capability like `pages.render`.
117
+ */
118
+ interface AnnotationsRenderAppearancesWorkerRequest {
119
+ kind: 'annotations.renderAppearances';
120
+ jobId: WorkerJobId;
121
+ docId: string;
122
+ layerName?: string;
123
+ pageObjectNumber: PageObjectNumber;
124
+ options?: AnnotationAppearanceRenderOptions;
125
+ }
126
+ interface AnnotationsCreateWorkerRequest {
127
+ kind: 'annotations.create';
128
+ jobId: WorkerJobId;
129
+ docId: string;
130
+ layerName?: string;
131
+ pageObjectNumber: PageObjectNumber;
132
+ /** WIRE form — binary fields hold `{ resource }` refs into {@link resources}. */
133
+ draft: WireAnnotationDraft;
134
+ /**
135
+ * Binary payloads referenced by the draft, keyed by resource key. The
136
+ * producer puts each `bytes` buffer on the wirePack transfer list
137
+ * (zero-copy, same convention as `PageRaster`).
138
+ */
139
+ resources?: WireResourceMap;
140
+ artifactPath?: string;
141
+ /**
142
+ * Identity to stamp on the newly created annotation:
143
+ * - `displayName` → /T (PDF author field)
144
+ * - `userId` / `groupId` → /EMBD_Metadata/{UserID,GroupID,CreatedBy,UpdatedBy}
145
+ * Optional — when absent (engine-local with no identity, anonymous tests),
146
+ * the worker still stamps the standard /M (modification date) but skips
147
+ * EMBD_Metadata.
148
+ */
149
+ actor?: AnnotationActor;
150
+ }
151
+ interface AnnotationsUpdateWorkerRequest {
152
+ kind: 'annotations.update';
153
+ jobId: WorkerJobId;
154
+ docId: string;
155
+ layerName?: string;
156
+ ref: AnnotationRef;
157
+ /** WIRE form — see {@link AnnotationsCreateWorkerRequest.draft}. */
158
+ patch: WireAnnotationPatch;
159
+ /** Binary payloads referenced by the patch — see the create request. */
160
+ resources?: WireResourceMap;
161
+ artifactPath?: string;
162
+ /**
163
+ * Identity of the editor. Drives /EMBD_Metadata/UpdatedBy refresh on
164
+ * update; preserves UserID/GroupID/CreatedBy. When absent, only /M
165
+ * is refreshed.
166
+ */
167
+ actor?: AnnotationActor;
168
+ }
169
+ interface AnnotationsDeleteWorkerRequest {
170
+ kind: 'annotations.delete';
171
+ jobId: WorkerJobId;
172
+ docId: string;
173
+ layerName?: string;
174
+ ref: AnnotationRef;
175
+ artifactPath?: string;
176
+ }
177
+ /**
178
+ * Batch annotation reorder. Refs are resolved on the worker BEFORE the
179
+ * move so the impact computation has a single before-state and one
180
+ * revision bump per batch.
181
+ */
182
+ interface AnnotationsMoveWorkerRequest {
183
+ kind: 'annotations.move';
184
+ jobId: WorkerJobId;
185
+ docId: string;
186
+ layerName?: string;
187
+ pageObjectNumber: PageObjectNumber;
188
+ refs: AnnotationRef[];
189
+ toIndex: number;
190
+ artifactPath?: string;
191
+ }
192
+ /**
193
+ * Complete reconciled form snapshot. Cheap between mutations: the worker
194
+ * caches the underlying EPDFForm model keyed on the session's mutation
195
+ * counter and rebuilds only after a write.
196
+ */
197
+ interface FormsListWorkerRequest {
198
+ kind: 'forms.list';
199
+ jobId: WorkerJobId;
200
+ docId: string;
201
+ layerName?: string;
202
+ }
203
+ interface FormsSetValueWorkerRequest {
204
+ kind: 'forms.setValue';
205
+ jobId: WorkerJobId;
206
+ docId: string;
207
+ layerName?: string;
208
+ ref: FormFieldRef;
209
+ value: FormFieldValue;
210
+ artifactPath?: string;
211
+ }
212
+ interface FormsResetWorkerRequest {
213
+ kind: 'forms.reset';
214
+ jobId: WorkerJobId;
215
+ docId: string;
216
+ layerName?: string;
217
+ ref: FormFieldRef;
218
+ artifactPath?: string;
219
+ }
220
+ interface FormsApplyEffectsWorkerRequest {
221
+ kind: 'forms.applyEffects';
222
+ jobId: WorkerJobId;
223
+ docId: string;
224
+ layerName?: string;
225
+ effects: FormEffect[];
226
+ artifactPath?: string;
227
+ }
228
+ interface FormsExportWorkerRequest {
229
+ kind: 'forms.export';
230
+ jobId: WorkerJobId;
231
+ docId: string;
232
+ layerName?: string;
233
+ format: FormDataFormat;
234
+ }
235
+ interface FormsImportWorkerRequest {
236
+ kind: 'forms.import';
237
+ jobId: WorkerJobId;
238
+ docId: string;
239
+ layerName?: string;
240
+ /** FDF or XFDF payload; goes on the wirePack transfer list (zero-copy). */
241
+ data: ArrayBuffer;
242
+ /** Sniffed from the bytes when omitted. */
243
+ format?: FormDataFormat;
244
+ artifactPath?: string;
245
+ }
246
+ interface FormsRepairWorkerRequest {
247
+ kind: 'forms.repair';
248
+ jobId: WorkerJobId;
249
+ docId: string;
250
+ layerName?: string;
251
+ bakeAppearances?: boolean;
252
+ artifactPath?: string;
253
+ }
254
+ interface FormsCreateFieldWorkerRequest {
255
+ kind: 'forms.createField';
256
+ jobId: WorkerJobId;
257
+ docId: string;
258
+ layerName?: string;
259
+ draft: FormFieldDraft;
260
+ artifactPath?: string;
261
+ }
262
+ interface FormsUpdateFieldWorkerRequest {
263
+ kind: 'forms.updateField';
264
+ jobId: WorkerJobId;
265
+ docId: string;
266
+ layerName?: string;
267
+ ref: FormFieldRef;
268
+ patch: FormFieldPatch;
269
+ artifactPath?: string;
270
+ }
271
+ interface FormsDeleteFieldWorkerRequest {
272
+ kind: 'forms.deleteField';
273
+ jobId: WorkerJobId;
274
+ docId: string;
275
+ layerName?: string;
276
+ ref: FormFieldRef;
277
+ artifactPath?: string;
278
+ }
279
+ interface FormsAttachWidgetWorkerRequest {
280
+ kind: 'forms.attachWidget';
281
+ jobId: WorkerJobId;
282
+ docId: string;
283
+ layerName?: string;
284
+ ref: FormFieldRef;
285
+ widget: FormWidgetRef;
286
+ onState?: string;
287
+ artifactPath?: string;
288
+ }
289
+ interface FormsDetachWidgetWorkerRequest {
290
+ kind: 'forms.detachWidget';
291
+ jobId: WorkerJobId;
292
+ docId: string;
293
+ layerName?: string;
294
+ ref: FormFieldRef;
295
+ widget: FormWidgetRef;
296
+ artifactPath?: string;
297
+ }
298
+ interface PagesListWorkerRequest {
299
+ kind: 'pages.list';
300
+ jobId: WorkerJobId;
301
+ docId: string;
302
+ layerName?: string;
303
+ }
304
+ /**
305
+ * Per-page plain-text extraction. Acquires a pagePtr and runs PDFium's
306
+ * `FPDFText_LoadPage` → `FPDFText_GetText` chain. Identical to
307
+ * `annotations.listFullPage` in shape; both are slow-path per-page
308
+ * reads keyed by indirect object number.
309
+ */
310
+ interface PagesTextWorkerRequest {
311
+ kind: 'pages.text';
312
+ jobId: WorkerJobId;
313
+ docId: string;
314
+ layerName?: string;
315
+ pageObjectNumber: PageObjectNumber;
316
+ }
317
+ interface PagesGeometryWorkerRequest {
318
+ kind: 'pages.geometry';
319
+ jobId: WorkerJobId;
320
+ docId: string;
321
+ layerName?: string;
322
+ pageObjectNumber: PageObjectNumber;
323
+ }
324
+ /**
325
+ * One budgeted search slice (see `DocumentSearchService`). Read-only: the
326
+ * worker's per-page corpus cache is version-keyed on the session mutation
327
+ * counter, so repeated slices between mutations reuse extracted text.
328
+ */
329
+ interface SearchQueryWorkerRequest {
330
+ kind: 'search.query';
331
+ jobId: WorkerJobId;
332
+ docId: string;
333
+ layerName?: string;
334
+ request: SearchRequest;
335
+ }
336
+ interface PagesRenderWorkerRequest {
337
+ kind: 'pages.render';
338
+ jobId: WorkerJobId;
339
+ docId: string;
340
+ layerName?: string;
341
+ pageObjectNumber: PageObjectNumber;
342
+ options?: PageRenderOptions;
343
+ }
344
+ /**
345
+ * One-shot file render — open the base document from a file path, render
346
+ * ONE page by display index, close. No session is bound (the ingestion
347
+ * `runAdHoc` pattern, like `document.probeSecurityFile`): this is the
348
+ * derived-artifact warmer's producer, used when no live document session
349
+ * exists yet. The payload reports the page's durable object number so the
350
+ * caller can key the artifact it persists.
351
+ */
352
+ interface DocumentRenderPageFileWorkerRequest {
353
+ kind: 'document.renderPageFile';
354
+ jobId: WorkerJobId;
355
+ path: string;
356
+ password: string | null;
357
+ /** Display index (0-based) — ingest knows "first page", not object numbers. */
358
+ pageIndex: number;
359
+ options?: PageRenderOptions;
360
+ }
361
+ interface PagesMoveWorkerRequest {
362
+ kind: 'pages.move';
363
+ jobId: WorkerJobId;
364
+ docId: string;
365
+ layerName?: string;
366
+ pageObjectNumbers: PageObjectNumber[];
367
+ destIndex: number;
368
+ artifactPath?: string;
369
+ }
370
+ interface PagesRotateWorkerRequest {
371
+ kind: 'pages.rotate';
372
+ jobId: WorkerJobId;
373
+ docId: string;
374
+ layerName?: string;
375
+ pageObjectNumbers: PageObjectNumber[];
376
+ /** Absolute rotation in degrees clockwise — see `PageRotateInput`. */
377
+ rotation: PageRotation;
378
+ artifactPath?: string;
379
+ }
380
+ interface PagesDeleteWorkerRequest {
381
+ kind: 'pages.delete';
382
+ jobId: WorkerJobId;
383
+ docId: string;
384
+ layerName?: string;
385
+ pageObjectNumbers: PageObjectNumber[];
386
+ artifactPath?: string;
387
+ }
388
+ interface PagesFlattenWorkerRequest {
389
+ kind: 'pages.flatten';
390
+ jobId: WorkerJobId;
391
+ docId: string;
392
+ layerName?: string;
393
+ pageObjectNumbers: PageObjectNumber[];
394
+ usage: PageFlattenUsage;
395
+ artifactPath?: string;
396
+ }
397
+ interface RedactionApplyWorkerRequest {
398
+ kind: 'redaction.apply';
399
+ jobId: WorkerJobId;
400
+ docId: string;
401
+ layerName?: string;
402
+ scope: RedactionApplyScope;
403
+ artifactPath?: string;
404
+ }
405
+ /** Export the given pages as a standalone PDF (a read — the source
406
+ * session is untouched, so no layer artifact rides the result). */
407
+ interface PagesExtractWorkerRequest {
408
+ kind: 'pages.extract';
409
+ jobId: WorkerJobId;
410
+ docId: string;
411
+ layerName?: string;
412
+ pageObjectNumbers: PageObjectNumber[];
413
+ }
414
+ /** List the document catalog's `/EmbeddedFiles` name tree (a read). */
415
+ interface AttachmentsListWorkerRequest {
416
+ kind: 'attachments.list';
417
+ jobId: WorkerJobId;
418
+ docId: string;
419
+ layerName?: string;
420
+ }
421
+ /**
422
+ * Decode one document-level embedded file (a read — no revision bump, no
423
+ * layer artifact). Two delivery modes, the `artifactPath?` pattern:
424
+ * `path` absent → browser mode, decoded bytes ride the transfer list;
425
+ * `path` present → server mode, the worker streams the decoded file to
426
+ * that path (`EPDFAttachment_ExtractFile` + `FPDF_FILEWRITE`) so the
427
+ * payload never crosses the thread boundary and HTTP can stream it from
428
+ * disk with backpressure.
429
+ */
430
+ interface AttachmentsReadFileWorkerRequest {
431
+ kind: 'attachments.readFile';
432
+ jobId: WorkerJobId;
433
+ docId: string;
434
+ layerName?: string;
435
+ ref: EmbeddedFileRef;
436
+ path?: string;
437
+ /** Decompression-bomb cap forwarded to the runtime. Absent/0 = unlimited. */
438
+ maxDecodedBytes?: number;
439
+ }
440
+ /**
441
+ * Create a document-level embedded file (a MUTATION — layer sessions
442
+ * persist an artifact). `file` is the same post-normalization wire shape
443
+ * the file-attachment annotation draft uses: metadata in JSON, bytes
444
+ * out-of-band under the referenced resource key. `file.name` becomes the
445
+ * name-tree key.
446
+ */
447
+ interface AttachmentsCreateWorkerRequest {
448
+ kind: 'attachments.create';
449
+ jobId: WorkerJobId;
450
+ docId: string;
451
+ layerName?: string;
452
+ file: WireAttachmentFile;
453
+ /** Binary payload referenced by `file.resource` — transfer-list bytes. */
454
+ resources?: WireResourceMap;
455
+ artifactPath?: string;
456
+ }
457
+ /** Delete a document-level embedded file by key (a MUTATION). */
458
+ interface AttachmentsDeleteWorkerRequest {
459
+ kind: 'attachments.delete';
460
+ jobId: WorkerJobId;
461
+ docId: string;
462
+ layerName?: string;
463
+ ref: EmbeddedFileRef;
464
+ artifactPath?: string;
465
+ }
466
+ /** Decode the file embedded in a FileAttachment annotation's `/FS`.
467
+ * Same read semantics and delivery modes as `attachments.readFile`. */
468
+ interface AnnotationsReadFileWorkerRequest {
469
+ kind: 'annotations.readFile';
470
+ jobId: WorkerJobId;
471
+ docId: string;
472
+ layerName?: string;
473
+ pageObjectNumber: PageObjectNumber;
474
+ ref: AnnotationRef;
475
+ path?: string;
476
+ /** Decompression-bomb cap forwarded to the runtime. Absent/0 = unlimited. */
477
+ maxDecodedBytes?: number;
478
+ }
479
+ /** Insert every page of a standalone PDF (transferable `bytes`) at
480
+ * `destIndex` (omitted → append). A structural MUTATION: layer sessions
481
+ * persist an artifact like move/rotate/delete. */
482
+ interface PagesInsertWorkerRequest {
483
+ kind: 'pages.insert';
484
+ jobId: WorkerJobId;
485
+ docId: string;
486
+ layerName?: string;
487
+ bytes: ArrayBuffer;
488
+ destIndex?: number;
489
+ artifactPath?: string;
490
+ }
491
+ /**
492
+ * `/PieceInfo` private application data (ISO 32000 §14.5). One job family
493
+ * serves both levels: `pageObjectNumber` present → the page's `/PieceInfo`,
494
+ * absent → the document catalog's — mirroring the native API symmetry.
495
+ * `update`/`clear` are mutations (a layer session persists an artifact);
496
+ * `read`/`applications` are plain reads.
497
+ */
498
+ interface PieceInfoReadWorkerRequest {
499
+ kind: 'pieceInfo.read';
500
+ jobId: WorkerJobId;
501
+ docId: string;
502
+ layerName?: string;
503
+ pageObjectNumber?: PageObjectNumber;
504
+ application: string;
505
+ }
506
+ interface PieceInfoUpdateWorkerRequest {
507
+ kind: 'pieceInfo.update';
508
+ jobId: WorkerJobId;
509
+ docId: string;
510
+ layerName?: string;
511
+ pageObjectNumber?: PageObjectNumber;
512
+ application: string;
513
+ patch: PieceInfoPatch;
514
+ artifactPath?: string;
515
+ }
516
+ interface PieceInfoApplicationsWorkerRequest {
517
+ kind: 'pieceInfo.applications';
518
+ jobId: WorkerJobId;
519
+ docId: string;
520
+ layerName?: string;
521
+ pageObjectNumber?: PageObjectNumber;
522
+ }
523
+ interface PieceInfoClearWorkerRequest {
524
+ kind: 'pieceInfo.clear';
525
+ jobId: WorkerJobId;
526
+ docId: string;
527
+ layerName?: string;
528
+ pageObjectNumber?: PageObjectNumber;
529
+ application: string;
530
+ artifactPath?: string;
531
+ }
532
+ interface DocumentSaveBufferWorkerRequest {
533
+ kind: 'document.saveBuffer';
534
+ jobId: WorkerJobId;
535
+ docId: string;
536
+ layerName?: string;
537
+ mode: PdfSaveMode;
538
+ }
539
+ interface DocumentSaveFileWorkerRequest {
540
+ kind: 'document.saveFile';
541
+ jobId: WorkerJobId;
542
+ docId: string;
543
+ layerName?: string;
544
+ mode: PdfSaveMode;
545
+ path: string;
546
+ }
547
+ /** Export JUST the layer artifact (the overlay diff) to a transferable buffer.
548
+ * Layer sessions only; the host rejects a base-only session. */
549
+ interface DocumentSaveLayerBufferWorkerRequest {
550
+ kind: 'document.saveLayerBuffer';
551
+ jobId: WorkerJobId;
552
+ docId: string;
553
+ layerName?: string;
554
+ }
555
+ interface DocumentSecurityProbeInfo {
556
+ encryptionState: 'unknown' | 'none' | 'encrypted' | 'unsupported';
557
+ encryptionRequiresPassword: boolean | null;
558
+ securityHandlerRevision: number | null;
559
+ pdfPermissionsBits: number | null;
560
+ pdfPermissionsAllAllowed: boolean | null;
561
+ pdfOpenedAs: 'none' | 'user' | 'owner' | null;
562
+ securityProbedAt: number | null;
563
+ }
564
+ interface DocumentProbeSecurityFileWorkerRequest {
565
+ kind: 'document.probeSecurityFile';
566
+ jobId: WorkerJobId;
567
+ path: string;
568
+ password: string | null;
569
+ }
570
+ interface DocumentCheckPasswordPermissionsWorkerRequest {
571
+ kind: 'document.checkPasswordPermissions';
572
+ jobId: WorkerJobId;
573
+ docId: string;
574
+ layerName?: string;
575
+ password: string;
576
+ mode?: 'any' | 'owner';
577
+ }
578
+ /**
579
+ * Register a runtime font on the host's PDFium thread. Carries the font bytes
580
+ * as a transferable `ArrayBuffer` (declared in the producer's transfer
581
+ * manifest, like `open.fatMem`). Runtime-global: not tied to any docId. The
582
+ * host keeps the volatile native `FontId` keyed by `fontKey`; the wire only
583
+ * ever references the stable `fontKey`.
584
+ */
585
+ interface FontsRegisterWorkerRequest {
586
+ kind: 'fonts.register';
587
+ jobId: WorkerJobId;
588
+ fontKey: string;
589
+ /** `""` → infer the base font name from the file. */
590
+ familyName: string;
591
+ /** `0` → infer the weight from the file. */
592
+ weight: number;
593
+ /** `-1` → infer / `0` non-italic / `1` italic. */
594
+ italic: number;
595
+ data: ArrayBuffer;
596
+ }
597
+ interface FontsAddFallbackWorkerRequest {
598
+ kind: 'fonts.addFallback';
599
+ jobId: WorkerJobId;
600
+ fontKey: string;
601
+ }
602
+ interface FontsClearFallbacksWorkerRequest {
603
+ kind: 'fonts.clearFallbacks';
604
+ jobId: WorkerJobId;
605
+ }
606
+ interface FontsClearWorkerRequest {
607
+ kind: 'fonts.clear';
608
+ jobId: WorkerJobId;
609
+ }
610
+ interface CloseWorkerRequest {
611
+ kind: 'close';
612
+ jobId: WorkerJobId;
613
+ docId: string;
614
+ }
615
+ /**
616
+ * Close exactly ONE layer session, leaving the base document, sibling
617
+ * layer sessions, and the caller's doc↔worker binding intact. Idempotent:
618
+ * closing an absent session is a no-op ack.
619
+ *
620
+ * This is the reload seam for layer-session freshness (the server closes
621
+ * a stale layer session and re-opens it from the current durable
622
+ * artifact) — `close` is the whole-document teardown, this is the
623
+ * layer-scoped sibling.
624
+ */
625
+ interface LayerCloseWorkerRequest {
626
+ kind: 'layer.close';
627
+ jobId: WorkerJobId;
628
+ docId: string;
629
+ layerName: string;
630
+ }
631
+ interface AbortWorkerRequest {
632
+ kind: 'abort';
633
+ jobId: WorkerJobId;
634
+ }
635
+ interface ShutdownWorkerRequest {
636
+ kind: 'shutdown';
637
+ jobId: WorkerJobId;
638
+ }
639
+ interface LayerArtifactWorkerPayload {
640
+ bytes: ArrayBuffer;
641
+ size: number;
642
+ }
643
+ /**
644
+ * Result of an attachment file read (`attachments.readFile` /
645
+ * `annotations.readFile`): the decoded file's metadata plus exactly one
646
+ * delivery mode, mirroring the request's `path?` — `bytes` on the
647
+ * transfer list (browser), or the `path` the worker wrote (server).
648
+ */
649
+ interface AttachmentFileWorkerPayload {
650
+ name: string;
651
+ mimeType?: string;
652
+ size: number;
653
+ bytes?: ArrayBuffer;
654
+ path?: string;
655
+ }
656
+ interface LayerArtifactFileWorkerPayload {
657
+ path: string;
658
+ }
659
+ type WorkerRequest = OpenWorkerRequest | MetadataReadWorkerRequest | MetadataUpdateWorkerRequest | ActionsReadWorkerRequest | AnnotationsListRawAllWorkerRequest | AnnotationsListRawPageWorkerRequest | AnnotationsListFullPageWorkerRequest | AnnotationsRenderAppearancesWorkerRequest | AnnotationsCreateWorkerRequest | AnnotationsUpdateWorkerRequest | AnnotationsDeleteWorkerRequest | AnnotationsMoveWorkerRequest | FormsListWorkerRequest | FormsSetValueWorkerRequest | FormsResetWorkerRequest | FormsApplyEffectsWorkerRequest | FormsExportWorkerRequest | FormsImportWorkerRequest | FormsRepairWorkerRequest | FormsCreateFieldWorkerRequest | FormsUpdateFieldWorkerRequest | FormsDeleteFieldWorkerRequest | FormsAttachWidgetWorkerRequest | FormsDetachWidgetWorkerRequest | PagesListWorkerRequest | PagesMoveWorkerRequest | PagesRotateWorkerRequest | PagesDeleteWorkerRequest | PagesFlattenWorkerRequest | RedactionApplyWorkerRequest | PagesExtractWorkerRequest | PagesInsertWorkerRequest | AttachmentsListWorkerRequest | AttachmentsReadFileWorkerRequest | AttachmentsCreateWorkerRequest | AttachmentsDeleteWorkerRequest | AnnotationsReadFileWorkerRequest | PieceInfoReadWorkerRequest | PieceInfoUpdateWorkerRequest | PieceInfoApplicationsWorkerRequest | PieceInfoClearWorkerRequest | PagesTextWorkerRequest | PagesGeometryWorkerRequest | PagesRenderWorkerRequest | SearchQueryWorkerRequest | DocumentSaveBufferWorkerRequest | DocumentSaveFileWorkerRequest | DocumentSaveLayerBufferWorkerRequest | DocumentProbeSecurityFileWorkerRequest | DocumentRenderPageFileWorkerRequest | DocumentCheckPasswordPermissionsWorkerRequest | FontsRegisterWorkerRequest | FontsAddFallbackWorkerRequest | FontsClearFallbacksWorkerRequest | FontsClearWorkerRequest | CloseWorkerRequest | LayerCloseWorkerRequest | AbortWorkerRequest | ShutdownWorkerRequest;
660
+ type WorkerResultPayload = {
661
+ tag: 'open';
662
+ docId: string;
663
+ security: DocumentSecurityProbeInfo;
664
+ } | {
665
+ tag: 'metadata.read';
666
+ metadata: DocumentMetadata;
667
+ } | {
668
+ tag: 'actions.read';
669
+ snapshot: DocumentActionsSnapshot;
670
+ } | {
671
+ tag: 'metadata.update';
672
+ result: MetadataUpdateResult;
673
+ artifact?: LayerArtifactWorkerPayload;
674
+ artifactFile?: LayerArtifactFileWorkerPayload;
675
+ } | {
676
+ tag: 'annotations.listRawAll';
677
+ snapshot: AnnotationListSnapshotAllPages;
678
+ } | {
679
+ tag: 'annotations.listRawPage';
680
+ snapshot: AnnotationListPageSnapshot;
681
+ } | {
682
+ tag: 'annotations.listFullPage';
683
+ snapshot: AnnotationListPageSnapshot;
684
+ } | {
685
+ tag: 'annotations.renderAppearances';
686
+ result: AnnotationAppearancesResult;
687
+ } | {
688
+ tag: 'annotations.create';
689
+ result: AnnotationCreateResult;
690
+ artifact?: LayerArtifactWorkerPayload;
691
+ artifactFile?: LayerArtifactFileWorkerPayload;
692
+ } | {
693
+ tag: 'annotations.update';
694
+ result: AnnotationUpdateResult;
695
+ artifact?: LayerArtifactWorkerPayload;
696
+ artifactFile?: LayerArtifactFileWorkerPayload;
697
+ } | {
698
+ tag: 'annotations.delete';
699
+ result: AnnotationDeleteResult;
700
+ artifact?: LayerArtifactWorkerPayload;
701
+ artifactFile?: LayerArtifactFileWorkerPayload;
702
+ } | {
703
+ tag: 'annotations.move';
704
+ result: AnnotationMoveResult;
705
+ artifact?: LayerArtifactWorkerPayload;
706
+ artifactFile?: LayerArtifactFileWorkerPayload;
707
+ } | {
708
+ tag: 'forms.list';
709
+ snapshot: FormSnapshot;
710
+ } | {
711
+ tag: 'forms.setValue';
712
+ result: FormSetValueResult;
713
+ artifact?: LayerArtifactWorkerPayload;
714
+ artifactFile?: LayerArtifactFileWorkerPayload;
715
+ } | {
716
+ tag: 'forms.reset';
717
+ result: FormSetValueResult;
718
+ artifact?: LayerArtifactWorkerPayload;
719
+ artifactFile?: LayerArtifactFileWorkerPayload;
720
+ } | {
721
+ tag: 'forms.applyEffects';
722
+ result: FormEffectsResult;
723
+ artifact?: LayerArtifactWorkerPayload;
724
+ artifactFile?: LayerArtifactFileWorkerPayload;
725
+ } | {
726
+ tag: 'forms.export';
727
+ format: FormDataFormat;
728
+ bytes: ArrayBuffer;
729
+ } | {
730
+ tag: 'forms.import';
731
+ result: FormImportResult;
732
+ artifact?: LayerArtifactWorkerPayload;
733
+ artifactFile?: LayerArtifactFileWorkerPayload;
734
+ } | {
735
+ tag: 'forms.repair';
736
+ result: FormRepairResult;
737
+ artifact?: LayerArtifactWorkerPayload;
738
+ artifactFile?: LayerArtifactFileWorkerPayload;
739
+ } | {
740
+ tag: 'forms.createField';
741
+ result: FormFieldCreateResult;
742
+ artifact?: LayerArtifactWorkerPayload;
743
+ artifactFile?: LayerArtifactFileWorkerPayload;
744
+ } | {
745
+ tag: 'forms.updateField';
746
+ result: FormFieldUpdateResult;
747
+ artifact?: LayerArtifactWorkerPayload;
748
+ artifactFile?: LayerArtifactFileWorkerPayload;
749
+ } | {
750
+ tag: 'forms.deleteField';
751
+ result: FormFieldDeleteResult;
752
+ artifact?: LayerArtifactWorkerPayload;
753
+ artifactFile?: LayerArtifactFileWorkerPayload;
754
+ } | {
755
+ tag: 'forms.attachWidget';
756
+ result: FormWidgetLinkResult;
757
+ artifact?: LayerArtifactWorkerPayload;
758
+ artifactFile?: LayerArtifactFileWorkerPayload;
759
+ } | {
760
+ tag: 'forms.detachWidget';
761
+ result: FormWidgetLinkResult;
762
+ artifact?: LayerArtifactWorkerPayload;
763
+ artifactFile?: LayerArtifactFileWorkerPayload;
764
+ } | {
765
+ tag: 'pages.list';
766
+ snapshot: PageListSnapshot;
767
+ } | {
768
+ tag: 'pages.move';
769
+ result: PageMoveResult;
770
+ artifact?: LayerArtifactWorkerPayload;
771
+ artifactFile?: LayerArtifactFileWorkerPayload;
772
+ } | {
773
+ tag: 'pages.rotate';
774
+ result: PageRotateResult;
775
+ artifact?: LayerArtifactWorkerPayload;
776
+ artifactFile?: LayerArtifactFileWorkerPayload;
777
+ } | {
778
+ tag: 'pages.delete';
779
+ result: PageDeleteResult;
780
+ artifact?: LayerArtifactWorkerPayload;
781
+ artifactFile?: LayerArtifactFileWorkerPayload;
782
+ } | {
783
+ tag: 'pages.flatten';
784
+ result: PageFlattenResult;
785
+ artifact?: LayerArtifactWorkerPayload;
786
+ artifactFile?: LayerArtifactFileWorkerPayload;
787
+ } | {
788
+ tag: 'redaction.apply';
789
+ result: RedactionApplyResult;
790
+ artifact?: LayerArtifactWorkerPayload;
791
+ artifactFile?: LayerArtifactFileWorkerPayload;
792
+ } | {
793
+ tag: 'pages.extract';
794
+ bytes: ArrayBuffer;
795
+ size: number;
796
+ } | {
797
+ tag: 'attachments.list';
798
+ items: EmbeddedFileItem[];
799
+ } | {
800
+ tag: 'attachments.readFile';
801
+ content: AttachmentFileWorkerPayload;
802
+ } | {
803
+ tag: 'attachments.create';
804
+ result: AttachmentCreateResult;
805
+ artifact?: LayerArtifactWorkerPayload;
806
+ artifactFile?: LayerArtifactFileWorkerPayload;
807
+ } | {
808
+ tag: 'attachments.delete';
809
+ result: AttachmentDeleteResult;
810
+ artifact?: LayerArtifactWorkerPayload;
811
+ artifactFile?: LayerArtifactFileWorkerPayload;
812
+ } | {
813
+ tag: 'annotations.readFile';
814
+ content: AttachmentFileWorkerPayload;
815
+ } | {
816
+ tag: 'pages.insert';
817
+ result: PageInsertResult;
818
+ artifact?: LayerArtifactWorkerPayload;
819
+ artifactFile?: LayerArtifactFileWorkerPayload;
820
+ } | {
821
+ tag: 'pieceInfo.read';
822
+ snapshot: PieceInfoSnapshot | null;
823
+ } | {
824
+ tag: 'pieceInfo.update';
825
+ artifact?: LayerArtifactWorkerPayload;
826
+ artifactFile?: LayerArtifactFileWorkerPayload;
827
+ } | {
828
+ tag: 'pieceInfo.applications';
829
+ applications: string[];
830
+ } | {
831
+ tag: 'pieceInfo.clear';
832
+ artifact?: LayerArtifactWorkerPayload;
833
+ artifactFile?: LayerArtifactFileWorkerPayload;
834
+ } | {
835
+ tag: 'pages.text';
836
+ snapshot: PageTextSnapshot;
837
+ } | {
838
+ tag: 'pages.geometry';
839
+ snapshot: PageGeometrySnapshot;
840
+ } | {
841
+ tag: 'pages.render';
842
+ raster: PageRaster;
843
+ } | {
844
+ tag: 'search.query';
845
+ slice: SearchSlice;
846
+ } | {
847
+ tag: 'document.saveBuffer';
848
+ bytes: ArrayBuffer;
849
+ size: number;
850
+ } | {
851
+ tag: 'document.saveLayerBuffer';
852
+ bytes: ArrayBuffer;
853
+ size: number;
854
+ } | {
855
+ tag: 'document.saveFile';
856
+ path: string;
857
+ } | {
858
+ tag: 'document.probeSecurityFile';
859
+ security: DocumentSecurityProbeInfo;
860
+ } | {
861
+ tag: 'document.renderPageFile';
862
+ /** Durable page identity of the rendered index — the artifact key's pon. */
863
+ pageObjectNumber: PageObjectNumber;
864
+ pageCount: number;
865
+ raster: PageRaster;
866
+ } | {
867
+ tag: 'document.checkPasswordPermissions';
868
+ security: DocumentSecurityProbeInfo;
869
+ } | {
870
+ tag: 'fonts.register';
871
+ fontKey: string;
872
+ } | {
873
+ tag: 'fonts.addFallback';
874
+ } | {
875
+ tag: 'fonts.clearFallbacks';
876
+ } | {
877
+ tag: 'fonts.clear';
878
+ } | {
879
+ tag: 'close';
880
+ } | {
881
+ tag: 'shutdown';
882
+ };
883
+ type WorkerResponse = {
884
+ kind: 'resolve';
885
+ jobId: WorkerJobId;
886
+ result: WorkerResultPayload;
887
+ } | {
888
+ kind: 'reject';
889
+ jobId: WorkerJobId;
890
+ error: SerializedEngineError;
891
+ };
892
+ type WorkerLifecycleMessage = {
893
+ kind: 'ready';
894
+ } | {
895
+ kind: 'init-error';
896
+ error: string;
897
+ };
898
+ //#endregion
899
+ //#region src/engine/document-security-state.d.ts
900
+ interface DocumentHeadLike {
901
+ encryption: {
902
+ state: DocumentSecurityState['encryption']['state'];
903
+ requiresPassword: boolean | null;
904
+ };
905
+ permissions: DocumentSecurityState['permissions'];
906
+ access: DocumentSecurityState['access'];
907
+ }
908
+ declare function securityStateFromHead(head: DocumentHeadLike): DocumentSecurityState;
909
+ declare function permissionInfoFromProbe(info: DocumentSecurityProbeInfo): PdfPermissionInfo | null;
910
+ /**
911
+ * Same as {@link permissionInfoFromProbe} but additionally populates
912
+ * `flags` (typed PdfBits view) and `advisory` (capability-shaped
913
+ * booleans for UI badges). Used by routes that have a decoded `PdfBits`
914
+ * in hand — notably `/access`, which always does.
915
+ *
916
+ * Returns `null` for the same reason as the base function — when the
917
+ * PDF hasn't been probed yet so bits are unknown.
918
+ */
919
+ declare function permissionInfoWithAdvisory(info: DocumentSecurityProbeInfo, pdfBits: PdfBits): PdfPermissionInfo | null;
920
+ /**
921
+ * Translate a {@link PdfBits} view into the capability-shaped
922
+ * {@link PdfPermissionAdvisory}. The rules here MUST mirror the bit
923
+ * combinations the scope resolver uses for `pdf.permissions`
924
+ * expansion — `doc.print.high` requires bit 12 AND bit 3, etc.
925
+ */
926
+ declare function advisoryFromPdfBits(b: PdfBits): PdfPermissionAdvisory;
927
+ declare function securityStateFromProbe(info: DocumentSecurityProbeInfo, opts?: {
928
+ accessEndpoint?: string;
929
+ cdnRequired?: boolean;
930
+ }): DocumentSecurityState;
931
+ //#endregion
932
+ //#region src/wire/WirePack.d.ts
933
+ /**
934
+ * Wire-level packaging for messages crossing a Web Worker / Node
935
+ * `worker_thread` boundary.
936
+ *
937
+ * `WirePack<P>` is the typed pair every producer hands to a transport:
938
+ * the structured payload (validated against the wire schema) and an
939
+ * explicit, ordered list of `Transferable` objects that the producer
940
+ * intends to move (zero-copy) to the receiver.
941
+ *
942
+ * Why this is a first-class type and not a transport-side argument:
943
+ *
944
+ * - **Producer is the only one who knows.** Whether a particular
945
+ * `ArrayBuffer` should be moved (zero-copy, sender's reference
946
+ * detached) or copied (structured-cloned, both sides retain
947
+ * access) is a semantic decision belonging to the code that
948
+ * produced the buffer. Inferring it later — by walking the
949
+ * payload looking for `ArrayBuffer` instances and assuming they
950
+ * should all be transferred — is the v2 footgun this design
951
+ * replaces.
952
+ *
953
+ * - **Type-checked at the boundary.** A handler returning
954
+ * `WirePack<RenderResult>` cannot forget to declare its
955
+ * transfer list; the producer literally writes
956
+ * `wirePack({ ..., pixels }, [pixels.buffer])` in a single
957
+ * return statement. Forgetting yields a structurally identical
958
+ * copy (slow but correct), never a silent leak.
959
+ *
960
+ * - **Symmetric across the boundary.** Same `WirePack<P>` on the
961
+ * request path (main → worker) and the response path (worker →
962
+ * main). Inline transports treat `transfer` as a no-op since
963
+ * there's no thread boundary to cross.
964
+ *
965
+ * - **Schema-orthogonal.** Zod schemas validate `payload` and
966
+ * nothing else. `transfer` is not data; it's a memory-ownership
967
+ * manifest, and the design keeps those concerns separate.
968
+ *
969
+ * The receiver of a `postMessage(payload, { transfer })` call gets
970
+ * the payload back **with the listed buffers already moved into it**
971
+ * — there's no second argument on the receiving end. So `WirePack`
972
+ * only ever travels the producer-to-transport leg of the trip; the
973
+ * consumer side just sees the unwrapped `payload`.
974
+ */
975
+ interface WirePack<P> {
976
+ readonly payload: P;
977
+ readonly transfer: readonly Transferable[];
978
+ }
979
+ /**
980
+ * Singleton empty transfer list. Frozen so accidental in-place
981
+ * mutation throws in strict mode rather than silently mutating the
982
+ * default for future calls.
983
+ */
984
+ declare const EMPTY_TRANSFER: readonly Transferable[];
985
+ /**
986
+ * Producer-side helper: pair a typed payload with its transfer list.
987
+ *
988
+ * The `transfer` argument is optional; omitting it (or passing `[]`)
989
+ * is the explicit, type-checked way to say "I declare this message
990
+ * carries no transferables." That's structurally identical to the
991
+ * shape the v2 walker generated for non-binary messages, but here
992
+ * the declaration is at construction time, in the producer's own
993
+ * code, where the knowledge actually lives.
994
+ *
995
+ * wirePack({ kind: 'metadata.read', jobId, docId })
996
+ * wirePack({ kind: 'open.fatMem', jobId, docId, bytes }, [bytes])
997
+ * wirePack({ tag: 'page.render', pixels }, [pixels.buffer])
998
+ */
999
+ declare function wirePack<P>(payload: P, transfer?: readonly Transferable[]): WirePack<P>;
1000
+ //#endregion
1001
+ export { ANNOTATION_SUBTYPES, AbortError, type AbortWorkerRequest, type AbortableExecutor, AbortablePromise, type ActionReadBudget, type ActionsReadWorkerRequest, type AnnotationActor, type AnnotationAppearanceImage, type AnnotationAppearanceImageOptions, type AnnotationAppearanceImagesResult, type AnnotationAppearanceManifest, type AnnotationAppearanceManifestEntry, type AnnotationAppearanceMode, type AnnotationAppearanceRaster, type AnnotationAppearanceRenderOptions, type AnnotationAppearancesQuery, type AnnotationAppearancesResult, type AnnotationBase, type AnnotationBorderStyle, type AnnotationCreateResult, type AnnotationDTO, type AnnotationDeleteResult, type AnnotationDraft, type AnnotationDraftBase, type AnnotationFlags, type AnnotationIdentityQuality, type AnnotationKind, type AnnotationKindModule, type AnnotationListMutationMeta, type AnnotationListPageSnapshot, type AnnotationListSnapshotAllPages, type AnnotationMoveResult, type AnnotationMutationKind, type AnnotationPatch, type AnnotationPatchBase, type AnnotationRef, type AnnotationRelationKind, type AnnotationReplyType, type AnnotationStableId, type AnnotationSubtype, type AnnotationSubtypeOfKind, type AnnotationThread, type AnnotationUpdateResult, type AnnotationsCreateWorkerRequest, type AnnotationsDeleteWorkerRequest, type AnnotationsListFullPageWorkerRequest, type AnnotationsListRawAllWorkerRequest, type AnnotationsListRawPageWorkerRequest, type AnnotationsMoveWorkerRequest, type AnnotationsReadFileWorkerRequest, type AnnotationsRenderAppearancesWorkerRequest, type AnnotationsUpdateWorkerRequest, type AppearanceAction, type AppearanceImpact, type AppearanceOutcome, type AttachmentContent, type AttachmentCreateResult, type AttachmentDeleteResult, type AttachmentFileBase, type AttachmentFileInfo, type AttachmentFileSource, type AttachmentFileWorkerPayload, type AttachmentsCache, type AttachmentsCreateWorkerRequest, type AttachmentsDeleteWorkerRequest, type AttachmentsListWorkerRequest, type AttachmentsReadFileWorkerRequest, type BinaryMetadata, type BinaryMimeType, type BinaryPayload, type BinarySource, type BlendMode, CONTINUOUS_RENDER_POLICY, type CacheDelta, type CachePins, type CalloutLine, type CaretAnnotationDTO, type CaretDraft, type CaretIntent, type CaretPatch, type CdnAccessInfo, type CdnAdapter, type CheckboxFieldDTO, type CheckboxFieldDraft, type CheckboxFieldPatch, type CircleAnnotationDTO, type CircleDraft, type CirclePatch, type CloseWorkerRequest, type CollabAction, type CollabEntity, type CollabFilter, type CollabTarget, type Color, type ColorStyleDraftFields, type ColorStyleFields, type ColorStylePatchFields, type ComboBoxFieldDTO, type ComboBoxFieldDraft, type ComboBoxFieldPatch, DEFAULT_PDF_SAVE_MODE, type DTOOfKind, type DocCapability, type DocumentAccessInfo, type DocumentAccessReason, type DocumentActionsService, type DocumentActionsSnapshot, type DocumentAnnotationsService, type DocumentAttachmentsService, type DocumentCapabilities, type DocumentCheckPasswordPermissionsWorkerRequest, type DocumentEncryptionState, type DocumentEvent, type DocumentEventInit, type DocumentEventStream, type DocumentEventType, type DocumentFormsService, type DocumentHandle, type IdentityClaims as DocumentIdentity, type IdentityClaims, type DocumentManifest, type DocumentMetadata, type DocumentMetadataTrapped, type DocumentOpenMode, type DocumentPagesService, type DocumentProbeSecurityFileWorkerRequest, type DocumentRedactionService, type DocumentRenderPageFileWorkerRequest, type DocumentRenderService, type DocumentSaveBufferWorkerRequest, type DocumentSaveFileWorkerRequest, type DocumentSaveLayerBufferWorkerRequest, type DocumentSearchService, type DocumentSecurityProbeInfo, type DocumentSecurityService, type DocumentSecurityState, type DocumentUnlockInput, type DocumentUnlockResult, type DraftOfKind, EMPTY_TRANSFER, type EmbeddedFileItem, type EmbeddedFileRef, type Engine, EngineError, EngineErrorCode, type EngineErrorOptions, type EngineFactory, type EngineRenderPolicy, type EventOrigin, type FileAttachmentAnnotationDTO, type FileAttachmentDraft, type FileAttachmentIcon, type FileAttachmentPatch, type FileAttachmentWireDraft, type FilledStyleDraftFields, type FilledStyleFields, type FilledStylePatchFields, type FoldOptions, type FoldedText, type FontHandle, type FontKey, type FontService, type FontSpec, type FontsAddFallbackWorkerRequest, type FontsClearFallbacksWorkerRequest, type FontsClearWorkerRequest, type FontsRegisterWorkerRequest, type FormDataExport, type FormDataFormat, type FormEffect, type FormEffectResult, type FormEffectStatus, type FormEffectsResult, type FormFieldBase, type FormFieldCreateResult, type FormFieldDTO, type FormFieldDeleteResult, type FormFieldDisplay, type FormFieldDraft, type FormFieldFamily, type FormFieldFlags, type FormFieldOption, type FormFieldOptionInput, type FormFieldOrigin, type FormFieldPatch, type FormFieldRef, type FormFieldUpdateResult, type FormFieldValue, type FormImportResult, type FormKind, type FormRepairOptions, type FormRepairResult, type FormSetValueResult, type FormSnapshot, type FormValueEntry, type FormWidgetLinkResult, type FormWidgetRef, type FormsApplyEffectsWorkerRequest, type FormsAttachWidgetWorkerRequest, type FormsCreateFieldWorkerRequest, type FormsDeleteFieldWorkerRequest, type FormsDetachWidgetWorkerRequest, type FormsExportWorkerRequest, type FormsImportWorkerRequest, type FormsListWorkerRequest, type FormsRepairWorkerRequest, type FormsResetWorkerRequest, type FormsSetValueWorkerRequest, type FormsUpdateFieldWorkerRequest, type FreeTextAnnotationDTO, type FreeTextDraft, type FreeTextFont, type FreeTextIntent, type FreeTextPatch, type GeometryStyleDraftFields, type GeometryStyleFields, type GeometryStylePatchFields, type HighlightAnnotationDTO, type HighlightDraft, type HighlightPatch, type InkAnnotationDTO, type InkDraft, type InkIntent, type InkList, type InkPatch, type InkStroke, InvalidScope, type LayerArtifactFileWorkerPayload, type LayerArtifactWorkerPayload, type LayerCloseWorkerRequest, type LayerOpenSource, type LayerScopePlane, type LayerScopes, type LineAnnotationDTO, type LineDraft, type LineEnding, type LineEndings, type LinePatch, type LinePoints, type LinkAnnotationDTO, type LinkDraft, type LinkPatch, type ListBoxFieldDTO, type ListBoxFieldDraft, type ListBoxFieldPatch, type ManifestPage, type MetadataCache, type MetadataPatch, type MetadataReadWorkerRequest, type MetadataService, type MetadataUpdateResult, type MetadataUpdateWorkerRequest, MissingIdentity, type MutationMeta, NO_ANNOTATION_FLAGS, type NamedJavaScriptAction, type NormalizedDraft, type NormalizedPatch, type NoteIcon, type OpenFatMemoryWorkerRequest, type OpenInput, type OpenInputById, type OpenInputBytes, type OpenInputLayerBytes, type OpenInputLayerSource, type OpenInputToken, type OpenLayerFileBaseWorkerRequest, type OpenLayerMemoryBaseWorkerRequest, type OpenOptions, type OpenWorkerRequest, PDF_BITS, PDF_CODE_TO_SUBTYPE, PDF_SUBTYPE_TO_CODE, type PageAnnotationsService, type PageBoxes, type PageDeleteInput, type PageDeleteResult, type PageFlattenInput, type PageFlattenItemResult, type PageFlattenResult, type PageFlattenStatus, type PageFlattenUsage, type PageGeometryGlyph, type PageGeometryRun, type PageGeometryService, type PageGeometrySnapshot, type PageHandle, type PageImageBlobSource, type PageImageHandle, type PageImageObjectUrl, type PageImageOptions, type PageImageResult, type PageImageSource, type PageInsertResult, type PageLayout, type PageListSnapshot, type PageMoveCache, type PageMoveInput, type PageMoveResult, type PageNetworkRenderFormat, type PageObjectNumber, type PageRaster, type PageRenderBackground, type PageRenderEncodedFormat, type PageRenderFormat, type PageRenderOptions, type PageRenderQuery, type PageRenderService, type PageRenderTarget, type PageRenderViewport, type PageRotateInput, type PageRotateResult, type PageRotation, type PageState, type PageStructureCache, type PageTextService, type PageTextSnapshot, type PagesDeleteWorkerRequest, type PagesExtractWorkerRequest, type PagesFlattenWorkerRequest, type PagesGeometryWorkerRequest, type PagesInsertWorkerRequest, type PagesListWorkerRequest, type PagesMoveWorkerRequest, type PagesRenderWorkerRequest, type PagesRotateWorkerRequest, type PagesTextWorkerRequest, type ParsedCapability, type ParsedCollab, type ParsedScope, type ParsedVirtual, type ParsedWildcard, type PasswordPrompt, type PatchOfKind, type PdfActionNode, type PdfActionTree, type PdfActionType, type PdfActionWarning, type PdfAnnotationActions, PdfAnnotationSubtypeCode, type PdfBits, type PdfDestination, type PdfFieldActions, type PdfLinkTarget, type PdfLinkTargetWritable, type PdfOriginSize, type PdfPageActions, type PdfPermissionAdvisory, type PdfPermissionInfo, type PdfPoint, type PdfQuad, type PdfQuadCorners, type PdfRect, type PdfRectDifferences, type PdfRotation, type PdfSaveMode, type PdfSize, PermissionDenied, type PieceInfoApplicationsWorkerRequest, type PieceInfoClearWorkerRequest, type PieceInfoEntry, type PieceInfoPatch, type PieceInfoPatchValue, type PieceInfoReadWorkerRequest, type PieceInfoService, type PieceInfoSnapshot, type PieceInfoUpdateWorkerRequest, type Point, type PolygonAnnotationDTO, type PolygonDraft, type PolygonPatch, type PolylineAnnotationDTO, type PolylineDraft, type PolylinePatch, type PushButtonFieldDTO, type RadioFieldDTO, type RadioFieldDraft, type RadioFieldPatch, type Rect, type RedactAnnotationDTO, type RedactDraft, type RedactPatch, type RedactionApplyItemResult, type RedactionApplyResult, type RedactionApplyScope, type RedactionApplyStatus, type RedactionApplyWorkerRequest, type RefetchReason, type ResourceRef, type RevisionToken, type Rotation, SEARCH_FOLD_VERSION, SEARCH_REGEX_MAX_LENGTH, SEARCH_SNIPPET_CONTEXT, type SearchMatch, type SearchMatchRange, type SearchMode, type SearchQuery, type SearchQueryIssue, type SearchQueryValidation, type SearchQueryWorkerRequest, type SearchRegexIssue, type SearchRegexValidation, type SearchRequest, type SearchSlice, type SearchSliceBudget, type SearchSnippet, type SerializedEngineError, type ShapeAnnotationFields, type ShapeDraftFields, type ShapePatchFields, type ShutdownWorkerRequest, type SignatureFieldDTO, type Size, type SquareAnnotationDTO, type SquareDraft, type SquarePatch, type SquigglyAnnotationDTO, type SquigglyDraft, type SquigglyPatch, type StampAnnotationDTO, type StampDraft, type StampFit, type StampPatch, type StampWireDraft, type StampWirePatch, type StandardFont, type StrikeoutAnnotationDTO, type StrikeoutDraft, type StrikeoutIntent, type StrikeoutPatch, type TextAlignment, type TextAnnotationDTO, type TextDraft, type TextFieldDTO, type TextFieldDraft, type TextFieldPatch, type TextPatch, type ToggleFieldWidget, type TokenSource, UNKNOWN_WEAK_ANNOTATION_STATE, type UnderlineAnnotationDTO, type UnderlineDraft, type UnderlinePatch, type UnknownFieldDTO, type UnsupportedAnnotationDTO, type UnsupportedDraft, type UnsupportedPatch, type VertexAnnotationFields, type VertexDraftFields, type VertexPatchFields, type WeakAnnotationEditSession, type WeakAnnotationState, type WidgetAnnotationDTO, type WidgetAppearance, type WidgetDraft, type WidgetPatch, type WidgetPlacement, type WidgetStyleDraftFields, type WidgetStyleFields, type WidgetStylePatchFields, type WireAnnotationDraft, type WireAnnotationPatch, type WireAttachmentFile, type WirePack, type WireResource, type WireResourceMap, type WorkerJobId, type WorkerLifecycleMessage, type WorkerRequest, type WorkerResponse, type WorkerResultPayload, advisoryFromPdfBits, appearanceImpactOf, buildSnippet, buildThreads, canonicalSearchQuery, caps, changesAnnotationList, checkAnyCapability, checkCapability, checkCollab, checkSetGroup, classifyRelation, collab, createPageImageHandle, decodeFieldRefKey, decodePdfBits, decodeStableIdKey, deserializeError, encodeFieldRefKey, encodeStableIdKey, expandRawScope, expandedCapabilities, filterMatches, foldOptionsFor, foldText, invalidatesWeakIndexRefs, isAbortError, isValidPageObjectNumber, knownWeakAnnotationState, matchLiteral, matchPageText, matchRegex, materializePdfPermissions, normalizeAnnotationDraft, normalizeAnnotationPatch, normalizeAttachmentFileSource, normalizePdfRect, parseScope, passwordPromptFromState, pdfPermissions, pdfQuadBounds, pdfQuadCorners, pdfQuadFromCorners, pdfRectFromOriginSize, pdfRectHeight, pdfRectSize, pdfRectToOriginSize, pdfRectWidth, permissionInfoFromProbe, permissionInfoWithAdvisory, refKey, resolveBinarySource, revisionTokensEqual, searchContentEpoch, searchRectsForRange, securityStateFromHead, securityStateFromProbe, semanticEqual, serializeError, shiftsExistingAnnotationIndices, snapAppearanceScale, snapFullPageViewport, snapTileScale, sniffBinaryMetadata, subtypeFromCode, toOriginalRange, validateScopeArray, validateSearchQuery, validateSearchRegex, wirePack, wordAt, wordBefore };
1002
+ //# sourceMappingURL=runtime.d.cts.map