23 lines
863 B
PowerShell
23 lines
863 B
PowerShell
$ErrorActionPreference = 'Stop'
|
|
$root = Split-Path $PSScriptRoot -Parent
|
|
$component = [System.IO.File]::ReadAllText((Join-Path $root 'components/ModulePage.vue'), [System.Text.Encoding]::UTF8)
|
|
|
|
foreach ($expected in @(
|
|
'class="form-row"',
|
|
'class="settings-row"',
|
|
'grid-template-columns: auto minmax(0, 1fr)',
|
|
'grid-template-columns: minmax(0, 1fr) auto',
|
|
'pointer-events: none'
|
|
)) {
|
|
if (-not $component.Contains($expected)) { throw "ModulePage document-flow contract missing: $expected" }
|
|
}
|
|
|
|
foreach ($selector in @('.form-row > text','.form-row input','.settings-row > text')) {
|
|
$escaped = [regex]::Escape($selector)
|
|
if ($component -match "(?s)$escaped\s*\{[^}]*position\s*:\s*(absolute|fixed|sticky)\s*;") {
|
|
throw "ModulePage normal content selector uses positioning: $selector"
|
|
}
|
|
}
|
|
|
|
Write-Output 'MODULE-PAGE-DOCUMENT-FLOW-CONTRACT PASS'
|