@ai-matrx/records 0.81.3 → 0.82.1

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.
@@ -1580,7 +1580,7 @@ function exportCellText(value) {
1580
1580
  return JSON.stringify(value);
1581
1581
  }
1582
1582
  async function exportPageXlsx(page, labels = {}, sheetLabel = "Records") {
1583
- const { writeWorkbookBytes } = await import("@ai-matrx/alchemy/operate/formats/xlsx");
1583
+ const { writeWorkbookBytes } = await import("@ai-matrx/print/xlsx");
1584
1584
  const header = page.columns.map((c) => labels[c] ?? c);
1585
1585
  const body = page.rows.map((row) => page.columns.map((c) => exportCellText(row[c])));
1586
1586
  const name = sheetLabel.replace(/[\\/?*[\]:]/g, " ").trim().slice(0, 31) || "Records";
@@ -10241,7 +10241,7 @@ function toAoa(fields, rows2) {
10241
10241
  return [fields.map(headerFor), ...rows2.map((row) => fields.map((f) => exportCellText2(f, row[f.key])))];
10242
10242
  }
10243
10243
  async function exportXlsx(fields, rows2, sheetLabel = "Records") {
10244
- const { writeWorkbookBytes } = await import("@ai-matrx/alchemy/operate/formats/xlsx");
10244
+ const { writeWorkbookBytes } = await import("@ai-matrx/print/xlsx");
10245
10245
  const name = sheetLabel.replace(/[\\/?*[\]:]/g, " ").trim().slice(0, 31) || "Data";
10246
10246
  return writeWorkbookBytes({ sheets: [{ name, rows: toAoa(fields, rows2) }] });
10247
10247
  }
@@ -10252,7 +10252,7 @@ function importCsv(text2) {
10252
10252
  return fromMatrix(parseCsv(text2));
10253
10253
  }
10254
10254
  async function importXlsx(bytes) {
10255
- const { readWorkbook } = await import("@ai-matrx/alchemy/operate/read");
10255
+ const { readWorkbookBytes: readWorkbook } = await import("@ai-matrx/print/xlsx");
10256
10256
  const sheet = (await readWorkbook(bytes)).sheets[0];
10257
10257
  if (!sheet) return { headers: [], rows: [] };
10258
10258
  return fromMatrix(sheet.grid({ raw: false, defval: "" }));