react-os-shell 4.82.0 → 4.83.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -0
- package/dist/{Browser-5FNVWP3Q.js → Browser-TGOOIGEP.js} +4 -4
- package/dist/{Browser-5FNVWP3Q.js.map → Browser-TGOOIGEP.js.map} +1 -1
- package/dist/{Documents-ZTK6SSDK.js → Documents-TRV2LWMG.js} +5 -13
- package/dist/Documents-TRV2LWMG.js.map +1 -0
- package/dist/{Files-4PNE3MBV.js → Files-PFVZJYRV.js} +8 -8
- package/dist/{Files-4PNE3MBV.js.map → Files-PFVZJYRV.js.map} +1 -1
- package/dist/{Notepad-63JJ2WB5.js → Notepad-UBDMMVLB.js} +4 -4
- package/dist/{Notepad-63JJ2WB5.js.map → Notepad-UBDMMVLB.js.map} +1 -1
- package/dist/{Preview-QZL2BXLP.js → Preview-7QUDHTDN.js} +33 -6
- package/dist/Preview-7QUDHTDN.js.map +1 -0
- package/dist/{Spreadsheet-RCKDHL66.js → Spreadsheet-F24CHTRL.js} +6 -5
- package/dist/Spreadsheet-F24CHTRL.js.map +1 -0
- package/dist/apps/index.js +8 -8
- package/dist/{chunk-DC6BYGZ6.js → chunk-2P6CJAR5.js} +4 -4
- package/dist/chunk-2P6CJAR5.js.map +1 -0
- package/dist/{chunk-26S2Q6GA.js → chunk-GO2LCDHS.js} +3 -3
- package/dist/{chunk-26S2Q6GA.js.map → chunk-GO2LCDHS.js.map} +1 -1
- package/dist/chunk-LZJW4FMH.js +7 -0
- package/dist/{chunk-KLSUJ46L.js.map → chunk-LZJW4FMH.js.map} +1 -1
- package/dist/chunk-MGGY74RY.js +14 -0
- package/dist/chunk-MGGY74RY.js.map +1 -0
- package/dist/{chunk-F54RMKRL.js → chunk-Y2F2RTXM.js} +4 -4
- package/dist/{chunk-F54RMKRL.js.map → chunk-Y2F2RTXM.js.map} +1 -1
- package/dist/index.js +9 -8
- package/dist/index.js.map +1 -1
- package/dist/ui/index.js +3 -2
- package/package.json +4 -4
- package/dist/Documents-ZTK6SSDK.js.map +0 -1
- package/dist/Preview-QZL2BXLP.js.map +0 -1
- package/dist/Spreadsheet-RCKDHL66.js.map +0 -1
- package/dist/chunk-DC6BYGZ6.js.map +0 -1
- package/dist/chunk-KLSUJ46L.js +0 -7
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ImageAnnotator_default } from './chunk-AXWC3332.js';
|
|
2
|
-
import {
|
|
3
|
-
import { AboutApp } from './chunk-F54RMKRL.js';
|
|
2
|
+
import { AboutApp } from './chunk-Y2F2RTXM.js';
|
|
4
3
|
import { peekPdfPreviewStage, claimPdfPreviewStage, PDF_PREVIEW_UPDATE_EVENT } from './chunk-3L463T5H.js';
|
|
5
|
-
import './chunk-
|
|
4
|
+
import { toast_default } from './chunk-2VM2FRZJ.js';
|
|
5
|
+
import './chunk-LZJW4FMH.js';
|
|
6
6
|
import { WindowTitle, getActiveModalId } from './chunk-MHUVU7ZX.js';
|
|
7
7
|
import './chunk-5TLIIDRZ.js';
|
|
8
8
|
import { registerModalEscapeInterceptor } from './chunk-CDR2Q64Q.js';
|
|
@@ -39,6 +39,33 @@ function truncateForTitle(s) {
|
|
|
39
39
|
if (typeof window !== "undefined" && !pdfjsLib.GlobalWorkerOptions.workerSrc) {
|
|
40
40
|
pdfjsLib.GlobalWorkerOptions.workerSrc = `https://unpkg.com/pdfjs-dist@${pdfjsLib.version}/build/pdf.worker.min.mjs`;
|
|
41
41
|
}
|
|
42
|
+
var PDF_WASM_MODULES = {
|
|
43
|
+
"jbig2.wasm": new URL("pdfjs-dist/wasm/jbig2.wasm", import.meta.url).href,
|
|
44
|
+
"openjpeg.wasm": new URL("pdfjs-dist/wasm/openjpeg.wasm", import.meta.url).href
|
|
45
|
+
};
|
|
46
|
+
var BundledPdfWasmFactory = class {
|
|
47
|
+
async fetch({ kind, filename }) {
|
|
48
|
+
if (kind !== "wasmUrl") {
|
|
49
|
+
throw new Error(`Ensure that the \`${kind}\` API parameter is provided.`);
|
|
50
|
+
}
|
|
51
|
+
const href = PDF_WASM_MODULES[filename];
|
|
52
|
+
if (!href) {
|
|
53
|
+
throw new Error(`No bundled pdf.js wasm module for "${filename}".`);
|
|
54
|
+
}
|
|
55
|
+
const res = await fetch(href);
|
|
56
|
+
if (!res.ok) {
|
|
57
|
+
throw new Error(`Unable to load wasm data at: ${href}`);
|
|
58
|
+
}
|
|
59
|
+
return new Uint8Array(await res.arrayBuffer());
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
function pdfWasmParams() {
|
|
63
|
+
const dir = typeof window !== "undefined" ? window.__REACT_OS_SHELL_PDF_WASM__ : void 0;
|
|
64
|
+
if (typeof dir === "string" && dir) {
|
|
65
|
+
return { wasmUrl: dir.endsWith("/") ? dir : `${dir}/` };
|
|
66
|
+
}
|
|
67
|
+
return { BinaryDataFactory: BundledPdfWasmFactory };
|
|
68
|
+
}
|
|
42
69
|
function swapPreviewData(prev, next) {
|
|
43
70
|
if (prev?.url && prev.url !== next.url && prev.url.startsWith("blob:")) {
|
|
44
71
|
URL.revokeObjectURL(prev.url);
|
|
@@ -327,7 +354,7 @@ function PdfPanel({ url, filename, onDownload, onEmail }) {
|
|
|
327
354
|
useEffect(() => {
|
|
328
355
|
let cancelled = false;
|
|
329
356
|
setLoading(true);
|
|
330
|
-
pdfjsLib.getDocument({ url }).promise.then((doc) => {
|
|
357
|
+
pdfjsLib.getDocument({ url, ...pdfWasmParams() }).promise.then((doc) => {
|
|
331
358
|
if (cancelled) return;
|
|
332
359
|
setPdf(doc);
|
|
333
360
|
setTotalPages(doc.numPages);
|
|
@@ -3290,5 +3317,5 @@ function ImagePanel({ url, filename, onDownload, onEmail }) {
|
|
|
3290
3317
|
}
|
|
3291
3318
|
|
|
3292
3319
|
export { Preview as default };
|
|
3293
|
-
//# sourceMappingURL=Preview-
|
|
3294
|
-
//# sourceMappingURL=Preview-
|
|
3320
|
+
//# sourceMappingURL=Preview-7QUDHTDN.js.map
|
|
3321
|
+
//# sourceMappingURL=Preview-7QUDHTDN.js.map
|