remove dead ContentView.swift and IcedViewportRepresentable, relocate Notification.Name extensions

This commit is contained in:
jess 2026-04-07 17:54:33 -07:00
parent 7a2aa08d1c
commit 4efab49959
3 changed files with 10 additions and 36 deletions

View File

@ -3,6 +3,16 @@ import Combine
import SwiftUI import SwiftUI
import UniformTypeIdentifiers import UniformTypeIdentifiers
extension Notification.Name {
static let focusEditor = Notification.Name("focusEditor")
static let focusTitle = Notification.Name("focusTitle")
static let formatDocument = Notification.Name("formatDocument")
static let insertTable = Notification.Name("insertTable")
static let boldSelection = Notification.Name("boldSelection")
static let italicizeSelection = Notification.Name("italicizeSelection")
static let smartEval = Notification.Name("smartEval")
}
class WindowController { class WindowController {
let window: NSWindow let window: NSWindow
let appState: AppState let appState: AppState

View File

@ -1,26 +0,0 @@
import SwiftUI
struct ContentView: View {
@ObservedObject var state: AppState
@State private var themeVersion: Int = 0
var body: some View {
let _ = themeVersion
IcedViewportRepresentable()
.frame(minWidth: 700, minHeight: 400)
.background(Color(ns: Theme.current.base))
.onReceive(NotificationCenter.default.publisher(for: .settingsChanged)) { _ in
themeVersion += 1
}
}
}
extension Notification.Name {
static let focusEditor = Notification.Name("focusEditor")
static let focusTitle = Notification.Name("focusTitle")
static let formatDocument = Notification.Name("formatDocument")
static let insertTable = Notification.Name("insertTable")
static let boldSelection = Notification.Name("boldSelection")
static let italicizeSelection = Notification.Name("italicizeSelection")
static let smartEval = Notification.Name("smartEval")
}

View File

@ -171,13 +171,3 @@ class IcedViewportView: NSView {
viewport_key_event(h, UInt32(event.keyCode), UInt32(event.modifierFlags.rawValue), true, nil) viewport_key_event(h, UInt32(event.keyCode), UInt32(event.modifierFlags.rawValue), true, nil)
} }
} }
// MARK: - SwiftUI Bridge
struct IcedViewportRepresentable: NSViewRepresentable {
func makeNSView(context: Context) -> IcedViewportView {
IcedViewportView(frame: .zero)
}
func updateNSView(_ nsView: IcedViewportView, context: Context) {}
}