@divriots/pdfjs-dist 3.10.111-divriots2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (305) hide show
  1. package/CODE_OF_CONDUCT.md +15 -0
  2. package/LICENSE +177 -0
  3. package/README.md +14 -0
  4. package/build/pdf.js +18009 -0
  5. package/build/pdf.js.map +1 -0
  6. package/build/pdf.min.js +22 -0
  7. package/build/pdf.sandbox.js +280 -0
  8. package/build/pdf.sandbox.js.map +1 -0
  9. package/build/pdf.sandbox.min.js +22 -0
  10. package/build/pdf.worker.entry.js +19 -0
  11. package/build/pdf.worker.js +57863 -0
  12. package/build/pdf.worker.js.map +1 -0
  13. package/build/pdf.worker.min.js +22 -0
  14. package/cmaps/78-EUC-H.bcmap +0 -0
  15. package/cmaps/78-EUC-V.bcmap +0 -0
  16. package/cmaps/78-H.bcmap +0 -0
  17. package/cmaps/78-RKSJ-H.bcmap +0 -0
  18. package/cmaps/78-RKSJ-V.bcmap +0 -0
  19. package/cmaps/78-V.bcmap +0 -0
  20. package/cmaps/78ms-RKSJ-H.bcmap +0 -0
  21. package/cmaps/78ms-RKSJ-V.bcmap +0 -0
  22. package/cmaps/83pv-RKSJ-H.bcmap +0 -0
  23. package/cmaps/90ms-RKSJ-H.bcmap +0 -0
  24. package/cmaps/90ms-RKSJ-V.bcmap +0 -0
  25. package/cmaps/90msp-RKSJ-H.bcmap +0 -0
  26. package/cmaps/90msp-RKSJ-V.bcmap +0 -0
  27. package/cmaps/90pv-RKSJ-H.bcmap +0 -0
  28. package/cmaps/90pv-RKSJ-V.bcmap +0 -0
  29. package/cmaps/Add-H.bcmap +0 -0
  30. package/cmaps/Add-RKSJ-H.bcmap +0 -0
  31. package/cmaps/Add-RKSJ-V.bcmap +0 -0
  32. package/cmaps/Add-V.bcmap +0 -0
  33. package/cmaps/Adobe-CNS1-0.bcmap +0 -0
  34. package/cmaps/Adobe-CNS1-1.bcmap +0 -0
  35. package/cmaps/Adobe-CNS1-2.bcmap +0 -0
  36. package/cmaps/Adobe-CNS1-3.bcmap +0 -0
  37. package/cmaps/Adobe-CNS1-4.bcmap +0 -0
  38. package/cmaps/Adobe-CNS1-5.bcmap +0 -0
  39. package/cmaps/Adobe-CNS1-6.bcmap +0 -0
  40. package/cmaps/Adobe-CNS1-UCS2.bcmap +0 -0
  41. package/cmaps/Adobe-GB1-0.bcmap +0 -0
  42. package/cmaps/Adobe-GB1-1.bcmap +0 -0
  43. package/cmaps/Adobe-GB1-2.bcmap +0 -0
  44. package/cmaps/Adobe-GB1-3.bcmap +0 -0
  45. package/cmaps/Adobe-GB1-4.bcmap +0 -0
  46. package/cmaps/Adobe-GB1-5.bcmap +0 -0
  47. package/cmaps/Adobe-GB1-UCS2.bcmap +0 -0
  48. package/cmaps/Adobe-Japan1-0.bcmap +0 -0
  49. package/cmaps/Adobe-Japan1-1.bcmap +0 -0
  50. package/cmaps/Adobe-Japan1-2.bcmap +0 -0
  51. package/cmaps/Adobe-Japan1-3.bcmap +0 -0
  52. package/cmaps/Adobe-Japan1-4.bcmap +0 -0
  53. package/cmaps/Adobe-Japan1-5.bcmap +0 -0
  54. package/cmaps/Adobe-Japan1-6.bcmap +0 -0
  55. package/cmaps/Adobe-Japan1-UCS2.bcmap +0 -0
  56. package/cmaps/Adobe-Korea1-0.bcmap +0 -0
  57. package/cmaps/Adobe-Korea1-1.bcmap +0 -0
  58. package/cmaps/Adobe-Korea1-2.bcmap +0 -0
  59. package/cmaps/Adobe-Korea1-UCS2.bcmap +0 -0
  60. package/cmaps/B5-H.bcmap +0 -0
  61. package/cmaps/B5-V.bcmap +0 -0
  62. package/cmaps/B5pc-H.bcmap +0 -0
  63. package/cmaps/B5pc-V.bcmap +0 -0
  64. package/cmaps/CNS-EUC-H.bcmap +0 -0
  65. package/cmaps/CNS-EUC-V.bcmap +0 -0
  66. package/cmaps/CNS1-H.bcmap +0 -0
  67. package/cmaps/CNS1-V.bcmap +0 -0
  68. package/cmaps/CNS2-H.bcmap +0 -0
  69. package/cmaps/CNS2-V.bcmap +3 -0
  70. package/cmaps/ETHK-B5-H.bcmap +0 -0
  71. package/cmaps/ETHK-B5-V.bcmap +0 -0
  72. package/cmaps/ETen-B5-H.bcmap +0 -0
  73. package/cmaps/ETen-B5-V.bcmap +0 -0
  74. package/cmaps/ETenms-B5-H.bcmap +3 -0
  75. package/cmaps/ETenms-B5-V.bcmap +0 -0
  76. package/cmaps/EUC-H.bcmap +0 -0
  77. package/cmaps/EUC-V.bcmap +0 -0
  78. package/cmaps/Ext-H.bcmap +0 -0
  79. package/cmaps/Ext-RKSJ-H.bcmap +0 -0
  80. package/cmaps/Ext-RKSJ-V.bcmap +0 -0
  81. package/cmaps/Ext-V.bcmap +0 -0
  82. package/cmaps/GB-EUC-H.bcmap +0 -0
  83. package/cmaps/GB-EUC-V.bcmap +0 -0
  84. package/cmaps/GB-H.bcmap +4 -0
  85. package/cmaps/GB-V.bcmap +0 -0
  86. package/cmaps/GBK-EUC-H.bcmap +0 -0
  87. package/cmaps/GBK-EUC-V.bcmap +0 -0
  88. package/cmaps/GBK2K-H.bcmap +0 -0
  89. package/cmaps/GBK2K-V.bcmap +0 -0
  90. package/cmaps/GBKp-EUC-H.bcmap +0 -0
  91. package/cmaps/GBKp-EUC-V.bcmap +0 -0
  92. package/cmaps/GBT-EUC-H.bcmap +0 -0
  93. package/cmaps/GBT-EUC-V.bcmap +0 -0
  94. package/cmaps/GBT-H.bcmap +0 -0
  95. package/cmaps/GBT-V.bcmap +0 -0
  96. package/cmaps/GBTpc-EUC-H.bcmap +0 -0
  97. package/cmaps/GBTpc-EUC-V.bcmap +0 -0
  98. package/cmaps/GBpc-EUC-H.bcmap +0 -0
  99. package/cmaps/GBpc-EUC-V.bcmap +0 -0
  100. package/cmaps/H.bcmap +0 -0
  101. package/cmaps/HKdla-B5-H.bcmap +0 -0
  102. package/cmaps/HKdla-B5-V.bcmap +0 -0
  103. package/cmaps/HKdlb-B5-H.bcmap +0 -0
  104. package/cmaps/HKdlb-B5-V.bcmap +0 -0
  105. package/cmaps/HKgccs-B5-H.bcmap +0 -0
  106. package/cmaps/HKgccs-B5-V.bcmap +0 -0
  107. package/cmaps/HKm314-B5-H.bcmap +0 -0
  108. package/cmaps/HKm314-B5-V.bcmap +0 -0
  109. package/cmaps/HKm471-B5-H.bcmap +0 -0
  110. package/cmaps/HKm471-B5-V.bcmap +0 -0
  111. package/cmaps/HKscs-B5-H.bcmap +0 -0
  112. package/cmaps/HKscs-B5-V.bcmap +0 -0
  113. package/cmaps/Hankaku.bcmap +0 -0
  114. package/cmaps/Hiragana.bcmap +0 -0
  115. package/cmaps/KSC-EUC-H.bcmap +0 -0
  116. package/cmaps/KSC-EUC-V.bcmap +0 -0
  117. package/cmaps/KSC-H.bcmap +0 -0
  118. package/cmaps/KSC-Johab-H.bcmap +0 -0
  119. package/cmaps/KSC-Johab-V.bcmap +0 -0
  120. package/cmaps/KSC-V.bcmap +0 -0
  121. package/cmaps/KSCms-UHC-H.bcmap +0 -0
  122. package/cmaps/KSCms-UHC-HW-H.bcmap +0 -0
  123. package/cmaps/KSCms-UHC-HW-V.bcmap +0 -0
  124. package/cmaps/KSCms-UHC-V.bcmap +0 -0
  125. package/cmaps/KSCpc-EUC-H.bcmap +0 -0
  126. package/cmaps/KSCpc-EUC-V.bcmap +0 -0
  127. package/cmaps/Katakana.bcmap +0 -0
  128. package/cmaps/LICENSE +36 -0
  129. package/cmaps/NWP-H.bcmap +0 -0
  130. package/cmaps/NWP-V.bcmap +0 -0
  131. package/cmaps/RKSJ-H.bcmap +0 -0
  132. package/cmaps/RKSJ-V.bcmap +0 -0
  133. package/cmaps/Roman.bcmap +0 -0
  134. package/cmaps/UniCNS-UCS2-H.bcmap +0 -0
  135. package/cmaps/UniCNS-UCS2-V.bcmap +0 -0
  136. package/cmaps/UniCNS-UTF16-H.bcmap +0 -0
  137. package/cmaps/UniCNS-UTF16-V.bcmap +0 -0
  138. package/cmaps/UniCNS-UTF32-H.bcmap +0 -0
  139. package/cmaps/UniCNS-UTF32-V.bcmap +0 -0
  140. package/cmaps/UniCNS-UTF8-H.bcmap +0 -0
  141. package/cmaps/UniCNS-UTF8-V.bcmap +0 -0
  142. package/cmaps/UniGB-UCS2-H.bcmap +0 -0
  143. package/cmaps/UniGB-UCS2-V.bcmap +0 -0
  144. package/cmaps/UniGB-UTF16-H.bcmap +0 -0
  145. package/cmaps/UniGB-UTF16-V.bcmap +0 -0
  146. package/cmaps/UniGB-UTF32-H.bcmap +0 -0
  147. package/cmaps/UniGB-UTF32-V.bcmap +0 -0
  148. package/cmaps/UniGB-UTF8-H.bcmap +0 -0
  149. package/cmaps/UniGB-UTF8-V.bcmap +0 -0
  150. package/cmaps/UniJIS-UCS2-H.bcmap +0 -0
  151. package/cmaps/UniJIS-UCS2-HW-H.bcmap +0 -0
  152. package/cmaps/UniJIS-UCS2-HW-V.bcmap +0 -0
  153. package/cmaps/UniJIS-UCS2-V.bcmap +0 -0
  154. package/cmaps/UniJIS-UTF16-H.bcmap +0 -0
  155. package/cmaps/UniJIS-UTF16-V.bcmap +0 -0
  156. package/cmaps/UniJIS-UTF32-H.bcmap +0 -0
  157. package/cmaps/UniJIS-UTF32-V.bcmap +0 -0
  158. package/cmaps/UniJIS-UTF8-H.bcmap +0 -0
  159. package/cmaps/UniJIS-UTF8-V.bcmap +0 -0
  160. package/cmaps/UniJIS2004-UTF16-H.bcmap +0 -0
  161. package/cmaps/UniJIS2004-UTF16-V.bcmap +0 -0
  162. package/cmaps/UniJIS2004-UTF32-H.bcmap +0 -0
  163. package/cmaps/UniJIS2004-UTF32-V.bcmap +0 -0
  164. package/cmaps/UniJIS2004-UTF8-H.bcmap +0 -0
  165. package/cmaps/UniJIS2004-UTF8-V.bcmap +0 -0
  166. package/cmaps/UniJISPro-UCS2-HW-V.bcmap +0 -0
  167. package/cmaps/UniJISPro-UCS2-V.bcmap +0 -0
  168. package/cmaps/UniJISPro-UTF8-V.bcmap +0 -0
  169. package/cmaps/UniJISX0213-UTF32-H.bcmap +0 -0
  170. package/cmaps/UniJISX0213-UTF32-V.bcmap +0 -0
  171. package/cmaps/UniJISX02132004-UTF32-H.bcmap +0 -0
  172. package/cmaps/UniJISX02132004-UTF32-V.bcmap +0 -0
  173. package/cmaps/UniKS-UCS2-H.bcmap +0 -0
  174. package/cmaps/UniKS-UCS2-V.bcmap +0 -0
  175. package/cmaps/UniKS-UTF16-H.bcmap +0 -0
  176. package/cmaps/UniKS-UTF16-V.bcmap +0 -0
  177. package/cmaps/UniKS-UTF32-H.bcmap +0 -0
  178. package/cmaps/UniKS-UTF32-V.bcmap +0 -0
  179. package/cmaps/UniKS-UTF8-H.bcmap +0 -0
  180. package/cmaps/UniKS-UTF8-V.bcmap +0 -0
  181. package/cmaps/V.bcmap +0 -0
  182. package/cmaps/WP-Symbol.bcmap +0 -0
  183. package/image_decoders/pdf.image_decoders.js +7490 -0
  184. package/image_decoders/pdf.image_decoders.js.map +1 -0
  185. package/image_decoders/pdf.image_decoders.min.js +22 -0
  186. package/legacy/build/pdf.d.ts +1 -0
  187. package/legacy/build/pdf.js +22941 -0
  188. package/legacy/build/pdf.js.map +1 -0
  189. package/legacy/build/pdf.min.js +22 -0
  190. package/legacy/build/pdf.sandbox.js +3274 -0
  191. package/legacy/build/pdf.sandbox.js.map +1 -0
  192. package/legacy/build/pdf.sandbox.min.js +22 -0
  193. package/legacy/build/pdf.worker.entry.js +19 -0
  194. package/legacy/build/pdf.worker.js +62058 -0
  195. package/legacy/build/pdf.worker.js.map +1 -0
  196. package/legacy/build/pdf.worker.min.js +22 -0
  197. package/legacy/image_decoders/pdf.image_decoders.js +10615 -0
  198. package/legacy/image_decoders/pdf.image_decoders.js.map +1 -0
  199. package/legacy/image_decoders/pdf.image_decoders.min.js +22 -0
  200. package/legacy/web/images/annotation-check.svg +11 -0
  201. package/legacy/web/images/annotation-comment.svg +16 -0
  202. package/legacy/web/images/annotation-help.svg +26 -0
  203. package/legacy/web/images/annotation-insert.svg +10 -0
  204. package/legacy/web/images/annotation-key.svg +11 -0
  205. package/legacy/web/images/annotation-newparagraph.svg +11 -0
  206. package/legacy/web/images/annotation-noicon.svg +7 -0
  207. package/legacy/web/images/annotation-note.svg +42 -0
  208. package/legacy/web/images/annotation-paperclip.svg +6 -0
  209. package/legacy/web/images/annotation-paragraph.svg +16 -0
  210. package/legacy/web/images/annotation-pushpin.svg +7 -0
  211. package/legacy/web/images/loading-icon.gif +0 -0
  212. package/legacy/web/pdf_viewer.css +1375 -0
  213. package/legacy/web/pdf_viewer.d.ts +1 -0
  214. package/legacy/web/pdf_viewer.js +10502 -0
  215. package/legacy/web/pdf_viewer.js.map +1 -0
  216. package/package.json +35 -0
  217. package/standard_fonts/FoxitDingbats.pfb +0 -0
  218. package/standard_fonts/FoxitFixed.pfb +0 -0
  219. package/standard_fonts/FoxitFixedBold.pfb +0 -0
  220. package/standard_fonts/FoxitFixedBoldItalic.pfb +0 -0
  221. package/standard_fonts/FoxitFixedItalic.pfb +0 -0
  222. package/standard_fonts/FoxitSerif.pfb +0 -0
  223. package/standard_fonts/FoxitSerifBold.pfb +0 -0
  224. package/standard_fonts/FoxitSerifBoldItalic.pfb +0 -0
  225. package/standard_fonts/FoxitSerifItalic.pfb +0 -0
  226. package/standard_fonts/FoxitSymbol.pfb +0 -0
  227. package/standard_fonts/LICENSE_FOXIT +27 -0
  228. package/standard_fonts/LICENSE_LIBERATION +102 -0
  229. package/standard_fonts/LiberationSans-Bold.ttf +0 -0
  230. package/standard_fonts/LiberationSans-BoldItalic.ttf +0 -0
  231. package/standard_fonts/LiberationSans-Italic.ttf +0 -0
  232. package/standard_fonts/LiberationSans-Regular.ttf +0 -0
  233. package/types/external/webL10n/l10n.d.ts +0 -0
  234. package/types/src/display/annotation_layer.d.ts +203 -0
  235. package/types/src/display/annotation_storage.d.ts +89 -0
  236. package/types/src/display/api.d.ts +1592 -0
  237. package/types/src/display/base_factory.d.ts +54 -0
  238. package/types/src/display/canvas.d.ts +208 -0
  239. package/types/src/display/display_utils.d.ts +277 -0
  240. package/types/src/display/editor/annotation_editor_layer.d.ts +196 -0
  241. package/types/src/display/editor/editor.d.ts +325 -0
  242. package/types/src/display/editor/freetext.d.ts +72 -0
  243. package/types/src/display/editor/ink.d.ts +95 -0
  244. package/types/src/display/editor/stamp.d.ts +28 -0
  245. package/types/src/display/editor/tools.d.ts +349 -0
  246. package/types/src/display/font_loader.d.ts +43 -0
  247. package/types/src/display/metadata.d.ts +11 -0
  248. package/types/src/display/optional_content_config.d.ts +13 -0
  249. package/types/src/display/pattern_helper.d.ts +73 -0
  250. package/types/src/display/text_layer.d.ts +151 -0
  251. package/types/src/display/transport_stream.d.ts +68 -0
  252. package/types/src/display/worker_options.d.ts +27 -0
  253. package/types/src/display/xfa_layer.d.ts +46 -0
  254. package/types/src/display/xfa_text.d.ts +19 -0
  255. package/types/src/pdf.d.ts +62 -0
  256. package/types/src/shared/image_utils.d.ts +17 -0
  257. package/types/src/shared/message_handler.d.ts +43 -0
  258. package/types/src/shared/murmurhash3.d.ts +7 -0
  259. package/types/src/shared/scripting_utils.d.ts +16 -0
  260. package/types/src/shared/util.d.ts +398 -0
  261. package/types/web/annotation_editor_layer_builder.d.ts +50 -0
  262. package/types/web/annotation_layer_builder.d.ts +83 -0
  263. package/types/web/app_options.d.ts +14 -0
  264. package/types/web/download_manager.d.ts +14 -0
  265. package/types/web/event_utils.d.ts +75 -0
  266. package/types/web/generic_scripting.d.ts +8 -0
  267. package/types/web/genericl10n.d.ts +13 -0
  268. package/types/web/interfaces.d.ts +163 -0
  269. package/types/web/l10n_utils.d.ts +7 -0
  270. package/types/web/pdf_find_controller.d.ts +108 -0
  271. package/types/web/pdf_find_utils.d.ts +16 -0
  272. package/types/web/pdf_history.d.ts +168 -0
  273. package/types/web/pdf_link_service.d.ts +243 -0
  274. package/types/web/pdf_page_view.d.ts +209 -0
  275. package/types/web/pdf_rendering_queue.d.ts +53 -0
  276. package/types/web/pdf_scripting_manager.component.d.ts +5 -0
  277. package/types/web/pdf_scripting_manager.d.ts +61 -0
  278. package/types/web/pdf_single_page_viewer.d.ts +7 -0
  279. package/types/web/pdf_thumbnail_view.d.ts +131 -0
  280. package/types/web/pdf_thumbnail_viewer.d.ts +104 -0
  281. package/types/web/pdf_viewer.component.d.ts +24 -0
  282. package/types/web/pdf_viewer.d.ts +455 -0
  283. package/types/web/struct_tree_layer_builder.d.ts +7 -0
  284. package/types/web/text_accessibility.d.ts +42 -0
  285. package/types/web/text_highlighter.d.ts +63 -0
  286. package/types/web/text_layer_builder.d.ts +64 -0
  287. package/types/web/ui_utils.d.ts +288 -0
  288. package/types/web/xfa_layer_builder.d.ts +41 -0
  289. package/web/images/annotation-check.svg +11 -0
  290. package/web/images/annotation-comment.svg +16 -0
  291. package/web/images/annotation-help.svg +26 -0
  292. package/web/images/annotation-insert.svg +10 -0
  293. package/web/images/annotation-key.svg +11 -0
  294. package/web/images/annotation-newparagraph.svg +11 -0
  295. package/web/images/annotation-noicon.svg +7 -0
  296. package/web/images/annotation-note.svg +42 -0
  297. package/web/images/annotation-paperclip.svg +6 -0
  298. package/web/images/annotation-paragraph.svg +16 -0
  299. package/web/images/annotation-pushpin.svg +7 -0
  300. package/web/images/loading-icon.gif +0 -0
  301. package/web/pdf_viewer.css +1375 -0
  302. package/web/pdf_viewer.d.ts +1 -0
  303. package/web/pdf_viewer.js +7752 -0
  304. package/web/pdf_viewer.js.map +1 -0
  305. package/webpack.js +26 -0
@@ -0,0 +1,163 @@
1
+ export type PDFPageProxy = import("../src/display/api").PDFPageProxy;
2
+ export type PageViewport = import("../src/display/display_utils").PageViewport;
3
+ export type RenderingStates = any;
4
+ /**
5
+ * @interface
6
+ */
7
+ export class IDownloadManager {
8
+ /**
9
+ * @param {string} url
10
+ * @param {string} filename
11
+ * @param {Object} [options]
12
+ */
13
+ downloadUrl(url: string, filename: string, options?: Object | undefined): void;
14
+ /**
15
+ * @param {Uint8Array} data
16
+ * @param {string} filename
17
+ * @param {string} [contentType]
18
+ */
19
+ downloadData(data: Uint8Array, filename: string, contentType?: string | undefined): void;
20
+ /**
21
+ * @param {HTMLElement} element
22
+ * @param {Uint8Array} data
23
+ * @param {string} filename
24
+ * @returns {boolean} Indicating if the data was opened.
25
+ */
26
+ openOrDownloadData(element: HTMLElement, data: Uint8Array, filename: string): boolean;
27
+ /**
28
+ * @param {Blob} blob
29
+ * @param {string} url
30
+ * @param {string} filename
31
+ * @param {Object} [options]
32
+ */
33
+ download(blob: Blob, url: string, filename: string, options?: Object | undefined): void;
34
+ }
35
+ /**
36
+ * @interface
37
+ */
38
+ export class IL10n {
39
+ /**
40
+ * @returns {Promise<string>} - Resolves to the current locale.
41
+ */
42
+ getLanguage(): Promise<string>;
43
+ /**
44
+ * @returns {Promise<string>} - Resolves to 'rtl' or 'ltr'.
45
+ */
46
+ getDirection(): Promise<string>;
47
+ /**
48
+ * Translates text identified by the key and adds/formats data using the args
49
+ * property bag. If the key was not found, translation falls back to the
50
+ * fallback text.
51
+ * @param {string} key
52
+ * @param {Object | null} [args]
53
+ * @param {string} [fallback]
54
+ * @returns {Promise<string>}
55
+ */
56
+ get(key: string, args?: Object | null | undefined, fallback?: string | undefined): Promise<string>;
57
+ /**
58
+ * Translates HTML element.
59
+ * @param {HTMLElement} element
60
+ * @returns {Promise<void>}
61
+ */
62
+ translate(element: HTMLElement): Promise<void>;
63
+ }
64
+ /** @typedef {import("../src/display/api").PDFPageProxy} PDFPageProxy */
65
+ /** @typedef {import("../src/display/display_utils").PageViewport} PageViewport */
66
+ /** @typedef {import("./ui_utils").RenderingStates} RenderingStates */
67
+ /**
68
+ * @interface
69
+ */
70
+ export class IPDFLinkService {
71
+ /**
72
+ * @type {number}
73
+ */
74
+ get pagesCount(): number;
75
+ /**
76
+ * @param {number} value
77
+ */
78
+ set page(arg: number);
79
+ /**
80
+ * @type {number}
81
+ */
82
+ get page(): number;
83
+ /**
84
+ * @param {number} value
85
+ */
86
+ set rotation(arg: number);
87
+ /**
88
+ * @type {number}
89
+ */
90
+ get rotation(): number;
91
+ /**
92
+ * @type {boolean}
93
+ */
94
+ get isInPresentationMode(): boolean;
95
+ /**
96
+ * @param {boolean} value
97
+ */
98
+ set externalLinkEnabled(arg: boolean);
99
+ /**
100
+ * @type {boolean}
101
+ */
102
+ get externalLinkEnabled(): boolean;
103
+ /**
104
+ * @param {string|Array} dest - The named, or explicit, PDF destination.
105
+ */
106
+ goToDestination(dest: string | any[]): Promise<void>;
107
+ /**
108
+ * @param {number|string} val - The page number, or page label.
109
+ */
110
+ goToPage(val: number | string): void;
111
+ /**
112
+ * @param {HTMLAnchorElement} link
113
+ * @param {string} url
114
+ * @param {boolean} [newWindow]
115
+ */
116
+ addLinkAttributes(link: HTMLAnchorElement, url: string, newWindow?: boolean | undefined): void;
117
+ /**
118
+ * @param dest - The PDF destination object.
119
+ * @returns {string} The hyperlink to the PDF object.
120
+ */
121
+ getDestinationHash(dest: any): string;
122
+ /**
123
+ * @param hash - The PDF parameters/hash.
124
+ * @returns {string} The hyperlink to the PDF object.
125
+ */
126
+ getAnchorUrl(hash: any): string;
127
+ /**
128
+ * @param {string} hash
129
+ */
130
+ setHash(hash: string): void;
131
+ /**
132
+ * @param {string} action
133
+ */
134
+ executeNamedAction(action: string): void;
135
+ /**
136
+ * @param {Object} action
137
+ */
138
+ executeSetOCGState(action: Object): void;
139
+ /**
140
+ * @param {number} pageNum - page number.
141
+ * @param {Object} pageRef - reference to the page.
142
+ */
143
+ cachePageRef(pageNum: number, pageRef: Object): void;
144
+ }
145
+ /**
146
+ * @interface
147
+ */
148
+ export class IRenderableView {
149
+ /** @type {function | null} */
150
+ resume: Function | null;
151
+ /**
152
+ * @type {string} - Unique ID for rendering queue.
153
+ */
154
+ get renderingId(): string;
155
+ /**
156
+ * @type {RenderingStates}
157
+ */
158
+ get renderingState(): any;
159
+ /**
160
+ * @returns {Promise} Resolved on draw completion.
161
+ */
162
+ draw(): Promise<any>;
163
+ }
@@ -0,0 +1,7 @@
1
+ export function getL10nFallback(key: any, args: any): any;
2
+ export namespace NullL10n {
3
+ function getLanguage(): Promise<string>;
4
+ function getDirection(): Promise<string>;
5
+ function get(key: any, args?: null, fallback?: any): Promise<any>;
6
+ function translate(element: any): Promise<void>;
7
+ }
@@ -0,0 +1,108 @@
1
+ export type PDFDocumentProxy = import("../src/display/api").PDFDocumentProxy;
2
+ export type EventBus = import("./event_utils").EventBus;
3
+ export type IPDFLinkService = import("./interfaces").IPDFLinkService;
4
+ export type PDFFindControllerOptions = {
5
+ /**
6
+ * - The navigation/linking service.
7
+ */
8
+ linkService: IPDFLinkService;
9
+ /**
10
+ * - The application event bus.
11
+ */
12
+ eventBus: EventBus;
13
+ /**
14
+ * - True if the matches
15
+ * count must be updated on progress or only when the last page is reached.
16
+ * The default value is `true`.
17
+ */
18
+ updateMatchesCountOnProgress?: boolean | undefined;
19
+ };
20
+ export namespace FindState {
21
+ let FOUND: number;
22
+ let NOT_FOUND: number;
23
+ let WRAPPED: number;
24
+ let PENDING: number;
25
+ }
26
+ /**
27
+ * @typedef {Object} PDFFindControllerOptions
28
+ * @property {IPDFLinkService} linkService - The navigation/linking service.
29
+ * @property {EventBus} eventBus - The application event bus.
30
+ * @property {boolean} [updateMatchesCountOnProgress] - True if the matches
31
+ * count must be updated on progress or only when the last page is reached.
32
+ * The default value is `true`.
33
+ */
34
+ /**
35
+ * Provides search functionality to find a given string in a PDF document.
36
+ */
37
+ export class PDFFindController {
38
+ /**
39
+ * @param {PDFFindControllerOptions} options
40
+ */
41
+ constructor({ linkService, eventBus, updateMatchesCountOnProgress }: PDFFindControllerOptions);
42
+ _linkService: import("./interfaces").IPDFLinkService;
43
+ _eventBus: import("./event_utils").EventBus;
44
+ /**
45
+ * Callback used to check if a `pageNumber` is currently visible.
46
+ * @type {function}
47
+ */
48
+ onIsPageVisible: Function;
49
+ get highlightMatches(): boolean | undefined;
50
+ get pageMatches(): any[] | undefined;
51
+ get pageMatchesLength(): any[] | undefined;
52
+ get selected(): {
53
+ pageIdx: number;
54
+ matchIdx: number;
55
+ } | undefined;
56
+ get state(): null;
57
+ /**
58
+ * Set a reference to the PDF document in order to search it.
59
+ * Note that searching is not possible if this method is not called.
60
+ *
61
+ * @param {PDFDocumentProxy} pdfDocument - The PDF document to search.
62
+ */
63
+ setDocument(pdfDocument: PDFDocumentProxy): void;
64
+ _pdfDocument: import("../src/display/api").PDFDocumentProxy | null | undefined;
65
+ _dirtyMatch: boolean | undefined;
66
+ _findTimeout: any;
67
+ _highlightMatches: boolean | undefined;
68
+ /**
69
+ * @typedef {Object} PDFFindControllerScrollMatchIntoViewParams
70
+ * @property {HTMLElement} element
71
+ * @property {number} selectedLeft
72
+ * @property {number} pageIndex
73
+ * @property {number} matchIndex
74
+ */
75
+ /**
76
+ * Scroll the current match into view.
77
+ * @param {PDFFindControllerScrollMatchIntoViewParams}
78
+ */
79
+ scrollMatchIntoView({ element, selectedLeft, pageIndex, matchIndex, }: {
80
+ element: HTMLElement;
81
+ selectedLeft: number;
82
+ pageIndex: number;
83
+ matchIndex: number;
84
+ }): void;
85
+ _scrollMatches: boolean | undefined;
86
+ _pageMatches: any[] | undefined;
87
+ _pageMatchesLength: any[] | undefined;
88
+ _selected: {
89
+ pageIdx: number;
90
+ matchIdx: number;
91
+ } | undefined;
92
+ _offset: {
93
+ pageIdx: null;
94
+ matchIdx: null;
95
+ wrapped: boolean;
96
+ } | undefined;
97
+ _extractTextPromises: any[] | undefined;
98
+ _pageContents: any[] | undefined;
99
+ _pageDiffs: any[] | undefined;
100
+ _hasDiacritics: any[] | undefined;
101
+ _matchesCountTotal: number | undefined;
102
+ _pagesToSearch: number | null | undefined;
103
+ _pendingFindMatches: Set<any> | undefined;
104
+ _resumePageIdx: any;
105
+ _firstPageCapability: any;
106
+ _rawQuery: any;
107
+ #private;
108
+ }
@@ -0,0 +1,16 @@
1
+ export namespace CharacterType {
2
+ let SPACE: number;
3
+ let ALPHA_LETTER: number;
4
+ let PUNCT: number;
5
+ let HAN_LETTER: number;
6
+ let KATAKANA_LETTER: number;
7
+ let HIRAGANA_LETTER: number;
8
+ let HALFWIDTH_KATAKANA_LETTER: number;
9
+ let THAI_LETTER: number;
10
+ }
11
+ /**
12
+ * This function is based on the word-break detection implemented in:
13
+ * https://hg.mozilla.org/mozilla-central/file/tip/intl/lwbrk/WordBreaker.cpp
14
+ */
15
+ export function getCharacterType(charCode: any): number;
16
+ export function getNormalizeWithNFKC(): any;
@@ -0,0 +1,168 @@
1
+ export type PDFHistoryOptions = {
2
+ /**
3
+ * - The navigation/linking service.
4
+ */
5
+ linkService: IPDFLinkService;
6
+ /**
7
+ * - The application event bus.
8
+ */
9
+ eventBus: EventBus;
10
+ };
11
+ export type InitializeParameters = {
12
+ /**
13
+ * - The PDF document's unique fingerprint.
14
+ */
15
+ fingerprint: string;
16
+ /**
17
+ * - Reset the browsing history.
18
+ */
19
+ resetHistory?: boolean | undefined;
20
+ /**
21
+ * - Attempt to update the document URL, with
22
+ * the current hash, when pushing/replacing browser history entries.
23
+ */
24
+ updateUrl?: boolean | undefined;
25
+ };
26
+ export type PushParameters = {
27
+ /**
28
+ * - The named destination. If absent, a
29
+ * stringified version of `explicitDest` is used.
30
+ */
31
+ namedDest?: string | undefined;
32
+ /**
33
+ * - The explicit destination array.
34
+ */
35
+ explicitDest: any[];
36
+ /**
37
+ * - The page to which the destination points.
38
+ */
39
+ pageNumber: number;
40
+ };
41
+ export type EventBus = import("./event_utils").EventBus;
42
+ export type IPDFLinkService = import("./interfaces").IPDFLinkService;
43
+ export function isDestArraysEqual(firstDest: any, secondDest: any): boolean;
44
+ export function isDestHashesEqual(destHash: any, pushHash: any): boolean;
45
+ export class PDFHistory {
46
+ /**
47
+ * @param {PDFHistoryOptions} options
48
+ */
49
+ constructor({ linkService, eventBus }: PDFHistoryOptions);
50
+ linkService: import("./interfaces").IPDFLinkService;
51
+ eventBus: import("./event_utils.js").EventBus;
52
+ _initialized: boolean;
53
+ _fingerprint: string;
54
+ _boundEvents: {
55
+ updateViewarea: ({ location }: {
56
+ location: any;
57
+ }) => void;
58
+ popState: ({ state }: {
59
+ state: any;
60
+ }) => void;
61
+ pageHide: () => void;
62
+ } | null;
63
+ _isPagesLoaded: boolean;
64
+ /**
65
+ * Initialize the history for the PDF document, using either the current
66
+ * browser history entry or the document hash, whichever is present.
67
+ * @param {InitializeParameters} params
68
+ */
69
+ initialize({ fingerprint, resetHistory, updateUrl }: InitializeParameters): void;
70
+ _updateUrl: boolean | undefined;
71
+ _popStateInProgress: boolean | undefined;
72
+ _blockHashChange: number | undefined;
73
+ _currentHash: string | undefined;
74
+ _numPositionUpdates: number | undefined;
75
+ _uid: any;
76
+ _maxUid: any;
77
+ _destination: any;
78
+ _position: {
79
+ hash: any;
80
+ page: number;
81
+ first: any;
82
+ rotation: any;
83
+ } | null | undefined;
84
+ _initialRotation: any;
85
+ _initialBookmark: any;
86
+ /**
87
+ * Reset the current `PDFHistory` instance, and consequently prevent any
88
+ * further updates and/or navigation of the browser history.
89
+ */
90
+ reset(): void;
91
+ _updateViewareaTimeout: any;
92
+ /**
93
+ * Push an internal destination to the browser history.
94
+ * @param {PushParameters}
95
+ */
96
+ push({ namedDest, explicitDest, pageNumber }: PushParameters): void;
97
+ /**
98
+ * Push a page to the browser history; generally the `push` method should be
99
+ * used instead.
100
+ * @param {number} pageNumber
101
+ */
102
+ pushPage(pageNumber: number): void;
103
+ /**
104
+ * Push the current position to the browser history.
105
+ */
106
+ pushCurrentPosition(): void;
107
+ /**
108
+ * Go back one step in the browser history.
109
+ * NOTE: Avoids navigating away from the document, useful for "named actions".
110
+ */
111
+ back(): void;
112
+ /**
113
+ * Go forward one step in the browser history.
114
+ * NOTE: Avoids navigating away from the document, useful for "named actions".
115
+ */
116
+ forward(): void;
117
+ /**
118
+ * @type {boolean} Indicating if the user is currently moving through the
119
+ * browser history, useful e.g. for skipping the next 'hashchange' event.
120
+ */
121
+ get popStateInProgress(): boolean;
122
+ get initialBookmark(): any;
123
+ get initialRotation(): any;
124
+ /**
125
+ * @private
126
+ */
127
+ private _pushOrReplaceState;
128
+ /**
129
+ * @private
130
+ */
131
+ private _tryPushCurrentPosition;
132
+ /**
133
+ * @private
134
+ */
135
+ private _isValidPage;
136
+ /**
137
+ * @private
138
+ */
139
+ private _isValidState;
140
+ /**
141
+ * @private
142
+ */
143
+ private _updateInternalState;
144
+ /**
145
+ * @private
146
+ */
147
+ private _parseCurrentHash;
148
+ /**
149
+ * @private
150
+ */
151
+ private _updateViewarea;
152
+ /**
153
+ * @private
154
+ */
155
+ private _popState;
156
+ /**
157
+ * @private
158
+ */
159
+ private _pageHide;
160
+ /**
161
+ * @private
162
+ */
163
+ private _bindEvents;
164
+ /**
165
+ * @private
166
+ */
167
+ private _unbindEvents;
168
+ }
@@ -0,0 +1,243 @@
1
+ export type ExternalLinkParameters = {
2
+ /**
3
+ * - An absolute URL.
4
+ */
5
+ url: string;
6
+ /**
7
+ * - The link target. The default value is
8
+ * `LinkTarget.NONE`.
9
+ */
10
+ target?: {
11
+ NONE: number;
12
+ SELF: number;
13
+ BLANK: number;
14
+ PARENT: number;
15
+ TOP: number;
16
+ } | undefined;
17
+ /**
18
+ * - The link relationship. The default value is
19
+ * `DEFAULT_LINK_REL`.
20
+ */
21
+ rel?: string | undefined;
22
+ /**
23
+ * - Whether the link should be enabled. The
24
+ * default value is true.
25
+ */
26
+ enabled?: boolean | undefined;
27
+ };
28
+ export type EventBus = import("./event_utils").EventBus;
29
+ export type IPDFLinkService = import("./interfaces").IPDFLinkService;
30
+ export type PDFLinkServiceOptions = {
31
+ /**
32
+ * - The application event bus.
33
+ */
34
+ eventBus: EventBus;
35
+ /**
36
+ * - Specifies the `target` attribute
37
+ * for external links. Must use one of the values from {LinkTarget}.
38
+ * Defaults to using no target.
39
+ */
40
+ externalLinkTarget?: number | undefined;
41
+ /**
42
+ * - Specifies the `rel` attribute for
43
+ * external links. Defaults to stripping the referrer.
44
+ */
45
+ externalLinkRel?: string | undefined;
46
+ /**
47
+ * - Ignores the zoom argument,
48
+ * thus preserving the current zoom level in the viewer, when navigating
49
+ * to internal destinations. The default value is `false`.
50
+ */
51
+ ignoreDestinationZoom?: boolean | undefined;
52
+ };
53
+ export namespace LinkTarget {
54
+ let NONE: number;
55
+ let SELF: number;
56
+ let BLANK: number;
57
+ let PARENT: number;
58
+ let TOP: number;
59
+ }
60
+ /**
61
+ * @typedef {Object} PDFLinkServiceOptions
62
+ * @property {EventBus} eventBus - The application event bus.
63
+ * @property {number} [externalLinkTarget] - Specifies the `target` attribute
64
+ * for external links. Must use one of the values from {LinkTarget}.
65
+ * Defaults to using no target.
66
+ * @property {string} [externalLinkRel] - Specifies the `rel` attribute for
67
+ * external links. Defaults to stripping the referrer.
68
+ * @property {boolean} [ignoreDestinationZoom] - Ignores the zoom argument,
69
+ * thus preserving the current zoom level in the viewer, when navigating
70
+ * to internal destinations. The default value is `false`.
71
+ */
72
+ /**
73
+ * Performs navigation functions inside PDF, such as opening specified page,
74
+ * or destination.
75
+ * @implements {IPDFLinkService}
76
+ */
77
+ export class PDFLinkService implements IPDFLinkService {
78
+ static "__#42@#isValidExplicitDestination"(dest: any): boolean;
79
+ /**
80
+ * @param {PDFLinkServiceOptions} options
81
+ */
82
+ constructor({ eventBus, externalLinkTarget, externalLinkRel, ignoreDestinationZoom, }?: PDFLinkServiceOptions);
83
+ eventBus: import("./event_utils").EventBus;
84
+ externalLinkTarget: number;
85
+ externalLinkRel: string;
86
+ externalLinkEnabled: boolean;
87
+ _ignoreDestinationZoom: boolean;
88
+ baseUrl: any;
89
+ pdfDocument: any;
90
+ pdfViewer: any;
91
+ pdfHistory: any;
92
+ setDocument(pdfDocument: any, baseUrl?: null): void;
93
+ setViewer(pdfViewer: any): void;
94
+ setHistory(pdfHistory: any): void;
95
+ /**
96
+ * @type {number}
97
+ */
98
+ get pagesCount(): number;
99
+ /**
100
+ * @param {number} value
101
+ */
102
+ set page(arg: number);
103
+ /**
104
+ * @type {number}
105
+ */
106
+ get page(): number;
107
+ /**
108
+ * @param {number} value
109
+ */
110
+ set rotation(arg: number);
111
+ /**
112
+ * @type {number}
113
+ */
114
+ get rotation(): number;
115
+ /**
116
+ * @type {boolean}
117
+ */
118
+ get isInPresentationMode(): boolean;
119
+ /**
120
+ * This method will, when available, also update the browser history.
121
+ *
122
+ * @param {string|Array} dest - The named, or explicit, PDF destination.
123
+ */
124
+ goToDestination(dest: string | any[]): Promise<void>;
125
+ /**
126
+ * This method will, when available, also update the browser history.
127
+ *
128
+ * @param {number|string} val - The page number, or page label.
129
+ */
130
+ goToPage(val: number | string): void;
131
+ /**
132
+ * Wrapper around the `addLinkAttributes` helper function.
133
+ * @param {HTMLAnchorElement} link
134
+ * @param {string} url
135
+ * @param {boolean} [newWindow]
136
+ */
137
+ addLinkAttributes(link: HTMLAnchorElement, url: string, newWindow?: boolean | undefined): void;
138
+ /**
139
+ * @param {string|Array} dest - The PDF destination object.
140
+ * @returns {string} The hyperlink to the PDF object.
141
+ */
142
+ getDestinationHash(dest: string | any[]): string;
143
+ /**
144
+ * Prefix the full url on anchor links to make sure that links are resolved
145
+ * relative to the current URL instead of the one defined in <base href>.
146
+ * @param {string} anchor - The anchor hash, including the #.
147
+ * @returns {string} The hyperlink to the PDF object.
148
+ */
149
+ getAnchorUrl(anchor: string): string;
150
+ /**
151
+ * @param {string} hash
152
+ */
153
+ setHash(hash: string): void;
154
+ /**
155
+ * @param {string} action
156
+ */
157
+ executeNamedAction(action: string): void;
158
+ /**
159
+ * @param {Object} action
160
+ */
161
+ executeSetOCGState(action: Object): Promise<void>;
162
+ /**
163
+ * @param {number} pageNum - page number.
164
+ * @param {Object} pageRef - reference to the page.
165
+ */
166
+ cachePageRef(pageNum: number, pageRef: Object): void;
167
+ /**
168
+ * @ignore
169
+ */
170
+ _cachedPageNumber(pageRef: any): any;
171
+ #private;
172
+ }
173
+ /**
174
+ * @implements {IPDFLinkService}
175
+ */
176
+ export class SimpleLinkService implements IPDFLinkService {
177
+ externalLinkEnabled: boolean;
178
+ /**
179
+ * @type {number}
180
+ */
181
+ get pagesCount(): number;
182
+ /**
183
+ * @param {number} value
184
+ */
185
+ set page(arg: number);
186
+ /**
187
+ * @type {number}
188
+ */
189
+ get page(): number;
190
+ /**
191
+ * @param {number} value
192
+ */
193
+ set rotation(arg: number);
194
+ /**
195
+ * @type {number}
196
+ */
197
+ get rotation(): number;
198
+ /**
199
+ * @type {boolean}
200
+ */
201
+ get isInPresentationMode(): boolean;
202
+ /**
203
+ * @param {string|Array} dest - The named, or explicit, PDF destination.
204
+ */
205
+ goToDestination(dest: string | any[]): Promise<void>;
206
+ /**
207
+ * @param {number|string} val - The page number, or page label.
208
+ */
209
+ goToPage(val: number | string): void;
210
+ /**
211
+ * @param {HTMLAnchorElement} link
212
+ * @param {string} url
213
+ * @param {boolean} [newWindow]
214
+ */
215
+ addLinkAttributes(link: HTMLAnchorElement, url: string, newWindow?: boolean | undefined): void;
216
+ /**
217
+ * @param dest - The PDF destination object.
218
+ * @returns {string} The hyperlink to the PDF object.
219
+ */
220
+ getDestinationHash(dest: any): string;
221
+ /**
222
+ * @param hash - The PDF parameters/hash.
223
+ * @returns {string} The hyperlink to the PDF object.
224
+ */
225
+ getAnchorUrl(hash: any): string;
226
+ /**
227
+ * @param {string} hash
228
+ */
229
+ setHash(hash: string): void;
230
+ /**
231
+ * @param {string} action
232
+ */
233
+ executeNamedAction(action: string): void;
234
+ /**
235
+ * @param {Object} action
236
+ */
237
+ executeSetOCGState(action: Object): void;
238
+ /**
239
+ * @param {number} pageNum - page number.
240
+ * @param {Object} pageRef - reference to the page.
241
+ */
242
+ cachePageRef(pageNum: number, pageRef: Object): void;
243
+ }