Revert "feat: Persist Studio manual edits via manifest (#593)"

This reverts commit d0abe90a82.
This commit is contained in:
Miguel Ángel
2026-05-04 09:41:36 -07:00
parent 8d83d4f132
commit 26b8e2a985
82 changed files with 711 additions and 15345 deletions
@@ -5,15 +5,8 @@ export interface ScreenshotClip {
height: number;
}
export function getElementScreenshotClip(
selector: string,
selectorIndex?: number,
): ScreenshotClip | undefined {
const matches = Array.from(document.querySelectorAll(selector)).filter(
(el): el is HTMLElement => el instanceof HTMLElement,
);
const safeIndex = Math.max(0, Math.min(matches.length - 1, Math.floor(selectorIndex ?? 0)));
const el = matches[safeIndex] ?? null;
export function getElementScreenshotClip(selector: string): ScreenshotClip | undefined {
const el = document.querySelector(selector);
if (!(el instanceof HTMLElement)) return undefined;
const rect = el.getBoundingClientRect();
if (rect.width < 4 || rect.height < 4) return undefined;