@truecalc/core 7.0.5 → 7.0.7
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/package.json +1 -1
- package/truecalc_wasm.d.ts +75 -22
- package/truecalc_wasm_bg.wasm +0 -0
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@truecalc/core",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"description": "Spreadsheet formula engine for the browser — Google Sheets–compatible formula evaluator compiled to WebAssembly",
|
|
5
|
-
"version": "7.0.
|
|
5
|
+
"version": "7.0.7",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
package/truecalc_wasm.d.ts
CHANGED
|
@@ -22,6 +22,81 @@ export interface SparklineSpecResult {
|
|
|
22
22
|
options: [string, EvalResult][];
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
/**
|
|
26
|
+
* Metadata for one built-in function, as returned by [`list_functions`].
|
|
27
|
+
*
|
|
28
|
+
* Derived from the engine\'s function registry, so it always reflects what the
|
|
29
|
+
* engine actually implements.
|
|
30
|
+
*/
|
|
31
|
+
export interface FunctionInfo {
|
|
32
|
+
/**
|
|
33
|
+
* The function name in upper case, e.g. `\"SUM\"`.
|
|
34
|
+
*/
|
|
35
|
+
name: string;
|
|
36
|
+
/**
|
|
37
|
+
* The registry category, e.g. `\"math\"`, `\"text\"`, `\"financial\"`.
|
|
38
|
+
*/
|
|
39
|
+
category: string;
|
|
40
|
+
/**
|
|
41
|
+
* The call signature, e.g. `\"PMT(rate, nper, pv, [fv], [type])\"`.
|
|
42
|
+
* Optional arguments appear in square brackets.
|
|
43
|
+
*/
|
|
44
|
+
syntax: string;
|
|
45
|
+
/**
|
|
46
|
+
* A one-line description of what the function does.
|
|
47
|
+
*/
|
|
48
|
+
description: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* The outcome of a [`rename_sheet_refs`] call.
|
|
53
|
+
*
|
|
54
|
+
* Exactly one of `formula` or `error` is present.
|
|
55
|
+
*/
|
|
56
|
+
export interface RenameSheetRefsResult {
|
|
57
|
+
/**
|
|
58
|
+
* The rewritten formula. Absent when the input failed to parse.
|
|
59
|
+
*/
|
|
60
|
+
formula?: string;
|
|
61
|
+
/**
|
|
62
|
+
* The parse error message. Absent on success.
|
|
63
|
+
*/
|
|
64
|
+
error?: string;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* The outcome of a [`translate_formula`] call.
|
|
69
|
+
*
|
|
70
|
+
* Exactly one of `formula` or `error` is present.
|
|
71
|
+
*/
|
|
72
|
+
export interface TranslateResult {
|
|
73
|
+
/**
|
|
74
|
+
* The rewritten formula. Absent when the input failed to parse.
|
|
75
|
+
*/
|
|
76
|
+
formula?: string;
|
|
77
|
+
/**
|
|
78
|
+
* The parse error message. Absent on success.
|
|
79
|
+
*/
|
|
80
|
+
error?: string;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* The outcome of a [`validate`] call.
|
|
85
|
+
*
|
|
86
|
+
* `{ valid: true }` when the formula parses, otherwise
|
|
87
|
+
* `{ valid: false, error: \"...\" }`.
|
|
88
|
+
*/
|
|
89
|
+
export interface ValidateResult {
|
|
90
|
+
/**
|
|
91
|
+
* `true` when the formula parses.
|
|
92
|
+
*/
|
|
93
|
+
valid: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* The parse error message. Absent when `valid` is `true`.
|
|
96
|
+
*/
|
|
97
|
+
error?: string;
|
|
98
|
+
}
|
|
99
|
+
|
|
25
100
|
/**
|
|
26
101
|
* The result of evaluating a formula on the WASM surface.
|
|
27
102
|
*
|
|
@@ -49,28 +124,6 @@ export interface SparklineSpecResult {
|
|
|
49
124
|
*/
|
|
50
125
|
export type EvalResult = { type: "number"; value: number } | { type: "text"; value: string } | { type: "bool"; value: boolean } | { type: "date"; value: number } | { type: "zoned"; value: string } | { type: "error"; error: string; message?: string } | { type: "empty" } | { type: "array"; value: EvalResult[] } | { type: "sparkline"; value: SparklineSpecResult };
|
|
51
126
|
|
|
52
|
-
export interface FunctionInfo {
|
|
53
|
-
name: string;
|
|
54
|
-
category: string;
|
|
55
|
-
syntax: string;
|
|
56
|
-
description: string;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export interface RenameSheetRefsResult {
|
|
60
|
-
formula?: string;
|
|
61
|
-
error?: string;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export interface TranslateResult {
|
|
65
|
-
formula?: string;
|
|
66
|
-
error?: string;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export interface ValidateResult {
|
|
70
|
-
valid: boolean;
|
|
71
|
-
error?: string;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
127
|
|
|
75
128
|
/**
|
|
76
129
|
* A stateful engine bound to a conformance target.
|
package/truecalc_wasm_bg.wasm
CHANGED
|
Binary file
|