oficina / docs Public

Clone
git clone https://amadan.net/oficina/docs

Plain git — no account needed to clone.

Download

Download this file

1#if os(macOS)
2import AppKit
3import RastrilloApple
4import SwiftUI
5
6struct DocsEditorContext {
7 let model: DocsModel
8 let rename: () -> Void
9 let client: NativeHTTP
10 let zoom: Binding<Double>
11 let paged: Binding<Bool>
12 let inspecting: Binding<Bool>
13 let sharing: Binding<Bool>
14 let exportRequest: Binding<String?>
15 @MainActor var actions: DocumentCommands? {
16 guard NSApp.keyWindow?.firstResponder is DocsTextView, let projection = model.projection else { return nil }
17 return DocumentCommands(model: model, content: NativeTextProjection.render(projection))
18 }
19}
20extension FocusedValues { @Entry var docsEditor: DocsEditorContext? }
21#endif
22