/** * Comprehensive asset cataloger. * * Scans rendered HTML and CSS for every referenced asset (images, videos, * fonts, icons, stylesheets, backgrounds) and records the HTML context * where each was found (e.g., img[src], css url(), link[rel=preload]). * * This is the programmatic Part 1 of DESIGN.md generation — deterministic * extraction, no AI involved. */ import type { Page } from "puppeteer-core"; import { parseAnimatedGifMetadata } from "@hyperframes/core"; export interface CatalogedAsset { url: string; type: "Image" | "Video" | "Font" | "Icon" | "Background" | "Other"; contexts: string[]; notes?: string; /** Alt text, figcaption, or aria-label */ description?: string; /** Nearest heading (h1-h4) text */ nearestHeading?: string; /** Parent section/container class names */ sectionClasses?: string; /** Whether the image is above the fold (visible without scrolling) */ aboveFold?: boolean; /** Element sits inside
,