import { parseHTML } from "linkedom"; /** * A privacy-preserving structural anatomy of a HyperFrames composition. The * agent fills this before submitting a non-clean `hyperframes feedback` so * maintainers can pattern-match the report against known bug families without * receiving the composition ZIP. * * Counts and presence flags only — no file paths, no src URLs, no user text. */ export interface CompositionCensus { /** Counts of media/graphic elements at the failing HTML pass. */ elementCensus: { video: number; audio: number; img: number; svg: number; canvas: number; /** Sub-composition mount points (elements with `data-composition-src`). */ subCompositionMounts: number; }; /** * Union set of structural attributes present anywhere in the composition. * Each key is HF's capture-routing signal set (see references/preview-render.md). */ structuralAttributes: { clipPath: boolean; filter: boolean; mixBlendMode: boolean; transform: boolean; mask: boolean; positionFixed: boolean; overflowHidden: boolean; zIndex: boolean; dataHasAudio: boolean; dataDuration: boolean; dataStart: boolean; dataCompositionSrc: boolean; backgroundImage: boolean; maskImage: boolean; }; /** * Timeline shape summary. Distinguishes flat single-composition renders * from nested sub-composition trees, and GSAP-driven vs data-attribute-driven. */ timelineShape: { /** True if any `data-composition-src` mount exists. */ nested: boolean; /** Count of sub-composition mounts (`data-composition-src` count). */ subCompositionCount: number; /** * Any GSAP timeline usage detected via `