@box/pdfjs-dist 0.0.0-stage → 6.4.299-box.1
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/CODE_OF_CONDUCT.md +15 -0
- package/LICENSE +177 -0
- package/README.md +13 -2
- package/build/pdf.min.mjs +28 -0
- package/build/pdf.mjs +28211 -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 +34672 -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 +32 -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 +129 -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,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration for {@linkcode DrawLayer}.
|
|
3
|
+
*/
|
|
4
|
+
export type DrawLayerOptions = {
|
|
5
|
+
/**
|
|
6
|
+
* Filter factory used to style selections (optional).
|
|
7
|
+
*/
|
|
8
|
+
filterFactory?: object | null | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* Page foreground/background colors for HCM (optional).
|
|
11
|
+
*/
|
|
12
|
+
pageColors?: object | null | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Zero-based page index.
|
|
15
|
+
*/
|
|
16
|
+
pageIndex: number;
|
|
17
|
+
/**
|
|
18
|
+
* Text layer element (optional).
|
|
19
|
+
*/
|
|
20
|
+
textLayer?: Element | null | undefined;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Result of {@linkcode normalizeEdgeBoundary}.
|
|
24
|
+
*/
|
|
25
|
+
export type EdgeBoundaryResult = {
|
|
26
|
+
/**
|
|
27
|
+
* Normalized container.
|
|
28
|
+
*/
|
|
29
|
+
container: Node;
|
|
30
|
+
/**
|
|
31
|
+
* Normalized offset.
|
|
32
|
+
*/
|
|
33
|
+
offset: number;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Result of {@linkcode SelectionRotator}.
|
|
37
|
+
*/
|
|
38
|
+
export type SelectionRotatorResult = {
|
|
39
|
+
/**
|
|
40
|
+
* Rotated X coordinate.
|
|
41
|
+
*/
|
|
42
|
+
x: number;
|
|
43
|
+
/**
|
|
44
|
+
* Rotated Y coordinate.
|
|
45
|
+
*/
|
|
46
|
+
y: number;
|
|
47
|
+
/**
|
|
48
|
+
* Rotated width.
|
|
49
|
+
*/
|
|
50
|
+
width: number;
|
|
51
|
+
/**
|
|
52
|
+
* Rotated height.
|
|
53
|
+
*/
|
|
54
|
+
height: number;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Rotate the coordinates of a rectangle according to the position of the
|
|
58
|
+
* text layer in the viewport.
|
|
59
|
+
*/
|
|
60
|
+
export type SelectionRotator = (x: number, y: number, width: number, height: number) => SelectionRotatorResult;
|
|
61
|
+
/**
|
|
62
|
+
* Data related to the selection for a text layer.
|
|
63
|
+
*/
|
|
64
|
+
export type TextLayerSelectionData = {
|
|
65
|
+
/**
|
|
66
|
+
* Draw layer associated with the text layer.
|
|
67
|
+
*/
|
|
68
|
+
drawLayer: DrawLayer;
|
|
69
|
+
/**
|
|
70
|
+
* Node (SVG path element) used to draw the selection.
|
|
71
|
+
*/
|
|
72
|
+
path?: SVGPathElement | null | undefined;
|
|
73
|
+
/**
|
|
74
|
+
* Node (div element) used to display the selection.
|
|
75
|
+
*/
|
|
76
|
+
selectionDiv?: HTMLDivElement | null | undefined;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Manage the SVGs drawn on top of the page canvas.
|
|
80
|
+
* It's important to have them directly on top of the canvas because we want to
|
|
81
|
+
* be able to use mix-blend-mode for some of them.
|
|
82
|
+
*/
|
|
83
|
+
export class DrawLayer {
|
|
84
|
+
static #id: number;
|
|
85
|
+
static #selectionId: number;
|
|
86
|
+
/** @type {AbortController | null} */
|
|
87
|
+
static #selectionChangeAC: AbortController | null;
|
|
88
|
+
/** @type {Set<HTMLDivElement>} */
|
|
89
|
+
static #selections: Set<HTMLDivElement>;
|
|
90
|
+
/** @type {boolean} */
|
|
91
|
+
static #isSelecting: boolean;
|
|
92
|
+
/** @type {Set<Element>} */
|
|
93
|
+
static #textLayerSet: Set<Element>;
|
|
94
|
+
/** @type {WeakMap<Element, TextLayerSelectionData>} */
|
|
95
|
+
static #textLayers: WeakMap<Element, TextLayerSelectionData>;
|
|
96
|
+
/**
|
|
97
|
+
* Clean up the selection for a text layer.
|
|
98
|
+
* @param {Element} textLayer
|
|
99
|
+
* Text layer.
|
|
100
|
+
* @returns {undefined}
|
|
101
|
+
* Nothing.
|
|
102
|
+
*/
|
|
103
|
+
static #cleanupTextLayerSelection(textLayer: Element): undefined;
|
|
104
|
+
/**
|
|
105
|
+
* @returns {boolean}
|
|
106
|
+
* Whether there is a non-collapsed document selection.
|
|
107
|
+
*/
|
|
108
|
+
static #hasSelection(): boolean;
|
|
109
|
+
/**
|
|
110
|
+
* @returns {Array<Element>}
|
|
111
|
+
* Connected text layers sorted in document order.
|
|
112
|
+
*/
|
|
113
|
+
static #getOrderedTextLayers(): Array<Element>;
|
|
114
|
+
/**
|
|
115
|
+
* Handle `selectionchange` to update the selection display for text layers.
|
|
116
|
+
* We want to display the selection in a separate layer on top of the text
|
|
117
|
+
* layer because the text layer has `mix-blend-mode: multiply` and we want
|
|
118
|
+
* the selection to have a different blend mode.
|
|
119
|
+
* @returns {undefined}
|
|
120
|
+
* Nothing.
|
|
121
|
+
*/
|
|
122
|
+
static #selectionChange(): undefined;
|
|
123
|
+
static get _svgFactory(): any;
|
|
124
|
+
static #setBox(element: any, [x, y, width, height]: [any, any, any, any]): void;
|
|
125
|
+
/**
|
|
126
|
+
* @param {DrawLayerOptions} options
|
|
127
|
+
* Configuration.
|
|
128
|
+
*/
|
|
129
|
+
constructor({ filterFactory, pageColors, pageIndex, textLayer, }: DrawLayerOptions);
|
|
130
|
+
pageIndex: number;
|
|
131
|
+
setParent(parent: any): void;
|
|
132
|
+
draw(properties: any, isPathUpdatable?: boolean, hasClip?: boolean): {
|
|
133
|
+
id: number;
|
|
134
|
+
clipPathId: string;
|
|
135
|
+
};
|
|
136
|
+
drawOutline(properties: any, mustRemoveSelfIntersections: any): number;
|
|
137
|
+
finalizeDraw(id: any, properties: any): void;
|
|
138
|
+
updateProperties(elementOrId: any, properties: any): void;
|
|
139
|
+
updateParent(id: any, layer: any): void;
|
|
140
|
+
remove(id: any): void;
|
|
141
|
+
destroy(): void;
|
|
142
|
+
#private;
|
|
143
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export class AltText {
|
|
2
|
+
static #l10nNewButton: null;
|
|
3
|
+
static _l10n: null;
|
|
4
|
+
static initialize(l10n: any): void;
|
|
5
|
+
constructor(editor: any);
|
|
6
|
+
render(): Promise<HTMLButtonElement>;
|
|
7
|
+
finish(): void;
|
|
8
|
+
isEmpty(): boolean;
|
|
9
|
+
hasData(): boolean;
|
|
10
|
+
get guessedText(): null;
|
|
11
|
+
setGuessedText(guessedText: any): Promise<void>;
|
|
12
|
+
toggleAltTextBadge(visibility?: boolean): void;
|
|
13
|
+
serialize(isForCopying: any): {
|
|
14
|
+
altText: null;
|
|
15
|
+
decorative: boolean;
|
|
16
|
+
guessedText: null;
|
|
17
|
+
textWithDisclaimer: null;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Set the alt text data.
|
|
21
|
+
*/
|
|
22
|
+
set data({ altText, decorative, guessedText, textWithDisclaimer, cancel, }: {
|
|
23
|
+
altText: null;
|
|
24
|
+
decorative: boolean;
|
|
25
|
+
});
|
|
26
|
+
get data(): {
|
|
27
|
+
altText: null;
|
|
28
|
+
decorative: boolean;
|
|
29
|
+
};
|
|
30
|
+
toggle(enabled?: boolean): void;
|
|
31
|
+
shown(): void;
|
|
32
|
+
destroy(): void;
|
|
33
|
+
#private;
|
|
34
|
+
}
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
export type AnnotationEditorUIManager = import("./tools.js").AnnotationEditorUIManager;
|
|
2
|
+
export type PageViewport = import("../page_viewport.js").PageViewport;
|
|
3
|
+
export type TextAccessibilityManager = import("../../../web/text_accessibility.js").TextAccessibilityManager;
|
|
4
|
+
export type AnnotationLayer = import("../annotation_layer.js").AnnotationLayer;
|
|
5
|
+
export type DrawLayer = import("../draw_layer.js").DrawLayer;
|
|
6
|
+
export type StructTreeLayerBuilder = import("../../../web/struct_tree_layer_builder.js").StructTreeLayerBuilder;
|
|
7
|
+
export type L10n = import("../../../web/l10n.js").L10n;
|
|
8
|
+
export type AnnotationEditorLayerOptions = {
|
|
9
|
+
mode: object;
|
|
10
|
+
div: HTMLDivElement;
|
|
11
|
+
structTreeLayer: StructTreeLayerBuilder;
|
|
12
|
+
uiManager: AnnotationEditorUIManager;
|
|
13
|
+
enabled: boolean;
|
|
14
|
+
accessibilityManager?: import("../../../web/text_accessibility.js").TextAccessibilityManager | undefined;
|
|
15
|
+
pageIndex: number;
|
|
16
|
+
l10n: L10n;
|
|
17
|
+
annotationLayer?: import("../annotation_layer.js").AnnotationLayer | undefined;
|
|
18
|
+
textLayer?: HTMLDivElement | undefined;
|
|
19
|
+
drawLayer: DrawLayer;
|
|
20
|
+
viewport: PageViewport;
|
|
21
|
+
};
|
|
22
|
+
export type RenderEditorLayerOptions = {
|
|
23
|
+
viewport: PageViewport;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* @typedef {object} AnnotationEditorLayerOptions
|
|
27
|
+
* @property {object} mode
|
|
28
|
+
* @property {HTMLDivElement} div
|
|
29
|
+
* @property {StructTreeLayerBuilder} structTreeLayer
|
|
30
|
+
* @property {AnnotationEditorUIManager} uiManager
|
|
31
|
+
* @property {boolean} enabled
|
|
32
|
+
* @property {TextAccessibilityManager} [accessibilityManager]
|
|
33
|
+
* @property {number} pageIndex
|
|
34
|
+
* @property {L10n} l10n
|
|
35
|
+
* @property {AnnotationLayer} [annotationLayer]
|
|
36
|
+
* @property {HTMLDivElement} [textLayer]
|
|
37
|
+
* @property {DrawLayer} drawLayer
|
|
38
|
+
* @property {PageViewport} viewport
|
|
39
|
+
*/
|
|
40
|
+
/**
|
|
41
|
+
* @typedef {object} RenderEditorLayerOptions
|
|
42
|
+
* @property {PageViewport} viewport
|
|
43
|
+
*/
|
|
44
|
+
/**
|
|
45
|
+
* Manage all the different editors on a page.
|
|
46
|
+
*/
|
|
47
|
+
export class AnnotationEditorLayer {
|
|
48
|
+
static _initialized: boolean;
|
|
49
|
+
static #editorTypes: Map<number, typeof FreeTextEditor | typeof HighlightEditor | typeof InkEditor | typeof SignatureEditor | typeof StampEditor>;
|
|
50
|
+
/**
|
|
51
|
+
* @param {AnnotationEditorLayerOptions} options
|
|
52
|
+
*/
|
|
53
|
+
constructor({ uiManager, pageIndex, div, structTreeLayer, accessibilityManager, annotationLayer, drawLayer, textLayer, viewport, l10n, }: AnnotationEditorLayerOptions);
|
|
54
|
+
pageIndex: number;
|
|
55
|
+
div: HTMLDivElement;
|
|
56
|
+
viewport: import("../page_viewport.js").PageViewport;
|
|
57
|
+
drawLayer: import("../draw_layer.js").DrawLayer;
|
|
58
|
+
_structTree: import("../../../web/struct_tree_layer_builder.js").StructTreeLayerBuilder;
|
|
59
|
+
get isEmpty(): boolean;
|
|
60
|
+
get isInvisible(): boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Update the toolbar if it's required to reflect the tool currently used.
|
|
63
|
+
* @param {object} options
|
|
64
|
+
*/
|
|
65
|
+
updateToolbar(options: object): void;
|
|
66
|
+
/**
|
|
67
|
+
* The mode has changed: it must be updated.
|
|
68
|
+
* @param {number} mode
|
|
69
|
+
*/
|
|
70
|
+
updateMode(mode?: number): void;
|
|
71
|
+
hasTextLayer(textLayer: any): boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Set the editing state.
|
|
74
|
+
* @param {boolean} isEditing
|
|
75
|
+
*/
|
|
76
|
+
setEditingState(isEditing: boolean): void;
|
|
77
|
+
/**
|
|
78
|
+
* Add some commands into the CommandManager (undo/redo stuff).
|
|
79
|
+
* @param {object} params
|
|
80
|
+
*/
|
|
81
|
+
addCommands(params: object): void;
|
|
82
|
+
cleanUndoStack(type: any): void;
|
|
83
|
+
toggleDrawing(enabled?: boolean): void;
|
|
84
|
+
togglePointerEvents(enabled?: boolean): void;
|
|
85
|
+
toggleAnnotationLayerPointerEvents(enabled?: boolean): void;
|
|
86
|
+
/**
|
|
87
|
+
* Enable pointer events on the main div in order to enable
|
|
88
|
+
* editor creation.
|
|
89
|
+
*/
|
|
90
|
+
enable(): Promise<void>;
|
|
91
|
+
/**
|
|
92
|
+
* Disable editor creation.
|
|
93
|
+
*/
|
|
94
|
+
disable(): void;
|
|
95
|
+
getEditableAnnotation(id: any): any;
|
|
96
|
+
/**
|
|
97
|
+
* Set the current editor.
|
|
98
|
+
* @param {AnnotationEditor} editor
|
|
99
|
+
*/
|
|
100
|
+
setActiveEditor(editor: AnnotationEditor): void;
|
|
101
|
+
enableTextSelection(): void;
|
|
102
|
+
disableTextSelection(): void;
|
|
103
|
+
enableClick(): void;
|
|
104
|
+
disableClick(): void;
|
|
105
|
+
attach(editor: any): void;
|
|
106
|
+
detach(editor: any): void;
|
|
107
|
+
/**
|
|
108
|
+
* Remove an editor.
|
|
109
|
+
* @param {AnnotationEditor} editor
|
|
110
|
+
*/
|
|
111
|
+
remove(editor: AnnotationEditor): void;
|
|
112
|
+
/**
|
|
113
|
+
* An editor can have a different parent, for example after having
|
|
114
|
+
* being dragged and dropped from a page to another.
|
|
115
|
+
* @param {AnnotationEditor} editor
|
|
116
|
+
*/
|
|
117
|
+
changeParent(editor: AnnotationEditor): void;
|
|
118
|
+
/**
|
|
119
|
+
* Add a new editor in the current view.
|
|
120
|
+
* @param {AnnotationEditor} editor
|
|
121
|
+
*/
|
|
122
|
+
add(editor: AnnotationEditor): void;
|
|
123
|
+
moveEditorInDOM(editor: any): void;
|
|
124
|
+
/**
|
|
125
|
+
* Add or rebuild depending if it has been removed or not.
|
|
126
|
+
* @param {AnnotationEditor} editor
|
|
127
|
+
*/
|
|
128
|
+
addOrRebuild(editor: AnnotationEditor): void;
|
|
129
|
+
/**
|
|
130
|
+
* Add a new editor and make this addition undoable.
|
|
131
|
+
* @param {AnnotationEditor} editor
|
|
132
|
+
*/
|
|
133
|
+
addUndoableEditor(editor: AnnotationEditor): void;
|
|
134
|
+
getEditorByUID(uid: any): any;
|
|
135
|
+
combinedSignal(ac: any): AbortSignal;
|
|
136
|
+
canCreateNewEmptyEditor(): boolean | undefined;
|
|
137
|
+
/**
|
|
138
|
+
* Paste some content into a new editor.
|
|
139
|
+
* @param {object} options
|
|
140
|
+
* @param {object} params
|
|
141
|
+
*/
|
|
142
|
+
pasteEditor(options: object, params: object): Promise<void>;
|
|
143
|
+
/**
|
|
144
|
+
* Create a new editor
|
|
145
|
+
* @param {object} data
|
|
146
|
+
* @returns {Promise<AnnotationEditor | null>}
|
|
147
|
+
*/
|
|
148
|
+
deserialize(data: object): Promise<AnnotationEditor | null>;
|
|
149
|
+
/**
|
|
150
|
+
* Create and add a new editor.
|
|
151
|
+
* @param {PointerEvent} event
|
|
152
|
+
* @param {boolean} isCentered
|
|
153
|
+
* @param {object} [data]
|
|
154
|
+
* @returns {AnnotationEditor}
|
|
155
|
+
*/
|
|
156
|
+
createAndAddNewEditor(event: PointerEvent, isCentered: boolean, data?: object): AnnotationEditor;
|
|
157
|
+
get boundingClientRect(): DOMRect;
|
|
158
|
+
/**
|
|
159
|
+
* Create and add a new editor.
|
|
160
|
+
*/
|
|
161
|
+
addNewEditor(data?: {}): void;
|
|
162
|
+
/**
|
|
163
|
+
* Set the last selected editor.
|
|
164
|
+
* @param {AnnotationEditor} editor
|
|
165
|
+
*/
|
|
166
|
+
setSelected(editor: AnnotationEditor): void;
|
|
167
|
+
/**
|
|
168
|
+
* Add or remove an editor the current selection.
|
|
169
|
+
* @param {AnnotationEditor} editor
|
|
170
|
+
*/
|
|
171
|
+
toggleSelected(editor: AnnotationEditor): void;
|
|
172
|
+
/**
|
|
173
|
+
* Unselect an editor.
|
|
174
|
+
* @param {AnnotationEditor} editor
|
|
175
|
+
*/
|
|
176
|
+
unselect(editor: AnnotationEditor): void;
|
|
177
|
+
/**
|
|
178
|
+
* Pointerup callback.
|
|
179
|
+
* @param {PointerEvent} event
|
|
180
|
+
*/
|
|
181
|
+
pointerup(event: PointerEvent): void;
|
|
182
|
+
/**
|
|
183
|
+
* Pointerdown callback.
|
|
184
|
+
* @param {PointerEvent} event
|
|
185
|
+
*/
|
|
186
|
+
pointerdown(event: PointerEvent): void;
|
|
187
|
+
startDrawingSession(event: any): void;
|
|
188
|
+
pause(on: any): void;
|
|
189
|
+
endDrawingSession(isAborted?: boolean): any;
|
|
190
|
+
/**
|
|
191
|
+
* @param {AnnotationEditor} editor
|
|
192
|
+
* @param {number} x
|
|
193
|
+
* @param {number} y
|
|
194
|
+
* @returns {boolean}
|
|
195
|
+
*/
|
|
196
|
+
findNewParent(editor: AnnotationEditor, x: number, y: number): boolean;
|
|
197
|
+
commitOrRemove(): boolean;
|
|
198
|
+
onScaleChanging(): void;
|
|
199
|
+
/**
|
|
200
|
+
* Destroy the main editor.
|
|
201
|
+
*/
|
|
202
|
+
destroy(): void;
|
|
203
|
+
/**
|
|
204
|
+
* Render the main editor.
|
|
205
|
+
* @param {RenderEditorLayerOptions} parameters
|
|
206
|
+
*/
|
|
207
|
+
render({ viewport }: RenderEditorLayerOptions): Promise<void>;
|
|
208
|
+
/**
|
|
209
|
+
* Update the main editor.
|
|
210
|
+
* @param {RenderEditorLayerOptions} parameters
|
|
211
|
+
*/
|
|
212
|
+
update({ viewport }: RenderEditorLayerOptions): void;
|
|
213
|
+
/**
|
|
214
|
+
* Get page dimensions.
|
|
215
|
+
* @returns {object} dimensions.
|
|
216
|
+
*/
|
|
217
|
+
get pageDimensions(): object;
|
|
218
|
+
get scale(): number;
|
|
219
|
+
#private;
|
|
220
|
+
}
|
|
221
|
+
import { AnnotationEditor } from "./editor.js";
|
|
222
|
+
import { FreeTextEditor } from "./freetext.js";
|
|
223
|
+
import { HighlightEditor } from "./highlight.js";
|
|
224
|
+
import { InkEditor } from "./ink.js";
|
|
225
|
+
import { SignatureEditor } from "./signature.js";
|
|
226
|
+
import { StampEditor } from "./stamp.js";
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BasicColorPicker class provides a simple color picker.
|
|
3
|
+
* It displays an input element (with type="color") that allows the user
|
|
4
|
+
* to select a color for the annotation.
|
|
5
|
+
*/
|
|
6
|
+
export class BasicColorPicker {
|
|
7
|
+
static #l10nColor: null;
|
|
8
|
+
constructor(editor: any);
|
|
9
|
+
renderButton(): HTMLInputElement;
|
|
10
|
+
update(value: any): void;
|
|
11
|
+
updateOpacity(value: any): void;
|
|
12
|
+
destroy(): void;
|
|
13
|
+
hideDropdown(): void;
|
|
14
|
+
#private;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* ColorPicker class provides a color picker for the annotation editor.
|
|
18
|
+
* It displays a dropdown with some predefined colors and allows the user
|
|
19
|
+
* to select a color for the annotation.
|
|
20
|
+
*/
|
|
21
|
+
export class ColorPicker {
|
|
22
|
+
static #l10nColor: null;
|
|
23
|
+
static get _keyboardManager(): any;
|
|
24
|
+
constructor({ editor, uiManager }: {
|
|
25
|
+
editor?: null | undefined;
|
|
26
|
+
uiManager?: null | undefined;
|
|
27
|
+
});
|
|
28
|
+
renderButton(): HTMLButtonElement;
|
|
29
|
+
renderMainDropdown(): HTMLDivElement;
|
|
30
|
+
_colorSelectFromKeyboard(event: any): void;
|
|
31
|
+
_moveToNext(event: any): void;
|
|
32
|
+
_moveToPrevious(event: any): void;
|
|
33
|
+
_moveToBeginning(event: any): void;
|
|
34
|
+
_moveToEnd(event: any): void;
|
|
35
|
+
hideDropdown(): void;
|
|
36
|
+
_hideDropdownFromKeyboard(): void;
|
|
37
|
+
update(color: any): void;
|
|
38
|
+
destroy(): void;
|
|
39
|
+
#private;
|
|
40
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export class Comment {
|
|
2
|
+
constructor(editor: any);
|
|
3
|
+
renderForToolbar(): any;
|
|
4
|
+
renderForStandalone(): any;
|
|
5
|
+
focusButton(): void;
|
|
6
|
+
onUpdatedColor(): void;
|
|
7
|
+
get commentButtonWidth(): number;
|
|
8
|
+
set commentPopupPositionInLayer(pos: number[] | null);
|
|
9
|
+
get commentPopupPositionInLayer(): number[] | null;
|
|
10
|
+
hasDefaultPopupPosition(): boolean;
|
|
11
|
+
removeStandaloneCommentButton(): void;
|
|
12
|
+
removeToolbarCommentButton(): void;
|
|
13
|
+
setCommentButtonStates({ selected, hasPopup }: {
|
|
14
|
+
selected: any;
|
|
15
|
+
hasPopup: any;
|
|
16
|
+
}): void;
|
|
17
|
+
edit(options: any): void;
|
|
18
|
+
finish(): void;
|
|
19
|
+
isDeleted(): boolean;
|
|
20
|
+
isEmpty(): boolean;
|
|
21
|
+
hasBeenEdited(): boolean;
|
|
22
|
+
serialize(): {
|
|
23
|
+
text: null;
|
|
24
|
+
richText: null;
|
|
25
|
+
date: null;
|
|
26
|
+
deleted: boolean;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Set the comment data.
|
|
30
|
+
*/
|
|
31
|
+
set data(text: {
|
|
32
|
+
text: null;
|
|
33
|
+
richText: null;
|
|
34
|
+
date: null;
|
|
35
|
+
deleted: boolean;
|
|
36
|
+
});
|
|
37
|
+
get data(): {
|
|
38
|
+
text: null;
|
|
39
|
+
richText: null;
|
|
40
|
+
date: null;
|
|
41
|
+
deleted: boolean;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Restore the comment data (used for undo).
|
|
45
|
+
* @param {object} data - The comment data to restore.
|
|
46
|
+
* @param {string} data.text - The comment text.
|
|
47
|
+
* @param {string|null} data.richText - The rich text content.
|
|
48
|
+
* @param {Date|null} data.date - The original date.
|
|
49
|
+
*/
|
|
50
|
+
restoreData({ text, richText, date }: {
|
|
51
|
+
text: string;
|
|
52
|
+
richText: string | null;
|
|
53
|
+
date: Date | null;
|
|
54
|
+
}): void;
|
|
55
|
+
setInitialText(text: any, richText?: null): void;
|
|
56
|
+
shown(): void;
|
|
57
|
+
destroy(): void;
|
|
58
|
+
#private;
|
|
59
|
+
}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
export type AnnotationEditorLayer = import("./annotation_editor_layer.js").AnnotationEditorLayer;
|
|
2
|
+
export type AnnotationEditorUIManager = import("./tools.js").AnnotationEditorUIManager;
|
|
3
|
+
/**
|
|
4
|
+
* Basic draw editor.
|
|
5
|
+
*/
|
|
6
|
+
export class DrawingEditor extends AnnotationEditor {
|
|
7
|
+
static _currentDrawId: number;
|
|
8
|
+
static _currentParent: null;
|
|
9
|
+
static #currentDraw: null;
|
|
10
|
+
static #currentDrawingAC: null;
|
|
11
|
+
static #currentDrawingOptions: null;
|
|
12
|
+
static #currentClipPathId: null;
|
|
13
|
+
static _INNER_MARGIN: number;
|
|
14
|
+
static _mergeSVGProperties(p1: any, p2: any): any;
|
|
15
|
+
/**
|
|
16
|
+
* @abstract
|
|
17
|
+
* @param {object} _options
|
|
18
|
+
* @returns {DrawingOptions} the default options to use for a new editor.
|
|
19
|
+
*/
|
|
20
|
+
static getDefaultDrawingOptions(_options: object): DrawingOptions;
|
|
21
|
+
/**
|
|
22
|
+
* @abstract
|
|
23
|
+
* @returns {Map<AnnotationEditorParamsType, string>} a map between the
|
|
24
|
+
* parameter types and the name of the options.
|
|
25
|
+
*/
|
|
26
|
+
static get typesMap(): Map<{
|
|
27
|
+
RESIZE: number;
|
|
28
|
+
CREATE: number;
|
|
29
|
+
FREETEXT_SIZE: number;
|
|
30
|
+
FREETEXT_COLOR: number;
|
|
31
|
+
FREETEXT_OPACITY: number;
|
|
32
|
+
INK_COLOR: number;
|
|
33
|
+
INK_THICKNESS: number;
|
|
34
|
+
INK_OPACITY: number;
|
|
35
|
+
INK_COLOR_AND_OPACITY: number;
|
|
36
|
+
HIGHLIGHT_COLOR: number;
|
|
37
|
+
HIGHLIGHT_THICKNESS: number;
|
|
38
|
+
HIGHLIGHT_FREE: number;
|
|
39
|
+
HIGHLIGHT_SHOW_ALL: number;
|
|
40
|
+
DRAW_STEP: number;
|
|
41
|
+
}, string>;
|
|
42
|
+
static get _hasClipPath(): boolean;
|
|
43
|
+
static get _hasDrawClass(): boolean;
|
|
44
|
+
/**
|
|
45
|
+
* @returns {boolean} `true` if several drawings can be added to the
|
|
46
|
+
* annotation.
|
|
47
|
+
*/
|
|
48
|
+
static get supportMultipleDrawings(): boolean;
|
|
49
|
+
/** @inheritdoc */
|
|
50
|
+
static updateDefaultParams(type: any, value: any): void;
|
|
51
|
+
/** @inheritdoc */
|
|
52
|
+
static get defaultPropertiesToUpdate(): any[][];
|
|
53
|
+
static onScaleChangingWhenDrawing(): void;
|
|
54
|
+
/**
|
|
55
|
+
* @abstract
|
|
56
|
+
* @param {object} _params
|
|
57
|
+
* @param {number} _params.x - The x coordinate of the event.
|
|
58
|
+
* @param {number} _params.y - The y coordinate of the event.
|
|
59
|
+
* @param {[number, number, number, number]} _params.box - The target's
|
|
60
|
+
* client bounding box.
|
|
61
|
+
* @param {number} _params.rotation - The viewport rotation.
|
|
62
|
+
* @param {AnnotationEditorLayer} _params.parent - The parent layer.
|
|
63
|
+
* @param {boolean} _params.isLTR - Whether the direction is left-to-right.
|
|
64
|
+
*/
|
|
65
|
+
static createDrawerInstance(_params: {
|
|
66
|
+
x: number;
|
|
67
|
+
y: number;
|
|
68
|
+
box: [number, number, number, number];
|
|
69
|
+
rotation: number;
|
|
70
|
+
parent: AnnotationEditorLayer;
|
|
71
|
+
isLTR: boolean;
|
|
72
|
+
}): void;
|
|
73
|
+
/**
|
|
74
|
+
* @param {AnnotationEditorLayer} _parent
|
|
75
|
+
* @param {PointerEvent} event
|
|
76
|
+
* @returns {HTMLElement}
|
|
77
|
+
*/
|
|
78
|
+
static _getDrawingTarget(_parent: AnnotationEditorLayer, { target }: PointerEvent): HTMLElement;
|
|
79
|
+
/**
|
|
80
|
+
* @param {PointerEvent} event
|
|
81
|
+
* @param {PointerEvent} [referenceEvent]
|
|
82
|
+
* @returns {Array<number>}
|
|
83
|
+
*/
|
|
84
|
+
static _getPointerCoords({ offsetX, offsetY, clientX, clientY }: PointerEvent, referenceEvent?: PointerEvent): Array<number>;
|
|
85
|
+
/**
|
|
86
|
+
* @param {HTMLElement} _target
|
|
87
|
+
* @param {AbortSignal} _signal
|
|
88
|
+
*/
|
|
89
|
+
static _addDrawingListeners(_target: HTMLElement, _signal: AbortSignal): void;
|
|
90
|
+
/** @param {boolean} isAborted */
|
|
91
|
+
static _endDrawingSession(isAborted?: boolean): any;
|
|
92
|
+
static startDrawing(parent: any, uiManager: any, isLTR: any, event: any): void;
|
|
93
|
+
static _drawMove(event: any): void;
|
|
94
|
+
static _cleanup(all: any): void;
|
|
95
|
+
static _endDraw(event: any): void;
|
|
96
|
+
static endDrawing(isAborted: any): any;
|
|
97
|
+
/**
|
|
98
|
+
* Deserialize the drawing outlines.
|
|
99
|
+
* @abstract
|
|
100
|
+
* @param {number} _pageX - The x coordinate of the page.
|
|
101
|
+
* @param {number} _pageY - The y coordinate of the page.
|
|
102
|
+
* @param {number} _pageWidth - The width of the page.
|
|
103
|
+
* @param {number} _pageHeight - The height of the page.
|
|
104
|
+
* @param {number} _innerMargin - The outline's inner margin.
|
|
105
|
+
* @param {object} _data - The data to deserialize.
|
|
106
|
+
* @param {AnnotationEditorUIManager} _uiManager
|
|
107
|
+
* @returns {object} The deserialized outlines.
|
|
108
|
+
*/
|
|
109
|
+
static deserializeDraw(_pageX: number, _pageY: number, _pageWidth: number, _pageHeight: number, _innerMargin: number, _data: object, _uiManager: AnnotationEditorUIManager): object;
|
|
110
|
+
/** @inheritdoc */
|
|
111
|
+
static deserialize(data: any, parent: any, uiManager: any): Promise<AnnotationEditor | null>;
|
|
112
|
+
constructor(params: any);
|
|
113
|
+
_clipPathId: null;
|
|
114
|
+
_colorPicker: null;
|
|
115
|
+
_drawId: null;
|
|
116
|
+
_drawOutlines: null;
|
|
117
|
+
_focusDrawId: null;
|
|
118
|
+
/** @inheritdoc */
|
|
119
|
+
onUpdatedOpacity(): void;
|
|
120
|
+
_addOutlines(params: any): void;
|
|
121
|
+
get _drawRotation(): number;
|
|
122
|
+
get _opacityName(): any;
|
|
123
|
+
/** @inheritdoc */
|
|
124
|
+
updateParams(type: any, value: any): void;
|
|
125
|
+
/** @inheritdoc */
|
|
126
|
+
get propertiesToUpdate(): any[][];
|
|
127
|
+
/**
|
|
128
|
+
* Update a property and make this action undoable.
|
|
129
|
+
* @param {number} type
|
|
130
|
+
* @param {string} name
|
|
131
|
+
* @param {*} value
|
|
132
|
+
*/
|
|
133
|
+
_updateProperty(type: number, name: string, value: any): void;
|
|
134
|
+
/**
|
|
135
|
+
* Update color and opacity atomically as one undoable command.
|
|
136
|
+
*/
|
|
137
|
+
_updateColorAndOpacity(color: any, opacity: any, type?: any): void;
|
|
138
|
+
/** @inheritdoc */
|
|
139
|
+
_onTranslating(_x: any, _y: any): void;
|
|
140
|
+
/** @inheritdoc */
|
|
141
|
+
_onTranslated(): void;
|
|
142
|
+
get _mustBeDisabledOnCommit(): boolean;
|
|
143
|
+
/** @inheritdoc */
|
|
144
|
+
onceAdded(focus: any): void;
|
|
145
|
+
/**
|
|
146
|
+
* @inheritdoc
|
|
147
|
+
* @param {number} [parentRotation] - The parent rotation to apply.
|
|
148
|
+
*/
|
|
149
|
+
rotate(parentRotation?: number): void;
|
|
150
|
+
pointerover(): void;
|
|
151
|
+
pointerleave(): void;
|
|
152
|
+
onScaleChanging(): void;
|
|
153
|
+
/**
|
|
154
|
+
* Create the drawing options.
|
|
155
|
+
* @param {object} _data
|
|
156
|
+
*/
|
|
157
|
+
createDrawingOptions(_data: object): void;
|
|
158
|
+
serializeDraw(isForCopying: any): any;
|
|
159
|
+
/** @inheritdoc */
|
|
160
|
+
renderAnnotationElement(annotation: any): null;
|
|
161
|
+
#private;
|
|
162
|
+
}
|
|
163
|
+
export class DrawingOptions {
|
|
164
|
+
updateProperty(name: any, value: any): void;
|
|
165
|
+
updateProperties(properties: any): void;
|
|
166
|
+
updateSVGProperty(name: any, value: any): void;
|
|
167
|
+
toSVGProperties(): {
|
|
168
|
+
root: any;
|
|
169
|
+
};
|
|
170
|
+
reset(): void;
|
|
171
|
+
updateAll(options?: this): void;
|
|
172
|
+
clone(): void;
|
|
173
|
+
#private;
|
|
174
|
+
}
|
|
175
|
+
import { AnnotationEditor } from "./editor.js";
|