@ai-matrx/messaging 0.11.3 → 0.11.5
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 +21 -0
- package/dist/index.cjs +3 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -1
- package/dist/index.d.ts +13 -1
- package/dist/index.js +3 -5
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +6 -8
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +13 -1
- package/dist/react.d.ts +13 -1
- package/dist/react.js +3 -5
- package/dist/react.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog — `@ai-matrx/messaging`
|
|
2
2
|
|
|
3
|
+
## 0.11.5 — 2026-09-12
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- **`formatLastSeen` speaks the kit voice.** Its three hand-rolled tiers turned
|
|
8
|
+
an elapsed millisecond count into `5m ago` / `3h ago` / `2d ago`, which is
|
|
9
|
+
exactly `formatRelativeTime`'s `short` voice from `@ai-matrx/kit/format` — a
|
|
10
|
+
package this one already depends on. A package re-deriving another package's
|
|
11
|
+
capability ships the duplicate to every consumer of this one. The two-minute
|
|
12
|
+
"Active now" window stays local: it is a presence decision, not a formatting
|
|
13
|
+
one.
|
|
14
|
+
- Visible change: an elapsed time that rounded up into its own next tier now
|
|
15
|
+
promotes properly (`60m ago` → `1h ago`), and sub-minute presence outside the
|
|
16
|
+
"Active now" window reads `30s ago` instead of `0m ago`.
|
|
17
|
+
|
|
18
|
+
## 0.11.4
|
|
19
|
+
|
|
20
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
21
|
+
`git diff npm/messaging/v0.11.3..npm/messaging/v0.11.4 -- apps/shared/messaging`).
|
|
22
|
+
No source changes intended and no consumer action required.
|
|
23
|
+
|
|
3
24
|
## 0.11.3 — 2026-09-12
|
|
4
25
|
|
|
5
26
|
### Fixed
|
package/dist/index.cjs
CHANGED
|
@@ -1571,6 +1571,7 @@ function messagingClientId() {
|
|
|
1571
1571
|
}
|
|
1572
1572
|
|
|
1573
1573
|
// src/core/format.ts
|
|
1574
|
+
var import_format = require("@ai-matrx/kit/format");
|
|
1574
1575
|
var MINUTE = 6e4;
|
|
1575
1576
|
var HOUR = 60 * MINUTE;
|
|
1576
1577
|
var DAY = 24 * HOUR;
|
|
@@ -1654,11 +1655,8 @@ function participantNames(participants, excluding) {
|
|
|
1654
1655
|
}
|
|
1655
1656
|
function formatLastSeen(lastSeenMs, now = Date.now()) {
|
|
1656
1657
|
if (lastSeenMs === null) return "";
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
if (elapsed < HOUR) return `Active ${Math.round(elapsed / MINUTE)}m ago`;
|
|
1660
|
-
if (elapsed < DAY) return `Active ${Math.round(elapsed / HOUR)}h ago`;
|
|
1661
|
-
return `Active ${Math.round(elapsed / DAY)}d ago`;
|
|
1658
|
+
if (now - lastSeenMs < 2 * MINUTE) return "Active now";
|
|
1659
|
+
return `Active ${(0, import_format.formatRelativeTime)(lastSeenMs, { style: "short", now })}`;
|
|
1662
1660
|
}
|
|
1663
1661
|
|
|
1664
1662
|
// src/core/repository.ts
|