34 lines
1.7 KiB
PowerShell
34 lines
1.7 KiB
PowerShell
$ErrorActionPreference = 'Stop'
|
|
$root = Split-Path $PSScriptRoot -Parent
|
|
$page = [System.IO.File]::ReadAllText((Join-Path $root 'pages/records/r01-people-list.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 @(
|
|
'grid-template-columns: minmax(0, 1fr) 126rpx',
|
|
'class="people-state-card__copy"',
|
|
'@include adaptive-records-field;',
|
|
'@include adaptive-records-person;',
|
|
'min-height: clamp(92px, 190rpx, 108px)',
|
|
'import { onLoad } from "@dcloudio/uni-app";',
|
|
'onLoad((query) => {'
|
|
)) {
|
|
if (-not $page.Contains($expected)) { throw "R01 document-flow contract missing: $expected" }
|
|
}
|
|
|
|
if ($profiles -notmatch '(?s)@mixin\s+adaptive-records-person\s*\{.*?r01-person-name-card\.png.*?padding:\s*28rpx\s+64rpx;') {
|
|
throw 'The adaptive profile owner must retain the R01 artwork and content-safe padding'
|
|
}
|
|
if ($page -match '(?s)\.person-card\s*\{[^}]*(?<!min-)height\s*:|(?s)\.person-card\s*\{[^}]*padding\s*:\s*\d+%') {
|
|
throw 'R01 person cards must grow with content and consume profile-owned frame padding'
|
|
}
|
|
if ($page -match 'location\.hash|new URLSearchParams') {
|
|
throw 'R01 review states must use the UniApp onLoad route contract on Android'
|
|
}
|
|
|
|
if ($page -match '<image\s+(?:[^>]*\s)?class="person-card__skin"|people-search\s*>\s*<image|people-result-empty\s*>\s*<image|people-state-card\s*>\s*<image') {
|
|
throw 'R01 decorative frames must be container backgrounds instead of positioned image layers'
|
|
}
|
|
if ($page -match 'position\s*:') { throw 'R01 must not use positioning declarations' }
|
|
|
|
Write-Output 'R01-DOCUMENT-FLOW-CONTRACT PASS'
|