@sheetxl/io-xlsx 0.8.0-beta.1 → 0.8.0-beta.11

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 (191) hide show
  1. package/browser/esm/BiDqExNXiY7ykk8E.mjs +2327 -0
  2. package/browser/esm/{Ctqql4O-3xj2K8vv.mjs → Bs0EzhdU8WgGfPzf.mjs} +193 -143
  3. package/browser/esm/CLWsOc6DO8l1G_LF.mjs +2213 -0
  4. package/browser/esm/{CLWzJJyoSrykkVLX.mjs → CZ9I80og75SDRjv0.mjs} +2 -2
  5. package/browser/esm/{Dz1Dp8DDJvhd09RR.mjs → CuAXx5i4uqTz-mMY.mjs} +1 -1
  6. package/browser/esm/Cv3R6fGatARKedSn.mjs +8635 -0
  7. package/browser/esm/{BkNXyG6NC-w5Xo92.mjs → CzFYJPxmLyKgEKF0.mjs} +28 -13
  8. package/browser/esm/DICL6ecj9BdJv8aX.mjs +104 -0
  9. package/browser/esm/DatIA9fZbEPjW4bh.mjs +5638 -0
  10. package/browser/esm/index.mjs +2 -3
  11. package/browser/esm/yveeVJ6hKDI5KDEz.mjs +4168 -0
  12. package/licenses/dependencies.txt +2 -2
  13. package/node/esm/B9Zn6H1RV07Ob377.mjs +2294 -0
  14. package/node/esm/Bpqm_PpGLpdjL47-.mjs +2368 -0
  15. package/node/esm/{fOnuUjpPCAzmuIXN.mjs → CAJxmJdobUbzpUz5.mjs} +2 -2
  16. package/node/esm/{CEV7nKotMpeRRnQC.mjs → CxlSbH7mmnEEsqmX.mjs} +1 -1
  17. package/node/esm/DD-yXSBzvDYy0TX5.mjs +5842 -0
  18. package/node/esm/DScqM1V4wPntNP6-.mjs +5235 -0
  19. package/node/esm/{CEAmv36xpTNgFwl_.mjs → fopiRR7OiVoEiF7B.mjs} +49 -35
  20. package/node/esm/index.mjs +77 -25
  21. package/node/esm/ipiyzn5Pfohw2afB.mjs +4271 -0
  22. package/package.json +7 -8
  23. package/types/src/AutoFilterRules.d.ts +94 -11
  24. package/types/src/ConditionalFormatRules.d.ts +5 -5
  25. package/types/src/DataValidationRules.d.ts +18 -2
  26. package/types/src/DefinedNameAttributes.d.ts +8 -0
  27. package/types/src/ExcelCalcStamp.d.ts +39 -0
  28. package/types/src/ExcelCompat.d.ts +209 -42
  29. package/types/src/ExcelReservedNames.d.ts +3 -4
  30. package/types/src/KnownFonts.d.ts +50 -0
  31. package/types/src/LegacyFormula.d.ts +41 -7
  32. package/types/src/OOXMLExtensions.d.ts +14 -2
  33. package/types/src/PageLayoutAttributes.d.ts +8 -0
  34. package/types/src/Plugin.d.ts +28 -5
  35. package/types/src/ProtectionAttributes.d.ts +38 -0
  36. package/types/src/SheetKinds.d.ts +57 -0
  37. package/types/src/SheetViewAttributes.d.ts +4 -0
  38. package/types/src/SortExtent.d.ts +16 -0
  39. package/types/src/SourcePackage.d.ts +31 -12
  40. package/types/src/Types.d.ts +28 -0
  41. package/types/src/XlsxHeader.d.ts +19 -0
  42. package/types/src/chart/ChartExXml.d.ts +38 -0
  43. package/types/src/chart/ChartPartXml.d.ts +47 -0
  44. package/types/src/chart/ChartSpaceXml.d.ts +36 -0
  45. package/types/src/chart/_XmlTree.d.ts +34 -0
  46. package/types/src/chart/_chartCodecs.d.ts +10 -0
  47. package/types/src/chart/_chartExCodecs.d.ts +7 -0
  48. package/types/src/chart/_chartExFold.d.ts +14 -0
  49. package/types/src/chart/_chartExMarkup.d.ts +236 -0
  50. package/types/src/chart/_chartExStyle.d.ts +22 -0
  51. package/types/src/chart/_codec.d.ts +78 -0
  52. package/types/src/chart/_drawingml.d.ts +10 -0
  53. package/types/src/chart/_xml.d.ts +70 -0
  54. package/types/src/reader/DocumentPropertiesRead.d.ts +16 -0
  55. package/types/src/reader/DummyFunctionUnwrap.d.ts +2 -2
  56. package/types/src/reader/HeaderStyles.d.ts +15 -0
  57. package/types/src/reader/HiddenFormulas.d.ts +16 -0
  58. package/types/src/reader/IsoDateCell.d.ts +20 -0
  59. package/types/src/reader/LibreOfficeDataTable.d.ts +11 -0
  60. package/types/src/reader/SlicerJoin.d.ts +24 -0
  61. package/types/src/reader/Warning.d.ts +29 -0
  62. package/types/src/reader/ZipReader.d.ts +1 -1
  63. package/types/src/reader/_SlicerRecord.d.ts +37 -0
  64. package/types/src/reader/dom/CustGeomUtils.d.ts +7 -0
  65. package/types/src/reader/dom/DOMTransformer.d.ts +2 -2
  66. package/types/src/reader/dom/ExecutionContext.d.ts +16 -3
  67. package/types/src/reader/dom/Types.d.ts +19 -3
  68. package/types/src/reader/domVisitors/AppPropertiesVisitor.d.ts +13 -1
  69. package/types/src/reader/domVisitors/AutoFilterVisitor.d.ts +16 -3
  70. package/types/src/reader/domVisitors/ColorContainerVisitor.d.ts +15 -2
  71. package/types/src/reader/domVisitors/CommentVisitor.d.ts +24 -2
  72. package/types/src/reader/domVisitors/CommentsVisitor.d.ts +2 -2
  73. package/types/src/reader/domVisitors/DrawingCxnSpVisitor.d.ts +1 -0
  74. package/types/src/reader/domVisitors/DrawingElementVisitor.d.ts +34 -1
  75. package/types/src/reader/domVisitors/DrawingGraphicFrameVisitor.d.ts +9 -0
  76. package/types/src/reader/domVisitors/DrawingGrpSpVisitor.d.ts +14 -2
  77. package/types/src/reader/domVisitors/DrawingPicVisitor.d.ts +30 -2
  78. package/types/src/reader/domVisitors/DrawingSpVisitor.d.ts +20 -1
  79. package/types/src/reader/domVisitors/DrawingVisitor.d.ts +10 -0
  80. package/types/src/reader/domVisitors/ExternalLinkVisitor.d.ts +21 -3
  81. package/types/src/reader/domVisitors/FmtSchemeVisitor.d.ts +4 -4
  82. package/types/src/reader/domVisitors/FontSchemeVisitor.d.ts +3 -2
  83. package/types/src/reader/domVisitors/FormControlPrVisitor.d.ts +9 -0
  84. package/types/src/reader/domVisitors/ObjectDefaultsVisitor.d.ts +11 -0
  85. package/types/src/reader/domVisitors/ShapeTextVisitor.d.ts +44 -0
  86. package/types/src/reader/domVisitors/SheetColorContainerVisitor.d.ts +3 -3
  87. package/types/src/reader/domVisitors/SheetStyleVisitor.d.ts +21 -6
  88. package/types/src/reader/domVisitors/SlicerCacheDefinitionVisitor.d.ts +7 -2
  89. package/types/src/reader/domVisitors/SlicersVisitor.d.ts +7 -3
  90. package/types/src/reader/domVisitors/SortStateVisitor.d.ts +2 -2
  91. package/types/src/reader/domVisitors/TextPropertiesVisitor.d.ts +13 -1
  92. package/types/src/reader/domVisitors/ThreadedCommentVisitor.d.ts +18 -1
  93. package/types/src/reader/domVisitors/ThreadedCommentsVisitor.d.ts +2 -2
  94. package/types/src/reader/domVisitors/WorkbookVisitor.d.ts +11 -1
  95. package/types/src/reader/domVisitors/_Dxfs.d.ts +10 -0
  96. package/types/src/reader/domVisitors/index.d.ts +6 -32
  97. package/types/src/reader/sax/LeanSaxParser.d.ts +58 -0
  98. package/types/src/reader/sax/SaxParser.d.ts +11 -1
  99. package/types/src/reader/sax/SaxVisitor.d.ts +3 -2
  100. package/types/src/reader/saxVisitors/ContentTypesVisitor.d.ts +9 -0
  101. package/types/src/reader/saxVisitors/SharedStringsVisitor.d.ts +46 -6
  102. package/types/src/reader/saxVisitors/WorksheetVisitor.d.ts +23 -11
  103. package/types/src/utils/DrawingMLText.d.ts +39 -0
  104. package/types/src/utils/FormControls.d.ts +170 -0
  105. package/types/src/utils/SharedNames.d.ts +13 -0
  106. package/types/src/utils/SpreadsheetFont.d.ts +38 -0
  107. package/types/src/utils/VmlNoteShapes.d.ts +128 -0
  108. package/types/src/utils/VmlNoteStyle.d.ts +44 -0
  109. package/types/src/utils/VmlPrefixes.d.ts +24 -0
  110. package/types/src/vba/VBAProject.d.ts +52 -4
  111. package/types/src/writer/builder/ContentTypes.d.ts +13 -0
  112. package/types/src/writer/builder/Emitter.d.ts +11 -6
  113. package/types/src/writer/builder/OpcXmlUtils.d.ts +2 -0
  114. package/types/src/writer/builder/PackageBuilder.d.ts +74 -22
  115. package/types/src/writer/builder/PartWriter.d.ts +5 -0
  116. package/types/src/writer/builder/RelationshipSet.d.ts +3 -0
  117. package/types/src/writer/builder/Types.d.ts +124 -38
  118. package/types/src/writer/builder/_Types.d.ts +17 -0
  119. package/types/src/writer/emitters/CommentsEmitter.d.ts +58 -0
  120. package/types/src/writer/emitters/DrawingEmitter.d.ts +2 -2
  121. package/types/src/writer/emitters/EmbeddedPartEmitter.d.ts +60 -0
  122. package/types/src/writer/emitters/ExternalLinkEmitter.d.ts +19 -0
  123. package/types/src/writer/emitters/LegacyDrawingEmitter.d.ts +18 -0
  124. package/types/src/writer/emitters/PersonsEmitter.d.ts +17 -0
  125. package/types/src/writer/emitters/PivotTableEmitter.d.ts +45 -0
  126. package/types/src/writer/emitters/PropsCoreEmitter.d.ts +7 -2
  127. package/types/src/writer/emitters/PropsCustomEmitter.d.ts +15 -0
  128. package/types/src/writer/emitters/SharedStringsEmitter.d.ts +6 -3
  129. package/types/src/writer/emitters/SlicerEmitter.d.ts +66 -0
  130. package/types/src/writer/emitters/StylesEmitter.d.ts +2 -2
  131. package/types/src/writer/emitters/TableEmitter.d.ts +14 -0
  132. package/types/src/writer/emitters/ThreadedCommentsEmitter.d.ts +27 -0
  133. package/types/src/writer/emitters/WorkbookEmitter.d.ts +21 -3
  134. package/types/src/writer/emitters/WorksheetEmitter.d.ts +4 -3
  135. package/types/src/writer/utils/AutoFilter.d.ts +3 -3
  136. package/types/src/writer/utils/CustGeomUtils.d.ts +5 -0
  137. package/types/src/writer/utils/DefaultRows.d.ts +38 -0
  138. package/types/src/writer/utils/DrawMLUtils.d.ts +57 -3
  139. package/types/src/writer/utils/DummyFunction.d.ts +0 -2
  140. package/types/src/writer/utils/DxfCollector.d.ts +14 -11
  141. package/types/src/writer/utils/HiddenFormulaXfs.d.ts +28 -0
  142. package/types/src/writer/utils/PrstGeomUtils.d.ts +6 -0
  143. package/types/src/writer/utils/SheetStyleLayout.d.ts +73 -0
  144. package/types/src/writer/utils/TextUtils.d.ts +26 -2
  145. package/types/src/writer/utils/UnsupportedFunctions.d.ts +2 -2
  146. package/browser/cjs/B6sirGz6w-Bm7Ofo.cjs +0 -1
  147. package/browser/cjs/B7_pDFYCVzt-3hUs.cjs +0 -1
  148. package/browser/cjs/BAtEL-5TLyoaPFDP.cjs +0 -2
  149. package/browser/cjs/Bg0e53JZa8vhmm5a.cjs +0 -1
  150. package/browser/cjs/CIpMN7SDVREKQUQE.cjs +0 -6
  151. package/browser/cjs/CK5FFUvet6FnIYO_.cjs +0 -5
  152. package/browser/cjs/D5Y4KQhKdukOkjvA.cjs +0 -2
  153. package/browser/cjs/DV6LeTEiiFUrZoxj.cjs +0 -1
  154. package/browser/cjs/DWkuoJSgvcXJTdN1.cjs +0 -1
  155. package/browser/cjs/Db8YjGM6TG34c8aT.cjs +0 -1
  156. package/browser/cjs/index.cjs +0 -1
  157. package/browser/cjs/xQ6-wbTw5UzZUM1Y.cjs +0 -1
  158. package/browser/esm/4BWLu134ABlCQEtM.mjs +0 -3655
  159. package/browser/esm/BzQ_lPzc8C4OTIGZ.mjs +0 -99
  160. package/browser/esm/CJknI8BYGSZr-4zS.mjs +0 -52
  161. package/browser/esm/Cok_fBIUCHDSrKw0.mjs +0 -2211
  162. package/browser/esm/D-m_kQLaewdwuXaF.mjs +0 -2685
  163. package/browser/esm/Dj7D2nVdAZ3TiUks.mjs +0 -4743
  164. package/browser/esm/ijQzHH-bvDfUHIi1.mjs +0 -24
  165. package/node/esm/CF1R5ovFsRNu--Rw.mjs +0 -3744
  166. package/node/esm/Ctcl4jN52INWpKWC.mjs +0 -2255
  167. package/node/esm/CvnRSooxEQdlJgMn.mjs +0 -2766
  168. package/node/esm/DQd0vxzTaPt2qSL-.mjs +0 -108
  169. package/node/esm/ssSlRCbCqxvZ9IX8.mjs +0 -2481
  170. package/types/src/legacyChart/OOXMLMappings.d.ts +0 -8
  171. package/types/src/legacyChart/OOXMLUtils.d.ts +0 -78
  172. package/types/src/legacyChart/ToOOXMLConverter.d.ts +0 -30
  173. package/types/src/reader/domVisitors/AxisVisitor.d.ts +0 -12
  174. package/types/src/reader/domVisitors/BarChartTypeVisitor.d.ts +0 -6
  175. package/types/src/reader/domVisitors/ChartSpaceVisitor.d.ts +0 -6
  176. package/types/src/reader/domVisitors/ChartTypeVisitor.d.ts +0 -7
  177. package/types/src/reader/domVisitors/ChartVisitor.d.ts +0 -7
  178. package/types/src/reader/domVisitors/DataLabelsVisitor.d.ts +0 -8
  179. package/types/src/reader/domVisitors/DataPointVisitor.d.ts +0 -6
  180. package/types/src/reader/domVisitors/HyperlinkVisitor.d.ts +0 -6
  181. package/types/src/reader/domVisitors/LayoutVisitor.d.ts +0 -5
  182. package/types/src/reader/domVisitors/LegendEntryVisitor.d.ts +0 -5
  183. package/types/src/reader/domVisitors/LegendVisitor.d.ts +0 -5
  184. package/types/src/reader/domVisitors/MarkerVisitor.d.ts +0 -5
  185. package/types/src/reader/domVisitors/NegativeShapeVisitor.d.ts +0 -6
  186. package/types/src/reader/domVisitors/PlotAreaVisitor.d.ts +0 -5
  187. package/types/src/reader/domVisitors/SeriesVisitor.d.ts +0 -8
  188. package/types/src/reader/domVisitors/TitleVisitor.d.ts +0 -9
  189. package/types/src/writer/emitters/ChartColorsEmitter.d.ts +0 -7
  190. package/types/src/writer/emitters/ChartEmitter.d.ts +0 -14
  191. package/types/src/writer/emitters/ChartStyleEmitter.d.ts +0 -46
@@ -1,7 +1,11 @@
1
- import { ISlicer } from '@sheetxl/sdk';
1
+ import { SlicerRecord } from '../_SlicerRecord';
2
2
  import { Visitor, ExecutionContext } from '../dom';
3
+ /**
4
+ * A sheet's slicer part: every `slicer` of it as a record by name, each joined to the cache it
5
+ * names so the record holds the column's ids beside the slicer's own presentation.
6
+ */
3
7
  export declare class SlicersVisitor implements Visitor {
4
- visit(context: ExecutionContext, elem: Element, jsonParent: any): Record<string, ISlicer.JSON>;
5
- processSlicer(context: ExecutionContext, elem: Element, slicers: Record<string, ISlicer.JSON>): void;
8
+ visit(context: ExecutionContext, elem: Element, jsonParent: any): Record<string, SlicerRecord>;
9
+ processSlicer(context: ExecutionContext, elem: Element, slicers: Record<string, SlicerRecord>): void;
6
10
  }
7
11
  //# sourceMappingURL=SlicersVisitor.d.ts.map
@@ -2,7 +2,7 @@ import { IRange, ITable, ISort } from '@sheetxl/sdk';
2
2
  import { Visitor, ExecutionContext } from '../dom';
3
3
  export declare class SortStateVisitor implements Visitor {
4
4
  visit(context: ExecutionContext, elem: Element, jsonParent: ITable.JSON): ISort.JSON | undefined;
5
- processSortCondition(context: ExecutionContext, elem: Element, refRange: IRange.Coords, defaultCriteria: ISort.Criteria): ISort.Options | null | undefined;
6
- processSortConditions(context: ExecutionContext, elem: Element, sorts: ISort.Options[], refRange: IRange.Coords, defaultCriteria: ISort.Criteria): void;
5
+ processSortCondition(context: ExecutionContext, elem: Element, refRange: IRange.Coords, defaultCriteria: ISort.Criteria, conditionRefs?: IRange.Coords[]): ISort.Options | null | undefined;
6
+ processSortConditions(context: ExecutionContext, elem: Element, sorts: ISort.Options[], refRange: IRange.Coords, defaultCriteria: ISort.Criteria, conditionRefs?: IRange.Coords[]): void;
7
7
  }
8
8
  //# sourceMappingURL=SortStateVisitor.d.ts.map
@@ -1,5 +1,15 @@
1
- import { ExecutionContext } from '../dom';
1
+ import { IHyperlink, IText } from '@sheetxl/sdk';
2
+ import { ExecutionContext } from '../dom/ExecutionContext';
2
3
  import { ColorContainerVisitor } from './ColorContainerVisitor';
4
+ /** The four font slots of a run and the JSON key each reads into. */
5
+ export declare const TEXT_FONTS: readonly [element: string, key: 'font' | 'eastAsianFont' | 'complexScriptFont' | 'symbolFont'][];
6
+ /**
7
+ * A `latin`/`ea`/`cs`/`sym`/`buFont` element as a font: a theme font (`+mn-lt`, `+mj-ea`) by
8
+ * its role, otherwise the family, with the PANOSE classification kept as stated.
9
+ */
10
+ export declare const readFont: (elem: Element) => IText.FontJSON | undefined;
11
+ /** A `hlinkClick`/`hlinkHover`: its address as the relationship resolves it, and what it shows. */
12
+ export declare const readHyperlink: (context: ExecutionContext, elem: Element) => Exclude<IHyperlink.JSON, string>;
3
13
  export declare class TextPropertiesVisitor extends ColorContainerVisitor {
4
14
  protected _jsonKey: string;
5
15
  constructor(jsonKey?: string);
@@ -7,5 +17,7 @@ export declare class TextPropertiesVisitor extends ColorContainerVisitor {
7
17
  visit(context: ExecutionContext, elemParent: Element, jsonParent: any): any;
8
18
  parseTextElement(context: ExecutionContext, elemParent: Element, jsonText: any, defaultRun: boolean): void;
9
19
  parseTextProperties(context: ExecutionContext, elem: Element, jsonText: any): void;
20
+ /** A `hlinkClick`/`hlinkHover`: its resolved address and what it shows. */
21
+ readHyperlink(context: ExecutionContext, elem: Element): Exclude<IHyperlink.JSON, string>;
10
22
  }
11
23
  //# sourceMappingURL=TextPropertiesVisitor.d.ts.map
@@ -1,9 +1,26 @@
1
1
  import { IRange, IComment } from '@sheetxl/sdk';
2
2
  import { Visitor, ExecutionContext } from '../dom';
3
+ /**
4
+ * One `<threadedComment>` as read: a root or a reply, flat, joined to its thread by `parentId`.
5
+ * The reader nests replies under their roots.
6
+ */
7
+ export interface ThreadedEntry extends IComment.EntryJSON {
8
+ parentId?: string;
9
+ done?: boolean;
10
+ }
3
11
  /**
4
12
  * https://learn.microsoft.com/en-us/openspecs/office_standards/ms-xlsx/adb84732-9fc8-48b6-bddc-6b0bcdaad940
5
13
  */
6
14
  export declare class ThreadedCommentVisitor implements Visitor {
7
- visit(context: ExecutionContext, elem: Element, jsonParent: IRange.JSONReferenceEntry<IComment.RichJSON>[]): IComment.RichJSON | undefined;
15
+ visit(context: ExecutionContext, elem: Element, jsonParent: IRange.JSONReferenceEntry<ThreadedEntry>[]): ThreadedEntry | undefined;
8
16
  }
17
+ /**
18
+ * A `dT` as an ISO string that says it is UTC, with milliseconds.
19
+ *
20
+ * @remarks
21
+ * Excel writes the time in UTC with no zone designator and hundredths of a second
22
+ * (`2026-09-28T19:25:03.54`). A `Date` would take that as local time, and the fraction is not the
23
+ * three digits every engine parses.
24
+ */
25
+ export declare function asUTC(dT: string): string;
9
26
  //# sourceMappingURL=ThreadedCommentVisitor.d.ts.map
@@ -1,6 +1,6 @@
1
- import { IRange, IComment, ISheet } from '@sheetxl/sdk';
1
+ import { IRange, IWorksheet } from '@sheetxl/sdk';
2
2
  import { Visitor, ExecutionContext } from '../dom';
3
3
  export declare class ThreadedCommentsVisitor implements Visitor {
4
- visit(context: ExecutionContext, elem: Element, jsonParent: ISheet.JSON): IRange.JSONReferenceEntry<IComment.JSON>[] | undefined;
4
+ visit(context: ExecutionContext, elem: Element, jsonParent: IWorksheet.JSON): IRange.JSONReferenceEntry<any>[] | undefined;
5
5
  }
6
6
  //# sourceMappingURL=ThreadedCommentsVisitor.d.ts.map
@@ -17,9 +17,19 @@ export declare class WorkbookVisitor extends SheetColorContainerVisitor {
17
17
  * `context.getRef` resolves through the generic `readAsJSON` path, which dispatches to
18
18
  * `ExternalLinkVisitor` by the target part's root element — `null` for a DDE/OLE part (not ours
19
19
  * to read) or a missing rel, keeping the position without a book's content (see `XLSXReader`'s
20
- * `getRef`, which normalizes an empty visitor result to `null` and attaches `identity`).
20
+ * `getRef`, which normalizes an empty visitor result to `null` and attaches `sources`).
21
21
  */
22
22
  processExternalReferences(context: ExecutionContext, elem: Element, jsonParent: IWorkbook.JSON): any;
23
+ /**
24
+ * `<pivotCaches><pivotCache cacheId="n" r:id="rIdN"/></pivotCaches>` — the workbook's pivot
25
+ * caches, each carried whole: its definition part and, through that part's own relationships,
26
+ * its records. See `PLAN-MODEL-HOMES.md` step 4.
27
+ *
28
+ * @remarks
29
+ * The id is the join key: every pivot table names the cache it summarizes by `cacheId`, and the
30
+ * writer puts the same id back so the two still meet.
31
+ */
32
+ processPivotCaches(context: ExecutionContext, elem: Element, jsonParent: IWorkbook.JSON): any;
23
33
  processBookViews(context: ExecutionContext, elem: Element, jsonParent: IWorkbook.JSON): any;
24
34
  processWorkbookView(context: ExecutionContext, elem: Element, jsonParent: IWorkbook.JSON): any;
25
35
  processDefineName(context: ExecutionContext, elem: Element, jsonNames: INamedCollection.JSON, sheets: IWorkbook.SheetRefJSON[]): any;
@@ -0,0 +1,10 @@
1
+ import { ICellStyle } from '@sheetxl/sdk';
2
+ import { ExecutionContext } from '../dom';
3
+ /**
4
+ * The format an element's `dxfId` names, for a color filter or sort, read from the styles part's
5
+ * `<dxfs>` (`SheetStyleVisitor.processDXFs`).
6
+ *
7
+ * @returns `undefined` without a `dxfId`; `{}` when the id is not in the table.
8
+ */
9
+ export declare const readDxfAttribute: (context: ExecutionContext, elem: Element) => ICellStyle.Properties | undefined;
10
+ //# sourceMappingURL=_Dxfs.d.ts.map
@@ -1,28 +1,14 @@
1
1
  import { RelsVisitor } from './RelsVisitor';
2
2
  import { CorePropertiesVisitor } from './CorePropertiesVisitor';
3
3
  import { AppPropertiesVisitor } from './AppPropertiesVisitor';
4
- import { ChartSpaceVisitor } from './ChartSpaceVisitor';
5
- import { ChartVisitor } from './ChartVisitor';
6
- import { PlotAreaVisitor } from './PlotAreaVisitor';
7
4
  import { ShapePropertiesVisitor } from './ShapePropertiesVisitor';
8
- import { BarChartTypeVisitor } from './BarChartTypeVisitor';
9
- import { ChartTypeVisitor } from './ChartTypeVisitor';
10
- import { DataLabelsVisitor } from './DataLabelsVisitor';
11
- import { SeriesVisitor } from './SeriesVisitor';
12
- import { DataPointVisitor } from './DataPointVisitor';
13
- import { MarkerVisitor } from './MarkerVisitor';
14
- import { AxisVisitor } from './AxisVisitor';
15
5
  import { TextPropertiesVisitor } from './TextPropertiesVisitor';
16
- import { LegendEntryVisitor } from './LegendEntryVisitor';
17
- import { LegendVisitor } from './LegendVisitor';
18
- import { NegativeShapeVisitor } from './NegativeShapeVisitor';
19
- import { TitleVisitor } from './TitleVisitor';
20
- import { LayoutVisitor } from './LayoutVisitor';
6
+ import { ShapeTextVisitor } from './ShapeTextVisitor';
21
7
  import { ThemeVisitor } from './ThemeVisitor';
22
8
  import { ClrSchemeVisitor } from './ClrSchemeVisitor';
23
9
  import { FontSchemeVisitor } from './FontSchemeVisitor';
10
+ import { ObjectDefaultsVisitor } from './ObjectDefaultsVisitor';
24
11
  import { FmtSchemeVisitor } from './FmtSchemeVisitor';
25
- import { HyperlinkVisitor } from './HyperlinkVisitor';
26
12
  import { AutoFilterVisitor } from './AutoFilterVisitor';
27
13
  import { SortStateVisitor } from './SortStateVisitor';
28
14
  import { SheetStyleVisitor } from './SheetStyleVisitor';
@@ -32,6 +18,7 @@ import { TableX14Visitor } from './TableX14Visitor';
32
18
  import { ExternalLinkVisitor } from './ExternalLinkVisitor';
33
19
  import { SlicerCacheDefinitionVisitor } from './SlicerCacheDefinitionVisitor';
34
20
  import { SlicersVisitor } from './SlicersVisitor';
21
+ import { FormControlPrVisitor } from './FormControlPrVisitor';
35
22
  import { DrawingVisitor } from './DrawingVisitor';
36
23
  import { DrawingAnchorVisitor } from './DrawingAnchorVisitor';
37
24
  import { DrawingGraphicFrameVisitor } from './DrawingGraphicFrameVisitor';
@@ -51,28 +38,14 @@ export declare const BuiltInVisitors: {
51
38
  RelsVisitor: typeof RelsVisitor;
52
39
  CorePropertiesVisitor: typeof CorePropertiesVisitor;
53
40
  AppPropertiesVisitor: typeof AppPropertiesVisitor;
54
- ChartSpaceVisitor: typeof ChartSpaceVisitor;
55
- ChartVisitor: typeof ChartVisitor;
56
- PlotAreaVisitor: typeof PlotAreaVisitor;
57
41
  ShapePropertiesVisitor: typeof ShapePropertiesVisitor;
58
- BarChartTypeVisitor: typeof BarChartTypeVisitor;
59
- ChartTypeVisitor: typeof ChartTypeVisitor;
60
- DataLabelsVisitor: typeof DataLabelsVisitor;
61
- SeriesVisitor: typeof SeriesVisitor;
62
- DataPointVisitor: typeof DataPointVisitor;
63
- MarkerVisitor: typeof MarkerVisitor;
64
- AxisVisitor: typeof AxisVisitor;
65
42
  TextPropertiesVisitor: typeof TextPropertiesVisitor;
66
- LegendEntryVisitor: typeof LegendEntryVisitor;
67
- LegendVisitor: typeof LegendVisitor;
68
- NegativeShapeVisitor: typeof NegativeShapeVisitor;
69
- TitleVisitor: typeof TitleVisitor;
70
- LayoutVisitor: typeof LayoutVisitor;
43
+ ShapeTextVisitor: typeof ShapeTextVisitor;
71
44
  ThemeVisitor: typeof ThemeVisitor;
72
45
  ClrSchemeVisitor: typeof ClrSchemeVisitor;
73
46
  FontSchemeVisitor: typeof FontSchemeVisitor;
47
+ ObjectDefaultsVisitor: typeof ObjectDefaultsVisitor;
74
48
  FmtSchemeVisitor: typeof FmtSchemeVisitor;
75
- HyperlinkVisitor: typeof HyperlinkVisitor;
76
49
  AutoFilterVisitor: typeof AutoFilterVisitor;
77
50
  SortStateVisitor: typeof SortStateVisitor;
78
51
  SheetStyleVisitor: typeof SheetStyleVisitor;
@@ -82,6 +55,7 @@ export declare const BuiltInVisitors: {
82
55
  ExternalLinkVisitor: typeof ExternalLinkVisitor;
83
56
  SlicerCacheDefinitionVisitor: typeof SlicerCacheDefinitionVisitor;
84
57
  SlicersVisitor: typeof SlicersVisitor;
58
+ FormControlPrVisitor: typeof FormControlPrVisitor;
85
59
  DrawingVisitor: typeof DrawingVisitor;
86
60
  DrawingAnchorVisitor: typeof DrawingAnchorVisitor;
87
61
  DrawingGraphicFrameVisitor: typeof DrawingGraphicFrameVisitor;
@@ -0,0 +1,58 @@
1
+ import { SaxesTag } from './Saxes';
2
+ export type LeanSaxEvent = 'opentag' | 'closetag' | 'text' | 'cdata' | 'error' | 'end';
3
+ /**
4
+ * Takes over one element name from the tokenizer. For a hot element with a fixed shape (a
5
+ * worksheet `<c>`), reading the raw text directly skips the tag and attribute objects the generic
6
+ * events need, which is most of the tokenizer's cost.
7
+ */
8
+ export interface ElementScanner {
9
+ /** The raw (prefixed, if the part uses a prefix) tag name this scanner takes. */
10
+ readonly name: string;
11
+ /**
12
+ * When set, {@link scan} consumes only the START tag of a non-self-closing element, and the
13
+ * parser holds `openTag` open so the element's children and close tag are handled as usual (the
14
+ * close dispatches `openTag`). When unset, {@link scan} consumes the whole element.
15
+ */
16
+ readonly openTag?: SaxesTag;
17
+ /**
18
+ * Consume the element whose `<` is at `start`. Returns the index just after what it consumed,
19
+ * {@link LeanSaxParser.NEED_MORE} when that runs past `end`, or
20
+ * {@link LeanSaxParser.NOT_HANDLED} (having changed nothing) to have it tokenized as usual.
21
+ */
22
+ scan(s: string, start: number, end: number): number;
23
+ }
24
+ export declare class LeanSaxParser {
25
+ static readonly NEED_MORE = -1;
26
+ static readonly NOT_HANDLED = -2;
27
+ /** Entity-decode text and normalize its line ends, as the `text` event delivers it. */
28
+ static decodeText(raw: string): string;
29
+ private _openTagHandler;
30
+ private _closeTagHandler;
31
+ private _textHandler;
32
+ private _cdataHandler;
33
+ private _errorHandler;
34
+ private _endHandler;
35
+ /** By the first character of the name; one scanner per first character. */
36
+ private _scanners;
37
+ /** Unconsumed input: a markup construct cut off by the end of the last chunk. */
38
+ private _carry;
39
+ /** Raw (undecoded) text since the last markup, possibly spanning chunks. */
40
+ private _text;
41
+ private _tags;
42
+ private _sawRoot;
43
+ private _closed;
44
+ on(name: LeanSaxEvent, handler: any): void;
45
+ setElementScanners(scanners: readonly ElementScanner[] | null): void;
46
+ fail(message: string): void;
47
+ write(chunk: string): this;
48
+ close(): this;
49
+ private _flushText;
50
+ /**
51
+ * Consume the markup starting at `lt`. Returns the index after it, or -1 when the markup runs
52
+ * past the end of `s` (the caller carries it into the next chunk).
53
+ */
54
+ private _markup;
55
+ private _openTag;
56
+ private _closeTag;
57
+ }
58
+ //# sourceMappingURL=LeanSaxParser.d.ts.map
@@ -1,4 +1,5 @@
1
1
  import { SaxesStartTag, SaxesTag, SaxesAttribute, SaxesAttributeNS, SaxesOptions } from './Saxes';
2
+ import { ElementScanner } from './LeanSaxParser';
2
3
  export declare namespace SaxParser {
3
4
  type StartTag = SaxesStartTag;
4
5
  type Tag = SaxesTag;
@@ -28,7 +29,16 @@ export declare namespace SaxParser {
28
29
  onText?: (text: string) => void;
29
30
  onError?: (error: any) => void;
30
31
  onEnd?: () => T;
32
+ /** Honored only by the lean parser (see {@link ParseOptions.lean}). */
33
+ elementScanners?: readonly ElementScanner[];
31
34
  }
32
- const parseStream: <T = any>(reader: ReadableStreamDefaultReader<string>, handler: EventHandler, options?: SaxesOptions) => Promise<T>;
35
+ interface ParseOptions extends SaxesOptions {
36
+ /**
37
+ * Use {@link LeanSaxParser}: non-validating and much faster, for large parts whose handler
38
+ * only needs tags, attributes and text. Implies `xmlns: false`.
39
+ */
40
+ lean?: boolean;
41
+ }
42
+ const parseStream: <T = any>(reader: ReadableStreamDefaultReader<string>, handler: EventHandler, options?: ParseOptions) => Promise<T>;
33
43
  }
34
44
  //# sourceMappingURL=SaxParser.d.ts.map
@@ -1,3 +1,4 @@
1
+ import { OnWarning, WarningOptions } from '../Warning';
1
2
  import { SaxParser } from './SaxParser';
2
3
  type ValueMutator = (value: any) => any;
3
4
  export declare const CopyMutators: {
@@ -23,7 +24,7 @@ export interface SAXExecutionContext<J = any> {
23
24
  * `closeTag`. `null` anywhere else.
24
25
  */
25
26
  getRawXml(): string | null;
26
- warn(message: string): void;
27
+ warn(message: string, options?: WarningOptions): void;
27
28
  }
28
29
  export interface SaxVisitor<J = any, P = any, C = any | void> {
29
30
  from: string;
@@ -67,7 +68,7 @@ export interface SaxVisitor<J = any, P = any, C = any | void> {
67
68
  export declare class SaxVisitHandler {
68
69
  protected _registeredVisitors: Map<string, SaxVisitor>;
69
70
  registerVisitor<J = any, P = any>(visitor: SaxVisitor<J, P>): void;
70
- createEventHandler(root: any, onEnd?: () => void, onWarning?: (message: string) => void): SaxParser.EventHandler;
71
+ createEventHandler(root: any, onEnd?: () => void, onWarning?: OnWarning): SaxParser.EventHandler;
71
72
  }
72
73
  export {};
73
74
  //# sourceMappingURL=SaxVisitor.d.ts.map
@@ -28,6 +28,15 @@ export interface ContentTypesDirectory {
28
28
  styles: string[];
29
29
  metadata: string[];
30
30
  people: string[];
31
+ /**
32
+ * Every `<Override>`, by part path (no leading `/`).
33
+ *
34
+ * @remarks
35
+ * The buckets above are the parts the reader looks for; this is for going the other way, asking
36
+ * what a part it already found is. A part carried through on the model has to carry its content
37
+ * type with it, and most of them are not derivable from a name.
38
+ */
39
+ overrides: Record<string, string>;
31
40
  /** First shared-strings part, or `''`. */
32
41
  sst: string;
33
42
  /** First styles part, or `''`. */
@@ -1,3 +1,4 @@
1
+ import { IRichText, IFontStyle } from '@sheetxl/sdk';
1
2
  import { SaxParser } from '../sax';
2
3
  /**
3
4
  * Streaming SAX handler for `xl/sharedStrings.xml`, a flat repeated structure:
@@ -10,13 +11,52 @@ import { SaxParser } from '../sax';
10
11
  * ```
11
12
  *
12
13
  * We collect all `<t>` text while inside an `<si>` and emit the concatenated,
13
- * unescaped string when the `<si>` closes. Concatenating runs yields the plain
14
- * text for rich strings; run formatting (`<r>`/`<rPr>`) is ignored for now, though
15
- * the structure leaves room to capture it later. Phonetic guides
16
- * (`<rPh>`/`<phoneticPr>`) are skipped so they don't leak into the value.
14
+ * unescaped string when the `<si>` closes, with the runs when the string has any
15
+ * (`<r>` with its `<rPr>`, read as the font properties it sets, as a note's runs are).
16
+ * Phonetic guides (`<rPh>`/`<phoneticPr>`) are skipped so they don't leak into the value.
17
17
  *
18
- * @param onString Called once per `<si>`, in document order, with the value.
18
+ * @param onString Called once per `<si>`, in document order, with the value and, for a rich
19
+ * string, its runs.
19
20
  * @param onWarning Optional sink for parse errors.
20
21
  */
21
- export declare const createSharedStringsSaxVisitor: (onString: (text: string) => void, onWarning?: (message: string) => void) => SaxParser.EventHandler;
22
+ export declare const createSharedStringsSaxVisitor: (onString: (text: string, runs?: IRichText.Run[]) => void, onWarning?: (message: string) => void) => SaxParser.EventHandler;
23
+ /**
24
+ * Collects the `<r>` runs of a rich string from SAX events (a shared `<si>` or an inline `<is>`):
25
+ * each run's text and what its `<rPr>` sets. Fed the local names of the tags inside the string
26
+ * and the text inside its `<t>` elements.
27
+ */
28
+ export declare class RunCollector {
29
+ private _runs;
30
+ private _text;
31
+ private _font;
32
+ private _inRun;
33
+ private _inRPr;
34
+ reset(): void;
35
+ onOpenTag(local: string, attributes: Record<string, string>): void;
36
+ /** The text inside a `<t>`; the caller gates it as it gates the string's own text. */
37
+ onText(text: string): void;
38
+ onCloseTag(local: string): void;
39
+ /**
40
+ * The runs collected since the last reset, or `null` when the string is plain: no `<r>` at
41
+ * all, or none with an `<rPr>` (runs that set nothing are only how some writers split text).
42
+ * Resets.
43
+ */
44
+ take(): IRichText.Run[] | null;
45
+ }
46
+ /**
47
+ * The runs as a cell holds them: a run with an `<rPr>` gets the whole font Excel reads it as,
48
+ * a run without one stays bare.
49
+ *
50
+ * @remarks
51
+ * Measured (`probe-rich-partial.ps1`, 2026-10-18): Excel reads an `<rPr>` as absolute over the
52
+ * workbook's DEFAULT font, not the cell's. `<rPr><i/></rPr>` over an Arial 12 bold cell renders
53
+ * Calibri 11 italic, not bold; an empty `<rPr/>` (openpyxl) renders the default font; only a run
54
+ * with no `<rPr>` inherits the cell font. So a run with an `<rPr>` is completed here from the
55
+ * default font with every toggle off, then what the `<rPr>` states; the run then means the same
56
+ * read as a delta over any cell font.
57
+ *
58
+ * @param defaultFont The workbook's Normal font (family, size, color); absent, Excel's
59
+ * own default.
60
+ */
61
+ export declare function completeRuns(runs: readonly IRichText.Run[], defaultFont: IFontStyle.JSON | undefined): IRichText.Run[];
22
62
  //# sourceMappingURL=SharedStringsVisitor.d.ts.map
@@ -1,7 +1,25 @@
1
- import { Tuple, ISheet, ICell } from '@sheetxl/sdk';
1
+ import { Tuple, IWorksheet, ICell } from '@sheetxl/sdk';
2
2
  import { SaxParser } from '../sax';
3
- export declare const createWorksheetSaxVisitor: (sheet: ISheet.JSON, getRef: (relId: string, asBinary?: boolean) => any, // TODO - this should be a context like DOM.
4
- addSharedString: (str: string) => number, mapDxfs?: Map<number, any>, onEnd?: () => void, onWarning?: (message: string) => void, onProgress?: (amount: number, total?: number) => void, paramMap?: Map<string, any>) => SaxParser.EventHandler;
3
+ import { OnWarning } from '../Warning';
4
+ /**
5
+ * The `paramMap` key under which the reader hands the worksheet visitor the workbook's formula
6
+ * dialect (`XlsxFormulaDialect`), for condition formulas. Set before any sheet streams.
7
+ */
8
+ export declare const PARAM_FORMULA_DIALECT = "formulaDialect";
9
+ /**
10
+ * The `paramMap` key under which the reader hands the worksheet visitor `workbookPr@date1904`, for
11
+ * `t="d"` cells. Read per cell, not when the visitor is made: it is set once `workbook.xml` is read,
12
+ * which is after the sheets' parses start but before any of their cells stream.
13
+ */
14
+ export declare const PARAM_DATE_1904 = "date1904";
15
+ /** The runs of each rich shared string, by id (`Map<number, IRichText.Run[]>`). */
16
+ export declare const PARAM_RICH_STRINGS = "richStrings";
17
+ /** The workbook's Normal font (`IFontStyle.JSON`), which a rich run's `<rPr>` is read over. */
18
+ export declare const PARAM_DEFAULT_FONT = "defaultFont";
19
+ /** What an inline string resolves to: a shared-string id, or a rich value when it has runs. */
20
+ type InlineStringResult = number | ICell.JSONTypedValue | undefined;
21
+ export declare const createWorksheetSaxVisitor: (sheet: IWorksheet.JSON, getRef: (relId: string, as?: "resource" | "legacyDrawing" | "part" | "formControl") => any, // TODO - this should be a context like DOM.
22
+ addSharedString: (str: string) => number, mapDxfs?: Map<number, any>, onEnd?: () => void, onWarning?: OnWarning, onProgress?: (amount: number, total?: number) => void, paramMap?: Map<string, any>) => SaxParser.EventHandler;
5
23
  export declare class RowAttributeType {
6
24
  static Collapsed: number;
7
25
  static CustomFormat: number;
@@ -13,13 +31,7 @@ export declare class RowAttributeType {
13
31
  static R: number;
14
32
  static S: number;
15
33
  static Spans: number;
16
- static ThickBot: number;
17
- static ThickTop: number;
18
34
  }
19
- /**
20
- * Special handler optimized for performance while reading sheet data.
21
- *
22
- * TODO - **PERFORMANCE**. Create a saxes flag that says to not build attribute object and event only (less objects and less lookups but would be per tag type)
23
- */
24
- export declare const createSheetDataSaxVisitor: (tupleBuilder: Tuple.IBuilder<ICell.JSON>, sheet: ISheet.JSON, delegate: SaxParser.EventHandler, onWarning: ((message: string) => void) | undefined, onProgress: ((amount: number, total?: number) => void) | undefined, stringHandler: SaxParser.EventHandler<number | undefined>, paramMap?: Map<string, any>) => SaxParser.EventHandler;
35
+ export declare const createSheetDataSaxVisitor: (tupleBuilder: Tuple.IBuilder<ICell.JSON>, sheet: IWorksheet.JSON, delegate: SaxParser.EventHandler, onWarning: OnWarning | undefined, onProgress: ((amount: number, total?: number) => void) | undefined, stringHandler: SaxParser.EventHandler<InlineStringResult>, paramMap?: Map<string, any>, addSharedString?: (str: string) => number, isZeroHeight?: () => boolean) => SaxParser.EventHandler;
36
+ export {};
25
37
  //# sourceMappingURL=WorksheetVisitor.d.ts.map
@@ -0,0 +1,39 @@
1
+ import { IFont, IShape, IText, ITextFrame } from '@sheetxl/sdk';
2
+ /**
3
+ * DrawingML's vocabulary for drawing text and shapes against SheetXL's: the attribute values a
4
+ * file states (`algn="ctr"`, `u="sng"`, `vert="eaVert"`) and the model values they read to.
5
+ *
6
+ * @remarks
7
+ * Every reader and writer of a `txBody`, a `cNvPr` or a drawing element goes through these
8
+ * tables, so a shape's text and a chart's title agree on what `center` is. A value neither side
9
+ * knows passes through unchanged: the file still reads back as written.
10
+ */
11
+ interface Vocabulary<M extends string> {
12
+ /** The model value for an attribute value. */
13
+ read(value: string): M;
14
+ /** The attribute value for a model value; `undefined` stays `undefined`. */
15
+ write(value: M | undefined): string | undefined;
16
+ }
17
+ /** The drawing element each kind of shape is written as, and reads from. */
18
+ export declare const SHAPE_TYPES: Readonly<Record<string, IShape.Type>>;
19
+ /** `pPr/@algn`. */
20
+ export declare const paragraphAlignment: Vocabulary<IText.ParagraphAlignment>;
21
+ /** `pPr/@fontAlgn`. */
22
+ export declare const fontAlignment: Vocabulary<IText.FontAlignment>;
23
+ /** `bodyPr/@anchor`. */
24
+ export declare const anchor: Vocabulary<ITextFrame.VerticalAlignment>;
25
+ /** `rPr/@u`. */
26
+ export declare const underline: Vocabulary<IFont.UnderlineStyle>;
27
+ /** `rPr/@strike`. */
28
+ export declare const strike: Vocabulary<IFont.StrikeStyle>;
29
+ /** `bodyPr/@vert`. */
30
+ export declare const writingMode: Vocabulary<ITextFrame.WritingMode>;
31
+ /** `bodyPr/@vertOverflow` and `@horzOverflow`. */
32
+ export declare const overflow: Vocabulary<ITextFrame.Overflow>;
33
+ /** `tab/@algn`. */
34
+ export declare const tabAlignment: Vocabulary<ITextFrame.TabStopAlignment>;
35
+ /** `latin/@charset` and its kin: a signed byte in the file, the `0-255` `LOGFONT` value in the model. */
36
+ export declare const readCharset: (value: string) => IFont.Charset | undefined;
37
+ export declare const writeCharset: (value: IFont.Charset | undefined) => string | undefined;
38
+ export {};
39
+ //# sourceMappingURL=DrawingMLText.d.ts.map
@@ -0,0 +1,170 @@
1
+ import { IFormControl, ICaptioned, IAnchored, Bounds, IMovable, IWorksheet, ITextFrame } from '@sheetxl/sdk';
2
+ /**
3
+ * A form control as Excel stores it, in and out of the model's form-control content types.
4
+ *
5
+ * @remarks
6
+ * Excel writes one control three times: a `ctrlProp` part (`<formControlPr>`) says what it is
7
+ * and what it holds; a shape in the sheet's VML draws it for Excel 2007; and a hidden `<xdr:sp>`
8
+ * in the drawing part — the *twin*, joined to the control by `a14:compatExt/@spid` — carries the
9
+ * caption and its font for Excel 2010 and later. The model holds one content per control, typed
10
+ * by kind ({@link IFormControl.Type}), and this module turns it into, and out of, all three.
11
+ *
12
+ * Excel 2010 and later read only the `<controls>` entry, the part and the twin: the VML shape is
13
+ * an echo they ignore and regenerate (its `<x:Checked>`, its caption, even its absence). So the
14
+ * shape is never carried: the reader takes it out of the sheet's VML, and the writer draws a new
15
+ * one from the model for the consumers that still read it (Excel 2007, LibreOffice). A file
16
+ * Excel 2007 wrote has no part and no `<controls>` entry at all, only the shape; that shape is
17
+ * read into a control ({@link readControlShape}) and written back in all three forms.
18
+ */
19
+ /** The x14 namespace the `ctrlProp` part declares. */
20
+ export declare const NS_FORM_CONTROL = "http://schemas.microsoft.com/office/spreadsheetml/2009/9/main";
21
+ /** The content type of a `ctrlProp` part. */
22
+ export declare const CONTENT_TYPE_CTRL_PROP = "application/vnd.ms-excel.controlproperties+xml";
23
+ /** The relationship a `<control>` uses for its `ctrlProp` part. */
24
+ export declare const RELATIONSHIP_TYPE_CTRL_PROP = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/ctrlProp";
25
+ /** The content types that are form controls, and so are written as Excel's `<controls>`. */
26
+ export declare const FORM_CONTROL_TYPES: ReadonlySet<string>;
27
+ /** Whether a movable's content is a form control. */
28
+ export declare const isFormControlType: (type: string | undefined) => boolean;
29
+ /**
30
+ * Reads a `<formControlPr>`, as its attributes, its list items and its `extLst` markup, into a
31
+ * content type and that kind's fields.
32
+ */
33
+ export declare function readFormControlPr(attributes: Record<string, string>, items: readonly string[], extLst: string | undefined): {
34
+ type: string;
35
+ json: IFormControl.JSON;
36
+ };
37
+ /**
38
+ * Writes a control's fields as a `ctrlProp` part.
39
+ */
40
+ export declare function writeFormControlPr(type: string, control: IFormControl.JSON): string;
41
+ /**
42
+ * Lifts the `<controlPr>` attributes the model names out of the attribute bag.
43
+ */
44
+ export declare function liftControlPr(props: Record<string, string>, control: IFormControl.JSON): void;
45
+ /**
46
+ * The `<controlPr>` attributes, the lifted ones restored.
47
+ */
48
+ export declare function controlPrAttributes(control: IFormControl.JSON): Record<string, string | undefined>;
49
+ /**
50
+ * What a hidden twin's shape JSON carries until `absorbControlTwins` takes it: the VML shape id
51
+ * of the control it draws for.
52
+ */
53
+ export interface ControlTwinMarks {
54
+ twinOf?: number;
55
+ }
56
+ /** What the drawing's hidden twin says about a control. */
57
+ export interface ControlTwin {
58
+ caption?: string;
59
+ font?: ICaptioned.Font;
60
+ }
61
+ /**
62
+ * Reads the caption and its font off a twin's text: the caption is the text, the font is the
63
+ * first run's.
64
+ */
65
+ export declare function readControlTwin(text: ITextFrame.JSON | undefined): ControlTwin;
66
+ /**
67
+ * Joins each drawing twin to the control it draws for, and takes it off the sheet.
68
+ *
69
+ * @remarks
70
+ * The twin is read as a hidden shape of its own (`DrawingSpVisitor`, which marks it with
71
+ * {@link ControlTwinMarks}); here it becomes the control's caption and font, and is written back
72
+ * from those (`controlTwinShape`). A twin whose control was not read stays the hidden shape it was.
73
+ *
74
+ * A twin inside a group is the control's place in it: Excel draws a grouped control at its twin's
75
+ * frame in the group, and its `<controls>` anchor only restates that on the sheet. So the member
76
+ * becomes the control, and the control read from `<controls>` leaves the sheet.
77
+ */
78
+ export declare function absorbControlTwins(sheet: IWorksheet.JSON): void;
79
+ /**
80
+ * The hidden `<xdr:sp>` the drawing part carries for a control, written from the model.
81
+ *
82
+ * @remarks
83
+ * Hidden, so the drawing layer never shows it; its `cNvPr/@id` is the shape id, as Excel's own
84
+ * is. The caption's font is restated as Excel restates it: size, weight and style on the run,
85
+ * the color as a solid fill, the family as `latin`.
86
+ *
87
+ * On the sheet the twin hangs from its anchor and states no frame; in a group it is the control's
88
+ * place in the group, so `frame` (pixels, in the group's child space) is written.
89
+ */
90
+ export declare function controlTwinShape(type: string, json: IFormControl.JSON, name: string | undefined, frame?: Bounds): string;
91
+ /**
92
+ * A control the sheet writes, wherever it is: on the sheet, or a member of a group, with where
93
+ * it sits in cells.
94
+ */
95
+ export interface SheetControl {
96
+ /** The control's movable, as the sheet's JSON or its group's holds it. */
97
+ jsonMovable: IMovable.JSON;
98
+ /** Its corners in cells. */
99
+ anchor: IMovable.AnchorOffset;
100
+ /** How it moves and sizes with its cells. */
101
+ anchorType: IAnchored.Type;
102
+ }
103
+ /**
104
+ * The sheet's controls, each in its `<controls>` place.
105
+ *
106
+ * @remarks
107
+ * A control on the sheet is where its anchor says. A grouped control is wherever its group draws
108
+ * it, which only the live model knows, so its corners are found from its drawn bounds; it moves
109
+ * and sizes as its group does. The JSON's movables are the sheet's (less notes) in order, and a
110
+ * group's members its own, in order.
111
+ */
112
+ export declare function sheetControls(sheet: IWorksheet, json: IWorksheet.JSON): SheetControl[];
113
+ /** The attributes an `mc:AlternateContent` around a twin's anchor declares. */
114
+ export declare const TWIN_ALTERNATE_CONTENT_ATTRIBUTES: {
115
+ 'xmlns:mc': string;
116
+ };
117
+ /** The attributes the `mc:Choice` inside it declares. */
118
+ export declare const TWIN_CHOICE_ATTRIBUTES: {
119
+ 'xmlns:a14': string;
120
+ Requires: string;
121
+ };
122
+ /** The shape id a VML shape names, or `null`. */
123
+ export declare function vmlShapeId(shape: string): number | null;
124
+ /** Whether a VML shape draws a form control (and not a note or a picture). */
125
+ export declare function isVmlControlShape(shape: string): boolean;
126
+ /**
127
+ * The VML part with every control shape visited: `update` answers the shape to keep, or `null`
128
+ * to drop it. Shapes that draw something else are left as they are.
129
+ */
130
+ export declare function mapVmlControlShapes(xml: string, update: (shape: string, shapeId: number | null) => string | null): string;
131
+ /** The shapetype every control shape refers to, declared once per part. */
132
+ export declare const CONTROL_SHAPETYPE = "<v:shapetype id=\"_x0000_t201\" coordsize=\"21600,21600\" o:spt=\"201\"\n path=\"m,l,21600r21600,l21600,xe\">\n <v:stroke joinstyle=\"miter\"/>\n <v:path shadowok=\"f\" o:extrusionok=\"f\" strokeok=\"f\" fillok=\"f\" o:connecttype=\"rect\"/>\n <o:lock v:ext=\"edit\" shapetype=\"t\"/>\n </v:shapetype>";
133
+ /**
134
+ * Where a control shape is written.
135
+ */
136
+ export interface ControlShapePlacement {
137
+ /** The number in `_x0000_s{n}`: the control's own shape id. */
138
+ shapeId: number;
139
+ zIndex: number;
140
+ /** The eight numbers of `<x:Anchor>`. */
141
+ anchor: readonly number[];
142
+ /** The control in pixels, for the `style` echo. */
143
+ bounds: Bounds;
144
+ anchorType: IAnchored.Type;
145
+ }
146
+ /**
147
+ * The VML shape that draws a control for the consumers that still read one, written from the
148
+ * model.
149
+ *
150
+ * @remarks
151
+ * Excel's own spelling, child for child, of a control it draws fresh. `<x:MoveWithCells/>` and
152
+ * `<x:SizeWithCells/>` are inverted in VML: present means the control does *not* follow its
153
+ * cells. Returns `null` for a kind the VML has no name for.
154
+ */
155
+ export declare function writeControlShape(type: string, control: IFormControl.JSON, placement: ControlShapePlacement): string | null;
156
+ /**
157
+ * A control read from its VML shape alone, as Excel 2007 stores one: no part, no `<controls>`
158
+ * entry. `null` when the shape is not a control or names no anchor.
159
+ *
160
+ * @remarks
161
+ * The anchor's offsets are the authoring machine's pixels and are taken as they are.
162
+ */
163
+ export declare function readControlShape(shape: string, shapeId: number | null): IMovable.JSON | null;
164
+ /**
165
+ * Takes every control shape out of the sheet's VML: a shape whose control was read from the
166
+ * sheet is dropped (the writer draws a new one), and one with no control is read into one
167
+ * ({@link readControlShape}). A part left with no shapes is dropped with them.
168
+ */
169
+ export declare function absorbControlShapes(sheet: IWorksheet.JSON): void;
170
+ //# sourceMappingURL=FormControls.d.ts.map