$ErrorActionPreference = 'Stop' $root = Split-Path -Parent $PSScriptRoot $componentPath = Join-Path $root 'components/ModulePage.vue' if (-not (Test-Path -LiteralPath $componentPath)) { throw 'Missing shared module page component' } $component = Get-Content -LiteralPath $componentPath -Raw -Encoding utf8 foreach ($anchor in @( 'const moduleState = ref(', '["loading", "empty", "success", "error"].includes(query.state)', 'module-state--${moduleState}', 'empty: {', 'success: {', 'error: {', 'module-content-frame.png', 'module-field-frame.png', ' ({', '"--module-content-asset": `url(${contentAsset.value})`', '"--module-field-asset": `url(${fieldAsset.value})`', 'query.state' )) { if ($component -notmatch [regex]::Escape($anchor)) { throw "ModulePage is missing high-spec anchor: $anchor" } } foreach ($forbidden in @( 'class="page-intro"', 'g03-create-flow-panel.png', 'g06-search-input-wide.png', 'application-status-card.png', 'background: var(--module-field-asset) center / 100% 100% no-repeat;', 'background: var(--module-content-asset) center / 100% 100% no-repeat;', 'height: 100%;' )) { if ($component -match [regex]::Escape($forbidden)) { throw "ModulePage must not keep obsolete shared surface: $forbidden" } } foreach ($className in @('module-panel', 'form-row', 'list-card', 'detail-card', 'timeline-row', 'settings-row', 'status-card')) { foreach ($property in @('border', 'border-radius', 'box-shadow')) { if ($component -match "(?s)\.$className\s*\{[^}]*\b$property\s*:") { throw "ModulePage must not construct .$className with CSS $property" } } } if ($component -match '::before|::after') { throw 'ModulePage must not draw visible decorations with CSS pseudo-elements' } if ($component -match '