@ai-matrx/meet 0.7.79 → 0.7.80

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/react.cjs CHANGED
@@ -7275,6 +7275,7 @@ var import_design_system = require("@ai-matrx/design-system");
7275
7275
  var import_format4 = require("@ai-matrx/kit/format");
7276
7276
 
7277
7277
  // src/core/after.ts
7278
+ var import_delimited = require("@ai-matrx/kit/delimited");
7278
7279
  var import_format2 = require("@ai-matrx/kit/format");
7279
7280
  function kindOf(person) {
7280
7281
  if (person.isAgent) return "assistant";
@@ -7413,11 +7414,6 @@ function attendanceTotals(rows) {
7413
7414
  averageMs: timed.length === 0 ? null : Math.round(timed.reduce((sum, row) => sum + (row.durationMs ?? 0), 0) / timed.length)
7414
7415
  };
7415
7416
  }
7416
- function csvCell(value) {
7417
- if (value === null) return "";
7418
- const text3 = String(value);
7419
- return /[",\n\r]/.test(text3) ? `"${text3.replace(/"/g, '""')}"` : text3;
7420
- }
7421
7417
  var ATTENDANCE_CSV_HEADER = [
7422
7418
  "Meeting",
7423
7419
  "Meeting started",
@@ -7429,11 +7425,11 @@ var ATTENDANCE_CSV_HEADER = [
7429
7425
  "Admission"
7430
7426
  ];
7431
7427
  function attendanceCsv(reports) {
7432
- const lines = [ATTENDANCE_CSV_HEADER.join(",")];
7433
- for (const { meeting, rows } of reports) {
7434
- for (const row of rows) {
7435
- lines.push(
7436
- [
7428
+ return (0, import_delimited.toDelimited)(
7429
+ [
7430
+ ATTENDANCE_CSV_HEADER,
7431
+ ...reports.flatMap(
7432
+ ({ meeting, rows }) => rows.map((row) => [
7437
7433
  meeting.title,
7438
7434
  meeting.startedAt ?? meeting.scheduledFor,
7439
7435
  row.name,
@@ -7442,12 +7438,11 @@ function attendanceCsv(reports) {
7442
7438
  row.leftAt,
7443
7439
  row.durationMs === null ? null : Math.round(row.durationMs / 6e3) / 10,
7444
7440
  row.admission
7445
- ].map(csvCell).join(",")
7446
- );
7447
- }
7448
- }
7449
- return `${lines.join("\r\n")}\r
7450
- `;
7441
+ ])
7442
+ )
7443
+ ],
7444
+ { lineEnding: "\r\n", trailingNewline: true }
7445
+ );
7451
7446
  }
7452
7447
  function recordingOffsetMs(at, recording) {
7453
7448
  if (recording === null || recording.state !== "available") return null;