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

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 (126) hide show
  1. package/browser/esm/{Ctqql4O-3xj2K8vv.mjs → 2EOdn2WRK5y1L58S.mjs} +193 -143
  2. package/browser/esm/{BkNXyG6NC-w5Xo92.mjs → B-jb5SuiVh5NnBG_.mjs} +28 -13
  3. package/browser/esm/BKT8OBj-bhQwdg49.mjs +67 -0
  4. package/browser/esm/BLXcoiDAaOMjFuhw.mjs +8056 -0
  5. package/browser/esm/BPmehfSqdvgsLBsB.mjs +5153 -0
  6. package/browser/esm/CI_CZI5m5-KkiAK5.mjs +3559 -0
  7. package/browser/esm/{Dz1Dp8DDJvhd09RR.mjs → DXopGe8PrLWmwGaV.mjs} +1 -1
  8. package/browser/esm/NQIuOQIleHC4NUW6.mjs +2446 -0
  9. package/browser/esm/index.mjs +2 -3
  10. package/browser/esm/{CLWzJJyoSrykkVLX.mjs → xc_LzCPgHn-acgFZ.mjs} +2 -2
  11. package/licenses/dependencies.txt +2 -2
  12. package/node/esm/{fOnuUjpPCAzmuIXN.mjs → BmdmvgO5Zdgx-RWo.mjs} +2 -2
  13. package/node/esm/BpxxiZ2oKPkUSfdB.mjs +2486 -0
  14. package/node/esm/{CEV7nKotMpeRRnQC.mjs → CHqRP_NjPpPd7m9L.mjs} +1 -1
  15. package/node/esm/CtAF486aZqYzMeLM.mjs +3651 -0
  16. package/node/esm/{CEAmv36xpTNgFwl_.mjs → O5mti2R9drFOlXc7.mjs} +49 -35
  17. package/node/esm/QS_theNoeqNGLStj.mjs +5298 -0
  18. package/node/esm/index.mjs +40 -25
  19. package/node/esm/nNQ7MG89sGKwkjMA.mjs +4649 -0
  20. package/package.json +7 -8
  21. package/types/src/AutoFilterRules.d.ts +86 -10
  22. package/types/src/ConditionalFormatRules.d.ts +5 -5
  23. package/types/src/DataValidationRules.d.ts +18 -2
  24. package/types/src/ExcelCalcStamp.d.ts +39 -0
  25. package/types/src/ExcelCompat.d.ts +197 -42
  26. package/types/src/ExcelReservedNames.d.ts +3 -4
  27. package/types/src/LegacyFormula.d.ts +28 -7
  28. package/types/src/OOXMLExtensions.d.ts +14 -2
  29. package/types/src/Plugin.d.ts +16 -5
  30. package/types/src/ProtectionAttributes.d.ts +38 -0
  31. package/types/src/SourcePackage.d.ts +31 -12
  32. package/types/src/Types.d.ts +17 -0
  33. package/types/src/reader/HiddenFormulas.d.ts +16 -0
  34. package/types/src/reader/SlicerJoin.d.ts +24 -0
  35. package/types/src/reader/Warning.d.ts +29 -0
  36. package/types/src/reader/ZipReader.d.ts +1 -1
  37. package/types/src/reader/_SlicerRecord.d.ts +37 -0
  38. package/types/src/reader/dom/CustGeomUtils.d.ts +7 -0
  39. package/types/src/reader/dom/DOMTransformer.d.ts +2 -2
  40. package/types/src/reader/dom/ExecutionContext.d.ts +16 -3
  41. package/types/src/reader/dom/Types.d.ts +19 -3
  42. package/types/src/reader/domVisitors/AutoFilterVisitor.d.ts +13 -0
  43. package/types/src/reader/domVisitors/ColorContainerVisitor.d.ts +15 -2
  44. package/types/src/reader/domVisitors/CommentVisitor.d.ts +24 -2
  45. package/types/src/reader/domVisitors/CommentsVisitor.d.ts +2 -2
  46. package/types/src/reader/domVisitors/DrawingCxnSpVisitor.d.ts +1 -0
  47. package/types/src/reader/domVisitors/DrawingElementVisitor.d.ts +32 -1
  48. package/types/src/reader/domVisitors/DrawingGraphicFrameVisitor.d.ts +9 -0
  49. package/types/src/reader/domVisitors/DrawingGrpSpVisitor.d.ts +14 -2
  50. package/types/src/reader/domVisitors/DrawingPicVisitor.d.ts +13 -0
  51. package/types/src/reader/domVisitors/DrawingSpVisitor.d.ts +20 -1
  52. package/types/src/reader/domVisitors/DrawingVisitor.d.ts +10 -0
  53. package/types/src/reader/domVisitors/ExternalLinkVisitor.d.ts +21 -3
  54. package/types/src/reader/domVisitors/FmtSchemeVisitor.d.ts +4 -4
  55. package/types/src/reader/domVisitors/FormControlPrVisitor.d.ts +9 -0
  56. package/types/src/reader/domVisitors/ShapeTextVisitor.d.ts +44 -0
  57. package/types/src/reader/domVisitors/SheetColorContainerVisitor.d.ts +2 -2
  58. package/types/src/reader/domVisitors/SheetStyleVisitor.d.ts +19 -6
  59. package/types/src/reader/domVisitors/SlicerCacheDefinitionVisitor.d.ts +7 -2
  60. package/types/src/reader/domVisitors/SlicersVisitor.d.ts +7 -3
  61. package/types/src/reader/domVisitors/TextPropertiesVisitor.d.ts +13 -1
  62. package/types/src/reader/domVisitors/ThreadedCommentVisitor.d.ts +18 -1
  63. package/types/src/reader/domVisitors/ThreadedCommentsVisitor.d.ts +2 -2
  64. package/types/src/reader/domVisitors/WorkbookVisitor.d.ts +11 -1
  65. package/types/src/reader/domVisitors/index.d.ts +4 -2
  66. package/types/src/reader/sax/LeanSaxParser.d.ts +58 -0
  67. package/types/src/reader/sax/SaxParser.d.ts +11 -1
  68. package/types/src/reader/sax/SaxVisitor.d.ts +3 -2
  69. package/types/src/reader/saxVisitors/ContentTypesVisitor.d.ts +9 -0
  70. package/types/src/reader/saxVisitors/WorksheetVisitor.d.ts +11 -4
  71. package/types/src/utils/DrawingMLText.d.ts +39 -0
  72. package/types/src/utils/FormControls.d.ts +170 -0
  73. package/types/src/utils/VmlNoteShapes.d.ts +135 -0
  74. package/types/src/vba/VBAProject.d.ts +52 -4
  75. package/types/src/writer/builder/ContentTypes.d.ts +13 -0
  76. package/types/src/writer/builder/Emitter.d.ts +11 -6
  77. package/types/src/writer/builder/OpcXmlUtils.d.ts +2 -0
  78. package/types/src/writer/builder/PackageBuilder.d.ts +72 -22
  79. package/types/src/writer/builder/PartWriter.d.ts +5 -0
  80. package/types/src/writer/builder/RelationshipSet.d.ts +3 -0
  81. package/types/src/writer/builder/Types.d.ts +117 -38
  82. package/types/src/writer/builder/_Types.d.ts +17 -0
  83. package/types/src/writer/emitters/CommentsEmitter.d.ts +58 -0
  84. package/types/src/writer/emitters/EmbeddedPartEmitter.d.ts +60 -0
  85. package/types/src/writer/emitters/ExternalLinkEmitter.d.ts +19 -0
  86. package/types/src/writer/emitters/LegacyDrawingEmitter.d.ts +18 -0
  87. package/types/src/writer/emitters/PersonsEmitter.d.ts +17 -0
  88. package/types/src/writer/emitters/PivotTableEmitter.d.ts +45 -0
  89. package/types/src/writer/emitters/SlicerEmitter.d.ts +66 -0
  90. package/types/src/writer/emitters/StylesEmitter.d.ts +2 -2
  91. package/types/src/writer/emitters/TableEmitter.d.ts +14 -0
  92. package/types/src/writer/emitters/ThreadedCommentsEmitter.d.ts +27 -0
  93. package/types/src/writer/emitters/WorkbookEmitter.d.ts +16 -3
  94. package/types/src/writer/utils/AutoFilter.d.ts +2 -2
  95. package/types/src/writer/utils/CustGeomUtils.d.ts +5 -0
  96. package/types/src/writer/utils/DrawMLUtils.d.ts +57 -3
  97. package/types/src/writer/utils/DummyFunction.d.ts +0 -2
  98. package/types/src/writer/utils/DxfCollector.d.ts +3 -3
  99. package/types/src/writer/utils/HiddenFormulaXfs.d.ts +28 -0
  100. package/types/src/writer/utils/PrstGeomUtils.d.ts +6 -0
  101. package/types/src/writer/utils/TextUtils.d.ts +21 -2
  102. package/browser/cjs/B6sirGz6w-Bm7Ofo.cjs +0 -1
  103. package/browser/cjs/B7_pDFYCVzt-3hUs.cjs +0 -1
  104. package/browser/cjs/BAtEL-5TLyoaPFDP.cjs +0 -2
  105. package/browser/cjs/Bg0e53JZa8vhmm5a.cjs +0 -1
  106. package/browser/cjs/CIpMN7SDVREKQUQE.cjs +0 -6
  107. package/browser/cjs/CK5FFUvet6FnIYO_.cjs +0 -5
  108. package/browser/cjs/D5Y4KQhKdukOkjvA.cjs +0 -2
  109. package/browser/cjs/DV6LeTEiiFUrZoxj.cjs +0 -1
  110. package/browser/cjs/DWkuoJSgvcXJTdN1.cjs +0 -1
  111. package/browser/cjs/Db8YjGM6TG34c8aT.cjs +0 -1
  112. package/browser/cjs/index.cjs +0 -1
  113. package/browser/cjs/xQ6-wbTw5UzZUM1Y.cjs +0 -1
  114. package/browser/esm/4BWLu134ABlCQEtM.mjs +0 -3655
  115. package/browser/esm/BzQ_lPzc8C4OTIGZ.mjs +0 -99
  116. package/browser/esm/CJknI8BYGSZr-4zS.mjs +0 -52
  117. package/browser/esm/Cok_fBIUCHDSrKw0.mjs +0 -2211
  118. package/browser/esm/D-m_kQLaewdwuXaF.mjs +0 -2685
  119. package/browser/esm/Dj7D2nVdAZ3TiUks.mjs +0 -4743
  120. package/browser/esm/ijQzHH-bvDfUHIi1.mjs +0 -24
  121. package/node/esm/CF1R5ovFsRNu--Rw.mjs +0 -3744
  122. package/node/esm/Ctcl4jN52INWpKWC.mjs +0 -2255
  123. package/node/esm/CvnRSooxEQdlJgMn.mjs +0 -2766
  124. package/node/esm/DQd0vxzTaPt2qSL-.mjs +0 -108
  125. package/node/esm/ssSlRCbCqxvZ9IX8.mjs +0 -2481
  126. package/types/src/reader/domVisitors/HyperlinkVisitor.d.ts +0 -6
@@ -17,10 +17,27 @@ export { XLFN, XLWS } from './ExcelFunctionFacts';
17
17
  * | trim-range | infix `.:.` / `.:` / `:.` | `_xlfn._TRO_ALL/_TRO_LEADING/_TRO_TRAILING(a:b)` |
18
18
  * | bare built-in | named `SUM` (unresolved) | `_xleta.SUM` — from the MEASURED `ExcelFunctionFacts` map |
19
19
  * | LET/LAMBDA parameter | named `x` | `_xlpm.x` — at the declaration AND at every use |
20
+ * | long string literal | `"…"` over 255 characters | `_xlfn._LONGTEXT("…255…","…255…",…)` |
20
21
  *
21
22
  * MS-XLSX Extensions to Office Open XML section 2.2.2 Formula:
22
23
  * https://learn.microsoft.com/en-us/openspecs/office_standards/ms-xlsx/3d025add-118d-4413-9856-ab65712ec1b0
23
24
  */
25
+ /**
26
+ * The wrapper Excel spells a string literal longer than {@link LONGTEXT_CHUNK} characters with:
27
+ * the literal cut into chunks of at most that many characters, each a string argument, in order.
28
+ * Excel's formula grammar caps a literal at 255 characters; the model has no such cap and holds
29
+ * the literal whole, so the wrapper exists only on disk.
30
+ *
31
+ * Measured (Excel 16.0, 2026-09-23, `probe-dv-launder.ps1`): a 996-character data-validation list
32
+ * literal saved as `_xlfn._LONGTEXT("…","…","…","…")` with chunks of 255, 255, 255 and 231
33
+ * characters (`__tests__/data/conditions/dv-limits.xlsx`). The chunk is counted on the literal's
34
+ * characters, not its imaged form — how a doubled quote (`""`) counts toward the 255 is not yet
35
+ * measured. Excel opens a bare over-long literal in a DV formula (same probe); whether it opens
36
+ * one in a cell `<f>` is unmeasured, so the wrapper is written wherever Excel would write it.
37
+ */
38
+ export declare const LONGTEXT = "_LONGTEXT";
39
+ /** The longest string literal Excel spells bare — see {@link LONGTEXT}. */
40
+ export declare const LONGTEXT_CHUNK = 255;
24
41
  /**
25
42
  * Eta-reduced-lambda prefix — a BUILT-IN function referenced WITHOUT parentheses
26
43
  * (`=BYROW(A1:B3,SUM)`, and equally `=SUM(ABS)` or `=1+ABS`: Excel prefixes it wherever it
@@ -44,10 +61,12 @@ export declare const XLPM = "_xlpm.";
44
61
  export declare const XLOP = "_xlop.";
45
62
  /**
46
63
  * The write direction: modern (dynamic) tree → on-disk xlsx spellings, as an
47
- * {@link ICalculation.FormulaTransform} handed to `toJSON({ formulaTransform })`.
64
+ * {@link ICalculation.FormulaTransform} — the `write` half of the xlsx dialect (`ExcelCompat`).
48
65
  *
49
- * @param definedNames Upper-cased spellings of the workbook's defined names. A bare name that
50
- * resolves to a REAL defined name is a name, not an eta-reduced built-in, and stays bare.
66
+ * @param definedNames Answers whether an upper-cased spelling is one of the workbook's defined
67
+ * names. A bare name that resolves to a REAL defined name is a name, not an eta-reduced built-in,
68
+ * and stays bare. Asked as each formula is written, so an answer that reads the live names is
69
+ * about the names that save writes; a `Set` is a fixed answer.
51
70
  *
52
71
  * @remarks
53
72
  * Pure syntax + the measured `ExcelFunctionFacts` rows — the transform never consults the calc
@@ -55,16 +74,18 @@ export declare const XLOP = "_xlop.";
55
74
  * runs once per formula block on the compiled AST; formulas with nothing legacy in them return
56
75
  * every node untouched, which skips recompilation entirely.
57
76
  */
58
- export declare function createLegacyWriteTransform(definedNames?: ReadonlySet<string>): ICalculation.FormulaTransform;
77
+ export declare function createLegacyWriteTransform(definedNames?: {
78
+ has(name: string): boolean;
79
+ }): ICalculation.FormulaTransform;
59
80
  /**
60
81
  * The read direction: on-disk xlsx spellings → the modern (dynamic) tree, applied by the reader
61
- * at parse time (`IWorkbook.ConstructorOptions.formulaTransform`).
82
+ * at parse time (`ICellContainerOptions.getFormulaTransform`).
62
83
  *
63
84
  * @remarks
64
85
  * The mirror of {@link createLegacyWriteTransform}: strip `_xlfn._xlws.` BEFORE `_xlfn.`;
65
86
  * unwrap `SINGLE`/`ANCHORARRAY`/`_TRO_*` to their operators (matched on the bare name whether
66
- * or not a prefix was present — parity with the tolerance the parser used to have); strip
67
- * `_xleta.`/`_xlpm.` from names. `[#This Row]` → `@` needs nothing here — that spelling is
87
+ * or not a prefix was present — parity with the tolerance the parser used to have); join a
88
+ * `_LONGTEXT` call's chunks back into the one literal; strip `_xleta.`/`_xlpm.` from names. `[#This Row]` → `@` needs nothing here — that spelling is
68
89
  * valid TYPED input and the SDK normalizes it for every dialect.
69
90
  *
70
91
  * Load-path only: typed text never gets this pass, so `=_xlfn.SUM(A1)` typed is an unknown
@@ -33,10 +33,22 @@ export declare const EXT_URI_CONDITIONAL_FORMATTINGS = "{78C0D931-6437-407d-A8EE
33
33
  export declare const EXT_URI_CONDITIONAL_FORMATTINGS_LEGACY_TYPO = "{78C0D931-6839-4c89-B8D6-976A2CC4E5B4}";
34
34
  /** `x14:id` on a legacy `cfRule` — the GUID linking it to its x14 twin. */
35
35
  export declare const EXT_URI_CF_RULE_ID = "{B025F937-C7B1-47D3-B67F-A62EFF666E3E}";
36
- /** `x14:slicerList` on the worksheet. */
36
+ /** The x15 (Excel 2013) main namespace, declared on `<ext>` elements that carry x15 content. */
37
+ export declare const NS_X15 = "http://schemas.microsoft.com/office/spreadsheetml/2010/11/main";
38
+ /** `x14:slicerList` on the worksheet, as older Excel writes it. Read, never written. */
37
39
  export declare const EXT_URI_SLICER_LIST = "{A8765BA9-456A-4dab-B4F3-ACF838C121DE}";
38
- /** `x15:slicerList` on the worksheet (slicers on data-model tables). */
40
+ /** `x14:slicerList` on the worksheet under the x15 ext uri: what current Excel writes for a table slicer. */
39
41
  export declare const EXT_URI_SLICER_LIST_X15 = "{3A4CF648-6AED-40f4-86FF-DC5316D8AED3}";
42
+ /** `x15:slicerCaches` on the workbook: the relationships to the table slicers' cache parts. */
43
+ export declare const EXT_URI_SLICER_CACHES_X15 = "{46BE6895-7355-4a93-B00E-2C351335B9C9}";
44
+ /** `x15:tableSlicerCache` in a slicer cache's `extLst`: the table and column a table slicer filters. */
45
+ export declare const EXT_URI_TABLE_SLICER_CACHE = "{2F2917AC-EB37-4324-AD4E-5DD8C200BD13}";
46
+ /**
47
+ * `xlrd2:filterColumn` on an autoFilter's `filterColumn` — a date-group filter as VBA/COM writes
48
+ * it. Excel's own dropdown writes the same groups in the main namespace; this is read, never
49
+ * written.
50
+ */
51
+ export declare const EXT_URI_FILTER_COLUMN = "{1AD28BCE-077C-4C59-8B6E-1921CE8616D4}";
40
52
  /**
41
53
  * Ext uris the reader recognizes but does not read, with the feature name for the warning
42
54
  * (design §2.2 / plan Phase 5: skipped ext content warns, it never disappears silently).
@@ -1,12 +1,23 @@
1
1
  import { IWorkbookIO } from '@sheetxl/sdk';
2
2
  /**
3
- * The registry key both formats below share. Also the "same package family" test at the writer's
4
- * source-package seam (`XLSXWriter.ts`) — an origin only ever gets a retained `SourcePackage` by
5
- * successfully zip-parsing under {@link ReadFormat}'s handler, so this key alone is enough to tell
6
- * a genuine xlsx/xlsm round trip from a `.sxl`/`.csv` origin, without needing path/extension info a
7
- * server-side buffer read may not have. See `DESIGN-PACKAGE-PASSTHROUGH.md` §6.
3
+ * The registry key for Excel.
8
4
  */
9
5
  export declare const XLSX_FORMAT_KEY = "Excel";
6
+ /**
7
+ * The registry key for macro-enabled Excel (`.xlsm`).
8
+ *
9
+ * @remarks
10
+ * A separate registered format, not a second extension on {@link XLSX_FORMAT_KEY}: `DESIGN-IO.md`
11
+ * rejects one format owning several extensions precisely because the handler is never told which
12
+ * one is being written, and macro-enabledness is exactly such a per-extension decision. Both keys
13
+ * share one reader and one writer; only the *write* side is opinionated (the same shape `.sxl` and
14
+ * `.json` use).
15
+ *
16
+ * Splitting the **read** side too is what makes a plain save round-trip: an origin remembers the
17
+ * key it was read under, so an `.xlsm` opened as `Excel` would be saved back as `.xlsx` content
18
+ * under an `.xlsm` name.
19
+ */
20
+ export declare const XLSM_FORMAT_KEY = "ExcelMacro";
10
21
  /**
11
22
  * Registers all built-in read and write formats with the provided WorkbookIO registry.
12
23
  *
@@ -0,0 +1,38 @@
1
+ import { ISheetProtection, IWorkbookProtection } from '@sheetxl/sdk';
2
+ /**
3
+ * One protection attribute at the xlsx boundary.
4
+ *
5
+ * The model names what is ALLOWED (`true` = allowed); OOXML names what is PROTECTED (`"1"` = not
6
+ * allowed), so every value inverts on the way through. An omitted attribute is its `ooxmlDefault`
7
+ * (ECMA-376, confirmed against Excel), which is not the model's default: a bare
8
+ * `<sheetProtection sheet="1"/>` leaves objects and scenarios editable, while `lock()` with no
9
+ * options does not — Excel's own Protect Sheet writes `objects="1" scenarios="1"`.
10
+ */
11
+ export interface ProtectionAttribute<K extends string> {
12
+ /** The model property. */
13
+ key: K;
14
+ /** The OOXML attribute. */
15
+ attribute: string;
16
+ /** Whether the model allows it when the property is unset. */
17
+ modelDefault: boolean;
18
+ /** Whether the OOXML attribute PROTECTS it when omitted. */
19
+ ooxmlDefault: boolean;
20
+ }
21
+ /** `CT_SheetProtection`, in schema order. `showFormulas` has no attribute (formats carry it). */
22
+ export declare const SheetProtectionAttributes: readonly ProtectionAttribute<keyof ISheetProtection.JSON>[];
23
+ /**
24
+ * `CT_WorkbookProtection`'s lock flags. `revision` belongs to shared workbooks: nothing sets it, so an
25
+ * unset one writes nothing rather than locking revisions on every protected workbook.
26
+ */
27
+ export declare const WorkbookProtectionAttributes: readonly ProtectionAttribute<keyof IWorkbookProtection.Properties>[];
28
+ /**
29
+ * The model value for an attribute as read. An omitted or unparseable attribute reads as its OOXML
30
+ * default.
31
+ */
32
+ export declare const readProtectionAttribute: (spec: ProtectionAttribute<string>, value: string | null | undefined) => boolean;
33
+ /**
34
+ * The attribute value to write for a model value, or `null` when it equals the OOXML default and is
35
+ * omitted, as Excel does.
36
+ */
37
+ export declare const writeProtectionAttribute: (spec: ProtectionAttribute<string>, allowed: boolean | null | undefined) => "1" | "0" | null;
38
+ //# sourceMappingURL=ProtectionAttributes.d.ts.map
@@ -1,4 +1,4 @@
1
- import { IWorkbookIO } from '@sheetxl/sdk';
1
+ import { IWorkbook } from '@sheetxl/sdk';
2
2
  /**
3
3
  * The default upper bound, in decompressed bytes, on what a {@link SourcePackage} will retain.
4
4
  *
@@ -35,16 +35,33 @@ export interface SourcePackagePart {
35
35
  * @remarks
36
36
  * Not a residue map: this holds every non-streamed part from the source zip, decompressed. Which
37
37
  * of those a save actually copies through (vs. an emitter claiming the path, vs. a drop-bucket
38
- * rule) is decided at write time, not here.
38
+ * rule) is decided at write time, not here. The one thing it is told rather than holding is
39
+ * {@link isAbsorbed} — which parts the read put on the model, so the writer need not guess.
39
40
  */
40
41
  export declare class SourcePackage {
41
42
  private readonly _parts;
43
+ private readonly _absorbed;
42
44
  private readonly _totalBytes;
43
45
  private _structurallyChanged;
44
- constructor(parts: ReadonlyMap<string, SourcePackagePart>);
46
+ constructor(parts: ReadonlyMap<string, SourcePackagePart>, absorbed?: ReadonlySet<string> | null);
45
47
  getNames(): string[];
46
48
  has(name: string): boolean;
47
49
  getPart(name: string): SourcePackagePart | null;
50
+ /**
51
+ * Whether the reader took this part onto the model, so a save writes it from there rather than
52
+ * copying it through — see `DESIGN-PACKAGE-PASSTHROUGH.md` §4.
53
+ *
54
+ * @remarks
55
+ * Identity only: a name, never content. What each absorbed part *says* lives on the model that
56
+ * absorbed it (a chart's part on its movable, a sheet's VML on the sheet, a cache's definition on
57
+ * the workbook), which is the whole point of `PLAN-MODEL-HOMES.md` — this set exists so the
58
+ * passthrough can tell "the model owns this one" from "nothing modeled it" without a list of path
59
+ * patterns standing in for the answer.
60
+ *
61
+ * Independent of whether the element that cited the part still exists: deleting the chart deletes
62
+ * its part with it, and the source's copy should go too.
63
+ */
64
+ isAbsorbed(name: string): boolean;
48
65
  /** Sum of {@link SourcePackagePart.data}'s byte lengths across every retained part. */
49
66
  getTotalBytes(): number;
50
67
  /**
@@ -60,17 +77,19 @@ export declare class SourcePackage {
60
77
  hasStructuralChange(): boolean;
61
78
  markStructuralChange(): void;
62
79
  }
63
- /** The package retained for `origin`, or `null` if none was retained (or `origin` is unset). */
64
- export declare function getSourcePackage(origin: IWorkbookIO.Origin | null | undefined): SourcePackage | null;
80
+ /** The package retained for `workbook`, or `null` if none was retained. */
81
+ export declare function getSourcePackage(workbook: IWorkbook | null | undefined): SourcePackage | null;
65
82
  /**
66
- * Retain `sourcePackage` for `origin`, replacing anything previously retained for it.
83
+ * Retain `sourcePackage` for `workbook`, replacing anything previously retained for it.
67
84
  *
68
85
  * @remarks
69
- * Owned entirely by io-xlsx — the origin never learns this exists (no sdk change). Lifetime
70
- * follows the origin: stable across a save, fresh (and empty) for a copy or a new workbook, and
71
- * released via {@link releaseSourcePackage} on `IWorkbook.close()`.
86
+ * Owned entirely by io-xlsx — the workbook never learns this exists (no sdk change). Keyed by the
87
+ * WORKBOOK, not its origin: the parts belong to the model that was read, and pass through on every
88
+ * save of it wherever it is written — a Save As moves the workbook to a new origin, and the parts go
89
+ * with it. Fresh (and empty) for a copy or a new workbook; released via
90
+ * {@link releaseSourcePackage} on `IWorkbook.close()`.
72
91
  */
73
- export declare function setSourcePackage(origin: IWorkbookIO.Origin, sourcePackage: SourcePackage): void;
74
- /** Release whatever is retained for `origin`, if anything. Safe to call unconditionally. */
75
- export declare function releaseSourcePackage(origin: IWorkbookIO.Origin | null | undefined): void;
92
+ export declare function setSourcePackage(workbook: IWorkbook, sourcePackage: SourcePackage): void;
93
+ /** Release whatever is retained for `workbook`, if anything. Safe to call unconditionally. */
94
+ export declare function releaseSourcePackage(workbook: IWorkbook | null | undefined): void;
76
95
  //# sourceMappingURL=SourcePackage.d.ts.map
@@ -5,6 +5,23 @@ import { ReaderProfiler } from './reader/ReaderProfiler';
5
5
  * Options for exporting to XLSX file format.
6
6
  */
7
7
  export interface WriteXLSXOptions extends IWorkbookIO.WriteOptions {
8
+ /**
9
+ * Whether to write a macro-enabled workbook (`.xlsm`) rather than a plain one (`.xlsx`).
10
+ *
11
+ * @defaultValue false
12
+ *
13
+ * @remarks
14
+ * Set by the format registration, not by callers: `.xlsx` and `.xlsm` are two registered write
15
+ * formats sharing this one handler, which is how `DESIGN-IO.md` says a per-extension encoding
16
+ * decision must be expressed — a single format listing both extensions could not, because the
17
+ * handler is never told which of its extensions is being written.
18
+ *
19
+ * It decides **both halves together**, so the declaration can never disagree with the payload:
20
+ * the `xl/workbook.xml` content type, and whether a source package's `xl/vbaProject.bin` is
21
+ * carried through. Writing a macro workbook to `.xlsx` therefore drops the VBA project, which is
22
+ * what Excel's own *Save As* does.
23
+ */
24
+ macroEnabled?: boolean;
8
25
  /**
9
26
  * Callback invoked when a part is emitted.
10
27
  *
@@ -0,0 +1,16 @@
1
+ import { IWorkbook } from '@sheetxl/sdk';
2
+ /** The `paramMap` key under which the styles part leaves its `hidden="1"` cell xf indices. */
3
+ export declare const HIDDEN_XFS_PARAM = "hiddenXfs";
4
+ /**
5
+ * Turns xlsx's per-format `hidden` into the model's sheet `showFormulas` plus per-format grants.
6
+ *
7
+ * A formula shows when the sheet OR its format allows it; xlsx only has the format's `hidden`. So a
8
+ * sheet that uses any hidden format reads as `showFormulas: false` (an unprotected one keeping it as
9
+ * `sheet: true` protection), and every format it uses
10
+ * without `hidden="1"` is granted `showFormulas: true`. The formats are counted from the merged style
11
+ * references (cells, rows, columns, and xf 0 unless columns style everything), never per cell. xf 0 is Normal, so
12
+ * its grant goes on the Normal style, and the hidden formats say `false` outright rather than inherit
13
+ * it.
14
+ */
15
+ export declare const applyHiddenFormulas: (jsonWB: IWorkbook.JSON, hiddenXfs: ReadonlySet<number> | undefined) => void;
16
+ //# sourceMappingURL=HiddenFormulas.d.ts.map
@@ -0,0 +1,24 @@
1
+ import { IWorkbook } from '@sheetxl/sdk';
2
+ import { SlicerRecord } from './_SlicerRecord';
3
+ export interface SlicerJoinOptions {
4
+ /** Reports a slicer that could not be imported. */
5
+ warn(message: string, onceKey: string): void;
6
+ /** Marks a source part as taken onto the model, so a save writes it from there. */
7
+ markAbsorbed(partPath: string): void;
8
+ /** The package's slicer parts by path, each the records it holds by slicer name. */
9
+ slicerParts: ReadonlyMap<string, Record<string, SlicerRecord>>;
10
+ }
11
+ /**
12
+ * Joins each sheet's slicer records to the drawing frames that place them, once every sheet is
13
+ * read: a frame of type `slicer` with no source takes the record of its name, and the record's
14
+ * table and column ids become the model's source, `Sales[Region]`. A slicer may sit on another
15
+ * sheet than its table, which is why this waits for the whole workbook.
16
+ *
17
+ * @remarks
18
+ * A record that names no table (a pivot or OLAP slicer) is left as the frame alone, as it was. A
19
+ * record whose table or column is not in the workbook is not imported: its frame is dropped and
20
+ * its parts are left to the package. Every slicer that is imported has its cache part, and the
21
+ * slicer part when every slicer of it was imported, marked absorbed.
22
+ */
23
+ export declare function joinSlicers(jsonWorkbook: IWorkbook.JSON, options: SlicerJoinOptions): void;
24
+ //# sourceMappingURL=SlicerJoin.d.ts.map
@@ -0,0 +1,29 @@
1
+ /**
2
+ * The sink a reader hands to everything it reads a part with.
3
+ *
4
+ * @remarks
5
+ * Load warnings belong to the host, which decides whether to show them — the CLI, for one, gates
6
+ * them on its log level. A warning written straight to the console has left that channel and
7
+ * cannot be silenced, so every transform a reader runs is given one of these.
8
+ *
9
+ * `context` locates the finding (the OPC path of the part, plus a sheet path where there is one).
10
+ * `onceKey` is {@link WarningOptions.onceKey}, carried from the emit site.
11
+ */
12
+ export type OnWarning = (message: string, context?: string, onceKey?: string) => void;
13
+ /** What an emit site may say about the warning it is raising, beyond its text. */
14
+ export interface WarningOptions {
15
+ /**
16
+ * Reports only the first warning carrying this key, for one read.
17
+ *
18
+ * @remarks
19
+ * Whether a warning means "this kind of thing, once" or "this specific thing" is known only
20
+ * where it is raised, so the key is the emit site's to give: a finding that names the shape it
21
+ * found is one per shape without a key, and one per file with one.
22
+ *
23
+ * Keys are stable dotted identifiers owned by this package, such as `xlsx.drawing.fixedShape`.
24
+ * Never derive one from the message text — rewording or localizing a message must not change
25
+ * what collapses. The first occurrence is the one reported, message and context both.
26
+ */
27
+ onceKey?: string;
28
+ }
29
+ //# sourceMappingURL=Warning.d.ts.map
@@ -50,7 +50,7 @@ export declare class ZipReader {
50
50
  * doesn't parse where the central directory says it should.
51
51
  *
52
52
  * @remarks
53
- * `entry.compressedSize`/`compressionMethod`/`signature` come from the *central directory*, which
53
+ * `entry.compressedSize`/`compressionMethod`/`crc32` come from the *central directory*, which
54
54
  * zip.js has already resolved (Zip64 extra fields included) — those are trusted as-is. Only the
55
55
  * local header's own filename/extra-field lengths are read here, since the zip spec allows those
56
56
  * two (and only those two) to legitimately differ from the central directory's copy; they're what
@@ -0,0 +1,37 @@
1
+ /**
2
+ * A table slicer as the reader gathers it from its part (`xl/slicers/*`) and its cache
3
+ * (`xl/slicerCaches/*`), by the xlsx ids the file names its column with. Not the model's JSON
4
+ * (`ISlicer.JSON`, which names the column by structured reference): a record is joined to the
5
+ * drawing frame that places it, and its ids resolved to a table, once every sheet is read.
6
+ */
7
+ export interface SlicerRecord {
8
+ /** The table part's `@id`. Absent for a pivot or OLAP slicer, which names no table. */
9
+ tableId?: string;
10
+ /** The column's `tableColumn/@id`, as Excel writes it the column's 1-based index. */
11
+ columnId?: string;
12
+ /** The cache's `@name`: what a formula refers to the selection by. */
13
+ cacheName?: string;
14
+ /** The cache part's path in the package, for the read to absorb once the slicer is on the model. */
15
+ cachePath?: string;
16
+ /** The cache's `@sourceName`: the column's name when the file was written. */
17
+ sourceName?: string;
18
+ sortOrder?: string;
19
+ customListSort?: boolean;
20
+ crossFilter?: string;
21
+ /** The slicer's `xr10:uid`. */
22
+ uid?: string;
23
+ caption?: string;
24
+ startItem?: number;
25
+ columnCount?: number;
26
+ showCaption?: boolean;
27
+ level?: number;
28
+ style?: string;
29
+ lockedPosition?: boolean;
30
+ /** In EMU, as the part spells it. */
31
+ rowHeight?: number;
32
+ }
33
+ /** A sheet's JSON with the slicer records read for it, by slicer name. */
34
+ export interface SheetSlicerRecords {
35
+ slicers?: Record<string, SlicerRecord>;
36
+ }
37
+ //# sourceMappingURL=_SlicerRecord.d.ts.map
@@ -0,0 +1,7 @@
1
+ import { IGeometry } from '@sheetxl/sdk';
2
+ /**
3
+ * The definition a `custGeom` element states. Lists the file leaves empty are left out of the
4
+ * JSON; a text rectangle is kept as the four edge tokens it names.
5
+ */
6
+ export declare const readCustGeom: (elemCustGeom: Element) => IGeometry.Def;
7
+ //# sourceMappingURL=CustGeomUtils.d.ts.map
@@ -1,4 +1,4 @@
1
- import { IStyle } from '@sheetxl/sdk';
1
+ import { ICellStyle } from '@sheetxl/sdk';
2
2
  import { TransformerOptions } from './Types';
3
3
  import { Visitor } from './Visitor';
4
4
  import { ExecutionContext } from './ExecutionContext';
@@ -22,7 +22,7 @@ export declare class DOMTransformer {
22
22
  * the `dxfs` table, so it arrives from the streaming reader with no index to look up. The
23
23
  * `processingDXFs` flag matters: a dxf's solid pattern fill has its colors inverted.
24
24
  */
25
- parseDxf(elem: Element, location?: string): IStyle.JSON;
25
+ parseDxf(elem: Element, location?: string, options?: TransformerOptions): ICellStyle.JSON;
26
26
  getVisitorParamsState(): Map<string, any>;
27
27
  transform(xmlRootDoc: Document, location: string, options?: TransformerOptions): any;
28
28
  protected _walkScoped(elemName: string, context: ExecutionContext, visited: VisitedRecord[], elemParent: Element, jsonParent: any, location: string, options: TransformerOptions): void;
@@ -1,4 +1,5 @@
1
- import { IComment } from '@sheetxl/sdk';
1
+ import { IPerson, IEmbeddedPart } from '@sheetxl/sdk';
2
+ import { WarningOptions } from '../Warning';
2
3
  import { RelationShipType, TransformerOptions } from './Types';
3
4
  export interface VisitorParamsContainer {
4
5
  getVisitorParamsState(): Map<string, any>;
@@ -22,18 +23,30 @@ export declare class ExecutionContext {
22
23
  private _onWarning?;
23
24
  private _addPerson?;
24
25
  private _serializeElement?;
26
+ private _readEmbeddedPart?;
25
27
  constructor(parent: ExecutionContext | null, sharedState: VisitorParamsContainer, currentPath: string, elemRoot: Element, jsonRoot: any, fileLocation?: string | null, options?: TransformerOptions);
26
28
  getRef(relId: string, asResource?: boolean): any;
29
+ /**
30
+ * The part this relationship names, and every part that part references, as one carried subtree.
31
+ *
32
+ * @remarks
33
+ * Not a flavor of {@link ExecutionContext.getRef}: that one interprets a relationship into
34
+ * whatever the reader models its target as, this one carries the target away unread so a writer
35
+ * can put it back. See {@link TransformerOptions.readEmbeddedPart}.
36
+ */
37
+ readEmbeddedPart(relId: string): IEmbeddedPart.JSON | null;
27
38
  getRelationships(): Map<string, RelationShipType>;
28
39
  getPath(): string;
29
40
  /** The OPC path of the file currently being read (e.g. "xl/drawings/drawing1.xml"). */
30
41
  getFileLocation(): string;
31
42
  getElemRoot(): Element;
32
43
  getJsonRoot(): any;
33
- warn(message: string): void;
44
+ warn(message: string, options?: WarningOptions): void;
45
+ /** Carries the originating part's path up to whichever context holds the sink. */
46
+ private _raiseWarning;
34
47
  /** Serializes a parsed DOM element back to an XML string, verbatim. Returns null if unavailable. */
35
48
  serializeElement(elem: Element): string | null;
36
- addPerson(person: string | Partial<IComment.PersonJSON>): IComment.PersonJSON | null;
49
+ addPerson(person: string | Partial<IPerson.JSON>): IPerson.JSON | null;
37
50
  getVisitorParamsState<T = any>(): Map<string, T>;
38
51
  /**
39
52
  * Evaluates a path expression against an XML element and returns matching elements.
@@ -1,4 +1,5 @@
1
- import { IComment } from '@sheetxl/sdk';
1
+ import { IPerson, IEmbeddedPart } from '@sheetxl/sdk';
2
+ import { OnWarning } from '../Warning';
2
3
  export interface RelationShipType {
3
4
  target?: string;
4
5
  type?: string;
@@ -19,9 +20,24 @@ export interface TransformerOptions {
19
20
  };
20
21
  getRefs?: (refLocation: string, parsedRefs?: Map<string, Map<string, RelationShipType>>) => Map<string, RelationShipType>;
21
22
  parsedRefs?: Map<string, any>;
22
- onWarning?: (message: string) => void;
23
- addPerson?: (person: Partial<IComment.PersonJSON>) => IComment.PersonJSON;
23
+ /** Where the warnings this transform raises are reported. See {@link OnWarning}. */
24
+ onWarning?: OnWarning;
25
+ addPerson?: (person: Partial<IPerson.JSON>) => IPerson.JSON;
24
26
  /** Serializes a parsed DOM element back to an XML string, verbatim. Used to capture unmodeled content. */
25
27
  serializeElement?: (elem: Element) => string;
28
+ /**
29
+ * Resolves a relationship to the part it names and, recursively, the parts that part references,
30
+ * as content to be carried on the model and written back unchanged.
31
+ *
32
+ * @remarks
33
+ * The other half of {@link TransformerOptions.getRef}, not a variant of it. `getRef` *interprets*:
34
+ * it dispatches on the relationship type and hands back a sheet, an external book, a resource id
35
+ * — whatever the reader models that part as. This hands back the part itself: its markup as text,
36
+ * its bytes as a resource, and the same again for everything it references, none of it read. Use
37
+ * `getRef` for a part the model understands and this for one it only has to keep.
38
+ *
39
+ * See `readEmbeddedPart` in `XLSXReader` for what it costs and why it is not a visitor's job.
40
+ */
41
+ readEmbeddedPart?: (relId: string, refLocation: string) => IEmbeddedPart.JSON | null;
26
42
  }
27
43
  //# sourceMappingURL=Types.d.ts.map
@@ -12,12 +12,25 @@ export declare class AutoFilterVisitor implements Visitor {
12
12
  processColorFilter(context: ExecutionContext, elem: Element): ICondition.JSON;
13
13
  processCustomFilter(context: ExecutionContext, elem: Element): ICondition.JSON | null;
14
14
  processCustomFilters(context: ExecutionContext, elem: Element): ICondition.JSON;
15
+ /**
16
+ * `dynamicFilter` is Excel's Average (`aboveAverage` / `belowAverage`) or a TimePeriod.
17
+ *
18
+ * @remarks
19
+ * `val` and `maxVal` are Excel's cache of the last evaluation (the average; a period's start
20
+ * and exclusive end), not an anchor and not a deviation count. Excel honors `type` alone and
21
+ * rewrites them on save (`probe-filter-dynamic`), so they are dropped here.
22
+ */
15
23
  processDynamicFilter(context: ExecutionContext, elem: Element): ICondition.JSON;
16
24
  processDateGroupItem(context: ExecutionContext, elem: Element): ICondition.DateGroupItem;
17
25
  processFilterItem(context: ExecutionContext, elem: Element): Scalar | undefined;
18
26
  processFilters(context: ExecutionContext, elem: Element): ICondition.JSON;
19
27
  processIcon(context: ExecutionContext, elem: Element): ICondition.JSON;
20
28
  processTop10(context: ExecutionContext, elem: Element): ICondition.JSON;
29
+ /**
30
+ * A date group applied through VBA/COM is written only as `xlrd2:filterColumn` inside the
31
+ * column's own extLst, with nothing in the main namespace.
32
+ */
33
+ processFilterColumnExt(context: ExecutionContext, extLst: Element): ICondition.JSON | undefined;
21
34
  processFilterCriteria(context: ExecutionContext, elem: Element): ICondition.JSON | undefined;
22
35
  processFilterColumn(context: ExecutionContext, elem: Element, jsonTable: ITable.JSON): ICondition.JSON | null | undefined;
23
36
  processFilterColumns(context: ExecutionContext, elem: Element, conditions: ICondition.JSON[], jsonTable: ITable.JSON): ICondition.JSON[] | undefined;
@@ -1,3 +1,4 @@
1
+ import { Rectangle } from '@sheetxl/utils';
1
2
  import { IFill, IEffect } from '@sheetxl/sdk';
2
3
  import { Visitor, ExecutionContext } from '../dom';
3
4
  export declare class ColorContainerVisitor implements Visitor {
@@ -23,8 +24,20 @@ export declare class ColorContainerVisitor implements Visitor {
23
24
  processEffectElement(_context: ExecutionContext, elem: Element, name: string): IEffect.JSON | undefined;
24
25
  getFill(context: ExecutionContext, shPropsElement: Element): any;
25
26
  processGradFill(context: ExecutionContext, gradFillElement: Element): IFill.GradientJSON;
26
- getRect(fillToRectElement: Element): any;
27
- processImageFill(_context: ExecutionContext, imageFillElement: Element): IFill.ImageJSON;
27
+ /**
28
+ * A path gradient's focus from its `fillToRect`: the inner rectangle's edges as `0…1` positions
29
+ * across the shape, as a cell's gradient states them. DrawingML states the right and bottom edges
30
+ * as insets from the far side; SpreadsheetML (and the model) as positions from the near side.
31
+ * `null` for an element that states no edge.
32
+ */
33
+ getFocus(fillToRectElement: Element): Rectangle | null;
34
+ /**
35
+ * A `blipFill`: the image as a workbook resource (the blip's embed or link relationship), the
36
+ * part of it used, and whether it is stretched or tiled.
37
+ */
38
+ processImageFill(context: ExecutionContext, imageFillElement: Element): IFill.ImageJSON;
39
+ /** A relative rectangle's insets (`l`/`t`/`r`/`b`, thousandths of a percent) as percentages; `{}` when none. */
40
+ getRectInsets(elem: Element): IFill.RectInsets;
28
41
  processPatternFill(context: ExecutionContext, pattFill: Element): IFill.PatternJSON;
29
42
  processAdjColor(context: ExecutionContext, fillElement: Element): string | null;
30
43
  processScrgbClrElement(context: ExecutionContext, elem: Element): string;
@@ -1,6 +1,28 @@
1
- import { IRange, IComment } from '@sheetxl/sdk';
1
+ import { IRange, IComment, IStyledFont } from '@sheetxl/sdk';
2
2
  import { Visitor, ExecutionContext } from '../dom';
3
+ /**
4
+ * One `<comment>` of a legacy comments part, as read: its author as an index into the part's
5
+ * `<authors>`, and its rich text.
6
+ */
7
+ export interface LegacyNoteEntry {
8
+ authorId?: number;
9
+ content: IComment.Content;
10
+ }
11
+ /**
12
+ * `<comment ref authorId>` with its `<text>`: the runs are SpreadsheetML rich text — `<r>` with
13
+ * an `<rPr>` of child elements (`<b/>`, `<sz val>`, `<rFont val>`, `<color>`, ...) — read here
14
+ * rather than by the DrawingML text visitor, whose properties are attributes.
15
+ */
3
16
  export declare class CommentVisitor implements Visitor {
4
- visit(context: ExecutionContext, elem: Element, jsonParent: IRange.JSONReferenceEntry<IComment.RichJSON>[]): any;
17
+ visit(context: ExecutionContext, elem: Element, jsonParent: IRange.JSONReferenceEntry<LegacyNoteEntry>[]): any;
5
18
  }
19
+ /**
20
+ * The runs of a `<text>`, as a string when none carries formatting.
21
+ */
22
+ export declare function readRichText(textElement: Element | null): IComment.Content;
23
+ /**
24
+ * A run's `<rPr>` as the font properties it sets, or `null` when it sets none. Unlike a cell font
25
+ * record, a run is differential: what it leaves out is inherited, so nothing is defaulted.
26
+ */
27
+ export declare function readRunProperties(rPr: Element): IStyledFont.JSON | null;
6
28
  //# sourceMappingURL=CommentVisitor.d.ts.map
@@ -1,7 +1,7 @@
1
- import { IRange, IComment } from '@sheetxl/sdk';
1
+ import { IRange } from '@sheetxl/sdk';
2
2
  import { Visitor, ExecutionContext } from '../dom';
3
3
  export declare class CommentsVisitor implements Visitor {
4
- visit(context: ExecutionContext, elemParent: Element, jsonParent: any): IRange.JSONReferenceEntry<IComment.JSON>[] | undefined;
4
+ visit(context: ExecutionContext, elemParent: Element, jsonParent: any): IRange.JSONReferenceEntry<any>[] | undefined;
5
5
  processAuthors(context: ExecutionContext, elem: Element, authors: string[]): void;
6
6
  }
7
7
  //# sourceMappingURL=CommentsVisitor.d.ts.map
@@ -1,6 +1,7 @@
1
1
  import { IMovable } from '@sheetxl/sdk';
2
2
  import { Visitor, ExecutionContext } from '../dom';
3
3
  import { DrawingSpVisitor } from './DrawingSpVisitor';
4
+ /** A `cxnSp`: a connector, read as a shape whose `type` is `connector`. */
4
5
  export declare class DrawingCxnSpVisitor extends DrawingSpVisitor implements Visitor {
5
6
  visit(context: ExecutionContext, elem: Element, json: IMovable.JSON): any;
6
7
  }
@@ -1,6 +1,37 @@
1
- import { IMovable } from '@sheetxl/sdk';
1
+ import { IGroup, IMovable, IShape } from '@sheetxl/sdk';
2
2
  import { Visitor, ExecutionContext } from '../dom';
3
3
  export declare class DrawingElementVisitor implements Visitor {
4
4
  visit(context: ExecutionContext, elem: Element, json: IMovable.JSON): IMovable.JSON | undefined;
5
+ /** A `cNvPr`'s title and hyperlinks onto the JSON that will hold the content's identity. */
6
+ protected readNonVisualDetails(context: ExecutionContext, elemCNvPr: Element, target: IShape.JSON): void;
7
+ /**
8
+ * Sets the content of a movable, and gives it the name and description read from its `cNvPr`.
9
+ */
10
+ protected setContent(json: IMovable.JSON, content: IMovable.ContentJSON<any>): void;
11
+ /** Whether the JSON a drawing element is read into is a group's content, i.e. the element is a member. */
12
+ protected isGroupContent(json: unknown): json is IGroup.JSON & {
13
+ members: IMovable.JSON[];
14
+ };
15
+ /**
16
+ * A group member: an ordinary movable JSON whose content is of `type`, named and hidden as its
17
+ * `cNvPr` says. The walker fills the content in (`spPr`, `txBody`) as it descends; where the
18
+ * member sits is hoisted from the content onto the movable once the drawing is read
19
+ * (`DrawingVisitor.afterVisit`).
20
+ */
21
+ protected readMemberHeader(context: ExecutionContext, elem: Element, type: string): {
22
+ movable: IMovable.JSON;
23
+ content: any;
24
+ };
25
+ /**
26
+ * A shape's `style` element — its references into the theme's format scheme — onto the content
27
+ * JSON. Excel's own shapes state their fill and line this way and nothing in `spPr`. A reference
28
+ * equal to Excel's default for the kind of shape is left out; `content.type` must already say
29
+ * what kind it is.
30
+ */
31
+ protected readStyleRefs(context: ExecutionContext, elem: Element, content: IShape.JSON): void;
32
+ /** A locks element's flags (`spLocks`, `cxnSpLocks`, `grpSpLocks`, `picLocks`) by the file's own names. */
33
+ protected readLocks(elemLocks: Element | null): Record<string, boolean> | undefined;
34
+ /** The element's original `cNvPr` id, kept so a replayed fragment's id can be made unique on write. */
35
+ protected readSourceId(context: ExecutionContext, elem: Element): number | undefined;
5
36
  }
6
37
  //# sourceMappingURL=DrawingElementVisitor.d.ts.map