@lmzhen/dsh-evolution-client-kit 0.47.0 → 0.49.0

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.
@@ -1,20 +0,0 @@
1
- /** The one local-time presentation used by reading surfaces. */
2
- import { createElement } from 'react';
3
- import { formatLocalDateTime } from "../format.js";
4
- /**
5
- * Render a local wall time, or a neutral dash when the fact is unknown.
6
- * @param props - ISO/epoch value and seconds preference.
7
- * @returns a time element with the raw value in dateTime when valid.
8
- */
9
- export function TimeText({ value, seconds = true, className }) {
10
- const text = formatLocalDateTime(value, { seconds });
11
- const ms = typeof value === 'number' ? value : typeof value === 'string' ? Date.parse(value) : Number.NaN;
12
- const raw = Number.isFinite(ms) ? new Date(ms).toISOString() : undefined;
13
- return createElement('time', {
14
- 'data-role': 'time-text',
15
- ...(raw === undefined ? {} : { dateTime: raw }),
16
- ...(text === null ? {} : { title: text }),
17
- ...(className === undefined ? {} : { className }),
18
- }, text ?? '—');
19
- }
20
- //# sourceMappingURL=time-text.js.map