@ai-matrx/messaging 0.11.5 → 0.11.6
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 +2 -17
- package/dist/index.cjs +5 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -13
- package/dist/index.d.ts +1 -13
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +8 -6
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +1 -13
- package/dist/react.d.ts +1 -13
- package/dist/react.js +5 -3
- package/dist/react.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,24 +1,9 @@
|
|
|
1
1
|
# Changelog — `@ai-matrx/messaging`
|
|
2
2
|
|
|
3
|
-
## 0.11.
|
|
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
|
|
3
|
+
## 0.11.6
|
|
19
4
|
|
|
20
5
|
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
21
|
-
`git diff npm/messaging/v0.11.
|
|
6
|
+
`git diff npm/messaging/v0.11.5..npm/messaging/v0.11.6 -- apps/shared/messaging`).
|
|
22
7
|
No source changes intended and no consumer action required.
|
|
23
8
|
|
|
24
9
|
## 0.11.3 — 2026-09-12
|
package/dist/index.cjs
CHANGED
|
@@ -1571,7 +1571,6 @@ function messagingClientId() {
|
|
|
1571
1571
|
}
|
|
1572
1572
|
|
|
1573
1573
|
// src/core/format.ts
|
|
1574
|
-
var import_format = require("@ai-matrx/kit/format");
|
|
1575
1574
|
var MINUTE = 6e4;
|
|
1576
1575
|
var HOUR = 60 * MINUTE;
|
|
1577
1576
|
var DAY = 24 * HOUR;
|
|
@@ -1655,8 +1654,11 @@ function participantNames(participants, excluding) {
|
|
|
1655
1654
|
}
|
|
1656
1655
|
function formatLastSeen(lastSeenMs, now = Date.now()) {
|
|
1657
1656
|
if (lastSeenMs === null) return "";
|
|
1658
|
-
|
|
1659
|
-
|
|
1657
|
+
const elapsed = now - lastSeenMs;
|
|
1658
|
+
if (elapsed < 2 * MINUTE) return "Active now";
|
|
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`;
|
|
1660
1662
|
}
|
|
1661
1663
|
|
|
1662
1664
|
// src/core/repository.ts
|