Cotton code
30 lines · 1.3 KB · SwiftRaw
// The one view a table's list stands above its slips, named by the// definition's `list_head` from a fixed vocabulary — never by the engine's or// the table's name (architect, 13 Oct 2026). `next_alarm` is the only one:// `AlarmListHead`.//// Why the next-alarm line is not a generic key (a `summary` line drawn once// from a value the engine answers): what it says is device state no record// holds. It is withheld while THIS phone will not ring (the alarm gate, asked// of the system on every sync pass), it counts down against the clock now,// ticking, and the note under it is the system's permission, not a value. An// answered summary would be stale the minute it was read and could not// withhold itself on a silent phone. So the engine keeps its small view, and// the list draws whatever its engine registers here, once, for any table.import SwiftUIenum EngineListHead {    /// Whether `definition`'s list stands a view above its slips: its    /// definition names one (`list_head`) this build draws.    static func stands(for definition: TableDefinition) -> Bool {        definition.listHead == .nextAlarm    }    @ViewBuilder static func view(for definition: TableDefinition) -> some View {        switch definition.listHead {        case .nextAlarm: AlarmListHead()        case nil: EmptyView()        }    }}