@office-view-suite/viewer-excel 0.0.0-stage → 0.2.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/LICENSE +201 -0
- package/dist/THIRD_PARTY_NOTICES.md +102 -0
- package/dist/asset-manifest.json +18 -0
- package/dist/assets/excel/excel_view_rs_bg.wasm +0 -0
- package/dist/assets/excel/worker.js +1 -0
- package/dist/index.js +737 -0
- package/dist/licenses/aes-0.9.3/LICENSE-APACHE +201 -0
- package/dist/licenses/aes-0.9.3/LICENSE-MIT +26 -0
- package/dist/licenses/aho-corasick-1.1.5/COPYING +3 -0
- package/dist/licenses/aho-corasick-1.1.5/LICENSE-MIT +21 -0
- package/dist/licenses/autocfg-1.5.1/LICENSE-APACHE +201 -0
- package/dist/licenses/autocfg-1.5.1/LICENSE-MIT +25 -0
- package/dist/licenses/base64-0.22.1/LICENSE-APACHE +201 -0
- package/dist/licenses/base64-0.22.1/LICENSE-MIT +21 -0
- package/dist/licenses/bit-set-0.8.0/LICENSE-APACHE +201 -0
- package/dist/licenses/bit-set-0.8.0/LICENSE-MIT +25 -0
- package/dist/licenses/bit-vec-0.8.0/LICENSE-APACHE +201 -0
- package/dist/licenses/bit-vec-0.8.0/LICENSE-MIT +25 -0
- package/dist/licenses/bitflags-1.3.2/LICENSE-APACHE +201 -0
- package/dist/licenses/bitflags-1.3.2/LICENSE-MIT +25 -0
- package/dist/licenses/block-buffer-0.12.1/LICENSE-APACHE +201 -0
- package/dist/licenses/block-buffer-0.12.1/LICENSE-MIT +25 -0
- package/dist/licenses/block-padding-0.4.2/LICENSE-APACHE +201 -0
- package/dist/licenses/block-padding-0.4.2/LICENSE-MIT +25 -0
- package/dist/licenses/bumpalo-3.20.3/LICENSE-APACHE +201 -0
- package/dist/licenses/bumpalo-3.20.3/LICENSE-MIT +25 -0
- package/dist/licenses/bytemuck-1.25.2/LICENSE-APACHE +61 -0
- package/dist/licenses/bytemuck-1.25.2/LICENSE-MIT +9 -0
- package/dist/licenses/bytemuck-1.25.2/LICENSE-ZLIB +11 -0
- package/dist/licenses/byteorder-1.5.0/COPYING +3 -0
- package/dist/licenses/byteorder-1.5.0/LICENSE-MIT +21 -0
- package/dist/licenses/cbc-0.2.1/LICENSE-APACHE +201 -0
- package/dist/licenses/cbc-0.2.1/LICENSE-MIT +26 -0
- package/dist/licenses/cfb-0.14.0/LICENSE +21 -0
- package/dist/licenses/cfg-if-1.0.5/LICENSE-APACHE +201 -0
- package/dist/licenses/cfg-if-1.0.5/LICENSE-MIT +25 -0
- package/dist/licenses/chacha20-0.10.2/LICENSE-APACHE +201 -0
- package/dist/licenses/chacha20-0.10.2/LICENSE-MIT +25 -0
- package/dist/licenses/chrono-0.4.45/LICENSE.txt +240 -0
- package/dist/licenses/cipher-0.5.2/LICENSE-APACHE +201 -0
- package/dist/licenses/cipher-0.5.2/LICENSE-MIT +25 -0
- package/dist/licenses/cmov-0.5.4/LICENSE-APACHE +202 -0
- package/dist/licenses/cmov-0.5.4/LICENSE-MIT +25 -0
- package/dist/licenses/console_error_panic_hook-0.1.7/LICENSE-APACHE +201 -0
- package/dist/licenses/console_error_panic_hook-0.1.7/LICENSE-MIT +25 -0
- package/dist/licenses/const-oid-0.10.2/LICENSE-APACHE +201 -0
- package/dist/licenses/const-oid-0.10.2/LICENSE-MIT +25 -0
- package/dist/licenses/cpubits-0.1.1/LICENSE-APACHE +201 -0
- package/dist/licenses/cpubits-0.1.1/LICENSE-MIT +25 -0
- package/dist/licenses/crc32fast-1.5.2/LICENSE-APACHE +202 -0
- package/dist/licenses/crc32fast-1.5.2/LICENSE-MIT +21 -0
- package/dist/licenses/crypto-common-0.2.2/LICENSE-APACHE +201 -0
- package/dist/licenses/crypto-common-0.2.2/LICENSE-MIT +25 -0
- package/dist/licenses/ctutils-0.4.3/LICENSE-APACHE +202 -0
- package/dist/licenses/ctutils-0.4.3/LICENSE-MIT +25 -0
- package/dist/licenses/defmt-1.1.1/LICENSE-APACHE +201 -0
- package/dist/licenses/defmt-1.1.1/LICENSE-MIT +25 -0
- package/dist/licenses/defmt-macros-1.1.1/LICENSE-APACHE +201 -0
- package/dist/licenses/defmt-macros-1.1.1/LICENSE-MIT +25 -0
- package/dist/licenses/digest-0.11.3/LICENSE-APACHE +201 -0
- package/dist/licenses/digest-0.11.3/LICENSE-MIT +26 -0
- package/dist/licenses/encoding_rs-0.8.42/LICENSE-APACHE +202 -0
- package/dist/licenses/encoding_rs-0.8.42/LICENSE-MIT +25 -0
- package/dist/licenses/encoding_rs-0.8.42/LICENSE-WHATWG +26 -0
- package/dist/licenses/equivalent-1.0.3/LICENSE-APACHE +201 -0
- package/dist/licenses/equivalent-1.0.3/LICENSE-MIT +25 -0
- package/dist/licenses/fancy-regex-0.18.0/LICENSE +21 -0
- package/dist/licenses/fastrand-2.5.0/LICENSE-APACHE +201 -0
- package/dist/licenses/fastrand-2.5.0/LICENSE-MIT +23 -0
- package/dist/licenses/flate2-1.1.10/LICENSE-APACHE +201 -0
- package/dist/licenses/flate2-1.1.10/LICENSE-MIT +25 -0
- package/dist/licenses/fnv-1.0.7/LICENSE-APACHE +201 -0
- package/dist/licenses/fnv-1.0.7/LICENSE-MIT +25 -0
- package/dist/licenses/futures-core-0.3.34/LICENSE-APACHE +202 -0
- package/dist/licenses/futures-core-0.3.34/LICENSE-MIT +26 -0
- package/dist/licenses/futures-task-0.3.34/LICENSE-APACHE +202 -0
- package/dist/licenses/futures-task-0.3.34/LICENSE-MIT +26 -0
- package/dist/licenses/futures-util-0.3.34/LICENSE-APACHE +202 -0
- package/dist/licenses/futures-util-0.3.34/LICENSE-MIT +26 -0
- package/dist/licenses/getrandom-0.4.3/LICENSE-APACHE +201 -0
- package/dist/licenses/getrandom-0.4.3/LICENSE-MIT +26 -0
- package/dist/licenses/hashbrown-0.17.1/LICENSE-APACHE +201 -0
- package/dist/licenses/hashbrown-0.17.1/LICENSE-MIT +25 -0
- package/dist/licenses/hmac-0.13.0/LICENSE-APACHE +201 -0
- package/dist/licenses/hmac-0.13.0/LICENSE-MIT +25 -0
- package/dist/licenses/html5gum-0.8.4/LICENSE +19 -0
- package/dist/licenses/hybrid-array-0.4.15/LICENSE-APACHE +201 -0
- package/dist/licenses/hybrid-array-0.4.15/LICENSE-MIT +25 -0
- package/dist/licenses/imagesize-0.14.0/LICENSE +21 -0
- package/dist/licenses/indexmap-2.14.2/LICENSE-APACHE +201 -0
- package/dist/licenses/indexmap-2.14.2/LICENSE-MIT +25 -0
- package/dist/licenses/inout-0.2.3/LICENSE-APACHE +201 -0
- package/dist/licenses/inout-0.2.3/LICENSE-MIT +26 -0
- package/dist/licenses/jetscii-0.5.3/LICENSE-APACHE +201 -0
- package/dist/licenses/jetscii-0.5.3/LICENSE-MIT +25 -0
- package/dist/licenses/jiff-0.2.38/COPYING +3 -0
- package/dist/licenses/jiff-0.2.38/LICENSE-MIT +21 -0
- package/dist/licenses/jiff-core-0.1.1/COPYING +3 -0
- package/dist/licenses/jiff-core-0.1.1/LICENSE-MIT +21 -0
- package/dist/licenses/js-sys-0.3.106/LICENSE-APACHE +201 -0
- package/dist/licenses/js-sys-0.3.106/LICENSE-MIT +25 -0
- package/dist/licenses/log-0.4.34/LICENSE-APACHE +201 -0
- package/dist/licenses/log-0.4.34/LICENSE-MIT +25 -0
- package/dist/licenses/md-5-0.11.0/LICENSE-APACHE +201 -0
- package/dist/licenses/md-5-0.11.0/LICENSE-MIT +28 -0
- package/dist/licenses/memchr-2.8.3/COPYING +3 -0
- package/dist/licenses/memchr-2.8.3/LICENSE-MIT +21 -0
- package/dist/licenses/multiversion_no_op-1.0.0/LICENSE-APACHE +202 -0
- package/dist/licenses/multiversion_no_op-1.0.0/LICENSE-MIT +25 -0
- package/dist/licenses/num-traits-0.2.19/LICENSE-APACHE +201 -0
- package/dist/licenses/num-traits-0.2.19/LICENSE-MIT +25 -0
- package/dist/licenses/once_cell-1.21.4/LICENSE-APACHE +201 -0
- package/dist/licenses/once_cell-1.21.4/LICENSE-MIT +23 -0
- package/dist/licenses/phf-0.14.0/LICENSE +20 -0
- package/dist/licenses/phf_generator-0.14.0/LICENSE +20 -0
- package/dist/licenses/phf_macros-0.14.0/LICENSE +20 -0
- package/dist/licenses/phf_shared-0.14.0/LICENSE +20 -0
- package/dist/licenses/pin-project-lite-0.2.17/LICENSE-APACHE +177 -0
- package/dist/licenses/pin-project-lite-0.2.17/LICENSE-MIT +23 -0
- package/dist/licenses/proc-macro2-1.0.107/LICENSE-APACHE +176 -0
- package/dist/licenses/proc-macro2-1.0.107/LICENSE-MIT +23 -0
- package/dist/licenses/quick-xml-0.41.0/LICENSE-MIT.md +23 -0
- package/dist/licenses/quote-1.0.47/LICENSE-APACHE +176 -0
- package/dist/licenses/quote-1.0.47/LICENSE-MIT +23 -0
- package/dist/licenses/rand-0.10.3/LICENSE-APACHE +176 -0
- package/dist/licenses/rand-0.10.3/LICENSE-MIT +26 -0
- package/dist/licenses/rand_core-0.10.1/LICENSE-APACHE +187 -0
- package/dist/licenses/rand_core-0.10.1/LICENSE-MIT +25 -0
- package/dist/licenses/regex-automata-0.4.18/LICENSE-APACHE +201 -0
- package/dist/licenses/regex-automata-0.4.18/LICENSE-MIT +25 -0
- package/dist/licenses/regex-syntax-0.8.11/LICENSE-APACHE +201 -0
- package/dist/licenses/regex-syntax-0.8.11/LICENSE-MIT +25 -0
- package/dist/licenses/rgb-0.8.53/LICENSE +21 -0
- package/dist/licenses/rustversion-1.0.23/LICENSE-APACHE +176 -0
- package/dist/licenses/rustversion-1.0.23/LICENSE-MIT +23 -0
- package/dist/licenses/scopeguard-1.2.0/LICENSE-APACHE +201 -0
- package/dist/licenses/scopeguard-1.2.0/LICENSE-MIT +25 -0
- package/dist/licenses/serde-1.0.229/LICENSE-APACHE +176 -0
- package/dist/licenses/serde-1.0.229/LICENSE-MIT +23 -0
- package/dist/licenses/serde-wasm-bindgen-0.6.5/LICENSE +21 -0
- package/dist/licenses/serde_core-1.0.229/LICENSE-APACHE +176 -0
- package/dist/licenses/serde_core-1.0.229/LICENSE-MIT +23 -0
- package/dist/licenses/serde_derive-1.0.229/LICENSE-APACHE +176 -0
- package/dist/licenses/serde_derive-1.0.229/LICENSE-MIT +23 -0
- package/dist/licenses/sha2-0.11.1/LICENSE-APACHE +201 -0
- package/dist/licenses/sha2-0.11.1/LICENSE-MIT +28 -0
- package/dist/licenses/simd-adler32-0.3.10/LICENSE.md +21 -0
- package/dist/licenses/siphasher-1.0.4/COPYING +7 -0
- package/dist/licenses/siphasher-1.0.4/LICENSE-APACHE +202 -0
- package/dist/licenses/siphasher-1.0.4/LICENSE-MIT +17 -0
- package/dist/licenses/slab-0.4.12/LICENSE +25 -0
- package/dist/licenses/syn-2.0.119/LICENSE-APACHE +176 -0
- package/dist/licenses/syn-2.0.119/LICENSE-MIT +23 -0
- package/dist/licenses/syn-3.0.9/LICENSE-APACHE +176 -0
- package/dist/licenses/syn-3.0.9/LICENSE-MIT +23 -0
- package/dist/licenses/thiserror-2.0.21/LICENSE-APACHE +176 -0
- package/dist/licenses/thiserror-2.0.21/LICENSE-MIT +23 -0
- package/dist/licenses/thiserror-impl-2.0.21/LICENSE-APACHE +176 -0
- package/dist/licenses/thiserror-impl-2.0.21/LICENSE-MIT +23 -0
- package/dist/licenses/thousands-0.2.0/LICENSE-APACHE +201 -0
- package/dist/licenses/thousands-0.2.0/LICENSE-MIT +25 -0
- package/dist/licenses/typed-path-0.12.3/LICENSE-APACHE +176 -0
- package/dist/licenses/typed-path-0.12.3/LICENSE-MIT +23 -0
- package/dist/licenses/typenum-1.20.1/LICENSE +1 -0
- package/dist/licenses/typenum-1.20.1/LICENSE-APACHE +201 -0
- package/dist/licenses/typenum-1.20.1/LICENSE-MIT +21 -0
- package/dist/licenses/umya-spreadsheet-3.1.1/LICENSE +21 -0
- package/dist/licenses/unicode-ident-1.0.27/LICENSE-APACHE +176 -0
- package/dist/licenses/unicode-ident-1.0.27/LICENSE-MIT +23 -0
- package/dist/licenses/unicode-ident-1.0.27/LICENSE-UNICODE +39 -0
- package/dist/licenses/uuid-1.28.0/LICENSE-APACHE +201 -0
- package/dist/licenses/uuid-1.28.0/LICENSE-MIT +26 -0
- package/dist/licenses/wasm-bindgen-0.2.129/LICENSE-APACHE +201 -0
- package/dist/licenses/wasm-bindgen-0.2.129/LICENSE-MIT +25 -0
- package/dist/licenses/wasm-bindgen-macro-0.2.129/LICENSE-APACHE +201 -0
- package/dist/licenses/wasm-bindgen-macro-0.2.129/LICENSE-MIT +25 -0
- package/dist/licenses/wasm-bindgen-macro-support-0.2.129/LICENSE-APACHE +201 -0
- package/dist/licenses/wasm-bindgen-macro-support-0.2.129/LICENSE-MIT +25 -0
- package/dist/licenses/wasm-bindgen-shared-0.2.129/LICENSE-APACHE +201 -0
- package/dist/licenses/wasm-bindgen-shared-0.2.129/LICENSE-MIT +25 -0
- package/dist/licenses/web-time-1.1.0/LICENSE-APACHE +201 -0
- package/dist/licenses/web-time-1.1.0/LICENSE-MIT +21 -0
- package/dist/licenses/zip-8.6.0/LICENSE +21 -0
- package/dist/licenses/zlib-rs-0.6.8/LICENSE +19 -0
- package/dist/licenses/zopfli-0.8.4/COPYING +201 -0
- package/dist/types/core/format.d.ts +4 -0
- package/dist/types/core/layout.d.ts +51 -0
- package/dist/types/core/render.d.ts +20 -0
- package/dist/types/core/styles.d.ts +4 -0
- package/dist/types/core/types.d.ts +121 -0
- package/dist/types/core/virtual.d.ts +39 -0
- package/dist/types/index.d.ts +22 -0
- package/package.json +30 -3
- package/README.md +0 -3
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/** excel-view-rs(wasm shim)输出的文档模型 */
|
|
2
|
+
export interface ExcelDoc {
|
|
3
|
+
sheets: ExcelSheet[];
|
|
4
|
+
date1904?: boolean;
|
|
5
|
+
activeTab?: number;
|
|
6
|
+
}
|
|
7
|
+
export interface ExcelSheet {
|
|
8
|
+
name: string;
|
|
9
|
+
/** Missing state means visible; hidden sheets remain in the parsed workbook. */
|
|
10
|
+
state?: 'visible' | 'hidden' | 'veryHidden';
|
|
11
|
+
date1904?: boolean;
|
|
12
|
+
showGridLines?: boolean;
|
|
13
|
+
defaultColWidth?: number;
|
|
14
|
+
defaultRowHeight?: number;
|
|
15
|
+
highestCol: number;
|
|
16
|
+
highestRow: number;
|
|
17
|
+
merges: string[];
|
|
18
|
+
colWidths: {
|
|
19
|
+
col: number;
|
|
20
|
+
width: number;
|
|
21
|
+
hidden?: boolean;
|
|
22
|
+
}[];
|
|
23
|
+
rowHeights: {
|
|
24
|
+
row: number;
|
|
25
|
+
height: number;
|
|
26
|
+
hidden?: boolean;
|
|
27
|
+
customHeight?: boolean;
|
|
28
|
+
}[];
|
|
29
|
+
cells: ExcelCell[];
|
|
30
|
+
images: ExcelImage[];
|
|
31
|
+
shapes: ExcelShape[];
|
|
32
|
+
frozenColumns: number;
|
|
33
|
+
frozenRows: number;
|
|
34
|
+
}
|
|
35
|
+
export interface ExcelCell {
|
|
36
|
+
col: number;
|
|
37
|
+
row: number;
|
|
38
|
+
value: string;
|
|
39
|
+
valueType?: 'number' | 'string' | 'boolean' | 'error' | 'date' | 'empty';
|
|
40
|
+
cachedValuePresent?: boolean;
|
|
41
|
+
date1904?: boolean;
|
|
42
|
+
formula?: string;
|
|
43
|
+
fontName?: string;
|
|
44
|
+
fontSize?: number;
|
|
45
|
+
bold: boolean;
|
|
46
|
+
italic: boolean;
|
|
47
|
+
underline: boolean;
|
|
48
|
+
fontColor?: string;
|
|
49
|
+
fill?: string;
|
|
50
|
+
hAlign?: string;
|
|
51
|
+
vAlign?: string;
|
|
52
|
+
wrapText?: boolean;
|
|
53
|
+
borderLeft?: string;
|
|
54
|
+
borderRight?: string;
|
|
55
|
+
borderTop?: string;
|
|
56
|
+
borderBottom?: string;
|
|
57
|
+
borderLeftColor?: string;
|
|
58
|
+
borderRightColor?: string;
|
|
59
|
+
borderTopColor?: string;
|
|
60
|
+
borderBottomColor?: string;
|
|
61
|
+
numfmt?: string;
|
|
62
|
+
richText?: ExcelRichTextRun[];
|
|
63
|
+
}
|
|
64
|
+
export interface ExcelRichTextRun {
|
|
65
|
+
text: string;
|
|
66
|
+
fontName?: string;
|
|
67
|
+
fontSize?: number;
|
|
68
|
+
bold?: boolean;
|
|
69
|
+
italic?: boolean;
|
|
70
|
+
underline?: boolean;
|
|
71
|
+
fontColor?: string;
|
|
72
|
+
}
|
|
73
|
+
export interface ExcelImage {
|
|
74
|
+
col: number;
|
|
75
|
+
row: number;
|
|
76
|
+
toCol?: number;
|
|
77
|
+
toRow?: number;
|
|
78
|
+
widthPx?: number;
|
|
79
|
+
heightPx?: number;
|
|
80
|
+
data: string;
|
|
81
|
+
name: string;
|
|
82
|
+
fitCell: boolean;
|
|
83
|
+
offsetXPx?: number;
|
|
84
|
+
offsetYPx?: number;
|
|
85
|
+
toOffsetXPx?: number;
|
|
86
|
+
toOffsetYPx?: number;
|
|
87
|
+
/** DrawingML source insets as fractions; negative values extend into transparent space. */
|
|
88
|
+
crop?: {
|
|
89
|
+
left: number;
|
|
90
|
+
top: number;
|
|
91
|
+
right: number;
|
|
92
|
+
bottom: number;
|
|
93
|
+
};
|
|
94
|
+
/** Clockwise degrees, applied after flips about the anchor's center. */
|
|
95
|
+
rotation?: number;
|
|
96
|
+
flipH?: boolean;
|
|
97
|
+
flipV?: boolean;
|
|
98
|
+
}
|
|
99
|
+
export interface ExcelShape {
|
|
100
|
+
col: number;
|
|
101
|
+
row: number;
|
|
102
|
+
toCol?: number;
|
|
103
|
+
toRow?: number;
|
|
104
|
+
widthPx?: number;
|
|
105
|
+
heightPx?: number;
|
|
106
|
+
offsetXPx: number;
|
|
107
|
+
offsetYPx: number;
|
|
108
|
+
toOffsetXPx?: number;
|
|
109
|
+
toOffsetYPx?: number;
|
|
110
|
+
rotation?: number;
|
|
111
|
+
flipH?: boolean;
|
|
112
|
+
flipV?: boolean;
|
|
113
|
+
name: string;
|
|
114
|
+
geometry: string;
|
|
115
|
+
fill?: string;
|
|
116
|
+
lineColor?: string;
|
|
117
|
+
lineWidthPx?: number;
|
|
118
|
+
paragraphs: {
|
|
119
|
+
runs: ExcelRichTextRun[];
|
|
120
|
+
}[];
|
|
121
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Axis, RangeIndex, type CellRange } from './layout';
|
|
2
|
+
import type { ExcelCell, ExcelImage, ExcelShape, ExcelSheet } from './types';
|
|
3
|
+
export declare const VIRTUAL_CELL_THRESHOLD = 10000;
|
|
4
|
+
interface Overlay extends CellRange {
|
|
5
|
+
key: string;
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
image?: ExcelImage;
|
|
11
|
+
shape?: ExcelShape;
|
|
12
|
+
}
|
|
13
|
+
interface SheetLayout {
|
|
14
|
+
columns: Axis;
|
|
15
|
+
rows: Axis;
|
|
16
|
+
width: number;
|
|
17
|
+
height: number;
|
|
18
|
+
merges: RangeIndex<CellRange>;
|
|
19
|
+
cells: Map<string, ExcelCell>;
|
|
20
|
+
overlays: RangeIndex<Overlay>;
|
|
21
|
+
}
|
|
22
|
+
export interface VirtualCache {
|
|
23
|
+
layout?: SheetLayout;
|
|
24
|
+
}
|
|
25
|
+
export interface SheetView {
|
|
26
|
+
element: HTMLElement;
|
|
27
|
+
viewport: HTMLElement;
|
|
28
|
+
resize(): void;
|
|
29
|
+
getContentWidth(): number;
|
|
30
|
+
dispose(): void;
|
|
31
|
+
}
|
|
32
|
+
interface Renderers {
|
|
33
|
+
cell(cell: ExcelCell | undefined, row: number, col: number): HTMLElement;
|
|
34
|
+
image(source: ExcelImage): HTMLElement;
|
|
35
|
+
shape(source: ExcelShape): HTMLElement;
|
|
36
|
+
}
|
|
37
|
+
export declare function sheetLayout(sheet: ExcelSheet, owner: Document, family: string): SheetLayout;
|
|
38
|
+
export declare function renderVirtualSheet(sheet: ExcelSheet, element: HTMLElement, viewport: HTMLElement, grid: HTMLElement, cache: VirtualCache, renderers: Renderers, onError?: (error: Error) => void, onContentChange?: () => void): SheetView;
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type OfficeOpenRequest, type OfficeOpenResult, type OfficeViewerError, type OfficeViewerOptions } from '@office-view-suite/viewer-core';
|
|
2
|
+
import type { ExcelDoc } from './core/types';
|
|
3
|
+
export declare function createExcelAdapter(options?: OfficeViewerOptions): {
|
|
4
|
+
open(request: OfficeOpenRequest): Promise<OfficeOpenResult & {
|
|
5
|
+
document: ExcelDoc;
|
|
6
|
+
}>;
|
|
7
|
+
render(host: HTMLElement, document: ExcelDoc, onError?: (error: OfficeViewerError) => void, onContentChange?: () => void): {
|
|
8
|
+
stats: {
|
|
9
|
+
sheets: number;
|
|
10
|
+
rows: number;
|
|
11
|
+
cols: number;
|
|
12
|
+
merges: number;
|
|
13
|
+
images: number;
|
|
14
|
+
shapes: number;
|
|
15
|
+
};
|
|
16
|
+
resize(): void;
|
|
17
|
+
setZoom(scale: number): void;
|
|
18
|
+
getContentWidth(): number;
|
|
19
|
+
dispose(): void;
|
|
20
|
+
};
|
|
21
|
+
destroy: () => void;
|
|
22
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@office-view-suite/viewer-excel",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"license": "Apache-2.0",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"type": "module",
|
|
9
|
+
"main": "./dist/index.js",
|
|
10
|
+
"module": "./dist/index.js",
|
|
11
|
+
"types": "./dist/types/index.d.ts",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/types/index.d.ts",
|
|
15
|
+
"import": "./dist/index.js"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist"
|
|
20
|
+
],
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@office-view-suite/viewer-core": "0.2.1"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"typescript": "^5.6.0",
|
|
26
|
+
"vite": "^6.0.0"
|
|
27
|
+
},
|
|
28
|
+
"scripts": {
|
|
29
|
+
"build": "node ../../scripts/prepare-sdk-assets.mjs excel && vite build && tsc -p tsconfig.build.json && node ../../scripts/collect-sdk-notices.mjs excel",
|
|
30
|
+
"typecheck": "tsc --noEmit",
|
|
31
|
+
"wasm": "node ../../scripts/build-wasm.mjs excel"
|
|
32
|
+
}
|
|
6
33
|
}
|
package/README.md
DELETED