// A quiet typed row on the plaster — the verbs under an object.//// The open key tag's "Put on a machine", a settings line: a thing a person// can DO or OPEN next to an object, which is not itself a piece of paper. Picture 26 draws them as typewriter words with a// pencil glyph before them, a chevron after, and a hairline under each — no// card, no fill, nothing that competes with the object above.//// It is not `SettingsRow` restyled. That row is chrome inside a white card;// this one stands on the ground a paper screen already painted, and sets its// words in the typewriter because it sits among objects rather than in a form.importSwiftUIpublicstructTypedRow: View { @Environment(\.theme) privatevar theme @Environment(\.openedCardGround) privatevar groundprivatelet symbol: String?privatelet label: Stringprivatelet detail: String?privatelet chevron: Boolprivatelet destructive: Boolprivatelet action: () -> Voidpublicinit( symbol: String? = nil, label: String, detail: String? = nil, chevron: Bool = true, destructive: Bool = false, action: @escaping () -> Void ) {self.symbol = symbolself.label = labelself.detail = detailself.chevron = chevronself.destructive = destructiveself.action = action }publicvar body: someView {Button(action: action) { VStack(spacing: 0) { HStack(alignment: .center, spacing: TypedRowKnobs.typedRowGap) {iflet symbol {Image(systemName: Glyph.symbol(symbol) ?? symbol) .font(theme.type.interface(TypedRowKnobs.typedRowGlyphSize, weight: .regular)) .foregroundStyle(destructive ? theme.colors.error.color : (DeckGround.own(ground) ? DeckGround.ink(.pencil, on: ground, theme: theme) : theme.colors.inkSecondary.color)) .frame(width: TypedRowKnobs.typedRowGlyphWidth) } VStack(alignment: .leading, spacing: TypedRowKnobs.typedRowStackGap) {Text(label) .font(theme.type.body(theme.scale.bodySize + 1)) .foregroundStyle(destructive ? theme.colors.error.color : (DeckGround.own(ground) ? DeckGround.ink(.ink, on: ground, theme: theme) : theme.colors.ink.color)) .lineLimit(TypedRowKnobs.typedRowLines) .multilineTextAlignment(.leading)iflet detail {Text(detail) .font(theme.type.body(theme.scale.bodySize - 2)) .foregroundStyle(DeckGround.own(ground) ? DeckGround.ink(.pencil, on: ground, theme: theme) : theme.colors.inkTertiary.color) .lineLimit(TypedRowKnobs.typedRowLines) .multilineTextAlignment(.leading) } }Spacer(minLength: TypedRowKnobs.typedRowChevronMinGap)if chevron {Image(systemName: "chevron.right") .font(theme.type.interface(TypedRowKnobs.typedRowChevronSize, weight: .medium)) .foregroundStyle(DeckGround.own(ground) ? DeckGround.ink(.pencil, on: ground, theme: theme) : theme.colors.inkTertiary.color) } } .padding(.vertical, TypedRowKnobs.typedRowVerticalInset)Rectangle() .fill(theme.colors.hairline.color) .frame(height: theme.scale.hairline) } .padding(.horizontal, TypedRowKnobs.typedRowHorizontalInset) .contentShape(Rectangle()) } .buttonStyle(OpacityButtonStyle()) }}/// The sizes, counts and timings TypedRow draws with: Swift's own, beside/// their reader — a theme sets only its tokens (`scale.tokens`).enumTypedRowKnobs {staticlet typedRowChevronMinGap: CGFloat = 8staticlet typedRowChevronSize: CGFloat = 13staticlet typedRowGap: CGFloat = 16staticlet typedRowGlyphSize: CGFloat = 16staticlet typedRowGlyphWidth: CGFloat = 26staticlet typedRowHorizontalInset: CGFloat = 6staticlet typedRowLines = 2staticlet typedRowStackGap: CGFloat = 3staticlet typedRowVerticalInset: CGFloat = 15}