@sheetxl/io-xlsx 0.8.0-beta.9 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (205) hide show
  1. package/LICENSE.md +8 -7
  2. package/browser/esm/7rZlWcm56hn3Jmnk.mjs +7021 -0
  3. package/browser/esm/AZus_5slvoIVhf1u.mjs +10323 -0
  4. package/browser/esm/B9QfzGvsvg-V3utu.mjs +4632 -0
  5. package/browser/esm/{C-2KaUyV4gs-sDTZ.mjs → BIR_Si489gIkGOnc.mjs} +194 -144
  6. package/browser/esm/{DsSIg46AR7IFBN5N.mjs → BJFvc-i40R4rPZ5y.mjs} +939 -804
  7. package/browser/esm/{D-epcZSoKLbsAIaC.mjs → BX8Ebx4NC5zp7_3J.mjs} +3 -3
  8. package/browser/esm/{CxtFawTfwRTCC4Xr.mjs → Bnxw38IvtA04zXEE.mjs} +2 -2
  9. package/browser/esm/CfVhYH77KdrR3fEK.mjs +24 -0
  10. package/browser/esm/index.mjs +3 -4
  11. package/browser/esm/jIQks3Crw6jehdDU.mjs +2474 -0
  12. package/browser/esm/{CRrTMRdN_IcSA_pm.mjs → qc9hnuR2z-whY8YO.mjs} +3 -3
  13. package/browser/esm/wZGpmkMUubNjClhG.mjs +104 -0
  14. package/licenses/dependencies.txt +2 -2
  15. package/node/esm/{BsTMtvwpQoPNv95M.mjs → BNLHWJHyy5eB0P_4.mjs} +2 -2
  16. package/node/esm/CVtsY2F9A9NzEGLk.mjs +2478 -0
  17. package/node/esm/CoeQ0LO-nNXiowwv.mjs +7284 -0
  18. package/node/esm/CxY3iIYLXVhCebeV.mjs +4746 -0
  19. package/node/esm/D2CZy9TQM9h2uqBh.mjs +2562 -0
  20. package/node/esm/{BCr4lCI6qQXXN0K1.mjs → Dm0hvKcR4xb0TV_N.mjs} +3 -3
  21. package/node/esm/_IA1gQ-zFQYQSZSs.mjs +6957 -0
  22. package/node/esm/index.mjs +65 -28
  23. package/node/esm/{CBtj0-a4l2qux2hA.mjs → zZFe3mW0xjmobowq.mjs} +3 -3
  24. package/package.json +9 -10
  25. package/types/src/AutoFilterRules.d.ts +34 -44
  26. package/types/src/ConditionalFormatRules.d.ts +2 -2
  27. package/types/src/DataTableFormula.d.ts +26 -0
  28. package/types/src/DataValidationRules.d.ts +0 -5
  29. package/types/src/DefinedNameAttributes.d.ts +8 -0
  30. package/types/src/ExcelCalcStamp.d.ts +0 -36
  31. package/types/src/ExcelCompat.d.ts +15 -143
  32. package/types/src/ExcelFunctionFacts.d.ts +0 -272
  33. package/types/src/ExcelReservedNames.d.ts +0 -65
  34. package/types/src/KnownFonts.d.ts +37 -0
  35. package/types/src/LegacyFormula.d.ts +1 -46
  36. package/types/src/OOXMLExtensions.d.ts +24 -2
  37. package/types/src/PageLayoutAttributes.d.ts +8 -0
  38. package/types/src/Plugin.d.ts +15 -3
  39. package/types/src/ProtectionAttributes.d.ts +2 -2
  40. package/types/src/SheetKinds.d.ts +42 -0
  41. package/types/src/SheetViewAttributes.d.ts +4 -0
  42. package/types/src/SortExtent.d.ts +16 -0
  43. package/types/src/SourcePackage.d.ts +0 -44
  44. package/types/src/SparklineGroups.d.ts +52 -0
  45. package/types/src/Types.d.ts +13 -3
  46. package/types/src/XlsxHeader.d.ts +19 -0
  47. package/types/src/chart/ChartExXml.d.ts +38 -0
  48. package/types/src/chart/ChartPartXml.d.ts +47 -0
  49. package/types/src/chart/ChartSpaceXml.d.ts +37 -0
  50. package/types/src/chart/_XmlTree.d.ts +34 -0
  51. package/types/src/chart/_chartCodecs.d.ts +12 -0
  52. package/types/src/chart/_chartExCodecs.d.ts +7 -0
  53. package/types/src/chart/_chartExFold.d.ts +14 -0
  54. package/types/src/chart/_chartExMarkup.d.ts +236 -0
  55. package/types/src/chart/_chartExStyle.d.ts +13 -0
  56. package/types/src/chart/_codec.d.ts +78 -0
  57. package/types/src/chart/_drawingml.d.ts +10 -0
  58. package/types/src/chart/_xml.d.ts +70 -0
  59. package/types/src/pivot/PivotArea.d.ts +20 -0
  60. package/types/src/pivot/PivotCacheRead.d.ts +30 -0
  61. package/types/src/pivot/PivotCacheWrite.d.ts +23 -0
  62. package/types/src/pivot/PivotFilters.d.ts +29 -0
  63. package/types/src/pivot/PivotFormats.d.ts +60 -0
  64. package/types/src/pivot/PivotTableRead.d.ts +44 -0
  65. package/types/src/pivot/PivotTableWrite.d.ts +13 -0
  66. package/types/src/pivot/_PivotCacheXml.d.ts +48 -0
  67. package/types/src/pivot/_PivotTableXml.d.ts +23 -0
  68. package/types/src/reader/CellControls.d.ts +18 -0
  69. package/types/src/reader/DocumentPropertiesRead.d.ts +16 -0
  70. package/types/src/reader/DummyFunctionUnwrap.d.ts +43 -23
  71. package/types/src/reader/HeaderStyles.d.ts +15 -0
  72. package/types/src/reader/IsoDateCell.d.ts +20 -0
  73. package/types/src/reader/LibreOfficeDataTable.d.ts +12 -0
  74. package/types/src/reader/PivotButtons.d.ts +14 -0
  75. package/types/src/reader/PivotCellFormats.d.ts +22 -0
  76. package/types/src/reader/SlicerJoin.d.ts +26 -0
  77. package/types/src/reader/ZipReader.d.ts +1 -1
  78. package/types/src/reader/_SlicerRecord.d.ts +59 -0
  79. package/types/src/reader/dom/DOMTransformer.d.ts +2 -2
  80. package/types/src/reader/domVisitors/AppPropertiesVisitor.d.ts +13 -1
  81. package/types/src/reader/domVisitors/AutoFilterVisitor.d.ts +3 -11
  82. package/types/src/reader/domVisitors/ColorContainerVisitor.d.ts +8 -1
  83. package/types/src/reader/domVisitors/CommentVisitor.d.ts +2 -2
  84. package/types/src/reader/domVisitors/DrawingElementVisitor.d.ts +13 -6
  85. package/types/src/reader/domVisitors/DrawingGraphicFrameVisitor.d.ts +9 -0
  86. package/types/src/reader/domVisitors/DrawingGrpSpVisitor.d.ts +10 -7
  87. package/types/src/reader/domVisitors/DrawingPicVisitor.d.ts +22 -13
  88. package/types/src/reader/domVisitors/DrawingSpVisitor.d.ts +5 -5
  89. package/types/src/reader/domVisitors/DrawingVisitor.d.ts +4 -2
  90. package/types/src/reader/domVisitors/ExternalLinkVisitor.d.ts +1 -11
  91. package/types/src/reader/domVisitors/FeaturePropertyBagVisitor.d.ts +18 -0
  92. package/types/src/reader/domVisitors/FmtSchemeVisitor.d.ts +0 -11
  93. package/types/src/reader/domVisitors/FontSchemeVisitor.d.ts +3 -2
  94. package/types/src/reader/domVisitors/ObjectDefaultsVisitor.d.ts +11 -0
  95. package/types/src/reader/domVisitors/SheetColorContainerVisitor.d.ts +2 -2
  96. package/types/src/reader/domVisitors/SheetStyleVisitor.d.ts +26 -5
  97. package/types/src/reader/domVisitors/SlicerCacheDefinitionVisitor.d.ts +11 -2
  98. package/types/src/reader/domVisitors/SlicersVisitor.d.ts +9 -3
  99. package/types/src/reader/domVisitors/SortStateVisitor.d.ts +2 -2
  100. package/types/src/reader/domVisitors/ThreadedCommentsVisitor.d.ts +2 -2
  101. package/types/src/reader/domVisitors/TimelinesVisitor.d.ts +13 -0
  102. package/types/src/reader/domVisitors/WorkbookVisitor.d.ts +0 -9
  103. package/types/src/reader/domVisitors/_Dxfs.d.ts +10 -0
  104. package/types/src/reader/domVisitors/index.d.ts +6 -34
  105. package/types/src/reader/saxVisitors/ContentTypesVisitor.d.ts +1 -0
  106. package/types/src/reader/saxVisitors/SharedStringsVisitor.d.ts +31 -6
  107. package/types/src/reader/saxVisitors/WorksheetVisitor.d.ts +26 -8
  108. package/types/src/richValue/ErrorRichValueHandler.d.ts +22 -0
  109. package/types/src/richValue/IRichValueHandler.d.ts +109 -0
  110. package/types/src/richValue/LocalImageRichValueHandler.d.ts +18 -0
  111. package/types/src/richValue/RichDataParts.d.ts +69 -0
  112. package/types/src/richValue/RichRecordWriter.d.ts +61 -0
  113. package/types/src/richValue/RichValueHandlers.d.ts +25 -0
  114. package/types/src/richValue/RichValueResolver.d.ts +54 -0
  115. package/types/src/richValue/WebImageRichValueHandler.d.ts +37 -0
  116. package/types/src/richValue/index.d.ts +7 -0
  117. package/types/src/utils/DrawingMLText.d.ts +2 -2
  118. package/types/src/utils/FormControls.d.ts +79 -6
  119. package/types/src/utils/SharedNames.d.ts +13 -0
  120. package/types/src/utils/SpreadsheetFont.d.ts +38 -0
  121. package/types/src/utils/VmlNoteShapes.d.ts +25 -32
  122. package/types/src/utils/VmlNoteStyle.d.ts +25 -0
  123. package/types/src/utils/VmlPrefixes.d.ts +24 -0
  124. package/types/src/vba/VBAProject.d.ts +0 -19
  125. package/types/src/writer/EvaluationSheet.d.ts +5 -0
  126. package/types/src/writer/builder/OpcXmlUtils.d.ts +0 -8
  127. package/types/src/writer/builder/PackageBuilder.d.ts +2 -41
  128. package/types/src/writer/builder/Types.d.ts +18 -28
  129. package/types/src/writer/emitters/CommentsEmitter.d.ts +3 -3
  130. package/types/src/writer/emitters/DrawingEmitter.d.ts +2 -2
  131. package/types/src/writer/emitters/ExternalLinkEmitter.d.ts +0 -11
  132. package/types/src/writer/emitters/FeaturePropertyBagEmitter.d.ts +8 -0
  133. package/types/src/writer/emitters/LegacyDrawingEmitter.d.ts +4 -4
  134. package/types/src/writer/emitters/PivotTableEmitter.d.ts +30 -1
  135. package/types/src/writer/emitters/PropsCoreEmitter.d.ts +7 -2
  136. package/types/src/writer/emitters/PropsCustomEmitter.d.ts +15 -0
  137. package/types/src/writer/emitters/RichValuePartsEmitters.d.ts +36 -0
  138. package/types/src/writer/emitters/RichValueRelEmitter.d.ts +12 -0
  139. package/types/src/writer/emitters/RichValueStructureEmitter.d.ts +4 -3
  140. package/types/src/writer/emitters/RichValueTypesEmitter.d.ts +3 -2
  141. package/types/src/writer/emitters/RichValueWebImageEmitter.d.ts +24 -0
  142. package/types/src/writer/emitters/SharedStringsEmitter.d.ts +6 -3
  143. package/types/src/writer/emitters/SlicerEmitter.d.ts +132 -0
  144. package/types/src/writer/emitters/StylesEmitter.d.ts +35 -2
  145. package/types/src/writer/emitters/TableEmitter.d.ts +14 -0
  146. package/types/src/writer/emitters/WorkbookEmitter.d.ts +24 -2
  147. package/types/src/writer/emitters/WorksheetEmitter.d.ts +4 -3
  148. package/types/src/writer/utils/AutoFilter.d.ts +3 -3
  149. package/types/src/writer/utils/CellControlComplements.d.ts +29 -0
  150. package/types/src/writer/utils/DateSystem.d.ts +6 -0
  151. package/types/src/writer/utils/DefaultRows.d.ts +22 -0
  152. package/types/src/writer/utils/DrawMLUtils.d.ts +8 -6
  153. package/types/src/writer/utils/DummyFunction.d.ts +0 -25
  154. package/types/src/writer/utils/DxfCollector.d.ts +14 -11
  155. package/types/src/writer/utils/PrstGeomUtils.d.ts +11 -3
  156. package/types/src/writer/utils/RichValueCollector.d.ts +81 -129
  157. package/types/src/writer/utils/SheetStyleLayout.d.ts +86 -0
  158. package/types/src/writer/utils/TextUtils.d.ts +6 -1
  159. package/types/src/writer/utils/UnsupportedFunctions.d.ts +2 -2
  160. package/types/src/writer/utils/XfVariants.d.ts +61 -0
  161. package/browser/cjs/B0Ugu_crqQYpdfQz.cjs +0 -1
  162. package/browser/cjs/B6sirGz6w-Bm7Ofo.cjs +0 -1
  163. package/browser/cjs/BHM3_D9PsNURVAVy.cjs +0 -1
  164. package/browser/cjs/BHWdwAQ322YA8JAZ.cjs +0 -6
  165. package/browser/cjs/CeuX8p1aBuKTuagi.cjs +0 -2
  166. package/browser/cjs/D3EWCPfCu-qMOIGd.cjs +0 -1
  167. package/browser/cjs/DSM4q1dhVVXvsgby.cjs +0 -30
  168. package/browser/cjs/DiAHwNv2I8RHE9GY.cjs +0 -1
  169. package/browser/cjs/index.cjs +0 -1
  170. package/browser/cjs/wrpXlaSBGEicQf6_.cjs +0 -6
  171. package/browser/cjs/xQ6-wbTw5UzZUM1Y.cjs +0 -1
  172. package/browser/esm/Bu64BYvRAlVftMr1.mjs +0 -67
  173. package/browser/esm/CWt4fDYEbj2hvsl_.mjs +0 -3346
  174. package/browser/esm/Ccnxz-y2WBEgfvvh.mjs +0 -6498
  175. package/browser/esm/Dx64JMAGwNNDBkC1.mjs +0 -4928
  176. package/browser/esm/Sv4twwEJDb9dZ91h.mjs +0 -149
  177. package/node/esm/BPn5XBizKkwaUqXB.mjs +0 -4285
  178. package/node/esm/BVV11IlqF6Lmlv8D.mjs +0 -154
  179. package/node/esm/BiJEEgltJzx94zIR.mjs +0 -3433
  180. package/node/esm/CkmZuMvRTpva7eQu.mjs +0 -5074
  181. package/node/esm/j0RE2usgdljRw_gr.mjs +0 -2345
  182. package/types/src/legacyChart/OOXMLMappings.d.ts +0 -8
  183. package/types/src/legacyChart/OOXMLUtils.d.ts +0 -78
  184. package/types/src/legacyChart/ToOOXMLConverter.d.ts +0 -30
  185. package/types/src/reader/domVisitors/AxisVisitor.d.ts +0 -12
  186. package/types/src/reader/domVisitors/BarChartTypeVisitor.d.ts +0 -6
  187. package/types/src/reader/domVisitors/ChartSpaceVisitor.d.ts +0 -6
  188. package/types/src/reader/domVisitors/ChartTypeVisitor.d.ts +0 -7
  189. package/types/src/reader/domVisitors/ChartVisitor.d.ts +0 -7
  190. package/types/src/reader/domVisitors/DataLabelsVisitor.d.ts +0 -8
  191. package/types/src/reader/domVisitors/DataPointVisitor.d.ts +0 -6
  192. package/types/src/reader/domVisitors/LayoutVisitor.d.ts +0 -5
  193. package/types/src/reader/domVisitors/LegendEntryVisitor.d.ts +0 -5
  194. package/types/src/reader/domVisitors/LegendVisitor.d.ts +0 -5
  195. package/types/src/reader/domVisitors/MarkerVisitor.d.ts +0 -5
  196. package/types/src/reader/domVisitors/NegativeShapeVisitor.d.ts +0 -6
  197. package/types/src/reader/domVisitors/PlotAreaVisitor.d.ts +0 -5
  198. package/types/src/reader/domVisitors/RichValueDataVisitor.d.ts +0 -7
  199. package/types/src/reader/domVisitors/RichValueStructureVisitor.d.ts +0 -6
  200. package/types/src/reader/domVisitors/SeriesVisitor.d.ts +0 -8
  201. package/types/src/reader/domVisitors/TitleVisitor.d.ts +0 -9
  202. package/types/src/writer/emitters/ChartColorsEmitter.d.ts +0 -7
  203. package/types/src/writer/emitters/ChartEmitter.d.ts +0 -14
  204. package/types/src/writer/emitters/ChartStyleEmitter.d.ts +0 -46
  205. package/types/src/writer/utils/HiddenFormulaXfs.d.ts +0 -28
@@ -1,4 +1,4 @@
1
- import { IResourceCollection, IMovable, ISheet } from '@sheetxl/sdk';
1
+ import { IResourceCollection, IMovable, IWorksheet } from '@sheetxl/sdk';
2
2
  import { Emitter, EmitContext } from '../builder';
3
3
  export declare class DrawingEmitter extends Emitter<ModelHandle> {
4
4
  constructor();
@@ -6,7 +6,7 @@ export declare class DrawingEmitter extends Emitter<ModelHandle> {
6
6
  emit(handle: ModelHandle, ctx: EmitContext): Promise<void>;
7
7
  }
8
8
  type ModelHandle = {
9
- sheet: ISheet;
9
+ sheet: IWorksheet;
10
10
  movables?: IMovable[];
11
11
  jsonMovables?: IMovable.JSON[];
12
12
  resources: IResourceCollection;
@@ -1,16 +1,5 @@
1
1
  import { IExternalBook } from '@sheetxl/sdk';
2
2
  import { Emitter, EmitContext } from '../builder';
3
- /**
4
- * Emits one `xl/externalLinks/externalLinkN.xml` — the cached snapshot of another workbook that
5
- * `[n]` in a formula addresses. See `DESIGN-EXTERNAL-LINKS.md` §5 phase A.
6
- *
7
- * @remarks
8
- * The part is scheduled by `WorkbookEmitter`, which owns the `[n]` order and therefore the path
9
- * numbering; this emitter only writes what one {@link IExternalBook.JSON} says.
10
- *
11
- * DDE and OLE links never reach here — they are not modeled at all, and their bytes are carried
12
- * through the package instead (design doc §2.1).
13
- */
14
3
  export declare class ExternalLinkEmitter extends Emitter<IExternalBook.JSON> {
15
4
  constructor();
16
5
  /** @inheritdoc IEmitter.emit */
@@ -0,0 +1,8 @@
1
+ import { Emitter, EmitContext } from '../builder';
2
+ import { CellControlComplements } from '../utils/CellControlComplements';
3
+ export declare class FeaturePropertyBagEmitter extends Emitter<CellControlComplements> {
4
+ constructor();
5
+ /** @inheritdoc IEmitter.emit */
6
+ emit(controlComplements: CellControlComplements, ctx: EmitContext): void;
7
+ }
8
+ //# sourceMappingURL=FeaturePropertyBagEmitter.d.ts.map
@@ -1,7 +1,7 @@
1
- import { ISheet } from '@sheetxl/sdk';
1
+ import { IWorksheet } from '@sheetxl/sdk';
2
2
  import { Emitter, EmitContext } from '../builder';
3
3
  /**
4
- * Writes a sheet's legacy drawing ({@link ISheet.JSON.legacyDrawing}) back out as the VML part it
4
+ * Writes a sheet's legacy drawing ({@link IWorksheet.JSON.legacyDrawing}) back out as the VML part it
5
5
  * was read from.
6
6
  *
7
7
  * @remarks
@@ -10,9 +10,9 @@ import { Emitter, EmitContext } from '../builder';
10
10
  * Its images do have models, and are written from those: the part carries the relationship ids the
11
11
  * markup cites, so an image lands back under the id its `<v:imagedata>` names.
12
12
  */
13
- export declare class LegacyDrawingEmitter extends Emitter<ISheet.LegacyDrawingJSON> {
13
+ export declare class LegacyDrawingEmitter extends Emitter<IWorksheet.LegacyDrawingJSON> {
14
14
  constructor();
15
15
  /** @inheritdoc IEmitter.emit */
16
- emit(legacyDrawing: ISheet.LegacyDrawingJSON, ctx: EmitContext): Promise<void>;
16
+ emit(legacyDrawing: IWorksheet.LegacyDrawingJSON, ctx: EmitContext): Promise<void>;
17
17
  }
18
18
  //# sourceMappingURL=LegacyDrawingEmitter.d.ts.map
@@ -1,5 +1,6 @@
1
1
  import { IPivotTable } from '@sheetxl/sdk';
2
2
  import { Emitter, EmitContext } from '../builder';
3
+ import { PivotStylesWrite } from '../../pivot/PivotFormats';
3
4
  /** The relationship a pivot table has to the cache it summarizes. */
4
5
  export declare const REL_TYPE_PIVOT_CACHE_DEFINITION = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheDefinition";
5
6
  /**
@@ -8,6 +9,8 @@ export declare const REL_TYPE_PIVOT_CACHE_DEFINITION = "http://schemas.openxmlfo
8
9
  * {@link writePivotCaches}.
9
10
  */
10
11
  export declare const SHARED_STATE_PIVOT_CACHE_PATHS = "pivotCachePaths";
12
+ /** The `pivotCacheId` the cache with this id was written with, for a pivot slicer's items; `null` if none. */
13
+ export declare const slicerPivotCacheIdOf: (ctx: EmitContext, cacheId: number) => string | null;
11
14
  /**
12
15
  * Writes a sheet's {@link IPivotTable | pivot table} back out as the part it was read from.
13
16
  *
@@ -27,18 +30,44 @@ export declare class PivotTableEmitter extends Emitter<IPivotTable.JSON> {
27
30
  /** @inheritdoc IEmitter.emit */
28
31
  emit(pivotTable: IPivotTable.JSON, ctx: EmitContext): Promise<void>;
29
32
  }
33
+ /**
34
+ * The sheet's pivot rules as written: each rule's key (`IConditionalFormat.JSON.pivotKey`, its
35
+ * priority as read) to the priority it was written with.
36
+ */
37
+ export type PivotConditionalKeys = Map<number, number>;
38
+ /**
39
+ * `xml` with each `<conditionalFormat priority>` of the table restated as the priority its sheet
40
+ * rule was written with, and one whose rule was not written removed.
41
+ *
42
+ * @remarks
43
+ * The table names its conditional formats by the sheet-wide `<cfRule priority>`, and the writer
44
+ * renumbers those 1..N. A table entry that names no pivot rule, or a rule that is not the table's,
45
+ * is a file Excel opens only through repair (`pivot-probes/probe-pivot-cf.ps1`, 2026-10-24).
46
+ */
47
+ export declare const remapConditionalFormats: (xml: string, keys: PivotConditionalKeys) => string;
48
+ /**
49
+ * The save's ids for the formats a pivot part cites: number formats from the styles laid out
50
+ * before any part emits ({@link STYLES_LAYOUT_SHARED_STATE}), differential formats added to the
51
+ * dxfs the worksheets collect.
52
+ */
53
+ export declare const pivotStylesWriteOf: (ctx: EmitContext) => PivotStylesWrite;
30
54
  /** Where the workbook wrote the cache with this id, or `null` if it wrote none. */
31
55
  export declare const cachePathFor: (ctx: EmitContext, cacheId: number) => string | null;
32
56
  /**
33
57
  * Adds the workbook's pivot caches to the package, each with the records part its definition
34
58
  * references, and leaves where each landed in the shared states for the tables to find.
35
59
  *
60
+ * A cache is written as the part it was read from while it has one (it is unchanged since load),
61
+ * its source restated where the engine moved it, and from its model otherwise.
62
+ *
36
63
  * @remarks
37
64
  * Called by `WorkbookEmitter` **before** it schedules the sheets, since a table's relationship to
38
65
  * its cache needs the cache's path to exist by the time the sheet's part emits; the `<pivotCaches>`
39
66
  * element itself is written later, where `CT_Workbook` puts it, from the ids returned here.
67
+ *
68
+ * @param slicerCacheIds The caches pivot slicers index: each is written with a `pivotCacheId`.
40
69
  */
41
- export declare const writePivotCaches: (ctx: EmitContext, pivotCaches: readonly IPivotTable.CacheJSON[] | undefined) => Promise<{
70
+ export declare const writePivotCaches: (ctx: EmitContext, pivotCaches: readonly IPivotTable.CacheJSON[] | undefined, date1904?: boolean, slicerCacheIds?: ReadonlySet<number>) => Promise<{
42
71
  cacheId: number;
43
72
  relId: string;
44
73
  }[]>;
@@ -1,7 +1,12 @@
1
+ import { IWorkbook } from '@sheetxl/sdk';
1
2
  import { Emitter, EmitContext } from '../builder';
2
- export declare class PropsCoreEmitter extends Emitter<Map<any, string>> {
3
+ export declare class PropsCoreEmitter extends Emitter<ModelHandle> {
3
4
  constructor();
4
5
  /** @inheritdoc IEmitter.emit */
5
- emit(props: Map<any, string>, ctx: EmitContext): Promise<void>;
6
+ emit(handle: ModelHandle, ctx: EmitContext): Promise<void>;
6
7
  }
8
+ type ModelHandle = {
9
+ model: IWorkbook;
10
+ };
11
+ export {};
7
12
  //# sourceMappingURL=PropsCoreEmitter.d.ts.map
@@ -0,0 +1,15 @@
1
+ import { IWorkbook } from '@sheetxl/sdk';
2
+ import { Emitter, EmitContext } from '../builder';
3
+ /**
4
+ * `docProps/custom.xml`: the workbook's custom document properties. Added only when there are some.
5
+ */
6
+ export declare class PropsCustomEmitter extends Emitter<ModelHandle> {
7
+ constructor();
8
+ /** @inheritdoc IEmitter.emit */
9
+ emit(handle: ModelHandle, ctx: EmitContext): Promise<void>;
10
+ }
11
+ type ModelHandle = {
12
+ model: IWorkbook;
13
+ };
14
+ export {};
15
+ //# sourceMappingURL=PropsCustomEmitter.d.ts.map
@@ -0,0 +1,36 @@
1
+ import { Emitter, EmitContext } from '../builder';
2
+ import { RichValueCollector } from '../utils/RichValueCollector';
3
+ /**
4
+ * Emits `rdarray.xml`: the arrays rich values hold (`_array`), each `<a r>` its items row major.
5
+ */
6
+ export declare class RichValueArrayEmitter extends Emitter<RichValueCollector> {
7
+ constructor();
8
+ /** @inheritdoc IEmitter.emit */
9
+ emit(rvCollector: RichValueCollector, ctx: EmitContext): Promise<void>;
10
+ }
11
+ /**
12
+ * Emits `rdsupportingpropertybagstructure.xml`: one `<s>` per supporting property bag structure.
13
+ */
14
+ export declare class RichValueBagStructureEmitter extends Emitter<RichValueCollector> {
15
+ constructor();
16
+ /** @inheritdoc IEmitter.emit */
17
+ emit(rvCollector: RichValueCollector, ctx: EmitContext): Promise<void>;
18
+ }
19
+ /**
20
+ * Emits `rdsupportingpropertybag.xml`: the bag arrays (`spbArrays`) and the bags (`spbData`).
21
+ */
22
+ export declare class RichValueBagEmitter extends Emitter<RichValueCollector> {
23
+ constructor();
24
+ /** @inheritdoc IEmitter.emit */
25
+ emit(rvCollector: RichValueCollector, ctx: EmitContext): Promise<void>;
26
+ }
27
+ /**
28
+ * Emits `richStyles.xml`: the styles a `_Format` bag names by 1-based index, each its number
29
+ * format and its card role (`IsTitleField`, `IsHeroField`).
30
+ */
31
+ export declare class RichValueStylesEmitter extends Emitter<RichValueCollector> {
32
+ constructor();
33
+ /** @inheritdoc IEmitter.emit */
34
+ emit(rvCollector: RichValueCollector, ctx: EmitContext): Promise<void>;
35
+ }
36
+ //# sourceMappingURL=RichValuePartsEmitters.d.ts.map
@@ -0,0 +1,12 @@
1
+ import { IResource } from '@sheetxl/sdk';
2
+ import { Emitter, EmitContext } from '../builder';
3
+ /**
4
+ * Emits `richValueRel.xml`: for each picture a `_localImage` value names, a relationship to its
5
+ * media part, in `_rvRel:LocalImageIdentifier` order.
6
+ */
7
+ export declare class RichValueRelEmitter extends Emitter<readonly IResource[]> {
8
+ constructor();
9
+ /** @inheritdoc IEmitter.emit */
10
+ emit(resources: readonly IResource[], ctx: EmitContext): Promise<void>;
11
+ }
12
+ //# sourceMappingURL=RichValueRelEmitter.d.ts.map
@@ -1,8 +1,9 @@
1
1
  import { Emitter, EmitContext } from '../builder';
2
- import { RichValueCollector, RichPrimitiveType } from '../utils/RichValueCollector';
2
+ import { RichPrimitiveType } from '../../richValue';
3
+ import { RichValueCollector } from '../utils/RichValueCollector';
3
4
  /**
4
- * Emits `rdrichvaluestructure.xml` — one `<s>` element per unique handler
5
- * type registered in the {@link RichValueCollector}.
5
+ * Emits `rdrichvaluestructure.xml` — one `<s>` element per structure written
6
+ * in the {@link RichValueCollector}.
6
7
  *
7
8
  * @remarks
8
9
  * Example output for a workbook that only has extended-error rich values:
@@ -1,10 +1,11 @@
1
1
  import { Emitter, EmitContext } from '../builder';
2
+ import { RichValueCollector } from '../utils/RichValueCollector';
2
3
  /**
3
4
  * Emits Rich Values
4
5
  */
5
- export declare class RichValueTypesEmitter extends Emitter<Map<any, string>> {
6
+ export declare class RichValueTypesEmitter extends Emitter<RichValueCollector | null> {
6
7
  constructor();
7
8
  /** @inheritdoc IEmitter.emit */
8
- emit(_params: any, ctx: EmitContext): Promise<void>;
9
+ emit(rvCollector: RichValueCollector | null, ctx: EmitContext): Promise<void>;
9
10
  }
10
11
  //# sourceMappingURL=RichValueTypesEmitter.d.ts.map
@@ -0,0 +1,24 @@
1
+ import { IWorkbook } from '@sheetxl/sdk';
2
+ import { WrittenWebImage } from '../../richValue/WebImageRichValueHandler';
3
+ import { Emitter, EmitContext } from '../builder';
4
+ /** What {@link RichValueWebImageEmitter} writes: the pictures, and the workbook to fetch any without bytes through. */
5
+ export interface RichValueWebImages {
6
+ /** The pictures, in `WebImageIdentifier` order. */
7
+ images: readonly WrittenWebImage[];
8
+ workbook: IWorkbook;
9
+ }
10
+ /**
11
+ * Emits `rdRichValueWebImage.xml`: for each picture a `_webimage` value names, its source URL
12
+ * (`address`, an external hyperlink) and the picture itself (`blip`, a media part), as Excel keeps
13
+ * an `IMAGE`'s picture in the file.
14
+ *
15
+ * @remarks
16
+ * The picture is the value's resource; a value with none is fetched through the workbook, and a
17
+ * source with no picture to give is written with its address alone.
18
+ */
19
+ export declare class RichValueWebImageEmitter extends Emitter<RichValueWebImages> {
20
+ constructor();
21
+ /** @inheritdoc IEmitter.emit */
22
+ emit(webImages: RichValueWebImages, ctx: EmitContext): Promise<void>;
23
+ }
24
+ //# sourceMappingURL=RichValueWebImageEmitter.d.ts.map
@@ -1,4 +1,4 @@
1
- import { IStringCollection } from '@sheetxl/sdk';
1
+ import { ITheme, RichText } from '@sheetxl/sdk';
2
2
  import { Emitter, EmitContext } from '../builder';
3
3
  export declare class SharedStringsEmitter extends Emitter<ModelHandle> {
4
4
  constructor();
@@ -6,8 +6,11 @@ export declare class SharedStringsEmitter extends Emitter<ModelHandle> {
6
6
  emit(sharedStrings: ModelHandle, ctx: EmitContext): Promise<void>;
7
7
  }
8
8
  type ModelHandle = {
9
- json: string[];
10
- model: IStringCollection;
9
+ /** The strings, a `RichText` for one with runs. */
10
+ json: (string | RichText)[];
11
+ model: (string | RichText)[];
12
+ /** The workbook theme, for a run's theme color. */
13
+ theme?: ITheme;
11
14
  };
12
15
  export {};
13
16
  //# sourceMappingURL=SharedStringsEmitter.d.ts.map
@@ -0,0 +1,132 @@
1
+ import { ISheet, IWorksheet, ISlicer, IWorkbook } from '@sheetxl/sdk';
2
+ import { Emitter, EmitContext, IXmlWriter } from '../builder';
3
+ /** The relationship a sheet has to its slicer part. */
4
+ export declare const REL_TYPE_SLICER = "http://schemas.microsoft.com/office/2007/relationships/slicer";
5
+ /** The relationship the workbook has to each slicer cache part. */
6
+ export declare const REL_TYPE_SLICER_CACHE = "http://schemas.microsoft.com/office/2007/relationships/slicerCache";
7
+ /** The relationship a sheet has to its timeline part. */
8
+ export declare const REL_TYPE_TIMELINE = "http://schemas.microsoft.com/office/2011/relationships/timeline";
9
+ /** The relationship the workbook has to each timeline cache part. */
10
+ export declare const REL_TYPE_TIMELINE_CACHE = "http://schemas.microsoft.com/office/2011/relationships/timelineCache";
11
+ /**
12
+ * A sheet's slicer part: the table slicers, the pivot slicers, or the timelines placed on the
13
+ * sheet, in their movable order. Excel cites each kind from its own list, so each has its own part.
14
+ */
15
+ export interface SlicersPartHandle {
16
+ sheet: IWorksheet;
17
+ slicers: ISlicer[];
18
+ }
19
+ /** A slicer on pivot tables (read from a file): its pivot tables and cache as carried. */
20
+ export declare const pivotOf: (slicer: ISlicer) => ISlicer.PivotJSON | null;
21
+ /** Whether a slicer is a timeline: a slicer on pivot tables whose items are dates. */
22
+ export declare const isTimeline: (slicer: ISlicer) => boolean;
23
+ /**
24
+ * The slicers placed on a sheet that can be written, in movable order: a table slicer whose
25
+ * source names a live table, and every pivot slicer, which Excel keeps when its pivot tables are
26
+ * gone. A table slicer that names none has no column to filter and no cache to write, so it is not
27
+ * written.
28
+ */
29
+ export declare const collectSheetSlicers: (sheet: IWorksheet) => ISlicer[];
30
+ /**
31
+ * Writes a sheet's slicer part, `xl/slicers/slicerN.xml`: one `slicer` per slicer of the handle,
32
+ * as Excel writes them, each naming the cache the workbook writes for it.
33
+ *
34
+ * @remarks
35
+ * Scheduled from `WorksheetEmitter`, which cites the part from one of the sheet's slicer-list exts.
36
+ * Only what differs from a default is written beside the name, cache and caption; the row height
37
+ * always, in EMU, as Excel does.
38
+ */
39
+ export declare class SlicersEmitter extends Emitter<SlicersPartHandle> {
40
+ constructor();
41
+ /** @inheritdoc IEmitter.emit */
42
+ emit(handle: SlicersPartHandle, ctx: EmitContext): Promise<void>;
43
+ }
44
+ /**
45
+ * Writes one slicer's cache part, `xl/slicerCaches/slicerCacheN.xml`: its name, the column's name
46
+ * as `sourceName`, and the `x15:tableSlicerCache` ext naming the table by the id `TableEmitter`
47
+ * wrote it with and the column by its 1-based index.
48
+ *
49
+ * @remarks
50
+ * Scheduled from `WorkbookEmitter` once every sheet has been written and so every table has its
51
+ * id. The sort order, custom-list sort and cross filter are written only when not Excel's defaults.
52
+ */
53
+ export declare class SlicerCacheEmitter extends Emitter<ISlicer> {
54
+ constructor();
55
+ /** @inheritdoc IEmitter.emit */
56
+ emit(slicer: ISlicer, ctx: EmitContext): Promise<void>;
57
+ /**
58
+ * A pivot slicer's cache: its pivot tables, then its items. A slicer on worksheet pivot tables
59
+ * writes every item of its field once, in its order, selected as the first pivot table shows it
60
+ * (`pivot-probes/probe-pivot-slicer-edits.ps1`); a data-model slicer's are written as read.
61
+ */
62
+ emitPivot(slicer: ISlicer, pivot: ISlicer.PivotJSON, ctx: EmitContext): void;
63
+ }
64
+ /**
65
+ * The pivot caches the workbook's slicers on worksheet pivot tables index: each is written with a
66
+ * `pivotCacheId` for the slicer to name it by.
67
+ */
68
+ export declare const pivotSlicerCacheIdsOf: (workbook: IWorkbook) => Set<number>;
69
+ /**
70
+ * Writes a sheet's timeline part, `xl/timelines/timelineN.xml`: one `timeline` per timeline of the
71
+ * handle, its name, cache and caption from the slicer and everything else as read.
72
+ */
73
+ export declare class TimelinesEmitter extends Emitter<SlicersPartHandle> {
74
+ constructor();
75
+ /** @inheritdoc IEmitter.emit */
76
+ emit(handle: SlicersPartHandle, ctx: EmitContext): Promise<void>;
77
+ }
78
+ /**
79
+ * Writes one timeline's cache part, `xl/timelineCaches/timelineCacheN.xml`: its name, source name
80
+ * and pivot tables, then its state as read.
81
+ */
82
+ export declare class TimelineCacheEmitter extends Emitter<ISlicer> {
83
+ constructor();
84
+ /** @inheritdoc IEmitter.emit */
85
+ emit(slicer: ISlicer, ctx: EmitContext): Promise<void>;
86
+ }
87
+ /** Shared-states key under which `WorkbookEmitter` leaves the `sheetId` each sheet is written with. */
88
+ export declare const SHARED_STATE_SHEET_IDS = "sheetIdsBySheet";
89
+ /** The `sheetId` each sheet is written with; a pivot slicer's cache names its pivot table's sheet by it. */
90
+ export declare const sheetIdsOf: (ctx: EmitContext) => Map<ISheet, number>;
91
+ /** The relationships to the slicer caches written, by the list the workbook cites each kind from. */
92
+ export interface SlicerCacheRelIds {
93
+ /** Table slicers' caches, cited from `x15:slicerCaches`. */
94
+ table: string[];
95
+ /** Pivot slicers' caches, cited from `x14:slicerCaches`. */
96
+ pivot: string[];
97
+ /** Timelines' caches, cited from `x15:timelineCacheRefs`. */
98
+ timeline: string[];
99
+ /** The names of the slicer caches written, table and pivot; each needs a workbook name. */
100
+ cacheNames: string[];
101
+ }
102
+ /**
103
+ * Schedules a cache part for every slicer of the workbook, in sheet order and then movable order,
104
+ * and returns the relationship ids the workbook cites them by and the slicer caches' names.
105
+ *
106
+ * @remarks
107
+ * Called by `WorkbookEmitter` **after** the sheets have been written, since a cache names its table
108
+ * by the id the sheet minted when it scheduled the table part. A table slicer whose table was not
109
+ * scheduled is left out, with its slicer element still in the sheet's part; Excel repairs that
110
+ * rather than refuse the file.
111
+ */
112
+ export declare const writeSlicerCaches: (ctx: EmitContext, workbook: IWorkbook) => SlicerCacheRelIds;
113
+ /**
114
+ * The sheet's slicer-list exts: schedules a slicer part for the sheet's pivot slicers, one for its
115
+ * table slicers and a timeline part for its timelines, and cites each from the list Excel reads it
116
+ * from: pivot slicers from the `x14` list, table slicers from the `x15` one, timelines from
117
+ * `x15:timelineRefs`. Written inside the worksheet's `extLst`, after the conditional formats and
118
+ * data validations, where Excel puts them.
119
+ */
120
+ export declare const writeSlicerListExt: (ctx: EmitContext, xml: IXmlWriter, handle: SlicersPartHandle) => void;
121
+ /** The workbook's `x15:timelineCacheRefs` ext: one `x15:timelineCacheRef` per timeline cache written. */
122
+ export declare const writeTimelineCacheRefsExt: (xml: IXmlWriter, relIds: readonly string[]) => void;
123
+ /**
124
+ * The workbook's `x14:slicerCaches` ext: one `x14:slicerCache` per pivot slicer cache written.
125
+ */
126
+ export declare const writePivotSlicerCachesExt: (xml: IXmlWriter, relIds: readonly string[]) => void;
127
+ /**
128
+ * The workbook's `x15:slicerCaches` ext: one `x14:slicerCache` per table slicer cache written.
129
+ * Written inside the workbook's `extLst`, before the calc features, where Excel puts it.
130
+ */
131
+ export declare const writeSlicerCachesExt: (xml: IXmlWriter, relIds: readonly string[]) => void;
132
+ //# sourceMappingURL=SlicerEmitter.d.ts.map
@@ -1,4 +1,4 @@
1
- import { IStyle, ITheme, IStyleCollection } from '@sheetxl/sdk';
1
+ import { ICellStyle, IFill, ITheme, IStyleCollection, IFontStyle, IBorders } from '@sheetxl/sdk';
2
2
  import { Emitter, IXmlWriter, EmitContext } from '../builder';
3
3
  /**
4
4
  * Emits the styles.xml part.
@@ -8,6 +8,27 @@ export declare class StylesEmitter extends Emitter<ModelHandle> {
8
8
  /** @inheritdoc IEmitter.emit */
9
9
  emit(handle: ModelHandle, ctx: EmitContext): Promise<void>;
10
10
  }
11
+ /** Shared-states key under which `WorkbookEmitter` leaves the save's {@link StylesLayout}. */
12
+ export declare const STYLES_LAYOUT_SHARED_STATE = "stylesLayout";
13
+ /**
14
+ * The save's styles as the styles part writes them: the direct xfs and the indexes into its
15
+ * fonts, fills, borders and number formats. Laid out once, before any part that cites a number
16
+ * format by id, so that id is final when that part is written.
17
+ */
18
+ export interface StylesLayout {
19
+ readonly styles: IStyleCollection;
20
+ readonly directXfs: ICellStyle.JSON[];
21
+ readonly denormalized: DenormalizedStyles;
22
+ }
23
+ /** Lays out the save's styles ({@link StylesLayout}). */
24
+ export declare const layOutStyles: (styles: IStyleCollection, json: IStyleCollection.JSON) => StylesLayout;
25
+ /**
26
+ * The `numFmtId` a number format is written with: a built-in's own id, or the custom id this
27
+ * save gives its code, added to the styles part's `<numFmts>` when no cell uses it.
28
+ */
29
+ export declare const numFmtIdOf: (layout: StylesLayout, format: string | number) => number;
30
+ /** The namespace of the feature property bags and the xf complement. */
31
+ export declare const NS_FEATURE_PROPERTY_BAG = "http://schemas.microsoft.com/office/spreadsheetml/2022/featurepropertybag";
11
32
  /**
12
33
  * Writes ONE differential format.
13
34
  *
@@ -18,7 +39,19 @@ export declare class StylesEmitter extends Emitter<ModelHandle> {
18
39
  *
19
40
  * @returns `numFmtId`, advanced if this dxf consumed one.
20
41
  */
21
- export declare function writeDxf(ctx: EmitContext, xml: IXmlWriter, dxf: IStyle.Properties, styles: IStyleCollection, theme: ITheme, tag?: string, numFmtId?: number): number;
42
+ export declare function writeDxf(ctx: EmitContext, xml: IXmlWriter, dxf: ICellStyle.Properties, styles: IStyleCollection, theme: ITheme, tag?: string, numFmtId?: number): number;
43
+ export interface DenormalizedStyles {
44
+ fontMap: Map<string, string>;
45
+ fonts: IFontStyle.Properties[];
46
+ fillMap: Map<string, string>;
47
+ fills: (IFill.NoneProperties | IFill.SolidProperties | IFill.PatternProperties | IFill.GradientProperties)[];
48
+ borderMap: Map<string, string>;
49
+ borders: IBorders.Properties[];
50
+ numFmtMap: Map<string | number, string>;
51
+ numFmtsCustom: string[];
52
+ namedStyleMap: Map<string, string>;
53
+ namedStyles: ICellStyle.NamedJSON[];
54
+ }
22
55
  type ModelHandle = {
23
56
  json: IStyleCollection.JSON;
24
57
  styles: IStyleCollection;
@@ -1,5 +1,19 @@
1
1
  import { ITable, IRange } from '@sheetxl/sdk';
2
2
  import { Emitter, EmitContext } from '../builder';
3
+ /**
4
+ * Shared-states key under which the `table/@id` each table is written with is left, by table, for
5
+ * whatever names a table by that id (a slicer cache's `tableSlicerCache`).
6
+ *
7
+ * @remarks
8
+ * The id is minted when the sheet schedules the table part ({@link mintTableId}), not when the
9
+ * part emits: the workbook writes the slicer caches once every sheet has emitted, and a sheet's
10
+ * children may still be queued then.
11
+ */
12
+ export declare const SHARED_STATE_TABLE_IDS = "tableIds";
13
+ /** The ids the tables are written with, by table. */
14
+ export declare const tableIdsOf: (ctx: EmitContext) => Map<ITable, number>;
15
+ /** The `table/@id` a table is written with: unique in the package, minted once per table. */
16
+ export declare const mintTableId: (ctx: EmitContext, table: ITable) => number;
3
17
  export declare class TableEmitter extends Emitter<ModelHandle> {
4
18
  constructor();
5
19
  /** @inheritdoc IEmitter.emit */
@@ -9,13 +9,35 @@ export declare class WorkbookEmitter extends Emitter<IWorkbook> {
9
9
  export declare const SHARED_STATE_FILE_VERSION = "fileVersion";
10
10
  /** Shared-states key under which `XLSXWriter` leaves the source's `calcPr@calcId`, verbatim. */
11
11
  export declare const SHARED_STATE_CALC_ID = "calcId";
12
- /** Shared-states key under which `XLSXWriter` leaves the source's `xcalcf:calcFeatures` `<ext>`, verbatim. */
13
- export declare const SHARED_STATE_CALC_FEATURES = "calcFeatures";
12
+ /** One `<ext>` of the source workbook's `<extLst>`, as `XLSXWriter` reads it from the retained bytes. */
13
+ export interface SourceWorkbookExt {
14
+ /** The `uri` attribute, as written. */
15
+ readonly uri: string;
16
+ /** The whole `<ext>` element, verbatim. */
17
+ readonly xml: string;
18
+ /**
19
+ * The source relationship behind each `r:id` the element cites, once per id. `target` is the
20
+ * resolved part path (or URL, when `external`), `null` when the source's rels do not define the id.
21
+ */
22
+ readonly rels: readonly {
23
+ id: string;
24
+ type: string;
25
+ target: string | null;
26
+ external: boolean;
27
+ }[];
28
+ }
29
+ /** Shared-states key under which `XLSXWriter` leaves the source's workbook `<ext>` elements, as {@link SourceWorkbookExt}s. */
30
+ export declare const SHARED_STATE_WORKBOOK_EXTS = "workbookExts";
14
31
  /**
15
32
  * Shared-states key under which `XLSXWriter` leaves the source package's worksheet part path per
16
33
  * `sheetId`. See {@link resolveSheetPaths}.
17
34
  */
18
35
  export declare const SHARED_STATE_SHEET_PARTS = "sheetParts";
36
+ /**
37
+ * Shared-states key under which `XLSXWriter` leaves whether the package being written can hold
38
+ * macros. See {@link writeOpaqueSheet}.
39
+ */
40
+ export declare const SHARED_STATE_MACRO_ENABLED = "macroEnabled";
19
41
  /**
20
42
  * Shared-states key under which `XLSXWriter` leaves the source package's external-link part paths,
21
43
  * in `[n]` order. See {@link writeExternalReferences}.
@@ -1,5 +1,6 @@
1
- import { ISheet } from '@sheetxl/sdk';
1
+ import { IWorksheet } from '@sheetxl/sdk';
2
2
  import { Emitter, EmitContext } from '../builder';
3
+ import { XlsxWorksheetJSON } from '../utils/SheetStyleLayout';
3
4
  export declare const WorksheetKind = "worksheet";
4
5
  /**
5
6
  * Emits the worksheet.xml part.
@@ -10,9 +11,9 @@ export declare class WorksheetEmitter extends Emitter<ModelHandle> {
10
11
  emit(handle: ModelHandle, ctx: EmitContext): Promise<void>;
11
12
  }
12
13
  type ModelHandle = {
13
- model: ISheet;
14
+ model: IWorksheet;
14
15
  isSelected: boolean;
15
- json: ISheet.JSON;
16
+ json: XlsxWorksheetJSON;
16
17
  };
17
18
  export {};
18
19
  //# sourceMappingURL=WorksheetEmitter.d.ts.map
@@ -1,6 +1,6 @@
1
- import { ICondition, IRange, ITable, ISort, ICellRange } from '@sheetxl/sdk';
1
+ import { ICondition, IRange, ITable, ISort, ICellRange, IFilter } from '@sheetxl/sdk';
2
2
  import { EmitContext, IXmlWriter } from '../builder';
3
- export declare const writeSortState: (ctx: EmitContext, xml: IXmlWriter, model: ITable, json: ISort.JSON, range: ICellRange, coords: IRange.Coords) => void;
3
+ export declare const writeSortState: (ctx: EmitContext, xml: IXmlWriter, model: ITable, json: ISort.JSON, range: ICellRange, coords: IRange.Coords, headerRows: number) => void;
4
4
  export declare const writeAutoFilter: (ctx: EmitContext, xml: IXmlWriter, model: ITable, json: ITable.JSON, isAutoTable?: boolean) => void;
5
5
  /** Writes one `customFilter`, taking its OOXML spelling from the border. */
6
6
  export declare const writeCustomFilter: (ctx: EmitContext, xml: IXmlWriter, condition: ICondition.JSON) => void;
@@ -12,5 +12,5 @@ export declare const writeCustomFilter: (ctx: EmitContext, xml: IXmlWriter, cond
12
12
  * TODO - Ensure we only write out valid OOXML support conditions
13
13
  * TODO - What to do with custom validations?
14
14
  */
15
- export declare const writeFilter: (ctx: EmitContext, xml: IXmlWriter, condition: ICondition.JSON) => void;
15
+ export declare const writeFilter: (ctx: EmitContext, xml: IXmlWriter, condition: ICondition.JSON, filter?: IFilter | null) => void;
16
16
  //# sourceMappingURL=AutoFilter.d.ts.map
@@ -0,0 +1,29 @@
1
+ import { ICellControl } from '@sheetxl/sdk';
2
+ export declare const CELL_CONTROL_COMPLEMENTS_SHARED_STATE = "cellControlComplements";
3
+ /**
4
+ * The cell controls a workbook's xfs carry.
5
+ *
6
+ * @remarks
7
+ * The model keeps a cell control apart from the cell's style (`ICellControl`); xlsx keeps it on the
8
+ * cell's xf as an `xfComplement`. So the writer's xf is a pair, a style and a control, and the two
9
+ * meet only there: the style layout mints an xf per pair, and this records which complement each xf
10
+ * carries and which control each complement stands for (what the `featurePropertyBag` part lists).
11
+ */
12
+ export declare class CellControlComplements {
13
+ private _controls;
14
+ private _xfComplements;
15
+ /**
16
+ * The complement index for `control`, or `null` when xlsx cannot carry it.
17
+ *
18
+ * @remarks
19
+ * Only Excel's checkbox has a file form; another type is dropped (the caller warns).
20
+ */
21
+ getComplement(control: ICellControl.JSON): number | null;
22
+ /** The controls the complements stand for, by complement index. */
23
+ getControls(): readonly ICellControl.JSON[];
24
+ /** Records the complement each direct xf carries, by xf index, once the layout has minted them. */
25
+ setXfComplements(complements: readonly (number | undefined)[]): void;
26
+ /** The complement direct xf `xf` carries, or `null`. */
27
+ getXfComplement(xf: number): number | null;
28
+ }
29
+ //# sourceMappingURL=CellControlComplements.d.ts.map
@@ -0,0 +1,6 @@
1
+ import { EmitContext } from '../builder/Types';
2
+ /** Leaves the workbook's date system for every part written after it ({@link date1904Of}). */
3
+ export declare const setDate1904: (ctx: EmitContext, date1904: boolean) => void;
4
+ /** Whether the workbook being written counts dates from 1904, for a part that writes a serial. */
5
+ export declare const date1904Of: (ctx: EmitContext) => boolean;
6
+ //# sourceMappingURL=DateSystem.d.ts.map
@@ -0,0 +1,22 @@
1
+ import { ITypes } from '@sheetxl/sdk';
2
+ import { XlsxHeader, XlsxWorksheetJSON } from './SheetStyleLayout';
3
+ /** How the rows a sheet does not list are written (`sheetFormatPr`). */
4
+ export interface DefaultRows {
5
+ /** `defaultRowHeight`, in points. */
6
+ height: number;
7
+ /** `customHeight`: Excel uses `height` as is; otherwise it uses the Normal height plus the flags' pixels. */
8
+ custom: boolean;
9
+ /** `thickTop`: every row gives a pixel to a thick line above it. */
10
+ thickTop: boolean;
11
+ /** `thickBottom`: every row gives a pixel to a medium or thick line below it. */
12
+ thickBottom: boolean;
13
+ /** The row run written as the default instead of row by row, or `null` when there is none. */
14
+ run: ITypes.RunCoordValue<XlsxHeader> | null;
15
+ }
16
+ /**
17
+ * The row runs to write once `defaultRows.run` is the sheet's default: the other runs, and the rows
18
+ * no run lists, at the height they no longer get by default.
19
+ */
20
+ export declare const listedRowRuns: (rows: ITypes.RunCoordValue<XlsxHeader>[], defaultRun: ITypes.RunCoordValue<XlsxHeader>, unlistedHeight: number, maxRows: number) => ITypes.RunCoordValue<XlsxHeader>[];
21
+ export declare const resolveDefaultRows: (json: XlsxWorksheetJSON, normalHeight: number, maxRows: number) => DefaultRows | null;
22
+ //# sourceMappingURL=DefaultRows.d.ts.map