@peasant-labs/fairtrade 0.0.37 → 0.0.38
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/dist/lib/{ChartLine-Cycmpjep.js → ChartLine-MZVbpUu1.js} +1 -1
- package/dist/lib/analytics.css +1 -1
- package/dist/lib/analytics.js +191 -191
- package/dist/lib/commons.js +172 -172
- package/dist/lib/components.css +1 -1
- package/dist/lib/graph.css +1 -1
- package/dist/lib/graph.js +94 -85
- package/dist/lib/types/AppSidebar.d.ts +28 -9
- package/dist/lib/types/StepsWaterfall.d.ts +1 -1
- package/dist/lib/types/graph/ChangeDetail.d.ts +3 -1
- package/dist/lib/types/graph/Changes.d.ts +3 -1
- package/dist/lib/types/transcript/adapter.d.ts +7 -0
- package/dist/lib/types/transcript/index.d.ts +2 -2
- package/dist/lib/types/transcript/time.d.ts +29 -4
- package/dist/lib/{ui-DoMWMsXK.js → ui-DIoBcgLp.js} +1704 -1640
- package/dist/lib/ui.js +3 -3
- package/package.json +5 -3
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Is this a real recorded time? A missing, unparseable, zero, epoch or Go zero-time value
|
|
3
|
+
* ("0001-01-01T00:00:00Z") is unknown: nothing may render it, and no "ago" math runs on it.
|
|
4
|
+
*
|
|
5
|
+
* @param {string | null | undefined} iso
|
|
6
|
+
* @returns {boolean}
|
|
7
|
+
*/
|
|
8
|
+
export function isKnownTime(iso: string | null | undefined): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Human-readable relative time: "just now", "3m ago", "2h ago", "4d ago"; past a week it reads as
|
|
11
|
+
* a date ("oct 14", or "oct 14, 2025" in another year). An unknown time reads as nothing.
|
|
3
12
|
*
|
|
4
13
|
* @param {string} iso an ISO 8601 timestamp
|
|
5
14
|
* @param {number} [now] reference "now" in epoch millis (defaults to `Date.now()`; pass explicitly for deterministic tests)
|
|
@@ -7,12 +16,28 @@
|
|
|
7
16
|
*/
|
|
8
17
|
export function formatRelative(iso: string, now?: number): string;
|
|
9
18
|
/**
|
|
10
|
-
*
|
|
19
|
+
* The one duration format: human and short. "12s", "4m 30s", "4m", "1h 12m", "1h"; under a
|
|
20
|
+
* second "<1s"; zero, negative or unknown reads as nothing, so a caller hides the figure.
|
|
21
|
+
*
|
|
22
|
+
* @param {number | null | undefined} seconds
|
|
23
|
+
* @returns {string}
|
|
24
|
+
*/
|
|
25
|
+
export function formatDurationSeconds(seconds: number | null | undefined): string;
|
|
26
|
+
/**
|
|
27
|
+
* A duration in minutes, in the one format: 4.5 -> "4m 30s", 76 -> "1h 16m", 0 -> "".
|
|
28
|
+
*
|
|
29
|
+
* @param {number | null | undefined} mins
|
|
30
|
+
* @returns {string}
|
|
31
|
+
*/
|
|
32
|
+
export function formatDurationMins(mins: number | null | undefined): string;
|
|
33
|
+
/**
|
|
34
|
+
* A duration in milliseconds: a tool call reads "820ms" or "1.4s" while short, then the one
|
|
35
|
+
* format ("1m 15s"); zero or unknown reads as nothing.
|
|
11
36
|
*
|
|
12
|
-
* @param {number | undefined}
|
|
37
|
+
* @param {number | null | undefined} ms
|
|
13
38
|
* @returns {string}
|
|
14
39
|
*/
|
|
15
|
-
export function
|
|
40
|
+
export function formatDurationMs(ms: number | null | undefined): string;
|
|
16
41
|
/**
|
|
17
42
|
* "Jan 12, 4:23 PM" — long datetime for tooltips.
|
|
18
43
|
*
|