@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.
- package/CHANGELOG.md +6 -0
- package/dist/core/index.cjs +4 -8
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.js +2 -6
- package/dist/core/index.js.map +1 -1
- package/dist/index.cjs +2 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -6
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +2 -6
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +2 -6
- package/dist/react/index.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog — @ai-matrx/records
|
|
2
2
|
|
|
3
|
+
## 0.78.1
|
|
4
|
+
|
|
5
|
+
`durationText` (the duration kind's h:mm words) is `formatDurationSeconds(n, { granularity: "minute", signed: true })` from `@ai-matrx/kit/format` 0.34.0. Same text; a negative under half a second now reads `0:00` (was `-0:00`).
|
|
6
|
+
|
|
7
|
+
**Consumer action:** none.
|
|
8
|
+
|
|
3
9
|
## 0.78.0
|
|
4
10
|
|
|
5
11
|
PAGE-BUNDLE: a table page opens in one call. `custom.table_page_bundle` answers, in one round trip, the table row, fields, views, look, change actions, decorations, row actions, reverse columns, grid layout, the caller's level and recent imports. The client hands each part to the caller that asks that door with the same arguments (once, within 10 s), so every mapping, mask and refusal is unchanged; a refusing part, a missing door or a failed bundle is a miss and the door is asked itself.
|
package/dist/core/index.cjs
CHANGED
|
@@ -603,6 +603,7 @@ function previewRuleChange(rules, groups, partial = false) {
|
|
|
603
603
|
}
|
|
604
604
|
|
|
605
605
|
// src/newerKinds.ts
|
|
606
|
+
var import_format = require("@ai-matrx/kit/format");
|
|
606
607
|
var NEWER_FIELD_KINDS = [
|
|
607
608
|
"rating",
|
|
608
609
|
"duration",
|
|
@@ -647,12 +648,7 @@ function ratingMaxOf(field) {
|
|
|
647
648
|
function durationText(seconds) {
|
|
648
649
|
const n = typeof seconds === "number" ? seconds : typeof seconds === "string" && seconds.trim() !== "" ? Number(seconds) : NaN;
|
|
649
650
|
if (!Number.isFinite(n)) return null;
|
|
650
|
-
|
|
651
|
-
const h = Math.floor(whole2 / 3600);
|
|
652
|
-
const m = Math.floor(whole2 % 3600 / 60);
|
|
653
|
-
const s = whole2 % 60;
|
|
654
|
-
const sign = n < 0 ? "-" : "";
|
|
655
|
-
return s === 0 ? `${sign}${h}:${String(m).padStart(2, "0")}` : `${sign}${h}:${String(m).padStart(2, "0")}:${String(s).padStart(2, "0")}`;
|
|
651
|
+
return (0, import_format.formatDurationSeconds)(Math.round(n), { granularity: "minute", signed: true });
|
|
656
652
|
}
|
|
657
653
|
function readTypedDuration(text2) {
|
|
658
654
|
const t = text2.trim().toLowerCase();
|
|
@@ -10005,7 +10001,7 @@ function predictWriteRefusals(args) {
|
|
|
10005
10001
|
var import_delimited = require("@ai-matrx/kit/delimited");
|
|
10006
10002
|
|
|
10007
10003
|
// src/core/wholeValue.ts
|
|
10008
|
-
var
|
|
10004
|
+
var import_format2 = require("@ai-matrx/kit/format");
|
|
10009
10005
|
var WHOLE_VALUE_SOURCE_KIND = "whole_value_in_file";
|
|
10010
10006
|
function asPointer(source) {
|
|
10011
10007
|
if (!source || typeof source !== "object") return null;
|
|
@@ -10024,7 +10020,7 @@ function wholeValueOfRead(value) {
|
|
|
10024
10020
|
return asPointer(value?.source ?? null);
|
|
10025
10021
|
}
|
|
10026
10022
|
function wholeValueSize(pointer) {
|
|
10027
|
-
return (0,
|
|
10023
|
+
return (0, import_format2.formatFileSize)(pointer.bytes);
|
|
10028
10024
|
}
|
|
10029
10025
|
function wholeValueNotRead(words, pointer, why) {
|
|
10030
10026
|
return `${words}\u2026 [This is the start of a ${wholeValueSize(pointer)} text kept as file ${pointer.file_id}` + (why ? `; it could not be read for this export: ${why}` : "") + "]";
|