@cj-tech-master/excelts 9.5.5 → 9.5.6
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/worksheet.d.ts +11 -0
- package/dist/browser/modules/excel/worksheet.js +13 -0
- package/dist/browser/modules/formula/integration/apply-writeback-plan.js +17 -3
- package/dist/browser/modules/formula/integration/workbook-adapter.js +20 -1
- package/dist/browser/modules/formula/integration/workbook-snapshot.d.ts +12 -0
- package/dist/browser/modules/formula/materialize/build-writeback-plan.js +47 -0
- package/dist/browser/modules/formula/materialize/types.d.ts +19 -3
- package/dist/browser/modules/formula/materialize/types.js +13 -3
- package/dist/browser/modules/pdf/builder/document-builder.js +2 -2
- package/dist/browser/modules/pdf/font/system-fonts.d.ts +24 -4
- package/dist/browser/modules/pdf/font/system-fonts.js +76 -32
- package/dist/browser/modules/pdf/render/pdf-exporter.js +6 -3
- package/dist/browser/modules/word/advanced/field-engine.js +151 -23
- package/dist/browser/modules/word/advanced/math-convert.js +2 -1
- package/dist/browser/modules/word/advanced/style-map.js +44 -6
- package/dist/browser/modules/word/convert/html/html-import.js +434 -71
- package/dist/browser/modules/word/convert/markdown/markdown-renderer.js +11 -3
- package/dist/browser/modules/word/layout/layout-full.js +4 -1
- package/dist/browser/modules/word/security/digital-signatures.js +160 -33
- package/dist/browser/modules/word/security/encryption.js +109 -9
- package/dist/cjs/modules/excel/worksheet.js +13 -0
- package/dist/cjs/modules/formula/integration/apply-writeback-plan.js +17 -3
- package/dist/cjs/modules/formula/integration/workbook-adapter.js +20 -1
- package/dist/cjs/modules/formula/materialize/build-writeback-plan.js +47 -0
- package/dist/cjs/modules/formula/materialize/types.js +13 -3
- package/dist/cjs/modules/pdf/builder/document-builder.js +1 -1
- package/dist/cjs/modules/pdf/font/system-fonts.js +77 -32
- package/dist/cjs/modules/pdf/render/pdf-exporter.js +5 -2
- package/dist/cjs/modules/word/advanced/field-engine.js +151 -23
- package/dist/cjs/modules/word/advanced/math-convert.js +2 -1
- package/dist/cjs/modules/word/advanced/style-map.js +44 -6
- package/dist/cjs/modules/word/convert/html/html-import.js +434 -71
- package/dist/cjs/modules/word/convert/markdown/markdown-renderer.js +11 -3
- package/dist/cjs/modules/word/layout/layout-full.js +4 -1
- package/dist/cjs/modules/word/security/digital-signatures.js +160 -33
- package/dist/cjs/modules/word/security/encryption.js +109 -9
- package/dist/esm/modules/excel/worksheet.js +13 -0
- package/dist/esm/modules/formula/integration/apply-writeback-plan.js +17 -3
- package/dist/esm/modules/formula/integration/workbook-adapter.js +20 -1
- package/dist/esm/modules/formula/materialize/build-writeback-plan.js +47 -0
- package/dist/esm/modules/formula/materialize/types.js +13 -3
- package/dist/esm/modules/pdf/builder/document-builder.js +2 -2
- package/dist/esm/modules/pdf/font/system-fonts.js +76 -32
- package/dist/esm/modules/pdf/render/pdf-exporter.js +6 -3
- package/dist/esm/modules/word/advanced/field-engine.js +151 -23
- package/dist/esm/modules/word/advanced/math-convert.js +2 -1
- package/dist/esm/modules/word/advanced/style-map.js +44 -6
- package/dist/esm/modules/word/convert/html/html-import.js +434 -71
- package/dist/esm/modules/word/convert/markdown/markdown-renderer.js +11 -3
- package/dist/esm/modules/word/layout/layout-full.js +4 -1
- package/dist/esm/modules/word/security/digital-signatures.js +160 -33
- package/dist/esm/modules/word/security/encryption.js +109 -9
- package/dist/iife/excelts.iife.js +40 -26
- package/dist/iife/excelts.iife.js.map +1 -1
- package/dist/iife/excelts.iife.min.js +3 -3
- package/dist/types/modules/excel/worksheet.d.ts +11 -0
- package/dist/types/modules/formula/integration/workbook-snapshot.d.ts +12 -0
- package/dist/types/modules/formula/materialize/types.d.ts +19 -3
- package/dist/types/modules/pdf/font/system-fonts.d.ts +24 -4
- package/package.json +1 -1
|
@@ -339,6 +339,17 @@ declare class Worksheet {
|
|
|
339
339
|
*/
|
|
340
340
|
private _spliceMerges;
|
|
341
341
|
get hasMerges(): boolean;
|
|
342
|
+
/**
|
|
343
|
+
* Read-only enumeration of every merged region on this sheet
|
|
344
|
+
* (1-based, inclusive). Consumed by the formula engine's snapshot
|
|
345
|
+
* builder to detect `#SPILL!` conflicts. See issue #162 follow-up.
|
|
346
|
+
*/
|
|
347
|
+
get mergedRegions(): ReadonlyArray<{
|
|
348
|
+
readonly top: number;
|
|
349
|
+
readonly left: number;
|
|
350
|
+
readonly bottom: number;
|
|
351
|
+
readonly right: number;
|
|
352
|
+
}>;
|
|
342
353
|
/**
|
|
343
354
|
* Scan the range and if any cell is part of a merge, un-merge the group.
|
|
344
355
|
* Note this function can affect multiple merges and merge-blocks are
|
|
@@ -121,6 +121,18 @@ export interface WorksheetSnapshot {
|
|
|
121
121
|
readonly hiddenRows: ReadonlySet<number>;
|
|
122
122
|
/** Tables defined in this worksheet. */
|
|
123
123
|
readonly tables: readonly TableSnapshot[];
|
|
124
|
+
/**
|
|
125
|
+
* Merged regions on this worksheet, as 1-based inclusive rectangles.
|
|
126
|
+
* Consulted by the writeback planner to reject `#SPILL!` conflicts;
|
|
127
|
+
* the evaluator does not need this since merge slaves are already
|
|
128
|
+
* filtered out of `cells`.
|
|
129
|
+
*/
|
|
130
|
+
readonly mergedRegions: readonly {
|
|
131
|
+
readonly top: number;
|
|
132
|
+
readonly left: number;
|
|
133
|
+
readonly bottom: number;
|
|
134
|
+
readonly right: number;
|
|
135
|
+
}[];
|
|
124
136
|
}
|
|
125
137
|
/**
|
|
126
138
|
* Column definition within a table.
|
|
@@ -23,18 +23,28 @@ export interface CellErrorValueLike {
|
|
|
23
23
|
*/
|
|
24
24
|
export type FormulaResultLike = number | string | boolean | Date | CellErrorValueLike | undefined;
|
|
25
25
|
/**
|
|
26
|
-
* Numeric cell-type tag exposed by host cells. The engine
|
|
27
|
-
* against `Null` and `Formula`; any other value is treated as
|
|
28
|
-
* literal.
|
|
26
|
+
* Numeric cell-type tag exposed by host cells. The engine compares
|
|
27
|
+
* against `Null`, `Merge`, and `Formula`; any other value is treated as
|
|
28
|
+
* a scalar literal.
|
|
29
|
+
*
|
|
30
|
+
* `Merge` identifies a non-master cell inside a merged region. The
|
|
31
|
+
* host's in-memory model may proxy `cell.value` from slaves to the
|
|
32
|
+
* master (see `MergeValue` in `@excel/cell`), so the snapshot builder
|
|
33
|
+
* must filter merge slaves out — otherwise range aggregates count the
|
|
34
|
+
* master's value once per slave. See issue #162.
|
|
29
35
|
*
|
|
30
36
|
* Kept as inline numeric literals (not an enum) so this file stays free
|
|
31
37
|
* of runtime dependencies. The `const` object and `type` alias share a
|
|
32
38
|
* name via TypeScript's declaration merging — the value form
|
|
33
39
|
* (`CellValueTypeLike.Null`, `CellValueTypeLike.Formula`) is used at
|
|
34
40
|
* comparison sites, the type form annotates `CellLike.type`.
|
|
41
|
+
*
|
|
42
|
+
* The numeric values must stay in sync with `ValueType` in
|
|
43
|
+
* `@excel/enums`, which is what `@excel/cell` writes into `cell.type`.
|
|
35
44
|
*/
|
|
36
45
|
export declare const CellValueTypeLike: {
|
|
37
46
|
readonly Null: 0;
|
|
47
|
+
readonly Merge: 1;
|
|
38
48
|
readonly Formula: 6;
|
|
39
49
|
};
|
|
40
50
|
export type CellValueTypeLike = number;
|
|
@@ -118,6 +128,12 @@ export interface WorksheetLike {
|
|
|
118
128
|
findCell(row: number, col: number): CellLike | undefined;
|
|
119
129
|
getCell(row: number, col: number): CellLike;
|
|
120
130
|
getTables?(): TableRefLike[];
|
|
131
|
+
/**
|
|
132
|
+
* Read-only enumeration of the worksheet's merged regions (1-based,
|
|
133
|
+
* inclusive). Optional for hosts that don't model merge state — the
|
|
134
|
+
* snapshot builder treats absence as "no merges".
|
|
135
|
+
*/
|
|
136
|
+
readonly mergedRegions?: readonly DimensionsLike[];
|
|
121
137
|
}
|
|
122
138
|
/**
|
|
123
139
|
* A complete defined name entry with all details.
|
|
@@ -11,23 +11,43 @@
|
|
|
11
11
|
* .ttc (TrueType Collection) files are supported — parseTtf() extracts
|
|
12
12
|
* the first font from the collection automatically.
|
|
13
13
|
*
|
|
14
|
-
*
|
|
14
|
+
* Discovery is exposed both as a generator
|
|
15
|
+
* ({@link iterateSystemFontCandidates}) for early-exit callers and as
|
|
16
|
+
* an array snapshot ({@link discoverSystemFontCandidates}) for tests
|
|
17
|
+
* and full enumeration. Once the full snapshot has been produced it is
|
|
18
|
+
* cached and replayed on subsequent calls; partial iterations rely on
|
|
19
|
+
* the OS page cache to make repeat reads of the same font files cheap.
|
|
15
20
|
*/
|
|
21
|
+
/**
|
|
22
|
+
* Lazily yield discoverable system font candidates, in preference order.
|
|
23
|
+
*
|
|
24
|
+
* Each entry is the raw font file bytes of a `.ttf` or `.ttc` file.
|
|
25
|
+
* The caller decides which candidate to use (e.g. by checking cmap coverage).
|
|
26
|
+
*
|
|
27
|
+
* Iterating one candidate at a time lets callers `break` as soon as
|
|
28
|
+
* they find a match, avoiding the cost of recursively reading every
|
|
29
|
+
* font in every system font directory just to discard them.
|
|
30
|
+
*/
|
|
31
|
+
export declare function iterateSystemFontCandidates(): Generator<Uint8Array, void, void>;
|
|
16
32
|
/**
|
|
17
33
|
* Return all discoverable system font candidates, ordered by preference.
|
|
18
34
|
*
|
|
19
35
|
* Each entry is the raw font file bytes of a `.ttf` or `.ttc` file.
|
|
20
36
|
* The caller decides which candidate to use (e.g. by checking cmap coverage).
|
|
21
37
|
*
|
|
22
|
-
*
|
|
38
|
+
* The full snapshot is cached: once produced, repeated calls return the
|
|
39
|
+
* same array without touching the filesystem.
|
|
40
|
+
*
|
|
41
|
+
* Prefer {@link iterateSystemFontCandidates} when you only need the
|
|
42
|
+
* first candidate that satisfies a predicate: it avoids reading every
|
|
43
|
+
* font in every system directory just to discard them.
|
|
23
44
|
*/
|
|
24
45
|
export declare function discoverSystemFontCandidates(): Uint8Array[];
|
|
25
46
|
/**
|
|
26
47
|
* Search for a system font suitable for Unicode rendering.
|
|
27
48
|
*
|
|
28
49
|
* Returns the raw font file bytes of the highest-priority candidate,
|
|
29
|
-
* or `null` if no font was found.
|
|
30
|
-
* {@link discoverSystemFontCandidates}.
|
|
50
|
+
* or `null` if no font was found.
|
|
31
51
|
*/
|
|
32
52
|
export declare function discoverSystemFont(): Uint8Array | null;
|
|
33
53
|
/**
|