@iamjariwala/react-doc-viewer 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +568 -0
  3. package/dist/DocViewer.d.ts +21 -0
  4. package/dist/components/DocumentNav.d.ts +3 -0
  5. package/dist/components/FileName.d.ts +3 -0
  6. package/dist/components/HeaderBar.d.ts +3 -0
  7. package/dist/components/LoadingTimout.d.ts +3 -0
  8. package/dist/components/ProxyRenderer.d.ts +3 -0
  9. package/dist/components/common/Button.d.ts +16 -0
  10. package/dist/components/common/index.d.ts +1 -0
  11. package/dist/components/icons/index.d.ts +8 -0
  12. package/dist/cssStyles.d.ts +1 -0
  13. package/dist/defaultTheme.d.ts +3 -0
  14. package/dist/empty-DBAFSQIv.cjs +1 -0
  15. package/dist/empty-GlqisfcO.js +4 -0
  16. package/dist/features/annotations/components/AnnotationLayer.d.ts +10 -0
  17. package/dist/features/annotations/components/AnnotationToolbar.d.ts +3 -0
  18. package/dist/features/annotations/components/ColorPicker.d.ts +3 -0
  19. package/dist/features/annotations/components/CommentMarker.d.ts +8 -0
  20. package/dist/features/annotations/components/CommentPopover.d.ts +9 -0
  21. package/dist/features/annotations/components/TextHighlight.d.ts +8 -0
  22. package/dist/features/annotations/components/icons/index.d.ts +13 -0
  23. package/dist/features/annotations/hooks/useAnnotationExport.d.ts +9 -0
  24. package/dist/features/annotations/hooks/useDrawingCanvas.d.ts +15 -0
  25. package/dist/features/annotations/hooks/useTextSelection.d.ts +10 -0
  26. package/dist/features/annotations/index.d.ts +13 -0
  27. package/dist/features/annotations/state/actions.d.ts +52 -0
  28. package/dist/features/annotations/state/index.d.ts +17 -0
  29. package/dist/features/annotations/state/reducer.d.ts +17 -0
  30. package/dist/features/annotations/types/index.d.ts +44 -0
  31. package/dist/features/drag-drop/components/DropZoneOverlay.d.ts +9 -0
  32. package/dist/features/drag-drop/hooks/useDragDrop.d.ts +11 -0
  33. package/dist/features/drag-drop/hooks/useFileProcessor.d.ts +13 -0
  34. package/dist/features/drag-drop/index.d.ts +4 -0
  35. package/dist/features/drag-drop/types/index.d.ts +19 -0
  36. package/dist/features/thumbnail-sidebar/components/ThumbnailItem.d.ts +11 -0
  37. package/dist/features/thumbnail-sidebar/components/ThumbnailSidebar.d.ts +8 -0
  38. package/dist/features/thumbnail-sidebar/components/ThumbnailToggle.d.ts +7 -0
  39. package/dist/features/thumbnail-sidebar/hooks/useThumbnailGenerator.d.ts +13 -0
  40. package/dist/features/thumbnail-sidebar/index.d.ts +6 -0
  41. package/dist/features/thumbnail-sidebar/state/actions.d.ts +31 -0
  42. package/dist/features/thumbnail-sidebar/state/index.d.ts +15 -0
  43. package/dist/features/thumbnail-sidebar/state/reducer.d.ts +11 -0
  44. package/dist/hooks/useDocumentLoader.d.ts +13 -0
  45. package/dist/hooks/useRendererSelector.d.ts +5 -0
  46. package/dist/hooks/useTranslation.d.ts +3 -0
  47. package/dist/hooks/useWindowSize.d.ts +4 -0
  48. package/dist/i18n.d.ts +158 -0
  49. package/dist/index-BW6EMUiE.cjs +797 -0
  50. package/dist/index-CYjVmFQ0.cjs +10 -0
  51. package/dist/index-DHMTXjv6.cjs +1 -0
  52. package/dist/index-Dg8HfAtq.js +21246 -0
  53. package/dist/index-dGGNa2HA.js +3350 -0
  54. package/dist/index-nyGAOsVK.js +42 -0
  55. package/dist/index.css +1 -0
  56. package/dist/index.d.ts +8 -0
  57. package/dist/locales/ar.json.d.ts +13 -0
  58. package/dist/locales/de.json.d.ts +13 -0
  59. package/dist/locales/en.json.d.ts +26 -0
  60. package/dist/locales/es.json.d.ts +13 -0
  61. package/dist/locales/fr.json.d.ts +13 -0
  62. package/dist/locales/it.json.d.ts +13 -0
  63. package/dist/locales/ja.json.d.ts +13 -0
  64. package/dist/locales/pl.json.d.ts +13 -0
  65. package/dist/locales/pt.json.d.ts +13 -0
  66. package/dist/locales/ru.json.d.ts +13 -0
  67. package/dist/locales/se.json.d.ts +13 -0
  68. package/dist/locales/sr.json.d.ts +13 -0
  69. package/dist/locales/sr_cyr.json.d.ts +13 -0
  70. package/dist/locales/tr.json.d.ts +13 -0
  71. package/dist/models.d.ts +122 -0
  72. package/dist/react-doc-viewer.cjs +1 -0
  73. package/dist/react-doc-viewer.js +23 -0
  74. package/dist/renderers/bmp/index.d.ts +4 -0
  75. package/dist/renderers/csv/index.d.ts +4 -0
  76. package/dist/renderers/gif/index.d.ts +4 -0
  77. package/dist/renderers/html/index.d.ts +4 -0
  78. package/dist/renderers/image/index.d.ts +4 -0
  79. package/dist/renderers/index.d.ts +15 -0
  80. package/dist/renderers/jpg/index.d.ts +4 -0
  81. package/dist/renderers/msdoc/index.d.ts +4 -0
  82. package/dist/renderers/pdf/components/PDFControls.d.ts +4 -0
  83. package/dist/renderers/pdf/components/PDFPagination.d.ts +4 -0
  84. package/dist/renderers/pdf/components/PDFThumbnailGenerator.d.ts +3 -0
  85. package/dist/renderers/pdf/components/icons/index.d.ts +9 -0
  86. package/dist/renderers/pdf/components/pages/PDFAllPages.d.ts +7 -0
  87. package/dist/renderers/pdf/components/pages/PDFPages.d.ts +4 -0
  88. package/dist/renderers/pdf/components/pages/PDFSinglePage.d.ts +7 -0
  89. package/dist/renderers/pdf/index.d.ts +4 -0
  90. package/dist/renderers/pdf/state/actions.d.ts +32 -0
  91. package/dist/renderers/pdf/state/index.d.ts +13 -0
  92. package/dist/renderers/pdf/state/reducer.d.ts +15 -0
  93. package/dist/renderers/png/index.d.ts +4 -0
  94. package/dist/renderers/tiff/index.d.ts +4 -0
  95. package/dist/renderers/tiff/tiffToCanvas.d.ts +1 -0
  96. package/dist/renderers/txt/index.d.ts +4 -0
  97. package/dist/renderers/video/index.d.ts +4 -0
  98. package/dist/renderers/webp/index.d.ts +4 -0
  99. package/dist/store/DocViewerProvider.d.ts +22 -0
  100. package/dist/store/actions.d.ts +63 -0
  101. package/dist/store/mainStateReducer.d.ts +23 -0
  102. package/dist/url-BH2U_nez.cjs +3 -0
  103. package/dist/url-Dk8Xia2J.js +560 -0
  104. package/dist/utils/fileLoaders.d.ts +13 -0
  105. package/dist/utils/getFileName.d.ts +3 -0
  106. package/package.json +122 -0
@@ -0,0 +1,42 @@
1
+ import { g as u } from "./index-Dg8HfAtq.js";
2
+ import { s as l, r as g } from "./index-dGGNa2HA.js";
3
+ function h(i, o) {
4
+ for (var f = 0; f < o.length; f++) {
5
+ const r = o[f];
6
+ if (typeof r != "string" && !Array.isArray(r)) {
7
+ for (const e in r)
8
+ if (e !== "default" && !(e in i)) {
9
+ const n = Object.getOwnPropertyDescriptor(r, e);
10
+ n && Object.defineProperty(i, e, n.get ? n : {
11
+ enumerable: !0,
12
+ get: () => r[e]
13
+ });
14
+ }
15
+ }
16
+ }
17
+ return Object.freeze(Object.defineProperty(i, Symbol.toStringTag, { value: "Module" }));
18
+ }
19
+ var c = { exports: {} };
20
+ (function(i) {
21
+ var o = l, f = g, r = i.exports;
22
+ for (var e in o)
23
+ o.hasOwnProperty(e) && (r[e] = o[e]);
24
+ r.request = function(t, s) {
25
+ return t = n(t), o.request.call(this, t, s);
26
+ }, r.get = function(t, s) {
27
+ return t = n(t), o.get.call(this, t, s);
28
+ };
29
+ function n(t) {
30
+ if (typeof t == "string" && (t = f.parse(t)), t.protocol || (t.protocol = "https:"), t.protocol !== "https:")
31
+ throw new Error('Protocol "' + t.protocol + '" not supported. Expected "https:"');
32
+ return t;
33
+ }
34
+ })(c);
35
+ var p = c.exports;
36
+ const d = /* @__PURE__ */ u(p), y = /* @__PURE__ */ h({
37
+ __proto__: null,
38
+ default: d
39
+ }, [p]);
40
+ export {
41
+ y as i
42
+ };
package/dist/index.css ADDED
@@ -0,0 +1 @@
1
+ :root{--react-pdf-annotation-layer: 1;--annotation-unfocused-field-background: url("data:image/svg+xml;charset=UTF-8,<svg width='1px' height='1px' xmlns='http://www.w3.org/2000/svg'><rect width='100%' height='100%' style='fill:rgba(0, 54, 255, 0.13);'/></svg>");--input-focus-border-color: Highlight;--input-focus-outline: 1px solid Canvas;--input-unfocused-border-color: transparent;--input-disabled-border-color: transparent;--input-hover-border-color: black;--link-outline: none}@media screen and (forced-colors: active){:root{--input-focus-border-color: CanvasText;--input-unfocused-border-color: ActiveText;--input-disabled-border-color: GrayText;--input-hover-border-color: Highlight;--link-outline: 1.5px solid LinkText}.annotationLayer .textWidgetAnnotation :is(input,textarea):required,.annotationLayer .choiceWidgetAnnotation select:required,.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input:required{outline:1.5px solid selectedItem}.annotationLayer .linkAnnotation:hover{-webkit-backdrop-filter:invert(100%);backdrop-filter:invert(100%)}}.annotationLayer{position:absolute;top:0;left:0;pointer-events:none;transform-origin:0 0;z-index:3}.annotationLayer[data-main-rotation="90"] .norotate{transform:rotate(270deg) translate(-100%)}.annotationLayer[data-main-rotation="180"] .norotate{transform:rotate(180deg) translate(-100%,-100%)}.annotationLayer[data-main-rotation="270"] .norotate{transform:rotate(90deg) translateY(-100%)}.annotationLayer canvas{position:absolute;width:100%;height:100%}.annotationLayer section{position:absolute;text-align:initial;pointer-events:auto;box-sizing:border-box;margin:0;transform-origin:0 0}.annotationLayer .linkAnnotation{outline:var(--link-outline)}.annotationLayer :is(.linkAnnotation,.buttonWidgetAnnotation.pushButton)>a{position:absolute;font-size:1em;top:0;left:0;width:100%;height:100%}.annotationLayer :is(.linkAnnotation,.buttonWidgetAnnotation.pushButton)>a:hover{opacity:.2;background:#ff0;box-shadow:0 2px 10px #ff0}.annotationLayer .textAnnotation img{position:absolute;cursor:pointer;width:100%;height:100%;top:0;left:0}.annotationLayer .textWidgetAnnotation :is(input,textarea),.annotationLayer .choiceWidgetAnnotation select,.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input{background-image:var(--annotation-unfocused-field-background);border:2px solid var(--input-unfocused-border-color);box-sizing:border-box;font:calc(9px * var(--scale-factor)) sans-serif;height:100%;margin:0;vertical-align:top;width:100%}.annotationLayer .textWidgetAnnotation :is(input,textarea):required,.annotationLayer .choiceWidgetAnnotation select:required,.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input:required{outline:1.5px solid red}.annotationLayer .choiceWidgetAnnotation select option{padding:0}.annotationLayer .buttonWidgetAnnotation.radioButton input{border-radius:50%}.annotationLayer .textWidgetAnnotation textarea{resize:none}.annotationLayer .textWidgetAnnotation :is(input,textarea)[disabled],.annotationLayer .choiceWidgetAnnotation select[disabled],.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input[disabled]{background:none;border:2px solid var(--input-disabled-border-color);cursor:not-allowed}.annotationLayer .textWidgetAnnotation :is(input,textarea):hover,.annotationLayer .choiceWidgetAnnotation select:hover,.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input:hover{border:2px solid var(--input-hover-border-color)}.annotationLayer .textWidgetAnnotation :is(input,textarea):hover,.annotationLayer .choiceWidgetAnnotation select:hover,.annotationLayer .buttonWidgetAnnotation.checkBox input:hover{border-radius:2px}.annotationLayer .textWidgetAnnotation :is(input,textarea):focus,.annotationLayer .choiceWidgetAnnotation select:focus{background:none;border:2px solid var(--input-focus-border-color);border-radius:2px;outline:var(--input-focus-outline)}.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) :focus{background-image:none;background-color:transparent}.annotationLayer .buttonWidgetAnnotation.checkBox :focus{border:2px solid var(--input-focus-border-color);border-radius:2px;outline:var(--input-focus-outline)}.annotationLayer .buttonWidgetAnnotation.radioButton :focus{border:2px solid var(--input-focus-border-color);outline:var(--input-focus-outline)}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after,.annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before{background-color:CanvasText;content:"";display:block;position:absolute}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after{height:80%;left:45%;width:1px}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before{transform:rotate(45deg)}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after{transform:rotate(-45deg)}.annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before{border-radius:50%;height:50%;left:30%;top:20%;width:50%}.annotationLayer .textWidgetAnnotation input.comb{font-family:monospace;padding-left:2px;padding-right:0}.annotationLayer .textWidgetAnnotation input.comb:focus{width:103%}.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input{-webkit-appearance:none;-moz-appearance:none;appearance:none}.annotationLayer .popupTriggerArea{height:100%;width:100%}.annotationLayer .fileAttachmentAnnotation .popupTriggerArea{position:absolute}.annotationLayer .popupWrapper{position:absolute;font-size:calc(9px * var(--scale-factor));width:100%;min-width:calc(180px * var(--scale-factor));pointer-events:none}.annotationLayer .popup{position:absolute;max-width:calc(180px * var(--scale-factor));background-color:#ff9;box-shadow:0 calc(2px * var(--scale-factor)) calc(5px * var(--scale-factor)) #888;border-radius:calc(2px * var(--scale-factor));padding:calc(6px * var(--scale-factor));margin-left:calc(5px * var(--scale-factor));cursor:pointer;font:message-box;white-space:normal;word-wrap:break-word;pointer-events:auto}.annotationLayer .popup>*{font-size:calc(9px * var(--scale-factor))}.annotationLayer .popup h1{display:inline-block}.annotationLayer .popupDate{display:inline-block;margin-left:calc(5px * var(--scale-factor))}.annotationLayer .popupContent{border-top:1px solid rgba(51,51,51,1);margin-top:calc(2px * var(--scale-factor));padding-top:calc(2px * var(--scale-factor))}.annotationLayer .richText>*{white-space:pre-wrap;font-size:calc(9px * var(--scale-factor))}.annotationLayer .highlightAnnotation,.annotationLayer .underlineAnnotation,.annotationLayer .squigglyAnnotation,.annotationLayer .strikeoutAnnotation,.annotationLayer .freeTextAnnotation,.annotationLayer .lineAnnotation svg line,.annotationLayer .squareAnnotation svg rect,.annotationLayer .circleAnnotation svg ellipse,.annotationLayer .polylineAnnotation svg polyline,.annotationLayer .polygonAnnotation svg polygon,.annotationLayer .caretAnnotation,.annotationLayer .inkAnnotation svg polyline,.annotationLayer .stampAnnotation,.annotationLayer .fileAttachmentAnnotation{cursor:pointer}.annotationLayer section svg{position:absolute;width:100%;height:100%;top:0;left:0}.annotationLayer .annotationTextContent{position:absolute;width:100%;height:100%;opacity:0;color:transparent;-webkit-user-select:none;user-select:none;pointer-events:none}.annotationLayer .annotationTextContent span{width:100%;display:inline-block}:root{--react-pdf-text-layer: 1;--highlight-bg-color: rgba(180, 0, 170, 1);--highlight-selected-bg-color: rgba(0, 100, 0, 1)}@media screen and (forced-colors: active){:root{--highlight-bg-color: Highlight;--highlight-selected-bg-color: ButtonText}}[data-main-rotation="90"]{transform:rotate(90deg) translateY(-100%)}[data-main-rotation="180"]{transform:rotate(180deg) translate(-100%,-100%)}[data-main-rotation="270"]{transform:rotate(270deg) translate(-100%)}.textLayer{position:absolute;text-align:initial;top:0;right:0;bottom:0;left:0;overflow:hidden;line-height:1;text-size-adjust:none;forced-color-adjust:none;transform-origin:0 0;z-index:2}.textLayer :is(span,br){color:transparent;position:absolute;white-space:pre;cursor:text;margin:0;transform-origin:0 0}.textLayer span.markedContent{top:0;height:0}.textLayer .highlight{margin:-1px;padding:1px;background-color:var(--highlight-bg-color);border-radius:4px}.textLayer .highlight.appended{position:initial}.textLayer .highlight.begin{border-radius:4px 0 0 4px}.textLayer .highlight.end{border-radius:0 4px 4px 0}.textLayer .highlight.middle{border-radius:0}.textLayer .highlight.selected{background-color:var(--highlight-selected-bg-color)}.textLayer br::selection{background:transparent}.textLayer .endOfContent{display:block;position:absolute;top:100%;right:0;bottom:0;left:0;z-index:-1;cursor:default;-webkit-user-select:none;user-select:none}.textLayer .endOfContent.active{top:0}
@@ -0,0 +1,8 @@
1
+ import { default as DocViewer } from './DocViewer';
2
+
3
+ export default DocViewer;
4
+ export { DocViewerRenderers } from './renderers';
5
+ export * from './models';
6
+ export * from './utils/fileLoaders';
7
+ export { type AvailableLanguages, supportedLanguages } from './i18n';
8
+ export * from './renderers';
@@ -0,0 +1,13 @@
1
+ declare const _default: {
2
+ "documentNavInfo": "مستند {{ currentFileNo }} من {{ allFilesCount }}",
3
+ "noRendererMessage": "{{{ fileType }}} : لا يمكننا عرض هذا النوع من الملفات",
4
+ "downloadButtonLabel": "تحميل الملف",
5
+ "brokenFile": "الملف تالف، يرجى التحقق منه على جهازك الخاص.",
6
+ "msgPluginRecipients": "المستلمين",
7
+ "msgPluginSender": "المرسل",
8
+ "pdfPluginLoading": "تحميل ...",
9
+ "pdfPluginPageNumber": " {{ allPagesCount }} \\ {{ currentPage }} صفحة "
10
+ }
11
+ ;
12
+
13
+ export default _default;
@@ -0,0 +1,13 @@
1
+ declare const _default: {
2
+ "documentNavInfo": "Dokument {{ currentFileNo }} von {{ allFilesCount }}",
3
+ "noRendererMessage": "Kein Renderer für Dateityp: {{{ fileType }}}",
4
+ "downloadButtonLabel": "Datei herunterladen",
5
+ "brokenFile": "Ihre Datei ist defekt. Bitte überprüfen Sie sie auf Ihrem Rechner.",
6
+ "msgPluginRecipients": "Empfänger",
7
+ "msgPluginSender": "Absender",
8
+ "pdfPluginLoading": "Wird geladen...",
9
+ "pdfPluginPageNumber": "Seite {{ currentPage }}/{{ allPagesCount }}"
10
+ }
11
+ ;
12
+
13
+ export default _default;
@@ -0,0 +1,26 @@
1
+ declare const _default: {
2
+ "documentNavInfo": "Document {{ currentFileNo }} of {{ allFilesCount }}",
3
+ "noRendererMessage": "No renderer for file type: {{{ fileType }}}",
4
+ "downloadButtonLabel": "Download file",
5
+ "brokenFile": "Your file is broken. Please check it on your machine.",
6
+ "msgPluginRecipients": "Recipients",
7
+ "msgPluginSender": "Sender",
8
+ "pdfPluginLoading": "Loading...",
9
+ "pdfPluginPageNumber": "Page {{ currentPage }}/{{ allPagesCount }}",
10
+ "dropFilesHere": "Drop files here",
11
+ "thumbnailSidebar": "Thumbnail sidebar",
12
+ "showThumbnails": "Show thumbnails",
13
+ "hideThumbnails": "Hide thumbnails",
14
+ "annotationToolbar": "Annotation toolbar",
15
+ "selectTool": "Select",
16
+ "highlightTool": "Highlight",
17
+ "penTool": "Pen",
18
+ "commentTool": "Comment",
19
+ "eraserTool": "Eraser",
20
+ "addComment": "Add comment",
21
+ "deleteAnnotation": "Delete annotation",
22
+ "saveAnnotations": "Save annotations"
23
+ }
24
+ ;
25
+
26
+ export default _default;
@@ -0,0 +1,13 @@
1
+ declare const _default: {
2
+ "documentNavInfo": "Documento {{ currentFileNo }} de {{ allFilesCount }}",
3
+ "noRendererMessage": "No hay procesador para el tipo de archivo: {{{ fileType }}}",
4
+ "downloadButtonLabel": "Descargar archivo",
5
+ "brokenFile": "Tu archivo está roto. Compruébalo en tu máquina.",
6
+ "msgPluginRecipients": "Destinatarios",
7
+ "msgPluginSender": "Remitente",
8
+ "pdfPluginLoading": "Cargando...",
9
+ "pdfPluginPageNumber": "Página {{ currentPage }}/{{ allPagesCount }}"
10
+ }
11
+ ;
12
+
13
+ export default _default;
@@ -0,0 +1,13 @@
1
+ declare const _default: {
2
+ "documentNavInfo": "Document {{ currentFileNo }} de {{ allFilesCount }}",
3
+ "noRendererMessage": "Aucun moteur de rendu pour le type de fichier : {{{ fileType }}}",
4
+ "downloadButtonLabel": "Télécharger le fichier",
5
+ "brokenFile": "Votre fichier est cassé. Veuillez le vérifier sur votre machine.",
6
+ "msgPluginRecipients": "Destinataires",
7
+ "msgPluginSender": "Expéditeur",
8
+ "pdfPluginLoading": "Chargement...",
9
+ "pdfPluginPageNumber": "Page {{ currentPage }}/{{ allPagesCount }}"
10
+ }
11
+ ;
12
+
13
+ export default _default;
@@ -0,0 +1,13 @@
1
+ declare const _default: {
2
+ "documentNavInfo": "Documento {{ currentFileNo }} di {{ allFilesCount }}",
3
+ "noRendererMessage": "Nessun renderer per il tipo di file: {{{ fileType }}}",
4
+ "downloadButtonLabel": "Scarica file",
5
+ "brokenFile": "Il tuo file è danneggiato. Controllalo sul tuo computer.",
6
+ "msgPluginRecipients": "Destinatari",
7
+ "msgPluginSender": "Mittente",
8
+ "pdfPluginLoading": "Caricamento in corso...",
9
+ "pdfPluginPageNumber": "Pagina {{ currentPage }}/{{ allPagesCount }}"
10
+ }
11
+ ;
12
+
13
+ export default _default;
@@ -0,0 +1,13 @@
1
+ declare const _default: {
2
+ "documentNavInfo": "ファイル {{ currentFileNo }} / {{ allFilesCount }}",
3
+ "noRendererMessage": "ファイルタイプに対応したレンダラーはありません: {{ fileType }}",
4
+ "downloadButtonLabel": "ダウンロード",
5
+ "brokenFile": "ファイルが壊れています。あなたのマシンでファイルを確認してください。",
6
+ "msgPluginRecipients": "受信者",
7
+ "msgPluginSender": "送信者",
8
+ "pdfPluginLoading": "ローティング中...",
9
+ "pdfPluginPageNumber": "ページ {{ currentPage }}/{{ allPagesCount }}"
10
+ }
11
+ ;
12
+
13
+ export default _default;
@@ -0,0 +1,13 @@
1
+ declare const _default: {
2
+ "documentNavInfo": "Dokument {{ currentFileNo }} z {{ allFilesCount }}",
3
+ "noRendererMessage": "Brak funckji renderującej dla: {{{ fileType }}}",
4
+ "downloadButtonLabel": "Pobierz plik",
5
+ "brokenFile": "Twój plik jest uszkodzony. Sprawdź go na swoim komputerze.",
6
+ "msgPluginRecipients": "Odbiorcy",
7
+ "msgPluginSender": "Nadawca",
8
+ "pdfPluginLoading": "Wczytywanie...",
9
+ "pdfPluginPageNumber": "Strona {{ currentPage }}/{{ allPagesCount }}"
10
+ }
11
+ ;
12
+
13
+ export default _default;
@@ -0,0 +1,13 @@
1
+ declare const _default: {
2
+ "documentNavInfo": "Documento {{ currentFileNo }} de {{ allFilesCount }}",
3
+ "noRendererMessage": "Nenhum renderizador para o tipo de arquivo: {{{ fileType }}}",
4
+ "downloadButtonLabel": "Baixar arquivo",
5
+ "brokenFile": "Seu arquivo está quebrado. Por favor, verifique-o em sua máquina.",
6
+ "msgPluginRecipients": "Destinatários",
7
+ "msgPluginSender": "Remetente",
8
+ "pdfPluginLoading": "Carregando...",
9
+ "pdfPluginPageNumber": "Página {{ currentPage }}/{{ allPagesCount }}"
10
+ }
11
+ ;
12
+
13
+ export default _default;
@@ -0,0 +1,13 @@
1
+ declare const _default: {
2
+ "documentNavInfo": "Документ {{ currentFileNo }} из {{ allFilesCount }}",
3
+ "noRendererMessage": "Данный тип файла не поддерживается рендером: {{{ fileType }}}",
4
+ "downloadButtonLabel": "Скачать файл",
5
+ "brokenFile": "Ваш файл сломан. Пожалуйста, проверьте его на своём комьютере.",
6
+ "msgPluginRecipients": "Получатели",
7
+ "msgPluginSender": "Отправитель",
8
+ "pdfPluginLoading": "Загрузка...",
9
+ "pdfPluginPageNumber": "Страница {{ currentPage }}/{{ allPagesCount }}"
10
+ }
11
+ ;
12
+
13
+ export default _default;
@@ -0,0 +1,13 @@
1
+ declare const _default: {
2
+ "documentNavInfo": "Dokument {{ currentFileNo }} av {{ allFilesCount }}",
3
+ "noRendererMessage": "Ingen renderare för filtypen: {{{ fileType }}}",
4
+ "downloadButtonLabel": "Ladda ner",
5
+ "brokenFile": "Filen är trasig. Var vänlig kontrollera den på din maskin.",
6
+ "msgPluginRecipients": "Mottagare",
7
+ "msgPluginSender": "Avsändare",
8
+ "pdfPluginLoading": "Laddar...",
9
+ "pdfPluginPageNumber": "Sida {{ currentPage }}/{{ allPagesCount }}"
10
+ }
11
+ ;
12
+
13
+ export default _default;
@@ -0,0 +1,13 @@
1
+ declare const _default: {
2
+ "documentNavInfo": "Dokument {{ currentFileNo }} od {{ allFilesCount }}",
3
+ "noRendererMessage": "Ne postoji pregledač za tip fajla: {{ fileType }}",
4
+ "downloadButtonLabel": "Preuzimanje fajla",
5
+ "brokenFile": "Vaš fajl nije dobar. Molimo Vas da probate da ga otvorite na vašem računaru.",
6
+ "msgPluginRecipients": "Primaoci",
7
+ "msgPluginSender": "Pošiljalac",
8
+ "pdfPluginLoading": "Učitavanje...",
9
+ "pdfPluginPageNumber": "Strana {{ currentPage }}/{{ allPagesCount }}"
10
+ }
11
+ ;
12
+
13
+ export default _default;
@@ -0,0 +1,13 @@
1
+ declare const _default: {
2
+ "documentNavInfo": "Документ {{ currentFileNo }} od {{ allFilesCount }}",
3
+ "noRendererMessage": "Не постоји прегледач за тип фајла: {{ fileType }}",
4
+ "downloadButtonLabel": "Преузимање фајла",
5
+ "brokenFile": "Ваш фајл није добар. Молимо Вас да пробате да га отворите на вашем рачунару.",
6
+ "msgPluginRecipients": "Примаоци",
7
+ "msgPluginSender": "Пошиљалац",
8
+ "pdfPluginLoading": "Учитавање...",
9
+ "pdfPluginPageNumber": "Страна {{ currentPage }}/{{ allPagesCount }}"
10
+ }
11
+ ;
12
+
13
+ export default _default;
@@ -0,0 +1,13 @@
1
+ declare const _default: {
2
+ "documentNavInfo": "Belge {{ currentFileNo }} / {{ allFilesCount }}",
3
+ "noRendererMessage": "Dosya türü için görüntüleyici bulunamadı: {{{ fileType }}}",
4
+ "downloadButtonLabel": "Dosyayı indir",
5
+ "brokenFile": "Dosyanız bozuk. Lütfen kendi cihazınızda kontrol edin.",
6
+ "msgPluginRecipients": "Alıcılar",
7
+ "msgPluginSender": "Gönderen",
8
+ "pdfPluginLoading": "Yükleniyor...",
9
+ "pdfPluginPageNumber": "Sayfa {{ currentPage }}/{{ allPagesCount }}"
10
+ }
11
+ ;
12
+
13
+ export default _default;
@@ -0,0 +1,122 @@
1
+ import { FC, ReactElement, ComponentType, PropsWithChildren } from 'react';
2
+ import { IMainState } from './store/mainStateReducer';
3
+ import { FileLoaderFunction } from './utils/fileLoaders';
4
+
5
+ export interface IDragDropConfig {
6
+ enableDragDrop?: boolean;
7
+ acceptedFileTypes?: string[];
8
+ maxFileSize?: number;
9
+ dropBehavior?: "append" | "replace";
10
+ onDrop?: (files: File[]) => void;
11
+ onDropRejected?: (files: File[], reason: "file-type" | "file-size" | "unknown") => void;
12
+ }
13
+ export interface IThumbnailConfig {
14
+ enableThumbnails?: boolean;
15
+ thumbnailWidth?: number;
16
+ sidebarDefaultOpen?: boolean;
17
+ }
18
+ export interface IAnnotationConfig {
19
+ enableAnnotations?: boolean;
20
+ defaultColor?: string;
21
+ colors?: string[];
22
+ tools?: ("select" | "highlight" | "pen" | "comment" | "eraser")[];
23
+ onAnnotationChange?: (annotations: IAnnotation[]) => void;
24
+ initialAnnotations?: IAnnotation[];
25
+ }
26
+ export interface IAnnotation {
27
+ id: string;
28
+ type: "highlight" | "drawing" | "comment";
29
+ documentUri: string;
30
+ pageNumber: number;
31
+ color: string;
32
+ data?: IHighlightData | IDrawingData | ICommentData;
33
+ }
34
+ export interface IHighlightData {
35
+ rects: Array<{
36
+ x: number;
37
+ y: number;
38
+ width: number;
39
+ height: number;
40
+ }>;
41
+ text?: string;
42
+ }
43
+ export interface IDrawingData {
44
+ paths: Array<{
45
+ x: number;
46
+ y: number;
47
+ }[]>;
48
+ strokeWidth: number;
49
+ }
50
+ export interface ICommentData {
51
+ x: number;
52
+ y: number;
53
+ text: string;
54
+ author?: string;
55
+ timestamp?: number;
56
+ }
57
+ export interface IConfig {
58
+ header?: IHeaderConfig;
59
+ loadingRenderer?: ILoadingRendererConfig;
60
+ noRenderer?: INoRendererConfig;
61
+ csvDelimiter?: string;
62
+ pdfZoom?: IPdfZoomConfig;
63
+ pdfVerticalScrollByDefault?: boolean;
64
+ dragDrop?: IDragDropConfig;
65
+ thumbnail?: IThumbnailConfig;
66
+ annotations?: IAnnotationConfig;
67
+ }
68
+ export interface ILoadingRendererConfig {
69
+ overrideComponent?: ComponentType<{
70
+ document: IDocument | undefined;
71
+ fileName: string;
72
+ }>;
73
+ showLoadingTimeout?: false | number;
74
+ }
75
+ export interface INoRendererConfig {
76
+ overrideComponent?: ComponentType<{
77
+ document: IDocument | undefined;
78
+ fileName: string;
79
+ }>;
80
+ }
81
+ export interface IHeaderConfig {
82
+ disableHeader?: boolean;
83
+ disableFileName?: boolean;
84
+ retainURLParams?: boolean;
85
+ overrideComponent?: IHeaderOverride;
86
+ }
87
+ export interface IPdfZoomConfig {
88
+ defaultZoom: number;
89
+ zoomJump: number;
90
+ }
91
+ export type IHeaderOverride = (state: IMainState, previousDocument: () => void, nextDocument: () => void) => ReactElement<any, any> | null;
92
+ export interface ITheme {
93
+ primary?: string;
94
+ secondary?: string;
95
+ tertiary?: string;
96
+ textPrimary?: string;
97
+ textSecondary?: string;
98
+ textTertiary?: string;
99
+ disableThemeScrollbar?: boolean;
100
+ }
101
+ export interface IStyledProps {
102
+ theme: ITheme;
103
+ }
104
+ export interface IDocument {
105
+ uri: string;
106
+ fileType?: string;
107
+ fileData?: string | ArrayBuffer;
108
+ fileName?: string;
109
+ }
110
+ export interface DocRendererProps {
111
+ mainState: IMainState;
112
+ }
113
+ export interface DocRenderer extends FC<PropsWithChildren<DocRendererProps>> {
114
+ fileTypes: string[];
115
+ weight: number;
116
+ fileLoader?: FileLoaderFunction | null | undefined;
117
+ }
118
+ export interface DocViewerRef {
119
+ prev: () => void;
120
+ next: () => void;
121
+ goToPage: (pageNumber: number) => void;
122
+ }
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index-BW6EMUiE.cjs");exports.BMPRenderer=e.BMPRenderer;exports.CSVRenderer=e.CSVRenderer;exports.DocViewerRenderers=e.DocViewerRenderers;exports.GIFRenderer=e.JPGRenderer$1;exports.HTMLRenderer=e.HTMLRenderer;exports.JPGRenderer=e.JPGRenderer;exports.MSDocRenderer=e.MSDocRenderer;exports.PDFRenderer=e.PDFRenderer;exports.PNGRenderer=e.PNGRenderer;exports.TIFFRenderer=e.TIFFRenderer;exports.TXTRenderer=e.TXTRenderer;exports.VideoRenderer=e.VideoRenderer;exports.WebPRenderer=e.WebPRenderer;exports.arrayBufferFileLoader=e.arrayBufferFileLoader;exports.binaryStringFileLoader=e.binaryStringFileLoader;exports.dataURLFileLoader=e.dataURLFileLoader;exports.default=e.DocViewer;exports.defaultFileLoader=e.defaultFileLoader;exports.supportedLanguages=e.supportedLanguages;exports.textFileLoader=e.textFileLoader;
@@ -0,0 +1,23 @@
1
+ import { j as a, C as s, b as d, m as n, H as R, J as o, M as i, P as t, k as F, T as l, l as L, V as f, W as P, e as u, h as T, f as D, D as M, i as V, s as b, t as g } from "./index-Dg8HfAtq.js";
2
+ export {
3
+ a as BMPRenderer,
4
+ s as CSVRenderer,
5
+ d as DocViewerRenderers,
6
+ n as GIFRenderer,
7
+ R as HTMLRenderer,
8
+ o as JPGRenderer,
9
+ i as MSDocRenderer,
10
+ t as PDFRenderer,
11
+ F as PNGRenderer,
12
+ l as TIFFRenderer,
13
+ L as TXTRenderer,
14
+ f as VideoRenderer,
15
+ P as WebPRenderer,
16
+ u as arrayBufferFileLoader,
17
+ T as binaryStringFileLoader,
18
+ D as dataURLFileLoader,
19
+ M as default,
20
+ V as defaultFileLoader,
21
+ b as supportedLanguages,
22
+ g as textFileLoader
23
+ };
@@ -0,0 +1,4 @@
1
+ import { DocRenderer } from '../..';
2
+
3
+ declare const BMPRenderer: DocRenderer;
4
+ export default BMPRenderer;
@@ -0,0 +1,4 @@
1
+ import { DocRenderer } from '../..';
2
+
3
+ declare const CSVRenderer: DocRenderer;
4
+ export default CSVRenderer;
@@ -0,0 +1,4 @@
1
+ import { DocRenderer } from '../..';
2
+
3
+ declare const JPGRenderer: DocRenderer;
4
+ export default JPGRenderer;
@@ -0,0 +1,4 @@
1
+ import { DocRenderer } from '../..';
2
+
3
+ declare const HTMLRenderer: DocRenderer;
4
+ export default HTMLRenderer;
@@ -0,0 +1,4 @@
1
+ import { DocRenderer } from '../..';
2
+
3
+ declare const ImageProxyRenderer: DocRenderer;
4
+ export default ImageProxyRenderer;
@@ -0,0 +1,15 @@
1
+ import { default as BMPRenderer } from './bmp';
2
+ import { default as HTMLRenderer } from './html';
3
+ import { default as JPGRenderer } from './jpg';
4
+ import { default as MSDocRenderer } from './msdoc';
5
+ import { default as PDFRenderer } from './pdf';
6
+ import { default as PNGRenderer } from './png';
7
+ import { default as TIFFRenderer } from './tiff';
8
+ import { default as TXTRenderer } from './txt';
9
+ import { default as CSVRenderer } from './csv';
10
+ import { default as GIFRenderer } from './gif';
11
+ import { default as VideoRenderer } from './video';
12
+ import { default as WebPRenderer } from './webp';
13
+
14
+ export declare const DocViewerRenderers: import('..').DocRenderer[];
15
+ export { BMPRenderer, HTMLRenderer, JPGRenderer, MSDocRenderer, PDFRenderer, PNGRenderer, TIFFRenderer, TXTRenderer, CSVRenderer, GIFRenderer, VideoRenderer, WebPRenderer, };
@@ -0,0 +1,4 @@
1
+ import { DocRenderer } from '../..';
2
+
3
+ declare const JPGRenderer: DocRenderer;
4
+ export default JPGRenderer;
@@ -0,0 +1,4 @@
1
+ import { DocRenderer } from '../..';
2
+
3
+ declare const MSDocRenderer: DocRenderer;
4
+ export default MSDocRenderer;
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+
3
+ declare const PDFControls: FC;
4
+ export default PDFControls;
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+
3
+ declare const PDFPagination: FC;
4
+ export default PDFPagination;
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+
3
+ export declare const PDFThumbnailGenerator: FC;
@@ -0,0 +1,9 @@
1
+ import { IIconProps } from '../../../../components/icons';
2
+
3
+ export declare const PrevPDFNavIcon: (props: IIconProps) => import("react/jsx-runtime").JSX.Element;
4
+ export declare const NextPDFNavIcon: (props: IIconProps) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const DownloadPDFIcon: (props: IIconProps) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const ZoomInPDFIcon: (props: IIconProps) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const ZoomOutPDFIcon: (props: IIconProps) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const ResetZoomPDFIcon: (props: IIconProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const TogglePaginationPDFIcon: (props: IIconProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+
3
+ interface Props {
4
+ pageNum?: number;
5
+ }
6
+ export declare const PDFAllPages: FC<Props>;
7
+ export {};
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+
3
+ declare const PDFPages: FC<{}>;
4
+ export default PDFPages;
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+
3
+ interface Props {
4
+ pageNum?: number;
5
+ }
6
+ declare const PDFSinglePage: FC<Props>;
7
+ export default PDFSinglePage;
@@ -0,0 +1,4 @@
1
+ import { DocRenderer } from '../..';
2
+
3
+ declare const PDFRenderer: DocRenderer;
4
+ export default PDFRenderer;
@@ -0,0 +1,32 @@
1
+ import { IMainState } from '../../../store/mainStateReducer';
2
+
3
+ export declare const SET_ZOOM_LEVEL: string;
4
+ export interface SetZoomLevel {
5
+ type: typeof SET_ZOOM_LEVEL;
6
+ value: number;
7
+ }
8
+ export declare const setZoomLevel: (value: number) => SetZoomLevel;
9
+ export declare const SET_PDF_PAGINATED: string;
10
+ export interface SetPDFPaginated {
11
+ type: typeof SET_PDF_PAGINATED;
12
+ value: boolean;
13
+ }
14
+ export declare const setPDFPaginated: (value: boolean) => SetPDFPaginated;
15
+ export declare const SET_NUM_PAGES: string;
16
+ export interface SetNumPages {
17
+ type: typeof SET_NUM_PAGES;
18
+ value: number;
19
+ }
20
+ export declare const setNumPages: (value: number) => SetNumPages;
21
+ export declare const SET_CURRENT_PAGE: string;
22
+ export interface SetCurrentPage {
23
+ type: typeof SET_CURRENT_PAGE;
24
+ value: number;
25
+ }
26
+ export declare const SET_CURRENT_MAIN_STATE: string;
27
+ export interface SetCurrentMainState {
28
+ type: typeof SET_CURRENT_MAIN_STATE;
29
+ value: IMainState;
30
+ }
31
+ export declare const setCurrentPage: (value: number) => SetCurrentPage;
32
+ export type PDFActions = SetZoomLevel | SetPDFPaginated | SetNumPages | SetCurrentPage | SetCurrentMainState;
@@ -0,0 +1,13 @@
1
+ import { default as React, Dispatch, FC, PropsWithChildren } from 'react';
2
+ import { IMainState } from '../../../store/mainStateReducer';
3
+ import { PDFActions } from './actions';
4
+ import { IPDFState } from './reducer';
5
+
6
+ declare const PDFContext: React.Context<{
7
+ state: IPDFState;
8
+ dispatch: Dispatch<PDFActions>;
9
+ }>;
10
+ declare const PDFProvider: FC<PropsWithChildren<{
11
+ mainState: IMainState;
12
+ }>>;
13
+ export { PDFContext, PDFProvider };
@@ -0,0 +1,15 @@
1
+ import { IMainState } from '../../../store/mainStateReducer';
2
+ import { PDFActions as PDFStateActions } from './actions';
3
+
4
+ export type IPDFState = {
5
+ defaultZoomLevel: number;
6
+ zoomLevel: number;
7
+ zoomJump: number;
8
+ paginated: boolean;
9
+ numPages: number;
10
+ currentPage: number;
11
+ mainState?: IMainState;
12
+ };
13
+ export declare const initialPDFState: IPDFState;
14
+ export type PDFStateReducer = (state: IPDFState, action: PDFStateActions) => IPDFState;
15
+ export declare const reducer: PDFStateReducer;
@@ -0,0 +1,4 @@
1
+ import { DocRenderer } from '../..';
2
+
3
+ declare const PNGRenderer: DocRenderer;
4
+ export default PNGRenderer;
@@ -0,0 +1,4 @@
1
+ import { DocRenderer } from '../..';
2
+
3
+ declare const TIFFRenderer: DocRenderer;
4
+ export default TIFFRenderer;
@@ -0,0 +1 @@
1
+ export declare const parseTIFF: (tiffArrayBuffer: any, _canvas: any) => any;