@zendir/ui 0.2.9 → 0.2.11

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.
@@ -172,7 +172,7 @@ const EventListItem = memo(function EventListItem2({
172
172
  const hasArguments = event.arguments && Object.keys(event.arguments).length > 0;
173
173
  const argumentCount = hasArguments ? Object.keys(event.arguments).length : 0;
174
174
  const timestamps = event.timestamps || [
175
- { label: "Time", value: event.start.toLocaleString(), status: event.status }
175
+ { label: "Time", value: event.start.toISOString().replace("T", " ").substring(0, 19) + " UTC", status: event.status }
176
176
  ];
177
177
  const displayStatus = event.badgeVariant && event.badgeVariant !== "default" && event.badgeVariant !== "primary" ? event.badgeVariant : event.status ?? "normal";
178
178
  const markerColor = tokens.colors.status[displayStatus];
@@ -439,7 +439,8 @@ const ChartView = memo(function ChartView2({
439
439
  showPlayhead = true,
440
440
  playheadTime,
441
441
  onPlayheadChange: _onPlayheadChange,
442
- showDayMarkers = true
442
+ showDayMarkers = true,
443
+ timeFormat = "absolute"
443
444
  }) {
444
445
  const { tokens, theme } = useTheme();
445
446
  const isTransparentTheme = theme === "transparent" || theme === "transparent-bold" || theme === "transparent-minimal";
@@ -517,6 +518,15 @@ const ChartView = memo(function ChartView2({
517
518
  return markers;
518
519
  }, [start, end, totalDuration]);
519
520
  const formatTime = (date, showSeconds = false) => {
521
+ if (timeFormat === "utc") {
522
+ const h = String(date.getUTCHours()).padStart(2, "0");
523
+ const m = String(date.getUTCMinutes()).padStart(2, "0");
524
+ if (showSeconds) {
525
+ const s = String(date.getUTCSeconds()).padStart(2, "0");
526
+ return `${h}:${m}:${s} UTC`;
527
+ }
528
+ return `${h}:${m} UTC`;
529
+ }
520
530
  const options = {
521
531
  hour: "2-digit",
522
532
  minute: "2-digit",
@@ -2436,7 +2446,8 @@ const UnifiedTimeline = memo(function UnifiedTimeline2({
2436
2446
  showPlayhead,
2437
2447
  playheadTime,
2438
2448
  onPlayheadChange: _onPlayheadChangeTimeline,
2439
- showDayMarkers
2449
+ showDayMarkers,
2450
+ timeFormat
2440
2451
  }
2441
2452
  )
2442
2453
  )