@office-kit/xlsx 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (220) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +319 -0
  3. package/THIRD_PARTY_NOTICES.md +56 -0
  4. package/dist/cell/cell.d.ts +234 -0
  5. package/dist/cell/index.d.ts +4 -0
  6. package/dist/cell/rich-text.d.ts +37 -0
  7. package/dist/cell-D9CaNKnU.mjs +320 -0
  8. package/dist/cell-D9CaNKnU.mjs.map +1 -0
  9. package/dist/cell-style-BEDjMX1y.mjs +1579 -0
  10. package/dist/cell-style-BEDjMX1y.mjs.map +1 -0
  11. package/dist/cell.mjs +2 -0
  12. package/dist/chart/chart-xml.d.ts +16 -0
  13. package/dist/chart/chart.d.ts +735 -0
  14. package/dist/chart/cx/chartex-xml.d.ts +6 -0
  15. package/dist/chart/cx/chartex.d.ts +279 -0
  16. package/dist/chart/index.d.ts +6 -0
  17. package/dist/chart/user-shapes-xml.d.ts +4 -0
  18. package/dist/chart/user-shapes.d.ts +61 -0
  19. package/dist/chart.mjs +232 -0
  20. package/dist/chart.mjs.map +1 -0
  21. package/dist/chartsheet/chartsheet-xml.d.ts +17 -0
  22. package/dist/chartsheet/chartsheet.d.ts +121 -0
  23. package/dist/chartsheet/index.d.ts +2 -0
  24. package/dist/chartsheet-C3-tqkPy.mjs +23 -0
  25. package/dist/chartsheet-C3-tqkPy.mjs.map +1 -0
  26. package/dist/chartsheet.mjs +2 -0
  27. package/dist/colors-ovWAwnZI.mjs +67 -0
  28. package/dist/colors-ovWAwnZI.mjs.map +1 -0
  29. package/dist/compat/numbers.d.ts +14 -0
  30. package/dist/coordinate-96Ecci4d.mjs +276 -0
  31. package/dist/coordinate-96Ecci4d.mjs.map +1 -0
  32. package/dist/datetime-B2ySVlXt.mjs +71 -0
  33. package/dist/datetime-B2ySVlXt.mjs.map +1 -0
  34. package/dist/defined-names-CviWmtQg.mjs +89 -0
  35. package/dist/defined-names-CviWmtQg.mjs.map +1 -0
  36. package/dist/differential-D4dg-qtZ.mjs +37 -0
  37. package/dist/differential-D4dg-qtZ.mjs.map +1 -0
  38. package/dist/drawing/anchor.d.ts +63 -0
  39. package/dist/drawing/dml/colors.d.ts +109 -0
  40. package/dist/drawing/dml/dml-xml.d.ts +35 -0
  41. package/dist/drawing/dml/effect.d.ts +92 -0
  42. package/dist/drawing/dml/fill.d.ts +115 -0
  43. package/dist/drawing/dml/geometry.d.ts +113 -0
  44. package/dist/drawing/dml/line.d.ts +41 -0
  45. package/dist/drawing/dml/shape-properties.d.ts +33 -0
  46. package/dist/drawing/dml/text.d.ts +218 -0
  47. package/dist/drawing/drawing-xml.d.ts +5 -0
  48. package/dist/drawing/drawing.d.ts +117 -0
  49. package/dist/drawing/image.d.ts +40 -0
  50. package/dist/drawing/index.d.ts +14 -0
  51. package/dist/drawing-BxzLuryn.mjs +415 -0
  52. package/dist/drawing-BxzLuryn.mjs.map +1 -0
  53. package/dist/drawing.mjs +119 -0
  54. package/dist/drawing.mjs.map +1 -0
  55. package/dist/escape-DFTE7ZJc.mjs +51 -0
  56. package/dist/escape-DFTE7ZJc.mjs.map +1 -0
  57. package/dist/exceptions-D-CFwxgm.mjs +37 -0
  58. package/dist/exceptions-D-CFwxgm.mjs.map +1 -0
  59. package/dist/formula/tokenizer.d.ts +61 -0
  60. package/dist/formula/translate.d.ts +67 -0
  61. package/dist/inference-B3ES3KEJ.mjs +42 -0
  62. package/dist/inference-B3ES3KEJ.mjs.map +1 -0
  63. package/dist/io/browser.d.ts +41 -0
  64. package/dist/io/index.d.ts +7 -0
  65. package/dist/io/load.d.ts +46 -0
  66. package/dist/io/node-fs.d.ts +62 -0
  67. package/dist/io/node-save.d.ts +3 -0
  68. package/dist/io/node.d.ts +17 -0
  69. package/dist/io/save.d.ts +14 -0
  70. package/dist/io/sink.d.ts +54 -0
  71. package/dist/io/source.d.ts +14 -0
  72. package/dist/io.mjs +212 -0
  73. package/dist/io.mjs.map +1 -0
  74. package/dist/load-D5cbhoGx.mjs +1069 -0
  75. package/dist/load-D5cbhoGx.mjs.map +1 -0
  76. package/dist/manifest-Dps1-OpP.mjs +801 -0
  77. package/dist/manifest-Dps1-OpP.mjs.map +1 -0
  78. package/dist/node.d.ts +3 -0
  79. package/dist/node.mjs +308 -0
  80. package/dist/node.mjs.map +1 -0
  81. package/dist/packaging/core.d.ts +45 -0
  82. package/dist/packaging/custom.d.ts +62 -0
  83. package/dist/packaging/extended.d.ts +45 -0
  84. package/dist/packaging/index.d.ts +10 -0
  85. package/dist/packaging/manifest.d.ts +24 -0
  86. package/dist/packaging/relationships.d.ts +30 -0
  87. package/dist/packaging.mjs +2 -0
  88. package/dist/parser-DuLejQy1.mjs +156 -0
  89. package/dist/parser-DuLejQy1.mjs.map +1 -0
  90. package/dist/reader-D1fNW9k1.mjs +534 -0
  91. package/dist/reader-D1fNW9k1.mjs.map +1 -0
  92. package/dist/save-RohQtgEZ.mjs +745 -0
  93. package/dist/save-RohQtgEZ.mjs.map +1 -0
  94. package/dist/schema/core.d.ts +133 -0
  95. package/dist/schema/index.d.ts +3 -0
  96. package/dist/schema/serialize.d.ts +6 -0
  97. package/dist/schema.mjs +2 -0
  98. package/dist/serialize-55EnT30e.mjs +254 -0
  99. package/dist/serialize-55EnT30e.mjs.map +1 -0
  100. package/dist/serializer-BwbgHYJV.mjs +116 -0
  101. package/dist/serializer-BwbgHYJV.mjs.map +1 -0
  102. package/dist/streaming/index.d.ts +2 -0
  103. package/dist/streaming/read-only.d.ts +38 -0
  104. package/dist/streaming/write-only.d.ts +47 -0
  105. package/dist/streaming.mjs +612 -0
  106. package/dist/streaming.mjs.map +1 -0
  107. package/dist/styles/alignment.d.ts +33 -0
  108. package/dist/styles/alignment.schema.d.ts +3 -0
  109. package/dist/styles/borders.d.ts +40 -0
  110. package/dist/styles/borders.schema.d.ts +4 -0
  111. package/dist/styles/cell-style.d.ts +270 -0
  112. package/dist/styles/colors.d.ts +128 -0
  113. package/dist/styles/colors.schema.d.ts +3 -0
  114. package/dist/styles/differential.d.ts +41 -0
  115. package/dist/styles/fills.d.ts +54 -0
  116. package/dist/styles/fills.schema.d.ts +6 -0
  117. package/dist/styles/fonts.d.ts +44 -0
  118. package/dist/styles/fonts.schema.d.ts +3 -0
  119. package/dist/styles/index.d.ts +21 -0
  120. package/dist/styles/named-styles.d.ts +52 -0
  121. package/dist/styles/numbers.d.ts +39 -0
  122. package/dist/styles/numbers.schema.d.ts +3 -0
  123. package/dist/styles/protection.d.ts +9 -0
  124. package/dist/styles/protection.schema.d.ts +3 -0
  125. package/dist/styles/stylesheet-reader.d.ts +7 -0
  126. package/dist/styles/stylesheet-writer.d.ts +3 -0
  127. package/dist/styles/stylesheet.d.ts +95 -0
  128. package/dist/styles.mjs +4 -0
  129. package/dist/stylesheet-writer-C2eRmn22.mjs +8624 -0
  130. package/dist/stylesheet-writer-C2eRmn22.mjs.map +1 -0
  131. package/dist/table-DkX6UniA.mjs +113 -0
  132. package/dist/table-DkX6UniA.mjs.map +1 -0
  133. package/dist/tree-Bbs1C8Rc.mjs +192 -0
  134. package/dist/tree-Bbs1C8Rc.mjs.map +1 -0
  135. package/dist/units-rOMQqXh2.mjs +41 -0
  136. package/dist/units-rOMQqXh2.mjs.map +1 -0
  137. package/dist/user-shapes-DfmCGKB0.mjs +252 -0
  138. package/dist/user-shapes-DfmCGKB0.mjs.map +1 -0
  139. package/dist/utf8-D91g1XTG.mjs +143 -0
  140. package/dist/utf8-D91g1XTG.mjs.map +1 -0
  141. package/dist/utils/coordinate.d.ts +103 -0
  142. package/dist/utils/css.d.ts +18 -0
  143. package/dist/utils/datetime.d.ts +38 -0
  144. package/dist/utils/escape.d.ts +34 -0
  145. package/dist/utils/exceptions.d.ts +34 -0
  146. package/dist/utils/index.d.ts +11 -0
  147. package/dist/utils/inference.d.ts +24 -0
  148. package/dist/utils/stable-stringify.d.ts +7 -0
  149. package/dist/utils/units.d.ts +14 -0
  150. package/dist/utils/utf8.d.ts +1 -0
  151. package/dist/utils.mjs +39 -0
  152. package/dist/utils.mjs.map +1 -0
  153. package/dist/workbook/calc-properties.d.ts +47 -0
  154. package/dist/workbook/defined-names.d.ts +121 -0
  155. package/dist/workbook/file-recovery.d.ts +11 -0
  156. package/dist/workbook/file-sharing.d.ts +14 -0
  157. package/dist/workbook/file-version.d.ts +13 -0
  158. package/dist/workbook/function-groups.d.ts +10 -0
  159. package/dist/workbook/index.d.ts +24 -0
  160. package/dist/workbook/protection.d.ts +35 -0
  161. package/dist/workbook/shared-strings.d.ts +57 -0
  162. package/dist/workbook/smart-tags.d.ts +13 -0
  163. package/dist/workbook/views.d.ts +89 -0
  164. package/dist/workbook/workbook-properties.d.ts +57 -0
  165. package/dist/workbook/workbook.d.ts +643 -0
  166. package/dist/workbook-HGYNRBlV.mjs +636 -0
  167. package/dist/workbook-HGYNRBlV.mjs.map +1 -0
  168. package/dist/workbook.mjs +58 -0
  169. package/dist/workbook.mjs.map +1 -0
  170. package/dist/worksheet/auto-filter.d.ts +34 -0
  171. package/dist/worksheet/cell-range.d.ts +121 -0
  172. package/dist/worksheet/comments-xml.d.ts +24 -0
  173. package/dist/worksheet/comments.d.ts +13 -0
  174. package/dist/worksheet/conditional-formatting.d.ts +150 -0
  175. package/dist/worksheet/custom-sheet-views.d.ts +43 -0
  176. package/dist/worksheet/data-consolidate.d.ts +29 -0
  177. package/dist/worksheet/data-validations.d.ts +72 -0
  178. package/dist/worksheet/dimensions.d.ts +40 -0
  179. package/dist/worksheet/errors.d.ts +40 -0
  180. package/dist/worksheet/hyperlinks.d.ts +42 -0
  181. package/dist/worksheet/index.d.ts +46 -0
  182. package/dist/worksheet/ole-objects.d.ts +37 -0
  183. package/dist/worksheet/page-setup.d.ts +173 -0
  184. package/dist/worksheet/phonetic.d.ts +11 -0
  185. package/dist/worksheet/properties.d.ts +34 -0
  186. package/dist/worksheet/protected-ranges.d.ts +19 -0
  187. package/dist/worksheet/protection.d.ts +44 -0
  188. package/dist/worksheet/reader.d.ts +38 -0
  189. package/dist/worksheet/scenarios.d.ts +36 -0
  190. package/dist/worksheet/smart-tags.d.ts +23 -0
  191. package/dist/worksheet/sort-state.d.ts +28 -0
  192. package/dist/worksheet/table-xml.d.ts +5 -0
  193. package/dist/worksheet/table.d.ts +80 -0
  194. package/dist/worksheet/views.d.ts +47 -0
  195. package/dist/worksheet/web-publish.d.ts +21 -0
  196. package/dist/worksheet/worksheet.d.ts +935 -0
  197. package/dist/worksheet/writer.d.ts +72 -0
  198. package/dist/worksheet-CmCNoIgD.mjs +1726 -0
  199. package/dist/worksheet-CmCNoIgD.mjs.map +1 -0
  200. package/dist/worksheet.mjs +247 -0
  201. package/dist/worksheet.mjs.map +1 -0
  202. package/dist/writer-DspzfkNA.mjs +221 -0
  203. package/dist/writer-DspzfkNA.mjs.map +1 -0
  204. package/dist/xml/index.d.ts +10 -0
  205. package/dist/xml/iterparse.d.ts +22 -0
  206. package/dist/xml/namespaces.d.ts +91 -0
  207. package/dist/xml/parser.d.ts +7 -0
  208. package/dist/xml/serializer.d.ts +14 -0
  209. package/dist/xml/stream-writer.d.ts +39 -0
  210. package/dist/xml/tree.d.ts +37 -0
  211. package/dist/xml.mjs +140 -0
  212. package/dist/xml.mjs.map +1 -0
  213. package/dist/zip/decompression-guard.d.ts +70 -0
  214. package/dist/zip/index.d.ts +6 -0
  215. package/dist/zip/random-access-reader.d.ts +16 -0
  216. package/dist/zip/reader.d.ts +45 -0
  217. package/dist/zip/writer.d.ts +65 -0
  218. package/dist/zip/zip64-patch.d.ts +12 -0
  219. package/dist/zip.mjs +3 -0
  220. package/package.json +147 -0
@@ -0,0 +1,6 @@
1
+ import type { CxChartSpace } from './chartex';
2
+ /** Best-effort sniff: returns true if `bytes` starts with a `cx:chartSpace` root. */
3
+ export declare function isChartExBytes(bytes: Uint8Array | string): boolean;
4
+ export declare function parseChartExXml(bytes: Uint8Array | string): CxChartSpace;
5
+ export declare function serializeChartExSpace(space: CxChartSpace): string;
6
+ export declare function chartExToBytes(space: CxChartSpace): Uint8Array;
@@ -0,0 +1,279 @@
1
+ import type { ShapeProperties } from '../../drawing/dml/shape-properties';
2
+ import type { TextBody } from '../../drawing/dml/text';
3
+ /** Chartex layout discriminator. Lives on `<cx:series layoutId="...">`. */
4
+ export type CxLayoutId = 'clusteredColumn' | 'waterfall' | 'sunburst' | 'treemap' | 'boxWhisker' | 'pareto' | 'paretoLine' | 'regionMap' | 'funnel';
5
+ /** Numeric data point inside a chartex `<cx:numDim>` / `<cx:strDim>` level. */
6
+ export interface CxPoint {
7
+ idx: number;
8
+ v: string;
9
+ }
10
+ /** Numeric dimension (val / colorVal / size / x / y). */
11
+ export interface CxNumDim {
12
+ kind: 'num';
13
+ /** Dimension role attribute (`val`, `colorVal`, `size`, `x`, `y`). */
14
+ type: string;
15
+ /** Cell reference, e.g. `Sheet1!$A$1:$A$5`. */
16
+ f?: string;
17
+ /** Optional `dir="col"|"row"` formula direction hint. */
18
+ dir?: 'col' | 'row';
19
+ ptCount?: number;
20
+ pts: CxPoint[];
21
+ formatCode?: string;
22
+ }
23
+ /** String dimension (cat / colorStr). */
24
+ export interface CxStrDim {
25
+ kind: 'str';
26
+ /** Dimension role attribute (`cat`, `colorStr`). */
27
+ type: string;
28
+ f?: string;
29
+ dir?: 'col' | 'row';
30
+ ptCount?: number;
31
+ pts: CxPoint[];
32
+ formatCode?: string;
33
+ }
34
+ export type CxDim = CxNumDim | CxStrDim;
35
+ /** Source data block, referenced by `<cx:dataId val="N"/>` on series. */
36
+ export interface CxData {
37
+ id: number;
38
+ dims: CxDim[];
39
+ }
40
+ /** External data linkage (rare — most charts inline the cache). */
41
+ export interface CxExternalData {
42
+ rId: string;
43
+ autoUpdate?: boolean;
44
+ }
45
+ export interface CxChartData {
46
+ externalData?: CxExternalData;
47
+ data: CxData[];
48
+ }
49
+ /** Layout-properties union, keyed on the series' layoutId family. */
50
+ export type CxLayoutPr = {
51
+ kind: 'waterfall';
52
+ subtotalIdx: number[];
53
+ } | {
54
+ kind: 'binning';
55
+ binCountAuto?: boolean;
56
+ binCount?: number;
57
+ binSize?: number;
58
+ intervalClosed?: 'r' | 'l';
59
+ underflow?: number;
60
+ overflow?: number;
61
+ } | {
62
+ kind: 'parentLabel';
63
+ layout: 'overlapping' | 'banner' | 'none';
64
+ } | {
65
+ kind: 'visibility';
66
+ meanLine?: boolean;
67
+ meanMarker?: boolean;
68
+ nonoutliers?: boolean;
69
+ outliers?: boolean;
70
+ quartileMethod?: 'exclusive' | 'inclusive';
71
+ } | {
72
+ kind: 'region';
73
+ cultureLanguage?: string;
74
+ cultureRegion?: string;
75
+ projectionType?: 'automatic' | 'mercator' | 'miller' | 'albers';
76
+ regionLabelLayout?: 'none' | 'bestFit' | 'showAll';
77
+ };
78
+ export type CxDataLabelPos = 'ctr' | 'b' | 'l' | 'r' | 't' | 'inEnd' | 'outEnd' | 'inBase';
79
+ export interface CxDataLabels {
80
+ pos?: CxDataLabelPos;
81
+ visibility?: {
82
+ seriesName?: boolean;
83
+ categoryName?: boolean;
84
+ value?: boolean;
85
+ };
86
+ }
87
+ export interface CxSeries {
88
+ layoutId: CxLayoutId;
89
+ hidden?: boolean;
90
+ ownerIdx?: number;
91
+ formatIdx?: number;
92
+ axisIds?: number[];
93
+ /** Series text — typically a cell reference. */
94
+ tx?: {
95
+ f?: string;
96
+ v?: string;
97
+ };
98
+ dataLabels?: CxDataLabels;
99
+ /** Numeric id pointing into chartData.data. */
100
+ dataId?: number;
101
+ layoutPr?: CxLayoutPr;
102
+ /** Per-series shape properties (fill / line / effects). */
103
+ spPr?: ShapeProperties;
104
+ /** Per-series default text properties. */
105
+ txPr?: TextBody;
106
+ }
107
+ export interface CxAxis {
108
+ id: number;
109
+ hidden?: boolean;
110
+ /** Continuous (value) axis bounds. */
111
+ valScaling?: {
112
+ min?: number;
113
+ max?: number;
114
+ };
115
+ /** Category-axis gap width %. */
116
+ catScalingGapWidth?: number;
117
+ majorGridlines?: boolean;
118
+ title?: CxTitle;
119
+ /** Axis-line / tick formatting. */
120
+ spPr?: ShapeProperties;
121
+ /** Tick-label text formatting. */
122
+ txPr?: TextBody;
123
+ }
124
+ export interface CxTitle {
125
+ pos?: 't' | 'b' | 'l' | 'r';
126
+ align?: 'ctr' | 'l' | 'r';
127
+ overlay?: boolean;
128
+ /** Plain text (rich runs not preserved at this layer). */
129
+ text?: string;
130
+ /** Cell-reference text source. */
131
+ txDataRef?: string;
132
+ /** Title chrome (frame fill / border). */
133
+ spPr?: ShapeProperties;
134
+ /** Title text formatting. */
135
+ txPr?: TextBody;
136
+ }
137
+ export interface CxLegend {
138
+ pos?: 't' | 'b' | 'l' | 'r' | 'tr';
139
+ align?: 'ctr' | 'l' | 'r';
140
+ overlay?: boolean;
141
+ /** Legend chrome (frame fill / border). */
142
+ spPr?: ShapeProperties;
143
+ /** Legend text formatting. */
144
+ txPr?: TextBody;
145
+ }
146
+ export interface CxPlotArea {
147
+ series: CxSeries[];
148
+ axes: CxAxis[];
149
+ /** Plot-surface shape properties (background fill / border line). */
150
+ spPr?: ShapeProperties;
151
+ }
152
+ export interface CxChart {
153
+ title?: CxTitle;
154
+ plotArea: CxPlotArea;
155
+ legend?: CxLegend;
156
+ plotVisOnly?: boolean;
157
+ dispBlanksAs?: 'span' | 'gap' | 'zero';
158
+ }
159
+ /** Root model for a chartex `xl/charts/chartN.xml` part. */
160
+ export interface CxChartSpace {
161
+ kind: 'cxChartSpace';
162
+ chartData: CxChartData;
163
+ chart: CxChart;
164
+ /** Chart-space level shape properties (overall frame). */
165
+ spPr?: ShapeProperties;
166
+ /** Chart-space level default text properties. */
167
+ txPr?: TextBody;
168
+ }
169
+ export declare const makeCxNumDim: (opts: {
170
+ type: string;
171
+ f?: string;
172
+ dir?: "col" | "row";
173
+ ptCount?: number;
174
+ pts?: CxPoint[];
175
+ formatCode?: string;
176
+ }) => CxNumDim;
177
+ export declare const makeCxStrDim: (opts: {
178
+ type: string;
179
+ f?: string;
180
+ dir?: "col" | "row";
181
+ ptCount?: number;
182
+ pts?: CxPoint[];
183
+ formatCode?: string;
184
+ }) => CxStrDim;
185
+ export declare const makeCxData: (id: number, dims: CxDim[]) => CxData;
186
+ export declare const makeCxSeries: (opts: {
187
+ layoutId: CxLayoutId;
188
+ dataId?: number;
189
+ hidden?: boolean;
190
+ ownerIdx?: number;
191
+ formatIdx?: number;
192
+ axisIds?: number[];
193
+ tx?: {
194
+ f?: string;
195
+ v?: string;
196
+ };
197
+ dataLabels?: CxDataLabels;
198
+ layoutPr?: CxLayoutPr;
199
+ spPr?: ShapeProperties;
200
+ txPr?: TextBody;
201
+ }) => CxSeries;
202
+ export declare const makeCxAxis: (opts: {
203
+ id: number;
204
+ hidden?: boolean;
205
+ valScaling?: {
206
+ min?: number;
207
+ max?: number;
208
+ };
209
+ catScalingGapWidth?: number;
210
+ majorGridlines?: boolean;
211
+ title?: CxTitle;
212
+ spPr?: ShapeProperties;
213
+ txPr?: TextBody;
214
+ }) => CxAxis;
215
+ export declare const makeCxChartSpace: (opts: {
216
+ series: CxSeries[];
217
+ data?: CxData[];
218
+ axes?: CxAxis[];
219
+ title?: CxTitle;
220
+ legend?: CxLegend;
221
+ plotVisOnly?: boolean;
222
+ dispBlanksAs?: CxChart["dispBlanksAs"];
223
+ externalData?: CxExternalData;
224
+ plotAreaSpPr?: ShapeProperties;
225
+ spPr?: ShapeProperties;
226
+ txPr?: TextBody;
227
+ }) => CxChartSpace;
228
+ export declare const makeSunburstChart: (opts: {
229
+ catRef?: string;
230
+ valRef?: string;
231
+ valFormatCode?: string;
232
+ }) => CxChartSpace;
233
+ export declare const makeTreemapChart: (opts: {
234
+ catRef?: string;
235
+ valRef?: string;
236
+ parentLabelLayout?: "overlapping" | "banner" | "none";
237
+ }) => CxChartSpace;
238
+ export declare const makeWaterfallChart: (opts: {
239
+ catRef?: string;
240
+ valRef?: string;
241
+ subtotalIdx?: number[];
242
+ }) => CxChartSpace;
243
+ export declare const makeHistogramChart: (opts: {
244
+ valRef?: string;
245
+ binCountAuto?: boolean;
246
+ binCount?: number;
247
+ binSize?: number;
248
+ intervalClosed?: "r" | "l";
249
+ underflow?: number;
250
+ overflow?: number;
251
+ }) => CxChartSpace;
252
+ export declare const makeParetoChart: (opts: {
253
+ valRef?: string;
254
+ catRef?: string;
255
+ binCountAuto?: boolean;
256
+ binCount?: number;
257
+ binSize?: number;
258
+ }) => CxChartSpace;
259
+ export declare const makeFunnelChart: (opts: {
260
+ catRef?: string;
261
+ valRef?: string;
262
+ }) => CxChartSpace;
263
+ export declare const makeBoxWhiskerChart: (opts: {
264
+ catRef?: string;
265
+ valRef?: string;
266
+ meanLine?: boolean;
267
+ meanMarker?: boolean;
268
+ outliers?: boolean;
269
+ nonoutliers?: boolean;
270
+ quartileMethod?: "exclusive" | "inclusive";
271
+ }) => CxChartSpace;
272
+ export declare const makeRegionMapChart: (opts: {
273
+ catRef?: string;
274
+ valRef?: string;
275
+ cultureLanguage?: string;
276
+ cultureRegion?: string;
277
+ projectionType?: "automatic" | "mercator" | "miller" | "albers";
278
+ regionLabelLayout?: "none" | "bestFit" | "showAll";
279
+ }) => CxChartSpace;
@@ -0,0 +1,6 @@
1
+ export type { Area3DChart, AreaChart, Bar3DChart, BarChart, BarDirection, BarFrame, BarSeries, BubbleChart, BubbleSeries, BubbleSizeRepresents, AxisCrossBetween, AxisCrosses, AxisOrientation, AxisScaling, CategoryAxis, CategoryLabelAlignment, CategoryRef, ChartKind, ChartNumberFormat, ChartSpace, ChartTitle, DateAxis, DataLabel, DataLabelList, DataLabelPosition, DataPoint, DoughnutChart, ErrorBarDirection, ErrorBars, ErrorBarType, ErrorValType, Gridlines, GroupingType, HiLowLines, Layout, LayoutMode, LayoutTarget, Legend, LegendPosition, Line3DChart, LineChart, LineSeries, ManualLayout, Marker, MarkerSymbol, NumericRef, OfPieChart, OfPieType, Pie3DChart, PieChart, PlotArea, RadarChart, RadarStyle, ScatterChart, ScatterSeries, ScatterStyle, SeriesAxis, SplitType, StockChart, Surface3DChart, SurfaceChart, SurfaceFrame, TickLabelPosition, TickMark, TimeUnit, Trendline, TrendlineType, UpDownBars, ValueAxis, View3D, } from './chart';
2
+ export { makeArea3DChart, makeAreaChart, makeBar3DChart, makeBarChart, makeBarSeries, makeBubbleChart, makeBubbleSeries, makeChartSpace, makeDoughnutChart, makeLine3DChart, makeLineChart, makeOfPieChart, makePie3DChart, makePieChart, makeRadarChart, makeScatterChart, makeScatterSeries, makeStockChart, makeSurface3DChart, makeSurfaceChart, } from './chart';
3
+ export type { CxAxis, CxChart, CxChartData, CxChartSpace, CxData, CxDataLabelPos, CxDataLabels, CxDim, CxExternalData, CxLayoutId, CxLayoutPr, CxLegend, CxNumDim, CxPlotArea, CxPoint, CxSeries, CxStrDim, CxTitle, } from './cx/chartex';
4
+ export { makeBoxWhiskerChart, makeCxAxis, makeCxChartSpace, makeCxData, makeCxNumDim, makeCxSeries, makeCxStrDim, makeFunnelChart, makeHistogramChart, makeParetoChart, makeRegionMapChart, makeSunburstChart, makeTreemapChart, makeWaterfallChart, } from './cx/chartex';
5
+ export type { ChartDrawing, ChartDrawingPicture, ChartDrawingShape, ChartRelativeMarker, UserShapeAnchor, UserShapeContent, } from './user-shapes';
6
+ export { makeAbsSizeAnchor, makeChartDrawing, makeChartShape, makeRelSizeAnchor, } from './user-shapes';
@@ -0,0 +1,4 @@
1
+ import { type ChartDrawing } from './user-shapes';
2
+ export declare function parseUserShapesXml(bytes: Uint8Array | string): ChartDrawing;
3
+ export declare function serializeUserShapes(d: ChartDrawing): string;
4
+ export declare function userShapesToBytes(d: ChartDrawing): Uint8Array;
@@ -0,0 +1,61 @@
1
+ import type { ShapeProperties, PositiveSize2D } from '../drawing/dml/shape-properties';
2
+ import type { TextBody } from '../drawing/dml/text';
3
+ /** `<cdr:from>` / `<cdr:to>` marker. Decimal in 0..1. */
4
+ export interface ChartRelativeMarker {
5
+ x: number;
6
+ y: number;
7
+ }
8
+ /** `<cdr:sp>` shape leaf (text box / arrow / preset shape with optional text). */
9
+ export interface ChartDrawingShape {
10
+ /** cNvPr id (1-based, unique per chartDrawing). */
11
+ id: number;
12
+ name?: string;
13
+ descr?: string;
14
+ hidden?: boolean;
15
+ /** When true, emit `<cdr:nvSpPr><cdr:cNvSpPr txBox="1"/>` so Excel renders the shape as a text-box. */
16
+ txBox?: boolean;
17
+ spPr?: ShapeProperties;
18
+ txBody?: TextBody;
19
+ }
20
+ /** `<cdr:pic>` picture leaf. */
21
+ export interface ChartDrawingPicture {
22
+ id: number;
23
+ name?: string;
24
+ descr?: string;
25
+ /** rels-resolved id used by `<a:blip r:embed>`. */
26
+ embedRId?: string;
27
+ spPr?: ShapeProperties;
28
+ }
29
+ export type UserShapeContent = {
30
+ kind: 'shape';
31
+ shape: ChartDrawingShape;
32
+ } | {
33
+ kind: 'picture';
34
+ picture: ChartDrawingPicture;
35
+ };
36
+ export type UserShapeAnchor = {
37
+ kind: 'relSize';
38
+ from: ChartRelativeMarker;
39
+ to: ChartRelativeMarker;
40
+ content: UserShapeContent;
41
+ } | {
42
+ kind: 'absSize';
43
+ from: ChartRelativeMarker;
44
+ ext: PositiveSize2D;
45
+ content: UserShapeContent;
46
+ };
47
+ export interface ChartDrawing {
48
+ shapes: UserShapeAnchor[];
49
+ }
50
+ export declare const makeChartDrawing: (shapes?: UserShapeAnchor[]) => ChartDrawing;
51
+ export declare const makeChartShape: (opts: {
52
+ id: number;
53
+ name?: string;
54
+ descr?: string;
55
+ hidden?: boolean;
56
+ txBox?: boolean;
57
+ spPr?: ShapeProperties;
58
+ txBody?: TextBody;
59
+ }) => ChartDrawingShape;
60
+ export declare const makeRelSizeAnchor: (from: ChartRelativeMarker, to: ChartRelativeMarker, content: UserShapeContent) => UserShapeAnchor;
61
+ export declare const makeAbsSizeAnchor: (from: ChartRelativeMarker, ext: PositiveSize2D, content: UserShapeContent) => UserShapeAnchor;
package/dist/chart.mjs ADDED
@@ -0,0 +1,232 @@
1
+ import { C as makeSurface3DChart, S as makeStockChart, _ as makePie3DChart, a as makeArea3DChart, b as makeScatterChart, c as makeBarChart, d as makeBubbleSeries, f as makeChartSpace, g as makeOfPieChart, h as makeLineChart, i as makeRelSizeAnchor, l as makeBarSeries, m as makeLine3DChart, n as makeChartDrawing, o as makeAreaChart, p as makeDoughnutChart, r as makeChartShape, s as makeBar3DChart, t as makeAbsSizeAnchor, u as makeBubbleChart, v as makePieChart, w as makeSurfaceChart, x as makeScatterSeries, y as makeRadarChart } from "./user-shapes-DfmCGKB0.mjs";
2
+ //#region src/chart/cx/chartex.ts
3
+ const makeCxNumDim = (opts) => ({
4
+ kind: "num",
5
+ type: opts.type,
6
+ ...opts.f !== void 0 ? { f: opts.f } : {},
7
+ ...opts.dir !== void 0 ? { dir: opts.dir } : {},
8
+ ...opts.ptCount !== void 0 ? { ptCount: opts.ptCount } : {},
9
+ pts: opts.pts ?? [],
10
+ ...opts.formatCode !== void 0 ? { formatCode: opts.formatCode } : {}
11
+ });
12
+ const makeCxStrDim = (opts) => ({
13
+ kind: "str",
14
+ type: opts.type,
15
+ ...opts.f !== void 0 ? { f: opts.f } : {},
16
+ ...opts.dir !== void 0 ? { dir: opts.dir } : {},
17
+ ...opts.ptCount !== void 0 ? { ptCount: opts.ptCount } : {},
18
+ pts: opts.pts ?? [],
19
+ ...opts.formatCode !== void 0 ? { formatCode: opts.formatCode } : {}
20
+ });
21
+ const makeCxData = (id, dims) => ({
22
+ id,
23
+ dims
24
+ });
25
+ const makeCxSeries = (opts) => ({
26
+ layoutId: opts.layoutId,
27
+ ...opts.hidden !== void 0 ? { hidden: opts.hidden } : {},
28
+ ...opts.ownerIdx !== void 0 ? { ownerIdx: opts.ownerIdx } : {},
29
+ ...opts.formatIdx !== void 0 ? { formatIdx: opts.formatIdx } : {},
30
+ ...opts.axisIds !== void 0 ? { axisIds: opts.axisIds } : {},
31
+ ...opts.tx ? { tx: opts.tx } : {},
32
+ ...opts.dataLabels ? { dataLabels: opts.dataLabels } : {},
33
+ ...opts.dataId !== void 0 ? { dataId: opts.dataId } : {},
34
+ ...opts.layoutPr ? { layoutPr: opts.layoutPr } : {},
35
+ ...opts.spPr ? { spPr: opts.spPr } : {},
36
+ ...opts.txPr ? { txPr: opts.txPr } : {}
37
+ });
38
+ const makeCxAxis = (opts) => ({
39
+ id: opts.id,
40
+ ...opts.hidden !== void 0 ? { hidden: opts.hidden } : {},
41
+ ...opts.valScaling ? { valScaling: opts.valScaling } : {},
42
+ ...opts.catScalingGapWidth !== void 0 ? { catScalingGapWidth: opts.catScalingGapWidth } : {},
43
+ ...opts.majorGridlines !== void 0 ? { majorGridlines: opts.majorGridlines } : {},
44
+ ...opts.title ? { title: opts.title } : {},
45
+ ...opts.spPr ? { spPr: opts.spPr } : {},
46
+ ...opts.txPr ? { txPr: opts.txPr } : {}
47
+ });
48
+ const makeCxChartSpace = (opts) => ({
49
+ kind: "cxChartSpace",
50
+ chartData: {
51
+ ...opts.externalData ? { externalData: opts.externalData } : {},
52
+ data: opts.data ?? []
53
+ },
54
+ chart: {
55
+ plotArea: {
56
+ series: opts.series,
57
+ axes: opts.axes ?? [],
58
+ ...opts.plotAreaSpPr ? { spPr: opts.plotAreaSpPr } : {}
59
+ },
60
+ ...opts.title ? { title: opts.title } : {},
61
+ ...opts.legend ? { legend: opts.legend } : {},
62
+ ...opts.plotVisOnly !== void 0 ? { plotVisOnly: opts.plotVisOnly } : {},
63
+ ...opts.dispBlanksAs !== void 0 ? { dispBlanksAs: opts.dispBlanksAs } : {}
64
+ },
65
+ ...opts.spPr ? { spPr: opts.spPr } : {},
66
+ ...opts.txPr ? { txPr: opts.txPr } : {}
67
+ });
68
+ const makeSunburstChart = (opts) => makeCxChartSpace({
69
+ data: [makeCxData(0, [makeCxStrDim({
70
+ type: "cat",
71
+ ...opts.catRef !== void 0 ? { f: opts.catRef } : {}
72
+ }), makeCxNumDim({
73
+ type: "val",
74
+ ...opts.valRef !== void 0 ? { f: opts.valRef } : {},
75
+ ...opts.valFormatCode !== void 0 ? { formatCode: opts.valFormatCode } : {}
76
+ })])],
77
+ series: [makeCxSeries({
78
+ layoutId: "sunburst",
79
+ dataId: 0
80
+ })]
81
+ });
82
+ const makeTreemapChart = (opts) => makeCxChartSpace({
83
+ data: [makeCxData(0, [makeCxStrDim({
84
+ type: "cat",
85
+ ...opts.catRef !== void 0 ? { f: opts.catRef } : {}
86
+ }), makeCxNumDim({
87
+ type: "val",
88
+ ...opts.valRef !== void 0 ? { f: opts.valRef } : {}
89
+ })])],
90
+ series: [makeCxSeries({
91
+ layoutId: "treemap",
92
+ dataId: 0,
93
+ layoutPr: {
94
+ kind: "parentLabel",
95
+ layout: opts.parentLabelLayout ?? "overlapping"
96
+ }
97
+ })]
98
+ });
99
+ const makeWaterfallChart = (opts) => makeCxChartSpace({
100
+ data: [makeCxData(0, [makeCxStrDim({
101
+ type: "cat",
102
+ ...opts.catRef !== void 0 ? { f: opts.catRef } : {}
103
+ }), makeCxNumDim({
104
+ type: "val",
105
+ ...opts.valRef !== void 0 ? { f: opts.valRef } : {}
106
+ })])],
107
+ series: [makeCxSeries({
108
+ layoutId: "waterfall",
109
+ dataId: 0,
110
+ axisIds: [0, 1],
111
+ layoutPr: {
112
+ kind: "waterfall",
113
+ subtotalIdx: opts.subtotalIdx ?? []
114
+ }
115
+ })],
116
+ axes: [makeCxAxis({ id: 0 }), makeCxAxis({ id: 1 })]
117
+ });
118
+ const makeHistogramChart = (opts) => makeCxChartSpace({
119
+ data: [makeCxData(0, [makeCxNumDim({
120
+ type: "val",
121
+ ...opts.valRef !== void 0 ? { f: opts.valRef } : {}
122
+ })])],
123
+ series: [makeCxSeries({
124
+ layoutId: "clusteredColumn",
125
+ dataId: 0,
126
+ axisIds: [0, 1],
127
+ layoutPr: {
128
+ kind: "binning",
129
+ ...opts.binCountAuto !== void 0 ? { binCountAuto: opts.binCountAuto } : {},
130
+ ...opts.binCount !== void 0 ? { binCount: opts.binCount } : {},
131
+ ...opts.binSize !== void 0 ? { binSize: opts.binSize } : {},
132
+ ...opts.intervalClosed !== void 0 ? { intervalClosed: opts.intervalClosed } : {},
133
+ ...opts.underflow !== void 0 ? { underflow: opts.underflow } : {},
134
+ ...opts.overflow !== void 0 ? { overflow: opts.overflow } : {}
135
+ }
136
+ })],
137
+ axes: [makeCxAxis({ id: 0 }), makeCxAxis({ id: 1 })]
138
+ });
139
+ const makeParetoChart = (opts) => {
140
+ const dims = [makeCxNumDim({
141
+ type: "val",
142
+ ...opts.valRef !== void 0 ? { f: opts.valRef } : {}
143
+ })];
144
+ if (opts.catRef !== void 0) dims.unshift(makeCxStrDim({
145
+ type: "cat",
146
+ f: opts.catRef
147
+ }));
148
+ return makeCxChartSpace({
149
+ data: [makeCxData(0, dims)],
150
+ series: [makeCxSeries({
151
+ layoutId: "clusteredColumn",
152
+ dataId: 0,
153
+ axisIds: [0, 1],
154
+ layoutPr: {
155
+ kind: "binning",
156
+ ...opts.binCountAuto !== void 0 ? { binCountAuto: opts.binCountAuto } : {},
157
+ ...opts.binCount !== void 0 ? { binCount: opts.binCount } : {},
158
+ ...opts.binSize !== void 0 ? { binSize: opts.binSize } : {}
159
+ }
160
+ }), makeCxSeries({
161
+ layoutId: "paretoLine",
162
+ dataId: 0,
163
+ ownerIdx: 0,
164
+ axisIds: [0, 2]
165
+ })],
166
+ axes: [
167
+ makeCxAxis({ id: 0 }),
168
+ makeCxAxis({ id: 1 }),
169
+ makeCxAxis({ id: 2 })
170
+ ]
171
+ });
172
+ };
173
+ const makeFunnelChart = (opts) => makeCxChartSpace({
174
+ data: [makeCxData(0, [makeCxStrDim({
175
+ type: "cat",
176
+ ...opts.catRef !== void 0 ? { f: opts.catRef } : {}
177
+ }), makeCxNumDim({
178
+ type: "val",
179
+ ...opts.valRef !== void 0 ? { f: opts.valRef } : {}
180
+ })])],
181
+ series: [makeCxSeries({
182
+ layoutId: "funnel",
183
+ dataId: 0
184
+ })]
185
+ });
186
+ const makeBoxWhiskerChart = (opts) => makeCxChartSpace({
187
+ data: [makeCxData(0, [makeCxStrDim({
188
+ type: "cat",
189
+ ...opts.catRef !== void 0 ? { f: opts.catRef } : {}
190
+ }), makeCxNumDim({
191
+ type: "val",
192
+ ...opts.valRef !== void 0 ? { f: opts.valRef } : {}
193
+ })])],
194
+ series: [makeCxSeries({
195
+ layoutId: "boxWhisker",
196
+ dataId: 0,
197
+ axisIds: [0, 1],
198
+ layoutPr: {
199
+ kind: "visibility",
200
+ ...opts.meanLine !== void 0 ? { meanLine: opts.meanLine } : {},
201
+ ...opts.meanMarker !== void 0 ? { meanMarker: opts.meanMarker } : {},
202
+ ...opts.outliers !== void 0 ? { outliers: opts.outliers } : {},
203
+ ...opts.nonoutliers !== void 0 ? { nonoutliers: opts.nonoutliers } : {},
204
+ ...opts.quartileMethod !== void 0 ? { quartileMethod: opts.quartileMethod } : {}
205
+ }
206
+ })],
207
+ axes: [makeCxAxis({ id: 0 }), makeCxAxis({ id: 1 })]
208
+ });
209
+ const makeRegionMapChart = (opts) => makeCxChartSpace({
210
+ data: [makeCxData(0, [makeCxStrDim({
211
+ type: "cat",
212
+ ...opts.catRef !== void 0 ? { f: opts.catRef } : {}
213
+ }), makeCxNumDim({
214
+ type: "val",
215
+ ...opts.valRef !== void 0 ? { f: opts.valRef } : {}
216
+ })])],
217
+ series: [makeCxSeries({
218
+ layoutId: "regionMap",
219
+ dataId: 0,
220
+ layoutPr: {
221
+ kind: "region",
222
+ ...opts.cultureLanguage !== void 0 ? { cultureLanguage: opts.cultureLanguage } : {},
223
+ ...opts.cultureRegion !== void 0 ? { cultureRegion: opts.cultureRegion } : {},
224
+ ...opts.projectionType !== void 0 ? { projectionType: opts.projectionType } : {},
225
+ ...opts.regionLabelLayout !== void 0 ? { regionLabelLayout: opts.regionLabelLayout } : {}
226
+ }
227
+ })]
228
+ });
229
+ //#endregion
230
+ export { makeAbsSizeAnchor, makeArea3DChart, makeAreaChart, makeBar3DChart, makeBarChart, makeBarSeries, makeBoxWhiskerChart, makeBubbleChart, makeBubbleSeries, makeChartDrawing, makeChartShape, makeChartSpace, makeCxAxis, makeCxChartSpace, makeCxData, makeCxNumDim, makeCxSeries, makeCxStrDim, makeDoughnutChart, makeFunnelChart, makeHistogramChart, makeLine3DChart, makeLineChart, makeOfPieChart, makeParetoChart, makePie3DChart, makePieChart, makeRadarChart, makeRegionMapChart, makeRelSizeAnchor, makeScatterChart, makeScatterSeries, makeStockChart, makeSunburstChart, makeSurface3DChart, makeSurfaceChart, makeTreemapChart, makeWaterfallChart };
231
+
232
+ //# sourceMappingURL=chart.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chart.mjs","names":[],"sources":["../src/chart/cx/chartex.ts"],"sourcesContent":["import type { ShapeProperties } from '../../drawing/dml/shape-properties';\nimport type { TextBody } from '../../drawing/dml/text';\n\n// Chartex (cx:) data model.\n//\n// Chartex covers the eight Excel-2016 chart kinds that aren't part of ECMA-376:\n// Sunburst, Treemap, Waterfall, Histogram, Pareto, Funnel, Box-and-Whisker, and\n// Region Map. Unlike the legacy `c:` chart space where each kind has its own\n// `<c:barChart>`/`<c:lineChart>` element, chartex puts the discriminator on the\n// series — `<cx:series layoutId=\"...\">` — and stores all source data once at\n// the top of the document under `<cx:chartData>` so multiple series can share\n// the same numbers.\n\n/** Chartex layout discriminator. Lives on `<cx:series layoutId=\"...\">`. */\nexport type CxLayoutId =\n | 'clusteredColumn'\n | 'waterfall'\n | 'sunburst'\n | 'treemap'\n | 'boxWhisker'\n | 'pareto'\n | 'paretoLine'\n | 'regionMap'\n | 'funnel';\n\n/** Numeric data point inside a chartex `<cx:numDim>` / `<cx:strDim>` level. */\nexport interface CxPoint {\n idx: number;\n v: string;\n}\n\n/** Numeric dimension (val / colorVal / size / x / y). */\nexport interface CxNumDim {\n kind: 'num';\n /** Dimension role attribute (`val`, `colorVal`, `size`, `x`, `y`). */\n type: string;\n /** Cell reference, e.g. `Sheet1!$A$1:$A$5`. */\n f?: string;\n /** Optional `dir=\"col\"|\"row\"` formula direction hint. */\n dir?: 'col' | 'row';\n ptCount?: number;\n pts: CxPoint[];\n formatCode?: string;\n}\n\n/** String dimension (cat / colorStr). */\nexport interface CxStrDim {\n kind: 'str';\n /** Dimension role attribute (`cat`, `colorStr`). */\n type: string;\n f?: string;\n dir?: 'col' | 'row';\n ptCount?: number;\n pts: CxPoint[];\n formatCode?: string;\n}\n\nexport type CxDim = CxNumDim | CxStrDim;\n\n/** Source data block, referenced by `<cx:dataId val=\"N\"/>` on series. */\nexport interface CxData {\n id: number;\n dims: CxDim[];\n}\n\n/** External data linkage (rare — most charts inline the cache). */\nexport interface CxExternalData {\n rId: string;\n autoUpdate?: boolean;\n}\n\nexport interface CxChartData {\n externalData?: CxExternalData;\n data: CxData[];\n}\n\n/** Layout-properties union, keyed on the series' layoutId family. */\nexport type CxLayoutPr =\n | { kind: 'waterfall'; subtotalIdx: number[] }\n | {\n kind: 'binning';\n binCountAuto?: boolean;\n binCount?: number;\n binSize?: number;\n intervalClosed?: 'r' | 'l';\n underflow?: number;\n overflow?: number;\n }\n | { kind: 'parentLabel'; layout: 'overlapping' | 'banner' | 'none' }\n | {\n kind: 'visibility';\n meanLine?: boolean;\n meanMarker?: boolean;\n nonoutliers?: boolean;\n outliers?: boolean;\n quartileMethod?: 'exclusive' | 'inclusive';\n }\n | {\n kind: 'region';\n cultureLanguage?: string;\n cultureRegion?: string;\n projectionType?: 'automatic' | 'mercator' | 'miller' | 'albers';\n regionLabelLayout?: 'none' | 'bestFit' | 'showAll';\n };\n\nexport type CxDataLabelPos = 'ctr' | 'b' | 'l' | 'r' | 't' | 'inEnd' | 'outEnd' | 'inBase';\n\nexport interface CxDataLabels {\n pos?: CxDataLabelPos;\n visibility?: {\n seriesName?: boolean;\n categoryName?: boolean;\n value?: boolean;\n };\n}\n\nexport interface CxSeries {\n layoutId: CxLayoutId;\n hidden?: boolean;\n ownerIdx?: number;\n formatIdx?: number;\n axisIds?: number[];\n /** Series text — typically a cell reference. */\n tx?: { f?: string; v?: string };\n dataLabels?: CxDataLabels;\n /** Numeric id pointing into chartData.data. */\n dataId?: number;\n layoutPr?: CxLayoutPr;\n /** Per-series shape properties (fill / line / effects). */\n spPr?: ShapeProperties;\n /** Per-series default text properties. */\n txPr?: TextBody;\n}\n\nexport interface CxAxis {\n id: number;\n hidden?: boolean;\n /** Continuous (value) axis bounds. */\n valScaling?: { min?: number; max?: number };\n /** Category-axis gap width %. */\n catScalingGapWidth?: number;\n majorGridlines?: boolean;\n title?: CxTitle;\n /** Axis-line / tick formatting. */\n spPr?: ShapeProperties;\n /** Tick-label text formatting. */\n txPr?: TextBody;\n}\n\nexport interface CxTitle {\n pos?: 't' | 'b' | 'l' | 'r';\n align?: 'ctr' | 'l' | 'r';\n overlay?: boolean;\n /** Plain text (rich runs not preserved at this layer). */\n text?: string;\n /** Cell-reference text source. */\n txDataRef?: string;\n /** Title chrome (frame fill / border). */\n spPr?: ShapeProperties;\n /** Title text formatting. */\n txPr?: TextBody;\n}\n\nexport interface CxLegend {\n pos?: 't' | 'b' | 'l' | 'r' | 'tr';\n align?: 'ctr' | 'l' | 'r';\n overlay?: boolean;\n /** Legend chrome (frame fill / border). */\n spPr?: ShapeProperties;\n /** Legend text formatting. */\n txPr?: TextBody;\n}\n\nexport interface CxPlotArea {\n series: CxSeries[];\n axes: CxAxis[];\n /** Plot-surface shape properties (background fill / border line). */\n spPr?: ShapeProperties;\n}\n\nexport interface CxChart {\n title?: CxTitle;\n plotArea: CxPlotArea;\n legend?: CxLegend;\n plotVisOnly?: boolean;\n dispBlanksAs?: 'span' | 'gap' | 'zero';\n}\n\n/** Root model for a chartex `xl/charts/chartN.xml` part. */\nexport interface CxChartSpace {\n kind: 'cxChartSpace';\n chartData: CxChartData;\n chart: CxChart;\n /** Chart-space level shape properties (overall frame). */\n spPr?: ShapeProperties;\n /** Chart-space level default text properties. */\n txPr?: TextBody;\n}\n\n// ---- factories --------------------------------------------------------------\n\nexport const makeCxNumDim = (opts: {\n type: string;\n f?: string;\n dir?: 'col' | 'row';\n ptCount?: number;\n pts?: CxPoint[];\n formatCode?: string;\n}): CxNumDim => ({\n kind: 'num',\n type: opts.type,\n ...(opts.f !== undefined ? { f: opts.f } : {}),\n ...(opts.dir !== undefined ? { dir: opts.dir } : {}),\n ...(opts.ptCount !== undefined ? { ptCount: opts.ptCount } : {}),\n pts: opts.pts ?? [],\n ...(opts.formatCode !== undefined ? { formatCode: opts.formatCode } : {}),\n});\n\nexport const makeCxStrDim = (opts: {\n type: string;\n f?: string;\n dir?: 'col' | 'row';\n ptCount?: number;\n pts?: CxPoint[];\n formatCode?: string;\n}): CxStrDim => ({\n kind: 'str',\n type: opts.type,\n ...(opts.f !== undefined ? { f: opts.f } : {}),\n ...(opts.dir !== undefined ? { dir: opts.dir } : {}),\n ...(opts.ptCount !== undefined ? { ptCount: opts.ptCount } : {}),\n pts: opts.pts ?? [],\n ...(opts.formatCode !== undefined ? { formatCode: opts.formatCode } : {}),\n});\n\nexport const makeCxData = (id: number, dims: CxDim[]): CxData => ({ id, dims });\n\nexport const makeCxSeries = (opts: {\n layoutId: CxLayoutId;\n dataId?: number;\n hidden?: boolean;\n ownerIdx?: number;\n formatIdx?: number;\n axisIds?: number[];\n tx?: { f?: string; v?: string };\n dataLabels?: CxDataLabels;\n layoutPr?: CxLayoutPr;\n spPr?: ShapeProperties;\n txPr?: TextBody;\n}): CxSeries => ({\n layoutId: opts.layoutId,\n ...(opts.hidden !== undefined ? { hidden: opts.hidden } : {}),\n ...(opts.ownerIdx !== undefined ? { ownerIdx: opts.ownerIdx } : {}),\n ...(opts.formatIdx !== undefined ? { formatIdx: opts.formatIdx } : {}),\n ...(opts.axisIds !== undefined ? { axisIds: opts.axisIds } : {}),\n ...(opts.tx ? { tx: opts.tx } : {}),\n ...(opts.dataLabels ? { dataLabels: opts.dataLabels } : {}),\n ...(opts.dataId !== undefined ? { dataId: opts.dataId } : {}),\n ...(opts.layoutPr ? { layoutPr: opts.layoutPr } : {}),\n ...(opts.spPr ? { spPr: opts.spPr } : {}),\n ...(opts.txPr ? { txPr: opts.txPr } : {}),\n});\n\nexport const makeCxAxis = (opts: {\n id: number;\n hidden?: boolean;\n valScaling?: { min?: number; max?: number };\n catScalingGapWidth?: number;\n majorGridlines?: boolean;\n title?: CxTitle;\n spPr?: ShapeProperties;\n txPr?: TextBody;\n}): CxAxis => ({\n id: opts.id,\n ...(opts.hidden !== undefined ? { hidden: opts.hidden } : {}),\n ...(opts.valScaling ? { valScaling: opts.valScaling } : {}),\n ...(opts.catScalingGapWidth !== undefined ? { catScalingGapWidth: opts.catScalingGapWidth } : {}),\n ...(opts.majorGridlines !== undefined ? { majorGridlines: opts.majorGridlines } : {}),\n ...(opts.title ? { title: opts.title } : {}),\n ...(opts.spPr ? { spPr: opts.spPr } : {}),\n ...(opts.txPr ? { txPr: opts.txPr } : {}),\n});\n\nexport const makeCxChartSpace = (opts: {\n series: CxSeries[];\n data?: CxData[];\n axes?: CxAxis[];\n title?: CxTitle;\n legend?: CxLegend;\n plotVisOnly?: boolean;\n dispBlanksAs?: CxChart['dispBlanksAs'];\n externalData?: CxExternalData;\n plotAreaSpPr?: ShapeProperties;\n spPr?: ShapeProperties;\n txPr?: TextBody;\n}): CxChartSpace => ({\n kind: 'cxChartSpace',\n chartData: {\n ...(opts.externalData ? { externalData: opts.externalData } : {}),\n data: opts.data ?? [],\n },\n chart: {\n plotArea: {\n series: opts.series,\n axes: opts.axes ?? [],\n ...(opts.plotAreaSpPr ? { spPr: opts.plotAreaSpPr } : {}),\n },\n ...(opts.title ? { title: opts.title } : {}),\n ...(opts.legend ? { legend: opts.legend } : {}),\n ...(opts.plotVisOnly !== undefined ? { plotVisOnly: opts.plotVisOnly } : {}),\n ...(opts.dispBlanksAs !== undefined ? { dispBlanksAs: opts.dispBlanksAs } : {}),\n },\n ...(opts.spPr ? { spPr: opts.spPr } : {}),\n ...(opts.txPr ? { txPr: opts.txPr } : {}),\n});\n\n// ---- per-kind convenience factories ----------------------------------------\n//\n// Each helper builds a CxChartSpace with one CxData block (id 0) carrying the\n// appropriate dimension shapes for the layoutId. Callers populate the dim point\n// caches directly when they have data on hand.\n\nexport const makeSunburstChart = (opts: { catRef?: string; valRef?: string; valFormatCode?: string }): CxChartSpace =>\n makeCxChartSpace({\n data: [\n makeCxData(0, [\n makeCxStrDim({ type: 'cat', ...(opts.catRef !== undefined ? { f: opts.catRef } : {}) }),\n makeCxNumDim({\n type: 'val',\n ...(opts.valRef !== undefined ? { f: opts.valRef } : {}),\n ...(opts.valFormatCode !== undefined ? { formatCode: opts.valFormatCode } : {}),\n }),\n ]),\n ],\n series: [makeCxSeries({ layoutId: 'sunburst', dataId: 0 })],\n });\n\nexport const makeTreemapChart = (opts: {\n catRef?: string;\n valRef?: string;\n parentLabelLayout?: 'overlapping' | 'banner' | 'none';\n}): CxChartSpace =>\n makeCxChartSpace({\n data: [\n makeCxData(0, [\n makeCxStrDim({ type: 'cat', ...(opts.catRef !== undefined ? { f: opts.catRef } : {}) }),\n makeCxNumDim({ type: 'val', ...(opts.valRef !== undefined ? { f: opts.valRef } : {}) }),\n ]),\n ],\n series: [\n makeCxSeries({\n layoutId: 'treemap',\n dataId: 0,\n layoutPr: { kind: 'parentLabel', layout: opts.parentLabelLayout ?? 'overlapping' },\n }),\n ],\n });\n\nexport const makeWaterfallChart = (opts: { catRef?: string; valRef?: string; subtotalIdx?: number[] }): CxChartSpace =>\n makeCxChartSpace({\n data: [\n makeCxData(0, [\n makeCxStrDim({ type: 'cat', ...(opts.catRef !== undefined ? { f: opts.catRef } : {}) }),\n makeCxNumDim({ type: 'val', ...(opts.valRef !== undefined ? { f: opts.valRef } : {}) }),\n ]),\n ],\n series: [\n makeCxSeries({\n layoutId: 'waterfall',\n dataId: 0,\n axisIds: [0, 1],\n layoutPr: { kind: 'waterfall', subtotalIdx: opts.subtotalIdx ?? [] },\n }),\n ],\n axes: [makeCxAxis({ id: 0 }), makeCxAxis({ id: 1 })],\n });\n\nexport const makeHistogramChart = (opts: {\n valRef?: string;\n binCountAuto?: boolean;\n binCount?: number;\n binSize?: number;\n intervalClosed?: 'r' | 'l';\n underflow?: number;\n overflow?: number;\n}): CxChartSpace =>\n makeCxChartSpace({\n data: [makeCxData(0, [makeCxNumDim({ type: 'val', ...(opts.valRef !== undefined ? { f: opts.valRef } : {}) })])],\n series: [\n makeCxSeries({\n layoutId: 'clusteredColumn',\n dataId: 0,\n axisIds: [0, 1],\n layoutPr: {\n kind: 'binning',\n ...(opts.binCountAuto !== undefined ? { binCountAuto: opts.binCountAuto } : {}),\n ...(opts.binCount !== undefined ? { binCount: opts.binCount } : {}),\n ...(opts.binSize !== undefined ? { binSize: opts.binSize } : {}),\n ...(opts.intervalClosed !== undefined ? { intervalClosed: opts.intervalClosed } : {}),\n ...(opts.underflow !== undefined ? { underflow: opts.underflow } : {}),\n ...(opts.overflow !== undefined ? { overflow: opts.overflow } : {}),\n },\n }),\n ],\n axes: [makeCxAxis({ id: 0 }), makeCxAxis({ id: 1 })],\n });\n\nexport const makeParetoChart = (opts: {\n valRef?: string;\n catRef?: string;\n binCountAuto?: boolean;\n binCount?: number;\n binSize?: number;\n}): CxChartSpace => {\n const dims: CxDim[] = [makeCxNumDim({ type: 'val', ...(opts.valRef !== undefined ? { f: opts.valRef } : {}) })];\n if (opts.catRef !== undefined) dims.unshift(makeCxStrDim({ type: 'cat', f: opts.catRef }));\n return makeCxChartSpace({\n data: [makeCxData(0, dims)],\n series: [\n makeCxSeries({\n layoutId: 'clusteredColumn',\n dataId: 0,\n axisIds: [0, 1],\n layoutPr: {\n kind: 'binning',\n ...(opts.binCountAuto !== undefined ? { binCountAuto: opts.binCountAuto } : {}),\n ...(opts.binCount !== undefined ? { binCount: opts.binCount } : {}),\n ...(opts.binSize !== undefined ? { binSize: opts.binSize } : {}),\n },\n }),\n makeCxSeries({ layoutId: 'paretoLine', dataId: 0, ownerIdx: 0, axisIds: [0, 2] }),\n ],\n axes: [makeCxAxis({ id: 0 }), makeCxAxis({ id: 1 }), makeCxAxis({ id: 2 })],\n });\n};\n\nexport const makeFunnelChart = (opts: { catRef?: string; valRef?: string }): CxChartSpace =>\n makeCxChartSpace({\n data: [\n makeCxData(0, [\n makeCxStrDim({ type: 'cat', ...(opts.catRef !== undefined ? { f: opts.catRef } : {}) }),\n makeCxNumDim({ type: 'val', ...(opts.valRef !== undefined ? { f: opts.valRef } : {}) }),\n ]),\n ],\n series: [makeCxSeries({ layoutId: 'funnel', dataId: 0 })],\n });\n\nexport const makeBoxWhiskerChart = (opts: {\n catRef?: string;\n valRef?: string;\n meanLine?: boolean;\n meanMarker?: boolean;\n outliers?: boolean;\n nonoutliers?: boolean;\n quartileMethod?: 'exclusive' | 'inclusive';\n}): CxChartSpace =>\n makeCxChartSpace({\n data: [\n makeCxData(0, [\n makeCxStrDim({ type: 'cat', ...(opts.catRef !== undefined ? { f: opts.catRef } : {}) }),\n makeCxNumDim({ type: 'val', ...(opts.valRef !== undefined ? { f: opts.valRef } : {}) }),\n ]),\n ],\n series: [\n makeCxSeries({\n layoutId: 'boxWhisker',\n dataId: 0,\n axisIds: [0, 1],\n layoutPr: {\n kind: 'visibility',\n ...(opts.meanLine !== undefined ? { meanLine: opts.meanLine } : {}),\n ...(opts.meanMarker !== undefined ? { meanMarker: opts.meanMarker } : {}),\n ...(opts.outliers !== undefined ? { outliers: opts.outliers } : {}),\n ...(opts.nonoutliers !== undefined ? { nonoutliers: opts.nonoutliers } : {}),\n ...(opts.quartileMethod !== undefined ? { quartileMethod: opts.quartileMethod } : {}),\n },\n }),\n ],\n axes: [makeCxAxis({ id: 0 }), makeCxAxis({ id: 1 })],\n });\n\nexport const makeRegionMapChart = (opts: {\n catRef?: string;\n valRef?: string;\n cultureLanguage?: string;\n cultureRegion?: string;\n projectionType?: 'automatic' | 'mercator' | 'miller' | 'albers';\n regionLabelLayout?: 'none' | 'bestFit' | 'showAll';\n}): CxChartSpace =>\n makeCxChartSpace({\n data: [\n makeCxData(0, [\n makeCxStrDim({ type: 'cat', ...(opts.catRef !== undefined ? { f: opts.catRef } : {}) }),\n makeCxNumDim({ type: 'val', ...(opts.valRef !== undefined ? { f: opts.valRef } : {}) }),\n ]),\n ],\n series: [\n makeCxSeries({\n layoutId: 'regionMap',\n dataId: 0,\n layoutPr: {\n kind: 'region',\n ...(opts.cultureLanguage !== undefined ? { cultureLanguage: opts.cultureLanguage } : {}),\n ...(opts.cultureRegion !== undefined ? { cultureRegion: opts.cultureRegion } : {}),\n ...(opts.projectionType !== undefined ? { projectionType: opts.projectionType } : {}),\n ...(opts.regionLabelLayout !== undefined ? { regionLabelLayout: opts.regionLabelLayout } : {}),\n },\n }),\n ],\n });\n"],"mappings":";;AAyMA,MAAa,gBAAgB,UAOZ;CACf,MAAM;CACN,MAAM,KAAK;CACX,GAAI,KAAK,MAAM,KAAA,IAAY,EAAE,GAAG,KAAK,EAAE,IAAI,CAAC;CAC5C,GAAI,KAAK,QAAQ,KAAA,IAAY,EAAE,KAAK,KAAK,IAAI,IAAI,CAAC;CAClD,GAAI,KAAK,YAAY,KAAA,IAAY,EAAE,SAAS,KAAK,QAAQ,IAAI,CAAC;CAC9D,KAAK,KAAK,OAAO,CAAC;CAClB,GAAI,KAAK,eAAe,KAAA,IAAY,EAAE,YAAY,KAAK,WAAW,IAAI,CAAC;AACzE;AAEA,MAAa,gBAAgB,UAOZ;CACf,MAAM;CACN,MAAM,KAAK;CACX,GAAI,KAAK,MAAM,KAAA,IAAY,EAAE,GAAG,KAAK,EAAE,IAAI,CAAC;CAC5C,GAAI,KAAK,QAAQ,KAAA,IAAY,EAAE,KAAK,KAAK,IAAI,IAAI,CAAC;CAClD,GAAI,KAAK,YAAY,KAAA,IAAY,EAAE,SAAS,KAAK,QAAQ,IAAI,CAAC;CAC9D,KAAK,KAAK,OAAO,CAAC;CAClB,GAAI,KAAK,eAAe,KAAA,IAAY,EAAE,YAAY,KAAK,WAAW,IAAI,CAAC;AACzE;AAEA,MAAa,cAAc,IAAY,UAA2B;CAAE;CAAI;AAAK;AAE7E,MAAa,gBAAgB,UAYZ;CACf,UAAU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BAAmB,KAAA,IAAY,EAAE,gBAAgB,KAAK,eAAe,IAAI,CAAC;EACrF;CACF,CAAC,CACH;CACA,MAAM,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC,GAAG,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;AACrD,CAAC;AAEH,MAAa,sBAAsB,SAQjC,iBAAiB;CACf,MAAM,CACJ,WAAW,GAAG,CACZ,aAAa;EAAE,MAAM;EAAO,GAAI,KAAK,WAAW,KAAA,IAAY,EAAE,GAAG,KAAK,OAAO,IAAI,CAAC;CAAG,CAAC,GACtF,aAAa;EAAE,MAAM;EAAO,GAAI,KAAK,WAAW,KAAA,IAAY,EAAE,GAAG,KAAK,OAAO,IAAI,CAAC;CAAG,CAAC,CACxF,CAAC,CACH;CACA,QAAQ,CACN,aAAa;EACX,UAAU;EACV,QAAQ;EACR,UAAU;GACR,MAAM;GACN,GAAI,KAAK,oBAAoB,KAAA,IAAY,EAAE,iBAAiB,KAAK,gBAAgB,IAAI,CAAC;GACtF,GAAI,KAAK,kBAAkB,KAAA,IAAY,EAAE,eAAe,KAAK,cAAc,IAAI,CAAC;GAChF,GAAI,KAAK,mBAAmB,KAAA,IAAY,EAAE,gBAAgB,KAAK,eAAe,IAAI,CAAC;GACnF,GAAI,KAAK,sBAAsB,KAAA,IAAY,EAAE,mBAAmB,KAAK,kBAAkB,IAAI,CAAC;EAC9F;CACF,CAAC,CACH;AACF,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { type Chartsheet } from './chartsheet';
2
+ /**
3
+ * Parse a chartsheet part. Returns a Chartsheet with `title` set to the
4
+ * provided fallback (Excel doesn't store the display name inside the chartsheet
5
+ * part itself — it lives in workbook.xml's `<sheet name>`).
6
+ */
7
+ export declare function parseChartsheetXml(bytes: Uint8Array | string, title: string): Chartsheet;
8
+ /**
9
+ * Optional drawing rId injected by the writer. The chartsheet part itself only
10
+ * references the drawing by relationship id; the writer supplies the id once it
11
+ * has registered the drawing.
12
+ */
13
+ export interface ChartsheetSerializeOptions {
14
+ drawingRId?: string;
15
+ }
16
+ export declare function serializeChartsheet(cs: Chartsheet, opts?: ChartsheetSerializeOptions): string;
17
+ export declare function chartsheetToBytes(cs: Chartsheet, opts?: ChartsheetSerializeOptions): Uint8Array;