@tangle-network/ui 11.51.17 → 11.51.18
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/utils/time-ago.js +2 -1
- package/package.json +2 -2
- package/src/utils/time-ago.ts +1 -1
package/CHANGELOG.md
CHANGED
package/dist/utils/time-ago.js
CHANGED
|
@@ -5,6 +5,7 @@ function timeAgo(ts) {
|
|
|
5
5
|
if (secs < 60) return `${secs}s ago`;
|
|
6
6
|
const mins = Math.floor(secs / 60);
|
|
7
7
|
if (mins < 60) return `${mins}m ago`;
|
|
8
|
-
|
|
8
|
+
const hrs = Math.floor(mins / 60);
|
|
9
|
+
return hrs < 24 ? `${hrs}h ago` : `${Math.floor(hrs / 24)}d ago`;
|
|
9
10
|
}
|
|
10
11
|
export { timeAgo };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/ui",
|
|
3
|
-
"version": "11.51.
|
|
3
|
+
"version": "11.51.18",
|
|
4
4
|
"description": "Generic React UI components for Tangle products — primitives, chat, run, files, editor, markdown.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -216,7 +216,7 @@
|
|
|
216
216
|
"peerDependencies": {
|
|
217
217
|
"@hocuspocus/provider": ">=2.15.0 <5.0.0",
|
|
218
218
|
"@nanostores/react": ">=0.8.4 <3.0.0",
|
|
219
|
-
"@tangle-network/brand": "^1.31.
|
|
219
|
+
"@tangle-network/brand": "^1.31.4",
|
|
220
220
|
"@tiptap/core": ">=3.20.4 <4.0.0",
|
|
221
221
|
"@tiptap/extension-collaboration": ">=3.20.4 <4.0.0",
|
|
222
222
|
"@tiptap/extension-collaboration-caret": ">=3.7.0 <4.0.0",
|
package/src/utils/time-ago.ts
CHANGED