@canvas-components/xlsx-table 0.1.5 → 0.1.7

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 (38) hide show
  1. package/README.md +142 -22
  2. package/dist/cleaning/worker-loader.d.ts +4 -0
  3. package/dist/cleaning/worker-loader.js +9 -0
  4. package/dist/cleaning/xlsx-cleaning.worker.d.ts +2 -0
  5. package/dist/cleaning/xlsx-cleaning.worker.js +34694 -0
  6. package/dist/file/index.cjs +8289 -0
  7. package/dist/file/index.d.cts +60 -0
  8. package/dist/file/index.d.ts +60 -0
  9. package/dist/file/index.js +8259 -0
  10. package/dist/file/ooxml/index.cjs +8481 -0
  11. package/dist/file/ooxml/index.d.cts +16 -0
  12. package/dist/file/ooxml/index.d.ts +16 -0
  13. package/dist/file/ooxml/index.js +8442 -0
  14. package/dist/file/ooxml/node.cjs +8451 -0
  15. package/dist/file/ooxml/node.d.cts +16 -0
  16. package/dist/file/ooxml/node.d.ts +16 -0
  17. package/dist/file/ooxml/node.js +8412 -0
  18. package/dist/file/worker-loader.d.ts +4 -0
  19. package/dist/file/worker-loader.js +9 -0
  20. package/dist/file/xlsx-file.worker.d.ts +2 -0
  21. package/dist/file/xlsx-file.worker.js +41188 -0
  22. package/dist/file-DZPF-DHF.d.cts +22 -0
  23. package/dist/file-DZPF-DHF.d.ts +22 -0
  24. package/dist/index.cjs +22754 -11711
  25. package/dist/index.d.cts +1163 -326
  26. package/dist/index.d.ts +1163 -326
  27. package/dist/index.js +22599 -11601
  28. package/dist/native-parts/worker-loader.d.ts +87 -0
  29. package/dist/native-parts/worker-loader.js +9 -0
  30. package/dist/native-parts/xlsx-native-parts.worker.d.ts +2 -0
  31. package/dist/native-parts/xlsx-native-parts.worker.js +33766 -0
  32. package/dist/sheet-settings-Bv1KD6XD.d.cts +301 -0
  33. package/dist/sheet-settings-CRncG11p.d.ts +301 -0
  34. package/dist/sheet-settings-ClWkuEGB.d.ts +135 -0
  35. package/dist/sheet-settings-D8pfrp_9.d.cts +135 -0
  36. package/dist/source-initialization-tTsaT4GH.d.cts +6 -0
  37. package/dist/source-initialization-tTsaT4GH.d.ts +6 -0
  38. package/package.json +37 -3
@@ -0,0 +1,301 @@
1
+ import { b as XlsxSourceDiagnostics } from './file-DZPF-DHF.cjs';
2
+ import { CellObject } from 'xlsx';
3
+
4
+ /** 标准files条目的公开字节字段;其余原生元数据原样保留。 */
5
+ interface XlsxNativeFileEntry {
6
+ name: string;
7
+ type: 2;
8
+ size: number;
9
+ content: Uint8Array;
10
+ [key: string]: unknown;
11
+ }
12
+ /** null表示原先不存在;删除使用after undefined,不能跳过旧内容指纹。 */
13
+ interface XlsxNativePartChange {
14
+ path: string;
15
+ expectedHash: string | null;
16
+ after: Uint8Array | undefined;
17
+ }
18
+ interface XlsxNativeTransaction extends XlsxNativeCellTransaction {
19
+ parts: XlsxNativePartChange[];
20
+ }
21
+ /** 只保存本次触及的标准部件,不复制其余原生包。 */
22
+ interface XlsxNativePartSnapshot {
23
+ path: string;
24
+ file: XlsxNativeFileEntry | undefined;
25
+ }
26
+ interface XlsxNativePartsHistoryEntry {
27
+ kind: "native-parts";
28
+ before: XlsxNativeCellChange[];
29
+ after: XlsxNativeCellChange[];
30
+ beforeRefs: Record<string, string | undefined>;
31
+ afterRefs: Record<string, string | undefined>;
32
+ beforeParts: XlsxNativePartSnapshot[];
33
+ afterParts: XlsxNativePartSnapshot[];
34
+ beforeHadFiles: boolean;
35
+ afterHadFiles: boolean;
36
+ beforeSourceDiagnostics?: XlsxSourceDiagnostics;
37
+ afterSourceDiagnostics?: XlsxSourceDiagnostics;
38
+ }
39
+ type XlsxNativeTransactionResult = {
40
+ status: "applied";
41
+ changedCells: number;
42
+ changedParts: number;
43
+ } | {
44
+ status: "noop";
45
+ } | {
46
+ status: "rejected";
47
+ reason: string;
48
+ };
49
+
50
+ /** 文档操作戳,与 XLSX 内容独立。 */
51
+ interface XlsxDocumentStamp {
52
+ sessionId: string;
53
+ revision: number;
54
+ }
55
+ /** 一次操作的原生单元格快照,地址为 A1。 */
56
+ interface XlsxNativeCellChange {
57
+ sheetName: string;
58
+ address: string;
59
+ after: CellObject | undefined;
60
+ }
61
+ /** 原生多表单元格事务。 */
62
+ interface XlsxNativeCellTransaction {
63
+ stamp: XlsxDocumentStamp;
64
+ changes: XlsxNativeCellChange[];
65
+ }
66
+ type XlsxNativeCommitResult = {
67
+ status: "applied";
68
+ changedCells: number;
69
+ } | {
70
+ status: "noop";
71
+ } | {
72
+ status: "rejected";
73
+ reason: string;
74
+ };
75
+
76
+ /**
77
+ * 单元格地址,内部 0 基索引。
78
+ */
79
+ interface XlsxCellAddress {
80
+ rowIndex: number;
81
+ columnIndex: number;
82
+ }
83
+ /**
84
+ * 矩形选区,内部 0 基索引。
85
+ */
86
+ interface XlsxCellRange {
87
+ startRowIndex: number;
88
+ startColumnIndex: number;
89
+ endRowIndex: number;
90
+ endColumnIndex: number;
91
+ }
92
+ /**
93
+ * 列名工具:0 -> A, 25 -> Z, 26 -> AA。
94
+ */
95
+ declare function columnIndexToName(columnIndex: number): string;
96
+ /**
97
+ * 列名转索引:A -> 0, Z -> 25, AA -> 26。
98
+ */
99
+ declare function columnNameToIndex(name: string): number;
100
+ /**
101
+ * 生成内部 cell key。
102
+ */
103
+ declare function getCellKey(rowIndex: number, columnIndex: number): string;
104
+ /**
105
+ * 解析 cell key。
106
+ */
107
+ declare function parseCellKey(key: string): XlsxCellAddress | null;
108
+ /**
109
+ * 地址转 A1 文本。
110
+ */
111
+ declare function addressToA1(address: XlsxCellAddress): string;
112
+ /**
113
+ * 归一化矩形选区。
114
+ */
115
+ declare function normalizeRange(range: XlsxCellRange): XlsxCellRange;
116
+
117
+ type XlsxCellValue = string | number | boolean | Date | null;
118
+ type XlsxCellType = "text" | "number" | "money" | "percent" | "date" | "datetime" | "boolean";
119
+ type XlsxCellBorderLineStyle = "solid" | "dashed" | "dotted";
120
+ interface XlsxCellBorderLine {
121
+ color: string;
122
+ width: number;
123
+ style: XlsxCellBorderLineStyle;
124
+ }
125
+ interface XlsxCellBorders {
126
+ top?: XlsxCellBorderLine;
127
+ right?: XlsxCellBorderLine;
128
+ bottom?: XlsxCellBorderLine;
129
+ left?: XlsxCellBorderLine;
130
+ diagonalDown?: XlsxCellBorderLine;
131
+ }
132
+ type XlsxCellBorderPreset = "all" | "outer" | "inner" | "horizontal" | "vertical" | "left" | "right" | "top" | "bottom" | "diagonal-down" | "none";
133
+ interface XlsxCellStyle {
134
+ backgroundColor?: string;
135
+ color?: string;
136
+ fontFamily?: string;
137
+ fontSize?: number;
138
+ fontWeight?: string;
139
+ fontStyle?: "normal" | "italic";
140
+ textDecoration?: "underline" | "line-through";
141
+ textAlign?: CanvasTextAlign;
142
+ verticalAlign?: "top" | "middle" | "bottom";
143
+ border?: XlsxCellBorders;
144
+ }
145
+ interface XlsxRowConfig {
146
+ hpx?: number;
147
+ hpt?: number;
148
+ hidden?: boolean;
149
+ filtered?: boolean;
150
+ }
151
+ interface XlsxColumnConfig {
152
+ wpx?: number;
153
+ wch?: number;
154
+ width?: number;
155
+ hidden?: boolean;
156
+ }
157
+ interface XlsxFrozenPane {
158
+ rows?: number;
159
+ columns?: number;
160
+ }
161
+ type XlsxSortDirection = "asc" | "desc";
162
+ interface XlsxSheetSortState {
163
+ columnIndex: number;
164
+ direction: XlsxSortDirection;
165
+ /** 当前排序范围的起始行。 */
166
+ startRowIndex?: number;
167
+ /** 当前排序范围的结束行。 */
168
+ endRowIndex?: number;
169
+ /** 当前各行在排序前对应的原始行索引。 */
170
+ originalRowIndexes?: number[];
171
+ }
172
+ type XlsxFilterValue = string | number | boolean | null;
173
+ type XlsxFilterConditionOperator = "none" | "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "between" | "notBetween" | "startsWith" | "notStartsWith" | "endsWith" | "notEndsWith" | "includes" | "notIncludes" | "blank" | "notBlank";
174
+ type XlsxFilterConditionRelation = "and" | "or";
175
+ interface XlsxFilterCondition {
176
+ operator: XlsxFilterConditionOperator;
177
+ value?: string;
178
+ secondValue?: string;
179
+ }
180
+ interface XlsxColumnFilterState {
181
+ columnIndex: number;
182
+ values: XlsxFilterValue[];
183
+ includeBlank?: boolean;
184
+ includeNonBlank?: boolean;
185
+ condition?: XlsxFilterCondition;
186
+ secondCondition?: XlsxFilterCondition;
187
+ conditionRelation?: XlsxFilterConditionRelation;
188
+ }
189
+ interface XlsxSheetFilterState {
190
+ columns: Record<number, XlsxColumnFilterState>;
191
+ }
192
+ interface XlsxMergedRange extends XlsxCellRange {
193
+ }
194
+ /**
195
+ * workbook 级命名区域。
196
+ */
197
+ interface XlsxNamedRange {
198
+ /** 名称:字母/下划线开头;大小写不敏感唯一。 */
199
+ name: string;
200
+ /** 锚定 sheet。 */
201
+ sheetId: string;
202
+ /** 单格或矩形区域。 */
203
+ range: XlsxCellRange;
204
+ comment?: string;
205
+ }
206
+ interface XlsxCollaborator {
207
+ id: string;
208
+ name?: string;
209
+ color?: string;
210
+ avatar?: string;
211
+ }
212
+ interface XlsxRemoteSelection {
213
+ user: XlsxCollaborator;
214
+ sheetId: string;
215
+ activeCell: XlsxCellAddress | null;
216
+ ranges: XlsxCellRange[];
217
+ updatedAt: number;
218
+ }
219
+
220
+ /** 本地打印设置,不宣称已保存到 XLSX pageSetup。 */
221
+ interface XlsxPrintOptions {
222
+ sheetName?: string;
223
+ range?: XlsxCellRange;
224
+ paper?: "A4" | "Letter";
225
+ orientation?: "portrait" | "landscape";
226
+ marginMm?: number;
227
+ scale?: number;
228
+ fitWidth?: boolean;
229
+ showGridlines?: boolean;
230
+ showHeaders?: boolean;
231
+ includeHidden?: boolean;
232
+ includeFiltered?: boolean;
233
+ repeatFirstRow?: boolean;
234
+ }
235
+ type XlsxResolvedPrintOptions = Required<Omit<XlsxPrintOptions, "range">> & {
236
+ range?: XlsxCellRange;
237
+ };
238
+ interface XlsxPrintCell {
239
+ address: string;
240
+ rowIndex: number;
241
+ columnIndex: number;
242
+ x: number;
243
+ y: number;
244
+ width: number;
245
+ height: number;
246
+ text: string;
247
+ cell?: CellObject;
248
+ }
249
+ interface XlsxPrintPage {
250
+ rowIndices: number[];
251
+ columnIndices: number[];
252
+ rowSizes: number[];
253
+ columnSizes: number[];
254
+ cells: XlsxPrintCell[];
255
+ }
256
+ /** 页布局是当前原生工作簿的只读派生结果,不可反向写回作为业务模型。 */
257
+ interface XlsxPrintPlan {
258
+ stamp: XlsxDocumentStamp;
259
+ options: XlsxResolvedPrintOptions;
260
+ paper: {
261
+ widthMm: number;
262
+ heightMm: number;
263
+ widthPx: number;
264
+ heightPx: number;
265
+ };
266
+ contentWidth: number;
267
+ contentHeight: number;
268
+ scale: number;
269
+ pages: XlsxPrintPage[];
270
+ warnings: string[];
271
+ }
272
+
273
+ /** 标准worksheet页面节点的临时查询/编辑参数,不是新的工作簿存储。 */
274
+ type XlsxSavedPrintOptions = Pick<XlsxPrintOptions, "paper" | "orientation" | "marginMm" | "scale" | "fitWidth" | "showGridlines" | "showHeaders">;
275
+ interface XlsxNativeSheetSettings {
276
+ frozen: XlsxFrozenPane | null;
277
+ print: XlsxSavedPrintOptions;
278
+ warnings: string[];
279
+ unsupportedPaper?: boolean;
280
+ printArea?: XlsxCellRange | null;
281
+ repeatRows?: {
282
+ startRowIndex: number;
283
+ endRowIndex: number;
284
+ } | null;
285
+ restrictions?: {
286
+ freeze?: string;
287
+ print?: string;
288
+ printNames?: string;
289
+ };
290
+ }
291
+ interface XlsxNativeSheetSettingsPatch {
292
+ frozen?: XlsxFrozenPane | null;
293
+ print?: XlsxSavedPrintOptions;
294
+ printArea?: XlsxCellRange | null;
295
+ repeatRows?: {
296
+ startRowIndex: number;
297
+ endRowIndex: number;
298
+ } | null;
299
+ }
300
+
301
+ export { type XlsxNativeCellTransaction as A, type XlsxNamedRange as B, type XlsxCellStyle as C, type XlsxCellBorderPreset as D, type XlsxCellBorderLine as E, type XlsxCellBorderLineStyle as F, type XlsxCellBorders as G, type XlsxColumnFilterState as H, type XlsxFilterConditionOperator as I, type XlsxNativePartChange as J, type XlsxNativePartSnapshot as K, type XlsxPrintCell as L, type XlsxPrintPage as M, type XlsxResolvedPrintOptions as N, addressToA1 as O, columnIndexToName as P, columnNameToIndex as Q, getCellKey as R, normalizeRange as S, parseCellKey as T, type XlsxNativeSheetSettings as X, type XlsxNativeSheetSettingsPatch as a, type XlsxSavedPrintOptions as b, type XlsxDocumentStamp as c, type XlsxNativeTransaction as d, type XlsxCellRange as e, type XlsxNativeCellChange as f, type XlsxCellAddress as g, type XlsxCellValue as h, type XlsxCellType as i, type XlsxNativePartsHistoryEntry as j, type XlsxRowConfig as k, type XlsxColumnConfig as l, type XlsxSheetFilterState as m, type XlsxFrozenPane as n, type XlsxMergedRange as o, type XlsxSheetSortState as p, type XlsxRemoteSelection as q, type XlsxCollaborator as r, type XlsxFilterValue as s, type XlsxFilterCondition as t, type XlsxFilterConditionRelation as u, type XlsxSortDirection as v, type XlsxNativeTransactionResult as w, type XlsxPrintOptions as x, type XlsxPrintPlan as y, type XlsxNativeCommitResult as z };
@@ -0,0 +1,301 @@
1
+ import { b as XlsxSourceDiagnostics } from './file-DZPF-DHF.js';
2
+ import { CellObject } from 'xlsx';
3
+
4
+ /** 标准files条目的公开字节字段;其余原生元数据原样保留。 */
5
+ interface XlsxNativeFileEntry {
6
+ name: string;
7
+ type: 2;
8
+ size: number;
9
+ content: Uint8Array;
10
+ [key: string]: unknown;
11
+ }
12
+ /** null表示原先不存在;删除使用after undefined,不能跳过旧内容指纹。 */
13
+ interface XlsxNativePartChange {
14
+ path: string;
15
+ expectedHash: string | null;
16
+ after: Uint8Array | undefined;
17
+ }
18
+ interface XlsxNativeTransaction extends XlsxNativeCellTransaction {
19
+ parts: XlsxNativePartChange[];
20
+ }
21
+ /** 只保存本次触及的标准部件,不复制其余原生包。 */
22
+ interface XlsxNativePartSnapshot {
23
+ path: string;
24
+ file: XlsxNativeFileEntry | undefined;
25
+ }
26
+ interface XlsxNativePartsHistoryEntry {
27
+ kind: "native-parts";
28
+ before: XlsxNativeCellChange[];
29
+ after: XlsxNativeCellChange[];
30
+ beforeRefs: Record<string, string | undefined>;
31
+ afterRefs: Record<string, string | undefined>;
32
+ beforeParts: XlsxNativePartSnapshot[];
33
+ afterParts: XlsxNativePartSnapshot[];
34
+ beforeHadFiles: boolean;
35
+ afterHadFiles: boolean;
36
+ beforeSourceDiagnostics?: XlsxSourceDiagnostics;
37
+ afterSourceDiagnostics?: XlsxSourceDiagnostics;
38
+ }
39
+ type XlsxNativeTransactionResult = {
40
+ status: "applied";
41
+ changedCells: number;
42
+ changedParts: number;
43
+ } | {
44
+ status: "noop";
45
+ } | {
46
+ status: "rejected";
47
+ reason: string;
48
+ };
49
+
50
+ /** 文档操作戳,与 XLSX 内容独立。 */
51
+ interface XlsxDocumentStamp {
52
+ sessionId: string;
53
+ revision: number;
54
+ }
55
+ /** 一次操作的原生单元格快照,地址为 A1。 */
56
+ interface XlsxNativeCellChange {
57
+ sheetName: string;
58
+ address: string;
59
+ after: CellObject | undefined;
60
+ }
61
+ /** 原生多表单元格事务。 */
62
+ interface XlsxNativeCellTransaction {
63
+ stamp: XlsxDocumentStamp;
64
+ changes: XlsxNativeCellChange[];
65
+ }
66
+ type XlsxNativeCommitResult = {
67
+ status: "applied";
68
+ changedCells: number;
69
+ } | {
70
+ status: "noop";
71
+ } | {
72
+ status: "rejected";
73
+ reason: string;
74
+ };
75
+
76
+ /**
77
+ * 单元格地址,内部 0 基索引。
78
+ */
79
+ interface XlsxCellAddress {
80
+ rowIndex: number;
81
+ columnIndex: number;
82
+ }
83
+ /**
84
+ * 矩形选区,内部 0 基索引。
85
+ */
86
+ interface XlsxCellRange {
87
+ startRowIndex: number;
88
+ startColumnIndex: number;
89
+ endRowIndex: number;
90
+ endColumnIndex: number;
91
+ }
92
+ /**
93
+ * 列名工具:0 -> A, 25 -> Z, 26 -> AA。
94
+ */
95
+ declare function columnIndexToName(columnIndex: number): string;
96
+ /**
97
+ * 列名转索引:A -> 0, Z -> 25, AA -> 26。
98
+ */
99
+ declare function columnNameToIndex(name: string): number;
100
+ /**
101
+ * 生成内部 cell key。
102
+ */
103
+ declare function getCellKey(rowIndex: number, columnIndex: number): string;
104
+ /**
105
+ * 解析 cell key。
106
+ */
107
+ declare function parseCellKey(key: string): XlsxCellAddress | null;
108
+ /**
109
+ * 地址转 A1 文本。
110
+ */
111
+ declare function addressToA1(address: XlsxCellAddress): string;
112
+ /**
113
+ * 归一化矩形选区。
114
+ */
115
+ declare function normalizeRange(range: XlsxCellRange): XlsxCellRange;
116
+
117
+ type XlsxCellValue = string | number | boolean | Date | null;
118
+ type XlsxCellType = "text" | "number" | "money" | "percent" | "date" | "datetime" | "boolean";
119
+ type XlsxCellBorderLineStyle = "solid" | "dashed" | "dotted";
120
+ interface XlsxCellBorderLine {
121
+ color: string;
122
+ width: number;
123
+ style: XlsxCellBorderLineStyle;
124
+ }
125
+ interface XlsxCellBorders {
126
+ top?: XlsxCellBorderLine;
127
+ right?: XlsxCellBorderLine;
128
+ bottom?: XlsxCellBorderLine;
129
+ left?: XlsxCellBorderLine;
130
+ diagonalDown?: XlsxCellBorderLine;
131
+ }
132
+ type XlsxCellBorderPreset = "all" | "outer" | "inner" | "horizontal" | "vertical" | "left" | "right" | "top" | "bottom" | "diagonal-down" | "none";
133
+ interface XlsxCellStyle {
134
+ backgroundColor?: string;
135
+ color?: string;
136
+ fontFamily?: string;
137
+ fontSize?: number;
138
+ fontWeight?: string;
139
+ fontStyle?: "normal" | "italic";
140
+ textDecoration?: "underline" | "line-through";
141
+ textAlign?: CanvasTextAlign;
142
+ verticalAlign?: "top" | "middle" | "bottom";
143
+ border?: XlsxCellBorders;
144
+ }
145
+ interface XlsxRowConfig {
146
+ hpx?: number;
147
+ hpt?: number;
148
+ hidden?: boolean;
149
+ filtered?: boolean;
150
+ }
151
+ interface XlsxColumnConfig {
152
+ wpx?: number;
153
+ wch?: number;
154
+ width?: number;
155
+ hidden?: boolean;
156
+ }
157
+ interface XlsxFrozenPane {
158
+ rows?: number;
159
+ columns?: number;
160
+ }
161
+ type XlsxSortDirection = "asc" | "desc";
162
+ interface XlsxSheetSortState {
163
+ columnIndex: number;
164
+ direction: XlsxSortDirection;
165
+ /** 当前排序范围的起始行。 */
166
+ startRowIndex?: number;
167
+ /** 当前排序范围的结束行。 */
168
+ endRowIndex?: number;
169
+ /** 当前各行在排序前对应的原始行索引。 */
170
+ originalRowIndexes?: number[];
171
+ }
172
+ type XlsxFilterValue = string | number | boolean | null;
173
+ type XlsxFilterConditionOperator = "none" | "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "between" | "notBetween" | "startsWith" | "notStartsWith" | "endsWith" | "notEndsWith" | "includes" | "notIncludes" | "blank" | "notBlank";
174
+ type XlsxFilterConditionRelation = "and" | "or";
175
+ interface XlsxFilterCondition {
176
+ operator: XlsxFilterConditionOperator;
177
+ value?: string;
178
+ secondValue?: string;
179
+ }
180
+ interface XlsxColumnFilterState {
181
+ columnIndex: number;
182
+ values: XlsxFilterValue[];
183
+ includeBlank?: boolean;
184
+ includeNonBlank?: boolean;
185
+ condition?: XlsxFilterCondition;
186
+ secondCondition?: XlsxFilterCondition;
187
+ conditionRelation?: XlsxFilterConditionRelation;
188
+ }
189
+ interface XlsxSheetFilterState {
190
+ columns: Record<number, XlsxColumnFilterState>;
191
+ }
192
+ interface XlsxMergedRange extends XlsxCellRange {
193
+ }
194
+ /**
195
+ * workbook 级命名区域。
196
+ */
197
+ interface XlsxNamedRange {
198
+ /** 名称:字母/下划线开头;大小写不敏感唯一。 */
199
+ name: string;
200
+ /** 锚定 sheet。 */
201
+ sheetId: string;
202
+ /** 单格或矩形区域。 */
203
+ range: XlsxCellRange;
204
+ comment?: string;
205
+ }
206
+ interface XlsxCollaborator {
207
+ id: string;
208
+ name?: string;
209
+ color?: string;
210
+ avatar?: string;
211
+ }
212
+ interface XlsxRemoteSelection {
213
+ user: XlsxCollaborator;
214
+ sheetId: string;
215
+ activeCell: XlsxCellAddress | null;
216
+ ranges: XlsxCellRange[];
217
+ updatedAt: number;
218
+ }
219
+
220
+ /** 本地打印设置,不宣称已保存到 XLSX pageSetup。 */
221
+ interface XlsxPrintOptions {
222
+ sheetName?: string;
223
+ range?: XlsxCellRange;
224
+ paper?: "A4" | "Letter";
225
+ orientation?: "portrait" | "landscape";
226
+ marginMm?: number;
227
+ scale?: number;
228
+ fitWidth?: boolean;
229
+ showGridlines?: boolean;
230
+ showHeaders?: boolean;
231
+ includeHidden?: boolean;
232
+ includeFiltered?: boolean;
233
+ repeatFirstRow?: boolean;
234
+ }
235
+ type XlsxResolvedPrintOptions = Required<Omit<XlsxPrintOptions, "range">> & {
236
+ range?: XlsxCellRange;
237
+ };
238
+ interface XlsxPrintCell {
239
+ address: string;
240
+ rowIndex: number;
241
+ columnIndex: number;
242
+ x: number;
243
+ y: number;
244
+ width: number;
245
+ height: number;
246
+ text: string;
247
+ cell?: CellObject;
248
+ }
249
+ interface XlsxPrintPage {
250
+ rowIndices: number[];
251
+ columnIndices: number[];
252
+ rowSizes: number[];
253
+ columnSizes: number[];
254
+ cells: XlsxPrintCell[];
255
+ }
256
+ /** 页布局是当前原生工作簿的只读派生结果,不可反向写回作为业务模型。 */
257
+ interface XlsxPrintPlan {
258
+ stamp: XlsxDocumentStamp;
259
+ options: XlsxResolvedPrintOptions;
260
+ paper: {
261
+ widthMm: number;
262
+ heightMm: number;
263
+ widthPx: number;
264
+ heightPx: number;
265
+ };
266
+ contentWidth: number;
267
+ contentHeight: number;
268
+ scale: number;
269
+ pages: XlsxPrintPage[];
270
+ warnings: string[];
271
+ }
272
+
273
+ /** 标准worksheet页面节点的临时查询/编辑参数,不是新的工作簿存储。 */
274
+ type XlsxSavedPrintOptions = Pick<XlsxPrintOptions, "paper" | "orientation" | "marginMm" | "scale" | "fitWidth" | "showGridlines" | "showHeaders">;
275
+ interface XlsxNativeSheetSettings {
276
+ frozen: XlsxFrozenPane | null;
277
+ print: XlsxSavedPrintOptions;
278
+ warnings: string[];
279
+ unsupportedPaper?: boolean;
280
+ printArea?: XlsxCellRange | null;
281
+ repeatRows?: {
282
+ startRowIndex: number;
283
+ endRowIndex: number;
284
+ } | null;
285
+ restrictions?: {
286
+ freeze?: string;
287
+ print?: string;
288
+ printNames?: string;
289
+ };
290
+ }
291
+ interface XlsxNativeSheetSettingsPatch {
292
+ frozen?: XlsxFrozenPane | null;
293
+ print?: XlsxSavedPrintOptions;
294
+ printArea?: XlsxCellRange | null;
295
+ repeatRows?: {
296
+ startRowIndex: number;
297
+ endRowIndex: number;
298
+ } | null;
299
+ }
300
+
301
+ export { type XlsxNativeCellTransaction as A, type XlsxNamedRange as B, type XlsxCellStyle as C, type XlsxCellBorderPreset as D, type XlsxCellBorderLine as E, type XlsxCellBorderLineStyle as F, type XlsxCellBorders as G, type XlsxColumnFilterState as H, type XlsxFilterConditionOperator as I, type XlsxNativePartChange as J, type XlsxNativePartSnapshot as K, type XlsxPrintCell as L, type XlsxPrintPage as M, type XlsxResolvedPrintOptions as N, addressToA1 as O, columnIndexToName as P, columnNameToIndex as Q, getCellKey as R, normalizeRange as S, parseCellKey as T, type XlsxNativeSheetSettings as X, type XlsxNativeSheetSettingsPatch as a, type XlsxSavedPrintOptions as b, type XlsxDocumentStamp as c, type XlsxNativeTransaction as d, type XlsxCellRange as e, type XlsxNativeCellChange as f, type XlsxCellAddress as g, type XlsxCellValue as h, type XlsxCellType as i, type XlsxNativePartsHistoryEntry as j, type XlsxRowConfig as k, type XlsxColumnConfig as l, type XlsxSheetFilterState as m, type XlsxFrozenPane as n, type XlsxMergedRange as o, type XlsxSheetSortState as p, type XlsxRemoteSelection as q, type XlsxCollaborator as r, type XlsxFilterValue as s, type XlsxFilterCondition as t, type XlsxFilterConditionRelation as u, type XlsxSortDirection as v, type XlsxNativeTransactionResult as w, type XlsxPrintOptions as x, type XlsxPrintPlan as y, type XlsxNativeCommitResult as z };