@chialab/pdfjs-lib 1.0.0-alpha.3 → 1.0.0-alpha.30

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 (161) hide show
  1. package/README.md +15 -7
  2. package/dist/browser/{FoxitDingbats-SB6TO3S5.js → FoxitDingbats-XZTZYAP6.js} +1 -1
  3. package/dist/browser/{FoxitFixed-UIGSMBQB.js → FoxitFixed-DRWD6QNM.js} +1 -1
  4. package/dist/browser/{FoxitFixedBold-2PAEIZAT.js → FoxitFixedBold-A3IBPIFC.js} +1 -1
  5. package/dist/browser/{FoxitFixedBoldItalic-OSQUQDEE.js → FoxitFixedBoldItalic-V4ORMFGL.js} +1 -1
  6. package/dist/browser/{FoxitFixedItalic-W73RDK22.js → FoxitFixedItalic-Z7BSNTJA.js} +1 -1
  7. package/dist/browser/{FoxitSerif-3HH3SOZF.js → FoxitSerif-Y34FHWHO.js} +1 -1
  8. package/dist/browser/{FoxitSerifBold-HXP2QOO7.js → FoxitSerifBold-NCWBT4GX.js} +1 -1
  9. package/dist/browser/{FoxitSerifBoldItalic-FZXLNWD7.js → FoxitSerifBoldItalic-YTEOG5ZU.js} +1 -1
  10. package/dist/browser/{FoxitSerifItalic-WQFHUBI2.js → FoxitSerifItalic-3H547RIJ.js} +1 -1
  11. package/dist/browser/{FoxitSymbol-OVWU7LKS.js → FoxitSymbol-EMTQEYPB.js} +1 -1
  12. package/dist/browser/{LiberationSans-Bold-GSJN42N5.js → LiberationSans-Bold-MGX34QV4.js} +1 -1
  13. package/dist/browser/LiberationSans-Bold-PQY5JZAT.js +9 -0
  14. package/dist/browser/LiberationSans-BoldItalic-PBNZJX4S.js +9 -0
  15. package/dist/browser/{LiberationSans-BoldItalic-UCPQJ3L2.js → LiberationSans-BoldItalic-WSEQ5LH5.js} +1 -1
  16. package/dist/browser/{LiberationSans-Italic-6CIHEALY.js → LiberationSans-Italic-E4SLDR4M.js} +1 -1
  17. package/dist/browser/LiberationSans-Italic-NAYVQTNG.js +9 -0
  18. package/dist/browser/{LiberationSans-Regular-KIF3IRJY.js → LiberationSans-Regular-3SH5NGZO.js} +1 -1
  19. package/dist/browser/LiberationSans-Regular-FMNBW2LE.js +9 -0
  20. package/dist/browser/NodeUtilsStabs-AQQCOPNR.js +19 -0
  21. package/dist/browser/chunk-3ZTAZS2X.js +25 -0
  22. package/dist/browser/{chunk-O4UKW7AD.js → chunk-7YYVRRNF.js} +5 -0
  23. package/dist/browser/{chunk-DYHYQ33L.js → chunk-R7G44NYV.js} +834 -84
  24. package/dist/browser/index.js +21400 -4931
  25. package/dist/browser/openjpeg-Q27OVS4T.js +9 -0
  26. package/dist/browser/qcms_bg-BCJEADMU.js +9 -0
  27. package/dist/browser/worker.js +8311 -7089
  28. package/dist/index.d.ts +11 -1
  29. package/dist/lib/AnnotationData.d.ts +8 -8
  30. package/dist/lib/AnnotationOperatorsList.d.ts +21 -0
  31. package/dist/lib/Canvas.d.ts +0 -5
  32. package/dist/lib/CanvasGraphics.d.ts +1 -0
  33. package/dist/lib/NodeCanvasFactory.d.ts +9 -0
  34. package/dist/lib/NodeFilterFactory.d.ts +10 -0
  35. package/dist/lib/NodeUtils.d.ts +24 -0
  36. package/dist/lib/Path2D.d.ts +9 -49
  37. package/dist/lib/StandardFontDataFactory.d.ts +2 -2
  38. package/dist/lib/StructTreePage.d.ts +5 -0
  39. package/dist/lib/Svg.d.ts +144 -0
  40. package/dist/lib/SvgCanvasContext.d.ts +36 -22
  41. package/dist/lib/TextLayer.d.ts +48 -10
  42. package/dist/lib/TextLayer_v2.d.ts +8 -0
  43. package/dist/lib/WasmFactory.d.ts +5 -0
  44. package/dist/lib/utils.d.ts +29 -3
  45. package/dist/node/{FoxitDingbats-65AZ2Z2V.js → FoxitDingbats-UZC34T4F.js} +1 -1
  46. package/dist/node/{FoxitFixed-OZGLVVOQ.js → FoxitFixed-DSJVG3IJ.js} +1 -1
  47. package/dist/node/{FoxitFixedBold-37OOYMV7.js → FoxitFixedBold-YSX4X5NA.js} +1 -1
  48. package/dist/node/{FoxitFixedBoldItalic-XYFHEG2V.js → FoxitFixedBoldItalic-IFYYA6RR.js} +1 -1
  49. package/dist/node/{FoxitFixedItalic-MM7OSGS6.js → FoxitFixedItalic-4PEFPCQV.js} +1 -1
  50. package/dist/node/{FoxitSerif-MLMJQPRP.js → FoxitSerif-7SSP2H2U.js} +1 -1
  51. package/dist/node/{FoxitSerifBold-AC7RJQWJ.js → FoxitSerifBold-KLMURJ6N.js} +1 -1
  52. package/dist/node/{FoxitSerifBoldItalic-YCQ4CLKE.js → FoxitSerifBoldItalic-VSYHWLRM.js} +1 -1
  53. package/dist/node/{FoxitSerifItalic-CXVTCST4.js → FoxitSerifItalic-NTOPMQDD.js} +1 -1
  54. package/dist/node/{FoxitSymbol-VUGMZN5C.js → FoxitSymbol-QPUM74UN.js} +1 -1
  55. package/dist/node/{LiberationSans-Bold-XSHQQBWB.js → LiberationSans-Bold-BXFYN4PV.js} +1 -1
  56. package/dist/node/LiberationSans-Bold-VIZ4XT4N.js +9 -0
  57. package/dist/node/{LiberationSans-BoldItalic-CTAZRFRL.js → LiberationSans-BoldItalic-DQQC5TNJ.js} +1 -1
  58. package/dist/node/LiberationSans-BoldItalic-WXMOSICD.js +9 -0
  59. package/dist/node/LiberationSans-Italic-34IBVQZ4.js +9 -0
  60. package/dist/node/{LiberationSans-Italic-WIOTUKLC.js → LiberationSans-Italic-Z4MFN6PY.js} +1 -1
  61. package/dist/node/LiberationSans-Regular-JOSGNSW5.js +9 -0
  62. package/dist/node/{LiberationSans-Regular-CDMMZL5S.js → LiberationSans-Regular-MACKS2VL.js} +1 -1
  63. package/dist/node/NodeUtils-PVXQMWFJ.js +20 -0
  64. package/dist/node/chunk-4Y7OZIIX.js +1319 -0
  65. package/dist/node/chunk-O74KGUUC.js +2093 -0
  66. package/dist/node/chunk-T2JWSGAF.js +1225 -0
  67. package/dist/node/chunk-ZFIGV5OT.js +63 -0
  68. package/dist/node/index.js +23520 -8727
  69. package/dist/node/openjpeg-QFJSFVSJ.js +9 -0
  70. package/dist/node/qcms_bg-PRPVJQFC.js +9 -0
  71. package/dist/node/worker.js +8320 -7096
  72. package/dist/pdf.js/external/openjpeg/openjpeg.d.ts +2 -0
  73. package/dist/pdf.js/external/qcms/qcms.d.ts +92 -0
  74. package/dist/pdf.js/external/qcms/qcms_utils.d.ts +14 -0
  75. package/dist/pdf.js/src/core/arithmetic_decoder.d.ts +21 -0
  76. package/dist/pdf.js/src/core/ascii_85_stream.d.ts +8 -0
  77. package/dist/pdf.js/src/core/ascii_hex_stream.d.ts +8 -0
  78. package/dist/pdf.js/src/core/base_stream.d.ts +32 -0
  79. package/dist/pdf.js/src/core/binary_cmap.d.ts +3 -0
  80. package/dist/pdf.js/src/core/ccitt.d.ts +72 -0
  81. package/dist/pdf.js/src/core/ccitt_stream.d.ts +9 -0
  82. package/dist/pdf.js/src/core/cff_font.d.ts +15 -0
  83. package/dist/pdf.js/src/core/cff_parser.d.ts +166 -0
  84. package/dist/pdf.js/src/core/charsets.d.ts +3 -0
  85. package/dist/pdf.js/src/core/cmap.d.ts +37 -0
  86. package/dist/pdf.js/src/core/colorspace.d.ts +177 -0
  87. package/dist/pdf.js/src/core/colorspace_utils.d.ts +21 -0
  88. package/dist/pdf.js/src/core/core_utils.d.ts +140 -0
  89. package/dist/pdf.js/src/core/decode_stream.d.ts +25 -0
  90. package/dist/pdf.js/src/core/encodings.d.ts +7 -0
  91. package/dist/pdf.js/src/core/flate_stream.d.ts +15 -0
  92. package/dist/pdf.js/src/core/font_renderer.d.ts +34 -0
  93. package/dist/pdf.js/src/core/fonts.d.ts +98 -0
  94. package/dist/pdf.js/src/core/fonts_utils.d.ts +32 -0
  95. package/dist/pdf.js/src/core/glyf.d.ts +44 -0
  96. package/dist/pdf.js/src/core/glyphlist.d.ts +2 -0
  97. package/dist/pdf.js/src/core/icc_colorspace.d.ts +22 -0
  98. package/dist/pdf.js/src/core/jbig2.d.ts +12 -0
  99. package/dist/pdf.js/src/core/jbig2_stream.d.ts +17 -0
  100. package/dist/pdf.js/src/core/jpeg_stream.d.ts +25 -0
  101. package/dist/pdf.js/src/core/jpg.d.ts +62 -0
  102. package/dist/pdf.js/src/core/jpx.d.ts +35 -0
  103. package/dist/pdf.js/src/core/jpx_stream.d.ts +17 -0
  104. package/dist/pdf.js/src/core/lzw_stream.d.ts +21 -0
  105. package/dist/pdf.js/src/core/metrics.d.ts +2 -0
  106. package/dist/pdf.js/src/core/name_number_tree.d.ts +21 -0
  107. package/dist/pdf.js/src/core/opentype_file_builder.d.ts +12 -0
  108. package/dist/pdf.js/src/core/parser.d.ts +81 -0
  109. package/dist/pdf.js/src/core/predictor_stream.d.ts +15 -0
  110. package/dist/pdf.js/src/core/primitives.d.ts +78 -0
  111. package/dist/pdf.js/src/core/run_length_stream.d.ts +7 -0
  112. package/dist/pdf.js/src/core/standard_fonts.d.ts +18 -0
  113. package/dist/pdf.js/src/core/stream.d.ts +21 -0
  114. package/dist/pdf.js/src/core/struct_tree.d.ts +92 -0
  115. package/dist/pdf.js/src/core/to_unicode_map.d.ts +21 -0
  116. package/dist/pdf.js/src/core/type1_font.d.ts +17 -0
  117. package/dist/pdf.js/src/core/type1_parser.d.ts +29 -0
  118. package/dist/pdf.js/src/core/unicode.d.ts +5 -0
  119. package/dist/pdf.js/src/display/annotation_layer.d.ts +35 -5
  120. package/dist/pdf.js/src/display/annotation_storage.d.ts +3 -8
  121. package/dist/pdf.js/src/display/api.d.ts +86 -77
  122. package/dist/pdf.js/src/display/api_utils.d.ts +13 -0
  123. package/dist/pdf.js/src/display/canvas.d.ts +88 -94
  124. package/dist/pdf.js/src/display/canvas_dependency_tracker.d.ts +160 -0
  125. package/dist/pdf.js/src/display/display_utils.d.ts +34 -1
  126. package/dist/pdf.js/src/display/draw_layer.d.ts +2 -2
  127. package/dist/pdf.js/src/display/editor/alt_text.d.ts +1 -1
  128. package/dist/pdf.js/src/display/editor/annotation_editor_layer.d.ts +10 -8
  129. package/dist/pdf.js/src/display/editor/color_picker.d.ts +20 -1
  130. package/dist/pdf.js/src/display/editor/comment.d.ts +47 -0
  131. package/dist/pdf.js/src/display/editor/draw.d.ts +8 -8
  132. package/dist/pdf.js/src/display/editor/drawers/freedraw.d.ts +4 -3
  133. package/dist/pdf.js/src/display/editor/drawers/highlight.d.ts +2 -1
  134. package/dist/pdf.js/src/display/editor/drawers/signaturedraw.d.ts +13 -13
  135. package/dist/pdf.js/src/display/editor/editor.d.ts +117 -16
  136. package/dist/pdf.js/src/display/editor/freetext.d.ts +11 -7
  137. package/dist/pdf.js/src/display/editor/highlight.d.ts +9 -3
  138. package/dist/pdf.js/src/display/editor/ink.d.ts +6 -0
  139. package/dist/pdf.js/src/display/editor/signature.d.ts +3 -5
  140. package/dist/pdf.js/src/display/editor/stamp.d.ts +4 -3
  141. package/dist/pdf.js/src/display/editor/toolbar.d.ts +8 -3
  142. package/dist/pdf.js/src/display/editor/tools.d.ts +36 -12
  143. package/dist/pdf.js/src/display/font_loader.d.ts +27 -1
  144. package/dist/pdf.js/src/display/metadata.d.ts +1 -2
  145. package/dist/pdf.js/src/display/optional_content_config.d.ts +1 -1
  146. package/dist/pdf.js/src/display/pattern_helper.d.ts +6 -4
  147. package/dist/pdf.js/src/display/pdf_objects.d.ts +40 -0
  148. package/dist/pdf.js/src/display/text_layer.d.ts +9 -9
  149. package/dist/pdf.js/src/display/touch_manager.d.ts +5 -1
  150. package/dist/pdf.js/src/display/worker_options.d.ts +2 -2
  151. package/dist/pdf.js/src/pdf.d.ts +9 -1
  152. package/dist/pdf.js/src/shared/obj-bin-transform.d.ts +64 -0
  153. package/dist/pdf.js/src/shared/scripting_utils.d.ts +2 -0
  154. package/dist/pdf.js/src/shared/util.d.ts +129 -102
  155. package/dist/pdf.js/web/comment_manager.d.ts +20 -0
  156. package/dist/pdf.js/web/interfaces.d.ts +7 -0
  157. package/dist/pdf.js/web/text_accessibility.d.ts +1 -1
  158. package/package.json +16 -4
  159. package/dist/node/chunk-7MW5RQZ5.js +0 -30
  160. package/dist/node/chunk-KTTVPO2G.js +0 -1775
  161. package/dist/pdf.js/src/display/node_utils.d.ts +0 -32
@@ -0,0 +1,160 @@
1
+ export type SimpleDependency = "lineWidth" | "lineCap" | "lineJoin" | "miterLimit" | "dash" | "strokeAlpha" | "fillColor" | "fillAlpha" | "globalCompositeOperation" | "path" | "filter" | "font" | "fontObj";
2
+ export type IncrementalDependency = "transform" | "moveText" | "sameLineText";
3
+ export type InternalIncrementalDependency = IncrementalDependency | typeof FORCED_DEPENDENCY_LABEL;
4
+ /**
5
+ * @typedef {"lineWidth" | "lineCap" | "lineJoin" | "miterLimit" | "dash" |
6
+ * "strokeAlpha" | "fillColor" | "fillAlpha" | "globalCompositeOperation" |
7
+ * "path" | "filter" | "font" | "fontObj"} SimpleDependency
8
+ */
9
+ /**
10
+ * @typedef {"transform" | "moveText" | "sameLineText"} IncrementalDependency
11
+ */
12
+ /**
13
+ * @typedef {IncrementalDependency |
14
+ * typeof FORCED_DEPENDENCY_LABEL} InternalIncrementalDependency
15
+ */
16
+ export class CanvasDependencyTracker {
17
+ constructor(canvas: any, operationsCount: any, recordDebugMetadata?: boolean);
18
+ growOperationsCount(operationsCount: any): void;
19
+ save(opIdx: any): this;
20
+ restore(opIdx: any): this;
21
+ /**
22
+ * @param {number} idx
23
+ */
24
+ recordOpenMarker(idx: number): this;
25
+ getOpenMarker(): any;
26
+ recordCloseMarker(opIdx: any): this;
27
+ beginMarkedContent(opIdx: any): this;
28
+ endMarkedContent(opIdx: any): this;
29
+ pushBaseTransform(ctx: any): this;
30
+ popBaseTransform(): this;
31
+ /**
32
+ * @param {SimpleDependency} name
33
+ * @param {number} idx
34
+ */
35
+ recordSimpleData(name: SimpleDependency, idx: number): this;
36
+ /**
37
+ * @param {IncrementalDependency} name
38
+ * @param {number} idx
39
+ */
40
+ recordIncrementalData(name: IncrementalDependency, idx: number): this;
41
+ /**
42
+ * @param {IncrementalDependency} name
43
+ * @param {number} idx
44
+ */
45
+ resetIncrementalData(name: IncrementalDependency, idx: number): this;
46
+ recordNamedData(name: any, idx: any): this;
47
+ /**
48
+ * @param {SimpleDependency} name
49
+ * @param {string} depName
50
+ * @param {number} fallbackIdx
51
+ */
52
+ recordSimpleDataFromNamed(name: SimpleDependency, depName: string, fallbackIdx: number): void;
53
+ recordFutureForcedDependency(name: any, idx: any): this;
54
+ inheritSimpleDataAsFutureForcedDependencies(names: any): this;
55
+ inheritPendingDependenciesAsFutureForcedDependencies(): this;
56
+ resetBBox(idx: any): this;
57
+ recordClipBox(idx: any, ctx: any, minX: any, maxX: any, minY: any, maxY: any): this;
58
+ recordBBox(idx: any, ctx: any, minX: any, maxX: any, minY: any, maxY: any): this;
59
+ recordCharacterBBox(idx: any, ctx: any, font: any, scale: number | undefined, x: number | undefined, y: number | undefined, getMeasure: any): this;
60
+ recordFullPageBBox(idx: any): this;
61
+ getSimpleIndex(dependencyName: any): any;
62
+ recordDependencies(idx: any, dependencyNames: any): this;
63
+ recordNamedDependency(idx: any, name: any): this;
64
+ /**
65
+ * @param {number} idx
66
+ */
67
+ recordOperation(idx: number, preserve?: boolean): this;
68
+ recordShowTextOperation(idx: any, preserve?: boolean): this;
69
+ bboxToClipBoxDropOperation(idx: any, preserve?: boolean): this;
70
+ _takePendingDependencies(): Set<any>;
71
+ _extractOperation(idx: any): any;
72
+ _pushPendingDependencies(dependencies: any): void;
73
+ take(): BBoxReader;
74
+ takeDebugMetadata(): Map<any, any> | undefined;
75
+ #private;
76
+ }
77
+ /**
78
+ * Used to track dependencies of nested operations list, that
79
+ * should actually all map to the index of the operation that
80
+ * contains the nested list.
81
+ *
82
+ * @implements {CanvasDependencyTracker}
83
+ */
84
+ export class CanvasNestedDependencyTracker implements CanvasDependencyTracker {
85
+ constructor(dependencyTracker: any, opIdx: any, ignoreBBoxes: any);
86
+ growOperationsCount(): void;
87
+ save(opIdx: any): this;
88
+ restore(opIdx: any): this;
89
+ recordOpenMarker(idx: any): this;
90
+ getOpenMarker(): any;
91
+ recordCloseMarker(idx: any): this;
92
+ beginMarkedContent(opIdx: any): this;
93
+ endMarkedContent(opIdx: any): this;
94
+ pushBaseTransform(ctx: any): this;
95
+ popBaseTransform(): this;
96
+ /**
97
+ * @param {SimpleDependency} name
98
+ * @param {number} idx
99
+ */
100
+ recordSimpleData(name: SimpleDependency, idx: number): this;
101
+ /**
102
+ * @param {IncrementalDependency} name
103
+ * @param {number} idx
104
+ */
105
+ recordIncrementalData(name: IncrementalDependency, idx: number): this;
106
+ /**
107
+ * @param {IncrementalDependency} name
108
+ * @param {number} idx
109
+ */
110
+ resetIncrementalData(name: IncrementalDependency, idx: number): this;
111
+ recordNamedData(name: any, idx: any): this;
112
+ /**
113
+ * @param {SimpleDependency} name
114
+ * @param {string} depName
115
+ * @param {number} fallbackIdx
116
+ */
117
+ recordSimpleDataFromNamed(name: SimpleDependency, depName: string, fallbackIdx: number): this;
118
+ recordFutureForcedDependency(name: any, idx: any): this;
119
+ inheritSimpleDataAsFutureForcedDependencies(names: any): this;
120
+ inheritPendingDependenciesAsFutureForcedDependencies(): this;
121
+ resetBBox(idx: any): this;
122
+ recordClipBox(idx: any, ctx: any, minX: any, maxX: any, minY: any, maxY: any): this;
123
+ recordBBox(idx: any, ctx: any, minX: any, maxX: any, minY: any, maxY: any): this;
124
+ recordCharacterBBox(idx: any, ctx: any, font: any, scale: any, x: any, y: any, getMeasure: any): this;
125
+ recordFullPageBBox(idx: any): this;
126
+ getSimpleIndex(dependencyName: any): any;
127
+ recordDependencies(idx: any, dependencyNames: any): this;
128
+ recordNamedDependency(idx: any, name: any): this;
129
+ /**
130
+ * @param {number} idx
131
+ * @param {SimpleDependency[]} dependencyNames
132
+ */
133
+ recordOperation(idx: number): this;
134
+ recordShowTextOperation(idx: any): this;
135
+ bboxToClipBoxDropOperation(idx: any): this;
136
+ take(): void;
137
+ takeDebugMetadata(): void;
138
+ #private;
139
+ }
140
+ export namespace Dependencies {
141
+ let stroke: string[];
142
+ let fill: string[];
143
+ let imageXObject: string[];
144
+ let rawFillPath: string[];
145
+ let showText: string[];
146
+ let transform: string[];
147
+ let transformAndFill: string[];
148
+ }
149
+ declare const FORCED_DEPENDENCY_LABEL: "__forcedDependency";
150
+ declare class BBoxReader {
151
+ constructor(bboxes: any, coords: any);
152
+ get length(): any;
153
+ isEmpty(i: any): boolean;
154
+ minX(i: any): number;
155
+ minY(i: any): number;
156
+ maxX(i: any): number;
157
+ maxY(i: any): number;
158
+ #private;
159
+ }
160
+ export {};
@@ -59,8 +59,25 @@ export type PageViewportCloneParameters = {
59
59
  */
60
60
  dontFlip?: boolean | undefined;
61
61
  };
62
+ export function applyOpacity(r: any, g: any, b: any, opacity: any): any[];
63
+ export class ColorScheme {
64
+ static get isDarkMode(): any;
65
+ }
66
+ export class CSSConstants {
67
+ static get commentForegroundColor(): any;
68
+ }
62
69
  export function deprecated(details: any): void;
63
70
  export function fetchData(url: any, type?: string): Promise<any>;
71
+ /**
72
+ * Find a color that has sufficient contrast against a fixed color.
73
+ * The luminance (in HSL color space) of the base color is adjusted
74
+ * until the contrast ratio between the base color and the fixed color
75
+ * is at least the minimum contrast ratio required by WCAG 2.1.
76
+ * @param {Array<number>} baseColor
77
+ * @param {Array<number>} fixedColor
78
+ * @returns {string}
79
+ */
80
+ export function findContrastColor(baseColor: Array<number>, fixedColor: Array<number>): string;
64
81
  export function getColorValues(colors: any): void;
65
82
  export function getCurrentTransform(ctx: any): any[];
66
83
  export function getCurrentTransformInverse(ctx: any): any[];
@@ -97,6 +114,8 @@ export function noContextMenu(e: any): void;
97
114
  * Scale factors for the canvas, necessary with HiDPI displays.
98
115
  */
99
116
  export class OutputScale {
117
+ static get pixelRatio(): number;
118
+ static capPixels(maxPixels: any, capAreaFactor: any): any;
100
119
  /**
101
120
  * @type {number} Horizontal scale.
102
121
  */
@@ -109,7 +128,16 @@ export class OutputScale {
109
128
  * @type {boolean} Returns `true` when scaling is required, `false` otherwise.
110
129
  */
111
130
  get scaled(): boolean;
131
+ /**
132
+ * @type {boolean} Returns `true` when scaling is symmetric,
133
+ * `false` otherwise.
134
+ */
112
135
  get symmetric(): boolean;
136
+ /**
137
+ * @returns {boolean} Returns `true` if scaling was limited,
138
+ * `false` otherwise.
139
+ */
140
+ limitCanvas(width: any, height: any, maxPixels: any, maxDim: any, capAreaFactor?: number): boolean;
113
141
  }
114
142
  /**
115
143
  * @typedef {Object} PageViewportParameters
@@ -197,7 +225,7 @@ export class PageViewport {
197
225
  convertToPdfPoint(x: number, y: number): any[];
198
226
  }
199
227
  export class PDFDateString {
200
- static "__#2@#regex": any;
228
+ static "__#private@#regex": any;
201
229
  /**
202
230
  * Convert a PDF date string to a JavaScript `Date` object.
203
231
  *
@@ -227,6 +255,11 @@ export class RenderingCancelledException extends RenderingCancelledException_bas
227
255
  constructor(msg: any, extraDelay?: number);
228
256
  extraDelay: number;
229
257
  }
258
+ export function renderRichText({ html, dir, className }: {
259
+ html: any;
260
+ dir: any;
261
+ className: any;
262
+ }, container: any): void;
230
263
  /**
231
264
  * @param {HTMLDivElement} div
232
265
  * @param {PageViewport} viewport
@@ -4,9 +4,9 @@
4
4
  * be able to use mix-blend-mode for some of them.
5
5
  */
6
6
  export class DrawLayer {
7
- static "__#33@#id": number;
7
+ static "__#private@#id": number;
8
8
  static get _svgFactory(): any;
9
- static "__#33@#setBox"(element: any, [x, y, width, height]: [any, any, any, any]): void;
9
+ static "__#private@#setBox"(element: any, [x, y, width, height]: [any, any, any, any]): void;
10
10
  constructor({ pageIndex }: {
11
11
  pageIndex: any;
12
12
  });
@@ -1,5 +1,5 @@
1
1
  export class AltText {
2
- static "__#40@#l10nNewButton": null;
2
+ static "__#private@#l10nNewButton": null;
3
3
  static _l10n: null;
4
4
  static initialize(l10n: any): void;
5
5
  constructor(editor: any);
@@ -46,7 +46,7 @@ export type RenderEditorLayerOptions = {
46
46
  */
47
47
  export class AnnotationEditorLayer {
48
48
  static _initialized: boolean;
49
- static "__#34@#editorTypes": Map<number, typeof FreeTextEditor | typeof HighlightEditor | typeof InkEditor | typeof SignatureEditor | typeof StampEditor>;
49
+ static "__#private@#editorTypes": Map<number, typeof FreeTextEditor | typeof HighlightEditor | typeof InkEditor | typeof SignatureEditor | typeof StampEditor>;
50
50
  /**
51
51
  * @param {AnnotationEditorLayerOptions} options
52
52
  */
@@ -60,9 +60,9 @@ export class AnnotationEditorLayer {
60
60
  get isInvisible(): boolean;
61
61
  /**
62
62
  * Update the toolbar if it's required to reflect the tool currently used.
63
- * @param {number} mode
63
+ * @param {Object} options
64
64
  */
65
- updateToolbar(mode: number): void;
65
+ updateToolbar(options: Object): void;
66
66
  /**
67
67
  * The mode has changed: it must be updated.
68
68
  * @param {number} mode
@@ -111,7 +111,7 @@ export class AnnotationEditorLayer {
111
111
  remove(editor: AnnotationEditor): void;
112
112
  /**
113
113
  * An editor can have a different parent, for example after having
114
- * being dragged and droped from a page to another.
114
+ * being dragged and dropped from a page to another.
115
115
  * @param {AnnotationEditor} editor
116
116
  */
117
117
  changeParent(editor: AnnotationEditor): void;
@@ -131,6 +131,7 @@ export class AnnotationEditorLayer {
131
131
  * @param {AnnotationEditor} editor
132
132
  */
133
133
  addUndoableEditor(editor: AnnotationEditor): void;
134
+ getEditorByUID(uid: any): any;
134
135
  /**
135
136
  * Get an id for an editor.
136
137
  * @returns {string}
@@ -140,16 +141,16 @@ export class AnnotationEditorLayer {
140
141
  canCreateNewEmptyEditor(): boolean | undefined;
141
142
  /**
142
143
  * Paste some content into a new editor.
143
- * @param {number} mode
144
+ * @param {Object} options
144
145
  * @param {Object} params
145
146
  */
146
- pasteEditor(mode: number, params: Object): Promise<void>;
147
+ pasteEditor(options: Object, params: Object): Promise<void>;
147
148
  /**
148
149
  * Create a new editor
149
150
  * @param {Object} data
150
- * @returns {AnnotationEditor | null}
151
+ * @returns {Promise<AnnotationEditor | null>}
151
152
  */
152
- deserialize(data: Object): AnnotationEditor | null;
153
+ deserialize(data: Object): Promise<AnnotationEditor | null>;
153
154
  /**
154
155
  * Create and add a new editor.
155
156
  * @param {PointerEvent} event
@@ -158,6 +159,7 @@ export class AnnotationEditorLayer {
158
159
  * @returns {AnnotationEditor}
159
160
  */
160
161
  createAndAddNewEditor(event: PointerEvent, isCentered: boolean, data?: {}): AnnotationEditor;
162
+ get boundingClientRect(): DOMRect;
161
163
  /**
162
164
  * Create and add a new editor.
163
165
  */
@@ -1,5 +1,24 @@
1
+ /**
2
+ * BasicColorPicker class provides a simple color picker.
3
+ * It displays an input element (with type="color") that allows the user
4
+ * to select a color for the annotation.
5
+ */
6
+ export class BasicColorPicker {
7
+ static "__#private@#l10nColor": null;
8
+ constructor(editor: any);
9
+ renderButton(): HTMLInputElement;
10
+ update(value: any): void;
11
+ destroy(): void;
12
+ hideDropdown(): void;
13
+ #private;
14
+ }
15
+ /**
16
+ * ColorPicker class provides a color picker for the annotation editor.
17
+ * It displays a dropdown with some predefined colors and allows the user
18
+ * to select a color for the annotation.
19
+ */
1
20
  export class ColorPicker {
2
- static "__#23@#l10nColor": null;
21
+ static "__#private@#l10nColor": null;
3
22
  static get _keyboardManager(): any;
4
23
  constructor({ editor, uiManager }: {
5
24
  editor?: null | undefined;
@@ -0,0 +1,47 @@
1
+ export class Comment {
2
+ constructor(editor: any);
3
+ renderForToolbar(): any;
4
+ renderForStandalone(): any;
5
+ focusButton(): void;
6
+ onUpdatedColor(): void;
7
+ get commentButtonWidth(): number;
8
+ set commentPopupPositionInLayer(pos: number[] | null);
9
+ get commentPopupPositionInLayer(): number[] | null;
10
+ hasDefaultPopupPosition(): boolean;
11
+ removeStandaloneCommentButton(): void;
12
+ removeToolbarCommentButton(): void;
13
+ setCommentButtonStates({ selected, hasPopup }: {
14
+ selected: any;
15
+ hasPopup: any;
16
+ }): void;
17
+ edit(options: any): void;
18
+ finish(): void;
19
+ isDeleted(): boolean;
20
+ isEmpty(): boolean;
21
+ hasBeenEdited(): boolean;
22
+ serialize(): {
23
+ text: null;
24
+ richText: null;
25
+ date: null;
26
+ deleted: boolean;
27
+ };
28
+ /**
29
+ * Set the comment data.
30
+ */
31
+ set data(text: {
32
+ text: null;
33
+ richText: null;
34
+ date: null;
35
+ deleted: boolean;
36
+ });
37
+ get data(): {
38
+ text: null;
39
+ richText: null;
40
+ date: null;
41
+ deleted: boolean;
42
+ };
43
+ setInitialText(text: any, richText?: null): void;
44
+ shown(): void;
45
+ destroy(): void;
46
+ #private;
47
+ }
@@ -4,13 +4,13 @@
4
4
  export class DrawingEditor extends AnnotationEditor {
5
5
  static _currentDrawId: number;
6
6
  static _currentParent: null;
7
- static "__#26@#currentDraw": null;
8
- static "__#26@#currentDrawingAC": null;
9
- static "__#26@#currentDrawingOptions": null;
10
- static "__#26@#currentPointerId": number;
11
- static "__#26@#currentPointerType": null;
12
- static "__#26@#currentPointerIds": null;
13
- static "__#26@#currentMoveTimestamp": number;
7
+ static "__#private@#currentDraw": null;
8
+ static "__#private@#currentDrawingAC": null;
9
+ static "__#private@#currentDrawingOptions": null;
10
+ static "__#private@#currentPointerId": number;
11
+ static "__#private@#currentPointerType": null;
12
+ static "__#private@#currentPointerIds": null;
13
+ static "__#private@#currentMoveTimestamp": number;
14
14
  static _INNER_MARGIN: number;
15
15
  static _mergeSVGProperties(p1: any, p2: any): any;
16
16
  /**
@@ -32,7 +32,6 @@ export class DrawingEditor extends AnnotationEditor {
32
32
  INK_THICKNESS: number;
33
33
  INK_OPACITY: number;
34
34
  HIGHLIGHT_COLOR: number;
35
- HIGHLIGHT_DEFAULT_COLOR: number;
36
35
  HIGHLIGHT_THICKNESS: number;
37
36
  HIGHLIGHT_FREE: number;
38
37
  HIGHLIGHT_SHOW_ALL: number;
@@ -76,6 +75,7 @@ export class DrawingEditor extends AnnotationEditor {
76
75
  /** @inheritdoc */
77
76
  static deserialize(data: any, parent: any, uiManager: any): Promise<AnnotationEditor | null>;
78
77
  constructor(params: any);
78
+ _colorPicker: null;
79
79
  _drawId: null;
80
80
  _addOutlines(params: any): void;
81
81
  /** @inheritdoc */
@@ -1,5 +1,6 @@
1
1
  export class FreeDrawOutline extends Outline {
2
2
  constructor(outline: any, points: any, box: any, scaleFactor: any, innerMargin: any, isLTR: any);
3
+ firstPoint: number[];
3
4
  lastPoint: number[];
4
5
  serialize([blX, blY, trX, trY]: [any, any, any, any], rotation: any): {
5
6
  outline: any[];
@@ -11,9 +12,9 @@ export class FreeDrawOutline extends Outline {
11
12
  #private;
12
13
  }
13
14
  export class FreeDrawOutliner {
14
- static "__#19@#MIN_DIST": number;
15
- static "__#19@#MIN_DIFF": number;
16
- static "__#19@#MIN": number;
15
+ static "__#private@#MIN_DIST": number;
16
+ static "__#private@#MIN_DIFF": number;
17
+ static "__#private@#MIN": number;
17
18
  constructor({ x, y }: {
18
19
  x: any;
19
20
  y: any;
@@ -19,7 +19,8 @@ export class HighlightOutliner {
19
19
  }
20
20
  import { FreeDrawOutliner } from "./freedraw.js";
21
21
  declare class HighlightOutline extends Outline {
22
- constructor(outlines: any, box: any, lastPoint: any);
22
+ constructor(outlines: any, box: any, firstPoint: any, lastPoint: any);
23
+ firstPoint: any;
23
24
  lastPoint: any;
24
25
  /**
25
26
  * Serialize the outlines into the PDF page coordinate system.
@@ -2,29 +2,29 @@
2
2
  * Basic text editor in order to create a Signature annotation.
3
3
  */
4
4
  export class SignatureExtractor {
5
- static "__#30@#PARAMETERS": {
5
+ static "__#private@#PARAMETERS": {
6
6
  maxDim: number;
7
7
  sigmaSFactor: number;
8
8
  sigmaR: number;
9
9
  kernelSize: number;
10
10
  };
11
- static "__#30@#neighborIndexToId"(i0: any, j0: any, i: any, j: any): any;
12
- static "__#30@#neighborIdToIndex": Int32Array<ArrayBuffer>;
13
- static "__#30@#clockwiseNonZero"(buf: any, width: any, i0: any, j0: any, i: any, j: any, offset: any): number;
14
- static "__#30@#counterClockwiseNonZero"(buf: any, width: any, i0: any, j0: any, i: any, j: any, offset: any): number;
15
- static "__#30@#findContours"(buf: any, width: any, height: any, threshold: any): {
11
+ static "__#private@#neighborIndexToId"(i0: any, j0: any, i: any, j: any): any;
12
+ static "__#private@#neighborIdToIndex": Int32Array<ArrayBuffer>;
13
+ static "__#private@#clockwiseNonZero"(buf: any, width: any, i0: any, j0: any, i: any, j: any, offset: any): number;
14
+ static "__#private@#counterClockwiseNonZero"(buf: any, width: any, i0: any, j0: any, i: any, j: any, offset: any): number;
15
+ static "__#private@#findContours"(buf: any, width: any, height: any, threshold: any): {
16
16
  isHole: boolean;
17
17
  points: number[];
18
18
  id: number;
19
19
  parent: number;
20
20
  }[];
21
- static "__#30@#douglasPeuckerHelper"(points: any, start: any, end: any, output: any): void;
22
- static "__#30@#douglasPeucker"(points: any): any[] | null;
23
- static "__#30@#bilateralFilter"(buf: any, width: any, height: any, sigmaS: any, sigmaR: any, kernelSize: any): (Uint32Array<ArrayBuffer> | Uint8Array<any>)[];
24
- static "__#30@#getHistogram"(buf: any): Uint32Array<ArrayBuffer>;
25
- static "__#30@#toUint8"(buf: any): Uint8ClampedArray<ArrayBuffer>;
26
- static "__#30@#guessThreshold"(histogram: any): number;
27
- static "__#30@#getGrayPixels"(bitmap: any): any[];
21
+ static "__#private@#douglasPeuckerHelper"(points: any, start: any, end: any, output: any): void;
22
+ static "__#private@#douglasPeucker"(points: any): any[] | null;
23
+ static "__#private@#bilateralFilter"(buf: any, width: any, height: any, sigmaS: any, sigmaR: any, kernelSize: any): (Uint32Array<ArrayBuffer> | Uint8Array<any>)[];
24
+ static "__#private@#getHistogram"(buf: any): Uint32Array<ArrayBuffer>;
25
+ static "__#private@#toUint8"(buf: any): Uint8ClampedArray<ArrayBuffer>;
26
+ static "__#private@#guessThreshold"(histogram: any): number;
27
+ static "__#private@#getGrayPixels"(bitmap: any): any[];
28
28
  static extractContoursFromText(text: any, { fontFamily, fontStyle, fontWeight }: {
29
29
  fontFamily: any;
30
30
  fontStyle: any;