pdf-codec 3.4.4 → 3.5.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 (82) hide show
  1. package/README.md +47 -26
  2. package/dist/{afm-widths-Dxucrg7D.js → afm-widths-BLl6ORCt.js} +2 -2
  3. package/dist/{afm-widths-BoeTOK2r.cjs → afm-widths-Cj9d3GVK.cjs} +2 -2
  4. package/dist/{afm-widths-DyDq56Ph.d.cts → afm-widths-CneRyu5l.d.cts} +1 -1
  5. package/dist/{afm-widths-DyDq56Ph.d.ts → afm-widths-CneRyu5l.d.ts} +1 -1
  6. package/dist/afm-widths.cjs +1 -1
  7. package/dist/afm-widths.d.cts +1 -1
  8. package/dist/afm-widths.d.ts +1 -1
  9. package/dist/afm-widths.js +1 -1
  10. package/dist/content-read.d.cts +2 -2
  11. package/dist/content-read.d.ts +2 -2
  12. package/dist/content-write.cjs +1 -1
  13. package/dist/content-write.d.cts +3 -3
  14. package/dist/content-write.d.ts +3 -3
  15. package/dist/content-write.js +1 -1
  16. package/dist/diagnostics.d.cts +1 -1
  17. package/dist/diagnostics.d.ts +1 -1
  18. package/dist/encoding.cjs +1 -1
  19. package/dist/encoding.js +1 -1
  20. package/dist/encrypt.d.cts +1 -1
  21. package/dist/encrypt.d.ts +1 -1
  22. package/dist/filters.cjs +14 -10
  23. package/dist/filters.js +14 -10
  24. package/dist/font-read.cjs +1 -1
  25. package/dist/font-read.js +1 -1
  26. package/dist/font-registry.d.cts +3 -3
  27. package/dist/font-registry.d.ts +3 -3
  28. package/dist/font-substitutes.d.cts +1 -1
  29. package/dist/font-substitutes.d.ts +1 -1
  30. package/dist/fonts.d.cts +2 -2
  31. package/dist/fonts.d.ts +2 -2
  32. package/dist/image/jbig2-bitmap.d.cts +1 -1
  33. package/dist/image/jbig2-bitmap.d.ts +1 -1
  34. package/dist/image/jbig2.cjs +3 -1
  35. package/dist/image/jbig2.js +3 -1
  36. package/dist/image/jp2-boxes.d.cts +1 -1
  37. package/dist/image/jp2-boxes.d.ts +1 -1
  38. package/dist/image/jpeg2000-codestream.d.cts +3 -3
  39. package/dist/image/jpeg2000-codestream.d.ts +3 -3
  40. package/dist/image/jpeg2000-t1.d.cts +1 -1
  41. package/dist/image/jpeg2000-t1.d.ts +1 -1
  42. package/dist/image/png-encode.d.cts +1 -1
  43. package/dist/image/png-encode.d.ts +1 -1
  44. package/dist/image/png-filter.d.cts +1 -1
  45. package/dist/image/png-filter.d.ts +1 -1
  46. package/dist/images-read.cjs +7 -5
  47. package/dist/images-read.d.cts +1 -1
  48. package/dist/images-read.d.ts +1 -1
  49. package/dist/images-read.js +7 -5
  50. package/dist/index.cjs +1 -1
  51. package/dist/index.d.cts +2 -2
  52. package/dist/index.d.ts +2 -2
  53. package/dist/index.js +1 -1
  54. package/dist/interpret.d.cts +10 -10
  55. package/dist/interpret.d.ts +10 -10
  56. package/dist/layout.d.cts +1 -1
  57. package/dist/layout.d.ts +1 -1
  58. package/dist/lexer.d.cts +9 -9
  59. package/dist/lexer.d.ts +9 -9
  60. package/dist/math-font.d.cts +1 -1
  61. package/dist/math-font.d.ts +1 -1
  62. package/dist/{math-stretch-a_rHNRvc.d.ts → math-stretch-BbC2o4Br.d.ts} +1 -1
  63. package/dist/{math-stretch-E26z6byT.d.cts → math-stretch-C2JanDAz.d.cts} +1 -1
  64. package/dist/math-stretch.d.cts +1 -1
  65. package/dist/math-stretch.d.ts +1 -1
  66. package/dist/measure.cjs +1 -1
  67. package/dist/measure.d.cts +1 -1
  68. package/dist/measure.d.ts +1 -1
  69. package/dist/measure.js +1 -1
  70. package/dist/objects.d.cts +12 -12
  71. package/dist/objects.d.ts +12 -12
  72. package/dist/util/base64.cjs +4 -4
  73. package/dist/util/base64.js +4 -4
  74. package/dist/winansi.cjs +1 -1
  75. package/dist/winansi.d.cts +1 -1
  76. package/dist/winansi.d.ts +1 -1
  77. package/dist/winansi.js +1 -1
  78. package/dist/write.cjs +1 -1
  79. package/dist/write.js +1 -1
  80. package/dist/xref.d.cts +2 -2
  81. package/dist/xref.d.ts +2 -2
  82. package/package.json +3 -11
@@ -11,7 +11,7 @@ declare class Jbig2BitmapTooLargeError extends Jbig2ParseError {
11
11
  }
12
12
  declare function createBitmap(width: number, height: number, fill?: number): Jbig2Bitmap;
13
13
  declare function getPixel(bitmap: Jbig2Bitmap, x: number, y: number): number;
14
- type Jbig2CombinationOperator = 'or' | 'and' | 'xor' | 'xnor' | 'replace';
14
+ type Jbig2CombinationOperator = "or" | "and" | "xor" | "xnor" | "replace";
15
15
  declare function combinationOperatorFromCode(code: number): Jbig2CombinationOperator | undefined;
16
16
  declare function combineBitmap(destination: Jbig2Bitmap, source: Jbig2Bitmap, x: number, y: number, operator: Jbig2CombinationOperator): void;
17
17
  declare function packBitmapRows(bitmap: Jbig2Bitmap, width: number, height: number): Uint8Array<ArrayBuffer>;
@@ -206,7 +206,9 @@ var Jbig2Decoder = class {
206
206
  columns: region.width,
207
207
  rows: region.height,
208
208
  blackIs1: true,
209
- onWarning: (message) => this.warn(message)
209
+ onWarning: (message) => {
210
+ this.warn(message);
211
+ }
210
212
  });
211
213
  this.compose(region, require_image_jbig2_bitmap.unpackBitmapRows(fax.bytes, region.width, region.height));
212
214
  return;
@@ -205,7 +205,9 @@ var Jbig2Decoder = class {
205
205
  columns: region.width,
206
206
  rows: region.height,
207
207
  blackIs1: true,
208
- onWarning: (message) => this.warn(message)
208
+ onWarning: (message) => {
209
+ this.warn(message);
210
+ }
209
211
  });
210
212
  this.compose(region, unpackBitmapRows(fax.bytes, region.width, region.height));
211
213
  return;
@@ -1,5 +1,5 @@
1
1
  //#region src/image/jp2-boxes.d.ts
2
- type Jp2ColourSpace = 'greyscale' | 'srgb' | 'sycc' | 'cmyk' | 'e-srgb' | 'rommrgb' | 'cielab';
2
+ type Jp2ColourSpace = "greyscale" | "srgb" | "sycc" | "cmyk" | "e-srgb" | "rommrgb" | "cielab";
3
3
  interface Jp2ImageHeader {
4
4
  readonly width: number;
5
5
  readonly height: number;
@@ -1,5 +1,5 @@
1
1
  //#region src/image/jp2-boxes.d.ts
2
- type Jp2ColourSpace = 'greyscale' | 'srgb' | 'sycc' | 'cmyk' | 'e-srgb' | 'rommrgb' | 'cielab';
2
+ type Jp2ColourSpace = "greyscale" | "srgb" | "sycc" | "cmyk" | "e-srgb" | "rommrgb" | "cielab";
3
3
  interface Jp2ImageHeader {
4
4
  readonly width: number;
5
5
  readonly height: number;
@@ -1,7 +1,7 @@
1
1
  //#region src/image/jpeg2000-codestream.d.ts
2
- type Jpeg2000ProgressionOrder = 'LRCP' | 'RLCP' | 'RPCL' | 'PCRL' | 'CPRL';
3
- type Jpeg2000Transform = 'reversible-5-3' | 'irreversible-9-7';
4
- type Jpeg2000QuantizationStyle = 'none' | 'derived' | 'expounded';
2
+ type Jpeg2000ProgressionOrder = "LRCP" | "RLCP" | "RPCL" | "PCRL" | "CPRL";
3
+ type Jpeg2000Transform = "reversible-5-3" | "irreversible-9-7";
4
+ type Jpeg2000QuantizationStyle = "none" | "derived" | "expounded";
5
5
  interface Jpeg2000ComponentSize {
6
6
  readonly signed: boolean;
7
7
  readonly bitDepth: number;
@@ -1,7 +1,7 @@
1
1
  //#region src/image/jpeg2000-codestream.d.ts
2
- type Jpeg2000ProgressionOrder = 'LRCP' | 'RLCP' | 'RPCL' | 'PCRL' | 'CPRL';
3
- type Jpeg2000Transform = 'reversible-5-3' | 'irreversible-9-7';
4
- type Jpeg2000QuantizationStyle = 'none' | 'derived' | 'expounded';
2
+ type Jpeg2000ProgressionOrder = "LRCP" | "RLCP" | "RPCL" | "PCRL" | "CPRL";
3
+ type Jpeg2000Transform = "reversible-5-3" | "irreversible-9-7";
4
+ type Jpeg2000QuantizationStyle = "none" | "derived" | "expounded";
5
5
  interface Jpeg2000ComponentSize {
6
6
  readonly signed: boolean;
7
7
  readonly bitDepth: number;
@@ -1,5 +1,5 @@
1
1
  //#region src/image/jpeg2000-t1.d.ts
2
- type Jpeg2000SubbandType = 'LL' | 'HL' | 'LH' | 'HH';
2
+ type Jpeg2000SubbandType = "LL" | "HL" | "LH" | "HH";
3
3
  interface Jpeg2000CodeBlockDecodeOptions {
4
4
  readonly width: number;
5
5
  readonly height: number;
@@ -1,5 +1,5 @@
1
1
  //#region src/image/jpeg2000-t1.d.ts
2
- type Jpeg2000SubbandType = 'LL' | 'HL' | 'LH' | 'HH';
2
+ type Jpeg2000SubbandType = "LL" | "HL" | "LH" | "HH";
3
3
  interface Jpeg2000CodeBlockDecodeOptions {
4
4
  readonly width: number;
5
5
  readonly height: number;
@@ -1,7 +1,7 @@
1
1
  import { RawImage } from "./png-decode.cjs";
2
2
  //#region src/image/png-encode.d.ts
3
3
  interface PngEncodeOptions {
4
- readonly filter?: 'none' | 'adaptive';
4
+ readonly filter?: "none" | "adaptive";
5
5
  }
6
6
  declare function encodePng(image: RawImage, options?: PngEncodeOptions): Uint8Array<ArrayBuffer>;
7
7
  //#endregion
@@ -1,7 +1,7 @@
1
1
  import { RawImage } from "./png-decode.js";
2
2
  //#region src/image/png-encode.d.ts
3
3
  interface PngEncodeOptions {
4
- readonly filter?: 'none' | 'adaptive';
4
+ readonly filter?: "none" | "adaptive";
5
5
  }
6
6
  declare function encodePng(image: RawImage, options?: PngEncodeOptions): Uint8Array<ArrayBuffer>;
7
7
  //#endregion
@@ -1,6 +1,6 @@
1
1
  //#region src/image/png-filter.d.ts
2
2
  type PngFilterType = 0 | 1 | 2 | 3 | 4;
3
3
  declare function unfilterScanlines(data: Uint8Array<ArrayBuffer>, height: number, bytesPerRow: number, bpp: number): Uint8Array<ArrayBuffer>;
4
- declare function filterScanlines(raw: Uint8Array<ArrayBuffer>, height: number, bytesPerRow: number, bpp: number, strategy?: 'none' | 'adaptive'): Uint8Array<ArrayBuffer>;
4
+ declare function filterScanlines(raw: Uint8Array<ArrayBuffer>, height: number, bytesPerRow: number, bpp: number, strategy?: "none" | "adaptive"): Uint8Array<ArrayBuffer>;
5
5
  //#endregion
6
6
  export { PngFilterType, filterScanlines, unfilterScanlines };
@@ -1,6 +1,6 @@
1
1
  //#region src/image/png-filter.d.ts
2
2
  type PngFilterType = 0 | 1 | 2 | 3 | 4;
3
3
  declare function unfilterScanlines(data: Uint8Array<ArrayBuffer>, height: number, bytesPerRow: number, bpp: number): Uint8Array<ArrayBuffer>;
4
- declare function filterScanlines(raw: Uint8Array<ArrayBuffer>, height: number, bytesPerRow: number, bpp: number, strategy?: 'none' | 'adaptive'): Uint8Array<ArrayBuffer>;
4
+ declare function filterScanlines(raw: Uint8Array<ArrayBuffer>, height: number, bytesPerRow: number, bpp: number, strategy?: "none" | "adaptive"): Uint8Array<ArrayBuffer>;
5
5
  //#endregion
6
6
  export { PngFilterType, filterScanlines, unfilterScanlines };
@@ -185,11 +185,13 @@ function jpeg2000ChannelKind(image, dict, resolver, sink) {
185
185
  function readJpeg2000Image(dict, raw, resolver, sink) {
186
186
  let image;
187
187
  try {
188
- image = require_image_jpeg2000.decodeJpeg2000(raw, { onWarning: (message) => sink({
189
- code: "image/jpx-degraded",
190
- severity: "warning",
191
- message
192
- }) });
188
+ image = require_image_jpeg2000.decodeJpeg2000(raw, { onWarning: (message) => {
189
+ sink({
190
+ code: "image/jpx-degraded",
191
+ severity: "warning",
192
+ message
193
+ });
194
+ } });
193
195
  } catch (error) {
194
196
  sink({
195
197
  code: "image/jpx-undecodable",
@@ -3,7 +3,7 @@ import { PdfDict } from "./objects.cjs";
3
3
  import { PdfObjectResolver } from "./interpret.cjs";
4
4
  //#region src/images-read.d.ts
5
5
  interface ExtractedPdfImage {
6
- readonly format: 'png' | 'jpeg';
6
+ readonly format: "png" | "jpeg";
7
7
  readonly bytes: Uint8Array<ArrayBuffer>;
8
8
  readonly widthPx: number;
9
9
  readonly heightPx: number;
@@ -3,7 +3,7 @@ import { PdfDict } from "./objects.js";
3
3
  import { PdfObjectResolver } from "./interpret.js";
4
4
  //#region src/images-read.d.ts
5
5
  interface ExtractedPdfImage {
6
- readonly format: 'png' | 'jpeg';
6
+ readonly format: "png" | "jpeg";
7
7
  readonly bytes: Uint8Array<ArrayBuffer>;
8
8
  readonly widthPx: number;
9
9
  readonly heightPx: number;
@@ -184,11 +184,13 @@ function jpeg2000ChannelKind(image, dict, resolver, sink) {
184
184
  function readJpeg2000Image(dict, raw, resolver, sink) {
185
185
  let image;
186
186
  try {
187
- image = decodeJpeg2000(raw, { onWarning: (message) => sink({
188
- code: "image/jpx-degraded",
189
- severity: "warning",
190
- message
191
- }) });
187
+ image = decodeJpeg2000(raw, { onWarning: (message) => {
188
+ sink({
189
+ code: "image/jpx-degraded",
190
+ severity: "warning",
191
+ message
192
+ });
193
+ } });
192
194
  } catch (error) {
193
195
  sink({
194
196
  code: "image/jpx-undecodable",
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_afm_widths = require("./afm-widths-BoeTOK2r.cjs");
2
+ const require_afm_widths = require("./afm-widths-Cj9d3GVK.cjs");
3
3
  const require_image_ccitt = require("./image/ccitt.cjs");
4
4
  const require_image_jbig2_errors = require("./image/jbig2-errors.cjs");
5
5
  const require_image_jbig2 = require("./image/jbig2.cjs");
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { n as STANDARD_METRICS, r as StandardFontName, t as FontMetrics } from "./afm-widths-DyDq56Ph.cjs";
1
+ import { n as STANDARD_METRICS, r as StandardFontName, t as FontMetrics } from "./afm-widths-CneRyu5l.cjs";
2
2
  import { NOOP_DIAGNOSTIC_SINK, PdfDiagnostic, PdfDiagnosticSeverity, PdfDiagnosticSink, PdfEncryptedError, PdfParseError, PdfPasswordRequiredError } from "./diagnostics.cjs";
3
3
  import { LAYOUT_FORMAT_VERSION, LayoutAnnotation, LayoutAnnotationQuad, LayoutAnnotationQuadSchema, LayoutAnnotationSchema, LayoutAttachment, LayoutAttachmentSchema, LayoutDestination, LayoutDestinationSchema, LayoutDestinationTarget, LayoutDestinationTargetSchema, LayoutDocument, LayoutDocumentSchema, LayoutEllipse, LayoutEllipseSchema, LayoutFormField, LayoutFormFieldSchema, LayoutFormWidget, LayoutFormWidgetSchema, LayoutImage, LayoutImageAsset, LayoutImageAssetSchema, LayoutImageSchema, LayoutInternalLink, LayoutInternalLinkSchema, LayoutItem, LayoutItemSchema, LayoutLayer, LayoutLayerSchema, LayoutLine, LayoutLineSchema, LayoutLink, LayoutLinkSchema, LayoutOutlineItem, LayoutOutlineItemSchema, LayoutPage, LayoutPageSchema, LayoutPath, LayoutPathSchema, LayoutPathSegment, LayoutPathSegmentSchema, LayoutRect, LayoutRectSchema, LayoutStructureElement, LayoutStructureElementSchema, LayoutSubpath, LayoutSubpathSchema, LayoutText, LayoutTextSchema } from "./layout.cjs";
4
4
  import { t as GlyphInkBounds } from "./glyph-bounds-BV_Z40KS.cjs";
@@ -19,7 +19,7 @@ import { filterScanlines, unfilterScanlines } from "./image/png-filter.cjs";
19
19
  import { ReadPdfOptions, readPdf } from "./read.cjs";
20
20
  import { WritePdfOptions, writePdf } from "./write.cjs";
21
21
  import { a as MathGlyphPart, c as MathVariants, n as MathGlyphAssembly, o as MathGlyphVariant, r as MathGlyphConstruction } from "./math-table-gFNB8DmQ.cjs";
22
- import { a as scaleMathStretchConstruction, i as assembleStretchyGlyph, n as MathStretchOptions, r as MathStretchPlacement, t as MathStretchConstruction } from "./math-stretch-E26z6byT.cjs";
22
+ import { a as scaleMathStretchConstruction, i as assembleStretchyGlyph, n as MathStretchOptions, r as MathStretchPlacement, t as MathStretchConstruction } from "./math-stretch-C2JanDAz.cjs";
23
23
  import { LoadedMathFont, MathFont, MathFontDescriptorMetrics, loadMathFont } from "./math-font.cjs";
24
24
  import { DEFAULT_VERTICAL_METRIC_POLICY, FontMeasurerOptions, StandardFontMeasurerOptions, VerticalMetricPolicy, createFontMeasurer, createStandardFontMeasurer } from "./measure.cjs";
25
25
  import { FontRegistryOptions, FontSubstitution, MathAssembledGlyphs, MathBox, MathColor, MathFontMetrics, MathGlyphMetrics, MathGlyphPlacement, MathGlyphRun, MathLayoutItem, MathRule, MathStretchAxis, MathStretchGlyph, MathStretchResult, MathStroke, Point, PositionedFormula, ProvidedFont, StyledFragment, StyledRun, TextMeasurer, UnderlineMetrics, WrapOptions, WrappedLine } from "document-schema.js";
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { n as STANDARD_METRICS, r as StandardFontName, t as FontMetrics } from "./afm-widths-DyDq56Ph.js";
1
+ import { n as STANDARD_METRICS, r as StandardFontName, t as FontMetrics } from "./afm-widths-CneRyu5l.js";
2
2
  import { NOOP_DIAGNOSTIC_SINK, PdfDiagnostic, PdfDiagnosticSeverity, PdfDiagnosticSink, PdfEncryptedError, PdfParseError, PdfPasswordRequiredError } from "./diagnostics.js";
3
3
  import { LAYOUT_FORMAT_VERSION, LayoutAnnotation, LayoutAnnotationQuad, LayoutAnnotationQuadSchema, LayoutAnnotationSchema, LayoutAttachment, LayoutAttachmentSchema, LayoutDestination, LayoutDestinationSchema, LayoutDestinationTarget, LayoutDestinationTargetSchema, LayoutDocument, LayoutDocumentSchema, LayoutEllipse, LayoutEllipseSchema, LayoutFormField, LayoutFormFieldSchema, LayoutFormWidget, LayoutFormWidgetSchema, LayoutImage, LayoutImageAsset, LayoutImageAssetSchema, LayoutImageSchema, LayoutInternalLink, LayoutInternalLinkSchema, LayoutItem, LayoutItemSchema, LayoutLayer, LayoutLayerSchema, LayoutLine, LayoutLineSchema, LayoutLink, LayoutLinkSchema, LayoutOutlineItem, LayoutOutlineItemSchema, LayoutPage, LayoutPageSchema, LayoutPath, LayoutPathSchema, LayoutPathSegment, LayoutPathSegmentSchema, LayoutRect, LayoutRectSchema, LayoutStructureElement, LayoutStructureElementSchema, LayoutSubpath, LayoutSubpathSchema, LayoutText, LayoutTextSchema } from "./layout.js";
4
4
  import { t as GlyphInkBounds } from "./glyph-bounds-BV_Z40KS.js";
@@ -19,7 +19,7 @@ import { filterScanlines, unfilterScanlines } from "./image/png-filter.js";
19
19
  import { ReadPdfOptions, readPdf } from "./read.js";
20
20
  import { WritePdfOptions, writePdf } from "./write.js";
21
21
  import { a as MathGlyphPart, c as MathVariants, n as MathGlyphAssembly, o as MathGlyphVariant, r as MathGlyphConstruction } from "./math-table-DhPrNoPa.js";
22
- import { a as scaleMathStretchConstruction, i as assembleStretchyGlyph, n as MathStretchOptions, r as MathStretchPlacement, t as MathStretchConstruction } from "./math-stretch-a_rHNRvc.js";
22
+ import { a as scaleMathStretchConstruction, i as assembleStretchyGlyph, n as MathStretchOptions, r as MathStretchPlacement, t as MathStretchConstruction } from "./math-stretch-BbC2o4Br.js";
23
23
  import { LoadedMathFont, MathFont, MathFontDescriptorMetrics, loadMathFont } from "./math-font.js";
24
24
  import { DEFAULT_VERTICAL_METRIC_POLICY, FontMeasurerOptions, StandardFontMeasurerOptions, VerticalMetricPolicy, createFontMeasurer, createStandardFontMeasurer } from "./measure.js";
25
25
  import { FontRegistryOptions, FontSubstitution, MathAssembledGlyphs, MathBox, MathColor, MathFontMetrics, MathGlyphMetrics, MathGlyphPlacement, MathGlyphRun, MathLayoutItem, MathRule, MathStretchAxis, MathStretchGlyph, MathStretchResult, MathStroke, Point, PositionedFormula, ProvidedFont, StyledFragment, StyledRun, TextMeasurer, UnderlineMetrics, WrapOptions, WrappedLine } from "document-schema.js";
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as STANDARD_METRICS } from "./afm-widths-Dxucrg7D.js";
1
+ import { t as STANDARD_METRICS } from "./afm-widths-BLl6ORCt.js";
2
2
  import { decodeCcittFax } from "./image/ccitt.js";
3
3
  import { Jbig2ParseError, Jbig2UnsupportedError } from "./image/jbig2-errors.js";
4
4
  import { decodeJbig2Embedded } from "./image/jbig2.js";
@@ -4,7 +4,7 @@ import { PdfDict, PdfObject } from "./objects.cjs";
4
4
  import { Color } from "document-schema.js";
5
5
  //#region src/interpret.d.ts
6
6
  interface ExtractedTextRun {
7
- readonly kind: 'text';
7
+ readonly kind: "text";
8
8
  readonly codes: Uint8Array<ArrayBuffer>;
9
9
  readonly fontResourceName: string;
10
10
  readonly resources: PdfDict;
@@ -27,21 +27,21 @@ interface ExtractedPaint {
27
27
  readonly mcid?: number;
28
28
  }
29
29
  interface ExtractedRect extends ExtractedPaint {
30
- readonly kind: 'rect';
30
+ readonly kind: "rect";
31
31
  readonly xPt: number;
32
32
  readonly yPt: number;
33
33
  readonly widthPt: number;
34
34
  readonly heightPt: number;
35
35
  }
36
36
  interface ExtractedEllipse extends ExtractedPaint {
37
- readonly kind: 'ellipse';
37
+ readonly kind: "ellipse";
38
38
  readonly xPt: number;
39
39
  readonly yPt: number;
40
40
  readonly widthPt: number;
41
41
  readonly heightPt: number;
42
42
  }
43
43
  interface ExtractedLine {
44
- readonly kind: 'line';
44
+ readonly kind: "line";
45
45
  readonly x1Pt: number;
46
46
  readonly y1Pt: number;
47
47
  readonly x2Pt: number;
@@ -52,11 +52,11 @@ interface ExtractedLine {
52
52
  readonly mcid?: number;
53
53
  }
54
54
  type ExtractedPathSegment = {
55
- readonly kind: 'line';
55
+ readonly kind: "line";
56
56
  readonly xPt: number;
57
57
  readonly yPt: number;
58
58
  } | {
59
- readonly kind: 'cubic';
59
+ readonly kind: "cubic";
60
60
  readonly c1xPt: number;
61
61
  readonly c1yPt: number;
62
62
  readonly c2xPt: number;
@@ -71,12 +71,12 @@ interface ExtractedSubpath {
71
71
  readonly closed: boolean;
72
72
  }
73
73
  interface ExtractedPath extends ExtractedPaint {
74
- readonly kind: 'path';
74
+ readonly kind: "path";
75
75
  readonly subpaths: readonly ExtractedSubpath[];
76
- readonly fillRule: 'nonzero' | 'evenodd';
76
+ readonly fillRule: "nonzero" | "evenodd";
77
77
  }
78
78
  interface ExtractedImage {
79
- readonly kind: 'image';
79
+ readonly kind: "image";
80
80
  readonly resourceName: string;
81
81
  readonly resources: PdfDict;
82
82
  readonly matrix: Matrix;
@@ -84,7 +84,7 @@ interface ExtractedImage {
84
84
  readonly mcid?: number;
85
85
  }
86
86
  interface ExtractedInlineImage {
87
- readonly kind: 'inlineImage';
87
+ readonly kind: "inlineImage";
88
88
  readonly dict: PdfDict;
89
89
  readonly data: Uint8Array<ArrayBuffer>;
90
90
  readonly matrix: Matrix;
@@ -4,7 +4,7 @@ import { PdfDict, PdfObject } from "./objects.js";
4
4
  import { Color } from "document-schema.js";
5
5
  //#region src/interpret.d.ts
6
6
  interface ExtractedTextRun {
7
- readonly kind: 'text';
7
+ readonly kind: "text";
8
8
  readonly codes: Uint8Array<ArrayBuffer>;
9
9
  readonly fontResourceName: string;
10
10
  readonly resources: PdfDict;
@@ -27,21 +27,21 @@ interface ExtractedPaint {
27
27
  readonly mcid?: number;
28
28
  }
29
29
  interface ExtractedRect extends ExtractedPaint {
30
- readonly kind: 'rect';
30
+ readonly kind: "rect";
31
31
  readonly xPt: number;
32
32
  readonly yPt: number;
33
33
  readonly widthPt: number;
34
34
  readonly heightPt: number;
35
35
  }
36
36
  interface ExtractedEllipse extends ExtractedPaint {
37
- readonly kind: 'ellipse';
37
+ readonly kind: "ellipse";
38
38
  readonly xPt: number;
39
39
  readonly yPt: number;
40
40
  readonly widthPt: number;
41
41
  readonly heightPt: number;
42
42
  }
43
43
  interface ExtractedLine {
44
- readonly kind: 'line';
44
+ readonly kind: "line";
45
45
  readonly x1Pt: number;
46
46
  readonly y1Pt: number;
47
47
  readonly x2Pt: number;
@@ -52,11 +52,11 @@ interface ExtractedLine {
52
52
  readonly mcid?: number;
53
53
  }
54
54
  type ExtractedPathSegment = {
55
- readonly kind: 'line';
55
+ readonly kind: "line";
56
56
  readonly xPt: number;
57
57
  readonly yPt: number;
58
58
  } | {
59
- readonly kind: 'cubic';
59
+ readonly kind: "cubic";
60
60
  readonly c1xPt: number;
61
61
  readonly c1yPt: number;
62
62
  readonly c2xPt: number;
@@ -71,12 +71,12 @@ interface ExtractedSubpath {
71
71
  readonly closed: boolean;
72
72
  }
73
73
  interface ExtractedPath extends ExtractedPaint {
74
- readonly kind: 'path';
74
+ readonly kind: "path";
75
75
  readonly subpaths: readonly ExtractedSubpath[];
76
- readonly fillRule: 'nonzero' | 'evenodd';
76
+ readonly fillRule: "nonzero" | "evenodd";
77
77
  }
78
78
  interface ExtractedImage {
79
- readonly kind: 'image';
79
+ readonly kind: "image";
80
80
  readonly resourceName: string;
81
81
  readonly resources: PdfDict;
82
82
  readonly matrix: Matrix;
@@ -84,7 +84,7 @@ interface ExtractedImage {
84
84
  readonly mcid?: number;
85
85
  }
86
86
  interface ExtractedInlineImage {
87
- readonly kind: 'inlineImage';
87
+ readonly kind: "inlineImage";
88
88
  readonly dict: PdfDict;
89
89
  readonly data: Uint8Array<ArrayBuffer>;
90
90
  readonly matrix: Matrix;
package/dist/layout.d.cts CHANGED
@@ -734,7 +734,7 @@ declare const LayoutFormWidgetSchema: z.ZodObject<{
734
734
  type LayoutFormWidget = z.infer<typeof LayoutFormWidgetSchema>;
735
735
  interface LayoutFormField {
736
736
  readonly name: string;
737
- readonly fieldType: 'text' | 'checkbox' | 'radio' | 'button' | 'listbox' | 'combobox' | 'signature' | 'group';
737
+ readonly fieldType: "text" | "checkbox" | "radio" | "button" | "listbox" | "combobox" | "signature" | "group";
738
738
  readonly value?: string;
739
739
  readonly checked?: boolean;
740
740
  readonly options?: readonly string[];
package/dist/layout.d.ts CHANGED
@@ -734,7 +734,7 @@ declare const LayoutFormWidgetSchema: z.ZodObject<{
734
734
  type LayoutFormWidget = z.infer<typeof LayoutFormWidgetSchema>;
735
735
  interface LayoutFormField {
736
736
  readonly name: string;
737
- readonly fieldType: 'text' | 'checkbox' | 'radio' | 'button' | 'listbox' | 'combobox' | 'signature' | 'group';
737
+ readonly fieldType: "text" | "checkbox" | "radio" | "button" | "listbox" | "combobox" | "signature" | "group";
738
738
  readonly value?: string;
739
739
  readonly checked?: boolean;
740
740
  readonly options?: readonly string[];
package/dist/lexer.d.cts CHANGED
@@ -1,27 +1,27 @@
1
1
  import { ByteReader } from "./bytes/reader.cjs";
2
2
  //#region src/lexer.d.ts
3
3
  type Token = {
4
- readonly kind: 'number';
4
+ readonly kind: "number";
5
5
  readonly value: number;
6
6
  } | {
7
- readonly kind: 'name';
7
+ readonly kind: "name";
8
8
  readonly value: string;
9
9
  } | {
10
- readonly kind: 'literalString';
10
+ readonly kind: "literalString";
11
11
  readonly value: Uint8Array<ArrayBuffer>;
12
12
  } | {
13
- readonly kind: 'hexString';
13
+ readonly kind: "hexString";
14
14
  readonly value: Uint8Array<ArrayBuffer>;
15
15
  } | {
16
- readonly kind: 'arrayStart';
16
+ readonly kind: "arrayStart";
17
17
  } | {
18
- readonly kind: 'arrayEnd';
18
+ readonly kind: "arrayEnd";
19
19
  } | {
20
- readonly kind: 'dictStart';
20
+ readonly kind: "dictStart";
21
21
  } | {
22
- readonly kind: 'dictEnd';
22
+ readonly kind: "dictEnd";
23
23
  } | {
24
- readonly kind: 'keyword';
24
+ readonly kind: "keyword";
25
25
  readonly value: string;
26
26
  };
27
27
  declare function nextToken(reader: ByteReader): Token | undefined;
package/dist/lexer.d.ts CHANGED
@@ -1,27 +1,27 @@
1
1
  import { ByteReader } from "./bytes/reader.js";
2
2
  //#region src/lexer.d.ts
3
3
  type Token = {
4
- readonly kind: 'number';
4
+ readonly kind: "number";
5
5
  readonly value: number;
6
6
  } | {
7
- readonly kind: 'name';
7
+ readonly kind: "name";
8
8
  readonly value: string;
9
9
  } | {
10
- readonly kind: 'literalString';
10
+ readonly kind: "literalString";
11
11
  readonly value: Uint8Array<ArrayBuffer>;
12
12
  } | {
13
- readonly kind: 'hexString';
13
+ readonly kind: "hexString";
14
14
  readonly value: Uint8Array<ArrayBuffer>;
15
15
  } | {
16
- readonly kind: 'arrayStart';
16
+ readonly kind: "arrayStart";
17
17
  } | {
18
- readonly kind: 'arrayEnd';
18
+ readonly kind: "arrayEnd";
19
19
  } | {
20
- readonly kind: 'dictStart';
20
+ readonly kind: "dictStart";
21
21
  } | {
22
- readonly kind: 'dictEnd';
22
+ readonly kind: "dictEnd";
23
23
  } | {
24
- readonly kind: 'keyword';
24
+ readonly kind: "keyword";
25
25
  readonly value: string;
26
26
  };
27
27
  declare function nextToken(reader: ByteReader): Token | undefined;
@@ -1,6 +1,6 @@
1
1
  import { t as GlyphInkBounds } from "./glyph-bounds-BV_Z40KS.cjs";
2
2
  import { r as MathGlyphConstruction } from "./math-table-gFNB8DmQ.cjs";
3
- import { t as MathStretchConstruction } from "./math-stretch-E26z6byT.cjs";
3
+ import { t as MathStretchConstruction } from "./math-stretch-C2JanDAz.cjs";
4
4
  import { MathFontMetrics, MathStretchAxis } from "document-schema.js";
5
5
  //#region src/math-font.d.ts
6
6
  interface MathFontDescriptorMetrics {
@@ -1,6 +1,6 @@
1
1
  import { t as GlyphInkBounds } from "./glyph-bounds-BV_Z40KS.js";
2
2
  import { r as MathGlyphConstruction } from "./math-table-DhPrNoPa.js";
3
- import { t as MathStretchConstruction } from "./math-stretch-a_rHNRvc.js";
3
+ import { t as MathStretchConstruction } from "./math-stretch-BbC2o4Br.js";
4
4
  import { MathFontMetrics, MathStretchAxis } from "document-schema.js";
5
5
  //#region src/math-font.d.ts
6
6
  interface MathFontDescriptorMetrics {
@@ -7,7 +7,7 @@ interface MathStretchPlacement {
7
7
  readonly advance: number;
8
8
  }
9
9
  interface MathStretchConstruction {
10
- readonly kind: 'base' | 'variant' | 'assembly';
10
+ readonly kind: "base" | "variant" | "assembly";
11
11
  readonly axis: MathStretchAxis;
12
12
  readonly size: number;
13
13
  readonly italicsCorrection: number;
@@ -7,7 +7,7 @@ interface MathStretchPlacement {
7
7
  readonly advance: number;
8
8
  }
9
9
  interface MathStretchConstruction {
10
- readonly kind: 'base' | 'variant' | 'assembly';
10
+ readonly kind: "base" | "variant" | "assembly";
11
11
  readonly axis: MathStretchAxis;
12
12
  readonly size: number;
13
13
  readonly italicsCorrection: number;
@@ -1,2 +1,2 @@
1
- import { a as scaleMathStretchConstruction, i as assembleStretchyGlyph, n as MathStretchOptions, r as MathStretchPlacement, t as MathStretchConstruction } from "./math-stretch-E26z6byT.cjs";
1
+ import { a as scaleMathStretchConstruction, i as assembleStretchyGlyph, n as MathStretchOptions, r as MathStretchPlacement, t as MathStretchConstruction } from "./math-stretch-C2JanDAz.cjs";
2
2
  export { MathStretchConstruction, MathStretchOptions, MathStretchPlacement, assembleStretchyGlyph, scaleMathStretchConstruction };
@@ -1,2 +1,2 @@
1
- import { a as scaleMathStretchConstruction, i as assembleStretchyGlyph, n as MathStretchOptions, r as MathStretchPlacement, t as MathStretchConstruction } from "./math-stretch-a_rHNRvc.js";
1
+ import { a as scaleMathStretchConstruction, i as assembleStretchyGlyph, n as MathStretchOptions, r as MathStretchPlacement, t as MathStretchConstruction } from "./math-stretch-BbC2o4Br.js";
2
2
  export { MathStretchConstruction, MathStretchOptions, MathStretchPlacement, assembleStretchyGlyph, scaleMathStretchConstruction };
package/dist/measure.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_afm_widths = require("./afm-widths-BoeTOK2r.cjs");
2
+ const require_afm_widths = require("./afm-widths-Cj9d3GVK.cjs");
3
3
  const require_embedded_font = require("./embedded-font.cjs");
4
4
  const require_font_registry = require("./font-registry.cjs");
5
5
  //#region src/measure.ts
@@ -1,7 +1,7 @@
1
1
  import { FontRegistry } from "./font-registry.cjs";
2
2
  import { TextMeasurer } from "document-schema.js";
3
3
  //#region src/measure.d.ts
4
- type VerticalMetricPolicy = 'hhea' | 'os2Typo' | 'os2Win';
4
+ type VerticalMetricPolicy = "hhea" | "os2Typo" | "os2Win";
5
5
  declare const DEFAULT_VERTICAL_METRIC_POLICY: VerticalMetricPolicy;
6
6
  interface StandardFontMeasurerOptions {
7
7
  readonly widthCorrectionByFamily?: Readonly<Record<string, number>>;
package/dist/measure.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { FontRegistry } from "./font-registry.js";
2
2
  import { TextMeasurer } from "document-schema.js";
3
3
  //#region src/measure.d.ts
4
- type VerticalMetricPolicy = 'hhea' | 'os2Typo' | 'os2Win';
4
+ type VerticalMetricPolicy = "hhea" | "os2Typo" | "os2Win";
5
5
  declare const DEFAULT_VERTICAL_METRIC_POLICY: VerticalMetricPolicy;
6
6
  interface StandardFontMeasurerOptions {
7
7
  readonly widthCorrectionByFamily?: Readonly<Record<string, number>>;
package/dist/measure.js CHANGED
@@ -1,4 +1,4 @@
1
- import { o as encodeForShow, t as STANDARD_METRICS } from "./afm-widths-Dxucrg7D.js";
1
+ import { o as encodeForShow, t as STANDARD_METRICS } from "./afm-widths-BLl6ORCt.js";
2
2
  import { encodeForShowEmbedded } from "./embedded-font.js";
3
3
  import { resolveFaceWithRegistry } from "./font-registry.js";
4
4
  //#region src/measure.ts