// The head of Me's page (owner's rule 8, 16 Oct 2026: Home becomes Me). It // lives apart from the board's files: it draws the record pages' act kit, // whose names are that kit's, never Home's tiles (HomeTileWordTests). import CottonKit import SwiftUI /// The head's one word: the face's name as read, and nothing before the read /// answers or when it names nobody — never a stand-in word such as the fan /// card's "Me" (the owner's 289 screenshots drew "Me" twice). enum HomeHeadTitle { static func of(_ face: HomeFace?) -> String? { guard let name = face?.name, !name.isEmpty else { return nil } return name } } #if os(iOS) /// The head of Me's page, its title: the person's print and name, drawn once /// from the face read and nothing before it answers; a tap opens their own /// page (People's record) in place on Me's stack. struct HomeHead: View { @Environment(\.theme) private var theme let face: HomeFace? let onOpen: () -> Void var body: some View { HStack(spacing: 16) { if let face { Button(action: onOpen) { HStack(spacing: 16) { HomeFacePrint(face: face, width: HomeHeadKnobs.printWidth) if let title = HomeHeadTitle.of(face) { Text(title) .font(theme.type.title(HomeHeadKnobs.nameSize)) .foregroundStyle(theme.colors.ink.color) .lineLimit(2) } Spacer(minLength: 0) } .contentShape(Rectangle()) } .buttonStyle(.plain) .accessibilityIdentifier("home-head") } } } } enum HomeHeadKnobs { static let printWidth: CGFloat = 84 static let nameSize: CGFloat = 28 } #endif