@virtualansoftware/vs-office-viewer 1.0.0 → 1.0.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/dist/index.cjs +1814 -0
- package/dist/index.d.cts +22 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.js +1777 -0
- package/package.json +1 -8
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
|
|
3
|
+
interface OfficeViewerProps {
|
|
4
|
+
/** File, Blob, or raw ArrayBuffer to render. */
|
|
5
|
+
file: File | Blob | ArrayBuffer;
|
|
6
|
+
/**
|
|
7
|
+
* Optional filename hint — used for type detection when passing a plain Blob
|
|
8
|
+
* or ArrayBuffer that carries no name information.
|
|
9
|
+
*/
|
|
10
|
+
filename?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Whether to display the View Mode toolbar for viewers that support it
|
|
13
|
+
* (DOCX and PPT). Defaults to `true`. Set to `false` to hide the toolbar;
|
|
14
|
+
* the viewer will still render using the plugin's default view mode.
|
|
15
|
+
*/
|
|
16
|
+
showViewMode?: boolean;
|
|
17
|
+
className?: string;
|
|
18
|
+
onError?: (e: Error) => void;
|
|
19
|
+
}
|
|
20
|
+
declare function OfficeViewer({ file, filename, showViewMode, className, onError, }: OfficeViewerProps): react.JSX.Element | null;
|
|
21
|
+
|
|
22
|
+
export { OfficeViewer, type OfficeViewerProps };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
|
|
3
|
+
interface OfficeViewerProps {
|
|
4
|
+
/** File, Blob, or raw ArrayBuffer to render. */
|
|
5
|
+
file: File | Blob | ArrayBuffer;
|
|
6
|
+
/**
|
|
7
|
+
* Optional filename hint — used for type detection when passing a plain Blob
|
|
8
|
+
* or ArrayBuffer that carries no name information.
|
|
9
|
+
*/
|
|
10
|
+
filename?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Whether to display the View Mode toolbar for viewers that support it
|
|
13
|
+
* (DOCX and PPT). Defaults to `true`. Set to `false` to hide the toolbar;
|
|
14
|
+
* the viewer will still render using the plugin's default view mode.
|
|
15
|
+
*/
|
|
16
|
+
showViewMode?: boolean;
|
|
17
|
+
className?: string;
|
|
18
|
+
onError?: (e: Error) => void;
|
|
19
|
+
}
|
|
20
|
+
declare function OfficeViewer({ file, filename, showViewMode, className, onError, }: OfficeViewerProps): react.JSX.Element | null;
|
|
21
|
+
|
|
22
|
+
export { OfficeViewer, type OfficeViewerProps };
|