import { chromium } from 'playwright'; const [component, out] = process.argv.slice(2); const b = await chromium.launch(); const p = await b.newPage({ viewport: { width: 1280, height: 900 }, deviceScaleFactor: 2 }); await p.goto(`http://localhost:5173/uix/components/${component}`, { waitUntil: 'networkidle' }); await p.waitForTimeout(900); const stage = p.locator('[data-uix-stage]').first(); await ((await stage.count()) ? stage : p.locator('body')).screenshot({ path: out }); console.log('shot ->', out); await b.close();