@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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog — `@ai-matrx/meet`
2
2
 
3
+ ## 0.7.80
4
+
5
+ - `attendanceCsv` writes through THE one writer, `@ai-matrx/kit/delimited` (AP-2): CRLF records and trailing CRLF unchanged; a name that opens like a formula gets a leading `'`.
6
+
7
+ **Consumer action:** none.
8
+
3
9
  ## 0.7.79
4
10
 
5
11
  **A meeting's record is read once per tab, and kept live.** `useMeetingRecord` held the bundle
package/dist/index.cjs CHANGED
@@ -4551,6 +4551,7 @@ function fileDownloadPath(fileId) {
4551
4551
  }
4552
4552
 
4553
4553
  // src/core/after.ts
4554
+ var import_delimited = require("@ai-matrx/kit/delimited");
4554
4555
  var import_format = require("@ai-matrx/kit/format");
4555
4556
  function kindOf(person) {
4556
4557
  if (person.isAgent) return "assistant";
@@ -4689,11 +4690,6 @@ function attendanceTotals(rows) {
4689
4690
  averageMs: timed.length === 0 ? null : Math.round(timed.reduce((sum, row) => sum + (row.durationMs ?? 0), 0) / timed.length)
4690
4691
  };
4691
4692
  }
4692
- function csvCell(value) {
4693
- if (value === null) return "";
4694
- const text3 = String(value);
4695
- return /[",\n\r]/.test(text3) ? `"${text3.replace(/"/g, '""')}"` : text3;
4696
- }
4697
4693
  var ATTENDANCE_CSV_HEADER = [
4698
4694
  "Meeting",
4699
4695
  "Meeting started",
@@ -4705,11 +4701,11 @@ var ATTENDANCE_CSV_HEADER = [
4705
4701
  "Admission"
4706
4702
  ];
4707
4703
  function attendanceCsv(reports) {
4708
- const lines = [ATTENDANCE_CSV_HEADER.join(",")];
4709
- for (const { meeting, rows } of reports) {
4710
- for (const row of rows) {
4711
- lines.push(
4712
- [
4704
+ return (0, import_delimited.toDelimited)(
4705
+ [
4706
+ ATTENDANCE_CSV_HEADER,
4707
+ ...reports.flatMap(
4708
+ ({ meeting, rows }) => rows.map((row) => [
4713
4709
  meeting.title,
4714
4710
  meeting.startedAt ?? meeting.scheduledFor,
4715
4711
  row.name,
@@ -4718,12 +4714,11 @@ function attendanceCsv(reports) {
4718
4714
  row.leftAt,
4719
4715
  row.durationMs === null ? null : Math.round(row.durationMs / 6e3) / 10,
4720
4716
  row.admission
4721
- ].map(csvCell).join(",")
4722
- );
4723
- }
4724
- }
4725
- return `${lines.join("\r\n")}\r
4726
- `;
4717
+ ])
4718
+ )
4719
+ ],
4720
+ { lineEnding: "\r\n", trailingNewline: true }
4721
+ );
4727
4722
  }
4728
4723
  function recordingOffsetMs(at, recording) {
4729
4724
  if (recording === null || recording.state !== "available") return null;