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

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/BPn0BJd77_Q1lYVz.mjs +7021 -0
  3. package/browser/esm/BfV9IAl46gJxLRsa.mjs +2474 -0
  4. package/browser/esm/{DsSIg46AR7IFBN5N.mjs → C1Ql7gO6TtQglsOH.mjs} +939 -804
  5. package/browser/esm/{CxtFawTfwRTCC4Xr.mjs → C74cxGSvdlAfqeqF.mjs} +2 -2
  6. package/browser/esm/CZ3s0Cfjqm3BRszF.mjs +104 -0
  7. package/browser/esm/ChMFy3Rg97YbbuTB.mjs +4632 -0
  8. package/browser/esm/D2WBxzN8ubzIrJ4h.mjs +10323 -0
  9. package/browser/esm/{D-epcZSoKLbsAIaC.mjs → DtUTX1O34sAvjw_I.mjs} +3 -3
  10. package/browser/esm/{C-2KaUyV4gs-sDTZ.mjs → K9Sy1I7Pix2m7GJj.mjs} +194 -144
  11. package/browser/esm/{CRrTMRdN_IcSA_pm.mjs → cjLbism9wq4om43B.mjs} +3 -3
  12. package/browser/esm/index.mjs +3 -4
  13. package/browser/esm/rF6yS_NgcKLlMbGR.mjs +24 -0
  14. package/licenses/dependencies.txt +2 -2
  15. package/node/esm/BMVTOvvr98SnUmif.mjs +2478 -0
  16. package/node/esm/BXHjX5Jr7ZO7XFp1.mjs +6957 -0
  17. package/node/esm/{CBtj0-a4l2qux2hA.mjs → BeAzln1Wp4oOc7xJ.mjs} +3 -3
  18. package/node/esm/C2FEO68INNEEnWCd.mjs +4746 -0
  19. package/node/esm/DDI2JK7U9TLsIobf.mjs +2562 -0
  20. package/node/esm/DhIaDwktkAy1xpDs.mjs +7284 -0
  21. package/node/esm/{BCr4lCI6qQXXN0K1.mjs → el-uWAcXKFVwmwZ-.mjs} +3 -3
  22. package/node/esm/index.mjs +65 -28
  23. package/node/esm/{BsTMtvwpQoPNv95M.mjs → kFd-ABtolhQt-Hqv.mjs} +2 -2
  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,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,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,27 +1,13 @@
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
6
  import { ShapeTextVisitor } from './ShapeTextVisitor';
17
- import { LegendEntryVisitor } from './LegendEntryVisitor';
18
- import { LegendVisitor } from './LegendVisitor';
19
- import { NegativeShapeVisitor } from './NegativeShapeVisitor';
20
- import { TitleVisitor } from './TitleVisitor';
21
- import { LayoutVisitor } from './LayoutVisitor';
22
7
  import { ThemeVisitor } from './ThemeVisitor';
23
8
  import { ClrSchemeVisitor } from './ClrSchemeVisitor';
24
9
  import { FontSchemeVisitor } from './FontSchemeVisitor';
10
+ import { ObjectDefaultsVisitor } from './ObjectDefaultsVisitor';
25
11
  import { FmtSchemeVisitor } from './FmtSchemeVisitor';
26
12
  import { AutoFilterVisitor } from './AutoFilterVisitor';
27
13
  import { SortStateVisitor } from './SortStateVisitor';
@@ -32,6 +18,7 @@ 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';
35
22
  import { FormControlPrVisitor } from './FormControlPrVisitor';
36
23
  import { DrawingVisitor } from './DrawingVisitor';
37
24
  import { DrawingAnchorVisitor } from './DrawingAnchorVisitor';
@@ -41,8 +28,7 @@ import { DrawingPicVisitor } from './DrawingPicVisitor';
41
28
  import { DrawingGrpSpVisitor } from './DrawingGrpSpVisitor';
42
29
  import { DrawingCxnSpVisitor } from './DrawingCxnSpVisitor';
43
30
  import { MetadataVisitor } from './MetadataVisitor';
44
- import { RichValueStructureVisitor } from './RichValueStructureVisitor';
45
- import { RichValueDataVisitor } from './RichValueDataVisitor';
31
+ import { FeaturePropertyBagVisitor } from './FeaturePropertyBagVisitor';
46
32
  import { CommentsVisitor } from './CommentsVisitor';
47
33
  import { CommentVisitor } from './CommentVisitor';
48
34
  import { ThreadedCommentsVisitor } from './ThreadedCommentsVisitor';
@@ -52,27 +38,13 @@ export declare const BuiltInVisitors: {
52
38
  RelsVisitor: typeof RelsVisitor;
53
39
  CorePropertiesVisitor: typeof CorePropertiesVisitor;
54
40
  AppPropertiesVisitor: typeof AppPropertiesVisitor;
55
- ChartSpaceVisitor: typeof ChartSpaceVisitor;
56
- ChartVisitor: typeof ChartVisitor;
57
- PlotAreaVisitor: typeof PlotAreaVisitor;
58
41
  ShapePropertiesVisitor: typeof ShapePropertiesVisitor;
59
- BarChartTypeVisitor: typeof BarChartTypeVisitor;
60
- ChartTypeVisitor: typeof ChartTypeVisitor;
61
- DataLabelsVisitor: typeof DataLabelsVisitor;
62
- SeriesVisitor: typeof SeriesVisitor;
63
- DataPointVisitor: typeof DataPointVisitor;
64
- MarkerVisitor: typeof MarkerVisitor;
65
- AxisVisitor: typeof AxisVisitor;
66
42
  TextPropertiesVisitor: typeof TextPropertiesVisitor;
67
43
  ShapeTextVisitor: typeof ShapeTextVisitor;
68
- LegendEntryVisitor: typeof LegendEntryVisitor;
69
- LegendVisitor: typeof LegendVisitor;
70
- NegativeShapeVisitor: typeof NegativeShapeVisitor;
71
- TitleVisitor: typeof TitleVisitor;
72
- LayoutVisitor: typeof LayoutVisitor;
73
44
  ThemeVisitor: typeof ThemeVisitor;
74
45
  ClrSchemeVisitor: typeof ClrSchemeVisitor;
75
46
  FontSchemeVisitor: typeof FontSchemeVisitor;
47
+ ObjectDefaultsVisitor: typeof ObjectDefaultsVisitor;
76
48
  FmtSchemeVisitor: typeof FmtSchemeVisitor;
77
49
  AutoFilterVisitor: typeof AutoFilterVisitor;
78
50
  SortStateVisitor: typeof SortStateVisitor;
@@ -83,6 +55,7 @@ export declare const BuiltInVisitors: {
83
55
  ExternalLinkVisitor: typeof ExternalLinkVisitor;
84
56
  SlicerCacheDefinitionVisitor: typeof SlicerCacheDefinitionVisitor;
85
57
  SlicersVisitor: typeof SlicersVisitor;
58
+ TimelinesVisitor: typeof TimelinesVisitor;
86
59
  FormControlPrVisitor: typeof FormControlPrVisitor;
87
60
  DrawingVisitor: typeof DrawingVisitor;
88
61
  DrawingAnchorVisitor: typeof DrawingAnchorVisitor;
@@ -92,8 +65,7 @@ export declare const BuiltInVisitors: {
92
65
  DrawingGrpSpVisitor: typeof DrawingGrpSpVisitor;
93
66
  DrawingCxnSpVisitor: typeof DrawingCxnSpVisitor;
94
67
  MetadataVisitor: typeof MetadataVisitor;
95
- RichValueStructureVisitor: typeof RichValueStructureVisitor;
96
- RichValueDataVisitor: typeof RichValueDataVisitor;
68
+ FeaturePropertyBagVisitor: typeof FeaturePropertyBagVisitor;
97
69
  CommentsVisitor: typeof CommentsVisitor;
98
70
  CommentVisitor: typeof CommentVisitor;
99
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" | "formControl") => 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
@@ -0,0 +1,61 @@
1
+ import { IRichType, Scalar } from '@sheetxl/sdk';
2
+ import { RichPrimitiveType } from './IRichValueHandler';
3
+ /** A key of a structure or a bag structure: its name and type code (none for a number). */
4
+ export type RichStructureKey = readonly [name: string, type?: RichPrimitiveType | 'spba', defaultValue?: string];
5
+ /** A structure written: `<s t>` and its keys. @internal */
6
+ export interface RichValueStructureDef {
7
+ readonly structure: string;
8
+ readonly props: readonly RichStructureKey[];
9
+ }
10
+ /** An item of an array or a bag array: `<v t>`. */
11
+ export type RichItemText = readonly [type: string | undefined, text: string];
12
+ /** A `richStyles` entry. */
13
+ export interface RichStyleDef {
14
+ readonly numberFormat?: string;
15
+ readonly isTitle?: boolean;
16
+ readonly isHero?: boolean;
17
+ }
18
+ /**
19
+ * What the record writer writes into: the file's rich data tables. Every add answers the index
20
+ * the file names the entry by; equal entries share one.
21
+ *
22
+ * @internal
23
+ */
24
+ export interface RichValueSink {
25
+ /** The structure `t` with `keys`, added when new. */
26
+ structureFor(t: string, keys: readonly RichStructureKey[]): RichValueStructureDef;
27
+ /** An `<rv>`: its index in rdrichvalue.xml. */
28
+ addValue(structure: RichValueStructureDef, values: readonly string[], fb?: string): number;
29
+ /** An `<rv>` for a value a handler writes (an error, a picture), or `null`. */
30
+ addHandled(value: Scalar): number | null;
31
+ /** An `<a>` of rdarray.xml. */
32
+ addArray(rows: number, columns: number, items: readonly RichItemText[]): number;
33
+ /** An `<spb>`. */
34
+ addBag(keys: readonly RichStructureKey[], values: readonly string[]): number;
35
+ /** An `<a>` of the bags' `spbArrays`. */
36
+ addBagArray(items: readonly RichItemText[]): number;
37
+ /** A `richStyles` entry, 1-based as bags name them. */
38
+ addRichStyle(style: RichStyleDef): number;
39
+ /** A key's flags for the structure type `t`. */
40
+ addKeyFlags(t: string, key: string, flags: readonly (readonly [name: string, value: string])[]): void;
41
+ }
42
+ /** What a kind is a kind of: its name up to the digest (`_linkedentitycore:3f…` → `_linkedentitycore`). */
43
+ export declare const baseOfKind: (kind: IRichType) => string;
44
+ /**
45
+ * Writes rich values as Excel's rich data: records as `<rv>`s of their kind's structure, nested
46
+ * values by index, presentation back into Excel's bags.
47
+ *
48
+ * @remarks
49
+ * The inverse of `createRichValueResolver`. A key's type follows its kind's declared value type,
50
+ * so a number in a `rich` key is written as a `_formattednumber` carrying its format (geography)
51
+ * and a number in a number key takes its format from the record's `_Format` bag (finance). A full
52
+ * entity record is written with the form a cell or a parent names it by: the finance wrapper
53
+ * (`_linkedentity`, `%cvi`), or the geography stub (`_linkedentity2`) beside its full record.
54
+ *
55
+ * @internal
56
+ */
57
+ export declare const createRichRecordWriter: (sink: RichValueSink) => {
58
+ /** The `<rv>` a cell holding `value` names, or `null` when `value` is not one this writes. */
59
+ writeCell: (value: Scalar) => number | null;
60
+ };
61
+ //# sourceMappingURL=RichRecordWriter.d.ts.map
@@ -0,0 +1,25 @@
1
+ import { Scalar } from '@sheetxl/sdk';
2
+ import { IRichValueHandler } from './IRichValueHandler';
3
+ /**
4
+ * The rich value handlers the xlsx reader and writer dispatch through: one per Excel structure
5
+ * type, found by the structure when reading and by the value when writing.
6
+ *
7
+ * @internal
8
+ */
9
+ export declare namespace RichValueHandlers {
10
+ /**
11
+ * Adds a handler, replacing one for the same structure. Where several write one kind, the one
12
+ * registered last that {@link IRichValueHandler.writes} the value writes it.
13
+ */
14
+ function register(handler: IRichValueHandler): void;
15
+ /** Every handler, in registration order. */
16
+ function getAll(): IRichValueHandler[];
17
+ /** The handler that reads a structure type (`t=` on `<s>`), or `null`. */
18
+ function getByStructure(structure: string): IRichValueHandler | null;
19
+ /**
20
+ * The handler that writes a cell value: its kind's for a rich value; for an error with no kind
21
+ * of its own, `_error`. `null` when none does.
22
+ */
23
+ function getForValue(value: Scalar): IRichValueHandler | null;
24
+ }
25
+ //# sourceMappingURL=RichValueHandlers.d.ts.map