reamkit 1.15.1 → 1.15.3

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 (316) hide show
  1. package/dist/esm/core/arc-to-bezier.d.ts +23 -0
  2. package/dist/esm/core/arc-to-bezier.js +23 -0
  3. package/dist/esm/core/bidi/algorithm.d.ts +26 -0
  4. package/dist/esm/core/bidi/algorithm.js +21 -0
  5. package/dist/esm/core/bidi/char-types.d.ts +17 -0
  6. package/dist/esm/core/bidi/char-types.js +10 -0
  7. package/dist/esm/core/bidi/index.d.ts +42 -0
  8. package/dist/esm/core/bidi/index.js +27 -0
  9. package/dist/esm/core/bidi/segments.d.ts +22 -0
  10. package/dist/esm/core/bidi/segments.js +14 -0
  11. package/dist/esm/core/bytes.d.ts +20 -0
  12. package/dist/esm/core/bytes.js +24 -1
  13. package/dist/esm/core/converter/facade.d.ts +38 -1
  14. package/dist/esm/core/converter/facade.js +25 -0
  15. package/dist/esm/core/converter/project.d.ts +12 -0
  16. package/dist/esm/core/converter/project.js +11 -0
  17. package/dist/esm/core/converter/ream.d.ts +107 -0
  18. package/dist/esm/core/converter/ream.js +76 -0
  19. package/dist/esm/core/crypto/asn1.d.ts +77 -0
  20. package/dist/esm/core/crypto/asn1.js +65 -0
  21. package/dist/esm/core/crypto/cms.d.ts +25 -0
  22. package/dist/esm/core/crypto/cms.js +8 -0
  23. package/dist/esm/core/document-model/index.d.ts +7 -0
  24. package/dist/esm/core/document-model/types.d.ts +328 -0
  25. package/dist/esm/core/drawingml/chart-geometry.d.ts +125 -0
  26. package/dist/esm/core/drawingml/chart-geometry.js +96 -0
  27. package/dist/esm/core/drawingml/chart-parser.d.ts +34 -0
  28. package/dist/esm/core/drawingml/chart-parser.js +34 -0
  29. package/dist/esm/core/drawingml/chart-serializer.d.ts +12 -0
  30. package/dist/esm/core/drawingml/chart-serializer.js +12 -0
  31. package/dist/esm/core/drawingml/colors.d.ts +53 -0
  32. package/dist/esm/core/drawingml/colors.js +41 -0
  33. package/dist/esm/core/drawingml/preset-geometry.d.ts +30 -0
  34. package/dist/esm/core/drawingml/preset-geometry.js +30 -0
  35. package/dist/esm/core/drawingml/shape-render.d.ts +54 -0
  36. package/dist/esm/core/drawingml/shape-render.js +54 -0
  37. package/dist/esm/core/drawingml/sparkline-geometry.d.ts +15 -0
  38. package/dist/esm/core/drawingml/sparkline-geometry.js +13 -0
  39. package/dist/esm/core/drawingml/theme-parser.d.ts +11 -0
  40. package/dist/esm/core/drawingml/theme-parser.js +11 -0
  41. package/dist/esm/core/font/arabic-joining.d.ts +21 -0
  42. package/dist/esm/core/font/arabic-joining.js +16 -0
  43. package/dist/esm/core/font/binary-reader.d.ts +17 -0
  44. package/dist/esm/core/font/binary-reader.js +17 -0
  45. package/dist/esm/core/font/font-registry.d.ts +37 -0
  46. package/dist/esm/core/font/font-registry.js +31 -0
  47. package/dist/esm/core/font/measure.d.ts +20 -0
  48. package/dist/esm/core/font/measure.js +11 -0
  49. package/dist/esm/core/font/opentype-layout.d.ts +49 -0
  50. package/dist/esm/core/font/opentype-layout.js +37 -0
  51. package/dist/esm/core/font/ttf-parser.d.ts +32 -0
  52. package/dist/esm/core/font/ttf-parser.js +7 -0
  53. package/dist/esm/core/font/ttf-subset.d.ts +21 -0
  54. package/dist/esm/core/font/ttf-subset.js +21 -0
  55. package/dist/esm/core/fonts/provider.d.ts +8 -1
  56. package/dist/esm/core/fonts/provider.js +1 -0
  57. package/dist/esm/core/fonts/remote-fonts.d.ts +22 -0
  58. package/dist/esm/core/fonts/remote-fonts.js +16 -0
  59. package/dist/esm/core/hyphenation/index.d.ts +25 -0
  60. package/dist/esm/core/hyphenation/index.js +17 -0
  61. package/dist/esm/core/hyphenation/liang.d.ts +27 -0
  62. package/dist/esm/core/hyphenation/liang.js +14 -0
  63. package/dist/esm/core/images.d.ts +32 -0
  64. package/dist/esm/core/images.js +12 -0
  65. package/dist/esm/core/ir/adapters.d.ts +23 -0
  66. package/dist/esm/core/ir/features.d.ts +8 -0
  67. package/dist/esm/core/ir/features.js +1 -0
  68. package/dist/esm/core/ir/flow.d.ts +20 -0
  69. package/dist/esm/core/ir/index.d.ts +7 -0
  70. package/dist/esm/core/ir/loss.d.ts +12 -0
  71. package/dist/esm/core/ir/loss.js +8 -0
  72. package/dist/esm/core/ir/resources.d.ts +12 -0
  73. package/dist/esm/core/ir/resources.js +11 -0
  74. package/dist/esm/core/ir/sheet.d.ts +81 -0
  75. package/dist/esm/core/ir/units.d.ts +9 -0
  76. package/dist/esm/core/ir/units.js +2 -0
  77. package/dist/esm/core/line-breaker/cjk.d.ts +26 -0
  78. package/dist/esm/core/line-breaker/cjk.js +60 -0
  79. package/dist/esm/core/line-breaker/greedy.d.ts +14 -0
  80. package/dist/esm/core/line-breaker/greedy.js +14 -0
  81. package/dist/esm/core/line-breaker/index.d.ts +1 -0
  82. package/dist/esm/core/line-breaker/index.js +3 -0
  83. package/dist/esm/core/line-breaker/knuth-plass.d.ts +29 -5
  84. package/dist/esm/core/line-breaker/knuth-plass.js +10 -5
  85. package/dist/esm/core/numbering/apply.d.ts +19 -0
  86. package/dist/esm/core/numbering/apply.js +19 -0
  87. package/dist/esm/core/numbering/state.d.ts +15 -0
  88. package/dist/esm/core/numbering/state.js +15 -0
  89. package/dist/esm/core/ole/cfb.d.ts +19 -0
  90. package/dist/esm/core/ole/cfb.js +16 -0
  91. package/dist/esm/core/opc/core-properties.d.ts +12 -0
  92. package/dist/esm/core/opc/core-properties.js +5 -0
  93. package/dist/esm/core/opc/opc-writer.d.ts +24 -4
  94. package/dist/esm/core/opc/opc-writer.js +12 -0
  95. package/dist/esm/core/opc/package.d.ts +55 -0
  96. package/dist/esm/core/opc/package.js +49 -1
  97. package/dist/esm/core/opc/relationship-types.d.ts +8 -0
  98. package/dist/esm/core/opc/relationship-types.js +5 -0
  99. package/dist/esm/core/opc/relationships.d.ts +12 -0
  100. package/dist/esm/core/opc/relationships.js +7 -0
  101. package/dist/esm/core/po-helpers.d.ts +38 -0
  102. package/dist/esm/core/po-helpers.js +33 -0
  103. package/dist/esm/core/spreadsheet-model/types.d.ts +302 -0
  104. package/dist/esm/core/style-cascade/resolver.d.ts +31 -0
  105. package/dist/esm/core/style-cascade/resolver.js +31 -0
  106. package/dist/esm/core/style-cascade/table.d.ts +7 -0
  107. package/dist/esm/core/style-cascade/table.js +7 -0
  108. package/dist/esm/core/style-cascade/types.d.ts +27 -0
  109. package/dist/esm/core/style-cascade/types.js +2 -0
  110. package/dist/esm/core/vector.d.ts +67 -0
  111. package/dist/esm/core/vector.js +23 -0
  112. package/dist/esm/excel/activex-parser.d.ts +31 -0
  113. package/dist/esm/excel/activex-parser.js +24 -0
  114. package/dist/esm/excel/cell-reference.d.ts +14 -0
  115. package/dist/esm/excel/cell-reference.js +9 -0
  116. package/dist/esm/excel/column-bands.d.ts +29 -0
  117. package/dist/esm/excel/column-bands.js +27 -7
  118. package/dist/esm/excel/comments-parser.d.ts +19 -0
  119. package/dist/esm/excel/comments-parser.js +19 -0
  120. package/dist/esm/excel/conditional-format.d.ts +38 -0
  121. package/dist/esm/excel/conditional-format.js +25 -0
  122. package/dist/esm/excel/defined-name-ref.d.ts +21 -0
  123. package/dist/esm/excel/defined-name-ref.js +20 -0
  124. package/dist/esm/excel/form-control-parser.d.ts +13 -0
  125. package/dist/esm/excel/form-control-parser.js +5 -0
  126. package/dist/esm/excel/formula/context.d.ts +37 -0
  127. package/dist/esm/excel/formula/dates.d.ts +23 -0
  128. package/dist/esm/excel/formula/dates.js +20 -0
  129. package/dist/esm/excel/formula/eval.d.ts +21 -0
  130. package/dist/esm/excel/formula/eval.js +11 -0
  131. package/dist/esm/excel/formula/functions.d.ts +12 -0
  132. package/dist/esm/excel/formula/functions.js +12 -0
  133. package/dist/esm/excel/formula/index.d.ts +21 -0
  134. package/dist/esm/excel/formula/index.js +16 -0
  135. package/dist/esm/excel/formula/lexer.d.ts +12 -0
  136. package/dist/esm/excel/formula/lexer.js +10 -0
  137. package/dist/esm/excel/formula/parser.d.ts +20 -0
  138. package/dist/esm/excel/formula/parser.js +53 -0
  139. package/dist/esm/excel/formula/value.d.ts +53 -0
  140. package/dist/esm/excel/formula/value.js +30 -0
  141. package/dist/esm/excel/header-footer.d.ts +9 -0
  142. package/dist/esm/excel/header-footer.js +9 -0
  143. package/dist/esm/excel/number-format.d.ts +34 -0
  144. package/dist/esm/excel/number-format.js +34 -0
  145. package/dist/esm/excel/pivot-table-parser.d.ts +8 -0
  146. package/dist/esm/excel/pivot-table-parser.js +8 -0
  147. package/dist/esm/excel/print-model.d.ts +77 -1
  148. package/dist/esm/excel/print-model.js +230 -26
  149. package/dist/esm/excel/shared-strings-parser.d.ts +13 -0
  150. package/dist/esm/excel/shared-strings-parser.js +5 -0
  151. package/dist/esm/excel/sheet-drawing.d.ts +34 -0
  152. package/dist/esm/excel/sheet-drawing.js +21 -0
  153. package/dist/esm/excel/sheet-shape-parser.d.ts +12 -0
  154. package/dist/esm/excel/sheet-shape-parser.js +12 -0
  155. package/dist/esm/excel/sheet-to-flow.d.ts +29 -0
  156. package/dist/esm/excel/sheet-to-flow.js +24 -7
  157. package/dist/esm/excel/slicer-parser.d.ts +23 -0
  158. package/dist/esm/excel/slicer-parser.js +10 -0
  159. package/dist/esm/excel/styles-parser.d.ts +8 -0
  160. package/dist/esm/excel/styles-parser.js +8 -0
  161. package/dist/esm/excel/table-parser.d.ts +24 -0
  162. package/dist/esm/excel/table-parser.js +5 -0
  163. package/dist/esm/excel/workbook-parser.d.ts +17 -0
  164. package/dist/esm/excel/workbook-parser.js +5 -0
  165. package/dist/esm/excel/worksheet-parser.d.ts +9 -0
  166. package/dist/esm/excel/worksheet-parser.js +39 -6
  167. package/dist/esm/excel/xls/biff-chart.d.ts +10 -0
  168. package/dist/esm/excel/xls/biff-chart.js +10 -0
  169. package/dist/esm/excel/xls/biff-reader.d.ts +27 -0
  170. package/dist/esm/excel/xls/biff-reader.js +44 -0
  171. package/dist/esm/excel/xls/biff-styles.d.ts +20 -0
  172. package/dist/esm/excel/xls/biff-styles.js +20 -0
  173. package/dist/esm/excel/xls/escher.d.ts +27 -0
  174. package/dist/esm/excel/xls/escher.js +18 -0
  175. package/dist/esm/excel/xls/xls-reader.d.ts +6 -0
  176. package/dist/esm/excel/xls/xls-reader.js +6 -0
  177. package/dist/esm/excel/xlsx-reader.d.ts +30 -0
  178. package/dist/esm/excel/xlsx-reader.js +38 -4
  179. package/dist/esm/excel/xlsx-to-pdf.d.ts +27 -0
  180. package/dist/esm/excel/xlsx-writer.d.ts +14 -0
  181. package/dist/esm/excel/xlsx-writer.js +13 -0
  182. package/dist/esm/html/html-writer.d.ts +18 -0
  183. package/dist/esm/html/html-writer.js +18 -0
  184. package/dist/esm/index.d.ts +23 -0
  185. package/dist/esm/layout/math-layout.d.ts +39 -0
  186. package/dist/esm/layout/math-layout.js +18 -0
  187. package/dist/esm/layout/page-doc.d.ts +91 -0
  188. package/dist/esm/layout/styled-layout.d.ts +175 -0
  189. package/dist/esm/layout/styled-layout.js +136 -4
  190. package/dist/esm/pdf/builtin-fonts.d.ts +5 -0
  191. package/dist/esm/pdf/cid-font.d.ts +22 -0
  192. package/dist/esm/pdf/cid-font.js +10 -0
  193. package/dist/esm/pdf/embedded-file.d.ts +16 -0
  194. package/dist/esm/pdf/embedded-file.js +9 -0
  195. package/dist/esm/pdf/encryption.d.ts +59 -0
  196. package/dist/esm/pdf/encryption.js +37 -0
  197. package/dist/esm/pdf/icc-profile.d.ts +8 -0
  198. package/dist/esm/pdf/icc-profile.js +8 -0
  199. package/dist/esm/pdf/image-xobject.d.ts +19 -0
  200. package/dist/esm/pdf/image-xobject.js +9 -0
  201. package/dist/esm/pdf/objects.d.ts +40 -0
  202. package/dist/esm/pdf/objects.js +36 -0
  203. package/dist/esm/pdf/serialize.d.ts +18 -0
  204. package/dist/esm/pdf/serialize.js +18 -0
  205. package/dist/esm/pdf/shading.d.ts +16 -0
  206. package/dist/esm/pdf/shading.js +16 -0
  207. package/dist/esm/pdf/signature.d.ts +36 -0
  208. package/dist/esm/pdf/signature.js +22 -0
  209. package/dist/esm/pdf/struct-tree.d.ts +64 -0
  210. package/dist/esm/pdf/struct-tree.js +60 -0
  211. package/dist/esm/pdf/styled-page-emitter.d.ts +33 -0
  212. package/dist/esm/pdf/styled-page-emitter.js +21 -0
  213. package/dist/esm/pdf/styled-page-renderer.d.ts +18 -0
  214. package/dist/esm/pdf/styled-page-renderer.js +18 -0
  215. package/dist/esm/pdf/text-encoding.d.ts +16 -0
  216. package/dist/esm/pdf/text-page-renderer.d.ts +11 -0
  217. package/dist/esm/pdf/vector-graphics.d.ts +12 -0
  218. package/dist/esm/pdf/vector-graphics.js +12 -0
  219. package/dist/esm/pdf/writer.d.ts +39 -0
  220. package/dist/esm/pdf/writer.js +27 -0
  221. package/dist/esm/pdf/xmp.d.ts +16 -0
  222. package/dist/esm/pdf/xmp.js +9 -0
  223. package/dist/esm/pdf-reader/ccitt.d.ts +25 -0
  224. package/dist/esm/pdf-reader/ccitt.js +15 -0
  225. package/dist/esm/pdf-reader/cmap.d.ts +12 -0
  226. package/dist/esm/pdf-reader/cmap.js +9 -0
  227. package/dist/esm/pdf-reader/content.d.ts +69 -0
  228. package/dist/esm/pdf-reader/content.js +16 -0
  229. package/dist/esm/pdf-reader/crypto.d.ts +5 -0
  230. package/dist/esm/pdf-reader/crypto.js +5 -0
  231. package/dist/esm/pdf-reader/decrypt.d.ts +17 -0
  232. package/dist/esm/pdf-reader/decrypt.js +12 -0
  233. package/dist/esm/pdf-reader/document.d.ts +53 -0
  234. package/dist/esm/pdf-reader/document.js +50 -0
  235. package/dist/esm/pdf-reader/flow-build.d.ts +47 -0
  236. package/dist/esm/pdf-reader/flow-build.js +42 -0
  237. package/dist/esm/pdf-reader/font.d.ts +12 -0
  238. package/dist/esm/pdf-reader/font.js +12 -0
  239. package/dist/esm/pdf-reader/image-decode.d.ts +21 -0
  240. package/dist/esm/pdf-reader/image-decode.js +14 -0
  241. package/dist/esm/pdf-reader/images.d.ts +19 -0
  242. package/dist/esm/pdf-reader/images.js +9 -0
  243. package/dist/esm/pdf-reader/layout.d.ts +15 -0
  244. package/dist/esm/pdf-reader/layout.js +15 -0
  245. package/dist/esm/pdf-reader/lexer.d.ts +43 -0
  246. package/dist/esm/pdf-reader/lexer.js +38 -0
  247. package/dist/esm/pdf-reader/parser.d.ts +15 -0
  248. package/dist/esm/pdf-reader/parser.js +8 -0
  249. package/dist/esm/pdf-reader/png-encode.d.ts +9 -0
  250. package/dist/esm/pdf-reader/png-encode.js +8 -0
  251. package/dist/esm/pdf-reader/predictor.d.ts +9 -0
  252. package/dist/esm/pdf-reader/predictor.js +8 -0
  253. package/dist/esm/pdf-reader/reader.d.ts +16 -0
  254. package/dist/esm/pdf-reader/reader.js +16 -0
  255. package/dist/esm/pdf-reader/shading.d.ts +10 -0
  256. package/dist/esm/pdf-reader/shading.js +10 -0
  257. package/dist/esm/pdf-reader/struct-tree.d.ts +24 -0
  258. package/dist/esm/pdf-reader/struct-tree.js +12 -0
  259. package/dist/esm/pdf-reader/tagged.d.ts +13 -0
  260. package/dist/esm/pdf-reader/tagged.js +13 -0
  261. package/dist/esm/pdf-reader/text.d.ts +11 -0
  262. package/dist/esm/pdf-reader/text.js +11 -0
  263. package/dist/esm/pdf-reader/vector.d.ts +19 -0
  264. package/dist/esm/pdf-reader/vector.js +9 -0
  265. package/dist/esm/pptx/placeholder-cascade.d.ts +21 -0
  266. package/dist/esm/pptx/placeholder-cascade.js +10 -0
  267. package/dist/esm/pptx/ppt/ppt-reader.d.ts +16 -0
  268. package/dist/esm/pptx/ppt/ppt-reader.js +16 -0
  269. package/dist/esm/pptx/ppt/ppt-text.d.ts +55 -0
  270. package/dist/esm/pptx/ppt/ppt-text.js +14 -0
  271. package/dist/esm/pptx/pptx-reader.d.ts +21 -0
  272. package/dist/esm/pptx/pptx-reader.js +23 -2
  273. package/dist/esm/pptx/slide-parser.d.ts +102 -0
  274. package/dist/esm/pptx/slide-parser.js +78 -0
  275. package/dist/esm/pptx/sp-helpers.d.ts +28 -0
  276. package/dist/esm/pptx/sp-helpers.js +22 -0
  277. package/dist/esm/svg/svg-writer.d.ts +17 -0
  278. package/dist/esm/svg/svg-writer.js +16 -0
  279. package/dist/esm/word/doc/doc-reader.d.ts +16 -0
  280. package/dist/esm/word/doc/doc-reader.js +16 -0
  281. package/dist/esm/word/doc/doc-text.d.ts +77 -0
  282. package/dist/esm/word/doc/doc-text.js +13 -0
  283. package/dist/esm/word/document-parser.d.ts +134 -0
  284. package/dist/esm/word/document-parser.js +86 -0
  285. package/dist/esm/word/docx-reader.d.ts +16 -0
  286. package/dist/esm/word/docx-reader.js +18 -2
  287. package/dist/esm/word/docx-to-pdf.d.ts +52 -0
  288. package/dist/esm/word/docx-to-pdf.js +21 -0
  289. package/dist/esm/word/docx-writer.d.ts +17 -0
  290. package/dist/esm/word/docx-writer.js +17 -0
  291. package/dist/esm/word/drawing-parser.d.ts +88 -0
  292. package/dist/esm/word/drawing-parser.js +68 -0
  293. package/dist/esm/word/font-table.d.ts +24 -0
  294. package/dist/esm/word/font-table.js +24 -0
  295. package/dist/esm/word/numbering-parser.d.ts +11 -0
  296. package/dist/esm/word/numbering-parser.js +11 -0
  297. package/dist/esm/word/omml-parser.d.ts +15 -0
  298. package/dist/esm/word/omml-parser.js +15 -0
  299. package/dist/esm/word/omml-serializer.d.ts +9 -0
  300. package/dist/esm/word/omml-serializer.js +9 -0
  301. package/dist/esm/word/paragraph-properties.d.ts +10 -0
  302. package/dist/esm/word/paragraph-properties.js +10 -0
  303. package/dist/esm/word/po-to-flat.d.ts +11 -0
  304. package/dist/esm/word/po-to-flat.js +11 -0
  305. package/dist/esm/word/run-properties.d.ts +10 -0
  306. package/dist/esm/word/run-properties.js +10 -0
  307. package/dist/esm/word/settings-parser.d.ts +13 -0
  308. package/dist/esm/word/settings-parser.js +8 -0
  309. package/dist/esm/word/styles-parser.d.ts +10 -0
  310. package/dist/esm/word/styles-parser.js +10 -0
  311. package/dist/esm/word/table-parser.d.ts +11 -0
  312. package/dist/esm/word/table-parser.js +11 -0
  313. package/dist/esm/word/text-extractor.d.ts +9 -0
  314. package/dist/esm/word/xml-helpers.d.ts +44 -0
  315. package/dist/esm/word/xml-helpers.js +38 -0
  316. package/package.json +5 -2
@@ -1,28 +1,41 @@
1
+ /** ECMA-376 §18.3.1.4 — `<c t="...">` cell value type. */
1
2
  export type CellType = 'n' | 's' | 'str' | 'b' | 'd' | 'e' | 'inlineStr';
3
+ /** §18.3.1.4 `<c>` — one parsed cell: its position, type, raw value and style index. */
2
4
  export interface WorksheetCell {
3
5
  readonly column: number;
4
6
  readonly row: number;
5
7
  readonly type: CellType;
8
+ /** Raw stored value; renderer/converter looks up shared strings + formats. */
6
9
  readonly rawValue: string;
10
+ /** For `inlineStr` the stored text lives in `<is><t>` rather than `<v>`. */
7
11
  readonly inlineText?: string;
12
+ /** Index into the workbook's `cellXfs` (`xl/styles.xml`). 0 means default style. */
8
13
  readonly styleIndex?: number;
9
14
  }
15
+ /** §18.3.1.13 `<col>` — a width (in character units) for the column span `min..max`. */
10
16
  export interface ColumnWidth {
11
17
  readonly min: number;
12
18
  readonly max: number;
13
19
  readonly widthChars: number;
14
20
  }
21
+ /** §18.3.1.55 `<mergeCell>` — a merged cell rectangle (0-indexed, inclusive bounds). */
15
22
  export interface MergedRange {
16
23
  readonly startColumn: number;
17
24
  readonly startRow: number;
18
25
  readonly endColumn: number;
19
26
  readonly endRow: number;
20
27
  }
28
+ /**
29
+ * ECMA-376 Part 1 §18.3.1.73 — `<row ht="...">`. The `ht` attribute is measured
30
+ * in points (not twips); `customHeight="1"` means the user pinned the height
31
+ * explicitly. Without `customHeight`, the height is content-driven.
32
+ */
21
33
  export interface RowHeight {
22
34
  readonly row: number;
23
35
  readonly heightPt: number;
24
36
  readonly customHeight: boolean;
25
37
  }
38
+ /** ECMA-376 Part 1 §18.3.1.62 — `<pageMargins>`. All attributes are in inches. */
26
39
  export interface XlsxPageMargins {
27
40
  readonly leftInches: number;
28
41
  readonly rightInches: number;
@@ -31,18 +44,38 @@ export interface XlsxPageMargins {
31
44
  readonly headerInches?: number;
32
45
  readonly footerInches?: number;
33
46
  }
47
+ /**
48
+ * ECMA-376 Part 1 §18.3.1.63 — `<pageSetup>`. `paperSize` is a numeric id from
49
+ * the printer paper size enumeration (1=Letter, 9=A4, ...). `orientation`
50
+ * values: `'default'` (effectively portrait), `'portrait'`, `'landscape'`.
51
+ * `fitToWidth`/`fitToHeight` only take effect when `<pageSetUpPr fitToPage="1">`.
52
+ */
34
53
  export interface XlsxPageSetup {
35
54
  readonly paperSize?: number;
36
55
  readonly orientation?: 'portrait' | 'landscape' | 'default';
56
+ /** Print scaling percentage (10..400); default 100. */
37
57
  readonly scale?: number;
58
+ /** Number of pages wide to fit to (0 ⇒ use `scale`); default 1. */
38
59
  readonly fitToWidth?: number;
60
+ /** Number of pages tall to fit to; default 1. */
39
61
  readonly fitToHeight?: number;
40
62
  }
63
+ /**
64
+ * ECMA-376 Part 1 §18.3.1.70 — `<printOptions>`. Controls what is rendered when
65
+ * the sheet is printed. `gridLines` defaults to false (Excel/Calc do NOT print
66
+ * cell gridlines unless explicitly enabled), so a faithful print model draws
67
+ * only the borders that come from cell styles.
68
+ */
41
69
  export interface XlsxPrintOptions {
42
70
  readonly gridLines?: boolean;
43
71
  readonly horizontalCentered?: boolean;
44
72
  readonly verticalCentered?: boolean;
45
73
  }
74
+ /**
75
+ * §18.3.1.99 `<worksheet>` — one parsed worksheet: the cell grid plus its
76
+ * per-sheet geometry and overlays. The pure-XML parser fills the raw fields; the
77
+ * reader fills the resolved ones (`tables`, `pivotTables`, …).
78
+ */
46
79
  export interface ParsedWorksheet {
47
80
  readonly cells: ReadonlyArray<WorksheetCell>;
48
81
  readonly maxRow: number;
@@ -50,29 +83,108 @@ export interface ParsedWorksheet {
50
83
  readonly columns: ReadonlyArray<ColumnWidth>;
51
84
  readonly merges: ReadonlyArray<MergedRange>;
52
85
  readonly rowHeights: ReadonlyArray<RowHeight>;
86
+ /**
87
+ * ECMA-376 §18.3.1.81 `<sheetFormatPr defaultRowHeight>` — the height, in
88
+ * points, of every row that carries no `ht` of its own. A row in a
89
+ * spreadsheet always has a definite height; it is not decided by whatever
90
+ * leading the text happens to want. Absent ⇒ Excel's 15pt (its default theme
91
+ * font, Calibri 11).
92
+ */
93
+ readonly defaultRowHeightPt?: number;
94
+ /**
95
+ * §18.3.1.81 `<sheetFormatPr defaultColWidth>` — the width, in characters, of
96
+ * every column no `<col>` covers. Absent ⇒ derived from
97
+ * {@link ParsedWorksheet.baseColWidthChars}, else Excel's 8.43.
98
+ */
99
+ readonly defaultColWidthChars?: number;
100
+ /**
101
+ * §18.3.1.81 `<sheetFormatPr baseColWidth>` — the character width the default
102
+ * column is computed FROM when `defaultColWidth` is absent. Excel's own
103
+ * default is 8; a sheet that says 10 wants every unlisted column that much
104
+ * wider, and ignoring it makes the whole grid narrow.
105
+ */
106
+ readonly baseColWidthChars?: number;
53
107
  readonly pageMargins?: XlsxPageMargins;
54
108
  readonly pageSetup?: XlsxPageSetup;
109
+ /**
110
+ * ECMA-376 §18.3.1.65 — `<sheetPr><pageSetUpPr fitToPage="1"/>`. When set, the
111
+ * pageSetup `fitToWidth`/`fitToHeight` (not `scale`) drive print scaling.
112
+ */
55
113
  readonly fitToPage?: boolean;
56
114
  readonly printOptions?: XlsxPrintOptions;
115
+ /**
116
+ * ECMA-376 §18.3.1.74/§18.3.1.14 — manual `<rowBreaks>`/`<colBreaks>`. Each
117
+ * stored value is the `<brk id="...">` following the break (kept verbatim).
118
+ */
57
119
  readonly rowBreaks?: ReadonlyArray<number>;
58
120
  readonly colBreaks?: ReadonlyArray<number>;
121
+ /** §18.3.1.36 `<drawing r:id>` — the sheet's drawing part (charts/shapes). */
59
122
  readonly drawingRelId?: string;
123
+ /** §18.3.1.18 `<conditionalFormatting>` — value-driven cell formats (E-SHEET SC1). */
60
124
  readonly conditionalFormats?: ReadonlyArray<ConditionalFormat>;
125
+ /**
126
+ * §18.3.1.32 `<dataValidations>` — per-range input constraints (E-SHEET SV1). A
127
+ * `list` validation paints an in-cell dropdown affordance; all types round-trip.
128
+ */
61
129
  readonly dataValidations?: ReadonlyArray<DataValidation>;
130
+ /**
131
+ * §18.3.1.47 `<hyperlinks>` — raw cell hyperlinks (E-SHEET W3). The reader
132
+ * resolves each `relId` to an external URL; render-only (not written back).
133
+ */
62
134
  readonly hyperlinks?: ReadonlyArray<HyperlinkRef>;
135
+ /**
136
+ * §18.3.1.46 `<headerFooter>` — sheet header/footer format strings (E-SHEET W4).
137
+ * The projection expands the `&`-codes into header/footer bands; render-only.
138
+ */
63
139
  readonly headerFooter?: HeaderFooter;
140
+ /**
141
+ * Form controls declared on the sheet (E-SHEET W8) — raw `{name, relId}`; the
142
+ * reader resolves each `relId` to its ctrlProp (type + state). Render-only.
143
+ */
64
144
  readonly formControls?: ReadonlyArray<FormControlRef>;
145
+ /**
146
+ * §18.3.* `<oleObjects>` — embedded OLE / ActiveX controls (E-SHEET W10); the
147
+ * reader resolves each `relId` to its activeX part (type + visible state from
148
+ * the property bag). Render-only.
149
+ */
65
150
  readonly oleObjects?: ReadonlyArray<OleObjectRef>;
151
+ /** x14 extension `<sparklineGroups>` in `extLst` — per-cell mini charts (E-SHEET SC2). */
66
152
  readonly sparklines?: ReadonlyArray<ParsedSparkline>;
153
+ /**
154
+ * §18.3.1.95 `<tableParts>` — relationship ids of the sheet's table parts. The
155
+ * pure-XML parser only lists the ids; the reader resolves them (E-SHEET SC3).
156
+ */
67
157
  readonly tablePartRelIds?: ReadonlyArray<string>;
158
+ /** Resolved table parts (banded styles, header rows) — filled by the reader. */
68
159
  readonly tables?: ReadonlyArray<ExcelTable>;
160
+ /**
161
+ * Resolved pivot tables (E-PIVOT) — discovered via the sheet's `pivotTable`
162
+ * relationships (no element in the sheet XML), resolved by the reader.
163
+ */
69
164
  readonly pivotTables?: ReadonlyArray<PivotTable>;
165
+ /**
166
+ * ECMA-376 §18.3.1.66 `<sheetView><pane state="frozen">` — frozen rows/columns.
167
+ * A VIEW setting with NO effect on print/PDF (printed repeats are
168
+ * Print_Titles); carried for round-trip fidelity and HTML sticky panes
169
+ * (E-SHEET SE2/SE3).
170
+ */
70
171
  readonly pane?: SheetPane;
71
172
  }
173
+ /**
174
+ * A frozen pane: the count of leading rows / columns frozen in the worksheet
175
+ * view. Derived from `<pane ySplit="rows" xSplit="cols" state="frozen">` — a
176
+ * plain "split" pane (a resizable divider, no freeze) is not captured.
177
+ */
72
178
  export interface SheetPane {
73
179
  readonly frozenRows: number;
74
180
  readonly frozenCols: number;
75
181
  }
182
+ /**
183
+ * ECMA-376 §18.5.1.2 `<table>` — a structured table over a cell range with a
184
+ * banded style. The raw parse carries the range, header rows and style flags;
185
+ * the reader resolves the named style to header / band fill colours against the
186
+ * workbook theme (E-SHEET SC3).
187
+ */
76
188
  export interface ExcelTable {
77
189
  readonly ref: MergedRange;
78
190
  readonly name?: string;
@@ -83,10 +195,21 @@ export interface ExcelTable {
83
195
  readonly showFirstColumn: boolean;
84
196
  readonly showLastColumn: boolean;
85
197
  readonly autoFilter: boolean;
198
+ /**
199
+ * Resolved fills + header text colour (6-hex) — the reader derives these from
200
+ * the named style + workbook theme (E-SHEET SC3).
201
+ */
86
202
  readonly headerHex?: string;
87
203
  readonly bandHex?: string;
88
204
  readonly headerTextHex?: string;
89
205
  }
206
+ /**
207
+ * ECMA-376 §18.10.1.73 `<pivotTableDefinition>` — a pivot table. Its OUTPUT
208
+ * cells are already cached in the worksheet, so they render as a normal grid;
209
+ * this carries the pivot's location and named style so the reader can band the
210
+ * region in the pivot's own palette (E-PIVOT). The structural model (row/column
211
+ * fields, subtotals, collapse state) is later work — only location + style here.
212
+ */
90
213
  export interface PivotTable {
91
214
  readonly ref: MergedRange;
92
215
  readonly name?: string;
@@ -96,19 +219,36 @@ export interface PivotTable {
96
219
  readonly firstDataCol: number;
97
220
  readonly showRowStripes: boolean;
98
221
  readonly showColStripes: boolean;
222
+ /**
223
+ * §18.10.1.74 `<rowItems>`/`<colItems>` item type per data row / column (in
224
+ * order): `'grand'` (grand total), a subtotal-function name (subtotal), or
225
+ * undefined (a plain data line). The i-th entry maps to data row/column
226
+ * `firstDataRow/Col + i` (E-PIVOT PV3/PV4).
227
+ */
99
228
  readonly rowItemTypes?: ReadonlyArray<string | undefined>;
100
229
  readonly colItemTypes?: ReadonlyArray<string | undefined>;
230
+ /**
231
+ * Resolved fills + header text colour (6-hex) — derived from the named pivot
232
+ * style + workbook theme by the reader (E-PIVOT PV2).
233
+ */
101
234
  readonly headerHex?: string;
102
235
  readonly bandHex?: string;
103
236
  readonly headerTextHex?: string;
104
237
  }
238
+ /** The sparkline group type (ECMA-376 Part 4, x14): line / column / win-loss. */
105
239
  export type SparklineKind = 'line' | 'column' | 'winLoss';
240
+ /**
241
+ * ECMA-376 Part 4 (x14 extension) — a sparkline: a mini chart drawn inside a
242
+ * single host cell (`sqref`) from a data range (`dataRange`, an A1 area possibly
243
+ * sheet-qualified). The group's `kind` maps to line / column / win-loss.
244
+ */
106
245
  export interface ParsedSparkline {
107
246
  readonly kind: SparklineKind;
108
247
  readonly dataRange: string;
109
248
  readonly sqref: string;
110
249
  readonly colorHex?: string;
111
250
  }
251
+ /** §18.8.22 `<font>` — one font record in the workbook style table. */
112
252
  export interface XlsxFont {
113
253
  readonly sizePt?: number;
114
254
  readonly bold?: boolean;
@@ -117,35 +257,57 @@ export interface XlsxFont {
117
257
  readonly colorHex?: string;
118
258
  readonly name?: string;
119
259
  }
260
+ /** §18.8.20 `<fill>` — one fill record: pattern type plus foreground/background colours. */
120
261
  export interface XlsxFill {
121
262
  readonly patternType?: string;
122
263
  readonly fgColorHex?: string;
123
264
  readonly bgColorHex?: string;
124
265
  }
266
+ /** §18.18.3 ST_BorderStyle — a cell border-edge line style. */
125
267
  export type XlsxBorderStyleName = 'none' | 'thin' | 'medium' | 'thick' | 'hair' | 'dashed' | 'dotted' | 'double' | 'mediumDashed' | 'dashDot' | 'mediumDashDot' | 'dashDotDot' | 'mediumDashDotDot' | 'slantDashDot';
268
+ /** One border edge: its {@link XlsxBorderStyleName} and colour. */
126
269
  export interface XlsxBorderEdge {
127
270
  readonly style?: XlsxBorderStyleName;
128
271
  readonly colorHex?: string;
129
272
  }
273
+ /** §18.8.4 `<border>` — a cell's four edges plus the diagonal stroke. */
130
274
  export interface XlsxBorder {
131
275
  readonly top?: XlsxBorderEdge;
132
276
  readonly right?: XlsxBorderEdge;
133
277
  readonly bottom?: XlsxBorderEdge;
134
278
  readonly left?: XlsxBorderEdge;
279
+ /**
280
+ * §18.8.4 `<diagonal>` — the diagonal stroke; `@diagonalUp` (bottom-left →
281
+ * top-right) and/or `@diagonalDown` (top-left → bottom-right) select which
282
+ * corners it spans (W6).
283
+ */
135
284
  readonly diagonal?: XlsxBorderEdge;
136
285
  readonly diagonalUp?: boolean;
137
286
  readonly diagonalDown?: boolean;
138
287
  }
288
+ /** §18.18.40 ST_HorizontalAlignment — `<alignment horizontal>`. */
139
289
  export type XlsxHorizontalAlign = 'left' | 'center' | 'right' | 'fill' | 'justify' | 'centerContinuous' | 'distributed';
290
+ /** §18.18.88 ST_VerticalAlignment — `<alignment vertical>`. */
140
291
  export type XlsxVerticalAlign = 'top' | 'center' | 'bottom' | 'justify' | 'distributed';
292
+ /** §18.8.1 `<alignment>` — a cell's text alignment, wrapping, indent and rotation. */
141
293
  export interface XlsxCellAlignment {
142
294
  readonly horizontal?: XlsxHorizontalAlign;
143
295
  readonly vertical?: XlsxVerticalAlign;
144
296
  readonly wrapText?: boolean;
297
+ /** §18.8.1 — left indent in "indent levels" (each ≈ 3 character widths) (W6). */
145
298
  readonly indent?: number;
299
+ /**
300
+ * §18.8.1 `textRotation` — degrees counter-clockwise (0–90), 91–180 clockwise
301
+ * as (value − 90), and 255 = stacked vertical text (W6).
302
+ */
146
303
  readonly textRotation?: number;
304
+ /** §18.8.1 `shrinkToFit` — scale the text down so it fits the cell on one line (W6). */
147
305
  readonly shrinkToFit?: boolean;
148
306
  }
307
+ /**
308
+ * §18.8.45 `<xf>` — one cell format record: indices into the font/fill/border/
309
+ * numFmt tables, the `apply*` flags, and direct alignment.
310
+ */
149
311
  export interface XlsxCellXf {
150
312
  readonly numFmtId: number;
151
313
  readonly fontId: number;
@@ -158,24 +320,44 @@ export interface XlsxCellXf {
158
320
  readonly applyAlignment?: boolean;
159
321
  readonly alignment?: XlsxCellAlignment;
160
322
  }
323
+ /**
324
+ * ECMA-376 Part 1 §18.8 — the workbook style table (`xl/styles.xml`): the
325
+ * number-format, font, fill, border and cell-format tables a cell's
326
+ * `styleIndex` resolves against, plus the differential formats.
327
+ */
161
328
  export interface XlsxStyles {
162
329
  readonly numFmts: ReadonlyMap<number, string>;
163
330
  readonly fonts: ReadonlyArray<XlsxFont>;
164
331
  readonly fills: ReadonlyArray<XlsxFill>;
165
332
  readonly borders: ReadonlyArray<XlsxBorder>;
166
333
  readonly cellXfs: ReadonlyArray<XlsxCellXf>;
334
+ /**
335
+ * §18.8.10 `<dxfs>` — differential formats referenced by conditional-format
336
+ * rules (E-SHEET SC1); only the properties a dxf sets override the base.
337
+ */
167
338
  readonly dxfs?: ReadonlyArray<Dxf>;
168
339
  }
340
+ /** §18.8.14 `<dxf>` — a differential (override) format a `cfRule` applies on match. */
169
341
  export interface Dxf {
170
342
  readonly font?: XlsxFont;
171
343
  readonly fill?: XlsxFill;
172
344
  }
345
+ /**
346
+ * ECMA-376 Part 1 §18.2.5 — `<definedName>`. A workbook-scoped (or sheet-scoped,
347
+ * via `localSheetId`) named range. Print areas and print titles ride these under
348
+ * the reserved names `_xlnm.Print_Area` / `_xlnm.Print_Titles`.
349
+ */
173
350
  export interface DefinedName {
174
351
  readonly name: string;
175
352
  readonly localSheetId?: number;
176
353
  readonly value: string;
177
354
  }
355
+ /** §18.18.15 ST_CfvoType — comparison operator for a `cellIs` rule. */
178
356
  export type CfOperator = 'lessThan' | 'lessThanOrEqual' | 'equal' | 'notEqual' | 'greaterThanOrEqual' | 'greaterThan' | 'between' | 'notBetween';
357
+ /**
358
+ * §18.3.1.10 `<cfRule type="cellIs">` — compares each cell to one constant (or
359
+ * two, for between/notBetween); a match applies the differential format `dxfId`.
360
+ */
179
361
  export interface CfRuleCellIs {
180
362
  readonly type: 'cellIs';
181
363
  readonly priority: number;
@@ -183,17 +365,40 @@ export interface CfRuleCellIs {
183
365
  readonly formulas: ReadonlyArray<string>;
184
366
  readonly dxfId: number;
185
367
  }
368
+ /**
369
+ * §18.3.1.11 ST_CfvoType — how a `<cfvo>` stop's threshold is derived.
370
+ * `min`/`max` (and the dataBar `autoMin`/`autoMax`) take the range's extent;
371
+ * `num`/`formula` a literal; `percent`/`percentile` position within the value
372
+ * distribution.
373
+ */
186
374
  export type CfvoType = 'num' | 'percent' | 'max' | 'min' | 'percentile' | 'formula' | 'autoMin' | 'autoMax';
375
+ /**
376
+ * §18.3.1.11 `<cfvo>` — one stop of a colorScale (or dataBar/iconSet). `val`
377
+ * carries the number/percent/formula text; absent for `min`/`max`.
378
+ */
187
379
  export interface Cfvo {
188
380
  readonly type: CfvoType;
189
381
  readonly val?: string;
190
382
  }
383
+ /**
384
+ * §18.3.1.16 `<cfRule type="colorScale">` — a 2- or 3-stop gradient. Each cfvo
385
+ * pairs with a colour; a cell's value, positioned between the bracketing stops,
386
+ * interpolates (in RGB) to a solid fill. Unlike `cellIs` it needs the range's
387
+ * value extent, so it resolves against every covered cell, not one constant.
388
+ */
191
389
  export interface CfRuleColorScale {
192
390
  readonly type: 'colorScale';
193
391
  readonly priority: number;
194
392
  readonly cfvos: ReadonlyArray<Cfvo>;
195
393
  readonly colorsHex: ReadonlyArray<string>;
196
394
  }
395
+ /**
396
+ * §18.3.1.28 `<cfRule type="dataBar">` — an in-cell bar whose length encodes the
397
+ * cell value within the range's extent. Two cfvo stops (lower/upper) bound the
398
+ * scale; `colorHex` fills the bar. `minLength`/`maxLength` clamp the bar as a
399
+ * percent (0..100) of the cell width (ECMA defaults 10/90; we default 0/100 —
400
+ * modern solid bars span the full cell).
401
+ */
197
402
  export interface CfRuleDataBar {
198
403
  readonly type: 'dataBar';
199
404
  readonly priority: number;
@@ -202,6 +407,11 @@ export interface CfRuleDataBar {
202
407
  readonly minLength?: number;
203
408
  readonly maxLength?: number;
204
409
  }
410
+ /**
411
+ * §18.3.1.49 `<cfRule type="iconSet">` — picks one glyph per cell from a named
412
+ * icon family (3/4/5 icons) by the value's bucket among the cfvo thresholds.
413
+ * `reverse` flips the icon order (highest value → first icon).
414
+ */
205
415
  export interface CfRuleIconSet {
206
416
  readonly type: 'iconSet';
207
417
  readonly priority: number;
@@ -209,6 +419,12 @@ export interface CfRuleIconSet {
209
419
  readonly cfvos: ReadonlyArray<Cfvo>;
210
420
  readonly reverse?: boolean;
211
421
  }
422
+ /**
423
+ * §18.3.1.10 `<cfRule type="top10">` — the top (or `bottom`) N values of the
424
+ * range take the differential format. `rank` is N; with `percent` it is a
425
+ * percentage of the range's cell count. Resolves against the range's value
426
+ * extent, like a scale.
427
+ */
212
428
  export interface CfRuleTop10 {
213
429
  readonly type: 'top10';
214
430
  readonly priority: number;
@@ -217,6 +433,11 @@ export interface CfRuleTop10 {
217
433
  readonly bottom: boolean;
218
434
  readonly dxfId: number;
219
435
  }
436
+ /**
437
+ * §18.3.1.10 `<cfRule type="aboveAverage">` — cells above (default) or below the
438
+ * range mean take the format. `equalAverage` makes the comparison inclusive;
439
+ * `stdDev`, when set, shifts the threshold by N population standard deviations.
440
+ */
220
441
  export interface CfRuleAboveAverage {
221
442
  readonly type: 'aboveAverage';
222
443
  readonly priority: number;
@@ -225,11 +446,23 @@ export interface CfRuleAboveAverage {
225
446
  readonly stdDev?: number;
226
447
  readonly dxfId: number;
227
448
  }
449
+ /**
450
+ * §18.3.1.10 `<cfRule type="duplicateValues" | "uniqueValues">` — cells whose
451
+ * value repeats within the range (duplicate) or occurs exactly once (unique)
452
+ * take the format. Compares numbers by value and strings case-insensitively,
453
+ * like Excel.
454
+ */
228
455
  export interface CfRuleDupUnique {
229
456
  readonly type: 'duplicateValues' | 'uniqueValues';
230
457
  readonly priority: number;
231
458
  readonly dxfId: number;
232
459
  }
460
+ /**
461
+ * §18.3.1.10 `<cfRule type="containsText" | "notContainsText" | "beginsWith" |
462
+ * "endsWith">` — a case-insensitive substring test against the cell's text.
463
+ * `text` is the needle; `formula` carries Excel's generated SEARCH/LEFT/RIGHT
464
+ * expression verbatim for faithful write-back (it is matched directly, not run).
465
+ */
233
466
  export interface CfRuleText {
234
467
  readonly type: 'containsText' | 'notContainsText' | 'beginsWith' | 'endsWith';
235
468
  readonly priority: number;
@@ -237,13 +470,30 @@ export interface CfRuleText {
237
470
  readonly dxfId: number;
238
471
  readonly formula?: string;
239
472
  }
473
+ /**
474
+ * §18.3.1.10 `<cfRule type="expression">` — an arbitrary formula evaluated per
475
+ * cell in the range; a TRUE (or non-zero) result applies the dxf. Ream evaluates
476
+ * it against the grid's cached values with a small deterministic formula engine
477
+ * (E-SHEET W9); the `formula` is kept verbatim for faithful write-back. A
478
+ * formula the engine cannot model simply does not apply (graceful loss, never
479
+ * misrender).
480
+ */
240
481
  export interface CfRuleExpression {
241
482
  readonly type: 'expression';
242
483
  readonly priority: number;
243
484
  readonly formula: string;
244
485
  readonly dxfId: number;
245
486
  }
487
+ /** §18.18.82 ST_TimePeriod — the clock-relative window a `timePeriod` rule tests. */
246
488
  export type TimePeriodKind = 'today' | 'yesterday' | 'tomorrow' | 'last7Days' | 'thisWeek' | 'lastWeek' | 'nextWeek' | 'thisMonth' | 'lastMonth' | 'nextMonth';
489
+ /**
490
+ * §18.3.1.10 `<cfRule type="timePeriod">` — cells whose date falls in a window
491
+ * relative to "today" take the dxf. The window is computed from an injected
492
+ * reference date (`options.now`) — Ream never reads the wall clock — so the rule
493
+ * is a no-op (deterministic) when no date is supplied. Excel also emits a helper
494
+ * `<formula>`; it is preserved verbatim for write-back but the window drives the
495
+ * match.
496
+ */
247
497
  export interface CfRuleTimePeriod {
248
498
  readonly type: 'timePeriod';
249
499
  readonly priority: number;
@@ -251,11 +501,19 @@ export interface CfRuleTimePeriod {
251
501
  readonly dxfId: number;
252
502
  readonly formula?: string;
253
503
  }
504
+ /** One conditional-format rule (`<cfRule>`): the union over the supported `type`s. */
254
505
  export type CfRule = CfRuleCellIs | CfRuleColorScale | CfRuleDataBar | CfRuleIconSet | CfRuleTop10 | CfRuleAboveAverage | CfRuleDupUnique | CfRuleText | CfRuleExpression | CfRuleTimePeriod;
506
+ /** §18.3.1.18 `<conditionalFormatting sqref="A1:A10 C1:C5">` — rules over ranges. */
255
507
  export interface ConditionalFormat {
256
508
  readonly ranges: ReadonlyArray<MergedRange>;
257
509
  readonly rules: ReadonlyArray<CfRule>;
258
510
  }
511
+ /**
512
+ * §18.3.1.47 `<hyperlink ref r:id location display tooltip>` — a cell (or range)
513
+ * hyperlink (E-SHEET W3). `relId` resolves to an external URL through the
514
+ * worksheet relationships; `location` is an in-workbook target (`Sheet!cell`).
515
+ * The raw form rides on the grid; the reader resolves it to a `SheetHyperlink`.
516
+ */
259
517
  export interface HyperlinkRef {
260
518
  readonly ref: string;
261
519
  readonly relId?: string;
@@ -263,18 +521,47 @@ export interface HyperlinkRef {
263
521
  readonly display?: string;
264
522
  readonly tooltip?: string;
265
523
  }
524
+ /**
525
+ * §18.3.1.46 `<headerFooter>` — the sheet's print header/footer format strings
526
+ * (E-SHEET W4). Each carries Excel's `&`-code mini-language (`&L`/`&C`/`&R`
527
+ * regions, `&P`/`&N`/`&D`/`&F`/`&A` field codes, `&B`/`&I` formatting). v1 reads
528
+ * the odd (= default) header and footer; even/first variants are a later
529
+ * refinement.
530
+ */
266
531
  export interface HeaderFooter {
267
532
  readonly oddHeader?: string;
268
533
  readonly oddFooter?: string;
269
534
  }
535
+ /**
536
+ * §18.3.1.* form control (E-SHEET W8) — a checkbox / option button / spinner /
537
+ * button etc. declared in the worksheet (legacy `<controls>` or the x14
538
+ * `extLst`). `relId` resolves to the control's ctrlProp part (type + state);
539
+ * `name` is its display name. Raw form (the reader resolves `relId`);
540
+ * render-only.
541
+ */
270
542
  export interface FormControlRef {
271
543
  readonly name?: string;
272
544
  readonly relId: string;
273
545
  }
546
+ /**
547
+ * §18.3.* `<oleObjects><oleObject progId r:id>` — an embedded OLE / ActiveX
548
+ * control (E-SHEET W10). `progId` (e.g. `Forms.CheckBox.1`) names the control
549
+ * class; `relId` resolves to its `xl/activeX/activeXN.xml` part (the persisted
550
+ * property bag). Raw form (the reader resolves `relId`); render-only.
551
+ */
274
552
  export interface OleObjectRef {
275
553
  readonly progId?: string;
276
554
  readonly relId: string;
277
555
  }
556
+ /**
557
+ * §18.4.4 `<r>` — one formatting run inside a rich-text shared string (E-SHEET
558
+ * W6). A `<si>` with multiple `<r><rPr>…</rPr><t>…</t></r>` runs carries per-run
559
+ * formatting from `<rPr>` (its own font properties, not a cellXf index). The
560
+ * projection emits these as separate document-model runs so a single cell can
561
+ * mix bold / colour / size. Render-only: the writer flattens back to plain text,
562
+ * so the round-trip stays byte-stable (rich formatting in a shared string is
563
+ * dropped on `convert('xlsx')`, a documented loss like slicers/pivots).
564
+ */
278
565
  export interface SheetRichRun {
279
566
  readonly text: string;
280
567
  readonly bold?: boolean;
@@ -282,9 +569,24 @@ export interface SheetRichRun {
282
569
  readonly underline?: boolean;
283
570
  readonly colorHex?: string;
284
571
  readonly sizePt?: number;
572
+ /** §18.4.2 `<vertAlign>` — superscript / subscript within the cell text. */
285
573
  readonly vertAlign?: 'superscript' | 'subscript';
286
574
  }
575
+ /**
576
+ * §18.18.18 ST_DataValidationType — the constraint a `<dataValidation>`
577
+ * enforces. Only `list` has a visual signature (the in-cell dropdown); the rest
578
+ * carry through for round-trip fidelity and for surfacing the input/error
579
+ * prompts.
580
+ */
287
581
  export type DataValidationType = 'none' | 'whole' | 'decimal' | 'list' | 'date' | 'time' | 'textLength' | 'custom';
582
+ /**
583
+ * §18.3.1.33 `<dataValidation>` — an input constraint over one or more ranges
584
+ * (`sqref`) (E-SHEET SV1). The visually-meaningful part is `type` (a `list` cell
585
+ * shows a dropdown); the formulas + prompts ride through so the validation
586
+ * survives a read→write round-trip. `showDropDown` keeps ECMA's INVERTED sense:
587
+ * the attribute is "1" to HIDE the in-cell dropdown, so a list validation shows
588
+ * one when the flag is absent/false.
589
+ */
288
590
  export interface DataValidation {
289
591
  readonly type: DataValidationType;
290
592
  readonly ranges: ReadonlyArray<MergedRange>;
@@ -1,7 +1,38 @@
1
1
  import { BodyElement, ParagraphProperties, RunProperties, StyleSheet } from '../document-model/index.js';
2
2
  import { ResolvedParagraphProperties, ResolvedRunProperties } from './types.js';
3
+ /**
4
+ * Null Object for {@link StyleSheet} — parsers fall back to it when a package has
5
+ * no styles part, and grid-based formats (xlsx) render with it outright.
6
+ */
3
7
  export declare const EMPTY_STYLE_SHEET: StyleSheet;
8
+ /**
9
+ * Resolve a run's effective properties (ECMA-376 §17.7.2): document defaults →
10
+ * paragraph-style run layer → run-style layer → direct run properties.
11
+ * Memoized by the identity of `(sheet, runDirect, paragraphDirect)`.
12
+ *
13
+ * @param runDirect The run's direct properties (its `styleId` drives the run-style layer).
14
+ * @param paragraphDirect The owning paragraph's direct properties (its `styleId` drives the paragraph-style layer).
15
+ * @param sheet The stylesheet supplying defaults and style chains.
16
+ */
4
17
  export declare function resolveRunProperties(runDirect: RunProperties, paragraphDirect: ParagraphProperties, sheet: StyleSheet): ResolvedRunProperties;
18
+ /**
19
+ * Resolve a paragraph's effective properties (ECMA-376 §17.7.2): document
20
+ * defaults → paragraph-style chain → direct properties. Memoized by the
21
+ * identity of `(sheet, paragraphDirect)`.
22
+ *
23
+ * @param paragraphDirect The paragraph's direct properties (its `styleId` drives the style chain).
24
+ * @param sheet The stylesheet supplying defaults and style chains.
25
+ */
5
26
  export declare function resolveParagraphProperties(paragraphDirect: ParagraphProperties, sheet: StyleSheet): ResolvedParagraphProperties;
27
+ /**
28
+ * Resolve the style cascade across an entire body so the tree carries final
29
+ * effective run/paragraph properties (FlowDoc transform, ir-design stage 6).
30
+ * Recurses into tables and shape text. Mutates the tree IN PLACE and returns it;
31
+ * resolving again over {@link EMPTY_STYLE_SHEET} is the identity.
32
+ */
6
33
  export declare function resolveBodyStyles(body: ReadonlyArray<BodyElement>, sheet: StyleSheet): ReadonlyArray<BodyElement>;
34
+ /**
35
+ * Run {@link resolveBodyStyles} over every header/footer body in the map.
36
+ * Mutates each body in place and returns the same map.
37
+ */
7
38
  export declare function resolveHeadersFootersStyles(hf: ReadonlyMap<string, ReadonlyArray<BodyElement>>, sheet: StyleSheet): ReadonlyMap<string, ReadonlyArray<BodyElement>>;
@@ -1,11 +1,24 @@
1
1
  import { DEFAULT_RESOLVED_PARAGRAPH, DEFAULT_RESOLVED_RUN } from "./types.js";
2
2
  //#region src/core/style-cascade/resolver.ts
3
+ /**
4
+ * Null Object for {@link StyleSheet} — parsers fall back to it when a package has
5
+ * no styles part, and grid-based formats (xlsx) render with it outright.
6
+ */
3
7
  var EMPTY_STYLE_SHEET = {
4
8
  defaultRunProperties: {},
5
9
  defaultParagraphProperties: {},
6
10
  styles: /* @__PURE__ */ new Map()
7
11
  };
8
12
  var runCascadeCache = /* @__PURE__ */ new WeakMap();
13
+ /**
14
+ * Resolve a run's effective properties (ECMA-376 §17.7.2): document defaults →
15
+ * paragraph-style run layer → run-style layer → direct run properties.
16
+ * Memoized by the identity of `(sheet, runDirect, paragraphDirect)`.
17
+ *
18
+ * @param runDirect The run's direct properties (its `styleId` drives the run-style layer).
19
+ * @param paragraphDirect The owning paragraph's direct properties (its `styleId` drives the paragraph-style layer).
20
+ * @param sheet The stylesheet supplying defaults and style chains.
21
+ */
9
22
  function resolveRunProperties(runDirect, paragraphDirect, sheet) {
10
23
  let bySheet = runCascadeCache.get(sheet);
11
24
  if (!bySheet) {
@@ -36,6 +49,14 @@ function computeRunProperties(runDirect, paragraphDirect, sheet) {
36
49
  return mergeRun(acc, runDirect);
37
50
  }
38
51
  var paragraphCascadeCache = /* @__PURE__ */ new WeakMap();
52
+ /**
53
+ * Resolve a paragraph's effective properties (ECMA-376 §17.7.2): document
54
+ * defaults → paragraph-style chain → direct properties. Memoized by the
55
+ * identity of `(sheet, paragraphDirect)`.
56
+ *
57
+ * @param paragraphDirect The paragraph's direct properties (its `styleId` drives the style chain).
58
+ * @param sheet The stylesheet supplying defaults and style chains.
59
+ */
39
60
  function resolveParagraphProperties(paragraphDirect, sheet) {
40
61
  let bySheet = paragraphCascadeCache.get(sheet);
41
62
  if (!bySheet) {
@@ -151,6 +172,12 @@ function primeParagraphFixpoint(para) {
151
172
  }
152
173
  if (!bySheet.has(para)) bySheet.set(para, para);
153
174
  }
175
+ /**
176
+ * Resolve the style cascade across an entire body so the tree carries final
177
+ * effective run/paragraph properties (FlowDoc transform, ir-design stage 6).
178
+ * Recurses into tables and shape text. Mutates the tree IN PLACE and returns it;
179
+ * resolving again over {@link EMPTY_STYLE_SHEET} is the identity.
180
+ */
154
181
  function resolveBodyStyles(body, sheet) {
155
182
  const visitParagraph = (p) => {
156
183
  for (const r of p.runs) r.properties = resolveRunProperties(r.properties, p.properties, sheet);
@@ -166,6 +193,10 @@ function resolveBodyStyles(body, sheet) {
166
193
  for (const el of body) visit(el);
167
194
  return body;
168
195
  }
196
+ /**
197
+ * Run {@link resolveBodyStyles} over every header/footer body in the map.
198
+ * Mutates each body in place and returns the same map.
199
+ */
169
200
  function resolveHeadersFootersStyles(hf, sheet) {
170
201
  for (const value of hf.values()) resolveBodyStyles(value, sheet);
171
202
  return hf;