@sheetxl/io-xlsx 0.8.0-beta.2 → 0.8.0-beta.21
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.
- package/LICENSE.md +8 -7
- package/browser/esm/{DhqYgh9G2vLn7mIE.mjs → BCQs67LTVZ1xG82R.mjs} +3 -3
- package/browser/esm/B_Jfq-O7tght6ixL.mjs +4631 -0
- package/browser/esm/{CMHb6pUUmsCP9r_9.mjs → BoTT_U96McOdkuId.mjs} +3 -3
- package/browser/esm/{_UDbQq5-pHbU1f82.mjs → CGQXv_OxqwXL3F8q.mjs} +2 -2
- package/browser/esm/CNAv3IL7hhyvzLaF.mjs +7011 -0
- package/browser/esm/{CMzkLUwbgA73RvCb.mjs → CROAqUhKnVtkbBSm.mjs} +3 -3
- package/browser/esm/D74i1p_CJmHw8HKb.mjs +2474 -0
- package/browser/esm/DPz0IeW70Nh4n8Wz.mjs +104 -0
- package/browser/esm/D_5T8KKyirVCR3RO.mjs +10312 -0
- package/browser/esm/cG4z0eDMlE49HJvD.mjs +2433 -0
- package/browser/esm/{IZf0hIeLYj3T0Xvu.mjs → f-Z5vnvNnzj-0ujR.mjs} +194 -144
- package/browser/esm/index.mjs +3 -4
- package/licenses/dependencies.txt +2 -2
- package/node/esm/{Bi_kZVtZams7taqa.mjs → Bl5eH7YPk64NxkkI.mjs} +3 -3
- package/node/esm/C0q_ulF7hl9zoVQ8.mjs +6957 -0
- package/node/esm/CT1rO7_YWIvsG9hs.mjs +4745 -0
- package/node/esm/{CB1ijGbhl-e2l6Mm.mjs → CUPNuRm5G47rulaW.mjs} +3 -3
- package/node/esm/{CY-pSutJLHskZfXZ.mjs → CoNllGglhnzJ6EJ4.mjs} +2 -2
- package/node/esm/CqhoZ8-FRZjS3p-D.mjs +7273 -0
- package/node/esm/TN8KqnRPY-7Ln4Ez.mjs +2562 -0
- package/node/esm/ZNTwnevSmMslvfiW.mjs +2479 -0
- package/node/esm/index.mjs +65 -28
- package/package.json +8 -9
- package/types/src/AutoFilterRules.d.ts +85 -22
- package/types/src/ConditionalFormatRules.d.ts +2 -2
- package/types/src/DataTableFormula.d.ts +26 -0
- package/types/src/DataValidationRules.d.ts +0 -5
- package/types/src/DefinedNameAttributes.d.ts +8 -0
- package/types/src/ExcelCalcStamp.d.ts +0 -36
- package/types/src/ExcelCompat.d.ts +15 -143
- package/types/src/ExcelFunctionFacts.d.ts +0 -272
- package/types/src/ExcelReservedNames.d.ts +0 -65
- package/types/src/KnownFonts.d.ts +37 -0
- package/types/src/LegacyFormula.d.ts +1 -46
- package/types/src/OOXMLExtensions.d.ts +30 -2
- package/types/src/PageLayoutAttributes.d.ts +8 -0
- package/types/src/Plugin.d.ts +15 -3
- package/types/src/ProtectionAttributes.d.ts +2 -2
- package/types/src/SheetKinds.d.ts +42 -0
- package/types/src/SheetViewAttributes.d.ts +4 -0
- package/types/src/SortExtent.d.ts +16 -0
- package/types/src/SourcePackage.d.ts +0 -44
- package/types/src/SparklineGroups.d.ts +52 -0
- package/types/src/Types.d.ts +13 -3
- package/types/src/XlsxHeader.d.ts +19 -0
- package/types/src/chart/ChartExXml.d.ts +38 -0
- package/types/src/chart/ChartPartXml.d.ts +47 -0
- package/types/src/chart/ChartSpaceXml.d.ts +37 -0
- package/types/src/chart/_XmlTree.d.ts +34 -0
- package/types/src/chart/_chartCodecs.d.ts +12 -0
- package/types/src/chart/_chartExCodecs.d.ts +7 -0
- package/types/src/chart/_chartExFold.d.ts +14 -0
- package/types/src/chart/_chartExMarkup.d.ts +236 -0
- package/types/src/chart/_chartExStyle.d.ts +13 -0
- package/types/src/chart/_codec.d.ts +78 -0
- package/types/src/chart/_drawingml.d.ts +10 -0
- package/types/src/chart/_xml.d.ts +70 -0
- package/types/src/pivot/PivotArea.d.ts +20 -0
- package/types/src/pivot/PivotCacheRead.d.ts +30 -0
- package/types/src/pivot/PivotCacheWrite.d.ts +23 -0
- package/types/src/pivot/PivotFilters.d.ts +29 -0
- package/types/src/pivot/PivotFormats.d.ts +60 -0
- package/types/src/pivot/PivotTableRead.d.ts +44 -0
- package/types/src/pivot/PivotTableWrite.d.ts +13 -0
- package/types/src/pivot/_PivotCacheXml.d.ts +48 -0
- package/types/src/pivot/_PivotTableXml.d.ts +23 -0
- package/types/src/reader/CellControls.d.ts +18 -0
- package/types/src/reader/DocumentPropertiesRead.d.ts +16 -0
- package/types/src/reader/DummyFunctionUnwrap.d.ts +43 -23
- package/types/src/reader/HeaderStyles.d.ts +15 -0
- package/types/src/reader/IsoDateCell.d.ts +20 -0
- package/types/src/reader/LibreOfficeDataTable.d.ts +12 -0
- package/types/src/reader/PivotButtons.d.ts +14 -0
- package/types/src/reader/PivotCellFormats.d.ts +22 -0
- package/types/src/reader/SlicerJoin.d.ts +26 -0
- package/types/src/reader/ZipReader.d.ts +1 -1
- package/types/src/reader/_SlicerRecord.d.ts +59 -0
- package/types/src/reader/dom/CustGeomUtils.d.ts +7 -0
- package/types/src/reader/dom/DOMTransformer.d.ts +2 -2
- package/types/src/reader/domVisitors/AppPropertiesVisitor.d.ts +13 -1
- package/types/src/reader/domVisitors/AutoFilterVisitor.d.ts +8 -3
- package/types/src/reader/domVisitors/ColorContainerVisitor.d.ts +15 -2
- package/types/src/reader/domVisitors/CommentVisitor.d.ts +7 -2
- package/types/src/reader/domVisitors/DrawingCxnSpVisitor.d.ts +1 -0
- package/types/src/reader/domVisitors/DrawingElementVisitor.d.ts +34 -1
- package/types/src/reader/domVisitors/DrawingGraphicFrameVisitor.d.ts +9 -0
- package/types/src/reader/domVisitors/DrawingGrpSpVisitor.d.ts +14 -2
- package/types/src/reader/domVisitors/DrawingPicVisitor.d.ts +30 -2
- package/types/src/reader/domVisitors/DrawingSpVisitor.d.ts +20 -1
- package/types/src/reader/domVisitors/DrawingVisitor.d.ts +10 -0
- package/types/src/reader/domVisitors/ExternalLinkVisitor.d.ts +1 -11
- package/types/src/reader/domVisitors/FeaturePropertyBagVisitor.d.ts +18 -0
- package/types/src/reader/domVisitors/FmtSchemeVisitor.d.ts +0 -11
- package/types/src/reader/domVisitors/FontSchemeVisitor.d.ts +3 -2
- package/types/src/reader/domVisitors/FormControlPrVisitor.d.ts +9 -0
- package/types/src/reader/domVisitors/ObjectDefaultsVisitor.d.ts +11 -0
- package/types/src/reader/domVisitors/ShapeTextVisitor.d.ts +44 -0
- package/types/src/reader/domVisitors/SheetColorContainerVisitor.d.ts +2 -2
- package/types/src/reader/domVisitors/SheetStyleVisitor.d.ts +26 -5
- package/types/src/reader/domVisitors/SlicerCacheDefinitionVisitor.d.ts +11 -2
- package/types/src/reader/domVisitors/SlicersVisitor.d.ts +9 -3
- package/types/src/reader/domVisitors/SortStateVisitor.d.ts +2 -2
- package/types/src/reader/domVisitors/TextPropertiesVisitor.d.ts +13 -1
- package/types/src/reader/domVisitors/ThreadedCommentVisitor.d.ts +9 -0
- package/types/src/reader/domVisitors/ThreadedCommentsVisitor.d.ts +2 -2
- package/types/src/reader/domVisitors/TimelinesVisitor.d.ts +13 -0
- package/types/src/reader/domVisitors/WorkbookVisitor.d.ts +0 -9
- package/types/src/reader/domVisitors/_Dxfs.d.ts +10 -0
- package/types/src/reader/domVisitors/index.d.ts +10 -36
- package/types/src/reader/saxVisitors/ContentTypesVisitor.d.ts +1 -0
- package/types/src/reader/saxVisitors/SharedStringsVisitor.d.ts +31 -6
- package/types/src/reader/saxVisitors/WorksheetVisitor.d.ts +26 -8
- package/types/src/richValue/ErrorRichValueHandler.d.ts +22 -0
- package/types/src/richValue/IRichValueHandler.d.ts +109 -0
- package/types/src/richValue/LocalImageRichValueHandler.d.ts +18 -0
- package/types/src/richValue/RichDataParts.d.ts +69 -0
- package/types/src/richValue/RichRecordWriter.d.ts +61 -0
- package/types/src/richValue/RichValueHandlers.d.ts +25 -0
- package/types/src/richValue/RichValueResolver.d.ts +54 -0
- package/types/src/richValue/WebImageRichValueHandler.d.ts +37 -0
- package/types/src/richValue/index.d.ts +7 -0
- package/types/src/utils/DrawingMLText.d.ts +39 -0
- package/types/src/utils/FormControls.d.ts +170 -0
- package/types/src/utils/SharedNames.d.ts +13 -0
- package/types/src/utils/SpreadsheetFont.d.ts +38 -0
- package/types/src/utils/VmlNoteShapes.d.ts +88 -35
- package/types/src/utils/VmlNoteStyle.d.ts +25 -0
- package/types/src/utils/VmlPrefixes.d.ts +24 -0
- package/types/src/vba/VBAProject.d.ts +0 -19
- package/types/src/writer/EvaluationSheet.d.ts +5 -0
- package/types/src/writer/builder/Emitter.d.ts +5 -0
- package/types/src/writer/builder/OpcXmlUtils.d.ts +0 -8
- package/types/src/writer/builder/PackageBuilder.d.ts +4 -41
- package/types/src/writer/builder/Types.d.ts +28 -28
- package/types/src/writer/emitters/CommentsEmitter.d.ts +10 -4
- package/types/src/writer/emitters/DrawingEmitter.d.ts +2 -2
- package/types/src/writer/emitters/ExternalLinkEmitter.d.ts +0 -11
- package/types/src/writer/emitters/FeaturePropertyBagEmitter.d.ts +8 -0
- package/types/src/writer/emitters/LegacyDrawingEmitter.d.ts +4 -4
- package/types/src/writer/emitters/PivotTableEmitter.d.ts +30 -1
- package/types/src/writer/emitters/PropsCoreEmitter.d.ts +7 -2
- package/types/src/writer/emitters/PropsCustomEmitter.d.ts +15 -0
- package/types/src/writer/emitters/RichValuePartsEmitters.d.ts +36 -0
- package/types/src/writer/emitters/RichValueRelEmitter.d.ts +12 -0
- package/types/src/writer/emitters/RichValueStructureEmitter.d.ts +4 -3
- package/types/src/writer/emitters/RichValueTypesEmitter.d.ts +3 -2
- package/types/src/writer/emitters/RichValueWebImageEmitter.d.ts +24 -0
- package/types/src/writer/emitters/SharedStringsEmitter.d.ts +6 -3
- package/types/src/writer/emitters/SlicerEmitter.d.ts +132 -0
- package/types/src/writer/emitters/StylesEmitter.d.ts +35 -2
- package/types/src/writer/emitters/TableEmitter.d.ts +14 -0
- package/types/src/writer/emitters/ThreadedCommentsEmitter.d.ts +7 -1
- package/types/src/writer/emitters/WorkbookEmitter.d.ts +24 -2
- package/types/src/writer/emitters/WorksheetEmitter.d.ts +4 -3
- package/types/src/writer/utils/AutoFilter.d.ts +3 -3
- package/types/src/writer/utils/CellControlComplements.d.ts +29 -0
- package/types/src/writer/utils/CustGeomUtils.d.ts +5 -0
- package/types/src/writer/utils/DateSystem.d.ts +6 -0
- package/types/src/writer/utils/DefaultRows.d.ts +22 -0
- package/types/src/writer/utils/DrawMLUtils.d.ts +42 -3
- package/types/src/writer/utils/DummyFunction.d.ts +0 -25
- package/types/src/writer/utils/DxfCollector.d.ts +14 -11
- package/types/src/writer/utils/PrstGeomUtils.d.ts +6 -0
- package/types/src/writer/utils/RichValueCollector.d.ts +81 -129
- package/types/src/writer/utils/SheetStyleLayout.d.ts +86 -0
- package/types/src/writer/utils/TextUtils.d.ts +26 -2
- package/types/src/writer/utils/UnsupportedFunctions.d.ts +2 -2
- package/types/src/writer/utils/XfVariants.d.ts +61 -0
- package/browser/cjs/B6sirGz6w-Bm7Ofo.cjs +0 -1
- package/browser/cjs/B7_pDFYCVzt-3hUs.cjs +0 -1
- package/browser/cjs/BzOEBR0jaxXg9wvt.cjs +0 -5
- package/browser/cjs/C8oC1tPbhgR0Dqtx.cjs +0 -2
- package/browser/cjs/CIpMN7SDVREKQUQE.cjs +0 -6
- package/browser/cjs/Ca-xJDjg5bOpUPXX.cjs +0 -1
- package/browser/cjs/D3EWCPfCu-qMOIGd.cjs +0 -1
- package/browser/cjs/DULsYP_GcPGLVYSE.cjs +0 -11
- package/browser/cjs/DtBN3UOzNJjYBwJ6.cjs +0 -1
- package/browser/cjs/index.cjs +0 -1
- package/browser/cjs/sNZR19Wk-XQ2xZ9E.cjs +0 -1
- package/browser/cjs/xQ6-wbTw5UzZUM1Y.cjs +0 -1
- package/browser/esm/B9q618XELV7uWJsA.mjs +0 -67
- package/browser/esm/BwbMurFOptAFs7gC.mjs +0 -5214
- package/browser/esm/D75_rfogFUfXADKc.mjs +0 -3324
- package/browser/esm/DfuBawaydlvgZMR-.mjs +0 -4428
- package/browser/esm/DoMlKUCnMSlR2qX5.mjs +0 -159
- package/browser/esm/DtpWa7tZahylJ3HS.mjs +0 -2310
- package/node/esm/BD03jrMQ_UKA196-.mjs +0 -4535
- package/node/esm/BxHvzSROx_N_7nJH.mjs +0 -2356
- package/node/esm/CO1M1H1N6fB422K-.mjs +0 -2959
- package/node/esm/CWpezSa6TERGEv-B.mjs +0 -3410
- package/node/esm/Dezt2uIDqlxjiuk5.mjs +0 -170
- package/types/src/legacyChart/OOXMLMappings.d.ts +0 -8
- package/types/src/legacyChart/OOXMLUtils.d.ts +0 -78
- package/types/src/legacyChart/ToOOXMLConverter.d.ts +0 -30
- package/types/src/reader/domVisitors/AxisVisitor.d.ts +0 -12
- package/types/src/reader/domVisitors/BarChartTypeVisitor.d.ts +0 -6
- package/types/src/reader/domVisitors/ChartSpaceVisitor.d.ts +0 -6
- package/types/src/reader/domVisitors/ChartTypeVisitor.d.ts +0 -7
- package/types/src/reader/domVisitors/ChartVisitor.d.ts +0 -7
- package/types/src/reader/domVisitors/DataLabelsVisitor.d.ts +0 -8
- package/types/src/reader/domVisitors/DataPointVisitor.d.ts +0 -6
- package/types/src/reader/domVisitors/HyperlinkVisitor.d.ts +0 -6
- package/types/src/reader/domVisitors/LayoutVisitor.d.ts +0 -5
- package/types/src/reader/domVisitors/LegendEntryVisitor.d.ts +0 -5
- package/types/src/reader/domVisitors/LegendVisitor.d.ts +0 -5
- package/types/src/reader/domVisitors/MarkerVisitor.d.ts +0 -5
- package/types/src/reader/domVisitors/NegativeShapeVisitor.d.ts +0 -6
- package/types/src/reader/domVisitors/PlotAreaVisitor.d.ts +0 -5
- package/types/src/reader/domVisitors/RichValueDataVisitor.d.ts +0 -7
- package/types/src/reader/domVisitors/RichValueStructureVisitor.d.ts +0 -6
- package/types/src/reader/domVisitors/SeriesVisitor.d.ts +0 -8
- package/types/src/reader/domVisitors/TitleVisitor.d.ts +0 -9
- package/types/src/writer/emitters/ChartColorsEmitter.d.ts +0 -7
- package/types/src/writer/emitters/ChartEmitter.d.ts +0 -14
- package/types/src/writer/emitters/ChartStyleEmitter.d.ts +0 -46
- package/types/src/writer/utils/HiddenFormulaXfs.d.ts +0 -28
|
@@ -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
|
|
@@ -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 {
|
|
@@ -5,12 +5,17 @@ export declare abstract class Emitter<T = any> implements IEmitter<T> {
|
|
|
5
5
|
protected _contentType: string;
|
|
6
6
|
protected _relTypeUri: string;
|
|
7
7
|
protected _path: string | ((instance: T) => string) | undefined;
|
|
8
|
+
protected _regeneratesRelationships: boolean;
|
|
8
9
|
constructor(options: {
|
|
9
10
|
kind: string;
|
|
10
11
|
contentType: string;
|
|
11
12
|
relTypeUri: string;
|
|
12
13
|
path?: string | ((instance: T) => string);
|
|
14
|
+
/** {@inheritdoc IEmitter.regeneratesRelationships} */
|
|
15
|
+
regeneratesRelationships?: boolean;
|
|
13
16
|
});
|
|
17
|
+
/** @inheritdoc IEmitter.regeneratesRelationships */
|
|
18
|
+
regeneratesRelationships(): boolean;
|
|
14
19
|
/** @inheritdoc IEmitter.emit */
|
|
15
20
|
abstract emit(instance: T, ctx: EmitContext): Promise<void> | void;
|
|
16
21
|
/** @inheritdoc IEmitter.getKind */
|
|
@@ -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 {
|
|
@@ -59,26 +59,19 @@ export declare class PackageBuilder<Out> {
|
|
|
59
59
|
private _scheduledByNodeKey;
|
|
60
60
|
private _nodesByPath;
|
|
61
61
|
private _writtenPaths;
|
|
62
|
+
/** Claimed paths whose emitter regenerates every relationship ({@link IEmitter.regeneratesRelationships}). */
|
|
63
|
+
private _regeneratedPaths;
|
|
62
64
|
private _partWriter;
|
|
63
65
|
private _registry;
|
|
64
66
|
private _options;
|
|
65
67
|
private _sourcePackage;
|
|
66
68
|
/** See {@link PackageBuilderOptions.macroEnabled}. */
|
|
67
69
|
private _macroEnabled;
|
|
70
|
+
/** See {@link PackageBuilderOptions.template}. */
|
|
71
|
+
private _template;
|
|
68
72
|
private _explicitRelTargets;
|
|
69
73
|
private _mapState;
|
|
70
74
|
constructor(zip: IZipBackend<Out>, registry: EmitterRegistry, options?: PackageBuilderOptions);
|
|
71
|
-
/**
|
|
72
|
-
* Whether a source part named `name` will be in this package once {@link _passthroughSourceParts}
|
|
73
|
-
* has run — the drop rules of `DESIGN-PACKAGE-PASSTHROUGH.md` §4, as one predicate. `false` when
|
|
74
|
-
* there is no source package or it has no such part.
|
|
75
|
-
*
|
|
76
|
-
* @remarks
|
|
77
|
-
* Does not consider whether an emitter claimed the *path* — that part is then in the package, but
|
|
78
|
-
* as the emitter's, not the source's. It does consider whether the reader took the part onto the
|
|
79
|
-
* model ({@link ISourcePackage.isAbsorbed}), which is a different question: the model writes that
|
|
80
|
-
* part wherever its own numbering puts it, which need not be where the source had it.
|
|
81
|
-
*/
|
|
82
75
|
private _isSourcePartCarried;
|
|
83
76
|
/**
|
|
84
77
|
* Hold the source's own relationship ids back in `partPath`'s set, before the emitter rewriting
|
|
@@ -98,15 +91,6 @@ export declare class PackageBuilder<Out> {
|
|
|
98
91
|
* @returns The resulting package as a Uint8Array.
|
|
99
92
|
*/
|
|
100
93
|
build(options?: ZipBackendCloseOptions): Promise<Uint8Array>;
|
|
101
|
-
/**
|
|
102
|
-
* Copy through every source-package part no emitter claimed, once emission is complete and
|
|
103
|
-
* {@link _writtenPaths} is final. See `DESIGN-PACKAGE-PASSTHROUGH.md` §4 (bucket rules) and §6
|
|
104
|
-
* (the rels/content-types merge).
|
|
105
|
-
*
|
|
106
|
-
* @remarks
|
|
107
|
-
* No re-fetch, no residue map: this only ever reads the bytes handed in via
|
|
108
|
-
* {@link PackageBuilderOptions.sourcePackage} — see the design doc's non-goals (§7).
|
|
109
|
-
*/
|
|
110
94
|
private _passthroughSourceParts;
|
|
111
95
|
/**
|
|
112
96
|
* Declare the workbook part's macro-enabled **variant** of `CT_Workbook` when the package being
|
|
@@ -134,27 +118,6 @@ export declare class PackageBuilder<Out> {
|
|
|
134
118
|
* would let a stale declaration through on anything.
|
|
135
119
|
*/
|
|
136
120
|
private _applyWorkbookContentTypeVariant;
|
|
137
|
-
/**
|
|
138
|
-
* Seed `sourcePart`'s {@link IRelationshipSet} with the source's edges, each under the source's
|
|
139
|
-
* own id. Targets are carried forward as-is (still relative to the same referencing part, at the
|
|
140
|
-
* same OPC path) — nothing to recompute.
|
|
141
|
-
*
|
|
142
|
-
* @remarks
|
|
143
|
-
* Which edges come back depends on who wrote the part (`DESIGN-PACKAGE-PASSTHROUGH.md` §6):
|
|
144
|
-
*
|
|
145
|
-
* - A **preserved** part is the source's bytes, so its XML still cites the ids the source's
|
|
146
|
-
* `.rels` defined; every edge whose target is still in the package comes back with that id.
|
|
147
|
-
* Nothing else ever wrote into this set, so the ids are free.
|
|
148
|
-
* - A **rewritten** part (the root, or one an emitter claimed) had its emitter recreate the edges
|
|
149
|
-
* it cites, so only what the emitter did not recreate is added: not an edge whose target an
|
|
150
|
-
* emitter claimed (its own, correct edge exists already — keeping both would duplicate it), not
|
|
151
|
-
* one added by name through `addRelationship`. The set had the source's ids reserved before
|
|
152
|
-
* the emitter allocated ({@link _reserveSourceRelIds}), so these too keep their names —
|
|
153
|
-
* unless an emitter took the id as a hint for a different target, in which case it is fresh.
|
|
154
|
-
*
|
|
155
|
-
* An edge whose target did not survive at all is dropped either way (§5). A `TargetMode="External"`
|
|
156
|
-
* or `#`-fragment target is not a part and is never resolved as one.
|
|
157
|
-
*/
|
|
158
121
|
private _mergeSourceRelsInto;
|
|
159
122
|
/**
|
|
160
123
|
* Add a root part to the package.
|
|
@@ -161,26 +161,20 @@ 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
|
+
addRelationship(relTypeUri: string, targetPartPath: string, idHint?: string): string | null;
|
|
164
165
|
/**
|
|
165
|
-
*
|
|
166
|
-
*
|
|
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).
|
|
166
|
+
* Whether the package will hold the source package's own bytes at `partPath`: the source has the
|
|
167
|
+
* part, the passthrough carries it, and no emitter has claimed the path so far.
|
|
170
168
|
*
|
|
171
|
-
* @
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
*
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
* @
|
|
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.
|
|
169
|
+
* @remarks
|
|
170
|
+
* The question a replayed source fragment asks before citing a part: {@link addRelationship}
|
|
171
|
+
* accepts a path an emitter wrote, and what an emitter wrote there may be a different part of the
|
|
172
|
+
* same kind (the writer numbers pivot caches its own way). An emitter scheduled later can still
|
|
173
|
+
* claim the path, so ask once the parts that could collide have been added.
|
|
174
|
+
*
|
|
175
|
+
* @param partPath The part's absolute path (relative to the package root, no leading `/`).
|
|
182
176
|
*/
|
|
183
|
-
|
|
177
|
+
carriesSourcePart(partPath: string): boolean;
|
|
184
178
|
/**
|
|
185
179
|
* Waits for all dependants to be emitted.
|
|
186
180
|
*/
|
|
@@ -263,6 +257,16 @@ export interface IEmitter<T = any> {
|
|
|
263
257
|
* The function that emits this part
|
|
264
258
|
*/
|
|
265
259
|
emit: (instance: T, ctx: EmitContext) => Promise<void> | void;
|
|
260
|
+
/**
|
|
261
|
+
* Whether this emitter creates every relationship its part cites, so that nothing of the source
|
|
262
|
+
* part's relationship set — neither its ids nor its edges — is kept for it.
|
|
263
|
+
*
|
|
264
|
+
* @remarks
|
|
265
|
+
* The default keeps the source's ids reserved and merges its leftover edges back in, for a part
|
|
266
|
+
* that still replays fragments of the source citing them. One that regenerates the whole part
|
|
267
|
+
* from the model answers `true`; otherwise every save would add the source's edges beside its own.
|
|
268
|
+
*/
|
|
269
|
+
regeneratesRelationships?: () => boolean;
|
|
266
270
|
/**
|
|
267
271
|
* Returns the default path for this part instance.
|
|
268
272
|
*
|
|
@@ -286,11 +290,6 @@ export interface PackageBuilderOptions {
|
|
|
286
290
|
* A map that can be used across emitters to share state.
|
|
287
291
|
*/
|
|
288
292
|
mapState?: Map<string, any>;
|
|
289
|
-
/**
|
|
290
|
-
* The source package to seed the build from, if the destination is being saved back into the same
|
|
291
|
-
* OOXML package family it was read from. Parts no emitter claims are copied through verbatim
|
|
292
|
-
* instead of being dropped. See `DESIGN-PACKAGE-PASSTHROUGH.md`.
|
|
293
|
-
*/
|
|
294
293
|
sourcePackage?: ISourcePackage | null;
|
|
295
294
|
/**
|
|
296
295
|
* Whether the package being built is macro-enabled (`.xlsm`) rather than plain (`.xlsx`).
|
|
@@ -304,6 +303,13 @@ export interface PackageBuilderOptions {
|
|
|
304
303
|
* a source's VBA project, matching Excel's own *Save As*.
|
|
305
304
|
*/
|
|
306
305
|
macroEnabled?: boolean;
|
|
306
|
+
/**
|
|
307
|
+
* Whether the package being built is a template (`.xltx`/`.xltm`). Only the `xl/workbook.xml`
|
|
308
|
+
* content-type variant follows from it.
|
|
309
|
+
*
|
|
310
|
+
* @defaultValue false
|
|
311
|
+
*/
|
|
312
|
+
template?: boolean;
|
|
307
313
|
/**
|
|
308
314
|
* Callback invoked when a part is emitted.
|
|
309
315
|
*
|
|
@@ -344,12 +350,6 @@ export interface ISourcePackagePart {
|
|
|
344
350
|
readonly uncompressedSize: number;
|
|
345
351
|
readonly raw?: ISourcePackageRawPart;
|
|
346
352
|
}
|
|
347
|
-
/**
|
|
348
|
-
* Structural interface for a retained source package, seeded into {@link PackageBuilder} so an
|
|
349
|
-
* xlsx→xlsx round trip can copy through the parts nothing modeled instead of dropping them. Kept
|
|
350
|
-
* structural (not importing `../SourcePackage` directly) so `builder/` stays format-agnostic — see
|
|
351
|
-
* `DESIGN-PACKAGE-PASSTHROUGH.md` §6.
|
|
352
|
-
*/
|
|
353
353
|
export interface ISourcePackage {
|
|
354
354
|
getNames(): string[];
|
|
355
355
|
has(name: string): boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IComment,
|
|
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:
|
|
19
|
+
sheet: IWorksheet;
|
|
20
20
|
comments: CommentHandle[];
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
@@ -34,13 +34,19 @@ export declare class CommentsEmitter extends Emitter<CommentsPartHandle> {
|
|
|
34
34
|
emit(handle: CommentsPartHandle, ctx: EmitContext): Promise<void>;
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
|
-
* The text a pre-2018 Excel shows for a thread it cannot read, as Excel itself writes it
|
|
37
|
+
* The text a pre-2018 Excel shows for a thread it cannot read, as Excel itself writes it: the
|
|
38
|
+
* root, then each reply.
|
|
38
39
|
*/
|
|
39
40
|
export declare function shadowText(comment: IComment): string;
|
|
40
41
|
/**
|
|
41
42
|
* `<r><rPr/><t>` per run, or a single `<t>` for plain text.
|
|
42
43
|
*/
|
|
43
|
-
export declare function writeRichText(xml: IXmlWriter, content: IComment.Content): void;
|
|
44
|
+
export declare function writeRichText(xml: IXmlWriter, content: IComment.Content, theme: ITheme): void;
|
|
45
|
+
/**
|
|
46
|
+
* A run's `<rPr>`, in the order Excel writes it. Only what the run sets is written, and a property
|
|
47
|
+
* set off (`weight: 400`) is written off, since it overrides whatever the run would inherit.
|
|
48
|
+
*/
|
|
49
|
+
export declare function writeRunProperties(xml: IXmlWriter, font: IFontStyle.JSON, theme: ITheme): void;
|
|
44
50
|
/**
|
|
45
51
|
* The cell address of a comment, or `null` when its cell is gone.
|
|
46
52
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IResourceCollection, IMovable,
|
|
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:
|
|
9
|
+
sheet: IWorksheet;
|
|
10
10
|
movables?: IMovable[];
|
|
11
11
|
jsonMovables?: IMovable.JSON[];
|
|
12
12
|
resources: IResourceCollection;
|
|
@@ -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
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IWorksheet } from '@sheetxl/sdk';
|
|
2
2
|
import { Emitter, EmitContext } from '../builder';
|
|
3
3
|
/**
|
|
4
|
-
* Writes a sheet's legacy drawing ({@link
|
|
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<
|
|
13
|
+
export declare class LegacyDrawingEmitter extends Emitter<IWorksheet.LegacyDrawingJSON> {
|
|
14
14
|
constructor();
|
|
15
15
|
/** @inheritdoc IEmitter.emit */
|
|
16
|
-
emit(legacyDrawing:
|
|
16
|
+
emit(legacyDrawing: IWorksheet.LegacyDrawingJSON, ctx: EmitContext): Promise<void>;
|
|
17
17
|
}
|
|
18
18
|
//# sourceMappingURL=LegacyDrawingEmitter.d.ts.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IPivotTable } from '@sheetxl/sdk';
|
|
2
2
|
import { Emitter, EmitContext } from '../builder';
|
|
3
|
+
import { PivotStylesWrite } from '../../pivot/PivotFormats';
|
|
3
4
|
/** The relationship a pivot table has to the cache it summarizes. */
|
|
4
5
|
export declare const REL_TYPE_PIVOT_CACHE_DEFINITION = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheDefinition";
|
|
5
6
|
/**
|
|
@@ -8,6 +9,8 @@ export declare const REL_TYPE_PIVOT_CACHE_DEFINITION = "http://schemas.openxmlfo
|
|
|
8
9
|
* {@link writePivotCaches}.
|
|
9
10
|
*/
|
|
10
11
|
export declare const SHARED_STATE_PIVOT_CACHE_PATHS = "pivotCachePaths";
|
|
12
|
+
/** The `pivotCacheId` the cache with this id was written with, for a pivot slicer's items; `null` if none. */
|
|
13
|
+
export declare const slicerPivotCacheIdOf: (ctx: EmitContext, cacheId: number) => string | null;
|
|
11
14
|
/**
|
|
12
15
|
* Writes a sheet's {@link IPivotTable | pivot table} back out as the part it was read from.
|
|
13
16
|
*
|
|
@@ -27,18 +30,44 @@ export declare class PivotTableEmitter extends Emitter<IPivotTable.JSON> {
|
|
|
27
30
|
/** @inheritdoc IEmitter.emit */
|
|
28
31
|
emit(pivotTable: IPivotTable.JSON, ctx: EmitContext): Promise<void>;
|
|
29
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* The sheet's pivot rules as written: each rule's key (`IConditionalFormat.JSON.pivotKey`, its
|
|
35
|
+
* priority as read) to the priority it was written with.
|
|
36
|
+
*/
|
|
37
|
+
export type PivotConditionalKeys = Map<number, number>;
|
|
38
|
+
/**
|
|
39
|
+
* `xml` with each `<conditionalFormat priority>` of the table restated as the priority its sheet
|
|
40
|
+
* rule was written with, and one whose rule was not written removed.
|
|
41
|
+
*
|
|
42
|
+
* @remarks
|
|
43
|
+
* The table names its conditional formats by the sheet-wide `<cfRule priority>`, and the writer
|
|
44
|
+
* renumbers those 1..N. A table entry that names no pivot rule, or a rule that is not the table's,
|
|
45
|
+
* is a file Excel opens only through repair (`pivot-probes/probe-pivot-cf.ps1`, 2026-10-24).
|
|
46
|
+
*/
|
|
47
|
+
export declare const remapConditionalFormats: (xml: string, keys: PivotConditionalKeys) => string;
|
|
48
|
+
/**
|
|
49
|
+
* The save's ids for the formats a pivot part cites: number formats from the styles laid out
|
|
50
|
+
* before any part emits ({@link STYLES_LAYOUT_SHARED_STATE}), differential formats added to the
|
|
51
|
+
* dxfs the worksheets collect.
|
|
52
|
+
*/
|
|
53
|
+
export declare const pivotStylesWriteOf: (ctx: EmitContext) => PivotStylesWrite;
|
|
30
54
|
/** Where the workbook wrote the cache with this id, or `null` if it wrote none. */
|
|
31
55
|
export declare const cachePathFor: (ctx: EmitContext, cacheId: number) => string | null;
|
|
32
56
|
/**
|
|
33
57
|
* Adds the workbook's pivot caches to the package, each with the records part its definition
|
|
34
58
|
* references, and leaves where each landed in the shared states for the tables to find.
|
|
35
59
|
*
|
|
60
|
+
* A cache is written as the part it was read from while it has one (it is unchanged since load),
|
|
61
|
+
* its source restated where the engine moved it, and from its model otherwise.
|
|
62
|
+
*
|
|
36
63
|
* @remarks
|
|
37
64
|
* Called by `WorkbookEmitter` **before** it schedules the sheets, since a table's relationship to
|
|
38
65
|
* its cache needs the cache's path to exist by the time the sheet's part emits; the `<pivotCaches>`
|
|
39
66
|
* element itself is written later, where `CT_Workbook` puts it, from the ids returned here.
|
|
67
|
+
*
|
|
68
|
+
* @param slicerCacheIds The caches pivot slicers index: each is written with a `pivotCacheId`.
|
|
40
69
|
*/
|
|
41
|
-
export declare const writePivotCaches: (ctx: EmitContext, pivotCaches: readonly IPivotTable.CacheJSON[] | undefined) => Promise<{
|
|
70
|
+
export declare const writePivotCaches: (ctx: EmitContext, pivotCaches: readonly IPivotTable.CacheJSON[] | undefined, date1904?: boolean, slicerCacheIds?: ReadonlySet<number>) => Promise<{
|
|
42
71
|
cacheId: number;
|
|
43
72
|
relId: string;
|
|
44
73
|
}[]>;
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
import { IWorkbook } from '@sheetxl/sdk';
|
|
1
2
|
import { Emitter, EmitContext } from '../builder';
|
|
2
|
-
export declare class PropsCoreEmitter extends Emitter<
|
|
3
|
+
export declare class PropsCoreEmitter extends Emitter<ModelHandle> {
|
|
3
4
|
constructor();
|
|
4
5
|
/** @inheritdoc IEmitter.emit */
|
|
5
|
-
emit(
|
|
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 {
|
|
2
|
+
import { RichPrimitiveType } from '../../richValue';
|
|
3
|
+
import { RichValueCollector } from '../utils/RichValueCollector';
|
|
3
4
|
/**
|
|
4
|
-
* Emits `rdrichvaluestructure.xml` — one `<s>` element per
|
|
5
|
-
*
|
|
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<
|
|
6
|
+
export declare class RichValueTypesEmitter extends Emitter<RichValueCollector | null> {
|
|
6
7
|
constructor();
|
|
7
8
|
/** @inheritdoc IEmitter.emit */
|
|
8
|
-
emit(
|
|
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
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ITheme, RichText } from '@sheetxl/sdk';
|
|
2
2
|
import { Emitter, EmitContext } from '../builder';
|
|
3
3
|
export declare class SharedStringsEmitter extends Emitter<ModelHandle> {
|
|
4
4
|
constructor();
|
|
@@ -6,8 +6,11 @@ export declare class SharedStringsEmitter extends Emitter<ModelHandle> {
|
|
|
6
6
|
emit(sharedStrings: ModelHandle, ctx: EmitContext): Promise<void>;
|
|
7
7
|
}
|
|
8
8
|
type ModelHandle = {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
/** The strings, a `RichText` for one with runs. */
|
|
10
|
+
json: (string | RichText)[];
|
|
11
|
+
model: (string | RichText)[];
|
|
12
|
+
/** The workbook theme, for a run's theme color. */
|
|
13
|
+
theme?: ITheme;
|
|
11
14
|
};
|
|
12
15
|
export {};
|
|
13
16
|
//# sourceMappingURL=SharedStringsEmitter.d.ts.map
|