@sheetxl/io-xlsx 0.8.0-beta.10 → 0.8.0-beta.12

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 (143) hide show
  1. package/browser/esm/{BLXcoiDAaOMjFuhw.mjs → 9dwUocbOsJuAcmKn.mjs} +3021 -1986
  2. package/browser/esm/{xc_LzCPgHn-acgFZ.mjs → BIvDjK4Zl8bWRgl8.mjs} +2 -2
  3. package/browser/esm/CcH5ITJFTMVWUJO9.mjs +6154 -0
  4. package/browser/esm/{CI_CZI5m5-KkiAK5.mjs → D8k22TSWPd_RHEpj.mjs} +1798 -1009
  5. package/browser/esm/{BKT8OBj-bhQwdg49.mjs → DKnOwucZq4z9_-r-.mjs} +47 -10
  6. package/browser/esm/{2EOdn2WRK5y1L58S.mjs → DO75RoAQTgMuVzXv.mjs} +2 -2
  7. package/browser/esm/{NQIuOQIleHC4NUW6.mjs → DVLJTjJCGqrJUa8c.mjs} +587 -705
  8. package/browser/esm/DeMZN_qj__PKo4Wh.mjs +2265 -0
  9. package/browser/esm/{DXopGe8PrLWmwGaV.mjs → DsppUz-14Z7ti9i3.mjs} +1 -1
  10. package/browser/esm/{B-jb5SuiVh5NnBG_.mjs → aUBXbTh2r0u3x4Xo.mjs} +2 -2
  11. package/browser/esm/index.mjs +2 -2
  12. package/node/esm/BmIIQODk4dBVIXA4.mjs +4455 -0
  13. package/node/esm/{CHqRP_NjPpPd7m9L.mjs → C-e5AO_4TnGywT-m.mjs} +1 -1
  14. package/node/esm/C78E45n6j2E8rruH.mjs +5694 -0
  15. package/node/esm/CDKm5s3JE_d99TJw.mjs +2369 -0
  16. package/node/esm/{BmdmvgO5Zdgx-RWo.mjs → DCaAOfuW-w_dx_qd.mjs} +2 -2
  17. package/node/esm/{O5mti2R9drFOlXc7.mjs → DSgxL0sBZtWMydVl.mjs} +2 -2
  18. package/node/esm/DXusvwW73FUDSyvD.mjs +6367 -0
  19. package/node/esm/DsyuWxk3bdGhJUQN.mjs +2346 -0
  20. package/node/esm/index.mjs +64 -27
  21. package/package.json +3 -3
  22. package/types/src/AutoFilterRules.d.ts +8 -1
  23. package/types/src/DataTableFormula.d.ts +36 -0
  24. package/types/src/DefinedNameAttributes.d.ts +8 -0
  25. package/types/src/ExcelCompat.d.ts +15 -3
  26. package/types/src/KnownFonts.d.ts +50 -0
  27. package/types/src/LegacyFormula.d.ts +13 -0
  28. package/types/src/PageLayoutAttributes.d.ts +8 -0
  29. package/types/src/Plugin.d.ts +12 -0
  30. package/types/src/ProtectionAttributes.d.ts +2 -2
  31. package/types/src/SheetKinds.d.ts +57 -0
  32. package/types/src/SheetViewAttributes.d.ts +4 -0
  33. package/types/src/SortExtent.d.ts +16 -0
  34. package/types/src/Types.d.ts +11 -0
  35. package/types/src/XlsxHeader.d.ts +19 -0
  36. package/types/src/chart/ChartExXml.d.ts +38 -0
  37. package/types/src/chart/ChartPartXml.d.ts +47 -0
  38. package/types/src/chart/ChartSpaceXml.d.ts +37 -0
  39. package/types/src/chart/_XmlTree.d.ts +34 -0
  40. package/types/src/chart/_chartCodecs.d.ts +12 -0
  41. package/types/src/chart/_chartExCodecs.d.ts +7 -0
  42. package/types/src/chart/_chartExFold.d.ts +14 -0
  43. package/types/src/chart/_chartExMarkup.d.ts +236 -0
  44. package/types/src/chart/_chartExStyle.d.ts +22 -0
  45. package/types/src/chart/_codec.d.ts +78 -0
  46. package/types/src/chart/_drawingml.d.ts +10 -0
  47. package/types/src/chart/_xml.d.ts +70 -0
  48. package/types/src/reader/CellControls.d.ts +18 -0
  49. package/types/src/reader/DocumentPropertiesRead.d.ts +16 -0
  50. package/types/src/reader/DummyFunctionUnwrap.d.ts +2 -2
  51. package/types/src/reader/HeaderStyles.d.ts +15 -0
  52. package/types/src/reader/IsoDateCell.d.ts +20 -0
  53. package/types/src/reader/LibreOfficeDataTable.d.ts +12 -0
  54. package/types/src/reader/domVisitors/AppPropertiesVisitor.d.ts +13 -1
  55. package/types/src/reader/domVisitors/AutoFilterVisitor.d.ts +3 -3
  56. package/types/src/reader/domVisitors/CommentVisitor.d.ts +2 -2
  57. package/types/src/reader/domVisitors/DrawingElementVisitor.d.ts +3 -1
  58. package/types/src/reader/domVisitors/DrawingGraphicFrameVisitor.d.ts +2 -2
  59. package/types/src/reader/domVisitors/DrawingPicVisitor.d.ts +23 -8
  60. package/types/src/reader/domVisitors/ExternalLinkVisitor.d.ts +1 -1
  61. package/types/src/reader/domVisitors/FeaturePropertyBagVisitor.d.ts +27 -0
  62. package/types/src/reader/domVisitors/FontSchemeVisitor.d.ts +3 -2
  63. package/types/src/reader/domVisitors/ObjectDefaultsVisitor.d.ts +11 -0
  64. package/types/src/reader/domVisitors/SheetColorContainerVisitor.d.ts +2 -2
  65. package/types/src/reader/domVisitors/SheetStyleVisitor.d.ts +8 -0
  66. package/types/src/reader/domVisitors/SortStateVisitor.d.ts +2 -2
  67. package/types/src/reader/domVisitors/ThreadedCommentsVisitor.d.ts +2 -2
  68. package/types/src/reader/domVisitors/_Dxfs.d.ts +10 -0
  69. package/types/src/reader/domVisitors/index.d.ts +4 -34
  70. package/types/src/reader/saxVisitors/ContentTypesVisitor.d.ts +1 -0
  71. package/types/src/reader/saxVisitors/SharedStringsVisitor.d.ts +46 -6
  72. package/types/src/reader/saxVisitors/WorksheetVisitor.d.ts +24 -8
  73. package/types/src/richValue/ErrorRichValueHandler.d.ts +22 -0
  74. package/types/src/richValue/IRichValueHandler.d.ts +109 -0
  75. package/types/src/richValue/LocalImageRichValueHandler.d.ts +18 -0
  76. package/types/src/richValue/RichDataParts.d.ts +69 -0
  77. package/types/src/richValue/RichRecordWriter.d.ts +61 -0
  78. package/types/src/richValue/RichValueHandlers.d.ts +25 -0
  79. package/types/src/richValue/RichValueResolver.d.ts +54 -0
  80. package/types/src/richValue/WebImageRichValueHandler.d.ts +42 -0
  81. package/types/src/richValue/index.d.ts +7 -0
  82. package/types/src/utils/DrawingMLText.d.ts +2 -2
  83. package/types/src/utils/FormControls.d.ts +4 -4
  84. package/types/src/utils/SharedNames.d.ts +13 -0
  85. package/types/src/utils/SpreadsheetFont.d.ts +38 -0
  86. package/types/src/utils/VmlNoteShapes.d.ts +16 -23
  87. package/types/src/utils/VmlNoteStyle.d.ts +44 -0
  88. package/types/src/utils/VmlPrefixes.d.ts +24 -0
  89. package/types/src/writer/builder/PackageBuilder.d.ts +2 -0
  90. package/types/src/writer/builder/Types.d.ts +7 -0
  91. package/types/src/writer/emitters/CommentsEmitter.d.ts +3 -3
  92. package/types/src/writer/emitters/DrawingEmitter.d.ts +2 -2
  93. package/types/src/writer/emitters/FeaturePropertyBagEmitter.d.ts +18 -0
  94. package/types/src/writer/emitters/LegacyDrawingEmitter.d.ts +4 -4
  95. package/types/src/writer/emitters/PropsCoreEmitter.d.ts +7 -2
  96. package/types/src/writer/emitters/PropsCustomEmitter.d.ts +15 -0
  97. package/types/src/writer/emitters/RichValuePartsEmitters.d.ts +36 -0
  98. package/types/src/writer/emitters/RichValueRelEmitter.d.ts +12 -0
  99. package/types/src/writer/emitters/RichValueStructureEmitter.d.ts +4 -3
  100. package/types/src/writer/emitters/RichValueTypesEmitter.d.ts +3 -2
  101. package/types/src/writer/emitters/RichValueWebImageEmitter.d.ts +24 -0
  102. package/types/src/writer/emitters/SharedStringsEmitter.d.ts +6 -3
  103. package/types/src/writer/emitters/SlicerEmitter.d.ts +8 -5
  104. package/types/src/writer/emitters/StylesEmitter.d.ts +2 -0
  105. package/types/src/writer/emitters/WorkbookEmitter.d.ts +5 -0
  106. package/types/src/writer/emitters/WorksheetEmitter.d.ts +4 -3
  107. package/types/src/writer/utils/AutoFilter.d.ts +1 -1
  108. package/types/src/writer/utils/CellControlComplements.d.ts +29 -0
  109. package/types/src/writer/utils/DefaultRows.d.ts +38 -0
  110. package/types/src/writer/utils/DxfCollector.d.ts +11 -8
  111. package/types/src/writer/utils/HiddenFormulaXfs.d.ts +1 -1
  112. package/types/src/writer/utils/RichValueCollector.d.ts +81 -129
  113. package/types/src/writer/utils/SheetStyleLayout.d.ts +86 -0
  114. package/types/src/writer/utils/TextUtils.d.ts +6 -1
  115. package/types/src/writer/utils/UnsupportedFunctions.d.ts +2 -2
  116. package/browser/esm/BPmehfSqdvgsLBsB.mjs +0 -5153
  117. package/node/esm/BpxxiZ2oKPkUSfdB.mjs +0 -2486
  118. package/node/esm/CtAF486aZqYzMeLM.mjs +0 -3651
  119. package/node/esm/QS_theNoeqNGLStj.mjs +0 -5298
  120. package/node/esm/nNQ7MG89sGKwkjMA.mjs +0 -4649
  121. package/types/src/legacyChart/OOXMLMappings.d.ts +0 -8
  122. package/types/src/legacyChart/OOXMLUtils.d.ts +0 -78
  123. package/types/src/legacyChart/ToOOXMLConverter.d.ts +0 -30
  124. package/types/src/reader/domVisitors/AxisVisitor.d.ts +0 -12
  125. package/types/src/reader/domVisitors/BarChartTypeVisitor.d.ts +0 -6
  126. package/types/src/reader/domVisitors/ChartSpaceVisitor.d.ts +0 -6
  127. package/types/src/reader/domVisitors/ChartTypeVisitor.d.ts +0 -7
  128. package/types/src/reader/domVisitors/ChartVisitor.d.ts +0 -7
  129. package/types/src/reader/domVisitors/DataLabelsVisitor.d.ts +0 -8
  130. package/types/src/reader/domVisitors/DataPointVisitor.d.ts +0 -6
  131. package/types/src/reader/domVisitors/LayoutVisitor.d.ts +0 -5
  132. package/types/src/reader/domVisitors/LegendEntryVisitor.d.ts +0 -5
  133. package/types/src/reader/domVisitors/LegendVisitor.d.ts +0 -5
  134. package/types/src/reader/domVisitors/MarkerVisitor.d.ts +0 -5
  135. package/types/src/reader/domVisitors/NegativeShapeVisitor.d.ts +0 -6
  136. package/types/src/reader/domVisitors/PlotAreaVisitor.d.ts +0 -5
  137. package/types/src/reader/domVisitors/RichValueDataVisitor.d.ts +0 -7
  138. package/types/src/reader/domVisitors/RichValueStructureVisitor.d.ts +0 -6
  139. package/types/src/reader/domVisitors/SeriesVisitor.d.ts +0 -8
  140. package/types/src/reader/domVisitors/TitleVisitor.d.ts +0 -9
  141. package/types/src/writer/emitters/ChartColorsEmitter.d.ts +0 -7
  142. package/types/src/writer/emitters/ChartEmitter.d.ts +0 -14
  143. package/types/src/writer/emitters/ChartStyleEmitter.d.ts +0 -46
@@ -0,0 +1,34 @@
1
+ /**
2
+ * A tree over a chart part's markup that remembers where each element is in the source.
3
+ *
4
+ * @remarks
5
+ * The chart reader keeps what it does not model as the source's own markup, so it needs each
6
+ * element's extent in the text, which a DOM does not give. Elements, attributes and character data
7
+ * only; comments and processing instructions are skipped.
8
+ */
9
+ /** One element. `name` is the local name. */
10
+ export interface XmlElement {
11
+ name: string;
12
+ /** The name as the source spells it, prefix included. */
13
+ qname: string;
14
+ /** The attributes as the source spells them, undecoded. */
15
+ attrs: string;
16
+ children: (XmlElement | string)[];
17
+ /** Where the element starts in the source: at its open tag. */
18
+ start: number;
19
+ /** Just past the element's close tag, or past its open tag when it is empty. */
20
+ end: number;
21
+ /** Just past the open tag. */
22
+ contentStart: number;
23
+ /** At the close tag; equal to `contentStart` for an empty element. */
24
+ contentEnd: number;
25
+ }
26
+ export declare const decodeEntities: (text: string) => string;
27
+ /** Character data as it has to be spelled inside an element. */
28
+ export declare const encodeText: (text: string) => string;
29
+ /** The root element of `xml`, or `null` when there is none. */
30
+ export declare const parseFragment: (xml: string) => XmlElement | null;
31
+ export declare const childElements: (element: XmlElement) => XmlElement[];
32
+ /** The element's own character data; what its child elements hold is not read. */
33
+ export declare const readCharacters: (element: XmlElement) => string;
34
+ //# sourceMappingURL=_XmlTree.d.ts.map
@@ -0,0 +1,12 @@
1
+ import { ChartModel } from '@sheetxl/sdk';
2
+ import { Codec } from './_codec';
3
+ import { XmlWriter } from './_xml';
4
+ export declare const NUMBER_FORMAT: Codec;
5
+ /** The DrawingML element name of a group. */
6
+ export declare const groupElementName: (group: Pick<ChartModel.Group, "type" | "is3D">) => string;
7
+ /** Whether a group, a series or a point of the chart states a `dLblPos` its type does not offer. */
8
+ export declare const statesRefusedLabelPosition: (chartSpace: ChartModel.ChartSpace) => boolean;
9
+ /** `c:chartSpace`. */
10
+ export declare const CHART_SPACE: Codec;
11
+ export declare const writeChartSpaceElement: (writer: XmlWriter, chartSpace: ChartModel.ChartSpace) => void;
12
+ //# sourceMappingURL=_chartCodecs.d.ts.map
@@ -0,0 +1,7 @@
1
+ import { ChartExMarkup } from './_chartExMarkup';
2
+ import { Codec } from './_codec';
3
+ import { XmlWriter } from './_xml';
4
+ /** `cx:chartSpace`. */
5
+ export declare const CHART_EX_SPACE: Codec;
6
+ export declare const writeChartExSpaceElement: (writer: XmlWriter, chartSpace: ChartExMarkup.ChartSpace) => void;
7
+ //# sourceMappingURL=_chartExCodecs.d.ts.map
@@ -0,0 +1,14 @@
1
+ import { ChartModel } from '@sheetxl/sdk';
2
+ import { ChartExMarkup } from './_chartExMarkup';
3
+ /** The group types a `cx:chartSpace` part states. */
4
+ export declare const CHART_EX_GROUP_TYPES: ReadonlySet<string>;
5
+ /** A `cx:chartSpace` as the one chart model. */
6
+ export declare const foldChartEx: (chartSpace: ChartExMarkup.ChartSpace) => ChartModel.ChartSpace;
7
+ /**
8
+ * The one chart model as a `cx:chartSpace`. Groups of a type the part cannot state are left out;
9
+ * the caller says so.
10
+ */
11
+ export declare const unfoldChartEx: (model: ChartModel.ChartSpace) => ChartExMarkup.ChartSpace;
12
+ /** Whether `model`, folded from `chartSpace`, unfolds to it again: whether the model states all it says. */
13
+ export declare const isLossless: (chartSpace: ChartExMarkup.ChartSpace, model: ChartModel.ChartSpace) => boolean;
14
+ //# sourceMappingURL=_chartExFold.d.ts.map
@@ -0,0 +1,236 @@
1
+ import { ChartModel } from '@sheetxl/sdk';
2
+ /**
3
+ * A `cx:chartSpace` part as the chartex codecs read and write it, element for element: the step
4
+ * between the markup and {@link ChartModel}, which states a 2016 chart as groups and series like any
5
+ * other (`_chartExFold`).
6
+ *
7
+ * @remarks
8
+ * Names are the vocabulary's own (`layoutId`, `catScaling`, `dataLabels`) except the collections
9
+ * (`data`, `dimensions`, `levels`, `series`, `points`, `labels`, `axes`), and whatever is not
10
+ * read is kept as markup in the {@link ChartModel.Unknown} bag of the element that held it. A series
11
+ * names its data by `dataId`; the data lists its dimensions, each a formula and the values it last
12
+ * read.
13
+ */
14
+ export declare namespace ChartExMarkup {
15
+ /** Any element of the model. */
16
+ type Element = ChartModel.Element;
17
+ /** `cx:chartSpace`, the root of a chartex part. */
18
+ interface ChartSpace extends Element {
19
+ chartData: ChartData;
20
+ chart: Chart;
21
+ spPr?: ChartModel.ShapeProperties;
22
+ txPr?: ChartModel.TextBody;
23
+ }
24
+ /** `cx:chartData`: the data every series of the chart reads. */
25
+ interface ChartData extends Element {
26
+ /** In the order the file lists them. */
27
+ data: Data[];
28
+ }
29
+ /** `cx:data`: the dimensions one series plots. */
30
+ interface Data extends Element {
31
+ /** What a series' `dataId` names it by. */
32
+ id: number;
33
+ /** `cx:numDim` and `cx:strDim`, in the order the file lists them. */
34
+ dimensions: Dimension[];
35
+ }
36
+ /** What a numeric dimension holds: values, x and y, sizes, or the values a region map colors by. */
37
+ type NumericDimensionType = 'val' | 'x' | 'y' | 'size' | 'colorVal';
38
+ /** What a string dimension holds: categories, the text a region map colors by, or entity ids. */
39
+ type StringDimensionType = 'cat' | 'colorStr' | 'entityId';
40
+ /**
41
+ * `cx:numDim` or `cx:strDim`, told apart by `type`: one dimension of a series' data.
42
+ *
43
+ * @remarks
44
+ * Excel names a hidden defined name in `f` (`_xlchart.v1.0`), whose own formula is the range.
45
+ */
46
+ interface Dimension extends Element {
47
+ type: NumericDimensionType | StringDimensionType;
48
+ /** The values' formula. */
49
+ f?: DataReference;
50
+ /** The formula of the dimension's name: the cell above the values. */
51
+ nf?: DataReference;
52
+ /** `cx:lvl`: the values as last read, one level per row or column of the range, the outermost first. */
53
+ levels?: Level[];
54
+ }
55
+ /** `cx:f`, `cx:nf`: a formula. */
56
+ interface DataReference extends Element {
57
+ f: string;
58
+ /** Whether the range is read by column (the default) or by row. */
59
+ dir?: 'col' | 'row';
60
+ }
61
+ /** `cx:lvl`: one level of cached values. */
62
+ interface Level extends Element {
63
+ ptCount?: number;
64
+ /** Numeric levels state the format their values were read with. */
65
+ formatCode?: string;
66
+ name?: string;
67
+ /** By `idx`: a point the level leaves out is blank. */
68
+ points?: Point[];
69
+ }
70
+ /** `cx:pt`. */
71
+ interface Point extends Element {
72
+ idx: number;
73
+ /** The value as the file spells it. */
74
+ v: string;
75
+ }
76
+ /** `cx:chart`. */
77
+ interface Chart extends Element {
78
+ title?: Title;
79
+ plotArea: PlotArea;
80
+ legend?: Legend;
81
+ }
82
+ type SidePosition = 'l' | 't' | 'r' | 'b';
83
+ type PositionAlign = 'min' | 'ctr' | 'max';
84
+ /** `cx:title`. */
85
+ interface Title extends Element {
86
+ pos?: SidePosition;
87
+ align?: PositionAlign;
88
+ overlay?: boolean;
89
+ tx?: Text;
90
+ spPr?: ChartModel.ShapeProperties;
91
+ txPr?: ChartModel.TextBody;
92
+ }
93
+ /** `cx:tx`: text read from a cell, written into the chart, or rich text. */
94
+ interface Text extends Element {
95
+ txData?: TextData;
96
+ rich?: ChartModel.TextBody;
97
+ }
98
+ /** `cx:txData`: a formula naming a cell and the text it last read, or text written into the chart. */
99
+ interface TextData extends Element {
100
+ f?: DataReference;
101
+ v?: string;
102
+ }
103
+ /** `cx:plotArea`. */
104
+ interface PlotArea extends Element {
105
+ plotAreaRegion: PlotAreaRegion;
106
+ /** `cx:axis`, in the order the file lists them. */
107
+ axes: Axis[];
108
+ spPr?: ChartModel.ShapeProperties;
109
+ }
110
+ /** `cx:plotAreaRegion`: the series, drawn over one surface. */
111
+ interface PlotAreaRegion extends Element {
112
+ plotSurface?: PlotSurface;
113
+ series: Series[];
114
+ }
115
+ interface PlotSurface extends Element {
116
+ spPr?: ChartModel.ShapeProperties;
117
+ }
118
+ /**
119
+ * How a series is drawn. A histogram is a `clusteredColumn` series with binning; a pareto adds a
120
+ * `paretoLine` series owned by it (`ownerIdx`).
121
+ */
122
+ type LayoutId = 'boxWhisker' | 'clusteredColumn' | 'funnel' | 'paretoLine' | 'regionMap' | 'sunburst' | 'treemap' | 'waterfall';
123
+ /** `cx:series`. */
124
+ interface Series extends Element {
125
+ layoutId: LayoutId;
126
+ hidden?: boolean;
127
+ /** The index of the series this one belongs to: a pareto's line names its columns. */
128
+ ownerIdx?: number;
129
+ uniqueId?: string;
130
+ formatIdx?: number;
131
+ tx?: Text;
132
+ spPr?: ChartModel.ShapeProperties;
133
+ /** `cx:dataPt`: what one point states for itself. */
134
+ points?: DataPoint[];
135
+ dataLabels?: DataLabels;
136
+ /** The {@link Data.id} of the data the series plots. */
137
+ dataId?: number;
138
+ layoutPr?: LayoutProperties;
139
+ /** `cx:axisId`: the axes the series draws against, when it says. */
140
+ axisIds?: number[];
141
+ }
142
+ /** `cx:dataPt`. */
143
+ interface DataPoint extends Element {
144
+ idx: number;
145
+ spPr?: ChartModel.ShapeProperties;
146
+ }
147
+ type DataLabelPosition = 'bestFit' | 'b' | 'ctr' | 'inBase' | 'inEnd' | 'l' | 'outEnd' | 'r' | 't';
148
+ /** What `cx:dataLabels` and `cx:dataLabel` share. */
149
+ interface DataLabelOptions extends Element {
150
+ pos?: DataLabelPosition;
151
+ numFmt?: ChartModel.NumberFormat;
152
+ spPr?: ChartModel.ShapeProperties;
153
+ txPr?: ChartModel.TextBody;
154
+ visibility?: DataLabelVisibility;
155
+ separator?: string;
156
+ }
157
+ /** `cx:dataLabels`: the labels of a series, with the ones that differ listed in `labels`. */
158
+ interface DataLabels extends DataLabelOptions {
159
+ labels?: DataLabel[];
160
+ /** `cx:dataLabelHidden`: the points that show no label. */
161
+ hiddenLabels?: HiddenDataLabel[];
162
+ }
163
+ /** `cx:dataLabel`: the label of one point. */
164
+ interface DataLabel extends DataLabelOptions {
165
+ idx: number;
166
+ }
167
+ interface HiddenDataLabel extends Element {
168
+ idx: number;
169
+ }
170
+ /** `cx:visibility` of a label: what it shows. */
171
+ interface DataLabelVisibility extends Element {
172
+ seriesName?: boolean;
173
+ categoryName?: boolean;
174
+ value?: boolean;
175
+ }
176
+ /** `cx:layoutPr`: the model's layout options, and the indexes of a waterfall's totals. */
177
+ interface LayoutProperties extends ChartModel.LayoutProperties {
178
+ /** `cx:subtotals`: the indexes of the points that are totals. */
179
+ subtotals?: number[];
180
+ }
181
+ /** `cx:axis`. */
182
+ interface Axis extends Element {
183
+ id: number;
184
+ hidden?: boolean;
185
+ /** A category axis states this, a value axis {@link valScaling}. */
186
+ catScaling?: CategoryAxisScaling;
187
+ valScaling?: ValueAxisScaling;
188
+ title?: AxisTitle;
189
+ units?: AxisUnits;
190
+ majorGridlines?: Gridlines;
191
+ minorGridlines?: Gridlines;
192
+ majorTickMarks?: TickMarks;
193
+ minorTickMarks?: TickMarks;
194
+ /** `cx:tickLabels`: the axis shows its labels. Present when stated. */
195
+ tickLabels?: Element;
196
+ numFmt?: ChartModel.NumberFormat;
197
+ spPr?: ChartModel.ShapeProperties;
198
+ txPr?: ChartModel.TextBody;
199
+ }
200
+ interface CategoryAxisScaling extends Element {
201
+ /** The gap between categories as a fraction of a category's width. A stated `auto` is kept as markup. */
202
+ gapWidth?: number;
203
+ }
204
+ /** A bound or unit not stated is automatic. A stated `auto` is kept as markup. */
205
+ interface ValueAxisScaling extends Element {
206
+ max?: number;
207
+ min?: number;
208
+ majorUnit?: number;
209
+ minorUnit?: number;
210
+ }
211
+ interface AxisTitle extends Element {
212
+ tx?: Text;
213
+ spPr?: ChartModel.ShapeProperties;
214
+ txPr?: ChartModel.TextBody;
215
+ }
216
+ /** `cx:units`: the axis labels in hundreds, thousands… or as percentages. */
217
+ interface AxisUnits extends Element {
218
+ unit?: string;
219
+ unitsLabel?: AxisTitle;
220
+ }
221
+ interface Gridlines extends Element {
222
+ spPr?: ChartModel.ShapeProperties;
223
+ }
224
+ interface TickMarks extends Element {
225
+ type?: ChartModel.TickMark;
226
+ }
227
+ /** `cx:legend`. */
228
+ interface Legend extends Element {
229
+ pos?: SidePosition;
230
+ align?: PositionAlign;
231
+ overlay?: boolean;
232
+ spPr?: ChartModel.ShapeProperties;
233
+ txPr?: ChartModel.TextBody;
234
+ }
235
+ }
236
+ //# sourceMappingURL=_chartExMarkup.d.ts.map
@@ -0,0 +1,22 @@
1
+ /**
2
+ * The style and colors parts a 2016 chart is written with when it has none of its own: Excel 16
3
+ * refuses to open a workbook whose `cx:chartSpace` part lacks either, or has an empty one, and opens
4
+ * one that has any complete pair (measured 2026-10-17, `probe-chart-write.ps1`: every 2016 type with
5
+ * the waterfall's style opens clean). These are the parts Excel 16 wrote for a new waterfall
6
+ * (`probe-chart-chartex.ps1`, `chart-chartex.xlsx`); its colors part is the same for every type.
7
+ * Which style each type gets in Excel is in that file too; writing each type its own is Phase 4's
8
+ * style tables.
9
+ */
10
+ export declare const CHART_STYLE_PART: {
11
+ type: string;
12
+ contentType: string;
13
+ name: string;
14
+ xml: string;
15
+ };
16
+ export declare const CHART_COLORS_PART: {
17
+ type: string;
18
+ contentType: string;
19
+ name: string;
20
+ xml: string;
21
+ };
22
+ //# sourceMappingURL=_chartExStyle.d.ts.map
@@ -0,0 +1,78 @@
1
+ import { XmlElement } from './_XmlTree';
2
+ import { Scope, XmlWriter } from './_xml';
3
+ /** What one read of a part shares. */
4
+ export declare class ReadContext {
5
+ readonly xml: string;
6
+ readonly rootScope: Scope;
7
+ /** Elements kept as markup because the model could not state them exactly. */
8
+ kept: number;
9
+ /** Children read out of schema order, which a writer puts back in it. */
10
+ reordered: number;
11
+ /** How the writer's `c:`, `cx:` and `a:` read in this part: the part's own namespaces. */
12
+ readonly writeScope: Scope;
13
+ constructor(xml: string, rootScope: Scope);
14
+ /**
15
+ * The source markup of `element`, made to stand alone: a namespace declared between the root
16
+ * and the element is declared on it.
17
+ */
18
+ markupOf(element: XmlElement, scope: Scope): string;
19
+ }
20
+ export type Vocabulary = 'c' | 'a' | 'c15' | 'cx';
21
+ export interface AttributeSpec {
22
+ name: string;
23
+ key: string;
24
+ read(text: string): unknown;
25
+ write(value: any): string;
26
+ }
27
+ export interface FieldSpec {
28
+ /** The local names the field reads; more than one for a choice (`noFill`, `solidFill`…). */
29
+ tags: readonly string[];
30
+ key: string;
31
+ ns: Vocabulary;
32
+ many?: boolean;
33
+ /**
34
+ * The value of `element`, or `undefined` when the model cannot state it: it is then kept as
35
+ * markup. `scope` includes what `element` declares itself.
36
+ */
37
+ read(element: XmlElement, scope: Scope, context: ReadContext): unknown;
38
+ write(writer: XmlWriter, value: any): void;
39
+ /** Where the value lives on its holder, when that is not `key`: one child that states several fields. */
40
+ get?(holder: any): unknown;
41
+ set?(holder: any, value: any): void;
42
+ }
43
+ export interface Codec {
44
+ attributes?: readonly AttributeSpec[];
45
+ fields: readonly FieldSpec[];
46
+ /** Called with what was read, before it is returned. */
47
+ afterRead?(value: any, element: XmlElement, scope: Scope, context: ReadContext): void;
48
+ /**
49
+ * Attributes written besides the stated ones, unless the element kept the same attribute as
50
+ * read: a namespace an extension declares for its children (`xmlns:c15`), as Excel does.
51
+ */
52
+ declares?(value: any): readonly [string, string][];
53
+ }
54
+ /** Reads `element` by `codec`. `scope` is the scope `element` sits in. */
55
+ export declare const readElement: (element: XmlElement, codec: Codec, scope: Scope, context: ReadContext) => any;
56
+ /** Writes `value` as the element `name` by `codec`. */
57
+ export declare const writeElement: (writer: XmlWriter, name: string, value: any, codec: Codec) => void;
58
+ export declare const qualified: (ns: Vocabulary, tag: string) => string;
59
+ /** A value element of `kind`: `<c:tag val="…"/>`. A `bool` with no `val` is `true`, as `CT_Boolean` says. */
60
+ export declare const val: (tag: string, kind: "bool" | "int" | "num" | "str", key?: string, ns?: Vocabulary) => FieldSpec;
61
+ /** An element holding only text: `<c:f>Sheet1!$A$1</c:f>`. */
62
+ export declare const text: (tag: string, key?: string, ns?: Vocabulary) => FieldSpec;
63
+ /** A child element read by its own codec; `many` for one that repeats. */
64
+ export declare const element: (tag: string, codec: Codec | (() => Codec), key?: string, options?: {
65
+ many?: boolean;
66
+ ns?: Vocabulary;
67
+ }) => FieldSpec;
68
+ /** An attribute of `kind`. `scale` divides what the file states: `sz="1400"` with `scale` 100 is `14`. */
69
+ export declare const attribute: (name: string, kind: "bool" | "int" | "num" | "str", key?: string, scale?: number) => AttributeSpec;
70
+ /** An attribute stated as one of two words: `b="1"` for `weight: 700`. */
71
+ export declare const mappedAttribute: (name: string, key: string, read: (text: string) => unknown, write: (value: any) => string) => AttributeSpec;
72
+ /**
73
+ * `field`, but its value is kept only when writing it gives back markup of the same canonical
74
+ * form; otherwise the element stays as markup. For values the model states in other units or
75
+ * spellings than the file (colors, angles, fills).
76
+ */
77
+ export declare const exact: (field: FieldSpec) => FieldSpec;
78
+ //# sourceMappingURL=_codec.d.ts.map
@@ -0,0 +1,10 @@
1
+ import { Codec } from './_codec';
2
+ import { XmlWriter } from './_xml';
3
+ export declare const writeColor: (writer: XmlWriter, color: string) => void;
4
+ /** `c:spPr`. */
5
+ export declare const SHAPE_PROPERTIES: Codec;
6
+ /** `a:rPr`, `a:defRPr`, `a:endParaRPr`. */
7
+ export declare const RUN_PROPERTIES: Codec;
8
+ /** `c:txPr`, `c:rich`: `a:bodyPr`, `a:lstStyle`, `a:p`. */
9
+ export declare const TEXT_BODY: Codec;
10
+ //# sourceMappingURL=_drawingml.d.ts.map
@@ -0,0 +1,70 @@
1
+ import { XmlElement } from './_XmlTree';
2
+ export declare const NS: {
3
+ readonly c: "http://schemas.openxmlformats.org/drawingml/2006/chart";
4
+ readonly cStrict: "http://purl.oclc.org/ooxml/drawingml/chart";
5
+ readonly a: "http://schemas.openxmlformats.org/drawingml/2006/main";
6
+ readonly aStrict: "http://purl.oclc.org/ooxml/drawingml/main";
7
+ readonly r: "http://schemas.openxmlformats.org/officeDocument/2006/relationships";
8
+ readonly rStrict: "http://purl.oclc.org/ooxml/officeDocument/relationships";
9
+ readonly c15: "http://schemas.microsoft.com/office/drawing/2012/chart";
10
+ readonly cx: "http://schemas.microsoft.com/office/drawing/2014/chartex";
11
+ readonly xml: "http://www.w3.org/XML/1998/namespace";
12
+ };
13
+ /**
14
+ * The prefixes the writer spells the vocabularies with. `c15` is written only inside markup that
15
+ * declares it so: an extension states its own namespace.
16
+ */
17
+ export declare const WRITE_PREFIX: {
18
+ readonly c: "c";
19
+ readonly a: "a";
20
+ readonly r: "r";
21
+ readonly c15: "c15";
22
+ readonly cx: "cx";
23
+ };
24
+ export declare const isChartNs: (uri: string | undefined) => boolean;
25
+ export declare const isDrawingNs: (uri: string | undefined) => boolean;
26
+ export declare const isChartExNs: (uri: string | undefined) => boolean;
27
+ /** Prefix to namespace, `''` for the default namespace. */
28
+ export type Scope = Readonly<Record<string, string>>;
29
+ export declare const EMPTY_SCOPE: Scope;
30
+ /** An element's attributes in source order, values decoded. */
31
+ export declare const readAttributes: (element: XmlElement) => [name: string, value: string][];
32
+ /** The scope inside `element`: `scope` plus the namespaces the element declares. */
33
+ export declare const scopeOf: (element: XmlElement, scope: Scope) => Scope;
34
+ /** The namespace of an element, in the scope that holds it (its own declarations included). */
35
+ export declare const namespaceOf: (element: XmlElement, inner: Scope) => string | undefined;
36
+ /** Builds markup. Names are written as given; text and attribute values are escaped. */
37
+ export declare class XmlWriter {
38
+ private readonly _parts;
39
+ open(name: string, attributes?: readonly (readonly [string, string])[] | null, empty?: boolean): this;
40
+ close(name: string): this;
41
+ /** `<name val="value"/>`. */
42
+ val(name: string, value: string): this;
43
+ text(text: string): this;
44
+ /** Markup written as it is. */
45
+ raw(markup: string): this;
46
+ toString(): string;
47
+ }
48
+ export declare const encodeAttribute: (value: string) => string;
49
+ /** `"1"`/`"0"` for a schema boolean, `null` for anything else. */
50
+ export declare const readBoolean: (text: string) => boolean | null;
51
+ export declare const writeBoolean: (value: boolean) => string;
52
+ /**
53
+ * An attribute value in canonical form: a schema boolean as `1`/`0` and a number as the shortest
54
+ * spelling of its value, so `true` and `1`, or `100` and `100.0`, compare equal.
55
+ */
56
+ export declare const canonicalValue: (value: string) => string;
57
+ /**
58
+ * Markup in canonical form: namespaces resolved (prefixes and where they are declared do not
59
+ * matter), attributes sorted with their values in {@link canonicalValue} form, whitespace between
60
+ * elements and comments dropped, and a chart `CT_Boolean` with no `val` given its default.
61
+ *
62
+ * @remarks
63
+ * Two pieces of markup with the same canonical form mean the same thing to a reader of the schema.
64
+ * This is the equality the chart model's round trip is held to. With `anyOrder` the order of an
65
+ * element's children does not count either: for a part that states them out of schema order.
66
+ */
67
+ export declare const canonicalize: (element: XmlElement, scope: Scope, anyOrder?: boolean) => string;
68
+ /** The canonical form of a fragment of markup, its prefixes read in `scope`; `null` if it holds no element. */
69
+ export declare const canonicalizeMarkup: (markup: string, scope: Scope) => string | null;
70
+ //# sourceMappingURL=_xml.d.ts.map
@@ -0,0 +1,18 @@
1
+ import { IWorkbook } from '@sheetxl/sdk';
2
+ import { FeaturePropertyBags } from './domVisitors/FeaturePropertyBagVisitor';
3
+ /** The `paramMap` key under which the styles part leaves its cell xfs' complement indices. */
4
+ export declare const XF_COMPLEMENTS_PARAM = "xfComplements";
5
+ /**
6
+ * Splits the cell-control layer back out of the xfs: Excel's per-format checkboxes become the
7
+ * model's anchored `cellControls`, and the styles stay styles.
8
+ *
9
+ * Excel stores a checkbox on the cell's xf (`xfComplement` → the feature property bags), the model
10
+ * keeps it apart. Runs after `applyHeaderStyles`, so `directStyles` already holds every cell's
11
+ * resolved xf as runs (a cell's own over its row's over its column's); each run whose xf carries a
12
+ * control becomes a range of that control, one entry per control per sheet, never a per-cell walk.
13
+ *
14
+ * xf 0 is skipped: it is the format of every unstyled cell, and a control there would cover the
15
+ * whole sheet.
16
+ */
17
+ export declare const applyCellControls: (jsonWB: IWorkbook.JSON, xfComplements: ReadonlyMap<number, number> | undefined, bags: FeaturePropertyBags | undefined) => void;
18
+ //# sourceMappingURL=CellControls.d.ts.map
@@ -0,0 +1,16 @@
1
+ import { IDocumentProperties } from '@sheetxl/sdk';
2
+ import { CustomPropertyEntry } from './domVisitors/AppPropertiesVisitor';
3
+ /** A `docProps` child as the property visitors read it: its local name and text. */
4
+ interface PropertyEntry {
5
+ key: string;
6
+ value: string;
7
+ }
8
+ /**
9
+ * The workbook's document properties from the three parts' property lists, or `undefined` when
10
+ * they hold none.
11
+ *
12
+ * @param warn Told about each custom property that is dropped.
13
+ */
14
+ export declare const readDocumentProperties: (core: PropertyEntry[] | undefined, app: PropertyEntry[] | undefined, custom?: CustomPropertyEntry[], warn?: (message: string, onceKey: string) => void) => IDocumentProperties.JSON | undefined;
15
+ export {};
16
+ //# sourceMappingURL=DocumentPropertiesRead.d.ts.map
@@ -1,4 +1,4 @@
1
- import { IWorkbook, ISheet } from '@sheetxl/sdk';
1
+ import { IWorkbook, IWorksheet } from '@sheetxl/sdk';
2
2
  /** What a cell's `<f>` turned out to be. */
3
3
  export type Unwrapped =
4
4
  /** Not a wrapper — use the text as-is. */
@@ -54,5 +54,5 @@ export declare const extractFunctionNames: (text: string) => string[];
54
54
  * and are cleared BEFORE the anchor's formula is restored, since the restored formula needs those
55
55
  * cells free to spill into. Placeholders of an unresolved anchor keep their values.
56
56
  */
57
- export declare const applyDummyFunctionUnwrap: (workbook: IWorkbook, records: DummyWrapRecord[], sheetsByRef: Map<object, ISheet>) => void;
57
+ export declare const applyDummyFunctionUnwrap: (workbook: IWorkbook, records: DummyWrapRecord[], sheetsByRef: Map<object, IWorksheet>) => void;
58
58
  //# sourceMappingURL=DummyFunctionUnwrap.d.ts.map
@@ -0,0 +1,15 @@
1
+ import { IWorkbook } from '@sheetxl/sdk';
2
+ /**
3
+ * Moves `<col style>` and `<row s customFormat>` off the headers and into each sheet's direct styles,
4
+ * as whole-column and whole-row ranges.
5
+ *
6
+ * @remarks
7
+ * Where they cross, a cell's own style wins over its row's, and a row's over its column's: Excel
8
+ * resolves a cell with no `<c>` from its row first. A cell the file lists with no style is Normal
9
+ * there (the sheet visitor records it as style 0), while an unstyled block with nothing over it is
10
+ * dropped.
11
+ *
12
+ * Runs after `applyHiddenFormulas`, which counts the header styles a sheet uses.
13
+ */
14
+ export declare const applyHeaderStyles: (jsonWB: IWorkbook.JSON) => void;
15
+ //# sourceMappingURL=HeaderStyles.d.ts.map
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Reading a `t="d"` cell: an ISO 8601 date, time, date-time or duration (ECMA-376 §18.17.4).
3
+ *
4
+ * Excel never writes these, but openpyxl does when `wb.iso_dates` is set, and so does pandas
5
+ * through it. The model holds dates as serials, so the text becomes one here.
6
+ *
7
+ * The fields are taken as wall clock: a `Z` or a `±hh:mm` offset is accepted and ignored, which
8
+ * is what openpyxl does on read. Nothing goes through a JS `Date`, which would bring a timezone in
9
+ * and cannot express Excel's phantom `1900-02-29`.
10
+ */
11
+ /**
12
+ * The serial for a `t="d"` cell's text, or `null` when the text is not one of the ISO forms or names
13
+ * a moment the date system cannot hold (before its epoch). The caller keeps the text then, so
14
+ * nothing is lost.
15
+ *
16
+ * @param text The cell's `<v>` text.
17
+ * @param date1904 Whether the workbook uses the 1904 date system.
18
+ */
19
+ export declare const isoDateToSerial: (text: string, date1904?: boolean) => number | null;
20
+ //# sourceMappingURL=IsoDateCell.d.ts.map
@@ -0,0 +1,12 @@
1
+ import { IRange } from '@sheetxl/sdk';
2
+ import { DataTableDefinition } from '../DataTableFormula';
3
+ /**
4
+ * The table a `TABLE(...)` formula describes, read at the table's first result cell; `null` when it
5
+ * is not a table laid out as Excel lays one out.
6
+ *
7
+ * @param text The formula text as it reads at the first result cell (relative references resolved
8
+ * there).
9
+ * @param results The result cells: the rectangle every cell of which carries this formula.
10
+ */
11
+ export declare const readLibreOfficeDataTable: (text: string, results: IRange.Coords) => DataTableDefinition | null;
12
+ //# sourceMappingURL=LibreOfficeDataTable.d.ts.map
@@ -3,8 +3,20 @@ interface CoreProperty {
3
3
  key: string;
4
4
  value: string;
5
5
  }
6
+ /** A `docProps/custom.xml` `<property>`: its name, the local name of its `vt:` value, and the value's text. */
7
+ export interface CustomPropertyEntry {
8
+ key: string;
9
+ kind: string | null;
10
+ value: string;
11
+ linkTarget?: string;
12
+ }
13
+ /**
14
+ * `<Properties>` is the root of both `docProps/app.xml` and `docProps/custom.xml`. The custom part's
15
+ * children are `<property>`, which the app part never has.
16
+ */
6
17
  export declare class AppPropertiesVisitor implements Visitor {
7
- visit(context: ExecutionContext, elemParent: Element, jsonParent: any): CoreProperty[];
18
+ visit(context: ExecutionContext, elemParent: Element, jsonParent: any): CoreProperty[] | CustomPropertyEntry[];
19
+ visitCustom(elemParent: Element, jsonParent: any): CustomPropertyEntry[];
8
20
  processProperty(context: ExecutionContext, elem: Element): CoreProperty | undefined;
9
21
  }
10
22
  export {};
@@ -1,14 +1,14 @@
1
- import { ICondition, IFilter, Scalar, ITable } from '@sheetxl/sdk';
1
+ import { ICondition, Scalar, ITable } from '@sheetxl/sdk';
2
2
  import { Visitor, ExecutionContext } from '../dom';
3
3
  /**
4
4
  * Auto Filter Visitor assumes that we are always nested within a Table.
5
5
  *
6
6
  * @remarks
7
7
  * We have 2 implementations 1 in dom and 1 in sax. The sax parser is used for AutoTables within
8
- * the SheetView.
8
+ * the WorksheetView.
9
9
  */
10
10
  export declare class AutoFilterVisitor implements Visitor {
11
- visit(context: ExecutionContext, elem: Element, jsonTable: ITable.JSON): IFilter.JSON | undefined;
11
+ visit(context: ExecutionContext, elem: Element, jsonTable: ITable.JSON): ITable.JSON | undefined;
12
12
  processColorFilter(context: ExecutionContext, elem: Element): ICondition.JSON;
13
13
  processCustomFilter(context: ExecutionContext, elem: Element): ICondition.JSON | null;
14
14
  processCustomFilters(context: ExecutionContext, elem: Element): ICondition.JSON;
@@ -1,4 +1,4 @@
1
- import { IRange, IComment, IStyledFont } from '@sheetxl/sdk';
1
+ import { IRange, IComment, IFontStyle } from '@sheetxl/sdk';
2
2
  import { Visitor, ExecutionContext } from '../dom';
3
3
  /**
4
4
  * One `<comment>` of a legacy comments part, as read: its author as an index into the part's
@@ -24,5 +24,5 @@ export declare function readRichText(textElement: Element | null): IComment.Cont
24
24
  * A run's `<rPr>` as the font properties it sets, or `null` when it sets none. Unlike a cell font
25
25
  * record, a run is differential: what it leaves out is inherited, so nothing is defaulted.
26
26
  */
27
- export declare function readRunProperties(rPr: Element): IStyledFont.JSON | null;
27
+ export declare function readRunProperties(rPr: Element): IFontStyle.JSON | null;
28
28
  //# sourceMappingURL=CommentVisitor.d.ts.map