Improve JSON editor for macOS

This commit is contained in:
世界
2025-11-26 22:25:52 +08:00
parent 3f1c716a0a
commit c5fd6a6b4e
25 changed files with 979 additions and 322 deletions
@@ -0,0 +1,14 @@
#if os(iOS) || os(macOS)
import SwiftUI
public struct ProfileEditorKey: EnvironmentKey {
public static let defaultValue: ((Binding<String>, Bool) -> AnyView)? = nil
}
public extension EnvironmentValues {
var profileEditor: ((Binding<String>, Bool) -> AnyView)? {
get { self[ProfileEditorKey.self] }
set { self[ProfileEditorKey.self] = newValue }
}
}
#endif