@cj-tech-master/excelts 5.0.0-canary.20260123012457.1fdf506 → 5.0.1-canary.20260123024428.98c7ee0
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/dist/browser/modules/excel/xlsx/xlsx.browser.d.ts +9 -1
- package/dist/browser/modules/excel/xlsx/xlsx.browser.js +17 -10
- package/dist/cjs/modules/excel/xlsx/xlsx.browser.js +17 -10
- package/dist/esm/modules/excel/xlsx/xlsx.browser.js +17 -10
- package/dist/iife/excelts.iife.js +14 -7
- package/dist/iife/excelts.iife.js.map +1 -1
- package/dist/iife/excelts.iife.min.js +2 -2
- package/dist/types/modules/excel/xlsx/xlsx.browser.d.ts +9 -1
- package/package.json +1 -1
|
@@ -201,7 +201,15 @@ declare class XLSX {
|
|
|
201
201
|
_processTableEntry(stream: IParseStream, model: any, name: string): Promise<void>;
|
|
202
202
|
_processWorksheetRelsEntry(stream: IParseStream, model: any, sheetNo: number): Promise<void>;
|
|
203
203
|
_processMediaEntry(stream: IParseStream, model: any, filename: string): Promise<void>;
|
|
204
|
-
|
|
204
|
+
/**
|
|
205
|
+
* Process a drawing XML entry.
|
|
206
|
+
*
|
|
207
|
+
* @param stream - Stream to read from (used in loadFromZipEntries path)
|
|
208
|
+
* @param model - Model to populate
|
|
209
|
+
* @param name - Drawing name (e.g., "drawing1")
|
|
210
|
+
* @param rawData - Pre-read raw data (used in loadFromFiles path to avoid re-reading stream)
|
|
211
|
+
*/
|
|
212
|
+
_processDrawingEntry(stream: IParseStream, model: any, name: string, rawData?: Uint8Array): Promise<void>;
|
|
205
213
|
_processDrawingRelsEntry(entry: any, model: any, name: string): Promise<void>;
|
|
206
214
|
_processVmlDrawingEntry(entry: any, model: any, name: string): Promise<void>;
|
|
207
215
|
_processThemeEntry(stream: IParseStream, model: any, name: string): Promise<void>;
|
|
@@ -761,16 +761,26 @@ class XLSX {
|
|
|
761
761
|
});
|
|
762
762
|
}
|
|
763
763
|
}
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
764
|
+
/**
|
|
765
|
+
* Process a drawing XML entry.
|
|
766
|
+
*
|
|
767
|
+
* @param stream - Stream to read from (used in loadFromZipEntries path)
|
|
768
|
+
* @param model - Model to populate
|
|
769
|
+
* @param name - Drawing name (e.g., "drawing1")
|
|
770
|
+
* @param rawData - Pre-read raw data (used in loadFromFiles path to avoid re-reading stream)
|
|
771
|
+
*/
|
|
772
|
+
async _processDrawingEntry(stream, model, name, rawData) {
|
|
773
|
+
// Use provided rawData if available (loadFromFiles path), otherwise collect from stream.
|
|
774
|
+
// In loadFromFiles, the stream is created from already-decoded text, and collecting from
|
|
775
|
+
// it may not work correctly due to PassThrough stream timing issues.
|
|
776
|
+
const data = rawData ?? (await this.collectStreamData(stream));
|
|
767
777
|
// Parse the drawing for normal processing (images, etc.)
|
|
768
778
|
const xform = new DrawingXform();
|
|
769
|
-
const xmlString = this.bufferToString(
|
|
779
|
+
const xmlString = this.bufferToString(data);
|
|
770
780
|
const drawing = await xform.parseStream(this.createTextStream(xmlString));
|
|
771
781
|
model.drawings[name] = drawing;
|
|
772
782
|
// Store raw data; reconcile() may later drop it if charts are not referenced.
|
|
773
|
-
model.rawDrawings[name] =
|
|
783
|
+
model.rawDrawings[name] = data;
|
|
774
784
|
}
|
|
775
785
|
async _processDrawingRelsEntry(entry, model, name) {
|
|
776
786
|
const xform = new RelationshipsXform();
|
|
@@ -887,11 +897,8 @@ class XLSX {
|
|
|
887
897
|
}
|
|
888
898
|
const drawingName = getDrawingNameFromPath(entryName);
|
|
889
899
|
if (drawingName) {
|
|
890
|
-
await this._processDrawingEntry(stream, model, drawingName);
|
|
891
|
-
//
|
|
892
|
-
if (rawData) {
|
|
893
|
-
model.rawDrawings[drawingName] = rawData;
|
|
894
|
-
}
|
|
900
|
+
await this._processDrawingEntry(stream, model, drawingName, rawData);
|
|
901
|
+
// rawData is now stored inside _processDrawingEntry
|
|
895
902
|
return true;
|
|
896
903
|
}
|
|
897
904
|
const drawingRelsName = getDrawingNameFromRelsPath(entryName);
|
|
@@ -764,16 +764,26 @@ class XLSX {
|
|
|
764
764
|
});
|
|
765
765
|
}
|
|
766
766
|
}
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
767
|
+
/**
|
|
768
|
+
* Process a drawing XML entry.
|
|
769
|
+
*
|
|
770
|
+
* @param stream - Stream to read from (used in loadFromZipEntries path)
|
|
771
|
+
* @param model - Model to populate
|
|
772
|
+
* @param name - Drawing name (e.g., "drawing1")
|
|
773
|
+
* @param rawData - Pre-read raw data (used in loadFromFiles path to avoid re-reading stream)
|
|
774
|
+
*/
|
|
775
|
+
async _processDrawingEntry(stream, model, name, rawData) {
|
|
776
|
+
// Use provided rawData if available (loadFromFiles path), otherwise collect from stream.
|
|
777
|
+
// In loadFromFiles, the stream is created from already-decoded text, and collecting from
|
|
778
|
+
// it may not work correctly due to PassThrough stream timing issues.
|
|
779
|
+
const data = rawData ?? (await this.collectStreamData(stream));
|
|
770
780
|
// Parse the drawing for normal processing (images, etc.)
|
|
771
781
|
const xform = new drawing_xform_1.DrawingXform();
|
|
772
|
-
const xmlString = this.bufferToString(
|
|
782
|
+
const xmlString = this.bufferToString(data);
|
|
773
783
|
const drawing = await xform.parseStream(this.createTextStream(xmlString));
|
|
774
784
|
model.drawings[name] = drawing;
|
|
775
785
|
// Store raw data; reconcile() may later drop it if charts are not referenced.
|
|
776
|
-
model.rawDrawings[name] =
|
|
786
|
+
model.rawDrawings[name] = data;
|
|
777
787
|
}
|
|
778
788
|
async _processDrawingRelsEntry(entry, model, name) {
|
|
779
789
|
const xform = new relationships_xform_1.RelationshipsXform();
|
|
@@ -890,11 +900,8 @@ class XLSX {
|
|
|
890
900
|
}
|
|
891
901
|
const drawingName = (0, ooxml_paths_1.getDrawingNameFromPath)(entryName);
|
|
892
902
|
if (drawingName) {
|
|
893
|
-
await this._processDrawingEntry(stream, model, drawingName);
|
|
894
|
-
//
|
|
895
|
-
if (rawData) {
|
|
896
|
-
model.rawDrawings[drawingName] = rawData;
|
|
897
|
-
}
|
|
903
|
+
await this._processDrawingEntry(stream, model, drawingName, rawData);
|
|
904
|
+
// rawData is now stored inside _processDrawingEntry
|
|
898
905
|
return true;
|
|
899
906
|
}
|
|
900
907
|
const drawingRelsName = (0, ooxml_paths_1.getDrawingNameFromRelsPath)(entryName);
|
|
@@ -761,16 +761,26 @@ class XLSX {
|
|
|
761
761
|
});
|
|
762
762
|
}
|
|
763
763
|
}
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
764
|
+
/**
|
|
765
|
+
* Process a drawing XML entry.
|
|
766
|
+
*
|
|
767
|
+
* @param stream - Stream to read from (used in loadFromZipEntries path)
|
|
768
|
+
* @param model - Model to populate
|
|
769
|
+
* @param name - Drawing name (e.g., "drawing1")
|
|
770
|
+
* @param rawData - Pre-read raw data (used in loadFromFiles path to avoid re-reading stream)
|
|
771
|
+
*/
|
|
772
|
+
async _processDrawingEntry(stream, model, name, rawData) {
|
|
773
|
+
// Use provided rawData if available (loadFromFiles path), otherwise collect from stream.
|
|
774
|
+
// In loadFromFiles, the stream is created from already-decoded text, and collecting from
|
|
775
|
+
// it may not work correctly due to PassThrough stream timing issues.
|
|
776
|
+
const data = rawData ?? (await this.collectStreamData(stream));
|
|
767
777
|
// Parse the drawing for normal processing (images, etc.)
|
|
768
778
|
const xform = new DrawingXform();
|
|
769
|
-
const xmlString = this.bufferToString(
|
|
779
|
+
const xmlString = this.bufferToString(data);
|
|
770
780
|
const drawing = await xform.parseStream(this.createTextStream(xmlString));
|
|
771
781
|
model.drawings[name] = drawing;
|
|
772
782
|
// Store raw data; reconcile() may later drop it if charts are not referenced.
|
|
773
|
-
model.rawDrawings[name] =
|
|
783
|
+
model.rawDrawings[name] = data;
|
|
774
784
|
}
|
|
775
785
|
async _processDrawingRelsEntry(entry, model, name) {
|
|
776
786
|
const xform = new RelationshipsXform();
|
|
@@ -887,11 +897,8 @@ class XLSX {
|
|
|
887
897
|
}
|
|
888
898
|
const drawingName = getDrawingNameFromPath(entryName);
|
|
889
899
|
if (drawingName) {
|
|
890
|
-
await this._processDrawingEntry(stream, model, drawingName);
|
|
891
|
-
//
|
|
892
|
-
if (rawData) {
|
|
893
|
-
model.rawDrawings[drawingName] = rawData;
|
|
894
|
-
}
|
|
900
|
+
await this._processDrawingEntry(stream, model, drawingName, rawData);
|
|
901
|
+
// rawData is now stored inside _processDrawingEntry
|
|
895
902
|
return true;
|
|
896
903
|
}
|
|
897
904
|
const drawingRelsName = getDrawingNameFromRelsPath(entryName);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @cj-tech-master/excelts v5.0.
|
|
2
|
+
* @cj-tech-master/excelts v5.0.1-canary.20260123024428.98c7ee0
|
|
3
3
|
* TypeScript Excel Workbook Manager - Read and Write xlsx and csv Files.
|
|
4
4
|
* (c) 2026 cjnoname
|
|
5
5
|
* Released under the MIT License
|
|
@@ -21124,13 +21124,21 @@ var ExcelTS = (function(exports) {
|
|
|
21124
21124
|
});
|
|
21125
21125
|
}
|
|
21126
21126
|
}
|
|
21127
|
-
|
|
21128
|
-
|
|
21127
|
+
/**
|
|
21128
|
+
* Process a drawing XML entry.
|
|
21129
|
+
*
|
|
21130
|
+
* @param stream - Stream to read from (used in loadFromZipEntries path)
|
|
21131
|
+
* @param model - Model to populate
|
|
21132
|
+
* @param name - Drawing name (e.g., "drawing1")
|
|
21133
|
+
* @param rawData - Pre-read raw data (used in loadFromFiles path to avoid re-reading stream)
|
|
21134
|
+
*/
|
|
21135
|
+
async _processDrawingEntry(stream, model, name, rawData) {
|
|
21136
|
+
const data = rawData ?? await this.collectStreamData(stream);
|
|
21129
21137
|
const xform = new DrawingXform();
|
|
21130
|
-
const xmlString = this.bufferToString(
|
|
21138
|
+
const xmlString = this.bufferToString(data);
|
|
21131
21139
|
const drawing = await xform.parseStream(this.createTextStream(xmlString));
|
|
21132
21140
|
model.drawings[name] = drawing;
|
|
21133
|
-
model.rawDrawings[name] =
|
|
21141
|
+
model.rawDrawings[name] = data;
|
|
21134
21142
|
}
|
|
21135
21143
|
async _processDrawingRelsEntry(entry, model, name) {
|
|
21136
21144
|
const relationships = await new RelationshipsXform().parseStream(entry);
|
|
@@ -21217,8 +21225,7 @@ var ExcelTS = (function(exports) {
|
|
|
21217
21225
|
}
|
|
21218
21226
|
const drawingName = getDrawingNameFromPath(entryName);
|
|
21219
21227
|
if (drawingName) {
|
|
21220
|
-
await this._processDrawingEntry(stream, model, drawingName);
|
|
21221
|
-
if (rawData) model.rawDrawings[drawingName] = rawData;
|
|
21228
|
+
await this._processDrawingEntry(stream, model, drawingName, rawData);
|
|
21222
21229
|
return true;
|
|
21223
21230
|
}
|
|
21224
21231
|
const drawingRelsName = getDrawingNameFromRelsPath(entryName);
|