@sheetxl/io-xlsx 0.8.0-beta.2 → 0.8.0-beta.20

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 (217) hide show
  1. package/LICENSE.md +8 -7
  2. package/browser/esm/Bw35-W8cnzxxvqQy.mjs +104 -0
  3. package/browser/esm/{CMHb6pUUmsCP9r_9.mjs → C16bEh6IrUpJONhS.mjs} +3 -3
  4. package/browser/esm/CPK1-z95jtLOfCXG.mjs +2474 -0
  5. package/browser/esm/CSOuRlSN9bhykqDr.mjs +4627 -0
  6. package/browser/esm/{DhqYgh9G2vLn7mIE.mjs → D2872f7aTugYxhht.mjs} +3 -3
  7. package/browser/esm/D7ogsrtXfjU5NW7r.mjs +10312 -0
  8. package/browser/esm/D8CQKL3Y3CMFOPqD.mjs +7007 -0
  9. package/browser/esm/{CMzkLUwbgA73RvCb.mjs → DpPFQ7-tBwVyjvWr.mjs} +3 -3
  10. package/browser/esm/{IZf0hIeLYj3T0Xvu.mjs → PgUWs0pPSCSFYJtU.mjs} +194 -144
  11. package/browser/esm/RFSuXvJ9sgsaA2LC.mjs +2433 -0
  12. package/browser/esm/{_UDbQq5-pHbU1f82.mjs → S4Uq85YdUb6O5Pz0.mjs} +2 -2
  13. package/browser/esm/index.mjs +3 -4
  14. package/licenses/dependencies.txt +2 -2
  15. package/node/esm/BOAucs-qLpjtUOcZ.mjs +6957 -0
  16. package/node/esm/{CY-pSutJLHskZfXZ.mjs → BSHqfcsR9hY-JB30.mjs} +2 -2
  17. package/node/esm/{CB1ijGbhl-e2l6Mm.mjs → C6eSWtTkyDQKbQdT.mjs} +3 -3
  18. package/node/esm/{Bi_kZVtZams7taqa.mjs → CPhiu1T7tl-leKh2.mjs} +3 -3
  19. package/node/esm/D2vDZOgLcv-YiWnB.mjs +4741 -0
  20. package/node/esm/DFw0ibBUmPyd-wey.mjs +2479 -0
  21. package/node/esm/DGuQIj077oygCTGu.mjs +2562 -0
  22. package/node/esm/Qn2Bv4QG3mOLiJHh.mjs +7269 -0
  23. package/node/esm/index.mjs +65 -28
  24. package/package.json +8 -9
  25. package/types/src/AutoFilterRules.d.ts +85 -22
  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 +30 -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/CustGeomUtils.d.ts +7 -0
  80. package/types/src/reader/dom/DOMTransformer.d.ts +2 -2
  81. package/types/src/reader/domVisitors/AppPropertiesVisitor.d.ts +13 -1
  82. package/types/src/reader/domVisitors/AutoFilterVisitor.d.ts +8 -3
  83. package/types/src/reader/domVisitors/ColorContainerVisitor.d.ts +15 -2
  84. package/types/src/reader/domVisitors/CommentVisitor.d.ts +7 -2
  85. package/types/src/reader/domVisitors/DrawingCxnSpVisitor.d.ts +1 -0
  86. package/types/src/reader/domVisitors/DrawingElementVisitor.d.ts +34 -1
  87. package/types/src/reader/domVisitors/DrawingGraphicFrameVisitor.d.ts +9 -0
  88. package/types/src/reader/domVisitors/DrawingGrpSpVisitor.d.ts +14 -2
  89. package/types/src/reader/domVisitors/DrawingPicVisitor.d.ts +30 -2
  90. package/types/src/reader/domVisitors/DrawingSpVisitor.d.ts +20 -1
  91. package/types/src/reader/domVisitors/DrawingVisitor.d.ts +10 -0
  92. package/types/src/reader/domVisitors/ExternalLinkVisitor.d.ts +1 -11
  93. package/types/src/reader/domVisitors/FeaturePropertyBagVisitor.d.ts +18 -0
  94. package/types/src/reader/domVisitors/FmtSchemeVisitor.d.ts +0 -11
  95. package/types/src/reader/domVisitors/FontSchemeVisitor.d.ts +3 -2
  96. package/types/src/reader/domVisitors/FormControlPrVisitor.d.ts +9 -0
  97. package/types/src/reader/domVisitors/ObjectDefaultsVisitor.d.ts +11 -0
  98. package/types/src/reader/domVisitors/ShapeTextVisitor.d.ts +44 -0
  99. package/types/src/reader/domVisitors/SheetColorContainerVisitor.d.ts +2 -2
  100. package/types/src/reader/domVisitors/SheetStyleVisitor.d.ts +26 -5
  101. package/types/src/reader/domVisitors/SlicerCacheDefinitionVisitor.d.ts +11 -2
  102. package/types/src/reader/domVisitors/SlicersVisitor.d.ts +9 -3
  103. package/types/src/reader/domVisitors/SortStateVisitor.d.ts +2 -2
  104. package/types/src/reader/domVisitors/TextPropertiesVisitor.d.ts +13 -1
  105. package/types/src/reader/domVisitors/ThreadedCommentVisitor.d.ts +9 -0
  106. package/types/src/reader/domVisitors/ThreadedCommentsVisitor.d.ts +2 -2
  107. package/types/src/reader/domVisitors/TimelinesVisitor.d.ts +13 -0
  108. package/types/src/reader/domVisitors/WorkbookVisitor.d.ts +0 -9
  109. package/types/src/reader/domVisitors/_Dxfs.d.ts +10 -0
  110. package/types/src/reader/domVisitors/index.d.ts +10 -36
  111. package/types/src/reader/saxVisitors/ContentTypesVisitor.d.ts +1 -0
  112. package/types/src/reader/saxVisitors/SharedStringsVisitor.d.ts +31 -6
  113. package/types/src/reader/saxVisitors/WorksheetVisitor.d.ts +26 -8
  114. package/types/src/richValue/ErrorRichValueHandler.d.ts +22 -0
  115. package/types/src/richValue/IRichValueHandler.d.ts +109 -0
  116. package/types/src/richValue/LocalImageRichValueHandler.d.ts +18 -0
  117. package/types/src/richValue/RichDataParts.d.ts +69 -0
  118. package/types/src/richValue/RichRecordWriter.d.ts +61 -0
  119. package/types/src/richValue/RichValueHandlers.d.ts +25 -0
  120. package/types/src/richValue/RichValueResolver.d.ts +54 -0
  121. package/types/src/richValue/WebImageRichValueHandler.d.ts +37 -0
  122. package/types/src/richValue/index.d.ts +7 -0
  123. package/types/src/utils/DrawingMLText.d.ts +39 -0
  124. package/types/src/utils/FormControls.d.ts +170 -0
  125. package/types/src/utils/SharedNames.d.ts +13 -0
  126. package/types/src/utils/SpreadsheetFont.d.ts +38 -0
  127. package/types/src/utils/VmlNoteShapes.d.ts +88 -35
  128. package/types/src/utils/VmlNoteStyle.d.ts +25 -0
  129. package/types/src/utils/VmlPrefixes.d.ts +24 -0
  130. package/types/src/vba/VBAProject.d.ts +0 -19
  131. package/types/src/writer/EvaluationSheet.d.ts +5 -0
  132. package/types/src/writer/builder/Emitter.d.ts +5 -0
  133. package/types/src/writer/builder/OpcXmlUtils.d.ts +0 -8
  134. package/types/src/writer/builder/PackageBuilder.d.ts +4 -41
  135. package/types/src/writer/builder/Types.d.ts +28 -28
  136. package/types/src/writer/emitters/CommentsEmitter.d.ts +10 -4
  137. package/types/src/writer/emitters/DrawingEmitter.d.ts +2 -2
  138. package/types/src/writer/emitters/ExternalLinkEmitter.d.ts +0 -11
  139. package/types/src/writer/emitters/FeaturePropertyBagEmitter.d.ts +8 -0
  140. package/types/src/writer/emitters/LegacyDrawingEmitter.d.ts +4 -4
  141. package/types/src/writer/emitters/PivotTableEmitter.d.ts +30 -1
  142. package/types/src/writer/emitters/PropsCoreEmitter.d.ts +7 -2
  143. package/types/src/writer/emitters/PropsCustomEmitter.d.ts +15 -0
  144. package/types/src/writer/emitters/RichValuePartsEmitters.d.ts +36 -0
  145. package/types/src/writer/emitters/RichValueRelEmitter.d.ts +12 -0
  146. package/types/src/writer/emitters/RichValueStructureEmitter.d.ts +4 -3
  147. package/types/src/writer/emitters/RichValueTypesEmitter.d.ts +3 -2
  148. package/types/src/writer/emitters/RichValueWebImageEmitter.d.ts +24 -0
  149. package/types/src/writer/emitters/SharedStringsEmitter.d.ts +6 -3
  150. package/types/src/writer/emitters/SlicerEmitter.d.ts +132 -0
  151. package/types/src/writer/emitters/StylesEmitter.d.ts +35 -2
  152. package/types/src/writer/emitters/TableEmitter.d.ts +14 -0
  153. package/types/src/writer/emitters/ThreadedCommentsEmitter.d.ts +7 -1
  154. package/types/src/writer/emitters/WorkbookEmitter.d.ts +24 -2
  155. package/types/src/writer/emitters/WorksheetEmitter.d.ts +4 -3
  156. package/types/src/writer/utils/AutoFilter.d.ts +3 -3
  157. package/types/src/writer/utils/CellControlComplements.d.ts +29 -0
  158. package/types/src/writer/utils/CustGeomUtils.d.ts +5 -0
  159. package/types/src/writer/utils/DateSystem.d.ts +6 -0
  160. package/types/src/writer/utils/DefaultRows.d.ts +22 -0
  161. package/types/src/writer/utils/DrawMLUtils.d.ts +42 -3
  162. package/types/src/writer/utils/DummyFunction.d.ts +0 -25
  163. package/types/src/writer/utils/DxfCollector.d.ts +14 -11
  164. package/types/src/writer/utils/PrstGeomUtils.d.ts +6 -0
  165. package/types/src/writer/utils/RichValueCollector.d.ts +81 -129
  166. package/types/src/writer/utils/SheetStyleLayout.d.ts +86 -0
  167. package/types/src/writer/utils/TextUtils.d.ts +26 -2
  168. package/types/src/writer/utils/UnsupportedFunctions.d.ts +2 -2
  169. package/types/src/writer/utils/XfVariants.d.ts +61 -0
  170. package/browser/cjs/B6sirGz6w-Bm7Ofo.cjs +0 -1
  171. package/browser/cjs/B7_pDFYCVzt-3hUs.cjs +0 -1
  172. package/browser/cjs/BzOEBR0jaxXg9wvt.cjs +0 -5
  173. package/browser/cjs/C8oC1tPbhgR0Dqtx.cjs +0 -2
  174. package/browser/cjs/CIpMN7SDVREKQUQE.cjs +0 -6
  175. package/browser/cjs/Ca-xJDjg5bOpUPXX.cjs +0 -1
  176. package/browser/cjs/D3EWCPfCu-qMOIGd.cjs +0 -1
  177. package/browser/cjs/DULsYP_GcPGLVYSE.cjs +0 -11
  178. package/browser/cjs/DtBN3UOzNJjYBwJ6.cjs +0 -1
  179. package/browser/cjs/index.cjs +0 -1
  180. package/browser/cjs/sNZR19Wk-XQ2xZ9E.cjs +0 -1
  181. package/browser/cjs/xQ6-wbTw5UzZUM1Y.cjs +0 -1
  182. package/browser/esm/B9q618XELV7uWJsA.mjs +0 -67
  183. package/browser/esm/BwbMurFOptAFs7gC.mjs +0 -5214
  184. package/browser/esm/D75_rfogFUfXADKc.mjs +0 -3324
  185. package/browser/esm/DfuBawaydlvgZMR-.mjs +0 -4428
  186. package/browser/esm/DoMlKUCnMSlR2qX5.mjs +0 -159
  187. package/browser/esm/DtpWa7tZahylJ3HS.mjs +0 -2310
  188. package/node/esm/BD03jrMQ_UKA196-.mjs +0 -4535
  189. package/node/esm/BxHvzSROx_N_7nJH.mjs +0 -2356
  190. package/node/esm/CO1M1H1N6fB422K-.mjs +0 -2959
  191. package/node/esm/CWpezSa6TERGEv-B.mjs +0 -3410
  192. package/node/esm/Dezt2uIDqlxjiuk5.mjs +0 -170
  193. package/types/src/legacyChart/OOXMLMappings.d.ts +0 -8
  194. package/types/src/legacyChart/OOXMLUtils.d.ts +0 -78
  195. package/types/src/legacyChart/ToOOXMLConverter.d.ts +0 -30
  196. package/types/src/reader/domVisitors/AxisVisitor.d.ts +0 -12
  197. package/types/src/reader/domVisitors/BarChartTypeVisitor.d.ts +0 -6
  198. package/types/src/reader/domVisitors/ChartSpaceVisitor.d.ts +0 -6
  199. package/types/src/reader/domVisitors/ChartTypeVisitor.d.ts +0 -7
  200. package/types/src/reader/domVisitors/ChartVisitor.d.ts +0 -7
  201. package/types/src/reader/domVisitors/DataLabelsVisitor.d.ts +0 -8
  202. package/types/src/reader/domVisitors/DataPointVisitor.d.ts +0 -6
  203. package/types/src/reader/domVisitors/HyperlinkVisitor.d.ts +0 -6
  204. package/types/src/reader/domVisitors/LayoutVisitor.d.ts +0 -5
  205. package/types/src/reader/domVisitors/LegendEntryVisitor.d.ts +0 -5
  206. package/types/src/reader/domVisitors/LegendVisitor.d.ts +0 -5
  207. package/types/src/reader/domVisitors/MarkerVisitor.d.ts +0 -5
  208. package/types/src/reader/domVisitors/NegativeShapeVisitor.d.ts +0 -6
  209. package/types/src/reader/domVisitors/PlotAreaVisitor.d.ts +0 -5
  210. package/types/src/reader/domVisitors/RichValueDataVisitor.d.ts +0 -7
  211. package/types/src/reader/domVisitors/RichValueStructureVisitor.d.ts +0 -6
  212. package/types/src/reader/domVisitors/SeriesVisitor.d.ts +0 -8
  213. package/types/src/reader/domVisitors/TitleVisitor.d.ts +0 -9
  214. package/types/src/writer/emitters/ChartColorsEmitter.d.ts +0 -7
  215. package/types/src/writer/emitters/ChartEmitter.d.ts +0 -14
  216. package/types/src/writer/emitters/ChartStyleEmitter.d.ts +0 -46
  217. package/types/src/writer/utils/HiddenFormulaXfs.d.ts +0 -28
@@ -1,25 +1,46 @@
1
- import { IStyle, IStyleCollection } from '@sheetxl/sdk';
1
+ import { ICellStyle, IStyleCollection } from '@sheetxl/sdk';
2
2
  import { Visitor, ExecutionContext } from '../dom';
3
3
  import { SheetColorContainerVisitor } from './SheetColorContainerVisitor';
4
4
  export declare class SheetStyleVisitor extends SheetColorContainerVisitor implements Visitor {
5
5
  visit(context: ExecutionContext, elem: Element, jsonParent: IStyleCollection.JSON): any;
6
+ /** The font of the Normal style (`builtinId` 0): its named xf's `fontId`, 0 when not stated. */
7
+ normalFontId(context: ExecutionContext, elem: Element): number;
6
8
  processIndexColors(context: ExecutionContext, elem: Element, jsonParent: any): void;
7
9
  processMruColors(context: ExecutionContext, elem: Element, jsonParent: any): void;
8
10
  processNumFmts(context: ExecutionContext, elem: Element, _jsonParent: any[] | null): void;
9
- processXFs(context: ExecutionContext, elem: Element, jsonParent: IStyle.JSON[], denormalized: any, namedIds?: Map<number, string> | null, ignoreApplys?: boolean): any;
10
- processXF(context: ExecutionContext, elem: Element, jsonParent: IStyle.JSON, denormalized: any, namedIds: Map<number, string> | null, ignoreApplys: boolean): any;
11
+ processXFs(context: ExecutionContext, elem: Element, jsonParent: ICellStyle.JSON[], denormalized: any, namedIds?: Map<number, string> | null, ignoreApplys?: boolean): any;
12
+ processXF(context: ExecutionContext, elem: Element, jsonParent: ICellStyle.JSON, denormalized: any, namedIds: Map<number, string> | null, ignoreApplys: boolean): any;
11
13
  processAlignment(context: ExecutionContext, elem: Element, jsonParent: any): any;
12
14
  /**
13
15
  * The cell xfs whose `<protection>` says `hidden="1"`. They become the sheet's `showFormulas` once
14
16
  * the sheets are read (`applyHiddenFormulas`), since a format alone cannot say it.
15
17
  */
16
18
  collectHiddenXfs(elem: Element): Set<number>;
19
+ /**
20
+ * The cell xfs that say `pivotButton="1"`. The button is the pivot table's, so it moves onto the
21
+ * table that covers the cell once the sheets are read (`applyPivotButtons`).
22
+ */
23
+ collectPivotButtonXfs(elem: Element): Set<number>;
24
+ /**
25
+ * The cell xfs whose `extLst` carries an `xfComplement`, by xf index, with the complement index.
26
+ * They become cell controls once the sheets and the feature property bags are read
27
+ * (`applyCellControls`); the style itself does not keep them.
28
+ */
29
+ collectXfComplements(elem: Element): Map<number, number>;
17
30
  processProtection(context: ExecutionContext, elem: Element, jsonParent: any): any;
18
- processDXF(context: ExecutionContext, elem: Element, jsonParent: IStyle.JSON): any;
31
+ processDXF(context: ExecutionContext, elem: Element, jsonParent: ICellStyle.JSON): any;
19
32
  processDXFs(context: ExecutionContext, elem: Element, jsonParent: any[]): any;
33
+ /**
34
+ * Reads the slicer styles from the styles part's `extLst`: `x14:slicerStyles` names each slicer
35
+ * style's eight item elements, as ids into `x14:dxfs` (a list of its own, apart from the main
36
+ * `dxfs`). A slicer style's frame and header are in the file as a hidden table style of the same
37
+ * name (`table="0" pivot="0"`); that table style is taken out of the table styles and joins the
38
+ * slicer style.
39
+ */
40
+ processSlicerStyles(context: ExecutionContext, elemExtLst: Element | null, jsonParent: any): void;
20
41
  processTableStyle(context: ExecutionContext, elem: Element, jsonParent: any, dxfs: any[], shiftTableDx?: boolean): any;
21
42
  processTableStyles(context: ExecutionContext, elem: Element, jsonParent: any, dxfs: any[], shiftTableDx?: boolean): any;
22
- processCellStyles(context: ExecutionContext, elem: Element, named: IStyle.NamedJSON[], namedXfs: IStyle.JSON[], namedIds: Map<number, string>): any;
43
+ processCellStyles(context: ExecutionContext, elem: Element, named: ICellStyle.NamedJSON[], namedXfs: ICellStyle.JSON[], namedIds: Map<number, string>): any;
23
44
  afterVisit(_context: ExecutionContext, _elem: Element, _json: any): void;
24
45
  }
25
46
  //# sourceMappingURL=SheetStyleVisitor.d.ts.map
@@ -1,6 +1,15 @@
1
- import { ISlicer } from '@sheetxl/sdk';
1
+ import { SlicerRecord } from '../_SlicerRecord';
2
2
  import { Visitor, ExecutionContext } from '../dom';
3
+ /**
4
+ * A slicer cache part: its name and source name, and for a table slicer the `tableSlicerCache`
5
+ * ext that names the table and column by id. A cache with no such ext is a pivot or data-model
6
+ * slicer's: its pivot tables are read by sheet id and name. A pivot slicer's `tabular` items are
7
+ * read for their settings and the pivot cache they index; their states are the pivot tables' hidden
8
+ * items, so they are not kept. The rest (a data model's `olap` items, the `extLst`) is kept as
9
+ * written. A timeline cache (`timelineCacheDefinition`) is read the same way: it has no table form.
10
+ */
3
11
  export declare class SlicerCacheDefinitionVisitor implements Visitor {
4
- visit(context: ExecutionContext, elem: Element, jsonSlicer: ISlicer.JSON): ISlicer.JSON;
12
+ visit(context: ExecutionContext, elem: Element, jsonSlicer: SlicerRecord): SlicerRecord;
13
+ processPivot(context: ExecutionContext, elem: Element, jsonSlicer: SlicerRecord): void;
5
14
  }
6
15
  //# sourceMappingURL=SlicerCacheDefinitionVisitor.d.ts.map
@@ -1,7 +1,13 @@
1
- import { ISlicer } from '@sheetxl/sdk';
1
+ import { SlicerRecord } from '../_SlicerRecord';
2
2
  import { Visitor, ExecutionContext } from '../dom';
3
+ /** What a slicer takes from the cache it names, read before any sheet (`XLSXReader`). */
4
+ export declare const CACHE_FIELDS: readonly (keyof SlicerRecord)[];
5
+ /**
6
+ * A sheet's slicer part: every `slicer` of it as a record by name, each joined to the cache it
7
+ * names so the record holds the column's ids beside the slicer's own presentation.
8
+ */
3
9
  export declare class SlicersVisitor implements Visitor {
4
- visit(context: ExecutionContext, elem: Element, jsonParent: any): Record<string, ISlicer.JSON>;
5
- processSlicer(context: ExecutionContext, elem: Element, slicers: Record<string, ISlicer.JSON>): void;
10
+ visit(context: ExecutionContext, elem: Element, jsonParent: any): Record<string, SlicerRecord>;
11
+ processSlicer(context: ExecutionContext, elem: Element, slicers: Record<string, SlicerRecord>): void;
6
12
  }
7
13
  //# sourceMappingURL=SlicersVisitor.d.ts.map
@@ -2,7 +2,7 @@ import { IRange, ITable, ISort } from '@sheetxl/sdk';
2
2
  import { Visitor, ExecutionContext } from '../dom';
3
3
  export declare class SortStateVisitor implements Visitor {
4
4
  visit(context: ExecutionContext, elem: Element, jsonParent: ITable.JSON): ISort.JSON | undefined;
5
- processSortCondition(context: ExecutionContext, elem: Element, refRange: IRange.Coords, defaultCriteria: ISort.Criteria): ISort.Options | null | undefined;
6
- processSortConditions(context: ExecutionContext, elem: Element, sorts: ISort.Options[], refRange: IRange.Coords, defaultCriteria: ISort.Criteria): void;
5
+ processSortCondition(context: ExecutionContext, elem: Element, refRange: IRange.Coords, defaultCriteria: ISort.Criteria, conditionRefs?: IRange.Coords[]): ISort.Options | null | undefined;
6
+ processSortConditions(context: ExecutionContext, elem: Element, sorts: ISort.Options[], refRange: IRange.Coords, defaultCriteria: ISort.Criteria, conditionRefs?: IRange.Coords[]): void;
7
7
  }
8
8
  //# sourceMappingURL=SortStateVisitor.d.ts.map
@@ -1,5 +1,15 @@
1
- import { ExecutionContext } from '../dom';
1
+ import { IHyperlink, IText } from '@sheetxl/sdk';
2
+ import { ExecutionContext } from '../dom/ExecutionContext';
2
3
  import { ColorContainerVisitor } from './ColorContainerVisitor';
4
+ /** The four font slots of a run and the JSON key each reads into. */
5
+ export declare const TEXT_FONTS: readonly [element: string, key: 'font' | 'eastAsianFont' | 'complexScriptFont' | 'symbolFont'][];
6
+ /**
7
+ * A `latin`/`ea`/`cs`/`sym`/`buFont` element as a font: a theme font (`+mn-lt`, `+mj-ea`) by
8
+ * its role, otherwise the family, with the PANOSE classification kept as stated.
9
+ */
10
+ export declare const readFont: (elem: Element) => IText.FontJSON | undefined;
11
+ /** A `hlinkClick`/`hlinkHover`: its address as the relationship resolves it, and what it shows. */
12
+ export declare const readHyperlink: (context: ExecutionContext, elem: Element) => Exclude<IHyperlink.JSON, string>;
3
13
  export declare class TextPropertiesVisitor extends ColorContainerVisitor {
4
14
  protected _jsonKey: string;
5
15
  constructor(jsonKey?: string);
@@ -7,5 +17,7 @@ export declare class TextPropertiesVisitor extends ColorContainerVisitor {
7
17
  visit(context: ExecutionContext, elemParent: Element, jsonParent: any): any;
8
18
  parseTextElement(context: ExecutionContext, elemParent: Element, jsonText: any, defaultRun: boolean): void;
9
19
  parseTextProperties(context: ExecutionContext, elem: Element, jsonText: any): void;
20
+ /** A `hlinkClick`/`hlinkHover`: its resolved address and what it shows. */
21
+ readHyperlink(context: ExecutionContext, elem: Element): Exclude<IHyperlink.JSON, string>;
10
22
  }
11
23
  //# sourceMappingURL=TextPropertiesVisitor.d.ts.map
@@ -14,4 +14,13 @@ export interface ThreadedEntry extends IComment.EntryJSON {
14
14
  export declare class ThreadedCommentVisitor implements Visitor {
15
15
  visit(context: ExecutionContext, elem: Element, jsonParent: IRange.JSONReferenceEntry<ThreadedEntry>[]): ThreadedEntry | undefined;
16
16
  }
17
+ /**
18
+ * A `dT` as an ISO string that says it is UTC, with milliseconds.
19
+ *
20
+ * @remarks
21
+ * Excel writes the time in UTC with no zone designator and hundredths of a second
22
+ * (`2026-09-28T19:25:03.54`). A `Date` would take that as local time, and the fraction is not the
23
+ * three digits every engine parses.
24
+ */
25
+ export declare function asUTC(dT: string): string;
17
26
  //# sourceMappingURL=ThreadedCommentVisitor.d.ts.map
@@ -1,6 +1,6 @@
1
- import { IRange, ISheet } from '@sheetxl/sdk';
1
+ import { IRange, IWorksheet } from '@sheetxl/sdk';
2
2
  import { Visitor, ExecutionContext } from '../dom';
3
3
  export declare class ThreadedCommentsVisitor implements Visitor {
4
- visit(context: ExecutionContext, elem: Element, jsonParent: ISheet.JSON): IRange.JSONReferenceEntry<any>[] | undefined;
4
+ visit(context: ExecutionContext, elem: Element, jsonParent: IWorksheet.JSON): IRange.JSONReferenceEntry<any>[] | undefined;
5
5
  }
6
6
  //# sourceMappingURL=ThreadedCommentsVisitor.d.ts.map
@@ -0,0 +1,13 @@
1
+ import { SlicerRecord } from '../_SlicerRecord';
2
+ import { Visitor, ExecutionContext } from '../dom';
3
+ /**
4
+ * A sheet's timeline part (`xl/timelines/*`): every `timeline` of it as a slicer record by name,
5
+ * joined to the timeline cache it names, as a slicer part is. Excel keeps a timeline as a slicer
6
+ * whose items are dates; what a slicer does not have (its level, scroll position, style and the
7
+ * like) is carried as read.
8
+ */
9
+ export declare class TimelinesVisitor implements Visitor {
10
+ visit(context: ExecutionContext, elem: Element, jsonParent: any): Record<string, SlicerRecord>;
11
+ processTimeline(context: ExecutionContext, elem: Element, slicers: Record<string, SlicerRecord>): void;
12
+ }
13
+ //# sourceMappingURL=TimelinesVisitor.d.ts.map
@@ -20,15 +20,6 @@ export declare class WorkbookVisitor extends SheetColorContainerVisitor {
20
20
  * `getRef`, which normalizes an empty visitor result to `null` and attaches `sources`).
21
21
  */
22
22
  processExternalReferences(context: ExecutionContext, elem: Element, jsonParent: IWorkbook.JSON): any;
23
- /**
24
- * `<pivotCaches><pivotCache cacheId="n" r:id="rIdN"/></pivotCaches>` — the workbook's pivot
25
- * caches, each carried whole: its definition part and, through that part's own relationships,
26
- * its records. See `PLAN-MODEL-HOMES.md` step 4.
27
- *
28
- * @remarks
29
- * The id is the join key: every pivot table names the cache it summarizes by `cacheId`, and the
30
- * writer puts the same id back so the two still meet.
31
- */
32
23
  processPivotCaches(context: ExecutionContext, elem: Element, jsonParent: IWorkbook.JSON): any;
33
24
  processBookViews(context: ExecutionContext, elem: Element, jsonParent: IWorkbook.JSON): any;
34
25
  processWorkbookView(context: ExecutionContext, elem: Element, jsonParent: IWorkbook.JSON): any;
@@ -0,0 +1,10 @@
1
+ import { ICellStyle } from '@sheetxl/sdk';
2
+ import { ExecutionContext } from '../dom';
3
+ /**
4
+ * The format an element's `dxfId` names, for a color filter or sort, read from the styles part's
5
+ * `<dxfs>` (`SheetStyleVisitor.processDXFs`).
6
+ *
7
+ * @returns `undefined` without a `dxfId`; `{}` when the id is not in the table.
8
+ */
9
+ export declare const readDxfAttribute: (context: ExecutionContext, elem: Element) => ICellStyle.Properties | undefined;
10
+ //# sourceMappingURL=_Dxfs.d.ts.map
@@ -1,28 +1,14 @@
1
1
  import { RelsVisitor } from './RelsVisitor';
2
2
  import { CorePropertiesVisitor } from './CorePropertiesVisitor';
3
3
  import { AppPropertiesVisitor } from './AppPropertiesVisitor';
4
- import { ChartSpaceVisitor } from './ChartSpaceVisitor';
5
- import { ChartVisitor } from './ChartVisitor';
6
- import { PlotAreaVisitor } from './PlotAreaVisitor';
7
4
  import { ShapePropertiesVisitor } from './ShapePropertiesVisitor';
8
- import { BarChartTypeVisitor } from './BarChartTypeVisitor';
9
- import { ChartTypeVisitor } from './ChartTypeVisitor';
10
- import { DataLabelsVisitor } from './DataLabelsVisitor';
11
- import { SeriesVisitor } from './SeriesVisitor';
12
- import { DataPointVisitor } from './DataPointVisitor';
13
- import { MarkerVisitor } from './MarkerVisitor';
14
- import { AxisVisitor } from './AxisVisitor';
15
5
  import { TextPropertiesVisitor } from './TextPropertiesVisitor';
16
- import { LegendEntryVisitor } from './LegendEntryVisitor';
17
- import { LegendVisitor } from './LegendVisitor';
18
- import { NegativeShapeVisitor } from './NegativeShapeVisitor';
19
- import { TitleVisitor } from './TitleVisitor';
20
- import { LayoutVisitor } from './LayoutVisitor';
6
+ import { ShapeTextVisitor } from './ShapeTextVisitor';
21
7
  import { ThemeVisitor } from './ThemeVisitor';
22
8
  import { ClrSchemeVisitor } from './ClrSchemeVisitor';
23
9
  import { FontSchemeVisitor } from './FontSchemeVisitor';
10
+ import { ObjectDefaultsVisitor } from './ObjectDefaultsVisitor';
24
11
  import { FmtSchemeVisitor } from './FmtSchemeVisitor';
25
- import { HyperlinkVisitor } from './HyperlinkVisitor';
26
12
  import { AutoFilterVisitor } from './AutoFilterVisitor';
27
13
  import { SortStateVisitor } from './SortStateVisitor';
28
14
  import { SheetStyleVisitor } from './SheetStyleVisitor';
@@ -32,6 +18,8 @@ import { TableX14Visitor } from './TableX14Visitor';
32
18
  import { ExternalLinkVisitor } from './ExternalLinkVisitor';
33
19
  import { SlicerCacheDefinitionVisitor } from './SlicerCacheDefinitionVisitor';
34
20
  import { SlicersVisitor } from './SlicersVisitor';
21
+ import { TimelinesVisitor } from './TimelinesVisitor';
22
+ import { FormControlPrVisitor } from './FormControlPrVisitor';
35
23
  import { DrawingVisitor } from './DrawingVisitor';
36
24
  import { DrawingAnchorVisitor } from './DrawingAnchorVisitor';
37
25
  import { DrawingGraphicFrameVisitor } from './DrawingGraphicFrameVisitor';
@@ -40,8 +28,7 @@ import { DrawingPicVisitor } from './DrawingPicVisitor';
40
28
  import { DrawingGrpSpVisitor } from './DrawingGrpSpVisitor';
41
29
  import { DrawingCxnSpVisitor } from './DrawingCxnSpVisitor';
42
30
  import { MetadataVisitor } from './MetadataVisitor';
43
- import { RichValueStructureVisitor } from './RichValueStructureVisitor';
44
- import { RichValueDataVisitor } from './RichValueDataVisitor';
31
+ import { FeaturePropertyBagVisitor } from './FeaturePropertyBagVisitor';
45
32
  import { CommentsVisitor } from './CommentsVisitor';
46
33
  import { CommentVisitor } from './CommentVisitor';
47
34
  import { ThreadedCommentsVisitor } from './ThreadedCommentsVisitor';
@@ -51,28 +38,14 @@ export declare const BuiltInVisitors: {
51
38
  RelsVisitor: typeof RelsVisitor;
52
39
  CorePropertiesVisitor: typeof CorePropertiesVisitor;
53
40
  AppPropertiesVisitor: typeof AppPropertiesVisitor;
54
- ChartSpaceVisitor: typeof ChartSpaceVisitor;
55
- ChartVisitor: typeof ChartVisitor;
56
- PlotAreaVisitor: typeof PlotAreaVisitor;
57
41
  ShapePropertiesVisitor: typeof ShapePropertiesVisitor;
58
- BarChartTypeVisitor: typeof BarChartTypeVisitor;
59
- ChartTypeVisitor: typeof ChartTypeVisitor;
60
- DataLabelsVisitor: typeof DataLabelsVisitor;
61
- SeriesVisitor: typeof SeriesVisitor;
62
- DataPointVisitor: typeof DataPointVisitor;
63
- MarkerVisitor: typeof MarkerVisitor;
64
- AxisVisitor: typeof AxisVisitor;
65
42
  TextPropertiesVisitor: typeof TextPropertiesVisitor;
66
- LegendEntryVisitor: typeof LegendEntryVisitor;
67
- LegendVisitor: typeof LegendVisitor;
68
- NegativeShapeVisitor: typeof NegativeShapeVisitor;
69
- TitleVisitor: typeof TitleVisitor;
70
- LayoutVisitor: typeof LayoutVisitor;
43
+ ShapeTextVisitor: typeof ShapeTextVisitor;
71
44
  ThemeVisitor: typeof ThemeVisitor;
72
45
  ClrSchemeVisitor: typeof ClrSchemeVisitor;
73
46
  FontSchemeVisitor: typeof FontSchemeVisitor;
47
+ ObjectDefaultsVisitor: typeof ObjectDefaultsVisitor;
74
48
  FmtSchemeVisitor: typeof FmtSchemeVisitor;
75
- HyperlinkVisitor: typeof HyperlinkVisitor;
76
49
  AutoFilterVisitor: typeof AutoFilterVisitor;
77
50
  SortStateVisitor: typeof SortStateVisitor;
78
51
  SheetStyleVisitor: typeof SheetStyleVisitor;
@@ -82,6 +55,8 @@ export declare const BuiltInVisitors: {
82
55
  ExternalLinkVisitor: typeof ExternalLinkVisitor;
83
56
  SlicerCacheDefinitionVisitor: typeof SlicerCacheDefinitionVisitor;
84
57
  SlicersVisitor: typeof SlicersVisitor;
58
+ TimelinesVisitor: typeof TimelinesVisitor;
59
+ FormControlPrVisitor: typeof FormControlPrVisitor;
85
60
  DrawingVisitor: typeof DrawingVisitor;
86
61
  DrawingAnchorVisitor: typeof DrawingAnchorVisitor;
87
62
  DrawingGraphicFrameVisitor: typeof DrawingGraphicFrameVisitor;
@@ -90,8 +65,7 @@ export declare const BuiltInVisitors: {
90
65
  DrawingGrpSpVisitor: typeof DrawingGrpSpVisitor;
91
66
  DrawingCxnSpVisitor: typeof DrawingCxnSpVisitor;
92
67
  MetadataVisitor: typeof MetadataVisitor;
93
- RichValueStructureVisitor: typeof RichValueStructureVisitor;
94
- RichValueDataVisitor: typeof RichValueDataVisitor;
68
+ FeaturePropertyBagVisitor: typeof FeaturePropertyBagVisitor;
95
69
  CommentsVisitor: typeof CommentsVisitor;
96
70
  CommentVisitor: typeof CommentVisitor;
97
71
  ThreadedCommentsVisitor: typeof ThreadedCommentsVisitor;
@@ -28,6 +28,7 @@ export interface ContentTypesDirectory {
28
28
  styles: string[];
29
29
  metadata: string[];
30
30
  people: string[];
31
+ featurePropertyBag: string[];
31
32
  /**
32
33
  * Every `<Override>`, by part path (no leading `/`).
33
34
  *
@@ -1,3 +1,4 @@
1
+ import { IRichText, IFontStyle } from '@sheetxl/sdk';
1
2
  import { SaxParser } from '../sax';
2
3
  /**
3
4
  * Streaming SAX handler for `xl/sharedStrings.xml`, a flat repeated structure:
@@ -10,13 +11,37 @@ import { SaxParser } from '../sax';
10
11
  * ```
11
12
  *
12
13
  * We collect all `<t>` text while inside an `<si>` and emit the concatenated,
13
- * unescaped string when the `<si>` closes. Concatenating runs yields the plain
14
- * text for rich strings; run formatting (`<r>`/`<rPr>`) is ignored for now, though
15
- * the structure leaves room to capture it later. Phonetic guides
16
- * (`<rPh>`/`<phoneticPr>`) are skipped so they don't leak into the value.
14
+ * unescaped string when the `<si>` closes, with the runs when the string has any
15
+ * (`<r>` with its `<rPr>`, read as the font properties it sets, as a note's runs are).
16
+ * Phonetic guides (`<rPh>`/`<phoneticPr>`) are skipped so they don't leak into the value.
17
17
  *
18
- * @param onString Called once per `<si>`, in document order, with the value.
18
+ * @param onString Called once per `<si>`, in document order, with the value and, for a rich
19
+ * string, its runs.
19
20
  * @param onWarning Optional sink for parse errors.
20
21
  */
21
- export declare const createSharedStringsSaxVisitor: (onString: (text: string) => void, onWarning?: (message: string) => void) => SaxParser.EventHandler;
22
+ export declare const createSharedStringsSaxVisitor: (onString: (text: string, runs?: IRichText.Run[]) => void, onWarning?: (message: string) => void) => SaxParser.EventHandler;
23
+ /**
24
+ * Collects the `<r>` runs of a rich string from SAX events (a shared `<si>` or an inline `<is>`):
25
+ * each run's text and what its `<rPr>` sets. Fed the local names of the tags inside the string
26
+ * and the text inside its `<t>` elements.
27
+ */
28
+ export declare class RunCollector {
29
+ private _runs;
30
+ private _text;
31
+ private _font;
32
+ private _inRun;
33
+ private _inRPr;
34
+ reset(): void;
35
+ onOpenTag(local: string, attributes: Record<string, string>): void;
36
+ /** The text inside a `<t>`; the caller gates it as it gates the string's own text. */
37
+ onText(text: string): void;
38
+ onCloseTag(local: string): void;
39
+ /**
40
+ * The runs collected since the last reset, or `null` when the string is plain: no `<r>` at
41
+ * all, or none with an `<rPr>` (runs that set nothing are only how some writers split text).
42
+ * Resets.
43
+ */
44
+ take(): IRichText.Run[] | null;
45
+ }
46
+ export declare function completeRuns(runs: readonly IRichText.Run[], defaultFont: IFontStyle.JSON | undefined): IRichText.Run[];
22
47
  //# sourceMappingURL=SharedStringsVisitor.d.ts.map
@@ -1,4 +1,4 @@
1
- import { Tuple, ISheet, ICell } from '@sheetxl/sdk';
1
+ import { Scalar, Tuple, IWorksheet } from '@sheetxl/sdk';
2
2
  import { SaxParser } from '../sax';
3
3
  import { OnWarning } from '../Warning';
4
4
  /**
@@ -6,7 +6,21 @@ import { OnWarning } from '../Warning';
6
6
  * dialect (`XlsxFormulaDialect`), for condition formulas. Set before any sheet streams.
7
7
  */
8
8
  export declare const PARAM_FORMULA_DIALECT = "formulaDialect";
9
- export declare const createWorksheetSaxVisitor: (sheet: ISheet.JSON, getRef: (relId: string, as?: "resource" | "legacyDrawing" | "part") => any, // TODO - this should be a context like DOM.
9
+ /** {@link IsKnownFunction}, set when wrapped formulas are to be restored. Read at the first wrapper. */
10
+ export declare const PARAM_IS_KNOWN_FUNCTION = "isKnownFunction";
11
+ /**
12
+ * The `paramMap` key under which the reader hands the worksheet visitor `workbookPr@date1904`, for
13
+ * `t="d"` cells. Read per cell, not when the visitor is made: it is set once `workbook.xml` is read,
14
+ * which is after the sheets' parses start but before any of their cells stream.
15
+ */
16
+ export declare const PARAM_DATE_1904 = "date1904";
17
+ /** The runs of each rich shared string, by id (`Map<number, IRichText.Run[]>`). */
18
+ export declare const PARAM_RICH_STRINGS = "richStrings";
19
+ /** The workbook's Normal font (`IFontStyle.JSON`), which a rich run's `<rPr>` is read over. */
20
+ export declare const PARAM_DEFAULT_FONT = "defaultFont";
21
+ /** What an inline string resolves to: a shared-string id, or a rich value when it has runs. */
22
+ type InlineStringResult = number | Scalar.JSONTypedValue | undefined;
23
+ export declare const createWorksheetSaxVisitor: (sheet: IWorksheet.JSON, getRef: (relId: string, as?: "resource" | "legacyDrawing" | "part" | "formControl") => any, // TODO - this should be a context like DOM.
10
24
  addSharedString: (str: string) => number, mapDxfs?: Map<number, any>, onEnd?: () => void, onWarning?: OnWarning, onProgress?: (amount: number, total?: number) => void, paramMap?: Map<string, any>) => SaxParser.EventHandler;
11
25
  export declare class RowAttributeType {
12
26
  static Collapsed: number;
@@ -19,14 +33,18 @@ export declare class RowAttributeType {
19
33
  static R: number;
20
34
  static S: number;
21
35
  static Spans: number;
22
- static ThickBot: number;
23
- static ThickTop: number;
24
36
  }
25
37
  /**
26
- * Special handler optimized for performance while reading sheet data.
38
+ * The address of a formula that is a `HYPERLINK` call and nothing else: the first argument when
39
+ * it is a literal string, `null` when it is computed (`HYPERLINK(B2)`), and `undefined` when
40
+ * the formula is not a top-level `HYPERLINK` call.
27
41
  *
28
- * Under the lean parser, `<row>` start tags and `<c>` elements skip the generic tokenizer through
29
- * the returned `elementScanners`.
42
+ * @remarks
43
+ * Excel stores a `HYPERLINK` result as its plain value (`t="str"` friendly name) and nothing in
44
+ * `<hyperlinks>`; it makes the cell a link on open from the formula text. A nested call
45
+ * (`IF(c, HYPERLINK(...))`) is not read as a link.
30
46
  */
31
- export declare const createSheetDataSaxVisitor: (tupleBuilder: Tuple.IBuilder<ICell.JSON>, sheet: ISheet.JSON, delegate: SaxParser.EventHandler, onWarning: OnWarning | undefined, onProgress: ((amount: number, total?: number) => void) | undefined, stringHandler: SaxParser.EventHandler<number | undefined>, paramMap?: Map<string, any>) => SaxParser.EventHandler;
47
+ export declare const topLevelHyperlinkAddress: (a1: string) => string | null | undefined;
48
+ export declare const createSheetDataSaxVisitor: (tupleBuilder: Tuple.IBuilder<Scalar.JSON>, sheet: IWorksheet.JSON, delegate: SaxParser.EventHandler, onWarning: OnWarning | undefined, onProgress: ((amount: number, total?: number) => void) | undefined, stringHandler: SaxParser.EventHandler<InlineStringResult>, paramMap?: Map<string, any>, addSharedString?: (str: string) => number, isZeroHeight?: () => boolean, lastInlineText?: () => string) => SaxParser.EventHandler;
49
+ export {};
32
50
  //# sourceMappingURL=WorksheetVisitor.d.ts.map
@@ -0,0 +1,22 @@
1
+ import { IRichValueHandler } from './IRichValueHandler';
2
+ /**
3
+ * Excel's `_error` structure: an error Excel has no cell error code for (`#SPILL!`, `#CALC!`,
4
+ * `#BUSY!`, …), written as `#VALUE!` with a rich value saying which.
5
+ *
6
+ * ```xml
7
+ * <s t="_error">
8
+ * <k n="errorType" t="i"/>
9
+ * <k n="subType" t="i"/>
10
+ * </s>
11
+ * ```
12
+ *
13
+ * @remarks
14
+ * `errorType` does NOT align to `ERROR.TYPE()`: the OOXML sequence is 0-based and skips `#FIELD!`,
15
+ * so it is the error's code minus one. Excel's other keys (`#SPILL!`'s `rwOffset`/`colOffset`,
16
+ * `#PYTHON!`'s `correlationId`, a fetch's `subType` 10) are read past and written as 0 or not at
17
+ * all: an error with a subtype is a rich error kind, not yet built.
18
+ *
19
+ * @internal
20
+ */
21
+ export declare const ErrorRichValueHandler: IRichValueHandler;
22
+ //# sourceMappingURL=ErrorRichValueHandler.d.ts.map
@@ -0,0 +1,109 @@
1
+ import { IRichData, IWorkbook, Scalar } from '@sheetxl/sdk';
2
+ import { DomParser, FileLookup } from '../reader/ReaderUtils';
3
+ import { EmitContext } from '../writer/builder';
4
+ /**
5
+ * OOXML primitive-value type codes used in `<k t="…">` attributes inside `<rvStructures>`.
6
+ *
7
+ * "d" - Date/Time (ISO-8601 string)
8
+ * "i" - Integer (32-bit signed)
9
+ * "b" - Boolean
10
+ * "e" - Error value
11
+ * "s" - Inline string
12
+ * "r" - Nested rich value
13
+ * "a" - Array data (rdarray.xml)
14
+ * "spb" - Supporting property bag
15
+ */
16
+ export type RichPrimitiveType = 'd' | 'i' | 'b' | 'e' | 's' | 'r' | 'a' | 'spb';
17
+ /**
18
+ * One key of a rich value structure: its name (`n=` on `<k>`), its type (`t=`), and the text
19
+ * written when a value has none for it (`''` when omitted).
20
+ */
21
+ export type RichValueProp = [name: string, type: RichPrimitiveType, defaultValue?: string];
22
+ /** A key's flags in `rdRichValueTypes.xml`: `[flag name, value]`. */
23
+ export type RichValueKeyFlags = [key: string, flags: [name: string, value: string][]];
24
+ /**
25
+ * How one Excel rich value structure (`<s t="_webimage">`) reads into a cell value and writes back
26
+ * out of one.
27
+ *
28
+ * @remarks
29
+ * One handler per structure type. A handler maps the structure's keys to and from a cell value (an
30
+ * error, or the JSON of one of our rich data kinds) and owns the parts the structure needs beyond
31
+ * the rich value itself (the web image part and its media for `_webimage`). It works per file:
32
+ * {@link beginRead} and {@link beginWrite} start one file's state, as `strings.beginPersist()` does.
33
+ *
34
+ * @internal
35
+ */
36
+ export interface IRichValueHandler {
37
+ /** Excel's structure type: `t=` on `<s>`. */
38
+ readonly structure: string;
39
+ /**
40
+ * The types of our rich data kinds this structure writes (`IRichData.getKind().getName()`). An error
41
+ * that is not a rich value is written by the `_error` structure, which lists none.
42
+ */
43
+ readonly kinds: readonly string[];
44
+ /**
45
+ * Whether this structure writes `value`, where two structures write one kind (a web picture and
46
+ * a picture placed in a cell are both `image`). Omitted, every value of its kinds.
47
+ */
48
+ writes?(value: Scalar): boolean;
49
+ /** Starts reading one file: reads the parts the structure resolves against. */
50
+ beginRead(ctx: RichValueReadContext): IRichValueReader;
51
+ /** Starts writing one file. */
52
+ beginWrite(ctx: RichValueWriteContext): IRichValueWriter;
53
+ }
54
+ /** What a handler reads a file's parts through. @internal */
55
+ export interface RichValueReadContext {
56
+ getFile: FileLookup;
57
+ domParser: DomParser;
58
+ /** The external target of the relationship `relId` of `part`, or `null`. */
59
+ getAddress(part: string, relId: string): string | null;
60
+ /** The bytes of the part the relationship `relId` of `part` names, or `null`. */
61
+ getBytes(part: string, relId: string): ArrayBuffer | null;
62
+ /**
63
+ * Adds a picture the file holds to the workbook as the copy of `source`, and answers the id a
64
+ * value's JSON names it by (`resId`).
65
+ */
66
+ addFetched(bytes: ArrayBuffer, source: string): number | null;
67
+ /** Marks a part as read into the model, so it is not carried through as unknown. */
68
+ markAbsorbed(part: string): void;
69
+ }
70
+ /** One file's reading of a structure. @internal */
71
+ export interface IRichValueReader {
72
+ /**
73
+ * The cell value one `<rv>` reads as: an error, or a rich data kind's JSON.
74
+ *
75
+ * @param values The `<v>`s by key name; integers are numbers, everything else text.
76
+ * @returns `undefined` when the values cannot be read; the rich value is then kept as read.
77
+ */
78
+ read(values: Record<string, string | number>): Scalar | IRichData.JSON | undefined;
79
+ }
80
+ /** What a handler writes a file through. @internal */
81
+ export interface RichValueWriteContext {
82
+ readonly workbook: IWorkbook;
83
+ }
84
+ /** One file's writing of a structure. @internal */
85
+ export interface IRichValueWriter {
86
+ /** {@inheritDoc IRichValueHandler.structure} */
87
+ readonly structure: string;
88
+ /** The keys written, as `<k>` in `rdrichvaluestructure.xml`; an `<rv>` has a `<v>` for each. */
89
+ readonly props: readonly RichValueProp[];
90
+ /**
91
+ * The `<v>`s for one cell value, parallel to {@link props}, or `null` when it cannot be
92
+ * written by this structure.
93
+ *
94
+ * @param formula The cell's formula text, or `null` for a literal.
95
+ */
96
+ write(value: Scalar, formula: string | null): string[] | null;
97
+ /** The key flags written for the structure in `rdRichValueTypes.xml`, if any. */
98
+ getKeyFlags?(): readonly RichValueKeyFlags[];
99
+ /** Adds the parts the written values need, once every sheet is written. */
100
+ addParts?(ctx: EmitContext): void;
101
+ }
102
+ /**
103
+ * The `<v>`s of `props` read from a record by name: a missing or `null` value writes the prop's
104
+ * default.
105
+ *
106
+ * @internal
107
+ */
108
+ export declare const valuesOf: (props: readonly RichValueProp[], record: Record<string, unknown>) => string[];
109
+ //# sourceMappingURL=IRichValueHandler.d.ts.map
@@ -0,0 +1,18 @@
1
+ import { IRichValueHandler } from './IRichValueHandler';
2
+ /** The part listing the pictures `_localImage` rich values name, by position. */
3
+ export declare const RICH_VALUE_REL_PART = "/xl/richData/richValueRel.xml";
4
+ /**
5
+ * Excel's `_localImage` structure: a picture placed in a cell (Insert ▸ Picture ▸ Place in Cell),
6
+ * read as and written from an `image` value whose source is `resource:<id>` and which holds its
7
+ * picture.
8
+ *
9
+ * @remarks
10
+ * The structure names its picture by position in richValueRel.xml, whose relationship is the media
11
+ * part; there is no source URL, so reading mints one. A literal is `CalcOrigin` 5 (an Excel file,
12
+ * 2026-10-28); a formula over one is written as a `_webimage`'s would be, unprobed. Alt text has
13
+ * no key here: the file for it is unprobed.
14
+ *
15
+ * @internal
16
+ */
17
+ export declare const LocalImageRichValueHandler: IRichValueHandler;
18
+ //# sourceMappingURL=LocalImageRichValueHandler.d.ts.map
@@ -0,0 +1,69 @@
1
+ import { DomParser, FileLookup } from '../reader/ReaderUtils';
2
+ /** The rich data parts, by zip name. */
3
+ export declare const RICH_DATA_PART: {
4
+ readonly structures: "xl/richData/rdrichvaluestructure.xml";
5
+ readonly values: "xl/richData/rdrichvalue.xml";
6
+ readonly arrays: "xl/richData/rdarray.xml";
7
+ readonly bagStructures: "xl/richData/rdsupportingpropertybagstructure.xml";
8
+ readonly bags: "xl/richData/rdsupportingpropertybag.xml";
9
+ readonly types: "xl/richData/rdRichValueTypes.xml";
10
+ readonly richStyles: "xl/richData/richStyles.xml";
11
+ };
12
+ /** A key and its type code (`t=`; absent for a number). */
13
+ export type RichKey = readonly [name: string, type: string | null];
14
+ /** One `<s>` of rdrichvaluestructure.xml. */
15
+ export interface RichStructure {
16
+ readonly t: string;
17
+ readonly keys: readonly RichKey[];
18
+ }
19
+ /** One `<rv>`: its structure, its `<v>`s in key order, and the `<fb>` cached number if any. */
20
+ export interface RawRichValue {
21
+ readonly s: number;
22
+ readonly values: readonly string[];
23
+ readonly fb: string | null;
24
+ }
25
+ /** A typed item of an array or a bag array: `<v t="…">text</v>`. */
26
+ export interface RichItem {
27
+ readonly t: string | null;
28
+ readonly text: string;
29
+ }
30
+ /** One `<a>` of rdarray.xml: its items, row major. */
31
+ export interface RichArrayPart {
32
+ readonly rows: number;
33
+ readonly columns: number;
34
+ readonly items: readonly RichItem[];
35
+ }
36
+ /** One `<spb>`: its bag structure and its `<v>`s in key order. */
37
+ export interface RichBag {
38
+ readonly s: number;
39
+ readonly values: readonly string[];
40
+ }
41
+ /** A key's flags, by flag name (`ShowInCardView` → `'0'`). */
42
+ export type RichKeyFlags = ReadonlyMap<string, string>;
43
+ /** One `<rSty>` of richStyles.xml, resolved: its number format and its card roles. */
44
+ export interface RichStyle {
45
+ readonly numberFormat: string | null;
46
+ readonly isTitle: boolean;
47
+ readonly isHero: boolean;
48
+ }
49
+ /** Everything the rich data parts of one file say. Empty lists for parts the file lacks. */
50
+ export interface RichDataParts {
51
+ readonly structures: readonly RichStructure[];
52
+ readonly values: readonly RawRichValue[];
53
+ readonly arrays: readonly RichArrayPart[];
54
+ readonly bagStructures: readonly (readonly RichKey[])[];
55
+ readonly bagArrays: readonly (readonly RichItem[])[];
56
+ readonly bags: readonly RichBag[];
57
+ /** Flags every structure's keys share. */
58
+ readonly globalKeyFlags: ReadonlyMap<string, RichKeyFlags>;
59
+ /** Flags by structure type, then key. */
60
+ readonly typeKeyFlags: ReadonlyMap<string, ReadonlyMap<string, RichKeyFlags>>;
61
+ readonly richStyles: readonly RichStyle[];
62
+ }
63
+ /**
64
+ * Reads every rich data part of a file. A part the file lacks reads as empty.
65
+ *
66
+ * @internal
67
+ */
68
+ export declare const readRichDataParts: (getFile: FileLookup, domParser: DomParser) => RichDataParts;
69
+ //# sourceMappingURL=RichDataParts.d.ts.map