@cj-tech-master/excelts 4.2.0-canary.20260110080706.375ff37 → 4.2.0-canary.20260110111632.c88c61c
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/archive/compress.base.d.ts +1 -0
- package/dist/browser/modules/archive/compress.base.js +1 -0
- package/dist/browser/modules/archive/compress.browser.d.ts +8 -0
- package/dist/browser/modules/archive/compress.browser.js +16 -9
- package/dist/browser/modules/archive/parse.base.d.ts +22 -1
- package/dist/browser/modules/archive/parse.base.js +38 -4
- package/dist/browser/modules/archive/parse.browser.js +6 -1
- package/dist/browser/modules/archive/parse.js +1 -1
- package/dist/browser/modules/excel/form-control.d.ts +2 -0
- package/dist/browser/modules/excel/form-control.js +54 -16
- package/dist/browser/modules/excel/xlsx/xform/sheet/worksheet-xform.js +17 -3
- package/dist/browser/modules/stream/streams.browser.d.ts +2 -0
- package/dist/browser/modules/stream/streams.browser.js +58 -25
- package/dist/cjs/modules/archive/compress.base.js +1 -0
- package/dist/cjs/modules/archive/compress.browser.js +15 -8
- package/dist/cjs/modules/archive/parse.base.js +38 -4
- package/dist/cjs/modules/archive/parse.browser.js +6 -1
- package/dist/cjs/modules/archive/parse.js +1 -1
- package/dist/cjs/modules/excel/form-control.js +54 -16
- package/dist/cjs/modules/excel/xlsx/xform/sheet/worksheet-xform.js +17 -3
- package/dist/cjs/modules/stream/streams.browser.js +58 -25
- package/dist/esm/modules/archive/compress.base.js +1 -0
- package/dist/esm/modules/archive/compress.browser.js +16 -9
- package/dist/esm/modules/archive/parse.base.js +38 -4
- package/dist/esm/modules/archive/parse.browser.js +6 -1
- package/dist/esm/modules/archive/parse.js +1 -1
- package/dist/esm/modules/excel/form-control.js +54 -16
- package/dist/esm/modules/excel/xlsx/xform/sheet/worksheet-xform.js +17 -3
- package/dist/esm/modules/stream/streams.browser.js +58 -25
- package/dist/iife/excelts.iife.js +162 -38
- package/dist/iife/excelts.iife.js.map +1 -1
- package/dist/iife/excelts.iife.min.js +19 -19
- package/dist/types/modules/archive/compress.base.d.ts +1 -0
- package/dist/types/modules/archive/compress.browser.d.ts +8 -0
- package/dist/types/modules/archive/parse.base.d.ts +22 -1
- package/dist/types/modules/excel/form-control.d.ts +2 -0
- package/dist/types/modules/stream/streams.browser.d.ts +2 -0
- package/package.json +1 -1
|
@@ -35,6 +35,7 @@ export interface CompressOptions {
|
|
|
35
35
|
* Default threshold (in bytes) to choose the lower-overhead path.
|
|
36
36
|
*
|
|
37
37
|
* This is a performance knob, not a correctness requirement.
|
|
38
|
+
* Default: 8MB.
|
|
38
39
|
*/
|
|
39
40
|
export declare const DEFAULT_COMPRESS_THRESHOLD_BYTES: number;
|
|
40
41
|
/**
|
|
@@ -22,6 +22,9 @@ export declare function hasCompressionStream(): boolean;
|
|
|
22
22
|
/**
|
|
23
23
|
* Compress data using browser's native CompressionStream or JS fallback
|
|
24
24
|
*
|
|
25
|
+
* Note: We always prefer native CompressionStream when available because
|
|
26
|
+
* it's significantly faster than pure JS implementation.
|
|
27
|
+
*
|
|
25
28
|
* @param data - Data to compress
|
|
26
29
|
* @param options - Compression options
|
|
27
30
|
* @returns Compressed data
|
|
@@ -44,7 +47,12 @@ export declare function compressSync(data: Uint8Array, options?: CompressOptions
|
|
|
44
47
|
/**
|
|
45
48
|
* Decompress data using browser's native DecompressionStream or JS fallback
|
|
46
49
|
*
|
|
50
|
+
* Note: We always prefer native DecompressionStream when available because
|
|
51
|
+
* it's significantly faster than pure JS implementation, regardless of data size.
|
|
52
|
+
* The threshold is only useful for compression where the overhead matters more.
|
|
53
|
+
*
|
|
47
54
|
* @param data - Compressed data (deflate-raw format)
|
|
55
|
+
* @param options - Decompression options (kept for API parity; currently unused in browser)
|
|
48
56
|
* @returns Decompressed data
|
|
49
57
|
*/
|
|
50
58
|
export declare function decompress(data: Uint8Array, options?: CompressOptions): Promise<Uint8Array>;
|
|
@@ -142,6 +142,17 @@ export declare function streamUntilValidatedDataDescriptor(options: StreamUntilV
|
|
|
142
142
|
export interface ParseOptions {
|
|
143
143
|
verbose?: boolean;
|
|
144
144
|
forceStream?: boolean;
|
|
145
|
+
/**
|
|
146
|
+
* Threshold (in bytes) for small file optimization.
|
|
147
|
+
* Files smaller than this will use sync decompression (no stream overhead).
|
|
148
|
+
*
|
|
149
|
+
* Note: the optimization is only applied when the entry sizes are trusted
|
|
150
|
+
* (i.e. no data descriptor) and BOTH compressedSize and uncompressedSize
|
|
151
|
+
* are below this threshold. This avoids buffering huge highly-compressible
|
|
152
|
+
* files (e.g. large XML) in memory, which would defeat streaming.
|
|
153
|
+
* Default: 5MB
|
|
154
|
+
*/
|
|
155
|
+
thresholdBytes?: number;
|
|
145
156
|
}
|
|
146
157
|
export interface EntryVars {
|
|
147
158
|
versionsNeededToExtract: number | null;
|
|
@@ -195,4 +206,14 @@ export interface ParseEmitter {
|
|
|
195
206
|
emitClose(): void;
|
|
196
207
|
}
|
|
197
208
|
export type InflateFactory = () => Transform | Duplex | PassThrough;
|
|
198
|
-
|
|
209
|
+
/**
|
|
210
|
+
* Synchronous inflate function type for small file optimization.
|
|
211
|
+
* When provided and file size is below threshold, this will be used
|
|
212
|
+
* instead of streaming decompression for better performance.
|
|
213
|
+
*/
|
|
214
|
+
export type InflateRawSync = (data: Uint8Array) => Uint8Array;
|
|
215
|
+
/**
|
|
216
|
+
* Default threshold for small file optimization (5MB).
|
|
217
|
+
*/
|
|
218
|
+
export declare const DEFAULT_PARSE_THRESHOLD_BYTES: number;
|
|
219
|
+
export declare function runParseLoop(opts: ParseOptions, io: ParseIO, emitter: ParseEmitter, inflateFactory: InflateFactory, state: ParseDriverState, inflateRawSync?: InflateRawSync): Promise<void>;
|
|
@@ -42,6 +42,8 @@ export interface FormCheckboxModel {
|
|
|
42
42
|
shapeId: number;
|
|
43
43
|
/** Control property ID (rId in relationships) */
|
|
44
44
|
ctrlPropId: number;
|
|
45
|
+
/** Relationship id (e.g., rId5) in sheet rels for ctrlProp (set during XLSX prepare) */
|
|
46
|
+
ctrlPropRelId?: string;
|
|
45
47
|
/** Top-left anchor */
|
|
46
48
|
tl: FormControlAnchor;
|
|
47
49
|
/** Bottom-right anchor */
|
|
@@ -456,6 +456,8 @@ export declare class Transform<TInput = Uint8Array, TOutput = Uint8Array> extend
|
|
|
456
456
|
* Read from the transform stream
|
|
457
457
|
*/
|
|
458
458
|
read(size?: number): TOutput | null;
|
|
459
|
+
/** @internal - list of piped destinations for forwarding auto-consumed data */
|
|
460
|
+
private _pipeDestinations;
|
|
459
461
|
/**
|
|
460
462
|
* Pipe to another stream (writable, transform, or duplex)
|
|
461
463
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cj-tech-master/excelts",
|
|
3
|
-
"version": "4.2.0-canary.
|
|
3
|
+
"version": "4.2.0-canary.20260110111632.c88c61c",
|
|
4
4
|
"description": "TypeScript Excel Workbook Manager - Read and Write xlsx and csv Files.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|