@sheetxl/io-xlsx 0.8.0-beta.10 → 0.8.0-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/esm/{NQIuOQIleHC4NUW6.mjs → BiDqExNXiY7ykk8E.mjs} +527 -646
- package/browser/esm/{2EOdn2WRK5y1L58S.mjs → Bs0EzhdU8WgGfPzf.mjs} +2 -2
- package/browser/esm/CLWsOc6DO8l1G_LF.mjs +2213 -0
- package/browser/esm/{xc_LzCPgHn-acgFZ.mjs → CZ9I80og75SDRjv0.mjs} +2 -2
- package/browser/esm/{DXopGe8PrLWmwGaV.mjs → CuAXx5i4uqTz-mMY.mjs} +1 -1
- package/browser/esm/{BLXcoiDAaOMjFuhw.mjs → Cv3R6fGatARKedSn.mjs} +2531 -1952
- package/browser/esm/{B-jb5SuiVh5NnBG_.mjs → CzFYJPxmLyKgEKF0.mjs} +2 -2
- package/browser/esm/{BKT8OBj-bhQwdg49.mjs → DICL6ecj9BdJv8aX.mjs} +47 -10
- package/browser/esm/DatIA9fZbEPjW4bh.mjs +5638 -0
- package/browser/esm/index.mjs +2 -2
- package/browser/esm/{CI_CZI5m5-KkiAK5.mjs → yveeVJ6hKDI5KDEz.mjs} +1599 -990
- package/node/esm/B9Zn6H1RV07Ob377.mjs +2294 -0
- package/node/esm/Bpqm_PpGLpdjL47-.mjs +2368 -0
- package/node/esm/{BmdmvgO5Zdgx-RWo.mjs → CAJxmJdobUbzpUz5.mjs} +2 -2
- package/node/esm/{CHqRP_NjPpPd7m9L.mjs → CxlSbH7mmnEEsqmX.mjs} +1 -1
- package/node/esm/DD-yXSBzvDYy0TX5.mjs +5842 -0
- package/node/esm/{nNQ7MG89sGKwkjMA.mjs → DScqM1V4wPntNP6-.mjs} +1672 -1086
- package/node/esm/{O5mti2R9drFOlXc7.mjs → fopiRR7OiVoEiF7B.mjs} +2 -2
- package/node/esm/index.mjs +64 -27
- package/node/esm/{CtAF486aZqYzMeLM.mjs → ipiyzn5Pfohw2afB.mjs} +1777 -1157
- package/package.json +3 -3
- package/types/src/AutoFilterRules.d.ts +8 -1
- package/types/src/DefinedNameAttributes.d.ts +8 -0
- package/types/src/ExcelCompat.d.ts +15 -3
- package/types/src/KnownFonts.d.ts +50 -0
- package/types/src/LegacyFormula.d.ts +13 -0
- package/types/src/PageLayoutAttributes.d.ts +8 -0
- package/types/src/Plugin.d.ts +12 -0
- package/types/src/ProtectionAttributes.d.ts +2 -2
- package/types/src/SheetKinds.d.ts +57 -0
- package/types/src/SheetViewAttributes.d.ts +4 -0
- package/types/src/SortExtent.d.ts +16 -0
- package/types/src/Types.d.ts +11 -0
- 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 +36 -0
- package/types/src/chart/_XmlTree.d.ts +34 -0
- package/types/src/chart/_chartCodecs.d.ts +10 -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 +22 -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/reader/DocumentPropertiesRead.d.ts +16 -0
- package/types/src/reader/DummyFunctionUnwrap.d.ts +2 -2
- 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 +11 -0
- package/types/src/reader/domVisitors/AppPropertiesVisitor.d.ts +13 -1
- package/types/src/reader/domVisitors/AutoFilterVisitor.d.ts +3 -3
- package/types/src/reader/domVisitors/CommentVisitor.d.ts +2 -2
- package/types/src/reader/domVisitors/DrawingElementVisitor.d.ts +3 -1
- package/types/src/reader/domVisitors/DrawingGraphicFrameVisitor.d.ts +2 -2
- package/types/src/reader/domVisitors/DrawingPicVisitor.d.ts +23 -8
- package/types/src/reader/domVisitors/FontSchemeVisitor.d.ts +3 -2
- package/types/src/reader/domVisitors/ObjectDefaultsVisitor.d.ts +11 -0
- package/types/src/reader/domVisitors/SheetColorContainerVisitor.d.ts +2 -2
- package/types/src/reader/domVisitors/SheetStyleVisitor.d.ts +2 -0
- package/types/src/reader/domVisitors/SortStateVisitor.d.ts +2 -2
- package/types/src/reader/domVisitors/ThreadedCommentsVisitor.d.ts +2 -2
- package/types/src/reader/domVisitors/_Dxfs.d.ts +10 -0
- package/types/src/reader/domVisitors/index.d.ts +2 -30
- package/types/src/reader/saxVisitors/SharedStringsVisitor.d.ts +46 -6
- package/types/src/reader/saxVisitors/WorksheetVisitor.d.ts +16 -11
- package/types/src/utils/DrawingMLText.d.ts +2 -2
- package/types/src/utils/FormControls.d.ts +4 -4
- 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 +16 -23
- package/types/src/utils/VmlNoteStyle.d.ts +44 -0
- package/types/src/utils/VmlPrefixes.d.ts +24 -0
- package/types/src/writer/builder/PackageBuilder.d.ts +2 -0
- package/types/src/writer/builder/Types.d.ts +7 -0
- package/types/src/writer/emitters/CommentsEmitter.d.ts +3 -3
- package/types/src/writer/emitters/DrawingEmitter.d.ts +2 -2
- package/types/src/writer/emitters/LegacyDrawingEmitter.d.ts +4 -4
- 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/SharedStringsEmitter.d.ts +6 -3
- package/types/src/writer/emitters/SlicerEmitter.d.ts +3 -3
- package/types/src/writer/emitters/WorkbookEmitter.d.ts +5 -0
- package/types/src/writer/emitters/WorksheetEmitter.d.ts +4 -3
- package/types/src/writer/utils/AutoFilter.d.ts +1 -1
- package/types/src/writer/utils/DefaultRows.d.ts +38 -0
- package/types/src/writer/utils/DxfCollector.d.ts +11 -8
- package/types/src/writer/utils/HiddenFormulaXfs.d.ts +1 -1
- package/types/src/writer/utils/SheetStyleLayout.d.ts +73 -0
- package/types/src/writer/utils/TextUtils.d.ts +6 -1
- package/types/src/writer/utils/UnsupportedFunctions.d.ts +2 -2
- package/browser/esm/BPmehfSqdvgsLBsB.mjs +0 -5153
- package/node/esm/BpxxiZ2oKPkUSfdB.mjs +0 -2486
- package/node/esm/QS_theNoeqNGLStj.mjs +0 -5298
- 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/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/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
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IShape, ITheme } from '@sheetxl/sdk';
|
|
2
|
+
import { Visitor, ExecutionContext } from '../dom';
|
|
3
|
+
/**
|
|
4
|
+
* A theme's `objectDefaults`: each of `spDef`, `lnDef` and `txDef` read as the shape JSON it gives a
|
|
5
|
+
* new object, its style references in full.
|
|
6
|
+
*/
|
|
7
|
+
export declare class ObjectDefaultsVisitor implements Visitor {
|
|
8
|
+
visit(context: ExecutionContext, elemParent: Element, jsonParent: ITheme.JSON): object;
|
|
9
|
+
processDefault(context: ExecutionContext, elemDef: Element): IShape.JSON;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=ObjectDefaultsVisitor.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IFill, IBorders,
|
|
1
|
+
import { IFill, IBorders, IFontStyle } from '@sheetxl/sdk';
|
|
2
2
|
import { Visitor, ExecutionContext } from '../dom';
|
|
3
3
|
export declare class SheetColorContainerVisitor implements Visitor {
|
|
4
4
|
visit(_context: ExecutionContext, _elemParent: Element, _jsonParent: any): any;
|
|
@@ -7,7 +7,7 @@ export declare class SheetColorContainerVisitor implements Visitor {
|
|
|
7
7
|
*/
|
|
8
8
|
processDataBarColor(context: ExecutionContext, elemColor: Element, jsonParent: any, key: string, auto?: string): any;
|
|
9
9
|
processFonts(context: ExecutionContext, elem: Element, jsonParent: any): any;
|
|
10
|
-
processFont(context: ExecutionContext, elem: Element, jsonFont:
|
|
10
|
+
processFont(context: ExecutionContext, elem: Element, jsonFont: IFontStyle.Properties<string>): any;
|
|
11
11
|
processFills(context: ExecutionContext, elem: Element, jsonParent: any): any;
|
|
12
12
|
processFill(context: ExecutionContext, elem: Element, jsonParent: any, index: number): any;
|
|
13
13
|
processGradientFill(context: ExecutionContext, elem: Element, jsonParent: IFill.GradientJSON): any;
|
|
@@ -3,6 +3,8 @@ import { Visitor, ExecutionContext } from '../dom';
|
|
|
3
3
|
import { SheetColorContainerVisitor } from './SheetColorContainerVisitor';
|
|
4
4
|
export declare class SheetStyleVisitor extends SheetColorContainerVisitor implements Visitor {
|
|
5
5
|
visit(context: ExecutionContext, elem: Element, jsonParent: IStyleCollection.JSON): any;
|
|
6
|
+
/** The font of the Normal style (`builtinId` 0): its named xf's `fontId`, 0 when not stated. */
|
|
7
|
+
normalFontId(context: ExecutionContext, elem: Element): number;
|
|
6
8
|
processIndexColors(context: ExecutionContext, elem: Element, jsonParent: any): void;
|
|
7
9
|
processMruColors(context: ExecutionContext, elem: Element, jsonParent: any): void;
|
|
8
10
|
processNumFmts(context: ExecutionContext, elem: Element, _jsonParent: any[] | null): void;
|
|
@@ -2,7 +2,7 @@ import { IRange, ITable, ISort } from '@sheetxl/sdk';
|
|
|
2
2
|
import { Visitor, ExecutionContext } from '../dom';
|
|
3
3
|
export declare class SortStateVisitor implements Visitor {
|
|
4
4
|
visit(context: ExecutionContext, elem: Element, jsonParent: ITable.JSON): ISort.JSON | undefined;
|
|
5
|
-
processSortCondition(context: ExecutionContext, elem: Element, refRange: IRange.Coords, defaultCriteria: ISort.Criteria): ISort.Options | null | undefined;
|
|
6
|
-
processSortConditions(context: ExecutionContext, elem: Element, sorts: ISort.Options[], refRange: IRange.Coords, defaultCriteria: ISort.Criteria): void;
|
|
5
|
+
processSortCondition(context: ExecutionContext, elem: Element, refRange: IRange.Coords, defaultCriteria: ISort.Criteria, conditionRefs?: IRange.Coords[]): ISort.Options | null | undefined;
|
|
6
|
+
processSortConditions(context: ExecutionContext, elem: Element, sorts: ISort.Options[], refRange: IRange.Coords, defaultCriteria: ISort.Criteria, conditionRefs?: IRange.Coords[]): void;
|
|
7
7
|
}
|
|
8
8
|
//# sourceMappingURL=SortStateVisitor.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IRange,
|
|
1
|
+
import { IRange, IWorksheet } from '@sheetxl/sdk';
|
|
2
2
|
import { Visitor, ExecutionContext } from '../dom';
|
|
3
3
|
export declare class ThreadedCommentsVisitor implements Visitor {
|
|
4
|
-
visit(context: ExecutionContext, elem: Element, jsonParent:
|
|
4
|
+
visit(context: ExecutionContext, elem: Element, jsonParent: IWorksheet.JSON): IRange.JSONReferenceEntry<any>[] | undefined;
|
|
5
5
|
}
|
|
6
6
|
//# sourceMappingURL=ThreadedCommentsVisitor.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ICellStyle } from '@sheetxl/sdk';
|
|
2
|
+
import { ExecutionContext } from '../dom';
|
|
3
|
+
/**
|
|
4
|
+
* The format an element's `dxfId` names, for a color filter or sort, read from the styles part's
|
|
5
|
+
* `<dxfs>` (`SheetStyleVisitor.processDXFs`).
|
|
6
|
+
*
|
|
7
|
+
* @returns `undefined` without a `dxfId`; `{}` when the id is not in the table.
|
|
8
|
+
*/
|
|
9
|
+
export declare const readDxfAttribute: (context: ExecutionContext, elem: Element) => ICellStyle.Properties | undefined;
|
|
10
|
+
//# sourceMappingURL=_Dxfs.d.ts.map
|
|
@@ -1,27 +1,13 @@
|
|
|
1
1
|
import { RelsVisitor } from './RelsVisitor';
|
|
2
2
|
import { CorePropertiesVisitor } from './CorePropertiesVisitor';
|
|
3
3
|
import { AppPropertiesVisitor } from './AppPropertiesVisitor';
|
|
4
|
-
import { ChartSpaceVisitor } from './ChartSpaceVisitor';
|
|
5
|
-
import { ChartVisitor } from './ChartVisitor';
|
|
6
|
-
import { PlotAreaVisitor } from './PlotAreaVisitor';
|
|
7
4
|
import { ShapePropertiesVisitor } from './ShapePropertiesVisitor';
|
|
8
|
-
import { BarChartTypeVisitor } from './BarChartTypeVisitor';
|
|
9
|
-
import { ChartTypeVisitor } from './ChartTypeVisitor';
|
|
10
|
-
import { DataLabelsVisitor } from './DataLabelsVisitor';
|
|
11
|
-
import { SeriesVisitor } from './SeriesVisitor';
|
|
12
|
-
import { DataPointVisitor } from './DataPointVisitor';
|
|
13
|
-
import { MarkerVisitor } from './MarkerVisitor';
|
|
14
|
-
import { AxisVisitor } from './AxisVisitor';
|
|
15
5
|
import { TextPropertiesVisitor } from './TextPropertiesVisitor';
|
|
16
6
|
import { ShapeTextVisitor } from './ShapeTextVisitor';
|
|
17
|
-
import { LegendEntryVisitor } from './LegendEntryVisitor';
|
|
18
|
-
import { LegendVisitor } from './LegendVisitor';
|
|
19
|
-
import { NegativeShapeVisitor } from './NegativeShapeVisitor';
|
|
20
|
-
import { TitleVisitor } from './TitleVisitor';
|
|
21
|
-
import { LayoutVisitor } from './LayoutVisitor';
|
|
22
7
|
import { ThemeVisitor } from './ThemeVisitor';
|
|
23
8
|
import { ClrSchemeVisitor } from './ClrSchemeVisitor';
|
|
24
9
|
import { FontSchemeVisitor } from './FontSchemeVisitor';
|
|
10
|
+
import { ObjectDefaultsVisitor } from './ObjectDefaultsVisitor';
|
|
25
11
|
import { FmtSchemeVisitor } from './FmtSchemeVisitor';
|
|
26
12
|
import { AutoFilterVisitor } from './AutoFilterVisitor';
|
|
27
13
|
import { SortStateVisitor } from './SortStateVisitor';
|
|
@@ -52,27 +38,13 @@ export declare const BuiltInVisitors: {
|
|
|
52
38
|
RelsVisitor: typeof RelsVisitor;
|
|
53
39
|
CorePropertiesVisitor: typeof CorePropertiesVisitor;
|
|
54
40
|
AppPropertiesVisitor: typeof AppPropertiesVisitor;
|
|
55
|
-
ChartSpaceVisitor: typeof ChartSpaceVisitor;
|
|
56
|
-
ChartVisitor: typeof ChartVisitor;
|
|
57
|
-
PlotAreaVisitor: typeof PlotAreaVisitor;
|
|
58
41
|
ShapePropertiesVisitor: typeof ShapePropertiesVisitor;
|
|
59
|
-
BarChartTypeVisitor: typeof BarChartTypeVisitor;
|
|
60
|
-
ChartTypeVisitor: typeof ChartTypeVisitor;
|
|
61
|
-
DataLabelsVisitor: typeof DataLabelsVisitor;
|
|
62
|
-
SeriesVisitor: typeof SeriesVisitor;
|
|
63
|
-
DataPointVisitor: typeof DataPointVisitor;
|
|
64
|
-
MarkerVisitor: typeof MarkerVisitor;
|
|
65
|
-
AxisVisitor: typeof AxisVisitor;
|
|
66
42
|
TextPropertiesVisitor: typeof TextPropertiesVisitor;
|
|
67
43
|
ShapeTextVisitor: typeof ShapeTextVisitor;
|
|
68
|
-
LegendEntryVisitor: typeof LegendEntryVisitor;
|
|
69
|
-
LegendVisitor: typeof LegendVisitor;
|
|
70
|
-
NegativeShapeVisitor: typeof NegativeShapeVisitor;
|
|
71
|
-
TitleVisitor: typeof TitleVisitor;
|
|
72
|
-
LayoutVisitor: typeof LayoutVisitor;
|
|
73
44
|
ThemeVisitor: typeof ThemeVisitor;
|
|
74
45
|
ClrSchemeVisitor: typeof ClrSchemeVisitor;
|
|
75
46
|
FontSchemeVisitor: typeof FontSchemeVisitor;
|
|
47
|
+
ObjectDefaultsVisitor: typeof ObjectDefaultsVisitor;
|
|
76
48
|
FmtSchemeVisitor: typeof FmtSchemeVisitor;
|
|
77
49
|
AutoFilterVisitor: typeof AutoFilterVisitor;
|
|
78
50
|
SortStateVisitor: typeof SortStateVisitor;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IRichText, IFontStyle } from '@sheetxl/sdk';
|
|
1
2
|
import { SaxParser } from '../sax';
|
|
2
3
|
/**
|
|
3
4
|
* Streaming SAX handler for `xl/sharedStrings.xml`, a flat repeated structure:
|
|
@@ -10,13 +11,52 @@ import { SaxParser } from '../sax';
|
|
|
10
11
|
* ```
|
|
11
12
|
*
|
|
12
13
|
* We collect all `<t>` text while inside an `<si>` and emit the concatenated,
|
|
13
|
-
* unescaped string when the `<si>` closes
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* (`<rPh>`/`<phoneticPr>`) are skipped so they don't leak into the value.
|
|
14
|
+
* unescaped string when the `<si>` closes, with the runs when the string has any
|
|
15
|
+
* (`<r>` with its `<rPr>`, read as the font properties it sets, as a note's runs are).
|
|
16
|
+
* Phonetic guides (`<rPh>`/`<phoneticPr>`) are skipped so they don't leak into the value.
|
|
17
17
|
*
|
|
18
|
-
* @param onString Called once per `<si>`, in document order, with the value
|
|
18
|
+
* @param onString Called once per `<si>`, in document order, with the value and, for a rich
|
|
19
|
+
* string, its runs.
|
|
19
20
|
* @param onWarning Optional sink for parse errors.
|
|
20
21
|
*/
|
|
21
|
-
export declare const createSharedStringsSaxVisitor: (onString: (text: string) => void, onWarning?: (message: string) => void) => SaxParser.EventHandler;
|
|
22
|
+
export declare const createSharedStringsSaxVisitor: (onString: (text: string, runs?: IRichText.Run[]) => void, onWarning?: (message: string) => void) => SaxParser.EventHandler;
|
|
23
|
+
/**
|
|
24
|
+
* Collects the `<r>` runs of a rich string from SAX events (a shared `<si>` or an inline `<is>`):
|
|
25
|
+
* each run's text and what its `<rPr>` sets. Fed the local names of the tags inside the string
|
|
26
|
+
* and the text inside its `<t>` elements.
|
|
27
|
+
*/
|
|
28
|
+
export declare class RunCollector {
|
|
29
|
+
private _runs;
|
|
30
|
+
private _text;
|
|
31
|
+
private _font;
|
|
32
|
+
private _inRun;
|
|
33
|
+
private _inRPr;
|
|
34
|
+
reset(): void;
|
|
35
|
+
onOpenTag(local: string, attributes: Record<string, string>): void;
|
|
36
|
+
/** The text inside a `<t>`; the caller gates it as it gates the string's own text. */
|
|
37
|
+
onText(text: string): void;
|
|
38
|
+
onCloseTag(local: string): void;
|
|
39
|
+
/**
|
|
40
|
+
* The runs collected since the last reset, or `null` when the string is plain: no `<r>` at
|
|
41
|
+
* all, or none with an `<rPr>` (runs that set nothing are only how some writers split text).
|
|
42
|
+
* Resets.
|
|
43
|
+
*/
|
|
44
|
+
take(): IRichText.Run[] | null;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* The runs as a cell holds them: a run with an `<rPr>` gets the whole font Excel reads it as,
|
|
48
|
+
* a run without one stays bare.
|
|
49
|
+
*
|
|
50
|
+
* @remarks
|
|
51
|
+
* Measured (`probe-rich-partial.ps1`, 2026-10-18): Excel reads an `<rPr>` as absolute over the
|
|
52
|
+
* workbook's DEFAULT font, not the cell's. `<rPr><i/></rPr>` over an Arial 12 bold cell renders
|
|
53
|
+
* Calibri 11 italic, not bold; an empty `<rPr/>` (openpyxl) renders the default font; only a run
|
|
54
|
+
* with no `<rPr>` inherits the cell font. So a run with an `<rPr>` is completed here from the
|
|
55
|
+
* default font with every toggle off, then what the `<rPr>` states; the run then means the same
|
|
56
|
+
* read as a delta over any cell font.
|
|
57
|
+
*
|
|
58
|
+
* @param defaultFont The workbook's Normal font (family, size, color); absent, Excel's
|
|
59
|
+
* own default.
|
|
60
|
+
*/
|
|
61
|
+
export declare function completeRuns(runs: readonly IRichText.Run[], defaultFont: IFontStyle.JSON | undefined): IRichText.Run[];
|
|
22
62
|
//# sourceMappingURL=SharedStringsVisitor.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Tuple,
|
|
1
|
+
import { Tuple, IWorksheet, ICell } from '@sheetxl/sdk';
|
|
2
2
|
import { SaxParser } from '../sax';
|
|
3
3
|
import { OnWarning } from '../Warning';
|
|
4
4
|
/**
|
|
@@ -6,7 +6,19 @@ import { OnWarning } from '../Warning';
|
|
|
6
6
|
* dialect (`XlsxFormulaDialect`), for condition formulas. Set before any sheet streams.
|
|
7
7
|
*/
|
|
8
8
|
export declare const PARAM_FORMULA_DIALECT = "formulaDialect";
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* The `paramMap` key under which the reader hands the worksheet visitor `workbookPr@date1904`, for
|
|
11
|
+
* `t="d"` cells. Read per cell, not when the visitor is made: it is set once `workbook.xml` is read,
|
|
12
|
+
* which is after the sheets' parses start but before any of their cells stream.
|
|
13
|
+
*/
|
|
14
|
+
export declare const PARAM_DATE_1904 = "date1904";
|
|
15
|
+
/** The runs of each rich shared string, by id (`Map<number, IRichText.Run[]>`). */
|
|
16
|
+
export declare const PARAM_RICH_STRINGS = "richStrings";
|
|
17
|
+
/** The workbook's Normal font (`IFontStyle.JSON`), which a rich run's `<rPr>` is read over. */
|
|
18
|
+
export declare const PARAM_DEFAULT_FONT = "defaultFont";
|
|
19
|
+
/** What an inline string resolves to: a shared-string id, or a rich value when it has runs. */
|
|
20
|
+
type InlineStringResult = number | ICell.JSONTypedValue | undefined;
|
|
21
|
+
export declare const createWorksheetSaxVisitor: (sheet: IWorksheet.JSON, getRef: (relId: string, as?: "resource" | "legacyDrawing" | "part" | "formControl") => any, // TODO - this should be a context like DOM.
|
|
10
22
|
addSharedString: (str: string) => number, mapDxfs?: Map<number, any>, onEnd?: () => void, onWarning?: OnWarning, onProgress?: (amount: number, total?: number) => void, paramMap?: Map<string, any>) => SaxParser.EventHandler;
|
|
11
23
|
export declare class RowAttributeType {
|
|
12
24
|
static Collapsed: number;
|
|
@@ -19,14 +31,7 @@ export declare class RowAttributeType {
|
|
|
19
31
|
static R: number;
|
|
20
32
|
static S: number;
|
|
21
33
|
static Spans: number;
|
|
22
|
-
static ThickBot: number;
|
|
23
|
-
static ThickTop: number;
|
|
24
34
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
*
|
|
28
|
-
* Under the lean parser, `<row>` start tags and `<c>` elements skip the generic tokenizer through
|
|
29
|
-
* the returned `elementScanners`.
|
|
30
|
-
*/
|
|
31
|
-
export declare const createSheetDataSaxVisitor: (tupleBuilder: Tuple.IBuilder<ICell.JSON>, sheet: ISheet.JSON, delegate: SaxParser.EventHandler, onWarning: OnWarning | undefined, onProgress: ((amount: number, total?: number) => void) | undefined, stringHandler: SaxParser.EventHandler<number | undefined>, paramMap?: Map<string, any>) => SaxParser.EventHandler;
|
|
35
|
+
export declare const createSheetDataSaxVisitor: (tupleBuilder: Tuple.IBuilder<ICell.JSON>, sheet: IWorksheet.JSON, delegate: SaxParser.EventHandler, onWarning: OnWarning | undefined, onProgress: ((amount: number, total?: number) => void) | undefined, stringHandler: SaxParser.EventHandler<InlineStringResult>, paramMap?: Map<string, any>, addSharedString?: (str: string) => number, isZeroHeight?: () => boolean) => SaxParser.EventHandler;
|
|
36
|
+
export {};
|
|
32
37
|
//# sourceMappingURL=WorksheetVisitor.d.ts.map
|
|
@@ -23,9 +23,9 @@ export declare const fontAlignment: Vocabulary<IText.FontAlignment>;
|
|
|
23
23
|
/** `bodyPr/@anchor`. */
|
|
24
24
|
export declare const anchor: Vocabulary<ITextFrame.VerticalAlignment>;
|
|
25
25
|
/** `rPr/@u`. */
|
|
26
|
-
export declare const underline: Vocabulary<
|
|
26
|
+
export declare const underline: Vocabulary<IFont.UnderlineStyle>;
|
|
27
27
|
/** `rPr/@strike`. */
|
|
28
|
-
export declare const strike: Vocabulary<
|
|
28
|
+
export declare const strike: Vocabulary<IFont.StrikeStyle>;
|
|
29
29
|
/** `bodyPr/@vert`. */
|
|
30
30
|
export declare const writingMode: Vocabulary<ITextFrame.WritingMode>;
|
|
31
31
|
/** `bodyPr/@vertOverflow` and `@horzOverflow`. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IFormControl, ICaptioned, IAnchored, Bounds, IMovable,
|
|
1
|
+
import { IFormControl, ICaptioned, IAnchored, Bounds, IMovable, IWorksheet, ITextFrame } from '@sheetxl/sdk';
|
|
2
2
|
/**
|
|
3
3
|
* A form control as Excel stores it, in and out of the model's form-control content types.
|
|
4
4
|
*
|
|
@@ -75,7 +75,7 @@ export declare function readControlTwin(text: ITextFrame.JSON | undefined): Cont
|
|
|
75
75
|
* frame in the group, and its `<controls>` anchor only restates that on the sheet. So the member
|
|
76
76
|
* becomes the control, and the control read from `<controls>` leaves the sheet.
|
|
77
77
|
*/
|
|
78
|
-
export declare function absorbControlTwins(sheet:
|
|
78
|
+
export declare function absorbControlTwins(sheet: IWorksheet.JSON): void;
|
|
79
79
|
/**
|
|
80
80
|
* The hidden `<xdr:sp>` the drawing part carries for a control, written from the model.
|
|
81
81
|
*
|
|
@@ -109,7 +109,7 @@ export interface SheetControl {
|
|
|
109
109
|
* and sizes as its group does. The JSON's movables are the sheet's (less notes) in order, and a
|
|
110
110
|
* group's members its own, in order.
|
|
111
111
|
*/
|
|
112
|
-
export declare function sheetControls(sheet:
|
|
112
|
+
export declare function sheetControls(sheet: IWorksheet, json: IWorksheet.JSON): SheetControl[];
|
|
113
113
|
/** The attributes an `mc:AlternateContent` around a twin's anchor declares. */
|
|
114
114
|
export declare const TWIN_ALTERNATE_CONTENT_ATTRIBUTES: {
|
|
115
115
|
'xmlns:mc': string;
|
|
@@ -166,5 +166,5 @@ export declare function readControlShape(shape: string, shapeId: number | null):
|
|
|
166
166
|
* sheet is dropped (the writer draws a new one), and one with no control is read into one
|
|
167
167
|
* ({@link readControlShape}). A part left with no shapes is dropped with them.
|
|
168
168
|
*/
|
|
169
|
-
export declare function absorbControlShapes(sheet:
|
|
169
|
+
export declare function absorbControlShapes(sheet: IWorksheet.JSON): void;
|
|
170
170
|
//# sourceMappingURL=FormControls.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ICell } from '@sheetxl/sdk';
|
|
2
|
+
/**
|
|
3
|
+
* Names the reader and the writer both spell, kept here so neither imports the other (they load as
|
|
4
|
+
* separate lazy chunks).
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* The `<ignoredError>` check attributes, in the schema's order (the order Excel writes them). Only
|
|
8
|
+
* these nine are Excel's; any other `ICell.ErrorCheck` is not written to xlsx.
|
|
9
|
+
*/
|
|
10
|
+
export declare const IGNORED_ERROR_CHECKS: readonly ICell.ErrorCheck[];
|
|
11
|
+
/** The 2012 theme extension that names the theme's family (`thm15:themeFamily`). */
|
|
12
|
+
export declare const THEME_FAMILY_EXT_URI = "{05A4C25C-085E-4340-85A3-A5531E510DB2}";
|
|
13
|
+
//# sourceMappingURL=SharedNames.d.ts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { IFont, IFontStyle, ITheme } from '@sheetxl/sdk';
|
|
2
|
+
/** Whether a family follows the theme. */
|
|
3
|
+
export declare function isThemeFamily(family: string | null | undefined): family is IFontStyle.ThemeFamily;
|
|
4
|
+
/** The model's family and fallbacks for a `<name>` (or `<rFont>`) and a `<scheme>`, in place. */
|
|
5
|
+
export declare function readFamily(font: {
|
|
6
|
+
family?: string;
|
|
7
|
+
fallbacks?: string[];
|
|
8
|
+
}, scheme: string | null | undefined): void;
|
|
9
|
+
/**
|
|
10
|
+
* The `<name>` and `<scheme>` a family is written as. A font that states no family is the theme's
|
|
11
|
+
* body font when it is a whole record (`whole`), and says nothing when it is differential. A theme
|
|
12
|
+
* font is named by the face cached for it, else by the theme's; with no `theme`, the name is the
|
|
13
|
+
* cached face alone.
|
|
14
|
+
*/
|
|
15
|
+
export declare function writeFamily(family: string | undefined, fallbacks: readonly string[] | undefined, theme: ITheme | null, whole: boolean): {
|
|
16
|
+
name?: string;
|
|
17
|
+
scheme?: 'major' | 'minor';
|
|
18
|
+
};
|
|
19
|
+
/** The baseline a `vertAlign` stands for, or `undefined` for a value SpreadsheetML does not define. */
|
|
20
|
+
export declare function readBaseline(vertAlign: string | null | undefined): number | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* The `vertAlign` a baseline is written as. A stated `0` is written as `baseline` only where the
|
|
23
|
+
* font is differential (a dxf, a run), where it undoes an inherited raise.
|
|
24
|
+
*/
|
|
25
|
+
export declare function writeBaseline(baseline: number | null | undefined, differential: boolean): string | undefined;
|
|
26
|
+
/** The strike a `<strike>` toggle stands for. */
|
|
27
|
+
export declare function readStrike(on: boolean): IFont.StrikeStyle;
|
|
28
|
+
/** Whether a strike is written as `<strike/>`, or `undefined` when the font states none. */
|
|
29
|
+
export declare function writeStrike(strike: IFont.StrikeStyle | null | undefined): boolean | undefined;
|
|
30
|
+
/** The letter spacing `<condense/>` or `<extend/>` stands for, or `undefined` when it is off. */
|
|
31
|
+
export declare function readMacSpacing(name: 'condense' | 'extend', on: boolean): number | undefined;
|
|
32
|
+
/** The Macintosh style a letter spacing is written as, or `undefined` for none. */
|
|
33
|
+
export declare function writeMacSpacing(letterSpacing: number | null | undefined): 'condense' | 'extend' | undefined;
|
|
34
|
+
/** The underline a `<u val>` stands for; no `val` is a single underline. */
|
|
35
|
+
export declare function readUnderline(val: string | null | undefined): IFont.UnderlineStyle;
|
|
36
|
+
/** The `<u val>` an underline is written as, or `undefined` for none. */
|
|
37
|
+
export declare function writeUnderline(underline: IFont.UnderlineStyle | null | undefined): string | undefined;
|
|
38
|
+
//# sourceMappingURL=SpreadsheetFont.d.ts.map
|
|
@@ -1,24 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* The note boxes in a sheet's VML drawing: finding them, keeping them apart from the control
|
|
3
|
-
* shapes that share the part, reading each into what a note stores, and writing one for every
|
|
4
|
-
* comment.
|
|
5
|
-
*
|
|
6
|
-
* @remarks
|
|
7
|
-
* A note's box is a `<v:shape>` whose `<x:ClientData ObjectType="Note">` names its cell in
|
|
8
|
-
* `<x:Row>`/`<x:Column>` (0-based), and its corners in `<x:Anchor>` as four cell/offset pairs
|
|
9
|
-
* (left cell, left offset, top cell, top offset, right cell, right offset, bottom cell, bottom
|
|
10
|
-
* offset). Nothing else in the VML names a note, so the cell is the join to the comment.
|
|
11
|
-
*
|
|
12
|
-
* The anchor alone places a box (the `style` margins are an echo Excel regenerates), and
|
|
13
|
-
* `<x:Visible/>` alone shows it. So a shape is read into those two and the rest of its markup,
|
|
14
|
-
* and what is left is the same for every note Excel made and never formatted. That markup is kept
|
|
15
|
-
* only when it is not Excel's default, and the id, the anchor, the cell and the `style` echo are
|
|
16
|
-
* written from the model.
|
|
17
|
-
*
|
|
18
|
-
* A form control's shape is in the same part, and is taken out of it and drawn again the same
|
|
19
|
-
* way (`FormControls.ts`). The difference is the id: nothing refers to a note's, so it is minted
|
|
20
|
-
* on write, while a `<control shapeId>` names its shape's and has to keep it.
|
|
21
|
-
*/
|
|
1
|
+
import { NoteShapeStyle } from './VmlNoteStyle';
|
|
22
2
|
/** A note shape as read: its markup and the cell it was on. */
|
|
23
3
|
export interface NoteShape {
|
|
24
4
|
xml: string;
|
|
@@ -33,13 +13,26 @@ export interface NoteShapeBox {
|
|
|
33
13
|
* The eight numbers of `<x:Anchor>`, or `null` when the shape has none that can be read.
|
|
34
14
|
*/
|
|
35
15
|
anchor: number[] | null;
|
|
16
|
+
/**
|
|
17
|
+
* Where the `style` puts the box, in pixels from the sheet's top-left, when the shape has no
|
|
18
|
+
* anchor. Excel places such a box by its `style` alone: `margin-left` / `margin-top` and
|
|
19
|
+
* `width` / `height`, with no margin meaning 0 and no size meaning VML's 750pt.
|
|
20
|
+
*/
|
|
21
|
+
bounds: {
|
|
22
|
+
x: number;
|
|
23
|
+
y: number;
|
|
24
|
+
width: number;
|
|
25
|
+
height: number;
|
|
26
|
+
} | null;
|
|
36
27
|
/** Whether the shape has `<x:Visible/>`: the box stays on the sheet. */
|
|
37
28
|
visible: boolean;
|
|
38
29
|
/** The shape's alternative text. */
|
|
39
30
|
alt: string | null;
|
|
31
|
+
/** The box's fill and line, where they are not Excel's default. */
|
|
32
|
+
style: NoteShapeStyle;
|
|
40
33
|
/**
|
|
41
|
-
* The shape without its id, position, cell
|
|
42
|
-
* Excel's default shape.
|
|
34
|
+
* The shape without its id, position, cell, alternative text, fill or line, or `null` when
|
|
35
|
+
* that is Excel's default shape.
|
|
43
36
|
*/
|
|
44
37
|
xml: string | null;
|
|
45
38
|
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { IColor, IFill, IStroke } from '@sheetxl/sdk';
|
|
2
|
+
/**
|
|
3
|
+
* A note box's fill and line: the VML of the note's `<v:shape>` and the model's
|
|
4
|
+
* {@link IFill.JSON} / {@link IStroke.JSON}, both ways.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* Probed with hidden COM (2026-10-20, `comments-probes/probe-note-format.ps1`). Excel writes the
|
|
8
|
+
* fill as `fillcolor` on the shape with its transparency as `<v:fill opacity>`, and no fill as
|
|
9
|
+
* `filled="f"` (the color left where it was). The line is `strokecolor`, `strokeweight` and
|
|
10
|
+
* `stroked="f"` on the shape, with the dash and the compound on `<v:stroke dashstyle linestyle>`.
|
|
11
|
+
* A color is a CSS color (`red`, `#cfc`), or a name and a palette index (`infoBackground [80]`);
|
|
12
|
+
* Excel refuses a theme color here, so one is written as the color it resolves to.
|
|
13
|
+
*
|
|
14
|
+
* A named VML dash draws the same lengths as the DrawingML preset it is mapped to (`shortdash`
|
|
15
|
+
* is `sysDash`, `3 1`), so a note draws the dash VML draws. Excel's own pairing through COM is
|
|
16
|
+
* not by length and is not followed.
|
|
17
|
+
*
|
|
18
|
+
* Only a solid fill is modeled. A gradient, pattern or picture fill (`<v:fill type>`) is left in
|
|
19
|
+
* the markup as it was read, and the box draws Excel's default fill.
|
|
20
|
+
*/
|
|
21
|
+
/** A note box's fill and line, as the model states them. */
|
|
22
|
+
export interface NoteShapeStyle {
|
|
23
|
+
fill?: IFill.JSON;
|
|
24
|
+
stroke?: IStroke.JSON;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Reads a note shape's fill and line into the model's, and the markup with them restored to
|
|
28
|
+
* Excel's default, so the rest can be told apart from a shape that was never formatted.
|
|
29
|
+
*
|
|
30
|
+
* @param markup A normalized note shape.
|
|
31
|
+
*/
|
|
32
|
+
export declare function readNoteStyle(markup: string): {
|
|
33
|
+
style: NoteShapeStyle;
|
|
34
|
+
markup: string;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* A note shape with the model's fill and line written onto it: the inverse of
|
|
38
|
+
* {@link readNoteStyle}.
|
|
39
|
+
*
|
|
40
|
+
* @param markup A normalized note shape: what a note stored, or Excel's default.
|
|
41
|
+
* @param resolve Resolves a model color, a theme color included.
|
|
42
|
+
*/
|
|
43
|
+
export declare function writeNoteStyle(markup: string, style: NoteShapeStyle, resolve: (color: string) => IColor): string;
|
|
44
|
+
//# sourceMappingURL=VmlNoteStyle.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A VML part's namespace prefixes brought to the ones Excel writes: `v`, `o` and `x`.
|
|
3
|
+
*
|
|
4
|
+
* @remarks
|
|
5
|
+
* Everything that reads a VML part (`VmlNoteShapes.ts`, `FormControls.ts`) matches it as text, by
|
|
6
|
+
* those three prefixes, because the part is not reliably XML: Excel's own leaves `<br>` unclosed
|
|
7
|
+
* inside a note's text box. A prefix is only a name for a namespace, though, and other writers pick
|
|
8
|
+
* their own. openpyxl serializes through ElementTree without registering any, so its note shapes
|
|
9
|
+
* arrive as `<ns0:shape xmlns:ns0="urn:schemas-microsoft-com:vml">`, with `ns0` naming a different
|
|
10
|
+
* namespace on the next element. Unrecognized, such a shape is carried through as foreign markup and
|
|
11
|
+
* no longer matches its note once a structural edit moves the note.
|
|
12
|
+
*
|
|
13
|
+
* So the part is rewritten once on read: each element and attribute prefix bound to one of the three
|
|
14
|
+
* namespaces takes the canonical name, the declarations that bound it are dropped, and the root
|
|
15
|
+
* declares the canonical three. Only declaring elements open a scope, so an unclosed tag cannot throw
|
|
16
|
+
* the bookkeeping off. A part that already uses the canonical prefixes comes back unchanged.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* The part with every prefix bound to the VML, Office or Excel namespace renamed to `v`, `o` or
|
|
20
|
+
* `x`. Returned as given when there is nothing to rename, or when a canonical prefix is bound to a
|
|
21
|
+
* different namespace somewhere in it (renaming would then merge two namespaces).
|
|
22
|
+
*/
|
|
23
|
+
export declare function canonicalizeVmlPrefixes(xml: string): string;
|
|
24
|
+
//# sourceMappingURL=VmlPrefixes.d.ts.map
|
|
@@ -67,6 +67,8 @@ export declare class PackageBuilder<Out> {
|
|
|
67
67
|
private _sourcePackage;
|
|
68
68
|
/** See {@link PackageBuilderOptions.macroEnabled}. */
|
|
69
69
|
private _macroEnabled;
|
|
70
|
+
/** See {@link PackageBuilderOptions.template}. */
|
|
71
|
+
private _template;
|
|
70
72
|
private _explicitRelTargets;
|
|
71
73
|
private _mapState;
|
|
72
74
|
constructor(zip: IZipBackend<Out>, registry: EmitterRegistry, options?: PackageBuilderOptions);
|
|
@@ -314,6 +314,13 @@ export interface PackageBuilderOptions {
|
|
|
314
314
|
* a source's VBA project, matching Excel's own *Save As*.
|
|
315
315
|
*/
|
|
316
316
|
macroEnabled?: boolean;
|
|
317
|
+
/**
|
|
318
|
+
* Whether the package being built is a template (`.xltx`/`.xltm`). Only the `xl/workbook.xml`
|
|
319
|
+
* content-type variant follows from it.
|
|
320
|
+
*
|
|
321
|
+
* @defaultValue false
|
|
322
|
+
*/
|
|
323
|
+
template?: boolean;
|
|
317
324
|
/**
|
|
318
325
|
* Callback invoked when a part is emitted.
|
|
319
326
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IComment,
|
|
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
|
/**
|
|
@@ -46,7 +46,7 @@ export declare function writeRichText(xml: IXmlWriter, content: IComment.Content
|
|
|
46
46
|
* A run's `<rPr>`, in the order Excel writes it. Only what the run sets is written, and a property
|
|
47
47
|
* set off (`weight: 400`) is written off, since it overrides whatever the run would inherit.
|
|
48
48
|
*/
|
|
49
|
-
export declare function writeRunProperties(xml: IXmlWriter, font:
|
|
49
|
+
export declare function writeRunProperties(xml: IXmlWriter, font: IFontStyle.JSON, theme: ITheme): void;
|
|
50
50
|
/**
|
|
51
51
|
* The cell address of a comment, or `null` when its cell is gone.
|
|
52
52
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IResourceCollection, IMovable,
|
|
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,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,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
|
|
@@ -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
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IWorksheet, ISlicer, IWorkbook } from '@sheetxl/sdk';
|
|
2
2
|
import { Emitter, EmitContext, IXmlWriter } from '../builder';
|
|
3
3
|
/** The relationship a sheet has to its slicer part. */
|
|
4
4
|
export declare const REL_TYPE_SLICER = "http://schemas.microsoft.com/office/2007/relationships/slicer";
|
|
@@ -6,14 +6,14 @@ export declare const REL_TYPE_SLICER = "http://schemas.microsoft.com/office/2007
|
|
|
6
6
|
export declare const REL_TYPE_SLICER_CACHE = "http://schemas.microsoft.com/office/2007/relationships/slicerCache";
|
|
7
7
|
/** A sheet's slicer part: every table slicer placed on the sheet, in its movable order. */
|
|
8
8
|
export interface SlicersPartHandle {
|
|
9
|
-
sheet:
|
|
9
|
+
sheet: IWorksheet;
|
|
10
10
|
slicers: ISlicer[];
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* The table slicers placed on a sheet, in movable order: those whose source names a live table.
|
|
14
14
|
* A slicer that names none has no column to filter and no cache to write, so it is not written.
|
|
15
15
|
*/
|
|
16
|
-
export declare const collectSheetSlicers: (sheet:
|
|
16
|
+
export declare const collectSheetSlicers: (sheet: IWorksheet) => ISlicer[];
|
|
17
17
|
/**
|
|
18
18
|
* Writes a sheet's slicer part, `xl/slicers/slicerN.xml`: one `slicer` per table slicer placed on
|
|
19
19
|
* the sheet, as Excel writes them, each naming the cache the workbook writes for it.
|