@office-open/core 0.6.5 → 0.6.6

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 CHANGED
@@ -96,15 +96,15 @@ gen(); // → 1, 2, 3, ...
96
96
 
97
97
  | Operation | hz |
98
98
  | ----------------------------- | ----- |
99
- | `decimalNumber` | ~20M |
100
- | `hexColorValue` (6-char hex) | ~13M |
101
- | `uniqueNumericIdCreator` | ~20M |
102
- | `uniqueId` (nanoid) | ~3.2M |
103
- | `uniqueUuid` | ~1.8M |
104
- | `onOffObj` (true) | ~19M |
105
- | `onOffObj` (false) | ~3.4M |
106
- | `BuilderElement` (attributes) | ~5M |
107
- | `BuilderElement` (children) | ~3.9M |
99
+ | `decimalNumber` | ~18M |
100
+ | `hexColorValue` (6-char hex) | ~11M |
101
+ | `uniqueNumericIdCreator` | ~18M |
102
+ | `uniqueId` (nanoid) | ~3.0M |
103
+ | `uniqueUuid` | ~1.7M |
104
+ | `onOffObj` (true) | ~16M |
105
+ | `onOffObj` (false) | ~3.5M |
106
+ | `BuilderElement` (attributes) | ~4.9M |
107
+ | `BuilderElement` (children) | ~3.6M |
108
108
 
109
109
  ## License
110
110
 
@@ -1,2 +1,2 @@
1
- import { _ as CatAx, a as ChartData, c as ChartSeriesData, d as createChartType, f as ScatterChart, g as AreaChart, h as BarChart, i as ChartCollection, l as ChartType, m as LineChart, n as createNumRef, o as ChartSpace, p as PieChart, r as createStrRef, s as ChartSpaceOptions, t as ChartTitle, u as ChartTypeOptions, v as ValAx } from "../index-DZobntUT.mjs";
1
+ import { _ as CatAx, a as ChartData, c as ChartSeriesData, d as createChartType, f as ScatterChart, g as AreaChart, h as BarChart, i as ChartCollection, l as ChartType, m as LineChart, n as createNumRef, o as ChartSpace, p as PieChart, r as createStrRef, s as ChartSpaceOptions, t as ChartTitle, u as ChartTypeOptions, v as ValAx } from "../index-nyrpMDHV.js";
2
2
  export { AreaChart, BarChart, CatAx, ChartCollection, ChartData, ChartSeriesData, ChartSpace, ChartSpaceOptions, ChartTitle, ChartType, ChartTypeOptions, LineChart, PieChart, ScatterChart, ValAx, createChartType, createNumRef, createStrRef };
@@ -1,2 +1,2 @@
1
- import { a as ScatterChart, c as BarChart, d as createStrRef, f as CatAx, i as createChartType, l as AreaChart, n as ChartSpace, o as PieChart, p as ValAx, r as ChartTitle, s as LineChart, t as ChartCollection, u as createNumRef } from "../chart-Bd9E-YhB.mjs";
1
+ import { a as ScatterChart, c as BarChart, d as createStrRef, f as CatAx, i as createChartType, l as AreaChart, n as ChartSpace, o as PieChart, p as ValAx, r as ChartTitle, s as LineChart, t as ChartCollection, u as createNumRef } from "../chart-BUlAcF2k.js";
2
2
  export { AreaChart, BarChart, CatAx, ChartCollection, ChartSpace, ChartTitle, LineChart, PieChart, ScatterChart, ValAx, createChartType, createNumRef, createStrRef };
@@ -1,4 +1,4 @@
1
- import { a as BuilderElement, b as XmlComponent, c as chartAttr, h as wrapEl, o as EmptyElement } from "./xml-components-CADgke8j.mjs";
1
+ import { a as BuilderElement, b as XmlComponent, c as chartAttr, h as wrapEl, o as EmptyElement } from "./xml-components-SxPlKGms.js";
2
2
  //#region src/chart/axes.ts
3
3
  /**
4
4
  * c:scaling — axis scaling configuration (minOccurs=1 in EG_AxShared).
@@ -11,6 +11,9 @@ var Scaling = class extends XmlComponent {
11
11
  };
12
12
  /**
13
13
  * c:catAx — category axis.
14
+ *
15
+ * XSD sequence: EG_AxShared (axId, scaling, delete, axPos, ..., crossAx, crosses)
16
+ * then: auto, lblAlgn, lblOffset, tickLblSkip, tickMarkSkip, noMultiLvlLbl
14
17
  */
15
18
  var CatAx = class extends XmlComponent {
16
19
  constructor(axId, crossAx) {
@@ -19,15 +22,18 @@ var CatAx = class extends XmlComponent {
19
22
  this.root.push(new Scaling());
20
23
  this.root.push(wrapEl("c:delete", chartAttr({ val: 0 })));
21
24
  this.root.push(wrapEl("c:axPos", chartAttr({ val: "b" })));
25
+ this.root.push(wrapEl("c:crossAx", chartAttr({ val: crossAx })));
26
+ this.root.push(wrapEl("c:crosses", chartAttr({ val: "autoZero" })));
22
27
  this.root.push(wrapEl("c:auto", chartAttr({ val: 1 })));
23
28
  this.root.push(wrapEl("c:lblOffset", chartAttr({ val: 100 })));
24
29
  this.root.push(wrapEl("c:noMultiLvlLbl", chartAttr({ val: 0 })));
25
- this.root.push(wrapEl("c:crossAx", chartAttr({ val: crossAx })));
26
- this.root.push(wrapEl("c:crosses", chartAttr({ val: "autoZero" })));
27
30
  }
28
31
  };
29
32
  /**
30
33
  * c:valAx — value axis.
34
+ *
35
+ * XSD sequence: EG_AxShared (axId, scaling, delete, axPos, ..., spPr, ..., crossAx, crosses)
36
+ * then: crossBetween, majorUnit, minorUnit, dispUnits
31
37
  */
32
38
  var ValAx = class extends XmlComponent {
33
39
  constructor(axId, crossAx) {
@@ -40,9 +46,9 @@ var ValAx = class extends XmlComponent {
40
46
  formatCode: "General",
41
47
  sourceLinked: 1
42
48
  })));
49
+ this.root.push(new BuilderElement({ name: "c:spPr" }));
43
50
  this.root.push(wrapEl("c:crossAx", chartAttr({ val: crossAx })));
44
51
  this.root.push(wrapEl("c:crosses", chartAttr({ val: "autoZero" })));
45
- this.root.push(new BuilderElement({ name: "c:spPr" }));
46
52
  }
47
53
  };
48
54
  //#endregion
@@ -82,8 +88,8 @@ var NumRef = class extends XmlComponent {
82
88
  var NumCache = class extends XmlComponent {
83
89
  constructor(values) {
84
90
  super("c:numCache");
85
- this.root.push(wrapEl("c:ptCount", chartAttr({ val: values.length })));
86
91
  this.root.push(new FormatCode("General"));
92
+ this.root.push(wrapEl("c:ptCount", chartAttr({ val: values.length })));
87
93
  for (let i = 0; i < values.length; i++) this.root.push(new NumPt(i, values[i]));
88
94
  }
89
95
  };
@@ -123,9 +129,9 @@ var AreaSeries = class extends XmlComponent {
123
129
  this.root.push(wrapEl("c:idx", chartAttr({ val: index })));
124
130
  this.root.push(wrapEl("c:order", chartAttr({ val: index })));
125
131
  this.root.push(new SeriesTx$4(series.name));
132
+ this.root.push(new EmptyElement("c:spPr"));
126
133
  this.root.push(new SeriesCat$4(categories));
127
134
  this.root.push(new SeriesVal$4(series.values));
128
- this.root.push(new EmptyElement("c:spPr"));
129
135
  }
130
136
  };
131
137
  var SeriesTx$4 = class extends XmlComponent {
@@ -164,9 +170,9 @@ var BarSeries = class extends XmlComponent {
164
170
  this.root.push(wrapEl("c:idx", chartAttr({ val: index })));
165
171
  this.root.push(wrapEl("c:order", chartAttr({ val: index })));
166
172
  this.root.push(new SeriesTx$3(series.name));
173
+ this.root.push(new EmptyElement("c:spPr"));
167
174
  this.root.push(new SeriesCat$3(categories));
168
175
  this.root.push(new SeriesVal$3(series.values));
169
- this.root.push(new EmptyElement("c:spPr"));
170
176
  }
171
177
  };
172
178
  var SeriesTx$3 = class extends XmlComponent {
@@ -204,9 +210,9 @@ var LineSeries = class extends XmlComponent {
204
210
  this.root.push(wrapEl("c:idx", chartAttr({ val: index })));
205
211
  this.root.push(wrapEl("c:order", chartAttr({ val: index })));
206
212
  this.root.push(new SeriesTx$2(series.name));
213
+ this.root.push(new EmptyElement("c:spPr"));
207
214
  this.root.push(new SeriesCat$2(categories));
208
215
  this.root.push(new SeriesVal$2(series.values));
209
- this.root.push(new EmptyElement("c:spPr"));
210
216
  }
211
217
  };
212
218
  var SeriesTx$2 = class extends XmlComponent {
@@ -242,9 +248,9 @@ var PieSeries = class extends XmlComponent {
242
248
  this.root.push(wrapEl("c:idx", chartAttr({ val: index })));
243
249
  this.root.push(wrapEl("c:order", chartAttr({ val: index })));
244
250
  this.root.push(new SeriesTx$1(series.name));
251
+ this.root.push(new EmptyElement("c:spPr"));
245
252
  this.root.push(new SeriesCat$1(categories));
246
253
  this.root.push(new SeriesVal$1(series.values));
247
- this.root.push(new EmptyElement("c:spPr"));
248
254
  }
249
255
  };
250
256
  var SeriesTx$1 = class extends XmlComponent {
@@ -282,9 +288,9 @@ var ScatterSeries = class extends XmlComponent {
282
288
  this.root.push(wrapEl("c:idx", chartAttr({ val: index })));
283
289
  this.root.push(wrapEl("c:order", chartAttr({ val: index })));
284
290
  this.root.push(new SeriesTx(series.name));
291
+ this.root.push(new EmptyElement("c:spPr"));
285
292
  this.root.push(new SeriesCat(categories));
286
293
  this.root.push(new SeriesVal(series.values));
287
- this.root.push(new EmptyElement("c:spPr"));
288
294
  this.root.push(new EmptyElement("c:size"));
289
295
  }
290
296
  };
@@ -412,6 +418,7 @@ var ChartSpace = class extends XmlComponent {
412
418
  this.root.push(wrapEl("c:date1904", chartAttr({ val: 0 })));
413
419
  this.root.push(wrapEl("c:lang", chartAttr({ val: "en-US" })));
414
420
  this.root.push(wrapEl("c:roundedCorners", chartAttr({ val: 0 })));
421
+ if (options.style !== void 0) this.root.push(new ChartStyle(options.style));
415
422
  const chart = new ChartContainer();
416
423
  if (options.title) chart["root"].push(new ChartTitle(options.title));
417
424
  chart["root"].push(wrapEl("c:autoTitleDeleted", chartAttr({ val: 0 })));
@@ -434,7 +441,6 @@ var ChartSpace = class extends XmlComponent {
434
441
  this.root.push(chart);
435
442
  this.root.push(createChartSpPr());
436
443
  this.root.push(createChartTxPr());
437
- if (options.style !== void 0) this.root.push(new ChartStyle(options.style));
438
444
  }
439
445
  };
440
446
  var ChartContainer = class extends XmlComponent {
@@ -1,2 +1,2 @@
1
- import { $ as RectAlignment, $t as createSolidFill, A as createBevel, At as FillOptions, B as createSoftEdgeEffect, Bt as RelativeRect, C as GeometryGuide, Ct as createGroupFill, D as createShape3D, Dt as createNoFill, E as Shape3DOptions, Et as createPatternFill, F as Point3D, Ft as GradientShadeOptions, G as EffectListOptions, Gt as TileOptions, H as EffectDagOptions, Ht as createGradientFill, I as Scene3DOptions, It as GradientStop, J as createReflectionEffect, Jt as createSourceRectangle, K as createEffectList, Kt as createTileInfo, L as SphereCoords, Lt as LinearShadeOptions, M as BackdropOptions, Mt as buildFill, N as CameraOptions, Nt as extractBlipFillMedia, O as BevelOptions, Ot as BlipFillConfigOptions, P as LightRigOptions, Pt as GradientFillOptions, Q as OuterShadowEffectOptions, Qt as createColorElement, R as Vector3D, Rt as PathShadeOptions, S as PresetGeometryOptions, St as createCustomDash, T as PresetMaterialType, Tt as PresetPattern, U as createEffectDag, Ut as createGradientStop, V as EffectContainerType, Vt as TileFlipMode, W as BlurEffectOptions, Wt as TileAlignment, X as PresetShadowVal, Xt as createBlipEffects, Y as PresetShadowEffectOptions, Yt as BlipEffectsOptions, Z as createPresetShadowEffect, Zt as SolidFillOptions, _ as PathCommand, _t as LineEndOptions, a as Transform2DOptions, an as createSchemeColor, at as BlendMode, b as createCustomGeometry, bt as createLineEnd, c as Stretch, cn as RgbColorOptions, ct as CompoundLine, d as createBlipFill, dn as PresetColorOptions, dt as OutlineFillProperties, en as SystemColor, et as createOuterShadowEffect, f as BlipOptions, fn as createPresetColor, ft as OutlineOptions, g as GeomRect, gn as createColorTransforms, gt as LineEndLength, h as CustomGeometryOptions, hn as ColorTransformOptions, ht as createOutline, i as GroupTransform2DOptions, in as SchemeColorOptions, it as createGlowEffect, j as createBottomBevel, jt as GradientStopOptions, k as BevelPresetType, kt as BlipFillMediaData, l as createExtentionList, ln as createRgbColor, lt as LineCap, m as ConnectionSite, mn as createHslColor, mt as PresetDash, n as MediaTransformation, nn as createSystemColor, nt as createInnerShadowEffect, o as createGroupTransform2D, on as ScRgbColorOptions, ot as FillOverlayEffectOptions, p as createBlip, pn as HslColorOptions, pt as PenAlignment, q as ReflectionEffectOptions, qt as SourceRectangleOptions, r as createTransformation, rn as SchemeColor, rt as GlowEffectOptions, s as createTransform2D, sn as createScRgbColor, st as createFillOverlayEffect, t as MediaDataTransformation, tn as SystemColorOptions, tt as InnerShadowEffectOptions, u as BlipFillOptions, un as PresetColor, ut as LineJoin, v as PathFillMode, vt as LineEndType, w as createAdjustmentValues, wt as PatternFillOptions, x as PresetGeometry, xt as DashStop, y as PathOptions, yt as LineEndWidth, z as createScene3D, zt as PathShadeType } from "../index-CuRO3Jmz.mjs";
1
+ import { $ as RectAlignment, $t as createSolidFill, A as createBevel, At as FillOptions, B as createSoftEdgeEffect, Bt as RelativeRect, C as GeometryGuide, Ct as createGroupFill, D as createShape3D, Dt as createNoFill, E as Shape3DOptions, Et as createPatternFill, F as Point3D, Ft as GradientShadeOptions, G as EffectListOptions, Gt as TileOptions, H as EffectDagOptions, Ht as createGradientFill, I as Scene3DOptions, It as GradientStop, J as createReflectionEffect, Jt as createSourceRectangle, K as createEffectList, Kt as createTileInfo, L as SphereCoords, Lt as LinearShadeOptions, M as BackdropOptions, Mt as buildFill, N as CameraOptions, Nt as extractBlipFillMedia, O as BevelOptions, Ot as BlipFillConfigOptions, P as LightRigOptions, Pt as GradientFillOptions, Q as OuterShadowEffectOptions, Qt as createColorElement, R as Vector3D, Rt as PathShadeOptions, S as PresetGeometryOptions, St as createCustomDash, T as PresetMaterialType, Tt as PresetPattern, U as createEffectDag, Ut as createGradientStop, V as EffectContainerType, Vt as TileFlipMode, W as BlurEffectOptions, Wt as TileAlignment, X as PresetShadowVal, Xt as createBlipEffects, Y as PresetShadowEffectOptions, Yt as BlipEffectsOptions, Z as createPresetShadowEffect, Zt as SolidFillOptions, _ as PathCommand, _t as LineEndOptions, a as Transform2DOptions, an as createSchemeColor, at as BlendMode, b as createCustomGeometry, bt as createLineEnd, c as Stretch, cn as RgbColorOptions, ct as CompoundLine, d as createBlipFill, dn as PresetColorOptions, dt as OutlineFillProperties, en as SystemColor, et as createOuterShadowEffect, f as BlipOptions, fn as createPresetColor, ft as OutlineOptions, g as GeomRect, gn as createColorTransforms, gt as LineEndLength, h as CustomGeometryOptions, hn as ColorTransformOptions, ht as createOutline, i as GroupTransform2DOptions, in as SchemeColorOptions, it as createGlowEffect, j as createBottomBevel, jt as GradientStopOptions, k as BevelPresetType, kt as BlipFillMediaData, l as createExtentionList, ln as createRgbColor, lt as LineCap, m as ConnectionSite, mn as createHslColor, mt as PresetDash, n as MediaTransformation, nn as createSystemColor, nt as createInnerShadowEffect, o as createGroupTransform2D, on as ScRgbColorOptions, ot as FillOverlayEffectOptions, p as createBlip, pn as HslColorOptions, pt as PenAlignment, q as ReflectionEffectOptions, qt as SourceRectangleOptions, r as createTransformation, rn as SchemeColor, rt as GlowEffectOptions, s as createTransform2D, sn as createScRgbColor, st as createFillOverlayEffect, t as MediaDataTransformation, tn as SystemColorOptions, tt as InnerShadowEffectOptions, u as BlipFillOptions, un as PresetColor, ut as LineJoin, v as PathFillMode, vt as LineEndType, w as createAdjustmentValues, wt as PatternFillOptions, x as PresetGeometry, xt as DashStop, y as PathOptions, yt as LineEndWidth, z as createScene3D, zt as PathShadeType } from "../index-C1jJNA2J.js";
2
2
  export { BackdropOptions, BevelOptions, BevelPresetType, BlendMode, BlipEffectsOptions, BlipFillConfigOptions, BlipFillMediaData, BlipFillOptions, BlipOptions, BlurEffectOptions, CameraOptions, ColorTransformOptions, CompoundLine, ConnectionSite, CustomGeometryOptions, DashStop, EffectContainerType, EffectDagOptions, EffectListOptions, FillOptions, FillOverlayEffectOptions, GeomRect, GeometryGuide, GlowEffectOptions, GradientFillOptions, GradientShadeOptions, GradientStop, GradientStopOptions, GroupTransform2DOptions, HslColorOptions, InnerShadowEffectOptions, LightRigOptions, LineCap, LineEndLength, LineEndOptions, LineEndType, LineEndWidth, LineJoin, LinearShadeOptions, MediaDataTransformation, MediaTransformation, OuterShadowEffectOptions, OutlineFillProperties, OutlineOptions, PathCommand, PathFillMode, PathOptions, PathShadeOptions, PathShadeType, PatternFillOptions, PenAlignment, Point3D, PresetColor, PresetColorOptions, PresetDash, PresetGeometry, PresetGeometryOptions, PresetMaterialType, PresetPattern, PresetShadowEffectOptions, PresetShadowVal, RectAlignment, ReflectionEffectOptions, RelativeRect, RgbColorOptions, ScRgbColorOptions, Scene3DOptions, SchemeColor, SchemeColorOptions, Shape3DOptions, SolidFillOptions, SourceRectangleOptions, SphereCoords, Stretch, SystemColor, SystemColorOptions, TileAlignment, TileFlipMode, TileOptions, Transform2DOptions, Vector3D, buildFill, createAdjustmentValues, createBevel, createBlip, createBlipEffects, createBlipFill, createBottomBevel, createColorElement, createColorTransforms, createCustomDash, createCustomGeometry, createEffectDag, createEffectList, createExtentionList, createFillOverlayEffect, createGlowEffect, createGradientFill, createGradientStop, createGroupFill, createGroupTransform2D, createHslColor, createInnerShadowEffect, createLineEnd, createNoFill, createOuterShadowEffect, createOutline, createPatternFill, createPresetColor, createPresetShadowEffect, createReflectionEffect, createRgbColor, createScRgbColor, createScene3D, createSchemeColor, createShape3D, createSoftEdgeEffect, createSolidFill, createSourceRectangle, createSystemColor, createTileInfo, createTransform2D, createTransformation, extractBlipFillMedia };
@@ -1,2 +1,2 @@
1
- import { A as LineJoin, B as createNoFill, C as createOuterShadowEffect, Ct as createSchemeColor, D as createFillOverlayEffect, Dt as createPresetColor, E as BlendMode, Et as PresetColor, F as LineEndType, G as PathShadeType, H as extractBlipFillMedia, I as LineEndWidth, J as createGradientStop, K as TileFlipMode, L as createLineEnd, M as PresetDash, N as createOutline, O as CompoundLine, Ot as createHslColor, P as LineEndLength, R as createCustomDash, S as RectAlignment, St as SchemeColor, T as createGlowEffect, Tt as createRgbColor, U as PresetPattern, V as buildFill, W as createPatternFill, X as createTileInfo, Y as TileAlignment, _ as createEffectList, _t as createBlipEffects, a as createBlip, b as PresetShadowVal, bt as SystemColor, c as PresetGeometry, d as createShape3D, f as BevelPresetType, g as createEffectDag, gt as createSourceRectangle, h as createScene3D, ht as Stretch, i as createBlipFill, j as PenAlignment, k as LineCap, kt as createColorTransforms, l as createAdjustmentValues, m as createBottomBevel, n as createGroupTransform2D, o as createExtentionList, p as createBevel, q as createGradientFill, r as createTransform2D, s as createCustomGeometry, t as createTransformation, u as PresetMaterialType, v as createSoftEdgeEffect, vt as createColorElement, w as createInnerShadowEffect, wt as createScRgbColor, x as createPresetShadowEffect, xt as createSystemColor, y as createReflectionEffect, yt as createSolidFill, z as createGroupFill } from "../drawingml-YMdpQfWs.mjs";
1
+ import { A as LineJoin, B as createNoFill, C as createOuterShadowEffect, Ct as createSchemeColor, D as createFillOverlayEffect, Dt as createPresetColor, E as BlendMode, Et as PresetColor, F as LineEndType, G as PathShadeType, H as extractBlipFillMedia, I as LineEndWidth, J as createGradientStop, K as TileFlipMode, L as createLineEnd, M as PresetDash, N as createOutline, O as CompoundLine, Ot as createHslColor, P as LineEndLength, R as createCustomDash, S as RectAlignment, St as SchemeColor, T as createGlowEffect, Tt as createRgbColor, U as PresetPattern, V as buildFill, W as createPatternFill, X as createTileInfo, Y as TileAlignment, _ as createEffectList, _t as createBlipEffects, a as createBlip, b as PresetShadowVal, bt as SystemColor, c as PresetGeometry, d as createShape3D, f as BevelPresetType, g as createEffectDag, gt as createSourceRectangle, h as createScene3D, ht as Stretch, i as createBlipFill, j as PenAlignment, k as LineCap, kt as createColorTransforms, l as createAdjustmentValues, m as createBottomBevel, n as createGroupTransform2D, o as createExtentionList, p as createBevel, q as createGradientFill, r as createTransform2D, s as createCustomGeometry, t as createTransformation, u as PresetMaterialType, v as createSoftEdgeEffect, vt as createColorElement, w as createInnerShadowEffect, wt as createScRgbColor, x as createPresetShadowEffect, xt as createSystemColor, y as createReflectionEffect, yt as createSolidFill, z as createGroupFill } from "../drawingml-DG6euH0k.js";
2
2
  export { BevelPresetType, BlendMode, CompoundLine, LineCap, LineEndLength, LineEndType, LineEndWidth, LineJoin, PathShadeType, PenAlignment, PresetColor, PresetDash, PresetGeometry, PresetMaterialType, PresetPattern, PresetShadowVal, RectAlignment, SchemeColor, Stretch, SystemColor, TileAlignment, TileFlipMode, buildFill, createAdjustmentValues, createBevel, createBlip, createBlipEffects, createBlipFill, createBottomBevel, createColorElement, createColorTransforms, createCustomDash, createCustomGeometry, createEffectDag, createEffectList, createExtentionList, createFillOverlayEffect, createGlowEffect, createGradientFill, createGradientStop, createGroupFill, createGroupTransform2D, createHslColor, createInnerShadowEffect, createLineEnd, createNoFill, createOuterShadowEffect, createOutline, createPatternFill, createPresetColor, createPresetShadowEffect, createReflectionEffect, createRgbColor, createScRgbColor, createScene3D, createSchemeColor, createShape3D, createSoftEdgeEffect, createSolidFill, createSourceRectangle, createSystemColor, createTileInfo, createTransform2D, createTransformation, extractBlipFillMedia };
@@ -1,4 +1,4 @@
1
- import { a as BuilderElement, b as XmlComponent } from "./xml-components-CADgke8j.mjs";
1
+ import { a as BuilderElement, b as XmlComponent } from "./xml-components-SxPlKGms.js";
2
2
  import hash from "hash.js";
3
3
  import { customAlphabet, nanoid } from "nanoid/non-secure";
4
4
  //#region src/converters.ts
@@ -1,4 +1,4 @@
1
- import { C as XmlComponent } from "./index-B1wzvu1m.mjs";
1
+ import { C as XmlComponent } from "./index-k2ds4fI-.js";
2
2
 
3
3
  //#region src/smartart/categories.d.ts
4
4
  /** Layout ID → OOXML category type */
@@ -1,4 +1,4 @@
1
- import { C as XmlComponent, a as BuilderElement } from "./index-B1wzvu1m.mjs";
1
+ import { C as XmlComponent, a as BuilderElement } from "./index-k2ds4fI-.js";
2
2
 
3
3
  //#region src/drawingml/color/color-transform.d.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { r as PositiveUniversalMeasure } from "./values-QyWq4U4A.mjs";
1
+ import { r as PositiveUniversalMeasure } from "./values-CyCW27--.js";
2
2
  import { Element } from "@office-open/xml";
3
3
 
4
4
  //#region src/xml-components/types.d.ts
@@ -42,6 +42,11 @@ declare abstract class BaseXmlComponent {
42
42
  * @returns The XML-serializable object, or undefined to exclude from output
43
43
  */
44
44
  abstract prepForXml(context: Context): IXmlableObject | undefined;
45
+ /**
46
+ * Direct XML serialization. Override in subclasses for zero-allocation output.
47
+ * Default falls back to prepForXml() + xml().
48
+ */
49
+ toXml(context: Context): string;
45
50
  }
46
51
  //#endregion
47
52
  //#region src/xml-components/component.d.ts
@@ -53,6 +58,11 @@ declare abstract class BaseXmlComponent {
53
58
  declare const EMPTY_OBJECT: {};
54
59
  /**
55
60
  * Base class for all XML components in OOXML documents.
61
+ *
62
+ * `toXml()` traverses the `root` array and calls `toXml()` on each
63
+ * `BaseXmlComponent` child — this avoids building the intermediate
64
+ * `IXmlableObject` tree. Inline `IXmlableObject` children fall back to
65
+ * `xml()` for serialization.
56
66
  */
57
67
  declare abstract class XmlComponent extends BaseXmlComponent {
58
68
  /**
@@ -65,8 +75,8 @@ declare abstract class XmlComponent extends BaseXmlComponent {
65
75
  */
66
76
  prepForXml(context: Context): IXmlableObject | undefined;
67
77
  /**
68
- * Direct XML serialization. Override in subclasses for zero-allocation output.
69
- * Default falls back to prepForXml() + xml().
78
+ * Direct XML serialization traverses `root` and calls `toXml()` on
79
+ * each child, concatenating the results into a single string.
70
80
  */
71
81
  toXml(context: Context): string;
72
82
  /**
@@ -81,6 +91,13 @@ declare abstract class IgnoreIfEmptyXmlComponent extends XmlComponent {
81
91
  private readonly includeIfEmpty;
82
92
  constructor(rootKey: string, includeIfEmpty?: boolean);
83
93
  prepForXml(context: Context): IXmlableObject | undefined;
94
+ /**
95
+ * Suppress empty elements — super.toXml() produces a self-closing tag
96
+ * (`<tag/>`) when there are no child elements; IgnoreIfEmpty returns ""
97
+ * in that case. Child components that already override toXml() (e.g.
98
+ * Worksheet) are unaffected.
99
+ */
100
+ toXml(context: Context): string;
84
101
  }
85
102
  //#endregion
86
103
  //#region src/xml-components/attributes.d.ts
@@ -1,14 +1,20 @@
1
- import { C as XmlComponent } from "./index-B1wzvu1m.mjs";
1
+ import { C as XmlComponent } from "./index-k2ds4fI-.js";
2
2
 
3
3
  //#region src/chart/axes.d.ts
4
4
  /**
5
5
  * c:catAx — category axis.
6
+ *
7
+ * XSD sequence: EG_AxShared (axId, scaling, delete, axPos, ..., crossAx, crosses)
8
+ * then: auto, lblAlgn, lblOffset, tickLblSkip, tickMarkSkip, noMultiLvlLbl
6
9
  */
7
10
  declare class CatAx extends XmlComponent {
8
11
  constructor(axId: number, crossAx: number);
9
12
  }
10
13
  /**
11
14
  * c:valAx — value axis.
15
+ *
16
+ * XSD sequence: EG_AxShared (axId, scaling, delete, axPos, ..., spPr, ..., crossAx, crosses)
17
+ * then: crossBetween, majorUnit, minorUnit, dispUnits
12
18
  */
13
19
  declare class ValAx extends XmlComponent {
14
20
  constructor(axId: number, crossAx: number);
@@ -71,7 +77,7 @@ interface ChartTypeOptions {
71
77
  readonly series: readonly ChartSeriesData[];
72
78
  readonly categories: readonly string[];
73
79
  }
74
- declare const createChartType: (options: ChartTypeOptions) => BarChart | LineChart | PieChart | AreaChart | ScatterChart;
80
+ declare const createChartType: (options: ChartTypeOptions) => ScatterChart | BarChart | LineChart | PieChart | AreaChart;
75
81
  //#endregion
76
82
  //#region src/chart/chart-space.d.ts
77
83
  interface ChartSpaceOptions {
@@ -1,12 +1,11 @@
1
- import { C as XmlComponent, D as IXmlableObject, E as IXmlAttribute, S as IgnoreIfEmptyXmlComponent, T as Context, _ as AttributeMap, a as BuilderElement, b as XmlAttributeComponent, c as chartAttr, d as onOffObj, f as stringContainerObj, g as AttributeData, h as wrapEl, i as convertToXmlComponent, l as hpsMeasureObj, m as stringValObj, n as ImportedRootElementAttributes, o as EmptyElement, p as stringEnumValObj, r as ImportedXmlComponent, s as attrObj, t as InitializableXmlComponent, u as numberValObj, v as AttributePayload, w as BaseXmlComponent, x as EMPTY_OBJECT, y as NextAttributeComponent } from "./index-B1wzvu1m.mjs";
2
- import { C as uCharHexNumber, S as twipsMeasureValue, T as unsignedDecimalNumber, _ as pointMeasureValue, a as ThemeColor, b as signedHpsMeasureValue, c as dateTimeValue, d as hexBinary, f as hexColorValue, g as percentageValue, h as measurementOrPercentValue, i as RelativeMeasure, l as decimalNumber, m as longHexNumber, n as PositivePercentage, o as ThemeFont, p as hpsMeasureValue, r as PositiveUniversalMeasure, s as UniversalMeasure, t as Percentage, u as eighthPointMeasureValue, v as positiveUniversalMeasureValue, w as universalMeasureValue, x as signedTwipsMeasureValue, y as shortHexNumber } from "./values-QyWq4U4A.mjs";
3
- import { _ as CatAx, a as ChartData, c as ChartSeriesData, d as createChartType, f as ScatterChart, g as AreaChart, h as BarChart, i as ChartCollection, l as ChartType, m as LineChart, n as createNumRef, o as ChartSpace, p as PieChart, r as createStrRef, s as ChartSpaceOptions, t as ChartTitle, u as ChartTypeOptions, v as ValAx } from "./index-DZobntUT.mjs";
4
- import { $ as RectAlignment, $t as createSolidFill, A as createBevel, At as FillOptions, B as createSoftEdgeEffect, Bt as RelativeRect, C as GeometryGuide, Ct as createGroupFill, D as createShape3D, Dt as createNoFill, E as Shape3DOptions, Et as createPatternFill, F as Point3D, Ft as GradientShadeOptions, G as EffectListOptions, Gt as TileOptions, H as EffectDagOptions, Ht as createGradientFill, I as Scene3DOptions, It as GradientStop, J as createReflectionEffect, Jt as createSourceRectangle, K as createEffectList, Kt as createTileInfo, L as SphereCoords, Lt as LinearShadeOptions, M as BackdropOptions, Mt as buildFill, N as CameraOptions, Nt as extractBlipFillMedia, O as BevelOptions, Ot as BlipFillConfigOptions, P as LightRigOptions, Pt as GradientFillOptions, Q as OuterShadowEffectOptions, Qt as createColorElement, R as Vector3D, Rt as PathShadeOptions, S as PresetGeometryOptions, St as createCustomDash, T as PresetMaterialType, Tt as PresetPattern, U as createEffectDag, Ut as createGradientStop, V as EffectContainerType, Vt as TileFlipMode, W as BlurEffectOptions, Wt as TileAlignment, X as PresetShadowVal, Xt as createBlipEffects, Y as PresetShadowEffectOptions, Yt as BlipEffectsOptions, Z as createPresetShadowEffect, Zt as SolidFillOptions, _ as PathCommand, _t as LineEndOptions, a as Transform2DOptions, an as createSchemeColor, at as BlendMode, b as createCustomGeometry, bt as createLineEnd, c as Stretch, cn as RgbColorOptions, ct as CompoundLine, d as createBlipFill, dn as PresetColorOptions, dt as OutlineFillProperties, en as SystemColor, et as createOuterShadowEffect, f as BlipOptions, fn as createPresetColor, ft as OutlineOptions, g as GeomRect, gn as createColorTransforms, gt as LineEndLength, h as CustomGeometryOptions, hn as ColorTransformOptions, ht as createOutline, i as GroupTransform2DOptions, in as SchemeColorOptions, it as createGlowEffect, j as createBottomBevel, jt as GradientStopOptions, k as BevelPresetType, kt as BlipFillMediaData, l as createExtentionList, ln as createRgbColor, lt as LineCap, m as ConnectionSite, mn as createHslColor, mt as PresetDash, n as MediaTransformation, nn as createSystemColor, nt as createInnerShadowEffect, o as createGroupTransform2D, on as ScRgbColorOptions, ot as FillOverlayEffectOptions, p as createBlip, pn as HslColorOptions, pt as PenAlignment, q as ReflectionEffectOptions, qt as SourceRectangleOptions, r as createTransformation, rn as SchemeColor, rt as GlowEffectOptions, s as createTransform2D, sn as createScRgbColor, st as createFillOverlayEffect, t as MediaDataTransformation, tn as SystemColorOptions, tt as InnerShadowEffectOptions, u as BlipFillOptions, un as PresetColor, ut as LineJoin, v as PathFillMode, vt as LineEndType, w as createAdjustmentValues, wt as PatternFillOptions, x as PresetGeometry, xt as DashStop, y as PathOptions, yt as LineEndWidth, z as createScene3D, zt as PathShadeType } from "./index-CuRO3Jmz.mjs";
5
- import { a as Point, c as Connection, d as getLayoutXml, f as getStyleXml, h as STYLE_CATEGORIES, i as SmartArtData, l as DEFAULT_DRAWING_XML, m as LAYOUT_CATEGORIES, n as createDataModel, o as TransPoint, p as COLOR_CATEGORIES, r as SmartArtCollection, s as DataModel, t as TreeNode, u as getColorXml } from "./index-CZxcE4Q6.mjs";
6
- import { _ as PPTX_NS, a as getFirstLevelElements, c as TokenNotFoundError, d as createTraverser, f as RenderedParagraphNode, g as DOCX_NS, h as createReplacer, i as createTextElementContents, l as createSplitInject, m as ReplacerConfig, n as getNextRelationshipIndex, o as patchSpaceAttribute, p as createRunRenderer, r as appendContentType, s as toJson, t as appendRelationship, u as createTokenReplacer, v as XmlNamespaceConfig } from "./index-DNLRdIqy.mjs";
1
+ import { C as XmlComponent, D as IXmlableObject, E as IXmlAttribute, S as IgnoreIfEmptyXmlComponent, T as Context, _ as AttributeMap, a as BuilderElement, b as XmlAttributeComponent, c as chartAttr, d as onOffObj, f as stringContainerObj, g as AttributeData, h as wrapEl, i as convertToXmlComponent, l as hpsMeasureObj, m as stringValObj, n as ImportedRootElementAttributes, o as EmptyElement, p as stringEnumValObj, r as ImportedXmlComponent, s as attrObj, t as InitializableXmlComponent, u as numberValObj, v as AttributePayload, w as BaseXmlComponent, x as EMPTY_OBJECT, y as NextAttributeComponent } from "./index-k2ds4fI-.js";
2
+ import { C as uCharHexNumber, S as twipsMeasureValue, T as unsignedDecimalNumber, _ as pointMeasureValue, a as ThemeColor, b as signedHpsMeasureValue, c as dateTimeValue, d as hexBinary, f as hexColorValue, g as percentageValue, h as measurementOrPercentValue, i as RelativeMeasure, l as decimalNumber, m as longHexNumber, n as PositivePercentage, o as ThemeFont, p as hpsMeasureValue, r as PositiveUniversalMeasure, s as UniversalMeasure, t as Percentage, u as eighthPointMeasureValue, v as positiveUniversalMeasureValue, w as universalMeasureValue, x as signedTwipsMeasureValue, y as shortHexNumber } from "./values-CyCW27--.js";
3
+ import { _ as CatAx, a as ChartData, c as ChartSeriesData, d as createChartType, f as ScatterChart, g as AreaChart, h as BarChart, i as ChartCollection, l as ChartType, m as LineChart, n as createNumRef, o as ChartSpace, p as PieChart, r as createStrRef, s as ChartSpaceOptions, t as ChartTitle, u as ChartTypeOptions, v as ValAx } from "./index-nyrpMDHV.js";
4
+ import { $ as RectAlignment, $t as createSolidFill, A as createBevel, At as FillOptions, B as createSoftEdgeEffect, Bt as RelativeRect, C as GeometryGuide, Ct as createGroupFill, D as createShape3D, Dt as createNoFill, E as Shape3DOptions, Et as createPatternFill, F as Point3D, Ft as GradientShadeOptions, G as EffectListOptions, Gt as TileOptions, H as EffectDagOptions, Ht as createGradientFill, I as Scene3DOptions, It as GradientStop, J as createReflectionEffect, Jt as createSourceRectangle, K as createEffectList, Kt as createTileInfo, L as SphereCoords, Lt as LinearShadeOptions, M as BackdropOptions, Mt as buildFill, N as CameraOptions, Nt as extractBlipFillMedia, O as BevelOptions, Ot as BlipFillConfigOptions, P as LightRigOptions, Pt as GradientFillOptions, Q as OuterShadowEffectOptions, Qt as createColorElement, R as Vector3D, Rt as PathShadeOptions, S as PresetGeometryOptions, St as createCustomDash, T as PresetMaterialType, Tt as PresetPattern, U as createEffectDag, Ut as createGradientStop, V as EffectContainerType, Vt as TileFlipMode, W as BlurEffectOptions, Wt as TileAlignment, X as PresetShadowVal, Xt as createBlipEffects, Y as PresetShadowEffectOptions, Yt as BlipEffectsOptions, Z as createPresetShadowEffect, Zt as SolidFillOptions, _ as PathCommand, _t as LineEndOptions, a as Transform2DOptions, an as createSchemeColor, at as BlendMode, b as createCustomGeometry, bt as createLineEnd, c as Stretch, cn as RgbColorOptions, ct as CompoundLine, d as createBlipFill, dn as PresetColorOptions, dt as OutlineFillProperties, en as SystemColor, et as createOuterShadowEffect, f as BlipOptions, fn as createPresetColor, ft as OutlineOptions, g as GeomRect, gn as createColorTransforms, gt as LineEndLength, h as CustomGeometryOptions, hn as ColorTransformOptions, ht as createOutline, i as GroupTransform2DOptions, in as SchemeColorOptions, it as createGlowEffect, j as createBottomBevel, jt as GradientStopOptions, k as BevelPresetType, kt as BlipFillMediaData, l as createExtentionList, ln as createRgbColor, lt as LineCap, m as ConnectionSite, mn as createHslColor, mt as PresetDash, n as MediaTransformation, nn as createSystemColor, nt as createInnerShadowEffect, o as createGroupTransform2D, on as ScRgbColorOptions, ot as FillOverlayEffectOptions, p as createBlip, pn as HslColorOptions, pt as PenAlignment, q as ReflectionEffectOptions, qt as SourceRectangleOptions, r as createTransformation, rn as SchemeColor, rt as GlowEffectOptions, s as createTransform2D, sn as createScRgbColor, st as createFillOverlayEffect, t as MediaDataTransformation, tn as SystemColorOptions, tt as InnerShadowEffectOptions, u as BlipFillOptions, un as PresetColor, ut as LineJoin, v as PathFillMode, vt as LineEndType, w as createAdjustmentValues, wt as PatternFillOptions, x as PresetGeometry, xt as DashStop, y as PathOptions, yt as LineEndWidth, z as createScene3D, zt as PathShadeType } from "./index-C1jJNA2J.js";
5
+ import { a as Point, c as Connection, d as getLayoutXml, f as getStyleXml, h as STYLE_CATEGORIES, i as SmartArtData, l as DEFAULT_DRAWING_XML, m as LAYOUT_CATEGORIES, n as createDataModel, o as TransPoint, p as COLOR_CATEGORIES, r as SmartArtCollection, s as DataModel, t as TreeNode, u as getColorXml } from "./index-BDwL0MVx.js";
6
+ import { _ as PPTX_NS, a as getFirstLevelElements, c as TokenNotFoundError, d as createTraverser, f as RenderedParagraphNode, g as DOCX_NS, h as createReplacer, i as createTextElementContents, l as createSplitInject, m as ReplacerConfig, n as getNextRelationshipIndex, o as patchSpaceAttribute, p as createRunRenderer, r as appendContentType, s as toJson, t as appendRelationship, u as createTokenReplacer, v as XmlNamespaceConfig } from "./index-NK0k2I-R.js";
7
7
  import { Element } from "@office-open/xml";
8
8
  import { ZipOptions, Zippable, Zippable as Zippable$1, strFromU8, unzipSync } from "fflate";
9
- import { Readable } from "stream";
10
9
 
11
10
  //#region src/converters.d.ts
12
11
  /**
@@ -90,6 +89,7 @@ type OutputType = keyof OutputByType;
90
89
  declare const OoxmlMimeType: {
91
90
  readonly DOCX: "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
92
91
  readonly PPTX: "application/vnd.openxmlformats-officedocument.presentationml.presentation";
92
+ readonly XLSX: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
93
93
  };
94
94
  declare const convertOutput: <T extends OutputType>(data: Uint8Array, type: T, mimeType?: string) => OutputByType[T];
95
95
  //#endregion
@@ -98,13 +98,6 @@ interface XmlifyedFile {
98
98
  readonly path: string;
99
99
  readonly data: string | Uint8Array;
100
100
  }
101
- declare const PrettifyType: {
102
- readonly NONE: "";
103
- readonly WITH_2_BLANKS: " ";
104
- readonly WITH_4_BLANKS: " ";
105
- readonly WITH_TAB: "\t";
106
- };
107
- declare const convertPrettifyType: (prettify?: boolean | (typeof PrettifyType)[keyof typeof PrettifyType]) => (typeof PrettifyType)[keyof typeof PrettifyType] | undefined;
108
101
  /** Default DEFLATE compression level matching Microsoft Office behavior. */
109
102
  declare const ZIP_DEFLATE_LEVEL = 6;
110
103
  /** STORE level for already-compressed media formats (JPEG, PNG, GIF, etc.). */
@@ -125,18 +118,17 @@ declare const zipAndConvert: <T extends OutputType>(files: Zippable$1, type: T,
125
118
  */
126
119
  declare const zipSyncAndConvert: <T extends OutputType>(files: Zippable$1, type: T, mimeType: string, level?: number) => OutputByType[T];
127
120
  /**
128
- * Create a Node.js Readable stream from compressed file entries.
121
+ * Create a `ReadableStream<Uint8Array>` from compressed file entries.
129
122
  *
130
- * Uses fflate's AsyncZipDeflate for non-blocking DEFLATE compression via
131
- * Web Workers. STORED entries (media) pass through synchronously.
132
- * Chunks are emitted asynchronously as each file's compression completes.
123
+ * Uses fflate's `AsyncZipDeflate` for non-blocking DEFLATE compression.
124
+ * `STORED` entries (media) pass through synchronously.
125
+ * Works in both Node.js and browsers (Web Streams API).
133
126
  */
134
- declare const createZipStream: (files: Zippable$1) => Readable;
135
- type PrettifyValue = (typeof PrettifyType)[keyof typeof PrettifyType];
127
+ declare const createZipStream: (files: Zippable$1) => ReadableStream<Uint8Array>;
136
128
  /**
137
129
  * Compile function provided by each package to convert a file object into a Zippable map.
138
130
  */
139
- type CompileFn<TFile> = (file: TFile, prettify?: PrettifyValue, overrides?: readonly XmlifyedFile[]) => Zippable$1;
131
+ type CompileFn<TFile> = (file: TFile, overrides?: readonly XmlifyedFile[]) => Zippable$1;
140
132
  /**
141
133
  * Packer interface returned by {@link createPacker}.
142
134
  *
@@ -148,35 +140,35 @@ interface Packer<TFile> {
148
140
  /** Compile file to Zippable map (synchronous). */
149
141
  compile: CompileFn<TFile>;
150
142
  /** Generic async output — returns the requested OutputType. */
151
- pack<T extends OutputType>(file: TFile, type: T, prettify?: boolean | PrettifyValue, overrides?: readonly XmlifyedFile[]): Promise<OutputByType[T]>;
143
+ pack<T extends OutputType>(file: TFile, type: T, overrides?: readonly XmlifyedFile[]): Promise<OutputByType[T]>;
152
144
  /** Generic sync output — returns the requested OutputType. */
153
- packSync<T extends OutputType>(file: TFile, type: T, prettify?: boolean | PrettifyValue, overrides?: readonly XmlifyedFile[]): OutputByType[T];
145
+ packSync<T extends OutputType>(file: TFile, type: T, overrides?: readonly XmlifyedFile[]): OutputByType[T];
154
146
  /** Async → `Promise<Uint8Array>` (like `Response.bytes()`). */
155
- toBytes(file: TFile, prettify?: boolean | PrettifyValue, overrides?: readonly XmlifyedFile[]): Promise<Uint8Array>;
147
+ toBytes(file: TFile, overrides?: readonly XmlifyedFile[]): Promise<Uint8Array>;
156
148
  /** Sync → `Uint8Array`. */
157
- toBytesSync(file: TFile, prettify?: boolean | PrettifyValue, overrides?: readonly XmlifyedFile[]): Uint8Array;
149
+ toBytesSync(file: TFile, overrides?: readonly XmlifyedFile[]): Uint8Array;
158
150
  /** Async → `Promise<string>` (raw ZIP content as string). */
159
- toString(file: TFile, prettify?: boolean | PrettifyValue, overrides?: readonly XmlifyedFile[]): Promise<string>;
151
+ toString(file: TFile, overrides?: readonly XmlifyedFile[]): Promise<string>;
160
152
  /** Sync → `string`. */
161
- toStringSync(file: TFile, prettify?: boolean | PrettifyValue, overrides?: readonly XmlifyedFile[]): string;
153
+ toStringSync(file: TFile, overrides?: readonly XmlifyedFile[]): string;
162
154
  /** Async → `Promise<Buffer>` (Node.js). */
163
- toBuffer(file: TFile, prettify?: boolean | PrettifyValue, overrides?: readonly XmlifyedFile[]): Promise<Buffer>;
155
+ toBuffer(file: TFile, overrides?: readonly XmlifyedFile[]): Promise<Buffer>;
164
156
  /** Sync → `Buffer` (Node.js). */
165
- toBufferSync(file: TFile, prettify?: boolean | PrettifyValue, overrides?: readonly XmlifyedFile[]): Buffer;
157
+ toBufferSync(file: TFile, overrides?: readonly XmlifyedFile[]): Buffer;
166
158
  /** Async → `Promise<string>` (base64-encoded). */
167
- toBase64String(file: TFile, prettify?: boolean | PrettifyValue, overrides?: readonly XmlifyedFile[]): Promise<string>;
159
+ toBase64String(file: TFile, overrides?: readonly XmlifyedFile[]): Promise<string>;
168
160
  /** Sync → `string` (base64-encoded). */
169
- toBase64StringSync(file: TFile, prettify?: boolean | PrettifyValue, overrides?: readonly XmlifyedFile[]): string;
161
+ toBase64StringSync(file: TFile, overrides?: readonly XmlifyedFile[]): string;
170
162
  /** Async → `Promise<Blob>` (browser). */
171
- toBlob(file: TFile, prettify?: boolean | PrettifyValue, overrides?: readonly XmlifyedFile[]): Promise<Blob>;
163
+ toBlob(file: TFile, overrides?: readonly XmlifyedFile[]): Promise<Blob>;
172
164
  /** Sync → `Blob`. */
173
- toBlobSync(file: TFile, prettify?: boolean | PrettifyValue, overrides?: readonly XmlifyedFile[]): Blob;
165
+ toBlobSync(file: TFile, overrides?: readonly XmlifyedFile[]): Blob;
174
166
  /** Async → `Promise<ArrayBuffer>`. */
175
- toArrayBuffer(file: TFile, prettify?: boolean | PrettifyValue, overrides?: readonly XmlifyedFile[]): Promise<ArrayBuffer>;
167
+ toArrayBuffer(file: TFile, overrides?: readonly XmlifyedFile[]): Promise<ArrayBuffer>;
176
168
  /** Sync → `ArrayBuffer`. */
177
- toArrayBufferSync(file: TFile, prettify?: boolean | PrettifyValue, overrides?: readonly XmlifyedFile[]): ArrayBuffer;
178
- /** Streaming output via Node.js Readable (truly async, uses Web Workers). */
179
- toStream(file: TFile, prettify?: boolean | PrettifyValue, overrides?: readonly XmlifyedFile[]): Readable;
169
+ toArrayBufferSync(file: TFile, overrides?: readonly XmlifyedFile[]): ArrayBuffer;
170
+ /** Streaming output via `ReadableStream<Uint8Array>` (cross-platform, uses Web Workers). */
171
+ toStream(file: TFile, overrides?: readonly XmlifyedFile[]): ReadableStream<Uint8Array>;
180
172
  }
181
173
  /**
182
174
  * Create a Packer object with all output format methods.
@@ -198,7 +190,7 @@ declare class AppProperties extends ImportedXmlComponent {
198
190
  }
199
191
  //#endregion
200
192
  //#region src/opc/relationships.d.ts
201
- type RelationshipType = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" | "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramData" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramLayout" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramQuickStyle" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramColors" | "http://schemas.microsoft.com/office/2007/relationships/diagramLayout" | "http://schemas.microsoft.com/office/2007/relationships/diagramStyle" | "http://schemas.microsoft.com/office/2007/relationships/diagramColors" | "http://schemas.microsoft.com/office/2007/relationships/diagramDrawing" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/bibliography" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/font" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/aFChunk" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/subDocument" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesSlide" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/presProps" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/viewProps" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/tableStyles" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesMaster" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/commentAuthors" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/video" | "http://schemas.microsoft.com/office/2007/relationships/media";
193
+ type RelationshipType = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" | "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramData" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramLayout" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramQuickStyle" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramColors" | "http://schemas.microsoft.com/office/2007/relationships/diagramLayout" | "http://schemas.microsoft.com/office/2007/relationships/diagramStyle" | "http://schemas.microsoft.com/office/2007/relationships/diagramColors" | "http://schemas.microsoft.com/office/2007/relationships/diagramDrawing" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/bibliography" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/font" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/aFChunk" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/subDocument" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesSlide" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/presProps" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/viewProps" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/tableStyles" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesMaster" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/commentAuthors" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/video" | "http://schemas.microsoft.com/office/2007/relationships/media" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/calcChain" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing";
202
194
  declare const TargetModeType: {
203
195
  readonly EXTERNAL: "External";
204
196
  };
@@ -207,6 +199,11 @@ declare class Relationships extends BaseXmlComponent {
207
199
  constructor();
208
200
  addRelationship(id: number | string, type: RelationshipType, target: string, targetMode?: (typeof TargetModeType)[keyof typeof TargetModeType]): void;
209
201
  get relationshipCount(): number;
202
+ /**
203
+ * Zero-allocation fast path: directly concatenate XML string.
204
+ * Bypasses the IXmlableObject intermediate tree entirely.
205
+ */
206
+ toXml(_context: Context): string;
210
207
  prepForXml(_context: Context): IXmlableObject;
211
208
  }
212
209
  //#endregion
@@ -230,11 +227,17 @@ declare const createOverride: (contentType: string, partName?: string) => XmlCom
230
227
  //#endregion
231
228
  //#region src/formatter.d.ts
232
229
  /**
233
- * Converts an XmlComponent tree into a serializable XML object.
230
+ * Converts an XmlComponent tree into a serializable XML object or string.
234
231
  */
235
232
  declare class Formatter {
236
- format<T extends Context = Context>(input: BaseXmlComponent, context?: T): IXmlableObject;
237
- formatToXml(input: XmlComponent, context: Context, declaration?: boolean): string;
233
+ format<T extends Context = Context>(input: BaseXmlComponent, context?: T): Record<string, any>;
234
+ /**
235
+ * Serialize a component directly to XML string via the toXml() fast path.
236
+ */
237
+ formatToXml(input: BaseXmlComponent, context: Context, declaration?: boolean | {
238
+ encoding?: string;
239
+ standalone?: string;
240
+ }): string;
238
241
  }
239
242
  //#endregion
240
243
  //#region src/core-properties.d.ts
@@ -380,8 +383,8 @@ declare const xsdTextAnchor: {
380
383
  declare const xsdLineCap: {
381
384
  /** User-friendly value → XSD value */to: (key: string) => string; /** XSD value → user-friendly value */
382
385
  from: (xsd: string) => string; /** The forward map (user → XSD) */
383
- forward: Record<"flat" | "round" | "square", "flat" | "rnd" | "sq">; /** The reverse map (XSD → user) */
384
- reverse: Record<"flat" | "rnd" | "sq", "flat" | "round" | "square">;
386
+ forward: Record<"round" | "square" | "flat", "flat" | "rnd" | "sq">; /** The reverse map (XSD → user) */
387
+ reverse: Record<"flat" | "rnd" | "sq", "round" | "square" | "flat">;
385
388
  };
386
389
  declare const xsdCompoundLine: {
387
390
  /** User-friendly value → XSD value */to: (key: string) => string; /** XSD value → user-friendly value */
@@ -404,14 +407,14 @@ declare const xsdLineEndSize: {
404
407
  declare const xsdBlendMode: {
405
408
  /** User-friendly value → XSD value */to: (key: string) => string; /** XSD value → user-friendly value */
406
409
  from: (xsd: string) => string; /** The forward map (user → XSD) */
407
- forward: Record<"lighten" | "darken" | "over" | "multiply" | "screen", "lighten" | "darken" | "over" | "screen" | "mult">; /** The reverse map (XSD → user) */
408
- reverse: Record<"lighten" | "darken" | "over" | "screen" | "mult", "lighten" | "darken" | "over" | "multiply" | "screen">;
410
+ forward: Record<"over" | "multiply" | "screen" | "darken" | "lighten", "over" | "screen" | "darken" | "lighten" | "mult">; /** The reverse map (XSD → user) */
411
+ reverse: Record<"over" | "screen" | "darken" | "lighten" | "mult", "over" | "multiply" | "screen" | "darken" | "lighten">;
409
412
  };
410
413
  declare const xsdPathFillMode: {
411
414
  /** User-friendly value → XSD value */to: (key: string) => string; /** XSD value → user-friendly value */
412
415
  from: (xsd: string) => string; /** The forward map (user → XSD) */
413
- forward: Record<"none" | "normal" | "lighten" | "lightenLess" | "darken" | "darkenLess", "none" | "lighten" | "lightenLess" | "darken" | "darkenLess" | "norm">; /** The reverse map (XSD → user) */
414
- reverse: Record<"none" | "lighten" | "lightenLess" | "darken" | "darkenLess" | "norm", "none" | "normal" | "lighten" | "lightenLess" | "darken" | "darkenLess">;
416
+ forward: Record<"none" | "darken" | "lighten" | "normal" | "lightenLess" | "darkenLess", "none" | "darken" | "lighten" | "lightenLess" | "darkenLess" | "norm">; /** The reverse map (XSD → user) */
417
+ reverse: Record<"none" | "darken" | "lighten" | "lightenLess" | "darkenLess" | "norm", "none" | "darken" | "lighten" | "normal" | "lightenLess" | "darkenLess">;
415
418
  };
416
419
  declare const xsdEffectContainer: {
417
420
  /** User-friendly value → XSD value */to: (key: string) => string; /** XSD value → user-friendly value */
@@ -428,8 +431,8 @@ declare const xsdPresetShadow: {
428
431
  declare const xsdMaterialType: {
429
432
  /** User-friendly value → XSD value */to: (key: string) => string; /** XSD value → user-friendly value */
430
433
  from: (xsd: string) => string; /** The forward map (user → XSD) */
431
- forward: Record<"legacyMatte" | "legacyPlastic" | "legacyMetal" | "legacyWireframe" | "matte" | "plastic" | "metal" | "warmMatte" | "translucentPowder" | "powder" | "darkEdge" | "softEdge" | "clear" | "flat" | "softMetal", "legacyMatte" | "legacyPlastic" | "legacyMetal" | "legacyWireframe" | "matte" | "plastic" | "metal" | "warmMatte" | "translucentPowder" | "powder" | "softEdge" | "clear" | "flat" | "dkEdge" | "softmetal">; /** The reverse map (XSD → user) */
432
- reverse: Record<"legacyMatte" | "legacyPlastic" | "legacyMetal" | "legacyWireframe" | "matte" | "plastic" | "metal" | "warmMatte" | "translucentPowder" | "powder" | "softEdge" | "clear" | "flat" | "dkEdge" | "softmetal", "legacyMatte" | "legacyPlastic" | "legacyMetal" | "legacyWireframe" | "matte" | "plastic" | "metal" | "warmMatte" | "translucentPowder" | "powder" | "darkEdge" | "softEdge" | "clear" | "flat" | "softMetal">;
434
+ forward: Record<"flat" | "legacyMatte" | "legacyPlastic" | "legacyMetal" | "legacyWireframe" | "matte" | "plastic" | "metal" | "warmMatte" | "translucentPowder" | "powder" | "darkEdge" | "softEdge" | "clear" | "softMetal", "flat" | "legacyMatte" | "legacyPlastic" | "legacyMetal" | "legacyWireframe" | "matte" | "plastic" | "metal" | "warmMatte" | "translucentPowder" | "powder" | "softEdge" | "clear" | "dkEdge" | "softmetal">; /** The reverse map (XSD → user) */
435
+ reverse: Record<"flat" | "legacyMatte" | "legacyPlastic" | "legacyMetal" | "legacyWireframe" | "matte" | "plastic" | "metal" | "warmMatte" | "translucentPowder" | "powder" | "softEdge" | "clear" | "dkEdge" | "softmetal", "flat" | "legacyMatte" | "legacyPlastic" | "legacyMetal" | "legacyWireframe" | "matte" | "plastic" | "metal" | "warmMatte" | "translucentPowder" | "powder" | "darkEdge" | "softEdge" | "clear" | "softMetal">;
433
436
  };
434
437
  declare const xsdPattern: {
435
438
  /** User-friendly value → XSD value */to: (key: string) => string; /** XSD value → user-friendly value */
@@ -462,4 +465,18 @@ declare const xsdTextCaps: {
462
465
  reverse: Record<"none" | "small" | "all", "none" | "small" | "all">;
463
466
  };
464
467
  //#endregion
465
- export { AppProperties, AreaChart, AttributeData, AttributeMap, AttributePayload, BackdropOptions, BarChart, BaseXmlComponent, BevelOptions, BevelPresetType, BlendMode, BlipEffectsOptions, BlipFillConfigOptions, BlipFillMediaData, BlipFillOptions, BlipOptions, BlurEffectOptions, BuilderElement, COLOR_CATEGORIES, CameraOptions, CatAx, ChartCollection, ChartData, ChartSeriesData, ChartSpace, ChartSpaceOptions, ChartTitle, ChartType, ChartTypeOptions, ColorTransformOptions, CompileFn, CompoundLine, Connection, ConnectionSite, Context, CoreProperties, CustomGeometryOptions, DEFAULT_DRAWING_XML, DOCX_NS, DashStop, DataModel, type DefaultAttributes, EMPTY_OBJECT, EffectContainerType, EffectDagOptions, EffectListOptions, EmptyElement, FillOptions, FillOverlayEffectOptions, Formatter, GeomRect, GeometryGuide, GlowEffectOptions, GradientFillOptions, GradientShadeOptions, GradientStop, GradientStopOptions, GroupTransform2DOptions, HslColorOptions, IXmlAttribute, IXmlableObject, IdFormat, IgnoreIfEmptyXmlComponent, ImportedRootElementAttributes, ImportedXmlComponent, InitializableXmlComponent, InnerShadowEffectOptions, LAYOUT_CATEGORIES, LightRigOptions, LineCap, LineChart, LineEndLength, LineEndOptions, LineEndType, LineEndWidth, LineJoin, LinearShadeOptions, MediaDataTransformation, MediaTransformation, NextAttributeComponent, OoxmlMimeType, OuterShadowEffectOptions, OutlineFillProperties, OutlineOptions, OutputByType, OutputType, type OverrideAttributes, PPTX_NS, Packer, ParsedArchive, PathCommand, PathFillMode, PathOptions, PathShadeOptions, PathShadeType, PatternFillOptions, PenAlignment, Percentage, PieChart, Point, Point3D, PositivePercentage, PositiveUniversalMeasure, PresetColor, PresetColorOptions, PresetDash, PresetGeometry, PresetGeometryOptions, PresetMaterialType, PresetPattern, PresetShadowEffectOptions, PresetShadowVal, PrettifyType, RawPassthrough, RectAlignment, ReflectionEffectOptions, type RelationshipType, Relationships, RelativeMeasure, RelativeRect, RenderedParagraphNode, ReplacerConfig, RgbColorOptions, STYLE_CATEGORIES, ScRgbColorOptions, ScatterChart, Scene3DOptions, SchemeColor, SchemeColorOptions, Shape3DOptions, SmartArtCollection, SmartArtData, SmartArtRelOptions, SolidFillOptions, SourceRectangleOptions, SphereCoords, Stretch, SystemColor, SystemColorOptions, TargetModeType, ThemeColor, ThemeFont, TileAlignment, TileFlipMode, TileOptions, TokenNotFoundError, TransPoint, Transform2DOptions, TreeNode, UniqueNumericIdCreator, UniversalMeasure, ValAx, Vector3D, XmlAttributeComponent, XmlComponent, XmlNamespaceConfig, XmlifyedFile, ZIP_DEFLATE_LEVEL, ZIP_STORED_LEVEL, type ZipOptions, type Zippable, addSmartArtRelationships, appendContentType, appendRelationship, attrObj, buildCorePropertiesXml, buildFill, chartAttr, collectPlaceholderKeys, convertEmuToInches, convertEmuToPixels, convertEmuToPoints, convertInchesToEmu, convertInchesToTwip, convertMillimetersToTwip, convertOutput, convertPixelsToEmu, convertPointsToEmu, convertPrettifyType, convertToXmlComponent, createAdjustmentValues, createBevel, createBlip, createBlipEffects, createBlipFill, createBottomBevel, createChartType, createColorElement, createColorTransforms, createCustomDash, createCustomGeometry, createDataModel, createDefault, createEffectDag, createEffectList, createExtentionList, createFillOverlayEffect, createGlowEffect, createGradientFill, createGradientStop, createGroupFill, createGroupTransform2D, createHslColor, createInnerShadowEffect, createLineEnd, createNoFill, createNumRef, createOuterShadowEffect, createOutline, createOverride, createPacker, createPatternFill, createPresetColor, createPresetShadowEffect, createReflectionEffect, createReplacer, createRgbColor, createRunRenderer, createScRgbColor, createScene3D, createSchemeColor, createShape3D, createSoftEdgeEffect, createSolidFill, createSourceRectangle, createSplitInject, createStrRef, createSystemColor, createTextElementContents, createTileInfo, createTokenReplacer, createTransform2D, createTransformation, createTraverser, createZipStream, dateTimeValue, decimalNumber, eighthPointMeasureValue, elementToCompact, escapeRegex, extractBlipFillMedia, formatId, getColorXml, getFirstLevelElements, getLayoutXml, getNextRelationshipIndex, getReferencedMedia, getStyleXml, hasPlaceholders, hashedId, hexBinary, hexColorValue, hpsMeasureObj, hpsMeasureValue, invertMap, longHexNumber, measurementOrPercentValue, numberValObj, onOffObj, parseArchive, parseCorePropsElement, patchSpaceAttribute, percentageValue, pointMeasureValue, positiveUniversalMeasureValue, replaceChartPlaceholders, replaceImagePlaceholders, replaceSmartArtPlaceholders, shortHexNumber, signedHpsMeasureValue, signedTwipsMeasureValue, strFromU8, stringContainerObj, stringEnumValObj, stringValObj, toJson, twipsMeasureValue, uCharHexNumber, uniqueId, uniqueNumericIdCreator, uniqueUuid, universalMeasureValue, unsignedDecimalNumber, unzipSync, wrapEl, xsdBlendMode, xsdCompoundLine, xsdEffectContainer, xsdLineCap, xsdLineEndSize, xsdMaterialType, xsdPathFillMode, xsdPattern, xsdPenAlignment, xsdPresetShadow, xsdRectAlignment, xsdStrikeStyle, xsdTextAlign, xsdTextAnchor, xsdTextCaps, xsdUnderlineStyle, xsdVerticalMergeRev, zipAndConvert, zipSyncAndConvert };
468
+ //#region src/compiler-utils.d.ts
469
+ /**
470
+ * Convert a mapping of XML files + overrides + media into a Zippable structure.
471
+ *
472
+ * Centralises the mapping→Zippable conversion shared by all three compilers.
473
+ */
474
+ declare function compileMapping(mapping: Record<string, {
475
+ data: string;
476
+ path: string;
477
+ }>, overrides?: readonly XmlifyedFile[], media?: readonly {
478
+ data: Uint8Array;
479
+ path: string;
480
+ }[]): Zippable;
481
+ //#endregion
482
+ export { AppProperties, AreaChart, AttributeData, AttributeMap, AttributePayload, BackdropOptions, BarChart, BaseXmlComponent, BevelOptions, BevelPresetType, BlendMode, BlipEffectsOptions, BlipFillConfigOptions, BlipFillMediaData, BlipFillOptions, BlipOptions, BlurEffectOptions, BuilderElement, COLOR_CATEGORIES, CameraOptions, CatAx, ChartCollection, ChartData, ChartSeriesData, ChartSpace, ChartSpaceOptions, ChartTitle, ChartType, ChartTypeOptions, ColorTransformOptions, CompileFn, CompoundLine, Connection, ConnectionSite, Context, CoreProperties, CustomGeometryOptions, DEFAULT_DRAWING_XML, DOCX_NS, DashStop, DataModel, type DefaultAttributes, EMPTY_OBJECT, EffectContainerType, EffectDagOptions, EffectListOptions, EmptyElement, FillOptions, FillOverlayEffectOptions, Formatter, GeomRect, GeometryGuide, GlowEffectOptions, GradientFillOptions, GradientShadeOptions, GradientStop, GradientStopOptions, GroupTransform2DOptions, HslColorOptions, IXmlAttribute, IXmlableObject, IdFormat, IgnoreIfEmptyXmlComponent, ImportedRootElementAttributes, ImportedXmlComponent, InitializableXmlComponent, InnerShadowEffectOptions, LAYOUT_CATEGORIES, LightRigOptions, LineCap, LineChart, LineEndLength, LineEndOptions, LineEndType, LineEndWidth, LineJoin, LinearShadeOptions, MediaDataTransformation, MediaTransformation, NextAttributeComponent, OoxmlMimeType, OuterShadowEffectOptions, OutlineFillProperties, OutlineOptions, OutputByType, OutputType, type OverrideAttributes, PPTX_NS, Packer, ParsedArchive, PathCommand, PathFillMode, PathOptions, PathShadeOptions, PathShadeType, PatternFillOptions, PenAlignment, Percentage, PieChart, Point, Point3D, PositivePercentage, PositiveUniversalMeasure, PresetColor, PresetColorOptions, PresetDash, PresetGeometry, PresetGeometryOptions, PresetMaterialType, PresetPattern, PresetShadowEffectOptions, PresetShadowVal, RawPassthrough, RectAlignment, ReflectionEffectOptions, type RelationshipType, Relationships, RelativeMeasure, RelativeRect, RenderedParagraphNode, ReplacerConfig, RgbColorOptions, STYLE_CATEGORIES, ScRgbColorOptions, ScatterChart, Scene3DOptions, SchemeColor, SchemeColorOptions, Shape3DOptions, SmartArtCollection, SmartArtData, SmartArtRelOptions, SolidFillOptions, SourceRectangleOptions, SphereCoords, Stretch, SystemColor, SystemColorOptions, TargetModeType, ThemeColor, ThemeFont, TileAlignment, TileFlipMode, TileOptions, TokenNotFoundError, TransPoint, Transform2DOptions, TreeNode, UniqueNumericIdCreator, UniversalMeasure, ValAx, Vector3D, XmlAttributeComponent, XmlComponent, XmlNamespaceConfig, XmlifyedFile, ZIP_DEFLATE_LEVEL, ZIP_STORED_LEVEL, type ZipOptions, type Zippable, addSmartArtRelationships, appendContentType, appendRelationship, attrObj, buildCorePropertiesXml, buildFill, chartAttr, collectPlaceholderKeys, compileMapping, convertEmuToInches, convertEmuToPixels, convertEmuToPoints, convertInchesToEmu, convertInchesToTwip, convertMillimetersToTwip, convertOutput, convertPixelsToEmu, convertPointsToEmu, convertToXmlComponent, createAdjustmentValues, createBevel, createBlip, createBlipEffects, createBlipFill, createBottomBevel, createChartType, createColorElement, createColorTransforms, createCustomDash, createCustomGeometry, createDataModel, createDefault, createEffectDag, createEffectList, createExtentionList, createFillOverlayEffect, createGlowEffect, createGradientFill, createGradientStop, createGroupFill, createGroupTransform2D, createHslColor, createInnerShadowEffect, createLineEnd, createNoFill, createNumRef, createOuterShadowEffect, createOutline, createOverride, createPacker, createPatternFill, createPresetColor, createPresetShadowEffect, createReflectionEffect, createReplacer, createRgbColor, createRunRenderer, createScRgbColor, createScene3D, createSchemeColor, createShape3D, createSoftEdgeEffect, createSolidFill, createSourceRectangle, createSplitInject, createStrRef, createSystemColor, createTextElementContents, createTileInfo, createTokenReplacer, createTransform2D, createTransformation, createTraverser, createZipStream, dateTimeValue, decimalNumber, eighthPointMeasureValue, elementToCompact, escapeRegex, extractBlipFillMedia, formatId, getColorXml, getFirstLevelElements, getLayoutXml, getNextRelationshipIndex, getReferencedMedia, getStyleXml, hasPlaceholders, hashedId, hexBinary, hexColorValue, hpsMeasureObj, hpsMeasureValue, invertMap, longHexNumber, measurementOrPercentValue, numberValObj, onOffObj, parseArchive, parseCorePropsElement, patchSpaceAttribute, percentageValue, pointMeasureValue, positiveUniversalMeasureValue, replaceChartPlaceholders, replaceImagePlaceholders, replaceSmartArtPlaceholders, shortHexNumber, signedHpsMeasureValue, signedTwipsMeasureValue, strFromU8, stringContainerObj, stringEnumValObj, stringValObj, toJson, twipsMeasureValue, uCharHexNumber, uniqueId, uniqueNumericIdCreator, uniqueUuid, universalMeasureValue, unsignedDecimalNumber, unzipSync, wrapEl, xsdBlendMode, xsdCompoundLine, xsdEffectContainer, xsdLineCap, xsdLineEndSize, xsdMaterialType, xsdPathFillMode, xsdPattern, xsdPenAlignment, xsdPresetShadow, xsdRectAlignment, xsdStrikeStyle, xsdTextAlign, xsdTextAnchor, xsdTextCaps, xsdUnderlineStyle, xsdVerticalMergeRev, zipAndConvert, zipSyncAndConvert };
@@ -1,12 +1,11 @@
1
- import { _ as XmlAttributeComponent, a as BuilderElement, b as XmlComponent, c as chartAttr, d as onOffObj, f as stringContainerObj, g as NextAttributeComponent, h as wrapEl, i as convertToXmlComponent, l as hpsMeasureObj, m as stringValObj, n as ImportedRootElementAttributes, o as EmptyElement, p as stringEnumValObj, r as ImportedXmlComponent, s as attrObj, t as InitializableXmlComponent, u as numberValObj, v as EMPTY_OBJECT, x as BaseXmlComponent, y as IgnoreIfEmptyXmlComponent } from "./xml-components-CADgke8j.mjs";
2
- import { ThemeColor, ThemeFont, dateTimeValue, decimalNumber, eighthPointMeasureValue, hexBinary, hexColorValue, hpsMeasureValue, longHexNumber, measurementOrPercentValue, percentageValue, pointMeasureValue, positiveUniversalMeasureValue, shortHexNumber, signedHpsMeasureValue, signedTwipsMeasureValue, twipsMeasureValue, uCharHexNumber, universalMeasureValue, unsignedDecimalNumber } from "./values.mjs";
3
- import { $ as xsdCompoundLine, A as LineJoin, At as hashedId, B as createNoFill, Bt as convertPixelsToEmu, C as createOuterShadowEffect, Ct as createSchemeColor, D as createFillOverlayEffect, Dt as createPresetColor, E as BlendMode, Et as PresetColor, F as LineEndType, Ft as convertEmuToPixels, G as PathShadeType, H as extractBlipFillMedia, I as LineEndWidth, It as convertEmuToPoints, J as createGradientStop, K as TileFlipMode, L as createLineEnd, Lt as convertInchesToEmu, M as PresetDash, Mt as uniqueNumericIdCreator, N as createOutline, Nt as uniqueUuid, O as CompoundLine, Ot as createHslColor, P as LineEndLength, Pt as convertEmuToInches, Q as xsdBlendMode, R as createCustomDash, Rt as convertInchesToTwip, S as RectAlignment, St as SchemeColor, T as createGlowEffect, Tt as createRgbColor, U as PresetPattern, V as buildFill, Vt as convertPointsToEmu, W as createPatternFill, X as createTileInfo, Y as TileAlignment, Z as invertMap, _ as createEffectList, _t as createBlipEffects, a as createBlip, at as xsdPattern, b as PresetShadowVal, bt as SystemColor, c as PresetGeometry, ct as xsdRectAlignment, d as createShape3D, dt as xsdTextAnchor, et as xsdEffectContainer, f as BevelPresetType, ft as xsdTextCaps, g as createEffectDag, gt as createSourceRectangle, h as createScene3D, ht as Stretch, i as createBlipFill, it as xsdPathFillMode, j as PenAlignment, jt as uniqueId, k as LineCap, kt as createColorTransforms, l as createAdjustmentValues, lt as xsdStrikeStyle, m as createBottomBevel, mt as xsdVerticalMergeRev, n as createGroupTransform2D, nt as xsdLineEndSize, o as createExtentionList, ot as xsdPenAlignment, p as createBevel, pt as xsdUnderlineStyle, q as createGradientFill, r as createTransform2D, rt as xsdMaterialType, s as createCustomGeometry, st as xsdPresetShadow, t as createTransformation, tt as xsdLineCap, u as PresetMaterialType, ut as xsdTextAlign, v as createSoftEdgeEffect, vt as createColorElement, w as createInnerShadowEffect, wt as createScRgbColor, x as createPresetShadowEffect, xt as createSystemColor, y as createReflectionEffect, yt as createSolidFill, z as createGroupFill, zt as convertMillimetersToTwip } from "./drawingml-YMdpQfWs.mjs";
4
- import { a as DataModel, c as getColorXml, d as COLOR_CATEGORIES, f as LAYOUT_CATEGORIES, i as TransPoint, l as getLayoutXml, n as SmartArtCollection, o as Connection, p as STYLE_CATEGORIES, r as Point, s as DEFAULT_DRAWING_XML, t as createDataModel, u as getStyleXml } from "./smartart-DBQ_rRfK.mjs";
5
- import { a as ScatterChart, c as BarChart, d as createStrRef, f as CatAx, i as createChartType, l as AreaChart, n as ChartSpace, o as PieChart, p as ValAx, r as ChartTitle, s as LineChart, t as ChartCollection, u as createNumRef } from "./chart-Bd9E-YhB.mjs";
6
- import { a as createTraverser, c as TokenNotFoundError, d as getFirstLevelElements, f as patchSpaceAttribute, h as PPTX_NS, i as createReplacer, l as createSplitInject, m as DOCX_NS, n as getNextRelationshipIndex, o as createRunRenderer, p as toJson, r as appendContentType, s as createTokenReplacer, t as appendRelationship, u as createTextElementContents } from "./patch-BdMU95aX.mjs";
7
- import { js2xml, textOf, xml2js } from "@office-open/xml";
1
+ import { _ as XmlAttributeComponent, a as BuilderElement, b as XmlComponent, c as chartAttr, d as onOffObj, f as stringContainerObj, g as NextAttributeComponent, h as wrapEl, i as convertToXmlComponent, l as hpsMeasureObj, m as stringValObj, n as ImportedRootElementAttributes, o as EmptyElement, p as stringEnumValObj, r as ImportedXmlComponent, s as attrObj, t as InitializableXmlComponent, u as numberValObj, v as EMPTY_OBJECT, x as BaseXmlComponent, y as IgnoreIfEmptyXmlComponent } from "./xml-components-SxPlKGms.js";
2
+ import { ThemeColor, ThemeFont, dateTimeValue, decimalNumber, eighthPointMeasureValue, hexBinary, hexColorValue, hpsMeasureValue, longHexNumber, measurementOrPercentValue, percentageValue, pointMeasureValue, positiveUniversalMeasureValue, shortHexNumber, signedHpsMeasureValue, signedTwipsMeasureValue, twipsMeasureValue, uCharHexNumber, universalMeasureValue, unsignedDecimalNumber } from "./values.js";
3
+ import { $ as xsdCompoundLine, A as LineJoin, At as hashedId, B as createNoFill, Bt as convertPixelsToEmu, C as createOuterShadowEffect, Ct as createSchemeColor, D as createFillOverlayEffect, Dt as createPresetColor, E as BlendMode, Et as PresetColor, F as LineEndType, Ft as convertEmuToPixels, G as PathShadeType, H as extractBlipFillMedia, I as LineEndWidth, It as convertEmuToPoints, J as createGradientStop, K as TileFlipMode, L as createLineEnd, Lt as convertInchesToEmu, M as PresetDash, Mt as uniqueNumericIdCreator, N as createOutline, Nt as uniqueUuid, O as CompoundLine, Ot as createHslColor, P as LineEndLength, Pt as convertEmuToInches, Q as xsdBlendMode, R as createCustomDash, Rt as convertInchesToTwip, S as RectAlignment, St as SchemeColor, T as createGlowEffect, Tt as createRgbColor, U as PresetPattern, V as buildFill, Vt as convertPointsToEmu, W as createPatternFill, X as createTileInfo, Y as TileAlignment, Z as invertMap, _ as createEffectList, _t as createBlipEffects, a as createBlip, at as xsdPattern, b as PresetShadowVal, bt as SystemColor, c as PresetGeometry, ct as xsdRectAlignment, d as createShape3D, dt as xsdTextAnchor, et as xsdEffectContainer, f as BevelPresetType, ft as xsdTextCaps, g as createEffectDag, gt as createSourceRectangle, h as createScene3D, ht as Stretch, i as createBlipFill, it as xsdPathFillMode, j as PenAlignment, jt as uniqueId, k as LineCap, kt as createColorTransforms, l as createAdjustmentValues, lt as xsdStrikeStyle, m as createBottomBevel, mt as xsdVerticalMergeRev, n as createGroupTransform2D, nt as xsdLineEndSize, o as createExtentionList, ot as xsdPenAlignment, p as createBevel, pt as xsdUnderlineStyle, q as createGradientFill, r as createTransform2D, rt as xsdMaterialType, s as createCustomGeometry, st as xsdPresetShadow, t as createTransformation, tt as xsdLineCap, u as PresetMaterialType, ut as xsdTextAlign, v as createSoftEdgeEffect, vt as createColorElement, w as createInnerShadowEffect, wt as createScRgbColor, x as createPresetShadowEffect, xt as createSystemColor, y as createReflectionEffect, yt as createSolidFill, z as createGroupFill, zt as convertMillimetersToTwip } from "./drawingml-DG6euH0k.js";
4
+ import { a as DataModel, c as getColorXml, d as COLOR_CATEGORIES, f as LAYOUT_CATEGORIES, i as TransPoint, l as getLayoutXml, n as SmartArtCollection, o as Connection, p as STYLE_CATEGORIES, r as Point, s as DEFAULT_DRAWING_XML, t as createDataModel, u as getStyleXml } from "./smartart-DGNfjKA9.js";
5
+ import { a as ScatterChart, c as BarChart, d as createStrRef, f as CatAx, i as createChartType, l as AreaChart, n as ChartSpace, o as PieChart, p as ValAx, r as ChartTitle, s as LineChart, t as ChartCollection, u as createNumRef } from "./chart-BUlAcF2k.js";
6
+ import { a as createTraverser, c as TokenNotFoundError, d as getFirstLevelElements, f as patchSpaceAttribute, h as PPTX_NS, i as createReplacer, l as createSplitInject, m as DOCX_NS, n as getNextRelationshipIndex, o as createRunRenderer, p as toJson, r as appendContentType, s as createTokenReplacer, t as appendRelationship, u as createTextElementContents } from "./patch-BWan_fhF.js";
7
+ import { escapeXml, js2xml, textOf, xml2js } from "@office-open/xml";
8
8
  import { AsyncZipDeflate, Zip, ZipPassThrough, strFromU8, strFromU8 as strFromU8$1, strToU8, unzipSync, unzipSync as unzipSync$1, zip, zipSync } from "fflate";
9
- import { Readable } from "stream";
10
9
  //#region src/output-type.ts
11
10
  /**
12
11
  * Output type definitions for OOXML document export.
@@ -15,7 +14,8 @@ import { Readable } from "stream";
15
14
  */
16
15
  const OoxmlMimeType = {
17
16
  DOCX: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
18
- PPTX: "application/vnd.openxmlformats-officedocument.presentationml.presentation"
17
+ PPTX: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
18
+ XLSX: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
19
19
  };
20
20
  const convertOutput = (data, type, mimeType = OoxmlMimeType.DOCX) => {
21
21
  switch (type) {
@@ -38,13 +38,6 @@ const convertOutput = (data, type, mimeType = OoxmlMimeType.DOCX) => {
38
38
  *
39
39
  * @module
40
40
  */
41
- const PrettifyType = {
42
- NONE: "",
43
- WITH_2_BLANKS: " ",
44
- WITH_4_BLANKS: " ",
45
- WITH_TAB: " "
46
- };
47
- const convertPrettifyType = (prettify) => prettify === true ? PrettifyType.WITH_2_BLANKS : prettify === false ? void 0 : prettify;
48
41
  /** Default DEFLATE compression level matching Microsoft Office behavior. */
49
42
  const ZIP_DEFLATE_LEVEL = 6;
50
43
  /** STORE level for already-compressed media formats (JPEG, PNG, GIF, etc.). */
@@ -58,7 +51,10 @@ const ZIP_STORED_LEVEL = 0;
58
51
  */
59
52
  const zipAndConvert = async (files, type, mimeType, level = 6) => {
60
53
  return convertOutput(await new Promise((resolve, reject) => {
61
- zip(files, { level }, (err, data) => {
54
+ zip(files, {
55
+ level,
56
+ consume: true
57
+ }, (err, data) => {
62
58
  if (err) reject(err);
63
59
  else resolve(data);
64
60
  });
@@ -74,35 +70,35 @@ const zipSyncAndConvert = (files, type, mimeType, level = 6) => {
74
70
  return convertOutput(zipSync(files, { level }), type, mimeType);
75
71
  };
76
72
  /**
77
- * Create a Node.js Readable stream from compressed file entries.
73
+ * Create a `ReadableStream<Uint8Array>` from compressed file entries.
78
74
  *
79
- * Uses fflate's AsyncZipDeflate for non-blocking DEFLATE compression via
80
- * Web Workers. STORED entries (media) pass through synchronously.
81
- * Chunks are emitted asynchronously as each file's compression completes.
75
+ * Uses fflate's `AsyncZipDeflate` for non-blocking DEFLATE compression.
76
+ * `STORED` entries (media) pass through synchronously.
77
+ * Works in both Node.js and browsers (Web Streams API).
82
78
  */
83
79
  const createZipStream = (files) => {
84
- const stream = new Readable({ read() {} });
85
- try {
86
- const zip = new Zip((err, chunk, final) => {
87
- if (err) {
88
- stream.destroy(err);
89
- return;
80
+ return new ReadableStream({ start(controller) {
81
+ try {
82
+ const zip = new Zip((err, chunk, _final) => {
83
+ if (err) {
84
+ controller.error(err);
85
+ return;
86
+ }
87
+ controller.enqueue(chunk);
88
+ if (_final) controller.close();
89
+ });
90
+ for (const [name, data] of Object.entries(files)) {
91
+ const raw = Array.isArray(data) ? data[0] : data;
92
+ const level = Array.isArray(data) ? data[1].level ?? 6 : 6;
93
+ const entry = level === 0 ? new ZipPassThrough(name) : new AsyncZipDeflate(name, { level });
94
+ zip.add(entry);
95
+ entry.push(raw, true);
90
96
  }
91
- if (!stream.destroyed) stream.push(Buffer.from(chunk));
92
- if (final) stream.push(null);
93
- });
94
- for (const [name, data] of Object.entries(files)) {
95
- const raw = Array.isArray(data) ? data[0] : data;
96
- const level = Array.isArray(data) ? data[1].level ?? 6 : 6;
97
- const entry = level === 0 ? new ZipPassThrough(name) : new AsyncZipDeflate(name, { level });
98
- zip.add(entry);
99
- entry.push(raw, true);
97
+ zip.end();
98
+ } catch (err) {
99
+ controller.error(err instanceof Error ? err : new Error(String(err)));
100
100
  }
101
- zip.end();
102
- } catch (err) {
103
- stream.destroy(err instanceof Error ? err : new Error(String(err)));
104
- }
105
- return stream;
101
+ } });
106
102
  };
107
103
  /**
108
104
  * Create a Packer object with all output format methods.
@@ -113,33 +109,33 @@ const createZipStream = (files) => {
113
109
  */
114
110
  const createPacker = (options) => {
115
111
  const { compile, mimeType } = options;
116
- const compileFiles = (file, prettify, overrides = []) => compile(file, convertPrettifyType(prettify), overrides);
117
- const pack = async (file, type, prettify, overrides) => {
118
- return zipAndConvert(compileFiles(file, prettify, overrides), type, mimeType);
112
+ const compileFiles = (file, overrides = []) => compile(file, overrides);
113
+ const pack = async (file, type, overrides) => {
114
+ return zipAndConvert(compileFiles(file, overrides), type, mimeType);
119
115
  };
120
- const toBytes = (file, prettify, overrides) => pack(file, "uint8array", prettify, overrides);
121
- const toString = (file, prettify, overrides) => pack(file, "string", prettify, overrides);
122
- const toBuffer = (file, prettify, overrides) => pack(file, "nodebuffer", prettify, overrides);
123
- const toBase64String = (file, prettify, overrides) => pack(file, "base64", prettify, overrides);
124
- const toBlob = (file, prettify, overrides) => pack(file, "blob", prettify, overrides);
125
- const toArrayBuffer = (file, prettify, overrides) => pack(file, "arraybuffer", prettify, overrides);
126
- const packSync = (file, type, prettify, overrides) => {
127
- return zipSyncAndConvert(compileFiles(file, prettify, overrides), type, mimeType);
116
+ const toBytes = (file, overrides) => pack(file, "uint8array", overrides);
117
+ const toString = (file, overrides) => pack(file, "string", overrides);
118
+ const toBuffer = (file, overrides) => pack(file, "nodebuffer", overrides);
119
+ const toBase64String = (file, overrides) => pack(file, "base64", overrides);
120
+ const toBlob = (file, overrides) => pack(file, "blob", overrides);
121
+ const toArrayBuffer = (file, overrides) => pack(file, "arraybuffer", overrides);
122
+ const packSync = (file, type, overrides) => {
123
+ return zipSyncAndConvert(compileFiles(file, overrides), type, mimeType);
128
124
  };
129
- const toBytesSync = (file, prettify, overrides) => packSync(file, "uint8array", prettify, overrides);
130
- const toStringSync = (file, prettify, overrides) => packSync(file, "string", prettify, overrides);
131
- const toBufferSync = (file, prettify, overrides) => packSync(file, "nodebuffer", prettify, overrides);
132
- const toBase64StringSync = (file, prettify, overrides) => packSync(file, "base64", prettify, overrides);
133
- const toBlobSync = (file, prettify, overrides) => packSync(file, "blob", prettify, overrides);
134
- const toArrayBufferSync = (file, prettify, overrides) => packSync(file, "arraybuffer", prettify, overrides);
135
- const toStream = (file, prettify, overrides) => {
125
+ const toBytesSync = (file, overrides) => packSync(file, "uint8array", overrides);
126
+ const toStringSync = (file, overrides) => packSync(file, "string", overrides);
127
+ const toBufferSync = (file, overrides) => packSync(file, "nodebuffer", overrides);
128
+ const toBase64StringSync = (file, overrides) => packSync(file, "base64", overrides);
129
+ const toBlobSync = (file, overrides) => packSync(file, "blob", overrides);
130
+ const toArrayBufferSync = (file, overrides) => packSync(file, "arraybuffer", overrides);
131
+ const toStream = (file, overrides) => {
136
132
  let files;
137
133
  try {
138
- files = compileFiles(file, prettify, overrides);
134
+ files = compileFiles(file, overrides);
139
135
  } catch (err) {
140
- const errorStream = new Readable({ read() {} });
141
- errorStream.destroy(err instanceof Error ? err : new Error(String(err)));
142
- return errorStream;
136
+ return new ReadableStream({ start(controller) {
137
+ controller.error(err instanceof Error ? err : new Error(String(err)));
138
+ } });
143
139
  }
144
140
  return createZipStream(files);
145
141
  };
@@ -194,6 +190,19 @@ var Relationships = class extends BaseXmlComponent {
194
190
  get relationshipCount() {
195
191
  return this.entries.length;
196
192
  }
193
+ /**
194
+ * Zero-allocation fast path: directly concatenate XML string.
195
+ * Bypasses the IXmlableObject intermediate tree entirely.
196
+ */
197
+ toXml(_context) {
198
+ const p = ["<Relationships xmlns=\"http://schemas.openxmlformats.org/package/2006/relationships\">"];
199
+ for (const e of this.entries) {
200
+ const tm = e.targetMode ? ` TargetMode="${escapeXml(e.targetMode)}"` : "";
201
+ p.push(`<Relationship Id="${escapeXml(e.id)}" Type="${escapeXml(e.type)}" Target="${escapeXml(e.target)}"${tm}/>`);
202
+ }
203
+ p.push("</Relationships>");
204
+ return p.join("");
205
+ }
197
206
  prepForXml(_context) {
198
207
  const children = [RELS_ATTRS];
199
208
  for (const e of this.entries) {
@@ -257,7 +266,7 @@ const createOverride = (contentType, partName) => new BuilderElement({
257
266
  //#region src/formatter.ts
258
267
  const XML_DECL = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>";
259
268
  /**
260
- * Converts an XmlComponent tree into a serializable XML object.
269
+ * Converts an XmlComponent tree into a serializable XML object or string.
261
270
  */
262
271
  var Formatter = class {
263
272
  format(input, context = { stack: [] }) {
@@ -265,9 +274,14 @@ var Formatter = class {
265
274
  if (output) return output;
266
275
  throw new Error("XMLComponent did not format correctly");
267
276
  }
277
+ /**
278
+ * Serialize a component directly to XML string via the toXml() fast path.
279
+ */
268
280
  formatToXml(input, context, declaration) {
269
- const str = input.toXml(context);
270
- return declaration ? XML_DECL + str : str;
281
+ const body = input.toXml(context);
282
+ if (!body) return "";
283
+ if (declaration) return (declaration === true ? XML_DECL : `<?xml version="1.0" encoding="${declaration.encoding || "UTF-8"}"${declaration.standalone ? ` standalone="${declaration.standalone}"` : ""}?>`) + body;
284
+ return body;
271
285
  }
272
286
  };
273
287
  //#endregion
@@ -426,11 +440,15 @@ var ParsedArchive = class {
426
440
  /** Serialize back to a ZIP buffer, merging original zip + modifications. */
427
441
  save() {
428
442
  const files = {};
429
- for (const [path, data] of this.zip) if (!this.modified.has(path)) files[path] = data;
430
- for (const [path, data] of this.modified) files[path] = data;
443
+ for (const [path, data] of this.zip) if (!this.modified.has(path)) files[path] = MEDIA_PATTERN.test(path) ? [data, { level: MEDIA_STORED_LEVEL }] : data;
444
+ for (const [path, data] of this.modified) files[path] = MEDIA_PATTERN.test(path) ? [data, { level: MEDIA_STORED_LEVEL }] : data;
431
445
  return zipSync(files);
432
446
  }
433
447
  };
448
+ /** Regex to detect already-compressed media file extensions. */
449
+ const MEDIA_PATTERN = /\.(png|jpe?g|gif|wmf|emf|tiff?|avi|mp4|mp3|wav)$/i;
450
+ /** STORE level for already-compressed media formats. */
451
+ const MEDIA_STORED_LEVEL = 0;
434
452
  /** Parse an OOXML archive (.docx, .pptx, .xlsx) into a ParsedArchive. */
435
453
  function parseArchive(data) {
436
454
  return new ParsedArchive(data);
@@ -541,4 +559,22 @@ function addSmartArtRelationships(keys, addRel, baseOffset, globalStartIndex, op
541
559
  });
542
560
  }
543
561
  //#endregion
544
- export { AppProperties, AreaChart, BarChart, BaseXmlComponent, BevelPresetType, BlendMode, BuilderElement, COLOR_CATEGORIES, CatAx, ChartCollection, ChartSpace, ChartTitle, CompoundLine, Connection, DEFAULT_DRAWING_XML, DOCX_NS, DataModel, EMPTY_OBJECT, EmptyElement, Formatter, IgnoreIfEmptyXmlComponent, ImportedRootElementAttributes, ImportedXmlComponent, InitializableXmlComponent, LAYOUT_CATEGORIES, LineCap, LineChart, LineEndLength, LineEndType, LineEndWidth, LineJoin, NextAttributeComponent, OoxmlMimeType, PPTX_NS, ParsedArchive, PathShadeType, PenAlignment, PieChart, Point, PresetColor, PresetDash, PresetGeometry, PresetMaterialType, PresetPattern, PresetShadowVal, PrettifyType, RawPassthrough, RectAlignment, Relationships, STYLE_CATEGORIES, ScatterChart, SchemeColor, SmartArtCollection, Stretch, SystemColor, TargetModeType, ThemeColor, ThemeFont, TileAlignment, TileFlipMode, TokenNotFoundError, TransPoint, ValAx, XmlAttributeComponent, XmlComponent, ZIP_DEFLATE_LEVEL, ZIP_STORED_LEVEL, addSmartArtRelationships, appendContentType, appendRelationship, attrObj, buildCorePropertiesXml, buildFill, chartAttr, collectPlaceholderKeys, convertEmuToInches, convertEmuToPixels, convertEmuToPoints, convertInchesToEmu, convertInchesToTwip, convertMillimetersToTwip, convertOutput, convertPixelsToEmu, convertPointsToEmu, convertPrettifyType, convertToXmlComponent, createAdjustmentValues, createBevel, createBlip, createBlipEffects, createBlipFill, createBottomBevel, createChartType, createColorElement, createColorTransforms, createCustomDash, createCustomGeometry, createDataModel, createDefault, createEffectDag, createEffectList, createExtentionList, createFillOverlayEffect, createGlowEffect, createGradientFill, createGradientStop, createGroupFill, createGroupTransform2D, createHslColor, createInnerShadowEffect, createLineEnd, createNoFill, createNumRef, createOuterShadowEffect, createOutline, createOverride, createPacker, createPatternFill, createPresetColor, createPresetShadowEffect, createReflectionEffect, createReplacer, createRgbColor, createRunRenderer, createScRgbColor, createScene3D, createSchemeColor, createShape3D, createSoftEdgeEffect, createSolidFill, createSourceRectangle, createSplitInject, createStrRef, createSystemColor, createTextElementContents, createTileInfo, createTokenReplacer, createTransform2D, createTransformation, createTraverser, createZipStream, dateTimeValue, decimalNumber, eighthPointMeasureValue, elementToCompact, escapeRegex, extractBlipFillMedia, formatId, getColorXml, getFirstLevelElements, getLayoutXml, getNextRelationshipIndex, getReferencedMedia, getStyleXml, hasPlaceholders, hashedId, hexBinary, hexColorValue, hpsMeasureObj, hpsMeasureValue, invertMap, longHexNumber, measurementOrPercentValue, numberValObj, onOffObj, parseArchive, parseCorePropsElement, patchSpaceAttribute, percentageValue, pointMeasureValue, positiveUniversalMeasureValue, replaceChartPlaceholders, replaceImagePlaceholders, replaceSmartArtPlaceholders, shortHexNumber, signedHpsMeasureValue, signedTwipsMeasureValue, strFromU8, stringContainerObj, stringEnumValObj, stringValObj, toJson, twipsMeasureValue, uCharHexNumber, uniqueId, uniqueNumericIdCreator, uniqueUuid, universalMeasureValue, unsignedDecimalNumber, unzipSync, wrapEl, xsdBlendMode, xsdCompoundLine, xsdEffectContainer, xsdLineCap, xsdLineEndSize, xsdMaterialType, xsdPathFillMode, xsdPattern, xsdPenAlignment, xsdPresetShadow, xsdRectAlignment, xsdStrikeStyle, xsdTextAlign, xsdTextAnchor, xsdTextCaps, xsdUnderlineStyle, xsdVerticalMergeRev, zipAndConvert, zipSyncAndConvert };
562
+ //#region src/compiler-utils.ts
563
+ /** Default STORE level for already-compressed media formats. */
564
+ const ZIP_STORED_LEVEL$1 = 0;
565
+ /** Reusable TextEncoder instance (stateless, safe to share). */
566
+ const encoder = new TextEncoder();
567
+ /**
568
+ * Convert a mapping of XML files + overrides + media into a Zippable structure.
569
+ *
570
+ * Centralises the mapping→Zippable conversion shared by all three compilers.
571
+ */
572
+ function compileMapping(mapping, overrides, media) {
573
+ const files = {};
574
+ for (const entry of Object.values(mapping)) files[entry.path] = encoder.encode(entry.data);
575
+ if (overrides) for (const o of overrides) files[o.path] = typeof o.data === "string" ? encoder.encode(o.data) : o.data;
576
+ if (media) for (const m of media) files[m.path] = [m.data, { level: ZIP_STORED_LEVEL$1 }];
577
+ return files;
578
+ }
579
+ //#endregion
580
+ export { AppProperties, AreaChart, BarChart, BaseXmlComponent, BevelPresetType, BlendMode, BuilderElement, COLOR_CATEGORIES, CatAx, ChartCollection, ChartSpace, ChartTitle, CompoundLine, Connection, DEFAULT_DRAWING_XML, DOCX_NS, DataModel, EMPTY_OBJECT, EmptyElement, Formatter, IgnoreIfEmptyXmlComponent, ImportedRootElementAttributes, ImportedXmlComponent, InitializableXmlComponent, LAYOUT_CATEGORIES, LineCap, LineChart, LineEndLength, LineEndType, LineEndWidth, LineJoin, NextAttributeComponent, OoxmlMimeType, PPTX_NS, ParsedArchive, PathShadeType, PenAlignment, PieChart, Point, PresetColor, PresetDash, PresetGeometry, PresetMaterialType, PresetPattern, PresetShadowVal, RawPassthrough, RectAlignment, Relationships, STYLE_CATEGORIES, ScatterChart, SchemeColor, SmartArtCollection, Stretch, SystemColor, TargetModeType, ThemeColor, ThemeFont, TileAlignment, TileFlipMode, TokenNotFoundError, TransPoint, ValAx, XmlAttributeComponent, XmlComponent, ZIP_DEFLATE_LEVEL, ZIP_STORED_LEVEL, addSmartArtRelationships, appendContentType, appendRelationship, attrObj, buildCorePropertiesXml, buildFill, chartAttr, collectPlaceholderKeys, compileMapping, convertEmuToInches, convertEmuToPixels, convertEmuToPoints, convertInchesToEmu, convertInchesToTwip, convertMillimetersToTwip, convertOutput, convertPixelsToEmu, convertPointsToEmu, convertToXmlComponent, createAdjustmentValues, createBevel, createBlip, createBlipEffects, createBlipFill, createBottomBevel, createChartType, createColorElement, createColorTransforms, createCustomDash, createCustomGeometry, createDataModel, createDefault, createEffectDag, createEffectList, createExtentionList, createFillOverlayEffect, createGlowEffect, createGradientFill, createGradientStop, createGroupFill, createGroupTransform2D, createHslColor, createInnerShadowEffect, createLineEnd, createNoFill, createNumRef, createOuterShadowEffect, createOutline, createOverride, createPacker, createPatternFill, createPresetColor, createPresetShadowEffect, createReflectionEffect, createReplacer, createRgbColor, createRunRenderer, createScRgbColor, createScene3D, createSchemeColor, createShape3D, createSoftEdgeEffect, createSolidFill, createSourceRectangle, createSplitInject, createStrRef, createSystemColor, createTextElementContents, createTileInfo, createTokenReplacer, createTransform2D, createTransformation, createTraverser, createZipStream, dateTimeValue, decimalNumber, eighthPointMeasureValue, elementToCompact, escapeRegex, extractBlipFillMedia, formatId, getColorXml, getFirstLevelElements, getLayoutXml, getNextRelationshipIndex, getReferencedMedia, getStyleXml, hasPlaceholders, hashedId, hexBinary, hexColorValue, hpsMeasureObj, hpsMeasureValue, invertMap, longHexNumber, measurementOrPercentValue, numberValObj, onOffObj, parseArchive, parseCorePropsElement, patchSpaceAttribute, percentageValue, pointMeasureValue, positiveUniversalMeasureValue, replaceChartPlaceholders, replaceImagePlaceholders, replaceSmartArtPlaceholders, shortHexNumber, signedHpsMeasureValue, signedTwipsMeasureValue, strFromU8, stringContainerObj, stringEnumValObj, stringValObj, toJson, twipsMeasureValue, uCharHexNumber, uniqueId, uniqueNumericIdCreator, uniqueUuid, universalMeasureValue, unsignedDecimalNumber, unzipSync, wrapEl, xsdBlendMode, xsdCompoundLine, xsdEffectContainer, xsdLineCap, xsdLineEndSize, xsdMaterialType, xsdPathFillMode, xsdPattern, xsdPenAlignment, xsdPresetShadow, xsdRectAlignment, xsdStrikeStyle, xsdTextAlign, xsdTextAnchor, xsdTextCaps, xsdUnderlineStyle, xsdVerticalMergeRev, zipAndConvert, zipSyncAndConvert };
@@ -1,2 +1,2 @@
1
- import { _ as PPTX_NS, a as getFirstLevelElements, c as TokenNotFoundError, d as createTraverser, f as RenderedParagraphNode, g as DOCX_NS, h as createReplacer, i as createTextElementContents, l as createSplitInject, m as ReplacerConfig, n as getNextRelationshipIndex, o as patchSpaceAttribute, p as createRunRenderer, r as appendContentType, s as toJson, t as appendRelationship, u as createTokenReplacer, v as XmlNamespaceConfig } from "../index-DNLRdIqy.mjs";
1
+ import { _ as PPTX_NS, a as getFirstLevelElements, c as TokenNotFoundError, d as createTraverser, f as RenderedParagraphNode, g as DOCX_NS, h as createReplacer, i as createTextElementContents, l as createSplitInject, m as ReplacerConfig, n as getNextRelationshipIndex, o as patchSpaceAttribute, p as createRunRenderer, r as appendContentType, s as toJson, t as appendRelationship, u as createTokenReplacer, v as XmlNamespaceConfig } from "../index-NK0k2I-R.js";
2
2
  export { DOCX_NS, PPTX_NS, RenderedParagraphNode, ReplacerConfig, TokenNotFoundError, XmlNamespaceConfig, appendContentType, appendRelationship, createReplacer, createRunRenderer, createSplitInject, createTextElementContents, createTokenReplacer, createTraverser, getFirstLevelElements, getNextRelationshipIndex, patchSpaceAttribute, toJson };
@@ -1,2 +1,2 @@
1
- import { a as createTraverser, c as TokenNotFoundError, d as getFirstLevelElements, f as patchSpaceAttribute, h as PPTX_NS, i as createReplacer, l as createSplitInject, m as DOCX_NS, n as getNextRelationshipIndex, o as createRunRenderer, p as toJson, r as appendContentType, s as createTokenReplacer, t as appendRelationship, u as createTextElementContents } from "../patch-BdMU95aX.mjs";
1
+ import { a as createTraverser, c as TokenNotFoundError, d as getFirstLevelElements, f as patchSpaceAttribute, h as PPTX_NS, i as createReplacer, l as createSplitInject, m as DOCX_NS, n as getNextRelationshipIndex, o as createRunRenderer, p as toJson, r as appendContentType, s as createTokenReplacer, t as appendRelationship, u as createTextElementContents } from "../patch-BWan_fhF.js";
2
2
  export { DOCX_NS, PPTX_NS, TokenNotFoundError, appendContentType, appendRelationship, createReplacer, createRunRenderer, createSplitInject, createTextElementContents, createTokenReplacer, createTraverser, getFirstLevelElements, getNextRelationshipIndex, patchSpaceAttribute, toJson };
@@ -78,11 +78,11 @@ function createSplitInject(ns, createTextElementContents, options) {
78
78
  }).flat() ?? [];
79
79
  return {
80
80
  left: {
81
- ...JSON.parse(JSON.stringify(runElement)),
81
+ ...structuredClone(runElement),
82
82
  elements: splitElements.slice(0, splitIndex + 1)
83
83
  },
84
84
  right: {
85
- ...JSON.parse(JSON.stringify(runElement)),
85
+ ...structuredClone(runElement),
86
86
  elements: splitElements.slice(splitIndex + 1)
87
87
  }
88
88
  };
@@ -1,2 +1,2 @@
1
- import { a as Point, c as Connection, d as getLayoutXml, f as getStyleXml, h as STYLE_CATEGORIES, i as SmartArtData, l as DEFAULT_DRAWING_XML, m as LAYOUT_CATEGORIES, n as createDataModel, o as TransPoint, p as COLOR_CATEGORIES, r as SmartArtCollection, s as DataModel, t as TreeNode, u as getColorXml } from "../index-CZxcE4Q6.mjs";
1
+ import { a as Point, c as Connection, d as getLayoutXml, f as getStyleXml, h as STYLE_CATEGORIES, i as SmartArtData, l as DEFAULT_DRAWING_XML, m as LAYOUT_CATEGORIES, n as createDataModel, o as TransPoint, p as COLOR_CATEGORIES, r as SmartArtCollection, s as DataModel, t as TreeNode, u as getColorXml } from "../index-BDwL0MVx.js";
2
2
  export { COLOR_CATEGORIES, Connection, DEFAULT_DRAWING_XML, DataModel, LAYOUT_CATEGORIES, Point, STYLE_CATEGORIES, SmartArtCollection, SmartArtData, TransPoint, TreeNode, createDataModel, getColorXml, getLayoutXml, getStyleXml };
@@ -1,2 +1,2 @@
1
- import { a as DataModel, c as getColorXml, d as COLOR_CATEGORIES, f as LAYOUT_CATEGORIES, i as TransPoint, l as getLayoutXml, n as SmartArtCollection, o as Connection, p as STYLE_CATEGORIES, r as Point, s as DEFAULT_DRAWING_XML, t as createDataModel, u as getStyleXml } from "../smartart-DBQ_rRfK.mjs";
1
+ import { a as DataModel, c as getColorXml, d as COLOR_CATEGORIES, f as LAYOUT_CATEGORIES, i as TransPoint, l as getLayoutXml, n as SmartArtCollection, o as Connection, p as STYLE_CATEGORIES, r as Point, s as DEFAULT_DRAWING_XML, t as createDataModel, u as getStyleXml } from "../smartart-DGNfjKA9.js";
2
2
  export { COLOR_CATEGORIES, Connection, DEFAULT_DRAWING_XML, DataModel, LAYOUT_CATEGORIES, Point, STYLE_CATEGORIES, SmartArtCollection, TransPoint, createDataModel, getColorXml, getLayoutXml, getStyleXml };
@@ -1,4 +1,4 @@
1
- import { b as XmlComponent, c as chartAttr } from "./xml-components-CADgke8j.mjs";
1
+ import { b as XmlComponent, c as chartAttr } from "./xml-components-SxPlKGms.js";
2
2
  //#region src/smartart/categories.ts
3
3
  /** Layout ID → OOXML category type */
4
4
  const LAYOUT_CATEGORIES = {
@@ -1,2 +1,2 @@
1
- import { C as uCharHexNumber, S as twipsMeasureValue, T as unsignedDecimalNumber, _ as pointMeasureValue, a as ThemeColor, b as signedHpsMeasureValue, c as dateTimeValue, d as hexBinary, f as hexColorValue, g as percentageValue, h as measurementOrPercentValue, i as RelativeMeasure, l as decimalNumber, m as longHexNumber, n as PositivePercentage, o as ThemeFont, p as hpsMeasureValue, r as PositiveUniversalMeasure, s as UniversalMeasure, t as Percentage, u as eighthPointMeasureValue, v as positiveUniversalMeasureValue, w as universalMeasureValue, x as signedTwipsMeasureValue, y as shortHexNumber } from "./values-QyWq4U4A.mjs";
1
+ import { C as uCharHexNumber, S as twipsMeasureValue, T as unsignedDecimalNumber, _ as pointMeasureValue, a as ThemeColor, b as signedHpsMeasureValue, c as dateTimeValue, d as hexBinary, f as hexColorValue, g as percentageValue, h as measurementOrPercentValue, i as RelativeMeasure, l as decimalNumber, m as longHexNumber, n as PositivePercentage, o as ThemeFont, p as hpsMeasureValue, r as PositiveUniversalMeasure, s as UniversalMeasure, t as Percentage, u as eighthPointMeasureValue, v as positiveUniversalMeasureValue, w as universalMeasureValue, x as signedTwipsMeasureValue, y as shortHexNumber } from "./values-CyCW27--.js";
2
2
  export { Percentage, PositivePercentage, PositiveUniversalMeasure, RelativeMeasure, ThemeColor, ThemeFont, UniversalMeasure, dateTimeValue, decimalNumber, eighthPointMeasureValue, hexBinary, hexColorValue, hpsMeasureValue, longHexNumber, measurementOrPercentValue, percentageValue, pointMeasureValue, positiveUniversalMeasureValue, shortHexNumber, signedHpsMeasureValue, signedTwipsMeasureValue, twipsMeasureValue, uCharHexNumber, universalMeasureValue, unsignedDecimalNumber };
@@ -1,7 +1,12 @@
1
- import { hpsMeasureValue } from "./values.mjs";
2
- import { xml, xml2js } from "@office-open/xml";
1
+ import { hpsMeasureValue } from "./values.js";
2
+ import { escapeXml, xml, xml2js } from "@office-open/xml";
3
3
  //#region src/xml-components/base.ts
4
4
  /**
5
+ * Base XML Component infrastructure for OOXML document generation.
6
+ *
7
+ * @module
8
+ */
9
+ /**
5
10
  * Abstract base class for all XML components.
6
11
  */
7
12
  var BaseXmlComponent = class {
@@ -10,6 +15,14 @@ var BaseXmlComponent = class {
10
15
  constructor(rootKey) {
11
16
  this.rootKey = rootKey;
12
17
  }
18
+ /**
19
+ * Direct XML serialization. Override in subclasses for zero-allocation output.
20
+ * Default falls back to prepForXml() + xml().
21
+ */
22
+ toXml(context) {
23
+ const obj = this.prepForXml(context);
24
+ return obj ? xml(obj) : "";
25
+ }
13
26
  };
14
27
  //#endregion
15
28
  //#region src/xml-components/component.ts
@@ -26,6 +39,11 @@ var BaseXmlComponent = class {
26
39
  const EMPTY_OBJECT = Object.seal({});
27
40
  /**
28
41
  * Base class for all XML components in OOXML documents.
42
+ *
43
+ * `toXml()` traverses the `root` array and calls `toXml()` on each
44
+ * `BaseXmlComponent` child — this avoids building the intermediate
45
+ * `IXmlableObject` tree. Inline `IXmlableObject` children fall back to
46
+ * `xml()` for serialization.
29
47
  */
30
48
  var XmlComponent = class extends BaseXmlComponent {
31
49
  /**
@@ -50,12 +68,26 @@ var XmlComponent = class extends BaseXmlComponent {
50
68
  return { [this.rootKey]: children.length ? children.length === 1 && children[0] && typeof children[0] === "object" && "_attr" in children[0] ? children[0] : children : EMPTY_OBJECT };
51
69
  }
52
70
  /**
53
- * Direct XML serialization. Override in subclasses for zero-allocation output.
54
- * Default falls back to prepForXml() + xml().
71
+ * Direct XML serialization traverses `root` and calls `toXml()` on
72
+ * each child, concatenating the results into a single string.
55
73
  */
56
74
  toXml(context) {
57
- const obj = this.prepForXml(context);
58
- return obj ? xml(obj) : "";
75
+ const childParts = [];
76
+ const attrParts = [];
77
+ for (const child of this.root) if (child instanceof BaseXmlComponent) {
78
+ const s = child.toXml(context);
79
+ if (s) childParts.push(s);
80
+ } else if (typeof child === "string") childParts.push(escapeXml(child));
81
+ else if (child != null && typeof child === "object") if ("_attr" in child) {
82
+ const a = child._attr;
83
+ for (const key of Object.keys(a)) attrParts.push(`${key}="${escapeXml(String(a[key]))}"`);
84
+ } else if ("_attributes" in child) {
85
+ const a = child._attributes;
86
+ for (const key of Object.keys(a)) attrParts.push(`${key}="${escapeXml(String(a[key]))}"`);
87
+ } else childParts.push(xml(child));
88
+ const attrStr = attrParts.length ? " " + attrParts.join(" ") : "";
89
+ const body = childParts.join("");
90
+ return body.length === 0 ? `<${this.rootKey}${attrStr}/>` : `<${this.rootKey}${attrStr}>${body}</${this.rootKey}>`;
59
91
  }
60
92
  /**
61
93
  * @deprecated Internal use only.
@@ -79,6 +111,17 @@ var IgnoreIfEmptyXmlComponent = class extends XmlComponent {
79
111
  if (this.includeIfEmpty) return result;
80
112
  if (result && (typeof result[this.rootKey] !== "object" || Object.keys(result[this.rootKey]).length)) return result;
81
113
  }
114
+ /**
115
+ * Suppress empty elements — super.toXml() produces a self-closing tag
116
+ * (`<tag/>`) when there are no child elements; IgnoreIfEmpty returns ""
117
+ * in that case. Child components that already override toXml() (e.g.
118
+ * Worksheet) are unaffected.
119
+ */
120
+ toXml(context) {
121
+ if (this.includeIfEmpty) return super.toXml(context);
122
+ const result = super.toXml(context);
123
+ return result.endsWith("/>") ? "" : result;
124
+ }
82
125
  };
83
126
  //#endregion
84
127
  //#region src/xml-components/attributes.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@office-open/core",
3
- "version": "0.6.5",
3
+ "version": "0.6.6",
4
4
  "description": "Shared OOXML infrastructure: XmlComponent, value validators, unit converters",
5
5
  "keywords": [
6
6
  "core",
@@ -27,40 +27,40 @@
27
27
  "dist"
28
28
  ],
29
29
  "type": "module",
30
- "main": "dist/index.mjs",
31
- "types": "dist/index.d.mts",
30
+ "main": "dist/index.js",
31
+ "types": "dist/index.d.ts",
32
32
  "exports": {
33
33
  ".": {
34
- "types": "./dist/index.d.mts",
35
- "import": "./dist/index.mjs"
34
+ "types": "./dist/index.d.ts",
35
+ "import": "./dist/index.js"
36
36
  },
37
37
  "./values": {
38
- "types": "./dist/values.d.mts",
39
- "import": "./dist/values.mjs"
38
+ "types": "./dist/values.d.ts",
39
+ "import": "./dist/values.js"
40
40
  },
41
41
  "./smartart": {
42
- "types": "./dist/smartart/index.d.mts",
43
- "import": "./dist/smartart/index.mjs"
42
+ "types": "./dist/smartart/index.d.ts",
43
+ "import": "./dist/smartart/index.js"
44
44
  },
45
45
  "./chart": {
46
- "types": "./dist/chart/index.d.mts",
47
- "import": "./dist/chart/index.mjs"
46
+ "types": "./dist/chart/index.d.ts",
47
+ "import": "./dist/chart/index.js"
48
48
  },
49
49
  "./drawingml": {
50
- "types": "./dist/drawingml/index.d.mts",
51
- "import": "./dist/drawingml/index.mjs"
50
+ "types": "./dist/drawingml/index.d.ts",
51
+ "import": "./dist/drawingml/index.js"
52
52
  }
53
53
  },
54
54
  "dependencies": {
55
55
  "fflate": "0.8.3",
56
56
  "hash.js": "1.1.7",
57
57
  "nanoid": "5.1.11",
58
- "@office-open/xml": "0.6.5"
58
+ "@office-open/xml": "0.6.6"
59
59
  },
60
60
  "scripts": {
61
61
  "dev": "basis build --stub",
62
62
  "build": "vp pack",
63
- "test": "vp test run --coverage",
63
+ "test": "vp test run",
64
64
  "check": "vp check --fix"
65
65
  }
66
66
  }
File without changes