修改未完成

This commit is contained in:
rain
2026-07-29 18:15:59 +08:00
parent 6fbcf21024
commit 8c2355a52c
59 changed files with 7995 additions and 1118 deletions
+37 -44
View File
@@ -1,58 +1,51 @@
$ErrorActionPreference = 'Stop'
$root = Split-Path -Parent $PSScriptRoot
$page = Get-Content -LiteralPath (Join-Path $root 'pages/tree/t01-tree-overview.vue') -Raw -Encoding utf8
$tree = Get-Content -LiteralPath (Join-Path $root 'pages/tree/t01-tree-overview.vue') -Raw -Encoding utf8
$page = Get-Content -LiteralPath (Join-Path $root 'pages/tree/t02-pedigree-overview.vue') -Raw -Encoding utf8
foreach ($required in @(
'import AppButton from "@/components/AppButton.vue"',
'<AppButton',
'type="secondary"',
'@click="toMember"',
't01-member-node-standard.png',
't01-member-node-selected.png',
't01-state-panel.png',
'openMemberPanel(member)',
'member-action-profile',
'v-for="connector in lineageConnectors"',
'lineage-pan-cue',
'const treeScrollLeft = ref(90)',
':scroll-left="treeState === ''tree'' ? treeScrollLeft : 0"',
':style="treeState === ''tree'' ? treeMetricsStyle : undefined"'
'@action="toTree"',
'class="pedigree-page"',
'class="pedigree-layout"',
'class="pedigree-scroll"',
'class="pedigree-sheet"',
'class="pedigree-column pedigree-column--legend"',
'class="member-node__relation"',
'class="member-node__name"',
'class="member-node__copy"',
'class="generation-band__arrow"',
'v-for="(page, pageIndex) in pedigreePages"',
'v-for="(member, memberIndex) in page.members"',
'class="pedigree-swiper"',
':disable-touch="false"',
'scroll-y',
'const openMemberProfile = (member) =>',
'const openMemberDetail = async (member) =>',
'detailVisible',
'<AppDialog'
)) {
if ($page -notmatch [regex]::Escape($required)) { throw "T01 member action asset missing: $required" }
}
foreach ($forbidden in @(
'a01-primary-button-v2.png',
'a01-secondary-button-v2.png'
)) {
if ($page -match [regex]::Escape($forbidden)) { throw "T01 must consume AppButton instead of legacy action asset: $forbidden" }
if ($page -notmatch [regex]::Escape($required)) {
throw "T02 pedigree visual contract missing: $required"
}
}
foreach ($rule in @(
'(?s)\.tree-toolbar__title text:last-child\s*\{[^}]*font-size:\s*22rpx;',
'(?s)\.tree-toolbar__actions\s*\{[^}]*font-size:\s*23rpx;',
'(?s)\.generation-band\s*\{[^}]*font-size:\s*22rpx;',
'(?s)\.node-relation\s*\{[^}]*font-size:\s*21rpx;',
'(?s)\.node-years\s*\{[^}]*font-size:\s*20rpx;',
'(?s)\.tree-state-card__copy\s*\{[^}]*font-size:\s*24rpx;',
'(?s)\.member-action-profile__copy text:nth-child\(2\)\s*\{[^}]*font-size:\s*21rpx;',
'(?s)\.tree-stage--lineage\s*\{[^}]*display:\s*grid;[^}]*grid-template-columns:\s*190rpx minmax\(0, 1fr\);',
'(?s)\.generation-rail\s*\{[^}]*display:\s*grid;[^}]*width:\s*190rpx;',
'(?s)\.tree-scroll--lineage\s*\{[^}]*grid-area:\s*1 / 2;[^}]*min-width:\s*0;',
'(?s)\.lineage-pan-cue\s*\{[^}]*grid-area:\s*1 / 2;',
'const treeMetricsStyle = computed',
'(?s)\.generation-band\s*\{[^}]*display:\s*grid;',
'(?s)\.generation-band image,\s*\.generation-band__copy\s*\{[^}]*grid-area:\s*1 / 1;',
'(?s)\.member-node\s*\{[^}]*display:\s*grid;',
'(?s)\.member-node__skin,\s*\.member-node__copy\s*\{[^}]*grid-area:\s*1 / 1;',
'(?s)\.member-action-profile\s*\{[^}]*display:\s*flex;[^}]*align-items:\s*center;',
'(?s)\.member-action-profile__avatar\s*\{[^}]*width:\s*82rpx;[^}]*aspect-ratio:\s*1;[^}]*flex:\s*0 0 82rpx;'
'(?s)\.pedigree-layout\s*\{[^}]*display:\s*grid;[^}]*grid-template-columns:\s*minmax\(0, 1fr\) 92rpx;',
'(?s)\.pedigree-swiper\s*\{[^}]*width:\s*100%;[^}]*height:\s*100%;',
'(?s)\.pedigree-sheet\s*\{[^}]*display:\s*grid;[^}]*width:\s*100%;[^}]*grid-template-columns:\s*repeat\(6, minmax\(0, 1fr\)\);',
'(?s)\.member-node\s*\{[^}]*grid-template-rows:\s*144rpx 274rpx minmax\(0, 1fr\);',
'(?s)\.member-node__name\s*\{[^}]*font-size:\s*34rpx;',
'(?s)\.member-node__copy\s*\{[^}]*writing-mode:\s*vertical-rl;',
'(?s)\.generation-band__copy\s*\{[^}]*writing-mode:\s*vertical-rl;'
)) {
if ($page -notmatch $rule) { throw "T01 readable visual rule missing: $rule" }
if ($page -notmatch $rule) { throw "T02 pedigree visual rule missing: $rule" }
}
if ($page -match '(?s)<view\s+class="tree-canvas".*?<view class="lineage-pan-cue">') {
throw 'T01 horizontal reading cue must stay in the visible lineage viewport, not inside the wide canvas'
if ($page -match 'scroll-x|treeScrollLeft|openMemberPanel') {
throw 'T02 must use direct swiper gestures and separate its name/detail tap targets'
}
if ($tree -notmatch 'scroll-x|treeScrollLeft|class="lineage-pan-cue"|@action="toPedigree"') {
throw 'T01 must retain the horizontal tree-diagram reader and its pedigree entry'
}
Write-Output 'T01-ALL-STATES-VISUAL-CONTRACT PASS'