@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.
Files changed (64) hide show
  1. package/dist/{AbortError-8-9JAX1Y.js → AbortError-DwuHPK_I.js} +2 -2
  2. package/dist/{AbortError-8-9JAX1Y.js.map → AbortError-DwuHPK_I.js.map} +1 -1
  3. package/dist/{AbortError-CRSooKsk.cjs → AbortError-P0RU0Mgg.cjs} +4 -4
  4. package/dist/{AbortError-CRSooKsk.cjs.map → AbortError-P0RU0Mgg.cjs.map} +1 -1
  5. package/dist/{AnnotationListSnapshot-x6tKulNV.d.cts → AnnotationListSnapshot-D9R5n2Kf.d.cts} +1390 -176
  6. package/dist/{AnnotationListSnapshot-x6tKulNV.d.ts → AnnotationListSnapshot-D9R5n2Kf.d.ts} +1390 -176
  7. package/dist/{DocumentSecurityService-CK0pejAK.d.cts → DocumentSecurityService-CIx1MT0T.d.cts} +2 -2
  8. package/dist/{DocumentSecurityService-9MawYxP-.d.ts → DocumentSecurityService-Ca6EK3-3.d.ts} +2 -2
  9. package/dist/{Engine--0XF0UAK.d.cts → Engine-EWWHhEIi.d.ts} +179 -11
  10. package/dist/{Engine-Ds0ytbl6.d.ts → Engine-FNaAEjfb.d.cts} +179 -11
  11. package/dist/conformance.cjs +1441 -88
  12. package/dist/conformance.cjs.map +1 -1
  13. package/dist/conformance.d.cts +74 -3
  14. package/dist/conformance.d.ts +74 -3
  15. package/dist/conformance.js +1376 -25
  16. package/dist/conformance.js.map +1 -1
  17. package/dist/derive-BbsDk_Kz.cjs +880 -0
  18. package/dist/derive-BbsDk_Kz.cjs.map +1 -0
  19. package/dist/derive-DAFJolWu.js +647 -0
  20. package/dist/derive-DAFJolWu.js.map +1 -0
  21. package/dist/{PageInsertBlankInput-WKY0tr6S.js → format-Bbphf4zR.js} +95 -3
  22. package/dist/format-Bbphf4zR.js.map +1 -0
  23. package/dist/{PageInsertBlankInput-CzShuSJI.cjs → format-D_epWlob.cjs} +106 -2
  24. package/dist/format-D_epWlob.cjs.map +1 -0
  25. package/dist/index.cjs +137 -88
  26. package/dist/index.d.cts +2 -2
  27. package/dist/index.d.ts +2 -2
  28. package/dist/index.js +5 -5
  29. package/dist/{resolver-D-jumvgM.cjs → resolver-CYVNV4hn.cjs} +216 -10
  30. package/dist/resolver-CYVNV4hn.cjs.map +1 -0
  31. package/dist/{resolver-CHG4waXL.js → resolver-inAVzsWt.js} +157 -11
  32. package/dist/resolver-inAVzsWt.js.map +1 -0
  33. package/dist/runtime.cjs +147 -98
  34. package/dist/runtime.cjs.map +1 -1
  35. package/dist/runtime.d.cts +216 -5
  36. package/dist/runtime.d.ts +216 -5
  37. package/dist/runtime.js +6 -6
  38. package/dist/{schemas-DOyVEPk7.js → schemas-CFQGvWiu.js} +551 -5
  39. package/dist/schemas-CFQGvWiu.js.map +1 -0
  40. package/dist/{schemas-RChsAMWw.cjs → schemas-D0g6tKa9.cjs} +829 -25
  41. package/dist/schemas-D0g6tKa9.cjs.map +1 -0
  42. package/dist/{builders-8Hl1AYNU.cjs → viewport-BWeNHZmb.cjs} +1522 -117
  43. package/dist/viewport-BWeNHZmb.cjs.map +1 -0
  44. package/dist/{builders-DOjcKDWQ.js → viewport-CvMcadfQ.js} +1386 -89
  45. package/dist/viewport-CvMcadfQ.js.map +1 -0
  46. package/dist/wire.cjs +252 -13
  47. package/dist/wire.cjs.map +1 -1
  48. package/dist/wire.d.cts +3147 -5
  49. package/dist/wire.d.ts +3147 -5
  50. package/dist/wire.js +207 -14
  51. package/dist/wire.js.map +1 -1
  52. package/package.json +1 -1
  53. package/dist/PageInsertBlankInput-CzShuSJI.cjs.map +0 -1
  54. package/dist/PageInsertBlankInput-WKY0tr6S.js.map +0 -1
  55. package/dist/builders-8Hl1AYNU.cjs.map +0 -1
  56. package/dist/builders-DOjcKDWQ.js.map +0 -1
  57. package/dist/fold-BfyxxwS6.js +0 -334
  58. package/dist/fold-BfyxxwS6.js.map +0 -1
  59. package/dist/fold-C7I5GpBz.cjs +0 -447
  60. package/dist/fold-C7I5GpBz.cjs.map +0 -1
  61. package/dist/resolver-CHG4waXL.js.map +0 -1
  62. package/dist/resolver-D-jumvgM.cjs.map +0 -1
  63. package/dist/schemas-DOyVEPk7.js.map +0 -1
  64. package/dist/schemas-RChsAMWw.cjs.map +0 -1
@@ -1,5 +1,5 @@
1
- import { An as HighlightDraft, Bl as DocumentMetadata, Ps as CharMapAnchor, _l as LinePoints, bl as PdfRect, hl as InkList, n as AnnotationListSnapshotAllPages, t as AnnotationListPageSnapshot, vl as PdfPoint } from "./AnnotationListSnapshot-x6tKulNV.cjs";
2
- import { t as Engine } from "./Engine--0XF0UAK.cjs";
1
+ import { An as HighlightDraft, Bd as PdfPoint, Hd as PdfRect, Ld as InkList, cf as DocumentMetadata, n as AnnotationListSnapshotAllPages, t as AnnotationListPageSnapshot, xl as CharMapAnchor, zd as LinePoints } from "./AnnotationListSnapshot-D9R5n2Kf.cjs";
2
+ import { t as Engine } from "./Engine-FNaAEjfb.cjs";
3
3
  //#region src/conformance/runMetadataConformance.d.ts
4
4
  interface ConformanceTestRunner {
5
5
  describe(name: string, fn: () => void): void;
@@ -54,6 +54,10 @@ interface ConformanceOptions {
54
54
  */
55
55
  declare function runMetadataConformance(runner: ConformanceTestRunner, opts: ConformanceOptions): void;
56
56
  //#endregion
57
+ //#region src/conformance/runMeasurementConformance.d.ts
58
+ /** Shared numerical, persistence and calibration contract for local and HTTP engines. */
59
+ declare function runMeasurementConformance(runner: ConformanceTestRunner, opts: ConformanceOptions): void;
60
+ //#endregion
57
61
  //#region src/conformance/runAnnotationReadConformance.d.ts
58
62
  /**
59
63
  * Expected per-fixture annotation knowledge. The harness asserts against
@@ -697,5 +701,72 @@ declare function runSearchConformance(runner: ConformanceTestRunner, opts: Searc
697
701
  declare function diffAnnotationListSnapshot(a: AnnotationListPageSnapshot, b: AnnotationListPageSnapshot): string[];
698
702
  declare function diffAnnotationListSnapshotAll(a: AnnotationListSnapshotAllPages, b: AnnotationListSnapshotAllPages): string[];
699
703
  //#endregion
700
- export { type ActionsConformanceFixtures, type ActionsConformanceOptions, type AnnotationAppearanceConformanceFixture, type AnnotationAppearanceConformanceOptions, type AnnotationConformanceOptions, type AnnotationMutationConformanceFixture, type AnnotationMutationConformanceOptions, type AnnotationReadConformanceFixture, type ConformanceExpect, type ConformanceFixture, type ConformanceOptions, type ConformanceTestRunner, type FormConformanceFixtures, type FormConformanceOptions, type PageGeometryOrientationFixture, type PageGeometryOrientationOptions, type PageReorderConformanceFixture, type PageReorderConformanceOptions, type PageTextConformanceFixture, type PageTextConformanceOptions, type SearchConformanceFixture, type SearchConformanceOptions, TEXT_DIVERGENCE_CASES, type TextDivergenceCase, type TextDivergenceConformanceFixture, type TextDivergenceConformanceOptions, diffAnnotationListSnapshot, diffAnnotationListSnapshotAll, runActionsConformance, runAnnotationAppearanceConformance, runAnnotationAppearanceExportConformance, runAnnotationFlattenConformance, runAnnotationMutationConformance, runAnnotationReadConformance, runAttachmentConformance, runDocumentEventsConformance, runFormConformance, runMetadataConformance, runNamedPagesConformance, runPageDeleteConformance, runPageExtractConformance, runPageFlattenConformance, runPageGeometryOrientationConformance, runPageInsertBlankConformance, runPageInsertConformance, runPageReorderConformance, runPageRotateConformance, runPageTextConformance, runPieceInfoConformance, runRedactionApplyConformance, runSearchConformance, runTextDivergenceConformance };
704
+ //#region src/conformance/runSignatureConformance.d.ts
705
+ interface SignatureConformanceFixtures {
706
+ /** A form with no signature fields at all. */
707
+ unsignedForm: ConformanceFixture;
708
+ /**
709
+ * Three revisions: the original, an approval signature sealing revision
710
+ * 1, and a form fill plus a second approval signature sealing revision
711
+ * 2. Both signatures have whole-revision coverage; `textField` is the
712
+ * filled text field.
713
+ */
714
+ twoApprovals: ConformanceFixture & {
715
+ fieldNames: [string, string];
716
+ textField: string;
717
+ };
718
+ /** Two revisions: a certification signature with permission 2 sealing revision 1. */
719
+ certified: ConformanceFixture & {
720
+ fieldName: string;
721
+ };
722
+ /** Two revisions: one approval signature whose FieldMDP includes `lockedField`. */
723
+ fieldMdp: ConformanceFixture & {
724
+ fieldName: string;
725
+ lockedField: string;
726
+ };
727
+ /** Three chained revisions, two signatures whose ranges are well-formed but seal no revision. */
728
+ partialChain: ConformanceFixture;
729
+ /** One unsigned signature field (with a widget) and one text field, nothing signed. */
730
+ unsignedSigField: ConformanceFixture & {
731
+ fieldName: string;
732
+ textField: string;
733
+ };
734
+ /** Any single-page PDF, used as signature artwork. */
735
+ artwork: ConformanceFixture;
736
+ }
737
+ interface SignatureConformanceOptions {
738
+ label: string;
739
+ makeEngine: () => Promise<Engine> | Engine;
740
+ /**
741
+ * An engine constructed with `signedDocumentPolicy: 'permit'`; the
742
+ * suite proves the protection it lifts. Omit where the engine has no
743
+ * such option.
744
+ */
745
+ makePermitEngine?: () => Promise<Engine> | Engine;
746
+ /** `layerBytes` opens each fixture as an immutable base with a fresh layer on top. */
747
+ openKind: 'bytes' | 'layerBytes' | 'id';
748
+ fixtures: SignatureConformanceFixtures;
749
+ }
750
+ /**
751
+ * Digital signatures, read side. The service is OPTIONAL on the contract
752
+ * (`downloadLayer?` pattern) — the suite runs only where the engine
753
+ * provides it.
754
+ *
755
+ * Invariants:
756
+ * 1. Byte facts describe the LOADED bytes: a revision is a byte prefix,
757
+ * a whole-revision signature seals exactly one, the digest over its
758
+ * `/ByteRange` is what the file's bytes hash to, and an unsaved edit
759
+ * changes none of it.
760
+ * 2. Protection is derived from the signatures in the file and applied
761
+ * as document-derived capabilities: a certification with permission 2
762
+ * takes page assembly and annotation writes away, a FieldMDP freezes
763
+ * the fields it names, a rewrite save is refused. Under
764
+ * `signedDocumentPolicy: 'permit'` none of that applies and the
765
+ * analysis is unchanged.
766
+ * 3. The same answers come from a plain session and from a layer
767
+ * session over the same bytes.
768
+ */
769
+ declare function runSignatureConformance(runner: ConformanceTestRunner, opts: SignatureConformanceOptions): void;
770
+ //#endregion
771
+ export { type ActionsConformanceFixtures, type ActionsConformanceOptions, type AnnotationAppearanceConformanceFixture, type AnnotationAppearanceConformanceOptions, type AnnotationConformanceOptions, type AnnotationMutationConformanceFixture, type AnnotationMutationConformanceOptions, type AnnotationReadConformanceFixture, type ConformanceExpect, type ConformanceFixture, type ConformanceOptions, type ConformanceTestRunner, type FormConformanceFixtures, type FormConformanceOptions, type PageGeometryOrientationFixture, type PageGeometryOrientationOptions, type PageReorderConformanceFixture, type PageReorderConformanceOptions, type PageTextConformanceFixture, type PageTextConformanceOptions, type SearchConformanceFixture, type SearchConformanceOptions, type SignatureConformanceFixtures, type SignatureConformanceOptions, TEXT_DIVERGENCE_CASES, type TextDivergenceCase, type TextDivergenceConformanceFixture, type TextDivergenceConformanceOptions, diffAnnotationListSnapshot, diffAnnotationListSnapshotAll, runActionsConformance, runAnnotationAppearanceConformance, runAnnotationAppearanceExportConformance, runAnnotationFlattenConformance, runAnnotationMutationConformance, runAnnotationReadConformance, runAttachmentConformance, runDocumentEventsConformance, runFormConformance, runMeasurementConformance, runMetadataConformance, runNamedPagesConformance, runPageDeleteConformance, runPageExtractConformance, runPageFlattenConformance, runPageGeometryOrientationConformance, runPageInsertBlankConformance, runPageInsertConformance, runPageReorderConformance, runPageRotateConformance, runPageTextConformance, runPieceInfoConformance, runRedactionApplyConformance, runSearchConformance, runSignatureConformance, runTextDivergenceConformance };
701
772
  //# sourceMappingURL=conformance.d.cts.map
@@ -1,5 +1,5 @@
1
- import { An as HighlightDraft, Bl as DocumentMetadata, Ps as CharMapAnchor, _l as LinePoints, bl as PdfRect, hl as InkList, n as AnnotationListSnapshotAllPages, t as AnnotationListPageSnapshot, vl as PdfPoint } from "./AnnotationListSnapshot-x6tKulNV.js";
2
- import { t as Engine } from "./Engine-Ds0ytbl6.js";
1
+ import { An as HighlightDraft, Bd as PdfPoint, Hd as PdfRect, Ld as InkList, cf as DocumentMetadata, n as AnnotationListSnapshotAllPages, t as AnnotationListPageSnapshot, xl as CharMapAnchor, zd as LinePoints } from "./AnnotationListSnapshot-D9R5n2Kf.js";
2
+ import { t as Engine } from "./Engine-EWWHhEIi.js";
3
3
  //#region src/conformance/runMetadataConformance.d.ts
4
4
  interface ConformanceTestRunner {
5
5
  describe(name: string, fn: () => void): void;
@@ -54,6 +54,10 @@ interface ConformanceOptions {
54
54
  */
55
55
  declare function runMetadataConformance(runner: ConformanceTestRunner, opts: ConformanceOptions): void;
56
56
  //#endregion
57
+ //#region src/conformance/runMeasurementConformance.d.ts
58
+ /** Shared numerical, persistence and calibration contract for local and HTTP engines. */
59
+ declare function runMeasurementConformance(runner: ConformanceTestRunner, opts: ConformanceOptions): void;
60
+ //#endregion
57
61
  //#region src/conformance/runAnnotationReadConformance.d.ts
58
62
  /**
59
63
  * Expected per-fixture annotation knowledge. The harness asserts against
@@ -697,5 +701,72 @@ declare function runSearchConformance(runner: ConformanceTestRunner, opts: Searc
697
701
  declare function diffAnnotationListSnapshot(a: AnnotationListPageSnapshot, b: AnnotationListPageSnapshot): string[];
698
702
  declare function diffAnnotationListSnapshotAll(a: AnnotationListSnapshotAllPages, b: AnnotationListSnapshotAllPages): string[];
699
703
  //#endregion
700
- export { type ActionsConformanceFixtures, type ActionsConformanceOptions, type AnnotationAppearanceConformanceFixture, type AnnotationAppearanceConformanceOptions, type AnnotationConformanceOptions, type AnnotationMutationConformanceFixture, type AnnotationMutationConformanceOptions, type AnnotationReadConformanceFixture, type ConformanceExpect, type ConformanceFixture, type ConformanceOptions, type ConformanceTestRunner, type FormConformanceFixtures, type FormConformanceOptions, type PageGeometryOrientationFixture, type PageGeometryOrientationOptions, type PageReorderConformanceFixture, type PageReorderConformanceOptions, type PageTextConformanceFixture, type PageTextConformanceOptions, type SearchConformanceFixture, type SearchConformanceOptions, TEXT_DIVERGENCE_CASES, type TextDivergenceCase, type TextDivergenceConformanceFixture, type TextDivergenceConformanceOptions, diffAnnotationListSnapshot, diffAnnotationListSnapshotAll, runActionsConformance, runAnnotationAppearanceConformance, runAnnotationAppearanceExportConformance, runAnnotationFlattenConformance, runAnnotationMutationConformance, runAnnotationReadConformance, runAttachmentConformance, runDocumentEventsConformance, runFormConformance, runMetadataConformance, runNamedPagesConformance, runPageDeleteConformance, runPageExtractConformance, runPageFlattenConformance, runPageGeometryOrientationConformance, runPageInsertBlankConformance, runPageInsertConformance, runPageReorderConformance, runPageRotateConformance, runPageTextConformance, runPieceInfoConformance, runRedactionApplyConformance, runSearchConformance, runTextDivergenceConformance };
704
+ //#region src/conformance/runSignatureConformance.d.ts
705
+ interface SignatureConformanceFixtures {
706
+ /** A form with no signature fields at all. */
707
+ unsignedForm: ConformanceFixture;
708
+ /**
709
+ * Three revisions: the original, an approval signature sealing revision
710
+ * 1, and a form fill plus a second approval signature sealing revision
711
+ * 2. Both signatures have whole-revision coverage; `textField` is the
712
+ * filled text field.
713
+ */
714
+ twoApprovals: ConformanceFixture & {
715
+ fieldNames: [string, string];
716
+ textField: string;
717
+ };
718
+ /** Two revisions: a certification signature with permission 2 sealing revision 1. */
719
+ certified: ConformanceFixture & {
720
+ fieldName: string;
721
+ };
722
+ /** Two revisions: one approval signature whose FieldMDP includes `lockedField`. */
723
+ fieldMdp: ConformanceFixture & {
724
+ fieldName: string;
725
+ lockedField: string;
726
+ };
727
+ /** Three chained revisions, two signatures whose ranges are well-formed but seal no revision. */
728
+ partialChain: ConformanceFixture;
729
+ /** One unsigned signature field (with a widget) and one text field, nothing signed. */
730
+ unsignedSigField: ConformanceFixture & {
731
+ fieldName: string;
732
+ textField: string;
733
+ };
734
+ /** Any single-page PDF, used as signature artwork. */
735
+ artwork: ConformanceFixture;
736
+ }
737
+ interface SignatureConformanceOptions {
738
+ label: string;
739
+ makeEngine: () => Promise<Engine> | Engine;
740
+ /**
741
+ * An engine constructed with `signedDocumentPolicy: 'permit'`; the
742
+ * suite proves the protection it lifts. Omit where the engine has no
743
+ * such option.
744
+ */
745
+ makePermitEngine?: () => Promise<Engine> | Engine;
746
+ /** `layerBytes` opens each fixture as an immutable base with a fresh layer on top. */
747
+ openKind: 'bytes' | 'layerBytes' | 'id';
748
+ fixtures: SignatureConformanceFixtures;
749
+ }
750
+ /**
751
+ * Digital signatures, read side. The service is OPTIONAL on the contract
752
+ * (`downloadLayer?` pattern) — the suite runs only where the engine
753
+ * provides it.
754
+ *
755
+ * Invariants:
756
+ * 1. Byte facts describe the LOADED bytes: a revision is a byte prefix,
757
+ * a whole-revision signature seals exactly one, the digest over its
758
+ * `/ByteRange` is what the file's bytes hash to, and an unsaved edit
759
+ * changes none of it.
760
+ * 2. Protection is derived from the signatures in the file and applied
761
+ * as document-derived capabilities: a certification with permission 2
762
+ * takes page assembly and annotation writes away, a FieldMDP freezes
763
+ * the fields it names, a rewrite save is refused. Under
764
+ * `signedDocumentPolicy: 'permit'` none of that applies and the
765
+ * analysis is unchanged.
766
+ * 3. The same answers come from a plain session and from a layer
767
+ * session over the same bytes.
768
+ */
769
+ declare function runSignatureConformance(runner: ConformanceTestRunner, opts: SignatureConformanceOptions): void;
770
+ //#endregion
771
+ export { type ActionsConformanceFixtures, type ActionsConformanceOptions, type AnnotationAppearanceConformanceFixture, type AnnotationAppearanceConformanceOptions, type AnnotationConformanceOptions, type AnnotationMutationConformanceFixture, type AnnotationMutationConformanceOptions, type AnnotationReadConformanceFixture, type ConformanceExpect, type ConformanceFixture, type ConformanceOptions, type ConformanceTestRunner, type FormConformanceFixtures, type FormConformanceOptions, type PageGeometryOrientationFixture, type PageGeometryOrientationOptions, type PageReorderConformanceFixture, type PageReorderConformanceOptions, type PageTextConformanceFixture, type PageTextConformanceOptions, type SearchConformanceFixture, type SearchConformanceOptions, type SignatureConformanceFixtures, type SignatureConformanceOptions, TEXT_DIVERGENCE_CASES, type TextDivergenceCase, type TextDivergenceConformanceFixture, type TextDivergenceConformanceOptions, diffAnnotationListSnapshot, diffAnnotationListSnapshotAll, runActionsConformance, runAnnotationAppearanceConformance, runAnnotationAppearanceExportConformance, runAnnotationFlattenConformance, runAnnotationMutationConformance, runAnnotationReadConformance, runAttachmentConformance, runDocumentEventsConformance, runFormConformance, runMeasurementConformance, runMetadataConformance, runNamedPagesConformance, runPageDeleteConformance, runPageExtractConformance, runPageFlattenConformance, runPageGeometryOrientationConformance, runPageInsertBlankConformance, runPageInsertConformance, runPageReorderConformance, runPageRotateConformance, runPageTextConformance, runPieceInfoConformance, runRedactionApplyConformance, runSearchConformance, runSignatureConformance, runTextDivergenceConformance };
701
772
  //# sourceMappingURL=conformance.d.ts.map