@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.js CHANGED
@@ -6979,6 +6979,7 @@ import {
6979
6979
  import { avatarPaletteIndex, formatDurationMs as formatDurationMs4, getInitials } from "@ai-matrx/kit/format";
6980
6980
 
6981
6981
  // src/core/after.ts
6982
+ import { toDelimited } from "@ai-matrx/kit/delimited";
6982
6983
  import { formatDurationMs as formatDurationMs2 } from "@ai-matrx/kit/format";
6983
6984
  function kindOf(person) {
6984
6985
  if (person.isAgent) return "assistant";
@@ -7117,11 +7118,6 @@ function attendanceTotals(rows) {
7117
7118
  averageMs: timed.length === 0 ? null : Math.round(timed.reduce((sum, row) => sum + (row.durationMs ?? 0), 0) / timed.length)
7118
7119
  };
7119
7120
  }
7120
- function csvCell(value) {
7121
- if (value === null) return "";
7122
- const text3 = String(value);
7123
- return /[",\n\r]/.test(text3) ? `"${text3.replace(/"/g, '""')}"` : text3;
7124
- }
7125
7121
  var ATTENDANCE_CSV_HEADER = [
7126
7122
  "Meeting",
7127
7123
  "Meeting started",
@@ -7133,11 +7129,11 @@ var ATTENDANCE_CSV_HEADER = [
7133
7129
  "Admission"
7134
7130
  ];
7135
7131
  function attendanceCsv(reports) {
7136
- const lines = [ATTENDANCE_CSV_HEADER.join(",")];
7137
- for (const { meeting, rows } of reports) {
7138
- for (const row of rows) {
7139
- lines.push(
7140
- [
7132
+ return toDelimited(
7133
+ [
7134
+ ATTENDANCE_CSV_HEADER,
7135
+ ...reports.flatMap(
7136
+ ({ meeting, rows }) => rows.map((row) => [
7141
7137
  meeting.title,
7142
7138
  meeting.startedAt ?? meeting.scheduledFor,
7143
7139
  row.name,
@@ -7146,12 +7142,11 @@ function attendanceCsv(reports) {
7146
7142
  row.leftAt,
7147
7143
  row.durationMs === null ? null : Math.round(row.durationMs / 6e3) / 10,
7148
7144
  row.admission
7149
- ].map(csvCell).join(",")
7150
- );
7151
- }
7152
- }
7153
- return `${lines.join("\r\n")}\r
7154
- `;
7145
+ ])
7146
+ )
7147
+ ],
7148
+ { lineEnding: "\r\n", trailingNewline: true }
7149
+ );
7155
7150
  }
7156
7151
  function recordingOffsetMs(at, recording) {
7157
7152
  if (recording === null || recording.state !== "available") return null;