validate: removed-from-sale IAPs are no blockers; shots capture --device landscape (Mac / Chromebook frames from a web build); playwright lookup says why each place failed

This commit is contained in:
CRTkafa 2026-11-03 23:14:34 +07:00
parent cdd9321794
commit d0f568ebc2
13 changed files with 230 additions and 48 deletions

View file

@ -175,6 +175,15 @@ export function frameDims(config: Pick<ShipConfig, 'apple' | 'shots'>): Record<'
return { phone: { ...DEFAULT_PHONE, ...config.shots?.phone }, tablet: { ...tablet, ...config.shots?.tablet } };
}
/** Landscape capture viewport (shots.landscape.size): a desktop window, 1440 x 900 CSS px @2x = 2880 x 1800 (the Mac size). No status bar. */
export const DEFAULT_LANDSCAPE: FrameDims = { w: 1440, h: 900, dpr: 2, bar: 0 };
/** Viewport `shots capture` uses for landscape frames (<lang>/landscape/<name>.png): shots.landscape.size over the default. */
export function landscapeDims(config: Pick<ShipConfig, 'shots'>): FrameDims {
const s = config.shots?.landscape?.size;
return { ...DEFAULT_LANDSCAPE, ...(s ? { w: s.w, h: s.h, ...(s.dpr ? { dpr: s.dpr } : {}) } : {}), bar: 0 };
}
/** Play tablet size keys (7" and 10"): optional on Play, switched by play.tablets. */
export const PLAY_TABLET_SIZES: readonly string[] = ['tab7', 'tab10'];
@ -193,6 +202,12 @@ export function defaultSizes(config: Pick<ShipConfig, 'apple' | 'play'>, tablets
: k.startsWith('ios') ? apple : PLAY_TABLET_SIZES.includes(k) ? play && tabs : play));
}
/** True when `shots render` draws a landscape size for this project (apple.mac, play.chromebook, shots.landscape.playTablets):
* it then needs <lang>/landscape/<name>.png frames, which `shots capture` makes with the landscape device. Same rules as render. */
export function rendersLandscape(config: Pick<ShipConfig, 'apple' | 'play' | 'shots'>): boolean {
return defaultSizes(config).some(s => renderDims(s, config.shots).landscape);
}
/** Scenes of a variant (its order / subset, palette overrides), or the base scenes. */
export function variantScenes(shots: ShotsConfig, variant?: string): ShotScene[] {
if (!variant) return shots.scenes;