pdf-codec 1.11.9 → 1.11.11

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 (37) hide show
  1. package/dist/content-write.d.cts +2 -2
  2. package/dist/content-write.d.ts +2 -2
  3. package/dist/{font-registry-B5qL0Vi0.d.cts → font-registry-CpVgwmD0.d.cts} +1 -20
  4. package/dist/{font-registry-mgdbNP8_.d.ts → font-registry-DtxRuSlj.d.ts} +1 -20
  5. package/dist/font-registry.d.cts +2 -2
  6. package/dist/font-registry.d.ts +2 -2
  7. package/dist/formula.d.cts +2 -10
  8. package/dist/formula.d.ts +2 -10
  9. package/dist/index.d.cts +5 -5
  10. package/dist/index.d.ts +5 -5
  11. package/dist/interpret.d.cts +1 -1
  12. package/dist/interpret.d.ts +1 -1
  13. package/dist/math-font.d.cts +2 -2
  14. package/dist/math-font.d.ts +2 -2
  15. package/dist/{math-stretch-DXWjs8gL.d.cts → math-stretch-E26z6byT.d.cts} +2 -2
  16. package/dist/{math-stretch-Bwk_bxh1.d.ts → math-stretch-a_rHNRvc.d.ts} +2 -2
  17. package/dist/math-stretch.d.cts +2 -2
  18. package/dist/math-stretch.d.ts +2 -2
  19. package/dist/{matrix-BHzJESll.d.cts → matrix-CC7OdJhv.d.cts} +1 -4
  20. package/dist/{matrix-BHzJESll.d.ts → matrix-CC7OdJhv.d.ts} +1 -4
  21. package/dist/matrix.d.cts +2 -2
  22. package/dist/matrix.d.ts +2 -2
  23. package/dist/measure.d.cts +3 -15
  24. package/dist/measure.d.ts +3 -15
  25. package/dist/read.d.cts +1 -1
  26. package/dist/read.d.ts +1 -1
  27. package/dist/text-layout.d.cts +2 -33
  28. package/dist/text-layout.d.ts +2 -33
  29. package/dist/write.d.cts +1 -1
  30. package/dist/write.d.ts +1 -1
  31. package/package.json +2 -2
  32. package/dist/math-types-BZkWO5Ow.d.cts +0 -110
  33. package/dist/math-types-Bq7tyV4g.d.ts +0 -110
  34. package/dist/math-types.cjs +0 -0
  35. package/dist/math-types.d.cts +0 -3
  36. package/dist/math-types.d.ts +0 -3
  37. package/dist/math-types.js +0 -0
@@ -1,6 +1,6 @@
1
1
  import { r as StandardFontName } from "./afm-widths-DyDq56Ph.cjs";
2
2
  import { r as EmbeddedFaceSubstitution, t as EmbeddedFace } from "./embedded-font-BU6Jgcof.cjs";
3
- import { TextMeasurer } from "./measure.cjs";
3
+ import { TextMeasurer as TextMeasurer$1 } from "./measure.cjs";
4
4
  import { WinAnsiSubstitution } from "./winansi.cjs";
5
5
  import { LayoutFont, LayoutItem } from "document-schema.js";
6
6
  //#region src/content-write.d.ts
@@ -17,7 +17,7 @@ interface ResolvedImageResource {
17
17
  readonly resourceName: string;
18
18
  }
19
19
  interface ContentWriteContext {
20
- readonly measurer: TextMeasurer;
20
+ readonly measurer: TextMeasurer$1;
21
21
  resolveFont(font: LayoutFont): ResolvedFontResource;
22
22
  resolveImage(imageId: string): ResolvedImageResource;
23
23
  }
@@ -1,6 +1,6 @@
1
1
  import { r as StandardFontName } from "./afm-widths-DyDq56Ph.js";
2
2
  import { r as EmbeddedFaceSubstitution, t as EmbeddedFace } from "./embedded-font-fREdbxnr.js";
3
- import { TextMeasurer } from "./measure.js";
3
+ import { TextMeasurer as TextMeasurer$1 } from "./measure.js";
4
4
  import { WinAnsiSubstitution } from "./winansi.js";
5
5
  import { LayoutFont, LayoutItem } from "document-schema.js";
6
6
  //#region src/content-write.d.ts
@@ -17,7 +17,7 @@ interface ResolvedImageResource {
17
17
  readonly resourceName: string;
18
18
  }
19
19
  interface ContentWriteContext {
20
- readonly measurer: TextMeasurer;
20
+ readonly measurer: TextMeasurer$1;
21
21
  resolveFont(font: LayoutFont): ResolvedFontResource;
22
22
  resolveImage(imageId: string): ResolvedImageResource;
23
23
  }
@@ -1,13 +1,7 @@
1
1
  import { r as StandardFontName } from "./afm-widths-DyDq56Ph.cjs";
2
2
  import { t as EmbeddedFace } from "./embedded-font-BU6Jgcof.cjs";
3
- import { LayoutFont } from "document-schema.js";
3
+ import { FontRegistryOptions, FontSubstitution, LayoutFont, ProvidedFont } from "document-schema.js";
4
4
  //#region src/font-registry.d.ts
5
- interface ProvidedFont {
6
- readonly family: string;
7
- readonly bold: boolean;
8
- readonly italic: boolean;
9
- readonly bytes: Uint8Array<ArrayBuffer>;
10
- }
11
5
  type ResolvedFace = {
12
6
  readonly kind: 'embedded';
13
7
  readonly face: EmbeddedFace;
@@ -16,19 +10,6 @@ type ResolvedFace = {
16
10
  readonly standardName: StandardFontName;
17
11
  readonly matched: boolean;
18
12
  };
19
- interface FontSubstitution {
20
- readonly requestedFamily: string;
21
- readonly requestedBold: boolean;
22
- readonly requestedItalic: boolean;
23
- readonly reason: 'missing-face' | 'vendored-substitute';
24
- readonly resolvedFamily: string;
25
- }
26
- interface FontRegistryOptions {
27
- readonly sourceFonts?: readonly ProvidedFont[];
28
- readonly fonts?: readonly ProvidedFont[];
29
- readonly substitutes?: 'vendored' | 'none';
30
- readonly onSubstitution?: (substitution: FontSubstitution) => void;
31
- }
32
13
  interface FontRegistry {
33
14
  resolve(font: LayoutFont): ResolvedFace;
34
15
  }
@@ -1,13 +1,7 @@
1
1
  import { r as StandardFontName } from "./afm-widths-DyDq56Ph.js";
2
2
  import { t as EmbeddedFace } from "./embedded-font-fREdbxnr.js";
3
- import { LayoutFont } from "document-schema.js";
3
+ import { FontRegistryOptions, FontSubstitution, LayoutFont, ProvidedFont } from "document-schema.js";
4
4
  //#region src/font-registry.d.ts
5
- interface ProvidedFont {
6
- readonly family: string;
7
- readonly bold: boolean;
8
- readonly italic: boolean;
9
- readonly bytes: Uint8Array<ArrayBuffer>;
10
- }
11
5
  type ResolvedFace = {
12
6
  readonly kind: 'embedded';
13
7
  readonly face: EmbeddedFace;
@@ -16,19 +10,6 @@ type ResolvedFace = {
16
10
  readonly standardName: StandardFontName;
17
11
  readonly matched: boolean;
18
12
  };
19
- interface FontSubstitution {
20
- readonly requestedFamily: string;
21
- readonly requestedBold: boolean;
22
- readonly requestedItalic: boolean;
23
- readonly reason: 'missing-face' | 'vendored-substitute';
24
- readonly resolvedFamily: string;
25
- }
26
- interface FontRegistryOptions {
27
- readonly sourceFonts?: readonly ProvidedFont[];
28
- readonly fonts?: readonly ProvidedFont[];
29
- readonly substitutes?: 'vendored' | 'none';
30
- readonly onSubstitution?: (substitution: FontSubstitution) => void;
31
- }
32
13
  interface FontRegistry {
33
14
  resolve(font: LayoutFont): ResolvedFace;
34
15
  }
@@ -1,2 +1,2 @@
1
- import { a as ResolvedFace, i as ProvidedFont, n as FontRegistryOptions, o as createFontRegistry, r as FontSubstitution, s as resolveFaceWithRegistry, t as FontRegistry } from "./font-registry-B5qL0Vi0.cjs";
2
- export { FontRegistry, FontRegistryOptions, FontSubstitution, ProvidedFont, ResolvedFace, createFontRegistry, resolveFaceWithRegistry };
1
+ import { a as ResolvedFace, i as ProvidedFont, n as FontRegistryOptions, o as createFontRegistry, r as FontSubstitution, s as resolveFaceWithRegistry, t as FontRegistry } from "./font-registry-CpVgwmD0.cjs";
2
+ export { FontRegistry, type FontRegistryOptions, type FontSubstitution, type ProvidedFont, ResolvedFace, createFontRegistry, resolveFaceWithRegistry };
@@ -1,2 +1,2 @@
1
- import { a as ResolvedFace, i as ProvidedFont, n as FontRegistryOptions, o as createFontRegistry, r as FontSubstitution, s as resolveFaceWithRegistry, t as FontRegistry } from "./font-registry-mgdbNP8_.js";
2
- export { FontRegistry, FontRegistryOptions, FontSubstitution, ProvidedFont, ResolvedFace, createFontRegistry, resolveFaceWithRegistry };
1
+ import { a as ResolvedFace, i as ProvidedFont, n as FontRegistryOptions, o as createFontRegistry, r as FontSubstitution, s as resolveFaceWithRegistry, t as FontRegistry } from "./font-registry-DtxRuSlj.js";
2
+ export { FontRegistry, type FontRegistryOptions, type FontSubstitution, type ProvidedFont, ResolvedFace, createFontRegistry, resolveFaceWithRegistry };
@@ -1,10 +1,2 @@
1
- import { n as MathBox } from "./math-types-BZkWO5Ow.cjs";
2
- //#region src/formula.d.ts
3
- interface PositionedFormula {
4
- readonly pageIndex: number;
5
- readonly xPt: number;
6
- readonly yPt: number;
7
- readonly box: MathBox;
8
- }
9
- //#endregion
10
- export { PositionedFormula };
1
+ import { MathBox, PositionedFormula } from "document-schema.js";
2
+ export type { MathBox, PositionedFormula };
package/dist/formula.d.ts CHANGED
@@ -1,10 +1,2 @@
1
- import { n as MathBox } from "./math-types-Bq7tyV4g.js";
2
- //#region src/formula.d.ts
3
- interface PositionedFormula {
4
- readonly pageIndex: number;
5
- readonly xPt: number;
6
- readonly yPt: number;
7
- readonly box: MathBox;
8
- }
9
- //#endregion
10
- export { PositionedFormula };
1
+ import { MathBox, PositionedFormula } from "document-schema.js";
2
+ export type { MathBox, PositionedFormula };
package/dist/index.d.cts CHANGED
@@ -7,15 +7,12 @@ import { t as GlyphInkBounds } from "./glyph-bounds-BV_Z40KS.cjs";
7
7
  import { NOOP_DIAGNOSTIC_SINK, PdfDiagnostic, PdfDiagnosticSeverity, PdfDiagnosticSink, PdfEncryptedError, PdfParseError, PdfPasswordRequiredError } from "./diagnostics.cjs";
8
8
  import { PdfBytesSchema, pdfCodec } from "./codec.cjs";
9
9
  import { n as EmbeddedFaceMetrics, r as EmbeddedFaceSubstitution, t as EmbeddedFace } from "./embedded-font-BU6Jgcof.cjs";
10
- import { a as ResolvedFace, i as ProvidedFont, n as FontRegistryOptions, o as createFontRegistry, r as FontSubstitution, s as resolveFaceWithRegistry, t as FontRegistry } from "./font-registry-B5qL0Vi0.cjs";
10
+ import { a as ResolvedFace, i as ProvidedFont, n as FontRegistryOptions, o as createFontRegistry, r as FontSubstitution, s as resolveFaceWithRegistry, t as FontRegistry } from "./font-registry-CpVgwmD0.cjs";
11
11
  import { DEFAULT_VERTICAL_METRIC_POLICY, FontMeasurerOptions, StandardFontMeasurerOptions, TextMeasurer, UnderlineMetrics, VerticalMetricPolicy, createFontMeasurer, createStandardFontMeasurer } from "./measure.cjs";
12
12
  import { WinAnsiSubstitution } from "./winansi.cjs";
13
13
  import { FontFace, FontFaceParseError, readFontFace } from "./font-face.cjs";
14
- import { i as Point, u as rotatePointAboutCenter } from "./matrix-BHzJESll.cjs";
14
+ import { i as Point, u as rotatePointAboutCenter } from "./matrix-CC7OdJhv.cjs";
15
15
  import { ResolvedFont, resolveStandardFont } from "./fonts.cjs";
16
- import { a as MathGlyphPart, c as MathVariants, n as MathGlyphAssembly, o as MathGlyphVariant, r as MathGlyphConstruction } from "./math-table-gFNB8DmQ.cjs";
17
- import { a as assembleStretchyGlyph, i as MathStretchPlacement, n as MathStretchConstruction, o as scaleMathStretchConstruction, r as MathStretchOptions, t as MathStretchAxis } from "./math-stretch-DXWjs8gL.cjs";
18
- import { a as MathGlyphMetrics, c as MathLayoutItem, d as MathStretchResult, f as MathStroke, i as MathFontMetrics, l as MathRule, n as MathBox, o as MathGlyphPlacement, r as MathColor, s as MathGlyphRun, t as MathAssembledGlyphs, u as MathStretchGlyph } from "./math-types-BZkWO5Ow.cjs";
19
16
  import { PositionedFormula } from "./formula.cjs";
20
17
  import { CcittFaxImage, CcittFaxOptions, decodeCcittFax } from "./image/ccitt.cjs";
21
18
  import { n as Jbig2UnsupportedError, t as Jbig2ParseError } from "./jbig2-errors-Bj6MPxrx.cjs";
@@ -30,6 +27,9 @@ import { PngEncodeOptions, encodePng } from "./image/png-encode.cjs";
30
27
  import { PngFilterType, filterScanlines, unfilterScanlines } from "./image/png-filter.cjs";
31
28
  import { ReadPdfOptions, readPdf } from "./read.cjs";
32
29
  import { WritePdfOptions, writePdf } from "./write.cjs";
30
+ import { a as MathGlyphPart, c as MathVariants, n as MathGlyphAssembly, o as MathGlyphVariant, r as MathGlyphConstruction } from "./math-table-gFNB8DmQ.cjs";
31
+ import { a as scaleMathStretchConstruction, i as assembleStretchyGlyph, n as MathStretchOptions, r as MathStretchPlacement, t as MathStretchConstruction } from "./math-stretch-E26z6byT.cjs";
33
32
  import { LoadedMathFont, MathFont, MathFontDescriptorMetrics, loadMathFont } from "./math-font.cjs";
34
33
  import { StyledFragment, StyledRun, WrapOptions, WrappedLine, wrapRunsToWidth } from "./text-layout.cjs";
34
+ import { MathAssembledGlyphs, MathBox, MathColor, MathFontMetrics, MathGlyphMetrics, MathGlyphPlacement, MathGlyphRun, MathLayoutItem, MathRule, MathStretchAxis, MathStretchGlyph, MathStretchResult, MathStroke } from "document-schema.js";
35
35
  export { ByteReader, ByteWriter, type CcittFaxImage, type CcittFaxOptions, DEFAULT_VERTICAL_METRIC_POLICY, type DeflateLevel, type EmbeddedFace, type EmbeddedFaceMetrics, type EmbeddedFaceSubstitution, type FontFace, FontFaceParseError, type FontMeasurerOptions, type FontMetrics, type FontRegistry, type FontRegistryOptions, type FontSubstitution, type GlyphInkBounds, type InflateResult, type Jbig2DecodeOptions, type Jbig2Image, Jbig2ParseError, Jbig2UnsupportedError, type Jp2ChannelDefinition, type Jp2ColourSpace, type Jp2Container, type Jp2ImageHeader, type Jpeg2000ComponentMetadata, type Jpeg2000DecodeOptions, type Jpeg2000Image, type Jpeg2000Metadata, Jpeg2000ParseError, type Jpeg2000ProgressionOrder, type Jpeg2000QuantizationStyle, type Jpeg2000Transform, Jpeg2000UnsupportedError, type JpegInfo, type LoadedMathFont, MAX_INFLATE_OUTPUT_BYTES, type MathAssembledGlyphs, type MathBox, type MathColor, type MathFont, type MathFontDescriptorMetrics, type MathFontMetrics, type MathGlyphAssembly, type MathGlyphConstruction, type MathGlyphMetrics, type MathGlyphPart, type MathGlyphPlacement, type MathGlyphRun, type MathGlyphVariant, type MathLayoutItem, type MathRule, type MathStretchAxis, type MathStretchConstruction, type MathStretchGlyph, type MathStretchOptions, type MathStretchPlacement, type MathStretchResult, type MathStroke, type MathVariants, NOOP_DIAGNOSTIC_SINK, PdfBytesSchema, type PdfDiagnostic, type PdfDiagnosticSeverity, type PdfDiagnosticSink, PdfEncryptedError, PdfParseError, PdfPasswordRequiredError, type PngDecodeOptions, type PngEncodeOptions, type PngFilterType, type Point, type PositionedFormula, type ProvidedFont, type RawImage, type ReadPdfOptions, type ResolvedFace, type ResolvedFont, STANDARD_METRICS, type StandardFontMeasurerOptions, type StandardFontName, type StyledFragment, type StyledRun, type TextMeasurer, type UnderlineMetrics, type VerticalMetricPolicy, type WinAnsiSubstitution, type WrapOptions, type WrappedLine, type WritePdfOptions, assembleStretchyGlyph, concatBytes, crc32, createFontMeasurer, createFontRegistry, createStandardFontMeasurer, decodeCcittFax, decodeJbig2Embedded, decodeJpeg2000, decodePng, deflate, encodePng, filterScanlines, inflate, inflateTolerant, isAsciiWhitespace, loadMathFont, looksLikeBareCodestream, parseJp2Container, pdfCodec, readFontFace, readJpeg2000Metadata, readJpegInfo, readPdf, resolveFaceWithRegistry, resolveStandardFont, rotatePointAboutCenter, scaleMathStretchConstruction, unfilterScanlines, wrapRunsToWidth, writePdf };
package/dist/index.d.ts CHANGED
@@ -7,15 +7,12 @@ import { t as GlyphInkBounds } from "./glyph-bounds-BV_Z40KS.js";
7
7
  import { NOOP_DIAGNOSTIC_SINK, PdfDiagnostic, PdfDiagnosticSeverity, PdfDiagnosticSink, PdfEncryptedError, PdfParseError, PdfPasswordRequiredError } from "./diagnostics.js";
8
8
  import { PdfBytesSchema, pdfCodec } from "./codec.js";
9
9
  import { n as EmbeddedFaceMetrics, r as EmbeddedFaceSubstitution, t as EmbeddedFace } from "./embedded-font-fREdbxnr.js";
10
- import { a as ResolvedFace, i as ProvidedFont, n as FontRegistryOptions, o as createFontRegistry, r as FontSubstitution, s as resolveFaceWithRegistry, t as FontRegistry } from "./font-registry-mgdbNP8_.js";
10
+ import { a as ResolvedFace, i as ProvidedFont, n as FontRegistryOptions, o as createFontRegistry, r as FontSubstitution, s as resolveFaceWithRegistry, t as FontRegistry } from "./font-registry-DtxRuSlj.js";
11
11
  import { DEFAULT_VERTICAL_METRIC_POLICY, FontMeasurerOptions, StandardFontMeasurerOptions, TextMeasurer, UnderlineMetrics, VerticalMetricPolicy, createFontMeasurer, createStandardFontMeasurer } from "./measure.js";
12
12
  import { WinAnsiSubstitution } from "./winansi.js";
13
13
  import { FontFace, FontFaceParseError, readFontFace } from "./font-face.js";
14
- import { i as Point, u as rotatePointAboutCenter } from "./matrix-BHzJESll.js";
14
+ import { i as Point, u as rotatePointAboutCenter } from "./matrix-CC7OdJhv.js";
15
15
  import { ResolvedFont, resolveStandardFont } from "./fonts.js";
16
- import { a as MathGlyphPart, c as MathVariants, n as MathGlyphAssembly, o as MathGlyphVariant, r as MathGlyphConstruction } from "./math-table-DhPrNoPa.js";
17
- import { a as assembleStretchyGlyph, i as MathStretchPlacement, n as MathStretchConstruction, o as scaleMathStretchConstruction, r as MathStretchOptions, t as MathStretchAxis } from "./math-stretch-Bwk_bxh1.js";
18
- import { a as MathGlyphMetrics, c as MathLayoutItem, d as MathStretchResult, f as MathStroke, i as MathFontMetrics, l as MathRule, n as MathBox, o as MathGlyphPlacement, r as MathColor, s as MathGlyphRun, t as MathAssembledGlyphs, u as MathStretchGlyph } from "./math-types-Bq7tyV4g.js";
19
16
  import { PositionedFormula } from "./formula.js";
20
17
  import { CcittFaxImage, CcittFaxOptions, decodeCcittFax } from "./image/ccitt.js";
21
18
  import { n as Jbig2UnsupportedError, t as Jbig2ParseError } from "./jbig2-errors-Bj6MPxrx.js";
@@ -30,6 +27,9 @@ import { PngEncodeOptions, encodePng } from "./image/png-encode.js";
30
27
  import { PngFilterType, filterScanlines, unfilterScanlines } from "./image/png-filter.js";
31
28
  import { ReadPdfOptions, readPdf } from "./read.js";
32
29
  import { WritePdfOptions, writePdf } from "./write.js";
30
+ import { a as MathGlyphPart, c as MathVariants, n as MathGlyphAssembly, o as MathGlyphVariant, r as MathGlyphConstruction } from "./math-table-DhPrNoPa.js";
31
+ import { a as scaleMathStretchConstruction, i as assembleStretchyGlyph, n as MathStretchOptions, r as MathStretchPlacement, t as MathStretchConstruction } from "./math-stretch-a_rHNRvc.js";
33
32
  import { LoadedMathFont, MathFont, MathFontDescriptorMetrics, loadMathFont } from "./math-font.js";
34
33
  import { StyledFragment, StyledRun, WrapOptions, WrappedLine, wrapRunsToWidth } from "./text-layout.js";
34
+ import { MathAssembledGlyphs, MathBox, MathColor, MathFontMetrics, MathGlyphMetrics, MathGlyphPlacement, MathGlyphRun, MathLayoutItem, MathRule, MathStretchAxis, MathStretchGlyph, MathStretchResult, MathStroke } from "document-schema.js";
35
35
  export { ByteReader, ByteWriter, type CcittFaxImage, type CcittFaxOptions, DEFAULT_VERTICAL_METRIC_POLICY, type DeflateLevel, type EmbeddedFace, type EmbeddedFaceMetrics, type EmbeddedFaceSubstitution, type FontFace, FontFaceParseError, type FontMeasurerOptions, type FontMetrics, type FontRegistry, type FontRegistryOptions, type FontSubstitution, type GlyphInkBounds, type InflateResult, type Jbig2DecodeOptions, type Jbig2Image, Jbig2ParseError, Jbig2UnsupportedError, type Jp2ChannelDefinition, type Jp2ColourSpace, type Jp2Container, type Jp2ImageHeader, type Jpeg2000ComponentMetadata, type Jpeg2000DecodeOptions, type Jpeg2000Image, type Jpeg2000Metadata, Jpeg2000ParseError, type Jpeg2000ProgressionOrder, type Jpeg2000QuantizationStyle, type Jpeg2000Transform, Jpeg2000UnsupportedError, type JpegInfo, type LoadedMathFont, MAX_INFLATE_OUTPUT_BYTES, type MathAssembledGlyphs, type MathBox, type MathColor, type MathFont, type MathFontDescriptorMetrics, type MathFontMetrics, type MathGlyphAssembly, type MathGlyphConstruction, type MathGlyphMetrics, type MathGlyphPart, type MathGlyphPlacement, type MathGlyphRun, type MathGlyphVariant, type MathLayoutItem, type MathRule, type MathStretchAxis, type MathStretchConstruction, type MathStretchGlyph, type MathStretchOptions, type MathStretchPlacement, type MathStretchResult, type MathStroke, type MathVariants, NOOP_DIAGNOSTIC_SINK, PdfBytesSchema, type PdfDiagnostic, type PdfDiagnosticSeverity, type PdfDiagnosticSink, PdfEncryptedError, PdfParseError, PdfPasswordRequiredError, type PngDecodeOptions, type PngEncodeOptions, type PngFilterType, type Point, type PositionedFormula, type ProvidedFont, type RawImage, type ReadPdfOptions, type ResolvedFace, type ResolvedFont, STANDARD_METRICS, type StandardFontMeasurerOptions, type StandardFontName, type StyledFragment, type StyledRun, type TextMeasurer, type UnderlineMetrics, type VerticalMetricPolicy, type WinAnsiSubstitution, type WrapOptions, type WrappedLine, type WritePdfOptions, assembleStretchyGlyph, concatBytes, crc32, createFontMeasurer, createFontRegistry, createStandardFontMeasurer, decodeCcittFax, decodeJbig2Embedded, decodeJpeg2000, decodePng, deflate, encodePng, filterScanlines, inflate, inflateTolerant, isAsciiWhitespace, loadMathFont, looksLikeBareCodestream, parseJp2Container, pdfCodec, readFontFace, readJpeg2000Metadata, readJpegInfo, readPdf, resolveFaceWithRegistry, resolveStandardFont, rotatePointAboutCenter, scaleMathStretchConstruction, unfilterScanlines, wrapRunsToWidth, writePdf };
@@ -1,6 +1,6 @@
1
1
  import { PdfDiagnosticSink } from "./diagnostics.cjs";
2
2
  import { PdfDict, PdfObject } from "./objects.cjs";
3
- import { r as Matrix } from "./matrix-BHzJESll.cjs";
3
+ import { r as Matrix } from "./matrix-CC7OdJhv.cjs";
4
4
  import { Color } from "document-schema.js";
5
5
  //#region src/interpret.d.ts
6
6
  interface ExtractedTextRun {
@@ -1,6 +1,6 @@
1
1
  import { PdfDiagnosticSink } from "./diagnostics.js";
2
2
  import { PdfDict, PdfObject } from "./objects.js";
3
- import { r as Matrix } from "./matrix-BHzJESll.js";
3
+ import { r as Matrix } from "./matrix-CC7OdJhv.js";
4
4
  import { Color } from "document-schema.js";
5
5
  //#region src/interpret.d.ts
6
6
  interface ExtractedTextRun {
@@ -1,7 +1,7 @@
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 { n as MathStretchConstruction, t as MathStretchAxis } from "./math-stretch-DXWjs8gL.cjs";
4
- import { i as MathFontMetrics } from "./math-types-BZkWO5Ow.cjs";
3
+ import { t as MathStretchConstruction } from "./math-stretch-E26z6byT.cjs";
4
+ import { MathFontMetrics, MathStretchAxis } from "document-schema.js";
5
5
  //#region src/math-font.d.ts
6
6
  interface MathFontDescriptorMetrics {
7
7
  readonly unitsPerEm: number;
@@ -1,7 +1,7 @@
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 { n as MathStretchConstruction, t as MathStretchAxis } from "./math-stretch-Bwk_bxh1.js";
4
- import { i as MathFontMetrics } from "./math-types-Bq7tyV4g.js";
3
+ import { t as MathStretchConstruction } from "./math-stretch-a_rHNRvc.js";
4
+ import { MathFontMetrics, MathStretchAxis } from "document-schema.js";
5
5
  //#region src/math-font.d.ts
6
6
  interface MathFontDescriptorMetrics {
7
7
  readonly unitsPerEm: number;
@@ -1,6 +1,6 @@
1
1
  import { r as MathGlyphConstruction } from "./math-table-gFNB8DmQ.cjs";
2
+ import { MathStretchAxis } from "document-schema.js";
2
3
  //#region src/math-stretch.d.ts
3
- type MathStretchAxis = 'vertical' | 'horizontal';
4
4
  interface MathStretchPlacement {
5
5
  readonly glyphId: number;
6
6
  readonly offset: number;
@@ -21,4 +21,4 @@ interface MathStretchOptions {
21
21
  declare function assembleStretchyGlyph(construction: MathGlyphConstruction, options: MathStretchOptions): MathStretchConstruction | undefined;
22
22
  declare function scaleMathStretchConstruction(construction: MathStretchConstruction, factor: number): MathStretchConstruction;
23
23
  //#endregion
24
- export { assembleStretchyGlyph as a, MathStretchPlacement as i, MathStretchConstruction as n, scaleMathStretchConstruction as o, MathStretchOptions as r, MathStretchAxis as t };
24
+ export { scaleMathStretchConstruction as a, assembleStretchyGlyph as i, MathStretchOptions as n, MathStretchPlacement as r, MathStretchConstruction as t };
@@ -1,6 +1,6 @@
1
1
  import { r as MathGlyphConstruction } from "./math-table-DhPrNoPa.js";
2
+ import { MathStretchAxis } from "document-schema.js";
2
3
  //#region src/math-stretch.d.ts
3
- type MathStretchAxis = 'vertical' | 'horizontal';
4
4
  interface MathStretchPlacement {
5
5
  readonly glyphId: number;
6
6
  readonly offset: number;
@@ -21,4 +21,4 @@ interface MathStretchOptions {
21
21
  declare function assembleStretchyGlyph(construction: MathGlyphConstruction, options: MathStretchOptions): MathStretchConstruction | undefined;
22
22
  declare function scaleMathStretchConstruction(construction: MathStretchConstruction, factor: number): MathStretchConstruction;
23
23
  //#endregion
24
- export { assembleStretchyGlyph as a, MathStretchPlacement as i, MathStretchConstruction as n, scaleMathStretchConstruction as o, MathStretchOptions as r, MathStretchAxis as t };
24
+ export { scaleMathStretchConstruction as a, assembleStretchyGlyph as i, MathStretchOptions as n, MathStretchPlacement as r, MathStretchConstruction as t };
@@ -1,2 +1,2 @@
1
- import { a as assembleStretchyGlyph, i as MathStretchPlacement, n as MathStretchConstruction, o as scaleMathStretchConstruction, r as MathStretchOptions, t as MathStretchAxis } from "./math-stretch-DXWjs8gL.cjs";
2
- export { MathStretchAxis, MathStretchConstruction, MathStretchOptions, MathStretchPlacement, assembleStretchyGlyph, scaleMathStretchConstruction };
1
+ import { a as scaleMathStretchConstruction, i as assembleStretchyGlyph, n as MathStretchOptions, r as MathStretchPlacement, t as MathStretchConstruction } from "./math-stretch-E26z6byT.cjs";
2
+ export { MathStretchConstruction, MathStretchOptions, MathStretchPlacement, assembleStretchyGlyph, scaleMathStretchConstruction };
@@ -1,2 +1,2 @@
1
- import { a as assembleStretchyGlyph, i as MathStretchPlacement, n as MathStretchConstruction, o as scaleMathStretchConstruction, r as MathStretchOptions, t as MathStretchAxis } from "./math-stretch-Bwk_bxh1.js";
2
- export { MathStretchAxis, MathStretchConstruction, MathStretchOptions, MathStretchPlacement, assembleStretchyGlyph, scaleMathStretchConstruction };
1
+ import { a as scaleMathStretchConstruction, i as assembleStretchyGlyph, n as MathStretchOptions, r as MathStretchPlacement, t as MathStretchConstruction } from "./math-stretch-a_rHNRvc.js";
2
+ export { MathStretchConstruction, MathStretchOptions, MathStretchPlacement, assembleStretchyGlyph, scaleMathStretchConstruction };
@@ -1,11 +1,8 @@
1
+ import { Point } from "document-schema.js";
1
2
  //#region src/matrix.d.ts
2
3
  type Matrix = readonly [number, number, number, number, number, number];
3
4
  declare const IDENTITY_MATRIX: Matrix;
4
5
  declare function multiplyMatrices(m: Matrix, n: Matrix): Matrix;
5
- interface Point {
6
- readonly x: number;
7
- readonly y: number;
8
- }
9
6
  declare function applyMatrix(m: Matrix, point: Point): Point;
10
7
  declare function translationMatrix(x: number, y: number): Matrix;
11
8
  declare function scaleMatrix(sx: number, sy: number): Matrix;
@@ -1,11 +1,8 @@
1
+ import { Point } from "document-schema.js";
1
2
  //#region src/matrix.d.ts
2
3
  type Matrix = readonly [number, number, number, number, number, number];
3
4
  declare const IDENTITY_MATRIX: Matrix;
4
5
  declare function multiplyMatrices(m: Matrix, n: Matrix): Matrix;
5
- interface Point {
6
- readonly x: number;
7
- readonly y: number;
8
- }
9
6
  declare function applyMatrix(m: Matrix, point: Point): Point;
10
7
  declare function translationMatrix(x: number, y: number): Matrix;
11
8
  declare function scaleMatrix(sx: number, sy: number): Matrix;
package/dist/matrix.d.cts CHANGED
@@ -1,2 +1,2 @@
1
- import { a as applyMatrix, c as matrixScaleY, d as rotationMatrix, f as scaleMatrix, i as Point, l as multiplyMatrices, n as IDENTITY_MATRIX, o as matrixRotationDegrees, p as translationMatrix, r as Matrix, s as matrixScaleX, t as BEZIER_KAPPA, u as rotatePointAboutCenter } from "./matrix-BHzJESll.cjs";
2
- export { BEZIER_KAPPA, IDENTITY_MATRIX, Matrix, Point, applyMatrix, matrixRotationDegrees, matrixScaleX, matrixScaleY, multiplyMatrices, rotatePointAboutCenter, rotationMatrix, scaleMatrix, translationMatrix };
1
+ import { a as applyMatrix, c as matrixScaleY, d as rotationMatrix, f as scaleMatrix, i as Point, l as multiplyMatrices, n as IDENTITY_MATRIX, o as matrixRotationDegrees, p as translationMatrix, r as Matrix, s as matrixScaleX, t as BEZIER_KAPPA, u as rotatePointAboutCenter } from "./matrix-CC7OdJhv.cjs";
2
+ export { BEZIER_KAPPA, IDENTITY_MATRIX, Matrix, type Point, applyMatrix, matrixRotationDegrees, matrixScaleX, matrixScaleY, multiplyMatrices, rotatePointAboutCenter, rotationMatrix, scaleMatrix, translationMatrix };
package/dist/matrix.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { a as applyMatrix, c as matrixScaleY, d as rotationMatrix, f as scaleMatrix, i as Point, l as multiplyMatrices, n as IDENTITY_MATRIX, o as matrixRotationDegrees, p as translationMatrix, r as Matrix, s as matrixScaleX, t as BEZIER_KAPPA, u as rotatePointAboutCenter } from "./matrix-BHzJESll.js";
2
- export { BEZIER_KAPPA, IDENTITY_MATRIX, Matrix, Point, applyMatrix, matrixRotationDegrees, matrixScaleX, matrixScaleY, multiplyMatrices, rotatePointAboutCenter, rotationMatrix, scaleMatrix, translationMatrix };
1
+ import { a as applyMatrix, c as matrixScaleY, d as rotationMatrix, f as scaleMatrix, i as Point, l as multiplyMatrices, n as IDENTITY_MATRIX, o as matrixRotationDegrees, p as translationMatrix, r as Matrix, s as matrixScaleX, t as BEZIER_KAPPA, u as rotatePointAboutCenter } from "./matrix-CC7OdJhv.js";
2
+ export { BEZIER_KAPPA, IDENTITY_MATRIX, Matrix, type Point, applyMatrix, matrixRotationDegrees, matrixScaleX, matrixScaleY, multiplyMatrices, rotatePointAboutCenter, rotationMatrix, scaleMatrix, translationMatrix };
@@ -1,18 +1,6 @@
1
- import { t as FontRegistry } from "./font-registry-B5qL0Vi0.cjs";
2
- import { LayoutFont } from "document-schema.js";
1
+ import { t as FontRegistry } from "./font-registry-CpVgwmD0.cjs";
2
+ import { TextMeasurer, UnderlineMetrics } from "document-schema.js";
3
3
  //#region src/measure.d.ts
4
- interface UnderlineMetrics {
5
- readonly offsetPt: number;
6
- readonly thicknessPt: number;
7
- }
8
- interface TextMeasurer {
9
- widthOfTextAtSize(text: string, font: LayoutFont, sizePt: number): number;
10
- lineHeightAtSize(font: LayoutFont, sizePt: number): number;
11
- ascenderAtSize(font: LayoutFont, sizePt: number): number;
12
- descenderAtSize(font: LayoutFont, sizePt: number): number;
13
- underlineAtSize(font: LayoutFont, sizePt: number): UnderlineMetrics;
14
- horizontalScaleFor(font: LayoutFont): number;
15
- }
16
4
  type VerticalMetricPolicy = 'hhea' | 'os2Typo' | 'os2Win';
17
5
  declare const DEFAULT_VERTICAL_METRIC_POLICY: VerticalMetricPolicy;
18
6
  interface StandardFontMeasurerOptions {
@@ -24,4 +12,4 @@ interface FontMeasurerOptions extends StandardFontMeasurerOptions {
24
12
  declare function createFontMeasurer(registry?: FontRegistry, options?: FontMeasurerOptions): TextMeasurer;
25
13
  declare function createStandardFontMeasurer(options?: StandardFontMeasurerOptions): TextMeasurer;
26
14
  //#endregion
27
- export { DEFAULT_VERTICAL_METRIC_POLICY, FontMeasurerOptions, StandardFontMeasurerOptions, TextMeasurer, UnderlineMetrics, VerticalMetricPolicy, createFontMeasurer, createStandardFontMeasurer };
15
+ export { DEFAULT_VERTICAL_METRIC_POLICY, FontMeasurerOptions, StandardFontMeasurerOptions, type TextMeasurer, type UnderlineMetrics, VerticalMetricPolicy, createFontMeasurer, createStandardFontMeasurer };
package/dist/measure.d.ts CHANGED
@@ -1,18 +1,6 @@
1
- import { t as FontRegistry } from "./font-registry-mgdbNP8_.js";
2
- import { LayoutFont } from "document-schema.js";
1
+ import { t as FontRegistry } from "./font-registry-DtxRuSlj.js";
2
+ import { TextMeasurer, UnderlineMetrics } from "document-schema.js";
3
3
  //#region src/measure.d.ts
4
- interface UnderlineMetrics {
5
- readonly offsetPt: number;
6
- readonly thicknessPt: number;
7
- }
8
- interface TextMeasurer {
9
- widthOfTextAtSize(text: string, font: LayoutFont, sizePt: number): number;
10
- lineHeightAtSize(font: LayoutFont, sizePt: number): number;
11
- ascenderAtSize(font: LayoutFont, sizePt: number): number;
12
- descenderAtSize(font: LayoutFont, sizePt: number): number;
13
- underlineAtSize(font: LayoutFont, sizePt: number): UnderlineMetrics;
14
- horizontalScaleFor(font: LayoutFont): number;
15
- }
16
4
  type VerticalMetricPolicy = 'hhea' | 'os2Typo' | 'os2Win';
17
5
  declare const DEFAULT_VERTICAL_METRIC_POLICY: VerticalMetricPolicy;
18
6
  interface StandardFontMeasurerOptions {
@@ -24,4 +12,4 @@ interface FontMeasurerOptions extends StandardFontMeasurerOptions {
24
12
  declare function createFontMeasurer(registry?: FontRegistry, options?: FontMeasurerOptions): TextMeasurer;
25
13
  declare function createStandardFontMeasurer(options?: StandardFontMeasurerOptions): TextMeasurer;
26
14
  //#endregion
27
- export { DEFAULT_VERTICAL_METRIC_POLICY, FontMeasurerOptions, StandardFontMeasurerOptions, TextMeasurer, UnderlineMetrics, VerticalMetricPolicy, createFontMeasurer, createStandardFontMeasurer };
15
+ export { DEFAULT_VERTICAL_METRIC_POLICY, FontMeasurerOptions, StandardFontMeasurerOptions, type TextMeasurer, type UnderlineMetrics, VerticalMetricPolicy, createFontMeasurer, createStandardFontMeasurer };
package/dist/read.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { PdfDiagnosticSink } from "./diagnostics.cjs";
2
- import { r as Matrix } from "./matrix-BHzJESll.cjs";
2
+ import { r as Matrix } from "./matrix-CC7OdJhv.cjs";
3
3
  import { LayoutDocument } from "document-schema.js";
4
4
  //#region src/read.d.ts
5
5
  interface ReadPdfOptions {
package/dist/read.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { PdfDiagnosticSink } from "./diagnostics.js";
2
- import { r as Matrix } from "./matrix-BHzJESll.js";
2
+ import { r as Matrix } from "./matrix-CC7OdJhv.js";
3
3
  import { LayoutDocument } from "document-schema.js";
4
4
  //#region src/read.d.ts
5
5
  interface ReadPdfOptions {
@@ -1,37 +1,6 @@
1
- import { TextMeasurer } from "./measure.cjs";
2
- import { Color, LayoutFont } from "document-schema.js";
1
+ import { Color, LayoutFont, StyledFragment, StyledRun, TextMeasurer, WrapOptions, WrappedLine } from "document-schema.js";
3
2
  //#region src/text-layout.d.ts
4
- interface StyledRun {
5
- readonly text: string;
6
- readonly font: LayoutFont;
7
- readonly sizePt: number;
8
- readonly color: Color;
9
- readonly underline?: boolean;
10
- readonly hyperlink?: string;
11
- readonly sourcePath?: string;
12
- }
13
- interface StyledFragment {
14
- readonly text: string;
15
- readonly font: LayoutFont;
16
- readonly sizePt: number;
17
- readonly color: Color;
18
- readonly underline?: boolean;
19
- readonly hyperlink?: string;
20
- readonly sourcePath?: string;
21
- }
22
- interface WrappedLine {
23
- readonly fragments: readonly (StyledFragment & {
24
- readonly xOffsetPt: number;
25
- })[];
26
- readonly widthPt: number;
27
- readonly maxSizePt: number;
28
- readonly ascentPt: number;
29
- readonly descentPt: number;
30
- }
31
- interface WrapOptions {
32
- readonly breakLongWords?: boolean;
33
- }
34
3
  declare function wrapRunsToWidth(runs: readonly StyledRun[], measurer: TextMeasurer, maxWidthPt: number, options?: WrapOptions): WrappedLine[];
35
4
  declare function wrapTextToWidth(text: string, font: LayoutFont, sizePt: number, color: Color, measurer: TextMeasurer, maxWidthPt: number): string[];
36
5
  //#endregion
37
- export { StyledFragment, StyledRun, WrapOptions, WrappedLine, wrapRunsToWidth, wrapTextToWidth };
6
+ export { type StyledFragment, type StyledRun, type WrapOptions, type WrappedLine, wrapRunsToWidth, wrapTextToWidth };
@@ -1,37 +1,6 @@
1
- import { TextMeasurer } from "./measure.js";
2
- import { Color, LayoutFont } from "document-schema.js";
1
+ import { Color, LayoutFont, StyledFragment, StyledRun, TextMeasurer, WrapOptions, WrappedLine } from "document-schema.js";
3
2
  //#region src/text-layout.d.ts
4
- interface StyledRun {
5
- readonly text: string;
6
- readonly font: LayoutFont;
7
- readonly sizePt: number;
8
- readonly color: Color;
9
- readonly underline?: boolean;
10
- readonly hyperlink?: string;
11
- readonly sourcePath?: string;
12
- }
13
- interface StyledFragment {
14
- readonly text: string;
15
- readonly font: LayoutFont;
16
- readonly sizePt: number;
17
- readonly color: Color;
18
- readonly underline?: boolean;
19
- readonly hyperlink?: string;
20
- readonly sourcePath?: string;
21
- }
22
- interface WrappedLine {
23
- readonly fragments: readonly (StyledFragment & {
24
- readonly xOffsetPt: number;
25
- })[];
26
- readonly widthPt: number;
27
- readonly maxSizePt: number;
28
- readonly ascentPt: number;
29
- readonly descentPt: number;
30
- }
31
- interface WrapOptions {
32
- readonly breakLongWords?: boolean;
33
- }
34
3
  declare function wrapRunsToWidth(runs: readonly StyledRun[], measurer: TextMeasurer, maxWidthPt: number, options?: WrapOptions): WrappedLine[];
35
4
  declare function wrapTextToWidth(text: string, font: LayoutFont, sizePt: number, color: Color, measurer: TextMeasurer, maxWidthPt: number): string[];
36
5
  //#endregion
37
- export { StyledFragment, StyledRun, WrapOptions, WrappedLine, wrapRunsToWidth, wrapTextToWidth };
6
+ export { type StyledFragment, type StyledRun, type WrapOptions, type WrappedLine, wrapRunsToWidth, wrapTextToWidth };
package/dist/write.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { r as EmbeddedFaceSubstitution } from "./embedded-font-BU6Jgcof.cjs";
2
- import { t as FontRegistry } from "./font-registry-B5qL0Vi0.cjs";
2
+ import { t as FontRegistry } from "./font-registry-CpVgwmD0.cjs";
3
3
  import { WinAnsiSubstitution } from "./winansi.cjs";
4
4
  import { PositionedFormula } from "./formula.cjs";
5
5
  import { LayoutDocument } from "document-schema.js";
package/dist/write.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { r as EmbeddedFaceSubstitution } from "./embedded-font-fREdbxnr.js";
2
- import { t as FontRegistry } from "./font-registry-mgdbNP8_.js";
2
+ import { t as FontRegistry } from "./font-registry-DtxRuSlj.js";
3
3
  import { WinAnsiSubstitution } from "./winansi.js";
4
4
  import { PositionedFormula } from "./formula.js";
5
5
  import { LayoutDocument } from "document-schema.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pdf-codec",
3
- "version": "1.11.9",
3
+ "version": "1.11.11",
4
4
  "description": "Hand-written, dependency-minimal PDF codec: parses arbitrary real-world PDFs and generates new ones, built on document-schema.js's LayoutDocument pivot and Zod 4 codecs.",
5
5
  "type": "module",
6
6
  "repository": {
@@ -70,7 +70,7 @@
70
70
  "license": "MIT",
71
71
  "packageManager": "pnpm@11.6.0",
72
72
  "dependencies": {
73
- "document-schema.js": "^2.3.5",
73
+ "document-schema.js": "^2.4.0",
74
74
  "fflate": "^0.8.3",
75
75
  "zod": "^4.4.3"
76
76
  },
@@ -1,110 +0,0 @@
1
- import { t as MathStretchAxis } from "./math-stretch-DXWjs8gL.cjs";
2
- //#region src/math-types.d.ts
3
- interface MathColor {
4
- readonly r: number;
5
- readonly g: number;
6
- readonly b: number;
7
- }
8
- interface MathGlyphRun {
9
- readonly kind: 'glyphs';
10
- readonly xPt: number;
11
- readonly yPt: number;
12
- readonly text: string;
13
- readonly sizePt: number;
14
- readonly color: MathColor;
15
- }
16
- interface MathRule {
17
- readonly kind: 'rule';
18
- readonly xPt: number;
19
- readonly yPt: number;
20
- readonly widthPt: number;
21
- readonly heightPt: number;
22
- readonly color: MathColor;
23
- }
24
- interface MathStroke {
25
- readonly kind: 'stroke';
26
- readonly points: readonly {
27
- readonly xPt: number;
28
- readonly yPt: number;
29
- }[];
30
- readonly widthPt: number;
31
- readonly color: MathColor;
32
- }
33
- interface MathGlyphPlacement {
34
- readonly glyphId: number;
35
- readonly xPt: number;
36
- readonly yPt: number;
37
- }
38
- interface MathAssembledGlyphs {
39
- readonly kind: 'assembled-glyphs';
40
- readonly placements: readonly MathGlyphPlacement[];
41
- readonly text: string;
42
- readonly sizePt: number;
43
- readonly color: MathColor;
44
- }
45
- type MathLayoutItem = MathGlyphRun | MathRule | MathStroke | MathAssembledGlyphs;
46
- interface MathBox {
47
- readonly widthPt: number;
48
- readonly heightPt: number;
49
- readonly ascentPt: number;
50
- readonly descentPt: number;
51
- readonly items: readonly MathLayoutItem[];
52
- }
53
- interface MathGlyphMetrics {
54
- readonly advanceWidthPt: number;
55
- readonly italicCorrectionPt: number;
56
- readonly topAccentXPt?: number;
57
- readonly inkAscentPt?: number;
58
- readonly inkDescentPt?: number;
59
- }
60
- interface MathStretchGlyph {
61
- readonly glyphId: number;
62
- readonly offsetPt: number;
63
- }
64
- interface MathStretchResult {
65
- readonly kind: 'base' | 'variant' | 'assembly';
66
- readonly sizePt: number;
67
- readonly advanceWidthPt: number;
68
- readonly inkAscentPt: number;
69
- readonly inkDescentPt: number;
70
- readonly placements: readonly MathStretchGlyph[];
71
- }
72
- interface MathFontMetrics {
73
- readonly ascentPerEm: number;
74
- readonly descentPerEm: number;
75
- readonly axisHeightPt: number;
76
- readonly fractionRuleThicknessPt: number;
77
- readonly fractionNumeratorShiftUpPt: number;
78
- readonly fractionNumeratorDisplayShiftUpPt: number;
79
- readonly fractionDenominatorShiftDownPt: number;
80
- readonly fractionDenominatorDisplayShiftDownPt: number;
81
- readonly fractionNumeratorGapMinPt: number;
82
- readonly fractionDenominatorGapMinPt: number;
83
- readonly radicalRuleThicknessPt: number;
84
- readonly radicalExtraAscenderPt: number;
85
- readonly radicalVerticalGapPt: number;
86
- readonly radicalKernBeforeDegreePt: number;
87
- readonly radicalKernAfterDegreePt: number;
88
- readonly radicalDegreeBottomRaisePercent: number;
89
- readonly subscriptShiftDownPt: number;
90
- readonly superscriptShiftUpPt: number;
91
- readonly superscriptShiftUpCrampedPt: number;
92
- readonly subSuperscriptGapMinPt: number;
93
- readonly superscriptBaselineDropMaxPt: number;
94
- readonly subscriptBaselineDropMinPt: number;
95
- readonly spaceAfterScriptPt: number;
96
- readonly upperLimitGapMinPt: number;
97
- readonly upperLimitBaselineRiseMinPt: number;
98
- readonly lowerLimitGapMinPt: number;
99
- readonly lowerLimitBaselineDropMinPt: number;
100
- readonly stackTopShiftUpPt: number;
101
- readonly stackBottomShiftDownPt: number;
102
- readonly stackGapMinPt: number;
103
- readonly scriptPercentScaleDown: number;
104
- readonly scriptScriptPercentScaleDown: number;
105
- readonly defaultRuleThicknessPt: number;
106
- glyph(codePoint: number, sizePt: number): MathGlyphMetrics | undefined;
107
- stretch(codePoint: number, axis: MathStretchAxis, targetSizePt: number, sizePt: number): MathStretchResult | undefined;
108
- }
109
- //#endregion
110
- export { MathGlyphMetrics as a, MathLayoutItem as c, MathStretchResult as d, MathStroke as f, MathFontMetrics as i, MathRule as l, MathBox as n, MathGlyphPlacement as o, MathColor as r, MathGlyphRun as s, MathAssembledGlyphs as t, MathStretchGlyph as u };
@@ -1,110 +0,0 @@
1
- import { t as MathStretchAxis } from "./math-stretch-Bwk_bxh1.js";
2
- //#region src/math-types.d.ts
3
- interface MathColor {
4
- readonly r: number;
5
- readonly g: number;
6
- readonly b: number;
7
- }
8
- interface MathGlyphRun {
9
- readonly kind: 'glyphs';
10
- readonly xPt: number;
11
- readonly yPt: number;
12
- readonly text: string;
13
- readonly sizePt: number;
14
- readonly color: MathColor;
15
- }
16
- interface MathRule {
17
- readonly kind: 'rule';
18
- readonly xPt: number;
19
- readonly yPt: number;
20
- readonly widthPt: number;
21
- readonly heightPt: number;
22
- readonly color: MathColor;
23
- }
24
- interface MathStroke {
25
- readonly kind: 'stroke';
26
- readonly points: readonly {
27
- readonly xPt: number;
28
- readonly yPt: number;
29
- }[];
30
- readonly widthPt: number;
31
- readonly color: MathColor;
32
- }
33
- interface MathGlyphPlacement {
34
- readonly glyphId: number;
35
- readonly xPt: number;
36
- readonly yPt: number;
37
- }
38
- interface MathAssembledGlyphs {
39
- readonly kind: 'assembled-glyphs';
40
- readonly placements: readonly MathGlyphPlacement[];
41
- readonly text: string;
42
- readonly sizePt: number;
43
- readonly color: MathColor;
44
- }
45
- type MathLayoutItem = MathGlyphRun | MathRule | MathStroke | MathAssembledGlyphs;
46
- interface MathBox {
47
- readonly widthPt: number;
48
- readonly heightPt: number;
49
- readonly ascentPt: number;
50
- readonly descentPt: number;
51
- readonly items: readonly MathLayoutItem[];
52
- }
53
- interface MathGlyphMetrics {
54
- readonly advanceWidthPt: number;
55
- readonly italicCorrectionPt: number;
56
- readonly topAccentXPt?: number;
57
- readonly inkAscentPt?: number;
58
- readonly inkDescentPt?: number;
59
- }
60
- interface MathStretchGlyph {
61
- readonly glyphId: number;
62
- readonly offsetPt: number;
63
- }
64
- interface MathStretchResult {
65
- readonly kind: 'base' | 'variant' | 'assembly';
66
- readonly sizePt: number;
67
- readonly advanceWidthPt: number;
68
- readonly inkAscentPt: number;
69
- readonly inkDescentPt: number;
70
- readonly placements: readonly MathStretchGlyph[];
71
- }
72
- interface MathFontMetrics {
73
- readonly ascentPerEm: number;
74
- readonly descentPerEm: number;
75
- readonly axisHeightPt: number;
76
- readonly fractionRuleThicknessPt: number;
77
- readonly fractionNumeratorShiftUpPt: number;
78
- readonly fractionNumeratorDisplayShiftUpPt: number;
79
- readonly fractionDenominatorShiftDownPt: number;
80
- readonly fractionDenominatorDisplayShiftDownPt: number;
81
- readonly fractionNumeratorGapMinPt: number;
82
- readonly fractionDenominatorGapMinPt: number;
83
- readonly radicalRuleThicknessPt: number;
84
- readonly radicalExtraAscenderPt: number;
85
- readonly radicalVerticalGapPt: number;
86
- readonly radicalKernBeforeDegreePt: number;
87
- readonly radicalKernAfterDegreePt: number;
88
- readonly radicalDegreeBottomRaisePercent: number;
89
- readonly subscriptShiftDownPt: number;
90
- readonly superscriptShiftUpPt: number;
91
- readonly superscriptShiftUpCrampedPt: number;
92
- readonly subSuperscriptGapMinPt: number;
93
- readonly superscriptBaselineDropMaxPt: number;
94
- readonly subscriptBaselineDropMinPt: number;
95
- readonly spaceAfterScriptPt: number;
96
- readonly upperLimitGapMinPt: number;
97
- readonly upperLimitBaselineRiseMinPt: number;
98
- readonly lowerLimitGapMinPt: number;
99
- readonly lowerLimitBaselineDropMinPt: number;
100
- readonly stackTopShiftUpPt: number;
101
- readonly stackBottomShiftDownPt: number;
102
- readonly stackGapMinPt: number;
103
- readonly scriptPercentScaleDown: number;
104
- readonly scriptScriptPercentScaleDown: number;
105
- readonly defaultRuleThicknessPt: number;
106
- glyph(codePoint: number, sizePt: number): MathGlyphMetrics | undefined;
107
- stretch(codePoint: number, axis: MathStretchAxis, targetSizePt: number, sizePt: number): MathStretchResult | undefined;
108
- }
109
- //#endregion
110
- export { MathGlyphMetrics as a, MathLayoutItem as c, MathStretchResult as d, MathStroke as f, MathFontMetrics as i, MathRule as l, MathBox as n, MathGlyphPlacement as o, MathColor as r, MathGlyphRun as s, MathAssembledGlyphs as t, MathStretchGlyph as u };
File without changes
@@ -1,3 +0,0 @@
1
- import { t as MathStretchAxis } from "./math-stretch-DXWjs8gL.cjs";
2
- import { a as MathGlyphMetrics, c as MathLayoutItem, d as MathStretchResult, f as MathStroke, i as MathFontMetrics, l as MathRule, n as MathBox, o as MathGlyphPlacement, r as MathColor, s as MathGlyphRun, t as MathAssembledGlyphs, u as MathStretchGlyph } from "./math-types-BZkWO5Ow.cjs";
3
- export { MathAssembledGlyphs, MathBox, MathColor, MathFontMetrics, MathGlyphMetrics, MathGlyphPlacement, MathGlyphRun, MathLayoutItem, MathRule, type MathStretchAxis, MathStretchGlyph, MathStretchResult, MathStroke };
@@ -1,3 +0,0 @@
1
- import { t as MathStretchAxis } from "./math-stretch-Bwk_bxh1.js";
2
- import { a as MathGlyphMetrics, c as MathLayoutItem, d as MathStretchResult, f as MathStroke, i as MathFontMetrics, l as MathRule, n as MathBox, o as MathGlyphPlacement, r as MathColor, s as MathGlyphRun, t as MathAssembledGlyphs, u as MathStretchGlyph } from "./math-types-Bq7tyV4g.js";
3
- export { MathAssembledGlyphs, MathBox, MathColor, MathFontMetrics, MathGlyphMetrics, MathGlyphPlacement, MathGlyphRun, MathLayoutItem, MathRule, type MathStretchAxis, MathStretchGlyph, MathStretchResult, MathStroke };
File without changes