Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ dist
*.tsbuildinfo
.DS_Store
.claude/settings.local.json
packages/ghost-ui/public/r/
17 changes: 12 additions & 5 deletions packages/ghost-core/src/scanners/visual-harness.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import type { RegistryItem, VisualScanConfig } from "../types.js";

// Dynamic import helper — bypasses TypeScript's compile-time module resolution
// so optional peer dependencies don't cause build errors when not installed.
// biome-ignore lint/suspicious/noExplicitAny: dynamic imports return unknown module shapes
async function optionalImport(id: string): Promise<any> {
return import(/* webpackIgnore: true */ id);
}
Expand Down Expand Up @@ -213,10 +214,13 @@ export default defineConfig({
});

// Dynamically import optional dependencies
// eslint-disable-next-line @typescript-eslint/no-explicit-any
// biome-ignore lint/suspicious/noExplicitAny: dynamic imports with unknown module shapes
let createServer: any;
// biome-ignore lint/suspicious/noExplicitAny: dynamic imports with unknown module shapes
let chromium: any;
// biome-ignore lint/suspicious/noExplicitAny: dynamic imports with unknown module shapes
let pixelmatch: any;
// biome-ignore lint/suspicious/noExplicitAny: dynamic imports with unknown module shapes
let PNG: any;

try {
Expand Down Expand Up @@ -285,6 +289,7 @@ export default defineConfig({
timeout: config.timeout,
});
await regPage
// biome-ignore lint/suspicious/noExplicitAny: browser context global
.waitForFunction(() => (window as any).__GHOST_READY === true, {
timeout: config.timeout,
})
Expand All @@ -298,6 +303,7 @@ export default defineConfig({
timeout: config.timeout,
});
await conPage
// biome-ignore lint/suspicious/noExplicitAny: browser context global
.waitForFunction(() => (window as any).__GHOST_READY === true, {
timeout: config.timeout,
})
Expand Down Expand Up @@ -420,6 +426,7 @@ root.render(<App />);
`;
}

// biome-ignore lint/suspicious/noExplicitAny: dynamically imported PNG constructor
function resizePng(PNG: any, img: any, width: number, height: number): any {
if (img.width === width && img.height === height) return img;

Expand All @@ -432,10 +439,10 @@ function resizePng(PNG: any, img: any, width: number, height: number): any {
for (let x = 0; x < img.width; x++) {
const srcIdx = (y * img.width + x) * 4;
const dstIdx = (y * width + x) * 4;
resized.data[dstIdx] = img.data[srcIdx]!;
resized.data[dstIdx + 1] = img.data[srcIdx + 1]!;
resized.data[dstIdx + 2] = img.data[srcIdx + 2]!;
resized.data[dstIdx + 3] = img.data[srcIdx + 3]!;
resized.data[dstIdx] = img.data[srcIdx];
resized.data[dstIdx + 1] = img.data[srcIdx + 1];
resized.data[dstIdx + 2] = img.data[srcIdx + 2];
resized.data[dstIdx + 3] = img.data[srcIdx + 3];
}
}

Expand Down
16 changes: 0 additions & 16 deletions packages/ghost-ui/public/r/accordion.json

This file was deleted.

16 changes: 0 additions & 16 deletions packages/ghost-ui/public/r/agent.json

This file was deleted.

16 changes: 0 additions & 16 deletions packages/ghost-ui/public/r/alert-dialog.json

This file was deleted.

16 changes: 0 additions & 16 deletions packages/ghost-ui/public/r/alert.json

This file was deleted.

Loading
Loading