@embedpdf/engine-core 3.0.0-next.7 → 3.0.0-next.9

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 (50) hide show
  1. package/dist/{AbortError-BsHuCO1S.js → AbortError-8-9JAX1Y.js} +2 -2
  2. package/dist/{AbortError-BsHuCO1S.js.map → AbortError-8-9JAX1Y.js.map} +1 -1
  3. package/dist/{AbortError-DmWeq9sx.cjs → AbortError-CRSooKsk.cjs} +2 -2
  4. package/dist/{AbortError-DmWeq9sx.cjs.map → AbortError-CRSooKsk.cjs.map} +1 -1
  5. package/dist/{AnnotationListSnapshot-CHjkcIaL.d.cts → AnnotationListSnapshot-Bwfnb1i-.d.cts} +25 -2
  6. package/dist/{AnnotationListSnapshot-CHjkcIaL.d.ts → AnnotationListSnapshot-Bwfnb1i-.d.ts} +25 -2
  7. package/dist/{DocumentSecurityService-CrxGktMI.d.ts → DocumentSecurityService-CqLXyTVM.d.ts} +2 -2
  8. package/dist/{DocumentSecurityService-B1uv4FaK.d.cts → DocumentSecurityService-DQNpYCXs.d.cts} +2 -2
  9. package/dist/{Engine-BE6r06QI.d.ts → Engine-C25gzAFz.d.ts} +26 -16
  10. package/dist/{Engine-BOaRwtKa.d.cts → Engine-COFJU7sA.d.cts} +26 -16
  11. package/dist/{charmap-D6PLtRiC.cjs → PageInsertBlankInput-CzShuSJI.cjs} +16 -1
  12. package/dist/PageInsertBlankInput-CzShuSJI.cjs.map +1 -0
  13. package/dist/{charmap-CUukAMhR.js → PageInsertBlankInput-WKY0tr6S.js} +11 -2
  14. package/dist/PageInsertBlankInput-WKY0tr6S.js.map +1 -0
  15. package/dist/{builders-BsUc2A1U.cjs → builders-B5CgvJ3j.cjs} +6 -6
  16. package/dist/{builders-BsUc2A1U.cjs.map → builders-B5CgvJ3j.cjs.map} +1 -1
  17. package/dist/{builders-CF5gKkOa.js → builders-CGcBlTrv.js} +3 -3
  18. package/dist/{builders-CF5gKkOa.js.map → builders-CGcBlTrv.js.map} +1 -1
  19. package/dist/conformance.cjs +337 -178
  20. package/dist/conformance.cjs.map +1 -1
  21. package/dist/conformance.d.cts +26 -6
  22. package/dist/conformance.d.ts +26 -6
  23. package/dist/conformance.js +292 -134
  24. package/dist/conformance.js.map +1 -1
  25. package/dist/{fold-DemV94jf.js → fold-BfyxxwS6.js} +2 -2
  26. package/dist/{fold-DemV94jf.js.map → fold-BfyxxwS6.js.map} +1 -1
  27. package/dist/{fold-BeT1GxLP.cjs → fold-C7I5GpBz.cjs} +4 -4
  28. package/dist/{fold-BeT1GxLP.cjs.map → fold-C7I5GpBz.cjs.map} +1 -1
  29. package/dist/index.cjs +15 -14
  30. package/dist/index.d.cts +2 -2
  31. package/dist/index.d.ts +2 -2
  32. package/dist/index.js +4 -4
  33. package/dist/runtime.cjs +20 -19
  34. package/dist/runtime.cjs.map +1 -1
  35. package/dist/runtime.d.cts +103 -5
  36. package/dist/runtime.d.ts +103 -5
  37. package/dist/runtime.js +5 -5
  38. package/dist/{schemas-ES6-TkIl.js → schemas-BKRZZ-g1.js} +38 -4
  39. package/dist/{schemas-ES6-TkIl.js.map → schemas-BKRZZ-g1.js.map} +1 -1
  40. package/dist/{schemas-CyWwm0Zf.cjs → schemas-DlxjcDIl.cjs} +82 -24
  41. package/dist/{schemas-CyWwm0Zf.cjs.map → schemas-DlxjcDIl.cjs.map} +1 -1
  42. package/dist/wire.cjs +37 -3
  43. package/dist/wire.cjs.map +1 -1
  44. package/dist/wire.d.cts +72 -8
  45. package/dist/wire.d.ts +72 -8
  46. package/dist/wire.js +34 -4
  47. package/dist/wire.js.map +1 -1
  48. package/package.json +1 -1
  49. package/dist/charmap-CUukAMhR.js.map +0 -1
  50. package/dist/charmap-D6PLtRiC.cjs.map +0 -1
@@ -1,4 +1,4 @@
1
- const require_charmap = require("./charmap-D6PLtRiC.cjs");
1
+ const require_PageInsertBlankInput = require("./PageInsertBlankInput-CzShuSJI.cjs");
2
2
  let zod = require("zod");
3
3
  //#region src/geometry/schemas.ts
4
4
  /**
@@ -388,7 +388,7 @@ const CaretPatchSchema = zod.z.object({
388
388
  //#region src/annotation/kinds/caret/index.ts
389
389
  const CaretKind = {
390
390
  subtype: "caret",
391
- pdfSubtypeCode: require_charmap.PdfAnnotationSubtypeCode.CARET,
391
+ pdfSubtypeCode: require_PageInsertBlankInput.PdfAnnotationSubtypeCode.CARET,
392
392
  dtoSchema: CaretDTOSchema,
393
393
  draftSchema: CaretDraftSchema,
394
394
  patchSchema: CaretPatchSchema
@@ -439,7 +439,7 @@ const CirclePatchSchema = zod.z.object({
439
439
  //#region src/annotation/kinds/circle/index.ts
440
440
  const CircleKind = {
441
441
  subtype: "circle",
442
- pdfSubtypeCode: require_charmap.PdfAnnotationSubtypeCode.CIRCLE,
442
+ pdfSubtypeCode: require_PageInsertBlankInput.PdfAnnotationSubtypeCode.CIRCLE,
443
443
  dtoSchema: CircleDTOSchema,
444
444
  draftSchema: CircleDraftSchema,
445
445
  patchSchema: CirclePatchSchema
@@ -523,7 +523,7 @@ const FileAttachmentPatchSchema = zod.z.object({
523
523
  */
524
524
  const FileAttachmentKind = {
525
525
  subtype: "file-attachment",
526
- pdfSubtypeCode: require_charmap.PdfAnnotationSubtypeCode.FILEATTACHMENT,
526
+ pdfSubtypeCode: require_PageInsertBlankInput.PdfAnnotationSubtypeCode.FILEATTACHMENT,
527
527
  dtoSchema: FileAttachmentDTOSchema,
528
528
  draftSchema: FileAttachmentWireDraftSchema,
529
529
  patchSchema: FileAttachmentPatchSchema
@@ -601,7 +601,7 @@ const FreeTextPatchSchema = zod.z.object({
601
601
  //#region src/annotation/kinds/free-text/index.ts
602
602
  const FreeTextKind = {
603
603
  subtype: "free-text",
604
- pdfSubtypeCode: require_charmap.PdfAnnotationSubtypeCode.FREETEXT,
604
+ pdfSubtypeCode: require_PageInsertBlankInput.PdfAnnotationSubtypeCode.FREETEXT,
605
605
  dtoSchema: FreeTextDTOSchema,
606
606
  draftSchema: FreeTextDraftSchema,
607
607
  patchSchema: FreeTextPatchSchema
@@ -641,7 +641,7 @@ const HighlightPatchSchema = zod.z.object({
641
641
  //#region src/annotation/kinds/highlight/index.ts
642
642
  const HighlightKind = {
643
643
  subtype: "highlight",
644
- pdfSubtypeCode: require_charmap.PdfAnnotationSubtypeCode.HIGHLIGHT,
644
+ pdfSubtypeCode: require_PageInsertBlankInput.PdfAnnotationSubtypeCode.HIGHLIGHT,
645
645
  dtoSchema: HighlightDTOSchema,
646
646
  draftSchema: HighlightDraftSchema,
647
647
  patchSchema: HighlightPatchSchema
@@ -678,7 +678,7 @@ const InkPatchSchema = zod.z.object({
678
678
  //#region src/annotation/kinds/ink/index.ts
679
679
  const InkKind = {
680
680
  subtype: "ink",
681
- pdfSubtypeCode: require_charmap.PdfAnnotationSubtypeCode.INK,
681
+ pdfSubtypeCode: require_PageInsertBlankInput.PdfAnnotationSubtypeCode.INK,
682
682
  dtoSchema: InkDTOSchema,
683
683
  draftSchema: InkDraftSchema,
684
684
  patchSchema: InkPatchSchema
@@ -715,7 +715,7 @@ const LinePatchSchema = zod.z.object({
715
715
  //#region src/annotation/kinds/line/index.ts
716
716
  const LineKind = {
717
717
  subtype: "line",
718
- pdfSubtypeCode: require_charmap.PdfAnnotationSubtypeCode.LINE,
718
+ pdfSubtypeCode: require_PageInsertBlankInput.PdfAnnotationSubtypeCode.LINE,
719
719
  dtoSchema: LineDTOSchema,
720
720
  draftSchema: LineDraftSchema,
721
721
  patchSchema: LinePatchSchema
@@ -823,7 +823,7 @@ const LinkPatchSchema = zod.z.object({
823
823
  //#region src/annotation/kinds/link/index.ts
824
824
  const LinkKind = {
825
825
  subtype: "link",
826
- pdfSubtypeCode: require_charmap.PdfAnnotationSubtypeCode.LINK,
826
+ pdfSubtypeCode: require_PageInsertBlankInput.PdfAnnotationSubtypeCode.LINK,
827
827
  dtoSchema: LinkDTOSchema,
828
828
  draftSchema: LinkDraftSchema,
829
829
  patchSchema: LinkPatchSchema
@@ -874,7 +874,7 @@ const PolygonPatchSchema = zod.z.object({
874
874
  //#region src/annotation/kinds/polygon/index.ts
875
875
  const PolygonKind = {
876
876
  subtype: "polygon",
877
- pdfSubtypeCode: require_charmap.PdfAnnotationSubtypeCode.POLYGON,
877
+ pdfSubtypeCode: require_PageInsertBlankInput.PdfAnnotationSubtypeCode.POLYGON,
878
878
  dtoSchema: PolygonDTOSchema,
879
879
  draftSchema: PolygonDraftSchema,
880
880
  patchSchema: PolygonPatchSchema
@@ -905,7 +905,7 @@ const PolylinePatchSchema = zod.z.object({
905
905
  //#region src/annotation/kinds/polyline/index.ts
906
906
  const PolylineKind = {
907
907
  subtype: "polyline",
908
- pdfSubtypeCode: require_charmap.PdfAnnotationSubtypeCode.POLYLINE,
908
+ pdfSubtypeCode: require_PageInsertBlankInput.PdfAnnotationSubtypeCode.POLYLINE,
909
909
  dtoSchema: PolylineDTOSchema,
910
910
  draftSchema: PolylineDraftSchema,
911
911
  patchSchema: PolylinePatchSchema
@@ -968,7 +968,7 @@ const RedactPatchSchema = zod.z.object({
968
968
  //#region src/annotation/kinds/redact/index.ts
969
969
  const RedactKind = {
970
970
  subtype: "redact",
971
- pdfSubtypeCode: require_charmap.PdfAnnotationSubtypeCode.REDACT,
971
+ pdfSubtypeCode: require_PageInsertBlankInput.PdfAnnotationSubtypeCode.REDACT,
972
972
  dtoSchema: RedactDTOSchema,
973
973
  draftSchema: RedactDraftSchema,
974
974
  patchSchema: RedactPatchSchema
@@ -993,7 +993,7 @@ const SquarePatchSchema = zod.z.object({
993
993
  //#region src/annotation/kinds/square/index.ts
994
994
  const SquareKind = {
995
995
  subtype: "square",
996
- pdfSubtypeCode: require_charmap.PdfAnnotationSubtypeCode.SQUARE,
996
+ pdfSubtypeCode: require_PageInsertBlankInput.PdfAnnotationSubtypeCode.SQUARE,
997
997
  dtoSchema: SquareDTOSchema,
998
998
  draftSchema: SquareDraftSchema,
999
999
  patchSchema: SquarePatchSchema
@@ -1018,7 +1018,7 @@ const SquigglyPatchSchema = zod.z.object({
1018
1018
  //#region src/annotation/kinds/squiggly/index.ts
1019
1019
  const SquigglyKind = {
1020
1020
  subtype: "squiggly",
1021
- pdfSubtypeCode: require_charmap.PdfAnnotationSubtypeCode.SQUIGGLY,
1021
+ pdfSubtypeCode: require_PageInsertBlankInput.PdfAnnotationSubtypeCode.SQUIGGLY,
1022
1022
  dtoSchema: SquigglyDTOSchema,
1023
1023
  draftSchema: SquigglyDraftSchema,
1024
1024
  patchSchema: SquigglyPatchSchema
@@ -1073,7 +1073,7 @@ const StampWirePatchSchema = zod.z.object({
1073
1073
  */
1074
1074
  const StampKind = {
1075
1075
  subtype: "stamp",
1076
- pdfSubtypeCode: require_charmap.PdfAnnotationSubtypeCode.STAMP,
1076
+ pdfSubtypeCode: require_PageInsertBlankInput.PdfAnnotationSubtypeCode.STAMP,
1077
1077
  dtoSchema: StampDTOSchema,
1078
1078
  draftSchema: StampWireDraftSchema,
1079
1079
  patchSchema: StampWirePatchSchema
@@ -1101,7 +1101,7 @@ const StrikeoutPatchSchema = zod.z.object({
1101
1101
  //#region src/annotation/kinds/strikeout/index.ts
1102
1102
  const StrikeoutKind = {
1103
1103
  subtype: "strikeout",
1104
- pdfSubtypeCode: require_charmap.PdfAnnotationSubtypeCode.STRIKEOUT,
1104
+ pdfSubtypeCode: require_PageInsertBlankInput.PdfAnnotationSubtypeCode.STRIKEOUT,
1105
1105
  dtoSchema: StrikeoutDTOSchema,
1106
1106
  draftSchema: StrikeoutDraftSchema,
1107
1107
  patchSchema: StrikeoutPatchSchema
@@ -1141,7 +1141,7 @@ const TextPatchSchema = zod.z.object({
1141
1141
  //#region src/annotation/kinds/text/index.ts
1142
1142
  const TextKind = {
1143
1143
  subtype: "text",
1144
- pdfSubtypeCode: require_charmap.PdfAnnotationSubtypeCode.TEXT,
1144
+ pdfSubtypeCode: require_PageInsertBlankInput.PdfAnnotationSubtypeCode.TEXT,
1145
1145
  dtoSchema: TextDTOSchema,
1146
1146
  draftSchema: TextDraftSchema,
1147
1147
  patchSchema: TextPatchSchema
@@ -1166,7 +1166,7 @@ const UnderlinePatchSchema = zod.z.object({
1166
1166
  //#region src/annotation/kinds/underline/index.ts
1167
1167
  const UnderlineKind = {
1168
1168
  subtype: "underline",
1169
- pdfSubtypeCode: require_charmap.PdfAnnotationSubtypeCode.UNDERLINE,
1169
+ pdfSubtypeCode: require_PageInsertBlankInput.PdfAnnotationSubtypeCode.UNDERLINE,
1170
1170
  dtoSchema: UnderlineDTOSchema,
1171
1171
  draftSchema: UnderlineDraftSchema,
1172
1172
  patchSchema: UnderlinePatchSchema
@@ -1185,7 +1185,7 @@ const UnsupportedPatchSchema = zod.z.never();
1185
1185
  //#region src/annotation/kinds/unsupported/index.ts
1186
1186
  const UnsupportedKind = {
1187
1187
  subtype: "unsupported",
1188
- pdfSubtypeCode: require_charmap.PdfAnnotationSubtypeCode.UNKNOWN,
1188
+ pdfSubtypeCode: require_PageInsertBlankInput.PdfAnnotationSubtypeCode.UNKNOWN,
1189
1189
  dtoSchema: UnsupportedDTOSchema,
1190
1190
  draftSchema: UnsupportedDraftSchema,
1191
1191
  patchSchema: UnsupportedPatchSchema
@@ -1248,7 +1248,7 @@ const WidgetPatchSchema = zod.z.object({
1248
1248
  //#region src/annotation/kinds/widget/index.ts
1249
1249
  const WidgetKind = {
1250
1250
  subtype: "widget",
1251
- pdfSubtypeCode: require_charmap.PdfAnnotationSubtypeCode.WIDGET,
1251
+ pdfSubtypeCode: require_PageInsertBlankInput.PdfAnnotationSubtypeCode.WIDGET,
1252
1252
  dtoSchema: WidgetDTOSchema,
1253
1253
  draftSchema: WidgetDraftSchema,
1254
1254
  patchSchema: WidgetPatchSchema
@@ -1699,7 +1699,10 @@ const DocumentHeadSchema = zod.z.object({
1699
1699
  })
1700
1700
  });
1701
1701
  const AccessRequestSchema = zod.z.object({
1702
- docId: zod.z.string().min(1),
1702
+ /** Deprecated: identity now rides the PATH
1703
+ * (`/v1/docs/:docId/layers/:layerName/access`). Kept optional for the
1704
+ * legacy `/v1/access` alias, which requires `docId` in the body. */
1705
+ docId: zod.z.string().min(1).optional(),
1703
1706
  layerName: zod.z.string().min(1).optional(),
1704
1707
  password: zod.z.string().optional(),
1705
1708
  passwordGrant: zod.z.string().optional(),
@@ -1880,7 +1883,7 @@ const AccessResponseSchema = zod.z.object({
1880
1883
  }).optional()
1881
1884
  });
1882
1885
  const PdfSaveModeSchema = zod.z.enum(["incremental", "rewrite"]);
1883
- const engineErrorCodeValues = Object.values(require_charmap.EngineErrorCode);
1886
+ const engineErrorCodeValues = Object.values(require_PageInsertBlankInput.EngineErrorCode);
1884
1887
  const EngineErrorPayloadSchema = zod.z.object({
1885
1888
  name: zod.z.literal("EngineError"),
1886
1889
  code: zod.z.enum(engineErrorCodeValues),
@@ -1974,7 +1977,7 @@ const PageTextSnapshotSchema = zod.z.object({
1974
1977
  charCount: zod.z.number().int().nonnegative(),
1975
1978
  charMap: zod.z.array(zod.z.tuple([zod.z.number().int().nonnegative(), zod.z.number().int().nonnegative()])).optional()
1976
1979
  }).superRefine((snapshot, ctx) => {
1977
- const violation = require_charmap.charMapViolation(snapshot.charCount, snapshot.text.length, snapshot.charMap);
1980
+ const violation = require_PageInsertBlankInput.charMapViolation(snapshot.charCount, snapshot.text.length, snapshot.charMap);
1978
1981
  if (violation !== null) ctx.addIssue({
1979
1982
  code: zod.z.ZodIssueCode.custom,
1980
1983
  path: ["charMap"],
@@ -2488,6 +2491,37 @@ const PageDeleteResultSchema = zod.z.object({
2488
2491
  cache: PageStructureCacheSchema.nullable()
2489
2492
  });
2490
2493
  /**
2494
+ * Page insert (bytes) input — the JSON `body` part of the multipart
2495
+ * mutation envelope; the PDF itself rides the `resource:source` part.
2496
+ * `destIndex` omitted → append.
2497
+ */
2498
+ const PageInsertInputSchema = zod.z.object({ destIndex: zod.z.number().int().nonnegative().optional() });
2499
+ /**
2500
+ * Blank-page insert input — plain JSON, pages.insert minus the bytes.
2501
+ * `size` is in PDF points (un-rotated); `count` shares the contract cap
2502
+ * with the worker so a request the schema accepts cannot then fail the
2503
+ * worker's own guard.
2504
+ */
2505
+ const PageInsertBlankInputSchema = zod.z.object({
2506
+ size: zod.z.object({
2507
+ width: zod.z.number().positive().finite(),
2508
+ height: zod.z.number().positive().finite()
2509
+ }),
2510
+ count: zod.z.number().int().min(1).max(100).optional(),
2511
+ destIndex: zod.z.number().int().nonnegative().optional()
2512
+ });
2513
+ /** Page extract input: the pages to export, in the order they should appear. */
2514
+ const PageExtractInputSchema = zod.z.object({ pageObjectNumbers: zod.z.array(zod.z.number().int().positive()).min(1) });
2515
+ /**
2516
+ * Page insert result — shared by bytes-insert and blank-insert: the fresh
2517
+ * PONs in insertion order plus the full new layout (see `PageInsertResult`).
2518
+ */
2519
+ const PageInsertResultSchema = zod.z.object({
2520
+ insertedPageObjectNumbers: zod.z.array(zod.z.number().int().positive()),
2521
+ layout: PageListSnapshotSchema,
2522
+ cache: PageStructureCacheSchema.nullable()
2523
+ });
2524
+ /**
2491
2525
  * Metadata write result. The Info dict is rewritten in place, so the
2492
2526
  * result returns the re-read `metadata` plus cloud coherence pins. No
2493
2527
  * `layoutVersion` is touched — a metadata edit bumps only `docVersion`
@@ -3158,6 +3192,12 @@ Object.defineProperty(exports, "PageDeleteResultSchema", {
3158
3192
  return PageDeleteResultSchema;
3159
3193
  }
3160
3194
  });
3195
+ Object.defineProperty(exports, "PageExtractInputSchema", {
3196
+ enumerable: true,
3197
+ get: function() {
3198
+ return PageExtractInputSchema;
3199
+ }
3200
+ });
3161
3201
  Object.defineProperty(exports, "PageFlattenInputSchema", {
3162
3202
  enumerable: true,
3163
3203
  get: function() {
@@ -3176,6 +3216,24 @@ Object.defineProperty(exports, "PageGeometrySnapshotSchema", {
3176
3216
  return PageGeometrySnapshotSchema;
3177
3217
  }
3178
3218
  });
3219
+ Object.defineProperty(exports, "PageInsertBlankInputSchema", {
3220
+ enumerable: true,
3221
+ get: function() {
3222
+ return PageInsertBlankInputSchema;
3223
+ }
3224
+ });
3225
+ Object.defineProperty(exports, "PageInsertInputSchema", {
3226
+ enumerable: true,
3227
+ get: function() {
3228
+ return PageInsertInputSchema;
3229
+ }
3230
+ });
3231
+ Object.defineProperty(exports, "PageInsertResultSchema", {
3232
+ enumerable: true,
3233
+ get: function() {
3234
+ return PageInsertResultSchema;
3235
+ }
3236
+ });
3179
3237
  Object.defineProperty(exports, "PageLayoutSchema", {
3180
3238
  enumerable: true,
3181
3239
  get: function() {
@@ -3639,4 +3697,4 @@ Object.defineProperty(exports, "WireAttachmentFileSchema", {
3639
3697
  }
3640
3698
  });
3641
3699
 
3642
- //# sourceMappingURL=schemas-CyWwm0Zf.cjs.map
3700
+ //# sourceMappingURL=schemas-DlxjcDIl.cjs.map