19 lines
1.1 KiB
PowerShell
19 lines
1.1 KiB
PowerShell
$ErrorActionPreference = 'Stop'
|
|
$root = Split-Path $PSScriptRoot -Parent
|
|
$publish = [System.IO.File]::ReadAllText((Join-Path $root 'pages/family/f02-publish-feed.vue'), [System.Text.Encoding]::UTF8)
|
|
$editor = [System.IO.File]::ReadAllText((Join-Path $root 'pages/family/f06-article-editor.vue'), [System.Text.Encoding]::UTF8)
|
|
|
|
foreach ($selector in @('.publish-form, .publish-result','.publish-field textarea')) {
|
|
$escaped = [regex]::Escape($selector)
|
|
if ($publish -match "(?s)$escaped\s*\{[^}]*position\s*:\s*(absolute|fixed|sticky)\s*;") { throw "F02 normal content selector uses positioning: $selector" }
|
|
}
|
|
foreach ($selector in @('.editor-control input, .editor-control textarea')) {
|
|
$escaped = [regex]::Escape($selector)
|
|
if ($editor -match "(?s)$escaped\s*\{[^}]*position\s*:\s*(absolute|fixed|sticky)\s*;") { throw "F06 normal content selector uses positioning: $selector" }
|
|
}
|
|
foreach ($content in @($publish,$editor)) {
|
|
if (-not $content.Contains('pointer-events: none')) { throw 'Family editor decorative skins must not intercept form controls' }
|
|
}
|
|
|
|
Write-Output 'FAMILY-EDITORS-DOCUMENT-FLOW-CONTRACT PASS'
|