@silurus/ooxml 0.77.0 → 0.78.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.
Files changed (33) hide show
  1. package/README.md +2 -2
  2. package/dist/{canvas-viewer-mechanics-DTkBvITv.js → canvas-viewer-mechanics-ChxLdOJg.js} +1 -1
  3. package/dist/{document-pull-client-iWr8-S7P.js → document-pull-client-xsdVDuVD.js} +1799 -1769
  4. package/dist/{docx-B1gYS6eU.js → docx-CZC3j4s4.js} +14 -14
  5. package/dist/docx.mjs +3 -3
  6. package/dist/docx_parser_bg.wasm +0 -0
  7. package/dist/index.mjs +3 -3
  8. package/dist/{line-distribute-C1r2zvji.js → line-distribute-HuZyTARz.js} +133 -72
  9. package/dist/{line-metrics-BdCACYlq.js → line-metrics-z9AdgPaZ.js} +2722 -1842
  10. package/dist/node.mjs +7 -7
  11. package/dist/{pptx-CQjtK_o7.js → pptx-c3UgGKIs.js} +38 -38
  12. package/dist/pptx.mjs +4 -4
  13. package/dist/pptx_parser_bg.wasm +0 -0
  14. package/dist/render-worker-host-BzxTAscX.js +27 -0
  15. package/dist/render-worker-host-CBjWHxMb.js +27 -0
  16. package/dist/render-worker-host-Ivhx3KII.js +27 -0
  17. package/dist/{render-Ca80nlG5.js → render-yhFUeiYl.js} +1 -1
  18. package/dist/{resource-measurement-E_S_iau4.js → resource-measurement-5g27Av6n.js} +1 -1
  19. package/dist/{session-KvKxQAeL.js → session-BOuXp10X.js} +2 -2
  20. package/dist/{slide-pull-client-BXb67StB.js → slide-pull-client-DKckZrLx.js} +1172 -879
  21. package/dist/types/docx.d.ts +141 -8
  22. package/dist/types/index.d.ts +178 -14
  23. package/dist/types/node.d.ts +171 -8
  24. package/dist/types/pptx.d.ts +102 -8
  25. package/dist/types/xlsx.d.ts +161 -8
  26. package/dist/{worksheet-pull-client-YzjJMOns.js → worksheet-pull-client-CMDRPZ5E.js} +2 -2
  27. package/dist/{xlsx-RLCmd1Bm.js → xlsx-BAScjxlC.js} +1621 -1298
  28. package/dist/xlsx.mjs +4 -4
  29. package/dist/xlsx_parser_bg.wasm +0 -0
  30. package/package.json +1 -1
  31. package/dist/render-worker-host-BozYMmxO.js +0 -27
  32. package/dist/render-worker-host-C96AiK8e.js +0 -27
  33. package/dist/render-worker-host-EHG5j8FK.js +0 -27
@@ -10,7 +10,7 @@ interface MathRenderer {
10
10
  mathMLToSvg(mathml: string): Promise<MathSvg>;
11
11
  }
12
12
  //#endregion
13
- //#region dist/.types-work/hyperlink-BqgLAFOG.d.ts
13
+ //#region dist/.types-work/hyperlink-R5D7g--F.d.ts
14
14
  type MathStyle = 'roman' | 'italic' | 'bold' | 'boldItalic';
15
15
  interface MathRun {
16
16
  kind: 'run';
@@ -119,6 +119,32 @@ interface Duotone {
119
119
  clr1: string;
120
120
  clr2: string;
121
121
  }
122
+ interface SolidFill {
123
+ fillType: 'solid';
124
+ color: string;
125
+ }
126
+ interface GradientStop$1 {
127
+ position: number;
128
+ color: string;
129
+ }
130
+ interface GradientFill {
131
+ fillType: 'gradient';
132
+ stops: GradientStop$1[];
133
+ angle: number;
134
+ gradType: string;
135
+ scaled?: boolean;
136
+ path?: 'shape' | 'circle' | 'rect' | string;
137
+ fillToRect?: FillRect;
138
+ tileRect?: FillRect;
139
+ flip?: 'none' | 'x' | 'y' | 'xy' | string;
140
+ rotWithShape?: boolean;
141
+ }
142
+ interface PatternFill {
143
+ fillType: 'pattern';
144
+ fg: string;
145
+ bg: string;
146
+ preset: string;
147
+ }
122
148
  interface FillRect {
123
149
  l?: number;
124
150
  t?: number;
@@ -136,6 +162,9 @@ interface TileInfo {
136
162
  interface ChartSeries {
137
163
  name: string;
138
164
  color: string | null;
165
+ fillPattern?: PatternFill | null;
166
+ lineColor?: string | null;
167
+ lineWidthEmu?: number | null;
139
168
  values: (number | null)[];
140
169
  dataPointColors?: (string | null)[] | null;
141
170
  dataLabelColors?: (string | null)[] | null;
@@ -145,6 +174,8 @@ interface ChartSeries {
145
174
  categories?: string[] | null;
146
175
  showMarker?: boolean | null;
147
176
  valFormatCode?: string | null;
177
+ catFormatCode?: string | null;
178
+ catFormatCodes?: (string | null)[] | null;
148
179
  markerSymbol?: string | null;
149
180
  markerSize?: number | null;
150
181
  markerFill?: string | null;
@@ -206,6 +237,7 @@ interface ChartSeriesDataLabels {
206
237
  position?: string;
207
238
  fontColor?: string;
208
239
  formatCode?: string;
240
+ separator?: string;
209
241
  fontBold?: boolean;
210
242
  fontSizeHpt?: number;
211
243
  labelBox?: ChartLabelBox;
@@ -223,12 +255,27 @@ interface ChartErrBars {
223
255
  lineWidthEmu?: number;
224
256
  dash?: string;
225
257
  }
226
- type ChartType = 'line' | 'stackedLine' | 'stackedLinePct' | 'clusteredBar' | 'clusteredBarH' | 'stackedBar' | 'stackedBarH' | 'stackedBarPct' | 'stackedBarHPct' | 'area' | 'stackedArea' | 'stackedAreaPct' | 'pie' | 'doughnut' | 'scatter' | 'bubble' | 'radar' | 'waterfall' | 'stock' | 'boxWhisker' | 'sunburst' | string;
258
+ type ChartType = 'line' | 'stackedLine' | 'stackedLinePct' | 'clusteredBar' | 'clusteredBarH' | 'stackedBar' | 'stackedBarH' | 'stackedBarPct' | 'stackedBarHPct' | 'area' | 'stackedArea' | 'stackedAreaPct' | 'pie' | 'doughnut' | 'scatter' | 'bubble' | 'radar' | 'waterfall' | 'stock' | 'boxWhisker' | 'sunburst' | 'treemap' | string;
259
+ interface ChartExElementStyle {
260
+ fillPaints?: Array<SolidFill | GradientFill | PatternFill | null> | null;
261
+ fillColors?: Array<string | null> | null;
262
+ fillHidden?: boolean | null;
263
+ lineColors?: Array<string | null> | null;
264
+ lineWidthEmu?: number | null;
265
+ lineHidden?: boolean | null;
266
+ lineDash?: string | null;
267
+ lineCap?: string | null;
268
+ lineJoin?: string | null;
269
+ fillColorIndex?: number | null;
270
+ lineColorIndex?: number | null;
271
+ }
227
272
  interface ChartModel {
228
273
  chartType: ChartType;
229
274
  title: string | null;
275
+ titlePresent?: boolean;
230
276
  categories: string[];
231
277
  series: ChartSeries[];
278
+ chartTextBoxes?: ChartTextBox[] | null;
232
279
  varyColors?: boolean | null;
233
280
  showDataLabels: boolean;
234
281
  valMin: number | null;
@@ -256,6 +303,7 @@ interface ChartModel {
256
303
  catAxisFontColor?: string | null;
257
304
  valAxisFontColor?: string | null;
258
305
  dataLabelFontSizeHpt: number | null;
306
+ dataLabelFontBold?: boolean | null;
259
307
  subtotalIndices: number[];
260
308
  legendManualLayout?: LegendManualLayout | null;
261
309
  valAxisFormatCode?: string | null;
@@ -300,8 +348,12 @@ interface ChartModel {
300
348
  titleManualLayout?: ChartManualLayout | null;
301
349
  plotAreaManualLayout?: ChartManualLayout | null;
302
350
  scatterStyle?: string | null;
351
+ bubbleScale?: number | null;
352
+ bubbleSizeRepresents?: 'area' | 'w' | null;
353
+ showNegativeBubbles?: boolean | null;
303
354
  radarStyle?: string | null;
304
355
  secondaryValAxis?: SecondaryValueAxis | null;
356
+ secondaryCatAxis?: SecondaryValueAxis | null;
305
357
  date1904?: boolean;
306
358
  holeSize?: number | null;
307
359
  firstSliceAngle?: number | null;
@@ -319,6 +371,8 @@ interface ChartModel {
319
371
  valAxisOrientation?: 'minMax' | 'maxMin' | string | null;
320
372
  catAxisOrientation?: 'minMax' | 'maxMin' | string | null;
321
373
  catAxisTickLabelPos?: string | null;
374
+ catAxisTickLabelSkip?: number | null;
375
+ catAxisTickMarkSkip?: number | null;
322
376
  valAxisTickLabelPos?: string | null;
323
377
  catAxisLabelRotation?: number | null;
324
378
  stockHiLowLines?: boolean | null;
@@ -326,11 +380,39 @@ interface ChartModel {
326
380
  stockUpDownBars?: boolean | null;
327
381
  chartexBox?: ChartexBoxWhisker | null;
328
382
  chartexSunburst?: ChartexSunburst | null;
383
+ chartexTreemap?: ChartexTreemap | null;
329
384
  chartexAccents?: string[] | null;
385
+ chartexColorPalette?: Array<string | null> | null;
386
+ chartexColorStyleMethod?: string | null;
387
+ chartexDataPointStyle?: ChartExElementStyle | null;
388
+ chartexDataPointLineStyle?: ChartExElementStyle | null;
389
+ chartexDataPointMarkerStyle?: ChartExElementStyle | null;
390
+ }
391
+ interface ChartTextRun {
392
+ text: string;
393
+ fontSizeHpt?: number | null;
394
+ bold?: boolean | null;
395
+ color?: string | null;
396
+ fontFace?: string | null;
397
+ }
398
+ interface ChartTextParagraph {
399
+ runs: ChartTextRun[];
400
+ align?: 'l' | 'ctr' | 'r' | 'just' | 'dist' | string | null;
401
+ }
402
+ interface ChartTextBox {
403
+ x: number;
404
+ y: number;
405
+ w: number;
406
+ h: number;
407
+ paragraphs: ChartTextParagraph[];
408
+ verticalAnchor?: 't' | 'ctr' | 'b' | 'just' | 'dist' | string | null;
409
+ wrap?: 'none' | 'square' | string | null;
330
410
  }
331
411
  interface ChartexBoxSeries {
332
412
  name: string;
333
413
  color?: string | null;
414
+ lineColor?: string | null;
415
+ lineWidthEmu?: number | null;
334
416
  valuesByCategory: number[][];
335
417
  meanMarker: boolean;
336
418
  meanLine: boolean;
@@ -349,6 +431,10 @@ interface ChartexSunburstRow {
349
431
  interface ChartexSunburst {
350
432
  rows: ChartexSunburstRow[];
351
433
  }
434
+ interface ChartexTreemap {
435
+ rows: ChartexSunburstRow[];
436
+ parentLabelLayout?: string | null;
437
+ }
352
438
  interface SecondaryValueAxis {
353
439
  min: number | null;
354
440
  max: number | null;
@@ -367,8 +453,10 @@ interface SecondaryValueAxis {
367
453
  titleFontColor?: string | null;
368
454
  }
369
455
  interface ChartManualLayout {
370
- xMode: string;
371
- yMode: string;
456
+ xMode?: string;
457
+ yMode?: string;
458
+ wMode?: string;
459
+ hMode?: string;
372
460
  layoutTarget?: string;
373
461
  x: number;
374
462
  y: number;
@@ -376,8 +464,10 @@ interface ChartManualLayout {
376
464
  h?: number;
377
465
  }
378
466
  interface LegendManualLayout {
379
- xMode: string;
380
- yMode: string;
467
+ xMode?: string;
468
+ yMode?: string;
469
+ wMode?: string;
470
+ hMode?: string;
381
471
  x: number;
382
472
  y: number;
383
473
  w: number;
@@ -530,7 +620,7 @@ interface FindHighlightColors {
530
620
  active?: string;
531
621
  }
532
622
  //#endregion
533
- //#region dist/.types-work/docx-BkK3rbgp.d.ts
623
+ //#region dist/.types-work/docx-BPe8ajoT.d.ts
534
624
  interface DocxDocumentModel {
535
625
  section: SectionProps;
536
626
  body: BodyElement[];
@@ -842,6 +932,12 @@ type PathCmd = {
842
932
  y2: number;
843
933
  x: number;
844
934
  y: number;
935
+ } | {
936
+ cmd: 'quadBezTo';
937
+ x1: number;
938
+ y1: number;
939
+ x: number;
940
+ y: number;
845
941
  } | {
846
942
  cmd: 'arcTo';
847
943
  wr: number;
@@ -886,8 +982,17 @@ interface ShapeRun {
886
982
  fill: ShapeFill | null;
887
983
  stroke: string | null;
888
984
  strokeWidth?: number;
985
+ strokeFill?: ShapeStrokeFill | null;
889
986
  strokeDash?: string | null;
987
+ strokeCustomDash?: Array<{
988
+ dash: number;
989
+ space: number;
990
+ }>;
890
991
  strokeCap?: 'butt' | 'round' | 'square' | null;
992
+ strokeJoin?: 'round' | 'bevel' | 'miter' | null;
993
+ strokeMiterLimit?: number | null;
994
+ strokeAlignment?: 'ctr' | 'in' | null;
995
+ strokeCompound?: string | null;
891
996
  headEnd?: LineEnd | null;
892
997
  tailEnd?: LineEnd | null;
893
998
  rotation?: number;
@@ -968,6 +1073,17 @@ type ShapeFill = {
968
1073
  stops: GradientStop[];
969
1074
  angle: number;
970
1075
  gradType: string;
1076
+ scaled?: boolean;
1077
+ path?: string;
1078
+ fillToRect?: FillRect;
1079
+ tileRect?: FillRect;
1080
+ flip?: string;
1081
+ rotWithShape?: boolean;
1082
+ } | {
1083
+ fillType: 'pattern';
1084
+ fg: string;
1085
+ bg: string;
1086
+ preset: string;
971
1087
  } | {
972
1088
  fillType: 'image';
973
1089
  imagePath: string;
@@ -984,6 +1100,23 @@ type ShapeFill = {
984
1100
  alpha?: number;
985
1101
  duotone?: Duotone;
986
1102
  };
1103
+ type ShapeStrokeFill = {
1104
+ fillType: 'gradient';
1105
+ stops: GradientStop[];
1106
+ angle: number;
1107
+ gradType: string;
1108
+ scaled?: boolean;
1109
+ path?: string;
1110
+ fillToRect?: FillRect;
1111
+ tileRect?: FillRect;
1112
+ flip?: string;
1113
+ rotWithShape?: boolean;
1114
+ } | {
1115
+ fillType: 'pattern';
1116
+ fg: string;
1117
+ bg: string;
1118
+ preset: string;
1119
+ };
987
1120
  interface GradientStop {
988
1121
  position: number;
989
1122
  color: string;
@@ -1544,4 +1677,4 @@ interface DocxHighlightMatch {
1544
1677
  type DocxHighlightColors = FindHighlightColors;
1545
1678
  declare function buildDocxHighlightLayer(layer: HTMLDivElement, runs: DocxTextRunInfo[], matches: DocxHighlightMatch[], cssWidth: number, cssHeight: number, measureForFont: (font: string) => (s: string) => number, colors?: DocxHighlightColors): void;
1546
1679
  //#endregion
1547
- export { type AnchorHostMetrics, type AutoResizeOptions, type BodyElement, type BorderSpec, type CellBorders, type CellElement, type ChartDataLabelOverride, type ChartDataPointOverride, type ChartErrBars, type ChartLabelBox, type ChartManualLayout, type ChartModel, type ChartRect, type ChartRun, type ChartSeries, type ChartSeriesDataLabels, type ChartTrendline, type ChartType, type ChartexBoxSeries, type ChartexBoxWhisker, type ChartexSunburst, type ChartexSunburstRow, type ColSpec, type CollectPageRunsOptions, type ColumnsSpec, type DocComment, type DocNote, type DocParagraph, type DocRevision, type DocRun, type DocSettings, type DocTable, type DocTableCell, type DocTableRow, DocxDocument, type DocxDocumentModel, type DocxElementContext, type DocxElementContextOptions, type DocxHighlightColors, type DocxHighlightMatch, type DocxMatchLocation, type DocxPagePoint, type DocxRunBorder, DocxScrollViewer, type DocxScrollViewerOptions, type DocxSelectionContext, type DocxSelectionContextOptions, type DocxSelectionRunLocator, type DocxSelectionSourceLocator, type DocxTextRun, type DocxTextRunInfo, type DocxTextSelectionContext, DocxViewer, type DocxViewerOptions, type Duotone, type EmbeddedFontRef, type FieldRun, type FillRect, type FindHighlightColors, type FindMatch, type FindMatchesOptions, type FramePr, type GradientStop, type HeaderFooter, type HeadersFooters, type HyperlinkTarget, type ImageRun, type LegendManualLayout, type LineEnd, type LineNumbering, type LineSpacing, 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 NoteRef, type NumberingInfo, 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 PTabRun, type PageBorderEdge, type PageBorders, type PageNumType, type ParaBorderEdge, type ParagraphBorders, type PathCmd, type RenderPageOptions, type RenderPageToBitmapOptions, type RubyAnnotation, type RunRevision, type SecondaryValueAxis, type SectionGeom, type SectionProps, type ShapeRun, type ShapeText, type ShapeTextRun, type TabStop, type TableBorders, type TblpPr, type TextPath, type TextSelectionContextOptions, type TileInfo, type ViewerContextMenuEvent, type ZoomableViewer, autoResize, buildDocxHighlightLayer, buildDocxTextLayer, isOoxmlDecodedImageLimitError, noteText, openExternalHyperlink, readDocxTextSelectionContext };
1680
+ export { type AnchorHostMetrics, type AutoResizeOptions, type BodyElement, type BorderSpec, type CellBorders, type CellElement, type ChartDataLabelOverride, type ChartDataPointOverride, type ChartErrBars, type ChartExElementStyle, type ChartLabelBox, type ChartManualLayout, type ChartModel, type ChartRect, type ChartRun, type ChartSeries, type ChartSeriesDataLabels, type ChartTextBox, type ChartTextParagraph, type ChartTextRun, type ChartTrendline, type ChartType, type ChartexBoxSeries, type ChartexBoxWhisker, type ChartexSunburst, type ChartexSunburstRow, type ChartexTreemap, type ColSpec, type CollectPageRunsOptions, type ColumnsSpec, type DocComment, type DocNote, type DocParagraph, type DocRevision, type DocRun, type DocSettings, type DocTable, type DocTableCell, type DocTableRow, DocxDocument, type DocxDocumentModel, type DocxElementContext, type DocxElementContextOptions, type DocxHighlightColors, type DocxHighlightMatch, type DocxMatchLocation, type DocxPagePoint, type DocxRunBorder, DocxScrollViewer, type DocxScrollViewerOptions, type DocxSelectionContext, type DocxSelectionContextOptions, type DocxSelectionRunLocator, type DocxSelectionSourceLocator, type DocxTextRun, type DocxTextRunInfo, type DocxTextSelectionContext, DocxViewer, type DocxViewerOptions, type Duotone, type EmbeddedFontRef, type FieldRun, type FillRect, type FindHighlightColors, type FindMatch, type FindMatchesOptions, type FramePr, type GradientFill, type GradientStop, type HeaderFooter, type HeadersFooters, type HyperlinkTarget, type ImageRun, type LegendManualLayout, type LineEnd, type LineNumbering, type LineSpacing, 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 NoteRef, type NumberingInfo, 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 PTabRun, type PageBorderEdge, type PageBorders, type PageNumType, type ParaBorderEdge, type ParagraphBorders, type PathCmd, type PatternFill, type RenderPageOptions, type RenderPageToBitmapOptions, type RubyAnnotation, type RunRevision, type SecondaryValueAxis, type SectionGeom, type SectionProps, type ShapeFill, type ShapeRun, type ShapeStrokeFill, type ShapeText, type ShapeTextRun, type SolidFill, type TabStop, type TableBorders, type TblpPr, type TextPath, type TextSelectionContextOptions, type TileInfo, type ViewerContextMenuEvent, type ZoomableViewer, autoResize, buildDocxHighlightLayer, buildDocxTextLayer, isOoxmlDecodedImageLimitError, noteText, openExternalHyperlink, readDocxTextSelectionContext };