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

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 (82) hide show
  1. package/browser/esm/{Bs0EzhdU8WgGfPzf.mjs → 20e8E-6B9lZDdDO3.mjs} +2 -2
  2. package/browser/esm/{DICL6ecj9BdJv8aX.mjs → B4_m1DDdERBw_oc_.mjs} +4 -4
  3. package/browser/esm/{CuAXx5i4uqTz-mMY.mjs → B8HGBRlYw3gtV6cS.mjs} +1 -1
  4. package/browser/esm/{CzFYJPxmLyKgEKF0.mjs → BUnVDknxJ3z7Byym.mjs} +2 -2
  5. package/browser/esm/{yveeVJ6hKDI5KDEz.mjs → BZULU4MreyJ0WsDY.mjs} +1243 -1083
  6. package/browser/esm/{Cv3R6fGatARKedSn.mjs → BduVw3dFdh9sSGv_.mjs} +2560 -2120
  7. package/browser/esm/CM4k1dv3DNPThvDz.mjs +24 -0
  8. package/browser/esm/{CZ9I80og75SDRjv0.mjs → CkEGcTzeyh7cqVVb.mjs} +2 -2
  9. package/browser/esm/{BiDqExNXiY7ykk8E.mjs → DmW0VCJFl3eX7pBV.mjs} +199 -198
  10. package/browser/esm/{DatIA9fZbEPjW4bh.mjs → eFR-PmxEV53J-933.mjs} +1782 -1266
  11. package/browser/esm/index.mjs +2 -2
  12. package/browser/esm/{CLWsOc6DO8l1G_LF.mjs → khCH6SyDFBiHzmSl.mjs} +816 -764
  13. package/node/esm/BqB-dnUZaszNS--K.mjs +6367 -0
  14. package/node/esm/{Bpqm_PpGLpdjL47-.mjs → ByC9KtkF09muIv1I.mjs} +257 -256
  15. package/node/esm/{CAJxmJdobUbzpUz5.mjs → CHElwgFJ32Hh_gHU.mjs} +2 -2
  16. package/node/esm/{fopiRR7OiVoEiF7B.mjs → CIpg0EBGoVM58ajd.mjs} +2 -2
  17. package/node/esm/{DScqM1V4wPntNP6-.mjs → CJt_Kh2EU8DlMcus.mjs} +2046 -1588
  18. package/node/esm/{B9Zn6H1RV07Ob377.mjs → COzTSkHGuyKdKaxO.mjs} +512 -460
  19. package/node/esm/{ipiyzn5Pfohw2afB.mjs → Cc4XXs0Y2lL-2Et9.mjs} +1350 -1184
  20. package/node/esm/{CxlSbH7mmnEEsqmX.mjs → DmvVllQAwUtHEJbX.mjs} +1 -1
  21. package/node/esm/index.mjs +4 -4
  22. package/package.json +3 -3
  23. package/types/src/AutoFilterRules.d.ts +0 -42
  24. package/types/src/DataTableFormula.d.ts +26 -0
  25. package/types/src/DataValidationRules.d.ts +0 -5
  26. package/types/src/ExcelCalcStamp.d.ts +0 -36
  27. package/types/src/ExcelCompat.d.ts +0 -140
  28. package/types/src/ExcelFunctionFacts.d.ts +0 -272
  29. package/types/src/ExcelReservedNames.d.ts +0 -64
  30. package/types/src/KnownFonts.d.ts +0 -13
  31. package/types/src/LegacyFormula.d.ts +0 -58
  32. package/types/src/Plugin.d.ts +3 -3
  33. package/types/src/SheetKinds.d.ts +0 -15
  34. package/types/src/SourcePackage.d.ts +0 -44
  35. package/types/src/Types.d.ts +2 -3
  36. package/types/src/chart/ChartSpaceXml.d.ts +2 -1
  37. package/types/src/chart/_chartCodecs.d.ts +2 -0
  38. package/types/src/chart/_chartExStyle.d.ts +0 -9
  39. package/types/src/reader/CellControls.d.ts +18 -0
  40. package/types/src/reader/DummyFunctionUnwrap.d.ts +43 -23
  41. package/types/src/reader/LibreOfficeDataTable.d.ts +3 -2
  42. package/types/src/reader/domVisitors/AutoFilterVisitor.d.ts +0 -8
  43. package/types/src/reader/domVisitors/ExternalLinkVisitor.d.ts +1 -11
  44. package/types/src/reader/domVisitors/FeaturePropertyBagVisitor.d.ts +18 -0
  45. package/types/src/reader/domVisitors/FmtSchemeVisitor.d.ts +0 -11
  46. package/types/src/reader/domVisitors/SheetStyleVisitor.d.ts +6 -0
  47. package/types/src/reader/domVisitors/WorkbookVisitor.d.ts +0 -9
  48. package/types/src/reader/domVisitors/index.d.ts +2 -4
  49. package/types/src/reader/saxVisitors/ContentTypesVisitor.d.ts +1 -0
  50. package/types/src/reader/saxVisitors/SharedStringsVisitor.d.ts +0 -15
  51. package/types/src/reader/saxVisitors/WorksheetVisitor.d.ts +16 -3
  52. package/types/src/richValue/ErrorRichValueHandler.d.ts +22 -0
  53. package/types/src/richValue/IRichValueHandler.d.ts +109 -0
  54. package/types/src/richValue/LocalImageRichValueHandler.d.ts +18 -0
  55. package/types/src/richValue/RichDataParts.d.ts +69 -0
  56. package/types/src/richValue/RichRecordWriter.d.ts +61 -0
  57. package/types/src/richValue/RichValueHandlers.d.ts +25 -0
  58. package/types/src/richValue/RichValueResolver.d.ts +54 -0
  59. package/types/src/richValue/WebImageRichValueHandler.d.ts +37 -0
  60. package/types/src/richValue/index.d.ts +7 -0
  61. package/types/src/utils/VmlNoteStyle.d.ts +0 -19
  62. package/types/src/vba/VBAProject.d.ts +0 -19
  63. package/types/src/writer/builder/OpcXmlUtils.d.ts +0 -8
  64. package/types/src/writer/builder/PackageBuilder.d.ts +0 -41
  65. package/types/src/writer/builder/Types.d.ts +0 -30
  66. package/types/src/writer/emitters/ExternalLinkEmitter.d.ts +0 -11
  67. package/types/src/writer/emitters/FeaturePropertyBagEmitter.d.ts +8 -0
  68. package/types/src/writer/emitters/RichValuePartsEmitters.d.ts +36 -0
  69. package/types/src/writer/emitters/RichValueRelEmitter.d.ts +12 -0
  70. package/types/src/writer/emitters/RichValueStructureEmitter.d.ts +4 -3
  71. package/types/src/writer/emitters/RichValueTypesEmitter.d.ts +3 -2
  72. package/types/src/writer/emitters/RichValueWebImageEmitter.d.ts +24 -0
  73. package/types/src/writer/emitters/SlicerEmitter.d.ts +5 -2
  74. package/types/src/writer/emitters/StylesEmitter.d.ts +2 -0
  75. package/types/src/writer/utils/CellControlComplements.d.ts +29 -0
  76. package/types/src/writer/utils/DefaultRows.d.ts +0 -16
  77. package/types/src/writer/utils/DummyFunction.d.ts +0 -23
  78. package/types/src/writer/utils/RichValueCollector.d.ts +81 -129
  79. package/types/src/writer/utils/SheetStyleLayout.d.ts +18 -5
  80. package/node/esm/DD-yXSBzvDYy0TX5.mjs +0 -5842
  81. package/types/src/reader/domVisitors/RichValueDataVisitor.d.ts +0 -7
  82. package/types/src/reader/domVisitors/RichValueStructureVisitor.d.ts +0 -6
@@ -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,37 @@
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
+ export declare const calcOriginOf: (formula: string | null) => number;
23
+ /**
24
+ * Excel's `_webimage` structure: a picture as a cell value (`IMAGE`), read as and written from an
25
+ * `image` value.
26
+ *
27
+ * @remarks
28
+ * The structure names its picture by position in rdRichValueWebImage.xml, which holds the source
29
+ * URL (`address`, an external hyperlink) and the picture Excel kept for it (`blip`, a media part).
30
+ * Reading adds each picture to the workbook as the resource its values hold; writing takes the
31
+ * bytes from the value's resource, else the workbook's fetch. Alt text, height and width have no
32
+ * key: Excel's file for them is unprobed.
33
+ *
34
+ * @internal
35
+ */
36
+ export declare const WebImageRichValueHandler: IRichValueHandler;
37
+ //# 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
@@ -1,23 +1,4 @@
1
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
2
  /** A note box's fill and line, as the model states them. */
22
3
  export interface NoteShapeStyle {
23
4
  fill?: IFill.JSON;
@@ -45,25 +45,6 @@ export declare namespace VBAProject {
45
45
  codePage: number;
46
46
  modules: Module[];
47
47
  }
48
- /**
49
- * Extract all VBA modules, with their source, from a raw `xl/vbaProject.bin`.
50
- *
51
- * The `dir` stream is a flat sequence of `Id(2) Size(4) Data(Size)` records,
52
- * **with one exception**: `PROJECTVERSION` (0x0009) stores a fixed reserved value
53
- * `4` in the size slot but is followed by 6 bytes (VersionMajor + VersionMinor).
54
- * Treating its size as a skip length misaligns everything after it — which is why
55
- * a naive walk never finds the module records.
56
- *
57
- * @param vbaProjectBin The bytes of the `xl/vbaProject.bin` part.
58
- * @returns The parsed project, or `null` if the bytes are not a compound file.
59
- *
60
- * @remarks
61
- * Deliberately eager. A lazy variant existed briefly, deferring each module's stream until
62
- * someone read it; measured on the corpus it saved **7µs** — the cost is the compound-file walk
63
- * and the `dir` decompress, which happen either way, and the per-module streams are noise beside
64
- * them. What it cost was a module JSON whose properties existed before their values did, which
65
- * is not a trade worth making for microseconds.
66
- */
67
48
  const extract: (vbaProjectBin: Uint8Array | ArrayBuffer) => Project | null;
68
49
  /** A module's source, separated into the part VBA hides and the part it shows. */
69
50
  interface Source {
@@ -1,11 +1,3 @@
1
- /**
2
- * Minimal, dependency-free parsing for the two flat OPC manifest formats the writer needs to read
3
- * back from a retained source package: `[Content_Types].xml` and `*.rels`. Both are, per spec, a
4
- * single level of self-closing elements with only attributes — no text content, no nesting beyond
5
- * the root — so an attribute-order-independent regex parser is enough, and it keeps the writer from
6
- * needing a DOM parser (it otherwise only ever produces XML, never parses it). See
7
- * `DESIGN-PACKAGE-PASSTHROUGH.md` §6.
8
- */
9
1
  export declare function decodeXmlEntities(s: string): string;
10
2
  export interface SourceContentTypes {
11
3
  readonly defaults: readonly {
@@ -72,17 +72,6 @@ export declare class PackageBuilder<Out> {
72
72
  private _explicitRelTargets;
73
73
  private _mapState;
74
74
  constructor(zip: IZipBackend<Out>, registry: EmitterRegistry, options?: PackageBuilderOptions);
75
- /**
76
- * Whether a source part named `name` will be in this package once {@link _passthroughSourceParts}
77
- * has run — the drop rules of `DESIGN-PACKAGE-PASSTHROUGH.md` §4, as one predicate. `false` when
78
- * there is no source package or it has no such part.
79
- *
80
- * @remarks
81
- * Does not consider whether an emitter claimed the *path* — that part is then in the package, but
82
- * as the emitter's, not the source's. It does consider whether the reader took the part onto the
83
- * model ({@link ISourcePackage.isAbsorbed}), which is a different question: the model writes that
84
- * part wherever its own numbering puts it, which need not be where the source had it.
85
- */
86
75
  private _isSourcePartCarried;
87
76
  /**
88
77
  * Hold the source's own relationship ids back in `partPath`'s set, before the emitter rewriting
@@ -102,15 +91,6 @@ export declare class PackageBuilder<Out> {
102
91
  * @returns The resulting package as a Uint8Array.
103
92
  */
104
93
  build(options?: ZipBackendCloseOptions): Promise<Uint8Array>;
105
- /**
106
- * Copy through every source-package part no emitter claimed, once emission is complete and
107
- * {@link _writtenPaths} is final. See `DESIGN-PACKAGE-PASSTHROUGH.md` §4 (bucket rules) and §6
108
- * (the rels/content-types merge).
109
- *
110
- * @remarks
111
- * No re-fetch, no residue map: this only ever reads the bytes handed in via
112
- * {@link PackageBuilderOptions.sourcePackage} — see the design doc's non-goals (§7).
113
- */
114
94
  private _passthroughSourceParts;
115
95
  /**
116
96
  * Declare the workbook part's macro-enabled **variant** of `CT_Workbook` when the package being
@@ -138,27 +118,6 @@ export declare class PackageBuilder<Out> {
138
118
  * would let a stale declaration through on anything.
139
119
  */
140
120
  private _applyWorkbookContentTypeVariant;
141
- /**
142
- * Seed `sourcePart`'s {@link IRelationshipSet} with the source's edges, each under the source's
143
- * own id. Targets are carried forward as-is (still relative to the same referencing part, at the
144
- * same OPC path) — nothing to recompute.
145
- *
146
- * @remarks
147
- * Which edges come back depends on who wrote the part (`DESIGN-PACKAGE-PASSTHROUGH.md` §6):
148
- *
149
- * - A **preserved** part is the source's bytes, so its XML still cites the ids the source's
150
- * `.rels` defined; every edge whose target is still in the package comes back with that id.
151
- * Nothing else ever wrote into this set, so the ids are free.
152
- * - A **rewritten** part (the root, or one an emitter claimed) had its emitter recreate the edges
153
- * it cites, so only what the emitter did not recreate is added: not an edge whose target an
154
- * emitter claimed (its own, correct edge exists already — keeping both would duplicate it), not
155
- * one added by name through `addRelationship`. The set had the source's ids reserved before
156
- * the emitter allocated ({@link _reserveSourceRelIds}), so these too keep their names —
157
- * unless an emitter took the id as a hint for a different target, in which case it is fresh.
158
- *
159
- * An edge whose target did not survive at all is dropped either way (§5). A `TargetMode="External"`
160
- * or `#`-fragment target is not a part and is never resolved as one.
161
- */
162
121
  private _mergeSourceRelsInto;
163
122
  /**
164
123
  * Add a root part to the package.
@@ -161,25 +161,6 @@ export interface EmitContext {
161
161
  * @returns The rId of the added relationship.
162
162
  */
163
163
  addExternal(relTypeUri: string, targetUrl: string, idHint?: string): PackagePart;
164
- /**
165
- * Adds a relationship from the current part to a part that is already going to be in this
166
- * package, rather than creating one: either a part another emitter wrote — one that is shared,
167
- * written once by whoever owns it and referenced from each part that uses it (a pivot cache,
168
- * written by the workbook, from every pivot table on it) — or a part the source package carries
169
- * through untouched because nothing modeled it (a `<ddeLink>` external link).
170
- *
171
- * @param relTypeUri The relationship type URI.
172
- * @param targetPartPath The target's absolute path (relative to the package root, no leading `/`).
173
- * @param idHint A preferred id (e.g. the source's own original rId), honored only if free in this
174
- * part's set; it falls back silently to an auto-generated id otherwise, so a caller that needs the
175
- * id to line up with something it already wrote (a replayed fragment citing this target) must use
176
- * the returned value rather than assume the hint was honored.
177
- * @returns The id assigned, or `null` if the target will not be in the package — no emitter
178
- * claimed the path and no source part survives at it (there is no source package, it has no such
179
- * part, the model absorbed it, or it is in a drop bucket for this save; see
180
- * `DESIGN-PACKAGE-PASSTHROUGH.md` §4). Nothing was added in that case: the caller must not write
181
- * the element that would have cited it.
182
- */
183
164
  addRelationship(relTypeUri: string, targetPartPath: string, idHint?: string): string | null;
184
165
  /**
185
166
  * Waits for all dependants to be emitted.
@@ -296,11 +277,6 @@ export interface PackageBuilderOptions {
296
277
  * A map that can be used across emitters to share state.
297
278
  */
298
279
  mapState?: Map<string, any>;
299
- /**
300
- * The source package to seed the build from, if the destination is being saved back into the same
301
- * OOXML package family it was read from. Parts no emitter claims are copied through verbatim
302
- * instead of being dropped. See `DESIGN-PACKAGE-PASSTHROUGH.md`.
303
- */
304
280
  sourcePackage?: ISourcePackage | null;
305
281
  /**
306
282
  * Whether the package being built is macro-enabled (`.xlsm`) rather than plain (`.xlsx`).
@@ -361,12 +337,6 @@ export interface ISourcePackagePart {
361
337
  readonly uncompressedSize: number;
362
338
  readonly raw?: ISourcePackageRawPart;
363
339
  }
364
- /**
365
- * Structural interface for a retained source package, seeded into {@link PackageBuilder} so an
366
- * xlsx→xlsx round trip can copy through the parts nothing modeled instead of dropping them. Kept
367
- * structural (not importing `../SourcePackage` directly) so `builder/` stays format-agnostic — see
368
- * `DESIGN-PACKAGE-PASSTHROUGH.md` §6.
369
- */
370
340
  export interface ISourcePackage {
371
341
  getNames(): string[];
372
342
  has(name: string): boolean;
@@ -1,16 +1,5 @@
1
1
  import { IExternalBook } from '@sheetxl/sdk';
2
2
  import { Emitter, EmitContext } from '../builder';
3
- /**
4
- * Emits one `xl/externalLinks/externalLinkN.xml` — the cached snapshot of another workbook that
5
- * `[n]` in a formula addresses. See `DESIGN-EXTERNAL-LINKS.md` §5 phase A.
6
- *
7
- * @remarks
8
- * The part is scheduled by `WorkbookEmitter`, which owns the `[n]` order and therefore the path
9
- * numbering; this emitter only writes what one {@link IExternalBook.JSON} says.
10
- *
11
- * DDE and OLE links never reach here — they are not modeled at all, and their bytes are carried
12
- * through the package instead (design doc §2.1).
13
- */
14
3
  export declare class ExternalLinkEmitter extends Emitter<IExternalBook.JSON> {
15
4
  constructor();
16
5
  /** @inheritdoc IEmitter.emit */
@@ -0,0 +1,8 @@
1
+ import { Emitter, EmitContext } from '../builder';
2
+ import { CellControlComplements } from '../utils/CellControlComplements';
3
+ export declare class FeaturePropertyBagEmitter extends Emitter<CellControlComplements> {
4
+ constructor();
5
+ /** @inheritdoc IEmitter.emit */
6
+ emit(controlComplements: CellControlComplements, ctx: EmitContext): void;
7
+ }
8
+ //# sourceMappingURL=FeaturePropertyBagEmitter.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
@@ -0,0 +1,24 @@
1
+ import { IWorkbook } from '@sheetxl/sdk';
2
+ import { WrittenWebImage } from '../../richValue/WebImageRichValueHandler';
3
+ import { Emitter, EmitContext } from '../builder';
4
+ /** What {@link RichValueWebImageEmitter} writes: the pictures, and the workbook to fetch any without bytes through. */
5
+ export interface RichValueWebImages {
6
+ /** The pictures, in `WebImageIdentifier` order. */
7
+ images: readonly WrittenWebImage[];
8
+ workbook: IWorkbook;
9
+ }
10
+ /**
11
+ * Emits `rdRichValueWebImage.xml`: for each picture a `_webimage` value names, its source URL
12
+ * (`address`, an external hyperlink) and the picture itself (`blip`, a media part), as Excel keeps
13
+ * an `IMAGE`'s picture in the file.
14
+ *
15
+ * @remarks
16
+ * The picture is the value's resource; a value with none is fetched through the workbook, and a
17
+ * source with no picture to give is written with its address alone.
18
+ */
19
+ export declare class RichValueWebImageEmitter extends Emitter<RichValueWebImages> {
20
+ constructor();
21
+ /** @inheritdoc IEmitter.emit */
22
+ emit(webImages: RichValueWebImages, ctx: EmitContext): Promise<void>;
23
+ }
24
+ //# sourceMappingURL=RichValueWebImageEmitter.d.ts.map
@@ -44,7 +44,7 @@ export declare class SlicerCacheEmitter extends Emitter<ISlicer> {
44
44
  }
45
45
  /**
46
46
  * Schedules a cache part for every table slicer of the workbook, in sheet order and then movable
47
- * order, and returns the relationship ids the workbook cites them by.
47
+ * order, and returns the relationship ids the workbook cites them by and the caches' names.
48
48
  *
49
49
  * @remarks
50
50
  * Called by `WorkbookEmitter` **after** the sheets have been written, since a cache names its table
@@ -52,7 +52,10 @@ export declare class SlicerCacheEmitter extends Emitter<ISlicer> {
52
52
  * scheduled is left out, with its slicer element still in the sheet's part; Excel repairs that
53
53
  * rather than refuse the file.
54
54
  */
55
- export declare const writeSlicerCaches: (ctx: EmitContext, workbook: IWorkbook) => string[];
55
+ export declare const writeSlicerCaches: (ctx: EmitContext, workbook: IWorkbook) => {
56
+ relIds: string[];
57
+ cacheNames: string[];
58
+ };
56
59
  /**
57
60
  * The sheet's `x15` slicer-list ext: schedules the sheet's slicer part and cites it. Written inside
58
61
  * the worksheet's `extLst`, after the conditional formats and data validations, where Excel puts it.
@@ -8,6 +8,8 @@ export declare class StylesEmitter extends Emitter<ModelHandle> {
8
8
  /** @inheritdoc IEmitter.emit */
9
9
  emit(handle: ModelHandle, ctx: EmitContext): Promise<void>;
10
10
  }
11
+ /** The namespace of the feature property bags and the xf complement. */
12
+ export declare const NS_FEATURE_PROPERTY_BAG = "http://schemas.microsoft.com/office/spreadsheetml/2022/featurepropertybag";
11
13
  /**
12
14
  * Writes ONE differential format.
13
15
  *
@@ -0,0 +1,29 @@
1
+ import { ICellControl } from '@sheetxl/sdk';
2
+ export declare const CELL_CONTROL_COMPLEMENTS_SHARED_STATE = "cellControlComplements";
3
+ /**
4
+ * The cell controls a workbook's xfs carry.
5
+ *
6
+ * @remarks
7
+ * The model keeps a cell control apart from the cell's style (`ICellControl`); xlsx keeps it on the
8
+ * cell's xf as an `xfComplement`. So the writer's xf is a pair, a style and a control, and the two
9
+ * meet only there: the style layout mints an xf per pair, and this records which complement each xf
10
+ * carries and which control each complement stands for (what the `featurePropertyBag` part lists).
11
+ */
12
+ export declare class CellControlComplements {
13
+ private _controls;
14
+ private _xfComplements;
15
+ /**
16
+ * The complement index for `control`, or `null` when xlsx cannot carry it.
17
+ *
18
+ * @remarks
19
+ * Only Excel's checkbox has a file form; another type is dropped (the caller warns).
20
+ */
21
+ getComplement(control: ICellControl.JSON): number | null;
22
+ /** The controls the complements stand for, by complement index. */
23
+ getControls(): readonly ICellControl.JSON[];
24
+ /** Records the complement each direct xf carries, by xf index, once the layout has minted them. */
25
+ setXfComplements(complements: readonly (number | undefined)[]): void;
26
+ /** The complement direct xf `xf` carries, or `null`. */
27
+ getXfComplement(xf: number): number | null;
28
+ }
29
+ //# sourceMappingURL=CellControlComplements.d.ts.map
@@ -18,21 +18,5 @@ export interface DefaultRows {
18
18
  * no run lists, at the height they no longer get by default.
19
19
  */
20
20
  export declare const listedRowRuns: (rows: ITypes.RunCoordValue<XlsxHeader>[], defaultRun: ITypes.RunCoordValue<XlsxHeader>, unlistedHeight: number, maxRows: number) => ITypes.RunCoordValue<XlsxHeader>[];
21
- /**
22
- * How a sheet's unlisted rows are written: Excel's `sheetFormatPr` is its cache of the row height
23
- * every row shares, so the height that covers most of the sheet is written once there rather than as
24
- * a row element per row.
25
- *
26
- * @remarks
27
- * Excel computes an unlisted row's height from the Normal font plus a pixel for each `thickTop`/
28
- * `thickBottom` (`probe-sheet-thick-derive.ps1`); it moves the flags there only for a style on whole
29
- * columns, and our export promotes a style on most of a column to one, so the default takes the flags
30
- * of the run it replaces. A height those explain is written that way, so Excel keeps sizing the rows
31
- * itself; any other is written as a custom height.
32
- *
33
- * @param normalHeight The Normal font's row height, in points.
34
- * @param maxRows The sheet's row count.
35
- * @returns `null` when the rows share no height but the Normal one.
36
- */
37
21
  export declare const resolveDefaultRows: (json: XlsxWorksheetJSON, normalHeight: number, maxRows: number) => DefaultRows | null;
38
22
  //# sourceMappingURL=DefaultRows.d.ts.map
@@ -1,27 +1,4 @@
1
1
  import { Scalar, IWorkbook } from '@sheetxl/sdk';
2
- /**
3
- * Exporting a formula Excel cannot evaluate.
4
- *
5
- * Excel has no notion of "a function I do not know but should keep working". A name it does not
6
- * have evaluates to `#NAME?` and the computed value is gone — so a user's own UDF, or one of the
7
- * 29 built-ins Excel lacks, survives a save as an error and nothing else.
8
- *
9
- * Google Sheets solved this years ago and the shape is a de-facto convention, so we emit THEIR
10
- * spelling rather than inventing one — the same text is then understood by Sheets, by Grid, and by
11
- * our own reader, which needs a single unwrap path either way:
12
- *
13
- * ```
14
- * IFERROR(__xludf.DUMMYFUNCTION("ISEMAIL(""biggie"")"),FALSE)
15
- * ```
16
- *
17
- * The unknown call errors in Excel, `IFERROR` yields the literal, and the cell keeps showing the
18
- * right answer. The original formula text rides along as a string argument, which is what lets the
19
- * round trip back into SheetXL be lossless.
20
- *
21
- * The trade is real and worth stating: **the formula is dead in Excel.** It never recalculates, so
22
- * editing a precedent leaves a stale value with no visual cue. That is Google's trade too; the
23
- * alternative (emit bare, show `#NAME?`) loses the value instead. See CALC-ISSUES item 7.
24
- */
25
2
  /** Google's marker. Deliberately their exact spelling — see the note above. */
26
3
  export declare const DUMMY_FUNCTION = "__xludf.DUMMYFUNCTION";
27
4
  /**