// THE WHOLE SCREEN (owner, 26 Oct 2026: "full screen is the thing"). What// opens over the deck as itself — a note or a memory on its reading page, a// card whole, Now Playing, the contacts import — covers the screen edge to// edge on the page's own paper, never the system's white and never a card// inside the deck's frame. One presentation for all of them, so each is the// same cover: the paper ground under it, the cards it opens standing inside it// (`cardLayers`), its receipts drawn over it rather than under it at the root,// its own top inset measured, and the page under it out of the accessibility// tree while it stands. What// stands on it brings its own one close; the cover adds none.importCottonPaperimportSwiftUIextensionView {/// Covers the whole screen with `content` while `isPresented` is true./// `onDismiss` runs once it is down, however it went.func wholeScreen<Cover: View>( isPresented: Binding<Bool>, onDismiss: (() -> Void)? = nil, @ViewBuilder content: @escaping () -> Cover ) -> someView { modifier(WholeScreenCover(isPresented: isPresented, onDismiss: onDismiss, cover: content)) }}privatestructWholeScreenCover<Cover: View>: ViewModifier { @Binding var isPresented: Boollet onDismiss: (() -> Void)?let cover: () -> Cover/// The window's centre, when there is one: a cover is its own presentation/// over the root, so the root's receipt would be drawn under it. @Environment(ToastCenter.self) privatevar toasts: ToastCenter?func body(content: Content) -> someView { content.fullScreenCover(isPresented: $isPresented, onDismiss: onDismiss) {WholeScreenPage(toasts: toasts, content: cover) } }}privatestructWholeScreenPage<Content: View>: View {let toasts: ToastCenter?let content: () -> Contentvar body: someView { receipts(content().cardLayers())// The cover is a host of its own over the whole window: what// stands on it clears the status bar by the cover's inset, not by// the page it was opened from (a tile's page has none left). .modifier(MeasuresHostTopInset()) #if os(iOS)// The page under the cover leaves the accessibility tree while it// is up, as under the viewer (`ViewerHost`). .background { SheetModalAnchor() } #endif// The paper under it, never the system's white. .presentationBackground { PageGroundFill().ignoresSafeArea() } } @ViewBuilder privatefunc receipts(_ page: someView) -> someView {iflet toasts { page.cottonToastsOverCover(toasts) } else { page } }}