27 lines
1.4 KiB
PowerShell
27 lines
1.4 KiB
PowerShell
$ErrorActionPreference = 'Stop'
|
|
$root = Split-Path $PSScriptRoot -Parent
|
|
$page = [System.IO.File]::ReadAllText((Join-Path $root 'pages/family/f01-family-feed.vue'), [System.Text.Encoding]::UTF8)
|
|
$profiles = [System.IO.File]::ReadAllText((Join-Path $root 'styles/adaptive-frame-profiles.scss'), [System.Text.Encoding]::UTF8)
|
|
|
|
foreach ($expected in @(
|
|
'box-sizing: border-box',
|
|
'width: 514rpx',
|
|
'@use "../../styles/adaptive-frame-profiles.scss" as adaptive;',
|
|
'@include adaptive-scroll-button(secondary);',
|
|
'@include adaptive-family-letter;',
|
|
'@include adaptive-scroll-button(primary);'
|
|
)) {
|
|
if (-not $page.Contains($expected)) { throw "F01 document-flow contract missing: $expected" }
|
|
}
|
|
foreach ($expected in @(
|
|
'@mixin adaptive-family-letter',
|
|
'"/static/assets/modules/family/transparent/f01-family-letter-card.png"'
|
|
)) {
|
|
if (-not $profiles.Contains($expected)) { throw "Adaptive profile contract missing: $expected" }
|
|
}
|
|
if ($page -match '100%\s+100%\s+no-repeat|border-image-slice\s*:') { throw 'F01 must consume adaptive frame geometry without page-local stretching or slicing' }
|
|
if ($page -match '<image\s+(?:[^>]*\s)?class="(?:feed-shortcuts__skin|feed-card__skin)"|feed-state-card\s*>\s*<image|feed-action[^>]*>\s*<image') { throw 'F01 decorative skins must be container backgrounds' }
|
|
if ($page -match 'position\s*:') { throw 'F01 must keep ordinary content in document flow' }
|
|
|
|
Write-Output 'F01-DOCUMENT-FLOW-CONTRACT PASS'
|