@camstack/ui-library 1.2.200 → 1.2.202
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/composites/adaptive-downlink.d.ts +99 -7
- package/dist/composites/camera-stream-player.d.ts +11 -11
- package/dist/composites/client-network-sample.d.ts +56 -0
- package/dist/generated/system-hooks.d.ts +2 -0
- package/dist/index.cjs +280 -66
- package/dist/index.js +280 -67
- package/dist/lib/format-last-seen.d.ts +12 -3
- package/package.json +1 -1
|
@@ -2,11 +2,20 @@
|
|
|
2
2
|
* Relative "last seen" formatter for the offline affordance.
|
|
3
3
|
*
|
|
4
4
|
* Renders a short relative-time label from a millisecond epoch:
|
|
5
|
-
* "just now", "5m ago", "3h ago", "2d ago". Returns `null` for
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* "just now", "5m ago", "3h ago", "2d ago". Returns `null` for missing
|
|
6
|
+
* inputs, or inputs below {@link MIN_PLAUSIBLE_TIMESTAMP_MS} (a
|
|
7
|
+
* placeholder or a seeded "known value, unknown change time" stamp), so
|
|
8
|
+
* callers can render nothing rather than a misleading "—", "NaN ago", or
|
|
9
|
+
* (for a seeded `1`) "20000 days ago".
|
|
8
10
|
*
|
|
9
11
|
* Future timestamps (clock skew between the device and the browser)
|
|
10
12
|
* collapse to "just now" instead of a negative duration.
|
|
11
13
|
*/
|
|
14
|
+
/**
|
|
15
|
+
* The earliest timestamp a real "last seen" could plausibly carry. Below
|
|
16
|
+
* this, a value is a placeholder or a seeded "known value, unknown change
|
|
17
|
+
* time" stamp (e.g. Homematic's `HM_SEEDED_CHANGED_AT = 1`) — never a real
|
|
18
|
+
* instant. Year 2000 predates every device this renders.
|
|
19
|
+
*/
|
|
20
|
+
export declare const MIN_PLAUSIBLE_TIMESTAMP_MS: number;
|
|
12
21
|
export declare function formatLastSeen(timestampMs: number | null | undefined): string | null;
|