@ai-matrx/records 0.78.0 → 0.78.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.
@@ -8889,6 +8889,7 @@ async function archiveTableRow(client, table, rowId) {
8889
8889
  import { isUuidShape as isUuidShape4 } from "@ai-matrx/kit/uuid";
8890
8890
 
8891
8891
  // src/newerKinds.ts
8892
+ import { formatDurationSeconds } from "@ai-matrx/kit/format";
8892
8893
  var NEWER_FIELD_KINDS = [
8893
8894
  "rating",
8894
8895
  "duration",
@@ -8933,12 +8934,7 @@ function ratingMaxOf(field2) {
8933
8934
  function durationText(seconds) {
8934
8935
  const n = typeof seconds === "number" ? seconds : typeof seconds === "string" && seconds.trim() !== "" ? Number(seconds) : NaN;
8935
8936
  if (!Number.isFinite(n)) return null;
8936
- const whole = Math.round(Math.abs(n));
8937
- const h = Math.floor(whole / 3600);
8938
- const m = Math.floor(whole % 3600 / 60);
8939
- const s = whole % 60;
8940
- const sign = n < 0 ? "-" : "";
8941
- return s === 0 ? `${sign}${h}:${String(m).padStart(2, "0")}` : `${sign}${h}:${String(m).padStart(2, "0")}:${String(s).padStart(2, "0")}`;
8937
+ return formatDurationSeconds(Math.round(n), { granularity: "minute", signed: true });
8942
8938
  }
8943
8939
  function readTypedDuration(text2) {
8944
8940
  const t = text2.trim().toLowerCase();