@robosystems/report-components 0.1.3 → 0.2.0

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.
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/constants.ts","../src/adapters/sec.ts","../src/adapters/cypher.ts","../src/adapters/store.ts","../src/adapters/jsonld.ts"],"names":["periodType","Store"],"mappings":";;;;AAQO,IAAM,EAAA,GAAK;AAAA,EAChB,GAAA,EAAK,6CAAA;AAAA,EACL,EAAA,EAAI,+BAAA;AAAA,EACJ,MAAA,EAAQ,6CAAA;AAAA,EACR,IAAA,EAAM,sCAAA;AAAA,EACN,KAAA,EAAO,+BAAA;AAAA,EACP,KAAA,EAAO,oCAAA;AAAA,EACP,IAAA,EAAM,oCAAA;AAAA,EACN,OAAA,EAAS;AACX;AAGO,IAAM,GAAA,GAAM;AAAA,EACjB,IAAA,EAAM,GAAG,GAAA,GAAM,MAAA;AAAA;AAAA,EAEf,MAAA,EAAQ,GAAG,EAAA,GAAK,QAAA;AAAA,EAChB,IAAA,EAAM,GAAG,EAAA,GAAK,MAAA;AAAA,EACd,gBAAA,EAAkB,GAAG,EAAA,GAAK,kBAAA;AAAA,EAC1B,SAAA,EAAW,GAAG,EAAA,GAAK,WAAA;AAAA,EACnB,WAAA,EAAa,GAAG,EAAA,GAAK,aAAA;AAAA,EACrB,OAAA,EAAS,GAAG,EAAA,GAAK,SAAA;AAAA,EACjB,MAAA,EAAQ,GAAG,EAAA,GAAK,QAAA;AAAA,EAChB,IAAA,EAAM,GAAG,EAAA,GAAK,MAAA;AAAA,EACd,MAAA,EAAQ,GAAG,EAAA,GAAK,QAAA;AAAA;AAAA,EAEhB,OAAA,EAAS,GAAG,EAAA,GAAK,SAAA;AAAA,EACjB,MAAA,EAAQ,GAAG,EAAA,GAAK,QAAA;AAAA,EAChB,IAAA,EAAM,GAAG,EAAA,GAAK,MAAA;AAAA,EACd,MAAA,EAAQ,GAAG,EAAA,GAAK,QAAA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cesContent":["/**\n * RDF vocabulary and display helpers shared across adapters and projection.\n *\n * A report holon mixes several vocabularies: `rs:` for structure, `skos:` for\n * human labels, and the XBRL family (`xlink:` / `xbrli:` / `link:`) for the\n * networks. These constants are the single source of truth for the full IRIs.\n */\n\nexport const NS = {\n rdf: 'http://www.w3.org/1999/02/22-rdf-syntax-ns#',\n rs: 'https://robosystems.ai/vocab/',\n rsgaap: 'https://robosystems.ai/taxonomy/rs-gaap/v1/',\n skos: 'http://www.w3.org/2004/02/skos/core#',\n xlink: 'http://www.w3.org/1999/xlink#',\n xbrli: 'http://www.xbrl.org/2003/instance#',\n link: 'http://www.xbrl.org/2003/linkbase#',\n iso4217: 'http://www.xbrl.org/2003/iso4217#',\n} as const\n\n/** Frequently-referenced full IRIs, pre-concatenated for terseness. */\nexport const IRI = {\n type: NS.rdf + 'type',\n // rs: classes\n Report: NS.rs + 'Report',\n Fact: NS.rs + 'Fact',\n InformationBlock: NS.rs + 'InformationBlock',\n Structure: NS.rs + 'Structure',\n Association: NS.rs + 'Association',\n Element: NS.rs + 'Element',\n Period: NS.rs + 'Period',\n Unit: NS.rs + 'Unit',\n Entity: NS.rs + 'Entity',\n // rs: predicates\n element: NS.rs + 'element',\n period: NS.rs + 'period',\n unit: NS.rs + 'unit',\n entity: NS.rs + 'entity',\n factSet: NS.rs + 'factSet',\n numericValue: NS.rs + 'numericValue',\n decimals: NS.rs + 'decimals',\n blockType: NS.rs + 'blockType',\n associationType: NS.rs + 'associationType',\n hasAssociation: NS.rs + 'hasAssociation',\n roleUri: NS.rs + 'roleUri',\n structureName: NS.rs + 'structureName',\n abstract: NS.rs + 'abstract',\n monetary: NS.rs + 'monetary',\n legalName: NS.rs + 'legalName',\n country: NS.rs + 'country',\n // skos:\n prefLabel: NS.skos + 'prefLabel',\n // xlink:\n from: NS.xlink + 'from',\n to: NS.xlink + 'to',\n role: NS.xlink + 'role',\n // xbrli:\n instant: NS.xbrli + 'instant',\n startDate: NS.xbrli + 'startDate',\n endDate: NS.xbrli + 'endDate',\n periodType: NS.xbrli + 'periodType',\n balance: NS.xbrli + 'balance',\n measure: NS.xbrli + 'measure',\n // link:\n order: NS.link + 'order',\n weight: NS.link + 'weight',\n} as const\n\n/**\n * Prefixes for compacting concept IRIs to `prefix:Local`. Order matters — the\n * most specific namespace must come first so `rs-gaap:` wins over `rs:`.\n */\nconst PREFIXES: ReadonlyArray<readonly [string, string]> = [\n ['rs-gaap', NS.rsgaap],\n ['disclosures', 'https://robosystems.ai/taxonomy/rs-gaap/disclosures/v1/'],\n ['us-gaap', 'http://fasb.org/us-gaap/'],\n ['dei', 'http://xbrl.sec.gov/dei/'],\n ['rs', NS.rs],\n ['skos', NS.skos],\n ['xbrli', NS.xbrli],\n ['xlink', NS.xlink],\n ['link', NS.link],\n ['iso4217', NS.iso4217],\n]\n\n/** Compact a concept IRI to `prefix:Local` (e.g. `rs-gaap:Assets`). */\nexport function qname(iri: string): string {\n for (const [prefix, ns] of PREFIXES) {\n if (iri.startsWith(ns)) {\n return `${prefix}:${iri.slice(ns.length)}`\n }\n }\n const slash = iri.lastIndexOf('/')\n const hash = iri.lastIndexOf('#')\n return iri.slice(Math.max(slash, hash) + 1)\n}\n\n/**\n * Readable concept name from a local name when no `skos:prefLabel` is present —\n * splits CamelCase into words (`AssetsCurrent` → `Assets Current`). A graceful\n * fallback for bundles that predate label emit.\n */\nexport function humanize(iri: string): string {\n const local = qname(iri).split(':').pop() ?? iri\n return local.replace(/(?<=[a-z0-9])(?=[A-Z])|(?<=[A-Z])(?=[A-Z][a-z])/g, ' ')\n}\n\n/**\n * A large text-block / policy fact whose HTML (or plain-text) body is too big to\n * store inline, so the platform externalizes it to the public CDN and the fact's\n * value is the URL (`…/fact_<hash>.html` or `.txt`). The renderer fetches and\n * embeds these instead of printing the raw link.\n */\nexport function isExternalFactUrl(value: string | null | undefined): boolean {\n return !!value && /^https?:\\/\\/\\S+\\/fact_[0-9a-f]+\\.(html|txt)$/i.test(value)\n}\n\n/** Stable display order for the canonical statement blocks; others fall after. */\nexport const BLOCK_ORDER: Record<string, number> = {\n balance_sheet: 0,\n income_statement: 1,\n cash_flow_statement: 2,\n equity_statement: 3,\n}\n\n/** Friendly section headings keyed by block type. */\nexport const BLOCK_TITLES: Record<string, string> = {\n balance_sheet: 'Balance Sheet',\n income_statement: 'Income Statement',\n cash_flow_statement: 'Cash Flow Statement',\n equity_statement: 'Statement of Changes in Equity',\n}\n","/**\n * The SEC adapter — reconstructs a report from the live SEC EDGAR graph\n * (`graph_id = \"sec\"`) via read-only Cypher, one section at a time.\n *\n * A single SEC filing is a large graph: a 10-K is ~90 `Structure`s (the 5 core\n * statements plus dozens of disclosure/document networks), thousands of facts.\n * Loading the whole thing up front is slow, so this module splits the work:\n *\n * - `fetchSecReportShell` — one fast pass that returns the entity + the ordered\n * **section list** (each `Structure` with its title, kind, and factset ids).\n * - `fetchSecSection` — on demand, the facts + presentation/calculation network\n * for **one** section, assembled into a single-section `NormalizedReport` the\n * shared projection/components render unchanged.\n *\n * The library stays transport-agnostic: the caller injects a `SecQuery` (a thin\n * wrapper over `POST /v1/graphs/sec/query`); this module owns only the Cypher and\n * the row → model mapping.\n *\n * ── Query rules (load-bearing; verified against the live graph) ────────────────\n * These are not stylistic — violating them turns a ~120 ms query into a ~14 s one:\n * 1. **Anchor on a primary key.** Lead per-section queries with a direct\n * `{identifier: $id}` match on `FactSet`/`Structure` (indexed). Never expand a\n * whole `Report`'s facts, and never use `WHERE x.identifier IN [list]` (a scan,\n * not an index probe) — issue one query per factset instead.\n * 3. **Always carry a `WHERE f.value IS NOT NULL` predicate** on the fact scan and\n * **always `LIMIT`.** Both flip the planner onto the fast path (~120 ms vs ~7 s).\n * `value` (the raw string) is present on every fact, so this keeps numeric and\n * text facts alike.\n * 4. **No `OPTIONAL MATCH`.** An optional unit join alone cost ~12 s; units come\n * from a separate required-join query, merged client-side.\n * 5. Aggregations must `ORDER BY <alias>` (not `s.number`); `end` is reserved, so\n * alias every `p.end_date AS end_date`.\n */\nimport { humanize, qname as toQname } from '../constants'\nimport type {\n CalcAssociation,\n ElementInfo,\n EntityInfo,\n Fact,\n InformationBlock,\n NormalizedReport,\n PeriodInfo,\n PeriodType,\n PresAssociation,\n StructureInfo,\n UnitInfo,\n} from '../model'\n\n/** Injected transport — runs a read-only Cypher query and returns its rows. */\nexport type SecQuery = (\n cypher: string,\n params?: Record<string, unknown>\n) => Promise<Array<Record<string, unknown>>>\n\n/** One navigable section of a filing (a `Structure` + its facts). */\nexport interface SecSection {\n /** `Structure.identifier` — the section id + the anchor for its associations. */\n id: string\n /** Human title, e.g. \"Consolidated Balance Sheets\" (definition prefix stripped). */\n title: string\n /** Coarse grouping for the table of contents. */\n kind: 'Statement' | 'Disclosure' | 'Document' | 'Cover' | 'Other'\n /** `canonical_type` when the section is a recognized core statement, else null. */\n canonicalType: string | null\n /** Filing sequence (position in the ordered section list). */\n order: number\n /** `FactSet.identifier`s whose facts belong to this section. */\n factsetIds: string[]\n}\n\n/** The fast first read: entity + the ordered section list, no fact bodies. */\nexport interface SecReportShell {\n reportId: string\n entity: EntityInfo | null\n sections: SecSection[]\n}\n\n// ── Cypher ────────────────────────────────────────────────────────────────────\n\nconst ENTITY_META_Q = `\nMATCH (ent:Entity)-[:ENTITY_HAS_REPORT]->(r:Report {identifier: $rid})\nRETURN ent.identifier AS entity_id, ent.name AS entity_name,\n ent.legal_name AS legal_name, ent.cik AS cik, ent.ticker AS ticker,\n r.form AS form, r.report_date AS report_date`\n\n// Structures reachable from this report's (consolidated) facts, with their\n// factsets. `has_dimensions:false` keeps the consolidated totals; ORDER BY the\n// alias (Kùzu requires it once `collect` aggregates).\nconst SECTIONS_Q = `\nMATCH (r:Report {identifier: $rid})-[:REPORT_HAS_FACT]->(f:Fact {has_dimensions: false})<-[:FACT_SET_CONTAINS_FACT]-(fs:FactSet)<-[:STRUCTURE_HAS_FACT_SET]-(s:Structure)\nRETURN s.identifier AS sid, s.canonical_type AS canonical_type,\n s.definition AS definition, s.number AS number,\n collect(DISTINCT fs.identifier) AS factsets\nORDER BY number`\n\n// Facts for one factset. Anchored on the factset PK; `has_dimensions:false` keeps\n// the consolidated totals (dropping segment/axis breakdowns — a factset also\n// contains dimensional facts, e.g. equity by component, which would otherwise\n// double-count an element in a period). `WHERE f.value IS NOT NULL` + `LIMIT`\n// keep it on the fast path and retain text facts (Cover Page etc.).\nconst FACTS_Q = `\nMATCH (fs:FactSet {identifier: $fsid})-[:FACT_SET_CONTAINS_FACT]->(f:Fact {has_dimensions: false})-[:FACT_HAS_ELEMENT]->(e:Element),\n (f)-[:FACT_HAS_PERIOD]->(p:Period)\nWHERE f.value IS NOT NULL\nRETURN f.identifier AS fid, e.qname AS qname, e.name AS ename, e.balance AS balance,\n e.period_type AS e_period_type, e.is_abstract AS is_abstract, e.is_numeric AS is_numeric,\n f.numeric_value AS numeric_value, f.value AS raw_value, f.decimals AS decimals,\n p.identifier AS pid, p.period_type AS period_type,\n p.start_date AS start_date, p.end_date AS end_date\nLIMIT 2000`\n\n// Unit measures for the same factset, as a separate required-join query — an\n// OPTIONAL unit join on the facts query alone cost ~12 s.\nconst UNITS_Q = `\nMATCH (fs:FactSet {identifier: $fsid})-[:FACT_SET_CONTAINS_FACT]->(f:Fact {has_dimensions: false})-[:FACT_HAS_UNIT]->(u:Unit)\nWHERE f.value IS NOT NULL\nRETURN f.identifier AS fid, u.measure AS unit\nLIMIT 2000`\n\n// The presentation + calculation networks for one section, anchored on the\n// Structure PK. `association_type` is `Presentation` / `Calculation`.\nconst ASSOC_Q = `\nMATCH (s:Structure {identifier: $sid})-[:STRUCTURE_HAS_ASSOCIATION]->(a:Association),\n (a)-[:ASSOCIATION_HAS_FROM_ELEMENT]->(pe:Element),\n (a)-[:ASSOCIATION_HAS_TO_ELEMENT]->(ce:Element)\nRETURN a.association_type AS association_type, a.order_value AS order_value,\n a.weight AS weight, pe.qname AS parent, ce.qname AS child`\n\n// ── Row helpers ────────────────────────────────────────────────────────────────\n\nfunction str(row: Record<string, unknown>, key: string): string | null {\n const v = row[key]\n return typeof v === 'string' && v !== '' ? v : v == null ? null : String(v)\n}\n\nfunction num(row: Record<string, unknown>, key: string): number | null {\n const v = row[key]\n if (v === null || v === undefined || v === '') return null\n const n = typeof v === 'number' ? v : Number(v)\n return Number.isNaN(n) ? null : n\n}\n\nfunction bool(row: Record<string, unknown>, key: string): boolean {\n const v = row[key]\n return v === true || v === 'true'\n}\n\nfunction periodType(raw: string | null): PeriodType | null {\n return raw === 'instant' || raw === 'duration' ? raw : null\n}\n\n/**\n * Drop noise columns. A section's factset can carry a handful of facts at extra\n * period-ends — e.g. the balance sheet factset also holds prior-year equity\n * *opening* balances (StockholdersEquity at 4 dates while every other line has\n * 2). Those show as near-empty columns. Keep only period-ends whose fact count\n * is a meaningful fraction of the densest column's; a real comparative period\n * repeats most line items, so it clears the bar, while a 1-off does not.\n */\nconst DENSE_PERIOD_FRACTION = 0.2\n\nfunction filterToDominantPeriods(facts: Fact[], periods: Record<string, PeriodInfo>): Fact[] {\n const countByEnd = new Map<string, number>()\n for (const f of facts) {\n const end = periods[f.period]?.end\n if (end) countByEnd.set(end, (countByEnd.get(end) ?? 0) + 1)\n }\n if (countByEnd.size <= 1) return facts\n const max = Math.max(...countByEnd.values())\n const threshold = max * DENSE_PERIOD_FRACTION\n const keep = new Set(\n [...countByEnd].filter(([, count]) => count >= threshold).map(([end]) => end)\n )\n return facts.filter((f) => {\n const end = periods[f.period]?.end\n return end !== undefined && keep.has(end)\n })\n}\n\n/**\n * The primary financial statements. Only these `canonical_type`s belong in the\n * TOC's \"Financial Statements\" group — other canonical types (rollforwards,\n * hierarchies, `(Details)` networks) are disclosures, classified by their\n * definition's type word instead.\n */\nconst CORE_STATEMENT_TYPES = new Set([\n 'balance_sheet',\n 'income_statement',\n 'cash_flow_statement',\n 'equity_statement',\n 'comprehensive_income',\n])\n\n/**\n * Split an XBRL `Structure.definition` into a human title + a coarse kind.\n * Definitions look like `\"9952153 - Statement - Consolidated Balance Sheets\"` or\n * `\"0000001 - Document - Cover Page\"` — a `\"NNNN - <Type> - <Title>\"` shape whose\n * middle word (Statement / Disclosure / Document) drives the kind. A core\n * canonical statement always reads as a Statement so the primaries group cleanly.\n */\nexport function parseStructureDefinition(\n definition: string | null,\n canonicalType: string | null\n): { title: string; kind: SecSection['kind'] } {\n const raw = (definition ?? '').trim()\n const parts = raw.split(' - ')\n let type = ''\n let title = raw\n if (parts.length >= 3) {\n type = parts[1].trim()\n title = parts.slice(2).join(' - ').trim()\n } else if (parts.length === 2) {\n title = parts[1].trim()\n }\n\n let kind: SecSection['kind'] = 'Other'\n if (/cover/i.test(title)) kind = 'Cover'\n else if (type === 'Statement') kind = 'Statement'\n else if (type === 'Disclosure') kind = 'Disclosure'\n else if (type === 'Document') kind = 'Document'\n // A core statement is always a Statement; a non-core canonical type (e.g.\n // GoodwillRollForward) stays whatever its definition type word made it.\n if (canonicalType && CORE_STATEMENT_TYPES.has(canonicalType)) kind = 'Statement'\n\n return { title: title || raw || canonicalType || 'Section', kind }\n}\n\n// ── Shell ───────────────────────────────────────────────────────────────────\n\nfunction mapEntity(row: Record<string, unknown> | undefined): EntityInfo | null {\n if (!row) return null\n const id = str(row, 'entity_id')\n if (!id) return null\n return {\n id,\n name: str(row, 'entity_name') ?? str(row, 'legal_name') ?? 'Entity',\n legalName: str(row, 'legal_name'),\n country: null,\n }\n}\n\n/** Fetch the entity + ordered section list for a report (the fast first read). */\nexport async function fetchSecReportShell(\n query: SecQuery,\n reportId: string\n): Promise<SecReportShell> {\n const [entityRows, sectionRows] = await Promise.all([\n query(ENTITY_META_Q, { rid: reportId }),\n query(SECTIONS_Q, { rid: reportId }),\n ])\n\n const sections: SecSection[] = sectionRows\n .map((row, order): SecSection => {\n const { title, kind } = parseStructureDefinition(\n str(row, 'definition'),\n str(row, 'canonical_type')\n )\n const factsets = Array.isArray(row.factsets)\n ? (row.factsets as unknown[]).filter((v): v is string => typeof v === 'string')\n : []\n return {\n id: str(row, 'sid') ?? '',\n title,\n kind,\n canonicalType: str(row, 'canonical_type'),\n order,\n factsetIds: factsets,\n }\n })\n .filter((s) => s.id && s.factsetIds.length > 0)\n\n return { reportId, entity: mapEntity(entityRows[0]), sections }\n}\n\n// ── Single section ────────────────────────────────────────────────────────────\n\nfunction accumulateElement(elements: Record<string, ElementInfo>, row: Record<string, unknown>) {\n const q = str(row, 'qname')\n if (!q || elements[q]) return\n const balance = str(row, 'balance')\n elements[q] = {\n id: q,\n qname: q,\n label: str(row, 'ename') ? humanize(str(row, 'ename') as string) : humanize(q),\n balance: balance === 'debit' || balance === 'credit' ? balance : null,\n periodType: periodType(str(row, 'e_period_type')),\n abstract: bool(row, 'is_abstract'),\n monetary: bool(row, 'is_numeric'),\n }\n}\n\nfunction accumulatePeriod(periods: Record<string, PeriodInfo>, row: Record<string, unknown>) {\n const id = str(row, 'pid')\n if (!id || periods[id]) return\n const type = periodType(str(row, 'period_type')) ?? 'duration'\n const startDate = str(row, 'start_date')\n const endDate = str(row, 'end_date')\n periods[id] = {\n id,\n type,\n instant: type === 'instant' ? endDate : null,\n startDate,\n endDate,\n end: endDate ?? '',\n }\n}\n\n/**\n * Load one section into a single-section `NormalizedReport`. All of the\n * section's facts are re-keyed to the structure id as their `factSet`, so the\n * projection groups them as one Information Block regardless of how many raw\n * FactSets the filing split them across.\n */\nexport async function fetchSecSection(\n query: SecQuery,\n shell: SecReportShell,\n section: SecSection\n): Promise<NormalizedReport> {\n const [factRowGroups, unitRowGroups, assocRows] = await Promise.all([\n Promise.all(section.factsetIds.map((fsid) => query(FACTS_Q, { fsid }))),\n Promise.all(section.factsetIds.map((fsid) => query(UNITS_Q, { fsid }))),\n query(ASSOC_Q, { sid: section.id }),\n ])\n\n const unitByFid = new Map<string, string>()\n for (const row of unitRowGroups.flat()) {\n const fid = str(row, 'fid')\n const measure = str(row, 'unit')\n if (fid && measure) unitByFid.set(fid, measure)\n }\n\n const elements: Record<string, ElementInfo> = {}\n const periods: Record<string, PeriodInfo> = {}\n const units: Record<string, UnitInfo> = {}\n const facts: Fact[] = []\n const seenFacts = new Set<string>()\n\n for (const row of factRowGroups.flat()) {\n const fid = str(row, 'fid')\n const element = str(row, 'qname')\n const period = str(row, 'pid')\n if (!fid || !element || !period || seenFacts.has(fid)) continue\n seenFacts.add(fid)\n\n accumulateElement(elements, row)\n accumulatePeriod(periods, row)\n\n const measure = unitByFid.get(fid) ?? null\n if (measure && !units[measure]) {\n const compact = toQname(measure)\n units[measure] = {\n id: measure,\n measure: compact,\n label: compact.includes(':') ? (compact.split(':').pop() as string) : compact,\n }\n }\n\n const value = num(row, 'numeric_value')\n facts.push({\n id: fid,\n element,\n period,\n unit: measure,\n entity: shell.entity?.id ?? null,\n factSet: section.id,\n value,\n decimals: str(row, 'decimals'),\n textValue: value === null ? str(row, 'raw_value') : null,\n })\n }\n\n const calcAssociations: CalcAssociation[] = []\n const presAssociations: PresAssociation[] = []\n for (const row of assocRows) {\n const parent = str(row, 'parent')\n const child = str(row, 'child')\n if (!parent || !child) continue\n const order = num(row, 'order_value') ?? 0\n const type = str(row, 'association_type')?.toLowerCase()\n if (type === 'calculation') {\n calcAssociations.push({\n parent,\n child,\n weight: num(row, 'weight') ?? 1,\n order,\n role: null,\n structure: section.id,\n })\n } else if (type === 'presentation') {\n presAssociations.push({ parent, child, order, role: null, structure: section.id })\n }\n }\n\n const informationBlock: InformationBlock = {\n id: section.id,\n blockType: section.canonicalType ?? '',\n factSet: section.id,\n label: section.title,\n structureId: section.id,\n }\n const structure: StructureInfo = {\n id: section.id,\n blockType: section.canonicalType ?? '',\n roleUri: null,\n structureName: section.title,\n order: section.order,\n }\n\n return {\n reportId: shell.reportId,\n reportIri: null,\n entity: shell.entity,\n informationBlocks: [informationBlock],\n structures: [structure],\n facts: filterToDominantPeriods(facts, periods),\n elements,\n periods,\n units,\n calcAssociations,\n presAssociations,\n }\n}\n\n/** Merge single-section reports into one whole-report model (order preserved). */\nexport function mergeSecSections(\n shell: SecReportShell,\n sections: NormalizedReport[]\n): NormalizedReport {\n const elements: Record<string, ElementInfo> = {}\n const periods: Record<string, PeriodInfo> = {}\n const units: Record<string, UnitInfo> = {}\n const informationBlocks: InformationBlock[] = []\n const structures: StructureInfo[] = []\n const facts: Fact[] = []\n const calcAssociations: CalcAssociation[] = []\n const presAssociations: PresAssociation[] = []\n\n for (const part of sections) {\n Object.assign(elements, part.elements)\n Object.assign(periods, part.periods)\n Object.assign(units, part.units)\n informationBlocks.push(...part.informationBlocks)\n structures.push(...part.structures)\n facts.push(...part.facts)\n calcAssociations.push(...part.calcAssociations)\n presAssociations.push(...part.presAssociations)\n }\n\n return {\n reportId: shell.reportId,\n reportIri: null,\n entity: shell.entity,\n informationBlocks,\n structures,\n facts,\n elements,\n periods,\n units,\n calcAssociations,\n presAssociations,\n }\n}\n","/**\n * The cypher adapter — a whole-report `ReportAdapter` over the live SEC graph.\n *\n * This is a convenience wrapper: it loads the section list, then every section,\n * and merges them into one `NormalizedReport`. Apps that want responsive,\n * lazy-per-section loading should call `fetchSecReportShell` + `fetchSecSection`\n * directly (see `./sec`) rather than materializing a whole filing up front.\n */\nimport type { SecQuery } from './sec'\nimport { fetchSecReportShell, fetchSecSection, mergeSecSections } from './sec'\nimport type { ReportAdapter } from './types'\n\nexport interface CypherAdapterConfig {\n /** Injected transport over `POST /v1/graphs/{graphId}/query` (auth lives here). */\n query: SecQuery\n /** The report to materialize — a `Report.identifier`. */\n reportId: string\n}\n\nexport function cypherAdapter(config: CypherAdapterConfig): ReportAdapter {\n return {\n source: `sec:${config.reportId}`,\n load: async () => {\n const shell = await fetchSecReportShell(config.query, config.reportId)\n const sections = await Promise.all(\n shell.sections.map((section) => fetchSecSection(config.query, shell, section))\n )\n return mergeSecSections(shell, sections)\n },\n }\n}\n","/**\n * The shared quad-store → `NormalizedReport` traversal.\n *\n * An adapter fills an N3 quad `Store` from its source, then hands it here. The\n * store is read as a **union** across its graphs (`graph = null`) — the\n * scene/boundary/projection partition is a publication concern, not a rendering\n * one, so the join is identical however the quads arrived (a dataset-form\n * JSON-LD holon, a flat graph, …). No SPARQL engine is required; only store\n * traversal. The only per-source code is how the store gets filled.\n */\nimport { DataFactory, Store } from 'n3'\nimport { IRI, humanize, qname } from '../constants'\nimport type {\n CalcAssociation,\n ElementInfo,\n EntityInfo,\n Fact,\n InformationBlock,\n NormalizedReport,\n PeriodInfo,\n PeriodType,\n PresAssociation,\n StructureInfo,\n UnitInfo,\n} from '../model'\n\nconst { namedNode } = DataFactory\n\nfunction makeReaders(store: Store) {\n const objects = (s: string, p: string) => store.getObjects(namedNode(s), namedNode(p), null)\n const firstValue = (s: string, p: string): string | null => {\n const os = objects(s, p)\n return os.length ? os[0].value : null\n }\n const subjectsOfType = (type: string): string[] =>\n store.getSubjects(namedNode(IRI.type), namedNode(type), null).map((t) => t.value)\n return { objects, firstValue, subjectsOfType }\n}\n\nfunction toNumber(raw: string | null): number | null {\n if (raw === null || raw === '') return null\n const n = Number(raw)\n return Number.isNaN(n) ? null : n\n}\n\n/** Traverse a populated quad `Store` into the normalized report model. */\nexport function parseStore(store: Store): NormalizedReport {\n const { objects, firstValue, subjectsOfType } = makeReaders(store)\n\n // ── Elements ──\n const elements: Record<string, ElementInfo> = {}\n for (const id of subjectsOfType(IRI.Element)) {\n const balance = firstValue(id, IRI.balance)\n const periodType = firstValue(id, IRI.periodType)\n elements[id] = {\n id,\n qname: qname(id),\n label: firstValue(id, IRI.prefLabel) ?? humanize(id),\n balance: balance === 'debit' || balance === 'credit' ? balance : null,\n periodType: periodType === 'instant' || periodType === 'duration' ? periodType : null,\n abstract: firstValue(id, IRI.abstract) === 'true',\n monetary: firstValue(id, IRI.monetary) === 'true',\n }\n }\n\n // ── Periods ──\n const periods: Record<string, PeriodInfo> = {}\n for (const id of subjectsOfType(IRI.Period)) {\n const declared = firstValue(id, IRI.periodType)\n const instant = firstValue(id, IRI.instant)\n const startDate = firstValue(id, IRI.startDate)\n const endDate = firstValue(id, IRI.endDate)\n const type: PeriodType =\n declared === 'instant'\n ? 'instant'\n : declared === 'duration'\n ? 'duration'\n : instant\n ? 'instant'\n : 'duration'\n const end = (type === 'instant' ? instant : endDate) ?? instant ?? endDate ?? ''\n periods[id] = { id, type, instant, startDate, endDate, end }\n }\n\n // ── Units ──\n const units: Record<string, UnitInfo> = {}\n for (const id of subjectsOfType(IRI.Unit)) {\n const measureTerm = objects(id, IRI.measure)[0]\n const measure = measureTerm ? qname(measureTerm.value) : 'unknown'\n units[id] = {\n id,\n measure,\n label: measure.includes(':') ? (measure.split(':').pop() as string) : measure,\n }\n }\n\n // ── Entity ──\n let entity: EntityInfo | null = null\n const entityIds = subjectsOfType(IRI.Entity)\n if (entityIds.length) {\n const id = entityIds[0]\n entity = {\n id,\n name: firstValue(id, IRI.prefLabel) ?? firstValue(id, IRI.legalName) ?? 'Entity',\n legalName: firstValue(id, IRI.legalName),\n country: firstValue(id, IRI.country),\n }\n }\n\n // ── Facts ──\n const facts: Fact[] = []\n for (const id of subjectsOfType(IRI.Fact)) {\n facts.push({\n id,\n element: firstValue(id, IRI.element) ?? '',\n period: firstValue(id, IRI.period) ?? '',\n unit: firstValue(id, IRI.unit),\n entity: firstValue(id, IRI.entity),\n factSet: firstValue(id, IRI.factSet),\n value: toNumber(firstValue(id, IRI.numericValue)),\n decimals: firstValue(id, IRI.decimals),\n })\n }\n\n // ── Information Blocks ──\n const informationBlocks: InformationBlock[] = []\n for (const id of subjectsOfType(IRI.InformationBlock)) {\n informationBlocks.push({\n id,\n blockType: firstValue(id, IRI.blockType) ?? '',\n factSet: firstValue(id, IRI.factSet),\n label: firstValue(id, IRI.prefLabel),\n })\n }\n\n // ── Structures + association → structure membership ──\n const structures: StructureInfo[] = []\n const assocStructure = new Map<string, string>()\n for (const id of subjectsOfType(IRI.Structure)) {\n structures.push({\n id,\n blockType: firstValue(id, IRI.blockType) ?? '',\n roleUri: firstValue(id, IRI.roleUri),\n structureName: firstValue(id, IRI.structureName),\n })\n for (const assoc of objects(id, IRI.hasAssociation)) {\n assocStructure.set(assoc.value, id)\n }\n }\n\n // ── Associations ──\n const calcAssociations: CalcAssociation[] = []\n const presAssociations: PresAssociation[] = []\n for (const id of subjectsOfType(IRI.Association)) {\n const parent = firstValue(id, IRI.from)\n const child = firstValue(id, IRI.to)\n if (!parent || !child) continue\n const type = firstValue(id, IRI.associationType)\n const order = toNumber(firstValue(id, IRI.order)) ?? 0\n const role = firstValue(id, IRI.role)\n const structure = assocStructure.get(id) ?? null\n if (type === 'calculation') {\n calcAssociations.push({\n parent,\n child,\n weight: toNumber(firstValue(id, IRI.weight)) ?? 1,\n order,\n role,\n structure,\n })\n } else if (type === 'presentation') {\n presAssociations.push({ parent, child, order, role, structure })\n }\n }\n\n // ── Report IRI / id ──\n // Prefer the named-graph name (`<report>#scene` → `<report>`) — present in a\n // dataset-form holon. Fall back to the `rs:Report` subject so a flat,\n // single-graph document still resolves its identity.\n let reportIri: string | null = null\n for (const graph of store.getGraphs(null, null, null)) {\n const hash = graph.value.indexOf('#')\n if (hash > 0) {\n reportIri = graph.value.slice(0, hash)\n break\n }\n }\n if (!reportIri) {\n const reports = subjectsOfType(IRI.Report)\n reportIri = reports.length ? reports[0] : null\n }\n const reportId = reportIri ? (reportIri.split('/').pop() ?? null) : null\n\n return {\n reportId,\n reportIri,\n entity,\n informationBlocks,\n structures,\n facts,\n elements,\n periods,\n units,\n calcAssociations,\n presAssociations,\n }\n}\n","/**\n * The `holon.jsonld` adapter — offline, no backend, no auth.\n *\n * The canonical, API-native holon: **dataset-form JSON-LD** carrying the three\n * named graphs (`#scene`, `#boundary`, `#projection`) as `@id` + nested\n * `@graph`. JSON is native to the RoboSystems JSON API, so this is the one\n * holon file format.\n *\n * N3.js doesn't parse JSON-LD, so this adapter uses the `jsonld` processor to\n * expand the document to N-Quads (which preserves the named-graph labels),\n * parses those into an N3 quad `Store`, and delegates to the shared\n * `parseStore` traversal (`store.ts`).\n */\nimport type { JsonLdDocument } from 'jsonld'\nimport jsonld from 'jsonld'\nimport { Parser, Store } from 'n3'\nimport type { NormalizedReport } from '../model'\nimport { parseStore } from './store'\nimport type { ReportAdapter } from './types'\n\n/** Parse a `holon.jsonld` document (string or parsed object) into the model. */\nexport async function parseJsonld(doc: string | object): Promise<NormalizedReport> {\n const json = (typeof doc === 'string' ? JSON.parse(doc) : doc) as JsonLdDocument\n // `toRDF` with the n-quads format returns a serialized string; each quad\n // carries its graph label, so the holon's named graphs survive the expansion.\n const nquads = (await jsonld.toRDF(json, { format: 'application/n-quads' })) as string\n const store = new Store(new Parser({ format: 'application/n-quads' }).parse(nquads))\n return parseStore(store)\n}\n\n/** A `ReportAdapter` over an in-memory `holon.jsonld` document. */\nexport function jsonldFileAdapter(doc: string | object, source = 'holon.jsonld'): ReportAdapter {\n return {\n source,\n load: () => parseJsonld(doc),\n }\n}\n"]}
@@ -68,6 +68,12 @@ interface Fact {
68
68
  factSet: string | null;
69
69
  value: number | null;
70
70
  decimals: string | null;
71
+ /**
72
+ * Raw string value for non-numeric facts (e.g. a Cover Page's entity name,
73
+ * or a yes/no flag) — present when `value` is null. Lets text-bearing sections
74
+ * (the cover, narrative disclosures) render their content instead of a blank.
75
+ */
76
+ textValue?: string | null;
71
77
  }
72
78
  /** A calculation arc: `parent` (subtotal) rolls up `child * weight`. */
73
79
  interface CalcAssociation {
@@ -92,6 +98,12 @@ interface StructureInfo {
92
98
  blockType: string;
93
99
  roleUri: string | null;
94
100
  structureName: string | null;
101
+ /**
102
+ * Filing sequence for ordering sections (SEC `Structure.number`). When present,
103
+ * `buildStatements` orders by it instead of the canonical `BLOCK_ORDER` — a real
104
+ * filing has dozens of sections whose order is the filer's, not a fixed four.
105
+ */
106
+ order?: number;
95
107
  }
96
108
  /** An Information Block — groups a statement's facts via a shared `factSet`. */
97
109
  interface InformationBlock {
@@ -99,6 +111,14 @@ interface InformationBlock {
99
111
  blockType: string;
100
112
  factSet: string | null;
101
113
  label: string | null;
114
+ /**
115
+ * Direct link to the `StructureInfo` that supplies this block's presentation +
116
+ * calculation networks. When set (SEC adapter), the projection matches block →
117
+ * structure by this id, so a filing with many structures sharing one `blockType`
118
+ * (e.g. balance sheet main + parenthetical) resolves each to its own structure.
119
+ * Left undefined by the holon/file path, which matches by `blockType`.
120
+ */
121
+ structureId?: string;
102
122
  }
103
123
  /** The full normalized report — the adapter's output and projection's input. */
104
124
  interface NormalizedReport {
@@ -127,6 +147,8 @@ interface StatementColumn {
127
147
  interface RowCell {
128
148
  value: number | null;
129
149
  fact: Fact | null;
150
+ /** Raw string for a non-numeric fact (from `Fact.textValue`), when `value` is null. */
151
+ textValue?: string | null;
130
152
  }
131
153
  /** A rendered statement line. */
132
154
  interface StatementRow {
@@ -148,6 +170,52 @@ interface Statement {
148
170
  rows: StatementRow[];
149
171
  }
150
172
 
173
+ /** Injected transport — runs a read-only Cypher query and returns its rows. */
174
+ type SecQuery = (cypher: string, params?: Record<string, unknown>) => Promise<Array<Record<string, unknown>>>;
175
+ /** One navigable section of a filing (a `Structure` + its facts). */
176
+ interface SecSection {
177
+ /** `Structure.identifier` — the section id + the anchor for its associations. */
178
+ id: string;
179
+ /** Human title, e.g. "Consolidated Balance Sheets" (definition prefix stripped). */
180
+ title: string;
181
+ /** Coarse grouping for the table of contents. */
182
+ kind: 'Statement' | 'Disclosure' | 'Document' | 'Cover' | 'Other';
183
+ /** `canonical_type` when the section is a recognized core statement, else null. */
184
+ canonicalType: string | null;
185
+ /** Filing sequence (position in the ordered section list). */
186
+ order: number;
187
+ /** `FactSet.identifier`s whose facts belong to this section. */
188
+ factsetIds: string[];
189
+ }
190
+ /** The fast first read: entity + the ordered section list, no fact bodies. */
191
+ interface SecReportShell {
192
+ reportId: string;
193
+ entity: EntityInfo | null;
194
+ sections: SecSection[];
195
+ }
196
+ /**
197
+ * Split an XBRL `Structure.definition` into a human title + a coarse kind.
198
+ * Definitions look like `"9952153 - Statement - Consolidated Balance Sheets"` or
199
+ * `"0000001 - Document - Cover Page"` — a `"NNNN - <Type> - <Title>"` shape whose
200
+ * middle word (Statement / Disclosure / Document) drives the kind. A core
201
+ * canonical statement always reads as a Statement so the primaries group cleanly.
202
+ */
203
+ declare function parseStructureDefinition(definition: string | null, canonicalType: string | null): {
204
+ title: string;
205
+ kind: SecSection['kind'];
206
+ };
207
+ /** Fetch the entity + ordered section list for a report (the fast first read). */
208
+ declare function fetchSecReportShell(query: SecQuery, reportId: string): Promise<SecReportShell>;
209
+ /**
210
+ * Load one section into a single-section `NormalizedReport`. All of the
211
+ * section's facts are re-keyed to the structure id as their `factSet`, so the
212
+ * projection groups them as one Information Block regardless of how many raw
213
+ * FactSets the filing split them across.
214
+ */
215
+ declare function fetchSecSection(query: SecQuery, shell: SecReportShell, section: SecSection): Promise<NormalizedReport>;
216
+ /** Merge single-section reports into one whole-report model (order preserved). */
217
+ declare function mergeSecSections(shell: SecReportShell, sections: NormalizedReport[]): NormalizedReport;
218
+
151
219
  /**
152
220
  * The adapter seam. An adapter turns one source into a `NormalizedReport`; the
153
221
  * projection + components do the rest, identically for every source.
@@ -166,22 +234,18 @@ interface ReportAdapter {
166
234
  }
167
235
 
168
236
  /**
169
- * The cypher / GraphQL adapter — a live graph database (an entity graph **or**
170
- * the SEC repository) read read-only with an API key. One adapter for both:
171
- * only the endpoint / `graphId` differ.
237
+ * The cypher adapter — a whole-report `ReportAdapter` over the live SEC graph.
172
238
  *
173
- * Phase 2 (Mode B). Stubbed for now so the seam and the `./adapters` export
174
- * surface are in place; the holon-viewer's SEC mode will drive its build-out.
239
+ * This is a convenience wrapper: it loads the section list, then every section,
240
+ * and merges them into one `NormalizedReport`. Apps that want responsive,
241
+ * lazy-per-section loading should call `fetchSecReportShell` + `fetchSecSection`
242
+ * directly (see `./sec`) rather than materializing a whole filing up front.
175
243
  */
176
244
 
177
245
  interface CypherAdapterConfig {
178
- /** GraphQL / cypher endpoint base URL. */
179
- endpoint: string;
180
- /** User-supplied API key (sent client-side; never app-managed). */
181
- apiKey: string;
182
- /** Target graph — an entity graph id or the SEC repository id. */
183
- graphId: string;
184
- /** The report to materialize. */
246
+ /** Injected transport over `POST /v1/graphs/{graphId}/query` (auth lives here). */
247
+ query: SecQuery;
248
+ /** The report to materialize — a `Report.identifier`. */
185
249
  reportId: string;
186
250
  }
187
251
  declare function cypherAdapter(config: CypherAdapterConfig): ReportAdapter;
@@ -205,4 +269,4 @@ declare function jsonldFileAdapter(doc: string | object, source?: string): Repor
205
269
  /** Traverse a populated quad `Store` into the normalized report model. */
206
270
  declare function parseStore(store: Store): NormalizedReport;
207
271
 
208
- export { type BalanceType as B, type CalcAssociation as C, type ElementInfo as E, type Fact as F, type InformationBlock as I, type NormalizedReport as N, type PeriodInfo as P, type ReportAdapter as R, type Statement as S, type UnitInfo as U, type StatementRow as a, type CypherAdapterConfig as b, type EntityInfo as c, type PeriodType as d, type PresAssociation as e, type RowCell as f, type StatementColumn as g, type StructureInfo as h, cypherAdapter as i, jsonldFileAdapter as j, parseStore as k, parseJsonld as p };
272
+ export { type BalanceType as B, type CalcAssociation as C, type ElementInfo as E, type Fact as F, type InformationBlock as I, type NormalizedReport as N, type PeriodInfo as P, type ReportAdapter as R, type Statement as S, type UnitInfo as U, type StatementRow as a, type CypherAdapterConfig as b, type EntityInfo as c, type PeriodType as d, type PresAssociation as e, type RowCell as f, type SecQuery as g, type SecReportShell as h, type SecSection as i, type StatementColumn as j, type StructureInfo as k, cypherAdapter as l, fetchSecReportShell as m, fetchSecSection as n, jsonldFileAdapter as o, mergeSecSections as p, parseJsonld as q, parseStore as r, parseStructureDefinition as s };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { P as PeriodInfo, E as ElementInfo, N as NormalizedReport, S as Statement, a as StatementRow } from './index-DDFpPfUd.js';
2
- export { B as BalanceType, C as CalcAssociation, b as CypherAdapterConfig, c as EntityInfo, F as Fact, I as InformationBlock, d as PeriodType, e as PresAssociation, R as ReportAdapter, f as RowCell, g as StatementColumn, h as StructureInfo, U as UnitInfo, i as cypherAdapter, j as jsonldFileAdapter, p as parseJsonld, k as parseStore } from './index-DDFpPfUd.js';
1
+ import { P as PeriodInfo, E as ElementInfo, N as NormalizedReport, S as Statement, a as StatementRow } from './index-D6FzPTm5.js';
2
+ export { B as BalanceType, C as CalcAssociation, b as CypherAdapterConfig, c as EntityInfo, F as Fact, I as InformationBlock, d as PeriodType, e as PresAssociation, R as ReportAdapter, f as RowCell, g as SecQuery, h as SecReportShell, i as SecSection, j as StatementColumn, k as StructureInfo, U as UnitInfo, l as cypherAdapter, m as fetchSecReportShell, n as fetchSecSection, o as jsonldFileAdapter, p as mergeSecSections, q as parseJsonld, r as parseStore, s as parseStructureDefinition } from './index-D6FzPTm5.js';
3
3
  import * as react from 'react';
4
4
  import 'n3';
5
5
 
@@ -28,6 +28,13 @@ declare function qname(iri: string): string;
28
28
  * fallback for bundles that predate label emit.
29
29
  */
30
30
  declare function humanize(iri: string): string;
31
+ /**
32
+ * A large text-block / policy fact whose HTML (or plain-text) body is too big to
33
+ * store inline, so the platform externalizes it to the public CDN and the fact's
34
+ * value is the URL (`…/fact_<hash>.html` or `.txt`). The renderer fetches and
35
+ * embeds these instead of printing the raw link.
36
+ */
37
+ declare function isExternalFactUrl(value: string | null | undefined): boolean;
31
38
  /** Stable display order for the canonical statement blocks; others fall after. */
32
39
  declare const BLOCK_ORDER: Record<string, number>;
33
40
  /** Friendly section headings keyed by block type. */
@@ -63,6 +70,18 @@ interface OrderEntry {
63
70
  declare function presentationOrder(model: NormalizedReport, structureId: string): Map<string, OrderEntry>;
64
71
  /** Concepts that are calculation parents — the authoritative subtotal set. */
65
72
  declare function calcSubtotals(model: NormalizedReport): Set<string>;
73
+ /** Section metadata (id + display title) for a report, in canonical order. */
74
+ declare function reportSections(model: NormalizedReport): Array<{
75
+ id: string;
76
+ title: string;
77
+ }>;
78
+ /**
79
+ * Narrow a whole report to a single section (one Information Block) so it can be
80
+ * rendered on its own. `buildStatements` only iterates `informationBlocks`, so
81
+ * restricting to one yields exactly that section — the facts, structures, and
82
+ * networks stay intact because `buildStatement` filters them by the block.
83
+ */
84
+ declare function sliceReportSection(model: NormalizedReport, informationBlockId: string): NormalizedReport;
66
85
  /** Reconstruct every statement in the report, in canonical block order. */
67
86
  declare function buildStatements(model: NormalizedReport): Statement[];
68
87
  interface FootTerm {
@@ -87,6 +106,11 @@ interface FootCheck {
87
106
  */
88
107
  declare function footCheck(model: NormalizedReport, statement: Statement, elementId: string, columnIndex: number): FootCheck | null;
89
108
 
109
+ interface ExternalTextBlockProps {
110
+ url: string;
111
+ }
112
+ declare function ExternalTextBlock({ url }: ExternalTextBlockProps): react.JSX.Element;
113
+
90
114
  interface FactInspectorProps {
91
115
  report: NormalizedReport;
92
116
  statement: Statement;
@@ -119,4 +143,4 @@ interface StatementTableProps {
119
143
  }
120
144
  declare function StatementTable({ statement, onCellClick, currencySymbol, selected, }: StatementTableProps): react.JSX.Element;
121
145
 
122
- export { BLOCK_ORDER, BLOCK_TITLES, ElementInfo, FactInspector, type FactInspectorProps, type FootCheck, type FootTerm, NS, NormalizedReport, PeriodInfo, ReportView, type ReportViewProps, Statement, StatementRow, StatementTable, type StatementTableProps, buildStatements, calcSubtotals, footCheck, formatDate, formatMoney, formatPeriod, humanize, presentationOrder, qname };
146
+ export { BLOCK_ORDER, BLOCK_TITLES, ElementInfo, ExternalTextBlock, type ExternalTextBlockProps, FactInspector, type FactInspectorProps, type FootCheck, type FootTerm, NS, NormalizedReport, PeriodInfo, ReportView, type ReportViewProps, Statement, StatementRow, StatementTable, type StatementTableProps, buildStatements, calcSubtotals, footCheck, formatDate, formatMoney, formatPeriod, humanize, isExternalFactUrl, presentationOrder, qname, reportSections, sliceReportSection };