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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/browser/esm/{BLXcoiDAaOMjFuhw.mjs → 9dwUocbOsJuAcmKn.mjs} +3021 -1986
  2. package/browser/esm/{xc_LzCPgHn-acgFZ.mjs → BIvDjK4Zl8bWRgl8.mjs} +2 -2
  3. package/browser/esm/CcH5ITJFTMVWUJO9.mjs +6154 -0
  4. package/browser/esm/{CI_CZI5m5-KkiAK5.mjs → D8k22TSWPd_RHEpj.mjs} +1798 -1009
  5. package/browser/esm/{BKT8OBj-bhQwdg49.mjs → DKnOwucZq4z9_-r-.mjs} +47 -10
  6. package/browser/esm/{2EOdn2WRK5y1L58S.mjs → DO75RoAQTgMuVzXv.mjs} +2 -2
  7. package/browser/esm/{NQIuOQIleHC4NUW6.mjs → DVLJTjJCGqrJUa8c.mjs} +587 -705
  8. package/browser/esm/DeMZN_qj__PKo4Wh.mjs +2265 -0
  9. package/browser/esm/{DXopGe8PrLWmwGaV.mjs → DsppUz-14Z7ti9i3.mjs} +1 -1
  10. package/browser/esm/{B-jb5SuiVh5NnBG_.mjs → aUBXbTh2r0u3x4Xo.mjs} +2 -2
  11. package/browser/esm/index.mjs +2 -2
  12. package/node/esm/BmIIQODk4dBVIXA4.mjs +4455 -0
  13. package/node/esm/{CHqRP_NjPpPd7m9L.mjs → C-e5AO_4TnGywT-m.mjs} +1 -1
  14. package/node/esm/C78E45n6j2E8rruH.mjs +5694 -0
  15. package/node/esm/CDKm5s3JE_d99TJw.mjs +2369 -0
  16. package/node/esm/{BmdmvgO5Zdgx-RWo.mjs → DCaAOfuW-w_dx_qd.mjs} +2 -2
  17. package/node/esm/{O5mti2R9drFOlXc7.mjs → DSgxL0sBZtWMydVl.mjs} +2 -2
  18. package/node/esm/DXusvwW73FUDSyvD.mjs +6367 -0
  19. package/node/esm/DsyuWxk3bdGhJUQN.mjs +2346 -0
  20. package/node/esm/index.mjs +64 -27
  21. package/package.json +3 -3
  22. package/types/src/AutoFilterRules.d.ts +8 -1
  23. package/types/src/DataTableFormula.d.ts +36 -0
  24. package/types/src/DefinedNameAttributes.d.ts +8 -0
  25. package/types/src/ExcelCompat.d.ts +15 -3
  26. package/types/src/KnownFonts.d.ts +50 -0
  27. package/types/src/LegacyFormula.d.ts +13 -0
  28. package/types/src/PageLayoutAttributes.d.ts +8 -0
  29. package/types/src/Plugin.d.ts +12 -0
  30. package/types/src/ProtectionAttributes.d.ts +2 -2
  31. package/types/src/SheetKinds.d.ts +57 -0
  32. package/types/src/SheetViewAttributes.d.ts +4 -0
  33. package/types/src/SortExtent.d.ts +16 -0
  34. package/types/src/Types.d.ts +11 -0
  35. package/types/src/XlsxHeader.d.ts +19 -0
  36. package/types/src/chart/ChartExXml.d.ts +38 -0
  37. package/types/src/chart/ChartPartXml.d.ts +47 -0
  38. package/types/src/chart/ChartSpaceXml.d.ts +37 -0
  39. package/types/src/chart/_XmlTree.d.ts +34 -0
  40. package/types/src/chart/_chartCodecs.d.ts +12 -0
  41. package/types/src/chart/_chartExCodecs.d.ts +7 -0
  42. package/types/src/chart/_chartExFold.d.ts +14 -0
  43. package/types/src/chart/_chartExMarkup.d.ts +236 -0
  44. package/types/src/chart/_chartExStyle.d.ts +22 -0
  45. package/types/src/chart/_codec.d.ts +78 -0
  46. package/types/src/chart/_drawingml.d.ts +10 -0
  47. package/types/src/chart/_xml.d.ts +70 -0
  48. package/types/src/reader/CellControls.d.ts +18 -0
  49. package/types/src/reader/DocumentPropertiesRead.d.ts +16 -0
  50. package/types/src/reader/DummyFunctionUnwrap.d.ts +2 -2
  51. package/types/src/reader/HeaderStyles.d.ts +15 -0
  52. package/types/src/reader/IsoDateCell.d.ts +20 -0
  53. package/types/src/reader/LibreOfficeDataTable.d.ts +12 -0
  54. package/types/src/reader/domVisitors/AppPropertiesVisitor.d.ts +13 -1
  55. package/types/src/reader/domVisitors/AutoFilterVisitor.d.ts +3 -3
  56. package/types/src/reader/domVisitors/CommentVisitor.d.ts +2 -2
  57. package/types/src/reader/domVisitors/DrawingElementVisitor.d.ts +3 -1
  58. package/types/src/reader/domVisitors/DrawingGraphicFrameVisitor.d.ts +2 -2
  59. package/types/src/reader/domVisitors/DrawingPicVisitor.d.ts +23 -8
  60. package/types/src/reader/domVisitors/ExternalLinkVisitor.d.ts +1 -1
  61. package/types/src/reader/domVisitors/FeaturePropertyBagVisitor.d.ts +27 -0
  62. package/types/src/reader/domVisitors/FontSchemeVisitor.d.ts +3 -2
  63. package/types/src/reader/domVisitors/ObjectDefaultsVisitor.d.ts +11 -0
  64. package/types/src/reader/domVisitors/SheetColorContainerVisitor.d.ts +2 -2
  65. package/types/src/reader/domVisitors/SheetStyleVisitor.d.ts +8 -0
  66. package/types/src/reader/domVisitors/SortStateVisitor.d.ts +2 -2
  67. package/types/src/reader/domVisitors/ThreadedCommentsVisitor.d.ts +2 -2
  68. package/types/src/reader/domVisitors/_Dxfs.d.ts +10 -0
  69. package/types/src/reader/domVisitors/index.d.ts +4 -34
  70. package/types/src/reader/saxVisitors/ContentTypesVisitor.d.ts +1 -0
  71. package/types/src/reader/saxVisitors/SharedStringsVisitor.d.ts +46 -6
  72. package/types/src/reader/saxVisitors/WorksheetVisitor.d.ts +24 -8
  73. package/types/src/richValue/ErrorRichValueHandler.d.ts +22 -0
  74. package/types/src/richValue/IRichValueHandler.d.ts +109 -0
  75. package/types/src/richValue/LocalImageRichValueHandler.d.ts +18 -0
  76. package/types/src/richValue/RichDataParts.d.ts +69 -0
  77. package/types/src/richValue/RichRecordWriter.d.ts +61 -0
  78. package/types/src/richValue/RichValueHandlers.d.ts +25 -0
  79. package/types/src/richValue/RichValueResolver.d.ts +54 -0
  80. package/types/src/richValue/WebImageRichValueHandler.d.ts +42 -0
  81. package/types/src/richValue/index.d.ts +7 -0
  82. package/types/src/utils/DrawingMLText.d.ts +2 -2
  83. package/types/src/utils/FormControls.d.ts +4 -4
  84. package/types/src/utils/SharedNames.d.ts +13 -0
  85. package/types/src/utils/SpreadsheetFont.d.ts +38 -0
  86. package/types/src/utils/VmlNoteShapes.d.ts +16 -23
  87. package/types/src/utils/VmlNoteStyle.d.ts +44 -0
  88. package/types/src/utils/VmlPrefixes.d.ts +24 -0
  89. package/types/src/writer/builder/PackageBuilder.d.ts +2 -0
  90. package/types/src/writer/builder/Types.d.ts +7 -0
  91. package/types/src/writer/emitters/CommentsEmitter.d.ts +3 -3
  92. package/types/src/writer/emitters/DrawingEmitter.d.ts +2 -2
  93. package/types/src/writer/emitters/FeaturePropertyBagEmitter.d.ts +18 -0
  94. package/types/src/writer/emitters/LegacyDrawingEmitter.d.ts +4 -4
  95. package/types/src/writer/emitters/PropsCoreEmitter.d.ts +7 -2
  96. package/types/src/writer/emitters/PropsCustomEmitter.d.ts +15 -0
  97. package/types/src/writer/emitters/RichValuePartsEmitters.d.ts +36 -0
  98. package/types/src/writer/emitters/RichValueRelEmitter.d.ts +12 -0
  99. package/types/src/writer/emitters/RichValueStructureEmitter.d.ts +4 -3
  100. package/types/src/writer/emitters/RichValueTypesEmitter.d.ts +3 -2
  101. package/types/src/writer/emitters/RichValueWebImageEmitter.d.ts +24 -0
  102. package/types/src/writer/emitters/SharedStringsEmitter.d.ts +6 -3
  103. package/types/src/writer/emitters/SlicerEmitter.d.ts +8 -5
  104. package/types/src/writer/emitters/StylesEmitter.d.ts +2 -0
  105. package/types/src/writer/emitters/WorkbookEmitter.d.ts +5 -0
  106. package/types/src/writer/emitters/WorksheetEmitter.d.ts +4 -3
  107. package/types/src/writer/utils/AutoFilter.d.ts +1 -1
  108. package/types/src/writer/utils/CellControlComplements.d.ts +29 -0
  109. package/types/src/writer/utils/DefaultRows.d.ts +38 -0
  110. package/types/src/writer/utils/DxfCollector.d.ts +11 -8
  111. package/types/src/writer/utils/HiddenFormulaXfs.d.ts +1 -1
  112. package/types/src/writer/utils/RichValueCollector.d.ts +81 -129
  113. package/types/src/writer/utils/SheetStyleLayout.d.ts +86 -0
  114. package/types/src/writer/utils/TextUtils.d.ts +6 -1
  115. package/types/src/writer/utils/UnsupportedFunctions.d.ts +2 -2
  116. package/browser/esm/BPmehfSqdvgsLBsB.mjs +0 -5153
  117. package/node/esm/BpxxiZ2oKPkUSfdB.mjs +0 -2486
  118. package/node/esm/CtAF486aZqYzMeLM.mjs +0 -3651
  119. package/node/esm/QS_theNoeqNGLStj.mjs +0 -5298
  120. package/node/esm/nNQ7MG89sGKwkjMA.mjs +0 -4649
  121. package/types/src/legacyChart/OOXMLMappings.d.ts +0 -8
  122. package/types/src/legacyChart/OOXMLUtils.d.ts +0 -78
  123. package/types/src/legacyChart/ToOOXMLConverter.d.ts +0 -30
  124. package/types/src/reader/domVisitors/AxisVisitor.d.ts +0 -12
  125. package/types/src/reader/domVisitors/BarChartTypeVisitor.d.ts +0 -6
  126. package/types/src/reader/domVisitors/ChartSpaceVisitor.d.ts +0 -6
  127. package/types/src/reader/domVisitors/ChartTypeVisitor.d.ts +0 -7
  128. package/types/src/reader/domVisitors/ChartVisitor.d.ts +0 -7
  129. package/types/src/reader/domVisitors/DataLabelsVisitor.d.ts +0 -8
  130. package/types/src/reader/domVisitors/DataPointVisitor.d.ts +0 -6
  131. package/types/src/reader/domVisitors/LayoutVisitor.d.ts +0 -5
  132. package/types/src/reader/domVisitors/LegendEntryVisitor.d.ts +0 -5
  133. package/types/src/reader/domVisitors/LegendVisitor.d.ts +0 -5
  134. package/types/src/reader/domVisitors/MarkerVisitor.d.ts +0 -5
  135. package/types/src/reader/domVisitors/NegativeShapeVisitor.d.ts +0 -6
  136. package/types/src/reader/domVisitors/PlotAreaVisitor.d.ts +0 -5
  137. package/types/src/reader/domVisitors/RichValueDataVisitor.d.ts +0 -7
  138. package/types/src/reader/domVisitors/RichValueStructureVisitor.d.ts +0 -6
  139. package/types/src/reader/domVisitors/SeriesVisitor.d.ts +0 -8
  140. package/types/src/reader/domVisitors/TitleVisitor.d.ts +0 -9
  141. package/types/src/writer/emitters/ChartColorsEmitter.d.ts +0 -7
  142. package/types/src/writer/emitters/ChartEmitter.d.ts +0 -14
  143. package/types/src/writer/emitters/ChartStyleEmitter.d.ts +0 -46
@@ -0,0 +1,61 @@
1
+ import { IRichType, Scalar } from '@sheetxl/sdk';
2
+ import { RichPrimitiveType } from './IRichValueHandler';
3
+ /** A key of a structure or a bag structure: its name and type code (none for a number). */
4
+ export type RichStructureKey = readonly [name: string, type?: RichPrimitiveType | 'spba', defaultValue?: string];
5
+ /** A structure written: `<s t>` and its keys. @internal */
6
+ export interface RichValueStructureDef {
7
+ readonly structure: string;
8
+ readonly props: readonly RichStructureKey[];
9
+ }
10
+ /** An item of an array or a bag array: `<v t>`. */
11
+ export type RichItemText = readonly [type: string | undefined, text: string];
12
+ /** A `richStyles` entry. */
13
+ export interface RichStyleDef {
14
+ readonly numberFormat?: string;
15
+ readonly isTitle?: boolean;
16
+ readonly isHero?: boolean;
17
+ }
18
+ /**
19
+ * What the record writer writes into: the file's rich data tables. Every add answers the index
20
+ * the file names the entry by; equal entries share one.
21
+ *
22
+ * @internal
23
+ */
24
+ export interface RichValueSink {
25
+ /** The structure `t` with `keys`, added when new. */
26
+ structureFor(t: string, keys: readonly RichStructureKey[]): RichValueStructureDef;
27
+ /** An `<rv>`: its index in rdrichvalue.xml. */
28
+ addValue(structure: RichValueStructureDef, values: readonly string[], fb?: string): number;
29
+ /** An `<rv>` for a value a handler writes (an error, a picture), or `null`. */
30
+ addHandled(value: Scalar): number | null;
31
+ /** An `<a>` of rdarray.xml. */
32
+ addArray(rows: number, columns: number, items: readonly RichItemText[]): number;
33
+ /** An `<spb>`. */
34
+ addBag(keys: readonly RichStructureKey[], values: readonly string[]): number;
35
+ /** An `<a>` of the bags' `spbArrays`. */
36
+ addBagArray(items: readonly RichItemText[]): number;
37
+ /** A `richStyles` entry, 1-based as bags name them. */
38
+ addRichStyle(style: RichStyleDef): number;
39
+ /** A key's flags for the structure type `t`. */
40
+ addKeyFlags(t: string, key: string, flags: readonly (readonly [name: string, value: string])[]): void;
41
+ }
42
+ /** What a kind is a kind of: its name up to the digest (`_linkedentitycore:3f…` → `_linkedentitycore`). */
43
+ export declare const baseOfKind: (kind: IRichType) => string;
44
+ /**
45
+ * Writes rich values as Excel's rich data: records as `<rv>`s of their kind's structure, nested
46
+ * values by index, presentation back into Excel's bags.
47
+ *
48
+ * @remarks
49
+ * The inverse of `createRichValueResolver`. A key's type follows its kind's declared value type,
50
+ * so a number in a `rich` key is written as a `_formattednumber` carrying its format (geography)
51
+ * and a number in a number key takes its format from the record's `_Format` bag (finance). A full
52
+ * entity record is written with the form a cell or a parent names it by: the finance wrapper
53
+ * (`_linkedentity`, `%cvi`), or the geography stub (`_linkedentity2`) beside its full record.
54
+ *
55
+ * @internal
56
+ */
57
+ export declare const createRichRecordWriter: (sink: RichValueSink) => {
58
+ /** The `<rv>` a cell holding `value` names, or `null` when `value` is not one this writes. */
59
+ writeCell: (value: Scalar) => number | null;
60
+ };
61
+ //# sourceMappingURL=RichRecordWriter.d.ts.map
@@ -0,0 +1,25 @@
1
+ import { Scalar } from '@sheetxl/sdk';
2
+ import { IRichValueHandler } from './IRichValueHandler';
3
+ /**
4
+ * The rich value handlers the xlsx reader and writer dispatch through: one per Excel structure
5
+ * type, found by the structure when reading and by the value when writing.
6
+ *
7
+ * @internal
8
+ */
9
+ export declare namespace RichValueHandlers {
10
+ /**
11
+ * Adds a handler, replacing one for the same structure. Where several write one kind, the one
12
+ * registered last that {@link IRichValueHandler.writes} the value writes it.
13
+ */
14
+ function register(handler: IRichValueHandler): void;
15
+ /** Every handler, in registration order. */
16
+ function getAll(): IRichValueHandler[];
17
+ /** The handler that reads a structure type (`t=` on `<s>`), or `null`. */
18
+ function getByStructure(structure: string): IRichValueHandler | null;
19
+ /**
20
+ * The handler that writes a cell value: its kind's for a rich value; for an error with no kind
21
+ * of its own, `_error`. `null` when none does.
22
+ */
23
+ function getForValue(value: Scalar): IRichValueHandler | null;
24
+ }
25
+ //# sourceMappingURL=RichValueHandlers.d.ts.map
@@ -0,0 +1,54 @@
1
+ import { IRichData, Scalar } from '@sheetxl/sdk';
2
+ import { IRichValueReader } from './IRichValueHandler';
3
+ import { RichDataParts } from './RichDataParts';
4
+ /**
5
+ * The name base of a kind made from a supporting property bag structure. A rich value
6
+ * structure's kind is based on its `t`, which Excel never starts with `#`.
7
+ *
8
+ * @internal
9
+ */
10
+ export declare const BAG_KIND_BASE = "#spb";
11
+ /**
12
+ * Excel's reserved presentation keys: read into {@link IRichMeta}, not held as values. The kind
13
+ * still declares them, in file order, so a value is written back with the structure it was read
14
+ * with.
15
+ *
16
+ * - `_Display`: the card (`^Order`, `TitleProperty`, `SubTitleProperty`), for the kind.
17
+ * - `_Icon`: the icon, for the kind.
18
+ * - `_Flags`: per property, where it is not offered (`ShowInCardView`, …).
19
+ * - `_Format`: per property, a `richStyles` entry (1-based): number format, title, hero image.
20
+ * - `_SubLabel`: per property, its caption.
21
+ *
22
+ * @internal
23
+ */
24
+ export declare const META_KEYS: ReadonlySet<string>;
25
+ /**
26
+ * A property name as a bag key names it. Excel escapes a key that starts with a reserved character
27
+ * (`%`, `^`, a backtick) with a backtick: the `_Flags` bag names `%ProviderInfo` as `` `%ProviderInfo ``.
28
+ *
29
+ * @internal
30
+ */
31
+ export declare const unescapeBagKey: (key: string) => string;
32
+ /** A property name as a bag key, escaped as Excel escapes it ({@link unescapeBagKey}). @internal */
33
+ export declare const escapeBagKey: (name: string) => string;
34
+ /** What one file's rich values read as, by `<rv>` index. @internal */
35
+ export interface RichValueResolver {
36
+ /** The value a cell naming `<rv>` `index` holds: an error, a rich value's JSON, or `undefined`. */
37
+ cellValue(index: number): Scalar | IRichData.JSON | undefined;
38
+ }
39
+ /**
40
+ * Reads a file's rich values into cell values.
41
+ *
42
+ * @remarks
43
+ * A structure a handler reads (`_error`, `_webimage`, `_localImage`) is read by it. Every other
44
+ * structure is a {@link RichRecord} of a kind made from the structure; supporting property bags
45
+ * become records of their own, Excel's presentation keys ({@link META_KEYS}) become meta, and an
46
+ * entity's two forms are one value: a cell holds the full record (Excel's `_linkedentity` names it
47
+ * by `%cvi`; a `_linkedentity2` stub matches its `_linkedentity2core` by identity), and a nested
48
+ * entity with no full record holds its stub. A `_formattednumber` inside a record is a number,
49
+ * its format the property's.
50
+ *
51
+ * @internal
52
+ */
53
+ export declare const createRichValueResolver: (parts: RichDataParts, readers: ReadonlyMap<string, IRichValueReader>, warn: (message: string) => void) => RichValueResolver;
54
+ //# sourceMappingURL=RichValueResolver.d.ts.map
@@ -0,0 +1,42 @@
1
+ import { IResource } from '@sheetxl/sdk';
2
+ import { IRichValueHandler, RichValueReadContext } from './IRichValueHandler';
3
+ /** The part listing the pictures `_webimage` rich values name, by position. */
4
+ export declare const WEB_IMAGES_PART = "/xl/richData/rdRichValueWebImage.xml";
5
+ /** One `<webImageSrd>`: where a picture came from, and the picture Excel kept. */
6
+ export interface WebImage {
7
+ /** The source URL (`address`), or `null` when the file names none. */
8
+ source: string | null;
9
+ /** The kept picture (`blip`), or `null`. */
10
+ bytes: ArrayBuffer | null;
11
+ }
12
+ /** A picture a `_webimage` written names: its source, and the resource holding its bytes. */
13
+ export interface WrittenWebImage {
14
+ source: string;
15
+ resource: IResource | null;
16
+ }
17
+ /**
18
+ * The pictures of rdRichValueWebImage.xml, in file order: a `_webimage`'s `WebImageIdentifier`
19
+ * indexes this list. Empty when the part is absent.
20
+ */
21
+ export declare const readWebImages: (ctx: RichValueReadContext) => WebImage[];
22
+ /**
23
+ * How a picture reached its cell, as a `_webimage`'s `CalcOrigin` says it: 1 for the result of an
24
+ * `IMAGE` call and 4 for a reference to one (`=A3`), as Excel writes them (probe-image-fetch,
25
+ * 2026-10-27). 2 for any other formula and 5 for a literal are [MS-XLSX]'s values as read, unprobed.
26
+ */
27
+ export declare const calcOriginOf: (formula: string | null) => number;
28
+ /**
29
+ * Excel's `_webimage` structure: a picture as a cell value (`IMAGE`), read as and written from an
30
+ * `image` value.
31
+ *
32
+ * @remarks
33
+ * The structure names its picture by position in rdRichValueWebImage.xml, which holds the source
34
+ * URL (`address`, an external hyperlink) and the picture Excel kept for it (`blip`, a media part).
35
+ * Reading adds each picture to the workbook as the resource its values hold; writing takes the
36
+ * bytes from the value's resource, else the workbook's fetch. Alt text, height and width have no
37
+ * key: Excel's file for them is unprobed.
38
+ *
39
+ * @internal
40
+ */
41
+ export declare const WebImageRichValueHandler: IRichValueHandler;
42
+ //# sourceMappingURL=WebImageRichValueHandler.d.ts.map
@@ -0,0 +1,7 @@
1
+ export * from './IRichValueHandler';
2
+ export * from './RichValueHandlers';
3
+ export { WEB_IMAGES_PART } from './WebImageRichValueHandler';
4
+ export * from './RichDataParts';
5
+ export * from './RichValueResolver';
6
+ export * from './RichRecordWriter';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -23,9 +23,9 @@ export declare const fontAlignment: Vocabulary<IText.FontAlignment>;
23
23
  /** `bodyPr/@anchor`. */
24
24
  export declare const anchor: Vocabulary<ITextFrame.VerticalAlignment>;
25
25
  /** `rPr/@u`. */
26
- export declare const underline: Vocabulary<IText.UnderlineStyle>;
26
+ export declare const underline: Vocabulary<IFont.UnderlineStyle>;
27
27
  /** `rPr/@strike`. */
28
- export declare const strike: Vocabulary<IText.StrikeStyle>;
28
+ export declare const strike: Vocabulary<IFont.StrikeStyle>;
29
29
  /** `bodyPr/@vert`. */
30
30
  export declare const writingMode: Vocabulary<ITextFrame.WritingMode>;
31
31
  /** `bodyPr/@vertOverflow` and `@horzOverflow`. */
@@ -1,4 +1,4 @@
1
- import { IFormControl, ICaptioned, IAnchored, Bounds, IMovable, ISheet, ITextFrame } from '@sheetxl/sdk';
1
+ import { IFormControl, ICaptioned, IAnchored, Bounds, IMovable, IWorksheet, ITextFrame } from '@sheetxl/sdk';
2
2
  /**
3
3
  * A form control as Excel stores it, in and out of the model's form-control content types.
4
4
  *
@@ -75,7 +75,7 @@ export declare function readControlTwin(text: ITextFrame.JSON | undefined): Cont
75
75
  * frame in the group, and its `<controls>` anchor only restates that on the sheet. So the member
76
76
  * becomes the control, and the control read from `<controls>` leaves the sheet.
77
77
  */
78
- export declare function absorbControlTwins(sheet: ISheet.JSON): void;
78
+ export declare function absorbControlTwins(sheet: IWorksheet.JSON): void;
79
79
  /**
80
80
  * The hidden `<xdr:sp>` the drawing part carries for a control, written from the model.
81
81
  *
@@ -109,7 +109,7 @@ export interface SheetControl {
109
109
  * and sizes as its group does. The JSON's movables are the sheet's (less notes) in order, and a
110
110
  * group's members its own, in order.
111
111
  */
112
- export declare function sheetControls(sheet: ISheet, json: ISheet.JSON): SheetControl[];
112
+ export declare function sheetControls(sheet: IWorksheet, json: IWorksheet.JSON): SheetControl[];
113
113
  /** The attributes an `mc:AlternateContent` around a twin's anchor declares. */
114
114
  export declare const TWIN_ALTERNATE_CONTENT_ATTRIBUTES: {
115
115
  'xmlns:mc': string;
@@ -166,5 +166,5 @@ export declare function readControlShape(shape: string, shapeId: number | null):
166
166
  * sheet is dropped (the writer draws a new one), and one with no control is read into one
167
167
  * ({@link readControlShape}). A part left with no shapes is dropped with them.
168
168
  */
169
- export declare function absorbControlShapes(sheet: ISheet.JSON): void;
169
+ export declare function absorbControlShapes(sheet: IWorksheet.JSON): void;
170
170
  //# sourceMappingURL=FormControls.d.ts.map
@@ -0,0 +1,13 @@
1
+ import { ICell } from '@sheetxl/sdk';
2
+ /**
3
+ * Names the reader and the writer both spell, kept here so neither imports the other (they load as
4
+ * separate lazy chunks).
5
+ */
6
+ /**
7
+ * The `<ignoredError>` check attributes, in the schema's order (the order Excel writes them). Only
8
+ * these nine are Excel's; any other `ICell.ErrorCheck` is not written to xlsx.
9
+ */
10
+ export declare const IGNORED_ERROR_CHECKS: readonly ICell.ErrorCheck[];
11
+ /** The 2012 theme extension that names the theme's family (`thm15:themeFamily`). */
12
+ export declare const THEME_FAMILY_EXT_URI = "{05A4C25C-085E-4340-85A3-A5531E510DB2}";
13
+ //# sourceMappingURL=SharedNames.d.ts.map
@@ -0,0 +1,38 @@
1
+ import { IFont, IFontStyle, ITheme } from '@sheetxl/sdk';
2
+ /** Whether a family follows the theme. */
3
+ export declare function isThemeFamily(family: string | null | undefined): family is IFontStyle.ThemeFamily;
4
+ /** The model's family and fallbacks for a `<name>` (or `<rFont>`) and a `<scheme>`, in place. */
5
+ export declare function readFamily(font: {
6
+ family?: string;
7
+ fallbacks?: string[];
8
+ }, scheme: string | null | undefined): void;
9
+ /**
10
+ * The `<name>` and `<scheme>` a family is written as. A font that states no family is the theme's
11
+ * body font when it is a whole record (`whole`), and says nothing when it is differential. A theme
12
+ * font is named by the face cached for it, else by the theme's; with no `theme`, the name is the
13
+ * cached face alone.
14
+ */
15
+ export declare function writeFamily(family: string | undefined, fallbacks: readonly string[] | undefined, theme: ITheme | null, whole: boolean): {
16
+ name?: string;
17
+ scheme?: 'major' | 'minor';
18
+ };
19
+ /** The baseline a `vertAlign` stands for, or `undefined` for a value SpreadsheetML does not define. */
20
+ export declare function readBaseline(vertAlign: string | null | undefined): number | undefined;
21
+ /**
22
+ * The `vertAlign` a baseline is written as. A stated `0` is written as `baseline` only where the
23
+ * font is differential (a dxf, a run), where it undoes an inherited raise.
24
+ */
25
+ export declare function writeBaseline(baseline: number | null | undefined, differential: boolean): string | undefined;
26
+ /** The strike a `<strike>` toggle stands for. */
27
+ export declare function readStrike(on: boolean): IFont.StrikeStyle;
28
+ /** Whether a strike is written as `<strike/>`, or `undefined` when the font states none. */
29
+ export declare function writeStrike(strike: IFont.StrikeStyle | null | undefined): boolean | undefined;
30
+ /** The letter spacing `<condense/>` or `<extend/>` stands for, or `undefined` when it is off. */
31
+ export declare function readMacSpacing(name: 'condense' | 'extend', on: boolean): number | undefined;
32
+ /** The Macintosh style a letter spacing is written as, or `undefined` for none. */
33
+ export declare function writeMacSpacing(letterSpacing: number | null | undefined): 'condense' | 'extend' | undefined;
34
+ /** The underline a `<u val>` stands for; no `val` is a single underline. */
35
+ export declare function readUnderline(val: string | null | undefined): IFont.UnderlineStyle;
36
+ /** The `<u val>` an underline is written as, or `undefined` for none. */
37
+ export declare function writeUnderline(underline: IFont.UnderlineStyle | null | undefined): string | undefined;
38
+ //# sourceMappingURL=SpreadsheetFont.d.ts.map
@@ -1,24 +1,4 @@
1
- /**
2
- * The note boxes in a sheet's VML drawing: finding them, keeping them apart from the control
3
- * shapes that share the part, reading each into what a note stores, and writing one for every
4
- * comment.
5
- *
6
- * @remarks
7
- * A note's box is a `<v:shape>` whose `<x:ClientData ObjectType="Note">` names its cell in
8
- * `<x:Row>`/`<x:Column>` (0-based), and its corners in `<x:Anchor>` as four cell/offset pairs
9
- * (left cell, left offset, top cell, top offset, right cell, right offset, bottom cell, bottom
10
- * offset). Nothing else in the VML names a note, so the cell is the join to the comment.
11
- *
12
- * The anchor alone places a box (the `style` margins are an echo Excel regenerates), and
13
- * `<x:Visible/>` alone shows it. So a shape is read into those two and the rest of its markup,
14
- * and what is left is the same for every note Excel made and never formatted. That markup is kept
15
- * only when it is not Excel's default, and the id, the anchor, the cell and the `style` echo are
16
- * written from the model.
17
- *
18
- * A form control's shape is in the same part, and is taken out of it and drawn again the same
19
- * way (`FormControls.ts`). The difference is the id: nothing refers to a note's, so it is minted
20
- * on write, while a `<control shapeId>` names its shape's and has to keep it.
21
- */
1
+ import { NoteShapeStyle } from './VmlNoteStyle';
22
2
  /** A note shape as read: its markup and the cell it was on. */
23
3
  export interface NoteShape {
24
4
  xml: string;
@@ -33,13 +13,26 @@ export interface NoteShapeBox {
33
13
  * The eight numbers of `<x:Anchor>`, or `null` when the shape has none that can be read.
34
14
  */
35
15
  anchor: number[] | null;
16
+ /**
17
+ * Where the `style` puts the box, in pixels from the sheet's top-left, when the shape has no
18
+ * anchor. Excel places such a box by its `style` alone: `margin-left` / `margin-top` and
19
+ * `width` / `height`, with no margin meaning 0 and no size meaning VML's 750pt.
20
+ */
21
+ bounds: {
22
+ x: number;
23
+ y: number;
24
+ width: number;
25
+ height: number;
26
+ } | null;
36
27
  /** Whether the shape has `<x:Visible/>`: the box stays on the sheet. */
37
28
  visible: boolean;
38
29
  /** The shape's alternative text. */
39
30
  alt: string | null;
31
+ /** The box's fill and line, where they are not Excel's default. */
32
+ style: NoteShapeStyle;
40
33
  /**
41
- * The shape without its id, position, cell or alternative text, or `null` when that is
42
- * Excel's default shape.
34
+ * The shape without its id, position, cell, alternative text, fill or line, or `null` when
35
+ * that is Excel's default shape.
43
36
  */
44
37
  xml: string | null;
45
38
  }
@@ -0,0 +1,44 @@
1
+ import { IColor, IFill, IStroke } from '@sheetxl/sdk';
2
+ /**
3
+ * A note box's fill and line: the VML of the note's `<v:shape>` and the model's
4
+ * {@link IFill.JSON} / {@link IStroke.JSON}, both ways.
5
+ *
6
+ * @remarks
7
+ * Probed with hidden COM (2026-10-20, `comments-probes/probe-note-format.ps1`). Excel writes the
8
+ * fill as `fillcolor` on the shape with its transparency as `<v:fill opacity>`, and no fill as
9
+ * `filled="f"` (the color left where it was). The line is `strokecolor`, `strokeweight` and
10
+ * `stroked="f"` on the shape, with the dash and the compound on `<v:stroke dashstyle linestyle>`.
11
+ * A color is a CSS color (`red`, `#cfc`), or a name and a palette index (`infoBackground [80]`);
12
+ * Excel refuses a theme color here, so one is written as the color it resolves to.
13
+ *
14
+ * A named VML dash draws the same lengths as the DrawingML preset it is mapped to (`shortdash`
15
+ * is `sysDash`, `3 1`), so a note draws the dash VML draws. Excel's own pairing through COM is
16
+ * not by length and is not followed.
17
+ *
18
+ * Only a solid fill is modeled. A gradient, pattern or picture fill (`<v:fill type>`) is left in
19
+ * the markup as it was read, and the box draws Excel's default fill.
20
+ */
21
+ /** A note box's fill and line, as the model states them. */
22
+ export interface NoteShapeStyle {
23
+ fill?: IFill.JSON;
24
+ stroke?: IStroke.JSON;
25
+ }
26
+ /**
27
+ * Reads a note shape's fill and line into the model's, and the markup with them restored to
28
+ * Excel's default, so the rest can be told apart from a shape that was never formatted.
29
+ *
30
+ * @param markup A normalized note shape.
31
+ */
32
+ export declare function readNoteStyle(markup: string): {
33
+ style: NoteShapeStyle;
34
+ markup: string;
35
+ };
36
+ /**
37
+ * A note shape with the model's fill and line written onto it: the inverse of
38
+ * {@link readNoteStyle}.
39
+ *
40
+ * @param markup A normalized note shape: what a note stored, or Excel's default.
41
+ * @param resolve Resolves a model color, a theme color included.
42
+ */
43
+ export declare function writeNoteStyle(markup: string, style: NoteShapeStyle, resolve: (color: string) => IColor): string;
44
+ //# sourceMappingURL=VmlNoteStyle.d.ts.map
@@ -0,0 +1,24 @@
1
+ /**
2
+ * A VML part's namespace prefixes brought to the ones Excel writes: `v`, `o` and `x`.
3
+ *
4
+ * @remarks
5
+ * Everything that reads a VML part (`VmlNoteShapes.ts`, `FormControls.ts`) matches it as text, by
6
+ * those three prefixes, because the part is not reliably XML: Excel's own leaves `<br>` unclosed
7
+ * inside a note's text box. A prefix is only a name for a namespace, though, and other writers pick
8
+ * their own. openpyxl serializes through ElementTree without registering any, so its note shapes
9
+ * arrive as `<ns0:shape xmlns:ns0="urn:schemas-microsoft-com:vml">`, with `ns0` naming a different
10
+ * namespace on the next element. Unrecognized, such a shape is carried through as foreign markup and
11
+ * no longer matches its note once a structural edit moves the note.
12
+ *
13
+ * So the part is rewritten once on read: each element and attribute prefix bound to one of the three
14
+ * namespaces takes the canonical name, the declarations that bound it are dropped, and the root
15
+ * declares the canonical three. Only declaring elements open a scope, so an unclosed tag cannot throw
16
+ * the bookkeeping off. A part that already uses the canonical prefixes comes back unchanged.
17
+ */
18
+ /**
19
+ * The part with every prefix bound to the VML, Office or Excel namespace renamed to `v`, `o` or
20
+ * `x`. Returned as given when there is nothing to rename, or when a canonical prefix is bound to a
21
+ * different namespace somewhere in it (renaming would then merge two namespaces).
22
+ */
23
+ export declare function canonicalizeVmlPrefixes(xml: string): string;
24
+ //# sourceMappingURL=VmlPrefixes.d.ts.map
@@ -67,6 +67,8 @@ export declare class PackageBuilder<Out> {
67
67
  private _sourcePackage;
68
68
  /** See {@link PackageBuilderOptions.macroEnabled}. */
69
69
  private _macroEnabled;
70
+ /** See {@link PackageBuilderOptions.template}. */
71
+ private _template;
70
72
  private _explicitRelTargets;
71
73
  private _mapState;
72
74
  constructor(zip: IZipBackend<Out>, registry: EmitterRegistry, options?: PackageBuilderOptions);
@@ -314,6 +314,13 @@ export interface PackageBuilderOptions {
314
314
  * a source's VBA project, matching Excel's own *Save As*.
315
315
  */
316
316
  macroEnabled?: boolean;
317
+ /**
318
+ * Whether the package being built is a template (`.xltx`/`.xltm`). Only the `xl/workbook.xml`
319
+ * content-type variant follows from it.
320
+ *
321
+ * @defaultValue false
322
+ */
323
+ template?: boolean;
317
324
  /**
318
325
  * Callback invoked when a part is emitted.
319
326
  *
@@ -1,4 +1,4 @@
1
- import { IComment, ISheet, IStyledFont, ITheme } from '@sheetxl/sdk';
1
+ import { IComment, IWorksheet, IFontStyle, ITheme } from '@sheetxl/sdk';
2
2
  import { Emitter, EmitContext, IXmlWriter } from '../builder';
3
3
  export declare const REL_TYPE_COMMENTS = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments";
4
4
  export declare const REL_TYPE_THREADED_COMMENTS = "http://schemas.microsoft.com/office/2017/10/relationships/threadedComment";
@@ -16,7 +16,7 @@ export interface CommentHandle {
16
16
  }
17
17
  /** What the worksheet emitter schedules: the sheet's comments, roots only, in reading order. */
18
18
  export interface CommentsPartHandle {
19
- sheet: ISheet;
19
+ sheet: IWorksheet;
20
20
  comments: CommentHandle[];
21
21
  }
22
22
  /**
@@ -46,7 +46,7 @@ export declare function writeRichText(xml: IXmlWriter, content: IComment.Content
46
46
  * A run's `<rPr>`, in the order Excel writes it. Only what the run sets is written, and a property
47
47
  * set off (`weight: 400`) is written off, since it overrides whatever the run would inherit.
48
48
  */
49
- export declare function writeRunProperties(xml: IXmlWriter, font: IStyledFont.JSON, theme: ITheme): void;
49
+ export declare function writeRunProperties(xml: IXmlWriter, font: IFontStyle.JSON, theme: ITheme): void;
50
50
  /**
51
51
  * The cell address of a comment, or `null` when its cell is gone.
52
52
  */
@@ -1,4 +1,4 @@
1
- import { IResourceCollection, IMovable, ISheet } from '@sheetxl/sdk';
1
+ import { IResourceCollection, IMovable, IWorksheet } from '@sheetxl/sdk';
2
2
  import { Emitter, EmitContext } from '../builder';
3
3
  export declare class DrawingEmitter extends Emitter<ModelHandle> {
4
4
  constructor();
@@ -6,7 +6,7 @@ export declare class DrawingEmitter extends Emitter<ModelHandle> {
6
6
  emit(handle: ModelHandle, ctx: EmitContext): Promise<void>;
7
7
  }
8
8
  type ModelHandle = {
9
- sheet: ISheet;
9
+ sheet: IWorksheet;
10
10
  movables?: IMovable[];
11
11
  jsonMovables?: IMovable.JSON[];
12
12
  resources: IResourceCollection;
@@ -0,0 +1,18 @@
1
+ import { Emitter, EmitContext } from '../builder';
2
+ import { CellControlComplements } from '../utils/CellControlComplements';
3
+ /**
4
+ * Writes `xl/featurePropertyBag/featurePropertyBag.xml`: the controls the cell xfs' `xfComplement`
5
+ * indices stand for.
6
+ *
7
+ * @remarks
8
+ * The chain Excel writes for a checkbox (measured 2026-10-27, `checkbox.xlsx`), bags referenced by
9
+ * position: the control bag, an `XFControls` bag naming it as `CellControl`, an `XFComplement` bag
10
+ * naming that, and last one `XFComplements` bag whose `MappedFeaturePropertyBags` array lists the
11
+ * `XFComplement` bags. An xf's `xfComplement i` indexes that array, not the bags.
12
+ */
13
+ export declare class FeaturePropertyBagEmitter extends Emitter<CellControlComplements> {
14
+ constructor();
15
+ /** @inheritdoc IEmitter.emit */
16
+ emit(controlComplements: CellControlComplements, ctx: EmitContext): void;
17
+ }
18
+ //# sourceMappingURL=FeaturePropertyBagEmitter.d.ts.map
@@ -1,7 +1,7 @@
1
- import { ISheet } from '@sheetxl/sdk';
1
+ import { IWorksheet } from '@sheetxl/sdk';
2
2
  import { Emitter, EmitContext } from '../builder';
3
3
  /**
4
- * Writes a sheet's legacy drawing ({@link ISheet.JSON.legacyDrawing}) back out as the VML part it
4
+ * Writes a sheet's legacy drawing ({@link IWorksheet.JSON.legacyDrawing}) back out as the VML part it
5
5
  * was read from.
6
6
  *
7
7
  * @remarks
@@ -10,9 +10,9 @@ import { Emitter, EmitContext } from '../builder';
10
10
  * Its images do have models, and are written from those: the part carries the relationship ids the
11
11
  * markup cites, so an image lands back under the id its `<v:imagedata>` names.
12
12
  */
13
- export declare class LegacyDrawingEmitter extends Emitter<ISheet.LegacyDrawingJSON> {
13
+ export declare class LegacyDrawingEmitter extends Emitter<IWorksheet.LegacyDrawingJSON> {
14
14
  constructor();
15
15
  /** @inheritdoc IEmitter.emit */
16
- emit(legacyDrawing: ISheet.LegacyDrawingJSON, ctx: EmitContext): Promise<void>;
16
+ emit(legacyDrawing: IWorksheet.LegacyDrawingJSON, ctx: EmitContext): Promise<void>;
17
17
  }
18
18
  //# sourceMappingURL=LegacyDrawingEmitter.d.ts.map
@@ -1,7 +1,12 @@
1
+ import { IWorkbook } from '@sheetxl/sdk';
1
2
  import { Emitter, EmitContext } from '../builder';
2
- export declare class PropsCoreEmitter extends Emitter<Map<any, string>> {
3
+ export declare class PropsCoreEmitter extends Emitter<ModelHandle> {
3
4
  constructor();
4
5
  /** @inheritdoc IEmitter.emit */
5
- emit(props: Map<any, string>, ctx: EmitContext): Promise<void>;
6
+ emit(handle: ModelHandle, ctx: EmitContext): Promise<void>;
6
7
  }
8
+ type ModelHandle = {
9
+ model: IWorkbook;
10
+ };
11
+ export {};
7
12
  //# sourceMappingURL=PropsCoreEmitter.d.ts.map
@@ -0,0 +1,15 @@
1
+ import { IWorkbook } from '@sheetxl/sdk';
2
+ import { Emitter, EmitContext } from '../builder';
3
+ /**
4
+ * `docProps/custom.xml`: the workbook's custom document properties. Added only when there are some.
5
+ */
6
+ export declare class PropsCustomEmitter extends Emitter<ModelHandle> {
7
+ constructor();
8
+ /** @inheritdoc IEmitter.emit */
9
+ emit(handle: ModelHandle, ctx: EmitContext): Promise<void>;
10
+ }
11
+ type ModelHandle = {
12
+ model: IWorkbook;
13
+ };
14
+ export {};
15
+ //# sourceMappingURL=PropsCustomEmitter.d.ts.map
@@ -0,0 +1,36 @@
1
+ import { Emitter, EmitContext } from '../builder';
2
+ import { RichValueCollector } from '../utils/RichValueCollector';
3
+ /**
4
+ * Emits `rdarray.xml`: the arrays rich values hold (`_array`), each `<a r>` its items row major.
5
+ */
6
+ export declare class RichValueArrayEmitter extends Emitter<RichValueCollector> {
7
+ constructor();
8
+ /** @inheritdoc IEmitter.emit */
9
+ emit(rvCollector: RichValueCollector, ctx: EmitContext): Promise<void>;
10
+ }
11
+ /**
12
+ * Emits `rdsupportingpropertybagstructure.xml`: one `<s>` per supporting property bag structure.
13
+ */
14
+ export declare class RichValueBagStructureEmitter extends Emitter<RichValueCollector> {
15
+ constructor();
16
+ /** @inheritdoc IEmitter.emit */
17
+ emit(rvCollector: RichValueCollector, ctx: EmitContext): Promise<void>;
18
+ }
19
+ /**
20
+ * Emits `rdsupportingpropertybag.xml`: the bag arrays (`spbArrays`) and the bags (`spbData`).
21
+ */
22
+ export declare class RichValueBagEmitter extends Emitter<RichValueCollector> {
23
+ constructor();
24
+ /** @inheritdoc IEmitter.emit */
25
+ emit(rvCollector: RichValueCollector, ctx: EmitContext): Promise<void>;
26
+ }
27
+ /**
28
+ * Emits `richStyles.xml`: the styles a `_Format` bag names by 1-based index, each its number
29
+ * format and its card role (`IsTitleField`, `IsHeroField`).
30
+ */
31
+ export declare class RichValueStylesEmitter extends Emitter<RichValueCollector> {
32
+ constructor();
33
+ /** @inheritdoc IEmitter.emit */
34
+ emit(rvCollector: RichValueCollector, ctx: EmitContext): Promise<void>;
35
+ }
36
+ //# sourceMappingURL=RichValuePartsEmitters.d.ts.map
@@ -0,0 +1,12 @@
1
+ import { IResource } from '@sheetxl/sdk';
2
+ import { Emitter, EmitContext } from '../builder';
3
+ /**
4
+ * Emits `richValueRel.xml`: for each picture a `_localImage` value names, a relationship to its
5
+ * media part, in `_rvRel:LocalImageIdentifier` order.
6
+ */
7
+ export declare class RichValueRelEmitter extends Emitter<readonly IResource[]> {
8
+ constructor();
9
+ /** @inheritdoc IEmitter.emit */
10
+ emit(resources: readonly IResource[], ctx: EmitContext): Promise<void>;
11
+ }
12
+ //# sourceMappingURL=RichValueRelEmitter.d.ts.map
@@ -1,8 +1,9 @@
1
1
  import { Emitter, EmitContext } from '../builder';
2
- import { RichValueCollector, RichPrimitiveType } from '../utils/RichValueCollector';
2
+ import { RichPrimitiveType } from '../../richValue';
3
+ import { RichValueCollector } from '../utils/RichValueCollector';
3
4
  /**
4
- * Emits `rdrichvaluestructure.xml` — one `<s>` element per unique handler
5
- * type registered in the {@link RichValueCollector}.
5
+ * Emits `rdrichvaluestructure.xml` — one `<s>` element per structure written
6
+ * in the {@link RichValueCollector}.
6
7
  *
7
8
  * @remarks
8
9
  * Example output for a workbook that only has extended-error rich values:
@@ -1,10 +1,11 @@
1
1
  import { Emitter, EmitContext } from '../builder';
2
+ import { RichValueCollector } from '../utils/RichValueCollector';
2
3
  /**
3
4
  * Emits Rich Values
4
5
  */
5
- export declare class RichValueTypesEmitter extends Emitter<Map<any, string>> {
6
+ export declare class RichValueTypesEmitter extends Emitter<RichValueCollector | null> {
6
7
  constructor();
7
8
  /** @inheritdoc IEmitter.emit */
8
- emit(_params: any, ctx: EmitContext): Promise<void>;
9
+ emit(rvCollector: RichValueCollector | null, ctx: EmitContext): Promise<void>;
9
10
  }
10
11
  //# sourceMappingURL=RichValueTypesEmitter.d.ts.map