@sheetxl/query 0.8.0-beta.11 → 0.8.0-beta.12
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/index.mjs +1557 -1376
- package/node/esm/index.mjs +1581 -1393
- package/package.json +3 -3
- package/types/src/markdown/appendDataTables.d.ts +39 -0
- package/types/src/markdown/appendSections.d.ts +11 -0
- package/types/src/markdown/describeAnomaly.d.ts +10 -1
- package/types/src/markdown/renderRegions.d.ts +8 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sheetxl/query",
|
|
3
3
|
"description": "SheetXL - Workbook read surface and renderers (grep, reports) — capabilities declared once, adapted by any host surface",
|
|
4
|
-
"version": "0.8.0-beta.
|
|
4
|
+
"version": "0.8.0-beta.12",
|
|
5
5
|
"license": "SEE LICENSE IN <LICENSE>",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"query"
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@sheetxl/primitives": "^0.8.0-beta.
|
|
46
|
-
"@sheetxl/sdk": "^0.8.0-beta.
|
|
45
|
+
"@sheetxl/primitives": "^0.8.0-beta.12",
|
|
46
|
+
"@sheetxl/sdk": "^0.8.0-beta.12"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/node": "^26.6.4"
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ICellRange, IWorksheet } from '@sheetxl/sdk';
|
|
2
|
+
import { MarkdownBuilder } from './MarkdownBuilder';
|
|
3
|
+
/** One what-if data table on a sheet: a `TABLE` formula and the results it spills. */
|
|
4
|
+
export interface DataTableListing {
|
|
5
|
+
/** The results: the spill, or what the counts state when the spill is blocked. */
|
|
6
|
+
extent: ICellRange;
|
|
7
|
+
/** The formula at the anchor, `=TABLE(...)`. */
|
|
8
|
+
formula: string;
|
|
9
|
+
/** The row input's address, `#REF!` when deleted; `null` for a one-input table down a column. */
|
|
10
|
+
rowInput: string | null;
|
|
11
|
+
/** The column input's address, `#REF!` when deleted; `null` for a one-input table along a row. */
|
|
12
|
+
columnInput: string | null;
|
|
13
|
+
/** The extent is blocked (`#SPILL!`). */
|
|
14
|
+
blocked: boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The sheet's what-if data tables: every formula region whose formula is one whole `TABLE(...)`
|
|
18
|
+
* call. Read per region of the formula partition, never cell by cell.
|
|
19
|
+
*/
|
|
20
|
+
export declare function findDataTables(sheet: IWorksheet): DataTableListing[];
|
|
21
|
+
/**
|
|
22
|
+
* The formula cells of a data table, as an address: the corner of a two-input table, the row above
|
|
23
|
+
* a one-input table down a column, the column left of one along a row.
|
|
24
|
+
*/
|
|
25
|
+
export declare const describeDataTableFormula: (table: DataTableListing) => string;
|
|
26
|
+
/** `=TABLE(B1,C1,3,3) row input B1, column input C1, formula E2` - one table's listing row. */
|
|
27
|
+
export declare const describeDataTable: (table: DataTableListing) => string;
|
|
28
|
+
/**
|
|
29
|
+
* `## Data Tables (1)` over ` F3:H5 =TABLE(B1,C1,3,3) row input B1, column input C1, formula E2`
|
|
30
|
+
* rows.
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* A what-if data table is a spilling formula, so the formula and spill partitions already list it.
|
|
34
|
+
* This section is what says its results are the formula cells evaluated once per axis pair, and
|
|
35
|
+
* names the cells an edit should reach instead: the inputs, the axes beside the results and the
|
|
36
|
+
* formula.
|
|
37
|
+
*/
|
|
38
|
+
export declare function appendDataTables(md: MarkdownBuilder, tables: readonly DataTableListing[]): void;
|
|
39
|
+
//# sourceMappingURL=appendDataTables.d.ts.map
|
|
@@ -207,6 +207,17 @@ export interface AppendNamesOptions {
|
|
|
207
207
|
* since a bare `Sales` in an expression is a `named` token that resolves to a table.
|
|
208
208
|
*/
|
|
209
209
|
symbols?: readonly INamed[];
|
|
210
|
+
/**
|
|
211
|
+
* Gives rows only to the names some formula reads; the rest are one count on the closing line.
|
|
212
|
+
*
|
|
213
|
+
* @defaultValue `false` — every name gets a row (a name manager must be complete)
|
|
214
|
+
*
|
|
215
|
+
* @remarks
|
|
216
|
+
* For a report whose job is routing. A name nothing reads changes no value and breaks no cell,
|
|
217
|
+
* and a decades-old model carries them by the ten thousand (macro-sheet constants, dead
|
|
218
|
+
* `#REF!`s): listed, they are the whole section; counted, the section is the names that matter.
|
|
219
|
+
*/
|
|
220
|
+
omitUnread?: boolean;
|
|
210
221
|
}
|
|
211
222
|
/**
|
|
212
223
|
* A name's spelling as a formula would write it — qualified when it is scoped to one sheet.
|
|
@@ -13,7 +13,16 @@ export declare const anomalyLabel: (check: string) => string;
|
|
|
13
13
|
*/
|
|
14
14
|
export declare function describeAnomaly(anomaly: ICell.Anomaly, cell: ICell): string;
|
|
15
15
|
/** Every finding at `cell`, `;`-joined; `null` when none fires. */
|
|
16
|
-
export declare function describeAnomalies(cell: ICell
|
|
16
|
+
export declare function describeAnomalies(cell: ICell, options?: {
|
|
17
|
+
constants?: boolean;
|
|
18
|
+
}): string | null;
|
|
19
|
+
/** A `constantFrequency` finding's constant as a formula types it: `12`, `"Total"`, `FALSE`. */
|
|
20
|
+
export declare const describeConstant: (evidence: ICell.Anomaly["evidence"]) => string;
|
|
21
|
+
/**
|
|
22
|
+
* Whether a region's findings are constants alone: the reports count those in the `Constants`
|
|
23
|
+
* census rather than listing each region among the breaks.
|
|
24
|
+
*/
|
|
25
|
+
export declare const isConstantOnly: (anomalies: readonly ICell.Anomaly[]) => boolean;
|
|
17
26
|
/**
|
|
18
27
|
* R1C1 references in `text` as A1, read from `at`: `=R[-1]C*2` at `B3` is `=B2*2`. Absolute
|
|
19
28
|
* parts take a `$`, as Excel writes them.
|
|
@@ -50,7 +50,15 @@ export declare function appendRegionList(md: MarkdownBuilder, regions: readonly
|
|
|
50
50
|
payload?: RegionPayload;
|
|
51
51
|
profile?: boolean;
|
|
52
52
|
series?: boolean;
|
|
53
|
+
collapse?: RegionKey;
|
|
53
54
|
}): void;
|
|
55
|
+
/** What a region says, as a key two regions saying the same thing share; `null` keeps it on its own. */
|
|
56
|
+
export type RegionKey = (region: ICellRegion) => string | null;
|
|
57
|
+
/**
|
|
58
|
+
* An `anomalies` region's key: its findings, check and evidence, without the rank. Two regions
|
|
59
|
+
* with the same findings are one line of the listing.
|
|
60
|
+
*/
|
|
61
|
+
export declare const anomalyRegionKey: RegionKey;
|
|
54
62
|
/**
|
|
55
63
|
* Renders a partition — the unit `getRegions` returns, so an agent addresses structure instead
|
|
56
64
|
* of guessing ranges.
|