@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,503 @@
|
|
|
1
|
+
export type AnnotationEditor = import("./editor.js").AnnotationEditor;
|
|
2
|
+
export type AnnotationEditorLayer = import("./annotation_editor_layer.js").AnnotationEditorLayer;
|
|
3
|
+
/**
|
|
4
|
+
* A pdf has several pages and each of them when it will rendered
|
|
5
|
+
* will have an AnnotationEditorLayer which will contain the some
|
|
6
|
+
* new Annotations associated to an editor in order to modify them.
|
|
7
|
+
*
|
|
8
|
+
* This class is used to manage all the different layers, editors and
|
|
9
|
+
* some action like copy/paste, undo/redo, ...
|
|
10
|
+
*/
|
|
11
|
+
export class AnnotationEditorUIManager {
|
|
12
|
+
static TRANSLATE_SMALL: number;
|
|
13
|
+
static TRANSLATE_BIG: number;
|
|
14
|
+
static get _keyboardManager(): any;
|
|
15
|
+
constructor(container: any, viewer: any, viewerAlert: any, altTextManager: any, commentManager: any, signatureManager: any, eventBus: any, pdfDocument: any, pageColors: any, highlightColors: any, enableHighlightFloatingButton: any, enableUpdatedAddImage: any, enableNewAltTextWhenAddingImage: any, mlManager: any, editorUndoBar: any, supportsPinchToZoom: any);
|
|
16
|
+
_editorUndoBar: null;
|
|
17
|
+
_signal: AbortSignal;
|
|
18
|
+
_eventBus: any;
|
|
19
|
+
viewParameters: {
|
|
20
|
+
realScale: number;
|
|
21
|
+
rotation: number;
|
|
22
|
+
};
|
|
23
|
+
isShiftKeyDown: boolean;
|
|
24
|
+
_supportsPinchToZoom: boolean;
|
|
25
|
+
destroy(): void;
|
|
26
|
+
combinedSignal(ac: any): AbortSignal;
|
|
27
|
+
get mlManager(): null;
|
|
28
|
+
get useNewAltTextFlow(): boolean;
|
|
29
|
+
get useNewAltTextWhenAddingImage(): boolean;
|
|
30
|
+
get hcmFilter(): any;
|
|
31
|
+
get direction(): any;
|
|
32
|
+
get _highlightColors(): any;
|
|
33
|
+
get highlightColors(): any;
|
|
34
|
+
get highlightColorNames(): any;
|
|
35
|
+
getNonHCMColor(color: any): any;
|
|
36
|
+
getNonHCMColorName(color: any): any;
|
|
37
|
+
/**
|
|
38
|
+
* Set the current drawing session.
|
|
39
|
+
* @param {AnnotationEditorLayer} layer
|
|
40
|
+
*/
|
|
41
|
+
setCurrentDrawingSession(layer: AnnotationEditorLayer): void;
|
|
42
|
+
setMainHighlightColorPicker(colorPicker: any): void;
|
|
43
|
+
editAltText(editor: any, firstTime?: boolean): void;
|
|
44
|
+
hasCommentManager(): boolean;
|
|
45
|
+
editComment(editor: any, posX: any, posY: any, options: any): void;
|
|
46
|
+
selectComment(pageIndex: any, uid: any): void;
|
|
47
|
+
updateComment(editor: any): void;
|
|
48
|
+
updatePopupColor(editor: any): void;
|
|
49
|
+
removeComment(editor: any): void;
|
|
50
|
+
/**
|
|
51
|
+
* Delete a comment from an editor with undo support.
|
|
52
|
+
* @param {AnnotationEditor} editor - The editor whose comment to delete.
|
|
53
|
+
* @param {object} savedData - The comment data to save for undo.
|
|
54
|
+
*/
|
|
55
|
+
deleteComment(editor: AnnotationEditor, savedData: object): void;
|
|
56
|
+
toggleComment(editor: any, isSelected: any, visibility?: undefined): void;
|
|
57
|
+
makeCommentColor(color: any, opacity: any): any;
|
|
58
|
+
getCommentDialogElement(): any;
|
|
59
|
+
waitForEditorsRendered(pageNumber: any): Promise<void>;
|
|
60
|
+
getSignature(editor: any): void;
|
|
61
|
+
get signatureManager(): null;
|
|
62
|
+
switchToMode(mode: any, callback: any): void;
|
|
63
|
+
setPreference(name: any, value: any): void;
|
|
64
|
+
onSetPreference({ name, value }: {
|
|
65
|
+
name: any;
|
|
66
|
+
value: any;
|
|
67
|
+
}): void;
|
|
68
|
+
onPageChanging({ pageNumber }: {
|
|
69
|
+
pageNumber: any;
|
|
70
|
+
}): void;
|
|
71
|
+
deletePage(id: any): void;
|
|
72
|
+
focusMainContainer(): void;
|
|
73
|
+
findParent(x: any, y: any): any;
|
|
74
|
+
disableUserSelect(value?: boolean): void;
|
|
75
|
+
addShouldRescale(editor: any): void;
|
|
76
|
+
removeShouldRescale(editor: any): void;
|
|
77
|
+
onScaleChanging({ scale }: {
|
|
78
|
+
scale: any;
|
|
79
|
+
}): void;
|
|
80
|
+
onRotationChanging({ pagesRotation }: {
|
|
81
|
+
pagesRotation: any;
|
|
82
|
+
}): void;
|
|
83
|
+
highlightSelection(methodOfCreation?: string, comment?: boolean): void;
|
|
84
|
+
commentSelection(methodOfCreation?: string): void;
|
|
85
|
+
endCurrentEditing(): void;
|
|
86
|
+
/**
|
|
87
|
+
* Some annotations may have been modified in the annotation layer
|
|
88
|
+
* (e.g. comments added or modified).
|
|
89
|
+
* So this function retrieves the data from the storage and removes
|
|
90
|
+
* them from the storage in order to be able to save them later.
|
|
91
|
+
* @param {string} annotationId
|
|
92
|
+
* @returns {object | null} The data associated to the annotation or null.
|
|
93
|
+
*/
|
|
94
|
+
getAndRemoveDataFromAnnotationStorage(annotationId: string): object | null;
|
|
95
|
+
/**
|
|
96
|
+
* Add an editor in the annotation storage.
|
|
97
|
+
* @param {AnnotationEditor} editor
|
|
98
|
+
*/
|
|
99
|
+
addToAnnotationStorage(editor: AnnotationEditor): void;
|
|
100
|
+
a11yAlert(messageId: any, args?: null): void;
|
|
101
|
+
blur(): void;
|
|
102
|
+
focus(): void;
|
|
103
|
+
addEditListeners(): void;
|
|
104
|
+
removeEditListeners(): void;
|
|
105
|
+
dragOver(event: any): void;
|
|
106
|
+
/**
|
|
107
|
+
* Drop callback.
|
|
108
|
+
* @param {DragEvent} event
|
|
109
|
+
*/
|
|
110
|
+
drop(event: DragEvent): void;
|
|
111
|
+
/**
|
|
112
|
+
* Copy callback.
|
|
113
|
+
* @param {ClipboardEvent} event
|
|
114
|
+
*/
|
|
115
|
+
copy(event: ClipboardEvent): void;
|
|
116
|
+
/**
|
|
117
|
+
* Cut callback.
|
|
118
|
+
* @param {ClipboardEvent} event
|
|
119
|
+
*/
|
|
120
|
+
cut(event: ClipboardEvent): void;
|
|
121
|
+
/**
|
|
122
|
+
* Paste callback.
|
|
123
|
+
* @param {ClipboardEvent} event
|
|
124
|
+
*/
|
|
125
|
+
paste(event: ClipboardEvent): Promise<void>;
|
|
126
|
+
/**
|
|
127
|
+
* Keydown callback.
|
|
128
|
+
* @param {KeyboardEvent} event
|
|
129
|
+
*/
|
|
130
|
+
keydown(event: KeyboardEvent): void;
|
|
131
|
+
/**
|
|
132
|
+
* Keyup callback.
|
|
133
|
+
* @param {KeyboardEvent} event
|
|
134
|
+
*/
|
|
135
|
+
keyup(event: KeyboardEvent): void;
|
|
136
|
+
/**
|
|
137
|
+
* Execute an action for a given name.
|
|
138
|
+
* For example, the user can click on the "Undo" entry in the context menu
|
|
139
|
+
* and it'll trigger the undo action.
|
|
140
|
+
*/
|
|
141
|
+
onEditingAction({ name }: {
|
|
142
|
+
name: any;
|
|
143
|
+
}): void;
|
|
144
|
+
updatePageIndex(oldPageIndex: any, newPageIndex: any): void;
|
|
145
|
+
startUpdatePages(): void;
|
|
146
|
+
endUpdatePages(): void;
|
|
147
|
+
clonePage(pageIndex: any, newPageIndex: any): void;
|
|
148
|
+
findClonesForPage(layer: any): Promise<any[]>;
|
|
149
|
+
/**
|
|
150
|
+
* Set the editing state.
|
|
151
|
+
* It can be useful to temporarily disable it when the user is editing a
|
|
152
|
+
* FreeText annotation.
|
|
153
|
+
* @param {boolean} isEditing
|
|
154
|
+
*/
|
|
155
|
+
setEditingState(isEditing: boolean): void;
|
|
156
|
+
registerEditorTypes(types: any): void;
|
|
157
|
+
/**
|
|
158
|
+
* Get an id.
|
|
159
|
+
* @returns {string}
|
|
160
|
+
*/
|
|
161
|
+
getId(): string;
|
|
162
|
+
get currentLayer(): any;
|
|
163
|
+
getLayer(pageIndex: any): any;
|
|
164
|
+
get currentPageIndex(): number;
|
|
165
|
+
/**
|
|
166
|
+
* Add a new layer for a page which will contains the editors.
|
|
167
|
+
* @param {AnnotationEditorLayer} layer
|
|
168
|
+
*/
|
|
169
|
+
addLayer(layer: AnnotationEditorLayer): void;
|
|
170
|
+
/**
|
|
171
|
+
* Remove a layer.
|
|
172
|
+
* @param {AnnotationEditorLayer} layer
|
|
173
|
+
*/
|
|
174
|
+
removeLayer(layer: AnnotationEditorLayer): void;
|
|
175
|
+
/**
|
|
176
|
+
* Change the editor mode (None, FreeText, Ink, ...)
|
|
177
|
+
* @param {number} mode
|
|
178
|
+
* @param {string|null} editId
|
|
179
|
+
* @param {boolean} [isFromUser] - true if the mode change is due to a
|
|
180
|
+
* user action.
|
|
181
|
+
* @param {boolean} [isFromKeyboard] - true if the mode change is due to a
|
|
182
|
+
* keyboard action.
|
|
183
|
+
* @param {boolean} [mustEnterInEditMode] - true if the editor must enter in
|
|
184
|
+
* edit mode.
|
|
185
|
+
* @param {boolean} [editComment] - true if the mode change is due to a
|
|
186
|
+
* comment edit.
|
|
187
|
+
*/
|
|
188
|
+
updateMode(mode: number, editId?: string | null, isFromUser?: boolean, isFromKeyboard?: boolean, mustEnterInEditMode?: boolean, editComment?: boolean): Promise<void>;
|
|
189
|
+
addNewEditorFromKeyboard(): void;
|
|
190
|
+
/**
|
|
191
|
+
* Update the toolbar if it's required to reflect the tool currently used.
|
|
192
|
+
* @param {object} options
|
|
193
|
+
* @param {number} options.mode
|
|
194
|
+
* @returns {undefined}
|
|
195
|
+
*/
|
|
196
|
+
updateToolbar(options: {
|
|
197
|
+
mode: number;
|
|
198
|
+
}): undefined;
|
|
199
|
+
/**
|
|
200
|
+
* Update a parameter in the current editor or globally.
|
|
201
|
+
* @param {number} type
|
|
202
|
+
* @param {*} value
|
|
203
|
+
*/
|
|
204
|
+
updateParams(type: number, value: any): void;
|
|
205
|
+
showAllEditors(type: any, visible: any, updateButton?: boolean): void;
|
|
206
|
+
enableWaiting(mustWait?: boolean): void;
|
|
207
|
+
/**
|
|
208
|
+
* Get all the editors belonging to a given page.
|
|
209
|
+
* @param {number} pageIndex
|
|
210
|
+
* @yields {AnnotationEditor} An editor on the given page.
|
|
211
|
+
*/
|
|
212
|
+
getEditors(pageIndex: number): Generator<any, void, unknown>;
|
|
213
|
+
/**
|
|
214
|
+
* Get an editor with the given id.
|
|
215
|
+
* @param {string} id
|
|
216
|
+
* @returns {AnnotationEditor}
|
|
217
|
+
*/
|
|
218
|
+
getEditor(id: string): AnnotationEditor;
|
|
219
|
+
/**
|
|
220
|
+
* Add a new editor.
|
|
221
|
+
* @param {AnnotationEditor} editor
|
|
222
|
+
*/
|
|
223
|
+
addEditor(editor: AnnotationEditor): void;
|
|
224
|
+
/**
|
|
225
|
+
* Remove an editor.
|
|
226
|
+
* @param {AnnotationEditor} editor
|
|
227
|
+
*/
|
|
228
|
+
removeEditor(editor: AnnotationEditor): void;
|
|
229
|
+
/**
|
|
230
|
+
* The annotation element with the given id has been deleted.
|
|
231
|
+
* @param {AnnotationEditor} editor
|
|
232
|
+
*/
|
|
233
|
+
addDeletedAnnotationElement(editor: AnnotationEditor): void;
|
|
234
|
+
/**
|
|
235
|
+
* Check if the annotation element with the given id has been deleted.
|
|
236
|
+
* @param {string} annotationElementId
|
|
237
|
+
* @returns {boolean}
|
|
238
|
+
*/
|
|
239
|
+
isDeletedAnnotationElement(annotationElementId: string): boolean;
|
|
240
|
+
/**
|
|
241
|
+
* The annotation element with the given id have been restored.
|
|
242
|
+
* @param {AnnotationEditor} editor
|
|
243
|
+
*/
|
|
244
|
+
removeDeletedAnnotationElement(editor: AnnotationEditor): void;
|
|
245
|
+
/**
|
|
246
|
+
* Set the given editor as the active one.
|
|
247
|
+
* @param {AnnotationEditor} editor
|
|
248
|
+
*/
|
|
249
|
+
setActiveEditor(editor: AnnotationEditor): void;
|
|
250
|
+
/**
|
|
251
|
+
* Update the UI of the active editor.
|
|
252
|
+
* @param {AnnotationEditor} editor
|
|
253
|
+
*/
|
|
254
|
+
updateUI(editor: AnnotationEditor): void;
|
|
255
|
+
updateUIForDefaultProperties(editorType: any): void;
|
|
256
|
+
/**
|
|
257
|
+
* Add or remove an editor the current selection.
|
|
258
|
+
* @param {AnnotationEditor} editor
|
|
259
|
+
*/
|
|
260
|
+
toggleSelected(editor: AnnotationEditor): void;
|
|
261
|
+
/**
|
|
262
|
+
* Set the last selected editor.
|
|
263
|
+
* @param {AnnotationEditor} editor
|
|
264
|
+
*/
|
|
265
|
+
setSelected(editor: AnnotationEditor): void;
|
|
266
|
+
get firstSelectedEditor(): any;
|
|
267
|
+
/**
|
|
268
|
+
* Unselect an editor.
|
|
269
|
+
* @param {AnnotationEditor} editor
|
|
270
|
+
*/
|
|
271
|
+
unselect(editor: AnnotationEditor): void;
|
|
272
|
+
get hasSelection(): boolean;
|
|
273
|
+
get isEnterHandled(): any;
|
|
274
|
+
/**
|
|
275
|
+
* Undo the last command.
|
|
276
|
+
*/
|
|
277
|
+
undo(): void;
|
|
278
|
+
/**
|
|
279
|
+
* Redo the last undoed command.
|
|
280
|
+
*/
|
|
281
|
+
redo(): void;
|
|
282
|
+
/**
|
|
283
|
+
* Add a command to execute (cmd) and another one to undo it.
|
|
284
|
+
* @param {object} params
|
|
285
|
+
*/
|
|
286
|
+
addCommands(params: object): void;
|
|
287
|
+
cleanUndoStack(type: any): void;
|
|
288
|
+
/**
|
|
289
|
+
* Delete the current editor or all.
|
|
290
|
+
*/
|
|
291
|
+
delete(): void;
|
|
292
|
+
commitOrRemove(): void;
|
|
293
|
+
hasSomethingToControl(): boolean;
|
|
294
|
+
/**
|
|
295
|
+
* Select all the editors.
|
|
296
|
+
*/
|
|
297
|
+
selectAll(): void;
|
|
298
|
+
/**
|
|
299
|
+
* Unselect all the selected editors.
|
|
300
|
+
*/
|
|
301
|
+
unselectAll(): void;
|
|
302
|
+
translateSelectedEditors(x: any, y: any, noCommit?: boolean): void;
|
|
303
|
+
/**
|
|
304
|
+
* Set up the drag session for moving the selected editors.
|
|
305
|
+
*/
|
|
306
|
+
setUpDragSession(): void;
|
|
307
|
+
/**
|
|
308
|
+
* Ends the drag session.
|
|
309
|
+
* @returns {boolean} true if at least one editor has been moved.
|
|
310
|
+
*/
|
|
311
|
+
endDragSession(): boolean;
|
|
312
|
+
/**
|
|
313
|
+
* Drag the set of selected editors.
|
|
314
|
+
* @param {number} tx
|
|
315
|
+
* @param {number} ty
|
|
316
|
+
*/
|
|
317
|
+
dragSelectedEditors(tx: number, ty: number): void;
|
|
318
|
+
/**
|
|
319
|
+
* Rebuild the editor (usually on undo/redo actions) on a potentially
|
|
320
|
+
* non-rendered page.
|
|
321
|
+
* @param {AnnotationEditor} editor
|
|
322
|
+
*/
|
|
323
|
+
rebuild(editor: AnnotationEditor): void;
|
|
324
|
+
get isEditorHandlingKeyboard(): any;
|
|
325
|
+
/**
|
|
326
|
+
* Is the current editor the one passed as argument?
|
|
327
|
+
* @param {AnnotationEditor} editor
|
|
328
|
+
* @returns {boolean}
|
|
329
|
+
*/
|
|
330
|
+
isActive(editor: AnnotationEditor): boolean;
|
|
331
|
+
/**
|
|
332
|
+
* Get the current active editor.
|
|
333
|
+
* @returns {AnnotationEditor|null}
|
|
334
|
+
*/
|
|
335
|
+
getActive(): AnnotationEditor | null;
|
|
336
|
+
/**
|
|
337
|
+
* Get the current editor mode.
|
|
338
|
+
* @returns {number}
|
|
339
|
+
*/
|
|
340
|
+
getMode(): number;
|
|
341
|
+
isEditingMode(): boolean;
|
|
342
|
+
get imageManager(): any;
|
|
343
|
+
getSelectionBoxes(textLayer: any): {
|
|
344
|
+
x: number;
|
|
345
|
+
y: number;
|
|
346
|
+
width: number;
|
|
347
|
+
height: number;
|
|
348
|
+
}[] | null;
|
|
349
|
+
addChangedExistingAnnotation({ annotationElementId, id }: {
|
|
350
|
+
annotationElementId: any;
|
|
351
|
+
id: any;
|
|
352
|
+
}): void;
|
|
353
|
+
removeChangedExistingAnnotation({ annotationElementId }: {
|
|
354
|
+
annotationElementId: any;
|
|
355
|
+
}): void;
|
|
356
|
+
renderAnnotationElement(annotation: any): void;
|
|
357
|
+
setMissingCanvas(annotationId: any, annotationElementId: any, canvas: any): void;
|
|
358
|
+
addMissingCanvas(annotationId: any, editor: any): void;
|
|
359
|
+
#private;
|
|
360
|
+
}
|
|
361
|
+
export function bindEvents(obj: any, element: any, names: any): void;
|
|
362
|
+
export class ColorManager {
|
|
363
|
+
static _colorsMapping: Map<string, number[]>;
|
|
364
|
+
get _colors(): any;
|
|
365
|
+
/**
|
|
366
|
+
* In High Contrast Mode, the color on the screen is not always the
|
|
367
|
+
* real color used in the pdf.
|
|
368
|
+
* For example in some cases white can appear to be black but when saving
|
|
369
|
+
* we want to have white.
|
|
370
|
+
* @param {string} color
|
|
371
|
+
* @returns {Array<number>}
|
|
372
|
+
*/
|
|
373
|
+
convert(color: string): Array<number>;
|
|
374
|
+
/**
|
|
375
|
+
* An input element must have its color value as a hex string
|
|
376
|
+
* and not as color name.
|
|
377
|
+
* So this function converts a name into an hex string.
|
|
378
|
+
* @param {string} name
|
|
379
|
+
* @returns {string}
|
|
380
|
+
*/
|
|
381
|
+
getHexCode(name: string): string;
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* Class to handle undo/redo.
|
|
385
|
+
* Commands are just saved in a buffer.
|
|
386
|
+
* If we hit some memory issues we could likely use a circular buffer.
|
|
387
|
+
* It has to be used as a singleton.
|
|
388
|
+
*/
|
|
389
|
+
export class CommandManager {
|
|
390
|
+
constructor(maxSize?: number);
|
|
391
|
+
/**
|
|
392
|
+
* @typedef {object} addOptions
|
|
393
|
+
* @property {Function} cmd
|
|
394
|
+
* @property {Function} undo
|
|
395
|
+
* @property {Function} [post]
|
|
396
|
+
* @property {boolean} mustExec
|
|
397
|
+
* @property {number} type
|
|
398
|
+
* @property {boolean} overwriteIfSameType
|
|
399
|
+
* @property {boolean} keepUndo
|
|
400
|
+
*/
|
|
401
|
+
/**
|
|
402
|
+
* Add a new couple of commands to be used in case of redo/undo.
|
|
403
|
+
* @param {addOptions} options
|
|
404
|
+
*/
|
|
405
|
+
add({ cmd, undo, post, mustExec, type, overwriteIfSameType, keepUndo, }: {
|
|
406
|
+
cmd: Function;
|
|
407
|
+
undo: Function;
|
|
408
|
+
post?: Function | undefined;
|
|
409
|
+
mustExec: boolean;
|
|
410
|
+
type: number;
|
|
411
|
+
overwriteIfSameType: boolean;
|
|
412
|
+
keepUndo: boolean;
|
|
413
|
+
}): void;
|
|
414
|
+
/**
|
|
415
|
+
* Undo the last command.
|
|
416
|
+
*/
|
|
417
|
+
undo(): void;
|
|
418
|
+
/**
|
|
419
|
+
* Redo the last command.
|
|
420
|
+
*/
|
|
421
|
+
redo(): void;
|
|
422
|
+
/**
|
|
423
|
+
* Check if there is something to undo.
|
|
424
|
+
* @returns {boolean}
|
|
425
|
+
*/
|
|
426
|
+
hasSomethingToUndo(): boolean;
|
|
427
|
+
/**
|
|
428
|
+
* Check if there is something to redo.
|
|
429
|
+
* @returns {boolean}
|
|
430
|
+
*/
|
|
431
|
+
hasSomethingToRedo(): boolean;
|
|
432
|
+
cleanType(type: any): void;
|
|
433
|
+
destroy(): void;
|
|
434
|
+
#private;
|
|
435
|
+
}
|
|
436
|
+
/**
|
|
437
|
+
* Class to store current pointers used by the editor to be able to handle
|
|
438
|
+
* multiple pointers (e.g. two fingers, a pen, a mouse, ...).
|
|
439
|
+
*/
|
|
440
|
+
export class CurrentPointers {
|
|
441
|
+
static #pointerId: number;
|
|
442
|
+
static #pointerIds: null;
|
|
443
|
+
static #moveTimestamp: number;
|
|
444
|
+
static #pointerType: null;
|
|
445
|
+
static initializeAndAddPointerId(pointerId: any): void;
|
|
446
|
+
static setPointer(pointerType: any, pointerId: any): void;
|
|
447
|
+
static setTimeStamp(timeStamp: any): void;
|
|
448
|
+
static isSamePointerId(pointerId: any): boolean;
|
|
449
|
+
static isSamePointerIdOrRemove(pointerId: any): boolean;
|
|
450
|
+
static isSamePointerType(pointerType: any): boolean;
|
|
451
|
+
static isInitializedAndDifferentPointerType(pointerType: any): boolean;
|
|
452
|
+
static isSameTimeStamp(timeStamp: any): boolean;
|
|
453
|
+
static isUsingMultiplePointers(): boolean;
|
|
454
|
+
static clearPointerType(): void;
|
|
455
|
+
static clearPointerIds(): void;
|
|
456
|
+
static clearTimeStamp(): void;
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* Class to handle the different keyboards shortcuts we can have on mac or
|
|
460
|
+
* non-mac OSes.
|
|
461
|
+
*/
|
|
462
|
+
export class KeyboardManager {
|
|
463
|
+
static ALT: number;
|
|
464
|
+
static CTRL: number;
|
|
465
|
+
static META: number;
|
|
466
|
+
static SHIFT: number;
|
|
467
|
+
/**
|
|
468
|
+
* Parse a shortcut string like "ctrl+shift+a" into a `[key, modifiers]`
|
|
469
|
+
* pair. Modifier names are case-insensitive and may appear in any order;
|
|
470
|
+
* the key part is matched against `event.key` so `Space` is normalized to
|
|
471
|
+
* `" "` but other names like `ArrowLeft`, `Enter`, `Backspace`, and
|
|
472
|
+
* single-letter keys (`a`, `Z`) are preserved.
|
|
473
|
+
* @param {string} value
|
|
474
|
+
* @returns {[string|null, number]}
|
|
475
|
+
*/
|
|
476
|
+
static #parseShortcut(value: string): [string | null, number];
|
|
477
|
+
/**
|
|
478
|
+
* Translate `event.code` (a layout-independent physical key identifier) to
|
|
479
|
+
* the equivalent `event.key` value on a US layout, so a Ctrl+A shortcut
|
|
480
|
+
* still fires when the user is on a layout where the "A" key produces a
|
|
481
|
+
* non-Latin character.
|
|
482
|
+
* @param {string} code
|
|
483
|
+
* @returns {string|null}
|
|
484
|
+
*/
|
|
485
|
+
static #codeToKey(code: string): string | null;
|
|
486
|
+
/**
|
|
487
|
+
* Create a new keyboard manager class.
|
|
488
|
+
* @param {Array<Array>} callbacks - an array containing an array of shortcuts
|
|
489
|
+
* and a callback to call. If the array contains no `mac+`-prefixed entry,
|
|
490
|
+
* every shortcut applies on all platforms. As soon as it contains at least
|
|
491
|
+
* one `mac+` entry, the `mac+` ones become the macOS-only set and the bare
|
|
492
|
+
* entries apply only on non-Mac.
|
|
493
|
+
*/
|
|
494
|
+
constructor(callbacks: Array<any[]>);
|
|
495
|
+
callbacks: Map<any, any>;
|
|
496
|
+
/**
|
|
497
|
+
* Execute a callback, if any, for a given keyboard event.
|
|
498
|
+
* The self is used as `this` in the callback.
|
|
499
|
+
* @param {object} self
|
|
500
|
+
* @param {KeyboardEvent} event
|
|
501
|
+
*/
|
|
502
|
+
exec(self: object, event: KeyboardEvent): void;
|
|
503
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export class BaseFilterFactory {
|
|
2
|
+
addFilter(maps: any): string;
|
|
3
|
+
addHCMFilter(fgColor: any, bgColor: any): string;
|
|
4
|
+
addAlphaFilter(map: any): string;
|
|
5
|
+
addLuminosityFilter(map: any): string;
|
|
6
|
+
addKnockoutFilter(alpha?: number): string;
|
|
7
|
+
addHighlightHCMFilter(filterName: any, fgColor: any, bgColor: any, newFgColor: any, newBgColor: any): string;
|
|
8
|
+
/**
|
|
9
|
+
* Create a filter for the selection of text, given colors.
|
|
10
|
+
* @param {string} fgColor
|
|
11
|
+
* @param {string} bgColor
|
|
12
|
+
* @returns {string}
|
|
13
|
+
*/
|
|
14
|
+
addSelectionHCMFilter(fgColor: string, bgColor: string): string;
|
|
15
|
+
/**
|
|
16
|
+
* Create a filter for the selection of text.
|
|
17
|
+
* @returns {string}
|
|
18
|
+
*/
|
|
19
|
+
addSelectionFilter(): string;
|
|
20
|
+
/**
|
|
21
|
+
* @param {object} [pageColors]
|
|
22
|
+
* @param {string} [pageColors.background]
|
|
23
|
+
* @param {string} [pageColors.foreground]
|
|
24
|
+
* @returns {Record<string, string> | null}
|
|
25
|
+
*/
|
|
26
|
+
createSelectionStyle(pageColors?: {
|
|
27
|
+
background?: string | undefined;
|
|
28
|
+
foreground?: string | undefined;
|
|
29
|
+
}): Record<string, string> | null;
|
|
30
|
+
destroy(keepHCM?: boolean): void;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* FilterFactory aims to create some SVG filters we can use when drawing an
|
|
34
|
+
* image (or whatever) on a canvas.
|
|
35
|
+
* Filters aren't applied with ctx.putImageData because it just overwrites the
|
|
36
|
+
* underlying pixels.
|
|
37
|
+
* With these filters, it's possible for example to apply some transfer maps on
|
|
38
|
+
* an image without the need to apply them on the pixel arrays: the renderer
|
|
39
|
+
* does the magic for us.
|
|
40
|
+
*/
|
|
41
|
+
export class DOMFilterFactory extends BaseFilterFactory {
|
|
42
|
+
constructor({ docId, ownerDocument }: {
|
|
43
|
+
docId: any;
|
|
44
|
+
ownerDocument?: Document | undefined;
|
|
45
|
+
});
|
|
46
|
+
addFilter(maps: any): any;
|
|
47
|
+
addHCMFilter(fgColor: any, bgColor: any): any;
|
|
48
|
+
addAlphaFilter(map: any): any;
|
|
49
|
+
addLuminosityFilter(map: any): any;
|
|
50
|
+
addKnockoutFilter(alpha?: number): any;
|
|
51
|
+
addHighlightHCMFilter(filterName: any, fgColor: any, bgColor: any, newFgColor: any, newBgColor: any): any;
|
|
52
|
+
#private;
|
|
53
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export class FontFaceObject {
|
|
2
|
+
constructor(translatedData: any, inspectFont: null | undefined, charProcOperatorList: any, extra: any);
|
|
3
|
+
_inspectFont: any;
|
|
4
|
+
charProcOperatorList: any;
|
|
5
|
+
createNativeFontFace(): FontFace | null;
|
|
6
|
+
createFontFaceRule(): string | null;
|
|
7
|
+
getPathGenerator(objs: any, character: any): any;
|
|
8
|
+
get black(): any;
|
|
9
|
+
get bold(): any;
|
|
10
|
+
set disableFontFace(value: any);
|
|
11
|
+
get disableFontFace(): any;
|
|
12
|
+
get fontExtraProperties(): any;
|
|
13
|
+
get isInvalidPDFjsFont(): any;
|
|
14
|
+
get isType3Font(): any;
|
|
15
|
+
get italic(): any;
|
|
16
|
+
get missingFile(): any;
|
|
17
|
+
get remeasure(): any;
|
|
18
|
+
get vertical(): any;
|
|
19
|
+
get bbox(): any;
|
|
20
|
+
get fontMatrix(): any;
|
|
21
|
+
get fallbackName(): any;
|
|
22
|
+
get loadedName(): any;
|
|
23
|
+
get mimetype(): "font/opentype" | null;
|
|
24
|
+
get data(): any;
|
|
25
|
+
clearData(): void;
|
|
26
|
+
get cssFontInfo(): any;
|
|
27
|
+
get systemFontInfo(): any;
|
|
28
|
+
#private;
|
|
29
|
+
}
|
|
30
|
+
export class FontLoader {
|
|
31
|
+
constructor({ ownerDocument, styleElement, }: {
|
|
32
|
+
ownerDocument?: Document | undefined;
|
|
33
|
+
styleElement?: null | undefined;
|
|
34
|
+
});
|
|
35
|
+
_document: Document;
|
|
36
|
+
styleElement: HTMLStyleElement | null;
|
|
37
|
+
loadingRequests: any[] | undefined;
|
|
38
|
+
loadTestFontId: number | undefined;
|
|
39
|
+
addNativeFontFace(nativeFontFace: any): void;
|
|
40
|
+
removeNativeFontFace(nativeFontFace: any): void;
|
|
41
|
+
insertRule(rule: any): void;
|
|
42
|
+
clear(): void;
|
|
43
|
+
loadSystemFont({ systemFontInfo: info, disableFontFace, _inspectFont, }: {
|
|
44
|
+
systemFontInfo: any;
|
|
45
|
+
disableFontFace: any;
|
|
46
|
+
_inspectFont: any;
|
|
47
|
+
}): Promise<void>;
|
|
48
|
+
bind(font: any): Promise<void>;
|
|
49
|
+
get isFontLoadingAPISupported(): any;
|
|
50
|
+
get isSyncFontLoadingSupported(): any;
|
|
51
|
+
#private;
|
|
52
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export class PDFNetworkStream extends BasePDFStream {
|
|
2
|
+
constructor(source: any);
|
|
3
|
+
_responseOrigin: null;
|
|
4
|
+
url: any;
|
|
5
|
+
isHttp: boolean;
|
|
6
|
+
headers: Headers;
|
|
7
|
+
/**
|
|
8
|
+
* @ignore
|
|
9
|
+
*/
|
|
10
|
+
_request(args: any): XMLHttpRequest;
|
|
11
|
+
/**
|
|
12
|
+
* Abort the request, if it's pending.
|
|
13
|
+
* @ignore
|
|
14
|
+
*/
|
|
15
|
+
_abortRequest(xhr: any): void;
|
|
16
|
+
getRangeReader(begin: any, end: any): BasePDFStreamRangeReader;
|
|
17
|
+
#private;
|
|
18
|
+
}
|
|
19
|
+
import { BasePDFStream } from "../shared/base_pdf_stream.js";
|
|
20
|
+
import { BasePDFStreamRangeReader } from "../shared/base_pdf_stream.js";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export function createHeaders(isHttp: any, httpHeaders: any): Headers;
|
|
2
|
+
export function createResponseError(status: any, url: any): ResponseException;
|
|
3
|
+
export function ensureResponseOrigin(rangeOrigin: any, origin: any): void;
|
|
4
|
+
export function extractFilenameFromHeader(responseHeaders: any): string | null;
|
|
5
|
+
export function getResponseOrigin(url: any): string | null;
|
|
6
|
+
export function trimHeadersEnd(str: any): any;
|
|
7
|
+
export function validateRangeRequestCapabilities({ responseHeaders, isHttp, rangeChunkSize, disableRange, }: {
|
|
8
|
+
responseHeaders: any;
|
|
9
|
+
isHttp: any;
|
|
10
|
+
rangeChunkSize: any;
|
|
11
|
+
disableRange: any;
|
|
12
|
+
}): {
|
|
13
|
+
contentLength: number;
|
|
14
|
+
isRangeSupported: boolean;
|
|
15
|
+
};
|
|
16
|
+
import { ResponseException } from "../shared/util.js";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export function fetchData(url: any): Promise<Uint8Array<any>>;
|
|
2
|
+
export class NodeBinaryDataFactory extends BaseBinaryDataFactory {
|
|
3
|
+
/**
|
|
4
|
+
* @ignore
|
|
5
|
+
*/
|
|
6
|
+
_fetch(url: any, kind: any): Promise<Uint8Array<any>>;
|
|
7
|
+
}
|
|
8
|
+
export class NodeCanvasFactory extends BaseCanvasFactory {
|
|
9
|
+
/**
|
|
10
|
+
* @ignore
|
|
11
|
+
*/
|
|
12
|
+
_createCanvas(width: any, height: any): import("@napi-rs/canvas").Canvas;
|
|
13
|
+
}
|
|
14
|
+
export class NodeFilterFactory extends BaseFilterFactory {
|
|
15
|
+
}
|
|
16
|
+
import { BaseBinaryDataFactory } from "./binary_data_factory.js";
|
|
17
|
+
import { BaseCanvasFactory } from "./canvas_factory.js";
|
|
18
|
+
import { BaseFilterFactory } from "./filter_factory.js";
|