importFoundationimport XCTest@testable importCottonUI/// No bottom sheets (row E of the deck faces, 23 Oct 2026; the owner: sheets are/// out of the design). What a sheet carried opens as a card (`cottonCard`);/// the system's own pickers keep theirs (`photosPicker`, `fileImporter`, the/// camera's cover) and the share sheet is UIKit's.finalclassNoBottomSheetsTests: XCTestCase {/// RULE: nothing in CottonUI presents a SwiftUI sheet or sizes one — every form, picker and flow a sheet carried opens as a card on its page (`CardLayer`).func testNothingInCottonUIPresentsASheet() throws {let presents = #"\.sheet\s*\(\s*(isPresented|item)\s*:|\bpresentationDetents\s*\(|\binteractiveDismissDisabled\s*\(\s*\)"# XCTAssertFalse(trySourceSweep.matches(presents, in: "x.sheet(isPresented: $on) {}").isEmpty) XCTAssertTrue(trySourceSweep.matches(presents, in: "Rectangle().fill(theme.sheet(.cream))").isEmpty)let files = trySourceSweep.swiftSources().filter { $0.name.hasPrefix("CottonUI/") } XCTAssertFalse(files.isEmpty)for file in files {let hits = trySourceSweep.matches(presents, in: SourceSweep.withoutComments(file.text)) XCTAssertTrue(hits.isEmpty, "\(file.name) presents a sheet: \(hits)") } }func testACardTakesTheSmallestHeightItsSheetNamed() { XCTAssertEqual(CardLayerKnobs.height([.content]), .content) XCTAssertEqual(CardLayerKnobs.height([.half, .tall]), .half) XCTAssertEqual(CardLayerKnobs.height([.tall]), .tall) }}