@opengeni/artifact-tool 0.2.2
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/LICENSE +190 -0
- package/README.md +104 -0
- package/dist/bounded-zip.d.ts +28 -0
- package/dist/chunk-4BSENMAE.js +39 -0
- package/dist/chunk-4BSENMAE.js.map +1 -0
- package/dist/chunk-4FRFNNBM.js +276 -0
- package/dist/chunk-4FRFNNBM.js.map +1 -0
- package/dist/chunk-5XIA6KHZ.js +49 -0
- package/dist/chunk-5XIA6KHZ.js.map +1 -0
- package/dist/chunk-66CT2ZRP.js +2229 -0
- package/dist/chunk-66CT2ZRP.js.map +1 -0
- package/dist/chunk-72SYDU4O.js +319 -0
- package/dist/chunk-72SYDU4O.js.map +1 -0
- package/dist/chunk-B2ZJRZDA.js +279 -0
- package/dist/chunk-B2ZJRZDA.js.map +1 -0
- package/dist/chunk-DCTLTNPW.js +2458 -0
- package/dist/chunk-DCTLTNPW.js.map +1 -0
- package/dist/chunk-FGZM4FQ6.js +473 -0
- package/dist/chunk-FGZM4FQ6.js.map +1 -0
- package/dist/chunk-HTJBLBDE.js +591 -0
- package/dist/chunk-HTJBLBDE.js.map +1 -0
- package/dist/chunk-IYFXZQ34.js +5306 -0
- package/dist/chunk-IYFXZQ34.js.map +1 -0
- package/dist/chunk-J6N7IR44.js +172 -0
- package/dist/chunk-J6N7IR44.js.map +1 -0
- package/dist/chunk-N2IHNWBS.js +1002 -0
- package/dist/chunk-N2IHNWBS.js.map +1 -0
- package/dist/chunk-NAG44K67.js +549 -0
- package/dist/chunk-NAG44K67.js.map +1 -0
- package/dist/chunk-O24KTEGP.js +33 -0
- package/dist/chunk-O24KTEGP.js.map +1 -0
- package/dist/chunk-PI2AZVGK.js +2074 -0
- package/dist/chunk-PI2AZVGK.js.map +1 -0
- package/dist/chunk-Q2FFHEY7.js +40 -0
- package/dist/chunk-Q2FFHEY7.js.map +1 -0
- package/dist/chunk-RBGQADXA.js +57 -0
- package/dist/chunk-RBGQADXA.js.map +1 -0
- package/dist/chunk-U5G2BKM2.js +613 -0
- package/dist/chunk-U5G2BKM2.js.map +1 -0
- package/dist/chunk-VOJHMSM3.js +39 -0
- package/dist/chunk-VOJHMSM3.js.map +1 -0
- package/dist/chunk-VUNV25KB.js +16 -0
- package/dist/chunk-VUNV25KB.js.map +1 -0
- package/dist/chunk-XIFUNVBO.js +101 -0
- package/dist/chunk-XIFUNVBO.js.map +1 -0
- package/dist/chunk-ZCJYRJGB.js +489 -0
- package/dist/chunk-ZCJYRJGB.js.map +1 -0
- package/dist/chunk-ZZXPEE4S.js +2260 -0
- package/dist/chunk-ZZXPEE4S.js.map +1 -0
- package/dist/document-docx-api.d.ts +49 -0
- package/dist/document-docx-codec.d.ts +9 -0
- package/dist/document-docx-codec.js +4765 -0
- package/dist/document-docx-codec.js.map +1 -0
- package/dist/document-docx-import.d.ts +261 -0
- package/dist/document-docx-packer.d.ts +18 -0
- package/dist/document-docx-state.d.ts +12 -0
- package/dist/document-render.d.ts +3 -0
- package/dist/document-render.js +492 -0
- package/dist/document-render.js.map +1 -0
- package/dist/document.d.ts +432 -0
- package/dist/document.js +37 -0
- package/dist/document.js.map +1 -0
- package/dist/errors.d.ts +23 -0
- package/dist/file-blob.d.ts +11 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +186 -0
- package/dist/index.js.map +1 -0
- package/dist/inspection.d.ts +12 -0
- package/dist/kernel.d.ts +101 -0
- package/dist/lib-GQLPACFK.js +9746 -0
- package/dist/lib-GQLPACFK.js.map +1 -0
- package/dist/materializer-cli-entry.d.ts +2 -0
- package/dist/materializer-cli-entry.js +29 -0
- package/dist/materializer-cli-entry.js.map +1 -0
- package/dist/materializer-cli.d.ts +24 -0
- package/dist/materializer-cli.js +24 -0
- package/dist/materializer-cli.js.map +1 -0
- package/dist/native-raster.d.ts +10 -0
- package/dist/native.d.ts +129 -0
- package/dist/native.js +31 -0
- package/dist/native.js.map +1 -0
- package/dist/office-import.d.ts +48 -0
- package/dist/office-import.js +154 -0
- package/dist/office-import.js.map +1 -0
- package/dist/presentation-pptx-api.d.ts +60 -0
- package/dist/presentation-pptx-import.d.ts +5 -0
- package/dist/presentation-pptx-state-digest-765CZZED.js +10 -0
- package/dist/presentation-pptx-state-digest-765CZZED.js.map +1 -0
- package/dist/presentation-pptx-state-digest.d.ts +3 -0
- package/dist/presentation-pptx-state.d.ts +4 -0
- package/dist/presentation-pptx-xml.d.ts +29 -0
- package/dist/presentation-pptx.d.ts +5 -0
- package/dist/presentation-pptx.js +2365 -0
- package/dist/presentation-pptx.js.map +1 -0
- package/dist/presentation-render.d.ts +29 -0
- package/dist/presentation-render.js +375 -0
- package/dist/presentation-render.js.map +1 -0
- package/dist/presentation.d.ts +565 -0
- package/dist/presentation.js +71 -0
- package/dist/presentation.js.map +1 -0
- package/dist/production-composite.d.ts +68 -0
- package/dist/production-document.d.ts +2 -0
- package/dist/production-document.js +176 -0
- package/dist/production-document.js.map +1 -0
- package/dist/production-native-codecs.d.ts +94 -0
- package/dist/production-presentation.d.ts +2 -0
- package/dist/production-presentation.js +176 -0
- package/dist/production-presentation.js.map +1 -0
- package/dist/production-sha256.d.ts +2 -0
- package/dist/production-spreadsheet-native.d.ts +12 -0
- package/dist/production-spreadsheet.d.ts +2 -0
- package/dist/production-spreadsheet.js +176 -0
- package/dist/production-spreadsheet.js.map +1 -0
- package/dist/production.d.ts +96 -0
- package/dist/raster-image.d.ts +34 -0
- package/dist/reference.d.ts +17 -0
- package/dist/reference.js +574 -0
- package/dist/reference.js.map +1 -0
- package/dist/runtime-cli-entry.d.ts +2 -0
- package/dist/runtime-cli-entry.js +21 -0
- package/dist/runtime-cli-entry.js.map +1 -0
- package/dist/runtime-cli.d.ts +76 -0
- package/dist/runtime-cli.js +26 -0
- package/dist/runtime-cli.js.map +1 -0
- package/dist/runtime-development.d.ts +73 -0
- package/dist/runtime-development.js +30 -0
- package/dist/runtime-development.js.map +1 -0
- package/dist/runtime-receipt.d.ts +19 -0
- package/dist/runtime.d.ts +355 -0
- package/dist/runtime.js +42 -0
- package/dist/runtime.js.map +1 -0
- package/dist/snapshot.d.ts +26 -0
- package/dist/snapshot.js +61 -0
- package/dist/snapshot.js.map +1 -0
- package/dist/spreadsheet-address.d.ts +18 -0
- package/dist/spreadsheet-file.d.ts +17 -0
- package/dist/spreadsheet-formula.d.ts +67 -0
- package/dist/spreadsheet-image.d.ts +17 -0
- package/dist/spreadsheet-render.d.ts +5 -0
- package/dist/spreadsheet-render.js +752 -0
- package/dist/spreadsheet-render.js.map +1 -0
- package/dist/spreadsheet-types.d.ts +155 -0
- package/dist/spreadsheet-xlsx-api.d.ts +88 -0
- package/dist/spreadsheet-xlsx-codec.d.ts +16 -0
- package/dist/spreadsheet-xlsx-codec.js +16 -0
- package/dist/spreadsheet-xlsx-codec.js.map +1 -0
- package/dist/spreadsheet-xlsx-state.d.ts +16 -0
- package/dist/spreadsheet.d.ts +724 -0
- package/dist/spreadsheet.js +67 -0
- package/dist/spreadsheet.js.map +1 -0
- package/package.json +129 -0
- package/src/bounded-zip.ts +450 -0
- package/src/document-docx-api.ts +64 -0
- package/src/document-docx-codec.ts +2253 -0
- package/src/document-docx-import.ts +3814 -0
- package/src/document-docx-packer.ts +72 -0
- package/src/document-docx-state.ts +59 -0
- package/src/document-render.ts +615 -0
- package/src/document.ts +2800 -0
- package/src/errors.ts +45 -0
- package/src/file-blob.ts +43 -0
- package/src/index.ts +4 -0
- package/src/inspection.ts +50 -0
- package/src/kernel.ts +525 -0
- package/src/materializer-cli-entry.ts +11 -0
- package/src/materializer-cli.ts +743 -0
- package/src/native-raster.ts +141 -0
- package/src/native.ts +390 -0
- package/src/office-import.ts +243 -0
- package/src/presentation-pptx-api.ts +107 -0
- package/src/presentation-pptx-import.ts +2065 -0
- package/src/presentation-pptx-state-digest.ts +46 -0
- package/src/presentation-pptx-state.ts +18 -0
- package/src/presentation-pptx-xml.ts +473 -0
- package/src/presentation-pptx.ts +447 -0
- package/src/presentation-render.ts +532 -0
- package/src/presentation.ts +2599 -0
- package/src/production-composite.ts +805 -0
- package/src/production-document.ts +2 -0
- package/src/production-native-codecs.ts +1141 -0
- package/src/production-presentation.ts +2 -0
- package/src/production-sha256.ts +150 -0
- package/src/production-spreadsheet-native.ts +686 -0
- package/src/production-spreadsheet.ts +2 -0
- package/src/production.ts +1022 -0
- package/src/raster-image.ts +586 -0
- package/src/reference.ts +17 -0
- package/src/runtime-cli-entry.ts +13 -0
- package/src/runtime-cli.ts +670 -0
- package/src/runtime-development.ts +689 -0
- package/src/runtime-receipt.ts +169 -0
- package/src/runtime.ts +1463 -0
- package/src/snapshot.ts +88 -0
- package/src/spreadsheet-address.ts +90 -0
- package/src/spreadsheet-file.ts +71 -0
- package/src/spreadsheet-formula.ts +1212 -0
- package/src/spreadsheet-image.ts +242 -0
- package/src/spreadsheet-render.ts +985 -0
- package/src/spreadsheet-types.ts +171 -0
- package/src/spreadsheet-xlsx-api.ts +123 -0
- package/src/spreadsheet-xlsx-codec.ts +3063 -0
- package/src/spreadsheet-xlsx-state.ts +191 -0
- package/src/spreadsheet.ts +5195 -0
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import type { RangeAddress } from "./spreadsheet-address";
|
|
2
|
+
|
|
3
|
+
export type CellValue = string | number | boolean | Date | null;
|
|
4
|
+
export type FormulaResult = CellValue | FormulaErrorValue;
|
|
5
|
+
export type FormulaErrorValue =
|
|
6
|
+
| "#DIV/0!"
|
|
7
|
+
| "#N/A"
|
|
8
|
+
| "#NAME?"
|
|
9
|
+
| "#NUM!"
|
|
10
|
+
| "#REF!"
|
|
11
|
+
| "#VALUE!"
|
|
12
|
+
| "#CYCLE!";
|
|
13
|
+
|
|
14
|
+
export type Color = string;
|
|
15
|
+
export type FontConfig = {
|
|
16
|
+
name?: string;
|
|
17
|
+
size?: number;
|
|
18
|
+
bold?: boolean;
|
|
19
|
+
italic?: boolean;
|
|
20
|
+
underline?: boolean;
|
|
21
|
+
color?: Color;
|
|
22
|
+
};
|
|
23
|
+
export type BorderConfig = { style?: string; color?: Color; weight?: number };
|
|
24
|
+
export type RangeBordersConfig = {
|
|
25
|
+
preset?: "none" | "outside" | "inside" | "all" | "doubleBottom";
|
|
26
|
+
style?: string;
|
|
27
|
+
color?: Color;
|
|
28
|
+
top?: BorderConfig;
|
|
29
|
+
bottom?: BorderConfig;
|
|
30
|
+
left?: BorderConfig;
|
|
31
|
+
right?: BorderConfig;
|
|
32
|
+
insideHorizontal?: BorderConfig;
|
|
33
|
+
insideVertical?: BorderConfig;
|
|
34
|
+
};
|
|
35
|
+
export type CellFormat = {
|
|
36
|
+
fill?: Color;
|
|
37
|
+
font?: FontConfig;
|
|
38
|
+
numberFormat?: string;
|
|
39
|
+
borders?: RangeBordersConfig;
|
|
40
|
+
horizontalAlignment?: "left" | "center" | "right" | "justify";
|
|
41
|
+
verticalAlignment?: "top" | "center" | "bottom";
|
|
42
|
+
wrapText?: boolean;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export type CellData = {
|
|
46
|
+
value: CellValue;
|
|
47
|
+
formula: string | null;
|
|
48
|
+
format: CellFormat;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export type FreezePaneState = { rows: number; columns: number };
|
|
52
|
+
export type MergeRegion = RangeAddress;
|
|
53
|
+
export type DataValidationConfig = { rule: Record<string, unknown> };
|
|
54
|
+
export type ConditionalFormatConfig = Record<string, unknown>;
|
|
55
|
+
|
|
56
|
+
export type SpreadsheetImageConfig = {
|
|
57
|
+
dataUrl?: string;
|
|
58
|
+
blob?: ArrayBuffer;
|
|
59
|
+
contentType?: string;
|
|
60
|
+
alt?: string;
|
|
61
|
+
anchor: {
|
|
62
|
+
from: { row: number; col: number; rowOffsetPx?: number; colOffsetPx?: number };
|
|
63
|
+
extent: { widthPx: number; heightPx: number };
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export type SpreadsheetChartType =
|
|
68
|
+
| "bar"
|
|
69
|
+
| "line"
|
|
70
|
+
| "area"
|
|
71
|
+
| "pie"
|
|
72
|
+
| "doughnut"
|
|
73
|
+
| "scatter"
|
|
74
|
+
| "bubble"
|
|
75
|
+
| "radar"
|
|
76
|
+
| "stock"
|
|
77
|
+
| "treemap"
|
|
78
|
+
| "sunburst"
|
|
79
|
+
| "histogram"
|
|
80
|
+
| "boxWhisker"
|
|
81
|
+
| "waterfall"
|
|
82
|
+
| "funnel"
|
|
83
|
+
| "map";
|
|
84
|
+
|
|
85
|
+
export type SpreadsheetChartSeriesConfig = {
|
|
86
|
+
name: string;
|
|
87
|
+
formula?: string;
|
|
88
|
+
categoryFormula?: string;
|
|
89
|
+
values?: number[];
|
|
90
|
+
categories?: Array<string | number>;
|
|
91
|
+
fill?: Color;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export type SpreadsheetChartConfig = {
|
|
95
|
+
chartType?: SpreadsheetChartType;
|
|
96
|
+
title?: string;
|
|
97
|
+
hasLegend?: boolean;
|
|
98
|
+
series?: SpreadsheetChartSeriesConfig[];
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
export type SpreadsheetSparklineType = "line" | "column" | "stacked";
|
|
102
|
+
|
|
103
|
+
export type SpreadsheetSparklineMarkersOptions = {
|
|
104
|
+
show?: boolean;
|
|
105
|
+
high?: boolean;
|
|
106
|
+
low?: boolean;
|
|
107
|
+
first?: boolean;
|
|
108
|
+
last?: boolean;
|
|
109
|
+
negative?: boolean;
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
export type SpreadsheetSparklineAxisOptions = {
|
|
113
|
+
showAxis?: boolean;
|
|
114
|
+
manualMin?: number;
|
|
115
|
+
manualMax?: number;
|
|
116
|
+
rightToLeft?: boolean;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
/** Style and display configuration shared by worksheet and range sparkline APIs. */
|
|
120
|
+
export type SpreadsheetSparklineOptions = {
|
|
121
|
+
lineWeight?: number;
|
|
122
|
+
displayHidden?: boolean;
|
|
123
|
+
/** Skill-compatible proto enum: 0 = gaps, 1 = zero, 2 = connect. */
|
|
124
|
+
displayEmptyCellsAs?: 0 | 1 | 2;
|
|
125
|
+
seriesColor?: Color;
|
|
126
|
+
negativeColor?: Color;
|
|
127
|
+
axisColor?: Color;
|
|
128
|
+
markersColor?: Color;
|
|
129
|
+
firstMarkerColor?: Color;
|
|
130
|
+
lastMarkerColor?: Color;
|
|
131
|
+
highMarkerColor?: Color;
|
|
132
|
+
lowMarkerColor?: Color;
|
|
133
|
+
markers?: SpreadsheetSparklineMarkersOptions;
|
|
134
|
+
axis?: SpreadsheetSparklineAxisOptions;
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
export type InspectOptions = {
|
|
138
|
+
kind: string;
|
|
139
|
+
include?: string;
|
|
140
|
+
sheetId?: string;
|
|
141
|
+
range?: string;
|
|
142
|
+
search?: string;
|
|
143
|
+
maxChars?: number;
|
|
144
|
+
tableMaxRows?: number;
|
|
145
|
+
tableMaxCols?: number;
|
|
146
|
+
tableMaxCellChars?: number;
|
|
147
|
+
maxResults?: number;
|
|
148
|
+
options?: { maxResults?: number };
|
|
149
|
+
target?: { id: string; beforeLines?: number; afterLines?: number };
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
export type InspectResult = {
|
|
153
|
+
ndjson: string;
|
|
154
|
+
records: readonly Record<string, unknown>[];
|
|
155
|
+
truncated: boolean;
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
export type HelpOptions = {
|
|
159
|
+
search?: string;
|
|
160
|
+
include?: string;
|
|
161
|
+
maxChars?: number;
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
export type RenderSpreadsheetOptions = {
|
|
165
|
+
sheetName?: string;
|
|
166
|
+
range?: string;
|
|
167
|
+
autoCrop?: "all" | "content" | false;
|
|
168
|
+
scale?: number;
|
|
169
|
+
format?: "png" | "svg";
|
|
170
|
+
background?: string;
|
|
171
|
+
};
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
export const XLSX_MEDIA_TYPE =
|
|
2
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" as const;
|
|
3
|
+
|
|
4
|
+
export type SpreadsheetOpaqueRelationship = {
|
|
5
|
+
sourcePart: string;
|
|
6
|
+
type: string;
|
|
7
|
+
targetPart: string;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export type SpreadsheetOpaqueContentType = {
|
|
11
|
+
partName: string;
|
|
12
|
+
contentType: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/** Bounded, inert OOXML which is retained only in the original source package. */
|
|
16
|
+
export type SpreadsheetOpaqueContent = {
|
|
17
|
+
parts: readonly string[];
|
|
18
|
+
relationships: readonly SpreadsheetOpaqueRelationship[];
|
|
19
|
+
contentTypes: readonly SpreadsheetOpaqueContentType[];
|
|
20
|
+
features: readonly string[];
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export type SpreadsheetFidelityIssue = {
|
|
24
|
+
code:
|
|
25
|
+
| "content-preserved-in-source"
|
|
26
|
+
| "content-will-be-discarded"
|
|
27
|
+
| "editable-chart-preserved"
|
|
28
|
+
| "editable-chart-not-exportable"
|
|
29
|
+
| "sparkline-preserved"
|
|
30
|
+
| "sparkline-not-exportable"
|
|
31
|
+
| "image-metadata-not-exportable"
|
|
32
|
+
| "comment-thread-not-exportable";
|
|
33
|
+
severity: "warning" | "error";
|
|
34
|
+
feature: "opaque-ooxml" | "chart" | "sparkline" | "image" | "comment";
|
|
35
|
+
message: string;
|
|
36
|
+
parts?: readonly string[];
|
|
37
|
+
relationships?: readonly SpreadsheetOpaqueRelationship[];
|
|
38
|
+
contentTypes?: readonly SpreadsheetOpaqueContentType[];
|
|
39
|
+
features?: readonly string[];
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export type SpreadsheetXlsxImportOptions = {
|
|
43
|
+
/** Reject unsupported editable OOXML instead of retaining its original package. */
|
|
44
|
+
unsupportedContent?: "preserve" | "error";
|
|
45
|
+
/** Bounded before ExcelJS allocates or parses any OOXML. */
|
|
46
|
+
limits?: Partial<SpreadsheetXlsxImportLimits>;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export type SpreadsheetXlsxImportLimits = {
|
|
50
|
+
compressedBytes: number;
|
|
51
|
+
expandedBytes: number;
|
|
52
|
+
entryBytes: number;
|
|
53
|
+
entries: number;
|
|
54
|
+
compressionRatio: number;
|
|
55
|
+
inspectedXmlBytes: number;
|
|
56
|
+
xmlDepth: number;
|
|
57
|
+
xmlAttributesPerElement: number;
|
|
58
|
+
xmlAttributesPerPart: number;
|
|
59
|
+
xmlAttributes: number;
|
|
60
|
+
xmlElementsPerPart: number;
|
|
61
|
+
xmlElements: number;
|
|
62
|
+
xmlTextCharactersPerPart: number;
|
|
63
|
+
xmlTextCharacters: number;
|
|
64
|
+
worksheetCellsPerPart: number;
|
|
65
|
+
worksheetCells: number;
|
|
66
|
+
formulasPerPart: number;
|
|
67
|
+
formulas: number;
|
|
68
|
+
formulaBytesPerPart: number;
|
|
69
|
+
formulaBytes: number;
|
|
70
|
+
sharedStrings: number;
|
|
71
|
+
cellStyles: number;
|
|
72
|
+
styleRecords: number;
|
|
73
|
+
commentsPerPart: number;
|
|
74
|
+
comments: number;
|
|
75
|
+
relationshipsPerPart: number;
|
|
76
|
+
relationships: number;
|
|
77
|
+
mediaEntries: number;
|
|
78
|
+
mediaEntryBytes: number;
|
|
79
|
+
mediaBytes: number;
|
|
80
|
+
imagePixels: number;
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
export type SpreadsheetLossPreservationEnvelope = {
|
|
84
|
+
version: 1;
|
|
85
|
+
mediaType: typeof XLSX_MEDIA_TYPE;
|
|
86
|
+
sourceBytes: Uint8Array;
|
|
87
|
+
sourceDigest: string;
|
|
88
|
+
opaqueContent: SpreadsheetOpaqueContent;
|
|
89
|
+
modelDigest: string;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export type SpreadsheetXlsxExportOptions = {
|
|
93
|
+
fileName?: string;
|
|
94
|
+
/** Must be explicit because ExcelJS cannot author every retained editable OOXML feature. */
|
|
95
|
+
unsupportedContent?: "error" | "discard";
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
export class SpreadsheetFidelityError extends Error {
|
|
99
|
+
readonly issues: readonly SpreadsheetFidelityIssue[];
|
|
100
|
+
|
|
101
|
+
constructor(message: string, issues: readonly SpreadsheetFidelityIssue[]) {
|
|
102
|
+
super(message);
|
|
103
|
+
this.name = "SpreadsheetFidelityError";
|
|
104
|
+
this.issues = issues;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export class SpreadsheetSecurityError extends Error {
|
|
109
|
+
constructor(
|
|
110
|
+
message: string,
|
|
111
|
+
readonly code:
|
|
112
|
+
| "invalid-package"
|
|
113
|
+
| "limit-exceeded"
|
|
114
|
+
| "encrypted-content"
|
|
115
|
+
| "active-content"
|
|
116
|
+
| "unsafe-xml"
|
|
117
|
+
| "external-relationship",
|
|
118
|
+
readonly entryName?: string,
|
|
119
|
+
) {
|
|
120
|
+
super(message);
|
|
121
|
+
this.name = "SpreadsheetSecurityError";
|
|
122
|
+
}
|
|
123
|
+
}
|