pdf-codec 2.2.2 → 2.2.3
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.
- package/dist/content-write.d.cts +2 -3
- package/dist/content-write.d.ts +2 -3
- package/dist/font-registry.d.cts +19 -2
- package/dist/font-registry.d.ts +19 -2
- package/dist/index.d.cts +3 -6
- package/dist/index.d.ts +3 -6
- package/dist/interpret.d.cts +1 -1
- package/dist/interpret.d.ts +1 -1
- package/dist/math-content-write.d.cts +1 -1
- package/dist/math-content-write.d.ts +1 -1
- package/dist/{matrix-CC7OdJhv.d.cts → matrix-B7_SBKQ5.d.cts} +1 -1
- package/dist/{matrix-CC7OdJhv.d.ts → matrix-B7_SBKQ5.d.ts} +1 -1
- package/dist/matrix.d.cts +2 -2
- package/dist/matrix.d.ts +2 -2
- package/dist/measure.d.cts +3 -3
- package/dist/measure.d.ts +3 -3
- package/dist/read.d.cts +1 -1
- package/dist/read.d.ts +1 -1
- package/dist/text-layout.d.cts +2 -2
- package/dist/text-layout.d.ts +2 -2
- package/dist/write.d.cts +2 -3
- package/dist/write.d.ts +2 -3
- package/package.json +3 -2
- package/dist/font-registry-CpVgwmD0.d.cts +0 -19
- package/dist/font-registry-DtxRuSlj.d.ts +0 -19
- package/dist/formula.cjs +0 -0
- package/dist/formula.d.cts +0 -2
- package/dist/formula.d.ts +0 -2
- package/dist/formula.js +0 -0
package/dist/content-write.d.cts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
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 as TextMeasurer$1 } from "./measure.cjs";
|
|
4
3
|
import { WinAnsiSubstitution } from "./winansi.cjs";
|
|
5
|
-
import { LayoutFont, LayoutItem } from "document-schema.js";
|
|
4
|
+
import { LayoutFont, LayoutItem, TextMeasurer } from "document-schema.js";
|
|
6
5
|
//#region src/content-write.d.ts
|
|
7
6
|
type ResolvedFontResource = {
|
|
8
7
|
readonly kind: 'standard';
|
|
@@ -17,7 +16,7 @@ interface ResolvedImageResource {
|
|
|
17
16
|
readonly resourceName: string;
|
|
18
17
|
}
|
|
19
18
|
interface ContentWriteContext {
|
|
20
|
-
readonly measurer: TextMeasurer
|
|
19
|
+
readonly measurer: TextMeasurer;
|
|
21
20
|
resolveFont(font: LayoutFont): ResolvedFontResource;
|
|
22
21
|
resolveImage(imageId: string): ResolvedImageResource;
|
|
23
22
|
}
|
package/dist/content-write.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
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 as TextMeasurer$1 } from "./measure.js";
|
|
4
3
|
import { WinAnsiSubstitution } from "./winansi.js";
|
|
5
|
-
import { LayoutFont, LayoutItem } from "document-schema.js";
|
|
4
|
+
import { LayoutFont, LayoutItem, TextMeasurer } from "document-schema.js";
|
|
6
5
|
//#region src/content-write.d.ts
|
|
7
6
|
type ResolvedFontResource = {
|
|
8
7
|
readonly kind: 'standard';
|
|
@@ -17,7 +16,7 @@ interface ResolvedImageResource {
|
|
|
17
16
|
readonly resourceName: string;
|
|
18
17
|
}
|
|
19
18
|
interface ContentWriteContext {
|
|
20
|
-
readonly measurer: TextMeasurer
|
|
19
|
+
readonly measurer: TextMeasurer;
|
|
21
20
|
resolveFont(font: LayoutFont): ResolvedFontResource;
|
|
22
21
|
resolveImage(imageId: string): ResolvedImageResource;
|
|
23
22
|
}
|
package/dist/font-registry.d.cts
CHANGED
|
@@ -1,2 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { r as StandardFontName } from "./afm-widths-DyDq56Ph.cjs";
|
|
2
|
+
import { t as EmbeddedFace } from "./embedded-font-BU6Jgcof.cjs";
|
|
3
|
+
import { FontRegistryOptions, LayoutFont } from "document-schema.js";
|
|
4
|
+
//#region src/font-registry.d.ts
|
|
5
|
+
type ResolvedFace = {
|
|
6
|
+
readonly kind: 'embedded';
|
|
7
|
+
readonly face: EmbeddedFace;
|
|
8
|
+
} | {
|
|
9
|
+
readonly kind: 'standard';
|
|
10
|
+
readonly standardName: StandardFontName;
|
|
11
|
+
readonly matched: boolean;
|
|
12
|
+
};
|
|
13
|
+
interface FontRegistry {
|
|
14
|
+
resolve(font: LayoutFont): ResolvedFace;
|
|
15
|
+
}
|
|
16
|
+
declare function createFontRegistry(options?: FontRegistryOptions): FontRegistry;
|
|
17
|
+
declare function resolveFaceWithRegistry(registry: FontRegistry | undefined, font: LayoutFont): ResolvedFace;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { FontRegistry, ResolvedFace, createFontRegistry, resolveFaceWithRegistry };
|
package/dist/font-registry.d.ts
CHANGED
|
@@ -1,2 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { r as StandardFontName } from "./afm-widths-DyDq56Ph.js";
|
|
2
|
+
import { t as EmbeddedFace } from "./embedded-font-fREdbxnr.js";
|
|
3
|
+
import { FontRegistryOptions, LayoutFont } from "document-schema.js";
|
|
4
|
+
//#region src/font-registry.d.ts
|
|
5
|
+
type ResolvedFace = {
|
|
6
|
+
readonly kind: 'embedded';
|
|
7
|
+
readonly face: EmbeddedFace;
|
|
8
|
+
} | {
|
|
9
|
+
readonly kind: 'standard';
|
|
10
|
+
readonly standardName: StandardFontName;
|
|
11
|
+
readonly matched: boolean;
|
|
12
|
+
};
|
|
13
|
+
interface FontRegistry {
|
|
14
|
+
resolve(font: LayoutFont): ResolvedFace;
|
|
15
|
+
}
|
|
16
|
+
declare function createFontRegistry(options?: FontRegistryOptions): FontRegistry;
|
|
17
|
+
declare function resolveFaceWithRegistry(registry: FontRegistry | undefined, font: LayoutFont): ResolvedFace;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { FontRegistry, ResolvedFace, createFontRegistry, resolveFaceWithRegistry };
|
package/dist/index.d.cts
CHANGED
|
@@ -3,13 +3,10 @@ import { t as GlyphInkBounds } from "./glyph-bounds-BV_Z40KS.cjs";
|
|
|
3
3
|
import { NOOP_DIAGNOSTIC_SINK, PdfDiagnostic, PdfDiagnosticSeverity, PdfDiagnosticSink, PdfEncryptedError, PdfParseError, PdfPasswordRequiredError } from "./diagnostics.cjs";
|
|
4
4
|
import { PdfBytesSchema, pdfCodec } from "./codec.cjs";
|
|
5
5
|
import { n as EmbeddedFaceMetrics, r as EmbeddedFaceSubstitution, t as EmbeddedFace } from "./embedded-font-BU6Jgcof.cjs";
|
|
6
|
-
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";
|
|
7
|
-
import { DEFAULT_VERTICAL_METRIC_POLICY, FontMeasurerOptions, StandardFontMeasurerOptions, TextMeasurer, UnderlineMetrics, VerticalMetricPolicy, createFontMeasurer, createStandardFontMeasurer } from "./measure.cjs";
|
|
8
6
|
import { WinAnsiSubstitution } from "./winansi.cjs";
|
|
9
7
|
import { FontFace, FontFaceParseError, readFontFace } from "./font-face.cjs";
|
|
10
|
-
import {
|
|
8
|
+
import { FontRegistry, ResolvedFace, createFontRegistry, resolveFaceWithRegistry } from "./font-registry.cjs";
|
|
11
9
|
import { ResolvedFont, resolveStandardFont } from "./fonts.cjs";
|
|
12
|
-
import { PositionedFormula } from "./formula.cjs";
|
|
13
10
|
import { CcittFaxImage, CcittFaxOptions, decodeCcittFax } from "./image/ccitt.cjs";
|
|
14
11
|
import { n as Jbig2UnsupportedError, t as Jbig2ParseError } from "./jbig2-errors-Bj6MPxrx.cjs";
|
|
15
12
|
import { Jbig2DecodeOptions, Jbig2Image, decodeJbig2Embedded } from "./image/jbig2.cjs";
|
|
@@ -23,7 +20,7 @@ import { WritePdfOptions, writePdf } from "./write.cjs";
|
|
|
23
20
|
import { a as MathGlyphPart, c as MathVariants, n as MathGlyphAssembly, o as MathGlyphVariant, r as MathGlyphConstruction } from "./math-table-gFNB8DmQ.cjs";
|
|
24
21
|
import { a as scaleMathStretchConstruction, i as assembleStretchyGlyph, n as MathStretchOptions, r as MathStretchPlacement, t as MathStretchConstruction } from "./math-stretch-E26z6byT.cjs";
|
|
25
22
|
import { LoadedMathFont, MathFont, MathFontDescriptorMetrics, loadMathFont } from "./math-font.cjs";
|
|
26
|
-
import {
|
|
27
|
-
import { MathAssembledGlyphs, MathBox, MathColor, MathFontMetrics, MathGlyphMetrics, MathGlyphPlacement, MathGlyphRun, MathLayoutItem, MathRule, MathStretchAxis, MathStretchGlyph, MathStretchResult, MathStroke } from "document-schema.js";
|
|
23
|
+
import { DEFAULT_VERTICAL_METRIC_POLICY, FontMeasurerOptions, StandardFontMeasurerOptions, VerticalMetricPolicy, createFontMeasurer, createStandardFontMeasurer } from "./measure.cjs";
|
|
24
|
+
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";
|
|
28
25
|
export * from "byte-codec";
|
|
29
26
|
export { type CcittFaxImage, type CcittFaxOptions, DEFAULT_VERTICAL_METRIC_POLICY, type EmbeddedFace, type EmbeddedFaceMetrics, type EmbeddedFaceSubstitution, type FontFace, FontFaceParseError, type FontMeasurerOptions, type FontMetrics, type FontRegistry, type FontRegistryOptions, type FontSubstitution, type GlyphInkBounds, 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 LoadedMathFont, 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 Point, type PositionedFormula, type ProvidedFont, 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, createFontMeasurer, createFontRegistry, createStandardFontMeasurer, decodeCcittFax, decodeJbig2Embedded, decodeJpeg2000, filterScanlines, loadMathFont, looksLikeBareCodestream, parseJp2Container, pdfCodec, readFontFace, readJpeg2000Metadata, readPdf, resolveFaceWithRegistry, resolveStandardFont, scaleMathStretchConstruction, unfilterScanlines, writePdf };
|
package/dist/index.d.ts
CHANGED
|
@@ -3,13 +3,10 @@ import { t as GlyphInkBounds } from "./glyph-bounds-BV_Z40KS.js";
|
|
|
3
3
|
import { NOOP_DIAGNOSTIC_SINK, PdfDiagnostic, PdfDiagnosticSeverity, PdfDiagnosticSink, PdfEncryptedError, PdfParseError, PdfPasswordRequiredError } from "./diagnostics.js";
|
|
4
4
|
import { PdfBytesSchema, pdfCodec } from "./codec.js";
|
|
5
5
|
import { n as EmbeddedFaceMetrics, r as EmbeddedFaceSubstitution, t as EmbeddedFace } from "./embedded-font-fREdbxnr.js";
|
|
6
|
-
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";
|
|
7
|
-
import { DEFAULT_VERTICAL_METRIC_POLICY, FontMeasurerOptions, StandardFontMeasurerOptions, TextMeasurer, UnderlineMetrics, VerticalMetricPolicy, createFontMeasurer, createStandardFontMeasurer } from "./measure.js";
|
|
8
6
|
import { WinAnsiSubstitution } from "./winansi.js";
|
|
9
7
|
import { FontFace, FontFaceParseError, readFontFace } from "./font-face.js";
|
|
10
|
-
import {
|
|
8
|
+
import { FontRegistry, ResolvedFace, createFontRegistry, resolveFaceWithRegistry } from "./font-registry.js";
|
|
11
9
|
import { ResolvedFont, resolveStandardFont } from "./fonts.js";
|
|
12
|
-
import { PositionedFormula } from "./formula.js";
|
|
13
10
|
import { CcittFaxImage, CcittFaxOptions, decodeCcittFax } from "./image/ccitt.js";
|
|
14
11
|
import { n as Jbig2UnsupportedError, t as Jbig2ParseError } from "./jbig2-errors-Bj6MPxrx.js";
|
|
15
12
|
import { Jbig2DecodeOptions, Jbig2Image, decodeJbig2Embedded } from "./image/jbig2.js";
|
|
@@ -23,7 +20,7 @@ import { WritePdfOptions, writePdf } from "./write.js";
|
|
|
23
20
|
import { a as MathGlyphPart, c as MathVariants, n as MathGlyphAssembly, o as MathGlyphVariant, r as MathGlyphConstruction } from "./math-table-DhPrNoPa.js";
|
|
24
21
|
import { a as scaleMathStretchConstruction, i as assembleStretchyGlyph, n as MathStretchOptions, r as MathStretchPlacement, t as MathStretchConstruction } from "./math-stretch-a_rHNRvc.js";
|
|
25
22
|
import { LoadedMathFont, MathFont, MathFontDescriptorMetrics, loadMathFont } from "./math-font.js";
|
|
26
|
-
import {
|
|
27
|
-
import { MathAssembledGlyphs, MathBox, MathColor, MathFontMetrics, MathGlyphMetrics, MathGlyphPlacement, MathGlyphRun, MathLayoutItem, MathRule, MathStretchAxis, MathStretchGlyph, MathStretchResult, MathStroke } from "document-schema.js";
|
|
23
|
+
import { DEFAULT_VERTICAL_METRIC_POLICY, FontMeasurerOptions, StandardFontMeasurerOptions, VerticalMetricPolicy, createFontMeasurer, createStandardFontMeasurer } from "./measure.js";
|
|
24
|
+
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";
|
|
28
25
|
export * from "byte-codec";
|
|
29
26
|
export { type CcittFaxImage, type CcittFaxOptions, DEFAULT_VERTICAL_METRIC_POLICY, type EmbeddedFace, type EmbeddedFaceMetrics, type EmbeddedFaceSubstitution, type FontFace, FontFaceParseError, type FontMeasurerOptions, type FontMetrics, type FontRegistry, type FontRegistryOptions, type FontSubstitution, type GlyphInkBounds, 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 LoadedMathFont, 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 Point, type PositionedFormula, type ProvidedFont, 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, createFontMeasurer, createFontRegistry, createStandardFontMeasurer, decodeCcittFax, decodeJbig2Embedded, decodeJpeg2000, filterScanlines, loadMathFont, looksLikeBareCodestream, parseJp2Container, pdfCodec, readFontFace, readJpeg2000Metadata, readPdf, resolveFaceWithRegistry, resolveStandardFont, scaleMathStretchConstruction, unfilterScanlines, writePdf };
|
package/dist/interpret.d.cts
CHANGED
|
@@ -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-
|
|
3
|
+
import { r as Matrix } from "./matrix-B7_SBKQ5.cjs";
|
|
4
4
|
import { Color } from "document-schema.js";
|
|
5
5
|
//#region src/interpret.d.ts
|
|
6
6
|
interface ExtractedTextRun {
|
package/dist/interpret.d.ts
CHANGED
|
@@ -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-
|
|
3
|
+
import { r as Matrix } from "./matrix-B7_SBKQ5.js";
|
|
4
4
|
import { Color } from "document-schema.js";
|
|
5
5
|
//#region src/interpret.d.ts
|
|
6
6
|
interface ExtractedTextRun {
|
|
@@ -13,4 +13,4 @@ declare function matrixScaleY(m: Matrix): number;
|
|
|
13
13
|
declare function matrixRotationDegrees(m: Matrix): number;
|
|
14
14
|
declare function rotatePointAboutCenter(point: Point, center: Point, degrees: number): Point;
|
|
15
15
|
//#endregion
|
|
16
|
-
export {
|
|
16
|
+
export { matrixRotationDegrees as a, multiplyMatrices as c, scaleMatrix as d, translationMatrix as f, applyMatrix as i, rotatePointAboutCenter as l, IDENTITY_MATRIX as n, matrixScaleX as o, Matrix as r, matrixScaleY as s, BEZIER_KAPPA as t, rotationMatrix as u };
|
|
@@ -13,4 +13,4 @@ declare function matrixScaleY(m: Matrix): number;
|
|
|
13
13
|
declare function matrixRotationDegrees(m: Matrix): number;
|
|
14
14
|
declare function rotatePointAboutCenter(point: Point, center: Point, degrees: number): Point;
|
|
15
15
|
//#endregion
|
|
16
|
-
export {
|
|
16
|
+
export { matrixRotationDegrees as a, multiplyMatrices as c, scaleMatrix as d, translationMatrix as f, applyMatrix as i, rotatePointAboutCenter as l, IDENTITY_MATRIX as n, matrixScaleX as o, Matrix as r, matrixScaleY as s, BEZIER_KAPPA as t, rotationMatrix as u };
|
package/dist/matrix.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
export { BEZIER_KAPPA, IDENTITY_MATRIX, Matrix,
|
|
1
|
+
import { a as matrixRotationDegrees, c as multiplyMatrices, d as scaleMatrix, f as translationMatrix, i as applyMatrix, l as rotatePointAboutCenter, n as IDENTITY_MATRIX, o as matrixScaleX, r as Matrix, s as matrixScaleY, t as BEZIER_KAPPA, u as rotationMatrix } from "./matrix-B7_SBKQ5.cjs";
|
|
2
|
+
export { BEZIER_KAPPA, IDENTITY_MATRIX, Matrix, applyMatrix, matrixRotationDegrees, matrixScaleX, matrixScaleY, multiplyMatrices, rotatePointAboutCenter, rotationMatrix, scaleMatrix, translationMatrix };
|
package/dist/matrix.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
export { BEZIER_KAPPA, IDENTITY_MATRIX, Matrix,
|
|
1
|
+
import { a as matrixRotationDegrees, c as multiplyMatrices, d as scaleMatrix, f as translationMatrix, i as applyMatrix, l as rotatePointAboutCenter, n as IDENTITY_MATRIX, o as matrixScaleX, r as Matrix, s as matrixScaleY, t as BEZIER_KAPPA, u as rotationMatrix } from "./matrix-B7_SBKQ5.js";
|
|
2
|
+
export { BEZIER_KAPPA, IDENTITY_MATRIX, Matrix, applyMatrix, matrixRotationDegrees, matrixScaleX, matrixScaleY, multiplyMatrices, rotatePointAboutCenter, rotationMatrix, scaleMatrix, translationMatrix };
|
package/dist/measure.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { TextMeasurer
|
|
1
|
+
import { FontRegistry } from "./font-registry.cjs";
|
|
2
|
+
import { TextMeasurer } from "document-schema.js";
|
|
3
3
|
//#region src/measure.d.ts
|
|
4
4
|
type VerticalMetricPolicy = 'hhea' | 'os2Typo' | 'os2Win';
|
|
5
5
|
declare const DEFAULT_VERTICAL_METRIC_POLICY: VerticalMetricPolicy;
|
|
@@ -12,4 +12,4 @@ interface FontMeasurerOptions extends StandardFontMeasurerOptions {
|
|
|
12
12
|
declare function createFontMeasurer(registry?: FontRegistry, options?: FontMeasurerOptions): TextMeasurer;
|
|
13
13
|
declare function createStandardFontMeasurer(options?: StandardFontMeasurerOptions): TextMeasurer;
|
|
14
14
|
//#endregion
|
|
15
|
-
export { DEFAULT_VERTICAL_METRIC_POLICY, FontMeasurerOptions, StandardFontMeasurerOptions,
|
|
15
|
+
export { DEFAULT_VERTICAL_METRIC_POLICY, FontMeasurerOptions, StandardFontMeasurerOptions, VerticalMetricPolicy, createFontMeasurer, createStandardFontMeasurer };
|
package/dist/measure.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { TextMeasurer
|
|
1
|
+
import { FontRegistry } from "./font-registry.js";
|
|
2
|
+
import { TextMeasurer } from "document-schema.js";
|
|
3
3
|
//#region src/measure.d.ts
|
|
4
4
|
type VerticalMetricPolicy = 'hhea' | 'os2Typo' | 'os2Win';
|
|
5
5
|
declare const DEFAULT_VERTICAL_METRIC_POLICY: VerticalMetricPolicy;
|
|
@@ -12,4 +12,4 @@ interface FontMeasurerOptions extends StandardFontMeasurerOptions {
|
|
|
12
12
|
declare function createFontMeasurer(registry?: FontRegistry, options?: FontMeasurerOptions): TextMeasurer;
|
|
13
13
|
declare function createStandardFontMeasurer(options?: StandardFontMeasurerOptions): TextMeasurer;
|
|
14
14
|
//#endregion
|
|
15
|
-
export { DEFAULT_VERTICAL_METRIC_POLICY, FontMeasurerOptions, StandardFontMeasurerOptions,
|
|
15
|
+
export { DEFAULT_VERTICAL_METRIC_POLICY, FontMeasurerOptions, StandardFontMeasurerOptions, 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-
|
|
2
|
+
import { r as Matrix } from "./matrix-B7_SBKQ5.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-
|
|
2
|
+
import { r as Matrix } from "./matrix-B7_SBKQ5.js";
|
|
3
3
|
import { LayoutDocument } from "document-schema.js";
|
|
4
4
|
//#region src/read.d.ts
|
|
5
5
|
interface ReadPdfOptions {
|
package/dist/text-layout.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Color, LayoutFont,
|
|
1
|
+
import { Color, LayoutFont, StyledRun, TextMeasurer, WrapOptions, WrappedLine } from "document-schema.js";
|
|
2
2
|
//#region src/text-layout.d.ts
|
|
3
3
|
declare function wrapRunsToWidth(runs: readonly StyledRun[], measurer: TextMeasurer, maxWidthPt: number, options?: WrapOptions): WrappedLine[];
|
|
4
4
|
declare function wrapTextToWidth(text: string, font: LayoutFont, sizePt: number, color: Color, measurer: TextMeasurer, maxWidthPt: number): string[];
|
|
5
5
|
//#endregion
|
|
6
|
-
export {
|
|
6
|
+
export { wrapRunsToWidth, wrapTextToWidth };
|
package/dist/text-layout.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Color, LayoutFont,
|
|
1
|
+
import { Color, LayoutFont, StyledRun, TextMeasurer, WrapOptions, WrappedLine } from "document-schema.js";
|
|
2
2
|
//#region src/text-layout.d.ts
|
|
3
3
|
declare function wrapRunsToWidth(runs: readonly StyledRun[], measurer: TextMeasurer, maxWidthPt: number, options?: WrapOptions): WrappedLine[];
|
|
4
4
|
declare function wrapTextToWidth(text: string, font: LayoutFont, sizePt: number, color: Color, measurer: TextMeasurer, maxWidthPt: number): string[];
|
|
5
5
|
//#endregion
|
|
6
|
-
export {
|
|
6
|
+
export { wrapRunsToWidth, wrapTextToWidth };
|
package/dist/write.d.cts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { r as EmbeddedFaceSubstitution } from "./embedded-font-BU6Jgcof.cjs";
|
|
2
|
-
import { t as FontRegistry } from "./font-registry-CpVgwmD0.cjs";
|
|
3
2
|
import { WinAnsiSubstitution } from "./winansi.cjs";
|
|
4
|
-
import {
|
|
5
|
-
import { LayoutDocument } from "document-schema.js";
|
|
3
|
+
import { FontRegistry } from "./font-registry.cjs";
|
|
4
|
+
import { LayoutDocument, PositionedFormula } from "document-schema.js";
|
|
6
5
|
//#region src/write.d.ts
|
|
7
6
|
interface WritePdfOptions {
|
|
8
7
|
readonly compress?: boolean;
|
package/dist/write.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { r as EmbeddedFaceSubstitution } from "./embedded-font-fREdbxnr.js";
|
|
2
|
-
import { t as FontRegistry } from "./font-registry-DtxRuSlj.js";
|
|
3
2
|
import { WinAnsiSubstitution } from "./winansi.js";
|
|
4
|
-
import {
|
|
5
|
-
import { LayoutDocument } from "document-schema.js";
|
|
3
|
+
import { FontRegistry } from "./font-registry.js";
|
|
4
|
+
import { LayoutDocument, PositionedFormula } from "document-schema.js";
|
|
6
5
|
//#region src/write.d.ts
|
|
7
6
|
interface WritePdfOptions {
|
|
8
7
|
readonly compress?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pdf-codec",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.3",
|
|
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": {
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"packageManager": "pnpm@11.6.0",
|
|
82
82
|
"dependencies": {
|
|
83
83
|
"byte-codec": "^1.0.4",
|
|
84
|
-
"document-schema.js": "^2.7.
|
|
84
|
+
"document-schema.js": "^2.7.2",
|
|
85
85
|
"fflate": "^0.8.3",
|
|
86
86
|
"zod": "^4.4.3"
|
|
87
87
|
},
|
|
@@ -91,6 +91,7 @@
|
|
|
91
91
|
"@commitlint/cli": "^21.2.1",
|
|
92
92
|
"@commitlint/config-conventional": "^21.2.0",
|
|
93
93
|
"@eslint/js": "^10.0.1",
|
|
94
|
+
"@exadev/eslint-config": "^1.2.0",
|
|
94
95
|
"@semantic-release/changelog": "^7.0.0",
|
|
95
96
|
"@semantic-release/git": "^11.0.1",
|
|
96
97
|
"@types/node": "^26.1.1",
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { r as StandardFontName } from "./afm-widths-DyDq56Ph.cjs";
|
|
2
|
-
import { t as EmbeddedFace } from "./embedded-font-BU6Jgcof.cjs";
|
|
3
|
-
import { FontRegistryOptions, FontSubstitution, LayoutFont, ProvidedFont } from "document-schema.js";
|
|
4
|
-
//#region src/font-registry.d.ts
|
|
5
|
-
type ResolvedFace = {
|
|
6
|
-
readonly kind: 'embedded';
|
|
7
|
-
readonly face: EmbeddedFace;
|
|
8
|
-
} | {
|
|
9
|
-
readonly kind: 'standard';
|
|
10
|
-
readonly standardName: StandardFontName;
|
|
11
|
-
readonly matched: boolean;
|
|
12
|
-
};
|
|
13
|
-
interface FontRegistry {
|
|
14
|
-
resolve(font: LayoutFont): ResolvedFace;
|
|
15
|
-
}
|
|
16
|
-
declare function createFontRegistry(options?: FontRegistryOptions): FontRegistry;
|
|
17
|
-
declare function resolveFaceWithRegistry(registry: FontRegistry | undefined, font: LayoutFont): ResolvedFace;
|
|
18
|
-
//#endregion
|
|
19
|
-
export { ResolvedFace as a, ProvidedFont as i, FontRegistryOptions as n, createFontRegistry as o, FontSubstitution as r, resolveFaceWithRegistry as s, FontRegistry as t };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { r as StandardFontName } from "./afm-widths-DyDq56Ph.js";
|
|
2
|
-
import { t as EmbeddedFace } from "./embedded-font-fREdbxnr.js";
|
|
3
|
-
import { FontRegistryOptions, FontSubstitution, LayoutFont, ProvidedFont } from "document-schema.js";
|
|
4
|
-
//#region src/font-registry.d.ts
|
|
5
|
-
type ResolvedFace = {
|
|
6
|
-
readonly kind: 'embedded';
|
|
7
|
-
readonly face: EmbeddedFace;
|
|
8
|
-
} | {
|
|
9
|
-
readonly kind: 'standard';
|
|
10
|
-
readonly standardName: StandardFontName;
|
|
11
|
-
readonly matched: boolean;
|
|
12
|
-
};
|
|
13
|
-
interface FontRegistry {
|
|
14
|
-
resolve(font: LayoutFont): ResolvedFace;
|
|
15
|
-
}
|
|
16
|
-
declare function createFontRegistry(options?: FontRegistryOptions): FontRegistry;
|
|
17
|
-
declare function resolveFaceWithRegistry(registry: FontRegistry | undefined, font: LayoutFont): ResolvedFace;
|
|
18
|
-
//#endregion
|
|
19
|
-
export { ResolvedFace as a, ProvidedFont as i, FontRegistryOptions as n, createFontRegistry as o, FontSubstitution as r, resolveFaceWithRegistry as s, FontRegistry as t };
|
package/dist/formula.cjs
DELETED
|
File without changes
|
package/dist/formula.d.cts
DELETED
package/dist/formula.d.ts
DELETED
package/dist/formula.js
DELETED
|
File without changes
|