Skip to content

XrayOptions

Defined in: index.ts:42

Options for xrayVitePlugin().

Fixed conventions are intentionally not configurable: Plate names come from virtual:xray/plates/<name>, files live under platesDir, and responsive breakpoints are derived from captured CSS plus the matchMedia queries the page evaluates.

optional capture?: boolean

Defined in: index.ts:57

Whether recording is engaged at boot in dev. Keep this off for normal browsing and let the HUD (or ?xray-capture) engage recording per tab. Default: false.


optional collect?: object

Defined in: index.ts:75

Collect-stage limits (ADR 0022): refuse to capture a boundary whose measured tree exceeds any axis — too big means the Skeleton sits too high in the tree. maxNodes caps total surviving nodes (default 4096), maxBreadth the widest level (default 512), maxDepth the nesting depth (default 32). Omit maxNodes and it derives as round(maxBreadth × maxDepth / 4). Override one boundary with the flat maxNodes/maxBreadth/maxDepth <Skeleton> props.

optional maxBreadth?: number

optional maxDepth?: number

optional maxNodes?: number


optional delay?: number

Defined in: index.ts:62

Settle delay in milliseconds before capturing a ready Skeleton; override one boundary with the delay prop. Default: 200.


optional fixtures?: object

Defined in: index.ts:86

Dev-only Fixtures (ADR 0015): record a <Skeleton>’s render-input data to a plates/<name>.fixture.json sidecar and replay it in place of live data so capture is deterministic. Boot state only — the HUD is per-tab authority, just like capture. Entirely dev-only; nothing here ships in production.

optional record?: "manual" | "first-ready" | "always"

When to record the live data: 'manual' (HUD button only — the default, so live app data is never silently committed), 'first-ready' (record once the first time a Skeleton goes ready with no Fixture yet), or 'always' (record on every ready render). Default: 'manual'.

optional replay?: false | "prefer" | "missing-only"

Whether to replay a recorded Fixture in place of live data: false (off, the default), 'prefer' (always use the Fixture when one exists), or 'missing-only' (use the Fixture only when live data is nullish — missing ≡ nullish, so an empty array/object is present and stays capturable). Default: false.


optional hud?: boolean

Defined in: index.ts:52

Mount the dev HUD: record and Light Box controls, per-plate Coverage, per-plate keys. Default: false.


optional platesDir?: string

Defined in: index.ts:47

Directory where Plate JSON files are written and read, relative to the Vite root. Default: plates.


optional settleCap?: number

Defined in: index.ts:67

Upper bound in milliseconds on waiting for a busy subtree to go quiet before capturing anyway. Default: 5000.