@hyperframes/inspector 0.8.165 → 0.8.166

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.
@@ -62,10 +62,13 @@
62
62
  }
63
63
 
64
64
  // ../core/src/runtime/timelineDuration.ts
65
+ var pausedChildEnd = (child) => child.paused?.() === true ? (child.startTime?.() ?? 0) + (child.totalDuration?.() ?? 0) / Math.abs(child.timeScale?.() || 1) : 0;
65
66
  function readTimelineDurationSeconds(timeline) {
66
67
  try {
67
68
  if (typeof timeline?.duration !== "function") return null;
68
- const seconds = Number(timeline.duration());
69
+ const held = timeline.getChildren?.(false, false, true);
70
+ const children = Array.isArray(held) ? held : [];
71
+ const seconds = Math.max(Number(timeline.duration()), ...children.map(pausedChildEnd));
69
72
  return Number.isFinite(seconds) ? seconds : null;
70
73
  } catch (err) {
71
74
  swallow("runtime.timelineDuration", err);