@robosystems/report-components 0.1.0 → 0.1.2

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.
Files changed (52) hide show
  1. package/README.md +7 -7
  2. package/dist/adapters/index.d.ts +2 -5
  3. package/dist/adapters/index.js +2 -2
  4. package/dist/adapters/index.js.map +1 -1
  5. package/dist/chunk-FNRQJVAH.js +284 -0
  6. package/dist/chunk-FNRQJVAH.js.map +1 -0
  7. package/dist/{model.d.ts → index-DlTmV_mJ.d.ts} +87 -17
  8. package/dist/index.d.ts +119 -23
  9. package/dist/index.js +491 -23
  10. package/dist/index.js.map +1 -1
  11. package/package.json +5 -2
  12. package/dist/adapters/cypher.d.ts +0 -21
  13. package/dist/adapters/cypher.d.ts.map +0 -1
  14. package/dist/adapters/cypher.js +0 -9
  15. package/dist/adapters/cypher.js.map +0 -1
  16. package/dist/adapters/index.d.ts.map +0 -1
  17. package/dist/adapters/trig.d.ts +0 -7
  18. package/dist/adapters/trig.d.ts.map +0 -1
  19. package/dist/adapters/trig.js +0 -183
  20. package/dist/adapters/trig.js.map +0 -1
  21. package/dist/adapters/types.d.ts +0 -16
  22. package/dist/adapters/types.d.ts.map +0 -1
  23. package/dist/adapters/types.js +0 -2
  24. package/dist/adapters/types.js.map +0 -1
  25. package/dist/components/FactInspector.d.ts +0 -11
  26. package/dist/components/FactInspector.d.ts.map +0 -1
  27. package/dist/components/FactInspector.js +0 -79
  28. package/dist/components/FactInspector.js.map +0 -1
  29. package/dist/components/ReportView.d.ts +0 -9
  30. package/dist/components/ReportView.d.ts.map +0 -1
  31. package/dist/components/ReportView.js +0 -51
  32. package/dist/components/ReportView.js.map +0 -1
  33. package/dist/components/StatementTable.d.ts +0 -15
  34. package/dist/components/StatementTable.d.ts.map +0 -1
  35. package/dist/components/StatementTable.js +0 -86
  36. package/dist/components/StatementTable.js.map +0 -1
  37. package/dist/constants.d.ts +0 -71
  38. package/dist/constants.d.ts.map +0 -1
  39. package/dist/constants.js +0 -115
  40. package/dist/constants.js.map +0 -1
  41. package/dist/format.d.ts +0 -17
  42. package/dist/format.d.ts.map +0 -1
  43. package/dist/format.js +0 -34
  44. package/dist/format.js.map +0 -1
  45. package/dist/index.d.ts.map +0 -1
  46. package/dist/model.d.ts.map +0 -1
  47. package/dist/model.js +0 -15
  48. package/dist/model.js.map +0 -1
  49. package/dist/project.d.ts +0 -39
  50. package/dist/project.d.ts.map +0 -1
  51. package/dist/project.js +0 -201
  52. package/dist/project.js.map +0 -1
@@ -1,15 +0,0 @@
1
- import type { Statement, StatementRow } from '../model';
2
- export interface StatementTableProps {
3
- statement: Statement;
4
- /** Called when a value cell is clicked — drives fact inspection. */
5
- onCellClick?: (row: StatementRow, columnIndex: number) => void;
6
- /** Currency symbol for values (default `$`). */
7
- currencySymbol?: string;
8
- /** The currently-selected cell, highlighted. */
9
- selected?: {
10
- elementId: string;
11
- columnIndex: number;
12
- } | null;
13
- }
14
- export declare function StatementTable({ statement, onCellClick, currencySymbol, selected, }: StatementTableProps): import("react").JSX.Element;
15
- //# sourceMappingURL=StatementTable.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"StatementTable.d.ts","sourceRoot":"","sources":["../../src/components/StatementTable.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAEvD,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,SAAS,CAAA;IACpB,oEAAoE;IACpE,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,CAAA;IAC9D,gDAAgD;IAChD,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,gDAAgD;IAChD,QAAQ,CAAC,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;CAC7D;AAmDD,wBAAgB,cAAc,CAAC,EAC7B,SAAS,EACT,WAAW,EACX,cAAoB,EACpB,QAAe,GAChB,EAAE,mBAAmB,+BA8ErB"}
@@ -1,86 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { formatMoney, formatPeriod } from '../format';
3
- const styles = {
4
- wrap: {
5
- fontFamily: 'var(--rs-font-sans, ui-sans-serif, system-ui, sans-serif)',
6
- color: 'var(--rs-text, #111827)',
7
- marginBottom: '2.5rem',
8
- },
9
- heading: {
10
- textAlign: 'center',
11
- marginBottom: '1rem',
12
- },
13
- title: {
14
- fontFamily: 'var(--rs-font-heading, var(--rs-font-sans, sans-serif))',
15
- fontSize: '1.15rem',
16
- fontWeight: 700,
17
- letterSpacing: '0.02em',
18
- margin: 0,
19
- },
20
- subtitle: {
21
- fontSize: '0.85rem',
22
- color: 'var(--rs-muted, #6b7280)',
23
- marginTop: '0.25rem',
24
- },
25
- table: {
26
- width: '100%',
27
- borderCollapse: 'collapse',
28
- fontSize: '0.875rem',
29
- },
30
- th: {
31
- borderBottom: '2px solid var(--rs-border-strong, #9ca3af)',
32
- padding: '0.5rem 0.75rem',
33
- fontWeight: 600,
34
- color: 'var(--rs-muted, #6b7280)',
35
- fontSize: '0.8rem',
36
- },
37
- thConcept: { textAlign: 'left' },
38
- thNum: { textAlign: 'right', whiteSpace: 'nowrap' },
39
- labelCell: {
40
- padding: '0.3rem 0.75rem',
41
- whiteSpace: 'normal',
42
- },
43
- numCell: {
44
- padding: '0.3rem 0.75rem',
45
- textAlign: 'right',
46
- whiteSpace: 'nowrap',
47
- fontFamily: 'var(--rs-font-mono, ui-monospace, SFMono-Regular, monospace)',
48
- fontVariantNumeric: 'tabular-nums',
49
- },
50
- };
51
- export function StatementTable({ statement, onCellClick, currencySymbol = '$', selected = null, }) {
52
- const { columns, rows } = statement;
53
- const periodCaption = columns.length === 1 ? formatPeriod(columns[0].period) : null;
54
- return (_jsxs("section", { style: styles.wrap, children: [_jsxs("header", { style: styles.heading, children: [_jsx("h3", { style: styles.title, children: statement.title }), statement.structureName ? (_jsx("div", { style: styles.subtitle, children: statement.structureName })) : null, periodCaption ? _jsx("div", { style: styles.subtitle, children: periodCaption }) : null] }), _jsxs("table", { style: styles.table, children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { style: { ...styles.th, ...styles.thConcept }, children: "Concept" }), columns.map((col) => (_jsx("th", { style: { ...styles.th, ...styles.thNum }, children: col.label }, col.key)))] }) }), _jsx("tbody", { children: rows.map((row) => {
55
- const isGrandTotal = row.isSubtotal && row.depth === 0;
56
- const allZeroOrNull = row.cells.every((c) => c.value === null || c.value === 0);
57
- const rowStyle = {
58
- backgroundColor: row.isSubtotal ? 'var(--rs-subtotal-bg, #f9fafb)' : undefined,
59
- };
60
- const labelStyle = {
61
- ...styles.labelCell,
62
- paddingLeft: `${row.depth * 20 + 12}px`,
63
- fontWeight: row.isSubtotal ? 600 : 400,
64
- color: !row.isSubtotal && allZeroOrNull ? 'var(--rs-muted, #9ca3af)' : undefined,
65
- borderBottom: isGrandTotal ? '3px double var(--rs-text, #111827)' : undefined,
66
- };
67
- return (_jsxs("tr", { style: rowStyle, children: [_jsx("td", { style: labelStyle, title: row.element.qname, children: row.element.label }), row.cells.map((cell, i) => {
68
- const isSelected = selected !== null &&
69
- selected.elementId === row.element.id &&
70
- selected.columnIndex === i;
71
- const clickable = onCellClick && cell.fact !== null;
72
- const numStyle = {
73
- ...styles.numCell,
74
- fontWeight: row.isSubtotal ? 600 : 400,
75
- borderBottom: isGrandTotal ? '3px double var(--rs-text, #111827)' : undefined,
76
- cursor: clickable ? 'pointer' : 'default',
77
- backgroundColor: isSelected ? 'var(--rs-selected-bg, #dbeafe)' : undefined,
78
- color: !row.isSubtotal && (cell.value === null || cell.value === 0)
79
- ? 'var(--rs-muted, #9ca3af)'
80
- : undefined,
81
- };
82
- return (_jsx("td", { style: numStyle, onClick: clickable ? () => onCellClick?.(row, i) : undefined, children: formatMoney(cell.value, { currencySymbol }) }, columns[i].key));
83
- })] }, row.element.id));
84
- }) })] })] }));
85
- }
86
- //# sourceMappingURL=StatementTable.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"StatementTable.js","sourceRoot":"","sources":["../../src/components/StatementTable.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAarD,MAAM,MAAM,GAAkC;IAC5C,IAAI,EAAE;QACJ,UAAU,EAAE,2DAA2D;QACvE,KAAK,EAAE,yBAAyB;QAChC,YAAY,EAAE,QAAQ;KACvB;IACD,OAAO,EAAE;QACP,SAAS,EAAE,QAAQ;QACnB,YAAY,EAAE,MAAM;KACrB;IACD,KAAK,EAAE;QACL,UAAU,EAAE,yDAAyD;QACrE,QAAQ,EAAE,SAAS;QACnB,UAAU,EAAE,GAAG;QACf,aAAa,EAAE,QAAQ;QACvB,MAAM,EAAE,CAAC;KACV;IACD,QAAQ,EAAE;QACR,QAAQ,EAAE,SAAS;QACnB,KAAK,EAAE,0BAA0B;QACjC,SAAS,EAAE,SAAS;KACrB;IACD,KAAK,EAAE;QACL,KAAK,EAAE,MAAM;QACb,cAAc,EAAE,UAAU;QAC1B,QAAQ,EAAE,UAAU;KACrB;IACD,EAAE,EAAE;QACF,YAAY,EAAE,4CAA4C;QAC1D,OAAO,EAAE,gBAAgB;QACzB,UAAU,EAAE,GAAG;QACf,KAAK,EAAE,0BAA0B;QACjC,QAAQ,EAAE,QAAQ;KACnB;IACD,SAAS,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE;IAChC,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE;IACnD,SAAS,EAAE;QACT,OAAO,EAAE,gBAAgB;QACzB,UAAU,EAAE,QAAQ;KACrB;IACD,OAAO,EAAE;QACP,OAAO,EAAE,gBAAgB;QACzB,SAAS,EAAE,OAAO;QAClB,UAAU,EAAE,QAAQ;QACpB,UAAU,EAAE,8DAA8D;QAC1E,kBA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CAAC,IAAI,KAAK,IAAI,CAAA;wCACnD,MAAM,QAAQ,GAAkB;4CAC9B,GAAG,MAAM,CAAC,OAAO;4CACjB,UAAU,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG;4CACtC,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,oCAAoC,CAAC,CAAC,CAAC,SAAS;4CAC7E,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;4CACzC,eAAe,EAAE,UAAU,CAAC,CAAC,CAAC,gCAAgC,CAAC,CAAC,CAAC,SAAS;4CAC1E,KAAK,EACH,CAAC,GAAG,CAAC,UAAU,IAAI,CAAC,IAAI,CAAC,KAAK,KAAK,IAAI,IAAI,IAAI,CAAC,KAAK,KAAK,CAAC,CAAC;gDAC1D,CAAC,CAAC,0BAA0B;gDAC5B,CAAC,CAAC,SAAS;yCAChB,CAAA;wCACD,OAAO,CACL,aAEE,KAAK,EAAE,QAAQ,EACf,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,YAE3D,WAAW,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,cAAc,EAAE,CAAC,IAJvC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAKhB,CACN,CAAA;oCACH,CAAC,CAAC,KA9BK,GAAG,CAAC,OAAO,CAAC,EAAE,CA+BlB,CACN,CAAA;wBACH,CAAC,CAAC,GACI,IACF,IACA,CACX,CAAA;AACH,CAAC"}
@@ -1,71 +0,0 @@
1
- /**
2
- * RDF vocabulary and display helpers shared across adapters and projection.
3
- *
4
- * A `holon.trig` mixes several vocabularies: `rs:` for structure, `skos:` for
5
- * human labels, and the XBRL family (`xlink:` / `xbrli:` / `link:`) for the
6
- * networks. These constants are the single source of truth for the full IRIs.
7
- */
8
- export declare const NS: {
9
- readonly rdf: "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
10
- readonly rs: "https://robosystems.ai/vocab/";
11
- readonly rsgaap: "https://robosystems.ai/taxonomy/rs-gaap/v1/";
12
- readonly skos: "http://www.w3.org/2004/02/skos/core#";
13
- readonly xlink: "http://www.w3.org/1999/xlink#";
14
- readonly xbrli: "http://www.xbrl.org/2003/instance#";
15
- readonly link: "http://www.xbrl.org/2003/linkbase#";
16
- readonly iso4217: "http://www.xbrl.org/2003/iso4217#";
17
- };
18
- /** Frequently-referenced full IRIs, pre-concatenated for terseness. */
19
- export declare const IRI: {
20
- readonly type: string;
21
- readonly Report: string;
22
- readonly Fact: string;
23
- readonly InformationBlock: string;
24
- readonly Structure: string;
25
- readonly Association: string;
26
- readonly Element: string;
27
- readonly Period: string;
28
- readonly Unit: string;
29
- readonly Entity: string;
30
- readonly element: string;
31
- readonly period: string;
32
- readonly unit: string;
33
- readonly entity: string;
34
- readonly factSet: string;
35
- readonly numericValue: string;
36
- readonly decimals: string;
37
- readonly blockType: string;
38
- readonly associationType: string;
39
- readonly hasAssociation: string;
40
- readonly roleUri: string;
41
- readonly structureName: string;
42
- readonly abstract: string;
43
- readonly monetary: string;
44
- readonly legalName: string;
45
- readonly country: string;
46
- readonly prefLabel: string;
47
- readonly from: string;
48
- readonly to: string;
49
- readonly role: string;
50
- readonly instant: string;
51
- readonly startDate: string;
52
- readonly endDate: string;
53
- readonly periodType: string;
54
- readonly balance: string;
55
- readonly measure: string;
56
- readonly order: string;
57
- readonly weight: string;
58
- };
59
- /** Compact a concept IRI to `prefix:Local` (e.g. `rs-gaap:Assets`). */
60
- export declare function qname(iri: string): string;
61
- /**
62
- * Readable concept name from a local name when no `skos:prefLabel` is present —
63
- * splits CamelCase into words (`AssetsCurrent` → `Assets Current`). A graceful
64
- * fallback for bundles that predate label emit.
65
- */
66
- export declare function humanize(iri: string): string;
67
- /** Stable display order for the canonical statement blocks; others fall after. */
68
- export declare const BLOCK_ORDER: Record<string, number>;
69
- /** Friendly section headings keyed by block type. */
70
- export declare const BLOCK_TITLES: Record<string, string>;
71
- //# sourceMappingURL=constants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,eAAO,MAAM,EAAE;;;;;;;;;CASL,CAAA;AAEV,uEAAuE;AACvE,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6CN,CAAA;AAmBV,uEAAuE;AACvE,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CASzC;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAG5C;AAED,kFAAkF;AAClF,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAK9C,CAAA;AAED,qDAAqD;AACrD,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAK/C,CAAA"}
package/dist/constants.js DELETED
@@ -1,115 +0,0 @@
1
- /**
2
- * RDF vocabulary and display helpers shared across adapters and projection.
3
- *
4
- * A `holon.trig` mixes several vocabularies: `rs:` for structure, `skos:` for
5
- * human labels, and the XBRL family (`xlink:` / `xbrli:` / `link:`) for the
6
- * networks. These constants are the single source of truth for the full IRIs.
7
- */
8
- export const NS = {
9
- rdf: 'http://www.w3.org/1999/02/22-rdf-syntax-ns#',
10
- rs: 'https://robosystems.ai/vocab/',
11
- rsgaap: 'https://robosystems.ai/taxonomy/rs-gaap/v1/',
12
- skos: 'http://www.w3.org/2004/02/skos/core#',
13
- xlink: 'http://www.w3.org/1999/xlink#',
14
- xbrli: 'http://www.xbrl.org/2003/instance#',
15
- link: 'http://www.xbrl.org/2003/linkbase#',
16
- iso4217: 'http://www.xbrl.org/2003/iso4217#',
17
- };
18
- /** Frequently-referenced full IRIs, pre-concatenated for terseness. */
19
- export const IRI = {
20
- type: NS.rdf + 'type',
21
- // rs: classes
22
- Report: NS.rs + 'Report',
23
- Fact: NS.rs + 'Fact',
24
- InformationBlock: NS.rs + 'InformationBlock',
25
- Structure: NS.rs + 'Structure',
26
- Association: NS.rs + 'Association',
27
- Element: NS.rs + 'Element',
28
- Period: NS.rs + 'Period',
29
- Unit: NS.rs + 'Unit',
30
- Entity: NS.rs + 'Entity',
31
- // rs: predicates
32
- element: NS.rs + 'element',
33
- period: NS.rs + 'period',
34
- unit: NS.rs + 'unit',
35
- entity: NS.rs + 'entity',
36
- factSet: NS.rs + 'factSet',
37
- numericValue: NS.rs + 'numericValue',
38
- decimals: NS.rs + 'decimals',
39
- blockType: NS.rs + 'blockType',
40
- associationType: NS.rs + 'associationType',
41
- hasAssociation: NS.rs + 'hasAssociation',
42
- roleUri: NS.rs + 'roleUri',
43
- structureName: NS.rs + 'structureName',
44
- abstract: NS.rs + 'abstract',
45
- monetary: NS.rs + 'monetary',
46
- legalName: NS.rs + 'legalName',
47
- country: NS.rs + 'country',
48
- // skos:
49
- prefLabel: NS.skos + 'prefLabel',
50
- // xlink:
51
- from: NS.xlink + 'from',
52
- to: NS.xlink + 'to',
53
- role: NS.xlink + 'role',
54
- // xbrli:
55
- instant: NS.xbrli + 'instant',
56
- startDate: NS.xbrli + 'startDate',
57
- endDate: NS.xbrli + 'endDate',
58
- periodType: NS.xbrli + 'periodType',
59
- balance: NS.xbrli + 'balance',
60
- measure: NS.xbrli + 'measure',
61
- // link:
62
- order: NS.link + 'order',
63
- weight: NS.link + 'weight',
64
- };
65
- /**
66
- * Prefixes for compacting concept IRIs to `prefix:Local`. Order matters — the
67
- * most specific namespace must come first so `rs-gaap:` wins over `rs:`.
68
- */
69
- const PREFIXES = [
70
- ['rs-gaap', NS.rsgaap],
71
- ['disclosures', 'https://robosystems.ai/taxonomy/rs-gaap/disclosures/v1/'],
72
- ['us-gaap', 'http://fasb.org/us-gaap/'],
73
- ['dei', 'http://xbrl.sec.gov/dei/'],
74
- ['rs', NS.rs],
75
- ['skos', NS.skos],
76
- ['xbrli', NS.xbrli],
77
- ['xlink', NS.xlink],
78
- ['link', NS.link],
79
- ['iso4217', NS.iso4217],
80
- ];
81
- /** Compact a concept IRI to `prefix:Local` (e.g. `rs-gaap:Assets`). */
82
- export function qname(iri) {
83
- for (const [prefix, ns] of PREFIXES) {
84
- if (iri.startsWith(ns)) {
85
- return `${prefix}:${iri.slice(ns.length)}`;
86
- }
87
- }
88
- const slash = iri.lastIndexOf('/');
89
- const hash = iri.lastIndexOf('#');
90
- return iri.slice(Math.max(slash, hash) + 1);
91
- }
92
- /**
93
- * Readable concept name from a local name when no `skos:prefLabel` is present —
94
- * splits CamelCase into words (`AssetsCurrent` → `Assets Current`). A graceful
95
- * fallback for bundles that predate label emit.
96
- */
97
- export function humanize(iri) {
98
- const local = qname(iri).split(':').pop() ?? iri;
99
- return local.replace(/(?<=[a-z0-9])(?=[A-Z])|(?<=[A-Z])(?=[A-Z][a-z])/g, ' ');
100
- }
101
- /** Stable display order for the canonical statement blocks; others fall after. */
102
- export const BLOCK_ORDER = {
103
- balance_sheet: 0,
104
- income_statement: 1,
105
- cash_flow_statement: 2,
106
- equity_statement: 3,
107
- };
108
- /** Friendly section headings keyed by block type. */
109
- export const BLOCK_TITLES = {
110
- balance_sheet: 'Balance Sheet',
111
- income_statement: 'Income Statement',
112
- cash_flow_statement: 'Cash Flow Statement',
113
- equity_statement: 'Statement of Changes in Equity',
114
- };
115
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,CAAC,MAAM,EAAE,GAAG;IAChB,GAAG,EAAE,6CAA6C;IAClD,EAAE,EAAE,+BAA+B;IACnC,MAAM,EAAE,6CAA6C;IACrD,IAAI,EAAE,sCAAsC;IAC5C,KAAK,EAAE,+BAA+B;IACtC,KAAK,EAA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B,EAAE,gCAAgC;CACnD,CAAA"}
package/dist/format.d.ts DELETED
@@ -1,17 +0,0 @@
1
- /**
2
- * Pure formatting helpers shared by the projection and the components. No React
3
- * here, so the projection can depend on it without pulling in a renderer.
4
- */
5
- import type { PeriodInfo } from './model';
6
- /**
7
- * Accounting-style money: negatives in parentheses, no sign, an em-dash for
8
- * absent values. Matches the RoboLedger statement renderer.
9
- */
10
- export declare function formatMoney(value: number | null | undefined, opts?: {
11
- currencySymbol?: string;
12
- }): string;
13
- /** `2024-03-31` → `Mar 31, 2024`. Falls back to the raw string if unparseable. */
14
- export declare function formatDate(iso: string | null | undefined): string;
15
- /** A human description of a period — "As of …" for instants, a span for durations. */
16
- export declare function formatPeriod(period: PeriodInfo): string;
17
- //# sourceMappingURL=format.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../src/format.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEzC;;;GAGG;AACH,wBAAgB,WAAW,CACzB,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAChC,IAAI,GAAE;IAAE,cAAc,CAAC,EAAE,MAAM,CAAA;CAAO,GACrC,MAAM,CAQR;AAID,kFAAkF;AAClF,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAOjE;AAED,sFAAsF;AACtF,wBAAgB,YAAY,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAKvD"}
package/dist/format.js DELETED
@@ -1,34 +0,0 @@
1
- /**
2
- * Accounting-style money: negatives in parentheses, no sign, an em-dash for
3
- * absent values. Matches the RoboLedger statement renderer.
4
- */
5
- export function formatMoney(value, opts = {}) {
6
- if (value === null || value === undefined || Number.isNaN(value))
7
- return '—';
8
- const symbol = opts.currencySymbol ?? '$';
9
- const abs = Math.abs(value).toLocaleString('en-US', {
10
- minimumFractionDigits: 2,
11
- maximumFractionDigits: 2,
12
- });
13
- return value < 0 ? `${symbol}(${abs})` : `${symbol}${abs}`;
14
- }
15
- const MONTHS = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
16
- /** `2024-03-31` → `Mar 31, 2024`. Falls back to the raw string if unparseable. */
17
- export function formatDate(iso) {
18
- if (!iso)
19
- return '';
20
- const m = /^(\d{4})-(\d{2})-(\d{2})/.exec(iso);
21
- if (!m)
22
- return iso;
23
- const [, year, month, day] = m;
24
- const idx = Number(month) - 1;
25
- return `${MONTHS[idx] ?? month} ${Number(day)}, ${year}`;
26
- }
27
- /** A human description of a period — "As of …" for instants, a span for durations. */
28
- export function formatPeriod(period) {
29
- if (period.type === 'instant') {
30
- return `As of ${formatDate(period.instant ?? period.end)}`;
31
- }
32
- return `${formatDate(period.startDate)} – ${formatDate(period.endDate ?? period.end)}`;
33
- }
34
- //# sourceMappingURL=format.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"format.js","sourceRoot":"","sources":["../src/format.ts"],"names":[],"mappings":"AAMA;;;GAGG;AACH,MAAM,UAAU,WAAW,CACzB,KAAgC,EAChC,OAAoC,EAAE;IAEtC,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC;QAAE,OAAO,GAAG,CAAA;IAC5E,MAAM,MAAM,GAAG,IAAI,CAAC,cAAc,IAAI,GAAG,CAAA;IACzC,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,cAAc,CAAC,OAAO,EAAE;QAClD,qBAAqB,EAAE,CAAC;QACxB,qBAAqB,EAAE,CAAC;KACzB,CAAC,CAAA;IACF,OAAO,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,MAAM,GAAG,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;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,gFAAgF;IAChF,MAAM,EAAE,UAAU,CAAA;CACnB;AAED,8EAA8E;AAC9E,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,IAAI,EAAE,IAAI,GAAG,IAAI,CAAA;CAClB;AAED,iCAAiC;AACjC,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,WAAW,CAAA;IACpB,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAA;IACb,qEAAqE;IACrE,UAAU,EAAE,OAAO,CAAA;IACnB,KAAK,EAAE,OAAO,EAAE,CAAA;CACjB;AAED,wDAAwD;AACxD,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,gBAAgB,CAAA;IACpB,SAAS,EAAE,MAAM,CAAA;IACjB,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAA;IACb,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,OAAO,EAAE,eAAe,EAAE,CAAA;IAC1B,IAAI,EAAE,YAAY,EAAE,CAAA;CACrB"}
package/dist/model.js DELETED
@@ -1,15 +0,0 @@
1
- /**
2
- * The normalized report model — the load-bearing seam of the library.
3
- *
4
- * An **adapter** turns its source (a `holon.trig` file, a cypher endpoint, a
5
- * live ledger) into a `NormalizedReport`: the raw facts, Information Blocks,
6
- * elements / periods / units / entity, and the calculation + presentation
7
- * association networks. Nothing more.
8
- *
9
- * The **projection** (`project.ts`) and **components** turn that normalized
10
- * model into rendered statements — the presentation-order walk, the calculation
11
- * subtotals, the table layout. That work is identical for every adapter, which
12
- * is what makes the rendering source-agnostic.
13
- */
14
- export {};
15
- //# sourceMappingURL=model.js.map
package/dist/model.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"model.js","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG"}
package/dist/project.d.ts DELETED
@@ -1,39 +0,0 @@
1
- import type { ElementInfo, NormalizedReport, Statement } from './model';
2
- interface OrderEntry {
3
- order: number;
4
- depth: number;
5
- }
6
- /**
7
- * Post-order the presentation arcs of one structure → `{element: {order, depth}}`.
8
- * Roots (a `from` that is never a `to`) are visited by their subtree's leading
9
- * arc order, so a balance sheet's roots (Assets, then Liabilities and Equity)
10
- * come out in the right sequence.
11
- */
12
- export declare function presentationOrder(model: NormalizedReport, structureId: string): Map<string, OrderEntry>;
13
- /** Concepts that are calculation parents — the authoritative subtotal set. */
14
- export declare function calcSubtotals(model: NormalizedReport): Set<string>;
15
- /** Reconstruct every statement in the report, in canonical block order. */
16
- export declare function buildStatements(model: NormalizedReport): Statement[];
17
- export interface FootTerm {
18
- element: ElementInfo;
19
- weight: number;
20
- value: number | null;
21
- }
22
- export interface FootCheck {
23
- element: ElementInfo;
24
- columnIndex: number;
25
- terms: FootTerm[];
26
- /** Σ child·weight over the present terms, or null if none are present. */
27
- expected: number | null;
28
- /** The subtotal's own reported value in this column. */
29
- actual: number | null;
30
- ok: boolean;
31
- }
32
- /**
33
- * Foot a subtotal live: sum its calculation children (× weight) and compare to
34
- * its reported value, e.g. `13,550 + 900 = 14,450 ✓`. Returns `null` when the
35
- * element is not a calculation parent (nothing to foot).
36
- */
37
- export declare function footCheck(model: NormalizedReport, statement: Statement, elementId: string, columnIndex: number): FootCheck | null;
38
- export {};
39
- //# sourceMappingURL=project.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../src/project.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAEV,WAAW,EAGX,gBAAgB,EAGhB,SAAS,EAIV,MAAM,SAAS,CAAA;AAEhB,UAAU,UAAU;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CACd;AAcD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,gBAAgB,EACvB,WAAW,EAAE,MAAM,GAClB,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAuCzB;AAED,8EAA8E;AAC9E,wBAAgB,aAAa,CAAC,KAAK,EAAE,gBAAgB,GAAG,GAAG,CAAC,MAAM,CAAC,CAIlE;AAoFD,2EAA2E;AAC3E,wBAAgB,eAAe,CAAC,KAAK,EAAE,gBAAgB,GAAG,SAAS,EAAE,CASpE;AAID,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,WAAW,CAAA;IACpB,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CACrB;AAED,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,WAAW,CAAA;IACpB,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,QAAQ,EAAE,CAAA;IACjB,0EAA0E;IAC1E,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,wDAAwD;IACxD,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,EAAE,EAAE,OAAO,CAAA;CACZ;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CACvB,KAAK,EAAE,gBAAgB,EACvB,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,GAClB,SAAS,GAAG,IAAI,CAiClB"}