Measured in Chromium and Firefox: the CSSOM exposes `background: var(--x)` and `border: 1px solid var(--x)` only as pending-substitution longhands whose values read back as "", so the capture sanitiser (which re-serialises the parsed declarations) dropped them. The self-review screenshot then showed dark heroes, image placeholders and card borders as white, and the model "fixed" things that were fine on the real page. The sanitiser now emits the declared shorthand once, at its first longhand, through the same value/URL gate as every other declaration. Sandbox, CSP and the single URL allow-list are unchanged. - scripts/e2e-capture-fidelity.mjs: real-browser test through the whole capture path (sanitise -> inline -> sandboxed frame -> html-to-image), decodes the JPEG and samples pixels. Failed 9/12 checks per browser before, passes after. - e2e-capture-security: hostile var() shorthand / var() fallback url() probes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
57 lines
2.1 KiB
JSON
57 lines
2.1 KiB
JSON
{
|
|
"name": "whp-site-builder",
|
|
"private": true,
|
|
"version": "2.0.0",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "tsc && vite build",
|
|
"preview": "vite preview",
|
|
"test": "playwright test tests/site-builder.spec.ts --reporter=list",
|
|
"test:headed": "playwright test tests/site-builder.spec.ts --reporter=list --headed",
|
|
"test:e2e:sitesmith": "playwright test tests/sitesmith.spec.ts --reporter=list",
|
|
"test:unit": "vitest run",
|
|
"test:browser:bg": "node scripts/e2e-background.mjs",
|
|
"test:browser:canvas": "node scripts/e2e-canvas-parity.mjs",
|
|
"test:browser:mobile": "node scripts/e2e-mobile-parity.mjs",
|
|
"test:browser:mobile-guard": "node scripts/e2e-mobile-guard.mjs",
|
|
"test:browser:legacy-grid": "node scripts/e2e-legacy-grid.mjs",
|
|
"test:browser:colorpick": "node scripts/e2e-color-pick.mjs",
|
|
"test:browser:colors": "node scripts/e2e-color-system.mjs",
|
|
"test:browser:capture-fidelity": "node scripts/e2e-capture-fidelity.mjs",
|
|
"test:browser:capture-security": "node scripts/e2e-capture-security.mjs",
|
|
"test:browser:sitesmith": "node scripts/e2e-sitesmith.mjs",
|
|
"test:browser:sitesmith-cleaned": "node scripts/e2e-sitesmith-cleaned.mjs",
|
|
"test:unit:watch": "vitest"
|
|
},
|
|
"dependencies": {
|
|
"@codemirror/autocomplete": "^6.20.3",
|
|
"@codemirror/commands": "^6.10.4",
|
|
"@codemirror/lang-css": "^6.3.1",
|
|
"@codemirror/lang-html": "^6.4.11",
|
|
"@codemirror/lang-javascript": "^6.2.5",
|
|
"@codemirror/language": "^6.12.4",
|
|
"@codemirror/state": "^6.7.1",
|
|
"@codemirror/theme-one-dark": "^6.1.3",
|
|
"@codemirror/view": "^6.43.6",
|
|
"@craftjs/core": "^0.2.10",
|
|
"@craftjs/layers": "^0.2.7",
|
|
"dompurify": "^3.4.5",
|
|
"html-to-image": "1.11.13",
|
|
"react": "^18.3.1",
|
|
"react-dom": "^18.3.1"
|
|
},
|
|
"devDependencies": {
|
|
"@playwright/test": "^1.59.1",
|
|
"@types/dompurify": "^3.0.5",
|
|
"@types/react": "^18.3.12",
|
|
"@types/react-dom": "^18.3.1",
|
|
"@vitejs/plugin-react": "^4.3.4",
|
|
"@vitest/ui": "^4.1.7",
|
|
"jsdom": "^29.1.1",
|
|
"typescript": "^5.6.3",
|
|
"vite": "^6.0.5",
|
|
"vitest": "^4.1.7"
|
|
}
|
|
}
|