documents.js writes CSV today (odbToCsv) but has no readable CSV input and no csv entry in DocumentFormat. A caller holding .csv bytes has no documents.js path.
Materially simpler than markdown was — one sheet, one row per line, one cell per field, no inline formatting or block structure. Both halves are largely built already:
- write half exists as
buildOdbTableCsv (src/odb/csv.ts, RFC 4180 quoting) — just needs generalising from HsqldbTable rows to a ContentSheet's cells
- cell re-typing exists as
inferCellValue (src/layout/cell-typing.ts), already used by reconstructSpreadsheet for exactly the untyped-text→typed-cell boundary CSV sits on
- read half is a small RFC 4180 parser feeding the spreadsheet
ContentDocument variant odbTablesToSpreadsheetDocument already constructs (src/odb/spreadsheet.ts's tableToSheet is the row→cell template)
Maps to the spreadsheet variant. Once readCsv/writeCsv exist, csvToXlsx/csvToOds/csvToPdf compose from the shared variant the way odsToXlsx/xlsxToPdf already do. Follows the markdown precedent (a non-zip, text-only format with no magic bytes) as a full DocumentFormat member with its own codec entry, bridges, and port edges.
documents.js writes CSV today (
odbToCsv) but has no readable CSV input and nocsventry inDocumentFormat. A caller holding.csvbytes has no documents.js path.Materially simpler than markdown was — one sheet, one row per line, one cell per field, no inline formatting or block structure. Both halves are largely built already:
buildOdbTableCsv(src/odb/csv.ts, RFC 4180 quoting) — just needs generalising fromHsqldbTablerows to aContentSheet's cellsinferCellValue(src/layout/cell-typing.ts), already used byreconstructSpreadsheetfor exactly the untyped-text→typed-cell boundary CSV sits onContentDocumentvariantodbTablesToSpreadsheetDocumentalready constructs (src/odb/spreadsheet.ts'stableToSheetis the row→cell template)Maps to the spreadsheet variant. Once
readCsv/writeCsvexist,csvToXlsx/csvToOds/csvToPdfcompose from the shared variant the wayodsToXlsx/xlsxToPdfalready do. Follows the markdown precedent (a non-zip, text-only format with no magic bytes) as a fullDocumentFormatmember with its own codec entry, bridges, and port edges.