@silurus/ooxml 0.84.1 → 0.85.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/README.md +44 -18
- package/dist/assets/render-worker-BRKOyWVH.js +24 -0
- package/dist/assets/render-worker-CtLMFj9r.js +10 -0
- package/dist/assets/render-worker-NZPOUOTU.js +11 -0
- package/dist/{canvas-viewer-mechanics-CIfhCgYA.js → canvas-viewer-mechanics-CfRzOhz5.js} +308 -234
- package/dist/chart-ex.mjs +270 -270
- package/dist/{comment-ui-runtime-CdMMApEN.js → comment-ui-runtime-CAbpuWi_.js} +4 -4
- package/dist/{comment-ui-runtime-C5qimVMD.js → comment-ui-runtime-DAKBCpsM.js} +5 -5
- package/dist/comment-ui-runtime-DTaaZdXC.js +2 -0
- package/dist/{comments-BAlAyIhb.js → comments-Brfxa3hQ.js} +1 -1
- package/dist/{document-pull-client-BXw6AAhY.js → document-pull-client-BkHHIdR4.js} +4661 -4357
- package/dist/{docx-BA1vB0V-.js → docx-_uelcAui.js} +338 -304
- package/dist/docx.mjs +7 -6
- package/dist/docx_parser_bg.wasm +0 -0
- package/dist/{dom-interaction-boundary-DS6BVyHA.js → dom-interaction-boundary-CMDDgICk.js} +1 -1
- package/dist/index.mjs +3 -3
- package/dist/line-distribute-CiKeWjBF.js +1023 -0
- package/dist/{line-metrics-CXyjyYd5.js → line-metrics-u87yCAfV.js} +2182 -705
- package/dist/math.mjs +2 -2
- package/dist/node.mjs +404 -394
- package/dist/pixel-budget-Dgjw269h.js +37 -0
- package/dist/{plot-area-frame-DuXZzovH.js → plot-area-frame-D5hEOgkJ.js} +691 -1418
- package/dist/{pptx-C17oBD8Z.js → pptx-WpBbS0mq.js} +255 -222
- package/dist/pptx.mjs +7 -6
- package/dist/pptx_parser_bg.wasm +0 -0
- package/dist/raster-target-whZhvVMt.js +87 -0
- package/dist/region-map.mjs +5 -5
- package/dist/{render-CVeGktZG.js → render-DrAAZWwH.js} +9 -6
- package/dist/{render-worker-host-BbhwA24Y.js → render-worker-host-CBVe8aeD.js} +1 -1
- package/dist/{render-worker-host-BWdhjVH_.js → render-worker-host-CHlwYJdK.js} +1 -1
- package/dist/{render-worker-host-CbaQivE7.js → render-worker-host-XDMsyVsv.js} +1 -1
- package/dist/{renderer-Bmky2yBc.js → renderer-XFSCOT6m.js} +1937 -1936
- package/dist/resource-measurement-6uR3Huao.js +150 -0
- package/dist/{session-Cl0RVnMs.js → session-DoPwA4gv.js} +79 -79
- package/dist/{slide-pull-client-BS0EeZo2.js → slide-pull-client-8i8C4VyD.js} +1054 -824
- package/dist/{three-d-B7LsKeOS.js → three-d-YYghQndN.js} +109 -110
- package/dist/three-d.mjs +726 -726
- package/dist/tiff.mjs +664 -78
- package/dist/types/chart-ex.d.ts +2 -2
- package/dist/types/docx.d.ts +31 -13
- package/dist/types/index.d.ts +46 -21
- package/dist/types/math.d.ts +1 -1
- package/dist/types/node.d.ts +11 -7
- package/dist/types/pptx.d.ts +35 -15
- package/dist/types/region-map.d.ts +2 -2
- package/dist/types/three-d.d.ts +2 -2
- package/dist/types/tiff.d.ts +13 -3
- package/dist/types/xlsx.d.ts +30 -13
- package/dist/{worksheet-pull-client-B0zfEVau.js → worksheet-pull-client-Btydoxto.js} +47 -47
- package/dist/{xlsx-FyKAiNo-.js → xlsx-Bd16V4Xx.js} +1395 -1196
- package/dist/xlsx.mjs +7 -6
- package/package.json +2 -2
- package/dist/assets/render-worker-BWPpayBu.js +0 -10
- package/dist/assets/render-worker-CiEWCh_T.js +0 -11
- package/dist/assets/render-worker-Cpmy3GDF.js +0 -24
- package/dist/comment-ui-runtime-aPzHfV_A.js +0 -2
- package/dist/line-distribute-MqInuujx.js +0 -1003
- package/dist/resource-measurement-esyGbzAF.js +0 -120
- package/dist/tiff-contract-Xjn3qXqK.js +0 -69
- /package/dist/{comment-occurrence-C34fWs_F.js → comment-occurrence-tj54AXXB.js} +0 -0
- /package/dist/{highlight-rect-MaCt0om0.js → highlight-rect-DBcYVJDv.js} +0 -0
- /package/dist/{mathjax-DPEX346v.js → mathjax-DS69BmJd.js} +0 -0
- /package/dist/{read-only-comment-decoration-BYCXoSdC.js → read-only-comment-decoration-Mv_SAiHy.js} +0 -0
- /package/dist/{read-only-comment-margin-C7b3l0ro.js → read-only-comment-margin-Cqu-Ir0C.js} +0 -0
- /package/dist/{renderer-module-contract-C6sYZvTV.js → renderer-module-contract-Cu-GKuPd.js} +0 -0
- /package/dist/{source-key-DORuuFb-.js → source-key-BkBB3X82.js} +0 -0
- /package/dist/{transfer-vNOFQuvv.js → transfer-mIj7E7NB.js} +0 -0
- /package/dist/{visible-index-DwJzuGmJ.js → visible-index-DPoQYSDt.js} +0 -0
package/dist/types/pptx.d.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
//#region dist/.types-work/chart-
|
|
1
|
+
//#region dist/.types-work/chart-D5f5lUUP.d.ts
|
|
2
|
+
type DecodedImageBudgetStrategy = 'adaptive' | 'strict';
|
|
3
|
+
interface ImageResourceOptions {
|
|
4
|
+
decodedByteBudget?: number;
|
|
5
|
+
strategy?: DecodedImageBudgetStrategy;
|
|
6
|
+
}
|
|
2
7
|
type MathStyle = 'roman' | 'italic' | 'bold' | 'boldItalic';
|
|
3
8
|
interface MathRun {
|
|
4
9
|
kind: 'run';
|
|
@@ -374,6 +379,7 @@ interface RenderOptions {
|
|
|
374
379
|
width?: number;
|
|
375
380
|
defaultTextColor?: string | null;
|
|
376
381
|
dpr?: number;
|
|
382
|
+
imageResources?: ImageResourceOptions;
|
|
377
383
|
majorFont?: string | null;
|
|
378
384
|
minorFont?: string | null;
|
|
379
385
|
hlinkColor?: string | null;
|
|
@@ -1248,12 +1254,12 @@ interface ChartRect {
|
|
|
1248
1254
|
h: number;
|
|
1249
1255
|
}
|
|
1250
1256
|
//#endregion
|
|
1251
|
-
//#region dist/.types-work/chart-ex-contract-
|
|
1257
|
+
//#region dist/.types-work/chart-ex-contract-BkjyVy4_.d.ts
|
|
1252
1258
|
interface ChartExRenderer {
|
|
1253
1259
|
render(ctx: CanvasRenderingContext2D, chart: ChartModel, rect: ChartRect, ptToPx: number, shapeRotationDeg?: number): boolean;
|
|
1254
1260
|
}
|
|
1255
1261
|
//#endregion
|
|
1256
|
-
//#region dist/.types-work/mathjax-
|
|
1262
|
+
//#region dist/.types-work/mathjax-emiLk9eb.d.ts
|
|
1257
1263
|
interface MathSvg {
|
|
1258
1264
|
svg: string;
|
|
1259
1265
|
widthEm: number;
|
|
@@ -1265,22 +1271,32 @@ interface MathRenderer {
|
|
|
1265
1271
|
mathMLToSvg(mathml: string): Promise<MathSvg>;
|
|
1266
1272
|
}
|
|
1267
1273
|
//#endregion
|
|
1268
|
-
//#region dist/.types-work/three-d-contract-
|
|
1274
|
+
//#region dist/.types-work/three-d-contract-3rYMiY6u.d.ts
|
|
1269
1275
|
interface ChartThreeDRenderer {
|
|
1270
1276
|
render(ctx: CanvasRenderingContext2D, chart: ChartModel, rect: ChartRect, ptToPx: number, shapeRotationDeg?: number): boolean;
|
|
1271
1277
|
}
|
|
1272
1278
|
//#endregion
|
|
1273
|
-
//#region dist/.types-work/region-map-contract-
|
|
1279
|
+
//#region dist/.types-work/region-map-contract-fx_imRHE.d.ts
|
|
1274
1280
|
interface ChartRegionMapRenderer {
|
|
1275
1281
|
render(ctx: CanvasRenderingContext2D, chart: ChartModel, rect: ChartRect, ptToPx: number, shapeRotationDeg?: number): boolean;
|
|
1276
1282
|
}
|
|
1277
1283
|
//#endregion
|
|
1278
|
-
//#region dist/.types-work/tiff-contract-
|
|
1284
|
+
//#region dist/.types-work/tiff-contract-DJ3gpIhe.d.ts
|
|
1285
|
+
interface TiffRenderOptions {
|
|
1286
|
+
targetWidthPx?: number;
|
|
1287
|
+
targetHeightPx?: number;
|
|
1288
|
+
maxRetainedPixels?: number;
|
|
1289
|
+
}
|
|
1290
|
+
declare class TiffDecodeError extends Error {
|
|
1291
|
+
readonly code: 'ooxml-tiff-decode';
|
|
1292
|
+
constructor(message: string, options?: ErrorOptions);
|
|
1293
|
+
}
|
|
1294
|
+
declare function isTiffDecodeError(error: unknown): error is TiffDecodeError;
|
|
1279
1295
|
interface TiffRenderer {
|
|
1280
|
-
render(bytes: Uint8Array): Promise<ImageBitmap | null>;
|
|
1296
|
+
render(bytes: Uint8Array, options?: Readonly<TiffRenderOptions>): Promise<ImageBitmap | null>;
|
|
1281
1297
|
}
|
|
1282
1298
|
//#endregion
|
|
1283
|
-
//#region dist/.types-work/hyperlink-
|
|
1299
|
+
//#region dist/.types-work/hyperlink-DmJyne_y.d.ts
|
|
1284
1300
|
type OoxmlErrorCode = 'encrypted' | 'invalid-password' | 'unsupported-encryption' | 'legacy-binary-format' | 'not-ooxml';
|
|
1285
1301
|
type OoxmlErrorStage = 'container' | 'decompression' | 'parsing' | 'serialization' | 'layout' | 'rendering' | 'worker';
|
|
1286
1302
|
declare class OoxmlError extends Error {
|
|
@@ -1376,7 +1392,7 @@ interface LoadOptions$1 {
|
|
|
1376
1392
|
chartEx?: ChartExRenderer;
|
|
1377
1393
|
tiff?: TiffRenderer;
|
|
1378
1394
|
}
|
|
1379
|
-
type OoxmlDecodedImageLimitMetric = 'image-pixels' | 'active-decoded-bytes';
|
|
1395
|
+
type OoxmlDecodedImageLimitMetric = 'image-dimension' | 'image-pixels' | 'active-decoded-bytes';
|
|
1380
1396
|
declare class OoxmlDecodedImageLimitError extends RangeError {
|
|
1381
1397
|
readonly metric: OoxmlDecodedImageLimitMetric;
|
|
1382
1398
|
readonly limit: number;
|
|
@@ -1395,7 +1411,7 @@ type HyperlinkTarget = {
|
|
|
1395
1411
|
};
|
|
1396
1412
|
declare function openExternalHyperlink(url: string, allowed?: readonly string[], win?: Pick<Window, 'open'> | undefined): boolean;
|
|
1397
1413
|
//#endregion
|
|
1398
|
-
//#region dist/.types-work/find-highlight-
|
|
1414
|
+
//#region dist/.types-work/find-highlight-CEEVmKfp.d.ts
|
|
1399
1415
|
interface TextSelectionContextOptions {
|
|
1400
1416
|
readonly maxTextCharacters?: number;
|
|
1401
1417
|
readonly maxRunLocators?: number;
|
|
@@ -1456,7 +1472,7 @@ interface FindHighlightColors {
|
|
|
1456
1472
|
active?: string;
|
|
1457
1473
|
}
|
|
1458
1474
|
//#endregion
|
|
1459
|
-
//#region dist/.types-work/types-
|
|
1475
|
+
//#region dist/.types-work/types-CaGxG9gJ.d.ts
|
|
1460
1476
|
interface BlipBullet {
|
|
1461
1477
|
type: 'blip';
|
|
1462
1478
|
imagePath: string;
|
|
@@ -1718,7 +1734,7 @@ interface PictureElement {
|
|
|
1718
1734
|
sp3d?: Sp3d;
|
|
1719
1735
|
}
|
|
1720
1736
|
//#endregion
|
|
1721
|
-
//#region dist/.types-work/pptx-
|
|
1737
|
+
//#region dist/.types-work/pptx-yzrs5789.d.ts
|
|
1722
1738
|
interface PptxTextRunInfo {
|
|
1723
1739
|
elementIndex?: number;
|
|
1724
1740
|
origin?: SlideElementOrigin;
|
|
@@ -1858,12 +1874,14 @@ type LoadOptions = LoadOptions$1 & {
|
|
|
1858
1874
|
interface RenderSlideToBitmapOptions {
|
|
1859
1875
|
width?: number;
|
|
1860
1876
|
dpr?: number;
|
|
1877
|
+
imageResources?: ImageResourceOptions;
|
|
1861
1878
|
dim?: DimOptions;
|
|
1862
1879
|
onTextRun?: TextRunCallback;
|
|
1863
1880
|
}
|
|
1864
1881
|
interface RenderSlideOptions {
|
|
1865
1882
|
width?: number;
|
|
1866
1883
|
dpr?: number;
|
|
1884
|
+
imageResources?: ImageResourceOptions;
|
|
1867
1885
|
onTextRun?: TextRunCallback;
|
|
1868
1886
|
skipMediaControls?: boolean;
|
|
1869
1887
|
dim?: DimOptions;
|
|
@@ -1950,7 +1968,7 @@ declare class PptxPresentation {
|
|
|
1950
1968
|
destroy(): void;
|
|
1951
1969
|
}
|
|
1952
1970
|
type HiddenSlideMode = 'show' | 'skip' | 'dim';
|
|
1953
|
-
interface PptxViewerOptions extends Pick<RenderOptions, 'width' | 'dpr'>, LoadOptions {
|
|
1971
|
+
interface PptxViewerOptions extends Pick<RenderOptions, 'width' | 'dpr' | 'imageResources'>, LoadOptions {
|
|
1954
1972
|
onSlideChange?: (index: number, total: number, layoutComplete: boolean) => void;
|
|
1955
1973
|
onError?: (err: Error) => void;
|
|
1956
1974
|
zoomMin?: number;
|
|
@@ -2081,7 +2099,7 @@ interface PptxCommentsOptions extends ViewerCommentsOptions {
|
|
|
2081
2099
|
readonly markers?: boolean;
|
|
2082
2100
|
readonly connectors?: ViewerCommentConnectorOptions;
|
|
2083
2101
|
}
|
|
2084
|
-
interface PptxScrollViewerOptions extends Pick<RenderSlideOptions, 'width' | 'dpr'>, LoadOptions {
|
|
2102
|
+
interface PptxScrollViewerOptions extends Pick<RenderSlideOptions, 'width' | 'dpr' | 'imageResources'>, LoadOptions {
|
|
2085
2103
|
width?: number;
|
|
2086
2104
|
gap?: number;
|
|
2087
2105
|
paddingTop?: number;
|
|
@@ -2227,11 +2245,13 @@ declare class PptxScrollViewer implements ZoomableViewer {
|
|
|
2227
2245
|
getScale(): number;
|
|
2228
2246
|
zoomIn(): void;
|
|
2229
2247
|
zoomOut(): void;
|
|
2248
|
+
private _effectiveZoomMin;
|
|
2230
2249
|
fitWidth(): void;
|
|
2231
2250
|
fitPage(): void;
|
|
2232
2251
|
private _fit;
|
|
2233
2252
|
private _previewVisible;
|
|
2234
2253
|
private _previewSlot;
|
|
2254
|
+
private _clearTextLayerPreview;
|
|
2235
2255
|
private _scheduleSettle;
|
|
2236
2256
|
private _settleRender;
|
|
2237
2257
|
private _settleSlot;
|
|
@@ -2285,4 +2305,4 @@ interface PptxHighlightMatch {
|
|
|
2285
2305
|
type PptxHighlightColors = FindHighlightColors;
|
|
2286
2306
|
declare function buildPptxHighlightLayer(layer: HTMLDivElement, runs: PptxTextRunInfo[], matches: PptxHighlightMatch[], cssWidth: number, cssHeight: number, measureForFont: (font: string) => (s: string) => number, colors?: PptxHighlightColors): void;
|
|
2287
2307
|
//#endregion
|
|
2288
|
-
export { type ArrowEnd, type AutoResizeOptions, type Bevel3d, type BlipBullet, type Bullet, type Camera3d, type ChartAreaGroupDecorations, type ChartBarGroupDecorations, type ChartDataLabelOverride, type ChartDataPointOverride, type ChartDataTable, type ChartDecorationLineStyle, type ChartDisplayUnits, type ChartDisplayUnitsLabel, type ChartElement, 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 DimOptions, type DrawingMLCustomDashSegment, type Duotone, type EquationRun, type Fill, type FillRect, type FindHighlightColors, type FindMatch, type FindMatchesOptions, type Glow, type GradientFill, type GradientStop, type HiddenSlideMode, type HyperlinkTarget, type ImageFill, type LegendManualLayout, type LightRig, type LineBreak, type LoadOptions, type MatchRunSlice, 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 MediaElement, type NoFill, 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 Paragraph, type PathCmd, type PatternFill, type PictureElement, type PptxComment, type PptxCommentAnchor, type PptxCommentReply, type PptxCommentSelectionContext, type PptxCommentsOptions, type PptxElementBounds, type PptxElementContext, type PptxElementContextOptions, type PptxHighlightColors, type PptxHighlightMatch, type PptxMatchLocation, PptxPresentation, PptxScrollViewer, type PptxScrollViewerOptions, type PptxSelectionContext, type PptxSelectionContextOptions, type PptxSelectionRunLocator, type PptxSlidePoint, type PptxTextRunInfo, type PptxTextSelectionContext, PptxViewer, type PptxViewerOptions, type PresentSlideOptions, type Presentation, type PresentationHandle, type Reflection, type RenderOptions, type RenderSlideOptions, type RenderSlideToBitmapOptions, type Rot3d, type Scene3d, type SecondaryValueAxis, type Shadow, type ShapeElement, type Slide, type SlideElement, type SlideElementOrigin, type SlideElementSource, type SlideRenderOptions, type SoftEdge, type SolidFill, type Sp3d, type SpaceLine, type SrcRect, type Stroke, type TabStop, type TableCell, type TableElement, type TableRow, type TextBody, type TextOutline, type TextRect, type TextRun, type TextRunCallback, type TextRunData, type TextSelectionContextOptions, type TiffRenderer, type TileInfo, type ViewerCommentConnectorOptions, type ViewerCommentConnectorRoute, type ViewerCommentConnectorStroke, type ViewerCommentMessageContext, type ViewerCommentThreadContext, type ViewerContextMenuEvent, type ZoomableViewer, autoResize, buildPptxHighlightLayer, buildPptxTextLayer, isOoxmlDecodedImageLimitError, openExternalHyperlink, readPptxTextSelectionContext, renderSlide };
|
|
2308
|
+
export { type ArrowEnd, type AutoResizeOptions, type Bevel3d, type BlipBullet, type Bullet, type Camera3d, type ChartAreaGroupDecorations, type ChartBarGroupDecorations, type ChartDataLabelOverride, type ChartDataPointOverride, type ChartDataTable, type ChartDecorationLineStyle, type ChartDisplayUnits, type ChartDisplayUnitsLabel, type ChartElement, 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 DecodedImageBudgetStrategy, type DimOptions, type DrawingMLCustomDashSegment, type Duotone, type EquationRun, type Fill, type FillRect, type FindHighlightColors, type FindMatch, type FindMatchesOptions, type Glow, type GradientFill, type GradientStop, type HiddenSlideMode, type HyperlinkTarget, type ImageFill, type ImageResourceOptions, type LegendManualLayout, type LightRig, type LineBreak, type LoadOptions, type MatchRunSlice, 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 MediaElement, type NoFill, 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 Paragraph, type PathCmd, type PatternFill, type PictureElement, type PptxComment, type PptxCommentAnchor, type PptxCommentReply, type PptxCommentSelectionContext, type PptxCommentsOptions, type PptxElementBounds, type PptxElementContext, type PptxElementContextOptions, type PptxHighlightColors, type PptxHighlightMatch, type PptxMatchLocation, PptxPresentation, PptxScrollViewer, type PptxScrollViewerOptions, type PptxSelectionContext, type PptxSelectionContextOptions, type PptxSelectionRunLocator, type PptxSlidePoint, type PptxTextRunInfo, type PptxTextSelectionContext, PptxViewer, type PptxViewerOptions, type PresentSlideOptions, type Presentation, type PresentationHandle, type Reflection, type RenderOptions, type RenderSlideOptions, type RenderSlideToBitmapOptions, type Rot3d, type Scene3d, type SecondaryValueAxis, type Shadow, type ShapeElement, type Slide, type SlideElement, type SlideElementOrigin, type SlideElementSource, type SlideRenderOptions, type SoftEdge, type SolidFill, type Sp3d, type SpaceLine, type SrcRect, type Stroke, type TabStop, type TableCell, type TableElement, type TableRow, type TextBody, type TextOutline, type TextRect, type TextRun, type TextRunCallback, type TextRunData, type TextSelectionContextOptions, TiffDecodeError, type TiffRenderOptions, type TiffRenderer, type TileInfo, type ViewerCommentConnectorOptions, type ViewerCommentConnectorRoute, type ViewerCommentConnectorStroke, type ViewerCommentMessageContext, type ViewerCommentThreadContext, type ViewerContextMenuEvent, type ZoomableViewer, autoResize, buildPptxHighlightLayer, buildPptxTextLayer, isOoxmlDecodedImageLimitError, isTiffDecodeError, openExternalHyperlink, readPptxTextSelectionContext, renderSlide };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region dist/.types-work/chart-
|
|
1
|
+
//#region dist/.types-work/chart-D5f5lUUP.d.ts
|
|
2
2
|
interface Duotone {
|
|
3
3
|
clr1: string;
|
|
4
4
|
clr2: string;
|
|
@@ -938,7 +938,7 @@ interface ChartRect {
|
|
|
938
938
|
h: number;
|
|
939
939
|
}
|
|
940
940
|
//#endregion
|
|
941
|
-
//#region dist/.types-work/region-map-contract-
|
|
941
|
+
//#region dist/.types-work/region-map-contract-fx_imRHE.d.ts
|
|
942
942
|
interface ChartRegionMapRenderer {
|
|
943
943
|
render(ctx: CanvasRenderingContext2D, chart: ChartModel, rect: ChartRect, ptToPx: number, shapeRotationDeg?: number): boolean;
|
|
944
944
|
}
|
package/dist/types/three-d.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region dist/.types-work/chart-
|
|
1
|
+
//#region dist/.types-work/chart-D5f5lUUP.d.ts
|
|
2
2
|
interface Duotone {
|
|
3
3
|
clr1: string;
|
|
4
4
|
clr2: string;
|
|
@@ -938,7 +938,7 @@ interface ChartRect {
|
|
|
938
938
|
h: number;
|
|
939
939
|
}
|
|
940
940
|
//#endregion
|
|
941
|
-
//#region dist/.types-work/three-d-contract-
|
|
941
|
+
//#region dist/.types-work/three-d-contract-3rYMiY6u.d.ts
|
|
942
942
|
interface ChartThreeDRenderer {
|
|
943
943
|
render(ctx: CanvasRenderingContext2D, chart: ChartModel, rect: ChartRect, ptToPx: number, shapeRotationDeg?: number): boolean;
|
|
944
944
|
}
|
package/dist/types/tiff.d.ts
CHANGED
|
@@ -1,9 +1,19 @@
|
|
|
1
|
-
//#region dist/.types-work/tiff-contract-
|
|
1
|
+
//#region dist/.types-work/tiff-contract-DJ3gpIhe.d.ts
|
|
2
|
+
interface TiffRenderOptions {
|
|
3
|
+
targetWidthPx?: number;
|
|
4
|
+
targetHeightPx?: number;
|
|
5
|
+
maxRetainedPixels?: number;
|
|
6
|
+
}
|
|
7
|
+
declare class TiffDecodeError extends Error {
|
|
8
|
+
readonly code: 'ooxml-tiff-decode';
|
|
9
|
+
constructor(message: string, options?: ErrorOptions);
|
|
10
|
+
}
|
|
11
|
+
declare function isTiffDecodeError(error: unknown): error is TiffDecodeError;
|
|
2
12
|
interface TiffRenderer {
|
|
3
|
-
render(bytes: Uint8Array): Promise<ImageBitmap | null>;
|
|
13
|
+
render(bytes: Uint8Array, options?: Readonly<TiffRenderOptions>): Promise<ImageBitmap | null>;
|
|
4
14
|
}
|
|
5
15
|
//#endregion
|
|
6
16
|
//#region dist/.types-work/tiff.d.ts
|
|
7
17
|
declare const tiff: TiffRenderer;
|
|
8
18
|
//#endregion
|
|
9
|
-
export { type TiffRenderer, tiff };
|
|
19
|
+
export { TiffDecodeError, type TiffRenderOptions, type TiffRenderer, isTiffDecodeError, tiff };
|
package/dist/types/xlsx.d.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
//#region dist/.types-work/chart-
|
|
1
|
+
//#region dist/.types-work/chart-D5f5lUUP.d.ts
|
|
2
|
+
type DecodedImageBudgetStrategy = 'adaptive' | 'strict';
|
|
3
|
+
interface ImageResourceOptions {
|
|
4
|
+
decodedByteBudget?: number;
|
|
5
|
+
strategy?: DecodedImageBudgetStrategy;
|
|
6
|
+
}
|
|
2
7
|
type MathStyle = 'roman' | 'italic' | 'bold' | 'boldItalic';
|
|
3
8
|
interface MathRun {
|
|
4
9
|
kind: 'run';
|
|
@@ -1054,12 +1059,12 @@ interface ChartRect {
|
|
|
1054
1059
|
h: number;
|
|
1055
1060
|
}
|
|
1056
1061
|
//#endregion
|
|
1057
|
-
//#region dist/.types-work/chart-ex-contract-
|
|
1062
|
+
//#region dist/.types-work/chart-ex-contract-BkjyVy4_.d.ts
|
|
1058
1063
|
interface ChartExRenderer {
|
|
1059
1064
|
render(ctx: CanvasRenderingContext2D, chart: ChartModel, rect: ChartRect, ptToPx: number, shapeRotationDeg?: number): boolean;
|
|
1060
1065
|
}
|
|
1061
1066
|
//#endregion
|
|
1062
|
-
//#region dist/.types-work/mathjax-
|
|
1067
|
+
//#region dist/.types-work/mathjax-emiLk9eb.d.ts
|
|
1063
1068
|
interface MathSvg {
|
|
1064
1069
|
svg: string;
|
|
1065
1070
|
widthEm: number;
|
|
@@ -1071,22 +1076,32 @@ interface MathRenderer {
|
|
|
1071
1076
|
mathMLToSvg(mathml: string): Promise<MathSvg>;
|
|
1072
1077
|
}
|
|
1073
1078
|
//#endregion
|
|
1074
|
-
//#region dist/.types-work/three-d-contract-
|
|
1079
|
+
//#region dist/.types-work/three-d-contract-3rYMiY6u.d.ts
|
|
1075
1080
|
interface ChartThreeDRenderer {
|
|
1076
1081
|
render(ctx: CanvasRenderingContext2D, chart: ChartModel, rect: ChartRect, ptToPx: number, shapeRotationDeg?: number): boolean;
|
|
1077
1082
|
}
|
|
1078
1083
|
//#endregion
|
|
1079
|
-
//#region dist/.types-work/region-map-contract-
|
|
1084
|
+
//#region dist/.types-work/region-map-contract-fx_imRHE.d.ts
|
|
1080
1085
|
interface ChartRegionMapRenderer {
|
|
1081
1086
|
render(ctx: CanvasRenderingContext2D, chart: ChartModel, rect: ChartRect, ptToPx: number, shapeRotationDeg?: number): boolean;
|
|
1082
1087
|
}
|
|
1083
1088
|
//#endregion
|
|
1084
|
-
//#region dist/.types-work/tiff-contract-
|
|
1089
|
+
//#region dist/.types-work/tiff-contract-DJ3gpIhe.d.ts
|
|
1090
|
+
interface TiffRenderOptions {
|
|
1091
|
+
targetWidthPx?: number;
|
|
1092
|
+
targetHeightPx?: number;
|
|
1093
|
+
maxRetainedPixels?: number;
|
|
1094
|
+
}
|
|
1095
|
+
declare class TiffDecodeError extends Error {
|
|
1096
|
+
readonly code: 'ooxml-tiff-decode';
|
|
1097
|
+
constructor(message: string, options?: ErrorOptions);
|
|
1098
|
+
}
|
|
1099
|
+
declare function isTiffDecodeError(error: unknown): error is TiffDecodeError;
|
|
1085
1100
|
interface TiffRenderer {
|
|
1086
|
-
render(bytes: Uint8Array): Promise<ImageBitmap | null>;
|
|
1101
|
+
render(bytes: Uint8Array, options?: Readonly<TiffRenderOptions>): Promise<ImageBitmap | null>;
|
|
1087
1102
|
}
|
|
1088
1103
|
//#endregion
|
|
1089
|
-
//#region dist/.types-work/hyperlink-
|
|
1104
|
+
//#region dist/.types-work/hyperlink-DmJyne_y.d.ts
|
|
1090
1105
|
type OoxmlErrorCode = 'encrypted' | 'invalid-password' | 'unsupported-encryption' | 'legacy-binary-format' | 'not-ooxml';
|
|
1091
1106
|
type OoxmlErrorStage = 'container' | 'decompression' | 'parsing' | 'serialization' | 'layout' | 'rendering' | 'worker';
|
|
1092
1107
|
declare class OoxmlError extends Error {
|
|
@@ -1174,7 +1189,7 @@ interface LoadOptions$1 {
|
|
|
1174
1189
|
chartEx?: ChartExRenderer;
|
|
1175
1190
|
tiff?: TiffRenderer;
|
|
1176
1191
|
}
|
|
1177
|
-
type OoxmlDecodedImageLimitMetric = 'image-pixels' | 'active-decoded-bytes';
|
|
1192
|
+
type OoxmlDecodedImageLimitMetric = 'image-dimension' | 'image-pixels' | 'active-decoded-bytes';
|
|
1178
1193
|
declare class OoxmlDecodedImageLimitError extends RangeError {
|
|
1179
1194
|
readonly metric: OoxmlDecodedImageLimitMetric;
|
|
1180
1195
|
readonly limit: number;
|
|
@@ -1193,7 +1208,7 @@ type HyperlinkTarget = {
|
|
|
1193
1208
|
};
|
|
1194
1209
|
declare function openExternalHyperlink(url: string, allowed?: readonly string[], win?: Pick<Window, 'open'> | undefined): boolean;
|
|
1195
1210
|
//#endregion
|
|
1196
|
-
//#region dist/.types-work/find-highlight-
|
|
1211
|
+
//#region dist/.types-work/find-highlight-CEEVmKfp.d.ts
|
|
1197
1212
|
interface ViewerContextMenuEvent<TContext> {
|
|
1198
1213
|
readonly originalEvent: MouseEvent;
|
|
1199
1214
|
getContext(): Promise<TContext | null>;
|
|
@@ -1237,7 +1252,7 @@ interface FindHighlightColors {
|
|
|
1237
1252
|
active?: string;
|
|
1238
1253
|
}
|
|
1239
1254
|
//#endregion
|
|
1240
|
-
//#region dist/.types-work/types-
|
|
1255
|
+
//#region dist/.types-work/types-BsHNWyrm.d.ts
|
|
1241
1256
|
type ShapeFill = Exclude<Fill, {
|
|
1242
1257
|
fillType: 'image';
|
|
1243
1258
|
} | {
|
|
@@ -1970,6 +1985,7 @@ interface XlsxRenderViewportOptions {
|
|
|
1970
1985
|
width?: number;
|
|
1971
1986
|
height?: number;
|
|
1972
1987
|
dpr?: number;
|
|
1988
|
+
imageResources?: ImageResourceOptions;
|
|
1973
1989
|
defaultFontFamily?: string;
|
|
1974
1990
|
defaultFontSize?: number;
|
|
1975
1991
|
scrollOffsetX?: number;
|
|
@@ -1990,7 +2006,7 @@ interface XlsxRenderViewportOptions {
|
|
|
1990
2006
|
} | null;
|
|
1991
2007
|
}
|
|
1992
2008
|
//#endregion
|
|
1993
|
-
//#region dist/.types-work/xlsx-
|
|
2009
|
+
//#region dist/.types-work/xlsx-0HRTO0wU.d.ts
|
|
1994
2010
|
type ResolvedList = {
|
|
1995
2011
|
kind: 'values';
|
|
1996
2012
|
values: string[];
|
|
@@ -2156,6 +2172,7 @@ interface XlsxMatchLocation {
|
|
|
2156
2172
|
interface XlsxCommentsOptions extends ViewerCommentsOptions {}
|
|
2157
2173
|
type HiddenSheetMode = 'show' | 'skip' | 'dim';
|
|
2158
2174
|
interface XlsxSheetViewerOptions extends LoadOptions {
|
|
2175
|
+
imageResources?: ImageResourceOptions;
|
|
2159
2176
|
cellScale?: number;
|
|
2160
2177
|
resizable?: boolean;
|
|
2161
2178
|
showScrollbars?: boolean;
|
|
@@ -2526,4 +2543,4 @@ declare class XlsxSheetViewer implements ZoomableViewer {
|
|
|
2526
2543
|
}
|
|
2527
2544
|
declare function resolveSharedStrings(ws: Worksheet, sharedStrings: SharedString[]): Worksheet;
|
|
2528
2545
|
//#endregion
|
|
2529
|
-
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 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 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, 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, XlsxSheetViewer, type XlsxSheetViewerOptions, type XlsxTextRunInfo, XlsxViewer, type XlsxViewerOptions, type XlsxViewportOffset, XlsxWorkbook, type ZoomableViewer, autoResize, isOoxmlDecodedImageLimitError, openExternalHyperlink, resolveSharedStrings };
|
|
2546
|
+
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, 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 { $t as e, F as t, I as n, K as r, N as i, P as a, Qt as o, U as s, an as c, en as l, in as u, nn as d, rn as f, sn as p, tn as m } from "./line-metrics-u87yCAfV.js";
|
|
2
|
+
import { n as h, r as g, t as _ } from "./resource-measurement-6uR3Huao.js";
|
|
3
|
+
import { t as v } from "./transfer-mIj7E7NB.js";
|
|
4
4
|
//#region packages/xlsx/src/worksheet-resource-limits.ts
|
|
5
|
-
var y =
|
|
5
|
+
var y = c, b = d, x = f, S = u, C = m, w = o, T = e, E = l, D = Object.freeze({
|
|
6
6
|
archiveEntryCount: 0,
|
|
7
7
|
declaredInflatedBytes: 0,
|
|
8
8
|
distinctInflatedBytes: 0,
|
|
@@ -45,7 +45,7 @@ function j(e, t, n = {}) {
|
|
|
45
45
|
}
|
|
46
46
|
function M(e, t, n, r, i, a, o) {
|
|
47
47
|
let s = n === "worksheet-json" ? "serialization" : "parsing";
|
|
48
|
-
return new
|
|
48
|
+
return new p(`OOXML resource limit exceeded${t ? ` for ${t}` : ""}: ${r} ${a} > ${i}`, {
|
|
49
49
|
stage: s,
|
|
50
50
|
violation: {
|
|
51
51
|
format: "xlsx",
|
|
@@ -159,7 +159,7 @@ var z = 64 * 1024 * 1024, B = class {
|
|
|
159
159
|
get pendingOpenCount() {
|
|
160
160
|
return this.pendingOpens.size;
|
|
161
161
|
}
|
|
162
|
-
async open(
|
|
162
|
+
async open(e, n, r) {
|
|
163
163
|
if (this.resourceFailure) throw this.resourceFailure;
|
|
164
164
|
let i = this.pendingOpens.get(r.sessionId);
|
|
165
165
|
if (!i || i.identity.operationId !== r.operationId || i.identity.generation !== r.generation) throw Error("worksheet pull session open reservation is stale or missing");
|
|
@@ -167,12 +167,12 @@ var z = 64 * 1024 * 1024, B = class {
|
|
|
167
167
|
a = e;
|
|
168
168
|
}), s = this.operationTail.then(() => this.coordinator.enqueue(async () => {
|
|
169
169
|
if (i.canceled) throw Error("worksheet pull session open was canceled");
|
|
170
|
-
this.executeArchive((
|
|
170
|
+
this.executeArchive((t) => t.open_sheet_cursor(e, n));
|
|
171
171
|
let o = [], s = {
|
|
172
172
|
rows: 0,
|
|
173
173
|
cells: 0,
|
|
174
174
|
ownedUtf8Bytes: 0
|
|
175
|
-
},
|
|
175
|
+
}, c, l = !1, u = new t({
|
|
176
176
|
...r,
|
|
177
177
|
maxByteCredit: z,
|
|
178
178
|
coordinator: this.coordinator,
|
|
@@ -185,12 +185,12 @@ var z = 64 * 1024 * 1024, B = class {
|
|
|
185
185
|
if (n.kind === "rows") {
|
|
186
186
|
let e = A(s, O(n.rows));
|
|
187
187
|
N(e, "get-worksheet-worker", void 0, this.readResourceUsage()), o.push(...n.rows), s = e;
|
|
188
|
-
} else
|
|
188
|
+
} else c = n.worksheet;
|
|
189
189
|
} catch (e) {
|
|
190
|
-
throw e instanceof
|
|
190
|
+
throw e instanceof p && (this.resourceFailure ??= e), e;
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
|
-
|
|
193
|
+
l = t;
|
|
194
194
|
let n = v(e);
|
|
195
195
|
return {
|
|
196
196
|
payload: n,
|
|
@@ -201,26 +201,26 @@ var z = 64 * 1024 * 1024, B = class {
|
|
|
201
201
|
},
|
|
202
202
|
measureChunk: ({ payload: e }) => e.byteLength,
|
|
203
203
|
acknowledge: () => {
|
|
204
|
-
if (!
|
|
205
|
-
let
|
|
204
|
+
if (!l) return;
|
|
205
|
+
let t, n;
|
|
206
206
|
try {
|
|
207
207
|
if (this.acceptWorksheet) {
|
|
208
|
-
if (!
|
|
209
|
-
|
|
210
|
-
let r =
|
|
208
|
+
if (!c) throw Error("worksheet terminal payload is missing");
|
|
209
|
+
c.rows = c.parseError ? [] : o;
|
|
210
|
+
let r = c.parseError ? {
|
|
211
211
|
rows: 0,
|
|
212
212
|
cells: 0,
|
|
213
213
|
ownedUtf8Bytes: 0
|
|
214
|
-
} : s, i = k(
|
|
214
|
+
} : s, i = k(c, r), a = this.readResourceUsage();
|
|
215
215
|
N(i, "get-worksheet-worker", void 0, a), P(i.jsonBytes, "get-worksheet-worker", void 0, a);
|
|
216
|
-
let
|
|
217
|
-
typeof
|
|
216
|
+
let l = this.acceptWorksheet(e, c, i, a);
|
|
217
|
+
typeof l == "function" ? t = l : l && ({rollback: t, commit: n} = l);
|
|
218
218
|
}
|
|
219
219
|
this.executeArchive((e) => e.acknowledge_sheet_cursor_terminal()), n?.();
|
|
220
|
-
} catch (
|
|
221
|
-
throw
|
|
220
|
+
} catch (e) {
|
|
221
|
+
throw t?.(), e instanceof p && (this.resourceFailure ??= e), e;
|
|
222
222
|
}
|
|
223
|
-
|
|
223
|
+
l = !1, this.sessions.delete(r.sessionId), a();
|
|
224
224
|
},
|
|
225
225
|
cancel: () => {
|
|
226
226
|
try {
|
|
@@ -240,7 +240,7 @@ var z = 64 * 1024 * 1024, B = class {
|
|
|
240
240
|
}
|
|
241
241
|
});
|
|
242
242
|
this.sessions.set(r.sessionId, {
|
|
243
|
-
host:
|
|
243
|
+
host: u,
|
|
244
244
|
identity: r
|
|
245
245
|
}), this.pendingOpens.delete(r.sessionId);
|
|
246
246
|
}));
|
|
@@ -264,11 +264,11 @@ var z = 64 * 1024 * 1024, B = class {
|
|
|
264
264
|
dispatch(e, t) {
|
|
265
265
|
let n = this.sessions.get(e.sessionId);
|
|
266
266
|
if (n) return n.host.dispatch(e, t);
|
|
267
|
-
let
|
|
268
|
-
if (
|
|
269
|
-
let n =
|
|
270
|
-
return n && (
|
|
271
|
-
protocol:
|
|
267
|
+
let i = this.pendingOpens.get(e.sessionId);
|
|
268
|
+
if (i && (e.kind === "cancel" || e.kind === "close")) {
|
|
269
|
+
let n = i.identity.operationId === e.operationId && i.identity.generation === e.generation;
|
|
270
|
+
return n && (i.canceled = !0), t(n ? {
|
|
271
|
+
protocol: a,
|
|
272
272
|
kind: "accepted",
|
|
273
273
|
sessionId: e.sessionId,
|
|
274
274
|
operationId: e.operationId,
|
|
@@ -276,7 +276,7 @@ var z = 64 * 1024 * 1024, B = class {
|
|
|
276
276
|
requestId: e.requestId,
|
|
277
277
|
command: e.kind
|
|
278
278
|
} : {
|
|
279
|
-
protocol:
|
|
279
|
+
protocol: a,
|
|
280
280
|
kind: "error",
|
|
281
281
|
sessionId: e.sessionId,
|
|
282
282
|
operationId: e.operationId,
|
|
@@ -290,7 +290,7 @@ var z = 64 * 1024 * 1024, B = class {
|
|
|
290
290
|
}), Promise.resolve();
|
|
291
291
|
}
|
|
292
292
|
return e.kind === "cancel" || e.kind === "close" ? (t({
|
|
293
|
-
protocol:
|
|
293
|
+
protocol: a,
|
|
294
294
|
kind: "accepted",
|
|
295
295
|
sessionId: e.sessionId,
|
|
296
296
|
operationId: e.operationId,
|
|
@@ -298,13 +298,13 @@ var z = 64 * 1024 * 1024, B = class {
|
|
|
298
298
|
requestId: e.requestId,
|
|
299
299
|
command: e.kind
|
|
300
300
|
}), Promise.resolve()) : (t({
|
|
301
|
-
protocol:
|
|
301
|
+
protocol: a,
|
|
302
302
|
kind: "error",
|
|
303
303
|
sessionId: e.sessionId,
|
|
304
304
|
operationId: e.operationId,
|
|
305
305
|
generation: e.generation,
|
|
306
306
|
requestId: e.requestId,
|
|
307
|
-
error:
|
|
307
|
+
error: r(/* @__PURE__ */ Error("worksheet pull session is not open"))
|
|
308
308
|
}), Promise.resolve());
|
|
309
309
|
}
|
|
310
310
|
async dispatchSafely(e, t) {
|
|
@@ -313,13 +313,13 @@ var z = 64 * 1024 * 1024, B = class {
|
|
|
313
313
|
} catch (n) {
|
|
314
314
|
try {
|
|
315
315
|
t({
|
|
316
|
-
protocol:
|
|
316
|
+
protocol: a,
|
|
317
317
|
kind: "error",
|
|
318
318
|
sessionId: e.sessionId,
|
|
319
319
|
operationId: e.operationId,
|
|
320
320
|
generation: e.generation,
|
|
321
321
|
requestId: e.requestId,
|
|
322
|
-
error:
|
|
322
|
+
error: r(n)
|
|
323
323
|
});
|
|
324
324
|
} catch {}
|
|
325
325
|
}
|
|
@@ -329,7 +329,7 @@ var z = 64 * 1024 * 1024, B = class {
|
|
|
329
329
|
if (this.resourceFailure) throw this.resourceFailure;
|
|
330
330
|
return e();
|
|
331
331
|
})).catch((e) => {
|
|
332
|
-
throw e instanceof
|
|
332
|
+
throw e instanceof p && (this.resourceFailure ??= e), e;
|
|
333
333
|
});
|
|
334
334
|
return this.operationTail = t.then(() => void 0, () => void 0), t;
|
|
335
335
|
}
|
|
@@ -337,7 +337,7 @@ var z = 64 * 1024 * 1024, B = class {
|
|
|
337
337
|
for (let e of this.pendingOpens.values()) e.canceled = !0;
|
|
338
338
|
let e = 1;
|
|
339
339
|
for (let { host: t, identity: n } of [...this.sessions.values()]) await t.dispatch({
|
|
340
|
-
protocol:
|
|
340
|
+
protocol: a,
|
|
341
341
|
kind: "close",
|
|
342
342
|
...n,
|
|
343
343
|
requestId: e++
|
|
@@ -353,7 +353,7 @@ var z = 64 * 1024 * 1024, B = class {
|
|
|
353
353
|
let t = this.sessions.get(e.sessionId);
|
|
354
354
|
if (t) {
|
|
355
355
|
await t.host.dispatch({
|
|
356
|
-
protocol:
|
|
356
|
+
protocol: a,
|
|
357
357
|
kind: "close",
|
|
358
358
|
...e,
|
|
359
359
|
requestId: 1
|
|
@@ -365,7 +365,7 @@ var z = 64 * 1024 * 1024, B = class {
|
|
|
365
365
|
}
|
|
366
366
|
readResourceUsage() {
|
|
367
367
|
try {
|
|
368
|
-
return
|
|
368
|
+
return s(this.executeArchive((e) => e.sheet_cursor_resource_usage()));
|
|
369
369
|
} catch (e) {
|
|
370
370
|
if (String(e).includes("worksheet cursor usage is unavailable")) return;
|
|
371
371
|
throw e;
|
|
@@ -381,24 +381,24 @@ var z = 64 * 1024 * 1024, B = class {
|
|
|
381
381
|
if (!Number.isSafeInteger(e) || e < 0) throw RangeError("sheetIndex must be a non-negative safe integer");
|
|
382
382
|
if (!t) throw TypeError("sheetName must be non-empty");
|
|
383
383
|
W(n);
|
|
384
|
-
let r = this.nextSessionId++,
|
|
384
|
+
let r = this.nextSessionId++, a = {
|
|
385
385
|
sessionId: r,
|
|
386
386
|
operationId: r,
|
|
387
387
|
generation: this.options.generation ?? 1
|
|
388
|
-
},
|
|
389
|
-
...
|
|
388
|
+
}, o = new i(this.options.transport, {
|
|
389
|
+
...a,
|
|
390
390
|
maxByteCredit: z,
|
|
391
391
|
timeoutMs: this.options.timeoutMs,
|
|
392
392
|
disposeTransferred: this.options.disposeTransferred
|
|
393
393
|
});
|
|
394
|
-
this.active.add(
|
|
394
|
+
this.active.add(o);
|
|
395
395
|
let s = !1, c;
|
|
396
396
|
try {
|
|
397
|
-
for (await this.options.open(e, t,
|
|
397
|
+
for (await this.options.open(e, t, a, this.options.timeoutMs);;) {
|
|
398
398
|
W(n);
|
|
399
|
-
let e = await
|
|
399
|
+
let e = await o.pull(z, { signal: n });
|
|
400
400
|
try {
|
|
401
|
-
let t = e.usage ??
|
|
401
|
+
let t = e.usage ?? o.usageCheckpoint;
|
|
402
402
|
t && this.options.onUsage?.(t);
|
|
403
403
|
let r = R(e.payload, e.done, this.options.sharedStrings);
|
|
404
404
|
if (yield r.kind === "rows" ? {
|
|
@@ -426,11 +426,11 @@ var z = 64 * 1024 * 1024, B = class {
|
|
|
426
426
|
} finally {
|
|
427
427
|
let e;
|
|
428
428
|
try {
|
|
429
|
-
s || await
|
|
429
|
+
s || await o.cancel(U(c));
|
|
430
430
|
} catch (t) {
|
|
431
431
|
e = t;
|
|
432
432
|
} finally {
|
|
433
|
-
this.active.delete(
|
|
433
|
+
this.active.delete(o);
|
|
434
434
|
}
|
|
435
435
|
if (c === void 0 && e !== void 0) throw e;
|
|
436
436
|
}
|