@box/pdfjs-dist 0.0.0-stage → 6.4.299-box.2
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/CHANGELOG.md +16 -0
- package/CODE_OF_CONDUCT.md +15 -0
- package/LICENSE +177 -0
- package/README.md +23 -2
- package/build/pdf.min.mjs +28 -0
- package/build/pdf.mjs +28336 -0
- package/build/pdf.mjs.map +1 -0
- package/build/pdf.sandbox.min.mjs +28 -0
- package/build/pdf.sandbox.mjs +211 -0
- package/build/pdf.sandbox.mjs.map +1 -0
- package/build/pdf.worker.min.mjs +28 -0
- package/build/pdf.worker.mjs +64908 -0
- package/build/pdf.worker.mjs.map +1 -0
- package/cmaps/78-EUC-H.bcmap +0 -0
- package/cmaps/78-EUC-V.bcmap +0 -0
- package/cmaps/78-H.bcmap +0 -0
- package/cmaps/78-RKSJ-H.bcmap +0 -0
- package/cmaps/78-RKSJ-V.bcmap +0 -0
- package/cmaps/78-V.bcmap +0 -0
- package/cmaps/78ms-RKSJ-H.bcmap +0 -0
- package/cmaps/78ms-RKSJ-V.bcmap +0 -0
- package/cmaps/83pv-RKSJ-H.bcmap +0 -0
- package/cmaps/90ms-RKSJ-H.bcmap +0 -0
- package/cmaps/90ms-RKSJ-V.bcmap +0 -0
- package/cmaps/90msp-RKSJ-H.bcmap +0 -0
- package/cmaps/90msp-RKSJ-V.bcmap +0 -0
- package/cmaps/90pv-RKSJ-H.bcmap +0 -0
- package/cmaps/90pv-RKSJ-V.bcmap +0 -0
- package/cmaps/Add-H.bcmap +0 -0
- package/cmaps/Add-RKSJ-H.bcmap +0 -0
- package/cmaps/Add-RKSJ-V.bcmap +0 -0
- package/cmaps/Add-V.bcmap +0 -0
- package/cmaps/Adobe-CNS1-0.bcmap +0 -0
- package/cmaps/Adobe-CNS1-1.bcmap +0 -0
- package/cmaps/Adobe-CNS1-2.bcmap +0 -0
- package/cmaps/Adobe-CNS1-3.bcmap +0 -0
- package/cmaps/Adobe-CNS1-4.bcmap +0 -0
- package/cmaps/Adobe-CNS1-5.bcmap +0 -0
- package/cmaps/Adobe-CNS1-6.bcmap +0 -0
- package/cmaps/Adobe-CNS1-UCS2.bcmap +0 -0
- package/cmaps/Adobe-GB1-0.bcmap +0 -0
- package/cmaps/Adobe-GB1-1.bcmap +0 -0
- package/cmaps/Adobe-GB1-2.bcmap +0 -0
- package/cmaps/Adobe-GB1-3.bcmap +0 -0
- package/cmaps/Adobe-GB1-4.bcmap +0 -0
- package/cmaps/Adobe-GB1-5.bcmap +0 -0
- package/cmaps/Adobe-GB1-UCS2.bcmap +0 -0
- package/cmaps/Adobe-Japan1-0.bcmap +0 -0
- package/cmaps/Adobe-Japan1-1.bcmap +0 -0
- package/cmaps/Adobe-Japan1-2.bcmap +0 -0
- package/cmaps/Adobe-Japan1-3.bcmap +0 -0
- package/cmaps/Adobe-Japan1-4.bcmap +0 -0
- package/cmaps/Adobe-Japan1-5.bcmap +0 -0
- package/cmaps/Adobe-Japan1-6.bcmap +0 -0
- package/cmaps/Adobe-Japan1-UCS2.bcmap +0 -0
- package/cmaps/Adobe-Korea1-0.bcmap +0 -0
- package/cmaps/Adobe-Korea1-1.bcmap +0 -0
- package/cmaps/Adobe-Korea1-2.bcmap +0 -0
- package/cmaps/Adobe-Korea1-UCS2.bcmap +0 -0
- package/cmaps/B5-H.bcmap +0 -0
- package/cmaps/B5-V.bcmap +0 -0
- package/cmaps/B5pc-H.bcmap +0 -0
- package/cmaps/B5pc-V.bcmap +0 -0
- package/cmaps/CNS-EUC-H.bcmap +0 -0
- package/cmaps/CNS-EUC-V.bcmap +0 -0
- package/cmaps/CNS1-H.bcmap +0 -0
- package/cmaps/CNS1-V.bcmap +0 -0
- package/cmaps/CNS2-H.bcmap +0 -0
- package/cmaps/CNS2-V.bcmap +3 -0
- package/cmaps/ETHK-B5-H.bcmap +0 -0
- package/cmaps/ETHK-B5-V.bcmap +0 -0
- package/cmaps/ETen-B5-H.bcmap +0 -0
- package/cmaps/ETen-B5-V.bcmap +0 -0
- package/cmaps/ETenms-B5-H.bcmap +3 -0
- package/cmaps/ETenms-B5-V.bcmap +0 -0
- package/cmaps/EUC-H.bcmap +0 -0
- package/cmaps/EUC-V.bcmap +0 -0
- package/cmaps/Ext-H.bcmap +0 -0
- package/cmaps/Ext-RKSJ-H.bcmap +0 -0
- package/cmaps/Ext-RKSJ-V.bcmap +0 -0
- package/cmaps/Ext-V.bcmap +0 -0
- package/cmaps/GB-EUC-H.bcmap +0 -0
- package/cmaps/GB-EUC-V.bcmap +0 -0
- package/cmaps/GB-H.bcmap +4 -0
- package/cmaps/GB-V.bcmap +0 -0
- package/cmaps/GBK-EUC-H.bcmap +0 -0
- package/cmaps/GBK-EUC-V.bcmap +0 -0
- package/cmaps/GBK2K-H.bcmap +0 -0
- package/cmaps/GBK2K-V.bcmap +0 -0
- package/cmaps/GBKp-EUC-H.bcmap +0 -0
- package/cmaps/GBKp-EUC-V.bcmap +0 -0
- package/cmaps/GBT-EUC-H.bcmap +0 -0
- package/cmaps/GBT-EUC-V.bcmap +0 -0
- package/cmaps/GBT-H.bcmap +0 -0
- package/cmaps/GBT-V.bcmap +0 -0
- package/cmaps/GBTpc-EUC-H.bcmap +0 -0
- package/cmaps/GBTpc-EUC-V.bcmap +0 -0
- package/cmaps/GBpc-EUC-H.bcmap +0 -0
- package/cmaps/GBpc-EUC-V.bcmap +0 -0
- package/cmaps/H.bcmap +0 -0
- package/cmaps/HKdla-B5-H.bcmap +0 -0
- package/cmaps/HKdla-B5-V.bcmap +0 -0
- package/cmaps/HKdlb-B5-H.bcmap +0 -0
- package/cmaps/HKdlb-B5-V.bcmap +0 -0
- package/cmaps/HKgccs-B5-H.bcmap +0 -0
- package/cmaps/HKgccs-B5-V.bcmap +0 -0
- package/cmaps/HKm314-B5-H.bcmap +0 -0
- package/cmaps/HKm314-B5-V.bcmap +0 -0
- package/cmaps/HKm471-B5-H.bcmap +0 -0
- package/cmaps/HKm471-B5-V.bcmap +0 -0
- package/cmaps/HKscs-B5-H.bcmap +0 -0
- package/cmaps/HKscs-B5-V.bcmap +0 -0
- package/cmaps/Hankaku.bcmap +0 -0
- package/cmaps/Hiragana.bcmap +0 -0
- package/cmaps/KSC-EUC-H.bcmap +0 -0
- package/cmaps/KSC-EUC-V.bcmap +0 -0
- package/cmaps/KSC-H.bcmap +0 -0
- package/cmaps/KSC-Johab-H.bcmap +0 -0
- package/cmaps/KSC-Johab-V.bcmap +0 -0
- package/cmaps/KSC-V.bcmap +0 -0
- package/cmaps/KSCms-UHC-H.bcmap +0 -0
- package/cmaps/KSCms-UHC-HW-H.bcmap +0 -0
- package/cmaps/KSCms-UHC-HW-V.bcmap +0 -0
- package/cmaps/KSCms-UHC-V.bcmap +0 -0
- package/cmaps/KSCpc-EUC-H.bcmap +0 -0
- package/cmaps/KSCpc-EUC-V.bcmap +0 -0
- package/cmaps/Katakana.bcmap +0 -0
- package/cmaps/LICENSE +36 -0
- package/cmaps/NWP-H.bcmap +0 -0
- package/cmaps/NWP-V.bcmap +0 -0
- package/cmaps/RKSJ-H.bcmap +0 -0
- package/cmaps/RKSJ-V.bcmap +0 -0
- package/cmaps/Roman.bcmap +0 -0
- package/cmaps/UniCNS-UCS2-H.bcmap +0 -0
- package/cmaps/UniCNS-UCS2-V.bcmap +0 -0
- package/cmaps/UniCNS-UTF16-H.bcmap +0 -0
- package/cmaps/UniCNS-UTF16-V.bcmap +0 -0
- package/cmaps/UniCNS-UTF32-H.bcmap +0 -0
- package/cmaps/UniCNS-UTF32-V.bcmap +0 -0
- package/cmaps/UniCNS-UTF8-H.bcmap +0 -0
- package/cmaps/UniCNS-UTF8-V.bcmap +0 -0
- package/cmaps/UniGB-UCS2-H.bcmap +0 -0
- package/cmaps/UniGB-UCS2-V.bcmap +0 -0
- package/cmaps/UniGB-UTF16-H.bcmap +0 -0
- package/cmaps/UniGB-UTF16-V.bcmap +0 -0
- package/cmaps/UniGB-UTF32-H.bcmap +0 -0
- package/cmaps/UniGB-UTF32-V.bcmap +0 -0
- package/cmaps/UniGB-UTF8-H.bcmap +0 -0
- package/cmaps/UniGB-UTF8-V.bcmap +0 -0
- package/cmaps/UniJIS-UCS2-H.bcmap +0 -0
- package/cmaps/UniJIS-UCS2-HW-H.bcmap +0 -0
- package/cmaps/UniJIS-UCS2-HW-V.bcmap +0 -0
- package/cmaps/UniJIS-UCS2-V.bcmap +0 -0
- package/cmaps/UniJIS-UTF16-H.bcmap +0 -0
- package/cmaps/UniJIS-UTF16-V.bcmap +0 -0
- package/cmaps/UniJIS-UTF32-H.bcmap +0 -0
- package/cmaps/UniJIS-UTF32-V.bcmap +0 -0
- package/cmaps/UniJIS-UTF8-H.bcmap +0 -0
- package/cmaps/UniJIS-UTF8-V.bcmap +0 -0
- package/cmaps/UniJIS2004-UTF16-H.bcmap +0 -0
- package/cmaps/UniJIS2004-UTF16-V.bcmap +0 -0
- package/cmaps/UniJIS2004-UTF32-H.bcmap +0 -0
- package/cmaps/UniJIS2004-UTF32-V.bcmap +0 -0
- package/cmaps/UniJIS2004-UTF8-H.bcmap +0 -0
- package/cmaps/UniJIS2004-UTF8-V.bcmap +0 -0
- package/cmaps/UniJISPro-UCS2-HW-V.bcmap +0 -0
- package/cmaps/UniJISPro-UCS2-V.bcmap +0 -0
- package/cmaps/UniJISPro-UTF8-V.bcmap +0 -0
- package/cmaps/UniJISX0213-UTF32-H.bcmap +0 -0
- package/cmaps/UniJISX0213-UTF32-V.bcmap +0 -0
- package/cmaps/UniJISX02132004-UTF32-H.bcmap +0 -0
- package/cmaps/UniJISX02132004-UTF32-V.bcmap +0 -0
- package/cmaps/UniKS-UCS2-H.bcmap +0 -0
- package/cmaps/UniKS-UCS2-V.bcmap +0 -0
- package/cmaps/UniKS-UTF16-H.bcmap +0 -0
- package/cmaps/UniKS-UTF16-V.bcmap +0 -0
- package/cmaps/UniKS-UTF32-H.bcmap +0 -0
- package/cmaps/UniKS-UTF32-V.bcmap +0 -0
- package/cmaps/UniKS-UTF8-H.bcmap +0 -0
- package/cmaps/UniKS-UTF8-V.bcmap +0 -0
- package/cmaps/V.bcmap +0 -0
- package/cmaps/WP-Symbol.bcmap +0 -0
- package/iccs/CGATS001Compat-v2-micro.icc +0 -0
- package/iccs/LICENSE +116 -0
- package/image_decoders/pdf.image_decoders.min.mjs +28 -0
- package/image_decoders/pdf.image_decoders.mjs +5378 -0
- package/image_decoders/pdf.image_decoders.mjs.map +1 -0
- package/legacy/build/pdf.d.mts +1 -0
- package/legacy/build/pdf.min.mjs +27 -0
- package/legacy/build/pdf.mjs +34799 -0
- package/legacy/build/pdf.mjs.map +1 -0
- package/legacy/build/pdf.sandbox.min.mjs +27 -0
- package/legacy/build/pdf.sandbox.mjs +2502 -0
- package/legacy/build/pdf.sandbox.mjs.map +1 -0
- package/legacy/build/pdf.worker.min.mjs +27 -0
- package/legacy/build/pdf.worker.mjs +71124 -0
- package/legacy/build/pdf.worker.mjs.map +1 -0
- package/legacy/image_decoders/pdf.image_decoders.min.mjs +27 -0
- package/legacy/image_decoders/pdf.image_decoders.mjs +9845 -0
- package/legacy/image_decoders/pdf.image_decoders.mjs.map +1 -0
- package/legacy/web/images/altText_add.svg +3 -0
- package/legacy/web/images/altText_disclaimer.svg +3 -0
- package/legacy/web/images/altText_done.svg +3 -0
- package/legacy/web/images/altText_spinner.svg +30 -0
- package/legacy/web/images/altText_warning.svg +3 -0
- package/legacy/web/images/annotation-check.svg +11 -0
- package/legacy/web/images/annotation-comment.svg +16 -0
- package/legacy/web/images/annotation-help.svg +26 -0
- package/legacy/web/images/annotation-insert.svg +10 -0
- package/legacy/web/images/annotation-key.svg +11 -0
- package/legacy/web/images/annotation-newparagraph.svg +11 -0
- package/legacy/web/images/annotation-noicon.svg +7 -0
- package/legacy/web/images/annotation-note.svg +42 -0
- package/legacy/web/images/annotation-paperclip.svg +6 -0
- package/legacy/web/images/annotation-paragraph.svg +16 -0
- package/legacy/web/images/annotation-pushpin.svg +7 -0
- package/legacy/web/images/checkmark.svg +5 -0
- package/legacy/web/images/comment-actionsButton.svg +3 -0
- package/legacy/web/images/comment-closeButton.svg +3 -0
- package/legacy/web/images/comment-editButton.svg +8 -0
- package/legacy/web/images/comment-popup-editButton.svg +5 -0
- package/legacy/web/images/cursor-editorFreeHighlight.svg +6 -0
- package/legacy/web/images/cursor-editorFreeText.svg +3 -0
- package/legacy/web/images/cursor-editorInk.svg +4 -0
- package/legacy/web/images/cursor-editorTextHighlight.svg +8 -0
- package/legacy/web/images/editor-toolbar-delete.svg +5 -0
- package/legacy/web/images/editor-toolbar-edit.svg +3 -0
- package/legacy/web/images/findbarButton-next.svg +3 -0
- package/legacy/web/images/findbarButton-previous.svg +3 -0
- package/legacy/web/images/gv-toolbarButton-download.svg +3 -0
- package/legacy/web/images/loading-icon.gif +0 -0
- package/legacy/web/images/loading.svg +1 -0
- package/legacy/web/images/messageBar_closingButton.svg +3 -0
- package/legacy/web/images/messageBar_info.svg +3 -0
- package/legacy/web/images/messageBar_warning.svg +3 -0
- package/legacy/web/images/pages_closeButton.svg +3 -0
- package/legacy/web/images/pages_selected.svg +7 -0
- package/legacy/web/images/pages_viewArrow.svg +3 -0
- package/legacy/web/images/pages_viewButton.svg +3 -0
- package/legacy/web/images/secondaryToolbarButton-documentProperties.svg +3 -0
- package/legacy/web/images/secondaryToolbarButton-firstPage.svg +3 -0
- package/legacy/web/images/secondaryToolbarButton-handTool.svg +3 -0
- package/legacy/web/images/secondaryToolbarButton-lastPage.svg +3 -0
- package/legacy/web/images/secondaryToolbarButton-rotateCcw.svg +3 -0
- package/legacy/web/images/secondaryToolbarButton-rotateCw.svg +3 -0
- package/legacy/web/images/secondaryToolbarButton-scrollHorizontal.svg +3 -0
- package/legacy/web/images/secondaryToolbarButton-scrollPage.svg +3 -0
- package/legacy/web/images/secondaryToolbarButton-scrollVertical.svg +3 -0
- package/legacy/web/images/secondaryToolbarButton-scrollWrapped.svg +3 -0
- package/legacy/web/images/secondaryToolbarButton-selectTool.svg +3 -0
- package/legacy/web/images/secondaryToolbarButton-spreadEven.svg +3 -0
- package/legacy/web/images/secondaryToolbarButton-spreadNone.svg +3 -0
- package/legacy/web/images/secondaryToolbarButton-spreadOdd.svg +3 -0
- package/legacy/web/images/signature-properties-row-check.svg +4 -0
- package/legacy/web/images/toolbarButton-bookmark.svg +3 -0
- package/legacy/web/images/toolbarButton-currentOutlineItem.svg +3 -0
- package/legacy/web/images/toolbarButton-download.svg +4 -0
- package/legacy/web/images/toolbarButton-editorFreeText.svg +5 -0
- package/legacy/web/images/toolbarButton-editorHighlight.svg +6 -0
- package/legacy/web/images/toolbarButton-editorInk.svg +4 -0
- package/legacy/web/images/toolbarButton-editorSignature.svg +6 -0
- package/legacy/web/images/toolbarButton-editorStamp.svg +8 -0
- package/legacy/web/images/toolbarButton-menuArrow.svg +3 -0
- package/legacy/web/images/toolbarButton-menuArrowNova.svg +3 -0
- package/legacy/web/images/toolbarButton-openFile.svg +3 -0
- package/legacy/web/images/toolbarButton-pageDown.svg +3 -0
- package/legacy/web/images/toolbarButton-pageUp.svg +3 -0
- package/legacy/web/images/toolbarButton-presentationMode.svg +3 -0
- package/legacy/web/images/toolbarButton-print.svg +3 -0
- package/legacy/web/images/toolbarButton-search.svg +3 -0
- package/legacy/web/images/toolbarButton-secondaryToolbarToggle.svg +3 -0
- package/legacy/web/images/toolbarButton-signaturePropertiesError.svg +7 -0
- package/legacy/web/images/toolbarButton-signaturePropertiesVerified.svg +7 -0
- package/legacy/web/images/toolbarButton-viewAttachments.svg +3 -0
- package/legacy/web/images/toolbarButton-viewLayers.svg +3 -0
- package/legacy/web/images/toolbarButton-viewOutline.svg +3 -0
- package/legacy/web/images/toolbarButton-viewThumbnail.svg +3 -0
- package/legacy/web/images/toolbarButton-viewsManagerToggle.svg +3 -0
- package/legacy/web/images/toolbarButton-zoomIn.svg +3 -0
- package/legacy/web/images/toolbarButton-zoomOut.svg +3 -0
- package/legacy/web/images/treeitem-collapsed.svg +1 -0
- package/legacy/web/images/treeitem-expanded.svg +1 -0
- package/legacy/web/pdf_viewer.css +6463 -0
- package/legacy/web/pdf_viewer.d.mts +1 -0
- package/legacy/web/pdf_viewer.mjs +14798 -0
- package/legacy/web/pdf_viewer.mjs.map +1 -0
- package/legacy/webpack.mjs +26 -0
- package/package.json +33 -4
- package/standard_fonts/FoxitDingbats.pfb +0 -0
- package/standard_fonts/FoxitFixed.pfb +0 -0
- package/standard_fonts/FoxitFixedBold.pfb +0 -0
- package/standard_fonts/FoxitFixedBoldItalic.pfb +0 -0
- package/standard_fonts/FoxitFixedItalic.pfb +0 -0
- package/standard_fonts/FoxitSerif.pfb +0 -0
- package/standard_fonts/FoxitSerifBold.pfb +0 -0
- package/standard_fonts/FoxitSerifBoldItalic.pfb +0 -0
- package/standard_fonts/FoxitSerifItalic.pfb +0 -0
- package/standard_fonts/FoxitSymbol.pfb +0 -0
- package/standard_fonts/LICENSE_FOXIT +27 -0
- package/standard_fonts/LICENSE_LIBERATION +363 -0
- package/standard_fonts/LiberationSans-Bold.ttf +0 -0
- package/standard_fonts/LiberationSans-BoldItalic.ttf +0 -0
- package/standard_fonts/LiberationSans-Italic.ttf +0 -0
- package/standard_fonts/LiberationSans-Regular.ttf +0 -0
- package/types/external/brotli/decode.d.ts +5 -0
- package/types/external/jbig2/jbig2.d.ts +2 -0
- package/types/external/openjpeg/openjpeg.d.ts +2 -0
- package/types/external/qcms/qcms.d.ts +96 -0
- package/types/external/qcms/qcms_utils.d.ts +9 -0
- package/types/src/core/ascii_85_stream.d.ts +7 -0
- package/types/src/core/ascii_hex_stream.d.ts +7 -0
- package/types/src/core/base_stream.d.ts +52 -0
- package/types/src/core/brotli_stream.d.ts +9 -0
- package/types/src/core/calculate_md5.d.ts +1 -0
- package/types/src/core/calculate_sha256.d.ts +1 -0
- package/types/src/core/calculate_sha_other.d.ts +2 -0
- package/types/src/core/catalog.d.ts +169 -0
- package/types/src/core/ccitt_stream.d.ts +18 -0
- package/types/src/core/cleanup_helper.d.ts +1 -0
- package/types/src/core/colorspace.d.ts +168 -0
- package/types/src/core/colorspace_utils.d.ts +21 -0
- package/types/src/core/core_utils.d.ts +136 -0
- package/types/src/core/crypto.d.ts +135 -0
- package/types/src/core/decode_stream.d.ts +32 -0
- package/types/src/core/decrypt_stream.d.ts +9 -0
- package/types/src/core/file_spec.d.ts +67 -0
- package/types/src/core/flate_stream.d.ts +14 -0
- package/types/src/core/icc_colorspace.d.ts +21 -0
- package/types/src/core/image_resizer.d.ts +24 -0
- package/types/src/core/image_utils.d.ts +52 -0
- package/types/src/core/jbig2_ccittFax.d.ts +13 -0
- package/types/src/core/jbig2_stream.d.ts +17 -0
- package/types/src/core/jpeg_stream.d.ts +24 -0
- package/types/src/core/jpg.d.ts +58 -0
- package/types/src/core/jpx.d.ts +24 -0
- package/types/src/core/jpx_stream.d.ts +15 -0
- package/types/src/core/lzw_stream.d.ts +19 -0
- package/types/src/core/metadata_parser.d.ts +13 -0
- package/types/src/core/name_number_tree.d.ts +21 -0
- package/types/src/core/parser.d.ts +119 -0
- package/types/src/core/pattern.d.ts +61 -0
- package/types/src/core/predictor_stream.d.ts +14 -0
- package/types/src/core/primitives.d.ts +95 -0
- package/types/src/core/run_length_stream.d.ts +6 -0
- package/types/src/core/sasl_prep.d.ts +1 -0
- package/types/src/core/sound.d.ts +39 -0
- package/types/src/core/stream.d.ts +20 -0
- package/types/src/core/string_utils.d.ts +5 -0
- package/types/src/core/struct_tree.d.ts +93 -0
- package/types/src/core/unicode.d.ts +5 -0
- package/types/src/core/wasm_image.d.ts +21 -0
- package/types/src/core/xml_parser.d.ts +78 -0
- package/types/src/core/xref.d.ts +39 -0
- package/types/src/display/annotation_layer.d.ts +265 -0
- package/types/src/display/annotation_storage.d.ts +94 -0
- package/types/src/display/api.d.ts +1693 -0
- package/types/src/display/api_utils.d.ts +13 -0
- package/types/src/display/binary_data_factory.d.ts +22 -0
- package/types/src/display/canvas.d.ts +257 -0
- package/types/src/display/canvas_dependency_tracker.d.ts +221 -0
- package/types/src/display/canvas_factory.d.ts +29 -0
- package/types/src/display/content_disposition.d.ts +6 -0
- package/types/src/display/display_utils.d.ts +172 -0
- package/types/src/display/draw_layer.d.ts +143 -0
- package/types/src/display/editor/alt_text.d.ts +34 -0
- package/types/src/display/editor/annotation_editor_layer.d.ts +226 -0
- package/types/src/display/editor/color_picker.d.ts +40 -0
- package/types/src/display/editor/comment.d.ts +59 -0
- package/types/src/display/editor/draw.d.ts +175 -0
- package/types/src/display/editor/drawers/contour.d.ts +3 -0
- package/types/src/display/editor/drawers/freedraw.d.ts +34 -0
- package/types/src/display/editor/drawers/highlight.d.ts +120 -0
- package/types/src/display/editor/drawers/inkdraw.d.ts +134 -0
- package/types/src/display/editor/drawers/outline.d.ts +81 -0
- package/types/src/display/editor/drawers/signaturedraw.d.ts +79 -0
- package/types/src/display/editor/editor.d.ts +581 -0
- package/types/src/display/editor/freetext.d.ts +63 -0
- package/types/src/display/editor/highlight.d.ts +85 -0
- package/types/src/display/editor/ink.d.ts +49 -0
- package/types/src/display/editor/signature.d.ts +77 -0
- package/types/src/display/editor/stamp.d.ts +49 -0
- package/types/src/display/editor/toolbar.d.ts +26 -0
- package/types/src/display/editor/tools.d.ts +503 -0
- package/types/src/display/fetch_stream.d.ts +7 -0
- package/types/src/display/filter_factory.d.ts +53 -0
- package/types/src/display/font_loader.d.ts +52 -0
- package/types/src/display/metadata.d.ts +10 -0
- package/types/src/display/network.d.ts +20 -0
- package/types/src/display/network_stream.d.ts +2 -0
- package/types/src/display/network_utils.d.ts +16 -0
- package/types/src/display/node_stream.d.ts +4 -0
- package/types/src/display/node_utils.d.ts +18 -0
- package/types/src/display/obj_bin_transform_display.d.ts +50 -0
- package/types/src/display/optional_content_config.d.ts +28 -0
- package/types/src/display/page_viewport.d.ts +137 -0
- package/types/src/display/pages_mapper.d.ts +78 -0
- package/types/src/display/pattern_helper.d.ts +88 -0
- package/types/src/display/pdf_objects.d.ts +38 -0
- package/types/src/display/svg_factory.d.ts +14 -0
- package/types/src/display/text_layer.d.ts +93 -0
- package/types/src/display/text_layer_images.d.ts +10 -0
- package/types/src/display/touch_manager.d.ts +55 -0
- package/types/src/display/transport_stream.d.ts +11 -0
- package/types/src/display/webgpu.d.ts +11 -0
- package/types/src/display/worker_options.d.ts +25 -0
- package/types/src/display/xfa_layer.d.ts +49 -0
- package/types/src/display/xfa_text.d.ts +18 -0
- package/types/src/pdf.d.ts +69 -0
- package/types/src/shared/base_pdf_stream.d.ts +120 -0
- package/types/src/shared/css_utils.d.ts +8 -0
- package/types/src/shared/image_utils.d.ts +28 -0
- package/types/src/shared/internal_evt.d.ts +7 -0
- package/types/src/shared/math_clamp.d.ts +1 -0
- package/types/src/shared/message_handler.d.ts +39 -0
- package/types/src/shared/murmurhash3.d.ts +7 -0
- package/types/src/shared/obj_bin_transform_utils.d.ts +27 -0
- package/types/src/shared/scripting_utils.d.ts +18 -0
- package/types/src/shared/util.d.ts +433 -0
- package/types/web/annotation_editor_layer_builder.d.ts +66 -0
- package/types/web/annotation_layer_builder.d.ts +107 -0
- package/types/web/app_options.d.ts +16 -0
- package/types/web/autolinker.d.ts +29 -0
- package/types/web/base_download_manager.d.ts +24 -0
- package/types/web/base_pdf_page_view.d.ts +29 -0
- package/types/web/comment_manager.d.ts +20 -0
- package/types/web/download_manager.d.ts +4 -0
- package/types/web/draw_layer_builder.d.ts +64 -0
- package/types/web/event_utils.d.ts +68 -0
- package/types/web/generic_scripting.d.ts +8 -0
- package/types/web/genericl10n.d.ts +18 -0
- package/types/web/internal_evt.d.ts +7 -0
- package/types/web/l10n.d.ts +31 -0
- package/types/web/menu.d.ts +11 -0
- package/types/web/pdf_find_controller.d.ts +142 -0
- package/types/web/pdf_find_utils.d.ts +10 -0
- package/types/web/pdf_history.d.ts +116 -0
- package/types/web/pdf_link_service.d.ts +148 -0
- package/types/web/pdf_page_detail_view.d.ts +27 -0
- package/types/web/pdf_page_view.d.ts +256 -0
- package/types/web/pdf_rendering_queue.d.ts +49 -0
- package/types/web/pdf_scripting_manager.component.d.ts +5 -0
- package/types/web/pdf_scripting_manager.d.ts +57 -0
- package/types/web/pdf_single_page_viewer.d.ts +7 -0
- package/types/web/pdf_thumbnail_view.d.ts +108 -0
- package/types/web/pdf_thumbnail_viewer.d.ts +179 -0
- package/types/web/pdf_viewer.component.d.ts +23 -0
- package/types/web/pdf_viewer.d.ts +653 -0
- package/types/web/renderable_view.d.ts +33 -0
- package/types/web/sidebar.d.ts +65 -0
- package/types/web/struct_tree_layer_builder.d.ts +39 -0
- package/types/web/text_accessibility.d.ts +46 -0
- package/types/web/text_highlighter.d.ts +62 -0
- package/types/web/text_layer_builder.d.ts +70 -0
- package/types/web/ui_utils.d.ts +260 -0
- package/types/web/xfa_layer_builder.d.ts +50 -0
- package/wasm/LICENSE_JBIG2 +196 -0
- package/wasm/LICENSE_OPENJPEG +39 -0
- package/wasm/LICENSE_PDFJS_JBIG2 +13 -0
- package/wasm/LICENSE_PDFJS_OPENJPEG +22 -0
- package/wasm/LICENSE_PDFJS_QCMS +19 -0
- package/wasm/LICENSE_QCMS +21 -0
- package/wasm/jbig2.wasm +0 -0
- package/wasm/jbig2_nowasm_fallback.js +15 -0
- package/wasm/openjpeg.wasm +0 -0
- package/wasm/openjpeg_nowasm_fallback.js +17 -0
- package/wasm/qcms_bg.wasm +0 -0
- package/wasm/quickjs-eval.js +16 -0
- package/wasm/quickjs-eval.wasm +0 -0
- package/web/images/altText_add.svg +3 -0
- package/web/images/altText_disclaimer.svg +3 -0
- package/web/images/altText_done.svg +3 -0
- package/web/images/altText_spinner.svg +30 -0
- package/web/images/altText_warning.svg +3 -0
- package/web/images/annotation-check.svg +11 -0
- package/web/images/annotation-comment.svg +16 -0
- package/web/images/annotation-help.svg +26 -0
- package/web/images/annotation-insert.svg +10 -0
- package/web/images/annotation-key.svg +11 -0
- package/web/images/annotation-newparagraph.svg +11 -0
- package/web/images/annotation-noicon.svg +7 -0
- package/web/images/annotation-note.svg +42 -0
- package/web/images/annotation-paperclip.svg +6 -0
- package/web/images/annotation-paragraph.svg +16 -0
- package/web/images/annotation-pushpin.svg +7 -0
- package/web/images/checkmark.svg +5 -0
- package/web/images/comment-actionsButton.svg +3 -0
- package/web/images/comment-closeButton.svg +3 -0
- package/web/images/comment-editButton.svg +8 -0
- package/web/images/comment-popup-editButton.svg +5 -0
- package/web/images/cursor-editorFreeHighlight.svg +6 -0
- package/web/images/cursor-editorFreeText.svg +3 -0
- package/web/images/cursor-editorInk.svg +4 -0
- package/web/images/cursor-editorTextHighlight.svg +8 -0
- package/web/images/editor-toolbar-delete.svg +5 -0
- package/web/images/editor-toolbar-edit.svg +3 -0
- package/web/images/findbarButton-next.svg +3 -0
- package/web/images/findbarButton-previous.svg +3 -0
- package/web/images/gv-toolbarButton-download.svg +3 -0
- package/web/images/loading-icon.gif +0 -0
- package/web/images/loading.svg +1 -0
- package/web/images/messageBar_closingButton.svg +3 -0
- package/web/images/messageBar_info.svg +3 -0
- package/web/images/messageBar_warning.svg +3 -0
- package/web/images/pages_closeButton.svg +3 -0
- package/web/images/pages_selected.svg +7 -0
- package/web/images/pages_viewArrow.svg +3 -0
- package/web/images/pages_viewButton.svg +3 -0
- package/web/images/secondaryToolbarButton-documentProperties.svg +3 -0
- package/web/images/secondaryToolbarButton-firstPage.svg +3 -0
- package/web/images/secondaryToolbarButton-handTool.svg +3 -0
- package/web/images/secondaryToolbarButton-lastPage.svg +3 -0
- package/web/images/secondaryToolbarButton-rotateCcw.svg +3 -0
- package/web/images/secondaryToolbarButton-rotateCw.svg +3 -0
- package/web/images/secondaryToolbarButton-scrollHorizontal.svg +3 -0
- package/web/images/secondaryToolbarButton-scrollPage.svg +3 -0
- package/web/images/secondaryToolbarButton-scrollVertical.svg +3 -0
- package/web/images/secondaryToolbarButton-scrollWrapped.svg +3 -0
- package/web/images/secondaryToolbarButton-selectTool.svg +3 -0
- package/web/images/secondaryToolbarButton-spreadEven.svg +3 -0
- package/web/images/secondaryToolbarButton-spreadNone.svg +3 -0
- package/web/images/secondaryToolbarButton-spreadOdd.svg +3 -0
- package/web/images/signature-properties-row-check.svg +4 -0
- package/web/images/toolbarButton-bookmark.svg +3 -0
- package/web/images/toolbarButton-currentOutlineItem.svg +3 -0
- package/web/images/toolbarButton-download.svg +4 -0
- package/web/images/toolbarButton-editorFreeText.svg +5 -0
- package/web/images/toolbarButton-editorHighlight.svg +6 -0
- package/web/images/toolbarButton-editorInk.svg +4 -0
- package/web/images/toolbarButton-editorSignature.svg +6 -0
- package/web/images/toolbarButton-editorStamp.svg +8 -0
- package/web/images/toolbarButton-menuArrow.svg +3 -0
- package/web/images/toolbarButton-menuArrowNova.svg +3 -0
- package/web/images/toolbarButton-openFile.svg +3 -0
- package/web/images/toolbarButton-pageDown.svg +3 -0
- package/web/images/toolbarButton-pageUp.svg +3 -0
- package/web/images/toolbarButton-presentationMode.svg +3 -0
- package/web/images/toolbarButton-print.svg +3 -0
- package/web/images/toolbarButton-search.svg +3 -0
- package/web/images/toolbarButton-secondaryToolbarToggle.svg +3 -0
- package/web/images/toolbarButton-signaturePropertiesError.svg +7 -0
- package/web/images/toolbarButton-signaturePropertiesVerified.svg +7 -0
- package/web/images/toolbarButton-viewAttachments.svg +3 -0
- package/web/images/toolbarButton-viewLayers.svg +3 -0
- package/web/images/toolbarButton-viewOutline.svg +3 -0
- package/web/images/toolbarButton-viewThumbnail.svg +3 -0
- package/web/images/toolbarButton-viewsManagerToggle.svg +3 -0
- package/web/images/toolbarButton-zoomIn.svg +3 -0
- package/web/images/toolbarButton-zoomOut.svg +3 -0
- package/web/images/treeitem-collapsed.svg +1 -0
- package/web/images/treeitem-expanded.svg +1 -0
- package/web/pdf_viewer.css +6463 -0
- package/web/pdf_viewer.d.mts +1 -0
- package/web/pdf_viewer.mjs +9811 -0
- package/web/pdf_viewer.mjs.map +1 -0
- package/webpack.mjs +26 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export class BasePDFPageView extends RenderableView {
|
|
2
|
+
constructor(options: any);
|
|
3
|
+
canvas: null;
|
|
4
|
+
/** @type {null | HTMLDivElement} */
|
|
5
|
+
div: null | HTMLDivElement;
|
|
6
|
+
enableOptimizedPartialRendering: boolean;
|
|
7
|
+
enableSelectionRendering: boolean;
|
|
8
|
+
imagesRightClickMinSize: number;
|
|
9
|
+
eventBus: null;
|
|
10
|
+
id: null;
|
|
11
|
+
imageCoordinates: null;
|
|
12
|
+
pageColors: null;
|
|
13
|
+
recordedBBoxes: null;
|
|
14
|
+
renderingQueue: null;
|
|
15
|
+
minDurationToUpdateCanvas: any;
|
|
16
|
+
_createCanvas(onShow: any, hideUntilComplete?: boolean): {
|
|
17
|
+
canvas: HTMLCanvasElement;
|
|
18
|
+
prevCanvas: null;
|
|
19
|
+
};
|
|
20
|
+
_resetCanvas(): void;
|
|
21
|
+
_drawCanvas(options: any, onCancel: any, onFinish: any): Promise<void>;
|
|
22
|
+
cancelRendering({ cancelExtraDelay }?: {
|
|
23
|
+
cancelExtraDelay?: number | undefined;
|
|
24
|
+
}): void;
|
|
25
|
+
dispatchPageRender(): void;
|
|
26
|
+
dispatchPageRendered(cssTransform: any, isDetailView: any): void;
|
|
27
|
+
#private;
|
|
28
|
+
}
|
|
29
|
+
import { RenderableView } from "./renderable_view.js";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export class CommentManager {
|
|
2
|
+
static #hasForcedColors: null;
|
|
3
|
+
static _makeCommentColor(color: any, opacity: any): string | null;
|
|
4
|
+
constructor(commentDialog: any, sidebar: any, eventBus: any, linkService: any, overlayManager: any, ltr: any, hasForcedColors: any, globalAbortSignal: any);
|
|
5
|
+
dialogElement: any;
|
|
6
|
+
setSidebarUiManager(uiManager: any): void;
|
|
7
|
+
showSidebar(annotations: any): void;
|
|
8
|
+
hideSidebar(): void;
|
|
9
|
+
removeComments(ids: any): void;
|
|
10
|
+
selectComment(id: any): void;
|
|
11
|
+
addComment(annotation: any): void;
|
|
12
|
+
updateComment(annotation: any): void;
|
|
13
|
+
toggleCommentPopup(editor: any, isSelected: any, visibility: any, isEditable: any): void;
|
|
14
|
+
destroyPopup(): void;
|
|
15
|
+
updatePopupColor(editor: any): void;
|
|
16
|
+
showDialog(uiManager: any, editor: any, posX: any, posY: any, options: any): Promise<void>;
|
|
17
|
+
makeCommentColor(color: any, opacity: any): string | null;
|
|
18
|
+
destroy(): void;
|
|
19
|
+
#private;
|
|
20
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration for {@linkcode DrawLayerBuilder}.
|
|
3
|
+
*/
|
|
4
|
+
export type DrawLayerBuilderOptions = {
|
|
5
|
+
/**
|
|
6
|
+
* Zero-based page index.
|
|
7
|
+
*/
|
|
8
|
+
pageIndex: number;
|
|
9
|
+
/**
|
|
10
|
+
* Text layer element (optional).
|
|
11
|
+
*/
|
|
12
|
+
textLayer?: Element | null | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Filter factory used to style selections (optional).
|
|
15
|
+
*/
|
|
16
|
+
filterFactory?: object | null | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Page foreground/background colors for HCM (optional).
|
|
19
|
+
*/
|
|
20
|
+
pageColors?: object | null | undefined;
|
|
21
|
+
};
|
|
22
|
+
export type DrawLayerBuilderRenderOptions = {
|
|
23
|
+
/**
|
|
24
|
+
* - The default value is "display".
|
|
25
|
+
*/
|
|
26
|
+
intent?: string | undefined;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* @typedef DrawLayerBuilderOptions
|
|
30
|
+
* Configuration for {@linkcode DrawLayerBuilder}.
|
|
31
|
+
* @property {number} pageIndex
|
|
32
|
+
* Zero-based page index.
|
|
33
|
+
* @property {Element | null} [textLayer]
|
|
34
|
+
* Text layer element (optional).
|
|
35
|
+
* @property {object | null} [filterFactory]
|
|
36
|
+
* Filter factory used to style selections (optional).
|
|
37
|
+
* @property {object | null} [pageColors]
|
|
38
|
+
* Page foreground/background colors for HCM (optional).
|
|
39
|
+
*/
|
|
40
|
+
/**
|
|
41
|
+
* @typedef {object} DrawLayerBuilderRenderOptions
|
|
42
|
+
* @property {string} [intent] - The default value is "display".
|
|
43
|
+
*/
|
|
44
|
+
export class DrawLayerBuilder {
|
|
45
|
+
/**
|
|
46
|
+
* @param {DrawLayerBuilderOptions} options
|
|
47
|
+
* Configuration.
|
|
48
|
+
*/
|
|
49
|
+
constructor(options: DrawLayerBuilderOptions);
|
|
50
|
+
pageIndex: number;
|
|
51
|
+
textLayer: Element | null;
|
|
52
|
+
filterFactory: object | null;
|
|
53
|
+
pageColors: object | null;
|
|
54
|
+
/**
|
|
55
|
+
* @param {DrawLayerBuilderRenderOptions} options
|
|
56
|
+
* @returns {Promise<void>}
|
|
57
|
+
*/
|
|
58
|
+
render({ intent }: DrawLayerBuilderRenderOptions): Promise<void>;
|
|
59
|
+
cancel(): void;
|
|
60
|
+
_cancelled: boolean | undefined;
|
|
61
|
+
setParent(parent: any): void;
|
|
62
|
+
getDrawLayer(): null;
|
|
63
|
+
#private;
|
|
64
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export type WaitOnEventOrTimeoutParameters = {
|
|
2
|
+
/**
|
|
3
|
+
* - The event target, can for example be:
|
|
4
|
+
* `window`, `document`, a DOM element, or an {EventBus} instance.
|
|
5
|
+
*/
|
|
6
|
+
target: object;
|
|
7
|
+
/**
|
|
8
|
+
* - The name of the event.
|
|
9
|
+
*/
|
|
10
|
+
name: string;
|
|
11
|
+
/**
|
|
12
|
+
* - The delay, in milliseconds, after which the
|
|
13
|
+
* timeout occurs (if the event wasn't already dispatched).
|
|
14
|
+
*/
|
|
15
|
+
delay: number;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Simple event bus for an application. Listeners are attached using the `on`
|
|
19
|
+
* and `off` methods. To raise an event, the `dispatch` method shall be used.
|
|
20
|
+
*/
|
|
21
|
+
export class EventBus {
|
|
22
|
+
/**
|
|
23
|
+
* @param {string} eventName
|
|
24
|
+
* @param {Function} listener
|
|
25
|
+
* @param {object} [options]
|
|
26
|
+
*/
|
|
27
|
+
on(eventName: string, listener: Function, options?: object): void;
|
|
28
|
+
/**
|
|
29
|
+
* @param {string} eventName
|
|
30
|
+
* @param {Function} listener
|
|
31
|
+
* @param {object} [options]
|
|
32
|
+
*/
|
|
33
|
+
off(eventName: string, listener: Function, options?: object): void;
|
|
34
|
+
/**
|
|
35
|
+
* @param {string} eventName
|
|
36
|
+
* @param {object} data
|
|
37
|
+
*/
|
|
38
|
+
dispatch(eventName: string, data: object): void;
|
|
39
|
+
#private;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* NOTE: Only used in the Firefox built-in pdf viewer.
|
|
43
|
+
*/
|
|
44
|
+
export class FirefoxEventBus extends EventBus {
|
|
45
|
+
constructor(globalEventNames: any, externalServices: any, isInAutomation: any);
|
|
46
|
+
dispatch(eventName: any, data: any): void;
|
|
47
|
+
#private;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* @typedef {object} WaitOnEventOrTimeoutParameters
|
|
51
|
+
* @property {object} target - The event target, can for example be:
|
|
52
|
+
* `window`, `document`, a DOM element, or an {EventBus} instance.
|
|
53
|
+
* @property {string} name - The name of the event.
|
|
54
|
+
* @property {number} delay - The delay, in milliseconds, after which the
|
|
55
|
+
* timeout occurs (if the event wasn't already dispatched).
|
|
56
|
+
*/
|
|
57
|
+
/**
|
|
58
|
+
* Allows waiting for an event or a timeout, whichever occurs first.
|
|
59
|
+
* Can be used to ensure that an action always occurs, even when an event
|
|
60
|
+
* arrives late or not at all.
|
|
61
|
+
* @param {WaitOnEventOrTimeoutParameters} params
|
|
62
|
+
* @returns {Promise} A promise that is resolved with a {WaitOnType} value.
|
|
63
|
+
*/
|
|
64
|
+
export function waitOnEventOrTimeout({ target, name, delay }: WaitOnEventOrTimeoutParameters): Promise<any>;
|
|
65
|
+
export namespace WaitOnType {
|
|
66
|
+
let EVENT: string;
|
|
67
|
+
let TIMEOUT: string;
|
|
68
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export function docProperties(pdfDocument: any): Promise<any>;
|
|
2
|
+
export class GenericScripting {
|
|
3
|
+
constructor(sandboxBundleSrc: any, wasmUrl: any);
|
|
4
|
+
_ready: Promise<any>;
|
|
5
|
+
createSandbox(data: any): Promise<void>;
|
|
6
|
+
dispatchEventInSandbox(event: any): Promise<void>;
|
|
7
|
+
destroySandbox(): Promise<void>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export class GenericL10n extends L10n {
|
|
2
|
+
/**
|
|
3
|
+
* Generate the bundles for Fluent.
|
|
4
|
+
* @param {string} defaultLang - The fallback language to use for
|
|
5
|
+
* translations.
|
|
6
|
+
* @param {string} baseLang - The base language to use for translations.
|
|
7
|
+
*/
|
|
8
|
+
static #generateBundles(defaultLang: string, baseLang: string): AsyncGenerator<any, void, unknown>;
|
|
9
|
+
static #createBundle(lang: any, baseURL: any, paths: any): Promise<any>;
|
|
10
|
+
static #getPaths(): Promise<{
|
|
11
|
+
baseURL: any;
|
|
12
|
+
paths: any;
|
|
13
|
+
}>;
|
|
14
|
+
static #generateBundlesFallback(lang: any): AsyncGenerator<any, void, unknown>;
|
|
15
|
+
static #createBundleFallback(lang: any): Promise<any>;
|
|
16
|
+
constructor(lang: any);
|
|
17
|
+
}
|
|
18
|
+
import { L10n } from "./l10n.js";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export const GenericL10n: null;
|
|
2
|
+
/**
|
|
3
|
+
* NOTE: The L10n-implementations should use lowercase language-codes
|
|
4
|
+
* internally.
|
|
5
|
+
*/
|
|
6
|
+
export class L10n {
|
|
7
|
+
static #fixupLangCode(langCode: any): any;
|
|
8
|
+
static #isRTL(lang: any): boolean;
|
|
9
|
+
constructor({ lang, isRTL }: {
|
|
10
|
+
lang: any;
|
|
11
|
+
isRTL: any;
|
|
12
|
+
}, l10n?: null);
|
|
13
|
+
_setL10n(l10n: any): void;
|
|
14
|
+
/** @inheritdoc */
|
|
15
|
+
getLanguage(): any;
|
|
16
|
+
/** @inheritdoc */
|
|
17
|
+
getDirection(): string;
|
|
18
|
+
/** @inheritdoc */
|
|
19
|
+
get(ids: any, args?: null): Promise<any>;
|
|
20
|
+
/** @inheritdoc */
|
|
21
|
+
translate(element: any): Promise<void>;
|
|
22
|
+
/** @inheritdoc */
|
|
23
|
+
translateOnce(element: any): Promise<void>;
|
|
24
|
+
/** @inheritdoc */
|
|
25
|
+
destroy(): Promise<void>;
|
|
26
|
+
/** @inheritdoc */
|
|
27
|
+
pause(): void;
|
|
28
|
+
/** @inheritdoc */
|
|
29
|
+
resume(): void;
|
|
30
|
+
#private;
|
|
31
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export class Menu {
|
|
2
|
+
/**
|
|
3
|
+
* Create a menu for the given button.
|
|
4
|
+
* @param {HTMLElement} menuContainer
|
|
5
|
+
* @param {HTMLElement} triggeringButton
|
|
6
|
+
* @param {Array<HTMLElement>|null} menuItems
|
|
7
|
+
*/
|
|
8
|
+
constructor(menuContainer: HTMLElement, triggeringButton: HTMLElement, menuItems: Array<HTMLElement> | null);
|
|
9
|
+
destroy(): void;
|
|
10
|
+
#private;
|
|
11
|
+
}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
export type PDFDocumentProxy = import("../src/display/api").PDFDocumentProxy;
|
|
2
|
+
export type EventBus = import("./event_utils").EventBus;
|
|
3
|
+
export type PDFLinkService = import("./pdf_link_service.js").PDFLinkService;
|
|
4
|
+
export type PDFFindControllerOptions = {
|
|
5
|
+
/**
|
|
6
|
+
* - The navigation/linking service.
|
|
7
|
+
*/
|
|
8
|
+
linkService: PDFLinkService;
|
|
9
|
+
/**
|
|
10
|
+
* - The application event bus.
|
|
11
|
+
*/
|
|
12
|
+
eventBus: EventBus;
|
|
13
|
+
/**
|
|
14
|
+
* - The number of milliseconds to delay execution of
|
|
15
|
+
* find commands. In the viewer each keystroke in the find bar triggers a
|
|
16
|
+
* `find` event, so this delay avoids triggering a search prematurely when the
|
|
17
|
+
* user is still typing the query. The default value is 250.
|
|
18
|
+
*/
|
|
19
|
+
delay?: number | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* - True if the matches
|
|
22
|
+
* count must be updated on progress or only when the last page is reached.
|
|
23
|
+
* The default value is `true`.
|
|
24
|
+
*/
|
|
25
|
+
updateMatchesCountOnProgress?: boolean | undefined;
|
|
26
|
+
};
|
|
27
|
+
export namespace FindState {
|
|
28
|
+
let FOUND: number;
|
|
29
|
+
let NOT_FOUND: number;
|
|
30
|
+
let WRAPPED: number;
|
|
31
|
+
let PENDING: number;
|
|
32
|
+
}
|
|
33
|
+
export function getOriginalIndex(diffs: any, pos: any, len: any): any[];
|
|
34
|
+
export function normalize(text: any, options?: {}): any[];
|
|
35
|
+
/**
|
|
36
|
+
* @typedef {object} PDFFindControllerOptions
|
|
37
|
+
* @property {PDFLinkService} linkService - The navigation/linking service.
|
|
38
|
+
* @property {EventBus} eventBus - The application event bus.
|
|
39
|
+
* @property {number} [delay] - The number of milliseconds to delay execution of
|
|
40
|
+
* find commands. In the viewer each keystroke in the find bar triggers a
|
|
41
|
+
* `find` event, so this delay avoids triggering a search prematurely when the
|
|
42
|
+
* user is still typing the query. The default value is 250.
|
|
43
|
+
* @property {boolean} [updateMatchesCountOnProgress] - True if the matches
|
|
44
|
+
* count must be updated on progress or only when the last page is reached.
|
|
45
|
+
* The default value is `true`.
|
|
46
|
+
*/
|
|
47
|
+
/**
|
|
48
|
+
* Provides search functionality to find a given string in a PDF document.
|
|
49
|
+
*/
|
|
50
|
+
export class PDFFindController {
|
|
51
|
+
/**
|
|
52
|
+
* @param {PDFFindControllerOptions} options
|
|
53
|
+
*/
|
|
54
|
+
constructor({ linkService, eventBus, delay, updateMatchesCountOnProgress, }: PDFFindControllerOptions);
|
|
55
|
+
_linkService: import("./pdf_link_service.js").PDFLinkService;
|
|
56
|
+
_eventBus: import("./event_utils").EventBus;
|
|
57
|
+
/**
|
|
58
|
+
* Callback used to check if a `pageNumber` is currently visible.
|
|
59
|
+
* @type {Function}
|
|
60
|
+
*/
|
|
61
|
+
onIsPageVisible: Function;
|
|
62
|
+
get highlightMatches(): boolean | undefined;
|
|
63
|
+
get pageMatches(): any[] | undefined;
|
|
64
|
+
get pageMatchesLength(): any[] | undefined;
|
|
65
|
+
get selected(): {
|
|
66
|
+
pageIdx: number;
|
|
67
|
+
matchIdx: number;
|
|
68
|
+
} | undefined;
|
|
69
|
+
get state(): null;
|
|
70
|
+
/**
|
|
71
|
+
* Set a reference to the PDF document in order to search it.
|
|
72
|
+
* Note that searching is not possible if this method is not called.
|
|
73
|
+
* @param {PDFDocumentProxy} pdfDocument - The PDF document to search.
|
|
74
|
+
*/
|
|
75
|
+
setDocument(pdfDocument: PDFDocumentProxy): void;
|
|
76
|
+
_pdfDocument: import("../src/display/api").PDFDocumentProxy | null | undefined;
|
|
77
|
+
_dirtyMatch: boolean | undefined;
|
|
78
|
+
_findTimeout: any;
|
|
79
|
+
_highlightMatches: boolean | undefined;
|
|
80
|
+
/**
|
|
81
|
+
* @typedef {object} PDFFindControllerScrollMatchIntoViewParams
|
|
82
|
+
* @property {HTMLElement} element
|
|
83
|
+
* @property {number} pageIndex
|
|
84
|
+
* @property {number} matchIndex
|
|
85
|
+
*/
|
|
86
|
+
/**
|
|
87
|
+
* Scroll the current match into view.
|
|
88
|
+
* @param {PDFFindControllerScrollMatchIntoViewParams} params
|
|
89
|
+
*/
|
|
90
|
+
scrollMatchIntoView({ element, pageIndex, matchIndex }: {
|
|
91
|
+
element: HTMLElement;
|
|
92
|
+
pageIndex: number;
|
|
93
|
+
matchIndex: number;
|
|
94
|
+
}): void;
|
|
95
|
+
_scrollMatches: boolean | undefined;
|
|
96
|
+
_pageMatches: any[] | undefined;
|
|
97
|
+
_pageMatchesLength: any[] | undefined;
|
|
98
|
+
_selected: {
|
|
99
|
+
pageIdx: number;
|
|
100
|
+
matchIdx: number;
|
|
101
|
+
} | undefined;
|
|
102
|
+
_offset: {
|
|
103
|
+
pageIdx: null;
|
|
104
|
+
matchIdx: null;
|
|
105
|
+
wrapped: boolean;
|
|
106
|
+
} | undefined;
|
|
107
|
+
_extractTextPromises: any;
|
|
108
|
+
_pageContents: any;
|
|
109
|
+
_pageDiffs: any;
|
|
110
|
+
_hasDiacritics: any;
|
|
111
|
+
_matchesCountTotal: number | undefined;
|
|
112
|
+
_pagesToSearch: number | null | undefined;
|
|
113
|
+
_pendingFindMatches: Set<any> | undefined;
|
|
114
|
+
_resumePageIdx: any;
|
|
115
|
+
_firstPageCapability: any;
|
|
116
|
+
_rawQuery: any;
|
|
117
|
+
/**
|
|
118
|
+
* @typedef {object} FindMatch
|
|
119
|
+
* @property {number} index - The start of the matched text in the page's
|
|
120
|
+
* string contents.
|
|
121
|
+
* @property {number} length - The length of the matched text.
|
|
122
|
+
*/
|
|
123
|
+
/**
|
|
124
|
+
* @param {string | string[]} query - The search query.
|
|
125
|
+
* @param {string} pageContent - The text content of the page to search in.
|
|
126
|
+
* @param {number} pageIndex - The index of the page that is being processed.
|
|
127
|
+
* @returns {FindMatch[] | undefined} An array of matches in the provided
|
|
128
|
+
* page.
|
|
129
|
+
*/
|
|
130
|
+
match(query: string | string[], pageContent: string, pageIndex: number): {
|
|
131
|
+
/**
|
|
132
|
+
* - The start of the matched text in the page's
|
|
133
|
+
* string contents.
|
|
134
|
+
*/
|
|
135
|
+
index: number;
|
|
136
|
+
/**
|
|
137
|
+
* - The length of the matched text.
|
|
138
|
+
*/
|
|
139
|
+
length: number;
|
|
140
|
+
}[] | undefined;
|
|
141
|
+
#private;
|
|
142
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export function getNormalizeWithNFKC(): any;
|
|
2
|
+
/**
|
|
3
|
+
* Determine if the match spanning `[startIdx, startIdx + length)` in `content`
|
|
4
|
+
* is a whole word, i.e. there's a word break on each side of it. Each boundary
|
|
5
|
+
* is tested on its two adjacent characters in isolation rather than on the
|
|
6
|
+
* whole string, so a contraction such as "can't" doesn't prevent "can" from
|
|
7
|
+
* being an entire word, matching Firefox's find:
|
|
8
|
+
* https://searchfox.org/firefox-main/source/toolkit/components/find/nsFind.cpp
|
|
9
|
+
*/
|
|
10
|
+
export function isEntireWord(content: any, startIdx: any, length: any): boolean;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
export type PDFHistoryOptions = {
|
|
2
|
+
/**
|
|
3
|
+
* - The navigation/linking service.
|
|
4
|
+
*/
|
|
5
|
+
linkService: PDFLinkService;
|
|
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 PDFLinkService = import("./pdf_link_service.js").PDFLinkService;
|
|
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("./pdf_link_service.js").PDFLinkService;
|
|
51
|
+
eventBus: import("./event_utils.js").EventBus;
|
|
52
|
+
_initialized: boolean;
|
|
53
|
+
_fingerprint: string;
|
|
54
|
+
_isPagesLoaded: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Initialize the history for the PDF document, using either the current
|
|
57
|
+
* browser history entry or the document hash, whichever is present.
|
|
58
|
+
* @param {InitializeParameters} params
|
|
59
|
+
*/
|
|
60
|
+
initialize({ fingerprint, resetHistory, updateUrl }: InitializeParameters): void;
|
|
61
|
+
_updateUrl: boolean | undefined;
|
|
62
|
+
_popStateInProgress: boolean | undefined;
|
|
63
|
+
_blockHashChange: number | undefined;
|
|
64
|
+
_currentHash: string | undefined;
|
|
65
|
+
_numPositionUpdates: number | undefined;
|
|
66
|
+
_uid: any;
|
|
67
|
+
_maxUid: any;
|
|
68
|
+
_destination: any;
|
|
69
|
+
_position: {
|
|
70
|
+
hash: any;
|
|
71
|
+
page: number;
|
|
72
|
+
first: any;
|
|
73
|
+
rotation: any;
|
|
74
|
+
} | null | undefined;
|
|
75
|
+
_initialRotation: any;
|
|
76
|
+
_initialBookmark: any;
|
|
77
|
+
/**
|
|
78
|
+
* Reset the current `PDFHistory` instance, and consequently prevent any
|
|
79
|
+
* further updates and/or navigation of the browser history.
|
|
80
|
+
*/
|
|
81
|
+
reset(): void;
|
|
82
|
+
_updateViewareaTimeout: any;
|
|
83
|
+
/**
|
|
84
|
+
* Push an internal destination to the browser history.
|
|
85
|
+
* @param {PushParameters} params
|
|
86
|
+
*/
|
|
87
|
+
push({ namedDest, explicitDest, pageNumber }: PushParameters): void;
|
|
88
|
+
/**
|
|
89
|
+
* Push a page to the browser history; generally the `push` method should be
|
|
90
|
+
* used instead.
|
|
91
|
+
* @param {number} pageNumber
|
|
92
|
+
*/
|
|
93
|
+
pushPage(pageNumber: number): void;
|
|
94
|
+
/**
|
|
95
|
+
* Push the current position to the browser history.
|
|
96
|
+
*/
|
|
97
|
+
pushCurrentPosition(): void;
|
|
98
|
+
/**
|
|
99
|
+
* Go back one step in the browser history.
|
|
100
|
+
* NOTE: Avoids navigating away from the document, useful for "named actions".
|
|
101
|
+
*/
|
|
102
|
+
back(): void;
|
|
103
|
+
/**
|
|
104
|
+
* Go forward one step in the browser history.
|
|
105
|
+
* NOTE: Avoids navigating away from the document, useful for "named actions".
|
|
106
|
+
*/
|
|
107
|
+
forward(): void;
|
|
108
|
+
/**
|
|
109
|
+
* @type {boolean} Indicating if the user is currently moving through the
|
|
110
|
+
* browser history, useful e.g. for skipping the next 'hashchange' event.
|
|
111
|
+
*/
|
|
112
|
+
get popStateInProgress(): boolean;
|
|
113
|
+
get initialBookmark(): any;
|
|
114
|
+
get initialRotation(): any;
|
|
115
|
+
#private;
|
|
116
|
+
}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
export type EventBus = import("./event_utils").EventBus;
|
|
2
|
+
export type PDFLinkServiceOptions = {
|
|
3
|
+
/**
|
|
4
|
+
* - The application event bus.
|
|
5
|
+
*/
|
|
6
|
+
eventBus: EventBus;
|
|
7
|
+
/**
|
|
8
|
+
* - Specifies the `target` attribute
|
|
9
|
+
* for external links. Must use one of the values from {LinkTarget}.
|
|
10
|
+
* Defaults to using no target.
|
|
11
|
+
*/
|
|
12
|
+
externalLinkTarget?: number | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* - Specifies the `rel` attribute for
|
|
15
|
+
* external links. Defaults to stripping the referrer.
|
|
16
|
+
*/
|
|
17
|
+
externalLinkRel?: string | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* - Ignores the zoom argument,
|
|
20
|
+
* thus preserving the current zoom level in the viewer, when navigating
|
|
21
|
+
* to internal destinations. The default value is `false`.
|
|
22
|
+
*/
|
|
23
|
+
ignoreDestinationZoom?: boolean | undefined;
|
|
24
|
+
};
|
|
25
|
+
export namespace LinkTarget {
|
|
26
|
+
let NONE: number;
|
|
27
|
+
let SELF: number;
|
|
28
|
+
let BLANK: number;
|
|
29
|
+
let PARENT: number;
|
|
30
|
+
let TOP: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* @typedef {object} PDFLinkServiceOptions
|
|
34
|
+
* @property {EventBus} eventBus - The application event bus.
|
|
35
|
+
* @property {number} [externalLinkTarget] - Specifies the `target` attribute
|
|
36
|
+
* for external links. Must use one of the values from {LinkTarget}.
|
|
37
|
+
* Defaults to using no target.
|
|
38
|
+
* @property {string} [externalLinkRel] - Specifies the `rel` attribute for
|
|
39
|
+
* external links. Defaults to stripping the referrer.
|
|
40
|
+
* @property {boolean} [ignoreDestinationZoom] - Ignores the zoom argument,
|
|
41
|
+
* thus preserving the current zoom level in the viewer, when navigating
|
|
42
|
+
* to internal destinations. The default value is `false`.
|
|
43
|
+
*/
|
|
44
|
+
/**
|
|
45
|
+
* Performs navigation functions inside PDF, such as opening specified page,
|
|
46
|
+
* or destination.
|
|
47
|
+
*/
|
|
48
|
+
export class PDFLinkService {
|
|
49
|
+
/**
|
|
50
|
+
* @param {PDFLinkServiceOptions} options
|
|
51
|
+
*/
|
|
52
|
+
constructor({ eventBus, externalLinkTarget, externalLinkRel, ignoreDestinationZoom, }?: PDFLinkServiceOptions);
|
|
53
|
+
externalLinkEnabled: boolean;
|
|
54
|
+
eventBus: import("./event_utils").EventBus;
|
|
55
|
+
externalLinkTarget: number;
|
|
56
|
+
externalLinkRel: string;
|
|
57
|
+
_ignoreDestinationZoom: boolean;
|
|
58
|
+
baseUrl: any;
|
|
59
|
+
pdfDocument: any;
|
|
60
|
+
pdfViewer: any;
|
|
61
|
+
pdfHistory: any;
|
|
62
|
+
setDocument(pdfDocument: any, baseUrl?: null): void;
|
|
63
|
+
setViewer(pdfViewer: any): void;
|
|
64
|
+
setHistory(pdfHistory: any): void;
|
|
65
|
+
/**
|
|
66
|
+
* @type {number}
|
|
67
|
+
*/
|
|
68
|
+
get pagesCount(): number;
|
|
69
|
+
/**
|
|
70
|
+
* @param {number} value
|
|
71
|
+
*/
|
|
72
|
+
set page(value: number);
|
|
73
|
+
/**
|
|
74
|
+
* @type {number}
|
|
75
|
+
*/
|
|
76
|
+
get page(): number;
|
|
77
|
+
/**
|
|
78
|
+
* @param {number} value
|
|
79
|
+
*/
|
|
80
|
+
set rotation(value: number);
|
|
81
|
+
/**
|
|
82
|
+
* @type {number}
|
|
83
|
+
*/
|
|
84
|
+
get rotation(): number;
|
|
85
|
+
/**
|
|
86
|
+
* @type {boolean}
|
|
87
|
+
*/
|
|
88
|
+
get isInPresentationMode(): boolean;
|
|
89
|
+
/**
|
|
90
|
+
* This method will, when available, also update the browser history.
|
|
91
|
+
* @param {string|Array} dest - The named, or explicit, PDF destination.
|
|
92
|
+
*/
|
|
93
|
+
goToDestination(dest: string | any[]): Promise<void>;
|
|
94
|
+
/**
|
|
95
|
+
* This method will, when available, also update the browser history.
|
|
96
|
+
* @param {number|string} val - The page number, or page label.
|
|
97
|
+
*/
|
|
98
|
+
goToPage(val: number | string): void;
|
|
99
|
+
/**
|
|
100
|
+
* Scrolls to a specific location in the PDF document.
|
|
101
|
+
* @param {number} pageNumber - The page number to scroll to.
|
|
102
|
+
* @param {number} x - The x-coordinate to scroll to in page coordinates.
|
|
103
|
+
* @param {number} y - The y-coordinate to scroll to in page coordinates.
|
|
104
|
+
* @param {object} [options]
|
|
105
|
+
*/
|
|
106
|
+
goToXY(pageNumber: number, x: number, y: number, options?: object): void;
|
|
107
|
+
/**
|
|
108
|
+
* @param {string} id
|
|
109
|
+
* Unique attachment identifier (required).
|
|
110
|
+
* @returns {Promise<CatalogAttachmentContent>}
|
|
111
|
+
* Content.
|
|
112
|
+
*/
|
|
113
|
+
getAttachmentContent(id: string): Promise<CatalogAttachmentContent>;
|
|
114
|
+
/**
|
|
115
|
+
* Adds various attributes (href, title, target, rel) to hyperlinks.
|
|
116
|
+
* @param {HTMLAnchorElement} link
|
|
117
|
+
* @param {string} url
|
|
118
|
+
* @param {boolean} [newWindow]
|
|
119
|
+
*/
|
|
120
|
+
addLinkAttributes(link: HTMLAnchorElement, url: string, newWindow?: boolean): void;
|
|
121
|
+
/**
|
|
122
|
+
* @param {string|Array} dest - The PDF destination object.
|
|
123
|
+
* @returns {string} The hyperlink to the PDF object.
|
|
124
|
+
*/
|
|
125
|
+
getDestinationHash(dest: string | any[]): string;
|
|
126
|
+
/**
|
|
127
|
+
* Prefix the full url on anchor links to make sure that links are resolved
|
|
128
|
+
* relative to the current URL instead of the one defined in <base href>.
|
|
129
|
+
* @param {string} anchor - The anchor hash, including the #.
|
|
130
|
+
* @returns {string} The hyperlink to the PDF object.
|
|
131
|
+
*/
|
|
132
|
+
getAnchorUrl(anchor: string): string;
|
|
133
|
+
/**
|
|
134
|
+
* @param {string} hash
|
|
135
|
+
*/
|
|
136
|
+
setHash(hash: string): void;
|
|
137
|
+
/**
|
|
138
|
+
* @param {string} action
|
|
139
|
+
*/
|
|
140
|
+
executeNamedAction(action: string): void;
|
|
141
|
+
/**
|
|
142
|
+
* @param {object} action
|
|
143
|
+
*/
|
|
144
|
+
executeSetOCGState(action: object): Promise<void>;
|
|
145
|
+
}
|
|
146
|
+
export class SimpleLinkService extends PDFLinkService {
|
|
147
|
+
}
|
|
148
|
+
import type { CatalogAttachmentContent } from "../src/core/catalog.js";
|