@project-ava-supernova/core 0.2.183 → 0.2.185
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/agent/agent.d.ts.map +1 -1
- package/dist/agent/agent.js +36 -24
- package/dist/agent/agent.js.map +1 -1
- package/dist/agent/system-prompt.d.ts +6 -0
- package/dist/agent/system-prompt.d.ts.map +1 -1
- package/dist/agent/system-prompt.js +15 -6
- package/dist/agent/system-prompt.js.map +1 -1
- package/dist/docs/content/concepts.js +1 -1
- package/dist/docs/content/concepts.js.map +1 -1
- package/dist/docs/content/features.d.ts.map +1 -1
- package/dist/docs/content/features.js +16 -9
- package/dist/docs/content/features.js.map +1 -1
- package/dist/docs/content/start.d.ts.map +1 -1
- package/dist/docs/content/start.js +1 -0
- package/dist/docs/content/start.js.map +1 -1
- package/dist/docs/data/tools.js +4 -4
- package/dist/docs/data/tools.js.map +1 -1
- package/dist/docs/i18n/translations.d.ts.map +1 -1
- package/dist/docs/i18n/translations.js +1 -1
- package/dist/docs/i18n/translations.js.map +1 -1
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +29 -0
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +29 -0
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +29 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +32 -0
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +29 -0
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +29 -0
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +29 -0
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/id.d.ts.map +1 -1
- package/dist/i18n/locales/id.js +29 -0
- package/dist/i18n/locales/id.js.map +1 -1
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +29 -0
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +29 -0
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/ko.d.ts.map +1 -1
- package/dist/i18n/locales/ko.js +29 -0
- package/dist/i18n/locales/ko.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +29 -0
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +29 -0
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +29 -0
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +29 -0
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/th.d.ts.map +1 -1
- package/dist/i18n/locales/th.js +29 -0
- package/dist/i18n/locales/th.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +29 -0
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/uk.d.ts.map +1 -1
- package/dist/i18n/locales/uk.js +29 -0
- package/dist/i18n/locales/uk.js.map +1 -1
- package/dist/i18n/locales/vi.d.ts.map +1 -1
- package/dist/i18n/locales/vi.js +29 -0
- package/dist/i18n/locales/vi.js.map +1 -1
- package/dist/i18n/locales/zh-CN.d.ts.map +1 -1
- package/dist/i18n/locales/zh-CN.js +29 -0
- package/dist/i18n/locales/zh-CN.js.map +1 -1
- package/dist/i18n/locales/zh-TW.d.ts.map +1 -1
- package/dist/i18n/locales/zh-TW.js +29 -0
- package/dist/i18n/locales/zh-TW.js.map +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/memory-v4/consolidate.d.ts +44 -0
- package/dist/memory-v4/consolidate.d.ts.map +1 -0
- package/dist/memory-v4/consolidate.js +241 -0
- package/dist/memory-v4/consolidate.js.map +1 -0
- package/dist/memory-v4/fact-cache.d.ts +38 -0
- package/dist/memory-v4/fact-cache.d.ts.map +1 -0
- package/dist/memory-v4/fact-cache.js +133 -0
- package/dist/memory-v4/fact-cache.js.map +1 -0
- package/dist/memory-v4/fact-file.d.ts +30 -0
- package/dist/memory-v4/fact-file.d.ts.map +1 -0
- package/dist/memory-v4/fact-file.js +133 -0
- package/dist/memory-v4/fact-file.js.map +1 -0
- package/dist/memory-v4/files.d.ts +30 -0
- package/dist/memory-v4/files.d.ts.map +1 -0
- package/dist/memory-v4/files.js +115 -0
- package/dist/memory-v4/files.js.map +1 -0
- package/dist/memory-v4/import-v3.d.ts +38 -0
- package/dist/memory-v4/import-v3.d.ts.map +1 -0
- package/dist/memory-v4/import-v3.js +148 -0
- package/dist/memory-v4/import-v3.js.map +1 -0
- package/dist/memory-v4/index.d.ts +20 -0
- package/dist/memory-v4/index.d.ts.map +1 -0
- package/dist/memory-v4/index.js +14 -0
- package/dist/memory-v4/index.js.map +1 -0
- package/dist/memory-v4/model.d.ts +26 -0
- package/dist/memory-v4/model.d.ts.map +1 -0
- package/dist/memory-v4/model.js +49 -0
- package/dist/memory-v4/model.js.map +1 -0
- package/dist/memory-v4/page.d.ts +57 -0
- package/dist/memory-v4/page.d.ts.map +1 -0
- package/dist/memory-v4/page.js +150 -0
- package/dist/memory-v4/page.js.map +1 -0
- package/dist/memory-v4/projects.d.ts +38 -0
- package/dist/memory-v4/projects.d.ts.map +1 -0
- package/dist/memory-v4/projects.js +135 -0
- package/dist/memory-v4/projects.js.map +1 -0
- package/dist/memory-v4/promotion.d.ts +17 -0
- package/dist/memory-v4/promotion.d.ts.map +1 -0
- package/dist/memory-v4/promotion.js +50 -0
- package/dist/memory-v4/promotion.js.map +1 -0
- package/dist/memory-v4/reader.d.ts +83 -0
- package/dist/memory-v4/reader.d.ts.map +1 -0
- package/dist/memory-v4/reader.js +270 -0
- package/dist/memory-v4/reader.js.map +1 -0
- package/dist/memory-v4/search-index.d.ts +43 -0
- package/dist/memory-v4/search-index.d.ts.map +1 -0
- package/dist/memory-v4/search-index.js +147 -0
- package/dist/memory-v4/search-index.js.map +1 -0
- package/dist/memory-v4/store.d.ts +168 -0
- package/dist/memory-v4/store.d.ts.map +1 -0
- package/dist/memory-v4/store.js +549 -0
- package/dist/memory-v4/store.js.map +1 -0
- package/dist/memory-v4/threads-episodes.d.ts +36 -0
- package/dist/memory-v4/threads-episodes.d.ts.map +1 -0
- package/dist/memory-v4/threads-episodes.js +119 -0
- package/dist/memory-v4/threads-episodes.js.map +1 -0
- package/dist/memory-v4/types.d.ts +84 -0
- package/dist/memory-v4/types.d.ts.map +1 -0
- package/dist/memory-v4/types.js +14 -0
- package/dist/memory-v4/types.js.map +1 -0
- package/dist/tools/authoring/doc-model.d.ts +2 -11
- package/dist/tools/authoring/doc-model.d.ts.map +1 -1
- package/dist/tools/authoring/doc-model.js +2 -39
- package/dist/tools/authoring/doc-model.js.map +1 -1
- package/dist/tools/authoring/document-places.d.ts +19 -0
- package/dist/tools/authoring/document-places.d.ts.map +1 -0
- package/dist/tools/authoring/document-places.js +24 -0
- package/dist/tools/authoring/document-places.js.map +1 -0
- package/dist/tools/authoring/export-document.d.ts +10 -0
- package/dist/tools/authoring/export-document.d.ts.map +1 -1
- package/dist/tools/authoring/export-document.js +26 -0
- package/dist/tools/authoring/export-document.js.map +1 -1
- package/dist/tools/authoring/font-manifest.d.ts +25 -0
- package/dist/tools/authoring/font-manifest.d.ts.map +1 -0
- package/dist/tools/authoring/font-manifest.js +35 -0
- package/dist/tools/authoring/font-manifest.js.map +1 -0
- package/dist/tools/authoring/formula-eval.d.ts +34 -0
- package/dist/tools/authoring/formula-eval.d.ts.map +1 -0
- package/dist/tools/authoring/formula-eval.js +250 -0
- package/dist/tools/authoring/formula-eval.js.map +1 -0
- package/dist/tools/authoring/index.d.ts +0 -1
- package/dist/tools/authoring/index.d.ts.map +1 -1
- package/dist/tools/authoring/index.js +2 -3
- package/dist/tools/authoring/index.js.map +1 -1
- package/dist/tools/authoring/ods-spreadsheet.d.ts +56 -0
- package/dist/tools/authoring/ods-spreadsheet.d.ts.map +1 -0
- package/dist/tools/authoring/ods-spreadsheet.js +426 -0
- package/dist/tools/authoring/ods-spreadsheet.js.map +1 -0
- package/dist/tools/authoring/pdf-fonts.d.ts +53 -0
- package/dist/tools/authoring/pdf-fonts.d.ts.map +1 -0
- package/dist/tools/authoring/pdf-fonts.js +269 -0
- package/dist/tools/authoring/pdf-fonts.js.map +1 -0
- package/dist/tools/authoring/read-office.d.ts +29 -0
- package/dist/tools/authoring/read-office.d.ts.map +1 -0
- package/dist/tools/authoring/read-office.js +48 -0
- package/dist/tools/authoring/read-office.js.map +1 -0
- package/dist/tools/authoring/render-pdf.d.ts.map +1 -1
- package/dist/tools/authoring/render-pdf.js +136 -7
- package/dist/tools/authoring/render-pdf.js.map +1 -1
- package/dist/tools/authoring/sheet-view.d.ts +32 -0
- package/dist/tools/authoring/sheet-view.d.ts.map +1 -0
- package/dist/tools/authoring/sheet-view.js +122 -0
- package/dist/tools/authoring/sheet-view.js.map +1 -0
- package/dist/tools/authoring/spreadsheet.d.ts +69 -0
- package/dist/tools/authoring/spreadsheet.d.ts.map +1 -0
- package/dist/tools/authoring/spreadsheet.js +216 -0
- package/dist/tools/authoring/spreadsheet.js.map +1 -0
- package/dist/tools/authoring/templates/builtins.d.ts.map +1 -1
- package/dist/tools/authoring/templates/builtins.js +2 -0
- package/dist/tools/authoring/templates/builtins.js.map +1 -1
- package/dist/tools/authoring/xlsx-charts.d.ts +66 -0
- package/dist/tools/authoring/xlsx-charts.d.ts.map +1 -0
- package/dist/tools/authoring/xlsx-charts.js +272 -0
- package/dist/tools/authoring/xlsx-charts.js.map +1 -0
- package/dist/tools/authoring/zip.d.ts +6 -0
- package/dist/tools/authoring/zip.d.ts.map +1 -1
- package/dist/tools/authoring/zip.js +45 -1
- package/dist/tools/authoring/zip.js.map +1 -1
- package/dist/tools/document-author.d.ts +4 -0
- package/dist/tools/document-author.d.ts.map +1 -1
- package/dist/tools/document-author.js +36 -24
- package/dist/tools/document-author.js.map +1 -1
- package/dist/tools/document-manage.d.ts +28 -25
- package/dist/tools/document-manage.d.ts.map +1 -1
- package/dist/tools/document-manage.js +298 -586
- package/dist/tools/document-manage.js.map +1 -1
- package/dist/tools/document-styling.d.ts +0 -26
- package/dist/tools/document-styling.d.ts.map +1 -1
- package/dist/tools/document-styling.js +0 -224
- package/dist/tools/document-styling.js.map +1 -1
- package/dist/tools/document-templates.d.ts +3 -18
- package/dist/tools/document-templates.d.ts.map +1 -1
- package/dist/tools/document-templates.js +4 -94
- package/dist/tools/document-templates.js.map +1 -1
- package/dist/tools/email-draft.d.ts +3 -6
- package/dist/tools/email-draft.d.ts.map +1 -1
- package/dist/tools/email-draft.js +29 -123
- package/dist/tools/email-draft.js.map +1 -1
- package/dist/tools/learning.d.ts.map +1 -1
- package/dist/tools/learning.js +9 -3
- package/dist/tools/learning.js.map +1 -1
- package/dist/tools/memory-recall-v4.d.ts +20 -0
- package/dist/tools/memory-recall-v4.d.ts.map +1 -0
- package/dist/tools/memory-recall-v4.js +49 -0
- package/dist/tools/memory-recall-v4.js.map +1 -0
- package/dist/tools/memory-write-v4.d.ts +40 -0
- package/dist/tools/memory-write-v4.d.ts.map +1 -0
- package/dist/tools/memory-write-v4.js +176 -0
- package/dist/tools/memory-write-v4.js.map +1 -0
- package/dist/tools/report-generate.d.ts +1 -2
- package/dist/tools/report-generate.d.ts.map +1 -1
- package/dist/tools/report-generate.js +50 -167
- package/dist/tools/report-generate.js.map +1 -1
- package/package.json +12 -5
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A small spreadsheet calculator (Documents 1.0 Part 3, 15 Nov 2026).
|
|
3
|
+
*
|
|
4
|
+
* exceljs writes a formula but never calculates it. Excel and LibreOffice do
|
|
5
|
+
* that on opening, but Ava reading the file back, and the document viewer,
|
|
6
|
+
* would see a blank where "=SUM(B2:B6)" should say 1,640. So the formulas
|
|
7
|
+
* people actually use in a budget or a tracker are worked out here and saved
|
|
8
|
+
* as the cell's result:
|
|
9
|
+
*
|
|
10
|
+
* SUM AVERAGE MIN MAX COUNT ROUND ABS, + - * / ^, brackets, cell
|
|
11
|
+
* references (A1, $B$2) and ranges (A1:C9) on the same sheet.
|
|
12
|
+
*
|
|
13
|
+
* Anything else (another sheet, VLOOKUP, IF, text functions) returns
|
|
14
|
+
* undefined: the result is left for the person's own app to calculate, and
|
|
15
|
+
* the file is still correct — never a guessed number.
|
|
16
|
+
*/
|
|
17
|
+
class Unsupported extends Error {
|
|
18
|
+
}
|
|
19
|
+
/** "B" → 2, "AA" → 27. */
|
|
20
|
+
export function colNumber(letters) {
|
|
21
|
+
let n = 0;
|
|
22
|
+
for (const ch of letters.toUpperCase())
|
|
23
|
+
n = n * 26 + (ch.charCodeAt(0) - 64);
|
|
24
|
+
return n;
|
|
25
|
+
}
|
|
26
|
+
/** "B7" → { c: 2, r: 7 }. */
|
|
27
|
+
export function parseRef(ref) {
|
|
28
|
+
const m = /^\$?([A-Za-z]{1,3})\$?(\d+)$/.exec(ref.trim());
|
|
29
|
+
return m ? { c: colNumber(m[1]), r: Number(m[2]) } : null;
|
|
30
|
+
}
|
|
31
|
+
function tokenize(src) {
|
|
32
|
+
const out = [];
|
|
33
|
+
let i = 0;
|
|
34
|
+
const s = src.trim().replace(/^=/, '');
|
|
35
|
+
while (i < s.length) {
|
|
36
|
+
const ch = s[i];
|
|
37
|
+
if (/\s/.test(ch)) {
|
|
38
|
+
i++;
|
|
39
|
+
continue;
|
|
40
|
+
}
|
|
41
|
+
if (ch === '(') {
|
|
42
|
+
out.push({ t: '(' });
|
|
43
|
+
i++;
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
if (ch === ')') {
|
|
47
|
+
out.push({ t: ')' });
|
|
48
|
+
i++;
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
if (ch === ',' || ch === ';') {
|
|
52
|
+
out.push({ t: ',' });
|
|
53
|
+
i++;
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
if ('+-*/^'.includes(ch)) {
|
|
57
|
+
out.push({ t: 'op', v: ch });
|
|
58
|
+
i++;
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
const num = /^\d+(\.\d+)?(e[+-]?\d+)?%?/i.exec(s.slice(i));
|
|
62
|
+
if (num && !/^[A-Za-z]/.test(ch)) {
|
|
63
|
+
const raw = num[0];
|
|
64
|
+
out.push({ t: 'num', v: raw.endsWith('%') ? Number(raw.slice(0, -1)) / 100 : Number(raw) });
|
|
65
|
+
i += raw.length;
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
const range = /^\$?([A-Za-z]{1,3})\$?(\d+):\$?([A-Za-z]{1,3})\$?(\d+)/.exec(s.slice(i));
|
|
69
|
+
if (range) {
|
|
70
|
+
const c1 = colNumber(range[1]), r1 = Number(range[2]), c2 = colNumber(range[3]), r2 = Number(range[4]);
|
|
71
|
+
out.push({ t: 'range', c1: Math.min(c1, c2), r1: Math.min(r1, r2), c2: Math.max(c1, c2), r2: Math.max(r1, r2) });
|
|
72
|
+
i += range[0].length;
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
const word = /^[A-Za-z_][A-Za-z0-9_.]*/.exec(s.slice(i));
|
|
76
|
+
if (word) {
|
|
77
|
+
const w = word[0];
|
|
78
|
+
const after = s.slice(i + w.length).trimStart();
|
|
79
|
+
if (after.startsWith('(')) {
|
|
80
|
+
out.push({ t: 'fn', name: w.toUpperCase() });
|
|
81
|
+
i += w.length;
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
const ref = /^\$?([A-Za-z]{1,3})\$?(\d+)/.exec(s.slice(i));
|
|
85
|
+
if (ref) {
|
|
86
|
+
out.push({ t: 'ref', c: colNumber(ref[1]), r: Number(ref[2]) });
|
|
87
|
+
i += ref[0].length;
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
throw new Unsupported(w); // a name, another sheet, a constant like TRUE
|
|
91
|
+
}
|
|
92
|
+
if (ch === '$') {
|
|
93
|
+
const ref = /^\$?([A-Za-z]{1,3})\$?(\d+)/.exec(s.slice(i));
|
|
94
|
+
if (ref) {
|
|
95
|
+
out.push({ t: 'ref', c: colNumber(ref[1]), r: Number(ref[2]) });
|
|
96
|
+
i += ref[0].length;
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
throw new Unsupported(ch); // '!' (another sheet), '&', '<', quotes …
|
|
101
|
+
}
|
|
102
|
+
return out;
|
|
103
|
+
}
|
|
104
|
+
const FUNCS = {
|
|
105
|
+
SUM: (a) => flat(a).reduce((x, y) => x + y, 0),
|
|
106
|
+
AVERAGE: (a) => { const f = flat(a); if (!f.length)
|
|
107
|
+
throw new Unsupported('AVERAGE of nothing'); return f.reduce((x, y) => x + y, 0) / f.length; },
|
|
108
|
+
MIN: (a) => { const f = flat(a); return f.length ? Math.min(...f) : 0; },
|
|
109
|
+
MAX: (a) => { const f = flat(a); return f.length ? Math.max(...f) : 0; },
|
|
110
|
+
COUNT: (a) => flat(a).length,
|
|
111
|
+
ROUND: (a) => { const [x, d = 0] = a.map(scalar); const p = 10 ** d; return Math.round(x * p) / p; },
|
|
112
|
+
ABS: (a) => Math.abs(scalar(a[0])),
|
|
113
|
+
};
|
|
114
|
+
function flat(a) { return a.flatMap((v) => (Array.isArray(v) ? v : [v])); }
|
|
115
|
+
function scalar(v) {
|
|
116
|
+
if (v === undefined)
|
|
117
|
+
throw new Unsupported('missing argument');
|
|
118
|
+
if (Array.isArray(v))
|
|
119
|
+
throw new Unsupported('range used as a number');
|
|
120
|
+
return v;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* The value of a formula, or undefined when it is outside what this
|
|
124
|
+
* calculator does. `get` reads other cells; a cell that is itself a formula is
|
|
125
|
+
* worked out on the way (`seen` stops a loop).
|
|
126
|
+
*/
|
|
127
|
+
export function evaluateFormula(formula, get, seen = new Set()) {
|
|
128
|
+
let tokens;
|
|
129
|
+
try {
|
|
130
|
+
tokens = tokenize(formula);
|
|
131
|
+
}
|
|
132
|
+
catch {
|
|
133
|
+
return undefined;
|
|
134
|
+
}
|
|
135
|
+
let pos = 0;
|
|
136
|
+
const cellNumber = (c, r, inRange) => {
|
|
137
|
+
const key = `${c}:${r}`;
|
|
138
|
+
const cell = get(c, r);
|
|
139
|
+
if (!cell)
|
|
140
|
+
return inRange ? null : 0;
|
|
141
|
+
if (cell.formula) {
|
|
142
|
+
if (seen.has(key))
|
|
143
|
+
throw new Unsupported('loop');
|
|
144
|
+
const next = new Set(seen);
|
|
145
|
+
next.add(key);
|
|
146
|
+
const v = evaluateFormula(cell.formula, get, next);
|
|
147
|
+
if (v === undefined)
|
|
148
|
+
throw new Unsupported('depends on an uncalculated cell');
|
|
149
|
+
return v;
|
|
150
|
+
}
|
|
151
|
+
const v = cell.value;
|
|
152
|
+
if (typeof v === 'number')
|
|
153
|
+
return v;
|
|
154
|
+
if (v == null || v === '')
|
|
155
|
+
return inRange ? null : 0;
|
|
156
|
+
if (inRange)
|
|
157
|
+
return null; // text in a range is skipped, as in Excel
|
|
158
|
+
throw new Unsupported('text used as a number');
|
|
159
|
+
};
|
|
160
|
+
const primary = () => {
|
|
161
|
+
const tk = tokens[pos++];
|
|
162
|
+
if (!tk)
|
|
163
|
+
throw new Unsupported('end');
|
|
164
|
+
if (tk.t === 'num')
|
|
165
|
+
return tk.v;
|
|
166
|
+
if (tk.t === 'ref')
|
|
167
|
+
return cellNumber(tk.c, tk.r, false) ?? 0;
|
|
168
|
+
if (tk.t === 'range') {
|
|
169
|
+
const out = [];
|
|
170
|
+
for (let r = tk.r1; r <= tk.r2; r++)
|
|
171
|
+
for (let c = tk.c1; c <= tk.c2; c++) {
|
|
172
|
+
const v = cellNumber(c, r, true);
|
|
173
|
+
if (v != null)
|
|
174
|
+
out.push(v);
|
|
175
|
+
}
|
|
176
|
+
return out;
|
|
177
|
+
}
|
|
178
|
+
if (tk.t === 'op' && tk.v === '-')
|
|
179
|
+
return -scalar(power());
|
|
180
|
+
if (tk.t === 'op' && tk.v === '+')
|
|
181
|
+
return scalar(power());
|
|
182
|
+
if (tk.t === '(') {
|
|
183
|
+
const v = expr();
|
|
184
|
+
if (tokens[pos++]?.t !== ')')
|
|
185
|
+
throw new Unsupported(')');
|
|
186
|
+
return v;
|
|
187
|
+
}
|
|
188
|
+
if (tk.t === 'fn') {
|
|
189
|
+
const fn = FUNCS[tk.name];
|
|
190
|
+
if (!fn)
|
|
191
|
+
throw new Unsupported(tk.name);
|
|
192
|
+
if (tokens[pos++]?.t !== '(')
|
|
193
|
+
throw new Unsupported('(');
|
|
194
|
+
const args = [];
|
|
195
|
+
if (tokens[pos]?.t !== ')') {
|
|
196
|
+
for (;;) {
|
|
197
|
+
args.push(expr());
|
|
198
|
+
if (tokens[pos]?.t === ',') {
|
|
199
|
+
pos++;
|
|
200
|
+
continue;
|
|
201
|
+
}
|
|
202
|
+
break;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
if (tokens[pos++]?.t !== ')')
|
|
206
|
+
throw new Unsupported(')');
|
|
207
|
+
return fn(args);
|
|
208
|
+
}
|
|
209
|
+
throw new Unsupported('token');
|
|
210
|
+
};
|
|
211
|
+
const power = () => {
|
|
212
|
+
let left = primary();
|
|
213
|
+
while (tokens[pos]?.t === 'op' && tokens[pos].v === '^') {
|
|
214
|
+
pos++;
|
|
215
|
+
left = scalar(left) ** scalar(primary());
|
|
216
|
+
}
|
|
217
|
+
return left;
|
|
218
|
+
};
|
|
219
|
+
const term = () => {
|
|
220
|
+
let left = power();
|
|
221
|
+
while (tokens[pos]?.t === 'op' && '*/'.includes(tokens[pos].v)) {
|
|
222
|
+
const op = tokens[pos++].v;
|
|
223
|
+
const right = scalar(power());
|
|
224
|
+
if (op === '/' && right === 0)
|
|
225
|
+
throw new Unsupported('divide by zero');
|
|
226
|
+
left = op === '*' ? scalar(left) * right : scalar(left) / right;
|
|
227
|
+
}
|
|
228
|
+
return left;
|
|
229
|
+
};
|
|
230
|
+
const expr = () => {
|
|
231
|
+
let left = term();
|
|
232
|
+
while (tokens[pos]?.t === 'op' && '+-'.includes(tokens[pos].v)) {
|
|
233
|
+
const op = tokens[pos++].v;
|
|
234
|
+
const right = scalar(term());
|
|
235
|
+
left = op === '+' ? scalar(left) + right : scalar(left) - right;
|
|
236
|
+
}
|
|
237
|
+
return left;
|
|
238
|
+
};
|
|
239
|
+
try {
|
|
240
|
+
const v = expr();
|
|
241
|
+
if (pos !== tokens.length)
|
|
242
|
+
return undefined;
|
|
243
|
+
const n = scalar(v);
|
|
244
|
+
return Number.isFinite(n) ? Math.round(n * 1e10) / 1e10 : undefined;
|
|
245
|
+
}
|
|
246
|
+
catch {
|
|
247
|
+
return undefined;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
//# sourceMappingURL=formula-eval.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formula-eval.js","sourceRoot":"","sources":["../../../src/tools/authoring/formula-eval.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAYH,MAAM,WAAY,SAAQ,KAAK;CAAG;AAElC,0BAA0B;AAC1B,MAAM,UAAU,SAAS,CAAC,OAAe;IACvC,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,KAAK,MAAM,EAAE,IAAI,OAAO,CAAC,WAAW,EAAE;QAAE,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,EA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T_MIMETYPE, ODS_MIMETYPE } from './render-odf.js';
|
|
35
35
|
export { exportDocument, deriveExportPath, parseCsv } from './export-document.js';
|
|
36
36
|
export type { ExportRequest, ExportResult } from './export-document.js';
|
|
37
|
-
export { legacyToDocModel } from './doc-model.js';
|
|
38
37
|
export type { DocModel, DocMeta, Block, Inline, ListItem, Align, CalloutVariant, BrandTokens, } from './doc-model.js';
|
|
39
38
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/authoring/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAM/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGxD,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EACL,wBAAwB,EAAE,4BAA4B,EAAE,gBAAgB,EACxE,mBAAmB,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,GAC1D,MAAM,qBAAqB,CAAC;AAE7B,MAAM,WAAW,aAAa;IAC5B,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IAClC,2DAA2D;IAC3D,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IACjC,yDAAyD;IACzD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;GAIG;AACH,wBAAsB,cAAc,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,IAAI,GAAE,aAAkB,GAAG,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,CAkB9H;AAED,yEAAyE;AACzE,wBAAsB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,IAAI,GAAE,aAAkB,GAAG,OAA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kB,GAAG,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,CAkB9H;AAED,yEAAyE;AACzE,wBAAsB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,IAAI,GAAE,aAAkB,GAAG,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,CAEnI;AAED,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACnF,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAClF,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACxE,YAAY,EACV,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,cAAc,EAAE,WAAW,GAC/E,MAAM,gBAAgB,CAAC"}
|
|
@@ -24,12 +24,12 @@ export async function renderDocument(model, target, opts = {}) {
|
|
|
24
24
|
return renderMarkdown(model);
|
|
25
25
|
case 'docx':
|
|
26
26
|
if (!opts.loadDocx)
|
|
27
|
-
throw new Error('
|
|
27
|
+
throw new Error('Word files cannot be made in this build of Ava.');
|
|
28
28
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
29
29
|
return renderDocx(model, { loadDocx: opts.loadDocx, baseDir: opts.baseDir });
|
|
30
30
|
case 'pdf':
|
|
31
31
|
if (!opts.loadPdf)
|
|
32
|
-
throw new Error('
|
|
32
|
+
throw new Error('PDFs cannot be made in this build of Ava.');
|
|
33
33
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
34
34
|
return renderPdf(model, { loadPdf: opts.loadPdf, baseDir: opts.baseDir });
|
|
35
35
|
// OpenDocument needs no peer — XML in a zip, both from Node's stdlib.
|
|
@@ -49,5 +49,4 @@ export { renderDocx } from './render-docx.js';
|
|
|
49
49
|
export { renderPdf } from './render-pdf.js';
|
|
50
50
|
export { renderOdt, renderOds, ODT_MIMETYPE, ODS_MIMETYPE } from './render-odf.js';
|
|
51
51
|
export { exportDocument, deriveExportPath, parseCsv } from './export-document.js';
|
|
52
|
-
export { legacyToDocModel } from './doc-model.js';
|
|
53
52
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/authoring/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAKvD,OAAO,EACL,wBAAwB,EAAE,4BAA4B,EAAE,gBAAgB,EACxE,mBAAmB,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,GAC1D,MAAM,qBAAqB,CAAC;AAW7B;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,KAAe,EAAE,MAAoB,EAAE,OAAsB,EAAE;IAClG,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,IAAI;YACP,OAAO,cAAc,CAAC,KAAK,CAAC,CAAC;QAC/B,KAAK,MAAM;YACT,IAAI,CAAC,IAAI,CAAC,QAAQ;gBAAE,MAAM,IAAI,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/authoring/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E,CAAC,CAAC;QACrD,KAAK,KAAK;YACR,OAAO,SAAS,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;IACvD,CAAC;AACH,CAAC;AAED,yEAAyE;AACzE,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,MAAc,EAAE,MAAoB,EAAE,OAAsB,EAAE;IACvG,OAAO,cAAc,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;AAC7D,CAAC;AAED,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACnF,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The open format, with everything in it (his call 15 Nov 2026: Ava's
|
|
3
|
+
* spreadsheets come as .ods too — formulas, totals, formats and charts, not
|
|
4
|
+
* just the data).
|
|
5
|
+
*
|
|
6
|
+
* Written from the SAME exceljs workbook as the .xlsx (spreadsheet.ts), so the
|
|
7
|
+
* two files agree cell for cell: values, worked-out formula results, number
|
|
8
|
+
* formats, the house-colour header, a frozen and filterable first row, and
|
|
9
|
+
* charts as OpenDocument chart objects carrying their own copy of the numbers.
|
|
10
|
+
*
|
|
11
|
+
* readOds reads one back — our own and ordinary LibreOffice files — for the
|
|
12
|
+
* viewer, for Ava, and so an .ods can be changed like an .xlsx.
|
|
13
|
+
*/
|
|
14
|
+
import { type ChartSpec, type ChartView, type ChartCells } from './xlsx-charts.js';
|
|
15
|
+
import type { BrandTokens } from './doc-model.js';
|
|
16
|
+
import type { SheetSpec } from './spreadsheet.js';
|
|
17
|
+
export declare const ODS_SHEET_MIMETYPE = "application/vnd.oasis.opendocument.spreadsheet";
|
|
18
|
+
/** "SUM(B2:B6)*C3" (Excel) → "of:=SUM([.B2:.B6])*[.C3]" (OpenDocument). */
|
|
19
|
+
export declare function toOdfFormula(excel: string): string;
|
|
20
|
+
/** "of:=SUM([.B2:.B6])" → "SUM(B2:B6)"; "$" marks kept. */
|
|
21
|
+
export declare function fromOdfFormula(odf: string): string;
|
|
22
|
+
/**
|
|
23
|
+
* The .ods for an exceljs workbook (values, formulas and their results,
|
|
24
|
+
* formats, header, frozen first row, filters) and its charts.
|
|
25
|
+
*/
|
|
26
|
+
export declare function workbookToOds(workbook: any, charts: Array<{
|
|
27
|
+
sheet: string;
|
|
28
|
+
charts: ChartSpec[];
|
|
29
|
+
}>, cells: ChartCells, brand?: BrandTokens): Buffer;
|
|
30
|
+
export interface OdsCell {
|
|
31
|
+
/** What it shows. */
|
|
32
|
+
text: string;
|
|
33
|
+
/** The value, for numbers, currency, percentages (a fraction) and dates (ISO). */
|
|
34
|
+
value?: number | string;
|
|
35
|
+
kind: 'string' | 'float' | 'currency' | 'percentage' | 'date' | 'empty';
|
|
36
|
+
currency?: string;
|
|
37
|
+
/** Excel-style formula, without "=". */
|
|
38
|
+
formula?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface OdsSheet {
|
|
41
|
+
name: string;
|
|
42
|
+
rows: OdsCell[][];
|
|
43
|
+
charts: ChartView[];
|
|
44
|
+
}
|
|
45
|
+
/** Every sheet of an .ods: its cells (with formulas) and its charts. */
|
|
46
|
+
export declare function readOds(bytes: Buffer, limits?: {
|
|
47
|
+
rows: number;
|
|
48
|
+
cols: number;
|
|
49
|
+
}): OdsSheet[];
|
|
50
|
+
/**
|
|
51
|
+
* An .ods sheet as a SheetSpec, so it can be rebuilt through the same
|
|
52
|
+
* workbook as an .xlsx and changed the same way: formulas kept as formulas,
|
|
53
|
+
* numbers as numbers, each column's format taken from its first value.
|
|
54
|
+
*/
|
|
55
|
+
export declare function odsToSheetSpec(sheet: OdsSheet): SheetSpec;
|
|
56
|
+
//# sourceMappingURL=ods-spreadsheet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ods-spreadsheet.d.ts","sourceRoot":"","sources":["../../../src/tools/authoring/ods-spreadsheet.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,OAAO,EAAc,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC/F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAc,MAAM,kBAAkB,CAAC;AAI9D,eAAO,MAAM,kBAAkB,mDAAmD,CAAC;AAenF,2EAA2E;AAC3E,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAalD;AAED,2DAA2D;AAC3D,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAMlD;AAuGD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,SAAS,EAAE,CAAA;CAAE,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,CAAC,EAAE,WAAW,GAAG,MAAM,CAmIlJ;AAID,MAAM,WAAW,OAAO;IACtB,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,kFAAkF;IAClF,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,IAAI,EAAE,QAAQ,GAAG,OAAO,GAAG,UAAU,GAAG,YAAY,GAAG,MAAM,GAAG,OAAO,CAAC;IACxE,QAAQ,CAAC,EAAE,MAAM,CAAC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