@nocobase/plugin-file-manager 2.1.0-beta.38 → 2.1.0-beta.40
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/dist/client/index.js +1 -1
- package/dist/client/locale/index.d.ts +1 -1
- package/dist/client/previewer/filePreviewTypes.d.ts +1 -1
- package/dist/client-v2/125.0b8eef1f19b87042.js +10 -0
- package/dist/client-v2/{942.9dc2d49980a4dd9e.js → 942.f36d807d763a1b53.js} +1 -1
- package/dist/client-v2/index.d.ts +2 -0
- package/dist/client-v2/index.js +1 -1
- package/dist/externalVersion.js +9 -9
- package/dist/node_modules/@aws-sdk/client-s3/package.json +1 -1
- package/dist/node_modules/@aws-sdk/lib-storage/package.json +1 -1
- package/dist/node_modules/ali-oss/package.json +1 -1
- package/dist/node_modules/cos-nodejs-sdk-v5/package.json +1 -1
- package/dist/node_modules/mime-match/package.json +1 -1
- package/dist/node_modules/mime-types/package.json +1 -1
- package/dist/node_modules/mkdirp/package.json +1 -1
- package/dist/node_modules/url-join/package.json +1 -1
- package/package.json +3 -2
- package/dist/client-v2/125.01d5562df948d974.js +0 -10
- package/dist/node_modules/pdfjs-dist/LICENSE +0 -177
- package/dist/node_modules/pdfjs-dist/build/pdf.mjs +0 -26514
- package/dist/node_modules/pdfjs-dist/cmaps/78-EUC-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/78-EUC-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/78-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/78-RKSJ-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/78-RKSJ-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/78-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/78ms-RKSJ-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/78ms-RKSJ-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/83pv-RKSJ-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/90ms-RKSJ-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/90ms-RKSJ-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/90msp-RKSJ-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/90msp-RKSJ-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/90pv-RKSJ-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/90pv-RKSJ-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/Add-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/Add-RKSJ-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/Add-RKSJ-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/Add-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/Adobe-CNS1-0.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/Adobe-CNS1-1.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/Adobe-CNS1-2.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/Adobe-CNS1-3.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/Adobe-CNS1-4.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/Adobe-CNS1-5.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/Adobe-CNS1-6.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/Adobe-CNS1-UCS2.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/Adobe-GB1-0.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/Adobe-GB1-1.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/Adobe-GB1-2.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/Adobe-GB1-3.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/Adobe-GB1-4.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/Adobe-GB1-5.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/Adobe-GB1-UCS2.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/Adobe-Japan1-0.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/Adobe-Japan1-1.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/Adobe-Japan1-2.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/Adobe-Japan1-3.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/Adobe-Japan1-4.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/Adobe-Japan1-5.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/Adobe-Japan1-6.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/Adobe-Japan1-UCS2.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/Adobe-Korea1-0.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/Adobe-Korea1-1.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/Adobe-Korea1-2.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/Adobe-Korea1-UCS2.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/B5-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/B5-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/B5pc-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/B5pc-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/CNS-EUC-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/CNS-EUC-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/CNS1-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/CNS1-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/CNS2-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/CNS2-V.bcmap +0 -3
- package/dist/node_modules/pdfjs-dist/cmaps/ETHK-B5-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/ETHK-B5-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/ETen-B5-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/ETen-B5-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/ETenms-B5-H.bcmap +0 -3
- package/dist/node_modules/pdfjs-dist/cmaps/ETenms-B5-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/EUC-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/EUC-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/Ext-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/Ext-RKSJ-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/Ext-RKSJ-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/Ext-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/GB-EUC-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/GB-EUC-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/GB-H.bcmap +0 -4
- package/dist/node_modules/pdfjs-dist/cmaps/GB-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/GBK-EUC-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/GBK-EUC-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/GBK2K-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/GBK2K-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/GBKp-EUC-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/GBKp-EUC-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/GBT-EUC-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/GBT-EUC-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/GBT-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/GBT-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/GBTpc-EUC-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/GBTpc-EUC-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/GBpc-EUC-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/GBpc-EUC-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/HKdla-B5-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/HKdla-B5-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/HKdlb-B5-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/HKdlb-B5-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/HKgccs-B5-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/HKgccs-B5-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/HKm314-B5-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/HKm314-B5-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/HKm471-B5-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/HKm471-B5-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/HKscs-B5-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/HKscs-B5-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/Hankaku.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/Hiragana.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/KSC-EUC-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/KSC-EUC-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/KSC-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/KSC-Johab-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/KSC-Johab-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/KSC-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/KSCms-UHC-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/KSCms-UHC-HW-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/KSCms-UHC-HW-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/KSCms-UHC-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/KSCpc-EUC-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/KSCpc-EUC-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/Katakana.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/NWP-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/NWP-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/RKSJ-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/RKSJ-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/Roman.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniCNS-UCS2-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniCNS-UCS2-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniCNS-UTF16-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniCNS-UTF16-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniCNS-UTF32-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniCNS-UTF32-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniCNS-UTF8-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniCNS-UTF8-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniGB-UCS2-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniGB-UCS2-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniGB-UTF16-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniGB-UTF16-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniGB-UTF32-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniGB-UTF32-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniGB-UTF8-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniGB-UTF8-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniJIS-UCS2-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniJIS-UCS2-HW-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniJIS-UCS2-HW-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniJIS-UCS2-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniJIS-UTF16-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniJIS-UTF16-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniJIS-UTF32-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniJIS-UTF32-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniJIS-UTF8-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniJIS-UTF8-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniJIS2004-UTF16-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniJIS2004-UTF16-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniJIS2004-UTF32-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniJIS2004-UTF32-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniJIS2004-UTF8-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniJIS2004-UTF8-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniJISPro-UCS2-HW-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniJISPro-UCS2-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniJISPro-UTF8-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniJISX0213-UTF32-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniJISX0213-UTF32-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniJISX02132004-UTF32-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniJISX02132004-UTF32-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniKS-UCS2-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniKS-UCS2-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniKS-UTF16-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniKS-UTF16-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniKS-UTF32-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniKS-UTF32-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniKS-UTF8-H.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/UniKS-UTF8-V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/V.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/cmaps/WP-Symbol.bcmap +0 -0
- package/dist/node_modules/pdfjs-dist/iccs/CGATS001Compat-v2-micro.icc +0 -0
- package/dist/node_modules/pdfjs-dist/legacy/build/pdf.d.mts +0 -1
- package/dist/node_modules/pdfjs-dist/legacy/web/images/altText_add.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/altText_disclaimer.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/altText_done.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/altText_spinner.svg +0 -30
- package/dist/node_modules/pdfjs-dist/legacy/web/images/altText_warning.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/annotation-check.svg +0 -11
- package/dist/node_modules/pdfjs-dist/legacy/web/images/annotation-comment.svg +0 -16
- package/dist/node_modules/pdfjs-dist/legacy/web/images/annotation-help.svg +0 -26
- package/dist/node_modules/pdfjs-dist/legacy/web/images/annotation-insert.svg +0 -10
- package/dist/node_modules/pdfjs-dist/legacy/web/images/annotation-key.svg +0 -11
- package/dist/node_modules/pdfjs-dist/legacy/web/images/annotation-newparagraph.svg +0 -11
- package/dist/node_modules/pdfjs-dist/legacy/web/images/annotation-noicon.svg +0 -7
- package/dist/node_modules/pdfjs-dist/legacy/web/images/annotation-note.svg +0 -42
- package/dist/node_modules/pdfjs-dist/legacy/web/images/annotation-paperclip.svg +0 -6
- package/dist/node_modules/pdfjs-dist/legacy/web/images/annotation-paragraph.svg +0 -16
- package/dist/node_modules/pdfjs-dist/legacy/web/images/annotation-pushpin.svg +0 -7
- package/dist/node_modules/pdfjs-dist/legacy/web/images/checkmark.svg +0 -5
- package/dist/node_modules/pdfjs-dist/legacy/web/images/comment-actionsButton.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/comment-closeButton.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/comment-editButton.svg +0 -8
- package/dist/node_modules/pdfjs-dist/legacy/web/images/comment-popup-editButton.svg +0 -5
- package/dist/node_modules/pdfjs-dist/legacy/web/images/cursor-editorFreeHighlight.svg +0 -6
- package/dist/node_modules/pdfjs-dist/legacy/web/images/cursor-editorFreeText.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/cursor-editorInk.svg +0 -4
- package/dist/node_modules/pdfjs-dist/legacy/web/images/cursor-editorTextHighlight.svg +0 -8
- package/dist/node_modules/pdfjs-dist/legacy/web/images/editor-toolbar-delete.svg +0 -5
- package/dist/node_modules/pdfjs-dist/legacy/web/images/editor-toolbar-edit.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/findbarButton-next.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/findbarButton-previous.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/gv-toolbarButton-download.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/loading.svg +0 -1
- package/dist/node_modules/pdfjs-dist/legacy/web/images/messageBar_closingButton.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/messageBar_info.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/messageBar_warning.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/pages_closeButton.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/pages_selected.svg +0 -7
- package/dist/node_modules/pdfjs-dist/legacy/web/images/pages_viewArrow.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/pages_viewButton.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/secondaryToolbarButton-documentProperties.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/secondaryToolbarButton-firstPage.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/secondaryToolbarButton-handTool.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/secondaryToolbarButton-lastPage.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/secondaryToolbarButton-rotateCcw.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/secondaryToolbarButton-rotateCw.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/secondaryToolbarButton-scrollHorizontal.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/secondaryToolbarButton-scrollPage.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/secondaryToolbarButton-scrollVertical.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/secondaryToolbarButton-scrollWrapped.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/secondaryToolbarButton-selectTool.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/secondaryToolbarButton-spreadEven.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/secondaryToolbarButton-spreadNone.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/secondaryToolbarButton-spreadOdd.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/toolbarButton-bookmark.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/toolbarButton-currentOutlineItem.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/toolbarButton-download.svg +0 -4
- package/dist/node_modules/pdfjs-dist/legacy/web/images/toolbarButton-editorFreeText.svg +0 -5
- package/dist/node_modules/pdfjs-dist/legacy/web/images/toolbarButton-editorHighlight.svg +0 -6
- package/dist/node_modules/pdfjs-dist/legacy/web/images/toolbarButton-editorInk.svg +0 -4
- package/dist/node_modules/pdfjs-dist/legacy/web/images/toolbarButton-editorSignature.svg +0 -6
- package/dist/node_modules/pdfjs-dist/legacy/web/images/toolbarButton-editorStamp.svg +0 -8
- package/dist/node_modules/pdfjs-dist/legacy/web/images/toolbarButton-menuArrow.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/toolbarButton-openFile.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/toolbarButton-pageDown.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/toolbarButton-pageUp.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/toolbarButton-presentationMode.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/toolbarButton-print.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/toolbarButton-search.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/toolbarButton-secondaryToolbarToggle.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/toolbarButton-viewAttachments.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/toolbarButton-viewLayers.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/toolbarButton-viewOutline.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/toolbarButton-viewThumbnail.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/toolbarButton-viewsManagerToggle.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/toolbarButton-zoomIn.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/toolbarButton-zoomOut.svg +0 -3
- package/dist/node_modules/pdfjs-dist/legacy/web/images/treeitem-collapsed.svg +0 -1
- package/dist/node_modules/pdfjs-dist/legacy/web/images/treeitem-expanded.svg +0 -1
- package/dist/node_modules/pdfjs-dist/legacy/web/pdf_viewer.css +0 -6989
- package/dist/node_modules/pdfjs-dist/legacy/web/pdf_viewer.d.mts +0 -1
- package/dist/node_modules/pdfjs-dist/package.json +0 -1
- package/dist/node_modules/pdfjs-dist/standard_fonts/FoxitDingbats.pfb +0 -0
- package/dist/node_modules/pdfjs-dist/standard_fonts/FoxitFixed.pfb +0 -0
- package/dist/node_modules/pdfjs-dist/standard_fonts/FoxitFixedBold.pfb +0 -0
- package/dist/node_modules/pdfjs-dist/standard_fonts/FoxitFixedBoldItalic.pfb +0 -0
- package/dist/node_modules/pdfjs-dist/standard_fonts/FoxitFixedItalic.pfb +0 -0
- package/dist/node_modules/pdfjs-dist/standard_fonts/FoxitSerif.pfb +0 -0
- package/dist/node_modules/pdfjs-dist/standard_fonts/FoxitSerifBold.pfb +0 -0
- package/dist/node_modules/pdfjs-dist/standard_fonts/FoxitSerifBoldItalic.pfb +0 -0
- package/dist/node_modules/pdfjs-dist/standard_fonts/FoxitSerifItalic.pfb +0 -0
- package/dist/node_modules/pdfjs-dist/standard_fonts/FoxitSymbol.pfb +0 -0
- package/dist/node_modules/pdfjs-dist/standard_fonts/LICENSE_FOXIT +0 -27
- package/dist/node_modules/pdfjs-dist/standard_fonts/LICENSE_LIBERATION +0 -102
- package/dist/node_modules/pdfjs-dist/standard_fonts/LiberationSans-Bold.ttf +0 -0
- package/dist/node_modules/pdfjs-dist/standard_fonts/LiberationSans-BoldItalic.ttf +0 -0
- package/dist/node_modules/pdfjs-dist/standard_fonts/LiberationSans-Italic.ttf +0 -0
- package/dist/node_modules/pdfjs-dist/standard_fonts/LiberationSans-Regular.ttf +0 -0
- package/dist/node_modules/pdfjs-dist/types/src/display/annotation_layer.d.ts +0 -276
- package/dist/node_modules/pdfjs-dist/types/src/display/annotation_storage.d.ts +0 -94
- package/dist/node_modules/pdfjs-dist/types/src/display/api.d.ts +0 -1630
- package/dist/node_modules/pdfjs-dist/types/src/display/api_utils.d.ts +0 -13
- package/dist/node_modules/pdfjs-dist/types/src/display/canvas.d.ts +0 -207
- package/dist/node_modules/pdfjs-dist/types/src/display/canvas_dependency_tracker.d.ts +0 -160
- package/dist/node_modules/pdfjs-dist/types/src/display/canvas_factory.d.ts +0 -27
- package/dist/node_modules/pdfjs-dist/types/src/display/cmap_reader_factory.d.ts +0 -25
- package/dist/node_modules/pdfjs-dist/types/src/display/content_disposition.d.ts +0 -7
- package/dist/node_modules/pdfjs-dist/types/src/display/display_utils.d.ts +0 -366
- package/dist/node_modules/pdfjs-dist/types/src/display/draw_layer.d.ts +0 -22
- package/dist/node_modules/pdfjs-dist/types/src/display/editor/alt_text.d.ts +0 -34
- package/dist/node_modules/pdfjs-dist/types/src/display/editor/annotation_editor_layer.d.ts +0 -233
- package/dist/node_modules/pdfjs-dist/types/src/display/editor/color_picker.d.ts +0 -39
- package/dist/node_modules/pdfjs-dist/types/src/display/editor/comment.d.ts +0 -59
- package/dist/node_modules/pdfjs-dist/types/src/display/editor/draw.d.ts +0 -117
- package/dist/node_modules/pdfjs-dist/types/src/display/editor/drawers/contour.d.ts +0 -3
- package/dist/node_modules/pdfjs-dist/types/src/display/editor/drawers/freedraw.d.ts +0 -32
- package/dist/node_modules/pdfjs-dist/types/src/display/editor/drawers/highlight.d.ts +0 -37
- package/dist/node_modules/pdfjs-dist/types/src/display/editor/drawers/inkdraw.d.ts +0 -129
- package/dist/node_modules/pdfjs-dist/types/src/display/editor/drawers/outline.d.ts +0 -19
- package/dist/node_modules/pdfjs-dist/types/src/display/editor/drawers/signaturedraw.d.ts +0 -79
- package/dist/node_modules/pdfjs-dist/types/src/display/editor/editor.d.ts +0 -578
- package/dist/node_modules/pdfjs-dist/types/src/display/editor/freetext.d.ts +0 -63
- package/dist/node_modules/pdfjs-dist/types/src/display/editor/highlight.d.ts +0 -76
- package/dist/node_modules/pdfjs-dist/types/src/display/editor/ink.d.ts +0 -42
- package/dist/node_modules/pdfjs-dist/types/src/display/editor/signature.d.ts +0 -77
- package/dist/node_modules/pdfjs-dist/types/src/display/editor/stamp.d.ts +0 -49
- package/dist/node_modules/pdfjs-dist/types/src/display/editor/toolbar.d.ts +0 -26
- package/dist/node_modules/pdfjs-dist/types/src/display/editor/tools.d.ts +0 -481
- package/dist/node_modules/pdfjs-dist/types/src/display/fetch_stream.d.ts +0 -7
- package/dist/node_modules/pdfjs-dist/types/src/display/filter_factory.d.ts +0 -29
- package/dist/node_modules/pdfjs-dist/types/src/display/font_loader.d.ts +0 -67
- package/dist/node_modules/pdfjs-dist/types/src/display/metadata.d.ts +0 -10
- package/dist/node_modules/pdfjs-dist/types/src/display/network.d.ts +0 -20
- package/dist/node_modules/pdfjs-dist/types/src/display/network_utils.d.ts +0 -15
- package/dist/node_modules/pdfjs-dist/types/src/display/node_stream.d.ts +0 -5
- package/dist/node_modules/pdfjs-dist/types/src/display/node_utils.d.ts +0 -32
- package/dist/node_modules/pdfjs-dist/types/src/display/optional_content_config.d.ts +0 -18
- package/dist/node_modules/pdfjs-dist/types/src/display/pattern_helper.d.ts +0 -77
- package/dist/node_modules/pdfjs-dist/types/src/display/pdf_objects.d.ts +0 -40
- package/dist/node_modules/pdfjs-dist/types/src/display/standard_fontdata_factory.d.ts +0 -20
- package/dist/node_modules/pdfjs-dist/types/src/display/svg_factory.d.ts +0 -14
- package/dist/node_modules/pdfjs-dist/types/src/display/text_layer.d.ts +0 -85
- package/dist/node_modules/pdfjs-dist/types/src/display/touch_manager.d.ts +0 -18
- package/dist/node_modules/pdfjs-dist/types/src/display/transport_stream.d.ts +0 -10
- package/dist/node_modules/pdfjs-dist/types/src/display/wasm_factory.d.ts +0 -20
- package/dist/node_modules/pdfjs-dist/types/src/display/worker_options.d.ts +0 -25
- package/dist/node_modules/pdfjs-dist/types/src/display/xfa_layer.d.ts +0 -47
- package/dist/node_modules/pdfjs-dist/types/src/display/xfa_text.d.ts +0 -21
- package/dist/node_modules/pdfjs-dist/types/src/pdf.d.ts +0 -64
- package/dist/node_modules/pdfjs-dist/types/src/shared/base_pdf_stream.d.ts +0 -120
- package/dist/node_modules/pdfjs-dist/types/src/shared/image_utils.d.ts +0 -17
- package/dist/node_modules/pdfjs-dist/types/src/shared/message_handler.d.ts +0 -48
- package/dist/node_modules/pdfjs-dist/types/src/shared/murmurhash3.d.ts +0 -7
- package/dist/node_modules/pdfjs-dist/types/src/shared/obj-bin-transform.d.ts +0 -90
- package/dist/node_modules/pdfjs-dist/types/src/shared/scripting_utils.d.ts +0 -18
- package/dist/node_modules/pdfjs-dist/types/src/shared/util.d.ts +0 -420
- package/dist/node_modules/pdfjs-dist/types/web/annotation_editor_layer_builder.d.ts +0 -65
- package/dist/node_modules/pdfjs-dist/types/web/annotation_layer_builder.d.ts +0 -108
- package/dist/node_modules/pdfjs-dist/types/web/app_options.d.ts +0 -16
- package/dist/node_modules/pdfjs-dist/types/web/autolinker.d.ts +0 -29
- package/dist/node_modules/pdfjs-dist/types/web/base_pdf_page_view.d.ts +0 -28
- package/dist/node_modules/pdfjs-dist/types/web/comment_manager.d.ts +0 -20
- package/dist/node_modules/pdfjs-dist/types/web/download_manager.d.ts +0 -13
- package/dist/node_modules/pdfjs-dist/types/web/draw_layer_builder.d.ts +0 -22
- package/dist/node_modules/pdfjs-dist/types/web/event_utils.d.ts +0 -77
- package/dist/node_modules/pdfjs-dist/types/web/generic_scripting.d.ts +0 -8
- package/dist/node_modules/pdfjs-dist/types/web/genericl10n.d.ts +0 -22
- package/dist/node_modules/pdfjs-dist/types/web/interfaces.d.ts +0 -174
- package/dist/node_modules/pdfjs-dist/types/web/l10n.d.ts +0 -34
- package/dist/node_modules/pdfjs-dist/types/web/menu.d.ts +0 -11
- package/dist/node_modules/pdfjs-dist/types/web/pdf_find_controller.d.ts +0 -134
- package/dist/node_modules/pdfjs-dist/types/web/pdf_find_utils.d.ts +0 -16
- package/dist/node_modules/pdfjs-dist/types/web/pdf_history.d.ts +0 -116
- package/dist/node_modules/pdfjs-dist/types/web/pdf_link_service.d.ts +0 -147
- package/dist/node_modules/pdfjs-dist/types/web/pdf_page_detail_view.d.ts +0 -33
- package/dist/node_modules/pdfjs-dist/types/web/pdf_page_view.d.ts +0 -244
- package/dist/node_modules/pdfjs-dist/types/web/pdf_rendering_queue.d.ts +0 -54
- package/dist/node_modules/pdfjs-dist/types/web/pdf_scripting_manager.component.d.ts +0 -5
- package/dist/node_modules/pdfjs-dist/types/web/pdf_scripting_manager.d.ts +0 -57
- package/dist/node_modules/pdfjs-dist/types/web/pdf_single_page_viewer.d.ts +0 -7
- package/dist/node_modules/pdfjs-dist/types/web/pdf_thumbnail_view.d.ts +0 -108
- package/dist/node_modules/pdfjs-dist/types/web/pdf_thumbnail_viewer.d.ts +0 -136
- package/dist/node_modules/pdfjs-dist/types/web/pdf_viewer.component.d.ts +0 -23
- package/dist/node_modules/pdfjs-dist/types/web/pdf_viewer.d.ts +0 -625
- package/dist/node_modules/pdfjs-dist/types/web/sidebar.d.ts +0 -65
- package/dist/node_modules/pdfjs-dist/types/web/struct_tree_layer_builder.d.ts +0 -25
- package/dist/node_modules/pdfjs-dist/types/web/text_accessibility.d.ts +0 -44
- package/dist/node_modules/pdfjs-dist/types/web/text_highlighter.d.ts +0 -63
- package/dist/node_modules/pdfjs-dist/types/web/text_layer_builder.d.ts +0 -65
- package/dist/node_modules/pdfjs-dist/types/web/ui_utils.d.ts +0 -274
- package/dist/node_modules/pdfjs-dist/types/web/xfa_layer_builder.d.ts +0 -50
- package/dist/node_modules/pdfjs-dist/wasm/LICENSE_JBIG2 +0 -196
- package/dist/node_modules/pdfjs-dist/wasm/LICENSE_OPENJPEG +0 -39
- package/dist/node_modules/pdfjs-dist/wasm/LICENSE_PDFJS_JBIG2 +0 -13
- package/dist/node_modules/pdfjs-dist/wasm/LICENSE_PDFJS_OPENJPEG +0 -22
- package/dist/node_modules/pdfjs-dist/wasm/LICENSE_PDFJS_QCMS +0 -22
- package/dist/node_modules/pdfjs-dist/wasm/LICENSE_QCMS +0 -21
- package/dist/node_modules/pdfjs-dist/wasm/jbig2.wasm +0 -0
- package/dist/node_modules/pdfjs-dist/wasm/openjpeg.wasm +0 -0
- package/dist/node_modules/pdfjs-dist/wasm/openjpeg_nowasm_fallback.js +0 -17
- package/dist/node_modules/pdfjs-dist/wasm/qcms_bg.wasm +0 -0
- package/dist/node_modules/pdfjs-dist/web/images/altText_add.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/altText_disclaimer.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/altText_done.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/altText_spinner.svg +0 -30
- package/dist/node_modules/pdfjs-dist/web/images/altText_warning.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/annotation-check.svg +0 -11
- package/dist/node_modules/pdfjs-dist/web/images/annotation-comment.svg +0 -16
- package/dist/node_modules/pdfjs-dist/web/images/annotation-help.svg +0 -26
- package/dist/node_modules/pdfjs-dist/web/images/annotation-insert.svg +0 -10
- package/dist/node_modules/pdfjs-dist/web/images/annotation-key.svg +0 -11
- package/dist/node_modules/pdfjs-dist/web/images/annotation-newparagraph.svg +0 -11
- package/dist/node_modules/pdfjs-dist/web/images/annotation-noicon.svg +0 -7
- package/dist/node_modules/pdfjs-dist/web/images/annotation-note.svg +0 -42
- package/dist/node_modules/pdfjs-dist/web/images/annotation-paperclip.svg +0 -6
- package/dist/node_modules/pdfjs-dist/web/images/annotation-paragraph.svg +0 -16
- package/dist/node_modules/pdfjs-dist/web/images/annotation-pushpin.svg +0 -7
- package/dist/node_modules/pdfjs-dist/web/images/checkmark.svg +0 -5
- package/dist/node_modules/pdfjs-dist/web/images/comment-actionsButton.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/comment-closeButton.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/comment-editButton.svg +0 -8
- package/dist/node_modules/pdfjs-dist/web/images/comment-popup-editButton.svg +0 -5
- package/dist/node_modules/pdfjs-dist/web/images/cursor-editorFreeHighlight.svg +0 -6
- package/dist/node_modules/pdfjs-dist/web/images/cursor-editorFreeText.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/cursor-editorInk.svg +0 -4
- package/dist/node_modules/pdfjs-dist/web/images/cursor-editorTextHighlight.svg +0 -8
- package/dist/node_modules/pdfjs-dist/web/images/editor-toolbar-delete.svg +0 -5
- package/dist/node_modules/pdfjs-dist/web/images/editor-toolbar-edit.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/findbarButton-next.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/findbarButton-previous.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/gv-toolbarButton-download.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/loading.svg +0 -1
- package/dist/node_modules/pdfjs-dist/web/images/messageBar_closingButton.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/messageBar_info.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/messageBar_warning.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/pages_closeButton.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/pages_selected.svg +0 -7
- package/dist/node_modules/pdfjs-dist/web/images/pages_viewArrow.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/pages_viewButton.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/secondaryToolbarButton-documentProperties.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/secondaryToolbarButton-firstPage.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/secondaryToolbarButton-handTool.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/secondaryToolbarButton-lastPage.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/secondaryToolbarButton-rotateCcw.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/secondaryToolbarButton-rotateCw.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/secondaryToolbarButton-scrollHorizontal.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/secondaryToolbarButton-scrollPage.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/secondaryToolbarButton-scrollVertical.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/secondaryToolbarButton-scrollWrapped.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/secondaryToolbarButton-selectTool.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/secondaryToolbarButton-spreadEven.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/secondaryToolbarButton-spreadNone.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/secondaryToolbarButton-spreadOdd.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/toolbarButton-bookmark.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/toolbarButton-currentOutlineItem.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/toolbarButton-download.svg +0 -4
- package/dist/node_modules/pdfjs-dist/web/images/toolbarButton-editorFreeText.svg +0 -5
- package/dist/node_modules/pdfjs-dist/web/images/toolbarButton-editorHighlight.svg +0 -6
- package/dist/node_modules/pdfjs-dist/web/images/toolbarButton-editorInk.svg +0 -4
- package/dist/node_modules/pdfjs-dist/web/images/toolbarButton-editorSignature.svg +0 -6
- package/dist/node_modules/pdfjs-dist/web/images/toolbarButton-editorStamp.svg +0 -8
- package/dist/node_modules/pdfjs-dist/web/images/toolbarButton-menuArrow.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/toolbarButton-openFile.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/toolbarButton-pageDown.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/toolbarButton-pageUp.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/toolbarButton-presentationMode.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/toolbarButton-print.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/toolbarButton-search.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/toolbarButton-secondaryToolbarToggle.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/toolbarButton-viewAttachments.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/toolbarButton-viewLayers.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/toolbarButton-viewOutline.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/toolbarButton-viewThumbnail.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/toolbarButton-viewsManagerToggle.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/toolbarButton-zoomIn.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/toolbarButton-zoomOut.svg +0 -3
- package/dist/node_modules/pdfjs-dist/web/images/treeitem-collapsed.svg +0 -1
- package/dist/node_modules/pdfjs-dist/web/images/treeitem-expanded.svg +0 -1
- package/dist/node_modules/pdfjs-dist/web/pdf_viewer.css +0 -6989
- package/dist/node_modules/pdfjs-dist/web/pdf_viewer.d.mts +0 -1
- package/dist/shared/locale.d.ts +0 -9
- package/dist/shared/locale.js +0 -36
- package/dist/shared/previewer/filePreviewTypes.js +0 -751
- /package/dist/{shared → client-v2}/previewer/filePreviewTypes.d.ts +0 -0
|
@@ -1,751 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
var __create = Object.create;
|
|
11
|
-
var __defProp = Object.defineProperty;
|
|
12
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
15
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
-
var __export = (target, all) => {
|
|
17
|
-
for (var name in all)
|
|
18
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
19
|
-
};
|
|
20
|
-
var __copyProps = (to, from, except, desc) => {
|
|
21
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
22
|
-
for (let key of __getOwnPropNames(from))
|
|
23
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
24
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
25
|
-
}
|
|
26
|
-
return to;
|
|
27
|
-
};
|
|
28
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
29
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
30
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
31
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
32
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
33
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
34
|
-
mod
|
|
35
|
-
));
|
|
36
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
37
|
-
var filePreviewTypes_exports = {};
|
|
38
|
-
__export(filePreviewTypes_exports, {
|
|
39
|
-
FilePreviewRenderer: () => FilePreviewRenderer,
|
|
40
|
-
FilePreviewTypes: () => FilePreviewTypes,
|
|
41
|
-
filePreviewTypes: () => filePreviewTypes,
|
|
42
|
-
getDownloadFileName: () => getDownloadFileName,
|
|
43
|
-
getFallbackIcon: () => getFallbackIcon,
|
|
44
|
-
getFileExt: () => getFileExt,
|
|
45
|
-
getFileName: () => getFileName,
|
|
46
|
-
getFileUrl: () => getFileUrl,
|
|
47
|
-
getPdfPreviewErrorCode: () => getPdfPreviewErrorCode,
|
|
48
|
-
getPreviewFileUrl: () => getPreviewFileUrl,
|
|
49
|
-
getPreviewThumbnailUrl: () => getPreviewThumbnailUrl,
|
|
50
|
-
isActiveContentFile: () => isActiveContentFile,
|
|
51
|
-
isPdfFile: () => isPdfFile,
|
|
52
|
-
matchMimetype: () => matchMimetype,
|
|
53
|
-
normalizePreviewFile: () => normalizePreviewFile,
|
|
54
|
-
wrapWithModalPreviewer: () => wrapWithModalPreviewer
|
|
55
|
-
});
|
|
56
|
-
module.exports = __toCommonJS(filePreviewTypes_exports);
|
|
57
|
-
var import_react = __toESM(require("react"));
|
|
58
|
-
var import_icons = require("@ant-design/icons");
|
|
59
|
-
var import_antd = require("antd");
|
|
60
|
-
var import_mime_match = __toESM(require("mime-match"));
|
|
61
|
-
var import_react_i18next = require("react-i18next");
|
|
62
|
-
var import_locale = require("../locale");
|
|
63
|
-
const import_meta = {};
|
|
64
|
-
class FilePreviewTypes {
|
|
65
|
-
types = [];
|
|
66
|
-
add(type) {
|
|
67
|
-
this.types.unshift(type);
|
|
68
|
-
}
|
|
69
|
-
getTypeByFile(file) {
|
|
70
|
-
const normalized = normalizePreviewFile(file);
|
|
71
|
-
return this.types.find((type) => type.match(normalized));
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
const filePreviewTypes = new FilePreviewTypes();
|
|
75
|
-
function normalizePreviewFile(file) {
|
|
76
|
-
if (!file) {
|
|
77
|
-
return file;
|
|
78
|
-
}
|
|
79
|
-
if (typeof file === "string") {
|
|
80
|
-
return { url: file };
|
|
81
|
-
}
|
|
82
|
-
return file;
|
|
83
|
-
}
|
|
84
|
-
function getPreviewFileUrl(file) {
|
|
85
|
-
if (!file) {
|
|
86
|
-
return "";
|
|
87
|
-
}
|
|
88
|
-
if (typeof file === "string") {
|
|
89
|
-
return file;
|
|
90
|
-
}
|
|
91
|
-
return file.preview || file.url || "";
|
|
92
|
-
}
|
|
93
|
-
function getFileUrl(file) {
|
|
94
|
-
if (!file) {
|
|
95
|
-
return "";
|
|
96
|
-
}
|
|
97
|
-
if (typeof file === "string") {
|
|
98
|
-
return file;
|
|
99
|
-
}
|
|
100
|
-
return file.url || file.preview || "";
|
|
101
|
-
}
|
|
102
|
-
const FALLBACK_ICON_MAP = {
|
|
103
|
-
pdf: "/file-placeholder/pdf-200-200.png",
|
|
104
|
-
mp4: "/file-placeholder/video-200-200.png",
|
|
105
|
-
mov: "/file-placeholder/video-200-200.png",
|
|
106
|
-
avi: "/file-placeholder/video-200-200.png",
|
|
107
|
-
wmv: "/file-placeholder/video-200-200.png",
|
|
108
|
-
flv: "/file-placeholder/video-200-200.png",
|
|
109
|
-
mkv: "/file-placeholder/video-200-200.png",
|
|
110
|
-
mp3: "/file-placeholder/audio-200-200.png",
|
|
111
|
-
wav: "/file-placeholder/audio-200-200.png",
|
|
112
|
-
aac: "/file-placeholder/audio-200-200.png",
|
|
113
|
-
ogg: "/file-placeholder/audio-200-200.png",
|
|
114
|
-
doc: "/file-placeholder/docx-200-200.png",
|
|
115
|
-
docx: "/file-placeholder/docx-200-200.png",
|
|
116
|
-
odt: "/file-placeholder/docx-200-200.png",
|
|
117
|
-
xls: "/file-placeholder/xlsx-200-200.png",
|
|
118
|
-
xlsx: "/file-placeholder/xlsx-200-200.png",
|
|
119
|
-
csv: "/file-placeholder/xlsx-200-200.png",
|
|
120
|
-
ppt: "/file-placeholder/pptx-200-200.png",
|
|
121
|
-
pptx: "/file-placeholder/pptx-200-200.png",
|
|
122
|
-
jpg: "/file-placeholder/jpeg-200-200.png",
|
|
123
|
-
jpeg: "/file-placeholder/jpeg-200-200.png",
|
|
124
|
-
png: "/file-placeholder/png-200-200.png",
|
|
125
|
-
gif: "/file-placeholder/gif-200-200.png",
|
|
126
|
-
webp: "/file-placeholder/png-200-200.png",
|
|
127
|
-
bmp: "/file-placeholder/png-200-200.png",
|
|
128
|
-
svg: "/file-placeholder/svg-200-200.png",
|
|
129
|
-
default: "/file-placeholder/unknown-200-200.png"
|
|
130
|
-
};
|
|
131
|
-
const ACTIVE_CONTENT_MIMETYPES = /* @__PURE__ */ new Set(["application/pdf", "application/xhtml+xml", "image/svg+xml", "text/html"]);
|
|
132
|
-
const ACTIVE_CONTENT_EXTENSIONS = /* @__PURE__ */ new Set(["htm", "html", "pdf", "svg", "svgz", "xhtml"]);
|
|
133
|
-
const stripQueryAndHash = (url) => url.split("?")[0].split("#")[0];
|
|
134
|
-
const getExtFromName = (value) => {
|
|
135
|
-
if (!value) {
|
|
136
|
-
return "";
|
|
137
|
-
}
|
|
138
|
-
const clean = stripQueryAndHash(value);
|
|
139
|
-
const index = clean.lastIndexOf(".");
|
|
140
|
-
return index !== -1 ? clean.slice(index + 1).toLowerCase() : "";
|
|
141
|
-
};
|
|
142
|
-
const EXT_MIMETYPE_MAP = {
|
|
143
|
-
aac: "audio/aac",
|
|
144
|
-
avi: "video/x-msvideo",
|
|
145
|
-
bmp: "image/bmp",
|
|
146
|
-
csv: "text/csv",
|
|
147
|
-
doc: "application/msword",
|
|
148
|
-
docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
149
|
-
flv: "video/x-flv",
|
|
150
|
-
gif: "image/gif",
|
|
151
|
-
jpeg: "image/jpeg",
|
|
152
|
-
jpg: "image/jpeg",
|
|
153
|
-
json: "application/json",
|
|
154
|
-
mkv: "video/x-matroska",
|
|
155
|
-
mov: "video/quicktime",
|
|
156
|
-
mp3: "audio/mpeg",
|
|
157
|
-
mp4: "video/mp4",
|
|
158
|
-
odt: "application/vnd.oasis.opendocument.text",
|
|
159
|
-
ogg: "audio/ogg",
|
|
160
|
-
pdf: "application/pdf",
|
|
161
|
-
png: "image/png",
|
|
162
|
-
ppt: "application/vnd.ms-powerpoint",
|
|
163
|
-
pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
164
|
-
svg: "image/svg+xml",
|
|
165
|
-
txt: "text/plain",
|
|
166
|
-
wav: "audio/wav",
|
|
167
|
-
webp: "image/webp",
|
|
168
|
-
wmv: "video/x-ms-wmv",
|
|
169
|
-
xls: "application/vnd.ms-excel",
|
|
170
|
-
xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
171
|
-
};
|
|
172
|
-
function matchMimetype(file, type) {
|
|
173
|
-
if (!file) {
|
|
174
|
-
return false;
|
|
175
|
-
}
|
|
176
|
-
if (file.originFileObj) {
|
|
177
|
-
return (0, import_mime_match.default)(file.type, type);
|
|
178
|
-
}
|
|
179
|
-
if (file.mimetype) {
|
|
180
|
-
return (0, import_mime_match.default)(file.mimetype, type);
|
|
181
|
-
}
|
|
182
|
-
if (file.url) {
|
|
183
|
-
return (0, import_mime_match.default)(EXT_MIMETYPE_MAP[getExtFromName(file.url)] || "", type);
|
|
184
|
-
}
|
|
185
|
-
return false;
|
|
186
|
-
}
|
|
187
|
-
const getNameFromUrl = (url) => {
|
|
188
|
-
if (!url) {
|
|
189
|
-
return "";
|
|
190
|
-
}
|
|
191
|
-
const clean = stripQueryAndHash(url);
|
|
192
|
-
const index = clean.lastIndexOf("/");
|
|
193
|
-
const name = index !== -1 ? clean.slice(index + 1) : clean;
|
|
194
|
-
try {
|
|
195
|
-
return decodeURIComponent(name);
|
|
196
|
-
} catch (error) {
|
|
197
|
-
return name;
|
|
198
|
-
}
|
|
199
|
-
};
|
|
200
|
-
const getFileExt = (file, url) => {
|
|
201
|
-
if (file && typeof file === "object") {
|
|
202
|
-
if (file.extname) {
|
|
203
|
-
return String(file.extname).replace(/^\./, "").toLowerCase();
|
|
204
|
-
}
|
|
205
|
-
const nameExt = getExtFromName(file.name || file.filename || file.title);
|
|
206
|
-
if (nameExt) {
|
|
207
|
-
return nameExt;
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
return getExtFromName(url);
|
|
211
|
-
};
|
|
212
|
-
const isActiveContentFile = (file, url) => {
|
|
213
|
-
const mimetype = (file == null ? void 0 : file.mimetype) || (file == null ? void 0 : file.type);
|
|
214
|
-
if (typeof mimetype === "string" && ACTIVE_CONTENT_MIMETYPES.has(mimetype.toLowerCase())) {
|
|
215
|
-
return true;
|
|
216
|
-
}
|
|
217
|
-
const ext = getFileExt(file, url);
|
|
218
|
-
return ACTIVE_CONTENT_EXTENSIONS.has(ext);
|
|
219
|
-
};
|
|
220
|
-
const isPdfFile = (file, url) => {
|
|
221
|
-
const mimetype = (file == null ? void 0 : file.mimetype) || (file == null ? void 0 : file.type);
|
|
222
|
-
if (typeof mimetype === "string" && mimetype.toLowerCase() === "application/pdf") {
|
|
223
|
-
return true;
|
|
224
|
-
}
|
|
225
|
-
return getFileExt(file, url) === "pdf";
|
|
226
|
-
};
|
|
227
|
-
const getFileName = (file, url) => {
|
|
228
|
-
const nameFromUrl = getNameFromUrl(url || getFileUrl(file));
|
|
229
|
-
if (!file || typeof file === "string") {
|
|
230
|
-
return nameFromUrl;
|
|
231
|
-
}
|
|
232
|
-
return file.name || file.filename || file.title || nameFromUrl;
|
|
233
|
-
};
|
|
234
|
-
const getDownloadFileName = (file, url) => {
|
|
235
|
-
const resolvedUrl = url || getFileUrl(file);
|
|
236
|
-
let filename = getFileName(file, resolvedUrl);
|
|
237
|
-
const ext = getFileExt(file, resolvedUrl);
|
|
238
|
-
if (filename && ext && !filename.toLowerCase().endsWith(`.${ext}`)) {
|
|
239
|
-
filename = `${filename}.${ext}`;
|
|
240
|
-
}
|
|
241
|
-
return `${Date.now()}_${filename || "file"}`;
|
|
242
|
-
};
|
|
243
|
-
const getFallbackIcon = (file, url) => {
|
|
244
|
-
const ext = getFileExt(file, url);
|
|
245
|
-
return FALLBACK_ICON_MAP[ext] || FALLBACK_ICON_MAP.default;
|
|
246
|
-
};
|
|
247
|
-
const getPreviewThumbnailUrl = (file) => {
|
|
248
|
-
const previewFile = normalizePreviewFile(file);
|
|
249
|
-
const src = getPreviewFileUrl(previewFile);
|
|
250
|
-
if (isActiveContentFile(previewFile, src)) {
|
|
251
|
-
return getFallbackIcon(previewFile, src);
|
|
252
|
-
}
|
|
253
|
-
const { getThumbnailURL } = filePreviewTypes.getTypeByFile(previewFile) ?? {};
|
|
254
|
-
const thumbnail = getThumbnailURL == null ? void 0 : getThumbnailURL(previewFile);
|
|
255
|
-
if (thumbnail) {
|
|
256
|
-
return thumbnail;
|
|
257
|
-
}
|
|
258
|
-
if (matchMimetype(previewFile, "image/*")) {
|
|
259
|
-
return "";
|
|
260
|
-
}
|
|
261
|
-
return getFallbackIcon(previewFile, src);
|
|
262
|
-
};
|
|
263
|
-
const renderModalFooter = (props) => {
|
|
264
|
-
const { index, list, onSwitchIndex, onDownload, file } = props;
|
|
265
|
-
const canPrev = typeof index === "number" && !!onSwitchIndex && index > 0;
|
|
266
|
-
const canNext = typeof index === "number" && !!onSwitchIndex && index < list.length - 1;
|
|
267
|
-
return /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { size: 14, style: { fontSize: "20px" } }, /* @__PURE__ */ import_react.default.createElement(
|
|
268
|
-
import_icons.LeftOutlined,
|
|
269
|
-
{
|
|
270
|
-
style: { cursor: canPrev ? "pointer" : "not-allowed" },
|
|
271
|
-
disabled: !canPrev,
|
|
272
|
-
onClick: () => canPrev && (onSwitchIndex == null ? void 0 : onSwitchIndex(index - 1))
|
|
273
|
-
}
|
|
274
|
-
), /* @__PURE__ */ import_react.default.createElement(
|
|
275
|
-
import_icons.RightOutlined,
|
|
276
|
-
{
|
|
277
|
-
style: { cursor: canNext ? "pointer" : "not-allowed" },
|
|
278
|
-
disabled: !canNext,
|
|
279
|
-
onClick: () => canNext && (onSwitchIndex == null ? void 0 : onSwitchIndex(index + 1))
|
|
280
|
-
}
|
|
281
|
-
), /* @__PURE__ */ import_react.default.createElement(import_icons.DownloadOutlined, { onClick: () => onDownload(file) }));
|
|
282
|
-
};
|
|
283
|
-
const wrapWithModalPreviewer = (Previewer) => {
|
|
284
|
-
return function WrappedPreviewer(props) {
|
|
285
|
-
const { open, onOpenChange, onClose, file } = props;
|
|
286
|
-
if (typeof open !== "boolean") {
|
|
287
|
-
return /* @__PURE__ */ import_react.default.createElement(Previewer, { ...props });
|
|
288
|
-
}
|
|
289
|
-
const title = getFileName(file, getFileUrl(file));
|
|
290
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
291
|
-
import_antd.Modal,
|
|
292
|
-
{
|
|
293
|
-
open,
|
|
294
|
-
title,
|
|
295
|
-
onCancel: () => {
|
|
296
|
-
onOpenChange == null ? void 0 : onOpenChange(false);
|
|
297
|
-
onClose == null ? void 0 : onClose();
|
|
298
|
-
},
|
|
299
|
-
footer: renderModalFooter(props),
|
|
300
|
-
width: "90vw",
|
|
301
|
-
centered: true
|
|
302
|
-
},
|
|
303
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
304
|
-
"div",
|
|
305
|
-
{
|
|
306
|
-
style: {
|
|
307
|
-
maxWidth: "100%",
|
|
308
|
-
maxHeight: "calc(100vh - 256px)",
|
|
309
|
-
height: "80vh",
|
|
310
|
-
width: "100%",
|
|
311
|
-
background: "white",
|
|
312
|
-
display: "flex",
|
|
313
|
-
flexDirection: "column",
|
|
314
|
-
justifyContent: "center",
|
|
315
|
-
alignItems: "center",
|
|
316
|
-
overflowY: "auto"
|
|
317
|
-
}
|
|
318
|
-
},
|
|
319
|
-
/* @__PURE__ */ import_react.default.createElement(Previewer, { ...props })
|
|
320
|
-
)
|
|
321
|
-
);
|
|
322
|
-
};
|
|
323
|
-
};
|
|
324
|
-
const ImagePreviewer = (props) => {
|
|
325
|
-
const { file, list, index, open, onOpenChange, onSwitchIndex, onClose, onDownload } = props;
|
|
326
|
-
if (typeof open !== "boolean") {
|
|
327
|
-
return null;
|
|
328
|
-
}
|
|
329
|
-
const src = getFileUrl(file);
|
|
330
|
-
if (!src) {
|
|
331
|
-
return null;
|
|
332
|
-
}
|
|
333
|
-
const canPrev = typeof index === "number" && index > 0;
|
|
334
|
-
const canNext = typeof index === "number" && index < list.length - 1;
|
|
335
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
336
|
-
import_antd.Image,
|
|
337
|
-
{
|
|
338
|
-
wrapperStyle: { display: "none" },
|
|
339
|
-
preview: {
|
|
340
|
-
visible: open,
|
|
341
|
-
onVisibleChange: (visible) => onOpenChange == null ? void 0 : onOpenChange(visible),
|
|
342
|
-
afterOpenChange: (visible) => {
|
|
343
|
-
if (!visible) {
|
|
344
|
-
onClose == null ? void 0 : onClose();
|
|
345
|
-
}
|
|
346
|
-
},
|
|
347
|
-
toolbarRender: (_, {
|
|
348
|
-
transform: { scale },
|
|
349
|
-
actions: { onFlipY, onFlipX, onRotateLeft, onRotateRight, onZoomOut, onZoomIn, onReset }
|
|
350
|
-
}) => /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { size: 14, className: "toolbar-wrapper", style: { fontSize: "20px" } }, /* @__PURE__ */ import_react.default.createElement(
|
|
351
|
-
import_icons.LeftOutlined,
|
|
352
|
-
{
|
|
353
|
-
style: { cursor: canPrev ? "pointer" : "not-allowed" },
|
|
354
|
-
disabled: !canPrev,
|
|
355
|
-
onClick: () => canPrev && (onSwitchIndex == null ? void 0 : onSwitchIndex(index - 1))
|
|
356
|
-
}
|
|
357
|
-
), /* @__PURE__ */ import_react.default.createElement(
|
|
358
|
-
import_icons.RightOutlined,
|
|
359
|
-
{
|
|
360
|
-
style: { cursor: canNext ? "pointer" : "not-allowed" },
|
|
361
|
-
disabled: !canNext,
|
|
362
|
-
onClick: () => canNext && (onSwitchIndex == null ? void 0 : onSwitchIndex(index + 1))
|
|
363
|
-
}
|
|
364
|
-
), onDownload ? /* @__PURE__ */ import_react.default.createElement(import_icons.DownloadOutlined, { onClick: () => onDownload(file) }) : null, /* @__PURE__ */ import_react.default.createElement(import_icons.SwapOutlined, { rotate: 90, onClick: onFlipY }), /* @__PURE__ */ import_react.default.createElement(import_icons.SwapOutlined, { onClick: onFlipX }), /* @__PURE__ */ import_react.default.createElement(import_icons.RotateLeftOutlined, { onClick: onRotateLeft }), /* @__PURE__ */ import_react.default.createElement(import_icons.RotateRightOutlined, { onClick: onRotateRight }), /* @__PURE__ */ import_react.default.createElement(import_icons.ZoomOutOutlined, { disabled: scale === 1, onClick: onZoomOut }), /* @__PURE__ */ import_react.default.createElement(import_icons.ZoomInOutlined, { disabled: scale === 50, onClick: onZoomIn }), /* @__PURE__ */ import_react.default.createElement(import_icons.UndoOutlined, { onClick: onReset }))
|
|
365
|
-
},
|
|
366
|
-
src
|
|
367
|
-
}
|
|
368
|
-
);
|
|
369
|
-
};
|
|
370
|
-
const IframePreviewer = ({ file }) => {
|
|
371
|
-
const src = getFileUrl(file);
|
|
372
|
-
if (!src) {
|
|
373
|
-
return null;
|
|
374
|
-
}
|
|
375
|
-
return /* @__PURE__ */ import_react.default.createElement("iframe", { src, width: "100%", height: "100%", style: { border: "none" } });
|
|
376
|
-
};
|
|
377
|
-
let pdfjsPromise = null;
|
|
378
|
-
class PdfPreviewError extends Error {
|
|
379
|
-
code;
|
|
380
|
-
cause;
|
|
381
|
-
constructor(code, message, cause) {
|
|
382
|
-
super(message);
|
|
383
|
-
this.name = "PdfPreviewError";
|
|
384
|
-
this.code = code;
|
|
385
|
-
this.cause = cause;
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
const getPdfPreviewErrorCode = (error) => {
|
|
389
|
-
if (error instanceof PdfPreviewError) {
|
|
390
|
-
return error.code;
|
|
391
|
-
}
|
|
392
|
-
return "document";
|
|
393
|
-
};
|
|
394
|
-
const loadPdfJs = async () => {
|
|
395
|
-
if (!pdfjsPromise) {
|
|
396
|
-
pdfjsPromise = import("pdfjs-dist/build/pdf.mjs");
|
|
397
|
-
}
|
|
398
|
-
return pdfjsPromise;
|
|
399
|
-
};
|
|
400
|
-
const PDF_SCALE = 1.4;
|
|
401
|
-
const PDF_PREVIEW_ERROR_MESSAGES = {
|
|
402
|
-
resources: "PDF preview resources failed to load. Please refresh the page and check whether plugin static files are deployed correctly.",
|
|
403
|
-
file: "PDF preview failed to load the file. If the file is stored on another domain, configure CORS for the external storage to allow this site to read the file.",
|
|
404
|
-
document: "PDF preview failed. Please download the file to preview it."
|
|
405
|
-
};
|
|
406
|
-
const PdfPreviewer = ({ file }) => {
|
|
407
|
-
const { t } = (0, import_react_i18next.useTranslation)(import_locale.NAMESPACE);
|
|
408
|
-
const src = getFileUrl(file);
|
|
409
|
-
const pageElsRef = import_react.default.useRef(/* @__PURE__ */ new Map());
|
|
410
|
-
const sessionRef = import_react.default.useRef(null);
|
|
411
|
-
const [meta, setMeta] = import_react.default.useState(null);
|
|
412
|
-
const [errorCode, setErrorCode] = import_react.default.useState(null);
|
|
413
|
-
import_react.default.useEffect(() => {
|
|
414
|
-
if (!src) {
|
|
415
|
-
return;
|
|
416
|
-
}
|
|
417
|
-
const session = {
|
|
418
|
-
cancelled: false,
|
|
419
|
-
abortController: new AbortController(),
|
|
420
|
-
rendered: /* @__PURE__ */ new Set(),
|
|
421
|
-
inFlight: /* @__PURE__ */ new Set(),
|
|
422
|
-
loadingTasks: [],
|
|
423
|
-
renderTasks: []
|
|
424
|
-
};
|
|
425
|
-
sessionRef.current = session;
|
|
426
|
-
setMeta(null);
|
|
427
|
-
setErrorCode(null);
|
|
428
|
-
const init = async () => {
|
|
429
|
-
let pdfjs;
|
|
430
|
-
try {
|
|
431
|
-
pdfjs = await loadPdfJs();
|
|
432
|
-
} catch (error) {
|
|
433
|
-
throw new PdfPreviewError("resources", "Failed to load PDF.js resources.", error);
|
|
434
|
-
}
|
|
435
|
-
if (session.cancelled) {
|
|
436
|
-
return;
|
|
437
|
-
}
|
|
438
|
-
session.pdfjs = pdfjs;
|
|
439
|
-
let url;
|
|
440
|
-
try {
|
|
441
|
-
url = new URL(src, location.href);
|
|
442
|
-
} catch (error) {
|
|
443
|
-
throw new PdfPreviewError("file", "Invalid PDF file URL.", error);
|
|
444
|
-
}
|
|
445
|
-
let response;
|
|
446
|
-
try {
|
|
447
|
-
response = await fetch(url, {
|
|
448
|
-
credentials: url.origin === location.origin ? "include" : "omit",
|
|
449
|
-
signal: session.abortController.signal
|
|
450
|
-
});
|
|
451
|
-
} catch (error) {
|
|
452
|
-
throw new PdfPreviewError("file", "Failed to fetch PDF file.", error);
|
|
453
|
-
}
|
|
454
|
-
if (!response.ok) {
|
|
455
|
-
throw new PdfPreviewError("file", `Failed to fetch PDF file: ${response.status}`);
|
|
456
|
-
}
|
|
457
|
-
let data;
|
|
458
|
-
try {
|
|
459
|
-
data = new Uint8Array(await response.arrayBuffer());
|
|
460
|
-
} catch (error) {
|
|
461
|
-
throw new PdfPreviewError("file", "Failed to read PDF file response.", error);
|
|
462
|
-
}
|
|
463
|
-
if (session.cancelled) {
|
|
464
|
-
return;
|
|
465
|
-
}
|
|
466
|
-
session.data = data;
|
|
467
|
-
try {
|
|
468
|
-
pdfjs.GlobalWorkerOptions.workerSrc = new URL(
|
|
469
|
-
"pdfjs-dist/build/pdf.worker.min.mjs",
|
|
470
|
-
import_meta.url
|
|
471
|
-
).toString();
|
|
472
|
-
session.worker = pdfjs.PDFWorker.create({});
|
|
473
|
-
} catch (error) {
|
|
474
|
-
throw new PdfPreviewError("resources", "Failed to load PDF.js worker.", error);
|
|
475
|
-
}
|
|
476
|
-
const metaTask = pdfjs.getDocument({
|
|
477
|
-
data: data.slice(0),
|
|
478
|
-
isEvalSupported: false,
|
|
479
|
-
enableXfa: false,
|
|
480
|
-
useWasm: false,
|
|
481
|
-
worker: session.worker
|
|
482
|
-
});
|
|
483
|
-
session.loadingTasks.push(metaTask);
|
|
484
|
-
let metaPdf;
|
|
485
|
-
try {
|
|
486
|
-
metaPdf = await metaTask.promise;
|
|
487
|
-
} catch (error) {
|
|
488
|
-
throw new PdfPreviewError("document", "Failed to parse PDF file.", error);
|
|
489
|
-
}
|
|
490
|
-
if (session.cancelled) {
|
|
491
|
-
return;
|
|
492
|
-
}
|
|
493
|
-
session.metaPdf = metaPdf;
|
|
494
|
-
const viewport = (await metaPdf.getPage(1)).getViewport({ scale: PDF_SCALE });
|
|
495
|
-
if (session.cancelled) {
|
|
496
|
-
return;
|
|
497
|
-
}
|
|
498
|
-
setMeta({ numPages: metaPdf.numPages, width: viewport.width, height: viewport.height });
|
|
499
|
-
};
|
|
500
|
-
init().catch((error) => {
|
|
501
|
-
if (!session.cancelled) {
|
|
502
|
-
const code = getPdfPreviewErrorCode(error);
|
|
503
|
-
console.warn("[file-manager] PDF preview failed", {
|
|
504
|
-
code,
|
|
505
|
-
src,
|
|
506
|
-
error
|
|
507
|
-
});
|
|
508
|
-
setErrorCode(code);
|
|
509
|
-
}
|
|
510
|
-
});
|
|
511
|
-
return () => {
|
|
512
|
-
var _a, _b, _c;
|
|
513
|
-
session.cancelled = true;
|
|
514
|
-
session.abortController.abort();
|
|
515
|
-
(_a = session.observer) == null ? void 0 : _a.disconnect();
|
|
516
|
-
session.renderTasks.forEach((task) => {
|
|
517
|
-
var _a2;
|
|
518
|
-
return (_a2 = task.cancel) == null ? void 0 : _a2.call(task);
|
|
519
|
-
});
|
|
520
|
-
session.loadingTasks.forEach((task) => {
|
|
521
|
-
var _a2;
|
|
522
|
-
return (_a2 = task.destroy) == null ? void 0 : _a2.call(task);
|
|
523
|
-
});
|
|
524
|
-
(_c = (_b = session.worker) == null ? void 0 : _b.destroy) == null ? void 0 : _c.call(_b);
|
|
525
|
-
};
|
|
526
|
-
}, [src]);
|
|
527
|
-
import_react.default.useEffect(() => {
|
|
528
|
-
const session = sessionRef.current;
|
|
529
|
-
if (!meta || !(session == null ? void 0 : session.pdfjs) || !session.metaPdf) {
|
|
530
|
-
return;
|
|
531
|
-
}
|
|
532
|
-
const { pdfjs, metaPdf } = session;
|
|
533
|
-
const renderPage = async (pageNumber) => {
|
|
534
|
-
var _a;
|
|
535
|
-
if (session.cancelled || session.rendered.has(pageNumber) || session.inFlight.has(pageNumber)) {
|
|
536
|
-
return;
|
|
537
|
-
}
|
|
538
|
-
const wrapper = pageElsRef.current.get(pageNumber);
|
|
539
|
-
if (!wrapper) {
|
|
540
|
-
return;
|
|
541
|
-
}
|
|
542
|
-
session.inFlight.add(pageNumber);
|
|
543
|
-
let task;
|
|
544
|
-
try {
|
|
545
|
-
let pdf;
|
|
546
|
-
if (pageNumber === 1 || !session.data) {
|
|
547
|
-
pdf = metaPdf;
|
|
548
|
-
} else {
|
|
549
|
-
task = pdfjs.getDocument({
|
|
550
|
-
data: session.data.slice(0),
|
|
551
|
-
isEvalSupported: false,
|
|
552
|
-
enableXfa: false,
|
|
553
|
-
useWasm: false,
|
|
554
|
-
worker: session.worker
|
|
555
|
-
});
|
|
556
|
-
session.loadingTasks.push(task);
|
|
557
|
-
pdf = await task.promise;
|
|
558
|
-
}
|
|
559
|
-
if (session.cancelled) {
|
|
560
|
-
return;
|
|
561
|
-
}
|
|
562
|
-
const page = await pdf.getPage(pageNumber);
|
|
563
|
-
const viewport = page.getViewport({ scale: PDF_SCALE });
|
|
564
|
-
const context = document.createElement("canvas").getContext("2d");
|
|
565
|
-
if (!context) {
|
|
566
|
-
return;
|
|
567
|
-
}
|
|
568
|
-
const canvas = context.canvas;
|
|
569
|
-
canvas.width = viewport.width;
|
|
570
|
-
canvas.height = viewport.height;
|
|
571
|
-
canvas.style.display = "block";
|
|
572
|
-
canvas.style.width = "100%";
|
|
573
|
-
canvas.style.height = "auto";
|
|
574
|
-
wrapper.style.aspectRatio = "";
|
|
575
|
-
wrapper.replaceChildren(canvas);
|
|
576
|
-
const renderTask = page.render({
|
|
577
|
-
canvas,
|
|
578
|
-
canvasContext: context,
|
|
579
|
-
viewport,
|
|
580
|
-
annotationMode: pdfjs.AnnotationMode.DISABLE
|
|
581
|
-
});
|
|
582
|
-
session.renderTasks.push(renderTask);
|
|
583
|
-
await renderTask.promise;
|
|
584
|
-
if (session.cancelled) {
|
|
585
|
-
return;
|
|
586
|
-
}
|
|
587
|
-
session.rendered.add(pageNumber);
|
|
588
|
-
(_a = session.observer) == null ? void 0 : _a.unobserve(wrapper);
|
|
589
|
-
} catch (renderError) {
|
|
590
|
-
if (!session.cancelled) {
|
|
591
|
-
console.warn("[file-manager] PDF page render failed", {
|
|
592
|
-
pageNumber,
|
|
593
|
-
src,
|
|
594
|
-
error: renderError
|
|
595
|
-
});
|
|
596
|
-
}
|
|
597
|
-
} finally {
|
|
598
|
-
task == null ? void 0 : task.destroy();
|
|
599
|
-
session.inFlight.delete(pageNumber);
|
|
600
|
-
}
|
|
601
|
-
};
|
|
602
|
-
const observer = new IntersectionObserver(
|
|
603
|
-
(entries) => {
|
|
604
|
-
for (const entry of entries) {
|
|
605
|
-
if (entry.isIntersecting) {
|
|
606
|
-
renderPage(Number(entry.target.dataset.page));
|
|
607
|
-
}
|
|
608
|
-
}
|
|
609
|
-
},
|
|
610
|
-
{ rootMargin: "300px 0px" }
|
|
611
|
-
);
|
|
612
|
-
session.observer = observer;
|
|
613
|
-
pageElsRef.current.forEach((el) => observer.observe(el));
|
|
614
|
-
return () => {
|
|
615
|
-
observer.disconnect();
|
|
616
|
-
if (session.observer === observer) {
|
|
617
|
-
session.observer = void 0;
|
|
618
|
-
}
|
|
619
|
-
};
|
|
620
|
-
}, [meta, src]);
|
|
621
|
-
if (!src) {
|
|
622
|
-
return null;
|
|
623
|
-
}
|
|
624
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { style: { width: "100%", minHeight: "100%", padding: 16 } }, errorCode ? /* @__PURE__ */ import_react.default.createElement(import_antd.Alert, { type: "warning", showIcon: true, message: t(PDF_PREVIEW_ERROR_MESSAGES[errorCode]) }) : null, !meta && !errorCode ? /* @__PURE__ */ import_react.default.createElement("div", { style: { display: "flex", justifyContent: "center", padding: 48 } }, /* @__PURE__ */ import_react.default.createElement(import_antd.Spin, null)) : null, meta ? Array.from({ length: meta.numPages }, (_, index) => index + 1).map((pageNumber) => /* @__PURE__ */ import_react.default.createElement(
|
|
625
|
-
"div",
|
|
626
|
-
{
|
|
627
|
-
key: pageNumber,
|
|
628
|
-
"data-page": pageNumber,
|
|
629
|
-
ref: (el) => {
|
|
630
|
-
if (el) {
|
|
631
|
-
pageElsRef.current.set(pageNumber, el);
|
|
632
|
-
} else {
|
|
633
|
-
pageElsRef.current.delete(pageNumber);
|
|
634
|
-
}
|
|
635
|
-
},
|
|
636
|
-
style: {
|
|
637
|
-
width: "100%",
|
|
638
|
-
maxWidth: meta.width,
|
|
639
|
-
margin: "0 auto 16px",
|
|
640
|
-
aspectRatio: `${meta.width} / ${meta.height}`,
|
|
641
|
-
background: "#fff",
|
|
642
|
-
border: "1px solid #f0f0f0"
|
|
643
|
-
}
|
|
644
|
-
}
|
|
645
|
-
)) : null);
|
|
646
|
-
};
|
|
647
|
-
const AudioPreviewer = ({ file }) => {
|
|
648
|
-
const { t } = (0, import_react_i18next.useTranslation)();
|
|
649
|
-
const src = getFileUrl(file);
|
|
650
|
-
if (!src) {
|
|
651
|
-
return null;
|
|
652
|
-
}
|
|
653
|
-
return /* @__PURE__ */ import_react.default.createElement("audio", { controls: true }, /* @__PURE__ */ import_react.default.createElement("source", { src, type: (file == null ? void 0 : file.type) || (file == null ? void 0 : file.mimetype) }), t("Your browser does not support the audio tag."));
|
|
654
|
-
};
|
|
655
|
-
const VideoPreviewer = ({ file }) => {
|
|
656
|
-
const { t } = (0, import_react_i18next.useTranslation)();
|
|
657
|
-
const src = getFileUrl(file);
|
|
658
|
-
if (!src) {
|
|
659
|
-
return null;
|
|
660
|
-
}
|
|
661
|
-
return /* @__PURE__ */ import_react.default.createElement("video", { controls: true, width: "100%", height: "100%" }, /* @__PURE__ */ import_react.default.createElement("source", { src, type: (file == null ? void 0 : file.type) || (file == null ? void 0 : file.mimetype) }), t("Your browser does not support the video tag."));
|
|
662
|
-
};
|
|
663
|
-
const UnsupportedPreviewer = (props) => {
|
|
664
|
-
const { file } = props;
|
|
665
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
666
|
-
import_antd.Alert,
|
|
667
|
-
{
|
|
668
|
-
type: "warning",
|
|
669
|
-
description: /* @__PURE__ */ import_react.default.createElement(import_react_i18next.Trans, { ns: import_locale.NAMESPACE }, "File type is not supported for previewing, please ", props.onDownload ? /* @__PURE__ */ import_react.default.createElement("a", { onClick: () => {
|
|
670
|
-
var _a;
|
|
671
|
-
return (_a = props.onDownload) == null ? void 0 : _a.call(props, file);
|
|
672
|
-
}, style: { textDecoration: "underline", cursor: "pointer" } }, "download it to preview") : /* @__PURE__ */ import_react.default.createElement("span", null, "download it to preview")),
|
|
673
|
-
showIcon: true
|
|
674
|
-
}
|
|
675
|
-
);
|
|
676
|
-
};
|
|
677
|
-
filePreviewTypes.add({
|
|
678
|
-
match() {
|
|
679
|
-
return true;
|
|
680
|
-
},
|
|
681
|
-
Previewer: wrapWithModalPreviewer(UnsupportedPreviewer)
|
|
682
|
-
});
|
|
683
|
-
filePreviewTypes.add({
|
|
684
|
-
match(file) {
|
|
685
|
-
return matchMimetype(file, "image/*");
|
|
686
|
-
},
|
|
687
|
-
getThumbnailURL(file) {
|
|
688
|
-
return getPreviewFileUrl(file);
|
|
689
|
-
},
|
|
690
|
-
Previewer: ImagePreviewer
|
|
691
|
-
});
|
|
692
|
-
filePreviewTypes.add({
|
|
693
|
-
match(file) {
|
|
694
|
-
return ["text/plain", "application/json"].some((type) => matchMimetype(file, type));
|
|
695
|
-
},
|
|
696
|
-
Previewer: wrapWithModalPreviewer(IframePreviewer)
|
|
697
|
-
});
|
|
698
|
-
filePreviewTypes.add({
|
|
699
|
-
match(file) {
|
|
700
|
-
return matchMimetype(file, "audio/*");
|
|
701
|
-
},
|
|
702
|
-
Previewer: wrapWithModalPreviewer(AudioPreviewer)
|
|
703
|
-
});
|
|
704
|
-
filePreviewTypes.add({
|
|
705
|
-
match(file) {
|
|
706
|
-
return matchMimetype(file, "video/*");
|
|
707
|
-
},
|
|
708
|
-
Previewer: wrapWithModalPreviewer(VideoPreviewer)
|
|
709
|
-
});
|
|
710
|
-
filePreviewTypes.add({
|
|
711
|
-
match(file) {
|
|
712
|
-
return isActiveContentFile(file, getFileUrl(file));
|
|
713
|
-
},
|
|
714
|
-
Previewer: wrapWithModalPreviewer(UnsupportedPreviewer)
|
|
715
|
-
});
|
|
716
|
-
filePreviewTypes.add({
|
|
717
|
-
match(file) {
|
|
718
|
-
return isPdfFile(file, getFileUrl(file));
|
|
719
|
-
},
|
|
720
|
-
Previewer: wrapWithModalPreviewer(PdfPreviewer)
|
|
721
|
-
});
|
|
722
|
-
const FilePreviewRenderer = (props) => {
|
|
723
|
-
const normalized = normalizePreviewFile(props.file);
|
|
724
|
-
if (!normalized) {
|
|
725
|
-
return null;
|
|
726
|
-
}
|
|
727
|
-
const { Previewer } = filePreviewTypes.getTypeByFile(normalized) ?? {};
|
|
728
|
-
if (!Previewer) {
|
|
729
|
-
return null;
|
|
730
|
-
}
|
|
731
|
-
return /* @__PURE__ */ import_react.default.createElement(Previewer, { ...props, file: normalized });
|
|
732
|
-
};
|
|
733
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
734
|
-
0 && (module.exports = {
|
|
735
|
-
FilePreviewRenderer,
|
|
736
|
-
FilePreviewTypes,
|
|
737
|
-
filePreviewTypes,
|
|
738
|
-
getDownloadFileName,
|
|
739
|
-
getFallbackIcon,
|
|
740
|
-
getFileExt,
|
|
741
|
-
getFileName,
|
|
742
|
-
getFileUrl,
|
|
743
|
-
getPdfPreviewErrorCode,
|
|
744
|
-
getPreviewFileUrl,
|
|
745
|
-
getPreviewThumbnailUrl,
|
|
746
|
-
isActiveContentFile,
|
|
747
|
-
isPdfFile,
|
|
748
|
-
matchMimetype,
|
|
749
|
-
normalizePreviewFile,
|
|
750
|
-
wrapWithModalPreviewer
|
|
751
|
-
});
|