@hyperframes/inspector 0.8.205 → 0.8.207

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.
@@ -1471,12 +1471,12 @@
1471
1471
  durationCache.set(element, resolved);
1472
1472
  return resolved;
1473
1473
  };
1474
- const isCompositionHost = (element) => element.hasAttribute("data-composition-src") || element.hasAttribute("data-composition-id") || element.hasAttribute("data-composition-file");
1474
+ const COMPOSITION_HOST_SELECTOR = "[data-composition-src], [data-composition-id], [data-composition-file]";
1475
+ const isCompositionHost = (element) => element.matches(COMPOSITION_HOST_SELECTOR);
1475
1476
  const inheritedTimingHost = (element) => {
1476
- const parent = element.parentElement;
1477
- if (!parent || !element.hasAttribute("data-composition-id")) return null;
1477
+ if (!element.hasAttribute("data-composition-id")) return null;
1478
1478
  if (parseStartExpression(element.getAttribute("data-start"))) return null;
1479
- return isCompositionHost(parent) ? parent : null;
1479
+ return element.parentElement?.closest(`[data-start], ${COMPOSITION_HOST_SELECTOR}`) ?? null;
1480
1480
  };
1481
1481
  const resolveCompositionOrigin = (compositionRoot, fallback) => compositionOriginSeconds(
1482
1482
  resolveStartForElementInternal(compositionRoot, fallback),