@silurus/ooxml 0.86.1 → 0.87.0
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 +42 -2
- package/dist/assets/render-worker-CeK_iqK3.js +10 -0
- package/dist/assets/render-worker-DusrDhPk.js +11 -0
- package/dist/assets/render-worker-n2ZG0lrQ.js +31 -0
- package/dist/{canvas-viewer-mechanics-DN5SqWGS.js → canvas-viewer-mechanics-Cpk0YFvM.js} +74 -65
- package/dist/chart-ex.mjs +1 -1
- package/dist/cjk-fallback-bLI3z70h.js +46 -0
- package/dist/{comment-ui-runtime-lXwVOgjW.js → comment-ui-runtime-BfE7MJZn.js} +4 -4
- package/dist/comment-ui-runtime-BsK8pmUT.js +2 -0
- package/dist/{comment-ui-runtime-DEtgcmj7.js → comment-ui-runtime-DcJOYlw-.js} +5 -5
- package/dist/{comments-CAn2A_Xh.js → comments-Diid5ujN.js} +1 -1
- package/dist/{document-pull-client-uopDjRde.js → document-pull-client-yKxI8aDH.js} +4588 -4545
- package/dist/{docx-wPzeF76A.js → docx-BkSRiy07.js} +318 -311
- package/dist/docx.mjs +5 -5
- package/dist/docx_parser_bg.wasm +0 -0
- package/dist/{dom-interaction-boundary-CswB9Tzi.js → dom-interaction-boundary-CBUQJsIM.js} +22 -19
- package/dist/{hyperlink-BR1NCO7S.js → hyperlink-ArrU3ArU.js} +771 -757
- package/dist/index.mjs +3 -3
- package/dist/{line-distribute-IsUGfHXm.js → line-distribute-Dtudnqhs.js} +1 -1
- package/dist/math.mjs +2 -2
- package/dist/node.mjs +356 -352
- package/dist/{pptx-BxJ_RBSY.js → pptx-62MmVbYB.js} +442 -435
- package/dist/pptx.mjs +7 -7
- package/dist/pptx_parser_bg.wasm +0 -0
- package/dist/region-map.mjs +1 -1
- package/dist/{render-DEiun_AH.js → render-8Zo7dnds.js} +31 -29
- package/dist/{render-worker-host-Ba6Fchqr.js → render-worker-host-BfbnEChF.js} +1 -1
- package/dist/{render-worker-host-BEfLZvSL.js → render-worker-host-DNL9dWRh.js} +1 -1
- package/dist/{render-worker-host-C3xwtHnv.js → render-worker-host-IkHrYOci.js} +1 -1
- package/dist/{resource-measurement-CclArDRs.js → resource-measurement-CJsgolre.js} +1 -1
- package/dist/{session-BuJL_xcp.js → session-CrU8f8DI.js} +98 -98
- package/dist/{slide-pull-client-Ck8wfRT_.js → slide-pull-client-B9KA8bU6.js} +773 -744
- package/dist/three-d.mjs +1 -1
- package/dist/tiff.mjs +1 -1
- package/dist/types/chart-ex.d.ts +2 -2
- package/dist/types/docx.d.ts +15 -11
- package/dist/types/index.d.ts +23 -17
- package/dist/types/math.d.ts +1 -1
- package/dist/types/node.d.ts +12 -6
- package/dist/types/pptx.d.ts +15 -11
- package/dist/types/region-map.d.ts +2 -2
- package/dist/types/three-d.d.ts +2 -2
- package/dist/types/tiff.d.ts +1 -1
- package/dist/types/xlsx.d.ts +15 -11
- package/dist/{worksheet-pull-client-CAvuf22q.js → worksheet-pull-client-eIcQ-xlD.js} +51 -51
- package/dist/{xlsx-Bblm5r1h.js → xlsx-CRcSzZNq.js} +1589 -1563
- package/dist/xlsx.mjs +5 -5
- package/dist/xlsx_parser_bg.wasm +0 -0
- package/package.json +1 -1
- package/dist/assets/render-worker-D21h5TGR.js +0 -10
- package/dist/assets/render-worker-Dsfekaht.js +0 -11
- package/dist/assets/render-worker-DxU7IrKo.js +0 -31
- package/dist/comment-ui-runtime-TLHustXJ.js +0 -2
- /package/dist/{bounded-raw-part-cache-BfbSxRIL.js → bounded-raw-part-cache-Cg1BsSZQ.js} +0 -0
- /package/dist/{comment-occurrence-CqejEuts.js → comment-occurrence-C8Y2uoVr.js} +0 -0
- /package/dist/{delimited-text-worker-host-DcHj_JZt.js → delimited-text-worker-host-BVY-Ecni.js} +0 -0
- /package/dist/{highlight-rect-FuUSmL3a.js → highlight-rect-C5hkRqUr.js} +0 -0
- /package/dist/{line-metrics-CBbw80Ko.js → line-metrics-B60C86uh.js} +0 -0
- /package/dist/{mathjax-DS69BmJd.js → mathjax-DoyWZbSp.js} +0 -0
- /package/dist/{read-only-comment-decoration-BTnWEeo5.js → read-only-comment-decoration-Dz7eTQ4d.js} +0 -0
- /package/dist/{read-only-comment-margin-plStyGfE.js → read-only-comment-margin-DkgzASAl.js} +0 -0
- /package/dist/{renderer-module-contract-Cu-GKuPd.js → renderer-module-contract-D91rkYHH.js} +0 -0
- /package/dist/{source-key-Ktb1GRE5.js → source-key-DIJG8BA0.js} +0 -0
- /package/dist/{transfer-mIj7E7NB.js → transfer-p6iCC2R7.js} +0 -0
- /package/dist/{visible-index-DPoQYSDt.js → visible-index-BgiHEc1z.js} +0 -0
package/dist/types/xlsx.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region dist/.types-work/chart-
|
|
1
|
+
//#region dist/.types-work/chart-IZnSIPIJ.d.ts
|
|
2
2
|
type DecodedImageBudgetStrategy = 'adaptive' | 'strict';
|
|
3
3
|
interface ImageResourceOptions {
|
|
4
4
|
decodedByteBudget?: number;
|
|
@@ -1060,12 +1060,12 @@ interface ChartRect {
|
|
|
1060
1060
|
h: number;
|
|
1061
1061
|
}
|
|
1062
1062
|
//#endregion
|
|
1063
|
-
//#region dist/.types-work/chart-ex-contract-
|
|
1063
|
+
//#region dist/.types-work/chart-ex-contract-CJ8NVYlS.d.ts
|
|
1064
1064
|
interface ChartExRenderer {
|
|
1065
1065
|
render(ctx: CanvasRenderingContext2D, chart: ChartModel, rect: ChartRect, ptToPx: number, shapeRotationDeg?: number): boolean;
|
|
1066
1066
|
}
|
|
1067
1067
|
//#endregion
|
|
1068
|
-
//#region dist/.types-work/mathjax-
|
|
1068
|
+
//#region dist/.types-work/mathjax-Ceqah_7b.d.ts
|
|
1069
1069
|
interface MathSvg {
|
|
1070
1070
|
svg: string;
|
|
1071
1071
|
widthEm: number;
|
|
@@ -1077,17 +1077,17 @@ interface MathRenderer {
|
|
|
1077
1077
|
mathMLToSvg(mathml: string): Promise<MathSvg>;
|
|
1078
1078
|
}
|
|
1079
1079
|
//#endregion
|
|
1080
|
-
//#region dist/.types-work/three-d-contract-
|
|
1080
|
+
//#region dist/.types-work/three-d-contract-aYaGCu4V.d.ts
|
|
1081
1081
|
interface ChartThreeDRenderer {
|
|
1082
1082
|
render(ctx: CanvasRenderingContext2D, chart: ChartModel, rect: ChartRect, ptToPx: number, shapeRotationDeg?: number): boolean;
|
|
1083
1083
|
}
|
|
1084
1084
|
//#endregion
|
|
1085
|
-
//#region dist/.types-work/region-map-contract-
|
|
1085
|
+
//#region dist/.types-work/region-map-contract-Be6TbKbC.d.ts
|
|
1086
1086
|
interface ChartRegionMapRenderer {
|
|
1087
1087
|
render(ctx: CanvasRenderingContext2D, chart: ChartModel, rect: ChartRect, ptToPx: number, shapeRotationDeg?: number): boolean;
|
|
1088
1088
|
}
|
|
1089
1089
|
//#endregion
|
|
1090
|
-
//#region dist/.types-work/tiff-contract-
|
|
1090
|
+
//#region dist/.types-work/tiff-contract-DsRI31nK.d.ts
|
|
1091
1091
|
interface TiffRenderOptions {
|
|
1092
1092
|
targetWidthPx?: number;
|
|
1093
1093
|
targetHeightPx?: number;
|
|
@@ -1102,7 +1102,9 @@ interface TiffRenderer {
|
|
|
1102
1102
|
render(bytes: Uint8Array, options?: Readonly<TiffRenderOptions>): Promise<ImageBitmap | null>;
|
|
1103
1103
|
}
|
|
1104
1104
|
//#endregion
|
|
1105
|
-
//#region dist/.types-work/hyperlink-
|
|
1105
|
+
//#region dist/.types-work/hyperlink-BwNed17w.d.ts
|
|
1106
|
+
type CjkLang = 'kr' | 'sc' | 'tc' | 'hk' | 'jp';
|
|
1107
|
+
type CjkFallback = 'auto' | CjkLang;
|
|
1106
1108
|
type OoxmlErrorCode = 'encrypted' | 'invalid-password' | 'unsupported-encryption' | 'legacy-binary-format' | 'not-ooxml';
|
|
1107
1109
|
type OoxmlErrorStage = 'container' | 'decompression' | 'parsing' | 'serialization' | 'layout' | 'rendering' | 'worker';
|
|
1108
1110
|
declare class OoxmlError extends Error {
|
|
@@ -1177,6 +1179,7 @@ interface OoxmlResourceLimits {
|
|
|
1177
1179
|
}
|
|
1178
1180
|
interface LoadOptions$1 {
|
|
1179
1181
|
useGoogleFonts?: boolean;
|
|
1182
|
+
cjkFallback?: CjkFallback;
|
|
1180
1183
|
password?: string;
|
|
1181
1184
|
wasmUrl?: string | URL;
|
|
1182
1185
|
maxZipEntryBytes?: number;
|
|
@@ -1209,7 +1212,7 @@ type HyperlinkTarget = {
|
|
|
1209
1212
|
};
|
|
1210
1213
|
declare function openExternalHyperlink(url: string, allowed?: readonly string[], win?: Pick<Window, 'open'> | undefined): boolean;
|
|
1211
1214
|
//#endregion
|
|
1212
|
-
//#region dist/.types-work/find-highlight-
|
|
1215
|
+
//#region dist/.types-work/find-highlight-CfHNje1k.d.ts
|
|
1213
1216
|
interface ViewerContextMenuEvent<TContext> {
|
|
1214
1217
|
readonly originalEvent: MouseEvent;
|
|
1215
1218
|
getContext(): Promise<TContext | null>;
|
|
@@ -1253,7 +1256,7 @@ interface FindHighlightColors {
|
|
|
1253
1256
|
active?: string;
|
|
1254
1257
|
}
|
|
1255
1258
|
//#endregion
|
|
1256
|
-
//#region dist/.types-work/types-
|
|
1259
|
+
//#region dist/.types-work/types-mD4FqxtD.d.ts
|
|
1257
1260
|
type ShapeFill = Exclude<Fill, {
|
|
1258
1261
|
fillType: 'image';
|
|
1259
1262
|
} | {
|
|
@@ -2008,7 +2011,7 @@ interface XlsxRenderViewportOptions {
|
|
|
2008
2011
|
} | null;
|
|
2009
2012
|
}
|
|
2010
2013
|
//#endregion
|
|
2011
|
-
//#region dist/.types-work/xlsx-
|
|
2014
|
+
//#region dist/.types-work/xlsx-B25CJOvy.d.ts
|
|
2012
2015
|
type ResolvedList = {
|
|
2013
2016
|
kind: 'values';
|
|
2014
2017
|
values: string[];
|
|
@@ -2047,6 +2050,7 @@ declare class XlsxWorkbook {
|
|
|
2047
2050
|
private queuedImageLoads;
|
|
2048
2051
|
private readonly _fetchImage;
|
|
2049
2052
|
private resourcePolicy;
|
|
2053
|
+
private cjkFallback;
|
|
2050
2054
|
private math;
|
|
2051
2055
|
private threeD;
|
|
2052
2056
|
private regionMap;
|
|
@@ -2564,4 +2568,4 @@ declare class XlsxSheetViewer implements ZoomableViewer {
|
|
|
2564
2568
|
}
|
|
2565
2569
|
declare function resolveSharedStrings(ws: Worksheet, sharedStrings: SharedString[]): Worksheet;
|
|
2566
2570
|
//#endregion
|
|
2567
|
-
export { type ArrowEnd, type AutoResizeOptions, type Border, type BorderEdge, type Cell, type CellAddress, type CellFill, type CellFont, type CellValue, type CellXf, type CfIcon, type CfRule, type CfStop, type CfValue, type ChartAnchor, type ChartAreaGroupDecorations, type ChartBarGroupDecorations, type ChartDataLabelOverride, type ChartDataPointOverride, type ChartDataTable, type ChartDecorationLineStyle, type ChartDisplayUnits, type ChartDisplayUnitsLabel, type ChartErrBars, type ChartExElementStyle, type ChartExRenderer, type ChartLabelBox, type ChartLegendEntryOverride, type ChartLineDashSegment, type ChartLineGroupDecorations, type ChartManualLayout, type ChartModel, type ChartOfPie, type ChartPlotGroup, type ChartPlotGroupAxisSlot, type ChartPlotGroupKind, type ChartRect, type ChartRegionMapRenderer, type ChartSeries, type ChartSeriesDataLabels, type ChartStockBarPaint, type ChartStockUpDownBarStyle, type ChartSurfaceBandFormat, type ChartTextBox, type ChartTextParagraph, type ChartTextRun, type ChartThreeD, type ChartThreeDPictureOptions, type ChartThreeDRenderer, type ChartThreeDSeriesAxis, type ChartThreeDSurface, type ChartTrendline, type ChartType, type ChartexBoxSeries, type ChartexBoxWhisker, type ChartexGeography, type ChartexHistogramBinning, type ChartexRegionMap, type ChartexRegionMapColors, type ChartexRegionMapRow, type ChartexSunburst, type ChartexSunburstRow, type ChartexTreemap, type ChartexValueColorStop, type ConditionalFormat, type DataValidation, type DecodedImageBudgetStrategy, type DefinedName, type DrawingMLCustomDashSegment, type Duotone, type Dxf, type FillRect, type FindHighlightColors, type FindMatch, type FindMatchesOptions, type GradientFill, type GradientFillSpec, type GradientStop, type HiddenSheetMode, type Hyperlink, type HyperlinkTarget, type ImageAnchor, type ImageFill, type ImageResourceOptions, type LegendManualLayout, type LoadOptions, MAX_SELECTION_AREAS, MAX_SELECTION_CONTEXT_CELLS, MAX_SELECTION_CONTEXT_TEXT_CHARACTERS, type MathAccent, type MathArray, type MathBar, type MathBorderBox, type MathBox, type MathDelimiter, type MathFraction, type MathFunc, type MathGroup, type MathGroupChr, type MathLimit, type MathNary, type MathNode, type MathPhant, type MathRadical, type MathRenderer, type MathRun, type MathSPre, type MathScript, type MathStyle, type MathSvg, type MergeCell, type NoFill, type NumFmt, OoxmlDecodedImageLimitError, type OoxmlDecodedImageLimitMetric, OoxmlError, type OoxmlErrorCode, type OoxmlErrorStage, type OoxmlFormat, type OoxmlResourceLimit, OoxmlResourceLimitError, type OoxmlResourceLimitErrorDetails, type OoxmlResourceLimits, type OoxmlResourceMetric, type OoxmlResourceMetrics, type OoxmlResourceMetricsCheckpoint, type OoxmlResourceName, type OoxmlResourcePolicySnapshot, type OoxmlResourceUsageSnapshot, type OoxmlResourceViolation, type OutlinePr, type ParsedWorkbook, type PathCmd, type PathInfo, type PatternFill, type PhoneticAlignment, type PhoneticProperties, type PhoneticRun, type PhoneticType, type PivotCacheSource, type PivotDataField, type PivotDiagnostic, type PivotLocation, type PivotMetadataStatus, type PivotPageField, type PivotPartialReason, type PivotTableMetadata, type RenderViewportToBitmapOptions, type ResolvedList, type Row, type Run, type RunFont, type SecondaryValueAxis, type ShapeAnchor, type ShapeFill, type ShapeGeom, type ShapeInfo, type ShapeParagraph, type ShapeText, type ShapeTextRun, type SharedString, type SheetMeta, type SheetVisibility, type SlicerAnchor, type SlicerElementStyle, type SlicerItem, type SlicerStyle, type SolidFill, type SpaceLine, type Sparkline, type SparklineGroup, type SrcRect, type Styles, type TableColumnInfo, type TableInfo, TiffDecodeError, type TiffRenderOptions, type TiffRenderer, type TileInfo, type ViewerCommentMessageContext, type ViewerCommentThreadContext, type ViewerContextMenuEvent, type ViewportRange, type Workbook, type Worksheet, type WorksheetCellRange, type XlsxCellViewportRect, type XlsxComment, type XlsxCommentReply, type XlsxCommentsOptions, type XlsxCopyResult, type XlsxElementAnchorMarker, type XlsxElementContext, type XlsxMatchLocation, type XlsxRangeSelectionContext, type XlsxRenderViewportOptions, type XlsxScrollToCellOptions, type XlsxSelectionArea, type XlsxSelectionContext, type XlsxSelectionContextCell, type XlsxSelectionContextOptions, type XlsxSelectionInput, type XlsxSelectionState, type XlsxSheetLoadOptions, XlsxSheetViewer, type XlsxSheetViewerOptions, type XlsxTextRunInfo, XlsxViewer, type XlsxViewerOptions, type XlsxViewportOffset, XlsxWorkbook, type ZoomableViewer, autoResize, isOoxmlDecodedImageLimitError, isTiffDecodeError, openExternalHyperlink, resolveSharedStrings };
|
|
2571
|
+
export { type ArrowEnd, type AutoResizeOptions, type Border, type BorderEdge, type Cell, type CellAddress, type CellFill, type CellFont, type CellValue, type CellXf, type CfIcon, type CfRule, type CfStop, type CfValue, type ChartAnchor, type ChartAreaGroupDecorations, type ChartBarGroupDecorations, type ChartDataLabelOverride, type ChartDataPointOverride, type ChartDataTable, type ChartDecorationLineStyle, type ChartDisplayUnits, type ChartDisplayUnitsLabel, type ChartErrBars, type ChartExElementStyle, type ChartExRenderer, type ChartLabelBox, type ChartLegendEntryOverride, type ChartLineDashSegment, type ChartLineGroupDecorations, type ChartManualLayout, type ChartModel, type ChartOfPie, type ChartPlotGroup, type ChartPlotGroupAxisSlot, type ChartPlotGroupKind, type ChartRect, type ChartRegionMapRenderer, type ChartSeries, type ChartSeriesDataLabels, type ChartStockBarPaint, type ChartStockUpDownBarStyle, type ChartSurfaceBandFormat, type ChartTextBox, type ChartTextParagraph, type ChartTextRun, type ChartThreeD, type ChartThreeDPictureOptions, type ChartThreeDRenderer, type ChartThreeDSeriesAxis, type ChartThreeDSurface, type ChartTrendline, type ChartType, type ChartexBoxSeries, type ChartexBoxWhisker, type ChartexGeography, type ChartexHistogramBinning, type ChartexRegionMap, type ChartexRegionMapColors, type ChartexRegionMapRow, type ChartexSunburst, type ChartexSunburstRow, type ChartexTreemap, type ChartexValueColorStop, type CjkFallback, type ConditionalFormat, type DataValidation, type DecodedImageBudgetStrategy, type DefinedName, type DrawingMLCustomDashSegment, type Duotone, type Dxf, type FillRect, type FindHighlightColors, type FindMatch, type FindMatchesOptions, type GradientFill, type GradientFillSpec, type GradientStop, type HiddenSheetMode, type Hyperlink, type HyperlinkTarget, type ImageAnchor, type ImageFill, type ImageResourceOptions, type LegendManualLayout, type LoadOptions, MAX_SELECTION_AREAS, MAX_SELECTION_CONTEXT_CELLS, MAX_SELECTION_CONTEXT_TEXT_CHARACTERS, type MathAccent, type MathArray, type MathBar, type MathBorderBox, type MathBox, type MathDelimiter, type MathFraction, type MathFunc, type MathGroup, type MathGroupChr, type MathLimit, type MathNary, type MathNode, type MathPhant, type MathRadical, type MathRenderer, type MathRun, type MathSPre, type MathScript, type MathStyle, type MathSvg, type MergeCell, type NoFill, type NumFmt, OoxmlDecodedImageLimitError, type OoxmlDecodedImageLimitMetric, OoxmlError, type OoxmlErrorCode, type OoxmlErrorStage, type OoxmlFormat, type OoxmlResourceLimit, OoxmlResourceLimitError, type OoxmlResourceLimitErrorDetails, type OoxmlResourceLimits, type OoxmlResourceMetric, type OoxmlResourceMetrics, type OoxmlResourceMetricsCheckpoint, type OoxmlResourceName, type OoxmlResourcePolicySnapshot, type OoxmlResourceUsageSnapshot, type OoxmlResourceViolation, type OutlinePr, type ParsedWorkbook, type PathCmd, type PathInfo, type PatternFill, type PhoneticAlignment, type PhoneticProperties, type PhoneticRun, type PhoneticType, type PivotCacheSource, type PivotDataField, type PivotDiagnostic, type PivotLocation, type PivotMetadataStatus, type PivotPageField, type PivotPartialReason, type PivotTableMetadata, type RenderViewportToBitmapOptions, type ResolvedList, type Row, type Run, type RunFont, type SecondaryValueAxis, type ShapeAnchor, type ShapeFill, type ShapeGeom, type ShapeInfo, type ShapeParagraph, type ShapeText, type ShapeTextRun, type SharedString, type SheetMeta, type SheetVisibility, type SlicerAnchor, type SlicerElementStyle, type SlicerItem, type SlicerStyle, type SolidFill, type SpaceLine, type Sparkline, type SparklineGroup, type SrcRect, type Styles, type TableColumnInfo, type TableInfo, TiffDecodeError, type TiffRenderOptions, type TiffRenderer, type TileInfo, type ViewerCommentMessageContext, type ViewerCommentThreadContext, type ViewerContextMenuEvent, type ViewportRange, type Workbook, type Worksheet, type WorksheetCellRange, type XlsxCellViewportRect, type XlsxComment, type XlsxCommentReply, type XlsxCommentsOptions, type XlsxCopyResult, type XlsxElementAnchorMarker, type XlsxElementContext, type XlsxMatchLocation, type XlsxRangeSelectionContext, type XlsxRenderViewportOptions, type XlsxScrollToCellOptions, type XlsxSelectionArea, type XlsxSelectionContext, type XlsxSelectionContextCell, type XlsxSelectionContextOptions, type XlsxSelectionInput, type XlsxSelectionState, type XlsxSheetLoadOptions, XlsxSheetViewer, type XlsxSheetViewerOptions, type XlsxTextRunInfo, XlsxViewer, type XlsxViewerOptions, type XlsxViewportOffset, XlsxWorkbook, type ZoomableViewer, autoResize, isOoxmlDecodedImageLimitError, isTiffDecodeError, openExternalHyperlink, resolveSharedStrings };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as h, r as g, t as _ } from "./resource-measurement-
|
|
3
|
-
import { t as v } from "./transfer-
|
|
1
|
+
import { F as e, G as t, H as n, M as r, N as i, P as a, an as o, cn as s, in as c, nn as l, on as u, rn as d, sn as f, tn as p, un as m } from "./hyperlink-ArrU3ArU.js";
|
|
2
|
+
import { n as h, r as g, t as _ } from "./resource-measurement-CJsgolre.js";
|
|
3
|
+
import { t as v } from "./transfer-p6iCC2R7.js";
|
|
4
4
|
//#region packages/xlsx/src/worksheet-resource-limits.ts
|
|
5
|
-
var y =
|
|
5
|
+
var y = s, b = o, x = u, S = f, C = c, w = p, T = l, E = d, D = Object.freeze({
|
|
6
6
|
archiveEntryCount: 0,
|
|
7
7
|
declaredInflatedBytes: 0,
|
|
8
8
|
distinctInflatedBytes: 0,
|
|
@@ -48,7 +48,7 @@ function M(e, t, n = {}) {
|
|
|
48
48
|
}
|
|
49
49
|
function N(e, t, n, r, i, a, o) {
|
|
50
50
|
let s = n === "worksheet-json" ? "serialization" : "parsing";
|
|
51
|
-
return new
|
|
51
|
+
return new m(`OOXML resource limit exceeded${t ? ` for ${t}` : ""}: ${r} ${a} > ${i}`, {
|
|
52
52
|
stage: s,
|
|
53
53
|
violation: {
|
|
54
54
|
format: "xlsx",
|
|
@@ -142,7 +142,7 @@ function z(e, t, n, r) {
|
|
|
142
142
|
//#endregion
|
|
143
143
|
//#region packages/xlsx/src/worksheet-pull-worker.ts
|
|
144
144
|
var B = 64 * 1024 * 1024, V = class {
|
|
145
|
-
coordinator = new
|
|
145
|
+
coordinator = new e();
|
|
146
146
|
sessions = /* @__PURE__ */ new Map();
|
|
147
147
|
operationTail = Promise.resolve();
|
|
148
148
|
pendingOpens = /* @__PURE__ */ new Map();
|
|
@@ -166,16 +166,16 @@ var B = 64 * 1024 * 1024, V = class {
|
|
|
166
166
|
if (this.resourceFailure) throw this.resourceFailure;
|
|
167
167
|
let r = this.pendingOpens.get(n.sessionId);
|
|
168
168
|
if (!r || r.identity.operationId !== n.operationId || r.identity.generation !== n.generation) throw Error("worksheet pull session open reservation is stale or missing");
|
|
169
|
-
let i,
|
|
169
|
+
let i, o = new Promise((e) => {
|
|
170
170
|
i = e;
|
|
171
171
|
}), s = this.operationTail.then(() => this.coordinator.enqueue(async () => {
|
|
172
172
|
if (r.canceled) throw Error("worksheet pull session open was canceled");
|
|
173
173
|
this.executeArchive((n) => n.open_sheet_cursor(e, t));
|
|
174
|
-
let
|
|
174
|
+
let o = [], s = {
|
|
175
175
|
rows: 0,
|
|
176
176
|
cells: 0,
|
|
177
177
|
ownedUtf8Bytes: 0
|
|
178
|
-
},
|
|
178
|
+
}, c, l = !1, u = new a({
|
|
179
179
|
...n,
|
|
180
180
|
maxByteCredit: B,
|
|
181
181
|
coordinator: this.coordinator,
|
|
@@ -187,13 +187,13 @@ var B = 64 * 1024 * 1024, V = class {
|
|
|
187
187
|
try {
|
|
188
188
|
if (n.kind === "rows") {
|
|
189
189
|
let e = j(s, O(n.rows));
|
|
190
|
-
P(e, "get-worksheet-worker", void 0, this.readResourceUsage()),
|
|
191
|
-
} else
|
|
190
|
+
P(e, "get-worksheet-worker", void 0, this.readResourceUsage()), o.push(...n.rows), s = e;
|
|
191
|
+
} else c = n.worksheet;
|
|
192
192
|
} catch (e) {
|
|
193
|
-
throw e instanceof
|
|
193
|
+
throw e instanceof m && (this.resourceFailure ??= e), e;
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
|
-
|
|
196
|
+
l = t;
|
|
197
197
|
let n = v(e);
|
|
198
198
|
return {
|
|
199
199
|
payload: n,
|
|
@@ -204,26 +204,26 @@ var B = 64 * 1024 * 1024, V = class {
|
|
|
204
204
|
},
|
|
205
205
|
measureChunk: ({ payload: e }) => e.byteLength,
|
|
206
206
|
acknowledge: () => {
|
|
207
|
-
if (!
|
|
207
|
+
if (!l) return;
|
|
208
208
|
let t, r;
|
|
209
209
|
try {
|
|
210
210
|
if (this.acceptWorksheet) {
|
|
211
|
-
if (!
|
|
212
|
-
|
|
213
|
-
let n =
|
|
211
|
+
if (!c) throw Error("worksheet terminal payload is missing");
|
|
212
|
+
c.rows = c.parseError ? [] : o;
|
|
213
|
+
let n = c.parseError ? {
|
|
214
214
|
rows: 0,
|
|
215
215
|
cells: 0,
|
|
216
216
|
ownedUtf8Bytes: 0
|
|
217
|
-
} : s, i = A(
|
|
218
|
-
P(i, "get-worksheet-worker", void 0,
|
|
219
|
-
let
|
|
220
|
-
typeof
|
|
217
|
+
} : s, i = A(c, n), a = this.readResourceUsage();
|
|
218
|
+
P(i, "get-worksheet-worker", void 0, a), F(i.jsonBytes, "get-worksheet-worker", void 0, a);
|
|
219
|
+
let l = this.acceptWorksheet(e, c, i, a);
|
|
220
|
+
typeof l == "function" ? t = l : l && ({rollback: t, commit: r} = l);
|
|
221
221
|
}
|
|
222
222
|
this.executeArchive((e) => e.acknowledge_sheet_cursor_terminal()), r?.();
|
|
223
223
|
} catch (e) {
|
|
224
|
-
throw t?.(), e instanceof
|
|
224
|
+
throw t?.(), e instanceof m && (this.resourceFailure ??= e), e;
|
|
225
225
|
}
|
|
226
|
-
|
|
226
|
+
l = !1, this.sessions.delete(n.sessionId), i();
|
|
227
227
|
},
|
|
228
228
|
cancel: () => {
|
|
229
229
|
try {
|
|
@@ -243,11 +243,11 @@ var B = 64 * 1024 * 1024, V = class {
|
|
|
243
243
|
}
|
|
244
244
|
});
|
|
245
245
|
this.sessions.set(n.sessionId, {
|
|
246
|
-
host:
|
|
246
|
+
host: u,
|
|
247
247
|
identity: n
|
|
248
248
|
}), this.pendingOpens.delete(n.sessionId);
|
|
249
249
|
}));
|
|
250
|
-
this.operationTail = s.then(() =>
|
|
250
|
+
this.operationTail = s.then(() => o, () => void 0);
|
|
251
251
|
try {
|
|
252
252
|
await s;
|
|
253
253
|
} catch (e) {
|
|
@@ -264,14 +264,14 @@ var B = 64 * 1024 * 1024, V = class {
|
|
|
264
264
|
} catch {}
|
|
265
265
|
}
|
|
266
266
|
}
|
|
267
|
-
dispatch(e,
|
|
267
|
+
dispatch(e, n) {
|
|
268
268
|
let r = this.sessions.get(e.sessionId);
|
|
269
|
-
if (r) return r.host.dispatch(e,
|
|
270
|
-
let
|
|
271
|
-
if (
|
|
272
|
-
let
|
|
273
|
-
return
|
|
274
|
-
protocol:
|
|
269
|
+
if (r) return r.host.dispatch(e, n);
|
|
270
|
+
let a = this.pendingOpens.get(e.sessionId);
|
|
271
|
+
if (a && (e.kind === "cancel" || e.kind === "close")) {
|
|
272
|
+
let t = a.identity.operationId === e.operationId && a.identity.generation === e.generation;
|
|
273
|
+
return t && (a.canceled = !0), n(t ? {
|
|
274
|
+
protocol: i,
|
|
275
275
|
kind: "accepted",
|
|
276
276
|
sessionId: e.sessionId,
|
|
277
277
|
operationId: e.operationId,
|
|
@@ -279,7 +279,7 @@ var B = 64 * 1024 * 1024, V = class {
|
|
|
279
279
|
requestId: e.requestId,
|
|
280
280
|
command: e.kind
|
|
281
281
|
} : {
|
|
282
|
-
protocol:
|
|
282
|
+
protocol: i,
|
|
283
283
|
kind: "error",
|
|
284
284
|
sessionId: e.sessionId,
|
|
285
285
|
operationId: e.operationId,
|
|
@@ -292,37 +292,37 @@ var B = 64 * 1024 * 1024, V = class {
|
|
|
292
292
|
}
|
|
293
293
|
}), Promise.resolve();
|
|
294
294
|
}
|
|
295
|
-
return e.kind === "cancel" || e.kind === "close" ? (
|
|
296
|
-
protocol:
|
|
295
|
+
return e.kind === "cancel" || e.kind === "close" ? (n({
|
|
296
|
+
protocol: i,
|
|
297
297
|
kind: "accepted",
|
|
298
298
|
sessionId: e.sessionId,
|
|
299
299
|
operationId: e.operationId,
|
|
300
300
|
generation: e.generation,
|
|
301
301
|
requestId: e.requestId,
|
|
302
302
|
command: e.kind
|
|
303
|
-
}), Promise.resolve()) : (
|
|
304
|
-
protocol:
|
|
303
|
+
}), Promise.resolve()) : (n({
|
|
304
|
+
protocol: i,
|
|
305
305
|
kind: "error",
|
|
306
306
|
sessionId: e.sessionId,
|
|
307
307
|
operationId: e.operationId,
|
|
308
308
|
generation: e.generation,
|
|
309
309
|
requestId: e.requestId,
|
|
310
|
-
error:
|
|
310
|
+
error: t(/* @__PURE__ */ Error("worksheet pull session is not open"))
|
|
311
311
|
}), Promise.resolve());
|
|
312
312
|
}
|
|
313
|
-
async dispatchSafely(e,
|
|
313
|
+
async dispatchSafely(e, n) {
|
|
314
314
|
try {
|
|
315
|
-
await this.dispatch(e,
|
|
315
|
+
await this.dispatch(e, n);
|
|
316
316
|
} catch (r) {
|
|
317
317
|
try {
|
|
318
|
-
|
|
319
|
-
protocol:
|
|
318
|
+
n({
|
|
319
|
+
protocol: i,
|
|
320
320
|
kind: "error",
|
|
321
321
|
sessionId: e.sessionId,
|
|
322
322
|
operationId: e.operationId,
|
|
323
323
|
generation: e.generation,
|
|
324
324
|
requestId: e.requestId,
|
|
325
|
-
error:
|
|
325
|
+
error: t(r)
|
|
326
326
|
});
|
|
327
327
|
} catch {}
|
|
328
328
|
}
|
|
@@ -332,7 +332,7 @@ var B = 64 * 1024 * 1024, V = class {
|
|
|
332
332
|
if (this.resourceFailure) throw this.resourceFailure;
|
|
333
333
|
return e();
|
|
334
334
|
})).catch((e) => {
|
|
335
|
-
throw e instanceof
|
|
335
|
+
throw e instanceof m && (this.resourceFailure ??= e), e;
|
|
336
336
|
});
|
|
337
337
|
return this.operationTail = t.then(() => void 0, () => void 0), t;
|
|
338
338
|
}
|
|
@@ -340,7 +340,7 @@ var B = 64 * 1024 * 1024, V = class {
|
|
|
340
340
|
for (let e of this.pendingOpens.values()) e.canceled = !0;
|
|
341
341
|
let e = 1;
|
|
342
342
|
for (let { host: t, identity: n } of [...this.sessions.values()]) await t.dispatch({
|
|
343
|
-
protocol:
|
|
343
|
+
protocol: i,
|
|
344
344
|
kind: "close",
|
|
345
345
|
...n,
|
|
346
346
|
requestId: e++
|
|
@@ -356,7 +356,7 @@ var B = 64 * 1024 * 1024, V = class {
|
|
|
356
356
|
let t = this.sessions.get(e.sessionId);
|
|
357
357
|
if (t) {
|
|
358
358
|
await t.host.dispatch({
|
|
359
|
-
protocol:
|
|
359
|
+
protocol: i,
|
|
360
360
|
kind: "close",
|
|
361
361
|
...e,
|
|
362
362
|
requestId: 1
|
|
@@ -368,7 +368,7 @@ var B = 64 * 1024 * 1024, V = class {
|
|
|
368
368
|
}
|
|
369
369
|
readResourceUsage() {
|
|
370
370
|
try {
|
|
371
|
-
return
|
|
371
|
+
return n(this.executeArchive((e) => e.sheet_cursor_resource_usage()));
|
|
372
372
|
} catch (e) {
|
|
373
373
|
if (String(e).includes("worksheet cursor usage is unavailable")) return;
|
|
374
374
|
throw e;
|
|
@@ -384,11 +384,11 @@ var B = 64 * 1024 * 1024, V = class {
|
|
|
384
384
|
if (!Number.isSafeInteger(e) || e < 0) throw RangeError("sheetIndex must be a non-negative safe integer");
|
|
385
385
|
if (!t) throw TypeError("sheetName must be non-empty");
|
|
386
386
|
G(n);
|
|
387
|
-
let
|
|
388
|
-
sessionId:
|
|
389
|
-
operationId:
|
|
387
|
+
let i = this.nextSessionId++, a = {
|
|
388
|
+
sessionId: i,
|
|
389
|
+
operationId: i,
|
|
390
390
|
generation: this.options.generation ?? 1
|
|
391
|
-
}, o = new
|
|
391
|
+
}, o = new r(this.options.transport, {
|
|
392
392
|
...a,
|
|
393
393
|
maxByteCredit: B,
|
|
394
394
|
timeoutMs: this.options.timeoutMs,
|